Basic Image AlgorithmS Library: Basic Image AlgorithmS (BIAS) Library

  • Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • Directories
  • Related Pages
  • Examples

Basic Image AlgorithmS (BIAS) Library

2.4.1

General

  • Introduction
  • License
  • Building BIAS, required/optional packages
  • Overview of all Modules
  • Concepts and Ideas
  • Programming conventions

Contents

  • Image Components
  • Math Components
  • Geometry and Transformations
  • Filter 2D-2D operations
  • Parameter, Ground Truth Data, GUI components
  • Feature Tracker
  • Tool applications

Notes

  • CHANGELOG (updated by hand)
  • list of known bugs (generated from code)
  • list of known todos (generated from code)

Authors

The BIAS Software is designed, implemented and owned by MIP - Multimedia information processing group, University of Kiel, Germany (until otherwise noted).
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: File Index

  • Classes
  • Files
  • Directories
  • Related Pages
  • Examples
  • File List
  • File Members

Basic Image AlgorithmS Library File List

Here is a list of all files with brief descriptions:
D:/home/jw/build/BIAS/bias_config.h [code] |
BIAS_DeclSpec.hh [code] |
CHANGELOG [code] |
DEPENDENCIES [code] |
INSTALL [code] |
LGPL [code] |
LICENSE [code] |
precompiled.cpp [code] |
precompiled.h [code] |
Base/Common/BaseFactory.hh [code] |
Base/Common/BIASpragma.hh [code] |
Base/Common/BIASpragmaEnd.hh [code] |
Base/Common/BIASpragmaStart.hh [code] |
Base/Common/CompareFloatingPoint.hh [code] |
Base/Common/FileHandling.cpp [code] |
Base/Common/FileHandling.hh [code] |
Base/Common/getopt_long_W32.cpp [code] |
Base/Common/getopt_W32.cpp [code] |
Base/Common/getopt_W32.h [code] |
Base/Common/LeakChecking.h [code] |
Base/Common/W32Compat.cpp [code] |
Base/Common/W32Compat.hh [code] |
Base/Common/XMLBase.cpp [code] |
Base/Common/XMLBase.hh [code] |
Base/Common/XMLIO.cpp [code] |
Base/Common/XMLIO.hh [code] |
Base/Common/Examples/ExampleCompare.cpp [code] |
Base/Common/Examples/ExampleFactory.cpp [code] |
Base/Common/Examples/ExampleFileNames.cpp [code] |
Base/Common/Examples/ExampleXMLBase.cpp [code] |
Base/Common/Examples/ExampleXMLIO.cpp [code] |
Base/Debug/biasabort.cpp [code] |
Base/Debug/biasabort.hh [code] |
Base/Debug/biasexit.cpp [code] |
Base/Debug/biasexit.hh [code] |
Base/Debug/Constraints.hh [code] |
Base/Debug/Debug.cpp [code] |
Base/Debug/Debug.hh [code] | Some macros, classes and varaibles for debugging purposes:
Base/Debug/DebugSimple.hh [code] |
Base/Debug/Error.hh [code] |
Base/Debug/Exception.hh [code] |
Base/Debug/LogFacility.cpp [code] |
Base/Debug/LogFacility.hh [code] |
Base/Debug/RedirectStreams.hh [code] |
Base/Debug/ThreadNaming.cpp [code] |
Base/Debug/ThreadNaming.hh [code] | Utility function to assign "names" to threads, actually WIN32 only
Base/Debug/TimeMeasure.cpp [code] |
Base/Debug/TimeMeasure.hh [code] |
Base/Debug/TimeMeasurement.hh [code] | Time measurement based on instance construction and destruction
Base/Debug/Examples/DebugMyMain.cpp [code] |
Base/Debug/Examples/ExampleConstraints.cpp [code] |
Base/Debug/Examples/ExampleCopy.cpp [code] |
Base/Debug/Examples/ExampleLogFacility.cpp [code] |
Base/Debug/Examples/ExampleTimeMeasureCycle.cpp [code] |
Base/Debug/Examples/MyDebug.cpp [code] |
Base/Debug/Examples/MyDebug.hh [code] |
Base/Geometry/AffineTransf.cpp [code] |
Base/Geometry/AffineTransf.hh [code] |
Base/Geometry/EMatrixBase.cpp [code] |
Base/Geometry/EMatrixBase.hh [code] |
Base/Geometry/EuclideanTransf3D.cpp [code] |
Base/Geometry/EuclideanTransf3D.hh [code] |
Base/Geometry/FMatrixBase.cpp [code] |
Base/Geometry/FMatrixBase.hh [code] |
Base/Geometry/HMatrixBase.cpp [code] |
Base/Geometry/HMatrixBase.hh [code] |
Base/Geometry/HomgLine2D.cpp [code] |
Base/Geometry/HomgLine2D.hh [code] |
Base/Geometry/HomgLine3D.hh [code] |
Base/Geometry/HomgPlane3D.cpp [code] |
Base/Geometry/HomgPlane3D.hh [code] |
Base/Geometry/HomgPoint1D.cpp [code] |
Base/Geometry/HomgPoint1D.hh [code] |
Base/Geometry/HomgPoint2D.cpp [code] |
Base/Geometry/HomgPoint2D.hh [code] |
Base/Geometry/HomgPoint2DCov.cpp [code] |
Base/Geometry/HomgPoint2DCov.hh [code] |
Base/Geometry/HomgPoint3D.cpp [code] |
Base/Geometry/HomgPoint3D.hh [code] |
Base/Geometry/HomgPoint3DCov.cpp [code] |
Base/Geometry/HomgPoint3DCov.hh [code] |
Base/Geometry/KMatrix.cpp [code] |
Base/Geometry/KMatrix.hh [code] |
Base/Geometry/Normalization.cpp [code] |
Base/Geometry/Normalization.hh [code] |
Base/Geometry/PlueckerMatrix.cpp [code] |
Base/Geometry/PlueckerMatrix.hh [code] |
Base/Geometry/PMatrixBase.cpp [code] |
Base/Geometry/PMatrixBase.hh [code] |
Base/Geometry/PoseParametrization.cpp [code] |
Base/Geometry/PoseParametrization.hh [code] |
Base/Geometry/PoseParametrizationCovariance.cpp [code] |
Base/Geometry/PoseParametrizationCovariance.hh [code] |
Base/Geometry/Quaternion.cpp [code] |
Base/Geometry/Quaternion.hh [code] |
Base/Geometry/QuaternionInl.hh [code] |
Base/Geometry/QuaternionOperators.hh [code] |
Base/Geometry/RMatrixBase.cpp [code] |
Base/Geometry/RMatrixBase.hh [code] |
Base/Geometry/TrifocalTensorBase.cpp [code] |
Base/Geometry/TrifocalTensorBase.hh [code] |
Base/Geometry/Examples/ExamplePMatrixBase.cpp [code] |
Base/Geometry/Examples/ExampleQuaternion.cpp [code] |
Base/Geometry/Examples/ExampleRMatrix.cpp [code] |
Base/Image/Bresenham.hh [code] |
Base/Image/BresenhamCircle.hh [code] |
Base/Image/EightWaySymmetry.hh [code] |
Base/Image/ExifTag.cpp [code] |
Base/Image/ExifTag.hh [code] |
Base/Image/Image.cpp [code] |
Base/Image/Image.hh [code] |
Base/Image/ImageAttributes.cpp [code] |
Base/Image/ImageAttributes.hh [code] |
Base/Image/ImageBase.cpp [code] |
Base/Image/ImageBase.hh [code] |
Base/Image/ImageBaseInline.hh [code] |
Base/Image/ImageConvert.cpp [code] |
Base/Image/ImageConvert.hh [code] |
Base/Image/ImageConvertInstantiation.cpp [code] |
Base/Image/ImageConvertThreaded.cpp [code] |
Base/Image/ImageConvertThreaded.hh [code] |
Base/Image/ImageDraw.cpp [code] |
Base/Image/ImageDraw.hh [code] |
Base/Image/ImageInline.hh [code] |
Base/Image/ImageIO.cpp [code] |
Base/Image/ImageIO.hh [code] |
Base/Image/MetaData.cpp [code] |
Base/Image/MetaData.hh [code] |
Base/Image/Operators.cpp [code] |
Base/Image/PMDImageIO.cpp [code] |
Base/Image/PMDImageIO.hh [code] |
Base/Image/ROI.cpp [code] |
Base/Image/ROI.hh [code] |
Base/Image/ScanLine.hh [code] |
Base/Image/ScanLine2.hh [code] |
Base/Image/ToHSL.cpp [code] |
Base/Image/ToHSV.cpp [code] |
Base/Image/ToInterleaved.cpp [code] |
Base/Image/ToPlanar.cpp [code] |
Base/Image/UUID.cpp [code] |
Base/Image/UUID.hh [code] |
Base/Image/ViffHeader.hh [code] |
Base/Image/WrapBias2Ipl.cpp [code] |
Base/Image/WrapBias2Ipl.hh [code] |
Base/Image/Examples/convertRAW.cpp [code] |
Base/Image/Examples/ExampleBresenham.cpp [code] |
Base/Image/Examples/ExampleChessboard.cpp [code] |
Base/Image/Examples/ExampleConvert.cpp [code] |
Base/Image/Examples/ExampleDraw.cpp [code] |
Base/Image/Examples/ExampleEmpty.cpp [code] |
Base/Image/Examples/ExampleForeignData.cpp [code] |
Base/Image/Examples/ExampleHSVConversion.cpp [code] |
Base/Image/Examples/ExampleImageAttributes.cpp [code] |
Base/Image/Examples/ExampleImageLoad.cpp [code] |
Base/Image/Examples/ExampleImageMagickIO.cpp [code] |
Base/Image/Examples/ExampleImageOperator.cpp [code] |
Base/Image/Examples/ExampleInterpolation.cpp [code] |
Base/Image/Examples/ExampleIpl.cpp [code] |
Base/Image/Examples/ExampleIplImageDisplay.cpp [code] |
Base/Image/Examples/ExampleIplImageDraw.cpp [code] |
Base/Image/Examples/ExampleIplWrapOpenCV.cpp [code] |
Base/Image/Examples/ExampleMetaData.cpp [code] |
Base/Image/Examples/ExampleMinMax.cpp [code] |
Base/Image/Examples/ExampleROI.cpp [code] |
Base/Image/Examples/ExampleTile.cpp [code] |
Base/Image/Examples/ExampleUUID.cpp [code] |
Base/Image/Examples/mip2viff.cpp [code] |
Base/Image/Examples/viff2mip.cpp [code] |
Base/Math/Cholesky.cpp [code] |
Base/Math/Cholesky.hh [code] |
Base/Math/Distribution.cpp [code] |
Base/Math/Distribution.hh [code] |
Base/Math/Math.hh [code] |
Base/Math/Matrix.cpp [code] |
Base/Math/Matrix.hh [code] |
Base/Math/Matrix2x2.cpp [code] |
Base/Math/Matrix2x2.hh [code] |
Base/Math/Matrix3x3.cpp [code] |
Base/Math/Matrix3x3.hh [code] |
Base/Math/Matrix3x4.cpp [code] |
Base/Math/Matrix3x4.hh [code] |
Base/Math/Matrix4x4.cpp [code] |
Base/Math/Matrix4x4.hh [code] |
Base/Math/Operators.hh [code] |
Base/Math/Polynom.hh [code] |
Base/Math/Random.cpp [code] |
Base/Math/Random.hh [code] |
Base/Math/RGB.hh [code] |
Base/Math/RGBA.hh [code] |
Base/Math/Tensor3D.cpp [code] |
Base/Math/Tensor3D.hh [code] |
Base/Math/Tensor3D3x3x3.cpp [code] |
Base/Math/Tensor3D3x3x3.hh [code] |
Base/Math/Vector.cpp [code] |
Base/Math/Vector.hh [code] |
Base/Math/Vector2.cpp [code] |
Base/Math/Vector2.hh [code] |
Base/Math/Vector3.cpp [code] |
Base/Math/Vector3.hh [code] |
Base/Math/Vector4.cpp [code] |
Base/Math/Vector4.hh [code] |
Base/Math/Examples/ExampleLoadBan.cpp [code] |
Base/Math/Examples/ExampleLoadBOG.cpp [code] |
Base/Math/Examples/ExampleOperators.cpp [code] |
Base/Math/Examples/ExamplePolynom.cpp [code] |
Base/Math/Examples/ExampleRandom.cpp [code] |
Base/Math/Examples/ExampleRandom2.cpp [code] |
Base/Math/Examples/ExampleRandom2D.cpp [code] |
Base/Math/tnt/cholesky.h [code] |
Base/Math/tnt/cmat.h [code] |
Base/Math/tnt/fcscmat.h [code] |
Base/Math/tnt/fmat.h [code] |
Base/Math/tnt/fortran.h [code] |
Base/Math/tnt/fspvec.h [code] |
Base/Math/tnt/index.h [code] |
Base/Math/tnt/lapack.h [code] |
Base/Math/tnt/lu.h [code] |
Base/Math/tnt/qr.h [code] |
Base/Math/tnt/region1d.h [code] |
Base/Math/tnt/region2d.h [code] |
Base/Math/tnt/stopwatch.h [code] |
Base/Math/tnt/subscript.h [code] |
Base/Math/tnt/tnt.h [code] |
Base/Math/tnt/tntmath.h [code] |
Base/Math/tnt/tntreqs.h [code] |
Base/Math/tnt/transv.h [code] |
Base/Math/tnt/triang.h [code] |
Base/Math/tnt/trisolve.h [code] |
Base/Math/tnt/vec.h [code] |
Base/Math/tnt/vecadaptor.h [code] |
Base/Math/tnt/version.h [code] |
FeatureDetector/ColorHarris.cpp [code] |
FeatureDetector/ColorHarris.hh [code] |
FeatureDetector/CornerDetectorBase.cpp [code] |
FeatureDetector/CornerDetectorBase.hh [code] |
FeatureDetector/CornerDetectorFoerstner.cpp [code] |
FeatureDetector/CornerDetectorFoerstner.hh [code] |
FeatureDetector/CornerDetectorGradient.cpp [code] |
FeatureDetector/CornerDetectorGradient.hh [code] |
FeatureDetector/CornerDetectorHarris.cpp [code] |
FeatureDetector/CornerDetectorHarris.hh [code] |
FeatureDetector/CornerDetectorKLT.cpp [code] |
FeatureDetector/CornerDetectorKLT.hh [code] |
FeatureDetector/CornerDetectorSusan.cpp [code] |
FeatureDetector/CornerDetectorSusan.hh [code] |
FeatureDetector/LinearRegionDetector.cpp [code] |
FeatureDetector/LinearRegionDetector.hh [code] |
FeatureDetector/Examples/ExampleCornerDetector.cpp [code] |
Filter/Binomial.cpp [code] |
Filter/Binomial.hh [code] |
Filter/Convolution.cpp [code] |
Filter/Convolution.hh [code] |
Filter/DeInterlace.cpp [code] |
Filter/DeInterlace.hh [code] |
Filter/Dilation.cpp [code] |
Filter/Dilation.hh [code] |
Filter/DistTransform.cpp [code] |
Filter/DistTransform.hh [code] |
Filter/Erosion.cpp [code] |
Filter/Erosion.hh [code] |
Filter/FilterBase.cpp [code] |
Filter/FilterBase.hh [code] |
Filter/Filterinst.hh [code] | Inline code for instantiation of filter classes
Filter/FilterMask.cpp [code] |
Filter/FilterMask.hh [code] |
Filter/FilterNTo2N.cpp [code] |
Filter/FilterNTo2N.hh [code] |
Filter/FilterNTo3N.cpp [code] |
Filter/FilterNTo3N.hh [code] |
Filter/FilterNToN.cpp [code] |
Filter/FilterNToN.hh [code] |
Filter/Gauss.cpp [code] |
Filter/Gauss.hh [code] |
Filter/GradientGauss.cpp [code] |
Filter/GradientGauss.hh [code] |
Filter/GradientGaussAsymmetric.cpp [code] |
Filter/GradientGaussAsymmetric.hh [code] |
Filter/GradientSimple.cpp [code] |
Filter/GradientSimple.hh [code] |
Filter/GradientSobel3x3.cpp [code] |
Filter/GradientSobel3x3.hh [code] |
Filter/Label.cpp [code] |
Filter/Label.hh [code] |
Filter/Mean.cpp [code] |
Filter/Mean.hh [code] |
Filter/Median.cpp [code] |
Filter/Median.hh [code] |
Filter/Morphology.cpp [code] |
Filter/Morphology.hh [code] |
Filter/Rescale.cpp [code] |
Filter/Rescale.hh [code] |
Filter/StructureTensor.cpp [code] |
Filter/StructureTensor.hh [code] |
Filter/Examples/ExampleBinomial.cpp [code] |
Filter/Examples/ExampleConvolution.cpp [code] |
Filter/Examples/ExampleDeInterlace.cpp [code] |
Filter/Examples/ExampleDilation.cpp [code] |
Filter/Examples/ExampleDistTransform.cpp [code] |
Filter/Examples/ExampleErosion.cpp [code] |
Filter/Examples/ExampleGauss.cpp [code] |
Filter/Examples/ExampleGradient.cpp [code] |
Filter/Examples/ExampleHarrisColor.cpp [code] |
Filter/Examples/ExampleMedian.cpp [code] |
Filter/Examples/ExampleRescale.cpp [code] |
Filter/Examples/ExampleStructureTensor.cpp [code] |
Filter/Examples/ExampleUpsampleBy2Grey.cpp [code] |
Geometry/Conic2D.cpp [code] |
Geometry/Conic2D.hh [code] |
Geometry/CoordinateTransform3D.cpp [code] |
Geometry/CoordinateTransform3D.hh [code] |
Geometry/CovMatrix3x3.cpp [code] |
Geometry/CovMatrix3x3.hh [code] |
Geometry/EightWaySymmetryHomg.hh [code] |
Geometry/EMatrix.cpp [code] |
Geometry/EMatrix.hh [code] |
Geometry/EpipolarLine.cpp [code] |
Geometry/EpipolarLine.hh [code] |
Geometry/FMatrix.cpp [code] |
Geometry/FMatrix.hh [code] |
Geometry/FMatrixEstimation.cpp [code] |
Geometry/FMatrixEstimation.hh [code] |
Geometry/HMatrix.cpp [code] |
Geometry/HMatrix.hh [code] |
Geometry/HMatrixEstimation.cpp [code] |
Geometry/HMatrixEstimation.hh [code] |
Geometry/Parametrization.cpp [code] |
Geometry/Parametrization.hh [code] |
Geometry/PMatrix.cpp [code] |
Geometry/PMatrix.hh [code] |
Geometry/PMatrixEstimation.cpp [code] |
Geometry/PMatrixEstimation.hh [code] |
Geometry/PMatrixLinear.cpp [code] |
Geometry/PMatrixLinear.hh [code] |
Geometry/Pose.cpp [code] |
Geometry/Pose.hh [code] |
Geometry/Projection.cpp [code] |
Geometry/Projection.hh [code] |
Geometry/ProjectionParametersBase.cpp [code] |
Geometry/ProjectionParametersBase.hh [code] |
Geometry/ProjectionParametersIO.cpp [code] |
Geometry/ProjectionParametersIO.hh [code] |
Geometry/ProjectionParametersPerspective.cpp [code] |
Geometry/ProjectionParametersPerspective.hh [code] |
Geometry/ProjectionParametersProjective.cpp [code] |
Geometry/ProjectionParametersProjective.hh [code] |
Geometry/ProjectionParametersSpherical.cpp [code] |
Geometry/ProjectionParametersSpherical.hh [code] |
Geometry/ProjectionParametersZoom.cpp [code] |
Geometry/ProjectionParametersZoom.hh [code] |
Geometry/Quadric3D.cpp [code] |
Geometry/Quadric3D.hh [code] |
Geometry/RMatrix.cpp [code] |
Geometry/RMatrix.hh [code] |
Geometry/SimilarityTransform.cpp [code] |
Geometry/SimilarityTransform.hh [code] |
Geometry/TFTensorEstimation.cpp [code] |
Geometry/TFTensorEstimation.hh [code] |
Geometry/Triangulation.cpp [code] |
Geometry/Triangulation.hh [code] |
Geometry/TrifocalTensor.cpp [code] |
Geometry/TrifocalTensor.hh [code] |
Geometry/Examples/Example7Point.cpp [code] |
Geometry/Examples/ExampleConic.cpp [code] |
Geometry/Examples/ExampleLoadBBC.cpp [code] |
Geometry/Examples/ExampleLoadBOG_P.cpp [code] |
Geometry/Examples/ExamplePMatrix.cpp [code] |
Geometry/Examples/ExampleProjection.cpp [code] |
Geometry/Examples/ExampleProjectionParametersIO.cpp [code] |
Geometry/Examples/ExampleTriangulate.cpp [code] |
Geometry/Examples/ExampleTriangulate2.cpp [code] |
Geometry/Examples/ExampleTriangulateOptimal.cpp [code] |
Geometry/Examples/FMatrixTest.cpp [code] |
Geometry/Examples/HMatrixTest.cpp [code] |
Geometry/Examples/InvestigateEpipoleEstimation.cpp [code] |
Geometry/Examples/PMatrixTest.cpp [code] |
Gui/_wx_intellisense.h [code] |
Gui/bias_wx_glcanvas.h [code] |
Gui/biasgl.h [code] |
Gui/CameraViewController.cpp [code] |
Gui/CameraViewController.hh [code] |
Gui/CameraViewExternals.cpp [code] |
Gui/CameraViewExternals.hh [code] |
Gui/CameraViewFrustum.cpp [code] |
Gui/CameraViewFrustum.hh [code] |
Gui/CameraViewInternals.cpp [code] |
Gui/CameraViewInternals.hh [code] |
Gui/CameraViewport.cpp [code] |
Gui/CameraViewport.hh [code] |
Gui/ConsoleRedirectIO.cpp [code] |
Gui/ConsoleRedirectIO.hh [code] |
Gui/dndFileTarget.cpp [code] |
Gui/dndFileTarget.hh [code] |
Gui/DrawTextGL.cpp [code] |
Gui/DrawTextGL.hh [code] |
Gui/GeometryGL.cpp [code] |
Gui/GeometryGL.hh [code] |
Gui/glcheck.h [code] |
Gui/glstuff.h [code] |
Gui/GuiBase.cpp [code] |
Gui/GuiBase.hh [code] |
Gui/GuiEnhanced.cpp [code] |
Gui/GuiEnhanced.hh [code] |
Gui/GuiGTK.cpp [code] |
Gui/GuiGTK.hh [code] |
Gui/GuiWX.cpp [code] |
Gui/GuiWX.hh [code] |
Gui/ImageCanvas.cpp [code] |
Gui/ImageCanvas.hh [code] |
Gui/ImageCanvasEnhanced.cpp [code] |
Gui/ImageCanvasEnhanced.hh [code] |
Gui/ImageCanvasGLBase.cpp [code] |
Gui/ImageCanvasGLBase.hh [code] |
Gui/ImgObjGL.cpp [code] |
Gui/ImgObjGL.hh [code] |
Gui/OpenGLCanvas.cpp [code] |
Gui/OpenGLCanvas.hh [code] |
Gui/OpenGLCanvasBase.cpp [code] |
Gui/OpenGLCanvasBase.hh [code] |
Gui/ParamGUI.cpp [code] |
Gui/ParamGUI.hh [code] |
Gui/ProjectionGUI.cpp [code] |
Gui/ProjectionGUI.hh [code] |
Gui/RenderModeGL.hh [code] |
Gui/SettingsGL.cpp [code] |
Gui/SettingsGL.hh [code] |
Gui/StringConv.hh [code] |
Gui/Examples/ExampleGLShared.cpp [code] |
Gui/Examples/ExampleGLShared.hh [code] |
Gui/Examples/ExampleImageCanvas.cpp [code] |
Gui/Examples/ExampleImageCanvasEnhanced.cpp [code] |
Gui/Examples/ExampleImageCanvasFloat.cpp [code] |
Gui/Examples/ExampleImageCanvasGLBase.cpp [code] |
Gui/Examples/ExampleImageCanvasGLBase.hh [code] |
Gui/Examples/ExampleMultipleGui.cpp [code] |
Gui/Examples/ExampleOpenGLCanvas.cpp [code] |
Gui/Examples/ExampleOpenGLCanvas.hh [code] |
Gui/Examples/ExampleOpenGLCanvasBase.cpp [code] |
Gui/Examples/ExampleOpenGLCanvasBase.hh [code] |
Gui/Examples/ParamGUISample1.cpp [code] |
Gui/Examples/ParamGUISample2.cpp [code] |
Gui/Examples/ParamGUISample3.cpp [code] |
Gui/Examples/TestGui.cpp [code] |
Gui/Examples/TestGuiEnhanced.cpp [code] |
Gui/Examples/TestGuiPyramid.cpp [code] |
Gui/Examples/TestMouse.cpp [code] |
Image/BackwardMapping.cpp [code] |
Image/BackwardMapping.hh [code] |
Image/Camera.cpp [code] |
Image/Camera.hh [code] |
Image/CameraParam.cpp [code] |
Image/CameraParam.hh [code] |
Image/ColorHistogram.cpp [code] |
Image/ColorHistogram.hh [code] |
Image/ColorMultiHistogram.cpp [code] |
Image/ColorMultiHistogram.hh [code] |
Image/ColorSegmentation.cpp [code] |
Image/ColorSegmentation.hh [code] |
Image/CompressJpeg.cpp [code] |
Image/CompressJpeg.hh [code] |
Image/Contour.cpp [code] |
Image/Contour.hh [code] |
Image/CylinderMapping.cpp [code] |
Image/CylinderMapping.hh [code] |
Image/DCData.cpp [code] |
Image/DCData.hh [code] |
Image/FFT2D.cpp [code] |
Image/FFT2D.hh [code] |
Image/FFT2D_Tiles.cpp [code] |
Image/FFT2D_Tiles.hh [code] |
Image/Histogram.cpp [code] |
Image/Histogram.hh [code] |
Image/HomographyMapping.cpp [code] |
Image/HomographyMapping.hh [code] |
Image/IntegralHistogram.cpp [code] |
Image/IntegralHistogram.hh [code] |
Image/LogPolarMapping.cpp [code] |
Image/LogPolarMapping.hh [code] |
Image/MatlabTBUndistortion.cpp [code] |
Image/MatlabTBUndistortion.hh [code] |
Image/PMDImageProc.cpp [code] |
Image/PMDImageProc.hh [code] |
Image/ProjectionMapping.cpp [code] |
Image/ProjectionMapping.hh [code] |
Image/PyramidImage.cpp [code] |
Image/PyramidImage.hh [code] |
Image/RigParameter.cpp [code] |
Image/RigParameter.hh [code] |
Image/SphericalUndistortion.cpp [code] |
Image/SphericalUndistortion.hh [code] |
Image/StereoRedGreen.cpp [code] |
Image/StereoRedGreen.hh [code] |
Image/UndistortionMapping.cpp [code] |
Image/UndistortionMapping.hh [code] |
Image/UnVignette.cpp [code] |
Image/UnVignette.hh [code] |
Image/VideoStream.cpp [code] |
Image/VideoStream.hh [code] |
Image/Examples/ExampleCamera.cpp [code] |
Image/Examples/ExampleCameraParam.cpp [code] |
Image/Examples/ExampleContour.cpp [code] |
Image/Examples/ExampleCylinderMapping.cpp [code] |
Image/Examples/ExampleFFT2D.cpp [code] |
Image/Examples/ExampleFFT2D_Tiles.cpp [code] |
Image/Examples/ExampleFMT2D.cpp [code] |
Image/Examples/ExampleHistogram.cpp [code] |
Image/Examples/ExampleHomographyMapping.cpp [code] |
Image/Examples/ExampleLogPolarMapping.cpp [code] |
Image/Examples/ExampleMapPerspImages.cpp [code] |
Image/Examples/ExamplePMDImageIO.cpp [code] |
Image/Examples/ExampleProjectionMapping.cpp [code] |
Image/Examples/ExamplePyramidImage.cpp [code] |
Image/Examples/ExampleRigParameter.cpp [code] |
Image/Examples/ExampleSphereProjections.cpp [code] |
Image/Examples/ExampleUndistort.cpp [code] |
Image/Examples/ExampleUnVignette.cpp [code] |
Image/Examples/ExampleVideoStream.cpp [code] |
Image/Examples/PMatrix2RigParameter.cpp [code] |
Matcher2D/CornerMatcher.cpp [code] |
Matcher2D/CornerMatcher.hh [code] |
Matcher2D/LineMatcher.cpp [code] |
Matcher2D/RegionMatcher.cpp [code] |
Matcher2D/RegionMatcher.hh [code] |
Matcher2D/SimilarityMeasure.cpp [code] |
Matcher2D/Tracker.cpp [code] |
Matcher2D/Tracker.hh [code] |
Matcher2D/TrackerBase.cpp [code] |
Matcher2D/TrackerBase.hh [code] |
Matcher2D/TrackerBaseAffine.hh [code] |
Matcher2D/TrackerBaseInterface.hh [code] |
Matcher2D/TrackerBaseSimple.hh [code] |
Matcher2D/TrackerBaseWeighted.hh [code] |
Matcher2D/TrackerSynth.cpp [code] |
Matcher2D/TrackerSynth.hh [code] |
Matcher2D/Examples/ExampleColorNCC.cpp [code] |
Matcher2D/Examples/ExampleKLTEdge.cpp [code] |
Matcher2D/Examples/ExampleLineMatcher.cpp [code] |
Matcher2D/Examples/ExampleParabola.cpp [code] |
Matcher2D/Examples/ExampleTracker.cpp [code] |
Matcher2D/Examples/ExampleTracker2.cpp [code] |
Matcher2D/Examples/ExampleTracker3.cpp [code] |
Matcher2D/Examples/ExampleTrackerBase.cpp [code] |
MathAlgo/BSplineCurve.cpp [code] |
MathAlgo/BSplineCurve.hh [code] |
MathAlgo/FFT.cpp [code] |
MathAlgo/FFT.hh [code] |
MathAlgo/GaussHelmert.cpp [code] |
MathAlgo/GaussHelmert.hh [code] |
MathAlgo/GSL.cpp [code] |
MathAlgo/GSL.hh [code] |
MathAlgo/Interpolator.cpp [code] |
MathAlgo/Interpolator.hh [code] |
MathAlgo/Lapack.cpp [code] |
MathAlgo/Lapack.hh [code] | BIAS c++ wrapper class for lapack fortran77 functions
MathAlgo/LeastSquares.cpp [code] |
MathAlgo/LeastSquares.hh [code] |
MathAlgo/Median1D.cpp [code] |
MathAlgo/Median1D.hh [code] |
MathAlgo/Minpack.cpp [code] |
MathAlgo/Minpack.hh [code] |
MathAlgo/MSAC.hh [code] |
MathAlgo/PolynomialSolve.cpp [code] |
MathAlgo/PolynomialSolve.hh [code] |
MathAlgo/RANSAC.hh [code] |
MathAlgo/RANSACPreKnowledge.hh [code] |
MathAlgo/SVD.cpp [code] |
MathAlgo/SVD.hh [code] |
MathAlgo/SVD3x3.cpp [code] |
MathAlgo/SVD3x3.hh [code] |
MathAlgo/UnscentedTransform.cpp [code] |
MathAlgo/UnscentedTransform.hh [code] |
MathAlgo/Examples/ExampleBSplineCurve.cpp [code] |
MathAlgo/Examples/ExampleFFT.cpp [code] |
MathAlgo/Examples/ExampleGSL.cpp [code] |
MathAlgo/Examples/ExampleInterpolateLuT.cpp [code] |
MathAlgo/Examples/ExampleLeastSquares.cpp [code] |
MathAlgo/Examples/ExamplePolynomialSolve.cpp [code] |
MathAlgo/Examples/ExamplePowell.cpp [code] |
MathAlgo/Examples/ExampleRANSAC.cpp [code] |
MathAlgo/Examples/ExampleRANSAC_double.hh [code] |
MathAlgo/Examples/ExampleRANSACPlane.cpp [code] |
MathAlgo/Examples/ExampleRANSACPlane.hh [code] |
MathAlgo/Examples/ExampleRegressionPlane.cpp [code] |
MathAlgo/Examples/ExampleSVD.cpp [code] |
MathAlgo/Examples/ExampleSVD3x3.cpp [code] |
MathAlgo/Examples/ExampleUnscentedTransform.cpp [code] |
MathAlgo/Examples/ExampleWeightedLinearLeastSquares.cpp [code] |
MathAlgo/Examples/interpolate.cpp [code] |
MathAlgo/minpack/f2c_gnu011.h [code] |
MathAlgo/minpack/win32_f2c.h [code] |
NetworkComm/CScommBase.cpp [code] |
NetworkComm/CScommBase.hh [code] |
NetworkComm/CScommClasses.hh [code] |
NetworkComm/CScommClient.cpp [code] |
NetworkComm/CScommClient.hh [code] |
NetworkComm/CScommServer.cpp [code] |
NetworkComm/CScommServer.hh [code] |
NetworkComm/Examples/clientExample.cpp [code] |
NetworkComm/Examples/ExampleNetsync.cpp [code] |
NetworkComm/Examples/serverExample.cpp [code] |
StateEstimator/Condensation.cpp [code] |
StateEstimator/Condensation.hh [code] |
StateEstimator/CondensHisto.cpp [code] |
StateEstimator/CondensHisto.hh [code] |
StateEstimator/CondensImg.cpp [code] |
StateEstimator/CondensImg.hh [code] |
StateEstimator/Kalman.cpp [code] |
StateEstimator/Kalman.hh [code] |
StateEstimator/Examples/CondensHistoExample.cpp [code] |
StateEstimator/Examples/condensImgExample.cpp [code] |
StateEstimator/Examples/ExampleKalman.cpp [code] |
Tests/helloconfig.cpp [code] |
Tests/MathBaseOperators.cpp [code] |
Tests/testDefines.cpp [code] |
Tests/testEnv.cpp [code] |
Tests/testError.cpp [code] |
Tests/testLeak.cpp [code] |
Tests/testWarn.cpp [code] |
Tools/biasadd.cpp [code] |
Tools/biasconvert.cpp [code] |
Tools/biasdetectunvignettewx.cpp [code] |
Tools/biasdiff.cpp [code] |
Tools/biasextract.cpp [code] |
Tools/biasfilter.cpp [code] |
Tools/biasinsert.cpp [code] |
Tools/biasmerge.cpp [code] |
Tools/biasprojection.cpp [code] |
Tools/biassetprojection.cpp [code] |
Tools/biassetuid.cpp [code] |
Tools/biasshowepi.cpp [code] |
Tools/biasshowepiwx.cpp [code] |
Tools/biasshowsm.cpp [code] |
Tools/biasview.cpp [code] |
Tools/biasviewwx.cpp [code] |
Tools/pmatrix2projection.cpp [code] |
Tools/ShowCamWx.cpp [code] |
Tools/timeit.cpp [code] |
Utils/GenGroundTruth.cpp [code] |
Utils/GenGroundTruth.hh [code] |
Utils/GenSynthMatches.cpp [code] |
Utils/GenSynthMatches.hh [code] |
Utils/MatchDataBase.cpp [code] |
Utils/MatchDataBase.hh [code] |
Utils/Param.cpp [code] |
Utils/Param.hh [code] |
Utils/ParamTypes.cpp [code] |
Utils/ParamTypes.hh [code] |
Utils/PMatrix3DData.cpp [code] |
Utils/PMatrix3DData.hh [code] |
Utils/StatekeeperGL.hh [code] |
Utils/ThreeDOut.cpp [code] |
Utils/ThreeDOut.hh [code] |
Utils/TriangleMesh.cpp [code] |
Utils/TriangleMesh.hh [code] |
Utils/Examples/ExampleGenSynthMatches.cpp [code] |
Utils/Examples/ExampleGGTCube.cpp [code] |
Utils/Examples/ExampleGGTPlane.cpp [code] |
Utils/Examples/ExampleMatchDataBase.cpp [code] |
Utils/Examples/ExampleShowFreeD.cpp [code] |
Utils/Examples/ExampleTFT.cpp [code] |
Utils/Examples/ExampleThreeDOutVRML.cpp [code] |
Utils/Examples/ExampleTriangleMesh.cpp [code] |
Utils/Examples/ExampleVRMLOutProjection.cpp [code] |
Utils/Examples/ParamExample.cpp [code] |
VideoSource/MDcam.cpp [code] |
VideoSource/MDcam.hh [code] |
VideoSource/ueyeclass.cpp [code] |
VideoSource/ueyeclass.hh [code] |
VideoSource/VideoServer.cpp [code] |
VideoSource/VideoServer.hh [code] |
VideoSource/VideoShMFeeder.cpp [code] |
VideoSource/VideoShMFeeder.hh [code] |
VideoSource/VideoSource_Base.cpp [code] |
VideoSource/VideoSource_Base.hh [code] |
VideoSource/VideoSource_DCAM.cpp [code] |
VideoSource/VideoSource_DCAM.hh [code] |
VideoSource/VideoSource_DCAM_CMU.cpp [code] |
VideoSource/VideoSource_Disk.cpp [code] |
VideoSource/VideoSource_Disk.hh [code] |
VideoSource/VideoSource_Disk_FindFiles.h [code] |
VideoSource/VideoSource_DiskPMD.cpp [code] |
VideoSource/VideoSource_DiskPMD.hh [code] |
VideoSource/VideoSource_DSHOW.cpp [code] |
VideoSource/VideoSource_DSHOW.hh [code] |
VideoSource/VideoSource_DV.cpp [code] |
VideoSource/VideoSource_DV.hh [code] |
VideoSource/VideoSource_DV2.cpp [code] |
VideoSource/VideoSource_DV2.hh [code] |
VideoSource/VideoSource_Net.cpp [code] |
VideoSource/VideoSource_Net.hh [code] |
VideoSource/VideoSource_Shm.cpp [code] |
VideoSource/VideoSource_Shm.hh [code] |
VideoSource/VideoSource_Stereo.cpp [code] |
VideoSource/VideoSource_Stereo.hh [code] |
VideoSource/VideoSource_uEye.cpp [code] |
VideoSource/VideoSource_uEye.hh [code] |
VideoSource/VideoSource_V4L.cpp [code] |
VideoSource/VideoSource_V4L.hh [code] |
VideoSource/Examples/ExampleCameraParameter.cpp [code] |
VideoSource/Examples/ExampleDirectToDisk.cpp [code] |
VideoSource/Examples/ExampleMDCamToShm.cpp [code] |
VideoSource/Examples/ExampleMDCamToShmWx.cpp [code] |
VideoSource/Examples/ExampleVideofeedShm.cpp [code] |
VideoSource/Examples/ExampleVideoServer.cpp [code] |
VideoSource/Examples/ExampleVideoSource_Net.cpp [code] |
VideoSource/Examples/ExampleVideoSource_Shm.cpp [code] |
VideoSource/Examples/Scan1394Bus.cpp [code] |
VideoSource/Examples/showdcam.cpp [code] |
VideoSource/Examples/showdcam16.cpp [code] |
VideoSource/Examples/showdv2cam.cpp [code] |
VideoSource/Examples/showdvcam.cpp [code] |
VideoSource/Examples/showmdcam.cpp [code] |
VideoSource/Examples/showv4lcam.cpp [code] |
VideoSource/Examples/TestMIPVideoSource_Disk.cpp [code] |
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: D:/home/jw/build/BIAS/bias_config.h File Reference

  • Related Pages
  • Examples
  • File List
  • File Members
build » BIAS

bias_config.h File Reference

#include <BIAS_DeclSpec.hh>

Include dependency graph for bias_config.h:

Go to the source code of this file.

Defines

#define | BIAS_DEBUG
#define | BIAS_HAVE_BLAS
#define | BIAS_HAVE_DEVIL
#define | BIAS_HAVE_FFTW3
#define | BIAS_HAVE_FONTGL
#define | BIAS_HAVE_GLEW
#define | BIAS_HAVE_GLUT
#define | BIAS_HAVE_GUI
#define | BIAS_HAVE_IMAGEMAGICKLIB
#define | BIAS_HAVE_LAPACK
#define | BIAS_HAVE_OPENCV
#define | BIAS_HAVE_OPENEXR
#define | BIAS_HAVE_OPENGL
#define | BIAS_HAVE_PTHREADS
#define | BIAS_HAVE_VLD
#define | BIAS_HAVE_XML2
#define | BIAS_TESTS_DATA "D:/home/jw/source/BIAS/Tests/data/"
define the path to the source dir to be able to load test files from source (for dart and Examples)
#define | BUILD_IMAGE_CHAR
#define | BUILD_IMAGE_FLOAT
#define | BUILD_IMAGE_INT
#define | BUILD_IMAGE_UCHAR

Define Documentation

#define BIAS_DEBUG

Definition at line 146 of file bias_config.h.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Contour::Draw(), BIAS::ImageBase::GetChannel(), BIAS::PMatrix::GetH(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Debug::operator=(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToPlanar(), and BIAS::ROI::Vector2Mask().

#define BIAS_HAVE_BLAS

Definition at line 20 of file bias_config.h.

#define BIAS_HAVE_DEVIL

Definition at line 29 of file bias_config.h.

#define BIAS_HAVE_FFTW3

Definition at line 44 of file bias_config.h.

#define BIAS_HAVE_FONTGL

Definition at line 109 of file bias_config.h.

#define BIAS_HAVE_GLEW

Definition at line 50 of file bias_config.h.

#define BIAS_HAVE_GLUT

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 53 of file bias_config.h.

#define BIAS_HAVE_GUI

Definition at line 115 of file bias_config.h.

#define BIAS_HAVE_IMAGEMAGICKLIB

Definition at line 65 of file bias_config.h.

Referenced by BIAS::ImageAttributes::ReadMagickPP().

#define BIAS_HAVE_LAPACK

Definition at line 23 of file bias_config.h.

#define BIAS_HAVE_OPENCV

Definition at line 71 of file bias_config.h.

#define BIAS_HAVE_OPENEXR

Definition at line 74 of file bias_config.h.

#define BIAS_HAVE_OPENGL

Definition at line 77 of file bias_config.h.

#define BIAS_HAVE_PTHREADS

Definition at line 80 of file bias_config.h.

#define BIAS_HAVE_VLD

Definition at line 95 of file bias_config.h.

#define BIAS_HAVE_XML2

Definition at line 101 of file bias_config.h.

Referenced by BIAS::ProjectionParametersProjective::UnProjectLocal().

#define BIAS_TESTS_DATA "D:/home/jw/source/BIAS/Tests/data/"

define the path to the source dir to be able to load test files from source (for dart and Examples)

Examples:
ExampleIplImageDisplay.cpp, ExampleIplImageDraw.cpp, ExampleIplWrapOpenCV.cpp, ExampleLoadBan.cpp, and ExampleLoadBOG.cpp.

Definition at line 126 of file bias_config.h.

Referenced by MyFrame::LoadImages(), and main().

#define BUILD_IMAGE_CHAR

Definition at line 134 of file bias_config.h.

Referenced by _am_compute4by1ErrorVector(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageConvert::ConvertST(), and BIAS::PyramidImage< StorageType >::WriteImages().

#define BUILD_IMAGE_FLOAT

Definition at line 131 of file bias_config.h.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse().

#define BUILD_IMAGE_INT

Definition at line 133 of file bias_config.h.

Referenced by _am_compute4by1ErrorVector(), and BIAS::PyramidImage< StorageType >::WriteImages().

#define BUILD_IMAGE_UCHAR

Definition at line 130 of file bias_config.h.

Generated on Wed Jun 21 19:01:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS_DeclSpec.hh File Reference

  • File Members

BIAS_DeclSpec.hh File Reference

#include <bias_config.h>

Include dependency graph for BIAS_DeclSpec.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | BIAS_EXPORT_STL_SET(dllmacro, settype)
#define | BIAS_EXPORT_STL_VECTOR(dllmacro, vectype)
#define | BIASCommon_EXPORT
#define | BIASDebug_EXPORT
#define | BIASFeatureDetector_EXPORT
#define | BIASFilter_EXPORT
#define | BIASGeometry_EXPORT
#define | BIASGeometryBase_EXPORT
#define | BIASGui_EXPORT
#define | BIASImage_EXPORT
#define | BIASImageBase_EXPORT
#define | BIASMatcher2D_EXPORT
#define | BIASMathAlgo_EXPORT
#define | BIASMathBase_EXPORT
#define | BIASNetworkComm_EXPORT
#define | BIASStateEstimator_EXPORT
#define | BIASUtils_EXPORT
#define | BIASVideoSource_EXPORT

Define Documentation

#define BIAS_EXPORT_STL_SET | ( | dllmacro,
 |  | settype | )

Definition at line 265 of file BIAS_DeclSpec.hh.

#define BIAS_EXPORT_STL_VECTOR | ( | dllmacro,
 |  | vectype | )

Definition at line 264 of file BIAS_DeclSpec.hh.

#define BIASCommon_EXPORT

Definition at line 243 of file BIAS_DeclSpec.hh.

Referenced by getopt_internal().

#define BIASDebug_EXPORT

Definition at line 244 of file BIAS_DeclSpec.hh.

#define BIASFeatureDetector_EXPORT

Definition at line 245 of file BIAS_DeclSpec.hh.

#define BIASFilter_EXPORT

Definition at line 246 of file BIAS_DeclSpec.hh.

#define BIASGeometry_EXPORT

Definition at line 247 of file BIAS_DeclSpec.hh.

#define BIASGeometryBase_EXPORT

Definition at line 248 of file BIAS_DeclSpec.hh.

#define BIASGui_EXPORT

Definition at line 249 of file BIAS_DeclSpec.hh.

#define BIASImage_EXPORT

Definition at line 250 of file BIAS_DeclSpec.hh.

#define BIASImageBase_EXPORT

Definition at line 251 of file BIAS_DeclSpec.hh.

#define BIASMatcher2D_EXPORT

Definition at line 252 of file BIAS_DeclSpec.hh.

#define BIASMathAlgo_EXPORT

Definition at line 253 of file BIAS_DeclSpec.hh.

#define BIASMathBase_EXPORT

Definition at line 254 of file BIAS_DeclSpec.hh.

#define BIASNetworkComm_EXPORT

Definition at line 257 of file BIAS_DeclSpec.hh.

#define BIASStateEstimator_EXPORT

Definition at line 255 of file BIAS_DeclSpec.hh.

#define BIASUtils_EXPORT

Definition at line 256 of file BIAS_DeclSpec.hh.

#define BIASVideoSource_EXPORT

Definition at line 258 of file BIAS_DeclSpec.hh.

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: History / CHANGELOG

History / CHANGELOG

Major modifications and improvements are listed in the file BIAS/CHANGELOG:

Changelog for BIAS

BIAS 2.4 (2006-06-21)
fixed error in copy constructor of ROI
Added loading of Mathematica Real32 images (32 bit float)
Added projection concept as a generalisatiion of PMatrix:
  support for fisheye camera and radial distortion
Added vector transformation classes and pose, pose parametrisation
Added Unscented Transform for covariance propagation
Added generic VideoSource (dcam, disc, shared memory, ...)
Compile as Windows DLL, tested with MSVS .net 2003 (7.1)
Compile with MSVS 2005 (8.0)
Configure with cmake 2.4.2
Compiles with gcc 4.1

BIAS 2.3
added biasshowepiwx to evaluate epipolar geometry
OpenCV support added:
  -Bias2Ipl:  wrapper to use BIAS images with OpenCV algorithms.
  -draw Text into images
ImageIO
  -added support to read+write many more file formats, e.g.
  -OpenEXR .exr including load+save of 8,16,32 bit per pixel.
  -PNM with 16 bit support using ImageMagick (PBM,PGM,PNM 1/8/16 bit)
  -DevIL support including load+save of DDS formats (DirectDraw surface)
  -ExportImage can determine FileType by filename (on FF_auto), now
OpenGLCanvas and ImageCanvasGL implementations new in Gui
 -Nvidia consumer stereo interface StereoI added
ImageIO: FF_auto added, the ideal format is determined by filename extension
BackwardMapping and derived rectification/warping/transformation classes
 handle image resampling in unified way (supports software anti-aliasing)
ImageBase::StealImage bug fixed which deleted metadata
separated HMatrix/HMatrixEstimation and added affine estimation

BIAS 2.2 (2005-07-15)

removed fortran minpack (now only c version)
added biasprojection, enhanced biasshowepi and biasmerge
added Filters: Median and GradientSimple, fixed: Label(CCA)
Covariance added to PMatrix
clean-up of "using namespace" in headers
added KLT affine

BIAS 2.1 (2005-03-16)

can read BBC free-d data
fixed color model bug in ImageBase::operator=(ImageBase)
cleanup of camera meta data
bicubic interpolation in images
planar patches in 3D scenes (VRML/GL)
extended HomgPlane3D
added 2D fft

BIAS 2.0 (2004-12-30)

KLT tracker working

BIAS 2.0 RC1 (2004-12-22)

After many changes this version indicates an API/feature freeze. May
be not all bugs are fixed, but until version 2.0 no new features are
added. Major changes:
 - changed build system to CMake
 - New supported platform: Win32
 - reimplementation of Filter (after intermediate Filter2 phase)
 - added documentation
Note:
The KLT tracker implementation is still (partially) untested and may not be
correct.

BIAS 1.5 (2004-x-y)

First "official release"
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: DEPENDENCIES File Reference

DEPENDENCIES File Reference

Go to the source code of this file.

Variables

Common
so BIAS depends on

Variable Documentation

Common

Initial value:

=====
Because the build-system of BIAS is based on CMake (www.kitware.com) you must
have properly installed these tools:

    * cmake (newest version, at least 2.0.3, see www.cmake.org)

Most of the subdir MathAlgo is based on Blas/Lapack

Definition at line 2 of file DEPENDENCIES.

so BIAS depends on

Definition at line 2 of file DEPENDENCIES.

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: INSTALL File Reference

INSTALL File Reference

Go to the source code of this file.

Functions

INSTALL howto for the BIAS
library all necessary CMake
scripts will be inside that
archive and you can proceed
with 		step (3).When using the BIAS cvs access

Variables

INSTALL howto for the BIAS
library 		QUICKINSTALL

Function Documentation

INSTALL howto for the BIAS library all necessary CMake scripts will be inside that archive and you can proceed with step ( 3 )

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::PMDImageProc::Convert_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

Variable Documentation

INSTALL howto for the BIAS library QUICKINSTALL

Definition at line 17 of file INSTALL.

Generated on Wed Jun 21 19:05:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: LGPL File Reference

LGPL File Reference

Go to the source code of this file.

Functions

and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step 		and (2) we offer you this license
GNU LESSER GENERAL PUBLIC
LICENSE February 		Copyright (C) 1991
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally 		distributed (in either source or binary form) with the major components(compiler
if write to the Free Software
Temple MA USA Also add information
on how to contact you by electronic
and paper mail You should
also get your 		employer (if you work as a programmer) or your school
alter the hereby disclaims
all copyright interest in
the library 		Frob (a library for tweaking knobs) written by James Random Hacker.< signature of Ty Coon >
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical data structure layouts
and and small macros and small 		functions (ten lines or less in length)
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR INCLUDING ANY INCIDENTAL
OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY
TO USE THE 		LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE)
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the 		Library (or any work based on the Library)
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified 		Library (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library.A suitable mechanism is one that(1) uses at run time a copy of the library already present on the user's computer system
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the 		Library (because it contains portions of the Library)
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the 		Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the 		Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.3.You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library.To do this
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this 		License (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.Once this change is made in a given copy
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains 		meaningful (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application.Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional:if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole.If identifiable sections of that work are not derived from the Library
either version of the | or (at your option) any later version.This library is distributed in the hope that it will be useful
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other 		reason (not limited to patent issues)
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public
applies to some specially
designated software packages
typically libraries of the
Free Software Foundation and
other authors who decide to
use it You can use it but
we suggest you first think
carefully about whether this
license or the ordinary General
Public License is the better
strategy to use in any particular
based on the explanations
below When we speak of free
we are referring to freedom
of not price Our General Public
Licenses are designed to make
sure that you have the freedom
to distribute copies of free 		software (and charge for this service if you wish)
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR INCLUDING ANY INCIDENTAL
OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY
TO USE THE EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH
DAMAGES END OF TERMS AND CONDITIONS
How to Apply These Terms to
Your New Libraries If you
develop a new and you want
it to be of the greatest possible
use to the we recommend making
it free software that everyone
can redistribute and change
You can do so by permitting
redistribution under these 		terms (or, alternatively, under the terms of the ordinary General Public License).To apply these terms
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical data structure layouts
and and small macros and small
then the use of the object
file is regardless of whether
it is legally a derivative 		work (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other conditions are imposed
on 		you (whether by court order, agreement or otherwise) that contradict the conditions of this License

Variables

if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection 		a
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED 		ABOVE
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section 		above
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical data structure layouts
and 		accessors
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In 		addition
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library 		Also
and
if write to the Free Software
Temple MA USA Also add information
on how to contact you by electronic
and paper mail You should
also get your if 		any
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other conditions are imposed
on they do not excuse you
from the conditions of this
License If you cannot distribute
so as to satisfy simultaneously
your obligations under this
License and any other pertinent
then as a consequence you
may not distribute the Library
at all For if a patent license
would not permit royalty free
redistribution of the Library
by all those who receive copies
directly or indirectly through
then the only way you could
satisfy both it and this License
would be to refrain entirely
from distribution of the Library
If any portion of this section
is held invalid or unenforceable
under any particular the balance
of the section is intended
to 		apply
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple 		Boston
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public
applies to some specially
designated software packages
typically libraries of the
Free Software Foundation and
other authors who decide to
use it You can use it but
we suggest you first think
carefully about whether this
license or the ordinary General
Public License is the better
strategy to use in any particular 		case
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF 		CHARGE
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other conditions are imposed
on they do not excuse you
from the conditions of this
License If you cannot distribute
so as to satisfy simultaneously
your obligations under this
License and any other pertinent
then as a consequence you
may not distribute the Library
at all For if a patent license
would not permit royalty free
redistribution of the Library
by all those who receive copies
directly or indirectly through
then the only way you could
satisfy both it and this License
would be to refrain entirely
from distribution of the Library
If any portion of this section
is held invalid or unenforceable
under any particular 		circumstance
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other conditions are imposed
on they do not excuse you
from the conditions of this
License If you cannot distribute
so as to satisfy simultaneously
your obligations under this
License and any other pertinent
then as a consequence you
may not distribute the Library
at all For if a patent license
would not permit royalty free
redistribution of the Library
by all those who receive copies
directly or indirectly through
then the only way you could
satisfy both it and this License
would be to refrain entirely
from distribution of the Library
If any portion of this section
is held invalid or unenforceable
under any particular the balance
of the section is intended
to and the section as a whole
is intended to apply in other
circumstances It is not the
purpose of this section to
induce you to infringe any
patents or other property
right claims or to contest
validity of any such 		claims
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source 		code
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these 		conditions
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By 		contrast
alter the hereby disclaims
all copyright interest in
the library April Ty 		Coon
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received 		copies
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to 		copy
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for 		copying
it is up to the author donor
to decide if he or she is
willing to distribute software
through any other system and
a licensee cannot impose that
choice This section is intended
to make thoroughly clear what
is believed to be a consequence
of the rest of this License
If the distribution and or
use of the Library is restricted
in certain countries either
by patents or by copyrighted
the original copyright holder
who places the Library under
this License may add an geographical
distribution limitation excluding
those 		countries
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR 		DAMAGES
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE 		DEFECTIVE
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to 		distribute
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each 		distributor
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license 		document
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For 		example
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special 		exception
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the 		executable
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a 		fee
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library if the library is
modified by someone else and
passed the recipients should
know that what they have is
not the original so that the
original author s reputation
will not be affected by problems
that might be introduced by
others 		Finally
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software 		Foundation
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR INCLUDING ANY 		GENERAL
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT 		HOLDER
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License 		However
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License 		If
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR 		IMPLIED
if write to the Free Software | Inc
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR 		INCLUDING
it is up to the author donor
to decide if he or she is
willing to distribute software
through any other system and
a licensee cannot impose that
choice This section is intended
to make thoroughly clear what
is believed to be a consequence
of the rest of this License
If the distribution and or
use of the Library is restricted
in certain countries either
by patents or by copyrighted 		interfaces
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is 		invoked
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in 		isolation
that you receive source code
or can get it if you want 		it
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally 		kernel
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY 		KIND
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library if the library is
modified by someone else and
passed the recipients should
know that what they have is
not the original so that the
original author s reputation
will not be affected by problems
that might be introduced by
others software patents pose
a constant threat to the existence
of any free program We wish
to make sure that a company
cannot effectively restrict
the users of a free program
by obtaining a restrictive
license from a patent holder
we insist that any patent
license obtained for a version
of the library must be consistent
with the full freedom of use
specified in this license
Most GNU including some 		libraries
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE 		LIBRARY
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the 		Library
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the 		library
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public 		License
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This 		license
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step 		method
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not 		modify
alter the | names
if | not
it is up to the author donor
to decide if he or she is
willing to distribute software
through any other system and
a licensee cannot impose that
choice This section is intended
to make thoroughly clear what
is believed to be a consequence
of the rest of this License
If the distribution and or
use of the Library is restricted
in certain countries either
by patents or by copyrighted
the original copyright holder
who places the Library under
this License may add an geographical
distribution limitation excluding
those so that distribution
is permitted only in or among
countries not thus excluded
In such this License incorporates
the limitation as if written
in the body of this License
The Free Software Foundation
may publish revised and or
new versions of the Lesser
General Public License from
time to time Such new versions
will be similar in spirit
to the present but may differ
in detail to address new problems
or concerns Each version is
given a distinguishing version
number If the Library specifies
a version number of this License
which applies to it and any
later you have the option
of following the terms and
conditions either of that
version or of any later version
published by the Free Software
Foundation If the Library
does not specify a license
version 		number
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do and all its terms and
conditions for distributing
or modifying the Library or
works based on it Each time
you redistribute the the recipient
automatically receives a license
from the original licensor
to link with or modify the
Library subject to these terms
and conditions You may not
impose any further restrictions
on the recipients exercise
of the rights granted herein
You are not responsible for
enforcing compliance by third
parties with this License
as a consequence of a court
judgment or allegation of
patent infringement or for
any other conditions are imposed
on they do not excuse you
from the conditions of this
License If you cannot distribute
so as to satisfy simultaneously
your obligations under this
License and any other pertinent 		obligations
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written 		offer
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library if the library is
modified by someone else and
passed 		on
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs 		one
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still 		operates
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical 		parameters
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise 		permitted
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated 		place
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple 		Place
that you can change the software
and use pieces of it in new
free 		programs
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR INCLUDING ANY INCIDENTAL
OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY
TO USE THE EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH
DAMAGES END OF TERMS AND CONDITIONS
How to Apply These Terms to
Your New Libraries If you
develop a new and you want
it to be of the greatest possible
use to the 		public
rather
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the 		recipients
and that you are informed
that you can do these things
To protect your 		rights
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable 		runs
if write to the Free Software
Temple MA USA Also add information
on how to contact you by electronic
and paper mail You should
also get your if to sign a
copyright disclaimer for the
if necessary Here is a 		sample
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical data structure layouts
and and small macros and small
then the use of the object
file is regardless of whether
it is legally a derivative
if the work is a derivative
of the you may distribute
the object code for the work
under the terms of Section
Any executables containing
that work also fall under 		Section
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY 		SERVICING
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is and will automatically
terminate your rights under
this License parties who have
received or from you under
this License will not have
their licenses terminated
so long as such parties remain
in full compliance You are
not required to accept this
since you have not signed
it nothing else grants you
permission to modify or distribute
the Library or its derivative
works These actions are prohibited
by law if you do not accept
this License by modifying
or distributing the you indicate
your acceptance of this License
to do 		so
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public
applies to some specially
designated software packages
typically libraries of the
Free Software Foundation and
other authors who decide to
use it You can use it but
we suggest you first think
carefully about whether this
license or the ordinary General
Public License is the better
strategy to use in any particular
based on the explanations
below When we speak of free 		software
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED THE IMPLIED
WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
PURPOSE THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU
SHOULD THE LIBRARY PROVE YOU
ASSUME THE COST OF ALL NECESSARY
REPAIR OR CORRECTION IN NO
EVENT UNLESS REQUIRED BY APPLICABLE
LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT OR ANY
OTHER PARTY WHO MAY MODIFY
AND OR REDISTRIBUTE THE LIBRARY
AS PERMITTED BE LIABLE TO
YOU FOR INCLUDING ANY 		SPECIAL
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not 		sublicense
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple 		Suite
this section has the sole
purpose of protecting the
integrity of the free software
distribution system which
is implemented by public license
practices Many people have
made generous contributions
to the wide range of software
distributed through that system
in reliance on consistent
application of that 		system
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or 		table
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains and can
be reasonably considered independent
and separate works in then
this and its 		terms
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure 		that
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains and can
be reasonably considered independent
and separate works in 		themselves
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library if the library is
modified by someone else and
passed the recipients should
know that what they have is
not the original so that the
original author s reputation
will not be affected by problems
that might be introduced by
others software patents pose
a constant threat to the existence
of any free program We wish
to make sure that a company
cannot effectively restrict
the users of a free program
by obtaining a restrictive
license from a patent holder 		Therefore
it is up to the author donor
to decide if he or she is
willing to distribute software
through any other system and
a licensee cannot impose that
choice This section is intended
to make thoroughly clear what
is believed to be a consequence
of the rest of this License
If the distribution and or
use of the Library is restricted
in certain countries either
by patents or by copyrighted
the original copyright holder
who places the Library under
this License may add an geographical
distribution limitation excluding
those so that distribution
is permitted only in or among
countries not thus excluded
In such this License incorporates
the limitation as if written
in the body of this License
The Free Software Foundation
may publish revised and or
new versions of the Lesser
General Public License from
time to time Such new versions
will be similar in spirit
to the present but may differ
in detail to address new problems
or concerns Each version is
given a distinguishing version
number If the Library specifies
a version number of this License
which applies to it and any
later you have the option
of following the terms and
conditions either of that
version or of any later version
published by the Free Software
Foundation If the Library
does not specify a license
version you may choose any
version ever published by
the Free Software Foundation
If you wish to incorporate
parts of the Library into
other free programs whose
distribution conditions are
incompatible with 		these
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that 		they
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two 		things
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains and can
be reasonably considered independent
and separate works in then
this and its do not apply
to those sections when you
distribute them as separate
works But when you distribute
the same sections as part
of a whole which is a work
based on the the distribution
of the whole must be on the
terms of this whose permissions
for other licensees extend
to the entire and thus to
each and every part regardless
of who wrote it 		Thus
we sometimes make exceptions
for this Our decision will
be guided by the two goals
of preserving the free status
of all derivatives of our
free software and of promoting
the sharing and reuse of software
generally NO WARRANTY BECAUSE
THE LIBRARY IS LICENSED FREE
OF THERE IS NO WARRANTY FOR
THE TO THE EXTENT PERMITTED
BY APPLICABLE LAW EXCEPT WHEN
OTHERWISE STATED IN WRITING
THE COPYRIGHT HOLDERS AND
OR OTHER PARTIES PROVIDE THE
LIBRARY AS IS WITHOUT WARRANTY
OF ANY EITHER EXPRESSED OR
BUT NOT LIMITED 		TO
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public
applies to some specially
designated software packages
typically libraries of the
Free Software Foundation and
other authors who decide to
use it You can use it 		too
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a in is not a
derivative work of the and
therefore falls outside the
scope of this License linking
a work that uses the Library
with the Library creates an
executable that is a derivative
of the rather than a work
that uses the library The
executable is therefore covered
by this License Section states
terms for distribution of
such executables When a work
that uses the Library uses
material from a header file
that is part of the the object
code for the work may be a
derivative work of the Library
even though the source code
is not Whether this is true
is especially significant
if the work can be linked
without the or if the work
is itself a library The threshold
for this to be true is not
precisely defined by law If
such an object file uses only
numerical data structure layouts
and and small macros and small
then the use of the object
file is 		unrestricted
GNU LESSER GENERAL PUBLIC
LICENSE February Free Software
Inc Temple MA USA Everyone
is permitted to copy and distribute
verbatim copies of this license
but changing it is not allowed[This is the first released
version of the Lesser GPL.It
also counts as the successor
of the GNU Library Public
License, version 2, hence
the version number 2.1.] Preamble
The licenses for most software
are designed to take away
your freedom to share and
change it By the GNU General
Public Licenses are intended
to guarantee your freedom
to share and change free software
to make sure the software
is free for all its users
This the Lesser General Public
applies to some specially
designated software packages
typically libraries of the
Free Software Foundation and
other authors who decide to
use it You can use it but
we suggest you first think
carefully about whether this
license or the ordinary General
Public License is the better
strategy to use in any particular
based on the explanations
below When we speak of free
we are referring to freedom
of 		use
and that you are informed
that you can do these things
To protect your we need to
make restrictions that forbid
distributors to deny you these
rights or to ask you to surrender
these rights These restrictions
translate to certain responsibilities
for you if you distribute
copies of the library or if
you modify it For if you distribute
copies of the whether gratis
or for a you must give the
recipients all the rights
that we gave you You must
make sure that receive or
can get the source code If
you link other code with the
you must provide complete
object files to the so that
they can relink them with
the library after making changes
to the library and recompiling
it And you must show them
these terms so they know their
rights We protect your rights
with a two step which gives
you legal permission to distribute
and or modify the library
To protect each we want to
make it very clear that there
is no warranty for the free
library if the library is
modified by someone else and
passed the recipients should
know that what they have is
not the original 		version
GNU LESSER GENERAL PUBLIC
LICENSE 		Version
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link or distribute the Library
except as expressly provided
under this License Any attempt
otherwise to link or distribute
the Library is 		void
either version of the but
WITHOUT ANY 		WARRANTY
keep intact all the notices
that refer to this License
and to the absence of any 		warranty
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains and can
be reasonably considered independent
and separate works in then
this and its do not apply
to those sections when you
distribute them as separate
works But when you distribute
the same sections as part
of a whole which is a work
based on the the distribution
of the whole must be on the
terms of this whose permissions
for other licensees extend
to the entire 		whole
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three to give
the same user the materials
specified in Subsection for
a charge no more than the
cost of performing this distribution
d If distribution of the work
is made by offering access
to copy from a designated
offer equivalent access to
copy the above specified materials
from the same place e Verify
that the user has already
received a copy of these materials
or that you have already sent
this user a copy For an the
required form of the work
that uses the Library must
include any data and utility
programs needed for reproducing
the executable from it as
a special the materials to
be distributed need not include
anything that is normally
and so on of the operating
system on which the executable
unless that component itself
accompanies the executable
It may happen that this requirement
contradicts the license restrictions
of other proprietary libraries
that do not normally accompany
the operating system Such
a contradiction means you
cannot use both them and the
Library together in an executable
that you distribute You may
place library facilities that
are a work based on the Library
side by side in a single library
together with other library
facilities not covered by
this and distribute such a
combined provided that the
separate distribution of the
work based on the Library
and of the other library facilities
is otherwise and provided
that you do these two uncombined
with any other library facilities
This must be distributed under
the terms of the Sections
above b Give prominent notice
with the combined library
of the fact that part of it
is a work based on the and
explaining where to find the
accompanying uncombined form
of the same work You may not
link 		with
the intent is to exercise
the right to control the distribution
of derivative or collective
works based on the Library
In mere aggregation of another
work not based on the Library
with the you must alter all
the notices that refer to
this so that they refer to
the ordinary GNU General Public
instead of to this it is irreversible
for that so the ordinary GNU
General Public License applies
to all subsequent copies and
derivative works made from
that copy This option is useful
when you wish to copy part
of the code of the Library
into a program that is not
a library You may copy and
distribute the which must
be distributed under the terms
of Sections and above on a
medium customarily used for
software interchange If distribution
of object code is made by
offering access to copy from
a designated then offering
equivalent access to copy
the source code from the same
place satisfies the requirement
to distribute the source even
though third parties are not
compelled to copy the source
along with the object code
A program that contains no
derivative of any portion
of the but is designed to
work with the Library by being
compiled or linked with is
called a work that uses the
Library Such a 		work
if the work is an executable
linked with the with the complete
machine readable work that
uses the as object code and
or source so that the user
can modify the Library and
then relink to produce a modified
executable containing the
modified rather than copying
library functions into the
if the user installs as long
as the modified version is
interface compatible with
the version that the work
was made with c Accompany
the work with a written valid
for at least three 		years
and distribute a copy of this
License along with the Library
You may charge a fee for the
physical act of transferring
a and you may at your option
offer warranty protection
in exchange for a fee You
may modify your copy or copies
of the Library or any portion
of thus forming a work based
on the and copy and distribute
such modifications or work
under the terms of Section
provided that you also meet
all of these other than as
an argument passed when the
facility is then you must
make a good faith effort to
ensure in the event an application
does not supply such function
or the facility still and
performs whatever part of
its purpose remains and can
be reasonably considered independent
and separate works in then
this and its do not apply
to those sections when you
distribute them as separate
works But when you distribute
the same sections as part
of a whole which is a work
based on the the distribution
of the whole must be on the
terms of this whose permissions
for other licensees extend
to the entire and thus to
each and every part regardless
of who wrote it it is not
the intent of this section
to claim rights or contest
your rights to work written
entirely by 		you

Function Documentation

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step and ( 2 )

and each file should have at least the copyright line and a pointer to where the full notice is found< onelinetogivethelibrary'snameandabriefideaofwhatitdoes.> Copyright ( C )

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally distributed ( in either source or binary form )

if write to the Free Software Temple MA USA Also add information on how to contact you by electronic and paper mail You should also get your employer ( if you work as a programmer )

alter the hereby disclaims all copyright interest in the library Frob ( a library for tweaking knobs )

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical data structure layouts and and small macros and small functions ( ten lines or less in length ) [inline]

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY ( INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE )

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the Library ( or any work based on the Library )

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified Library ( It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions. )

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the Library ( because it contains portions of the Library )

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the Library | ( | or a portion or derivative of | it,
 |  | under Section | 2
 | ) |

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the Library ( or with a work based on the Library )

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this License | ( | If a newer version than version 2 of the ordinary GNU General Public License has | appeared,
 |  | then you can specify that version instead if you | wish.
 | ) |

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still and performs whatever part of its purpose remains meaningful | ( | For | example,
 |  | a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. | Therefore,
 |  | Subsection 2d requires that any application-supplied function or table used by this function must be optional:if the application does not supply | it,
 |  | the square root function must still compute square | roots.
 | ) |

either version of the or ( at your option )

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other reason ( not limited to patent issues )

GNU LESSER GENERAL PUBLIC LICENSE February Free Software Inc Temple MA USA Everyone is permitted to copy and distribute verbatim copies of this license but changing it is not allowed [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it By the GNU General Public Licenses are intended to guarantee your freedom to share and change free software to make sure the software is free for all its users This the Lesser General Public applies to some specially designated software packages typically libraries of the Free Software Foundation and other authors who decide to use it You can use it but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular based on the explanations below When we speak of free we are referring to freedom of not price Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software ( and charge for this service if you wish )

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new and you want it to be of the greatest possible use to the we recommend making it free software that everyone can redistribute and change You can do so by permitting redistribution under these terms ( or ,
alternatively ,
under the terms of the ordinary General Public License
)

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical data structure layouts and and small macros and small then the use of the object file is regardless of whether it is legally a derivative work ( Executables containing this object code plus portions of the Library will still fall under Section 6. )

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on you ( whether by court order,
agreement or otherwise
)

Variable Documentation

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection a

Definition at line 300 of file LGPL.

Referenced by BIAS::RegionMatcher::_ParabolaApprox(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition(), BIAS::TrifocalTensor::Compose(), BIAS::SVD3x3::Compute(), BIAS::Triangulation::CorrectCorrespondences(), Draw(), BIAS::Histogram2D::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::ImageIO::ExportOpenEXR(), BIAS::PMatrix::GetA(), BIAS::PMatrix::GetCanonicalH(), BIAS::Quadric3D::GetDualQuadric(), BIAS::Conic2D::GetEllipseParameters(), BIAS::Conic2D::GetPointAndCovariance(), BIAS::Interpolator::InitLinear(), BIAS::Interpolator::InitSpline2(), BIAS::Interpolator::InitSpline3(), BIAS::Interpolator::InitSplineAkima(), BIAS::Conic2D::IntersectsCircle(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), main(), TNT::operator *(), BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::PMDImageIO::WriteMetaData_().

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection above

Definition at line 158 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical data structure layouts and accessors

Definition at line 253 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In addition

Definition at line 202 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library Also

Definition at line 50 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the and

Definition at line 271 of file LGPL.

if write to the Free Software Temple MA USA Also add information on how to contact you by electronic and paper mail You should also get your if any

Definition at line 490 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent then as a consequence you may not distribute the Library at all For if a patent license would not permit royalty free redistribution of the Library by all those who receive copies directly or indirectly through then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library If any portion of this section is held invalid or unenforceable under any particular the balance of the section is intended to apply

Definition at line 377 of file LGPL.

if write to the Free Software Temple Boston

Definition at line 4 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such case [explicit]

Definition at line 4 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent then as a consequence you may not distribute the Library at all For if a patent license would not permit royalty free redistribution of the Library by all those who receive copies directly or indirectly through then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library If any portion of this section is held invalid or unenforceable under any particular circumstance

Definition at line 377 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent then as a consequence you may not distribute the Library at all For if a patent license would not permit royalty free redistribution of the Library by all those who receive copies directly or indirectly through then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library If any portion of this section is held invalid or unenforceable under any particular the balance of the section is intended to and the section as a whole is intended to apply in other circumstances It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims

Definition at line 377 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source code

Definition at line 235 of file LGPL.

Referenced by MyFrame::OnKey().

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these conditions

Definition at line 158 of file LGPL.

GNU LESSER GENERAL PUBLIC LICENSE February Free Software Inc Temple MA USA Everyone is permitted to copy and distribute verbatim copies of this license but changing it is not allowed [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it By contrast

Definition at line 4 of file LGPL.

alter the hereby disclaims all copyright interest in the library April Ty Coon

Definition at line 497 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received copies

Definition at line 320 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to copy

Definition at line 50 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for copying

Definition at line 359 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those countries

Definition at line 403 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR DAMAGES

Definition at line 434 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE DEFECTIVE

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to distribute

Definition at line 365 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each distributor

Definition at line 50 of file LGPL.

GNU LESSER GENERAL PUBLIC LICENSE February Free Software Inc Temple MA USA Everyone is permitted to copy and distribute verbatim copies of this license document

Definition at line 4 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent then as a consequence you may not distribute the Library at all For example

Definition at line 35 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special exception

Definition at line 300 of file LGPL.

Referenced by BIAS::VideoSource_DSHOW::InitVideoCapture_().

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an executable

Definition at line 298 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a fee

Definition at line 35 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed the recipients should know that what they have is not the original so that the original author s reputation will not be affected by problems that might be introduced by others Finally

Definition at line 50 of file LGPL.

if write to the Free Software Foundation [explicit]

Definition at line 4 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY GENERAL

Definition at line 434 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it However

Definition at line 235 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License If

Definition at line 365 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR IMPLIED

Definition at line 434 of file LGPL.

alter the Inc

Definition at line 484 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR INCLUDING

Definition at line 434 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces

Definition at line 403 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is invoked

Definition at line 158 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in isolation

Definition at line 235 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with it

Definition at line 31 of file LGPL.

Referenced by BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::ParamGUIPanel::AddEnumWidgets(), BIAS::RANSACPreKnowledge< SolutionType >::AddGoodGuesses(), BIAS::Histogram::AddHist(), BIAS::PyramidImage< StorageType >::clear(), BIAS::PyramidImage< StorageType >::Downsample(), BIAS::MetaData::Find(), BIAS::ParamTypeEnum::GetHint(), BIAS::BaseFactory< BaseClassType >::GetKnownTags(), BIAS::BaseFactory< BaseClassType >::GetNearTag(), BIAS::ParamGUI::GetPanel(), BIAS::Param::GetParamBool(), BIAS::Param::GetParamDouble(), BIAS::Param::GetParamEnum(), BIAS::Param::GetParamInt(), BIAS::Param::GetParamString(), BIAS::Param::GetParamVecDbl(), BIAS::Param::GetParamVecInt(), BIAS::ParamTypeEnum::GetValueString(), BIAS::CameraParam::GetZoomUndistortion(), BIAS::ParamGUIPanel::OnCheckBox(), BIAS::ParamGUIPanel::OnChoice(), BIAS::ParamGUIPanel::OnSpinCtrl(), BIAS::ParamGUIPanel::OnTextEnter(), BIAS::ThreeDOut::OpenGLOutEllipsoids(), BIAS::ThreeDOut::OpenGLOutImages(), BIAS::ThreeDOut::OpenGLOutLines(), BIAS::ThreeDOut::OpenGLOutPMatrices_(), BIAS::ThreeDOut::OpenGLOutPoints(), BIAS::operator<<(), BIAS::ImageAttributes::Print(), BIAS::ImageAttributes::ReadMagickPP(), BIAS::ThreeDOut::RemovePMatrix(), BIAS::ParamTypeEnum::SetFromString(), BIAS::Param::SetParamBool(), BIAS::Param::SetParamDouble(), BIAS::Param::SetParamEnum(), BIAS::Param::SetParamInt(), BIAS::Param::SetParamString(), BIAS::Param::SetParamVecDbl(), BIAS::Param::SetParamVecInt(), BIAS::PyramidImage< StorageType >::SetROI(), BIAS::PyramidImage< StorageType >::SetUID(), BIAS::PyramidImage< StorageType >::SetZero(), BIAS::Param::ShowData(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), BIAS::Param::Usage(), and BIAS::Param::~Param().

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally kernel

Definition at line 320 of file LGPL.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::TimeMeasure::GetKernelTime(), BIAS::TimeMeasure::Stop(), and BIAS::TimeMeasure::TimeMeasure().

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY KIND

Definition at line 434 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed the recipients should know that what they have is not the original so that the original author s reputation will not be affected by problems that might be introduced by others software patents pose a constant threat to the existence of any free program We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license Most GNU including some is covered by the ordinary GNU General Public License This the GNU Lesser General Public applies to certain designated libraries

Definition at line 50 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE LIBRARY

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the Library

Definition at line 158 of file LGPL.

if write to the Free Software Temple MA USA Also add information on how to contact you by electronic and paper mail You should also get your if to sign a copyright disclaimer for the library

Definition at line 35 of file LGPL.

either version of the License

Definition at line 4 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed the recipients should know that what they have is not the original so that the original author s reputation will not be affected by problems that might be introduced by others software patents pose a constant threat to the existence of any free program We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license Most GNU including some is covered by the ordinary GNU General Public License This license

Definition at line 4 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step method

Definition at line 35 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to modify

Definition at line 320 of file LGPL.

alter the names

Definition at line 493 of file LGPL.

if not

Definition at line 484 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number

Definition at line 403 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations

Definition at line 377 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written offer

Definition at line 300 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed on

Definition at line 50 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs one

Definition at line 300 of file LGPL.

Referenced by Eigenvalue_solve(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), and TNT::Lapack_LU_linear_solve().

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still operates

Definition at line 158 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical parameters

Definition at line 253 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted

Definition at line 320 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated place

Definition at line 235 of file LGPL.

if write to the Free Software Temple Place

Definition at line 4 of file LGPL.

that you can change the software and use pieces of it in new free programs

Definition at line 32 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new and you want it to be of the greatest possible use to the public

Definition at line 459 of file LGPL.

rather

Definition at line 202 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the recipients

Definition at line 35 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or rights

Definition at line 35 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable runs

Definition at line 320 of file LGPL.

if write to the Free Software Temple MA USA Also add information on how to contact you by electronic and paper mail You should also get your if to sign a copyright disclaimer for the if necessary Here is a sample

Definition at line 490 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical data structure layouts and and small macros and small then the use of the object file is regardless of whether it is legally a derivative if the work is a derivative of the you may distribute the object code for the work under the terms of Section Any executables containing that work also fall under Section

Definition at line 266 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY SERVICING

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do so

Definition at line 359 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed the recipients should know that what they have is not the original so that the original author s reputation will not be affected by problems that might be introduced by others software patents pose a constant threat to the existence of any free program We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license Most GNU software

Definition at line 4 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY SPECIAL

Definition at line 434 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to sublicense

Definition at line 320 of file LGPL.

if write to the Free Software Temple Suite

Definition at line 4 of file LGPL.

this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system

Examples:
timeit.cpp.

Definition at line 395 of file LGPL.

Referenced by main().

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or table

Definition at line 158 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still and performs whatever part of its purpose remains and can be reasonably considered independent and separate works in then this and its terms

Definition at line 193 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure that

Definition at line 158 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still and performs whatever part of its purpose remains and can be reasonably considered independent and separate works in themselves

Definition at line 193 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License Therefore

Definition at line 50 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version you may choose any version ever published by the Free Software Foundation If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these

Definition at line 403 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that they

Definition at line 35 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two things

Definition at line 320 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still and performs whatever part of its purpose remains and can be reasonably considered independent and separate works in then this and its do not apply to those sections when you distribute them as separate works But when you distribute the same sections as part of a whole which is a work based on the the distribution of the whole must be on the terms of this whose permissions for other licensees extend to the entire and thus to each and every part regardless of who wrote it Thus

Definition at line 193 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED TO

Definition at line 434 of file LGPL.

and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that too

Definition at line 4 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a in is not a derivative work of the and therefore falls outside the scope of this License linking a work that uses the Library with the Library creates an executable that is a derivative of the rather than a work that uses the library The executable is therefore covered by this License Section states terms for distribution of such executables When a work that uses the Library uses material from a header file that is part of the the object code for the work may be a derivative work of the Library even though the source code is not Whether this is true is especially significant if the work can be linked without the or if the work is itself a library The threshold for this to be true is not precisely defined by law If such an object file uses only numerical data structure layouts and and small macros and small then the use of the object file is unrestricted

Definition at line 262 of file LGPL.

GNU LESSER GENERAL PUBLIC LICENSE February Free Software Inc Temple MA USA Everyone is permitted to copy and distribute verbatim copies of this license but changing it is not allowed [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it By the GNU General Public Licenses are intended to guarantee your freedom to share and change free software to make sure the software is free for all its users This the Lesser General Public applies to some specially designated software packages typically libraries of the Free Software Foundation and other authors who decide to use it You can use it but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular based on the explanations below When we speak of free we are referring to freedom of use

Definition at line 4 of file LGPL.

it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later version [explicit]

Definition at line 50 of file LGPL.

Referenced by BIAS::ImageIO::ImportReal32().

GNU LESSER GENERAL PUBLIC LICENSE Version

Definition at line 2 of file LGPL.

Referenced by BIAS::operator<<(), BIAS::operator>>(), BIAS::ROI::ReadBinary(), BIAS::XMLBase::XMLAdd(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::ProjectionParametersPerspective::XMLIn(), BIAS::ProjectionParametersZoom::XMLOut(), BIAS::ProjectionParametersSpherical::XMLOut(), BIAS::ProjectionParametersPerspective::XMLOut(), BIAS::Projection::XMLOut(), BIAS::XMLBase::XMLWrite(), and BIAS::Projection::~Projection().

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is void

Definition at line 320 of file LGPL.

Referenced by BIAS::CanCompare< T1, T2 >::CanCompare(), BIAS::CanCopy< T1, T2 >::CanCopy(), BIAS::CanMultiply< T1, T2, T3 >::CanMultiply(), create_JPEG_file(), BIAS::DerivedFrom< T, Base >::DerivedFrom(), and getopt().

either version of the but WITHOUT ANY WARRANTY

Definition at line 479 of file LGPL.

we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY BECAUSE THE LIBRARY IS LICENSED FREE OF THERE IS NO WARRANTY FOR THE TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE LIBRARY AS IS WITHOUT WARRANTY OF ANY EITHER EXPRESSED OR BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU SHOULD THE LIBRARY PROVE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE LIBRARY AS PERMITTED BE LIABLE TO YOU FOR INCLUDING ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new and you want it to be of the greatest possible use to the we recommend making it free software that everyone can redistribute and change You can do so by permitting redistribution under these attach the following notices to the library It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty

Definition at line 155 of file LGPL.

and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or the facility still and performs whatever part of its purpose remains and can be reasonably considered independent and separate works in then this and its do not apply to those sections when you distribute them as separate works But when you distribute the same sections as part of a whole which is a work based on the the distribution of the whole must be on the terms of this whose permissions for other licensees extend to the entire whole

Definition at line 193 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link with

Definition at line 320 of file LGPL.

the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source even though third parties are not compelled to copy the source along with the object code A program that contains no derivative of any portion of the but is designed to work with the Library by being compiled or linked with is called a work that uses the Library Such a work

Definition at line 235 of file LGPL.

Referenced by Eigenproblem_quadratic_matrix(), TNT::eigenproblem_special_quadratic_matrix_solve(), Eigenvalue_solve(), TNT::eigenvalue_solve(), General_singular_value_decomposition(), Lapack_LLS_QR_linear_solve(), TNT::Lapack_LLS_QR_linear_solve(), TNT::singular_value_decomposition_general_rectangular_matrix_solve(), Upper_symmetric_eigenvalue_solve(), and TNT::Upper_symmetric_eigenvalue_solve().

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three years

Definition at line 300 of file LGPL.

if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in Subsection for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other conditions are imposed on they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent then as a consequence you may not distribute the Library at all For if a patent license would not permit royalty free redistribution of the Library by all those who receive copies directly or indirectly through you

Definition at line 193 of file LGPL.

Generated on Wed Jun 21 19:05:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: License for BIAS

License for BIAS

BIAS - Basic Image AlgoritmS C++ library
Developed at MIP - University of Kiel/Germany

---------------------------------------------

BIAS License

This file describes the license issues for the BIAS library.

Most parts of BIAS have been developed at the Multimedia Information
Processing Group at University Kiel, Germany. These parts can be used
under the terms of the GNU Lesser General Public License <LGPL.html>
(LGPL). An appropriate notice can be found at the top of each file
covered by this license.

However, some parts of BIAS have been developed by third parties and included
in BIAS for convenience. The copyright of these parts remain at their
original authors and the conditions to use, modify or distribute can be
different (not GNU Lesser General Public License).
An appropriate notice should be found at the top of each file
which is not covered by LGPL license.

List of foreign software components:

Name		Description			Location			License
TNT		Template Numerical Toolkit	Base/Match/tnt			PublicDomain
Minpack		nonlinear optimization		MathAlgo/minpack		??
Netlib		nonlinear optimization		MathAlgo/netlib			?
SUSAN		Corner Detector			CornerDetectors/Susan.cpp	Research Only
ViffHeader	Viff image file format		Base/Image			??
libdv		excerpts of libdv		Base/Image/DV			?
KLT-affine	affine extension of KLT		Matcher2D/TrackerBase.cpp	see file

BIAS and all it components ar edistributed int the hope that it will be useful.
However, please note:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

Copy of the LGPL

          GNU LESSER GENERAL PUBLIC LICENSE
               Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

                Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

          GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.

  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

                NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

             END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: precompiled.cpp File Reference

precompiled.cpp File Reference

#include "precompiled.h"

Include dependency graph for precompiled.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: precompiled.h File Reference

precompiled.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BaseFactory.hh File Reference

Base » Common

BaseFactory.hh File Reference

#include <bias_config.h>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include <Base/Debug/Exception.hh>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <iostream>

Include dependency graph for BaseFactory.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::BaseFactory< BaseClassType >
basic factory class More...
struct | BIAS::BaseFactory< BaseClassType >::MapEntry
struct for storing class details in memeber map Map_ More...

Defines

#define | ALLOCATOR_IMPL(BASE_NAME, CLASS_NAME)
#define | D_BF_ADD 0x00000001
#define | D_BF_GEN 0x00000002
#define | FACTORY_INVALID_TAG ""

Typedefs

typedef std::string | BIAS::TagType

Functions

template<class BaseClassType>
std::ostream & | BIAS::operator<< (std::ostream &os, const BaseFactory< BaseClassType > &bf)

Define Documentation

#define ALLOCATOR_IMPL | ( | BASE_NAME,
 |  | CLASS_NAME | )

Value:

inline static BASE_NAME *Allocator()\
{ return dynamic_cast<BASE_NAME *>(new CLASS_NAME); }

Definition at line 42 of file BaseFactory.hh.

#define D_BF_ADD 0x00000001

Definition at line 50 of file BaseFactory.hh.

#define D_BF_GEN 0x00000002

Definition at line 51 of file BaseFactory.hh.

Referenced by BIAS::BaseFactory< BaseClassType >::Generate().

#define FACTORY_INVALID_TAG ""

Definition at line 48 of file BaseFactory.hh.

Referenced by BIAS::BaseFactory< BaseClassType >::AddType().

Generated on Wed Jun 21 19:01:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragma.hh File Reference

Base » Common

BIASpragma.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragmaEnd.hh File Reference

Base » Common

BIASpragmaEnd.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragmaStart.hh File Reference

Base » Common

BIASpragmaStart.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/CompareFloatingPoint.hh File Reference

Base » Common

CompareFloatingPoint.hh File Reference

#include <limits>
#include <cmath>

Include dependency graph for CompareFloatingPoint.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

template<class T>
bool | BIAS::Equal (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_tools/floating_point_comparison.html and for discussion
template<class T>
bool | BIAS::Greater (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<class T>
bool | BIAS::GreaterEqual (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<typename T>
bool | BIAS::Less (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<typename T>
bool | BIAS::LessEqual (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values

Generated on Wed Jun 21 19:01:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/FileHandling.cpp File Reference

Base » Common

FileHandling.cpp File Reference

#include <stdio.h>
#include "FileHandling.hh"
#include <sys/time.h>
#include <math.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include "Base/Debug/Error.hh"
#include <algorithm>
#include <cctype>

Include dependency graph for FileHandling.cpp:

Go to the source code of this file.

Defines

#define | _CRT_SECURE_NO_DEPRECATE

Functions

std::string | BIAS::Basename (const std::string &fullname)
get Basename of file, no suffix, no direcory.
std::string | BIAS::CurrentDateTimeString ()
create a string containing date and time like 20060329_173054
std::string | BIAS::Directory (const std::string &fullname)
get Directory from fullname path JW
std::string | BIAS::Extension (const std::string &fullname)
get Extension of file without the "dot" No basename, no direcory.
int | BIAS::ExtractNumberFromRight (const std::string &inStr, int &number, int &posL, int &posR)
extract numeric value fromstring beginnign from right, e.g.
int | BIAS::FilenameSequence (const std::string &refFileName, std::string &resultFilename, const int &offsetFromRef, const unsigned int &stepsize=1)
construct i,g .seq filename from a given filename by manipulating the number within base part of RefFilename.
bool | BIAS::FileReadable (const std::string &s)
std::string | BIAS::LeadingZeroString (const int &n, const unsigned int &digits=DEFAULT_LEADING_ZEROS)
Creates a string with leading zeroes from number JW.
void | BIAS::LogCommandLine (int argc, char **argv, const std::string &filename)
void | BIAS::LogCommandLine (int argc, char **argv, std::ostream &os)
write compilation time/date and all command line arguments to a log file/stream JW
std::string | BIAS::LowerCase (const std::string &input)
void | BIAS::SplitName (const std::string &fullname, string &dir, string &base, string &suffix)
std::string | BIAS::Suffix (const std::string &fullname)
get .suffix of file including the ".dot" No basename, no direcory.
char | BIAS::ToLower_c (char c)
type correct helper wrapper for tolower required for stl transformations JW
char | BIAS::ToUpper_c (char c)
type correct helper wrapper for toupper required for stl transformations JW
std::string | BIAS::UpperCase (const std::string &input)

Define Documentation

#define _CRT_SECURE_NO_DEPRECATE

Definition at line 27 of file FileHandling.cpp.

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/FileHandling.hh File Reference

Base » Common

FileHandling.hh File Reference

#include <bias_config.h>
#include <string>

Include dependency graph for FileHandling.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | DEFAULT_LEADING_ZEROS 5
File handling tools.

Functions

std::string | BIAS::Basename (const std::string &fullname)
get Basename of file, no suffix, no direcory.
std::string | BIAS::CurrentDateTimeString ()
create a string containing date and time like 20060329_173054
std::string | BIAS::Directory (const std::string &fullname)
get Directory from fullname path JW
std::string | BIAS::Extension (const std::string &fullname)
get Extension of file without the "dot" No basename, no direcory.
int | BIAS::ExtractNumberFromRight (const std::string &inStr, int &number, int &posL, int &posR)
extract numeric value fromstring beginnign from right, e.g.
int | BIAS::FilenameSequence (const std::string &refFileName, std::string &resultFilename, const int &offsetFromRef, const unsigned int &stepsize=1)
construct i,g .seq filename from a given filename by manipulating the number within base part of RefFilename.
bool | BIAS::FileReadable (const std::string &s)
std::string | BIAS::LeadingZeroString (const int &n, const unsigned int &digits=DEFAULT_LEADING_ZEROS)
Creates a string with leading zeroes from number JW.
void | BIAS::LogCommandLine (int argc, char **argv, const std::string &filename)
void | BIAS::LogCommandLine (int argc, char **argv, std::ostream &os)
write compilation time/date and all command line arguments to a log file/stream JW
std::string | BIAS::LowerCase (const std::string &input)
void BIASCommon_EXPORT | BIAS::SplitName (const std::string &fullname, std::string &dir, std::string &base, std::string &suffix)
split full path into:
  • directory
  • basename
  • .suffix (inlcluding dot)

std::string | BIAS::Suffix (const std::string &fullname)
get .suffix of file including the ".dot" No basename, no direcory.
char | BIAS::ToLower_c (char c)
type correct helper wrapper for tolower required for stl transformations JW
char | BIAS::ToUpper_c (char c)
type correct helper wrapper for toupper required for stl transformations JW
std::string | BIAS::UpperCase (const std::string &input)

Define Documentation

#define DEFAULT_LEADING_ZEROS 5

File handling tools.

Todo:
: correct handling of Win32 SAMBA paths including \machine\....
Author:
Jan Woetzel 02/2005

Definition at line 36 of file FileHandling.hh.

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_long_W32.cpp File Reference

Base » Common

getopt_long_W32.cpp File Reference

#include <stdio.h>
#include "getopt_W32.h"
#include <stdlib.h>
#include <string.h>

Include dependency graph for getopt_long_W32.cpp:

Go to the source code of this file.

Defines

#define | _CRT_SECURE_NO_DEPRECATE
#define | _DIAGASSERT(X)
#define | BADARG
#define | BADCH (int)'?'
#define | EMSG ""
#define | IGNORE_FIRST (*options == '-' || *options == '+')
#define | IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-')
#define | INORDER (int)1
#define | IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
#define | PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
#define | PRINT_ERROR

Functions

static int | gcd (int, int)
static int | getopt_internal (int, char *const *, const char *)
int | getopt_long (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx)
static void | permute_args (int, int, int, char *const *)

Variables

static const char | ambig [] = "ambiguous option -- %.*s"
static const char | illoptchar [] = "unknown option -- %c"
static const char | illoptstring [] = "unknown option -- %s"
static const char | noarg [] = "option doesn't take an argument -- %.*s"
static int | nonopt_end = -1
static int | nonopt_start = -1
static char * | place = EMSG
static const char | recargchar [] = "option requires an argument -- %c"
static const char | recargstring [] = "option requires an argument -- %s"

Define Documentation

#define _CRT_SECURE_NO_DEPRECATE

Definition at line 43 of file getopt_long_W32.cpp.

#define _DIAGASSERT ( X )

Definition at line 84 of file getopt_long_W32.cpp.

Referenced by getopt_internal(), getopt_long(), and permute_args().

#define BADARG

Value:

((IGNORE_FIRST && options[1] == ':') \
             || (*options == ':') ? (int)':' : (int)'?')

Definition at line 120 of file getopt_long_W32.cpp.

Referenced by getopt(), getopt_internal(), and getopt_long().

#define BADCH (int)'?'

Definition at line 119 of file getopt_long_W32.cpp.

Referenced by getopt(), getopt_internal(), and getopt_long().

#define EMSG ""

Definition at line 124 of file getopt_long_W32.cpp.

Referenced by getopt(), getopt_internal(), and getopt_long().

#define IGNORE_FIRST (*options == '-' || *options == '+')

Definition at line 110 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-')

Definition at line 116 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

#define INORDER (int)1

Definition at line 122 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)

Definition at line 113 of file getopt_long_W32.cpp.

#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)

Definition at line 114 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

#define PRINT_ERROR

Value:

((opterr) && ((*options != ':') \
                      || (IGNORE_FIRST && options[1] != ':')))

Definition at line 111 of file getopt_long_W32.cpp.

Referenced by getopt_internal(), and getopt_long().

Function Documentation

static int gcd | ( | int | ,
 |  | int |
 | ) | [static]

Definition at line 149 of file getopt_long_W32.cpp.

Referenced by permute_args().

static int getopt_internal | ( | int | ,
 |  | char *const * | ,
 |  | const char * |
 | ) | [static]

Definition at line 207 of file getopt_long_W32.cpp.

References _DIAGASSERT, BADARG, BADCH, BIASCommon_EXPORT, EMSG, getopt(), IGNORE_FIRST, illoptchar, IN_ORDER, INORDER, nonopt_end, nonopt_start, optarg, optind, optopt, optreset, PERMUTE, permute_args(), place, PRINT_ERROR, and recargchar.

Referenced by getopt_long().

int getopt_long | ( | int | nargc,
 |  | char *const * | nargv,
 |  | const char * | options,
 |  | const struct option * | long_options,
 |  | int * | idx
 | ) |

Definition at line 394 of file getopt_long_W32.cpp.

References _DIAGASSERT, ambig, BADARG, BADCH, EMSG, option::flag, getopt_internal(), illoptstring, no_argument, noarg, nonopt_end, nonopt_start, optarg, optional_argument, optopt, permute_args(), place, PRINT_ERROR, recargstring, required_argument, and option::val.

Referenced by BIAS::Param::ParseCommandLine().

static void permute_args | ( | int | ,
 |  | int | ,
 |  | int | ,
 |  | char *const * |
 | ) | [static]

Definition at line 169 of file getopt_long_W32.cpp.

References _DIAGASSERT, gcd(), and swap.

Referenced by getopt_internal(), and getopt_long().

Variable Documentation

const char ambig[] = "ambiguous option -- %.*s" [static]

Definition at line 139 of file getopt_long_W32.cpp.

Referenced by getopt_long().

const char illoptchar[] = "unknown option -- %c" [static]

Definition at line 141 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

const char illoptstring[] = "unknown option -- %s" [static]

Definition at line 142 of file getopt_long_W32.cpp.

Referenced by getopt_long().

const char noarg[] = "option doesn't take an argument -- %.*s" [static]

Definition at line 140 of file getopt_long_W32.cpp.

Referenced by getopt_long().

int nonopt_end = -1 [static]

Definition at line 134 of file getopt_long_W32.cpp.

Referenced by getopt_internal(), and getopt_long().

int nonopt_start = -1 [static]

Definition at line 133 of file getopt_long_W32.cpp.

Referenced by getopt_internal(), and getopt_long().

char* place = EMSG [static]

Definition at line 130 of file getopt_long_W32.cpp.

Referenced by getopt(), getopt_internal(), and getopt_long().

const char recargchar[] = "option requires an argument -- %c" [static]

Definition at line 137 of file getopt_long_W32.cpp.

Referenced by getopt_internal().

const char recargstring[] = "option requires an argument -- %s" [static]

Definition at line 138 of file getopt_long_W32.cpp.

Referenced by getopt_long().

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_W32.cpp File Reference

Base » Common

getopt_W32.cpp File Reference

#include "getopt_W32.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Include dependency graph for getopt_W32.cpp:

Go to the source code of this file.

Defines

#define | BADARG (int)':'
#define | BADCH (int)'?'
#define | EMSG ""

Functions

int | getopt (int nargc, char *const *nargv, const char *ostr)

Variables

BIASCommon_EXPORT char * | optarg
BIASCommon_EXPORT int | opterr = 1
BIASCommon_EXPORT int | optind = 1
BIASCommon_EXPORT int | optopt
BIASCommon_EXPORT int | optreset

Define Documentation

#define BADARG (int)':'

Definition at line 53 of file getopt_W32.cpp.

#define BADCH (int)'?'

Definition at line 52 of file getopt_W32.cpp.

#define EMSG ""

Definition at line 54 of file getopt_W32.cpp.

Function Documentation

int getopt | ( | int | nargc,
 |  | char *const * | nargv,
 |  | const char * | ostr
 | ) |

Definition at line 61 of file getopt_W32.cpp.

References BADARG, BADCH, EMSG, optarg, opterr, optind, optopt, optreset, place, and void.

Referenced by getopt_internal(), and main().

Variable Documentation

BIASCommon_EXPORT char* optarg

Definition at line 50 of file getopt_W32.cpp.

Referenced by getopt(), getopt_internal(), getopt_long(), main(), and BIAS::Param::ParseCommandLine().

BIASCommon_EXPORT int opterr = 1

Definition at line 46 of file getopt_W32.cpp.

Referenced by getopt().

BIASCommon_EXPORT int optind = 1

Definition at line 47 of file getopt_W32.cpp.

Referenced by getopt(), getopt_internal(), main(), and BIAS::Param::ParseCommandLine().

BIASCommon_EXPORT int optopt

Definition at line 48 of file getopt_W32.cpp.

Referenced by getopt(), getopt_internal(), and getopt_long().

BIASCommon_EXPORT int optreset

Definition at line 49 of file getopt_W32.cpp.

Referenced by getopt(), and getopt_internal().

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_W32.h File Reference

Base » Common

getopt_W32.h File Reference

#include <bias_config.h>

Include dependency graph for getopt_W32.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | option

Defines

#define | __P(args) args
#define | no_argument 0
#define | optional_argument 2
#define | required_argument 1

Functions

BIASCommon_EXPORT int | getopt_long (int, char *const *, const char *, const struct option *, int *)

Define Documentation

#define __P ( args ) args

Definition at line 53 of file getopt_W32.h.

#define no_argument 0

Definition at line 62 of file getopt_W32.h.

Referenced by getopt_long().

#define optional_argument 2

Definition at line 64 of file getopt_W32.h.

Referenced by getopt_long(), and BIAS::Param::ParseCommandLine().

#define required_argument 1

Definition at line 63 of file getopt_W32.h.

Referenced by getopt_long(), main(), and BIAS::Param::ParseCommandLine().

Function Documentation

BIASCommon_EXPORT int getopt_long | ( | int | ,
 |  | char *const * | ,
 |  | const char * | ,
 |  | const struct option * | ,
 |  | int * |
 | ) |

Definition at line 394 of file getopt_long_W32.cpp.

References _DIAGASSERT, ambig, BADARG, BADCH, EMSG, option::flag, getopt_internal(), illoptstring, no_argument, noarg, nonopt_end, nonopt_start, optarg, optional_argument, optopt, permute_args(), place, PRINT_ERROR, recargstring, required_argument, and option::val.

Referenced by BIAS::Param::ParseCommandLine().

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/LeakChecking.h File Reference

Base » Common

LeakChecking.h File Reference

#include <bias_config.h>
#include <vld.h>
#include <vldapi.h>

Include dependency graph for LeakChecking.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | VLD_AGGREGATE_DUPLICATES
Leak tracing with MS Visual studio and Visual Leak Detector malloc/free and new/delete are supported with correct line numbers, call stack etc.
#define | VLD_MAX_DATA_DUMP 20

Define Documentation

#define VLD_AGGREGATE_DUPLICATES

Leak tracing with MS Visual studio and Visual Leak Detector malloc/free and new/delete are supported with correct line numbers, call stack etc.

.. This file requires the .h extension (instead of .hh)

Author:
Jan Woetzel 08/2005

Definition at line 19 of file LeakChecking.h.

#define VLD_MAX_DATA_DUMP 20

Definition at line 22 of file LeakChecking.h.

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/W32Compat.cpp File Reference

Base » Common

W32Compat.cpp File Reference

Go to the source code of this file.

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/W32Compat.hh File Reference

Base » Common

W32Compat.hh File Reference

#include <bias_config.h>

Include dependency graph for W32Compat.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLBase.cpp File Reference

Base » Common

XMLBase.cpp File Reference

#include <Base/Common/XMLBase.hh>

Include dependency graph for XMLBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLBase.hh File Reference

Base » Common

XMLBase.hh File Reference

#include "bias_config.h"
#include <Base/Common/XMLIO.hh>

Include dependency graph for XMLBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::XMLBase
Base class with interface for xml output. More...

Generated on Wed Jun 21 19:01:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLIO.cpp File Reference

Base » Common

XMLIO.cpp File Reference

#include "XMLIO.hh"
#include <sstream>
#include <vector>
#include <algorithm>
#include <cctype>
#include <libxml/tree.h>
#include <libxml/encoding.h>
#include <libxml/parser.h>

Include dependency graph for XMLIO.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLIO.hh File Reference

Base » Common

XMLIO.hh File Reference

#include "bias_config.h"
#include <Base/Math/Vector.hh>
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <vector>

Include dependency graph for XMLIO.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::XMLIO
Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'. More...

Defines

#define | XML_STD_ENCODING "ISO-8859-1"

Typedefs

typedef _xmlAttr | xmlAttr
typedef xmlAttr * | xmlAttrPtr
typedef _xmlDoc | xmlDoc
typedef xmlDoc * | xmlDocPtr
typedef _xmlNode | xmlNode
typedef xmlNode * | xmlNodePtr

Define Documentation

#define XML_STD_ENCODING "ISO-8859-1"

Definition at line 53 of file XMLIO.hh.

Referenced by BIAS::XMLIO::write().

Typedef Documentation

typedef struct _xmlAttr xmlAttr

Definition at line 40 of file XMLIO.hh.

typedef xmlAttr* xmlAttrPtr

Definition at line 41 of file XMLIO.hh.

typedef struct _xmlDoc xmlDoc

Definition at line 44 of file XMLIO.hh.

typedef xmlDoc* xmlDocPtr

Definition at line 45 of file XMLIO.hh.

typedef struct _xmlNode xmlNode

Definition at line 42 of file XMLIO.hh.

typedef xmlNode* xmlNodePtr

Definition at line 43 of file XMLIO.hh.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleCompare.cpp File Reference

Base » Common » Examples

ExampleCompare.cpp File Reference

#include <Base/Common/CompareFloatingPoint.hh>
#include <iostream>
#include <limits>

Include dependency graph for ExampleCompare.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Examples:
convertRAW.cpp, ExampleFileNames.cpp, ExampleImageAttributes.cpp, ExampleImageLoad.cpp, ExampleImageMagickIO.cpp, ExampleIpl.cpp, ExampleIplImageDisplay.cpp, ExampleIplImageDraw.cpp, ExampleIplWrapOpenCV.cpp, ExampleLoadBan.cpp, ExampleLoadBOG.cpp, mip2viff.cpp, timeit.cpp, and viff2mip.cpp.

Definition at line 8 of file ExampleCompare.cpp.

References BIAS::Equal(), and r.

Generated on Wed Jun 21 19:01:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleFactory.cpp File Reference

Base » Common » Examples

ExampleFactory.cpp File Reference

#include <Base/Common/BaseFactory.hh>
#include <string>
#include <iostream>

Include dependency graph for ExampleFactory.cpp:

Go to the source code of this file.

Classes

class | A
class | B
class | Base
class | C
class | MyFactory

Functions

int | main ()

Function Documentation

int main ( )

Definition at line 85 of file ExampleFactory.cpp.

References BIAS::BaseFactory< BaseClassType >::Generate(), p, and Base::Who().

Generated on Wed Jun 21 19:01:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleFileNames.cpp File Reference

Base » Common » Examples

ExampleFileNames.cpp File Reference

#include <iostream>
#include "Base/Common/FileHandling.hh"

Include dependency graph for ExampleFileNames.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 17 of file ExampleFileNames.cpp.

References BIAS::SplitName().

Generated on Wed Jun 21 19:01:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleXMLBase.cpp File Reference

Base » Common » Examples

ExampleXMLBase.cpp File Reference

#include <Base/Common/XMLIO.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Common/XMLBase.hh>

Include dependency graph for ExampleXMLBase.cpp:

Go to the source code of this file.

Classes

class | myTestClass

Defines

#define | VERSIONOFTESTCLASS 0.37

Functions

int | main (int, char **)

Define Documentation

#define VERSIONOFTESTCLASS 0.37

Definition at line 10 of file ExampleXMLBase.cpp.

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 45 of file ExampleXMLBase.cpp.

References myTestClass::thedata, BIAS::XMLBase::XMLRead(), and BIAS::XMLBase::XMLWrite().

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleXMLIO.cpp File Reference

Base » Common » Examples

ExampleXMLIO.cpp File Reference

#include <Base/Common/XMLIO.hh>

Include dependency graph for ExampleXMLIO.cpp:

Go to the source code of this file.

Functions

int main (int, char **)

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 6 of file ExampleXMLIO.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::getAttributeName(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstAttribute(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextAttribute(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentString(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), and BIAS::XMLIO::write().

Generated on Wed Jun 21 19:01:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasabort.cpp File Reference

Base » Debug

biasabort.cpp File Reference

#include "biasabort.hh"
#include <stdlib.h>

Include dependency graph for biasabort.cpp:

Go to the source code of this file.

Functions

void BIAS::biasabort ()
wrapper for abort() Disables unreachable warnings.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasabort.hh File Reference

Base » Debug

biasabort.hh File Reference

#include <bias_config.h>

Include dependency graph for biasabort.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Functions

void BIAS::biasabort ()
wrapper for abort() Disables unreachable warnings.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasexit.cpp File Reference

Base » Debug

biasexit.cpp File Reference

#include "biasexit.hh"
#include <stdlib.h>

Include dependency graph for biasexit.cpp:

Go to the source code of this file.

Functions

void BIAS::biasexit (const int status=1)
wrapper for exit() Disables unreachable warnings.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasexit.hh File Reference

Base » Debug

biasexit.hh File Reference

#include <bias_config.h>

Include dependency graph for biasexit.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

void | BIAS::biasexit (const int status=1)
wrapper for exit() Disables unreachable warnings.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Constraints.hh File Reference

Base » Debug

Constraints.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CanCompare< T1, T2 >
compile time check for comparabilty of T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | BIAS::CanCopy< T1, T2 >
compile time check for copy compatibilty between T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | BIAS::CanMultiply< T1, T2, T3 >
compile time check if T1 can be multiplied by T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | BIAS::DerivedFrom< T, B >
compile time check if B is (grand)father of T Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html "Actually, Derived_from doesn't check derivation, but conversion, but that's often a better constaint. More...

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Debug.cpp File Reference

Base » Debug

Debug.cpp File Reference

#include "Debug.hh"

Include dependency graph for Debug.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:01:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Debug.hh File Reference

Base » Debug

Debug.hh File Reference

some macros, classes and varaibles for debugging purposes: More...

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <iostream>
#include <iomanip>
#include <string>
#include <stdio.h>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Debug.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Debug

Defines

#define | ABORT abort();
#define | BIASCDOUT(flag, arg)
#define | BIASDOUT(flag, arg)
#define | BIASDOUT_CLEAN(flag, arg)
#define | BIASDOUT_THREAD(debuglevel, debugstream, flag, arg)
#define | BIASFLUSHDOUT
#define | BIASGDOUT(level, arg)
#define | PRINTTYPE(thetype)
this returns the type as a string, e.g.
#define | WS sizeof(long int)*8

Detailed Description

some macros, classes and varaibles for debugging purposes:

The class variables _liDebugLevel and _zDebugStream must exist for the macros to operate. Usually they are inherited from the Debug class defined below

_liDebuglevel is a bitfield. It is set to 0 in the constr. of Debug The bits should be addressed via a define macros from the header file of the acording class.

_zDebugStream is a ostream. It is set to cerr in the constructor of Debug

BIASDOUT(flag, stream) prints stream to cerr if flag is set in _liDebuglevel

BIASDOUT_THREAD is the aequivalent to BIASDOUT for the use within a thread

BIASGDOUT(level, stream) prints out debug information if BIASGlobalDebugLevel is greater than level. It can only be used together with the global debug level.

The global debuglevel variable 'BIASGlobalDebugLevel' is defined in MainDebug.hh. It should be included only in the application.

The global debug level 'BIASGlobalDebugLevel' should be defined in every executable via the include of <Debug/MainDebug.hh>.

A function ResetDebugLevelFromGlobal() can be implemented in classes that need it. See Examples...

An exhaustive example exists.

Author:
Felix Woelk

Definition in file Debug.hh.

Define Documentation

#define ABORT abort();

Definition at line 132 of file Debug.hh.

#define BIASCDOUT | ( | flag,
 |  | arg | )

Value:

{ if ((this->_liDebugLevel & flag)!=0){\
        std::ostream _cods_(std::cout.rdbuf()); \
        this->GetDebugStream(_cods_); _cods_ << arg; } }

Definition at line 107 of file Debug.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateMoving3DPoints(), BIAS::GenSynthMatches::_CreateMovingTransforms(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::Triangulation::_UpdateCovWeights(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::Histogram::AddHist(), BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::Filter(), BIAS::Mean< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::GuiGTK::FreeBuffer_(), BIAS::BaseFactory< BaseClassType >::Generate(), BIAS::Triangulation::GetCovariance2D(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::Condensation::GetMeanWeight(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::EMatrix::GetRotationTranslation(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::Conic2D::GetTangentPoints(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::MSAC< SolutionType >::Init(), BIAS::TrackerBase< StorageType >::Init_(), BIAS::GuiGTK::InitGtk(), BIAS::Condensation::InitPrior(), BIAS::Label::Label4Neighbour(), BIAS::Label::Label4Neighbour_(), BIAS::Triangulation::Optimal(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Condensation::PredictNewSamplePositions(), BIAS::Condensation::Process(), BIAS::Label::Process(), BIAS::ROI::ReadBinary(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::TrackerBase< StorageType >::RejectX86_(), BIAS::Condensation::SecondOrderARP_(), BIAS::GuiGTK::ShowConvertedImage_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::SVD::Solve(), BIAS::MSAC< SolutionType >::SolveMaster(), BIAS::TrackerSynth< StorageType, CalculationType >::Track(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerSynth< StorageType, CalculationType >::Track_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), BIAS::Triangulation::Triangulate2D(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::ROI::WriteBinary().

#define BIASDOUT | ( | flag,
 |  | arg | )

Value:

{ if ((this->_liDebugLevel & flag)!=0){\
        std::ostream _cods_(std::cout.rdbuf()); \
        this->GetDebugStream(_cods_); _cods_ << #flag << ", " << __FILE__ \
                      << ", " << __LINE__ << " : " << arg << std::endl; } }

Definition at line 83 of file Debug.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::EpipolarLine::CalcTransformed_(), BIAS::RegionMatcher::CNCC(), BIAS::RegionMatcher::ColorCCV(), BIAS::RegionMatcher::ColorNCC(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::FilterMask::ComputeIntPrecisionBits(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::FilterMask::CreateIntFilter(), BIAS::CScommServer::CreateListenThread_(), BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiWX::DestroyWindow(), BIAS::GuiGTK::DestroyWindow(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::ImageCanvasEnhanced::DrawRectangle_(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::doubleRANSAC::EvaluateSolution(), BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::PMatrixEstimation::FindClosestP2(), BIAS::ExampleDebug::func(), BIAS::ImageAttributes::GetFocalLengthMeter(), BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetFocalLengthYPixel(), BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::EpipolarLine::GetNextLine(), BIAS::ImageAttributes::GetPixelSizeXMeter(), BIAS::ImageAttributes::GetPixelSizeYMeter(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DiskPMD::GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::Interpolator::InitBezier(), BIAS::VideoSource_DCAM::InitCam(), BIAS::GuiGTK::InitGtk(), BIAS::Interpolator::InitSpline2(), BIAS::Interpolator::InitSpline3(), BIAS::Interpolator::InitSplineAkima(), BIAS::EpipolarLine::Interpolate_(), BIAS::Label::LabelInit_(), BIAS::Label::LabelRelease_(), BIAS::RegionMatcher::LineMatcherNCC(), BIAS::RegionMatcher::LineMatcherSAD(), BIAS::CornerMatcher::NCCSearch(), BIAS::RegionMatcher::NCCSearchEven(), BIAS::RegionMatcher::NCCSearchOdd(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::RegionMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::RegionMatcher::ParabolaNCC5(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::Param::ParseCommandLine(), BIAS::Camera< StorageType >::ParseMetaData(), MIP::VideoSource_DV::PostGrab(), BIAS::VideoSource_DCAM::PostGrab(), MIP::VideoSource_DV::PreGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource_DCAM::QueryCam(), BIAS::SVD::Rank(), BIAS::CScommBase::receiveThread_(), BIAS::doubleRANSAC::RefineSolution(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::MDcam::ScanBus(), BIAS::EpipolarLine::ScanLine(), BIAS::EpipolarLine::ScanLine_(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::ImageCanvasEnhanced::SelectRectangle(), BIAS::VideoSource_DCAM::SetCamera(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::ImageCanvas::Show(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), BIAS::RANSAC< SolutionType >::SolveMaster(), BIAS::Interpolator::Spline(), BIAS::VideoSource_DCAM::StartIso(), BIAS::CScommBase::syncReceive_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::Triangulation::Triangulate2D(), BIAS::Camera< StorageType >::UpdateMetaData(), BIAS::Param::UpdateParameter(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::Interpolator::validate(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), MIP::VideoSource_DV::VideoSource_DV_Internal_Init_(), BIAS::GuiBase::WaitForKeyEvent(), BIAS::LeastSquaresSVD::WeightedSolve(), BIAS::LeastSquaresLapack::WeightedSolve(), BIAS::GuiGTK::~GuiGTK(), BIAS::VideoSource_DCAM::~VideoSource_DCAM(), and MIP::VideoSource_DV::~VideoSource_DV().

#define BIASDOUT_CLEAN | ( | flag,
 |  | arg | )

Value:

{ if ((this->_liDebugLevel & flag)!=0){\
        std::ostream _cods_(std::cout.rdbuf()); \
        this->GetDebugStream(_cods_); _cods_ << arg << std::endl; } }

Definition at line 102 of file Debug.hh.

Referenced by MIP::VideoSource_DV2::GrabSingle().

#define BIASDOUT_THREAD | ( | debuglevel,
 |  | debugstream,
 |  | flag,
 |  | arg | )

Value:

if ((debuglevel & flag)!=0)\
        debugstream << #flag << ", " << __FILE__ << ", " << __LINE__ << " : "\
                    << arg << std::endl;

Definition at line 93 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiGTK::MouseMotionCallback_().

#define BIASFLUSHDOUT

Value:

{ std::ostream _cods_(std::cout.rdbuf()); \
    this->GetDebugStream(_cods_); _cods_.flush(); }

Definition at line 89 of file Debug.hh.

Referenced by BIAS::Triangulation::GetCovariance2D(), BIAS::GuiGTK::InitGtk(), BIAS::GuiGTK::Redraw_(), and BIAS::Triangulation::Triangulate2D().

#define BIASGDOUT | ( | level,
 |  | arg | )

Value:

if (Debug::GlobalDebugLevel >= level)\
       std::cerr << arg << std::endl;

Definition at line 98 of file Debug.hh.

Referenced by BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageConvert::HSLToGrey_(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageConvert::IP_ToGrey(), BIAS::ImageConvert::IP_YUV422ToGrey_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToRGB(), BIAS::ImageConvert::YUV422ToGrey_(), and BIAS::ImageConvert::YUV422ToRGB_().

#define PRINTTYPE ( thetype )

Value:

(\
  (typeid(thetype)==typeid(char))? "char": \
  (typeid(thetype)==typeid(signed char))?"signed char":\
  (typeid(thetype)==typeid(unsigned char))?"unsigned char":\
  (typeid(thetype)==typeid(short))? "short": \
  (typeid(thetype)==typeid(signed short))? "signed short": \
  (typeid(thetype)==typeid(unsigned short))?"unsigned short":\
  (typeid(thetype)==typeid(int))? "int":\
  (typeid(thetype)==typeid(unsigned int))?"unsigned int":\
  (typeid(thetype)==typeid(signed int))?"signed int":\
  (typeid(thetype)==typeid(double))?"double":\
  (typeid(thetype)==typeid(float))?"float":\
  (typeid(thetype)==typeid(long))?"long":\
  "UnknownStorageType")
this returns the type as a string, e.g.

PRINTTYPE(int) -> "int" useful when debugging templates on WIN32 thsi can be done more pretty with typeid( *ptr ).name() (jw)

Definition at line 139 of file Debug.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageDraw< StorageType >::GetContrastValue(), BIAS::Image< StorageType >::Image(), and BIAS::Image< StorageType >::operator=().

#define WS sizeof(long int)*8

Referenced by BIAS::Debug::PrintDebugLevel().

Generated on Wed Jun 21 19:01:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/DebugSimple.hh File Reference

Base » Debug

DebugSimple.hh File Reference

#include <iostream>

Include dependency graph for DebugSimple.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | COUT(output) COUT_DEST<<output;
#define | COUT_DEST std::cout
which destination for COUT ?
#define | COUT_ONOFF 1
do COUT outputs?, default is 'on'

Define Documentation

#define COUT ( output ) COUT_DEST<<output;

Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 60 of file DebugSimple.hh.

Referenced by BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportRAWwithHeader(), BIAS::ImageIO::InitDevIL(), BIAS::ImageAttributes::InitExifTags(), MyFrame::LoadImages(), MyFrame::OnAbout(), BIAS::OpenGLCanvasBase::OnChar(), BIAS::ParamGUIPanel::OnTextEnter(), and BIAS::OpenGLCanvasBase::ScreenShot().

#define COUT_DEST std::cout

which destination for COUT ?

Definition at line 52 of file DebugSimple.hh.

#define COUT_ONOFF 1

do COUT outputs?, default is 'on'

The significant difference to BIASDebug is that thsi macro does not touch teh class hierarchy and does not add artificial class members. But: This debugging scheme supports only levels, not flags. If you really need more granular debugging/outputs look at BIAS/Base/Debug.hh .

Author:
Jan Woetzel

Definition at line 47 of file DebugSimple.hh.

Generated on Wed Jun 21 19:01:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Error.hh File Reference

Base » Debug

Error.hh File Reference

#include "bias_config.h"
#include <assert.h>
#include <iostream>
#include <sstream>
#include <string>
#include <stdlib.h>

Include dependency graph for Error.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | BIAS_CHECK_NAN BIAS_CHECK_NAN_is_deprecated_because_never_used_see_BIAS_Error_hh
DEPRECATED - JW 12/2005
  • unused in BIAS,MIP,S2DT
  • bad style, please use templated isnan/isinf etc.

#define | BIAS_MUTEX_LOCK(arg) pthread_mutex_lock(arg);
alias for pthread C interface for mutex locking
#define | BIAS_MUTEX_UNLOCK(arg) pthread_mutex_unlock(arg);
#define | BIASABORT
macro to be used instead of abort()
#define | BIASASSERT(cond)
macro to be used instead of assert() Expands to output on debug and on release: -Linux release nothing, -Windows release: Attention! Assume that condition holds and let the compiler exploit this knowledge for optimization.
#define | BIASBREAK
set a breakpoint programmatically This code is handled as a breakpoint exception.
#define | BIASERR(arg)
macro for error handling Puts message in Debug mode to a destination and adds file+line for "click+jump" in Xemacs on Linux and Visual Studio on Windows.
#define | BIASEXIT(mesg)
macro to be used instead of exit() Jan Woetzel
#define | BIASNEW(arg1, arg2) try {arg1= new arg2;} catch (std::bad_alloc){ BIASERR("new failed");};
macro around new catching exceptions
#define | BIASWARN(arg)
#define | BIASWARNONCE(arg)
Issue a warning only once and only in debug mode at runtime.
#define | CALLINFO {std::cout<<"called "<<__FILE__<<", "<<__LINE__<<": "<<FUNCNAME<<std::endl<<std::flush;}
verbose writing calling information to screen in Debug mode.
#define | ERROR_STREAM std::cerr
exit, abort, EXIT_FAILURE,
#define | FUNCNAME __PRETTY_FUNCTION__
macro to display the complete function name a line of code belongs to.

Define Documentation

#define BIAS_CHECK_NAN BIAS_CHECK_NAN_is_deprecated_because_never_used_see_BIAS_Error_hh

DEPRECATED - JW 12/2005

  • unused in BIAS,MIP,S2DT
  • bad style, please use templated isnan/isinf etc.

Definition at line 329 of file Error.hh.

#define BIAS_MUTEX_LOCK ( arg ) pthread_mutex_lock(arg);

alias for pthread C interface for mutex locking

Definition at line 321 of file Error.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::InitGtk(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::ZoomImageCanvas::NewImage(), BIAS::ImageCanvas::OnPaint(), BIAS::ZoomImageCanvas::OnPaint(), BIAS::GuiGTK::Redraw_(), BIAS::ImageCanvasEnhanced::SelectRectangle(), BIAS::ImageCanvas::Show(), BIAS::GuiGTK::ShowConvertedImage_(), BIAS::ImageCanvas::UpdateStatusBar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::GuiBase::WaitForMouseButtonEvent().

#define BIAS_MUTEX_UNLOCK ( arg ) pthread_mutex_unlock(arg);

Definition at line 322 of file Error.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::InitGtk(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::ZoomImageCanvas::NewImage(), BIAS::GuiGTK::Redraw_(), BIAS::ImageCanvasEnhanced::SelectRectangle(), BIAS::ImageCanvas::Show(), BIAS::GuiGTK::ShowConvertedImage_(), BIAS::ImageCanvas::UpdateStatusBar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::GuiBase::WaitForMouseButtonEvent().

#define BIASABORT

Value:

{ \
  std::cout<<std::flush; std::cerr<<std::flush \
  <<__FILE__<<", "<<__LINE__<<" aborting."<<std::endl<<std::flush; \
  abort(); \
}
macro to be used instead of abort()

Todo:
: call MIP::biasabort instead of abort - but this introduces one library dependency.
Author:
Jan Woetzel

Definition at line 215 of file Error.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GenSynthMatches::_CheckParams(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::GenSynthMatches::_CreateMoving2DPoints(), BIAS::GenSynthMatches::_CreateMovingGT2DPoints(), BIAS::GenSynthMatches::_Draw(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::ThreeDOut::AddImage(), BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::ImageDraw< StorageType >::Arrow(), BIAS::PMatrix::BackprojectWorldCoo(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::PMatrix::Compose(), BIAS::RigParameter::Compute(), BIAS::PMatrixLinear::Compute(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::CScommBase::CScommBase(), BIAS::Matrix< T >::Divide(), Draw(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::Parametrization::EMatrixToParams(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterInt(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders(), BIAS::FFT2D< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Erosion< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Dilation< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Projection::GetC(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageBase::GetCopyOfROI2(), BIAS::Projection::GetCov(), BIAS::Triangulation::GetCovarianceAnalytic(), BIAS::FMatrixEstimation::GetDetPolynomial(), BIAS::Projection::GetExternals(), BIAS::HMatrix::GetJacobian(), BIAS::HomgPlane3D::GetLineIntersection(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Projection::GetPose(), BIAS::Projection::GetR(), BIAS::Quaternion< QUAT_TYPE >::GetRotationMatrix(), BIAS::CovMatrix3x3::GetS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportOpenEXR(), BIAS::PyramidImage< StorageType >::Init(), BIAS::MatlabTBUndistortion::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::HomgPoint2D::IsInROIHomogenized(), BIAS::ImageDraw< StorageType >::Line(), BIAS::ImageDraw< StorageType >::LineGrey(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), BIAS::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::Vector3< T >::Normalize(), BIAS::VideoSource_Stereo::OpenDevice(), BIAS::VideoSource_DiskPMD::OpenDevice(), BIAS::operator<<(), BIAS::VideoSource_Stereo::operator=(), BIAS::CScommBase::operator=(), BIAS::ProjectionParametersZoom::operator=(), BIAS::ProjectionParametersProjective::operator=(), BIAS::HMatrixEstimation::Optimize(), BIAS::FMatrixEstimation::Optimize(), BIAS::Parametrization::ParamsToEMatrix(), BIAS::ImageBase::Paste2ROI(), BIAS::Projection::Project(), BIAS::TrackerBase< StorageType >::RejectX86_(), BIAS::ProjectionParametersZoom::Rescale(), BIAS::ProjectionParametersProjective::Rescale(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::RMatrixBase::Set(), BIAS::Projection::SetC(), BIAS::ROI::SetCorners(), BIAS::Projection::SetCov(), BIAS::Param::SetEnhancedFlag(), BIAS::VideoSource_DiskPMD::SetGenerateNewUIDs(), BIAS::Param::SetHiddenFlag(), BIAS::Param::SetParamBool(), BIAS::Param::SetParamDouble(), BIAS::Param::SetParamEnum(), BIAS::Param::SetParameterWriteToFile(), BIAS::Param::SetParamInt(), BIAS::Param::SetParamString(), BIAS::Param::SetParamVecDbl(), BIAS::Param::SetParamVecInt(), BIAS::Projection::SetPose(), BIAS::CoordinateTransform3D::SetR(), BIAS::TimeMeasure::SetTimerFile(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SetupProjectionLUT(), BIAS::FMatrixEstimation::SevenPoint(), BIAS::RANSAC< SolutionType >::SolveMaster(), BIAS::PoseParametrization::Transform(), BIAS::Projection::UnProjectToCovLocal(), BIAS::Projection::UnProjectToPointLocal(), BIAS::Projection::UnProjectToRay(), BIAS::Projection::UnProjectToRayLocal(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::VideoSource_Stereo::VideoSource_Stereo(), BIAS::ProjectionParametersBase::ViewDifference(), BIAS::Tracker< StorageType, CalculationType >::WriteTrackLog_(), and BIAS::PMatrix::XMLOut().

#define BIASASSERT ( cond )

Value:

{ \
  if (!(cond)) { \
  std::cout<<std::flush; \
  std::cerr<<std::flush; \
  std::cerr \
  <<__FILE__<<","<<__LINE__<<" : BIASASSERT failed. "<<std::endl<<std::flush; \
  }; \
  assert(cond); \
}
macro to be used instead of assert() Expands to output on debug and on release: -Linux release nothing, -Windows release: Attention! Assume that condition holds and let the compiler exploit this knowledge for optimization.

Be warned: This may unintentionally optimize away your error handling code! see http://msdn2.microsoft.com/en-us/library//1b3fsfxw.aspx

Author:
Jan Woetzel
Examples:
ExampleImageAttributes.cpp, ExampleImageMagickIO.cpp, and ExampleLoadBan.cpp.

Definition at line 268 of file Error.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners(), BIAS::MatchDataBase::_SetCamData(), BIAS::Histogram::AddWeightedHist(), BIAS::ImageConvert::BayerToRGB_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::HomgLine3D::CalculateFootpoint(), BIAS::SVD3x3::Compute(), BIAS::WrapBias2Ipl::ConvertIPL32to8(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GeometryGL::DisplayCameraInternalParams(), BIAS::OpenGLCanvasBase::DisplayCoordCross(), BIAS::GeometryGL::DisplayImgPlaneTextured(), BIAS::GeometryGL::DisplayQuadTexCoord2D(), BIAS::Vector< T >::Dist(), BIAS::Vector3< T >::Divide(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::Vector< T >::ElementwiseProduct(), BIAS::ImageDraw< StorageType >::Ellipse(), ErrorFunction(), errout(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExtensionName(), BIAS::FilenameSequence(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::TrackerSynth< StorageType, CalculationType >::FindNearest_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), Get_pStereoAPI(), BIAS::TrackerBaseAffine< StorageType >::GetAffineResult(), BIAS::TrackerBase< CalculationType >::GetAffineResult(), BIAS::CameraViewport::GetAspect(), BIAS::CameraViewFrustum::GetAspect(), BIAS::RMatrix::GetAverageRMatrix(), BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders(), BIAS::Matrix< T >::GetCol(), BIAS::Matrix3x3< T >::GetColumn(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EMatrixBase::GetCosAngleErrorHomogenized(), BIAS::Triangulation::GetCovariance(), BIAS::HomgPoint1D::GetEuclidian(), BIAS::HomgPoint3D::GetEuclidianX(), BIAS::HomgPoint2D::GetEuclidianX(), BIAS::HomgPoint3D::GetEuclidianY(), BIAS::HomgPoint2D::GetEuclidianY(), BIAS::HomgPoint3D::GetEuclidianZ(), BIAS::CameraViewController::GetExternals(), BIAS::Projection::GetExternals(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImgObjGL::GetGLPixelFormat(), BIAS::ImgObjGL::GetGLStorageType(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::CameraViewController::GetInternals(), BIAS::ROI::GetMaskImage(), BIAS::Distribution::GetMean(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::OpenGLCanvasBase::GetOwnerframe(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Projection::GetQ(), BIAS::Projection::GetR(), BIAS::Matrix3x3< T >::GetRow(), BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetSingularValue(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageCanvasGLBase::GetTexId(), BIAS::ImageCanvasGLBase::GetTexTarget(), BIAS::Condensation::GetVariance(), BIAS::Distribution::GetVariance(), BIAS::OpenGLCanvas::GetViewController(), BIAS::HomgPoint1D::Homogenize(), BIAS::HomgLine3D::Homogenize(), BIAS::HomgLine2D::Homogenize(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Kalman::Init(), BIAS::MSAC< SolutionType >::Init(), BIAS::TrackerBase< StorageType >::Init(), BIAS::TrackerBase< StorageType >::Init_(), BIAS::DrawTextGL::InitFont(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix2x2< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::UUID::IsNil(), BIAS::LevenbergMarquardtExtended(), BIAS::ImageDraw< StorageType >::Line(), BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), main(), BIAS::CameraViewController::MoveOrbit(), BIAS::CameraViewController::MoveToCenter(), BIAS::Matrix3x3< T >::Mult(), mysobel(), mysobel2(), mytoplanar(), BIAS::RegionMatcher::NCC(), BIAS::Tensor3D< T >::NewSize(), BIAS::Matrix4x4< T >::newsize(), BIAS::Matrix3x4< T >::newsize(), BIAS::Matrix3x3< T >::newsize(), BIAS::OpenGLCanvasBase::OnChar(), DragAndDropTarget::OnDropFiles(), BIAS::dndFileTarget::OnDropFiles(), BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator()(), BIAS::Vector< T >::operator+=(), BIAS::Vector< T >::operator-=(), BIAS::Vector2< T >::operator/(), BIAS::Matrix< T >::operator==(), BIAS::Vector4< T >::operator[](), BIAS::Vector3< T >::operator[](), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator[](), BIAS::Polynom::operator[](), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::PMatrix::PMatrix(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Kalman::Predict(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Image< StorageType >::PrintData(), PrintInfoEXR(), BIAS::Image< StorageType >::PrintPointer(), BIAS::VideoShMFeeder::ProcessImage(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), PtoPPP(), BIAS::Random::ran2_(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ROI::Resize(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::Vector< T >::ScalarProduct(), BIAS::ImageBase::SetBitDepth(), BIAS::Matrix< T >::SetCol(), BIAS::MatchDataBase::SetData(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::HomgPlane3D::SetFromVector(), BIAS::ProjectionParametersPerspective::SetK(), BIAS::MatchDataBase::SetNormalizedData(), BIAS::ScaledImageCanvas::SetOffset(), BIAS::ScaledImageCanvas::SetOffsetRange(), BIAS::Conic2D::SetPointAndCovariance(), BIAS::Matrix< T >::SetRow(), BIAS::ScaledImageCanvas::SetScale(), BIAS::ScaledImageCanvas::SetScaleRange(), BIAS::Median< InputStorageType, OutputStorageType >::SetSize(), BIAS::CameraViewController::SetStartPos(), BIAS::UUID::SetUUIDRaw(), BIAS::ZoomFrame::SetZoom(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::MSAC< SolutionType >::SolveMaster(), BIAS::Interpolator::SplineFromLuT(), BIAS::OpenGLCanvasBase::StereoI_Init(), BIAS::TimeMeasure::Stop(), BIAS::Vector< T >::SubIP(), BIAS::Vector< T >::SubVec(), BIAS::ImageConvert::ToGrey(), BIAS::Matrix< T >::Trace(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::ProjectionParametersBase::Transform_(), BIAS::Kalman::Update(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::Vector2< T >::Vector2(), BIAS::ROI::Vector2Mask(), BIAS::Vector3< T >::Vector3(), BIAS::Vector4< T >::Vector4(), BIAS::ThreeDOut::VRMLOutWriteViewpoint(), BIAS::DC_GPS::WriteBinary(), BIAS::DC_inertial::WriteBinary(), BIAS::DC_ptu::WriteBinary(), BIAS::ROI::WriteBinary(), and BIAS::Histogram2D::ZeroHist().

#define BIASBREAK

set a breakpoint programmatically This code is handled as a breakpoint exception.

Thus a messagebox will pop up where you can choose

  • to "break" (which means use this like a normal breakpoint)
  • or "ignore" to continue skipping the breakpoint. Depends on BIAS_DEBUg and not _DEBUG, thus works for Debug *and* Release build! Useful to set a breakpoint in code, e.g. in addition to an exit or failure return for MS VS IDE Debugging. VS 71 debugger see http://www.highprogrammer.com/alan/windev/visualstudio.html and http://msdn2.microsoft.com/en-us/library//f408b4et.aspx
    Author:
    Jan Woetzel

Definition at line 104 of file Error.hh.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImgObjGL::GetGLPixelFormat(), BIAS::ImgObjGL::GetGLStorageType(), BIAS::ImageBase::GetSize(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix2x2< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::CameraViewController::MoveToCenter(), BIAS::OpenGLCanvas::OnMouseWheel(), BIAS::operator>>(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

#define BIASERR ( arg )

Value:

{ \
  ERROR_STREAM<<std::flush<<"Error in "<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<"\n" \
  <<"\t"<<arg<<std::endl<<std::flush; \
}
macro for error handling Puts message in Debug mode to a destination and adds file+line for "click+jump" in Xemacs on Linux and Visual Studio on Windows.

  • The output s written to cerr
  • *AND* DebugConsole on WIN32
  • thus you can click and jump to code. In particular you can start main *and* WinMain applications in VS71 debugger and click directly in the "output window" to jump to code. No output is generated on Release compilation to maximize speed. The name of the temporary stringstream has to be unique due to the scope !!!
    Author:
    Jan Woetzel
Examples:
ExampleGLShared.cpp, ExampleImageLoad.cpp, ExampleImageMagickIO.cpp, ExampleIpl.cpp, mip2viff.cpp, and viff2mip.cpp.

Definition at line 144 of file Error.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::GenSynthMatches::_CheckParams(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::GenSynthMatches::_CreateMoving2DPoints(), BIAS::GenSynthMatches::_CreateMovingGT2DPoints(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::GenSynthMatches::_CreateStaticGT2DPoints(), BIAS::GenSynthMatches::_Draw(), BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIAS::Image< StorageType >::AbsDiff(), BIAS::CScommBase::AcceptConn_(), BIAS::XMLIO::addAttribute(), BIAS::CameraParam::AddCameraDataToRig(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::XMLIO::addContent(), BIAS::ThreeDOut::AddEllipsoid(), BIAS::Histogram::AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::Matrix< T >::AddIP(), BIAS::ThreeDOut::AddLine(), BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamEnum(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::AddParamVecDbl(), BIAS::Param::AddParamVecInt(), BIAS::ThreeDOut::AddPoint(), BIAS::BaseFactory< BaseClassType >::AddType(), BIAS::Histogram::AddWeightedHist(), BIAS::ProjectionParametersZoom::AddZoomStep(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageDraw< StorageType >::Arrow(), BIAS::UUID::AssignUUID_Global(), BIAS::VideoSource_DCAM::AutoMode(), BIAS::VideoSource::AutoMode(), BIAS::PMatrixBase::Backproject(), BIAS::PMatrix::BackprojectWorldCoo(), BIAS::Interpolator::Bezier3(), BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Matrix< T >::BinRead(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::Image< StorageType >::CalcScaleShift(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::PMatrix::CheckDecomposition_(), BIAS::AppData::CheckFormat(), BIAS::CondensHisto::CheckImageQuality(), BIAS::ColorHistogram< StorageType >::CheckImageQuality(), BIAS::PMatrix::CheckSVD_(), BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::PMatrix::Compose(), BIAS::JpegHandler::Compress(), BIAS::SVD3x3::Compute(), BIAS::FFT::Compute(), BIAS::UnVignette::Compute(), BIAS::RigParameter::Compute(), BIAS::PMatrixLinear::Compute(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::WrapBias2Ipl::Consistent(), BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::Vector2< T >::CoordEuclidianToPolar(), BIAS::Vector3< T >::CoordEuclidianToSphere(), BIAS::Vector2< T >::CoordPolarToEuclidian(), BIAS::Vector3< T >::CoordSphereToEuclidian(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::ROI::Corners2Mask(), BIAS::ROI::Corners2Vector(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::XMLIO::create(), create_JPEG_file(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::CScommServer::CreateListenThread_(), BIAS::GenSynthMatches::CreateMatches(), BIAS::GeometryGL::CreateSampleDisplayListScene(), BIAS::ColorHarris::CreateSTColor(), BIAS::CScommBase::CScommBase(), BIAS::BSplineCurve::CubicUniformBSpline(), BIAS::PMatrix::Decompose_(), BIAS::JpegHandler::Decompress(), deflate_JPEG_file(), demo(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiBase::DestroyWindow(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::CornerDetectorBase< StorageType >::Detect(), BIAS::HomgPoint2D::DeterminePosition(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::OpenGLCanvasBase::Display(), BIAS::WrapBias2Ipl::Display(), MyGLCanvas::DisplayCalls(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), DistanceFromRotation4Var(), BIAS::MatlabTBUndistortion::Distort(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), BIAS::Vector4< T >::Divide(), BIAS::Vector3< T >::Divide(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Divide(), BIAS::Matrix< T >::Divide(), BIAS::Vector4< T >::DivideIP(), BIAS::Projection::DoesPointProjectIntoImage(), BIAS::ProjectionParametersBase::DoesPointProjectIntoImageLocal(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), Draw(), BIAS::Histogram2D::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::Histogram2D::DrawLog(), BIAS::GuiEnhanced::DrawRectangle(), BIAS::EpipolarLine::DrawWhole(), BIAS::ImageConvert::DVToRGB_(), BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Parametrization::EMatrixToParams(), empty_output_buffer(), BIAS::SphericalUndistortion::EnforceNormalRange(), BIAS::ProjectionParametersSpherical::EnforceNormalRange_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::RANSAC< SolutionType >::EvaluateSolution(), BIAS::MSAC< SolutionType >::EvaluateSolution(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::MDcam::ExternalTrigger(), BIAS::FilenameSequence(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::Filter(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::FilterNTo3N< InputStorageType, OutputStorageType >::Filter(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Median< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::FilterNTo3N< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Median< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterInt(), BIAS::FilterNTo3N< InputStorageType, OutputStorageType >::FilterInt(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterInt(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Binomial< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), BIAS::VideoSource_DSHOW::FindCaptureDevice_(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleaved(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::BaseFactory< BaseClassType >::Generate(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::RANSAC< SolutionType >::GenerateSamplesEvenspace(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), Get_pStereoAPI(), BIAS::PMatrix::GetA(), BIAS::CameraParam::GetAspectratio(), BIAS::XMLIO::getAttributeValueBool(), BIAS::PMDImageIO::GetBitRep(), BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders(), BIAS::FFT2D< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Erosion< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Dilation< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Projection::GetC(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetChannelcount(), BIAS::ImageDraw< StorageType >::GetContrastValue(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageBase::GetCopyOfROI2(), BIAS::Projection::GetCov(), BIAS::Triangulation::GetCovariance(), BIAS::Triangulation::GetCovarianceAnalytic(), BIAS::TimeMeasure::GetCycleCount(), BIAS::FMatrixEstimation::GetDetPolynomial(), BIAS::CameraParam::GetDownsamplingFactor(), BIAS::ImageIO::GetExtension(), BIAS::Projection::GetExternals(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource::GetFeature(), BIAS::CameraParam::GetFocalLength(), BIAS::VideoSource::GetGain(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImgObjGL::GetGLPixelFormat(), BIAS::ImgObjGL::GetGLStorageType(), BIAS::Param::GetGroupName(), BIAS::PMatrix::GetH(), BIAS::CameraParam::GetHeight(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::GeometryGL::GetImgCorner3d(), BIAS::GeometryGL::GetInfoGL(), BIAS::VideoSource_DSHOW::GetInterfaces_(), BIAS::HMatrix::GetJacobian(), BIAS::PMatrix::GetK(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::SVD::GetLeftNullvector(), BIAS::HomgPlane3D::GetLineIntersection(), BIAS::UUID::GetLong(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), BIAS::BresenhamCircleSlow::GetNext(), BIAS::BresenhamCircleEighth::GetNext(), BIAS::BresenhamCircle::GetNext(), BIAS::Bresenham::GetNext(), BIAS::ParamGUI::GetNotebook(), BIAS::SVD::GetNullvector(), BIAS::ParamGUI::GetPanel(), BIAS::Param::GetParamBool(), BIAS::Param::GetParamDouble(), BIAS::Param::GetParamEnum(), BIAS::Param::GetParamInt(), BIAS::Param::GetParamString(), BIAS::Param::GetParamVecDbl(), BIAS::Param::GetParamVecInt(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemHom(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::Projection::GetPose(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), BIAS::Projection::GetQ(), BIAS::RMatrixBase::GetQuaternion(), BIAS::Projection::GetR(), BIAS::PMatrix::GetR(), BIAS::Quaternion< QUAT_TYPE >::GetRotationMatrix(), BIAS::CovMatrix3x3::GetS(), BIAS::MSAC< SolutionType >::GetSampleSolution(), BIAS::RANSAC< SolutionType >::GetSampleSolutions(), BIAS::VideoSource::GetShutter(), BIAS::ImageBase::GetSize(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::Conic2D::GetTangentPoints(), BIAS::UUID::GetUUIDCreationTime(), BIAS::PMatrix::GetV(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::GetZoom(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DiskPMD::GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource::GrabSingle(), BIAS::HaveImagesMatchingROI(), BIAS::PMDImageProc::HFromMeta_(), BIAS::HomgPoint3D::HomgPoint3D(), BIAS::HomgPoint3DCov::HomgPoint3DCov(), BIAS::ImageConvert::HSLToGrey_(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::Image< StorageType >::Image(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportRADIANCE(), BIAS::ImageIO::ImportRAWwithHeader(), BIAS::ImageIO::ImportReal32(), BIAS::VideoServer::Init(), BIAS::Condensation::Init(), BIAS::FFT::Init(), BIAS::SphericalUndistortion::Init(), BIAS::PyramidImage< StorageType >::Init(), BIAS::MatlabTBUndistortion::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::JpegHandler::Init(), BIAS::ScanLine2::Init(), BIAS::ScanLine::Init(), BIAS::ImageBase::Init(), BIAS::GuiWX::Init_(), BIAS::VideoSource_DCAM::InitCam(), BIAS::BSplineCurve::InitCubicUniformBSpline(), BIAS::ImageIO::InitDevIL(), BIAS::DrawTextGL::InitFont(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource::InitImage(), BIAS::BSplineCurve::InitQuadraticUniformBSpline(), BIAS::VideoSource_DSHOW::InitVideoCapture_(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::EpipolarLine::Interpolate_(), BIAS::Triangulation::Intersect(), BIAS::EightWaySymmetry< T >::InverseTransform(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix2x2< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), BIAS::ImageConvert::IP_YUV422ToGrey_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::Contour::IsFg(), BIAS::Matrix< T >::IsIdentity(), BIAS::ROI::IsInROI(), BIAS::HomgPoint2D::IsInROIHomogenized(), BIAS::FMatrix::IsValid(), BIAS::Matrix< T >::IsZero(), BIAS::CameraParam::IsZoomCamera(), BIAS::Label::Label4Neighbour_(), Lapack_LLS_QR_linear_solve(), Lapack_WLLS_solve(), BIAS::LeadingZeroString(), BIAS::UnVignette::LeastSquares_(), BIAS::LevenbergMarquardt(), BIAS::LevenbergMarquardtExtended(), BIAS::ImageDraw< StorageType >::Line(), BIAS::ImageDraw< StorageType >::LineGrey(), BIAS::listenthread(), BIAS::Pose::Load(), BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), LoadImage(), MainFrame::LoadImageFromList(), MainFrame::LoadImages(), MyFrame::LoadImages(), MainFrame::LoadImagesAndCalculate(), BIAS::LogCommandLine(), BIAS::TimeMeasure::LogToFileAndReset(), main(), mainloop(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), BIAS::ROI::Mask2Corners(), BIAS::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), MatrixSqrt(), BIAS::CameraViewController::MotionTrackballRotation(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::CameraViewController::MoveToCenter(), BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), MyFrame::MyFrame(), MyPowellFunc(), BIAS::PMatrix::newsize(), BIAS::Tensor3D3x3x3< T >::newsize(), BIAS::Tensor3D3x3x3< T >::NewSize(), BIAS::Matrix4x4< T >::newsize(), BIAS::Matrix3x4< T >::newsize(), BIAS::Matrix3x3< T >::newsize(), BIAS::Matrix2x2< T >::newsize(), BIAS::PMatrixBase::newsize(), BIAS::Vector3< T >::Normalize(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::OpenGLCanvasBase::OnChar(), BIAS::ParamGUIPanel::OnCheckBox(), BIAS::ParamGUIPanel::OnChoice(), BIAS::VideoSource::OnePushAuto(), BIAS::ZoomImageCanvas::OnKey(), BIAS::ZoomImageCanvas::OnLeftMouse(), BIAS::ImageCanvasEnhanced::OnLeftMouseButton(), BIAS::ParamGUIPanel::OnSpinCtrl(), BIAS::ParamGUIPanel::OnTextEnter(), BIAS::VideoStream::Open(), BIAS::VideoSource_uEye::OpenCamera_(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Stereo::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DiskPMD::OpenDevice(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::ThreeDOut::OpenGLOutEllipsoids(), BIAS::ThreeDOut::OpenGLOutPoints(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), BIAS::Image< StorageType >::operator *(), BIAS::Vector3< T >::operator+(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Vector4< T >::operator/(), BIAS::Image< StorageType >::operator/(), BIAS::Vector4< T >::operator/=(), BIAS::Image< StorageType >::operator/=(), BIAS::operator<<(), BIAS::CScommBase::operator=(), BIAS::VideoStream::operator=(), BIAS::PyramidImage< StorageType >::operator=(), BIAS::ProjectionParametersZoom::operator=(), BIAS::ProjectionParametersProjective::operator=(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), BIAS::Image< StorageType >::operator=(), BIAS::RedirectStreams::operator=(), BIAS::Vector3< T >::operator>>(), BIAS::operator>>(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::Triangulation::Optimal(), BIAS::HMatrixEstimation::Optimize(), BIAS::FMatrixEstimation::Optimize(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::ImageBase::PadToPowerOfTwoAndFlip(), BIAS::RegionMatcher::ParabolaNCC(), BIAS::RegionMatcher::ParabolaNCC5(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::Parametrization::ParamsToEMatrix(), BIAS::Param::ParseListFile(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::PixelValueBase(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), MIP::VideoSource_DV::PreGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::DrawTextGL::PrintNormCoords(), BIAS::VideoServer::ProcessOneImage(), BIAS::Projection::Project(), BIAS::SphericalUndistortion::ProjectCoord(), BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage(), BIAS::BSplineCurve::QuadraticUniformBSpline(), BIAS::Random::ran1c_(), BIAS::Random::ran2_(), BIAS::PMDImageProc::Read(), BIAS::PMDImageIO::Read(), BIAS::XMLIO::read(), BIAS::PMDImageIO::Read2DImage16Bit_(), BIAS::PMDImageIO::Read2DImage8Bit_(), BIAS::ROI::ReadBinary(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::PMDImageIO::ReadDepthImage_(), readFile(), BIAS::JpegHandler::ReadJPEG(), BIAS::ImageAttributes::ReadMagickPP(), BIAS::PMDImageIO::ReadMetaData_(), BIAS::PMDImageIO::ReadModCoeffImage_(), BIAS::RigParameter::ReadRigData(), BIAS::ProjectionParametersIO::ReadRigData(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::CScommBase::receiveThread_(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ICECallbackInterface::RectangleSelected(), BIAS::GuiGTK::Redraw_(), BIAS::RANSAC< SolutionType >::RefineSolution(), BIAS::MSAC< SolutionType >::RefineSolution(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::ImageBase::Release(), BIAS::MDcam::ReleaseCameras(), BIAS::ProjectionParametersZoom::Rescale(), BIAS::ProjectionParametersProjective::Rescale(), BIAS::ProjectionParametersBase::Rescale(), BIAS::TimeMeasure::Reset(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::MDcam::ScanBus(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::CScommBase::SendMsg(), BIAS::Vector3< T >::Set(), BIAS::RMatrixBase::Set(), BIAS::HomgPoint2D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::ProjectionParametersProjective::SetC(), BIAS::Projection::SetC(), BIAS::VideoSource_DCAM::SetCameraID(), BIAS::Histogram::SetColor(), BIAS::VideoSource_Disk::SetColorMode(), BIAS::Histogram2D::SetColorModel(), BIAS::Histogram::SetColorModel(), BIAS::XMLIO::SetCompression(), BIAS::XMLIO::setContent(), BIAS::ROI::SetCorners(), BIAS::Projection::SetCov(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::VideoSource::SetDirectToDisk(), BIAS::Param::SetEnhancedFlag(), BIAS::VideoSource_DCAM::SetFeature(), BIAS::VideoSource::SetFeature(), BIAS::MatlabTBUndistortion::SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::ParamTypeEnum::SetFromString(), BIAS::ParamTypeDouble::SetFromString(), BIAS::ParamTypeInt::SetFromString(), BIAS::UUID::SetFromString(), BIAS::VideoSource::SetGain(), BIAS::VideoSource_DiskPMD::SetGenerateNewUIDs(), BIAS::Param::SetHiddenFlag(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::ScaledImageCanvas::SetOffset(), BIAS::Param::SetParamBool(), BIAS::Param::SetParamDouble(), BIAS::Param::SetParamEnum(), BIAS::Param::SetParameterWriteToFile(), BIAS::Param::SetParamInt(), BIAS::Param::SetParamString(), BIAS::Param::SetParamVecDbl(), BIAS::Param::SetParamVecInt(), BIAS::Projection::SetPose(), BIAS::ProjectionParametersProjective::SetR(), BIAS::CoordinateTransform3D::SetR(), BIAS::CameraParam::SetRadius(), BIAS::ScaledImageCanvas::SetScale(), BIAS::VideoSource_DCAM::SetShutter(), BIAS::VideoSource::SetShutter(), BIAS::OpenGLCanvasBase::SetStatusText(), BIAS::TimeMeasure::SetTimerFile(), BIAS::ProjectionParametersSpherical::SetUndistortion(), BIAS::MatlabTBUndistortion::SetUnzoomed(), BIAS::CameraParam::SetUnzoomed(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SetupLutPxPySphere1(), BIAS::SphericalUndistortion::SetupLutPxPySphere2(), BIAS::SphericalUndistortion::SetupProjectionLUT(), BIAS::MatlabTBUndistortion::SetupProjectionLUT(), BIAS::SettingsGL::SetVSyncInterval(), BIAS::VideoSource_DCAM::SetWhiteBalance(), BIAS::VideoSource::SetWhiteBalance(), BIAS::MatlabTBUndistortion::SetZoom(), BIAS::CameraParam::SetZoom(), BIAS::FMatrixEstimation::SevenPoint(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::GuiBase::ShowConvertedImage_(), showhistogram(), BIAS::GuiBase::ShowImage(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresBase::Solve(), BIAS::GaussHelmert::Solve(), BIAS::RANSAC< SolutionType >::SolveMaster(), BIAS::MSAC< SolutionType >::SolveMaster(), BIAS::Interpolator::Spline(), BIAS::VideoStream::SplitIntoFiles(), BIAS::TimeMeasure::Start(), BIAS::VideoSource_DCAM::StartIso(), BIAS::ImageBase::StealImage(), BIAS::OpenGLCanvasBase::StereoI_CaptureStereoImage(), BIAS::OpenGLCanvasBase::StereoI_GetConvergence(), BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::StereoI_GetSeparation(), BIAS::OpenGLCanvasBase::StereoI_GetStereoState(), BIAS::OpenGLCanvasBase::StereoI_Init(), BIAS::OpenGLCanvasBase::StereoI_SetConvergence(), BIAS::OpenGLCanvasBase::StereoI_SetSeparation(), BIAS::OpenGLCanvasBase::StereoI_SetStereoState(), BIAS::TimeMeasure::Stop(), BIAS::VideoSource_V4L::StopGrabContinous(), BIAS::VideoSource_DCAM::StopIso(), BIAS::Matrix< T >::SubIP(), BIAS::CScommBase::syncReceive_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToInterleavedYUYV422_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::TrackerBase< StorageType >::Track(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), BIAS::EightWaySymmetry< T >::Transform(), BIAS::PoseParametrization::Transform(), BIAS::Triangulation::Triangulate2D(), BIAS::MatlabTBUndistortion::Undistort(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage(), BIAS::ProjectionParametersProjective::UnProjectLocal(), BIAS::Projection::UnProjectToCovLocal(), BIAS::Projection::UnProjectToPoint(), BIAS::ProjectionParametersBase::UnProjectToPointLocal(), BIAS::Projection::UnProjectToPointLocal(), BIAS::Projection::UnProjectToRay(), BIAS::Projection::UnProjectToRayLocal(), BIAS::ColorHistogram< StorageType >::Update(), BIAS::ThreeDOut::UpdateEllipsoid(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ThreeDOut::UpdateLine(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass(), BIAS::ThreeDOut::UpdatePoint(), BIAS::ScaledImageCanvas::UpdateScaleOffset(), BIAS::ImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::ImageCanvasGLBase::ValidTexobj(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), BIAS::ROI::Vector2Mask(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), MIP::VideoSource_DV::VideoSource_DV_Internal_Init_(), BIAS::ProjectionParametersSpherical::ViewDifference(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::ViewDifference(), BIAS::CScommBase::WaitForNewMessage(), BIAS::LeastSquaresSVD::WeightedSolve(), BIAS::LeastSquaresLapack::WeightedSolve(), BIAS::LeastSquaresBase::WeightedSolve(), BIAS::WrapBias2Ipl::WrapBias2Ipl(), BIAS::PMDImageProc::Write(), BIAS::PMDImageIO::Write(), BIAS::XMLIO::write(), BIAS::Histogram::WriteASCII(), BIAS::DC_GPS::WriteBinary(), BIAS::DC_inertial::WriteBinary(), BIAS::DC_ptu::WriteBinary(), BIAS::CameraParam::WriteCameraData(), BIAS::VideoSource::WriteDirect_(), BIAS::PyramidImage< StorageType >::WriteImages(), BIAS::JpegHandler::WriteJPEG(), WritePyImage(), BIAS::Tracker< StorageType, CalculationType >::WriteTrackLog_(), BIAS::ImageIO::WriteUnbuffered(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::ProjectionParametersPerspective::XMLIn(), BIAS::ProjectionParametersBase::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::PMatrix::XMLOut(), BIAS::XMLBase::XMLRead(), BIAS::XMLBase::XMLReadFromString(), and BIAS::ImageConvert::YUV422ToGrey_().

#define BIASEXIT ( mesg )

Value:

{ \
  std::cerr<<std::flush<<std::endl<<"exit request in "<<__FILE__<<","<<__LINE__<<" : "<<std::endl<<mesg<<std::endl; \
  exit(EXIT_FAILURE); \
}
macro to be used instead of exit() Jan Woetzel

Definition at line 296 of file Error.hh.

Referenced by BIAS::FFT::Compute(), BIAS::Vector3< T >::CoordSphereToEuclidian(), BIAS::Projection::GetQ(), BIAS::FFT::Init(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init().

#define BIASNEW | ( | arg1,
 |  | arg2 | ) | try {arg1= new arg2;} catch (std::bad_alloc){ BIASERR("new failed");};

macro around new catching exceptions

Definition at line 196 of file Error.hh.

#define BIASWARN ( arg )

Value:

{ \
  ERROR_STREAM<<std::flush<<"Warning in "<<__FILE__<<":"<<__LINE__<<" :\n\t" \
  <<"\t"<<arg<<std::endl<<std::flush; \
}

Definition at line 149 of file Error.hh.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), deflate_JPEG_file(), BIAS::RMatrix::GetAverageRMatrix(), BIAS::ImageBase::GetChannelcount(), BIAS::ImgObjGL::GetGLPixelFormat(), BIAS::ImageIO::ImportOpenEXR(), BIAS::OpenGLCanvas::OnMouseWheel(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), and BIAS::SetThreadName().

#define BIASWARNONCE ( arg )

Value:

{ \
  static bool _oncerun_BIASWARNONCE_localscope_=false;\
  if (!_oncerun_BIASWARNONCE_localscope_) { \
    ERROR_STREAM<<std::flush<<"Warning once in "<<__FILE__<<":"<<__LINE__<<" :\n\t" \
    <<"\t"<<arg<<std::endl<<std::flush; \
    _oncerun_BIASWARNONCE_localscope_ = true;\
  }\
}
Issue a warning only once and only in debug mode at runtime.

Avoids flooding with warning noise. Particularly useful to issue a runtime warning in an inner loop.

Author:
Jan Woetzel

Definition at line 179 of file Error.hh.

#define CALLINFO {std::cout<<"called "<<__FILE__<<", "<<__LINE__<<": "<<FUNCNAME<<std::endl<<std::flush;}

verbose writing calling information to screen in Debug mode.

Typical usage:

void MyClass::MyFunction(...)
{
  CALLINFO; ...
}
Author:
Jan Woetzel

Definition at line 313 of file Error.hh.

Referenced by BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportRAWwithHeader(), BIAS::ImageIO::ImportReal32(), MyFrame::LoadImages(), and BIAS::ImageIO::WriteUnbuffered().

#define ERROR_STREAM std::cerr

exit, abort, EXIT_FAILURE,

(Jan Woetzel 2005/09/06)

  • THROW, THROW_LIST
  • DEF_EXCEPTIONS
  • BIAS_CHECK_NAN

Definition at line 68 of file Error.hh.

#define FUNCNAME __PRETTY_FUNCTION__

macro to display the complete function name a line of code belongs to.

See MSDN or g++ docu for details. Works with g++ 3.3 and MS Visual Studo 7.1

Author:
Jan Woetzel
Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 81 of file Error.hh.

Referenced by MyFrame::LoadImages(), MyFrame::OnAbout(), and BIAS::OpenGLCanvasBase::ScreenShot().

Generated on Wed Jun 21 19:02:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Exception.hh File Reference

Base » Debug

Exception.hh File Reference

#include <exception>
#include <sstream>
#include <iostream>

Include dependency graph for Exception.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::BaseException
generic exception More...

Defines

#define | BEXCEPTION(arg)
macro throwing a BaseException using stream as argument, i.e.

Define Documentation

#define BEXCEPTION ( arg )

Value:

{ \
    std::ostringstream os;\
    os << __FILE__ << ":" << __LINE__ <<" : "<< arg;\
    throw BIAS::BaseException(os.str().c_str());\
  }
macro throwing a BaseException using stream as argument, i.e.

BEXCEPTION("variable 'a' has content "<<a)

Definition at line 19 of file Exception.hh.

Referenced by BIAS::BaseFactory< BaseClassType >::AddType(), BIAS::StereoRedGreen::Combine(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::HomgPoint3DCov::GetEuclidean(), BIAS::HomgPoint2DCov::GetEuclidean(), BIAS::HomgPoint2DCov::HomgPoint2DCov(), BIAS::ImageConvertThreaded::MergeImage_(), MyFrame::OnAutoExposure(), MyFrame::OnGain(), MyFrame::OnShutter(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::PlueckerMatrix::PlueckerMatrix(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrization::SetCQ(), BIAS::HomgPoint2DCov::SetEuclidean(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), and BIAS::PoseParametrizationCovariance::Transform().

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/LogFacility.cpp File Reference

Base » Debug

LogFacility.cpp File Reference

#include "LogFacility.hh"

Include dependency graph for LogFacility.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/LogFacility.hh File Reference

Base » Debug

LogFacility.hh File Reference

#include <bias_config.h>
#include <iostream>
#include <fstream>

Include dependency graph for LogFacility.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::LogFacility

Defines

#define | BIASLOG(x, y)
#define | BIASLOGALWAYS(y)
#define | BLD(y) BIASLOG(BIAS::BIAS_LOG_DEBUG, y)
#define | BLF(y) BIASLOG(BIAS::BIAS_LOG_FATAL, y)
#define | BLI(y) BIASLOG(BIAS::BIAS_LOG_INFO, y)
#define | BLW(y) BIASLOG(BIAS::BIAS_LOG_WARNING, y)

Enumerations

enum BIAS::BIAS_LOG_LEVEL {
BIAS::BIAS_LOG_NONE = 0, BIAS::BIAS_LOG_FATAL, BIAS::BIAS_LOG_WARNING, BIAS::BIAS_LOG_INFO,
BIAS::BIAS_LOG_DEBUG
}

Define Documentation

#define BIASLOG | ( | x,
 |  | y | )

Value:

{\
  std::ostream _cods_(std::cout.rdbuf()); \
  BIAS::LogFacility::Instance()->GetLogStream(_cods_); \
  if(x<=BIAS::LogFacility::Instance()->GetLogLevel() && _cods_.good()) {  \
  if(BIAS::LogFacility::Instance()->GetShowCodeInfo()) \
  _cods_<<__FILE__<<", "<< __LINE__ << " : ";\
  _cods_<<y<<std::endl;   \
  }\
  if( BIAS::LogFacility::Instance()->GetAbortOnFatal() && x==BIAS::BIAS_LOG_FATAL){ \
  _cods_<<"Aborting in "<<__FILE__<<", "<<__LINE__<<endl;\
  abort();}\
}
Todo:
it is bad style to disable a warning in a header because of the side effects- but it is hard to avoid in a macro... implement BIAS_LOG_FATALwith one parameter in addition to BIAS_LOG(msg, BIAS_LOG_FATAL) (jw)

Definition at line 66 of file LogFacility.hh.

Referenced by main().

#define BIASLOGALWAYS ( y )

Value:

{\
  std::ostream _cods_(std::cout.rdbuf()); \
  this->GetLogStream(_cods_); \
  if(x<=this->dLogLevel_ && _cods_.good()) {  \
  _cods_<<y<<std::endl; _cods_.flush();\
  }\
}

Definition at line 80 of file LogFacility.hh.

#define BLD ( y ) BIASLOG(BIAS::BIAS_LOG_DEBUG, y)

Definition at line 95 of file LogFacility.hh.

Referenced by main().

#define BLF ( y ) BIASLOG(BIAS::BIAS_LOG_FATAL, y)

Definition at line 98 of file LogFacility.hh.

Referenced by main().

#define BLI ( y ) BIASLOG(BIAS::BIAS_LOG_INFO, y)

Definition at line 96 of file LogFacility.hh.

Referenced by main().

#define BLW ( y ) BIASLOG(BIAS::BIAS_LOG_WARNING, y)

Definition at line 97 of file LogFacility.hh.

Referenced by main().

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/RedirectStreams.hh File Reference

Base » Debug

RedirectStreams.hh File Reference

#include "bias_config.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for RedirectStreams.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RedirectStreams
used to redirect stdout and stderr into files or to silence them More...

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ThreadNaming.cpp File Reference

Base » Debug

ThreadNaming.cpp File Reference

#include "ThreadNaming.hh"
#include <Base/Debug/Error.hh>
#include <iostream>
#include <windows.h>

Include dependency graph for ThreadNaming.cpp:

Go to the source code of this file.

Classes

struct | tagTHREADNAME_INFO

Defines

#define | MS_VC_EXCEPTION 0x406d1388
author Jan Woetzel, 2005

Typedefs

typedef tagTHREADNAME_INFO | THREADNAME_INFO

Functions

void | BIAS::SetThreadName (const unsigned long dwThreadID, const char *szThreadName)

Define Documentation

#define MS_VC_EXCEPTION 0x406d1388

author Jan Woetzel, 2005

Definition at line 13 of file ThreadNaming.cpp.

Typedef Documentation

typedef struct tagTHREADNAME_INFO THREADNAME_INFO

Generated on Wed Jun 21 19:02:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ThreadNaming.hh File Reference

Base » Debug

ThreadNaming.hh File Reference

utility function to assign "names" to threads, actually WIN32 only. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

utility function to assign "names" to threads, actually WIN32 only.

Very useful for debugging multiple threads.

code inspired by http://www.highprogrammer.com/alan/windev/visualstudio.html

Author:
Jan Woetzel.

Definition in file ThreadNaming.hh.

Generated on Wed Jun 21 19:02:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasure.cpp File Reference

Base » Debug

TimeMeasure.cpp File Reference

#include "TimeMeasure.hh"

Include dependency graph for TimeMeasure.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasure.hh File Reference

Base » Debug

TimeMeasure.hh File Reference

#include <sys/time.h>
#include <sys/times.h>
#include <unistd.h>
#include <fstream>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <string>
#include <iostream>
#include "Debug.hh"
#include "Error.hh"

Include dependency graph for TimeMeasure.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TimeMeasure
class TimeMeasure contains functions for timing real time and cpu (kernel) time. More...

Generated on Wed Jun 21 19:02:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasurement.hh File Reference

Base » Debug

TimeMeasurement.hh File Reference

Time measurement based on instance construction and destruction. More...

#include <bias_config.h>
#include <string>
#include <iostream>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for TimeMeasurement.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TimeMeasurement

Detailed Description

Time measurement based on instance construction and destruction.

Usage:

:
// -- previous other code ...
{
  // -- more previous other code ...
  // construct an instance as "Start" function:
  BIAS::TimeMeasurement timerInstance;
  // >> code to be timed here, e.g.:
  Sleep(1000);
  // <<
} // Stop by automatic destruction of instance
  // due to end of scope at closing bracket
// -- later other code -- ...
Author:
Jan Woetzel

Definition in file TimeMeasurement.hh.

Generated on Wed Jun 21 19:02:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/DebugMyMain.cpp File Reference

Base » Debug » Examples

DebugMyMain.cpp File Reference

#include "MyDebug.hh"
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include <fstream>

Include dependency graph for DebugMyMain.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 36 of file DebugMyMain.cpp.

References BIASERR, EXAMPLEDEBUG_TESTFLAG, EXAMPLEDEBUG_TESTFLAG2, BIAS::ExampleDebug::func(), BIAS::Debug::GetDebugLevel(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::Debug::SetDebugLevel(), BIAS::Debug::SetDebugStream(), and BIAS::Debug::SetGlobalDebugLevel().

Generated on Wed Jun 21 19:02:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleConstraints.cpp File Reference

Base » Debug » Examples

ExampleConstraints.cpp File Reference

#include <Base/Debug/Constraints.hh>

Include dependency graph for ExampleConstraints.cpp:

Go to the source code of this file.

Classes

class | Base
class | FromBase
class | MyTemplate< T >
class | NonBase

Functions

int | main ()

Function Documentation

int main ( )

Definition at line 56 of file ExampleConstraints.cpp.

Generated on Wed Jun 21 19:02:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleCopy.cpp File Reference

Base » Debug » Examples

ExampleCopy.cpp File Reference

#include <iostream>
#include <Base/Debug/Debug.hh>

Include dependency graph for ExampleCopy.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 33 of file ExampleCopy.cpp.

References BIAS::Debug::GetDebugLevel(), and BIAS::Debug::SetDebugLevel().

Generated on Wed Jun 21 19:02:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleLogFacility.cpp File Reference

Base » Debug » Examples

ExampleLogFacility.cpp File Reference

#include <stdlib.h>
#include <Base/Debug/LogFacility.hh>

Include dependency graph for ExampleLogFacility.cpp:

Go to the source code of this file.

Classes

class | MyTestClass

Functions

int | main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 19 of file ExampleLogFacility.cpp.

References BIAS::BIAS_LOG_DEBUG, BIASLOG, BLD, BLF, BLI, and BLW.

Generated on Wed Jun 21 19:02:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleTimeMeasureCycle.cpp File Reference

Base » Debug » Examples

ExampleTimeMeasureCycle.cpp File Reference

#include <limits.h>
#include <iostream>
#include <cmath>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleTimeMeasureCycle.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 40 of file ExampleTimeMeasureCycle.cpp.

References BIAS::TimeMeasure::Print(), BIAS::TimeMeasure::PrintCycleCount(), BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:02:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/MyDebug.cpp File Reference

Base » Debug » Examples

MyDebug.cpp File Reference

#include "MyDebug.hh"

Include dependency graph for MyDebug.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/MyDebug.hh File Reference

Base » Debug » Examples

MyDebug.hh File Reference

#include <Base/Debug/Debug.hh>

Include dependency graph for MyDebug.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ExampleDebug

Defines

#define | EXAMPLEDEBUG_TESTFLAG 0x0001
#define | EXAMPLEDEBUG_TESTFLAG2 0x0002

Define Documentation

#define EXAMPLEDEBUG_TESTFLAG 0x0001

Definition at line 30 of file MyDebug.hh.

Referenced by BIAS::ExampleDebug::func(), main(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

#define EXAMPLEDEBUG_TESTFLAG2 0x0002

Definition at line 31 of file MyDebug.hh.

Referenced by BIAS::ExampleDebug::func(), main(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Generated on Wed Jun 21 19:02:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/AffineTransf.cpp File Reference

Base » Geometry

AffineTransf.cpp File Reference

#include "AffineTransf.hh"

Include dependency graph for AffineTransf.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/AffineTransf.hh File Reference

Base » Geometry

AffineTransf.hh File Reference

#include "bias_config.h"
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Matrix3x3.hh>
#include "HomgPoint3D.hh"
#include "RMatrixBase.hh"

Include dependency graph for AffineTransf.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::AffineTransf
last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g. More...

Generated on Wed Jun 21 19:02:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EMatrixBase.cpp File Reference

Base » Geometry

EMatrixBase.cpp File Reference

#include "EMatrixBase.hh"

Include dependency graph for EMatrixBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EMatrixBase.hh File Reference

Base » Geometry

EMatrixBase.hh File Reference

#include <Base/Math/Matrix3x3.hh>
#include "RMatrixBase.hh"
#include "HomgLine2D.hh"

Include dependency graph for EMatrixBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EMatrixBase
describes the epipolar relationship between two images whith known internal camera calibration. More...

Defines

#define | EMATRIX_TYPE double

Define Documentation

#define EMATRIX_TYPE double

Definition at line 32 of file EMatrixBase.hh.

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EuclideanTransf3D.cpp File Reference

Base » Geometry

EuclideanTransf3D.cpp File Reference

#include "EuclideanTransf3D.hh"

Include dependency graph for EuclideanTransf3D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EuclideanTransf3D.hh File Reference

Base » Geometry

EuclideanTransf3D.hh File Reference

#include "Base/Math/Matrix4x4.hh"
#include "Base/Math/Vector3.hh"
#include "Base/Geometry/RMatrixBase.hh"

Include dependency graph for EuclideanTransf3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EuclideanTransf3D
Euclidean transformation for 3D points. More...

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/FMatrixBase.cpp File Reference

Base » Geometry

FMatrixBase.cpp File Reference

#include "FMatrixBase.hh"
#include "HomgPoint3D.hh"
#include "PMatrixBase.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for FMatrixBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/FMatrixBase.hh File Reference

Base » Geometry

FMatrixBase.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Vector3.hh>
#include "RMatrixBase.hh"
#include "KMatrix.hh"
#include "HomgPoint2D.hh"
#include "HomgLine2D.hh"

Include dependency graph for FMatrixBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FMatrixBase
describes the epipolar relationship between a point and his mapping on a corresponding epipolar line. More...

Defines

#define | FMATRIX_TYPE double

Define Documentation

#define FMATRIX_TYPE double

Definition at line 42 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::epipolarconstraintRemainder(), and BIAS::FMatrixBase::GetEpipolarLineImage1().

Generated on Wed Jun 21 19:02:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HMatrixBase.cpp File Reference

Base » Geometry

HMatrixBase.cpp File Reference

#include "HMatrixBase.hh"

Include dependency graph for HMatrixBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HMatrixBase.hh File Reference

Base » Geometry

HMatrixBase.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix3x3.hh>
#include "HomgPoint2D.hh"

Include dependency graph for HMatrixBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HMatrixBase
describes a homography More...

Defines

#define | D_HM_COMP 0x0001
#define | HMATRIX_TYPE double

Define Documentation

#define D_HM_COMP 0x0001

Definition at line 39 of file HMatrixBase.hh.

#define HMATRIX_TYPE double

Definition at line 37 of file HMatrixBase.hh.

Generated on Wed Jun 21 19:02:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine2D.cpp File Reference

Base » Geometry

HomgLine2D.cpp File Reference

#include "HomgLine2D.hh"

Include dependency graph for HomgLine2D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine2D.hh File Reference

Base » Geometry

HomgLine2D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector3.hh>
#include "HomgPoint2D.hh"

Include dependency graph for HomgLine2D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgLine2D

Defines

#define | HOMGLINE2D_EPS 1E-12
#define | HOMGLINE2D_TYPE double

Define Documentation

#define HOMGLINE2D_EPS 1E-12

Definition at line 39 of file HomgLine2D.hh.

Referenced by BIAS::HomgLine2D::DistanceSquared(), BIAS::HomgLine2D::GetIntersectionsWithImage(), and BIAS::HomgLine2D::Set().

#define HOMGLINE2D_TYPE double

Definition at line 37 of file HomgLine2D.hh.

Referenced by BIAS::HomgLine2D::DistanceSquared(), and BIAS::HomgLine2D::Homogenize().

Generated on Wed Jun 21 19:02:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine3D.hh File Reference

Base » Geometry

HomgLine3D.hh File Reference

#include "bias_config.h"
#include "HomgPoint3D.hh"

Include dependency graph for HomgLine3D.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgLine3D
a homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and a starting point PointFin_ (which is the closest vector from the coordinate origin to the line if the line is not homogenized, it can bve described by any two points More...

Defines

#define | HOMGLINE3D_EPS 1e-12
#define | HOMGLINE3D_TYPE double

Define Documentation

#define HOMGLINE3D_EPS 1e-12

Definition at line 33 of file HomgLine3D.hh.

#define HOMGLINE3D_TYPE double

Definition at line 32 of file HomgLine3D.hh.

Generated on Wed Jun 21 19:02:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPlane3D.cpp File Reference

Base » Geometry

HomgPlane3D.cpp File Reference

#include "HomgPlane3D.hh"

Include dependency graph for HomgPlane3D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPlane3D.hh File Reference

Base » Geometry

HomgPlane3D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Matrix3x3.hh>
#include "HomgPoint3D.hh"

Include dependency graph for HomgPlane3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPlane3D
A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0. More...

Defines

#define | HOMGPLANE3D_EPS 1E-12
#define | HOMGPLANE3D_TYPE double

Define Documentation

#define HOMGPLANE3D_EPS 1E-12

Definition at line 39 of file HomgPlane3D.hh.

Referenced by BIAS::HomgPlane3D::GetLineIntersection().

#define HOMGPLANE3D_TYPE double

Definition at line 37 of file HomgPlane3D.hh.

Referenced by BIAS::HomgPlane3D::DistanceSquared(), and BIAS::HomgPlane3D::GetNormalVector().

Generated on Wed Jun 21 19:02:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint1D.cpp File Reference

Base » Geometry

HomgPoint1D.cpp File Reference

#include "HomgPoint1D.hh"

Include dependency graph for HomgPoint1D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint1D.hh File Reference

Base » Geometry

HomgPoint1D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector2.hh>

Include dependency graph for HomgPoint1D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPoint1D
class HomgPoint1D describes a point with 2 degrees of freedom in projective coordinates. More...

Defines

#define | HOMGPOINT1D_TYPE double
#define | HOMGPOINT1D_TYPE_EPS 1E-12

Define Documentation

#define HOMGPOINT1D_TYPE double

Definition at line 36 of file HomgPoint1D.hh.

#define HOMGPOINT1D_TYPE_EPS 1E-12

Definition at line 38 of file HomgPoint1D.hh.

Referenced by BIAS::HomgPoint1D::GetEuclidian(), and BIAS::HomgPoint1D::Homogenize().

Generated on Wed Jun 21 19:02:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2D.cpp File Reference

Base » Geometry

HomgPoint2D.cpp File Reference

#include "HomgPoint2D.hh"
#include <float.h>
#include <Base/Math/Matrix3x3.hh>

Include dependency graph for HomgPoint2D.cpp:

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, const enum HomgPoint2D::EPosition pos)

Function Documentation

ostream& operator<< | ( | ostream & | os,
 |  | const enum HomgPoint2D::EPosition | pos
 | ) |

Definition at line 33 of file HomgPoint2D.cpp.

References cov, HOMGPOINT2D_TYPE, HOMGPOINT2D_TYPE_EPS, BIAS::MatrixZero, and BIAS::Matrix3x3< T >::Transpose().

Generated on Wed Jun 21 19:02:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2D.hh File Reference

Base » Geometry

HomgPoint2D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Matrix3x3.hh>
#include <cmath>

Include dependency graph for HomgPoint2D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPoint2D
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates. More...

Defines

#define | HOMGPOINT2D_TYPE double
#define | HOMGPOINT2D_TYPE_EPS 1E-12

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const enum HomgPoint2D::EPosition pos)

Define Documentation

#define HOMGPOINT2D_TYPE double

Definition at line 45 of file HomgPoint2D.hh.

Referenced by BIAS::HomgPoint2D::Homogenize(), main(), BIAS::HomgPoint2D::operator!=(), and operator<<().

#define HOMGPOINT2D_TYPE_EPS 1E-12

Definition at line 47 of file HomgPoint2D.hh.

Referenced by BIAS::HomgPoint2D::GetEuclidianX(), BIAS::HomgPoint2D::GetEuclidianY(), BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint2D::IsAtInfinity(), BIAS::HomgPoint2D::IsHomogenized(), and operator<<().

Generated on Wed Jun 21 19:02:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2DCov.cpp File Reference

Base » Geometry

HomgPoint2DCov.cpp File Reference

#include "HomgPoint2DCov.hh"
#include "HomgPoint2D.hh"
#include <Base/Math/Matrix2x2.hh>
#include <Base/Debug/Exception.hh>

Include dependency graph for HomgPoint2DCov.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2DCov.hh File Reference

Base » Geometry

HomgPoint2DCov.hh File Reference

#include <Base/Math/Matrix3x3.hh>
#include <Base/Common/CompareFloatingPoint.hh>

Include dependency graph for HomgPoint2DCov.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPoint2DCov
class representing the covariance matrix of a homogenous point 2D More...

Generated on Wed Jun 21 19:02:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3D.cpp File Reference

Base » Geometry

HomgPoint3D.cpp File Reference

#include "HomgPoint3D.hh"

Include dependency graph for HomgPoint3D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3D.hh File Reference

Base » Geometry

HomgPoint3D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Vector3.hh>

Include dependency graph for HomgPoint3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPoint3D
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates. More...

Defines

#define | HOMGPOINT3D_EPS 1E-12
#define | HOMGPOINT3D_TYPE double

Define Documentation

#define HOMGPOINT3D_EPS 1E-12

Definition at line 37 of file HomgPoint3D.hh.

Referenced by BIAS::HomgPoint3D::GetW(), BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint3D::IsAtInfinity(), and BIAS::HomgPoint3D::IsHomogenized().

#define HOMGPOINT3D_TYPE double

Definition at line 36 of file HomgPoint3D.hh.

Referenced by BIAS::HomgPoint3D::Distance(), BIAS::HomgPoint3D::GetEuclidian(), BIAS::HomgPoint3D::GetEuclidianX(), BIAS::HomgPoint3D::GetEuclidianY(), BIAS::HomgPoint3D::GetEuclidianZ(), and BIAS::HomgPoint3D::Homogenize().

Generated on Wed Jun 21 19:02:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3DCov.cpp File Reference

Base » Geometry

HomgPoint3DCov.cpp File Reference

#include "HomgPoint3DCov.hh"
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Debug/Exception.hh>

Include dependency graph for HomgPoint3DCov.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3DCov.hh File Reference

Base » Geometry

HomgPoint3DCov.hh File Reference

#include <Base/Math/Matrix4x4.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Common/CompareFloatingPoint.hh>

Include dependency graph for HomgPoint3DCov.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomgPoint3DCov
class representing the covariance matrix of a homogenous point 3D More...

Generated on Wed Jun 21 19:02:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/KMatrix.cpp File Reference

Base » Geometry

KMatrix.cpp File Reference

#include "KMatrix.hh"

Include dependency graph for KMatrix.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/KMatrix.hh File Reference

Base » Geometry

KMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Math/Matrix3x3.hh>

Include dependency graph for KMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::KMatrix
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs). More...

Defines

#define | KMATRIX_TYPE double

Define Documentation

#define KMATRIX_TYPE double

Definition at line 32 of file KMatrix.hh.

Generated on Wed Jun 21 19:02:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Normalization.cpp File Reference

Base » Geometry

Normalization.cpp File Reference

#include "Normalization.hh"

Include dependency graph for Normalization.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Normalization.hh File Reference

Base » Geometry

Normalization.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Math/Matrix3x3.hh>
#include "HomgPoint2D.hh"
#include "KMatrix.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Normalization.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Normalization
class Normalization Functions, e.g. More...

Generated on Wed Jun 21 19:02:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PlueckerMatrix.cpp File Reference

Base » Geometry

PlueckerMatrix.cpp File Reference

#include <Base/Geometry/PlueckerMatrix.hh>
#include <Base/Debug/Exception.hh>
#include <Base/Common/CompareFloatingPoint.hh>

Include dependency graph for PlueckerMatrix.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PlueckerMatrix.hh File Reference

Base » Geometry

PlueckerMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Matrix4x4.hh>

Include dependency graph for PlueckerMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PlueckerMatrix
represente a 3d line using a 4x4 Pluecker matrix More...

Defines

#define | PLUECKERMATRIX_TYPE double

Define Documentation

#define PLUECKERMATRIX_TYPE double

Definition at line 36 of file PlueckerMatrix.hh.

Generated on Wed Jun 21 19:02:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PMatrixBase.cpp File Reference

Base » Geometry

PMatrixBase.cpp File Reference

#include "PMatrixBase.hh"
#include "RMatrixBase.hh"
#include <Base/Debug/Exception.hh>

Include dependency graph for PMatrixBase.cpp:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PMatrixBase.hh File Reference

Base » Geometry

PMatrixBase.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix4x4.hh>
#include "HomgLine2D.hh"
#include "HomgPoint3D.hh"

Include dependency graph for PMatrixBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMatrixBase
describes a projective 3D -> 2D mapping in homogenous coordinates More...

Defines

#define | P_MATRIX_COLS 4
#define | P_MATRIX_ROWS 3
#define | PMATRIX_EPSILON 1e-14
#define | PMATRIX_TYPE double

Define Documentation

#define P_MATRIX_COLS 4

Definition at line 44 of file PMatrixBase.hh.

Referenced by BIAS::PMatrixBase::SetFromVector().

#define P_MATRIX_ROWS 3

Definition at line 43 of file PMatrixBase.hh.

Referenced by BIAS::PMatrixBase::SetFromVector().

#define PMATRIX_EPSILON 1e-14

Definition at line 49 of file PMatrixBase.hh.

Referenced by BIAS::PMatrix::GetIntersectionOfImagePlanes().

#define PMATRIX_TYPE double

Definition at line 47 of file PMatrixBase.hh.

Referenced by BIAS::PMatrix::Normalize(), BIAS::PMatrixBase::set_identity(), and BIAS::PMatrixBase::SetFromVector().

Generated on Wed Jun 21 19:02:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrization.cpp File Reference

Base » Geometry

PoseParametrization.cpp File Reference

#include "PoseParametrization.hh"
#include "PoseParametrizationCovariance.hh"
#include <Base/Debug/Exception.hh>
#include <Base/Common/CompareFloatingPoint.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/HomgPoint3D.hh>

Include dependency graph for PoseParametrization.cpp:

Go to the source code of this file.

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const PoseParametrization &p)
std::istream & | BIAS::operator>> (std::istream &is, PoseParametrization &p)

Generated on Wed Jun 21 19:02:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrization.hh File Reference

Base » Geometry

PoseParametrization.hh File Reference

#include <Base/Math/Vector.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/Quaternion.hh>
#include <fstream>

Include dependency graph for PoseParametrization.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PoseParametrization
Slim class bundeling pose parametrization and associated covariance matrix. More...

Defines

#define | PP_TYPE double

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const PoseParametrization &p)
std::istream & | BIAS::operator>> (std::istream &is, PoseParametrization &p)

Define Documentation

#define PP_TYPE double

Definition at line 39 of file PoseParametrization.hh.

Generated on Wed Jun 21 19:02:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrizationCovariance.cpp File Reference

Base » Geometry

PoseParametrizationCovariance.cpp File Reference

#include "PoseParametrizationCovariance.hh"
#include <Base/Debug/Exception.hh>
#include <Base/Common/CompareFloatingPoint.hh>
#include <Base/Geometry/PoseParametrization.hh>
#include <Base/Math/Matrix4x4.hh>

Include dependency graph for PoseParametrizationCovariance.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrizationCovariance.hh File Reference

Base » Geometry

PoseParametrizationCovariance.hh File Reference

#include <Base/Math/Matrix.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix4x4.hh>

Include dependency graph for PoseParametrizationCovariance.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PoseParametrizationCovariance
class encapsulating the transfromations between different pose parametrizations More...

Defines

#define | POSECOVARIANCE_TYPE double

Define Documentation

#define POSECOVARIANCE_TYPE double

Definition at line 31 of file PoseParametrizationCovariance.hh.

Generated on Wed Jun 21 19:02:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Quaternion.cpp File Reference

Base » Geometry

Quaternion.cpp File Reference

#include "Quaternion.hh"

Include dependency graph for Quaternion.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Quaternion.hh File Reference

Base » Geometry

Quaternion.hh File Reference

#include <bias_config.h>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <float.h>
#include <Base/Geometry/QuaternionOperators.hh>
#include <Base/Geometry/QuaternionInl.hh>

Include dependency graph for Quaternion.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Quaternion< QUAT_TYPE >
class for rotation with axis and angle More...

Defines

#define | QUATERNION_EPSILON 1E-10
#define | QUATERNION_TYPE double

Define Documentation

#define QUATERNION_EPSILON 1E-10

Definition at line 39 of file Quaternion.hh.

Referenced by BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle().

#define QUATERNION_TYPE double

Definition at line 40 of file Quaternion.hh.

Generated on Wed Jun 21 19:02:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/QuaternionInl.hh File Reference

Base » Geometry

QuaternionInl.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/QuaternionOperators.hh File Reference

Base » Geometry

QuaternionOperators.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/RMatrixBase.cpp File Reference

Base » Geometry

RMatrixBase.cpp File Reference

#include "RMatrixBase.hh"
#include <float.h>
#include <math.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for RMatrixBase.cpp:

Go to the source code of this file.

Defines

#define | MAX_QUATERNION_COS_ERROR 1e-12
#define | MINIMUM_ROTATION 1e-6

Functions

bool | BIAS::operator== (const RMatrixBase &left, const RMatrixBase &right)

Define Documentation

#define MAX_QUATERNION_COS_ERROR 1e-12

Definition at line 40 of file RMatrixBase.cpp.

Referenced by BIAS::RMatrixBase::GetQuaternion().

#define MINIMUM_ROTATION 1e-6

Definition at line 36 of file RMatrixBase.cpp.

Referenced by BIAS::Parametrization::EMatrixToParams(), BIAS::Parametrization::ParamsToEMatrix(), and BIAS::RMatrixBase::SetFromAxisAngle().

Generated on Wed Jun 21 19:02:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/RMatrixBase.hh File Reference

Base » Geometry

RMatrixBase.hh File Reference

#include "bias_config.h"
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Debug/Debug.hh>
#include <float.h>

Include dependency graph for RMatrixBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RMatrixBase
3D rotation matrix More...

Defines

#define | ROTATION_MATRIX_EPSILON DBL_EPSILON
#define | ROTATION_MATRIX_TYPE double

Define Documentation

#define ROTATION_MATRIX_EPSILON DBL_EPSILON

Definition at line 40 of file RMatrixBase.hh.

#define ROTATION_MATRIX_TYPE double

Definition at line 38 of file RMatrixBase.hh.

Generated on Wed Jun 21 19:02:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/TrifocalTensorBase.cpp File Reference

Base » Geometry

TrifocalTensorBase.cpp File Reference

#include "TrifocalTensorBase.hh"

Include dependency graph for TrifocalTensorBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/TrifocalTensorBase.hh File Reference

Base » Geometry

TrifocalTensorBase.hh File Reference

#include <Base/Math/Tensor3D3x3x3.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <Base/Geometry/PMatrixBase.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>

Include dependency graph for TrifocalTensorBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrifocalTensorBase

Defines

#define | TRIFOCALTENSOR_TYPE double

Define Documentation

#define TRIFOCALTENSOR_TYPE double

Definition at line 38 of file TrifocalTensorBase.hh.

Generated on Wed Jun 21 19:02:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExamplePMatrixBase.cpp File Reference

Base » Geometry » Examples

ExamplePMatrixBase.cpp File Reference

#include <Base/Geometry/PMatrixBase.hh>

Include dependency graph for ExamplePMatrixBase.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 32 of file ExamplePMatrixBase.cpp.

References BIAS::HomgPoint2D::Homogenize().

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExampleQuaternion.cpp File Reference

Base » Geometry » Examples

ExampleQuaternion.cpp File Reference

#include "../Quaternion.hh"

Include dependency graph for ExampleQuaternion.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 31 of file ExampleQuaternion.cpp.

References BIAS::RMatrixBase::GetRotationAnglesXYZ(), BIAS::RMatrixBase::GetRotationAnglesZYX(), BIAS::Quaternion< QUAT_TYPE >::GetRotationMatrix(), R, and BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad().

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExampleRMatrix.cpp File Reference

Base » Geometry » Examples

ExampleRMatrix.cpp File Reference

#include <Base/Geometry/RMatrixBase.hh>

Include dependency graph for ExampleRMatrix.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 31 of file ExampleRMatrix.cpp.

References BIAS::RMatrixBase::GetRotationAnglesXYZ(), BIAS::RMatrixBase::GetRotationAnglesZYX(), BIAS::RMatrixBase::GetRotationAxisAngle(), BIAS::RMatrixBase::Set(), BIAS::RMatrixBase::SetXYZ(), BIAS::RMatrixBase::SetZYX(), and BIAS::Matrix3x3< T >::Transpose().

Generated on Wed Jun 21 19:02:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Bresenham.hh File Reference

Base » Image

Bresenham.hh File Reference

#include <bias_config.h>
#include <Base/Image/EightWaySymmetry.hh>
#include <Base/Common/W32Compat.hh>

Include dependency graph for Bresenham.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Bresenham
scans a line using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext exists in Base/Image and Base/Geometry
More...

Generated on Wed Jun 21 19:02:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/BresenhamCircle.hh File Reference

Base » Image

BresenhamCircle.hh File Reference

#include "bias_config.h"

Include dependency graph for BresenhamCircle.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::BresenhamCircle
scans a circle using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext
  • points on circle are not given in continous manner, i.e.
More...
class | BIAS::BresenhamCircleEighth
just like bresenham circle but only return 1/8th of the circle More...
class | BIAS::BresenhamCircleSlow
makes 8 subsequent calls BresenhamCircleEighth slow does not work so far More...

Generated on Wed Jun 21 19:02:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/EightWaySymmetry.hh File Reference

Base » Image

EightWaySymmetry.hh File Reference

#include "bias_config.h"
#include <Base/Common/W32Compat.hh>
#include <math.h>
#include <iostream>
#include <Base/Debug/Error.hh>

Include dependency graph for EightWaySymmetry.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EightWaySymmetry< T >

Defines

#define | _USE_MATH_DEFINES

Enumerations

enum BIAS::TLineType {
BIAS::LT_Invalid, BIAS::E_NE, BIAS::NE_N, BIAS::N_NW,
BIAS::NW_W, BIAS::W_SW, BIAS::SW_S, BIAS::S_SE,
BIAS::SE_E
}
direction of line if start is in coordinate origin as given by compass More...

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 34 of file EightWaySymmetry.hh.

Generated on Wed Jun 21 19:02:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ExifTag.cpp File Reference

Base » Image

ExifTag.cpp File Reference

#include "ExifTag.hh"

Include dependency graph for ExifTag.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const BIAS::ExifTag &tag)
output operator for TagInfo

Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const BIAS::ExifTag & | tag
 | ) |

output operator for TagInfo

Author:
Jan Woetzel

Definition at line 25 of file ExifTag.cpp.

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ExifTag.hh File Reference

Base » Image

ExifTag.hh File Reference

#include "bias_config.h"
#include <string>
#include <iostream>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Debug/Error.hh>

Include dependency graph for ExifTag.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ExifTag
helper class containing EXIF Tag info and its's value 8wriiten e.g. More...

Functions

std::ostream & | operator<< (std::ostream &os, const BIAS::ExifTag &tag)
output operator for TagInfo

Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const BIAS::ExifTag & | tag
 | ) |

output operator for TagInfo

Author:
Jan Woetzel

Definition at line 25 of file ExifTag.cpp.

References BIAS::ExifTag::Print().

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Image.cpp File Reference

Base » Image

Image.cpp File Reference

#include "Image.hh"
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <string>
#include "Operators.cpp"

Include dependency graph for Image.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INSTANCE_Image(type) template class BIASImageBase_EXPORT Image<type>;

Define Documentation

#define INSTANCE_Image ( type ) template class BIASImageBase_EXPORT Image<type>;

Definition at line 1064 of file Image.cpp.

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Image.hh File Reference

Base » Image

Image.hh File Reference

#include "bias_config.h"
#include <Base/Common/W32Compat.hh>
#include <math.h>
#include <iostream>
#include <string>
#include <fstream>
#include <float.h>
#include <limits.h>
#include <Base/Image/ImageBase.hh>
#include "ImageInline.hh"

Include dependency graph for Image.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Image< StorageType >
The image template class for specific storage types. More...

Defines

#define | _USE_MATH_DEFINES
#define | D_CAST_CHECK 1<<3
#define | D_CONVERT 1<<2
#define | D_COPYIN 1<<1
#define | D_IMAGE_MINMAXCOO 1<<7
#define | D_MI_CONVGREY 1<<6
#define | D_MI_IOSTREAM 1<<5
#define | D_MI_TOPLANAR 1<<4
#define | MIP_DV_HEIGHT 288
#define | MIP_DV_WIDTH 500

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 36 of file Image.hh.

#define D_CAST_CHECK 1<<3

Definition at line 55 of file Image.hh.

#define D_CONVERT 1<<2

Definition at line 54 of file Image.hh.

Referenced by BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::IP_ToGrey(), BIAS::ImageConvert::IP_YUV422ToGrey_(), main(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToRGB(), and BIAS::ImageConvert::YUV422ToGrey_().

#define D_COPYIN 1<<1

Definition at line 53 of file Image.hh.

Referenced by BIAS::ImageBase::CopyIn_NoInit(), and main().

#define D_IMAGE_MINMAXCOO 1<<7

Definition at line 59 of file Image.hh.

Referenced by BIAS::Image< StorageType >::GetMinMaxPixelValue(), and main().

#define D_MI_CONVGREY 1<<6

Definition at line 58 of file Image.hh.

Referenced by BIAS::ImageConvert::YUV422ToGrey_().

#define D_MI_IOSTREAM 1<<5

Definition at line 57 of file Image.hh.

#define D_MI_TOPLANAR 1<<4

Definition at line 56 of file Image.hh.

Referenced by BIAS::ImageConvert::ToPlanarRGB_().

#define MIP_DV_HEIGHT 288

Definition at line 51 of file Image.hh.

Referenced by MIP::VideoSource_DV2::VideoSource_DV2(), and MIP::VideoSource_DV::VideoSource_DV_Internal_Init_().

#define MIP_DV_WIDTH 500

Definition at line 50 of file Image.hh.

Referenced by MIP::VideoSource_DV2::VideoSource_DV2(), and MIP::VideoSource_DV::VideoSource_DV_Internal_Init_().

Generated on Wed Jun 21 19:02:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageAttributes.cpp File Reference

Base » Image

ImageAttributes.cpp File Reference

#include "ImageAttributes.hh"
#include <Base/Common/W32Compat.hh>
#include <math.h>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Debug/Error.hh>
#include <string>
#include <exception>
#include <iostream>
#include <iterator>

Include dependency graph for ImageAttributes.cpp:

Go to the source code of this file.

Classes

class | TagInfo
compatibility class for ImageMagick/magick/attribute.c: More...

Defines

#define | METER_PER_INCH 0.0254

Functions

std::ostream & | operator<< (std::ostream &os, const BIAS::ImageAttributes &attr)
output operator for ExifTable

Variables

static TagInfo | tag_table []
compatibility class for ImageMagick/magick/attribute.c contains all known EXIF tags

Define Documentation

#define METER_PER_INCH 0.0254

Definition at line 20 of file ImageAttributes.cpp.

Referenced by BIAS::ImageAttributes::GetPixelSizeXMeter(), and BIAS::ImageAttributes::GetPixelSizeYMeter().

Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const BIAS::ImageAttributes & | attr
 | ) |

output operator for ExifTable

Author:
Jan Woetzel

Definition at line 250 of file ImageAttributes.cpp.

Variable Documentation

TagInfo tag_table[] [static]

compatibility class for ImageMagick/magick/attribute.c contains all known EXIF tags

Author:
jan Woetzel

Definition at line 38 of file ImageAttributes.cpp.

Generated on Wed Jun 21 19:02:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageAttributes.hh File Reference

Base » Image

ImageAttributes.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include "bias_config.h"
#include <Base/Debug/Debug.hh>
#include "ExifTag.hh"
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <Magick++.h>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ImageAttributes.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageAttributes
contains all atribute info and values of e.g. a file. More...

Defines

#define | BIAS_IMAGEATTRIBUTES_SUCCESS 0
return code for success:
#define | D_EXIF 1

Functions

BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const BIAS::ImageAttributes &attr)
output operator for ExifTable

Define Documentation

#define BIAS_IMAGEATTRIBUTES_SUCCESS 0

return code for success:

Definition at line 16 of file ImageAttributes.hh.

Referenced by main().

#define D_EXIF 1

Definition at line 18 of file ImageAttributes.hh.

Referenced by BIAS::ImageAttributes::GetFocalLengthMeter(), BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetFocalLengthYPixel(), BIAS::ImageAttributes::GetPixelSizeXMeter(), and BIAS::ImageAttributes::GetPixelSizeYMeter().

Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const BIAS::ImageAttributes & | attr
 | ) |

output operator for ExifTable

Author:
Jan Woetzel

Definition at line 250 of file ImageAttributes.cpp.

References BIAS::ImageAttributes::Print().

Generated on Wed Jun 21 19:02:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBase.cpp File Reference

Base » Image

ImageBase.cpp File Reference

#include "ImageBase.hh"
#include <math.h>
#include <string>
#include <sstream>
#include "WrapBias2Ipl.hh"

Include dependency graph for ImageBase.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase::EColorModel &st)
std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase::EStorageType &st)
std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase &img2)
std::istream & | BIAS::operator>> (std::istream &is, BIAS::ImageBase &img)

Generated on Wed Jun 21 19:02:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBase.hh File Reference

Base » Image

ImageBase.hh File Reference

#include <Base/Common/W32Compat.hh>
#include "bias_config.h"
#include <exception>
#include <string>
#include <malloc.h>
#include <string.h>
#include <stdio.h>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include "MetaData.hh"
#include "UUID.hh"
#include "ROI.hh"
#include "ImageBaseInline.hh"

Include dependency graph for ImageBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageBase
This is the base class for images in BIAS. More...

Defines

#define | D_CAST_CHECK 1<<3
#define | D_CONVERT 1<<2
#define | D_COPYIN 1<<1
#define | D_IMAGE_TRACE 1<<25
#define | D_MI_CONVGREY 1<<6
#define | D_MI_IOSTREAM 1<<5
#define | D_MI_TOPLANAR 1<<4
#define | DEFAULT_32to8_scale 255.0f
#define | DEFAULT_Display_delay 3000
#define | DEFAULT_WrapBias2Ipl_WINNAME "WrapBias2Ipl_0"
#define | IDENTIFIER "MIP"
#define | IDENTIFIER_LENGTH 3
#define | MIP_DV_HEIGHT 288
#define | MIP_DV_WIDTH 500
#define | VERSION_NUMBER 320

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase &img2)
std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase::EColorModel &st)
std::ostream & | BIAS::operator<< (std::ostream &os, const ImageBase::EStorageType &st)
std::istream & | BIAS::operator>> (std::istream &is, BIAS::ImageBase &img)

Variables

BIASImageBase_EXPORT | BIAS::Image
BIASImageBase_EXPORT | BIAS::ImageConvert

Define Documentation

#define D_CAST_CHECK 1<<3

Definition at line 56 of file ImageBase.hh.

#define D_CONVERT 1<<2

Definition at line 55 of file ImageBase.hh.

#define D_COPYIN 1<<1

Definition at line 54 of file ImageBase.hh.

#define D_IMAGE_TRACE 1<<25

Definition at line 62 of file ImageBase.hh.

Referenced by BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().

#define D_MI_CONVGREY 1<<6

Definition at line 59 of file ImageBase.hh.

#define D_MI_IOSTREAM 1<<5

Definition at line 58 of file ImageBase.hh.

#define D_MI_TOPLANAR 1<<4

Definition at line 57 of file ImageBase.hh.

#define DEFAULT_32to8_scale 255.0f

Definition at line 71 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Display().

#define DEFAULT_Display_delay 3000

Definition at line 73 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Display().

#define DEFAULT_WrapBias2Ipl_WINNAME "WrapBias2Ipl_0"

Definition at line 75 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::Display(), and BIAS::ImageBase::Display().

#define IDENTIFIER "MIP"

Definition at line 66 of file ImageBase.hh.

Referenced by BIAS::operator<<().

#define IDENTIFIER_LENGTH 3

Definition at line 67 of file ImageBase.hh.

Referenced by BIAS::operator<<(), and BIAS::operator>>().

#define MIP_DV_HEIGHT 288

Definition at line 51 of file ImageBase.hh.

#define MIP_DV_WIDTH 500

Definition at line 50 of file ImageBase.hh.

#define VERSION_NUMBER 320

Definition at line 64 of file ImageBase.hh.

Generated on Wed Jun 21 19:02:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBaseInline.hh File Reference

Base » Image

ImageBaseInline.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | CheckChannel(channel, functionname)
#define | CheckChannel(channel, functionname)
#define | CheckCoordinates(x, y, functionname)
#define | CheckCoordinates(x, y, functionname)

Define Documentation

#define CheckChannel | ( | channel,
 |  | functionname | )

Value:

if (channel >= GetChannelCount()) { \
    BIASERR("channel"<<channel<<" out of range in "<<functionname); \
  }

Definition at line 49 of file ImageBaseInline.hh.

#define CheckChannel | ( | channel,
 |  | functionname | )

Value:

if (channel >= GetChannelCount()) { \
    BIASERR("channel"<<channel<<" out of range in "<<functionname); \
  }

Definition at line 49 of file ImageBaseInline.hh.

#define CheckCoordinates | ( | x,
 |  | y,
 |  | functionname | )

Value:

if (x < 0 || x >= GetWidth()) { \
    BIASERR("x-coordinate out of range in "<<functionname<<" "<<x); \
  } \
  if (y < 0 || y >= GetHeight()) { \
    BIASERR("y-coordinate out of range in "<<functionname<<" "<<y); \
  }

Definition at line 34 of file ImageBaseInline.hh.

#define CheckCoordinates | ( | x,
 |  | y,
 |  | functionname | )

Value:

if (x < 0 || x >= GetWidth()) { \
    BIASERR("x-coordinate out of range in "<<functionname<<" "<<x); \
  } \
  if (y < 0 || y >= GetHeight()) { \
    BIASERR("y-coordinate out of range in "<<functionname<<" "<<y); \
  }

Definition at line 34 of file ImageBaseInline.hh.

Generated on Wed Jun 21 19:02:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvert.cpp File Reference

Base » Image

ImageConvert.cpp File Reference

#include "ImageConvert.hh"
#include <iostream>
#include "ToPlanar.cpp"
#include "ToInterleaved.cpp"
#include "ToHSV.cpp"
#include "ToHSL.cpp"
#include "ImageConvertInstantiation.cpp"

Include dependency graph for ImageConvert.cpp:

Go to the source code of this file.

Defines

#define | CALLFUNC(afunc, source, dest)
creates all switch cases given a function no pretty implementation but backward compatible to old macro JW
#define | CASE_CHAR(func, src, dst) SWIC(ST_char, char, func, src, dst)
#define | CASE_DOUBLE(func, src, dst)
#define | CASE_FLOAT(func, src, dst) SWIC(ST_float, float, func, src, dst)
#define | CASE_INT(func, src, dst) SWIC(ST_int, int, func, src, dst)
#define | CASE_SHORT(func, src, dst)
#define | CASE_UCHAR(func, src, dst) SWIC(ST_unsignedchar, unsigned char, func, src, dst)
#define | CASE_UINT(func, src, dst)
#define | CASE_USHORT(func, src, dst)
#define | D1
#define | D2
#define | FASTYUV
#define | SWIC(biasTypeEnum, cpptype, callfunc, src, dst)
one of the elemenatry switch case statements
#define | YUV2RGB(y, u, v, r, g, b)
Sony DFW-X700 : r = y + 1.4022 v got b = y + 1.7710 u g = y - 0.3475 u - 0.7144 v got.

Define Documentation

#define CALLFUNC | ( | afunc,
 |  | source,
 |  | dest | )

Value:

CASE_UCHAR (afunc,source,dest) \
  CASE_FLOAT (afunc,source,dest) \
  CASE_CHAR  (afunc,source,dest) \
  CASE_SHORT (afunc,source,dest) \
  CASE_USHORT(afunc,source,dest) \
  CASE_INT   (afunc,source,dest) \
  CASE_UINT  (afunc,source,dest) \
  CASE_DOUBLE(afunc,source,dest)
creates all switch cases given a function no pretty implementation but backward compatible to old macro JW

Definition at line 115 of file ImageConvert.cpp.

Referenced by BIAS::ImageConvert::Convert().

#define CASE_CHAR | ( | func,
 |  | src,
 |  | dst | ) | SWIC(ST_char, char, func, src, dst)

Definition at line 76 of file ImageConvert.cpp.

#define CASE_DOUBLE | ( | func,
 |  | src,
 |  | dst | )

Definition at line 108 of file ImageConvert.cpp.

#define CASE_FLOAT | ( | func,
 |  | src,
 |  | dst | ) | SWIC(ST_float, float, func, src, dst)

Definition at line 72 of file ImageConvert.cpp.

#define CASE_INT | ( | func,
 |  | src,
 |  | dst | ) | SWIC(ST_int, int, func, src, dst)

Definition at line 94 of file ImageConvert.cpp.

#define CASE_SHORT | ( | func,
 |  | src,
 |  | dst | )

Definition at line 84 of file ImageConvert.cpp.

#define CASE_UCHAR | ( | func,
 |  | src,
 |  | dst | ) | SWIC(ST_unsignedchar, unsigned char, func, src, dst)

Definition at line 71 of file ImageConvert.cpp.

#define CASE_UINT | ( | func,
 |  | src,
 |  | dst | )

Definition at line 102 of file ImageConvert.cpp.

#define CASE_USHORT | ( | func,
 |  | src,
 |  | dst | )

Definition at line 90 of file ImageConvert.cpp.

#define D1

Value:

(*(src+Mask[8])>*(src+Mask[11]))?\
  (*(src+Mask[8])-*(src+Mask[11])):\
  (*(src+Mask[11])-*(src+Mask[8]))

Referenced by BIAS::ImageConvert::BayerToRGBSlow_().

#define D2

Value:

(*(src+Mask[9])>*(src+Mask[10]))?\
  (*(src+Mask[9])-*(src+Mask[10])):\
  (*(src+Mask[10])-*(src+Mask[9]))

Referenced by BIAS::ImageConvert::BayerToRGBSlow_().

#define FASTYUV

#define SWIC | ( | biasTypeEnum,
 |  | cpptype,
 |  | callfunc,
 |  | src,
 |  | dst | )

Value:

case ImageBase::biasTypeEnum :\
{\
  Image< cpptype > typedImg, destImg;\
  typedImg.StealImage(src);\
  callfunc(typedImg, destImg);\
  src.StealImage(typedImg);\
  dst.StealImage(destImg);\
}\
  break;
one of the elemenatry switch case statements

Author:
Jan Woetzel

Definition at line 54 of file ImageConvert.cpp.

#define YUV2RGB | ( | y,
 |  | u,
 |  | v,
 |  | r,
 |  | g,
 |  | b | )

Value:

r = y + ( ((v << 11) + (v << 10) - (v << 8) + (v << 6) - (v << 3) ) >> 11);\
  g = y - ( ((v<<10) + (v<<9) - (v<<6) -  (v<<3) ) >> 11 ) - \
  ( ((u << 9) + (u << 7) + (u << 6) + (u << 3) + u) >> 11 );\
  b = y + ( ((u << 12) - (u << 9) + (u << 5)+(u<<4)) >> 11);\
  r = r < 0 ? 0 : r;\
  g = g < 0 ? 0 : g;\
  b = b < 0 ? 0 : b;\
  r = r > 255 ? 255 : r;\
  g = g > 255 ? 255 : g;\
  b = b > 255 ? 255 : b
Sony DFW-X700 : r = y + 1.4022 v got b = y + 1.7710 u g = y - 0.3475 u - 0.7144 v got.

Definition at line 342 of file ImageConvert.cpp.

Generated on Wed Jun 21 19:02:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvert.hh File Reference

Base » Image

ImageConvert.hh File Reference

#include "bias_config.h"
#include "Image.hh"
#include "ImageBase.hh"
#include <cv.h>
#include <dv.h>

Include dependency graph for ImageConvert.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageConvert
class with static functions for converting all kinds of color formats and storage types More...

Defines

#define | D_IMCONV_IPL 0x00000001

Define Documentation

#define D_IMCONV_IPL 0x00000001

Definition at line 44 of file ImageConvert.hh.

Generated on Wed Jun 21 19:02:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertInstantiation.cpp File Reference

Base » Image

ImageConvertInstantiation.cpp File Reference

#include "bias_config.h"

Include dependency graph for ImageConvertInstantiation.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | INSTANCE_ImageConvert(type)
solve explicit instantiation this file is included by ImageConvert.cpp
#define | INSTANCE_ImageConvert_DV(dvtype) template BIASImageBase_EXPORT int ImageConvert::DVToRGB_(const Image<dvtype>& source, Image<dvtype>& dest,unsigned char quality);
#define | INSTANCE_ImageConvert_OPENCV(cvt)
#define | INSTI(atype) INSTANCE_ImageConvert(atype) INSTANCE_ImageConvert_OPENCV(atype) INSTANCE_ImageConvert_DV(atype)

Define Documentation

#define INSTANCE_ImageConvert ( type )

Value:

template BIASImageBase_EXPORT int ImageConvert::IP_ToGrey(Image<type> &img);\
template BIASImageBase_EXPORT int ImageConvert::ToGrey(const Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToRGB(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToHSV(Image<type>& source,Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToHSL(Image<type>& source,Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::TohsL(Image<type>& source,Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToInterleaved(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToInterleavedRGB(Image<type>& red, Image<type>& green, Image<type>& blue, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToPlanar(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::FromInterleaved(Image<type>& source, Image<type>& Image1, Image<type>& Image2, Image<type>& Image3);\
template BIASImageBase_EXPORT int ImageConvert::IP_RGBToGrey_(Image<type> &img);\
template BIASImageBase_EXPORT int ImageConvert::IP_YUV422ToGrey_(Image<type> &img);\
template BIASImageBase_EXPORT int ImageConvert::BGRToRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::YUV422ToRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::GreyToRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::RGBToGrey_(const Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::HSLToGrey_(const Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::YUV422ToGrey_(const Image<type> &source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToPlanarYUYV422_(Image<type>& source, Image<type>& dest);    \
template BIASImageBase_EXPORT int ImageConvert::ToPlanarRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToInterleavedYUYV422_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::ToInterleavedRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::FromInterleavedYUYV422_(Image<type>& source, Image<type>& Y, Image<type>& U, Image<type>& V);\
template BIASImageBase_EXPORT int ImageConvert::FromInterleavedRGB_(Image<type>& source, Image<type>& R,  Image<type>& G, Image<type>& B);\
template BIASImageBase_EXPORT int ImageConvert::BayerToGrey_(const Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::BayerToRGB_(Image<type>& source, Image<type>& dest);\
template BIASImageBase_EXPORT int ImageConvert::BayerToRGBSlow_(Image<type>& source, Image<type>& dest);
solve explicit instantiation this file is included by ImageConvert.cpp

Author:
Jan Woetzel

Definition at line 9 of file ImageConvertInstantiation.cpp.

#define INSTANCE_ImageConvert_DV ( dvtype ) template BIASImageBase_EXPORT int ImageConvert::DVToRGB_(const Image<dvtype>& source, Image<dvtype>& dest,unsigned char quality);

Definition at line 49 of file ImageConvertInstantiation.cpp.

#define INSTANCE_ImageConvert_OPENCV ( cvt )

Value:

template BIASImageBase_EXPORT int ImageConvert::BIAS2ipl(const Image<cvt>& source, IplImage* &dest);\
template BIASImageBase_EXPORT int ImageConvert::Ipl2BIAS(IplImage* source, Image<cvt>& dest);

Definition at line 40 of file ImageConvertInstantiation.cpp.

#define INSTI ( atype ) INSTANCE_ImageConvert(atype) INSTANCE_ImageConvert_OPENCV(atype) INSTANCE_ImageConvert_DV(atype)

Definition at line 60 of file ImageConvertInstantiation.cpp.

Generated on Wed Jun 21 19:02:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertThreaded.cpp File Reference

Base » Image

ImageConvertThreaded.cpp File Reference

#include "ImageConvertThreaded.hh"
#include <Base/Debug/Exception.hh>
#include <pthread.h>

Include dependency graph for ImageConvertThreaded.cpp:

Go to the source code of this file.

Classes

struct ThreadArg__

Generated on Wed Jun 21 19:02:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertThreaded.hh File Reference

Base » Image

ImageConvertThreaded.hh File Reference

#include <bias_config.h>
#include "ImageConvert.hh"

Include dependency graph for ImageConvertThreaded.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageConvertThreaded

Generated on Wed Jun 21 19:02:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageDraw.cpp File Reference

Base » Image

ImageDraw.cpp File Reference

#include <Base/Common/W32Compat.hh>
#include "ImageDraw.hh"
#include <math.h>
#include "Bresenham.hh"
#include "BresenhamCircle.hh"
#include <Base/Math/Vector2.hh>
#include <Base/Image/WrapBias2Ipl.hh>

Include dependency graph for ImageDraw.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | BIAS_DRAW_CROSS_PRODUCT(a, b, res)
#define | BIAS_DRAW_PRECISION 1e-8
#define | INSTANCE_ImageDraw(type) template class BIASImageBase_EXPORT ImageDraw<type>;

Define Documentation

#define BIAS_DRAW_CROSS_PRODUCT | ( | a,
 |  | b,
 |  | res | )

Value:

res[0] = a[1] * b[2] - a[2] * b[1];\
    res[1] = a[2] * b[0] - a[0] * b[2];\
    res[2] = a[0] * b[1] - a[1] * b[0];

Definition at line 613 of file ImageDraw.cpp.

Referenced by BIAS::ImageDraw< StorageType >::Line().

#define BIAS_DRAW_PRECISION 1e-8

Definition at line 618 of file ImageDraw.cpp.

Referenced by BIAS::ImageDraw< StorageType >::Line().

#define INSTANCE_ImageDraw ( type ) template class BIASImageBase_EXPORT ImageDraw<type>;

Definition at line 1353 of file ImageDraw.cpp.

Generated on Wed Jun 21 19:02:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageDraw.hh File Reference

Base » Image

ImageDraw.hh File Reference

#include "bias_config.h"
#include <cxcore.h>
#include "Image.hh"
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>

Include dependency graph for ImageDraw.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageDraw< StorageType >
drawing simple entities into the image like rectangles or lines More...

Defines

#define | COLOR_BLACK BIAS::Vector3<unsigned char>(0,0,0)
#define | COLOR_BLUE BIAS::Vector3<unsigned char>(0,0,255)
#define | COLOR_GREEN BIAS::Vector3<unsigned char>(0,255,0)
#define | COLOR_GREY50 BIAS::Vector3<unsigned char>(128, 128, 128)
#define | COLOR_RED BIAS::Vector3<unsigned char>(255,0,0)
static int InterpolatedLineColor(Image<StorageType>& im, const int StartX, const int StartY, const int EndX, const int EndY, StorageType Value[]);
#define | COLOR_WHITE BIAS::Vector3<unsigned char>(255,255,255)

Define Documentation

#define COLOR_BLACK BIAS::Vector3<unsigned char>(0,0,0)

Examples:
ExampleIplImageDraw.cpp.

Definition at line 304 of file ImageDraw.hh.

Referenced by main().

#define COLOR_BLUE BIAS::Vector3<unsigned char>(0,0,255)

Examples:
ExampleIplImageDraw.cpp.

Definition at line 301 of file ImageDraw.hh.

Referenced by main().

#define COLOR_GREEN BIAS::Vector3<unsigned char>(0,255,0)

Examples:
ExampleIplImageDraw.cpp.

Definition at line 300 of file ImageDraw.hh.

Referenced by main().

#define COLOR_GREY50 BIAS::Vector3<unsigned char>(128, 128, 128)

Definition at line 303 of file ImageDraw.hh.

#define COLOR_RED BIAS::Vector3<unsigned char>(255,0,0)

static int InterpolatedLineColor(Image<StorageType>& im, const int StartX, const int StartY, const int EndX, const int EndY, StorageType Value[]);

Examples:
ExampleIplImageDraw.cpp.

Definition at line 299 of file ImageDraw.hh.

Referenced by main().

#define COLOR_WHITE BIAS::Vector3<unsigned char>(255,255,255)

Examples:
ExampleIplImageDraw.cpp.

Definition at line 302 of file ImageDraw.hh.

Referenced by main().

Generated on Wed Jun 21 19:02:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageInline.hh File Reference

Base » Image

ImageInline.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ImageInline.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageIO.cpp File Reference

Base » Image

ImageIO.cpp File Reference

#include <bias_config.h>
#include "ImageIO.hh"
#include <Base/Common/FileHandling.hh>
#include <Base/Common/BIASpragmaStart.hh>
#include <Magick++.h>
#include <Base/Common/BIASpragmaEnd.hh>
#include <half.h>
#include <ImfRgbaFile.h>
#include <ImfRgba.h>
#include <ImfArray.h>
#include <ImathBox.h>
#include <Imlib.h>
#include <IL/il.h>
#include <IL/ilu.h>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Debug/TimeMeasurement.hh>
#include <fstream>
#include <sstream>
#include "ImageConvert.hh"
#include "ViffHeader.hh"
#include <algorithm>
#include <cctype>
#include <fcntl.h>
#include <stdio.h>

Include dependency graph for ImageIO.cpp:

Go to the source code of this file.

Namespaces

namespace | Imath
namespace | Imf

Defines

#define | _CRT_SECURE_NO_DEPRECATE
#define | USE_DEVIL_ILU

Functions

char | myTolower (char c)
helper function for ExtensionName type casting
int | PrintInfoEXR (const RgbaInputFile &f, std::ostream &os)
Print header information to stream helper function.

Define Documentation

#define _CRT_SECURE_NO_DEPRECATE

Definition at line 30 of file ImageIO.cpp.

#define USE_DEVIL_ILU

Definition at line 72 of file ImageIO.cpp.

Function Documentation

char myTolower ( char c )

helper function for ExtensionName type casting

Author:
Jan Woetzel

Definition at line 113 of file ImageIO.cpp.

int PrintInfoEXR | ( | const RgbaInputFile & | f,
 |  | std::ostream & | os
 | ) |

Print header information to stream helper function.

Author:
Jan Woetzel 09/2005

Definition at line 342 of file ImageIO.cpp.

References BIAS_IO_SUCCESS, and BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR().

Generated on Wed Jun 21 19:02:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageIO.hh File Reference

Base » Image

ImageIO.hh File Reference

#include "bias_config.h"
#include <Base/Common/W32Compat.hh>
#include <string>
#include "Image.hh"
#include "MetaData.hh"

Include dependency graph for ImageIO.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageIO
routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g.
More...

Defines

#define | BIAS_DEFAULT_FORCENEWID true
#define | BIAS_DEFAULT_IMAGE_QUALITY 80
#define | BIAS_DEFAULT_SYNC false
#define | BIAS_IO_SUCCESS 0
#define | MIP_IDENTIFIER "MIP"
#define | MIP_IDENTIFIER_LENGTH 3
#define | UNKNOWN_META_DATA -5

Define Documentation

#define BIAS_DEFAULT_FORCENEWID true

Definition at line 46 of file ImageIO.hh.

#define BIAS_DEFAULT_IMAGE_QUALITY 80

Definition at line 44 of file ImageIO.hh.

Referenced by main().

#define BIAS_DEFAULT_SYNC false

Definition at line 45 of file ImageIO.hh.

#define BIAS_IO_SUCCESS 0

Examples:
ExampleImageMagickIO.cpp.

Definition at line 49 of file ImageIO.hh.

Referenced by BIAS::ImageIO::ExportOpenEXR(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), main(), and PrintInfoEXR().

#define MIP_IDENTIFIER "MIP"

Definition at line 38 of file ImageIO.hh.

#define MIP_IDENTIFIER_LENGTH 3

Definition at line 39 of file ImageIO.hh.

#define UNKNOWN_META_DATA -5

Definition at line 41 of file ImageIO.hh.

Generated on Wed Jun 21 19:02:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/MetaData.cpp File Reference

Base » Image

MetaData.cpp File Reference

#include <iostream>
#include "MetaData.hh"
#include <Base/Debug/Error.hh>
#include <string>

Include dependency graph for MetaData.cpp:

Go to the source code of this file.

Defines

#define | MD_LINE_LENGTH 1024

Functions

ostream & | BIAS::operator<< (ostream &os, const MetaData &md)
ostream & | BIAS::operator<< (ostream &os, const AppData &ad)
ostream & | BIAS::operator<< (ostream &os, const AppData::TAppData &ta)
istream & | BIAS::operator>> (istream &is, MetaData &md)
istream & | BIAS::operator>> (istream &is, AppData &ad)

Define Documentation

#define MD_LINE_LENGTH 1024

Definition at line 213 of file MetaData.cpp.

Referenced by BIAS::operator>>().

Generated on Wed Jun 21 19:02:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/MetaData.hh File Reference

Base » Image

MetaData.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <string>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for MetaData.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::AppData
this is a chunk of metadata, also see MetaData More...
class | BIAS::MetaData
this class collects all additional data chunks of type AppData to be written into/read from an image file More...

Generated on Wed Jun 21 19:02:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Operators.cpp File Reference

Base » Image

Operators.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for Operators.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | GRAYTEST(OPERATOR)

Functions

template<class StorageType>
bool | BIAS::HaveImagesMatchingROI (const Image< StorageType > &i1, const Image< StorageType > &i2)
Test the the dimensions of the ROI of two images.

Define Documentation

#define GRAYTEST ( OPERATOR )

Value:

if (GetChannelCount() != 1) { \
  BIASERR("Operation " << OPERATOR << " is only defined on gray images. Leaving images unchanged! Aborting!"); \
  BIASBREAK;\
  exit(-1); \
}

Definition at line 80 of file Operators.cpp.

Referenced by BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), and BIAS::Image< StorageType >::operator|().

Generated on Wed Jun 21 19:02:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/PMDImageIO.cpp File Reference

Base » Image

PMDImageIO.cpp File Reference

#include "PMDImageIO.hh"
#include <stdio.h>
#include <math.h>
#include <iostream>

Include dependency graph for PMDImageIO.cpp:

Go to the source code of this file.

Defines

#define | BIASERR(arg)
#define | FUNCNAME __PRETTY_FUNCTION__

Define Documentation

#define BIASERR ( arg )

Value:

{ \
  cerr<<std::flush<<"Error in "<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<std::endl \
  <<"\t"<<arg<<std::endl<<std::flush; \
}

Definition at line 42 of file PMDImageIO.cpp.

#define FUNCNAME __PRETTY_FUNCTION__

Definition at line 39 of file PMDImageIO.cpp.

Generated on Wed Jun 21 19:02:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/PMDImageIO.hh File Reference

Base » Image

PMDImageIO.hh File Reference

#include <string>
#include <tiffio.h>

Include dependency graph for PMDImageIO.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMDImageIO
Save 2D/3D-image-data together with some metadata in a single tiff-datafile. More...
struct | BIAS::PMDImageMetaData
Store extrinsic and intrinsic camera parameters for Rotation is in axis * angle representation image padding and Metadata. More...

Defines

#define | BIASImage_EXPORT
#define | BIASImageBase_EXPORT
#define | TIFFTAG_ASPECTRATIO 33921
#define | TIFFTAG_CAMERACENTER 34736
#define | TIFFTAG_CAMERAROTATION 34737
#define | TIFFTAG_FOCALLENGTHX 33920
#define | TIFFTAG_PRINCIPALPOINT 33550
#define | TIFFTAG_UNDISTORTION 34263

Variables

static TIFFExtendProc | ParentExtender = NULL
static const TIFFFieldInfo | tiffFieldInfo []

Define Documentation

#define BIASImage_EXPORT

Definition at line 33 of file PMDImageIO.hh.

#define BIASImageBase_EXPORT

Definition at line 34 of file PMDImageIO.hh.

Referenced by BIAS::ImageConvert::RGBTohsL_().

#define TIFFTAG_ASPECTRATIO 33921

Definition at line 44 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

#define TIFFTAG_CAMERACENTER 34736

Definition at line 48 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

#define TIFFTAG_CAMERAROTATION 34737

Definition at line 49 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

#define TIFFTAG_FOCALLENGTHX 33920

Definition at line 43 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

#define TIFFTAG_PRINCIPALPOINT 33550

Definition at line 41 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

#define TIFFTAG_UNDISTORTION 34263

Definition at line 46 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::WriteMetaData_().

Variable Documentation

TIFFExtendProc ParentExtender = NULL [static]

Definition at line 51 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::NewTagsCallback_(), and BIAS::PMDImageIO::NewTagsInitialize_().

const TIFFFieldInfo tiffFieldInfo[] [static]

Initial value:

 {
    { TIFFTAG_PRINCIPALPOINT,   -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "PrincipalPoint" },
    { TIFFTAG_FOCALLENGTHX, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "FocalLengthX" },
    { TIFFTAG_ASPECTRATIO,  -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "AspectRatio" },
    { TIFFTAG_UNDISTORTION, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "BougetUndistortion" },
    { TIFFTAG_CAMERACENTER, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "CameraCenter" },
    { TIFFTAG_CAMERAROTATION,   -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
      true, true,   "CameraRotation" },
  }

Definition at line 54 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageIO::NewTagsCallback_().

Generated on Wed Jun 21 19:02:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ROI.cpp File Reference

Base » Image

ROI.cpp File Reference

#include "ROI.hh"
#include <Base/Debug/Error.hh>
#include "ImageBase.hh"
#include <algorithm>

Include dependency graph for ROI.cpp:

Go to the source code of this file.

Defines

#define | ROI_IDENTIFIER "MIP-ROI"
#define | ROI_IDENTIFIER_LENGTH 7

Functions

ostream & | BIAS::operator<< (ostream &os, const ROI &roi)
ostream & | BIAS::operator<< (ostream &os, const Position &pos)

Define Documentation

#define ROI_IDENTIFIER "MIP-ROI"

Definition at line 35 of file ROI.cpp.

Referenced by BIAS::ROI::ReadBinary(), and BIAS::ROI::WriteBinary().

#define ROI_IDENTIFIER_LENGTH 7

Definition at line 36 of file ROI.cpp.

Referenced by BIAS::ROI::ReadBinary(), and BIAS::ROI::WriteBinary().

Generated on Wed Jun 21 19:02:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ROI.hh File Reference

Base » Image

ROI.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include <iostream>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ROI.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Position
store positions in image More...
class | BIAS::ROI
class for handling different region of interest (ROI) representations. More...

Defines

#define | D_ROI_IO 0x00000001
#define | MASK_TYPE unsigned char
#define | ROI_VERSION_NUMBER 100

Functions

BIASImageBase_EXPORT std::ostream & | BIAS::operator<< (std::ostream &os, const ROI &roi)
human readable output operator for ROI, mainly for debugging

Define Documentation

#define D_ROI_IO 0x00000001

Definition at line 39 of file ROI.hh.

Referenced by BIAS::ROI::ReadBinary(), and BIAS::ROI::WriteBinary().

#define MASK_TYPE unsigned char

Definition at line 36 of file ROI.hh.

Referenced by BIAS::ROI::GetMaskImage(), BIAS::ROI::operator=(), BIAS::ROI::ReadBinary(), BIAS::ROI::Resize(), BIAS::ROI::SetMaskImage(), BIAS::ROI::Vector2Mask(), and BIAS::ROI::WriteBinary().

#define ROI_VERSION_NUMBER 100

Definition at line 37 of file ROI.hh.

Referenced by BIAS::operator<<().

Generated on Wed Jun 21 19:02:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ScanLine.hh File Reference

Base » Image

ScanLine.hh File Reference

#include <bias_config.h>
#include <Base/Image/Bresenham.hh>

Include dependency graph for ScanLine.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ScanLine
class for scanning a image region given by a line and a distance from the line More...

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ScanLine2.hh File Reference

Base » Image

ScanLine2.hh File Reference

#include <bias_config.h>
#include "Bresenham.hh"

Include dependency graph for ScanLine2.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ScanLine2

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToHSL.cpp File Reference

Base » Image

ToHSL.cpp File Reference

#include "ImageConvert.hh"

Include dependency graph for ToHSL.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToHSV.cpp File Reference

Base » Image

ToHSV.cpp File Reference

#include "ImageConvert.hh"

Include dependency graph for ToHSV.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToInterleaved.cpp File Reference

Base » Image

ToInterleaved.cpp File Reference

#include "ImageConvert.hh"

Include dependency graph for ToInterleaved.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToPlanar.cpp File Reference

Base » Image

ToPlanar.cpp File Reference

#include "ImageConvert.hh"

Include dependency graph for ToPlanar.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/UUID.cpp File Reference

Base » Image

UUID.cpp File Reference

#include "UUID.hh"
#include <sstream>

Include dependency graph for UUID.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/UUID.hh File Reference

Base » Image

UUID.hh File Reference

#include <ctime>
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Common/BIASpragmaStart.hh>
#include <uuid/uuid.h>
#include <time.h>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for UUID.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::UUID
interface class for producing/storing Universally Unique IDentifiers More...
class | BIAS::UUIDsortAscending
Helper class for ascending sort of sequential BIAS::UUIDs Sample usage:. More...

Defines

#define | DEFAULT_UUID_CONSECUTIVELY false

Define Documentation

#define DEFAULT_UUID_CONSECUTIVELY false

Definition at line 80 of file UUID.hh.

Generated on Wed Jun 21 19:02:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ViffHeader.hh File Reference

Base » Image

ViffHeader.hh File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | xvimage

Defines

#define | number_of_cols row_size
#define | number_of_rows col_size
#define | VFF_CM_cieRGB 7
#define | VFF_CM_cieucsLab 12
#define | VFF_CM_cieucsLuv 13
#define | VFF_CM_cieucsSOW 11
#define | VFF_CM_cieucsUVW 10
#define | VFF_CM_cieUVW 9
#define | VFF_CM_cieXYZ 8
#define | VFF_CM_GENERIC 14
#define | VFF_CM_genericRGB 15
#define | VFF_CM_HLS 5
#define | VFF_CM_HSV 4
#define | VFF_CM_IHS 6
#define | VFF_CM_NONE 0
#define | VFF_CM_ntscCMY 2
#define | VFF_CM_ntscRGB 1
#define | VFF_CM_ntscYIQ 3
#define | VFF_DEP_BIGENDIAN VFF_DEP_IEEEORDER
#define | VFF_DEP_CRAYORDER 0xA
#define | VFF_DEP_DECORDER 0x4
#define | VFF_DEP_IEEEORDER 0x2
#define | VFF_DEP_LITENDIAN VFF_DEP_NSORDER
#define | VFF_DEP_NSORDER 0x8
#define | VFF_DES_ADPCM 5
#define | VFF_DES_CCITT 4
#define | VFF_DES_COMPRESS 1
#define | VFF_DES_GENERIC 6
#define | VFF_DES_RAW 0
#define | VFF_DES_RLE 2
#define | VFF_DES_TRANSFORM 3
#define | VFF_LOC_EXPLICIT 2
#define | VFF_LOC_IMPLICIT 1
#define | VFF_MAP_FORCE 2
#define | VFF_MAP_OPTIONAL 1
#define | VFF_MAPTYP_1_BYTE 1
#define | VFF_MAPTYP_2_BYTE 2
#define | VFF_MAPTYP_4_BYTE 4
#define | VFF_MAPTYP_COMPLEX 6
#define | VFF_MAPTYP_DOUBLE 7
#define | VFF_MAPTYP_FLOAT 5
#define | VFF_MAPTYP_NONE 0
#define | VFF_MS_CYCLE 2
#define | VFF_MS_GROUP 4
#define | VFF_MS_NONE 0
#define | VFF_MS_ONEPERBAND 1
#define | VFF_MS_SHARED 3
#define | VFF_NOTSUB ~0
#define | VFF_TYP_1_BYTE 1
#define | VFF_TYP_2_BYTE 2
#define | VFF_TYP_4_BYTE 4
#define | VFF_TYP_BIT 0
#define | VFF_TYP_COMPLEX 6
#define | VFF_TYP_DCOMPLEX 10
#define | VFF_TYP_DOUBLE 9
#define | VFF_TYP_FLOAT 5
#define | VIFF_HEADERSIZE 1024
#define | XV_IMAGE_REL_NUM 1
#define | XV_IMAGE_VER_NUM 3

Define Documentation

#define number_of_cols row_size

Definition at line 349 of file ViffHeader.hh.

#define number_of_rows col_size

Definition at line 348 of file ViffHeader.hh.

#define VFF_CM_cieRGB 7

Definition at line 325 of file ViffHeader.hh.

#define VFF_CM_cieucsLab 12

Definition at line 330 of file ViffHeader.hh.

#define VFF_CM_cieucsLuv 13

Definition at line 331 of file ViffHeader.hh.

#define VFF_CM_cieucsSOW 11

Definition at line 329 of file ViffHeader.hh.

#define VFF_CM_cieucsUVW 10

Definition at line 328 of file ViffHeader.hh.

#define VFF_CM_cieUVW 9

Definition at line 327 of file ViffHeader.hh.

#define VFF_CM_cieXYZ 8

Definition at line 326 of file ViffHeader.hh.

#define VFF_CM_GENERIC 14

Definition at line 332 of file ViffHeader.hh.

#define VFF_CM_genericRGB 15

Definition at line 333 of file ViffHeader.hh.

#define VFF_CM_HLS 5

Definition at line 323 of file ViffHeader.hh.

#define VFF_CM_HSV 4

Definition at line 322 of file ViffHeader.hh.

#define VFF_CM_IHS 6

Definition at line 324 of file ViffHeader.hh.

#define VFF_CM_NONE 0

Definition at line 318 of file ViffHeader.hh.

#define VFF_CM_ntscCMY 2

Definition at line 320 of file ViffHeader.hh.

#define VFF_CM_ntscRGB 1

Definition at line 319 of file ViffHeader.hh.

#define VFF_CM_ntscYIQ 3

Definition at line 321 of file ViffHeader.hh.

#define VFF_DEP_BIGENDIAN VFF_DEP_IEEEORDER

Definition at line 235 of file ViffHeader.hh.

#define VFF_DEP_CRAYORDER 0xA

Definition at line 233 of file ViffHeader.hh.

#define VFF_DEP_DECORDER 0x4

Definition at line 231 of file ViffHeader.hh.

#define VFF_DEP_IEEEORDER 0x2

Definition at line 230 of file ViffHeader.hh.

#define VFF_DEP_LITENDIAN VFF_DEP_NSORDER

Definition at line 236 of file ViffHeader.hh.

#define VFF_DEP_NSORDER 0x8

Definition at line 232 of file ViffHeader.hh.

#define VFF_DES_ADPCM 5

Definition at line 262 of file ViffHeader.hh.

#define VFF_DES_CCITT 4

Definition at line 261 of file ViffHeader.hh.

#define VFF_DES_COMPRESS 1

Definition at line 258 of file ViffHeader.hh.

#define VFF_DES_GENERIC 6

Definition at line 263 of file ViffHeader.hh.

#define VFF_DES_RAW 0

Definition at line 257 of file ViffHeader.hh.

#define VFF_DES_RLE 2

Definition at line 259 of file ViffHeader.hh.

#define VFF_DES_TRANSFORM 3

Definition at line 260 of file ViffHeader.hh.

#define VFF_LOC_EXPLICIT 2

Definition at line 342 of file ViffHeader.hh.

#define VFF_LOC_IMPLICIT 1

Definition at line 338 of file ViffHeader.hh.

#define VFF_MAP_FORCE 2

Definition at line 292 of file ViffHeader.hh.

#define VFF_MAP_OPTIONAL 1

Definition at line 288 of file ViffHeader.hh.

#define VFF_MAPTYP_1_BYTE 1

Definition at line 268 of file ViffHeader.hh.

#define VFF_MAPTYP_2_BYTE 2

Definition at line 269 of file ViffHeader.hh.

#define VFF_MAPTYP_4_BYTE 4

Definition at line 270 of file ViffHeader.hh.

#define VFF_MAPTYP_COMPLEX 6

Definition at line 272 of file ViffHeader.hh.

#define VFF_MAPTYP_DOUBLE 7

Definition at line 273 of file ViffHeader.hh.

#define VFF_MAPTYP_FLOAT 5

Definition at line 271 of file ViffHeader.hh.

#define VFF_MAPTYP_NONE 0

Definition at line 267 of file ViffHeader.hh.

#define VFF_MS_CYCLE 2

Definition at line 280 of file ViffHeader.hh.

#define VFF_MS_GROUP 4

Definition at line 284 of file ViffHeader.hh.

#define VFF_MS_NONE 0

Definition at line 277 of file ViffHeader.hh.

#define VFF_MS_ONEPERBAND 1

Definition at line 279 of file ViffHeader.hh.

#define VFF_MS_SHARED 3

Definition at line 283 of file ViffHeader.hh.

#define VFF_NOTSUB ~0

Definition at line 225 of file ViffHeader.hh.

#define VFF_TYP_1_BYTE 1

Definition at line 245 of file ViffHeader.hh.

#define VFF_TYP_2_BYTE 2

Definition at line 246 of file ViffHeader.hh.

#define VFF_TYP_4_BYTE 4

Definition at line 247 of file ViffHeader.hh.

#define VFF_TYP_BIT 0

Definition at line 241 of file ViffHeader.hh.

#define VFF_TYP_COMPLEX 6

Definition at line 249 of file ViffHeader.hh.

#define VFF_TYP_DCOMPLEX 10

Definition at line 252 of file ViffHeader.hh.

#define VFF_TYP_DOUBLE 9

Definition at line 250 of file ViffHeader.hh.

#define VFF_TYP_FLOAT 5

Definition at line 248 of file ViffHeader.hh.

#define VIFF_HEADERSIZE 1024

Definition at line 65 of file ViffHeader.hh.

#define XV_IMAGE_REL_NUM 1

Definition at line 221 of file ViffHeader.hh.

#define XV_IMAGE_VER_NUM 3

Definition at line 217 of file ViffHeader.hh.

Generated on Wed Jun 21 19:02:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/WrapBias2Ipl.cpp File Reference

Base » Image

WrapBias2Ipl.cpp File Reference

#include <Base/Common/W32Compat.hh>
#include "WrapBias2Ipl.hh"
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <string>
#include <cv.h>
#include <highgui.h>

Include dependency graph for WrapBias2Ipl.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/WrapBias2Ipl.hh File Reference

Base » Image

WrapBias2Ipl.hh File Reference

#include <bias_config.h>
#include <Base/Image/ImageBase.hh>

Include dependency graph for WrapBias2Ipl.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::WrapBias2Ipl
wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area. More...

Typedefs

typedef _IplImage | IplImage

Typedef Documentation

typedef struct _IplImage IplImage

Examples:
ExampleIpl.cpp.

Definition at line 16 of file WrapBias2Ipl.hh.

Generated on Wed Jun 21 19:02:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/convertRAW.cpp File Reference

Base » Image » Examples

convertRAW.cpp File Reference

#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>

Include dependency graph for convertRAW.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char **argv)
void | usage (int, char **)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

to RGB convert 1 ch Bayer --> 3 channel RGB

Definition at line 28 of file convertRAW.cpp.

References BIAS::ImageBase::Display(), BIAS::ImageIO::FF_jpg, img, BIAS::ImageIO::ImportRAWwithHeader(), BIAS::ImageConvert::ToRGB(), and usage().

void usage | ( | int | ,
 |  | char ** |
 | ) |

Examples:
convertRAW.cpp, ExampleImageAttributes.cpp, and ExampleImageMagickIO.cpp.

Definition at line 21 of file convertRAW.cpp.

Referenced by help(), main(), and Usage().

Generated on Wed Jun 21 19:02:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleBresenham.cpp File Reference

Base » Image » Examples

ExampleBresenham.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "Base/Image/ImageIO.hh"
#include "Base/Image/Bresenham.hh"
#include "Base/Image/BresenhamCircle.hh"
#include "Base/Image/ScanLine.hh"
#include "Base/Image/ScanLine2.hh"
#include "Base/Image/Image.hh"

Include dependency graph for ExampleBresenham.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 38 of file ExampleBresenham.cpp.

References center, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::GetImageDataArray(), and BIAS::BresenhamCircle::GetNext().

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleChessboard.cpp File Reference

Base » Image » Examples

ExampleChessboard.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleChessboard.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 38 of file ExampleChessboard.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), and r.

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleConvert.cpp File Reference

Base » Image » Examples

ExampleConvert.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleConvert.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file ExampleConvert.cpp.

References BIASERR.

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleDraw.cpp File Reference

Base » Image » Examples

ExampleDraw.cpp File Reference

#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleDraw.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 32 of file ExampleDraw.cpp.

References BIAS::Arrow, and BIAS::Image< StorageType >::FillImageWithConstValue().

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleEmpty.cpp File Reference

Base » Image » Examples

ExampleEmpty.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "Base/Image/Image.hh"
#include "Base/Image/ImageIO.hh"

Include dependency graph for ExampleEmpty.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 35 of file ExampleEmpty.cpp.

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleForeignData.cpp File Reference

Base » Image » Examples

ExampleForeignData.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleForeignData.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 37 of file ExampleForeignData.cpp.

References BIASERR, BIAS::ImageBase::ClearDataPointer(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::InitWithForeignData(), and r.

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleHSVConversion.cpp File Reference

Base » Image » Examples

ExampleHSVConversion.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleHSVConversion.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 39 of file ExampleHSVConversion.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageDataArray(), r, and BIAS::ImageBase::SetColorModel().

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageAttributes.cpp File Reference

Base » Image » Examples

ExampleImageAttributes.cpp File Reference

#include <iostream>
#include <string>
#include <Base/Image/ImageAttributes.hh>

Include dependency graph for ExampleImageAttributes.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char **argv)
void | usage (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 30 of file ExampleImageAttributes.cpp.

References BIASASSERT, BIAS::ImageAttributes::InitExifTags(), BIAS::ImageAttributes::Read(), and usage().

void usage | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 22 of file ExampleImageAttributes.cpp.

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageLoad.cpp File Reference

Base » Image » Examples

ExampleImageLoad.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleImageLoad.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExampleImageLoad.cpp.

References BIASERR, BIAS::ImageBase::GetUID(), and BIAS::UUID::IsValid().

Generated on Wed Jun 21 19:02:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageMagickIO.cpp File Reference

Base » Image » Examples

ExampleImageMagickIO.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleImageMagickIO.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char **argv)
void | usage (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 29 of file ExampleImageMagickIO.cpp.

References BIAS_IO_SUCCESS, BIASASSERT, BIASERR, BIAS::ImageIO::ExportImage(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::FF_png, img, BIAS::ImageIO::ImportMagickPPAutoconvert(), usage(), and BIAS::ImageIO::Write().

void usage | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 23 of file ExampleImageMagickIO.cpp.

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageOperator.cpp File Reference

Base » Image » Examples

ExampleImageOperator.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleImageOperator.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 32 of file ExampleImageOperator.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and BIAS::Image< StorageType >::Init().

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleInterpolation.cpp File Reference

Base » Image » Examples

ExampleInterpolation.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleInterpolation.cpp:

Go to the source code of this file.

Defines

#define | OFFX 0.3
#define | OFFY 0.2

Functions

int | main (int argc, char *argv[])

Define Documentation

#define OFFX 0.3

Definition at line 29 of file ExampleInterpolation.cpp.

Referenced by main().

#define OFFY 0.2

Definition at line 30 of file ExampleInterpolation.cpp.

Referenced by main().

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file ExampleInterpolation.cpp.

References BIASERR, BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), OFFX, and OFFY.

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIpl.cpp File Reference

Base » Image » Examples

ExampleIpl.cpp File Reference

#include <iostream>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <highgui.h>

Include dependency graph for ExampleIpl.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 47 of file ExampleIpl.cpp.

References BIASERR.

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplImageDisplay.cpp File Reference

Base » Image » Examples

ExampleIplImageDisplay.cpp File Reference

#include <iostream>
#include <string>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleIplImageDisplay.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 17 of file ExampleIplImageDisplay.cpp.

References BIAS_TESTS_DATA, BIAS::ImageBase::Display(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageIO::Load().

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplImageDraw.cpp File Reference

Base » Image » Examples

ExampleIplImageDraw.cpp File Reference

#include <iostream>
#include <string>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for ExampleIplImageDraw.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 20 of file ExampleIplImageDraw.cpp.

References BIAS_TESTS_DATA, COLOR_BLACK, COLOR_BLUE, COLOR_GREEN, COLOR_RED, COLOR_WHITE, BIAS::ImageIO::ExportImage(), BIAS::ImageIO::FF_jpg, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageIO::Load().

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplWrapOpenCV.cpp File Reference

Base » Image » Examples

ExampleIplWrapOpenCV.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <iostream>
#include <string>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/WrapBias2Ipl.hh>
#include "cv.h"

Include dependency graph for ExampleIplWrapOpenCV.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 26 of file ExampleIplWrapOpenCV.cpp.

References BIAS_TESTS_DATA, BIAS::WrapBias2Ipl::Display(), BIAS::ImageIO::ExportImage(), BIAS::ImageIO::FF_jpg, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, BIAS::ImageIO::Load(), BIAS::WrapBias2Ipl::p_imgBias, and BIAS::WrapBias2Ipl::p_imgIpl.

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleMetaData.cpp File Reference

Base » Image » Examples

ExampleMetaData.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <sstream>

Include dependency graph for ExampleMetaData.cpp:

Go to the source code of this file.

Defines

#define | HOMGPOINT2D_TYPE double

Functions

int | main ()

Define Documentation

#define HOMGPOINT2D_TYPE double

Definition at line 34 of file ExampleMetaData.cpp.

Function Documentation

int main ( )

Definition at line 40 of file ExampleMetaData.cpp.

References BIAS::MetaData::Add(), BIASASSERT, BIASERR, BIAS::AppData::data, BIAS::MetaData::Dump(), BIAS::MetaData::Find(), BIAS::ImageBase::GetMetaData(), and HOMGPOINT2D_TYPE.

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleMinMax.cpp File Reference

Base » Image » Examples

ExampleMinMax.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <Base/Common/BIASpragma.hh>
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleMinMax.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 40 of file ExampleMinMax.cpp.

References BIAS::Debug::AddDebugLevel(), D_IMAGE_MINMAXCOO, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetWidth(), max, min, BIAS::ImageBase::PrintHeader(), BIAS::Image< StorageType >::SetPixel(), and BIAS::ImageBase::SetROICorners().

Generated on Wed Jun 21 19:02:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleROI.cpp File Reference

Base » Image » Examples

ExampleROI.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleROI.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file ExampleROI.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::ImageBase::GetHeight(), BIAS::ROI::GetMaskDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ROI::Mask2Vector(), BIAS::ROI::SetMaskValidFlag(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::ImageBase::SetROICorners(), BIAS::ROI::SetVector(), and BIAS::ROI::Vector2Mask().

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleTile.cpp File Reference

Base » Image » Examples

ExampleTile.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleTile.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file ExampleTile.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::Paste2ROI(), and BIAS::ImageBase::SetROI().

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleUUID.cpp File Reference

Base » Image » Examples

ExampleUUID.cpp File Reference

#include <Base/Image/UUID.hh>
#include <fstream>

Include dependency graph for ExampleUUID.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 32 of file ExampleUUID.cpp.

References BIAS::UUID::GenerateUUID().

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/mip2viff.cpp File Reference

Base » Image » Examples

mip2viff.cpp File Reference

#include <iostream>
#include <Base/Debug/Error.hh>

Include dependency graph for mip2viff.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 44 of file mip2viff.cpp.

References BIASERR.

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/viff2mip.cpp File Reference

Base » Image » Examples

viff2mip.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for viff2mip.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 41 of file viff2mip.cpp.

References BIASERR.

Generated on Wed Jun 21 19:02:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Cholesky.cpp File Reference

Base » Math

Cholesky.cpp File Reference

#include "Cholesky.hh"

Include dependency graph for Cholesky.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Cholesky.hh File Reference

Base » Math

Cholesky.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Math/Matrix.hh>
#include "tnt/cholesky.h"

Include dependency graph for Cholesky.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Cholesky

Generated on Wed Jun 21 19:02:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Distribution.cpp File Reference

Base » Math

Distribution.cpp File Reference

#include "Distribution.hh"

Include dependency graph for Distribution.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Distribution.hh File Reference

Base » Math

Distribution.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Error.hh>
#include <vector>
#include <cmath>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Distribution.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Distribution
class for calculating mean, variance and possibly other parameters More...

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Math.hh File Reference

Base » Math

Math.hh File Reference

#include "bias_config.h"
#include "Matrix.hh"
#include "Vector.hh"
#include "Matrix2x2.hh"
#include "Matrix3x3.hh"
#include "Matrix4x4.hh"
#include "Matrix3x4.hh"
#include "Vector4.hh"
#include "Vector3.hh"
#include "Vector2.hh"
#include "Operators.hh"

Include dependency graph for Math.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:02:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix.cpp File Reference

Base » Math

Matrix.cpp File Reference

#include "Matrix.hh"
#include "Vector.hh"
#include <algorithm>
#include <fstream>

Include dependency graph for Matrix.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type)
explicit instantiation

Define Documentation

#define INST ( type )

Value:

template class BIASMathBase_EXPORT BIAS::Matrix<type>;\
template class BIASMathBase_EXPORT TNT::Matrix<type>;\
explicit instantiation

Definition at line 468 of file Matrix.cpp.

Generated on Wed Jun 21 19:02:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix.hh File Reference

Base » Math

Matrix.hh File Reference

#include "bias_config.h"
#include <math.h>
#include <Base/Debug/Error.hh>
#include "tnt/tnt.h"
#include "tnt/cmat.h"
#include "tnt/fmat.h"
#include "Operators.hh"
#include <string>

Include dependency graph for Matrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Matrix< T >
matrix class with arbitrary size, indexing is row major. More...

Defines

#define | _USE_MATH_DEFINES
#define | DOUBLE_EPSILON 1E-12

Enumerations

enum | BIAS::MatrixInitType { BIAS::MatrixZero, BIAS::MatrixIdentity }
can be passed to matrix constructors to init the matrix with the most often used values More...

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 31 of file Matrix.hh.

#define DOUBLE_EPSILON 1E-12

Definition at line 46 of file Matrix.hh.

Referenced by BIAS::Matrix2x2< T >::EigenvalueDecomposition(), and BIAS::Conic2D::Normalize().

Generated on Wed Jun 21 19:02:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix2x2.cpp File Reference

Base » Math

Matrix2x2.cpp File Reference

#include "Matrix2x2.hh"
#include "Vector2.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for Matrix2x2.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Matrix2x2<type>;\
#define | MATRIX2X2_ZERO_EPS 1e-13

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Matrix2x2<type>;\

Definition at line 242 of file Matrix2x2.cpp.

#define MATRIX2X2_ZERO_EPS 1e-13

Definition at line 37 of file Matrix2x2.cpp.

Referenced by BIAS::Matrix2x2< T >::EigenvalueDecomposition().

Generated on Wed Jun 21 19:02:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix2x2.hh File Reference

Base » Math

Matrix2x2.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include "Matrix.hh"
#include "Operators.hh"

Include dependency graph for Matrix2x2.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Matrix2x2< T >
is a 'fixed size' quadratic matrix of dim. More...

Generated on Wed Jun 21 19:02:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x3.cpp File Reference

Base » Math

Matrix3x3.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "Matrix3x3.hh"
#include <vector>
#include <sstream>
#include <fstream>

Include dependency graph for Matrix3x3.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Matrix3x3<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Matrix3x3<type>;\

Definition at line 471 of file Matrix3x3.cpp.

Generated on Wed Jun 21 19:02:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x3.hh File Reference

Base » Math

Matrix3x3.hh File Reference

#include "bias_config.h"
#include <string>
#include <Base/Debug/Error.hh>
#include "Matrix.hh"
#include "Operators.hh"
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Vector3.hh>

Include dependency graph for Matrix3x3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Matrix3x3< T >
is a 'fixed size' quadratic matrix of dim. More...

Functions

template<class T>
std::istream & | BIAS::operator>> (std::istream &s, Matrix3x3< T > &A)

Generated on Wed Jun 21 19:02:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x4.cpp File Reference

Base » Math

Matrix3x4.cpp File Reference

#include "Matrix3x4.hh"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>

Include dependency graph for Matrix3x4.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Matrix3x4<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Matrix3x4<type>;\

Definition at line 148 of file Matrix3x4.cpp.

Generated on Wed Jun 21 19:02:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x4.hh File Reference

Base » Math

Matrix3x4.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include "Matrix.hh"
#include "Operators.hh"
#include "Vector4.hh"
#include <string>

Include dependency graph for Matrix3x4.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Matrix3x4< T >
is a 'fixed size' rectangular matrix of dim. More...

Generated on Wed Jun 21 19:02:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix4x4.cpp File Reference

Base » Math

Matrix4x4.cpp File Reference

#include "Matrix4x4.hh"

Include dependency graph for Matrix4x4.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Matrix4x4<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Matrix4x4<type>;\

Definition at line 132 of file Matrix4x4.cpp.

Generated on Wed Jun 21 19:02:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix4x4.hh File Reference

Base » Math

Matrix4x4.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include "Matrix.hh"
#include "Matrix3x3.hh"
#include "Vector3.hh"
#include "Vector4.hh"
#include "Operators.hh"

Include dependency graph for Matrix4x4.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Matrix4x4< T >
is a 'fixed size' quadratic matrix of dim. More...

Defines

#define | swap(a, b, tmp) tmp=a;a=b;b=tmp;

Define Documentation

#define swap | ( | a,
 |  | b,
 |  | tmp | ) | tmp=a;a=b;b=tmp;

Referenced by BIAS::ImageIO::ImportOpenEXR(), permute_args(), and BIAS::Matrix4x4< PMATRIX_TYPE >::TransposeIP().

Generated on Wed Jun 21 19:02:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Operators.hh File Reference

Base » Math

Operators.hh File Reference

#include <Base/Debug/Error.hh>
#include "tnt/cmat.h"

Include dependency graph for Operators.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

template<class T>
Vector2< T > | BIAS::operator+ (const Vector2< T > &vec, const T &scalar)
Addition operator with scalar argument, returning new vector.

Generated on Wed Jun 21 19:02:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Polynom.hh File Reference

Base » Math

Polynom.hh File Reference

#include "Base/Common/BIASpragmaStart.hh"
#include <vector>
#include "Base/Debug/Debug.hh"
#include "Base/Debug/Error.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Polynom.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Polynom
class for Polynoms of arbitary order More...

Functions

Polynom | BIAS::operator * (const Polynom &a, const double &d)
Polynom | BIAS::operator * (const double &d, const Polynom &a)
Polynom | BIAS::operator * (const Polynom &a, const Polynom &b)
Polynom | BIAS::operator+ (const Polynom &a, const Polynom &b)
Polynom | BIAS::operator- (const Polynom &a, const Polynom &b)

Generated on Wed Jun 21 19:02:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Random.cpp File Reference

Base » Math

Random.cpp File Reference

#include "Random.hh"
#include <cmath>
#include <cstdlib>
#include <stdlib.h>
#include <float.h>

Include dependency graph for Random.cpp:

Go to the source code of this file.

Defines

#define | AM (1.0/IM)
#define | EPS DBL_EPSILON
#define | IA 1366
#define | IA 16807
#define | IA1 7141
#define | IA2 8121
#define | IA3 4561
#define | IC 150889
#define | IC1 54773
#define | IC2 28411
#define | IC3 51349
#define | IM 2147483647
#define | IQ 127773
#define | IR 2836
#define | M 714025
#define | M1 259200
#define | M2 134456
#define | M3 243000
#define | NDIV (1+(IM-1)/NTAB)
#define | NTAB 32
#define | RM1 (1.0/M1)
#define | RM2 (1.0/M2)
#define | RNMX (1.0-EPS)

Variables

static bool | first = true

Define Documentation

#define AM (1.0/IM)

Definition at line 252 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define EPS DBL_EPSILON

Definition at line 257 of file Random.cpp.

#define IA 1366

Definition at line 355 of file Random.cpp.

#define IA 16807

Definition at line 355 of file Random.cpp.

Referenced by BIAS::Random::ran1_(), and BIAS::Random::ran2_().

#define IA1 7141

Definition at line 299 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IA2 8121

Definition at line 303 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IA3 4561

Definition at line 307 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IC 150889

Definition at line 356 of file Random.cpp.

Referenced by BIAS::Random::ran2_().

#define IC1 54773

Definition at line 300 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IC2 28411

Definition at line 304 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IC3 51349

Definition at line 308 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define IM 2147483647

Definition at line 251 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define IQ 127773

Definition at line 253 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define IR 2836

Definition at line 254 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define M 714025

Definition at line 354 of file Random.cpp.

Referenced by BIAS::PMatrixBase::Backproject(), TNT::Cholesky_upper_factorization(), BIAS::TrifocalTensorBase::Compose(), BIAS::TrifocalTensor::GetEpipolarLines(), BIAS::TrifocalTensor::GetPMatrix3(), BIAS::CovMatrix3x3::GetSearchArea(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::Lapack_LU_linear_solve(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3(), TNT::LU_factor(), main(), TNT::matmult(), MatrixSqrt(), TNT::mult_element(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), TNT::operator<<(), TNT::Region2D< Array2D >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), TNT::QR_factor(), BIAS::Random::ran2_(), and TNT::transpose().

#define M1 259200

Definition at line 298 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define M2 134456

Definition at line 302 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define M3 243000

Definition at line 306 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define NDIV (1+(IM-1)/NTAB)

Definition at line 256 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define NTAB 32

Definition at line 255 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

#define RM1 (1.0/M1)

Definition at line 301 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define RM2 (1.0/M2)

Definition at line 305 of file Random.cpp.

Referenced by BIAS::Random::ran1c_().

#define RNMX (1.0-EPS)

Definition at line 258 of file Random.cpp.

Referenced by BIAS::Random::ran1_().

Variable Documentation

bool first = true [static]

Definition at line 81 of file Random.cpp.

Referenced by BIAS::ColorMultiHistogram< StorageType >::GetDistROIs(), BIAS::Random::Reset(), and BIAS::Tracker< StorageType, CalculationType >::WriteTrackLog_().

Generated on Wed Jun 21 19:02:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Random.hh File Reference

Base » Math

Random.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <ctime>
#include <vector>
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include "Vector2.hh"
#include "Matrix2x2.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Random.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Random
class for producing random numbers from different distributions More...

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/RGB.hh File Reference

Base » Math

RGB.hh File Reference

#include "bias_config.h"
#include <Base/Math/Vector3.hh>

Include dependency graph for RGB.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Typedefs

typedef BIAS::Vector3< double > | BIAS::RGBd
typedef BIAS::Vector3< float > | BIAS::RGBf
typedef BIAS::Vector3< unsigned
char > 		BIAS::RGBuc

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/RGBA.hh File Reference

Base » Math

RGBA.hh File Reference

#include "bias_config.h"
#include <Base/Math/Vector4.hh>

Include dependency graph for RGBA.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | RGBAuc_WHITE_OPAQUE BIAS::RGBAuc(255,255,255, 255)
predefined colors opaque = not transparent
#define | RGBAuc_WHITE_SEMI BIAS::RGBAuc(255,255,255, 128)
semi transparent

Typedefs

typedef BIAS::Vector4< double > | BIAS::RGBAd
typedef BIAS::Vector4< float > | BIAS::RGBAf
typedef BIAS::Vector4< unsigned
char > 		BIAS::RGBAuc

Define Documentation

#define RGBAuc_WHITE_OPAQUE BIAS::RGBAuc(255,255,255, 255)

predefined colors opaque = not transparent

Definition at line 13 of file RGBA.hh.

#define RGBAuc_WHITE_SEMI BIAS::RGBAuc(255,255,255, 128)

semi transparent

Definition at line 16 of file RGBA.hh.

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D.cpp File Reference

Base » Math

Tensor3D.cpp File Reference

#include "Tensor3D.hh"

Include dependency graph for Tensor3D.cpp:

Go to the source code of this file.

Defines

#define INST(type) template class BIASMathBase_EXPORT BIAS::Tensor3D<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Tensor3D<type>;\

Definition at line 194 of file Tensor3D.cpp.

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D.hh File Reference

Base » Math

Tensor3D.hh File Reference

#include "Vector.hh"
#include <Base/Debug/Error.hh>

Include dependency graph for Tensor3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Tensor3D< T >

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D3x3x3.cpp File Reference

Base » Math

Tensor3D3x3x3.cpp File Reference

#include "Tensor3D3x3x3.hh"
#include "Matrix3x3.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for Tensor3D3x3x3.cpp:

Go to the source code of this file.

Defines

#define INST(type) template class BIASMathBase_EXPORT BIAS::Tensor3D3x3x3<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Tensor3D3x3x3<type>;\

Definition at line 160 of file Tensor3D3x3x3.cpp.

Generated on Wed Jun 21 19:03:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D3x3x3.hh File Reference

Base » Math

Tensor3D3x3x3.hh File Reference

#include "Tensor3D.hh"
#include "Matrix3x3.hh"
#include "Vector3.hh"

Include dependency graph for Tensor3D3x3x3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Tensor3D3x3x3< T >

Generated on Wed Jun 21 19:03:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector.cpp File Reference

Base » Math

Vector.cpp File Reference

#include "Vector.hh"
#include "Vector2.hh"
#include "Vector3.hh"
#include "Vector4.hh"
#include "Matrix.hh"
#include <iostream>
#include <fstream>

Include dependency graph for Vector.cpp:

Go to the source code of this file.

Defines

#define INST(type)
explicit instantiation

Define Documentation

#define INST ( type )

Value:

template class BIASMathBase_EXPORT BIAS::Vector<type>;\
template class BIASMathBase_EXPORT TNT::Vector<type>;\
explicit instantiation

Definition at line 194 of file Vector.cpp.

Generated on Wed Jun 21 19:03:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector.hh File Reference

Base » Math

Vector.hh File Reference

#include "bias_config.h"
#include "math.h"
#include "tnt/tnt.h"
#include "tnt/vec.h"
#include "Operators.hh"
#include <string>

Include dependency graph for Vector.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Vector< T >
class for column vectors with arbitrary size More...

Defines

#define | _USE_MATH_DEFINES

Variables

BIASMathBase_EXPORT | BIAS::Matrix
BIASMathBase_EXPORT | BIAS::Vector2
BIASMathBase_EXPORT | BIAS::Vector3
BIASMathBase_EXPORT | BIAS::Vector4

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 31 of file Vector.hh.

Generated on Wed Jun 21 19:03:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector2.cpp File Reference

Base » Math

Vector2.cpp File Reference

#include "Vector2.hh"
#include "Vector.hh"
#include "Matrix2x2.hh"
#include <iostream>
#include <fstream>

Include dependency graph for Vector2.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Vector2<type>;\
explicit instantiation

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Vector2<type>;\

explicit instantiation

Definition at line 168 of file Vector2.cpp.

Generated on Wed Jun 21 19:03:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector2.hh File Reference

Base » Math

Vector2.hh File Reference

#include "bias_config.h"
#include <math.h>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Math/Operators.hh>

Include dependency graph for Vector2.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Vector2< T >
class Vector2 contains a Vector of dim. More...

Defines

#define | _USE_MATH_DEFINES
#define | VECTOR2SIZE 2

Functions

template<class T>
Vector2< T > & | BIAS::operator *= (Vector2< T > &vec, const T &scalar)
Multiplication operator with scalar argument.
template<class T>
Vector2< T > & | BIAS::operator+= (Vector2< T > &vec, const T &scalar)
Addition operator with scalar argument.
template<class T>
BIASMathBase_EXPORT Vector2<
T > & 		BIAS::operator+= (Vector2< T > &vec, const Vector2< T > &argvec)
add operator for two Vectors
template<class T>
Vector2< T > & | BIAS::operator-= (Vector2< T > &vec, const T &scalar)
Substraction operator with scalar argument.
template<class T>
Vector2< T > & | BIAS::operator-= (Vector2< T > &vec, const Vector2< T > &argvec)
sub operator for two Vectors
template<class T>
Vector2< T > & | BIAS::operator/= (Vector2< T > &vec, const T &scalar)
Division operator with scalar argument.
template<class T>
BIASMathBase_EXPORT Vector2<
T > & 		BIAS::operator/= (Vector2< T > &vec, const Vector2< T > &argvec)
elementwise division
template<class T>
std::ostream & | BIAS::operator<< (std::ostream &os, const Vector2< T > &vec)
Output with streams.
template<class T>
std::istream & | BIAS::operator>> (std::istream &is, Vector2< T > &vec)
Input with streams.

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 31 of file Vector2.hh.

#define VECTOR2SIZE 2

Definition at line 45 of file Vector2.hh.

Referenced by BIAS::operator<<(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator[](), BIAS::Vector2< HOMGPOINT1D_TYPE >::Size(), and BIAS::Vector2< T >::Vector2().

Generated on Wed Jun 21 19:03:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector3.cpp File Reference

Base » Math

Vector3.cpp File Reference

#include "Vector3.hh"
#include "Vector.hh"
#include "math.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>

Include dependency graph for Vector3.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class BIASMathBase_EXPORT BIAS::Vector3<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Vector3<type>;\

Definition at line 288 of file Vector3.cpp.

Generated on Wed Jun 21 19:03:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector3.hh File Reference

Base » Math

Vector3.hh File Reference

#include <bias_config.h>
#include <iostream>
#include <vector>
#include <float.h>
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Operators.hh>

Include dependency graph for Vector3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Vector3< T >
class Vector3 contains a Vector of fixed dim. More...

Defines

#define | VECTOR3_SIZE 3

Define Documentation

#define VECTOR3_SIZE 3

Definition at line 41 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::operator<<(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::Vector3< T >::operator>>(), BIAS::Vector3< T >::operator[](), BIAS::Vector3< T >::Set(), BIAS::Vector3< HOMGPOINT2D_TYPE >::Size(), and BIAS::Vector3< T >::Vector3().

Generated on Wed Jun 21 19:03:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector4.cpp File Reference

Base » Math

Vector4.cpp File Reference

#include "Vector4.hh"
#include "Vector.hh"
#include <iostream>
#include <fstream>

Include dependency graph for Vector4.cpp:

Go to the source code of this file.

Defines

#define INST(type) template class BIASMathBase_EXPORT BIAS::Vector4<type>;\

Define Documentation

#define INST ( type ) template class BIASMathBase_EXPORT BIAS::Vector4<type>;\

Definition at line 91 of file Vector4.cpp.

Generated on Wed Jun 21 19:03:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector4.hh File Reference

Base » Math

Vector4.hh File Reference

#include "bias_config.h"
#include <iostream>
#include <iomanip>
#include <sstream>
#include <Base/Debug/Error.hh>
#include "Vector.hh"
#include "Matrix.hh"
#include "Matrix4x4.hh"
#include "Operators.hh"

Include dependency graph for Vector4.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Vector4< T >
class Vector4 contains a Vector of dim. More...

Defines

#define | VECTOR4SIZE 4

Functions

template<class T>
std::ostream & | BIAS::operator<< (std::ostream &os, const Vector4< T > &vec)
template<class T>
std::istream & | BIAS::operator>> (std::istream &is, Vector4< T > &vec)

Define Documentation

#define VECTOR4SIZE 4

Definition at line 44 of file Vector4.hh.

Referenced by BIAS::operator<<(), BIAS::Vector4< HOMGPOINT3D_TYPE >::operator=(), BIAS::Quaternion< QUAT_TYPE >::operator=(), BIAS::Vector4< T >::operator[](), BIAS::Vector4< T >::Size(), and BIAS::Vector4< T >::Vector4().

Generated on Wed Jun 21 19:03:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleLoadBan.cpp File Reference

Base » Math » Examples

ExampleLoadBan.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <bias_config.h>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Vector.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleLoadBan.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file ExampleLoadBan.cpp.

References BIAS_TESTS_DATA, BIASASSERT, BIAS::Matrix< T >::GetData(), and BIAS::Matrix3x4< T >::LoadBan().

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleLoadBOG.cpp File Reference

Base » Math » Examples

ExampleLoadBOG.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Matrix3x3.hh>

Include dependency graph for ExampleLoadBOG.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 26 of file ExampleLoadBOG.cpp.

References BIAS_TESTS_DATA, BIAS::Vector3< T >::GetData(), K, BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), and R.

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleOperators.cpp File Reference

Base » Math » Examples

ExampleOperators.cpp File Reference

#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Matrix4x4.hh>

Include dependency graph for ExampleOperators.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 41 of file ExampleOperators.cpp.

References BIAS::Matrix4x4< T >::SetIdentity(), and BIAS::Matrix< T >::SetIdentity().

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExamplePolynom.cpp File Reference

Base » Math » Examples

ExamplePolynom.cpp File Reference

#include <Base/Math/Polynom.hh>

Include dependency graph for ExamplePolynom.cpp:

Go to the source code of this file.

Functions

int main ()
void printPolynom (Polynom p)

Function Documentation

int main ( )

Definition at line 15 of file ExamplePolynom.cpp.

References a, and printPolynom().

void printPolynom ( Polynom p )

Definition at line 6 of file ExamplePolynom.cpp.

References BIAS::Polynom::GetOrder().

Referenced by main().

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom.cpp File Reference

Base » Math » Examples

ExampleRandom.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <cmath>
#include <cstring>
#include <Base/Math/Random.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleRandom.cpp:

Go to the source code of this file.

Defines

#define | HIST_BIN_COUNT 64

Functions

int | main ()

Define Documentation

#define HIST_BIN_COUNT 64

Definition at line 37 of file ExampleRandom.cpp.

Referenced by main().

Function Documentation

int main ( )

Definition at line 40 of file ExampleRandom.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::Random::GetUniformDistributed(), HIST_BIN_COUNT, max, min, num, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:02:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom2.cpp File Reference

Base » Math » Examples

ExampleRandom2.cpp File Reference

#include <cmath>
#include <cstring>
#include <Base/Math/Random.hh>

Include dependency graph for ExampleRandom2.cpp:

Go to the source code of this file.

Defines

#define | COUNT 1000

Functions

int | main ()

Define Documentation

#define COUNT 1000

Definition at line 33 of file ExampleRandom2.cpp.

Referenced by main().

Function Documentation

int main ( )

Definition at line 36 of file ExampleRandom2.cpp.

References COUNT, BIAS::Random::GetNormalDistributed(), and mean.

Generated on Wed Jun 21 19:02:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom2D.cpp File Reference

Base » Math » Examples

ExampleRandom2D.cpp File Reference

#include <cmath>
#include <cstring>
#include <Base/Math/Random.hh>

Include dependency graph for ExampleRandom2D.cpp:

Go to the source code of this file.

Defines

#define | COUNT 9000

Functions

int | main ()

Define Documentation

#define COUNT 9000

Definition at line 38 of file ExampleRandom2D.cpp.

Function Documentation

int main ( )

Definition at line 41 of file ExampleRandom2D.cpp.

References BIASERR, COUNT, cov, BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), mean, BIAS::Random::Reset(), and BIAS::Matrix< T >::SetZero().

Generated on Wed Jun 21 19:02:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/cholesky.h File Reference

Base » Math » tnt

cholesky.h File Reference

#include <cmath>

Include dependency graph for cholesky.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Functions

template<class SPDMatrix, class SymmMatrix>
int | TNT::Cholesky_upper_factorization (SPDMatrix &A, SymmMatrix &L)

Generated on Wed Jun 21 19:03:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/cmat.h File Reference

Base » Math » tnt

cmat.h File Reference

#include "subscript.h"
#include "vec.h"
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>

Include dependency graph for cmat.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Matrix< T >

Functions

template<class T>
Vector< T > | TNT::matmult (const Matrix< T > &A, const Vector< T > &x)
template<class T>
int | TNT::matmult (Matrix< T > &C, const Matrix< T > &A, const Matrix< T > &B)
template<class T>
Matrix< T > | TNT::matmult (const Matrix< T > &A, const Matrix< T > &B)
template<class T>
Matrix< T > | TNT::mult_element (const Matrix< T > &A, const Matrix< T > &B)
template<class T>
Matrix< T > | TNT::transpose (const Matrix< T > &A)

Generated on Wed Jun 21 19:03:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fcscmat.h File Reference

Base » Math » tnt

fcscmat.h File Reference

#include <iostream>
#include <cassert>
#include "tnt.h"
#include "vec.h"

Include dependency graph for fcscmat.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Fortran_Sparse_Col_Matrix< T >

Functions

template<class T>
ostream & | TNT::operator<< (ostream &s, const Fortran_Sparse_Col_Matrix< T > &A)

Generated on Wed Jun 21 19:03:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fmat.h File Reference

Base » Math » tnt

fmat.h File Reference

#include "subscript.h"
#include "vec.h"
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <sstream>

Include dependency graph for fmat.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Fortran_Matrix< T >

Functions

template<class T>
Vector< T > | TNT::matmult (const Fortran_Matrix< T > &A, const Vector< T > &x)
template<class T>
int | TNT::matmult (Fortran_Matrix< T > &C, const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | TNT::matmult (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | TNT::mult_element (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | TNT::operator * (const Fortran_Matrix< T > &A, const T &x)
template<class T>
Vector< T > | TNT::operator * (const Fortran_Matrix< T > &A, const Vector< T > &x)
template<class T>
Fortran_Matrix< T > | TNT::operator * (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | TNT::operator+ (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | TNT::operator- (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
std::ostream & | TNT::operator<< (std::ostream &s, const Fortran_Matrix< T > &A)
template<class T>
std::istream & | TNT::operator>> (std::istream &s, Fortran_Matrix< T > &A)
template<class T>
Fortran_Matrix< T > | TNT::transpose (const Fortran_Matrix< T > &A)

Generated on Wed Jun 21 19:03:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fortran.h File Reference

Base » Math » tnt

fortran.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | TNT_SUBSCRIPT_TYPE TNT::Fortran_integer

Typedefs

typedef char * | cfch_
typedef const Fortran_double * | cfd_
typedef const Fortran_double * | cfda_
typedef const Fortran_float * | cff_
typedef const Fortran_float * | cffa_
typedef const Fortran_integer * | cfi_
typedef const Fortran_integer * | cfia_
typedef char * | fch_
typedef Fortran_double * | fd_
typedef Fortran_double * | fda_
typedef Fortran_float * | ff_
typedef Fortran_float * | ffa_
typedef Fortran_integer * | fi_
typedef Fortran_integer * | fia_
typedef double | Fortran_double
typedef float | Fortran_float
typedef int | Fortran_integer

Define Documentation

#define TNT_SUBSCRIPT_TYPE TNT::Fortran_integer

Definition at line 70 of file fortran.h.

Typedef Documentation

typedef char* cfch_

Definition at line 65 of file fortran.h.

typedef const Fortran_double* cfd_

Definition at line 50 of file fortran.h.

typedef const Fortran_double* cfda_

Definition at line 47 of file fortran.h.

typedef const Fortran_float* cff_

Definition at line 56 of file fortran.h.

typedef const Fortran_float* cffa_

Definition at line 53 of file fortran.h.

typedef const Fortran_integer* cfi_

Definition at line 62 of file fortran.h.

typedef const Fortran_integer* cfia_

Definition at line 59 of file fortran.h.

typedef char* fch_

Definition at line 64 of file fortran.h.

typedef Fortran_double* fd_

Definition at line 49 of file fortran.h.

typedef Fortran_double* fda_

Definition at line 46 of file fortran.h.

typedef Fortran_float* ff_

Definition at line 55 of file fortran.h.

typedef Fortran_float* ffa_

Definition at line 52 of file fortran.h.

typedef Fortran_integer* fi_

Definition at line 61 of file fortran.h.

typedef Fortran_integer* fia_

Definition at line 58 of file fortran.h.

typedef double Fortran_double

Definition at line 43 of file fortran.h.

typedef float Fortran_float

Definition at line 42 of file fortran.h.

typedef int Fortran_integer

Definition at line 41 of file fortran.h.

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fspvec.h File Reference

Base » Math » tnt

fspvec.h File Reference

#include "tnt.h"
#include "vec.h"
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <strstream>

Include dependency graph for fspvec.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Fortran_Sparse_Vector< T >

Functions

template<class T>
ostream & | TNT::operator<< (ostream &s, const Fortran_Sparse_Vector< T > &A)
template<class T>
istream & | TNT::operator>> (istream &s, Fortran_Sparse_Vector< T > &A)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/index.h File Reference

Base » Math » tnt

index.h File Reference

#include "subscript.h"

Include dependency graph for index.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Index1D

Functions

Index1D | TNT::operator+ (Subscript i, const Index1D &D)
Index1D | TNT::operator+ (const Index1D &D, Subscript i)
Index1D | TNT::operator- (Subscript i, Index1D &D)
Index1D | TNT::operator- (Index1D &D, Subscript i)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/lapack.h File Reference

Base » Math » tnt

lapack.h File Reference

#include "fortran.h"
#include "vec.h"
#include "fmat.h"

Include dependency graph for lapack.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Defines

#define | F77_DGEEV dgeev_
#define | F77_DGELS dgels_
#define | F77_DGESV dgesv_
#define | F77_DGESVD dgesvd_
#define | F77_DSYEV dsyev_

Functions

int | TNT::eigenproblem_special_quadratic_matrix_solve (const Fortran_Matrix< double > &A, Vector< double > &ret_EigenValuesRealPart, Vector< double > &ret_EigenValuesImagPart, Fortran_Matrix< double > &eigenVecMatrixR)
solve general eigenproblem for a general quadratix (n x n) matrix.
int | TNT::eigenvalue_solve (const Fortran_Matrix< double > &A, Vector< double > &wr, Vector< double > &wi)
void | F77_DGEEV (cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda, fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr, cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info)
void | F77_DGELS (cfch_ trans, cfi_ M, cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda, fda_ B, cfi_ ldb, fda_ work, cfi_ lwork, fi_ info)
void | F77_DGESV (cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda, fia_ ipiv, fda_ b, cfi_ ldb, fi_ info)
void | F77_DGESVD (cfch_ JOBU, cfch_ JOBVT, fi_ M, fi_ N, fda_ A, fi_ LDA, fda_ S, fda_ U, fi_ LDU, fda_ VT, fi_ LDVT, fda_ WORK, fi_ LWORK, fi_ INFO)
[see fortran.h for typedefs] SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )
void | F77_DSYEV (cfch_ jobz, cfch_ uplo, cfi_ N, fda_ A, cfi_ lda, fda_ W, fda_ work, cfi_ lwork, fi_ info)
Vector< double > | TNT::Lapack_LLS_QR_linear_solve (const Fortran_Matrix< double > &A, const Vector< double > &b)
Vector< double > | TNT::Lapack_LU_linear_solve (const Fortran_Matrix< double > &A, const Vector< double > &b)
int | TNT::singular_value_decomposition_general_rectangular_matrix_solve (const Fortran_Matrix< double > &A, Vector< double > &ret_S, Fortran_Matrix< double > &ret_U, Fortran_Matrix< double > &ret_VT)
solve general eigenproblem.
Vector< double > | TNT::Upper_symmetric_eigenvalue_solve (const Fortran_Matrix< double > &A)

Define Documentation

#define F77_DGEEV dgeev_

Definition at line 52 of file lapack.h.

Referenced by Eigenproblem_quadratic_matrix(), TNT::eigenproblem_special_quadratic_matrix_solve(), Eigenvalue_solve(), and TNT::eigenvalue_solve().

#define F77_DGELS dgels_

Definition at line 48 of file lapack.h.

Referenced by Lapack_LLS_QR_linear_solve(), and TNT::Lapack_LLS_QR_linear_solve().

#define F77_DGESV dgesv_

Definition at line 47 of file lapack.h.

Referenced by Lapack_LU_linear_solve(), and TNT::Lapack_LU_linear_solve().

#define F77_DGESVD dgesvd_

Definition at line 54 of file lapack.h.

Referenced by General_singular_value_decomposition(), and TNT::singular_value_decomposition_general_rectangular_matrix_solve().

#define F77_DSYEV dsyev_

Definition at line 49 of file lapack.h.

Referenced by Upper_symmetric_eigenvalue_solve(), and TNT::Upper_symmetric_eigenvalue_solve().

Function Documentation

void F77_DGEEV | ( | cfch_ | jobvl,
 |  | cfch_ | jobvr,
 |  | cfi_ | N,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | wr,
 |  | fda_ | wi,
 |  | fda_ | vl,
 |  | cfi_ | ldvl,
 |  | fda_ | vr,
 |  | cfi_ | ldvr,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void F77_DGELS | ( | cfch_ | trans,
 |  | cfi_ | M,
 |  | cfi_ | N,
 |  | cfi_ | nrhs,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | B,
 |  | cfi_ | ldb,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void F77_DGESV | ( | cfi_ | N,
 |  | cfi_ | nrhs,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fia_ | ipiv,
 |  | fda_ | b,
 |  | cfi_ | ldb,
 |  | fi_ | info
 | ) |

void F77_DGESVD | ( | cfch_ | JOBU,
 |  | cfch_ | JOBVT,
 |  | fi_ | M,
 |  | fi_ | N,
 |  | fda_ | A,
 |  | fi_ | LDA,
 |  | fda_ | S,
 |  | fda_ | U,
 |  | fi_ | LDU,
 |  | fda_ | VT,
 |  | fi_ | LDVT,
 |  | fda_ | WORK,
 |  | fi_ | LWORK,
 |  | fi_ | INFO
 | ) |

[see fortran.h for typedefs] SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )

Scalar Arguments: CHARACTER JOBU, JOBVT INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N

Array Arguments: DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )

Purpose =======

DGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors. The SVD is written

A = U * SIGMA * transpose(V)

where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns V**T, not V. (JW, 03/2002)

void F77_DSYEV | ( | cfch_ | jobz,
 |  | cfch_ | uplo,
 |  | cfi_ | N,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | W,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/lu.h File Reference

Base » Math » tnt

lu.h File Reference

#include <cmath>

Include dependency graph for lu.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Functions

template<class MaTRiX, class VecToRSubscript>
int | TNT::LU_factor (MaTRiX &A, VecToRSubscript &indx)
template<class MaTRiX, class VecToR, class VecToRSubscripts>
int | TNT::LU_solve (const MaTRiX &A, const VecToRSubscripts &indx, VecToR &b)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/qr.h File Reference

Base » Math » tnt

qr.h File Reference

#include <cmath>
#include "tntmath.h"

Include dependency graph for qr.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Functions

template<class MaTRiX, class Vector>
int | TNT::QR_factor (MaTRiX &A, Vector &C, Vector &D)
template<class MaTRiX, class Vector>
int | TNT::QR_solve (const MaTRiX &A, const Vector &c, Vector &d, Vector &b)
template<class MaTRiX, class Vector>
int | TNT::R_solve (const MaTRiX &A, Vector &D, Vector &b)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/region1d.h File Reference

Base » Math » tnt

region1d.h File Reference

#include "subscript.h"
#include "index.h"
#include <iostream>
#include <cassert>

Include dependency graph for region1d.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::const_Region1D< Array1D >
class | TNT::Region1D< Array1D >

Functions

template<class Array1D>
std::ostream & | TNT::operator<< (std::ostream &s, const_Region1D< Array1D > &A)
template<class Array1D>
std::ostream & | TNT::operator<< (std::ostream &s, Region1D< Array1D > &A)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/region2d.h File Reference

Base » Math » tnt

region2d.h File Reference

#include "index.h"
#include <iostream>
#include <cassert>

Include dependency graph for region2d.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::const_Region2D< Array2D >
class | TNT::Region2D< Array2D >

Functions

template<class Array2D>
std::ostream & | TNT::operator<< (std::ostream &s, const Region2D< Array2D > &A)
template<class Array2D>
std::ostream & | TNT::operator<< (std::ostream &s, const const_Region2D< Array2D > &A)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/stopwatch.h File Reference

Base » Math » tnt

stopwatch.h File Reference

#include <ctime>

Include dependency graph for stopwatch.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::stopwatch

Functions

double | TNT::seconds (void)

Generated on Wed Jun 21 19:03:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/subscript.h File Reference

Base » Math » tnt

subscript.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Defines

#define | TNT_BASE_OFFSET (1)
#define | TNT_SUBSCRIPT_TYPE int

Typedefs

typedef TNT_SUBSCRIPT_TYPE | TNT::Subscript

Define Documentation

#define TNT_BASE_OFFSET (1)

Definition at line 64 of file subscript.h.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D(), TNT::const_Region2D< Array2D >::const_Region2D(), TNT::Vector_Adaptor< BBVec >::dim(), TNT::const_Region2D< Array2D >::dim(), TNT::const_Region1D< Array1D >::dim(), TNT::Region1D< Array1D >::dim(), TNT::const_Region2D< Array2D >::offset(), TNT::const_Region1D< Array1D >::offset(), TNT::Region1D< Array1D >::offset(), TNT::const_Region2D< Array2D >::operator()(), TNT::const_Region1D< Array1D >::operator()(), TNT::Region1D< Array1D >::operator()(), TNT::Region1D< Array1D >::operator=(), and TNT::Region1D< Array1D >::Region1D().

#define TNT_SUBSCRIPT_TYPE int

Definition at line 50 of file subscript.h.

Generated on Wed Jun 21 19:03:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tnt.h File Reference

Base » Math » tnt

tnt.h File Reference

#include <bias_config.h>
#include "version.h"
#include "subscript.h"
#include "tntmath.h"

Include dependency graph for tnt.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TNT_BOUNDS_CHECK

Define Documentation

#define TNT_BOUNDS_CHECK

Definition at line 72 of file tnt.h.

Generated on Wed Jun 21 19:03:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tntmath.h File Reference

Base » Math » tnt

tntmath.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Functions

float | TNT::abs (float t)
double | TNT::abs (double t)
float | TNT::max (float a, float b)
double | TNT::max (int a, int b)
double | TNT::max (double a, double b)
float | TNT::min (float a, float b)
double | TNT::min (int a, int b)
double | TNT::min (double a, double b)
float | TNT::sign (float a)
double | TNT::sign (double a)

Generated on Wed Jun 21 19:03:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tntreqs.h File Reference

Base » Math » tnt

tntreqs.h File Reference

Go to the source code of this file.

Generated on Wed Jun 21 19:03:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/transv.h File Reference

Base » Math » tnt

transv.h File Reference

#include <iostream>
#include <cassert>
#include "vec.h"

Include dependency graph for transv.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Transpose_View< Array2D >

Functions

template<class Matrix, class T>
Vector< T > | TNT::matmult (const Transpose_View< Matrix > &A, const Vector< T > &B)
template<class Matrix, class T>
Vector< T > | TNT::operator * (const Transpose_View< Matrix > &A, const Vector< T > &B)
template<class Matrix>
std::ostream & | TNT::operator<< (std::ostream &s, const Transpose_View< Matrix > &A)
template<class Matrix>
Transpose_View< Matrix > | TNT::Transpose_view (const Matrix &A)

Generated on Wed Jun 21 19:03:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/triang.h File Reference

Base » Math » tnt

triang.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::LowerTriangularView< MaTRiX >
class | TNT::UnitLowerTriangularView< MaTRiX >
class | TNT::UnitUpperTriangularView< MaTRiX >
class | TNT::UpperTriangularView< MaTRiX >

Functions

template<class MaTRiX>
LowerTriangularView< MaTRiX > | TNT::Lower_triangular_view (MaTRiX &A)
template<class MaTRiX, class VecToR>
VecToR | TNT::matmult (UnitUpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::matmult (UpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::matmult (UnitLowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::matmult (LowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::operator * (UnitUpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::operator * (UpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::operator * (UnitLowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | TNT::operator * (LowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX>
std::ostream & | TNT::operator<< (std::ostream &s, UnitUpperTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | TNT::operator<< (std::ostream &s, UpperTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | TNT::operator<< (std::ostream &s, const UnitLowerTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | TNT::operator<< (std::ostream &s, const LowerTriangularView< MaTRiX > &A)
template<class MaTRiX>
UnitLowerTriangularView< MaTRiX > | TNT::Unit_lower_triangular_view (MaTRiX &A)
template<class MaTRiX>
UnitUpperTriangularView< MaTRiX > | TNT::Unit_upper_triangular_view (MaTRiX &A)
template<class MaTRiX>
UpperTriangularView< MaTRiX > | TNT::Upper_triangular_view (MaTRiX &A)

Generated on Wed Jun 21 19:03:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/trisolve.h File Reference

Base » Math » tnt

trisolve.h File Reference

#include "triang.h"

Include dependency graph for trisolve.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Functions

template<class MaTriX, class VecToR>
VecToR | TNT::linear_solve (UnitUpperTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::linear_solve (UpperTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::linear_solve (UnitLowerTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::linear_solve (LowerTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::Lower_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::Unit_lower_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::Unit_upper_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | TNT::Upper_triangular_solve (MaTriX &A, VecToR &b)

Generated on Wed Jun 21 19:03:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/vec.h File Reference

Base » Math » tnt

vec.h File Reference

#include "subscript.h"
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>

Include dependency graph for vec.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Vector< T >

Functions

template<class T>
T | TNT::dot_prod (const Vector< T > &A, const Vector< T > &B)
template<class T>
Vector< T > | TNT::operator * (const Vector< T > &A, const Vector< T > &B)
template<class T>
Vector< T > | TNT::operator+ (const Vector< T > &A, const Vector< T > &B)
template<class T>
Vector< T > | TNT::operator- (const Vector< T > &A, const Vector< T > &B)
template<class T>
std::ostream & | TNT::operator<< (std::ostream &s, const Vector< T > &A)
template<class T>
std::istream & | TNT::operator>> (std::istream &s, Vector< T > &A)

Generated on Wed Jun 21 19:03:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/vecadaptor.h File Reference

Base » Math » tnt

vecadaptor.h File Reference

#include <cstdlib>
#include <iostream>
#include <strstream>
#include <cassert>
#include "subscript.h"

Include dependency graph for vecadaptor.h:

Go to the source code of this file.

Namespaces

namespace | TNT

Classes

class | TNT::Vector_Adaptor< BBVec >

Functions

template<class BBVec>
std::ostream & | TNT::operator<< (std::ostream &s, const Vector_Adaptor< BBVec > &A)
template<class BBVec>
std::istream & | TNT::operator>> (std::istream &s, Vector_Adaptor< BBVec > &A)

Generated on Wed Jun 21 19:03:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/version.h File Reference

Base » Math » tnt

version.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | TNT_MAJOR_VERSION '0'
#define | TNT_MINOR_VERSION '9'
#define | TNT_SUBMINOR_VERSION '4'
#define | TNT_VERSION_STRING "0.9.4"

Define Documentation

#define TNT_MAJOR_VERSION '0'

Definition at line 23 of file version.h.

#define TNT_MINOR_VERSION '9'

Definition at line 24 of file version.h.

#define TNT_SUBMINOR_VERSION '4'

Definition at line 25 of file version.h.

#define TNT_VERSION_STRING "0.9.4"

Definition at line 26 of file version.h.

Generated on Wed Jun 21 19:03:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ColorHarris.cpp File Reference

FeatureDetector

ColorHarris.cpp File Reference

#include <Base/Image/ImageIO.hh>
#include "ColorHarris.hh"
#include "Gauss.hh"
#include "GaussDeriv.hh"
#include <Base/Image/ImageConvert.hh>

Include dependency graph for ColorHarris.cpp:

Go to the source code of this file.

Defines

#define | GRAD_UCHAR_ZERO 0

Functions

static void | createst (Image< signed char > &dx, Image< signed char > &dy, Image< short > &st)
static void | createst2 (Image< signed char > &dx_plan, Image< signed char > &dy_plan, Image< short > &st)
static int | mysobel (const Image< unsigned char > &src, Image< signed char > &gradWE, Image< signed char > &gradNS)
static int | mysobel2 (const Image< unsigned char > &src, Image< signed char > &gradWE, Image< signed char > &gradNS)
static int | mytoplanar (const Image< unsigned char > &src, Image< unsigned char > &dst)

Define Documentation

#define GRAD_UCHAR_ZERO 0

Function Documentation

static void createst | ( | Image< signed char > & | dx,
 |  | Image< signed char > & | dy,
 |  | Image< short > & | st
 | ) | [static]

Definition at line 483 of file ColorHarris.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ImageBase::SetColorModel().

static void createst2 | ( | Image< signed char > & | dx_plan,
 |  | Image< signed char > & | dy_plan,
 |  | Image< short > & | st
 | ) | [static]

Definition at line 543 of file ColorHarris.cpp.

References BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SetColorModel().

static int mysobel | ( | const Image< unsigned char > & | src,
 |  | Image< signed char > & | gradWE,
 |  | Image< signed char > & | gradNS
 | ) | [static]

Definition at line 90 of file ColorHarris.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageDataArray(), gx, gy, and BIAS::ImageBase::SetROI().

static int mysobel2 | ( | const Image< unsigned char > & | src,
 |  | Image< signed char > & | gradWE,
 |  | Image< signed char > & | gradNS
 | ) | [static]

Definition at line 305 of file ColorHarris.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::SetROI().

static int mytoplanar | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst
 | ) | [static]

Definition at line 59 of file ColorHarris.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ImageBase::SetColorModel().

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ColorHarris.hh File Reference

FeatureDetector

ColorHarris.hh File Reference

#include "bias_config.h"
#include "Base/Debug/Debug.hh"
#include "Base/Image/Image.hh"
#include "Base/Debug/TimeMeasure.hh"
#include "GradientSobel3x3.hh"

Include dependency graph for ColorHarris.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ColorHarris

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorBase.cpp File Reference

FeatureDetector

CornerDetectorBase.cpp File Reference

#include "CornerDetectorBase.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for CornerDetectorBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorBase.hh File Reference

FeatureDetector

CornerDetectorBase.hh File Reference

#include <string>
#include <Base/Image/Image.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Utils/Param.hh>

Include dependency graph for CornerDetectorBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerDetectorBase< StorageType >
purly virtual interface defining class for corner detectors More...

Defines

#define | D_CD_FEATURES 0x00000008
#define | D_CD_INIT 0x00000010
#define | D_CD_SUSAN 0x00000001
#define | D_CD_SUSAN_QUALITY 0x00000002
#define | D_CD_WRITE_DEBUG_IM 0x00000004
#define | QUAL float

Define Documentation

#define D_CD_FEATURES 0x00000008

Definition at line 40 of file CornerDetectorBase.hh.

Referenced by main().

#define D_CD_INIT 0x00000010

Definition at line 41 of file CornerDetectorBase.hh.

#define D_CD_SUSAN 0x00000001

Definition at line 37 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), and BIAS::CornerDetectorSusan< StorageType >::Detect().

#define D_CD_SUSAN_QUALITY 0x00000002

Definition at line 38 of file CornerDetectorBase.hh.

#define D_CD_WRITE_DEBUG_IM 0x00000004

Definition at line 39 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), and main().

#define QUAL float

Definition at line 35 of file CornerDetectorBase.hh.

Generated on Wed Jun 21 19:03:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorFoerstner.cpp File Reference

FeatureDetector

CornerDetectorFoerstner.cpp File Reference

#include "CornerDetectorFoerstner.hh"

Include dependency graph for CornerDetectorFoerstner.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorFoerstner.hh File Reference

FeatureDetector

CornerDetectorFoerstner.hh File Reference

#include "CornerDetectorGradient.hh"

Include dependency graph for CornerDetectorFoerstner.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
foerstner corner detector, detects grey value corners in images More...

Generated on Wed Jun 21 19:03:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorGradient.cpp File Reference

FeatureDetector

CornerDetectorGradient.cpp File Reference

#include <algorithm>
#include "CornerDetectorGradient.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for CornerDetectorGradient.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorGradient.hh File Reference

FeatureDetector

CornerDetectorGradient.hh File Reference

#include "CornerDetectorBase.hh"
#include <Filter/StructureTensor.hh>
#include <Filter/Gauss.hh>
#include <Base/Math/Matrix2x2.hh>

Include dependency graph for CornerDetectorGradient.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS
namespace | std

Classes

class | BIAS::CornerDetectorGradient< StorageType, CalculationType >
base class for all gradient based corner detectors More...
class | BIAS::Feat
internal class for feature passing only More...

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const Feat &f)

Generated on Wed Jun 21 19:03:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorHarris.cpp File Reference

FeatureDetector

CornerDetectorHarris.cpp File Reference

#include "CornerDetectorHarris.hh"

Include dependency graph for CornerDetectorHarris.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorHarris.hh File Reference

FeatureDetector

CornerDetectorHarris.hh File Reference

#include "CornerDetectorGradient.hh"

Include dependency graph for CornerDetectorHarris.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerDetectorHarris< StorageType, CalculationType >
harris corner detector, detects grey value corners in images More...

Generated on Wed Jun 21 19:03:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorKLT.cpp File Reference

FeatureDetector

CornerDetectorKLT.cpp File Reference

#include "CornerDetectorKLT.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <limits.h>
#include <algorithm>

Include dependency graph for CornerDetectorKLT.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorKLT.hh File Reference

FeatureDetector

CornerDetectorKLT.hh File Reference

#include "CornerDetectorGradient.hh"

Include dependency graph for CornerDetectorKLT.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerDetectorKLT< StorageType, CalculationType >
computes the cornerness as the smaller eigenvalue of the structure tensor matrix More...

Generated on Wed Jun 21 19:03:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorSusan.cpp File Reference

FeatureDetector

CornerDetectorSusan.cpp File Reference

#include "CornerDetectorSusan.hh"

Include dependency graph for CornerDetectorSusan.cpp:

Go to the source code of this file.

Defines

#define FTOI(a) ( (a) < 0 ? ((int)(a-0.5)) : ((int)(a+0.5)) )

Define Documentation

#define FTOI ( a ) ( (a) < 0 ? ((int)(a-0.5)) : ((int)(a+0.5)) )

Definition at line 192 of file CornerDetectorSusan.cpp.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners().

Generated on Wed Jun 21 19:03:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorSusan.hh File Reference

FeatureDetector

CornerDetectorSusan.hh File Reference

#include "CornerDetectorBase.hh"

Include dependency graph for CornerDetectorSusan.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerDetectorSusan< StorageType >
The Susan corner detector (oxford implementation, see license). More...
class | BIAS::cornerstruct
used only by Susan corner detector More...

Defines

#define | DEFAULT_QUICK false
#define | DEFAULT_THRESH 50
#define | MAX_CORNERS 10000
max corners per frame, for susan and our "harris"
#define | SEVEN_SUPP
size for non-max corner suppression; SEVEN_SUPP or FIVE_SUPP

Typedefs

typedef cornerstruct | BIAS::CORNER_LIST [MAX_CORNERS]

Define Documentation

#define DEFAULT_QUICK false

Definition at line 196 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan().

#define DEFAULT_THRESH 50

Definition at line 195 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan().

#define MAX_CORNERS 10000

max corners per frame, for susan and our "harris"

Definition at line 200 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), and BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick().

#define SEVEN_SUPP

size for non-max corner suppression; SEVEN_SUPP or FIVE_SUPP

Definition at line 198 of file CornerDetectorSusan.hh.

Generated on Wed Jun 21 19:03:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/LinearRegionDetector.cpp File Reference

FeatureDetector

LinearRegionDetector.cpp File Reference

#include "LinearRegionDetector.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <limits.h>
#include <algorithm>

Include dependency graph for LinearRegionDetector.cpp:

Go to the source code of this file.

Defines

#define MIN_EIGENVALUE_RATIO 4.0

Define Documentation

#define MIN_EIGENVALUE_RATIO 4.0

Definition at line 32 of file LinearRegionDetector.cpp.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness().

Generated on Wed Jun 21 19:03:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/LinearRegionDetector.hh File Reference

FeatureDetector

LinearRegionDetector.hh File Reference

#include "CornerDetectorGradient.hh"

Include dependency graph for LinearRegionDetector.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::LinearRegionDetector< StorageType, CalculationType >
try to detect linear regions (const gradient) in images, experimental code for testing More...

Generated on Wed Jun 21 19:03:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/Examples/ExampleCornerDetector.cpp File Reference

FeatureDetector » Examples

ExampleCornerDetector.cpp File Reference

#include <bias_config.h>
#include <FeatureDetector/CornerDetectorFoerstner.hh>
#include <FeatureDetector/CornerDetectorHarris.hh>
#include <FeatureDetector/CornerDetectorSusan.hh>
#include <FeatureDetector/CornerDetectorKLT.hh>
#include <FeatureDetector/LinearRegionDetector.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleCornerDetector.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "CornerDetector.ini"
#define | KernelType float
#define | StorageType float
#define | type 1

Functions

void | Draw (Image< unsigned char > &im, vector< HomgPoint2D > &p)
int | main (int argc, char *argv[])

Define Documentation

#define DEFAULT_PARA_FILE_NAME "CornerDetector.ini"

Definition at line 38 of file ExampleCornerDetector.cpp.

Referenced by main().

#define KernelType float

Definition at line 54 of file ExampleCornerDetector.cpp.

#define StorageType float

Definition at line 53 of file ExampleCornerDetector.cpp.

Referenced by BIAS::RegionMatcher::_Bilinear(), BIAS::RegionMatcher::_BilinearRegion(), BIAS::CornerDetectorSusan< StorageType >::_int_to_uchar(), BIAS::CornerDetectorSusan< StorageType >::_setup_brightness_lut(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::Image< StorageType >::Binarize(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::Image< StorageType >::CalcScaleShift(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::Image< CalculationType >::Clear(), BIAS::RegionMatcher::CNCC(), BIAS::RegionMatcher::ColorCCV(), BIAS::RegionMatcher::ColorNCC(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::ImageIO::ExportMagickPP(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ImageDraw< StorageType >::GetContrastValue(), BIAS::Image< CalculationType >::GetImageData(), BIAS::Image< CalculationType >::GetImageDataArray(), BIAS::Image< StorageType >::GetMaxPixelValue(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::Image< StorageType >::GetMinPixelValue(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageConvert::HSLToGrey_(), BIAS::Image< StorageType >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageBase::Init(), BIAS::ImageDraw< StorageType >::InterpolatedLineGrey(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_YUV422ToGrey_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::ImageDraw< StorageType >::Line(), BIAS::RegionMatcher::LineMatcherNCC(), BIAS::RegionMatcher::LineMatcherSAD(), main(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< StorageType >::operator=(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill(), BIAS::CornerMatcher::RefinePyramideNCC(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::RegionMatcher::SAD(), BIAS::RegionMatcher::SADN(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::YUV420PToGrey_(), BIAS::ImageConvert::YUV420PToRGB_(), BIAS::ImageConvert::YUV422ToGrey_(), and BIAS::ImageConvert::YUV422ToRGB_().

#define type 1

Definition at line 40 of file ExampleCornerDetector.cpp.

Referenced by BIAS::EightWaySymmetry< T >::DetermineLineType(), BIAS::ImageDraw< StorageType >::InterpolatedLineGrey(), and BIAS::OpenGLCanvasBase::ScreenShot().

Function Documentation

void Draw | ( | Image< unsigned char > & | im,
 |  | vector< HomgPoint2D > & | p
 | ) |

Definition at line 58 of file ExampleCornerDetector.cpp.

Referenced by main(), and Track().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 76 of file ExampleCornerDetector.cpp.

References BIAS::Debug::AddDebugLevel(), BIASABORT, BIASERR, cd, cdt, D_CD_FEATURES, D_CD_WRITE_DEBUG_IM, DEFAULT_PARA_FILE_NAME, BIAS::CornerDetectorBase< StorageType >::Detect(), BIAS::Param::DisableDestructorWarning(), Draw(), BIAS::Param::GetFreeGroupID(), p, para, qual, r, BIAS::Param::SetGroupName(), BIAS::Param::UpdateParameter(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:03:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Binomial.cpp File Reference

Filter

Binomial.cpp File Reference

#include "Binomial.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for Binomial.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Binomial

Define Documentation

#define FILTER_INSTANTIATION_CLASS Binomial

Definition at line 545 of file Binomial.cpp.

Generated on Wed Jun 21 19:03:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Binomial.hh File Reference

Filter

Binomial.hh File Reference

#include "Convolution.hh"

Include dependency graph for Binomial.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Binomial< InputStorageType, OutputStorageType >

Defines

#define | D_BINOMIAL_KERNEL 0x00010000
#define | D_BINOMIAL_WRITE_IM 0x00020000

Define Documentation

#define D_BINOMIAL_KERNEL 0x00010000

Definition at line 30 of file Binomial.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), and main().

#define D_BINOMIAL_WRITE_IM 0x00020000

Definition at line 31 of file Binomial.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

Generated on Wed Jun 21 19:03:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Convolution.cpp File Reference

Filter

Convolution.cpp File Reference

#include "Convolution.hh"
#include "Base/Image/ImageIO.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for Convolution.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS Convolution
#define | KERNCENTER(thesize) ((thesize-1)>>1)

Define Documentation

#define FILTER_INSTANTIATION_CLASS Convolution

Definition at line 602 of file Convolution.cpp.

#define KERNCENTER ( thesize ) ((thesize-1)>>1)

Definition at line 45 of file Convolution.cpp.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), and BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_().

Generated on Wed Jun 21 19:03:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Convolution.hh File Reference

Filter

Convolution.hh File Reference

#include "FilterNToN.hh"
#include "FilterMask.hh"
#include <Utils/Param.hh>

Include dependency graph for Convolution.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Convolution< InputStorageType, OutputStorageType >
generic convolution class. More...

Defines

#define | CONV_FLOAT float
#define | CONV_INT int
#define | D_CONV_KERNEL 0x00000002
#define | D_CONV_TYPES 0x00000010
#define | D_GRAD_DEB 0x00000004
#define | D_GRADGAUSS_KERNEL 0x00000001
#define | D_WRITE_IMAGES 0x00000008

Define Documentation

#define CONV_FLOAT float

Definition at line 45 of file Convolution.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_().

#define CONV_INT int

Definition at line 46 of file Convolution.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

#define D_CONV_KERNEL 0x00000002

Definition at line 39 of file Convolution.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), and main().

#define D_CONV_TYPES 0x00000010

Definition at line 42 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and main().

#define D_GRAD_DEB 0x00000004

Definition at line 40 of file Convolution.hh.

Referenced by main().

#define D_GRADGAUSS_KERNEL 0x00000001

Definition at line 38 of file Convolution.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), and main().

#define D_WRITE_IMAGES 0x00000008

Definition at line 41 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), and main().

Generated on Wed Jun 21 19:03:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DeInterlace.cpp File Reference

Filter

DeInterlace.cpp File Reference

#include "DeInterlace.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for DeInterlace.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS DeInterlace

Define Documentation

#define FILTER_INSTANTIATION_CLASS DeInterlace

Definition at line 255 of file DeInterlace.cpp.

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DeInterlace.hh File Reference

Filter

DeInterlace.hh File Reference

#include "Convolution.hh"
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for DeInterlace.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::DeInterlace< InputStorageType, OutputStorageType >

Enumerations

enum | BIAS::BIAS_DEINTERLACE_TYPE { BIAS::BIAS_DI_121, BIAS::BIAS_DI_22 }

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Dilation.cpp File Reference

Filter

Dilation.cpp File Reference

#include "Dilation.hh"
#include "Base/Image/ImageConvert.hh"
#include <Base/Common/BIASpragma.hh>
#include <limits>
#include "Filterinst.hh"

Include dependency graph for Dilation.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Dilation

Define Documentation

#define FILTER_INSTANTIATION_CLASS Dilation

Definition at line 321 of file Dilation.cpp.

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Dilation.hh File Reference

Filter

Dilation.hh File Reference

#include "./Morphology.hh"

Include dependency graph for Dilation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Dilation< InputStorageType, OutputStorageType >
Dilation operator for binary images (black and white). More...

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DistTransform.cpp File Reference

Filter

DistTransform.cpp File Reference

#include "DistTransform.hh"
#include "Base/Image/ImageConvert.hh"
#include <limits>
#include "Filterinst.hh"

Include dependency graph for DistTransform.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS DistTransform
#define | minDEF(s0, s1, s2, s3, s4) mymin(s0, mymin(s1, mymin(s2, mymin(s3, s4))))
#define | mymin(a, b) ((a<=b)?a:b)

Define Documentation

#define FILTER_INSTANTIATION_CLASS DistTransform

Definition at line 91 of file DistTransform.cpp.

#define minDEF | ( | s0,
 |  | s1,
 |  | s2,
 |  | s3,
 |  | s4 | ) | mymin(s0, mymin(s1, mymin(s2, mymin(s3, s4))))

Referenced by BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_().

#define mymin | ( | a,
 |  | b | ) | ((a<=b)?a:b)

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DistTransform.hh File Reference

Filter

DistTransform.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector2.hh>
#include "./FilterBase.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for DistTransform.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::DistTransform< InputStorageType, OutputStorageType >
a class for calculating the distance transform More...

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Erosion.cpp File Reference

Filter

Erosion.cpp File Reference

#include "Erosion.hh"
#include "Filterinst.hh"

Include dependency graph for Erosion.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Erosion

Define Documentation

#define FILTER_INSTANTIATION_CLASS Erosion

Definition at line 212 of file Erosion.cpp.

Generated on Wed Jun 21 19:03:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Erosion.hh File Reference

Filter

Erosion.hh File Reference

#include "./Morphology.hh"

Include dependency graph for Erosion.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Erosion< InputStorageType, OutputStorageType >
Erosion operator for binary images (black and white). More...

Generated on Wed Jun 21 19:03:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterBase.cpp File Reference

Filter

FilterBase.cpp File Reference

#include "FilterBase.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for FilterBase.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS FilterBase

Functions

int * | BIAS::AddGradientType (Param &para, const string &name, const int group_id)
int * | BIAS::AddLowPassType (Param &para, const string &name, const int group_id)

Define Documentation

#define FILTER_INSTANTIATION_CLASS FilterBase

Definition at line 182 of file FilterBase.cpp.

Generated on Wed Jun 21 19:03:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterBase.hh File Reference

Filter

FilterBase.hh File Reference

#include <Base/Image/Image.hh>
#include <Utils/Param.hh>
#include <string>

Include dependency graph for FilterBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FilterBase< InputStorageType, OutputStorageType >
virtual parent class for API definition of all (future) filters More...

Defines

#define | D_FILTERBASE_CALLSTACK 0x80000000

Enumerations

enum | BIAS::EGradType { BIAS::GT_Simple, BIAS::GT_Sobel3x3, BIAS::GT_Gauss, BIAS::GT_GaussAsymmetric }
different gradients to be used by hiogher level classes
  • GT_Sobel3x3 gradient using 3x3 sobelx and sobely filters
  • GT_Gauss gradient using derivatives of gauss with square kernel
  • GT_GaussAsymmetric gradient using derivatives of gauss
More...
enum | BIAS::LowPassType { BIAS::LPT_Mean = 0, BIAS::LPT_Gauss, BIAS::LPT_Binomial }
determines which lowpass filter is used before subsampling
  • LPT_Mean use non-weighted mean across a window
  • LPT_Gauss weight (in a window) with gaussian function
More...

Functions

int * | BIAS::AddGradientType (Param &para, const std::string &name="GradientType", const int group_id=GRP_ALL)
Helper functio to register parameters.
int * | BIAS::AddLowPassType (Param &para, const std::string &name="LowPassType", const int group_id=GRP_ALL)
Helper functio to register parameters.

Define Documentation

#define D_FILTERBASE_CALLSTACK 0x80000000

Definition at line 34 of file FilterBase.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::Filter(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::Mean< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Label::Label4Neighbour(), BIAS::Label::Label4Neighbour_(), main(), BIAS::Label::Process(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

Generated on Wed Jun 21 19:03:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Filterinst.hh File Reference

Filter

Filterinst.hh File Reference

inline code for instantiation of filter classes More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< float, float >
template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< unsigned char, float >
template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char >

Detailed Description

inline code for instantiation of filter classes

usage: define FILTER_INSTANTION_CLASS as your filter class, e.g. define FILTER_INSTANTION_CLASS Gauss Decide whether you want to allow unsigned output, which makes no sense for gradient filters, because they might produce negative values if you want to prohibit instantiation of unsigned output images, define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT Do all this in the cpp file of your class implementation and then include "Filterinst.hh" which explicitly creates all instances that are alowed by your current cmake configuration, e.g. BUILD_IMAGE_SHORT, ...

WARNING: This class steers the generation of all filter objects of BIAS, dont touch this unless you REALLY know what you are doing.

Definition in file Filterinst.hh.

Variable Documentation

template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS< float, float >

Definition at line 57 of file Filterinst.hh.

template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS< unsigned char, float >

Definition at line 58 of file Filterinst.hh.

template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char >

Definition at line 54 of file Filterinst.hh.

Generated on Wed Jun 21 19:03:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterMask.cpp File Reference

Filter

FilterMask.cpp File Reference

#include "FilterMask.hh"
#include "Base/Common/W32Compat.hh"

Include dependency graph for FilterMask.cpp:

Go to the source code of this file.

Defines

#define | SETZEROSHIFT _KernelRightShift=0;_HorizRightShift=0;_VertRightShift=0

Functions

ostream & | BIAS::operator<< (ostream &os, const FilterMask &fm)

Define Documentation

#define SETZEROSHIFT _KernelRightShift=0;_HorizRightShift=0;_VertRightShift=0

Definition at line 30 of file FilterMask.cpp.

Referenced by BIAS::FilterMask::FilterMask(), and BIAS::FilterMask::Init().

Generated on Wed Jun 21 19:03:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterMask.hh File Reference

Filter

FilterMask.hh File Reference

#include <Base/Image/Image.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>

Include dependency graph for FilterMask.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FilterMask
A filter mask (or a kernel) used for convolution. More...

Defines

#define | D_FM_INTAPPROX (1<<1)
#define | D_FM_PRECISION (1<<0)
#define | FM_FLOAT float
define the type used in the floating point filter mask
#define | FM_INT short
define the type used in the integer filter mask
#define | FM_RESET_OTHER true
set other filter by default to zero ?

Define Documentation

#define D_FM_INTAPPROX (1<<1)

Definition at line 41 of file FilterMask.hh.

Referenced by BIAS::FilterMask::CreateIntFilter().

#define D_FM_PRECISION (1<<0)

Definition at line 40 of file FilterMask.hh.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

#define FM_FLOAT float

define the type used in the floating point filter mask

Definition at line 34 of file FilterMask.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), and BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey().

#define FM_INT short

define the type used in the integer filter mask

Definition at line 36 of file FilterMask.hh.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits(), and BIAS::FilterMask::CreateIntFilter().

#define FM_RESET_OTHER true

set other filter by default to zero ?

Definition at line 38 of file FilterMask.hh.

Generated on Wed Jun 21 19:03:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo2N.cpp File Reference

Filter

FilterNTo2N.cpp File Reference

#include "FilterNTo2N.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for FilterNTo2N.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS FilterNTo2N
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS FilterNTo2N

Definition at line 274 of file FilterNTo2N.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 275 of file FilterNTo2N.cpp.

Generated on Wed Jun 21 19:03:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo2N.hh File Reference

Filter

FilterNTo2N.hh File Reference

#include "FilterBase.hh"

Include dependency graph for FilterNTo2N.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
base class for simple n->2n filter implementations More...

Generated on Wed Jun 21 19:03:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo3N.cpp File Reference

Filter

FilterNTo3N.cpp File Reference

#include "FilterNTo3N.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for FilterNTo3N.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS FilterNTo3N
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS FilterNTo3N

Definition at line 113 of file FilterNTo3N.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 114 of file FilterNTo3N.cpp.

Generated on Wed Jun 21 19:03:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo3N.hh File Reference

Filter

FilterNTo3N.hh File Reference

#include "FilterBase.hh"

Include dependency graph for FilterNTo3N.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
base class for simple n->3n filter implementations More...

Generated on Wed Jun 21 19:03:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNToN.cpp File Reference

Filter

FilterNToN.cpp File Reference

#include "FilterNToN.hh"
#include "Filterinst.hh"

Include dependency graph for FilterNToN.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS FilterNToN

Define Documentation

#define FILTER_INSTANTIATION_CLASS FilterNToN

Definition at line 51 of file FilterNToN.cpp.

Generated on Wed Jun 21 19:03:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNToN.hh File Reference

Filter

FilterNToN.hh File Reference

#include "FilterBase.hh"

Include dependency graph for FilterNToN.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FilterNToN< InputStorageType, OutputStorageType >
base class for simple n->n filter implementations More...

Generated on Wed Jun 21 19:03:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Gauss.cpp File Reference

Filter

Gauss.cpp File Reference

#include "Gauss.hh"
#include <Base/Image/ImageConvert.hh>
#include "Filterinst.hh"

Include dependency graph for Gauss.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Gauss

Define Documentation

#define FILTER_INSTANTIATION_CLASS Gauss

Definition at line 979 of file Gauss.cpp.

Generated on Wed Jun 21 19:03:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Gauss.hh File Reference

Filter

Gauss.hh File Reference

#include <Utils/Param.hh>
#include "Convolution.hh"

Include dependency graph for Gauss.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Gauss< InputStorageType, OutputStorageType >
smoothing with gaussian kernel More...

Defines

#define | D_GAUSS_FAST_GREY 0x01

Define Documentation

#define D_GAUSS_FAST_GREY 0x01

Definition at line 33 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

Generated on Wed Jun 21 19:03:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGauss.cpp File Reference

Filter

GradientGauss.cpp File Reference

#include "GradientGauss.hh"
#include "Convolution.hh"
#include "Filterinst.hh"

Include dependency graph for GradientGauss.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS GradientGauss
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS GradientGauss

Definition at line 280 of file GradientGauss.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 281 of file GradientGauss.cpp.

Generated on Wed Jun 21 19:03:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGauss.hh File Reference

Filter

GradientGauss.hh File Reference

#include "FilterNTo2N.hh"
#include "Convolution.hh"
#include <Base/Math/Vector3.hh>

Include dependency graph for GradientGauss.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GradientGauss< InputStorageType, OutputStorageType >
gradient calculation with separated gauss masks More...

Generated on Wed Jun 21 19:03:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGaussAsymmetric.cpp File Reference

Filter

GradientGaussAsymmetric.cpp File Reference

#include "GradientGaussAsymmetric.hh"
#include "Filterinst.hh"

Include dependency graph for GradientGaussAsymmetric.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS GradientGaussAsymmetric
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS GradientGaussAsymmetric

Definition at line 270 of file GradientGaussAsymmetric.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 271 of file GradientGaussAsymmetric.cpp.

Generated on Wed Jun 21 19:03:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGaussAsymmetric.hh File Reference

Filter

GradientGaussAsymmetric.hh File Reference

#include "GradientGauss.hh"
#include <Base/Math/Vector3.hh>

Include dependency graph for GradientGaussAsymmetric.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
gradient calculation with separated gauss masks More...

Generated on Wed Jun 21 19:03:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSimple.cpp File Reference

Filter

GradientSimple.cpp File Reference

#include "GradientSimple.hh"
#include "FilterMask.hh"
#include "Filterinst.hh"

Include dependency graph for GradientSimple.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | FILTER_INSTANTIATION_CLASS GradientSimple
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
#define | POLAR_TABLE_OFFSET 128
#define | POLAR_TABLE_SIZE 257

Variables

template class BIASFilter_EXPORT | BIAS::FILTER_INSTANTIATION_CLASS< float, float >
template class BIASFilter_EXPORT | BIAS::FILTER_INSTANTIATION_CLASS< unsigned char, float >

Define Documentation

#define FILTER_INSTANTIATION_CLASS GradientSimple

Definition at line 513 of file GradientSimple.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 514 of file GradientSimple.cpp.

#define POLAR_TABLE_OFFSET 128

Definition at line 34 of file GradientSimple.cpp.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::~GradientSimple().

#define POLAR_TABLE_SIZE 257

Definition at line 35 of file GradientSimple.cpp.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::~GradientSimple().

Generated on Wed Jun 21 19:03:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSimple.hh File Reference

Filter

GradientSimple.hh File Reference

#include "FilterNTo2N.hh"
#include <Base/Math/Vector3.hh>
#include "Convolution.hh"

Include dependency graph for GradientSimple.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GradientSimple< InputStorageType, OutputStorageType >
simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1) More...

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSobel3x3.cpp File Reference

Filter

GradientSobel3x3.cpp File Reference

#include "GradientSobel3x3.hh"
#include "FilterMask.hh"
#include "Filterinst.hh"

Include dependency graph for GradientSobel3x3.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS GradientSobel3x3
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS GradientSobel3x3

Definition at line 630 of file GradientSobel3x3.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 631 of file GradientSobel3x3.cpp.

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSobel3x3.hh File Reference

Filter

GradientSobel3x3.hh File Reference

#include "FilterNTo2N.hh"
#include <Base/Math/Vector3.hh>
#include "Convolution.hh"

Include dependency graph for GradientSobel3x3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
gradient calculation with sobel 3 by 3 masks More...

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Label.cpp File Reference

Filter

Label.cpp File Reference

#include <limits.h>
#include <stdio.h>
#include "Label.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <algorithm>
#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/Median1D.hh>

Include dependency graph for Label.cpp:

Go to the source code of this file.

Defines

#define | ERR_ILLI 1
#define | ERR_ILLT 0
#define | ERR_NOLB 0
#define | MAX_LAB USHRT_MAX
#define | MAX_SEG UCHAR_MAX
#define | SEGDEF 1

Define Documentation

#define ERR_ILLI 1

Definition at line 42 of file Label.cpp.

#define ERR_ILLT 0

Definition at line 41 of file Label.cpp.

#define ERR_NOLB 0

Definition at line 43 of file Label.cpp.

Referenced by BIAS::Label::Label4Neighbour_().

#define MAX_LAB USHRT_MAX

Definition at line 46 of file Label.cpp.

Referenced by BIAS::Label::Label4Neighbour_().

#define MAX_SEG UCHAR_MAX

Definition at line 45 of file Label.cpp.

#define SEGDEF 1

Definition at line 48 of file Label.cpp.

Referenced by BIAS::Label::Label4Neighbour_().

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Label.hh File Reference

Filter

Label.hh File Reference

#include <bias_config.h>
#include <vector>
#include <new>
#include <Base/Debug/Debug.hh>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector2.hh>
#include "FilterBase.hh"

Include dependency graph for Label.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

struct | _FilterBorders
class | BIAS::CCAStruct
class | BIAS::Label
does a connected component analysis and labels all connected regions More...

Defines

#define | D_INIT 0x0001
#define | D_LABEL 0x0002
#define | LABEL_CALC_TYPE int
#define | LABEL_STORAGE_TYPE ImageBase::ST_int

Typedefs

typedef _FilterBorders | FilterBorders

Define Documentation

#define D_INIT 0x0001

Definition at line 52 of file Label.hh.

Referenced by BIAS::Label::LabelInit_(), and BIAS::Label::LabelRelease_().

#define D_LABEL 0x0002

Definition at line 53 of file Label.hh.

#define LABEL_CALC_TYPE int

Definition at line 43 of file Label.hh.

Referenced by BIAS::Label::Label4Neighbour_().

#define LABEL_STORAGE_TYPE ImageBase::ST_int

Definition at line 42 of file Label.hh.

Typedef Documentation

typedef struct _FilterBorders FilterBorders

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Mean.cpp File Reference

Filter

Mean.cpp File Reference

#include "Mean.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for Mean.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Mean

Define Documentation

#define FILTER_INSTANTIATION_CLASS Mean

Definition at line 242 of file Mean.cpp.

Generated on Wed Jun 21 19:03:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Mean.hh File Reference

Filter

Mean.hh File Reference

#include "Convolution.hh"
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Mean.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Mean< InputStorageType, OutputStorageType >
deinterlacer filter More...

Generated on Wed Jun 21 19:03:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Median.cpp File Reference

Filter

Median.cpp File Reference

#include "Median.hh"
#include "bias_config.h"
#include "Filterinst.hh"

Include dependency graph for Median.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS Median

Functions

int | comp (const void *a, const void *b)

Define Documentation

#define FILTER_INSTANTIATION_CLASS Median

Definition at line 606 of file Median.cpp.

Function Documentation

int comp | ( | const void * | a,
 |  | const void * | b
 | ) |

Definition at line 49 of file Median.cpp.

Generated on Wed Jun 21 19:03:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Median.hh File Reference

Filter

Median.hh File Reference

#include <Base/Image/Image.hh>
#include <Filter/FilterNToN.hh>

Include dependency graph for Median.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Median< InputStorageType, OutputStorageType >
2D median filter More...

Generated on Wed Jun 21 19:03:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Morphology.cpp File Reference

Filter

Morphology.cpp File Reference

#include "Morphology.hh"
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for Morphology.cpp:

Go to the source code of this file.

Defines

#define FILTER_INSTANTIATION_CLASS Morphology

Define Documentation

#define FILTER_INSTANTIATION_CLASS Morphology

Definition at line 118 of file Morphology.cpp.

Generated on Wed Jun 21 19:03:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Morphology.hh File Reference

Filter

Morphology.hh File Reference

#include "./FilterBase.hh"
#include <Base/Image/Image.hh>

Include dependency graph for Morphology.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Morphology< InputStorageType, OutputStorageType >
base class for Erosion, Dilation, and single Deletion More...

Generated on Wed Jun 21 19:03:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Rescale.cpp File Reference

Filter

Rescale.cpp File Reference

#include "Rescale.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for Rescale.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | FILTER_INSTANTIATION_CLASS Rescale
#define | WX0 -0.125
#define | WX1 1.125
#define | WY0 -0.03125
#define | WY1 0.28125

Functions

template<class InputImageType, class OutputImageType>
int | BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor (const Image< OutputImageType > &src, Image< OutputImageType > &dst)
template<class InputImageType, class OutputImageType>
int | BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey (const Image< OutputImageType > &src, Image< OutputImageType > &dst)

Variables

template class BIASFilter_EXPORT | BIAS::FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char >

Define Documentation

#define FILTER_INSTANTIATION_CLASS Rescale

Definition at line 2327 of file Rescale.cpp.

#define WX0 -0.125

Definition at line 1286 of file Rescale.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

#define WX1 1.125

Definition at line 1287 of file Rescale.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

#define WY0 -0.03125

Definition at line 1283 of file Rescale.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

#define WY1 0.28125

Definition at line 1284 of file Rescale.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

Generated on Wed Jun 21 19:03:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Rescale.hh File Reference

Filter

Rescale.hh File Reference

#include "FilterBase.hh"
#include "FilterNToN.hh"
#include "Gauss.hh"
#include "Binomial.hh"
#include "Mean.hh"

Include dependency graph for Rescale.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Rescale< InputStorageType, OutputStorageType >
Down-, Upsampling routines and Resize. More...

Defines

#define | D_RESCALE_INIT 0x00000001
#define | D_RESCALE_WRITE_IMG 0x00000002

Enumerations

enum | BIAS::InterpolationType { BIAS::NearestNeighbour, BIAS::Bilinear, BIAS::Bicubic }

Define Documentation

#define D_RESCALE_INIT 0x00000001

Definition at line 35 of file Rescale.hh.

Referenced by main(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

#define D_RESCALE_WRITE_IMG 0x00000002

Definition at line 36 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey().

Generated on Wed Jun 21 19:03:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/StructureTensor.cpp File Reference

Filter

StructureTensor.cpp File Reference

#include "StructureTensor.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Common/BIASpragma.hh>
#include "Filterinst.hh"

Include dependency graph for StructureTensor.cpp:

Go to the source code of this file.

Defines

#define | FILTER_INSTANTIATION_CLASS StructureTensor
#define | FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Define Documentation

#define FILTER_INSTANTIATION_CLASS StructureTensor

Definition at line 1057 of file StructureTensor.cpp.

#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT

Definition at line 1058 of file StructureTensor.cpp.

Generated on Wed Jun 21 19:03:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/StructureTensor.hh File Reference

Filter

StructureTensor.hh File Reference

#include <Utils/Param.hh>
#include "FilterBase.hh"
#include "GradientSobel3x3.hh"
#include "GradientGauss.hh"
#include "GradientGaussAsymmetric.hh"
#include "FilterNTo3N.hh"

Include dependency graph for StructureTensor.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::StructureTensor< InputStorageType, OutputStorageType >
basic class for structure tensor calculation More...

Defines

#define | D_ST_FEATURES 0x00000004
#define | D_ST_INIT 0x00000002
#define | D_ST_WRITE_DEBUG_IM 0x00000001

Define Documentation

#define D_ST_FEATURES 0x00000004

Definition at line 38 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

#define D_ST_INIT 0x00000002

Definition at line 37 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad().

#define D_ST_WRITE_DEBUG_IM 0x00000001

Definition at line 36 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

Generated on Wed Jun 21 19:03:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleBinomial.cpp File Reference

Filter » Examples

ExampleBinomial.cpp File Reference

#include "Filter/Binomial.hh"
#include "Base/Image/ImageIO.hh"
#include <iostream>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleBinomial.cpp:

Go to the source code of this file.

Defines

#define | TYPE2 unsigned char

Functions

int | main (int argc, char *argv[])

Define Documentation

#define TYPE2 unsigned char

Definition at line 35 of file ExampleBinomial.cpp.

Referenced by main().

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 38 of file ExampleBinomial.cpp.

References BIAS::Image< StorageType >::AbsDiff(), BIAS::Debug::AddDebugLevel(), D_BINOMIAL_KERNEL, D_CONV_KERNEL, D_CONV_TYPES, D_FILTERBASE_CALLSTACK, D_WRITE_IMAGES, BIAS::Binomial< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::TimeMeasure::Print(), BIAS::Debug::SetDebugLevel(), BIAS::ImageBase::SetZero(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and TYPE2.

Generated on Wed Jun 21 19:03:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleConvolution.cpp File Reference

Filter » Examples

ExampleConvolution.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "Filter/Convolution.hh"
#include <iostream>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleConvolution.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 38 of file ExampleConvolution.cpp.

References BIAS::FilterMask::CreateFloatFilter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetImageData(), BIAS::FilterMask::Init(), BIAS::Image< StorageType >::Init(), TNT::Matrix< T >::newsize(), and BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel().

Generated on Wed Jun 21 19:03:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDeInterlace.cpp File Reference

Filter » Examples

ExampleDeInterlace.cpp File Reference

#include <Filter/DeInterlace.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleDeInterlace.cpp:

Go to the source code of this file.

Defines

#define | OutputImageType unsigned char
#define | StorageType unsigned char
#define | type 1

Functions

int | main (int argc, char *argv[])

Define Documentation

#define OutputImageType unsigned char

Definition at line 35 of file ExampleDeInterlace.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), main(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved().

#define StorageType unsigned char

Definition at line 34 of file ExampleDeInterlace.cpp.

#define type 1

Definition at line 32 of file ExampleDeInterlace.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 41 of file ExampleDeInterlace.cpp.

References BIAS::BIAS_DI_22, BIASERR, BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), para, BIAS::TimeMeasure::Print(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::SetDeInterlaceType(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::SetDownSamplingByTwo(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::SetUseEvenLines(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:03:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDilation.cpp File Reference

Filter » Examples

ExampleDilation.cpp File Reference

#include <Filter/Dilation.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for ExampleDilation.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file ExampleDilation.cpp.

References BIASERR, BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), res, BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling(), and BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize().

Generated on Wed Jun 21 19:03:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDistTransform.cpp File Reference

Filter » Examples

ExampleDistTransform.cpp File Reference

#include <Filter/DistTransform.hh>
#include <Image/Contour.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for ExampleDistTransform.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExampleDistTransform.cpp.

References BIASERR, BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), res, and BIAS::DistTransform< InputStorageType, OutputStorageType >::SetZeroLevel().

Generated on Wed Jun 21 19:03:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleErosion.cpp File Reference

Filter » Examples

ExampleErosion.cpp File Reference

#include <Filter/Erosion.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for ExampleErosion.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file ExampleErosion.cpp.

References BIASERR, BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), res, BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling(), and BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize().

Generated on Wed Jun 21 19:03:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleGauss.cpp File Reference

Filter » Examples

ExampleGauss.cpp File Reference

#include "Filter/Gauss.hh"
#include "Base/Image/ImageIO.hh"
#include <iostream>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleGauss.cpp:

Go to the source code of this file.

Defines

#define | TYPE2 unsigned char

Functions

int | main (int argc, char *argv[])

Define Documentation

#define TYPE2 unsigned char

Definition at line 37 of file ExampleGauss.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 40 of file ExampleGauss.cpp.

References BIAS::Image< StorageType >::AbsDiff(), BIAS::Debug::AddDebugLevel(), D_CONV_KERNEL, D_CONV_TYPES, D_FILTERBASE_CALLSTACK, D_WRITE_IMAGES, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::TimeMeasure::Print(), BIAS::Debug::SetDebugLevel(), BIAS::ImageBase::SetZero(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and TYPE2.

Generated on Wed Jun 21 19:03:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleGradient.cpp File Reference

Filter » Examples

ExampleGradient.cpp File Reference

#include <Filter/FilterNTo2N.hh>
#include <Filter/GradientSobel3x3.hh>
#include <Filter/GradientGauss.hh>
#include <Filter/GradientGaussAsymmetric.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleGradient.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "Gradient.ini"
#define | InputImageType unsigned char
#define | OutputImageType float

Functions

int | main (int argc, char *argv[])

Define Documentation

#define DEFAULT_PARA_FILE_NAME "Gradient.ini"

Definition at line 38 of file ExampleGradient.cpp.

#define InputImageType unsigned char

Definition at line 41 of file ExampleGradient.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), main(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved().

#define OutputImageType float

Definition at line 42 of file ExampleGradient.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 44 of file ExampleGradient.cpp.

References BIAS::Debug::AddDebugLevel(), BIASABORT, BIASERR, D_CONV_KERNEL, D_GRAD_DEB, D_GRADGAUSS_KERNEL, BIAS::Param::DisableDestructorWarning(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::Filter(), BIAS::Param::GetFreeGroupID(), gx, gy, InputImageType, OutputImageType, para, BIAS::TimeMeasure::Print(), BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling(), BIAS::Param::SetGroupName(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:03:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleHarrisColor.cpp File Reference

Filter » Examples

ExampleHarrisColor.cpp File Reference

#include <Base/Image/ImageConvert.hh>
#include <iostream>
#include <iomanip>
#include <Base/Image/Image.hh>
#include <Filter2/ColorHarris.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <getopt.h>

Include dependency graph for ExampleHarrisColor.cpp:

Go to the source code of this file.

Defines

#define | st_type short

Functions

int | main (int argc, char *argv[])
void | usage (char *name)

Define Documentation

#define st_type short

Definition at line 55 of file ExampleHarrisColor.cpp.

Referenced by Draw(), and main().

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 56 of file ExampleHarrisColor.cpp.

References BIASERR, cd, BIAS::ColorHarris::CreateSTColor(), getopt(), BIAS::ColorHarris::HarrisValue(), optarg, optind, res, BIAS::TimeMeasure::Reset(), BIAS::Debug::SetDebugLevel(), and usage().

void usage ( char * name )

Definition at line 42 of file ExampleHarrisColor.cpp.

Generated on Wed Jun 21 19:03:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleMedian.cpp File Reference

Filter » Examples

ExampleMedian.cpp File Reference

#include "Filter/Median.hh"
#include "Base/Image/ImageIO.hh"
#include <iostream>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleMedian.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 37 of file ExampleMedian.cpp.

References BIASASSERT, BIASERR, and BIAS::Median< InputStorageType, OutputStorageType >::Filter().

Generated on Wed Jun 21 19:03:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleRescale.cpp File Reference

Filter » Examples

ExampleRescale.cpp File Reference

#include <Filter/Rescale.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleRescale.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "Rescale.ini"
#define | OutputImageType unsigned char
#define | StorageType unsigned char
#define | type 1

Functions

int | main (int argc, char *argv[])

Define Documentation

#define DEFAULT_PARA_FILE_NAME "Rescale.ini"

Definition at line 32 of file ExampleRescale.cpp.

#define OutputImageType unsigned char

Definition at line 37 of file ExampleRescale.cpp.

#define StorageType unsigned char

Definition at line 36 of file ExampleRescale.cpp.

#define type 1

Definition at line 34 of file ExampleRescale.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 43 of file ExampleRescale.cpp.

References BIAS::Debug::AddDebugLevel(), BIASERR, D_RESCALE_INIT, DEFAULT_PARA_FILE_NAME, BIAS::Param::DisableDestructorWarning(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::Param::GetFreeGroupID(), para, BIAS::TimeMeasure::Print(), BIAS::Param::SetGroupName(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), BIAS::Param::UpdateParameter(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:03:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleStructureTensor.cpp File Reference

Filter » Examples

ExampleStructureTensor.cpp File Reference

#include <Filter/StructureTensor.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for ExampleStructureTensor.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "StructureTensor.ini"
#define | OutputImageType float
#define | StorageType unsigned char
#define | type 0

Functions

int | main (int argc, char *argv[])

Define Documentation

#define DEFAULT_PARA_FILE_NAME "StructureTensor.ini"

Definition at line 32 of file ExampleStructureTensor.cpp.

#define OutputImageType float

Definition at line 43 of file ExampleStructureTensor.cpp.

#define StorageType unsigned char

Definition at line 42 of file ExampleStructureTensor.cpp.

#define type 0

Definition at line 34 of file ExampleStructureTensor.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 53 of file ExampleStructureTensor.cpp.

References BIASERR, BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), DEFAULT_PARA_FILE_NAME, BIAS::Param::DisableDestructorWarning(), BIAS::Param::GetFreeGroupID(), BIAS::ImageBase::GetStorageType(), para, BIAS::Param::SetGroupName(), BIAS::Param::UpdateParameter(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:03:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleUpsampleBy2Grey.cpp File Reference

Filter » Examples

ExampleUpsampleBy2Grey.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Filter/Rescale.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleUpsampleBy2Grey.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExampleUpsampleBy2Grey.cpp.

References BIASERR, BIAS::Bicubic, BIAS::Bilinear, BIAS::ImageBase::GetColorModel(), and BIAS::NearestNeighbour.

Generated on Wed Jun 21 19:03:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Conic2D.cpp File Reference

Geometry

Conic2D.cpp File Reference

#include "Conic2D.hh"
#include <Base/Geometry/HomgLine2D.hh>
#include <float.h>
#include <MathAlgo/PolynomialSolve.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Image/Image.hh>
#include <Geometry/Quadric3D.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for Conic2D.cpp:

Go to the source code of this file.

Defines

#define SVD_ZERO_THRESH DBL_EPSILON * 16

Define Documentation

#define SVD_ZERO_THRESH DBL_EPSILON * 16

Definition at line 37 of file Conic2D.cpp.

Referenced by BIAS::Conic2D::GetDualConic(), BIAS::Quadric3D::GetDualQuadric(), BIAS::Quadric3D::GetSignature(), and BIAS::Conic2D::GetSignature().

Generated on Wed Jun 21 19:03:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Conic2D.hh File Reference

Geometry

Conic2D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Geometry/HomgPoint2D.hh>

Include dependency graph for Conic2D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Conic2D
A 3x3 matrix representing a conic (cone/plane intersection). More...

Defines

#define | CONIC2D_TYPE double
#define | D_CONIC2D_TAN 0x00000001
#define | GAUSS2D_CONFIDENCE_20_PERCENT 0.66
#define | GAUSS2D_CONFIDENCE_39_PERCENT 1.00
#define | GAUSS2D_CONFIDENCE_50_PERCENT 1.18
#define | GAUSS2D_CONFIDENCE_68_PERCENT 1.52
#define | GAUSS2D_CONFIDENCE_90_PERCENT 2.15
#define | GAUSS2D_CONFIDENCE_95_PERCENT 2.45
#define | GAUSS2D_CONFIDENCE_99_PERCENT 3.04

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, Conic2D::ConicType &t)

Define Documentation

#define CONIC2D_TYPE double

Definition at line 35 of file Conic2D.hh.

Referenced by BIAS::Conic2D::GetDualConic(), and BIAS::Conic2D::SetPointAndCovariance().

#define D_CONIC2D_TAN 0x00000001

Definition at line 37 of file Conic2D.hh.

Referenced by BIAS::Conic2D::GetTangentPoints().

#define GAUSS2D_CONFIDENCE_20_PERCENT 0.66

Definition at line 39 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_39_PERCENT 1.00

Definition at line 40 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_50_PERCENT 1.18

Definition at line 41 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_68_PERCENT 1.52

Definition at line 42 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_90_PERCENT 2.15

Definition at line 43 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_95_PERCENT 2.45

Definition at line 44 of file Conic2D.hh.

#define GAUSS2D_CONFIDENCE_99_PERCENT 3.04

Definition at line 45 of file Conic2D.hh.

Generated on Wed Jun 21 19:03:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CoordinateTransform3D.cpp File Reference

Geometry

CoordinateTransform3D.cpp File Reference

#include <Geometry/CoordinateTransform3D.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <fstream>
#include <iostream>
#include <Base/Math/Matrix3x4.hh>

Include dependency graph for CoordinateTransform3D.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CoordinateTransform3D.hh File Reference

Geometry

CoordinateTransform3D.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/HomgPoint3DCov.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for CoordinateTransform3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CoordinateTransform3D

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const CoordinateTransform3D &p)
std::istream & | BIAS::operator>> (std::istream &is, CoordinateTransform3D &p)

Generated on Wed Jun 21 19:03:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CovMatrix3x3.cpp File Reference

Geometry

CovMatrix3x3.cpp File Reference

#include "CovMatrix3x3.hh"

Include dependency graph for CovMatrix3x3.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CovMatrix3x3.hh File Reference

Geometry

CovMatrix3x3.hh File Reference

#include <Base/Math/Matrix3x3.hh>
#include <Base/Geometry/PMatrixBase.hh>
#include <Base/Geometry/HomgPoint3DCov.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for CovMatrix3x3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CovMatrix3x3
class for 3x3 covariance matrices More...

Defines

#define | COVMATRIX3X3_TYPE double

Define Documentation

#define COVMATRIX3X3_TYPE double

Definition at line 34 of file CovMatrix3x3.hh.

Referenced by BIAS::CovMatrix3x3::GetPCA(), and BIAS::CovMatrix3x3::GetS().

Generated on Wed Jun 21 19:03:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EightWaySymmetryHomg.hh File Reference

Geometry

EightWaySymmetryHomg.hh File Reference

#include <cmath>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Image/EightWaySymmetry.hh>

Include dependency graph for EightWaySymmetryHomg.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EightWaySymmetryHomg
direction of line if start is in coordinate origin as given by compass More...

Generated on Wed Jun 21 19:03:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EMatrix.cpp File Reference

Geometry

EMatrix.cpp File Reference

#include "EMatrix.hh"
#include <limits.h>

Include dependency graph for EMatrix.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EMatrix.hh File Reference

Geometry

EMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include "FMatrix.hh"
#include "RMatrix.hh"
#include "Triangulation.hh"

Include dependency graph for EMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EMatrix
class representing an Essential matrix More...

Defines

#define | D_EMATRIX_ROT_TRANS 0x80000000

Define Documentation

#define D_EMATRIX_ROT_TRANS 0x80000000

Definition at line 37 of file EMatrix.hh.

Referenced by BIAS::EMatrix::GetRotationTranslation().

Generated on Wed Jun 21 19:03:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EpipolarLine.cpp File Reference

Geometry

EpipolarLine.cpp File Reference

#include "EpipolarLine.hh"
#include <Base/Debug/Debug.hh>
#include <Base/Image/ImageDraw.hh>
#include <cmath>
#include <cfloat>
#include <Base/Common/BIASpragma.hh>
#include <limits>

Include dependency graph for EpipolarLine.cpp:

Go to the source code of this file.

Defines

#define | INSTANCE(type)
#define | MY_DBL_PRECISION 1e-14

Functions

int | CompIntersect (const void *left, const void *right)
ostream & | operator<< (ostream &os, const enum TEdge edge)

Define Documentation

#define INSTANCE ( type )

Value:

template void EpipolarLine::Draw<type>(Image<type>& im);\
template void EpipolarLine::DrawWhole<type>(Image<type>& im);

Definition at line 755 of file EpipolarLine.cpp.

#define MY_DBL_PRECISION 1e-14

Definition at line 34 of file EpipolarLine.cpp.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

Function Documentation

int CompIntersect | ( | const void * | left,
 |  | const void * | right
 | ) |

Definition at line 436 of file EpipolarLine.cpp.

References TIntersect::EpipoleDistance.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

ostream& operator<< | ( | ostream & | os,
 |  | const enum TEdge | edge
 | ) |

Definition at line 43 of file EpipolarLine.cpp.

Generated on Wed Jun 21 19:03:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EpipolarLine.hh File Reference

Geometry

EpipolarLine.hh File Reference

#include "bias_config.h"
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgLine2D.hh>
#include <Base/Image/EightWaySymmetry.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Image/Image.hh>
#include "EightWaySymmetryHomg.hh"
#include <fstream>
#include <cmath>

Include dependency graph for EpipolarLine.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::EpipolarLine
a class for representing epipolar lines with useful functions like ScanLine() More...
struct | TIntersect

Defines

#define | D_EL_BRES 1<<7
#define | D_EL_BRESROUND 1<<8
#define | D_EL_INT 1<<9
#define | D_EL_NEWSTARTEND 1<<3
#define | D_EL_NEXTLINE 1<<5
#define | D_EL_OFFSET 1<<6
#define | D_EL_ROUND 1<<4
#define | D_EL_SLOPE 1<<0
#define | D_EL_STARTEND 1<<2
#define | D_EL_TRANSF 1<<1
#define | LOWER 10E-6
#define | TWICEPI 6.2831853071795864769252867665590058

Enumerations

enum TEdge {
TopEdge, BottomEdge, LeftEdge, RightEdge,
InvalidEdge
}

Functions

int | CompIntersect (const void *left, const void *right)
std::ostream & | operator<< (std::ostream &os, const enum TEdge edge)

Define Documentation

#define D_EL_BRES 1<<7

Definition at line 51 of file EpipolarLine.hh.

#define D_EL_BRESROUND 1<<8

Definition at line 52 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::Interpolate_().

#define D_EL_INT 1<<9

Definition at line 53 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

#define D_EL_NEWSTARTEND 1<<3

Definition at line 47 of file EpipolarLine.hh.

#define D_EL_NEXTLINE 1<<5

Definition at line 49 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::GetNextLine().

#define D_EL_OFFSET 1<<6

Definition at line 50 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::ScanLine(), and BIAS::EpipolarLine::ScanLine_().

#define D_EL_ROUND 1<<4

Definition at line 48 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::ScanLine_().

#define D_EL_SLOPE 1<<0

Definition at line 44 of file EpipolarLine.hh.

#define D_EL_STARTEND 1<<2

Definition at line 46 of file EpipolarLine.hh.

#define D_EL_TRANSF 1<<1

Definition at line 45 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::CalcTransformed_(), and BIAS::EpipolarLine::ScanLine().

#define LOWER 10E-6

Definition at line 41 of file EpipolarLine.hh.

#define TWICEPI 6.2831853071795864769252867665590058

Definition at line 42 of file EpipolarLine.hh.

Enumeration Type Documentation

enum TEdge

Enumerator:
TopEdge
BottomEdge
LeftEdge
RightEdge
InvalidEdge

Definition at line 56 of file EpipolarLine.hh.

Function Documentation

int CompIntersect | ( | const void * | left,
 |  | const void * | right
 | ) |

Definition at line 436 of file EpipolarLine.cpp.

References TIntersect::EpipoleDistance.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const enum TEdge | edge
 | ) |

Generated on Wed Jun 21 19:03:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrix.cpp File Reference

Geometry

FMatrix.cpp File Reference

#include "FMatrix.hh"
#include "Base/Geometry/KMatrix.hh"
#include <MathAlgo/SVD.hh>
#include <Base/Math/Vector3.hh>

Include dependency graph for FMatrix.cpp:

Go to the source code of this file.

Defines

#define F_SVD_THRESH 0.1

Define Documentation

#define F_SVD_THRESH 0.1

Definition at line 35 of file FMatrix.cpp.

Referenced by BIAS::FMatrix::GetEpipoles(), and main().

Generated on Wed Jun 21 19:03:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrix.hh File Reference

Geometry

FMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/FMatrixBase.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for FMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FMatrix
class representing a Fundamental matrix More...

Defines

#define | D_FMATRIX_GETEPIPOLES 0x0001

Define Documentation

#define D_FMATRIX_GETEPIPOLES 0x0001

Definition at line 35 of file FMatrix.hh.

Referenced by BIAS::FMatrix::GetEpipoles().

Generated on Wed Jun 21 19:03:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrixEstimation.cpp File Reference

Geometry

FMatrixEstimation.cpp File Reference

#include "FMatrixEstimation.hh"
#include "MathAlgo/SVD.hh"
#include "Parametrization.hh"
#include "MathAlgo/Minpack.hh"
#include "Base/Geometry/KMatrix.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for FMatrixEstimation.cpp:

Go to the source code of this file.

Functions

void | FErrorFunction (int *m, int *n, double *x, double *fvec, int *iflag)

Variables

Parametrization * | Para = NULL
FMatrixEstimation * | pCurrentObject = NULL

Function Documentation

void FErrorFunction | ( | int * | m,
 |  | int * | n,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * | iflag
 | ) |

Definition at line 40 of file FMatrixEstimation.cpp.

References BIAS::FMatrixBase::GetEpipolarErrorHomogenized(), BIAS::FMatrixEstimation::p1_, BIAS::FMatrixEstimation::p2_, and BIAS::Parametrization::ParamsToFMatrix().

Variable Documentation

Parametrization* Para = NULL

Definition at line 37 of file FMatrixEstimation.cpp.

FMatrixEstimation* pCurrentObject = NULL

Definition at line 36 of file FMatrixEstimation.cpp.

Generated on Wed Jun 21 19:03:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrixEstimation.hh File Reference

Geometry

FMatrixEstimation.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include "FMatrix.hh"
#include "Base/Geometry/HomgPoint2D.hh"
#include "MathAlgo/PolynomialSolve.hh"
#include "Base/Math/Vector.hh"
#include "Base/Geometry/Normalization.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for FMatrixEstimation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FMatrixEstimation
functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views More...

Generated on Wed Jun 21 19:03:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrix.cpp File Reference

Geometry

HMatrix.cpp File Reference

#include "HMatrix.hh"
#include <MathAlgo/SVD.hh>
#include <MathAlgo/Lapack.hh>

Include dependency graph for HMatrix.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:03:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrix.hh File Reference

Geometry

HMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Geometry/HMatrixBase.hh>
#include <Base/Image/Image.hh>

Include dependency graph for HMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HMatrix
a 3x3 Matrix describing projective transformations between planes More...

Generated on Wed Jun 21 19:04:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrixEstimation.cpp File Reference

Geometry

HMatrixEstimation.cpp File Reference

#include "HMatrixEstimation.hh"
#include <MathAlgo/SVD.hh>
#include <MathAlgo/Lapack.hh>
#include <Base/Geometry/KMatrix.hh>
#include "Parametrization.hh"
#include "MathAlgo/Minpack.hh"

Include dependency graph for HMatrixEstimation.cpp:

Go to the source code of this file.

Functions

void | HErrorFunction (int *m, int *n, double *x, double *fvec, int *iflag)

Variables

Parametrization * | ParaH = NULL
HMatrixEstimation * | pCurrentObjectH = NULL

Function Documentation

void HErrorFunction | ( | int * | m,
 |  | int * | n,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * | iflag
 | ) |

Definition at line 43 of file HMatrixEstimation.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Invert(), BIAS::HMatrixEstimation::p1_, BIAS::HMatrixEstimation::p2_, and BIAS::Parametrization::ParamsToHMatrix().

Variable Documentation

Parametrization* ParaH = NULL

Definition at line 40 of file HMatrixEstimation.cpp.

HMatrixEstimation* pCurrentObjectH = NULL

Definition at line 39 of file HMatrixEstimation.cpp.

Generated on Wed Jun 21 19:04:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrixEstimation.hh File Reference

Geometry

HMatrixEstimation.hh File Reference

#include "bias_config.h"
#include <Geometry/HMatrix.hh>
#include <Base/Geometry/Normalization.hh>

Include dependency graph for HMatrixEstimation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HMatrixEstimation
estimate 3x3 Matrix (homography, affine transformation, . More...

Generated on Wed Jun 21 19:04:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Parametrization.cpp File Reference

Geometry

Parametrization.cpp File Reference

#include "Parametrization.hh"
#include <Base/Common/BIASpragma.hh>
#include <vector>

Include dependency graph for Parametrization.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Parametrization.hh File Reference

Geometry

Parametrization.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include "FMatrix.hh"
#include "HMatrix.hh"
#include "EMatrix.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Parametrization.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Parametrization

Defines

#define | MINIMUM_ROTATION 1e-6
#define | NUM_PARAM_ESSENTIAL 5

Define Documentation

#define MINIMUM_ROTATION 1e-6

Definition at line 50 of file Parametrization.hh.

#define NUM_PARAM_ESSENTIAL 5

Definition at line 49 of file Parametrization.hh.

Referenced by BIAS::Parametrization::EMatrixToParams(), and BIAS::Parametrization::ParamsToEMatrix().

Generated on Wed Jun 21 19:04:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrix.cpp File Reference

Geometry

PMatrix.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "PMatrix.hh"
#include <Base/Geometry/AffineTransf.hh>
#include <MathAlgo/Lapack.hh>
#include <fstream>
#include <sstream>
#include <MathAlgo/SVD.hh>

Include dependency graph for PMatrix.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | STREAM_PRECISION 12

Define Documentation

#define STREAM_PRECISION 12

Definition at line 41 of file PMatrix.cpp.

Referenced by BIAS::ProjectionParametersBase::XMLOut(), and BIAS::PMatrix::XMLOut().

Generated on Wed Jun 21 19:04:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrix.hh File Reference

Geometry

PMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Common/XMLBase.hh>
#include <Base/Geometry/PMatrixBase.hh>
#include <Base/Geometry/HomgLine2D.hh>
#include <Base/Geometry/HomgPlane3D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Geometry/KMatrix.hh>
#include <fstream>
#include <string>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for PMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMatrix
describes a projective 3D -> 2D mapping in homogenous coordinates More...

Generated on Wed Jun 21 19:04:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixEstimation.cpp File Reference

Geometry

PMatrixEstimation.cpp File Reference

#include "PMatrixEstimation.hh"
#include "MathAlgo/Minpack.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for PMatrixEstimation.cpp:

Go to the source code of this file.

Functions

void | DistanceFromRotation4Var (int *n, double *x, double *fvec, int *iflag)
error function, which punishes large differences of submatrix from a rotation matrix

Variables

BIAS::HomgPoint2D globalEpipole2
BIAS::Matrix< double > | globalM2

Function Documentation

void DistanceFromRotation4Var | ( | int * | n,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * | iflag
 | ) |

error function, which punishes large differences of submatrix from a rotation matrix

Definition at line 39 of file PMatrixEstimation.cpp.

References BIASERR, and BIAS::Matrix< T >::GetRow().

Referenced by BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid().

Variable Documentation

BIAS::HomgPoint2D globalEpipole2

Definition at line 30 of file PMatrixEstimation.cpp.

BIAS::Matrix<double> globalM2

Definition at line 29 of file PMatrixEstimation.cpp.

Generated on Wed Jun 21 19:04:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixEstimation.hh File Reference

Geometry

PMatrixEstimation.hh File Reference

#include <iostream>
#include <fstream>
#include <string>
#include "Base/Math/Matrix.hh"
#include "FMatrix.hh"
#include "RMatrix.hh"
#include "Geometry/PMatrix.hh"
#include "MathAlgo/Lapack.hh"

Include dependency graph for PMatrixEstimation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMatrixEstimation
compute standard P1/P2 from F. More...

Defines

#define | BIAS_FMATRIXDEBUG 1 << 0
#define | BIAS_FQuasiEuklid 1 << 2
#define | BIAS_PMATRIXDEBUG 1 << 1

Define Documentation

#define BIAS_FMATRIXDEBUG 1 << 0

Definition at line 42 of file PMatrixEstimation.hh.

Referenced by BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), and BIAS::PMatrixEstimation::FindClosestP2().

#define BIAS_FQuasiEuklid 1 << 2

Definition at line 44 of file PMatrixEstimation.hh.

Referenced by BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid().

#define BIAS_PMATRIXDEBUG 1 << 1

Definition at line 43 of file PMatrixEstimation.hh.

Referenced by BIAS::PMatrixEstimation::FindClosestP2().

Generated on Wed Jun 21 19:04:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixLinear.cpp File Reference

Geometry

PMatrixLinear.cpp File Reference

#include "./PMatrixLinear.hh"
#include "./RMatrix.hh"

Include dependency graph for PMatrixLinear.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixLinear.hh File Reference

Geometry

PMatrixLinear.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <MathAlgo/SVD.hh>
#include "PMatrix.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for PMatrixLinear.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMatrixLinear
This class computes a PMatrix from 2D/3D correspondences with linear methods. More...

Defines

#define | PMATRIXLINEAR 1<<0

Define Documentation

#define PMATRIXLINEAR 1<<0

Definition at line 37 of file PMatrixLinear.hh.

Generated on Wed Jun 21 19:04:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Pose.cpp File Reference

Geometry

Pose.cpp File Reference

#include <Geometry/Pose.hh>
#include <Base/Common/CompareFloatingPoint.hh>

Include dependency graph for Pose.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Pose.hh File Reference

Geometry

Pose.hh File Reference

#include <Base/Geometry/Quaternion.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/HomgPoint3DCov.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <Geometry/CoordinateTransform3D.hh>
#include <Base/Geometry/PoseParametrization.hh>

Include dependency graph for Pose.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Pose
Container for 3D pose, parametrized as euclidean center and quaternion orientation. More...

Defines

#define | POSE_TYPE double

Functions

std::istream & | BIAS::operator>> (std::istream &is, Pose &p)

Define Documentation

#define POSE_TYPE double

Definition at line 39 of file Pose.hh.

Generated on Wed Jun 21 19:04:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Projection.cpp File Reference

Geometry

Projection.cpp File Reference

#include <Geometry/Projection.hh>
#include <Geometry/ProjectionParametersIO.hh>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <Geometry/ProjectionParametersProjective.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <Geometry/ProjectionParametersZoom.hh>
#include <iostream>

Include dependency graph for Projection.cpp:

Go to the source code of this file.

Namespaces

namespace BIAS

Generated on Wed Jun 21 19:04:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Projection.hh File Reference

Geometry

Projection.hh File Reference

#include <bias_config.h>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Geometry/Pose.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/ProjectionParametersBase.hh>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <Base/Common/XMLBase.hh>

Include dependency graph for Projection.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Projection
This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion, . More...

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const Projection &p)

Generated on Wed Jun 21 19:04:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersBase.cpp File Reference

Geometry

ProjectionParametersBase.cpp File Reference

#include <sstream>
#include "Geometry/ProjectionParametersBase.hh"

Include dependency graph for ProjectionParametersBase.cpp:

Go to the source code of this file.

Defines

#define STREAM_PRECISION 12

Define Documentation

#define STREAM_PRECISION 12

Definition at line 31 of file ProjectionParametersBase.cpp.

Generated on Wed Jun 21 19:04:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersBase.hh File Reference

Geometry

ProjectionParametersBase.hh File Reference

#include "bias_config.h"
#include <Geometry/Pose.hh>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/CompareFloatingPoint.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Geometry/PMatrix.hh>
#include <MathAlgo/UnscentedTransform.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Common/XMLBase.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ProjectionParametersBase
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, ProjectionParametersBase &p)

Generated on Wed Jun 21 19:04:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersIO.cpp File Reference

Geometry

ProjectionParametersIO.cpp File Reference

#include "Geometry/ProjectionParametersIO.hh"
#include <string>
#include <Base/Image/ImageAttributes.hh>

Include dependency graph for ProjectionParametersIO.cpp:

Go to the source code of this file.

Functions

std::ostream & | operator<< (std::ostream &os, BIAS::SensorData &sd)
std::ostream & | operator<< (std::ostream &os, BIAS::CameraData &cd)
std::ostream & | operator<< (std::ostream &os, std::vector< BIAS::SensorData > &vsd)
std::ostream & | operator<< (std::ostream &os, std::vector< BIAS::CameraData > &vcd)

Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | BIAS::SensorData & | sd
 | ) |

Definition at line 1482 of file ProjectionParametersIO.cpp.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | BIAS::CameraData & | cd
 | ) |

Definition at line 1427 of file ProjectionParametersIO.cpp.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | std::vector< BIAS::SensorData > & | vsd
 | ) |

Definition at line 1414 of file ProjectionParametersIO.cpp.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | std::vector< BIAS::CameraData > & | vcd
 | ) |

Definition at line 1402 of file ProjectionParametersIO.cpp.

Generated on Wed Jun 21 19:04:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersIO.hh File Reference

Geometry

ProjectionParametersIO.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Common/XMLBase.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersIO.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

struct | BIAS::CameraData
struct | BIAS::CPDiscreteParam
class | BIAS::ProjectionParametersIO
struct | BIAS::SensorData

Defines

#define | CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0
#define | RIG_PARAMETER_CURRENT_XML_VERSION 1.0

Functions

BIASGeometry_EXPORT std::ostream & | operator<< (std::ostream &os, BIAS::SensorData &sd)
BIASGeometry_EXPORT std::ostream & | operator<< (std::ostream &os, BIAS::CameraData &cd)
BIASGeometry_EXPORT std::ostream & | operator<< (std::ostream &os, std::vector< BIAS::SensorData > &vsd)

Define Documentation

#define CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0

Definition at line 41 of file ProjectionParametersIO.hh.

Referenced by BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::CameraParam::WriteCameraData(), and BIAS::ProjectionParametersIO::WriteCameraData().

#define RIG_PARAMETER_CURRENT_XML_VERSION 1.0

Definition at line 42 of file ProjectionParametersIO.hh.

Function Documentation

BIASGeometry_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | BIAS::SensorData & | sd
 | ) |

Definition at line 1482 of file ProjectionParametersIO.cpp.

References BIAS::SensorData::PoseInRigCenter_, BIAS::SensorData::PoseInRigPitch_, BIAS::SensorData::PoseInRigRoll_, and BIAS::SensorData::PoseInRigYaw_.

BIASGeometry_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | BIAS::CameraData & | cd
 | ) |

Definition at line 1427 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::height_, BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

BIASGeometry_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | std::vector< BIAS::SensorData > & | vsd
 | ) |

Generated on Wed Jun 21 19:04:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersPerspective.cpp File Reference

Geometry

ProjectionParametersPerspective.cpp File Reference

#include "Geometry/ProjectionParametersPerspective.hh"

Include dependency graph for ProjectionParametersPerspective.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersPerspective.hh File Reference

Geometry

ProjectionParametersPerspective.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Geometry/ProjectionParametersBase.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/PMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersPerspective.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ProjectionParametersPerspective
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

Defines

#define | LUT_RES 10

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, ProjectionParametersPerspective &p)

Define Documentation

#define LUT_RES 10

Definition at line 35 of file ProjectionParametersPerspective.hh.

Generated on Wed Jun 21 19:04:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersProjective.cpp File Reference

Geometry

ProjectionParametersProjective.cpp File Reference

#include "Geometry/ProjectionParametersProjective.hh"

Include dependency graph for ProjectionParametersProjective.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersProjective.hh File Reference

Geometry

ProjectionParametersProjective.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Geometry/ProjectionParametersBase.hh>
#include <Geometry/CoordinateTransform3D.hh>
#include <Geometry/PMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersProjective.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ProjectionParametersProjective
12 parametric p for completely projective reconstruction scenarios, unknown focal lengths, self calibration, . More...

Generated on Wed Jun 21 19:04:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersSpherical.cpp File Reference

Geometry

ProjectionParametersSpherical.cpp File Reference

#include "Geometry/ProjectionParametersSpherical.hh"

Include dependency graph for ProjectionParametersSpherical.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersSpherical.hh File Reference

Geometry

ProjectionParametersSpherical.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Geometry/ProjectionParametersBase.hh>
#include <MathAlgo/Interpolator.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersSpherical.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ProjectionParametersSpherical
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

Generated on Wed Jun 21 19:04:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersZoom.cpp File Reference

Geometry

ProjectionParametersZoom.cpp File Reference

#include "Geometry/ProjectionParametersZoom.hh"

Include dependency graph for ProjectionParametersZoom.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersZoom.hh File Reference

Geometry

ProjectionParametersZoom.hh File Reference

#include "bias_config.h"
#include <Base/Common/BIASpragmaStart.hh>
#include <Geometry/ProjectionParametersBase.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionParametersZoom.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

struct | BIAS::CPDiscreteParam
class | BIAS::ProjectionParametersZoom
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

Generated on Wed Jun 21 19:04:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Quadric3D.cpp File Reference

Geometry

Quadric3D.cpp File Reference

#include "Quadric3D.hh"
#include <climits>

Include dependency graph for Quadric3D.cpp:

Go to the source code of this file.

Defines

#define | SINGULAR_THRESH_INVERSION 1e-20
#define | SVD_ZERO_THRESH DBL_EPSILON * 16.0

Define Documentation

#define SINGULAR_THRESH_INVERSION 1e-20

Definition at line 31 of file Quadric3D.cpp.

Referenced by BIAS::Quadric3D::Quadric3D().

#define SVD_ZERO_THRESH DBL_EPSILON * 16.0

Definition at line 29 of file Quadric3D.cpp.

Generated on Wed Jun 21 19:04:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Quadric3D.hh File Reference

Geometry

Quadric3D.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Geometry/CovMatrix3x3.hh>

Include dependency graph for Quadric3D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Quadric3D
A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g. More...

Defines

#define | GAUSS3D_CONFIDENCE_20_PERCENT 1.00
#define | GAUSS3D_CONFIDENCE_39_PERCENT 1.36
#define | GAUSS3D_CONFIDENCE_50_PERCENT 1.54
#define | GAUSS3D_CONFIDENCE_68_PERCENT 1.88
#define | GAUSS3D_CONFIDENCE_90_PERCENT 2.50
#define | GAUSS3D_CONFIDENCE_95_PERCENT 2.79
#define | GAUSS3D_CONFIDENCE_99_PERCENT 3.37
#define | QUADRIC3D_TYPE double

Define Documentation

#define GAUSS3D_CONFIDENCE_20_PERCENT 1.00

Definition at line 39 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_39_PERCENT 1.36

Definition at line 40 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_50_PERCENT 1.54

Definition at line 41 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_68_PERCENT 1.88

Definition at line 42 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_90_PERCENT 2.50

Definition at line 43 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_95_PERCENT 2.79

Definition at line 44 of file Quadric3D.hh.

#define GAUSS3D_CONFIDENCE_99_PERCENT 3.37

Definition at line 45 of file Quadric3D.hh.

Referenced by main().

#define QUADRIC3D_TYPE double

Definition at line 36 of file Quadric3D.hh.

Referenced by BIAS::Quadric3D::GetDualQuadric().

Generated on Wed Jun 21 19:04:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/RMatrix.cpp File Reference

Geometry

RMatrix.cpp File Reference

#include "RMatrix.hh"
#include <MathAlgo/SVD.hh>
#include <MathAlgo/Minpack.hh>

Include dependency graph for RMatrix.cpp:

Go to the source code of this file.

Functions

void | ErrorFunction (int *, int *numvars, double *x, double *fvec, int *)

Variables

double | GLOBALbestErrorSoFar = DBL_MAX
Quaternion< double > | GLOBALbestQuaternionSoFar (0, 0, 0, 1)
vector< RMatrix > const * | pGLOBALvecR = NULL

Function Documentation

void ErrorFunction | ( | int * | ,
 |  | int * | numvars,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * |
 | ) |

Definition at line 67 of file RMatrix.cpp.

References BIASASSERT, GLOBALbestQuaternionSoFar, BIAS::Quaternion< QUAT_TYPE >::Normalize(), R, BIAS::RMatrixBase::SetFromQuaternion(), and TNT::Matrix< T >::size().

Variable Documentation

double GLOBALbestErrorSoFar = DBL_MAX

Definition at line 64 of file RMatrix.cpp.

Quaternion<double> GLOBALbestQuaternionSoFar(0, 0, 0, 1)

Referenced by ErrorFunction().

vector<RMatrix> const* pGLOBALvecR = NULL

Definition at line 63 of file RMatrix.cpp.

Generated on Wed Jun 21 19:04:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/RMatrix.hh File Reference

Geometry

RMatrix.hh File Reference

#include "bias_config.h"
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/RMatrixBase.hh>

Include dependency graph for RMatrix.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RMatrix
3D rotation matrix More...

Generated on Wed Jun 21 19:04:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/SimilarityTransform.cpp File Reference

Geometry

SimilarityTransform.cpp File Reference

#include <Geometry/SimilarityTransform.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <fstream>
#include <iostream>
#include <Base/Math/Matrix3x4.hh>

Include dependency graph for SimilarityTransform.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/SimilarityTransform.hh File Reference

Geometry

SimilarityTransform.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for SimilarityTransform.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::SimilarityTransform

Functions

BIAS::Vector3< double > | BIAS::operator * (const SimilarityTransform &arg1, const BIAS::Vector3< double > &vec)
SimilarityTransform | BIAS::operator * (SimilarityTransform &arg1, SimilarityTransform &arg2)
std::ostream & | BIAS::operator<< (std::ostream &os, const SimilarityTransform &p)
std::istream & | BIAS::operator>> (std::istream &is, SimilarityTransform &p)

Generated on Wed Jun 21 19:04:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TFTensorEstimation.cpp File Reference

Geometry

TFTensorEstimation.cpp File Reference

#include "TFTensorEstimation.hh"
#include "TrifocalTensor.hh"
#include <Base/Geometry/HomgPoint2D.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Math/Matrix.hh>
#include <iostream>

Include dependency graph for TFTensorEstimation.cpp:

Go to the source code of this file.

Defines

#define | TFT_EST_CHECK_EQUATIONS
#define | TFT_EST_USE_SVD_HACK
#define | USE_FOUR_EQUATIONS_PER_POINT

Define Documentation

#define TFT_EST_CHECK_EQUATIONS

Definition at line 12 of file TFTensorEstimation.cpp.

#define TFT_EST_USE_SVD_HACK

Definition at line 13 of file TFTensorEstimation.cpp.

#define USE_FOUR_EQUATIONS_PER_POINT

Definition at line 11 of file TFTensorEstimation.cpp.

Generated on Wed Jun 21 19:04:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TFTensorEstimation.hh File Reference

Geometry

TFTensorEstimation.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include "TrifocalTensor.hh"
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/Normalization.hh>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for TFTensorEstimation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TFTensorEstimation
class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers More...

Generated on Wed Jun 21 19:04:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Triangulation.cpp File Reference

Geometry

Triangulation.cpp File Reference

#include "Triangulation.hh"
#include <Base/Geometry/RMatrixBase.hh>
#include <Base/Math/Random.hh>
#include <MathAlgo/PolynomialSolve.hh>
#include <cmath>

Include dependency graph for Triangulation.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Triangulation.hh File Reference

Geometry

Triangulation.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix4x4.hh>
#include "PMatrix.hh"
#include "FMatrix.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Triangulation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Triangulation
Class for triangulation of 3Dpoints from 2D matches. More...

Defines

#define | D_TR_ARG 0x00000004
#define | D_TR_INF 0x00000008
#define | D_TR_OPT 0x00000010
#define | D_TR_OPT_F 0x00000040
#define | D_TR_OPT_TRANSF 0x00000020
#define | D_TR_POS 0x00000001
#define | D_TR_TR 0x00000002
#define | D_TRIANG_COVWEIGHT 0x000000080
#define | PARALLEL_THRESHOLD 1e-8
minimal length of difference between two unit vectors befor there condsidered to be not parallel
#define | TRIANGULATION_DEFAULT_DELTAPIXEL 1.0
default step value left/right/up/down in pixels for triangulation
#define | TRIANGULATION_DEFAULT_SIGMA 1.0

Define Documentation

#define D_TR_ARG 0x00000004

Definition at line 53 of file Triangulation.hh.

Referenced by BIAS::Triangulation::Triangulate2D().

#define D_TR_INF 0x00000008

Definition at line 54 of file Triangulation.hh.

Referenced by BIAS::Triangulation::GetCovariance2D(), and BIAS::Triangulation::Triangulate2D().

#define D_TR_OPT 0x00000010

Definition at line 55 of file Triangulation.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), main(), and BIAS::Triangulation::Optimal().

#define D_TR_OPT_F 0x00000040

Definition at line 57 of file Triangulation.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences().

#define D_TR_OPT_TRANSF 0x00000020

Definition at line 56 of file Triangulation.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences().

#define D_TR_POS 0x00000001

Definition at line 51 of file Triangulation.hh.

Referenced by BIAS::Triangulation::Triangulate2D().

#define D_TR_TR 0x00000002

Definition at line 52 of file Triangulation.hh.

Referenced by BIAS::Triangulation::Triangulate2D().

#define D_TRIANG_COVWEIGHT 0x000000080

Definition at line 58 of file Triangulation.hh.

Referenced by BIAS::Triangulation::_UpdateCovWeights().

#define PARALLEL_THRESHOLD 1e-8

minimal length of difference between two unit vectors befor there condsidered to be not parallel

Definition at line 45 of file Triangulation.hh.

Referenced by BIAS::Triangulation::Triangulate2D().

#define TRIANGULATION_DEFAULT_DELTAPIXEL 1.0

default step value left/right/up/down in pixels for triangulation

Definition at line 48 of file Triangulation.hh.

#define TRIANGULATION_DEFAULT_SIGMA 1.0

Definition at line 49 of file Triangulation.hh.

Generated on Wed Jun 21 19:04:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TrifocalTensor.cpp File Reference

Geometry

TrifocalTensor.cpp File Reference

#include "TrifocalTensor.hh"
#include <Base/Debug/DebugSimple.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for TrifocalTensor.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TrifocalTensor.hh File Reference

Geometry

TrifocalTensor.hh File Reference

#include <Base/Geometry/TrifocalTensorBase.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix4x4.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/FMatrix.hh>

Include dependency graph for TrifocalTensor.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrifocalTensor

Generated on Wed Jun 21 19:04:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/Example7Point.cpp File Reference

Geometry » Examples

Example7Point.cpp File Reference

#include <Geometry/FMatrixEstimation.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for Example7Point.cpp:

Go to the source code of this file.

Typedefs

typedef vector< HomgPoint2D > | PointVector

Functions

void | loadFlowVectors (char *filename, PointVector &match1, PointVector &match2)
int | main (int argc, char *argv[])

Typedef Documentation

typedef vector<HomgPoint2D> PointVector

Definition at line 34 of file Example7Point.cpp.

Function Documentation

void loadFlowVectors | ( | char * | filename,
 |  | PointVector & | match1,
 |  | PointVector & | match2
 | ) |

Definition at line 37 of file Example7Point.cpp.

References done.

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 62 of file Example7Point.cpp.

References BIASERR, BIAS::SVD::Compute(), BIAS::SVD::GetS(), and loadFlowVectors().

Generated on Wed Jun 21 19:03:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleConic.cpp File Reference

Geometry » Examples

ExampleConic.cpp File Reference

#include <Base/Geometry/HomgPoint2D.hh>
#include <Geometry/Conic2D.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Geometry/Quadric3D.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for ExampleConic.cpp:

Go to the source code of this file.

Defines

#define | RADIUS 50.0

Functions

int | main ()

Define Documentation

#define RADIUS 50.0

Definition at line 36 of file ExampleConic.cpp.

Referenced by main().

Function Documentation

int main ( )

Definition at line 39 of file ExampleConic.cpp.

References BIASERR, BIAS::Conic2D::Draw(), GAUSS3D_CONFIDENCE_99_PERCENT, BIAS::Conic2D::GetEllipseParameters(), BIAS::CovMatrix3x3::GetPCA(), BIAS::Conic2D::IntersectsCircle(), BIAS::Matrix3x3< T >::Invert(), BIAS::Conic2D::IsEllipse(), BIAS::Conic2D::LocatePoint(), BIAS::Quadric3D::LocatePoint(), BIAS::Vector3< T >::Normalize(), BIAS::Matrix< T >::Normalize(), RADIUS, BIAS::Conic2D::SetEllipse(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix3x4< T >::SetIdentity(), and BIAS::Conic2D::SetQuadricProjection().

Generated on Wed Jun 21 19:03:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleLoadBBC.cpp File Reference

Geometry » Examples

ExampleLoadBBC.cpp File Reference

#include <Geometry/PMatrix.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/KMatrix.hh>

Include dependency graph for ExampleLoadBBC.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file ExampleLoadBBC.cpp.

References BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetR(), K, and BIAS::PMatrix::LoadBBC().

Generated on Wed Jun 21 19:03:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleLoadBOG_P.cpp File Reference

Geometry » Examples

ExampleLoadBOG_P.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/RMatrix.hh>

Include dependency graph for ExampleLoadBOG_P.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 25 of file ExampleLoadBOG_P.cpp.

References BIAS_TESTS_DATA, BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetR(), BIAS::RMatrixBase::GetRotationAxisAngle(), K, BIAS::PMatrixBase::LoadBOG(), BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), R, and BIAS::PMatrix::Save().

Generated on Wed Jun 21 19:03:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExamplePMatrix.cpp File Reference

Geometry » Examples

ExamplePMatrix.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Math/Random.hh>
#include <vector>
#include <Geometry/PMatrixLinear.hh>

Include dependency graph for ExamplePMatrix.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 42 of file ExamplePMatrix.cpp.

References BIASERR, BIAS::PMatrix::Compose(), BIAS::PMatrix::GetHinf(), K, BIAS::Vector3< T >::Normalize(), R, BIAS::RMatrixBase::Set(), BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::Matrix3x4< T >::SetIdentity().

Generated on Wed Jun 21 19:03:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleProjection.cpp File Reference

Geometry » Examples

ExampleProjection.cpp File Reference

#include <Geometry/Projection.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <iostream>

Include dependency graph for ExampleProjection.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 8 of file ExampleProjection.cpp.

References BIAS::Projection::ReadFromCamParamFile(), and BIAS::XMLBase::XMLRead().

Generated on Wed Jun 21 19:03:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleProjectionParametersIO.cpp File Reference

Geometry » Examples

ExampleProjectionParametersIO.cpp File Reference

#include <Geometry/ProjectionParametersIO.hh>
#include <iostream>

Include dependency graph for ExampleProjectionParametersIO.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 7 of file ExampleProjectionParametersIO.cpp.

References BIASASSERT, and cd.

Generated on Wed Jun 21 19:03:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulate.cpp File Reference

Geometry » Examples

ExampleTriangulate.cpp File Reference

#include <Geometry/Triangulation.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/KMatrix.hh>
#include "Geometry/CovMatrix3x3.hh"
#include <fstream>
#include <iostream>

Include dependency graph for ExampleTriangulate.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 37 of file ExampleTriangulate.cpp.

References BIAS::PMatrix::Compose(), cov, BIAS::HomgPoint2D::Homogenize(), BIAS::Triangulation::Intersect(), BIAS::PMatrix::InvalidateDecomposition(), K, BIAS::HomgPoint2D::Set(), BIAS::Vector3< T >::Set(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::RMatrixBase::SetXYZ(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Triangulation::Triangulate().

Generated on Wed Jun 21 19:03:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulate2.cpp File Reference

Geometry » Examples

ExampleTriangulate2.cpp File Reference

#include <Geometry/Triangulation.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/KMatrix.hh>
#include <fstream>
#include <iostream>

Include dependency graph for ExampleTriangulate2.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 37 of file ExampleTriangulate2.cpp.

References cov, BIAS::HomgPoint2D::Homogenize(), BIAS::Triangulation::Triangulate(), and BIAS::Triangulation::Triangulate2D().

Generated on Wed Jun 21 19:03:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulateOptimal.cpp File Reference

Geometry » Examples

ExampleTriangulateOptimal.cpp File Reference

#include <Geometry/Triangulation.hh>
#include <Base/Math/Random.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Geometry/RMatrixBase.hh>

Include dependency graph for ExampleTriangulateOptimal.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Author:
woelk 08/2004

Definition at line 35 of file ExampleTriangulateOptimal.cpp.

References BIAS::Debug::AddDebugLevel(), BIAS::PMatrix::Compose(), D_TR_OPT, BIAS::Debug::DebugLevelIsSet(), BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), BIAS::HomgPoint2D::Homogenize(), BIAS::PMatrix::InvalidateDecomposition(), K, num, BIAS::Triangulation::Optimal(), p, BIAS::HomgPoint3D::Set(), BIAS::Vector3< T >::Set(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::RMatrixBase::SetXYZ(), sigma, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Triangulation::Triangulate().

Generated on Wed Jun 21 19:03:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/FMatrixTest.cpp File Reference

Geometry » Examples

FMatrixTest.cpp File Reference

#include "../FMatrix.hh"
#include "../FMatrixEstimation.hh"
#include "../PMatrixEstimation.hh"
#include "../PMatrixLinear.hh"
#include "../Triangulation.hh"
#include "../../Base/Math/Random.hh"

Include dependency graph for FMatrixTest.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 40 of file FMatrixTest.cpp.

References BIAS::FMatrix::ComputeFromPMatrices(), BIAS::FMatrix::GetEpipolesHomogenized(), BIAS::Random::GetUniformDistributed(), BIAS::PMatrix::InvalidateDecomposition(), p, and BIAS::FMatrixEstimation::SevenPoint().

Generated on Wed Jun 21 19:03:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/HMatrixTest.cpp File Reference

Geometry » Examples

HMatrixTest.cpp File Reference

#include "Geometry/HMatrixEstimation.hh"
#include "Base/Math/Random.hh"

Include dependency graph for HMatrixTest.cpp:

Go to the source code of this file.

Functions

int main (int, char **)

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 33 of file HMatrixTest.cpp.

References BIAS::HMatrixEstimation::ComputeAffine(), BIAS::Random::GetNormalDistributed(), BIAS::HomgPoint2D::Homogenize(), BIAS::MatrixIdentity, BIAS::MatrixZero, and R.

Generated on Wed Jun 21 19:03:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/InvestigateEpipoleEstimation.cpp File Reference

Geometry » Examples

InvestigateEpipoleEstimation.cpp File Reference

#include "bias_config.h"
#include "Geometry/EpipoleEstimation.hh"
#include "Base/Math/Random.hh"
#include "Base/Geometry/KMatrix.hh"
#include "Base/Geometry/RMatrixBase.hh"
#include "Geometry/FMatrix.hh"
#include "Geometry/PMatrix.hh"
#include "Gui/GuiGTK.hh"
#include "Base/Debug/TimeMeasure.hh"
#include <iostream>
#include <iomanip>

Include dependency graph for InvestigateEpipoleEstimation.cpp:

Go to the source code of this file.

Defines

#define | BACK 0
#define | EPIPOLE_FACTOR 15.0
#define | LINE 70
#define | MATCH 255

Functions

void | AddErr (double &mean_ep_dist, double &mean_ang, double &mean_el_dist)
void | CreateMatches (vector< BIAS::HomgPoint2D > &match1, vector< BIAS::HomgPoint2D > &match2, unsigned int match_count, BIAS::HomgPoint2D epipole, unsigned int width, unsigned int height, double maxdisparity, double mindisparity, double spatial_noise_sigma)
void | CreateMatches2 (vector< HomgPoint2D > &match1, vector< HomgPoint2D > &match2, unsigned int match_count, unsigned int width, unsigned int height, double spatial_noise_sigma, double r_ang)
int | main (int argc, char *argv[])

Variables

BIAS::HomgPoint2D center
BIAS::HomgPoint2D estimated_epipole
BIAS::HomgPoint2D estimated_epipole2
BIAS::KMatrix K
BIAS::KMatrix Kinv
vector< BIAS::HomgPoint2D > match1
vector< BIAS::HomgPoint2D > match2
BIAS::RMatrixBase R
BIAS::HomgPoint2D true_epipole

Define Documentation

#define BACK 0

Definition at line 40 of file InvestigateEpipoleEstimation.cpp.

#define EPIPOLE_FACTOR 15.0

Definition at line 39 of file InvestigateEpipoleEstimation.cpp.

Referenced by main().

#define LINE 70

Definition at line 41 of file InvestigateEpipoleEstimation.cpp.

#define MATCH 255

Definition at line 42 of file InvestigateEpipoleEstimation.cpp.

Function Documentation

void AddErr | ( | double & | mean_ep_dist,
 |  | double & | mean_ang,
 |  | double & | mean_el_dist
 | ) |

Definition at line 143 of file InvestigateEpipoleEstimation.cpp.

References BIAS::HomgPoint2D::Distance(), BIAS::HomgLine2D::Homogenize(), BIAS::HomgLine2D::Set(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by main().

void CreateMatches | ( | vector< BIAS::HomgPoint2D > & | match1,
 |  | vector< BIAS::HomgPoint2D > & | match2,
 |  | unsigned int | match_count,
 |  | BIAS::HomgPoint2D | epipole,
 |  | unsigned int | width,
 |  | unsigned int | height,
 |  | double | maxdisparity,
 |  | double | mindisparity,
 |  | double | spatial_noise_sigma
 | ) |

Definition at line 101 of file InvestigateEpipoleEstimation.cpp.

References BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), and BIAS::HomgPoint2D::Homogenize().

Referenced by CreateMatches2().

void CreateMatches2 | ( | vector< HomgPoint2D > & | match1,
 |  | vector< HomgPoint2D > & | match2,
 |  | unsigned int | match_count,
 |  | unsigned int | width,
 |  | unsigned int | height,
 |  | double | spatial_noise_sigma,
 |  | double | r_ang
 | ) |

Definition at line 53 of file InvestigateEpipoleEstimation.cpp.

References BIAS::PMatrix::Compose(), CreateMatches(), BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint3D::Set(), BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::RMatrixBase::SetXYZ().

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 166 of file InvestigateEpipoleEstimation.cpp.

References AddErr(), BIASERR, CreateMatches2(), EPIPOLE_FACTOR, BIAS::Matrix< T >::Fill(), BIAS::Random::GetUniformDistributed(), BIAS::KMatrix::Invert(), and BIAS::HomgPoint2D::Set().

Variable Documentation

BIAS::HomgPoint2D center

Definition at line 50 of file InvestigateEpipoleEstimation.cpp.

Referenced by BIAS::PMatrix::BackprojectPseudoinverse(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::ImageDraw< StorageType >::CircleCenterFilled(), Draw(), BIAS::ThreeDOut::GetCenterOfPoints(), and main().

BIAS::HomgPoint2D estimated_epipole

Definition at line 50 of file InvestigateEpipoleEstimation.cpp.

BIAS::HomgPoint2D estimated_epipole2

Definition at line 50 of file InvestigateEpipoleEstimation.cpp.

BIAS::KMatrix K

Examples:
ExampleLoadBOG.cpp.

Definition at line 49 of file InvestigateEpipoleEstimation.cpp.

Referenced by AdoptPMatrix(), BIAS::PMatrixBase::Compose(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::PMDImageProc::KFromMeta(), BIAS::PMatrixBase::LoadBOG(), main(), TNT::matmult(), MainFrame::OnLeftDown(), and BIAS::Kalman::Update().

BIAS::KMatrix Kinv

Definition at line 49 of file InvestigateEpipoleEstimation.cpp.

Referenced by BIAS::PMatrix::GetRayWorldCoo(), BIAS::KMatrix::Invert(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

vector<BIAS::HomgPoint2D> match1

Definition at line 51 of file InvestigateEpipoleEstimation.cpp.

vector<BIAS::HomgPoint2D> match2

Definition at line 51 of file InvestigateEpipoleEstimation.cpp.

BIAS::RMatrixBase R

Examples:
ExampleLoadBOG.cpp.

Definition at line 48 of file InvestigateEpipoleEstimation.cpp.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), AdoptPMatrix(), BIAS::ImageConvert::BayerToGrey_(), BIAS::PMatrix::Compose(), BIAS::PMatrixBase::Compose(), BIAS::FMatrixBase::Compose(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::SimilarityTransform::Dump(), BIAS::Parametrization::EMatrixToParams(), ErrorFunction(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::PMatrix::GetIntersectionOfImagePlanes(), BIAS::SimilarityTransform::GetMatrix(), BIAS::SimilarityTransform::GetR(), BIAS::ProjectionParametersBase::GetR(), BIAS::CoordinateTransform3D::GetR(), BIAS::PMatrix::LoadBBC(), BIAS::PMatrixBase::LoadBOG(), main(), TNT::Region2D< Array2D >::operator=(), TNT::Region1D< Array1D >::operator=(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::Parametrization::ParamsToEMatrix(), BIAS::PMDImageProc::PoseFromMeta(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Projection3DData::Set(), BIAS::FMatrixBase::Set(), BIAS::EMatrixBase::Set(), SetRotation(), BIAS::EuclideanTransf3D::SetXYZ(), BIAS::GaussHelmert::Solve(), BIAS::CoordinateTransform3D::Talk(), BIAS::ProjectionParametersBase::UnProjectToRay(), BIAS::CoordinateTransform3D::UpdateMatrix_(), BIAS::ProjectionParametersSpherical::ViewDifference(), and BIAS::ProjectionParametersPerspective::ViewDifference().

BIAS::HomgPoint2D true_epipole

Definition at line 50 of file InvestigateEpipoleEstimation.cpp.

Generated on Wed Jun 21 19:03:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/PMatrixTest.cpp File Reference

Geometry » Examples

PMatrixTest.cpp File Reference

#include "../FMatrix.hh"
#include "../FMatrixEstimation.hh"
#include "../PMatrixEstimation.hh"
#include "../PMatrixLinear.hh"
#include "../Triangulation.hh"
#include "../../Base/Math/Random.hh"

Include dependency graph for PMatrixTest.cpp:

Go to the source code of this file.

Defines

#define | CORRESPONDENCE_FILENAME_SUFFIX ".corresp"
#define | FMATRIX_FILENAME_SUFFIX ".FMatrix"

Functions

int | main ()

Define Documentation

#define CORRESPONDENCE_FILENAME_SUFFIX ".corresp"

Definition at line 36 of file PMatrixTest.cpp.

#define FMATRIX_FILENAME_SUFFIX ".FMatrix"

Definition at line 35 of file PMatrixTest.cpp.

Function Documentation

int main ( )

Definition at line 44 of file PMatrixTest.cpp.

References BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::FMatrix::ComputeFromPMatrices(), BIAS::PMatrix::GetC(), BIAS::FMatrix::GetEpipolesHomogenized(), BIAS::Random::GetUniformDistributed(), BIAS::HomgPoint2D::Homogenize(), K, BIAS::PMatrix::Normalize(), BIAS::Vector3< T >::Normalize(), R, BIAS::PMatrixBase::set_identity(), and BIAS::Matrix3x3< T >::SetIdentity().

Generated on Wed Jun 21 19:03:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/_wx_intellisense.h File Reference

Gui

_wx_intellisense.h File Reference

#include "wx/confbase.h"
#include "wx/config.h"
#include "wx/gdicmn.h"
#include "wx/datetime.h"
#include "wx/app.h"
#include "wx/msw/app.h"
#include "wx/msw/bitmap.h"
#include "wx/button.h"
#include "wx/msw/button.h"
#include "wx/msw/caret.h"
#include "wx/ctrlsub.h"
#include "wx/checkbox.h"
#include "wx/msw/checkbox.h"
#include "wx/msw/checklst.h"
#include "wx/choice.h"
#include "wx/msw/choice.h"
#include "wx/msw/colour.h"
#include "wx/combobox.h"
#include "wx/msw/combobox.h"
#include "wx/control.h"
#include "wx/msw/control.h"
#include "wx/dc.h"
#include "wx/msw/dc.h"
#include "wx/dcclient.h"
#include "wx/msw/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/msw/dcmemory.h"
#include "wx/msw/dde.h"
#include "wx/msw/dialog.h"
#include "wx/msw/dib.h"
#include "wx/msw/dirdlg.h"
#include "wx/msw/dragimag.h"
#include "wx/msw/enhmeta.h"
#include "wx/msw/filedlg.h"
#include "wx/fileconf.h"
#include "wx/toplevel.h"
#include "wx/msw/toplevel.h"
#include "wx/frame.h"
#include "wx/msw/frame.h"
#include "wx/msw/icon.h"
#include "wx/msw/imaglist.h"
#include "wx/msw/iniconf.h"
#include "wx/msw/joystick.h"
#include "wx/msw/listbox.h"
#include "wx/msw/listctrl.h"
#include "wx/msw/mdi.h"
#include "wx/menu.h"
#include "wx/msw/menu.h"
#include "wx/msw/menuitem.h"
#include "wx/msw/metafile.h"
#include "wx/msw/microwin.h"
#include "wx/msw/mimetype.h"
#include "wx/minifram.h"
#include "wx/msw/minifram.h"
#include "wx/msw/missing.h"
#include "wx/msgdlg.h"
#include "wx/msw/msgdlg.h"
#include "wx/msw/mslu.h"
#include "wx/msw/msvcrt.h"
#include "wx/msw/notebook.h"
#include "wx/msw/access.h"
#include "wx/msw/automtn.h"
#include "wx/msw/dataform.h"
#include "wx/msw/dataobj.h"
#include "wx/msw/dataobj2.h"
#include "wx/msw/dropsrc.h"
#include "wx/msw/droptgt.h"
#include "wx/msw/oleutils.h"
#include "wx/msw/uuid.h"
#include "wx/msw/palette.h"
#include "wx/msw/pen.h"
#include "wx/msw/popupwin.h"
#include "wx/msw/private.h"
#include "wx/msw/radiobox.h"
#include "wx/msw/radiobut.h"
#include "wx/msw/regconf.h"
#include "wx/msw/region.h"
#include "wx/msw/registry.h"
#include "wx/generic/scrolwin.h"
#include "wx/scrolwin.h"
#include "wx/msw/scrolbar.h"
#include "wx/msw/setup.h"
#include "wx/msw/slider95.h"
#include "wx/msw/slidrmsw.h"
#include "wx/msw/spinbutt.h"
#include "wx/msw/spinctrl.h"
#include "wx/msw/statbmp.h"
#include "wx/msw/statbox.h"
#include "wx/msw/statbr95.h"
#include "wx/msw/statline.h"
#include "wx/stattext.h"
#include "wx/msw/stattext.h"
#include "wx/msw/tabctrl.h"
#include "wx/msw/taskbar.h"
#include "wx/msw/tbar95.h"
#include "wx/msw/tbarmsw.h"
#include "wx/msw/textctrl.h"
#include "wx/msw/tglbtn.h"
#include "wx/timer.h"
#include "wx/msw/timer.h"
#include "wx/msw/tooltip.h"
#include "wx/msw/treectrl.h"
#include "wx/msw/wave.h"
#include "wx/msw/gdiobj.h"
#include "wx/window.h"
#include "wx/msw/window.h"
#include "wx/msw/winundef.h"
#include "wx/sizer.h"

Include dependency graph for _wx_intellisense.h:

Go to the source code of this file.

Classes

class | wxScrolledWindow
class | wxTopLevelWindow
class | wxTopLevelWindowNative
class | wxWindow

Defines

#define | __WXMSW__ 1
#define | WXDLLEXPORT
#define | WXEXPORT
#define | wxUSE_GUI 1
#define | wxUSE_MSGDLG 1

Define Documentation

#define __WXMSW__ 1

Definition at line 14 of file _wx_intellisense.h.

#define WXDLLEXPORT

Definition at line 10 of file _wx_intellisense.h.

#define WXEXPORT

Definition at line 11 of file _wx_intellisense.h.

#define wxUSE_GUI 1

Definition at line 12 of file _wx_intellisense.h.

#define wxUSE_MSGDLG 1

Definition at line 13 of file _wx_intellisense.h.

Generated on Wed Jun 21 19:04:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/bias_wx_glcanvas.h File Reference

Gui

bias_wx_glcanvas.h File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>
#include <GL/glxew.h>
#include <wx/glcanvas.h>

Include dependency graph for bias_wx_glcanvas.h:

Go to the source code of this file.

Defines

#define __glx_h__
wrapper for <wx/glcanvas.h> to include glxew soon enough

Define Documentation

#define __glx_h__

wrapper for <wx/glcanvas.h> to include glxew soon enough

Author:
: Jan Woetzel

Definition at line 25 of file bias_wx_glcanvas.h.

Generated on Wed Jun 21 19:04:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/biasgl.h File Reference

Gui

biasgl.h File Reference

#include <bias_config.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include <Gui/glcheck.h>

Include dependency graph for biasgl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GLUT_BUILDING_LIB
wrapper to include all gl, glut, glew headers that corresponds to current HAVE_.

Define Documentation

#define GLUT_BUILDING_LIB

wrapper to include all gl, glut, glew headers that corresponds to current HAVE_.

. configurations settings.

Requires OpenGL (BIAS_HAVE_OPENGL). Switches glew usage optionally based on B

Attention:
Does NOT include glu.h.
  • keep choice of using glew/gl/glut/... flexible in client apps while asserting glew is included first!
  • disable GL warnings in a central place.
  • allows precompiled headers
  • Please note that the app. has to call glewinit like this iff glew is used:
      if (!(GLEW_VERSION_1_1)) {
    // init and try again:
    GLenum result = glewInit();
    if (result != GLEW_OK){
      BIASERR("glewInit failed.");
    };
  }
    Author:
    : Jan Woetzel, Bogumil Bartczak

Definition at line 119 of file biasgl.h.

Generated on Wed Jun 21 19:04:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewController.cpp File Reference

Gui

CameraViewController.cpp File Reference

#include "CameraViewController.hh"
#include "biasgl.h"
#include <iostream>

Include dependency graph for CameraViewController.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewController.hh File Reference

Gui

CameraViewController.hh File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>
#include <iostream>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Geometry/PMatrix.hh>
#include <Gui/CameraViewExternals.hh>
#include <Gui/CameraViewInternals.hh>
#include <wx/wx.h>

Include dependency graph for CameraViewController.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraViewController
base for (interactively) manipulating a (virtual) camera view. More...

Enumerations

enum | BIAS::Navigationmode { BIAS::modeAxis1 = 1<<0, BIAS::modeAxis2 = 1<<1, BIAS::modeAxis3 = 1<<2 }

Generated on Wed Jun 21 19:04:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewExternals.cpp File Reference

Gui

CameraViewExternals.cpp File Reference

#include "CameraViewExternals.hh"
#include <iostream>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Gui/biasgl.h>

Include dependency graph for CameraViewExternals.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewExternals.hh File Reference

Gui

CameraViewExternals.hh File Reference

#include <bias_config.h>
#include <iostream>
#include <Base/Math/Vector3.hh>

Include dependency graph for CameraViewExternals.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraViewExternals
describes external params of a camera view, e.g. More...

Generated on Wed Jun 21 19:04:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewFrustum.cpp File Reference

Gui

CameraViewFrustum.cpp File Reference

#include "CameraViewFrustum.hh"
#include <Base/Common/W32Compat.hh>
#include <Base/Debug/Error.hh>
#include <iostream>
#include <math.h>
#include <Gui/biasgl.h>

Include dependency graph for CameraViewFrustum.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewFrustum.hh File Reference

Gui

CameraViewFrustum.hh File Reference

#include <bias_config.h>
#include <iostream>

Include dependency graph for CameraViewFrustum.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraViewFrustum
describes internal parameter Frustum of an (OpenGL) camera view More...

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewInternals.cpp File Reference

Gui

CameraViewInternals.cpp File Reference

#include "CameraViewInternals.hh"
#include <iostream>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Gui/biasgl.h>

Include dependency graph for CameraViewInternals.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewInternals.hh File Reference

Gui

CameraViewInternals.hh File Reference

#include <bias_config.h>
#include <iostream>
#include <Gui/CameraViewFrustum.hh>
#include <Gui/CameraViewport.hh>

Include dependency graph for CameraViewInternals.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraViewInternals
describes internal params of an (OpenGL) camera view More...

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewport.cpp File Reference

Gui

CameraViewport.cpp File Reference

#include "CameraViewport.hh"
#include <Base/Common/W32Compat.hh>
#include <Base/Debug/Error.hh>
#include <iostream>
#include <Gui/biasgl.h>

Include dependency graph for CameraViewport.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewport.hh File Reference

Gui

CameraViewport.hh File Reference

#include <bias_config.h>
#include <iostream>

Include dependency graph for CameraViewport.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraViewport
describes internal parameter viewport of an (OpenGL) camera view More...

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ConsoleRedirectIO.cpp File Reference

Gui

ConsoleRedirectIO.cpp File Reference

#include "ConsoleRedirectIO.hh"

Include dependency graph for ConsoleRedirectIO.cpp:

Go to the source code of this file.

Functions

void BIAS::ConsoleRedirectIO ()
Extra Console for WIN32 WinMain gui applications.

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ConsoleRedirectIO.hh File Reference

Gui

ConsoleRedirectIO.hh File Reference

#include <bias_config.h>

Include dependency graph for ConsoleRedirectIO.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace BIAS

Functions

void BIAS::ConsoleRedirectIO ()
Extra Console for WIN32 WinMain gui applications.

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/dndFileTarget.cpp File Reference

Gui

dndFileTarget.cpp File Reference

#include "dndFileTarget.hh"
#include <string>
#include <sstream>
#include "Base/Debug/Error.hh"
#include <Gui/StringConv.hh>
#include <wx/filename.h>

Include dependency graph for dndFileTarget.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/dndFileTarget.hh File Reference

Gui

dndFileTarget.hh File Reference

#include "bias_config.h"
#include <wx/wx.h>
#include <wx/dnd.h>

Include dependency graph for dndFileTarget.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::dndFileTarget
drag and drop files onto application. More...

Generated on Wed Jun 21 19:04:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/DrawTextGL.cpp File Reference

Gui

DrawTextGL.cpp File Reference

#include "DrawTextGL.hh"
#include "biasgl.h"
#include <GL/glxew.h>
#include <X11/extensions/xf86vmode.h>
#include <X11/keysym.h>
#include <X11/Intrinsic.h>
#include <iostream>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for DrawTextGL.cpp:

Go to the source code of this file.

Defines

#define | CHARS_N 96
#define | CHARS_START 32

Define Documentation

#define CHARS_N 96

Definition at line 34 of file DrawTextGL.cpp.

Referenced by BIAS::DrawTextGL::DeleteFont(), and BIAS::DrawTextGL::InitFont().

#define CHARS_START 32

Definition at line 33 of file DrawTextGL.cpp.

Referenced by BIAS::DrawTextGL::InitFont(), and BIAS::DrawTextGL::Print().

Generated on Wed Jun 21 19:04:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/DrawTextGL.hh File Reference

Gui

DrawTextGL.hh File Reference

#include <bias_config.h>
#include <string>
#include <Base/Common/W32Compat.hh>

Include dependency graph for DrawTextGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::DrawTextGL
Draw text to OpenGL as 2D bitmap font. More...

Defines

#define | DrawTextGL_DEFAULT_FONTNAME "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1"
#define | DrawTextGL_DEFAULT_FONTSIZE -14

Define Documentation

#define DrawTextGL_DEFAULT_FONTNAME "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1"

Definition at line 21 of file DrawTextGL.hh.

#define DrawTextGL_DEFAULT_FONTSIZE -14

Definition at line 15 of file DrawTextGL.hh.

Generated on Wed Jun 21 19:04:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GeometryGL.cpp File Reference

Gui

GeometryGL.cpp File Reference

#include "GeometryGL.hh"
#include "biasgl.h"
#include <Base/Debug/DebugSimple.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Geometry/RMatrix.hh>
#include <Geometry/PMatrix.hh>
#include <Base/Image/ImageBase.hh>

Include dependency graph for GeometryGL.cpp:

Go to the source code of this file.

Defines

#define GL2Cbool(arg) (unsigned int)(arg)<< (arg?" (true)":" (false)")

Define Documentation

#define GL2Cbool ( arg ) (unsigned int)(arg)<< (arg?" (true)":" (false)")

Definition at line 20 of file GeometryGL.cpp.

Referenced by BIAS::GeometryGL::GetInfoGL().

Generated on Wed Jun 21 19:04:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GeometryGL.hh File Reference

Gui

GeometryGL.hh File Reference

#include <bias_config.h>
#include <vector>
#include <iostream>
#include <Base/Math/Vector3.hh>
#include <Geometry/PMatrix.hh>
#include <Gui/ImgObjGL.hh>
#include <Gui/RenderModeGL.hh>
#include <Gui/DrawTextGL.hh>

Include dependency graph for GeometryGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GeometryGL
Reusable Geometry an drawing functions for OpenGL. More...

Defines

#define | MAX_GL_DISPLIST_ID 1000
#define | MAX_GL_TEXOBJ_ID 1000
#define | VISIBLEALPHA 0.0

Enumerations

enum BIAS::CornerIndices {
BIAS::LOWER_LEFT = 0, BIAS::LOWER_RIGHT, BIAS::UPPER_RIGHT, BIAS::UPPER_LEFT,
BIAS::OPTICAL_CENTER
}

Define Documentation

#define MAX_GL_DISPLIST_ID 1000

Definition at line 35 of file GeometryGL.hh.

Referenced by BIAS::GeometryGL::GetInfoGL().

#define MAX_GL_TEXOBJ_ID 1000

Definition at line 36 of file GeometryGL.hh.

Referenced by BIAS::GeometryGL::GetInfoGL().

#define VISIBLEALPHA 0.0

Definition at line 31 of file GeometryGL.hh.

Referenced by BIAS::GeometryGL::DisplayCoordCross(), and BIAS::GeometryGL::DisplayP().

Generated on Wed Jun 21 19:04:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/glcheck.h File Reference

Gui

glcheck.h File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>
#include <GL/glu.h>
#include <Base/Debug/Error.hh>
#include <string>
#include <sstream>
#include <iostream>

Include dependency graph for glcheck.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CHECK_GL_ERROR
use this macro in your code to check for OpenGL errors with "click+jump"

Define Documentation

#define CHECK_GL_ERROR

Value:

{\
  GLenum lastErr = glGetError(); \
  if (lastErr!=GL_NO_ERROR) { \
    std::stringstream ss; \
    ss<<std::endl<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<std::endl \
      <<"\tOpenGL Error: "<<(char *)gluErrorString(lastErr)<<std::endl; \
    ERROR_STREAM<<ss.str(); \
  } \
}
use this macro in your code to check for OpenGL errors with "click+jump"

Author:
Jan Woetzel
Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 51 of file glcheck.h.

Referenced by BIAS::GeometryGL::CreateSampleDisplayListScene(), BIAS::ImgObjGL::DeleteGLTexture(), BIAS::OpenGLCanvasBase::Display(), MyGLCanvas2::DisplayCalls(), MyGLCanvas::DisplayCalls(), BIAS::GeometryGL::DisplayCallsSampleDisplayListScene(), BIAS::OpenGLCanvasBase::DisplayClear(), BIAS::GeometryGL::DisplayClear(), BIAS::GeometryGL::DisplayImgPlaneTextured(), BIAS::GeometryGL::DisplayQuadTexCoord2D(), BIAS::GeometryGL::DisplayRenderMode(), BIAS::GeometryGL::DisplaySceneExampleSimple(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::GeometryGL::GetInfoGL(), BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::SettingsGL::GetVSyncInterval(), MyGLCanvas::InitGeometry(), BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::SettingsGL::SetVSyncInterval(), and BIAS::OpenGLCanvasBase::ShowValue().

Generated on Wed Jun 21 19:04:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/glstuff.h File Reference

Gui

glstuff.h File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>

Include dependency graph for glstuff.h:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiBase.cpp File Reference

Gui

GuiBase.cpp File Reference

#include "GuiBase.hh"
#include <unistd.h>
#include <Base/Image/ImageConvert.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for GuiBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiBase.hh File Reference

Gui

GuiBase.hh File Reference

#include <bias_config.h>
#include <pthread.h>
#include <fstream>
#include <string>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include <Base/Image/Image.hh>
#include <Image/PyramidImage.hh>

Include dependency graph for GuiBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GuiBase
Gui is a simple windowing environment. More...

Defines

#define | BIAS_MUTEX_LOCK(arg) pthread_mutex_lock(arg);
#define | BIAS_MUTEX_UNLOCK(arg) pthread_mutex_unlock(arg);
#define | D_GUI_DESTRUCT 0x0001
SetDebugLevel uses the following flags.
#define | D_GUI_KEY 0x0008
#define | D_GUI_MAIN 0x0002
#define | D_GUI_MOUSE_BUTTON 0x0020
#define | D_GUI_MUTEX 0x0010
#define | D_GUI_SIGNAL 0x0004

Define Documentation

#define BIAS_MUTEX_LOCK ( arg ) pthread_mutex_lock(arg);

Definition at line 67 of file GuiBase.hh.

#define BIAS_MUTEX_UNLOCK ( arg ) pthread_mutex_unlock(arg);

Definition at line 68 of file GuiBase.hh.

#define D_GUI_DESTRUCT 0x0001

SetDebugLevel uses the following flags.

Definition at line 46 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::~GuiGTK().

#define D_GUI_KEY 0x0008

Definition at line 49 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::KeyPressEventCallback_(), and BIAS::GuiBase::WaitForKeyEvent().

#define D_GUI_MAIN 0x0002

Definition at line 47 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::GtkMain().

#define D_GUI_MOUSE_BUTTON 0x0020

Definition at line 51 of file GuiBase.hh.

Referenced by main(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

#define D_GUI_MUTEX 0x0010

Definition at line 50 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiWX::DestroyWindow(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::GtkMain(), and BIAS::GuiGTK::InitGtk().

#define D_GUI_SIGNAL 0x0004

Definition at line 48 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), and BIAS::GuiGTK::LabelExposeCallback_().

Generated on Wed Jun 21 19:04:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiEnhanced.cpp File Reference

Gui

GuiEnhanced.cpp File Reference

#include "GuiEnhanced.hh"
#include <unistd.h>
#include <Base/Image/Bresenham.hh>

Include dependency graph for GuiEnhanced.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiEnhanced.hh File Reference

Gui

GuiEnhanced.hh File Reference

#include "bias_config.h"
#include <Base/Image/Image.hh>
#include "GuiGTK.hh"

Include dependency graph for GuiEnhanced.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GuiEnhanced
extended GuiGTK with zoom and marking options More...

Generated on Wed Jun 21 19:04:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiGTK.cpp File Reference

Gui

GuiGTK.cpp File Reference

#include <bias_config.h>
#include <unistd.h>
#include <pthread.h>
#include <sstream>
#include "GuiGTK.hh"

Include dependency graph for GuiGTK.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiGTK.hh File Reference

Gui

GuiGTK.hh File Reference

#include "bias_config.h"
#include <fstream>
#include <gtk/gtk.h>
#include <string>
#include <pthread.h>
#include "GuiBase.hh"

Include dependency graph for GuiGTK.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GuiGTK
Gui based on gtk is a simple windowing environment. More...

Defines

#define | D_GUI_GDK 0x00010000
#define | D_GUI_THREAD 0x00020000

Define Documentation

#define D_GUI_GDK 0x00010000

Definition at line 45 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::InitGtk(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiGTK::Redraw_().

#define D_GUI_THREAD 0x00020000

Definition at line 46 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::InitGtk(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), and BIAS::GuiGTK::ShowConvertedImage_().

Generated on Wed Jun 21 19:04:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiWX.cpp File Reference

Gui

GuiWX.cpp File Reference

#include <unistd.h>
#include <pthread.h>
#include <sstream>
#include "GuiWX.hh"
#include <Base/Image/ImageIO.hh>

Include dependency graph for GuiWX.cpp:

Go to the source code of this file.

Functions

int | wxEntryInitGui ()
int | wxEntryStart (int &argc, char *argv[])

Function Documentation

int wxEntryInitGui ( )

Referenced by BIAS::GuiWX::Init_().

int wxEntryStart | ( | int & | argc,
 |  | char * | argv[]
 | ) |

Referenced by BIAS::GuiWX::Init_().

Generated on Wed Jun 21 19:04:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiWX.hh File Reference

Gui

GuiWX.hh File Reference

#include "bias_config.h"
#include <fstream>
#include <string>
#include <wx/wx.h>
#include <wx/thread.h>
#include "GuiBase.hh"
#include "ImageCanvas.hh"
#include <Base/Math/Math.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for GuiWX.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GuiWX
a sophisticated more complex windowing environment More...
class | BIAS::TopFrame
This is the fundamental frame in which the canvas (displaying the image) is positioned. More...
class | BIAS::WxMainThread
To use threads in wxWindows we must create our own class, which is derived from wxThread. More...

Generated on Wed Jun 21 19:04:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvas.cpp File Reference

Gui

ImageCanvas.cpp File Reference

#include "ImageCanvas.hh"
#include <Base/Image/ImageConvert.hh>
#include <Gui/StringConv.hh>
#include <sstream>
#include <iomanip>

Include dependency graph for ImageCanvas.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | SCROLLBAR_WIDTH 15
#define | SLIDER_DIGITS 1000

Enumerations

enum | BIAS::ScaledImageCanvas_IDs { BIAS::ID_Scale = 1, BIAS::ID_Offset }

Define Documentation

#define SCROLLBAR_WIDTH 15

Definition at line 16 of file ImageCanvas.cpp.

#define SLIDER_DIGITS 1000

Definition at line 713 of file ImageCanvas.cpp.

Referenced by BIAS::ScaledImageCanvas::ScaledImageCanvas(), BIAS::ScaledImageCanvas::SetOffset(), BIAS::ScaledImageCanvas::SetScale(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

Generated on Wed Jun 21 19:04:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvas.hh File Reference

Gui

ImageCanvas.hh File Reference

#include <bias_config.h>
#include <wx/wx.h>
#include <wx/event.h>
#include <Image/PyramidImage.hh>
#include <Base/Debug/Debug.hh>
#include <pthread.h>

Include dependency graph for ImageCanvas.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageCanvas
display image in wx application, provides zoom and investigation functionality More...
class | BIAS::ScaledImageCanvas
display float images in wx application, provides zoom, scale, shift and investigation functionality More...
class | BIAS::ZoomFrame
used by ImageCanvas and ScaledImageCanvas, should not be used directly More...
class | BIAS::ZoomImageCanvas
used by ImageCanvas and ScaledImageCanvas, should not be used directly More...

Defines

#define | D_IC_IM (1<<0)

Define Documentation

#define D_IC_IM (1<<0)

Definition at line 20 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvasEnhanced::DrawRectangle_(), BIAS::ImageCanvasEnhanced::SelectRectangle(), and BIAS::ImageCanvas::Show().

Generated on Wed Jun 21 19:04:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasEnhanced.cpp File Reference

Gui

ImageCanvasEnhanced.cpp File Reference

#include "ImageCanvasEnhanced.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for ImageCanvasEnhanced.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasEnhanced.hh File Reference

Gui

ImageCanvasEnhanced.hh File Reference

#include "ImageCanvas.hh"
#include <Gui/StringConv.hh>

Include dependency graph for ImageCanvasEnhanced.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ICECallbackInterface
class | BIAS::ImageCanvasEnhanced
provides functionality for selection of rectangle, point, . More...

Generated on Wed Jun 21 19:04:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasGLBase.cpp File Reference

Gui

ImageCanvasGLBase.cpp File Reference

#include "ImageCanvasGLBase.hh"
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Math/Vector2.hh>
#include "GeometryGL.hh"

Include dependency graph for ImageCanvasGLBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasGLBase.hh File Reference

Gui

ImageCanvasGLBase.hh File Reference

#include "biasgl.h"
#include <bias_config.h>
#include <Gui/OpenGLCanvas.hh>
#include <Gui/ImgObjGL.hh>
#include <string>
#include <Base/Image/ImageBase.hh>

Include dependency graph for ImageCanvasGLBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImageCanvasGLBase

Generated on Wed Jun 21 19:04:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImgObjGL.cpp File Reference

Gui

ImgObjGL.cpp File Reference

#include "ImgObjGL.hh"
#include <Base/Image/ImageIO.hh>
#include <iostream>

Include dependency graph for ImgObjGL.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImgObjGL.hh File Reference

Gui

ImgObjGL.hh File Reference

#include <bias_config.h>
#include "biasgl.h"
#include <Base/Image/ImageBase.hh>
#include <Base/Image/Image.hh>

Include dependency graph for ImgObjGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ImgObjGL

Generated on Wed Jun 21 19:04:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvas.cpp File Reference

Gui

OpenGLCanvas.cpp File Reference

#include "OpenGLCanvas.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include "GeometryGL.hh"

Include dependency graph for OpenGLCanvas.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvas.hh File Reference

Gui

OpenGLCanvas.hh File Reference

#include <bias_config.h>
#include <Gui/OpenGLCanvasBase.hh>
#include <Gui/CameraViewController.hh>

Include dependency graph for OpenGLCanvas.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::OpenGLCanvas
OpenGL canvases with additinal event handling (JW). More...

Defines

#define | OPENGLCANVAS_CONNECT_ONIDLE 1
#define | OPENGLCANVAS_DEFAULT_idleRepaintEnabled true
#define | OPENGLCANVAS_DEFAULT_realtimeAnimation true
#define | TARGET_FPS 200

Define Documentation

#define OPENGLCANVAS_CONNECT_ONIDLE 1

Author:
Jan Woetzel 01/2003 - 12/2004

Definition at line 22 of file OpenGLCanvas.hh.

#define OPENGLCANVAS_DEFAULT_idleRepaintEnabled true

Definition at line 31 of file OpenGLCanvas.hh.

#define OPENGLCANVAS_DEFAULT_realtimeAnimation true

Definition at line 37 of file OpenGLCanvas.hh.

#define TARGET_FPS 200

Definition at line 42 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::UpdateTime().

Generated on Wed Jun 21 19:04:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvasBase.cpp File Reference

Gui

OpenGLCanvasBase.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "OpenGLCanvasBase.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Common/FileHandling.hh>
#include <Gui/StringConv.hh>
#include "GeometryGL.hh"
#include "SettingsGL.hh"
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include <wx/defs.h>
#include <wx/log.h>
#include "StereoI.h"

Include dependency graph for OpenGLCanvasBase.cpp:

Go to the source code of this file.

Functions

StereoI * | Get_pStereoAPI ()

Variables

static StereoI * | g_pStereoAPI = NULL

Function Documentation

StereoI* Get_pStereoAPI ( )

Definition at line 1201 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, g_pStereoAPI, and BIAS::OpenGLCanvasBase::StereoI_Init().

Referenced by BIAS::OpenGLCanvasBase::StereoI_CaptureStereoImage(), BIAS::OpenGLCanvasBase::StereoI_GetConvergence(), BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::StereoI_GetSeparation(), BIAS::OpenGLCanvasBase::StereoI_GetStereoState(), BIAS::OpenGLCanvasBase::StereoI_SetConvergence(), BIAS::OpenGLCanvasBase::StereoI_SetSeparation(), and BIAS::OpenGLCanvasBase::StereoI_SetStereoState().

Variable Documentation

StereoI* g_pStereoAPI = NULL [static]

Definition at line 61 of file OpenGLCanvasBase.cpp.

Referenced by Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_Init().

Generated on Wed Jun 21 19:04:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvasBase.hh File Reference

Gui

OpenGLCanvasBase.hh File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>
#include <wx/glcanvas.h>
#include <vector>
#include <iostream>
#include <iomanip>
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Image/Image.hh>
#include <Gui/StringConv.hh>
#include <wx/wx.h>
#include <wx/image.h>
#include <Gui/RenderModeGL.hh>
#include <Gui/DrawTextGL.hh>

Include dependency graph for OpenGLCanvasBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::OpenGLCanvasBase

Defines

#define | BIAS_SCREENSHOT_DEFAULT_EXTENSION ".mip"
#define | OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled true
#define | OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE wxFULLSCREEN_NOMENUBAR|wxFULLSCREEN_NOTOOLBAR|wxFULLSCREEN_NOSTATUSBAR|wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION|wxFULLSCREEN_ALL

Variables

const int | BIAS::attribsRGBAD []
helper to simplify setting up format "red,green,blue,alpha,depth" JW to be used as (int*)&attribsRGBAD JW
const int | BIAS::attribsRGBASD []
helper to simplify setting up format "red,green,blue,alpha,stencil,depth" JW to be used as (int*)&attribsRGBASD JW

Define Documentation

#define BIAS_SCREENSHOT_DEFAULT_EXTENSION ".mip"

Definition at line 59 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::ScreenShot().

#define OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled true

Author:
Jan Woetzel 01/2003 - 10/2005

Definition at line 54 of file OpenGLCanvasBase.hh.

#define OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE wxFULLSCREEN_NOMENUBAR|wxFULLSCREEN_NOTOOLBAR|wxFULLSCREEN_NOSTATUSBAR|wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION|wxFULLSCREEN_ALL

Definition at line 63 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::ToggleFullScreen().

Generated on Wed Jun 21 19:04:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ParamGUI.cpp File Reference

Gui

ParamGUI.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "ParamGUI.hh"
#include <iostream>
#include <map>
#include <Utils/ParamTypes.hh>
#include <Base/Debug/DebugSimple.hh>
#include <Gui/StringConv.hh>

Include dependency graph for ParamGUI.cpp:

Go to the source code of this file.

Typedefs

typedef map< const std::string,
BIAS::ParamTypeBase
* >::const_iterator 		CI

Typedef Documentation

typedef map<const std::string,BIAS::ParamTypeBase*>::const_iterator CI

Definition at line 18 of file ParamGUI.cpp.

Generated on Wed Jun 21 19:04:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ParamGUI.hh File Reference

Gui

ParamGUI.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <map>
#include <Utils/ParamTypes.hh>
#include <Utils/Param.hh>
#include <wx/wx.h>
#include <wx/spinctrl.h>
#include <wx/notebook.h>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ParamGUI.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

struct | BIAS::ItemAndWidget
class | BIAS::ParamGUI
?? More...
class | BIAS::ParamGUIDialog
class | BIAS::ParamGUIPanel
?? More...

Variables

BIASGui_EXPORT | BIAS::ParamGUI

Generated on Wed Jun 21 19:04:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ProjectionGUI.cpp File Reference

Gui

ProjectionGUI.cpp File Reference

#include <Gui/ProjectionGUI.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <Gui/StringConv.hh>
#include <sstream>

Include dependency graph for ProjectionGUI.cpp:

Go to the source code of this file.

Enumerations

enum { ID_New, ID_Load, ID_Save, ID_NormalizeQuaternion }
enum {
ID_Center, ID_Quaternion, ID_RMatrix, ID_ImageSize,
ID_AspectRatio, ID_Principal, ID_KMatrix, ID_FocalLength,
ID_Undistortion, ID_Radius
}

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_New
ID_Load
ID_Save
ID_NormalizeQuaternion

Definition at line 132 of file ProjectionGUI.cpp.

anonymous enum

Enumerator:
ID_Center
ID_Quaternion
ID_RMatrix
ID_ImageSize
ID_AspectRatio
ID_Principal
ID_KMatrix
ID_FocalLength
ID_Undistortion
ID_Radius

Definition at line 141 of file ProjectionGUI.cpp.

Generated on Wed Jun 21 19:04:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ProjectionGUI.hh File Reference

Gui

ProjectionGUI.hh File Reference

#include <bias_config.h>
#include <wx/wx.h>
#include <Geometry/Projection.hh>
#include <vector>
#include <Base/Math/Vector.hh>
#include <Base/Math/Vector2.hh>

Include dependency graph for ProjectionGUI.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MatrixPanel
Panel for displaying and editing matrices. More...
class | BIAS::ProjectionDialog
Dialog containing a ProjectionGUI. More...
class | BIAS::ProjectionGUI
Panel for displaying and editing projections. More...
class | BIAS::VectorPanel
Panel for displaying and editing vectors. More...

Generated on Wed Jun 21 19:04:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/RenderModeGL.hh File Reference

Gui

RenderModeGL.hh File Reference

#include <bias_config.h>
#include "biasgl.h"
#include <Base/Math/Vector4.hh>

Include dependency graph for RenderModeGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RenderModeGL

Enumerations

enum BIAS::DrawbufferMode {
BIAS::MONO = 0, BIAS::STEREO_UNTOUCHED, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_QUADBUFFERED,
BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_TWOSCREENS
}

Generated on Wed Jun 21 19:04:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/SettingsGL.cpp File Reference

Gui

SettingsGL.cpp File Reference

#include "SettingsGL.hh"
#include <Base/Debug/Error.hh>
#include <Base/Debug/DebugSimple.hh>

Include dependency graph for SettingsGL.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/SettingsGL.hh File Reference

Gui

SettingsGL.hh File Reference

#include <bias_config.h>
#include "biasgl.h"

Include dependency graph for SettingsGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::SettingsGL
Application controlled OpenGl renderingsettings. More...

Generated on Wed Jun 21 19:04:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/StringConv.hh File Reference

Gui

StringConv.hh File Reference

#include <wx/string.h>
#include <string>

Include dependency graph for StringConv.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::WxToAsciiArray
Class for converting an array of wxStrings to an array of non-const ASCII strings. More...

Defines

#define | WxToAscii(s) (const char*)(wxString(s).mb_str(wxConvUTF8))
Converts a wxString to a std::string.

Functions

wxString | BIAS::AsciiToWx (const std::string &string)
Converts a std::string to a wxString.
wxString | BIAS::AsciiToWx (const char *string)
Converts a C string to a wxString.

Define Documentation

#define WxToAscii ( s ) (const char*)(wxString(s).mb_str(wxConvUTF8))

Converts a wxString to a std::string.

Definition at line 17 of file StringConv.hh.

Referenced by BIAS::MatrixPanel::GetMatrix(), BIAS::VectorPanel::GetVector(), MainFrame::LoadImages(), MainFrame::LoadImagesAndCalculate(), MyFrame::OnGrab(), BiasShowEpiApp::OnInit(), BIAS::ProjectionGUI::OnLoad(), BIAS::ProjectionGUI::OnSave(), and BIAS::WxToAsciiArray::WxToAsciiArray().

Generated on Wed Jun 21 19:04:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleGLShared.cpp File Reference

Gui » Examples

ExampleGLShared.cpp File Reference

#include <bias_config.h>
#include <Base/Common/LeakChecking.h>
#include "ExampleGLShared.hh"
#include <Gui/ConsoleRedirectIO.hh>
#include <Gui/GeometryGL.hh>
#include <GL/glut.h>

Include dependency graph for ExampleGLShared.cpp:

Go to the source code of this file.

Defines

#define GLUT_BUILDING_LIB

Define Documentation

#define GLUT_BUILDING_LIB

Definition at line 20 of file ExampleGLShared.cpp.

Generated on Wed Jun 21 19:04:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleGLShared.hh File Reference

Gui » Examples

ExampleGLShared.hh File Reference

#include <wx/wx.h>
#include <Gui/OpenGLCanvas.hh>

Include dependency graph for ExampleGLShared.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | ExampleGLSharedApp
class | MyFrame
class | MyGLCanvas
Implement your own OopenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / GL scene. More...
class | MyGLCanvas2

Enumerations

enum | _ExampleGLSharedMyFrameIDs_ { ID_ABOUT = wxID_ABOUT, ID_QUIT }

Enumeration Type Documentation

enum _ExampleGLSharedMyFrameIDs_

Enumerator:
ID_ABOUT
ID_QUIT

Definition at line 32 of file ExampleGLShared.hh.

Generated on Wed Jun 21 19:04:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvas.cpp File Reference

Gui » Examples

ExampleImageCanvas.cpp File Reference

#include <wx/wx.h>
#include <Gui/ImageCanvas.hh>
#include <Gui/StringConv.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleImageCanvas.cpp:

Go to the source code of this file.

Classes

class | MyApp
class | MyFrame

Enumerations

enum | { ID_Quit = 1, ID_About, ID_Load }

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Quit
ID_About
ID_Load

Definition at line 10 of file ExampleImageCanvas.cpp.

Generated on Wed Jun 21 19:04:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasEnhanced.cpp File Reference

Gui » Examples

ExampleImageCanvasEnhanced.cpp File Reference

#include <wx/wx.h>
#include <Gui/ImageCanvasEnhanced.hh>
#include <Base/Image/ImageIO.hh>
#include <Gui/StringConv.hh>

Include dependency graph for ExampleImageCanvasEnhanced.cpp:

Go to the source code of this file.

Classes

class | MyApp
class | MyFrame

Enumerations

enum | { ID_Quit = 1, ID_About, ID_Load, ID_Rect }

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Quit
ID_About
ID_Load
ID_Rect

Definition at line 9 of file ExampleImageCanvasEnhanced.cpp.

Generated on Wed Jun 21 19:04:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasFloat.cpp File Reference

Gui » Examples

ExampleImageCanvasFloat.cpp File Reference

#include <wx/wx.h>
#include <Gui/ImageCanvas.hh>
#include <Gui/StringConv.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleImageCanvasFloat.cpp:

Go to the source code of this file.

Classes

class | MyApp
class | MyFrame

Enumerations

enum | { ID_Quit = 1, ID_About, ID_Load }

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Quit
ID_About
ID_Load

Definition at line 11 of file ExampleImageCanvasFloat.cpp.

Generated on Wed Jun 21 19:04:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasGLBase.cpp File Reference

Gui » Examples

ExampleImageCanvasGLBase.cpp File Reference

#include <bias_config.h>
#include <Base/Common/LeakChecking.h>
#include "ExampleImageCanvasGLBase.hh"
#include <Gui/ConsoleRedirectIO.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <wx/sizer.h>
#include <wx/log.h>

Include dependency graph for ExampleImageCanvasGLBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasGLBase.hh File Reference

Gui » Examples

ExampleImageCanvasGLBase.hh File Reference

#include <wx/wx.h>
#include <Gui/ImageCanvasGLBase.hh>

Include dependency graph for ExampleImageCanvasGLBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | ExampleImageCanvasGLBaseApp
class | MyFrame

Enumerations

enum | _ExampleImageCanvasGLBaseMyFrameIDs_ { ID_ABOUT = wxID_ABOUT, ID_QUIT, ID_LOADIMAGE }

Enumeration Type Documentation

enum _ExampleImageCanvasGLBaseMyFrameIDs_

Enumerator:
ID_ABOUT
ID_QUIT
ID_LOADIMAGE

Definition at line 16 of file ExampleImageCanvasGLBase.hh.

Generated on Wed Jun 21 19:04:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleMultipleGui.cpp File Reference

Gui » Examples

ExampleMultipleGui.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <iostream>
#include <unistd.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <cstdlib>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Gui/GuiGTK.hh>

Include dependency graph for ExampleMultipleGui.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 41 of file ExampleMultipleGui.cpp.

References num.

Generated on Wed Jun 21 19:04:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvas.cpp File Reference

Gui » Examples

ExampleOpenGLCanvas.cpp File Reference

#include <bias_config.h>
#include <Base/Common/LeakChecking.h>
#include "ExampleOpenGLCanvas.hh"
#include <Gui/ConsoleRedirectIO.hh>
#include <Gui/GeometryGL.hh>

Include dependency graph for ExampleOpenGLCanvas.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvas.hh File Reference

Gui » Examples

ExampleOpenGLCanvas.hh File Reference

#include <wx/wx.h>
#include <Gui/OpenGLCanvas.hh>

Include dependency graph for ExampleOpenGLCanvas.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | ExampleOpenGLCanvasApp
class | MyFrame
class | MyGLCanvas
Implement your own OopenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / GL scene. More...

Enumerations

enum | _ExampleOpenGLCanvasMyFrameIDs_ { ID_ABOUT = wxID_ABOUT, ID_QUIT, ID_TESTSHOT }

Enumeration Type Documentation

enum _ExampleOpenGLCanvasMyFrameIDs_

Enumerator:
ID_ABOUT
ID_QUIT
ID_TESTSHOT

Definition at line 18 of file ExampleOpenGLCanvas.hh.

Generated on Wed Jun 21 19:04:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvasBase.cpp File Reference

Gui » Examples

ExampleOpenGLCanvasBase.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "ExampleOpenGLCanvasBase.hh"
#include <Gui/ConsoleRedirectIO.hh>

Include dependency graph for ExampleOpenGLCanvasBase.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvasBase.hh File Reference

Gui » Examples

ExampleOpenGLCanvasBase.hh File Reference

#include <wx/wx.h>
#include <Gui/OpenGLCanvasBase.hh>

Include dependency graph for ExampleOpenGLCanvasBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | ExampleOpenGLCanvasApp
class | MyFrame

Enumerations

enum | _ExampleOpenGLCanvasMyFrameIDs_ { ID_ABOUT = wxID_ABOUT, ID_QUIT }

Enumeration Type Documentation

enum _ExampleOpenGLCanvasMyFrameIDs_

Enumerator:
ID_ABOUT
ID_QUIT

Definition at line 25 of file ExampleOpenGLCanvasBase.hh.

Generated on Wed Jun 21 19:04:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample1.cpp File Reference

Gui » Examples

ParamGUISample1.cpp File Reference

#include <wx/wx.h>
#include <Base/Common/BIASpragma.hh>
#include <Gui/ParamGUI.hh>
#include <Gui/StringConv.hh>
#include <Utils/Param.hh>
#include <iostream>
#include <vector>
#include <string>

Include dependency graph for ParamGUISample1.cpp:

Go to the source code of this file.

Classes

class | MyAlgorithm
class | MyApp
class | MyFrame

Variables

MyAlgorithm * algo

Variable Documentation

MyAlgorithm* algo

Definition at line 63 of file ParamGUISample1.cpp.

Generated on Wed Jun 21 19:04:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample2.cpp File Reference

Gui » Examples

ParamGUISample2.cpp File Reference

#include <wx/wx.h>
#include <Gui/ParamGUI.hh>
#include <Gui/StringConv.hh>
#include <Utils/Param.hh>
#include <iostream>

Include dependency graph for ParamGUISample2.cpp:

Go to the source code of this file.

Classes

class MyApp

Generated on Wed Jun 21 19:04:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample3.cpp File Reference

Gui » Examples

ParamGUISample3.cpp File Reference

#include <bias_config.h>
#include <wx/wx.h>
#include <Gui/ParamGUI.hh>
#include <Gui/StringConv.hh>
#include <Utils/Param.hh>
#include <iostream>

Include dependency graph for ParamGUISample3.cpp:

Go to the source code of this file.

Classes

class | MyAlgorithm
class | MyApp
class | MyFrame

Variables

MyAlgorithm * algo

Variable Documentation

MyAlgorithm* algo

Definition at line 55 of file ParamGUISample3.cpp.

Generated on Wed Jun 21 19:04:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGui.cpp File Reference

Gui » Examples

TestGui.cpp File Reference

#include <iostream>
#include <unistd.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Gui/GuiGTK.hh>

Include dependency graph for TestGui.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 38 of file TestGui.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), pim, and BIAS::GuiGTK::SetTitle().

Generated on Wed Jun 21 19:04:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGuiEnhanced.cpp File Reference

Gui » Examples

TestGuiEnhanced.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageDraw.hh>
#include <Gui/GuiGTK.hh>
#include <Gui/GuiEnhanced.hh>

Include dependency graph for TestGuiEnhanced.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file TestGuiEnhanced.cpp.

References BIAS::Debug::AddDebugLevel(), D_GUI_MOUSE_BUTTON, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

Generated on Wed Jun 21 19:04:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGuiPyramid.cpp File Reference

Gui » Examples

TestGuiPyramid.cpp File Reference

#include <iostream>
#include <unistd.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <PyramidImage/PyramidImage2.hh>
#include <Base/Image/ImageIO.hh>
#include <Gui/GuiGTK.hh>

Include dependency graph for TestGuiPyramid.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 38 of file TestGuiPyramid.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), pim, and BIAS::GuiGTK::SetTitle().

Generated on Wed Jun 21 19:04:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestMouse.cpp File Reference

Gui » Examples

TestMouse.cpp File Reference

#include <Base/Image/Image.hh>
#include <Gui/GuiGTK.hh>
#include <Gui/GuiEnhanced.hh>

Include dependency graph for TestMouse.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 33 of file TestMouse.cpp.

Generated on Wed Jun 21 19:04:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/BackwardMapping.cpp File Reference

Image

BackwardMapping.cpp File Reference

#include "BackwardMapping.hh"
#include <Geometry/RMatrix.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <limits>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for BackwardMapping.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | ONE_OVER_LOG2 1.442695

Define Documentation

#define ONE_OVER_LOG2 1.442695

Definition at line 39 of file BackwardMapping.cpp.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

Generated on Wed Jun 21 19:04:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/BackwardMapping.hh File Reference

Image

BackwardMapping.hh File Reference

#include <Base/Image/Image.hh>
#include <Image/PyramidImage.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix2x2.hh>

Include dependency graph for BackwardMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::BackwardMapping< InputStorageType, OutputStorageType >
abstract base class to maps image src to image sink with arbitrary continuous function More...

Defines

#define | JACOBI_THRESH 1e-100
if jacobian gets smaller than this, clip to this value to avoid singularity when computing smoothing kernel

Enumerations

enum BIAS::InterpolationMethod {
BIAS::MapNearestNeighbor = 1, BIAS::MapBilinear, BIAS::MapBicubic, BIAS::MapTrilinear,
BIAS::MapAnisotropic
}
accuracy for resampling More...

Define Documentation

#define JACOBI_THRESH 1e-100

if jacobian gets smaller than this, clip to this value to avoid singularity when computing smoothing kernel

Definition at line 36 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

Generated on Wed Jun 21 19:04:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Camera.cpp File Reference

Image

Camera.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <stdio.h>
#include <Base/Image/Image.hh>
#include "Camera.hh"

Include dependency graph for Camera.cpp:

Go to the source code of this file.

Defines

#define | _CRT_SECURE_NO_DEPRECATE
#define | INST(type) template class BIASImage_EXPORT Camera<type>
#define | MAXHEADERLINES 1024

Functions

INST (char)
INST (int)
INST (float)
INST (unsigned char)

Define Documentation

#define _CRT_SECURE_NO_DEPRECATE

Definition at line 27 of file Camera.cpp.

#define INST ( type ) template class BIASImage_EXPORT Camera<type>

Definition at line 518 of file Camera.cpp.

#define MAXHEADERLINES 1024

Definition at line 32 of file Camera.cpp.

Function Documentation

INST ( char )

INST ( int )

INST ( float )

INST ( unsigned char )

Generated on Wed Jun 21 19:04:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Camera.hh File Reference

Image

Camera.hh File Reference

#include "bias_config.h"
#include <Base/Image/Image.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/Projection.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Image/MetaData.hh>

Include dependency graph for Camera.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Camera< StorageType >
extends the Image by MetaData support (e.g. More...

Defines

#define | D_CAM_DCINERT 0x0002
#define | D_CAM_DCPTU 0x0001
#define | D_CAM_IO 0x0008
#define | D_CAMERA_METADATA 0x0004

Define Documentation

#define D_CAM_DCINERT 0x0002

Definition at line 43 of file Camera.hh.

#define D_CAM_DCPTU 0x0001

Definition at line 42 of file Camera.hh.

#define D_CAM_IO 0x0008

Definition at line 45 of file Camera.hh.

#define D_CAMERA_METADATA 0x0004

Definition at line 44 of file Camera.hh.

Referenced by main(), and BIAS::Camera< StorageType >::ParseMetaData().

Generated on Wed Jun 21 19:04:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CameraParam.cpp File Reference

Image

CameraParam.cpp File Reference

#include "CameraParam.hh"
#include <iostream>
#include <math.h>
#include <Base/Image/ImageAttributes.hh>

Include dependency graph for CameraParam.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CameraParam.hh File Reference

Image

CameraParam.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <string>
#include <Base/Debug/Error.hh>
#include <Base/Common/XMLIO.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for CameraParam.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CameraParam
struct | BIAS::CPDiscreteParam

Defines

#define | CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0

Define Documentation

#define CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0

Definition at line 42 of file CameraParam.hh.

Generated on Wed Jun 21 19:04:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorHistogram.cpp File Reference

Image

ColorHistogram.cpp File Reference

#include "ColorHistogram.hh"
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ColorHistogram.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class ColorHistogram<type>;

Variables

const float | BIAS::maxGain = 29.0f
const float | BIAS::maxShutter = 0.034f
const float | BIAS::minGain = 0.1f
const float | BIAS::minShutter = 0.01f

Define Documentation

#define INST ( type ) template class ColorHistogram<type>;

Definition at line 865 of file ColorHistogram.cpp.

Generated on Wed Jun 21 19:04:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorHistogram.hh File Reference

Image

ColorHistogram.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Math/Math.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ColorHistogram.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ColorHistogram< StorageType >
This Class handels Histogram matters on Images. More...

Defines

#define | D_COLOR_HIST_VEC 0x8000000

Define Documentation

#define D_COLOR_HIST_VEC 0x8000000

Definition at line 37 of file ColorHistogram.hh.

Generated on Wed Jun 21 19:04:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorMultiHistogram.cpp File Reference

Image

ColorMultiHistogram.cpp File Reference

#include "ColorMultiHistogram.hh"
#include <Base/Image/ImageBase.hh>

Include dependency graph for ColorMultiHistogram.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST(type) template class ColorMultiHistogram<type>;

Define Documentation

#define INST ( type ) template class ColorMultiHistogram<type>;

Definition at line 227 of file ColorMultiHistogram.cpp.

Generated on Wed Jun 21 19:04:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorMultiHistogram.hh File Reference

Image

ColorMultiHistogram.hh File Reference

#include <Base/Math/Math.hh>
#include "ColorHistogram.hh"

Include dependency graph for ColorMultiHistogram.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ColorMultiHistogram< StorageType >
This Class handels MultiHistogram matters on Images. More...

Defines

#define | D_COLOR_MULTI_HIST_VEC 0x9000000

Define Documentation

#define D_COLOR_MULTI_HIST_VEC 0x9000000

Definition at line 34 of file ColorMultiHistogram.hh.

Generated on Wed Jun 21 19:04:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorSegmentation.cpp File Reference

Image

ColorSegmentation.cpp File Reference

#include "ColorSegmentation.hh"
#include <bias_config.h>
#include <pthread.h>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/Exception.hh>
#include <cmath>

Include dependency graph for ColorSegmentation.cpp:

Go to the source code of this file.

Classes

struct SegmentationData

Generated on Wed Jun 21 19:04:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorSegmentation.hh File Reference

Image

ColorSegmentation.hh File Reference

#include <bias_config.h>
#include <Base/Image/Image.hh>

Include dependency graph for ColorSegmentation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ColorSegmentation
class | BIAS::ColorSegmentationThreaded

Generated on Wed Jun 21 19:04:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CompressJpeg.cpp File Reference

Image

CompressJpeg.cpp File Reference

#include "CompressJpeg.hh"
#include "jpeglib.h"
#include <setjmp.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/types.h>

Include dependency graph for CompressJpeg.cpp:

Go to the source code of this file.

Classes

struct | my_error_mgr

Typedefs

typedef my_error_mgr * | my_error_ptr

Functions

int | create_JPEG_file (void *outfile, long length, int quality)
Routine for using libjpeg compression-methods (borrowed from libjpeg-example, with litle changes).
int | deflate_JPEG_file (void *infile, long length, unsigned int &width, unsigned int &height, unsigned int &channels, unsigned char *&data)
int | deflate_JPEG_file (void *infile, long length, BIAS::Image< unsigned char > &destImg)
empty_output_buffer (j_compress_ptr cinfo)
fill_input_buffer (j_decompress_ptr cinfo)
init_destination (j_compress_ptr)
Routines for destination (data array) managing.
init_source (j_decompress_ptr)
Routines for source (data array) managing.
my_error_exit (j_common_ptr cinfo)
skip_input_data (j_decompress_ptr cinfo, long num_bytes)
term_destination (j_compress_ptr)
term_source (j_decompress_ptr)

Variables

JSAMPLE * | image_buffer
int | image_channels
int | image_height
int | image_width

Typedef Documentation

typedef struct my_error_mgr* my_error_ptr

Definition at line 83 of file CompressJpeg.cpp.

Function Documentation

int create_JPEG_file | ( | void * | outfile,
 |  | long | length,
 |  | int | quality
 | ) |

Routine for using libjpeg compression-methods (borrowed from libjpeg-example, with litle changes).

Definition at line 172 of file CompressJpeg.cpp.

References BIASERR, empty_output_buffer(), image_buffer, image_channels, image_height, image_width, init_destination(), res, term_destination(), and void.

Referenced by BIAS::JpegHandler::Compress().

int deflate_JPEG_file | ( | void * | infile,
 |  | long | length,
 |  | unsigned int & | width,
 |  | unsigned int & | height,
 |  | unsigned int & | channels,
 |  | unsigned char *& | data
 | ) |

Definition at line 459 of file CompressJpeg.cpp.

References BIASERR, BIASWARN, fill_input_buffer(), init_source(), my_error_exit(), my_error_mgr::pub, my_error_mgr::setjmp_buffer, skip_input_data(), and term_source().

int deflate_JPEG_file | ( | void * | infile,
 |  | long | length,
 |  | BIAS::Image< unsigned char > & | destImg
 | ) |

Definition at line 298 of file CompressJpeg.cpp.

References BIASERR, fill_input_buffer(), BIAS::Image< StorageType >::Init(), init_source(), BIAS::ImageBase::IsEmpty(), my_error_exit(), my_error_mgr::pub, my_error_mgr::setjmp_buffer, skip_input_data(), and term_source().

Referenced by BIAS::JpegHandler::Decompress().

empty_output_buffer ( j_compress_ptr cinfo )

Definition at line 154 of file CompressJpeg.cpp.

References BIASERR.

Referenced by create_JPEG_file().

fill_input_buffer ( j_decompress_ptr cinfo )

Definition at line 111 of file CompressJpeg.cpp.

Referenced by deflate_JPEG_file(), and skip_input_data().

init_destination ( j_compress_ptr )

Routines for destination (data array) managing.

Definition at line 149 of file CompressJpeg.cpp.

Referenced by create_JPEG_file().

init_source ( j_decompress_ptr )

Routines for source (data array) managing.

Definition at line 106 of file CompressJpeg.cpp.

Referenced by deflate_JPEG_file().

my_error_exit ( j_common_ptr cinfo )

Definition at line 89 of file CompressJpeg.cpp.

References my_error_mgr::setjmp_buffer.

Referenced by deflate_JPEG_file().

skip_input_data | ( | j_decompress_ptr | cinfo,
 |  | long | num_bytes
 | ) |

Definition at line 125 of file CompressJpeg.cpp.

References fill_input_buffer().

Referenced by deflate_JPEG_file().

term_destination ( j_compress_ptr )

Definition at line 162 of file CompressJpeg.cpp.

Referenced by create_JPEG_file().

term_source ( j_decompress_ptr )

Definition at line 139 of file CompressJpeg.cpp.

Referenced by deflate_JPEG_file().

Variable Documentation

JSAMPLE* image_buffer

Definition at line 62 of file CompressJpeg.cpp.

Referenced by BIAS::JpegHandler::Compress(), and create_JPEG_file().

int image_channels

Definition at line 65 of file CompressJpeg.cpp.

Referenced by BIAS::JpegHandler::Compress(), and create_JPEG_file().

int image_height

Definition at line 63 of file CompressJpeg.cpp.

Referenced by BIAS::JpegHandler::Compress(), and create_JPEG_file().

int image_width

Definition at line 64 of file CompressJpeg.cpp.

Referenced by BIAS::JpegHandler::Compress(), and create_JPEG_file().

Generated on Wed Jun 21 19:04:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CompressJpeg.hh File Reference

Image

CompressJpeg.hh File Reference

#include <stdio.h>
#include <sstream>
#include <string.h>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for CompressJpeg.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::JpegHandler

Defines

#define | __JPEGHANDLER_HH__

Define Documentation

#define __JPEGHANDLER_HH__

Definition at line 24 of file CompressJpeg.hh.

Generated on Wed Jun 21 19:04:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Contour.cpp File Reference

Image

Contour.cpp File Reference

#include "Contour.hh"
#include <limits>

Include dependency graph for Contour.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Contour.hh File Reference

Image

Contour.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Contour.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Contour
a class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code More...

Generated on Wed Jun 21 19:04:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CylinderMapping.cpp File Reference

Image

CylinderMapping.cpp File Reference

#include "CylinderMapping.hh"

Include dependency graph for CylinderMapping.cpp:

Go to the source code of this file.

Functions

static void | rotateY (BIAS::Vector3< double > &v, const double rad)
static double | toDeg (const double rad)
static double | toRad (const double deg)

Function Documentation

static void rotateY | ( | BIAS::Vector3< double > & | v,
 |  | const double | rad
 | ) | [static]

Definition at line 18 of file CylinderMapping.cpp.

References BIAS::Vector3< T >::Set().

Referenced by BIAS::CylinderMapping::GetSourceCoordinates_().

static double toDeg ( const double rad ) [static]

Definition at line 9 of file CylinderMapping.cpp.

Referenced by BIAS::CylinderMapping::GetSourceCoordinates_().

static double toRad ( const double deg ) [static]

Definition at line 13 of file CylinderMapping.cpp.

Referenced by BIAS::CylinderMapping::GetSourceCoordinates_().

Generated on Wed Jun 21 19:04:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CylinderMapping.hh File Reference

Image

CylinderMapping.hh File Reference

#include <Base/Image/Image.hh>
#include <Image/BackwardMapping.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for CylinderMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CylinderMapping
functions for spherical undistortion of given images, needs image dimensions, principal point and focal length as input additional to the image data. More...

Defines

#define | __BIAS_CylinderMappibg_hh__

Define Documentation

#define __BIAS_CylinderMappibg_hh__

Definition at line 26 of file CylinderMapping.hh.

Generated on Wed Jun 21 19:04:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/DCData.cpp File Reference

Image

DCData.cpp File Reference

#include "DCData.hh"
#include <Base/Debug/Error.hh>
#include <string>
#include <cmath>
#include <Base/Common/W32Compat.hh>

Include dependency graph for DCData.cpp:

Go to the source code of this file.

Functions

ostream & | BIAS::operator<< (ostream &os, const DC_GPS &gps)
ostream & | BIAS::operator<< (ostream &os, const DC_inertial &inert)
ostream & | BIAS::operator<< (ostream &os, const DC_ptu &ptu)
istream & | BIAS::operator>> (istream &is, DC_GPS &gps)
istream & | BIAS::operator>> (istream &is, DC_inertial &inert)
istream & | BIAS::operator>> (istream &is, DC_ptu &ptu)

Generated on Wed Jun 21 19:04:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/DCData.hh File Reference

Image

DCData.hh File Reference

#include <bias_config.h>
#include <iostream>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>

Include dependency graph for DCData.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::DC_GPS
class | BIAS::DC_inertial
class | BIAS::DC_ptu

Defines

#define | D_DC_DATA_CALC 0x0001

Define Documentation

#define D_DC_DATA_CALC 0x0001

Definition at line 36 of file DCData.hh.

Generated on Wed Jun 21 19:04:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D.cpp File Reference

Image

FFT2D.cpp File Reference

#include "FFT2D.hh"
#include <fftw3.h>
#include <Base/Debug/Error.hh>
#include <complex>
#include <iomanip>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for FFT2D.cpp:

Go to the source code of this file.

Variables

template class BIASImage_EXPORT | FFT2D< float, float >
template class BIASImage_EXPORT | FFT2D< unsigned char, float >

Variable Documentation

template class BIASImage_EXPORT FFT2D< float, float >

Definition at line 341 of file FFT2D.cpp.

Referenced by main().

template class BIASImage_EXPORT FFT2D< unsigned char, float >

Definition at line 347 of file FFT2D.cpp.

Referenced by main().

Generated on Wed Jun 21 19:04:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D.hh File Reference

Image

FFT2D.hh File Reference

#include <bias_config.h>
#include "Filter/FilterNTo2N.hh"
#include <complex>
#include <iostream>
#include <fftw3.h>

Include dependency graph for FFT2D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FFT2D< InputStorageType, OutputStorageType >
wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()
More...

Generated on Wed Jun 21 19:04:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D_Tiles.cpp File Reference

Image

FFT2D_Tiles.cpp File Reference

#include "FFT2D_Tiles.hh"
#include <fftw3.h>
#include <Base/Debug/Error.hh>

Include dependency graph for FFT2D_Tiles.cpp:

Go to the source code of this file.

Variables

template class BIASImage_EXPORT | FFT2D_Tiles< float, float >
template class BIASImage_EXPORT | FFT2D_Tiles< unsigned char, float >

Variable Documentation

template class BIASImage_EXPORT FFT2D_Tiles< float, float >

Definition at line 237 of file FFT2D_Tiles.cpp.

template class BIASImage_EXPORT FFT2D_Tiles< unsigned char, float >

Definition at line 243 of file FFT2D_Tiles.cpp.

Referenced by main().

Generated on Wed Jun 21 19:04:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D_Tiles.hh File Reference

Image

FFT2D_Tiles.hh File Reference

#include <bias_config.h>
#include "FFT2D.hh"

Include dependency graph for FFT2D_Tiles.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >

Generated on Wed Jun 21 19:04:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Histogram.cpp File Reference

Image

Histogram.cpp File Reference

#include "Histogram.hh"
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for Histogram.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | INST_ADDHIST(DataType)
must be at end of file cmenk, jw
#define | INST_ADDHIST_IMG(DataType) template int BIASImage_EXPORT Histogram::AddHist<DataType>(Image<DataType> &src, unsigned hist); \

Define Documentation

#define INST_ADDHIST ( DataType )

Value:

template int  BIASImage_EXPORT Histogram::AddHist<DataType>(std::vector<DataType>& data, DataType min, DataType max, unsigned int hist ); \
template int  BIASImage_EXPORT Histogram::AddHist<DataType>(std::vector<DataType>& data, unsigned int hist); \
template void BIASImage_EXPORT Histogram2D::AddHist(std::vector<DataType>& xdata, std::vector<DataType>& ydata);
must be at end of file cmenk, jw

Definition at line 1067 of file Histogram.cpp.

#define INST_ADDHIST_IMG ( DataType ) template int BIASImage_EXPORT Histogram::AddHist<DataType>(Image<DataType> &src, unsigned hist); \

Definition at line 1080 of file Histogram.cpp.

Generated on Wed Jun 21 19:04:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Histogram.hh File Reference

Image

Histogram.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Math/Math.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Histogram.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Histogram
class for easy histogram generation More...
class | BIAS::Histogram2D

Defines

#define | D_HIST_VEC 0x8000000

Enumerations

enum | BIAS::HistMode { BIAS::HIST_POINTS, BIAS::HIST_BARS, BIAS::HIST_LINES }

Define Documentation

#define D_HIST_VEC 0x8000000

Definition at line 37 of file Histogram.hh.

Referenced by BIAS::Histogram::AddHist().

Generated on Wed Jun 21 19:04:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/HomographyMapping.cpp File Reference

Image

HomographyMapping.cpp File Reference

#include "HomographyMapping.hh"
#include <Geometry/RMatrix.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Geometry/HomgPoint2D.hh>

Include dependency graph for HomographyMapping.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/HomographyMapping.hh File Reference

Image

HomographyMapping.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Image/BackwardMapping.hh>
#include <Geometry/HMatrix.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for HomographyMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::HomographyMapping< InputStorageType, OutputStorageType >
Maps image src to image sink with homography H (software implementation). More...

Generated on Wed Jun 21 19:04:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/IntegralHistogram.cpp File Reference

Image

IntegralHistogram.cpp File Reference

#include "IntegralHistogram.hh"
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for IntegralHistogram.cpp:

Go to the source code of this file.

Variables

BIAS::TimeMeasure rowtime
BIAS::TimeMeasure usertime

Variable Documentation

BIAS::TimeMeasure rowtime

Definition at line 36 of file IntegralHistogram.cpp.

BIAS::TimeMeasure usertime

Definition at line 36 of file IntegralHistogram.cpp.

Generated on Wed Jun 21 19:04:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/IntegralHistogram.hh File Reference

Image

IntegralHistogram.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Math/Math.hh>
#include <Base/Math/Vector.hh>
#include "ColorHistogram.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for IntegralHistogram.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::IntegralHistogram
This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms. More...

Defines

#define | D_INT_HIST (1<<0)

Define Documentation

#define D_INT_HIST (1<<0)

Definition at line 38 of file IntegralHistogram.hh.

Generated on Wed Jun 21 19:04:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/LogPolarMapping.cpp File Reference

Image

LogPolarMapping.cpp File Reference

#include "Image/LogPolarMapping.hh"
#include <Base/Geometry/HomgPoint2D.hh>

Include dependency graph for LogPolarMapping.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/LogPolarMapping.hh File Reference

Image

LogPolarMapping.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Image/BackwardMapping.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for LogPolarMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
Maps cartesian source coordinates to log-polar sink coordinates. More...

Generated on Wed Jun 21 19:04:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/MatlabTBUndistortion.cpp File Reference

Image

MatlabTBUndistortion.cpp File Reference

#include "MatlabTBUndistortion.hh"
#include <iostream>
#include <math.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for MatlabTBUndistortion.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/MatlabTBUndistortion.hh File Reference

Image

MatlabTBUndistortion.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Image/Image.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/Projection.hh>
#include <Image/CameraParam.hh>
#include <vector>
#include <string>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for MatlabTBUndistortion.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MatlabTBUndistortion
struct | BIAS::MatlabTBUndistortion::LuTEntry

Defines

#define | UNDIST_EPS 1e-9

Define Documentation

#define UNDIST_EPS 1e-9

Definition at line 39 of file MatlabTBUndistortion.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

Generated on Wed Jun 21 19:04:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PMDImageProc.cpp File Reference

Image

PMDImageProc.cpp File Reference

#include <Image/PMDImageProc.hh>
#include <Geometry/RMatrix.hh>
#include <Image/HomographyMapping.hh>
#include <Base/Image/ImageIO.hh>
#include <bias_config.h>
#include <stdio.h>

Include dependency graph for PMDImageProc.cpp:

Go to the source code of this file.

Defines

#define | DEPTH_MAX 50
#define | DEPTH_MIN 0
#define | MODCOEFF_MAX 100
#define | MODCOEFF_MIN -100
#define | UINT16_MAX (65535U)

Define Documentation

#define DEPTH_MAX 50

Definition at line 38 of file PMDImageProc.cpp.

Referenced by BIAS::PMDImageProc::DepthConvert_().

#define DEPTH_MIN 0

Definition at line 39 of file PMDImageProc.cpp.

Referenced by BIAS::PMDImageProc::DepthConvert_().

#define MODCOEFF_MAX 100

Definition at line 41 of file PMDImageProc.cpp.

Referenced by BIAS::PMDImageProc::ModCoeffConvert_().

#define MODCOEFF_MIN -100

Definition at line 42 of file PMDImageProc.cpp.

Referenced by BIAS::PMDImageProc::ModCoeffConvert_().

#define UINT16_MAX (65535U)

Definition at line 35 of file PMDImageProc.cpp.

Referenced by BIAS::PMDImageProc::Convert_().

Generated on Wed Jun 21 19:04:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PMDImageProc.hh File Reference

Image

PMDImageProc.hh File Reference

#include <bias_config.h>
#include <Base/Image/Image.hh>
#include <Base/Image/PMDImageIO.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/HMatrix.hh>
#include <Geometry/Pose.hh>
#include <Base/Common/CompareFloatingPoint.hh>

Include dependency graph for PMDImageProc.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMDImageProc

Defines

#define | __USE_BIAS__

Define Documentation

#define __USE_BIAS__

Definition at line 31 of file PMDImageProc.hh.

Generated on Wed Jun 21 19:04:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ProjectionMapping.cpp File Reference

Image

ProjectionMapping.cpp File Reference

#include "Image/ProjectionMapping.hh"
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Geometry/Projection.hh>

Include dependency graph for ProjectionMapping.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ProjectionMapping.hh File Reference

Image

ProjectionMapping.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Image/BackwardMapping.hh>
#include <Geometry/HMatrix.hh>
#include <Geometry/Projection.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ProjectionMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
Maps source pixel to sink pixel of given projections. More...

Generated on Wed Jun 21 19:04:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PyramidImage.cpp File Reference

Image

PyramidImage.cpp File Reference

#include "bias_config.h"
#include "PyramidImage.hh"
#include "Base/Image/ImageIO.hh"

Include dependency graph for PyramidImage.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PyramidImage.hh File Reference

Image

PyramidImage.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Image/Image.hh>
#include <Utils/Param.hh>
#include <Filter/Rescale.hh>
#include <float.h>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for PyramidImage.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PyramidImage< StorageType >
class for holding downsampled images More...

Defines

#define | D_PYRAMID_CREATE 0x00000001
#define | D_PYRAMID_SINGLE_IM 0x00000002
#define | PYRAMID_BACKGROUND 0
#define | PYRAMID_BORDER 2

Define Documentation

#define D_PYRAMID_CREATE 0x00000001

Definition at line 43 of file PyramidImage.hh.

#define D_PYRAMID_SINGLE_IM 0x00000002

Definition at line 44 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::GetSingleImage().

#define PYRAMID_BACKGROUND 0

Definition at line 41 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::GetSingleImage().

#define PYRAMID_BORDER 2

Definition at line 40 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::GetSingleImage(), and BIAS::GuiGTK::MouseMotionCallback_().

Generated on Wed Jun 21 19:04:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/RigParameter.cpp File Reference

Image

RigParameter.cpp File Reference

#include "RigParameter.hh"
#include "CameraParam.hh"
#include <Base/Common/XMLIO.hh>
#include <Image/SphericalUndistortion.hh>
#include <Image/MatlabTBUndistortion.hh>

Include dependency graph for RigParameter.cpp:

Go to the source code of this file.

Functions

std::ostream & BIAS::operator<< (std::ostream &os, RigParameter &r)

Generated on Wed Jun 21 19:04:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/RigParameter.hh File Reference

Image

RigParameter.hh File Reference

#include <bias_config.h>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/RMatrix.hh>
#include <Geometry/PMatrix.hh>
#include <Base/Math/Matrix4x4.hh>
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <string>
#include "CameraParam.hh"

Include dependency graph for RigParameter.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RigParameter

Defines

#define | RIG_PARAMETER_CURRENT_XML_VERSION 1.0

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, RigParameter &r)

Define Documentation

#define RIG_PARAMETER_CURRENT_XML_VERSION 1.0

Definition at line 24 of file RigParameter.hh.

Generated on Wed Jun 21 19:04:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/SphericalUndistortion.cpp File Reference

Image

SphericalUndistortion.cpp File Reference

#include "SphericalUndistortion.hh"
#include <Base/Common/W32Compat.hh>
#include <math.h>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/Quaternion.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <iostream>
#include <limits>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for SphericalUndistortion.cpp:

Go to the source code of this file.

Defines

#define INST(type)

Define Documentation

#define INST ( type )

Value:

\
template int BIASImage_EXPORT SphericalUndistortion::ProjectImageCylindric(const Image<type>& src, Image<type>& dst, double viewCenterX, double viewCenterY, double zoomFactor);\
template int BIASImage_EXPORT SphericalUndistortion::DrawCircles(Image<type>& src, const double& DegreeStep);\
template int BIASImage_EXPORT SphericalUndistortion::CorrectVignette(Image<type>& src);\

Definition at line 45 of file SphericalUndistortion.cpp.

Generated on Wed Jun 21 19:04:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/SphericalUndistortion.hh File Reference

Image

SphericalUndistortion.hh File Reference

#include <bias_config.h>
#include <Base/Common/W32Compat.hh>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Debug/Debug.hh>
#include <MathAlgo/Interpolator.hh>
#include <Image/CameraParam.hh>

Include dependency graph for SphericalUndistortion.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::SphericalUndistortion
transforms sphere images coming from a fisheye-lens according to different projection models. More...
struct | BIAS::SphericalUndistortion::LuTEntry
struct | BIAS::SphericalUndistortion::LuTpxpyEntry

Defines

#define | DEBUG_SPHEREPROJ_AVG 1
#define | DEBUG_SPHEREPROJ_CIRCLE 2

Define Documentation

#define DEBUG_SPHEREPROJ_AVG 1

Definition at line 67 of file SphericalUndistortion.hh.

#define DEBUG_SPHEREPROJ_CIRCLE 2

Definition at line 68 of file SphericalUndistortion.hh.

Generated on Wed Jun 21 19:04:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/StereoRedGreen.cpp File Reference

Image

StereoRedGreen.cpp File Reference

#include "StereoRedGreen.hh"
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Debug/Exception.hh>

Include dependency graph for StereoRedGreen.cpp:

Go to the source code of this file.

Defines

#define INST(type)

Define Documentation

#define INST ( type )

Value:

template void BIASImage_EXPORT StereoRedGreen::Combine<type>(const Image<type>& left, \
        const Image<type>& right, Image<type>& result);

Definition at line 66 of file StereoRedGreen.cpp.

Generated on Wed Jun 21 19:04:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/StereoRedGreen.hh File Reference

Image

StereoRedGreen.hh File Reference

#include <bias_config.h>

Include dependency graph for StereoRedGreen.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::StereoRedGreen
combine two separate images into one stereo image for red-green glasses More...

Generated on Wed Jun 21 19:04:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UndistortionMapping.cpp File Reference

Image

UndistortionMapping.cpp File Reference

#include "UndistortionMapping.hh"
#include <Geometry/RMatrix.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Geometry/HomgPoint2D.hh>

Include dependency graph for UndistortionMapping.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:04:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UndistortionMapping.hh File Reference

Image

UndistortionMapping.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Image/BackwardMapping.hh>
#include <Image/CameraParam.hh>
#include <Image/MatlabTBUndistortion.hh>
#include <Image/SphericalUndistortion.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for UndistortionMapping.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
Maps image src to image sink with spherical or lens distortion. More...

Generated on Wed Jun 21 19:04:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UnVignette.cpp File Reference

Image

UnVignette.cpp File Reference

#include "UnVignette.hh"
#include <iostream>
#include <math.h>
#include <MathAlgo/Lapack.hh>
#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/SVD.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for UnVignette.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UnVignette.hh File Reference

Image

UnVignette.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Image/Image.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/KMatrix.hh>
#include <MathAlgo/Interpolator.hh>
#include <Image/CameraParam.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include <vector>
#include <string>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for UnVignette.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::UnVignette

Defines

#define | UNDIST_EPS 1e-9

Variables

LEAST_SQUARES = 1
SPLINE_WITH_LUT

Define Documentation

#define UNDIST_EPS 1e-9

Definition at line 41 of file UnVignette.hh.

Variable Documentation

LEAST_SQUARES = 1

Definition at line 47 of file UnVignette.hh.

Referenced by BIAS::UnVignette::PrepareLuImage_(), MainFrame::UnVignette(), and BIAS::UnVignette::UnVignette().

SPLINE_WITH_LUT

Definition at line 47 of file UnVignette.hh.

Referenced by BIAS::UnVignette::Init().

Generated on Wed Jun 21 19:05:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/VideoStream.cpp File Reference

Image

VideoStream.cpp File Reference

#include "VideoStream.hh"
#include <fcntl.h>
#include <sstream>
#include <iostream>
#include "Camera.hh"
#include <Base/Image/ImageIO.hh>

Include dependency graph for VideoStream.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/VideoStream.hh File Reference

Image

VideoStream.hh File Reference

#include <bias_config.h>
#include <string>
#include <iostream>
#include <fstream>
#include <Base/Image/ImageBase.hh>

Include dependency graph for VideoStream.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoStream
To allow capturing of camera image to disk efficiently, (avoid multiple memcopy operations), this class defines an interface to file containing one header and multiple images. More...
class | BIAS::VideoStream::VSHeader
class | BIAS::VideoStream::VSImageHeader

Generated on Wed Jun 21 19:05:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCamera.cpp File Reference

Image » Examples

ExampleCamera.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "Image/Camera.hh"
#include "Base/Image/ImageIO.hh"

Include dependency graph for ExampleCamera.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file ExampleCamera.cpp.

References BIASERR, BIAS::PMatrix::Compose(), D_CAMERA_METADATA, BIAS::MetaData::Dump(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::Camera< StorageType >::GetC(), BIAS::Debug::GetDebugLevel(), BIAS::ImageBase::GetHeight(), BIAS::Camera< StorageType >::GetK(), BIAS::ImageBase::GetMetaData(), BIAS::Camera< StorageType >::GetP(), BIAS::Camera< StorageType >::GetProj(), BIAS::Camera< StorageType >::GetR(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), K, BIAS::DC_ptu::PanPos, BIAS::Camera< StorageType >::ParseMetaData(), BIAS::Camera< StorageType >::PrintAppData(), R, BIAS::DC_GPS::Set(), BIAS::DC_inertial::Set(), BIAS::Camera< StorageType >::SetC(), BIAS::Debug::SetDebugLevel(), BIAS::Camera< StorageType >::Setf(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Camera< StorageType >::SetK(), BIAS::Camera< StorageType >::SetP(), BIAS::Camera< StorageType >::SetProj(), BIAS::Camera< StorageType >::SetR(), BIAS::RMatrixBase::SetXYZ(), BIAS::DC_ptu::TiltPos, BIAS::DC_ptu::TimeStamp, BIAS::Camera< StorageType >::UpdateMetaData(), and BIAS::XMLBase::XMLRead().

Generated on Wed Jun 21 19:04:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCameraParam.cpp File Reference

Image » Examples

ExampleCameraParam.cpp File Reference

#include "Image/CameraParam.hh"
#include "Image/RigParameter.hh"
#include <iostream>

Include dependency graph for ExampleCameraParam.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 7 of file ExampleCameraParam.cpp.

References cp, BIAS::CameraParam::DebugOut(), BIAS::CameraParam::ReadCameraData(), BIAS::RigParameter::ReadRigData(), BIAS::RigParameter::SetData_DummyRig(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), BIAS::CameraParam::WriteCameraData(), and BIAS::RigParameter::WriteRigData().

Generated on Wed Jun 21 19:04:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleContour.cpp File Reference

Image » Examples

ExampleContour.cpp File Reference

#include "Image/Contour.hh"
#include "Base/Image/ImageIO.hh"
#include "Base/Debug/TimeMeasure.hh"

Include dependency graph for ExampleContour.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 8 of file ExampleContour.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), and res.

Generated on Wed Jun 21 19:04:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCylinderMapping.cpp File Reference

Image » Examples

ExampleCylinderMapping.cpp File Reference

#include <string>
#include <iostream>
#include <Utils/Param.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/CylinderMapping.hh>

Include dependency graph for ExampleCylinderMapping.cpp:

Go to the source code of this file.

Functions

int | main (int args, char **arg)
void | ParamInit (int &args, char **&arg)

Variables

BIAS::Param para

Function Documentation

int main | ( | int | args,
 |  | char ** | arg
 | ) |

Definition at line 40 of file ExampleCylinderMapping.cpp.

References BIASERR, BIAS::ImageIO::ExportImage(), BIAS::ImageIO::FF_ppm, BIAS::Param::GetParamDouble(), BIAS::Param::GetParamString(), BIAS::ImageIO::Load(), ParamInit(), and r.

void ParamInit | ( | int & | args,
 |  | char **& | arg
 | ) |

Definition at line 15 of file ExampleCylinderMapping.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::DisableDestructorWarning(), BIAS::Param::GetParamBool(), BIAS::Param::ParseCommandLine(), and BIAS::Param::Usage().

Referenced by main().

Variable Documentation

BIAS::Param para

Definition at line 12 of file ExampleCylinderMapping.cpp.

Referenced by main(), and BIAS::GuiBase::ShowImage().

Generated on Wed Jun 21 19:04:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFFT2D.cpp File Reference

Image » Examples

ExampleFFT2D.cpp File Reference

#include <Image/FFT2D.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for ExampleFFT2D.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 11 of file ExampleFFT2D.cpp.

References BIASERR, BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), FFT2D< unsigned char, float >, BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), r, res, and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

Generated on Wed Jun 21 19:04:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFFT2D_Tiles.cpp File Reference

Image » Examples

ExampleFFT2D_Tiles.cpp File Reference

#include <Image/FFT2D_Tiles.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for ExampleFFT2D_Tiles.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 11 of file ExampleFFT2D_Tiles.cpp.

References BIASERR, FFT2D_Tiles< unsigned char, float >, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), res, and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Generated on Wed Jun 21 19:04:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFMT2D.cpp File Reference

Image » Examples

ExampleFMT2D.cpp File Reference

#include <Image/FFT2D.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Image/LogPolarMapping.hh>
#include <Image/HomographyMapping.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Geometry/RMatrix.hh>

Include dependency graph for ExampleFMT2D.cpp:

Go to the source code of this file.

Functions

int | castchar (const Image< float > &src, Image< unsigned char > &dst)
int | castfloat (const Image< unsigned char > &src, Image< float > &dst)
int | cut (const Image< float > &src, Image< float > &dst)
int | main (int argc, char *argv[])
int | mirror (const Image< float > &src, Image< float > &dst)

Function Documentation

int castchar | ( | const Image< float > & | src,
 |  | Image< unsigned char > & | dst
 | ) |

Definition at line 88 of file ExampleFMT2D.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

int castfloat | ( | const Image< unsigned char > & | src,
 |  | Image< float > & | dst
 | ) |

Definition at line 75 of file ExampleFMT2D.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

Referenced by main().

int cut | ( | const Image< float > & | src,
 |  | Image< float > & | dst
 | ) |

Definition at line 14 of file ExampleFMT2D.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 101 of file ExampleFMT2D.cpp.

References BIASERR, castfloat(), cut(), FFT2D< float, float >, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::MatrixIdentity, max, res, BIAS::ImageBase::SetColorModel(), BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs().

int mirror | ( | const Image< float > & | src,
 |  | Image< float > & | dst
 | ) |

Definition at line 30 of file ExampleFMT2D.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Generated on Wed Jun 21 19:04:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleHistogram.cpp File Reference

Image » Examples

ExampleHistogram.cpp File Reference

#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Math/Random.hh>
#include "Image/Histogram.hh"
#include <iostream>

Include dependency graph for ExampleHistogram.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 39 of file ExampleHistogram.cpp.

References BIAS::Histogram2D::AddHist(), BIAS::Histogram::AddHist(), BIASERR, BIAS::Histogram::CooTransf(), BIAS::Histogram::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::Random::GetUniformDistributed(), BIAS::HIST_LINES, BIAS::Histogram2D::InitHist(), BIAS::Histogram::InitHist(), r, res, BIAS::Histogram::SetColor(), BIAS::Histogram::SetDrawMode(), BIAS::Histogram2D::SetFactor(), BIAS::Histogram::SetFactor(), and BIAS::Histogram2D::ZeroHist().

Generated on Wed Jun 21 19:04:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleHomographyMapping.cpp File Reference

Image » Examples

ExampleHomographyMapping.cpp File Reference

#include <Image/HomographyMapping.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleHomographyMapping.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExampleHomographyMapping.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), BIAS::TimeMeasure::GetUserTime(), BIAS::ImageBase::GetWidth(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix< T >::Load(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), BIAS::MapAnisotropic, BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::MapTrilinear, BIAS::MatrixIdentity, BIAS::HomographyMapping< InputStorageType, OutputStorageType >::SetHomography(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:04:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleLogPolarMapping.cpp File Reference

Image » Examples

ExampleLogPolarMapping.cpp File Reference

#include <Image/LogPolarMapping.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Utils/Param.hh>

Include dependency graph for ExampleLogPolarMapping.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExampleLogPolarMapping.cpp.

References BIAS::Param::AddParamString(), BIASERR, BIAS::Param::GetParamString(), param, and BIAS::Param::ParseCommandLine().

Generated on Wed Jun 21 19:04:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleMapPerspImages.cpp File Reference

Image » Examples

ExampleMapPerspImages.cpp File Reference

#include <bias_config.h>
#include <Image/CameraParam.hh>
#include <Image/UndistortionMapping.hh>
#include <Image/MatlabTBUndistortion.hh>
#include <Image/SphericalUndistortion.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <iostream>

Include dependency graph for ExampleMapPerspImages.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 23 of file ExampleMapPerspImages.cpp.

References BIAS::SphericalUndistortion::Init(), BIAS::MatlabTBUndistortion::Init(), BIAS::CameraParam::IsInitialized(), BIAS::CameraParam::IsSpherical(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam().

Generated on Wed Jun 21 19:04:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExamplePMDImageIO.cpp File Reference

Image » Examples

ExamplePMDImageIO.cpp File Reference

#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/PMDImageProc.hh>

Include dependency graph for ExamplePMDImageIO.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 36 of file ExamplePMDImageIO.cpp.

References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::channels, BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::PMDImageMetaData::FocallengthX, BIAS::PMDImageMetaData::height, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, BIAS::PMDImageMetaData::UndistCoeff, and BIAS::PMDImageMetaData::width.

Generated on Wed Jun 21 19:04:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleProjectionMapping.cpp File Reference

Image » Examples

ExampleProjectionMapping.cpp File Reference

#include <Image/ProjectionMapping.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/Image.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector.hh>
#include <Utils/Param.hh>
#include <Utils/ThreeDOut.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <Image/Camera.hh>

Include dependency graph for ExampleProjectionMapping.cpp:

Go to the source code of this file.

Functions

void GenerateProjection (Projection &p)
void | GetSequenceAngle (unsigned int &sequence, Projection p1, Projection p2, const bool yaxis, double &rotationAngle)
int | main (int argc, char *argv[])
void | SetRotation (Projection &p, Vector3< ROTATION_MATRIX_TYPE > v, double a)

Function Documentation

void GenerateProjection ( Projection & p )

Definition at line 96 of file ExampleProjectionMapping.cpp.

References BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersPerspective::SetPrincipal(), and SetRotation().

void GetSequenceAngle | ( | unsigned int & | sequence,
 |  | Projection | p1,
 |  | Projection | p2,
 |  | const bool | yaxis,
 |  | double & | rotationAngle
 | ) |

Definition at line 43 of file ExampleProjectionMapping.cpp.

References BIAS::ProjectionParametersPerspective::GetFocalLength(), BIAS::ProjectionParametersBase::GetImageSize(), and BIAS::Projection::GetParameters().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 107 of file ExampleProjectionMapping.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::AddParamVecDbl(), BIASERR, BIAS::Param::GetParamString(), param, and BIAS::Param::ParseCommandLine().

void SetRotation | ( | Projection & | p,
 |  | Vector3< ROTATION_MATRIX_TYPE > | v,
 |  | double | a
 | ) |

Definition at line 89 of file ExampleProjectionMapping.cpp.

References BIAS::Projection::GetParameters(), R, and BIAS::ProjectionParametersBase::SetR().

Referenced by GenerateProjection().

Generated on Wed Jun 21 19:04:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExamplePyramidImage.cpp File Reference

Image » Examples

ExamplePyramidImage.cpp File Reference

#include <Image/PyramidImage.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <sstream>
#include <iomanip>

Include dependency graph for ExamplePyramidImage.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "PyramidImage.ini"
#define | KernelType int
#define | StorageType unsigned char
#define | type 1

Functions

int | main (int argc, char *argv[])
int | WritePyImage (const PyramidImage< StorageType > &pim, const std::string &name="pyim")

Define Documentation

#define DEFAULT_PARA_FILE_NAME "PyramidImage.ini"

Definition at line 38 of file ExamplePyramidImage.cpp.

#define KernelType int

Definition at line 43 of file ExamplePyramidImage.cpp.

#define StorageType unsigned char

Definition at line 42 of file ExamplePyramidImage.cpp.

#define type 1

Definition at line 40 of file ExamplePyramidImage.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 74 of file ExamplePyramidImage.cpp.

References BIASERR, DEFAULT_PARA_FILE_NAME, BIAS::PyramidImage< StorageType >::Downsample(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::TimeMeasure::GetUserTime(), BIAS::ImageBase::GetWidth(), BIAS::PyramidImage< StorageType >::Init(), BIAS::LPT_Mean, para, BIAS::TimeMeasure::Reset(), BIAS::Param::SetParamDouble(), BIAS::Param::SetParamEnum(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), StorageType, BIAS::Param::UpdateParameter(), BIAS::Param::Usage(), and WritePyImage().

int WritePyImage | ( | const PyramidImage< StorageType > & | pim,
 |  | const std::string & | name = "pyim"
 | ) |

Definition at line 49 of file ExamplePyramidImage.cpp.

References BIASERR, BIAS::PyramidImage< StorageType >::GetFactors(), and BIAS::PyramidImage< StorageType >::GetSingleImage().

Referenced by main().

Generated on Wed Jun 21 19:04:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleRigParameter.cpp File Reference

Image » Examples

ExampleRigParameter.cpp File Reference

#include "Image/RigParameter.hh"

Include dependency graph for ExampleRigParameter.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 9 of file ExampleRigParameter.cpp.

References BIASERR, BIAS::RigParameter::ReadRigData(), and BIAS::RigParameter::WriteRigData().

Generated on Wed Jun 21 19:04:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleSphereProjections.cpp File Reference

Image » Examples

ExampleSphereProjections.cpp File Reference

#include <Image/CameraParam.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/SphericalUndistortion.hh>
#include <Image/UndistortionMapping.hh>
#include <sstream>
#include <iomanip>
#include <getopt.h>

Include dependency graph for ExampleSphereProjections.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
void usage ()

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 64 of file ExampleSphereProjections.cpp.

References BIASERR, getopt(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::IsInitialized(), BIAS::CameraParam::IsSpherical(), optarg, optind, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and usage().

void usage ( )

Definition at line 43 of file ExampleSphereProjections.cpp.

Generated on Wed Jun 21 19:04:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleUndistort.cpp File Reference

Image » Examples

ExampleUndistort.cpp File Reference

#include <bias_config.h>
#include <Image/CameraParam.hh>
#include <Image/UndistortionMapping.hh>
#include <Image/MatlabTBUndistortion.hh>
#include <Base/Image/ImageIO.hh>
#include <iostream>

Include dependency graph for ExampleUndistort.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 20 of file ExampleUndistort.cpp.

References cp, BIAS::CameraParam::IsInitialized(), BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::ReadCameraData(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam().

Generated on Wed Jun 21 19:04:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleUnVignette.cpp File Reference

Image » Examples

ExampleUnVignette.cpp File Reference

#include <bias_config.h>
#include <Image/CameraParam.hh>
#include <Image/UnVignette.hh>
#include <Base/Image/ImageIO.hh>
#include <iostream>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleUnVignette.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 16 of file ExampleUnVignette.cpp.

References BIAS::ImageIO::Load(), and BIAS::CameraParam::ReadCameraData().

Generated on Wed Jun 21 19:04:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleVideoStream.cpp File Reference

Image » Examples

ExampleVideoStream.cpp File Reference

#include <iostream>
#include <Image/VideoStream.hh>

Include dependency graph for ExampleVideoStream.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 6 of file ExampleVideoStream.cpp.

References BIAS::VideoStream::Open(), BIAS::VideoStream::PrintHeader(), and BIAS::VideoStream::SplitIntoFiles().

Generated on Wed Jun 21 19:04:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/PMatrix2RigParameter.cpp File Reference

Image » Examples

PMatrix2RigParameter.cpp File Reference

#include "../CameraParam.hh"
#include "../RigParameter.hh"
#include <iostream>

Include dependency graph for PMatrix2RigParameter.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 15 of file PMatrix2RigParameter.cpp.

References BIAS::RigParameter::AddCalibration(), BIAS::RigParameter::AddCamera(), BIASERR, K, BIAS::PMatrix::Load(), and param.

Generated on Wed Jun 21 19:04:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/CornerMatcher.cpp File Reference

Matcher2D

CornerMatcher.cpp File Reference

#include "CornerMatcher.hh"

Include dependency graph for CornerMatcher.cpp:

Go to the source code of this file.

Defines

#define INST(uctype)

Functions

INST (char)
INST (int)
INST (unsigned char)

Define Documentation

#define INST ( uctype )

Value:

template int CornerMatcher::SSD<uctype>(HomgPoint2D& p1, HomgPoint2D& p2,\
  Image<uctype>& im1,\
  Image<uctype>& im2, unsigned int halfwinsize, double& result);\
template int CornerMatcher::NCC<uctype>(HomgPoint2D& p1, HomgPoint2D& p2,\
  Image<uctype>& im1,\
  Image<uctype>& im2, unsigned int halfwinsize, double& result);\
template int CornerMatcher::NCCSearch<uctype>(HomgPoint2D& p1,HomgPoint2D& p2,\
  Image<uctype>& im1, Image<uctype>& im2, unsigned int halfnccwinsize,\
  unsigned int halfsearchwinsize, HomgPoint2D& resultpoint,\
  double mincorrelation, double& result);\
template int CornerMatcher::ParabolaNCC(HomgPoint2D& p1, HomgPoint2D& p2,\
  Image<uctype>& im1, Image<uctype>& im2, unsigned int halfwinsize,\
  HomgPoint2D& result);\
template int CornerMatcher::ParabolaNCC5(HomgPoint2D& p1, HomgPoint2D& p2,\
  Image<uctype>& im1, Image<uctype>& im2, unsigned int halfwinsize,\
  HomgPoint2D& result);\
template int CornerMatcher::RefinePyramideNCC<uctype>(\
  vector<vector<HomgPoint2D> >& ps1, PyramidImage<uctype>& im1, \
  PyramidImage<uctype>& im2, unsigned int halfnccwinsize, \
  vector<vector<HomgPoint2D> >& matches, \
  vector<vector<double> >& matchquality)

Definition at line 32 of file CornerMatcher.cpp.

Function Documentation

INST ( char )

INST ( int )

INST ( unsigned char )

Generated on Wed Jun 21 19:05:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/CornerMatcher.hh File Reference

Matcher2D

CornerMatcher.hh File Reference

#include "bias_config.h"
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Image/Image.hh>
#include <Image/PyramidImage.hh>
#include "RegionMatcher.hh"

Include dependency graph for CornerMatcher.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CornerMatcher
class with various functions to detect corresponding image points More...

Defines

#define | D_CORNER_MATCHER_KLT 0x0020
#define | D_CORNER_MATCHER_PARABOLA 0x0040
#define | D_CORNER_MATCHER_PYKLT 0x0080
#define | D_CORNER_MATCHER_SEARCH 0x0010

Define Documentation

#define D_CORNER_MATCHER_KLT 0x0020

Definition at line 37 of file CornerMatcher.hh.

#define D_CORNER_MATCHER_PARABOLA 0x0040

Definition at line 38 of file CornerMatcher.hh.

Referenced by BIAS::CornerMatcher::ParabolaNCC(), and BIAS::CornerMatcher::ParabolaNCC5().

#define D_CORNER_MATCHER_PYKLT 0x0080

Definition at line 39 of file CornerMatcher.hh.

#define D_CORNER_MATCHER_SEARCH 0x0010

Definition at line 36 of file CornerMatcher.hh.

Referenced by main(), and BIAS::CornerMatcher::NCCSearch().

Generated on Wed Jun 21 19:05:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/LineMatcher.cpp File Reference

Matcher2D

LineMatcher.cpp File Reference

#include "Base/Image/ScanLine.hh"
#include <float.h>

Include dependency graph for LineMatcher.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/RegionMatcher.cpp File Reference

Matcher2D

RegionMatcher.cpp File Reference

#include "RegionMatcher.hh"
#include "LineMatcher.cpp"
#include "SimilarityMeasure.cpp"

Include dependency graph for RegionMatcher.cpp:

Go to the source code of this file.

Defines

#define | INST(type)
#define | INSTUC(uctype)

Define Documentation

#define INST ( type )

Value:

INSTUC(type)\
template void RegionMatcher::SSD<type>(unsigned int p1[2], unsigned int p2[2],\
  type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
template void RegionMatcher::NCC<type>(unsigned int p1[2], unsigned int p2[2],\
  type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
template void RegionMatcher::SAD<type>(unsigned int p1[2], unsigned int p2[2],\
  type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
template void RegionMatcher::SADN<type>(unsigned int p1[2],unsigned int p2[2],\
  type **ida1, type **ida2, unsigned int halfwinsize, double& result);

Definition at line 70 of file RegionMatcher.cpp.

#define INSTUC ( uctype )

Definition at line 31 of file RegionMatcher.cpp.

Generated on Wed Jun 21 19:05:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/RegionMatcher.hh File Reference

Matcher2D

RegionMatcher.hh File Reference

#include <bias_config.h>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>
#include <MathAlgo/Lapack.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Math/Vector2.hh>

Include dependency graph for RegionMatcher.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RegionMatcher
basic functions for CornerMatcher More...

Defines

#define | absdiff(a, b) ((a>b)?(a-b):(b-a))
some fast SAD functions via defines
#define | D_REGION_MATCHER_COLORCCV 0x0020
#define | D_REGION_MATCHER_COLORNCC 0x0010
#define | D_REGION_MATCHER_KLT 0x0002
#define | D_REGION_MATCHER_KLT_EDGE 0x0040
#define | D_REGION_MATCHER_LINE 0x0004
#define | D_REGION_MATCHER_PARABOLA 0x0008
#define | D_REGION_MATCHER_SEARCH_EVEN 0x0080
#define | D_REGION_MATCHER_SEARCH_ODD 0x0100
#define | D_REGION_MATCHER_SEARCHNCC 0x0001
#define | KLT_TYPE double
#define | NCC5x5(x1, y1, x2, y2, ida1, ida2, re)
#define | SAD3x3(x1, y1, x2, y2, ida1, ida2, re)
#define | SAD5x5(x1, y1, x2, y2, ida1, ida2, re)

Define Documentation

#define absdiff | ( | a,
 |  | b | ) | ((a>b)?(a-b):(b-a))

some fast SAD functions via defines

Author:
woelk

Definition at line 55 of file RegionMatcher.hh.

#define D_REGION_MATCHER_COLORCCV 0x0020

Definition at line 42 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::ColorCCV().

#define D_REGION_MATCHER_COLORNCC 0x0010

Definition at line 41 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::CNCC(), and BIAS::RegionMatcher::ColorNCC().

#define D_REGION_MATCHER_KLT 0x0002

Definition at line 38 of file RegionMatcher.hh.

#define D_REGION_MATCHER_KLT_EDGE 0x0040

Definition at line 43 of file RegionMatcher.hh.

Referenced by main().

#define D_REGION_MATCHER_LINE 0x0004

Definition at line 39 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::LineMatcherNCC(), BIAS::RegionMatcher::LineMatcherSAD(), and main().

#define D_REGION_MATCHER_PARABOLA 0x0008

Definition at line 40 of file RegionMatcher.hh.

Referenced by main(), BIAS::RegionMatcher::ParabolaNCC(), and BIAS::RegionMatcher::ParabolaNCC5().

#define D_REGION_MATCHER_SEARCH_EVEN 0x0080

Definition at line 44 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCCSearchEven().

#define D_REGION_MATCHER_SEARCH_ODD 0x0100

Definition at line 45 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCCSearchOdd().

#define D_REGION_MATCHER_SEARCHNCC 0x0001

Definition at line 37 of file RegionMatcher.hh.

Referenced by main(), BIAS::RegionMatcher::NCCSearchEven(), and BIAS::RegionMatcher::NCCSearchOdd().

#define KLT_TYPE double

Definition at line 48 of file RegionMatcher.hh.

Referenced by _am_compute4by1ErrorVector(), _am_compute4by4GradientMatrix(), _am_compute6by1ErrorVector(), _am_compute6by6GradientMatrix(), BIAS::TrackerBase< StorageType >::_am_computeIntensityDifferenceAffine(), _am_gauss_jordan_elimination(), BIAS::TrackerBase< StorageType >::_am_getGradientWinAffine(), BIAS::RegionMatcher::_Bilinear(), BIAS::RegionMatcher::_BilinearRegion(), BIAS::RegionMatcher::_ParabolaApprox(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), main(), BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::TrackerBase< StorageType >::RejectMAD_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define NCC5x5 | ( | x1,
 |  | y1,
 |  | x2,
 |  | y2,
 |  | ida1,
 |  | ida2,
 |  | re | )

Definition at line 98 of file RegionMatcher.hh.

#define SAD3x3 | ( | x1,
 |  | y1,
 |  | x2,
 |  | y2,
 |  | ida1,
 |  | ida2,
 |  | re | )

Value:

unsigned x1m=x1-1, x1p=x1+1, y1m=y1-1, y1p=y1+1;\
  unsigned x2m=x2-1, x2p=x2+1, y2m=y2-1, y2p=y2+1;\
  re = (unsigned)absdiff(ida1[y1m][x1m], ida2[y2m][x2m]) + \
       (unsigned)absdiff(ida1[y1m][x1], ida2[y2m][x2]) + \
       (unsigned)absdiff(ida1[y1m][x1p], ida2[y2m][x2p]) + \
       (unsigned)absdiff(ida1[y1][x1m], ida2[y2][x2m]) + \
       (unsigned)absdiff(ida1[y1][x1], ida2[y2][x2]) + \
       (unsigned)absdiff(ida1[y1][x1p], ida2[y2][x2p]) + \
       (unsigned)absdiff(ida1[y1p][x1m], ida2[y2p][x2m]) + \
       (unsigned)absdiff(ida1[y1p][x1], ida2[y2p][x2]) + \
       (unsigned)absdiff(ida1[y1p][x1p], ida2[y2p][x2p]);

Definition at line 56 of file RegionMatcher.hh.

#define SAD5x5 | ( | x1,
 |  | y1,
 |  | x2,
 |  | y2,
 |  | ida1,
 |  | ida2,
 |  | re | )

Value:

unsigned x1m=x1-1, x1p=x1+1, y1m=y1-1, y1p=y1+1, x1m2=x1-2, x1p2=x2+2, y1m2=y2-2, y1p2=y2+2;\
  unsigned x2m=x2-1, x2p=x2+1, y2m=y2-1, y2p=y2+1, x2m2=x1-2, x2p2=x2+2, y2m2=y2-2, y2p2=y2+2;\
  re = (unsigned)absdiff(ida1[y1m2][x1m2], ida2[y2m2][x2m2]) + \
       (unsigned)absdiff(ida1[y1m2][x1m],  ida2[y2m2][x2m]) + \
       (unsigned)absdiff(ida1[y1m2][x1],   ida2[y2m2][x2]) + \
       (unsigned)absdiff(ida1[y1m2][x1p],  ida2[y2m2][x2p]) + \
       (unsigned)absdiff(ida1[y1m2][x1p2], ida2[y2m2][x2p2]) + \
       (unsigned)absdiff(ida1[y1m][x1m2], ida2[y2m][x2m2]) + \
       (unsigned)absdiff(ida1[y1m][x1m],  ida2[y2m][x2m]) + \
       (unsigned)absdiff(ida1[y1m][x1],   ida2[y2m][x2]) + \
       (unsigned)absdiff(ida1[y1m][x1p],  ida2[y2m][x2p]) + \
       (unsigned)absdiff(ida1[y1m][x1p2], ida2[y2m][x2p2]) + \
       (unsigned)absdiff(ida1[y1][x1m2], ida2[y2][x2m2]) + \
       (unsigned)absdiff(ida1[y1][x1m],  ida2[y2][x2m]) + \
       (unsigned)absdiff(ida1[y1][x1],   ida2[y2][x2]) + \
       (unsigned)absdiff(ida1[y1][x1p],  ida2[y2][x2p]) + \
       (unsigned)absdiff(ida1[y1][x1p2], ida2[y2][x2p2]) + \
       (unsigned)absdiff(ida1[y1p][x1m2], ida2[y2p][x2m2]) + \
       (unsigned)absdiff(ida1[y1p][x1m],  ida2[y2p][x2m]) + \
       (unsigned)absdiff(ida1[y1p][x1],   ida2[y2p][x2]) + \
       (unsigned)absdiff(ida1[y1p][x1p],  ida2[y2p][x2p]) + \
       (unsigned)absdiff(ida1[y1p][x1p2], ida2[y2p][x2p2]) + \
       (unsigned)absdiff(ida1[y1p2][x1m2], ida2[y2p2][x2m2]) + \
       (unsigned)absdiff(ida1[y1p2][x1m],  ida2[y2p2][x2m]) + \
       (unsigned)absdiff(ida1[y1p2][x1],   ida2[y2p2][x2]) + \
       (unsigned)absdiff(ida1[y1p2][x1p],  ida2[y2p2][x2p]) + \
       (unsigned)absdiff(ida1[y1p2][x1p2], ida2[y2p2][x2p2]);

Definition at line 69 of file RegionMatcher.hh.

Generated on Wed Jun 21 19:05:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/SimilarityMeasure.cpp File Reference

Matcher2D

SimilarityMeasure.cpp File Reference

#include "RegionMatcher.hh"
#include <float.h>

Include dependency graph for SimilarityMeasure.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | CNCC_EPSILON 1E-08
#define | CNCC_EPSILON 1E-08
#define | STORAGETYPE_MAX 256.0

Define Documentation

#define CNCC_EPSILON 1E-08

#define CNCC_EPSILON 1E-08

Referenced by BIAS::RegionMatcher::CNCC(), and BIAS::RegionMatcher::ColorNCC().

#define STORAGETYPE_MAX 256.0

Referenced by BIAS::RegionMatcher::SADN().

Generated on Wed Jun 21 19:05:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Tracker.cpp File Reference

Matcher2D

Tracker.cpp File Reference

#include "Tracker.hh"
#include <Base/Image/ImageIO.hh>

Include dependency graph for Tracker.cpp:

Go to the source code of this file.

Defines

#define | DFLT_PYSIZE 4

Variables

double | totalitersum = 0.0
static int | Tracker_GlobalImageCounter = 0

Define Documentation

#define DFLT_PYSIZE 4

Definition at line 41 of file Tracker.cpp.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

Variable Documentation

double totalitersum = 0.0

Definition at line 38 of file Tracker.cpp.

int Tracker_GlobalImageCounter = 0 [static]

Definition at line 708 of file Tracker.cpp.

Generated on Wed Jun 21 19:05:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Tracker.hh File Reference

Matcher2D

Tracker.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include <Base/Math/Vector.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Image/PyramidImage.hh>
#include <Utils/Param.hh>
#include <Filter/GradientSobel3x3.hh>
#include <Filter/GradientGauss.hh>
#include <Filter/GradientGaussAsymmetric.hh>
#include <Filter/Gauss.hh>
#include <Filter/Mean.hh>
#include "TrackerBase.hh"
#include <deque>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Tracker.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Tracker< StorageType, CalculationType >
High level tracking class. More...

Defines

#define | D_TRACKER_ERROR 0x00000080
#define | D_TRACKER_FILL_UP 0x00000010
#define | D_TRACKER_IMAGES 0x00000020
#define | D_TRACKER_INIT 0x00000001
#define | D_TRACKER_NUMITER 0x00000040
#define | D_TRACKER_PARAM 0x00000004
#define | D_TRACKER_TRACK 0x00000002
#define | D_TRACKER_WRITE_IM 0x00000008

Define Documentation

#define D_TRACKER_ERROR 0x00000080

Definition at line 52 of file Tracker.hh.

#define D_TRACKER_FILL_UP 0x00000010

Definition at line 49 of file Tracker.hh.

#define D_TRACKER_IMAGES 0x00000020

Definition at line 50 of file Tracker.hh.

#define D_TRACKER_INIT 0x00000001

Definition at line 45 of file Tracker.hh.

#define D_TRACKER_NUMITER 0x00000040

Definition at line 51 of file Tracker.hh.

#define D_TRACKER_PARAM 0x00000004

Definition at line 47 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

#define D_TRACKER_TRACK 0x00000002

Definition at line 46 of file Tracker.hh.

#define D_TRACKER_WRITE_IM 0x00000008

Definition at line 48 of file Tracker.hh.

Referenced by main().

Generated on Wed Jun 21 19:05:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBase.cpp File Reference

Matcher2D

TrackerBase.cpp File Reference

#include "TrackerBase.hh"
#include <algorithm>
#include "MathAlgo/SVD.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for TrackerBase.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_MAX_AFFINECHANGE 0.001
#define | SMALL_DET 1e-8

Functions

void | _am_compute4by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, Vector< KLT_TYPE > &e)
void | _am_compute4by4GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, Matrix< KLT_TYPE > &T)
void | _am_compute6by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, Vector< KLT_TYPE > &e)
void | _am_compute6by6GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, Matrix< KLT_TYPE > &T)
int | _am_gauss_jordan_elimination (Matrix< KLT_TYPE > &a, Vector< KLT_TYPE > &b)
ostream & | BIAS::operator<< (ostream &os, const enum ERejectionType &rt)
ostream & | BIAS::operator<< (std::ostream &os, const enum ETrackerType &tt)

Define Documentation

#define DEFAULT_MAX_AFFINECHANGE 0.001

Definition at line 98 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackerBase().

#define SMALL_DET 1e-8

Definition at line 97 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

Function Documentation

void _am_compute4by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | Vector< KLT_TYPE > & | e
 | ) |

Definition at line 1571 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

void _am_compute4by4GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | Matrix< KLT_TYPE > & | T
 | ) |

Definition at line 1524 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

void _am_compute6by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | Vector< KLT_TYPE > & | e
 | ) |

Definition at line 1492 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

void _am_compute6by6GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | Matrix< KLT_TYPE > & | T
 | ) |

Definition at line 1424 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

int _am_gauss_jordan_elimination | ( | Matrix< KLT_TYPE > & | a,
 |  | Vector< KLT_TYPE > & | b
 | ) |

Definition at line 1316 of file TrackerBase.cpp.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBase.hh File Reference

Matcher2D

TrackerBase.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Image/Image.hh>
#include <Utils/Param.hh>
#include <MathAlgo/Median1D.hh>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for TrackerBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerBase< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

Defines

#define | D_TRACKERB_AFFINE 0x00000020
#define | D_TRACKERB_BILINEAR 0x00000004
#define | D_TRACKERB_INIT 0x00000001
#define | D_TRACKERB_INPUT 0x00000008
#define | D_TRACKERB_KLT 0x00000002
#define | D_TRACKERB_REJECT 0x00000010
#define | KLT_TYPE double
#define | TRACKER_ERRORINCREASED 1
#define | TRACKER_IGNOREPOINT -6
#define | TRACKER_MEANABSDIF -5
#define | TRACKER_NOSTRUCTURE -1
#define | TRACKER_OUTOFIMAGE -2
#define | TRACKER_OUTOFROI -4
#define | TRACKER_SUCCESS 0
#define | TRACKER_TOOMANYITER -3
#define | TRACKER_X84 -7

Enumerations

enum | BIAS::ERejectionType { BIAS::RT_Invalid = -1, BIAS::RT_MAD, BIAS::RT_X86 }
enum BIAS::ETrackerType {
BIAS::TT_Invalid = -1, BIAS::TT_Simple, BIAS::TT_Weighted, BIAS::TT_Affine4,
BIAS::TT_Affine6, BIAS::TT_SimpleAffine4, BIAS::TT_SimpleAffine6
}
defines type or combination of tracker(s) used: simple/weighted estimate a dx,dy, Affine4/Affine6 estimate an affine transformation with 4 resp. More...

Functions

void | _am_compute4by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Vector< KLT_TYPE > &e)
void | _am_compute4by4GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Matrix< KLT_TYPE > &T)
void | _am_compute6by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Vector< KLT_TYPE > &e)
void | _am_compute6by6GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Matrix< KLT_TYPE > &T)
int | _am_gauss_jordan_elimination (BIAS::Matrix< KLT_TYPE > &a, BIAS::Vector< KLT_TYPE > &b)
std::ostream & | BIAS::operator<< (std::ostream &os, const enum ERejectionType &rt)
ostream & | BIAS::operator<< (std::ostream &os, const enum ETrackerType &tt)

Define Documentation

#define D_TRACKERB_AFFINE 0x00000020

Definition at line 46 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

#define D_TRACKERB_BILINEAR 0x00000004

Definition at line 43 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackSimple_().

#define D_TRACKERB_INIT 0x00000001

Definition at line 41 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::TrackerBase< StorageType >::Init_(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

#define D_TRACKERB_INPUT 0x00000008

Definition at line 44 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Track().

#define D_TRACKERB_KLT 0x00000002

Definition at line 42 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define D_TRACKERB_REJECT 0x00000010

Definition at line 45 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

#define KLT_TYPE double

Definition at line 39 of file TrackerBase.hh.

#define TRACKER_ERRORINCREASED 1

Definition at line 56 of file TrackerBase.hh.

#define TRACKER_IGNOREPOINT -6

Definition at line 54 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Track().

#define TRACKER_MEANABSDIF -5

Definition at line 53 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectMAD_(), and BIAS::TrackerBase< StorageType >::RejectX86_().

#define TRACKER_NOSTRUCTURE -1

Definition at line 49 of file TrackerBase.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define TRACKER_OUTOFIMAGE -2

Definition at line 50 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define TRACKER_OUTOFROI -4

Definition at line 52 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define TRACKER_SUCCESS 0

Definition at line 48 of file TrackerBase.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::TrackerBase< StorageType >::RejectMAD_(), BIAS::TrackerBase< StorageType >::RejectX86_(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define TRACKER_TOOMANYITER -3

Definition at line 51 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

#define TRACKER_X84 -7

Definition at line 55 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

Function Documentation

void _am_compute4by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Vector< KLT_TYPE > & | e
 | ) |

Definition at line 1571 of file TrackerBase.cpp.

References BUILD_IMAGE_CHAR, BUILD_IMAGE_INT, and KLT_TYPE.

void _am_compute4by4GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Matrix< KLT_TYPE > & | T
 | ) |

Definition at line 1524 of file TrackerBase.cpp.

References gx, gy, and KLT_TYPE.

void _am_compute6by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Vector< KLT_TYPE > & | e
 | ) |

Definition at line 1492 of file TrackerBase.cpp.

References KLT_TYPE.

void _am_compute6by6GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Matrix< KLT_TYPE > & | T
 | ) |

Definition at line 1424 of file TrackerBase.cpp.

References gx, gy, and KLT_TYPE.

int _am_gauss_jordan_elimination | ( | BIAS::Matrix< KLT_TYPE > & | a,
 |  | BIAS::Vector< KLT_TYPE > & | b
 | ) |

Definition at line 1316 of file TrackerBase.cpp.

References BIAS::Matrix< T >::GetRows(), KLT_TYPE, TRACKER_NOSTRUCTURE, and TRACKER_SUCCESS.

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseAffine.hh File Reference

Matcher2D

TrackerBaseAffine.hh File Reference

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerBaseAffine< StorageType >

Functions

void | _am_compute4by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Vector< KLT_TYPE > &e)
void | _am_compute4by4GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Matrix< KLT_TYPE > &T)
void | _am_compute6by1ErrorVector (KLT_TYPE *imgdiff, KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Vector< KLT_TYPE > &e)
void | _am_compute6by6GradientMatrix (KLT_TYPE *gradx, KLT_TYPE *grady, const int hw, const int hh, BIAS::Matrix< KLT_TYPE > &T)
int | _am_gauss_jordan_elimination (BIAS::Matrix< KLT_TYPE > &a, BIAS::Vector< KLT_TYPE > &b)

Function Documentation

void _am_compute4by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Vector< KLT_TYPE > & | e
 | ) |

void _am_compute4by4GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Matrix< KLT_TYPE > & | T
 | ) |

void _am_compute6by1ErrorVector | ( | KLT_TYPE * | imgdiff,
 |  | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Vector< KLT_TYPE > & | e
 | ) |

void _am_compute6by6GradientMatrix | ( | KLT_TYPE * | gradx,
 |  | KLT_TYPE * | grady,
 |  | const int | hw,
 |  | const int | hh,
 |  | BIAS::Matrix< KLT_TYPE > & | T
 | ) |

int _am_gauss_jordan_elimination | ( | BIAS::Matrix< KLT_TYPE > & | a,
 |  | BIAS::Vector< KLT_TYPE > & | b
 | ) |

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseInterface.hh File Reference

Matcher2D

TrackerBaseInterface.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Image/Image.hh>
#include <Utils/Param.hh>
#include <MathAlgo/Median1D.hh>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for TrackerBaseInterface.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerBaseInterface< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

Defines

#define | D_TRACKERB_AFFINE 0x00000020
#define | D_TRACKERB_BILINEAR 0x00000004
#define | D_TRACKERB_INIT 0x00000001
#define | D_TRACKERB_INPUT 0x00000008
#define | D_TRACKERB_KLT 0x00000002
#define | D_TRACKERB_REJECT 0x00000010
#define | KLT_TYPE double
#define | TRACKER_ERRORINCREASED 1
#define | TRACKER_IGNOREPOINT -6
#define | TRACKER_MEANABSDIF -5
#define | TRACKER_NOSTRUCTURE -1
#define | TRACKER_OUTOFIMAGE -2
#define | TRACKER_OUTOFROI -4
#define | TRACKER_SUCCESS 0
#define | TRACKER_TOOMANYITER -3
#define | TRACKER_X84 -7

Enumerations

enum | BIAS::ERejectionType { BIAS::RT_Invalid = -1, BIAS::RT_MAD, BIAS::RT_X86 }

Functions

std::ostream & | BIAS::operator<< (std::ostream &os, const enum ERejectionType &rt)

Define Documentation

#define D_TRACKERB_AFFINE 0x00000020

Definition at line 46 of file TrackerBaseInterface.hh.

#define D_TRACKERB_BILINEAR 0x00000004

Definition at line 43 of file TrackerBaseInterface.hh.

#define D_TRACKERB_INIT 0x00000001

Definition at line 41 of file TrackerBaseInterface.hh.

#define D_TRACKERB_INPUT 0x00000008

Definition at line 44 of file TrackerBaseInterface.hh.

#define D_TRACKERB_KLT 0x00000002

Definition at line 42 of file TrackerBaseInterface.hh.

#define D_TRACKERB_REJECT 0x00000010

Definition at line 45 of file TrackerBaseInterface.hh.

#define KLT_TYPE double

Definition at line 39 of file TrackerBaseInterface.hh.

#define TRACKER_ERRORINCREASED 1

Definition at line 56 of file TrackerBaseInterface.hh.

#define TRACKER_IGNOREPOINT -6

Definition at line 54 of file TrackerBaseInterface.hh.

#define TRACKER_MEANABSDIF -5

Definition at line 53 of file TrackerBaseInterface.hh.

#define TRACKER_NOSTRUCTURE -1

Definition at line 49 of file TrackerBaseInterface.hh.

#define TRACKER_OUTOFIMAGE -2

Definition at line 50 of file TrackerBaseInterface.hh.

#define TRACKER_OUTOFROI -4

Definition at line 52 of file TrackerBaseInterface.hh.

#define TRACKER_SUCCESS 0

Definition at line 48 of file TrackerBaseInterface.hh.

#define TRACKER_TOOMANYITER -3

Definition at line 51 of file TrackerBaseInterface.hh.

#define TRACKER_X84 -7

Definition at line 55 of file TrackerBaseInterface.hh.

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseSimple.hh File Reference

Matcher2D

TrackerBaseSimple.hh File Reference

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerBaseSimple< StorageType >

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseWeighted.hh File Reference

Matcher2D

TrackerBaseWeighted.hh File Reference

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerBaseWeighted< StorageType >

Generated on Wed Jun 21 19:05:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerSynth.cpp File Reference

Matcher2D

TrackerSynth.cpp File Reference

#include "TrackerSynth.hh"
#include <Base/Math/Random.hh>
#include <limits>

Include dependency graph for TrackerSynth.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerSynth.hh File Reference

Matcher2D

TrackerSynth.hh File Reference

#include <bias_config.h>
#include <Matcher2D/Tracker.hh>
#include <vector>
#include <string>

Include dependency graph for TrackerSynth.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TrackerSynth< StorageType, CalculationType >
returns ground truth tracks read from file, for debugging More...

Defines

#define | D_TS_READ 0x80000000
#define | D_TS_REPLACE 0x40000000

Define Documentation

#define D_TS_READ 0x80000000

Definition at line 34 of file TrackerSynth.hh.

#define D_TS_REPLACE 0x40000000

Definition at line 35 of file TrackerSynth.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::Track(), and BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

Generated on Wed Jun 21 19:05:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleColorNCC.cpp File Reference

Matcher2D » Examples

ExampleColorNCC.cpp File Reference

#include <iostream>
#include <iomanip>
#include <Utils/Param.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <Matcher2D/RegionMatcher.hh>

Include dependency graph for ExampleColorNCC.cpp:

Go to the source code of this file.

Functions

int | demo (unsigned int size)
int | main (int argc, char *argv[])

Function Documentation

int demo ( unsigned int size )

Definition at line 38 of file ExampleColorNCC.cpp.

References BIASERR, BIAS::RegionMatcher::CNCC(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::RegionMatcher::NCC(), and r.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 110 of file ExampleColorNCC.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::AddParamVecDbl(), BIAS::Param::CheckParam(), BIAS::Param::DisableDestructorWarning(), BIAS::Param::ParseCommandLine(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:05:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleKLTEdge.cpp File Reference

Matcher2D » Examples

ExampleKLTEdge.cpp File Reference

#include <Matcher2D/RegionMatcher.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Filter/Gradient.hh>
#include <iostream>
#include <iomanip>

Include dependency graph for ExampleKLTEdge.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 46 of file ExampleKLTEdge.cpp.

References BIASERR, D_REGION_MATCHER_KLT_EDGE, BIAS::AppData::data, debug, BIAS::MetaData::Find(), BIAS::ImageBase::GetMetaData(), BIAS::TimeMeasure::GetRealTime(), KLT_TYPE, BIAS::AppData::length, p, BIAS::TimeMeasure::Print(), res, BIAS::TimeMeasure::Reset(), BIAS::AppData::sdata, BIAS::Debug::SetDebugLevel(), BIAS::AppData::stag, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::AppData::tag.

Generated on Wed Jun 21 19:05:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleLineMatcher.cpp File Reference

Matcher2D » Examples

ExampleLineMatcher.cpp File Reference

#include <Matcher2D/RegionMatcher.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Filter/GradientSobel3x3.hh>
#include <Base/Math/Random.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <iostream>
#include <iomanip>
#include <math.h>

Include dependency graph for ExampleLineMatcher.cpp:

Go to the source code of this file.

Defines

#define | InST float
#define | OutST float

Functions

int | main (int argc, char *argv[])

Define Documentation

#define InST float

Definition at line 47 of file ExampleLineMatcher.cpp.

#define OutST float

Definition at line 49 of file ExampleLineMatcher.cpp.

Referenced by main().

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 53 of file ExampleLineMatcher.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), D_REGION_MATCHER_LINE, debug, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Random::GetUniformDistributed(), BIAS::Random::GetUniformDistributedInt(), BIAS::TimeMeasure::GetUserTime(), BIAS::ImageBase::GetWidth(), BIAS::RegionMatcher::LineMatcherNCC(), BIAS::RegionMatcher::LineMatcherSAD(), OutST, res, BIAS::Debug::SetDebugLevel(), BIAS::ImageBase::ST_float, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:05:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleParabola.cpp File Reference

Matcher2D » Examples

ExampleParabola.cpp File Reference

#include <Matcher2D/CornerMatcher.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Filter/Gradient.hh>
#include <iostream>
#include <iomanip>

Include dependency graph for ExampleParabola.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 40 of file ExampleParabola.cpp.

References BIASERR, D_CORNER_MATCHER_SEARCH, D_REGION_MATCHER_PARABOLA, D_REGION_MATCHER_SEARCHNCC, BIAS::AppData::data, debug, BIAS::HomgPoint2D::Distance(), BIAS::MetaData::Find(), BIAS::Debug::GetDebugLevel(), BIAS::ImageBase::GetMetaData(), BIAS::TimeMeasure::GetUserTime(), BIAS::AppData::length, BIAS::CornerMatcher::NCCSearch(), p, BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::TimeMeasure::Print(), res, BIAS::TimeMeasure::Reset(), BIAS::AppData::sdata, BIAS::Debug::SetDebugLevel(), BIAS::AppData::stag, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::AppData::tag.

Generated on Wed Jun 21 19:05:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker.cpp File Reference

Matcher2D » Examples

ExampleTracker.cpp File Reference

#include <bias_config.h>
#include <Matcher2D/Tracker.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <FeatureDetector/CornerDetectorSusan.hh>
#include <FeatureDetector/CornerDetectorKLT.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Image/PyramidImage.hh>
#include <deque>

Include dependency graph for ExampleTracker.cpp:

Go to the source code of this file.

Defines

#define | CalculationType float
#define | DEFAULT_PARA_FILE_NAME "Tracker.ini"
#define | StorageType float
#define | type 1

Functions

void | Draw (Image< unsigned char > &im, deque< vector< HomgPoint2D > > &p, int imnum)
void | DumpTracks (deque< vector< HomgPoint2D > > &p)
void | InsertZeroPoints (deque< vector< HomgPoint2D > > &p, int i)
the drawing algorithm needs one point at infinity between subsequent tracks, therefor the last point of the last track is set to (0, 0, 0)
int | main (int argc, char *argv[])
the main function
void | Track (const Image< CalculationType > &im, Image< unsigned char > &rgbim, int i)

Variables

int | act = 0
CornerDetectorBase< StorageType > * | cd = NULL
int * | cdfreq
int | cdnum = 0
int * | cdt
TimeMeasure cdtimer
vector< HomgPoint2D > cp
bool | draw_tracks = true
PyramidImage< CalculationType > * | gx [2]
PyramidImage< CalculationType > * | gy [2]
const int | max_num_points = 150
vector< HomgPoint2D > mp
TimeMeasure otimer
deque< vector< HomgPoint2D > > | p
PyramidImage< CalculationType > * | pim [2]
int * | pyind
TimeMeasure pytimer
vector< QUAL > | qual
vector< KLT_TYPE > | r
vector< int > | res
deque< vector< KLT_TYPE > > | residui
deque< vector< int > > | results
int | tnum = 0
Tracker< StorageType, CalculationType > * | tr = NULL
TimeMeasure ttimer

Define Documentation

#define CalculationType float

Definition at line 55 of file ExampleTracker.cpp.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

#define DEFAULT_PARA_FILE_NAME "Tracker.ini"

Definition at line 47 of file ExampleTracker.cpp.

#define StorageType float

Definition at line 54 of file ExampleTracker.cpp.

#define type 1

Definition at line 49 of file ExampleTracker.cpp.

Function Documentation

void Draw | ( | Image< unsigned char > & | im,
 |  | deque< vector< HomgPoint2D > > & | p,
 |  | int | imnum
 | ) |

Definition at line 75 of file ExampleTracker.cpp.

References draw_tracks, and p.

void DumpTracks ( deque< vector< HomgPoint2D > > & p )

Definition at line 115 of file ExampleTracker.cpp.

References p.

Referenced by main(), and Track().

void InsertZeroPoints | ( | deque< vector< HomgPoint2D > > & | p,
 |  | int | i
 | ) |

the drawing algorithm needs one point at infinity between subsequent tracks, therefor the last point of the last track is set to (0, 0, 0)

Definition at line 135 of file ExampleTracker.cpp.

References p.

Referenced by main(), and Track().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

the main function

Definition at line 227 of file ExampleTracker.cpp.

References act, BIASERR, cdfreq, cdnum, cdt, DEBUG, DEFAULT_PARA_FILE_NAME, BIAS::Param::GetFreeGroupID(), BIAS::TimeMeasure::GetRealTime(), GRP_ALL, p, para, BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), pyind, BIAS::TimeMeasure::Reset(), results, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), tnum, Track(), and BIAS::Tracker< StorageType, CalculationType >::WriteTrackFile().

void Track | ( | const Image< CalculationType > & | im,
 |  | Image< unsigned char > & | rgbim,
 |  | int | i
 | ) |

Definition at line 148 of file ExampleTracker.cpp.

References act, BIAS::Tracker< StorageType, CalculationType >::AddNumPoints(), cdfreq, cdnum, BIAS::CornerDetectorBase< StorageType >::Detect(), Draw(), BIAS::Tracker< StorageType, CalculationType >::FillUpPoints(), BIAS::Tracker< StorageType, CalculationType >::GetPoints(), BIAS::Tracker< StorageType, CalculationType >::GetResiduiMAD(), BIAS::Tracker< StorageType, CalculationType >::GetResults(), InsertZeroPoints(), max_num_points, num, p, BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), pyind, residui, results, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), tnum, and BIAS::Tracker< StorageType, CalculationType >::Track().

Referenced by main(), and BIAS::TrackerBase< StorageType >::Track().

Variable Documentation

int act = 0

Definition at line 61 of file ExampleTracker.cpp.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ExtractNumberFromRight(), main(), BIAS::OpenGLCanvasBase::ToggleVSync(), and Track().

CornerDetectorBase<StorageType>* cd = NULL

Definition at line 58 of file ExampleTracker.cpp.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), and main().

int * cdfreq

Definition at line 61 of file ExampleTracker.cpp.

Referenced by main(), and Track().

int cdnum = 0

Definition at line 70 of file ExampleTracker.cpp.

Referenced by main(), and Track().

int * cdt

Definition at line 61 of file ExampleTracker.cpp.

Referenced by main().

TimeMeasure cdtimer

Definition at line 71 of file ExampleTracker.cpp.

vector<HomgPoint2D> cp

Definition at line 67 of file ExampleTracker.cpp.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick(), BIAS::ImageIO::ImportOpenEXR(), BIAS::MatlabTBUndistortion::Init(), main(), and BIAS::RigParameter::ReadRigData().

bool draw_tracks = true

Definition at line 72 of file ExampleTracker.cpp.

Referenced by Draw().

PyramidImage<CalculationType> * gx[2]

Definition at line 60 of file ExampleTracker.cpp.

Referenced by _am_compute4by4GradientMatrix(), _am_compute6by6GradientMatrix(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), main(), mysobel(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

PyramidImage<CalculationType> * gy[2]

Definition at line 60 of file ExampleTracker.cpp.

Referenced by _am_compute4by4GradientMatrix(), _am_compute6by6GradientMatrix(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), main(), mysobel(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

const int max_num_points = 150

Definition at line 73 of file ExampleTracker.cpp.

Referenced by Track().

vector<HomgPoint2D> mp

Definition at line 65 of file ExampleTracker.cpp.

TimeMeasure otimer

Definition at line 71 of file ExampleTracker.cpp.

deque<vector<HomgPoint2D> > p

Definition at line 62 of file ExampleTracker.cpp.

Referenced by BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::GenSynthMatches::_Draw(), BIAS::RegionMatcher::_ParabolaApprox(), BIAS::PMatrix::BackprojectByZDepth(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::CanCompare< T1, T2 >::CanCompare(), BIAS::CanCopy< T1, T2 >::CanCopy(), BIAS::CanMultiply< T1, T2, T3 >::CanMultiply(), BIAS::DerivedFrom< T, Base >::DerivedFrom(), Draw(), BIAS::Conic2D::Draw(), BIAS::Tracker< StorageType, CalculationType >::DumpResults(), DumpTracks(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::HomgPoint3D::GetEuclidian(), BIAS::GenSynthMatches::GetGTNormalizedPoints(), BIAS::GenSynthMatches::GetGTPoints(), BIAS::FFT::GetMagnitude(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::FFT::GetPhase(), BIAS::MatchDataBase::GetPoints(), BIAS::Matrix3x3< T >::GetRow(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportOpenEXR(), TNT::Fortran_Matrix< T >::initialize(), TNT::Matrix< PMATRIX_TYPE >::initialize(), InsertZeroPoints(), BIAS::ImageConvert::IP_RGBToGrey_(), main(), BIAS::Image< StorageType >::operator+=(), BIAS::AffineTransf::operator=(), BIAS::Tensor3D3x3x3< T >::postmultiply1(), BIAS::Tensor3D3x3x3< T >::postmultiply2(), BIAS::Tensor3D3x3x3< T >::postmultiply3(), BIAS::Tensor3D3x3x3< T >::premultiply1(), BIAS::Tensor3D3x3x3< T >::premultiply2(), BIAS::Tensor3D3x3x3< T >::premultiply3(), MIP::raw_dv_handler(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::MatchDataBase::SetData(), BIAS::MatchDataBase::SetNormalizedData(), BIAS::ProjectionParametersPerspective::SetP(), BIAS::SphericalUndistortion::SetupProjectionLUT(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::Matrix3x3< EMATRIX_TYPE >::Trace(), Track(), and BIAS::ThreeDOut::VRMLOutWriteViewpoint().

PyramidImage<CalculationType>* pim[2]

Definition at line 60 of file ExampleTracker.cpp.

Referenced by main().

int * pyind

Definition at line 61 of file ExampleTracker.cpp.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DumpResults(), main(), and Track().

TimeMeasure pytimer

Definition at line 71 of file ExampleTracker.cpp.

vector<QUAL> qual

Definition at line 66 of file ExampleTracker.cpp.

Referenced by main().

vector<KLT_TYPE> r

Definition at line 68 of file ExampleTracker.cpp.

Referenced by BIAS::RegionMatcher::_BilinearRegion(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateMovingTransforms(), BIAS::Condensation::AddDiffusions_(), BIAS::RegionMatcher::CNCC(), BIAS::RegionMatcher::ColorCCV(), BIAS::RegionMatcher::ColorNCC(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::Vector2< double >::CoordEuclidianToPolar(), BIAS::Vector3< double >::CoordEuclidianToSphere(), BIAS::Vector2< double >::CoordPolarToEuclidian(), BIAS::Vector3< double >::CoordSphereToEuclidian(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::Histogram::DeleteHist_(), demo(), BIAS::Histogram2D::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::ImageConvert::FromInterleavedRGB_(), GenerateNoisyMeasurements(), BIAS::Parametrization::GetBiggestAbsEntry(), BIAS::Conic2D::GetEllipseParameters(), BIAS::SimilarityTransform::GetMatrix(), GetSystem(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Conic2D::IntersectsCircle(), BIAS::ImageConvert::IP_RGBToGrey_(), main(), BIAS::Matrix< PMATRIX_TYPE >::Matrix(), MatrixSqrt(), BIAS::Quaternion< double >::MultVec(), BIAS::RegionMatcher::NCC(), BIAS::Quaternion< QUAT_TYPE >::operator *(), BIAS::Quaternion< QUAT_TYPE >::operator/(), BIAS::Triangulation::Optimal(), BIAS::PowellExtended(), BIAS::Random::ran1c_(), ReadPMatrix(), BIAS::ImageConvert::RGBToGrey_(), BIAS::RegionMatcher::SAD(), BIAS::RegionMatcher::SADN(), BIAS::EuclideanTransf3D::Set(), BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter(), BIAS::CoordinateTransform3D::SetR(), BIAS::GaussHelmert::Solve(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), BIAS::RegionMatcher::SSD(), and BIAS::Tracker< StorageType, CalculationType >::WriteTrackLog_().

vector<int> res

Definition at line 69 of file ExampleTracker.cpp.

Referenced by BIAS::MSAC< SolutionType >::_CalculateTerminateScore(), BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::AddGradientType(), BIAS::AddLowPassType(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::ImageDraw< StorageType >::CircleCenterFilled(), BIAS::PMatrix::Compose(), BIAS::SVD3x3::Compute(), BIAS::ImageConvertThreaded::ConvertThread_(), BIAS::ImageConvertThreaded::ConvertThreaded(), create_JPEG_file(), BIAS::CScommServer::CreateListenThread_(), BIAS::GuiGTK::DestroyWindow(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::PyramidImage< StorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), drawCubic(), drawQuadratic(), BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::Mean< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), Fortran_Matrix_to_Matrix(), BIAS::ImageConvert::FromInterleaved(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::RANSAC< SolutionType >::GenerateSamplesEvenspace(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), GetCamIDs(), BIAS::Triangulation::GetCovariance(), BIAS::Triangulation::GetCovariance2D(), BIAS::CoordinateTransform3D::GetCQ(), BIAS::HomgPoint3DCov::GetEuclidean(), BIAS::HomgPoint2DCov::GetEuclidean(), BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetFocalLengthYPixel(), BIAS::PMatrix::GetIntersectionOfImagePlanes(), BIAS::BresenhamCircleSlow::GetNext(), BIAS::Random::GetNormalDistributed(), BIAS::PlueckerMatrix::GetPlueckerLineCoordinates(), BIAS::Pose::GetPoseParameters(), BIAS::RMatrixBase::GetQuaternion(), BIAS::Random::GetUniformDistributedInt(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::Init(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::Triangulation::Intersect(), BIAS::SVD::Invert(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix2x2< KLT_TYPE >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::ImageConvert::IP_ToGrey(), Lapack_LLS_QR_linear_solve(), BIAS::RegionMatcher::LineMatcherNCC(), BIAS::RegionMatcher::LineMatcherSAD(), BIAS::listenthread(), BIAS::Pose::Load(), main(), BIAS::RegionMatcher::NCCSearchEven(), BIAS::RegionMatcher::NCCSearchOdd(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_DCAM::OpenDevice(), TNT::operator *(), BIAS::Vector2< T >::operator *(), BIAS::Matrix3x3< T >::operator *(), BIAS::Matrix< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), BIAS::AffineTransf::operator *(), BIAS::Matrix< T >::operator+(), BIAS::Matrix< T >::operator-(), BIAS::Matrix< T >::operator/(), BIAS::Vector< T >::operator==(), BIAS::Polynom::operator==(), BIAS::Triangulation::Optimal(), BIAS::RegionMatcher::ParabolaNCC(), BIAS::RegionMatcher::ParabolaNCC5(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLeastSquaresMin_(), Process(), BIAS::ROI::ReadBinary(), BIAS::Image< StorageType >::Reciprocal(), BIAS::GuiGTK::ReInitWindow_(), BIAS::RegionMatcher::SADN(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetDirectToDisk(), BIAS::ROI::SetMaskImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::LeastSquaresLapack::Solve(), BIAS::GaussHelmert::Solve(), BIAS::CornerMatcher::SSD(), BIAS::VideoSource_V4L::StopGrabContinous(), BIAS::Vector< T >::SubVec(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToRGB(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Triangulation::Triangulate(), BIAS::Triangulation::Triangulate2D(), BIAS::Param::UpdateParameter(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), BIAS::LeastSquaresLapack::WeightedSolve(), and BIAS::PyramidImage< StorageType >::WriteImages().

deque<vector<KLT_TYPE> > residui

Definition at line 63 of file ExampleTracker.cpp.

Referenced by main(), and Track().

deque<vector<int> > results

Definition at line 64 of file ExampleTracker.cpp.

Referenced by main(), and Track().

int tnum = 0

Definition at line 70 of file ExampleTracker.cpp.

Referenced by main(), and Track().

Tracker<StorageType, CalculationType>* tr = NULL

Definition at line 59 of file ExampleTracker.cpp.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::RMatrixBase::GetQuaternion(), and main().

TimeMeasure ttimer

Definition at line 71 of file ExampleTracker.cpp.

Generated on Wed Jun 21 19:05:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker2.cpp File Reference

Matcher2D » Examples

ExampleTracker2.cpp File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragma.hh>
#include <Matcher2D/Tracker.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <FeatureDetector/CornerDetectorKLT.hh>
#include <FeatureDetector/CornerDetectorHarris.hh>
#include <FeatureDetector/CornerDetectorFoerstner.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <deque>

Include dependency graph for ExampleTracker2.cpp:

Go to the source code of this file.

Defines

#define | CalculationType float
#define | DEBUG false
#define | DEFAULT_PARA_FILE_NAME "Tracker.ini"
#define | StorageType float
#define | type 1
The preprocessor define type is used to choose between the image type StorageType is the internal type used to store the images data.

Functions

void | Draw (Image< StorageType > &stim, Image< unsigned char > &im, deque< vector< HomgPoint2D > > &p, int imnum)
draw the tracks with a circle around the actual corner position
void | DumpTracks (deque< vector< HomgPoint2D > > &p)
print tracks to stdout, just for debugging purposes
void | InsertZeroPoints (deque< vector< HomgPoint2D > > &p, int i)
the drawing algorithm needs one point at infinity between subsequent tracks, therefore the last point of the last track is set to (0, 0, 0)
int | main (int argc, char *argv[])
the main function
void MarkEnhancedAndSetDefaults (Param &para)
mark unnecessairy parameter as enhanced
void | Track (const Image< CalculationType > &im, Image< unsigned char > &rgbim, int i)

Variables

int | act = 0
CornerDetectorBase< StorageType > * | cd = NULL
int * | cdfreq
int | cdnum = 0
int * | cdt
TimeMeasure cdtimer
vector< HomgPoint2D > cp
the displacement in the last iteration step
bool | draw_tracks = true
PyramidImage< CalculationType > * | gx [2]
PyramidImage< CalculationType > * | gy [2]
const int | max_num_points = 150
vector< HomgPoint2D > mp
temporary vector for the
TimeMeasure otimer
deque< vector< HomgPoint2D > > | p
the resulting data structs
PyramidImage< CalculationType > * | pim [2]
int * | pyind
TimeMeasure pytimer
vector< QUAL > | qual
vector< KLT_TYPE > | r
vector< int > | res
deque< vector< KLT_TYPE > > | residui
deque< vector< int > > | results
int representing success (=0) or failure reason (<0) see TrackerBase::Track() for details
int | tnum = 0
Tracker< StorageType, CalculationType > * | tr = NULL
TimeMeasure ttimer

Define Documentation

#define CalculationType float

Definition at line 68 of file ExampleTracker2.cpp.

#define DEBUG false

Definition at line 71 of file ExampleTracker2.cpp.

Referenced by main(), BIAS::Matrix3x4< T >::operator=(), and Track().

#define DEFAULT_PARA_FILE_NAME "Tracker.ini"

Definition at line 49 of file ExampleTracker2.cpp.

#define StorageType float

Definition at line 67 of file ExampleTracker2.cpp.

#define type 1

The preprocessor define type is used to choose between the image type StorageType is the internal type used to store the images data.

CalculationType is the data type used for calculations.

type 0: Images are of type unsigned char (i.e. byte) The internal calculation (e.g. gradinets) is done using int.

type 1: Images are of type float (the can be of any type on disk, they are immediatly casted to float after loading them from disk). The internal calculation (e.g. gradinets) is done using float.

Definition at line 62 of file ExampleTracker2.cpp.

Function Documentation

void Draw | ( | Image< StorageType > & | stim,
 |  | Image< unsigned char > & | im,
 |  | deque< vector< HomgPoint2D > > & | p,
 |  | int | imnum
 | ) |

draw the tracks with a circle around the actual corner position

Definition at line 122 of file ExampleTracker2.cpp.

References draw_tracks, and p.

void DumpTracks ( deque< vector< HomgPoint2D > > & p )

print tracks to stdout, just for debugging purposes

Definition at line 169 of file ExampleTracker2.cpp.

References p.

void InsertZeroPoints | ( | deque< vector< HomgPoint2D > > & | p,
 |  | int | i
 | ) |

the drawing algorithm needs one point at infinity between subsequent tracks, therefore the last point of the last track is set to (0, 0, 0)

Definition at line 188 of file ExampleTracker2.cpp.

References p.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

the main function

read parameter from command line and DEFAULT_PARA_FILE_NAME

Definition at line 322 of file ExampleTracker2.cpp.

References act, BIAS::Debug::AddDebugLevel(), BIASERR, cdfreq, cdnum, cdt, D_CD_WRITE_DEBUG_IM, D_TRACKER_WRITE_IM, DEBUG, DEFAULT_PARA_FILE_NAME, BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), DumpTracks(), BIAS::Param::GetFreeGroupID(), BIAS::ImageBase::GetHeight(), BIAS::TimeMeasure::GetRealTime(), BIAS::TimeMeasure::GetUserTime(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), MarkEnhancedAndSetDefaults(), p, para, BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), pyind, BIAS::TimeMeasure::Reset(), results, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), tnum, Track(), and BIAS::Tracker< StorageType, CalculationType >::WriteTrackFile().

void MarkEnhancedAndSetDefaults ( Param & para )

mark unnecessairy parameter as enhanced

Definition at line 296 of file ExampleTracker2.cpp.

References BIAS::Param::SetEnhancedFlag(), BIAS::Param::SetParamDouble(), and BIAS::Param::SetParamInt().

Referenced by main().

void Track | ( | const Image< CalculationType > & | im,
 |  | Image< unsigned char > & | rgbim,
 |  | int | i
 | ) |

the first thing that needs to be done is to calculate the pyramid images

secondly the tracking process is started

Definition at line 203 of file ExampleTracker2.cpp.

References act, BIAS::Tracker< StorageType, CalculationType >::AddNumPoints(), cdfreq, cdnum, DEBUG, BIAS::CornerDetectorBase< StorageType >::Detect(), Draw(), DumpTracks(), BIAS::Tracker< StorageType, CalculationType >::FillUpPoints(), BIAS::Tracker< StorageType, CalculationType >::GetPoints(), BIAS::Tracker< StorageType, CalculationType >::GetResiduiMAD(), BIAS::Tracker< StorageType, CalculationType >::GetResults(), InsertZeroPoints(), max_num_points, num, p, BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), pyind, residui, results, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), tnum, and BIAS::Tracker< StorageType, CalculationType >::Track().

Variable Documentation

int act = 0

Definition at line 87 of file ExampleTracker2.cpp.

CornerDetectorBase<StorageType>* cd = NULL

Definition at line 78 of file ExampleTracker2.cpp.

int* cdfreq

Definition at line 89 of file ExampleTracker2.cpp.

int cdnum = 0

Definition at line 107 of file ExampleTracker2.cpp.

int* cdt

Definition at line 88 of file ExampleTracker2.cpp.

TimeMeasure cdtimer

Definition at line 112 of file ExampleTracker2.cpp.

vector<HomgPoint2D> cp

the displacement in the last iteration step

Definition at line 102 of file ExampleTracker2.cpp.

bool draw_tracks = true

Definition at line 117 of file ExampleTracker2.cpp.

PyramidImage<CalculationType>* gx[2]

Definition at line 84 of file ExampleTracker2.cpp.

PyramidImage<CalculationType>* gy[2]

Definition at line 85 of file ExampleTracker2.cpp.

const int max_num_points = 150

Definition at line 119 of file ExampleTracker2.cpp.

vector<HomgPoint2D> mp

temporary vector for the

Definition at line 100 of file ExampleTracker2.cpp.

TimeMeasure otimer

Definition at line 110 of file ExampleTracker2.cpp.

deque<vector<HomgPoint2D> > p

the resulting data structs

Definition at line 93 of file ExampleTracker2.cpp.

PyramidImage<CalculationType>* pim[2]

Definition at line 83 of file ExampleTracker2.cpp.

int* pyind

Definition at line 90 of file ExampleTracker2.cpp.

TimeMeasure pytimer

Definition at line 114 of file ExampleTracker2.cpp.

vector<QUAL> qual

Definition at line 101 of file ExampleTracker2.cpp.

vector<KLT_TYPE> r

Definition at line 103 of file ExampleTracker2.cpp.

vector<int> res

Definition at line 104 of file ExampleTracker2.cpp.

deque<vector<KLT_TYPE> > residui

Definition at line 94 of file ExampleTracker2.cpp.

deque<vector<int> > results

int representing success (=0) or failure reason (<0) see TrackerBase::Track() for details

Definition at line 97 of file ExampleTracker2.cpp.

int tnum = 0

Definition at line 107 of file ExampleTracker2.cpp.

Tracker<StorageType, CalculationType>* tr = NULL

Definition at line 80 of file ExampleTracker2.cpp.

TimeMeasure ttimer

Definition at line 111 of file ExampleTracker2.cpp.

Generated on Wed Jun 21 19:05:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker3.cpp File Reference

Matcher2D » Examples

ExampleTracker3.cpp File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragma.hh>
#include <Matcher2D/Tracker.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <FeatureDetector/CornerDetectorKLT.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <deque>

Include dependency graph for ExampleTracker3.cpp:

Go to the source code of this file.

Defines

#define | CalculationType float
#define | DEBUG 1
#define | DEFAULT_PARA_FILE_NAME "Tracker3.ini"
#define | StorageType float
#define | TIMING

Functions

void | Draw (Image< StorageType > &stim, Image< unsigned char > &im, deque< vector< HomgPoint2D > > &p, deque< vector< Matrix< double > > > &cov, int imnum)
Draw the tracks with a circle around the actual corner position.
void | DumpTracks (deque< vector< HomgPoint2D > > &p)
print tracks to stdout, just for debugging purposes
void | InsertZeroPoints (deque< vector< HomgPoint2D > > &p, int i)
int | main (int argc, char *argv[])
The main function.
void MarkEnhancedAndSetDefaults (Param &para)
mark unnecessairy parameter as enhanced

Variables

deque< vector< Matrix< double > > > | cov
vector< HomgPoint2D > cp
const int | max_num_points = 150
vector< HomgPoint2D > mp
deque< vector< HomgPoint2D > > | p
vector< QUAL > | qual
vector< KLT_TYPE > | r
vector< int > | res
deque< vector< KLT_TYPE > > | residui
deque< vector< int > > | results
ImageBase::EStorageType | st_type = ImageBase::ST_invalid
vector< Matrix< double > > | tmp_cov

Define Documentation

#define CalculationType float

Definition at line 54 of file ExampleTracker3.cpp.

#define DEBUG 1

Definition at line 57 of file ExampleTracker3.cpp.

#define DEFAULT_PARA_FILE_NAME "Tracker3.ini"

Definition at line 51 of file ExampleTracker3.cpp.

#define StorageType float

Definition at line 53 of file ExampleTracker3.cpp.

#define TIMING

Definition at line 41 of file ExampleTracker3.cpp.

Referenced by main().

Function Documentation

void Draw | ( | Image< StorageType > & | stim,
 |  | Image< unsigned char > & | im,
 |  | deque< vector< HomgPoint2D > > & | p,
 |  | deque< vector< Matrix< double > > > & | cov,
 |  | int | imnum
 | ) |

Draw the tracks with a circle around the actual corner position.

The covariances are visualized as ellipses.

Definition at line 83 of file ExampleTracker3.cpp.

References a, center, cov, draw_tracks, BIAS::Matrix2x2< T >::EigenvalueDecomposition(), p, BIAS::Image< StorageType >::ScaleShift(), and st_type.

void DumpTracks ( deque< vector< HomgPoint2D > > & p )

print tracks to stdout, just for debugging purposes

Definition at line 184 of file ExampleTracker3.cpp.

References p.

void InsertZeroPoints | ( | deque< vector< HomgPoint2D > > & | p,
 |  | int | i
 | ) |

Definition at line 200 of file ExampleTracker3.cpp.

References p.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

The main function.

Definition at line 241 of file ExampleTracker3.cpp.

References act, BIASERR, cd, cdfreq, cov, DEBUG, DEFAULT_PARA_FILE_NAME, BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), BIAS::Param::DisableDestructorWarning(), Draw(), DumpTracks(), BIAS::Tracker< StorageType, CalculationType >::FillUpPoints(), BIAS::ImageBase::GetChannelCount(), BIAS::Tracker< StorageType, CalculationType >::GetCovariances(), BIAS::TimeMeasure::GetCycleCount(), BIAS::Param::GetFreeGroupID(), BIAS::Tracker< StorageType, CalculationType >::GetPoints(), BIAS::TimeMeasure::GetRealTime(), BIAS::Tracker< StorageType, CalculationType >::GetResiduiMAD(), BIAS::Tracker< StorageType, CalculationType >::GetResults(), BIAS::ImageBase::GetStorageType(), gx, gy, InsertZeroPoints(), MarkEnhancedAndSetDefaults(), num, p, para, BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), pim, BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Tracker< StorageType, CalculationType >::ReplaceAllPoints(), BIAS::TimeMeasure::Reset(), residui, results, BIAS::Param::SetGroupName(), BIAS::Param::SetWriteOptions(), st_type, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), TIMING, tr, BIAS::Tracker< StorageType, CalculationType >::Track(), and BIAS::Tracker< StorageType, CalculationType >::WriteTrackFile().

void MarkEnhancedAndSetDefaults ( Param & para )

mark unnecessairy parameter as enhanced

Definition at line 215 of file ExampleTracker3.cpp.

References BIAS::Param::SetEnhancedFlag(), BIAS::Param::SetParamDouble(), BIAS::Param::SetParamEnum(), and BIAS::Param::SetParamInt().

Variable Documentation

deque<vector<Matrix<double> > > cov

Definition at line 67 of file ExampleTracker3.cpp.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), Draw(), BIAS::Tracker< StorageType, CalculationType >::GetCovariances(), BIAS::Conic2D::GetEllipseParameters(), main(), operator<<(), BIAS::CovMatrix3x3::SetFromHomogenized(), and BIAS::PoseParametrization::Transform().

vector<HomgPoint2D> cp

Definition at line 72 of file ExampleTracker3.cpp.

const int max_num_points = 150

Definition at line 79 of file ExampleTracker3.cpp.

vector<HomgPoint2D> mp

Definition at line 70 of file ExampleTracker3.cpp.

deque<vector<HomgPoint2D> > p

Definition at line 61 of file ExampleTracker3.cpp.

vector<QUAL> qual

Definition at line 71 of file ExampleTracker3.cpp.

vector<KLT_TYPE> r

Definition at line 73 of file ExampleTracker3.cpp.

vector<int> res

Definition at line 74 of file ExampleTracker3.cpp.

deque<vector<KLT_TYPE> > residui

Definition at line 62 of file ExampleTracker3.cpp.

deque<vector<int> > results

Definition at line 65 of file ExampleTracker3.cpp.

ImageBase::EStorageType st_type = ImageBase::ST_invalid

Definition at line 77 of file ExampleTracker3.cpp.

vector<Matrix<double> > tmp_cov

Definition at line 75 of file ExampleTracker3.cpp.

Referenced by BIAS::GaussHelmert::Solve().

Generated on Wed Jun 21 19:05:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTrackerBase.cpp File Reference

Matcher2D » Examples

ExampleTrackerBase.cpp File Reference

#include <Matcher2D/TrackerBase.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <Filter/GradientSobel3x3.hh>
#include <Filter/GradientGauss.hh>
#include <Filter/GradientGaussAsymmetric.hh>
#include <Filter/Gauss.hh>
#include <iostream>
#include <iomanip>

Include dependency graph for ExampleTrackerBase.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_PARA_FILE_NAME "TrackerBase.ini"
#define | StorageType float

Functions

void | Draw (Image< StorageType > &im, HomgPoint2D &p, Matrix2x2< KLT_TYPE > &cov, char *name)
draws the tracking result and saves to name.tracked
int | LoadImage (char *name, Image< StorageType > &im)
loads an image and converts to single channel float image
int | main (int argc, char *argv[])
the main function

Define Documentation

#define DEFAULT_PARA_FILE_NAME "TrackerBase.ini"

Definition at line 60 of file ExampleTrackerBase.cpp.

#define StorageType float

Definition at line 57 of file ExampleTrackerBase.cpp.

Function Documentation

void Draw | ( | Image< StorageType > & | im,
 |  | HomgPoint2D & | p,
 |  | Matrix2x2< KLT_TYPE > & | cov,
 |  | char * | name
 | ) |

draws the tracking result and saves to name.tracked

Definition at line 92 of file ExampleTrackerBase.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::GetColorModel().

int LoadImage | ( | char * | name,
 |  | Image< StorageType > & | im
 | ) |

loads an image and converts to single channel float image

Definition at line 64 of file ExampleTrackerBase.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

the main function

Definition at line 146 of file ExampleTrackerBase.cpp.

References BIAS::AddGradientType(), BIASERR, BIAS::AppData::data, debug, DEFAULT_PARA_FILE_NAME, BIAS::Param::DisableDestructorWarning(), Draw(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::Filter(), BIAS::MetaData::Find(), BIAS::ImageBase::GetMetaData(), BIAS::TimeMeasure::GetRealTime(), BIAS::GT_Gauss, BIAS::GT_GaussAsymmetric, BIAS::GT_Sobel3x3, BIAS::TrackerBase< StorageType >::Init(), KLT_TYPE, BIAS::AppData::length, LoadImage(), para, BIAS::TimeMeasure::Print(), res, BIAS::TimeMeasure::Reset(), BIAS::AppData::sdata, BIAS::Param::SetWriteOptions(), BIAS::AppData::stag, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), BIAS::AppData::tag, BIAS::TrackerBase< StorageType >::Track(), and BIAS::Param::UpdateParameter().

Generated on Wed Jun 21 19:05:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/BSplineCurve.cpp File Reference

MathAlgo

BSplineCurve.cpp File Reference

#include "BSplineCurve.hh"

Include dependency graph for BSplineCurve.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/BSplineCurve.hh File Reference

MathAlgo

BSplineCurve.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <cmath>
#include <vector>
#include "Base/Debug/Debug.hh"
#include "Base/Image/Image.hh"
#include "Base/Image/ImageDraw.hh"
#include "Base/Math/Matrix.hh"
#include "Base/Math/Vector.hh"
#include "Base/Math/Vector2.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for BSplineCurve.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::BSplineCurve
this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. More...

Generated on Wed Jun 21 19:05:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/FFT.cpp File Reference

MathAlgo

FFT.cpp File Reference

#include "FFT.hh"
#include <Base/Debug/Error.hh>
#include <complex>
#include <iomanip>

Include dependency graph for FFT.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/FFT.hh File Reference

MathAlgo

FFT.hh File Reference

#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector.hh>
#include <complex>
#include <iostream>
#include <fftw3.h>

Include dependency graph for FFT.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::FFT

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GaussHelmert.cpp File Reference

MathAlgo

GaussHelmert.cpp File Reference

#include "GaussHelmert.hh"
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for GaussHelmert.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GaussHelmert.hh File Reference

MathAlgo

GaussHelmert.hh File Reference

#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix.hh>

Include dependency graph for GaussHelmert.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GaussHelmert
see Foerstner, 2004, "Uncertainty And Projective Geometry" ! untested ! More...

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GSL.cpp File Reference

MathAlgo

GSL.cpp File Reference

#include "bias_config.h"
#include <MathAlgo/GSL.hh>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_sf_gamma.h>

Include dependency graph for GSL.cpp:

Go to the source code of this file.

Functions

double | BIAS::BetaDistribution (double a, double b, double x)
double | BIAS::ChiSquareCulmProbFun (double x, int deg_freedom)
double | BIAS::Gamma (double x)
double | BIAS::InvChiSquareCulmProbFun (double x, int deg_freedom)
double | BIAS::InvGamma (double x)

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GSL.hh File Reference

MathAlgo

GSL.hh File Reference

#include <bias_config.h>

Include dependency graph for GSL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

double | BIAS::BetaDistribution (double a, double b, double x)
double | BIAS::ChiSquareCulmProbFun (double x, int deg_freedom)
double | BIAS::Gamma (double x)
double | BIAS::InvChiSquareCulmProbFun (double x, int deg_freedom)
double | BIAS::InvGamma (double x)

Generated on Wed Jun 21 19:05:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Interpolator.cpp File Reference

MathAlgo

Interpolator.cpp File Reference

#include <math.h>
#include <iostream>
#include "Interpolator.hh"
#include "Base/Debug/Error.hh"
#include "Lapack.hh"

Include dependency graph for Interpolator.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Interpolator.hh File Reference

MathAlgo

Interpolator.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include "Base/Debug/Debug.hh"
#include "Base/Math/Matrix.hh"
#include "Base/Math/Vector.hh"
#include "Base/Math/Vector2.hh"
#include "Base/Math/Vector3.hh"
#include "Base/Image/Image.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Interpolator.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Interpolator
this class interpolates a function y=f(t) between given control points (the y-values) More...

Defines

#define | D_INTERPOL_BEZIER 1<<3
#define | D_INTERPOL_COMMON 1<<2
#define | D_INTERPOL_SPLINE2 1<<1
#define | D_INTERPOL_SPLINE3 1<<0

Define Documentation

#define D_INTERPOL_BEZIER 1<<3

Definition at line 65 of file Interpolator.hh.

Referenced by BIAS::Interpolator::InitBezier().

#define D_INTERPOL_COMMON 1<<2

Definition at line 64 of file Interpolator.hh.

Referenced by BIAS::Interpolator::Spline(), and BIAS::Interpolator::validate().

#define D_INTERPOL_SPLINE2 1<<1

Definition at line 63 of file Interpolator.hh.

Referenced by BIAS::Interpolator::InitSpline2().

#define D_INTERPOL_SPLINE3 1<<0

Definition at line 62 of file Interpolator.hh.

Referenced by BIAS::Interpolator::InitSpline3(), and BIAS::Interpolator::InitSplineAkima().

Generated on Wed Jun 21 19:05:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Lapack.cpp File Reference

MathAlgo

Lapack.cpp File Reference

#include "Lapack.hh"
#include <Base/Math/tnt/fortran.h>
#include <Base/Math/tnt/vec.h>
#include <Base/Math/tnt/fmat.h>
#include "SVD.hh"

Include dependency graph for Lapack.cpp:

Go to the source code of this file.

Defines

#define | F77_DGEEV dgeev_
#define | F77_DGELS dgels_
#define | F77_DGESV dgesv_
#define | F77_DGESVD dgesvd_
#define | F77_DGGGLM dggglm_
#define | F77_DSYEV dsyev_

Functions

int | Eigenproblem_quadratic_matrix (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_EigenValuesReal, BIAS::Vector< double > &ret_EigenValuesImag, BIAS::Matrix< double > &eigenVectors)
int | Eigenvalue_solve (const BIAS::Matrix< double > &A, BIAS::Vector< double > &wr, BIAS::Vector< double > &wi)
void | F77_DGEEV (cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda, fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr, cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info)
void | F77_DGELS (cfch_ trans, cfi_ M, cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda, fda_ B, cfi_ ldb, fda_ work, cfi_ lwork, fi_ info)
void | F77_DGESV (cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda, fia_ ipiv, fda_ b, cfi_ ldb, fi_ info)
void | F77_DGESVD (cfch_ JOBU, cfch_ JOBVT, fi_ M, fi_ N, fda_ A, fi_ LDA, fda_ S, fda_ U, fi_ LDU, fda_ VT, fi_ LDVT, fda_ WORK, fi_ LWORK, fi_ INFO)
[see fortran.h for typedefs] SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )
void | F77_DGGGLM (cfi_ N, cfi_ M, cfi_ P, fda_ A, cfi_ lda, fda_ B, cfi_ ldb, fda_ b, fda_ x, fda_ y, fda_ work, cfi_ lwork, fi_ info)
void | F77_DSYEV (cfch_ jobz, cfch_ uplo, cfi_ N, fda_ A, cfi_ lda, fda_ W, fda_ work, cfi_ lwork, fi_ info)
void | Fortran_Matrix_to_Matrix (const Fortran_Matrix< double > &FMat, BIAS::Matrix< double > &res)
BIAS::Matrix< double > | Fortran_Matrix_to_Matrix (const Fortran_Matrix< double > &FMat)
converts the argument Fortran_Matrix to a Matrix and returns it.
int | General_singular_value_decomposition (char jobu, char jobvt, const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_U, BIAS::Matrix< double > &ret_VT)
BIAS::Vector< double > | Lapack_LLS_QR_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, int &res)
BIAS::Vector< double > | Lapack_LU_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b)
BIAS::Vector< double > | Lapack_WLLS_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, const BIAS::Matrix< double > &B, int &res)
BIAS::Vector< double > | Upper_symmetric_eigenvalue_solve (const BIAS::Matrix< double > &A)

Define Documentation

#define F77_DGEEV dgeev_

Definition at line 38 of file Lapack.cpp.

#define F77_DGELS dgels_

Definition at line 36 of file Lapack.cpp.

#define F77_DGESV dgesv_

Definition at line 35 of file Lapack.cpp.

#define F77_DGESVD dgesvd_

Definition at line 39 of file Lapack.cpp.

#define F77_DGGGLM dggglm_

Definition at line 40 of file Lapack.cpp.

#define F77_DSYEV dsyev_

Definition at line 37 of file Lapack.cpp.

Function Documentation

int Eigenproblem_quadratic_matrix | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_EigenValuesReal,
 |  | BIAS::Vector< double > & | ret_EigenValuesImag,
 |  | BIAS::Matrix< double > & | eigenVectors
 | ) |

Definition at line 431 of file Lapack.cpp.

References TNT::Fortran_Matrix< T >::begin(), F77_DGEEV, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::size(), TNT::transpose(), and work.

int Eigenvalue_solve | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | wr,
 |  | BIAS::Vector< double > & | wi
 | ) |

Definition at line 384 of file Lapack.cpp.

References F77_DGEEV, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), one, TNT::transpose(), and work.

void F77_DGEEV | ( | cfch_ | jobvl,
 |  | cfch_ | jobvr,
 |  | cfi_ | N,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | wr,
 |  | fda_ | wi,
 |  | fda_ | vl,
 |  | cfi_ | ldvl,
 |  | fda_ | vr,
 |  | cfi_ | ldvr,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void F77_DGELS | ( | cfch_ | trans,
 |  | cfi_ | M,
 |  | cfi_ | N,
 |  | cfi_ | nrhs,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | B,
 |  | cfi_ | ldb,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void F77_DGESV | ( | cfi_ | N,
 |  | cfi_ | nrhs,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fia_ | ipiv,
 |  | fda_ | b,
 |  | cfi_ | ldb,
 |  | fi_ | info
 | ) |

void F77_DGESVD | ( | cfch_ | JOBU,
 |  | cfch_ | JOBVT,
 |  | fi_ | M,
 |  | fi_ | N,
 |  | fda_ | A,
 |  | fi_ | LDA,
 |  | fda_ | S,
 |  | fda_ | U,
 |  | fi_ | LDU,
 |  | fda_ | VT,
 |  | fi_ | LDVT,
 |  | fda_ | WORK,
 |  | fi_ | LWORK,
 |  | fi_ | INFO
 | ) |

[see fortran.h for typedefs] SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )

Scalar Arguments: CHARACTER JOBU, JOBVT INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N

Array Arguments: DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )

Purpose =======

DGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors. The SVD is written

A = U * SIGMA * transpose(V)

where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.

Note that the routine returns V**T, not V. (JW, 03/2002)

void F77_DGGGLM | ( | cfi_ | N,
 |  | cfi_ | M,
 |  | cfi_ | P,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | B,
 |  | cfi_ | ldb,
 |  | fda_ | b,
 |  | fda_ | x,
 |  | fda_ | y,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void F77_DSYEV | ( | cfch_ | jobz,
 |  | cfch_ | uplo,
 |  | cfi_ | N,
 |  | fda_ | A,
 |  | cfi_ | lda,
 |  | fda_ | W,
 |  | fda_ | work,
 |  | cfi_ | lwork,
 |  | fi_ | info
 | ) |

void Fortran_Matrix_to_Matrix | ( | const Fortran_Matrix< double > & | FMat,
 |  | BIAS::Matrix< double > & | res
 | ) |

Definition at line 155 of file Lapack.cpp.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Fortran_Matrix< T >::num_rows().

int General_singular_value_decomposition | ( | char | jobu,
 |  | char | jobvt,
 |  | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_S,
 |  | BIAS::Matrix< double > & | ret_U,
 |  | BIAS::Matrix< double > & | ret_VT
 | ) |

Definition at line 498 of file Lapack.cpp.

References F77_DGESVD, Fortran_Matrix_to_Matrix(), max, min, TNT::Vector< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::transpose(), and work.

Referenced by BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::LeastSquaresSVD::Solve(), and BIAS::LeastSquaresSVD::WeightedSolve().

BIAS::Vector<double> Lapack_LLS_QR_linear_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b,
 |  | int & | res
 | ) |

Definition at line 217 of file Lapack.cpp.

References BIASERR, F77_DGELS, BIAS::Vector< T >::GetData(), BIAS::SVD::GetS(), M, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), one, BIAS::SVD::Rank(), TNT::Vector< T >::size(), TNT::transpose(), and work.

BIAS::Vector<double> Lapack_LU_linear_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b
 | ) |

Definition at line 177 of file Lapack.cpp.

References F77_DGESV, BIAS::Vector< T >::GetData(), M, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), one, TNT::Vector< T >::size(), and TNT::transpose().

BIAS::Vector<double> Lapack_WLLS_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b,
 |  | const BIAS::Matrix< double > & | B,
 |  | int & | res
 | ) |

Definition at line 281 of file Lapack.cpp.

References BIASERR, and TNT::Matrix< T >::num_rows().

Referenced by main(), and BIAS::LeastSquaresLapack::WeightedSolve().

BIAS::Vector<double> Upper_symmetric_eigenvalue_solve ( const BIAS::Matrix< double > & A )

Definition at line 342 of file Lapack.cpp.

References TNT::Vector< T >::begin(), F77_DSYEV, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Vector< T >::size(), TNT::transpose(), and work.

Generated on Wed Jun 21 19:05:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Lapack.hh File Reference

MathAlgo

Lapack.hh File Reference

BIAS c++ wrapper class for lapack fortran77 functions. More...

#include "bias_config.h"
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>

Include dependency graph for Lapack.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BIASMathAlgo_EXPORT int | Eigenproblem_quadratic_matrix (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_EigenValuesReal, BIAS::Vector< double > &ret_EigenValuesImag, BIAS::Matrix< double > &eigenVectors)
solve general eigenproblem for a general quadratix (n x n) matrix.
BIASMathAlgo_EXPORT int | Eigenvalue_solve (const BIAS::Matrix< double > &A, BIAS::Vector< double > &wr, BIAS::Vector< double > &wi)
solve unsymmetric eigenvalue problems (for a rectangular matrix) untested, grest
BIASMathAlgo_EXPORT void | Fortran_Matrix_to_Matrix (const TNT::Fortran_Matrix< double > &FMat, BIAS::Matrix< double > &res)
converts the argument Fortran_Matrix to a Matrix and returns it.
BIASMathAlgo_EXPORT BIAS::Matrix<
double > 		Fortran_Matrix_to_Matrix (const TNT::Fortran_Matrix< double > &FMat)
converts the argument Fortran_Matrix to a Matrix and returns it.
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_VT)
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_U, BIAS::Matrix< double > &ret_VT)
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (char jobu, char jobvt, const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_U, BIAS::Matrix< double > &ret_VT)
solve general eigenproblem.
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LLS_QR_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b)
as above but ignores success info (res)
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LLS_QR_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, int &res)
linear least squares solves |Ax-b|=min res=0 on success, anything else rudimentary tested (woelk)
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LU_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b)
solve linear equations using LU factorization
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_WLLS_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, const BIAS::Matrix< double > &B, int &res)
weighted linear least squares solves |B^-1(b-Ax)|=min res=0 on success, anything else rudimentary tested
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Upper_symmetric_eigenvalue_solve (const BIAS::Matrix< double > &A)
solve symmetric eigenvalue problem (eigenvalues only) untested, grest

Detailed Description

BIAS c++ wrapper class for lapack fortran77 functions.

Author:
Daniel Grest, Jan Woetzel, Felix Woelk tested

Definition in file Lapack.hh.

Generated on Wed Jun 21 19:05:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/LeastSquares.cpp File Reference

MathAlgo

LeastSquares.cpp File Reference

#include "LeastSquares.hh"
#include "Lapack.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for LeastSquares.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/LeastSquares.hh File Reference

MathAlgo

LeastSquares.hh File Reference

#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include "SVD.hh"

Include dependency graph for LeastSquares.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::LeastSquaresBase
class | BIAS::LeastSquaresLapack
class | BIAS::LeastSquaresSVD

Defines

#define | D_LS_MATRIXES 0x00000001
#define | D_LS_RED_MATRIXES 0x00000002
#define | D_LS_SVD 0x00000004

Define Documentation

#define D_LS_MATRIXES 0x00000001

Definition at line 34 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

#define D_LS_RED_MATRIXES 0x00000002

Definition at line 35 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

#define D_LS_SVD 0x00000004

Definition at line 36 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresSVD::Solve().

Generated on Wed Jun 21 19:05:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Median1D.cpp File Reference

MathAlgo

Median1D.cpp File Reference

#include "Median1D.hh"

Include dependency graph for Median1D.cpp:

Go to the source code of this file.

Defines

#define BIAS_SWAP(a, b) { t=(a); (a)=(b); (b)=t; }
This Quickselect routine is based on the algorithm described in "Numerical recipies in C", Second Edition, Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5.

Define Documentation

#define BIAS_SWAP | ( | a,
 |  | b | ) | { t=(a); (a)=(b); (b)=t; }

This Quickselect routine is based on the algorithm described in "Numerical recipies in C", Second Edition, Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5.

Definition at line 65 of file Median1D.cpp.

Generated on Wed Jun 21 19:05:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Median1D.hh File Reference

MathAlgo

Median1D.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Median1D.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Median1D< DataType >
computes the median of a vector More...

Generated on Wed Jun 21 19:05:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Minpack.cpp File Reference

MathAlgo

Minpack.cpp File Reference

#include "Minpack.hh"
#include <Base/Math/tnt/fortran.h>

Include dependency graph for Minpack.cpp:

Go to the source code of this file.

Namespaces

namespace | BIAS

Functions

void | hybrd1_ (void(*fcn)(int *n, double *x, double *fvec, int *iflag), cfi_ n, fda_ x, fda_ fvec, cfd_ tol, fi_ info, fda_ wa, cfi_ lwa)
void | hybrd_ (void(*fcn)(int *n, double *x, double *fvec, int *iflag), cfi_ n, fda_ x, fda_ fvec, cfd_ xtol, cfi_ maxfev, cfi_ ml, cfi_ mu, cfd_ epsfcn, fda_ diag, cfi_ mode, cfd_ factor, cfi_ nprint, fi_ info, fi_ nfev, fda_ fjac, cfi_ ldfjac, fda_ r, cfi_ lr, fda_ qtf, fda_ wa1, fda_ wa2, fda_ wa3, fda_ wa4)
int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER, double *ResultingJacobian=NULL, int *ipvt=NULL, double *SumOfSquaredErrors=NULL)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
void | lmder1_ (void(*fcn)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag), cfi_ m, cfi_ n, fda_ x, fda_ fvec, fda_ fjac, cfi_ ldfjac, cfd_ tol, fi_ info, fia_ ipvt, fda_ wa, cfi_ lwa)
void | lmder_ (void(*fcn)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag), cfi_ m, cfi_ n, fda_ x, fda_ fvec, fda_ fjac, cfi_ ldfjac, cfd_ ftol, cfd_ xtol, cfd_ gtol, cfi_ maxfev, fda_ diag, cfi_ mode, cfd_ factor, cfi_ nprint, fi_ info, fi_ nfev, fi_ njev, fia_ ipvt, fda_ qtf, fda_ wa1, fda_ wa2, fda_ wa3, fda_ wa4)
void | lmdif1_ (void(*fcn)(int *m, int *n, double *x, double *fvec, int *iflag), cfi_ m, cfi_ n, fda_ x, fda_ fvec, cfd_ tol, fi_ info, fia_ iwa, fda_ wa, cfi_ lwa, cfi_ maxfev)
void | lmdif_ (void(*fcn)(int *m, int *n, double *x, double *fvec, int *iflag), cfi_ m, cfi_ n, fda_ x, fda_ fvec, cfd_ ftol, cfd_ xtol, cfd_ gtol, cfi_ maxfev, cfd_ epsfcn, fda_ diag, cfi_ mode, cfd_ factor, cfi_ nprint, fi_ info, fi_ nfev, fda_ fjac, cfi_ ldfjac, fia_ ipvt, fda_ qtf, fda_ wa1, fda_ wa2, fda_ wa3, fda_ wa4)
int | BIAS::Powell (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solve a system of n non-linear equations with n unkowns using the powell hybrid method.
int | BIAS::PowellExtended (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE)
solve a system of n non-linear equations with n unkowns using the powell hybrid method.

Function Documentation

void hybrd1_ | ( | void(*)(int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | cfd_ | tol,
 |  | fi_ | info,
 |  | fda_ | wa,
 |  | cfi_ | lwa
 | ) |

Referenced by BIAS::Powell().

void hybrd_ | ( | void(*)(int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | cfd_ | xtol,
 |  | cfi_ | maxfev,
 |  | cfi_ | ml,
 |  | cfi_ | mu,
 |  | cfd_ | epsfcn,
 |  | fda_ | diag,
 |  | cfi_ | mode,
 |  | cfd_ | factor,
 |  | cfi_ | nprint,
 |  | fi_ | info,
 |  | fi_ | nfev,
 |  | fda_ | fjac,
 |  | cfi_ | ldfjac,
 |  | fda_ | r,
 |  | cfi_ | lr,
 |  | fda_ | qtf,
 |  | fda_ | wa1,
 |  | fda_ | wa2,
 |  | fda_ | wa3,
 |  | fda_ | wa4
 | ) |

Referenced by BIAS::PowellExtended().

void lmder1_ | ( | void(*)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag) | fcn,
 |  | cfi_ | m,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | fda_ | fjac,
 |  | cfi_ | ldfjac,
 |  | cfd_ | tol,
 |  | fi_ | info,
 |  | fia_ | ipvt,
 |  | fda_ | wa,
 |  | cfi_ | lwa
 | ) |

Referenced by BIAS::LevenbergMarquardt().

void lmder_ | ( | void(*)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag) | fcn,
 |  | cfi_ | m,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | fda_ | fjac,
 |  | cfi_ | ldfjac,
 |  | cfd_ | ftol,
 |  | cfd_ | xtol,
 |  | cfd_ | gtol,
 |  | cfi_ | maxfev,
 |  | fda_ | diag,
 |  | cfi_ | mode,
 |  | cfd_ | factor,
 |  | cfi_ | nprint,
 |  | fi_ | info,
 |  | fi_ | nfev,
 |  | fi_ | njev,
 |  | fia_ | ipvt,
 |  | fda_ | qtf,
 |  | fda_ | wa1,
 |  | fda_ | wa2,
 |  | fda_ | wa3,
 |  | fda_ | wa4
 | ) |

Referenced by BIAS::LevenbergMarquardtExtended().

void lmdif1_ | ( | void(*)(int *m, int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | cfi_ | m,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | cfd_ | tol,
 |  | fi_ | info,
 |  | fia_ | iwa,
 |  | fda_ | wa,
 |  | cfi_ | lwa,
 |  | cfi_ | maxfev
 | ) |

Referenced by BIAS::LevenbergMarquardt().

void lmdif_ | ( | void(*)(int *m, int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | cfi_ | m,
 |  | cfi_ | n,
 |  | fda_ | x,
 |  | fda_ | fvec,
 |  | cfd_ | ftol,
 |  | cfd_ | xtol,
 |  | cfd_ | gtol,
 |  | cfi_ | maxfev,
 |  | cfd_ | epsfcn,
 |  | fda_ | diag,
 |  | cfi_ | mode,
 |  | cfd_ | factor,
 |  | cfi_ | nprint,
 |  | fi_ | info,
 |  | fi_ | nfev,
 |  | fda_ | fjac,
 |  | cfi_ | ldfjac,
 |  | fia_ | ipvt,
 |  | fda_ | qtf,
 |  | fda_ | wa1,
 |  | fda_ | wa2,
 |  | fda_ | wa3,
 |  | fda_ | wa4
 | ) |

Referenced by BIAS::LevenbergMarquardtExtended().

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Minpack.hh File Reference

MathAlgo

Minpack.hh File Reference

#include "bias_config.h"
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include "Lapack.hh"

Include dependency graph for Minpack.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Defines

#define | LM_DEF_MAX_ITER -1
#define | LM_IMPROPER_INPUT -1
#define | LM_OK 0
#define | LM_SMALL_FTOL 6.
#define | LM_SMALL_GTOL 8
#define | LM_SMALL_XTOL 7
#define | LM_TOO_MANY_IT 5
#define | MINPACK_DEF_TOLERANCE 1e-7

Functions

int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER, double *ResultingJacobian=NULL, int *ipvt=NULL, double *SumOfSquaredErrors=NULL)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::Powell (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solve a system of n non-linear equations with n unkowns using the powell hybrid method.
int | BIAS::PowellExtended (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE)
solve a system of n non-linear equations with n unkowns using the powell hybrid method.

Define Documentation

#define LM_DEF_MAX_ITER -1

Definition at line 37 of file Minpack.hh.

Referenced by BIAS::LevenbergMarquardtExtended().

#define LM_IMPROPER_INPUT -1

Definition at line 40 of file Minpack.hh.

#define LM_OK 0

Definition at line 41 of file Minpack.hh.

#define LM_SMALL_FTOL 6.

Definition at line 43 of file Minpack.hh.

#define LM_SMALL_GTOL 8

Definition at line 45 of file Minpack.hh.

#define LM_SMALL_XTOL 7

Definition at line 44 of file Minpack.hh.

#define LM_TOO_MANY_IT 5

Definition at line 42 of file Minpack.hh.

#define MINPACK_DEF_TOLERANCE 1e-7

Definition at line 36 of file Minpack.hh.

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/MSAC.hh File Reference

MathAlgo

MSAC.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Random.hh>
#include <Utils/Param.hh>
#include <vector>
#include <iterator>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for MSAC.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MSAC< SolutionType >

Defines

#define | D_MSAC_INIT 0x00000004
#define | D_MSAC_SAMPLES 0x00000002
#define | D_MSAC_SOLVEM 0x00000001

Define Documentation

#define D_MSAC_INIT 0x00000004

Definition at line 17 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::Init().

#define D_MSAC_SAMPLES 0x00000002

Definition at line 16 of file MSAC.hh.

#define D_MSAC_SOLVEM 0x00000001

Definition at line 15 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::SolveMaster().

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/PolynomialSolve.cpp File Reference

MathAlgo

PolynomialSolve.cpp File Reference

#include "Base/Common/W32Compat.hh"
#include "PolynomialSolve.hh"
#include "Minpack.hh"
#include <gsl/gsl_poly.h>
#include <gsl/gsl_errno.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for PolynomialSolve.cpp:

Go to the source code of this file.

Defines

#define | DOUBLE_MIN 1e-6
#define | PS_DOUBLE_EPSILON DBL_EPSILON

Functions

void | MyPowellFunc (int *n, double *x, double *fvec, int *iflag)

Variables

double * | PowellCoeff = NULL
int | PowellCoeffNum

Define Documentation

#define DOUBLE_MIN 1e-6

Definition at line 33 of file PolynomialSolve.cpp.

#define PS_DOUBLE_EPSILON DBL_EPSILON

Definition at line 34 of file PolynomialSolve.cpp.

Function Documentation

void MyPowellFunc | ( | int * | n,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * | iflag
 | ) |

Definition at line 650 of file PolynomialSolve.cpp.

References BIASERR.

Variable Documentation

double* PowellCoeff = NULL

Definition at line 648 of file PolynomialSolve.cpp.

int PowellCoeffNum

Definition at line 647 of file PolynomialSolve.cpp.

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/PolynomialSolve.hh File Reference

MathAlgo

PolynomialSolve.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <cfloat>
#include <vector>
#include <complex>
#include "Base/Debug/Debug.hh"
#include "Base/Debug/Error.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for PolynomialSolve.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PolynomialSolve
base class for solving polynomial equations More...

Defines

#define | D_PS_COEFF 0x00000004
#define | D_PS_GSL 0x00000001
#define | D_PS_NLREFINE 0x00000002
#define | POLYNOMIALSOLVE_TYPE double

Define Documentation

#define D_PS_COEFF 0x00000004

Definition at line 41 of file PolynomialSolve.hh.

#define D_PS_GSL 0x00000001

Definition at line 39 of file PolynomialSolve.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences().

#define D_PS_NLREFINE 0x00000002

Definition at line 40 of file PolynomialSolve.hh.

#define POLYNOMIALSOLVE_TYPE double

Definition at line 37 of file PolynomialSolve.hh.

Referenced by BIAS::PolynomialSolve::EvaluatePolynomial().

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/RANSAC.hh File Reference

MathAlgo

RANSAC.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Random.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Math/Matrix.hh>
#include <algorithm>
#include <float.h>
#include <iterator>
#include <vector>
#include <iomanip>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for RANSAC.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RANSAC< SolutionType >
do not DLL export this class because it is headeer only. More...

Defines

#define | D_RANSAC_SAMPLES 0x0001
#define | D_RANSAC_SOLVE_MASTER 0x0002
#define | RANSAC_DEFAULT_PROBOFGOODSOLUTION 0.98
#define | RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE 0.02

Define Documentation

#define D_RANSAC_SAMPLES 0x0001

Definition at line 43 of file RANSAC.hh.

Referenced by main().

#define D_RANSAC_SOLVE_MASTER 0x0002

Definition at line 44 of file RANSAC.hh.

Referenced by main(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

#define RANSAC_DEFAULT_PROBOFGOODSOLUTION 0.98

Definition at line 46 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC().

#define RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE 0.02

Definition at line 47 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC().

Generated on Wed Jun 21 19:05:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/RANSACPreKnowledge.hh File Reference

MathAlgo

RANSACPreKnowledge.hh File Reference

#include "RANSAC.hh"

Include dependency graph for RANSACPreKnowledge.hh:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::RANSACPreKnowledge< SolutionType >
Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm. More...

Generated on Wed Jun 21 19:05:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD.cpp File Reference

MathAlgo

SVD.cpp File Reference

#include "SVD.hh"
#include <Base/Debug/Exception.hh>
#include <Base/Common/CompareFloatingPoint.hh>
#include <algorithm>
#include <cmath>
#include "Lapack.hh"

Include dependency graph for SVD.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD.hh File Reference

MathAlgo

SVD.hh File Reference

#include "bias_config.h"
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include <float.h>

Include dependency graph for SVD.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::SVD
computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A More...

Defines

#define | D_SVD_RANK 0x00000002
#define | D_SVD_SOLVE 0x00000004
#define | DEFAULT_DOUBLE_ZERO_THRESHOLD 1E-8
#define | SVDSOLVE 0x00000001

Define Documentation

#define D_SVD_RANK 0x00000002

Definition at line 48 of file SVD.hh.

Referenced by BIAS::SVD::Rank().

#define D_SVD_SOLVE 0x00000004

Definition at line 49 of file SVD.hh.

Referenced by BIAS::SVD::Solve().

#define DEFAULT_DOUBLE_ZERO_THRESHOLD 1E-8

Definition at line 45 of file SVD.hh.

Referenced by BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), and BIAS::SVD3x3::SVD3x3().

#define SVDSOLVE 0x00000001

Definition at line 47 of file SVD.hh.

Generated on Wed Jun 21 19:05:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD3x3.cpp File Reference

MathAlgo

SVD3x3.cpp File Reference

#include "SVD3x3.hh"
#include <math.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for SVD3x3.cpp:

Go to the source code of this file.

Defines

#define | MAX(a, b)
#define | PYTHAG(a, b)
#define | SIGN(a, b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
#define | SVD_MAX_ITERATIONS 40

Variables

static double | at
static double | bt
static double | ct
static double | maxarg1
static double | maxarg2

Define Documentation

#define MAX | ( | a,
 |  | b | )

Value:

(maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\
    (maxarg1) : (maxarg2))

Definition at line 64 of file SVD3x3.cpp.

Referenced by BIAS::SVD3x3::Compute().

#define PYTHAG | ( | a,
 |  | b | )

Value:

((at=fabs(a)) > (bt=fabs(b)) ? \
(ct=bt/at,at*sqrt(1.0+ct*ct)) : (bt ? (ct=at/bt,bt*sqrt(1.0+ct*ct)): 0.0))

Definition at line 60 of file SVD3x3.cpp.

Referenced by BIAS::SVD3x3::Compute().

#define SIGN | ( | a,
 |  | b | ) | ((b) >= 0.0 ? fabs(a) : -fabs(a))

Definition at line 66 of file SVD3x3.cpp.

Referenced by BIAS::SVD3x3::Compute().

#define SVD_MAX_ITERATIONS 40

Definition at line 38 of file SVD3x3.cpp.

Referenced by BIAS::SVD3x3::Compute().

Variable Documentation

double at [static]

Definition at line 59 of file SVD3x3.cpp.

Referenced by BIAS::PMatrix::GetIntersectionOfImagePlanes().

double bt [static]

Definition at line 59 of file SVD3x3.cpp.

double ct [static]

Definition at line 59 of file SVD3x3.cpp.

double maxarg1 [static]

Definition at line 63 of file SVD3x3.cpp.

double maxarg2 [static]

Definition at line 63 of file SVD3x3.cpp.

Generated on Wed Jun 21 19:05:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD3x3.hh File Reference

MathAlgo

SVD3x3.hh File Reference

#include "SVD.hh"

Include dependency graph for SVD3x3.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::SVD3x3
singular value decomposition for 3x3 matrices More...

Generated on Wed Jun 21 19:05:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/UnscentedTransform.cpp File Reference

MathAlgo

UnscentedTransform.cpp File Reference

#include <MathAlgo/UnscentedTransform.hh>
#include <MathAlgo/SVD.hh>
#include <MathAlgo/Lapack.hh>
#include <Base/Common/CompareFloatingPoint.hh>
#include <Base/Debug/Exception.hh>
#include <Base/Math/Matrix.hh>

Include dependency graph for UnscentedTransform.cpp:

Go to the source code of this file.

Defines

#define UT_NORMALIZE

Define Documentation

#define UT_NORMALIZE

Generated on Wed Jun 21 19:05:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/UnscentedTransform.hh File Reference

MathAlgo

UnscentedTransform.hh File Reference

#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector.hh>
#include <vector>
#include <Base/Math/Matrix.hh>

Include dependency graph for UnscentedTransform.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::UnscentedTransform
uses the unscented transformation to map a normal distribututed random variable using a nonlinear transformation More...
struct | BIAS::WeightedSigmaPoint

Defines

#define | D_UT_PARAM 0x00000004
#define | D_UT_SIGMA_POINTS 0x00000001
#define | D_UT_TRANSFORM 0x00000002

Define Documentation

#define D_UT_PARAM 0x00000004

Definition at line 44 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

#define D_UT_SIGMA_POINTS 0x00000001

Definition at line 42 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

#define D_UT_TRANSFORM 0x00000002

Definition at line 43 of file UnscentedTransform.hh.

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleBSplineCurve.cpp File Reference

MathAlgo » Examples

ExampleBSplineCurve.cpp File Reference

#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Vector2.hh>
#include <MathAlgo/BSplineCurve.hh>

Include dependency graph for ExampleBSplineCurve.cpp:

Go to the source code of this file.

Functions

void | drawCubic (BIAS::BSplineCurve bspline)
void | drawQuadratic (BIAS::BSplineCurve bspline)
int | main ()

Variables

BIAS::Image< unsigned char > | img
Example draws:
  • regular open quadratic bspline into ExampleBSplineCurve0.mip
  • regular closed quadratic bspline into ExampleBSplineCurve1.mip
  • regular open cubic bspline into ExampleBSplineCurve2.mip
  • regular closed cubic bspline into ExampleBSplineCurve3.mip.

unsigned int | imgCounter = 0
unsigned char | value [1]

Function Documentation

void drawCubic ( BIAS::BSplineCurve bspline )

Definition at line 73 of file ExampleBSplineCurve.cpp.

References BIAS::BSplineCurve::CubicUniformBSpline(), BIAS::Image< StorageType >::FillImageWithConstValue(), res, and value.

Referenced by main().

void drawQuadratic ( BIAS::BSplineCurve bspline )

Definition at line 48 of file ExampleBSplineCurve.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::BSplineCurve::QuadraticUniformBSpline(), res, and value.

Referenced by main().

int main ( )

Definition at line 100 of file ExampleBSplineCurve.cpp.

References drawCubic(), drawQuadratic(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::Init(), BIAS::BSplineCurve::InitCubicUniformBSpline(), BIAS::BSplineCurve::InitQuadraticUniformBSpline(), BIAS::BSplineCurve::SetControlPoints(), and value.

Variable Documentation

BIAS::Image<unsigned char> img

Example draws:

  • regular open quadratic bspline into ExampleBSplineCurve0.mip
  • regular closed quadratic bspline into ExampleBSplineCurve1.mip
  • regular open cubic bspline into ExampleBSplineCurve2.mip
  • regular closed cubic bspline into ExampleBSplineCurve3.mip.

Examples:
convertRAW.cpp.

Definition at line 43 of file ExampleBSplineCurve.cpp.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), MyFrame::LoadImages(), main(), BIAS::VideoSource_Net::OpenDevice(), BIAS::operator<<(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::ImageAttributes::ReadMagickPP(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::GuiBase::ShowImage(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoStream::SplitIntoFiles().

unsigned int imgCounter = 0

Definition at line 44 of file ExampleBSplineCurve.cpp.

unsigned char value[1]

Definition at line 45 of file ExampleBSplineCurve.cpp.

Referenced by BIAS::Image< CalculationType >::Clear(), drawCubic(), drawQuadratic(), TNT::Fortran_Matrix< T >::Fortran_Matrix(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::GetGain(), BIAS::VideoSource_DCAM::GetGammaMode(), BIAS::Label::Label4Neighbour_(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), MyFrame::OnAutoExposure(), MyFrame::OnGain(), MyFrame::OnShutter(), BIAS::VideoSource_DCAM::SetGain(), BIAS::ScaledImageCanvas::SetOffset(), BIAS::ScaledImageCanvas::SetScale(), BIAS::VideoSource_DCAM::SetShutter(), TNT::Vector< FM_INT >::Vector(), and TNT::Vector_Adaptor< BBVec >::Vector_Adaptor().

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleFFT.cpp File Reference

MathAlgo » Examples

ExampleFFT.cpp File Reference

#include <MathAlgo/FFT.hh>
#include <Base/Math/Random.hh>
#include <iostream>
#include <iomanip>

Include dependency graph for ExampleFFT.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 33 of file ExampleFFT.cpp.

References BIAS::FFT::Compute(), debug, BIAS::FFT::DumpResult(), BIAS::FFT::GetInput(), BIAS::FFT::GetMagnitude(), BIAS::FFT::GetPhase(), BIAS::Random::GetUniformDistributed(), BIAS::FFT::Init(), and p.

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleGSL.cpp File Reference

MathAlgo » Examples

ExampleGSL.cpp File Reference

#include <bias_config.h>
#include <Base/Math/Random.hh>
#include <MathAlgo/GSL.hh>

Include dependency graph for ExampleGSL.cpp:

Go to the source code of this file.

Functions

int main (int, char **)

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 33 of file ExampleGSL.cpp.

References BIAS::Random::GetUniformDistributed(), and BIAS::InvChiSquareCulmProbFun().

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleInterpolateLuT.cpp File Reference

MathAlgo » Examples

ExampleInterpolateLuT.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/Interpolator.hh>
#include <iostream>
#include <vector>

Include dependency graph for ExampleInterpolateLuT.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 11 of file ExampleInterpolateLuT.cpp.

References BIAS::Interpolator::InitSpline(), BIAS::Interpolator::PrepareLuTSpline(), res, BIAS::Interpolator::SetControlPoints(), BIAS::Interpolator::SetKnotPoints(), BIAS::Interpolator::Spline(), and BIAS::Interpolator::SplineFromLuT().

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleLeastSquares.cpp File Reference

MathAlgo » Examples

ExampleLeastSquares.cpp File Reference

#include <MathAlgo/LeastSquares.hh>
#include <Base/Math/Random.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleLeastSquares.cpp:

Go to the source code of this file.

Functions

void | GetSystem (Matrix< double > &A, Vector< double > &weight, Vector< double > &sol, unsigned solsize, unsigned numeq)
void | GetSystem (Matrix< double > &A, Vector< double > &b, Vector< double > &weight, Vector< double > &sol, unsigned solsize, unsigned numeq)
int | main ()
void | TestNoWeightAx (Matrix< double > &A, Vector< double > &sol, unsigned solsize, LeastSquaresLapack &lsla, LeastSquaresSVD lssvd)
void | TestNoWeightAxb (Matrix< double > &A, Vector< double > &b, Vector< double > &sol, unsigned solsize, LeastSquaresLapack &lsla, LeastSquaresSVD lssvd)
void | TestWeightAx (Matrix< double > &A, Vector< double > &weight, Vector< double > &sol, unsigned solsize, LeastSquaresLapack &lsla, LeastSquaresSVD lssvd)
void | TestWeightAxb (Matrix< double > &A, Vector< double > &b, Vector< double > &weight, Vector< double > &sol, unsigned solsize, LeastSquaresLapack &lsla, LeastSquaresSVD lssvd)

Variables

double | sigma = 5.0

Function Documentation

void GetSystem | ( | Matrix< double > & | A,
 |  | Vector< double > & | weight,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | unsigned | numeq
 | ) |

Definition at line 61 of file ExampleLeastSquares.cpp.

References BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), TNT::Matrix< T >::newsize(), TNT::Vector< T >::newsize(), r, and sigma.

void GetSystem | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | weight,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | unsigned | numeq
 | ) |

Definition at line 35 of file ExampleLeastSquares.cpp.

References BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), TNT::Matrix< T >::newsize(), TNT::Vector< T >::newsize(), and sigma.

Referenced by main().

int main ( )

Definition at line 193 of file ExampleLeastSquares.cpp.

References GetSystem(), BIAS::LeastSquaresBase::Init(), TestNoWeightAx(), TestNoWeightAxb(), TestWeightAx(), and TestWeightAxb().

void TestNoWeightAx | ( | Matrix< double > & | A,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | LeastSquaresLapack & | lsla,
 |  | LeastSquaresSVD | lssvd
 | ) |

Definition at line 147 of file ExampleLeastSquares.cpp.

References BIAS::LeastSquaresLapack::Solve().

Referenced by main().

void TestNoWeightAxb | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | LeastSquaresLapack & | lsla,
 |  | LeastSquaresSVD | lssvd
 | ) |

Definition at line 102 of file ExampleLeastSquares.cpp.

References BIAS::LeastSquaresLapack::Solve().

Referenced by main().

void TestWeightAx | ( | Matrix< double > & | A,
 |  | Vector< double > & | weight,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | LeastSquaresLapack & | lsla,
 |  | LeastSquaresSVD | lssvd
 | ) |

Definition at line 169 of file ExampleLeastSquares.cpp.

References BIAS::LeastSquaresLapack::WeightedSolve().

Referenced by main().

void TestWeightAxb | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | weight,
 |  | Vector< double > & | sol,
 |  | unsigned | solsize,
 |  | LeastSquaresLapack & | lsla,
 |  | LeastSquaresSVD | lssvd
 | ) |

Definition at line 124 of file ExampleLeastSquares.cpp.

References BIAS::LeastSquaresLapack::WeightedSolve().

Referenced by main().

Variable Documentation

double sigma = 5.0

Definition at line 33 of file ExampleLeastSquares.cpp.

Referenced by BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), GetSystem(), main(), TNT::QR_factor(), and BIAS::TrackerBase< StorageType >::TrackAffine_().

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExamplePolynomialSolve.cpp File Reference

MathAlgo » Examples

ExamplePolynomialSolve.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/PolynomialSolve.hh>
#include <Base/Math/Random.hh>
#include <algorithm>

Include dependency graph for ExamplePolynomialSolve.cpp:

Go to the source code of this file.

Namespaces

namespace | std

Functions

void | errout (vector< complex< POLYNOMIALSOLVE_TYPE > > &sol, vector< POLYNOMIALSOLVE_TYPE > &gtsol)
void | errout (vector< POLYNOMIALSOLVE_TYPE > &sol, vector< POLYNOMIALSOLVE_TYPE > &gtsol)
int | main ()
bool | std::operator< (const complex< double > &left, const complex< double > &right)
bool | std::operator< (complex< double > &left, complex< double > &right)
void | solout (vector< complex< POLYNOMIALSOLVE_TYPE > > &sol)
void | solout (vector< POLYNOMIALSOLVE_TYPE > &sol)

Variables

bool | debug = false
double | maxerr = 1e-8

Function Documentation

void errout | ( | vector< complex< POLYNOMIALSOLVE_TYPE > > & | sol,
 |  | vector< POLYNOMIALSOLVE_TYPE > & | gtsol
 | ) |

Definition at line 97 of file ExamplePolynomialSolve.cpp.

References BIASASSERT, debug, maxerr, and solout().

void errout | ( | vector< POLYNOMIALSOLVE_TYPE > & | sol,
 |  | vector< POLYNOMIALSOLVE_TYPE > & | gtsol
 | ) |

Definition at line 69 of file ExamplePolynomialSolve.cpp.

References BIASASSERT, debug, maxerr, and solout().

Referenced by main().

int main ( )

Author:
woelk 08/2004

Definition at line 126 of file ExamplePolynomialSolve.cpp.

References BIAS::PolynomialSolve::Analytic(), BIAS::PolynomialSolve::CalCoefficients(), debug, errout(), BIAS::PolynomialSolve::EvaluatePolynomial(), BIAS::Random::GetUniformDistributed(), BIAS::Random::GetUniformDistributedInt(), num, BIAS::PolynomialSolve::Numeric(), solout(), and BIAS::PolynomialSolve::Solve().

void solout ( vector< complex< POLYNOMIALSOLVE_TYPE > > & sol )

Definition at line 58 of file ExamplePolynomialSolve.cpp.

References debug.

void solout ( vector< POLYNOMIALSOLVE_TYPE > & sol )

Definition at line 48 of file ExamplePolynomialSolve.cpp.

References debug.

Referenced by errout(), and main().

Variable Documentation

bool debug = false

Definition at line 34 of file ExamplePolynomialSolve.cpp.

Referenced by errout(), main(), and solout().

double maxerr = 1e-8

Definition at line 35 of file ExamplePolynomialSolve.cpp.

Referenced by errout(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

Generated on Wed Jun 21 19:05:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExamplePowell.cpp File Reference

MathAlgo » Examples

ExamplePowell.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/Minpack.hh>
#include <Base/Math/Random.hh>
#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Vector3.hh>

Include dependency graph for ExamplePowell.cpp:

Go to the source code of this file.

Functions

int | main ()
void | myfunc (int *n, double *x, double *fvec, int *iflag)

Variables

Vector< double > | m1 (3)
Vector< double > | m2 (3)
int | num

Function Documentation

int main ( )

Definition at line 54 of file ExamplePowell.cpp.

References BIASERR, BIAS::Matrix< T >::Fill(), BIAS::Random::GetUniformDistributed(), m1, m2, myfunc(), num, BIAS::Powell(), and res.

void myfunc | ( | int * | n,
 |  | double * | x,
 |  | double * | fvec,
 |  | int * | iflag
 | ) |

Definition at line 39 of file ExamplePowell.cpp.

References m1, m2, and num.

Referenced by main().

Variable Documentation

Vector<double> m1(3)

Referenced by main(), and myfunc().

Vector<double> m2(3)

Referenced by main(), and myfunc().

int num

Definition at line 37 of file ExamplePowell.cpp.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), main(), myfunc(), MyLinTransform(), BIAS::TrackerBase< StorageType >::RejectMAD_(), BIAS::TrackerBase< StorageType >::RejectX86_(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), BIAS::TrackerBase< StorageType >::Track(), Track(), and BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

Generated on Wed Jun 21 19:05:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSAC.cpp File Reference

MathAlgo » Examples

ExampleRANSAC.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "Base/Math/Random.hh"
#include <vector>
#include <iostream>
#include <iomanip>
#include <float.h>
#include "ExampleRANSAC_double.hh"

Include dependency graph for ExampleRANSAC.cpp:

Go to the source code of this file.

Functions

void | GenerateData (unsigned int count, double mean, double sigma, double inlier_fraction, vector< double > &data, Random &ran)
int | main ()

Function Documentation

void GenerateData | ( | unsigned int | count,
 |  | double | mean,
 |  | double | sigma,
 |  | double | inlier_fraction,
 |  | vector< double > & | data,
 |  | Random & | ran
 | ) |

Definition at line 43 of file ExampleRANSAC.cpp.

References BIAS::Random::GetNormalDistributed(), and BIAS::Random::GetUniformDistributed().

Referenced by main().

int main ( )

Definition at line 64 of file ExampleRANSAC.cpp.

References BIASERR, D_DOUBLE_RANSAC_SOLUTION, D_RANSAC_SAMPLES, D_RANSAC_SOLVE_MASTER, debug, GenerateData(), BIAS::Debug::GetDebugLevel(), BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), BIAS::doubleRANSAC::Init(), max, mean, min, res, BIAS::Debug::SetDebugLevel(), sigma, and BIAS::RANSAC< SolutionType >::SolveMaster().

Generated on Wed Jun 21 19:05:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSAC_double.hh File Reference

MathAlgo » Examples

ExampleRANSAC_double.hh File Reference

#include "MathAlgo/RANSAC.hh"
#include <string>

Include dependency graph for ExampleRANSAC_double.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::doubleRANSAC

Defines

#define | D_DOUBLE_RANSAC_SOLUTION 0x0100

Define Documentation

#define D_DOUBLE_RANSAC_SOLUTION 0x0100

Definition at line 33 of file ExampleRANSAC_double.hh.

Referenced by BIAS::doubleRANSAC::EvaluateSolution(), main(), and BIAS::doubleRANSAC::RefineSolution().

Generated on Wed Jun 21 19:05:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSACPlane.cpp File Reference

MathAlgo » Examples

ExampleRANSACPlane.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "Base/Math/Random.hh"
#include <vector>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <float.h>
#include "ExampleRANSACPlane.hh"

Include dependency graph for ExampleRANSACPlane.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])
void | readFile (char *filename, std::vector< HomgPoint3D > &points)

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 80 of file ExampleRANSACPlane.cpp.

References D_RANSAC_SAMPLES, D_RANSAC_SOLVE_MASTER, debug, BIAS::Debug::GetDebugLevel(), BIAS::PlaneRANSAC::Init(), readFile(), res, BIAS::Debug::SetDebugLevel(), and BIAS::RANSAC< SolutionType >::SolveMaster().

void readFile | ( | char * | filename,
 |  | std::vector< HomgPoint3D > & | points
 | ) |

Definition at line 62 of file ExampleRANSACPlane.cpp.

References BIASERR.

Referenced by main().

Generated on Wed Jun 21 19:05:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSACPlane.hh File Reference

MathAlgo » Examples

ExampleRANSACPlane.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include "MathAlgo/RANSAC.hh"
#include "MathAlgo/SVD.hh"
#include "Base/Geometry/HomgPoint3D.hh"
#include "Base/Geometry/HomgPlane3D.hh"
#include <string>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ExampleRANSACPlane.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PlaneRANSAC

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRegressionPlane.cpp File Reference

MathAlgo » Examples

ExampleRegressionPlane.cpp File Reference

#include <iostream>
#include <iomanip>
#include <Base/Math/Math.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for ExampleRegressionPlane.cpp:

Go to the source code of this file.

Functions

void | calc_Regressionsebene (const BIAS::Matrix< double > &A)
int | main ()
void | set_example_designmatrix (BIAS::Matrix< double > &A)

Function Documentation

void calc_Regressionsebene ( const BIAS::Matrix< double > & A )

Definition at line 58 of file ExampleRegressionPlane.cpp.

References BIAS::SVD::GetNullvector(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().

Referenced by main().

int main ( )

Definition at line 95 of file ExampleRegressionPlane.cpp.

References calc_Regressionsebene(), M, and set_example_designmatrix().

void set_example_designmatrix ( BIAS::Matrix< double > & A )

Definition at line 40 of file ExampleRegressionPlane.cpp.

References TNT::Matrix< T >::newsize().

Referenced by main().

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleSVD.cpp File Reference

MathAlgo » Examples

ExampleSVD.cpp File Reference

#include <MathAlgo/SVD.hh>
#include <MathAlgo/SVD3x3.hh>
#include <Base/Math/Random.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleSVD.cpp:

Go to the source code of this file.

Functions

int | main ()
int | MatrixSqrt ()
tests the integrity of the Sqrt() operation
void | Print (ostream &os, SVD &svd, SVD3x3 &svd3x3)

Function Documentation

int main ( )

Definition at line 83 of file ExampleSVD.cpp.

References BIASERR, BIAS::SVD::Compute(), BIAS::SVD3x3::Compute(), BIAS::Matrix< T >::GetData(), BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::Random::GetUniformDistributed(), BIAS::SVD::GetVT(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsZero(), M, MatrixSqrt(), TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), num, Print(), res, BIAS::Vector< T >::SetZero(), BIAS::Matrix< T >::SetZero(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

int MatrixSqrt ( )

tests the integrity of the Sqrt() operation

Author:
woelk 01/2006

Definition at line 51 of file ExampleSVD.cpp.

References BIASERR, BIAS::Random::GetUniformDistributed(), BIAS::Matrix< T >::IsZero(), M, r, and BIAS::SVD::Sqrt().

Referenced by main().

void Print | ( | ostream & | os,
 |  | SVD & | svd,
 |  | SVD3x3 & | svd3x3
 | ) |

Definition at line 34 of file ExampleSVD.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), and BIAS::SVD::GetV().

Referenced by main().

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleSVD3x3.cpp File Reference

MathAlgo » Examples

ExampleSVD3x3.cpp File Reference

#include <MathAlgo/SVD.hh>
#include <MathAlgo/SVD3x3.hh>
#include <Base/Math/Random.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Geometry/FMatrix.hh>

Include dependency graph for ExampleSVD3x3.cpp:

Go to the source code of this file.

Defines

#define | F_SVD_THRESH 0.1

Functions

int | main ()
void | Print (ostream &os, SVD &svd, SVD3x3 &svd3x3)

Define Documentation

#define F_SVD_THRESH 0.1

Definition at line 12 of file ExampleSVD3x3.cpp.

Function Documentation

int main ( )

Definition at line 30 of file ExampleSVD3x3.cpp.

References F_SVD_THRESH, BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::SVD::NullspaceDim(), and BIAS::Matrix3x3< T >::SetIdentity().

void Print | ( | ostream & | os,
 |  | SVD & | svd,
 |  | SVD3x3 & | svd3x3
 | ) |

Definition at line 14 of file ExampleSVD3x3.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), and BIAS::SVD::GetV().

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleUnscentedTransform.cpp File Reference

MathAlgo » Examples

ExampleUnscentedTransform.cpp File Reference

#include <MathAlgo/UnscentedTransform.hh>
#include <Base/Math/Random.hh>

Include dependency graph for ExampleUnscentedTransform.cpp:

Go to the source code of this file.

Classes

class | MyUnscentedTransform

Functions

int | main (int, char **)
void | MyConstTransform (const Vector< double > &src, Vector< double > &dst)
void | MyLinTransform (const Vector< double > &src, Vector< double > &dst)
void | MySqTransform (const Vector< double > &src, Vector< double > &dst)

Variables

Matrix< double > | T

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 90 of file ExampleUnscentedTransform.cpp.

References BIAS::Random::GetUniformDistributed(), MyLinTransform(), TNT::Matrix< T >::newsize(), TNT::Vector< T >::newsize(), r, BIAS::UnscentedTransform::SetAlpha(), BIAS::UnscentedTransform::SetBeta(), BIAS::UnscentedTransform::Transform(), and BIAS::Matrix< T >::Transpose().

void MyConstTransform | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) |

Definition at line 32 of file ExampleUnscentedTransform.cpp.

References TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetIdentity(), and BIAS::Vector< T >::Size().

void MyLinTransform | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) |

Definition at line 40 of file ExampleUnscentedTransform.cpp.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), num, and BIAS::Vector< T >::Size().

Referenced by main(), and MyUnscentedTransform::Transform_().

void MySqTransform | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) |

Definition at line 53 of file ExampleUnscentedTransform.cpp.

References TNT::Vector< T >::newsize(), and BIAS::Vector< T >::Size().

Variable Documentation

Matrix<double> T

Definition at line 30 of file ExampleUnscentedTransform.cpp.

Referenced by BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), BIAS::TrifocalTensor::Compose(), TNT::Matrix< PMATRIX_TYPE >::copy(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::DerivedFrom< T, Base >::DerivedFrom(), BIAS::Matrix4x4< PMATRIX_TYPE >::det(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Vector< T >::Dist(), BIAS::Matrix< T >::Divide(), TNT::dot_prod(), BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData(), BIAS::Matrix3x3< T >::GetDeterminant(), BIAS::Tensor3D< T >::GetLength(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix3x3< T >::GetRow(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Vector< FM_INT >::initialize(), TNT::Fortran_Matrix< T >::initialize(), TNT::Matrix< PMATRIX_TYPE >::initialize(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix2x2< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::Vector3< T >::IsZero(), BIAS::Vector2< HOMGPOINT1D_TYPE >::IsZero(), BIAS::Vector< T >::IsZero(), main(), TNT::matmult(), BIAS::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), BIAS::Tensor3D< T >::NewSize(), BIAS::Vector3< T >::Normalize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector< T >::NormL1(), BIAS::Matrix< T >::NormL1(), BIAS::Vector< T >::NormL2(), BIAS::Matrix< T >::NormL2(), TNT::operator *(), BIAS::Matrix2x2< T >::operator *(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), BIAS::Vector< T >::operator *=(), BIAS::Vector< T >::operator+=(), BIAS::Vector< T >::operator-=(), BIAS::Vector4< T >::operator/(), BIAS::Vector2< T >::operator/(), BIAS::Vector< T >::operator/=(), BIAS::Vector4< HOMGPOINT3D_TYPE >::operator=(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::Tensor3D< T >::operator=(), BIAS::Matrix2x2< T >::operator=(), BIAS::Vector< T >::operator==(), BIAS::Matrix< T >::operator==(), BIAS::Vector4< T >::OuterProduct(), BIAS::Vector< T >::OuterProduct(), BIAS::Tensor3D3x3x3< T >::postmultiply1(), BIAS::Tensor3D3x3x3< T >::postmultiply2(), BIAS::Tensor3D3x3x3< T >::postmultiply3(), BIAS::Tensor3D3x3x3< T >::premultiply1(), BIAS::Tensor3D3x3x3< T >::premultiply2(), BIAS::Tensor3D3x3x3< T >::premultiply3(), BIAS::Vector3< T >::ScalarProduct(), BIAS::Vector< T >::ScalarProduct(), BIAS::Matrix3x3< T >::Scale(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix4x4< PMATRIX_TYPE >::SetIdentity(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Vector4< T >::SetZero(), BIAS::Vector3< T >::SetZero(), BIAS::Vector< FM_INT >::SetZero(), BIAS::Tensor3D< T >::SetZero(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::Matrix3x3< EMATRIX_TYPE >::Trace(), BIAS::Matrix< T >::Trace(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::PoseParametrizationCovariance::Transform(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix4x4< PMATRIX_TYPE >::TransposeIP(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::Matrix2x2< T >::TransposeIP(), and BIAS::Triangulation::Triangulate2D().

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleWeightedLinearLeastSquares.cpp File Reference

MathAlgo » Examples

ExampleWeightedLinearLeastSquares.cpp File Reference

#include "MathAlgo/Lapack.hh"
#include "Base/Math/Matrix.hh"
#include "Base/Math/Vector.hh"

Include dependency graph for ExampleWeightedLinearLeastSquares.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 34 of file ExampleWeightedLinearLeastSquares.cpp.

References Lapack_WLLS_solve(), res, and BIAS::Matrix< T >::SetIdentity().

Generated on Wed Jun 21 19:05:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/interpolate.cpp File Reference

MathAlgo » Examples

interpolate.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <stdlib.h>
#include <vector>
#include "MathAlgo/Interpolator.hh"
#include "Base/Image/Image.hh"
#include "Base/Image/ImageDraw.hh"
#include "Gui/GuiGTK.hh"

Include dependency graph for interpolate.cpp:

Go to the source code of this file.

Functions

void initDim1 ()
void initDim2 ()
int | main (int argc, char **argv)

Variables

Interpolator interpolator
std::vector< Vector2< double > > | listControlPoints
std::vector< double > | listT
std::vector< double > | listX
std::vector< double > | listY

Function Documentation

void initDim1 ( )

Definition at line 78 of file interpolate.cpp.

References BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline(), listT, listY, BIAS::Interpolator::SetControlPoints(), and BIAS::Interpolator::SetKnotPoints().

Referenced by main().

void initDim2 ( )

Definition at line 45 of file interpolate.cpp.

References BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline(), listControlPoints, listT, BIAS::Interpolator::SetControlPoints(), and BIAS::Interpolator::SetKnotPoints().

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 172 of file interpolate.cpp.

References img, BIAS::Image< StorageType >::Init(), initDim1(), listT, and listY.

Variable Documentation

Interpolator interpolator

Definition at line 40 of file interpolate.cpp.

std::vector<Vector2<double> > listControlPoints

Definition at line 44 of file interpolate.cpp.

Referenced by initDim2().

std::vector<double> listT

Definition at line 41 of file interpolate.cpp.

Referenced by initDim1(), initDim2(), and main().

std::vector<double> listX

Definition at line 42 of file interpolate.cpp.

std::vector<double> listY

Definition at line 43 of file interpolate.cpp.

Referenced by initDim1(), and main().

Generated on Wed Jun 21 19:05:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/f2c_gnu011.h File Reference

MathAlgo » minpack

f2c_gnu011.h File Reference

Go to the source code of this file.

Classes

struct | alist
struct | cilist
struct | cllist
struct | complex
struct | doublecomplex
struct | icilist
struct | inlist
union | Multitype
struct | Namelist
struct | olist
struct | Vardesc

Defines

#define | abs(x) ((x) >= 0 ? (x) : -(x))
#define | bit_clear(a, b) ((a) & ~((uinteger)1 << (b)))
#define | bit_set(a, b) ((a) | ((uinteger)1 << (b)))
#define | bit_test(a, b) ((a) >> (b) & 1)
#define | dabs(x) (doublereal)abs(x)
#define | dmax(a, b) (doublereal)max(a,b)
#define | dmin(a, b) (doublereal)min(a,b)
#define | Extern extern
#define | F2C_proc_par_types 1
#define | FALSE_ (0)
#define | max(a, b) ((a) >= (b) ? (a) : (b))
#define | min(a, b) ((a) <= (b) ? (a) : (b))
#define | TRUE_ (1)
#define | VOID void

Typedefs

typedef char * | address
typedef VOID | C_f
typedef VOID(* | C_fp )()
typedef doublereal(* | D_fp )()
typedef double | doublereal
typedef doublereal | E_f
typedef doublereal(*)(*) | E_fp ()
typedef long int | flag
typedef long int | ftnint
typedef long int | ftnlen
typedef VOID | H_f
typedef VOID(* | H_fp )()
typedef integer(* | I_fp )()
typedef long int | integer
barf [ba:rf] 2.
typedef char | integer1
typedef shortint(* | J_fp )()
typedef shortlogical(* | K_fp )()
typedef logical(* | L_fp )()
typedef long int | logical
typedef char | logical1
typedef Multitype | Multitype
typedef Namelist | Namelist
typedef real(* | R_fp )()
typedef float | real
typedef int(* | S_fp )()
typedef short int | shortint
typedef short int | shortlogical
typedef int(* | U_fp )()
typedef unsigned long int | uinteger
typedef Vardesc | Vardesc
typedef VOID | Z_f
typedef VOID(* | Z_fp )()

Define Documentation

#define abs ( x ) ((x) >= 0 ? (x) : -(x))

Definition at line 159 of file f2c_gnu011.h.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::Parametrization::GetBiggestAbsEntry(), BIAS::FFT::GetMagnitude(), BIAS::CameraViewController::MoveToCenter(), BIAS::ColorSegmentation::Segment(), and BIAS::GuiEnhanced::SelectQuadrate().

#define bit_clear | ( | a,
 |  | b | ) | ((a) & ~((uinteger)1 << (b)))

Definition at line 167 of file f2c_gnu011.h.

#define bit_set | ( | a,
 |  | b | ) | ((a) | ((uinteger)1 << (b)))

Definition at line 168 of file f2c_gnu011.h.

#define bit_test | ( | a,
 |  | b | ) | ((a) >> (b) & 1)

Definition at line 166 of file f2c_gnu011.h.

#define dabs ( x ) (doublereal)abs(x)

Definition at line 161 of file f2c_gnu011.h.

#define dmax | ( | a,
 |  | b | ) | (doublereal)max(a,b)

Definition at line 165 of file f2c_gnu011.h.

#define dmin | ( | a,
 |  | b | ) | (doublereal)min(a,b)

Definition at line 164 of file f2c_gnu011.h.

#define Extern extern

Definition at line 34 of file f2c_gnu011.h.

#define F2C_proc_par_types 1

Definition at line 172 of file f2c_gnu011.h.

#define FALSE_ (0)

Definition at line 30 of file f2c_gnu011.h.

#define max | ( | a,
 |  | b | ) | ((a) >= (b) ? (a) : (b))

Definition at line 163 of file f2c_gnu011.h.

Referenced by BIAS::Histogram::AddHist(), BIAS::Histogram::AddWeightedHist(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::WrapBias2Ipl::ConvertIPL32to8(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::TrackerSynth< StorageType, CalculationType >::FindNearest_(), General_singular_value_decomposition(), BIAS::Parametrization::GetBiggestAbsEntry(), BIAS::VideoSource_DCAM::GetGain(), main(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), Scale(), and BIAS::VideoSource_DCAM::SetGain().

#define min | ( | a,
 |  | b | ) | ((a) <= (b) ? (a) : (b))

Definition at line 162 of file f2c_gnu011.h.

Referenced by BIAS::Histogram::AddHist(), BIAS::Histogram::AddWeightedHist(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::WrapBias2Ipl::ConvertIPL32to8(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), MainFrame::FitSizetIfTooSmall(), General_singular_value_decomposition(), BIAS::VideoSource_DCAM::GetGain(), BIAS::Conic2D::GetTangentPoints(), main(), Scale(), and BIAS::VideoSource_DCAM::SetGain().

#define TRUE_ (1)

Definition at line 29 of file f2c_gnu011.h.

#define VOID void

Definition at line 125 of file f2c_gnu011.h.

Typedef Documentation

typedef char* address

Definition at line 12 of file f2c_gnu011.h.

typedef VOID C_f

Definition at line 199 of file f2c_gnu011.h.

typedef VOID(* C_fp)()

Definition at line 191 of file f2c_gnu011.h.

typedef doublereal(* D_fp)()

Definition at line 190 of file f2c_gnu011.h.

typedef double doublereal

Definition at line 15 of file f2c_gnu011.h.

typedef doublereal E_f

Definition at line 202 of file f2c_gnu011.h.

typedef doublereal(*)(*) E_fp()

Definition at line 190 of file f2c_gnu011.h.

typedef long int flag

Definition at line 45 of file f2c_gnu011.h.

typedef long int ftnint

Definition at line 47 of file f2c_gnu011.h.

typedef long int ftnlen

Definition at line 46 of file f2c_gnu011.h.

typedef VOID H_f

Definition at line 200 of file f2c_gnu011.h.

typedef VOID(* H_fp)()

Definition at line 195 of file f2c_gnu011.h.

typedef integer(* I_fp)()

Definition at line 188 of file f2c_gnu011.h.

typedef long int integer

barf [ba:rf] 2.

"He suggested using FORTRAN, and everybody barfed."

  • From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition)

Definition at line 10 of file f2c_gnu011.h.

typedef char integer1

Definition at line 21 of file f2c_gnu011.h.

typedef shortint(* J_fp)()

Definition at line 187 of file f2c_gnu011.h.

typedef shortlogical(* K_fp)()

Definition at line 194 of file f2c_gnu011.h.

typedef logical(* L_fp)()

Definition at line 193 of file f2c_gnu011.h.

typedef long int logical

Definition at line 18 of file f2c_gnu011.h.

typedef char logical1

Definition at line 20 of file f2c_gnu011.h.

typedef union Multitype Multitype

Definition at line 138 of file f2c_gnu011.h.

typedef struct Namelist Namelist

Definition at line 155 of file f2c_gnu011.h.

typedef real(* R_fp)()

Definition at line 189 of file f2c_gnu011.h.

typedef float real

Definition at line 14 of file f2c_gnu011.h.

typedef int(* S_fp)()

Definition at line 196 of file f2c_gnu011.h.

typedef short int shortint

Definition at line 13 of file f2c_gnu011.h.

typedef short int shortlogical

Definition at line 19 of file f2c_gnu011.h.

typedef int(* U_fp)()

Definition at line 186 of file f2c_gnu011.h.

typedef unsigned long int uinteger

Definition at line 11 of file f2c_gnu011.h.

typedef struct Vardesc Vardesc

Definition at line 148 of file f2c_gnu011.h.

typedef VOID Z_f

Definition at line 201 of file f2c_gnu011.h.

typedef VOID(* Z_fp)()

Definition at line 192 of file f2c_gnu011.h.

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/win32_f2c.h File Reference

MathAlgo » minpack

win32_f2c.h File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for win32_f2c.h:

Go to the source code of this file.

Classes

struct | alist
struct | cilist
struct | cllist
struct | complex
struct | doublecomplex
struct | icilist
struct | inlist
union | Multitype
struct | Namelist
struct | olist
struct | Vardesc

Defines

#define | abs(x) ((x) >= 0 ? (x) : -(x))
#define | dabs(x) (doublereal)abs(x)
#define | dmax(a, b) (doublereal)max(a,b)
#define | dmin(a, b) (doublereal)min(a,b)
#define | Extern extern
#define | F2C_proc_par_types 1
#define | FALSE_ (0)
#define | max(a, b) ((a) >= (b) ? (a) : (b))
#define | min(a, b) ((a) <= (b) ? (a) : (b))
#define | TRUE_ (1)
#define | VOID void

Typedefs

typedef char * | address
typedef VOID | C_f
typedef VOID(* | C_fp )()
typedef doublereal(* | D_fp )()
typedef double | doublereal
typedef doublereal | E_f
typedef doublereal(*)(*) | E_fp ()
typedef long | flag
typedef long | ftnint
typedef long | ftnlen
typedef VOID | H_f
typedef VOID(* | H_fp )()
typedef integer(* | I_fp )()
typedef long int | integer
barf [ba:rf] 2.
typedef char | integer1
typedef shortint(* | J_fp )()
typedef shortlogical(* | K_fp )()
typedef logical(* | L_fp )()
typedef long int | logical
typedef char | logical1
typedef long | Long
typedef long | longint
typedef Multitype | Multitype
typedef Namelist | Namelist
typedef real(* | R_fp )()
typedef float | real
typedef int(* | S_fp )()
typedef short int | shortint
typedef short int | shortlogical
typedef int(* | U_fp )()
typedef Vardesc | Vardesc
typedef VOID | Z_f
typedef VOID(* | Z_fp )()

Define Documentation

#define abs ( x ) ((x) >= 0 ? (x) : -(x))

Definition at line 153 of file win32_f2c.h.

#define dabs ( x ) (doublereal)abs(x)

Definition at line 154 of file win32_f2c.h.

#define dmax | ( | a,
 |  | b | ) | (doublereal)max(a,b)

Definition at line 158 of file win32_f2c.h.

#define dmin | ( | a,
 |  | b | ) | (doublereal)min(a,b)

Definition at line 157 of file win32_f2c.h.

#define Extern extern

Definition at line 30 of file win32_f2c.h.

#define F2C_proc_par_types 1

Definition at line 162 of file win32_f2c.h.

#define FALSE_ (0)

Definition at line 26 of file win32_f2c.h.

#define max | ( | a,
 |  | b | ) | ((a) >= (b) ? (a) : (b))

Definition at line 156 of file win32_f2c.h.

#define min | ( | a,
 |  | b | ) | ((a) <= (b) ? (a) : (b))

Definition at line 155 of file win32_f2c.h.

#define TRUE_ (1)

Definition at line 25 of file win32_f2c.h.

#define VOID void

Definition at line 121 of file win32_f2c.h.

Typedef Documentation

typedef char* address

Definition at line 13 of file win32_f2c.h.

typedef VOID C_f

Definition at line 189 of file win32_f2c.h.

typedef VOID(* C_fp)()

Definition at line 181 of file win32_f2c.h.

typedef doublereal(* D_fp)()

Definition at line 180 of file win32_f2c.h.

typedef double doublereal

Definition at line 16 of file win32_f2c.h.

typedef doublereal E_f

Definition at line 192 of file win32_f2c.h.

typedef doublereal(*)(*) E_fp()

Definition at line 180 of file win32_f2c.h.

typedef long flag

Definition at line 41 of file win32_f2c.h.

typedef long ftnint

Definition at line 43 of file win32_f2c.h.

typedef long ftnlen

Definition at line 42 of file win32_f2c.h.

typedef VOID H_f

Definition at line 190 of file win32_f2c.h.

typedef VOID(* H_fp)()

Definition at line 185 of file win32_f2c.h.

typedef integer(* I_fp)()

Definition at line 178 of file win32_f2c.h.

typedef long int integer

barf [ba:rf] 2.

"He suggested using FORTRAN, and everybody barfed."

  • From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition)

Definition at line 12 of file win32_f2c.h.

typedef char integer1

Definition at line 22 of file win32_f2c.h.

typedef shortint(* J_fp)()

Definition at line 177 of file win32_f2c.h.

typedef shortlogical(* K_fp)()

Definition at line 184 of file win32_f2c.h.

typedef logical(* L_fp)()

Definition at line 183 of file win32_f2c.h.

typedef long int logical

Definition at line 19 of file win32_f2c.h.

typedef char logical1

Definition at line 21 of file win32_f2c.h.

typedef long Long

Definition at line 136 of file win32_f2c.h.

typedef long longint

Definition at line 23 of file win32_f2c.h.

typedef union Multitype Multitype

Definition at line 134 of file win32_f2c.h.

typedef struct Namelist Namelist

Definition at line 151 of file win32_f2c.h.

typedef real(* R_fp)()

Definition at line 179 of file win32_f2c.h.

typedef float real

Definition at line 15 of file win32_f2c.h.

typedef int(* S_fp)()

Definition at line 186 of file win32_f2c.h.

typedef short int shortint

Definition at line 14 of file win32_f2c.h.

typedef short int shortlogical

Definition at line 20 of file win32_f2c.h.

typedef int(* U_fp)()

Definition at line 176 of file win32_f2c.h.

typedef struct Vardesc Vardesc

Definition at line 144 of file win32_f2c.h.

typedef VOID Z_f

Definition at line 191 of file win32_f2c.h.

typedef VOID(* Z_fp)()

Definition at line 182 of file win32_f2c.h.

Generated on Wed Jun 21 19:05:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommBase.cpp File Reference

NetworkComm

CScommBase.cpp File Reference

#include "CScommBase.hh"
#include <netinet/in.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <Base/Debug/TimeMeasure.hh>
#include <Base/Debug/Error.hh>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for CScommBase.cpp:

Go to the source code of this file.

Functions

void * | BIAS::receivethread (void *data)
these are wrapper to comply to the pthread_create() interface

Variables

const unsigned int | maxBinaryG = 1<<24

Variable Documentation

const unsigned int maxBinaryG = 1<<24

Definition at line 48 of file CScommBase.cpp.

Referenced by BIAS::CScommBase::AcceptConn_(), and BIAS::CScommBase::AnalyzeData_().

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommBase.hh File Reference

NetworkComm

CScommBase.hh File Reference

#include <bias_config.h>
#include <pthread.h>
#include <sys/types.h>
#include <vector>
#include <map>
#include <Base/Debug/Debug.hh>
#include <NetworkComm/CScommClasses.hh>

Include dependency graph for CScommBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CScommBase
this class CScomm (ClientServer communciation) handles data comunication via TCP/IP for one server and multiple clients. More...

Defines

#define | D_CS_ANALYZE 1<<3
#define | D_CS_CONNECT 1<<2
#define | D_CS_DEFAULT_PORT 4123
#define | D_CS_GETDATA 1<<5
#define | D_CS_LISTENER 1<<0
#define | D_CS_MAXCLIENTS 100
#define | D_CS_RECEIVER 1<<1
#define | D_CS_SEND 1<<4
#define | mygetpid() getpid()

Functions

void * | BIAS::receivethread (void *data)
these are wrapper to comply to the pthread_create() interface

Define Documentation

#define D_CS_ANALYZE 1<<3

Definition at line 50 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AnalyzeData_().

#define D_CS_CONNECT 1<<2

Definition at line 49 of file CScommBase.hh.

#define D_CS_DEFAULT_PORT 4123

Definition at line 45 of file CScommBase.hh.

Referenced by BIAS::VideoServer::AddParams_(), BIAS::CScommBase::CScommBase(), BIAS::listenthread(), BIAS::VideoSource_Net::OpenDevice(), and BIAS::VideoServer::VideoServer().

#define D_CS_GETDATA 1<<5

Definition at line 52 of file CScommBase.hh.

#define D_CS_LISTENER 1<<0

Definition at line 47 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommServer::CreateListenThread_(), and BIAS::listenthread().

#define D_CS_MAXCLIENTS 100

Definition at line 44 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

#define D_CS_RECEIVER 1<<1

Definition at line 48 of file CScommBase.hh.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

#define D_CS_SEND 1<<4

Definition at line 51 of file CScommBase.hh.

#define mygetpid ( ) getpid()

Definition at line 57 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIAS::CScommServer::CreateListenThread_(), BIAS::listenthread(), BIAS::CScommBase::logOutPut_(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SendMsg(), and BIAS::CScommBase::syncReceive_().

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClasses.hh File Reference

NetworkComm

CScommClasses.hh File Reference

#include <bias_config.h>

Include dependency graph for CScommClasses.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CScommData
class | BIAS::CScommMsg
helper classes for CScommBase More...
class | BIAS::CSCommWithClientNr
needed for the creation of receivethreads More...

Enumerations

enum BIAS::EdataType {
BIAS::CS_NONE, BIAS::CS_STRING, BIAS::CS_FLOAT, BIAS::CS_INT,
BIAS::CS_BINARY
}

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClient.cpp File Reference

NetworkComm

CScommClient.cpp File Reference

#include "CScommClient.hh"
#include <sys/poll.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/tcp.h>
#include <errno.h>
#include <stdio.h>
#include <Base/Debug/Error.hh>

Include dependency graph for CScommClient.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClient.hh File Reference

NetworkComm

CScommClient.hh File Reference

#include "CScommBase.hh"

Include dependency graph for CScommClient.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CScommClient
class for sending/receiving data between clients and servers More...

Generated on Wed Jun 21 19:05:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommServer.cpp File Reference

NetworkComm

CScommServer.cpp File Reference

#include "CScommServer.hh"
#include <sys/poll.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/tcp.h>
#include <Base/Debug/Error.hh>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>

Include dependency graph for CScommServer.cpp:

Go to the source code of this file.

Functions

void * BIAS::listenthread (void *data)
these are wrapper to comply to the pthread_create() interface

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommServer.hh File Reference

NetworkComm

CScommServer.hh File Reference

#include "CScommBase.hh"

Include dependency graph for CScommServer.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CScommServer
class for sending/receiving data between clients and servers More...

Functions

void * | BIAS::listenthread (void *data)
these are wrapper to comply to the pthread_create() interface

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/clientExample.cpp File Reference

NetworkComm » Examples

clientExample.cpp File Reference

#include "../CScommClient.hh"
#include <Base/Common/W32Compat.hh>

Include dependency graph for clientExample.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 34 of file clientExample.cpp.

References BIAS::CScommClient::ConnectServer(), BIAS::CS_BINARY, BIAS::CS_FLOAT, BIAS::CScommBase::GetData(), BIAS::CScommBase::RegisterMsg(), BIAS::CScommBase::SendMsg(), BIAS::CScommBase::SetLog(), BIAS::CScommClient::SetName(), and BIAS::CScommBase::SetVerbose().

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/ExampleNetsync.cpp File Reference

NetworkComm » Examples

ExampleNetsync.cpp File Reference

#include <sys/time.h>
#include <stdlib.h>
#include <sched.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include "../netsync.h"

Include dependency graph for ExampleNetsync.cpp:

Go to the source code of this file.

Defines

#define | MYSLEEP 20000

Functions

int | main (int argc, char *argv[])

Define Documentation

#define MYSLEEP 20000

Definition at line 34 of file ExampleNetsync.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 40 of file ExampleNetsync.cpp.

References res.

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/serverExample.cpp File Reference

NetworkComm » Examples

serverExample.cpp File Reference

#include "../CScommServer.hh"

Include dependency graph for serverExample.cpp:

Go to the source code of this file.

Functions

int main (int, char **)

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 34 of file serverExample.cpp.

References BIAS::CS_FLOAT, BIAS::CS_INT, BIAS::CScommBase::GetData(), BIAS::CScommBase::RegisterMsg(), BIAS::CScommBase::SendMsg(), BIAS::CScommBase::SetVerbose(), and BIAS::CScommServer::WaitForConnections().

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Condensation.cpp File Reference

StateEstimator

Condensation.cpp File Reference

#include "Condensation.hh"
#include <float.h>
#include <Base/Common/W32Compat.hh>

Include dependency graph for Condensation.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Condensation.hh File Reference

StateEstimator

Condensation.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <vector>
#include "Base/Debug/Debug.hh"
#include "Base/Math/Random.hh"
#include "Base/Math/Vector.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Condensation.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Condensation
CONDENSATION (CONditional DENSity EstimATION) is a state estimator very similiar to the Kalman Filter, not only for Gaussian-, but also for any multi-modal distribution. More...

Defines

#define | D_COND_DEBUG 1<<3
#define | D_COND_ERROR 1<<4
#define | D_COND_INIT 1<<0
#define | D_COND_MEANVAR 1<<5
#define | D_COND_PROCESS 1<<1
#define | D_COND_WEIGHTS 1<<2

Define Documentation

#define D_COND_DEBUG 1<<3

Definition at line 43 of file Condensation.hh.

Referenced by BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SecondOrderARP_().

#define D_COND_ERROR 1<<4

Definition at line 44 of file Condensation.hh.

#define D_COND_INIT 1<<0

Definition at line 40 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::InitPrior().

#define D_COND_MEANVAR 1<<5

Definition at line 45 of file Condensation.hh.

Referenced by BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), and BIAS::Condensation::GetWeightedVariance().

#define D_COND_PROCESS 1<<1

Definition at line 41 of file Condensation.hh.

Referenced by BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::Process().

#define D_COND_WEIGHTS 1<<2

Definition at line 42 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), and BIAS::Condensation::PredictNewSamplePositions().

Generated on Wed Jun 21 19:05:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensHisto.cpp File Reference

StateEstimator

CondensHisto.cpp File Reference

#include "CondensHisto.hh"
#include "Base/Image/ImageDraw.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for CondensHisto.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensHisto.hh File Reference

StateEstimator

CondensHisto.hh File Reference

#include <bias_config.h>
#include <StateEstimator/Condensation.hh>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Image/ColorHistogram.hh>
#include <Image/IntegralHistogram.hh>

Include dependency graph for CondensHisto.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CondensHisto
class for tracking an object in an image More...

Defines

#define | D_COND_INT (1<<6)

Define Documentation

#define D_COND_INT (1<<6)

Definition at line 39 of file CondensHisto.hh.

Referenced by BIAS::CondensHisto::EvaluateFromIntegralHistoImage_().

Generated on Wed Jun 21 19:05:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensImg.cpp File Reference

StateEstimator

CondensImg.cpp File Reference

#include "CondensImg.hh"
#include "Base/Image/ImageDraw.hh"

Include dependency graph for CondensImg.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensImg.hh File Reference

StateEstimator

CondensImg.hh File Reference

#include "./Condensation.hh"
#include "Base/Image/Image.hh"
#include "Base/Math/Vector2.hh"

Include dependency graph for CondensImg.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::CondensImg
example class for condensation with a 2-dim state vector. More...

Generated on Wed Jun 21 19:05:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Kalman.cpp File Reference

StateEstimator

Kalman.cpp File Reference

#include <StateEstimator/Kalman.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for Kalman.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Kalman.hh File Reference

StateEstimator

Kalman.hh File Reference

#include <Base/Debug/Debug.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector.hh>
#include <MathAlgo/SVD.hh>

Include dependency graph for Kalman.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Kalman
Classical Kalman filter. More...

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/CondensHistoExample.cpp File Reference

StateEstimator » Examples

CondensHistoExample.cpp File Reference

#include "StateEstimator/CondensHisto.hh"
#include "Base/Image/ImageDraw.hh"
#include "Base/Image/ImageBase.hh"
#include "Base/Image/ImageIO.hh"
#include "Base/Image/ImageConvert.hh"
#include "Image/ColorHistogram.hh"
#include "Filter/Rescale.hh"
#include "math.h"

Include dependency graph for CondensHistoExample.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 38 of file CondensHistoExample.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::CondensHisto::DrawMean(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Condensation::Init(), BIAS::Image< StorageType >::Init(), BIAS::Condensation::InitPrior(), BIAS::CondensHisto::InitPriorPositions(), BIAS::Condensation::PredictNewSamplePositions(), BIAS::Condensation::Process(), BIAS::Image< StorageType >::Release(), res, BIAS::CondensHisto::SetActiveImage(), BIAS::CondensHisto::SetArea(), BIAS::ColorHistogram< StorageType >::SetBinSize(), BIAS::ImageBase::SetColorModel(), BIAS::Rescale< InputStorageType, OutputStorageType >::SetFactor(), BIAS::CondensHisto::SetMinWeight(), and BIAS::CondensHisto::SetReferenceHistogram().

Generated on Wed Jun 21 19:05:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/condensImgExample.cpp File Reference

StateEstimator » Examples

condensImgExample.cpp File Reference

#include "../CondensImg.hh"
#include "Base/Image/ImageDraw.hh"
#include "Base/Image/ImageIO.hh"

Include dependency graph for condensImgExample.cpp:

Go to the source code of this file.

Functions

int main ()
This example writes some images, which show the observations made for each time step and the position and weights of the samples.

Function Documentation

int main ( )

This example writes some images, which show the observations made for each time step and the position and weights of the samples.

The observations are such that on the left a real observation, where the random position of the Gauss on the right is like a false measurement.

Definition at line 42 of file condensImgExample.cpp.

References BIAS::CondensImg::DrawSamples(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Condensation::GetMean(), BIAS::Random::GetUniformDistributedInt(), BIAS::Condensation::Init(), BIAS::Image< StorageType >::Init(), BIAS::Condensation::InitPrior(), mean, BIAS::Condensation::PredictNewSamplePositions(), BIAS::Condensation::Process(), BIAS::CondensImg::SetArea(), BIAS::ImageBase::SetColorModel(), and BIAS::CondensImg::SetObservation().

Generated on Wed Jun 21 19:05:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ExampleKalman.cpp File Reference

StateEstimator » Examples

ExampleKalman.cpp File Reference

#include <Base/Math/Random.hh>
#include <StateEstimator/Kalman.hh>

Include dependency graph for ExampleKalman.cpp:

Go to the source code of this file.

Functions

void | GenerateNoisyMeasurements (const Vector< double > &state, const Matrix< double > &H, Vector< double > &meas, Matrix< double > &meas_cov)
computes noisy measuremenst using the ground truth system state
int | main (int, char **)
simple example for kalman filter usage
Vector< double > | Process (const Matrix< double > &A, const Vector< double > &state, const Matrix< double > &process_covariance)
computes the next ground truth system state

Variables

const double | meas_noise = 2.0
const double | process_noise = 1.0

Function Documentation

void GenerateNoisyMeasurements | ( | const Vector< double > & | state,
 |  | const Matrix< double > & | H,
 |  | Vector< double > & | meas,
 |  | Matrix< double > & | meas_cov
 | ) |

computes noisy measuremenst using the ground truth system state

Definition at line 51 of file ExampleKalman.cpp.

References BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), meas_noise, r, and BIAS::Vector< T >::Size().

Referenced by main().

int main | ( | int | ,
 |  | char ** |
 | ) |

simple example for kalman filter usage

Author:
woelk 04/2006

Definition at line 71 of file ExampleKalman.cpp.

References GenerateNoisyMeasurements(), BIAS::Kalman::GetCovariance(), BIAS::Random::GetNormalDistributed(), BIAS::Kalman::GetState(), BIAS::Random::GetUniformDistributed(), BIAS::Kalman::Init(), meas_noise, BIAS::Kalman::Predict(), Process(), process_noise, r, BIAS::Matrix< T >::SetZero(), and BIAS::Kalman::Update().

Vector<double> Process | ( | const Matrix< double > & | A,
 |  | const Vector< double > & | state,
 |  | const Matrix< double > & | process_covariance
 | ) |

computes the next ground truth system state

Definition at line 35 of file ExampleKalman.cpp.

References BIAS::Random::GetNormalDistributed(), res, and BIAS::Vector< T >::Size().

Referenced by main().

Variable Documentation

const double meas_noise = 2.0

Definition at line 31 of file ExampleKalman.cpp.

Referenced by GenerateNoisyMeasurements(), and main().

const double process_noise = 1.0

Definition at line 32 of file ExampleKalman.cpp.

Referenced by main().

Generated on Wed Jun 21 19:05:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/helloconfig.cpp File Reference

Tests

helloconfig.cpp File Reference

#include <iostream>
#include <bias_config.h>
#include <Base/Image/ImageBase.hh>

Include dependency graph for helloconfig.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 10 of file helloconfig.cpp.

References img.

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/MathBaseOperators.cpp File Reference

Tests

MathBaseOperators.cpp File Reference

#include <Base/Math/Vector.hh>
#include <Base/Math/Matrix.hh>
#include <Base/Math/Vector2.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/Matrix2x2.hh>
#include <Base/Math/Matrix3x3.hh>
#include <Base/Math/Matrix3x4.hh>
#include <Base/Math/Matrix4x4.hh>

Include dependency graph for MathBaseOperators.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 39 of file MathBaseOperators.cpp.

References BIAS::Matrix4x4< T >::SetIdentity().

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testDefines.cpp File Reference

Tests

testDefines.cpp File Reference

#include <bias_config.h>
#include <iostream>

Include dependency graph for testDefines.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 10 of file testDefines.cpp.

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testEnv.cpp File Reference

Tests

testEnv.cpp File Reference

#include <iostream>
#include <string>
#include <stdlib.h>
#include <unistd.h>

Include dependency graph for testEnv.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 15 of file testEnv.cpp.

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testError.cpp File Reference

Tests

testError.cpp File Reference

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 5 of file testError.cpp.

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testLeak.cpp File Reference

Tests

testLeak.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <iostream>

Include dependency graph for testLeak.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
void MyLeak1new ()
create a leak with new
void MyLeak2malloc ()
create a leak with malloc
void NoLeak1 ()
not leaking new
void NoLeak2 ()
not leaking malloc

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 66 of file testLeak.cpp.

References MyLeak1new(), MyLeak2malloc(), NoLeak1(), and NoLeak2().

void MyLeak1new ( )

create a leak with new

Definition at line 13 of file testLeak.cpp.

Referenced by main().

void MyLeak2malloc ( )

create a leak with malloc

Definition at line 23 of file testLeak.cpp.

Referenced by main().

void NoLeak1 ( )

not leaking new

Definition at line 34 of file testLeak.cpp.

Referenced by main().

void NoLeak2 ( )

not leaking malloc

Definition at line 50 of file testLeak.cpp.

Referenced by main().

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testWarn.cpp File Reference

Tests

testWarn.cpp File Reference

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 5 of file testWarn.cpp.

References a.

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasadd.cpp File Reference

Tools

biasadd.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <Base/Debug/Error.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <iostream>

Include dependency graph for biasadd.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 16 of file biasadd.cpp.

References BIASERR, and BIAS::ImageBase::SamePixelAndChannelCount().

Generated on Wed Jun 21 19:05:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasconvert.cpp File Reference

Tools

biasconvert.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageAttributes.hh>
#include <Geometry/PMatrix.hh>
#include <bias_config.h>
#include <stdio.h>
#include <getopt.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for biasconvert.cpp:

Go to the source code of this file.

Functions

void | AdoptPMatrix (PMatrix &P, float scalex, float scaley)
int | DetermineFiletype (const string &fn)
int | main (int argc, char *argv[])
int | ReadPMatrix (PMatrixBase &pmat, const string &filename)
void usage ()

Function Documentation

void AdoptPMatrix | ( | PMatrix & | P,
 |  | float | scalex,
 |  | float | scaley
 | ) |

Definition at line 82 of file biasconvert.cpp.

References BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetR(), K, and R.

int DetermineFiletype ( const string & fn )

Definition at line 75 of file biasconvert.cpp.

References BIAS::ImageIO::GetFileFormat().

Referenced by main().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 140 of file biasconvert.cpp.

References BIAS_DEFAULT_IMAGE_QUALITY, BIAS_IMAGEATTRIBUTES_SUCCESS, BIASERR, DetermineFiletype(), BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetFocalLengthYPixel(), getopt(), BIAS::ImageAttributes::GetPrincipalPoint(), BIAS::ImageAttributes::InitExifTags(), optarg, OutST, BIAS::ImageAttributes::Read(), BIAS::Matrix3x3< T >::SetIdentity(), and usage().

int ReadPMatrix | ( | PMatrixBase & | pmat,
 |  | const string & | filename
 | ) |

Definition at line 107 of file biasconvert.cpp.

References r.

void usage ( )

Definition at line 46 of file biasconvert.cpp.

Generated on Wed Jun 21 19:05:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasdetectunvignettewx.cpp File Reference

Tools

biasdetectunvignettewx.cpp File Reference

#include <wx/wx.h>
#include <wx/spinctrl.h>
#include <wx/dnd.h>
#include <wx/filename.h>
#include <wx/arrstr.h>
#include <string>
#include <sstream>
#include <Gui/StringConv.hh>
#include <Gui/ImageCanvas.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>
#include <Image/Camera.hh>
#include <Image/UnVignette.hh>

Include dependency graph for biasdetectunvignettewx.cpp:

Go to the source code of this file.

Classes

class | BiasDetectUnvignetteApp
class | DragAndDropTarget
drag and drop files onto application. More...
class | MainFrame

Defines

#define | FRAME_DEFAULT_SIZE wxSize(700,580)

Enumerations

enum {
ID_Load, ID_Exit, ID_About, ID_Timer,
ID_Steps, ID_UnVig, ID_WriteCameraData, ID_PPX,
ID_PPY
}

Define Documentation

#define FRAME_DEFAULT_SIZE wxSize(700,580)

Definition at line 18 of file biasdetectunvignettewx.cpp.

Referenced by BiasViewApp::OnInit(), and BiasDetectUnvignetteApp::OnInit().

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Load
ID_Exit
ID_About
ID_Timer
ID_Steps
ID_UnVig
ID_WriteCameraData
ID_PPX
ID_PPY

Definition at line 34 of file biasdetectunvignettewx.cpp.

Generated on Wed Jun 21 19:05:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasdiff.cpp File Reference

Tools

biasdiff.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include <Base/Image/ImageIO.hh>
#include "Base/Image/ImageConvert.hh"
#include "Utils/Param.hh"
#include <stdio.h>
#include <iostream>

Include dependency graph for biasdiff.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 20 of file biasdiff.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamInt(), BIAS::Param::DisableDestructorWarning(), BIAS::Param::GetParamBool(), param, BIAS::Param::ParseCommandLine(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:05:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasextract.cpp File Reference

Tools

biasextract.cpp File Reference

#include <Image/Camera.hh>
#include <Image/CameraParam.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageAttributes.hh>
#include <iostream>
#include <fstream>
#include <unistd.h>

Include dependency graph for biasextract.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
void usage ()

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 76 of file biasextract.cpp.

References getopt(), optarg, and usage().

void usage ( )

Definition at line 43 of file biasextract.cpp.

Generated on Wed Jun 21 19:05:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasfilter.cpp File Reference

Tools

biasfilter.cpp File Reference

#include <Base/Image/Image.hh>
#include <Filter/Mean.hh>
#include <Filter/Median.hh>
#include <Base/Image/ImageIO.hh>
#include <unistd.h>

Include dependency graph for biasfilter.cpp:

Go to the source code of this file.

Enumerations

enum | filtertype { none, mean, median }

Functions

int | main (int argc, char *argv[])
void usage ()

Enumeration Type Documentation

enum filtertype

Enumerator:
none
mean
median

Definition at line 41 of file biasfilter.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 59 of file biasfilter.cpp.

References getopt(), mean, median, none, optarg, and usage().

void usage ( )

Definition at line 44 of file biasfilter.cpp.

Generated on Wed Jun 21 19:05:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasinsert.cpp File Reference

Tools

biasinsert.cpp File Reference

#include <Base/Common/LeakChecking.h>
#include "Base/Image/ImageIO.hh"
#include "Base/Image/ImageConvert.hh"
#include "Filter/Rescale.hh"
#include "Utils/Param.hh"

Include dependency graph for biasinsert.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 17 of file biasinsert.cpp.

References BIAS::Param::AddParamInt(), BIAS::Param::DisableDestructorWarning(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Param::GetParamInt(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), img, BIAS::Image< StorageType >::Init(), BIAS::Param::ParseCommandLine(), BIAS::ImageBase::Paste2ROI(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetColorModel(), BIAS::Rescale< InputStorageType, OutputStorageType >::SetFactor(), BIAS::ImageBase::SetROI(), and BIAS::Param::Usage().

Generated on Wed Jun 21 19:05:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasmerge.cpp File Reference

Tools

biasmerge.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <stdio.h>
#include <map>
#include <string>
#include "Geometry/PMatrix.hh"
#include "Image/HomographyMapping.hh"
#include "Image/Camera.hh"

Include dependency graph for biasmerge.cpp:

Go to the source code of this file.

Functions

int | DetermineFiletype (const string &fn, ImageIO::TFileFormat &thetype)
int | main (int argc, char *argv[])
void usage ()

Function Documentation

int DetermineFiletype | ( | const string & | fn,
 |  | ImageIO::TFileFormat & | thetype
 | ) |

Definition at line 58 of file biasmerge.cpp.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 80 of file biasmerge.cpp.

References BIAS::PMatrix::LoadBBC(), param, BIAS::Matrix< T >::SetZero(), and usage().

void usage ( )

Definition at line 39 of file biasmerge.cpp.

Generated on Wed Jun 21 19:05:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasprojection.cpp File Reference

Tools

biasprojection.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>
#include <stdio.h>
#include <map>
#include <string>
#include "Geometry/PMatrix.hh"
#include "Image/Camera.hh"

Include dependency graph for biasprojection.cpp:

Go to the source code of this file.

Functions

int | DetermineFiletype (const string &fn, ImageIO::TFileFormat &thetype)
int | main (int argc, char *argv[])
void usage ()

Function Documentation

int DetermineFiletype | ( | const string & | fn,
 |  | ImageIO::TFileFormat & | thetype
 | ) |

Definition at line 58 of file biasprojection.cpp.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 80 of file biasprojection.cpp.

References param.

void usage ( )

Definition at line 42 of file biasprojection.cpp.

Generated on Wed Jun 21 19:05:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biassetprojection.cpp File Reference

Tools

biassetprojection.cpp File Reference

#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>
#include <stdio.h>

Include dependency graph for biassetprojection.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
void usage ()

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 48 of file biassetprojection.cpp.

References BIASERR, usage(), and BIAS::XMLBase::XMLRead().

void usage ( )

Definition at line 34 of file biassetprojection.cpp.

Generated on Wed Jun 21 19:05:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biassetuid.cpp File Reference

Tools

biassetuid.cpp File Reference

#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <stdio.h>

Include dependency graph for biassetuid.cpp:

Go to the source code of this file.

Functions

int | DetermineFiletype (const string &fn, ImageIO::TFileFormat &thetype)
int | main (int argc, char *argv[])
void usage ()

Function Documentation

int DetermineFiletype | ( | const string & | fn,
 |  | ImageIO::TFileFormat & | thetype
 | ) |

Definition at line 45 of file biassetuid.cpp.

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 68 of file biassetuid.cpp.

References BIASERR, DetermineFiletype(), BIAS::ImageBase::GetUID(), BIAS::UUID::IsValid(), and usage().

void usage ( )

Definition at line 34 of file biassetuid.cpp.

Generated on Wed Jun 21 19:05:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowepi.cpp File Reference

Tools

biasshowepi.cpp File Reference

#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
#include <stdio.h>
#include <string>
#include "Geometry/PMatrix.hh"
#include <Geometry/FMatrix.hh>
#include <Geometry/EpipolarLine.hh>
#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageDraw.hh>
#include <FeatureDetector/CornerDetectorHarris.hh>
#include <Utils/ThreeDOut.hh>
#include <Gui/GuiEnhanced.hh>

Include dependency graph for biasshowepi.cpp:

Go to the source code of this file.

Defines

#define | BIASOUT(theArg) cout<<theArg<<endl<<flush

Functions

int | main (int argc, char *argv[])
void usage ()

Define Documentation

#define BIASOUT ( theArg ) cout<<theArg<<endl<<flush

Definition at line 41 of file biasshowepi.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 66 of file biasshowepi.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamString(), BIAS::ThreeDOutParameters::CameraStyle, BIAS::Param::GetParamString(), BIAS::Matrix< T >::Load(), BIAS::Param::ParseCommandLine(), BIAS::PyramidMesh, and usage().

void usage ( )

Definition at line 46 of file biasshowepi.cpp.

Generated on Wed Jun 21 19:05:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowepiwx.cpp File Reference

Tools

biasshowepiwx.cpp File Reference

#include <Base/Common/W32Compat.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/Bresenham.hh>
#include <Gui/ConsoleRedirectIO.hh>
#include <Gui/ImageCanvas.hh>
#include <Gui/StringConv.hh>
#include <Gui/ProjectionGUI.hh>
#include <Image/Camera.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/FMatrix.hh>
#include <Geometry/EpipolarLine.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <wx/wx.h>
#include <wx/splitter.h>
#include <iostream>

Include dependency graph for biasshowepiwx.cpp:

Go to the source code of this file.

Classes

class | BiasShowEpiApp
class | CutoutFrame
class | MainFrame
class | PlainImageCanvas

Functions

void | ComputeCutoutImage (Image< unsigned char > &src, Image< unsigned char > &dst, int srcX, int srcY, int srcWidth, int srcHeight, int scale)

Variables

const int | CUTOUT_SIZE = 2 * HALF_CUTOUT_SIZE
const int | HALF_CUTOUT_SIZE = 30
const int | SCALE = 4

Function Documentation

void ComputeCutoutImage | ( | Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst,
 |  | int | srcX,
 |  | int | srcY,
 |  | int | srcWidth,
 |  | int | srcHeight,
 |  | int | scale
 | ) |

Definition at line 64 of file biasshowepiwx.cpp.

References BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by MainFrame::OnLeftDown().

Variable Documentation

const int CUTOUT_SIZE = 2 * HALF_CUTOUT_SIZE

Definition at line 55 of file biasshowepiwx.cpp.

Referenced by MainFrame::OnLeftDown().

const int HALF_CUTOUT_SIZE = 30

Definition at line 54 of file biasshowepiwx.cpp.

Referenced by MainFrame::OnLeftDown().

const int SCALE = 4

Definition at line 56 of file biasshowepiwx.cpp.

Referenced by MainFrame::OnLeftDown().

Generated on Wed Jun 21 19:05:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowsm.cpp File Reference

Tools

biasshowsm.cpp File Reference

#include <Utils/GenSynthMatches.hh>
#include <Gui/GuiEnhanced.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for biasshowsm.cpp:

Go to the source code of this file.

Defines

#define | SPEED_STEP 10000

Functions

void | help (char *name)
int | main (int argc, char *argv[])
void | usage (char *name)

Define Documentation

#define SPEED_STEP 10000

Definition at line 5 of file biasshowsm.cpp.

Function Documentation

void help ( char * name )

Definition at line 16 of file biasshowsm.cpp.

References usage().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 35 of file biasshowsm.cpp.

References BIAS::GuiGTK::DestroyWindow(), BIAS::GenSynthMatches::DrawNoisy(), BIAS::GenSynthMatches::DrawTrue(), BIAS::MatchDataBase::GetNumImages(), para, BIAS::MatchDataBase::Read(), BIAS::GenSynthMatches::Read(), and usage().

void usage ( char * name )

Definition at line 10 of file biasshowsm.cpp.

Generated on Wed Jun 21 19:05:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasview.cpp File Reference

Tools

biasview.cpp File Reference

#include <Base/Image/Image.hh>
#include <Gui/GuiEnhanced.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Image/Camera.hh>
#include <Image/Histogram.hh>
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
#include <Base/Debug/TimeMeasure.hh>
#include <bias_config.h>

Include dependency graph for biasview.cpp:

Go to the source code of this file.

Defines

#define | DEFAULT_FIXED_SCALE true
#define | FIXED_MAX 25.0
#define | FIXED_MIN 0.0
#define | SPEED_STEP 10000

Functions

int | main (int argc, char *argv[])
void PrintKeyCommands ()
void | Scale (ImageBase &src, Image< unsigned char > &dst)
void | ShiftAndMark (ImageBase &pic, int &shift, char **images, int nextfile)
void | showhistogram (ImageBase &img, GuiGTK &histgui)
void | usage (char *name)

Define Documentation

#define DEFAULT_FIXED_SCALE true

Definition at line 53 of file biasview.cpp.

#define FIXED_MAX 25.0

Definition at line 55 of file biasview.cpp.

#define FIXED_MIN 0.0

Definition at line 54 of file biasview.cpp.

#define SPEED_STEP 10000

Definition at line 49 of file biasview.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 239 of file biasview.cpp.

References done, BIAS::GuiGTK::InitGtk(), optarg, required_argument, and usage().

void PrintKeyCommands ( )

Definition at line 142 of file biasview.cpp.

void Scale | ( | ImageBase & | src,
 |  | Image< unsigned char > & | dst
 | ) |

Definition at line 91 of file biasview.cpp.

References BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetStorageType(), max, BIAS::Image< StorageType >::MaxSTValue(), min, BIAS::Image< StorageType >::MinSTValue(), and BIAS::Image< StorageType >::ScaleShiftBetween().

void ShiftAndMark | ( | ImageBase & | pic,
 |  | int & | shift,
 |  | char ** | images,
 |  | int | nextfile
 | ) |

Definition at line 165 of file biasview.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), p, and BIAS::ImageBase::StealImage().

void showhistogram | ( | ImageBase & | img,
 |  | GuiGTK & | histgui
 | ) |

Definition at line 73 of file biasview.cpp.

References BIAS::Histogram::AddHist(), BIASERR, BIAS::Histogram::Draw(), BIAS::HIST_BARS, BIAS::Histogram::InitHist(), BIAS::Histogram::SetColor(), BIAS::Histogram::SetDrawMode(), and BIAS::GuiBase::ShowImage().

void usage ( char * name )

Definition at line 58 of file biasview.cpp.

Generated on Wed Jun 21 19:05:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasviewwx.cpp File Reference

Tools

biasviewwx.cpp File Reference

#include <wx/wx.h>
#include <wx/spinctrl.h>
#include <wx/dnd.h>
#include <wx/filename.h>
#include <wx/arrstr.h>
#include <string>
#include <sstream>
#include <limits>
#include <Gui/ImageCanvas.hh>
#include <Gui/ConsoleRedirectIO.hh>
#include <Gui/StringConv.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Common/FileHandling.hh>
#include <Image/Camera.hh>

Include dependency graph for biasviewwx.cpp:

Go to the source code of this file.

Classes

class | BiasViewApp
class | DragAndDropTarget
drag and drop files onto application. More...
class | MainFrame

Defines

#define | FRAME_DEFAULT_SIZE wxSize(700,500)

Enumerations

enum {
ID_Load, ID_Info, ID_MetaData, ID_Exit,
ID_KeyInfo, ID_About, ID_Next, ID_Prev,
ID_RunStop, ID_Delay, ID_Fit, ID_Timer
}

Define Documentation

#define FRAME_DEFAULT_SIZE wxSize(700,500)

Todo:
implement command line switch to terminate biasviewwx automatically with useful return code for dart ADD_TEST to be able to test biasvviewwx run in nightly cmake Dart dashboard (JW)

Definition at line 26 of file biasviewwx.cpp.

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Load
ID_Info
ID_MetaData
ID_Exit
ID_KeyInfo
ID_About
ID_Next
ID_Prev
ID_RunStop
ID_Delay
ID_Fit
ID_Timer

Definition at line 44 of file biasviewwx.cpp.

Generated on Wed Jun 21 19:05:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/pmatrix2projection.cpp File Reference

Tools

pmatrix2projection.cpp File Reference

#include <iostream>
#include <vector>
#include <Geometry/PMatrix.hh>
#include <Geometry/Projection.hh>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <Utils/Param.hh>

Include dependency graph for pmatrix2projection.cpp:

Go to the source code of this file.

Functions

string | GetBaseName (const std::string &FileName)
int | main (int argc, char *argv[])
void | PtoPPP (Projection &proj, const string &file, unsigned int w, unsigned int h, bool overwriteIntrinsics)
void | usage (char *name)

Variables

Param | param (true)

Function Documentation

string GetBaseName ( const std::string & FileName )

Definition at line 49 of file pmatrix2projection.cpp.

Referenced by PtoPPP().

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Author:
bartczak

Definition at line 91 of file pmatrix2projection.cpp.

References BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), param, BIAS::Param::ParseCommandLine(), and usage().

void PtoPPP | ( | Projection & | proj,
 |  | const string & | file,
 |  | unsigned int | w,
 |  | unsigned int | h,
 |  | bool | overwriteIntrinsics
 | ) |

Definition at line 57 of file pmatrix2projection.cpp.

References BIASASSERT, GetBaseName(), BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::Projection::GetParameters(), BIAS::PMatrix::GetR(), BIAS::PMatrix::Load(), BIAS::ProjectionParametersBase::SetC(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersPerspective::SetK(), BIAS::ProjectionParametersBase::SetQ(), and BIAS::XMLBase::XMLWrite().

void usage ( char * name )

Definition at line 40 of file pmatrix2projection.cpp.

References param, and BIAS::Param::Usage().

Variable Documentation

Param param(true)

Referenced by main(), and usage().

Generated on Wed Jun 21 19:05:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ShowCamWx.cpp File Reference

Tools

ShowCamWx.cpp File Reference

#include <bias_config.h>
#include <Gui/ImageCanvas.hh>
#include <Gui/StringConv.hh>
#include <Image/Camera.hh>
#include <Image/StereoRedGreen.hh>
#include <VideoSource/VideoSource_Base.hh>
#include <VideoSource/VideoSource_Net.hh>
#include <VideoSource/VideoSource_Shm.hh>
#include <VideoSource/VideoSource_V4L.hh>
#include <VideoSource/VideoSource_DSHOW.hh>
#include <VideoSource/VideoSource_uEye.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <iostream>
#include <Base/Image/ImageIO.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <wx/wx.h>
#include <wx/listbox.h>

Include dependency graph for ShowCamWx.cpp:

Go to the source code of this file.

Classes

class | MyApp
class | MyFrame

Enumerations

enum wxIDs {
id_quit = 42, id_record, id_config, id_timer,
id_save, id_key, id_save2, id_pin
}

Functions

void Usage ()

Variables

bool | bSaveImages_
bool | bShowStereo_ = false
int | delay_ = 20
int | dSaveCounter_
ofstream | logstr

Enumeration Type Documentation

enum wxIDs

Enumerator:
id_quit
id_record
id_config
id_timer
id_save
id_key
id_save2
id_pin

Definition at line 40 of file ShowCamWx.cpp.

Function Documentation

void Usage ( )

Definition at line 290 of file ShowCamWx.cpp.

References usage().

Variable Documentation

bool bSaveImages_

Definition at line 47 of file ShowCamWx.cpp.

Referenced by MyFrame::OnGrabContinuous(), and MyFrame::OnKey().

bool bShowStereo_ = false

Definition at line 48 of file ShowCamWx.cpp.

int delay_ = 20

Definition at line 45 of file ShowCamWx.cpp.

int dSaveCounter_

Definition at line 46 of file ShowCamWx.cpp.

ofstream logstr

Definition at line 43 of file ShowCamWx.cpp.

Generated on Wed Jun 21 19:05:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/timeit.cpp File Reference

Tools

timeit.cpp File Reference

#include <stdlib.h>
#include <iostream>
#include <string>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for timeit.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 17 of file timeit.cpp.

References BIAS::TimeMeasure::Print(), BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and system.

Generated on Wed Jun 21 19:05:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenGroundTruth.cpp File Reference

Utils

GenGroundTruth.cpp File Reference

#include "GenGroundTruth.hh"
#include <Base/Debug/Debug.hh>
#include <Base/Math/Random.hh>
#include <Geometry/RMatrix.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/HomgLine2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Image/ImageDraw.hh>

Include dependency graph for GenGroundTruth.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenGroundTruth.hh File Reference

Utils

GenGroundTruth.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Geometry/PMatrix.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Image/Image.hh>
#include <vector>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for GenGroundTruth.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GenGroundTruth

Generated on Wed Jun 21 19:05:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenSynthMatches.cpp File Reference

Utils

GenSynthMatches.cpp File Reference

#include "GenSynthMatches.hh"
#include <Base/Image/ImageDraw.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for GenSynthMatches.cpp:

Go to the source code of this file.

Functions

ostream & BIAS::operator<< (ostream &os, const GenSynthMatches &m)

Generated on Wed Jun 21 19:05:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenSynthMatches.hh File Reference

Utils

GenSynthMatches.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <iostream>
#include <string>
#include <vector>
#include <Base/Image/Image.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Geometry/FMatrixBase.hh>
#include <Base/Geometry/EuclideanTransf3D.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <Base/Geometry/PMatrixBase.hh>
#include <Utils/Param.hh>
#include <Base/Math/Random.hh>
#include "MatchDataBase.hh"
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for GenSynthMatches.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::GenSynthMatches
class for generating synthetic matches More...

Defines

#define | GSM_2D_MATCHES 0x00080000
#define | GSM_3D_POINTS 0x00040000
#define | GSM_CAM_MOTION 0x00010000
#define | GSM_FMATRIX 0x00400000
#define | GSM_MOVIN_3D_POINTS 0x00200000
#define | GSM_MOVIN_TRANSF 0x00100000
#define | GSM_NOISE 0x00800000
#define | GSM_VIEWINGVOL 0x00020000

Functions

BIASUtils_EXPORT std::ostream & | BIAS::operator<< (std::ostream &os, const GenSynthMatches &m)

Define Documentation

#define GSM_2D_MATCHES 0x00080000

Definition at line 54 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), and BIAS::GenSynthMatches::_CreateStatic2DPoints().

#define GSM_3D_POINTS 0x00040000

Definition at line 53 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_CreateMoving3DPoints(), and BIAS::GenSynthMatches::_CreateStatic3DPoints().

#define GSM_CAM_MOTION 0x00010000

Definition at line 51 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_CreateCamMovement().

#define GSM_FMATRIX 0x00400000

Definition at line 57 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::GetGTNormalizedF().

#define GSM_MOVIN_3D_POINTS 0x00200000

Definition at line 56 of file GenSynthMatches.hh.

#define GSM_MOVIN_TRANSF 0x00100000

Definition at line 55 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_CreateMovingTransforms(), and main().

#define GSM_NOISE 0x00800000

Definition at line 58 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), and BIAS::GenSynthMatches::_CreateStatic2DPoints().

#define GSM_VIEWINGVOL 0x00020000

Definition at line 52 of file GenSynthMatches.hh.

Referenced by BIAS::GenSynthMatches::_CreateStatic3DPoints().

Generated on Wed Jun 21 19:05:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/MatchDataBase.cpp File Reference

Utils

MatchDataBase.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include "MatchDataBase.hh"
#include <fstream>

Include dependency graph for MatchDataBase.cpp:

Go to the source code of this file.

Functions

ostream & | BIAS::operator<< (ostream &os, const MatchDataBase &m)
istream & | BIAS::operator>> (istream &is, MatchDataBase &m)

Generated on Wed Jun 21 19:05:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/MatchDataBase.hh File Reference

Utils

MatchDataBase.hh File Reference

#include <bias_config.h>
#include <Base/Debug/Debug.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Base/Geometry/RMatrixBase.hh>
#include <Base/Geometry/PMatrixBase.hh>
#include <Utils/Param.hh>

Include dependency graph for MatchDataBase.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MatchDataBase
class for representing matches, used in GenSynthMatches and biasshowsm More...

Defines

#define | D_MD_IO 0x00000001

Functions

BIASUtils_EXPORT std::ostream & | BIAS::operator<< (std::ostream &os, const MatchDataBase &m)
BIASUtils_EXPORT std::istream & | BIAS::operator>> (std::istream &is, MatchDataBase &m)

Define Documentation

#define D_MD_IO 0x00000001

Definition at line 38 of file MatchDataBase.hh.

Generated on Wed Jun 21 19:05:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Param.cpp File Reference

Utils

Param.cpp File Reference

#include <Base/Common/BIASpragma.hh>
#include <stdlib.h>
#include <getopt.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <time.h>
#include <algorithm>
#include "Param.hh"
#include "ParamTypes.hh"
#include <sys/types.h>
#include <sys/stat.h>
#include <locale.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Param.cpp:

Go to the source code of this file.

Defines

#define READPARAM_CHECKDUPES

Typedefs

typedef map< const std::string,
BIAS::ParamTypeBase
* >::const_iterator 		CI

Define Documentation

#define READPARAM_CHECKDUPES

Definition at line 1152 of file Param.cpp.

Typedef Documentation

typedef map<const std::string,BIAS::ParamTypeBase*>::const_iterator CI

Definition at line 57 of file Param.cpp.

Generated on Wed Jun 21 19:05:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Param.hh File Reference

Utils

Param.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include "bias_config.h"
#include "ParamTypes.hh"
#include <stdlib.h>
#include <string>
#include <vector>
#include <float.h>
#include <map>
#include <getopt.h>
#include <Base/Debug/Error.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Math/Vector.hh>
#include <Base/Common/XMLIO.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for Param.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Param
This class Param provides generic support for parameters. More...
class | BIAS::ParamCallbackInterface
This class provides an interface to be called if parameter changes occured. More...

Defines

#define | D_PARAM_ALL 0xffffffff
#define | D_PARAM_CONF_FILE 1<<3
#define | D_PARAM_GET 1<<2
#define | D_PARAM_IO 1<<0
#define | D_PARAM_PARSECMDL 1<<1
#define | GRP_ALL -2
#define | GRP_NOSHOW -1

Define Documentation

#define D_PARAM_ALL 0xffffffff

Definition at line 56 of file Param.hh.

#define D_PARAM_CONF_FILE 1<<3

Definition at line 60 of file Param.hh.

Referenced by BIAS::Param::ParseCommandLine(), and BIAS::Param::UpdateParameter().

#define D_PARAM_GET 1<<2

Definition at line 59 of file Param.hh.

#define D_PARAM_IO 1<<0

Definition at line 57 of file Param.hh.

#define D_PARAM_PARSECMDL 1<<1

Definition at line 58 of file Param.hh.

Referenced by BIAS::Param::ParseCommandLine().

#define GRP_ALL -2

Definition at line 62 of file Param.hh.

Referenced by BIAS::Param::GetGroupName(), main(), and BIAS::Param::ShowData().

#define GRP_NOSHOW -1

Definition at line 63 of file Param.hh.

Referenced by BIAS::Param::GetGroupName(), and BIAS::ParamGUI::GetNotebook().

Generated on Wed Jun 21 19:05:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ParamTypes.cpp File Reference

Utils

ParamTypes.cpp File Reference

#include "ParamTypes.hh"
#include "Param.hh"
#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ParamTypes.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ParamTypes.hh File Reference

Utils

ParamTypes.hh File Reference

#include <Base/Common/BIASpragmaStart.hh>
#include <Base/Debug/Error.hh>
#include <Base/Math/Vector.hh>
#include <string>
#include <sstream>
#include <map>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for ParamTypes.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::ParamTypeBase
class | BIAS::ParamTypeBool
class | BIAS::ParamTypeDouble
class | BIAS::ParamTypeEnum
class | BIAS::ParamTypeInt
class | BIAS::ParamTypeString
class | BIAS::ParamTypeVecDbl
class | BIAS::ParamTypeVecInt

Variables

BIASUtils_EXPORT | BIAS::ParamCallbackInterface

Generated on Wed Jun 21 19:05:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/PMatrix3DData.cpp File Reference

Utils

PMatrix3DData.cpp File Reference

#include "PMatrix3DData.hh"

Include dependency graph for PMatrix3DData.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/PMatrix3DData.hh File Reference

Utils

PMatrix3DData.hh File Reference

#include <bias_config.h>
#include <string>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/RGBA.hh>

Include dependency graph for PMatrix3DData.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::PMatrix3DData
stores important data for drawing a camera More...

Generated on Wed Jun 21 19:05:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/StatekeeperGL.hh File Reference

Utils

StatekeeperGL.hh File Reference

#include <bias_config.h>
#include <Gui/biasgl.h>

Include dependency graph for StatekeeperGL.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::StatekeeperGL
push and pop GL states on constructor/destructor Helper class pop(save) OpenGL states on construction and push them on destruction automatically. More...

Generated on Wed Jun 21 19:05:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ThreeDOut.cpp File Reference

Utils

ThreeDOut.cpp File Reference

#include "ThreeDOut.hh"
#include <Geometry/RMatrix.hh>
#include <ctype.h>
#include <Base/Image/ImageIO.hh>
#include <Gui/biasgl.h>
#include <GL/glu.h>
#include <Utils/StatekeeperGL.hh>

Include dependency graph for ThreeDOut.cpp:

Go to the source code of this file.

Defines

#define | ASSERT_MAP_ELEMENT(themap, key)
#define | DEGREE_PER_RAD (180.0/M_PI)

Functions

void | CoordinateSystem (ostream &VRMLFile, float selectionRadius, float r, float g, float b)

Define Documentation

#define ASSERT_MAP_ELEMENT | ( | themap,
 |  | key | )

Value:

if (themap.find(key)==themap.end()) { \
  BIASERR("Tried to access map with key " \
  <<key<<". Undefined Element." \
  <<" Aborting."); BIASABORT; }

Definition at line 41 of file ThreeDOut.cpp.

Referenced by BIAS::ThreeDOut::RemoveEllipsoid(), BIAS::ThreeDOut::RemoveImage(), BIAS::ThreeDOut::RemoveLine(), BIAS::ThreeDOut::RemovePoint(), BIAS::ThreeDOut::UpdateEllipsoid(), BIAS::ThreeDOut::UpdateLine(), and BIAS::ThreeDOut::UpdatePoint().

#define DEGREE_PER_RAD (180.0/M_PI)

Definition at line 46 of file ThreeDOut.cpp.

Referenced by BIAS::ThreeDOut::OpenGLOutEllipsoids().

Function Documentation

void CoordinateSystem | ( | ostream & | VRMLFile,
 |  | float | selectionRadius,
 |  | float | r,
 |  | float | g,
 |  | float | b
 | ) |

Definition at line 1498 of file ThreeDOut.cpp.

Generated on Wed Jun 21 19:05:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ThreeDOut.hh File Reference

Utils

ThreeDOut.hh File Reference

#include <bias_config.h>
#include <list>
#include <vector>
#include <map>
#include <Base/Debug/Debug.hh>
#include <Base/Image/Image.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Math/Vector4.hh>
#include <Base/Math/RGBA.hh>
#include <Base/Geometry/HomgPlane3D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/Quadric3D.hh>
#include <Geometry/CovMatrix3x3.hh>
#include <Utils/PMatrix3DData.hh>
#include <Utils/TriangleMesh.hh>
#include <Geometry/Projection.hh>
#include <Base/Geometry/PoseParametrization.hh>

Include dependency graph for ThreeDOut.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::Ellipsoid3DData
stores important data for drawing an ellipsoid More...
class | BIAS::Image3DData
stores datas for a textured plane More...
class | BIAS::IndexedFaceSet
stores data for drawing a indexed face set. More...
class | BIAS::Line3DData
stores data for drawing a line More...
class | BIAS::Point3DData
stores data for drawing a point More...
class | BIAS::Projection3DData
class Projection3DData stores data for drawing a the extrinisc paramters of a projection. More...
class | BIAS::ThreeDOut
unified output of 3D entities via OpenGL or VRML More...
struct | BIAS::ThreeDOutParameters
configuration struct for drawing styles of various 3d objects More...

Defines

#define | ALPHA_OPAQUE 255
#define | ALPHA_TRANSPARENT 0
#define | BIAS_SELECTION_OFFSET_PMATRIX 200000
entity index offsets for selection rendering/picking.
#define | D_3DOUT_PDECOMP 0x00001000
#define | DEF_P_SCALE 1.0
use one sigma as the standard confidence region for ellipsoid surfaces if you want to supply a probability, see defines in Quadric3D.hh

Enumerations

enum | BIAS::CameraDrawingStyle { BIAS::PyramidMesh, BIAS::PyramidSolid, BIAS::Arrow, BIAS::PyramidMeshWithArrow }
different styles when drawing cameras, e.g. More...
enum | BIAS::LineDrawingStyle { BIAS::Solid, BIAS::Dashed }
enum | BIAS::PointDrawingStyle { BIAS::Point, BIAS::PointSprite, BIAS::Sphere, BIAS::Box }
different styles when drawing lines, e.g. More...

Define Documentation

#define ALPHA_OPAQUE 255

Definition at line 59 of file ThreeDOut.hh.

#define ALPHA_TRANSPARENT 0

Definition at line 58 of file ThreeDOut.hh.

#define BIAS_SELECTION_OFFSET_PMATRIX 200000

entity index offsets for selection rendering/picking.

(OpenGL GL_SELECT) Each entity index is mapped to an int using a entity specific offset Thus the nr. of entites is currently limited to 100.000 ! Assert unique indexing, ranges must not overlap.

Author:
Jan Woetzel

Definition at line 68 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::OpenGLOutPMatrices_().

#define D_3DOUT_PDECOMP 0x00001000

Definition at line 77 of file ThreeDOut.hh.

#define DEF_P_SCALE 1.0

use one sigma as the standard confidence region for ellipsoid surfaces if you want to supply a probability, see defines in Quadric3D.hh

Definition at line 55 of file ThreeDOut.hh.

Generated on Wed Jun 21 19:05:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/TriangleMesh.cpp File Reference

Utils

TriangleMesh.cpp File Reference

#include <Utils/TriangleMesh.hh>
#include <Base/Math/Vector.hh>
#include <Geometry/RMatrix.hh>

Include dependency graph for TriangleMesh.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/TriangleMesh.hh File Reference

Utils

TriangleMesh.hh File Reference

#include <vector>
#include <Base/Image/Image.hh>
#include <Geometry/PMatrix.hh>

Include dependency graph for TriangleMesh.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::TriangleMesh
create and represent a 3D triangle mesh More...

Generated on Wed Jun 21 19:05:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGenSynthMatches.cpp File Reference

Utils » Examples

ExampleGenSynthMatches.cpp File Reference

#include <iostream>
#include <Base/Common/BIASpragma.hh>
#include <Utils/GenSynthMatches.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for ExampleGenSynthMatches.cpp:

Go to the source code of this file.

Defines

#define | DEBUG true
#define | DEFAULT_PARA_FILE_NAME "GenSynthMatches.ini"

Functions

int | main (int argc, char *argv[])

Define Documentation

#define DEBUG true

Definition at line 13 of file ExampleGenSynthMatches.cpp.

#define DEFAULT_PARA_FILE_NAME "GenSynthMatches.ini"

Definition at line 12 of file ExampleGenSynthMatches.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 15 of file ExampleGenSynthMatches.cpp.

References BIASERR, DEBUG, DEFAULT_PARA_FILE_NAME, BIAS::GenSynthMatches::DrawNoisy(), BIAS::GenSynthMatches::DrawTrue(), BIAS::Param::GetParamString(), GSM_MOVIN_TRANSF, para, BIAS::Param::ParseCommandLine(), BIAS::GenSynthMatches::Read(), BIAS::Param::ReadParameter(), BIAS::Param::SetWriteOptions(), and BIAS::Param::WriteParameter().

Generated on Wed Jun 21 19:05:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGGTCube.cpp File Reference

Utils » Examples

ExampleGGTCube.cpp File Reference

#include <iostream>
#include "../GenGroundTruth.hh"
#include "../../Base/Geometry/HomgPoint3D.hh"

Include dependency graph for ExampleGGTCube.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 33 of file ExampleGGTCube.cpp.

Generated on Wed Jun 21 19:05:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGGTPlane.cpp File Reference

Utils » Examples

ExampleGGTPlane.cpp File Reference

#include <iostream>
#include "../GenGroundTruth.hh"
#include "../../Base/Geometry/HomgPoint3D.hh"

Include dependency graph for ExampleGGTPlane.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 33 of file ExampleGGTPlane.cpp.

Generated on Wed Jun 21 19:05:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleMatchDataBase.cpp File Reference

Utils » Examples

ExampleMatchDataBase.cpp File Reference

#include <Utils/MatchDataBase.hh>
#include <Utils/GenSynthMatches.hh>
#include <Base/Common/BIASpragma.hh>
#include <iostream>

Include dependency graph for ExampleMatchDataBase.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 10 of file ExampleMatchDataBase.cpp.

References BIAS::GenSynthMatches::CreateMatches(), BIAS::MatchDataBase::GetC(), BIAS::MatchDataBase::GetK(), BIAS::MatchDataBase::GetNormalizedPoints(), BIAS::MatchDataBase::GetPoints(), BIAS::MatchDataBase::GetR(), K, p, para, R, BIAS::MatchDataBase::SetNormalizedData(), and BIAS::GenSynthMatches::Write().

Generated on Wed Jun 21 19:05:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleShowFreeD.cpp File Reference

Utils » Examples

ExampleShowFreeD.cpp File Reference

#include "Utils/ThreeDOut.hh"

Include dependency graph for ExampleShowFreeD.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 30 of file ExampleShowFreeD.cpp.

References BIAS::ThreeDOut::AddPMatrix(), BIASERR, BIAS::ThreeDOutParameters::CameraStyle, p, BIAS::PyramidSolid, and T.

Generated on Wed Jun 21 19:05:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleTFT.cpp File Reference

Utils » Examples

ExampleTFT.cpp File Reference

#include <iostream>
#include <Utils/GenSynthMatches.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Geometry/TrifocalTensorBase.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleTFT.cpp:

Go to the source code of this file.

Defines

#define | DEBUG true
#define | DEFAULT_PARA_FILE_NAME "TFT.ini"

Functions

int | main (int argc, char *argv[])

Define Documentation

#define DEBUG true

Definition at line 13 of file ExampleTFT.cpp.

#define DEFAULT_PARA_FILE_NAME "TFT.ini"

Definition at line 12 of file ExampleTFT.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 15 of file ExampleTFT.cpp.

References BIASASSERT, BIASERR, DEBUG, DEFAULT_PARA_FILE_NAME, BIAS::Param::GetParamInt(), BIAS::Param::GetParamString(), para, BIAS::Param::ParseCommandLine(), BIAS::Param::ReadParameter(), BIAS::Param::SetWriteOptions(), and BIAS::Param::WriteParameter().

Generated on Wed Jun 21 19:05:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleThreeDOutVRML.cpp File Reference

Utils » Examples

ExampleThreeDOutVRML.cpp File Reference

#include "Utils/ThreeDOut.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for ExampleThreeDOutVRML.cpp:

Go to the source code of this file.

Defines

#define | IMSIZE 3

Functions

int | main ()

Define Documentation

#define IMSIZE 3

Referenced by main().

Function Documentation

int main ( )

Definition at line 33 of file ExampleThreeDOutVRML.cpp.

References BIAS::ThreeDOut::AddImage(), BIAS::Box, BIAS::ThreeDOutParameters::CameraStyle, BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids, BIAS::ThreeDOut::Dump(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), IMSIZE, BIAS::ThreeDOutParameters::LineStyle, param, BIAS::ThreeDOutParameters::PointSize, BIAS::ThreeDOutParameters::PointStyle, BIAS::PyramidSolid, BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Solid, T, and BIAS::ThreeDOut::VRMLOut().

Generated on Wed Jun 21 19:05:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleTriangleMesh.cpp File Reference

Utils » Examples

ExampleTriangleMesh.cpp File Reference

#include <Utils/TriangleMesh.hh>
#include <Utils/ThreeDOut.hh>
#include <Base/Image/ImageIO.hh>
#include <iostream>

Include dependency graph for ExampleTriangleMesh.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])
void | usage (char *name)

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 16 of file ExampleTriangleMesh.cpp.

References usage().

void usage ( char * name )

Definition at line 10 of file ExampleTriangleMesh.cpp.

Generated on Wed Jun 21 19:05:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleVRMLOutProjection.cpp File Reference

Utils » Examples

ExampleVRMLOutProjection.cpp File Reference

#include <Utils/ThreeDOut.hh>
#include <Geometry/Projection.hh>
#include <iostream>

Include dependency graph for ExampleVRMLOutProjection.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 8 of file ExampleVRMLOutProjection.cpp.

Generated on Wed Jun 21 19:05:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ParamExample.cpp File Reference

Utils » Examples

ParamExample.cpp File Reference

#include <iostream>
#include <Utils/Param.hh>
#include <Base/Math/Vector.hh>

Include dependency graph for ParamExample.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 45 of file ParamExample.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamEnum(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::AddParamVecDbl(), BIAS::Param::AddParamVecInt(), p, BIAS::Param::ParseCommandLine(), and BIAS::Param::ShowData().

Generated on Wed Jun 21 19:05:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/MDcam.cpp File Reference

VideoSource

MDcam.cpp File Reference

#include <sys/io.h>
#include <unistd.h>
#include <fstream>
#include "MDcam.hh"

Include dependency graph for MDcam.cpp:

Go to the source code of this file.

Functions

int GetCamIDs (int busid, int &ncams, int *&camids)

Function Documentation

int GetCamIDs | ( | int | busid,
 |  | int & | ncams,
 |  | int *& | camids
 | ) |

Definition at line 42 of file VideoSource_DCAM.cpp.

Referenced by BIAS::MDcam::ScanBus().

Generated on Wed Jun 21 19:05:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/MDcam.hh File Reference

VideoSource

MDcam.hh File Reference

#include <bias_config.h>
#include <string>
#include <VideoSource/VideoSource_Base.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Debug/Error.hh>

Include dependency graph for MDcam.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MDcam
VideoG MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster. More...

Defines

#define | D_MDCAM_GRAB (1<<2)
#define | D_MDCAM_INIT (1<<0)

Define Documentation

#define D_MDCAM_GRAB (1<<2)

Definition at line 46 of file MDcam.hh.

#define D_MDCAM_INIT (1<<0)

Definition at line 45 of file MDcam.hh.

Referenced by main(), and BIAS::MDcam::ScanBus().

Generated on Wed Jun 21 19:05:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ueyeclass.cpp File Reference

VideoSource

ueyeclass.cpp File Reference

#include "ueyeclass.hh"

Include dependency graph for ueyeclass.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:05:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ueyeclass.hh File Reference

VideoSource

ueyeclass.hh File Reference

#include <uEye.h>

Include dependency graph for ueyeclass.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | CuEye

Defines

#define | AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_

Define Documentation

#define AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_

Definition at line 6 of file ueyeclass.hh.

Generated on Wed Jun 21 19:05:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoServer.cpp File Reference

VideoSource

VideoServer.cpp File Reference

#include "VideoServer.hh"
#include <VideoSource/VideoSource_Disk.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <VideoSource/VideoSource_V4L.hh>

Include dependency graph for VideoServer.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoServer.hh File Reference

VideoSource

VideoServer.hh File Reference

#include <iostream>
#include <sstream>
#include <string>
#include <bias_config.h>
#include <Utils/Param.hh>
#include <Base/Debug/Debug.hh>
#include <Base/Image/ImageIO.hh>
#include <Filter/Rescale.hh>
#include <Image/Camera.hh>
#include <VideoSource/VideoSource_Base.hh>
#include <NetworkComm/CScommServer.hh>
#include <Image/CompressJpeg.hh>
#include <Base/Image/ImageConvert.hh>

Include dependency graph for VideoServer.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoServer
class to send images from a camera or disk to a client More...

Generated on Wed Jun 21 19:06:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoShMFeeder.cpp File Reference

VideoSource

VideoShMFeeder.cpp File Reference

#include "VideoShMFeeder.hh"
#include <Base/Common/BIASpragma.hh>

Include dependency graph for VideoShMFeeder.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoShMFeeder.hh File Reference

VideoSource

VideoShMFeeder.hh File Reference

#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sstream>
#include <string>
#include <Base/Debug/Debug.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>
#include <VideoSource/VideoSource_Shm.hh>

Include dependency graph for VideoShMFeeder.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoShMFeeder
class to save Images to a Sharerd memory More...

Generated on Wed Jun 21 19:06:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Base.cpp File Reference

VideoSource

VideoSource_Base.cpp File Reference

#include <bias_config.h>
#include "VideoSource_Base.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <Image/VideoStream.hh>
#include <Image/Camera.hh>
#include <Base/Common/BIASpragma.hh>
#include <fcntl.h>

Include dependency graph for VideoSource_Base.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Base.hh File Reference

VideoSource

VideoSource_Base.hh File Reference

#include <bias_config.h>
#include <vector>
#include <Base/Image/Image.hh>
#include <Image/VideoStream.hh>

Include dependency graph for VideoSource_Base.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource
Defines a common interface to different devices. More...

Defines

#define | D_DCAM (1<<1)
#define | D_DCAM_F7 (1<<3)
#define | D_DTD (1<<9)
#define | D_DV (1<<4)
#define | D_DV2 (1<<8)
#define | D_NET (1<<6)
#define | D_V4L (1<<0)
#define | D_VS_WHITEB (1<<5)
#define | D_VSO_DISK (1<<2)

Define Documentation

#define D_DCAM (1<<1)

Definition at line 38 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_DCAM::GrabSingle(), main(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource_DCAM::QueryCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::SetCamera(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_DCAM::~VideoSource_DCAM().

#define D_DCAM_F7 (1<<3)

Definition at line 40 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), main(), BIAS::VideoSource_DCAM::QueryCam(), BIAS::VideoSource_DCAM::SetLeftTop(), and BIAS::VideoSource_DCAM::UserSizeToFormat7_().

#define D_DTD (1<<9)

Definition at line 45 of file VideoSource_Base.hh.

Referenced by main(), and BIAS::VideoSource::SetDirectToDisk().

#define D_DV (1<<4)

Definition at line 41 of file VideoSource_Base.hh.

Referenced by main(), MIP::VideoSource_DV::PostGrab(), MIP::VideoSource_DV::PreGrab(), MIP::VideoSource_DV::VideoSource_DV_Internal_Init_(), and MIP::VideoSource_DV::~VideoSource_DV().

#define D_DV2 (1<<8)

Definition at line 44 of file VideoSource_Base.hh.

Referenced by MIP::VideoSource_DV2::GrabSingle(), and MIP::VideoSource_DV2::VideoSource_DV2().

#define D_NET (1<<6)

Definition at line 43 of file VideoSource_Base.hh.

Referenced by main().

#define D_V4L (1<<0)

Definition at line 37 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), and BIAS::VideoSource_V4L::OpenDevice().

#define D_VS_WHITEB (1<<5)

Definition at line 42 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

#define D_VSO_DISK (1<<2)

Definition at line 39 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DiskPMD::GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), and main().

Generated on Wed Jun 21 19:06:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM.cpp File Reference

VideoSource

VideoSource_DCAM.cpp File Reference

#include <libdc1394/dc1394_control.h>
#include "VideoSource_DCAM.hh"
#include "sys/time.h"
#include "unistd.h"
#include <sys/stat.h>

Include dependency graph for VideoSource_DCAM.cpp:

Go to the source code of this file.

Defines

#define | USE_NATIVE_XGA

Functions

int | GetCamIDs (int busid, int &ncams, int *&camids)
support function to get the number of cameras and IDs of all cameras on one bus

Define Documentation

#define USE_NATIVE_XGA

Definition at line 761 of file VideoSource_DCAM.cpp.

Function Documentation

int GetCamIDs | ( | int | busid,
 |  | int & | ncams,
 |  | int *& | camids
 | ) |

support function to get the number of cameras and IDs of all cameras on one bus

Definition at line 42 of file VideoSource_DCAM.cpp.

References res.

Generated on Wed Jun 21 19:06:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM.hh File Reference

VideoSource

VideoSource_DCAM.hh File Reference

#include <bias_config.h>
#include <Base/Common/W32Compat.hh>
#include <sys/time.h>
#include <Image/Camera.hh>
#include <libdc1394/dc1394_control.h>
#include <VideoSource/VideoSource_Base.hh>

Include dependency graph for VideoSource_DCAM.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

struct | CameraParameter_s
class | BIAS::VideoSource_DCAM
This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll. More...

Defines

#define | MAX_1394_CARDS 2
#define | MAX_1394_CHANNELS 256
#define | MAX_1394_SOURCES 16
#define | MAX_DMABUFFERS 10

Typedefs

typedef CameraParameter_s | CameraParameterSet

Enumerations

enum BIAS::CameraModel {
BIAS::CAMERA_SONY_DFW_X700 = 0, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES,
BIAS::CAMERA_PTGREY_DRAGONFLY_BW, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, BIAS::CAMERA_SONY_EVID31, BIAS::CAMERA_SONY_DV,
BIAS::CAMERA_UNKNOWN
}
enum BIAS::LensModel {
BIAS::LENS_SONY_EVID31_BUILTIN, BIAS::LENS_SONY_DV_BUILTIN, BIAS::LENS_PENTAX_CMOUNT_4_8, BIAS::LENS_PENTAX_CMOUNT_8_0,
BIAS::LENS_PENTAX_CMOUNT_4_2, BIAS::LENS_UNKNOWN
}

Functions

int | GetCamIDs (int busid, int &ncams, int *&camids)
support function to get the number of cameras and IDs of all cameras on one bus

Define Documentation

#define MAX_1394_CARDS 2

Definition at line 66 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::VideoSource_DCAM(), and MIP::VideoSource_DV::VideoSource_DV_Internal_Init_().

#define MAX_1394_CHANNELS 256

Definition at line 73 of file VideoSource_DCAM.hh.

Referenced by MIP::VideoSource_DV::VideoSource_DV_Internal_Init_().

#define MAX_1394_SOURCES 16

Definition at line 70 of file VideoSource_DCAM.hh.

#define MAX_DMABUFFERS 10

Definition at line 76 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam().

Typedef Documentation

typedef struct CameraParameter_s CameraParameterSet

Function Documentation

int GetCamIDs | ( | int | busid,
 |  | int & | ncams,
 |  | int *& | camids
 | ) |

support function to get the number of cameras and IDs of all cameras on one bus

Definition at line 42 of file VideoSource_DCAM.cpp.

References res.

Generated on Wed Jun 21 19:06:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM_CMU.cpp File Reference

VideoSource

VideoSource_DCAM_CMU.cpp File Reference

#include <wtypes.h>
#include <1394Camera.h>
#include "VideoSource_DCAM.hh"

Include dependency graph for VideoSource_DCAM_CMU.cpp:

Go to the source code of this file.

Defines

#define USE_NATIVE_XGA

Define Documentation

#define USE_NATIVE_XGA

Definition at line 278 of file VideoSource_DCAM_CMU.cpp.

Generated on Wed Jun 21 19:06:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk.cpp File Reference

VideoSource

VideoSource_Disk.cpp File Reference

#include <unistd.h>
#include <string>
#include <sstream>
#include <iostream>
#include "VideoSource_Disk.hh"
#include "VideoSource_Disk_FindFiles.h"
#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for VideoSource_Disk.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk.hh File Reference

VideoSource

VideoSource_Disk.hh File Reference

#include <VideoSource/VideoSource_Base.hh>
#include "Base/Debug/TimeMeasure.hh"

Include dependency graph for VideoSource_Disk.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_Disk
This class simulates a video device by loading images from disk. More...

Generated on Wed Jun 21 19:06:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk_FindFiles.h File Reference

VideoSource

VideoSource_Disk_FindFiles.h File Reference

#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for VideoSource_Disk_FindFiles.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class FindFilesInPath

Generated on Wed Jun 21 19:06:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DiskPMD.cpp File Reference

VideoSource

VideoSource_DiskPMD.cpp File Reference

#include <unistd.h>
#include <string>
#include <sstream>
#include <iostream>
#include "VideoSource_DiskPMD.hh"
#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>
#include <Image/PMDImageProc.hh>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for VideoSource_DiskPMD.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DiskPMD.hh File Reference

VideoSource

VideoSource_DiskPMD.hh File Reference

#include <VideoSource/VideoSource_Disk.hh>
#include <Image/Camera.hh>

Include dependency graph for VideoSource_DiskPMD.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_DiskPMD

Generated on Wed Jun 21 19:06:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DSHOW.cpp File Reference

VideoSource

VideoSource_DSHOW.cpp File Reference

#include "VideoSource_DSHOW.hh"
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <stdio.h>

Include dependency graph for VideoSource_DSHOW.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DSHOW.hh File Reference

VideoSource

VideoSource_DSHOW.hh File Reference

#include <bias_config.h>
#include <atlbase.h>
#include <windows.h>
#include <dshow.h>
#include <stdio.h>
#include <VideoSource/VideoSource_Base.hh>
#include <qedit.h>
#include <comutil.h>
#include <strmif.h>
#include <Image/Camera.hh>

Include dependency graph for VideoSource_DSHOW.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::MySampleGrabberCB
class | BIAS::VideoSource_DSHOW
This class extends VideoSource for the use of DirectShow devices. More...

Generated on Wed Jun 21 19:06:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV.cpp File Reference

VideoSource

VideoSource_DV.cpp File Reference

#include "VideoSource_DV.hh"
#include <stdio.h>

Include dependency graph for VideoSource_DV.cpp:

Go to the source code of this file.

Functions

int | MIP::raw_dv_handler (raw1394handle_t handle, int channel, size_t length, quadlet_t *data)

Variables

VideoSource_DV * | videosourcefromchannel [MAX_1394_CHANNELS]
This array is used to associate DV-sources identified via channel witch videosource-objects since raw_dv_handler() only knows the handle and channel, not the instance-object of videosource().

Variable Documentation

VideoSource_DV* videosourcefromchannel[MAX_1394_CHANNELS]

This array is used to associate DV-sources identified via channel witch videosource-objects since raw_dv_handler() only knows the handle and channel, not the instance-object of videosource().

It would be better to use handle instead of channel, to avoid conflicts with cameras connected to different cards using the same channel (63)

Definition at line 12 of file VideoSource_DV.cpp.

Generated on Wed Jun 21 19:06:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV.hh File Reference

VideoSource

VideoSource_DV.hh File Reference

#include <mip_config.h>
#include "VideoSource.hh"
#include <sys/time.h>
#include <libraw1394/raw1394.h>

Include dependency graph for VideoSource_DV.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | MIP

Classes

class | MIP::VideoSource_DV
This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...

Defines

#define | DV_PIC_SIZE 144000
#define | MAX_1394_CARDS 2
#define | MAX_1394_CHANNELS 100

Variables

MIP::VideoSource_DV * | videosourcefromchannel [MAX_1394_CHANNELS]
This array is used to associate DV-sources identified via channel witch videosource-objects since raw_dv_handler() only knows the handle and channel, not the instance-object of videosource().

Define Documentation

#define DV_PIC_SIZE 144000

Definition at line 25 of file VideoSource_DV.hh.

#define MAX_1394_CARDS 2

Definition at line 17 of file VideoSource_DV.hh.

#define MAX_1394_CHANNELS 100

Definition at line 21 of file VideoSource_DV.hh.

Variable Documentation

MIP::VideoSource_DV* videosourcefromchannel[MAX_1394_CHANNELS]

This array is used to associate DV-sources identified via channel witch videosource-objects since raw_dv_handler() only knows the handle and channel, not the instance-object of videosource().

It would be better to use handle instead of channel, to avoid conflicts with cameras connected to different cards using the same channel (63)

Definition at line 12 of file VideoSource_DV.cpp.

Generated on Wed Jun 21 19:06:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV2.cpp File Reference

VideoSource

VideoSource_DV2.cpp File Reference

#include "VideoSource_DV2.hh"
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/mman.h>

Include dependency graph for VideoSource_DV2.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV2.hh File Reference

VideoSource

VideoSource_DV2.hh File Reference

#include "VideoSource_Base.hh"
#include <sys/time.h>
#include "dv1394.h"

Include dependency graph for VideoSource_DV2.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | MIP

Classes

class | MIP::VideoSource_DV2
This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...

Generated on Wed Jun 21 19:06:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Net.cpp File Reference

VideoSource

VideoSource_Net.cpp File Reference

#include <string>
#include <sstream>
#include <iostream>
#include <Image/Camera.hh>
#include "VideoSource_Net.hh"

Include dependency graph for VideoSource_Net.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Net.hh File Reference

VideoSource

VideoSource_Net.hh File Reference

#include <bias_config.h>
#include <Base/Common/BIASpragmaStart.hh>
#include <iostream>
#include <sstream>
#include <VideoSource/VideoSource_Base.hh>
#include <NetworkComm/CScommClient.hh>
#include <Image/CompressJpeg.hh>
#include <Base/Common/BIASpragmaEnd.hh>

Include dependency graph for VideoSource_Net.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_Net
This class implements a video streaming client using TCP. More...

Generated on Wed Jun 21 19:06:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Shm.cpp File Reference

VideoSource

VideoSource_Shm.cpp File Reference

#include <string>
#include <sstream>
#include <iostream>
#include <Image/Camera.hh>
#include <VideoSource/VideoSource_Shm.hh>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <Base/Common/BIASpragma.hh>

Include dependency graph for VideoSource_Shm.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Shm.hh File Reference

VideoSource

VideoSource_Shm.hh File Reference

#include <iostream>
#include <sstream>
#include <VideoSource/VideoSource_Base.hh>

Include dependency graph for VideoSource_Shm.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_Shm
This class implements a video streaming client using shared memory to receive images from another application. More...
struct | BIAS::VideoSource_Shm::ShmImageHeader

Generated on Wed Jun 21 19:06:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Stereo.cpp File Reference

VideoSource

VideoSource_Stereo.cpp File Reference

#include "VideoSource_Stereo.hh"
#include <Image/Camera.hh>
#include <string>

Include dependency graph for VideoSource_Stereo.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Stereo.hh File Reference

VideoSource

VideoSource_Stereo.hh File Reference

#include <VideoSource/VideoSource_Base.hh>
#include <Image/Camera.hh>

Include dependency graph for VideoSource_Stereo.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_Stereo

Generated on Wed Jun 21 19:06:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_uEye.cpp File Reference

VideoSource

VideoSource_uEye.cpp File Reference

#include "VideoSource_uEye.hh"
#include <Base/Image/ImageIO.hh>
#include <stdio.h>
#include <Base/Image/ImageBase.hh>

Include dependency graph for VideoSource_uEye.cpp:

Go to the source code of this file.

Generated on Wed Jun 21 19:06:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_uEye.hh File Reference

VideoSource

VideoSource_uEye.hh File Reference

#include <bias_config.h>
#include <Image/Camera.hh>
#include <stdio.h>
#include <VideoSource/VideoSource_Base.hh>
#include "ueyeclass.hh"

Include dependency graph for VideoSource_uEye.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_uEye

Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_V4L.cpp File Reference

VideoSource

VideoSource_V4L.cpp File Reference

#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/videodev.h>
#include <errno.h>
#include <Image/Camera.hh>
#include "VideoSource_V4L.hh"

Include dependency graph for VideoSource_V4L.cpp:

Go to the source code of this file.

Functions

void printFormatInfo_ (struct v4l2_pix_format &format)

Function Documentation

void printFormatInfo_ ( struct v4l2_pix_format & format )

Definition at line 73 of file VideoSource_V4L.cpp.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), and BIAS::VideoSource_V4L::ShowCapabilities().

Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_V4L.hh File Reference

VideoSource

VideoSource_V4L.hh File Reference

#include <bias_config.h>
#include <VideoSource/VideoSource_Base.hh>
#include <sys/time.h>
#include <linux/videodev.h>
#include <pthread.h>

Include dependency graph for VideoSource_V4L.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | BIAS

Classes

class | BIAS::VideoSource_V4L
This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras. More...

Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleCameraParameter.cpp File Reference

VideoSource » Examples

ExampleCameraParameter.cpp File Reference

#include "../CameraParameter.hh"
#include <iostream>

Include dependency graph for ExampleCameraParameter.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 9 of file ExampleCameraParameter.cpp.

References cp, and BIAS::LENS_PENTAX_CMOUNT_4_8.

Generated on Wed Jun 21 19:05:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleDirectToDisk.cpp File Reference

VideoSource » Examples

ExampleDirectToDisk.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <unistd.h>
#include <getopt.h>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleDirectToDisk.cpp:

Go to the source code of this file.

Defines

#define | StorageType unsigned char

Functions

int | main (int, char **)

Define Documentation

#define StorageType unsigned char

Definition at line 19 of file ExampleDirectToDisk.cpp.

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 29 of file ExampleDirectToDisk.cpp.

References BIAS::VideoSource_DCAM::CloseDevice(), D_DCAM, D_DCAM_F7, D_DTD, BIAS::TimeMeasure::GetRealTime(), BIAS::ImageBase::GetUID(), BIAS::VideoSource_DCAM::GrabSingle(), img, BIAS::VideoSource::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), res, BIAS::Debug::SetDebugLevel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::SetFPS(), BIAS::VideoSource_DCAM::SetShutter(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:05:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleMDCamToShm.cpp File Reference

VideoSource » Examples

ExampleMDCamToShm.cpp File Reference

#include <iostream>
#include <VideoSource/MDcam.hh>
#include <Utils/Param.hh>
#include <fstream>
#include <VideoSource/VideoShMFeeder.hh>
#include <signal.h>

Include dependency graph for ExampleMDCamToShm.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])
void | termhandler (int)

Variables

bool | NotDone = true

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 21 of file ExampleMDCamToShm.cpp.

References BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), D_DCAM, D_DCAM_F7, D_MDCAM_INIT, BIAS::Param::DisableDestructorWarning(), BIAS::MDcam::GetCamera(), BIAS::VideoSource::GetID(), BIAS::MDcam::GrabSingle(), BIAS::MDcam::InitCameras(), BIAS::VideoSource::InitImage(), NotDone, BIAS::Param::ParseCommandLine(), BIAS::MDcam::PostGrab(), BIAS::MDcam::PreGrab(), BIAS::MDcam::ReleaseCameras(), res, BIAS::MDcam::ScanBus(), BIAS::Debug::SetDebugLevel(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::MDcam::SetFps(), and termhandler().

void termhandler ( int )

Definition at line 14 of file ExampleMDCamToShm.cpp.

References NotDone.

Referenced by main().

Variable Documentation

bool NotDone = true

Definition at line 11 of file ExampleMDCamToShm.cpp.

Referenced by main(), and termhandler().

Generated on Wed Jun 21 19:05:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleMDCamToShmWx.cpp File Reference

VideoSource » Examples

ExampleMDCamToShmWx.cpp File Reference

#include <iostream>
#include <VideoSource/MDcam.hh>
#include <Utils/Param.hh>
#include <fstream>
#include <VideoSource/VideoShMFeeder.hh>
#include <signal.h>
#include "wx/wx.h"
#include <Gui/StringConv.hh>
#include <Base/Debug/Exception.hh>

Include dependency graph for ExampleMDCamToShmWx.cpp:

Go to the source code of this file.

Classes

class | MyApp
class | MyFrame

Enumerations

enum {
ID_Quit = 1, ID_About, ID_MANUAL_EXPOSURE, ID_SLIDER_GAIN,
ID_SLIDER_SHUTTER, ID_BUTTON_QUIT, ID_BUTTON_WB, ID_TIMER = 1001
}

Enumeration Type Documentation

anonymous enum

Enumerator:
ID_Quit
ID_About
ID_MANUAL_EXPOSURE
ID_SLIDER_GAIN
ID_SLIDER_SHUTTER
ID_BUTTON_QUIT
ID_BUTTON_WB
ID_TIMER

Definition at line 56 of file ExampleMDCamToShmWx.cpp.

Generated on Wed Jun 21 19:05:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideofeedShm.cpp File Reference

VideoSource » Examples

ExampleVideofeedShm.cpp File Reference

#include <VideoSource/VideoSource_Base.hh>
#include <VideoSource/VideoSource_Disk.hh>
#include <VideoSource/VideoSource_Shm.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <Image/Camera.hh>
#include <iostream>
#include <VideoSource/VideoShMFeeder.hh>

Include dependency graph for ExampleVideofeedShm.cpp:

Go to the source code of this file.

Functions

int main (int, char **)

Function Documentation

int main | ( | int | ,
 |  | char ** |
 | ) |

Definition at line 18 of file ExampleVideofeedShm.cpp.

References BIAS::VideoSource::GrabSingle(), BIAS::VideoSource::InitImage(), BIAS::VideoSource::OpenDevice(), BIAS::VideoSource::PreGrab(), and BIAS::VideoShMFeeder::ProcessImage().

Generated on Wed Jun 21 19:05:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoServer.cpp File Reference

VideoSource » Examples

ExampleVideoServer.cpp File Reference

#include <iostream>
#include <Utils/Param.hh>
#include <VideoSource/VideoServer.hh>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for ExampleVideoServer.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 10 of file ExampleVideoServer.cpp.

References done, BIAS::VideoServer::GetMessageSize(), BIAS::TimeMeasure::GetRealTime(), BIAS::VideoServer::Init(), optind, BIAS::Param::ParseCommandLine(), BIAS::VideoServer::ProcessOneImage(), res, BIAS::TimeMeasure::Reset(), BIAS::Param::SetShortCommand(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Generated on Wed Jun 21 19:05:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoSource_Net.cpp File Reference

VideoSource » Examples

ExampleVideoSource_Net.cpp File Reference

#include <VideoSource/VideoSource_Base.hh>
#include <VideoSource/VideoSource_Net.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>

Include dependency graph for ExampleVideoSource_Net.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])

Variables

bool | done = false
int | imgNo = 0
bool | save = false

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 18 of file ExampleVideoSource_Net.cpp.

References done, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), imgNo, BIAS::VideoSource::InitImage(), BIAS::VideoSource::OpenDevice(), res, and BIAS::ImageIO::Write().

Variable Documentation

bool done = false

Definition at line 13 of file ExampleVideoSource_Net.cpp.

Referenced by BIAS::ExtractNumberFromRight(), MIP::VideoSource_DV::GrabSingle(), loadFlowVectors(), main(), mainloop(), and BIAS::Param::ParseCommandLine().

int imgNo = 0

Definition at line 15 of file ExampleVideoSource_Net.cpp.

Referenced by main().

bool save = false

Definition at line 14 of file ExampleVideoSource_Net.cpp.

Referenced by mainloop().

Generated on Wed Jun 21 19:05:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoSource_Shm.cpp File Reference

VideoSource » Examples

ExampleVideoSource_Shm.cpp File Reference

#include <VideoSource/VideoSource_Base.hh>
#include <VideoSource/VideoSource_Shm.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/Camera.hh>

Include dependency graph for ExampleVideoSource_Shm.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])

Variables

bool | done = false
int | imgNo = 0
bool | save = false

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 17 of file ExampleVideoSource_Shm.cpp.

References D_NET, done, BIAS::ImageIO::ExportImage(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), imgNo, BIAS::VideoSource::InitImage(), BIAS::VideoSource::OpenDevice(), BIAS::VideoSource::PreGrab(), res, and BIAS::Debug::SetDebugLevel().

Variable Documentation

bool done = false

Definition at line 12 of file ExampleVideoSource_Shm.cpp.

int imgNo = 0

Definition at line 14 of file ExampleVideoSource_Shm.cpp.

bool save = false

Definition at line 13 of file ExampleVideoSource_Shm.cpp.

Generated on Wed Jun 21 19:05:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/Scan1394Bus.cpp File Reference

VideoSource » Examples

Scan1394Bus.cpp File Reference

#include <unistd.h>
#include "../MDcam.hh"

Include dependency graph for Scan1394Bus.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
void usage ()

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 14 of file Scan1394Bus.cpp.

References getopt(), optarg, optind, and usage().

void usage ( )

Definition at line 5 of file Scan1394Bus.cpp.

Generated on Wed Jun 21 19:05:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdcam.cpp File Reference

VideoSource » Examples

showdcam.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageDraw.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <Gui/GuiGTK.hh>
#include <unistd.h>
#include <getopt.h>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for showdcam.cpp:

Go to the source code of this file.

Defines

#define | StorageType unsigned char

Functions

int | main (int argc, char *argv[])
void | mainloop (VideoSource_DCAM *cam)

Variables

float | bgain = 31.0/32.0
float | gain = 0.0
float | rgain = -31.0/32.0
unsigned | savecounter = 0

Define Documentation

#define StorageType unsigned char

Definition at line 13 of file showdcam.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 229 of file showdcam.cpp.

References BIAS::VideoSource_DCAM::CloseDevice(), D_DCAM, D_DCAM_F7, mainloop(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), res, BIAS::Debug::SetDebugLevel(), and BIAS::VideoSource_DCAM::SetShutter().

void mainloop ( VideoSource_DCAM * cam )

Definition at line 21 of file showdcam.cpp.

References BIAS::VideoSource_DCAM::AutoMode(), bgain, BIASERR, CamWin, BIAS::GuiBase::CheckForKeyEvent(), done, BIAS::ImageBase::GetHeight(), BIAS::VideoSource_DCAM::GetShutter(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_DCAM::OnePushAuto(), rgain, save, savecounter, BIAS::GuiGTK::SetTitle(), and BIAS::VideoSource_DCAM::SetWhiteBalance().

Referenced by main().

Variable Documentation

float bgain = 31.0/32.0

Definition at line 17 of file showdcam.cpp.

Referenced by mainloop().

float gain = 0.0

Definition at line 18 of file showdcam.cpp.

Referenced by BIAS::VideoSource_uEye::GetGain(), BIAS::VideoSource_DCAM::GetGain(), MyFrame::OnAutoExposure(), and MyFrame::OnGain().

float rgain = -31.0/32.0

Definition at line 17 of file showdcam.cpp.

Referenced by mainloop().

unsigned savecounter = 0

Definition at line 19 of file showdcam.cpp.

Referenced by mainloop().

Generated on Wed Jun 21 19:05:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdcam16.cpp File Reference

VideoSource » Examples

showdcam16.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DCAM.hh>
#include <Gui/GuiGTK.hh>
#include <unistd.h>
#include <getopt.h>

Include dependency graph for showdcam16.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 254 of file showdcam16.cpp.

References BIASERR.

Generated on Wed Jun 21 19:05:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdv2cam.cpp File Reference

VideoSource » Examples

showdv2cam.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DV2.hh>
#include <Gui/GuiGTK.hh>
#include <unistd.h>
#include <getopt.h>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for showdv2cam.cpp:

Go to the source code of this file.

Defines

#define | StorageType unsigned char

Functions

int | main (int argc, char *argv[])
void | mainloop (VideoSource_DV2 *cam)

Define Documentation

#define StorageType unsigned char

Definition at line 12 of file showdv2cam.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 124 of file showdv2cam.cpp.

References D_DV, mainloop(), and res.

void mainloop ( VideoSource_DV2 * cam )

Definition at line 16 of file showdv2cam.cpp.

References BIASERR, CamWin, BIAS::GuiBase::CheckForKeyEvent(), done, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::Init(), save, savecounter, BIAS::GuiGTK::SetTitle(), and BIAS::GuiBase::ShowImage().

Generated on Wed Jun 21 19:05:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdvcam.cpp File Reference

VideoSource » Examples

showdvcam.cpp File Reference

#include <Image/Camera.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
#include <VideoSource/VideoSource_DV.hh>
#include <Gui/GuiGTK.hh>
#include <unistd.h>
#include <getopt.h>
#include <Base/Debug/TimeMeasure.hh>

Include dependency graph for showdvcam.cpp:

Go to the source code of this file.

Defines

#define | StorageType unsigned char

Functions

int | main (int argc, char *argv[])
void | mainloop (VideoSource_DV *cam)

Define Documentation

#define StorageType unsigned char

Definition at line 12 of file showdvcam.cpp.

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 124 of file showdvcam.cpp.

References D_DV, mainloop(), and res.

void mainloop ( VideoSource_DV * cam )

Definition at line 16 of file showdvcam.cpp.

References BIASERR, CamWin, BIAS::GuiBase::CheckForKeyEvent(), done, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::Init(), save, savecounter, BIAS::GuiGTK::SetTitle(), and BIAS::GuiBase::ShowImage().

Generated on Wed Jun 21 19:05:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showmdcam.cpp File Reference

VideoSource » Examples

showmdcam.cpp File Reference

#include "../MDcam.hh"
#include <MIPGui/MIPGui.hh>
#include <MIPParam/Param.hh>

Include dependency graph for showmdcam.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 5 of file showmdcam.cpp.

References D_MDCAM_INIT, done, and res.

Generated on Wed Jun 21 19:05:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showv4lcam.cpp File Reference

VideoSource » Examples

showv4lcam.cpp File Reference

#include <Image/Camera.hh>
#include <VideoSource/VideoSource_V4L.hh>
#include <Gui/GuiGTK.hh>
#include <unistd.h>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>

Include dependency graph for showv4lcam.cpp:

Go to the source code of this file.

Functions

int | main (int argc, char *argv[])
void | mainloop (VideoSource *cam)

Variables

BIAS::GuiGTK CamWin

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 84 of file showv4lcam.cpp.

References BIAS::VideoSource_V4L::CloseDevice(), BIAS::GuiGTK::InitGtk(), mainloop(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource::PreGrab(), res, BIAS::VideoSource::SetChannel(), and BIAS::VideoSource::SetColorModel().

void mainloop ( VideoSource * cam )

Definition at line 13 of file showv4lcam.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), done, BIAS::VideoSource::GrabSingle(), BIAS::VideoSource::InitImage(), BIAS::ImageBase::PrintHeader(), save, BIAS::GuiGTK::SetTitle(), and BIAS::GuiBase::ShowImage().

Variable Documentation

BIAS::GuiGTK CamWin

Definition at line 8 of file showv4lcam.cpp.

Referenced by mainloop().

Generated on Wed Jun 21 19:05:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/TestMIPVideoSource_Disk.cpp File Reference

VideoSource » Examples

TestMIPVideoSource_Disk.cpp File Reference

#include <MIPVideoSource/VideoSource.hh>
#include <MIPVideoSource/VideoSource_Disk.hh>
#include <MIPCamera/Camera.hh>

Include dependency graph for TestMIPVideoSource_Disk.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | char * | argv[]
 | ) |

Definition at line 7 of file TestMIPVideoSource_Disk.cpp.

References D_CONVERT, D_COPYIN, and D_VSO_DISK.

Generated on Wed Jun 21 19:05:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Basic Image AlgorithmS Library Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
_FilterBorders
A
BIAS::AffineTransf | Last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g
alist
BIAS::AppData | This is a chunk of metadata, also see MetaData
B
BIAS::BackwardMapping< InputStorageType, OutputStorageType > | Abstract base class to maps image src to image sink with arbitrary continuous function
Base
BIAS::BaseException | Generic exception
BIAS::BaseFactory< BaseClassType > | Basic factory class
BIAS::BaseFactory< BaseClassType >::MapEntry | Struct for storing class details in memeber map Map_
biasadd | Tool for adding two images pixelwise
biasconvert | Convert different image types
BiasDetectUnvignetteApp
biasdiff | Tool for computing intensity difference of images
biasextract | Extract header data from image files: uid, time stamp orientation, KMatrix from EXIF data,
biasfilter | Tool to filter an image with Mean or Median,
biasinsert | Program for inserting an image into another
biasmerge | Merge a projection matrix and an image, write header data to image
biasprojection | Read images and pmatrices, projects 3d points ant cut out region
biassetprojection | Load image and projection given by the command line, set projection in image and save image to disk
biassetuid | Load image given by the command line, assign a uuid and write back to disk
biasshowepi | Show epipolar lines for image pair
BiasShowEpiApp
biasshowsm | Tool for showing binary written GensSynthMatches
biasview | Tool for displaying images based on GTK
BiasViewApp
biasviewwx | Tool for displaying images using wxWidgets GUI
Binomial | Binomial low pass filter class
BIAS::Binomial< InputStorageType, OutputStorageType >
BIAS::Bresenham Scans a line using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext exists in Base/Image and Base/Geometry
BIAS::BresenhamCircle Scans a circle using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext
  • points on circle are not given in continous manner, i.e
BIAS::BresenhamCircleEighth | Just like bresenham circle but only return 1/8th of the circle
BIAS::BresenhamCircleSlow | Makes 8 subsequent calls BresenhamCircleEighth slow does not work so far
BIAS::BSplineCurve | This class is intended for drawing of quadratic and cubic regular B-Splines from given control points
C
BIAS::Camera< StorageType > | Extends the Image by MetaData support (e.g
BIAS::CameraData
BIAS::CameraParam
CameraParameter_s
BIAS::CameraViewController | Base for (interactively) manipulating a (virtual) camera view
BIAS::CameraViewExternals | Describes external params of a camera view, e.g
BIAS::CameraViewFrustum | Describes internal parameter Frustum of an (OpenGL) camera view
BIAS::CameraViewInternals | Describes internal params of an (OpenGL) camera view
BIAS::CameraViewport | Describes internal parameter viewport of an (OpenGL) camera view
BIAS::CanCompare< T1, T2 > | Compile time check for comparabilty of T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html
BIAS::CanCopy< T1, T2 > | Compile time check for copy compatibilty between T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html
BIAS::CanMultiply< T1, T2, T3 > | Compile time check if T1 can be multiplied by T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html
BIAS::CCAStruct
BIAS::Cholesky
cilist
cllist
BIAS::ColorHarris
BIAS::ColorHistogram< StorageType > | This Class handels Histogram matters on Images
BIAS::ColorMultiHistogram< StorageType > | This Class handels MultiHistogram matters on Images
BIAS::ColorSegmentation
BIAS::ColorSegmentationThreaded
complex
COmpressJpeg | Wrapper for fast libjpeg methods
BIAS::Condensation | CONDENSATION (CONditional DENSity EstimATION) is a state estimator very similiar to the Kalman Filter, not only for Gaussian-, but also for any multi-modal distribution
BIAS::CondensHisto | Class for tracking an object in an image
BIAS::CondensImg | Example class for condensation with a 2-dim state vector
BIAS::Conic2D | A 3x3 matrix representing a conic (cone/plane intersection)
TNT::const_Region1D< Array1D >
TNT::const_Region2D< Array2D >
BIAS::Contour | Class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code
BIAS::Convolution< InputStorageType, OutputStorageType > | Generic convolution class
BIAS::CoordinateTransform3D
BIAS::CornerDetectorBase< StorageType > | Purly virtual interface defining class for corner detectors
BIAS::CornerDetectorFoerstner< StorageType, CalculationType > | Foerstner corner detector, detects grey value corners in images
BIAS::CornerDetectorGradient< StorageType, CalculationType > | Base class for all gradient based corner detectors
BIAS::CornerDetectorHarris< StorageType, CalculationType > | Harris corner detector, detects grey value corners in images
BIAS::CornerDetectorKLT< StorageType, CalculationType > | Computes the cornerness as the smaller eigenvalue of the structure tensor matrix
BIAS::CornerDetectorSusan< StorageType > | The Susan corner detector (oxford implementation, see license)
BIAS::CornerMatcher | Class with various functions to detect corresponding image points
BIAS::cornerstruct | Used only by Susan corner detector
BIAS::CovMatrix3x3 | Class for 3x3 covariance matrices
BIAS::CPDiscreteParam
BIAS::CPDiscreteParam
BIAS::CPDiscreteParam
BIAS::CScommBase | This class CScomm (ClientServer communciation) handles data comunication via TCP/IP for one server and multiple clients
BIAS::CScommClient | Class for sending/receiving data between clients and servers
BIAS::CScommData
BIAS::CScommMsg | Helper classes for CScommBase
BIAS::CScommServer | Class for sending/receiving data between clients and servers
BIAS::CSCommWithClientNr | Needed for the creation of receivethreads
CuEye
CutoutFrame
BIAS::CylinderMapping | Functions for spherical undistortion of given images, needs image dimensions, principal point and focal length as input additional to the image data
/home/jw/source/BIAS/Base/Debug/Debug.hh
BIAS::DC_GPS
BIAS::DC_inertial
BIAS::DC_ptu
BIAS::Debug
BIAS::DeInterlace< InputStorageType, OutputStorageType >
BIAS::DerivedFrom< T, B > | Compile time check if B is (grand)father of T Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html "Actually, Derived_from doesn't check derivation, but conversion, but that's often a better constaint
BIAS::Dilation< InputStorageType, OutputStorageType > | Dilation operator for binary images (black and white)
BIAS::Distribution | Class for calculating mean, variance and possibly other parameters
BIAS::DistTransform< InputStorageType, OutputStorageType > | Class for calculating the distance transform
BIAS::dndFileTarget | Drag and drop files onto application
doublecomplex
BIAS::doubleRANSAC
DragAndDropTarget | Drag and drop files onto application
BIAS::DrawTextGL | Draw text to OpenGL as 2D bitmap font
BIAS::EightWaySymmetry< T >
BIAS::EightWaySymmetryHomg | Direction of line if start is in coordinate origin as given by compass
BIAS::Ellipsoid3DData | Stores important data for drawing an ellipsoid
BIAS::EMatrix | Class representing an Essential matrix
BIAS::EMatrixBase | Describes the epipolar relationship between two images whith known internal camera calibration
BIAS::EpipolarLine | a class for representing epipolar lines with useful functions like ScanLine()
BIAS::Erosion< InputStorageType, OutputStorageType > | Erosion operator for binary images (black and white)
BIAS::EuclideanTransf3D | Euclidean transformation for 3D points
BIAS::ExampleDebug
ExampleGLSharedApp
ExampleImageCanvasGLBaseApp
ExampleOpenGLCanvasApp
BIAS::ExifTag | Helper class containing EXIF Tag info and its's value 8wriiten e.g
BIAS::Feat | Internal class for feature passing only
BIAS::FFT
BIAS::FFT2D< InputStorageType, OutputStorageType > Wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()
BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
BIAS::FilterBase< InputStorageType, OutputStorageType > | Virtual parent class for API definition of all (future) filters
BIAS::FilterMask | A filter mask (or a kernel) used for convolution
BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | Base class for simple n->2n filter implementations
BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | Base class for simple n->3n filter implementations
BIAS::FilterNToN< InputStorageType, OutputStorageType > | Base class for simple n->n filter implementations
FindFilesInPath
BIAS::FMatrix | Class representing a Fundamental matrix
BIAS::FMatrixBase | Describes the epipolar relationship between a point and his mapping on a corresponding epipolar line
BIAS::FMatrixEstimation | Functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views
TNT::Fortran_Matrix< T >
TNT::Fortran_Sparse_Col_Matrix< T >
TNT::Fortran_Sparse_Vector< T >
FromBase
BIAS::Gauss< InputStorageType, OutputStorageType > | Smoothing with gaussian kernel
BIAS::GaussHelmert | See Foerstner, 2004, "Uncertainty And Projective Geometry" ! untested !
BIAS::GenGroundTruth
BIAS::GenSynthMatches | Class for generating synthetic matches
BIAS::GeometryGL | Reusable Geometry an drawing functions for OpenGL
BIAS::GradientGauss< InputStorageType, OutputStorageType > | Gradient calculation with separated gauss masks
BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | Gradient calculation with separated gauss masks
BIAS::GradientSimple< InputStorageType, OutputStorageType > | Simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1)
BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | Gradient calculation with sobel 3 by 3 masks
BIAS::GuiBase | Gui is a simple windowing environment
BIAS::GuiEnhanced | Extended GuiGTK with zoom and marking options
BIAS::GuiGTK | Gui based on gtk is a simple windowing environment
BIAS::GuiWX | Sophisticated more complex windowing environment
BIAS::Histogram | Class for easy histogram generation
BIAS::Histogram2D
BIAS::HMatrix | 3x3 Matrix describing projective transformations between planes
BIAS::HMatrixBase | Describes a homography
BIAS::HMatrixEstimation | Estimate 3x3 Matrix (homography, affine transformation,
BIAS::HomgLine2D
HomgLine2D | Line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy
BIAS::HomgLine3D | Homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and a starting point PointFin_ (which is the closest vector from the coordinate origin to the line if the line is not homogenized, it can bve described by any two points
BIAS::HomgPlane3D | A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0
BIAS::HomgPoint1D | Class HomgPoint1D describes a point with 2 degrees of freedom in projective coordinates
BIAS::HomgPoint2D | Class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates
BIAS::HomgPoint2DCov | Class representing the covariance matrix of a homogenous point 2D
BIAS::HomgPoint3D | Class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates
BIAS::HomgPoint3DCov | Class representing the covariance matrix of a homogenous point 3D
BIAS::HomographyMapping< InputStorageType, OutputStorageType > | Maps image src to image sink with homography H (software implementation)
ICECallBackInterface | Callback interface for ImageCanvasExtended
BIAS::ICECallbackInterface
icilist
BIAS::Image< StorageType > | The image template class for specific storage types
BIAS::Image3DData | Stores datas for a textured plane
BIAS::ImageAttributes | All atribute info and values of e.g. a file
BIAS::ImageBase | This is the base class for images in BIAS
BIAS::ImageCanvas | Display image in wx application, provides zoom and investigation functionality
BIAS::ImageCanvasEnhanced | Functionality for selection of rectangle, point,
ImageCanvasGLBase | 2D image display canvas using OpenGL rendering internally
BIAS::ImageCanvasGLBase
BIAS::ImageConvert | Class with static functions for converting all kinds of color formats and storage types
BIAS::ImageConvertThreaded
BIAS::ImageDraw< StorageType > | Drawing simple entities into the image like rectangles or lines
BIAS::ImageIO Routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g
BIAS::ImgObjGL
TNT::Index1D
BIAS::IndexedFaceSet | Stores data for drawing a indexed face set
inlist
BIAS::IntegralHistogram | This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms
BIAS::Interpolator | This class interpolates a function y=f(t) between given control points (the y-values)
BIAS::ItemAndWidget
BIAS::JpegHandler
BIAS::Kalman | Classical Kalman filter
BIAS::KMatrix | K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs)
BIAS::Label | Does a connected component analysis and labels all connected regions
BIAS::LeastSquaresBase
BIAS::LeastSquaresLapack
BIAS::LeastSquaresSVD
BIAS::Line3DData | Stores data for drawing a line
BIAS::LinearRegionDetector< StorageType, CalculationType > | Try to detect linear regions (const gradient) in images, experimental code for testing
BIAS::LogFacility
BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | Maps cartesian source coordinates to log-polar sink coordinates
TNT::LowerTriangularView< MaTRiX >
MainFrame
mainpage | Base class for OpenGL canvases you could derive from to get base functionality (JW)
BIAS::MatchDataBase | Class for representing matches, used in GenSynthMatches and biasshowsm
BIAS::MatlabTBUndistortion
BIAS::MatlabTBUndistortion::LuTEntry
BIAS::Matrix< T > | Matrix class with arbitrary size, indexing is row major
TNT::Matrix< T >
BIAS::Matrix2x2< T > | 'fixed size' quadratic matrix of dim
BIAS::Matrix3x3< T > | 'fixed size' quadratic matrix of dim
BIAS::Matrix3x4< T > | 'fixed size' rectangular matrix of dim
BIAS::Matrix4x4< T > | 'fixed size' quadratic matrix of dim
BIAS::MatrixPanel | Panel for displaying and editing matrices
BIAS::MDcam | VideoG MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster
BIAS::Mean< InputStorageType, OutputStorageType > | Deinterlacer filter
BIAS::Median< InputStorageType, OutputStorageType > | 2D median filter
BIAS::Median1D< DataType > | Computes the median of a vector
BIAS::MetaData | This class collects all additional data chunks of type AppData to be written into/read from an image file
BIAS::Morphology< InputStorageType, OutputStorageType > | Base class for Erosion, Dilation, and single Deletion
BIAS::MSAC< SolutionType >
Multitype
my_error_mgr
MyAlgorithm
MyApp
MyFactory
MyFrame
MyGLCanvas | Implement your own OopenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / GL scene
MyGLCanvas2
BIAS::MySampleGrabberCB
MyTemplate< T >
MyTestClass
myTestClass
MyUnscentedTransform
Namelist
NonBase
BIAS::Normalization | Class Normalization Functions, e.g
olist
BIAS::OpenGLCanvas | OpenGL canvases with additinal event handling (JW)
BIAS::OpenGLCanvasBase
option
BIAS::Param | This class Param provides generic support for parameters
BIAS::ParamCallbackInterface | This class provides an interface to be called if parameter changes occured
BIAS::Parametrization
BIAS::ParamGUI ??
BIAS::ParamGUIDialog
BIAS::ParamGUIPanel ??
BIAS::ParamTypeBase
BIAS::ParamTypeBool
BIAS::ParamTypeDouble
BIAS::ParamTypeEnum
BIAS::ParamTypeInt
BIAS::ParamTypeString
BIAS::ParamTypeVecDbl
BIAS::ParamTypeVecInt
PlainImageCanvas
BIAS::PlaneRANSAC
BIAS::PlueckerMatrix | Represente a 3d line using a 4x4 Pluecker matrix
BIAS::PMatrix | Describes a projective 3D -> 2D mapping in homogenous coordinates
BIAS::PMatrix3DData | Stores important data for drawing a camera
BIAS::PMatrixBase | Describes a projective 3D -> 2D mapping in homogenous coordinates
BIAS::PMatrixEstimation | Compute standard P1/P2 from F
BIAS::PMatrixLinear | This class computes a PMatrix from 2D/3D correspondences with linear methods
BIAS::PMDImageIO | Save 2D/3D-image-data together with some metadata in a single tiff-datafile
BIAS::PMDImageMetaData | Store extrinsic and intrinsic camera parameters for Rotation is in axis * angle representation image padding and Metadata
BIAS::PMDImageProc
BIAS::Point3DData | Stores data for drawing a point
BIAS::Polynom | Class for Polynoms of arbitary order
BIAS::PolynomialSolve | Base class for solving polynomial equations
BIAS::Pose | Container for 3D pose, parametrized as euclidean center and quaternion orientation
BIAS::PoseParametrization | Slim class bundeling pose parametrization and associated covariance matrix
BIAS::PoseParametrizationCovariance | Class encapsulating the transfromations between different pose parametrizations
BIAS::Position | Store positions in image
BIAS::Projection | This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion,
BIAS::Projection3DData | Class Projection3DData stores data for drawing a the extrinisc paramters of a projection
BIAS::ProjectionDialog | Dialog containing a ProjectionGUI
BIAS::ProjectionGUI | Panel for displaying and editing projections
BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | Maps source pixel to sink pixel of given projections
BIAS::ProjectionParametersBase | Camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose
BIAS::ProjectionParametersIO
BIAS::ProjectionParametersPerspective | Camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose
BIAS::ProjectionParametersProjective | 12 parametric p for completely projective reconstruction scenarios, unknown focal lengths, self calibration,
BIAS::ProjectionParametersSpherical | Camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose
BIAS::ProjectionParametersZoom | Camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose
BIAS::PyramidImage< StorageType > | Class for holding downsampled images
BIAS::Quadric3D | A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g
BIAS::Quaternion< QUAT_TYPE > | Class for rotation with axis and angle
BIAS::Random | Class for producing random numbers from different distributions
BIAS::RANSAC< SolutionType > | Do not DLL export this class because it is headeer only
BIAS::RANSACPreKnowledge< SolutionType > | Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm
BIAS::RedirectStreams | Used to redirect stdout and stderr into files or to silence them
TNT::Region1D< Array1D >
TNT::Region2D< Array2D >
BIAS::RegionMatcher | Basic functions for CornerMatcher
BIAS::RenderModeGL
BIAS::Rescale< InputStorageType, OutputStorageType > | Down-, Upsampling routines and Resize
RGBAd | Class RGBAd is asynonym for a Vector4 of correct type
RGBAf | Class RGBAf is asynonym for a Vector4 of correct type
RGBAuc | Class RGBAuc is asynonym for a Vector4 of corerct type
RGBd | Class RGBAd is asynonym for a Vector of coorect type
RGBf | Class RGBAf is asynonym for a Vector3 of correct type
RGBuc | Class RGBuc is asynonym for a Vector3 of correct type
BIAS::RigParameter
BIAS::RMatrix | 3D rotation matrix
BIAS::RMatrixBase | 3D rotation matrix
BIAS::ROI | Class for handling different region of interest (ROI) representations
BIAS::ScaledImageCanvas | Display float images in wx application, provides zoom, scale, shift and investigation functionality
BIAS::ScanLine | Class for scanning a image region given by a line and a distance from the line
BIAS::ScanLine2
SegmentationData
BIAS::SensorData
BIAS::SettingsGL | Application controlled OpenGl renderingsettings
BIAS::SimilarityTransform
SimilarityTransformation3D | Calss rpresenting a similiraty transform, that can either be a coordinate transform or a movement of points
SimilarityTransformation3D | Transforms 3d points between two different coodinate systems, e.g
BIAS::SphericalUndistortion | Transforms sphere images coming from a fisheye-lens according to different projection models
BIAS::SphericalUndistortion::LuTEntry
BIAS::SphericalUndistortion::LuTpxpyEntry
BIAS::StatekeeperGL | Push and pop GL states on constructor/destructor Helper class pop(save) OpenGL states on construction and push them on destruction automatically
BIAS::StereoRedGreen | Combine two separate images into one stereo image for red-green glasses
TNT::stopwatch
BIAS::StructureTensor< InputStorageType, OutputStorageType > | Basic class for structure tensor calculation
BIAS::SVD | Computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A
BIAS::SVD3x3 | Singular value decomposition for 3x3 matrices
TagInfo | Compatibility class for ImageMagick/magick/attribute.c:
tagTHREADNAME_INFO
BIAS::Tensor3D< T >
BIAS::Tensor3D3x3x3< T >
BIAS::TFTensorEstimation | Class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers
ThreadArg__
BIAS::ThreeDOut | Unified output of 3D entities via OpenGL or VRML
BIAS::ThreeDOutParameters | Configuration struct for drawing styles of various 3d objects
BIAS::TimeMeasure | Class TimeMeasure contains functions for timing real time and cpu (kernel) time
BIAS::TimeMeasurement
TIntersect
BIAS::TopFrame | This is the fundamental frame in which the canvas (displaying the image) is positioned
BIAS::Tracker< StorageType, CalculationType > | High level tracking class
BIAS::TrackerBase< StorageType > | Base class for the different tracking algorithms, defining the interfaces for the tracking functions
BIAS::TrackerBaseAffine< StorageType >
BIAS::TrackerBaseInterface< StorageType > | Base class for the different tracking algorithms, defining the interfaces for the tracking functions
BIAS::TrackerBaseSimple< StorageType >
BIAS::TrackerBaseWeighted< StorageType >
BIAS::TrackerSynth< StorageType, CalculationType > | Returns ground truth tracks read from file, for debugging
TNT::Transpose_View< Array2D >
BIAS::TriangleMesh | Create and represent a 3D triangle mesh
BIAS::Triangulation | Class for triangulation of 3Dpoints from 2D matches
BIAS::TrifocalTensor
BIAS::TrifocalTensorBase
BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | Maps image src to image sink with spherical or lens distortion
TNT::UnitLowerTriangularView< MaTRiX >
TNT::UnitUpperTriangularView< MaTRiX >
BIAS::UnscentedTransform | Uses the unscented transformation to map a normal distribututed random variable using a nonlinear transformation
BIAS::UnVignette
TNT::UpperTriangularView< MaTRiX >
BIAS::UUID | Interface class for producing/storing Universally Unique IDentifiers
BIAS::UUIDsortAscending | Helper class for ascending sort of sequential BIAS::UUIDs Sample usage:
Vardesc
vector
BIAS::Vector< T > | Class for column vectors with arbitrary size
TNT::Vector< T >
BIAS::Vector2< T > | Class Vector2 contains a Vector of dim
BIAS::Vector3< T > | Class Vector3 contains a Vector of fixed dim
BIAS::Vector4< T > | Class Vector4 contains a Vector of dim
TNT::Vector_Adaptor< BBVec >
BIAS::VectorPanel | Panel for displaying and editing vectors
BIAS::VideoServer | Class to send images from a camera or disk to a client
BIAS::VideoShMFeeder | Class to save Images to a Sharerd memory
BIAS::VideoSource | Defines a common interface to different devices
BIAS::VideoSource_DCAM | This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll
BIAS::VideoSource_Disk | This class simulates a video device by loading images from disk
BIAS::VideoSource_DiskPMD
BIAS::VideoSource_DSHOW | This class extends VideoSource for the use of DirectShow devices
MIP::VideoSource_DV | This class extends VideoSource for the use of IEEE1394-connected DV-camcorders
MIP::VideoSource_DV2 | This class extends VideoSource for the use of IEEE1394-connected DV-camcorders
BIAS::VideoSource_Net | This class implements a video streaming client using TCP
BIAS::VideoSource_Shm | This class implements a video streaming client using shared memory to receive images from another application
BIAS::VideoSource_Shm::ShmImageHeader
BIAS::VideoSource_Stereo
VideoSource_UEYE | This class extends VideoSource for the use of IDS UEYE devices
BIAS::VideoSource_uEye
BIAS::VideoSource_V4L | This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras
BIAS::VideoStream | To allow capturing of camera image to disk efficiently, (avoid multiple memcopy operations), this class defines an interface to file containing one header and multiple images
BIAS::VideoStream::VSHeader
BIAS::VideoStream::VSImageHeader
VideSource_DiskPMD | Reads PMD-tiffs with depth images and modulation coefficients
VideSource_Stereo | Bundles two video sources for stereo
BIAS::WeightedSigmaPoint
BIAS::WrapBias2Ipl | Wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area
BIAS::WxMainThread | To use threads in wxWindows we must create our own class, which is derived from wxThread
wxScrolledWindow
BIAS::WxToAsciiArray | Class for converting an array of wxStrings to an array of non-const ASCII strings
wxTopLevelWindow
wxTopLevelWindowNative
wxWindow
BIAS::XMLBase | Base class with interface for xml output
BIAS::XMLIO | Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'
xvimage
BIAS::ZoomFrame | Used by ImageCanvas and ScaledImageCanvas, should not be used directly
BIAS::ZoomImageCanvas | Used by ImageCanvas and ScaledImageCanvas, should not be used directly
Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: _FilterBorders Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

_FilterBorders Struct Reference

#include <Filter/Label.hh>

List of all members.

Public Attributes

int | FirstLeft
int | FirstUpper
int | LastBottom
int | LastRight

Detailed Description

Definition at line 45 of file Label.hh.

Member Data Documentation

int _FilterBorders::FirstLeft

Definition at line 46 of file Label.hh.

int _FilterBorders::FirstUpper

Definition at line 48 of file Label.hh.

int _FilterBorders::LastBottom

Definition at line 49 of file Label.hh.

int _FilterBorders::LastRight

Definition at line 47 of file Label.hh.

The documentation for this struct was generated from the following file:
  • Filter/Label.hh
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: A Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

A Class Reference

Inheritance diagram for A:

[legend]
Collaboration diagram for A:

[legend]
List of all members.

Public Member Functions

A ()
ALLOCATOR_IMPL (Base, A)
std::string | GetTag () const
void Who ()

Public Attributes

std::string | Name_

Detailed Description

Definition at line 45 of file ExampleFactory.cpp.

Constructor & Destructor Documentation

A::A ( ) [inline]

Definition at line 48 of file ExampleFactory.cpp.

Member Function Documentation

A::ALLOCATOR_IMPL | ( | Base | ,
 |  | A |
 | ) |

std::string Base::GetTag ( ) const [inline, inherited]

Definition at line 39 of file ExampleFactory.cpp.

References Base::Name_.

void Base::Who ( ) [inline, inherited]

Definition at line 40 of file ExampleFactory.cpp.

References Base::Name_.

Referenced by main().

Member Data Documentation

std::string Base::Name_ [inherited]

Definition at line 41 of file ExampleFactory.cpp.

Referenced by Base::GetTag(), and Base::Who().

The documentation for this class was generated from the following file:
  • Base/Common/Examples/ExampleFactory.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::AffineTransf Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::AffineTransf

BIAS::AffineTransf Class Reference
[Geometry and Transformations]

last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g. More...

#include <Base/Geometry/AffineTransf.hh>

Inheritance diagram for BIAS::AffineTransf:

[legend]
Collaboration diagram for BIAS::AffineTransf:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
AffineTransf ()
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector3< double > | GetC () const
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
RMatrixBase | GetR () const
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBan (const std::string &filename, const unsigned int &Time=0)
Loads a PMatrix from .ban file given by AddCameraKey and Time index.
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x4 (const Matrix3x4< double > &A)
Matrix3x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x4 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11)
Set the matrix values JW.
Matrix3x4 (const std::string &s)
JW.
Matrix3x4 ()
default constructor untested
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Vector4< double > &argvec, Vector3< double > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Mult (Vector4< double > &argv, Vector4< double > &destv)
args must be of type Vector4<double> because this should work not only for HomgPoint3D but also for HomPLane3D, .
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix3x4 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
HomgPoint3D | operator * (HomgPoint3D &argv)
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
AffineTransf & | operator= (const AffineTransf &arg)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | SetAsRotationMatrix (Matrix3x3< double > &R)
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
Matrix< double > | Transpose () const
transpose function, storing data destination matrix
~AffineTransf ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Vector3< double > | C_
Subscript m_
Subscript mn_
Subscript n_
RMatrixBase R_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g.

*, Mult, ...

Definition at line 43 of file AffineTransf.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

AffineTransf::AffineTransf ( )

Definition at line 31 of file AffineTransf.cpp.

AffineTransf::~AffineTransf ( )

Definition at line 35 of file AffineTransf.cpp.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector3<double> BIAS::AffineTransf::GetC ( ) const [inline]

Definition at line 53 of file AffineTransf.hh.

Referenced by operator=().

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::EuclideanTransf3D::Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

RMatrixBase BIAS::AffineTransf::GetR ( ) const [inline]

Definition at line 50 of file AffineTransf.hh.

Referenced by operator=().

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< double >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, and BIAS::Pose.

int BIAS::Matrix3x4< double >::LoadBan | ( | const std::string & | filename,
 |  | const unsigned int & | Time = 0
 | ) | [inherited]

Loads a PMatrix from .ban file given by AddCameraKey and Time index.

Returns:
0 in case of success and negative nr. in case of error.
Author:
Jan Woetzel

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x4< double >::Matrix3x4 ( const Matrix3x4< double > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x4< double >::Matrix3x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x4< double >::Matrix3x4 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8,
 |  | const double | a9,
 |  | const double | a10,
 |  | const double | a11
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x4< double >::Matrix3x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x4< double >::Matrix3x4 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x4< double >::Mult | ( | const Vector4< double > & | argvec,
 |  | Vector3< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

void AffineTransf::Mult | ( | Vector4< double > & | argv,
 |  | Vector4< double > & | destv
 | ) |

args must be of type Vector4<double> because this should work not only for HomgPoint3D but also for HomPLane3D, .

..

Definition at line 46 of file AffineTransf.cpp.

References TNT::Matrix< T >::v_.

Referenced by BIAS::PMatrix::GetIntersectionOfImagePlanes(), and operator *().

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x4& BIAS::Matrix3x4< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix3x4 becomes a base class.

(04/17/2002)

Author:
Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

HomgPoint3D AffineTransf::operator * ( HomgPoint3D & argv )

Definition at line 38 of file AffineTransf.cpp.

References Mult(), and res.

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

AffineTransf & AffineTransf::operator= ( const AffineTransf & arg )

Definition at line 68 of file AffineTransf.cpp.

References C_, GetC(), BIAS::Matrix< T >::GetData(), GetR(), p, R_, and TNT::Matrix< T >::v_.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void AffineTransf::SetAsRotationMatrix ( Matrix3x3< double > & R )

Definition at line 79 of file AffineTransf.cpp.

References BIAS::Matrix< T >::GetData(), p, and TNT::Matrix< T >::v_.

Referenced by BIAS::PMatrix::GetIntersectionOfImagePlanes().

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x4< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)

Author:
Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by BIAS::HomgPoint3DCov::SetEuclidean(), and BIAS::HomgPoint2DCov::SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

double BIAS::Matrix< double >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< double >.

Matrix<double > BIAS::Matrix< double >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix3x3< double >.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

Vector3<double> BIAS::AffineTransf::C_ [protected]

Definition at line 68 of file AffineTransf.hh.

Referenced by operator=().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

RMatrixBase BIAS::AffineTransf::R_ [protected]

Definition at line 67 of file AffineTransf.hh.

Referenced by operator=().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/AffineTransf.hh
  • Base/Geometry/AffineTransf.cpp
Generated on Wed Jun 21 19:06:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: alist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

alist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef flag | aerr
typedef flag | aerr
typedef ftnint | aunit
typedef ftnint | aunit

Detailed Description

Definition at line 90 of file f2c_gnu011.h.

Member Typedef Documentation

typedef flag alist::aerr

Definition at line 87 of file win32_f2c.h.

typedef flag alist::aerr

Definition at line 91 of file f2c_gnu011.h.

typedef ftnint alist::aunit

Definition at line 88 of file win32_f2c.h.

typedef ftnint alist::aunit

Definition at line 92 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::AppData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::AppData

BIAS::AppData Class Reference

this is a chunk of metadata, also see MetaData More...

#include <Base/Image/MetaData.hh>

Collaboration diagram for BIAS::AppData:

[legend]
List of all members.

Public Types

enum TAppData {
MD_PMatrix = 0, MD_Orientation = 1, MD_TimeStamp = 2, MD_PTU_Data = 3,
MD_Inertial_Sensor = 4, MD_ASCII_DATA = 5, MD_RMatrix = 6, MD_KMatrix = 7,
MD_CVector = 8, MD_HomgPoint2D = 9, MD_Invalid = 10, MD_UUID = 11,
MD_USE_ASCII = 12, MD_Focal_Length = 14, MD_GPS_Data = 15, MD_Projection = 16
}
Type of AppData. More...

Public Member Functions

AppData (const AppData &app)
AppData ()
int | CheckFormat ()
checks if stag and sdata have the correct format
void Clear ()
Resets all members.
AppData & | operator= (const AppData &app)
~AppData ()

Public Attributes

char * | data
pointer to block of data
int | length
number of bytes used by the data block
std::string | sdata
the data as given in ascii meta data
std::string | stag
the tag as given in ascii meta data
enum TAppData | tag
The tag defines the type of data, e.g.

Related Functions

(Note that these are not member functions.)

std::ostream & | operator<< (std::ostream &os, const AppData &ad)
std::istream & | operator>> (std::istream &is, AppData &ta)

Detailed Description

this is a chunk of metadata, also see MetaData

AppData can hold the meta datum either in ascii format (in this case AppData.tag is set to AppData::MD_USE_ASCII) or in binary format (in this case AppData.tag is set to anything except AppData::MD_USE_ASCII or AppData::MD_Invalid)

Basic operators for reading, writing and assignig exist

Author:
woelk 11/2003

Definition at line 48 of file MetaData.hh.

Member Enumeration Documentation

enum BIAS::AppData::TAppData

Type of AppData.

If set to MD_USE_ASCII, AppData.tag, AppData.length and AppData.data are invalid. AppData.stag and AppData.sdata should be used.

If set to anything else except MD_Invalid, AppData.tag, AppData.length and AppData.data are valid. AppData.stag and AppData.sdata should not be used in this case.

The string tag AppData.stag can be generated from the enum id by removing 'MD_', substituting underscores with blanks and bracketing with '#[' and ']'.

For example tag=MD_Inertial_Sensor evolves to stag="#[Inertial Sensor]".

!! MD_ASCII_DATA is deprecated and should no longer be used. !! It is keept her for compatibility reasons.

Enumerator:
MD_PMatrix
MD_Orientation
MD_TimeStamp
MD_PTU_Data
MD_Inertial_Sensor
MD_ASCII_DATA
MD_RMatrix
MD_KMatrix
MD_CVector
MD_HomgPoint2D
MD_Invalid
MD_UUID
MD_USE_ASCII
MD_Focal_Length
MD_GPS_Data
MD_Projection

Definition at line 71 of file MetaData.hh.

Constructor & Destructor Documentation

AppData::AppData ( )

Definition at line 40 of file MetaData.cpp.

References Clear(), and data.

AppData::~AppData ( )

Definition at line 46 of file MetaData.cpp.

References data.

AppData::AppData ( const AppData & app )

Definition at line 51 of file MetaData.cpp.

References data.

Member Function Documentation

int AppData::CheckFormat ( )

checks if stag and sdata have the correct format

Definition at line 81 of file MetaData.cpp.

References BIASERR, length, MD_USE_ASCII, sdata, stag, and tag.

Referenced by BIAS::MetaData::Add().

void AppData::Clear ( )

Resets all members.

Definition at line 72 of file MetaData.cpp.

References data, length, MD_Invalid, sdata, stag, and tag.

Referenced by BIAS::MetaData::Add(), AppData(), BIAS::MetaData::Find(), and BIAS::operator>>().

AppData & AppData::operator= ( const AppData & app )

Definition at line 57 of file MetaData.cpp.

References data, length, sdata, stag, and tag.

Friends And Related Function Documentation

std::ostream & operator<< | ( | std::ostream & | os,
 |  | const AppData & | ad
 | ) | [related]

std::istream & operator>> | ( | std::istream & | is,
 |  | AppData & | ta
 | ) | [related]

Member Data Documentation

char* BIAS::AppData::data

pointer to block of data

Definition at line 96 of file MetaData.hh.

Referenced by BIAS::MetaData::Add(), AppData(), Clear(), main(), BIAS::operator<<(), operator=(), BIAS::operator>>(), BIAS::Camera< StorageType >::ParseMetaData(), and ~AppData().

int BIAS::AppData::length

number of bytes used by the data block

Definition at line 94 of file MetaData.hh.

Referenced by BIAS::MetaData::Add(), CheckFormat(), Clear(), main(), BIAS::operator<<(), operator=(), BIAS::operator>>(), and BIAS::Camera< StorageType >::ParseMetaData().

std::string BIAS::AppData::sdata

the data as given in ascii meta data

Definition at line 100 of file MetaData.hh.

Referenced by CheckFormat(), Clear(), BIAS::ImageIO::ImportOpenEXR(), main(), BIAS::operator<<(), operator=(), BIAS::operator>>(), and BIAS::Camera< StorageType >::ParseMetaData().

std::string BIAS::AppData::stag

the tag as given in ascii meta data

Definition at line 98 of file MetaData.hh.

Referenced by BIAS::MetaData::Add(), CheckFormat(), Clear(), main(), BIAS::operator<<(), operator=(), and BIAS::operator>>().

enum TAppData BIAS::AppData::tag

The tag defines the type of data, e.g.

MD_PMatrix is set to MD_USE_ASCII if ascii data is used. See TAppData.

Definition at line 92 of file MetaData.hh.

Referenced by BIAS::MetaData::Add(), CheckFormat(), Clear(), BIAS::ImageIO::ImportOpenEXR(), main(), BIAS::operator<<(), operator=(), BIAS::operator>>(), and BIAS::Camera< StorageType >::ParseMetaData().

The documentation for this class was generated from the following files:
  • Base/Image/MetaData.hh
  • Base/Image/MetaData.cpp
Generated on Wed Jun 21 19:06:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: B Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

B Class Reference

Inheritance diagram for B:

[legend]
Collaboration diagram for B:

[legend]
List of all members.

Public Member Functions

ALLOCATOR_IMPL (Base, B)
B ()
std::string | GetTag () const
void Who ()

Public Attributes

std::string | Name_

Detailed Description

Definition at line 53 of file ExampleFactory.cpp.

Constructor & Destructor Documentation

B::B ( ) [inline]

Definition at line 56 of file ExampleFactory.cpp.

Member Function Documentation

B::ALLOCATOR_IMPL | ( | Base | ,
 |  | B |
 | ) |

std::string Base::GetTag ( ) const [inline, inherited]

Definition at line 39 of file ExampleFactory.cpp.

References Base::Name_.

void Base::Who ( ) [inline, inherited]

Definition at line 40 of file ExampleFactory.cpp.

References Base::Name_.

Referenced by main().

Member Data Documentation

std::string Base::Name_ [inherited]

Definition at line 41 of file ExampleFactory.cpp.

Referenced by Base::GetTag(), and Base::Who().

The documentation for this class was generated from the following file:
  • Base/Common/Examples/ExampleFactory.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BackwardMapping< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BackwardMapping

BIAS::BackwardMapping< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

abstract base class to maps image src to image sink with arbitrary continuous function More...

#include <Image/BackwardMapping.hh>

Inheritance diagram for BIAS::BackwardMapping< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::BackwardMapping< InputStorageType, OutputStorageType >:

[legend]
List of all members.

geometrical coordinate mapping functions

virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const
actual mapping function which takes a point from sink and computes a point in source and a local sampling frequency

Public Member Functions

BackwardMapping ()
template<>
void | ClipValue_ (const double &value, float &newvalue)
virtual int | GetBoundingBox (unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
virtual void | UpdatePyramidSize (const Image< OutputStorageType > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size
virtual | ~BackwardMapping ()

Protected Member Functions

virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source)
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, OutputStorageType &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing

Protected Attributes

bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
int | offsetX_
int | offsetY_
PyramidImage< InputStorageType > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
double | width_

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::BackwardMapping< InputStorageType, OutputStorageType >

abstract base class to maps image src to image sink with arbitrary continuous function

This class implements a backward mapping and runs over all pixels of some output image. For each pixel it calls GetSourceCoordinates (which you have to implement in your derived class) to compute the coordinates in the source image. The local sampling frequency can be computed to avoid aliasing. Either you make an anlytic implementation or simply use the good (but maybe slow) numerical approximation from BackwardMapping.

For instance if you scale an image by factor 2, you would implement GetSourceCoordinates as source_coord = 0.5 * sink_coord and the local sampling frequency would be 0.5. Sampling frequencies below 1 wont introduce aliasing, while those larger than 1 can. Therefore local low pass filtering is simulated by using a pyramid of the input image.

The local sampling frequency of your mapping function can be approximated analyzing the jacobian of the function as a R^2->R^2 mapping, see HomographyMapping for an example or simply use the numerical solution in this class if you are not interested in speed. However, using an image pyramid isotropic scaling is assumed, if you resample by 0.3 in x-direction and 5.0 in y direction, both dirs are smoothed with the same sigma and you will lose image information. If you want to remove such effects, use anisotropic filtering. This is the slowest but best technique.

To make a pyramid of correct size, Backwardmapping::UpdatePyramidSize maps the corners of your sink image and computes the local scale at these corners assuming maximum scale at one corner. If your derived mapping function has a maximum scale somewhere else, you must override UpdatePyramidSize.

If possible,bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear. For efficiency, you can disable the usage of pyramids, speeding up the computation (bicubic, bilinear, nearest neighbor).

Author:
koeser, 2005

Definition at line 97 of file BackwardMapping.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BackwardMapping ( ) [inline]

Definition at line 100 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
virtual BIAS::BackwardMapping< InputStorageType, OutputStorageType >::~BackwardMapping ( ) [inline, virtual]

Definition at line 111 of file BackwardMapping.hh.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_ | ( | const Image< InputStorageType > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual]

compute maximum number of pyramid levels needed

Definition at line 154 of file BackwardMapping.cpp.

References BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, and BIAS::PyramidImage< StorageType >::Release().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_ | ( | const Image< OutputStorageType > & | sink,
 |  | const Image< InputStorageType > & | source
 | ) | [protected, virtual]

Definition at line 753 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_ | ( | Image< OutputStorageType > & | ,
 |  | const Image< InputStorageType > & |
 | ) | [protected, virtual]

Definition at line 780 of file BackwardMapping.cpp.

References abs, BUILD_IMAGE_CHAR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< OutputStorageType > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected]

clip computed region in dest image to roi

Definition at line 666 of file BackwardMapping.cpp.

References BIAS::ImageBase::GetROICorners().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<>
void BIAS::BackwardMapping< float, float >::ClipValue_ | ( | const double & | value,
 |  | float & | newvalue
 | ) |

Definition at line 719 of file BackwardMapping.cpp.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_ | ( | const double & | value,
 |  | OutputStorageType & | newvalue
 | ) | [protected, virtual]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 690 of file BackwardMapping.cpp.

References max, min, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected]

use jacobian of mapping function to do anisotropic antialiasing

Definition at line 591 of file BackwardMapping.cpp.

References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Matrix< T >::GetData(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::Matrix2x2< T >::Transpose().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox | ( | unsigned int | ,
 |  | unsigned int | ,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [inline, virtual]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates can be negative ! The br position is the first pixel outside the region(as for a ROI). Implement this in a derived class for speeding up calculation.

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 149 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< InputStorageType > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 506 of file BackwardMapping.cpp.

References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual]

numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 55 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected, virtual]

actual mapping function which takes a point from sink and computes a point in source and a local sampling frequency

Reimplemented in BIAS::CylinderMapping, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >.

Definition at line 43 of file BackwardMapping.cpp.

References BIASABORT, and BIASERR.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 532 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected]

takes jacobian to compute gaussian kernel for anisotropic smoothing

Definition at line 728 of file BackwardMapping.cpp.

References a, BIAS::Matrix< T >::GetData(), BIAS::Matrix2x2< T >::Invert(), and TNT::Matrix< T >::num_cols().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map ( Image< OutputStorageType > & sink )

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

Definition at line 223 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::MapTrilinear.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) |

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

Definition at line 170 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_ | ( | const Image< InputStorageType > & | source,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected]

bilinear, bicubc and nearest neighbor interpolation

Definition at line 238 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_, BIASERR, BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ImageBase::GetSize(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), BIAS::ROI::IsInROI(), BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_, and value.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_ ( Image< OutputStorageType > & sink ) [protected]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

Definition at line 363 of file BackwardMapping.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::PyramidImage< StorageType >::IsEmpty(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize ( const int newsize )

sets pyramid size to pyramid and updates if neccessary

Definition at line 135 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, BIAS::PyramidImage< StorageType >::SetPyramidSize(), and BIAS::ImageBase::StealImage().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize ( const Image< OutputStorageType > & sink ) [virtual]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Definition at line 86 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::ImageBase::GetHeight(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_ [protected]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_().

template<class InputStorageType, class OutputStorageType>
BIAS::Image<float> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_ [protected]

Definition at line 298 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_ [protected]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::height_ [protected]

Definition at line 296 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_ [protected]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_ [protected]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_ [protected]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
PyramidImage<InputStorageType> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_ [protected]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_ [protected]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_().

template<class InputStorageType, class OutputStorageType>
ROI BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_ [protected]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::width_ [protected]

Definition at line 295 of file BackwardMapping.hh.

The documentation for this class was generated from the following files:
  • Image/BackwardMapping.hh
  • Image/BackwardMapping.cpp
Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Base Class Reference

Inheritance diagram for Base:

[legend]
Collaboration diagram for Base:

[legend]
List of all members.

Public Member Functions

Base ()
Base (const string &name)
std::string | GetTag () const
void Who ()

Public Attributes

std::string | Name_

Detailed Description

Definition at line 34 of file ExampleFactory.cpp.

Constructor & Destructor Documentation

Base::Base ( const string & name ) [inline]

Definition at line 37 of file ExampleFactory.cpp.

Base::Base ( ) [inline]

Definition at line 32 of file ExampleConstraints.cpp.

Member Function Documentation

std::string Base::GetTag ( ) const [inline]

Definition at line 39 of file ExampleFactory.cpp.

References Name_.

void Base::Who ( ) [inline]

Definition at line 40 of file ExampleFactory.cpp.

References Name_.

Referenced by main().

Member Data Documentation

std::string Base::Name_

Definition at line 41 of file ExampleFactory.cpp.

Referenced by GetTag(), and Who().

The documentation for this class was generated from the following files:
  • Base/Common/Examples/ExampleFactory.cpp
  • Base/Debug/Examples/ExampleConstraints.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BaseException Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BaseException

BIAS::BaseException Class Reference

generic exception More...

#include <Base/Debug/Exception.hh>

Collaboration diagram for BIAS::BaseException:

[legend]
List of all members.

Public Member Functions

BaseException (const char *error_message) throw ()
virtual const char * | What () const throw ()
Returns a C-style character string describing the general cause of the current error.
~BaseException () throw ()

Protected Attributes

std::string | Message_

Detailed Description

generic exception

Author:
woelk 01/2006

Definition at line 29 of file Exception.hh.

Constructor & Destructor Documentation

BIAS::BaseException::BaseException ( const char * error_message ) throw () [inline]

Definition at line 33 of file Exception.hh.

BIAS::BaseException::~BaseException ( ) throw () [inline]

Definition at line 39 of file Exception.hh.

Member Function Documentation

virtual const char* BIAS::BaseException::What ( ) const throw () [inline, virtual]

Returns a C-style character string describing the general cause of the current error.

Definition at line 43 of file Exception.hh.

Member Data Documentation

std::string BIAS::BaseException::Message_ [protected]

Definition at line 47 of file Exception.hh.

The documentation for this class was generated from the following file:
  • Base/Debug/Exception.hh
Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BaseFactory< BaseClassType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BaseFactory

BIAS::BaseFactory< BaseClassType > Class Template Reference

basic factory class More...

#include <Base/Common/BaseFactory.hh>

Inheritance diagram for BIAS::BaseFactory< BaseClassType >:

[legend]
Collaboration diagram for BIAS::BaseFactory< BaseClassType >:

[legend]
List of all members.

Public Types

typedef BaseClassType *(* | AllocatorFunctionPointer )()
typedef for function pointer to class allocator function

Public Member Functions

void | AddDebugLevel (long int lv)
virtual void | AddType (AllocatorFunctionPointer allocFunc)
add a new class entry to map
BaseFactory ()
constructor
void Clear ()
empties the map
bool | DebugLevelIsSet (long int lv) const
BaseClassType * | Generate (const TagType &tag) const
function for generic class generation from
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetKnownTags (std::vector< TagType > &tags) const
void | GetNearTag (const TagType &tag, TagType &t1, TagType &t2)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual | ~BaseFactory ()
destructor

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

bool | IsInMap_ (const TagType &tag) const
checks if tag is already in map

Protected Attributes

long int | _liDebugLevel
std::map< TagType, MapEntry > | Map_
tag - class correspondences are stored in this map

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const BaseFactory< BaseClassType > &bf)
prints Map_ to stream

Classes

struct | MapEntry
struct for storing class details in memeber map Map_ More...

Detailed Description

template<class BaseClassType>
class BIAS::BaseFactory< BaseClassType >

basic factory class

Instantiate this class with the desired base class as template argument. The base class must provide the functions

  • std::string BaseClassType::GetTag() const The instantiation will fail otherwise.

/code class Base : public BaseFactoryClass { public: Base(const string& name) : Name_(name) {} void Who() { cout << "I am "<<Name_<<endl; } inline std::string GetTag() const { return Name_; } std::string Name_; };

class A : public Base { public: A() : Base("a") {}; ALLOCATOR_IMPL(Base, A); };

class B : public Base { public: B() : Base("b") {}; ALLOCATOR_IMPL(Base, B); };

class MyFactory : public Factory<Base> { public: MyFactory(): Factory<Base>() { AddType((&A::Allocator)); AddType((&B::Allocator)); } };

MyFactory fac; Base *p = fac.Generate("a");

/endcode

Author:
woelk 02/2006

Definition at line 120 of file BaseFactory.hh.

Member Typedef Documentation

template<class BaseClassType>
typedef BaseClassType*(* BIAS::BaseFactory< BaseClassType >::AllocatorFunctionPointer)()

typedef for function pointer to class allocator function

Definition at line 125 of file BaseFactory.hh.

Constructor & Destructor Documentation

template<class BaseClassType>
BIAS::BaseFactory< BaseClassType >::BaseFactory ( )

constructor

Definition at line 177 of file BaseFactory.hh.

template<class BaseClassType>
BIAS::BaseFactory< BaseClassType >::~BaseFactory ( ) [virtual]

destructor

Definition at line 185 of file BaseFactory.hh.

References BIAS::BaseFactory< BaseClassType >::Map_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class BaseClassType>
void BIAS::BaseFactory< BaseClassType >::AddType ( AllocatorFunctionPointer allocFunc ) [virtual]

add a new class entry to map

Returns:
0 on success, negative value on error

Definition at line 259 of file BaseFactory.hh.

References BEXCEPTION, BIASERR, and FACTORY_INVALID_TAG.

template<class BaseClassType>
void BIAS::BaseFactory< BaseClassType >::Clear ( ) [inline]

empties the map

Definition at line 153 of file BaseFactory.hh.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class BaseClassType>
BaseClassType * BIAS::BaseFactory< BaseClassType >::Generate ( const TagType & tag ) const

function for generic class generation from

Returns:
pointer to class on success, NULL on error

Definition at line 191 of file BaseFactory.hh.

References BIASCDOUT, BIASERR, D_BF_GEN, and BIAS::BaseFactory< BaseClassType >::Map_.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class BaseClassType>
int BIAS::BaseFactory< BaseClassType >::GetKnownTags ( std::vector< TagType > & tags ) const

Returns:
number of tags on success, negative value on error

Definition at line 244 of file BaseFactory.hh.

References it, and BIAS::BaseFactory< BaseClassType >::Map_.

template<class BaseClassType>
void BIAS::BaseFactory< BaseClassType >::GetNearTag | ( | const TagType & | tag,
 |  | TagType & | t1,
 |  | TagType & | t2
 | ) |

Definition at line 210 of file BaseFactory.hh.

References it, and BIAS::BaseFactory< BaseClassType >::Map_.

template<class BaseClassType>
bool BIAS::BaseFactory< BaseClassType >::IsInMap_ ( const TagType & tag ) const [inline, protected]

checks if tag is already in map

Definition at line 162 of file BaseFactory.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Friends And Related Function Documentation

template<class BaseClassType>
std::ostream & operator<< | ( | std::ostream & | os,
 |  | const BaseFactory< BaseClassType > & | bf
 | ) | [friend]

prints Map_ to stream

()

Author:
woelk

Definition at line 284 of file BaseFactory.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class BaseClassType>
std::map<TagType, MapEntry> BIAS::BaseFactory< BaseClassType >::Map_ [protected]

tag - class correspondences are stored in this map

Definition at line 168 of file BaseFactory.hh.

Referenced by BIAS::BaseFactory< Base >::Clear(), BIAS::BaseFactory< BaseClassType >::Generate(), BIAS::BaseFactory< BaseClassType >::GetKnownTags(), BIAS::BaseFactory< BaseClassType >::GetNearTag(), BIAS::BaseFactory< Base >::IsInMap_(), BIAS::operator<<(), and BIAS::BaseFactory< BaseClassType >::~BaseFactory().

The documentation for this class was generated from the following file:
  • Base/Common/BaseFactory.hh
Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BaseFactory< BaseClassType >::MapEntry Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BaseFactory::MapEntry

BIAS::BaseFactory< BaseClassType >::MapEntry Struct Reference

struct for storing class details in memeber map Map_ More...

#include <Base/Common/BaseFactory.hh>

List of all members.

Public Attributes

AllocatorFunctionPointer AllocatorFunction_
pointer to the static allocator function of this class

Detailed Description

template<class BaseClassType>
struct BIAS::BaseFactory< BaseClassType >::MapEntry

struct for storing class details in memeber map Map_

Definition at line 128 of file BaseFactory.hh.

Member Data Documentation

template<class BaseClassType>
AllocatorFunctionPointer BIAS::BaseFactory< BaseClassType >::MapEntry::AllocatorFunction_

pointer to the static allocator function of this class

Definition at line 130 of file BaseFactory.hh.

The documentation for this struct was generated from the following file:
  • Base/Common/BaseFactory.hh
Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasadd Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasadd Class Reference
[Tools]

tool for adding two images pixelwise More...

Detailed Description

tool for adding two images pixelwise

Author:
unknown

The documentation for this class was generated from the following file:
  • Tools/biasadd.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasconvert Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasconvert Class Reference
[Tools]

convert different image types More...

Detailed Description

convert different image types

Author:
evers

The documentation for this class was generated from the following file:
  • Tools/biasconvert.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BiasDetectUnvignetteApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasDetectUnvignetteApp Class Reference

List of all members.

Public Member Functions

virtual bool OnInit ()

Detailed Description

Definition at line 583 of file biasdetectunvignettewx.cpp.

Member Function Documentation

bool BiasDetectUnvignetteApp::OnInit ( ) [virtual]

Definition at line 589 of file biasdetectunvignettewx.cpp.

References FRAME_DEFAULT_SIZE.

The documentation for this class was generated from the following file:
  • Tools/biasdetectunvignettewx.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasdiff Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasdiff Class Reference
[Tools]

tool for computing intensity difference of images More...

Detailed Description

tool for computing intensity difference of images

Author:
woelk

The documentation for this class was generated from the following file:
  • Tools/biasdiff.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasextract Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasextract Class Reference
[Tools]

extract header data from image files: uid, time stamp orientation, KMatrix from EXIF data, . More...

Detailed Description

extract header data from image files: uid, time stamp orientation, KMatrix from EXIF data, .

Author:
evers

The documentation for this class was generated from the following file:
  • Tools/biasextract.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasfilter Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasfilter Class Reference
[Tools]

tool to filter an image with Mean or Median,. More...

Detailed Description

tool to filter an image with Mean or Median,.

..

Author:
evers

The documentation for this class was generated from the following file:
  • Tools/biasfilter.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasinsert Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasinsert Class Reference
[Tools]

program for inserting an image into another More...

Detailed Description

program for inserting an image into another

Author:
grest 04/05

The documentation for this class was generated from the following file:
  • Tools/biasinsert.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasmerge Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasmerge Class Reference
[Tools]

merge a projection matrix and an image, write header data to image More...

Detailed Description

merge a projection matrix and an image, write header data to image

Author:
koeser

The documentation for this class was generated from the following file:
  • Tools/biasmerge.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasprojection Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasprojection Class Reference
[Tools]

read images and pmatrices, projects 3d points ant cut out region More...

Detailed Description

read images and pmatrices, projects 3d points ant cut out region

Author:
koeser

The documentation for this class was generated from the following file:
  • Tools/biasprojection.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biassetprojection Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biassetprojection Class Reference
[Tools]

load image and projection given by the command line, set projection in image and save image to disk. More...

Detailed Description

load image and projection given by the command line, set projection in image and save image to disk.

Author:
jkollmann

The documentation for this class was generated from the following file:
  • Tools/biassetprojection.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biassetuid Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biassetuid Class Reference
[Tools]

load image given by the command line, assign a uuid and write back to disk More...

Detailed Description

load image given by the command line, assign a uuid and write back to disk

Author:
koeser

The documentation for this class was generated from the following file:
  • Tools/biassetuid.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasshowepi Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasshowepi Class Reference
[Tools]

show epipolar lines for image pair More...

Detailed Description

show epipolar lines for image pair

Author:
koeser

The documentation for this class was generated from the following file:
  • Tools/biasshowepi.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BiasShowEpiApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasShowEpiApp Class Reference

List of all members.

Public Member Functions

virtual bool OnInit ()

Detailed Description

Definition at line 589 of file biasshowepiwx.cpp.

Member Function Documentation

bool BiasShowEpiApp::OnInit ( ) [virtual]

Definition at line 595 of file biasshowepiwx.cpp.

References BIAS::ConsoleRedirectIO(), BIAS::Camera< StorageType >::GetProj(), BIAS::Camera< StorageType >::ParseMetaData(), MainFrame::SetImages(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersPerspective::SetP(), WxToAscii, and BIAS::XMLBase::XMLRead().

The documentation for this class was generated from the following file:
  • Tools/biasshowepiwx.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasshowsm Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasshowsm Class Reference
[Tools]

tool for showing binary written GensSynthMatches More...

Detailed Description

tool for showing binary written GensSynthMatches

Author:
wopelk 08/2004

The documentation for this class was generated from the following file:
  • Tools/biasshowsm.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasview Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasview Class Reference
[Tools]

tool for displaying images based on GTK More...

Detailed Description

tool for displaying images based on GTK

Deprecated:
biasview was replaced by biasviewwx This tool is DEPRECATED. Pleas eus ebiasviewwx instead.
Author:
woelk/evers 2001-2004

The documentation for this class was generated from the following file:
  • Tools/biasview.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BiasViewApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasViewApp Class Reference

List of all members.

Public Member Functions

virtual bool OnInit ()

Detailed Description

Definition at line 741 of file biasviewwx.cpp.

Member Function Documentation

bool BiasViewApp::OnInit ( ) [virtual]

Definition at line 747 of file biasviewwx.cpp.

References BIAS::ConsoleRedirectIO(), MainFrame::FitSizetIfTooSmall(), FRAME_DEFAULT_SIZE, and MainFrame::LoadImages().

The documentation for this class was generated from the following file:
  • Tools/biasviewwx.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: biasviewwx Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

biasviewwx Class Reference
[Tools]

tool for displaying images using wxWidgets GUI. More...

Detailed Description

tool for displaying images using wxWidgets GUI.

Author:
many - including woelk,evers,jw,...

The documentation for this class was generated from the following file:
  • Tools/biasviewwx.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Binomial Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Binomial Class Reference
[Image Filters and Image Transformations]

binomial low pass filter class More...

Detailed Description

binomial low pass filter class

Author:
woelk 12/2004

The documentation for this class was generated from the following file:
  • Filter/Binomial.hh
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Binomial< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Binomial

BIAS::Binomial< InputStorageType, OutputStorageType > Class Template Reference

#include <Filter/Binomial.hh>

Inheritance diagram for BIAS::Binomial< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Binomial< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
Binomial (Param &para, const int grp, const std::string &postfix)
Binomial (Param &para, const std::string &postfix="")
Binomial ()
bool | CalculationInFloat () const
decides if calculation is done in integer or floating point
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
sets kernel if params changed and calls convolution
int | Filter3x3 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | Filter3x3SameGreyFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
specialized function for convolution with 3x3 binomial filter.
int | Filter3x3ValidGreyFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
specialized function for convolution with 3x3 binomial filter.
int | Filter5x5 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | Filter5x5ValidGreyFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
specialized function for convolution with 5x5 binomial filter.
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
no implementation, calls Filter
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
no implementation, calls Filter
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetHalfWinSize () const
void | GetKernel (FilterMask &fm) const
get the current filter mask
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
prints the used filter mask, for debugging
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (int hws)
void | SetKernel (FilterMask &fm)
set a new filter mask
~Binomial ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _CalculateKernel (int HalfWinSize)
calculates the kernel
int | ConvFloatHori_ (const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst)
worker function for float separated (horizontal) convolution
int | ConvFloatMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for float matrix convolution
int | ConvFloatVert_ (const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst)
worker function for float separated (vertical) convolution
int | ConvIntHori_ (const Image< InputStorageType > &src, Image< CONV_INT > &dst)
worker function for int separated (horizontal) convolution
int | ConvIntMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for int matrix convolution
int | ConvIntVert_ (const Image< CONV_INT > &src, Image< OutputStorageType > &dst)
worker function for int separated (vertical) convolution
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
FilterMask _fm
the kernel data used for convolution
int * | _HalfWinSize
the parameter
int | _LastHalfWinSize
long int | _liDebugLevel
bool | _ParamsAllocated
Image< CONV_FLOAT > | _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > | _tmpInt
temporary memory, needed for separable filters when integer filtering

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Binomial< InputStorageType, OutputStorageType >

Definition at line 36 of file Binomial.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Binomial::Binomial ( )

Definition at line 42 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

template<class InputStorageType, class OutputStorageType>
Binomial::Binomial | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 55 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
Binomial::Binomial | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 67 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), and BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize.

template<class StorageType, class KernelType>
Binomial::~Binomial ( )

Definition at line 76 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize.

Member Function Documentation

template<class StorageType, class KernelType>
void Binomial::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 521 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial().

template<class StorageType, class KernelType>
void Binomial::_CalculateKernel ( int HalfWinSize ) [protected]

calculates the kernel

Definition at line 487 of file Binomial.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Binomial< InputStorageType, OutputStorageType >::_LastHalfWinSize, BIASCDOUT, D_BINOMIAL_KERNEL, FM_FLOAT, BIAS::FilterMask::Init(), and TNT::Vector< T >::newsize().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
bool BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat ( ) const [inline, inherited]

decides if calculation is done in integer or floating point

Definition at line 104 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_FLOAT > & | dst
 | ) | [protected, inherited]

worker function for float separated (horizontal) convolution

Definition at line 294 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfh(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float matrix convolution

Definition at line 232 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatVert_ | ( | const Image< CONV_FLOAT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float separated (vertical) convolution

Definition at line 348 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_INT > & | dst
 | ) | [protected, inherited]

worker function for int separated (horizontal) convolution

Definition at line 115 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetHorizRightShift(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepih(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int matrix convolution

Definition at line 50 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKerneli(), BIAS::FilterMask::GetKernelRightShift(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntVert_ | ( | const Image< CONV_INT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int separated (vertical) convolution

Definition at line 172 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepiv(), BIAS::FilterMask::GetVertRightShift(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

sets kernel if params changed and calls convolution

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 87 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::Binomial< InputStorageType, OutputStorageType >::_LastHalfWinSize, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), and res.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::FilterInt(), and main().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter3x3 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Author:
woelk 12/2004

Definition at line 127 of file Binomial.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter3x3SameGreyFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

specialized function for convolution with 3x3 binomial filter.

dst must be initialized with the right image size. Internal calculation is done using floating point numbers. Uses "zero padding" of the image to achieve destination image ROIs of same size as source image ROIs. Untested !!

Author:
woelk 07/2005

Definition at line 280 of file Binomial.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, and BIAS::ROI::SetCorners().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter3x3ValidGreyFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

specialized function for convolution with 3x3 binomial filter.

dst must be initialized with the right image size. Internal calculation is done using floating point numbers.

Author:
woelk 12/2004

Definition at line 196 of file Binomial.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat, BIASASSERT, BIASCDOUT, CONV_FLOAT, D_BINOMIAL_WRITE_IM, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), p, BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), step(), and BIAS::ImageIO::Write().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter5x5 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Author:
woelk 12/2004

Definition at line 162 of file Binomial.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Binomial::Filter5x5ValidGreyFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

specialized function for convolution with 5x5 binomial filter.

dst must be initialized with the right image size. Internal calculation is done using floating point numbers.

Author:
woelk 12/2004

Definition at line 398 of file Binomial.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat, BIASASSERT, BIASCDOUT, CONV_FLOAT, D_BINOMIAL_WRITE_IM, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), p, BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), step(), and BIAS::ImageIO::Write().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5().

template<class InputStorageType, class OutputStorageType>
int Binomial::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

no implementation, calls Filter

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 119 of file Binomial.cpp.

References BIASERR, and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int Binomial::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

no implementation, calls Filter

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 112 of file Binomial.cpp.

References BIASERR, and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class KernelType>
void Binomial::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 536 of file Binomial.cpp.

References BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
int BIAS::Binomial< InputStorageType, OutputStorageType >::GetHalfWinSize ( ) const [inline]

Definition at line 98 of file Binomial.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetKernel ( FilterMask & fm ) const [inline, inherited]

get the current filter mask

Definition at line 93 of file Convolution.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void Convolution::PrintKernel ( ) const [inherited]

prints the used filter mask, for debugging

Definition at line 582 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::FilterMask::IsSeparable().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Binomial< InputStorageType, OutputStorageType >::SetHalfWinSize ( int hws ) [inline]

Definition at line 101 of file Binomial.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel ( FilterMask & fm ) [inline, inherited]

set a new filter mask

Definition at line 97 of file Convolution.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
FilterMask BIAS::Convolution< InputStorageType, OutputStorageType >::_fm [protected, inherited]

the kernel data used for convolution

Definition at line 108 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Binomial< InputStorageType, OutputStorageType >::_HalfWinSize [protected]

the parameter

Definition at line 106 of file Binomial.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::GetBordersValid_(), and BIAS::Binomial< InputStorageType, OutputStorageType >::~Binomial().

template<class InputStorageType, class OutputStorageType>
int BIAS::Binomial< InputStorageType, OutputStorageType >::_LastHalfWinSize [protected]

Definition at line 107 of file Binomial.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<CONV_FLOAT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat [protected, inherited]

temporary memory, needed for separable filters when float filtering

Definition at line 115 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

template<class InputStorageType, class OutputStorageType>
Image<CONV_INT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpInt [protected, inherited]

temporary memory, needed for separable filters when integer filtering

Definition at line 118 of file Convolution.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Binomial.hh
  • Filter/Binomial.cpp
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Bresenham Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Bresenham

BIAS::Bresenham Class Reference

scans a line using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext exists in Base/Image and Base/Geometry
More...

#include <Base/Image/Bresenham.hh>

Inheritance diagram for BIAS::Bresenham:

[legend]
Collaboration diagram for BIAS::Bresenham:

[legend]
List of all members.

Public Member Functions

Bresenham (const double start[2], const double end[2])
Bresenham (const unsigned int start[2], const unsigned int end[2])
Bresenham (const int start[2], const int end[2])
Bresenham ()
bool | GetNext (double next[2])
bool | GetNext (unsigned int next[2])
bool | GetNext (int next[2])
void | Init (const double start[2], const double end[2])
void | Init (const unsigned int start[2], const unsigned int end[2])
void | Init (const int start[2], const int end[2])
~Bresenham ()

Protected Attributes

bool | _bInitialized
double | _dDx
double | _dDy
enum TLineType | _eLineType
int | _iDx
int | _iDy
int | _iEnd [2]
long int | _iEps
int | _iStart [2]
EightWaySymmetry< int > | _iSym
int | _iTransformedCurrent [2]
int | _iTransformedEnd [2]
int | _iTransformedStart [2]

Detailed Description

scans a line using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext exists in Base/Image and Base/Geometry

Author:
fw

Definition at line 41 of file Bresenham.hh.

Constructor & Destructor Documentation

BIAS::Bresenham::Bresenham ( ) [inline]

Definition at line 90 of file Bresenham.hh.

References _bInitialized.

BIAS::Bresenham::Bresenham | ( | const int | start[2],
 |  | const int | end[2]
 | ) | [inline]

Definition at line 100 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::Bresenham | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [inline]

Definition at line 108 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::Bresenham | ( | const double | start[2],
 |  | const double | end[2]
 | ) | [inline]

Definition at line 116 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::~Bresenham ( ) [inline]

Definition at line 97 of file Bresenham.hh.

Member Function Documentation

bool BIAS::Bresenham::GetNext ( double next[2] ) [inline]

Reimplemented in BIAS::ScanLine, and BIAS::ScanLine2.

Definition at line 208 of file Bresenham.hh.

References _dDx, _dDy, and GetNext().

bool BIAS::Bresenham::GetNext ( unsigned int next[2] ) [inline]

Reimplemented in BIAS::ScanLine, and BIAS::ScanLine2.

Definition at line 62 of file Bresenham.hh.

bool BIAS::Bresenham::GetNext ( int next[2] ) [inline]

Reimplemented in BIAS::ScanLine, and BIAS::ScanLine2.

Definition at line 182 of file Bresenham.hh.

References _bInitialized, _eLineType, _iDx, _iDy, _iEps, _iSym, _iTransformedCurrent, _iTransformedEnd, BIASERR, and BIAS::EightWaySymmetry< T >::InverseTransform().

Referenced by BIAS::ImageDraw< StorageType >::Arrow(), MainFrame::DrawDistortedLine(), BIAS::GuiEnhanced::DrawLine(), and GetNext().

void BIAS::Bresenham::Init | ( | const double | start[2],
 |  | const double | end[2]
 | ) | [inline]

Definition at line 145 of file Bresenham.hh.

References _bInitialized, _dDx, _dDy, _eLineType, _iDx, _iDy, _iEnd, _iEps, _iStart, _iSym, _iTransformedCurrent, _iTransformedEnd, _iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

void BIAS::Bresenham::Init | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [inline]

Definition at line 55 of file Bresenham.hh.

void BIAS::Bresenham::Init | ( | const int | start[2],
 |  | const int | end[2]
 | ) | [inline]

Definition at line 124 of file Bresenham.hh.

References _bInitialized, _dDx, _dDy, _eLineType, _iDx, _iDy, _iEnd, _iEps, _iStart, _iSym, _iTransformedCurrent, _iTransformedEnd, _iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

Referenced by BIAS::ImageDraw< StorageType >::Arrow(), Bresenham(), BIAS::ScanLine2::Init(), and BIAS::ScanLine::Init().

Member Data Documentation

bool BIAS::Bresenham::_bInitialized [protected]

Definition at line 83 of file Bresenham.hh.

Referenced by Bresenham(), BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), and Init().

double BIAS::Bresenham::_dDx [protected]

Definition at line 79 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), and Init().

double BIAS::Bresenham::_dDy [protected]

Definition at line 80 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), and Init().

enum TLineType BIAS::Bresenham::_eLineType [protected]

Definition at line 70 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), and Init().

int BIAS::Bresenham::_iDx [protected]

Definition at line 77 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), BIAS::ScanLine::Init(), and Init().

int BIAS::Bresenham::_iDy [protected]

Definition at line 78 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), BIAS::ScanLine::Init(), and Init().

int BIAS::Bresenham::_iEnd[2] [protected]

Definition at line 73 of file Bresenham.hh.

Referenced by Init().

long int BIAS::Bresenham::_iEps [protected]

Definition at line 81 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), BIAS::ScanLine::Init(), and Init().

int BIAS::Bresenham::_iStart[2] [protected]

Definition at line 72 of file Bresenham.hh.

Referenced by Init().

EightWaySymmetry<int> BIAS::Bresenham::_iSym [protected]

Definition at line 68 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), and Init().

int BIAS::Bresenham::_iTransformedCurrent[2] [protected]

Definition at line 74 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), BIAS::ScanLine2::Init(), BIAS::ScanLine::Init(), and Init().

int BIAS::Bresenham::_iTransformedEnd[2] [protected]

Definition at line 76 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), GetNext(), BIAS::ScanLine::Init(), and Init().

int BIAS::Bresenham::_iTransformedStart[2] [protected]

Definition at line 75 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::Init(), BIAS::ScanLine::Init(), and Init().

The documentation for this class was generated from the following file:
  • Base/Image/Bresenham.hh
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BresenhamCircle Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BresenhamCircle

BIAS::BresenhamCircle Class Reference

scans a circle using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext
  • points on circle are not given in continous manner, i.e.
More...

#include <Base/Image/BresenhamCircle.hh>

List of all members.

Public Member Functions

BresenhamCircle (int center[2], int radius)
BresenhamCircle ()
bool | GetNext (int next[2])
void | Init (int center[2], int radius)
~BresenhamCircle ()

Protected Attributes

bool | _bInitialized
int | _iCenter [2]
int | _iCount
int | _iCurrent [2]
int | _iD
int | _iDeltaE
int | _iDeltaSE
int | _iRadius

Detailed Description

scans a circle using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext
  • points on circle are not given in continous manner, i.e.

subsequent calls to GetNext() return (x,y), (y,x), (x,-y), (y,-x), (-x,-y), (-y,-x), (-x,y), (-y,x)

  • fast
    Author:
    fw

Definition at line 39 of file BresenhamCircle.hh.

Constructor & Destructor Documentation

BIAS::BresenhamCircle::BresenhamCircle ( ) [inline]

Definition at line 116 of file BresenhamCircle.hh.

BIAS::BresenhamCircle::BresenhamCircle | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 119 of file BresenhamCircle.hh.

References Init().

BIAS::BresenhamCircle::~BresenhamCircle ( ) [inline]

Definition at line 122 of file BresenhamCircle.hh.

Member Function Documentation

bool BIAS::BresenhamCircle::GetNext ( int next[2] ) [inline]

Definition at line 144 of file BresenhamCircle.hh.

References _bInitialized, _iCenter, _iCount, _iCurrent, _iD, _iDeltaE, _iDeltaSE, and BIASERR.

Referenced by BIAS::ImageDraw< StorageType >::CircleCenter(), and main().

void BIAS::BresenhamCircle::Init | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 125 of file BresenhamCircle.hh.

References _bInitialized, _iCenter, _iCount, _iCurrent, _iD, _iDeltaE, _iDeltaSE, and _iRadius.

Referenced by BresenhamCircle(), and BIAS::ImageDraw< StorageType >::CircleCenter().

Member Data Documentation

bool BIAS::BresenhamCircle::_bInitialized [protected]

Definition at line 60 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iCenter[2] [protected]

Definition at line 51 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iCount [protected]

Definition at line 57 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iCurrent[2] [protected]

Definition at line 53 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iD [protected]

Definition at line 54 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iDeltaE [protected]

Definition at line 55 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iDeltaSE [protected]

Definition at line 56 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircle::_iRadius [protected]

Definition at line 52 of file BresenhamCircle.hh.

Referenced by Init().

The documentation for this class was generated from the following file:
  • Base/Image/BresenhamCircle.hh
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BresenhamCircleEighth Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BresenhamCircleEighth

BIAS::BresenhamCircleEighth Class Reference

just like bresenham circle but only return 1/8th of the circle More...

#include <Base/Image/BresenhamCircle.hh>

List of all members.

Public Member Functions

BresenhamCircleEighth (int center[2], int radius)
BresenhamCircleEighth ()
bool | GetNext (int next[2])
void | Init (int center[2], int radius)
~BresenhamCircleEighth ()

Protected Attributes

bool | _bInitialized
int | _iCenter [2]
int | _iCurrent [2]
int | _iD
int | _iDeltaE
int | _iDeltaSE
int | _iRadius

Detailed Description

just like bresenham circle but only return 1/8th of the circle

Author:
woelk

Definition at line 66 of file BresenhamCircle.hh.

Constructor & Destructor Documentation

BIAS::BresenhamCircleEighth::BresenhamCircleEighth ( ) [inline]

Definition at line 206 of file BresenhamCircle.hh.

BIAS::BresenhamCircleEighth::BresenhamCircleEighth | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 209 of file BresenhamCircle.hh.

References Init().

BIAS::BresenhamCircleEighth::~BresenhamCircleEighth ( ) [inline]

Definition at line 212 of file BresenhamCircle.hh.

Member Function Documentation

bool BIAS::BresenhamCircleEighth::GetNext ( int next[2] ) [inline]

Definition at line 233 of file BresenhamCircle.hh.

References _bInitialized, _iCenter, _iCurrent, _iD, _iDeltaE, _iDeltaSE, and BIASERR.

Referenced by BIAS::ImageDraw< StorageType >::CircleCenterFilled(), and BIAS::BresenhamCircleSlow::GetNext().

void BIAS::BresenhamCircleEighth::Init | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 215 of file BresenhamCircle.hh.

References _bInitialized, _iCenter, _iCurrent, _iD, _iDeltaE, _iDeltaSE, and _iRadius.

Referenced by BresenhamCircleEighth(), BIAS::ImageDraw< StorageType >::CircleCenterFilled(), BIAS::BresenhamCircleSlow::GetNext(), and BIAS::BresenhamCircleSlow::Init().

Member Data Documentation

bool BIAS::BresenhamCircleEighth::_bInitialized [protected]

Definition at line 86 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iCenter[2] [protected]

Definition at line 78 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iCurrent[2] [protected]

Definition at line 80 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iD [protected]

Definition at line 81 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iDeltaE [protected]

Definition at line 82 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iDeltaSE [protected]

Definition at line 83 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::_iRadius [protected]

Definition at line 79 of file BresenhamCircle.hh.

Referenced by Init().

The documentation for this class was generated from the following file:
  • Base/Image/BresenhamCircle.hh
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BresenhamCircleSlow Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BresenhamCircleSlow

BIAS::BresenhamCircleSlow Class Reference

makes 8 subsequent calls BresenhamCircleEighth slow does not work so far More...

#include <Base/Image/BresenhamCircle.hh>

Collaboration diagram for BIAS::BresenhamCircleSlow:

[legend]
List of all members.

Public Member Functions

BresenhamCircleSlow (int center[2], int radius)
BresenhamCircleSlow ()
bool | GetNext (int next[2])
void | Init (int center[2], int radius)
~BresenhamCircleSlow ()

Protected Attributes

bool | _bInitialized
BresenhamCircleEighth _BresCirc
int | _iCenter [2]
int | _iCount
int | _iNext [2]
int | _iRadius
int | _iZeroCenter [2]

Detailed Description

makes 8 subsequent calls BresenhamCircleEighth slow does not work so far

Author:
woelk

Definition at line 93 of file BresenhamCircle.hh.

Constructor & Destructor Documentation

BIAS::BresenhamCircleSlow::BresenhamCircleSlow ( ) [inline]

Definition at line 263 of file BresenhamCircle.hh.

BIAS::BresenhamCircleSlow::BresenhamCircleSlow | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 266 of file BresenhamCircle.hh.

References Init().

BIAS::BresenhamCircleSlow::~BresenhamCircleSlow ( ) [inline]

Definition at line 269 of file BresenhamCircle.hh.

Member Function Documentation

bool BIAS::BresenhamCircleSlow::GetNext ( int next[2] ) [inline]

Definition at line 285 of file BresenhamCircle.hh.

References _bInitialized, _BresCirc, _iCenter, _iCount, _iNext, _iRadius, _iZeroCenter, BIASERR, BIAS::BresenhamCircleEighth::GetNext(), BIAS::BresenhamCircleEighth::Init(), and res.

void BIAS::BresenhamCircleSlow::Init | ( | int | center[2],
 |  | int | radius
 | ) | [inline]

Definition at line 272 of file BresenhamCircle.hh.

References _bInitialized, _BresCirc, _iCenter, _iCount, _iRadius, _iZeroCenter, and BIAS::BresenhamCircleEighth::Init().

Referenced by BresenhamCircleSlow().

Member Data Documentation

bool BIAS::BresenhamCircleSlow::_bInitialized [protected]

Definition at line 112 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

BresenhamCircleEighth BIAS::BresenhamCircleSlow::_BresCirc [protected]

Definition at line 110 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleSlow::_iCenter[2] [protected]

Definition at line 106 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleSlow::_iCount [protected]

Definition at line 108 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleSlow::_iNext[2] [protected]

Definition at line 109 of file BresenhamCircle.hh.

Referenced by GetNext().

int BIAS::BresenhamCircleSlow::_iRadius [protected]

Definition at line 107 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleSlow::_iZeroCenter[2] [protected]

Definition at line 105 of file BresenhamCircle.hh.

Referenced by GetNext(), and Init().

The documentation for this class was generated from the following file:
  • Base/Image/BresenhamCircle.hh
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::BSplineCurve Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::BSplineCurve

BIAS::BSplineCurve Class Reference
[Algorithms]

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. More...

#include <MathAlgo/BSplineCurve.hh>

Inheritance diagram for BIAS::BSplineCurve:

[legend]
Collaboration diagram for BIAS::BSplineCurve:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
BSplineCurve ()
void | CubicUniformBSpline (Vector2< double > &res, double t)
computes the point on a cubic uniform B-spline curve at time t
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void InitCubicUniformBSpline ()
computes coefficients for all segments of a cubic uniform B-spline
void InitQuadraticUniformBSpline ()
computes coefficients for all segments of a quadratic uniform B-spline
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | QuadraticUniformBSpline (Vector2< double > &res, double t)
computes the point on a quadratic uniform B-spline curve at time t
void | RemoveDebugLevel (long int lv)
void | SetControlPoints (std::vector< BIAS::Vector2< double > > &cPnt)
set the control points, which control the interpolating curve
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~BSplineCurve ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
std::vector< BIAS::Vector2<
double > > 		cPnts_
bool | initializedCubic_
bool | initializedQuadratic_
std::vector< BIAS::Vector<
double > > 		xCoeff_
std::vector< BIAS::Vector<
double > > 		yCoeff_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points.

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. The Spline doesnt interpolate through the control points!!!

The Implementation of BSplineCurve is faster then BSpline. If you only want to draw a BSpline you should use this implementation.

usage:

  1. void SetControlPoints(&cPnts) for quadratic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0] for cubic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0],cPnt[1]
  2. void InitXXXUniformBSpline() - computes coefficientvectors for all knots
  3. void XXXUniformSpline(Vector2<double> &res, double t ) - computes point on the curve (0<=t<=1) t=0 returns the first computed knot of the first segment t=1 returns the last computed knot of the last segment

see also 'Computer Graphics & Geometric Modeling' from David Salomon chapter 4.16

Author:
Marcel Lilienthal, Mai 2005

Definition at line 70 of file BSplineCurve.hh.

Constructor & Destructor Documentation

BSplineCurve::BSplineCurve ( )

Definition at line 31 of file BSplineCurve.cpp.

References initializedCubic_, and initializedQuadratic_.

BIAS::BSplineCurve::~BSplineCurve ( ) [inline]

Definition at line 75 of file BSplineCurve.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BSplineCurve::CubicUniformBSpline | ( | Vector2< double > & | res,
 |  | double | t
 | ) |

computes the point on a cubic uniform B-spline curve at time t

this function computes the point on a cubic uniform B-spline curve at time t. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2. the value of t must be between 0 and 1. t is used to compute the corresponding segment and the t_ for the result segment.

Parameters:
res | - reference to the result (return value)
t | - time value of which point is to be calculated
Author:
Marcel Lilienthal, Mai 2005

Definition at line 181 of file BSplineCurve.cpp.

References BIASERR.

Referenced by drawCubic().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BSplineCurve::InitCubicUniformBSpline ( )

computes coefficients for all segments of a cubic uniform B-spline

this function computes the coefficients for all sements of a cubic uniform B-spline and saves these coefficients in protected vectors xCoeff_, yCoeff_. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.4

Author:
Marcel Lilienthal, Mai 2005

Definition at line 92 of file BSplineCurve.cpp.

References BIASERR, and cPnts_.

Referenced by main().

void BSplineCurve::InitQuadraticUniformBSpline ( )

computes coefficients for all segments of a quadratic uniform B-spline

this function computes the coefficients for all sements of a quadratic uniform B-spline and saves these coefficients in protected vectors xCoeff_, yCoeff_ method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2

Author:
Marcel Lilienthal, Mai 2005

Definition at line 38 of file BSplineCurve.cpp.

References BIASERR, and cPnts_.

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BSplineCurve::QuadraticUniformBSpline | ( | Vector2< double > & | res,
 |  | double | t
 | ) |

computes the point on a quadratic uniform B-spline curve at time t

this function computes the point on a quadratic uniform B-spline curve at time t. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2. the value of t must be between 0 and 1. t is used to compute the corresponding segment and the t_ for the result segment.

Parameters:
res | - reference to the result (return value)
t | - time value of which point is to be calculated
Author:
Marcel Lilienthal, Mai 2005

Definition at line 151 of file BSplineCurve.cpp.

References BIASERR, and initializedQuadratic_.

Referenced by drawQuadratic().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::BSplineCurve::SetControlPoints ( std::vector< BIAS::Vector2< double > > & cPnt ) [inline]

set the control points, which control the interpolating curve

Definition at line 80 of file BSplineCurve.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<BIAS::Vector2<double> > BIAS::BSplineCurve::cPnts_ [protected]

Definition at line 154 of file BSplineCurve.hh.

Referenced by InitCubicUniformBSpline(), and InitQuadraticUniformBSpline().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::BSplineCurve::initializedCubic_ [protected]

Definition at line 152 of file BSplineCurve.hh.

Referenced by BSplineCurve().

bool BIAS::BSplineCurve::initializedQuadratic_ [protected]

Definition at line 151 of file BSplineCurve.hh.

Referenced by BSplineCurve(), and QuadraticUniformBSpline().

std::vector<BIAS::Vector<double> > BIAS::BSplineCurve::xCoeff_ [protected]

Definition at line 155 of file BSplineCurve.hh.

std::vector<BIAS::Vector<double> > BIAS::BSplineCurve::yCoeff_ [protected]

Definition at line 156 of file BSplineCurve.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/BSplineCurve.hh
  • MathAlgo/BSplineCurve.cpp
Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: C Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

C Class Reference

Inheritance diagram for C:

[legend]
Collaboration diagram for C:

[legend]
List of all members.

Public Member Functions

ALLOCATOR_IMPL (Base, C)
C ()
std::string | GetTag () const
void Who ()

Public Attributes

std::string | Name_

Detailed Description

Definition at line 61 of file ExampleFactory.cpp.

Constructor & Destructor Documentation

C::C ( ) [inline]

Definition at line 64 of file ExampleFactory.cpp.

Member Function Documentation

C::ALLOCATOR_IMPL | ( | Base | ,
 |  | C |
 | ) |

std::string Base::GetTag ( ) const [inline, inherited]

Definition at line 39 of file ExampleFactory.cpp.

References Base::Name_.

void Base::Who ( ) [inline, inherited]

Definition at line 40 of file ExampleFactory.cpp.

References Base::Name_.

Referenced by main().

Member Data Documentation

std::string Base::Name_ [inherited]

Definition at line 41 of file ExampleFactory.cpp.

Referenced by Base::GetTag(), and Base::Who().

The documentation for this class was generated from the following file:
  • Base/Common/Examples/ExampleFactory.cpp
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Camera< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Camera

BIAS::Camera< StorageType > Class Template Reference
[PyramidImage, Camera, Histogram]

extends the Image by MetaData support (e.g. More...

#include <Image/Camera.hh>

Inheritance diagram for BIAS::Camera< StorageType >:

[legend]
Collaboration diagram for BIAS::Camera< StorageType >:

[legend]
List of all members.

Misc functions

void ClearDataPointer ()
set data pointer to NULL, such that image IsEmpty _without_ deletion of data.
int | Display ()
display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.
int | Display (const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale)
interface for the above
int | Display (const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
bool | IsPositionInImage (const int &x, const int &y) const
check if image contains that pixel position
bool | IsPowerOfTwoSize () const
int | MoveToClosestPositionInImage (int &x, int &y) const
find closest valid pixel position to x,y
void * | PixelValueBase (unsigned x, unsigned y, unsigned channel=0)
bool | PowerOfTwoSize (unsigned int &width2, unsigned int &height2) const
void | PrintHeader (std::ostream &os=std::cout) const
void | RedirectImageDataPointer (void *data)
This method takes data and set the internal image data pointer to this.
void ReleaseImageDataPointer ()
Releases ImageData_ (to be used together with RedirectImageDataPointer).
bool | SamePixelAndChannelCount (const ImageBase &Image) const
checks if data area has same "size" as Image of other type
void SetZero ()
zeroes the image
static int | GetChannelcount (const enum BIAS::ImageBase::EColorModel &colormodel)
get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.
static int | GetSize (const enum BIAS::ImageBase::EStorageType &storagetype)
get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.
static bool | IsPowerOfTwoSize (const unsigned int w, const unsigned int h)
static unsigned int | PowerOfTwoSize (const unsigned int &val)

Get functions

bool | DimensionMatch (const BIAS::ImageBase &other) const
unsigned int | GetBitDepth () const
returns the bits per channel, which is not necessairily 8*sizeof(StorageType).
int | GetChannel (ImageBase &source, unsigned int channel)
copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB
unsigned int | GetChannelCount () const
returns the number of Color channels, e.g.
enum EColorModel | GetColorModel () const
unsigned int | GetDepth () const
returns the bytes per channel, which is the sizeof(StorageType)
unsigned int | GetHeight () const
void * GetImageData ()
MetaData * GetMetaData ()
unsigned long int | GetPixelCount () const
returns number of pixels in image
unsigned int | GetPixelPosition (unsigned int x, unsigned int y, unsigned short int channel=0) const
returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).
unsigned int | GetSize () const
returns the image size in bytes = count - NOT the dimension
enum EStorageType | GetStorageType () const
const BIAS::UUID & | GetUID () const
returns the UUID of the image
int | GetVersionNumber () const
unsigned int | GetWidth () const
unsigned int | GetWidthStep () const
returns the number of bytes per line
bool | IsInterleaved () const
bool | IsPlanar () const
void | SetMetaData (const MetaData &m)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ImageBase &img)
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, ImageBase &img)

Public Types

enum EColorModel {
CM_invalid = -1, CM_Grey, CM_RGB, CM_BGR,
CM_YUYV422, CM_UYVY422, CM_YUV420P, CM_YUV444,
CM_YUV411, CM_HSV, CM_HSI_OBS, CM_DV,
CM_RGBA, CM_GreyA, CM_Bayer_RGGB, CM_Bayer_GBRG,
CM_Bayer_GRBG, CM_Bayer_BGGR, CM_HSL, CM_hsL,
CM_SymTensor2x2, CM_BGRA, CM_RGBE
}
These are the most often used color models. More...
enum EStorageType {
ST_invalid = -1, ST_unsignedchar, ST_char, ST_unsignedshortint,
ST_shortint, ST_unsignedint, ST_int, ST_float,
ST_double
}

Public Member Functions

void | AddDebugLevel (long int lv)
int | AppendChannel (Image< StorageType > &img)
Append means: RGB + A => RGBA.
Camera (const ImageBase &img)
Camera ()
void | CopyIn_NoInit (void *data)
Take some data and fill it into the Image.
bool | DebugLevelIsSet (long int lv) const
std::string | GetASCIIString ()
Vector3< double > & | GetC ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | Getf ()
KMatrix & GetK ()
void | GetOrientation (BIAS::Vector3< double > &ori) const
void | GetOrientation (float &o0, float &o1, float &o2) const
BIAS::PMatrix & GetP ()
BIAS::Projection & GetProj ()
RMatrix & GetR ()
double | GetTime ()
void | GetTime (long int &sec, long int &usec)
void | Init (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Initialize image size and channels.
void | Init (unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
int | InitWithForeignData (unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true)
This is used to construct a BIAS::Image hull around existing image data.
bool | IsCValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsEmpty () const
check if ImageData_ points to allocated image buffer or not
bool | IsfValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsKValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsOrientationValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsPointValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsProjValid () const
bool | IsPValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsRValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
bool | IsTimeValid () const
Is field of data valid or unknown ? if false, the return value of the Get.
template<>
int | MaxSTValue ()
template<>
char | MaxSTValue ()
template<>
int | MinSTValue ()
template<>
char | MinSTValue ()
Camera< StorageType > | operator= (const Camera< StorageType > &src)
template<>
Image< short int > & | operator| (const Image< short int > &argimage)
int | ParseMetaData ()
After ImageIO::Load() operated on AppData_, this method fills P_, Timestamp, DC_*, .
void | PrintAppData (std::ostream &os)
see whats in the camera, for debug
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Release ()
reimplemented from ImageBase
void | RemoveDebugLevel (long int lv)
void | SetASCIIString (const std::string &ASCIIString)
void | SetC (const Vector3< double > &C)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Setf (const double &focal)
void | SetK (const KMatrix &K)
void | SetOrientation (const BIAS::Vector3< double > &ori)
void | SetOrientation (const float ori[3])
int | SetP (const PMatrix &matP)
int | SetProj (const Projection &Proj)
void | SetR (const RMatrix &R)
void | SetTime (double sec)
set time from double (in seconds)
void | SetTime (long int sec, long int usec)
int | StealImage (ImageBase &source)
steals the image data array from source, after releasing the actual image data and sets source image data to NULL
int | UpdateMetaData ()
copy P_ and co.
~Camera ()
Thresholding and Scaling
int | AboveThresholdToValue (StorageType Threshold, StorageType Value)
sets alls pixels with values above Threshold to Value
int | BelowThresholdToValue (StorageType Threshold, StorageType Value)
sets alls pixels with values below Threshold to Value
void | Binarize (StorageType Threshold)
sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images
int | BinaryThreshold (StorageType Threshold, StorageType MinValue, StorageType MaxValue)
Test for every pixel wether it is >= than the threshold.
int | CalcScaleShift (double Min, double Max, double &Scale, double &Shift) const
calculate the values needed by ScaleShiftBetween
int | ScaleShift (double Scale, double Shift)
scales and shifts image (all channels simultanously)
int | ScaleShiftBetween (double Min, double Max)
scales and shifts image so afterwards every pixel has a value between Min and Max
Misc Functions
void | AbsDiff (const Image< StorageType > &im1, const Image< StorageType > &im2)
absolut difference
StorageType | MaxSTValue ()
returns the maximal possible StorageType
StorageType | MinSTValue ()
returns the minimal possible StorageType
std::ostream & | PrintData (std::ostream &os) const
writes data of IplImage_ to os (ascii)
std::ostream & | PrintPointer (std::ostream &os) const
writes pointer of IplImage_ to os (ascii)
Image< float > | Reciprocal (const float factor=1.0, const unsigned short int channel=0)
Jan Woetzel 01/2003.
Interpolating Functions
double | BicubicInterpolation (const double &x, const double &y, const unsigned short int channel=0) const
Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !
double | BilinearInterpolation (const double x, const double y, const unsigned short int channel=0) const
Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.
double | BilinearInterpolationGrey (const double x, const double y) const
no boundary checking ! ignores ROI
double | BilinearInterpolationGreyMinVal (const double x, const double y, const StorageType &minVal) const
bilinear interpolation pixel value with value check.
double | BilinearInterpolationRGBInterleaved (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
double | BilinearInterpolationRGBPlanar (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
void | BilinearInterpolationShiftRegion (const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer)
sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .
StorageType | FastBilinearInterpolationGrey (const double x, const double y) const
fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below
double | InterpolationGrey (const double x, const double y) const
interpolation with weights according to distances to x and y
double | LinearInterpolation (const double x, const unsigned int y) const
double | LinearInterpolation (const unsigned int x, const double y) const
Set Functions
void | Clear (const StorageType value=0)
sets all pixels to zero/value
void | FillImageWithConstValue (StorageType Value[])
fill color images
void | FillImageWithConstValue (StorageType Value)
fill grey images
void FillImageWithXValue ()
fills image with value depending on x coordinate
void | SetPixel (const StorageType &value0, const StorageType &value1, const StorageType &value2, const unsigned int &x, const unsigned int &y)
set the values of the first three channels of a given pixel (x,y) in channel to value[0.
void | SetPixel (const StorageType &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0)
set the value of a given pixel (x,y) in channel to value.
Get Functions
StorageType * | GetImageData () const
overloaded GetImageData() from ImageBase
StorageType ** | GetImageDataArray () const
overloaded GetImageData() from ImageBase
StorageType | GetMaxPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.
void | GetMeanPixelValue (StorageType mean[])
void | GetMinMaxPixelValue (StorageType &min, StorageType &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const
returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.
bool | GetMinMaxPixelValueIgnoreRange (StorageType &min, StorageType &max, const StorageType ignoreStart=0, const StorageType ignoreEnd=0, const unsigned short int channel=0) const
Get both, minimal and maximal pixel value --actual implementation only for planar images--.
StorageType | GetMinPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.
StorageType & | GetPixelNearestNeighbor (const float x, const float y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.
StorageType & | GetPixelNearestNeighbor (const double x, const double y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given double coordinates.
StorageType | PixelValue (const unsigned int x, const unsigned int y, const unsigned short int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
StorageType | PixelValueInterleaved (const int x, const int y, const int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
Operators
Operators -,+,*,/,-=,+=,*=,/= for scalar and image arguments
Operators do only work for argument of the same type
Division Operators do zero checks (if BIAS_DEBUG is defined)

Image< StorageType > | operator * (const Image< StorageType > &argimage)
Binary Operator * operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator * (const StorageType &argimage)
Binary operator * operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator *= (const Image< StorageType > &argimage)
Operator *= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator *= (const StorageType &argimage)
Operator *= with scalar on pixel values of an image.
Image< StorageType > | operator+ (const Image< StorageType > &argimage)
Binary Operator + operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator+ (const StorageType &argimage)
Binary operator + operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator+= (const Image< StorageType > &argimage)
Operator += operating on pixel values with pixel values of another image.
Image< StorageType > & | operator+= (const StorageType &argimage)
Operator += with scalar on pixel values of an image.
Image< StorageType > | operator- (const Image< StorageType > &argimage)
Binary Operator - operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator- (const StorageType &argimage)
Binary operator - operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator-= (const Image< StorageType > &argimage)
Operator -= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator-= (const StorageType &argimage)
Operator -= with scalar on pixel values of an image.
Image< StorageType > | operator/ (const Image< StorageType > &argimage)
Binary Operator / operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator/ (const StorageType &argimage)
Binary operator / operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator/= (const Image< StorageType > &argimage)
Operator /= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator/= (const StorageType &argimage)
Operator /= with scalar on pixel values of an image.
Image< StorageType > & | operator| (const Image< StorageType > &argimage)
logical Operator || operating pixel values with pixel values of another image, returning a new image
Thresholding and Scaling
int | AboveThresholdToValue (StorageType Threshold, StorageType Value)
sets alls pixels with values above Threshold to Value
int | BelowThresholdToValue (StorageType Threshold, StorageType Value)
sets alls pixels with values below Threshold to Value
void | Binarize (StorageType Threshold)
sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images
int | BinaryThreshold (StorageType Threshold, StorageType MinValue, StorageType MaxValue)
Test for every pixel wether it is >= than the threshold.
int | CalcScaleShift (double Min, double Max, double &Scale, double &Shift) const
calculate the values needed by ScaleShiftBetween
int | ScaleShift (double Scale, double Shift)
scales and shifts image (all channels simultanously)
int | ScaleShiftBetween (double Min, double Max)
scales and shifts image so afterwards every pixel has a value between Min and Max
Misc Functions
void | AbsDiff (const Image< StorageType > &im1, const Image< StorageType > &im2)
absolut difference
StorageType | MaxSTValue ()
returns the maximal possible StorageType
StorageType | MinSTValue ()
returns the minimal possible StorageType
std::ostream & | PrintData (std::ostream &os) const
writes data of IplImage_ to os (ascii)
std::ostream & | PrintPointer (std::ostream &os) const
writes pointer of IplImage_ to os (ascii)
Image< float > | Reciprocal (const float factor=1.0, const unsigned short int channel=0)
Jan Woetzel 01/2003.
Interpolating Functions
double | BicubicInterpolation (const double &x, const double &y, const unsigned short int channel=0) const
Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !
double | BilinearInterpolation (const double x, const double y, const unsigned short int channel=0) const
Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.
double | BilinearInterpolationGrey (const double x, const double y) const
no boundary checking ! ignores ROI
double | BilinearInterpolationGreyMinVal (const double x, const double y, const StorageType &minVal) const
bilinear interpolation pixel value with value check.
double | BilinearInterpolationRGBInterleaved (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
double | BilinearInterpolationRGBPlanar (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
void | BilinearInterpolationShiftRegion (const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer)
sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .
StorageType | FastBilinearInterpolationGrey (const double x, const double y) const
fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below
double | InterpolationGrey (const double x, const double y) const
interpolation with weights according to distances to x and y
double | LinearInterpolation (const double x, const unsigned int y) const
double | LinearInterpolation (const unsigned int x, const double y) const
Set Functions
void | Clear (const StorageType value=0)
sets all pixels to zero/value
void | FillImageWithConstValue (StorageType Value[])
fill color images
void | FillImageWithConstValue (StorageType Value)
fill grey images
void FillImageWithXValue ()
fills image with value depending on x coordinate
void | SetPixel (const StorageType &value0, const StorageType &value1, const StorageType &value2, const unsigned int &x, const unsigned int &y)
set the values of the first three channels of a given pixel (x,y) in channel to value[0.
void | SetPixel (const StorageType &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0)
set the value of a given pixel (x,y) in channel to value.
Get Functions
StorageType * | GetImageData () const
overloaded GetImageData() from ImageBase
StorageType ** | GetImageDataArray () const
overloaded GetImageData() from ImageBase
StorageType | GetMaxPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.
void | GetMeanPixelValue (StorageType mean[])
void | GetMinMaxPixelValue (StorageType &min, StorageType &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const
returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.
bool | GetMinMaxPixelValueIgnoreRange (StorageType &min, StorageType &max, const StorageType ignoreStart=0, const StorageType ignoreEnd=0, const unsigned short int channel=0) const
Get both, minimal and maximal pixel value --actual implementation only for planar images--.
StorageType | GetMinPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.
StorageType & | GetPixelNearestNeighbor (const float x, const float y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.
StorageType & | GetPixelNearestNeighbor (const double x, const double y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given double coordinates.
StorageType | PixelValue (const unsigned int x, const unsigned int y, const unsigned short int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
StorageType | PixelValueInterleaved (const int x, const int y, const int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void Init_ ()
called by constructors to init all fields
int | UpdateImageDataArrayFromImageData_ ()
recomputes pointer array returned by GetImageDataArray

Protected Attributes

Vector3< double > | _C
camera center in wcs
double | _f
focal length in m
KMatrix _K
camera calibration with internals
long int | _liDebugLevel
MetaData _MetaData
additional data block, handled by derived classes
HomgPoint2D _Point
a point, it is up to you what you put in
RMatrix _R
camera orientation
BIAS::UUID _UID
unique id for every image
std::string | ASCIIString_
ASCII multifunctional string.
bool | ASCIIValid_
is correspondig field of data valid or unknown ?
unsigned int | BitDepth_
relevant bits per pixel per channel
unsigned int | ChannelCount_
number of channels per pixel
enum EColorModel | ColorModel_
the color model of the pixels
bool | CValid_
is correspondig field of data valid or unknown ?
unsigned int | Depth_
size of one channel of one pixel in bytes
bool | fValid_
is correspondig field of data valid or unknown ?
unsigned int | Height_
image height in pixels
void * ImageData_
a pointer to the image data
void ** ImageDataArray_
array of pointers to the first byte in an image row
bool | InterleavedDataOrder_
planar or interleaved: planar means we have several image planes, e.g.
bool | KValid_
is correspondig field of data valid or unknown ?
float | Orientation_ [3]
orientation data from sensor ?
bool | OrientationValid_
is correspondig field of data valid or unknown ?
PMatrix P_
pmatrix, maybe non-metric
bool | PointValid_
is correspondig field of data valid or unknown ?
Projection Proj_
bool | ProjValid_
bool | PValid_
is correspondig field of data valid or unknown ?
ROI Roi_
roi object
bool | RValid_
is correspondig field of data valid or unknown ?
enum EStorageType | StorageType_
the storage type in a pixel channel
long int | TimeSec_
time stamp in seconds
long int | TimeUSec_
time stamp in microseconds
bool | TimeValid_
is correspondig field of data valid or unknown ?
unsigned int | Width_
image width in pixels
unsigned int | WidthStep_
size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = VERSION_NUMBER
version number of imagebase class

Detailed Description

template<class StorageType>
class BIAS::Camera< StorageType >

extends the Image by MetaData support (e.g.

PMatrix, sensor data, etc.)

This class Camera extends Image with

  • accurate timestamps
  • P-matrix support
  • C, R, K matrix support (camera center, -rotation, -calibration)
  • anything usefull representing a camera

After reading a file with such meta data (call it MYDATA) you can call Camera::IsMYDATAValid() to find out if there is MYDATA in your camera object. If so, call Camera::GetMYDATA(). Remark: In old image files written by BIAS, invalid meta data has been attached as zero entries, e.g. PMatrix=0,0,0,0,0,0,0,0,0,0,0,0 means that there was no PMatrix available.

To add/update meta information data to your camera, call Camera::AddMYDATA(mydataobject) to attach it to the camera object. Before writing the camera, you must call Camera::UpdateMetaData() to tell the Camera to convert the current data into the BIAS::MetaData format, which is then written.

See ImageIO for the file types where such meta data information can be stored and read, maybe mip or pgm/ppm.

Definition at line 76 of file Camera.hh.

Member Enumeration Documentation

enum BIAS::ImageBase::EColorModel [inherited]

These are the most often used color models.

Enumerator:
CM_invalid | invalid (not set) image format
CM_Grey | gray values (one channel: gray value)
CM_RGB | color values (three channel order: red,green,blue)
CM_BGR | color values (three channel order: blue,green,red)
CM_YUYV422 | YUYV422 (please insert a description).
CM_UYVY422 | (please insert a description)
CM_YUV420P | (please insert a description)
CM_YUV444 | (please insert a description)
CM_YUV411 | (please insert a description)
CM_HSV | HSV (three channel order: hue, sat , value).
CM_HSI_OBS | obsolete, HSI is unused and identical to HSL
CM_DV | DV (please insert a description).
CM_RGBA | RGBA (four channel order: red,green,blue,alpha).
CM_GreyA | Grey (or Gray) plus Alpha channel.
CM_Bayer_RGGB | One channel RGB image Bayer tile.
CM_Bayer_GBRG | One channel RGB image Bayer tile.
CM_Bayer_GRBG | One channel RGB image Bayer tile.
CM_Bayer_BGGR | One channel RGB image Bayer tile.
CM_HSL | similar to HSV but space is a double tipped cone
CM_hsL | similar to HSL but euclidean (h,s) for CNCC
CM_SymTensor2x2 | The image contains a 2x2 symmetric tensor.
CM_BGRA | BGRA (four channel order: blue,green,red,alpha).
CM_RGBE | RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent).

Definition at line 113 of file ImageBase.hh.

enum BIAS::ImageBase::EStorageType [inherited]

Enumerator:
ST_invalid | invalid not set image storage type
ST_unsignedchar | (8bit) unsigned char image storage type
ST_char | (8bit) signed char image storage type
ST_unsignedshortint | (16bit) unsigned integer image storage type
ST_shortint | (16bit) signed integer image storage type
ST_unsignedint | (32bit) unsigned integer image storage type
ST_int | (32bit) signed integer image storage type
ST_float | float image storage type
ST_double | double image storage type

Definition at line 98 of file ImageBase.hh.

Constructor & Destructor Documentation

template<class StorageType>
Camera::Camera ( )

Definition at line 70 of file Camera.cpp.

References BIAS::Camera< StorageType >::Init_().

template<class StorageType>
Camera::Camera ( const ImageBase & img ) [explicit]

Definition at line 80 of file Camera.cpp.

References BIAS::Camera< StorageType >::Init_().

template<class StorageType>
Camera::~Camera ( )

Definition at line 76 of file Camera.cpp.

Member Function Documentation

template<class StorageType>
int BIAS::Image< StorageType >::AboveThresholdToValue | ( | StorageType | Threshold,
 |  | StorageType | Value
 | ) | [inherited]

sets alls pixels with values above Threshold to Value

Definition at line 760 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
void BIAS::Image< StorageType >::AbsDiff | ( | const Image< StorageType > & | im1,
 |  | const Image< StorageType > & | im2
 | ) | [inherited]

absolut difference

Author:
Felix Woelk

Definition at line 597 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), BIAS::HaveImagesMatchingROI(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and StorageType.

Referenced by main().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
int BIAS::Image< StorageType >::AppendChannel ( Image< StorageType > & img ) [inherited]

Append means: RGB + A => RGBA.

Definition at line 944 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and StorageType.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class StorageType>
int BIAS::Image< StorageType >::BelowThresholdToValue | ( | StorageType | Threshold,
 |  | StorageType | Value
 | ) | [inherited]

sets alls pixels with values below Threshold to Value

Definition at line 746 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
double BIAS::Image< StorageType >::BicubicInterpolation | ( | const double & | x,
 |  | const double & | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !

The subpixel value is obtained by computing a weighted average of the surrounding 4x4 pixel block. The weights are computed by independent x and y-dir cubic polynomials which guarantee constant first order derivatives at the grid positions

Attention:
1.0<=x<Width-2 and 1.0<=y<Height-2 is required but not checked
Author:
koeser 02/2005

Definition at line 898 of file Image.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::Image< StorageType >::GetImageDataArray(), and StorageType.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), and main().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolation | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.

Author:
Ingo Thomsen
Date:
04.03.2002 tested (only with gray images yet)

Definition at line 863 of file Image.cpp.

References BIASERR, BIAS::Image< StorageType >::BilinearInterpolationGrey(), BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::Image< StorageType >::BilinearInterpolationRGBPlanar(), BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and res.

Referenced by BIAS::TrackerBase< StorageType >::_am_computeIntensityDifferenceAffine(), main(), and BIAS::SphericalUndistortion::ProjectImageCylindric().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 806 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation(), and BIAS::EpipolarLine::ScanLine_().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationGreyMinVal | ( | const double | x,
 |  | const double | y,
 |  | const StorageType & | minVal
 | ) | const [inline, inherited]

bilinear interpolation pixel value with value check.

If at least one of the input values is <=minVal, then the unknown value minVal is returned, too.

Parameters:
minVal all values <= minVal are invalid/unknown.
Author:
Jan Woetzel 12/2004

Definition at line 827 of file Image.hh.

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 918 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationRGBPlanar | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 899 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation().

template<class StorageType>
void BIAS::Image< StorageType >::BilinearInterpolationShiftRegion | ( | const double & | x,
 |  | const double & | y,
 |  | unsigned int | hws_x,
 |  | unsigned int | hws_y,
 |  | unsigned char * | Buffer
 | ) | [inline, inherited]

sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .

.. (x,y), ... (x-hws, y-hws) You get a window of size (2*hws_x+1)*(2*hws_y+1) which is exactly centered at x,y (a subpixel position) of the original image

Parameters:
Buffer | must have size (2*hws_x+1)*(2*hws_y+1)
hws_x | half window size in x direction
hws_y | half window size in y direction
x | x-center of window
y | y-center of window
Author:
koeser 01/2004

Definition at line 1011 of file Image.hh.

template<class StorageType>
void BIAS::Image< StorageType >::Binarize ( StorageType Threshold ) [inherited]

sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images

Author:
woelk 01 2003

Definition at line 773 of file Image.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::Image< StorageType >::MaxSTValue(), BIAS::Image< StorageType >::MinSTValue(), and StorageType.

template<class StorageType>
int BIAS::Image< StorageType >::BinaryThreshold | ( | StorageType | Threshold,
 |  | StorageType | MinValue,
 |  | StorageType | MaxValue
 | ) | [inherited]

Test for every pixel wether it is >= than the threshold.

If so set to a MaxValue, otherwise to an MinValue.

Author:
Ingo Thomsen
Date:
03/28/2002 tested

Definition at line 840 of file Image.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::Image< StorageType >::CalcScaleShift | ( | double | Min,
 |  | double | Max,
 |  | double & | Scale,
 |  | double & | Shift
 | ) | const [inherited]

calculate the values needed by ScaleShiftBetween

Definition at line 814 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

Referenced by BIAS::Image< StorageType >::ScaleShiftBetween().

template<class StorageType>
void BIAS::Image< StorageType >::Clear ( const StorageType value = 0 ) [inline, inherited]

sets all pixels to zero/value

clear all pixels elements and set them to a 'default' value JW 04/2003

Definition at line 233 of file Image.hh.

void BIAS::ImageBase::ClearDataPointer ( ) [inline, inherited]

set data pointer to NULL, such that image IsEmpty _without_ deletion of data.

Author:
evers

Definition at line 560 of file ImageBase.hh.

Referenced by main().

void ImageBase::CopyIn_NoInit ( void * data ) [inherited]

Take some data and fill it into the Image.

Warning:
Image must be initialized already !
Author:
Evers

Definition at line 693 of file ImageBase.cpp.

References BIASDOUT, D_COPYIN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), and BIAS::ImageBase::GetPixelCount().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_uEye::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

int ImageBase::Cut2ROI ( ) [inherited]

reduces image to current ROI, !!! image size changes !!!

Author:
Felix Woelk untested
Todo:
Make it work on colored Images

Definition at line 556 of file ImageBase.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ROI::Resize(), BIAS::ImageBase::UnsetROI(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool ImageBase::DimensionMatch ( const BIAS::ImageBase & other ) const [inherited]

Returns:
true if the image dimension w x h of this and other match = are equal
Author:
JW

Definition at line 845 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

int ImageBase::Display ( ) [inherited]

display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.

This signature is required because MSVS debugger does not support default params.

Author:
Jan Woetzel

Definition at line 1221 of file ImageBase.cpp.

References DEFAULT_32to8_scale, and DEFAULT_Display_delay.

Referenced by BIAS::ImageBase::Display().

int ImageBase::Display | ( | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec = DEFAULT_Display_delay,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

interface for the above

Author:
Jan Woetzel 2005

Definition at line 1211 of file ImageBase.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and BIAS::ImageBase::Display().

int ImageBase::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

display image as popup to screnn sing OpenCv IplImage usign Highgui functions.

Very useful to easily display in aimge, e.g. for debugging.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 1193 of file ImageBase.cpp.

References BIAS::WrapBias2Ipl::Display().

Referenced by main().

template<class StorageType>
StorageType BIAS::Image< StorageType >::FastBilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below

Author:
woelk 01 2003

Definition at line 859 of file Image.hh.

Referenced by BIAS::SphericalUndistortion::ProjectImageCylindric().

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithConstValue ( StorageType Value[] ) [inherited]

fill color images

Definition at line 424 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), p, step(), and StorageType.

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithConstValue ( StorageType Value ) [inherited]

fill grey images

Definition at line 397 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), p, step(), and StorageType.

Referenced by BIAS::GenSynthMatches::_Draw(), drawCubic(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), drawQuadratic(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), main(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_().

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithXValue ( ) [inherited]

fills image with value depending on x coordinate

Definition at line 472 of file Image.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), p, and StorageType.

Referenced by main().

int ImageBase::Flip ( ) [inherited]

flips the image vertically (row order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
Daniel Grest
Date:
Jun 2002 Interleaved tested, planar untested Aug 2002: Jan-Friso Evers: fixed interleaved for float and other

Definition at line 700 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by BIAS::ThreeDOut::AddTriangleMesh(), MyFrame::OnTimer(), BIAS::ImageBase::PadToPowerOfTwoAndFlip(), and BIAS::OpenGLCanvasBase::ScreenShot().

int ImageBase::FlipHorizontal ( ) [inherited]

flips the image horizontal (column order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
woelk 10/2004

Definition at line 744 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

template<class StorageType>
std::string BIAS::Camera< StorageType >::GetASCIIString ( ) [inline]

Definition at line 107 of file Camera.hh.

unsigned int BIAS::ImageBase::GetBitDepth ( ) const [inline, inherited]

returns the bits per channel, which is not necessairily 8*sizeof(StorageType).

Author:
woelk 12/2004

Definition at line 235 of file ImageBase.hh.

Referenced by BIAS::ImgObjGL::GetGLInternalFormat(), MainFrame::OnInfo(), and BIAS::ImageBase::Pad().

template<class StorageType>
Vector3<double>& BIAS::Camera< StorageType >::GetC ( ) [inline]

Definition at line 145 of file Camera.hh.

Referenced by main().

int ImageBase::GetChannel | ( | ImageBase & | source,
 |  | unsigned int | channel
 | ) | [inherited]

copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB

Author:
Felix Woelk untested (17/04/2002)

Definition at line 337 of file ImageBase.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::IsPlanar().

int ImageBase::GetChannelcount ( const enum BIAS::ImageBase::EColorModel & colormodel ) [static, inherited]

get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1153 of file ImageBase.cpp.

References BIASERR, BIASWARN, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_RGBA.

unsigned int BIAS::ImageBase::GetChannelCount ( ) const [inline, inherited]

returns the number of Color channels, e.g.

RGB 3

the value returned is independent of the StorageType

Definition at line 252 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::CalcScaleShift(), castchar(), castfloat(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImageBase::Cut2ROI(), BIAS::Histogram::DeleteHist_(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::ImageIO::ExportMagickPP(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageDraw< StorageType >::InterpolatedLine(), BIAS::ImageDraw< StorageType >::Line(), LoadImage(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Image< StorageType >::ScaleShift(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), and BIAS::PMDImageProc::Write().

enum EColorModel BIAS::ImageBase::GetColorModel ( ) const [inline, inherited]

Definition at line 270 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), ComputeCutoutImage(), BIAS::ImageConvert::Convert(), BIAS::ColorHarris::CreateSTColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::ImageIO::ExportMagickPP(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), main(), MainFrame::OnInfo(), BIAS::ImageBase::operator=(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageBase::GetCopyOfROI ( ImageBase & copy ) const [inherited]

returns a copy of ROI (a new image) lower right point excluded, only interleaved images !

Author:
Felix Woelk, grest untested

Definition at line 484 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Release(), and BIAS::ImageBase::SetColorModel().

int ImageBase::GetCopyOfROI2 ( ImageBase & copy ) const [inherited]

like GetCopyOfROI, but with lower right point included only interleaved images !

Note:
GetCopyOfROI returns an image where the lower right ROI point is not included. This version does it. Correction are not made in the original method, because extensive corrections would become necessary in other methods.
Author:
Ingo Thomsen

Definition at line 451 of file ImageBase.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int BIAS::ImageBase::GetDepth ( ) const [inline, inherited]

returns the bytes per channel, which is the sizeof(StorageType)

Definition at line 229 of file ImageBase.hh.

Referenced by BIAS::ImageBase::CopyIn_NoInit(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPP(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::ImageBase::Pad(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::ImageBase::SetOutsideROIZero().

template<class StorageType>
double BIAS::Camera< StorageType >::Getf ( ) [inline]

Definition at line 154 of file Camera.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::ImageBase::GetHeight ( ) const [inline, inherited]

Definition at line 225 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), MainFrame::FitSizetIfTooSmall(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

void* BIAS::ImageBase::GetImageData ( ) [inline, inherited]

Definition at line 205 of file ImageBase.hh.

template<class StorageType>
StorageType* BIAS::Image< StorageType >::GetImageData ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 127 of file Image.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::MySampleGrabberCB::BufferCB(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), castchar(), castfloat(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), cut(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::ImageConvert::DVToRGB_(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::VideoSource_Net::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::Label4Neighbour_(), main(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mysobel2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::MySampleGrabberCB::SampleCB(), BIAS::Image< StorageType >::ScaleShift(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoStream::SplitIntoFiles(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::ImageConvert::ToRGB(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::ImageConvert::YUV420PToGrey_(), BIAS::ImageConvert::YUV420PToRGB_(), BIAS::ImageConvert::YUV422ToGrey_(), BIAS::ImageConvert::YUV422ToRGB_(), and BIAS::MySampleGrabberCB::~MySampleGrabberCB().

template<class StorageType>
StorageType** BIAS::Image< StorageType >::GetImageDataArray ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 133 of file Image.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::SphericalUndistortion::CorrectVignette(), demo(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Conic2D::Draw(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::CondensHisto::GetSamplePositions(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Contour::Init_(), BIAS::ImageDraw< StorageType >::InterpolatedLineGrey(), BIAS::ImageDraw< StorageType >::Line(), main(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mysobel(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Image< StorageType >::PrintPointer(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::CornerMatcher::SSD(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::ScaledImageCanvas::UpdateScaleOffset(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

template<class StorageType>
KMatrix& BIAS::Camera< StorageType >::GetK ( ) [inline]

Definition at line 151 of file Camera.hh.

Referenced by main().

template<class StorageType>
StorageType BIAS::Image< StorageType >::GetMaxPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.

Author:
Felix Woelk

Definition at line 730 of file Image.cpp.

References BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

template<class StorageType>
void BIAS::Image< StorageType >::GetMeanPixelValue ( StorageType mean[] ) [inherited]

Author:
woelk 08/2004

Definition at line 485 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), p, step(), and StorageType.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

MetaData* BIAS::ImageBase::GetMetaData ( ) [inline, inherited]

Definition at line 301 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), and BIAS::ImageIO::WriteUnbuffered().

template<class StorageType>
void BIAS::Image< StorageType >::GetMinMaxPixelValue | ( | StorageType & | min,
 |  | StorageType & | max,
 |  | unsigned short int | channel = 0,
 |  | unsigned int * | mincoo = NULL,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.

all other channels are ignored during the search. Returns the first occurance of min/max pixelvalue, if they occure multiple times.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value if mincoo or maxcoo !=NULL, also stores the location of min resp. max, works slow on woelk 10/2004 ( Examples/ExampleMinMax.cpp )
Author:
Jan Frahm, woelk 01/2003, woelk 10/2004

Definition at line 587 of file Image.cpp.

References BIASASSERT, BIASCDOUT, BIASERR, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, D_IMAGE_MINMAXCOO, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), and StorageType.

Referenced by BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::CalcScaleShift(), BIAS::Image< StorageType >::GetMaxPixelValue(), BIAS::Image< StorageType >::GetMinPixelValue(), main(), BIAS::ImageConvert::RGBToHSV_(), and Scale().

template<class StorageType>
bool BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange | ( | StorageType & | min,
 |  | StorageType & | max,
 |  | const StorageType | ignoreStart = 0,
 |  | const StorageType | ignoreEnd = 0,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Get both, minimal and maximal pixel value --actual implementation only for planar images--.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value
ignoreStart,ignoreEnd | define teh range of values to be ignored
channel | to be searched fro multi-channel images
Returns:
true if a value within raneg was found, else false
Author:
Jan Woetzel 01/2003

Definition at line 523 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), and StorageType.

template<class StorageType>
StorageType BIAS::Image< StorageType >::GetMinPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.

Author:
Felix Woelk

Definition at line 713 of file Image.cpp.

References BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

template<class StorageType>
void BIAS::Camera< StorageType >::GetOrientation ( BIAS::Vector3< double > & ori ) const [inline]

Definition at line 140 of file Camera.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::GetOrientation | ( | float & | o0,
 |  | float & | o1,
 |  | float & | o2
 | ) | const [inline]

Definition at line 137 of file Camera.hh.

template<class StorageType>
BIAS::PMatrix& BIAS::Camera< StorageType >::GetP ( ) [inline]

Definition at line 94 of file Camera.hh.

Referenced by main().

unsigned long int BIAS::ImageBase::GetPixelCount ( ) const [inline, inherited]

returns number of pixels in image

Definition at line 277 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::Histogram::DeleteHist_(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::ImageBase::GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ROI::SetMaskImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

template<class StorageType>
StorageType & BIAS::Image< StorageType >::GetPixelNearestNeighbor | ( | const float | x,
 |  | const float | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.

Author:
Ingo Thomsen
Date:
03/28/2002 tested (only with interleaved gray images)

Definition at line 680 of file Image.hh.

template<class StorageType>
StorageType & BIAS::Image< StorageType >::GetPixelNearestNeighbor | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given double coordinates.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved grey images)

Definition at line 657 of file Image.hh.

unsigned int BIAS::ImageBase::GetPixelPosition | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned short int | channel = 0
 | ) | const [inline, inherited]

returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).

Changed this method to return position in StorageType Jan-Friso Evers

Definition at line 770 of file ImageBase.hh.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

template<class StorageType>
BIAS::Projection& BIAS::Camera< StorageType >::GetProj ( ) [inline]

Definition at line 99 of file Camera.hh.

Referenced by main(), and BiasShowEpiApp::OnInit().

template<class StorageType>
RMatrix& BIAS::Camera< StorageType >::GetR ( ) [inline]

Definition at line 148 of file Camera.hh.

Referenced by main().

void ImageBase::GetROI | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 899 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

void ImageBase::GetROI | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 887 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

const ROI* BIAS::ImageBase::GetROI ( ) const [inline, inherited]

Definition at line 358 of file ImageBase.hh.

ROI* BIAS::ImageBase::GetROI ( ) [inline, inherited]

Returns a pointer to the roi object.

Author:
woelk 07/2005

Definition at line 355 of file ImageBase.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::ImageBase::Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), main(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::PrintROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageBase::UnsetROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void ImageBase::GetROICorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 904 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

void ImageBase::GetROICorners | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 892 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), and BIAS::Image< StorageType >::operator/=().

const unsigned int ImageBase::GetROILowerRightX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 931 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROILowerRightY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 938 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 917 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 924 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

int ImageBase::GetSize ( const enum BIAS::ImageBase::EStorageType & storagetype ) [static, inherited]

get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1120 of file ImageBase.cpp.

References BIASBREAK, BIASERR, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedint.

unsigned int BIAS::ImageBase::GetSize ( ) const [inline, inherited]

returns the image size in bytes = count - NOT the dimension

Definition at line 239 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and MainFrame::OnInfo().

enum EStorageType BIAS::ImageBase::GetStorageType ( ) const [inline, inherited]

Definition at line 273 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::Convert(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoSource::InitImage(), main(), BIAS::GuiGTK::MouseMotionCallback_(), MainFrame::OnInfo(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ImageBase::Pad(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), Scale(), BIAS::ROI::SetMaskImage(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::PMDImageProc::Write().

template<class StorageType>
double BIAS::Camera< StorageType >::GetTime ( ) [inline]

Definition at line 124 of file Camera.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::GetTime | ( | long int & | sec,
 |  | long int & | usec
 | ) | [inline]

Definition at line 121 of file Camera.hh.

const BIAS::UUID& BIAS::ImageBase::GetUID ( ) const [inline, inherited]

returns the UUID of the image

Examples:
ExampleImageLoad.cpp.

Definition at line 298 of file ImageBase.hh.

Referenced by main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

int BIAS::ImageBase::GetVersionNumber ( ) const [inline, inherited]

Definition at line 307 of file ImageBase.hh.

Referenced by MainFrame::OnInfo(), and BIAS::operator<<().

unsigned int BIAS::ImageBase::GetWidth ( ) const [inline, inherited]

Definition at line 222 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::WrapBias2Ipl::Consistent(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), MainFrame::FitSizetIfTooSmall(), BIAS::ImageBase::Flip(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::ImageBase::GetWidthStep ( ) const [inline, inherited]

returns the number of bytes per line

returns the number of bytes per line, not the number of StorageTypes

interleaved data order: = Width * Depth * ChannelCount planar data order: = Width * Depth

Useful for memory aligned images (e.g. 4/8 Byte) and packing of textures. JW

Definition at line 267 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), and BIAS::ImageBase::SetOutsideROIZero().

void ImageBase::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

Initialize image size and channels.

Warning:
call this only for empty images, calls new for the image data array. Overwrites the color model with some kind of best guess
Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes

Definition at line 117 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ROI::Resize(), BIAS::ImageBase::Roi_, BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, StorageType, BIAS::ImageBase::StorageType_, BIAS::ROI::UnsetROI(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

template<class StorageType>
void BIAS::Image< StorageType >::Init | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

calls Init from ImageBase storageType is ignored, just dummy argument

Definition at line 363 of file Image.cpp.

References BIAS::ImageBase::Init(), and BIAS::ImageBase::StorageType_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::GenSynthMatches::_Draw(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), ComputeCutoutImage(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), createst2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), cut(), deflate_JPEG_file(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::LabelInit_(), main(), mainloop(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mytoplanar(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::UnVignette::PrepareLuImage_(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::VideoStream::SplitIntoFiles(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::MatlabTBUndistortion::UndistortFast().

template<class StorageType>
void Camera::Init_ ( ) [protected]

called by constructors to init all fields

Definition at line 38 of file Camera.cpp.

References BIAS::Camera< StorageType >::_C, BIAS::Camera< StorageType >::_f, BIAS::Camera< StorageType >::_K, BIAS::Camera< StorageType >::_Point, BIAS::Camera< StorageType >::_R, BIAS::Camera< StorageType >::ASCIIValid_, BIAS::Camera< StorageType >::CValid_, BIAS::Camera< StorageType >::fValid_, BIAS::Camera< StorageType >::KValid_, BIAS::Camera< StorageType >::Orientation_, BIAS::Camera< StorageType >::OrientationValid_, BIAS::Camera< StorageType >::P_, BIAS::Camera< StorageType >::PointValid_, BIAS::Camera< StorageType >::ProjValid_, BIAS::Camera< StorageType >::PValid_, BIAS::Camera< StorageType >::RValid_, BIAS::HomgPoint2D::Set(), BIAS::Vector3< T >::Set(), BIAS::Matrix< T >::SetZero(), BIAS::Camera< StorageType >::TimeSec_, BIAS::Camera< StorageType >::TimeUSec_, and BIAS::Camera< StorageType >::TimeValid_.

Referenced by BIAS::Camera< StorageType >::Camera().

template<class StorageType>
int BIAS::Image< StorageType >::InitWithForeignData | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | void * | data,
 |  | const bool | interleaved = true
 | ) | [inherited]

This is used to construct a BIAS::Image hull around existing image data.

Be sure to ClearDataPointer() _before_ destructing the Image object to avoid deletion of the data array

Author:
evers

Definition at line 1044 of file Image.cpp.

References BIAS::ImageBase::Init(), BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), and BIAS::ImageBase::StorageType_.

Referenced by main(), and BIAS::PMDImageProc::Read().

template<class StorageType>
double BIAS::Image< StorageType >::InterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

interpolation with weights according to distances to x and y

Definition at line 775 of file Image.hh.

void BIAS::ImageBase::InvalidateUID ( ) [inline, inherited]

sets the image's uid to invalid

Definition at line 341 of file ImageBase.hh.

References BIAS::UUID::Invalidate().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::ImageIO::ImportOpenEXR().

template<class StorageType>
bool BIAS::Camera< StorageType >::IsCValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 190 of file Camera.hh.

bool BIAS::ImageBase::IsEmpty ( ) const [inline, inherited]

check if ImageData_ points to allocated image buffer or not

Definition at line 177 of file ImageBase.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), deflate_JPEG_file(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::ImageConvert::FromInterleaved(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ColorSegmentation::GetGreyImage(), BIAS::ColorSegmentation::GetHueImage(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ColorSegmentation::GetSatImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::VideoSource::InitImage(), BIAS::ImageConvert::Ipl2BIAS(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), mirror(), BIAS::ImageBase::operator=(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::PMDImageProc::Read(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageBase::Release(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), MainFrame::SaveUnVignetted(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::StealImage(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::PMDImageProc::Write().

template<class StorageType>
bool BIAS::Camera< StorageType >::IsfValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 196 of file Camera.hh.

const bool BIAS::ImageBase::IsInROI | ( | double & | x,
 |  | double & | y
 | ) | const [inline, inherited]

Definition at line 419 of file ImageBase.hh.

bool BIAS::ImageBase::IsInterleaved ( ) const [inline, inherited]

Definition at line 313 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), mytoplanar(), MainFrame::OnInfo(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2().

template<class StorageType>
bool BIAS::Camera< StorageType >::IsKValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 184 of file Camera.hh.

template<class StorageType>
bool BIAS::Camera< StorageType >::IsOrientationValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 178 of file Camera.hh.

bool BIAS::ImageBase::IsPlanar ( ) const [inline, inherited]

Definition at line 310 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageConvert::Convert(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageConvert::IP_RGBToGrey_(), MainFrame::OnInfo(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

template<class StorageType>
bool BIAS::Camera< StorageType >::IsPointValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 193 of file Camera.hh.

bool BIAS::ImageBase::IsPositionInImage | ( | const int & | x,
 |  | const int & | y
 | ) | const [inline, inherited]

check if image contains that pixel position

Definition at line 781 of file ImageBase.hh.

Referenced by BIAS::EpipolarLine::DrawWhole().

bool ImageBase::IsPowerOfTwoSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [static, inherited]

Definition at line 810 of file ImageBase.cpp.

bool ImageBase::IsPowerOfTwoSize ( ) const [inherited]

Returns:
true if image size is a power of two JW

Definition at line 800 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::ImgObjGL::CreateGLTexture(), and BIAS::ImageCanvasGLBase::ValidTexobj().

template<class StorageType>
bool BIAS::Camera< StorageType >::IsProjValid ( ) const [inline]

Definition at line 198 of file Camera.hh.

template<class StorageType>
bool BIAS::Camera< StorageType >::IsPValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 181 of file Camera.hh.

template<class StorageType>
bool BIAS::Camera< StorageType >::IsRValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 187 of file Camera.hh.

template<class StorageType>
bool BIAS::Camera< StorageType >::IsTimeValid ( ) const [inline]

Is field of data valid or unknown ? if false, the return value of the Get.

..()-function is undefined

Definition at line 175 of file Camera.hh.

template<class StorageType>
double BIAS::Image< StorageType >::LinearInterpolation | ( | const double | x,
 |  | const unsigned int | y
 | ) | const [inline, inherited]

Definition at line 758 of file Image.hh.

template<class StorageType>
double BIAS::Image< StorageType >::LinearInterpolation | ( | const unsigned int | x,
 |  | const double | y
 | ) | const [inline, inherited]

Definition at line 741 of file Image.hh.

template<>
int BIAS::Image< int >::MaxSTValue ( ) [inline, inherited]

Definition at line 602 of file Image.hh.

template<>
char BIAS::Image< char >::MaxSTValue ( ) [inline, inherited]

Definition at line 584 of file Image.hh.

template<class StorageType>
StorageType BIAS::Image< StorageType >::MaxSTValue ( ) [inline, inherited]

returns the maximal possible StorageType

Definition at line 571 of file Image.hh.

Referenced by BIAS::Image< StorageType >::Binarize(), and Scale().

template<>
int BIAS::Image< int >::MinSTValue ( ) [inline, inherited]

Definition at line 604 of file Image.hh.

template<>
char BIAS::Image< char >::MinSTValue ( ) [inline, inherited]

Definition at line 586 of file Image.hh.

template<class StorageType>
StorageType BIAS::Image< StorageType >::MinSTValue ( ) [inline, inherited]

returns the minimal possible StorageType

Definition at line 620 of file Image.hh.

Referenced by BIAS::Image< StorageType >::Binarize(), and Scale().

int BIAS::ImageBase::MoveToClosestPositionInImage | ( | int & | x,
 |  | int & | y
 | ) | const [inline, inherited]

find closest valid pixel position to x,y

Author:
koeser 01/2005
Returns:
0=was correct 3,4=y out of range, 1,2 x out of range

Definition at line 785 of file ImageBase.hh.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator * ( const Image< StorageType > & argimage ) [inherited]

Binary Operator * operating pixel values with pixel values of another image, returning a new image.

Definition at line 484 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator * ( const StorageType & argimage ) [inherited]

Binary operator * operating on pixel values with a scalar, returning a new image.

Definition at line 393 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and GRAYTEST.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator *= ( const Image< StorageType > & argimage ) [inherited]

Operator *= operating on pixel values with pixel values of another image.

Definition at line 291 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator *= ( const StorageType & argimage ) [inherited]

Operator *= with scalar on pixel values of an image.

Definition at line 177 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator+ ( const Image< StorageType > & argimage ) [inherited]

Binary Operator + operating pixel values with pixel values of another image, returning a new image.

Definition at line 437 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator+ ( const StorageType & argimage ) [inherited]

Binary operator + operating on pixel values with a scalar, returning a new image.

Definition at line 351 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::Image< StorageType >::Init(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator+= ( const Image< StorageType > & argimage ) [inherited]

Operator += operating on pixel values with pixel values of another image.

Definition at line 241 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator+= ( const StorageType & argimage ) [inherited]

Operator += with scalar on pixel values of an image.

Definition at line 124 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, p, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator- ( const Image< StorageType > & argimage ) [inherited]

Binary Operator - operating pixel values with pixel values of another image, returning a new image.

Author:
Ingo Thomsen tested (18/04/2002)

Definition at line 461 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator- ( const StorageType & argimage ) [inherited]

Binary operator - operating on pixel values with a scalar, returning a new image.

Definition at line 375 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and GRAYTEST.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator-= ( const Image< StorageType > & argimage ) [inherited]

Operator -= operating on pixel values with pixel values of another image.

Definition at line 266 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator-= ( const StorageType & argimage ) [inherited]

Operator -= with scalar on pixel values of an image.

Definition at line 153 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator/ ( const Image< StorageType > & argimage ) [inherited]

Binary Operator / operating pixel values with pixel values of another image, returning a new image.

Definition at line 508 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator/ ( const StorageType & argimage ) [inherited]

Binary operator / operating on pixel values with a scalar, returning a new image.

Definition at line 411 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator/= ( const Image< StorageType > & argimage ) [inherited]

Operator /= operating on pixel values with pixel values of another image.

Definition at line 315 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator/= ( const StorageType & argimage ) [inherited]

Operator /= with scalar on pixel values of an image.

Definition at line 203 of file Operators.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), step(), and StorageType.

template<class StorageType>
Camera< StorageType > Camera::operator= ( const Camera< StorageType > & src )

Definition at line 333 of file Camera.cpp.

References BIAS::Camera< StorageType >::_C, BIAS::Camera< StorageType >::_f, BIAS::Camera< StorageType >::_K, BIAS::Camera< StorageType >::_Point, BIAS::Camera< StorageType >::_R, BIAS::Camera< StorageType >::CValid_, BIAS::Camera< StorageType >::fValid_, BIAS::Camera< StorageType >::KValid_, BIAS::Camera< StorageType >::Orientation_, BIAS::Camera< StorageType >::OrientationValid_, BIAS::Camera< StorageType >::P_, BIAS::Camera< StorageType >::PointValid_, BIAS::Camera< StorageType >::Proj_, BIAS::Camera< StorageType >::ProjValid_, BIAS::Camera< StorageType >::PValid_, BIAS::Camera< StorageType >::RValid_, BIAS::Camera< StorageType >::TimeSec_, BIAS::Camera< StorageType >::TimeUSec_, and BIAS::Camera< StorageType >::TimeValid_.

bool BIAS::ImageBase::operator== ( const ImageBase & img ) [inline, inherited]

comparison operator, based upon the adresses of the actual image data

Author:
Ingo Thomsen tested

Definition at line 449 of file ImageBase.hh.

References BIAS::ImageBase::GetImageData().

template<>
Image< short int > & BIAS::Image< short int >::operator| ( const Image< short int > & argimage ) [inherited]

Definition at line 539 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator| ( const Image< StorageType > & argimage ) [inherited]

logical Operator || operating pixel values with pixel values of another image, returning a new image

Definition at line 532 of file Operators.cpp.

References BIASERR.

int ImageBase::Pad | ( | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | [inherited]

Definition at line 1007 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageBase::Pad().

int ImageBase::Pad | ( | BIAS::ImageBase & | dest,
 |  | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | const [inherited]

Definition at line 1032 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageBase::SetBitDepth().

Referenced by BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::ZeroPad().

int ImageBase::PadToPowerOfTwo ( const int & padVal = 0 ) [inherited]

in place version of the above

Author:
JW

Definition at line 956 of file ImageBase.cpp.

References img, BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

int ImageBase::PadToPowerOfTwo | ( | BIAS::ImageBase & | dest,
 |  | const int & | padVal = 0
 | ) | const [inherited]

increase the size of this image to next power of two (e.g.

384x100>512x128) the original image S is set to upper left rectangle

Parameters:
padVal used by memset to pad the right and lower added pixels No scale, just padding!
    orig xx
    xxxxxxx
Author:
Jan Woetzel 09/2003 - 11/2005

Definition at line 979 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::Pad(), and BIAS::ImageBase::PowerOfTwoSize().

Referenced by BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PadToPowerOfTwoAndFlip().

int ImageBase::PadToPowerOfTwoAndFlip ( const int & padVal = 0 ) [inherited]

first pad, then flip.

useful for OpenGL texture image which must be pow2 size and Y-flipped ics. example:

    0 1 2
    3 4 5
    -->
    x x x x
    x x x x
    3 4 5 x
    0 1 2 x
Todo:
more efficient in place with memmove
Author:
Jan Woetzel

Definition at line 1105 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::Flip(), and BIAS::ImageBase::PadToPowerOfTwo().

template<class StorageType>
int Camera::ParseMetaData ( )

After ImageIO::Load() operated on AppData_, this method fills P_, Timestamp, DC_*, .

..

Definition at line 146 of file Camera.cpp.

References BIAS::Camera< StorageType >::ASCIIString_, BIASDOUT, D_CAMERA_METADATA, BIAS::AppData::data, BIAS::AppData::length, BIAS::AppData::MD_ASCII_DATA, BIAS::AppData::MD_USE_ASCII, BIAS::AppData::sdata, and BIAS::AppData::tag.

Referenced by BIAS::VideoSource_Net::GrabSingle(), main(), and BiasShowEpiApp::OnInit().

int ImageBase::Paste2ROI ( const ImageBase & Image ) [inherited]

paste Image to current ROI

Author:
Felix Woelk 02 2003

Definition at line 519 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

Referenced by main(), and BIAS::ImageConvertThreaded::MergeImage_().

template<class StorageType>
StorageType BIAS::Image< StorageType >::PixelValue | ( | const unsigned int | x,
 |  | const unsigned int | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved image)

Definition at line 635 of file Image.hh.

Referenced by MainFrame::CalcImageMean3x3(), and BIAS::PMDImageProc::CalcSigmaDepth().

void * ImageBase::PixelValueBase | ( | unsigned | x,
 |  | unsigned | y,
 |  | unsigned | channel = 0
 | ) | [inherited]

Definition at line 852 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

template<class StorageType>
StorageType BIAS::Image< StorageType >::PixelValueInterleaved | ( | const int | x,
 |  | const int | y,
 |  | const int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Faster than PixelValue because it has no error check, works only for interleaved images

Author:
Johan Skoglund
Date:
06/10/2004 untested

Definition at line 650 of file Image.hh.

bool ImageBase::PowerOfTwoSize | ( | unsigned int & | width2,
 |  | unsigned int & | height2
 | ) | const [inherited]

Returns:
true if both, width and height are already a power of two. The next power of two size >= actual size is computed and stored in args. useful for OpenGL texture enlargement for 'power of two' textures.
Author:
Jan Woetzel 09/2003

Definition at line 821 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::PowerOfTwoSize().

unsigned int ImageBase::PowerOfTwoSize ( const unsigned int & val ) [static, inherited]

Returns:
next pow2 >= val JW

Definition at line 831 of file ImageBase.cpp.

References res.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

template<class StorageType>
void BIAS::Camera< StorageType >::PrintAppData ( std::ostream & os )

see whats in the camera, for debug

Referenced by main().

template<class StorageType>
std::ostream & BIAS::Image< StorageType >::PrintData ( std::ostream & os ) const [inherited]

writes data of IplImage_ to os (ascii)

Definition at line 383 of file Image.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::ImageData_, and StorageType.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::ImageBase::PrintHeader ( std::ostream & os = std::cout ) const [inherited]

Referenced by BIAS::ImageIO::ImportMagickPP(), main(), and mainloop().

template<class StorageType>
std::ostream & BIAS::Image< StorageType >::PrintPointer ( std::ostream & os ) const [inherited]

writes pointer of IplImage_ to os (ascii)

Definition at line 372 of file Image.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::ImageData_, and BIAS::ImageBase::ImageDataArray_.

void ImageBase::PrintROI ( std::ostream & os = std::cout ) const [inherited]

deprecated, use 'os << *GetROI()'

Definition at line 912 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

template<class StorageType>
Image< float > BIAS::Image< StorageType >::Reciprocal | ( | const float | factor = 1.0,
 |  | const unsigned short int | channel = 0
 | ) | [inherited]

Jan Woetzel 01/2003.

Returns:
the reciprocal for each pixel: x' = 1/x computes for exactly one channel (in case of multi channel images) returns float/double image
Author:
Jan Woetzel 01/2003

Definition at line 1007 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), res, and StorageType.

void BIAS::ImageBase::RedirectImageDataPointer ( void * data ) [inline, inherited]

This method takes data and set the internal image data pointer to this.

You should really know what you are doing using this method. Don't say you haven't been warned.

Author:
Friso Evers

Definition at line 549 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

template<class StorageType>
void BIAS::Image< StorageType >::Release ( ) [inherited]

reimplemented from ImageBase

Reimplemented from BIAS::ImageBase.

Definition at line 989 of file Image.cpp.

References BIAS::ImageBase::_MetaData, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::ColorModel_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetROI(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ROI::Release(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), createst2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::LabelRelease_(), main(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mytoplanar(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::PMDImageProc::Read(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::MySampleGrabberCB::~MySampleGrabberCB().

void BIAS::ImageBase::ReleaseImageDataPointer ( ) [inline, inherited]

Releases ImageData_ (to be used together with RedirectImageDataPointer).

Author:
Felix woelk

Definition at line 761 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::ImageBase::SamePixelAndChannelCount ( const ImageBase & Image ) const [inline, inherited]

checks if data area has same "size" as Image of other type

Definition at line 749 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::VideoSource_Net::GrabSingle(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::Label4Neighbour(), main(), mytoplanar(), BIAS::ImageBase::operator=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Label::Process(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB(), and BIAS::ImageConvert::ToPlanar().

template<class StorageType>
int BIAS::Image< StorageType >::ScaleShift | ( | double | Scale,
 |  | double | Shift
 | ) | [inherited]

scales and shifts image (all channels simultanously)

does scale and shift every channel with same factor so that (max of all channels) = Max and (min of all channels) = Min. First shifts, then scales.

Author:
Felix Woelk

Definition at line 788 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by Draw(), BIAS::Image< StorageType >::ScaleShiftBetween(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
int BIAS::Image< StorageType >::ScaleShiftBetween | ( | double | Min,
 |  | double | Max
 | ) | [inherited]

scales and shifts image so afterwards every pixel has a value between Min and Max

scales and shifts every channel with same factor

Author:
Felix Woelk

Definition at line 801 of file Image.cpp.

References BIASERR, BIAS::Image< StorageType >::CalcScaleShift(), res, and BIAS::Image< StorageType >::ScaleShift().

Referenced by BIAS::GuiBase::ConvertToUC_(), and Scale().

template<class StorageType>
void BIAS::Camera< StorageType >::SetASCIIString ( const std::string & ASCIIString ) [inline]

Definition at line 102 of file Camera.hh.

Referenced by BIAS::MDcam::GrabSingle().

void BIAS::ImageBase::SetBitDepth ( unsigned bitdepth ) [inline, inherited]

needed by ImageIO

Definition at line 334 of file ImageBase.hh.

References BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR(), and BIAS::ImageBase::Pad().

template<class StorageType>
void BIAS::Camera< StorageType >::SetC ( const Vector3< double > & C ) [inline]

Definition at line 144 of file Camera.hh.

Referenced by main().

void BIAS::ImageBase::SetColorModel ( EColorModel Model ) [inline, inherited]

Definition at line 327 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), createst(), createst2(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageBase::Init(), main(), mytoplanar(), BIAS::PMDImageProc::Read(), BIAS::ImageConvert::ToHSL(), and BIAS::ImageConvert::ToInterleavedRGB_().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::Camera< StorageType >::Setf ( const double & focal ) [inline]

Definition at line 153 of file Camera.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageBase::SetInterleaved ( bool interleaved ) [inline, inherited]

Definition at line 330 of file ImageBase.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::SetK ( const KMatrix & K ) [inline]

Definition at line 150 of file Camera.hh.

Referenced by main().

void BIAS::ImageBase::SetMetaData ( const MetaData & m ) [inline, inherited]

Definition at line 304 of file ImageBase.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::SetOrientation ( const BIAS::Vector3< double > & ori ) [inline]

Definition at line 132 of file Camera.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::SetOrientation ( const float ori[3] ) [inline]

Definition at line 128 of file Camera.hh.

void ImageBase::SetOutsideROIZero ( ) [inherited]

sets all pixel not in ROI to zero

Author:
woelk 10/2004

Definition at line 585 of file ImageBase.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::GetWidthStep().

Referenced by main().

template<class StorageType>
int BIAS::Camera< StorageType >::SetP ( const PMatrix & matP ) [inline]

Definition at line 92 of file Camera.hh.

Referenced by main().

template<class StorageType>
void BIAS::Image< StorageType >::SetPixel | ( | const StorageType & | value0,
 |  | const StorageType & | value1,
 |  | const StorageType & | value2,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y
 | ) | [inline, inherited]

set the values of the first three channels of a given pixel (x,y) in channel to value[0.

.2].

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

Definition at line 723 of file Image.hh.

template<class StorageType>
void BIAS::Image< StorageType >::SetPixel | ( | const StorageType & | value,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y,
 |  | const unsigned short int | channel = 0
 | ) | [inline, inherited]

set the value of a given pixel (x,y) in channel to value.

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

Definition at line 702 of file Image.hh.

Referenced by MainFrame::DrawDistortedLine(), and main().

template<class StorageType>
int BIAS::Camera< StorageType >::SetProj ( const Projection & Proj ) [inline]

Definition at line 96 of file Camera.hh.

Referenced by main().

template<class StorageType>
void BIAS::Camera< StorageType >::SetR ( const RMatrix & R ) [inline]

Definition at line 147 of file Camera.hh.

Referenced by main().

int ImageBase::SetROI | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

deprecated, use SetROICorners()

Definition at line 866 of file ImageBase.cpp.

References BIAS::ImageBase::SetROICorners().

Referenced by BIAS::ThreeDOut::AddImage(), BIAS::ImageConvert::BayerToRGBSlow_(), main(), mysobel(), mysobel2(), and BIAS::VideoSource::SoftwareWhiteBalance().

int ImageBase::SetROICorners | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

Definition at line 873 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by main(), and BIAS::ImageBase::SetROI().

template<class StorageType>
void BIAS::Camera< StorageType >::SetTime ( double sec ) [inline]

set time from double (in seconds)

Definition at line 117 of file Camera.hh.

template<class StorageType>
void BIAS::Camera< StorageType >::SetTime | ( | long int | sec,
 |  | long int | usec
 | ) | [inline]

Definition at line 113 of file Camera.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

void BIAS::ImageBase::SetUID ( const BIAS::UUID & id ) [inline, inherited]

Definition at line 337 of file ImageBase.hh.

Referenced by BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::ProcessOneImage(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::ImageBase::SetZero ( ) [inline, inherited]

zeroes the image

Definition at line 754 of file ImageBase.hh.

Referenced by main().

int ImageBase::StealImage ( ImageBase & source ) [inherited]

steals the image data array from source, after releasing the actual image data and sets source image data to NULL

Warning:
Important for template: Steal images only, if u know the storageTypes are euqal!
Author:
Daniel Grest tested

Definition at line 304 of file ImageBase.cpp.

References BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::ImageConvert::Convert(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), and BIAS::ImageConvert::ToGrey().

void ImageBase::UnsetROI ( ) [inherited]

deprecated, use GetROI()->UnsetROI()

Definition at line 882 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::UnsetROI().

Referenced by BIAS::ImageBase::Cut2ROI(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

int ImageBase::UpdateImageDataArrayFromImageData_ ( ) [protected, inherited]

recomputes pointer array returned by GetImageDataArray

Definition at line 230 of file ImageBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), and BIAS::ImageBase::Init().

template<class StorageType>
int Camera::UpdateMetaData ( )

copy P_ and co.

back to MetaData before useful before ImageIO::Write() or ImageIO::ExportImage

Definition at line 377 of file Camera.cpp.

References BIAS::Camera< StorageType >::ASCIIString_, BIAS::Camera< StorageType >::ASCIIValid_, BIASDOUT, and BIAS::AppData::MD_ASCII_DATA.

Referenced by main().

int ImageBase::ZeroPad | ( | const unsigned int | newwidth,
 |  | const unsigned int | newheight,
 |  | unsigned char | bgcolor = 0
 | ) | [inherited]

backward compatibility interface for Pad.

DEPRECATED

Author:
Jan Woetzel 2005

Definition at line 947 of file ImageBase.cpp.

References BIAS::ImageBase::Pad().

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img
 | ) | [friend, inherited]

Definition at line 1234 of file ImageBase.cpp.

BIASImageBase_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) | [friend, inherited]

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

Member Data Documentation

template<class StorageType>
Vector3<double> BIAS::Camera< StorageType >::_C [protected]

camera center in wcs

Definition at line 247 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
double BIAS::Camera< StorageType >::_f [protected]

focal length in m

Definition at line 257 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
KMatrix BIAS::Camera< StorageType >::_K [protected]

camera calibration with internals

Definition at line 237 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

MetaData BIAS::ImageBase::_MetaData [protected, inherited]

additional data block, handled by derived classes

Definition at line 679 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

template<class StorageType>
HomgPoint2D BIAS::Camera< StorageType >::_Point [protected]

a point, it is up to you what you put in

Definition at line 252 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
RMatrix BIAS::Camera< StorageType >::_R [protected]

camera orientation

Definition at line 242 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

BIAS::UUID BIAS::ImageBase::_UID [protected, inherited]

unique id for every image

Definition at line 677 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), and BIAS::operator>>().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
std::string BIAS::Camera< StorageType >::ASCIIString_ [protected]

ASCII multifunctional string.

Definition at line 211 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::ParseMetaData(), and BIAS::Camera< StorageType >::UpdateMetaData().

template<class StorageType>
bool BIAS::Camera< StorageType >::ASCIIValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 213 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::UpdateMetaData().

unsigned int BIAS::ImageBase::BitDepth_ [protected, inherited]

relevant bits per pixel per channel

Definition at line 661 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::ChannelCount_ [protected, inherited]

number of channels per pixel

Definition at line 657 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

enum EColorModel BIAS::ImageBase::ColorModel_ [protected, inherited]

the color model of the pixels

Definition at line 653 of file ImageBase.hh.

Referenced by BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

template<class StorageType>
bool BIAS::Camera< StorageType >::CValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 249 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

unsigned int BIAS::ImageBase::Depth_ [protected, inherited]

size of one channel of one pixel in bytes

Definition at line 659 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

template<class StorageType>
bool BIAS::Camera< StorageType >::fValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 259 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ImageBase::Height_ [protected, inherited]

image height in pixels

Definition at line 665 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

void* BIAS::ImageBase::ImageData_ [protected, inherited]

a pointer to the image data

Definition at line 675 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::~ImageBase().

void** BIAS::ImageBase::ImageDataArray_ [protected, inherited]

array of pointers to the first byte in an image row

Definition at line 673 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::ImageBase::~ImageBase().

bool BIAS::ImageBase::InterleavedDataOrder_ [protected, inherited]

planar or interleaved: planar means we have several image planes, e.g.

for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB

Definition at line 669 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

template<class StorageType>
bool BIAS::Camera< StorageType >::KValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 239 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
float BIAS::Camera< StorageType >::Orientation_[3] [protected]

orientation data from sensor ?

Definition at line 223 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
bool BIAS::Camera< StorageType >::OrientationValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 225 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
PMatrix BIAS::Camera< StorageType >::P_ [protected]

pmatrix, maybe non-metric

Definition at line 228 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
bool BIAS::Camera< StorageType >::PointValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 254 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
Projection BIAS::Camera< StorageType >::Proj_ [protected]

Definition at line 233 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::operator=().

template<class StorageType>
bool BIAS::Camera< StorageType >::ProjValid_ [protected]

Definition at line 234 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
bool BIAS::Camera< StorageType >::PValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 230 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

ROI BIAS::ImageBase::Roi_ [protected, inherited]

roi object

Definition at line 681 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), and BIAS::ImageBase::Release().

template<class StorageType>
bool BIAS::Camera< StorageType >::RValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 244 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

enum EStorageType BIAS::ImageBase::StorageType_ [protected, inherited]

the storage type in a pixel channel

Definition at line 655 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator<<(), and BIAS::ImageBase::Release().

template<class StorageType>
long int BIAS::Camera< StorageType >::TimeSec_ [protected]

time stamp in seconds

Definition at line 216 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
long int BIAS::Camera< StorageType >::TimeUSec_ [protected]

time stamp in microseconds

Definition at line 218 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

template<class StorageType>
bool BIAS::Camera< StorageType >::TimeValid_ [protected]

is correspondig field of data valid or unknown ?

Definition at line 220 of file Camera.hh.

Referenced by BIAS::Camera< StorageType >::Init_(), and BIAS::Camera< StorageType >::operator=().

const int BIAS::ImageBase::Version_ = VERSION_NUMBER [static, protected, inherited]

version number of imagebase class

Definition at line 651 of file ImageBase.hh.

unsigned int BIAS::ImageBase::Width_ [protected, inherited]

image width in pixels

Definition at line 663 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned int BIAS::ImageBase::WidthStep_ [protected, inherited]

size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Definition at line 671 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

The documentation for this class was generated from the following files:
  • Image/Camera.hh
  • Image/Camera.cpp
Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraData Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraData

BIAS::CameraData Struct Reference

#include <Geometry/ProjectionParametersIO.hh>

Collaboration diagram for BIAS::CameraData:

[legend]
List of all members.

Public Attributes

std::vector< double > | AngleCorrX_
std::vector< double > | AngleCorrY_
double | aspectratio_
int | CamID_
std::string | CamModel_
double | cellSizeX_
double | cellSizeY_
double | focallengthDef_
unsigned int | height_
std::vector< double > | IlluCorrX_
std::vector< double > | IlluCorrY_
double | kc1Def_
double | kc2Def_
double | kc3Def_
double | kc4Def_
std::vector< CPDiscreteParam > | knownparams_vect_
bool | LensIsSpherical_
std::string | LensModel_
double | MaxCamAngle_
BIAS::Vector3< double > | PoseInRigCenter_
double | PoseInRigPitch_
double | PoseInRigRoll_
double | PoseInRigYaw_
double | principalX_
double | principalY_
double | radius_
unsigned int | width_
bool | zoomCamera_

Detailed Description

Definition at line 68 of file ProjectionParametersIO.hh.

Member Data Documentation

std::vector<double> BIAS::CameraData::AngleCorrX_

Definition at line 117 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().

std::vector<double> BIAS::CameraData::AngleCorrY_

Definition at line 118 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraData::aspectratio_

Definition at line 85 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

int BIAS::CameraData::CamID_

Definition at line 72 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

std::string BIAS::CameraData::CamModel_

Definition at line 71 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::cellSizeX_

Definition at line 88 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::cellSizeY_

Definition at line 88 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::focallengthDef_

Definition at line 103 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadFromEXIF(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

unsigned int BIAS::CameraData::height_

Definition at line 82 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

std::vector<double> BIAS::CameraData::IlluCorrX_

Definition at line 112 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().

std::vector<double> BIAS::CameraData::IlluCorrY_

Definition at line 113 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraData::kc1Def_

Definition at line 104 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize().

double BIAS::CameraData::kc2Def_

Definition at line 104 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize().

double BIAS::CameraData::kc3Def_

Definition at line 104 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize().

double BIAS::CameraData::kc4Def_

Definition at line 104 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize().

std::vector<CPDiscreteParam> BIAS::CameraData::knownparams_vect_

Definition at line 107 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

bool BIAS::CameraData::LensIsSpherical_

Definition at line 79 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

std::string BIAS::CameraData::LensModel_

Definition at line 73 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::MaxCamAngle_

Definition at line 97 of file ProjectionParametersIO.hh.

BIAS::Vector3<double> BIAS::CameraData::PoseInRigCenter_

Definition at line 121 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), and BIAS::ProjectionParametersIO::SetData_DummyRig().

double BIAS::CameraData::PoseInRigPitch_

Definition at line 123 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), and BIAS::ProjectionParametersIO::SetData_DummyRig().

double BIAS::CameraData::PoseInRigRoll_

Definition at line 124 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), and BIAS::ProjectionParametersIO::SetData_DummyRig().

double BIAS::CameraData::PoseInRigYaw_

Definition at line 122 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), and BIAS::ProjectionParametersIO::SetData_DummyRig().

double BIAS::CameraData::principalX_

Definition at line 91 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::principalY_

Definition at line 91 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

double BIAS::CameraData::radius_

Definition at line 94 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), and BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().

unsigned int BIAS::CameraData::width_

Definition at line 82 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadFromEXIF(), BIAS::ProjectionParametersIO::SetData_EVID31_147094(), BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(), and BIAS::ProjectionParametersIO::SetFromKMatrix().

bool BIAS::CameraData::zoomCamera_

Definition at line 76 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::Initialize(), operator<<(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

The documentation for this struct was generated from the following file:
  • Geometry/ProjectionParametersIO.hh
Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraParam Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraParam

BIAS::CameraParam Class Reference

#include <Image/CameraParam.hh>

Inheritance diagram for BIAS::CameraParam:

[legend]
Collaboration diagram for BIAS::CameraParam:

[legend]
List of all members.

Public Member Functions

int | AddCameraDataToRig (XMLIO &myXML, xmlNodePtr &cameraDataNode) const
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.
CameraParam (XMLIO &myXML, xmlNodePtr &cameraNode)
CameraParam (const std::string &filename)
CameraParam (const KMatrix &K, const int w, const int h)
pass K and image dims to construct a simple parameter file
CameraParam (const CameraParam &cp)
CameraParam ()
void | DebugOut () const
std::vector< double > | GetAngleCorrX () const
std::vector< double > | GetAngleCorrY () const
double | GetAspectRatio () const
double | GetAspectratio () const
int | GetCamID () const
double | GetCellSizeX ()
double | GetCellSizeY ()
void | GetDefaultUndistortion (double &f, double &kc1, double &kc2, double &kc3, double &kc4) const
double | GetDownsamplingFactor ()
double | GetFocalLength () const
Get the current camera focal length.
unsigned int | GetHeight () const
get camera image height.
std::vector< double > | GetIlluCorrX () const
std::vector< double > | GetIlluCorrY () const
BIAS::KMatrix | GetKMatrix () const
double | GetPrincipalX () const
get principal point, x in pixels relative to top left corner
double | GetPrincipalY () const
get principal point, y in pixels relative to top left corner
double | GetRadius () const
unsigned int | GetWidth () const
get camera image width.
double | GetZoom () const
Set the current camera zoom, the focal length will be calculated.
void | GetZoomUndistortion (std::vector< CPDiscreteParam > &vp) const
int | Init (XMLIO &myXML, xmlNodePtr &cameraNode)
int | Init (const std::string &filename)
void | Init (const CameraParam &cp)
void Init ()
void | InitPerspective (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
void | InitSpherical (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
bool | IsInitialized () const
bool | IsPerspective () const
bool | IsSpherical () const
bool | IsZoomCamera () const
True, if camera has a zoom lens.
int | ReadCameraData (XMLIO &myXML, xmlNodePtr &cameraNode)
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.
int | ReadCameraData (const std::string &Filename)
Read a camera data parameter file and store the data in (*this).
int | ReadFromEXIF (const std::string &filename)
read jpeg EXIF header and set camera parameter
void | SetCellSize (const double CellSizeX, const double AspectRatio)
Set CCD cell-size in meter.
void SetData_EVID31_147094 ()
void SetData_OMNITECH_ORIFL_190_3 ()
void | SetDownsampling (const double factor)
Set downsampling factor - all get functions will return transformed values.
void | SetFocalLength (const double f)
Set the current camera focal length, the zoom will be calculated.
void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
double | SetRadius (double r)
void | SetSize (unsigned int w, unsigned int h)
set size of image seperatly
void SetUnzoomed ()
Set the zoom and focal length of a zoom camera to the default settings.
void | SetZoom (const double abszoom)
Set the current camera zoom, the focal length will be calculated.
void | SetZoomCamera (const bool zoomCam)
Set to 'true', if camera has a zoom lens.
int | WriteCameraData (const std::string &Filename) const
Write all data to a camera data parameter file ).
~CameraParam ()

Protected Member Functions

int | AddCameraDataToXMLTree (XMLIO &myXML, xmlNodePtr &rootNode) const
double | InterpolateAbsZoom_ ()
double | InterpolateFocalLength_ ()
int | ReadCameraDataV0_8 (XMLIO &myXML, xmlNodePtr &cameraNode)
int | ReadCameraDataV1_0 (XMLIO &myXML, xmlNodePtr &cameraNode)

Protected Attributes

std::vector< double > | AngleCorrX_
std::vector< double > | AngleCorrY_
double | aspectratio_
int | CamID_
std::string | CamModel_
double | cellSizeX_
double | cellSizeY_
double | downsamplingFactor_
double | focallengthDef_
double | focallengthZoom_
unsigned int | height_
std::vector< double > | IlluCorrX_
std::vector< double > | IlluCorrY_
bool | IsInitialized_
double | kc1Def_
double | kc2Def_
double | kc3Def_
double | kc4Def_
std::vector< CPDiscreteParam > | knownparams_vect_
bool | LensIsSpherical_
std::string | LensModel_
double | MaxCamAngle_
double | principalX_
double | principalY_
double | radius_
unsigned int | width_
double | zoom_
bool | zoomCamera_

Detailed Description

Definition at line 55 of file CameraParam.hh.

Constructor & Destructor Documentation

CameraParam::CameraParam ( )

Definition at line 56 of file CameraParam.cpp.

References Init().

CameraParam::CameraParam ( const CameraParam & cp )

Definition at line 61 of file CameraParam.cpp.

References Init().

CameraParam::CameraParam | ( | const KMatrix & | K,
 |  | const int | w,
 |  | const int | h
 | ) |

pass K and image dims to construct a simple parameter file

Definition at line 1576 of file CameraParam.cpp.

References aspectratio_, CamID_, CamModel_, cellSizeY_, focallengthDef_, height_, Init(), IsInitialized_, knownparams_vect_, LensModel_, width_, and zoomCamera_.

CameraParam::CameraParam ( const std::string & filename )

Definition at line 67 of file CameraParam.cpp.

References Init(), and IsInitialized_.

CameraParam::CameraParam | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) |

Definition at line 76 of file CameraParam.cpp.

References Init(), and IsInitialized_.

CameraParam::~CameraParam ( )

Definition at line 83 of file CameraParam.cpp.

Member Function Documentation

int CameraParam::AddCameraDataToRig | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraDataNode
 | ) | const

Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
cameraDataNode | points to a "CameraData"-node to append the "Camera"-node
Author:
streckel 06/2004

Definition at line 377 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), AddCameraDataToXMLTree(), BIAS::XMLIO::addChildNode(), BIASERR, and IsInitialized_.

int CameraParam::AddCameraDataToXMLTree | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | rootNode
 | ) | const [protected]

Definition at line 397 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), AngleCorrX_, AngleCorrY_, aspectratio_, BIASERR, CamID_, CamModel_, cellSizeX_, height_, IsInitialized_, LensIsSpherical_, LensModel_, and width_.

Referenced by AddCameraDataToRig(), and WriteCameraData().

void CameraParam::DebugOut ( ) const

Definition at line 1275 of file CameraParam.cpp.

References CamID_, CamModel_, height_, IsInitialized_, knownparams_vect_, LensModel_, width_, and zoomCamera_.

Referenced by main().

std::vector<double> BIAS::CameraParam::GetAngleCorrX ( ) const [inline]

Definition at line 244 of file CameraParam.hh.

std::vector<double> BIAS::CameraParam::GetAngleCorrY ( ) const [inline]

Definition at line 247 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectRatio ( ) const [inline]

Definition at line 236 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectratio ( ) const [inline]

Definition at line 167 of file CameraParam.hh.

References BIASERR.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

int BIAS::CameraParam::GetCamID ( ) const [inline]

Definition at line 191 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeX ( ) [inline]

Definition at line 142 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeY ( ) [inline]

Definition at line 143 of file CameraParam.hh.

void BIAS::CameraParam::GetDefaultUndistortion | ( | double & | f,
 |  | double & | kc1,
 |  | double & | kc2,
 |  | double & | kc3,
 |  | double & | kc4
 | ) | const [inline]

Definition at line 214 of file CameraParam.hh.

double CameraParam::GetDownsamplingFactor ( )

Definition at line 292 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, and IsInitialized_.

double CameraParam::GetFocalLength ( ) const

Get the current camera focal length.

Author:
buck

Definition at line 275 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, focallengthDef_, focallengthZoom_, IsInitialized_, IsPerspective(), and zoomCamera_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and GetKMatrix().

unsigned int CameraParam::GetHeight ( ) const

get camera image height.

Author:
buck

Definition at line 218 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, height_, and IsInitialized_.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrX ( ) const [inline]

Definition at line 250 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrY ( ) const [inline]

Definition at line 253 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

KMatrix CameraParam::GetKMatrix ( ) const

Definition at line 179 of file CameraParam.cpp.

References aspectratio_, BIASERR, GetFocalLength(), IsPerspective(), K, principalX_, principalY_, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::RigParameter::ReadRigDataV0_8(), and BIAS::RigParameter::SetData_DummyRig().

double CameraParam::GetPrincipalX ( ) const

get principal point, x in pixels relative to top left corner

Author:
buck

Definition at line 200 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, IsInitialized_, and principalX_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double CameraParam::GetPrincipalY ( ) const

get principal point, y in pixels relative to top left corner

Author:
buck

Definition at line 209 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, IsInitialized_, and principalY_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double BIAS::CameraParam::GetRadius ( ) const [inline]

Definition at line 195 of file CameraParam.hh.

unsigned int CameraParam::GetWidth ( ) const

get camera image width.

Author:
buck

Definition at line 226 of file CameraParam.cpp.

References BIASERR, downsamplingFactor_, IsInitialized_, and width_.

Referenced by BIAS::UnVignette::UnVignette().

double CameraParam::GetZoom ( ) const

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Definition at line 259 of file CameraParam.cpp.

References BIASERR, IsInitialized_, IsPerspective(), zoom_, and zoomCamera_.

void BIAS::CameraParam::GetZoomUndistortion ( std::vector< CPDiscreteParam > & vp ) const [inline]

Definition at line 225 of file CameraParam.hh.

References it.

int CameraParam::Init | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) |

Reimplemented in BIAS::SphericalUndistortion.

Definition at line 165 of file CameraParam.cpp.

References IsInitialized_, ReadCameraData(), and res.

int CameraParam::Init ( const std::string & filename )

Reimplemented in BIAS::SphericalUndistortion.

Definition at line 155 of file CameraParam.cpp.

References IsInitialized_, ReadCameraData(), and res.

void CameraParam::Init ( const CameraParam & cp )

Reimplemented in BIAS::MatlabTBUndistortion, and BIAS::SphericalUndistortion.

Definition at line 117 of file CameraParam.cpp.

References AngleCorrX_, AngleCorrY_, aspectratio_, CamID_, CamModel_, cellSizeX_, cellSizeY_, downsamplingFactor_, focallengthDef_, focallengthZoom_, height_, IlluCorrX_, IlluCorrY_, IsInitialized_, kc1Def_, kc2Def_, kc3Def_, kc4Def_, knownparams_vect_, LensIsSpherical_, LensModel_, MaxCamAngle_, principalX_, principalY_, radius_, width_, zoom_, and zoomCamera_.

void CameraParam::Init ( )

Definition at line 87 of file CameraParam.cpp.

References AngleCorrX_, AngleCorrY_, aspectratio_, CamID_, CamModel_, cellSizeX_, cellSizeY_, downsamplingFactor_, focallengthDef_, focallengthZoom_, height_, IlluCorrX_, IlluCorrY_, IsInitialized_, kc1Def_, kc2Def_, kc3Def_, kc4Def_, knownparams_vect_, LensIsSpherical_, LensModel_, MaxCamAngle_, principalX_, principalY_, radius_, width_, zoom_, and zoomCamera_.

Referenced by CameraParam(), BIAS::SphericalUndistortion::Init(), BIAS::MatlabTBUndistortion::Init(), BIAS::MatlabTBUndistortion::MatlabTBUndistortion(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

void BIAS::CameraParam::InitPerspective | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | focallength,
 |  | const double | aspectratio,
 |  | const double | k1,
 |  | const double | k2,
 |  | const double | k3,
 |  | const double | k4,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) |

void BIAS::CameraParam::InitSpherical | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | radius,
 |  | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) |

double CameraParam::InterpolateAbsZoom_ ( ) [protected]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 1744 of file CameraParam.cpp.

References focallengthZoom_, and knownparams_vect_.

Referenced by SetFocalLength().

double CameraParam::InterpolateFocalLength_ ( ) [protected]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 1701 of file CameraParam.cpp.

References knownparams_vect_, and zoom_.

Referenced by SetZoom().

bool CameraParam::IsInitialized ( ) const

Definition at line 175 of file CameraParam.cpp.

References IsInitialized_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), main(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage(), and BIAS::UnVignette::UnVignette().

bool BIAS::CameraParam::IsPerspective ( ) const [inline]

Definition at line 242 of file CameraParam.hh.

Referenced by GetFocalLength(), GetKMatrix(), GetZoom(), BIAS::MatlabTBUndistortion::Init(), main(), SetFocalLength(), SetUnzoomed(), and SetZoom().

bool BIAS::CameraParam::IsSpherical ( ) const [inline]

Definition at line 240 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::Init(), main(), and BIAS::RigParameter::ReadRigDataV0_8().

bool CameraParam::IsZoomCamera ( ) const

True, if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 251 of file CameraParam.cpp.

References BIASERR, IsInitialized_, and zoomCamera_.

int CameraParam::ReadCameraData | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) |

Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
rigNode | points to a "Camera"-node to evaluate
Author:
streckel 06/2004

Definition at line 628 of file CameraParam.cpp.

References AngleCorrX_, AngleCorrY_, aspectratio_, BIASERR, BIASWARN, CAMERA_PARAMETER_CURRENT_XML_VERSION, CamID_, CamModel_, cellSizeY_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), height_, Init(), LensIsSpherical_, LensModel_, MaxCamAngle_, ReadCameraDataV0_8(), ReadCameraDataV1_0(), width_, and zoomCamera_.

int CameraParam::ReadCameraData ( const std::string & Filename )

Read a camera data parameter file and store the data in (*this).

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Camera"
Author:
streckel 06/2004

Definition at line 604 of file CameraParam.cpp.

References BIASERR, BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().

Referenced by BIAS::SphericalUndistortion::Init(), Init(), and main().

int CameraParam::ReadCameraDataV0_8 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected]

Definition at line 1026 of file CameraParam.cpp.

References BIASERR.

Referenced by ReadCameraData().

int CameraParam::ReadCameraDataV1_0 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected]

Definition at line 820 of file CameraParam.cpp.

References AngleCorrX_, AngleCorrY_, aspectratio_, BIASERR, CamID_, CamModel_, cellSizeY_, BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentDouble(), BIAS::XMLIO::getNodeContentInt(), BIAS::XMLIO::getNodeName(), height_, IlluCorrX_, IlluCorrY_, Init(), LensModel_, MaxCamAngle_, width_, and zoomCamera_.

Referenced by ReadCameraData().

int CameraParam::ReadFromEXIF ( const std::string & filename )

read jpeg EXIF header and set camera parameter

Returns:
0 on success
Author:
koeser 07/2005

Definition at line 1531 of file CameraParam.cpp.

References aspectratio_, CamID_, CamModel_, cellSizeY_, downsamplingFactor_, focallengthDef_, BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetHardwareName(), BIAS::ImageAttributes::GetImageDimensions(), BIAS::ImageAttributes::GetPixelSizeXMeter(), BIAS::ImageAttributes::GetPixelSizeYMeter(), BIAS::ImageAttributes::GetPrincipalPoint(), height_, Init(), BIAS::ImageAttributes::InitExifTags(), IsInitialized_, knownparams_vect_, LensModel_, BIAS::ImageAttributes::Read(), width_, and zoomCamera_.

void CameraParam::SetCellSize | ( | const double | CellSizeX,
 |  | const double | AspectRatio
 | ) |

Set CCD cell-size in meter.

AspectRatio is CS_Y/CS_X

Author:
streckel

Definition at line 234 of file CameraParam.cpp.

References aspectratio_, cellSizeX_, and cellSizeY_.

void CameraParam::SetData_EVID31_147094 ( )

Definition at line 1324 of file CameraParam.cpp.

Referenced by BIAS::RigParameter::SetData_DummyRig().

void CameraParam::SetData_OMNITECH_ORIFL_190_3 ( )

Definition at line 1605 of file CameraParam.cpp.

References AngleCorrX_, AngleCorrY_, aspectratio_, CamID_, CamModel_, cellSizeY_, height_, IlluCorrX_, IlluCorrY_, Init(), IsInitialized_, knownparams_vect_, LensModel_, radius_, and width_.

Referenced by main(), and BIAS::RigParameter::SetData_DummyRig().

void CameraParam::SetDownsampling ( const double factor )

Set downsampling factor - all get functions will return transformed values.

E.g. if your image size(width and height) is half the original and the field of view did stay the same, then set factor to 2.
CAUTION: The Set-functions still require the original values

Author:
streckel

Definition at line 333 of file CameraParam.cpp.

References downsamplingFactor_.

void CameraParam::SetFocalLength ( const double f )

Set the current camera focal length, the zoom will be calculated.

Author:
buck

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 317 of file CameraParam.cpp.

References BIASERR, focallengthDef_, focallengthZoom_, InterpolateAbsZoom_(), IsInitialized_, IsPerspective(), zoom_, and zoomCamera_.

void CameraParam::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) |

Set principal point in pixels relative to top left corner.

Author:
streckel

Definition at line 195 of file CameraParam.cpp.

References principalX_, and principalY_.

double BIAS::CameraParam::SetRadius ( double r ) [inline]

Definition at line 203 of file CameraParam.hh.

References BIASERR.

void BIAS::CameraParam::SetSize | ( | unsigned int | w,
 |  | unsigned int | h
 | ) | [inline]

set size of image seperatly

Definition at line 176 of file CameraParam.hh.

void CameraParam::SetUnzoomed ( )

Set the zoom and focal length of a zoom camera to the default settings.

Author:
streckel 06/2004

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 337 of file CameraParam.cpp.

References BIASERR, focallengthDef_, focallengthZoom_, IsInitialized_, IsPerspective(), knownparams_vect_, zoom_, and zoomCamera_.

Referenced by BIAS::MatlabTBUndistortion::SetUnzoomed().

void CameraParam::SetZoom ( const double abszoom )

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 300 of file CameraParam.cpp.

References BIASERR, focallengthZoom_, InterpolateFocalLength_(), IsInitialized_, IsPerspective(), zoom_, and zoomCamera_.

void CameraParam::SetZoomCamera ( const bool zoomCam )

Set to 'true', if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 246 of file CameraParam.cpp.

References zoomCamera_.

int CameraParam::WriteCameraData ( const std::string & Filename ) const

Write all data to a camera data parameter file ).

Parameters:
Filename Name of the XML-camera-data-file, document tag will be to be "Camera"
Author:
streckel 06/2004

Definition at line 355 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), AddCameraDataToXMLTree(), BIASERR, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::XMLIO::create(), IsInitialized_, and BIAS::XMLIO::write().

Referenced by main().

Member Data Documentation

std::vector<double> BIAS::CameraParam::AngleCorrX_ [protected]

Definition at line 356 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), Init(), ReadCameraData(), ReadCameraDataV1_0(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

std::vector<double> BIAS::CameraParam::AngleCorrY_ [protected]

Definition at line 357 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), Init(), ReadCameraData(), ReadCameraDataV1_0(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

double BIAS::CameraParam::aspectratio_ [protected]

Definition at line 317 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), BIAS::MatlabTBUndistortion::Distort(), GetKMatrix(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), SetCellSize(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::MatlabTBUndistortion::Undistort().

int BIAS::CameraParam::CamID_ [protected]

Definition at line 301 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), DebugOut(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), and SetData_OMNITECH_ORIFL_190_3().

std::string BIAS::CameraParam::CamModel_ [protected]

Definition at line 300 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), DebugOut(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), and SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::cellSizeX_ [protected]

Definition at line 320 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), Init(), and SetCellSize().

double BIAS::CameraParam::cellSizeY_ [protected]

Definition at line 320 of file CameraParam.hh.

Referenced by CameraParam(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), SetCellSize(), and SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::downsamplingFactor_ [protected]

Definition at line 332 of file CameraParam.hh.

Referenced by GetDownsamplingFactor(), GetFocalLength(), GetHeight(), GetPrincipalX(), GetPrincipalY(), GetWidth(), Init(), ReadFromEXIF(), and SetDownsampling().

double BIAS::CameraParam::focallengthDef_ [protected]

Definition at line 338 of file CameraParam.hh.

Referenced by CameraParam(), BIAS::MatlabTBUndistortion::Distort(), GetFocalLength(), Init(), ReadFromEXIF(), SetFocalLength(), BIAS::MatlabTBUndistortion::SetUnzoomed(), SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::focallengthZoom_ [protected]

Definition at line 346 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), GetFocalLength(), Init(), BIAS::MatlabTBUndistortion::InterpolateAbsZoom_(), InterpolateAbsZoom_(), BIAS::MatlabTBUndistortion::SetFocalLength(), SetFocalLength(), SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), SetZoom(), and BIAS::MatlabTBUndistortion::Undistort().

unsigned int BIAS::CameraParam::height_ [protected]

Definition at line 311 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), DebugOut(), GetHeight(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), and SetData_OMNITECH_ORIFL_190_3().

std::vector<double> BIAS::CameraParam::IlluCorrX_ [protected]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 351 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::CorrectVignette(), BIAS::SphericalUndistortion::Init(), Init(), ReadCameraDataV1_0(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

std::vector<double> BIAS::CameraParam::IlluCorrY_ [protected]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 352 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::CorrectVignette(), BIAS::SphericalUndistortion::Init(), Init(), ReadCameraDataV1_0(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

bool BIAS::CameraParam::IsInitialized_ [protected]

Definition at line 297 of file CameraParam.hh.

Referenced by AddCameraDataToRig(), AddCameraDataToXMLTree(), CameraParam(), BIAS::SphericalUndistortion::CorrectVignette(), DebugOut(), BIAS::MatlabTBUndistortion::Distort(), BIAS::SphericalUndistortion::DrawCircles(), GetDownsamplingFactor(), GetFocalLength(), GetHeight(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::SphericalUndistortion::GetMaxCamAngle(), GetPrincipalX(), GetPrincipalY(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::GetSphereRadius(), GetWidth(), GetZoom(), BIAS::SphericalUndistortion::Init(), Init(), IsInitialized(), IsZoomCamera(), BIAS::MatlabTBUndistortion::MatlabTBUndistortion(), BIAS::SphericalUndistortion::ProjectCoord(), BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::SphericalUndistortion::ProjectImageCylindric(), ReadFromEXIF(), SetData_OMNITECH_ORIFL_190_3(), BIAS::MatlabTBUndistortion::SetFocalLength(), SetFocalLength(), BIAS::MatlabTBUndistortion::SetUnzoomed(), SetUnzoomed(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SetupLutPxPySphere1(), BIAS::SphericalUndistortion::SetupLutPxPySphere2(), BIAS::MatlabTBUndistortion::SetupProjectionLUT(), BIAS::MatlabTBUndistortion::SetZoom(), SetZoom(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), BIAS::MatlabTBUndistortion::Undistort(), and WriteCameraData().

double BIAS::CameraParam::kc1Def_ [protected]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc2Def_ [protected]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc3Def_ [protected]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc4Def_ [protected]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

std::vector<CPDiscreteParam> BIAS::CameraParam::knownparams_vect_ [protected]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 314 of file CameraParam.hh.

Referenced by CameraParam(), DebugOut(), Init(), InterpolateAbsZoom_(), InterpolateFocalLength_(), ReadFromEXIF(), SetData_OMNITECH_ORIFL_190_3(), and SetUnzoomed().

bool BIAS::CameraParam::LensIsSpherical_ [protected]

Definition at line 308 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), Init(), and ReadCameraData().

std::string BIAS::CameraParam::LensModel_ [protected]

Definition at line 302 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), DebugOut(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), and SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::MaxCamAngle_ [protected]

Definition at line 329 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::EnforceNormalRange(), BIAS::SphericalUndistortion::GetMaxCamAngle(), BIAS::SphericalUndistortion::Init(), Init(), BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::SphericalUndistortion::ProjectImageCylindric(), ReadCameraData(), ReadCameraDataV1_0(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), and BIAS::SphericalUndistortion::TransfCoordSphere2Image().

double BIAS::CameraParam::principalX_ [protected]

Definition at line 323 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetKMatrix(), GetKMatrix(), GetPrincipalX(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::Init(), Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), SetPrincipal(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::principalY_ [protected]

Definition at line 323 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetKMatrix(), GetKMatrix(), GetPrincipalY(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::Init(), Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), SetPrincipal(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::radius_ [protected]

Definition at line 326 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::GetSphereRadius(), BIAS::SphericalUndistortion::Init(), Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), SetData_OMNITECH_ORIFL_190_3(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), and BIAS::SphericalUndistortion::TransfCoordSphere2Image().

unsigned int BIAS::CameraParam::width_ [protected]

Definition at line 311 of file CameraParam.hh.

Referenced by AddCameraDataToXMLTree(), CameraParam(), DebugOut(), GetWidth(), Init(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), and SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::zoom_ [protected]

Definition at line 345 of file CameraParam.hh.

Referenced by GetZoom(), Init(), BIAS::MatlabTBUndistortion::InterpolateFocalLength_(), InterpolateFocalLength_(), BIAS::MatlabTBUndistortion::SetFocalLength(), SetFocalLength(), SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), and SetZoom().

bool BIAS::CameraParam::zoomCamera_ [protected]

Definition at line 305 of file CameraParam.hh.

Referenced by CameraParam(), DebugOut(), BIAS::MatlabTBUndistortion::Distort(), GetFocalLength(), GetZoom(), BIAS::MatlabTBUndistortion::Init(), Init(), IsZoomCamera(), ReadCameraData(), ReadCameraDataV1_0(), ReadFromEXIF(), BIAS::MatlabTBUndistortion::SetFocalLength(), SetFocalLength(), SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), SetZoom(), SetZoomCamera(), and BIAS::MatlabTBUndistortion::Undistort().

The documentation for this class was generated from the following files:
  • Image/CameraParam.hh
  • Image/CameraParam.cpp
Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: CameraParameter_s Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CameraParameter_s Struct Reference

#include <VideoSource/VideoSource_DCAM.hh>

List of all members.

Public Attributes

bool | AutoGain
bool | AutoGainChanged
bool | AutoShutter
bool | AutoShutterChanged
bool | AutoWhiteBalance
bool | AutoWhiteBalanceChanged
float | Gain
bool | GainChanged
unsigned char | GammaMode
bool | GammaModeChanged
unsigned char | OpticalFilter
bool | OpticalFilterChanged
unsigned char | Sharpen
bool | SharpenChanged
float | Shutter
bool | ShutterChanged
unsigned int | WhiteBalance
bool | WhiteBalanceChanged
bool | WhiteBalanceOnePush

Detailed Description

Definition at line 80 of file VideoSource_DCAM.hh.

Member Data Documentation

bool CameraParameter_s::AutoGain

Definition at line 87 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::AutoGainChanged

Definition at line 99 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::AutoShutter

Definition at line 86 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::AutoShutterChanged

Definition at line 98 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::AutoWhiteBalance

Definition at line 88 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::AutoWhiteBalanceChanged

Definition at line 100 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

float CameraParameter_s::Gain

Definition at line 84 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::GainChanged

Definition at line 96 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

unsigned char CameraParameter_s::GammaMode

Definition at line 90 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::GammaModeChanged

Definition at line 102 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

unsigned char CameraParameter_s::OpticalFilter

Definition at line 91 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::OpticalFilterChanged

Definition at line 103 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

unsigned char CameraParameter_s::Sharpen

Definition at line 89 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::SharpenChanged

Definition at line 101 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

float CameraParameter_s::Shutter

Definition at line 83 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::ShutterChanged

Definition at line 95 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

unsigned int CameraParameter_s::WhiteBalance

Definition at line 85 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::WhiteBalanceChanged

Definition at line 97 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

bool CameraParameter_s::WhiteBalanceOnePush

Definition at line 106 of file VideoSource_DCAM.hh.

Referenced by BIAS::VideoSource_DCAM::SetCamera().

The documentation for this struct was generated from the following file:
  • VideoSource/VideoSource_DCAM.hh
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraViewController Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraViewController

BIAS::CameraViewController Class Reference

base for (interactively) manipulating a (virtual) camera view. More...

#include <Gui/CameraViewController.hh>

Collaboration diagram for BIAS::CameraViewController:

[legend]
List of all members.

Public Member Functions

CameraViewController ()
virtual void | DisplayGL ()
virtual void | DisplayGLExternal ()
virtual void | DisplayGLInternal ()
CameraViewExternals & GetExternals ()
CameraViewExternals | GetExternals () const
CameraViewInternals & GetInternals ()
CameraViewInternals | GetInternals () const
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
void | MotionTrackballRotation (const BIAS::Vector2< double > &pos)
void | MotionTranslation (const BIAS::Vector2< double > &pos)
simple translation
void | MotionTranslationForward (const BIAS::Vector2< double > &pos)
void | MoveOrbit (const BIAS::Vector2< double > &deltaN)
void | MoveToCenter (const double &fraction)
std::ostream & | Print (std::ostream &os=std::cout)
map update of one axis (mouse wheel, delta, key.
void | SetSize (const BIAS::Vector2< double > &sz)
interaction area size
void | SetStartPos (const BIAS::Vector2< double > &pos)
mouse start position, usually on leftclick
virtual | ~CameraViewController ()
destructor

Protected Attributes

BIAS::CameraViewExternals * p_externals
BIAS::CameraViewInternals * p_internals
BIAS::Vector2< double > | size
BIAS::Vector2< double > | startpos
CameraViewExternals startposExt
CameraViewInternals startposInt

Detailed Description

base for (interactively) manipulating a (virtual) camera view.

Typically used by OpenGL as a glulookat Update. Navigator would be a good name, too.

Author:
Jan Woetzel

Definition at line 60 of file CameraViewController.hh.

Constructor & Destructor Documentation

CameraViewController::~CameraViewController ( ) [virtual]

destructor

Definition at line 10 of file CameraViewController.cpp.

References p_externals, and p_internals.

CameraViewController::CameraViewController ( )

Definition at line 16 of file CameraViewController.cpp.

References InitMembers().

Member Function Documentation

void CameraViewController::DisplayGL ( ) [virtual]

Definition at line 43 of file CameraViewController.cpp.

References DisplayGLExternal(), and DisplayGLInternal().

void CameraViewController::DisplayGLExternal ( ) [virtual]

Definition at line 52 of file CameraViewController.cpp.

References BIAS::CameraViewExternals::DisplayGL(), and GetExternals().

Referenced by BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), and DisplayGL().

void CameraViewController::DisplayGLInternal ( ) [virtual]

Definition at line 48 of file CameraViewController.cpp.

References BIAS::CameraViewInternals::DisplayGL(), and GetInternals().

Referenced by BIAS::OpenGLCanvas::DisplayCameraViewInternalParams(), and DisplayGL().

CameraViewExternals& BIAS::CameraViewController::GetExternals ( ) [inline]

Definition at line 113 of file CameraViewController.hh.

References BIASASSERT, and p_externals.

CameraViewExternals BIAS::CameraViewController::GetExternals ( ) const [inline]

Definition at line 109 of file CameraViewController.hh.

References BIASASSERT, and p_externals.

Referenced by DisplayGLExternal(), InitMembers(), MoveOrbit(), and Print().

CameraViewInternals& BIAS::CameraViewController::GetInternals ( ) [inline]

Definition at line 122 of file CameraViewController.hh.

References BIASASSERT, and p_internals.

CameraViewInternals BIAS::CameraViewController::GetInternals ( ) const [inline]

Definition at line 118 of file CameraViewController.hh.

References BIASASSERT, and p_internals.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), DisplayGLInternal(), InitMembers(), Print(), and BIAS::OpenGLCanvas::Reshape().

void CameraViewController::InitMembers ( ) [virtual]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Definition at line 23 of file CameraViewController.cpp.

References GetExternals(), GetInternals(), BIAS::CameraViewInternals::InitMembers(), BIAS::CameraViewExternals::InitMembers(), p_externals, p_internals, BIAS::Vector2< T >::Set(), BIAS::Vector2< T >::SetZero(), size, startpos, startposExt, and startposInt.

Referenced by CameraViewController().

void CameraViewController::MotionTrackballRotation ( const BIAS::Vector2< double > & pos )

Definition at line 144 of file CameraViewController.cpp.

References BIASERR, and size.

void CameraViewController::MotionTranslation ( const BIAS::Vector2< double > & pos )

simple translation

Definition at line 131 of file CameraViewController.cpp.

References BIAS::Vector2< T >::DivideIP(), MoveOrbit(), size, and startpos.

Referenced by BIAS::OpenGLCanvas::OnMotion().

void CameraViewController::MotionTranslationForward ( const BIAS::Vector2< double > & pos )

Definition at line 122 of file CameraViewController.cpp.

References BIAS::Vector2< T >::GetY(), MoveToCenter(), size, and startpos.

void CameraViewController::MoveOrbit ( const BIAS::Vector2< double > & deltaN )

Definition at line 74 of file CameraViewController.cpp.

References BIASASSERT, BIAS::CameraViewExternals::C, BIAS::Vector3< T >::CartesianToPolar(), BIAS::Vector3< T >::CrossProduct(), GetExternals(), BIAS::Vector3< T >::Normalize(), p_externals, size, BIAS::CameraViewExternals::up, and BIAS::CameraViewExternals::viewAt.

Referenced by MotionTranslation().

void CameraViewController::MoveToCenter ( const double & fraction )

Definition at line 108 of file CameraViewController.cpp.

References abs, BIASASSERT, BIASBREAK, BIASERR, BIAS::CameraViewExternals::C, p_externals, and BIAS::CameraViewExternals::viewAt.

Referenced by MotionTranslationForward(), and BIAS::OpenGLCanvas::OnMouseWheel().

std::ostream & CameraViewController::Print ( std::ostream & os = std::cout )

map update of one axis (mouse wheel, delta, key.

..) maps delta (e.g. mouse dragging motion or wheel) to pose update depending on current mode JW

Definition at line 58 of file CameraViewController.cpp.

References GetExternals(), GetInternals(), BIAS::CameraViewExternals::Print(), and BIAS::CameraViewInternals::Print().

Referenced by BIAS::OpenGLCanvas::GetInfoGL().

void BIAS::CameraViewController::SetSize ( const BIAS::Vector2< double > & sz ) [inline]

interaction area size

Definition at line 97 of file CameraViewController.hh.

References size.

void CameraViewController::SetStartPos ( const BIAS::Vector2< double > & pos )

mouse start position, usually on leftclick

Definition at line 65 of file CameraViewController.cpp.

References BIASASSERT, p_externals, p_internals, startpos, startposExt, and startposInt.

Member Data Documentation

BIAS::CameraViewExternals* BIAS::CameraViewController::p_externals [protected]

Definition at line 144 of file CameraViewController.hh.

Referenced by GetExternals(), InitMembers(), MoveOrbit(), MoveToCenter(), SetStartPos(), and ~CameraViewController().

BIAS::CameraViewInternals* BIAS::CameraViewController::p_internals [protected]

Definition at line 145 of file CameraViewController.hh.

Referenced by GetInternals(), InitMembers(), SetStartPos(), and ~CameraViewController().

BIAS::Vector2<double> BIAS::CameraViewController::size [protected]

Definition at line 149 of file CameraViewController.hh.

Referenced by InitMembers(), MotionTrackballRotation(), MotionTranslation(), MotionTranslationForward(), MoveOrbit(), and SetSize().

BIAS::Vector2<double> BIAS::CameraViewController::startpos [protected]

Definition at line 151 of file CameraViewController.hh.

Referenced by InitMembers(), MotionTranslation(), MotionTranslationForward(), and SetStartPos().

CameraViewExternals BIAS::CameraViewController::startposExt [protected]

Definition at line 152 of file CameraViewController.hh.

Referenced by InitMembers(), and SetStartPos().

CameraViewInternals BIAS::CameraViewController::startposInt [protected]

Definition at line 153 of file CameraViewController.hh.

Referenced by InitMembers(), and SetStartPos().

The documentation for this class was generated from the following files:
  • Gui/CameraViewController.hh
  • Gui/CameraViewController.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraViewExternals Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraViewExternals

BIAS::CameraViewExternals Class Reference

describes external params of a camera view, e.g. More...

#include <Gui/CameraViewExternals.hh>

Collaboration diagram for BIAS::CameraViewExternals:

[legend]
List of all members.

Public Member Functions

CameraViewExternals (const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &up, const BIAS::Vector3< double > &viewAt)
CameraViewExternals ()
destructor
void | DisplayGL () const
void | DisplayViewAt (const double &size=1.0) const
void InitMembers ()
std::ostream & | Print (std::ostream &os=std::cout)
virtual | ~CameraViewExternals ()

Public Attributes

BIAS::Vector3< double > | C
BIAS::Vector3< double > | up
BIAS::Vector3< double > | viewAt

Detailed Description

describes external params of a camera view, e.g.

OpenGL It is manipulated by controller classe, e.g. trackball.

Author:
Jan Woetzel

Definition at line 17 of file CameraViewExternals.hh.

Constructor & Destructor Documentation

virtual BIAS::CameraViewExternals::~CameraViewExternals ( ) [inline, virtual]

Definition at line 19 of file CameraViewExternals.hh.

CameraViewExternals::CameraViewExternals ( )

destructor

Definition at line 15 of file CameraViewExternals.cpp.

References InitMembers().

CameraViewExternals::CameraViewExternals | ( | const BIAS::Vector3< double > & | C,
 |  | const BIAS::Vector3< double > & | up,
 |  | const BIAS::Vector3< double > & | viewAt
 | ) |

Definition at line 20 of file CameraViewExternals.cpp.

Member Function Documentation

void BIAS::CameraViewExternals::DisplayGL ( ) const

Definition at line 38 of file CameraViewExternals.cpp.

References C, up, and viewAt.

Referenced by BIAS::CameraViewController::DisplayGLExternal().

void BIAS::CameraViewExternals::DisplayViewAt ( const double & size = 1.0 ) const

Definition at line 55 of file CameraViewExternals.cpp.

References viewAt.

void BIAS::CameraViewExternals::InitMembers ( ) [inline]

Definition at line 36 of file CameraViewExternals.hh.

Referenced by CameraViewExternals(), and BIAS::CameraViewController::InitMembers().

std::ostream & BIAS::CameraViewExternals::Print ( std::ostream & os = std::cout )

Definition at line 27 of file CameraViewExternals.cpp.

References C, up, and viewAt.

Referenced by BIAS::CameraViewController::Print().

Member Data Documentation

BIAS::Vector3<double> BIAS::CameraViewExternals::C

Definition at line 45 of file CameraViewExternals.hh.

Referenced by DisplayGL(), BIAS::CameraViewController::MoveOrbit(), BIAS::CameraViewController::MoveToCenter(), and Print().

BIAS::Vector3<double> BIAS::CameraViewExternals::up

Definition at line 46 of file CameraViewExternals.hh.

Referenced by DisplayGL(), BIAS::CameraViewController::MoveOrbit(), and Print().

BIAS::Vector3<double> BIAS::CameraViewExternals::viewAt

Definition at line 47 of file CameraViewExternals.hh.

Referenced by DisplayGL(), DisplayViewAt(), BIAS::CameraViewController::MoveOrbit(), BIAS::CameraViewController::MoveToCenter(), and Print().

The documentation for this class was generated from the following files:
  • Gui/CameraViewExternals.hh
  • Gui/CameraViewExternals.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraViewFrustum Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraViewFrustum

BIAS::CameraViewFrustum Class Reference

describes internal parameter Frustum of an (OpenGL) camera view More...

#include <Gui/CameraViewFrustum.hh>

List of all members.

Public Member Functions

CameraViewFrustum ()
ctors
void | DisplayGL () const
double | GetAspect () const
double | GetFovX () const
double | GetFovY () const
void InitMembers ()
std::ostream & | Print (std::ostream &os=std::cout) const
void | SetPerspective (const double &fovYdeg, const double &fovAspect, const double &zNear=1., const double &zFar=1000.)
sets a symmetric, centered frustum like gluPerspective does fovYdeg is the y field of view in degree.
virtual | ~CameraViewFrustum ()

Public Attributes

double | bottom
double | left
double | right
double | top
double | zFar
double | zNear

Detailed Description

describes internal parameter Frustum of an (OpenGL) camera view

Author:
Jan Woetzel 09/2003

Definition at line 13 of file CameraViewFrustum.hh.

Constructor & Destructor Documentation

virtual BIAS::CameraViewFrustum::~CameraViewFrustum ( ) [inline, virtual]

Definition at line 15 of file CameraViewFrustum.hh.

BIAS::CameraViewFrustum::CameraViewFrustum ( )

ctors

Definition at line 18 of file CameraViewFrustum.cpp.

References InitMembers().

Member Function Documentation

void BIAS::CameraViewFrustum::DisplayGL ( ) const

Definition at line 77 of file CameraViewFrustum.cpp.

References bottom, left, right, top, zFar, and zNear.

Referenced by BIAS::CameraViewInternals::DisplayGL().

double BIAS::CameraViewFrustum::GetAspect ( ) const

Returns:
aspect ratio x/y of field of image size (NOT field of view)

Definition at line 40 of file CameraViewFrustum.cpp.

References BIASASSERT, bottom, left, right, and top.

double BIAS::CameraViewFrustum::GetFovX ( ) const

Definition at line 33 of file CameraViewFrustum.cpp.

References left, right, and zNear.

double BIAS::CameraViewFrustum::GetFovY ( ) const

Returns:
the approximate field of view in degree

Definition at line 24 of file CameraViewFrustum.cpp.

References bottom, top, and zNear.

void BIAS::CameraViewFrustum::InitMembers ( ) [inline]

Definition at line 42 of file CameraViewFrustum.hh.

Referenced by CameraViewFrustum(), and BIAS::CameraViewInternals::InitMembers().

std::ostream & BIAS::CameraViewFrustum::Print ( std::ostream & os = std::cout ) const

Definition at line 62 of file CameraViewFrustum.cpp.

References bottom, left, right, top, zFar, and zNear.

Referenced by BIAS::CameraViewInternals::Print().

void BIAS::CameraViewFrustum::SetPerspective | ( | const double & | fovYdeg,
 |  | const double & | fovAspect,
 |  | const double & | zNear = 1.,
 |  | const double & | zFar = 1000.
 | ) |

sets a symmetric, centered frustum like gluPerspective does fovYdeg is the y field of view in degree.

Definition at line 47 of file CameraViewFrustum.cpp.

References bottom, left, right, top, zFar, and zNear.

Member Data Documentation

double BIAS::CameraViewFrustum::bottom

Definition at line 55 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), GetAspect(), GetFovY(), Print(), and SetPerspective().

double BIAS::CameraViewFrustum::left

Definition at line 53 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), GetAspect(), GetFovX(), Print(), and SetPerspective().

double BIAS::CameraViewFrustum::right

Definition at line 54 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), GetAspect(), GetFovX(), Print(), and SetPerspective().

double BIAS::CameraViewFrustum::top

Definition at line 56 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), GetAspect(), GetFovY(), Print(), and SetPerspective().

double BIAS::CameraViewFrustum::zFar

Definition at line 59 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), Print(), and SetPerspective().

double BIAS::CameraViewFrustum::zNear

Definition at line 58 of file CameraViewFrustum.hh.

Referenced by DisplayGL(), GetFovX(), GetFovY(), Print(), and SetPerspective().

The documentation for this class was generated from the following files:
  • Gui/CameraViewFrustum.hh
  • Gui/CameraViewFrustum.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraViewInternals Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraViewInternals

BIAS::CameraViewInternals Class Reference

describes internal params of an (OpenGL) camera view More...

#include <Gui/CameraViewInternals.hh>

Collaboration diagram for BIAS::CameraViewInternals:

[legend]
List of all members.

Public Member Functions

CameraViewInternals ()
destructor
void | DisplayGL () const
void InitMembers ()
std::ostream & | Print (std::ostream &os=std::cout) const
virtual | ~CameraViewInternals ()

Public Attributes

CameraViewFrustum frustum
CameraViewport viewport

Detailed Description

describes internal params of an (OpenGL) camera view

It is manipulated by controller classes.

Author:
Jan Woetzel 09/2003

Definition at line 16 of file CameraViewInternals.hh.

Constructor & Destructor Documentation

virtual BIAS::CameraViewInternals::~CameraViewInternals ( ) [inline, virtual]

Definition at line 18 of file CameraViewInternals.hh.

BIAS::CameraViewInternals::CameraViewInternals ( ) [inline]

destructor

Definition at line 21 of file CameraViewInternals.hh.

Member Function Documentation

void BIAS::CameraViewInternals::DisplayGL ( ) const

Definition at line 25 of file CameraViewInternals.cpp.

References BIAS::CameraViewport::DisplayGL(), BIAS::CameraViewFrustum::DisplayGL(), frustum, and viewport.

Referenced by BIAS::CameraViewController::DisplayGLInternal().

void BIAS::CameraViewInternals::InitMembers ( )

Definition at line 17 of file CameraViewInternals.cpp.

References frustum, BIAS::CameraViewport::InitMembers(), BIAS::CameraViewFrustum::InitMembers(), and viewport.

Referenced by BIAS::CameraViewController::InitMembers().

std::ostream & BIAS::CameraViewInternals::Print ( std::ostream & os = std::cout ) const

Definition at line 9 of file CameraViewInternals.cpp.

References frustum, BIAS::CameraViewport::Print(), BIAS::CameraViewFrustum::Print(), and viewport.

Referenced by BIAS::CameraViewController::Print().

Member Data Documentation

CameraViewFrustum BIAS::CameraViewInternals::frustum

Definition at line 32 of file CameraViewInternals.hh.

Referenced by DisplayGL(), InitMembers(), and Print().

CameraViewport BIAS::CameraViewInternals::viewport

Definition at line 33 of file CameraViewInternals.hh.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), DisplayGL(), InitMembers(), Print(), and BIAS::OpenGLCanvas::Reshape().

The documentation for this class was generated from the following files:
  • Gui/CameraViewInternals.hh
  • Gui/CameraViewInternals.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CameraViewport Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CameraViewport

BIAS::CameraViewport Class Reference

describes internal parameter viewport of an (OpenGL) camera view More...

#include <Gui/CameraViewport.hh>

List of all members.

Public Member Functions

CameraViewport (const int vx0, int vy0, unsigned int vwidth, unsigned int height)
CameraViewport ()
destructor
void | DisplayGL () const
double | GetAspect () const
void InitMembers ()
std::ostream & | Print (std::ostream &os=std::cout) const
virtual | ~CameraViewport ()

Public Attributes

unsigned int | height
unsigned int | width
int | x0
int | y0

Detailed Description

describes internal parameter viewport of an (OpenGL) camera view

Author:
Jan Woetzel 09/2003

Definition at line 13 of file CameraViewport.hh.

Constructor & Destructor Documentation

virtual BIAS::CameraViewport::~CameraViewport ( ) [inline, virtual]

Definition at line 15 of file CameraViewport.hh.

CameraViewport::CameraViewport ( )

destructor

Definition at line 16 of file CameraViewport.cpp.

References InitMembers().

CameraViewport::CameraViewport | ( | const int | vx0,
 |  | int | vy0,
 |  | unsigned int | vwidth,
 |  | unsigned int | height
 | ) |

Definition at line 21 of file CameraViewport.cpp.

Member Function Documentation

void BIAS::CameraViewport::DisplayGL ( ) const

Definition at line 51 of file CameraViewport.cpp.

References height, width, x0, and y0.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), and BIAS::CameraViewInternals::DisplayGL().

double BIAS::CameraViewport::GetAspect ( ) const

Definition at line 31 of file CameraViewport.cpp.

References BIASASSERT, height, and width.

void CameraViewport::InitMembers ( )

Definition at line 25 of file CameraViewport.cpp.

References height, width, x0, and y0.

Referenced by CameraViewport(), and BIAS::CameraViewInternals::InitMembers().

std::ostream & BIAS::CameraViewport::Print ( std::ostream & os = std::cout ) const

Definition at line 38 of file CameraViewport.cpp.

References height, width, x0, and y0.

Referenced by BIAS::CameraViewInternals::Print().

Member Data Documentation

unsigned int BIAS::CameraViewport::height

Definition at line 37 of file CameraViewport.hh.

Referenced by DisplayGL(), GetAspect(), InitMembers(), Print(), and BIAS::OpenGLCanvas::Reshape().

unsigned int BIAS::CameraViewport::width

Definition at line 36 of file CameraViewport.hh.

Referenced by DisplayGL(), GetAspect(), InitMembers(), Print(), and BIAS::OpenGLCanvas::Reshape().

int BIAS::CameraViewport::x0

Definition at line 34 of file CameraViewport.hh.

Referenced by DisplayGL(), InitMembers(), and Print().

int BIAS::CameraViewport::y0

Definition at line 35 of file CameraViewport.hh.

Referenced by DisplayGL(), InitMembers(), and Print().

The documentation for this class was generated from the following files:
  • Gui/CameraViewport.hh
  • Gui/CameraViewport.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CanCompare< T1, T2 > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CanCompare

BIAS::CanCompare< T1, T2 > Class Template Reference

compile time check for comparabilty of T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...

#include <Base/Debug/Constraints.hh>

List of all members.

Public Member Functions

CanCompare ()

Static Public Member Functions

static void Constraints (T1 a, T2 b)

Detailed Description

template<class T1, class T2 = T1>
class BIAS::CanCompare< T1, T2 >

compile time check for comparabilty of T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html

Author:
woelk 02/2006

Definition at line 70 of file Constraints.hh.

Constructor & Destructor Documentation

template<class T1, class T2 = T1>
BIAS::CanCompare< T1, T2 >::CanCompare ( ) [inline]

Definition at line 74 of file Constraints.hh.

References BIAS::DerivedFrom< T, B >::Constraints(), p, and void.

Member Function Documentation

template<class T1, class T2 = T1>
static void BIAS::CanCompare< T1, T2 >::Constraints | ( | T1 | a,
 |  | T2 | b
 | ) | [inline, static]

Definition at line 73 of file Constraints.hh.

The documentation for this class was generated from the following file:
  • Base/Debug/Constraints.hh
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CanCopy< T1, T2 > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CanCopy

BIAS::CanCopy< T1, T2 > Class Template Reference

compile time check for copy compatibilty between T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...

#include <Base/Debug/Constraints.hh>

List of all members.

Public Member Functions

CanCopy ()

Static Public Member Functions

static void Constraints (T1 a, T2 b)

Detailed Description

template<class T1, class T2>
class BIAS::CanCopy< T1, T2 >

compile time check for copy compatibilty between T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html

Author:
woelk 02/2006

Definition at line 55 of file Constraints.hh.

Constructor & Destructor Documentation

template<class T1, class T2>
BIAS::CanCopy< T1, T2 >::CanCopy ( ) [inline]

Definition at line 59 of file Constraints.hh.

References BIAS::DerivedFrom< T, B >::Constraints(), p, and void.

Member Function Documentation

template<class T1, class T2>
static void BIAS::CanCopy< T1, T2 >::Constraints | ( | T1 | a,
 |  | T2 | b
 | ) | [inline, static]

Definition at line 58 of file Constraints.hh.

The documentation for this class was generated from the following file:
  • Base/Debug/Constraints.hh
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CanMultiply< T1, T2, T3 > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CanMultiply

BIAS::CanMultiply< T1, T2, T3 > Class Template Reference

compile time check if T1 can be multiplied by T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...

#include <Base/Debug/Constraints.hh>

List of all members.

Public Member Functions

CanMultiply ()

Static Public Member Functions

static void Constraints (T1 a, T2 b, T3 c)

Detailed Description

template<class T1, class T2, class T3 = T1>
class BIAS::CanMultiply< T1, T2, T3 >

compile time check if T1 can be multiplied by T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html

Author:
woelk 02/2006

Definition at line 85 of file Constraints.hh.

Constructor & Destructor Documentation

template<class T1, class T2, class T3 = T1>
BIAS::CanMultiply< T1, T2, T3 >::CanMultiply ( ) [inline]

Definition at line 89 of file Constraints.hh.

References BIAS::DerivedFrom< T, B >::Constraints(), p, and void.

Member Function Documentation

template<class T1, class T2, class T3 = T1>
static void BIAS::CanMultiply< T1, T2, T3 >::Constraints | ( | T1 | a,
 |  | T2 | b,
 |  | T3 | c
 | ) | [inline, static]

Definition at line 88 of file Constraints.hh.

The documentation for this class was generated from the following file:
  • Base/Debug/Constraints.hh
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CCAStruct Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CCAStruct

BIAS::CCAStruct Class Reference

#include <Filter/Label.hh>

Collaboration diagram for BIAS::CCAStruct:

[legend]
List of all members.

Public Member Functions

CCAStruct (const CCAStruct &s)
CCAStruct ()
bool | operator< (const CCAStruct &right) const
CCAStruct & | operator= (const CCAStruct &s)
bool | operator== (const CCAStruct &right) const

Public Attributes

int | bc
blob count = number of pixesl in blob
BIAS::Vector2< int > | br
BIAS::Vector2< double > | center
BIAS::Vector2< int > | tl
std::vector< int > | x
std::vector< int > | y

Detailed Description

Definition at line 59 of file Label.hh.

Constructor & Destructor Documentation

BIAS::CCAStruct::CCAStruct ( ) [inline]

Definition at line 61 of file Label.hh.

BIAS::CCAStruct::CCAStruct ( const CCAStruct & s ) [inline]

Definition at line 62 of file Label.hh.

References bc, br, center, tl, x, and y.

Member Function Documentation

bool BIAS::CCAStruct::operator< ( const CCAStruct & right ) const [inline]

Definition at line 72 of file Label.hh.

References bc.

CCAStruct& BIAS::CCAStruct::operator= ( const CCAStruct & s ) [inline]

Definition at line 70 of file Label.hh.

References bc, br, center, tl, x, and y.

bool BIAS::CCAStruct::operator== ( const CCAStruct & right ) const [inline]

Definition at line 74 of file Label.hh.

References bc.

Member Data Documentation

int BIAS::CCAStruct::bc

blob count = number of pixesl in blob

Definition at line 65 of file Label.hh.

Referenced by CCAStruct(), operator<(), operator=(), and operator==().

BIAS::Vector2<int> BIAS::CCAStruct::br

Definition at line 66 of file Label.hh.

Referenced by CCAStruct(), and operator=().

BIAS::Vector2<double> BIAS::CCAStruct::center

Definition at line 67 of file Label.hh.

Referenced by CCAStruct(), and operator=().

BIAS::Vector2<int> BIAS::CCAStruct::tl

Definition at line 66 of file Label.hh.

Referenced by CCAStruct(), and operator=().

std::vector<int> BIAS::CCAStruct::x

Definition at line 68 of file Label.hh.

Referenced by CCAStruct(), and operator=().

std::vector<int> BIAS::CCAStruct::y

Definition at line 68 of file Label.hh.

Referenced by CCAStruct(), and operator=().

The documentation for this class was generated from the following file:
  • Filter/Label.hh
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Cholesky Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Cholesky

BIAS::Cholesky Class Reference

#include <Base/Math/Cholesky.hh>

Collaboration diagram for BIAS::Cholesky:

[legend]
List of all members.

Public Member Functions

Cholesky (Matrix< double > &A)
bool | decompositionExists ()
Matrix< double > | upperTriangle ()
~Cholesky ()

Protected Attributes

bool | exists
Matrix< double > | L

Detailed Description

Definition at line 36 of file Cholesky.hh.

Constructor & Destructor Documentation

Cholesky::Cholesky ( Matrix< double > & A ) [explicit]

Definition at line 31 of file Cholesky.cpp.

References TNT::Cholesky_upper_factorization(), exists, and L.

BIAS::Cholesky::~Cholesky ( ) [inline]

Definition at line 40 of file Cholesky.hh.

Member Function Documentation

bool Cholesky::decompositionExists ( )

Definition at line 39 of file Cholesky.cpp.

References exists.

Matrix< double > Cholesky::upperTriangle ( )

Definition at line 44 of file Cholesky.cpp.

References L.

Member Data Documentation

bool BIAS::Cholesky::exists [protected]

Definition at line 47 of file Cholesky.hh.

Referenced by Cholesky(), and decompositionExists().

Matrix<double> BIAS::Cholesky::L [protected]

Definition at line 46 of file Cholesky.hh.

Referenced by Cholesky(), and upperTriangle().

The documentation for this class was generated from the following files:
  • Base/Math/Cholesky.hh
  • Base/Math/Cholesky.cpp
Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: cilist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

cilist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef flag | ciend
typedef flag | ciend
typedef flag | cierr
typedef flag | cierr
typedef char * | cifmt
typedef char * | cifmt
typedef ftnint | cirec
typedef ftnint | cirec
typedef ftnint | ciunit
typedef ftnint | ciunit

Detailed Description

Definition at line 51 of file f2c_gnu011.h.

Member Typedef Documentation

typedef flag cilist::ciend

Definition at line 50 of file win32_f2c.h.

typedef flag cilist::ciend

Definition at line 54 of file f2c_gnu011.h.

typedef flag cilist::cierr

Definition at line 48 of file win32_f2c.h.

typedef flag cilist::cierr

Definition at line 52 of file f2c_gnu011.h.

typedef char* cilist::cifmt

Definition at line 51 of file win32_f2c.h.

typedef char* cilist::cifmt

Definition at line 55 of file f2c_gnu011.h.

typedef ftnint cilist::cirec

Definition at line 52 of file win32_f2c.h.

typedef ftnint cilist::cirec

Definition at line 56 of file f2c_gnu011.h.

typedef ftnint cilist::ciunit

Definition at line 49 of file win32_f2c.h.

typedef ftnint cilist::ciunit

Definition at line 53 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: cllist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

cllist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef flag | cerr
typedef flag | cerr
typedef char * | csta
typedef char * | csta
typedef ftnint | cunit
typedef ftnint | cunit

Detailed Description

Definition at line 83 of file f2c_gnu011.h.

Member Typedef Documentation

typedef flag cllist::cerr

Definition at line 80 of file win32_f2c.h.

typedef flag cllist::cerr

Definition at line 84 of file f2c_gnu011.h.

typedef char* cllist::csta

Definition at line 82 of file win32_f2c.h.

typedef char* cllist::csta

Definition at line 86 of file f2c_gnu011.h.

typedef ftnint cllist::cunit

Definition at line 81 of file win32_f2c.h.

typedef ftnint cllist::cunit

Definition at line 85 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ColorHarris Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ColorHarris

BIAS::ColorHarris Class Reference

#include <FeatureDetector/ColorHarris.hh>

Inheritance diagram for BIAS::ColorHarris:

[legend]
Collaboration diagram for BIAS::ColorHarris:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | CreateSTColor (Image< unsigned char > &im, Image< short > &st, const float sigma1, const float sigma2)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | HarrisValue (Image< short > &st, Image< int > &res)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 39 of file ColorHarris.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int ColorHarris::CreateSTColor | ( | Image< unsigned char > & | im,
 |  | Image< short > & | st,
 |  | const float | sigma1,
 |  | const float | sigma2
 | ) |

Definition at line 685 of file ColorHarris.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

Referenced by main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int ColorHarris::HarrisValue | ( | Image< short > & | st,
 |  | Image< int > & | res
 | ) |

Definition at line 787 of file ColorHarris.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • FeatureDetector/ColorHarris.hh
  • FeatureDetector/ColorHarris.cpp
Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ColorHistogram< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ColorHistogram

BIAS::ColorHistogram< StorageType > Class Template Reference
[PyramidImage, Camera, Histogram]

This Class handels Histogram matters on Images. More...

#include <Image/ColorHistogram.hh>

Inheritance diagram for BIAS::ColorHistogram< StorageType >:

[legend]
List of all members.

Public Member Functions

double | CalcSimilarity (const BIAS::ColorHistogram< StorageType > chist, double &weight) const
Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.
double | CalcSimilarity (const BIAS::ColorHistogram< StorageType > chist) const
Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.
int | CheckImageQuality (float percent, float &shutter, float &gain)
checks the image quality depending on the given Histogram and increases ,decreases shutter and gain
int | CheckImageQualityComplete (float percent, float &shutter, float &gain)
same as above but luminance vector is created form all pixels in histogram
int | CheckImageQualityRef (ColorHistogram< StorageType > &cHist, float percent, float &shutter, float &gain)
same as above but checks similarity of luminance to a given reference histogram
int | Clear ()
Deletes current Histogram information.
ColorHistogram ()
This class creates a Histogram in the HSL color space.
void | Dump (std::ostream &os=std::cout)
dumps information on histogram to ostream format: binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)
void | DumpCSV (std::ostream &os=std::cout)
dumps information on histogram to ostream format: binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)
int | GenerateHist (BIAS::Image< StorageType > &image)
calculates the Histogram of the image ATTENTION: ROI must be set in upper function SetROI if this function is used
int | GenerateHist (BIAS::Image< StorageType > &image, int ux, int uy, int lx, int ly)
calcluates the histogram from data and adds them to the internal data structures
char * | GetBinaryData (int &length)
int | GetBinSize () const
GetBinSize.
int | GetBinSizeSat () const
GetBinSizeSat.
int | GetHeightROI () const
std::vector< std::vector<
double > > 		GetHist () const
returns the histogram with H&S values
std::vector< double > | GetHistL () const
returns the L-values of the HSLcolorspace that are <MINSAT in the ROI
int | GetNumberOfEntries ()
returns the length of a dumped ColorHistogram this calculates of binsize, binsizesat (1 each) coords (4) the matrix (nrofbinssat * nrofbins) lvector (nrofbins) luminance vector (nrofbins) total pixelcount (1)
void | GetROI (std::vector< int > &roi) const
float | GetSaturatedBins () const
returns the percentage [0.
int | GetWidthROI () const
int | Read (char *filename)
reads a histogram from instream and fills the internal data structures
void | ReadBinaryData (char *data)
int | SetBinSize (int binSizeHue, int binSizeSat)
set the binsize for different binSizes (must be divideable by 2pown)
int | SetBinSize (int binsize)
set the binsize (must be divideable by 2pown)
void | SetExpDist (bool expdist)
sets expDist_ true or false, used to calculate the dist in CalcSimilarity
void | SetLambda (int lambda)
sets Lambda, which is used to calculate the dist in CalcSimilarity
void | SetMinSat (int minsat)
set minsat_, which defines the minimum saturation
int | SetROI (int ux, int uy, int lx, int ly)
set the coords for the ROI
int | Update (const BIAS::ColorHistogram< StorageType > &hist, double factor=0.5)
Updates the histogramm with values from hist, where the factor gives the weighting of the new values from hist.
~ColorHistogram ()

Public Attributes

std::vector< double > | luminance_

Protected Member Functions

int | DeleteHist_ ()
deletes hist_, histl_.
void Normalise_ ()
Normalises the histogram to be able to use it in the Bhatt.

Protected Attributes

unsigned int | binCount_
int | binSize_
int | binSizeSat_
bool | expDist_
std::vector< std::vector<
double > > 		hist_
unsigned short int | histCount_
std::vector< double > | histl_
BIAS::Image< StorageType > * | image_
int | lambda_
int | lx_
int | ly_
double | maxBinVal_
double | minBinVal_
int | minSat_
bool | normalised_
int | shift_
int | shiftLum_
int | shiftSat_
int | ux_
int | uy_

Detailed Description

template<class StorageType>
class BIAS::ColorHistogram< StorageType >

This Class handels Histogram matters on Images.

It represents an histogram and offers basic methods on histograms.

Author:
Ingo Schiller Histogram is represented in HSL by an double vector + vector for L values untested

Definition at line 54 of file ColorHistogram.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::ColorHistogram< StorageType >::ColorHistogram ( )

This class creates a Histogram in the HSL color space.

Author:
ingo schiller
Date:
feb 2004

Definition at line 50 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binCount_, BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, BIAS::ColorHistogram< StorageType >::expDist_, BIAS::ColorHistogram< StorageType >::histCount_, BIAS::ColorHistogram< StorageType >::image_, BIAS::ColorHistogram< StorageType >::lambda_, BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::minSat_, BIAS::ColorHistogram< StorageType >::SetBinSize(), BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

template<class StorageType>
BIAS::ColorHistogram< StorageType >::~ColorHistogram ( )

Definition at line 66 of file ColorHistogram.cpp.

Member Function Documentation

template<class StorageType>
double BIAS::ColorHistogram< StorageType >::CalcSimilarity | ( | const BIAS::ColorHistogram< StorageType > | chist,
 |  | double & | weight
 | ) | const

Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.

returns a weight, which is in [0..1] and is the percentage of the bins unequal zero.

Parameters:
the chist to compare with
Returns:
double value, which indicates the similarity. 1 if similar.
Author:
grest May 2004

Definition at line 414 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::hist_, and BIAS::ColorHistogram< StorageType >::histl_.

template<class StorageType>
double BIAS::ColorHistogram< StorageType >::CalcSimilarity ( const BIAS::ColorHistogram< StorageType > chist ) const

Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.

Parameters:
the chist to compare with
Returns:
double value, which indicates the similarity. 1 if similar.
Author:
schiller March 2004

Definition at line 387 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::hist_, and BIAS::ColorHistogram< StorageType >::histl_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::CheckImageQuality | ( | float | percent,
 |  | float & | shutter,
 |  | float & | gain
 | ) |

checks the image quality depending on the given Histogram and increases ,decreases shutter and gain

Parameters:
percent | = percentage of pixels in the luminance vector required
hist | = the colorhistogram of the interesting part of the image
shutter | = shutter value
gain | = gain value
Returns:
-1 if lum too high , 1 if lum too low , 0 if lum is good
Author:
schiller

Definition at line 577 of file ColorHistogram.cpp.

References BIASERR, BIAS::ColorHistogram< StorageType >::GetBinSize(), and BIAS::ColorHistogram< StorageType >::GetHistL().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::CheckImageQualityComplete | ( | float | percent,
 |  | float & | shutter,
 |  | float & | gain
 | ) |

same as above but luminance vector is created form all pixels in histogram

Returns:
-1 if lum too high , 1 if lum too low , 0 if lum is good

Definition at line 549 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::luminance_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::CheckImageQualityRef | ( | ColorHistogram< StorageType > & | cHist,
 |  | float | percent,
 |  | float & | shutter,
 |  | float & | gain
 | ) |

same as above but checks similarity of luminance to a given reference histogram

Parameters:
cHist = the reference colorHistogram
Returns:
-1 if lum too high , 1 if lum too low , 0 if lum is good

Definition at line 485 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::luminance_, BIAS::maxGain, and BIAS::maxShutter.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::Clear ( )

Deletes current Histogram information.

Definition at line 199 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binCount_, BIAS::ColorHistogram< StorageType >::expDist_, BIAS::ColorHistogram< StorageType >::histCount_, BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::normalised_, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::DeleteHist_ ( ) [protected]

deletes hist_, histl_.

..

Definition at line 763 of file ColorHistogram.cpp.

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::Dump ( std::ostream & os = std::cout )

dumps information on histogram to ostream format: binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)

Parameters:
os = the outstream, default std::cout
Author:
Schiller

Definition at line 656 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::lx_, and BIAS::ColorHistogram< StorageType >::ly_.

Referenced by main().

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::DumpCSV ( std::ostream & os = std::cout )

dumps information on histogram to ostream format: binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)

Definition at line 624 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, and BIAS::ColorHistogram< StorageType >::hist_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GenerateHist ( BIAS::Image< StorageType > & image )

calculates the Histogram of the image ATTENTION: ROI must be set in upper function SetROI if this function is used

Parameters:
image = the image
Returns:
-1 if image does not exist

Definition at line 234 of file ColorHistogram.cpp.

References abs, BIASERR, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::GetColorModel(), BIAS::ColorHistogram< StorageType >::image_, BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, StorageType, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GenerateHist | ( | BIAS::Image< StorageType > & | image,
 |  | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

calcluates the histogram from data and adds them to the internal data structures

Author:
schiller
Parameters:
image | = the image
ux | = upper left corner x of region of interest
uy | = upper left corner y of region of interest
lx | = lower right corner x of region of interest
ly | = lower right corner y of region of interest

Definition at line 218 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

Referenced by main().

template<class StorageType>
char * BIAS::ColorHistogram< StorageType >::GetBinaryData ( int & length )

Definition at line 792 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binCount_, BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::histl_, BIAS::ColorHistogram< StorageType >::luminance_, BIAS::ColorHistogram< StorageType >::lx_, and BIAS::ColorHistogram< StorageType >::ly_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GetBinSize ( ) const [inline]

GetBinSize.

Returns:
the binSize of Hue and light

Definition at line 107 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::CheckImageQuality(), and BIAS::CondensHisto::EvaluateFromIntegralHistoImage_().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GetBinSizeSat ( ) const [inline]

GetBinSizeSat.

Returns:
the binSize of Sat

Definition at line 113 of file ColorHistogram.hh.

Referenced by BIAS::CondensHisto::EvaluateFromIntegralHistoImage_().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GetHeightROI ( ) const

Returns:
the Height of the ROI

Definition at line 173 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::ly_, and BIAS::ColorHistogram< StorageType >::uy_.

Referenced by BIAS::CondensHisto::CheckImageQuality(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensHisto::DrawMean(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), and BIAS::CondensHisto::SetReferenceHistogram().

template<class StorageType>
std::vector< std::vector< double > > BIAS::ColorHistogram< StorageType >::GetHist ( ) const

returns the histogram with H&S values

Definition at line 160 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::hist_.

Referenced by BIAS::IntegralHistogram::CalcSimilarity().

template<class StorageType>
std::vector< double > BIAS::ColorHistogram< StorageType >::GetHistL ( ) const

returns the L-values of the HSLcolorspace that are <MINSAT in the ROI

Definition at line 167 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::histl_.

Referenced by BIAS::IntegralHistogram::CalcSimilarity(), and BIAS::ColorHistogram< StorageType >::CheckImageQuality().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GetNumberOfEntries ( )

returns the length of a dumped ColorHistogram this calculates of binsize, binsizesat (1 each) coords (4) the matrix (nrofbinssat * nrofbins) lvector (nrofbins) luminance vector (nrofbins) total pixelcount (1)

Author:
Ingo Schiller

Definition at line 686 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, and BIAS::ColorHistogram< StorageType >::binSizeSat_.

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::GetROI ( std::vector< int > & roi ) const

Returns:
the coords of ROI in an array

Definition at line 186 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

template<class StorageType>
float BIAS::ColorHistogram< StorageType >::GetSaturatedBins ( ) const

returns the percentage [0.

.1] of HS-bins in the histogram that have values unequal to zero

Author:
grest, Mar 2005

Definition at line 776 of file ColorHistogram.cpp.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::GetWidthROI ( ) const

Returns:
the width of the ROI

Definition at line 179 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::lx_, and BIAS::ColorHistogram< StorageType >::ux_.

Referenced by BIAS::CondensHisto::CheckImageQuality(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensHisto::DrawMean(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), and BIAS::CondensHisto::SetReferenceHistogram().

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::Normalise_ ( ) [protected]

Normalises the histogram to be able to use it in the Bhatt.

.. Difference

Definition at line 738 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binCount_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::histl_, BIAS::ColorHistogram< StorageType >::shift_, BIAS::ColorHistogram< StorageType >::shiftLum_, and BIAS::ColorHistogram< StorageType >::shiftSat_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::Read ( char * filename )

reads a histogram from instream and fills the internal data structures

Parameters:
is = the instream
Author:
Schiller March 2004
Returns:
0 if ok, -1 if no file

Definition at line 697 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::SetBinSize(), and BIAS::ColorHistogram< StorageType >::SetROI().

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::ReadBinaryData ( char * data )

Definition at line 829 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binCount_, BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::SetBinSize(), and BIAS::ColorHistogram< StorageType >::SetROI().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::SetBinSize | ( | int | binSizeHue,
 |  | int | binSizeSat
 | ) |

set the binsize for different binSizes (must be divideable by 2pown)

Definition at line 117 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, and BIAS::ColorHistogram< StorageType >::hist_.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::SetBinSize ( int binsize )

set the binsize (must be divideable by 2pown)

Definition at line 86 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::binSizeSat_, and BIAS::ColorHistogram< StorageType >::hist_.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram(), main(), BIAS::ColorHistogram< StorageType >::Read(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), and BIAS::CondensHisto::SetReferenceHistogram().

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::SetExpDist ( bool expdist ) [inline]

sets expDist_ true or false, used to calculate the dist in CalcSimilarity

Definition at line 100 of file ColorHistogram.hh.

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::SetLambda ( int lambda ) [inline]

sets Lambda, which is used to calculate the dist in CalcSimilarity

Definition at line 94 of file ColorHistogram.hh.

template<class StorageType>
void BIAS::ColorHistogram< StorageType >::SetMinSat ( int minsat ) [inline]

set minsat_, which defines the minimum saturation

Definition at line 87 of file ColorHistogram.hh.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::SetROI | ( | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

set the coords for the ROI

Definition at line 74 of file ColorHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

Referenced by BIAS::ColorHistogram< StorageType >::Read(), and BIAS::ColorHistogram< StorageType >::ReadBinaryData().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::Update | ( | const BIAS::ColorHistogram< StorageType > & | hist,
 |  | double | factor = 0.5
 | ) |

Updates the histogramm with values from hist, where the factor gives the weighting of the new values from hist.

Returns:
0 in case of no error
Author:
Daniel Grest, March 2004

Definition at line 454 of file ColorHistogram.cpp.

References BIASERR, BIAS::ColorHistogram< StorageType >::binSize_, BIAS::ColorHistogram< StorageType >::hist_, BIAS::ColorHistogram< StorageType >::histl_, BIAS::ColorHistogram< StorageType >::lx_, BIAS::ColorHistogram< StorageType >::ly_, BIAS::ColorHistogram< StorageType >::ux_, and BIAS::ColorHistogram< StorageType >::uy_.

Member Data Documentation

template<class StorageType>
unsigned int BIAS::ColorHistogram< StorageType >::binCount_ [protected]

Definition at line 292 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::Normalise_(), and BIAS::ColorHistogram< StorageType >::ReadBinaryData().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::binSize_ [protected]

Definition at line 302 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< StorageType >::DumpCSV(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetNumberOfEntries(), BIAS::ColorHistogram< StorageType >::Read(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), BIAS::ColorHistogram< StorageType >::SetBinSize(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::binSizeSat_ [protected]

Definition at line 303 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< StorageType >::DumpCSV(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetNumberOfEntries(), BIAS::ColorHistogram< StorageType >::Read(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), and BIAS::ColorHistogram< StorageType >::SetBinSize().

template<class StorageType>
bool BIAS::ColorHistogram< StorageType >::expDist_ [protected]

Definition at line 308 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), and BIAS::ColorHistogram< StorageType >::ColorHistogram().

template<class StorageType>
std::vector<std::vector<double> > BIAS::ColorHistogram< StorageType >::hist_ [protected]

Definition at line 294 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::CalcSimilarity(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< StorageType >::DumpCSV(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetHist(), BIAS::ColorHistogram< StorageType >::Normalise_(), BIAS::ColorHistogram< StorageType >::Read(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), BIAS::ColorHistogram< StorageType >::SetBinSize(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
unsigned short int BIAS::ColorHistogram< StorageType >::histCount_ [protected]

Definition at line 291 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), and BIAS::ColorHistogram< StorageType >::ColorHistogram().

template<class StorageType>
std::vector<double> BIAS::ColorHistogram< StorageType >::histl_ [protected]

Definition at line 295 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::CalcSimilarity(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetHistL(), BIAS::ColorHistogram< StorageType >::Normalise_(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
BIAS::Image<StorageType>* BIAS::ColorHistogram< StorageType >::image_ [protected]

Definition at line 293 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), and BIAS::ColorHistogram< StorageType >::GenerateHist().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::lambda_ [protected]

Definition at line 307 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram().

template<class StorageType>
std::vector<double> BIAS::ColorHistogram< StorageType >::luminance_

Definition at line 275 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::CheckImageQualityComplete(), BIAS::ColorHistogram< StorageType >::CheckImageQualityRef(), and BIAS::ColorHistogram< StorageType >::GetBinaryData().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::lx_ [protected]

Definition at line 297 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetROI(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), BIAS::ColorHistogram< StorageType >::SetROI(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::ly_ [protected]

Definition at line 297 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::Dump(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GetBinaryData(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ColorHistogram< StorageType >::GetROI(), BIAS::ColorHistogram< StorageType >::ReadBinaryData(), BIAS::ColorHistogram< StorageType >::SetROI(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
double BIAS::ColorHistogram< StorageType >::maxBinVal_ [protected]

Definition at line 299 of file ColorHistogram.hh.

template<class StorageType>
double BIAS::ColorHistogram< StorageType >::minBinVal_ [protected]

Definition at line 299 of file ColorHistogram.hh.

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::minSat_ [protected]

Definition at line 307 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::ColorHistogram().

template<class StorageType>
bool BIAS::ColorHistogram< StorageType >::normalised_ [protected]

Definition at line 289 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::shift_ [protected]

Definition at line 304 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Normalise_().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::shiftLum_ [protected]

Definition at line 306 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Normalise_().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::shiftSat_ [protected]

Definition at line 305 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Normalise_().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::ux_ [protected]

Definition at line 297 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GetROI(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), BIAS::ColorHistogram< StorageType >::SetROI(), and BIAS::ColorHistogram< StorageType >::Update().

template<class StorageType>
int BIAS::ColorHistogram< StorageType >::uy_ [protected]

Definition at line 297 of file ColorHistogram.hh.

Referenced by BIAS::ColorHistogram< StorageType >::Clear(), BIAS::ColorHistogram< StorageType >::ColorHistogram(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ColorHistogram< StorageType >::GetROI(), BIAS::ColorHistogram< StorageType >::SetROI(), and BIAS::ColorHistogram< StorageType >::Update().

The documentation for this class was generated from the following files:
  • Image/ColorHistogram.hh
  • Image/ColorHistogram.cpp
Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ColorMultiHistogram< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ColorMultiHistogram

BIAS::ColorMultiHistogram< StorageType > Class Template Reference

This Class handels MultiHistogram matters on Images. More...

#include <Image/ColorMultiHistogram.hh>

List of all members.

Public Member Functions

double | CalcSimilarity (const ColorMultiHistogram< StorageType > &chist) const
simply call the CalcSimilarity from ColorHistograms here and multiply the values.
double | CalcSimilarityColorWeighted (const BIAS::ColorMultiHistogram< StorageType > &chist) const
Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 ColorMultiHistograms.
int | Clear ()
Deletes ALL current Histogram information.
ColorMultiHistogram ()
This class creates a ColorMultiHistogram in the HSL color space.
void | Dump (std::ostream &os=std::cout, std::ostream &os2=std::cout)
dumps information on MultiHistogram to ostreams format: first hist1, then hist2 binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)
template<>
int | GenerateHist (BIAS::Image< unsigned char > &img)
int | GenerateHist (BIAS::Image< StorageType > &image)
simply call the GenerateHist() from ColorHistogram twice here
int | GetBinSize () const
GetBinSize.
void | GetDistROIs (std::vector< double > &dist) const
ColorHistogram< StorageType > | GetHist1 () const
ColorHistogram< StorageType > | GetHist2 () const
int | Read (char *filename1, char *filename2)
reads a histogram from instream and fills the internal data structures
int | SetBinSize (int binsize)
set the binsize (must be divideable by 2pown)
void | SetLambda (int lambda)
sets Lambda, which is used to calculate the dist in CalcSimilarity
void | SetMinSat (int minsat)
set minsat_, which defines the minimum saturation
int | SetROI1 (int ux, int uy, int lx, int ly)
set the coords for the ROI in first Histogram
int | SetROI2 (int ux, int uy, int lx, int ly)
set the coords for the ROI in second Histogram
int | Update (const BIAS::ColorMultiHistogram< StorageType > &hist, double factor=0.5)
Updates the histogramm with values from hist, where the factor gives the weighting of the new values from hist.
~ColorMultiHistogram ()

Protected Attributes

int | binSize_
BIAS::ColorHistogram< StorageType > | hist1_
BIAS::ColorHistogram< StorageType > | hist2_
int | lambda_
int | minSat_

Detailed Description

template<class StorageType>
class BIAS::ColorMultiHistogram< StorageType >

This Class handels MultiHistogram matters on Images.

it is derived from Colorhistogram, to make it usable just like a normal ColorHistogram It represents a Multihistogram and offers the same Methods as ColorHistogram

Author:
Ingo Schiller March 2004 MultiHistogram is represented by two ColorHistograms untested

Definition at line 51 of file ColorMultiHistogram.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram ( )

This class creates a ColorMultiHistogram in the HSL color space.

Author:
ingo schiller
Date:
march 2004

Definition at line 40 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::binSize_, BIAS::ColorMultiHistogram< StorageType >::hist1_, BIAS::ColorMultiHistogram< StorageType >::hist2_, BIAS::ColorMultiHistogram< StorageType >::lambda_, and BIAS::ColorMultiHistogram< StorageType >::minSat_.

template<class StorageType>
BIAS::ColorMultiHistogram< StorageType >::~ColorMultiHistogram ( )

Definition at line 56 of file ColorMultiHistogram.cpp.

Member Function Documentation

template<class StorageType>
double BIAS::ColorMultiHistogram< StorageType >::CalcSimilarity ( const ColorMultiHistogram< StorageType > & chist ) const

simply call the CalcSimilarity from ColorHistograms here and multiply the values.

Parameters:
the hist to compare with
Returns:
double value, which indicates the similarity. 1 if similar.
Author:
schiller March 2004

Definition at line 164 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::GetHist1(), BIAS::ColorMultiHistogram< StorageType >::GetHist2(), BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
double BIAS::ColorMultiHistogram< StorageType >::CalcSimilarityColorWeighted ( const BIAS::ColorMultiHistogram< StorageType > & chist ) const

Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 ColorMultiHistograms.

Same As CalcSimilarity, but the two histogram values are weighted according to the amount of color bins which are not zero.

Parameters:
the hist to compare with
Returns:
double value, which indicates the similarity. 1 if similar.
Author:
grest May 2004

Definition at line 178 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::GetHist1(), BIAS::ColorMultiHistogram< StorageType >::GetHist2(), BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::Clear ( )

Deletes ALL current Histogram information.

Definition at line 128 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
void BIAS::ColorMultiHistogram< StorageType >::Dump | ( | std::ostream & | os = std::cout,
 |  | std::ostream & | os2 = std::cout
 | ) |

dumps information on MultiHistogram to ostreams format: first hist1, then hist2 binsize tab ux tab uy tab lx tab ly hs histogram, as a matrix with binsize x binsize (tab separated) l values as a line with lenght binsize (tab separated)

Parameters:
os = the outstream, default std::cout
Author:
Schiller

Definition at line 207 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<>
int BIAS::ColorMultiHistogram< unsigned char >::GenerateHist ( BIAS::Image< unsigned char > & img )

Definition at line 151 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::GenerateHist ( BIAS::Image< StorageType > & image )

simply call the GenerateHist() from ColorHistogram twice here

Parameters:
image = the image
Returns:
-1 if image does not exist

Definition at line 140 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::GetBinSize ( ) const [inline]

GetBinSize.

Definition at line 97 of file ColorMultiHistogram.hh.

template<class StorageType>
void BIAS::ColorMultiHistogram< StorageType >::GetDistROIs ( std::vector< double > & dist ) const

Returns:
the distance of the two centers of the ROIs in pixels first x coords than y coord

Definition at line 113 of file ColorMultiHistogram.cpp.

References first, BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
ColorHistogram< StorageType > BIAS::ColorMultiHistogram< StorageType >::GetHist1 ( ) const

Returns:
the first Histogram

Definition at line 92 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_.

Referenced by BIAS::ColorMultiHistogram< StorageType >::CalcSimilarity(), and BIAS::ColorMultiHistogram< StorageType >::CalcSimilarityColorWeighted().

template<class StorageType>
ColorHistogram< StorageType > BIAS::ColorMultiHistogram< StorageType >::GetHist2 ( ) const

Returns:
the second Histogram

Definition at line 102 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist2_.

Referenced by BIAS::ColorMultiHistogram< StorageType >::CalcSimilarity(), and BIAS::ColorMultiHistogram< StorageType >::CalcSimilarityColorWeighted().

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::Read | ( | char * | filename1,
 |  | char * | filename2
 | ) |

reads a histogram from instream and fills the internal data structures

Parameters:
the filenames of the two histograms
Author:
Schiller March 2004
Returns:
0 if ok, -1 if no file

Definition at line 215 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::SetBinSize ( int binsize )

set the binsize (must be divideable by 2pown)

Definition at line 82 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
void BIAS::ColorMultiHistogram< StorageType >::SetLambda ( int lambda ) [inline]

sets Lambda, which is used to calculate the dist in CalcSimilarity

Definition at line 91 of file ColorMultiHistogram.hh.

template<class StorageType>
void BIAS::ColorMultiHistogram< StorageType >::SetMinSat ( int minsat ) [inline]

set minsat_, which defines the minimum saturation

Definition at line 84 of file ColorMultiHistogram.hh.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::SetROI1 | ( | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

set the coords for the ROI in first Histogram

Definition at line 64 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::SetROI2 | ( | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

set the coords for the ROI in second Histogram

Definition at line 73 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist2_.

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::Update | ( | const BIAS::ColorMultiHistogram< StorageType > & | hist,
 |  | double | factor = 0.5
 | ) |

Updates the histogramm with values from hist, where the factor gives the weighting of the new values from hist.

Returns:
0 in case of no error
Author:
Daniel Grest, March 2004

Definition at line 191 of file ColorMultiHistogram.cpp.

References BIAS::ColorMultiHistogram< StorageType >::hist1_, and BIAS::ColorMultiHistogram< StorageType >::hist2_.

Member Data Documentation

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::binSize_ [protected]

Definition at line 177 of file ColorMultiHistogram.hh.

Referenced by BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram().

template<class StorageType>
BIAS::ColorHistogram<StorageType> BIAS::ColorMultiHistogram< StorageType >::hist1_ [protected]

Definition at line 175 of file ColorMultiHistogram.hh.

Referenced by BIAS::ColorMultiHistogram< StorageType >::CalcSimilarity(), BIAS::ColorMultiHistogram< StorageType >::CalcSimilarityColorWeighted(), BIAS::ColorMultiHistogram< StorageType >::Clear(), BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram(), BIAS::ColorMultiHistogram< StorageType >::Dump(), BIAS::ColorMultiHistogram< StorageType >::GenerateHist(), BIAS::ColorMultiHistogram< StorageType >::GetDistROIs(), BIAS::ColorMultiHistogram< StorageType >::GetHist1(), BIAS::ColorMultiHistogram< StorageType >::Read(), BIAS::ColorMultiHistogram< StorageType >::SetBinSize(), BIAS::ColorMultiHistogram< StorageType >::SetROI1(), and BIAS::ColorMultiHistogram< StorageType >::Update().

template<class StorageType>
BIAS::ColorHistogram<StorageType> BIAS::ColorMultiHistogram< StorageType >::hist2_ [protected]

Definition at line 175 of file ColorMultiHistogram.hh.

Referenced by BIAS::ColorMultiHistogram< StorageType >::CalcSimilarity(), BIAS::ColorMultiHistogram< StorageType >::CalcSimilarityColorWeighted(), BIAS::ColorMultiHistogram< StorageType >::Clear(), BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram(), BIAS::ColorMultiHistogram< StorageType >::Dump(), BIAS::ColorMultiHistogram< StorageType >::GenerateHist(), BIAS::ColorMultiHistogram< StorageType >::GetDistROIs(), BIAS::ColorMultiHistogram< StorageType >::GetHist2(), BIAS::ColorMultiHistogram< StorageType >::Read(), BIAS::ColorMultiHistogram< StorageType >::SetBinSize(), BIAS::ColorMultiHistogram< StorageType >::SetROI2(), and BIAS::ColorMultiHistogram< StorageType >::Update().

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::lambda_ [protected]

Definition at line 177 of file ColorMultiHistogram.hh.

Referenced by BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram().

template<class StorageType>
int BIAS::ColorMultiHistogram< StorageType >::minSat_ [protected]

Definition at line 177 of file ColorMultiHistogram.hh.

Referenced by BIAS::ColorMultiHistogram< StorageType >::ColorMultiHistogram().

The documentation for this class was generated from the following files:
  • Image/ColorMultiHistogram.hh
  • Image/ColorMultiHistogram.cpp
Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ColorSegmentation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ColorSegmentation

BIAS::ColorSegmentation Class Reference

#include <Image/ColorSegmentation.hh>

Inheritance diagram for BIAS::ColorSegmentation:

[legend]
Collaboration diagram for BIAS::ColorSegmentation:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
ColorSegmentation ()
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetGreyImage (BIAS::Image< unsigned char > &imgGrey)
void | GetHueImage (BIAS::Image< unsigned char > &imgHue)
void | GetSatImage (BIAS::Image< unsigned char > &imgSat)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | Segment (const unsigned char **src, unsigned char **dst, const int tl[2], const int br[2], const int hue, const int hueIntervall, const int minSaturation)
void | Segment (BIAS::Image< unsigned char > &src, BIAS::Image< unsigned char > &res, int hue, int hueIntervall, int minSaturation)
void | SetColorSpace (BIAS::ImageBase::EColorModel farbraum)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
BIAS::Image< unsigned char > | image
BIAS::ImageBase::EColorModel stdFarbRaum

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Author:
africk

Definition at line 18 of file ColorSegmentation.hh.

Constructor & Destructor Documentation

ColorSegmentation::ColorSegmentation ( )

Definition at line 20 of file ColorSegmentation.cpp.

References BIAS::ImageBase::CM_HSL, and stdFarbRaum.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void ColorSegmentation::GetGreyImage ( BIAS::Image< unsigned char > & imgGrey )

Definition at line 108 of file ColorSegmentation.cpp.

References BIAS::ImageBase::IsEmpty().

void ColorSegmentation::GetHueImage ( BIAS::Image< unsigned char > & imgHue )

Definition at line 69 of file ColorSegmentation.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), image, and BIAS::ImageBase::IsEmpty().

void ColorSegmentation::GetSatImage ( BIAS::Image< unsigned char > & imgSat )

Definition at line 88 of file ColorSegmentation.cpp.

References BIAS::ImageBase::IsEmpty().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::ColorSegmentation::Segment | ( | const unsigned char ** | src,
 |  | unsigned char ** | dst,
 |  | const int | tl[2],
 |  | const int | br[2],
 |  | const int | hue,
 |  | const int | hueIntervall,
 |  | const int | minSaturation
 | ) | [inline]

Definition at line 31 of file ColorSegmentation.hh.

References abs.

void ColorSegmentation::Segment | ( | BIAS::Image< unsigned char > & | src,
 |  | BIAS::Image< unsigned char > & | res,
 |  | int | hue,
 |  | int | hueIntervall,
 |  | int | minSaturation
 | ) |

Definition at line 34 of file ColorSegmentation.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

void ColorSegmentation::SetColorSpace ( BIAS::ImageBase::EColorModel farbraum )

Definition at line 27 of file ColorSegmentation.cpp.

References stdFarbRaum.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

BIAS::Image<unsigned char> BIAS::ColorSegmentation::image [protected]

Definition at line 50 of file ColorSegmentation.hh.

Referenced by GetHueImage().

BIAS::ImageBase::EColorModel BIAS::ColorSegmentation::stdFarbRaum [protected]

Definition at line 54 of file ColorSegmentation.hh.

Referenced by ColorSegmentation(), and SetColorSpace().

The documentation for this class was generated from the following files:
  • Image/ColorSegmentation.hh
  • Image/ColorSegmentation.cpp
Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ColorSegmentationThreaded Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ColorSegmentationThreaded

BIAS::ColorSegmentationThreaded Class Reference

#include <Image/ColorSegmentation.hh>

List of all members.

Public Member Functions

void | Segment (BIAS::Image< unsigned char > &src, BIAS::Image< unsigned char > &res, int hue, int hueIntervall, int minSaturation)

Static Protected Member Functions

static void * | Segment_ (void *data)

Detailed Description

Definition at line 58 of file ColorSegmentation.hh.

Member Function Documentation

void ColorSegmentationThreaded::Segment | ( | BIAS::Image< unsigned char > & | src,
 |  | BIAS::Image< unsigned char > & | res,
 |  | int | hue,
 |  | int | hueIntervall,
 |  | int | minSaturation
 | ) |

Definition at line 135 of file ColorSegmentation.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

void * ColorSegmentationThreaded::Segment_ ( void * data ) [static, protected]

Definition at line 189 of file ColorSegmentation.cpp.

References SegmentationData::br, SegmentationData::hue, SegmentationData::hueIntervall, SegmentationData::imgHSV, SegmentationData::imRes, SegmentationData::minSaturation, and SegmentationData::tl.

The documentation for this class was generated from the following files:
  • Image/ColorSegmentation.hh
  • Image/ColorSegmentation.cpp
Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: complex Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

complex Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef real | i
typedef real | i
typedef real | r
typedef real | r

Detailed Description

Definition at line 16 of file f2c_gnu011.h.

Member Typedef Documentation

typedef real complex::i

Definition at line 17 of file win32_f2c.h.

typedef real complex::i

Definition at line 16 of file f2c_gnu011.h.

typedef real complex::r

Definition at line 17 of file win32_f2c.h.

typedef real complex::r

Definition at line 16 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: COmpressJpeg Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

COmpressJpeg Class Reference

Wrapper for fast libjpeg methods. More...

#include <Image/CompressJpeg.hh>

Detailed Description

Wrapper for fast libjpeg methods.

Author:
apetersen
Class for mem-to-mem JPEG-compression. Compress a given BIAS::Image (unsigned char) to data-array in shared memory file or decompress a given JPEG-file located in user memory into a BIAS::Image (u. char)

Author: A. Petersen, 15.8.`05

The documentation for this class was generated from the following file:
  • Image/CompressJpeg.hh
Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Condensation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Condensation

BIAS::Condensation Class Reference

CONDENSATION (CONditional DENSity EstimATION) is a state estimator very similiar to the Kalman Filter, not only for Gaussian-, but also for any multi-modal distribution. More...

#include <StateEstimator/Condensation.hh>

Inheritance diagram for BIAS::Condensation:

[legend]
Collaboration diagram for BIAS::Condensation:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
Condensation ()
bool | DebugLevelIsSet (long int lv) const
virtual void | EvaluateImportanceWeights ()
If you want to use importance sampling, then overload this function, which is the importance function.
virtual void | EvaluateObservationDensities ()=0
most important function, here u have to calculate a probability for each sample position based on your observations and assign this prob.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Vector< double > | GetMean ()
returns the mean state of the density distribution
double | GetMeanWeight () const
Returns the mean weight of all samples.
const std::vector< BIAS::Vector<
double > > & 		GetSamplePositions ()
bool | GetVariance (Vector< double > &var) const
Returns the variance of the sample positions in var.
double | GetVariance () const
returns the weighted variance as a scalar
bool | GetWeightedVariance (Vector< double > &var) const
Returns the "weighted variance" of the sample positions in var.
int | Init (unsigned int nrSmaples)
Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.
virtual void | InitModelDefaults ()=0
Here u can specify the model and process defaults.
int | InitPrior ()
sets the sample positions for first time step
virtual void | InitPriorPositions (unsigned int nrOfInitSamples)=0
The Prior condition is used to init the first sample positions.
int | PredictNewSamplePositions ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Process ()
This really does one iteration of Condensation.
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultInitFraction (double fraction)
Set the amount of samples, whose position is always taken by the prior distribution.
void | SetImportanceSampleFraction (double fraction)
Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.
void | SetPredictionOffset (const BIAS::Vector< double > &offSet)
all samples are moved by this offset at the prediction step
void | SetProcessMean (const BIAS::Vector< double > &newProcessMean)
set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()
virtual | ~Condensation ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | AddDiffusions_ ()
Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.
virtual void | AddOffsets_ ()
adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed
virtual void | CalculateBaseWeights_ ()
Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.
void CalculateMean_ ()
unsigned int | PickImportanceSample_ ()
unsigned int | PickOneSample_ ()
This is binary search using cumulative probabilities to pick a base sample.
void | SecondOrderARP_ (unsigned int indexOldSample, Vector< double > &newSample)
question: real pos_tminus2 of each sample or better old mean value for all samples?

Static Protected Member Functions

static int | compdouble (const void *l, const void *r)

Protected Attributes

bool | _doSecondOrderARP
long int | _liDebugLevel
double * | _randomArray
std::vector< double > | correctionOfImportanceWeights_
std::vector< double > | cumulProbArray_
std::vector< double > | cumulProbArrayImportance_
double | defaultInitFraction_
Vector< double > | diffusionSigma_
Process parameters.
double | importanceFraction_
std::vector< unsigned int > | indexTminus2_
bool | initial_
Vector< double > | mean_
Vector< double > | meanTminus1_
unsigned int | Nsamples_
BIAS::Vector< double > | offSet_
std::vector< unsigned int > | oldIndices_
Vector< double > | processFirstOrderScale_
Vector< double > | processMean_
Vector< double > | processSecondOrderScale_
Random random_
std::vector< double > | sampleImportanceWeights_
std::vector< Vector< double > > | samplePosNew_
std::vector< Vector< double > > | samplePosOld_
std::vector< Vector< double > > | samplePosTminus2_
std::vector< double > | sampleWeights_
unsigned int | stateDim_
double | sumOfImportanceWeights_
double | sumOfWeights_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

CONDENSATION (CONditional DENSity EstimATION) is a state estimator very similiar to the Kalman Filter, not only for Gaussian-, but also for any multi-modal distribution.

Also it is a rather simple algorithm.

The current state of a system, described by a state vector, is estimated using a certain number of samples, which approximate the real densities. This is done by incorporating measurements ( p(Z|X) ) with a prior distribution p(X)= p(X_t-1 | z_t).

Usage:

  1. Write a class derived from Condensation and overload the three necessary functions. See CondensImg and Examples/condensImgExample for examples.

  1. In your main program, just call Init() once with the desired amount of samples
  2. optional, set parameter for the initial prior distribution(write your own function)

  1. call InitPrior(), which calls InitPriorPositions() and precalculates the weigths etc.

In the loop:

  1. call PredictNewSamplePositions();

  1. GetSamplePositions() and measure at those positions

  1. call your own necessary functions to give the condensation your observation values, e. g.SetObservation()

  1. call Process(), which calls EvaluateObservationDensities() and calculates the mean etc.

  1. Get the real state of the system, e.g. the mean with GetMean()
    Author:
    Daniel Grest, Feb. 2004

Definition at line 87 of file Condensation.hh.

Constructor & Destructor Documentation

Condensation::Condensation ( )

Definition at line 38 of file Condensation.cpp.

References _doSecondOrderARP, _randomArray, defaultInitFraction_, importanceFraction_, and stateDim_.

Condensation::~Condensation ( ) [virtual]

Definition at line 47 of file Condensation.cpp.

References _randomArray.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void Condensation::AddDiffusions_ ( ) [protected, virtual]

Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.

non gaussian) noise is needed

Definition at line 271 of file Condensation.cpp.

References defaultInitFraction_, diffusionSigma_, BIAS::Random::GetNormalDistributed(), Nsamples_, r, random_, samplePosNew_, and stateDim_.

Referenced by PredictNewSamplePositions().

void Condensation::AddOffsets_ ( ) [protected, virtual]

adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed

Definition at line 287 of file Condensation.cpp.

References Nsamples_, offSet_, samplePosNew_, samplePosOld_, and TNT::Vector< T >::size().

Referenced by PredictNewSamplePositions().

void Condensation::CalculateBaseWeights_ ( ) [protected, virtual]

Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.

Cumulative probabilities are also computed at the same time, to permit an efficient implementation of pick_base_sample using binary search.

Definition at line 296 of file Condensation.cpp.

References BIASCDOUT, cumulProbArray_, D_COND_WEIGHTS, EvaluateObservationDensities(), BIAS::TimeMeasure::GetRealTime(), Nsamples_, BIAS::TimeMeasure::Reset(), sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and sumOfWeights_.

Referenced by Process().

void BIAS::Condensation::CalculateMean_ ( ) [inline, protected]

Definition at line 330 of file Condensation.hh.

References BIAS::TimeMeasure::GetRealTime(), mean_, BIAS::Vector< T >::MultiplyIP(), Nsamples_, samplePosOld_, sampleWeights_, BIAS::Vector< T >::Set(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and sumOfWeights_.

Referenced by Process().

static int BIAS::Condensation::compdouble | ( | const void * | l,
 |  | const void * | r
 | ) | [inline, static, protected]

Definition at line 258 of file Condensation.hh.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

virtual void BIAS::Condensation::EvaluateImportanceWeights ( ) [inline, virtual]

If you want to use importance sampling, then overload this function, which is the importance function.

It should be a density distribution, which gives hint where to measure the object state.
Evaluate here the samplePosOld_, not the new ones
IMPORTANT: the scale of the importance weights must be equal to the normal weights, like in EvaluateObservationDensities()

Reimplemented in BIAS::CondensImg.

Definition at line 183 of file Condensation.hh.

Referenced by PredictNewSamplePositions().

virtual void BIAS::Condensation::EvaluateObservationDensities ( ) [pure virtual]

most important function, here u have to calculate a probability for each sample position based on your observations and assign this prob.

as a weight to the sample

Implemented in BIAS::CondensHisto, and BIAS::CondensImg.

Referenced by CalculateBaseWeights_().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Vector<double> BIAS::Condensation::GetMean ( ) [inline]

returns the mean state of the density distribution

Definition at line 121 of file Condensation.hh.

Referenced by main().

double Condensation::GetMeanWeight ( ) const

Returns the mean weight of all samples.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 427 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, defaultInitFraction_, importanceFraction_, mean, Nsamples_, and sampleWeights_.

Referenced by BIAS::CondensHisto::GetMeanVariance().

const std::vector<BIAS::Vector<double> >& BIAS::Condensation::GetSamplePositions ( ) [inline]

Definition at line 113 of file Condensation.hh.

bool Condensation::GetVariance ( Vector< double > & var ) const

Returns the variance of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 407 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), importanceFraction_, Nsamples_, samplePosOld_, and stateDim_.

double Condensation::GetVariance ( ) const

returns the weighted variance as a scalar

Author:
grest

Definition at line 370 of file Condensation.cpp.

References BIASASSERT, mean_, Nsamples_, samplePosOld_, sampleWeights_, and sumOfWeights_.

bool Condensation::GetWeightedVariance ( Vector< double > & var ) const

Returns the "weighted variance" of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 385 of file Condensation.cpp.

References BIASCDOUT, cumulProbArray_, D_COND_MEANVAR, defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), importanceFraction_, mean_, TNT::Vector< T >::newsize(), Nsamples_, samplePosOld_, sampleWeights_, BIAS::Vector< T >::SetZero(), and stateDim_.

int Condensation::Init ( unsigned int nrSmaples )

Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.

The other Init functions are called here also.

Definition at line 52 of file Condensation.cpp.

References _randomArray, BIASCDOUT, BIASERR, correctionOfImportanceWeights_, cumulProbArray_, cumulProbArrayImportance_, D_COND_INIT, diffusionSigma_, indexTminus2_, initial_, InitModelDefaults(), mean_, meanTminus1_, TNT::Vector< T >::newsize(), Nsamples_, offSet_, oldIndices_, processFirstOrderScale_, processMean_, processSecondOrderScale_, random_, BIAS::Random::Reset(), sampleImportanceWeights_, samplePosNew_, samplePosOld_, samplePosTminus2_, sampleWeights_, BIAS::Vector< T >::Set(), stateDim_, and sumOfWeights_.

Referenced by main().

virtual void BIAS::Condensation::InitModelDefaults ( ) [pure virtual]

Here u can specify the model and process defaults.

Implemented in BIAS::CondensHisto, and BIAS::CondensImg.

Referenced by Init().

int Condensation::InitPrior ( )

sets the sample positions for first time step

Definition at line 107 of file Condensation.cpp.

References BIASCDOUT, cumulProbArray_, D_COND_INIT, BIAS::TimeMeasure::GetRealTime(), indexTminus2_, InitPriorPositions(), Nsamples_, samplePosNew_, samplePosOld_, samplePosTminus2_, sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and sumOfWeights_.

Referenced by main().

virtual void BIAS::Condensation::InitPriorPositions ( unsigned int nrOfInitSamples ) [pure virtual]

The Prior condition is used to init the first sample positions.

Calculates a initial pos for all samples. The prior cond. maybe defined by an image (if state vector is 2-dim) or by a mixture of gaussions or Uniform_distributed or ... or ...

Implemented in BIAS::CondensHisto, and BIAS::CondensImg.

Referenced by InitPrior(), and PredictNewSamplePositions().

unsigned int BIAS::Condensation::PickImportanceSample_ ( ) [inline, protected]

Definition at line 288 of file Condensation.hh.

References cumulProbArrayImportance_, BIAS::Random::GetUniformDistributed(), Nsamples_, random_, and sumOfImportanceWeights_.

Referenced by PredictNewSamplePositions().

unsigned int BIAS::Condensation::PickOneSample_ ( ) [inline, protected]

This is binary search using cumulative probabilities to pick a base sample.

The use of this routine makes Condensation O(NlogN) where N is the number of samples. It is probably better to pick base samples deterministically, since then the algorithm is O(N) and probably marginally more efficient, but this routine is kept here for conceptual simplicity and because it maps better to the published literature.

Definition at line 264 of file Condensation.hh.

Referenced by PredictNewSamplePositions().

int Condensation::PredictNewSamplePositions ( )

now pick samples from the last time step using the weights

most probably from the process model

most probably gaussian noise

Definition at line 136 of file Condensation.cpp.

References AddDiffusions_(), AddOffsets_(), BIASCDOUT, correctionOfImportanceWeights_, cumulProbArrayImportance_, D_COND_DEBUG, D_COND_PROCESS, D_COND_WEIGHTS, defaultInitFraction_, EvaluateImportanceWeights(), BIAS::TimeMeasure::GetRealTime(), importanceFraction_, indexTminus2_, InitPriorPositions(), Nsamples_, oldIndices_, PickImportanceSample_(), PickOneSample_(), BIAS::TimeMeasure::Reset(), sampleImportanceWeights_, samplePosNew_, sampleWeights_, SecondOrderARP_(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and sumOfImportanceWeights_.

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void Condensation::Process ( )

This really does one iteration of Condensation.

It calls PredictSamplePosition() and EvaluateObservationDensity() in the necessary order.

Definition at line 327 of file Condensation.cpp.

References BIASCDOUT, CalculateBaseWeights_(), CalculateMean_(), D_COND_PROCESS, BIAS::TimeMeasure::GetRealTime(), initial_, mean_, meanTminus1_, BIAS::TimeMeasure::Reset(), samplePosNew_, samplePosOld_, samplePosTminus2_, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Condensation::SecondOrderARP_ | ( | unsigned int | indexOldSample,
 |  | Vector< double > & | newSample
 | ) | [inline, protected]

question: real pos_tminus2 of each sample or better old mean value for all samples?

Definition at line 309 of file Condensation.hh.

References BIASCDOUT, D_COND_DEBUG, indexTminus2_, processFirstOrderScale_, processMean_, processSecondOrderScale_, samplePosOld_, samplePosTminus2_, and stateDim_.

Referenced by PredictNewSamplePositions().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Condensation::SetDefaultInitFraction ( double fraction )

Set the amount of samples, whose position is always taken by the prior distribution.

Default is 0.2.
fraction must be in [0..1];

Definition at line 256 of file Condensation.cpp.

References defaultInitFraction_.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void Condensation::SetImportanceSampleFraction ( double fraction )

Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.

Definition at line 264 of file Condensation.cpp.

References importanceFraction_.

void BIAS::Condensation::SetPredictionOffset ( const BIAS::Vector< double > & offSet ) [inline]

all samples are moved by this offset at the prediction step

Definition at line 109 of file Condensation.hh.

void BIAS::Condensation::SetProcessMean ( const BIAS::Vector< double > & newProcessMean ) [inline]

set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()

Definition at line 158 of file Condensation.hh.

Member Data Documentation

bool BIAS::Condensation::_doSecondOrderARP [protected]

Definition at line 183 of file Condensation.hh.

Referenced by Condensation().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

double* BIAS::Condensation::_randomArray [protected]

Definition at line 255 of file Condensation.hh.

Referenced by Condensation(), Init(), and ~Condensation().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<double> BIAS::Condensation::correctionOfImportanceWeights_ [protected]

Definition at line 242 of file Condensation.hh.

Referenced by Init(), and PredictNewSamplePositions().

std::vector<double> BIAS::Condensation::cumulProbArray_ [protected]

Definition at line 240 of file Condensation.hh.

Referenced by CalculateBaseWeights_(), GetWeightedVariance(), Init(), and InitPrior().

std::vector<double> BIAS::Condensation::cumulProbArrayImportance_ [protected]

Definition at line 241 of file Condensation.hh.

Referenced by Init(), PickImportanceSample_(), and PredictNewSamplePositions().

double BIAS::Condensation::defaultInitFraction_ [protected]

Definition at line 251 of file Condensation.hh.

Referenced by AddDiffusions_(), Condensation(), GetMeanWeight(), GetVariance(), GetWeightedVariance(), BIAS::CondensImg::InitModelDefaults(), PredictNewSamplePositions(), and SetDefaultInitFraction().

Vector<double> BIAS::Condensation::diffusionSigma_ [protected]

Process parameters.

Definition at line 247 of file Condensation.hh.

Referenced by AddDiffusions_(), Init(), BIAS::CondensImg::InitModelDefaults(), and BIAS::CondensHisto::InitModelDefaults().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::Condensation::importanceFraction_ [protected]

Definition at line 252 of file Condensation.hh.

Referenced by Condensation(), GetMeanWeight(), GetVariance(), GetWeightedVariance(), BIAS::CondensImg::InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), PredictNewSamplePositions(), and SetImportanceSampleFraction().

std::vector<unsigned int> BIAS::Condensation::indexTminus2_ [protected]

Definition at line 236 of file Condensation.hh.

Referenced by Init(), InitPrior(), PredictNewSamplePositions(), and SecondOrderARP_().

bool BIAS::Condensation::initial_ [protected]

Definition at line 250 of file Condensation.hh.

Referenced by Init(), and Process().

Vector<double> BIAS::Condensation::mean_ [protected]

Definition at line 238 of file Condensation.hh.

Referenced by CalculateMean_(), BIAS::CondensHisto::CheckImageQuality(), BIAS::CondensImg::DrawMean(), BIAS::CondensHisto::DrawMean(), BIAS::CondensHisto::GetMeanValue(), BIAS::CondensHisto::GetMeanVariance(), GetVariance(), GetWeightedVariance(), Init(), and Process().

Vector<double> BIAS::Condensation::meanTminus1_ [protected]

Definition at line 238 of file Condensation.hh.

Referenced by Init(), and Process().

unsigned int BIAS::Condensation::Nsamples_ [protected]

Definition at line 229 of file Condensation.hh.

Referenced by AddDiffusions_(), AddOffsets_(), CalculateBaseWeights_(), CalculateMean_(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateImportanceWeights(), BIAS::CondensImg::EvaluateObservationDensities(), GetMeanWeight(), GetVariance(), GetWeightedVariance(), Init(), InitPrior(), PickImportanceSample_(), and PredictNewSamplePositions().

BIAS::Vector<double> BIAS::Condensation::offSet_ [protected]

Definition at line 256 of file Condensation.hh.

Referenced by AddOffsets_(), and Init().

std::vector<unsigned int> BIAS::Condensation::oldIndices_ [protected]

Definition at line 236 of file Condensation.hh.

Referenced by Init(), and PredictNewSamplePositions().

Vector<double> BIAS::Condensation::processFirstOrderScale_ [protected]

Definition at line 248 of file Condensation.hh.

Referenced by Init(), BIAS::CondensImg::InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and SecondOrderARP_().

Vector<double> BIAS::Condensation::processMean_ [protected]

Definition at line 247 of file Condensation.hh.

Referenced by Init(), BIAS::CondensImg::InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and SecondOrderARP_().

Vector<double> BIAS::Condensation::processSecondOrderScale_ [protected]

Definition at line 248 of file Condensation.hh.

Referenced by Init(), BIAS::CondensImg::InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and SecondOrderARP_().

Random BIAS::Condensation::random_ [protected]

Definition at line 254 of file Condensation.hh.

Referenced by AddDiffusions_(), Init(), BIAS::CondensImg::InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), and PickImportanceSample_().

std::vector<double> BIAS::Condensation::sampleImportanceWeights_ [protected]

Definition at line 241 of file Condensation.hh.

Referenced by BIAS::CondensImg::EvaluateImportanceWeights(), Init(), and PredictNewSamplePositions().

std::vector<Vector<double> > BIAS::Condensation::samplePosNew_ [protected]

Definition at line 231 of file Condensation.hh.

Referenced by AddDiffusions_(), AddOffsets_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::CondensHisto::GetSamplePositions(), Init(), InitPrior(), BIAS::CondensImg::InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), PredictNewSamplePositions(), and Process().

std::vector<Vector<double> > BIAS::Condensation::samplePosOld_ [protected]

Definition at line 232 of file Condensation.hh.

Referenced by AddOffsets_(), CalculateMean_(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::CondensImg::EvaluateImportanceWeights(), BIAS::CondensHisto::GetMaxValue(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMeanVariance(), GetVariance(), GetWeightedVariance(), Init(), InitPrior(), Process(), and SecondOrderARP_().

std::vector<Vector<double> > BIAS::Condensation::samplePosTminus2_ [protected]

Definition at line 233 of file Condensation.hh.

Referenced by Init(), InitPrior(), Process(), and SecondOrderARP_().

std::vector<double> BIAS::Condensation::sampleWeights_ [protected]

Definition at line 240 of file Condensation.hh.

Referenced by CalculateBaseWeights_(), CalculateMean_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMaxWeight(), BIAS::CondensHisto::GetMeanVariance(), GetMeanWeight(), BIAS::CondensHisto::GetSamplePositions(), GetVariance(), GetWeightedVariance(), Init(), InitPrior(), and PredictNewSamplePositions().

unsigned int BIAS::Condensation::stateDim_ [protected]

Definition at line 230 of file Condensation.hh.

Referenced by AddDiffusions_(), Condensation(), BIAS::CondensHisto::CondensHisto(), BIAS::CondensHisto::DrawWeightedSamples(), GetVariance(), GetWeightedVariance(), Init(), BIAS::CondensHisto::InitModelDefaults(), BIAS::CondensImg::InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), and SecondOrderARP_().

double BIAS::Condensation::sumOfImportanceWeights_ [protected]

Definition at line 244 of file Condensation.hh.

Referenced by PickImportanceSample_(), and PredictNewSamplePositions().

double BIAS::Condensation::sumOfWeights_ [protected]

Definition at line 244 of file Condensation.hh.

Referenced by CalculateBaseWeights_(), CalculateMean_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), GetVariance(), Init(), and InitPrior().

The documentation for this class was generated from the following files:
  • StateEstimator/Condensation.hh
  • StateEstimator/Condensation.cpp
Generated on Wed Jun 21 19:06:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CondensHisto Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CondensHisto

BIAS::CondensHisto Class Reference

class for tracking an object in an image More...

#include <StateEstimator/CondensHisto.hh>

Inheritance diagram for BIAS::CondensHisto:

[legend]
Collaboration diagram for BIAS::CondensHisto:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void | CheckImageQuality (double percent, int &shutter, int &gain)
Checks the image Quality by checking the luminance of the image.
CondensHisto ()
Set the state dimension in the constructor.
bool | DebugLevelIsSet (long int lv) const
void | DrawHistoSizes (Image< unsigned char > &img)
this draws the Sizes of the Histogram as arrows at their x position
virtual void | DrawMean (BIAS::Image< unsigned char > &img)
Draws the mean as a rectangle which size is proportional to the histogram size.
double | DrawPosteriorDistribution (BIAS::Image< float > &img)
same as above but float precision and returns the maximum value also.
void | DrawPosteriorDistribution (BIAS::Image< unsigned char > &img)
Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion.
virtual void | DrawSamples (Image< unsigned char > &img)
this draws the sample weights as circles
void | DrawSamplesExt (Image< unsigned char > &img)
this draws the samples, histogram sizes as rects and weights as grey values
virtual void | DrawSamplesWhite (Image< unsigned char > &img)
this draws the sample weights as retangeles with greyvalues on white base
void | DrawWeightedSamples (Image< float > &img)
this draws the samples as circles and the color indicates the size of the histogram (the z-coordinate)
virtual void | EvaluateImportanceWeights ()
If you want to use importance sampling, then overload this function, which is the importance function.
virtual void | EvaluateObservationDensities ()
Here assign a weight to each sample.
Image< unsigned char > | GetAktImage ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetMaxValue (Vector< double > &max)
void | GetMaxVariance (Vector< double > &maxVar)
double | GetMaxWeight (int &index)
Vector< double > | GetMean ()
returns the mean state of the density distribution
void | GetMeanValue (Vector< double > &mean)
void | GetMeanVariance (Vector< double > &meanVar)
double | GetMeanWeight () const
Returns the mean weight of all samples.
const std::vector< BIAS::Vector<
double > > & 		GetSamplePositions ()
void | GetSamplePositions (Image< float > &sampleImg)
bool | GetVariance (Vector< double > &var) const
Returns the variance of the sample positions in var.
double | GetVariance () const
returns the weighted variance as a scalar
bool | GetWeightedVariance (Vector< double > &var) const
Returns the "weighted variance" of the sample positions in var.
int | Init (unsigned int nrSmaples)
Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.
virtual void | InitModelDefaults ()
Here u can specify the model and process defaults.
int | InitPrior ()
sets the sample positions for first time step
virtual void | InitPriorPositions (unsigned int nrOfInitSamples)
The Prior condition is used to init the first sample positions.
int | PredictNewSamplePositions ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Process ()
This really does one iteration of Condensation.
void | RemoveDebugLevel (long int lv)
void | SetActiveImage (Image< unsigned char > &img)
sets the present picture to compare and create new observation
void | SetArea (Vector3< double > min, Vector3< double > max)
The area for the initial uniform distribution.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultInitFraction (double fraction)
Set the amount of samples, whose position is always taken by the prior distribution.
void | SetDiffScale (double diff)
Sets the scale for the diffusion, diffusi0nSigma = diffScale_*areaMax_ example value would be 0.05.
void | SetDiffScaleSize (double diff)
Sets the scale for the diffusion for the size of the histogram , diffusionSigma[stateDim_-1] = diffScaleSize_*areaMax_[stateDim-1] example value would be 0.05.
void | SetFirstOrderScale (double scale)
Sets the scale for the first order prediction, valid values are 0.0000.
void | SetImportanceSampleFraction (double fraction)
Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.
void | SetMinWeight (double min)
Sets the minimum weight each sample is assigned, when < lower minWeight_.
void | SetMultiHistogram (bool multi)
sets if Multihistogram is used or not, default is false
void | SetPredictionOffset (const BIAS::Vector< double > &offSet)
all samples are moved by this offset at the prediction step
void | SetProcessMean (const BIAS::Vector< double > &newProcessMean)
set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()
void | SetReferenceHistogram (ColorHistogram< unsigned char > &refHisto)
sets the reference colorhistogram
void | SetSecondOrderScale (double scale)
Sets the scale for the second order prediction, valid values are 0.0000.
void | UseIntegralHistogram (bool bIntHisto)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | AddDiffusions_ ()
Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.
virtual void | AddOffsets_ ()
adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed
virtual void | CalculateBaseWeights_ ()
Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.
void CalculateMean_ ()
void EvaluateFromIntegralHistoImage_ ()
unsigned int | PickImportanceSample_ ()
unsigned int | PickOneSample_ ()
This is binary search using cumulative probabilities to pick a base sample.
void | SecondOrderARP_ (unsigned int indexOldSample, Vector< double > &newSample)
question: real pos_tminus2 of each sample or better old mean value for all samples?

Static Protected Member Functions

static int | compdouble (const void *l, const void *r)

Protected Attributes

bool | _doSecondOrderARP
long int | _liDebugLevel
double * | _randomArray
BIAS::Vector3< double > | areaMax_
BIAS::Vector3< double > | areaMin_
bool | bIntegralHisto_
ColorHistogram< unsigned char > | chist_
std::vector< double > | correctionOfImportanceWeights_
std::vector< double > | cumulProbArray_
std::vector< double > | cumulProbArrayImportance_
double | defaultInitFraction_
double | diffScale_
double | diffScaleSize_
Vector< double > | diffusionSigma_
Process parameters.
BIAS::Image< float > | fImg_
double | firstOrderScale_
Image< unsigned char > * | img_
double | importanceFraction_
std::vector< unsigned int > | indexTminus2_
bool | initial_
IntegralHistogram intHisto_
double | m_dMaxRefHistoSize
Vector< double > | mean_
Vector< double > | meanTminus1_
double | minWeight_
unsigned int | Nsamples_
BIAS::Vector< double > | offSet_
std::vector< unsigned int > | oldIndices_
Vector< double > | processFirstOrderScale_
Vector< double > | processMean_
Vector< double > | processSecondOrderScale_
Random random_
ColorHistogram< unsigned char > | refHisto2_
ColorHistogram< unsigned char > | refHisto_
std::vector< double > | sampleImportanceWeights_
std::vector< Vector< double > > | samplePosNew_
std::vector< Vector< double > > | samplePosOld_
std::vector< Vector< double > > | samplePosTminus2_
std::vector< double > | sampleWeights_
BIAS::Vector2< double > | secondHistPos_
double | secondOrderScale_
unsigned int | stateDim_
double | sumOfImportanceWeights_
double | sumOfWeights_
bool | useMultiHistogram_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

class for tracking an object in an image

This class is able to handle "normal" ColorHistograms, and MultiColorHistograms. Just Set a MultiColorHistogram in SetReferenceHistogram() and the whole process switches to multiHistogram processing

You have to call:

  • SetActiveImage(imgHSL) with an HSL image;
  • SetReferenceHistogram(chist); (colorHistogram or ColorMultiHistogram)
  • SetArea(Vector3<double>(0,0,0.5), Vector3<double>(width,height,1.5));

  • Init(*nsamples);
  • InitPrior(); //to set samples for first frame

then just call these functions in every turn

  • SetActiveImage(imgHSL)
  • PredictNewSamplePositions()
  • Process();
    Author:
    Ingo Schiller, March 2003, edited by grest

Definition at line 66 of file CondensHisto.hh.

Constructor & Destructor Documentation

CondensHisto::CondensHisto ( )

Set the state dimension in the constructor.

Definition at line 37 of file CondensHisto.cpp.

References bIntegralHisto_, diffScale_, diffScaleSize_, firstOrderScale_, m_dMaxRefHistoSize, minWeight_, secondHistPos_, secondOrderScale_, BIAS::Condensation::stateDim_, and useMultiHistogram_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void Condensation::AddDiffusions_ ( ) [protected, virtual, inherited]

Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.

non gaussian) noise is needed

Definition at line 271 of file Condensation.cpp.

References BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::diffusionSigma_, BIAS::Random::GetNormalDistributed(), BIAS::Condensation::Nsamples_, r, BIAS::Condensation::random_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::stateDim_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void Condensation::AddOffsets_ ( ) [protected, virtual, inherited]

adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed

Definition at line 287 of file Condensation.cpp.

References BIAS::Condensation::Nsamples_, BIAS::Condensation::offSet_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, and TNT::Vector< T >::size().

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void Condensation::CalculateBaseWeights_ ( ) [protected, virtual, inherited]

Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.

Cumulative probabilities are also computed at the same time, to permit an efficient implementation of pick_base_sample using binary search.

Definition at line 296 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_WEIGHTS, BIAS::Condensation::EvaluateObservationDensities(), BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::Nsamples_, BIAS::TimeMeasure::Reset(), BIAS::Condensation::sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by BIAS::Condensation::Process().

void BIAS::Condensation::CalculateMean_ ( ) [inline, protected, inherited]

Definition at line 330 of file Condensation.hh.

References BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::mean_, BIAS::Vector< T >::MultiplyIP(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::Set(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by BIAS::Condensation::Process().

void CondensHisto::CheckImageQuality | ( | double | percent,
 |  | int & | shutter,
 |  | int & | gain
 | ) |

Checks the image Quality by checking the luminance of the image.

the shutter and gain of the camera has to be set by the returned shutter and gain in params

Parameters:
percent | = the allowed percentage of pixels, below minsat in light and dark regions
shutter | = the shutter the camera has to be set to
gain | = the gain ------------ ------------

Definition at line 253 of file CondensHisto.cpp.

References BIASERR, BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), BIAS::Condensation::mean_, refHisto_, and useMultiHistogram_.

static int BIAS::Condensation::compdouble | ( | const void * | l,
 |  | const void * | r
 | ) | [inline, static, protected, inherited]

Definition at line 258 of file Condensation.hh.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void CondensHisto::DrawHistoSizes ( Image< unsigned char > & img )

this draws the Sizes of the Histogram as arrows at their x position

Author:
Ingo Schiler

Definition at line 435 of file CondensHisto.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ImageBase::GetWidth(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), refHisto_, BIAS::Image< StorageType >::Release(), BIAS::Condensation::samplePosNew_, BIAS::Condensation::sampleWeights_, and BIAS::Condensation::sumOfWeights_.

void CondensHisto::DrawMean ( BIAS::Image< unsigned char > & img ) [virtual]

Draws the mean as a rectangle which size is proportional to the histogram size.

Definition at line 688 of file CondensHisto.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ImageBase::GetWidth(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), BIAS::Condensation::mean_, and refHisto_.

Referenced by main().

double CondensHisto::DrawPosteriorDistribution ( BIAS::Image< float > & img )

same as above but float precision and returns the maximum value also.

Definition at line 647 of file CondensHisto.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Condensation::samplePosOld_, and BIAS::Condensation::sampleWeights_.

void CondensHisto::DrawPosteriorDistribution ( BIAS::Image< unsigned char > & img )

Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion.

Image has to be initialized with correct size and channelcount !

Definition at line 624 of file CondensHisto.cpp.

References fImg_, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::ImageBase::IsEmpty().

void CondensHisto::DrawSamples ( Image< unsigned char > & img ) [virtual]

this draws the sample weights as circles

Definition at line 472 of file CondensHisto.cpp.

References BIAS::ImageBase::CM_Grey.

void CondensHisto::DrawSamplesExt ( Image< unsigned char > & img )

this draws the samples, histogram sizes as rects and weights as grey values

Author:
grest / schiller

Definition at line 562 of file CondensHisto.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ImageBase::GetWidth(), refHisto_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::sampleWeights_.

void CondensHisto::DrawSamplesWhite ( Image< unsigned char > & img ) [virtual]

this draws the sample weights as retangeles with greyvalues on white base

Definition at line 505 of file CondensHisto.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::SetColorModel().

void CondensHisto::DrawWeightedSamples ( Image< float > & img )

this draws the samples as circles and the color indicates the size of the histogram (the z-coordinate)

Definition at line 595 of file CondensHisto.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::ImageBase::SetColorModel(), BIAS::Condensation::stateDim_, and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensHisto::EvaluateFromIntegralHistoImage_ ( ) [protected]

Definition at line 95 of file CondensHisto.cpp.

References BIASDOUT, BIAS::IntegralHistogram::CalcSimilarity(), D_COND_INT, D_COND_PROCESS, BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::ColorHistogram< StorageType >::GetBinSize(), BIAS::ColorHistogram< StorageType >::GetBinSizeSat(), BIAS::ImageBase::GetHeight(), BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ImageBase::GetWidth(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), img_, intHisto_, m_dMaxRefHistoSize, BIAS::Condensation::Nsamples_, refHisto2_, refHisto_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::sampleWeights_, secondHistPos_, and useMultiHistogram_.

virtual void BIAS::Condensation::EvaluateImportanceWeights ( ) [inline, virtual, inherited]

If you want to use importance sampling, then overload this function, which is the importance function.

It should be a density distribution, which gives hint where to measure the object state.
Evaluate here the samplePosOld_, not the new ones
IMPORTANT: the scale of the importance weights must be equal to the normal weights, like in EvaluateObservationDensities()

Reimplemented in BIAS::CondensImg.

Definition at line 183 of file Condensation.hh.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void CondensHisto::EvaluateObservationDensities ( ) [virtual]

Here assign a weight to each sample.

The weight must correspond to the similarity of the histograms of the regions.

Implements BIAS::Condensation.

Definition at line 172 of file CondensHisto.cpp.

Image< unsigned char > CondensHisto::GetAktImage ( )

Returns:
the aktual image on which the condensation is doing it's job
Author:
Ingo Schiller

Definition at line 429 of file CondensHisto.cpp.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void CondensHisto::GetMaxValue ( Vector< double > & max )

Definition at line 316 of file CondensHisto.cpp.

References GetMaxWeight(), TNT::Vector< T >::newsize(), and BIAS::Condensation::samplePosOld_.

void CondensHisto::GetMaxVariance ( Vector< double > & maxVar )

Parameters:
maxVar= MaxVariance is a vector of struct: [varPosx, varPosy, varSize, varWeight]

Definition at line 384 of file CondensHisto.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), GetMaxWeight(), TNT::Vector< T >::newsize(), BIAS::Condensation::samplePosOld_, and BIAS::Condensation::sampleWeights_.

double CondensHisto::GetMaxWeight ( int & index )

Returns:
= the maximum weight of all samples;
Parameters:
index = the index of which maxWeight is found

Definition at line 364 of file CondensHisto.cpp.

References BIAS::Condensation::sampleWeights_.

Referenced by GetMaxValue(), and GetMaxVariance().

Vector<double> BIAS::Condensation::GetMean ( ) [inline, inherited]

returns the mean state of the density distribution

Definition at line 121 of file Condensation.hh.

Referenced by main().

void CondensHisto::GetMeanValue ( Vector< double > & mean )

Definition at line 327 of file CondensHisto.cpp.

References BIAS::Condensation::mean_.

void CondensHisto::GetMeanVariance ( Vector< double > & meanVar )

Parameters:
meanVar= MeanVariance is a vector of struct: [varPosx, varPosy, varSize, varWeight]

Definition at line 336 of file CondensHisto.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::mean_, TNT::Vector< T >::newsize(), BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, and BIAS::Vector< T >::SetZero().

double Condensation::GetMeanWeight ( ) const [inherited]

Returns the mean weight of all samples.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 427 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::importanceFraction_, mean, BIAS::Condensation::Nsamples_, and BIAS::Condensation::sampleWeights_.

Referenced by GetMeanVariance().

const std::vector<BIAS::Vector<double> >& BIAS::Condensation::GetSamplePositions ( ) [inline, inherited]

Definition at line 113 of file Condensation.hh.

void CondensHisto::GetSamplePositions ( Image< float > & sampleImg )

Definition at line 415 of file CondensHisto.cpp.

References BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Condensation::samplePosNew_, and BIAS::Condensation::sampleWeights_.

bool Condensation::GetVariance ( Vector< double > & var ) const [inherited]

Returns the variance of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 407 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, and BIAS::Condensation::stateDim_.

double Condensation::GetVariance ( ) const [inherited]

returns the weighted variance as a scalar

Author:
grest

Definition at line 370 of file Condensation.cpp.

References BIASASSERT, BIAS::Condensation::mean_, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, and BIAS::Condensation::sumOfWeights_.

bool Condensation::GetWeightedVariance ( Vector< double > & var ) const [inherited]

Returns the "weighted variance" of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 385 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::mean_, TNT::Vector< T >::newsize(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::SetZero(), and BIAS::Condensation::stateDim_.

int Condensation::Init ( unsigned int nrSmaples ) [inherited]

Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.

The other Init functions are called here also.

Definition at line 52 of file Condensation.cpp.

References BIAS::Condensation::_randomArray, BIASCDOUT, BIASERR, BIAS::Condensation::correctionOfImportanceWeights_, BIAS::Condensation::cumulProbArray_, BIAS::Condensation::cumulProbArrayImportance_, D_COND_INIT, BIAS::Condensation::diffusionSigma_, BIAS::Condensation::indexTminus2_, BIAS::Condensation::initial_, BIAS::Condensation::InitModelDefaults(), BIAS::Condensation::mean_, BIAS::Condensation::meanTminus1_, TNT::Vector< T >::newsize(), BIAS::Condensation::Nsamples_, BIAS::Condensation::offSet_, BIAS::Condensation::oldIndices_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, BIAS::Condensation::random_, BIAS::Random::Reset(), BIAS::Condensation::sampleImportanceWeights_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::Set(), BIAS::Condensation::stateDim_, and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensHisto::InitModelDefaults ( ) [virtual]

Here u can specify the model and process defaults.

Implements BIAS::Condensation.

Definition at line 55 of file CondensHisto.cpp.

References areaMax_, diffScale_, diffScaleSize_, BIAS::Condensation::diffusionSigma_, firstOrderScale_, BIAS::Condensation::importanceFraction_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, secondOrderScale_, BIAS::Vector< T >::Set(), and BIAS::Condensation::stateDim_.

int Condensation::InitPrior ( ) [inherited]

sets the sample positions for first time step

Definition at line 107 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_INIT, BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::indexTminus2_, BIAS::Condensation::InitPriorPositions(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::Condensation::sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensHisto::InitPriorPositions ( unsigned int nrOfInitSamples ) [virtual]

The Prior condition is used to init the first sample positions.

Calculates a initial pos for all samples. The prior cond. maybe defined by an image (if state vector is 2-dim) or by a mixture of gaussions or Uniform_distributed or ... or ...

Implements BIAS::Condensation.

Definition at line 84 of file CondensHisto.cpp.

References areaMax_, areaMin_, BIAS::Random::GetUniformDistributed(), BIAS::Condensation::random_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::stateDim_.

Referenced by main().

unsigned int BIAS::Condensation::PickImportanceSample_ ( ) [inline, protected, inherited]

Definition at line 288 of file Condensation.hh.

References BIAS::Condensation::cumulProbArrayImportance_, BIAS::Random::GetUniformDistributed(), BIAS::Condensation::Nsamples_, BIAS::Condensation::random_, and BIAS::Condensation::sumOfImportanceWeights_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

unsigned int BIAS::Condensation::PickOneSample_ ( ) [inline, protected, inherited]

This is binary search using cumulative probabilities to pick a base sample.

The use of this routine makes Condensation O(NlogN) where N is the number of samples. It is probably better to pick base samples deterministically, since then the algorithm is O(N) and probably marginally more efficient, but this routine is kept here for conceptual simplicity and because it maps better to the published literature.

Definition at line 264 of file Condensation.hh.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

int Condensation::PredictNewSamplePositions ( ) [inherited]

now pick samples from the last time step using the weights

most probably from the process model

most probably gaussian noise

Definition at line 136 of file Condensation.cpp.

References BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), BIASCDOUT, BIAS::Condensation::correctionOfImportanceWeights_, BIAS::Condensation::cumulProbArrayImportance_, D_COND_DEBUG, D_COND_PROCESS, D_COND_WEIGHTS, BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::EvaluateImportanceWeights(), BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::indexTminus2_, BIAS::Condensation::InitPriorPositions(), BIAS::Condensation::Nsamples_, BIAS::Condensation::oldIndices_, BIAS::Condensation::PickImportanceSample_(), BIAS::Condensation::PickOneSample_(), BIAS::TimeMeasure::Reset(), BIAS::Condensation::sampleImportanceWeights_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::sampleWeights_, BIAS::Condensation::SecondOrderARP_(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfImportanceWeights_.

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void Condensation::Process ( ) [inherited]

This really does one iteration of Condensation.

It calls PredictSamplePosition() and EvaluateObservationDensity() in the necessary order.

Definition at line 327 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), D_COND_PROCESS, BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::initial_, BIAS::Condensation::mean_, BIAS::Condensation::meanTminus1_, BIAS::TimeMeasure::Reset(), BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Condensation::SecondOrderARP_ | ( | unsigned int | indexOldSample,
 |  | Vector< double > & | newSample
 | ) | [inline, protected, inherited]

question: real pos_tminus2 of each sample or better old mean value for all samples?

Definition at line 309 of file Condensation.hh.

References BIASCDOUT, D_COND_DEBUG, BIAS::Condensation::indexTminus2_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, and BIAS::Condensation::stateDim_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void BIAS::CondensHisto::SetActiveImage ( Image< unsigned char > & img ) [inline]

sets the present picture to compare and create new observation

Definition at line 163 of file CondensHisto.hh.

Referenced by main().

void CondensHisto::SetArea | ( | Vector3< double > | min,
 |  | Vector3< double > | max
 | ) |

The area for the initial uniform distribution.

3-dim case

Definition at line 247 of file CondensHisto.cpp.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Condensation::SetDefaultInitFraction ( double fraction ) [inherited]

Set the amount of samples, whose position is always taken by the prior distribution.

Default is 0.2.
fraction must be in [0..1];

Definition at line 256 of file Condensation.cpp.

References BIAS::Condensation::defaultInitFraction_.

void BIAS::CondensHisto::SetDiffScale ( double diff ) [inline]

Sets the scale for the diffusion, diffusi0nSigma = diffScale_*areaMax_ example value would be 0.05.

Definition at line 112 of file CondensHisto.hh.

void BIAS::CondensHisto::SetDiffScaleSize ( double diff ) [inline]

Sets the scale for the diffusion for the size of the histogram , diffusionSigma[stateDim_-1] = diffScaleSize_*areaMax_[stateDim-1] example value would be 0.05.

Definition at line 125 of file CondensHisto.hh.

void BIAS::CondensHisto::SetFirstOrderScale ( double scale ) [inline]

Sets the scale for the first order prediction, valid values are 0.0000.

.1 - 1.0

Definition at line 150 of file CondensHisto.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void Condensation::SetImportanceSampleFraction ( double fraction ) [inherited]

Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.

Definition at line 264 of file Condensation.cpp.

References BIAS::Condensation::importanceFraction_.

void BIAS::CondensHisto::SetMinWeight ( double min ) [inline]

Sets the minimum weight each sample is assigned, when < lower minWeight_.

Definition at line 104 of file CondensHisto.hh.

Referenced by main().

void BIAS::CondensHisto::SetMultiHistogram ( bool multi ) [inline]

sets if Multihistogram is used or not, default is false

Definition at line 180 of file CondensHisto.hh.

void BIAS::Condensation::SetPredictionOffset ( const BIAS::Vector< double > & offSet ) [inline, inherited]

all samples are moved by this offset at the prediction step

Definition at line 109 of file Condensation.hh.

void BIAS::Condensation::SetProcessMean ( const BIAS::Vector< double > & newProcessMean ) [inline, inherited]

set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()

Definition at line 158 of file Condensation.hh.

void BIAS::CondensHisto::SetReferenceHistogram ( ColorHistogram< unsigned char > & refHisto ) [inline]

sets the reference colorhistogram

Definition at line 168 of file CondensHisto.hh.

References BIAS::ColorHistogram< StorageType >::GetHeightROI(), BIAS::ColorHistogram< StorageType >::GetWidthROI(), and BIAS::ColorHistogram< StorageType >::SetBinSize().

Referenced by main().

void BIAS::CondensHisto::SetSecondOrderScale ( double scale ) [inline]

Sets the scale for the second order prediction, valid values are 0.0000.

.1 - 1.0

Definition at line 136 of file CondensHisto.hh.

void CondensHisto::UseIntegralHistogram ( bool bIntHisto )

Definition at line 50 of file CondensHisto.cpp.

References bIntegralHisto_.

Member Data Documentation

bool BIAS::Condensation::_doSecondOrderARP [protected, inherited]

Definition at line 183 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

double* BIAS::Condensation::_randomArray [protected, inherited]

Definition at line 255 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation(), BIAS::Condensation::Init(), and BIAS::Condensation::~Condensation().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

BIAS::Vector3<double> BIAS::CondensHisto::areaMax_ [protected]

Definition at line 288 of file CondensHisto.hh.

Referenced by InitModelDefaults(), and InitPriorPositions().

BIAS::Vector3<double> BIAS::CondensHisto::areaMin_ [protected]

Definition at line 288 of file CondensHisto.hh.

Referenced by InitPriorPositions().

bool BIAS::CondensHisto::bIntegralHisto_ [protected]

Definition at line 315 of file CondensHisto.hh.

Referenced by CondensHisto(), and UseIntegralHistogram().

ColorHistogram<unsigned char> BIAS::CondensHisto::chist_ [protected]

Definition at line 292 of file CondensHisto.hh.

std::vector<double> BIAS::Condensation::correctionOfImportanceWeights_ [protected, inherited]

Definition at line 242 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

std::vector<double> BIAS::Condensation::cumulProbArray_ [protected, inherited]

Definition at line 240 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::InitPrior().

std::vector<double> BIAS::Condensation::cumulProbArrayImportance_ [protected, inherited]

Definition at line 241 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

double BIAS::Condensation::defaultInitFraction_ [protected, inherited]

Definition at line 251 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Condensation(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::CondensImg::InitModelDefaults(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SetDefaultInitFraction().

double BIAS::CondensHisto::diffScale_ [protected]

Definition at line 305 of file CondensHisto.hh.

Referenced by CondensHisto(), and InitModelDefaults().

double BIAS::CondensHisto::diffScaleSize_ [protected]

Definition at line 306 of file CondensHisto.hh.

Referenced by CondensHisto(), and InitModelDefaults().

Vector<double> BIAS::Condensation::diffusionSigma_ [protected, inherited]

Process parameters.

Definition at line 247 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Init(), BIAS::CondensImg::InitModelDefaults(), and InitModelDefaults().

BIAS::Image<float> BIAS::CondensHisto::fImg_ [protected]

Definition at line 302 of file CondensHisto.hh.

Referenced by DrawPosteriorDistribution().

double BIAS::CondensHisto::firstOrderScale_ [protected]

Definition at line 308 of file CondensHisto.hh.

Referenced by CondensHisto(), and InitModelDefaults().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

Image<unsigned char>* BIAS::CondensHisto::img_ [protected]

Definition at line 289 of file CondensHisto.hh.

Referenced by EvaluateFromIntegralHistoImage_().

double BIAS::Condensation::importanceFraction_ [protected, inherited]

Definition at line 252 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::CondensImg::InitModelDefaults(), InitModelDefaults(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SetImportanceSampleFraction().

std::vector<unsigned int> BIAS::Condensation::indexTminus2_ [protected, inherited]

Definition at line 236 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SecondOrderARP_().

bool BIAS::Condensation::initial_ [protected, inherited]

Definition at line 250 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::Process().

IntegralHistogram BIAS::CondensHisto::intHisto_ [protected]

Definition at line 295 of file CondensHisto.hh.

Referenced by EvaluateFromIntegralHistoImage_().

double BIAS::CondensHisto::m_dMaxRefHistoSize [protected]

Definition at line 310 of file CondensHisto.hh.

Referenced by CondensHisto(), and EvaluateFromIntegralHistoImage_().

Vector<double> BIAS::Condensation::mean_ [protected, inherited]

Definition at line 238 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateMean_(), CheckImageQuality(), BIAS::CondensImg::DrawMean(), DrawMean(), GetMeanValue(), GetMeanVariance(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::Process().

Vector<double> BIAS::Condensation::meanTminus1_ [protected, inherited]

Definition at line 238 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::Process().

double BIAS::CondensHisto::minWeight_ [protected]

Definition at line 304 of file CondensHisto.hh.

Referenced by CondensHisto().

unsigned int BIAS::Condensation::Nsamples_ [protected, inherited]

Definition at line 229 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateImportanceWeights(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

BIAS::Vector<double> BIAS::Condensation::offSet_ [protected, inherited]

Definition at line 256 of file Condensation.hh.

Referenced by BIAS::Condensation::AddOffsets_(), and BIAS::Condensation::Init().

std::vector<unsigned int> BIAS::Condensation::oldIndices_ [protected, inherited]

Definition at line 236 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

Vector<double> BIAS::Condensation::processFirstOrderScale_ [protected, inherited]

Definition at line 248 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::CondensImg::InitModelDefaults(), InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processMean_ [protected, inherited]

Definition at line 247 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::CondensImg::InitModelDefaults(), InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processSecondOrderScale_ [protected, inherited]

Definition at line 248 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::CondensImg::InitModelDefaults(), InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Random BIAS::Condensation::random_ [protected, inherited]

Definition at line 254 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Init(), BIAS::CondensImg::InitPriorPositions(), InitPriorPositions(), and BIAS::Condensation::PickImportanceSample_().

ColorHistogram<unsigned char> BIAS::CondensHisto::refHisto2_ [protected]

Definition at line 299 of file CondensHisto.hh.

Referenced by EvaluateFromIntegralHistoImage_().

ColorHistogram<unsigned char> BIAS::CondensHisto::refHisto_ [protected]

Definition at line 298 of file CondensHisto.hh.

Referenced by CheckImageQuality(), DrawHistoSizes(), DrawMean(), DrawSamplesExt(), and EvaluateFromIntegralHistoImage_().

std::vector<double> BIAS::Condensation::sampleImportanceWeights_ [protected, inherited]

Definition at line 241 of file Condensation.hh.

Referenced by BIAS::CondensImg::EvaluateImportanceWeights(), BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

std::vector<Vector<double> > BIAS::Condensation::samplePosNew_ [protected, inherited]

Definition at line 231 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), DrawHistoSizes(), DrawSamplesExt(), EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), GetSamplePositions(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::CondensImg::InitPriorPositions(), InitPriorPositions(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::Process().

std::vector<Vector<double> > BIAS::Condensation::samplePosOld_ [protected, inherited]

Definition at line 232 of file Condensation.hh.

Referenced by BIAS::Condensation::AddOffsets_(), BIAS::Condensation::CalculateMean_(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), DrawWeightedSamples(), BIAS::CondensImg::EvaluateImportanceWeights(), GetMaxValue(), GetMaxVariance(), GetMeanVariance(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::Process(), and BIAS::Condensation::SecondOrderARP_().

std::vector<Vector<double> > BIAS::Condensation::samplePosTminus2_ [protected, inherited]

Definition at line 233 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::Process(), and BIAS::Condensation::SecondOrderARP_().

std::vector<double> BIAS::Condensation::sampleWeights_ [protected, inherited]

Definition at line 240 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), DrawHistoSizes(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), DrawSamplesExt(), DrawWeightedSamples(), EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), GetMaxVariance(), GetMaxWeight(), GetMeanVariance(), BIAS::Condensation::GetMeanWeight(), GetSamplePositions(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), and BIAS::Condensation::PredictNewSamplePositions().

BIAS::Vector2<double> BIAS::CondensHisto::secondHistPos_ [protected]

Definition at line 313 of file CondensHisto.hh.

Referenced by CondensHisto(), and EvaluateFromIntegralHistoImage_().

double BIAS::CondensHisto::secondOrderScale_ [protected]

Definition at line 307 of file CondensHisto.hh.

Referenced by CondensHisto(), and InitModelDefaults().

unsigned int BIAS::Condensation::stateDim_ [protected, inherited]

Definition at line 230 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Condensation(), CondensHisto(), DrawWeightedSamples(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), InitModelDefaults(), BIAS::CondensImg::InitPriorPositions(), InitPriorPositions(), and BIAS::Condensation::SecondOrderARP_().

double BIAS::Condensation::sumOfImportanceWeights_ [protected, inherited]

Definition at line 244 of file Condensation.hh.

Referenced by BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

double BIAS::Condensation::sumOfWeights_ [protected, inherited]

Definition at line 244 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), DrawHistoSizes(), BIAS::CondensImg::DrawMean(), BIAS::CondensImg::DrawSamples(), DrawWeightedSamples(), BIAS::Condensation::GetVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::InitPrior().

bool BIAS::CondensHisto::useMultiHistogram_ [protected]

Definition at line 309 of file CondensHisto.hh.

Referenced by CheckImageQuality(), CondensHisto(), and EvaluateFromIntegralHistoImage_().

The documentation for this class was generated from the following files:
  • StateEstimator/CondensHisto.hh
  • StateEstimator/CondensHisto.cpp
Generated on Wed Jun 21 19:06:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CondensImg Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CondensImg

BIAS::CondensImg Class Reference

example class for condensation with a 2-dim state vector. More...

#include <StateEstimator/CondensImg.hh>

Inheritance diagram for BIAS::CondensImg:

[legend]
Collaboration diagram for BIAS::CondensImg:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
CondensImg ()
u have to set the stateDim in the constructor!
bool | DebugLevelIsSet (long int lv) const
void | DrawMean (BIAS::Image< unsigned char > &img)
Draws the mean as a cross, which size is proportional to the variance.
double | DrawPosteriorDistribution (BIAS::Image< float > &img)
same as above but float precision and returns the maximum value also.
void | DrawPosteriorDistribution (BIAS::Image< unsigned char > &img)
Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion.
void | DrawSamples (Image< unsigned char > &img, unsigned char value=255)
this draws the sample weights as circles
virtual void | EvaluateImportanceWeights ()
If you want to use importance sampling, then overload this function, which is the importance function.
virtual void | EvaluateObservationDensities ()
most important function, here u have to calculate a probability for each sample position based on your observations and assign this prob.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Vector< double > | GetMean ()
returns the mean state of the density distribution
double | GetMeanWeight () const
Returns the mean weight of all samples.
const std::vector< BIAS::Vector<
double > > & 		GetSamplePositions ()
void | GetSamplePositions (Image< unsigned char > &sampleImg)
bool | GetVariance (Vector< double > &var) const
Returns the variance of the sample positions in var.
double | GetVariance () const
returns the weighted variance as a scalar
bool | GetWeightedVariance (Vector< double > &var) const
Returns the "weighted variance" of the sample positions in var.
int | Init (unsigned int nrSmaples)
Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.
virtual void | InitModelDefaults ()
Here u can specify the model and process defaults.
int | InitPrior ()
sets the sample positions for first time step
virtual void | InitPriorPositions (unsigned int nrOfInitSamples)
The Prior condition is used to init the first sample positions.
int | PredictNewSamplePositions ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Process ()
This really does one iteration of Condensation.
void | RemoveDebugLevel (long int lv)
void | SetArea (Vector2< double > min, Vector2< double > max)
The area for the initial uniform distribution.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultInitFraction (double fraction)
Set the amount of samples, whose position is always taken by the prior distribution.
void | SetImportanceSampleFraction (double fraction)
Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.
void | SetObservation (Image< unsigned char > &osbImg)
converts to Image<float> and calls the function above
void | SetPredictionOffset (const BIAS::Vector< double > &offSet)
all samples are moved by this offset at the prediction step
void | SetProcessMean (const BIAS::Vector< double > &newProcessMean)
set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | AddDiffusions_ ()
Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.
virtual void | AddOffsets_ ()
adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed
virtual void | CalculateBaseWeights_ ()
Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.
void CalculateMean_ ()
unsigned int | PickImportanceSample_ ()
unsigned int | PickOneSample_ ()
This is binary search using cumulative probabilities to pick a base sample.
void | SecondOrderARP_ (unsigned int indexOldSample, Vector< double > &newSample)
question: real pos_tminus2 of each sample or better old mean value for all samples?

Static Protected Member Functions

static int | compdouble (const void *l, const void *r)

Protected Attributes

bool | _doSecondOrderARP
long int | _liDebugLevel
double * | _randomArray
Vector< double > | areaMax_
Vector< double > | areaMin_
std::vector< double > | correctionOfImportanceWeights_
std::vector< double > | cumulProbArray_
std::vector< double > | cumulProbArrayImportance_
double | defaultInitFraction_
Vector< double > | diffusionSigma_
Process parameters.
BIAS::Image< float > | fImg_
double | importanceFraction_
std::vector< unsigned int > | indexTminus2_
bool | initial_
Vector< double > | mean_
Vector< double > | meanTminus1_
unsigned int | Nsamples_
Image< unsigned char > | obsImg_
BIAS::Vector< double > | offSet_
std::vector< unsigned int > | oldIndices_
Vector< double > | processFirstOrderScale_
Vector< double > | processMean_
Vector< double > | processSecondOrderScale_
Random random_
std::vector< double > | sampleImportanceWeights_
std::vector< Vector< double > > | samplePosNew_
std::vector< Vector< double > > | samplePosOld_
std::vector< Vector< double > > | samplePosTminus2_
std::vector< double > | sampleWeights_
unsigned int | stateDim_
double | sumOfImportanceWeights_
double | sumOfWeights_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

example class for condensation with a 2-dim state vector.

The observation p(Z|X) is simply an image, where the greyvalue represents the probabilty.
See condensImgExample.cpp also!

Author:
Daniel Grest, Feb. 2004

Definition at line 43 of file CondensImg.hh.

Constructor & Destructor Documentation

BIAS::CondensImg::CondensImg ( ) [inline]

u have to set the stateDim in the constructor!

Definition at line 48 of file CondensImg.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void Condensation::AddDiffusions_ ( ) [protected, virtual, inherited]

Adds gaussian noise to the position, _can_ be overwritten if some other (i.e.

non gaussian) noise is needed

Definition at line 271 of file Condensation.cpp.

References BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::diffusionSigma_, BIAS::Random::GetNormalDistributed(), BIAS::Condensation::Nsamples_, r, BIAS::Condensation::random_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::stateDim_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void Condensation::AddOffsets_ ( ) [protected, virtual, inherited]

adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed

Definition at line 287 of file Condensation.cpp.

References BIAS::Condensation::Nsamples_, BIAS::Condensation::offSet_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, and TNT::Vector< T >::size().

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void Condensation::CalculateBaseWeights_ ( ) [protected, virtual, inherited]

Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.

Cumulative probabilities are also computed at the same time, to permit an efficient implementation of pick_base_sample using binary search.

Definition at line 296 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_WEIGHTS, BIAS::Condensation::EvaluateObservationDensities(), BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::Nsamples_, BIAS::TimeMeasure::Reset(), BIAS::Condensation::sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by BIAS::Condensation::Process().

void BIAS::Condensation::CalculateMean_ ( ) [inline, protected, inherited]

Definition at line 330 of file Condensation.hh.

References BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::mean_, BIAS::Vector< T >::MultiplyIP(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::Set(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by BIAS::Condensation::Process().

static int BIAS::Condensation::compdouble | ( | const void * | l,
 |  | const void * | r
 | ) | [inline, static, protected, inherited]

Definition at line 258 of file Condensation.hh.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void CondensImg::DrawMean ( BIAS::Image< unsigned char > & img )

Draws the mean as a cross, which size is proportional to the variance.

Definition at line 190 of file CondensImg.cpp.

References BIAS::Condensation::mean_, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::ScalarProduct(), and BIAS::Condensation::sumOfWeights_.

double CondensImg::DrawPosteriorDistribution ( BIAS::Image< float > & img )

same as above but float precision and returns the maximum value also.

Definition at line 153 of file CondensImg.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), max, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, and BIAS::Condensation::sampleWeights_.

void CondensImg::DrawPosteriorDistribution ( BIAS::Image< unsigned char > & img )

Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion.

Image has to be initialized with correct size and channelcount !

Definition at line 131 of file CondensImg.cpp.

References fImg_, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and max.

void CondensImg::DrawSamples | ( | Image< unsigned char > & | img,
 |  | unsigned char | value = 255
 | ) |

this draws the sample weights as circles

Definition at line 106 of file CondensImg.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Condensation::Nsamples_, obsImg_, BIAS::Image< StorageType >::Release(), BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::ImageBase::SetColorModel(), and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensImg::EvaluateImportanceWeights ( ) [virtual]

If you want to use importance sampling, then overload this function, which is the importance function.

It should be a density distribution, which gives hint where to measure the object state.
Evaluate here the samplePosOld_, not the new ones
IMPORTANT: the scale of the importance weights must be equal to the normal weights, like in EvaluateObservationDensities()

Reimplemented from BIAS::Condensation.

Definition at line 81 of file CondensImg.cpp.

References areaMax_, areaMin_, BIAS::Condensation::Nsamples_, BIAS::Condensation::sampleImportanceWeights_, and BIAS::Condensation::samplePosOld_.

void CondensImg::EvaluateObservationDensities ( ) [virtual]

most important function, here u have to calculate a probability for each sample position based on your observations and assign this prob.

as a weight to the sample

Implements BIAS::Condensation.

Definition at line 65 of file CondensImg.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Condensation::Nsamples_, obsImg_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::sampleWeights_.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Vector<double> BIAS::Condensation::GetMean ( ) [inline, inherited]

returns the mean state of the density distribution

Definition at line 121 of file Condensation.hh.

Referenced by main().

double Condensation::GetMeanWeight ( ) const [inherited]

Returns the mean weight of all samples.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 427 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::importanceFraction_, mean, BIAS::Condensation::Nsamples_, and BIAS::Condensation::sampleWeights_.

Referenced by BIAS::CondensHisto::GetMeanVariance().

const std::vector<BIAS::Vector<double> >& BIAS::Condensation::GetSamplePositions ( ) [inline, inherited]

Definition at line 113 of file Condensation.hh.

void BIAS::CondensImg::GetSamplePositions ( Image< unsigned char > & sampleImg )

bool Condensation::GetVariance ( Vector< double > & var ) const [inherited]

Returns the variance of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 407 of file Condensation.cpp.

References BIASCDOUT, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, and BIAS::Condensation::stateDim_.

double Condensation::GetVariance ( ) const [inherited]

returns the weighted variance as a scalar

Author:
grest

Definition at line 370 of file Condensation.cpp.

References BIASASSERT, BIAS::Condensation::mean_, BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, and BIAS::Condensation::sumOfWeights_.

bool Condensation::GetWeightedVariance ( Vector< double > & var ) const [inherited]

Returns the "weighted variance" of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author:
woelk 12/2004

Definition at line 385 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_MEANVAR, BIAS::Condensation::defaultInitFraction_, BIAS::Vector< T >::ElementwiseProduct(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::mean_, TNT::Vector< T >::newsize(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::SetZero(), and BIAS::Condensation::stateDim_.

int Condensation::Init ( unsigned int nrSmaples ) [inherited]

Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.

The other Init functions are called here also.

Definition at line 52 of file Condensation.cpp.

References BIAS::Condensation::_randomArray, BIASCDOUT, BIASERR, BIAS::Condensation::correctionOfImportanceWeights_, BIAS::Condensation::cumulProbArray_, BIAS::Condensation::cumulProbArrayImportance_, D_COND_INIT, BIAS::Condensation::diffusionSigma_, BIAS::Condensation::indexTminus2_, BIAS::Condensation::initial_, BIAS::Condensation::InitModelDefaults(), BIAS::Condensation::mean_, BIAS::Condensation::meanTminus1_, TNT::Vector< T >::newsize(), BIAS::Condensation::Nsamples_, BIAS::Condensation::offSet_, BIAS::Condensation::oldIndices_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, BIAS::Condensation::random_, BIAS::Random::Reset(), BIAS::Condensation::sampleImportanceWeights_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::Condensation::sampleWeights_, BIAS::Vector< T >::Set(), BIAS::Condensation::stateDim_, and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensImg::InitModelDefaults ( ) [virtual]

Here u can specify the model and process defaults.

Implements BIAS::Condensation.

Definition at line 32 of file CondensImg.cpp.

References areaMax_, BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::diffusionSigma_, BIAS::Condensation::importanceFraction_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, and BIAS::Vector< T >::Set().

int Condensation::InitPrior ( ) [inherited]

sets the sample positions for first time step

Definition at line 107 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::cumulProbArray_, D_COND_INIT, BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::indexTminus2_, BIAS::Condensation::InitPriorPositions(), BIAS::Condensation::Nsamples_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::Condensation::sampleWeights_, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfWeights_.

Referenced by main().

void CondensImg::InitPriorPositions ( unsigned int nrOfInitSamples ) [virtual]

The Prior condition is used to init the first sample positions.

Calculates a initial pos for all samples. The prior cond. maybe defined by an image (if state vector is 2-dim) or by a mixture of gaussions or Uniform_distributed or ... or ...

Implements BIAS::Condensation.

Definition at line 54 of file CondensImg.cpp.

References areaMax_, areaMin_, BIAS::Random::GetUniformDistributed(), BIAS::Condensation::random_, BIAS::Condensation::samplePosNew_, and BIAS::Condensation::stateDim_.

unsigned int BIAS::Condensation::PickImportanceSample_ ( ) [inline, protected, inherited]

Definition at line 288 of file Condensation.hh.

References BIAS::Condensation::cumulProbArrayImportance_, BIAS::Random::GetUniformDistributed(), BIAS::Condensation::Nsamples_, BIAS::Condensation::random_, and BIAS::Condensation::sumOfImportanceWeights_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

unsigned int BIAS::Condensation::PickOneSample_ ( ) [inline, protected, inherited]

This is binary search using cumulative probabilities to pick a base sample.

The use of this routine makes Condensation O(NlogN) where N is the number of samples. It is probably better to pick base samples deterministically, since then the algorithm is O(N) and probably marginally more efficient, but this routine is kept here for conceptual simplicity and because it maps better to the published literature.

Definition at line 264 of file Condensation.hh.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

int Condensation::PredictNewSamplePositions ( ) [inherited]

now pick samples from the last time step using the weights

most probably from the process model

most probably gaussian noise

Definition at line 136 of file Condensation.cpp.

References BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), BIASCDOUT, BIAS::Condensation::correctionOfImportanceWeights_, BIAS::Condensation::cumulProbArrayImportance_, D_COND_DEBUG, D_COND_PROCESS, D_COND_WEIGHTS, BIAS::Condensation::defaultInitFraction_, BIAS::Condensation::EvaluateImportanceWeights(), BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::importanceFraction_, BIAS::Condensation::indexTminus2_, BIAS::Condensation::InitPriorPositions(), BIAS::Condensation::Nsamples_, BIAS::Condensation::oldIndices_, BIAS::Condensation::PickImportanceSample_(), BIAS::Condensation::PickOneSample_(), BIAS::TimeMeasure::Reset(), BIAS::Condensation::sampleImportanceWeights_, BIAS::Condensation::samplePosNew_, BIAS::Condensation::sampleWeights_, BIAS::Condensation::SecondOrderARP_(), BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), and BIAS::Condensation::sumOfImportanceWeights_.

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void Condensation::Process ( ) [inherited]

This really does one iteration of Condensation.

It calls PredictSamplePosition() and EvaluateObservationDensity() in the necessary order.

Definition at line 327 of file Condensation.cpp.

References BIASCDOUT, BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), D_COND_PROCESS, BIAS::TimeMeasure::GetRealTime(), BIAS::Condensation::initial_, BIAS::Condensation::mean_, BIAS::Condensation::meanTminus1_, BIAS::TimeMeasure::Reset(), BIAS::Condensation::samplePosNew_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Condensation::SecondOrderARP_ | ( | unsigned int | indexOldSample,
 |  | Vector< double > & | newSample
 | ) | [inline, protected, inherited]

question: real pos_tminus2 of each sample or better old mean value for all samples?

Definition at line 309 of file Condensation.hh.

References BIASCDOUT, D_COND_DEBUG, BIAS::Condensation::indexTminus2_, BIAS::Condensation::processFirstOrderScale_, BIAS::Condensation::processMean_, BIAS::Condensation::processSecondOrderScale_, BIAS::Condensation::samplePosOld_, BIAS::Condensation::samplePosTminus2_, and BIAS::Condensation::stateDim_.

Referenced by BIAS::Condensation::PredictNewSamplePositions().

void CondensImg::SetArea | ( | Vector2< double > | min,
 |  | Vector2< double > | max
 | ) |

The area for the initial uniform distribution.

Probably image size...

Definition at line 94 of file CondensImg.cpp.

References areaMax_, and areaMin_.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Condensation::SetDefaultInitFraction ( double fraction ) [inherited]

Set the amount of samples, whose position is always taken by the prior distribution.

Default is 0.2.
fraction must be in [0..1];

Definition at line 256 of file Condensation.cpp.

References BIAS::Condensation::defaultInitFraction_.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void Condensation::SetImportanceSampleFraction ( double fraction ) [inherited]

Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.

Definition at line 264 of file Condensation.cpp.

References BIAS::Condensation::importanceFraction_.

void CondensImg::SetObservation ( Image< unsigned char > & osbImg )

converts to Image<float> and calls the function above

Definition at line 101 of file CondensImg.cpp.

References obsImg_.

Referenced by main().

void BIAS::Condensation::SetPredictionOffset ( const BIAS::Vector< double > & offSet ) [inline, inherited]

all samples are moved by this offset at the prediction step

Definition at line 109 of file Condensation.hh.

void BIAS::Condensation::SetProcessMean ( const BIAS::Vector< double > & newProcessMean ) [inline, inherited]

set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()

Definition at line 158 of file Condensation.hh.

Member Data Documentation

bool BIAS::Condensation::_doSecondOrderARP [protected, inherited]

Definition at line 183 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

double* BIAS::Condensation::_randomArray [protected, inherited]

Definition at line 255 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation(), BIAS::Condensation::Init(), and BIAS::Condensation::~Condensation().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

Vector<double> BIAS::CondensImg::areaMax_ [protected]

Definition at line 92 of file CondensImg.hh.

Referenced by EvaluateImportanceWeights(), InitModelDefaults(), InitPriorPositions(), and SetArea().

Vector<double> BIAS::CondensImg::areaMin_ [protected]

Definition at line 92 of file CondensImg.hh.

Referenced by EvaluateImportanceWeights(), InitPriorPositions(), and SetArea().

std::vector<double> BIAS::Condensation::correctionOfImportanceWeights_ [protected, inherited]

Definition at line 242 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

std::vector<double> BIAS::Condensation::cumulProbArray_ [protected, inherited]

Definition at line 240 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::InitPrior().

std::vector<double> BIAS::Condensation::cumulProbArrayImportance_ [protected, inherited]

Definition at line 241 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

double BIAS::Condensation::defaultInitFraction_ [protected, inherited]

Definition at line 251 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Condensation(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), InitModelDefaults(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SetDefaultInitFraction().

Vector<double> BIAS::Condensation::diffusionSigma_ [protected, inherited]

Process parameters.

Definition at line 247 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Init(), InitModelDefaults(), and BIAS::CondensHisto::InitModelDefaults().

BIAS::Image<float> BIAS::CondensImg::fImg_ [protected]

Definition at line 96 of file CondensImg.hh.

Referenced by DrawPosteriorDistribution().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::Condensation::importanceFraction_ [protected, inherited]

Definition at line 252 of file Condensation.hh.

Referenced by BIAS::Condensation::Condensation(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SetImportanceSampleFraction().

std::vector<unsigned int> BIAS::Condensation::indexTminus2_ [protected, inherited]

Definition at line 236 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::SecondOrderARP_().

bool BIAS::Condensation::initial_ [protected, inherited]

Definition at line 250 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::Process().

Vector<double> BIAS::Condensation::mean_ [protected, inherited]

Definition at line 238 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateMean_(), BIAS::CondensHisto::CheckImageQuality(), DrawMean(), BIAS::CondensHisto::DrawMean(), BIAS::CondensHisto::GetMeanValue(), BIAS::CondensHisto::GetMeanVariance(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::Process().

Vector<double> BIAS::Condensation::meanTminus1_ [protected, inherited]

Definition at line 238 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::Process().

unsigned int BIAS::Condensation::Nsamples_ [protected, inherited]

Definition at line 229 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), DrawMean(), DrawPosteriorDistribution(), DrawSamples(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), EvaluateImportanceWeights(), EvaluateObservationDensities(), BIAS::Condensation::GetMeanWeight(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

Image<unsigned char> BIAS::CondensImg::obsImg_ [protected]

Definition at line 93 of file CondensImg.hh.

Referenced by DrawSamples(), EvaluateObservationDensities(), and SetObservation().

BIAS::Vector<double> BIAS::Condensation::offSet_ [protected, inherited]

Definition at line 256 of file Condensation.hh.

Referenced by BIAS::Condensation::AddOffsets_(), and BIAS::Condensation::Init().

std::vector<unsigned int> BIAS::Condensation::oldIndices_ [protected, inherited]

Definition at line 236 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

Vector<double> BIAS::Condensation::processFirstOrderScale_ [protected, inherited]

Definition at line 248 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processMean_ [protected, inherited]

Definition at line 247 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processSecondOrderScale_ [protected, inherited]

Definition at line 248 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), InitModelDefaults(), BIAS::CondensHisto::InitModelDefaults(), and BIAS::Condensation::SecondOrderARP_().

Random BIAS::Condensation::random_ [protected, inherited]

Definition at line 254 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Init(), InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), and BIAS::Condensation::PickImportanceSample_().

std::vector<double> BIAS::Condensation::sampleImportanceWeights_ [protected, inherited]

Definition at line 241 of file Condensation.hh.

Referenced by EvaluateImportanceWeights(), BIAS::Condensation::Init(), and BIAS::Condensation::PredictNewSamplePositions().

std::vector<Vector<double> > BIAS::Condensation::samplePosNew_ [protected, inherited]

Definition at line 231 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::AddOffsets_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), EvaluateObservationDensities(), BIAS::CondensHisto::GetSamplePositions(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), BIAS::Condensation::PredictNewSamplePositions(), and BIAS::Condensation::Process().

std::vector<Vector<double> > BIAS::Condensation::samplePosOld_ [protected, inherited]

Definition at line 232 of file Condensation.hh.

Referenced by BIAS::Condensation::AddOffsets_(), BIAS::Condensation::CalculateMean_(), DrawMean(), DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), EvaluateImportanceWeights(), BIAS::CondensHisto::GetMaxValue(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMeanVariance(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::Process(), and BIAS::Condensation::SecondOrderARP_().

std::vector<Vector<double> > BIAS::Condensation::samplePosTminus2_ [protected, inherited]

Definition at line 233 of file Condensation.hh.

Referenced by BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), BIAS::Condensation::Process(), and BIAS::Condensation::SecondOrderARP_().

std::vector<double> BIAS::Condensation::sampleWeights_ [protected, inherited]

Definition at line 240 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::CondensHisto::DrawHistoSizes(), DrawMean(), DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), EvaluateObservationDensities(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMaxWeight(), BIAS::CondensHisto::GetMeanVariance(), BIAS::Condensation::GetMeanWeight(), BIAS::CondensHisto::GetSamplePositions(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::Condensation::InitPrior(), and BIAS::Condensation::PredictNewSamplePositions().

unsigned int BIAS::Condensation::stateDim_ [protected, inherited]

Definition at line 230 of file Condensation.hh.

Referenced by BIAS::Condensation::AddDiffusions_(), BIAS::Condensation::Condensation(), BIAS::CondensHisto::CondensHisto(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Condensation::GetVariance(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::CondensHisto::InitModelDefaults(), InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), and BIAS::Condensation::SecondOrderARP_().

double BIAS::Condensation::sumOfImportanceWeights_ [protected, inherited]

Definition at line 244 of file Condensation.hh.

Referenced by BIAS::Condensation::PickImportanceSample_(), and BIAS::Condensation::PredictNewSamplePositions().

double BIAS::Condensation::sumOfWeights_ [protected, inherited]

Definition at line 244 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::CondensHisto::DrawHistoSizes(), DrawMean(), DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Condensation::GetVariance(), BIAS::Condensation::Init(), and BIAS::Condensation::InitPrior().

The documentation for this class was generated from the following files:
  • StateEstimator/CondensImg.hh
  • StateEstimator/CondensImg.cpp
Generated on Wed Jun 21 19:06:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Conic2D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Conic2D

BIAS::Conic2D Class Reference
[Geometry and Transformations]

A 3x3 matrix representing a conic (cone/plane intersection). More...

#include <Geometry/Conic2D.hh>

Inheritance diagram for BIAS::Conic2D:

[legend]
Collaboration diagram for BIAS::Conic2D:

[legend]
List of all members.

Public Types

enum ConicType {
Unknown = 0, WholePlane, Ellipse, Parabola,
Hyperbola, SingleLine, DoubleLine, Point,
Empty
}
typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const
addition function, storing data destination matrix
void | AddDebugLevel (long int lv)
void | AddIP (const Matrix< CONIC2D_TYPE > &arg)
Adds arg to this.
void | AddIP (const CONIC2D_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
Conic2D (const Matrix< CONIC2D_TYPE > &m)
copy constructor uses Conic2D::operator=
Conic2D (const MatrixInitType &i)
set default matrix values
Conic2D ()
default constructor sets all fields to zero
bool | DebugLevelIsSet (long int lv) const
CONIC2D_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const CONIC2D_TYPE &scalar)
in place division function
void | Draw (Image< unsigned char > &img) const
draws conic into an image using a brute force method
bool | EllipsoidSilhouetteToGauss (const double &ProbBorder, HomgPoint2D &Center, double &NormalizationFactor)
assign a probability of a gaussian distribution to a conic to measure probabilities in the image plane
void | Fill (const CONIC2D_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< CONIC2D_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< CONIC2D_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
ConicType | GetConicType () const
return the type of point conic of (*this)
CONIC2D_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
CONIC2D_TYPE ** | GetDataArray () const
returns zero based arry for data access
CONIC2D_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
CONIC2D_TYPE * | GetDataLast () const
Get a pointer to the last data element.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
CONIC2D_TYPE | GetDeterminant () const
returns the Determinant |A| of this
Conic2D | GetDualConic (bool UseSVD=false) const
returns the dual of this conic, which is the inverse
bool | GetEllipseParameters (double center[2], double a[2], double b[2]) const
returns the center and the two halfaxes of the conic if feasible (f.e.
bool | GetEllipseParameters (HomgPoint2D &Center, double &dAngle, double &radius_a, double &radius_b) const
computes explicit ellipse representation
CONIC2D_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (CONIC2D_TYPE &max, CONIC2D_TYPE &min) const
return biggest and smallest entry
CONIC2D_TYPE | GetMean () const
Returns the mean value of the matrix elements.
CONIC2D_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
bool | GetPointAndCovariance (HomgPoint2D &center, Matrix2x2< CONIC2D_TYPE > &cov) const
reconstructs center and covariance matrix from conic
Vector< CONIC2D_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< CONIC2D_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< CONIC2D_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
unsigned int | GetSignature () const
computes signature of matrix, (no.
void | GetSystemMatrix (Matrix< CONIC2D_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | GetTangentPoints (const HomgPoint2D &x, HomgPoint2D &p1, HomgPoint2D &p2) const
Returns the two points p1 and p2 on the conic subject to the constraint that the two tangents at the points p1 and p2 intersect in the point x.
bool | IntersectsCircle (const HomgPoint2D &C, double Radius) const
returns true if the given Conic intersects with the circle of radius Radius around point C, false otherwise
int | Invert (Matrix3x3< CONIC2D_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< CONIC2D_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsDoubleLine () const
check whether this conic is a double line
bool | IsEllipse () const
check whether this conic is an ellipse
bool | IsEmpty () const
check whether this conic contains no points
bool | IsHyperbola () const
check whether this conic is a hyperbola
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsParabola () const
check whether this conic is a parabola
bool | IsPoint () const
check whether this conic is a point
bool | IsSingleLine () const
check whether this conic is a single line
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
double | LocatePoint (const HomgPoint2D &point2D) const
determines if the point is inside/on/outside the conic
Matrix (const TNT::Matrix< CONIC2D_TYPE > &A)
Matrix (const Matrix< CONIC2D_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const CONIC2D_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< CONIC2D_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< CONIC2D_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< CONIC2D_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const CONIC2D_TYPEa0, const CONIC2D_TYPEa1, const CONIC2D_TYPEa2, const CONIC2D_TYPEa3, const CONIC2D_TYPEa4, const CONIC2D_TYPEa5, const CONIC2D_TYPEa6, const CONIC2D_TYPEa7, const CONIC2D_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (CONIC2D_TYPE &max, CONIC2D_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< CONIC2D_TYPE > &arg, Vector< CONIC2D_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< CONIC2D_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< CONIC2D_TYPE > &arg, Matrix< CONIC2D_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< CONIC2D_TYPE > &argmat, Matrix3x4< CONIC2D_TYPE > &destmat) const
void | Mult (const Matrix3x3< CONIC2D_TYPE > &argmat, Matrix3x3< CONIC2D_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< CONIC2D_TYPE > &argvec, Vector3< CONIC2D_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const CONIC2D_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< CONIC2D_TYPE > &arg, Vector< CONIC2D_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< CONIC2D_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
bool | Normalize ()
sets mean of first 2 diag elements to positive value, so that LocatePoint(x)<0 means x is in conic
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
CONIC2D_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
CONIC2D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
CONIC2D_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Conic2D & | operator= (const Matrix< CONIC2D_TYPE > &m)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const CONIC2D_TYPE &scalar, Matrix3x3< CONIC2D_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, CONIC2D_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, CONIC2D_TYPEscale)
Scales row NoRow with scale.
void | SetAsCrossProductMatrix (const CONIC2D_TYPE &x, const CONIC2D_TYPE &y, const CONIC2D_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< CONIC2D_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< CONIC2D_TYPE > &data)
set a col of matrix from vector
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetEllipse (const HomgPoint2D &Center, const double &dAngle, const double &radius_a, const double &radius_b)
construct an ellipse with explicit parameters
void | SetFromColumnVectors (const BIAS::Vector3< CONIC2D_TYPE > &v0, const BIAS::Vector3< CONIC2D_TYPE > &v1, const BIAS::Vector3< CONIC2D_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< CONIC2D_TYPE > &v0, const BIAS::Vector3< CONIC2D_TYPE > &v1, const BIAS::Vector3< CONIC2D_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< CONIC2D_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetPointAndCovariance (const HomgPoint2D &center, const Matrix2x2< CONIC2D_TYPE > &cov, const double &dScale=GAUSS2D_CONFIDENCE_39_PERCENT)
constructs a conic from a point and a covariance matrix
void | SetQuadricProjection (const Quadric3D &Q, const PMatrix &P, bool UseSVD=false)
constructs a conic that is a projection of the quadric Q using camera matrix P
void | SetRow (const int row, const Vector< CONIC2D_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const CONIC2D_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< CONIC2D_TYPE > &arg)
Subtracts arg from this
this -= arg.
CONIC2D_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< CONIC2D_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< CONIC2D_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< CONIC2D_TYPE > &argvec, Vector3< CONIC2D_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | copy (const T *v)
void destroy ()
double | GetDiscriminant () const
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

long int | _liDebugLevel
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

A 3x3 matrix representing a conic (cone/plane intersection).

A conic is a (contour) line in P2, which resulted from the projection of a quadric (see Quadric3D) of P3. Conics are ellipses, hyperbolas, ... Each point x of the conic C fulfills x^T C x = 0 which is a quadratic equation in the components of x. If nothing else is mentioned, we mean point conics, not line conics.

Author:
koeser, 10/2003

Definition at line 66 of file Conic2D.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Member Enumeration Documentation

enum BIAS::Conic2D::ConicType

Enumerator:
Unknown
WholePlane
Ellipse
Parabola
Hyperbola
SingleLine
DoubleLine
Point
Empty

Definition at line 71 of file Conic2D.hh.

Constructor & Destructor Documentation

BIAS::Conic2D::Conic2D ( ) [inline]

default constructor sets all fields to zero

Definition at line 75 of file Conic2D.hh.

BIAS::Conic2D::Conic2D ( const MatrixInitType & i ) [inline, explicit]

set default matrix values

Definition at line 78 of file Conic2D.hh.

BIAS::Conic2D::Conic2D ( const Matrix< CONIC2D_TYPE > & m ) [inline]

copy constructor uses Conic2D::operator=

Definition at line 82 of file Conic2D.hh.

Member Function Documentation

void BIAS::Matrix< CONIC2D_TYPE >::Add | ( | const CONIC2D_TYPE & | scalar,
 |  | Matrix< CONIC2D_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::Matrix< CONIC2D_TYPE >::AddIP ( const Matrix< CONIC2D_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< CONIC2D_TYPE >::AddIP ( const CONIC2D_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< CONIC2D_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< CONIC2D_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

CONIC2D_TYPE BIAS::Matrix3x3< CONIC2D_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

Referenced by GetConicType(), IsDoubleLine(), IsEllipse(), IsEmpty(), IsHyperbola(), IsParabola(), IsPoint(), and IsSingleLine().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< CONIC2D_TYPE >::Divide | ( | const CONIC2D_TYPE & | scalar,
 |  | Matrix< CONIC2D_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< CONIC2D_TYPE >::DivideIP ( const CONIC2D_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void Conic2D::Draw ( Image< unsigned char > & img ) const

draws conic into an image using a brute force method

A more elegant way of drawing a conic for the case when the conic is an ellipse can be found in ImageDraw (fw)

Definition at line 205 of file Conic2D.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::Homogenize(), IsEllipse(), LocatePoint(), and p.

Referenced by main().

bool Conic2D::EllipsoidSilhouetteToGauss | ( | const double & | ProbBorder,
 |  | HomgPoint2D & | Center,
 |  | double & | NormalizationFactor
 | ) |

assign a probability of a gaussian distribution to a conic to measure probabilities in the image plane

Ellipsoids in 3D space represent iso surfaces of gaussian normal distributions (e.g. of the 99% volume). Projecting a silhouette of such an ellipsoid gives a conic (e.g. an ellipse) in the image. If we want to interpret the conic as the covariance matrix of a gauss within the image plane, we have to convert it in such a way that the ellipse center yields zero and the border (the former conic line) a different value than zero, e.g. a value corresponding to 99%.

Afterwards, you can simply compute NormalizationFactor * exp(this->LocatePoint(x)) to compute the probability at x

still have to test this !

Definition at line 484 of file Conic2D.cpp.

References GetDiscriminant(), and LocatePoint().

void BIAS::Matrix< CONIC2D_TYPE >::Fill ( const CONIC2D_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<CONIC2D_TYPE > BIAS::Matrix< CONIC2D_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< CONIC2D_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<CONIC2D_TYPE > BIAS::Matrix3x3< CONIC2D_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

Conic2D::ConicType Conic2D::GetConicType ( ) const

return the type of point conic of (*this)

Definition at line 178 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), DoubleLine, Ellipse, Empty, GetDiscriminant(), GetSignature(), Hyperbola, BIAS::Matrix< CONIC2D_TYPE >::NormL2(), Parabola, Point, SingleLine, and WholePlane.

CONIC2D_TYPE * BIAS::Matrix< CONIC2D_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

CONIC2D_TYPE ** BIAS::Matrix< CONIC2D_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

CONIC2D_TYPE ** BIAS::Matrix< CONIC2D_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

CONIC2D_TYPE * BIAS::Matrix< CONIC2D_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

CONIC2D_TYPE BIAS::Matrix3x3< CONIC2D_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

double Conic2D::GetDiscriminant ( ) const [protected]

Returns:
a value classifying the conic:
  • Discriminant<0: hyperbola
  • (Discriminant=0: parabola ?)
  • Discriminant>0: ellipse

Definition at line 42 of file Conic2D.cpp.

Referenced by EllipsoidSilhouetteToGauss(), GetConicType(), GetEllipseParameters(), GetPointAndCovariance(), IsEllipse(), IsHyperbola(), and IsParabola().

Conic2D Conic2D::GetDualConic ( bool UseSVD = false ) const

returns the dual of this conic, which is the inverse

Definition at line 656 of file Conic2D.cpp.

References CONIC2D_TYPE, GetTangentPoints(), BIAS::SVD::Invert(), and SVD_ZERO_THRESH.

bool Conic2D::GetEllipseParameters | ( | double | center[2],
 |  | double | a[2],
 |  | double | b[2]
 | ) | const

returns the center and the two halfaxes of the conic if feasible (f.e.

for drawing with the class ImageDraw)

Author:
woelk 06/2005

Definition at line 384 of file Conic2D.cpp.

References cov, BIAS::Matrix2x2< T >::EigenvalueDecomposition(), and GetPointAndCovariance().

bool Conic2D::GetEllipseParameters | ( | HomgPoint2D & | Center,
 |  | double & | dAngle,
 |  | double & | radius_a,
 |  | double & | radius_b
 | ) | const

computes explicit ellipse representation

if the given conic is an ellipse, the ellipse parameters are extracted and returned in the functions parameters

Parameters:
dAngle | rotation angle in radiant (math. positive)
radius_a | radius in (originally) x direction
radius_b | radius in (originally) y direction
Returns:
returned parameters are only valid if true is returned, otherwise (*this) is no (or a degenerate) ellipse

Definition at line 416 of file Conic2D.cpp.

References a, GetDiscriminant(), IsEllipse(), LocatePoint(), and r.

Referenced by main().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< CONIC2D_TYPE >::GetMaxMin | ( | CONIC2D_TYPE & | max,
 |  | CONIC2D_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< CONIC2D_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

bool Conic2D::GetPointAndCovariance | ( | HomgPoint2D & | center,
 |  | Matrix2x2< CONIC2D_TYPE > & | cov
 | ) | const

reconstructs center and covariance matrix from conic

Author:
woelk 06/2005

Definition at line 352 of file Conic2D.cpp.

References a, and GetDiscriminant().

Referenced by GetEllipseParameters().

Vector<CONIC2D_TYPE > BIAS::Matrix< CONIC2D_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<CONIC2D_TYPE > BIAS::Matrix3x3< CONIC2D_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< CONIC2D_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< CONIC2D_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< CONIC2D_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

unsigned int Conic2D::GetSignature ( ) const

computes signature of matrix, (no.

of neg. eigenvalues) - (no. of pos. eigenvalues) or vice versa if there are more pos. eigenvalues

Definition at line 534 of file Conic2D.cpp.

References BIAS::Matrix3x3< T >::GetRow(), BIAS::SVD::GetS(), BIAS::SVD::GetVT(), and SVD_ZERO_THRESH.

Referenced by GetConicType(), IsDoubleLine(), IsEllipse(), IsEmpty(), IsHyperbola(), IsParabola(), IsPoint(), and IsSingleLine().

void BIAS::Matrix< CONIC2D_TYPE >::GetSystemMatrix ( Matrix< CONIC2D_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

int Conic2D::GetTangentPoints | ( | const HomgPoint2D & | x,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2
 | ) | const

Returns the two points p1 and p2 on the conic subject to the constraint that the two tangents at the points p1 and p2 intersect in the point x.

Returns the number of tangent points (1 or 2) or -1 on error

Author:
woelk 06/2005

Definition at line 682 of file Conic2D.cpp.

References BIASCDOUT, BIASERR, D_CONIC2D_TAN, min, BIAS::Matrix3x3< CONIC2D_TYPE >::Mult(), BIAS::Matrix< T >::MultiplyIP(), BIAS::Matrix< T >::MultLeft(), BIAS::HomgPoint2D::Set(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by GetDualConic().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool Conic2D::IntersectsCircle | ( | const HomgPoint2D & | C,
 |  | double | Radius
 | ) | const

returns true if the given Conic intersects with the circle of radius Radius around point C, false otherwise

This is a contour line intersection ! Does not test whether circle lies "in" conic or vice versa !

Note:
strongly depends upon numerical robustness of SolveQuartic ! tested

Definition at line 564 of file Conic2D.cpp.

References a, BIAS::PolynomialSolve::CheckCoefficients(), BIAS::PolynomialSolve::HasRealSolution(), and r.

Referenced by main().

int BIAS::Matrix3x3< CONIC2D_TYPE >::Invert ( Matrix3x3< CONIC2D_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<CONIC2D_TYPE > BIAS::Matrix3x3< CONIC2D_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< CONIC2D_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool Conic2D::IsDoubleLine ( ) const

check whether this conic is a double line

Definition at line 47 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), and GetSignature().

bool Conic2D::IsEllipse ( ) const

check whether this conic is an ellipse

Definition at line 92 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), GetDiscriminant(), and GetSignature().

Referenced by Draw(), GetEllipseParameters(), and main().

bool Conic2D::IsEmpty ( ) const

check whether this conic contains no points

Definition at line 163 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), and GetSignature().

bool Conic2D::IsHyperbola ( ) const

check whether this conic is a hyperbola

Definition at line 141 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), GetDiscriminant(), and GetSignature().

bool BIAS::Matrix< CONIC2D_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool Conic2D::IsParabola ( ) const

check whether this conic is a parabola

Definition at line 120 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), GetDiscriminant(), and GetSignature().

bool Conic2D::IsPoint ( ) const

check whether this conic is a point

Definition at line 77 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), and GetSignature().

bool Conic2D::IsSingleLine ( ) const

check whether this conic is a single line

Definition at line 62 of file Conic2D.cpp.

References BIAS::Matrix3x3< CONIC2D_TYPE >::det(), and GetSignature().

bool BIAS::Matrix< CONIC2D_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< CONIC2D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< CONIC2D_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< CONIC2D_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

double BIAS::Conic2D::LocatePoint ( const HomgPoint2D & point2D ) const [inline]

determines if the point is inside/on/outside the conic

for "closed" conics, such as ellipses, call this function for a point to determine its position relative to the conic: <0 means: inside the conic >0 means: outside the conic =0 means on the border line

Attention:
: make sure that the conic is normalized LocatePoint internally computes the difference of Mahalanobis distances of point2D from the center and a conic point from the center

Definition at line 130 of file Conic2D.hh.

Referenced by Draw(), EllipsoidSilhouetteToGauss(), GetEllipseParameters(), and main().

BIAS::Matrix< CONIC2D_TYPE >::Matrix ( const TNT::Matrix< CONIC2D_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< CONIC2D_TYPE >::Matrix ( const Matrix< CONIC2D_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< CONIC2D_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< CONIC2D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< CONIC2D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const CONIC2D_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< CONIC2D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< CONIC2D_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( const TNT::Matrix< CONIC2D_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( const Matrix< CONIC2D_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( const Matrix3x3< CONIC2D_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 | ( | const CONIC2D_TYPE | a0,
 |  | const CONIC2D_TYPE | a1,
 |  | const CONIC2D_TYPE | a2,
 |  | const CONIC2D_TYPE | a3,
 |  | const CONIC2D_TYPE | a4,
 |  | const CONIC2D_TYPE | a5,
 |  | const CONIC2D_TYPE | a6,
 |  | const CONIC2D_TYPE | a7,
 |  | const CONIC2D_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< CONIC2D_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< CONIC2D_TYPE >::MaxMin | ( | CONIC2D_TYPE & | max,
 |  | CONIC2D_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< CONIC2D_TYPE >::Mult | ( | const Vector< CONIC2D_TYPE > & | arg,
 |  | Vector< CONIC2D_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< CONIC2D_TYPE >::Mult ( const Matrix< CONIC2D_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< CONIC2D_TYPE >::Mult | ( | const Matrix< CONIC2D_TYPE > & | arg,
 |  | Matrix< CONIC2D_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< CONIC2D_TYPE >::Mult | ( | const Matrix3x4< CONIC2D_TYPE > & | argmat,
 |  | Matrix3x4< CONIC2D_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< CONIC2D_TYPE >::Mult | ( | const Matrix3x3< CONIC2D_TYPE > & | argmat,
 |  | Matrix3x3< CONIC2D_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< CONIC2D_TYPE >::Mult | ( | const Vector3< CONIC2D_TYPE > & | argvec,
 |  | Vector3< CONIC2D_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Referenced by GetTangentPoints().

void BIAS::Matrix< CONIC2D_TYPE >::Multiply | ( | const CONIC2D_TYPE & | scalar,
 |  | Matrix< CONIC2D_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< CONIC2D_TYPE >::MultiplyIP ( const CONIC2D_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< CONIC2D_TYPE >::MultLeft | ( | const Vector< CONIC2D_TYPE > & | arg,
 |  | Vector< CONIC2D_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< CONIC2D_TYPE >::MultLeft ( const Matrix< CONIC2D_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< CONIC2D_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

bool BIAS::Conic2D::Normalize ( ) [inline]

sets mean of first 2 diag elements to positive value, so that LocatePoint(x)<0 means x is in conic

Reimplemented from BIAS::Matrix< CONIC2D_TYPE >.

Definition at line 135 of file Conic2D.hh.

References DOUBLE_EPSILON.

Referenced by SetQuadricProjection().

void BIAS::Matrix< CONIC2D_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< CONIC2D_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< CONIC2D_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< CONIC2D_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

CONIC2D_TYPE BIAS::Matrix< CONIC2D_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Referenced by GetConicType().

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

Conic2D& BIAS::Conic2D::operator= ( const Matrix< CONIC2D_TYPE > & m ) [inline]

Reimplemented from BIAS::Matrix< CONIC2D_TYPE >.

Definition at line 194 of file Conic2D.hh.

References BIAS::Matrix3x3< CONIC2D_TYPE >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::Matrix< CONIC2D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< CONIC2D_TYPE >::Scale | ( | const CONIC2D_TYPE & | scalar,
 |  | Matrix3x3< CONIC2D_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< CONIC2D_TYPE >::ScaleCol | ( | int | NoCol,
 |  | CONIC2D_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< CONIC2D_TYPE >::ScaleRow | ( | int | NoRow,
 |  | CONIC2D_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetAsCrossProductMatrix | ( | const CONIC2D_TYPE & | x,
 |  | const CONIC2D_TYPE & | y,
 |  | const CONIC2D_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetAsCrossProductMatrix ( const Vector3< CONIC2D_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< CONIC2D_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< CONIC2D_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Conic2D::SetEllipse | ( | const HomgPoint2D & | Center,
 |  | const double & | dAngle,
 |  | const double & | radius_a,
 |  | const double & | radius_b
 | ) |

construct an ellipse with explicit parameters

Parameters:
radius_a | radius in (originally) x direction
radius_b | radius in (originally) y direction
dAngle | rotation angle in radiant (math. positive) center of ellipse

Definition at line 283 of file Conic2D.cpp.

References BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix< CONIC2D_TYPE >::SetZero(), and BIAS::Matrix3x3< T >::Transpose().

Referenced by main().

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< CONIC2D_TYPE > & | v0,
 |  | const BIAS::Vector3< CONIC2D_TYPE > & | v1,
 |  | const BIAS::Vector3< CONIC2D_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< CONIC2D_TYPE > & | v0,
 |  | const BIAS::Vector3< CONIC2D_TYPE > & | v1,
 |  | const BIAS::Vector3< CONIC2D_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetFromVector ( const TNT::Vector< CONIC2D_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Matrix3x3< CONIC2D_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< CONIC2D_TYPE >.

void Conic2D::SetPointAndCovariance | ( | const HomgPoint2D & | center,
 |  | const Matrix2x2< CONIC2D_TYPE > & | cov,
 |  | const double & | dScale = GAUSS2D_CONFIDENCE_39_PERCENT
 | ) |

constructs a conic from a point and a covariance matrix

Author:
woelk 06/2005

Definition at line 315 of file Conic2D.cpp.

References BIASASSERT, CONIC2D_TYPE, BIAS::Matrix2x2< T >::Invert(), and BIAS::HomgPoint2D::IsAtInfinity().

void Conic2D::SetQuadricProjection | ( | const Quadric3D & | Q,
 |  | const PMatrix & | P,
 |  | bool | UseSVD = false
 | ) |

constructs a conic that is a projection of the quadric Q using camera matrix P

Definition at line 518 of file Conic2D.cpp.

References BIAS::Quadric3D::GetDualQuadric(), Normalize(), and BIAS::Matrix< T >::Transpose().

Referenced by main().

void BIAS::Matrix< CONIC2D_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< CONIC2D_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< CONIC2D_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by SetEllipse().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< CONIC2D_TYPE >::Sub | ( | const CONIC2D_TYPE & | scalar,
 |  | Matrix< CONIC2D_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< CONIC2D_TYPE >::SubIP ( const CONIC2D_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< CONIC2D_TYPE >::SubIP ( const Matrix< CONIC2D_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

CONIC2D_TYPE BIAS::Matrix3x3< CONIC2D_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< CONIC2D_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< CONIC2D_TYPE >::Transpose ( const Matrix3x3< CONIC2D_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<CONIC2D_TYPE > BIAS::Matrix3x3< CONIC2D_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< CONIC2D_TYPE >.

void BIAS::Matrix3x3< CONIC2D_TYPE >::TransposedMult | ( | const Vector3< CONIC2D_TYPE > & | argvec,
 |  | Vector3< CONIC2D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< CONIC2D_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/Conic2D.hh
  • Geometry/Conic2D.cpp
Generated on Wed Jun 21 19:06:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::const_Region1D< Array1D > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::const_Region1D

TNT::const_Region1D< Array1D > Class Template Reference

#include <Base/Math/tnt/region1d.h>

Collaboration diagram for TNT::const_Region1D< Array1D >:

[legend]
List of all members.

Public Member Functions

const Array1D & | array () const
const_Region1D (const_Region1D< Array1D > &A, Subscript i1, Subscript i2)
const_Region1D (const Array1D &A, const Index1D &I)
const_Region1D (const Array1D &A, Subscript i1, Subscript i2)
Subscript | dim (Subscript i) const
Subscript | dim () const
Subscript | offset (Subscript i) const
Subscript | offset () const
const T & | operator() (Subscript i) const
const_Region1D< Array1D > | operator() (const Index1D &I)
const_Region1D< Array1D > | operator() (Subscript i1, Subscript i2)

Protected Types

typedef Array1D::element_type | T

Protected Attributes

const Array1D & | A_
Subscript dim_
Subscript offset_

Detailed Description

template<class Array1D>
class TNT::const_Region1D< Array1D >

Definition at line 255 of file region1d.h.

Member Typedef Documentation

template<class Array1D>
typedef Array1D::element_type TNT::const_Region1D< Array1D >::T [protected]

Definition at line 262 of file region1d.h.

Constructor & Destructor Documentation

template<class Array1D>
TNT::const_Region1D< Array1D >::const_Region1D | ( | const Array1D & | A,
 |  | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 287 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim_, and TNT_BASE_OFFSET.

template<class Array1D>
TNT::const_Region1D< Array1D >::const_Region1D | ( | const Array1D & | A,
 |  | const Index1D & | I
 | ) | [inline]

Definition at line 298 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim_, TNT::Index1D::lbound(), TNT_BASE_OFFSET, and TNT::Index1D::ubound().

template<class Array1D>
TNT::const_Region1D< Array1D >::const_Region1D | ( | const_Region1D< Array1D > & | A,
 |  | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 309 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim(), TNT::const_Region1D< Array1D >::dim_, TNT::const_Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

Member Function Documentation

template<class Array1D>
const Array1D& TNT::const_Region1D< Array1D >::array ( ) const [inline]

Definition at line 265 of file region1d.h.

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::dim ( Subscript i ) const [inline]

Definition at line 278 of file region1d.h.

References TNT_BASE_OFFSET.

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::dim ( ) const [inline]

Definition at line 268 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim_.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D(), TNT::const_Region1D< Array1D >::operator()(), and TNT::Region1D< Array1D >::operator=().

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::offset ( Subscript i ) const [inline]

Definition at line 270 of file region1d.h.

References TNT_BASE_OFFSET.

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::offset ( ) const [inline]

Definition at line 267 of file region1d.h.

template<class Array1D>
const T& TNT::const_Region1D< Array1D >::operator() ( Subscript i ) const [inline]

Definition at line 350 of file region1d.h.

template<class Array1D>
const_Region1D<Array1D> TNT::const_Region1D< Array1D >::operator() ( const Index1D & I ) [inline]

Definition at line 338 of file region1d.h.

template<class Array1D>
const_Region1D<Array1D> TNT::const_Region1D< Array1D >::operator() | ( | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 323 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim(), and TNT_BASE_OFFSET.

Member Data Documentation

template<class Array1D>
const Array1D& TNT::const_Region1D< Array1D >::A_ [protected]

Definition at line 259 of file region1d.h.

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::dim_ [protected]

Definition at line 261 of file region1d.h.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D(), and TNT::const_Region1D< Array1D >::dim().

template<class Array1D>
Subscript TNT::const_Region1D< Array1D >::offset_ [protected]

Definition at line 260 of file region1d.h.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/region1d.h
Generated on Wed Jun 21 19:13:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::const_Region2D< Array2D > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::const_Region2D

TNT::const_Region2D< Array2D > Class Template Reference

#include <Base/Math/tnt/region2d.h>

Collaboration diagram for TNT::const_Region2D< Array2D >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef Array2D::value_type | T
typedef T | value_type

Public Member Functions

const Array2D & | array () const
const_Region2D (const_Region2D< Array2D > &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2)
const_Region2D (const Array2D &A, const Index1D &I, const Index1D &J)
const_Region2D (const Array2D &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2)
Subscript | dim (Subscript i) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
Subscript | offset (Subscript i) const
const T & | operator() (Subscript i, Subscript j) const
const_Region2D< Array2D > | operator() (const Index1D &I, const Index1D &J)
const_Region2D< Array2D > | operator() (Subscript i1, Subscript i2, Subscript j1, Subscript j2)

Protected Attributes

const Array2D & | A_
Subscript | dim_ [2]
Subscript | offset_ [2]

Detailed Description

template<class Array2D>
class TNT::const_Region2D< Array2D >

Definition at line 282 of file region2d.h.

Member Typedef Documentation

template<class Array2D>
typedef const T* TNT::const_Region2D< Array2D >::const_iterator

Definition at line 294 of file region2d.h.

template<class Array2D>
typedef const T& TNT::const_Region2D< Array2D >::const_reference

Definition at line 295 of file region2d.h.

template<class Array2D>
typedef T TNT::const_Region2D< Array2D >::element_type

Definition at line 293 of file region2d.h.

template<class Array2D>
typedef Array2D::value_type TNT::const_Region2D< Array2D >::T

Definition at line 291 of file region2d.h.

template<class Array2D>
typedef T TNT::const_Region2D< Array2D >::value_type

Definition at line 292 of file region2d.h.

Constructor & Destructor Documentation

template<class Array2D>
TNT::const_Region2D< Array2D >::const_Region2D | ( | const Array2D & | A,
 |  | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 320 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, TNT::Region2D< Array2D >::offset_, and TNT_BASE_OFFSET.

template<class Array2D>
TNT::const_Region2D< Array2D >::const_Region2D | ( | const Array2D & | A,
 |  | const Index1D & | I,
 |  | const Index1D & | J
 | ) | [inline]

Definition at line 338 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, TNT::Index1D::lbound(), TNT::Region2D< Array2D >::offset_, TNT_BASE_OFFSET, and TNT::Index1D::ubound().

template<class Array2D>
TNT::const_Region2D< Array2D >::const_Region2D | ( | const_Region2D< Array2D > & | A,
 |  | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 357 of file region2d.h.

References TNT::const_Region2D< Array2D >::dim(), TNT::Region2D< Array2D >::dim_, TNT::const_Region2D< Array2D >::offset_, TNT::Region2D< Array2D >::offset_, and TNT_BASE_OFFSET.

Member Function Documentation

template<class Array2D>
const Array2D& TNT::const_Region2D< Array2D >::array ( ) const [inline]

Definition at line 297 of file region2d.h.

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::dim ( Subscript i ) const [inline]

Definition at line 310 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, and TNT_BASE_OFFSET.

Referenced by TNT::const_Region2D< Array2D >::const_Region2D().

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::lbound ( ) const [inline]

Definition at line 298 of file region2d.h.

Referenced by TNT::Region2D< Array2D >::operator=().

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::num_cols ( ) const [inline]

Definition at line 300 of file region2d.h.

References TNT::Region2D< Array2D >::dim_.

Referenced by TNT::Region2D< Array2D >::operator=().

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::num_rows ( ) const [inline]

Definition at line 299 of file region2d.h.

References TNT::Region2D< Array2D >::dim_.

Referenced by TNT::Region2D< Array2D >::operator=().

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::offset ( Subscript i ) const [inline]

Definition at line 301 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, TNT::Region2D< Array2D >::offset_, and TNT_BASE_OFFSET.

template<class Array2D>
const T& TNT::const_Region2D< Array2D >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 410 of file region2d.h.

template<class Array2D>
const_Region2D<Array2D> TNT::const_Region2D< Array2D >::operator() | ( | const Index1D & | I,
 |  | const Index1D & | J
 | ) | [inline]

Definition at line 392 of file region2d.h.

template<class Array2D>
const_Region2D<Array2D> TNT::const_Region2D< Array2D >::operator() | ( | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 375 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, TNT::Region2D< Array2D >::offset_, and TNT_BASE_OFFSET.

Member Data Documentation

template<class Array2D>
const Array2D& TNT::const_Region2D< Array2D >::A_ [protected]

Definition at line 286 of file region2d.h.

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::dim_[2] [protected]

Definition at line 288 of file region2d.h.

template<class Array2D>
Subscript TNT::const_Region2D< Array2D >::offset_[2] [protected]

Definition at line 287 of file region2d.h.

Referenced by TNT::const_Region2D< Array2D >::const_Region2D().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/region2d.h
Generated on Wed Jun 21 19:13:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Contour Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Contour

BIAS::Contour Class Reference
[PyramidImage, Camera, Histogram]

a class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code More...

#include <Image/Contour.hh>

List of all members.

Public Member Functions

Contour ()
int | Draw (BIAS::Image< unsigned char > &img, unsigned char greyValue=255)
std::vector< int > & | GetFreemanCode ()
std::vector< BIAS::Vector2<
int > > & 		GetPointSet ()
all pixels belonging to the contour are returned The first entry corresponds to the first freemanCode, that means: the direction from the first to the second pixel is the first value in GetFreemanCode()
int | Process (BIAS::Image< unsigned char > &img)
creates the contour of the first blob found in the image; a pixel is assumed as foreground , if the pixel value is != 0; this function works even if the blob is located at the image border
IMPORTANT: the border of the image is set to zero !
void | SetBackGround (unsigned char backGroundColor)

Protected Member Functions

void | FindFirst_ (int &pos_x, int &pos_y)
void | Init_ (BIAS::Image< unsigned char > &img)
bool | IsFg (int x, int y, int direction)
bool | IsFg (int x, int y)

Protected Attributes

unsigned char | background_
std::vector< BIAS::Vector2<
int > > 		contPixels_
unsigned char ** | data_
std::vector< int > | directionList_
int | img_h
int | img_w

Detailed Description

a class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code

Author:
Dennis Herzog, Jan. 2005, edited by grest

Definition at line 42 of file Contour.hh.

Constructor & Destructor Documentation

BIAS::Contour::Contour ( ) [inline]

Definition at line 44 of file Contour.hh.

Member Function Documentation

int Contour::Draw | ( | BIAS::Image< unsigned char > & | img,
 |  | unsigned char | greyValue = 255
 | ) |

Definition at line 84 of file Contour.cpp.

References BIAS_DEBUG, BIASERR, contPixels_, BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

void Contour::FindFirst_ | ( | int & | pos_x,
 |  | int & | pos_y
 | ) | [protected]

Definition at line 30 of file Contour.cpp.

References img_h, img_w, and IsFg().

Referenced by Process().

std::vector<int>& BIAS::Contour::GetFreemanCode ( ) [inline]

Parameters:
code the resulting list of difference vectors coded in FreeManCode, that means:
0 = step right --
1 = step right & step down --
2 = step down --
3 = step left & step down --
... --
6 = step up --
7 = step right & step up

Definition at line 69 of file Contour.hh.

std::vector< BIAS::Vector2<int> >& BIAS::Contour::GetPointSet ( ) [inline]

all pixels belonging to the contour are returned The first entry corresponds to the first freemanCode, that means: the direction from the first to the second pixel is the first value in GetFreemanCode()

Definition at line 76 of file Contour.hh.

void Contour::Init_ ( BIAS::Image< unsigned char > & img ) [protected]

Definition at line 9 of file Contour.cpp.

References background_, data_, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), img_h, and img_w.

Referenced by Process().

bool BIAS::Contour::IsFg | ( | int | x,
 |  | int | y,
 |  | int | direction
 | ) | [inline, protected]

Definition at line 89 of file Contour.hh.

References BIASERR.

bool BIAS::Contour::IsFg | ( | int | x,
 |  | int | y
 | ) | [inline, protected]

Definition at line 84 of file Contour.hh.

Referenced by FindFirst_(), and Process().

int Contour::Process ( BIAS::Image< unsigned char > & img )

creates the contour of the first blob found in the image; a pixel is assumed as foreground , if the pixel value is != 0; this function works even if the blob is located at the image border
IMPORTANT: the border of the image is set to zero !

Author:
herzog, edited by grest

Definition at line 41 of file Contour.cpp.

References contPixels_, directionList_, FindFirst_(), Init_(), and IsFg().

void BIAS::Contour::SetBackGround ( unsigned char backGroundColor ) [inline]

Definition at line 79 of file Contour.hh.

Member Data Documentation

unsigned char BIAS::Contour::background_ [protected]

Definition at line 111 of file Contour.hh.

Referenced by Init_().

std::vector< BIAS::Vector2<int> > BIAS::Contour::contPixels_ [protected]

Definition at line 114 of file Contour.hh.

Referenced by Draw(), and Process().

unsigned char** BIAS::Contour::data_ [protected]

Definition at line 109 of file Contour.hh.

Referenced by Init_().

std::vector<int> BIAS::Contour::directionList_ [protected]

Definition at line 113 of file Contour.hh.

Referenced by Process().

int BIAS::Contour::img_h [protected]

Definition at line 108 of file Contour.hh.

Referenced by FindFirst_(), and Init_().

int BIAS::Contour::img_w [protected]

Definition at line 107 of file Contour.hh.

Referenced by FindFirst_(), and Init_().

The documentation for this class was generated from the following files:
  • Image/Contour.hh
  • Image/Contour.cpp
Generated on Wed Jun 21 19:06:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Convolution< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Convolution

BIAS::Convolution< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

generic convolution class. More...

#include <Filter/Convolution.hh>

Inheritance diagram for BIAS::Convolution< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Convolution< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | CalculationInFloat () const
decides if calculation is done in integer or floating point
Convolution (Param &para, const int group_id, const std::string &postfix)
uses param object to handle all parameters and base classes
Convolution (Param &para, const std::string &postfix="")
uses param object to handle all parameters and base classes
Convolution ()
holds all params internally without param object
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
decides on the image types which FilterFunction should be called
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
do the convolution using floating point calculations
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
do the convolution using integer arithmetics and shifts
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetKernel (FilterMask &fm) const
get the current filter mask
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
prints the used filter mask, for debugging
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKernel (FilterMask &fm)
set a new filter mask
virtual | ~Convolution ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
int | ConvFloatHori_ (const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst)
worker function for float separated (horizontal) convolution
int | ConvFloatMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for float matrix convolution
int | ConvFloatVert_ (const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst)
worker function for float separated (vertical) convolution
int | ConvIntHori_ (const Image< InputStorageType > &src, Image< CONV_INT > &dst)
worker function for int separated (horizontal) convolution
int | ConvIntMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for int matrix convolution
int | ConvIntVert_ (const Image< CONV_INT > &src, Image< OutputStorageType > &dst)
worker function for int separated (vertical) convolution
void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
FilterMask _fm
the kernel data used for convolution
long int | _liDebugLevel
bool | _ParamsAllocated
Image< CONV_FLOAT > | _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > | _tmpInt
temporary memory, needed for separable filters when integer filtering

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Convolution< InputStorageType, OutputStorageType >

generic convolution class.

Use as follows:

  • SetKernel(FilterMask)
  • Filter(source, destination)

Center pixel is determined by (size-1)>>1.

Author:
woelk/koeser/skoglund 11/2004

Definition at line 63 of file Convolution.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Convolution::Convolution ( )

holds all params internally without param object

Definition at line 400 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, and BIAS::FilterMask::SetZero().

template<class InputStorageType, class OutputStorageType>
Convolution::Convolution | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

uses param object to handle all parameters and base classes

Definition at line 408 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, and BIAS::FilterMask::SetZero().

template<class InputStorageType, class OutputStorageType>
Convolution::Convolution | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

uses param object to handle all parameters and base classes

Definition at line 416 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, and BIAS::FilterMask::SetZero().

template<class InputStorageType, class OutputStorageType>
Convolution::~Convolution ( ) [virtual]

Definition at line 423 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, and BIAS::FilterMask::SetZero().

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
bool BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat ( ) const [inline]

decides if calculation is done in integer or floating point

Definition at line 104 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_FLOAT > & | dst
 | ) | [protected]

worker function for float separated (horizontal) convolution

Definition at line 294 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfh(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

worker function for float matrix convolution

Definition at line 232 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatVert_ | ( | const Image< CONV_FLOAT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

worker function for float separated (vertical) convolution

Definition at line 348 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_INT > & | dst
 | ) | [protected]

worker function for int separated (horizontal) convolution

Definition at line 115 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetHorizRightShift(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepih(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

worker function for int matrix convolution

Definition at line 50 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKerneli(), BIAS::FilterMask::GetKernelRightShift(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntVert_ | ( | const Image< CONV_INT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

worker function for int separated (vertical) convolution

Definition at line 172 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepiv(), BIAS::FilterMask::GetVertRightShift(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Convolution::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

decides on the image types which FilterFunction should be called

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 430 of file Convolution.cpp.

References BIASCDOUT, BIASDOUT, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), D_CONV_TYPES, D_FILTERBASE_CALLSTACK, and PRINTTYPE.

template<class InputStorageType, class OutputStorageType>
int Convolution::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

do the convolution using floating point calculations

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 513 of file Convolution.cpp.

References D_WRITE_IMAGES, and BIAS::ImageIO::Write().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int Convolution::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

do the convolution using integer arithmetics and shifts

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 457 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, BIASDOUT, BIASERR, D_CONV_KERNEL, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inline, protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 144 of file Convolution.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetKernel ( FilterMask & fm ) const [inline]

get the current filter mask

Definition at line 93 of file Convolution.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void Convolution::PrintKernel ( ) const

prints the used filter mask, for debugging

Definition at line 582 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::FilterMask::IsSeparable().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel ( FilterMask & fm ) [inline]

set a new filter mask

Definition at line 97 of file Convolution.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
FilterMask BIAS::Convolution< InputStorageType, OutputStorageType >::_fm [protected]

the kernel data used for convolution

Definition at line 108 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<CONV_FLOAT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat [protected]

temporary memory, needed for separable filters when float filtering

Definition at line 115 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

template<class InputStorageType, class OutputStorageType>
Image<CONV_INT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpInt [protected]

temporary memory, needed for separable filters when integer filtering

Definition at line 118 of file Convolution.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Convolution.hh
  • Filter/Convolution.cpp
Generated on Wed Jun 21 19:06:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CoordinateTransform3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CoordinateTransform3D

BIAS::CoordinateTransform3D Class Reference

#include <Geometry/CoordinateTransform3D.hh>

Inheritance diagram for BIAS::CoordinateTransform3D:

[legend]
Collaboration diagram for BIAS::CoordinateTransform3D:

[legend]
List of all members.

Public Member Functions

void | ConcatenateLocalTransform (const CoordinateTransform3D &localT, CoordinateTransform3D &res) const
Calculates transformation from global system of this to local system of argument transformation.
CoordinateTransform3D (const CoordinateTransform3D &c)
calls operator=
CoordinateTransform3D ()
sets identity transform with zero covariance
const Vector3< double > & | GetC () const
const Vector< double > | GetCQ () const
Matrix4x4< double > | GetGlobalToLocalTransform () const
Matrix4x4< double > | GetLocalToGlobalTransform () const
Matrix3x4< double > | GetMatrix3x4 () const
get matrix, which transforms points in global coordinate system to points in local coordinate system
const Quaternion< double > & | GetQ () const
BIAS::RMatrixBase | GetR () const
void | GlobalToLocal (HomgPoint3D &X_G, HomgPoint3DCov &Cov_G) const
HomgPoint3D | GlobalToLocal (const HomgPoint3D &X_G) const
void InvertIP ()
Swapps the meaning of global and local.
bool | Load (const std::string &inputFile)
method to load directly from a given filename.
void | LocalToGlobal (HomgPoint3D &X_L, HomgPoint3DCov &Cov_L) const
HomgPoint3D | LocalToGlobal (const HomgPoint3D &X_L) const
const CoordinateTransform3D & | operator= (const CoordinateTransform3D &c)
copy all elements
bool | Save (const std::string &outputFile)
void | Set (const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0)
Define local coordinate frame from within the world frame.
void | SetC (const Vector3< double > &C)
sets origin of local coordinate system in global coordinates
void | SetFromMatrix3x4 (const Matrix3x4< double > &M)
use matrix, which transforms points in global coordinate system to points in local coordinate system (like pmatrix )
void | SetQ (const Quaternion< double > &Q)
void | SetR (const BIAS::RMatrixBase &R)
Sets the upper 3x3 matrix accordingly (copies values).
void Talk ()
Prints Transformation together with more intutive rotation representations.

Protected Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Protected Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | copy (const T *v)
void destroy ()
double | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
void | initialize (Subscript M, Subscript N)
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< double > &R, const Vector3< double > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< double > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< double > &arg)
Matrix4x4 (const Matrix4x4< double > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< double > &argvec, Vector4< double > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | set (const T &val)
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
Matrix< double > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
void UpdateMatrix_ ()
computes the 4x4 matrix

Protected Attributes

Vector3< double > | C_
the translation between the systems
Matrix4x4< double > | invTransform_
matrix representation of inverse transform (LocalToGlobalTranform)
Subscript m_
Subscript mn_
Subscript n_
Quaternion< double > | Q_
this is the rotation between the systems
T ** row_
T ** rowm1_
double | scale_
the scale between the systems ||vec1Global|| * scale_ = ||vec1Local||
T * v_
T * vm1_

Friends

std::ostream & | operator<< (std::ostream &os, const CoordinateTransform3D &p)
std::istream & | operator>> (std::istream &is, CoordinateTransform3D &p)

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

Definition at line 78 of file CoordinateTransform3D.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::CoordinateTransform3D::CoordinateTransform3D ( ) [inline]

sets identity transform with zero covariance

Definition at line 83 of file CoordinateTransform3D.hh.

BIAS::CoordinateTransform3D::CoordinateTransform3D ( const CoordinateTransform3D & c ) [inline]

calls operator=

Definition at line 89 of file CoordinateTransform3D.hh.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void CoordinateTransform3D::ConcatenateLocalTransform | ( | const CoordinateTransform3D & | localT,
 |  | CoordinateTransform3D & | res
 | ) | const

Calculates transformation from global system of this to local system of argument transformation.

if this defines [global <-> local] and argument (localT) defines [local <-> local(2)]. the res then defines [global <-> local(2)].

Definition at line 129 of file CoordinateTransform3D.cpp.

References C_, BIAS::Quaternion< QUAT_TYPE >::MultVec(), Q_, scale_, and Set().

Referenced by BIAS::Pose::TransformToNewGlobalBy().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

double BIAS::Matrix4x4< double >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

const Vector3<double>& BIAS::CoordinateTransform3D::GetC ( ) const [inline]

Definition at line 174 of file CoordinateTransform3D.hh.

Referenced by BIAS::Pose::TransformToNewGlobalBy().

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

const Vector<double> BIAS::CoordinateTransform3D::GetCQ ( ) const [inline]

Definition at line 176 of file CoordinateTransform3D.hh.

References res.

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::EuclideanTransf3D::Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Matrix4x4<double> BIAS::CoordinateTransform3D::GetGlobalToLocalTransform ( ) const [inline]

Definition at line 191 of file CoordinateTransform3D.hh.

Matrix4x4<double> BIAS::CoordinateTransform3D::GetLocalToGlobalTransform ( ) const [inline]

Definition at line 194 of file CoordinateTransform3D.hh.

BIAS::Matrix3x4< double > CoordinateTransform3D::GetMatrix3x4 ( ) const

get matrix, which transforms points in global coordinate system to points in local coordinate system

Definition at line 85 of file CoordinateTransform3D.cpp.

Referenced by BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

const Quaternion<double>& BIAS::CoordinateTransform3D::GetQ ( ) const [inline]

Definition at line 172 of file CoordinateTransform3D.hh.

Referenced by BIAS::Pose::TransformToNewGlobalBy().

BIAS::RMatrixBase BIAS::CoordinateTransform3D::GetR ( ) const [inline]

Definition at line 185 of file CoordinateTransform3D.hh.

References R, and BIAS::RMatrixBase::SetFromQuaternion().

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

void BIAS::CoordinateTransform3D::GlobalToLocal | ( | HomgPoint3D & | X_G,
 |  | HomgPoint3DCov & | Cov_G
 | ) | const [inline]

Definition at line 158 of file CoordinateTransform3D.hh.

HomgPoint3D BIAS::CoordinateTransform3D::GlobalToLocal ( const HomgPoint3D & X_G ) const [inline]

Definition at line 146 of file CoordinateTransform3D.hh.

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::CoordinateTransform3D::InvertIP ( ) [inline]

Swapps the meaning of global and local.

Definition at line 217 of file CoordinateTransform3D.hh.

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool CoordinateTransform3D::Load ( const std::string & inputFile )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented from BIAS::Matrix< double >.

Reimplemented in BIAS::Pose.

Definition at line 97 of file CoordinateTransform3D.cpp.

Referenced by BIAS::Pose::Load().

void BIAS::CoordinateTransform3D::LocalToGlobal | ( | HomgPoint3D & | X_L,
 |  | HomgPoint3DCov & | Cov_L
 | ) | const [inline]

Definition at line 165 of file CoordinateTransform3D.hh.

References BIAS::Matrix< T >::Transpose().

HomgPoint3D BIAS::CoordinateTransform3D::LocalToGlobal ( const HomgPoint3D & X_L ) const [inline]

Definition at line 152 of file CoordinateTransform3D.hh.

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const Matrix3x3< double > & | R,
 |  | const Vector3< double > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< double >::Matrix4x4 ( const TNT::Matrix< double > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix< double > & arg ) [inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix4x4< double > & A ) [inline, inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8,
 |  | const double | a9,
 |  | const double | a10,
 |  | const double | a11,
 |  | const double | a12,
 |  | const double | a13,
 |  | const double | a14,
 |  | const double | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< double >::Mult | ( | const Matrix4x4< double > & | argmat,
 |  | Matrix4x4< double > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< double >::Mult | ( | const Vector4< double > & | argvec,
 |  | Vector4< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

const CoordinateTransform3D& BIAS::CoordinateTransform3D::operator= ( const CoordinateTransform3D & c ) [inline]

copy all elements

Definition at line 96 of file CoordinateTransform3D.hh.

References C_, invTransform_, BIAS::Matrix4x4< double >::operator=(), Q_, and scale_.

Referenced by BIAS::Pose::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

bool CoordinateTransform3D::Save ( const std::string & outputFile )

Definition at line 113 of file CoordinateTransform3D.cpp.

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::CoordinateTransform3D::Set | ( | const Quaternion< double > & | Q,
 |  | const Vector3< double > & | C,
 |  | const double & | scale = 1.0
 | ) | [inline]

Define local coordinate frame from within the world frame.

Parameters:
[in] | Q | Tells the orientation of the local frame in the world frame base: Q*(global base vecor)*Q_conj = local base vector.
[in] | C | Tells the position of th origin of the local frame in the world coordinate frame: global base origin + C_ = local base origin.
[in] | scale | Is the isotropic scale of base vector length to get local base vector length: ||global base vector||*scale = ||local base vector||.

Definition at line 140 of file CoordinateTransform3D.hh.

Referenced by ConcatenateLocalTransform(), and BIAS::Pose::Set().

void BIAS::CoordinateTransform3D::SetC ( const Vector3< double > & C ) [inline]

sets origin of local coordinate system in global coordinates

Definition at line 127 of file CoordinateTransform3D.hh.

Referenced by BIAS::Pose::SetC().

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void CoordinateTransform3D::SetFromMatrix3x4 ( const Matrix3x4< double > & M )

use matrix, which transforms points in global coordinate system to points in local coordinate system (like pmatrix )

Attention:
use only for matrices that cannot be decomposed properly, otherwise use Set method!

Definition at line 63 of file CoordinateTransform3D.cpp.

References C_, BIAS::SVD::Invert(), invTransform_, Q_, scale_, BIAS::Vector3< T >::Set(), BIAS::Vector4< T >::Set(), BIAS::Matrix4x4< T >::SetIdentity(), and BIAS::Matrix4x4< double >::SetIdentity().

void BIAS::Matrix4x4< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

Definition at line 261 of file Matrix4x4.hh.

Referenced by SetFromMatrix3x4(), and UpdateMatrix_().

void BIAS::CoordinateTransform3D::SetQ ( const Quaternion< double > & Q ) [inline]

Definition at line 120 of file CoordinateTransform3D.hh.

Referenced by BIAS::Pose::SetQ().

void CoordinateTransform3D::SetR ( const BIAS::RMatrixBase & R )

Sets the upper 3x3 matrix accordingly (copies values).

Definition at line 164 of file CoordinateTransform3D.cpp.

References BIASABORT, BIASERR, BIAS::RMatrixBase::GetQuaternion(), Q_, and r.

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by BIAS::HomgPoint3DCov::SetEuclidean(), and BIAS::HomgPoint2DCov::SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

void CoordinateTransform3D::Talk ( )

Prints Transformation together with more intutive rotation representations.

Definition at line 146 of file CoordinateTransform3D.cpp.

References BIAS::RMatrixBase::GetRotationAxisAngle(), Q_, R, and BIAS::RMatrixBase::SetFromQuaternion().

double BIAS::Matrix< double >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< double >.

Matrix<double > BIAS::Matrix< double >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix3x3< double >.

void BIAS::Matrix4x4< double >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

void CoordinateTransform3D::UpdateMatrix_ ( ) [protected]

computes the 4x4 matrix

Definition at line 37 of file CoordinateTransform3D.cpp.

References C_, invTransform_, Q_, R, scale_, BIAS::RMatrixBase::SetFromQuaternion(), BIAS::Matrix4x4< T >::SetIdentity(), BIAS::Matrix4x4< double >::SetIdentity(), and BIAS::Matrix3x3< T >::Transpose().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const CoordinateTransform3D & | p
 | ) | [friend]

Definition at line 251 of file CoordinateTransform3D.hh.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

std::istream& operator>> | ( | std::istream & | is,
 |  | CoordinateTransform3D & | p
 | ) | [friend]

Definition at line 257 of file CoordinateTransform3D.hh.

Member Data Documentation

Vector3<double> BIAS::CoordinateTransform3D::C_ [protected]

the translation between the systems

Definition at line 236 of file CoordinateTransform3D.hh.

Referenced by ConcatenateLocalTransform(), BIAS::Pose::GetPoseParameters(), BIAS::operator<<(), operator=(), BIAS::operator>>(), SetFromMatrix3x4(), and UpdateMatrix_().

Matrix4x4<double> BIAS::CoordinateTransform3D::invTransform_ [protected]

matrix representation of inverse transform (LocalToGlobalTranform)

Definition at line 248 of file CoordinateTransform3D.hh.

Referenced by operator=(), SetFromMatrix3x4(), and UpdateMatrix_().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

Quaternion<double> BIAS::CoordinateTransform3D::Q_ [protected]

this is the rotation between the systems

Definition at line 233 of file CoordinateTransform3D.hh.

Referenced by ConcatenateLocalTransform(), BIAS::Pose::GetPoseParameters(), BIAS::operator<<(), operator=(), BIAS::operator>>(), SetFromMatrix3x4(), SetR(), Talk(), and UpdateMatrix_().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

double BIAS::CoordinateTransform3D::scale_ [protected]

the scale between the systems ||vec1Global|| * scale_ = ||vec1Local||

Definition at line 241 of file CoordinateTransform3D.hh.

Referenced by ConcatenateLocalTransform(), BIAS::Pose::Load(), BIAS::operator<<(), operator=(), BIAS::operator>>(), SetFromMatrix3x4(), and UpdateMatrix_().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/CoordinateTransform3D.hh
  • Geometry/CoordinateTransform3D.cpp
Generated on Wed Jun 21 19:06:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorBase< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorBase

BIAS::CornerDetectorBase< StorageType > Class Template Reference
[Feature Detectors]

purly virtual interface defining class for corner detectors More...

#include <FeatureDetector/CornerDetectorBase.hh>

Inheritance diagram for BIAS::CornerDetectorBase< StorageType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorBase< StorageType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorBase (Param &para, const int grp, const std::string &postfix)
CornerDetectorBase (Param &para, const std::string &postfix="")
CornerDetectorBase ()
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
virtual | ~CornerDetectorBase ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParameter (Param &para, const int grp, const std::string &postfix)

Protected Attributes

long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
int * | _NumTilesX
int * | _NumTilesY
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::CornerDetectorBase< StorageType >

purly virtual interface defining class for corner detectors

Author:
woelk 09/2004

Definition at line 50 of file CornerDetectorBase.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType>
CornerDetectorBase::CornerDetectorBase ( )

Definition at line 40 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType>
CornerDetectorBase::CornerDetectorBase | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 49 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_, and BIAS::Param::SetGroupName().

template<class StorageType>
CornerDetectorBase::CornerDetectorBase | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 59 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_AddParameter(), and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType>
CornerDetectorBase::~CornerDetectorBase ( ) [virtual]

Definition at line 67 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

Member Function Documentation

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline]

Definition at line 80 of file CornerDetectorBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected]

Definition at line 88 of file CornerDetectorBase.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorBase.hh
  • FeatureDetector/CornerDetectorBase.cpp
Generated on Wed Jun 21 19:06:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorFoerstner< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorFoerstner

BIAS::CornerDetectorFoerstner< StorageType, CalculationType > Class Template Reference
[Feature Detectors]

foerstner corner detector, detects grey value corners in images More...

#include <FeatureDetector/CornerDetectorFoerstner.hh>

Inheritance diagram for BIAS::CornerDetectorFoerstner< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorFoerstner< StorageType, CalculationType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorFoerstner (Param &para, const int grp, const std::string &postfix)
CornerDetectorFoerstner (Param &para, const std::string &postfix="")
CornerDetectorFoerstner ()
int | Cornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
virtual int | Detect (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners given the gradient images
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners in a grey image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
double | GetMinCornerness ()
rets minimum cornernes of detectable features (simple parameter access function - does nothing else)
int | GetMinDistance () const
rets the min distance of features (simple parameter access function - does nothing else)
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
void | SetMinCornerness (double min_cornerness)
sets minimum cornernes of detectable features
void | SetMinDistance (int mindist)
sets the min distance of features (simple parameter access function - does nothing else)
void | SetStructureTensorHalfWinSize (int halfwinsize)
void | SetSubpixelAccuracy (bool subpixel_accuracy)
~CornerDetectorFoerstner ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
registers and handles parameters
void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _Cornerness , _sgxx, _sgxy and _sgyy
int | _CalcCornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
int | _CalcCornerness (const Image< StorageType > &src, Image< CalculationType > &cornerness)
calculates the cornerness using the src image
virtual int | _ComputeCornerness (Image< CalculationType > &im)
Computes the Foerstner cornerness criterion det/trace, points are accepted only if corner-ellipse is also round enough.
void _DeleteInternalMem ()
frees _Cornerness, _sgxx, _sgxy and _sgyy
int | _EnforceMinimumDistance (std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
selects features sorted by quality from _FeatList such that they have a min distance as given in the param object
void | _FillFeatureMap (std::vector< HomgPoint2D > &p)
fills feature map with every point from p which isnt at infinity
bool | _RefineCornerPosition (int col, int row, double &x, double &y, QUAL &SubPixelCornerness)
fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y
void | _RefineCorners (std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality)
refines corner position and quality for all corners in list, internal Cornerness_ image must be valid
void _ZeroFeatureMap ()
zeros the feature map
void | GetCov_ (const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const
returns the inverse structure tensor, multiplied by noise^2

Protected Attributes

Image< CalculationType > | _Cornerness
resulting image which tells for each pixel how cornerlike it is
bool * | _DoRefinement
tells whether subpixel refinement should be done
std::vector< class Feat > | _FeatList
temporary list of detected corners
bool ** | _FeatureMap
array used to enforce a min distance / neighbor suppression
Gauss< StorageType, StorageType > | _gauss
Gauss for pre-smoothing.
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
double * | _MinCornerness
threshold to accept a feature
int * | _MinDistance
minimal distance between points
int | _NumberFeaturesSoFar
initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class
int * | _NumTilesX
int * | _NumTilesY
Image< CalculationType > | _sgxx
internal structure tensor images
Image< CalculationType > | _sgxy
Image< CalculationType > | _sgyy
StructureTensor< CalculationType,
CalculationType > 		_st
structure tensor computation object
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::CornerDetectorFoerstner< StorageType, CalculationType >

foerstner corner detector, detects grey value corners in images

Author:
koeser 09/2004

Definition at line 37 of file CornerDetectorFoerstner.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
CornerDetectorFoerstner::CornerDetectorFoerstner ( )

Definition at line 47 of file CornerDetectorFoerstner.cpp.

template<class StorageType, class CalculationType>
CornerDetectorFoerstner::CornerDetectorFoerstner | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 38 of file CornerDetectorFoerstner.cpp.

template<class StorageType, class CalculationType>
CornerDetectorFoerstner::CornerDetectorFoerstner | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 56 of file CornerDetectorFoerstner.cpp.

template<class StorageType, class CalculationType>
CornerDetectorFoerstner::~CornerDetectorFoerstner ( )

Definition at line 67 of file CornerDetectorFoerstner.cpp.

Member Function Documentation

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

registers and handles parameters

Reimplemented in BIAS::CornerDetectorHarris< StorageType, CalculationType >.

Definition at line 652 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected, inherited]

allocates _Cornerness , _sgxx, _sgxy and _sgyy

Definition at line 632 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, and BIAS::Image< StorageType >::Init().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 723 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< StorageType > & | src,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the src image

Author:
woelk 09/2004

Definition at line 683 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorFoerstner::_ComputeCornerness ( Image< CalculationType > & im ) [protected, virtual]

Computes the Foerstner cornerness criterion det/trace, points are accepted only if corner-ellipse is also round enough.

c = det / trace Also fills up _FeatList.

Author:
koeser 09/2004
Todo:
optimize for ROI usage

Reimplemented from BIAS::CornerDetectorGradient< StorageType, CalculationType >.

Definition at line 73 of file CornerDetectorFoerstner.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy, CalculationType, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ROI::SetCorners(), BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_DeleteInternalMem ( ) [protected, inherited]

frees _Cornerness, _sgxx, _sgxy and _sgyy

Definition at line 620 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance | ( | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [protected, inherited]

selects features sorted by quality from _FeatList such that they have a min distance as given in the param object

assumes feature map is zeroed

Author:
woelk 09/2004

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FillFeatureMap ( std::vector< HomgPoint2D > & p ) [protected, inherited]

fills feature map with every point from p which isnt at infinity

template<class StorageType, class CalculationType>
bool CornerDetectorGradient::_RefineCornerPosition | ( | int | col,
 |  | int | row,
 |  | double & | x,
 |  | double & | y,
 |  | QUAL & | SubPixelCornerness
 | ) | [protected, inherited]

fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y

Parameters:
col | column in image where refinement should take place
row | row in image where refinement should take place
x | output, refined coordinate
y | output, refined coordinate
SubPixelCornerness | cornerness value at subpixel maximum
Author:
koeser 01/2004

Definition at line 474 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, a, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners | ( | std::vector< HomgPoint2D > & | pos,
 |  | std::vector< QUAL > & | quality
 | ) | [inline, protected, inherited]

refines corner position and quality for all corners in list, internal Cornerness_ image must be valid

Parameters:
pos | input/output of old/new position
quality | holds new cornernesses afterwards
Author:
koeser 09/2004

Definition at line 252 of file CornerDetectorGradient.hh.

References BIASASSERT.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap ( ) [inline, protected, inherited]

zeros the feature map

Definition at line 272 of file CornerDetectorGradient.hh.

References cov.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Cornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 261 of file CornerDetectorGradient.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners given the gradient images

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
gradx | image containing gradient x component
grady | image containing gradient y component
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image. In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 172 of file CornerDetectorGradient.cpp.

References D_CD_WRITE_DEBUG_IM, BIAS::TimeMeasure::Start(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners in a grey image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
image | grey value input image
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 103 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

Referenced by main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | const std::vector< Vector2< int > > & | region,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

Author:
Dennis Herzog, June 2005

Definition at line 327 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIASASSERT, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
cornerness | image with already computed cornerness
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 288 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetCov_ | ( | const std::vector< HomgPoint2D > & | p,
 |  | std::vector< Matrix2x2< double > > & | cov,
 |  | const double | noise = 5
 | ) | const [protected, inherited]

returns the inverse structure tensor, multiplied by noise^2

Author:
woelk 03/2006

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinCornerness ( ) [inline, inherited]

rets minimum cornernes of detectable features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-07-04

Definition at line 189 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinDistance ( ) const [inline, inherited]

rets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 177 of file CornerDetectorGradient.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinCornerness ( double min_cornerness ) [inline, inherited]

sets minimum cornernes of detectable features

Author:
woelk 02/2006

Definition at line 194 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinDistance ( int mindist ) [inline, inherited]

sets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 183 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetStructureTensorHalfWinSize ( int halfwinsize ) [inline, inherited]

Definition at line 201 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetSubpixelAccuracy ( bool subpixel_accuracy ) [inline, inherited]

Author:
woelk 02/2006

Definition at line 198 of file CornerDetectorGradient.hh.

Member Data Documentation

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness [protected, inherited]

resulting image which tells for each pixel how cornerlike it is

Definition at line 293 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition().

template<class StorageType, class CalculationType>
bool* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement [protected, inherited]

tells whether subpixel refinement should be done

Definition at line 311 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
std::vector<class Feat> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList [protected, inherited]

temporary list of detected corners

Definition at line 299 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
bool** BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap [protected, inherited]

array used to enforce a min distance / neighbor suppression

Definition at line 296 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType, class CalculationType>
Gauss<StorageType, StorageType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss [protected, inherited]

Gauss for pre-smoothing.

Definition at line 302 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness [protected, inherited]

threshold to accept a feature

Definition at line 310 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance [protected, inherited]

minimal distance between points

Definition at line 309 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_NumberFeaturesSoFar [protected, inherited]

initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class

Definition at line 306 of file CornerDetectorGradient.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx [protected, inherited]

internal structure tensor images

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
StructureTensor<CalculationType, CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_st [protected, inherited]

structure tensor computation object

Definition at line 287 of file CornerDetectorGradient.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorFoerstner.hh
  • FeatureDetector/CornerDetectorFoerstner.cpp
Generated on Wed Jun 21 19:06:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorGradient< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorGradient

BIAS::CornerDetectorGradient< StorageType, CalculationType > Class Template Reference
[Feature Detectors]

base class for all gradient based corner detectors More...

#include <FeatureDetector/CornerDetectorGradient.hh>

Inheritance diagram for BIAS::CornerDetectorGradient< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorGradient< StorageType, CalculationType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorGradient (Param &para, const int grp, const std::string &postfix)
CornerDetectorGradient (Param &para, const std::string &postfix="")
CornerDetectorGradient ()
int | Cornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
virtual int | Detect (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners given the gradient images
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners in a grey image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
double | GetMinCornerness ()
rets minimum cornernes of detectable features (simple parameter access function - does nothing else)
int | GetMinDistance () const
rets the min distance of features (simple parameter access function - does nothing else)
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
void | SetMinCornerness (double min_cornerness)
sets minimum cornernes of detectable features
void | SetMinDistance (int mindist)
sets the min distance of features (simple parameter access function - does nothing else)
void | SetStructureTensorHalfWinSize (int halfwinsize)
void | SetSubpixelAccuracy (bool subpixel_accuracy)
virtual | ~CornerDetectorGradient ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
registers and handles parameters
void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _Cornerness , _sgxx, _sgxy and _sgyy
int | _CalcCornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
int | _CalcCornerness (const Image< StorageType > &src, Image< CalculationType > &cornerness)
calculates the cornerness using the src image
virtual int | _ComputeCornerness (Image< CalculationType > &Cornerness)
the main function which should be overwritten in derived classes, no implmentation in this class
void _DeleteInternalMem ()
frees _Cornerness, _sgxx, _sgxy and _sgyy
int | _EnforceMinimumDistance (std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
selects features sorted by quality from _FeatList such that they have a min distance as given in the param object
void | _FillFeatureMap (std::vector< HomgPoint2D > &p)
fills feature map with every point from p which isnt at infinity
bool | _RefineCornerPosition (int col, int row, double &x, double &y, QUAL &SubPixelCornerness)
fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y
void | _RefineCorners (std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality)
refines corner position and quality for all corners in list, internal Cornerness_ image must be valid
void _ZeroFeatureMap ()
zeros the feature map
void | GetCov_ (const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const
returns the inverse structure tensor, multiplied by noise^2

Protected Attributes

Image< CalculationType > | _Cornerness
resulting image which tells for each pixel how cornerlike it is
bool * | _DoRefinement
tells whether subpixel refinement should be done
std::vector< class Feat > | _FeatList
temporary list of detected corners
bool ** | _FeatureMap
array used to enforce a min distance / neighbor suppression
Gauss< StorageType, StorageType > | _gauss
Gauss for pre-smoothing.
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
double * | _MinCornerness
threshold to accept a feature
int * | _MinDistance
minimal distance between points
int | _NumberFeaturesSoFar
initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class
int * | _NumTilesX
int * | _NumTilesY
Image< CalculationType > | _sgxx
internal structure tensor images
Image< CalculationType > | _sgxy
Image< CalculationType > | _sgyy
StructureTensor< CalculationType,
CalculationType > 		_st
structure tensor computation object
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::CornerDetectorGradient< StorageType, CalculationType >

base class for all gradient based corner detectors

provides functionality to compute the structure tensor | gxx gxy | | gyx gyy |

The function detect low pass filters the image, computes gradients and the structure tensor and then calls _ComputeCornerness on the structure tensor image. This function must be implemented in derived classes, it basically converts the 2x2 structure tensor to a scalar value which describes how much cornerlike the region around that pixel is, which is saved in the cornerness image. Values above a threshold are pushed into an internal list. Afterwards the EnforceMinimumDistance function is called to sort features by quality and add them to the final list. New points are accepted only if the have a minimum distance to all previously extracted points. In the detect function you may pass a non-empty vector of points, which are regarded as "existing corners" and none of the new points may lie withing the critical distance around the old ones. This gives the possibility to detect new features for a tracker, which has tracked some points (where no new features are desired) and lost some features.

Author:
woelk/koeser 09/2004

Definition at line 84 of file CornerDetectorGradient.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
CornerDetectorGradient::CornerDetectorGradient ( )

Definition at line 53 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness, and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance.

template<class StorageType, class CalculationType>
CornerDetectorGradient::CornerDetectorGradient | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 69 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class StorageType, class CalculationType>
CornerDetectorGradient::CornerDetectorGradient | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 82 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap.

template<class StorageType, class CalculationType>
CornerDetectorGradient::~CornerDetectorGradient ( ) [virtual]

Definition at line 92 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

Member Function Documentation

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

registers and handles parameters

Reimplemented in BIAS::CornerDetectorHarris< StorageType, CalculationType >.

Definition at line 652 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected]

allocates _Cornerness , _sgxx, _sgxy and _sgyy

Definition at line 632 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, and BIAS::Image< StorageType >::Init().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 723 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< StorageType > & | src,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected]

calculates the cornerness using the src image

Author:
woelk 09/2004

Definition at line 683 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_ComputeCornerness ( Image< CalculationType > & Cornerness ) [protected, virtual]

the main function which should be overwritten in derived classes, no implmentation in this class

computes the cornerness from the structure tensor image Uses structure tensor sgxx, _sgxy, _sgyy as input

Reimplemented in BIAS::CornerDetectorFoerstner< StorageType, CalculationType >, BIAS::CornerDetectorHarris< StorageType, CalculationType >, BIAS::CornerDetectorKLT< StorageType, CalculationType >, and BIAS::LinearRegionDetector< StorageType, CalculationType >.

Definition at line 582 of file CornerDetectorGradient.cpp.

References BIASABORT, and BIASERR.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_DeleteInternalMem ( ) [protected]

frees _Cornerness, _sgxx, _sgxy and _sgyy

Definition at line 620 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance | ( | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [protected]

selects features sorted by quality from _FeatList such that they have a min distance as given in the param object

assumes feature map is zeroed

Author:
woelk 09/2004

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FillFeatureMap ( std::vector< HomgPoint2D > & p ) [protected]

fills feature map with every point from p which isnt at infinity

template<class StorageType, class CalculationType>
bool CornerDetectorGradient::_RefineCornerPosition | ( | int | col,
 |  | int | row,
 |  | double & | x,
 |  | double & | y,
 |  | QUAL & | SubPixelCornerness
 | ) | [protected]

fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y

Parameters:
col | column in image where refinement should take place
row | row in image where refinement should take place
x | output, refined coordinate
y | output, refined coordinate
SubPixelCornerness | cornerness value at subpixel maximum
Author:
koeser 01/2004

Definition at line 474 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, a, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners | ( | std::vector< HomgPoint2D > & | pos,
 |  | std::vector< QUAL > & | quality
 | ) | [inline, protected]

refines corner position and quality for all corners in list, internal Cornerness_ image must be valid

Parameters:
pos | input/output of old/new position
quality | holds new cornernesses afterwards
Author:
koeser 09/2004

Definition at line 252 of file CornerDetectorGradient.hh.

References BIASASSERT.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap ( ) [inline, protected]

zeros the feature map

Definition at line 272 of file CornerDetectorGradient.hh.

References cov.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Cornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) |

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 261 of file CornerDetectorGradient.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual]

detect corners given the gradient images

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
gradx | image containing gradient x component
grady | image containing gradient y component
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image. In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 172 of file CornerDetectorGradient.cpp.

References D_CD_WRITE_DEBUG_IM, BIAS::TimeMeasure::Start(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual]

detect corners in a grey image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
image | grey value input image
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 103 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

Referenced by main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | const std::vector< Vector2< int > > & | region,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual]

detect corners avoiding double calculation of cornerness image

Author:
Dennis Herzog, June 2005

Definition at line 327 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIASASSERT, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual]

detect corners avoiding double calculation of cornerness image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
cornerness | image with already computed cornerness
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 288 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetCov_ | ( | const std::vector< HomgPoint2D > & | p,
 |  | std::vector< Matrix2x2< double > > & | cov,
 |  | const double | noise = 5
 | ) | const [protected]

returns the inverse structure tensor, multiplied by noise^2

Author:
woelk 03/2006

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinCornerness ( ) [inline]

rets minimum cornernes of detectable features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-07-04

Definition at line 189 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinDistance ( ) const [inline]

rets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 177 of file CornerDetectorGradient.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinCornerness ( double min_cornerness ) [inline]

sets minimum cornernes of detectable features

Author:
woelk 02/2006

Definition at line 194 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinDistance ( int mindist ) [inline]

sets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 183 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetStructureTensorHalfWinSize ( int halfwinsize ) [inline]

Definition at line 201 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetSubpixelAccuracy ( bool subpixel_accuracy ) [inline]

Author:
woelk 02/2006

Definition at line 198 of file CornerDetectorGradient.hh.

Member Data Documentation

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness [protected]

resulting image which tells for each pixel how cornerlike it is

Definition at line 293 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition().

template<class StorageType, class CalculationType>
bool* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement [protected]

tells whether subpixel refinement should be done

Definition at line 311 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
std::vector<class Feat> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList [protected]

temporary list of detected corners

Definition at line 299 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
bool** BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap [protected]

array used to enforce a min distance / neighbor suppression

Definition at line 296 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType, class CalculationType>
Gauss<StorageType, StorageType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss [protected]

Gauss for pre-smoothing.

Definition at line 302 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness [protected]

threshold to accept a feature

Definition at line 310 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance [protected]

minimal distance between points

Definition at line 309 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_NumberFeaturesSoFar [protected]

initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class

Definition at line 306 of file CornerDetectorGradient.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx [protected]

internal structure tensor images

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy [protected]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy [protected]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
StructureTensor<CalculationType, CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_st [protected]

structure tensor computation object

Definition at line 287 of file CornerDetectorGradient.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorGradient.hh
  • FeatureDetector/CornerDetectorGradient.cpp
Generated on Wed Jun 21 19:06:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorHarris< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorHarris

BIAS::CornerDetectorHarris< StorageType, CalculationType > Class Template Reference
[Feature Detectors]

harris corner detector, detects grey value corners in images More...

#include <FeatureDetector/CornerDetectorHarris.hh>

Inheritance diagram for BIAS::CornerDetectorHarris< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorHarris< StorageType, CalculationType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorHarris (Param &para, const int grp, const std::string &postfix)
CornerDetectorHarris (Param &para, const std::string &postfix="")
CornerDetectorHarris ()
int | Cornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
virtual int | Detect (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners given the gradient images
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners in a grey image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
double | GetMinCornerness ()
rets minimum cornernes of detectable features (simple parameter access function - does nothing else)
int | GetMinDistance () const
rets the min distance of features (simple parameter access function - does nothing else)
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
void | SetMinCornerness (double min_cornerness)
sets minimum cornernes of detectable features
void | SetMinDistance (int mindist)
sets the min distance of features (simple parameter access function - does nothing else)
void | SetStructureTensorHalfWinSize (int halfwinsize)
void | SetSubpixelAccuracy (bool subpixel_accuracy)
~CornerDetectorHarris ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
registers and handles parameters
void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _Cornerness , _sgxx, _sgxy and _sgyy
int | _CalcCornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
int | _CalcCornerness (const Image< StorageType > &src, Image< CalculationType > &cornerness)
calculates the cornerness using the src image
virtual int | _ComputeCornerness (Image< CalculationType > &Cornerness)
Computes the Harris approximation of the smaller eigenvalue of the structure tensor over the image and stores it in _Cornerness.
void _DeleteInternalMem ()
frees _Cornerness, _sgxx, _sgxy and _sgyy
int | _EnforceMinimumDistance (std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
selects features sorted by quality from _FeatList such that they have a min distance as given in the param object
void | _FillFeatureMap (std::vector< HomgPoint2D > &p)
fills feature map with every point from p which isnt at infinity
bool | _RefineCornerPosition (int col, int row, double &x, double &y, QUAL &SubPixelCornerness)
fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y
void | _RefineCorners (std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality)
refines corner position and quality for all corners in list, internal Cornerness_ image must be valid
void _ZeroFeatureMap ()
zeros the feature map
void | GetCov_ (const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const
returns the inverse structure tensor, multiplied by noise^2

Protected Attributes

Image< CalculationType > | _Cornerness
resulting image which tells for each pixel how cornerlike it is
bool * | _DoRefinement
tells whether subpixel refinement should be done
std::vector< class Feat > | _FeatList
temporary list of detected corners
bool ** | _FeatureMap
array used to enforce a min distance / neighbor suppression
Gauss< StorageType, StorageType > | _gauss
Gauss for pre-smoothing.
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
double * | _MinCornerness
threshold to accept a feature
int * | _MinDistance
minimal distance between points
int | _NumberFeaturesSoFar
initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class
int * | _NumTilesX
int * | _NumTilesY
double * | _Scale
weight of trace in harris approximation
Image< CalculationType > | _sgxx
internal structure tensor images
Image< CalculationType > | _sgxy
Image< CalculationType > | _sgyy
StructureTensor< CalculationType,
CalculationType > 		_st
structure tensor computation object
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::CornerDetectorHarris< StorageType, CalculationType >

harris corner detector, detects grey value corners in images

Bug:
CalculationType int does not work, use float
Author:
koeser 09/2004

Definition at line 38 of file CornerDetectorHarris.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
CornerDetectorHarris::CornerDetectorHarris ( )

Definition at line 39 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorHarris< StorageType, CalculationType >::_Scale, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType, class CalculationType>
CornerDetectorHarris::CornerDetectorHarris | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 49 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_, and BIAS::Param::SetGroupName().

template<class StorageType, class CalculationType>
CornerDetectorHarris::CornerDetectorHarris | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 60 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType, class CalculationType>
CornerDetectorHarris::~CornerDetectorHarris ( )

Definition at line 70 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorHarris< StorageType, CalculationType >::_Scale.

Member Function Documentation

template<class StorageType, class CalculationType>
void CornerDetectorHarris::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

registers and handles parameters

Reimplemented from BIAS::CornerDetectorGradient< StorageType, CalculationType >.

Definition at line 141 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorHarris< StorageType, CalculationType >::_Scale, BIAS::Param::CheckParam(), and BIAS::Param::GetParamDouble().

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris().

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected, inherited]

allocates _Cornerness , _sgxx, _sgxy and _sgyy

Definition at line 632 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, and BIAS::Image< StorageType >::Init().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 723 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< StorageType > & | src,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the src image

Author:
woelk 09/2004

Definition at line 683 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorHarris::_ComputeCornerness ( Image< CalculationType > & Cornerness ) [protected, virtual]

Computes the Harris approximation of the smaller eigenvalue of the structure tensor over the image and stores it in _Cornerness.

c = det - scale * trace Also fills up _FeatList.

Author:
koeser 09/2004
Todo:
optimize for ROI usage

Reimplemented from BIAS::CornerDetectorGradient< StorageType, CalculationType >.

Definition at line 78 of file CornerDetectorHarris.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness, BIAS::CornerDetectorHarris< StorageType, CalculationType >::_Scale, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy, CalculationType, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ROI::SetCorners(), BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_DeleteInternalMem ( ) [protected, inherited]

frees _Cornerness, _sgxx, _sgxy and _sgyy

Definition at line 620 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance | ( | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [protected, inherited]

selects features sorted by quality from _FeatList such that they have a min distance as given in the param object

assumes feature map is zeroed

Author:
woelk 09/2004

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FillFeatureMap ( std::vector< HomgPoint2D > & p ) [protected, inherited]

fills feature map with every point from p which isnt at infinity

template<class StorageType, class CalculationType>
bool CornerDetectorGradient::_RefineCornerPosition | ( | int | col,
 |  | int | row,
 |  | double & | x,
 |  | double & | y,
 |  | QUAL & | SubPixelCornerness
 | ) | [protected, inherited]

fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y

Parameters:
col | column in image where refinement should take place
row | row in image where refinement should take place
x | output, refined coordinate
y | output, refined coordinate
SubPixelCornerness | cornerness value at subpixel maximum
Author:
koeser 01/2004

Definition at line 474 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, a, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners | ( | std::vector< HomgPoint2D > & | pos,
 |  | std::vector< QUAL > & | quality
 | ) | [inline, protected, inherited]

refines corner position and quality for all corners in list, internal Cornerness_ image must be valid

Parameters:
pos | input/output of old/new position
quality | holds new cornernesses afterwards
Author:
koeser 09/2004

Definition at line 252 of file CornerDetectorGradient.hh.

References BIASASSERT.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap ( ) [inline, protected, inherited]

zeros the feature map

Definition at line 272 of file CornerDetectorGradient.hh.

References cov.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Cornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 261 of file CornerDetectorGradient.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners given the gradient images

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
gradx | image containing gradient x component
grady | image containing gradient y component
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image. In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 172 of file CornerDetectorGradient.cpp.

References D_CD_WRITE_DEBUG_IM, BIAS::TimeMeasure::Start(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners in a grey image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
image | grey value input image
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 103 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

Referenced by main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | const std::vector< Vector2< int > > & | region,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

Author:
Dennis Herzog, June 2005

Definition at line 327 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIASASSERT, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
cornerness | image with already computed cornerness
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 288 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetCov_ | ( | const std::vector< HomgPoint2D > & | p,
 |  | std::vector< Matrix2x2< double > > & | cov,
 |  | const double | noise = 5
 | ) | const [protected, inherited]

returns the inverse structure tensor, multiplied by noise^2

Author:
woelk 03/2006

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinCornerness ( ) [inline, inherited]

rets minimum cornernes of detectable features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-07-04

Definition at line 189 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinDistance ( ) const [inline, inherited]

rets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 177 of file CornerDetectorGradient.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinCornerness ( double min_cornerness ) [inline, inherited]

sets minimum cornernes of detectable features

Author:
woelk 02/2006

Definition at line 194 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinDistance ( int mindist ) [inline, inherited]

sets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 183 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetStructureTensorHalfWinSize ( int halfwinsize ) [inline, inherited]

Definition at line 201 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetSubpixelAccuracy ( bool subpixel_accuracy ) [inline, inherited]

Author:
woelk 02/2006

Definition at line 198 of file CornerDetectorGradient.hh.

Member Data Documentation

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness [protected, inherited]

resulting image which tells for each pixel how cornerlike it is

Definition at line 293 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition().

template<class StorageType, class CalculationType>
bool* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement [protected, inherited]

tells whether subpixel refinement should be done

Definition at line 311 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
std::vector<class Feat> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList [protected, inherited]

temporary list of detected corners

Definition at line 299 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
bool** BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap [protected, inherited]

array used to enforce a min distance / neighbor suppression

Definition at line 296 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType, class CalculationType>
Gauss<StorageType, StorageType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss [protected, inherited]

Gauss for pre-smoothing.

Definition at line 302 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness [protected, inherited]

threshold to accept a feature

Definition at line 310 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance [protected, inherited]

minimal distance between points

Definition at line 309 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_NumberFeaturesSoFar [protected, inherited]

initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class

Definition at line 306 of file CornerDetectorGradient.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorHarris< StorageType, CalculationType >::_Scale [protected]

weight of trace in harris approximation

Definition at line 54 of file CornerDetectorHarris.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), and BIAS::CornerDetectorHarris< StorageType, CalculationType >::~CornerDetectorHarris().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx [protected, inherited]

internal structure tensor images

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
StructureTensor<CalculationType, CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_st [protected, inherited]

structure tensor computation object

Definition at line 287 of file CornerDetectorGradient.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorHarris.hh
  • FeatureDetector/CornerDetectorHarris.cpp
Generated on Wed Jun 21 19:06:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorKLT< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorKLT

BIAS::CornerDetectorKLT< StorageType, CalculationType > Class Template Reference
[Feature Detectors]

computes the cornerness as the smaller eigenvalue of the structure tensor matrix More...

#include <FeatureDetector/CornerDetectorKLT.hh>

Inheritance diagram for BIAS::CornerDetectorKLT< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorKLT< StorageType, CalculationType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorKLT (Param &para, const int grp, const std::string &postfix)
CornerDetectorKLT (Param &para, const std::string &postfix="")
CornerDetectorKLT ()
int | Cornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
virtual int | Detect (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners given the gradient images
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners in a grey image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
double | GetMinCornerness ()
rets minimum cornernes of detectable features (simple parameter access function - does nothing else)
int | GetMinDistance () const
rets the min distance of features (simple parameter access function - does nothing else)
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
void | SetMinCornerness (double min_cornerness)
sets minimum cornernes of detectable features
void | SetMinDistance (int mindist)
sets the min distance of features (simple parameter access function - does nothing else)
void | SetStructureTensorHalfWinSize (int halfwinsize)
void | SetSubpixelAccuracy (bool subpixel_accuracy)
virtual | ~CornerDetectorKLT ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
registers and handles parameters
void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _Cornerness , _sgxx, _sgxy and _sgyy
int | _CalcCornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
int | _CalcCornerness (const Image< StorageType > &src, Image< CalculationType > &cornerness)
calculates the cornerness using the src image
virtual int | _ComputeCornerness (Image< CalculationType > &mineig)
Computes the smaller eigenvalue of the structure tensor _sgxx, _sgyy, _sgxy over the image and stores it in _Cornerness.
void _DeleteInternalMem ()
frees _Cornerness, _sgxx, _sgxy and _sgyy
int | _EnforceMinimumDistance (std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
selects features sorted by quality from _FeatList such that they have a min distance as given in the param object
void | _FillFeatureMap (std::vector< HomgPoint2D > &p)
fills feature map with every point from p which isnt at infinity
bool | _RefineCornerPosition (int col, int row, double &x, double &y, QUAL &SubPixelCornerness)
fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y
void | _RefineCorners (std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality)
refines corner position and quality for all corners in list, internal Cornerness_ image must be valid
void _ZeroFeatureMap ()
zeros the feature map
void | GetCov_ (const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const
returns the inverse structure tensor, multiplied by noise^2

Protected Attributes

Image< CalculationType > | _Cornerness
resulting image which tells for each pixel how cornerlike it is
bool * | _DoRefinement
tells whether subpixel refinement should be done
std::vector< class Feat > | _FeatList
temporary list of detected corners
bool ** | _FeatureMap
array used to enforce a min distance / neighbor suppression
Gauss< StorageType, StorageType > | _gauss
Gauss for pre-smoothing.
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
double * | _MinCornerness
threshold to accept a feature
int * | _MinDistance
minimal distance between points
int | _NumberFeaturesSoFar
initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class
int * | _NumTilesX
int * | _NumTilesY
Image< CalculationType > | _sgxx
internal structure tensor images
Image< CalculationType > | _sgxy
Image< CalculationType > | _sgyy
StructureTensor< CalculationType,
CalculationType > 		_st
structure tensor computation object
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::CornerDetectorKLT< StorageType, CalculationType >

computes the cornerness as the smaller eigenvalue of the structure tensor matrix

Author:
woelk 09/2004

Definition at line 43 of file CornerDetectorKLT.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
CornerDetectorKLT::CornerDetectorKLT ( )

Definition at line 48 of file CornerDetectorKLT.cpp.

template<class StorageType, class CalculationType>
CornerDetectorKLT::CornerDetectorKLT | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 56 of file CornerDetectorKLT.cpp.

template<class StorageType, class CalculationType>
CornerDetectorKLT::CornerDetectorKLT | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 67 of file CornerDetectorKLT.cpp.

template<class StorageType, class CalculationType>
CornerDetectorKLT::~CornerDetectorKLT ( ) [virtual]

Definition at line 75 of file CornerDetectorKLT.cpp.

Member Function Documentation

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

registers and handles parameters

Reimplemented in BIAS::CornerDetectorHarris< StorageType, CalculationType >.

Definition at line 652 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected, inherited]

allocates _Cornerness , _sgxx, _sgxy and _sgyy

Definition at line 632 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, and BIAS::Image< StorageType >::Init().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 723 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< StorageType > & | src,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the src image

Author:
woelk 09/2004

Definition at line 683 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorKLT::_ComputeCornerness ( Image< CalculationType > & mineig ) [protected, virtual]

Computes the smaller eigenvalue of the structure tensor _sgxx, _sgyy, _sgxy over the image and stores it in _Cornerness.

Also fills up _FeatList.

Author:
woelk 09/2004

Reimplemented from BIAS::CornerDetectorGradient< StorageType, CalculationType >.

Definition at line 87 of file CornerDetectorKLT.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy, BIASASSERT, CalculationType, D_CD_WRITE_DEBUG_IM, BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ROI::SetCorners(), BIAS::Feat::val, BIAS::ImageIO::Write(), BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_DeleteInternalMem ( ) [protected, inherited]

frees _Cornerness, _sgxx, _sgxy and _sgyy

Definition at line 620 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance | ( | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [protected, inherited]

selects features sorted by quality from _FeatList such that they have a min distance as given in the param object

assumes feature map is zeroed

Author:
woelk 09/2004

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FillFeatureMap ( std::vector< HomgPoint2D > & p ) [protected, inherited]

fills feature map with every point from p which isnt at infinity

template<class StorageType, class CalculationType>
bool CornerDetectorGradient::_RefineCornerPosition | ( | int | col,
 |  | int | row,
 |  | double & | x,
 |  | double & | y,
 |  | QUAL & | SubPixelCornerness
 | ) | [protected, inherited]

fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y

Parameters:
col | column in image where refinement should take place
row | row in image where refinement should take place
x | output, refined coordinate
y | output, refined coordinate
SubPixelCornerness | cornerness value at subpixel maximum
Author:
koeser 01/2004

Definition at line 474 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, a, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners | ( | std::vector< HomgPoint2D > & | pos,
 |  | std::vector< QUAL > & | quality
 | ) | [inline, protected, inherited]

refines corner position and quality for all corners in list, internal Cornerness_ image must be valid

Parameters:
pos | input/output of old/new position
quality | holds new cornernesses afterwards
Author:
koeser 09/2004

Definition at line 252 of file CornerDetectorGradient.hh.

References BIASASSERT.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap ( ) [inline, protected, inherited]

zeros the feature map

Definition at line 272 of file CornerDetectorGradient.hh.

References cov.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Cornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 261 of file CornerDetectorGradient.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners given the gradient images

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
gradx | image containing gradient x component
grady | image containing gradient y component
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image. In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 172 of file CornerDetectorGradient.cpp.

References D_CD_WRITE_DEBUG_IM, BIAS::TimeMeasure::Start(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners in a grey image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
image | grey value input image
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 103 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

Referenced by main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | const std::vector< Vector2< int > > & | region,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

Author:
Dennis Herzog, June 2005

Definition at line 327 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIASASSERT, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
cornerness | image with already computed cornerness
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 288 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetCov_ | ( | const std::vector< HomgPoint2D > & | p,
 |  | std::vector< Matrix2x2< double > > & | cov,
 |  | const double | noise = 5
 | ) | const [protected, inherited]

returns the inverse structure tensor, multiplied by noise^2

Author:
woelk 03/2006

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinCornerness ( ) [inline, inherited]

rets minimum cornernes of detectable features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-07-04

Definition at line 189 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinDistance ( ) const [inline, inherited]

rets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 177 of file CornerDetectorGradient.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinCornerness ( double min_cornerness ) [inline, inherited]

sets minimum cornernes of detectable features

Author:
woelk 02/2006

Definition at line 194 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinDistance ( int mindist ) [inline, inherited]

sets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 183 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetStructureTensorHalfWinSize ( int halfwinsize ) [inline, inherited]

Definition at line 201 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetSubpixelAccuracy ( bool subpixel_accuracy ) [inline, inherited]

Author:
woelk 02/2006

Definition at line 198 of file CornerDetectorGradient.hh.

Member Data Documentation

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness [protected, inherited]

resulting image which tells for each pixel how cornerlike it is

Definition at line 293 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition().

template<class StorageType, class CalculationType>
bool* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement [protected, inherited]

tells whether subpixel refinement should be done

Definition at line 311 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
std::vector<class Feat> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList [protected, inherited]

temporary list of detected corners

Definition at line 299 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
bool** BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap [protected, inherited]

array used to enforce a min distance / neighbor suppression

Definition at line 296 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType, class CalculationType>
Gauss<StorageType, StorageType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss [protected, inherited]

Gauss for pre-smoothing.

Definition at line 302 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness [protected, inherited]

threshold to accept a feature

Definition at line 310 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance [protected, inherited]

minimal distance between points

Definition at line 309 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_NumberFeaturesSoFar [protected, inherited]

initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class

Definition at line 306 of file CornerDetectorGradient.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx [protected, inherited]

internal structure tensor images

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
StructureTensor<CalculationType, CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_st [protected, inherited]

structure tensor computation object

Definition at line 287 of file CornerDetectorGradient.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorKLT.hh
  • FeatureDetector/CornerDetectorKLT.cpp
Generated on Wed Jun 21 19:06:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerDetectorSusan< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerDetectorSusan

BIAS::CornerDetectorSusan< StorageType > Class Template Reference
[Feature Detectors]

The Susan corner detector (oxford implementation, see license). More...

#include <FeatureDetector/CornerDetectorSusan.hh>

Inheritance diagram for BIAS::CornerDetectorSusan< StorageType >:

[legend]
Collaboration diagram for BIAS::CornerDetectorSusan< StorageType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
CornerDetectorSusan (Param &para, const int grp, const std::string &postfix)
CornerDetectorSusan (Param &para, const std::string &postfix="")
CornerDetectorSusan ()
bool | DebugLevelIsSet (long int lv) const
int | Detect (const Image< StorageType > &image, const Image< StorageType > &roi, CORNER_LIST corner_list, int &num)
Susan Corner Detector returning corner list, only detects corners where roi!=0.
int | Detect (const Image< StorageType > &image, CORNER_LIST corner_list, int &num)
Susan Corner Detector returning corner list, fast interface for daimler.
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &pvec, std::vector< QUAL > &quality)
Susan Corner Detector returning homogenous points,.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
~CornerDetectorSusan ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _int_to_uchar (int *r, StorageType *in, int size)
protected function for susan
void | _setup_brightness_lut (int thresh, int form)
protected function for susan
int | _susan_corners (StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size, StorageType *roi)
faster version of the above
int | _susan_corners (StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size)
returns the number of corners found
int | _susan_corners_quick (StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size)
returns the number of corners found
void | _SusanReAllocMem (int x_size, int y_size)
allocates the internal data structures for susan corner detector

Protected Attributes

StorageType * | _bp
int * | _cgx
local vars for susan
int * | _cgy
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
int | _num
int * | _NumTilesX
int * | _NumTilesY
bool * | _Quick
int * | _r
int | _susansize
int | _susanthresh
int * | _Threshold
parameter
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::CornerDetectorSusan< StorageType >

The Susan corner detector (oxford implementation, see license).

See documentation inside CornerDetectorSusan.hh

Author:
woelk 09/2004

Definition at line 220 of file CornerDetectorSusan.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType>
CornerDetectorSusan::CornerDetectorSusan ( )

Definition at line 206 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_cgx, BIAS::CornerDetectorSusan< StorageType >::_cgy, BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::CornerDetectorSusan< StorageType >::_Quick, BIAS::CornerDetectorSusan< StorageType >::_r, BIAS::CornerDetectorSusan< StorageType >::_susansize, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, BIAS::CornerDetectorSusan< StorageType >::_Threshold, DEFAULT_QUICK, DEFAULT_THRESH, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType>
CornerDetectorSusan::CornerDetectorSusan | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 222 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_cgx, BIAS::CornerDetectorSusan< StorageType >::_cgy, BIAS::CornerDetectorSusan< StorageType >::_r, BIAS::CornerDetectorSusan< StorageType >::_susansize, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_, and BIAS::Param::SetGroupName().

template<class StorageType>
CornerDetectorSusan::CornerDetectorSusan | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 236 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_cgx, BIAS::CornerDetectorSusan< StorageType >::_cgy, BIAS::CornerDetectorSusan< StorageType >::_r, BIAS::CornerDetectorSusan< StorageType >::_susansize, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, and BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_.

template<class StorageType>
CornerDetectorSusan::~CornerDetectorSusan ( )

Definition at line 247 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_cgx, BIAS::CornerDetectorSusan< StorageType >::_cgy, BIAS::CornerDetectorSusan< StorageType >::_Quick, BIAS::CornerDetectorSusan< StorageType >::_r, and BIAS::CornerDetectorSusan< StorageType >::_Threshold.

Member Function Documentation

template<class StorageType>
void CornerDetectorSusan::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::CornerDetectorBase< StorageType >.

Definition at line 1238 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_Threshold, BIASCDOUT, BIAS::Param::CheckParam(), D_CD_SUSAN, and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan().

template<class StorageType>
void CornerDetectorSusan::_int_to_uchar | ( | int * | r,
 |  | StorageType * | in,
 |  | int | size
 | ) | [protected]

protected function for susan

Definition at line 385 of file CornerDetectorSusan.cpp.

References StorageType.

template<class StorageType>
void CornerDetectorSusan::_setup_brightness_lut | ( | int | thresh,
 |  | int | form
 | ) | [protected]

protected function for susan

Definition at line 410 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, and StorageType.

Referenced by BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
int CornerDetectorSusan::_susan_corners | ( | StorageType * | in,
 |  | int * | r,
 |  | StorageType * | bp,
 |  | CORNER_LIST | corner_list,
 |  | int | x_size,
 |  | int | y_size,
 |  | StorageType * | roi
 | ) | [protected]

faster version of the above

Author:
woelk 08 2003

Definition at line 721 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_cgx, BIAS::CornerDetectorSusan< StorageType >::_cgy, BIAS::CornerDetectorSusan< StorageType >::_SusanReAllocMem(), BIAS::CornerDetectorSusan< StorageType >::_susansize, abs, BIASERR, cp, FTOI, MAX_CORNERS, and StorageType.

template<class StorageType>
int CornerDetectorSusan::_susan_corners | ( | StorageType * | in,
 |  | int * | r,
 |  | StorageType * | bp,
 |  | CORNER_LIST | corner_list,
 |  | int | x_size,
 |  | int | y_size
 | ) | [protected]

returns the number of corners found

Definition at line 435 of file CornerDetectorSusan.cpp.

References abs, BIASERR, cp, FTOI, MAX_CORNERS, and StorageType.

Referenced by BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
int CornerDetectorSusan::_susan_corners_quick | ( | StorageType * | in,
 |  | int * | r,
 |  | StorageType * | bp,
 |  | CORNER_LIST | corner_list,
 |  | int | x_size,
 |  | int | y_size
 | ) | [protected]

returns the number of corners found

Definition at line 1022 of file CornerDetectorSusan.cpp.

References BIASERR, cp, MAX_CORNERS, and StorageType.

Referenced by BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
void BIAS::CornerDetectorSusan< StorageType >::_SusanReAllocMem | ( | int | x_size,
 |  | int | y_size
 | ) | [inline, protected]

allocates the internal data structures for susan corner detector

Definition at line 283 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), and BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorSusan::Detect | ( | const Image< StorageType > & | image,
 |  | const Image< StorageType > & | roi,
 |  | CORNER_LIST | corner_list,
 |  | int & | num
 | ) |

Susan Corner Detector returning corner list, only detects corners where roi!=0.

Author:
woelk

Definition at line 291 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_Quick, BIAS::CornerDetectorSusan< StorageType >::_r, BIAS::CornerDetectorSusan< StorageType >::_setup_brightness_lut(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick(), BIAS::CornerDetectorSusan< StorageType >::_SusanReAllocMem(), BIAS::CornerDetectorSusan< StorageType >::_susansize, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, BIAS::CornerDetectorSusan< StorageType >::_Threshold, BIASDOUT, BIASERR, D_CD_SUSAN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), and StorageType.

template<class StorageType>
int CornerDetectorSusan::Detect | ( | const Image< StorageType > & | image,
 |  | CORNER_LIST | corner_list,
 |  | int & | num
 | ) |

Susan Corner Detector returning corner list, fast interface for daimler.

Author:
woelk

Definition at line 261 of file CornerDetectorSusan.cpp.

References BIAS::CornerDetectorSusan< StorageType >::_bp, BIAS::CornerDetectorSusan< StorageType >::_Quick, BIAS::CornerDetectorSusan< StorageType >::_r, BIAS::CornerDetectorSusan< StorageType >::_setup_brightness_lut(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::_susan_corners_quick(), BIAS::CornerDetectorSusan< StorageType >::_SusanReAllocMem(), BIAS::CornerDetectorSusan< StorageType >::_susansize, BIAS::CornerDetectorSusan< StorageType >::_susanthresh, BIAS::CornerDetectorSusan< StorageType >::_Threshold, BIASDOUT, BIASERR, D_CD_SUSAN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), and StorageType.

template<class StorageType>
virtual int BIAS::CornerDetectorSusan< StorageType >::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | pvec,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual]

Susan Corner Detector returning homogenous points,.

Author:
woelk

Reimplemented from BIAS::CornerDetectorBase< StorageType >.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

Member Data Documentation

template<class StorageType>
StorageType* BIAS::CornerDetectorSusan< StorageType >::_bp [protected]

Definition at line 257 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_setup_brightness_lut(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorSusan< StorageType >::Detect(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

template<class StorageType>
int* BIAS::CornerDetectorSusan< StorageType >::_cgx [protected]

local vars for susan

Definition at line 256 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

template<class StorageType>
int * BIAS::CornerDetectorSusan< StorageType >::_cgy [protected]

Definition at line 256 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType>
int BIAS::CornerDetectorSusan< StorageType >::_num [protected]

Definition at line 256 of file CornerDetectorSusan.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
bool* BIAS::CornerDetectorSusan< StorageType >::_Quick [protected]

Definition at line 253 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorSusan< StorageType >::Detect(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

template<class StorageType>
int * BIAS::CornerDetectorSusan< StorageType >::_r [protected]

Definition at line 256 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorSusan< StorageType >::Detect(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

template<class StorageType>
int BIAS::CornerDetectorSusan< StorageType >::_susansize [protected]

Definition at line 256 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_susan_corners(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
int BIAS::CornerDetectorSusan< StorageType >::_susanthresh [protected]

Definition at line 256 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_setup_brightness_lut(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorSusan< StorageType >::Detect().

template<class StorageType>
int* BIAS::CornerDetectorSusan< StorageType >::_Threshold [protected]

parameter

Definition at line 252 of file CornerDetectorSusan.hh.

Referenced by BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorSusan< StorageType >::Detect(), and BIAS::CornerDetectorSusan< StorageType >::~CornerDetectorSusan().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/CornerDetectorSusan.hh
  • FeatureDetector/CornerDetectorSusan.cpp
Generated on Wed Jun 21 19:06:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CornerMatcher Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CornerMatcher

BIAS::CornerMatcher Class Reference

class with various functions to detect corresponding image points More...

#include <Matcher2D/CornerMatcher.hh>

Inheritance diagram for BIAS::CornerMatcher:

[legend]
Collaboration diagram for BIAS::CornerMatcher:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
template<class StorageType>
void | CNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
ColorNCC for interleaved hsL images.
template<class StorageType>
void | ColorCCV (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation
template<class StorageType>
void | ColorNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
ColorNCC for interleaved HSV images.
CornerMatcher ()
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
template<class StorageType>
int | LineMatcherNCC (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation)
template<class StorageType>
int | LineMatcherNCC (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation)
searches along line from start2 to end2 within +/- epsilon pixels away from the line in ida2 for a match to p1 using ncc with halfwinsize boundary checking is not done, i.e.
template<class StorageType>
int | LineMatcherSAD (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad)
template<class StorageType>
int | LineMatcherSAD (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad)
as above but uses SAD
template<>
void | NCC (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | NCC (unsigned p1[2], unsigned p2[2], StorageType **ida1, StorageType **roi1, StorageType **ida2, StorageType **roi2, unsigned hww, unsigned hwh, double &result)
fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero
template<class StorageType>
void | NCC (double p1[2], double p2[2], StorageType **ida1, StorageType **ida2, unsigned halfwinsize, double &result)
fast interpolated ncc
template<class StorageType>
void | NCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4
template<class StorageType>
int | NCC (HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, double &result)
wrapper for NCC from RegionMatcher, does boundary checks and casts uses rint to determine location of ncc
template<class StorageType>
int | NCCSearch (HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, HomgPoint2D &resultpoint, double mincorrelation, double &result)
wrapper for RegionMatcher::NCCSearchOdd/NCCSearchEven, does boundary checks and casts
template<class StorageType>
int | NCCSearchEven (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result)
As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize).
template<class StorageType>
int | NCCSearchOdd (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result)
Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation.
template<class StorageType>
int | ParabolaNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2])
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
template<class StorageType>
int | ParabolaNCC (HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, HomgPoint2D &result)
wrapper for RegionMatcher::ParabolaNCC
template<class StorageType>
int | ParabolaNCC5 (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2])
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
template<class StorageType>
int | ParabolaNCC5 (HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, HomgPoint2D &result)
wrapper for RegionMatcher::ParabolaNCC5
void | PrintDebugLevel (std::ostream &os=std::cout) const
template<class StorageType>
int | RefinePyramideNCC (vector< vector< HomgPoint2D > > &ps1, PyramidImage< StorageType > &im1, PyramidImage< StorageType > &im2, unsigned int halfnccwinsize, vector< vector< HomgPoint2D > > &matches, vector< vector< double > > &matchquality)
template<class StorageType>
int | RefinePyramideNCC (std::vector< std::vector< HomgPoint2D > > &ps1, PyramidImage< StorageType > &im1, PyramidImage< StorageType > &im2, unsigned int halfnccwinsize, std::vector< std::vector< HomgPoint2D > > &matches, std::vector< std::vector< double > > &matchquality)
Assumes that ps1 is fully filled.
void | RemoveDebugLevel (long int lv)
template<>
void | SAD (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SAD (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast sum of absolut differences (SAD) sim.
template<>
void | SADN (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SADN (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
template<>
void | SSD (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SSD (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast sum of square differences (SSD) sim.
template<class StorageType>
int | SSD (HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, double &result)
wrapper for SSD from RegionMatcher, does boundary checks and casts uses rint to determine location of ssd
~CornerMatcher ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

KLT_TYPE | _Bilinear (unsigned char **ida, KLT_TYPE x, KLT_TYPE y)
template<class StorageType>
KLT_TYPE | _Bilinear (StorageType **ida, KLT_TYPE x, KLT_TYPE y)
void | _BilinearRegion (unsigned char **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res)
template<class StorageType>
void | _BilinearRegion (StorageType **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res)
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating
KLT_TYPE | _ParabolaApprox (KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3, KLT_TYPE x4, KLT_TYPE x5)
KLT_TYPE | _ParabolaApprox (KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3)
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Protected Attributes

Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl1_5
Matrix< KLT_TYPE > | _bl2
Matrix< KLT_TYPE > | _bl2_5
Vector2< KLT_TYPE > | _d
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
Matrix2x2< KLT_TYPE > | _Ginv
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsx_5
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gsy_5
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx1_5
Matrix< KLT_TYPE > | _gx2
Matrix< KLT_TYPE > | _gx2_5
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy1_5
Matrix< KLT_TYPE > | _gy2
Matrix< KLT_TYPE > | _gy2_5
Matrix< KLT_TYPE > | _iim1
Matrix< KLT_TYPE > | _iim2
unsigned | _klthws
long int | _liDebugLevel
unsigned | _ncchws
unsigned | _nccwinsize
unsigned | _winsize

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

class with various functions to detect corresponding image points

detailed desc.

Definition at line 49 of file CornerMatcher.hh.

Constructor & Destructor Documentation

CornerMatcher::CornerMatcher ( )

Definition at line 81 of file CornerMatcher.cpp.

CornerMatcher::~CornerMatcher ( )

Definition at line 85 of file CornerMatcher.cpp.

Member Function Documentation

KLT_TYPE RegionMatcher::_Bilinear | ( | unsigned char ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y
 | ) | [protected, inherited]

Definition at line 351 of file RegionMatcher.cpp.

template<class StorageType>
KLT_TYPE RegionMatcher::_Bilinear | ( | StorageType ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y
 | ) | [protected, inherited]

Definition at line 335 of file RegionMatcher.cpp.

References KLT_TYPE, and StorageType.

void RegionMatcher::_BilinearRegion | ( | unsigned char ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | unsigned | hws,
 |  | Matrix< KLT_TYPE > & | res
 | ) | [protected, inherited]

Definition at line 408 of file RegionMatcher.cpp.

References r.

template<class StorageType>
void RegionMatcher::_BilinearRegion | ( | StorageType ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | unsigned | hws,
 |  | Matrix< KLT_TYPE > & | res
 | ) | [protected, inherited]

bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Definition at line 382 of file RegionMatcher.cpp.

References KLT_TYPE, r, and StorageType.

Referenced by BIAS::RegionMatcher::NCC().

KLT_TYPE BIAS::RegionMatcher::_ParabolaApprox | ( | KLT_TYPE | x1,
 |  | KLT_TYPE | x2,
 |  | KLT_TYPE | x3,
 |  | KLT_TYPE | x4,
 |  | KLT_TYPE | x5
 | ) | [inline, protected, inherited]

Definition at line 487 of file RegionMatcher.hh.

References KLT_TYPE, and TNT::Lapack_LLS_QR_linear_solve().

KLT_TYPE BIAS::RegionMatcher::_ParabolaApprox | ( | KLT_TYPE | x1,
 |  | KLT_TYPE | x2,
 |  | KLT_TYPE | x3
 | ) | [inline, protected, inherited]

bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Definition at line 480 of file RegionMatcher.hh.

References a, KLT_TYPE, and p.

Referenced by BIAS::RegionMatcher::ParabolaNCC(), and BIAS::RegionMatcher::ParabolaNCC5().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::RegionMatcher::CNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

ColorNCC for interleaved hsL images.

Author:
Daniel Grest, June 2003

Definition at line 372 of file SimilarityMeasure.cpp.

References BIASDOUT, CNCC_EPSILON, D_REGION_MATCHER_COLORNCC, r, and StorageType.

Referenced by demo().

template<class StorageType>
void BIAS::RegionMatcher::ColorCCV | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation

Author:
Daniel Grest, April 2003

Definition at line 258 of file SimilarityMeasure.cpp.

References BIASDOUT, D_REGION_MATCHER_COLORCCV, r, and StorageType.

template<class StorageType>
void BIAS::RegionMatcher::ColorNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

ColorNCC for interleaved HSV images.

Author:
Daniel Grest, March 2003

Definition at line 304 of file SimilarityMeasure.cpp.

References BIASDOUT, CNCC_EPSILON, D_REGION_MATCHER_COLORNCC, r, and StorageType.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherNCC | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | correlation
 | ) | [inherited]

Definition at line 29 of file LineMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_LINE, BIAS::ScanLine::GetNext(), BIAS::RegionMatcher::NCC(), res, and StorageType.

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherNCC | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | correlation
 | ) | [inherited]

searches along line from start2 to end2 within +/- epsilon pixels away from the line in ida2 for a match to p1 using ncc with halfwinsize boundary checking is not done, i.e.

start2 and end2 must lie more than halfwindowsize+epsilon away from the image border p1 must lie more than halfwinsize away from image border only for those points in im2 a correlation is calculated for which the gradient is > grad1[p1[1]][p1[0]]*gradientscale input: ida1 - pointer to the image data array of im1, row mayor

output: result - image coo of point with greatest corelation correlation - the correlation betwen p1 and result returns: 0 on success -1 no matching point found <-1 error

Referenced by main().

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherSAD | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | sad
 | ) | [inherited]

Definition at line 74 of file LineMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_LINE, BIAS::ScanLine::GetNext(), res, BIAS::RegionMatcher::SAD(), and StorageType.

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherSAD | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | sad
 | ) | [inherited]

as above but uses SAD

Referenced by main().

template<>
void BIAS::RegionMatcher::NCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | unsigned | p1[2],
 |  | unsigned | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | roi1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | roi2,
 |  | unsigned | hww,
 |  | unsigned | hwh,
 |  | double & | result
 | ) | [inherited]

fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero

Author:
woelk 09 2003 , tested

Definition at line 233 of file SimilarityMeasure.cpp.

References r.

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | double | p1[2],
 |  | double | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | halfwinsize,
 |  | double & | result
 | ) | [inherited]

fast interpolated ncc

Author:
woelk

Definition at line 207 of file SimilarityMeasure.cpp.

References BIAS::RegionMatcher::_BilinearRegion(), BIAS::RegionMatcher::_iim1, BIAS::RegionMatcher::_iim2, BIAS::RegionMatcher::_ncchws, BIAS::RegionMatcher::_nccwinsize, TNT::Matrix< T >::newsize(), and r.

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4

Author:
woelk

Definition at line 154 of file SimilarityMeasure.cpp.

References BIASASSERT, and r.

Referenced by demo(), BIAS::RegionMatcher::LineMatcherNCC(), NCC(), BIAS::RegionMatcher::NCCSearchEven(), BIAS::RegionMatcher::NCCSearchOdd(), BIAS::RegionMatcher::ParabolaNCC(), and BIAS::RegionMatcher::ParabolaNCC5().

template<class StorageType>
int CornerMatcher::NCC | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

wrapper for NCC from RegionMatcher, does boundary checks and casts uses rint to determine location of ncc

Definition at line 125 of file CornerMatcher.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::IsAtInfinity(), and BIAS::RegionMatcher::NCC().

template<class StorageType>
int CornerMatcher::NCCSearch | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | unsigned int | halfnccwinsize,
 |  | unsigned int | halfsearchwinsize,
 |  | HomgPoint2D & | resultpoint,
 |  | double | mincorrelation,
 |  | double & | result
 | ) |

wrapper for RegionMatcher::NCCSearchOdd/NCCSearchEven, does boundary checks and casts

Definition at line 162 of file CornerMatcher.cpp.

References BIASDOUT, D_CORNER_MATCHER_SEARCH, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::IsAtInfinity(), BIAS::RegionMatcher::NCCSearchOdd(), and BIAS::HomgPoint2D::Set().

Referenced by main().

template<class StorageType>
int RegionMatcher::NCCSearchEven | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfnccwinsize,
 |  | unsigned int | halfsearchwinsize,
 |  | unsigned int | resultpoint[2],
 |  | double | mincorrelation,
 |  | double & | result
 | ) | [inherited]

As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize).

Definition at line 232 of file RegionMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_SEARCH_EVEN, D_REGION_MATCHER_SEARCHNCC, BIAS::RegionMatcher::NCC(), and res.

Referenced by RefinePyramideNCC().

template<class StorageType>
int RegionMatcher::NCCSearchOdd | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfnccwinsize,
 |  | unsigned int | halfsearchwinsize,
 |  | unsigned int | resultpoint[2],
 |  | double | mincorrelation,
 |  | double & | result
 | ) | [inherited]

Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation.

If point with correlation > mincorrelation is found, the search is aborted and resultpoint is set. If no point with correlation > mincorrelation is found, a negative value is returned. resultpoint is set to the point with biggest correlation within search window, result is set tot this correlation. Searching follows an outbound spiral around p2, either until searchwinsize is completly searched or until a point with correlation greater than mincorrelation is found If whole search area should be used, use mincorrelation>=1.0 Searchwindow is always odd-sized (p2+/-halfsearchwinsize) returns 0 on success, negative value if no point found with correlation > mincorrelation !!! warning, no boundary checking is performed, i.e. p1[i]/p2[i] +-(halfnccwinsize+halfsearchwinsize) must lie within StorageType-array input: p1, p2, ida1, ida2, halfnccwinsize, halfsearchwinsize, mincorrelation output: resultpoint, result

Definition at line 131 of file RegionMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_SEARCH_ODD, D_REGION_MATCHER_SEARCHNCC, BIAS::RegionMatcher::NCC(), and res.

Referenced by NCCSearch().

template<class StorageType>
int RegionMatcher::ParabolaNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | KLT_TYPE | result[2]
 | ) | [inherited]

function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e.

NCC(p1, {p2[0]+/-1, p2[1]+/-1})<NCC(p1, p2)

Author:
woelk 03 2003

Definition at line 500 of file RegionMatcher.cpp.

References BIAS::RegionMatcher::_ParabolaApprox(), BIASDOUT, BIASERR, D_REGION_MATCHER_PARABOLA, BIAS::RegionMatcher::NCC(), and res.

Referenced by ParabolaNCC().

template<class StorageType>
int CornerMatcher::ParabolaNCC | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | unsigned int | halfwinsize,
 |  | HomgPoint2D & | result
 | ) |

wrapper for RegionMatcher::ParabolaNCC

Definition at line 491 of file CornerMatcher.cpp.

References BIASDOUT, D_CORNER_MATCHER_PARABOLA, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::IsAtInfinity(), KLT_TYPE, BIAS::RegionMatcher::ParabolaNCC(), and BIAS::HomgPoint2D::Set().

Referenced by main().

template<class StorageType>
int RegionMatcher::ParabolaNCC5 | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | KLT_TYPE | result[2]
 | ) | [inherited]

function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e.

NCC(p1, {p2[0]+/-2, p2[1]+/-2})<NCC(p1, p2)

Author:
woelk 04 2003

Definition at line 551 of file RegionMatcher.cpp.

References BIAS::RegionMatcher::_ParabolaApprox(), BIASDOUT, BIASERR, D_REGION_MATCHER_PARABOLA, BIAS::RegionMatcher::NCC(), and res.

Referenced by ParabolaNCC5().

template<class StorageType>
int CornerMatcher::ParabolaNCC5 | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | unsigned int | halfwinsize,
 |  | HomgPoint2D & | result
 | ) |

wrapper for RegionMatcher::ParabolaNCC5

Definition at line 537 of file CornerMatcher.cpp.

References BIASDOUT, D_CORNER_MATCHER_PARABOLA, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::IsAtInfinity(), KLT_TYPE, BIAS::RegionMatcher::ParabolaNCC5(), and BIAS::HomgPoint2D::Set().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int BIAS::CornerMatcher::RefinePyramideNCC | ( | vector< vector< HomgPoint2D > > & | ps1,
 |  | PyramidImage< StorageType > & | im1,
 |  | PyramidImage< StorageType > & | im2,
 |  | unsigned int | halfnccwinsize,
 |  | vector< vector< HomgPoint2D > > & | matches,
 |  | vector< vector< double > > & | matchquality
 | ) |

Definition at line 583 of file CornerMatcher.cpp.

References BIAS::RegionMatcher::NCCSearchEven(), and StorageType.

template<class StorageType>
int BIAS::CornerMatcher::RefinePyramideNCC | ( | std::vector< std::vector< HomgPoint2D > > & | ps1,
 |  | PyramidImage< StorageType > & | im1,
 |  | PyramidImage< StorageType > & | im2,
 |  | unsigned int | halfnccwinsize,
 |  | std::vector< std::vector< HomgPoint2D > > & | matches,
 |  | std::vector< std::vector< double > > & | matchquality
 | ) |

Assumes that ps1 is fully filled.

The matches on the smallest pyramid level must be given, i.e. matches[im1.size()-1][i] must correspond to ps1[im1.size()-1][i] with correlation quality matchquality[i]. It then propagates the matches to the upper (bigger) pyramid levels using ncc correlation.

Author:
woelk 05 2003

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<>
void BIAS::RegionMatcher::SAD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

template<class StorageType>
void BIAS::RegionMatcher::SAD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

fast sum of absolut differences (SAD) sim.

measurement between p1 and p2 without boundary checking specialized version for unsigned char exist only for halfwindowsizes < 2050

Author:
woelk 02 2003 untested

Definition at line 34 of file SimilarityMeasure.cpp.

References r, and StorageType.

Referenced by BIAS::RegionMatcher::LineMatcherSAD().

template<>
void BIAS::RegionMatcher::SADN | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

template<class StorageType>
void BIAS::RegionMatcher::SADN | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050

Author:
woelk 05 2003 untested

Definition at line 71 of file SimilarityMeasure.cpp.

References r, res, StorageType, and STORAGETYPE_MAX.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<>
void BIAS::RegionMatcher::SSD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

template<class StorageType>
void BIAS::RegionMatcher::SSD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) | [inherited]

fast sum of square differences (SSD) sim.

measurment between p1 and p2 without boundary checking specialized version for unsigned char exist for halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4

Author:
woelk ? untested

Definition at line 120 of file SimilarityMeasure.cpp.

References r.

Referenced by SSD().

template<class StorageType>
int CornerMatcher::SSD | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

wrapper for SSD from RegionMatcher, does boundary checks and casts uses rint to determine location of ssd

Definition at line 89 of file CornerMatcher.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::IsAtInfinity(), res, and BIAS::RegionMatcher::SSD().

Member Data Documentation

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl1 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl1_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl2 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl2_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Vector2<KLT_TYPE> BIAS::RegionMatcher::_d [protected, inherited]

Definition at line 507 of file RegionMatcher.hh.

Vector2<KLT_TYPE> BIAS::RegionMatcher::_disp [protected, inherited]

Definition at line 507 of file RegionMatcher.hh.

Vector2<KLT_TYPE> BIAS::RegionMatcher::_e [protected, inherited]

Definition at line 507 of file RegionMatcher.hh.

Matrix2x2<KLT_TYPE> BIAS::RegionMatcher::_G [protected, inherited]

Definition at line 506 of file RegionMatcher.hh.

Matrix2x2<KLT_TYPE> BIAS::RegionMatcher::_Ginv [protected, inherited]

Definition at line 506 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsx [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsx_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsy [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsy_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx1 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx1_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx2 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx2_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy1 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy1_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy2 [protected, inherited]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy2_5 [protected, inherited]

Definition at line 509 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_iim1 [protected, inherited]

Definition at line 513 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCC().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_iim2 [protected, inherited]

Definition at line 513 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCC().

unsigned BIAS::RegionMatcher::_klthws [protected, inherited]

Definition at line 511 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

unsigned BIAS::RegionMatcher::_ncchws [protected, inherited]

Definition at line 514 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCC(), and BIAS::RegionMatcher::RegionMatcher().

unsigned BIAS::RegionMatcher::_nccwinsize [protected, inherited]

Definition at line 514 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::NCC(), and BIAS::RegionMatcher::RegionMatcher().

unsigned BIAS::RegionMatcher::_winsize [protected, inherited]

Definition at line 511 of file RegionMatcher.hh.

Referenced by BIAS::RegionMatcher::RegionMatcher().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Matcher2D/CornerMatcher.hh
  • Matcher2D/CornerMatcher.cpp
Generated on Wed Jun 21 19:06:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::cornerstruct Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::cornerstruct

BIAS::cornerstruct Class Reference
[Feature Detectors]

used only by Susan corner detector More...

#include <FeatureDetector/CornerDetectorSusan.hh>

List of all members.

Public Attributes

int | dx
int | dy
int | I
int | info
int | x
int | y

Detailed Description

used only by Susan corner detector

Definition at line 207 of file CornerDetectorSusan.hh.

Member Data Documentation

int BIAS::cornerstruct::dx

Definition at line 208 of file CornerDetectorSusan.hh.

int BIAS::cornerstruct::dy

Definition at line 208 of file CornerDetectorSusan.hh.

int BIAS::cornerstruct::I

Definition at line 208 of file CornerDetectorSusan.hh.

int BIAS::cornerstruct::info

Definition at line 208 of file CornerDetectorSusan.hh.

int BIAS::cornerstruct::x

Definition at line 208 of file CornerDetectorSusan.hh.

int BIAS::cornerstruct::y

Definition at line 208 of file CornerDetectorSusan.hh.

The documentation for this class was generated from the following file:
  • FeatureDetector/CornerDetectorSusan.hh
Generated on Wed Jun 21 19:06:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CovMatrix3x3 Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CovMatrix3x3

BIAS::CovMatrix3x3 Class Reference
[Matrix and Vector Classes, Geometry and Transformations]

class for 3x3 covariance matrices More...

#include <Geometry/CovMatrix3x3.hh>

Inheritance diagram for BIAS::CovMatrix3x3:

[legend]
Collaboration diagram for BIAS::CovMatrix3x3:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< COVMATRIX3X3_TYPE > &arg)
Adds arg to this.
void | AddIP (const COVMATRIX3X3_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
CovMatrix3x3 (const Matrix3x3< COVMATRIX3X3_TYPE > &mat)
CovMatrix3x3 (const MatrixInitType &i)
CovMatrix3x3 (const CovMatrix3x3 &mat)
CovMatrix3x3 ()
COVMATRIX3X3_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const COVMATRIX3X3_TYPE &scalar)
in place division function
void | Fill (const COVMATRIX3X3_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< COVMATRIX3X3_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< COVMATRIX3X3_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
COVMATRIX3X3_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
COVMATRIX3X3_TYPE ** | GetDataArray () const
returns zero based arry for data access
COVMATRIX3X3_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
COVMATRIX3X3_TYPE * | GetDataLast () const
Get a pointer to the last data element.
COVMATRIX3X3_TYPE | GetDeterminant () const
returns the Determinant |A| of this
HomgPoint3DCov | GetHomogenized () const
Type conversion for homogenous covariances.
COVMATRIX3X3_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (COVMATRIX3X3_TYPE &max, COVMATRIX3X3_TYPE &min) const
return biggest and smallest entry
COVMATRIX3X3_TYPE | GetMean () const
Returns the mean value of the matrix elements.
COVMATRIX3X3_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
int | GetPCA (Vector3< COVMATRIX3X3_TYPE > &S, Matrix3x3< COVMATRIX3X3_TYPE > &VT)
Vector< COVMATRIX3X3_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< COVMATRIX3X3_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< COVMATRIX3X3_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
int | GetS (Vector3< COVMATRIX3X3_TYPE > &S)
int | GetSearchArea (PMatrixBase &P, HomgPoint3D &point3D, Vector2< double > &x, Vector2< double > &y, double scale, double minSearchArea)
Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image as determined from the projected covariance matrix covmat.
int | GetSearchArea (PMatrixBase &P, HomgPoint3D &point3D, Vector2< double > &x, Vector2< double > &y, double scale)
Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image as determined from the projected covariance matrix covmat.
void | GetSystemMatrix (Matrix< COVMATRIX3X3_TYPE > &dest) const
compute square system matrix dest = A^T * A
void InvalidatePCA ()
Call this function to indicate that the matrix fields have changed The saved PCA is declared invalid and the next call to GetPCA forces a recomputation.
int | Invert (Matrix3x3< COVMATRIX3X3_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< COVMATRIX3X3_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< COVMATRIX3X3_TYPE > &A)
Matrix (const Matrix< COVMATRIX3X3_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const COVMATRIX3X3_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< COVMATRIX3X3_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< COVMATRIX3X3_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< COVMATRIX3X3_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const COVMATRIX3X3_TYPEa0, const COVMATRIX3X3_TYPEa1, const COVMATRIX3X3_TYPEa2, const COVMATRIX3X3_TYPEa3, const COVMATRIX3X3_TYPEa4, const COVMATRIX3X3_TYPEa5, const COVMATRIX3X3_TYPEa6, const COVMATRIX3X3_TYPEa7, const COVMATRIX3X3_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (COVMATRIX3X3_TYPE &max, COVMATRIX3X3_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< COVMATRIX3X3_TYPE > &arg, Vector< COVMATRIX3X3_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< COVMATRIX3X3_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< COVMATRIX3X3_TYPE > &arg, Matrix< COVMATRIX3X3_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< COVMATRIX3X3_TYPE > &argmat, Matrix3x4< COVMATRIX3X3_TYPE > &destmat) const
void | Mult (const Matrix3x3< COVMATRIX3X3_TYPE > &argmat, Matrix3x3< COVMATRIX3X3_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< COVMATRIX3X3_TYPE > &argvec, Vector3< COVMATRIX3X3_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const COVMATRIX3X3_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< COVMATRIX3X3_TYPE > &arg, Vector< COVMATRIX3X3_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< COVMATRIX3X3_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
COVMATRIX3X3_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
COVMATRIX3X3_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
COVMATRIX3X3_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
COVMATRIX3X3_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
CovMatrix3x3 & | operator= (const BIAS::Matrix3x3< COVMATRIX3X3_TYPE > &mat)
assignment operator calls corresponding operator from base class
CovMatrix3x3 & | operator= (const CovMatrix3x3 &mat)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const COVMATRIX3X3_TYPE &scalar, Matrix3x3< COVMATRIX3X3_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, COVMATRIX3X3_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, COVMATRIX3X3_TYPEscale)
Scales row NoRow with scale.
void | SetAsCrossProductMatrix (const COVMATRIX3X3_TYPE &x, const COVMATRIX3X3_TYPE &y, const COVMATRIX3X3_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< COVMATRIX3X3_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< COVMATRIX3X3_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< COVMATRIX3X3_TYPE > &v0, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v1, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromHomogenized (const HomgPoint3DCov &ch, const HomgPoint3D &ph)
Type conversion for homogenous covariances.
void | SetFromRowVectors (const BIAS::Vector3< COVMATRIX3X3_TYPE > &v0, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v1, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< COVMATRIX3X3_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< COVMATRIX3X3_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const COVMATRIX3X3_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< COVMATRIX3X3_TYPE > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
returns matrix's trace.
void | Transpose (const Matrix3x3< COVMATRIX3X3_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< COVMATRIX3X3_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< COVMATRIX3X3_TYPE > &argvec, Vector3< COVMATRIX3X3_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~CovMatrix3x3 ()

Protected Member Functions

int | _Decompose ()
void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

bool | _IsDecomposed
flag indicating whether the stored PCA is still valid
Vector3< COVMATRIX3X3_TYPE > | _S
SVD _svd
Matrix3x3< COVMATRIX3X3_TYPE > | _U
Matrix3x3< COVMATRIX3X3_TYPE > | _VT
Matrix3x3< COVMATRIX3X3_TYPE > | ConsistencyBackup_
saves matrix fields to make consistency checks possible later
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class for 3x3 covariance matrices

This class represents a 3x3 convariance matrix with the capability of doing a PCA (principle component analysis).

Attention:
For performance reasons, the PCA is only done once and saved, subsequent calls to GetPCA() only return a copy. If the covariance matrix is changed, you must call InvalidatePCA() to force a recomputation at the next GetPCA()-Call !

Definition at line 50 of file CovMatrix3x3.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

CovMatrix3x3::CovMatrix3x3 ( )

Definition at line 32 of file CovMatrix3x3.cpp.

References _IsDecomposed.

CovMatrix3x3::~CovMatrix3x3 ( )

Definition at line 37 of file CovMatrix3x3.cpp.

CovMatrix3x3::CovMatrix3x3 ( const CovMatrix3x3 & mat )

Definition at line 39 of file CovMatrix3x3.cpp.

BIAS::CovMatrix3x3::CovMatrix3x3 ( const MatrixInitType & i ) [inline, explicit]

Definition at line 59 of file CovMatrix3x3.hh.

BIAS::CovMatrix3x3::CovMatrix3x3 ( const Matrix3x3< COVMATRIX3X3_TYPE > & mat ) [inline]

Definition at line 62 of file CovMatrix3x3.hh.

Member Function Documentation

int CovMatrix3x3::_Decompose ( ) [protected]

Definition at line 85 of file CovMatrix3x3.cpp.

References _IsDecomposed, _S, _svd, _U, _VT, BIAS_DEBUG, BIAS::SVD::Compute(), ConsistencyBackup_, BIAS::SVD::GetS(), BIAS::SVD::GetU(), and BIAS::SVD::GetVT().

Referenced by GetPCA(), and GetS().

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Add | ( | const COVMATRIX3X3_TYPE & | scalar,
 |  | Matrix< COVMATRIX3X3_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< COVMATRIX3X3_TYPE >::AddIP ( const Matrix< COVMATRIX3X3_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< COVMATRIX3X3_TYPE >::AddIP ( const COVMATRIX3X3_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

COVMATRIX3X3_TYPE BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Divide | ( | const COVMATRIX3X3_TYPE & | scalar,
 |  | Matrix< COVMATRIX3X3_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< COVMATRIX3X3_TYPE >::DivideIP ( const COVMATRIX3X3_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Fill ( const COVMATRIX3X3_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<COVMATRIX3X3_TYPE > BIAS::Matrix< COVMATRIX3X3_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< COVMATRIX3X3_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<COVMATRIX3X3_TYPE > BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

COVMATRIX3X3_TYPE * BIAS::Matrix< COVMATRIX3X3_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by GetPCA(), and GetS().

COVMATRIX3X3_TYPE ** BIAS::Matrix< COVMATRIX3X3_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

COVMATRIX3X3_TYPE ** BIAS::Matrix< COVMATRIX3X3_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

COVMATRIX3X3_TYPE * BIAS::Matrix< COVMATRIX3X3_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

COVMATRIX3X3_TYPE BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

HomgPoint3DCov BIAS::CovMatrix3x3::GetHomogenized ( ) const [inline]

Type conversion for homogenous covariances.

Author:
streckel 05/2006

Definition at line 116 of file CovMatrix3x3.hh.

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< COVMATRIX3X3_TYPE >::GetMaxMin | ( | COVMATRIX3X3_TYPE & | max,
 |  | COVMATRIX3X3_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< COVMATRIX3X3_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

int CovMatrix3x3::GetPCA | ( | Vector3< COVMATRIX3X3_TYPE > & | S,
 |  | Matrix3x3< COVMATRIX3X3_TYPE > & | VT
 | ) |

Definition at line 44 of file CovMatrix3x3.cpp.

References _Decompose(), _IsDecomposed, BIASABORT, BIASERR, ConsistencyBackup_, COVMATRIX3X3_TYPE, BIAS::Matrix< COVMATRIX3X3_TYPE >::GetData(), and BIAS::Matrix< T >::GetData().

Referenced by BIAS::ThreeDOut::AddEllipsoid(), GetSearchArea(), main(), and BIAS::ThreeDOut::UpdateEllipsoid().

Vector<COVMATRIX3X3_TYPE > BIAS::Matrix< COVMATRIX3X3_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<COVMATRIX3X3_TYPE > BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< COVMATRIX3X3_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< COVMATRIX3X3_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

int CovMatrix3x3::GetS ( Vector3< COVMATRIX3X3_TYPE > & S )

Definition at line 65 of file CovMatrix3x3.cpp.

References _Decompose(), _IsDecomposed, BIASABORT, BIASERR, ConsistencyBackup_, COVMATRIX3X3_TYPE, BIAS::Matrix< COVMATRIX3X3_TYPE >::GetData(), and BIAS::Matrix< T >::GetData().

int CovMatrix3x3::GetSearchArea | ( | PMatrixBase & | P,
 |  | HomgPoint3D & | point3D,
 |  | Vector2< double > & | x,
 |  | Vector2< double > & | y,
 |  | double | scale,
 |  | double | minSearchArea
 | ) |

Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image as determined from the projected covariance matrix covmat.

A min Search Area can be specified with minSearchArea(which is the radius of the uncertainty sphere).

Author:
Daniel Grest, Feb 2003

Definition at line 184 of file CovMatrix3x3.cpp.

References GetPCA(), BIAS::Matrix3x3< T >::GetRow(), BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint3D::Homogenize(), M, TNT::Matrix< T >::num_rows(), BIAS::Vector3< T >::Set(), BIAS::HomgPoint3D::Set(), BIAS::Vector2< T >::Set(), and BIAS::Vector3< T >::SetZero().

int CovMatrix3x3::GetSearchArea | ( | PMatrixBase & | P,
 |  | HomgPoint3D & | point3D,
 |  | Vector2< double > & | x,
 |  | Vector2< double > & | y,
 |  | double | scale
 | ) |

Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image as determined from the projected covariance matrix covmat.

multiplied with scale

Author:
frahm, woelk 02 2003

Definition at line 121 of file CovMatrix3x3.cpp.

References GetPCA(), BIAS::Matrix3x3< T >::GetRow(), BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint3D::Homogenize(), M, TNT::Matrix< T >::num_rows(), BIAS::HomgPoint3D::Set(), BIAS::Vector3< T >::Set(), and BIAS::Vector2< T >::Set().

void BIAS::Matrix< COVMATRIX3X3_TYPE >::GetSystemMatrix ( Matrix< COVMATRIX3X3_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::CovMatrix3x3::InvalidatePCA ( ) [inline]

Call this function to indicate that the matrix fields have changed The saved PCA is declared invalid and the next call to GetPCA forces a recomputation.

Author:
koeser 09/2003

Definition at line 112 of file CovMatrix3x3.hh.

int BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Invert ( Matrix3x3< COVMATRIX3X3_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<COVMATRIX3X3_TYPE > BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix ( const TNT::Matrix< COVMATRIX3X3_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix ( const Matrix< COVMATRIX3X3_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const COVMATRIX3X3_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< COVMATRIX3X3_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( const TNT::Matrix< COVMATRIX3X3_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( const Matrix< COVMATRIX3X3_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( const Matrix3x3< COVMATRIX3X3_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 | ( | const COVMATRIX3X3_TYPE | a0,
 |  | const COVMATRIX3X3_TYPE | a1,
 |  | const COVMATRIX3X3_TYPE | a2,
 |  | const COVMATRIX3X3_TYPE | a3,
 |  | const COVMATRIX3X3_TYPE | a4,
 |  | const COVMATRIX3X3_TYPE | a5,
 |  | const COVMATRIX3X3_TYPE | a6,
 |  | const COVMATRIX3X3_TYPE | a7,
 |  | const COVMATRIX3X3_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::MaxMin | ( | COVMATRIX3X3_TYPE & | max,
 |  | COVMATRIX3X3_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult | ( | const Vector< COVMATRIX3X3_TYPE > & | arg,
 |  | Vector< COVMATRIX3X3_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult ( const Matrix< COVMATRIX3X3_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult | ( | const Matrix< COVMATRIX3X3_TYPE > & | arg,
 |  | Matrix< COVMATRIX3X3_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Mult | ( | const Matrix3x4< COVMATRIX3X3_TYPE > & | argmat,
 |  | Matrix3x4< COVMATRIX3X3_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Mult | ( | const Matrix3x3< COVMATRIX3X3_TYPE > & | argmat,
 |  | Matrix3x3< COVMATRIX3X3_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Mult | ( | const Vector3< COVMATRIX3X3_TYPE > & | argvec,
 |  | Vector3< COVMATRIX3X3_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Multiply | ( | const COVMATRIX3X3_TYPE & | scalar,
 |  | Matrix< COVMATRIX3X3_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< COVMATRIX3X3_TYPE >::MultiplyIP ( const COVMATRIX3X3_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::MultLeft | ( | const Vector< COVMATRIX3X3_TYPE > & | arg,
 |  | Vector< COVMATRIX3X3_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< COVMATRIX3X3_TYPE >::MultLeft ( const Matrix< COVMATRIX3X3_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< COVMATRIX3X3_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< COVMATRIX3X3_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< COVMATRIX3X3_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< COVMATRIX3X3_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

COVMATRIX3X3_TYPE BIAS::Matrix< COVMATRIX3X3_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

CovMatrix3x3& BIAS::CovMatrix3x3::operator= ( const BIAS::Matrix3x3< COVMATRIX3X3_TYPE > & mat ) [inline]

assignment operator calls corresponding operator from base class

Author:
Felix Woelk

Reimplemented from BIAS::Matrix3x3< COVMATRIX3X3_TYPE >.

Definition at line 73 of file CovMatrix3x3.hh.

References BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::operator=().

CovMatrix3x3 & CovMatrix3x3::operator= ( const CovMatrix3x3 & mat )

Definition at line 102 of file CovMatrix3x3.cpp.

References _IsDecomposed, _S, _U, _VT, ConsistencyBackup_, and BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< COVMATRIX3X3_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Scale | ( | const COVMATRIX3X3_TYPE & | scalar,
 |  | Matrix3x3< COVMATRIX3X3_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< COVMATRIX3X3_TYPE >::ScaleCol | ( | int | NoCol,
 |  | COVMATRIX3X3_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::ScaleRow | ( | int | NoRow,
 |  | COVMATRIX3X3_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetAsCrossProductMatrix | ( | const COVMATRIX3X3_TYPE & | x,
 |  | const COVMATRIX3X3_TYPE & | y,
 |  | const COVMATRIX3X3_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetAsCrossProductMatrix ( const Vector3< COVMATRIX3X3_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< COVMATRIX3X3_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v0,
 |  | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v1,
 |  | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::CovMatrix3x3::SetFromHomogenized | ( | const HomgPoint3DCov & | ch,
 |  | const HomgPoint3D & | ph
 | ) | [inline]

Type conversion for homogenous covariances.

Author:
streckel 05/2006

Definition at line 127 of file CovMatrix3x3.hh.

References cov, and BIAS::HomgPoint3DCov::Homogenize().

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v0,
 |  | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v1,
 |  | const BIAS::Vector3< COVMATRIX3X3_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetFromVector ( const TNT::Vector< COVMATRIX3X3_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< COVMATRIX3X3_TYPE >.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< COVMATRIX3X3_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< COVMATRIX3X3_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< COVMATRIX3X3_TYPE >::Sub | ( | const COVMATRIX3X3_TYPE & | scalar,
 |  | Matrix< COVMATRIX3X3_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< COVMATRIX3X3_TYPE >::SubIP ( const COVMATRIX3X3_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< COVMATRIX3X3_TYPE >::SubIP ( const Matrix< COVMATRIX3X3_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

double BIAS::CovMatrix3x3::Trace ( ) const [inline]

returns matrix's trace.

If this = V * S * V^T, trace means |S|^2 and provides a scalar measure of how uncertain a 3D point is.

Note the difference to det() which means geometric averaging of singular values rather than arithmetic. If you want to imagine an ellipsoid, trace is proportional to the mean axis length, while det is more like the space inside the ellipsoid.

Author:
koeser

Reimplemented from BIAS::Matrix3x3< COVMATRIX3X3_TYPE >.

Definition at line 85 of file CovMatrix3x3.hh.

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Transpose ( const Matrix3x3< COVMATRIX3X3_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<COVMATRIX3X3_TYPE > BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< COVMATRIX3X3_TYPE >.

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::TransposedMult | ( | const Vector3< COVMATRIX3X3_TYPE > & | argvec,
 |  | Vector3< COVMATRIX3X3_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< COVMATRIX3X3_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

bool BIAS::CovMatrix3x3::_IsDecomposed [protected]

flag indicating whether the stored PCA is still valid

Definition at line 141 of file CovMatrix3x3.hh.

Referenced by _Decompose(), CovMatrix3x3(), GetPCA(), GetS(), and operator=().

Vector3<COVMATRIX3X3_TYPE> BIAS::CovMatrix3x3::_S [protected]

Definition at line 151 of file CovMatrix3x3.hh.

Referenced by _Decompose(), and operator=().

SVD BIAS::CovMatrix3x3::_svd [protected]

Definition at line 150 of file CovMatrix3x3.hh.

Referenced by _Decompose().

Matrix3x3<COVMATRIX3X3_TYPE> BIAS::CovMatrix3x3::_U [protected]

Definition at line 152 of file CovMatrix3x3.hh.

Referenced by _Decompose(), and operator=().

Matrix3x3<COVMATRIX3X3_TYPE> BIAS::CovMatrix3x3::_VT [protected]

Definition at line 152 of file CovMatrix3x3.hh.

Referenced by _Decompose(), and operator=().

Matrix3x3<COVMATRIX3X3_TYPE> BIAS::CovMatrix3x3::ConsistencyBackup_ [protected]

saves matrix fields to make consistency checks possible later

Definition at line 147 of file CovMatrix3x3.hh.

Referenced by _Decompose(), GetPCA(), GetS(), and operator=().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/CovMatrix3x3.hh
  • Geometry/CovMatrix3x3.cpp
Generated on Wed Jun 21 19:06:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CPDiscreteParam Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CPDiscreteParam

BIAS::CPDiscreteParam Struct Reference

#include <Geometry/ProjectionParametersIO.hh>

Detailed Description

Definition at line 49 of file ProjectionParametersIO.hh.

The documentation for this struct was generated from the following file:
  • Geometry/ProjectionParametersIO.hh
Generated on Wed Jun 21 19:06:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CScommBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CScommBase

BIAS::CScommBase Class Reference

this class CScomm (ClientServer communciation) handles data comunication via TCP/IP for one server and multiple clients. More...

#include <NetworkComm/CScommBase.hh>

Inheritance diagram for BIAS::CScommBase:

[legend]
Collaboration diagram for BIAS::CScommBase:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
CScommBase (const CScommBase &arg)
copy ctor required due to ostream member with explicit ctor JW
CScommBase (bool threaded=true)
Set threaded to false for deactivating the receive-thread.
bool | DebugLevelIsSet (long int lv) const
std::string | GetCommPartnerName (int commPartnerNr)
returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.
int | GetConnections ()
returns the number of connected commPartners
int | GetData (const std::string &msgName, std::vector< char > &binaryData)
returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.
int | GetData (const std::string &msgName, std::vector< std::string > &stringData)
int | GetData (const std::string &msgName, std::vector< int > &intData)
int | GetData (const std::string &msgName, std::vector< float > &floatData)
returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetThreadedReceive ()
CScommBase & | operator= (const CScommBase &arg)
assignment op. required due to ostream member with explicit ctor JW
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | RegisterMsg (std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1)
same as above, but the msg is only accepted from a specific commPartner
int | RegisterMsg (std::string msgName, EdataType dataType, int amount=1)
only registered msgs are accepted by commPartners Register a msg with this functions.
void | RemoveDebugLevel (long int lv)
int | SendMsg (int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as the index number of all connected partners
int | SendMsg (const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

int | SendMsg (const std::string &msgName, char *binaryData, unsigned int size)
maximum size for binary data is 15MB!
int | SendMsg (const std::string &msgName, std::vector< std::string > &stringData)
int | SendMsg (const std::string &msgName, std::vector< int > &intData)
int | SendMsg (const std::string &msgName, std::vector< float > &floatData)
sends msg msgName to all connected commPartners.
void | SetAutomaticPortChange (bool on)
if set on, the server will take automatically the next free TCP port for connections.
void | SetConnectionTimeOut (unsigned int time)
set the time in ms until a commPartner is assumed to be disconnected.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKeepAll (bool on)
If not threaded you can set this true to keep all received data.
void | SetLog (bool on)
gives a lot of information regarding the connections, like the exact data received and send.
void | SetLogOut (std::ostream &outputStream)
set the output of log msgs to another stream, e.g.
void | SetVerbose (bool on)
gives some information about establising conn, and disconnecting etc.
void | SetVerboseOut (std::ostream &outputStream)
set the output of verbose msgs to another stream, e.g.
int | WaitForNewMessage (std::string &msgName)
only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.
virtual | ~CScommBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AcceptConn_ (int fd)
int | AnalyzeData_ (int clientNr)
return values: 0 no error all fine
int | AnalyzeFirstMsg_ (int commNr)
int | CheckRegisteredMsgs_ (std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead)
int | GetData_ (const std::string &msgName)
void | logOutPut_ (const char *data, unsigned int size)
void | receiveThread_ (int clientNr)
int | SendMsg_ (const std::string &data)
void syncReceive_ ()

Protected Attributes

long int | _liDebugLevel
std::vector< CScommData > | commPartners_
int | commPartnersConnected_
int | connectPort_
bool | isServer_
bool | keepAll_
bool | log_
std::ostream | logOut_
std::vector< CScommMsg > | msgBuffer_
std::string | name_
bool | onlyNewMsgs_
bool | portChange_
std::vector< CScommMsg > | registeredMsgs_
pthread_mutex_t | registerLock_
bool | terminateReceiver_
bool | threaded_
unsigned int | timeOut_
bool | timeOutFlag_
bool | verbose_
std::ostream | verboseOut_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Attributes

std::map< std::string, int > | indexRegMsgs_
used by GetData stores the index to registeredMsgs_

Friends

void * | receivethread (void *data)
these are wrapper to comply to the pthread_create() interface

Detailed Description

this class CScomm (ClientServer communciation) handles data comunication via TCP/IP for one server and multiple clients.

It spawns threads itself for all communication. Messages can be registered by functions or within a file(not yet). See CScommClient or CScommServer for more details.

Author:
Daniel Grest, Jan 2004

Definition at line 74 of file CScommBase.hh.

Constructor & Destructor Documentation

CScommBase::~CScommBase ( ) [virtual]

Definition at line 51 of file CScommBase.cpp.

References commPartners_, terminateReceiver_, and threaded_.

CScommBase::CScommBase ( bool threaded = true )

Set threaded to false for deactivating the receive-thread.

Data will be read from TCP-buffer only when GetData methods are called. Threaded receive is activated by default! Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there is any new msg (this need not be the one GetData was called for, for example binary instead of int) if receive-buffer is completly filled, send blocks until msg can be delivered!

Definition at line 82 of file CScommBase.cpp.

References BIASERR, commPartners_, commPartnersConnected_, connectPort_, D_CS_DEFAULT_PORT, D_CS_MAXCLIENTS, keepAll_, log_, onlyNewMsgs_, portChange_, registeredMsgs_, registerLock_, terminateReceiver_, threaded_, timeOut_, timeOutFlag_, and verbose_.

CScommBase::CScommBase ( const CScommBase & arg )

copy ctor required due to ostream member with explicit ctor JW

Definition at line 120 of file CScommBase.cpp.

References BIASABORT, and BIASERR.

Member Function Documentation

int CScommBase::AcceptConn_ ( int fd ) [protected]

create a new receivethread

Definition at line 939 of file CScommBase.cpp.

References BIASDOUT, BIASERR, BIAS::CSCommWithClientNr::comm, BIAS::CSCommWithClientNr::commNr, commPartners_, commPartnersConnected_, D_CS_LISTENER, maxBinaryG, mygetpid, receivethread, and threaded_.

Referenced by BIAS::listenthread().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int CScommBase::AnalyzeData_ ( int clientNr ) [protected]

return values: 0 no error all fine

warnings: 1 not enough data to analyze (<3 bytes) 2 no data after msg name 3 more data read than registered for a msg 4 less data read than registered A warning is returned if one of the above cases was true for any one msg in the buffer.

errors: -1 only trash received

Definition at line 549 of file CScommBase.cpp.

References BIASDOUT, BIASERR, CheckRegisteredMsgs_(), commPartners_, BIAS::CS_BINARY, BIAS::CS_FLOAT, BIAS::CS_INT, BIAS::CS_NONE, BIAS::CS_STRING, D_CS_ANALYZE, keepAll_, BIAS::CScommData::lastProcessed, maxBinaryG, BIAS::CScommData::msgBuffer, mygetpid, BIAS::CScommData::name, registeredMsgs_, and threaded_.

Referenced by receiveThread_(), and syncReceive_().

int CScommBase::AnalyzeFirstMsg_ ( int commNr ) [protected]

Definition at line 739 of file CScommBase.cpp.

References BIASERR, commPartners_, and mygetpid.

Referenced by receiveThread_(), and syncReceive_().

int BIAS::CScommBase::CheckRegisteredMsgs_ | ( | std::string & | msgName,
 |  | const CScommData & | cPartner,
 |  | EdataType & | dataTypeToRead,
 |  | unsigned int & | dataSizeToRead
 | ) | [protected]

Referenced by AnalyzeData_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

std::string CScommBase::GetCommPartnerName ( int commPartnerNr )

returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.

Definition at line 998 of file CScommBase.cpp.

References commPartners_.

Referenced by SendMsg().

int BIAS::CScommBase::GetConnections ( ) [inline]

returns the number of connected commPartners

Definition at line 180 of file CScommBase.hh.

Referenced by BIAS::VideoServer::ProcessOneImage().

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< char > & | binaryData
 | ) |

returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) |

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) |

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) |

returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors

Referenced by BIAS::VideoSource_Net::GrabSingle(), and main().

int BIAS::CScommBase::GetData_ ( const std::string & msgName ) [protected]

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool BIAS::CScommBase::GetThreadedReceive ( ) [inline]

Definition at line 201 of file CScommBase.hh.

void CScommBase::logOutPut_ | ( | const char * | data,
 |  | unsigned int | size
 | ) | [protected]

Definition at line 781 of file CScommBase.cpp.

References logOut_, and mygetpid.

Referenced by receiveThread_(), and syncReceive_().

CScommBase & CScommBase::operator= ( const CScommBase & arg )

assignment op. required due to ostream member with explicit ctor JW

Definition at line 129 of file CScommBase.cpp.

References BIASABORT, and BIASERR.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void CScommBase::receiveThread_ ( int clientNr ) [protected]

Definition at line 789 of file CScommBase.cpp.

References AnalyzeData_(), AnalyzeFirstMsg_(), BIASDOUT, BIASERR, commPartners_, commPartnersConnected_, D_CS_RECEIVER, isServer_, logOut_, logOutPut_(), mygetpid, terminateReceiver_, timeOut_, verbose_, and verboseOut_.

Referenced by BIAS::receivethread().

int BIAS::CScommBase::RegisterMsg | ( | std::string | commPartnerName,
 |  | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) |

same as above, but the msg is only accepted from a specific commPartner

int BIAS::CScommBase::RegisterMsg | ( | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) |

only registered msgs are accepted by commPartners Register a msg with this functions.

Amount is the number of dataTypes for this msg, for binarydata this is not necessary
The msg will be bound to the first commPartner sending such a msg. And will be accepted only from him later.
All msgNames have to be unique!

return zero on success <0 on errors

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int CScommBase::SendMsg | ( | int | commPartnerNr,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) |

like above, but msg is only send to one specific commPartner given as the index number of all connected partners

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 462 of file CScommBase.cpp.

References BIASERR, commPartners_, logOut_, and mygetpid.

int CScommBase::SendMsg | ( | const std::string | commPartnerName,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) |

like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 450 of file CScommBase.cpp.

References commPartners_, GetCommPartnerName(), and SendMsg().

int CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) |

maximum size for binary data is 15MB!

Definition at line 417 of file CScommBase.cpp.

References BIASERR, commPartners_, logOut_, and mygetpid.

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) |

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) |

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) |

sends msg msgName to all connected commPartners.

Msg doesn't have to be registered on the sender side, but must be registered on the receiver side!

Referenced by main(), and SendMsg().

int BIAS::CScommBase::SendMsg_ ( const std::string & data ) [protected]

void BIAS::CScommBase::SetAutomaticPortChange ( bool on ) [inline]

if set on, the server will take automatically the next free TCP port for connections.

The client tries 10 consecutive different ports to conncect the server. Default is off. Useful if you don't care about port numbers and just want a connection somehow.

Definition at line 198 of file CScommBase.hh.

void BIAS::CScommBase::SetConnectionTimeOut ( unsigned int time ) [inline]

set the time in ms until a commPartner is assumed to be disconnected.

If time is zero there is no timeOut. default is no Time out

Definition at line 190 of file CScommBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::CScommBase::SetKeepAll ( bool on ) [inline]

If not threaded you can set this true to keep all received data.

Else a call of GetData() will deliver the newest msg only. Default is off. If threaded this is useless... (always off)

Definition at line 102 of file CScommBase.hh.

Referenced by BIAS::VideoSource_Net::VideoSource_Net().

void CScommBase::SetLog ( bool on )

gives a lot of information regarding the connections, like the exact data received and send.

Implies verbose.

Definition at line 979 of file CScommBase.cpp.

References verbose_.

Referenced by main().

void BIAS::CScommBase::SetLogOut ( std::ostream & outputStream )

set the output of log msgs to another stream, e.g.

to a file. Default ist cout.

void CScommBase::SetVerbose ( bool on )

gives some information about establising conn, and disconnecting etc.

Definition at line 989 of file CScommBase.cpp.

References verbose_.

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::CScommBase::SetVerboseOut ( std::ostream & outputStream )

set the output of verbose msgs to another stream, e.g.

to a file. Default ist cout.

void CScommBase::syncReceive_ ( ) [protected]

Definition at line 862 of file CScommBase.cpp.

References AnalyzeData_(), AnalyzeFirstMsg_(), BIASDOUT, BIASERR, commPartners_, commPartnersConnected_, D_CS_RECEIVER, isServer_, logOut_, logOutPut_(), mygetpid, verbose_, and verboseOut_.

int CScommBase::WaitForNewMessage ( std::string & msgName )

only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.

The msg name is returned in msgName.

The return value indicates how many additional new msgs are in the buffer slots, e.g. if 0 the msgName is the only new message.

Returns:
<0 if an error occured, >=0 the amount of new msgs in other slots.

Definition at line 282 of file CScommBase.cpp.

References BIASERR, registeredMsgs_, and threaded_.

Friends And Related Function Documentation

void* receivethread ( void * data ) [friend]

these are wrapper to comply to the pthread_create() interface

Definition at line 1007 of file CScommBase.cpp.

Referenced by AcceptConn_().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<CScommData> BIAS::CScommBase::commPartners_ [protected]

Definition at line 276 of file CScommBase.hh.

Referenced by AcceptConn_(), AnalyzeData_(), AnalyzeFirstMsg_(), CScommBase(), GetCommPartnerName(), receiveThread_(), SendMsg(), syncReceive_(), and ~CScommBase().

int BIAS::CScommBase::commPartnersConnected_ [protected]

Definition at line 278 of file CScommBase.hh.

Referenced by AcceptConn_(), CScommBase(), receiveThread_(), and syncReceive_().

int BIAS::CScommBase::connectPort_ [protected]

Definition at line 277 of file CScommBase.hh.

Referenced by BIAS::CScommServer::CreateListenThread_(), CScommBase(), BIAS::listenthread(), and BIAS::CScommServer::WaitForConnections().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::map<std::string, int> BIAS::CScommBase::indexRegMsgs_ [private]

used by GetData stores the index to registeredMsgs_

Definition at line 306 of file CScommBase.hh.

bool BIAS::CScommBase::isServer_ [protected]

Definition at line 282 of file CScommBase.hh.

Referenced by BIAS::CScommClient::CScommClient(), BIAS::CScommServer::CScommServer(), receiveThread_(), and syncReceive_().

bool BIAS::CScommBase::keepAll_ [protected]

Definition at line 287 of file CScommBase.hh.

Referenced by AnalyzeData_(), and CScommBase().

bool BIAS::CScommBase::log_ [protected]

Definition at line 289 of file CScommBase.hh.

Referenced by CScommBase().

std::ostream BIAS::CScommBase::logOut_ [protected]

Definition at line 290 of file CScommBase.hh.

Referenced by logOutPut_(), receiveThread_(), SendMsg(), and syncReceive_().

std::vector<CScommMsg> BIAS::CScommBase::msgBuffer_ [protected]

Definition at line 300 of file CScommBase.hh.

std::string BIAS::CScommBase::name_ [protected]

Definition at line 294 of file CScommBase.hh.

Referenced by BIAS::CScommClient::CScommClient().

bool BIAS::CScommBase::onlyNewMsgs_ [protected]

Definition at line 281 of file CScommBase.hh.

Referenced by CScommBase().

bool BIAS::CScommBase::portChange_ [protected]

Definition at line 285 of file CScommBase.hh.

Referenced by CScommBase(), and BIAS::listenthread().

std::vector<CScommMsg> BIAS::CScommBase::registeredMsgs_ [protected]

Definition at line 301 of file CScommBase.hh.

Referenced by AnalyzeData_(), CScommBase(), and WaitForNewMessage().

pthread_mutex_t BIAS::CScommBase::registerLock_ [protected]

Definition at line 298 of file CScommBase.hh.

Referenced by CScommBase().

bool BIAS::CScommBase::terminateReceiver_ [protected]

Definition at line 297 of file CScommBase.hh.

Referenced by CScommBase(), receiveThread_(), and ~CScommBase().

bool BIAS::CScommBase::threaded_ [protected]

Definition at line 286 of file CScommBase.hh.

Referenced by AcceptConn_(), AnalyzeData_(), CScommBase(), WaitForNewMessage(), and ~CScommBase().

unsigned int BIAS::CScommBase::timeOut_ [protected]

Definition at line 295 of file CScommBase.hh.

Referenced by CScommBase(), and receiveThread_().

bool BIAS::CScommBase::timeOutFlag_ [protected]

Definition at line 296 of file CScommBase.hh.

Referenced by CScommBase().

bool BIAS::CScommBase::verbose_ [protected]

Definition at line 291 of file CScommBase.hh.

Referenced by CScommBase(), BIAS::listenthread(), receiveThread_(), SetLog(), SetVerbose(), and syncReceive_().

std::ostream BIAS::CScommBase::verboseOut_ [protected]

Definition at line 292 of file CScommBase.hh.

Referenced by BIAS::listenthread(), receiveThread_(), and syncReceive_().

The documentation for this class was generated from the following files:
  • NetworkComm/CScommBase.hh
  • NetworkComm/CScommBase.cpp
Generated on Wed Jun 21 19:06:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CScommClient Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CScommClient

BIAS::CScommClient Class Reference

class for sending/receiving data between clients and servers More...

#include <NetworkComm/CScommClient.hh>

Inheritance diagram for BIAS::CScommClient:

[legend]
Collaboration diagram for BIAS::CScommClient:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | ConnectServer (std::string serverName, unsigned int port=D_CS_DEFAULT_PORT, unsigned int timeOut=20000)
for a client: tries to connect to server with hostname serverName.
CScommClient (bool threaded=true)
Set threaded to false for deactivating the receive-thread.
bool | DebugLevelIsSet (long int lv) const
std::string | GetCommPartnerName (int commPartnerNr)
returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.
int | GetConnections ()
returns the number of connected commPartners
int | GetData (const std::string &msgName, std::vector< char > &binaryData)
returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.
int | GetData (const std::string &msgName, std::vector< std::string > &stringData)
int | GetData (const std::string &msgName, std::vector< int > &intData)
int | GetData (const std::string &msgName, std::vector< float > &floatData)
returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetThreadedReceive ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | RegisterMsg (std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1)
same as above, but the msg is only accepted from a specific commPartner
int | RegisterMsg (std::string msgName, EdataType dataType, int amount=1)
only registered msgs are accepted by commPartners Register a msg with this functions.
void | RemoveDebugLevel (long int lv)
int | SendMsg (int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as the index number of all connected partners
int | SendMsg (const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

int | SendMsg (const std::string &msgName, char *binaryData, unsigned int size)
maximum size for binary data is 15MB!
int | SendMsg (const std::string &msgName, std::vector< std::string > &stringData)
int | SendMsg (const std::string &msgName, std::vector< int > &intData)
int | SendMsg (const std::string &msgName, std::vector< float > &floatData)
sends msg msgName to all connected commPartners.
void | SetAutomaticPortChange (bool on)
if set on, the server will take automatically the next free TCP port for connections.
void | SetConnectionTimeOut (unsigned int time)
set the time in ms until a commPartner is assumed to be disconnected.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKeepAll (bool on)
If not threaded you can set this true to keep all received data.
void | SetLog (bool on)
gives a lot of information regarding the connections, like the exact data received and send.
void | SetLogOut (std::ostream &outputStream)
set the output of log msgs to another stream, e.g.
void | SetName (std::string clientName)
give the client a name, default ist $HOSTNAME
void | SetVerbose (bool on)
gives some information about establising conn, and disconnecting etc.
void | SetVerboseOut (std::ostream &outputStream)
set the output of verbose msgs to another stream, e.g.
int | WaitForNewMessage (std::string &msgName)
only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.
~CScommClient ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AcceptConn_ (int fd)
int | AnalyzeData_ (int clientNr)
return values: 0 no error all fine
int | AnalyzeFirstMsg_ (int commNr)
int | CheckRegisteredMsgs_ (std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead)
int | GetData_ (const std::string &msgName)
void | logOutPut_ (const char *data, unsigned int size)
void | receiveThread_ (int clientNr)
int | SendMsg_ (const std::string &data)
void syncReceive_ ()

Protected Attributes

long int | _liDebugLevel
std::vector< CScommData > | commPartners_
int | commPartnersConnected_
int | connectPort_
bool | isServer_
bool | keepAll_
bool | log_
std::ostream | logOut_
std::vector< CScommMsg > | msgBuffer_
std::string | name_
bool | onlyNewMsgs_
bool | portChange_
std::vector< CScommMsg > | registeredMsgs_
pthread_mutex_t | registerLock_
bool | terminateReceiver_
bool | threaded_
unsigned int | timeOut_
bool | timeOutFlag_
bool | verbose_
std::ostream | verboseOut_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

void * | receivethread (void *data)
these are wrapper to comply to the pthread_create() interface

Detailed Description

class for sending/receiving data between clients and servers

Only registered msgs will be accepted at the server side, similar the client will accept only registered msgs from the server too. The client needs to know the hostname of the server. Usage:

  1. Konstruktor: CScommClient client;

  1. Register msgs: client.RegisterMsg(msgName, BIAS::CS_FLOAT, 3);

  1. connect server: client.ConnectServer("visu1");

  1. send and/or get Data: client.SendMsg(msgName,vecOfFloats);
    client.GetData(msgName, newVecOffloats);

See the examples also.

Author:
Daniel Grest, Jan. 2004

Definition at line 52 of file CScommClient.hh.

Constructor & Destructor Documentation

CScommClient::CScommClient ( bool threaded = true )

Set threaded to false for deactivating the receive-thread.

Data will be read from TCP-buffer only when GetData methods are called. Threaded receive is activated by default! Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there is any new msg (this need not be the one GetData was called for, for example binary instead of int) if receive-buffer is completly filled, send blocks until msg can be delivered!

Definition at line 50 of file CScommClient.cpp.

References BIAS::CScommBase::isServer_, and BIAS::CScommBase::name_.

BIAS::CScommClient::~CScommClient ( ) [inline]

Definition at line 65 of file CScommClient.hh.

Member Function Documentation

int CScommBase::AcceptConn_ ( int fd ) [protected, inherited]

create a new receivethread

Definition at line 939 of file CScommBase.cpp.

References BIASDOUT, BIASERR, BIAS::CSCommWithClientNr::comm, BIAS::CSCommWithClientNr::commNr, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_LISTENER, maxBinaryG, mygetpid, BIAS::CScommBase::receivethread, and BIAS::CScommBase::threaded_.

Referenced by BIAS::listenthread().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int CScommBase::AnalyzeData_ ( int clientNr ) [protected, inherited]

return values: 0 no error all fine

warnings: 1 not enough data to analyze (<3 bytes) 2 no data after msg name 3 more data read than registered for a msg 4 less data read than registered A warning is returned if one of the above cases was true for any one msg in the buffer.

errors: -1 only trash received

Definition at line 549 of file CScommBase.cpp.

References BIASDOUT, BIASERR, BIAS::CScommBase::CheckRegisteredMsgs_(), BIAS::CScommBase::commPartners_, BIAS::CS_BINARY, BIAS::CS_FLOAT, BIAS::CS_INT, BIAS::CS_NONE, BIAS::CS_STRING, D_CS_ANALYZE, BIAS::CScommBase::keepAll_, BIAS::CScommData::lastProcessed, maxBinaryG, BIAS::CScommData::msgBuffer, mygetpid, BIAS::CScommData::name, BIAS::CScommBase::registeredMsgs_, and BIAS::CScommBase::threaded_.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int CScommBase::AnalyzeFirstMsg_ ( int commNr ) [protected, inherited]

Definition at line 739 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, and mygetpid.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int BIAS::CScommBase::CheckRegisteredMsgs_ | ( | std::string & | msgName,
 |  | const CScommData & | cPartner,
 |  | EdataType & | dataTypeToRead,
 |  | unsigned int & | dataSizeToRead
 | ) | [protected, inherited]

Referenced by BIAS::CScommBase::AnalyzeData_().

int BIAS::CScommClient::ConnectServer | ( | std::string | serverName,
 |  | unsigned int | port = D_CS_DEFAULT_PORT,
 |  | unsigned int | timeOut = 20000
 | ) |

for a client: tries to connect to server with hostname serverName.

Parameters:
timeOut | in ms
serverName | hostName of the server as ip or name
Returns:
0 on success, -1 on timeOut, < -1 on other errors

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

std::string CScommBase::GetCommPartnerName ( int commPartnerNr ) [inherited]

returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.

Definition at line 998 of file CScommBase.cpp.

References BIAS::CScommBase::commPartners_.

Referenced by BIAS::CScommBase::SendMsg().

int BIAS::CScommBase::GetConnections ( ) [inline, inherited]

returns the number of connected commPartners

Definition at line 180 of file CScommBase.hh.

Referenced by BIAS::VideoServer::ProcessOneImage().

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< char > & | binaryData
 | ) | [inherited]

returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) | [inherited]

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) | [inherited]

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) | [inherited]

returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors

Referenced by BIAS::VideoSource_Net::GrabSingle(), and main().

int BIAS::CScommBase::GetData_ ( const std::string & msgName ) [protected, inherited]

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool BIAS::CScommBase::GetThreadedReceive ( ) [inline, inherited]

Definition at line 201 of file CScommBase.hh.

void CScommBase::logOutPut_ | ( | const char * | data,
 |  | unsigned int | size
 | ) | [protected, inherited]

Definition at line 781 of file CScommBase.cpp.

References BIAS::CScommBase::logOut_, and mygetpid.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void CScommBase::receiveThread_ ( int clientNr ) [protected, inherited]

Definition at line 789 of file CScommBase.cpp.

References BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIASDOUT, BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_RECEIVER, BIAS::CScommBase::isServer_, BIAS::CScommBase::logOut_, BIAS::CScommBase::logOutPut_(), mygetpid, BIAS::CScommBase::terminateReceiver_, BIAS::CScommBase::timeOut_, BIAS::CScommBase::verbose_, and BIAS::CScommBase::verboseOut_.

Referenced by BIAS::receivethread().

int BIAS::CScommBase::RegisterMsg | ( | std::string | commPartnerName,
 |  | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) | [inherited]

same as above, but the msg is only accepted from a specific commPartner

int BIAS::CScommBase::RegisterMsg | ( | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) | [inherited]

only registered msgs are accepted by commPartners Register a msg with this functions.

Amount is the number of dataTypes for this msg, for binarydata this is not necessary
The msg will be bound to the first commPartner sending such a msg. And will be accepted only from him later.
All msgNames have to be unique!

return zero on success <0 on errors

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int CScommBase::SendMsg | ( | int | commPartnerNr,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

like above, but msg is only send to one specific commPartner given as the index number of all connected partners

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 462 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::logOut_, and mygetpid.

int CScommBase::SendMsg | ( | const std::string | commPartnerName,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 450 of file CScommBase.cpp.

References BIAS::CScommBase::commPartners_, BIAS::CScommBase::GetCommPartnerName(), and BIAS::CScommBase::SendMsg().

int CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

maximum size for binary data is 15MB!

Definition at line 417 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::logOut_, and mygetpid.

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) | [inherited]

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) | [inherited]

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) | [inherited]

sends msg msgName to all connected commPartners.

Msg doesn't have to be registered on the sender side, but must be registered on the receiver side!

Referenced by main(), and BIAS::CScommBase::SendMsg().

int BIAS::CScommBase::SendMsg_ ( const std::string & data ) [protected, inherited]

void BIAS::CScommBase::SetAutomaticPortChange ( bool on ) [inline, inherited]

if set on, the server will take automatically the next free TCP port for connections.

The client tries 10 consecutive different ports to conncect the server. Default is off. Useful if you don't care about port numbers and just want a connection somehow.

Definition at line 198 of file CScommBase.hh.

void BIAS::CScommBase::SetConnectionTimeOut ( unsigned int time ) [inline, inherited]

set the time in ms until a commPartner is assumed to be disconnected.

If time is zero there is no timeOut. default is no Time out

Definition at line 190 of file CScommBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::CScommBase::SetKeepAll ( bool on ) [inline, inherited]

If not threaded you can set this true to keep all received data.

Else a call of GetData() will deliver the newest msg only. Default is off. If threaded this is useless... (always off)

Definition at line 102 of file CScommBase.hh.

Referenced by BIAS::VideoSource_Net::VideoSource_Net().

void CScommBase::SetLog ( bool on ) [inherited]

gives a lot of information regarding the connections, like the exact data received and send.

Implies verbose.

Definition at line 979 of file CScommBase.cpp.

References BIAS::CScommBase::verbose_.

Referenced by main().

void BIAS::CScommBase::SetLogOut ( std::ostream & outputStream ) [inherited]

set the output of log msgs to another stream, e.g.

to a file. Default ist cout.

void BIAS::CScommClient::SetName ( std::string clientName ) [inline]

give the client a name, default ist $HOSTNAME

Definition at line 69 of file CScommClient.hh.

Referenced by main().

void CScommBase::SetVerbose ( bool on ) [inherited]

gives some information about establising conn, and disconnecting etc.

Definition at line 989 of file CScommBase.cpp.

References BIAS::CScommBase::verbose_.

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::CScommBase::SetVerboseOut ( std::ostream & outputStream ) [inherited]

set the output of verbose msgs to another stream, e.g.

to a file. Default ist cout.

void CScommBase::syncReceive_ ( ) [protected, inherited]

Definition at line 862 of file CScommBase.cpp.

References BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIASDOUT, BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_RECEIVER, BIAS::CScommBase::isServer_, BIAS::CScommBase::logOut_, BIAS::CScommBase::logOutPut_(), mygetpid, BIAS::CScommBase::verbose_, and BIAS::CScommBase::verboseOut_.

int CScommBase::WaitForNewMessage ( std::string & msgName ) [inherited]

only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.

The msg name is returned in msgName.

The return value indicates how many additional new msgs are in the buffer slots, e.g. if 0 the msgName is the only new message.

Returns:
<0 if an error occured, >=0 the amount of new msgs in other slots.

Definition at line 282 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::registeredMsgs_, and BIAS::CScommBase::threaded_.

Friends And Related Function Documentation

void* receivethread ( void * data ) [friend, inherited]

these are wrapper to comply to the pthread_create() interface

Definition at line 1007 of file CScommBase.cpp.

Referenced by BIAS::CScommBase::AcceptConn_().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<CScommData> BIAS::CScommBase::commPartners_ [protected, inherited]

Definition at line 276 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::GetCommPartnerName(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SendMsg(), BIAS::CScommBase::syncReceive_(), and BIAS::CScommBase::~CScommBase().

int BIAS::CScommBase::commPartnersConnected_ [protected, inherited]

Definition at line 278 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int BIAS::CScommBase::connectPort_ [protected, inherited]

Definition at line 277 of file CScommBase.hh.

Referenced by BIAS::CScommServer::CreateListenThread_(), BIAS::CScommBase::CScommBase(), BIAS::listenthread(), and BIAS::CScommServer::WaitForConnections().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::CScommBase::isServer_ [protected, inherited]

Definition at line 282 of file CScommBase.hh.

Referenced by CScommClient(), BIAS::CScommServer::CScommServer(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

bool BIAS::CScommBase::keepAll_ [protected, inherited]

Definition at line 287 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AnalyzeData_(), and BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::log_ [protected, inherited]

Definition at line 289 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

std::ostream BIAS::CScommBase::logOut_ [protected, inherited]

Definition at line 290 of file CScommBase.hh.

Referenced by BIAS::CScommBase::logOutPut_(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SendMsg(), and BIAS::CScommBase::syncReceive_().

std::vector<CScommMsg> BIAS::CScommBase::msgBuffer_ [protected, inherited]

Definition at line 300 of file CScommBase.hh.

std::string BIAS::CScommBase::name_ [protected, inherited]

Definition at line 294 of file CScommBase.hh.

Referenced by CScommClient().

bool BIAS::CScommBase::onlyNewMsgs_ [protected, inherited]

Definition at line 281 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::portChange_ [protected, inherited]

Definition at line 285 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), and BIAS::listenthread().

std::vector<CScommMsg> BIAS::CScommBase::registeredMsgs_ [protected, inherited]

Definition at line 301 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::CScommBase(), and BIAS::CScommBase::WaitForNewMessage().

pthread_mutex_t BIAS::CScommBase::registerLock_ [protected, inherited]

Definition at line 298 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::terminateReceiver_ [protected, inherited]

Definition at line 297 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::~CScommBase().

bool BIAS::CScommBase::threaded_ [protected, inherited]

Definition at line 286 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::WaitForNewMessage(), and BIAS::CScommBase::~CScommBase().

unsigned int BIAS::CScommBase::timeOut_ [protected, inherited]

Definition at line 295 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), and BIAS::CScommBase::receiveThread_().

bool BIAS::CScommBase::timeOutFlag_ [protected, inherited]

Definition at line 296 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::verbose_ [protected, inherited]

Definition at line 291 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), BIAS::listenthread(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SetLog(), BIAS::CScommBase::SetVerbose(), and BIAS::CScommBase::syncReceive_().

std::ostream BIAS::CScommBase::verboseOut_ [protected, inherited]

Definition at line 292 of file CScommBase.hh.

Referenced by BIAS::listenthread(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

The documentation for this class was generated from the following files:
  • NetworkComm/CScommClient.hh
  • NetworkComm/CScommClient.cpp
Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CScommData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CScommData

BIAS::CScommData Class Reference

#include <NetworkComm/CScommClasses.hh>

Collaboration diagram for BIAS::CScommData:

[legend]
List of all members.

Public Member Functions

CScommData ()
~CScommData ()

Public Attributes

bool | connected
int | fd
bool | firstcontact
unsigned int | lastProcessed
std::vector< char > | msgBuffer
std::string | name
pthread_t | threadid

Detailed Description

Definition at line 61 of file CScommClasses.hh.

Constructor & Destructor Documentation

BIAS::CScommData::CScommData ( ) [inline]

Definition at line 64 of file CScommClasses.hh.

BIAS::CScommData::~CScommData ( ) [inline]

Definition at line 66 of file CScommClasses.hh.

Member Data Documentation

bool BIAS::CScommData::connected

Definition at line 70 of file CScommClasses.hh.

int BIAS::CScommData::fd

Definition at line 71 of file CScommClasses.hh.

bool BIAS::CScommData::firstcontact

Definition at line 72 of file CScommClasses.hh.

unsigned int BIAS::CScommData::lastProcessed

Definition at line 74 of file CScommClasses.hh.

Referenced by BIAS::CScommBase::AnalyzeData_().

std::vector<char> BIAS::CScommData::msgBuffer

Definition at line 73 of file CScommClasses.hh.

Referenced by BIAS::CScommBase::AnalyzeData_().

std::string BIAS::CScommData::name

Definition at line 66 of file CScommClasses.hh.

Referenced by BIAS::CScommBase::AnalyzeData_().

pthread_t BIAS::CScommData::threadid

Definition at line 69 of file CScommClasses.hh.

The documentation for this class was generated from the following file:
  • NetworkComm/CScommClasses.hh
Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CScommMsg Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CScommMsg

BIAS::CScommMsg Class Reference

helper classes for CScommBase More...

#include <NetworkComm/CScommClasses.hh>

Collaboration diagram for BIAS::CScommMsg:

[legend]
List of all members.

Public Member Functions

CScommMsg ()

Public Attributes

char * | binaryData
unsigned int | binaryDataSize
std::string | commName
pthread_mutex_t | dataLock
unsigned int | dataSize
EdataType dataType
std::vector< float > | floatData
std::vector< int > | intData
std::string | msgName
bool | newData
bool | server
std::vector< std::string > | stringData

Detailed Description

helper classes for CScommBase

Definition at line 40 of file CScommClasses.hh.

Constructor & Destructor Documentation

BIAS::CScommMsg::CScommMsg ( ) [inline]

Definition at line 42 of file CScommClasses.hh.

Member Data Documentation

char* BIAS::CScommMsg::binaryData

Definition at line 57 of file CScommClasses.hh.

unsigned int BIAS::CScommMsg::binaryDataSize

Definition at line 58 of file CScommClasses.hh.

std::string BIAS::CScommMsg::commName

Definition at line 44 of file CScommClasses.hh.

pthread_mutex_t BIAS::CScommMsg::dataLock

Definition at line 49 of file CScommClasses.hh.

unsigned int BIAS::CScommMsg::dataSize

Definition at line 47 of file CScommClasses.hh.

EdataType BIAS::CScommMsg::dataType

Definition at line 46 of file CScommClasses.hh.

std::vector<float> BIAS::CScommMsg::floatData

Definition at line 54 of file CScommClasses.hh.

std::vector<int> BIAS::CScommMsg::intData

Definition at line 55 of file CScommClasses.hh.

std::string BIAS::CScommMsg::msgName

Definition at line 43 of file CScommClasses.hh.

bool BIAS::CScommMsg::newData

Definition at line 48 of file CScommClasses.hh.

bool BIAS::CScommMsg::server

Definition at line 45 of file CScommClasses.hh.

std::vector<std::string> BIAS::CScommMsg::stringData

Definition at line 56 of file CScommClasses.hh.

The documentation for this class was generated from the following file:
  • NetworkComm/CScommClasses.hh
Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CScommServer Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CScommServer

BIAS::CScommServer Class Reference

class for sending/receiving data between clients and servers More...

#include <NetworkComm/CScommServer.hh>

Inheritance diagram for BIAS::CScommServer:

[legend]
Collaboration diagram for BIAS::CScommServer:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
CScommServer (bool threaded=true)
Set threaded to false for deactivating the receive-thread.
bool | DebugLevelIsSet (long int lv) const
std::string | GetCommPartnerName (int commPartnerNr)
returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.
int | GetConnections ()
returns the number of connected commPartners
int | GetData (const std::string &msgName, std::vector< char > &binaryData)
returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.
int | GetData (const std::string &msgName, std::vector< std::string > &stringData)
int | GetData (const std::string &msgName, std::vector< int > &intData)
int | GetData (const std::string &msgName, std::vector< float > &floatData)
returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetThreadedReceive ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | RegisterMsg (std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1)
same as above, but the msg is only accepted from a specific commPartner
int | RegisterMsg (std::string msgName, EdataType dataType, int amount=1)
only registered msgs are accepted by commPartners Register a msg with this functions.
void | RemoveDebugLevel (long int lv)
int | SendMsg (int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as the index number of all connected partners
int | SendMsg (const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size)
like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

int | SendMsg (const std::string &msgName, char *binaryData, unsigned int size)
maximum size for binary data is 15MB!
int | SendMsg (const std::string &msgName, std::vector< std::string > &stringData)
int | SendMsg (const std::string &msgName, std::vector< int > &intData)
int | SendMsg (const std::string &msgName, std::vector< float > &floatData)
sends msg msgName to all connected commPartners.
void | SetAutomaticPortChange (bool on)
if set on, the server will take automatically the next free TCP port for connections.
void | SetConnectionTimeOut (unsigned int time)
set the time in ms until a commPartner is assumed to be disconnected.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKeepAll (bool on)
If not threaded you can set this true to keep all received data.
void | SetLog (bool on)
gives a lot of information regarding the connections, like the exact data received and send.
void | SetLogOut (std::ostream &outputStream)
set the output of log msgs to another stream, e.g.
void | SetVerbose (bool on)
gives some information about establising conn, and disconnecting etc.
void | SetVerboseOut (std::ostream &outputStream)
set the output of verbose msgs to another stream, e.g.
void | WaitForConnections (unsigned int port=D_CS_DEFAULT_PORT)
Init function, returns instantly and enables the server to accept connections on the given port.
int | WaitForNewMessage (std::string &msgName)
only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.
~CScommServer ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AcceptConn_ (int fd)
int | AnalyzeData_ (int clientNr)
return values: 0 no error all fine
int | AnalyzeFirstMsg_ (int commNr)
int | CheckRegisteredMsgs_ (std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead)
void CreateListenThread_ ()
int | GetData_ (const std::string &msgName)
void | logOutPut_ (const char *data, unsigned int size)
void | receiveThread_ (int clientNr)
int | SendMsg_ (const std::string &data)
void syncReceive_ ()

Protected Attributes

long int | _liDebugLevel
std::vector< CScommData > | commPartners_
int | commPartnersConnected_
int | connectPort_
bool | isServer_
bool | keepAll_
bool | listenThreadActive_
bool | log_
std::ostream | logOut_
std::vector< CScommMsg > | msgBuffer_
std::string | name_
bool | onlyNewMsgs_
bool | portChange_
pthread_t | pthreadListener_
std::vector< CScommMsg > | registeredMsgs_
pthread_mutex_t | registerLock_
bool | terminateListener_
bool | terminateReceiver_
bool | threaded_
unsigned int | timeOut_
bool | timeOutFlag_
bool | verbose_
std::ostream | verboseOut_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

void * | listenthread (void *data)
these are wrapper to comply to the pthread_create() interface
void * | receivethread (void *data)
these are wrapper to comply to the pthread_create() interface

Detailed Description

class for sending/receiving data between clients and servers

Only registered msgs will be accepted at the server side, similar the client will accept only registered msgs from the server too. The server waits on a DEFUALT_PORT for connections from clients, which need to know the hostname of the server. Usage:

  1. Konstruktor: CScommServer Server;

  1. Register msgs: Server.RegisterMsg(msgName, BIAS::CS_FLOAT, 3);

  1. Enable receiver: Server.WaitForConnections();

  1. send and/or get Data: Server.SendMsg(msgName,vecOfFloats);
    Server.GetData(msgName, newVecOffloats);

See the examples also.

Author:
Daniel Grest, Jan. 2004

Definition at line 54 of file CScommServer.hh.

Constructor & Destructor Documentation

CScommServer::CScommServer ( bool threaded = true )

Set threaded to false for deactivating the receive-thread.

Data will be read from TCP-buffer only when GetData methods are called. Threaded receive is activated by default! Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there is any new msg (this need not be the one GetData was called for, for example binary instead of int) if receive-buffer is completly filled, send blocks until msg can be delivered!

Definition at line 50 of file CScommServer.cpp.

References BIAS::CScommBase::isServer_, listenThreadActive_, and terminateListener_.

CScommServer::~CScommServer ( )

Definition at line 58 of file CScommServer.cpp.

References listenThreadActive_, and terminateListener_.

Member Function Documentation

int CScommBase::AcceptConn_ ( int fd ) [protected, inherited]

create a new receivethread

Definition at line 939 of file CScommBase.cpp.

References BIASDOUT, BIASERR, BIAS::CSCommWithClientNr::comm, BIAS::CSCommWithClientNr::commNr, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_LISTENER, maxBinaryG, mygetpid, BIAS::CScommBase::receivethread, and BIAS::CScommBase::threaded_.

Referenced by BIAS::listenthread().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int CScommBase::AnalyzeData_ ( int clientNr ) [protected, inherited]

return values: 0 no error all fine

warnings: 1 not enough data to analyze (<3 bytes) 2 no data after msg name 3 more data read than registered for a msg 4 less data read than registered A warning is returned if one of the above cases was true for any one msg in the buffer.

errors: -1 only trash received

Definition at line 549 of file CScommBase.cpp.

References BIASDOUT, BIASERR, BIAS::CScommBase::CheckRegisteredMsgs_(), BIAS::CScommBase::commPartners_, BIAS::CS_BINARY, BIAS::CS_FLOAT, BIAS::CS_INT, BIAS::CS_NONE, BIAS::CS_STRING, D_CS_ANALYZE, BIAS::CScommBase::keepAll_, BIAS::CScommData::lastProcessed, maxBinaryG, BIAS::CScommData::msgBuffer, mygetpid, BIAS::CScommData::name, BIAS::CScommBase::registeredMsgs_, and BIAS::CScommBase::threaded_.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int CScommBase::AnalyzeFirstMsg_ ( int commNr ) [protected, inherited]

Definition at line 739 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, and mygetpid.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int BIAS::CScommBase::CheckRegisteredMsgs_ | ( | std::string & | msgName,
 |  | const CScommData & | cPartner,
 |  | EdataType & | dataTypeToRead,
 |  | unsigned int & | dataSizeToRead
 | ) | [protected, inherited]

Referenced by BIAS::CScommBase::AnalyzeData_().

void CScommServer::CreateListenThread_ ( ) [protected]

Definition at line 67 of file CScommServer.cpp.

References BIASDOUT, BIASERR, BIAS::CScommBase::connectPort_, D_CS_LISTENER, listenthread, listenThreadActive_, mygetpid, pthreadListener_, res, and terminateListener_.

Referenced by WaitForConnections().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

std::string CScommBase::GetCommPartnerName ( int commPartnerNr ) [inherited]

returns the name of the commPartner with nr commPartnerNr or empty string in case of a number, that is to high.

Definition at line 998 of file CScommBase.cpp.

References BIAS::CScommBase::commPartners_.

Referenced by BIAS::CScommBase::SendMsg().

int BIAS::CScommBase::GetConnections ( ) [inline, inherited]

returns the number of connected commPartners

Definition at line 180 of file CScommBase.hh.

Referenced by BIAS::VideoServer::ProcessOneImage().

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< char > & | binaryData
 | ) | [inherited]

returns the binarydata in the vector, its wise to reserve enough bytes, if the size is known.

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) | [inherited]

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) | [inherited]

int BIAS::CScommBase::GetData | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) | [inherited]

returns instantly:
0 if new data has arrived and the data in xxxData
1 if no new data has arrived, the data in xxxData stays unchanged
-1 in case of errors

Referenced by BIAS::VideoSource_Net::GrabSingle(), and main().

int BIAS::CScommBase::GetData_ ( const std::string & msgName ) [protected, inherited]

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool BIAS::CScommBase::GetThreadedReceive ( ) [inline, inherited]

Definition at line 201 of file CScommBase.hh.

void CScommBase::logOutPut_ | ( | const char * | data,
 |  | unsigned int | size
 | ) | [protected, inherited]

Definition at line 781 of file CScommBase.cpp.

References BIAS::CScommBase::logOut_, and mygetpid.

Referenced by BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void CScommBase::receiveThread_ ( int clientNr ) [protected, inherited]

Definition at line 789 of file CScommBase.cpp.

References BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIASDOUT, BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_RECEIVER, BIAS::CScommBase::isServer_, BIAS::CScommBase::logOut_, BIAS::CScommBase::logOutPut_(), mygetpid, BIAS::CScommBase::terminateReceiver_, BIAS::CScommBase::timeOut_, BIAS::CScommBase::verbose_, and BIAS::CScommBase::verboseOut_.

Referenced by BIAS::receivethread().

int BIAS::CScommBase::RegisterMsg | ( | std::string | commPartnerName,
 |  | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) | [inherited]

same as above, but the msg is only accepted from a specific commPartner

int BIAS::CScommBase::RegisterMsg | ( | std::string | msgName,
 |  | EdataType | dataType,
 |  | int | amount = 1
 | ) | [inherited]

only registered msgs are accepted by commPartners Register a msg with this functions.

Amount is the number of dataTypes for this msg, for binarydata this is not necessary
The msg will be bound to the first commPartner sending such a msg. And will be accepted only from him later.
All msgNames have to be unique!

return zero on success <0 on errors

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int CScommBase::SendMsg | ( | int | commPartnerNr,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

like above, but msg is only send to one specific commPartner given as the index number of all connected partners

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 462 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::logOut_, and mygetpid.

int CScommBase::SendMsg | ( | const std::string | commPartnerName,
 |  | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

like above, but msg is only send to one specific commPartner given as string, which must equal the name given by the client to itself

Returns:
-2 if no such commPartner, 0 in case of no error

Definition at line 450 of file CScommBase.cpp.

References BIAS::CScommBase::commPartners_, BIAS::CScommBase::GetCommPartnerName(), and BIAS::CScommBase::SendMsg().

int CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | char * | binaryData,
 |  | unsigned int | size
 | ) | [inherited]

maximum size for binary data is 15MB!

Definition at line 417 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::logOut_, and mygetpid.

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< std::string > & | stringData
 | ) | [inherited]

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< int > & | intData
 | ) | [inherited]

int BIAS::CScommBase::SendMsg | ( | const std::string & | msgName,
 |  | std::vector< float > & | floatData
 | ) | [inherited]

sends msg msgName to all connected commPartners.

Msg doesn't have to be registered on the sender side, but must be registered on the receiver side!

Referenced by main(), and BIAS::CScommBase::SendMsg().

int BIAS::CScommBase::SendMsg_ ( const std::string & data ) [protected, inherited]

void BIAS::CScommBase::SetAutomaticPortChange ( bool on ) [inline, inherited]

if set on, the server will take automatically the next free TCP port for connections.

The client tries 10 consecutive different ports to conncect the server. Default is off. Useful if you don't care about port numbers and just want a connection somehow.

Definition at line 198 of file CScommBase.hh.

void BIAS::CScommBase::SetConnectionTimeOut ( unsigned int time ) [inline, inherited]

set the time in ms until a commPartner is assumed to be disconnected.

If time is zero there is no timeOut. default is no Time out

Definition at line 190 of file CScommBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::CScommBase::SetKeepAll ( bool on ) [inline, inherited]

If not threaded you can set this true to keep all received data.

Else a call of GetData() will deliver the newest msg only. Default is off. If threaded this is useless... (always off)

Definition at line 102 of file CScommBase.hh.

Referenced by BIAS::VideoSource_Net::VideoSource_Net().

void CScommBase::SetLog ( bool on ) [inherited]

gives a lot of information regarding the connections, like the exact data received and send.

Implies verbose.

Definition at line 979 of file CScommBase.cpp.

References BIAS::CScommBase::verbose_.

Referenced by main().

void BIAS::CScommBase::SetLogOut ( std::ostream & outputStream ) [inherited]

set the output of log msgs to another stream, e.g.

to a file. Default ist cout.

void CScommBase::SetVerbose ( bool on ) [inherited]

gives some information about establising conn, and disconnecting etc.

Definition at line 989 of file CScommBase.cpp.

References BIAS::CScommBase::verbose_.

Referenced by main(), and BIAS::VideoSource_Net::OpenDevice().

void BIAS::CScommBase::SetVerboseOut ( std::ostream & outputStream ) [inherited]

set the output of verbose msgs to another stream, e.g.

to a file. Default ist cout.

void CScommBase::syncReceive_ ( ) [protected, inherited]

Definition at line 862 of file CScommBase.cpp.

References BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIASDOUT, BIASERR, BIAS::CScommBase::commPartners_, BIAS::CScommBase::commPartnersConnected_, D_CS_RECEIVER, BIAS::CScommBase::isServer_, BIAS::CScommBase::logOut_, BIAS::CScommBase::logOutPut_(), mygetpid, BIAS::CScommBase::verbose_, and BIAS::CScommBase::verboseOut_.

void CScommServer::WaitForConnections ( unsigned int port = D_CS_DEFAULT_PORT )

Init function, returns instantly and enables the server to accept connections on the given port.

Definition at line 81 of file CScommServer.cpp.

References BIAS::CScommBase::connectPort_, and CreateListenThread_().

Referenced by main().

int CScommBase::WaitForNewMessage ( std::string & msgName ) [inherited]

only if not threaded!
Blocks until any new msg arrives, or returns instantly if a new message is already in a buffer slot.

The msg name is returned in msgName.

The return value indicates how many additional new msgs are in the buffer slots, e.g. if 0 the msgName is the only new message.

Returns:
<0 if an error occured, >=0 the amount of new msgs in other slots.

Definition at line 282 of file CScommBase.cpp.

References BIASERR, BIAS::CScommBase::registeredMsgs_, and BIAS::CScommBase::threaded_.

Friends And Related Function Documentation

void* listenthread ( void * data ) [friend]

these are wrapper to comply to the pthread_create() interface

Definition at line 86 of file CScommServer.cpp.

Referenced by CreateListenThread_().

void* receivethread ( void * data ) [friend, inherited]

these are wrapper to comply to the pthread_create() interface

Definition at line 1007 of file CScommBase.cpp.

Referenced by BIAS::CScommBase::AcceptConn_().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<CScommData> BIAS::CScommBase::commPartners_ [protected, inherited]

Definition at line 276 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::AnalyzeFirstMsg_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::GetCommPartnerName(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SendMsg(), BIAS::CScommBase::syncReceive_(), and BIAS::CScommBase::~CScommBase().

int BIAS::CScommBase::commPartnersConnected_ [protected, inherited]

Definition at line 278 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

int BIAS::CScommBase::connectPort_ [protected, inherited]

Definition at line 277 of file CScommBase.hh.

Referenced by CreateListenThread_(), BIAS::CScommBase::CScommBase(), BIAS::listenthread(), and WaitForConnections().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::CScommBase::isServer_ [protected, inherited]

Definition at line 282 of file CScommBase.hh.

Referenced by BIAS::CScommClient::CScommClient(), CScommServer(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

bool BIAS::CScommBase::keepAll_ [protected, inherited]

Definition at line 287 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AnalyzeData_(), and BIAS::CScommBase::CScommBase().

bool BIAS::CScommServer::listenThreadActive_ [protected]

Definition at line 76 of file CScommServer.hh.

Referenced by CreateListenThread_(), CScommServer(), and ~CScommServer().

bool BIAS::CScommBase::log_ [protected, inherited]

Definition at line 289 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

std::ostream BIAS::CScommBase::logOut_ [protected, inherited]

Definition at line 290 of file CScommBase.hh.

Referenced by BIAS::CScommBase::logOutPut_(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SendMsg(), and BIAS::CScommBase::syncReceive_().

std::vector<CScommMsg> BIAS::CScommBase::msgBuffer_ [protected, inherited]

Definition at line 300 of file CScommBase.hh.

std::string BIAS::CScommBase::name_ [protected, inherited]

Definition at line 294 of file CScommBase.hh.

Referenced by BIAS::CScommClient::CScommClient().

bool BIAS::CScommBase::onlyNewMsgs_ [protected, inherited]

Definition at line 281 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::portChange_ [protected, inherited]

Definition at line 285 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), and BIAS::listenthread().

pthread_t BIAS::CScommServer::pthreadListener_ [protected]

Definition at line 77 of file CScommServer.hh.

Referenced by CreateListenThread_().

std::vector<CScommMsg> BIAS::CScommBase::registeredMsgs_ [protected, inherited]

Definition at line 301 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::CScommBase(), and BIAS::CScommBase::WaitForNewMessage().

pthread_mutex_t BIAS::CScommBase::registerLock_ [protected, inherited]

Definition at line 298 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommServer::terminateListener_ [protected]

Definition at line 76 of file CScommServer.hh.

Referenced by CreateListenThread_(), CScommServer(), BIAS::listenthread(), and ~CScommServer().

bool BIAS::CScommBase::terminateReceiver_ [protected, inherited]

Definition at line 297 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::~CScommBase().

bool BIAS::CScommBase::threaded_ [protected, inherited]

Definition at line 286 of file CScommBase.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), BIAS::CScommBase::AnalyzeData_(), BIAS::CScommBase::CScommBase(), BIAS::CScommBase::WaitForNewMessage(), and BIAS::CScommBase::~CScommBase().

unsigned int BIAS::CScommBase::timeOut_ [protected, inherited]

Definition at line 295 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), and BIAS::CScommBase::receiveThread_().

bool BIAS::CScommBase::timeOutFlag_ [protected, inherited]

Definition at line 296 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase().

bool BIAS::CScommBase::verbose_ [protected, inherited]

Definition at line 291 of file CScommBase.hh.

Referenced by BIAS::CScommBase::CScommBase(), BIAS::listenthread(), BIAS::CScommBase::receiveThread_(), BIAS::CScommBase::SetLog(), BIAS::CScommBase::SetVerbose(), and BIAS::CScommBase::syncReceive_().

std::ostream BIAS::CScommBase::verboseOut_ [protected, inherited]

Definition at line 292 of file CScommBase.hh.

Referenced by BIAS::listenthread(), BIAS::CScommBase::receiveThread_(), and BIAS::CScommBase::syncReceive_().

The documentation for this class was generated from the following files:
  • NetworkComm/CScommServer.hh
  • NetworkComm/CScommServer.cpp
Generated on Wed Jun 21 19:06:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CSCommWithClientNr Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CSCommWithClientNr

BIAS::CSCommWithClientNr Class Reference

needed for the creation of receivethreads More...

#include <NetworkComm/CScommClasses.hh>

Collaboration diagram for BIAS::CSCommWithClientNr:

[legend]
List of all members.

Public Attributes

CScommBase * comm
int commNr

Detailed Description

needed for the creation of receivethreads

Definition at line 82 of file CScommClasses.hh.

Member Data Documentation

CScommBase* BIAS::CSCommWithClientNr::comm

Definition at line 84 of file CScommClasses.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), and BIAS::receivethread().

int BIAS::CSCommWithClientNr::commNr

Definition at line 85 of file CScommClasses.hh.

Referenced by BIAS::CScommBase::AcceptConn_(), and BIAS::receivethread().

The documentation for this class was generated from the following file:
  • NetworkComm/CScommClasses.hh
Generated on Wed Jun 21 19:06:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: CuEye Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CuEye Class Reference

#include <VideoSource/ueyeclass.hh>

List of all members.

Public Member Functions

int | AllocImageMem (int lWidth, int lHeight, int lBpp, char **ppcImgMem, int *plID)
int | CameraStatus (int lInfo, long lValue)
int | CaptureFrame (BITMAPINFOHEADER *pbmih, char *pcImage)
int | CaptureVideo (int lWait)
CuEye ()
int | DisableEvent (int nWhich)
int | EnableAutoExit (int nMode)
int | EnableEvent (int nWhich)
int | EnableMessage (int nWhich, HWND hwnd)
int | ExitCamera ()
int | ExitEvent (int nWhich)
int | FreeImageMem (char *pcMem, int lID)
int | FreezeVideo (int lWait)
int | GetActiveImageMem (char **ppcImgMem, int *plID)
HIDS | GetCameraHandle ()
int | GetCameraInfo (CAMINFO *pInfo)
int | GetCameraType ()
int | GetColorDepth (int *plBpp, int *plColFormat)
int | GetDllVersion (int *plDllVers)
int | GetErrorText (int lErr, char *pcErrText)
double | GetExposureTime ()
double | GetGain ()
int | GetIRQ (int *plIRQ)
int | GetNumberOfCameras (int *plNumCameras)
int | GetOsVersion (void)
int | GetPciSlot (int *plSlot)
int | GetSensorInfo (PSENSORINFO pInfo)
int | InitCamera (int nId=0)
int | InitEvent (HANDLE hEv, int nWhich)
int | InquireImageMem (char *pcMem, int lID, int *plX, int *plY, int *plBpp, int *plPitch)
int | LoadImage (char *pcFile)
int | ReadDigitalPort (int *plIn)
int | ReadEEPROM (int lAdr, char *pcBuf, int lCount)
int | ReadTriggerPort (int *plIn)
int | RenderBitmap (int nMemID, HWND hwnd, int nMode)
int | Renumerate (int reserved)
int | SaveImage (char *pcFile)
int | SaveImageMem (char *pcFile, char *pcMem, int lID)
int | SetBrightness (int lBright)
int | SetCaptureMode (int lMode)
int | SetColorMode (int lMode)
int | SetContrast (int lCont)
int | SetDisplayHook (int lMode)
int | SetDisplayKeyColor (int lKeyCol)
int | SetDisplayMode (int Mode)
int | SetDisplayOffset (int lOffsetX, int lOffsetY)
int | SetDisplayWindow (HWND hWnd)
int | SetErrorReport (int lMode)
int | SetExposureTime (double EXP, double *newEXP)
int | SetExternalTrigger (int lMode)
int | SetFrameRate (double dFr, double *pdFrNew)
int | SetGain (double gain)
int | SetGamma (int lGamma)
int | SetHue (int lHue)
int | SetImageMem (char *pcMem, int lID)
int | SetImagePos (int lPosX, int lPosY)
int | SetImageSize (int lWidth, int lHeight)
int | SetMainDisplayWindow (HWND hWnd)
int | SetPixelClock (int nClock)
int | SetSaturation (int lSatU, int lSatV)
int | SetScaler (int nMode)
int | SetScrollPos (int lPosX, int lPosY)
int | SetWhiteBalance (int nMode)
int | SetWhiteBalanceMultipliers (double dblRed, double dblGreen, double dblBlue)
int | StopLiveVideo (int lWait)
int | UpdateDisplay ()
int | WriteDigitalPort (int lOut)
int | WriteEEPROM (int lAdr, char *pcBuf, int lCount)
virtual | ~CuEye ()

Protected Attributes

HIDS | m_hu
HWND | m_hwnd
HWND | m_hwndNotify

Detailed Description

Definition at line 27 of file ueyeclass.hh.

Constructor & Destructor Documentation

CuEye::CuEye ( )

Definition at line 12 of file ueyeclass.cpp.

References m_hu.

CuEye::~CuEye ( ) [virtual]

Definition at line 19 of file ueyeclass.cpp.

Member Function Documentation

int CuEye::AllocImageMem | ( | int | lWidth,
 |  | int | lHeight,
 |  | int | lBpp,
 |  | char ** | ppcImgMem,
 |  | int * | plID
 | ) |

Definition at line 263 of file ueyeclass.cpp.

References m_hu.

int CuEye::CameraStatus | ( | int | lInfo,
 |  | long | lValue
 | ) |

Definition at line 106 of file ueyeclass.cpp.

References m_hu.

int CuEye::CaptureFrame | ( | BITMAPINFOHEADER * | pbmih,
 |  | char * | pcImage
 | ) |

int CuEye::CaptureVideo ( int lWait )

Definition at line 238 of file ueyeclass.cpp.

References m_hu.

int CuEye::DisableEvent ( int nWhich )

Definition at line 172 of file ueyeclass.cpp.

References m_hu.

int CuEye::EnableAutoExit ( int nMode )

Definition at line 190 of file ueyeclass.cpp.

References m_hu.

int CuEye::EnableEvent ( int nWhich )

Definition at line 166 of file ueyeclass.cpp.

References m_hu.

int CuEye::EnableMessage | ( | int | nWhich,
 |  | HWND | hwnd
 | ) |

Definition at line 184 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::CloseDevice(), and BIAS::VideoSource_uEye::OpenCamera_().

int CuEye::ExitCamera ( )

Definition at line 45 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::CloseDevice(), and BIAS::VideoSource_uEye::OpenCamera_().

int CuEye::ExitEvent ( int nWhich )

Definition at line 178 of file ueyeclass.cpp.

References m_hu.

int CuEye::FreeImageMem | ( | char * | pcMem,
 |  | int | lID
 | ) |

Definition at line 269 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::CloseDevice().

int CuEye::FreezeVideo ( int lWait )

Definition at line 250 of file ueyeclass.cpp.

References m_hu.

int CuEye::GetActiveImageMem | ( | char ** | ppcImgMem,
 |  | int * | plID
 | ) |

Definition at line 281 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::GrabSingle().

HIDS CuEye::GetCameraHandle ( ) [inline]

Definition at line 32 of file ueyeclass.hh.

References m_hu.

int CuEye::GetCameraInfo ( CAMINFO * pInfo )

int CuEye::GetCameraType ( )

Definition at line 112 of file ueyeclass.cpp.

References m_hu.

int CuEye::GetColorDepth | ( | int * | plBpp,
 |  | int * | plColFormat
 | ) |

Definition at line 100 of file ueyeclass.cpp.

References m_hu.

int CuEye::GetDllVersion ( int * plDllVers )

Definition at line 75 of file ueyeclass.cpp.

int CuEye::GetErrorText | ( | int | lErr,
 |  | char * | pcErrText
 | ) |

Definition at line 65 of file ueyeclass.cpp.

References m_hu.

double CuEye::GetExposureTime ( )

Definition at line 420 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::GetShutter().

double CuEye::GetGain ( )

Definition at line 434 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::GetGain().

int CuEye::GetIRQ ( int * plIRQ )

Definition at line 91 of file ueyeclass.cpp.

int CuEye::GetNumberOfCameras ( int * plNumCameras )

Definition at line 69 of file ueyeclass.cpp.

Referenced by BIAS::VideoSource_uEye::OpenDevice().

int CuEye::GetOsVersion ( void )

Definition at line 118 of file ueyeclass.cpp.

int CuEye::GetPciSlot ( int * plSlot )

Definition at line 82 of file ueyeclass.cpp.

int CuEye::GetSensorInfo ( PSENSORINFO pInfo )

Definition at line 446 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::OpenCamera_().

int CuEye::InitCamera ( int nId = 0 )

Definition at line 24 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::OpenCamera_().

int CuEye::InitEvent | ( | HANDLE | hEv,
 |  | int | nWhich
 | ) |

Definition at line 160 of file ueyeclass.cpp.

References m_hu.

int CuEye::InquireImageMem | ( | char * | pcMem,
 |  | int | lID,
 |  | int * | plX,
 |  | int * | plY,
 |  | int * | plBpp,
 |  | int * | plPitch
 | ) |

Definition at line 287 of file ueyeclass.cpp.

References m_hu.

int CuEye::LoadImage ( char * pcFile )

Definition at line 376 of file ueyeclass.cpp.

References m_hu.

int CuEye::ReadDigitalPort ( int * plIn )

Definition at line 306 of file ueyeclass.cpp.

References m_hu.

int CuEye::ReadEEPROM | ( | int | lAdr,
 |  | char * | pcBuf,
 |  | int | lCount
 | ) |

Definition at line 344 of file ueyeclass.cpp.

References m_hu.

int CuEye::ReadTriggerPort ( int * plIn )

Definition at line 293 of file ueyeclass.cpp.

References m_hu.

int CuEye::RenderBitmap | ( | int | nMemID,
 |  | HWND | hwnd,
 |  | int | nMode
 | ) |

Definition at line 388 of file ueyeclass.cpp.

References m_hu.

int CuEye::Renumerate ( int reserved )

Definition at line 440 of file ueyeclass.cpp.

References m_hu.

int CuEye::SaveImage ( char * pcFile )

Definition at line 370 of file ueyeclass.cpp.

References m_hu.

int CuEye::SaveImageMem | ( | char * | pcFile,
 |  | char * | pcMem,
 |  | int | lID
 | ) |

Definition at line 382 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetBrightness ( int lBright )

Definition at line 124 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetCaptureMode ( int lMode )

Definition at line 257 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetColorMode ( int lMode )

Definition at line 154 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetContrast ( int lCont )

Definition at line 130 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetDisplayHook ( int lMode )

int CuEye::SetDisplayKeyColor ( int lKeyCol )

Definition at line 220 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetDisplayMode ( int Mode )

Definition at line 208 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetDisplayOffset | ( | int | lOffsetX,
 |  | int | lOffsetY
 | ) |

int CuEye::SetDisplayWindow ( HWND hWnd )

Definition at line 214 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetErrorReport ( int lMode )

Definition at line 59 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetExposureTime | ( | double | EXP,
 |  | double * | newEXP
 | ) |

Definition at line 415 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::SetShutter().

int CuEye::SetExternalTrigger ( int lMode )

Definition at line 325 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetFrameRate | ( | double | dFr,
 |  | double * | pdFrNew
 | ) |

Definition at line 409 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::SetFPS().

int CuEye::SetGain ( double gain )

Definition at line 427 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::SetGain().

int CuEye::SetGamma ( int lGamma )

Definition at line 136 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetHue ( int lHue )

int CuEye::SetImageMem | ( | char * | pcMem,
 |  | int | lID
 | ) |

Definition at line 275 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetImagePos | ( | int | lPosX,
 |  | int | lPosY
 | ) |

Definition at line 202 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::SetLeftTop().

int CuEye::SetImageSize | ( | int | lWidth,
 |  | int | lHeight
 | ) |

Definition at line 196 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetMainDisplayWindow ( HWND hWnd )

Definition at line 226 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetPixelClock ( int nClock )

Definition at line 403 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::SetPixelClock().

int CuEye::SetSaturation | ( | int | lSatU,
 |  | int | lSatV
 | ) |

int CuEye::SetScaler ( int nMode )

Definition at line 394 of file ueyeclass.cpp.

References m_hu.

int CuEye::SetScrollPos | ( | int | lPosX,
 |  | int | lPosY
 | ) |

int CuEye::SetWhiteBalance ( int nMode )

int CuEye::SetWhiteBalanceMultipliers | ( | double | dblRed,
 |  | double | dblGreen,
 |  | double | dblBlue
 | ) |

Definition at line 148 of file ueyeclass.cpp.

References m_hu.

int CuEye::StopLiveVideo ( int lWait )

Definition at line 244 of file ueyeclass.cpp.

References m_hu.

Referenced by BIAS::VideoSource_uEye::CloseDevice().

int CuEye::UpdateDisplay ( )

Definition at line 232 of file ueyeclass.cpp.

References m_hu.

int CuEye::WriteDigitalPort ( int lOut )

Definition at line 319 of file ueyeclass.cpp.

References m_hu.

int CuEye::WriteEEPROM | ( | int | lAdr,
 |  | char * | pcBuf,
 |  | int | lCount
 | ) |

Definition at line 357 of file ueyeclass.cpp.

References m_hu.

Member Data Documentation

HIDS CuEye::m_hu [protected]

Definition at line 127 of file ueyeclass.hh.

Referenced by AllocImageMem(), CameraStatus(), CaptureVideo(), CuEye(), DisableEvent(), EnableAutoExit(), EnableEvent(), EnableMessage(), ExitCamera(), ExitEvent(), FreeImageMem(), FreezeVideo(), GetActiveImageMem(), GetCameraHandle(), GetCameraType(), GetColorDepth(), GetErrorText(), GetExposureTime(), GetGain(), GetSensorInfo(), InitCamera(), InitEvent(), InquireImageMem(), LoadImage(), ReadDigitalPort(), ReadEEPROM(), ReadTriggerPort(), RenderBitmap(), Renumerate(), SaveImage(), SaveImageMem(), SetBrightness(), SetCaptureMode(), SetColorMode(), SetContrast(), SetDisplayKeyColor(), SetDisplayMode(), SetDisplayWindow(), SetErrorReport(), SetExposureTime(), SetExternalTrigger(), SetFrameRate(), SetGain(), SetGamma(), SetImageMem(), SetImagePos(), SetImageSize(), SetMainDisplayWindow(), SetPixelClock(), SetScaler(), SetWhiteBalanceMultipliers(), StopLiveVideo(), UpdateDisplay(), WriteDigitalPort(), and WriteEEPROM().

HWND CuEye::m_hwnd [protected]

Definition at line 128 of file ueyeclass.hh.

HWND CuEye::m_hwndNotify [protected]

Definition at line 129 of file ueyeclass.hh.

The documentation for this class was generated from the following files:
  • VideoSource/ueyeclass.hh
  • VideoSource/ueyeclass.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: CutoutFrame Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CutoutFrame Class Reference

Collaboration diagram for CutoutFrame:

[legend]
List of all members.

Public Member Functions

CutoutFrame (wxWindow *parent, const wxString &title)
void | SetTransform (int offsetX, int offsetY, int scale)
void | ShowImage (Image< unsigned char > &image, const string &name)

Private Member Functions

void | OnClose (wxCloseEvent &event)
void | OnLeaveWindow (wxMouseEvent &event)
void | OnMotion (wxMouseEvent &event)

Private Attributes

PlainImageCanvas * _ImageCanvas
int | _OffsetX
int | _OffsetY
int | _Scale

Detailed Description

Definition at line 188 of file biasshowepiwx.cpp.

Constructor & Destructor Documentation

CutoutFrame::CutoutFrame | ( | wxWindow * | parent,
 |  | const wxString & | title
 | ) |

Definition at line 213 of file biasshowepiwx.cpp.

Member Function Documentation

void CutoutFrame::OnClose ( wxCloseEvent & event ) [private]

Definition at line 263 of file biasshowepiwx.cpp.

void CutoutFrame::OnLeaveWindow ( wxMouseEvent & event ) [private]

Definition at line 258 of file biasshowepiwx.cpp.

void CutoutFrame::OnMotion ( wxMouseEvent & event ) [private]

Definition at line 246 of file biasshowepiwx.cpp.

References _OffsetX, _OffsetY, _Scale, and BIAS::AsciiToWx().

void CutoutFrame::SetTransform | ( | int | offsetX,
 |  | int | offsetY,
 |  | int | scale
 | ) |

Definition at line 239 of file biasshowepiwx.cpp.

References _OffsetX, _OffsetY, and _Scale.

Referenced by MainFrame::OnLeftDown().

void CutoutFrame::ShowImage | ( | Image< unsigned char > & | image,
 |  | const string & | name
 | ) |

Definition at line 231 of file biasshowepiwx.cpp.

References _ImageCanvas, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageCanvas::Show().

Referenced by MainFrame::OnLeftDown().

Member Data Documentation

PlainImageCanvas* CutoutFrame::_ImageCanvas [private]

Definition at line 198 of file biasshowepiwx.cpp.

Referenced by ShowImage().

int CutoutFrame::_OffsetX [private]

Definition at line 197 of file biasshowepiwx.cpp.

Referenced by OnMotion(), and SetTransform().

int CutoutFrame::_OffsetY [private]

Definition at line 197 of file biasshowepiwx.cpp.

Referenced by OnMotion(), and SetTransform().

int CutoutFrame::_Scale [private]

Definition at line 197 of file biasshowepiwx.cpp.

Referenced by OnMotion(), and SetTransform().

The documentation for this class was generated from the following file:
  • Tools/biasshowepiwx.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::CylinderMapping Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::CylinderMapping

BIAS::CylinderMapping Class Reference

functions for spherical undistortion of given images, needs image dimensions, principal point and focal length as input additional to the image data. More...

#include <Image/CylinderMapping.hh>

Inheritance diagram for BIAS::CylinderMapping:

[legend]
Collaboration diagram for BIAS::CylinderMapping:

[legend]
List of all members.

Public Member Functions

BackwardMapping ()
CylinderMapping ()
virtual int | GetBoundingBox (unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
int | Map (Image< unsigned char > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< unsigned char > &src, Image< unsigned char > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations
void Reset ()
if you want to call Map() twice for this object with different params, call Reset() before
void | setFocalLength (const double fx, const double fy)
Set the focal length of the camera.
void | setPrincipalPoint (const double px, const double py)
Set the principal point of the camera.
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
virtual void | UpdatePyramidSize (const Image< unsigned char > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Protected Member Functions

virtual void | BuildPyramid_ (const Image< unsigned char > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< unsigned char > &sink, const Image< unsigned char > &source)
virtual int | ChangeImgSize_ (Image< unsigned char > &, const Image< unsigned char > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< unsigned char > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, unsigned char &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< unsigned char > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian
virtual int | GetSourceCoordinates_ (const BIAS::HomgPoint2D &sink, BIAS::HomgPoint2D &source) const
this does the trick
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing
int | MapBi_ (const Image< unsigned char > &source, Image< unsigned char > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< unsigned char > &sink)
map image avoiding aliasing

Protected Attributes

bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
double | camAngleX_
double | camAngleY_
double | focalX_
double | focalY_
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
int | offsetX_
int | offsetY_
double | px_
double | py_
PyramidImage< unsigned char > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
double | width_

Detailed Description

functions for spherical undistortion of given images, needs image dimensions, principal point and focal length as input additional to the image data.

Useful for PanoramaMapping ! See also BIAS::BackwardMapping for further details.

Author:
jbr, february 2006 edited by grest

Definition at line 46 of file CylinderMapping.hh.

Constructor & Destructor Documentation

CylinderMapping::CylinderMapping ( )

Definition at line 25 of file CylinderMapping.cpp.

References Reset().

Member Function Documentation

BIAS::BackwardMapping< unsigned char , unsigned char >::BackwardMapping ( ) [inline, inherited]

Definition at line 100 of file BackwardMapping.hh.

References BIAS::MapTrilinear.

virtual void BIAS::BackwardMapping< unsigned char , unsigned char >::BuildPyramid_ | ( | const Image< unsigned char > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual, inherited]

compute maximum number of pyramid levels needed

virtual int BIAS::BackwardMapping< unsigned char , unsigned char >::CalcCoordOffset_ | ( | const Image< unsigned char > & | sink,
 |  | const Image< unsigned char > & | source
 | ) | [protected, virtual, inherited]

virtual int BIAS::BackwardMapping< unsigned char , unsigned char >::ChangeImgSize_ | ( | Image< unsigned char > & | ,
 |  | const Image< unsigned char > & |
 | ) | [protected, virtual, inherited]

void BIAS::BackwardMapping< unsigned char , unsigned char >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< unsigned char > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

clip computed region in dest image to roi

void BIAS::BackwardMapping< unsigned char, unsigned char >::ClipValue_ | ( | const double & | value,
 |  | unsigned char & | newvalue
 | ) | [protected, virtual, inherited]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 710 of file BackwardMapping.cpp.

int BIAS::BackwardMapping< unsigned char , unsigned char >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected, inherited]

use jacobian of mapping function to do anisotropic antialiasing

virtual int BIAS::BackwardMapping< unsigned char , unsigned char >::GetBoundingBox | ( | unsigned | int,
 |  | unsigned | int,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [inline, virtual, inherited]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates can be negative ! The br position is the first pixel outside the region(as for a ROI). Implement this in a derived class for speeding up calculation.

Definition at line 149 of file BackwardMapping.hh.

int BIAS::BackwardMapping< unsigned char , unsigned char >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< unsigned char > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

virtual int BIAS::BackwardMapping< unsigned char , unsigned char >::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual, inherited]

numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

int CylinderMapping::GetSourceCoordinates_ | ( | const BIAS::HomgPoint2D & | sink,
 |  | BIAS::HomgPoint2D & | source
 | ) | const [protected, virtual]

this does the trick

Reimplemented from BIAS::BackwardMapping< unsigned char, unsigned char >.

Definition at line 55 of file CylinderMapping.cpp.

References focalX_, focalY_, BIAS::BackwardMapping< unsigned char, unsigned char >::height_, px_, py_, rotateY(), toDeg(), toRad(), and BIAS::BackwardMapping< unsigned char, unsigned char >::width_.

int BIAS::BackwardMapping< unsigned char , unsigned char >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

void BIAS::BackwardMapping< unsigned char , unsigned char >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected, inherited]

takes jacobian to compute gaussian kernel for anisotropic smoothing

int BIAS::BackwardMapping< unsigned char , unsigned char >::Map ( Image< unsigned char > & sink ) [inherited]

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

int BIAS::BackwardMapping< unsigned char , unsigned char >::Map | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) | [inherited]

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

int BIAS::BackwardMapping< unsigned char , unsigned char >::MapBi_ | ( | const Image< unsigned char > & | source,
 |  | Image< unsigned char > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected, inherited]

bilinear, bicubc and nearest neighbor interpolation

int BIAS::BackwardMapping< unsigned char , unsigned char >::MapTri_ ( Image< unsigned char > & sink ) [protected, inherited]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

void CylinderMapping::Reset ( )

if you want to call Map() twice for this object with different params, call Reset() before

Definition at line 30 of file CylinderMapping.cpp.

References camAngleX_, camAngleY_, focalX_, focalY_, px_, and py_.

Referenced by CylinderMapping().

void CylinderMapping::setFocalLength | ( | const double | fx,
 |  | const double | fy
 | ) |

Set the focal length of the camera.

Defaults to 140 degrees field of view in y-direction

Parameters:
fx
fy

Definition at line 42 of file CylinderMapping.cpp.

References focalX_, and focalY_.

void CylinderMapping::setPrincipalPoint | ( | const double | px,
 |  | const double | py
 | ) |

Set the principal point of the camera.

Parameters:
px | defaults to half image size
py | defaults to half image size

Definition at line 48 of file CylinderMapping.cpp.

References px_, and py_.

void BIAS::BackwardMapping< unsigned char , unsigned char >::SetPyramidSize ( const int newsize ) [inherited]

sets pyramid size to pyramid and updates if neccessary

virtual void BIAS::BackwardMapping< unsigned char , unsigned char >::UpdatePyramidSize ( const Image< unsigned char > & sink ) [virtual, inherited]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Member Data Documentation

bool BIAS::BackwardMapping< unsigned char , unsigned char >::aliasing_ [protected, inherited]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

BIAS::Image<float> BIAS::BackwardMapping< unsigned char , unsigned char >::alphaImg_ [protected, inherited]

Definition at line 298 of file BackwardMapping.hh.

bool BIAS::BackwardMapping< unsigned char , unsigned char >::autoPyramidSize_ [protected, inherited]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

double BIAS::CylinderMapping::camAngleX_ [protected]

Definition at line 85 of file CylinderMapping.hh.

Referenced by Reset().

double BIAS::CylinderMapping::camAngleY_ [protected]

Definition at line 86 of file CylinderMapping.hh.

Referenced by Reset().

double BIAS::CylinderMapping::focalX_ [protected]

Definition at line 83 of file CylinderMapping.hh.

Referenced by GetSourceCoordinates_(), Reset(), and setFocalLength().

double BIAS::CylinderMapping::focalY_ [protected]

Definition at line 84 of file CylinderMapping.hh.

Referenced by GetSourceCoordinates_(), Reset(), and setFocalLength().

double BIAS::BackwardMapping< unsigned char , unsigned char >::height_ [protected, inherited]

Definition at line 296 of file BackwardMapping.hh.

Referenced by GetSourceCoordinates_().

InterpolationMethod BIAS::BackwardMapping< unsigned char , unsigned char >::interpolationType_ [protected, inherited]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

int BIAS::BackwardMapping< unsigned char , unsigned char >::offsetX_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

int BIAS::BackwardMapping< unsigned char , unsigned char >::offsetY_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

double BIAS::CylinderMapping::px_ [protected]

Definition at line 80 of file CylinderMapping.hh.

Referenced by GetSourceCoordinates_(), Reset(), and setPrincipalPoint().

double BIAS::CylinderMapping::py_ [protected]

Definition at line 81 of file CylinderMapping.hh.

Referenced by GetSourceCoordinates_(), Reset(), and setPrincipalPoint().

PyramidImage<unsigned char > BIAS::BackwardMapping< unsigned char , unsigned char >::pyramid_ [protected, inherited]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

bool BIAS::BackwardMapping< unsigned char , unsigned char >::rangeChecked_ [protected, inherited]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

ROI BIAS::BackwardMapping< unsigned char , unsigned char >::ROI_ [protected, inherited]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

double BIAS::BackwardMapping< unsigned char , unsigned char >::width_ [protected, inherited]

Definition at line 295 of file BackwardMapping.hh.

Referenced by GetSourceCoordinates_().

The documentation for this class was generated from the following files:
  • Image/CylinderMapping.hh
  • Image/CylinderMapping.cpp
Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: /home/jw/source/BIAS/Base/Debug/Debug.hh Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

/home/jw/source/BIAS/Base/Debug/Debug.hh Class Reference
[Utilities]

#include <Base/Debug/Debug.hh>

The documentation for this class was generated from the following file:
  • Base/Debug/Debug.hh
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DC_GPS Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DC_GPS

BIAS::DC_GPS Class Reference

#include <Image/DCData.hh>

Inheritance diagram for BIAS::DC_GPS:

[legend]
Collaboration diagram for BIAS::DC_GPS:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
DC_GPS (const DC_GPS &gps)
DC_GPS ()
bool | DebugLevelIsSet (long int lv) const
int | GetBinaryLength ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | ReadBinary (char *data)
void | RemoveDebugLevel (long int lv)
void | Set (int framenum, double latPos, double longPos, double azimuth, double speed, double distanceToMap)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | WriteBinary (char *data)
~DC_GPS ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Public Attributes

double | azimuth
double | clothoidParameter
double | curvature
double | distanceToMap
int | framenum
double | gpsTime
double | latPos
double | longPos
double | mapIndex
double | offset
double | scaleFactorSpeed
double | speed
double | yawRateOffset

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const DC_GPS &gps)
std::istream & | operator>> (std::istream &is, DC_GPS &gsp)

Detailed Description

Definition at line 92 of file DCData.hh.

Constructor & Destructor Documentation

DC_GPS::DC_GPS ( )

Definition at line 412 of file DCData.cpp.

DC_GPS::DC_GPS ( const DC_GPS & gps )

Definition at line 419 of file DCData.cpp.

References azimuth, clothoidParameter, curvature, distanceToMap, framenum, gpsTime, latPos, longPos, mapIndex, offset, scaleFactorSpeed, speed, and yawRateOffset.

DC_GPS::~DC_GPS ( )

Definition at line 436 of file DCData.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::DC_GPS::GetBinaryLength ( ) [inline]

Definition at line 101 of file DCData.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void DC_GPS::ReadBinary ( char * data )

Definition at line 550 of file DCData.cpp.

References azimuth, clothoidParameter, curvature, distanceToMap, framenum, gpsTime, latPos, longPos, mapIndex, offset, scaleFactorSpeed, speed, and yawRateOffset.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void DC_GPS::Set | ( | int | framenum,
 |  | double | latPos,
 |  | double | longPos,
 |  | double | azimuth,
 |  | double | speed,
 |  | double | distanceToMap
 | ) |

Definition at line 439 of file DCData.cpp.

References azimuth, distanceToMap, framenum, latPos, longPos, and speed.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void DC_GPS::WriteBinary ( char * data )

Definition at line 511 of file DCData.cpp.

References azimuth, BIASASSERT, BIASERR, clothoidParameter, curvature, distanceToMap, framenum, gpsTime, latPos, longPos, mapIndex, offset, scaleFactorSpeed, speed, and yawRateOffset.

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const DC_GPS & | gps
 | ) | [friend]

std::istream& operator>> | ( | std::istream & | is,
 |  | DC_GPS & | gsp
 | ) | [friend]

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::DC_GPS::azimuth

Definition at line 113 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_GPS::clothoidParameter

Definition at line 118 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::curvature

Definition at line 117 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::distanceToMap

Definition at line 122 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

int BIAS::DC_GPS::framenum

Definition at line 110 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::DC_GPS::gpsTime

Definition at line 116 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::latPos

Definition at line 111 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_GPS::longPos

Definition at line 112 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_GPS::mapIndex

Definition at line 119 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::offset

Definition at line 114 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::scaleFactorSpeed

Definition at line 120 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_GPS::speed

Definition at line 115 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_GPS::yawRateOffset

Definition at line 121 of file DCData.hh.

Referenced by DC_GPS(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

The documentation for this class was generated from the following files:
  • Image/DCData.hh
  • Image/DCData.cpp
Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DC_inertial Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DC_inertial

BIAS::DC_inertial Class Reference

#include <Image/DCData.hh>

Inheritance diagram for BIAS::DC_inertial:

[legend]
Collaboration diagram for BIAS::DC_inertial:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
DC_inertial (const DC_inertial &in)
DC_inertial ()
bool | DebugLevelIsSet (long int lv) const
int | GetBinaryLength ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | ReadBinary (char *data)
void | RemoveDebugLevel (long int lv)
void | Set (double yaw, double yawrateraw, double yawrateoffset, double speed, double steeringangle)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | WriteBinary (char *data)
~DC_inertial ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Public Attributes

double | AcceleratorPedal
int | ArtFlags
double | ArtLeadVehicleDistance
double | ArtLeadVehicleVelocity
double | ArtSollVelocity
int | BlinkLever
double | EngineSpeed
int | Gear
double | LatAcceleration
double | LongAcceleration
double | Pitch
double | Speed
double | SteeringAngle
int | SteeringWheelLever
int | TempomatLever
int | VehicleFlags
double | Yaw
double | YawRateOffset
double | YawRateRaw

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const DC_inertial &inert)
std::istream & | operator>> (std::istream &is, DC_inertial &inert)

Detailed Description

Definition at line 61 of file DCData.hh.

Constructor & Destructor Documentation

DC_inertial::DC_inertial ( )

Definition at line 170 of file DCData.cpp.

References AcceleratorPedal, ArtFlags, ArtLeadVehicleDistance, ArtLeadVehicleVelocity, ArtSollVelocity, BlinkLever, EngineSpeed, Gear, LatAcceleration, LongAcceleration, Pitch, Speed, SteeringAngle, SteeringWheelLever, TempomatLever, VehicleFlags, Yaw, YawRateOffset, and YawRateRaw.

DC_inertial::DC_inertial ( const DC_inertial & in )

Definition at line 182 of file DCData.cpp.

References AcceleratorPedal, ArtFlags, ArtLeadVehicleDistance, ArtLeadVehicleVelocity, ArtSollVelocity, BlinkLever, EngineSpeed, Gear, LatAcceleration, LongAcceleration, Pitch, Speed, SteeringAngle, SteeringWheelLever, TempomatLever, VehicleFlags, Yaw, YawRateOffset, and YawRateRaw.

DC_inertial::~DC_inertial ( )

Definition at line 205 of file DCData.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::DC_inertial::GetBinaryLength ( ) [inline]

Definition at line 70 of file DCData.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void DC_inertial::ReadBinary ( char * data )

Definition at line 358 of file DCData.cpp.

References AcceleratorPedal, ArtFlags, ArtLeadVehicleDistance, ArtLeadVehicleVelocity, ArtSollVelocity, BlinkLever, EngineSpeed, Gear, LatAcceleration, LongAcceleration, Pitch, Speed, SteeringAngle, SteeringWheelLever, TempomatLever, VehicleFlags, Yaw, YawRateOffset, and YawRateRaw.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void DC_inertial::Set | ( | double | yaw,
 |  | double | yawrateraw,
 |  | double | yawrateoffset,
 |  | double | speed,
 |  | double | steeringangle
 | ) |

Definition at line 208 of file DCData.cpp.

References Speed, SteeringAngle, Yaw, YawRateOffset, and YawRateRaw.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void DC_inertial::WriteBinary ( char * data )

Definition at line 303 of file DCData.cpp.

References AcceleratorPedal, ArtFlags, ArtLeadVehicleDistance, ArtLeadVehicleVelocity, ArtSollVelocity, BIASASSERT, BIASERR, BlinkLever, EngineSpeed, Gear, LatAcceleration, LongAcceleration, Pitch, Speed, SteeringAngle, SteeringWheelLever, TempomatLever, VehicleFlags, Yaw, YawRateOffset, and YawRateRaw.

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const DC_inertial & | inert
 | ) | [friend]

std::istream& operator>> | ( | std::istream & | is,
 |  | DC_inertial & | inert
 | ) | [friend]

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::DC_inertial::AcceleratorPedal

Definition at line 87 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

int BIAS::DC_inertial::ArtFlags

Definition at line 86 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::ArtLeadVehicleDistance

Definition at line 85 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::ArtLeadVehicleVelocity

Definition at line 85 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::ArtSollVelocity

Definition at line 85 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

int BIAS::DC_inertial::BlinkLever

Definition at line 84 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::EngineSpeed

Definition at line 87 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

int BIAS::DC_inertial::Gear

Definition at line 88 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::DC_inertial::LatAcceleration

Definition at line 83 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::LongAcceleration

Definition at line 83 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::Pitch

Definition at line 81 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::Speed

Definition at line 82 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_inertial::SteeringAngle

Definition at line 80 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

int BIAS::DC_inertial::SteeringWheelLever

Definition at line 84 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

int BIAS::DC_inertial::TempomatLever

Definition at line 84 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

int BIAS::DC_inertial::VehicleFlags

Definition at line 88 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), and WriteBinary().

double BIAS::DC_inertial::Yaw

Definition at line 79 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_inertial::YawRateOffset

Definition at line 79 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_inertial::YawRateRaw

Definition at line 79 of file DCData.hh.

Referenced by DC_inertial(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

The documentation for this class was generated from the following files:
  • Image/DCData.hh
  • Image/DCData.cpp
Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DC_ptu Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DC_ptu

BIAS::DC_ptu Class Reference

#include <Image/DCData.hh>

Inheritance diagram for BIAS::DC_ptu:

[legend]
Collaboration diagram for BIAS::DC_ptu:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
DC_ptu (const DC_ptu &ptu)
DC_ptu ()
bool | DebugLevelIsSet (long int lv) const
int | GetBinaryLength ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | ReadBinary (char *data)
void | RemoveDebugLevel (long int lv)
void | Set (double PanPos, double TiltPos, unsigned long int TimeStamp, unsigned long StartReadTimeStamp, unsigned long StopReadTimeStamp)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | WriteBinary (char *data)
~DC_ptu ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Public Attributes

double | PanPos
unsigned int | StartReadTimeStamp
unsigned int | StopReadTimeStamp
double | TiltPos
unsigned int | TimeStamp

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const DC_ptu &ptu)
std::istream & | operator>> (std::istream &is, DC_ptu &ptu)

Detailed Description

Definition at line 40 of file DCData.hh.

Constructor & Destructor Documentation

DC_ptu::DC_ptu ( )

Definition at line 41 of file DCData.cpp.

References PanPos, StartReadTimeStamp, StopReadTimeStamp, TiltPos, and TimeStamp.

DC_ptu::DC_ptu ( const DC_ptu & ptu )

Definition at line 47 of file DCData.cpp.

References PanPos, StartReadTimeStamp, StopReadTimeStamp, TiltPos, and TimeStamp.

DC_ptu::~DC_ptu ( )

Definition at line 56 of file DCData.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::DC_ptu::GetBinaryLength ( ) [inline]

Definition at line 49 of file DCData.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void DC_ptu::ReadBinary ( char * data )

Definition at line 92 of file DCData.cpp.

References PanPos, StartReadTimeStamp, StopReadTimeStamp, TiltPos, and TimeStamp.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void DC_ptu::Set | ( | double | PanPos,
 |  | double | TiltPos,
 |  | unsigned long int | TimeStamp,
 |  | unsigned long | StartReadTimeStamp,
 |  | unsigned long | StopReadTimeStamp
 | ) |

Definition at line 59 of file DCData.cpp.

References PanPos, StartReadTimeStamp, StopReadTimeStamp, TiltPos, and TimeStamp.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void DC_ptu::WriteBinary ( char * data )

Definition at line 69 of file DCData.cpp.

References BIASASSERT, BIASERR, PanPos, StartReadTimeStamp, StopReadTimeStamp, TiltPos, and TimeStamp.

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const DC_ptu & | ptu
 | ) | [friend]

std::istream& operator>> | ( | std::istream & | is,
 |  | DC_ptu & | ptu
 | ) | [friend]

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::DC_ptu::PanPos

Definition at line 57 of file DCData.hh.

Referenced by DC_ptu(), main(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

unsigned int BIAS::DC_ptu::StartReadTimeStamp

Definition at line 58 of file DCData.hh.

Referenced by DC_ptu(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

unsigned int BIAS::DC_ptu::StopReadTimeStamp

Definition at line 58 of file DCData.hh.

Referenced by DC_ptu(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

double BIAS::DC_ptu::TiltPos

Definition at line 57 of file DCData.hh.

Referenced by DC_ptu(), main(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

unsigned int BIAS::DC_ptu::TimeStamp

Definition at line 58 of file DCData.hh.

Referenced by DC_ptu(), main(), BIAS::operator<<(), BIAS::operator>>(), ReadBinary(), Set(), and WriteBinary().

The documentation for this class was generated from the following files:
  • Image/DCData.hh
  • Image/DCData.cpp
Generated on Wed Jun 21 19:06:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Debug Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Debug

BIAS::Debug Class Reference

#include <Base/Debug/Debug.hh>

Inheritance diagram for BIAS::Debug:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
Debug (Debug &deb)
Debug ()
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Debug & | operator= (const Debug &d)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~Debug ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 205 of file Debug.hh.

Constructor & Destructor Documentation

BIAS::Debug::Debug ( ) [inline]

Definition at line 208 of file Debug.hh.

BIAS::Debug::Debug ( Debug & deb ) [inline]

Definition at line 215 of file Debug.hh.

References GetDebugLevel().

BIAS::Debug::~Debug ( ) [inline]

Definition at line 222 of file Debug.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline]

Definition at line 231 of file Debug.hh.

Referenced by Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Debug& BIAS::Debug::operator= ( const Debug & d ) [inline]

Definition at line 320 of file Debug.hh.

References _liDebugLevel, _zDebugStream, and BIAS_DEBUG.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Base/Debug/Debug.hh
  • Base/Debug/Debug.cpp
Generated on Wed Jun 21 19:06:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DeInterlace< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DeInterlace

BIAS::DeInterlace< InputStorageType, OutputStorageType > Class Template Reference

#include <Filter/DeInterlace.hh>

Inheritance diagram for BIAS::DeInterlace< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::DeInterlace< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | CalculationInFloat () const
decides if calculation is done in integer or floating point
bool | DebugLevelIsSet (long int lv) const
DeInterlace (const DeInterlace< InputStorageType, OutputStorageType > &m)
DeInterlace (Param &para, const int group_id, const std::string &postfix)
DeInterlace (Param &para, const std::string &postfix="")
DeInterlace ()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
averages over a region with constant weights
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
only calls filter, for consistency of params
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
only calls filter, for consistency of params
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetKernel (FilterMask &fm) const
get the current filter mask
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
prints the used filter mask, for debugging
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDeInterlaceType (BIAS_DEINTERLACE_TYPE type)
Set the Type of deinterlacing e.g.
void | SetDownSamplingByTwo (bool bDoDownSamplingByTwo=true)
Set the downsampling factor while filter.
void | SetKernel (FilterMask &fm)
set a new filter mask
void | SetUseEvenLines (bool bEvenLines=true)
Set if the even or odd lines in the images should be used.
~DeInterlace ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int group_id, const std::string &postfix)
int | ConvFloatHori_ (const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst)
worker function for float separated (horizontal) convolution
int | ConvFloatMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for float matrix convolution
int | ConvFloatVert_ (const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst)
worker function for float separated (vertical) convolution
int | ConvIntHori_ (const Image< InputStorageType > &src, Image< CONV_INT > &dst)
worker function for int separated (horizontal) convolution
int | ConvIntMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for int matrix convolution
int | ConvIntVert_ (const Image< CONV_INT > &src, Image< OutputStorageType > &dst)
worker function for int separated (vertical) convolution
void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
FilterMask _fm
the kernel data used for convolution
long int | _liDebugLevel
bool | _ParamsAllocated
Image< CONV_FLOAT > | _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > | _tmpInt
temporary memory, needed for separable filters when integer filtering
bool | bDoDownSamplingByTwo_
bool | bUseEvenLines_
BIAS_DEINTERLACE_TYPE eDeInterlaceType_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::DeInterlace< InputStorageType, OutputStorageType >

Definition at line 48 of file DeInterlace.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
DeInterlace::DeInterlace ( )

Definition at line 39 of file DeInterlace.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated, BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_, BIAS::BIAS_DI_22, BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_, and BIAS::DeInterlace< InputStorageType, OutputStorageType >::eDeInterlaceType_.

template<class InputStorageType, class OutputStorageType>
DeInterlace::DeInterlace | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 50 of file DeInterlace.cpp.

References BIAS::DeInterlace< InputStorageType, OutputStorageType >::_AddParam(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_, BIAS::BIAS_DI_22, BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_, BIAS::DeInterlace< InputStorageType, OutputStorageType >::eDeInterlaceType_, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
DeInterlace::DeInterlace | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Definition at line 64 of file DeInterlace.cpp.

References BIAS::DeInterlace< InputStorageType, OutputStorageType >::_AddParam(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_, BIAS::BIAS_DI_22, BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_, and BIAS::DeInterlace< InputStorageType, OutputStorageType >::eDeInterlaceType_.

template<class InputStorageType, class OutputStorageType>
BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace ( const DeInterlace< InputStorageType, OutputStorageType > & m ) [inline]

Definition at line 57 of file DeInterlace.hh.

template<class InputStorageType, class OutputStorageType>
DeInterlace::~DeInterlace ( )

Definition at line 75 of file DeInterlace.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void DeInterlace::_AddParam | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 245 of file DeInterlace.cpp.

Referenced by BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
bool BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat ( ) const [inline, inherited]

decides if calculation is done in integer or floating point

Definition at line 104 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_FLOAT > & | dst
 | ) | [protected, inherited]

worker function for float separated (horizontal) convolution

Definition at line 294 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfh(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float matrix convolution

Definition at line 232 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatVert_ | ( | const Image< CONV_FLOAT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float separated (vertical) convolution

Definition at line 348 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_INT > & | dst
 | ) | [protected, inherited]

worker function for int separated (horizontal) convolution

Definition at line 115 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetHorizRightShift(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepih(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int matrix convolution

Definition at line 50 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKerneli(), BIAS::FilterMask::GetKernelRightShift(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntVert_ | ( | const Image< CONV_INT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int separated (vertical) convolution

Definition at line 172 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepiv(), BIAS::FilterMask::GetVertRightShift(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int DeInterlace::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

averages over a region with constant weights

Author:
woelk 09/2004

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 83 of file DeInterlace.cpp.

References BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_, BIASCDOUT, BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by BIAS::DeInterlace< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::FilterInt(), and main().

template<class InputStorageType, class OutputStorageType>
int DeInterlace::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

only calls filter, for consistency of params

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 210 of file DeInterlace.cpp.

References BIASERR, and BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int DeInterlace::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

only calls filter, for consistency of params

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 202 of file DeInterlace.cpp.

References BIASERR, and BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inline, protected, virtual, inherited]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 144 of file Convolution.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetKernel ( FilterMask & fm ) const [inline, inherited]

get the current filter mask

Definition at line 93 of file Convolution.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void Convolution::PrintKernel ( ) const [inherited]

prints the used filter mask, for debugging

Definition at line 582 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::FilterMask::IsSeparable().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void DeInterlace::SetDeInterlaceType ( BIAS_DEINTERLACE_TYPE type )

Set the Type of deinterlacing e.g.

mean of 2 pixel or weighting with 121...

Definition at line 226 of file DeInterlace.cpp.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void DeInterlace::SetDownSamplingByTwo ( bool bDoDownSamplingByTwo = true )

Set the downsampling factor while filter.

Definition at line 234 of file DeInterlace.cpp.

References BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel ( FilterMask & fm ) [inline, inherited]

set a new filter mask

Definition at line 97 of file Convolution.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void DeInterlace::SetUseEvenLines ( bool bEvenLines = true )

Set if the even or odd lines in the images should be used.

Definition at line 219 of file DeInterlace.cpp.

References BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
FilterMask BIAS::Convolution< InputStorageType, OutputStorageType >::_fm [protected, inherited]

the kernel data used for convolution

Definition at line 108 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<CONV_FLOAT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat [protected, inherited]

temporary memory, needed for separable filters when float filtering

Definition at line 115 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

template<class InputStorageType, class OutputStorageType>
Image<CONV_INT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpInt [protected, inherited]

temporary memory, needed for separable filters when integer filtering

Definition at line 118 of file Convolution.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::DeInterlace< InputStorageType, OutputStorageType >::bDoDownSamplingByTwo_ [protected]

Definition at line 88 of file DeInterlace.hh.

Referenced by BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), and BIAS::DeInterlace< InputStorageType, OutputStorageType >::SetDownSamplingByTwo().

template<class InputStorageType, class OutputStorageType>
bool BIAS::DeInterlace< InputStorageType, OutputStorageType >::bUseEvenLines_ [protected]

Definition at line 87 of file DeInterlace.hh.

Referenced by BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), and BIAS::DeInterlace< InputStorageType, OutputStorageType >::SetUseEvenLines().

template<class InputStorageType, class OutputStorageType>
BIAS_DEINTERLACE_TYPE BIAS::DeInterlace< InputStorageType, OutputStorageType >::eDeInterlaceType_ [protected]

Definition at line 89 of file DeInterlace.hh.

Referenced by BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/DeInterlace.hh
  • Filter/DeInterlace.cpp
Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DerivedFrom< T, B > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DerivedFrom

BIAS::DerivedFrom< T, B > Class Template Reference

compile time check if B is (grand)father of T Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html "Actually, Derived_from doesn't check derivation, but conversion, but that's often a better constaint. More...

#include <Base/Debug/Constraints.hh>

Inheritance diagram for BIAS::DerivedFrom< T, B >:

[legend]
List of all members.

Public Member Functions

DerivedFrom ()

Static Public Member Functions

static void Constraints (T *p)

Detailed Description

template<class T, class B>
class BIAS::DerivedFrom< T, B >

compile time check if B is (grand)father of T Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html "Actually, Derived_from doesn't check derivation, but conversion, but that's often a better constaint.

Finding good names for constraints can be hard."

Author:
woelk 02/2006

Definition at line 35 of file Constraints.hh.

Constructor & Destructor Documentation

template<class T, class B>
BIAS::DerivedFrom< T, B >::DerivedFrom ( ) [inline]

Definition at line 44 of file Constraints.hh.

Member Function Documentation

template<class T, class B>
static void BIAS::DerivedFrom< T, B >::Constraints ( T * p ) [inline, static]

Definition at line 38 of file Constraints.hh.

Referenced by BIAS::CanCompare< T1, T2 >::CanCompare(), BIAS::CanCopy< T1, T2 >::CanCopy(), BIAS::CanMultiply< T1, T2, T3 >::CanMultiply(), and BIAS::DerivedFrom< T, Base >::DerivedFrom().

The documentation for this class was generated from the following file:
  • Base/Debug/Constraints.hh
Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Dilation< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Dilation

BIAS::Dilation< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Dilation operator for binary images (black and white). More...

#include <Filter/Dilation.hh>

Inheritance diagram for BIAS::Dilation< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Dilation< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | Dilate (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3)
dilate with square kernel filled with 255
int | Dilate3Fast (const Image< InputStorageType > &src, Image< OutputStorageType > &dest, bool Neighbor4=false)
Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.
int | Dilate3Fast (const Image< InputStorageType > &src, const Image< InputStorageType > &orig, Image< OutputStorageType > &dest, bool Neighbor4=false)
Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.
Dilation ()
int | FillBorderConst (Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value)
fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Does the dilation.
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKernelSize (int size)
virtual | ~Dilation ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
Very fast deletion of pixels with no neighbours.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
int * | kernelSize_
pointer into param object, determines influence region size

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Dilation< InputStorageType, OutputStorageType >

Dilation operator for binary images (black and white).

Dilation sets all pixel to 255, which have a neighboring pixel !=0 It is also possible to dilate the image with a real grey-value image with Dilate3Fast(). Fastest ist TBH_valid and kernelsize=3 or call Dilate3Fast() directly.

Author:
grest, Oct. 2004

Definition at line 43 of file Dilation.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
BIAS::Dilation< InputStorageType, OutputStorageType >::Dilation ( ) [inline]

Definition at line 46 of file Dilation.hh.

template<class InputStorageType, class OutputStorageType>
virtual BIAS::Dilation< InputStorageType, OutputStorageType >::~Dilation ( ) [inline, virtual]

Definition at line 47 of file Dilation.hh.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Very fast deletion of pixels with no neighbours.

All values, which are not zero, are treated as foreground. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!

Author:
Daniel Grest, Sept. 2002 tested

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Dilation::Dilate | ( | const Image< InputStorageType > & | Source,
 |  | Image< OutputStorageType > & | Destination,
 |  | int | KernelSize = 3
 | ) |

dilate with square kernel filled with 255

Author:
Felix Woelk (22/04/2002) alpha

Definition at line 37 of file Dilation.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class InputStorageType, class OutputStorageType>
int Dilation::Dilate3Fast | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dest,
 |  | bool | Neighbor4 = false
 | ) |

Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.

src and dest must NOT be the same!

Author:
woelk, grest 04/2006

Definition at line 186 of file Dilation.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), and BIAS::ImageBase::GetPixelCount().

template<class InputStorageType, class OutputStorageType>
int Dilation::Dilate3Fast | ( | const Image< InputStorageType > & | src,
 |  | const Image< InputStorageType > & | orig,
 |  | Image< OutputStorageType > & | dest,
 |  | bool | Neighbor4 = false
 | ) |

Very fast dilate with 3x3 mask, all values, which are not not zero, are treated as foreground.

The src img is dilated with pixels from orig. Therefore src and orig MUST NOT be the same, set orig to a 255 image if u have no original grey image. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!

Author:
Daniel Grest, Sept. 2002 tested

Definition at line 96 of file Dilation.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), and BIAS::ImageBase::GetPixelCount().

template<class InputStorageType, class OutputStorageType>
int Morphology::FillBorderConst | ( | Image< OutputStorageType > & | Image,
 |  | unsigned short int | XBorderSize,
 |  | unsigned short int | YBorderSize,
 |  | OutputStorageType | Value
 | ) | [inherited]

fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis

Definition at line 66 of file Morphology.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int Dilation::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Does the dilation.

ROI ignored, but set if TBH_valid

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 269 of file Dilation.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void Dilation::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 312 of file Dilation.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize ( int size ) [inline, inherited]

Definition at line 58 of file Morphology.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
int* BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_ [protected, inherited]

pointer into param object, determines influence region size

Definition at line 75 of file Morphology.hh.

Referenced by BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology().

The documentation for this class was generated from the following files:
  • Filter/Dilation.hh
  • Filter/Dilation.cpp
Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Distribution Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Distribution

BIAS::Distribution Class Reference

class for calculating mean, variance and possibly other parameters More...

#include <Base/Math/Distribution.hh>

List of all members.

Public Member Functions

void | AddData (const std::vector< double > &data)
Distribution ()
unsigned | GetCount ()
double | GetMean ()
double | GetSigma ()
double | GetVariance ()
void Reset ()
~Distribution ()

Protected Attributes

unsigned | Count_
double | SquaredSum_
double | Sum_

Detailed Description

class for calculating mean, variance and possibly other parameters

Author:
woelk 08/2005

Definition at line 38 of file Distribution.hh.

Constructor & Destructor Documentation

Distribution::Distribution ( )

Definition at line 30 of file Distribution.cpp.

References Reset().

Distribution::~Distribution ( )

Definition at line 36 of file Distribution.cpp.

Member Function Documentation

void BIAS::Distribution::AddData ( const std::vector< double > & data )

unsigned BIAS::Distribution::GetCount ( ) [inline]

Definition at line 48 of file Distribution.hh.

double BIAS::Distribution::GetMean ( ) [inline]

Definition at line 51 of file Distribution.hh.

References BIASASSERT.

double BIAS::Distribution::GetSigma ( ) [inline]

Definition at line 59 of file Distribution.hh.

double BIAS::Distribution::GetVariance ( ) [inline]

Definition at line 54 of file Distribution.hh.

References BIASASSERT.

void Distribution::Reset ( )

Definition at line 39 of file Distribution.cpp.

References Count_, SquaredSum_, and Sum_.

Referenced by Distribution().

Member Data Documentation

unsigned BIAS::Distribution::Count_ [protected]

Definition at line 65 of file Distribution.hh.

Referenced by Reset().

double BIAS::Distribution::SquaredSum_ [protected]

Definition at line 64 of file Distribution.hh.

Referenced by Reset().

double BIAS::Distribution::Sum_ [protected]

Definition at line 63 of file Distribution.hh.

Referenced by Reset().

The documentation for this class was generated from the following files:
  • Base/Math/Distribution.hh
  • Base/Math/Distribution.cpp
Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DistTransform< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DistTransform

BIAS::DistTransform< InputStorageType, OutputStorageType > Class Template Reference

a class for calculating the distance transform More...

#include <Filter/DistTransform.hh>

Inheritance diagram for BIAS::DistTransform< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::DistTransform< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
DistTransform ()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Calculates the distanceImage from src converts the given image to a distance transformed image (the Borgefor distance is used, that means one step in diagonal direction has a distance of 4 other steps have distances of 3);
The pixel set, to which the distance is calculated has to be marked as zero valued pixels, e.g.
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetZeroLevel (InputStorageType value)
virtual | ~DistTransform ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
void | InitDistanceImage_ (BIAS::Image< OutputStorageType > &img)
void | MakeDistanceImage_ (BIAS::Image< OutputStorageType > &img)

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
InputStorageType | zeroLevel_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::DistTransform< InputStorageType, OutputStorageType >

a class for calculating the distance transform

Author:
Dennis Herzog, Jan. 2005, edited by grest

Definition at line 43 of file DistTransform.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
BIAS::DistTransform< InputStorageType, OutputStorageType >::DistTransform ( ) [inline]

Definition at line 48 of file DistTransform.hh.

template<class InputStorageType, class OutputStorageType>
virtual BIAS::DistTransform< InputStorageType, OutputStorageType >::~DistTransform ( ) [inline, virtual]

Definition at line 49 of file DistTransform.hh.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int DistTransform::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Calculates the distanceImage from src converts the given image to a distance transformed image (the Borgefor distance is used, that means one step in diagonal direction has a distance of 4 other steps have distances of 3);
The pixel set, to which the distance is calculated has to be marked as zero valued pixels, e.g.

grey value zero or SetZeroLevel()

Author:
herzog
Parameters:
img input and output image

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 65 of file DistTransform.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetStorageType(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), and BIAS::ImageBase::ST_unsignedchar.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void DistTransform::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 82 of file DistTransform.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void DistTransform::InitDistanceImage_ ( BIAS::Image< OutputStorageType > & img ) [protected]

Definition at line 15 of file DistTransform.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), and BIAS::DistTransform< InputStorageType, OutputStorageType >::zeroLevel_.

Referenced by BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
void DistTransform::MakeDistanceImage_ ( BIAS::Image< OutputStorageType > & img ) [protected]

Definition at line 32 of file DistTransform.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and minDEF.

Referenced by BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::DistTransform< InputStorageType, OutputStorageType >::SetZeroLevel ( InputStorageType value ) [inline]

Definition at line 64 of file DistTransform.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
InputStorageType BIAS::DistTransform< InputStorageType, OutputStorageType >::zeroLevel_ [protected]

Definition at line 69 of file DistTransform.hh.

Referenced by BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_().

The documentation for this class was generated from the following files:
  • Filter/DistTransform.hh
  • Filter/DistTransform.cpp
Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::dndFileTarget Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::dndFileTarget

BIAS::dndFileTarget Class Reference

drag and drop files onto application. More...

#include <Gui/dndFileTarget.hh>

List of all members.

Public Member Functions

dndFileTarget (wxFrame *frame)
bool | OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames)

Protected Attributes

wxFrame * | m_frame

Detailed Description

drag and drop files onto application.

drag a file from MS explorer or kde file manager directly on an application (instead of using a load from filename function.)

Author:
Jan Woetzel 03/2005

Definition at line 19 of file dndFileTarget.hh.

Constructor & Destructor Documentation

dndFileTarget::dndFileTarget ( wxFrame * frame )

Author:
Jan Woetzel 03/2005

Definition at line 12 of file dndFileTarget.cpp.

References m_frame.

Member Function Documentation

bool dndFileTarget::OnDropFiles | ( | wxCoord | x,
 |  | wxCoord | y,
 |  | const wxArrayString & | filenames
 | ) |

Definition at line 15 of file dndFileTarget.cpp.

References BIAS::AsciiToWx(), BIASASSERT, and m_frame.

Member Data Documentation

wxFrame* BIAS::dndFileTarget::m_frame [protected]

Definition at line 24 of file dndFileTarget.hh.

Referenced by dndFileTarget(), and OnDropFiles().

The documentation for this class was generated from the following files:
  • Gui/dndFileTarget.hh
  • Gui/dndFileTarget.cpp
Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: doublecomplex Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

doublecomplex Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef doublereal | i
typedef doublereal | i
typedef doublereal | r
typedef doublereal | r

Detailed Description

Definition at line 17 of file f2c_gnu011.h.

Member Typedef Documentation

typedef doublereal doublecomplex::i

Definition at line 18 of file win32_f2c.h.

typedef doublereal doublecomplex::i

Definition at line 17 of file f2c_gnu011.h.

typedef doublereal doublecomplex::r

Definition at line 18 of file win32_f2c.h.

typedef doublereal doublecomplex::r

Definition at line 17 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::doubleRANSAC Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::doubleRANSAC

BIAS::doubleRANSAC Class Reference

#include <MathAlgo/Examples/ExampleRANSAC_double.hh>

Inheritance diagram for BIAS::doubleRANSAC:

[legend]
Collaboration diagram for BIAS::doubleRANSAC:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
doubleRANSAC ()
this is a class evaluating the mean of the double data assuming some outlier using the RANSAC algorithm
bool | EvaluateSolution (const double &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag)
evaluate the goodness of a solution
virtual bool | GenerateSamples (int sample_index, std::vector< unsigned int > &which_samples)
pick a set of samples
bool | GenerateSamplesEvenspace (int sample_index, std::vector< unsigned int > &sample_table)
bool | GenerateSamplesRandom (int sample_index, std::vector< unsigned int > &sampletable)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFinalScore () const
int | GetSampleSolutions (std::vector< unsigned int > &which_samples, std::vector< double > &solutions)
Compute solution(s) for the given set of samples.
void | Init (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
void | Init (std::vector< double > &data, unsigned int data_length, double inlier_distance_threshold, bool refine_solution, unsigned int sample_size, double expected_inlier_fraction, double solution_error_threshold)
void | PrintDebugLevel (std::ostream &os=std::cout) const
RANSAC (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.
RANSAC ()
bool | RefineSolution (std::vector< unsigned int > &which_samples, double &solution, std::vector< bool > &new_inliers)
refine previously computed solution based on its inliers
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxSamples (unsigned int max_samples)
Explicitly set max number of samples.
void | SetSampleCount (unsigned int uiSamples)
Explicitly set number of samples.
virtual int | SolveMaster (double inlying_data_fraction, double &solution, std::vector< bool > &inliers)
MAIN function called by user.
~doubleRANSAC ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Static Protected Member Functions

static int | ComputeSampleCount (double inlying_data_fraction, double desired_prob_good, unsigned int sample_size)

Protected Attributes

bool | _bRefineSolution
do we want to refine a good sample
double | _dBestInlierEvaluateScore
double | _dBestSampleEvaluateScore
double | _dExpectedInlierFraction
double | _dInlierDistanceThreshold
double | _dProbabilityOfGoodSolution
prob. for computing number of samples, set close to 1
double | _dSolutionErrorThreshold
double | _dSoSmallSolutionChange
If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.
bool | _got_solution_flag
if we already have a solution for which EvaluateSolution returned true
bool | _greedy
if true, the first acceptable solution is returned
int | _iBestInlierAcceptCount
refined best values
int | _iBestSampleAcceptCount
sampled best values
long int | _liDebugLevel
unsigned | _uiDataSize
number of data elements needed to compute a solution
unsigned int | _uiExplicitSampleNo
use this number of samples
unsigned int | _uiMaxSamples
absolute max number of samples
unsigned | _uiMaxSolutionsPerSample
max number of solutions that are to be computed for one sample set
unsigned | _uiSampleSize
number of samples available
std::vector< double > | _vData

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 37 of file ExampleRANSAC_double.hh.

Constructor & Destructor Documentation

BIAS::doubleRANSAC::doubleRANSAC ( ) [inline]

this is a class evaluating the mean of the double data assuming some outlier using the RANSAC algorithm

Definition at line 78 of file ExampleRANSAC_double.hh.

BIAS::doubleRANSAC::~doubleRANSAC ( ) [inline]

Definition at line 81 of file ExampleRANSAC_double.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

static int BIAS::RANSAC< double >::ComputeSampleCount | ( | double | inlying_data_fraction,
 |  | double | desired_prob_good,
 |  | unsigned int | sample_size
 | ) | [static, protected, inherited]

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool BIAS::doubleRANSAC::EvaluateSolution | ( | const double & | solution,
 |  | bool | existing_solution_flag,
 |  | std::vector< bool > & | inlier,
 |  | int & | accept_count,
 |  | double & | evaluate_score,
 |  | bool & | ok_to_terminate_flag
 | ) | [inline, virtual]

evaluate the goodness of a solution

For the specified solution, set

  • an accept count indicating the number of data which are inliers to the given solution,
  • the inlier flag for each datum to true if the datum is inlying
  • an evaluate score (typically the average residual) indicating the goodness of fit of the inliers - the solver code requires a positive number where zero is a perfect solution, larger positive scores mean a worse solution.
  • an ok_to_terminate flag which is set TRUE if the solution is good enough that the robust solver can discontinue search for a better solution.

If existing_solution_flag is true, then the best accept count so far is in accept_count. The function can terminate early if it is not going to beat this.

A skeleton implementation of this function would be written as follows:

     *  int my_accept_count = 0;
     *  for (unsigned int i=0; i<_uiDataSize; i++) {
     *    inlier[i] = Consistent(corner_matches[i], solution);
     *    if (inlier[i]) {
     *      my_accept_count++;
     *      evaluate_score += Residual(corner_matches[i], solution);
     *      if (existing_solution_flag && my_accept_count>accept_count)
     *        break;
     *    }
     *  }
     *  accept_count=my_accept_count;
     *  evaluate_score=(accept_count!=0)?(evaluate_score/accept_count):
     *    (DBL_MAX);
     *  if (evaluate_score < solution_error_threshold &&
     *      (double)accept_count/(double)_uiDataSize > min_inlier_fraction)
     *    ok_to_terminate_flag=true;
     *  else
     *    ok_to_terminate_flag=false;
     *  return (accept_count!=0) // maybe even (accept_count>inl_frac)
     *

Parameters:
solution | (in) solution to be evaluated
existing_solution_flag | (in) if true the best accept_cout so far is given in accept_count
accept_count | (in/out) input: best accept_cout so far if existing_solution_flag==true, output: number of inliers to the current solution
inlier | (out) inlier[i] ==> datum i is inlying
evaluate_score | (out) a score for the solution, 0 means ideal solution, larger score means worse solution
ok_to_termiate_flag | (out) if true, RANSACing will stop

Reimplemented from BIAS::RANSAC< double >.

Definition at line 111 of file ExampleRANSAC_double.hh.

References _dExpectedInlierFraction, _dInlierDistanceThreshold, _dSolutionErrorThreshold, BIAS::RANSAC< double >::_uiDataSize, _vData, BIASDOUT, and D_DOUBLE_RANSAC_SOLUTION.

virtual bool BIAS::RANSAC< double >::GenerateSamples | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [virtual, inherited]

pick a set of samples

Override this to specialize the technique used to generate samples. By default, random sampling is assumed but implementations may wish to use the latin-square sampling provided by generate_sample_evenspace (below), or some other problem-specific sampling strategy.

bool BIAS::RANSAC< double >::GenerateSamplesEvenspace | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sample_table
 | ) | [inherited]

bool BIAS::RANSAC< double >::GenerateSamplesRandom | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sampletable
 | ) | [inherited]

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

double BIAS::RANSAC< double >::GetFinalScore ( ) const [inline, inherited]

Definition at line 233 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::doubleRANSAC::GetSampleSolutions | ( | std::vector< unsigned int > & | which_samples,
 |  | std::vector< double > & | solutions
 | ) | [inline, virtual]

Compute solution(s) for the given set of samples.

Returns:
the number of solutions found.
The which_samples array will be of length sample_size, selecting the indices to be fit to from the subclass's data array.

Reimplemented from BIAS::RANSAC< double >.

Definition at line 99 of file ExampleRANSAC_double.hh.

References _vData, and mean.

void BIAS::RANSAC< double >::Init | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) | [inherited]

Referenced by Init().

void BIAS::doubleRANSAC::Init | ( | std::vector< double > & | data,
 |  | unsigned int | data_length,
 |  | double | inlier_distance_threshold,
 |  | bool | refine_solution,
 |  | unsigned int | sample_size,
 |  | double | expected_inlier_fraction,
 |  | double | solution_error_threshold
 | ) | [inline]

Definition at line 84 of file ExampleRANSAC_double.hh.

References _dExpectedInlierFraction, _dInlierDistanceThreshold, _dSolutionErrorThreshold, BIAS::RANSAC< double >::_uiDataSize, _vData, and BIAS::RANSAC< double >::Init().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

BIAS::RANSAC< double >::RANSAC | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) | [inherited]

Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.

If the refine_solution flag is true, a routine has been supplied to refine the initial fits before evaluation.

BIAS::RANSAC< double >::RANSAC ( ) [inherited]

bool BIAS::doubleRANSAC::RefineSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | double & | solution,
 |  | std::vector< bool > & | new_inliers
 | ) | [inline, virtual]

refine previously computed solution based on its inliers

If implemented, this function should compute a more accurate solution, e.g. a least squares on all inliers, possibly using as an initial estimate the solution in solution. The output array new_inliers should be set to reflect the inliers to the new solution.

Returns:
false if no better solution than the initial could be found

Reimplemented from BIAS::RANSAC< double >.

Definition at line 155 of file ExampleRANSAC_double.hh.

References _dInlierDistanceThreshold, _vData, BIASDOUT, and D_DOUBLE_RANSAC_SOLUTION.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::RANSAC< double >::SetMaxSamples ( unsigned int max_samples ) [inline, inherited]

Explicitly set max number of samples.

Ransacing will stop after max_samples samples, regardless of solution quality. Normally, more than a few thousand samples signifies a problem.

Definition at line 100 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_uiMaxSamples.

void BIAS::RANSAC< double >::SetSampleCount ( unsigned int uiSamples ) [inline, inherited]

Explicitly set number of samples.

Explicitly set number of samples to make in SolveMaster, i.e. Value of ComputeSampleCount() is ignored if this function is called with a strictly positive value uiSamples. Note: SolveMaster performs at most min(_uiMaxSamples, uiSamples) iterations

Author:
koeser

Definition at line 112 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo.

virtual int BIAS::RANSAC< double >::SolveMaster | ( | double | inlying_data_fraction,
 |  | double & | solution,
 |  | std::vector< bool > & | inliers
 | ) | [virtual, inherited]

MAIN function called by user.

This function is called to run the computation. On output, solution is set to the best solution found and inliers indicate which data were inliers to that solution. The inlying_data_fraction is responsible for the maximal number of sample sets taken from the data. The smaller the inlying_data_fraction, the more sample sets are taken

Attention:
Do NOT override this function in derived classes, unless you want to do modifications in the RANSAC _algorithm_ itself (and usually you dont want to do this ...) input : inlying_data_fraction expected inlier fraction output: solution solution inliers inlier flags
Returns:
<0 indicates an error, otherwise number of chosen sample
Author:
frahm, woelk

Member Data Documentation

bool BIAS::RANSAC< double >::_bRefineSolution [protected, inherited]

do we want to refine a good sample

Definition at line 246 of file RANSAC.hh.

double BIAS::RANSAC< double >::_dBestInlierEvaluateScore [protected, inherited]

Definition at line 254 of file RANSAC.hh.

double BIAS::RANSAC< double >::_dBestSampleEvaluateScore [protected, inherited]

Definition at line 250 of file RANSAC.hh.

double BIAS::doubleRANSAC::_dExpectedInlierFraction [protected]

Definition at line 74 of file ExampleRANSAC_double.hh.

Referenced by EvaluateSolution(), and Init().

double BIAS::doubleRANSAC::_dInlierDistanceThreshold [protected]

Definition at line 70 of file ExampleRANSAC_double.hh.

Referenced by EvaluateSolution(), Init(), and RefineSolution().

double BIAS::RANSAC< double >::_dProbabilityOfGoodSolution [protected, inherited]

prob. for computing number of samples, set close to 1

Definition at line 263 of file RANSAC.hh.

double BIAS::doubleRANSAC::_dSolutionErrorThreshold [protected]

Definition at line 75 of file ExampleRANSAC_double.hh.

Referenced by EvaluateSolution(), and Init().

double BIAS::RANSAC< double >::_dSoSmallSolutionChange [protected, inherited]

If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.

Definition at line 267 of file RANSAC.hh.

bool BIAS::RANSAC< double >::_got_solution_flag [protected, inherited]

if we already have a solution for which EvaluateSolution returned true

Definition at line 270 of file RANSAC.hh.

bool BIAS::RANSAC< double >::_greedy [protected, inherited]

if true, the first acceptable solution is returned

Definition at line 273 of file RANSAC.hh.

int BIAS::RANSAC< double >::_iBestInlierAcceptCount [protected, inherited]

refined best values

Definition at line 253 of file RANSAC.hh.

int BIAS::RANSAC< double >::_iBestSampleAcceptCount [protected, inherited]

sampled best values

Definition at line 249 of file RANSAC.hh.

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

unsigned BIAS::RANSAC< double >::_uiDataSize [protected, inherited]

number of data elements needed to compute a solution

Definition at line 243 of file RANSAC.hh.

Referenced by EvaluateSolution(), and Init().

unsigned int BIAS::RANSAC< double >::_uiExplicitSampleNo [protected, inherited]

use this number of samples

Definition at line 260 of file RANSAC.hh.

unsigned int BIAS::RANSAC< double >::_uiMaxSamples [protected, inherited]

absolute max number of samples

Definition at line 257 of file RANSAC.hh.

unsigned BIAS::RANSAC< double >::_uiMaxSolutionsPerSample [protected, inherited]

max number of solutions that are to be computed for one sample set

Definition at line 240 of file RANSAC.hh.

unsigned BIAS::RANSAC< double >::_uiSampleSize [protected, inherited]

number of samples available

Definition at line 237 of file RANSAC.hh.

std::vector<double> BIAS::doubleRANSAC::_vData [protected]

Definition at line 67 of file ExampleRANSAC_double.hh.

Referenced by EvaluateSolution(), GetSampleSolutions(), Init(), and RefineSolution().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following file:
  • MathAlgo/Examples/ExampleRANSAC_double.hh
Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: DragAndDropTarget Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

DragAndDropTarget Class Reference

drag and drop files onto application. More...

Collaboration diagram for DragAndDropTarget:

[legend]
List of all members.

Public Member Functions

DragAndDropTarget (MainFrame *frame)
DragAndDropTarget (MainFrame *frame)
virtual bool | OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames)
virtual bool | OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames)

Protected Attributes

MainFrame * _Frame
MainFrame * Frame_

Detailed Description

drag and drop files onto application.

drag a file from MS explorer or kde file manager directly onto an application (instaed of using a load from filename function.)

Definition at line 552 of file biasdetectunvignettewx.cpp.

Constructor & Destructor Documentation

DragAndDropTarget::DragAndDropTarget ( MainFrame * frame )

Definition at line 562 of file biasdetectunvignettewx.cpp.

References Frame_.

DragAndDropTarget::DragAndDropTarget ( MainFrame * frame )

Member Function Documentation

virtual bool DragAndDropTarget::OnDropFiles | ( | wxCoord | x,
 |  | wxCoord | y,
 |  | const wxArrayString & | filenames
 | ) | [virtual]

bool DragAndDropTarget::OnDropFiles | ( | wxCoord | x,
 |  | wxCoord | y,
 |  | const wxArrayString & | filenames
 | ) | [virtual]

Definition at line 567 of file biasdetectunvignettewx.cpp.

References BIASASSERT, Frame_, MainFrame::ImageFileNames_, and MainFrame::LoadImagesAndCalculate().

Member Data Documentation

MainFrame* DragAndDropTarget::_Frame [protected]

Definition at line 710 of file biasviewwx.cpp.

MainFrame* DragAndDropTarget::Frame_ [protected]

Definition at line 559 of file biasdetectunvignettewx.cpp.

Referenced by DragAndDropTarget(), and OnDropFiles().

The documentation for this class was generated from the following files:
  • Tools/biasdetectunvignettewx.cpp
  • Tools/biasviewwx.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::DrawTextGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::DrawTextGL

BIAS::DrawTextGL Class Reference

Draw text to OpenGL as 2D bitmap font. More...

#include <Gui/DrawTextGL.hh>

Collaboration diagram for BIAS::DrawTextGL:

[legend]
List of all members.

Public Member Functions

void DeleteFont ()
frees the display lists JW
DrawTextGL ()
ctor JW
int | InitFont (void *handleDC, const std::string &theFontname=std::string(DrawTextGL_DEFAULT_FONTNAME), const int &fontHeight=DrawTextGL_DEFAULT_FONTSIZE)
set the font up
bool | IsInitialized () const
void | Print (const std::string &text) const
print text on OpenGL screen using current RasterPosition , settings etc.
void | Print3D (const std::string &text, const float &xpos, const float &ypos, const float &zpos) const
void | Print3DAbsolute (const std::string &text, const float &xpos, const float &ypos, const float &zpos) const
draw text in 3d at absolute position, thus ModelView matrix is set to identity (using push and pop).
void | PrintNormCoords (const std::string &text, const float &xpos, const float &ypos) const
print text on OpenGL screen in 0.
void | PrintWinCoords (const std::string &text, const int &xpos, const int &ypos, const int &winWidthFallback=640, const int &winHeightFallback=480) const
print text on OpenGL screen at 2D pos (xpos,ypos) in windows (pixel) coordiantes.
virtual | ~DrawTextGL ()
destructor, kills display lists JW

Protected Attributes

unsigned int | base
inde xof our first display list:
std::string | fontname
the name of our font, e.g. "Arial" or "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1");"
bool | initialized
true if we created teh font as display lists

Detailed Description

Draw text to OpenGL as 2D bitmap font.

Implemented as setting up a 2D display list for every standard character.

  • Creates font by given name and size "on the fly" for all installed fonts, e.g. True Type fonts or GLX fonts.
  • Does not depend on third party libraries (like glut,..)
  • Does not need to read a pre-rendered font from disk (like glf does)
  • The font has to be available on each client machine at runtime, fallback is tried for unsupported font names.

Uses standard Win32 calls to render TTF fonts on Windows and GLX fonts on Linux.

Tested with MS Windows XP and (Suse 9.2) Linux (JW).

See Gui/Examples/ExampleGLShared for an Example.

See http://www.opengl.org/resources/features/fontsurvey/ for other possible implementations, in particular 3D "outlined" fonts.

Author:
Jan Woetzel

Definition at line 47 of file DrawTextGL.hh.

Constructor & Destructor Documentation

DrawTextGL::~DrawTextGL ( ) [virtual]

destructor, kills display lists JW

Definition at line 38 of file DrawTextGL.cpp.

References DeleteFont().

DrawTextGL::DrawTextGL ( )

ctor JW

Definition at line 44 of file DrawTextGL.cpp.

References base, and fontname.

Member Function Documentation

void DrawTextGL::DeleteFont ( )

frees the display lists JW

Definition at line 170 of file DrawTextGL.cpp.

References base, and CHARS_N.

Referenced by InitFont(), and ~DrawTextGL().

int DrawTextGL::InitFont | ( | void * | handleDC,
 |  | const std::string & | theFontname = std::string(DrawTextGL_DEFAULT_FONTNAME),
 |  | const int & | fontHeight = DrawTextGL_DEFAULT_FONTSIZE
 | ) |

set the font up

Returns:
0 on success, negativ eon error JW
Parameters:
theFontname | name of teh fornt, e.g. "Arial"
theFontname | e.g. "Arial", "Times New Roman" or on Linux: "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1");"
handleDC | pointer to protected GDI device context, on WIN32: a HDC, e.g. for wxWindow use: GetDC(HWND(this->GetHandle())) on Linux: .. TODO ..
Author:
Jan Woetzel

Definition at line 57 of file DrawTextGL.cpp.

References base, BIASASSERT, BIASERR, CHARS_N, CHARS_START, DeleteFont(), fontname, and initialized.

Referenced by MyGLCanvas::InitGeometry(), and BIAS::OpenGLCanvasBase::InitWithContext().

bool BIAS::DrawTextGL::IsInitialized ( ) const [inline]

Definition at line 106 of file DrawTextGL.hh.

Referenced by MyGLCanvas::DisplayCalls(), and BIAS::GeometryGL::DisplayCoordCrossAxesLabel().

void DrawTextGL::Print ( const std::string & text ) const

print text on OpenGL screen using current RasterPosition , settings etc.

JW

Definition at line 275 of file DrawTextGL.cpp.

References base, CHARS_START, and initialized.

Referenced by Print3D(), PrintNormCoords(), and PrintWinCoords().

void DrawTextGL::Print3D | ( | const std::string & | text,
 |  | const float & | xpos,
 |  | const float & | ypos,
 |  | const float & | zpos
 | ) | const

Definition at line 251 of file DrawTextGL.cpp.

References Print().

Referenced by Print3DAbsolute().

void DrawTextGL::Print3DAbsolute | ( | const std::string & | text,
 |  | const float & | xpos,
 |  | const float & | ypos,
 |  | const float & | zpos
 | ) | const

draw text in 3d at absolute position, thus ModelView matrix is set to identity (using push and pop).

Projection matrix is kept JW

Definition at line 260 of file DrawTextGL.cpp.

References Print3D().

void DrawTextGL::PrintNormCoords | ( | const std::string & | text,
 |  | const float & | xpos,
 |  | const float & | ypos
 | ) | const

print text on OpenGL screen in 0.

.1 normalized coordinates with origin at lower left corner with 0..1 normalizedx coordinates and origin in lower left corner:

    Y=1
     ^
     |
     |
    0,0  ---> x=1
JW

Definition at line 178 of file DrawTextGL.cpp.

References BIASERR, and Print().

void DrawTextGL::PrintWinCoords | ( | const std::string & | text,
 |  | const int & | xpos,
 |  | const int & | ypos,
 |  | const int & | winWidthFallback = 640,
 |  | const int & | winHeightFallback = 480
 | ) | const

print text on OpenGL screen at 2D pos (xpos,ypos) in windows (pixel) coordiantes.

Parameters:
winWidthFallback | and
winHeightFallback | are used only as GL 1.1 fallback. JW

Definition at line 213 of file DrawTextGL.cpp.

References Print().

Referenced by MyGLCanvas::DisplayCalls().

Member Data Documentation

unsigned int BIAS::DrawTextGL::base [protected]

inde xof our first display list:

Definition at line 118 of file DrawTextGL.hh.

Referenced by DeleteFont(), DrawTextGL(), InitFont(), and Print().

std::string BIAS::DrawTextGL::fontname [protected]

the name of our font, e.g. "Arial" or "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1");"

Definition at line 106 of file DrawTextGL.hh.

Referenced by DrawTextGL(), and InitFont().

bool BIAS::DrawTextGL::initialized [protected]

true if we created teh font as display lists

Definition at line 115 of file DrawTextGL.hh.

Referenced by InitFont(), and Print().

The documentation for this class was generated from the following files:
  • Gui/DrawTextGL.hh
  • Gui/DrawTextGL.cpp
Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EightWaySymmetry< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EightWaySymmetry

BIAS::EightWaySymmetry< T > Class Template Reference

#include <Base/Image/EightWaySymmetry.hh>

Inheritance diagram for BIAS::EightWaySymmetry< T >:

[legend]
List of all members.

Public Member Functions

enum TLineType | DetermineLineType (const T &startx, const T &starty, const T &endx, const T &endy)
not tested jet
enum TLineType | DetermineLineType (double &angle)
assumes angle is between (-pi, pi] as given by atan2
void | InverseTransform (enum TLineType &type, const T transf[2], T orig[2])
void | InverseTransform (enum TLineType &type, const T &Transformedx, const T &Transformedy, T &Originalx, T &Originaly)
executes the inverse transformation to the above
void | Transform (enum TLineType &type, const T orig[2], T transf[2])
void | Transform (enum TLineType &type, const T &Originalx, const T &Originaly, T &Transformedx, T &Transformedy)
transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)

Detailed Description

template<class T>
class BIAS::EightWaySymmetry< T >

Definition at line 52 of file EightWaySymmetry.hh.

Member Function Documentation

template<class T>
TLineType BIAS::EightWaySymmetry< T >::DetermineLineType | ( | const T & | startx,
 |  | const T & | starty,
 |  | const T & | endx,
 |  | const T & | endy
 | ) | [inline]

not tested jet

Definition at line 114 of file EightWaySymmetry.hh.

References BIAS::E_NE, BIAS::LT_Invalid, BIAS::N_NW, BIAS::NE_N, BIAS::NW_W, BIAS::S_SE, BIAS::SE_E, BIAS::SW_S, type, and BIAS::W_SW.

template<class T>
TLineType BIAS::EightWaySymmetry< T >::DetermineLineType ( double & angle ) [inline]

assumes angle is between (-pi, pi] as given by atan2

Reimplemented in BIAS::EightWaySymmetryHomg.

Definition at line 89 of file EightWaySymmetry.hh.

References BIAS::E_NE, BIAS::LT_Invalid, BIAS::N_NW, BIAS::NE_N, BIAS::NW_W, BIAS::S_SE, BIAS::SE_E, BIAS::SW_S, type, and BIAS::W_SW.

Referenced by BIAS::Bresenham::Init(), and BIAS::ImageDraw< StorageType >::InterpolatedLineGrey().

template<class T>
void BIAS::EightWaySymmetry< T >::InverseTransform | ( | enum TLineType & | type,
 |  | const T | transf[2],
 |  | T | orig[2]
 | ) | [inline]

Definition at line 254 of file EightWaySymmetry.hh.

template<class T>
void BIAS::EightWaySymmetry< T >::InverseTransform | ( | enum TLineType & | type,
 |  | const T & | Transformedx,
 |  | const T & | Transformedy,
 |  | T & | Originalx,
 |  | T & | Originaly
 | ) | [inline]

executes the inverse transformation to the above

Definition at line 200 of file EightWaySymmetry.hh.

References BIASERR.

Referenced by BIAS::ScanLine2::GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::ImageDraw< StorageType >::InterpolatedLineGrey().

template<class T>
void BIAS::EightWaySymmetry< T >::Transform | ( | enum TLineType & | type,
 |  | const T | orig[2],
 |  | T | transf[2]
 | ) | [inline]

Definition at line 246 of file EightWaySymmetry.hh.

template<class T>
void BIAS::EightWaySymmetry< T >::Transform | ( | enum TLineType & | type,
 |  | const T & | Originalx,
 |  | const T & | Originaly,
 |  | T & | Transformedx,
 |  | T & | Transformedy
 | ) | [inline]

transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)

Definition at line 155 of file EightWaySymmetry.hh.

References BIASERR.

Referenced by BIAS::Bresenham::Init(), and BIAS::ImageDraw< StorageType >::InterpolatedLineGrey().

The documentation for this class was generated from the following file:
  • Base/Image/EightWaySymmetry.hh
Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EightWaySymmetryHomg Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EightWaySymmetryHomg

BIAS::EightWaySymmetryHomg Class Reference

direction of line if start is in coordinate origin as given by compass More...

#include <Geometry/EightWaySymmetryHomg.hh>

Inheritance diagram for BIAS::EightWaySymmetryHomg:

[legend]
Collaboration diagram for BIAS::EightWaySymmetryHomg:

[legend]
List of all members.

Public Member Functions

enum TLineType | DetermineLineType (const double &startx, const double &starty, const double &endx, const double &endy)
not tested jet
enum TLineType | DetermineLineType (HomgPoint2D &start, HomgPoint2D &end)
not tested jet
enum TLineType | DetermineLineType (double &angle)
assumes angle is between (-pi, pi] as given by atan2
void | InverseTransform (enum TLineType &type, const doubletransf[2], doubleorig[2])
void | InverseTransform (enum TLineType &type, const double &Transformedx, const double &Transformedy, double &Originalx, double &Originaly)
executes the inverse transformation to the above
template<class T>
void | InverseTransform (enum TLineType &type, Vector2< T > &Transformed, Vector2< T > &Original)
as above
void | InverseTransform (enum TLineType &type, HomgPoint2D &Transformed, HomgPoint2D &Original)
executes the inverse transformation to the above
void | Transform (enum TLineType &type, const doubleorig[2], doubletransf[2])
void | Transform (enum TLineType &type, const double &Originalx, const double &Originaly, double &Transformedx, double &Transformedy)
transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)
template<class T>
void | Transform (enum TLineType &type, Vector2< T > &Original, Vector2< T > &Transformed)
as above
void | Transform (enum TLineType &type, HomgPoint2D &Original, HomgPoint2D &Transformed)
transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)

Detailed Description

direction of line if start is in coordinate origin as given by compass

Definition at line 44 of file EightWaySymmetryHomg.hh.

Member Function Documentation

enum TLineType BIAS::EightWaySymmetry< double >::DetermineLineType | ( | const double & | startx,
 |  | const double & | starty,
 |  | const double & | endx,
 |  | const double & | endy
 | ) | [inline, inherited]

not tested jet

enum TLineType BIAS::EightWaySymmetryHomg::DetermineLineType | ( | HomgPoint2D & | start,
 |  | HomgPoint2D & | end
 | ) | [inline]

not tested jet

Definition at line 52 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::DetermineLineType().

enum TLineType BIAS::EightWaySymmetryHomg::DetermineLineType ( double & angle ) [inline]

assumes angle is between (-pi, pi] as given by atan2

Reimplemented from BIAS::EightWaySymmetry< double >.

Definition at line 48 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::DetermineLineType().

Referenced by BIAS::EpipolarLine::Init(), BIAS::EpipolarLine::Recalc(), and BIAS::EpipolarLine::ScanLine().

void BIAS::EightWaySymmetry< double >::InverseTransform | ( | enum TLineType & | type,
 |  | const double | transf[2],
 |  | double | orig[2]
 | ) | [inline, inherited]

void BIAS::EightWaySymmetry< double >::InverseTransform | ( | enum TLineType & | type,
 |  | const double & | Transformedx,
 |  | const double & | Transformedy,
 |  | double & | Originalx,
 |  | double & | Originaly
 | ) | [inline, inherited]

executes the inverse transformation to the above

Referenced by InverseTransform().

template<class T>
void BIAS::EightWaySymmetryHomg::InverseTransform | ( | enum TLineType & | type,
 |  | Vector2< T > & | Transformed,
 |  | Vector2< T > & | Original
 | ) | [inline]

as above

Definition at line 89 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::InverseTransform().

void BIAS::EightWaySymmetryHomg::InverseTransform | ( | enum TLineType & | type,
 |  | HomgPoint2D & | Transformed,
 |  | HomgPoint2D & | Original
 | ) | [inline]

executes the inverse transformation to the above

Definition at line 78 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::InverseTransform().

Referenced by BIAS::EpipolarLine::CalcTransformed_(), and BIAS::EpipolarLine::ScanLine_().

void BIAS::EightWaySymmetry< double >::Transform | ( | enum TLineType & | type,
 |  | const double | orig[2],
 |  | double | transf[2]
 | ) | [inline, inherited]

void BIAS::EightWaySymmetry< double >::Transform | ( | enum TLineType & | type,
 |  | const double & | Originalx,
 |  | const double & | Originaly,
 |  | double & | Transformedx,
 |  | double & | Transformedy
 | ) | [inline, inherited]

transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)

Referenced by Transform().

template<class T>
void BIAS::EightWaySymmetryHomg::Transform | ( | enum TLineType & | type,
 |  | Vector2< T > & | Original,
 |  | Vector2< T > & | Transformed
 | ) | [inline]

as above

Definition at line 72 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::Transform().

void BIAS::EightWaySymmetryHomg::Transform | ( | enum TLineType & | type,
 |  | HomgPoint2D & | Original,
 |  | HomgPoint2D & | Transformed
 | ) | [inline]

transforms Original according to type in a way that Transformed lies on a line with slope in [0,1)

Definition at line 62 of file EightWaySymmetryHomg.hh.

References BIAS::EightWaySymmetry< double >::Transform().

Referenced by BIAS::EpipolarLine::CalcTransformed_().

The documentation for this class was generated from the following file:
  • Geometry/EightWaySymmetryHomg.hh
Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Ellipsoid3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Ellipsoid3DData

BIAS::Ellipsoid3DData Class Reference

stores important data for drawing an ellipsoid More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::Ellipsoid3DData:

[legend]
List of all members.

Public Attributes

BIAS::Vector3< double > | C
center of ellipsoid
BIAS::RGBAuc Color
double | dAngle
rotation in radians around RotAxes
BIAS::Vector3< double > | RotAxis
rot to get 1st mainaxis from (1,0,0)
double | s0
double | s1
double | s2
lengths of main axes

Detailed Description

stores important data for drawing an ellipsoid

Definition at line 133 of file ThreeDOut.hh.

Member Data Documentation

BIAS::Vector3<double> BIAS::Ellipsoid3DData::C

center of ellipsoid

Definition at line 138 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

BIAS::RGBAuc BIAS::Ellipsoid3DData::Color

Definition at line 139 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

double BIAS::Ellipsoid3DData::dAngle

rotation in radians around RotAxes

Definition at line 136 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

BIAS::Vector3<double> BIAS::Ellipsoid3DData::RotAxis

rot to get 1st mainaxis from (1,0,0)

Definition at line 135 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

double BIAS::Ellipsoid3DData::s0

Definition at line 137 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

double BIAS::Ellipsoid3DData::s1

Definition at line 137 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

double BIAS::Ellipsoid3DData::s2

lengths of main axes

Definition at line 137 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::UpdateEllipsoid().

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EMatrix

BIAS::EMatrix Class Reference
[Geometry and Transformations]

class representing an Essential matrix More...

#include <Geometry/EMatrix.hh>

Inheritance diagram for BIAS::EMatrix:

[legend]
Collaboration diagram for BIAS::EMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddDebugLevel (long int lv)
void | AddIP (const Matrix< FMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const FMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | Compose (const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()
void | Compose (const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the Fmatrxi from image 1 to image 2 as [e]_x R
void | ComputeFromPMatrices (BIAS::PMatrix &P1, BIAS::PMatrix &P2)
computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)
bool | DebugLevelIsSet (long int lv) const
void | DecomposetoSR (BIAS::Matrix3x3< double > &skew_matrix, BIAS::Matrix3x3< double > &rank3_matrix)
Decomposes f matrix to product (skew)(rank3).
FMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const FMATRIX_TYPE &scalar)
in place division function
EMatrix (const FMatrixBase &F, KMatrix &K1, KMatrix &K2)
EMatrix (const MatrixInitType &i)
EMatrix ()
FMATRIX_TYPE | epipolarconstraintRemainder (const HomgPoint2D &pointSource, const HomgPoint2D &pointDest)
calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.
void | Fill (const FMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< FMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< FMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
double | GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
FMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
FMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
FMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
FMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
FMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
double | GetEpipolarError (BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2)
computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points
double | GetEpipolarErrorHomogenized (const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const
computes error in epipolar geometry for the given correspondence P1;P2
void | GetEpipolarLineImage1 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 1 for point in image 2.
HomgLine2D | GetEpipolarLineImage1 (const HomgPoint2D &point) const
Returns epipolar line in image 1 for point in image 2.
void | GetEpipolarLineImage2 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 2 for point in image 1.
HomgLine2D | GetEpipolarLineImage2 (const HomgPoint2D &point) const
Returns epipolar line in image 2 for point in image 1.
int | GetEpipoles (HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const
Computes the epipoles from this F Matrix.
void | GetEpipolesHomogenized (HomgPoint2D &E1, HomgPoint2D &E2) const
same as above, additionally homogenizes epipoles
FMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
FMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
FMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
int | GetRotationTranslation (RMatrix &R, Vector3< double > &C, std::vector< HomgPoint2D > &inlier1, std::vector< HomgPoint2D > &inlier2)
find R and C(direction), such that maximum number of 3d points trinagulated from correspondences inlier1 and inlier2 are in front of both cameras
Vector< FMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< FMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< FMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< FMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | InitFromF (const FMatrixBase &F, KMatrix &K1, KMatrix &K2)
assuming K1 and K2 as calibrations of the cameras which refer to the fmatrix, create the nearest valid essential matrix from F
int | Invert (Matrix3x3< FMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< FMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsValid ()
Returns true if all properties of the F-Matrix are correct, at the moment only rank 2 is checked.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< FMATRIX_TYPE > &A)
Matrix (const Matrix< FMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const FMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< FMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< FMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< FMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const FMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
FMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
FMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
FMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
FMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
EMatrix & | operator= (const Matrix3x3< FMATRIX_TYPE > &f)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, FMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, FMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (RMatrixBase &R, Vector3< FMATRIX_TYPE > &C)
set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ)
see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R)
implementation
void | SetAsCrossProductMatrix (const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< FMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< FMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetFromColumnVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< FMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< FMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const FMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< FMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
FMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< FMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< FMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

HomgPoint2D _epipole
bool | _isDecomposed
long int | _liDebugLevel
RMatrixBase _R
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class representing an Essential matrix

A essential matrix describes the orientation and position of two image planes with known calibration. It can be used to estimate the epipolarline and to distinguish between mismatches and probably good matchesbecause there are some type of missmatches which are consistent with the epipolar geometry.

Todo:
create connection to Base/Geometry/EMatrix

Definition at line 52 of file EMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::EMatrix::EMatrix ( ) [inline]

Definition at line 56 of file EMatrix.hh.

BIAS::EMatrix::EMatrix ( const MatrixInitType & i ) [inline, explicit]

Definition at line 58 of file EMatrix.hh.

BIAS::EMatrix::EMatrix | ( | const FMatrixBase & | F,
 |  | KMatrix & | K1,
 |  | KMatrix & | K2
 | ) | [inline]

Definition at line 60 of file EMatrix.hh.

Member Function Documentation

void BIAS::Matrix< FMATRIX_TYPE >::Add | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< FMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< FMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void FMatrixBase::Compose | ( | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) | [inherited]

constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()

Author:
woelk 08/2004

Definition at line 93 of file FMatrixBase.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix3x3< FMATRIX_TYPE >::Mult(), R, BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), and BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Compose | ( | const KMatrix & | K1,
 |  | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const KMatrix & | K2,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) | [inherited]

constructs the Fmatrxi from image 1 to image 2 as [e]_x R

Author:
woelk 08/2004

void FMatrix::ComputeFromPMatrices | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2
 | ) | [inherited]

computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)

Author:
koeser, updated 07/2004

Definition at line 38 of file FMatrix.cpp.

References BIAS::PMatrix::GetNullVector(), BIAS::PMatrix::GetPseudoInverse(), and BIAS::Vector3< T >::GetSkewSymmetricMatrix().

Referenced by main().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void FMatrix::DecomposetoSR | ( | BIAS::Matrix3x3< double > & | skew_matrix,
 |  | BIAS::Matrix3x3< double > & | rank3_matrix
 | ) | [inherited]

Decomposes f matrix to product (skew)(rank3).

Definition at line 98 of file FMatrix.cpp.

References BIAS::FMatrix::GetEpipoles(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by BIAS::PMatrixEstimation::FindClosestP2().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< FMATRIX_TYPE >::Divide | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::DivideIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

FMATRIX_TYPE FMatrixBase::epipolarconstraintRemainder | ( | const HomgPoint2D & | pointSource,
 |  | const HomgPoint2D & | pointDest
 | ) | [inherited]

calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.

calculate the scalar : pointDest'T * F *pointSource

Author:
Jan Woetzel alpha (04/03/2002)

Definition at line 40 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Vector3< T >::ScalarProduct().

void BIAS::Matrix< FMATRIX_TYPE >::Fill ( const FMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

double BIAS::FMatrixBase::GetCosAngleErrorHomogenized | ( | const BIAS::HomgPoint2D & | p1,
 |  | const BIAS::HomgPoint2D & | p2
 | ) | [inline, inherited]

Todo:
optimze

Definition at line 309 of file FMatrixBase.hh.

References BIAS::FMatrixBase::_epipole, BIAS::FMatrixBase::_isDecomposed, BIAS::FMatrixBase::_R, BIASASSERT, BIAS::HomgLine2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::HomgLine2D::Set().

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::FMatrixBase::GetEpipolarErrorHomogenized(), and BIAS::FMatrixBase::GetEpipolarLineImage1().

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

double BIAS::FMatrixBase::GetEpipolarError | ( | BIAS::HomgPoint2D & | P1,
 |  | BIAS::HomgPoint2D & | P2
 | ) | [inline, inherited]

computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points

Author:
koeser 09/2003

Definition at line 165 of file FMatrixBase.hh.

References BIAS::HomgPoint2D::Homogenize().

double BIAS::FMatrixBase::GetEpipolarErrorHomogenized | ( | const BIAS::HomgPoint2D & | P1,
 |  | const BIAS::HomgPoint2D & | P2
 | ) | const [inline, inherited]

computes error in epipolar geometry for the given correspondence P1;P2

this error is the sum of squared distances to epipolar lines in both images, for inliers it should typically be of one or two pixels (if not-normalized pixel coordinates are used)

Attention:
P1 and P2 HAVE TO BE homogenized
Parameters:
P1 | homogenized first point of correspondence to check
P2 | homogenized second point of correspondence to check tested, optimized
Author:
koeser 09/2003

Definition at line 257 of file FMatrixBase.hh.

References BIAS::Matrix< FMATRIX_TYPE >::GetData().

Referenced by FErrorFunction().

void FMatrixBase::GetEpipolarLineImage1 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const [inherited]

Returns epipolar line in image 1 for point in image 2.

Definition at line 65 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Matrix< FMATRIX_TYPE >::GetData().

HomgLine2D FMatrixBase::GetEpipolarLineImage1 ( const HomgPoint2D & point ) const [inherited]

Returns epipolar line in image 1 for point in image 2.

Definition at line 58 of file FMatrixBase.cpp.

void FMatrixBase::GetEpipolarLineImage2 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const [inherited]

Returns epipolar line in image 2 for point in image 1.

Definition at line 87 of file FMatrixBase.cpp.

HomgLine2D FMatrixBase::GetEpipolarLineImage2 ( const HomgPoint2D & point ) const [inherited]

Returns epipolar line in image 2 for point in image 1.

Definition at line 81 of file FMatrixBase.cpp.

int FMatrix::GetEpipoles | ( | HomgPoint2D & | Epipole1,
 |  | HomgPoint2D & | Epipole2
 | ) | const [inherited]

Computes the epipoles from this F Matrix.

Returns:
0 on success, <0 if epipoles could not be retrieved
Author:
JMF/koeser

Definition at line 61 of file FMatrix.cpp.

References D_FMATRIX_GETEPIPOLES, F_SVD_THRESH, BIAS::Debug::GetDebugLevel(), BIAS::SVD::GetNullvector(), BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::SVD::NullspaceDim(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::Triangulation::CorrectCorrespondences(), and BIAS::FMatrix::DecomposetoSR().

void BIAS::FMatrix::GetEpipolesHomogenized | ( | HomgPoint2D & | E1,
 |  | HomgPoint2D & | E2
 | ) | const [inline, inherited]

same as above, additionally homogenizes epipoles

Definition at line 82 of file FMatrix.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by GetRotationTranslation(), main(), and MainFrame::OnLeftDown().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< FMATRIX_TYPE >::GetMaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< FMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

int EMatrix::GetRotationTranslation | ( | RMatrix & | R,
 |  | Vector3< double > & | C,
 |  | std::vector< HomgPoint2D > & | inlier1,
 |  | std::vector< HomgPoint2D > & | inlier2
 | ) |

find R and C(direction), such that maximum number of 3d points trinagulated from correspondences inlier1 and inlier2 are in front of both cameras

Returns:
0=ok, <0 on error, e.g. no triangulation possible

Definition at line 61 of file EMatrix.cpp.

References BIASCDOUT, D_EMATRIX_ROT_TRANS, BIAS::Matrix< T >::GetCol(), BIAS::FMatrix::GetEpipolesHomogenized(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), K, BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix< T >::Transpose(), and BIAS::Triangulation::Triangulate().

Referenced by BIAS::Parametrization::EMatrixToParams().

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< FMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::GetSystemMatrix ( Matrix< FMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

int EMatrix::InitFromF | ( | const FMatrixBase & | F,
 |  | KMatrix & | K1,
 |  | KMatrix & | K2
 | ) |

assuming K1 and K2 as calibrations of the cameras which refer to the fmatrix, create the nearest valid essential matrix from F

Definition at line 32 of file EMatrix.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::Matrix< T >::NormFrobenius(), and BIAS::Matrix3x3< T >::Transpose().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( Matrix3x3< FMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< FMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< FMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool FMatrix::IsValid ( ) [inherited]

Returns true if all properties of the F-Matrix are correct, at the moment only rank 2 is checked.

Author:
mdunda 08 2003

Definition at line 119 of file FMatrix.cpp.

References BIASERR, and BIAS::SVD::NullspaceDim().

bool BIAS::Matrix< FMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< FMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const FMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 | ( | const FMATRIX_TYPE | a0,
 |  | const FMATRIX_TYPE | a1,
 |  | const FMATRIX_TYPE | a2,
 |  | const FMATRIX_TYPE | a3,
 |  | const FMATRIX_TYPE | a4,
 |  | const FMATRIX_TYPE | a5,
 |  | const FMATRIX_TYPE | a6,
 |  | const FMATRIX_TYPE | a7,
 |  | const FMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< FMATRIX_TYPE >::MaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< FMATRIX_TYPE >::Mult ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Matrix< FMATRIX_TYPE > & | arg,
 |  | Matrix< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x4< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x3< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Referenced by BIAS::FMatrixBase::Compose().

void BIAS::Matrix< FMATRIX_TYPE >::Multiply | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::MultiplyIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< FMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

EMatrix& BIAS::EMatrix::operator= ( const Matrix3x3< FMATRIX_TYPE > & f ) [inline]

assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate

Author:
Jan Woetzel untested (04/18/2002) status alpha (02/25/2002)

Reimplemented from BIAS::FMatrix.

Definition at line 75 of file EMatrix.hh.

References BIAS::Matrix3x3< double >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::Matrix< FMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< FMATRIX_TYPE >::Scale | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< FMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< FMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::FMatrixBase::Set | ( | RMatrixBase & | R,
 |  | Vector3< FMATRIX_TYPE > & | C
 | ) | [inline, inherited]

set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004

Definition at line 242 of file FMatrixBase.hh.

References BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const Vector3< FMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline, inherited]

see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase

Author:
woelk 07/2004

Definition at line 234 of file FMatrixBase.hh.

References R, BIAS::FMatrixBase::Set(), and BIAS::RMatrixBase::SetXYZ().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline, inherited]

implementation

generating the epipolar line in image 2, gfiven a point in image 1), use epipole in second image and rotation matrix from image 1 to image 2

Author:
woelk 07/2004

Definition at line 222 of file FMatrixBase.hh.

References BIAS::FMatrixBase::_epipole, BIAS::FMatrixBase::_isDecomposed, BIAS::FMatrixBase::_R, BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by BIAS::FMatrixBase::Set().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const FMATRIX_TYPE & | x,
 |  | const FMATRIX_TYPE & | y,
 |  | const FMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< FMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< FMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromVector ( const TNT::Vector< FMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix< FMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< FMATRIX_TYPE >::Sub | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( const Matrix3x3< FMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposedMult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

HomgPoint2D BIAS::FMatrixBase::_epipole [protected, inherited]

Definition at line 212 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

bool BIAS::FMatrixBase::_isDecomposed [protected, inherited]

Definition at line 211 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

RMatrixBase BIAS::FMatrixBase::_R [protected, inherited]

Definition at line 213 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/EMatrix.hh
  • Geometry/EMatrix.cpp
Generated on Wed Jun 21 19:06:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EMatrixBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EMatrixBase

BIAS::EMatrixBase Class Reference
[Geometry and Transformations]

describes the epipolar relationship between two images whith known internal camera calibration. More...

#include <Base/Geometry/EMatrixBase.hh>

Inheritance diagram for BIAS::EMatrixBase:

[legend]
Collaboration diagram for BIAS::EMatrixBase:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< EMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const EMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
EMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const EMATRIX_TYPE &scalar)
in place division function
EMatrixBase (const Vector3< EMATRIX_TYPE > &epipole, const Vector3< EMATRIX_TYPE > &EulerAngXYZ)
see Set(Vector3<EMATRIX_TYPE>& epipole, Vector3<EMATRIX_TYPE>& EulerAngXYZ);
EMatrixBase (const Vector3< EMATRIX_TYPE > &epipole, const RMatrixBase &R)
see Set(Vector3<EMATRIX_TYPE>& epipole, RMatixBase& R);
EMatrixBase ()
void | Fill (const EMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< EMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< EMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
double | GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
EMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
EMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
EMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
EMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
EMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
double | GetEpipolarErrorHomogenized (const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2)
EMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (EMATRIX_TYPE &max, EMATRIX_TYPE &min) const
return biggest and smallest entry
EMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
EMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< EMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< EMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< EMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< EMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< EMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< EMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< EMATRIX_TYPE > &A)
Matrix (const Matrix< EMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const EMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< EMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< EMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< EMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const EMATRIX_TYPEa0, const EMATRIX_TYPEa1, const EMATRIX_TYPEa2, const EMATRIX_TYPEa3, const EMATRIX_TYPEa4, const EMATRIX_TYPEa5, const EMATRIX_TYPEa6, const EMATRIX_TYPEa7, const EMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (EMATRIX_TYPE &max, EMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< EMATRIX_TYPE > &arg, Vector< EMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< EMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< EMATRIX_TYPE > &arg, Matrix< EMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< EMATRIX_TYPE > &argmat, Matrix3x4< EMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< EMATRIX_TYPE > &argmat, Matrix3x3< EMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< EMATRIX_TYPE > &argvec, Vector3< EMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const EMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< EMATRIX_TYPE > &arg, Vector< EMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< EMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
EMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
EMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
EMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
EMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const EMATRIX_TYPE &scalar, Matrix3x3< EMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, EMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, EMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (const Vector3< EMATRIX_TYPE > &epipole, const Vector3< EMATRIX_TYPE > &EulerAngXYZ)
see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase
void | Set (const Vector3< EMATRIX_TYPE > &epipole, const RMatrixBase &R)
implementation
void | SetAsCrossProductMatrix (const EMATRIX_TYPE &x, const EMATRIX_TYPE &y, const EMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< EMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< EMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< EMATRIX_TYPE > &v0, const BIAS::Vector3< EMATRIX_TYPE > &v1, const BIAS::Vector3< EMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< EMATRIX_TYPE > &v0, const BIAS::Vector3< EMATRIX_TYPE > &v1, const BIAS::Vector3< EMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< EMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< EMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const EMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< EMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
EMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< EMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< EMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< EMATRIX_TYPE > &argvec, Vector3< EMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~EMatrixBase ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

HomgPoint2D _epipole
bool | _isDecomposed
RMatrixBase _R
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

describes the epipolar relationship between two images whith known internal camera calibration.

Author:
woelk 07 2004

Definition at line 41 of file EMatrixBase.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::EMatrixBase::EMatrixBase ( ) [inline]

Definition at line 44 of file EMatrixBase.hh.

BIAS::EMatrixBase::~EMatrixBase ( ) [inline]

Definition at line 45 of file EMatrixBase.hh.

BIAS::EMatrixBase::EMatrixBase | ( | const Vector3< EMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline]

see Set(Vector3<EMATRIX_TYPE>& epipole, RMatixBase& R);

Definition at line 48 of file EMatrixBase.hh.

BIAS::EMatrixBase::EMatrixBase | ( | const Vector3< EMATRIX_TYPE > & | epipole,
 |  | const Vector3< EMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline]

see Set(Vector3<EMATRIX_TYPE>& epipole, Vector3<EMATRIX_TYPE>& EulerAngXYZ);

Definition at line 54 of file EMatrixBase.hh.

Member Function Documentation

void BIAS::Matrix< EMATRIX_TYPE >::Add | ( | const EMATRIX_TYPE & | scalar,
 |  | Matrix< EMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< EMATRIX_TYPE >::AddIP ( const Matrix< EMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< EMATRIX_TYPE >::AddIP ( const EMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< EMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< EMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

EMATRIX_TYPE BIAS::Matrix3x3< EMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< EMATRIX_TYPE >::Divide | ( | const EMATRIX_TYPE & | scalar,
 |  | Matrix< EMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< EMATRIX_TYPE >::DivideIP ( const EMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< EMATRIX_TYPE >::Fill ( const EMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<EMATRIX_TYPE > BIAS::Matrix< EMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< EMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<EMATRIX_TYPE > BIAS::Matrix3x3< EMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

double BIAS::EMatrixBase::GetCosAngleErrorHomogenized | ( | const BIAS::HomgPoint2D & | p1,
 |  | const BIAS::HomgPoint2D & | p2
 | ) | [inline]

Todo:
optimze

Definition at line 166 of file EMatrixBase.hh.

References _epipole, _isDecomposed, _R, BIASASSERT, BIAS::HomgLine2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::HomgLine2D::Set().

EMATRIX_TYPE * BIAS::Matrix< EMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by GetEpipolarErrorHomogenized().

EMATRIX_TYPE ** BIAS::Matrix< EMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

EMATRIX_TYPE ** BIAS::Matrix< EMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

EMATRIX_TYPE * BIAS::Matrix< EMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

EMATRIX_TYPE BIAS::Matrix3x3< EMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

double BIAS::EMatrixBase::GetEpipolarErrorHomogenized | ( | const BIAS::HomgPoint2D & | P1,
 |  | const BIAS::HomgPoint2D & | P2
 | ) | [inline]

Definition at line 114 of file EMatrixBase.hh.

References BIAS::Matrix< EMATRIX_TYPE >::GetData().

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< EMATRIX_TYPE >::GetMaxMin | ( | EMATRIX_TYPE & | max,
 |  | EMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< EMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<EMATRIX_TYPE > BIAS::Matrix< EMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<EMATRIX_TYPE > BIAS::Matrix3x3< EMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< EMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< EMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< EMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< EMATRIX_TYPE >::GetSystemMatrix ( Matrix< EMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< EMATRIX_TYPE >::Invert ( Matrix3x3< EMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<EMATRIX_TYPE > BIAS::Matrix3x3< EMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< EMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< EMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< EMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< EMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< EMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< EMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< EMATRIX_TYPE >::Matrix ( const TNT::Matrix< EMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< EMATRIX_TYPE >::Matrix ( const Matrix< EMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< EMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< EMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< EMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const EMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< EMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< EMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< EMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( const Matrix< EMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< EMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 | ( | const EMATRIX_TYPE | a0,
 |  | const EMATRIX_TYPE | a1,
 |  | const EMATRIX_TYPE | a2,
 |  | const EMATRIX_TYPE | a3,
 |  | const EMATRIX_TYPE | a4,
 |  | const EMATRIX_TYPE | a5,
 |  | const EMATRIX_TYPE | a6,
 |  | const EMATRIX_TYPE | a7,
 |  | const EMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< EMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< EMATRIX_TYPE >::MaxMin | ( | EMATRIX_TYPE & | max,
 |  | EMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< EMATRIX_TYPE >::Mult | ( | const Vector< EMATRIX_TYPE > & | arg,
 |  | Vector< EMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< EMATRIX_TYPE >::Mult ( const Matrix< EMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< EMATRIX_TYPE >::Mult | ( | const Matrix< EMATRIX_TYPE > & | arg,
 |  | Matrix< EMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< EMATRIX_TYPE >::Mult | ( | const Matrix3x4< EMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< EMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< EMATRIX_TYPE >::Mult | ( | const Matrix3x3< EMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< EMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< EMATRIX_TYPE >::Mult | ( | const Vector3< EMATRIX_TYPE > & | argvec,
 |  | Vector3< EMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< EMATRIX_TYPE >::Multiply | ( | const EMATRIX_TYPE & | scalar,
 |  | Matrix< EMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< EMATRIX_TYPE >::MultiplyIP ( const EMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< EMATRIX_TYPE >::MultLeft | ( | const Vector< EMATRIX_TYPE > & | arg,
 |  | Vector< EMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< EMATRIX_TYPE >::MultLeft ( const Matrix< EMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< EMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< EMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< EMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< EMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< EMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

EMATRIX_TYPE BIAS::Matrix< EMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< EMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< EMATRIX_TYPE >::Scale | ( | const EMATRIX_TYPE & | scalar,
 |  | Matrix3x3< EMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< EMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | EMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< EMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | EMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::EMatrixBase::Set | ( | const Vector3< EMATRIX_TYPE > & | epipole,
 |  | const Vector3< EMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline]

see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase

Author:
woelk 07/2004

Definition at line 106 of file EMatrixBase.hh.

References R, Set(), and BIAS::RMatrixBase::SetXYZ().

void BIAS::EMatrixBase::Set | ( | const Vector3< EMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline]

implementation

generating the epipolar line in image 2, gfiven a point in image 1), use epipole in second image and rotation matrix from image 1 to image 2

Author:
woelk 07/2004

Definition at line 94 of file EMatrixBase.hh.

References _epipole, _isDecomposed, _R, BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by Set().

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const EMATRIX_TYPE & | x,
 |  | const EMATRIX_TYPE & | y,
 |  | const EMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< EMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< EMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< EMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< EMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< EMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< EMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< EMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< EMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< EMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetFromVector ( const TNT::Vector< EMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< EMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< EMATRIX_TYPE >.

void BIAS::Matrix< EMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< EMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< EMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< EMATRIX_TYPE >::Sub | ( | const EMATRIX_TYPE & | scalar,
 |  | Matrix< EMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< EMATRIX_TYPE >::SubIP ( const EMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< EMATRIX_TYPE >::SubIP ( const Matrix< EMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

EMATRIX_TYPE BIAS::Matrix3x3< EMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< EMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

References p, and T.

void BIAS::Matrix3x3< EMATRIX_TYPE >::Transpose ( const Matrix3x3< EMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<EMATRIX_TYPE > BIAS::Matrix3x3< EMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< EMATRIX_TYPE >.

void BIAS::Matrix3x3< EMATRIX_TYPE >::TransposedMult | ( | const Vector3< EMATRIX_TYPE > & | argvec,
 |  | Vector3< EMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< EMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

HomgPoint2D BIAS::EMatrixBase::_epipole [protected]

Definition at line 85 of file EMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

bool BIAS::EMatrixBase::_isDecomposed [protected]

Definition at line 84 of file EMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

RMatrixBase BIAS::EMatrixBase::_R [protected]

Definition at line 86 of file EMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following file:
  • Base/Geometry/EMatrixBase.hh
Generated on Wed Jun 21 19:06:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EpipolarLine Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EpipolarLine

BIAS::EpipolarLine Class Reference

a class for representing epipolar lines with useful functions like ScanLine() More...

#include <Geometry/EpipolarLine.hh>

Inheritance diagram for BIAS::EpipolarLine:

[legend]
Collaboration diagram for BIAS::EpipolarLine:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddDebugLevel (long int lv)
void | AddIP (const Vector3< HOMGLINE2D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGLINE2D_TYPE &scalar)
Addition (in place) of an scalar.
BIAS::Vector3< HOMGLINE2D_TYPE > | CartesianToPolar () const
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordEuclidianToSphere () const
coordinate transform.
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordSphereToEuclidian () const
coordinate transfrom.
Vector3< HOMGLINE2D_TYPE > | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
void | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
cross product of two vectors destvec = this x argvec
bool | DebugLevelIsSet (long int lv) const
double | Dist (const Vector3< HOMGLINE2D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
HOMGLINE2D_TYPE | Distance (const HomgPoint2D &point)
calculates distance of a point from line
HOMGLINE2D_TYPE | Distance (HomgPoint2D &point)
calculates distance of a point from line
HOMGLINE2D_TYPE | DistanceSquared (const HomgPoint2D &point)
calculates squared distance of a point from line
void | Div (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
void | Divide (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const HOMGLINE2D_TYPE &scalar)
Division (in place) of an scalar.
void | DivIP (const HOMGLINE2D_TYPE &scalar)
template<class PixelType>
void | Draw (Image< PixelType > &im)
draws (*this) into image (only from Pinf to epipole
template<class PixelType>
void | DrawWhole (Image< PixelType > &im)
draws infinite line in image, not stopping at epipole
Vector3< HOMGLINE2D_TYPE > | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec) const
divide elementwise
void | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
Vector3< HOMGLINE2D_TYPE > | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
multiply two vectors elementwise and return the result vector
void | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
multiply two vectors elementwise and store the result vector to destvec
EpipolarLine (const Vector3< HOMGLINE2D_TYPE > &vec)
EpipolarLine (const EpipolarLine &line)
EpipolarLine ()
double | GetAngle () const
angle to abszissa (-pi, pi]
virtual enum TEdge | GetCloseEdge () const
virtual HomgPoint2D & | GetCloseIntersectionWithImageBorder ()
virtual HomgPoint2D | GetCopyOfCloseIntersectionWithImageBorder () const
virtual HomgPoint2D | GetCopyOfEpipole () const
virtual HomgPoint2D | GetCopyOfFarIntersectionWithImageBorder () const
HOMGLINE2D_TYPE * | GetData ()
const HOMGLINE2D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual double | GetDeltaR () const
double | GetDx () const
double | GetDy () const
virtual HomgPoint2D & | GetEpipole ()
virtual enum HomgPoint2D::EPosition | GetEpipolePosition () const
virtual enum TEdge | GetFarEdge () const
virtual HomgPoint2D & | GetFarIntersectionWithImageBorder ()
virtual unsigned int | GetImageHeight () const
virtual unsigned int | GetImageWidth () const
bool | GetIntersectionsWithImage (unsigned int width, unsigned int height, unsigned int coo[4])
! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine
enum TLineType | GetLineType () const
return type, E_NE if 0 < slope < 45 degree NE_N if 45 < slop < 90 .
virtual void | GetNextLine (bool clockwise, EpipolarLine &next, double dist=1.0)
returns next line with maximal possible distance without pixel loss
BIAS::Vector3< HOMGLINE2D_TYPE > | GetNormalized () const
return a normalized vector of this
void | GetPerpendicularLine (HomgPoint2D &point, HomgLine2D &perpline)
return perpendicular line throug point
virtual double | GetRMax () const
distance epipole - far intersection with image border
virtual double | GetRMin () const
distance epipole - close intersection with image border
double | GetROffset () const
Matrix< HOMGLINE2D_TYPE > | GetSkewSymmetricMatrix () const
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product
HomgPoint2D | GetTransformedEnd () const
HomgPoint2D & GetTransformedEnd ()
HomgPoint2D | GetTransformedStart () const
HomgPoint2D & GetTransformedStart ()
HOMGLINE2D_TYPE | GetW ()
returns length of hypothenuse in gradient triangle
void Homogenize ()
aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1
virtual void | Init (unsigned int width, unsigned int height, HomgPoint2D &epipole, HomgPoint2D &otherpoint)
initialize epipolar line with the two endpoints
virtual void | Init (unsigned int width, unsigned int height, HomgPoint2D &epipole, HomgPoint2D &otherpoint, enum HomgPoint2D::EPosition epos)
HomgPoint2D | Intersection (HomgLine2D &line) const
calls the above
void | Intersection (HomgLine2D &line, HomgPoint2D &intersect) const
calculates homogenized intersection of two lines
bool | IsZero () const
double | Length () const
returns the Euclidean Length of the Vector
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogTC (const std::string &filename)
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.
void | Mult (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
void | MultIP (const HOMGLINE2D_TYPE &scalar)
void | Multiply (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Multiplication with a scalar, storing results in destination vector.
void | MultiplyIP (const HOMGLINE2D_TYPE &scalar)
Multiplication (in place) of an scalar.
Vector3< HOMGLINE2D_TYPE > & | Normalize (Matrix3x3< HOMGLINE2D_TYPE > &cov)
normalizes the vector to 1 and transfroms the associated covaqriance matrix
Vector3< HOMGLINE2D_TYPE > & | Normalize ()
normalize this vector to length 1
HOMGLINE2D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|.
double | NormL2 () const
the L2 norm sqrt(a^2 + b^2 + c^2)
bool | operator!= (const Vector3< HOMGLINE2D_TYPE > &arg) const
Comparison operator 'not equal'.
virtual EpipolarLine & | operator= (const EpipolarLine &line)
bool | operator== (const Vector3< HOMGLINE2D_TYPE > &arg) const
Comparison operator 'equal'.
HOMGLINE2D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGLINE2D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix3x3< HOMGLINE2D_TYPE > | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v) const
void | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v, Matrix3x3< HOMGLINE2D_TYPE > &res) const
outer product, constructs a matrix.
HOMGLINE2D_TYPE | Phi () const
HOMGLINE2D_TYPE & | Phi ()
BIAS::Vector3< HOMGLINE2D_TYPE > | PolarToCartesian () const
void | PrintDebugLevel (std::ostream &os=std::cout) const
HOMGLINE2D_TYPE | Radius () const
HOMGLINE2D_TYPE & | Radius ()
r for polar/sphere content JW
int | Recalc ()
assumes Width, Height_, data_ and Epipole_ are set correct before
int | Recalc (unsigned int width, unsigned int height, HomgPoint2D &epipole, enum HomgPoint2D::EPosition epos)
assumes that data_ is already set
void | RemoveDebugLevel (long int lv)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
HOMGLINE2D_TYPE | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
scalar product (=inner product) of two vectors returns a scalar
void | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, HOMGLINE2D_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
virtual double | ScanLine (Image< unsigned char > &source, HomgPoint2D &epipole, enum HomgPoint2D::EPosition epos, double RMin, double RMax, bool forward, unsigned int &length, unsigned char *Destination)
scans epipolar line using bresenham, midpint alg.
void | Set (const Vector< HOMGLINE2D_TYPE > &vec)
Sets this form elements of Vector<T>.
void | Set (const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z)
set elementwise with given scalar values
void | Set (const HOMGLINE2D_TYPE &scalar)
set all elements to a scalar value
void | Set (const HOMGLINE2D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
void | Set (const HomgPoint2D &p1, const HomgPoint2D &p2)
constructing a line through two points
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetEpipole (HomgPoint2D &ep)
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Substraction with a scalar, storing results in destination vector.
void | SubIP (const Vector3< HOMGLINE2D_TYPE > &argvec)
in place substraction
void | SubIP (const HOMGLINE2D_TYPE &scalar)
Substraction (in place) of an scalar.
HOMGLINE2D_TYPE | Theta () const
HOMGLINE2D_TYPE & | Theta ()
Vector3 (const Vector< HOMGLINE2D_TYPE > &v)
cast constructor
Vector3 (const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z)
constructor with element assigment using explicit values
Vector3 (char *s)
constructor with element assignment
Vector3 (const HOMGLINE2D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector3 (const HOMGLINE2D_TYPE &scalar)
assignment with a constant value for all elements
Vector3 (const Vector3< HOMGLINE2D_TYPE > &vec)
copy constructor
Vector3 ()
virtual | ~EpipolarLine ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | CalcTransformed_ ()
bool | DetermineIntersectionsAndEpipoleDistances_ (HomgPoint2D &point)
virtual void | Interpolate_ (enum TLineType &type, unsigned char **ida, int &x, int &y, double &g, unsigned char &result)
virtual double | ScanLine_ (Image< unsigned char > &source, unsigned int ROffset, unsigned int &length, unsigned char *Destination, bool forward)

Protected Attributes

long int | _liDebugLevel
double | Angle_
enum TEdge FarEdge_ | CloseEdge_
HomgPoint2D CloseIntersection_
HomgPoint2D Current_
HOMGLINE2D_TYPE | data_ [VECTOR3_SIZE]
double | DeltaR_
double | dx_
double | dy_
HomgPoint2D End_
HomgPoint2D Epipole_
enum HomgPoint2D::EPosition | EpipolePosition_
HomgPoint2D FarIntersection_
int | Height_
unsigned int | Length_
HomgPoint2D PInfinity_
enum HomgPoint2D::EPosition | PInfinityPosition_
double | RMaxLine_
double | RMinLine_
unsigned int | ROffset_
bool | SearchOverInf_
HomgPoint2D Start_
EightWaySymmetryHomg Sym_
HomgPoint2D TransformedCurrent_
HomgPoint2D TransformedEnd_
HomgPoint2D TransformedStart_
enum TLineType | Type_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

a class for representing epipolar lines with useful functions like ScanLine()

coordinate system is image coo system with origin in upper left image corner epipole and point at infinty is also stored

Author:
Felix Woelk

Definition at line 70 of file EpipolarLine.hh.

Constructor & Destructor Documentation

EpipolarLine::EpipolarLine ( )

Definition at line 56 of file EpipolarLine.cpp.

EpipolarLine::EpipolarLine ( const EpipolarLine & line )

Definition at line 68 of file EpipolarLine.cpp.

References Angle_, CloseEdge_, CloseIntersection_, dx_, dy_, Epipole_, EpipolePosition_, FarIntersection_, GetAngle(), GetCloseEdge(), GetCopyOfCloseIntersectionWithImageBorder(), GetCopyOfEpipole(), GetCopyOfFarIntersectionWithImageBorder(), GetDx(), GetDy(), GetEpipolePosition(), GetFarEdge(), GetImageHeight(), GetImageWidth(), GetLineType(), GetRMax(), GetRMin(), Height_, RMaxLine_, RMinLine_, Type_, and Width_.

BIAS::EpipolarLine::EpipolarLine ( const Vector3< HOMGLINE2D_TYPE > & vec )

EpipolarLine::~EpipolarLine ( ) [virtual]

Definition at line 112 of file EpipolarLine.cpp.

Member Function Documentation

void BIAS::Vector3< HOMGLINE2D_TYPE >::Add | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGLINE2D_TYPE >::Add | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::Vector3< HOMGLINE2D_TYPE >::AddIP ( const Vector3< HOMGLINE2D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

Definition at line 287 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::AddIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 248 of file Vector3.hh.

void EpipolarLine::CalcTransformed_ ( ) [protected, virtual]

Definition at line 394 of file EpipolarLine.cpp.

References BIASDOUT, CloseIntersection_, Current_, D_EL_TRANSF, BIAS::Vector3< HOMGLINE2D_TYPE >::data_, dx_, dy_, End_, FarIntersection_, BIAS::EightWaySymmetryHomg::InverseTransform(), RMaxLine_, RMinLine_, Start_, Sym_, BIAS::EightWaySymmetryHomg::Transform(), TransformedCurrent_, TransformedEnd_, TransformedStart_, and Type_.

Referenced by ScanLine(), and ScanLine_().

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CartesianToPolar ( ) const [inline, inherited]

Definition at line 357 of file Vector3.hh.

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CoordEuclidianToSphere ( ) const [inherited]

coordinate transform.

compute the sphere coordinates(r, phi, theta) for (this) given euclidian point p=(x,y,z) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CoordSphereToEuclidian ( ) const [inherited]

coordinate transfrom.

compute the euclidian coord p=(x,y,z) for (this) given sphere coord sph=(radius, phi, theta) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CrossProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

Returns:
cross product = this x argvec
Author:
Jan Woetzel alpha

Definition at line 205 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::CrossProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

cross product of two vectors destvec = this x argvec

Author:
Ingo Thomsen, Jan Woetzel alpha

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool EpipolarLine::DetermineIntersectionsAndEpipoleDistances_ ( HomgPoint2D & point ) [protected]

Definition at line 444 of file EpipolarLine.cpp.

References BIAS_DEBUG, BIASDOUT, BottomEdge, CloseEdge_, CloseIntersection_, CompIntersect(), D_EL_INT, TIntersect::Edge, Epipole_, TIntersect::EpipoleDistance, FarIntersection_, GetCloseIntersectionWithImageBorder(), GetFarIntersectionWithImageBorder(), GetImageHeight(), GetImageWidth(), Height_, BIAS::HomgLine2D::Intersection(), TIntersect::IntersectsInImage, LeftEdge, MY_DBL_PRECISION, BIAS::Point, TIntersect::Point, RightEdge, RMaxLine_, RMinLine_, TopEdge, and Width_.

Referenced by Init(), Recalc(), and ScanLine().

double BIAS::Vector3< HOMGLINE2D_TYPE >::Dist ( const Vector3< HOMGLINE2D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

HOMGLINE2D_TYPE BIAS::HomgLine2D::Distance ( const HomgPoint2D & point ) [inline, inherited]

calculates distance of a point from line

Definition at line 86 of file HomgLine2D.hh.

HOMGLINE2D_TYPE BIAS::HomgLine2D::Distance ( HomgPoint2D & point ) [inline, inherited]

calculates distance of a point from line

Definition at line 82 of file HomgLine2D.hh.

HOMGLINE2D_TYPE HomgLine2D::DistanceSquared ( const HomgPoint2D & point ) [inline, inherited]

calculates squared distance of a point from line

Definition at line 184 of file HomgLine2D.hh.

References HOMGLINE2D_EPS, and HOMGLINE2D_TYPE.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Div | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 281 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Divide | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::DivideIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::DivIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Definition at line 276 of file Vector3.hh.

template<class PixelType>
void EpipolarLine::Draw ( Image< PixelType > & im )

draws (*this) into image (only from Pinf to epipole

Definition at line 693 of file EpipolarLine.cpp.

References BIAS::HomgPoint2D::Center, Epipole_, EpipolePosition_, GetCloseIntersectionWithImageBorder(), GetFarIntersectionWithImageBorder(), PInfinity_, and PInfinityPosition_.

template<class PixelType>
void EpipolarLine::DrawWhole ( Image< PixelType > & im )

draws infinite line in image, not stopping at epipole

Definition at line 731 of file EpipolarLine.cpp.

References BIASERR, CloseIntersection_, FarIntersection_, BIAS::HomgPoint2D::Homogenize(), and BIAS::ImageBase::IsPositionInImage().

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseDivision ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

divide elementwise

Author:
Jan Woetzel

Definition at line 238 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseDivision | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

multiply two vectors elementwise and return the result vector

Author:
Jan Woetzel (03/06/2002)

Definition at line 226 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise and store the result vector to destvec

Author:
Jan Woetzel alpha (03/06/2002)

double BIAS::EpipolarLine::GetAngle ( ) const [inline]

angle to abszissa (-pi, pi]

Definition at line 101 of file EpipolarLine.hh.

Referenced by EpipolarLine(), GetNextLine(), and operator=().

virtual enum TEdge BIAS::EpipolarLine::GetCloseEdge ( ) const [inline, virtual]

Definition at line 157 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual HomgPoint2D& BIAS::EpipolarLine::GetCloseIntersectionWithImageBorder ( ) [inline, virtual]

Definition at line 143 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), Draw(), and MainFrame::DrawDistortedLine().

virtual HomgPoint2D BIAS::EpipolarLine::GetCopyOfCloseIntersectionWithImageBorder ( ) const [inline, virtual]

Definition at line 151 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual HomgPoint2D BIAS::EpipolarLine::GetCopyOfEpipole ( ) const [inline, virtual]

Definition at line 91 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual HomgPoint2D BIAS::EpipolarLine::GetCopyOfFarIntersectionWithImageBorder ( ) const [inline, virtual]

Definition at line 147 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

HOMGLINE2D_TYPE * BIAS::Vector3< HOMGLINE2D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 147 of file Vector3.hh.

const HOMGLINE2D_TYPE * BIAS::Vector3< HOMGLINE2D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 146 of file Vector3.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual double BIAS::EpipolarLine::GetDeltaR ( ) const [inline, virtual]

Definition at line 127 of file EpipolarLine.hh.

double BIAS::EpipolarLine::GetDx ( ) const [inline]

Definition at line 108 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

double BIAS::EpipolarLine::GetDy ( ) const [inline]

Definition at line 111 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual HomgPoint2D& BIAS::EpipolarLine::GetEpipole ( ) [inline, virtual]

Definition at line 88 of file EpipolarLine.hh.

Referenced by GetNextLine().

virtual enum HomgPoint2D::EPosition BIAS::EpipolarLine::GetEpipolePosition ( ) const [inline, virtual]

Definition at line 166 of file EpipolarLine.hh.

Referenced by EpipolarLine(), GetNextLine(), and operator=().

virtual enum TEdge BIAS::EpipolarLine::GetFarEdge ( ) const [inline, virtual]

Definition at line 154 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual HomgPoint2D& BIAS::EpipolarLine::GetFarIntersectionWithImageBorder ( ) [inline, virtual]

Definition at line 139 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), Draw(), MainFrame::DrawDistortedLine(), and GetNextLine().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

virtual unsigned int BIAS::EpipolarLine::GetImageHeight ( ) const [inline, virtual]

Definition at line 163 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), GetNextLine(), and operator=().

virtual unsigned int BIAS::EpipolarLine::GetImageWidth ( ) const [inline, virtual]

Definition at line 160 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), GetNextLine(), and operator=().

bool HomgLine2D::GetIntersectionsWithImage | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | coo[4]
 | ) | [inherited]

! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine

Definition at line 32 of file HomgLine2D.cpp.

References HOMGLINE2D_EPS, and BIAS::HomgLine2D::Intersection().

enum TLineType BIAS::EpipolarLine::GetLineType ( ) const [inline]

return type, E_NE if 0 < slope < 45 degree NE_N if 45 < slop < 90 .

..

Definition at line 97 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

void EpipolarLine::GetNextLine | ( | bool | clockwise,
 |  | EpipolarLine & | next,
 |  | double | dist = 1.0
 | ) | [virtual]

returns next line with maximal possible distance without pixel loss

Definition at line 116 of file EpipolarLine.cpp.

References BIASDOUT, D_EL_NEXTLINE, BIAS::Vector3< HOMGLINE2D_TYPE >::data_, GetAngle(), GetEpipole(), GetEpipolePosition(), GetFarIntersectionWithImageBorder(), GetImageHeight(), GetImageWidth(), BIAS::HomgLine2D::Homogenize(), and Init().

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::GetNormalized ( ) const [inherited]

return a normalized vector of this

norm. to length 1

Author:
Jan Woetzel
Date:
06/2003

void HomgLine2D::GetPerpendicularLine | ( | HomgPoint2D & | point,
 |  | HomgLine2D & | perpline
 | ) | [inline, inherited]

return perpendicular line throug point

Definition at line 211 of file HomgLine2D.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by BIAS::TrifocalTensor::TransferView3().

virtual double BIAS::EpipolarLine::GetRMax ( ) const [inline, virtual]

distance epipole - far intersection with image border

Definition at line 135 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

virtual double BIAS::EpipolarLine::GetRMin ( ) const [inline, virtual]

distance epipole - close intersection with image border

Definition at line 131 of file EpipolarLine.hh.

Referenced by EpipolarLine(), and operator=().

double BIAS::EpipolarLine::GetROffset ( ) const [inline]

Definition at line 105 of file EpipolarLine.hh.

Matrix<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::GetSkewSymmetricMatrix ( ) const [inherited]

constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product

Author:
koeser 09/2003

HomgPoint2D BIAS::EpipolarLine::GetTransformedEnd ( ) const [inline]

Definition at line 123 of file EpipolarLine.hh.

HomgPoint2D& BIAS::EpipolarLine::GetTransformedEnd ( ) [inline]

Definition at line 117 of file EpipolarLine.hh.

HomgPoint2D BIAS::EpipolarLine::GetTransformedStart ( ) const [inline]

Definition at line 120 of file EpipolarLine.hh.

HomgPoint2D& BIAS::EpipolarLine::GetTransformedStart ( ) [inline]

Definition at line 114 of file EpipolarLine.hh.

HOMGLINE2D_TYPE HomgLine2D::GetW ( ) [inline, inherited]

returns length of hypothenuse in gradient triangle

Definition at line 156 of file HomgLine2D.hh.

void HomgLine2D::Homogenize ( ) [inline, inherited]

aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1

Definition at line 161 of file HomgLine2D.hh.

References BIASASSERT, and HOMGLINE2D_TYPE.

Referenced by AddErr(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EMatrixBase::GetCosAngleErrorHomogenized(), GetNextLine(), Init(), Recalc(), and ScanLine().

void EpipolarLine::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | HomgPoint2D & | epipole,
 |  | HomgPoint2D & | otherpoint
 | ) | [virtual]

initialize epipolar line with the two endpoints

Definition at line 214 of file EpipolarLine.cpp.

References BIAS::HomgPoint2D::DeterminePosition(), and Init().

void EpipolarLine::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | HomgPoint2D & | epipole,
 |  | HomgPoint2D & | otherpoint,
 |  | enum HomgPoint2D::EPosition | epos
 | ) | [virtual]

Definition at line 191 of file EpipolarLine.cpp.

References Angle_, BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< HOMGLINE2D_TYPE >::data_, DeltaR_, DetermineIntersectionsAndEpipoleDistances_(), BIAS::EightWaySymmetryHomg::DetermineLineType(), BIAS::HomgPoint2D::DeterminePosition(), Epipole_, EpipolePosition_, FarIntersection_, Height_, BIAS::HomgLine2D::Homogenize(), PInfinity_, PInfinityPosition_, Sym_, Type_, and Width_.

Referenced by GetNextLine(), and Init().

void EpipolarLine::Interpolate_ | ( | enum TLineType & | type,
 |  | unsigned char ** | ida,
 |  | int & | x,
 |  | int & | y,
 |  | double & | g,
 |  | unsigned char & | result
 | ) | [protected, virtual]

Definition at line 318 of file EpipolarLine.cpp.

References BIASDOUT, BIASERR, D_EL_BRESROUND, BIAS::E_NE, BIAS::LT_Invalid, BIAS::N_NW, BIAS::NE_N, BIAS::NW_W, BIAS::S_SE, BIAS::SW_S, and BIAS::W_SW.

HomgPoint2D HomgLine2D::Intersection ( HomgLine2D & line ) const [inline, inherited]

calls the above

Definition at line 196 of file HomgLine2D.hh.

void HomgLine2D::Intersection | ( | HomgLine2D & | line,
 |  | HomgPoint2D & | intersect
 | ) | const [inline, inherited]

calculates homogenized intersection of two lines

Definition at line 204 of file HomgLine2D.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by DetermineIntersectionsAndEpipoleDistances_(), and BIAS::HomgLine2D::GetIntersectionsWithImage().

bool BIAS::Vector3< HOMGLINE2D_TYPE >::IsZero ( ) const [inline, inherited]

Returns:
true iff all elements are equal zero JW

double BIAS::Vector3< HOMGLINE2D_TYPE >::Length ( ) const [inline, inherited]

returns the Euclidean Length of the Vector

Author:
Jan Woetzel

Definition at line 137 of file Vector3.hh.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

int BIAS::Vector3< HOMGLINE2D_TYPE >::LoadBogTC ( const std::string & filename ) [inherited]

reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

void BIAS::Vector3< HOMGLINE2D_TYPE >::Mult | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 270 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::MultIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Definition at line 265 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Multiply | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::MultiplyIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 264 of file Vector3.hh.

Vector3<HOMGLINE2D_TYPE >& BIAS::Vector3< HOMGLINE2D_TYPE >::Normalize ( Matrix3x3< HOMGLINE2D_TYPE > & cov ) [inherited]

normalizes the vector to 1 and transfroms the associated covaqriance matrix

Author:
woelk 03/2006

Vector3<HOMGLINE2D_TYPE >& BIAS::Vector3< HOMGLINE2D_TYPE >::Normalize ( ) [inline, inherited]

normalize this vector to length 1

Author:
Jan Woetzel / koeser
Returns:
reference to updated (*this)
Date:
04/25/2002

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Vector3< HOMGLINE2D_TYPE >::NormL2 ( ) const [inline, inherited]

the L2 norm sqrt(a^2 + b^2 + c^2)

Author:
woelk 01 2003

bool BIAS::Vector3< HOMGLINE2D_TYPE >::operator!= ( const Vector3< HOMGLINE2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
woelk 01 2003

Definition at line 436 of file Vector3.hh.

EpipolarLine & EpipolarLine::operator= ( const EpipolarLine & line ) [virtual]

Definition at line 88 of file EpipolarLine.cpp.

References Angle_, CloseEdge_, CloseIntersection_, dx_, dy_, Epipole_, EpipolePosition_, FarIntersection_, GetAngle(), GetCloseEdge(), GetCopyOfCloseIntersectionWithImageBorder(), GetCopyOfEpipole(), GetCopyOfFarIntersectionWithImageBorder(), GetDx(), GetDy(), GetEpipolePosition(), GetFarEdge(), GetImageHeight(), GetImageWidth(), GetLineType(), GetRMax(), GetRMin(), Height_, RMaxLine_, RMinLine_, Type_, and Width_.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::operator== ( const Vector3< HOMGLINE2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 431 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

const HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member function const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Matrix3x3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::OuterProduct ( const Vector3< HOMGLINE2D_TYPE > & v ) const [inline, inherited]

Definition at line 317 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::OuterProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | v,
 |  | Matrix3x3< HOMGLINE2D_TYPE > & | res
 | ) | const [inherited]

outer product, constructs a matrix.

Often written as (*this) * v^T for col vectors made it fast

Author:
Daniel Grest, Sept 2003, woelk 07/2004 tested

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Phi ( ) const [inline, inherited]

Definition at line 369 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Phi ( ) [inline, inherited]

Definition at line 367 of file Vector3.hh.

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::PolarToCartesian ( ) const [inline, inherited]

Definition at line 341 of file Vector3.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Radius ( ) const [inline, inherited]

Definition at line 364 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Radius ( ) [inline, inherited]

r for polar/sphere content JW

Definition at line 362 of file Vector3.hh.

int EpipolarLine::Recalc ( )

assumes Width, Height_, data_ and Epipole_ are set correct before

Author:
woelk
Returns:
0 on success, -1 on error (line out of image)

Definition at line 174 of file EpipolarLine.cpp.

References Angle_, BIAS::Vector3< HOMGLINE2D_TYPE >::data_, DeltaR_, DetermineIntersectionsAndEpipoleDistances_(), BIAS::EightWaySymmetryHomg::DetermineLineType(), Epipole_, FarIntersection_, BIAS::HomgLine2D::Homogenize(), Sym_, and Type_.

Referenced by Recalc().

int EpipolarLine::Recalc | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | HomgPoint2D & | epipole,
 |  | enum HomgPoint2D::EPosition | epos
 | ) |

assumes that data_ is already set

Author:
woelk
Returns:
0 on success, -1 on error (line out of image)

Definition at line 162 of file EpipolarLine.cpp.

References Epipole_, EpipolePosition_, Height_, Recalc(), and Width_.

Referenced by MainFrame::OnLeftDown().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::ScalarProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

scalar product (=inner product) of two vectors returns a scalar

Author:
Jan Woetzel, Ingo Thomsen alpha

void BIAS::Vector3< HOMGLINE2D_TYPE >::ScalarProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | HOMGLINE2D_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel

double EpipolarLine::ScanLine | ( | Image< unsigned char > & | source,
 |  | HomgPoint2D & | epipole,
 |  | enum HomgPoint2D::EPosition | epos,
 |  | double | RMin,
 |  | double | RMax,
 |  | bool | forward,
 |  | unsigned int & | length,
 |  | unsigned char * | Destination
 | ) | [virtual]

scans epipolar line using bresenham, midpint alg.

and 8-way symmetry using minimal necessairy pixel step fills resulting linear interpolated pixels values in Destination allocates Destination if NULL to necessairy size sets length to length of Destination Destination is filled from ROffset on, only if Destination != NULL assumes that HomgLine2D::Vector3<double>::data_ is set

Returns:
distance image-epipole on ep. line, negative value if error
Author:
Felix Woelk

Definition at line 227 of file EpipolarLine.cpp.

References Angle_, BIASDOUT, CalcTransformed_(), D_EL_OFFSET, D_EL_TRANSF, BIAS::Vector3< HOMGLINE2D_TYPE >::data_, DeltaR_, DetermineIntersectionsAndEpipoleDistances_(), BIAS::EightWaySymmetryHomg::DetermineLineType(), Epipole_, EpipolePosition_, FarIntersection_, Height_, BIAS::HomgLine2D::Homogenize(), RMaxLine_, RMinLine_, ROffset_, ScanLine_(), Sym_, TransformedEnd_, TransformedStart_, Type_, and Width_.

double EpipolarLine::ScanLine_ | ( | Image< unsigned char > & | source,
 |  | unsigned int | ROffset,
 |  | unsigned int & | length,
 |  | unsigned char * | Destination,
 |  | bool | forward
 | ) | [protected, virtual]

Definition at line 272 of file EpipolarLine.cpp.

References BIASDOUT, BIAS::Image< StorageType >::BilinearInterpolationGrey(), CalcTransformed_(), Current_, D_EL_OFFSET, D_EL_ROUND, dx_, dy_, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::EightWaySymmetryHomg::InverseTransform(), Length_, RMinLine_, ROffset_, Sym_, TransformedCurrent_, TransformedEnd_, and Type_.

Referenced by ScanLine().

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const Vector< HOMGLINE2D_TYPE > & vec ) [inline, inherited]

Sets this form elements of Vector<T>.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set | ( | const HOMGLINE2D_TYPE & | x,
 |  | const HOMGLINE2D_TYPE & | y,
 |  | const HOMGLINE2D_TYPE & | z
 | ) | [inline, inherited]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

set all elements to a scalar value

Author:
Jan Woetzel, untested (02/28/2002)

Definition at line 110 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const HOMGLINE2D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel, untested (02/28/2002)

void HomgLine2D::Set | ( | const HomgPoint2D & | p1,
 |  | const HomgPoint2D & | p2
 | ) | [inline, inherited]

constructing a line through two points

Definition at line 143 of file HomgLine2D.hh.

References BIAS::Vector3< T >::CrossProduct(), and HOMGLINE2D_EPS.

Referenced by AddErr(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::EMatrixBase::GetCosAngleErrorHomogenized().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::EpipolarLine::SetEpipole ( HomgPoint2D & ep ) [inline]

Definition at line 85 of file EpipolarLine.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Vector3< HOMGLINE2D_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel 01/2003

const int BIAS::Vector3< HOMGLINE2D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel (02/28/2002)

Definition at line 131 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Sub | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGLINE2D_TYPE >::Sub | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::SubIP ( const Vector3< HOMGLINE2D_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

Definition at line 297 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::SubIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 256 of file Vector3.hh.

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Theta ( ) const [inline, inherited]

Definition at line 374 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Theta ( ) [inline, inherited]

Definition at line 372 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const Vector< HOMGLINE2D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel, untested (03/22/2002)

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 | ( | const HOMGLINE2D_TYPE & | x,
 |  | const HOMGLINE2D_TYPE & | y,
 |  | const HOMGLINE2D_TYPE & | z
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen, tested (03/04/2002)

Definition at line 94 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const HOMGLINE2D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel (02/28/2002)

Definition at line 85 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const HOMGLINE2D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel (03/01/2002)

Definition at line 80 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const Vector3< HOMGLINE2D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Jan Woetzel (03/05/2002)

Definition at line 76 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( ) [inline, inherited]

Definition at line 70 of file Vector3.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::EpipolarLine::Angle_ [protected]

Definition at line 230 of file EpipolarLine.hh.

Referenced by EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

enum TEdge FarEdge_ BIAS::EpipolarLine::CloseEdge_ [protected]

Definition at line 234 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), and operator=().

HomgPoint2D BIAS::EpipolarLine::CloseIntersection_ [protected]

Definition at line 233 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), DetermineIntersectionsAndEpipoleDistances_(), DrawWhole(), EpipolarLine(), and operator=().

HomgPoint2D BIAS::EpipolarLine::Current_ [protected]

Definition at line 247 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), and ScanLine_().

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::data_[VECTOR3_SIZE] [protected, inherited]

Definition at line 445 of file Vector3.hh.

Referenced by CalcTransformed_(), GetNextLine(), Init(), Recalc(), and ScanLine().

double BIAS::EpipolarLine::DeltaR_ [protected]

Definition at line 231 of file EpipolarLine.hh.

Referenced by Init(), Recalc(), and ScanLine().

double BIAS::EpipolarLine::dx_ [protected]

Definition at line 241 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), EpipolarLine(), operator=(), and ScanLine_().

double BIAS::EpipolarLine::dy_ [protected]

Definition at line 241 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), EpipolarLine(), operator=(), and ScanLine_().

HomgPoint2D BIAS::EpipolarLine::End_ [protected]

Definition at line 250 of file EpipolarLine.hh.

Referenced by CalcTransformed_().

HomgPoint2D BIAS::EpipolarLine::Epipole_ [protected]

Definition at line 222 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), Draw(), EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

enum HomgPoint2D::EPosition BIAS::EpipolarLine::EpipolePosition_ [protected]

Definition at line 223 of file EpipolarLine.hh.

Referenced by Draw(), EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

HomgPoint2D BIAS::EpipolarLine::FarIntersection_ [protected]

Definition at line 232 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), DetermineIntersectionsAndEpipoleDistances_(), DrawWhole(), EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int BIAS::EpipolarLine::Height_ [protected]

Definition at line 229 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

unsigned int BIAS::EpipolarLine::Length_ [protected]

Definition at line 238 of file EpipolarLine.hh.

Referenced by ScanLine_().

HomgPoint2D BIAS::EpipolarLine::PInfinity_ [protected]

Definition at line 224 of file EpipolarLine.hh.

Referenced by Draw(), and Init().

enum HomgPoint2D::EPosition BIAS::EpipolarLine::PInfinityPosition_ [protected]

Definition at line 225 of file EpipolarLine.hh.

Referenced by Draw(), and Init().

double BIAS::EpipolarLine::RMaxLine_ [protected]

Definition at line 235 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), operator=(), and ScanLine().

double BIAS::EpipolarLine::RMinLine_ [protected]

Definition at line 235 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), operator=(), ScanLine(), and ScanLine_().

unsigned int BIAS::EpipolarLine::ROffset_ [protected]

Definition at line 237 of file EpipolarLine.hh.

Referenced by ScanLine(), and ScanLine_().

bool BIAS::EpipolarLine::SearchOverInf_ [protected]

Definition at line 244 of file EpipolarLine.hh.

HomgPoint2D BIAS::EpipolarLine::Start_ [protected]

Definition at line 250 of file EpipolarLine.hh.

Referenced by CalcTransformed_().

EightWaySymmetryHomg BIAS::EpipolarLine::Sym_ [protected]

Definition at line 242 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), Init(), Recalc(), ScanLine(), and ScanLine_().

HomgPoint2D BIAS::EpipolarLine::TransformedCurrent_ [protected]

Definition at line 249 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), and ScanLine_().

HomgPoint2D BIAS::EpipolarLine::TransformedEnd_ [protected]

Definition at line 248 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), ScanLine(), and ScanLine_().

HomgPoint2D BIAS::EpipolarLine::TransformedStart_ [protected]

Definition at line 248 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), and ScanLine().

enum TLineType BIAS::EpipolarLine::Type_ [protected]

Definition at line 227 of file EpipolarLine.hh.

Referenced by CalcTransformed_(), EpipolarLine(), Init(), operator=(), Recalc(), ScanLine(), and ScanLine_().

int BIAS::EpipolarLine::Width_ [protected]

Definition at line 228 of file EpipolarLine.hh.

Referenced by DetermineIntersectionsAndEpipoleDistances_(), EpipolarLine(), Init(), operator=(), Recalc(), and ScanLine().

The documentation for this class was generated from the following files:
  • Geometry/EpipolarLine.hh
  • Geometry/EpipolarLine.cpp
Generated on Wed Jun 21 19:06:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Erosion< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Erosion

BIAS::Erosion< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Erosion operator for binary images (black and white). More...

#include <Filter/Erosion.hh>

Inheritance diagram for BIAS::Erosion< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Erosion< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | Erode (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3)
erode with square kernel filled with 255
int | Erode3Fast (const Image< InputStorageType > &src, Image< OutputStorageType > &dest, bool Neighbor4=false)
Very fast erode with 3x3 mask, all values, which are not not zero, are treated as foreground.
Erosion ()
int | FillBorderConst (Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value)
fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Does the erosion.
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKernelSize (int size)
virtual | ~Erosion ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
Very fast deletion of pixels with no neighbours.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
int * | kernelSize_
pointer into param object, determines influence region size

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Erosion< InputStorageType, OutputStorageType >

Erosion operator for binary images (black and white).

Erosion sets all pixel to 0, which have a neighboring zero pixel Fastest ist TBH_valid and kernelsize=3 or call Erode3Fast() directly.

Author:
grest, Oct. 2004

Definition at line 40 of file Erosion.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
BIAS::Erosion< InputStorageType, OutputStorageType >::Erosion ( ) [inline]

Definition at line 44 of file Erosion.hh.

template<class InputStorageType, class OutputStorageType>
virtual BIAS::Erosion< InputStorageType, OutputStorageType >::~Erosion ( ) [inline, virtual]

Definition at line 45 of file Erosion.hh.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Very fast deletion of pixels with no neighbours.

All values, which are not zero, are treated as foreground. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!

Author:
Daniel Grest, Sept. 2002 tested

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Erosion::Erode | ( | const Image< InputStorageType > & | Source,
 |  | Image< OutputStorageType > & | Destination,
 |  | int | KernelSize = 3
 | ) |

erode with square kernel filled with 255

Author:
Felix Woelk (24/04/2002) alpha

Definition at line 34 of file Erosion.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::SetColorModel().

template<class InputStorageType, class OutputStorageType>
int Erosion::Erode3Fast | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dest,
 |  | bool | Neighbor4 = false
 | ) |

Very fast erode with 3x3 mask, all values, which are not not zero, are treated as foreground.

The border of one pixel is always deleted (set to zero). default is 8-neighborhood.
src and dest must NOT be the same, and dest must be initialized correctly

Author:
Daniel Grest, Sept. 2002 tested

Definition at line 80 of file Erosion.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), and BIAS::ImageBase::GetPixelCount().

template<class InputStorageType, class OutputStorageType>
int Morphology::FillBorderConst | ( | Image< OutputStorageType > & | Image,
 |  | unsigned short int | XBorderSize,
 |  | unsigned short int | YBorderSize,
 |  | OutputStorageType | Value
 | ) | [inherited]

fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis

Definition at line 66 of file Morphology.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int Erosion::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Does the erosion.

ROI ignored, but set if TBH_valid

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 162 of file Erosion.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void Erosion::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 202 of file Erosion.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize ( int size ) [inline, inherited]

Definition at line 58 of file Morphology.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
int* BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_ [protected, inherited]

pointer into param object, determines influence region size

Definition at line 75 of file Morphology.hh.

Referenced by BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology().

The documentation for this class was generated from the following files:
  • Filter/Erosion.hh
  • Filter/Erosion.cpp
Generated on Wed Jun 21 19:06:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::EuclideanTransf3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::EuclideanTransf3D

BIAS::EuclideanTransf3D Class Reference
[Geometry and Transformations]

Euclidean transformation for 3D points. More...

#include <Base/Geometry/EuclideanTransf3D.hh>

Inheritance diagram for BIAS::EuclideanTransf3D:

[legend]
Collaboration diagram for BIAS::EuclideanTransf3D:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
double | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
EuclideanTransf3D ()
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< double > &R, const Vector3< double > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< double > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< double > &arg)
Matrix4x4 (const Matrix4x4< double > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< double > &argvec, Vector4< double > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | Set (RMatrixBase &R, Vector3< double > &t)
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void | SetXYZ (Vector3< double > &EulerAng, Vector3< double > &t)
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
Matrix< double > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
~EuclideanTransf3D ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

Euclidean transformation for 3D points.

Author:
woelk 08/2004

Definition at line 14 of file EuclideanTransf3D.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

EuclideanTransf3D::EuclideanTransf3D ( )

Definition at line 7 of file EuclideanTransf3D.cpp.

EuclideanTransf3D::~EuclideanTransf3D ( )

Definition at line 11 of file EuclideanTransf3D.cpp.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

double BIAS::Matrix4x4< double >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< double >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, and BIAS::Pose.

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const Matrix3x3< double > & | R,
 |  | const Vector3< double > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< double >::Matrix4x4 ( const TNT::Matrix< double > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix< double > & arg ) [inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix4x4< double > & A ) [inline, inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8,
 |  | const double | a9,
 |  | const double | a10,
 |  | const double | a11,
 |  | const double | a12,
 |  | const double | a13,
 |  | const double | a14,
 |  | const double | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< double >::Mult | ( | const Matrix4x4< double > & | argmat,
 |  | Matrix4x4< double > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< double >::Mult | ( | const Vector4< double > & | argvec,
 |  | Vector4< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void EuclideanTransf3D::Set | ( | RMatrixBase & | R,
 |  | Vector3< double > & | t
 | ) |

Definition at line 14 of file EuclideanTransf3D.cpp.

References BIAS::Vector3< T >::GetData(), BIAS::Matrix< T >::GetData(), BIAS::Matrix< double >::GetData(), and r.

Referenced by SetXYZ().

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix4x4< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

Definition at line 261 of file Matrix4x4.hh.

Referenced by BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void EuclideanTransf3D::SetXYZ | ( | Vector3< double > & | EulerAng,
 |  | Vector3< double > & | t
 | ) |

Definition at line 25 of file EuclideanTransf3D.cpp.

References R, Set(), and BIAS::RMatrixBase::SetXYZ().

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by BIAS::HomgPoint3DCov::SetEuclidean(), and BIAS::HomgPoint2DCov::SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

double BIAS::Matrix< double >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< double >.

Matrix<double > BIAS::Matrix< double >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix3x3< double >.

void BIAS::Matrix4x4< double >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/EuclideanTransf3D.hh
  • Base/Geometry/EuclideanTransf3D.cpp
Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ExampleDebug Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ExampleDebug

BIAS::ExampleDebug Class Reference

#include <Base/Debug/Examples/MyDebug.hh>

Inheritance diagram for BIAS::ExampleDebug:

[legend]
Collaboration diagram for BIAS::ExampleDebug:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
ExampleDebug ()
void func ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void ResetDebugLevelFromGlobal ()
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~ExampleDebug ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

int | _iMyInt
long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 35 of file MyDebug.hh.

Constructor & Destructor Documentation

ExampleDebug::ExampleDebug ( )

Definition at line 31 of file MyDebug.cpp.

References _iMyInt, and ResetDebugLevelFromGlobal().

ExampleDebug::~ExampleDebug ( )

Definition at line 37 of file MyDebug.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void ExampleDebug::func ( )

Definition at line 50 of file MyDebug.cpp.

References _iMyInt, BIASDOUT, EXAMPLEDEBUG_TESTFLAG, EXAMPLEDEBUG_TESTFLAG2, BIAS::Debug::GetDebugLevel(), and BIAS::Debug::GetGlobalDebugLevel().

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by func(), and ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void ExampleDebug::ResetDebugLevelFromGlobal ( )

Definition at line 41 of file MyDebug.cpp.

References EXAMPLEDEBUG_TESTFLAG, EXAMPLEDEBUG_TESTFLAG2, BIAS::Debug::GetDebugLevel(), BIAS::Debug::GetGlobalDebugLevel(), and BIAS::Debug::SetDebugLevel().

Referenced by ExampleDebug(), and main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

int BIAS::ExampleDebug::_iMyInt [protected]

Definition at line 47 of file MyDebug.hh.

Referenced by ExampleDebug(), and func().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Base/Debug/Examples/MyDebug.hh
  • Base/Debug/Examples/MyDebug.cpp
Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleGLSharedApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleGLSharedApp Class Reference

#include <Gui/Examples/ExampleGLShared.hh>

List of all members.

Private Member Functions

virtual bool OnInit ()

Detailed Description

Examples:

ExampleGLShared.cpp.

Definition at line 25 of file ExampleGLShared.hh.

Member Function Documentation

bool ExampleGLSharedApp::OnInit ( ) [private, virtual]

Examples:
ExampleGLShared.cpp.

Definition at line 301 of file ExampleGLShared.cpp.

References BIAS::ConsoleRedirectIO().

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleGLShared.hh
  • Gui/Examples/ExampleGLShared.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleImageCanvasGLBaseApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleImageCanvasGLBaseApp Class Reference

#include <Gui/Examples/ExampleImageCanvasGLBase.hh>

List of all members.

Private Member Functions

virtual bool OnInit ()

Detailed Description

Definition at line 11 of file ExampleImageCanvasGLBase.hh.

Member Function Documentation

bool ExampleImageCanvasGLBaseApp::OnInit ( ) [private, virtual]

Definition at line 28 of file ExampleImageCanvasGLBase.cpp.

References BIAS::ConsoleRedirectIO().

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleImageCanvasGLBase.hh
  • Gui/Examples/ExampleImageCanvasGLBase.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleOpenGLCanvasApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleOpenGLCanvasApp Class Reference

#include <Gui/Examples/ExampleOpenGLCanvas.hh>

List of all members.

Private Member Functions

virtual bool | OnInit ()
virtual bool | OnInit ()

Detailed Description

Examples:

ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 11 of file ExampleOpenGLCanvas.hh.

Member Function Documentation

virtual bool ExampleOpenGLCanvasApp::OnInit ( ) [private, virtual]

bool ExampleOpenGLCanvasApp::OnInit ( ) [private, virtual]

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 122 of file ExampleOpenGLCanvas.cpp.

References BIAS::ConsoleRedirectIO().

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleOpenGLCanvas.hh
  • Gui/Examples/ExampleOpenGLCanvasBase.hh
  • Gui/Examples/ExampleOpenGLCanvas.cpp
  • Gui/Examples/ExampleOpenGLCanvasBase.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ExifTag Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ExifTag

BIAS::ExifTag Class Reference

helper class containing EXIF Tag info and its's value 8wriiten e.g. More...

#include <Base/Image/ExifTag.hh>

Collaboration diagram for BIAS::ExifTag:

[legend]
List of all members.

Public Member Functions

ExifTag (const unsigned short _id, const std::string _name)
ExifTag (const unsigned short _id, const std::string _name, const std::string _value)
ExifTag ()
bool | GoodValue (const std::string &val) const
std::ostream & | Print (std::ostream &os=std::cout) const
~ExifTag ()

Public Attributes

unsigned short | id
std::string | name
std::string | value

Detailed Description

helper class containing EXIF Tag info and its's value 8wriiten e.g.

in Jpeg header by digiti la cameras.

Author:
Jan Woetzel 10/2004

Definition at line 18 of file ExifTag.hh.

Constructor & Destructor Documentation

BIAS::ExifTag::~ExifTag ( ) [inline]

Definition at line 20 of file ExifTag.hh.

BIAS::ExifTag::ExifTag ( ) [inline]

Definition at line 21 of file ExifTag.hh.

BIAS::ExifTag::ExifTag | ( | const unsigned short | _id,
 |  | const std::string | _name,
 |  | const std::string | _value
 | ) | [inline]

Definition at line 22 of file ExifTag.hh.

BIAS::ExifTag::ExifTag | ( | const unsigned short | _id,
 |  | const std::string | _name
 | ) | [inline]

Definition at line 28 of file ExifTag.hh.

Member Function Documentation

bool ExifTag::GoodValue ( const std::string & val ) const

Returns:
true if the string contains a useful value, in particular not empty, not unknown etc. JW

Definition at line 16 of file ExifTag.cpp.

std::ostream & ExifTag::Print ( std::ostream & os = std::cout ) const

Definition at line 6 of file ExifTag.cpp.

References name, and value.

Referenced by operator<<().

Member Data Documentation

unsigned short BIAS::ExifTag::id

Definition at line 41 of file ExifTag.hh.

std::string BIAS::ExifTag::name

Definition at line 42 of file ExifTag.hh.

Referenced by Print().

std::string BIAS::ExifTag::value

Definition at line 43 of file ExifTag.hh.

Referenced by Print().

The documentation for this class was generated from the following files:
  • Base/Image/ExifTag.hh
  • Base/Image/ExifTag.cpp
Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Feat Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Feat

BIAS::Feat Class Reference

internal class for feature passing only More...

#include <FeatureDetector/CornerDetectorGradient.hh>

List of all members.

Public Member Functions

bool | operator< (const Feat &r) const
Feat & | operator= (const Feat &f)

Public Attributes

double | val
int | x
int | y

Detailed Description

internal class for feature passing only

Definition at line 38 of file CornerDetectorGradient.hh.

Member Function Documentation

bool BIAS::Feat::operator< ( const Feat & r ) const [inline]

Definition at line 43 of file CornerDetectorGradient.hh.

References val.

Feat& BIAS::Feat::operator= ( const Feat & f ) [inline]

Definition at line 46 of file CornerDetectorGradient.hh.

References val, x, and y.

Member Data Documentation

double BIAS::Feat::val

Definition at line 41 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), operator<(), BIAS::operator<<(), and operator=().

int BIAS::Feat::x

Definition at line 40 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::operator<<(), and operator=().

int BIAS::Feat::y

Definition at line 40 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::operator<<(), and operator=().

The documentation for this class was generated from the following file:
  • FeatureDetector/CornerDetectorGradient.hh
Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FFT Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FFT

BIAS::FFT Class Reference

#include <MathAlgo/FFT.hh>

Inheritance diagram for BIAS::FFT:

[legend]
Collaboration diagram for BIAS::FFT:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void Compute ()
input must be filled before with GetInput
void | Compute (Vector< double > &in)
slow, memcopys in to internal input data
void | Compute (double *in)
slow, memcopys in to internal input data
bool | DebugLevelIsSet (long int lv) const
void | DumpResult (std::ostream &os=std::cout)
FFT ()
wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call GetInput() and fill it with data
  • call Compute()
  • get Results with GetPhase, GetMagnitude or GetRes

int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double * | GetInput ()
returns the internal data.
void | GetMagnitude (Vector< double > &mag)
returns the phase
void | GetMagnitude (double *mag)
returns the resulting magnitude, mag must be of length size/2+1 (rounded downwards)
void | GetPhase (Vector< double > &phase)
returns the magnitude
void | GetPhase (double *phase)
returns the resulting phase, phase must be of length size/2+1 (rounded downwards)
void | GetResult (std::complex< double > *res)
returns the internal data.
void | Init (int size)
initializes the internal variables.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Release ()
cal this before a second call to Init()
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~FFT ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

double * | _in
size_t | _InputSize
long int | _liDebugLevel
fftw_complex * | _out
int | _OutNum
fftw_plan | _p
int | _Size

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 38 of file FFT.hh.

Constructor & Destructor Documentation

FFT::FFT ( )

wrapper to the fftw3 library use fast as follows:

  • call Init() with appropriate size
  • call GetInput() and fill it with data
  • call Compute()
  • get Results with GetPhase, GetMagnitude or GetRes

a slow interface for Vector<double> also exists

an example exists in Examples/ExampleFFT

Author:
woelk 03/2004

Definition at line 36 of file FFT.cpp.

References _in, _out, _p, and _Size.

FFT::~FFT ( )

Definition at line 44 of file FFT.cpp.

References Release().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::FFT::Compute ( ) [inline]

input must be filled before with GetInput

Definition at line 74 of file FFT.hh.

Referenced by Compute().

void FFT::Compute ( Vector< double > & in )

slow, memcopys in to internal input data

Definition at line 83 of file FFT.cpp.

References _Size, BIASERR, BIASEXIT, Compute(), BIAS::Vector< T >::GetData(), and BIAS::Vector< T >::Size().

void FFT::Compute ( double * in )

slow, memcopys in to internal input data

Definition at line 77 of file FFT.cpp.

References _in, _InputSize, and _p.

Referenced by main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void FFT::DumpResult ( std::ostream & os = std::cout )

Definition at line 138 of file FFT.cpp.

References _OutNum, _Size, GetMagnitude(), and GetPhase().

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

double* BIAS::FFT::GetInput ( ) [inline]

returns the internal data.

Do _not_ delete

Definition at line 64 of file FFT.hh.

Referenced by main().

void FFT::GetMagnitude ( Vector< double > & mag )

returns the phase

Definition at line 127 of file FFT.cpp.

References _OutNum, TNT::Vector< T >::newsize(), and BIAS::Vector< T >::Size().

void FFT::GetMagnitude ( double * mag )

returns the resulting magnitude, mag must be of length size/2+1 (rounded downwards)

Definition at line 105 of file FFT.cpp.

References _out, _OutNum, abs, and p.

Referenced by DumpResult(), and main().

void FFT::GetPhase ( Vector< double > & phase )

returns the magnitude

Definition at line 116 of file FFT.cpp.

References _OutNum, TNT::Vector< T >::newsize(), and BIAS::Vector< T >::Size().

void FFT::GetPhase ( double * phase )

returns the resulting phase, phase must be of length size/2+1 (rounded downwards)

Definition at line 94 of file FFT.cpp.

References _out, _OutNum, and p.

Referenced by DumpResult(), and main().

void BIAS::FFT::GetResult ( std::complex< double > * res ) [inline]

returns the internal data.

Do _not_ delete res is of length size/2+1

Definition at line 87 of file FFT.hh.

void FFT::Init ( int size )

initializes the internal variables.

This may take some time (i.e. several seconds) since some measurements are done

Definition at line 49 of file FFT.cpp.

References _in, _InputSize, _out, _OutNum, _p, _Size, BIASERR, and BIASEXIT.

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void FFT::Release ( )

cal this before a second call to Init()

Definition at line 66 of file FFT.cpp.

References _in, _InputSize, _out, _OutNum, _p, and _Size.

Referenced by ~FFT().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

double* BIAS::FFT::_in [protected]

Definition at line 100 of file FFT.hh.

Referenced by Compute(), FFT(), Init(), and Release().

size_t BIAS::FFT::_InputSize [protected]

Definition at line 102 of file FFT.hh.

Referenced by Compute(), Init(), and Release().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

fftw_complex* BIAS::FFT::_out [protected]

Definition at line 99 of file FFT.hh.

Referenced by FFT(), GetMagnitude(), GetPhase(), Init(), and Release().

int BIAS::FFT::_OutNum [protected]

Definition at line 104 of file FFT.hh.

Referenced by DumpResult(), GetMagnitude(), GetPhase(), Init(), and Release().

fftw_plan BIAS::FFT::_p [protected]

Definition at line 101 of file FFT.hh.

Referenced by Compute(), FFT(), Init(), and Release().

int BIAS::FFT::_Size [protected]

Definition at line 103 of file FFT.hh.

Referenced by Compute(), DumpResult(), FFT(), Init(), and Release().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/FFT.hh
  • MathAlgo/FFT.cpp
Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FFT2D< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FFT2D

BIAS::FFT2D< InputStorageType, OutputStorageType > Class Template Reference

wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()
More...

#include <Image/FFT2D.hh>

Inheritance diagram for BIAS::FFT2D< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

virtual int | CrossPowerSpectrum (const Image< InputStorageType > &src1, const Image< InputStorageType > &src2, Image< OutputStorageType > &dst1)
FFT2D ()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
dstX.GetChannelCount()==src.GetCHannelCount() The result is not normalized!
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst.GetChannelCount()==2*src.GetCHannelCount() The result is not normalized!
void | Init (int width, int height)
initializes for forward transformation on complete image.
virtual int | Normalize (Image< OutputStorageType > &dst)
Normalize output after transformation.
void Release ()
call this before a second call to Init()
virtual int | TransformAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Transform forward and get absolute value from complex result The result is not normalized!
virtual int | TransformLogAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | TransformPhase (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | TransformReverse (const Image< OutputStorageType > &src, Image< InputStorageType > &dst)
Transform reverse, src _must_ be of _SizeX,_OutSizeY,2.
virtual | ~FFT2D ()

Protected Member Functions

virtual int | Forward_ (const Image< InputStorageType > &src)
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
virtual int | Reverse_ (const Image< OutputStorageType > &src)

Protected Attributes

double * | _in
fftw_complex * | _out
int | _OutNum
int | _OutSizeY
fftw_plan | _p_forward
fftw_plan | _p_reverse
int | _Size
int | _SizeX
int | _SizeY

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FFT2D< InputStorageType, OutputStorageType >

wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()

Todo:
FFT2D needs a complete rewrite because the interface concept is wrong. (JW)
Author:
evers 2004/01, and koeser, jw, oniemann 2006

Definition at line 51 of file FFT2D.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FFT2D::FFT2D ( )

Definition at line 38 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, and BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY.

template<class InputStorageType, class OutputStorageType>
FFT2D::~FFT2D ( ) [virtual]

Definition at line 49 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::Release().

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
int FFT2D::CrossPowerSpectrum | ( | const Image< InputStorageType > & | src1,
 |  | const Image< InputStorageType > & | src2,
 |  | Image< OutputStorageType > & | dst1
 | ) | [virtual]

Definition at line 273 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, abs, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount() The result is not normalized!

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 177 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dst.GetChannelCount()==2*src.GetCHannelCount() The result is not normalized!

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 156 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Forward_ ( const Image< InputStorageType > & src ) [protected, virtual]

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 98 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY, BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
void FFT2D::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Definition at line 328 of file FFT2D.cpp.

References BIASABORT, and BIASERR.

template<class InputStorageType, class OutputStorageType>
void FFT2D::Init | ( | int | width,
 |  | int | height
 | ) |

initializes for forward transformation on complete image.

This may take some time (i.e. several seconds) since some measurements are done.

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 57 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY, BIASABORT, and BIASERR.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Normalize ( Image< OutputStorageType > & dst ) [virtual]

Normalize output after transformation.

Todo:
fix the cast by explicit template JW

Definition at line 258 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
void FFT2D::Release ( )

call this before a second call to Init()

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 84 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, and BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::~FFT2D().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Reverse_ ( const Image< OutputStorageType > & src ) [protected, virtual]

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 125 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY, BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformAbs | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Transform forward and get absolute value from complex result The result is not normalized!

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 202 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformLogAbs | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Definition at line 222 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformPhase | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Definition at line 240 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformReverse | ( | const Image< OutputStorageType > & | src,
 |  | Image< InputStorageType > & | dst
 | ) | [virtual]

Transform reverse, src _must_ be of _SizeX,_OutSizeY,2.

Reimplemented in BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >.

Definition at line 311 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_().

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
double* BIAS::FFT2D< InputStorageType, OutputStorageType >::_in [protected]

Definition at line 108 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
fftw_complex* BIAS::FFT2D< InputStorageType, OutputStorageType >::_out [protected]

Definition at line 107 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum [protected]

Definition at line 114 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY [protected]

Definition at line 113 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward [protected]

Definition at line 109 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::Release().

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse [protected]

Definition at line 109 of file FFT2D.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size [protected]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX [protected]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY [protected]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

The documentation for this class was generated from the following files:
  • Image/FFT2D.hh
  • Image/FFT2D.cpp
Generated on Wed Jun 21 19:07:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FFT2D_Tiles

BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > Class Template Reference

#include <Image/FFT2D_Tiles.hh>

Inheritance diagram for BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

virtual int | CrossPowerSpectrum (const Image< InputStorageType > &src1, const Image< InputStorageType > &src2, Image< OutputStorageType > &dst1)
FFT2D_Tiles ()
wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()

virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
dstX.GetChannelCount()==src.GetCHannelCount() The result is not normalized!
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst.GetChannelCount()==2*src.GetCHannelCount() The result is not normalized!
virtual void | Init (int width, int height, int tilewidth, int tileheight)
Initialize FFT to transform image tile- (patch-)wise.
virtual void | Init (int, int)
initializes for forward transformation on complete image.
virtual int | Normalize (Image< OutputStorageType > &dst)
Normalize output after transformation.
void Release ()
cal this before a second call to Init()
virtual int | TransformAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Transform forward and get absolute value from complex result The result is not normalized!
virtual int | TransformLogAbs (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | TransformPhase (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | TransformReverse (const Image< OutputStorageType > &src, Image< InputStorageType > &dst)
Transform reverse, src _must_ be of _SizeX,_OutSizeY,2.
~FFT2D_Tiles ()

Protected Member Functions

virtual int | Forward_ (const Image< InputStorageType > &src)
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
virtual int | Reverse_ (const Image< OutputStorageType > &src)

Protected Attributes

double * | _in
int | _NumTilesX
int | _NumTilesY
fftw_complex * | _out
int | _OutNum
int | _OutSizeY
fftw_plan | _p_forward
fftw_plan | _p_reverse
int | _Size
int | _SizeX
int | _SizeY
int | _TileSizeX
int | _TileSizeY

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >

Definition at line 36 of file FFT2D_Tiles.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FFT2D_Tiles::FFT2D_Tiles ( )

wrapper to the fftw3 library use fast as follows:

  • call Init() with appropriate size
  • call Filter()

Jan Woetzel 2005: This class is practically *NOT* implemented !

Todo:
remove FFT2D_Tiles or really implement it. (JW)
Author:
evers 2004/01

Definition at line 36 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesX, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesY, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeX, and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeY.

template<class InputStorageType, class OutputStorageType>
FFT2D_Tiles::~FFT2D_Tiles ( )

Definition at line 45 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release().

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
int FFT2D::CrossPowerSpectrum | ( | const Image< InputStorageType > & | src1,
 |  | const Image< InputStorageType > & | src2,
 |  | Image< OutputStorageType > & | dst1
 | ) | [virtual, inherited]

Definition at line 273 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, abs, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount() The result is not normalized!

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 148 of file FFT2D_Tiles.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dst.GetChannelCount()==2*src.GetCHannelCount() The result is not normalized!

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 125 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::Forward_ ( const Image< InputStorageType > & src ) [protected, virtual]

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 104 of file FFT2D_Tiles.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
void FFT2D::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual, inherited]

Definition at line 328 of file FFT2D.cpp.

References BIASABORT, and BIASERR.

template<class InputStorageType, class OutputStorageType>
void FFT2D_Tiles::Init | ( | int | width,
 |  | int | height,
 |  | int | tilewidth,
 |  | int | tileheight
 | ) | [virtual]

Initialize FFT to transform image tile- (patch-)wise.

Definition at line 53 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesX, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeX, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeY, BIASERR, and BIASEXIT.

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init | ( | int | ,
 |  | int |
 | ) | [inline, virtual]

initializes for forward transformation on complete image.

This may take some time (i.e. several seconds) since some measurements are done.

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 52 of file FFT2D_Tiles.hh.

References BIASERR.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::Normalize ( Image< OutputStorageType > & dst ) [virtual, inherited]

Normalize output after transformation.

Todo:
fix the cast by explicit template JW

Definition at line 258 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
void FFT2D_Tiles::Release ( )

cal this before a second call to Init()

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 90 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, and BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::~FFT2D_Tiles().

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::Reverse_ ( const Image< OutputStorageType > & src ) [protected, virtual]

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 113 of file FFT2D_Tiles.cpp.

References BIASERR.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::TransformAbs | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Transform forward and get absolute value from complex result The result is not normalized!

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 160 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesX, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeX, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeY, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::ZeroPad().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformLogAbs | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

dstX.GetChannelCount()==src.GetCHannelCount()

Definition at line 222 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D::TransformPhase | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

dstX.GetChannelCount()==src.GetCHannelCount()

Definition at line 240 of file FFT2D.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_out, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum, BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY, BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX, BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
int FFT2D_Tiles::TransformReverse | ( | const Image< OutputStorageType > & | src,
 |  | Image< InputStorageType > & | dst
 | ) | [virtual]

Transform reverse, src _must_ be of _SizeX,_OutSizeY,2.

Reimplemented from BIAS::FFT2D< InputStorageType, OutputStorageType >.

Definition at line 210 of file FFT2D_Tiles.cpp.

References BIAS::FFT2D< InputStorageType, OutputStorageType >::_in, BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size, BUILD_IMAGE_FLOAT, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Reverse_().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
double* BIAS::FFT2D< InputStorageType, OutputStorageType >::_in [protected, inherited]

Definition at line 108 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesX [protected]

Definition at line 95 of file FFT2D_Tiles.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::FFT2D_Tiles(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_NumTilesY [protected]

Definition at line 95 of file FFT2D_Tiles.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::FFT2D_Tiles(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

template<class InputStorageType, class OutputStorageType>
fftw_complex* BIAS::FFT2D< InputStorageType, OutputStorageType >::_out [protected, inherited]

Definition at line 107 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutNum [protected, inherited]

Definition at line 114 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_OutSizeY [protected, inherited]

Definition at line 113 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase().

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_forward [protected, inherited]

Definition at line 109 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::Release().

template<class InputStorageType, class OutputStorageType>
fftw_plan BIAS::FFT2D< InputStorageType, OutputStorageType >::_p_reverse [protected, inherited]

Definition at line 109 of file FFT2D.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_Size [protected, inherited]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeX [protected, inherited]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D< InputStorageType, OutputStorageType >::_SizeY [protected, inherited]

Definition at line 112 of file FFT2D.hh.

Referenced by BIAS::FFT2D< InputStorageType, OutputStorageType >::FFT2D(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Init(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Release(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), and BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeX [protected]

Definition at line 94 of file FFT2D_Tiles.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::FFT2D_Tiles(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

template<class InputStorageType, class OutputStorageType>
int BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::_TileSizeY [protected]

Definition at line 94 of file FFT2D_Tiles.hh.

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::FFT2D_Tiles(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Init(), and BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

The documentation for this class was generated from the following files:
  • Image/FFT2D_Tiles.hh
  • Image/FFT2D_Tiles.cpp
Generated on Wed Jun 21 19:07:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FilterBase< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FilterBase

BIAS::FilterBase< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

virtual parent class for API definition of all (future) filters More...

#include <Filter/FilterBase.hh>

Inheritance diagram for BIAS::FilterBase< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::FilterBase< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
prototyp for filter computation function
FilterBase (Param &para, const int group_id, const std::string &postfix)
FilterBase (Param &para, const std::string &postfix="")
FilterBase ()
need contructor for param handling
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual | ~FilterBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FilterBase< InputStorageType, OutputStorageType >

virtual parent class for API definition of all (future) filters

We would like to have a general (abstract) class FilterBase, which should be located in BIAS/Filter and which has the main function Filter(inputimage, outputimage). This enforces all our filters to have a common interface. Derived from that, we have Convolution, Gauss, Median, ... To keep the interface clean and exchangable, all Filters should be derived from FilterBase and be usable with the standard interface. The standard function checks the desired properties of the Kernel and behaves accordingly, i.e. may call the optimized subroutines, e.g. FastSobel3x3. These subroutines may also be directly called if the user knows exactly which implementation he wants. FilterBase also holds an enum for the output size, such as "full", "same" or "valid".

Author:
skoglund, koeser, woelk 11/2004

Definition at line 84 of file FilterBase.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FilterBase::FilterBase ( )

need contructor for param handling

Definition at line 38 of file FilterBase.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated, BIAS::Debug::AddDebugLevel(), D_FILTERBASE_CALLSTACK, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

template<class InputStorageType, class OutputStorageType>
BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

template<class InputStorageType, class OutputStorageType>
BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

template<class InputStorageType, class OutputStorageType>
FilterBase::~FilterBase ( ) [virtual]

Definition at line 78 of file FilterBase.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterBase< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual]

prototyp for filter computation function

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::FilterNTo3N< CalculationType, CalculationType >, BIAS::FilterNToN< InputStorageType, InputStorageType >, BIAS::FilterNToN< StorageType, CalculationType >, BIAS::FilterNToN< CalculationType, CalculationType >, BIAS::FilterNToN< StorageType, StorageType >, BIAS::FilterNToN< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, pure virtual]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/FilterBase.hh
  • Filter/FilterBase.cpp
Generated on Wed Jun 21 19:07:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FilterMask Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FilterMask

BIAS::FilterMask Class Reference
[Image Filters and Image Transformations]

A filter mask (or a kernel) used for convolution. More...

#include <Filter/FilterMask.hh>

Inheritance diagram for BIAS::FilterMask:

[legend]
Collaboration diagram for BIAS::FilterMask:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | ComputeIntPrecisionBits (int NumberOfBitsInInputData, int NumberOfBitsInTempData)
compute the number of shiftable bits for int-from-float mask
void CreateFloatFilter ()
create the float filter from the int filter
void | CreateIntFilter (int rshift, int rshifth, int rshiftv)
create the int filter from the float filter
bool | DebugLevelIsSet (long int lv) const
FilterMask (const Vector< FM_FLOAT > &horz, const Vector< FM_FLOAT > &vert, bool ResetOtherType=FM_RESET_OTHER)
calls Init
FilterMask (const Vector< FM_INT > &horz, const Vector< FM_INT > &vert, int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER)
calls Init
FilterMask (const Matrix< FM_FLOAT > &kernel, bool ResetOtherType=FM_RESET_OTHER)
calls Init
FilterMask (const Matrix< FM_INT > &kernel, int rs, bool ResetOtherType=FM_RESET_OTHER)
calls Init
FilterMask (const FilterMask &mask)
calls operator=
FilterMask ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetHorizRightShift () const
if separable, returns right shift after separated horizontal int filtering
const Matrix< FM_FLOAT > * | GetKernelf () const
returns pointer to float filter mask
const Matrix< FM_INT > * | GetKerneli () const
returns pointer to int filter mask
int | GetKernelRightShift () const
returns right shift applied to data after int mask filtering
const Vector< FM_FLOAT > * | GetSepfh () const
returns pointer to horiz float vector for sep.
const Vector< FM_FLOAT > * | GetSepfv () const
returns pointer to vertical float vector for sep.
const Vector< FM_INT > * | GetSepih () const
returns pointer to horizontal int vector for sep.
const Vector< FM_INT > * | GetSepiv () const
returns pointer to vertical int vector for sep.
void | GetSize (int &hor, int &vert) const
returns the size of the Kernel
int | GetVertRightShift () const
if separable, returns right shift after separated vertical int filtering
void | Init (const Vector< FM_FLOAT > &horz, const Vector< FM_FLOAT > &vert, bool ResetOtherType=FM_RESET_OTHER)
sets horz and vert vectors, _Separable is true, integer vectors are updated also
void | Init (const Vector< FM_INT > &horz, const Vector< FM_INT > &vert, int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER)
sets horz and vert vectors and their right shifts, _Separable is true, FM_FLOAT vectors are updated also
void | Init (const Matrix< FM_FLOAT > &kernel, bool ResetOtherType=FM_RESET_OTHER)
sets _fKernel and also calculates the best int approximation int _sKernel.
void | Init (const Matrix< FM_INT > &kernel, int rs, bool ResetOtherType=FM_RESET_OTHER)
sets _sKernel and also _fKernel.
bool | IsSeparable () const
checks if the kernel is separable
bool | IsSize1x1 ()
returns true if size is 1 by one
FilterMask & | operator= (const FilterMask &src)
copy operator, copies ALL components
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void ResetFloatFilter ()
fill float filter with zeros, same dim as int filter
void ResetIntFilter ()
fill int filter with zeros, same dim as float filter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void SetZero ()
reset data, all kernel to zero, separable to false
void Transpose ()
transposes the kernel (and adapts all dependent data)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

Vector< FM_FLOAT > | _fHoriz
the filter mask in separated representation (floating point)
Matrix< FM_FLOAT > | _fKernel
the filter mask if we have a floating type convolution
Vector< FM_FLOAT > | _fVert
int | _HorizRightShift
int | _KernelRightShift
the shifts used for the integer filter masks
long int | _liDebugLevel
bool | _Separable
flag indicating if the 2 vectors or the matrix should be used as kernel representation
Vector< FM_INT > | _sHoriz
the filter mask in separated representation (integer)
Matrix< FM_INT > | _sKernel
the filter mask if we have a integer type convolution
Vector< FM_INT > | _sVert
int | _VertRightShift

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const FilterMask &fm)

Detailed Description

A filter mask (or a kernel) used for convolution.

When convolving an image with a FilterMask f, that mask is at first reflected at its symmetry center. Afterwards for each pixel x a weighted (by the entries of f) sum of the pixels around x is computed and written into the output image. In case of integer filtering, the result is shifted by the appropriate right shift.

You can define a filter mask by specifying either the float values or the int values and computing the other type. You may also set both manually, set the initalltypes flag to false for that. If your filtermask is separable you have to call the vector-init to define that.

Author:
skoglund, koeser, woelk 11/2004

Definition at line 61 of file FilterMask.hh.

Constructor & Destructor Documentation

FilterMask::FilterMask ( )

Definition at line 32 of file FilterMask.cpp.

References _Separable, and SETZEROSHIFT.

BIAS::FilterMask::FilterMask ( const FilterMask & mask ) [inline]

calls operator=

Definition at line 68 of file FilterMask.hh.

BIAS::FilterMask::FilterMask | ( | const Matrix< FM_INT > & | kernel,
 |  | int | rs,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) | [inline]

calls Init

Parameters:
ResetOtherType if true, sets other filter entries to zero

Definition at line 73 of file FilterMask.hh.

BIAS::FilterMask::FilterMask | ( | const Matrix< FM_FLOAT > & | kernel,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) | [inline]

calls Init

Definition at line 78 of file FilterMask.hh.

BIAS::FilterMask::FilterMask | ( | const Vector< FM_INT > & | horz,
 |  | const Vector< FM_INT > & | vert,
 |  | int | hrs,
 |  | int | vrs,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) | [inline]

calls Init

Definition at line 83 of file FilterMask.hh.

BIAS::FilterMask::FilterMask | ( | const Vector< FM_FLOAT > & | horz,
 |  | const Vector< FM_FLOAT > & | vert,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) | [inline]

calls Init

Definition at line 88 of file FilterMask.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int FilterMask::ComputeIntPrecisionBits | ( | int | NumberOfBitsInInputData,
 |  | int | NumberOfBitsInTempData
 | ) |

compute the number of shiftable bits for int-from-float mask

When you compute an int approximation of the float mask, you must avoid overflow. The weighted sum of the convolution is stored in the type CONV_INT, e.g. int, which means 31 bit range. The input data has typically 8 bit, so depending on the norm of the float filter mask, say 1.0 in this example, we can approximate a 0.3 entry in the float mask by and int entry = 0.3*(1<<(31-8))). This function computes the maximum possible shift.

Parameters:
NumberOfBitsInInputData | typically sizeof(InputImageType)*8
NumberOfBitsInTempData | typically sizeof(CONV_INT)*8-1
Returns:
number of possible shifts in int mask approximation

Definition at line 211 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _Separable, BIASDOUT, D_FM_PRECISION, FM_INT, BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::NormL1(), BIAS::Vector< T >::NormL1(), and TNT::Vector< T >::size().

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), and BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel().

void FilterMask::CreateFloatFilter ( )

create the float filter from the int filter

Definition at line 91 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _HorizRightShift, _KernelRightShift, _sHoriz, _sKernel, _sVert, _VertRightShift, FM_FLOAT, TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Vector< T >::size(), and BIAS::Vector< T >::Size().

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::InitKernel_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_(), and main().

void FilterMask::CreateIntFilter | ( | int | rshift,
 |  | int | rshifth,
 |  | int | rshiftv
 | ) |

create the int filter from the float filter

Definition at line 113 of file FilterMask.cpp.

References _fKernel, _Separable, _sKernel, BIASDOUT, D_FM_INTAPPROX, FM_FLOAT, FM_INT, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), and BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::FilterMask::GetHorizRightShift ( ) const [inline]

if separable, returns right shift after separated horizontal int filtering

Definition at line 148 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_().

const Matrix<FM_FLOAT>* BIAS::FilterMask::GetKernelf ( ) const [inline]

returns pointer to float filter mask

Definition at line 116 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

const Matrix<FM_INT>* BIAS::FilterMask::GetKerneli ( ) const [inline]

returns pointer to int filter mask

Definition at line 112 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_().

int BIAS::FilterMask::GetKernelRightShift ( ) const [inline]

returns right shift applied to data after int mask filtering

Definition at line 143 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_().

const Vector<FM_FLOAT>* BIAS::FilterMask::GetSepfh ( ) const [inline]

returns pointer to horiz float vector for sep.

filtering

Definition at line 128 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

const Vector<FM_FLOAT>* BIAS::FilterMask::GetSepfv ( ) const [inline]

returns pointer to vertical float vector for sep.

filtering

Definition at line 132 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

const Vector<FM_INT>* BIAS::FilterMask::GetSepih ( ) const [inline]

returns pointer to horizontal int vector for sep.

filtering

Definition at line 120 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_().

const Vector<FM_INT>* BIAS::FilterMask::GetSepiv ( ) const [inline]

returns pointer to vertical int vector for sep.

filtering

Definition at line 124 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_().

void BIAS::FilterMask::GetSize | ( | int & | hor,
 |  | int & | vert
 | ) | const [inline]

returns the size of the Kernel

Author:
woelk 05/2005

Definition at line 201 of file FilterMask.hh.

int BIAS::FilterMask::GetVertRightShift ( ) const [inline]

if separable, returns right shift after separated vertical int filtering

Definition at line 153 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_().

void FilterMask::Init | ( | const Vector< FM_FLOAT > & | horz,
 |  | const Vector< FM_FLOAT > & | vert,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) |

sets horz and vert vectors, _Separable is true, integer vectors are updated also

Definition at line 65 of file FilterMask.cpp.

References _fHoriz, _fVert, _Separable, ResetIntFilter(), and SETZEROSHIFT.

void FilterMask::Init | ( | const Vector< FM_INT > & | horz,
 |  | const Vector< FM_INT > & | vert,
 |  | int | hrs,
 |  | int | vrs,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) |

sets horz and vert vectors and their right shifts, _Separable is true, FM_FLOAT vectors are updated also

Definition at line 54 of file FilterMask.cpp.

References _HorizRightShift, _KernelRightShift, _Separable, _sHoriz, _sVert, _VertRightShift, and ResetFloatFilter().

void FilterMask::Init | ( | const Matrix< FM_FLOAT > & | kernel,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) |

sets _fKernel and also calculates the best int approximation int _sKernel.

_Separable is set to false.

Definition at line 47 of file FilterMask.cpp.

References _fKernel, _Separable, ResetIntFilter(), and SETZEROSHIFT.

void FilterMask::Init | ( | const Matrix< FM_INT > & | kernel,
 |  | int | rs,
 |  | bool | ResetOtherType = FM_RESET_OTHER
 | ) |

sets _sKernel and also _fKernel.

_Separable is set to false

Definition at line 37 of file FilterMask.cpp.

References _HorizRightShift, _KernelRightShift, _Separable, _sKernel, _VertRightShift, and ResetFloatFilter().

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), and main().

bool BIAS::FilterMask::IsSeparable ( ) const [inline]

checks if the kernel is separable

Definition at line 136 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

bool BIAS::FilterMask::IsSize1x1 ( ) [inline]

returns true if size is 1 by one

Author:
woelk 05/2005

Definition at line 196 of file FilterMask.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Filter().

FilterMask & FilterMask::operator= ( const FilterMask & src )

copy operator, copies ALL components

Definition at line 75 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _HorizRightShift, _KernelRightShift, _Separable, _sHoriz, _sKernel, _sVert, and _VertRightShift.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void FilterMask::ResetFloatFilter ( )

fill float filter with zeros, same dim as int filter

Definition at line 152 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _Separable, _sHoriz, _sKernel, _sVert, TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Vector< T >::size(), and BIAS::Vector< T >::Size().

Referenced by Init().

void FilterMask::ResetIntFilter ( )

fill int filter with zeros, same dim as float filter

Definition at line 171 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _Separable, _sHoriz, _sKernel, _sVert, TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and BIAS::Vector< T >::Size().

Referenced by Init().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::FilterMask::SetZero ( ) [inline]

reset data, all kernel to zero, separable to false

Definition at line 187 of file FilterMask.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

void FilterMask::Transpose ( )

transposes the kernel (and adapts all dependent data)

Definition at line 197 of file FilterMask.cpp.

References _fHoriz, _fKernel, _fVert, _sHoriz, _sKernel, _sVert, and BIAS::Matrix< T >::Transpose().

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const FilterMask & | fm
 | ) | [friend]

Member Data Documentation

Vector<FM_FLOAT> BIAS::FilterMask::_fHoriz [protected]

the filter mask in separated representation (floating point)

Definition at line 214 of file FilterMask.hh.

Referenced by ComputeIntPrecisionBits(), CreateFloatFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

Matrix<FM_FLOAT> BIAS::FilterMask::_fKernel [protected]

the filter mask if we have a floating type convolution

Definition at line 210 of file FilterMask.hh.

Referenced by ComputeIntPrecisionBits(), CreateFloatFilter(), CreateIntFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

Vector<FM_FLOAT> BIAS::FilterMask::_fVert [protected]

Definition at line 214 of file FilterMask.hh.

Referenced by ComputeIntPrecisionBits(), CreateFloatFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

int BIAS::FilterMask::_HorizRightShift [protected]

Definition at line 219 of file FilterMask.hh.

Referenced by CreateFloatFilter(), Init(), BIAS::operator<<(), and operator=().

int BIAS::FilterMask::_KernelRightShift [protected]

the shifts used for the integer filter masks

Definition at line 219 of file FilterMask.hh.

Referenced by CreateFloatFilter(), Init(), BIAS::operator<<(), and operator=().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

bool BIAS::FilterMask::_Separable [protected]

flag indicating if the 2 vectors or the matrix should be used as kernel representation

Definition at line 217 of file FilterMask.hh.

Referenced by ComputeIntPrecisionBits(), CreateIntFilter(), FilterMask(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), and ResetIntFilter().

Vector<FM_INT> BIAS::FilterMask::_sHoriz [protected]

the filter mask in separated representation (integer)

Definition at line 212 of file FilterMask.hh.

Referenced by CreateFloatFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

Matrix<FM_INT> BIAS::FilterMask::_sKernel [protected]

the filter mask if we have a integer type convolution

Definition at line 208 of file FilterMask.hh.

Referenced by CreateFloatFilter(), CreateIntFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

Vector<FM_INT> BIAS::FilterMask::_sVert [protected]

Definition at line 212 of file FilterMask.hh.

Referenced by CreateFloatFilter(), Init(), BIAS::operator<<(), operator=(), ResetFloatFilter(), ResetIntFilter(), and Transpose().

int BIAS::FilterMask::_VertRightShift [protected]

Definition at line 219 of file FilterMask.hh.

Referenced by CreateFloatFilter(), Init(), BIAS::operator<<(), and operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/FilterMask.hh
  • Filter/FilterMask.cpp
Generated on Wed Jun 21 19:07:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FilterNTo2N< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FilterNTo2N

BIAS::FilterNTo2N< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

base class for simple n->2n filter implementations More...

#include <Filter/FilterNTo2N.hh>

Inheritance diagram for BIAS::FilterNTo2N< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::FilterNTo2N< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | EVecLengthType { VLT_L1, VLT_L2, VLT_max }
algorithm used to calculate the absolute length of the 2D vector
  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))
More...
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst.GetChannelCount()==2*src.GetCHannelCount()
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
FilterNTo2N (Param &para, const int group_id, const std::string &postfix)
FilterNTo2N (Param &para, const std::string &postfix="")
FilterNTo2N ()
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | VecLen (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
decides which vector length to use from *_VecLenthType
int | VecLenL1 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = | fabs(gx) + fabs(gy) | destination absg must be initialized
int | VecLenL2 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = sqrt(gx*gx+gy*gy) destination absg must be initialized
int | VecLenMax (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = max(fabs(gx),fabs(gy)) destination absg must be initialized
virtual | ~FilterNTo2N ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
virtual void | GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
int * | _VecLengthType
of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FilterNTo2N< InputStorageType, OutputStorageType >

base class for simple n->2n filter implementations

This is the base class for n->2n filters, i.e. for every input channel two output channels are generated by filters derived from this class.

Author:
skoglund, koeser, woelk 11/2004

Definition at line 44 of file FilterNTo2N.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterNTo2N::EVecLengthType

algorithm used to calculate the absolute length of the 2D vector

  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))

Enumerator:
VLT_L1
VLT_L2
VLT_max

Definition at line 52 of file FilterNTo2N.hh.

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FilterNTo2N::FilterNTo2N ( )

Definition at line 38 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2.

template<class InputStorageType, class OutputStorageType>
FilterNTo2N::FilterNTo2N | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 47 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
FilterNTo2N::FilterNTo2N | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Definition at line 57 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam().

template<class InputStorageType, class OutputStorageType>
FilterNTo2N::~FilterNTo2N ( ) [virtual]

Definition at line 64 of file FilterNTo2N.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void FilterNTo2N::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGauss< InputStorageType, OutputStorageType >, and BIAS::GradientGauss< CalculationType, CalculationType >.

Definition at line 251 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIAS::Param::CheckParam(), BIAS::Param::GetParamEnum(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented in BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >, and BIAS::GradientSobel3x3< CalculationType, CalculationType >.

Definition at line 97 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dst.GetChannelCount()==2*src.GetCHannelCount()

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >, and BIAS::GradientSobel3x3< CalculationType, CalculationType >.

Definition at line 73 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual]

Definition at line 115 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Definition at line 89 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual]

Definition at line 106 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Definition at line 81 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, pure virtual, inherited]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLen | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) |

decides which vector length to use from *_VecLenthType

Author:
woelk 12/2004

Definition at line 129 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIASERR, res, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL1 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) |

length = | fabs(gx) + fabs(gy) | destination absg must be initialized

Author:
woelk 09/2004

Definition at line 155 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL2 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) |

length = sqrt(gx*gx+gy*gy) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 187 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenMax | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) |

length = max(fabs(gx),fabs(gy)) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 220 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType [protected]

of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Definition at line 112 of file FilterNTo2N.hh.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/FilterNTo2N.hh
  • Filter/FilterNTo2N.cpp
Generated on Wed Jun 21 19:07:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FilterNTo3N< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FilterNTo3N

BIAS::FilterNTo3N< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

base class for simple n->3n filter implementations More...

#include <Filter/FilterNTo3N.hh>

Inheritance diagram for BIAS::FilterNTo3N< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::FilterNTo3N< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst.GetChannelCount()==3*src.GetCHannelCount()
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
FilterNTo3N (Param &para, const int group_id, const std::string &postfix)
FilterNTo3N (Param &para, const std::string &postfix="")
FilterNTo3N ()
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual | ~FilterNTo3N ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FilterNTo3N< InputStorageType, OutputStorageType >

base class for simple n->3n filter implementations

This is the base class for n->3n filters, i.e. for every input channel three output channels are generated by filters derived from this class.

Author:
skoglund, koeser, woelk 11/2004

Definition at line 43 of file FilterNTo3N.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FilterNTo3N::FilterNTo3N ( )

Definition at line 35 of file FilterNTo3N.cpp.

template<class InputStorageType, class OutputStorageType>
FilterNTo3N::FilterNTo3N | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 41 of file FilterNTo3N.cpp.

template<class InputStorageType, class OutputStorageType>
FilterNTo3N::FilterNTo3N | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Definition at line 48 of file FilterNTo3N.cpp.

template<class InputStorageType, class OutputStorageType>
FilterNTo3N::~FilterNTo3N ( ) [virtual]

Definition at line 55 of file FilterNTo3N.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2,
 |  | Image< OutputStorageType > & | dst3
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 85 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

dst.GetChannelCount()==3*src.GetCHannelCount()

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 61 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2,
 |  | Image< OutputStorageType > & | dst3
 | ) | [virtual]

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 105 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 77 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2,
 |  | Image< OutputStorageType > & | dst3
 | ) | [virtual]

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 95 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo3N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Reimplemented in BIAS::StructureTensor< InputStorageType, OutputStorageType >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Definition at line 69 of file FilterNTo3N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, pure virtual, inherited]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/FilterNTo3N.hh
  • Filter/FilterNTo3N.cpp
Generated on Wed Jun 21 19:07:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FilterNToN< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FilterNToN

BIAS::FilterNToN< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

base class for simple n->n filter implementations More...

#include <Filter/FilterNToN.hh>

Inheritance diagram for BIAS::FilterNToN< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::FilterNToN< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
virtual function for interface definition
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
FilterNToN (Param &para, const int group_id, const std::string &postfix)
FilterNToN (Param &para, const std::string &postfix="")
FilterNToN ()
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual | ~FilterNToN ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::FilterNToN< InputStorageType, OutputStorageType >

base class for simple n->n filter implementations

This is the base class for n->n filters, i.e. for every input channel a single output channel is generated by filters derived from this class.

Author:
koeser, skoglund, woelk 11/2004

Definition at line 43 of file FilterNToN.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
FilterNToN::FilterNToN ( )

Definition at line 31 of file FilterNToN.cpp.

template<class InputStorageType, class OutputStorageType>
FilterNToN::FilterNToN | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 37 of file FilterNToN.cpp.

template<class InputStorageType, class OutputStorageType>
FilterNToN::FilterNToN | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Definition at line 43 of file FilterNToN.cpp.

template<class InputStorageType, class OutputStorageType>
virtual BIAS::FilterNToN< InputStorageType, OutputStorageType >::~FilterNToN ( ) [inline, virtual]

Definition at line 54 of file FilterNToN.hh.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterNToN< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual]

virtual function for interface definition

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterNToN< InputStorageType, OutputStorageType >::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterNToN< InputStorageType, OutputStorageType >::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, pure virtual, inherited]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/FilterNToN.hh
  • Filter/FilterNToN.cpp
Generated on Wed Jun 21 19:07:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FindFilesInPath Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

FindFilesInPath Class Reference

#include <VideoSource/VideoSource_Disk_FindFiles.h>

Collaboration diagram for FindFilesInPath:

[legend]
List of all members.

Public Types

typedef void(* | FUNC_PTR_type )(const std::string &FullFileName)

Public Member Functions

FindFilesInPath (std::string StartingPath, const std::string &FileTypes, FUNC_PTR_type fptr=NULL, bool SearchSubDir=true)
template<typename T, typename F>
void | PerformClassFunctionOnListedFiles (T &SrcObj, F func)
void | PerformFunctionOnListedFiles (FUNC_PTR_type fptr)

Public Attributes

std::vector< std::string > & | c_FileList
std::string | m_FileTypes

Protected Member Functions

void | FindInDir (const std::string &StartingPath, bool SearchSubDir=true)

Protected Attributes

std::vector< std::string > | m_FileList
FUNC_PTR_type m_FuncPtr

Detailed Description

Definition at line 69 of file VideoSource_Disk_FindFiles.h.

Member Typedef Documentation

typedef void(* FindFilesInPath::FUNC_PTR_type)(const std::string &FullFileName)

Definition at line 72 of file VideoSource_Disk_FindFiles.h.

Constructor & Destructor Documentation

FindFilesInPath::FindFilesInPath | ( | std::string | StartingPath,
 |  | const std::string & | FileTypes,
 |  | FUNC_PTR_type | fptr = NULL,
 |  | bool | SearchSubDir = true
 | ) | [inline]

Definition at line 74 of file VideoSource_Disk_FindFiles.h.

References FindInDir(), and m_FileTypes.

Member Function Documentation

void FindFilesInPath::FindInDir | ( | const std::string & | StartingPath,
 |  | bool | SearchSubDir = true
 | ) | [inline, protected]

Definition at line 102 of file VideoSource_Disk_FindFiles.h.

References m_FileList, m_FileTypes, and m_FuncPtr.

Referenced by FindFilesInPath().

template<typename T, typename F>
void FindFilesInPath::PerformClassFunctionOnListedFiles | ( | T & | SrcObj,
 |  | F | func
 | ) | [inline]

Definition at line 93 of file VideoSource_Disk_FindFiles.h.

References m_FileList.

void FindFilesInPath::PerformFunctionOnListedFiles ( FUNC_PTR_type fptr ) [inline]

Definition at line 83 of file VideoSource_Disk_FindFiles.h.

References m_FileList.

Member Data Documentation

std::vector<std::string>& FindFilesInPath::c_FileList

Definition at line 134 of file VideoSource_Disk_FindFiles.h.

Referenced by BIAS::VideoSource_Disk::OpenDevice().

std::vector<std::string> FindFilesInPath::m_FileList [protected]

Definition at line 130 of file VideoSource_Disk_FindFiles.h.

Referenced by FindInDir(), PerformClassFunctionOnListedFiles(), and PerformFunctionOnListedFiles().

std::string FindFilesInPath::m_FileTypes

Definition at line 133 of file VideoSource_Disk_FindFiles.h.

Referenced by FindFilesInPath(), and FindInDir().

FUNC_PTR_type FindFilesInPath::m_FuncPtr [protected]

Definition at line 129 of file VideoSource_Disk_FindFiles.h.

Referenced by FindInDir().

The documentation for this class was generated from the following file:
  • VideoSource/VideoSource_Disk_FindFiles.h
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FMatrix

BIAS::FMatrix Class Reference
[Geometry and Transformations]

class representing a Fundamental matrix More...

#include <Geometry/FMatrix.hh>

Inheritance diagram for BIAS::FMatrix:

[legend]
Collaboration diagram for BIAS::FMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddDebugLevel (long int lv)
void | AddIP (const Matrix< FMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const FMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | Compose (const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()
void | Compose (const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the Fmatrxi from image 1 to image 2 as [e]_x R
void | ComputeFromPMatrices (BIAS::PMatrix &P1, BIAS::PMatrix &P2)
computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)
bool | DebugLevelIsSet (long int lv) const
void | DecomposetoSR (BIAS::Matrix3x3< double > &skew_matrix, BIAS::Matrix3x3< double > &rank3_matrix)
Decomposes f matrix to product (skew)(rank3).
FMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const FMATRIX_TYPE &scalar)
in place division function
FMATRIX_TYPE | epipolarconstraintRemainder (const HomgPoint2D &pointSource, const HomgPoint2D &pointDest)
calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.
void | Fill (const FMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
FMatrix (BIAS::PMatrix &P1, BIAS::PMatrix &P2)
computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)
FMatrix (const Matrix3x3< FMATRIX_TYPE > &f)
FMatrix (const FMatrixBase &f)
FMatrix (const FMatrix &f)
FMatrix (const MatrixInitType &i)
FMatrix ()
Vector< FMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< FMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
double | GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
FMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
FMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
FMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
FMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
FMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
double | GetEpipolarError (BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2)
computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points
double | GetEpipolarErrorHomogenized (const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const
computes error in epipolar geometry for the given correspondence P1;P2
void | GetEpipolarLineImage1 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 1 for point in image 2.
HomgLine2D | GetEpipolarLineImage1 (const HomgPoint2D &point) const
Returns epipolar line in image 1 for point in image 2.
void | GetEpipolarLineImage2 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 2 for point in image 1.
HomgLine2D | GetEpipolarLineImage2 (const HomgPoint2D &point) const
Returns epipolar line in image 2 for point in image 1.
int | GetEpipoles (HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const
Computes the epipoles from this F Matrix.
void | GetEpipolesHomogenized (HomgPoint2D &E1, HomgPoint2D &E2) const
same as above, additionally homogenizes epipoles
FMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
FMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
FMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< FMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< FMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< FMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< FMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< FMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< FMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsValid ()
Returns true if all properties of the F-Matrix are correct, at the moment only rank 2 is checked.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< FMATRIX_TYPE > &A)
Matrix (const Matrix< FMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const FMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< FMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< FMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< FMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const FMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
FMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
FMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
FMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
FMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
FMatrix & | operator= (const Matrix3x3< FMATRIX_TYPE > &f)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate
FMatrix & | operator= (const FMatrix &f)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, FMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, FMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (RMatrixBase &R, Vector3< FMATRIX_TYPE > &C)
set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ)
see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R)
implementation
void | SetAsCrossProductMatrix (const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< FMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< FMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetFromColumnVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< FMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< FMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const FMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< FMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
FMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< FMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< FMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~FMatrix ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

HomgPoint2D _epipole
bool | _isDecomposed
long int | _liDebugLevel
RMatrixBase _R
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class representing a Fundamental matrix

A fundemantal matrix describes the orientation and position of two image planes. It can be used to estimate the epipolarline and to distinguish between mismatches and good matches

Definition at line 45 of file FMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::FMatrix::FMatrix ( ) [inline]

Definition at line 48 of file FMatrix.hh.

BIAS::FMatrix::FMatrix ( const MatrixInitType & i ) [inline, explicit]

Definition at line 51 of file FMatrix.hh.

BIAS::FMatrix::FMatrix ( const FMatrix & f ) [inline]

Definition at line 54 of file FMatrix.hh.

BIAS::FMatrix::FMatrix ( const FMatrixBase & f ) [inline]

Definition at line 57 of file FMatrix.hh.

BIAS::FMatrix::FMatrix ( const Matrix3x3< FMATRIX_TYPE > & f ) [inline]

Definition at line 59 of file FMatrix.hh.

BIAS::FMatrix::FMatrix | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2
 | ) | [inline]

computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)

Author:
koeser 09/2003

Definition at line 64 of file FMatrix.hh.

BIAS::FMatrix::~FMatrix ( ) [inline]

Definition at line 67 of file FMatrix.hh.

Member Function Documentation

void BIAS::Matrix< FMATRIX_TYPE >::Add | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< FMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< FMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void FMatrixBase::Compose | ( | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) | [inherited]

constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()

Author:
woelk 08/2004

Definition at line 93 of file FMatrixBase.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix3x3< FMATRIX_TYPE >::Mult(), R, BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), and BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Compose | ( | const KMatrix & | K1,
 |  | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const KMatrix & | K2,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) | [inherited]

constructs the Fmatrxi from image 1 to image 2 as [e]_x R

Author:
woelk 08/2004

void FMatrix::ComputeFromPMatrices | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2
 | ) |

computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones)

Author:
koeser, updated 07/2004

Definition at line 38 of file FMatrix.cpp.

References BIAS::PMatrix::GetNullVector(), BIAS::PMatrix::GetPseudoInverse(), and BIAS::Vector3< T >::GetSkewSymmetricMatrix().

Referenced by main().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void FMatrix::DecomposetoSR | ( | BIAS::Matrix3x3< double > & | skew_matrix,
 |  | BIAS::Matrix3x3< double > & | rank3_matrix
 | ) |

Decomposes f matrix to product (skew)(rank3).

Definition at line 98 of file FMatrix.cpp.

References GetEpipoles(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by BIAS::PMatrixEstimation::FindClosestP2().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< FMATRIX_TYPE >::Divide | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::DivideIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

FMATRIX_TYPE FMatrixBase::epipolarconstraintRemainder | ( | const HomgPoint2D & | pointSource,
 |  | const HomgPoint2D & | pointDest
 | ) | [inherited]

calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.

calculate the scalar : pointDest'T * F *pointSource

Author:
Jan Woetzel alpha (04/03/2002)

Definition at line 40 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Vector3< T >::ScalarProduct().

void BIAS::Matrix< FMATRIX_TYPE >::Fill ( const FMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

double BIAS::FMatrixBase::GetCosAngleErrorHomogenized | ( | const BIAS::HomgPoint2D & | p1,
 |  | const BIAS::HomgPoint2D & | p2
 | ) | [inline, inherited]

Todo:
optimze

Definition at line 309 of file FMatrixBase.hh.

References BIAS::FMatrixBase::_epipole, BIAS::FMatrixBase::_isDecomposed, BIAS::FMatrixBase::_R, BIASASSERT, BIAS::HomgLine2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::HomgLine2D::Set().

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::FMatrixBase::GetEpipolarErrorHomogenized(), and BIAS::FMatrixBase::GetEpipolarLineImage1().

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

double BIAS::FMatrixBase::GetEpipolarError | ( | BIAS::HomgPoint2D & | P1,
 |  | BIAS::HomgPoint2D & | P2
 | ) | [inline, inherited]

computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points

Author:
koeser 09/2003

Definition at line 165 of file FMatrixBase.hh.

References BIAS::HomgPoint2D::Homogenize().

double BIAS::FMatrixBase::GetEpipolarErrorHomogenized | ( | const BIAS::HomgPoint2D & | P1,
 |  | const BIAS::HomgPoint2D & | P2
 | ) | const [inline, inherited]

computes error in epipolar geometry for the given correspondence P1;P2

this error is the sum of squared distances to epipolar lines in both images, for inliers it should typically be of one or two pixels (if not-normalized pixel coordinates are used)

Attention:
P1 and P2 HAVE TO BE homogenized
Parameters:
P1 | homogenized first point of correspondence to check
P2 | homogenized second point of correspondence to check tested, optimized
Author:
koeser 09/2003

Definition at line 257 of file FMatrixBase.hh.

References BIAS::Matrix< FMATRIX_TYPE >::GetData().

Referenced by FErrorFunction().

void FMatrixBase::GetEpipolarLineImage1 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const [inherited]

Returns epipolar line in image 1 for point in image 2.

Definition at line 65 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Matrix< FMATRIX_TYPE >::GetData().

HomgLine2D FMatrixBase::GetEpipolarLineImage1 ( const HomgPoint2D & point ) const [inherited]

Returns epipolar line in image 1 for point in image 2.

Definition at line 58 of file FMatrixBase.cpp.

void FMatrixBase::GetEpipolarLineImage2 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const [inherited]

Returns epipolar line in image 2 for point in image 1.

Definition at line 87 of file FMatrixBase.cpp.

HomgLine2D FMatrixBase::GetEpipolarLineImage2 ( const HomgPoint2D & point ) const [inherited]

Returns epipolar line in image 2 for point in image 1.

Definition at line 81 of file FMatrixBase.cpp.

int FMatrix::GetEpipoles | ( | HomgPoint2D & | Epipole1,
 |  | HomgPoint2D & | Epipole2
 | ) | const

Computes the epipoles from this F Matrix.

Returns:
0 on success, <0 if epipoles could not be retrieved
Author:
JMF/koeser

Definition at line 61 of file FMatrix.cpp.

References D_FMATRIX_GETEPIPOLES, F_SVD_THRESH, BIAS::Debug::GetDebugLevel(), BIAS::SVD::GetNullvector(), BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::SVD::NullspaceDim(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::Triangulation::CorrectCorrespondences(), and DecomposetoSR().

void BIAS::FMatrix::GetEpipolesHomogenized | ( | HomgPoint2D & | E1,
 |  | HomgPoint2D & | E2
 | ) | const [inline]

same as above, additionally homogenizes epipoles

Definition at line 82 of file FMatrix.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by BIAS::EMatrix::GetRotationTranslation(), main(), and MainFrame::OnLeftDown().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< FMATRIX_TYPE >::GetMaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< FMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< FMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::GetSystemMatrix ( Matrix< FMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( Matrix3x3< FMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< FMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< FMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool FMatrix::IsValid ( )

Returns true if all properties of the F-Matrix are correct, at the moment only rank 2 is checked.

Author:
mdunda 08 2003

Definition at line 119 of file FMatrix.cpp.

References BIASERR, and BIAS::SVD::NullspaceDim().

bool BIAS::Matrix< FMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< FMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const FMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 | ( | const FMATRIX_TYPE | a0,
 |  | const FMATRIX_TYPE | a1,
 |  | const FMATRIX_TYPE | a2,
 |  | const FMATRIX_TYPE | a3,
 |  | const FMATRIX_TYPE | a4,
 |  | const FMATRIX_TYPE | a5,
 |  | const FMATRIX_TYPE | a6,
 |  | const FMATRIX_TYPE | a7,
 |  | const FMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< FMATRIX_TYPE >::MaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< FMATRIX_TYPE >::Mult ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Matrix< FMATRIX_TYPE > & | arg,
 |  | Matrix< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x4< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x3< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Referenced by BIAS::FMatrixBase::Compose().

void BIAS::Matrix< FMATRIX_TYPE >::Multiply | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::MultiplyIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< FMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

FMatrix& BIAS::FMatrix::operator= ( const Matrix3x3< FMATRIX_TYPE > & f ) [inline]

assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate

Author:
Jan Woetzel untested (04/18/2002) status alpha (02/25/2002)

Reimplemented from BIAS::FMatrixBase.

Reimplemented in BIAS::EMatrix.

Definition at line 97 of file FMatrix.hh.

References BIAS::Matrix3x3< double >::operator=().

FMatrix & FMatrix::operator= ( const FMatrix & f )

Definition at line 112 of file FMatrix.cpp.

References BIAS::FMatrixBase::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::Matrix< FMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< FMATRIX_TYPE >::Scale | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< FMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< FMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::FMatrixBase::Set | ( | RMatrixBase & | R,
 |  | Vector3< FMATRIX_TYPE > & | C
 | ) | [inline, inherited]

set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004

Definition at line 242 of file FMatrixBase.hh.

References BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const Vector3< FMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline, inherited]

see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase

Author:
woelk 07/2004

Definition at line 234 of file FMatrixBase.hh.

References R, BIAS::FMatrixBase::Set(), and BIAS::RMatrixBase::SetXYZ().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline, inherited]

implementation

generating the epipolar line in image 2, gfiven a point in image 1), use epipole in second image and rotation matrix from image 1 to image 2

Author:
woelk 07/2004

Definition at line 222 of file FMatrixBase.hh.

References BIAS::FMatrixBase::_epipole, BIAS::FMatrixBase::_isDecomposed, BIAS::FMatrixBase::_R, BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by BIAS::FMatrixBase::Set().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const FMATRIX_TYPE & | x,
 |  | const FMATRIX_TYPE & | y,
 |  | const FMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< FMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< FMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromVector ( const TNT::Vector< FMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix< FMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< FMATRIX_TYPE >::Sub | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( const Matrix3x3< FMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposedMult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

HomgPoint2D BIAS::FMatrixBase::_epipole [protected, inherited]

Definition at line 212 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

bool BIAS::FMatrixBase::_isDecomposed [protected, inherited]

Definition at line 211 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

RMatrixBase BIAS::FMatrixBase::_R [protected, inherited]

Definition at line 213 of file FMatrixBase.hh.

Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::FMatrixBase::Set().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/FMatrix.hh
  • Geometry/FMatrix.cpp
Generated on Wed Jun 21 19:07:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FMatrixBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FMatrixBase

BIAS::FMatrixBase Class Reference
[Geometry and Transformations]

describes the epipolar relationship between a point and his mapping on a corresponding epipolar line. More...

#include <Base/Geometry/FMatrixBase.hh>

Inheritance diagram for BIAS::FMatrixBase:

[legend]
Collaboration diagram for BIAS::FMatrixBase:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< FMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const FMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | Compose (const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()
void | Compose (const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2)
constructs the Fmatrxi from image 1 to image 2 as [e]_x R
FMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const FMATRIX_TYPE &scalar)
in place division function
FMATRIX_TYPE | epipolarconstraintRemainder (const HomgPoint2D &pointSource, const HomgPoint2D &pointDest)
calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.
void | Fill (const FMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
FMatrixBase (const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ)
see Set(Vector3<FMATRIX_TYPE>& epipole, Vector3<FMATRIX_TYPE>& EulerAngXYZ);
FMatrixBase (const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R)
see Set(Vector3<FMATRIX_TYPE>& epipole, RMatixBase& R);
FMatrixBase (const FMATRIX_TYPE *d)
constructor for convenience to build form a c-style aaray amtrix
FMatrixBase (const Matrix3x3< FMATRIX_TYPE > &A)
FMatrixBase (const MatrixInitType &i)
constructor setting identity or zero author koeser
FMatrixBase ()
default constructor untested (04/18/2002)
Vector< FMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< FMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
double | GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
FMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
FMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
FMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
FMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
FMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
double | GetEpipolarError (BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2)
computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points
double | GetEpipolarErrorHomogenized (const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const
computes error in epipolar geometry for the given correspondence P1;P2
void | GetEpipolarLineImage1 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 1 for point in image 2.
HomgLine2D | GetEpipolarLineImage1 (const HomgPoint2D &point) const
Returns epipolar line in image 1 for point in image 2.
void | GetEpipolarLineImage2 (const HomgPoint2D &point, HomgLine2D &homline) const
Returns epipolar line in image 2 for point in image 1.
HomgLine2D | GetEpipolarLineImage2 (const HomgPoint2D &point) const
Returns epipolar line in image 2 for point in image 1.
FMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
FMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
FMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< FMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< FMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< FMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< FMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< FMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< FMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< FMATRIX_TYPE > &A)
Matrix (const Matrix< FMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const FMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< FMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< FMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< FMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (FMATRIX_TYPE &max, FMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const FMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< FMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
FMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
FMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
FMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
FMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
FMatrixBase & | operator= (const Matrix3x3< FMATRIX_TYPE > &mat)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, FMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, FMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (RMatrixBase &R, Vector3< FMATRIX_TYPE > &C)
set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ)
see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase
void | Set (const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R)
implementation
void | SetAsCrossProductMatrix (const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< FMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< FMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< FMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< FMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const FMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< FMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
FMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< FMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< FMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~FMatrixBase ()
destructor untested (04/18/2002)

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

HomgPoint2D _epipole
bool | _isDecomposed
RMatrixBase _R
Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

describes the epipolar relationship between a point and his mapping on a corresponding epipolar line.

The 3x3 matrix F is the fundamental matrix of an image pair (b1, b2). In particular, with p' = transpose(p) this results in the epipolar constraint: p1' F p2 = 0 for every pair (p1, p2) of corresponding image points in b1 and b2 respectively.

Only implementation very specific to FMatrixBase (and not valid for a general 3x3 matrix) should be implemented here.

Author:
Jan Woetzel untested (04/18/2002) now derived from Matrix3x3 and not directly from Matrix<double> status alpha (02/26/2002)
Todo:
-better inherit from a virtual base class Matrix3x3FixedSize

Definition at line 65 of file FMatrixBase.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

FMatrixBase::~FMatrixBase ( )

destructor untested (04/18/2002)

Definition at line 36 of file FMatrixBase.cpp.

BIAS::FMatrixBase::FMatrixBase ( ) [inline]

default constructor untested (04/18/2002)

Definition at line 75 of file FMatrixBase.hh.

BIAS::FMatrixBase::FMatrixBase ( const MatrixInitType & i ) [inline, explicit]

constructor setting identity or zero author koeser

Definition at line 79 of file FMatrixBase.hh.

BIAS::FMatrixBase::FMatrixBase ( const Matrix3x3< FMATRIX_TYPE > & A ) [inline]

Author:
Jan Woetzel untested (04/18/2002)

Definition at line 87 of file FMatrixBase.hh.

BIAS::FMatrixBase::FMatrixBase ( const FMATRIX_TYPE * d ) [inline, explicit]

constructor for convenience to build form a c-style aaray amtrix

Author:
Jan Woetzel (07/15/2002)

Definition at line 94 of file FMatrixBase.hh.

BIAS::FMatrixBase::FMatrixBase | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline]

see Set(Vector3<FMATRIX_TYPE>& epipole, RMatixBase& R);

Definition at line 103 of file FMatrixBase.hh.

BIAS::FMatrixBase::FMatrixBase | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const Vector3< FMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline]

see Set(Vector3<FMATRIX_TYPE>& epipole, Vector3<FMATRIX_TYPE>& EulerAngXYZ);

Definition at line 110 of file FMatrixBase.hh.

Member Function Documentation

void BIAS::Matrix< FMATRIX_TYPE >::Add | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< FMATRIX_TYPE >::AddIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< FMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< FMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void FMatrixBase::Compose | ( | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) |

constructs the FMatrix from image 1 to image 2 as [e]_x R, assumes K1=K2=Identity()

Author:
woelk 08/2004

Definition at line 93 of file FMatrixBase.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix3x3< FMATRIX_TYPE >::Mult(), R, BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), and BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Compose | ( | const KMatrix & | K1,
 |  | const RMatrixBase & | R1,
 |  | const Vector3< double > & | C1,
 |  | const KMatrix & | K2,
 |  | const RMatrixBase & | R2,
 |  | const Vector3< double > & | C2
 | ) |

constructs the Fmatrxi from image 1 to image 2 as [e]_x R

Author:
woelk 08/2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< FMATRIX_TYPE >::Divide | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::DivideIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

FMATRIX_TYPE FMatrixBase::epipolarconstraintRemainder | ( | const HomgPoint2D & | pointSource,
 |  | const HomgPoint2D & | pointDest
 | ) |

calculates the remainder of the epipolar constraint with the corresponding points given as argument and this FMatrixBase.

calculate the scalar : pointDest'T * F *pointSource

Author:
Jan Woetzel alpha (04/03/2002)

Definition at line 40 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Vector3< T >::ScalarProduct().

void BIAS::Matrix< FMATRIX_TYPE >::Fill ( const FMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

double BIAS::FMatrixBase::GetCosAngleErrorHomogenized | ( | const BIAS::HomgPoint2D & | p1,
 |  | const BIAS::HomgPoint2D & | p2
 | ) | [inline]

Todo:
optimze

Definition at line 309 of file FMatrixBase.hh.

References _epipole, _isDecomposed, _R, BIASASSERT, BIAS::HomgLine2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::HomgLine2D::Set().

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by GetEpipolarErrorHomogenized(), and GetEpipolarLineImage1().

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

FMATRIX_TYPE ** BIAS::Matrix< FMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

FMATRIX_TYPE * BIAS::Matrix< FMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

double BIAS::FMatrixBase::GetEpipolarError | ( | BIAS::HomgPoint2D & | P1,
 |  | BIAS::HomgPoint2D & | P2
 | ) | [inline]

computes error in epipolar geometry for the given correspondence P1,P2 using above function after homogenizing the points

Author:
koeser 09/2003

Definition at line 165 of file FMatrixBase.hh.

References BIAS::HomgPoint2D::Homogenize().

double BIAS::FMatrixBase::GetEpipolarErrorHomogenized | ( | const BIAS::HomgPoint2D & | P1,
 |  | const BIAS::HomgPoint2D & | P2
 | ) | const [inline]

computes error in epipolar geometry for the given correspondence P1;P2

this error is the sum of squared distances to epipolar lines in both images, for inliers it should typically be of one or two pixels (if not-normalized pixel coordinates are used)

Attention:
P1 and P2 HAVE TO BE homogenized
Parameters:
P1 | homogenized first point of correspondence to check
P2 | homogenized second point of correspondence to check tested, optimized
Author:
koeser 09/2003

Definition at line 257 of file FMatrixBase.hh.

References BIAS::Matrix< FMATRIX_TYPE >::GetData().

Referenced by FErrorFunction().

void FMatrixBase::GetEpipolarLineImage1 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const

Returns epipolar line in image 1 for point in image 2.

Definition at line 65 of file FMatrixBase.cpp.

References FMATRIX_TYPE, and BIAS::Matrix< FMATRIX_TYPE >::GetData().

HomgLine2D FMatrixBase::GetEpipolarLineImage1 ( const HomgPoint2D & point ) const

Returns epipolar line in image 1 for point in image 2.

Definition at line 58 of file FMatrixBase.cpp.

void FMatrixBase::GetEpipolarLineImage2 | ( | const HomgPoint2D & | point,
 |  | HomgLine2D & | homline
 | ) | const

Returns epipolar line in image 2 for point in image 1.

Definition at line 87 of file FMatrixBase.cpp.

HomgLine2D FMatrixBase::GetEpipolarLineImage2 ( const HomgPoint2D & point ) const

Returns epipolar line in image 2 for point in image 1.

Definition at line 81 of file FMatrixBase.cpp.

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< FMATRIX_TYPE >::GetMaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< FMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<FMATRIX_TYPE > BIAS::Matrix< FMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< FMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< FMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::GetSystemMatrix ( Matrix< FMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( Matrix3x3< FMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< FMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< FMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< FMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< FMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< FMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( const Matrix< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const FMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< FMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix< FMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< FMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 | ( | const FMATRIX_TYPE | a0,
 |  | const FMATRIX_TYPE | a1,
 |  | const FMATRIX_TYPE | a2,
 |  | const FMATRIX_TYPE | a3,
 |  | const FMATRIX_TYPE | a4,
 |  | const FMATRIX_TYPE | a5,
 |  | const FMATRIX_TYPE | a6,
 |  | const FMATRIX_TYPE | a7,
 |  | const FMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< FMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< FMATRIX_TYPE >::MaxMin | ( | FMATRIX_TYPE & | max,
 |  | FMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< FMATRIX_TYPE >::Mult ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< FMATRIX_TYPE >::Mult | ( | const Matrix< FMATRIX_TYPE > & | arg,
 |  | Matrix< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x4< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Matrix3x3< FMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< FMATRIX_TYPE >::Mult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Referenced by Compose().

void BIAS::Matrix< FMATRIX_TYPE >::Multiply | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::MultiplyIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft | ( | const Vector< FMATRIX_TYPE > & | arg,
 |  | Vector< FMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< FMATRIX_TYPE >::MultLeft ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< FMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< FMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

FMATRIX_TYPE BIAS::Matrix< FMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

FMatrixBase& BIAS::FMatrixBase::operator= ( const Matrix3x3< FMATRIX_TYPE > & mat ) [inline]

assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate

Author:
Jan Woetzel untested (04/18/2002) status alpha (02/25/2002)

Reimplemented from BIAS::Matrix3x3< FMATRIX_TYPE >.

Reimplemented in BIAS::EMatrix, and BIAS::FMatrix.

Definition at line 121 of file FMatrixBase.hh.

References BIAS::Matrix3x3< FMATRIX_TYPE >::operator=().

Referenced by BIAS::FMatrix::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< FMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< FMATRIX_TYPE >::Scale | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix3x3< FMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< FMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< FMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | FMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::FMatrixBase::Set | ( | RMatrixBase & | R,
 |  | Vector3< FMATRIX_TYPE > & | C
 | ) | [inline]

set function, it is undocumented if this really works with the camer center C, I doubt it, woelk 12/2004

Definition at line 242 of file FMatrixBase.hh.

References BIAS::Matrix3x3< T >::Transpose().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const Vector3< FMATRIX_TYPE > & | EulerAngXYZ
 | ) | [inline]

see constructor from epipole and rotation matrix builds rotation matrix in x, y, z order with moving axis see RMatrixBase

Author:
woelk 07/2004

Definition at line 234 of file FMatrixBase.hh.

References R, Set(), and BIAS::RMatrixBase::SetXYZ().

void BIAS::FMatrixBase::Set | ( | const Vector3< FMATRIX_TYPE > & | epipole,
 |  | const RMatrixBase & | R
 | ) | [inline]

implementation

generating the epipolar line in image 2, gfiven a point in image 1), use epipole in second image and rotation matrix from image 1 to image 2

Author:
woelk 07/2004

Definition at line 222 of file FMatrixBase.hh.

References _epipole, _isDecomposed, _R, BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

Referenced by Set().

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const FMATRIX_TYPE & | x,
 |  | const FMATRIX_TYPE & | y,
 |  | const FMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< FMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< FMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< FMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< FMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetFromVector ( const TNT::Vector< FMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< FMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix< FMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< FMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< FMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< FMATRIX_TYPE >::Sub | ( | const FMATRIX_TYPE & | scalar,
 |  | Matrix< FMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const FMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< FMATRIX_TYPE >::SubIP ( const Matrix< FMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

FMATRIX_TYPE BIAS::Matrix3x3< FMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( const Matrix3x3< FMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<FMATRIX_TYPE > BIAS::Matrix3x3< FMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< FMATRIX_TYPE >.

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposedMult | ( | const Vector3< FMATRIX_TYPE > & | argvec,
 |  | Vector3< FMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< FMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

HomgPoint2D BIAS::FMatrixBase::_epipole [protected]

Definition at line 212 of file FMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

bool BIAS::FMatrixBase::_isDecomposed [protected]

Definition at line 211 of file FMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

RMatrixBase BIAS::FMatrixBase::_R [protected]

Definition at line 213 of file FMatrixBase.hh.

Referenced by GetCosAngleErrorHomogenized(), and Set().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/FMatrixBase.hh
  • Base/Geometry/FMatrixBase.cpp
Generated on Wed Jun 21 19:07:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::FMatrixEstimation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::FMatrixEstimation

BIAS::FMatrixEstimation Class Reference
[Estimation]

functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views More...

#include <Geometry/FMatrixEstimation.hh>

Inheritance diagram for BIAS::FMatrixEstimation:

[legend]
Collaboration diagram for BIAS::FMatrixEstimation:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | EightPoint (BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2)
compute an FMatrix from eight point correspondences
void | EnforceMaxRank2 (BIAS::FMatrix &F)
enforces a maximum rank of two by setting the smallest singular value to zero
FMatrixEstimation (bool NormalizeHartley=true)
constructor with general parameters
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | Linear (BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2)
compute an FMatrix from more than seven point correspondences
int | Optimize (BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2)
optimize a given FMatrix regarding n 2d point correspondences
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SevenPoint (std::vector< BIAS::FMatrix > &Fvec, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2)
compute a vector of FMatrices from seven point correspondences

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Public Attributes

std::vector< BIAS::HomgPoint2D
> const * 		p1_
pointer to vector of points in image1 (hack for Optimize)
std::vector< BIAS::HomgPoint2D
> const * 		p2_
pointer to vector of points in image2 (hack for Optimize)

Protected Member Functions

void | GetDetPolynomial (const BIAS::Vector< double > &f1, const BIAS::Vector< double > &f2, std::vector< POLYNOMIALSOLVE_TYPE > &v)
set up a polynomial in alpha given Det(alpha*F1+(1-alpha)*F2)=0, where the f vectors are interpreted as the rows of a 3x3 matrix

Protected Attributes

long int | _liDebugLevel
Normalization N_
the normalization object
bool | NormalizeHartley_
and denormalize the fmatrix after computation, so that it refers to the original points

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views

Author:
koeser 11/2003

Definition at line 46 of file FMatrixEstimation.hh.

Constructor & Destructor Documentation

BIAS::FMatrixEstimation::FMatrixEstimation ( bool NormalizeHartley = true ) [inline, explicit]

constructor with general parameters

Parameters:
NormalizeHartley do hartley normalization on 7/8 points

Definition at line 51 of file FMatrixEstimation.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::FMatrixEstimation::EightPoint | ( | BIAS::FMatrix & | F,
 |  | const std::vector< BIAS::HomgPoint2D > & | p1,
 |  | const std::vector< BIAS::HomgPoint2D > & | p2
 | ) | [inline]

compute an FMatrix from eight point correspondences

This algorithm computes a least squares F on all point correspondences using SVD of a model matrix. Rank 2 is enforced afterwards, therefore

Attention:
For robust computation it is strongly recommended that you normalize your correspondences (e.g. "Hartley")
Parameters:
F | matrix which is computed
p1 | (homogenized!) points in image 1
p2 | corresponding (homogenized!) points in image 2
Returns:
0=success, !=0: error
Author:
koeser 11/2003

Definition at line 104 of file FMatrixEstimation.hh.

void FMatrixEstimation::EnforceMaxRank2 ( BIAS::FMatrix & F )

enforces a maximum rank of two by setting the smallest singular value to zero

Parameters:
F matrix which has rank MIN{2, previous_rank} afterwards
Author:
koeser 11/2003

Definition at line 297 of file FMatrixEstimation.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), and BIAS::SVD::GetVT().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

void FMatrixEstimation::GetDetPolynomial | ( | const BIAS::Vector< double > & | f1,
 |  | const BIAS::Vector< double > & | f2,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | v
 | ) | [protected]

set up a polynomial in alpha given Det(alpha*F1+(1-alpha)*F2)=0, where the f vectors are interpreted as the rows of a 3x3 matrix

Parameters:
f1 | vector to be interpreted as a 3x3 matrix F1
f2 | vector to be interpreted as a 3x3 matrix F2
v | vector of polynomial coefficients in PolynomialSolve style
Author:
koeser 11/2003

Definition at line 237 of file FMatrixEstimation.cpp.

References BIASABORT, BIASERR, and TNT::Vector< T >::size().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int FMatrixEstimation::Linear | ( | BIAS::FMatrix & | F,
 |  | const std::vector< BIAS::HomgPoint2D > & | p1,
 |  | const std::vector< BIAS::HomgPoint2D > & | p2
 | ) |

compute an FMatrix from more than seven point correspondences

This algorithm computes a least squares F on all point correspondences using SVD of a model matrix. Rank 2 is enforced afterwards.

Attention:
For robust computation it is strongly recommended that you normalize your correspondences (e.g. "Hartley")
Parameters:
F | matrix which is computed
p1 | (homogenized!) points in image 1
p2 | corresponding (homogenized!) points in image 2
Returns:
0=success, !=0: error
Author:
koeser 11/2003

Definition at line 134 of file FMatrixEstimation.cpp.

References BIAS::Normalization::Hartley(), N_, and NormalizeHartley_.

int FMatrixEstimation::Optimize | ( | BIAS::FMatrix & | F,
 |  | const std::vector< BIAS::HomgPoint2D > & | p1,
 |  | const std::vector< BIAS::HomgPoint2D > & | p2
 | ) |

optimize a given FMatrix regarding n 2d point correspondences

minimize an error function on F matrix using iterative nonlinear optimization techniques such as Levenberg/Marquardt

Attention:
susceptable to local minima, provide good starting point F
Parameters:
F | matrix which is optimized
p1 | (homogenized!) points in image 1
p2 | corresponding (homogenized!) points in image 2
Returns:
0=success, !=0: error
Author:
koeser 11/2003

Definition at line 188 of file FMatrixEstimation.cpp.

References BIASABORT, and BIASERR.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int FMatrixEstimation::SevenPoint | ( | std::vector< BIAS::FMatrix > & | Fvec,
 |  | const std::vector< BIAS::HomgPoint2D > & | p1,
 |  | const std::vector< BIAS::HomgPoint2D > & | p2
 | ) |

compute a vector of FMatrices from seven point correspondences

Depending on the setting of the 3d points and the cameras of the originating epipolar geometry a vector of no, one or three solutions is computed:

  • degenrate case: no solution
  • 3d points and cam centers all lie on a ruled quadric: 3 solutions
  • 3d points and cam centers all lie on an unruled quadric: 1 solution

Attention:
For robust computation it is strongly recommended that you normalize your correspondences (e.g. "Hartley")
Parameters:
Fvec | (output) vector of F matrices which are computed
p1 | (homogenized!) points in image 1
p2 | corresponding (homogenized!) points in image 2
Returns:
0=success, !=0: error tested, not-optimized
Author:
koeser 11/2003

Definition at line 59 of file FMatrixEstimation.cpp.

References BIASABORT, BIASERR, BIAS::SVD::GetNullvector(), BIAS::Normalization::Hartley(), N_, and NormalizeHartley_.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

Normalization BIAS::FMatrixEstimation::N_ [protected]

the normalization object

Definition at line 157 of file FMatrixEstimation.hh.

Referenced by Linear(), and SevenPoint().

bool BIAS::FMatrixEstimation::NormalizeHartley_ [protected]

and denormalize the fmatrix after computation, so that it refers to the original points

Definition at line 154 of file FMatrixEstimation.hh.

Referenced by Linear(), and SevenPoint().

std::vector<BIAS::HomgPoint2D> const* BIAS::FMatrixEstimation::p1_

pointer to vector of points in image1 (hack for Optimize)

Definition at line 134 of file FMatrixEstimation.hh.

Referenced by FErrorFunction().

std::vector<BIAS::HomgPoint2D> const* BIAS::FMatrixEstimation::p2_

pointer to vector of points in image2 (hack for Optimize)

Definition at line 136 of file FMatrixEstimation.hh.

Referenced by FErrorFunction().

The documentation for this class was generated from the following files:
  • Geometry/FMatrixEstimation.hh
  • Geometry/FMatrixEstimation.cpp
Generated on Wed Jun 21 19:07:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Fortran_Matrix< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Fortran_Matrix

TNT::Fortran_Matrix< T > Class Template Reference

#include <Base/Math/tnt/fmat.h>

Collaboration diagram for TNT::Fortran_Matrix< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef T | value_type

Public Member Functions

const T * | begin () const
T * begin ()
Subscript | dim (Subscript d) const
const T * | end () const
T * end ()
Fortran_Matrix (Subscript M, Subscript N, char *s)
Fortran_Matrix (Subscript M, Subscript N, const T *v)
Fortran_Matrix (Subscript M, Subscript N, const T &value=T())
Fortran_Matrix (const Fortran_Matrix< T > &A)
Fortran_Matrix ()
Subscript | lbound () const
Fortran_Matrix< T > & | newsize (Subscript M, Subscript N)
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
Fortran_Matrix< T > & | operator= (const T &scalar)
Fortran_Matrix< T > & | operator= (const Fortran_Matrix< T > &A)
~Fortran_Matrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

T ** col_
Subscript m_
Subscript n_
T * v_

Detailed Description

template<class T>
class TNT::Fortran_Matrix< T >

Definition at line 55 of file fmat.h.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Fortran_Matrix< T >::const_iterator

Definition at line 66 of file fmat.h.

template<class T>
typedef const T& TNT::Fortran_Matrix< T >::const_reference

Definition at line 67 of file fmat.h.

template<class T>
typedef T TNT::Fortran_Matrix< T >::element_type

Definition at line 62 of file fmat.h.

template<class T>
typedef T* TNT::Fortran_Matrix< T >::iterator

Definition at line 64 of file fmat.h.

template<class T>
typedef T* TNT::Fortran_Matrix< T >::pointer

Definition at line 63 of file fmat.h.

template<class T>
typedef T& TNT::Fortran_Matrix< T >::reference

Definition at line 65 of file fmat.h.

template<class T>
typedef T TNT::Fortran_Matrix< T >::value_type

Definition at line 61 of file fmat.h.

Constructor & Destructor Documentation

template<class T>
TNT::Fortran_Matrix< T >::Fortran_Matrix ( ) [inline]

Definition at line 184 of file fmat.h.

template<class T>
TNT::Fortran_Matrix< T >::Fortran_Matrix ( const Fortran_Matrix< T > & A ) [inline]

Definition at line 185 of file fmat.h.

References TNT::Fortran_Matrix< T >::copy(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

template<class T>
TNT::Fortran_Matrix< T >::Fortran_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | const T & | value = T()
 | ) | [inline]

Definition at line 191 of file fmat.h.

References TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::set(), and value.

template<class T>
TNT::Fortran_Matrix< T >::Fortran_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | const T * | v
 | ) | [inline]

Definition at line 197 of file fmat.h.

References TNT::Fortran_Matrix< T >::copy(), and TNT::Fortran_Matrix< T >::initialize().

template<class T>
TNT::Fortran_Matrix< T >::Fortran_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | char * | s
 | ) | [inline]

Definition at line 204 of file fmat.h.

References TNT::Fortran_Matrix< T >::initialize().

template<class T>
TNT::Fortran_Matrix< T >::~Fortran_Matrix ( ) [inline]

Definition at line 217 of file fmat.h.

References TNT::Fortran_Matrix< T >::destroy().

Member Function Documentation

template<class T>
const T* TNT::Fortran_Matrix< T >::begin ( ) const [inline]

Definition at line 176 of file fmat.h.

References TNT::Fortran_Matrix< T >::v_.

template<class T>
T* TNT::Fortran_Matrix< T >::begin ( ) [inline]

Definition at line 175 of file fmat.h.

References TNT::Fortran_Matrix< T >::v_.

Referenced by Eigenproblem_quadratic_matrix(), and TNT::operator *().

template<class T>
void TNT::Fortran_Matrix< T >::copy ( const T * v ) [inline, protected]

Definition at line 106 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

Referenced by TNT::Fortran_Matrix< T >::Fortran_Matrix(), and TNT::Fortran_Matrix< T >::operator=().

template<class T>
void TNT::Fortran_Matrix< T >::destroy ( ) [inline, protected]

Definition at line 161 of file fmat.h.

References TNT::Fortran_Matrix< T >::col_, and TNT::Fortran_Matrix< T >::v_.

Referenced by TNT::Fortran_Matrix< T >::newsize(), TNT::Fortran_Matrix< T >::operator=(), and TNT::Fortran_Matrix< T >::~Fortran_Matrix().

template<class T>
Subscript TNT::Fortran_Matrix< T >::dim ( Subscript d ) const [inline]

Definition at line 250 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_, and TNT::Fortran_Matrix< T >::n_.

template<class T>
const T* TNT::Fortran_Matrix< T >::end ( ) const [inline]

Definition at line 179 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

template<class T>
T* TNT::Fortran_Matrix< T >::end ( ) [inline]

Definition at line 178 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

Referenced by TNT::operator *().

template<class T>
void TNT::Fortran_Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected]

Definition at line 80 of file fmat.h.

References TNT::Fortran_Matrix< T >::col_, TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, p, T, and TNT::Fortran_Matrix< T >::v_.

Referenced by TNT::Fortran_Matrix< T >::Fortran_Matrix(), TNT::Fortran_Matrix< T >::newsize(), and TNT::Fortran_Matrix< T >::operator=().

template<class T>
Subscript TNT::Fortran_Matrix< T >::lbound ( ) const [inline]

Definition at line 69 of file fmat.h.

template<class T>
Fortran_Matrix<T>& TNT::Fortran_Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline]

Definition at line 262 of file fmat.h.

References TNT::Fortran_Matrix< T >::destroy(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

Referenced by TNT::matmult(), and TNT::operator>>().

template<class T>
Subscript TNT::Fortran_Matrix< T >::num_cols ( ) const [inline]

Definition at line 260 of file fmat.h.

References TNT::Fortran_Matrix< T >::n_.

Referenced by Eigenproblem_quadratic_matrix(), TNT::eigenproblem_special_quadratic_matrix_solve(), Fortran_Matrix_to_Matrix(), TNT::Lapack_LU_linear_solve(), TNT::matmult(), TNT::mult_element(), TNT::Fortran_Matrix< T >::newsize(), TNT::operator *(), TNT::operator+(), TNT::operator-(), TNT::operator>>(), TNT::singular_value_decomposition_general_rectangular_matrix_solve(), and TNT::transpose().

template<class T>
Subscript TNT::Fortran_Matrix< T >::num_rows ( ) const [inline]

Definition at line 259 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_.

Referenced by Eigenproblem_quadratic_matrix(), TNT::eigenproblem_special_quadratic_matrix_solve(), Fortran_Matrix_to_Matrix(), TNT::Lapack_LU_linear_solve(), TNT::matmult(), TNT::mult_element(), TNT::Fortran_Matrix< T >::newsize(), TNT::operator *(), TNT::operator+(), TNT::operator-(), TNT::operator>>(), TNT::singular_value_decomposition_general_rectangular_matrix_solve(), and TNT::transpose().

template<class T>
const_reference TNT::Fortran_Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 288 of file fmat.h.

References TNT::Fortran_Matrix< T >::col_, TNT::Fortran_Matrix< T >::m_, and TNT::Fortran_Matrix< T >::n_.

template<class T>
reference TNT::Fortran_Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline]

Definition at line 277 of file fmat.h.

References TNT::Fortran_Matrix< T >::col_, TNT::Fortran_Matrix< T >::m_, and TNT::Fortran_Matrix< T >::n_.

template<class T>
Fortran_Matrix<T>& TNT::Fortran_Matrix< T >::operator= ( const T & scalar ) [inline]

Definition at line 243 of file fmat.h.

References TNT::Fortran_Matrix< T >::set().

template<class T>
Fortran_Matrix<T>& TNT::Fortran_Matrix< T >::operator= ( const Fortran_Matrix< T > & A ) [inline]

Definition at line 225 of file fmat.h.

References TNT::Fortran_Matrix< T >::copy(), TNT::Fortran_Matrix< T >::destroy(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

template<class T>
void TNT::Fortran_Matrix< T >::set ( const T & val ) [inline, protected]

Definition at line 132 of file fmat.h.

References TNT::Fortran_Matrix< T >::m_, TNT::Fortran_Matrix< T >::n_, and TNT::Fortran_Matrix< T >::v_.

Referenced by TNT::Fortran_Matrix< T >::Fortran_Matrix(), and TNT::Fortran_Matrix< T >::operator=().

Member Data Documentation

template<class T>
T** TNT::Fortran_Matrix< T >::col_ [protected]

Definition at line 75 of file fmat.h.

Referenced by TNT::Fortran_Matrix< T >::destroy(), TNT::Fortran_Matrix< T >::initialize(), and TNT::Fortran_Matrix< T >::operator()().

template<class T>
Subscript TNT::Fortran_Matrix< T >::m_ [protected]

Definition at line 73 of file fmat.h.

Referenced by TNT::Fortran_Matrix< T >::copy(), TNT::Fortran_Matrix< T >::dim(), TNT::Fortran_Matrix< T >::end(), TNT::Fortran_Matrix< T >::Fortran_Matrix(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::num_rows(), TNT::Fortran_Matrix< T >::operator()(), TNT::Fortran_Matrix< T >::operator=(), and TNT::Fortran_Matrix< T >::set().

template<class T>
Subscript TNT::Fortran_Matrix< T >::n_ [protected]

Definition at line 74 of file fmat.h.

Referenced by TNT::Fortran_Matrix< T >::copy(), TNT::Fortran_Matrix< T >::dim(), TNT::Fortran_Matrix< T >::end(), TNT::Fortran_Matrix< T >::Fortran_Matrix(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::operator()(), TNT::Fortran_Matrix< T >::operator=(), and TNT::Fortran_Matrix< T >::set().

template<class T>
T* TNT::Fortran_Matrix< T >::v_ [protected]

Definition at line 72 of file fmat.h.

Referenced by TNT::Fortran_Matrix< T >::begin(), TNT::Fortran_Matrix< T >::copy(), TNT::Fortran_Matrix< T >::destroy(), TNT::Fortran_Matrix< T >::end(), TNT::Fortran_Matrix< T >::Fortran_Matrix(), TNT::Fortran_Matrix< T >::initialize(), TNT::Fortran_Matrix< T >::operator=(), and TNT::Fortran_Matrix< T >::set().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/fmat.h
Generated on Wed Jun 21 19:13:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Fortran_Sparse_Col_Matrix< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Fortran_Sparse_Col_Matrix

TNT::Fortran_Sparse_Col_Matrix< T > Class Template Reference

#include <Base/Math/tnt/fcscmat.h>

Collaboration diagram for TNT::Fortran_Sparse_Col_Matrix< T >:

[legend]
List of all members.

Public Member Functions

const Subscript | col_ptr (Subscript i) const
Subscript | col_ptr (Subscript i)
Subscript | dim (Subscript i) const
Fortran_Sparse_Col_Matrix (Subscript M, Subscript N, Subscript nz, const T *val, Subscript *r, Subscript *c)
Fortran_Sparse_Col_Matrix (Subscript M, Subscript N, Subscript nz, char *val, char *r, char *c)
Fortran_Sparse_Col_Matrix (Subscript M, Subscript N, Subscript nz, const T *val, const Subscript *r, const Subscript *c)
Fortran_Sparse_Col_Matrix (const Fortran_Sparse_Col_Matrix< T > &S)
Fortran_Sparse_Col_Matrix (void)
Subscript | lbound () const
Fortran_Sparse_Col_Matrix & | newsize (Subscript M, Subscript N, Subscript nz)
Subscript | num_cols () const
Subscript | num_nonzeros () const
Subscript | num_rows () const
Fortran_Sparse_Col_Matrix & | operator= (const Fortran_Sparse_Col_Matrix &C)
const Subscript & | row_ind (Subscript i) const
Subscript & | row_ind (Subscript i)
const T & | val (Subscript i) const
T & | val (Subscript i)
~Fortran_Sparse_Col_Matrix ()

Protected Attributes

Vector< Subscript > colptr_
Subscript m_
Subscript n_
int | nz_
Vector< Subscript > rowind_
Vector< T > val_

Detailed Description

template<class T>
class TNT::Fortran_Sparse_Col_Matrix< T >

Definition at line 53 of file fcscmat.h.

Constructor & Destructor Documentation

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::Fortran_Sparse_Col_Matrix ( void )

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::Fortran_Sparse_Col_Matrix ( const Fortran_Sparse_Col_Matrix< T > & S ) [inline]

Definition at line 70 of file fcscmat.h.

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::Fortran_Sparse_Col_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | Subscript | nz,
 |  | const T * | val,
 |  | const Subscript * | r,
 |  | const Subscript * | c
 | ) | [inline]

Definition at line 73 of file fcscmat.h.

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::Fortran_Sparse_Col_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | Subscript | nz,
 |  | char * | val,
 |  | char * | r,
 |  | char * | c
 | ) | [inline]

Definition at line 78 of file fcscmat.h.

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::Fortran_Sparse_Col_Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | Subscript | nz,
 |  | const T * | val,
 |  | Subscript * | r,
 |  | Subscript * | c
 | ) | [inline]

Definition at line 83 of file fcscmat.h.

template<class T>
TNT::Fortran_Sparse_Col_Matrix< T >::~Fortran_Sparse_Col_Matrix ( ) [inline]

Definition at line 88 of file fcscmat.h.

Member Function Documentation

template<class T>
const Subscript TNT::Fortran_Sparse_Col_Matrix< T >::col_ptr ( Subscript i ) const [inline]

Definition at line 98 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::colptr_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::col_ptr ( Subscript i ) [inline]

Definition at line 97 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::colptr_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::dim ( Subscript i ) const [inline]

Definition at line 104 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::m_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::lbound ( ) const [inline]

Definition at line 116 of file fcscmat.h.

template<class T>
Fortran_Sparse_Col_Matrix& TNT::Fortran_Sparse_Col_Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N,
 |  | Subscript | nz
 | ) | [inline]

Definition at line 133 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::colptr_, TNT::Vector< T >::newsize(), TNT::Fortran_Sparse_Col_Matrix< T >::rowind_, and TNT::Fortran_Sparse_Col_Matrix< T >::val_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::num_cols ( ) const [inline]

Definition at line 101 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::m_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::num_nonzeros ( ) const [inline]

Definition at line 115 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::nz_.

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::num_rows ( ) const [inline]

Definition at line 102 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::n_.

template<class T>
Fortran_Sparse_Col_Matrix& TNT::Fortran_Sparse_Col_Matrix< T >::operator= ( const Fortran_Sparse_Col_Matrix< T > & C ) [inline]

Definition at line 120 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::colptr_, TNT::Fortran_Sparse_Col_Matrix< T >::m_, TNT::Fortran_Sparse_Col_Matrix< T >::n_, TNT::Fortran_Sparse_Col_Matrix< T >::nz_, TNT::Fortran_Sparse_Col_Matrix< T >::rowind_, and TNT::Fortran_Sparse_Col_Matrix< T >::val_.

template<class T>
const Subscript& TNT::Fortran_Sparse_Col_Matrix< T >::row_ind ( Subscript i ) const [inline]

Definition at line 95 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::rowind_.

template<class T>
Subscript& TNT::Fortran_Sparse_Col_Matrix< T >::row_ind ( Subscript i ) [inline]

Definition at line 94 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::rowind_.

template<class T>
const T& TNT::Fortran_Sparse_Col_Matrix< T >::val ( Subscript i ) const [inline]

Definition at line 92 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::val_.

template<class T>
T& TNT::Fortran_Sparse_Col_Matrix< T >::val ( Subscript i ) [inline]

Definition at line 91 of file fcscmat.h.

References TNT::Fortran_Sparse_Col_Matrix< T >::val_.

Member Data Documentation

template<class T>
Vector<Subscript> TNT::Fortran_Sparse_Col_Matrix< T >::colptr_ [protected]

Definition at line 60 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::col_ptr(), TNT::Fortran_Sparse_Col_Matrix< T >::newsize(), and TNT::Fortran_Sparse_Col_Matrix< T >::operator=().

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::m_ [protected]

Definition at line 63 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::dim(), TNT::Fortran_Sparse_Col_Matrix< T >::num_cols(), and TNT::Fortran_Sparse_Col_Matrix< T >::operator=().

template<class T>
Subscript TNT::Fortran_Sparse_Col_Matrix< T >::n_ [protected]

Definition at line 64 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::num_rows(), and TNT::Fortran_Sparse_Col_Matrix< T >::operator=().

template<class T>
int TNT::Fortran_Sparse_Col_Matrix< T >::nz_ [protected]

Definition at line 62 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::num_nonzeros(), and TNT::Fortran_Sparse_Col_Matrix< T >::operator=().

template<class T>
Vector<Subscript> TNT::Fortran_Sparse_Col_Matrix< T >::rowind_ [protected]

Definition at line 59 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::newsize(), TNT::Fortran_Sparse_Col_Matrix< T >::operator=(), and TNT::Fortran_Sparse_Col_Matrix< T >::row_ind().

template<class T>
Vector<T> TNT::Fortran_Sparse_Col_Matrix< T >::val_ [protected]

Definition at line 58 of file fcscmat.h.

Referenced by TNT::Fortran_Sparse_Col_Matrix< T >::newsize(), TNT::Fortran_Sparse_Col_Matrix< T >::operator=(), and TNT::Fortran_Sparse_Col_Matrix< T >::val().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/fcscmat.h
Generated on Wed Jun 21 19:13:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Fortran_Sparse_Vector< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Fortran_Sparse_Vector

TNT::Fortran_Sparse_Vector< T > Class Template Reference

#include <Base/Math/tnt/fspvec.h>

Collaboration diagram for TNT::Fortran_Sparse_Vector< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

Subscript | dim () const
Fortran_Sparse_Vector (Subscript N, Subscript nz, char *v, char *ind)
Fortran_Sparse_Vector (const Fortran_Sparse_Vector< T > &S)
Fortran_Sparse_Vector (Subscript N, Subscript nz, const T *values, const Subscript *indices)
Fortran_Sparse_Vector (Subscript N, Subscript nz)
Fortran_Sparse_Vector ()
const Subscript & | index (Subscript i) const
Subscript & | index (Subscript i)
Subscript | lbound () const
Fortran_Sparse_Vector< T > & | newsize (Subscript N, Subscript nz)
Subscript | num_nonzeros () const
Fortran_Sparse_Vector< T > & | operator= (const Fortran_Sparse_Vector< T > &A)
const T & | val (Subscript i) const
T & | val (Subscript i)

Protected Attributes

Subscript dim_
Vector< Subscript > index_
Vector< T > val_

Detailed Description

template<class T>
class TNT::Fortran_Sparse_Vector< T >

Definition at line 52 of file fspvec.h.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Fortran_Sparse_Vector< T >::const_iterator

Definition at line 64 of file fspvec.h.

template<class T>
typedef const T& TNT::Fortran_Sparse_Vector< T >::const_reference

Definition at line 65 of file fspvec.h.

template<class T>
typedef T TNT::Fortran_Sparse_Vector< T >::element_type

Definition at line 60 of file fspvec.h.

template<class T>
typedef T* TNT::Fortran_Sparse_Vector< T >::iterator

Definition at line 62 of file fspvec.h.

template<class T>
typedef T* TNT::Fortran_Sparse_Vector< T >::pointer

Definition at line 61 of file fspvec.h.

template<class T>
typedef T& TNT::Fortran_Sparse_Vector< T >::reference

Definition at line 63 of file fspvec.h.

template<class T>
typedef Subscript TNT::Fortran_Sparse_Vector< T >::size_type

Definition at line 58 of file fspvec.h.

template<class T>
typedef T TNT::Fortran_Sparse_Vector< T >::value_type

Definition at line 59 of file fspvec.h.

Constructor & Destructor Documentation

template<class T>
TNT::Fortran_Sparse_Vector< T >::Fortran_Sparse_Vector ( ) [inline]

Definition at line 92 of file fspvec.h.

template<class T>
TNT::Fortran_Sparse_Vector< T >::Fortran_Sparse_Vector | ( | Subscript | N,
 |  | Subscript | nz
 | ) | [inline]

Definition at line 93 of file fspvec.h.

template<class T>
TNT::Fortran_Sparse_Vector< T >::Fortran_Sparse_Vector | ( | Subscript | N,
 |  | Subscript | nz,
 |  | const T * | values,
 |  | const Subscript * | indices
 | ) | [inline]

Definition at line 95 of file fspvec.h.

template<class T>
TNT::Fortran_Sparse_Vector< T >::Fortran_Sparse_Vector ( const Fortran_Sparse_Vector< T > & S ) [inline]

Definition at line 99 of file fspvec.h.

template<class T>
TNT::Fortran_Sparse_Vector< T >::Fortran_Sparse_Vector | ( | Subscript | N,
 |  | Subscript | nz,
 |  | char * | v,
 |  | char * | ind
 | ) | [inline]

Definition at line 106 of file fspvec.h.

Member Function Documentation

template<class T>
Subscript TNT::Fortran_Sparse_Vector< T >::dim ( ) const [inline]

Definition at line 79 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::dim_.

template<class T>
const Subscript& TNT::Fortran_Sparse_Vector< T >::index ( Subscript i ) const [inline]

Definition at line 88 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::index_.

template<class T>
Subscript& TNT::Fortran_Sparse_Vector< T >::index ( Subscript i ) [inline]

Definition at line 87 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::index_.

Referenced by TNT::operator>>().

template<class T>
Subscript TNT::Fortran_Sparse_Vector< T >::lbound ( ) const [inline]

Definition at line 67 of file fspvec.h.

template<class T>
Fortran_Sparse_Vector<T>& TNT::Fortran_Sparse_Vector< T >::newsize | ( | Subscript | N,
 |  | Subscript | nz
 | ) | [inline]

Definition at line 111 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::dim_, TNT::Fortran_Sparse_Vector< T >::index_, TNT::Vector< T >::newsize(), and TNT::Fortran_Sparse_Vector< T >::val_.

Referenced by TNT::operator>>().

template<class T>
Subscript TNT::Fortran_Sparse_Vector< T >::num_nonzeros ( ) const [inline]

Definition at line 80 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::val_.

template<class T>
Fortran_Sparse_Vector<T>& TNT::Fortran_Sparse_Vector< T >::operator= ( const Fortran_Sparse_Vector< T > & A ) [inline]

Definition at line 119 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::dim_, TNT::Fortran_Sparse_Vector< T >::index_, and TNT::Fortran_Sparse_Vector< T >::val_.

template<class T>
const T& TNT::Fortran_Sparse_Vector< T >::val ( Subscript i ) const [inline]

Definition at line 85 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::val_.

template<class T>
T& TNT::Fortran_Sparse_Vector< T >::val ( Subscript i ) [inline]

Definition at line 84 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::val_.

Referenced by TNT::operator>>().

Member Data Documentation

template<class T>
Subscript TNT::Fortran_Sparse_Vector< T >::dim_ [protected]

Definition at line 72 of file fspvec.h.

Referenced by TNT::Fortran_Sparse_Vector< T >::dim(), TNT::Fortran_Sparse_Vector< T >::newsize(), and TNT::Fortran_Sparse_Vector< T >::operator=().

template<class T>
Vector<Subscript> TNT::Fortran_Sparse_Vector< T >::index_ [protected]

Definition at line 71 of file fspvec.h.

Referenced by TNT::Fortran_Sparse_Vector< T >::index(), TNT::Fortran_Sparse_Vector< T >::newsize(), and TNT::Fortran_Sparse_Vector< T >::operator=().

template<class T>
Vector<T> TNT::Fortran_Sparse_Vector< T >::val_ [protected]

Definition at line 70 of file fspvec.h.

Referenced by TNT::Fortran_Sparse_Vector< T >::newsize(), TNT::Fortran_Sparse_Vector< T >::num_nonzeros(), TNT::Fortran_Sparse_Vector< T >::operator=(), and TNT::Fortran_Sparse_Vector< T >::val().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/fspvec.h
Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FromBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

FromBase Class Reference

Inheritance diagram for FromBase:

[legend]
Collaboration diagram for FromBase:

[legend]
List of all members.

Public Member Functions

FromBase ()
std::string | GetTag () const
void Who ()

Public Attributes

std::string | Name_

Detailed Description

Definition at line 40 of file ExampleConstraints.cpp.

Constructor & Destructor Documentation

FromBase::FromBase ( ) [inline]

Definition at line 42 of file ExampleConstraints.cpp.

Member Function Documentation

std::string Base::GetTag ( ) const [inline, inherited]

Definition at line 39 of file ExampleFactory.cpp.

References Base::Name_.

void Base::Who ( ) [inline, inherited]

Definition at line 40 of file ExampleFactory.cpp.

References Base::Name_.

Referenced by main().

Member Data Documentation

std::string Base::Name_ [inherited]

Definition at line 41 of file ExampleFactory.cpp.

Referenced by Base::GetTag(), and Base::Who().

The documentation for this class was generated from the following file:
  • Base/Debug/Examples/ExampleConstraints.cpp
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Gauss< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Gauss

BIAS::Gauss< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

smoothing with gaussian kernel More...

#include <Filter/Gauss.hh>

Inheritance diagram for BIAS::Gauss< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Gauss< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | CalculationInFloat () const
decides if calculation is done in integer or floating point
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
sets gauss kernel if params changed and calls convolution or fast grey implementation if possible
virtual int | Filter11x11Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | Filter13x13Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | Filter3x3Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | Filter3x3GreyThreshold (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, float threshold=0.0)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored Keep src value of test point if any value under filtermask is below threshold.
virtual int | Filter5x5Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | Filter5x5GreyThreshold (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, float threshold=0.0)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored.
virtual int | Filter7x7Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | Filter9x9Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
sets gauss kernel if params changed and calls convolution
virtual int | FilterGrey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, bool ResetROI=false)
wrapper around FilterNxNGrey, which decides on sigma and cutoffratio which filter to apply and how often
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
sets gauss kernel if params changed and calls convolution
Gauss (Param &para, const int grp, const std::string &postfix)
Gauss (Param &para, const std::string &postfix="")
Gauss ()
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetKernel (FilterMask &fm) const
get the current filter mask
double | GetRatio () const
double * | GetRatioPointer ()
double | GetSigma () const
double * | GetSigmaPointer ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
prints the used filter mask, for debugging
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws, bool AdjustSigma=true)
define the half win size of the kernel, if AdjustSigma is true sigma is computed according to the cut-off ratio, otherwise the ratio is adapted to the sigma
void | SetKernel (FilterMask &fm)
set a new filter mask
void | SetRatio (const double ratio)
void | SetSigma (const double si)
~Gauss ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _CalculateKernels (double Sigma, double Ratio)
calculates the kernel
int | ConvFloatHori_ (const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst)
worker function for float separated (horizontal) convolution
int | ConvFloatMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for float matrix convolution
int | ConvFloatVert_ (const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst)
worker function for float separated (vertical) convolution
int | ConvIntHori_ (const Image< InputStorageType > &src, Image< CONV_INT > &dst)
worker function for int separated (horizontal) convolution
int | ConvIntMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for int matrix convolution
int | ConvIntVert_ (const Image< CONV_INT > &src, Image< OutputStorageType > &dst)
worker function for int separated (vertical) convolution
void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
FilterMask _fm
the kernel data used for convolution
Gauss< InputStorageType, OutputStorageType > * | _GaussIO
Gauss< OutputStorageType,
OutputStorageType > * 		_GaussOO
to allow for iterated gauss convolution saving the intermediate image we need a different instance, this is caused by template concept
double * | _GaussRatio
minimum ratio of 1D kernel center and border, ignore smaller entries
double * | _GaussSigma
the parameter sigma of gaussian kernel
double | _LastRatio
double | _LastSigma
long int | _liDebugLevel
bool | _ParamsAllocated
Image< CONV_FLOAT > | _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > | _tmpInt
temporary memory, needed for separable filters when integer filtering

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Gauss< InputStorageType, OutputStorageType >

smoothing with gaussian kernel

Parameters are sigma and ratio, optionally you can set half window size, which is computed from the other parameters otherwise. The gaussian kernel is separabel, using vector convolution The Gaussian function is truncated, when the ratio between the maximum kernel element and the actual kernel element falls below ratio.

If you have a one-channel (typically grey) image, the fast FilterGrey method comes into play, which calls the appropriate fast FilterNxNGrey function according to your sigma and cutoffratio. The fast functions work on the whole image and dont care about the roi in the src image.

Author:
woelk 09/2004, koeser 06/2005

Definition at line 53 of file Gauss.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Gauss::Gauss ( )

Definition at line 38 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

template<class InputStorageType, class OutputStorageType>
Gauss::Gauss | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 54 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
Gauss::Gauss | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 68 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, and BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma.

template<class StorageType, class KernelType>
Gauss::~Gauss ( )

Definition at line 78 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, and BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma.

Member Function Documentation

template<class StorageType, class KernelType>
void Gauss::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 954 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Param::CheckParam(), and BIAS::Param::GetParamDouble().

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss().

template<class InputStorageType, class OutputStorageType>
void Gauss::_CalculateKernels | ( | double | Sigma,
 |  | double | Ratio
 | ) | [protected]

calculates the kernel

Definition at line 881 of file Gauss.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, BIAS::FilterMask::ComputeIntPrecisionBits(), CONV_INT, BIAS::FilterMask::CreateIntFilter(), D_CONV_KERNEL, FM_FLOAT, and BIAS::FilterMask::Init().

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
bool BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat ( ) const [inline, inherited]

decides if calculation is done in integer or floating point

Definition at line 104 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_FLOAT > & | dst
 | ) | [protected, inherited]

worker function for float separated (horizontal) convolution

Definition at line 294 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfh(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float matrix convolution

Definition at line 232 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatVert_ | ( | const Image< CONV_FLOAT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float separated (vertical) convolution

Definition at line 348 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_INT > & | dst
 | ) | [protected, inherited]

worker function for int separated (horizontal) convolution

Definition at line 115 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetHorizRightShift(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepih(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int matrix convolution

Definition at line 50 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKerneli(), BIAS::FilterMask::GetKernelRightShift(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntVert_ | ( | const Image< CONV_INT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int separated (vertical) convolution

Definition at line 172 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepiv(), BIAS::FilterMask::GetVertRightShift(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

sets gauss kernel if params changed and calls convolution or fast grey implementation if possible

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 93 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, BIAS::ImageConvert::ConvertST(), D_FILTERBASE_CALLSTACK, BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::ImageBase::GetStorageType(), BIAS::FilterMask::IsSize1x1(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), and main().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter11x11Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 692 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter13x13Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 782 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter3x3Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 295 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter3x3GreyThreshold | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | float | threshold = 0.0
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored Keep src value of test point if any value under filtermask is below threshold.

Definition at line 216 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter5x5Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 452 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter5x5GreyThreshold | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | float | threshold = 0.0
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored.

Keep src value of test point if any value under filtermask is below threshold.

Definition at line 362 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter7x7Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 527 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int Gauss::Filter9x9Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

fast, approximate, direct implementation, ignoring wrap-arounds, roi is updated but ignored

Author:
koeser 06/2005

Definition at line 607 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASABORT, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, FM_FLOAT, BIAS::ImageBase::GetChannelCount(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize().

template<class InputStorageType, class OutputStorageType>
int Gauss::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

sets gauss kernel if params changed and calls convolution

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 109 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, and D_FILTERBASE_CALLSTACK.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int Gauss::FilterGrey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | bool | ResetROI = false
 | ) | [virtual]

wrapper around FilterNxNGrey, which decides on sigma and cutoffratio which filter to apply and how often

Parameters:
ResetROI reset the roi during filtering
Author:
koeser 06/2005

Definition at line 130 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIASDOUT, D_GAUSS_FAST_GREY, and BIAS::ImageBase::UnsetROI().

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Gauss::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

sets gauss kernel if params changed and calls convolution

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 119 of file Gauss.cpp.

References BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, and D_FILTERBASE_CALLSTACK.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inline, protected, virtual, inherited]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, and BIAS::Mean< unsigned char, unsigned char >.

Definition at line 144 of file Convolution.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetKernel ( FilterMask & fm ) const [inline, inherited]

get the current filter mask

Definition at line 93 of file Convolution.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::Gauss< InputStorageType, OutputStorageType >::GetRatio ( ) const [inline]

Definition at line 148 of file Gauss.hh.

template<class InputStorageType, class OutputStorageType>
double* BIAS::Gauss< InputStorageType, OutputStorageType >::GetRatioPointer ( ) [inline]

Definition at line 169 of file Gauss.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class InputStorageType, class OutputStorageType>
double BIAS::Gauss< InputStorageType, OutputStorageType >::GetSigma ( ) const [inline]

Definition at line 144 of file Gauss.hh.

template<class InputStorageType, class OutputStorageType>
double* BIAS::Gauss< InputStorageType, OutputStorageType >::GetSigmaPointer ( ) [inline]

Definition at line 168 of file Gauss.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void Convolution::PrintKernel ( ) const [inherited]

prints the used filter mask, for debugging

Definition at line 582 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::FilterMask::IsSeparable().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Gauss< InputStorageType, OutputStorageType >::SetHalfWinSize | ( | const int | hws,
 |  | bool | AdjustSigma = true
 | ) | [inline]

define the half win size of the kernel, if AdjustSigma is true sigma is computed according to the cut-off ratio, otherwise the ratio is adapted to the sigma

Definition at line 153 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), and BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel ( FilterMask & fm ) [inline, inherited]

set a new filter mask

Definition at line 97 of file Convolution.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Gauss< InputStorageType, OutputStorageType >::SetRatio ( const double ratio ) [inline]

Definition at line 146 of file Gauss.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::Gauss< InputStorageType, OutputStorageType >::SetSigma ( const double si ) [inline]

Definition at line 142 of file Gauss.hh.

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
FilterMask BIAS::Convolution< InputStorageType, OutputStorageType >::_fm [protected, inherited]

the kernel data used for convolution

Definition at line 108 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

template<class InputStorageType, class OutputStorageType>
Gauss<InputStorageType, OutputStorageType>* BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussIO [protected]

Definition at line 195 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), and BIAS::Gauss< InputStorageType, OutputStorageType >::~Gauss().

template<class InputStorageType, class OutputStorageType>
Gauss<OutputStorageType, OutputStorageType>* BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussOO [protected]

to allow for iterated gauss convolution saving the intermediate image we need a different instance, this is caused by template concept

Definition at line 194 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), and BIAS::Gauss< InputStorageType, OutputStorageType >::~Gauss().

template<class InputStorageType, class OutputStorageType>
double* BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussRatio [protected]

minimum ratio of 1D kernel center and border, ignore smaller entries

Definition at line 177 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), and BIAS::Gauss< InputStorageType, OutputStorageType >::~Gauss().

template<class InputStorageType, class OutputStorageType>
double* BIAS::Gauss< InputStorageType, OutputStorageType >::_GaussSigma [protected]

the parameter sigma of gaussian kernel

Definition at line 169 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), and BIAS::Gauss< InputStorageType, OutputStorageType >::~Gauss().

template<class InputStorageType, class OutputStorageType>
double BIAS::Gauss< InputStorageType, OutputStorageType >::_LastRatio [protected]

Definition at line 180 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), and BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss().

template<class InputStorageType, class OutputStorageType>
double BIAS::Gauss< InputStorageType, OutputStorageType >::_LastSigma [protected]

Definition at line 180 of file Gauss.hh.

Referenced by BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::FilterInt(), and BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<CONV_FLOAT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat [protected, inherited]

temporary memory, needed for separable filters when float filtering

Definition at line 115 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

template<class InputStorageType, class OutputStorageType>
Image<CONV_INT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpInt [protected, inherited]

temporary memory, needed for separable filters when integer filtering

Definition at line 118 of file Convolution.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Gauss.hh
  • Filter/Gauss.cpp
Generated on Wed Jun 21 19:07:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GaussHelmert Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GaussHelmert

BIAS::GaussHelmert Class Reference

see Foerstner, 2004, "Uncertainty And Projective Geometry" ! untested ! More...

#include <MathAlgo/GaussHelmert.hh>

Inheritance diagram for BIAS::GaussHelmert:

[legend]
Collaboration diagram for BIAS::GaussHelmert:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | Solve (BIAS::Vector< double > &observations, const BIAS::Matrix< double > &obs_cov, BIAS::Vector< double > &x, BIAS::Matrix< double > &cov)
virtual | ~GaussHelmert ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | ComputeNormalSystem_ (const Matrix< double > &A, const Matrix< double > &B, const Matrix< double > &H, const Matrix< double > &Sigma_ll, const Vector< double > &x_hat, const Vector< double > &l_hat, const Vector< double > &v_hat, Matrix< double > &normal_matrix, Vector< double > &normal_vector)
virtual Vector< double > & | g_ (const Vector< double > &l, const Vector< double > &x)=0
joint constraints on obseravtions and unknowns
GaussHelmert ()
protected constructor to prohibit instantiation of class
virtual Matrix< double > & | GetA_ (const Vector< double > &l, const Vector< double > &x)=0
jacobian of g_() with respect to x at x, l
virtual Matrix< double > & | GetB_ (const Vector< double > &l, const Vector< double > &x)=0
transposed of jacobian of g_() with respect to l at x, l
virtual Matrix< double > & | GetH_ (const Vector< double > &x)=0
transposed of jacobian of h_() with respect to x at x
virtual Vector< double > & | h_ (const Vector< double > &x)=0
constraints on the unknowns

Protected Attributes

long int | _liDebugLevel
int | MaxNumIter_
double | Precision_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

see Foerstner, 2004, "Uncertainty And Projective Geometry" ! untested !

Author:
woelk 04/2006

Definition at line 23 of file GaussHelmert.hh.

Constructor & Destructor Documentation

BIAS::GaussHelmert::~GaussHelmert ( ) [virtual]

Definition at line 17 of file GaussHelmert.cpp.

BIAS::GaussHelmert::GaussHelmert ( ) [protected]

protected constructor to prohibit instantiation of class

Definition at line 12 of file GaussHelmert.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::GaussHelmert::ComputeNormalSystem_ | ( | const Matrix< double > & | A,
 |  | const Matrix< double > & | B,
 |  | const Matrix< double > & | H,
 |  | const Matrix< double > & | Sigma_ll,
 |  | const Vector< double > & | x_hat,
 |  | const Vector< double > & | l_hat,
 |  | const Vector< double > & | v_hat,
 |  | Matrix< double > & | normal_matrix,
 |  | Vector< double > & | normal_vector
 | ) | [protected]

Definition at line 114 of file GaussHelmert.cpp.

References g_(), h_(), BIAS::SVD::Invert(), TNT::Matrix< T >::num_cols(), r, BIAS::Matrix< T >::SetZero(), and BIAS::Matrix< T >::Transpose().

Referenced by Solve().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

virtual Vector<double>& BIAS::GaussHelmert::g_ | ( | const Vector< double > & | l,
 |  | const Vector< double > & | x
 | ) | [protected, pure virtual]

joint constraints on obseravtions and unknowns

Referenced by ComputeNormalSystem_().

virtual Matrix<double>& BIAS::GaussHelmert::GetA_ | ( | const Vector< double > & | l,
 |  | const Vector< double > & | x
 | ) | [protected, pure virtual]

jacobian of g_() with respect to x at x, l

Referenced by Solve().

virtual Matrix<double>& BIAS::GaussHelmert::GetB_ | ( | const Vector< double > & | l,
 |  | const Vector< double > & | x
 | ) | [protected, pure virtual]

transposed of jacobian of g_() with respect to l at x, l

Referenced by Solve().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

virtual Matrix<double>& BIAS::GaussHelmert::GetH_ ( const Vector< double > & x ) [protected, pure virtual]

transposed of jacobian of h_() with respect to x at x

Referenced by Solve().

virtual Vector<double>& BIAS::GaussHelmert::h_ ( const Vector< double > & x ) [protected, pure virtual]

constraints on the unknowns

Referenced by ComputeNormalSystem_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int BIAS::GaussHelmert::Solve | ( | BIAS::Vector< double > & | observations,
 |  | const BIAS::Matrix< double > & | obs_cov,
 |  | BIAS::Vector< double > & | x,
 |  | BIAS::Matrix< double > & | cov
 | ) |

Definition at line 21 of file GaussHelmert.cpp.

References BIASERR, ComputeNormalSystem_(), GetA_(), GetB_(), GetH_(), BIAS::SVD::Invert(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), Precision_, r, R, res, BIAS::Vector< T >::ScalarProduct(), BIAS::Vector< T >::SetZero(), TNT::Vector< T >::size(), BIAS::SVD::Solve(), and tmp_cov.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int BIAS::GaussHelmert::MaxNumIter_ [protected]

Definition at line 37 of file GaussHelmert.hh.

double BIAS::GaussHelmert::Precision_ [protected]

Definition at line 38 of file GaussHelmert.hh.

Referenced by Solve().

The documentation for this class was generated from the following files:
  • MathAlgo/GaussHelmert.hh
  • MathAlgo/GaussHelmert.cpp
Generated on Wed Jun 21 19:07:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GenGroundTruth Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GenGroundTruth

BIAS::GenGroundTruth Class Reference

#include <Utils/GenGroundTruth.hh>

List of all members.

Static Public Member Functions

static void | CreateIdealMatches (std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, std::vector< std::vector< BIAS::HomgPoint2D > > &matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0)
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
static void | CreateMatches (std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false)
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
static void | CreateMatches (std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0)
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras Adds spatial noise with sigma spatial_noise to position of 2D points in every camera.
static void | CreateMatchesOutlier (std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, double outlier_fraction, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false)
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
static void | DeNormalizeMatches (std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K)
de-normalizes the matches by multiplying with K
static void | DrawMatches (BIAS::Image< unsigned char > &im, std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, unsigned char lcolor, unsigned char mcolor)
draws the matches in image im with background 0, match in color mcolor and line defined by match in color lcolcor woelk 05 2003
static void | GenerateRandomCube (std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=-50.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double gammaX=0.0, double gammaY=0.0, double gammaZ=1.0, double alphamax=100.0, double betamax=100.0, double gammamax=100.0)
Generates 'n' points which are all located in a cube specified by space point coords aX, aY, aZ and the coords of three spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ and gammaX, gammaY, gammaZ, which are normalized internally.
static void | GenerateRandomPlane (std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=0.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double alphamax=100.0, double betamax=100.0)
Generates 'n' points which are all located on a plane specified by space point coords aX, aY, aZ and the coords of two spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ, which are normalized internally.
static void | NormalizeMatches (std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K)
normalizes the matches by multiplying with K^-1
static int | ReadCorrespondences (const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2)
static int | ReadWorldPoints (const char *Filename, std::vector< BIAS::HomgPoint3D > &Points)
Read 3D world coordinates from a file in binary format.
static int | WriteCorrespondences (const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2)
Store 2D picture correspondences in a file in binary format, so that you can keep the full accuracy of a double.
static int | WriteWorldPoints (const char *Filename, std::vector< BIAS::HomgPoint3D > &Points)
Store 3D world coordinates in a file in binary format, so that you can keep the full accuracy of a double.

Detailed Description

Definition at line 41 of file GenGroundTruth.hh.

Member Function Documentation

static void BIAS::GenGroundTruth::CreateIdealMatches | ( | std::vector< BIAS::PMatrix > & | pvec,
 |  | unsigned | num,
 |  | unsigned | width,
 |  | unsigned | height,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | matches,
 |  | std::vector< BIAS::HomgPoint3D > & | points,
 |  | double | minx = -50.0,
 |  | double | maxx = 50.0,
 |  | double | miny = -50.0,
 |  | double | maxy = 50.0,
 |  | double | minz = -50.0,
 |  | double | maxz = 50.0
 | ) | [static]

Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.

Author:
woelk 05 2003

static void BIAS::GenGroundTruth::CreateMatches | ( | std::vector< BIAS::PMatrix > & | pvec,
 |  | std::vector< BIAS::PMatrix > & | n_pvec,
 |  | unsigned | num,
 |  | unsigned | width,
 |  | unsigned | height,
 |  | double | spatial_noise,
 |  | double | r_noise,
 |  | double | c_noise,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | i_matches,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | n_matches,
 |  | std::vector< BIAS::HomgPoint3D > & | points,
 |  | double | minx = -50.0,
 |  | double | maxx = 50.0,
 |  | double | miny = -50.0,
 |  | double | maxy = 50.0,
 |  | double | minz = -50.0,
 |  | double | maxz = 50.0,
 |  | bool | print = false
 | ) | [static]

Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.

Adds spatial noise with a sigma of spatial_noise to position of 2D points in every camera. The ideal matches are returned in i_matches, the noisy matches are returned in n_matches. An additional normal ditributed position error with sigma of c_noise and a normal distributed rotational error with sigma of r_noise are assumed for the camera matrices. The noisy camera matrices are returned in n_pvec.

Author:
woelk 05 2003

static void BIAS::GenGroundTruth::CreateMatches | ( | std::vector< BIAS::PMatrix > & | pvec,
 |  | unsigned | num,
 |  | unsigned | width,
 |  | unsigned | height,
 |  | double | spatial_noise,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | i_matches,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | n_matches,
 |  | std::vector< BIAS::HomgPoint3D > & | points,
 |  | double | minx = -50.0,
 |  | double | maxx = 50.0,
 |  | double | miny = -50.0,
 |  | double | maxy = 50.0,
 |  | double | minz = -50.0,
 |  | double | maxz = 50.0
 | ) | [static]

Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras Adds spatial noise with sigma spatial_noise to position of 2D points in every camera.

The ideal matches are returned in i_matches, the noisy matches are returned in n_matches.

Author:
woelk 05 2003

static void BIAS::GenGroundTruth::CreateMatchesOutlier | ( | std::vector< BIAS::PMatrix > & | pvec,
 |  | std::vector< BIAS::PMatrix > & | n_pvec,
 |  | unsigned | num,
 |  | unsigned | width,
 |  | unsigned | height,
 |  | double | spatial_noise,
 |  | double | r_noise,
 |  | double | c_noise,
 |  | double | outlier_fraction,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | i_matches,
 |  | std::vector< std::vector< BIAS::HomgPoint2D > > & | n_matches,
 |  | std::vector< BIAS::HomgPoint3D > & | points,
 |  | double | minx = -50.0,
 |  | double | maxx = 50.0,
 |  | double | miny = -50.0,
 |  | double | maxy = 50.0,
 |  | double | minz = -50.0,
 |  | double | maxz = 50.0,
 |  | bool | print = false
 | ) | [static]

Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.

Adds spatial noise with a sigma of spatial_noise to position of 2D points in every camera. The ideal matches are returned in i_matches, the noisy matches are returned in n_matches. An additional normal ditributed position error with sigma of c_noise and a normal distributed rotational error with sigma of r_noise are assumed for the camera matrices. The noisy camera matrices are returned in n_pvec. outlier_fraction of the matches are outlier. They are generated by adding a random offset to each x and y of each point after image 0. The offset is generated between 2*spatial_noise and 10*spatial_noise.

Author:
woelk 05 2003

static void BIAS::GenGroundTruth::DeNormalizeMatches | ( | std::vector< BIAS::HomgPoint2D > & | match1,
 |  | std::vector< BIAS::HomgPoint2D > & | match2,
 |  | BIAS::KMatrix | K
 | ) | [static]

de-normalizes the matches by multiplying with K

Author:
woelk 05 2003

static void BIAS::GenGroundTruth::DrawMatches | ( | BIAS::Image< unsigned char > & | im,
 |  | std::vector< BIAS::HomgPoint2D > & | match1,
 |  | std::vector< BIAS::HomgPoint2D > & | match2,
 |  | unsigned char | lcolor,
 |  | unsigned char | mcolor
 | ) | [static]

draws the matches in image im with background 0, match in color mcolor and line defined by match in color lcolcor woelk 05 2003

static void BIAS::GenGroundTruth::GenerateRandomCube | ( | std::vector< BIAS::HomgPoint3D > & | Points,
 |  | int | n = 200,
 |  | double | aX = -50.0,
 |  | double | aY = -50.0,
 |  | double | aZ = -50.0,
 |  | double | alphaX = 1.0,
 |  | double | alphaY = 0.0,
 |  | double | alphaZ = 0.0,
 |  | double | betaX = 0.0,
 |  | double | betaY = 1.0,
 |  | double | betaZ = 0.0,
 |  | double | gammaX = 0.0,
 |  | double | gammaY = 0.0,
 |  | double | gammaZ = 1.0,
 |  | double | alphamax = 100.0,
 |  | double | betamax = 100.0,
 |  | double | gammamax = 100.0
 | ) | [static]

Generates 'n' points which are all located in a cube specified by space point coords aX, aY, aZ and the coords of three spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ and gammaX, gammaY, gammaZ, which are normalized internally.

'alphamax', 'betamax' and 'gammamax' define width, height and depth of the cube. This method does not clear the result vector 'Points'! By default it generates 200 points on a rectangular 100x100x100 cube centered at 0 0 0.

Author:
Matthias Dunda 08 2003

static void BIAS::GenGroundTruth::GenerateRandomPlane | ( | std::vector< BIAS::HomgPoint3D > & | Points,
 |  | int | n = 200,
 |  | double | aX = -50.0,
 |  | double | aY = -50.0,
 |  | double | aZ = 0.0,
 |  | double | alphaX = 1.0,
 |  | double | alphaY = 0.0,
 |  | double | alphaZ = 0.0,
 |  | double | betaX = 0.0,
 |  | double | betaY = 1.0,
 |  | double | betaZ = 0.0,
 |  | double | alphamax = 100.0,
 |  | double | betamax = 100.0
 | ) | [static]

Generates 'n' points which are all located on a plane specified by space point coords aX, aY, aZ and the coords of two spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ, which are normalized internally.

'alphamax' and 'betamax' define width and height of the plane. This method does not clear the result vector 'Points'! By default it generates 200 points on a rectangular 100x100 plane in the x-y-plane. This method implicitly calls GenerateRandomCube with the third dimension set to zero.

Author:
Matthias Dunda 08 2003

static void BIAS::GenGroundTruth::NormalizeMatches | ( | std::vector< BIAS::HomgPoint2D > & | match1,
 |  | std::vector< BIAS::HomgPoint2D > & | match2,
 |  | BIAS::KMatrix | K
 | ) | [static]

normalizes the matches by multiplying with K^-1

Author:
woelk 05 2003

static int BIAS::GenGroundTruth::ReadCorrespondences | ( | const char * | Filename,
 |  | std::vector< BIAS::HomgPoint2D > & | Points1,
 |  | std::vector< BIAS::HomgPoint2D > & | Points2
 | ) | [static]

static int BIAS::GenGroundTruth::ReadWorldPoints | ( | const char * | Filename,
 |  | std::vector< BIAS::HomgPoint3D > & | Points
 | ) | [static]

Read 3D world coordinates from a file in binary format.

tested

Author:
mdunda

static int BIAS::GenGroundTruth::WriteCorrespondences | ( | const char * | Filename,
 |  | std::vector< BIAS::HomgPoint2D > & | Points1,
 |  | std::vector< BIAS::HomgPoint2D > & | Points2
 | ) | [static]

Store 2D picture correspondences in a file in binary format, so that you can keep the full accuracy of a double.

tested

Author:
mdunda

static int BIAS::GenGroundTruth::WriteWorldPoints | ( | const char * | Filename,
 |  | std::vector< BIAS::HomgPoint3D > & | Points
 | ) | [static]

Store 3D world coordinates in a file in binary format, so that you can keep the full accuracy of a double.

tested

Author:
mdunda

The documentation for this class was generated from the following file:
  • Utils/GenGroundTruth.hh
Generated on Wed Jun 21 19:07:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GenSynthMatches Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GenSynthMatches

BIAS::GenSynthMatches Class Reference
[Utilities]

class for generating synthetic matches More...

#include <Utils/GenSynthMatches.hh>

Inheritance diagram for BIAS::GenSynthMatches:

[legend]
Collaboration diagram for BIAS::GenSynthMatches:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | CreateMatches ()
bool | DebugLevelIsSet (long int lv) const
void | DrawNoisy (Image< unsigned char > &im, int minindex=0, int maxindex=1) const
void | DrawTrue (Image< unsigned char > &im, int minindex=0, int maxindex=1) const
GenSynthMatches (Param &para)
void | Get3DPoints (std::vector< HomgPoint3D > &p) const
p = _StaticPoints;
void | GetC (std::vector< HomgPoint3D > &C) const
void | GetC (int imNo, HomgPoint3D &C) const
void | GetCorrespondences (std::vector< std::vector< HomgPoint2D > > &p) const
same as GetPOints with inverted indices : p[i][k] is point number i in image k
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetGTC (std::vector< HomgPoint3D > &C) const
void | GetGTC (int imNo, HomgPoint3D &C) const
C = _GT_C[imNo];.
void | GetGTNormalizedF (std::vector< std::vector< FMatrixBase > > &F) const
A moving 3D point X_i is generated for image i from 3D Point X using the euclidean transform E_i=[R_i | T_i]: X_i = E_i * X It projects into the image point x_i with the according projection matrix P_i=[r_i'|-r_i'C_i] (where ' denotes transposition): x_i = P_i * X_i.
void | GetGTNormalizedPoints (std::vector< std::vector< HomgPoint2D > > &p) const
void | GetGTNormalizedPoints (int imNo, std::vector< HomgPoint2D > &p) const
p = _GT_NormalizedPoints[imNo];
void | GetGTP (std::vector< PMatrixBase > &P) const
void | GetGTP (int imNo, PMatrixBase &P) const
P = _GT_P[imNo];.
void | GetGTPoints (std::vector< std::vector< HomgPoint2D > > &p) const
void | GetGTPoints (int imNo, std::vector< HomgPoint2D > &p) const
p = _GT_Points[imNo];
void | GetGTR (std::vector< RMatrixBase > &R) const
void | GetGTR (int imNo, RMatrixBase &R) const
R = _GT_R[imNo];.
void | GetInliers (std::vector< bool > &inl) const
inl[i] indicates if Get(GT)Points()[i] is outlier
void | GetK (KMatrix &K) const
void | GetNormalizedCorrespondences (std::vector< std::vector< HomgPoint2D > > &p) const
same as GetNormalizedPoints with inverted indices : p[i][k] is point number i in image k
void | GetNormalizedPoints (std::vector< std::vector< HomgPoint2D > > &p) const
p[i][k] is point number k in image i
void | GetNormalizedPoints (int imNo, std::vector< HomgPoint2D > &p) const
int | GetNumImages () const
void | GetP (std::vector< PMatrixBase > &P) const
void | GetP (int imNo, PMatrixBase &P) const
void | GetPoints (std::vector< std::vector< HomgPoint2D > > &p) const
p[i][k] is point number k in image i
void | GetPoints (int imNo, std::vector< HomgPoint2D > &p) const
void | GetR (std::vector< RMatrixBase > &R) const
void | GetR (int imNo, RMatrixBase &R) const
GenSynthMatches & | operator= (const MatchDataBase &mdb)
bool | operator== (MatchDataBase &l)
void | PrintDebugLevel (std::ostream &os=std::cout) const
virtual int | Read (std::istream &is)
binary read
int | Read (const std::string &fname)
binary read
int | ReadData (std::string file)
read in ascii file format
void | RemoveDebugLevel (long int lv)
void Reset ()
void | SetData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetNormalizedData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m)
virtual int | Write (std::ostream &os) const
binary write
int | Write (const std::string &fname) const
binary write
int | WriteData (std::string file) const
write in ascii file format
virtual | ~GenSynthMatches ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | _AddParameter (Param &para)
fills all protected pointer values
void _AddUniformDistributedOutliers ()
fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints from entries [*_NumStaticPoints] to [*_NumStaticPoints+*_NumOutliers-1]
int | _AreMovingObjectsVisible ()
returns -1 if no corner of moving object boundary is seen in images or the center of moving objects is not seen in images
bool | _CheckParams () const
void _CreateCamMovement ()
fills _k, _Ki, _GT_R, _R, GT_C, _C, _GT_P and _P
void _CreateMoving2DPoints ()
fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints from entries [*_NumStaticPoints+_*NumOutliers] to [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]
int | _CreateMoving3DPoints ()
fills _MovingPoints returns -1 if no corner of moving object boundary is seen in images or the center of moving objects is not seen in images
void _CreateMovingGT2DPoints ()
fills _GT_Points, _GT_NormalizedPoints from entries [*_NumStaticPoints+_*NumOutliers] to [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]
void _CreateMovingTransforms ()
fills _MovinTransforms
void _CreateStatic2DPoints ()
fills *_NumStaticPoints first entries of _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints also resizes the above vectors to [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]
int | _CreateStatic3DPoints ()
fills _StaticPoints returns -1 if no common viewing volume of all cameras is present
void _CreateStaticGT2DPoints ()
fills *_NumStaticPoints first entries of _GT_Points and _GT_NormalizedPoints also resizes the above vectors to [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]
void | _Draw (Image< unsigned char > &im, int minindex, int maxindex, const std::vector< std::vector< HomgPoint2D > > *p) const
helper function used for visualizing the matches
bool | _IsSeen (HomgPoint2D &p, double border=0.0)
void | _SetCamData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C)
void | _Transpose (const std::vector< std::vector< HomgPoint2D > > &src, std::vector< std::vector< HomgPoint2D > > &dst) const

Protected Attributes

std::vector< HomgPoint3D > | _C
double * | _FocalLength
std::vector< BIAS::HomgPoint3D > | _GT_C
std::vector< std::vector<
HomgPoint2D > > 		_GT_NormalizedPoints
std::vector< BIAS::PMatrixBase > | _GT_P
std::vector< std::vector<
HomgPoint2D > > 		_GT_Points
std::vector< BIAS::RMatrixBase > | _GT_R
int * | _ImHeight
int * | _ImWidth
KMatrix _K
KMatrix _Ki
long int | _liDebugLevel
double * | _MaxCamDistance
double * | _MaxDispOutliers
double * | _MinCamDistance
BIAS::Vector< double > * | _MotionVecX
BIAS::Vector< double > * | _MotionVecY
BIAS::Vector< double > * | _MotionVecZ
BIAS::Vector< double > * | _MovingObjMotionVecX
BIAS::Vector< double > * | _MovingObjMotionVecY
BIAS::Vector< double > * | _MovingObjMotionVecZ
BIAS::Vector< double > * | _MovingObjRotVecX
BIAS::Vector< double > * | _MovingObjRotVecY
BIAS::Vector< double > * | _MovingObjRotVecZ
std::vector< BIAS::HomgPoint3D > | _MovingPoints
std::vector< BIAS::EuclideanTransf3D > | _MovingTransform
std::vector< std::vector<
HomgPoint2D > > 		_NormalizedPoints
int * | _NumImages
int * | _NumMovingObjects
int * | _NumMovingPoints
int * | _NumOutliers
int * | _NumPoints
int * | _NumStaticPoints
double * | _OutlDirChange
double * | _OutlLengthChange
double * | _OverallMotionX
double * | _OverallMotionY
double * | _OverallMotionZ
double * | _OverallRotX
double * | _OverallRotY
double * | _OverallRotZ
std::vector< PMatrixBase > | _P
BIAS::Param * _para
std::vector< std::vector<
HomgPoint2D > > 		_Points
double * | _PrinciplePointX
double * | _PrinciplePointY
std::vector< RMatrixBase > | _R
BIAS::Random _rand
BIAS::Vector< double > * | _RotVecX
BIAS::Vector< double > * | _RotVecY
BIAS::Vector< double > * | _RotVecZ
double * | _SigmaCamCenterX
double * | _SigmaCamCenterY
double * | _SigmaCamCenterZ
double * | _SigmaCamRotX
double * | _SigmaCamRotY
double * | _SigmaCamRotZ
double * | _SigmaImagePoints
BIAS::Vector< double > * | _SizeMovingObjX
BIAS::Vector< double > * | _SizeMovingObjY
BIAS::Vector< double > * | _SizeMovingObjZ
std::vector< BIAS::HomgPoint3D > | _StaticPoints
bool * | _UserGivenP

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

BIASUtils_EXPORT std::ostream & | operator<< (std::ostream &os, const MatchDataBase &m)
BIASUtils_EXPORT std::ostream & | operator<< (std::ostream &os, const GenSynthMatches &m)
BIASUtils_EXPORT std::istream & | operator>> (std::istream &is, MatchDataBase &m)
BIASUtils_EXPORT std::istream & | operator>> (std::istream &os, GenSynthMatches &m)

Detailed Description

class for generating synthetic matches

Author:
woelk 2004

Definition at line 64 of file GenSynthMatches.hh.

Constructor & Destructor Documentation

GenSynthMatches::GenSynthMatches ( Param & para )

Definition at line 174 of file GenSynthMatches.cpp.

References _AddParameter(), _FocalLength, _ImHeight, _ImWidth, _MaxCamDistance, _MaxDispOutliers, _MinCamDistance, _MotionVecX, _MotionVecY, _MotionVecZ, _MovingObjMotionVecX, _MovingObjMotionVecY, _MovingObjMotionVecZ, _MovingObjRotVecX, _MovingObjRotVecY, _MovingObjRotVecZ, _NumMovingObjects, _NumMovingPoints, _NumOutliers, _NumStaticPoints, _OutlDirChange, _OutlLengthChange, _OverallMotionX, _OverallMotionY, _OverallMotionZ, _OverallRotX, _OverallRotY, _OverallRotZ, _para, _PrinciplePointX, _PrinciplePointY, _RotVecX, _RotVecY, _RotVecZ, _SigmaCamCenterX, _SigmaCamCenterY, _SigmaCamCenterZ, _SigmaCamRotX, _SigmaCamRotY, _SigmaCamRotZ, _SigmaImagePoints, _SizeMovingObjX, _SizeMovingObjY, _SizeMovingObjZ, _UserGivenP, and Reset().

GenSynthMatches::~GenSynthMatches ( ) [virtual]

Definition at line 195 of file GenSynthMatches.cpp.

Member Function Documentation

void GenSynthMatches::_AddParameter ( Param & para ) [protected, virtual]

fills all protected pointer values

Reimplemented from BIAS::MatchDataBase.

Definition at line 1278 of file GenSynthMatches.cpp.

References BIAS::Param::CheckParam(), and BIAS::Param::GetGroupID().

Referenced by GenSynthMatches().

void GenSynthMatches::_AddUniformDistributedOutliers ( ) [protected]

fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints from entries [*_NumStaticPoints] to [*_NumStaticPoints+*_NumOutliers-1]

Definition at line 1128 of file GenSynthMatches.cpp.

References _GT_NormalizedPoints, _GT_Points, _IsSeen(), BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_Points, _rand, BIASCDOUT, BIAS::Debug::DebugLevelIsSet(), BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), GSM_2D_MATCHES, GSM_NOISE, R, BIAS::HomgPoint2D::Set(), and BIAS::RMatrixBase::SetXYZ().

Referenced by CreateMatches().

int GenSynthMatches::_AreMovingObjectsVisible ( ) [protected]

returns -1 if no corner of moving object boundary is seen in images or the center of moving objects is not seen in images

Definition at line 932 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::_C, _GT_C, _GT_P, _GT_R, _IsSeen(), _MovingTransform, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_R, BIASERR, and BIAS::HomgPoint3D::Set().

Referenced by _CreateMoving3DPoints().

bool GenSynthMatches::_CheckParams ( ) const [protected]

Definition at line 1603 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_NumPoints, BIASABORT, and BIASERR.

Referenced by CreateMatches().

void GenSynthMatches::_CreateCamMovement ( ) [protected]

fills _k, _Ki, _GT_R, _R, GT_C, _C, _GT_P and _P

Definition at line 735 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::_C, _GT_C, _GT_P, _GT_R, BIAS::MatchDataBase::_K, BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_R, _rand, BIASASSERT, BIASCDOUT, BIASERR, BIAS::Debug::DebugLevelIsSet(), BIAS::Random::GetNormalDistributed(), GSM_CAM_MOTION, BIAS::KMatrix::Invert(), r, R, BIAS::HomgPoint3D::Set(), and BIAS::RMatrixBase::SetXYZ().

Referenced by CreateMatches().

void GenSynthMatches::_CreateMoving2DPoints ( ) [protected]

fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints from entries [*_NumStaticPoints+_*NumOutliers] to [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]

Definition at line 1196 of file GenSynthMatches.cpp.

References _GT_Points, BIAS::MatchDataBase::_NumImages, BIASABORT, and BIASERR.

Referenced by CreateMatches().

int GenSynthMatches::_CreateMoving3DPoints ( ) [protected]

fills _MovingPoints returns -1 if no corner of moving object boundary is seen in images or the center of moving objects is not seen in images

Definition at line 1022 of file GenSynthMatches.cpp.

References _AreMovingObjectsVisible(), _GT_P, _IsSeen(), _MovingPoints, _MovingTransform, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_P, _rand, BIASCDOUT, BIAS::Random::GetUniformDistributed(), and GSM_3D_POINTS.

Referenced by CreateMatches().

void GenSynthMatches::_CreateMovingGT2DPoints ( ) [protected]

fills _GT_Points, _GT_NormalizedPoints from entries [*_NumStaticPoints+_*NumOutliers] to [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]

Definition at line 1240 of file GenSynthMatches.cpp.

References _GT_Points, BIAS::MatchDataBase::_NumImages, BIASABORT, and BIASERR.

void GenSynthMatches::_CreateMovingTransforms ( ) [protected]

fills _MovinTransforms

Definition at line 798 of file GenSynthMatches.cpp.

References _MovingTransform, BIAS::MatchDataBase::_NumImages, BIASCDOUT, GSM_MOVIN_TRANSF, and r.

Referenced by CreateMatches().

void GenSynthMatches::_CreateStatic2DPoints ( ) [protected]

fills *_NumStaticPoints first entries of _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints also resizes the above vectors to [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]

Definition at line 1065 of file GenSynthMatches.cpp.

References _CreateStaticGT2DPoints(), _GT_NormalizedPoints, _GT_Points, _IsSeen(), BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_Points, _rand, _StaticPoints, BIASCDOUT, BIASERR, BIAS::Debug::DebugLevelIsSet(), BIAS::Random::GetNormalDistributed(), GSM_2D_MATCHES, GSM_NOISE, and BIAS::HomgPoint2D::Set().

Referenced by CreateMatches().

int GenSynthMatches::_CreateStatic3DPoints ( ) [protected]

fills _StaticPoints returns -1 if no common viewing volume of all cameras is present

Definition at line 825 of file GenSynthMatches.cpp.

References _GT_C, _GT_P, _IsSeen(), BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_P, _rand, _StaticPoints, BIAS::PMatrix::BackprojectWorldCoo(), BIASCDOUT, BIASERR, BIAS::Random::GetUniformDistributed(), GSM_3D_POINTS, GSM_VIEWINGVOL, p, and BIAS::HomgPoint3D::Set().

Referenced by CreateMatches().

void GenSynthMatches::_CreateStaticGT2DPoints ( ) [protected]

fills *_NumStaticPoints first entries of _GT_Points and _GT_NormalizedPoints also resizes the above vectors to [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]

Definition at line 1107 of file GenSynthMatches.cpp.

References _GT_NormalizedPoints, _GT_P, _GT_Points, _IsSeen(), BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NumImages, _StaticPoints, and BIASERR.

Referenced by _CreateStatic2DPoints().

void GenSynthMatches::_Draw | ( | Image< unsigned char > & | im,
 |  | int | minindex,
 |  | int | maxindex,
 |  | const std::vector< std::vector< HomgPoint2D > > * | p
 | ) | const [protected]

helper function used for visualizing the matches

Definition at line 239 of file GenSynthMatches.cpp.

References _ImHeight, _ImWidth, BIAS::MatchDataBase::_NumImages, _NumMovingObjects, _NumMovingPoints, _NumOutliers, _NumStaticPoints, BIASABORT, BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), p, and BIAS::Image< StorageType >::Release().

Referenced by DrawNoisy(), and DrawTrue().

bool BIAS::GenSynthMatches::_IsSeen | ( | HomgPoint2D & | p,
 |  | double | border = 0.0
 | ) | [inline, protected]

Definition at line 249 of file GenSynthMatches.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by _AddUniformDistributedOutliers(), _AreMovingObjectsVisible(), _CreateMoving3DPoints(), _CreateStatic2DPoints(), _CreateStatic3DPoints(), and _CreateStaticGT2DPoints().

void MatchDataBase::_SetCamData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C
 | ) | [protected, inherited]

Definition at line 139 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_C, BIAS::MatchDataBase::_K, BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_R, BIASASSERT, and BIAS::KMatrix::Invert().

Referenced by BIAS::MatchDataBase::SetData(), and BIAS::MatchDataBase::SetNormalizedData().

void BIAS::MatchDataBase::_Transpose | ( | const std::vector< std::vector< HomgPoint2D > > & | src,
 |  | std::vector< std::vector< HomgPoint2D > > & | dst
 | ) | const [inline, protected, inherited]

Definition at line 131 of file MatchDataBase.hh.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int GenSynthMatches::CreateMatches ( )

Definition at line 198 of file GenSynthMatches.cpp.

References _AddUniformDistributedOutliers(), _CheckParams(), _CreateCamMovement(), _CreateMoving2DPoints(), _CreateMoving3DPoints(), _CreateMovingTransforms(), _CreateStatic2DPoints(), _CreateStatic3DPoints(), BIASERR, and Reset().

Referenced by main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateCamMovement(), _CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), GetGTNormalizedF(), and main().

void GenSynthMatches::DrawNoisy | ( | Image< unsigned char > & | im,
 |  | int | minindex = 0,
 |  | int | maxindex = 1
 | ) | const

Definition at line 232 of file GenSynthMatches.cpp.

References _Draw(), and BIAS::MatchDataBase::_Points.

Referenced by main().

void GenSynthMatches::DrawTrue | ( | Image< unsigned char > & | im,
 |  | int | minindex = 0,
 |  | int | maxindex = 1
 | ) | const

Definition at line 226 of file GenSynthMatches.cpp.

References _Draw(), and _GT_Points.

Referenced by main().

void GenSynthMatches::Get3DPoints ( std::vector< HomgPoint3D > & p ) const

p = _StaticPoints;

Definition at line 411 of file GenSynthMatches.cpp.

References _StaticPoints.

void MatchDataBase::GetC ( std::vector< HomgPoint3D > & C ) const [inherited]

Definition at line 71 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_C.

void MatchDataBase::GetC | ( | int | imNo,
 |  | HomgPoint3D & | C
 | ) | const [inherited]

Definition at line 69 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_C.

Referenced by main().

void BIAS::MatchDataBase::GetCorrespondences ( std::vector< std::vector< HomgPoint2D > > & p ) const [inherited]

same as GetPOints with inverted indices : p[i][k] is point number i in image k

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void GenSynthMatches::GetGTC ( std::vector< HomgPoint3D > & C ) const

Definition at line 393 of file GenSynthMatches.cpp.

References _GT_C.

void GenSynthMatches::GetGTC | ( | int | imNo,
 |  | HomgPoint3D & | C
 | ) | const

C = _GT_C[imNo];.

Definition at line 391 of file GenSynthMatches.cpp.

References _GT_C.

void GenSynthMatches::GetGTNormalizedF ( std::vector< std::vector< FMatrixBase > > & F ) const

A moving 3D point X_i is generated for image i from 3D Point X using the euclidean transform E_i=[R_i | T_i]: X_i = E_i * X It projects into the image point x_i with the according projection matrix P_i=[r_i'|-r_i'C_i] (where ' denotes transposition): x_i = P_i * X_i.

Finding a projection matrix P_x where each 3D point from image i-1 projects onto the same 2D points goes as follows: x_i = P_x X_{i-1}

First take the 3D point and move it to ist new poition in image i. This is done by first applying the inverse E_{i-1} and then E_i: X_i = E_i * E_{i-1}^{-1} * X_{i-1} Now use the old projection matrix P_i. x_i = P_i * E_i * E_{i-1}^{-1} * X_{i-1}

The new projection matrix P_x is composed as follows: P_x = P_i * E_i * E_{i-1}^{-1} = [r_i'|-r_i'C_i] * [R_i | T_i] * [R_{i-1} | T_{i-1}]^{-1} = [r_i'|-r_i'C_i] * [R_i | T_i] * [R_{i-1}' | -R_{i-1}'T_{i-1}] = [r_i'|-r_i'C_i] * [R_i R_{i-1}' | T_i - R_i R_{i-1}'T_{i-1}] = [r_i' R_i R_{i-1}' | -r_i'C_i + r_i'(T_i - R_i R_{i-1}'T_{i-1})] = [r_i' R_i R_{i-1}' | -r_i'C_i + r_i'T_i - r_i'R_i R_{i-1}'T_{i-1}] = [r_i'R_iR_{i-1}' | -r_i'R_iR_{i-1}'R_{i-1}R_i'C_i + r_i'R_iR_{i-1}'R_{i-1}R_i'T_i - r_i'R_i R_{i-1}'T_{i-1}] = [r_i'R_iR_{i-1}' | -r_i'R_iR_{i-1}'(T_{i-1}+R_{i-1}R_i'(C_i-T_i))] setting R_x' = r_i'R_iR_{i-1}' is aequivalent to R_x = R_{i-1} R_i' r_i setting C_x = T_{i-1} + R_{i-1} R_i' (C_i - T_i) and leads to = [ R_x' | -R_x' C_x ]

Author:
woelk 08/2004

Definition at line 455 of file GenSynthMatches.cpp.

References _GT_C, _GT_NormalizedPoints, _GT_R, _MovingObjMotionVecX, _MovingObjMotionVecY, _MovingObjMotionVecZ, _MovingObjRotVecX, _MovingObjRotVecY, _MovingObjRotVecZ, BIAS::MatchDataBase::_NumImages, _NumMovingObjects, _NumMovingPoints, _NumOutliers, _NumStaticPoints, BIASCDOUT, BIAS::Debug::DebugLevelIsSet(), GSM_FMATRIX, BIAS::Matrix3x3< T >::Mult(), R, BIAS::Vector3< T >::Set(), BIAS::RMatrixBase::SetXYZ(), and BIAS::Matrix3x3< T >::Transpose().

void GenSynthMatches::GetGTNormalizedPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const

Definition at line 408 of file GenSynthMatches.cpp.

References _GT_NormalizedPoints, and p.

void GenSynthMatches::GetGTNormalizedPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const

p = _GT_NormalizedPoints[imNo];

Definition at line 406 of file GenSynthMatches.cpp.

References _GT_NormalizedPoints.

void GenSynthMatches::GetGTP ( std::vector< PMatrixBase > & P ) const

Definition at line 398 of file GenSynthMatches.cpp.

References _GT_P.

void GenSynthMatches::GetGTP | ( | int | imNo,
 |  | PMatrixBase & | P
 | ) | const

P = _GT_P[imNo];.

Definition at line 396 of file GenSynthMatches.cpp.

References _GT_P.

void GenSynthMatches::GetGTPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const

Definition at line 403 of file GenSynthMatches.cpp.

References _GT_Points, and p.

void GenSynthMatches::GetGTPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const

p = _GT_Points[imNo];

Definition at line 401 of file GenSynthMatches.cpp.

References _GT_Points.

void GenSynthMatches::GetGTR ( std::vector< RMatrixBase > & R ) const

Definition at line 388 of file GenSynthMatches.cpp.

References _GT_R.

void GenSynthMatches::GetGTR | ( | int | imNo,
 |  | RMatrixBase & | R
 | ) | const

R = _GT_R[imNo];.

Definition at line 386 of file GenSynthMatches.cpp.

References _GT_R.

void GenSynthMatches::GetInliers ( std::vector< bool > & inl ) const

inl[i] indicates if Get(GT)Points()[i] is outlier

Definition at line 416 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::_NumPoints, and _NumStaticPoints.

void MatchDataBase::GetK ( KMatrix & K ) const [inherited]

Definition at line 60 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_K.

Referenced by main().

void BIAS::MatchDataBase::GetNormalizedCorrespondences ( std::vector< std::vector< HomgPoint2D > > & p ) const [inherited]

same as GetNormalizedPoints with inverted indices : p[i][k] is point number i in image k

void BIAS::MatchDataBase::GetNormalizedPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const [inherited]

p[i][k] is point number k in image i

void MatchDataBase::GetNormalizedPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const [inherited]

Definition at line 86 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_NormalizedPoints.

Referenced by main().

int BIAS::MatchDataBase::GetNumImages ( ) const [inline, inherited]

Definition at line 89 of file MatchDataBase.hh.

Referenced by main().

void MatchDataBase::GetP ( std::vector< PMatrixBase > & P ) const [inherited]

Definition at line 76 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_P.

void MatchDataBase::GetP | ( | int | imNo,
 |  | PMatrixBase & | P
 | ) | const [inherited]

Definition at line 74 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_P.

void MatchDataBase::GetPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const [inherited]

p[i][k] is point number k in image i

Definition at line 81 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_Points, and p.

void MatchDataBase::GetPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const [inherited]

Definition at line 79 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_Points.

Referenced by main().

void MatchDataBase::GetR ( std::vector< RMatrixBase > & R ) const [inherited]

Definition at line 65 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_R.

void MatchDataBase::GetR | ( | int | imNo,
 |  | RMatrixBase & | R
 | ) | const [inherited]

Definition at line 63 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_R.

Referenced by main().

GenSynthMatches & GenSynthMatches::operator= ( const MatchDataBase & mdb )

Definition at line 1648 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::_C, _GT_C, _GT_P, _GT_R, _MovingTransform, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_Points, BIAS::MatchDataBase::_R, and _StaticPoints.

bool MatchDataBase::operator== ( MatchDataBase & l ) [inherited]

Definition at line 242 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_C, BIAS::MatchDataBase::_K, BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_NumPoints, BIAS::MatchDataBase::_P, BIAS::MatchDataBase::_Points, and BIAS::MatchDataBase::_R.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

virtual int BIAS::GenSynthMatches::Read ( std::istream & is ) [virtual]

binary read

Reimplemented from BIAS::MatchDataBase.

int BIAS::GenSynthMatches::Read ( const std::string & fname )

binary read

Reimplemented from BIAS::MatchDataBase.

Referenced by main().

int BIAS::GenSynthMatches::ReadData ( std::string file )

read in ascii file format

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void GenSynthMatches::Reset ( )

Reimplemented from BIAS::MatchDataBase.

Definition at line 356 of file GenSynthMatches.cpp.

References _GT_C, _GT_NormalizedPoints, _GT_P, _GT_Points, _GT_R, _MovingPoints, _MovingTransform, _rand, _StaticPoints, BIAS::Random::Reset(), and BIAS::MatchDataBase::Reset().

Referenced by CreateMatches(), and GenSynthMatches().

void MatchDataBase::SetData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C,
 |  | std::vector< std::vector< HomgPoint2D > > & | m
 | ) | [inherited]

Definition at line 93 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_Ki, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_NumPoints, BIAS::MatchDataBase::_Points, BIAS::MatchDataBase::_SetCamData(), BIASASSERT, and p.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void MatchDataBase::SetNormalizedData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C,
 |  | std::vector< std::vector< HomgPoint2D > > & | m
 | ) | [inherited]

Definition at line 116 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_K, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_NumPoints, BIAS::MatchDataBase::_Points, BIAS::MatchDataBase::_SetCamData(), BIASASSERT, and p.

Referenced by main().

virtual int BIAS::GenSynthMatches::Write ( std::ostream & os ) const [virtual]

binary write

Reimplemented from BIAS::MatchDataBase.

int GenSynthMatches::Write ( const std::string & fname ) const

binary write

Reimplemented from BIAS::MatchDataBase.

Definition at line 533 of file GenSynthMatches.cpp.

References BIAS::MatchDataBase::Write().

Referenced by main().

int BIAS::GenSynthMatches::WriteData ( std::string file ) const

write in ascii file format

Friends And Related Function Documentation

BIASUtils_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const MatchDataBase & | m
 | ) | [friend, inherited]

BIASUtils_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const GenSynthMatches & | m
 | ) | [friend]

BIASUtils_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | MatchDataBase & | m
 | ) | [friend, inherited]

BIASUtils_EXPORT std::istream& operator>> | ( | std::istream & | os,
 |  | GenSynthMatches & | m
 | ) | [friend]

Member Data Documentation

std::vector<HomgPoint3D> BIAS::MatchDataBase::_C [protected, inherited]

Definition at line 116 of file MatchDataBase.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), BIAS::MatchDataBase::_SetCamData(), BIAS::MatchDataBase::GetC(), operator=(), BIAS::MatchDataBase::operator==(), and BIAS::MatchDataBase::Reset().

double* BIAS::GenSynthMatches::_FocalLength [protected]

Definition at line 156 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::vector<BIAS::HomgPoint3D> BIAS::GenSynthMatches::_GT_C [protected]

Definition at line 142 of file GenSynthMatches.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), _CreateStatic3DPoints(), GetGTC(), GetGTNormalizedF(), operator=(), and Reset().

std::vector<std::vector<HomgPoint2D> > BIAS::GenSynthMatches::_GT_NormalizedPoints [protected]

Definition at line 197 of file GenSynthMatches.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateStatic2DPoints(), _CreateStaticGT2DPoints(), GetGTNormalizedF(), GetGTNormalizedPoints(), and Reset().

std::vector<BIAS::PMatrixBase> BIAS::GenSynthMatches::_GT_P [protected]

Definition at line 145 of file GenSynthMatches.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), _CreateMoving3DPoints(), _CreateStatic3DPoints(), _CreateStaticGT2DPoints(), GetGTP(), operator=(), and Reset().

std::vector<std::vector<HomgPoint2D> > BIAS::GenSynthMatches::_GT_Points [protected]

Definition at line 196 of file GenSynthMatches.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateMoving2DPoints(), _CreateMovingGT2DPoints(), _CreateStatic2DPoints(), _CreateStaticGT2DPoints(), DrawTrue(), GetGTPoints(), BIAS::operator<<(), and Reset().

std::vector<BIAS::RMatrixBase> BIAS::GenSynthMatches::_GT_R [protected]

Definition at line 139 of file GenSynthMatches.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), GetGTNormalizedF(), GetGTR(), operator=(), and Reset().

int * BIAS::GenSynthMatches::_ImHeight [protected]

Definition at line 155 of file GenSynthMatches.hh.

Referenced by _Draw(), and GenSynthMatches().

int* BIAS::GenSynthMatches::_ImWidth [protected]

Definition at line 155 of file GenSynthMatches.hh.

Referenced by _Draw(), and GenSynthMatches().

KMatrix BIAS::MatchDataBase::_K [protected, inherited]

Definition at line 112 of file MatchDataBase.hh.

Referenced by _CreateCamMovement(), BIAS::MatchDataBase::_SetCamData(), BIAS::MatchDataBase::GetK(), BIAS::operator<<(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::Reset(), and BIAS::MatchDataBase::SetNormalizedData().

KMatrix BIAS::MatchDataBase::_Ki [protected, inherited]

Definition at line 112 of file MatchDataBase.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateCamMovement(), _CreateStatic2DPoints(), _CreateStaticGT2DPoints(), BIAS::MatchDataBase::_SetCamData(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::Reset(), and BIAS::MatchDataBase::SetData().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

double * BIAS::GenSynthMatches::_MaxCamDistance [protected]

Definition at line 165 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_MaxDispOutliers [protected]

Definition at line 159 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_MinCamDistance [protected]

Definition at line 165 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double>* BIAS::GenSynthMatches::_MotionVecX [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MotionVecY [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MotionVecZ [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double>* BIAS::GenSynthMatches::_MovingObjMotionVecX [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MovingObjMotionVecY [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MovingObjMotionVecZ [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MovingObjRotVecX [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MovingObjRotVecY [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

BIAS::Vector<double> * BIAS::GenSynthMatches::_MovingObjRotVecZ [protected]

Definition at line 186 of file GenSynthMatches.hh.

Referenced by GenSynthMatches(), and GetGTNormalizedF().

std::vector<BIAS::HomgPoint3D> BIAS::GenSynthMatches::_MovingPoints [protected]

Definition at line 152 of file GenSynthMatches.hh.

Referenced by _CreateMoving3DPoints(), BIAS::operator<<(), and Reset().

std::vector<BIAS::EuclideanTransf3D> BIAS::GenSynthMatches::_MovingTransform [protected]

Definition at line 147 of file GenSynthMatches.hh.

Referenced by _AreMovingObjectsVisible(), _CreateMoving3DPoints(), _CreateMovingTransforms(), operator=(), and Reset().

std::vector<std::vector<HomgPoint2D> > BIAS::MatchDataBase::_NormalizedPoints [protected, inherited]

Definition at line 123 of file MatchDataBase.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateStatic2DPoints(), BIAS::MatchDataBase::GetNormalizedPoints(), BIAS::operator<<(), operator=(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::Reset(), BIAS::MatchDataBase::SetData(), and BIAS::MatchDataBase::SetNormalizedData().

int* BIAS::MatchDataBase::_NumImages [protected, inherited]

Definition at line 109 of file MatchDataBase.hh.

Referenced by _AddUniformDistributedOutliers(), _AreMovingObjectsVisible(), _CheckParams(), _CreateCamMovement(), _CreateMoving2DPoints(), _CreateMoving3DPoints(), _CreateMovingGT2DPoints(), _CreateMovingTransforms(), _CreateStatic2DPoints(), _CreateStatic3DPoints(), _CreateStaticGT2DPoints(), _Draw(), GetGTNormalizedF(), BIAS::MatchDataBase::MatchDataBase(), BIAS::operator<<(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::SetData(), and BIAS::MatchDataBase::SetNormalizedData().

int * BIAS::GenSynthMatches::_NumMovingObjects [protected]

Definition at line 174 of file GenSynthMatches.hh.

Referenced by _Draw(), GenSynthMatches(), GetGTNormalizedF(), and BIAS::operator<<().

int* BIAS::GenSynthMatches::_NumMovingPoints [protected]

Definition at line 174 of file GenSynthMatches.hh.

Referenced by _Draw(), GenSynthMatches(), GetGTNormalizedF(), and BIAS::operator<<().

int * BIAS::GenSynthMatches::_NumOutliers [protected]

Definition at line 154 of file GenSynthMatches.hh.

Referenced by _Draw(), GenSynthMatches(), GetGTNormalizedF(), and BIAS::operator<<().

int * BIAS::MatchDataBase::_NumPoints [protected, inherited]

Definition at line 109 of file MatchDataBase.hh.

Referenced by _CheckParams(), GetInliers(), BIAS::MatchDataBase::MatchDataBase(), BIAS::operator<<(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::SetData(), and BIAS::MatchDataBase::SetNormalizedData().

int* BIAS::GenSynthMatches::_NumStaticPoints [protected]

Definition at line 154 of file GenSynthMatches.hh.

Referenced by _Draw(), GenSynthMatches(), GetGTNormalizedF(), GetInliers(), and BIAS::operator<<().

double * BIAS::GenSynthMatches::_OutlDirChange [protected]

Definition at line 159 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_OutlLengthChange [protected]

Definition at line 160 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_OverallMotionX [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_OverallMotionY [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_OverallMotionZ [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_OverallRotX [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_OverallRotY [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_OverallRotZ [protected]

Definition at line 171 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::vector<PMatrixBase> BIAS::MatchDataBase::_P [protected, inherited]

Definition at line 118 of file MatchDataBase.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), _CreateMoving3DPoints(), _CreateStatic2DPoints(), _CreateStatic3DPoints(), BIAS::MatchDataBase::_SetCamData(), BIAS::MatchDataBase::GetP(), BIAS::operator<<(), operator=(), BIAS::MatchDataBase::operator==(), and BIAS::MatchDataBase::Reset().

BIAS::Param* BIAS::GenSynthMatches::_para [protected]

Definition at line 133 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::vector<std::vector<HomgPoint2D> > BIAS::MatchDataBase::_Points [protected, inherited]

Definition at line 122 of file MatchDataBase.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateStatic2DPoints(), DrawNoisy(), BIAS::MatchDataBase::GetPoints(), BIAS::operator<<(), operator=(), BIAS::MatchDataBase::operator==(), BIAS::MatchDataBase::Reset(), BIAS::MatchDataBase::SetData(), and BIAS::MatchDataBase::SetNormalizedData().

double * BIAS::GenSynthMatches::_PrinciplePointX [protected]

Definition at line 156 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_PrinciplePointY [protected]

Definition at line 156 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::vector<RMatrixBase> BIAS::MatchDataBase::_R [protected, inherited]

Definition at line 114 of file MatchDataBase.hh.

Referenced by _AreMovingObjectsVisible(), _CreateCamMovement(), BIAS::MatchDataBase::_SetCamData(), BIAS::MatchDataBase::GetR(), operator=(), BIAS::MatchDataBase::operator==(), and BIAS::MatchDataBase::Reset().

BIAS::Random BIAS::GenSynthMatches::_rand [protected]

Definition at line 132 of file GenSynthMatches.hh.

Referenced by _AddUniformDistributedOutliers(), _CreateCamMovement(), _CreateMoving3DPoints(), _CreateStatic2DPoints(), _CreateStatic3DPoints(), and Reset().

BIAS::Vector<double> * BIAS::GenSynthMatches::_RotVecX [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_RotVecY [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_RotVecZ [protected]

Definition at line 169 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_SigmaCamCenterX [protected]

Definition at line 161 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_SigmaCamCenterY [protected]

Definition at line 161 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_SigmaCamCenterZ [protected]

Definition at line 161 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_SigmaCamRotX [protected]

Definition at line 162 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_SigmaCamRotY [protected]

Definition at line 162 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double * BIAS::GenSynthMatches::_SigmaCamRotZ [protected]

Definition at line 162 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

double* BIAS::GenSynthMatches::_SigmaImagePoints [protected]

Definition at line 159 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double>* BIAS::GenSynthMatches::_SizeMovingObjX [protected]

Definition at line 176 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_SizeMovingObjY [protected]

Definition at line 176 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

BIAS::Vector<double> * BIAS::GenSynthMatches::_SizeMovingObjZ [protected]

Definition at line 176 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::vector<BIAS::HomgPoint3D> BIAS::GenSynthMatches::_StaticPoints [protected]

Definition at line 149 of file GenSynthMatches.hh.

Referenced by _CreateStatic2DPoints(), _CreateStatic3DPoints(), _CreateStaticGT2DPoints(), Get3DPoints(), BIAS::operator<<(), operator=(), and Reset().

bool* BIAS::GenSynthMatches::_UserGivenP [protected]

Definition at line 167 of file GenSynthMatches.hh.

Referenced by GenSynthMatches().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Utils/GenSynthMatches.hh
  • Utils/GenSynthMatches.cpp
Generated on Wed Jun 21 19:07:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GeometryGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GeometryGL

BIAS::GeometryGL Class Reference

Reusable Geometry an drawing functions for OpenGL. More...

#include <Gui/GeometryGL.hh>

List of all members.

Public Member Functions

GeometryGL ()
ctor
virtual | ~GeometryGL ()
destructor

Static Public Member Functions

static void | CreateSampleDisplayListScene (int &dplistID)
creates a sample scene as one dispaly list returned in dplistID once the arg is kept as it is if initialization was done before.
static BIAS::Matrix4x4< double > | CreateTextureMatrix (BIAS::PMatrix &P, const unsigned int w, const unsigned int h, const bool &useRECTcoord=false)
compose an OpenGL 4x4 (projective) texture matrix
static void | DisplayCallsSampleDisplayListScene (const double &curTime)
static void | DisplayCameraExternalParams (const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &up, const BIAS::Vector3< double > &a)
static void | DisplayCameraExternalParams (BIAS::PMatrix &P)
static void | DisplayCameraInternalParams (const int &x0, const int &y0, const unsigned int &width, const unsigned int &height, const float &fovY, const float &zNear, const float &zFar)
static void | DisplayClear ()
deps to glut:
static void | DisplayCoordCross (const float &size, const float &linewidth, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z"))
draw coord cross with labels in r,g,b JW
static void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
draw a coord cross as three lines in r,g,b
static void | DisplayCoordCrossAxesLabel (const float &size, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z"))
draw only teh axes labels for a coord cross as text in r,g,b JW
static void | DisplayImgPlaneTextured (BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const int &texID, const int &texTarget, const double &scale, const bool &flipY, const BIAS::Vector4< float > &vertexColor=BIAS::Vector4< float >(1.0, 0.0, 1.0, 0.0))
draws a pkane with attched texture coordinates
static void | DisplayP (BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const double &scale, const float &linewidth=1.0f)
static void | DisplayQuadTexCoord2D (const BIAS::ImgObjGL &texobj, const bool &additionalFlipY)
static void | DisplayQuadTexCoord2DFull (const BIAS::ImgObjGL &texobj, const bool &additionalFlipY)
static void | DisplayRenderMode (const BIAS::RenderModeGL &m)
static void | DisplaySceneExampleSimple ()
static void | DisplaySimpleAnimation (const double &time)
time dependant scene for samples
static BIAS::Vector2< double > | GetImgCorner2d (const unsigned int &w, const unsigned int &h, const unsigned int &corner, const int texMode, const bool flipY)
static BIAS::Vector3< double > | GetImgCorner3d (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const unsigned int &corner, const double &scale)
compute 3D pos.
static void | GetInfoGL (std::ostream &os)
print GL state information and displaylist and texture information to os

Detailed Description

Reusable Geometry an drawing functions for OpenGL.

Author:
Jan Woetzel

Definition at line 53 of file GeometryGL.hh.

Constructor & Destructor Documentation

GeometryGL::~GeometryGL ( ) [virtual]

destructor

Author:
Jan Woetzel 04/2005

Definition at line 31 of file GeometryGL.cpp.

GeometryGL::GeometryGL ( )

ctor

Definition at line 33 of file GeometryGL.cpp.

Member Function Documentation

void GeometryGL::CreateSampleDisplayListScene ( int & dplistID ) [static]

creates a sample scene as one dispaly list returned in dplistID once the arg is kept as it is if initialization was done before.

Definition at line 981 of file GeometryGL.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by DisplayCallsSampleDisplayListScene().

BIAS::Matrix4x4< double > GeometryGL::CreateTextureMatrix | ( | BIAS::PMatrix & | P,
 |  | const unsigned int | w,
 |  | const unsigned int | h,
 |  | const bool & | useRECTcoord = false
 | ) | [static]

compose an OpenGL 4x4 (projective) texture matrix

Parameters:
useRECTcoord true to use RECT 0..npixels instead of 0..1 normalized pw2 texture coordinate JW

Definition at line 813 of file GeometryGL.cpp.

References BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::Matrix4x4< T >::SetIdentity().

void GeometryGL::DisplayCallsSampleDisplayListScene ( const double & curTime ) [static]

Definition at line 1093 of file GeometryGL.cpp.

References CHECK_GL_ERROR, CreateSampleDisplayListScene(), and DisplayCoordCross().

void GeometryGL::DisplayCameraExternalParams | ( | const BIAS::Vector3< double > & | C,
 |  | const BIAS::Vector3< double > & | up,
 |  | const BIAS::Vector3< double > & | a
 | ) | [static]

Definition at line 589 of file GeometryGL.cpp.

void GeometryGL::DisplayCameraExternalParams ( BIAS::PMatrix & P ) [static]

Definition at line 580 of file GeometryGL.cpp.

References BIAS::PMatrix::GetA(), BIAS::PMatrix::GetC(), and BIAS::PMatrix::GetV().

void GeometryGL::DisplayCameraInternalParams | ( | const int & | x0,
 |  | const int & | y0,
 |  | const unsigned int & | width,
 |  | const unsigned int & | height,
 |  | const float & | fovY,
 |  | const float & | zNear,
 |  | const float & | zFar
 | ) | [static]

Definition at line 543 of file GeometryGL.cpp.

References BIASASSERT.

void GeometryGL::DisplayClear ( ) [static]

deps to glut:

Definition at line 335 of file GeometryGL.cpp.

References CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::DisplayClear().

void GeometryGL::DisplayCoordCross | ( | const float & | size,
 |  | const float & | linewidth,
 |  | const BIAS::DrawTextGL & | font,
 |  | const std::string & | LabelX = std::string("x"),
 |  | const std::string & | LabelY = std::string("y"),
 |  | const std::string & | LabelZ = std::string("z")
 | ) | [static]

draw coord cross with labels in r,g,b JW

Definition at line 466 of file GeometryGL.cpp.

References DisplayCoordCross(), and DisplayCoordCrossAxesLabel().

void GeometryGL::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) | [static]

draw a coord cross as three lines in r,g,b

Parameters:
withAxes Label true to draw x/y/Z text as axes label JW

Definition at line 508 of file GeometryGL.cpp.

References VISIBLEALPHA.

Referenced by DisplayCallsSampleDisplayListScene(), BIAS::OpenGLCanvasBase::DisplayCoordCross(), DisplayCoordCross(), and DisplaySceneExampleSimple().

void GeometryGL::DisplayCoordCrossAxesLabel | ( | const float & | size,
 |  | const BIAS::DrawTextGL & | font,
 |  | const std::string & | LabelX = std::string("x"),
 |  | const std::string & | LabelY = std::string("y"),
 |  | const std::string & | LabelZ = std::string("z")
 | ) | [static]

draw only teh axes labels for a coord cross as text in r,g,b JW

Definition at line 478 of file GeometryGL.cpp.

References BIASERR, and BIAS::DrawTextGL::IsInitialized().

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and DisplayCoordCross().

void GeometryGL::DisplayImgPlaneTextured | ( | BIAS::PMatrix & | P,
 |  | const unsigned int & | w,
 |  | const unsigned int & | h,
 |  | const int & | texID,
 |  | const int & | texTarget,
 |  | const double & | scale,
 |  | const bool & | flipY,
 |  | const BIAS::Vector4< float > & | vertexColor = BIAS::Vector4< float >(1.0, 0.0, 1.0, 0.0)
 | ) | [static]

draws a pkane with attched texture coordinates

Definition at line 709 of file GeometryGL.cpp.

References BIASASSERT, CHECK_GL_ERROR, GetImgCorner2d(), GetImgCorner3d(), BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::UPPER_LEFT, and BIAS::UPPER_RIGHT.

void GeometryGL::DisplayP | ( | BIAS::PMatrix & | P,
 |  | const unsigned int & | w,
 |  | const unsigned int & | h,
 |  | const double & | scale,
 |  | const float & | linewidth = 1.0f
 | ) | [static]

Definition at line 747 of file GeometryGL.cpp.

References BIAS::PMatrix::GetC(), GetImgCorner3d(), BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::OPTICAL_CENTER, BIAS::UPPER_LEFT, BIAS::UPPER_RIGHT, and VISIBLEALPHA.

void GeometryGL::DisplayQuadTexCoord2D | ( | const BIAS::ImgObjGL & | texobj,
 |  | const bool & | additionalFlipY
 | ) | [static]

Definition at line 881 of file GeometryGL.cpp.

References BIASASSERT, CHECK_GL_ERROR, BIAS::ImgObjGL::heightOrig, BIAS::ImgObjGL::id, BIAS::ImgObjGL::IsRectangleTexture(), and BIAS::ImgObjGL::widthOrig.

Referenced by DisplayQuadTexCoord2DFull().

void GeometryGL::DisplayQuadTexCoord2DFull | ( | const BIAS::ImgObjGL & | texobj,
 |  | const bool & | additionalFlipY
 | ) | [static]

Definition at line 861 of file GeometryGL.cpp.

References DisplayQuadTexCoord2D().

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls().

void GeometryGL::DisplayRenderMode ( const BIAS::RenderModeGL & m ) [static]

Definition at line 388 of file GeometryGL.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::cullface, BIAS::RenderModeGL::enable_cullface, BIAS::RenderModeGL::linewidth, BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, and BIAS::RenderModeGL::shademodel.

Referenced by BIAS::OpenGLCanvasBase::DisplayRenderMode().

void GeometryGL::DisplaySceneExampleSimple ( ) [static]

Definition at line 427 of file GeometryGL.cpp.

References CHECK_GL_ERROR, and DisplayCoordCross().

Referenced by BIAS::OpenGLCanvasBase::DisplaySampleScene(), and DisplaySimpleAnimation().

void GeometryGL::DisplaySimpleAnimation ( const double & time ) [static]

time dependant scene for samples

Definition at line 412 of file GeometryGL.cpp.

References DisplaySceneExampleSimple().

BIAS::Vector2< double > GeometryGL::GetImgCorner2d | ( | const unsigned int & | w,
 |  | const unsigned int & | h,
 |  | const unsigned int & | corner,
 |  | const int | texMode,
 |  | const bool | flipY
 | ) | [static]

Definition at line 612 of file GeometryGL.cpp.

References BIASASSERT, BIASERR, BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::ImageBase::PowerOfTwoSize(), and BIAS::UPPER_RIGHT.

Referenced by DisplayImgPlaneTextured().

BIAS::Vector3< double > GeometryGL::GetImgCorner3d | ( | BIAS::PMatrix & | P,
 |  | const unsigned int & | w,
 |  | const unsigned int & | h,
 |  | const unsigned int & | corner,
 |  | const double & | scale
 | ) | [static]

compute 3D pos.

of P in OpenGL coordinate system TODO: move this to PMatrix with addition imgDim parameter JW

Definition at line 667 of file GeometryGL.cpp.

References BIASERR, BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetRayWorldCoo(), BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::Vector3< T >::Normalize(), BIAS::OPTICAL_CENTER, BIAS::HomgPoint2D::Set(), BIAS::UPPER_LEFT, and BIAS::UPPER_RIGHT.

Referenced by DisplayImgPlaneTextured(), and DisplayP().

void GeometryGL::GetInfoGL ( std::ostream & os ) [static]

print GL state information and displaylist and texture information to os

Definition at line 36 of file GeometryGL.cpp.

References BIASERR, CHECK_GL_ERROR, GL2Cbool, MAX_GL_DISPLIST_ID, and MAX_GL_TEXOBJ_ID.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL().

The documentation for this class was generated from the following files:
  • Gui/GeometryGL.hh
  • Gui/GeometryGL.cpp
Generated on Wed Jun 21 19:07:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GradientGauss< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GradientGauss

BIAS::GradientGauss< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

gradient calculation with separated gauss masks More...

#include <Filter/GradientGauss.hh>

Inheritance diagram for BIAS::GradientGauss< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::GradientGauss< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | EVecLengthType { VLT_L1, VLT_L2, VLT_max }
algorithm used to calculate the absolute length of the 2D vector
  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))
More...
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg)
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &grad)
returns a 2 channel image containig gx and gy
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetGradGaussRatio () const
double | GetGradGaussSigma () const
GradientGauss (Param &para, const int grp, const std::string &postfix)
GradientGauss (Param &para, const std::string &postfix="")
GradientGauss ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetGradGaussRatio (const double ratio)
void | SetGradGaussSigma (const double sigma)
int | VecLen (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
decides which vector length to use from *_VecLenthType
int | VecLenL1 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = | fabs(gx) + fabs(gy) | destination absg must be initialized
int | VecLenL2 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = sqrt(gx*gx+gy*gy) destination absg must be initialized
int | VecLenMax (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = max(fabs(gx),fabs(gy)) destination absg must be initialized
virtual | ~GradientGauss ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _CalculateKernels (double Sigma, double Ratio)
Fills _HVec with gaussian function and _VVec with derivative of gaussian function with standard deviation Sigma.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

Convolution< InputStorageType,
OutputStorageType > 		_Conv
computation object to execute the convolution
int * | _FilterBorderHandling
double * | _GradGaussRatio
double * | _GradGaussSigma
the parameters
double | _LastRatio
double | _LastSigma
the parameters at the time of the last call
long int | _liDebugLevel
bool | _ParamsAllocated
int * | _VecLengthType
of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::GradientGauss< InputStorageType, OutputStorageType >

gradient calculation with separated gauss masks

Author:
woelk 09/2004

Definition at line 47 of file GradientGauss.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterNTo2N::EVecLengthType [inherited]

algorithm used to calculate the absolute length of the 2D vector

  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))

Enumerator:
VLT_L1
VLT_L2
VLT_max

Definition at line 52 of file FilterNTo2N.hh.

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class OutputStorageType>
GradientGauss::GradientGauss ( )

Definition at line 38 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma, and BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma.

template<class InputStorageType, class OutputStorageType>
GradientGauss::GradientGauss | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 49 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
GradientGauss::GradientGauss | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 60 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma.

template<class InputStorageType, class OutputStorageType>
GradientGauss::~GradientGauss ( ) [virtual]

Definition at line 68 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio, and BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void GradientGauss::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 248 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma, BIAS::Param::CheckParam(), and BIAS::Param::GetParamDouble().

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss().

template<class InputStorageType, class OutputStorageType>
void GradientGauss::_CalculateKernels | ( | double | Sigma,
 |  | double | Ratio
 | ) | [protected]

Fills _HVec with gaussian function and _VVec with derivative of gaussian function with standard deviation Sigma.

The size of _HVec and _VVec is calculated by using Ration. The Gaussian function is truncated, when the ration between biggest and smalles entry falls below Ratio.

Author:
woelk 09/2004

Reimplemented in BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, and BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >.

Definition at line 172 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, BIAS::FilterMask::ComputeIntPrecisionBits(), CONV_INT, BIAS::FilterMask::CreateIntFilter(), D_GRADGAUSS_KERNEL, and FM_FLOAT.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int GradientGauss::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | absg
 | ) | [virtual]

Reimplemented in BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, and BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >.

Definition at line 125 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ROI::SetCorners().

template<class InputStorageType, class OutputStorageType>
int GradientGauss::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, and BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >.

Definition at line 89 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class InputStorageType, class OutputStorageType>
int GradientGauss::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | grad
 | ) | [virtual]

returns a 2 channel image containig gx and gy

Author:
woelk 12/2004, untested

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, and BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >.

Definition at line 77 of file GradientGauss.cpp.

References BIAS::Image< StorageType >::AppendChannel(), BIASCDOUT, D_FILTERBASE_CALLSTACK, gy, and res.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 115 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 89 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 106 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 81 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void GradientGauss::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 272 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetGradGaussRatio ( ) const [inline]

Definition at line 82 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetGradGaussSigma ( ) const [inline]

Definition at line 77 of file GradientGauss.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::PrintKernel ( ) const [inline]

Definition at line 84 of file GradientGauss.hh.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::SetGradGaussRatio ( const double ratio ) [inline]

Definition at line 79 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::SetGradGaussSigma ( const double sigma ) [inline]

Definition at line 74 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLen | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

decides which vector length to use from *_VecLenthType

Author:
woelk 12/2004

Definition at line 129 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIASERR, res, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL1 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = | fabs(gx) + fabs(gy) | destination absg must be initialized

Author:
woelk 09/2004

Definition at line 155 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL2 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = sqrt(gx*gx+gy*gy) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 187 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenMax | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = max(fabs(gx),fabs(gy)) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 220 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Convolution<InputStorageType, OutputStorageType> BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv [protected]

computation object to execute the convolution

Definition at line 93 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetBordersValid_().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
double * BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio [protected]

Definition at line 89 of file GradientGauss.hh.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::~GradientGauss().

template<class InputStorageType, class OutputStorageType>
double* BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma [protected]

the parameters

Definition at line 89 of file GradientGauss.hh.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::~GradientGauss().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio [protected]

Definition at line 91 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma [protected]

the parameters at the time of the last call

Definition at line 91 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType [protected, inherited]

of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Definition at line 112 of file FilterNTo2N.hh.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/GradientGauss.hh
  • Filter/GradientGauss.cpp
Generated on Wed Jun 21 19:07:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GradientGaussAsymmetric

BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

gradient calculation with separated gauss masks More...

#include <Filter/GradientGaussAsymmetric.hh>

Inheritance diagram for BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | EVecLengthType { VLT_L1, VLT_L2, VLT_max }
algorithm used to calculate the absolute length of the 2D vector
  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))
More...
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg)
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &grad)
returns a 2 channel image containing gx and gy
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetGradGaussRatio () const
double | GetGradGaussSigma () const
GradientGaussAsymmetric (Param &para, const int grp, const std::string &postfix)
GradientGaussAsymmetric (Param &para, const std::string &postfix="")
GradientGaussAsymmetric ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetGradGaussRatio (const double ratio)
void | SetGradGaussSigma (const double sigma)
int | VecLen (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
decides which vector length to use from *_VecLenthType
int | VecLenL1 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = | fabs(gx) + fabs(gy) | destination absg must be initialized
int | VecLenL2 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = sqrt(gx*gx+gy*gy) destination absg must be initialized
int | VecLenMax (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = max(fabs(gx),fabs(gy)) destination absg must be initialized
virtual | ~GradientGaussAsymmetric ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _CalculateKernels (double Sigma, double Ratio)
Fills _HVec with gaussian function and _VVec with derivative of gaussian function with standard deviation Sigma.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

Convolution< InputStorageType,
OutputStorageType > 		_Conv
computation object to execute the convolution
int * | _FilterBorderHandling
double * | _GradGaussRatio
double * | _GradGaussSigma
the parameters
double | _LastRatio
double | _LastSigma
the parameters at the time of the last call
long int | _liDebugLevel
bool | _ParamsAllocated
int * | _VecLengthType
of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >

gradient calculation with separated gauss masks

Author:
woelk 09/2004

Definition at line 44 of file GradientGaussAsymmetric.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterNTo2N::EVecLengthType [inherited]

algorithm used to calculate the absolute length of the 2D vector

  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))

Enumerator:
VLT_L1
VLT_L2
VLT_max

Definition at line 52 of file FilterNTo2N.hh.

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
GradientGaussAsymmetric::GradientGaussAsymmetric ( )

Definition at line 37 of file GradientGaussAsymmetric.cpp.

template<class InputStorageType, class OutputStorageType>
GradientGaussAsymmetric::GradientGaussAsymmetric | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 43 of file GradientGaussAsymmetric.cpp.

template<class InputStorageType, class OutputStorageType>
GradientGaussAsymmetric::GradientGaussAsymmetric | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 49 of file GradientGaussAsymmetric.cpp.

template<class InputStorageType, class OutputStorageType>
GradientGaussAsymmetric::~GradientGaussAsymmetric ( ) [virtual]

Definition at line 55 of file GradientGaussAsymmetric.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void GradientGauss::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 248 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma, BIAS::Param::CheckParam(), and BIAS::Param::GetParamDouble().

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss().

template<class InputStorageType, class OutputStorageType>
void GradientGaussAsymmetric::_CalculateKernels | ( | double | Sigma,
 |  | double | Ratio
 | ) | [protected]

Fills _HVec with gaussian function and _VVec with derivative of gaussian function with standard deviation Sigma.

The size of _HVec and _VVec is calculated by using Ration. The Gaussian function is truncated, when the ration between biggest and smalles entry falls below Ratio.

Author:
woelk 09/2004

Reimplemented from BIAS::GradientGauss< InputStorageType, OutputStorageType >.

Definition at line 158 of file GradientGaussAsymmetric.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio, BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma, BIASCDOUT, BIAS::FilterMask::ComputeIntPrecisionBits(), CONV_INT, BIAS::FilterMask::CreateIntFilter(), D_GRADGAUSS_KERNEL, and FM_FLOAT.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int GradientGaussAsymmetric::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | absg
 | ) | [virtual]

Reimplemented from BIAS::GradientGauss< InputStorageType, OutputStorageType >.

Definition at line 109 of file GradientGaussAsymmetric.cpp.

References BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ROI::SetCorners().

template<class InputStorageType, class OutputStorageType>
int GradientGaussAsymmetric::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented from BIAS::GradientGauss< InputStorageType, OutputStorageType >.

Definition at line 62 of file GradientGaussAsymmetric.cpp.

References BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class InputStorageType, class OutputStorageType>
int GradientGaussAsymmetric::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | grad
 | ) | [virtual]

returns a 2 channel image containing gx and gy

Author:
woelk 12/2004, untested

Reimplemented from BIAS::GradientGauss< InputStorageType, OutputStorageType >.

Definition at line 96 of file GradientGaussAsymmetric.cpp.

References BIAS::Image< StorageType >::AppendChannel(), BIASCDOUT, D_FILTERBASE_CALLSTACK, and gy.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 115 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 89 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 106 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 81 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void GradientGauss::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual, inherited]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 272 of file GradientGauss.cpp.

References BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetGradGaussRatio ( ) const [inline, inherited]

Definition at line 82 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetGradGaussSigma ( ) const [inline, inherited]

Definition at line 77 of file GradientGauss.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::PrintKernel ( ) const [inline, inherited]

Definition at line 84 of file GradientGauss.hh.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::SetGradGaussRatio ( const double ratio ) [inline, inherited]

Definition at line 79 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientGauss< InputStorageType, OutputStorageType >::SetGradGaussSigma ( const double sigma ) [inline, inherited]

Definition at line 74 of file GradientGauss.hh.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLen | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

decides which vector length to use from *_VecLenthType

Author:
woelk 12/2004

Definition at line 129 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIASERR, res, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL1 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = | fabs(gx) + fabs(gy) | destination absg must be initialized

Author:
woelk 09/2004

Definition at line 155 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL2 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = sqrt(gx*gx+gy*gy) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 187 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenMax | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = max(fabs(gx),fabs(gy)) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 220 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Convolution<InputStorageType, OutputStorageType> BIAS::GradientGauss< InputStorageType, OutputStorageType >::_Conv [protected, inherited]

computation object to execute the convolution

Definition at line 93 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::GetBordersValid_().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
double * BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussRatio [protected, inherited]

Definition at line 89 of file GradientGauss.hh.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::~GradientGauss().

template<class InputStorageType, class OutputStorageType>
double* BIAS::GradientGauss< InputStorageType, OutputStorageType >::_GradGaussSigma [protected, inherited]

the parameters

Definition at line 89 of file GradientGauss.hh.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::~GradientGauss().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastRatio [protected, inherited]

Definition at line 91 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
double BIAS::GradientGauss< InputStorageType, OutputStorageType >::_LastSigma [protected, inherited]

the parameters at the time of the last call

Definition at line 91 of file GradientGauss.hh.

Referenced by BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType [protected, inherited]

of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Definition at line 112 of file FilterNTo2N.hh.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/GradientGaussAsymmetric.hh
  • Filter/GradientGaussAsymmetric.cpp
Generated on Wed Jun 21 19:07:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GradientSimple< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GradientSimple

BIAS::GradientSimple< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1) More...

#include <Filter/GradientSimple.hh>

Inheritance diagram for BIAS::GradientSimple< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::GradientSimple< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | EVecLengthType { VLT_L1, VLT_L2, VLT_max }
algorithm used to calculate the absolute length of the 2D vector
  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))
More...
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg)
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &grad)
returns a 2 channel image containing gx and gy
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
GradientSimple (Param &para, const int grp, const std::string &postfix, bool BuildPCM=false)
GradientSimple (Param &para, const std::string &postfix="", bool BuildPCM=false)
GradientSimple (bool BuildPCM=false)
template<>
void | PolarTransform (Image< char > &gx, Image< char > &gy, Image< float > &magnitude, Image< float > &phase)
void | PolarTransform (Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< float > &magnitude, Image< float > &phase)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | UseDirectNeighbors (bool UseDirectNeighbors)
if true, we use a filter of [1 -1] otherwise [1 0 -1]
int | VecLen (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
decides which vector length to use from *_VecLenthType
int | VecLenL1 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = | fabs(gx) + fabs(gy) | destination absg must be initialized
int | VecLenL2 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = sqrt(gx*gx+gy*gy) destination absg must be initialized
int | VecLenMax (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = max(fabs(gx),fabs(gy)) destination absg must be initialized
virtual | ~GradientSimple ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void BuildPolarCoordinateMap_ ()
set up pRadius and pAngle for polar coordinate transformation
int | DirectNeighborsGreyValidFloat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
loop unrolled fast float version [1 -1]
int | DirectNeighborsGreyValidInt_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
loop unrolled fast int version [1 -1]
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
void InitKernel_ ()
sets the sobel kernel for the convolution object
int | SimpleGreyValidFloat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
loop unrolled fast float version for [1 0 -1]
int | SimpleGreyValidInt_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
loop unrolled fast int version [1 0 -1]

Protected Attributes

Convolution< InputStorageType,
OutputStorageType > 		_Conv
computation object to execute the convolution
int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
int * | _VecLengthType
of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType
float ** | pAngle_
float ** | pRadius_
polar coordinate transformation for char values
bool | useDirectNeighbors_
if true, we use a filter of [-1 1] otherwise [-1 0 1]

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::GradientSimple< InputStorageType, OutputStorageType >

simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1)

weights (not filter mask, ->reflection!) are

  • -1
  • WE: -1 0 1 NS: 0
  • 1

The main interface Filter dispatches: If there is a fast version, it is called, otherwise Filter calls the generic convolution.

Author:
koeser 04/2005

Definition at line 52 of file GradientSimple.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterNTo2N::EVecLengthType [inherited]

algorithm used to calculate the absolute length of the 2D vector

  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))

Enumerator:
VLT_L1
VLT_L2
VLT_max

Definition at line 52 of file FilterNTo2N.hh.

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
BIAS::GradientSimple< InputStorageType, OutputStorageType >::GradientSimple ( bool BuildPCM = false )

Definition at line 64 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
BIAS::GradientSimple< InputStorageType, OutputStorageType >::GradientSimple | ( | Param & | para,
 |  | const std::string & | postfix = "",
 |  | bool | BuildPCM = false
 | ) |

Definition at line 74 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
BIAS::GradientSimple< InputStorageType, OutputStorageType >::GradientSimple | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix,
 |  | bool | BuildPCM = false
 | ) |

Definition at line 85 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
BIAS::GradientSimple< InputStorageType, OutputStorageType >::~GradientSimple ( ) [virtual]

Definition at line 97 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::pAngle_, POLAR_TABLE_OFFSET, POLAR_TABLE_SIZE, and BIAS::GradientSimple< InputStorageType, OutputStorageType >::pRadius_.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void FilterNTo2N::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGauss< InputStorageType, OutputStorageType >, and BIAS::GradientGauss< CalculationType, CalculationType >.

Definition at line 251 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIAS::Param::CheckParam(), BIAS::Param::GetParamEnum(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_ ( ) [protected]

set up pRadius and pAngle for polar coordinate transformation

Definition at line 430 of file GradientSimple.cpp.

References BIASASSERT, BIAS::GradientSimple< InputStorageType, OutputStorageType >::pAngle_, POLAR_TABLE_OFFSET, POLAR_TABLE_SIZE, and BIAS::GradientSimple< InputStorageType, OutputStorageType >::pRadius_.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::GradientSimple(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

loop unrolled fast float version [1 -1]

Definition at line 304 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIASASSERT, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

loop unrolled fast int version [1 -1]

Definition at line 361 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIASASSERT, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | absg
 | ) | [virtual]

Definition at line 165 of file GradientSimple.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 129 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::useDirectNeighbors_.

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | grad
 | ) | [virtual]

returns a 2 channel image containing gx and gy

Author:
woelk 12/2004, untested

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 118 of file GradientSimple.cpp.

References BIAS::Image< StorageType >::AppendChannel(), BIASCDOUT, D_FILTERBASE_CALLSTACK, gy, and res.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 115 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 89 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 106 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 81 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientSimple< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 505 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_ ( ) [protected]

sets the sobel kernel for the convolution object

Definition at line 41 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIAS::FilterMask::CreateFloatFilter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::useDirectNeighbors_.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::GradientSimple().

template<>
void BIAS::GradientSimple< unsigned char, char >::PolarTransform | ( | Image< char > & | gx,
 |  | Image< char > & | gy,
 |  | Image< float > & | magnitude,
 |  | Image< float > & | phase
 | ) |

Definition at line 458 of file GradientSimple.cpp.

References BIASASSERT, BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::pAngle_, BIAS::GradientSimple< InputStorageType, OutputStorageType >::pRadius_, BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform | ( | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy,
 |  | Image< float > & | magnitude,
 |  | Image< float > & | phase
 | ) |

Definition at line 481 of file GradientSimple.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

loop unrolled fast float version for [1 0 -1]

Definition at line 188 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIASASSERT, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

loop unrolled fast int version [1 0 -1]

Definition at line 244 of file GradientSimple.cpp.

References BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv, BIASASSERT, BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

template<class InputStorageType, class OutputStorageType>
void BIAS::GradientSimple< InputStorageType, OutputStorageType >::UseDirectNeighbors ( bool UseDirectNeighbors ) [inline]

if true, we use a filter of [1 -1] otherwise [1 0 -1]

If true we get a better spatial resolution of gradients, however, the result is shifted by 0.5;0.5 pixels. Take care of noise in your input data.

Author:
koeser
Date:
03/2006

Definition at line 92 of file GradientSimple.hh.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLen | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

decides which vector length to use from *_VecLenthType

Author:
woelk 12/2004

Definition at line 129 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIASERR, res, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL1 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = | fabs(gx) + fabs(gy) | destination absg must be initialized

Author:
woelk 09/2004

Definition at line 155 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL2 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = sqrt(gx*gx+gy*gy) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 187 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenMax | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = max(fabs(gx),fabs(gy)) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 220 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Convolution<InputStorageType, OutputStorageType> BIAS::GradientSimple< InputStorageType, OutputStorageType >::_Conv [protected]

computation object to execute the convolution

Definition at line 109 of file GradientSimple.hh.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType [protected, inherited]

of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Definition at line 112 of file FilterNTo2N.hh.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
float ** BIAS::GradientSimple< InputStorageType, OutputStorageType >::pAngle_ [protected]

Definition at line 134 of file GradientSimple.hh.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::~GradientSimple().

template<class InputStorageType, class OutputStorageType>
float** BIAS::GradientSimple< InputStorageType, OutputStorageType >::pRadius_ [protected]

polar coordinate transformation for char values

Definition at line 134 of file GradientSimple.hh.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::BuildPolarCoordinateMap_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::~GradientSimple().

template<class InputStorageType, class OutputStorageType>
bool BIAS::GradientSimple< InputStorageType, OutputStorageType >::useDirectNeighbors_ [protected]

if true, we use a filter of [-1 1] otherwise [-1 0 1]

Definition at line 137 of file GradientSimple.hh.

Referenced by BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::InitKernel_().

The documentation for this class was generated from the following files:
  • Filter/GradientSimple.hh
  • Filter/GradientSimple.cpp
Generated on Wed Jun 21 19:07:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GradientSobel3x3

BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

gradient calculation with sobel 3 by 3 masks More...

#include <Filter/GradientSobel3x3.hh>

Inheritance diagram for BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | EVecLengthType { VLT_L1, VLT_L2, VLT_max }
algorithm used to calculate the absolute length of the 2D vector
  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))
More...
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg)
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &grad)
returns a 2 channel image containing gx and gy
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
GradientSobel3x3 (Param &para, const int grp, const std::string &postfix)
GradientSobel3x3 (Param &para, const std::string &postfix="")
GradientSobel3x3 ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | VecLen (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
decides which vector length to use from *_VecLenthType
int | VecLenL1 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = | fabs(gx) + fabs(gy) | destination absg must be initialized
int | VecLenL2 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = sqrt(gx*gx+gy*gy) destination absg must be initialized
int | VecLenMax (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length)
length = max(fabs(gx),fabs(gy)) destination absg must be initialized
virtual | ~GradientSobel3x3 ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
deletes _work1 and _work2 and sets _InternalMemSize
void _DeleteInternalMem ()
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
void InitKernel_ ()
sets the sobel kernel for the convolution object
int | Sobel3x3GreySameFloat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
Repeats the border pixel infinitly in direction perpendicular to the border to achieve destination image ROIs of same size as source image ROIs.
int | Sobel3x3GreyValidFloat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
uses CONV_FLOAT for calculation
int | Sobel3x3GreyValidInt_ (const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS)
uses CONV_INT for calculation

Protected Attributes

Convolution< InputStorageType,
OutputStorageType > 		_Conv
computation object to execute the convolution
int * | _FilterBorderHandling
CONV_FLOAT ** | _fwork
CONV_FLOAT ** | _fwork2
int | _InternalMemHeight
int | _InternalMemWidth
CONV_INT ** | _iwork
CONV_INT ** | _iwork2
long int | _liDebugLevel
bool | _ParamsAllocated
int * | _VecLengthType
of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >

gradient calculation with sobel 3 by 3 masks

calculates the gradient using the sobel operators
-1 0 1 -1 -2 -1 WE: -2 0 2 NS: 0 0 0 -1 0 1 1 2 1

They can be separated into:

WE: vh = (-1, 0, 1) and vv = (1, 2, 1)^T

NS: vh = (1, 2, 1) and vv = (-1, 0, 1)^T

Author:
woelk 09/2004

Definition at line 54 of file GradientSobel3x3.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterNTo2N::EVecLengthType [inherited]

algorithm used to calculate the absolute length of the 2D vector

  • VLT_L1: | fabs(gx) + fabs(gy) |
  • VLT_L2: sqrt(gx*gx+gy*gy)
  • VLT_max: max(fabs(gx), fabs(gy))

Enumerator:
VLT_L1
VLT_L2
VLT_max

Definition at line 52 of file FilterNTo2N.hh.

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
GradientSobel3x3::GradientSobel3x3 ( )

Definition at line 57 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2, and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
GradientSobel3x3::GradientSobel3x3 | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 68 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2, and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
GradientSobel3x3::GradientSobel3x3 | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 79 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2, and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::InitKernel_().

template<class InputStorageType, class OutputStorageType>
GradientSobel3x3::~GradientSobel3x3 ( ) [virtual]

Definition at line 90 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem().

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void FilterNTo2N::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Reimplemented in BIAS::GradientGauss< InputStorageType, OutputStorageType >, and BIAS::GradientGauss< CalculationType, CalculationType >.

Definition at line 251 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIAS::Param::CheckParam(), BIAS::Param::GetParamEnum(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N().

template<class InputStorageType, class OutputStorageType>
void GradientSobel3x3::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected]

deletes _work1 and _work2 and sets _InternalMemSize

Definition at line 584 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2, BIASABORT, BIASERR, and CONV_FLOAT.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

template<class InputStorageType, class OutputStorageType>
void GradientSobel3x3::_DeleteInternalMem ( ) [protected]

Definition at line 561 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork, and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::~GradientSobel3x3().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | absg
 | ) | [virtual]

Definition at line 166 of file GradientSobel3x3.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gx,
 |  | Image< OutputStorageType > & | gy
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 109 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth, BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | grad
 | ) | [virtual]

returns a 2 channel image containing gx and gy

Author:
woelk 12/2004, untested

Reimplemented from BIAS::FilterNTo2N< InputStorageType, OutputStorageType >.

Definition at line 98 of file GradientSobel3x3.cpp.

References BIAS::Image< StorageType >::AppendChannel(), BIASCDOUT, D_FILTERBASE_CALLSTACK, gy, and res.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and main().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 115 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 89 of file FilterNTo2N.cpp.

References BIASERR.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst1,
 |  | Image< OutputStorageType > & | dst2
 | ) | [virtual, inherited]

Definition at line 106 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual, inherited]

Definition at line 81 of file FilterNTo2N.cpp.

References BIASERR.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void GradientSobel3x3::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 621 of file GradientSobel3x3.cpp.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void GradientSobel3x3::InitKernel_ ( ) [protected]

sets the sobel kernel for the convolution object

Definition at line 37 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv, and BIAS::FilterMask::CreateFloatFilter().

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Sobel3x3GreySameFloat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

Repeats the border pixel infinitly in direction perpendicular to the border to achieve destination image ROIs of same size as source image ROIs.

Untested !!

Author:
woelk 07/2005

Definition at line 301 of file GradientSobel3x3.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::ROI::SetCorners(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_().

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Sobel3x3GreyValidFloat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

uses CONV_FLOAT for calculation

Definition at line 188 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2, BIASASSERT, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, p, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_().

template<class InputStorageType, class OutputStorageType>
int GradientSobel3x3::Sobel3x3GreyValidInt_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gWE,
 |  | Image< OutputStorageType > & | gNS
 | ) | [protected]

uses CONV_INT for calculation

Definition at line 447 of file GradientSobel3x3.cpp.

References BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2, BIASASSERT, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), gx, gy, p, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLen | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

decides which vector length to use from *_VecLenthType

Author:
woelk 12/2004

Definition at line 129 of file FilterNTo2N.cpp.

References BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType, BIASERR, res, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L1, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_L2, and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VLT_max.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL1 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = | fabs(gx) + fabs(gy) | destination absg must be initialized

Author:
woelk 09/2004

Definition at line 155 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenL2 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = sqrt(gx*gx+gy*gy) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 187 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

template<class InputStorageType, class OutputStorageType>
int FilterNTo2N::VecLenMax | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | length
 | ) | [inherited]

length = max(fabs(gx),fabs(gy)) destination absg must be initialized

Author:
woelk 09/2004

Definition at line 220 of file FilterNTo2N.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Convolution<InputStorageType, OutputStorageType> BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_Conv [protected]

computation object to execute the convolution

Definition at line 85 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::InitKernel_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
CONV_FLOAT** BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork [protected]

Definition at line 105 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_().

template<class InputStorageType, class OutputStorageType>
CONV_FLOAT ** BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_fwork2 [protected]

Definition at line 105 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemHeight [protected]

Definition at line 109 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3().

template<class InputStorageType, class OutputStorageType>
int BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_InternalMemWidth [protected]

Definition at line 108 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3().

template<class InputStorageType, class OutputStorageType>
CONV_INT** BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork [protected]

Definition at line 106 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

template<class InputStorageType, class OutputStorageType>
CONV_INT ** BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_iwork2 [protected]

Definition at line 106 of file GradientSobel3x3.hh.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::_DeleteInternalMem(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::GradientSobel3x3(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_VecLengthType [protected, inherited]

of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType

Definition at line 112 of file FilterNTo2N.hh.

Referenced by BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLen(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/GradientSobel3x3.hh
  • Filter/GradientSobel3x3.cpp
Generated on Wed Jun 21 19:07:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GuiBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GuiBase

BIAS::GuiBase Class Reference

Gui is a simple windowing environment. More...

#include <Gui/GuiBase.hh>

Inheritance diagram for BIAS::GuiBase:

[legend]
Collaboration diagram for BIAS::GuiBase:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual bool | CheckForEvent (char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible
virtual bool | CheckForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured
virtual char | CheckForKeyEvent ()
checks if any key is pressed and returns it returns -1 i fo no key is pressed
virtual bool | CheckForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description
bool | Closed ()
returns true if window is closed by user via x button
bool | DebugLevelIsSet (long int lv) const
virtual int | DestroyWindow ()
stops the gtk_main loop and closes the window
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual void | GetFactorOffset (int &xoffset, int &yoffset, int &factor)
gets offset and factor for mouse position mouse position in (e.g.
int | GetMouseX ()
int | GetMouseY ()
std::string | GetTitle ()
GuiBase (const GuiBase &gui)
GuiBase (std::string const &Title, bool ShowMousePos=true)
as standard constructor, also sets Title_
GuiBase (bool ShowMousePos=true)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual void | SetFactorOffset (int xoffset, int yoffset, int factor)
sets offset and factor for mouse position mouse position in (e.g.
virtual void | SetTitle (std::string const &Title)
virtual int | ShowImage (PyramidImage< float > &pim)
virtual int | ShowImage (PyramidImage< unsigned char > &pim)
virtual int | ShowImage (ImageBase &image, float min=0.0, float max=255.0)
shows/updates the image shown in window.
virtual void | WaitForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent
virtual char | WaitForKeyEvent ()
waits until a key is pressed and returns it tested
virtual void | WaitForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits until any mouse button is pressed or released
virtual | ~GuiBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

template<class PixelType>
int | ConvertToUC_ (Image< PixelType > &image, float min, float max)
virtual void | Init_ (bool ShowMousePos)
Set up thread and stuff.
virtual int | ShowConvertedImage_ (Image< unsigned char > &image)
Does the real update of the image shown in window. Must be overloaded.
bool | TestImage_ (Image< unsigned char > &image)
test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Protected Attributes

long int | _liDebugLevel
int | Factor_
unsigned int | Height_
int | IsPyramid_
char | KeyBuffer_
int | MouseButtonPressed_
int | MouseButtonPressX_
int | MouseButtonPressY_
int | MouseButtonReleased_
int | MouseButtonReleaseX_
int | MouseButtonReleaseY_
int | MousePosX_
int | MousePosY_
unsigned int | nChannels_
ImageBase OrigPicture_
This is the original representation of the picture.
unsigned int | Pyramid0Height_
unsigned int | Pyramid0Width_
unsigned int | PyramidLevels_
bool | ShowMouse_
std::string | Title_
unsigned int | Width_
if the following 3 variables are set , Buffer_ is already allocated
bool | WindowCreated_
int | XOffset_
int | YOffset_

Static Protected Attributes

static std::ostream | _zDebugStream
static bool | BaseInitialized_ = false
static long int | GlobalDebugLevel = 0
static pthread_mutex_t | MouseButtonMutex_

Detailed Description

Gui is a simple windowing environment.

..

This is a base class and should not be used directly.

Definition at line 77 of file GuiBase.hh.

Constructor & Destructor Documentation

GuiBase::GuiBase ( bool ShowMousePos = true )

Definition at line 78 of file GuiBase.cpp.

BIAS::GuiBase::GuiBase | ( | std::string const & | Title,
 |  | bool | ShowMousePos = true
 | ) |

as standard constructor, also sets Title_

GuiBase::GuiBase ( const GuiBase & gui )

Definition at line 89 of file GuiBase.cpp.

References Init_(), ShowMouse_, and Title_.

GuiBase::~GuiBase ( ) [virtual]

Definition at line 96 of file GuiBase.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool GuiBase::CheckForEvent | ( | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual]

as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible

Definition at line 336 of file GuiBase.cpp.

References CheckForKeyEvent(), and CheckForMouseButtonEvent().

bool GuiBase::CheckForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual]

as above but does return immediate with true if event occured

Definition at line 301 of file GuiBase.cpp.

References CheckForKeyEvent(), and CheckForMouseButtonEvent().

char GuiBase::CheckForKeyEvent ( ) [virtual]

checks if any key is pressed and returns it returns -1 i fo no key is pressed

Author:
Felix Woelk

Definition at line 345 of file GuiBase.cpp.

References KeyBuffer_.

Referenced by CheckForEvent(), mainloop(), and WaitForEvent().

bool GuiBase::CheckForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual]

return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description

Definition at line 374 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, MouseButtonMutex_, MouseButtonPressed_, MouseButtonPressX_, MouseButtonPressY_, MouseButtonReleased_, MouseButtonReleaseX_, and MouseButtonReleaseY_.

Referenced by CheckForEvent(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), BIAS::GuiEnhanced::SelectRectangle(), and WaitForEvent().

bool BIAS::GuiBase::Closed ( ) [inline]

returns true if window is closed by user via x button

Author:
woelk 05/2003

Definition at line 166 of file GuiBase.hh.

template<class PixelType>
int GuiBase::ConvertToUC_ | ( | Image< PixelType > & | image,
 |  | float | min,
 |  | float | max
 | ) | [protected]

Definition at line 242 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::Image< StorageType >::ScaleShiftBetween(), ShowConvertedImage_(), and BIAS::ImageBase::ST_unsignedchar.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int GuiBase::DestroyWindow ( ) [virtual]

stops the gtk_main loop and closes the window

Reimplemented in BIAS::GuiGTK, and BIAS::GuiWX.

Definition at line 288 of file GuiBase.cpp.

References BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

void GuiBase::GetFactorOffset | ( | int & | xoffset,
 |  | int & | yoffset,
 |  | int & | factor
 | ) | [virtual]

gets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 130 of file GuiBase.cpp.

References Factor_, XOffset_, and YOffset_.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::GuiBase::GetMouseX ( ) [inline]

Definition at line 117 of file GuiBase.hh.

int BIAS::GuiBase::GetMouseY ( ) [inline]

Definition at line 118 of file GuiBase.hh.

std::string BIAS::GuiBase::GetTitle ( ) [inline]

Definition at line 91 of file GuiBase.hh.

void GuiBase::Init_ ( bool ShowMousePos ) [protected, virtual]

Set up thread and stuff.

Must be overloaded Derived class::Init_() should call GuiBase::Init_() first.

Reimplemented in BIAS::GuiGTK, and BIAS::GuiWX.

Definition at line 101 of file GuiBase.cpp.

References BaseInitialized_, Factor_, Height_, IsPyramid_, KeyBuffer_, MouseButtonMutex_, MouseButtonPressed_, MouseButtonPressX_, MouseButtonPressY_, MouseButtonReleased_, MouseButtonReleaseX_, MouseButtonReleaseY_, nChannels_, Pyramid0Height_, Pyramid0Width_, PyramidLevels_, ShowMouse_, Title_, Width_, WindowCreated_, XOffset_, and YOffset_.

Referenced by GuiBase(), BIAS::GuiWX::Init_(), and BIAS::GuiGTK::Init_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void GuiBase::SetFactorOffset | ( | int | xoffset,
 |  | int | yoffset,
 |  | int | factor
 | ) | [virtual]

sets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 123 of file GuiBase.cpp.

References Factor_, XOffset_, and YOffset_.

Referenced by BIAS::GuiEnhanced::SelectLineZoom(), and BIAS::GuiEnhanced::SelectPoint().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::GuiBase::SetTitle ( std::string const & Title ) [virtual]

Reimplemented in BIAS::GuiGTK, and BIAS::GuiWX.

int GuiBase::ShowConvertedImage_ ( Image< unsigned char > & image ) [protected, virtual]

Does the real update of the image shown in window. Must be overloaded.

Reimplemented in BIAS::GuiGTK, and BIAS::GuiWX.

Definition at line 282 of file GuiBase.cpp.

References BIASERR.

Referenced by ConvertToUC_(), and ShowImage().

int GuiBase::ShowImage ( PyramidImage< float > & pim ) [virtual]

Definition at line 254 of file GuiBase.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::PyramidImage< StorageType >::Init(), p, para, and BIAS::ImageBase::ST_unsignedchar.

int GuiBase::ShowImage ( PyramidImage< unsigned char > & pim ) [virtual]

Definition at line 271 of file GuiBase.cpp.

References BIAS::PyramidImage< StorageType >::GetSingleImage(), IsPyramid_, Pyramid0Height_, Pyramid0Width_, PyramidLevels_, and ShowImage().

int GuiBase::ShowImage | ( | ImageBase & | image,
 |  | float | min = 0.0,
 |  | float | max = 255.0
 | ) | [virtual]

shows/updates the image shown in window.

This method accepts all different template instances and converts them to unsigned char before calling ShowConvertedImage_()

Definition at line 139 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), img, IsPyramid_, OrigPicture_, ShowConvertedImage_(), and BIAS::ImageBase::StealImage().

Referenced by mainloop(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), showhistogram(), and ShowImage().

bool BIAS::GuiBase::TestImage_ ( Image< unsigned char > & image ) [inline, protected]

test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Reimplemented in BIAS::GuiGTK.

Definition at line 219 of file GuiBase.hh.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

void GuiBase::WaitForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual]

waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent

Definition at line 316 of file GuiBase.cpp.

References CheckForKeyEvent(), CheckForMouseButtonEvent(), and WindowCreated_.

char GuiBase::WaitForKeyEvent ( ) [virtual]

waits until a key is pressed and returns it tested

Author:
Felix Woelk

Definition at line 357 of file GuiBase.cpp.

References BIASDOUT, D_GUI_KEY, KeyBuffer_, and WindowCreated_.

void GuiBase::WaitForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual]

waits until any mouse button is pressed or released

Xpos and Ypos are set to the coordinates within the drawing area Pressed is set to true if the button was pressed and to false if the button was released Button is set to th mouse button no: 1 = left, 2 = middle, 3 = right

Definition at line 403 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, D_GUI_MOUSE_BUTTON, MouseButtonMutex_, MouseButtonPressed_, MouseButtonPressX_, MouseButtonPressY_, MouseButtonReleased_, MouseButtonReleaseX_, MouseButtonReleaseY_, and WindowCreated_.

Referenced by BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool GuiBase::BaseInitialized_ = false [static, protected]

Definition at line 210 of file GuiBase.hh.

Referenced by Init_().

int BIAS::GuiBase::Factor_ [protected]

Definition at line 205 of file GuiBase.hh.

Referenced by GetFactorOffset(), Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and SetFactorOffset().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::GuiBase::Height_ [protected]

Definition at line 185 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::IsPyramid_ [protected]

Definition at line 207 of file GuiBase.hh.

Referenced by Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and ShowImage().

char BIAS::GuiBase::KeyBuffer_ [protected]

Definition at line 204 of file GuiBase.hh.

Referenced by CheckForKeyEvent(), Init_(), BIAS::GuiGTK::KeyPressEventCallback_(), and WaitForKeyEvent().

pthread_mutex_t GuiBase::MouseButtonMutex_ [static, protected]

Definition at line 209 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressed_ [protected]

Definition at line 193 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressX_ [protected]

Definition at line 194 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressY_ [protected]

Definition at line 195 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleased_ [protected]

Definition at line 196 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseX_ [protected]

Definition at line 197 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseY_ [protected]

Definition at line 198 of file GuiBase.hh.

Referenced by CheckForMouseButtonEvent(), Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and WaitForMouseButtonEvent().

int BIAS::GuiBase::MousePosX_ [protected]

Definition at line 191 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::MousePosY_ [protected]

Definition at line 192 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

unsigned int BIAS::GuiBase::nChannels_ [protected]

Definition at line 186 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), Init_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

ImageBase BIAS::GuiBase::OrigPicture_ [protected]

This is the original representation of the picture.

Definition at line 201 of file GuiBase.hh.

Referenced by BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiGTK::MouseMotionCallback_(), and ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Height_ [protected]

Definition at line 188 of file GuiBase.hh.

Referenced by Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Width_ [protected]

Definition at line 187 of file GuiBase.hh.

Referenced by Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and ShowImage().

unsigned int BIAS::GuiBase::PyramidLevels_ [protected]

Definition at line 189 of file GuiBase.hh.

Referenced by Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and ShowImage().

bool BIAS::GuiBase::ShowMouse_ [protected]

Definition at line 181 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), GuiBase(), and Init_().

std::string BIAS::GuiBase::Title_ [protected]

Definition at line 203 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), GuiBase(), BIAS::GuiWX::GuiWX(), BIAS::GuiWX::Init_(), and Init_().

unsigned int BIAS::GuiBase::Width_ [protected]

if the following 3 variables are set , Buffer_ is already allocated

Definition at line 184 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

bool BIAS::GuiBase::WindowCreated_ [protected]

Definition at line 182 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiWX::DestroyWindow(), BIAS::GuiGTK::DestroyWindow(), Init_(), BIAS::GuiWX::ShowConvertedImage_(), BIAS::GuiGTK::ShowConvertedImage_(), WaitForEvent(), WaitForKeyEvent(), WaitForMouseButtonEvent(), and BIAS::GuiGTK::~GuiGTK().

int BIAS::GuiBase::XOffset_ [protected]

Definition at line 206 of file GuiBase.hh.

Referenced by GetFactorOffset(), Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and SetFactorOffset().

int BIAS::GuiBase::YOffset_ [protected]

Definition at line 206 of file GuiBase.hh.

Referenced by GetFactorOffset(), Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and SetFactorOffset().

The documentation for this class was generated from the following files:
  • Gui/GuiBase.hh
  • Gui/GuiBase.cpp
Generated on Wed Jun 21 19:07:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GuiEnhanced Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GuiEnhanced

BIAS::GuiEnhanced Class Reference
[Graphical User Interfaces]

extended GuiGTK with zoom and marking options More...

#include <Gui/GuiEnhanced.hh>

Inheritance diagram for BIAS::GuiEnhanced:

[legend]
Collaboration diagram for BIAS::GuiEnhanced:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual bool | CheckForEvent (char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible
virtual bool | CheckForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured
virtual char | CheckForKeyEvent ()
checks if any key is pressed and returns it returns -1 i fo no key is pressed
virtual bool | CheckForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description
bool | Closed ()
returns true if window is closed by user via x button
bool | DebugLevelIsSet (long int lv) const
int | DestroyWindow ()
stops the gtk_main loop and closes the window
void | DrawLine (int start[2], int end[2])
draws a line between start and end, no boundary checks the image buffer is not saved, it cannot be undone
void | DrawRectangle (unsigned int tl[2], unsigned int br[2])
draws a rectangle between tl and br using color the image buffer is not saved, it cannot be undone tl must be the top left corner, br must be the bottom right corner
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual void | GetFactorOffset (int &xoffset, int &yoffset, int &factor)
gets offset and factor for mouse position mouse position in (e.g.
int | GetMouseX ()
int | GetMouseY ()
std::string | GetTitle ()
void | GetZoomImage (unsigned int x, unsigned int y, unsigned int factor, unsigned int size, ImageBase &zoomimage, int &xoffset, int &yoffset)
void | GetZoomImage (unsigned int x, unsigned int y, unsigned int factor, unsigned int size, ImageBase &zoomimage)
void | GetZoomImage (unsigned int x, unsigned int y, unsigned int factor, unsigned int size, Image< unsigned char > &zoomimage, int &xoffset, int &yoffset)
void | GetZoomImage (unsigned int x, unsigned int y, unsigned int factor, unsigned int size, Image< unsigned char > &zoomimage)
GuiEnhanced ()
void | InitGtk (int *argc, char **argv[])
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
int | SelectLine (int start[2], int end[2])
select a line in actual image left mouse button to select start point left mouse button again to select end point any other button at any time cancels selection returns 0 if selection succesfull, negative value else
int | SelectLineZoom (int start[2], int end[2])
select a line in actual image left mouse button to get zoom window for start point left mouse button in zoom window to select starting point same procedure for end point any other button at any time cancels selection returns 0 if selection succesfull, negative value else
int | SelectPoint (int point[2])
int | SelectQuadrate (int upperleft[2], int lowerright[2])
Select a quadrate using the mouse First LEFT button selects upper left corner Second LEFT button selects lower right corner (While moving the mouse the selecting box is adjusted to form a quadrate) Pressing the RIGHT button cancels.
int | SelectRectangle (int upperleft[2], int lowerright[2])
Select a rectangle using the mouse First LEFT button selects upper left corner Second LEFT button selects lower right corner Pressing the RIGHT cancels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual void | SetFactorOffset (int xoffset, int yoffset, int factor)
sets offset and factor for mouse position mouse position in (e.g.
void | SetTitle (std::string const &Title)
virtual int | ShowImage (PyramidImage< float > &pim)
virtual int | ShowImage (PyramidImage< unsigned char > &pim)
virtual int | ShowImage (ImageBase &image, float min=0.0, float max=255.0)
shows/updates the image shown in window.
virtual void | WaitForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent
virtual char | WaitForKeyEvent ()
waits until a key is pressed and returns it tested
virtual void | WaitForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits until any mouse button is pressed or released
virtual | ~GuiEnhanced ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AllocateBuffer_ (Image< unsigned char > &image)
self explaining
template<class PixelType>
int | ConvertToUC_ (Image< PixelType > &image, float min, float max)
int | CreateWindow_ (Image< unsigned char > &image)
initialy creates a window for a given image size and runs the gtk main loop in a separate thread if not already running also allocates memory for Buffer_
int | FreeBuffer_ ()
self explaining
void | Init_ (bool ShowMousePos)
Set up thread and stuff.
void InitGtk_ ()
gtk needs to be initialized
bool | IsAllocated_ ()
self explaining
int | Redraw_ ()
internal function that handles the redraw
int | ReInitWindow_ (Image< unsigned char > &image)
reallocates memory and set internal variables
int | ShowConvertedImage_ (Image< unsigned char > &image)
updates the image shown in window
bool | TestImage_ (Image< unsigned char > &image)
test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Static Protected Member Functions

static gint | DeleteEvent_ (GtkWidget *widget, GdkEvent *event, gpointer user_data)
static void | Destroy_ (GtkWidget *widget, gpointer user_data)
static gboolean | DrawingAreaExposeCallback_ (GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data)
callback function for expose event
static void * | GtkMain (void *arg)
callbacks and thread functions must be static the gtk main loop runs in a separate thread
static gint | KeyPressEventCallback_ (GtkWidget *Widget, GdkEventKey *Event, gpointer user_data)
callback for key press event
static gboolean | LabelExposeCallback_ (GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data)
static gint | MouseButtonPressCallback_ (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gint | MouseButtonReleaseCallback_ (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gint | MouseMotionCallback_ (GtkWidget *Widget, GdkEventMotion *Event, gpointer user_data)

Protected Attributes

long int | _liDebugLevel
guchar * | Buffer_
GtkWidget * | DrawingArea_
int | Factor_
unsigned int | Height_
int | IsPyramid_
char | KeyBuffer_
GtkWidget * | Label_
int | MouseButtonPressed_
int | MouseButtonPressX_
int | MouseButtonPressY_
int | MouseButtonReleased_
int | MouseButtonReleaseX_
int | MouseButtonReleaseY_
int | MousePosX_
int | MousePosY_
unsigned int | nChannels_
ImageBase OrigPicture_
This is the original representation of the picture.
unsigned int | Pyramid0Height_
unsigned int | Pyramid0Width_
unsigned int | PyramidLevels_
bool | ShowMouse_
std::string | Title_
GtkWidget * | Vbox_
unsigned int | Width_
if the following 3 variables are set , Buffer_ is already allocated
GtkWidget * | Window_
bool | WindowCreated_
int | XOffset_
int | YOffset_

Static Protected Attributes

static std::ostream | _zDebugStream
static bool | BaseInitialized_ = false
static pthread_mutex_t | BufferMutex_
static long int | GlobalDebugLevel = 0
static bool | GtkInitialized_ = false
static pthread_mutex_t | GtkInitializedMutex_
static pthread_t | MainThread_
static bool | MainThreadRunning_ = false
static pthread_mutex_t | MainThreadRunningMutex_
static pthread_mutex_t | MouseButtonMutex_
static bool | ThreadsInitialized_ = false
static unsigned short int | WindowCount_ = 0
static pthread_mutex_t | WindowCountMutex_

Detailed Description

extended GuiGTK with zoom and marking options

Definition at line 42 of file GuiEnhanced.hh.

Constructor & Destructor Documentation

GuiEnhanced::GuiEnhanced ( )

Definition at line 34 of file GuiEnhanced.cpp.

GuiEnhanced::~GuiEnhanced ( ) [virtual]

Definition at line 39 of file GuiEnhanced.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int GuiGTK::AllocateBuffer_ ( Image< unsigned char > & image ) [protected, inherited]

self explaining

Definition at line 162 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIAS::GuiGTK::Buffer_, BIAS::GuiGTK::BufferMutex_, D_GUI_THREAD, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by BIAS::GuiGTK::CreateWindow_(), and BIAS::GuiGTK::ReInitWindow_().

bool GuiBase::CheckForEvent | ( | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible

Definition at line 336 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

bool GuiBase::CheckForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured

Definition at line 301 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

char GuiBase::CheckForKeyEvent ( ) [virtual, inherited]

checks if any key is pressed and returns it returns -1 i fo no key is pressed

Author:
Felix Woelk

Definition at line 345 of file GuiBase.cpp.

References BIAS::GuiBase::KeyBuffer_.

Referenced by BIAS::GuiBase::CheckForEvent(), mainloop(), and BIAS::GuiBase::WaitForEvent().

bool GuiBase::CheckForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description

Definition at line 374 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, and BIAS::GuiBase::MouseButtonReleaseY_.

Referenced by BIAS::GuiBase::CheckForEvent(), SelectLine(), SelectLineZoom(), SelectQuadrate(), SelectRectangle(), and BIAS::GuiBase::WaitForEvent().

bool BIAS::GuiBase::Closed ( ) [inline, inherited]

returns true if window is closed by user via x button

Author:
woelk 05/2003

Definition at line 166 of file GuiBase.hh.

template<class PixelType>
int GuiBase::ConvertToUC_ | ( | Image< PixelType > & | image,
 |  | float | min,
 |  | float | max
 | ) | [protected, inherited]

Definition at line 242 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::ST_unsignedchar.

int GuiGTK::CreateWindow_ ( Image< unsigned char > & image ) [protected, inherited]

initialy creates a window for a given image size and runs the gtk main loop in a separate thread if not already running also allocates memory for Buffer_

Definition at line 189 of file GuiGTK.cpp.

References BIAS::GuiGTK::AllocateBuffer_(), BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, D_GUI_MUTEX, D_GUI_THREAD, BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingArea_, BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkInitialized_, BIAS::GuiGTK::GtkInitializedMutex_, BIAS::GuiGTK::GtkMain(), BIAS::GuiBase::Height_, BIAS::GuiGTK::InitGtk_(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::Label_, BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MainThread_, BIAS::GuiGTK::MainThreadRunning_, BIAS::GuiGTK::MainThreadRunningMutex_, BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::SetTitle(), BIAS::GuiBase::ShowMouse_, BIAS::GuiBase::Title_, BIAS::GuiGTK::Vbox_, BIAS::GuiBase::Width_, BIAS::GuiGTK::Window_, BIAS::GuiGTK::WindowCount_, BIAS::GuiGTK::WindowCountMutex_, and BIAS::GuiBase::WindowCreated_.

Referenced by BIAS::GuiGTK::ShowConvertedImage_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

gint GuiGTK::DeleteEvent_ | ( | GtkWidget * | widget,
 |  | GdkEvent * | event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 627 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and D_GUI_THREAD.

Referenced by BIAS::GuiGTK::CreateWindow_().

void GuiGTK::Destroy_ | ( | GtkWidget * | widget,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 644 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, D_GUI_THREAD, and BIAS::GuiGTK::DestroyWindow().

Referenced by BIAS::GuiGTK::CreateWindow_().

int GuiGTK::DestroyWindow ( ) [virtual, inherited]

stops the gtk_main loop and closes the window

Reimplemented from BIAS::GuiBase.

Definition at line 283 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, BIASERR, D_GUI_MUTEX, D_GUI_SIGNAL, D_GUI_THREAD, BIAS::GuiGTK::DrawingArea_, BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiGTK::IsAllocated_(), BIAS::GuiGTK::Label_, BIAS::GuiGTK::MainThread_, BIAS::GuiGTK::MainThreadRunning_, BIAS::GuiGTK::MainThreadRunningMutex_, res, BIAS::GuiGTK::Vbox_, BIAS::GuiGTK::Window_, BIAS::GuiGTK::WindowCount_, BIAS::GuiGTK::WindowCountMutex_, and BIAS::GuiBase::WindowCreated_.

Referenced by BIAS::GuiGTK::Destroy_(), main(), SelectLineZoom(), SelectPoint(), and BIAS::GuiGTK::~GuiGTK().

gboolean GuiGTK::DrawingAreaExposeCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventExpose * | Event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

callback function for expose event

Definition at line 601 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and BIAS::GuiGTK::Redraw_().

Referenced by BIAS::GuiGTK::CreateWindow_().

void GuiEnhanced::DrawLine | ( | int | start[2],
 |  | int | end[2]
 | ) |

draws a line between start and end, no boundary checks the image buffer is not saved, it cannot be undone

Author:
fw

Definition at line 593 of file GuiEnhanced.cpp.

References BIAS::GuiGTK::Buffer_, BIAS::Bresenham::GetNext(), BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by SelectLine(), and SelectLineZoom().

void GuiEnhanced::DrawRectangle | ( | unsigned int | tl[2],
 |  | unsigned int | br[2]
 | ) |

draws a rectangle between tl and br using color the image buffer is not saved, it cannot be undone tl must be the top left corner, br must be the bottom right corner

Definition at line 538 of file GuiEnhanced.cpp.

References BIASERR, BIAS::GuiGTK::Buffer_, BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by SelectQuadrate(), and SelectRectangle().

int GuiGTK::FreeBuffer_ ( ) [protected, inherited]

self explaining

Definition at line 174 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIAS::GuiGTK::Buffer_, BIAS::GuiGTK::BufferMutex_, D_GUI_THREAD, BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::ReInitWindow_().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

void GuiBase::GetFactorOffset | ( | int & | xoffset,
 |  | int & | yoffset,
 |  | int & | factor
 | ) | [virtual, inherited]

gets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 130 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::GuiBase::GetMouseX ( ) [inline, inherited]

Definition at line 117 of file GuiBase.hh.

int BIAS::GuiBase::GetMouseY ( ) [inline, inherited]

Definition at line 118 of file GuiBase.hh.

std::string BIAS::GuiBase::GetTitle ( ) [inline, inherited]

Definition at line 91 of file GuiBase.hh.

void BIAS::GuiEnhanced::GetZoomImage | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | factor,
 |  | unsigned int | size,
 |  | ImageBase & | zoomimage,
 |  | int & | xoffset,
 |  | int & | yoffset
 | ) |

void GuiEnhanced::GetZoomImage | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | factor,
 |  | unsigned int | size,
 |  | ImageBase & | zoomimage
 | ) |

Definition at line 98 of file GuiEnhanced.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::GuiBase::Height_, BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::GuiBase::OrigPicture_, BIAS::ImageBase::Release(), and BIAS::GuiBase::Width_.

void BIAS::GuiEnhanced::GetZoomImage | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | factor,
 |  | unsigned int | size,
 |  | Image< unsigned char > & | zoomimage,
 |  | int & | xoffset,
 |  | int & | yoffset
 | ) |

void GuiEnhanced::GetZoomImage | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | factor,
 |  | unsigned int | size,
 |  | Image< unsigned char > & | zoomimage
 | ) |

Definition at line 42 of file GuiEnhanced.cpp.

References BIAS::GuiGTK::Buffer_, BIAS::Image< StorageType >::GetImageDataArray(), BIAS::GuiBase::Height_, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::GuiBase::nChannels_, BIAS::Image< StorageType >::Release(), and BIAS::GuiBase::Width_.

Referenced by SelectLineZoom(), and SelectPoint().

void * GuiGTK::GtkMain ( void * arg ) [static, protected, inherited]

callbacks and thread functions must be static the gtk main loop runs in a separate thread

Definition at line 395 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT_THREAD, D_GUI_MAIN, D_GUI_MUTEX, D_GUI_THREAD, BIAS::GuiGTK::MainThreadRunning_, and BIAS::GuiGTK::MainThreadRunningMutex_.

Referenced by BIAS::GuiGTK::CreateWindow_().

void GuiGTK::Init_ ( bool ShowMousePos ) [protected, virtual, inherited]

Set up thread and stuff.

Must be overloaded Derived class::Init_() should call GuiBase::Init_() first.

Reimplemented from BIAS::GuiBase.

Definition at line 80 of file GuiGTK.cpp.

References BIAS::GuiGTK::Buffer_, BIAS::GuiGTK::BufferMutex_, BIAS::GuiGTK::DrawingArea_, BIAS::GuiGTK::GtkInitializedMutex_, BIAS::GuiBase::Init_(), BIAS::GuiGTK::Label_, BIAS::GuiGTK::MainThreadRunningMutex_, BIAS::GuiGTK::ThreadsInitialized_, BIAS::GuiGTK::Vbox_, BIAS::GuiGTK::Window_, and BIAS::GuiGTK::WindowCountMutex_.

Referenced by BIAS::GuiGTK::GuiGTK().

void GuiGTK::InitGtk | ( | int * | argc,
 |  | char ** | argv[]
 | ) | [inherited]

Definition at line 126 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, BIASFLUSHDOUT, D_GUI_GDK, D_GUI_MUTEX, D_GUI_THREAD, BIAS::GuiGTK::GtkInitialized_, and BIAS::GuiGTK::GtkInitializedMutex_.

Referenced by BIAS::GuiGTK::InitGtk_(), and main().

void GuiGTK::InitGtk_ ( ) [protected, inherited]

gtk needs to be initialized

Definition at line 113 of file GuiGTK.cpp.

References BIAS::GuiGTK::InitGtk().

Referenced by BIAS::GuiGTK::CreateWindow_().

bool BIAS::GuiGTK::IsAllocated_ ( ) [inline, protected, inherited]

self explaining

Definition at line 102 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::ReInitWindow_().

gint GuiGTK::KeyPressEventCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventKey * | Event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

callback for key press event

Definition at line 442 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_KEY, D_GUI_THREAD, and BIAS::GuiBase::KeyBuffer_.

Referenced by BIAS::GuiGTK::CreateWindow_().

gboolean GuiGTK::LabelExposeCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventExpose * | Event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 612 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and D_GUI_THREAD.

Referenced by BIAS::GuiGTK::CreateWindow_().

gint GuiGTK::MouseButtonPressCallback_ | ( | GtkWidget * | widget,
 |  | GdkEventButton * | event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 456 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_MOUSE_BUTTON, D_GUI_THREAD, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, and BIAS::GuiBase::MouseButtonPressY_.

Referenced by BIAS::GuiGTK::CreateWindow_().

gint GuiGTK::MouseButtonReleaseCallback_ | ( | GtkWidget * | widget,
 |  | GdkEventButton * | event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 476 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_MOUSE_BUTTON, D_GUI_THREAD, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, and BIAS::GuiBase::MouseButtonReleaseY_.

Referenced by BIAS::GuiGTK::CreateWindow_().

gint GuiGTK::MouseMotionCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventMotion * | Event,
 |  | gpointer | user_data
 | ) | [static, protected, inherited]

Definition at line 495 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT_THREAD, BIASERR, BIAS::GuiGTK::BufferMutex_, D_GUI_GDK, D_GUI_THREAD, BIAS::GuiBase::Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::Debug::GetDebugLevel(), BIAS::Debug::GetDebugStream(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::GuiBase::Height_, BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::OrigPicture_, BIAS::GuiBase::Pyramid0Height_, BIAS::GuiBase::Pyramid0Width_, PYRAMID_BORDER, BIAS::GuiBase::PyramidLevels_, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedshortint, BIAS::GuiBase::Width_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

Referenced by BIAS::GuiGTK::CreateWindow_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int GuiGTK::Redraw_ ( ) [protected, inherited]

internal function that handles the redraw

Definition at line 345 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASERR, BIASFLUSHDOUT, BIAS::GuiGTK::Buffer_, BIAS::GuiGTK::BufferMutex_, D_GUI_GDK, D_GUI_THREAD, BIAS::GuiGTK::DrawingArea_, BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, BIAS::GuiBase::Width_, and BIAS::GuiGTK::Window_.

Referenced by BIAS::GuiGTK::DrawingAreaExposeCallback_(), SelectLine(), SelectLineZoom(), SelectQuadrate(), SelectRectangle(), and BIAS::GuiGTK::ShowConvertedImage_().

int GuiGTK::ReInitWindow_ ( Image< unsigned char > & image ) [protected, inherited]

reallocates memory and set internal variables

Definition at line 379 of file GuiGTK.cpp.

References BIAS::GuiGTK::AllocateBuffer_(), BIASCDOUT, D_GUI_THREAD, BIAS::GuiGTK::DrawingArea_, BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiBase::Height_, BIAS::GuiGTK::IsAllocated_(), res, and BIAS::GuiBase::Width_.

Referenced by BIAS::GuiGTK::ShowConvertedImage_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int GuiEnhanced::SelectLine | ( | int | start[2],
 |  | int | end[2]
 | ) |

select a line in actual image left mouse button to select start point left mouse button again to select end point any other button at any time cancels selection returns 0 if selection succesfull, negative value else

Author:
fw

Definition at line 408 of file GuiEnhanced.cpp.

References BIAS::GuiGTK::Buffer_, BIAS::GuiBase::CheckForMouseButtonEvent(), DrawLine(), BIAS::GuiBase::Height_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::nChannels_, BIAS::GuiGTK::Redraw_(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiBase::Width_.

int GuiEnhanced::SelectLineZoom | ( | int | start[2],
 |  | int | end[2]
 | ) |

select a line in actual image left mouse button to get zoom window for start point left mouse button in zoom window to select starting point same procedure for end point any other button at any time cancels selection returns 0 if selection succesfull, negative value else

Author:
fw

Definition at line 459 of file GuiEnhanced.cpp.

References BIASERR, BIAS::GuiGTK::Buffer_, BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiGTK::DestroyWindow(), DrawLine(), GetZoomImage(), BIAS::GuiBase::Height_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::nChannels_, BIAS::GuiGTK::Redraw_(), SelectPoint(), BIAS::GuiBase::SetFactorOffset(), BIAS::GuiBase::ShowImage(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiBase::Width_.

int GuiEnhanced::SelectPoint ( int point[2] )

Definition at line 157 of file GuiEnhanced.cpp.

References BIASERR, BIAS::GuiGTK::DestroyWindow(), GetZoomImage(), BIAS::GuiBase::Height_, BIAS::GuiBase::SetFactorOffset(), BIAS::GuiBase::ShowImage(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiBase::Width_.

Referenced by SelectLineZoom().

int GuiEnhanced::SelectQuadrate | ( | int | upperleft[2],
 |  | int | lowerright[2]
 | ) |

Select a quadrate using the mouse First LEFT button selects upper left corner Second LEFT button selects lower right corner (While moving the mouse the selecting box is adjusted to form a quadrate) Pressing the RIGHT button cancels.

Parameters:
upperleft | Here the resulting upper left corner (x and y) is stored
lowerright | Here the resulting lower right corner (x and y) is stored
Returns:
Returns != 0 in case of error
Author:
Ingo Thomsen

Definition at line 282 of file GuiEnhanced.cpp.

References abs, BIAS::GuiGTK::Buffer_, BIAS::GuiBase::CheckForMouseButtonEvent(), DrawRectangle(), BIAS::GuiBase::Height_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::nChannels_, BIAS::GuiGTK::Redraw_(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiBase::Width_.

int GuiEnhanced::SelectRectangle | ( | int | upperleft[2],
 |  | int | lowerright[2]
 | ) |

Select a rectangle using the mouse First LEFT button selects upper left corner Second LEFT button selects lower right corner Pressing the RIGHT cancels.

Parameters:
upperleft | Here the resulting upper left corner (x and y) is stored
lowerright | Here the resulting lower right corner (x and y) is stored
Returns:
Returns != 0 in case of error

Definition at line 201 of file GuiEnhanced.cpp.

References BIAS::GuiGTK::Buffer_, BIAS::GuiBase::CheckForMouseButtonEvent(), DrawRectangle(), BIAS::GuiBase::Height_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::nChannels_, BIAS::GuiGTK::Redraw_(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiBase::Width_.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void GuiBase::SetFactorOffset | ( | int | xoffset,
 |  | int | yoffset,
 |  | int | factor
 | ) | [virtual, inherited]

sets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 123 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

Referenced by SelectLineZoom(), and SelectPoint().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::GuiGTK::SetTitle ( std::string const & Title ) [virtual, inherited]

Reimplemented from BIAS::GuiBase.

Referenced by BIAS::GuiGTK::CreateWindow_(), main(), and mainloop().

int GuiGTK::ShowConvertedImage_ ( Image< unsigned char > & image ) [protected, virtual, inherited]

updates the image shown in window

Reimplemented from BIAS::GuiBase.

Definition at line 327 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIAS::GuiGTK::Buffer_, BIAS::GuiGTK::BufferMutex_, BIAS::GuiGTK::CreateWindow_(), D_GUI_THREAD, BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::GuiGTK::TestImage_(), and BIAS::GuiBase::WindowCreated_.

int GuiBase::ShowImage ( PyramidImage< float > & pim ) [virtual, inherited]

Definition at line 254 of file GuiBase.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::PyramidImage< StorageType >::Init(), p, para, and BIAS::ImageBase::ST_unsignedchar.

int GuiBase::ShowImage ( PyramidImage< unsigned char > & pim ) [virtual, inherited]

Definition at line 271 of file GuiBase.cpp.

References BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::Pyramid0Height_, BIAS::GuiBase::Pyramid0Width_, BIAS::GuiBase::PyramidLevels_, and BIAS::GuiBase::ShowImage().

int GuiBase::ShowImage | ( | ImageBase & | image,
 |  | float | min = 0.0,
 |  | float | max = 255.0
 | ) | [virtual, inherited]

shows/updates the image shown in window.

This method accepts all different template instances and converts them to unsigned char before calling ShowConvertedImage_()

Definition at line 139 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), img, BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::OrigPicture_, BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::StealImage().

Referenced by mainloop(), SelectLineZoom(), SelectPoint(), showhistogram(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiGTK::TestImage_ ( Image< unsigned char > & image ) [inline, protected, inherited]

test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Reimplemented from BIAS::GuiBase.

Definition at line 128 of file GuiGTK.hh.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::GuiGTK::ShowConvertedImage_().

void GuiBase::WaitForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent

Definition at line 316 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::CheckForMouseButtonEvent(), and BIAS::GuiBase::WindowCreated_.

char GuiBase::WaitForKeyEvent ( ) [virtual, inherited]

waits until a key is pressed and returns it tested

Author:
Felix Woelk

Definition at line 357 of file GuiBase.cpp.

References BIASDOUT, D_GUI_KEY, BIAS::GuiBase::KeyBuffer_, and BIAS::GuiBase::WindowCreated_.

void GuiBase::WaitForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits until any mouse button is pressed or released

Xpos and Ypos are set to the coordinates within the drawing area Pressed is set to true if the button was pressed and to false if the button was released Button is set to th mouse button no: 1 = left, 2 = middle, 3 = right

Definition at line 403 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, D_GUI_MOUSE_BUTTON, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, BIAS::GuiBase::MouseButtonReleaseY_, and BIAS::GuiBase::WindowCreated_.

Referenced by SelectLine(), SelectLineZoom(), SelectPoint(), SelectQuadrate(), and SelectRectangle().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool GuiBase::BaseInitialized_ = false [static, protected, inherited]

Definition at line 210 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_().

guchar* BIAS::GuiGTK::Buffer_ [protected, inherited]

Definition at line 80 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), DrawLine(), DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), GetZoomImage(), BIAS::GuiGTK::Init_(), BIAS::GuiGTK::Redraw_(), SelectLine(), SelectLineZoom(), SelectQuadrate(), SelectRectangle(), and BIAS::GuiGTK::ShowConvertedImage_().

pthread_mutex_t GuiGTK::BufferMutex_ [static, protected, inherited]

Definition at line 94 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiGTK::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), and BIAS::GuiGTK::ShowConvertedImage_().

GtkWidget* BIAS::GuiGTK::DrawingArea_ [protected, inherited]

Definition at line 82 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::Init_(), BIAS::GuiGTK::Redraw_(), and BIAS::GuiGTK::ReInitWindow_().

int BIAS::GuiBase::Factor_ [protected, inherited]

Definition at line 205 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool GuiGTK::GtkInitialized_ = false [static, protected, inherited]

Definition at line 89 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), and BIAS::GuiGTK::InitGtk().

pthread_mutex_t GuiGTK::GtkInitializedMutex_ [static, protected, inherited]

Definition at line 92 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::Init_(), and BIAS::GuiGTK::InitGtk().

unsigned int BIAS::GuiBase::Height_ [protected, inherited]

Definition at line 185 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::FreeBuffer_(), GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), SelectLine(), SelectLineZoom(), SelectPoint(), SelectQuadrate(), and SelectRectangle().

int BIAS::GuiBase::IsPyramid_ [protected, inherited]

Definition at line 207 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

char BIAS::GuiBase::KeyBuffer_ [protected, inherited]

Definition at line 204 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::KeyPressEventCallback_(), and BIAS::GuiBase::WaitForKeyEvent().

GtkWidget* BIAS::GuiGTK::Label_ [protected, inherited]

Definition at line 83 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::Init_().

pthread_t GuiGTK::MainThread_ [static, protected, inherited]

Definition at line 86 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), and BIAS::GuiGTK::DestroyWindow().

bool GuiGTK::MainThreadRunning_ = false [static, protected, inherited]

Definition at line 88 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::GtkMain().

pthread_mutex_t GuiGTK::MainThreadRunningMutex_ [static, protected, inherited]

Definition at line 91 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::GtkMain(), and BIAS::GuiGTK::Init_().

pthread_mutex_t GuiBase::MouseButtonMutex_ [static, protected, inherited]

Definition at line 209 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressed_ [protected, inherited]

Definition at line 193 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressX_ [protected, inherited]

Definition at line 194 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressY_ [protected, inherited]

Definition at line 195 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleased_ [protected, inherited]

Definition at line 196 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseX_ [protected, inherited]

Definition at line 197 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseY_ [protected, inherited]

Definition at line 198 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MousePosX_ [protected, inherited]

Definition at line 191 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), SelectLine(), SelectLineZoom(), SelectQuadrate(), and SelectRectangle().

int BIAS::GuiBase::MousePosY_ [protected, inherited]

Definition at line 192 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), SelectLine(), SelectLineZoom(), SelectQuadrate(), and SelectRectangle().

unsigned int BIAS::GuiBase::nChannels_ [protected, inherited]

Definition at line 186 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), DrawLine(), DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::Redraw_(), SelectLine(), SelectLineZoom(), SelectQuadrate(), and SelectRectangle().

ImageBase BIAS::GuiBase::OrigPicture_ [protected, inherited]

This is the original representation of the picture.

Definition at line 201 of file GuiBase.hh.

Referenced by GetZoomImage(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Height_ [protected, inherited]

Definition at line 188 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Width_ [protected, inherited]

Definition at line 187 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::PyramidLevels_ [protected, inherited]

Definition at line 189 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiBase::ShowMouse_ [protected, inherited]

Definition at line 181 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiBase::GuiBase(), and BIAS::GuiBase::Init_().

bool GuiGTK::ThreadsInitialized_ = false [static, protected, inherited]

Definition at line 87 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::Init_().

std::string BIAS::GuiBase::Title_ [protected, inherited]

Definition at line 203 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiBase::GuiBase(), BIAS::GuiWX::GuiWX(), BIAS::GuiWX::Init_(), and BIAS::GuiBase::Init_().

GtkWidget* BIAS::GuiGTK::Vbox_ [protected, inherited]

Definition at line 84 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::Init_().

unsigned int BIAS::GuiBase::Width_ [protected, inherited]

if the following 3 variables are set , Buffer_ is already allocated

Definition at line 184 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), DrawLine(), DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), SelectLine(), SelectLineZoom(), SelectPoint(), SelectQuadrate(), and SelectRectangle().

GtkWidget* BIAS::GuiGTK::Window_ [protected, inherited]

Definition at line 81 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiGTK::Init_(), and BIAS::GuiGTK::Redraw_().

unsigned short GuiGTK::WindowCount_ = 0 [static, protected, inherited]

Definition at line 90 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), and BIAS::GuiGTK::DestroyWindow().

pthread_mutex_t GuiGTK::WindowCountMutex_ [static, protected, inherited]

Definition at line 93 of file GuiGTK.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::DestroyWindow(), and BIAS::GuiGTK::Init_().

bool BIAS::GuiBase::WindowCreated_ [protected, inherited]

Definition at line 182 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiWX::DestroyWindow(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiBase::Init_(), BIAS::GuiWX::ShowConvertedImage_(), BIAS::GuiGTK::ShowConvertedImage_(), BIAS::GuiBase::WaitForEvent(), BIAS::GuiBase::WaitForKeyEvent(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiGTK::~GuiGTK().

int BIAS::GuiBase::XOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

int BIAS::GuiBase::YOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

The documentation for this class was generated from the following files:
  • Gui/GuiEnhanced.hh
  • Gui/GuiEnhanced.cpp
Generated on Wed Jun 21 19:07:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GuiGTK Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GuiGTK

BIAS::GuiGTK Class Reference
[Graphical User Interfaces]

Gui based on gtk is a simple windowing environment. More...

#include <Gui/GuiGTK.hh>

Inheritance diagram for BIAS::GuiGTK:

[legend]
Collaboration diagram for BIAS::GuiGTK:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual bool | CheckForEvent (char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible
virtual bool | CheckForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured
virtual char | CheckForKeyEvent ()
checks if any key is pressed and returns it returns -1 i fo no key is pressed
virtual bool | CheckForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description
bool | Closed ()
returns true if window is closed by user via x button
bool | DebugLevelIsSet (long int lv) const
int | DestroyWindow ()
stops the gtk_main loop and closes the window
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual void | GetFactorOffset (int &xoffset, int &yoffset, int &factor)
gets offset and factor for mouse position mouse position in (e.g.
int | GetMouseX ()
int | GetMouseY ()
std::string | GetTitle ()
GuiGTK (const GuiGTK &gui)
GuiGTK (std::string const &Title, bool ShowMousePos=true)
as standard constructor, also sets Title_
GuiGTK (bool ShowMousePos=true)
void | InitGtk (int *argc, char **argv[])
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual void | SetFactorOffset (int xoffset, int yoffset, int factor)
sets offset and factor for mouse position mouse position in (e.g.
void | SetTitle (std::string const &Title)
virtual int | ShowImage (PyramidImage< float > &pim)
virtual int | ShowImage (PyramidImage< unsigned char > &pim)
virtual int | ShowImage (ImageBase &image, float min=0.0, float max=255.0)
shows/updates the image shown in window.
virtual void | WaitForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent
virtual char | WaitForKeyEvent ()
waits until a key is pressed and returns it tested
virtual void | WaitForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits until any mouse button is pressed or released
virtual | ~GuiGTK ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AllocateBuffer_ (Image< unsigned char > &image)
self explaining
template<class PixelType>
int | ConvertToUC_ (Image< PixelType > &image, float min, float max)
int | CreateWindow_ (Image< unsigned char > &image)
initialy creates a window for a given image size and runs the gtk main loop in a separate thread if not already running also allocates memory for Buffer_
int | FreeBuffer_ ()
self explaining
void | Init_ (bool ShowMousePos)
Set up thread and stuff.
void InitGtk_ ()
gtk needs to be initialized
bool | IsAllocated_ ()
self explaining
int | Redraw_ ()
internal function that handles the redraw
int | ReInitWindow_ (Image< unsigned char > &image)
reallocates memory and set internal variables
int | ShowConvertedImage_ (Image< unsigned char > &image)
updates the image shown in window
bool | TestImage_ (Image< unsigned char > &image)
test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Static Protected Member Functions

static gint | DeleteEvent_ (GtkWidget *widget, GdkEvent *event, gpointer user_data)
static void | Destroy_ (GtkWidget *widget, gpointer user_data)
static gboolean | DrawingAreaExposeCallback_ (GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data)
callback function for expose event
static void * | GtkMain (void *arg)
callbacks and thread functions must be static the gtk main loop runs in a separate thread
static gint | KeyPressEventCallback_ (GtkWidget *Widget, GdkEventKey *Event, gpointer user_data)
callback for key press event
static gboolean | LabelExposeCallback_ (GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data)
static gint | MouseButtonPressCallback_ (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gint | MouseButtonReleaseCallback_ (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gint | MouseMotionCallback_ (GtkWidget *Widget, GdkEventMotion *Event, gpointer user_data)

Protected Attributes

long int | _liDebugLevel
guchar * | Buffer_
GtkWidget * | DrawingArea_
int | Factor_
unsigned int | Height_
int | IsPyramid_
char | KeyBuffer_
GtkWidget * | Label_
int | MouseButtonPressed_
int | MouseButtonPressX_
int | MouseButtonPressY_
int | MouseButtonReleased_
int | MouseButtonReleaseX_
int | MouseButtonReleaseY_
int | MousePosX_
int | MousePosY_
unsigned int | nChannels_
ImageBase OrigPicture_
This is the original representation of the picture.
unsigned int | Pyramid0Height_
unsigned int | Pyramid0Width_
unsigned int | PyramidLevels_
bool | ShowMouse_
std::string | Title_
GtkWidget * | Vbox_
unsigned int | Width_
if the following 3 variables are set , Buffer_ is already allocated
GtkWidget * | Window_
bool | WindowCreated_
int | XOffset_
int | YOffset_

Static Protected Attributes

static std::ostream | _zDebugStream
static bool | BaseInitialized_ = false
static pthread_mutex_t | BufferMutex_
static long int | GlobalDebugLevel = 0
static bool | GtkInitialized_ = false
static pthread_mutex_t | GtkInitializedMutex_
static pthread_t | MainThread_
static bool | MainThreadRunning_ = false
static pthread_mutex_t | MainThreadRunningMutex_
static pthread_mutex_t | MouseButtonMutex_
static bool | ThreadsInitialized_ = false
static unsigned short int | WindowCount_ = 0
static pthread_mutex_t | WindowCountMutex_

Detailed Description

Gui based on gtk is a simple windowing environment.

..

Usage:

  • get an object

  • call ShowImage() to visualize an image

  • use CheckForKeyEvent() to have your programm react on pressed keys

Definition at line 60 of file GuiGTK.hh.

Constructor & Destructor Documentation

GuiGTK::GuiGTK ( bool ShowMousePos = true )

Definition at line 66 of file GuiGTK.cpp.

References Init_().

BIAS::GuiGTK::GuiGTK | ( | std::string const & | Title,
 |  | bool | ShowMousePos = true
 | ) |

as standard constructor, also sets Title_

GuiGTK::GuiGTK ( const GuiGTK & gui )

Definition at line 77 of file GuiGTK.cpp.

GuiGTK::~GuiGTK ( ) [virtual]

Definition at line 103 of file GuiGTK.cpp.

References BIASDOUT, D_GUI_DESTRUCT, DestroyWindow(), and BIAS::GuiBase::WindowCreated_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int GuiGTK::AllocateBuffer_ ( Image< unsigned char > & image ) [protected]

self explaining

Definition at line 162 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, Buffer_, BufferMutex_, D_GUI_THREAD, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by CreateWindow_(), and ReInitWindow_().

bool GuiBase::CheckForEvent | ( | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible

Definition at line 336 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

bool GuiBase::CheckForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured

Definition at line 301 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

char GuiBase::CheckForKeyEvent ( ) [virtual, inherited]

checks if any key is pressed and returns it returns -1 i fo no key is pressed

Author:
Felix Woelk

Definition at line 345 of file GuiBase.cpp.

References BIAS::GuiBase::KeyBuffer_.

Referenced by BIAS::GuiBase::CheckForEvent(), mainloop(), and BIAS::GuiBase::WaitForEvent().

bool GuiBase::CheckForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description

Definition at line 374 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, and BIAS::GuiBase::MouseButtonReleaseY_.

Referenced by BIAS::GuiBase::CheckForEvent(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), BIAS::GuiEnhanced::SelectRectangle(), and BIAS::GuiBase::WaitForEvent().

bool BIAS::GuiBase::Closed ( ) [inline, inherited]

returns true if window is closed by user via x button

Author:
woelk 05/2003

Definition at line 166 of file GuiBase.hh.

template<class PixelType>
int GuiBase::ConvertToUC_ | ( | Image< PixelType > & | image,
 |  | float | min,
 |  | float | max
 | ) | [protected, inherited]

Definition at line 242 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::ST_unsignedchar.

int GuiGTK::CreateWindow_ ( Image< unsigned char > & image ) [protected]

initialy creates a window for a given image size and runs the gtk main loop in a separate thread if not already running also allocates memory for Buffer_

Definition at line 189 of file GuiGTK.cpp.

References AllocateBuffer_(), BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, D_GUI_MUTEX, D_GUI_THREAD, DeleteEvent_(), Destroy_(), DrawingArea_, DrawingAreaExposeCallback_(), GtkInitialized_, GtkInitializedMutex_, GtkMain(), BIAS::GuiBase::Height_, InitGtk_(), KeyPressEventCallback_(), Label_, LabelExposeCallback_(), MainThread_, MainThreadRunning_, MainThreadRunningMutex_, MouseButtonPressCallback_(), MouseButtonReleaseCallback_(), MouseMotionCallback_(), SetTitle(), BIAS::GuiBase::ShowMouse_, BIAS::GuiBase::Title_, Vbox_, BIAS::GuiBase::Width_, Window_, WindowCount_, WindowCountMutex_, and BIAS::GuiBase::WindowCreated_.

Referenced by ShowConvertedImage_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

gint GuiGTK::DeleteEvent_ | ( | GtkWidget * | widget,
 |  | GdkEvent * | event,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 627 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and D_GUI_THREAD.

Referenced by CreateWindow_().

void GuiGTK::Destroy_ | ( | GtkWidget * | widget,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 644 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, D_GUI_THREAD, and DestroyWindow().

Referenced by CreateWindow_().

int GuiGTK::DestroyWindow ( ) [virtual]

stops the gtk_main loop and closes the window

Reimplemented from BIAS::GuiBase.

Definition at line 283 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, BIASERR, D_GUI_MUTEX, D_GUI_SIGNAL, D_GUI_THREAD, DrawingArea_, FreeBuffer_(), IsAllocated_(), Label_, MainThread_, MainThreadRunning_, MainThreadRunningMutex_, res, Vbox_, Window_, WindowCount_, WindowCountMutex_, and BIAS::GuiBase::WindowCreated_.

Referenced by Destroy_(), main(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), and ~GuiGTK().

gboolean GuiGTK::DrawingAreaExposeCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventExpose * | Event,
 |  | gpointer | user_data
 | ) | [static, protected]

callback function for expose event

Definition at line 601 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and Redraw_().

Referenced by CreateWindow_().

int GuiGTK::FreeBuffer_ ( ) [protected]

self explaining

Definition at line 174 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, Buffer_, BufferMutex_, D_GUI_THREAD, BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, and BIAS::GuiBase::Width_.

Referenced by DestroyWindow(), and ReInitWindow_().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by MouseMotionCallback_().

void GuiBase::GetFactorOffset | ( | int & | xoffset,
 |  | int & | yoffset,
 |  | int & | factor
 | ) | [virtual, inherited]

gets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 130 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::GuiBase::GetMouseX ( ) [inline, inherited]

Definition at line 117 of file GuiBase.hh.

int BIAS::GuiBase::GetMouseY ( ) [inline, inherited]

Definition at line 118 of file GuiBase.hh.

std::string BIAS::GuiBase::GetTitle ( ) [inline, inherited]

Definition at line 91 of file GuiBase.hh.

void * GuiGTK::GtkMain ( void * arg ) [static, protected]

callbacks and thread functions must be static the gtk main loop runs in a separate thread

Definition at line 395 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT_THREAD, D_GUI_MAIN, D_GUI_MUTEX, D_GUI_THREAD, MainThreadRunning_, and MainThreadRunningMutex_.

Referenced by CreateWindow_().

void GuiGTK::Init_ ( bool ShowMousePos ) [protected, virtual]

Set up thread and stuff.

Must be overloaded Derived class::Init_() should call GuiBase::Init_() first.

Reimplemented from BIAS::GuiBase.

Definition at line 80 of file GuiGTK.cpp.

References Buffer_, BufferMutex_, DrawingArea_, GtkInitializedMutex_, BIAS::GuiBase::Init_(), Label_, MainThreadRunningMutex_, ThreadsInitialized_, Vbox_, Window_, and WindowCountMutex_.

Referenced by GuiGTK().

void GuiGTK::InitGtk | ( | int * | argc,
 |  | char ** | argv[]
 | ) |

Definition at line 126 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASDOUT, BIASFLUSHDOUT, D_GUI_GDK, D_GUI_MUTEX, D_GUI_THREAD, GtkInitialized_, and GtkInitializedMutex_.

Referenced by InitGtk_(), and main().

void GuiGTK::InitGtk_ ( ) [protected]

gtk needs to be initialized

Definition at line 113 of file GuiGTK.cpp.

References InitGtk().

Referenced by CreateWindow_().

bool BIAS::GuiGTK::IsAllocated_ ( ) [inline, protected]

self explaining

Definition at line 102 of file GuiGTK.hh.

Referenced by DestroyWindow(), and ReInitWindow_().

gint GuiGTK::KeyPressEventCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventKey * | Event,
 |  | gpointer | user_data
 | ) | [static, protected]

callback for key press event

Definition at line 442 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_KEY, D_GUI_THREAD, and BIAS::GuiBase::KeyBuffer_.

Referenced by CreateWindow_().

gboolean GuiGTK::LabelExposeCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventExpose * | Event,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 612 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_SIGNAL, and D_GUI_THREAD.

Referenced by CreateWindow_().

gint GuiGTK::MouseButtonPressCallback_ | ( | GtkWidget * | widget,
 |  | GdkEventButton * | event,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 456 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_MOUSE_BUTTON, D_GUI_THREAD, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, and BIAS::GuiBase::MouseButtonPressY_.

Referenced by CreateWindow_().

gint GuiGTK::MouseButtonReleaseCallback_ | ( | GtkWidget * | widget,
 |  | GdkEventButton * | event,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 476 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIASDOUT_THREAD, D_GUI_MOUSE_BUTTON, D_GUI_THREAD, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, and BIAS::GuiBase::MouseButtonReleaseY_.

Referenced by CreateWindow_().

gint GuiGTK::MouseMotionCallback_ | ( | GtkWidget * | Widget,
 |  | GdkEventMotion * | Event,
 |  | gpointer | user_data
 | ) | [static, protected]

Definition at line 495 of file GuiGTK.cpp.

References BIAS::Debug::_liDebugLevel, BIAS::Debug::_zDebugStream, BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT_THREAD, BIASERR, BufferMutex_, D_GUI_GDK, D_GUI_THREAD, BIAS::GuiBase::Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::Debug::GetDebugLevel(), BIAS::Debug::GetDebugStream(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::GuiBase::Height_, BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::MousePosX_, BIAS::GuiBase::MousePosY_, BIAS::GuiBase::OrigPicture_, BIAS::GuiBase::Pyramid0Height_, BIAS::GuiBase::Pyramid0Width_, PYRAMID_BORDER, BIAS::GuiBase::PyramidLevels_, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedshortint, BIAS::GuiBase::Width_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

Referenced by CreateWindow_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int GuiGTK::Redraw_ ( ) [protected]

internal function that handles the redraw

Definition at line 345 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, BIASERR, BIASFLUSHDOUT, Buffer_, BufferMutex_, D_GUI_GDK, D_GUI_THREAD, DrawingArea_, BIAS::GuiBase::Height_, BIAS::GuiBase::nChannels_, BIAS::GuiBase::Width_, and Window_.

Referenced by DrawingAreaExposeCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), BIAS::GuiEnhanced::SelectRectangle(), and ShowConvertedImage_().

int GuiGTK::ReInitWindow_ ( Image< unsigned char > & image ) [protected]

reallocates memory and set internal variables

Definition at line 379 of file GuiGTK.cpp.

References AllocateBuffer_(), BIASCDOUT, D_GUI_THREAD, DrawingArea_, FreeBuffer_(), BIAS::GuiBase::Height_, IsAllocated_(), res, and BIAS::GuiBase::Width_.

Referenced by ShowConvertedImage_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void GuiBase::SetFactorOffset | ( | int | xoffset,
 |  | int | yoffset,
 |  | int | factor
 | ) | [virtual, inherited]

sets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 123 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

Referenced by BIAS::GuiEnhanced::SelectLineZoom(), and BIAS::GuiEnhanced::SelectPoint().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::GuiGTK::SetTitle ( std::string const & Title ) [virtual]

Reimplemented from BIAS::GuiBase.

Referenced by CreateWindow_(), main(), and mainloop().

int GuiGTK::ShowConvertedImage_ ( Image< unsigned char > & image ) [protected, virtual]

updates the image shown in window

Reimplemented from BIAS::GuiBase.

Definition at line 327 of file GuiGTK.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, Buffer_, BufferMutex_, CreateWindow_(), D_GUI_THREAD, Redraw_(), ReInitWindow_(), TestImage_(), and BIAS::GuiBase::WindowCreated_.

int GuiBase::ShowImage ( PyramidImage< float > & pim ) [virtual, inherited]

Definition at line 254 of file GuiBase.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::PyramidImage< StorageType >::Init(), p, para, and BIAS::ImageBase::ST_unsignedchar.

int GuiBase::ShowImage ( PyramidImage< unsigned char > & pim ) [virtual, inherited]

Definition at line 271 of file GuiBase.cpp.

References BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::Pyramid0Height_, BIAS::GuiBase::Pyramid0Width_, BIAS::GuiBase::PyramidLevels_, and BIAS::GuiBase::ShowImage().

int GuiBase::ShowImage | ( | ImageBase & | image,
 |  | float | min = 0.0,
 |  | float | max = 255.0
 | ) | [virtual, inherited]

shows/updates the image shown in window.

This method accepts all different template instances and converts them to unsigned char before calling ShowConvertedImage_()

Definition at line 139 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), img, BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::OrigPicture_, BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::StealImage().

Referenced by mainloop(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), showhistogram(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiGTK::TestImage_ ( Image< unsigned char > & image ) [inline, protected]

test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Reimplemented from BIAS::GuiBase.

Definition at line 128 of file GuiGTK.hh.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by ShowConvertedImage_().

void GuiBase::WaitForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent

Definition at line 316 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::CheckForMouseButtonEvent(), and BIAS::GuiBase::WindowCreated_.

char GuiBase::WaitForKeyEvent ( ) [virtual, inherited]

waits until a key is pressed and returns it tested

Author:
Felix Woelk

Definition at line 357 of file GuiBase.cpp.

References BIASDOUT, D_GUI_KEY, BIAS::GuiBase::KeyBuffer_, and BIAS::GuiBase::WindowCreated_.

void GuiBase::WaitForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits until any mouse button is pressed or released

Xpos and Ypos are set to the coordinates within the drawing area Pressed is set to true if the button was pressed and to false if the button was released Button is set to th mouse button no: 1 = left, 2 = middle, 3 = right

Definition at line 403 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, D_GUI_MOUSE_BUTTON, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, BIAS::GuiBase::MouseButtonReleaseY_, and BIAS::GuiBase::WindowCreated_.

Referenced by BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by DeleteEvent_(), Destroy_(), DrawingAreaExposeCallback_(), GtkMain(), KeyPressEventCallback_(), LabelExposeCallback_(), MouseButtonPressCallback_(), MouseButtonReleaseCallback_(), MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by DeleteEvent_(), Destroy_(), DrawingAreaExposeCallback_(), GtkMain(), KeyPressEventCallback_(), LabelExposeCallback_(), MouseButtonPressCallback_(), MouseButtonReleaseCallback_(), MouseMotionCallback_(), and BIAS::Debug::operator=().

bool GuiBase::BaseInitialized_ = false [static, protected, inherited]

Definition at line 210 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_().

guchar* BIAS::GuiGTK::Buffer_ [protected]

Definition at line 80 of file GuiGTK.hh.

Referenced by AllocateBuffer_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), Init_(), Redraw_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), BIAS::GuiEnhanced::SelectRectangle(), and ShowConvertedImage_().

pthread_mutex_t GuiGTK::BufferMutex_ [static, protected]

Definition at line 94 of file GuiGTK.hh.

Referenced by AllocateBuffer_(), FreeBuffer_(), Init_(), MouseMotionCallback_(), Redraw_(), and ShowConvertedImage_().

GtkWidget* BIAS::GuiGTK::DrawingArea_ [protected]

Definition at line 82 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), Init_(), Redraw_(), and ReInitWindow_().

int BIAS::GuiBase::Factor_ [protected, inherited]

Definition at line 205 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool GuiGTK::GtkInitialized_ = false [static, protected]

Definition at line 89 of file GuiGTK.hh.

Referenced by CreateWindow_(), and InitGtk().

pthread_mutex_t GuiGTK::GtkInitializedMutex_ [static, protected]

Definition at line 92 of file GuiGTK.hh.

Referenced by CreateWindow_(), Init_(), and InitGtk().

unsigned int BIAS::GuiBase::Height_ [protected, inherited]

Definition at line 185 of file GuiBase.hh.

Referenced by AllocateBuffer_(), CreateWindow_(), FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), MouseMotionCallback_(), Redraw_(), ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::IsPyramid_ [protected, inherited]

Definition at line 207 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

char BIAS::GuiBase::KeyBuffer_ [protected, inherited]

Definition at line 204 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::Init_(), KeyPressEventCallback_(), and BIAS::GuiBase::WaitForKeyEvent().

GtkWidget* BIAS::GuiGTK::Label_ [protected]

Definition at line 83 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), and Init_().

pthread_t GuiGTK::MainThread_ [static, protected]

Definition at line 86 of file GuiGTK.hh.

Referenced by CreateWindow_(), and DestroyWindow().

bool GuiGTK::MainThreadRunning_ = false [static, protected]

Definition at line 88 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), and GtkMain().

pthread_mutex_t GuiGTK::MainThreadRunningMutex_ [static, protected]

Definition at line 91 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), GtkMain(), and Init_().

pthread_mutex_t GuiBase::MouseButtonMutex_ [static, protected, inherited]

Definition at line 209 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonPressCallback_(), MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressed_ [protected, inherited]

Definition at line 193 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressX_ [protected, inherited]

Definition at line 194 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressY_ [protected, inherited]

Definition at line 195 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleased_ [protected, inherited]

Definition at line 196 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseX_ [protected, inherited]

Definition at line 197 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseY_ [protected, inherited]

Definition at line 198 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MousePosX_ [protected, inherited]

Definition at line 191 of file GuiBase.hh.

Referenced by MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::MousePosY_ [protected, inherited]

Definition at line 192 of file GuiBase.hh.

Referenced by MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

unsigned int BIAS::GuiBase::nChannels_ [protected, inherited]

Definition at line 186 of file GuiBase.hh.

Referenced by AllocateBuffer_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), Redraw_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

ImageBase BIAS::GuiBase::OrigPicture_ [protected, inherited]

This is the original representation of the picture.

Definition at line 201 of file GuiBase.hh.

Referenced by BIAS::GuiEnhanced::GetZoomImage(), MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Height_ [protected, inherited]

Definition at line 188 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Width_ [protected, inherited]

Definition at line 187 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::PyramidLevels_ [protected, inherited]

Definition at line 189 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiBase::ShowMouse_ [protected, inherited]

Definition at line 181 of file GuiBase.hh.

Referenced by CreateWindow_(), BIAS::GuiBase::GuiBase(), and BIAS::GuiBase::Init_().

bool GuiGTK::ThreadsInitialized_ = false [static, protected]

Definition at line 87 of file GuiGTK.hh.

Referenced by Init_().

std::string BIAS::GuiBase::Title_ [protected, inherited]

Definition at line 203 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), CreateWindow_(), BIAS::GuiBase::GuiBase(), BIAS::GuiWX::GuiWX(), BIAS::GuiWX::Init_(), and BIAS::GuiBase::Init_().

GtkWidget* BIAS::GuiGTK::Vbox_ [protected]

Definition at line 84 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), and Init_().

unsigned int BIAS::GuiBase::Width_ [protected, inherited]

if the following 3 variables are set , Buffer_ is already allocated

Definition at line 184 of file GuiBase.hh.

Referenced by AllocateBuffer_(), CreateWindow_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), MouseMotionCallback_(), Redraw_(), ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

GtkWidget* BIAS::GuiGTK::Window_ [protected]

Definition at line 81 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), Init_(), and Redraw_().

unsigned short GuiGTK::WindowCount_ = 0 [static, protected]

Definition at line 90 of file GuiGTK.hh.

Referenced by CreateWindow_(), and DestroyWindow().

pthread_mutex_t GuiGTK::WindowCountMutex_ [static, protected]

Definition at line 93 of file GuiGTK.hh.

Referenced by CreateWindow_(), DestroyWindow(), and Init_().

bool BIAS::GuiBase::WindowCreated_ [protected, inherited]

Definition at line 182 of file GuiBase.hh.

Referenced by BIAS::GuiWX::CreateWindow_(), CreateWindow_(), BIAS::GuiWX::DestroyWindow(), DestroyWindow(), BIAS::GuiBase::Init_(), BIAS::GuiWX::ShowConvertedImage_(), ShowConvertedImage_(), BIAS::GuiBase::WaitForEvent(), BIAS::GuiBase::WaitForKeyEvent(), BIAS::GuiBase::WaitForMouseButtonEvent(), and ~GuiGTK().

int BIAS::GuiBase::XOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

int BIAS::GuiBase::YOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

The documentation for this class was generated from the following files:
  • Gui/GuiGTK.hh
  • Gui/GuiGTK.cpp
Generated on Wed Jun 21 19:07:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::GuiWX Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::GuiWX

BIAS::GuiWX Class Reference
[Graphical User Interfaces]

a sophisticated more complex windowing environment More...

#include <Gui/GuiWX.hh>

Inheritance diagram for BIAS::GuiWX:

[legend]
Collaboration diagram for BIAS::GuiWX:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual bool | CheckForEvent (char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible
virtual bool | CheckForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
as above but does return immediate with true if event occured
virtual char | CheckForKeyEvent ()
checks if any key is pressed and returns it returns -1 i fo no key is pressed
virtual bool | CheckForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description
bool | Closed ()
returns true if window is closed by user via x button
bool | DebugLevelIsSet (long int lv) const
int | DestroyWindow ()
stops the wx-main loop and closes the window
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual void | GetFactorOffset (int &xoffset, int &yoffset, int &factor)
gets offset and factor for mouse position mouse position in (e.g.
int | GetMouseX ()
int | GetMouseY ()
std::string | GetTitle ()
GuiWX (std::string const &Title)
GuiWX (std::string const &Title, bool ShowMousePos)
as standard constructor, also sets Title_
GuiWX (bool ShowMousePos=true)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual void | SetFactorOffset (int xoffset, int yoffset, int factor)
sets offset and factor for mouse position mouse position in (e.g.
void | SetTitle (std::string const &Title)
self explaining
virtual int | ShowImage (PyramidImage< float > &pim)
virtual int | ShowImage (PyramidImage< unsigned char > &pim)
virtual int | ShowImage (ImageBase &image, float min=0.0, float max=255.0)
shows/updates the image shown in window.
virtual void | WaitForEvent (bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent
virtual char | WaitForKeyEvent ()
waits until a key is pressed and returns it tested
virtual void | WaitForMouseButtonEvent (bool &Pressed, int &Button, int &Xpos, int &Ypos)
waits until any mouse button is pressed or released
virtual | ~GuiWX ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

template<class PixelType>
int | ConvertToUC_ (Image< PixelType > &image, float min, float max)
int | CreateWindow_ (Image< unsigned char > &image)
void | Init_ (bool ShowMousePos)
Init is called from the constructor.
int | ShowConvertedImage_ (Image< unsigned char > &image)
Does the real update of the image shown in window. Must be overloaded.
bool | TestImage_ (Image< unsigned char > &image)
test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Protected Attributes

long int | _liDebugLevel
unsigned char * | Buffer_
int | Factor_
TopFrame * Frame_
unsigned int | Height_
int | IsPyramid_
char | KeyBuffer_
int | MouseButtonPressed_
int | MouseButtonPressX_
int | MouseButtonPressY_
int | MouseButtonReleased_
int | MouseButtonReleaseX_
int | MouseButtonReleaseY_
int | MousePosX_
int | MousePosY_
unsigned int | nChannels_
ImageBase OrigPicture_
This is the original representation of the picture.
unsigned int | Pyramid0Height_
unsigned int | Pyramid0Width_
unsigned int | PyramidLevels_
bool | ShowMouse_
std::string | Title_
wxImage * | TmpWxImg_
unsigned int | Width_
if the following 3 variables are set , Buffer_ is already allocated
bool | WindowCreated_
wxThread * | WxMainLoop_
int | XOffset_
int | YOffset_

Static Protected Attributes

static std::ostream | _zDebugStream
static wxApp * | AppApp_ = NULL
static bool | BaseInitialized_ = false
static long int | GlobalDebugLevel = 0
static wxMutex | GuiWxMutex_
static bool | MainThreadRunning_ = false
static pthread_mutex_t | MouseButtonMutex_
static bool | ThreadInitialized_ = false
static unsigned short int | WindowCounter_ = 0
static bool | WxInitialized = false

Friends

class | ImgCanvas
class | TopFrame
class | WxMainThread

Detailed Description

a sophisticated more complex windowing environment

Features:

  • GLcanvas
  • Menu support

Usage:

  • look at the example or ask Jan Friso Evers or Jan Woetzel

Definition at line 117 of file GuiWX.hh.

Constructor & Destructor Documentation

GuiWX::GuiWX ( bool ShowMousePos = true )

Definition at line 98 of file GuiWX.cpp.

References Frame_, Init_(), BIAS::GuiBase::Title_, and TmpWxImg_.

BIAS::GuiWX::GuiWX | ( | std::string const & | Title,
 |  | bool | ShowMousePos
 | ) |

as standard constructor, also sets Title_

BIAS::GuiWX::GuiWX ( std::string const & Title )

GuiWX::~GuiWX ( ) [virtual]

Definition at line 153 of file GuiWX.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool GuiBase::CheckForEvent | ( | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured if key != -1 key event occured, if Xpos != -1 && YPos != -1 MouseButton Event occured, also both is possible

Definition at line 336 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

bool GuiBase::CheckForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

as above but does return immediate with true if event occured

Definition at line 301 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), and BIAS::GuiBase::CheckForMouseButtonEvent().

char GuiBase::CheckForKeyEvent ( ) [virtual, inherited]

checks if any key is pressed and returns it returns -1 i fo no key is pressed

Author:
Felix Woelk

Definition at line 345 of file GuiBase.cpp.

References BIAS::GuiBase::KeyBuffer_.

Referenced by BIAS::GuiBase::CheckForEvent(), mainloop(), and BIAS::GuiBase::WaitForEvent().

bool GuiBase::CheckForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

return true if mouse button is pressed or released, false else see WaitForMouseButtonEvent for detailed description

Definition at line 374 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, and BIAS::GuiBase::MouseButtonReleaseY_.

Referenced by BIAS::GuiBase::CheckForEvent(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), BIAS::GuiEnhanced::SelectRectangle(), and BIAS::GuiBase::WaitForEvent().

bool BIAS::GuiBase::Closed ( ) [inline, inherited]

returns true if window is closed by user via x button

Author:
woelk 05/2003

Definition at line 166 of file GuiBase.hh.

template<class PixelType>
int GuiBase::ConvertToUC_ | ( | Image< PixelType > & | image,
 |  | float | min,
 |  | float | max
 | ) | [protected, inherited]

Definition at line 242 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::ST_unsignedchar.

int GuiWX::CreateWindow_ ( Image< unsigned char > & image ) [protected]

Definition at line 192 of file GuiWX.cpp.

References BIASDOUT, D_GUI_MUTEX, Frame_, GuiWxMutex_, MainThreadRunning_, BIAS::GuiBase::Title_, TopFrame, WindowCounter_, BIAS::GuiBase::WindowCreated_, WxMainLoop_, and WxMainThread.

Referenced by ShowConvertedImage_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int GuiWX::DestroyWindow ( ) [virtual]

stops the wx-main loop and closes the window

Reimplemented from BIAS::GuiBase.

Definition at line 170 of file GuiWX.cpp.

References BIASDOUT, D_GUI_MUTEX, Frame_, GuiWxMutex_, WindowCounter_, and BIAS::GuiBase::WindowCreated_.

Referenced by BIAS::TopFrame::OnClose().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

void GuiBase::GetFactorOffset | ( | int & | xoffset,
 |  | int & | yoffset,
 |  | int & | factor
 | ) | [virtual, inherited]

gets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 130 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::GuiBase::GetMouseX ( ) [inline, inherited]

Definition at line 117 of file GuiBase.hh.

int BIAS::GuiBase::GetMouseY ( ) [inline, inherited]

Definition at line 118 of file GuiBase.hh.

std::string BIAS::GuiBase::GetTitle ( ) [inline, inherited]

Definition at line 91 of file GuiBase.hh.

void GuiWX::Init_ ( bool ShowMousePos ) [protected, virtual]

Init is called from the constructor.

Reimplemented from BIAS::GuiBase.

Definition at line 127 of file GuiWX.cpp.

References AppApp_, BIASERR, Buffer_, BIAS::GuiBase::Init_(), BIAS::GuiBase::Title_, wxEntryInitGui(), wxEntryStart(), and WxInitialized.

Referenced by GuiWX().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void GuiBase::SetFactorOffset | ( | int | xoffset,
 |  | int | yoffset,
 |  | int | factor
 | ) | [virtual, inherited]

sets offset and factor for mouse position mouse position in (e.g.

zoomed) window is calculated as follows: x = real_xpos/factor + xoffset; y = real_ypos/factor + yoffset; real_x/ypos are in the window coordinate system

Definition at line 123 of file GuiBase.cpp.

References BIAS::GuiBase::Factor_, BIAS::GuiBase::XOffset_, and BIAS::GuiBase::YOffset_.

Referenced by BIAS::GuiEnhanced::SelectLineZoom(), and BIAS::GuiEnhanced::SelectPoint().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::GuiWX::SetTitle ( std::string const & Title ) [virtual]

self explaining

Reimplemented from BIAS::GuiBase.

int GuiWX::ShowConvertedImage_ ( Image< unsigned char > & image ) [protected, virtual]

Does the real update of the image shown in window. Must be overloaded.

Reimplemented from BIAS::GuiBase.

Definition at line 219 of file GuiWX.cpp.

References BIAS::TopFrame::Canvas_, CreateWindow_(), Frame_, BIAS::ImageCanvas::Show(), and BIAS::GuiBase::WindowCreated_.

int GuiBase::ShowImage ( PyramidImage< float > & pim ) [virtual, inherited]

Definition at line 254 of file GuiBase.cpp.

References BIASERR, BIAS::ImageConvert::ConvertST(), BIAS::PyramidImage< StorageType >::Init(), p, para, and BIAS::ImageBase::ST_unsignedchar.

int GuiBase::ShowImage ( PyramidImage< unsigned char > & pim ) [virtual, inherited]

Definition at line 271 of file GuiBase.cpp.

References BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::Pyramid0Height_, BIAS::GuiBase::Pyramid0Width_, BIAS::GuiBase::PyramidLevels_, and BIAS::GuiBase::ShowImage().

int GuiBase::ShowImage | ( | ImageBase & | image,
 |  | float | min = 0.0,
 |  | float | max = 255.0
 | ) | [virtual, inherited]

shows/updates the image shown in window.

This method accepts all different template instances and converts them to unsigned char before calling ShowConvertedImage_()

Definition at line 139 of file GuiBase.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), img, BIAS::GuiBase::IsPyramid_, BIAS::GuiBase::OrigPicture_, BIAS::GuiBase::ShowConvertedImage_(), and BIAS::ImageBase::StealImage().

Referenced by mainloop(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), showhistogram(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiBase::TestImage_ ( Image< unsigned char > & image ) [inline, protected, inherited]

test if internal variables Width_, Height_ and nChannels_ are set correct for image these 3 variables are used as an indicator if Buffer_ is allocated in right size

Reimplemented in BIAS::GuiGTK.

Definition at line 219 of file GuiBase.hh.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

void GuiBase::WaitForEvent | ( | bool & | KeyEvent,
 |  | char & | key,
 |  | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true if key is pressed, the other variables are set as in WaitForKeyEvent and WaitForMouseButtonEvent

Definition at line 316 of file GuiBase.cpp.

References BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::CheckForMouseButtonEvent(), and BIAS::GuiBase::WindowCreated_.

char GuiBase::WaitForKeyEvent ( ) [virtual, inherited]

waits until a key is pressed and returns it tested

Author:
Felix Woelk

Definition at line 357 of file GuiBase.cpp.

References BIASDOUT, D_GUI_KEY, BIAS::GuiBase::KeyBuffer_, and BIAS::GuiBase::WindowCreated_.

void GuiBase::WaitForMouseButtonEvent | ( | bool & | Pressed,
 |  | int & | Button,
 |  | int & | Xpos,
 |  | int & | Ypos
 | ) | [virtual, inherited]

waits until any mouse button is pressed or released

Xpos and Ypos are set to the coordinates within the drawing area Pressed is set to true if the button was pressed and to false if the button was released Button is set to th mouse button no: 1 = left, 2 = middle, 3 = right

Definition at line 403 of file GuiBase.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASCDOUT, D_GUI_MOUSE_BUTTON, BIAS::GuiBase::MouseButtonMutex_, BIAS::GuiBase::MouseButtonPressed_, BIAS::GuiBase::MouseButtonPressX_, BIAS::GuiBase::MouseButtonPressY_, BIAS::GuiBase::MouseButtonReleased_, BIAS::GuiBase::MouseButtonReleaseX_, BIAS::GuiBase::MouseButtonReleaseY_, and BIAS::GuiBase::WindowCreated_.

Referenced by BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

Friends And Related Function Documentation

friend class ImgCanvas [friend]

Definition at line 120 of file GuiWX.hh.

friend class TopFrame [friend]

Definition at line 119 of file GuiWX.hh.

Referenced by CreateWindow_().

friend class WxMainThread [friend]

Definition at line 121 of file GuiWX.hh.

Referenced by CreateWindow_().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

wxApp * GuiWX::AppApp_ = NULL [static, protected]

Definition at line 149 of file GuiWX.hh.

Referenced by BIAS::WxMainThread::Entry(), and Init_().

bool GuiBase::BaseInitialized_ = false [static, protected, inherited]

Definition at line 210 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_().

unsigned char* BIAS::GuiWX::Buffer_ [protected]

Definition at line 139 of file GuiWX.hh.

Referenced by Init_().

int BIAS::GuiBase::Factor_ [protected, inherited]

Definition at line 205 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

TopFrame* BIAS::GuiWX::Frame_ [protected]

Definition at line 155 of file GuiWX.hh.

Referenced by CreateWindow_(), DestroyWindow(), GuiWX(), and ShowConvertedImage_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

wxMutex GuiWX::GuiWxMutex_ [static, protected]

Definition at line 152 of file GuiWX.hh.

Referenced by CreateWindow_(), and DestroyWindow().

unsigned int BIAS::GuiBase::Height_ [protected, inherited]

Definition at line 185 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::IsPyramid_ [protected, inherited]

Definition at line 207 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

char BIAS::GuiBase::KeyBuffer_ [protected, inherited]

Definition at line 204 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForKeyEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::KeyPressEventCallback_(), and BIAS::GuiBase::WaitForKeyEvent().

bool GuiWX::MainThreadRunning_ = false [static, protected]

Definition at line 143 of file GuiWX.hh.

Referenced by CreateWindow_(), and BIAS::WxMainThread::OnExit().

pthread_mutex_t GuiBase::MouseButtonMutex_ [static, protected, inherited]

Definition at line 209 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressed_ [protected, inherited]

Definition at line 193 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressX_ [protected, inherited]

Definition at line 194 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonPressY_ [protected, inherited]

Definition at line 195 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonPressCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleased_ [protected, inherited]

Definition at line 196 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseX_ [protected, inherited]

Definition at line 197 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MouseButtonReleaseY_ [protected, inherited]

Definition at line 198 of file GuiBase.hh.

Referenced by BIAS::GuiBase::CheckForMouseButtonEvent(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), and BIAS::GuiBase::WaitForMouseButtonEvent().

int BIAS::GuiBase::MousePosX_ [protected, inherited]

Definition at line 191 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

int BIAS::GuiBase::MousePosY_ [protected, inherited]

Definition at line 192 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

unsigned int BIAS::GuiBase::nChannels_ [protected, inherited]

Definition at line 186 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

ImageBase BIAS::GuiBase::OrigPicture_ [protected, inherited]

This is the original representation of the picture.

Definition at line 201 of file GuiBase.hh.

Referenced by BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Height_ [protected, inherited]

Definition at line 188 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::Pyramid0Width_ [protected, inherited]

Definition at line 187 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

unsigned int BIAS::GuiBase::PyramidLevels_ [protected, inherited]

Definition at line 189 of file GuiBase.hh.

Referenced by BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::ShowImage().

bool BIAS::GuiBase::ShowMouse_ [protected, inherited]

Definition at line 181 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::CreateWindow_(), BIAS::GuiBase::GuiBase(), and BIAS::GuiBase::Init_().

bool GuiWX::ThreadInitialized_ = false [static, protected]

Definition at line 142 of file GuiWX.hh.

std::string BIAS::GuiBase::Title_ [protected, inherited]

Definition at line 203 of file GuiBase.hh.

Referenced by CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiBase::GuiBase(), GuiWX(), Init_(), and BIAS::GuiBase::Init_().

wxImage* BIAS::GuiWX::TmpWxImg_ [protected]

Definition at line 160 of file GuiWX.hh.

Referenced by GuiWX().

unsigned int BIAS::GuiBase::Width_ [protected, inherited]

if the following 3 variables are set , Buffer_ is already allocated

Definition at line 184 of file GuiBase.hh.

Referenced by BIAS::GuiGTK::AllocateBuffer_(), BIAS::GuiGTK::CreateWindow_(), BIAS::GuiEnhanced::DrawLine(), BIAS::GuiEnhanced::DrawRectangle(), BIAS::GuiGTK::FreeBuffer_(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::GuiGTK::Redraw_(), BIAS::GuiGTK::ReInitWindow_(), BIAS::GuiEnhanced::SelectLine(), BIAS::GuiEnhanced::SelectLineZoom(), BIAS::GuiEnhanced::SelectPoint(), BIAS::GuiEnhanced::SelectQuadrate(), and BIAS::GuiEnhanced::SelectRectangle().

unsigned short int GuiWX::WindowCounter_ = 0 [static, protected]

Definition at line 147 of file GuiWX.hh.

Referenced by CreateWindow_(), and DestroyWindow().

bool BIAS::GuiBase::WindowCreated_ [protected, inherited]

Definition at line 182 of file GuiBase.hh.

Referenced by CreateWindow_(), BIAS::GuiGTK::CreateWindow_(), DestroyWindow(), BIAS::GuiGTK::DestroyWindow(), BIAS::GuiBase::Init_(), ShowConvertedImage_(), BIAS::GuiGTK::ShowConvertedImage_(), BIAS::GuiBase::WaitForEvent(), BIAS::GuiBase::WaitForKeyEvent(), BIAS::GuiBase::WaitForMouseButtonEvent(), and BIAS::GuiGTK::~GuiGTK().

bool GuiWX::WxInitialized = false [static, protected]

Definition at line 144 of file GuiWX.hh.

Referenced by Init_().

wxThread* BIAS::GuiWX::WxMainLoop_ [protected]

Definition at line 158 of file GuiWX.hh.

Referenced by CreateWindow_().

int BIAS::GuiBase::XOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

int BIAS::GuiBase::YOffset_ [protected, inherited]

Definition at line 206 of file GuiBase.hh.

Referenced by BIAS::GuiBase::GetFactorOffset(), BIAS::GuiBase::Init_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::GuiBase::SetFactorOffset().

The documentation for this class was generated from the following files:
  • Gui/GuiWX.hh
  • Gui/GuiWX.cpp
Generated on Wed Jun 21 19:07:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Histogram Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Histogram

BIAS::Histogram Class Reference
[PyramidImage, Camera, Histogram]

class for easy histogram generation More...

#include <Image/Histogram.hh>

Inheritance diagram for BIAS::Histogram:

[legend]
Collaboration diagram for BIAS::Histogram:

[legend]
List of all members.

Misc functions

void ClearDataPointer ()
set data pointer to NULL, such that image IsEmpty _without_ deletion of data.
int | Display ()
display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.
int | Display (const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale)
interface for the above
int | Display (const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
bool | IsPositionInImage (const int &x, const int &y) const
check if image contains that pixel position
bool | IsPowerOfTwoSize () const
int | MoveToClosestPositionInImage (int &x, int &y) const
find closest valid pixel position to x,y
void * | PixelValueBase (unsigned x, unsigned y, unsigned channel=0)
bool | PowerOfTwoSize (unsigned int &width2, unsigned int &height2) const
void | PrintHeader (std::ostream &os=std::cout) const
void | RedirectImageDataPointer (void *data)
This method takes data and set the internal image data pointer to this.
void ReleaseImageDataPointer ()
Releases ImageData_ (to be used together with RedirectImageDataPointer).
bool | SamePixelAndChannelCount (const ImageBase &Image) const
checks if data area has same "size" as Image of other type
void SetZero ()
zeroes the image
static int | GetChannelcount (const enum BIAS::ImageBase::EColorModel &colormodel)
get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.
static int | GetSize (const enum BIAS::ImageBase::EStorageType &storagetype)
get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.
static bool | IsPowerOfTwoSize (const unsigned int w, const unsigned int h)
static unsigned int | PowerOfTwoSize (const unsigned int &val)

Get functions

bool | DimensionMatch (const BIAS::ImageBase &other) const
unsigned int | GetBitDepth () const
returns the bits per channel, which is not necessairily 8*sizeof(StorageType).
int | GetChannel (ImageBase &source, unsigned int channel)
copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB
unsigned int | GetChannelCount () const
returns the number of Color channels, e.g.
enum EColorModel | GetColorModel () const
unsigned int | GetDepth () const
returns the bytes per channel, which is the sizeof(StorageType)
unsigned int | GetHeight () const
void * GetImageData ()
MetaData * GetMetaData ()
unsigned long int | GetPixelCount () const
returns number of pixels in image
unsigned int | GetPixelPosition (unsigned int x, unsigned int y, unsigned short int channel=0) const
returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).
unsigned int | GetSize () const
returns the image size in bytes = count - NOT the dimension
enum EStorageType | GetStorageType () const
const BIAS::UUID & | GetUID () const
returns the UUID of the image
int | GetVersionNumber () const
unsigned int | GetWidth () const
unsigned int | GetWidthStep () const
returns the number of bytes per line
bool | IsInterleaved () const
bool | IsPlanar () const
void | SetMetaData (const MetaData &m)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ImageBase &img)
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, ImageBase &img)

Public Types

enum EColorModel {
CM_invalid = -1, CM_Grey, CM_RGB, CM_BGR,
CM_YUYV422, CM_UYVY422, CM_YUV420P, CM_YUV444,
CM_YUV411, CM_HSV, CM_HSI_OBS, CM_DV,
CM_RGBA, CM_GreyA, CM_Bayer_RGGB, CM_Bayer_GBRG,
CM_Bayer_GRBG, CM_Bayer_BGGR, CM_HSL, CM_hsL,
CM_SymTensor2x2, CM_BGRA, CM_RGBE
}
These are the most often used color models. More...
enum EStorageType {
ST_invalid = -1, ST_unsignedchar, ST_char, ST_unsignedshortint,
ST_shortint, ST_unsignedint, ST_int, ST_float,
ST_double
}

Public Member Functions

int | AboveThresholdToValue (unsigned charThreshold, unsigned charValue)
sets alls pixels with values above Threshold to Value
void | AbsDiff (const Image< unsigned char > &im1, const Image< unsigned char > &im2)
(*this) = | im1 - im2 | sets this as the absolute difference between two arg images
void | AddDebugLevel (long int lv)
template<class DataType>
int | AddHist (vector< DataType > &data, DataType min, DataType max, unsigned int hist)
template<class DataType>
int | AddHist (vector< DataType > &data, unsigned int hist)
template<>
BIASImage_EXPORT int | AddHist (Image< unsigned char > &Image, unsigned int hist)
template<class DataType>
int | AddHist (std::vector< DataType > &data, DataType min, DataType max, unsigned int hist=0)
template<class DataType>
int | AddHist (std::vector< DataType > &data, unsigned int hist=0)
Calcluates the histogram from data and adds them to the internal data structures.
template<class StorageType>
int | AddHist (Image< StorageType > &Image, unsigned int hist=0)
calculates the histogram of image and adds them to the internal data structures
template<class DataType>
int | AddWeightedHist (vector< DataType > &data, vector< double > &weight, unsigned int hist)
template<class DataType>
int | AddWeightedHist (std::vector< DataType > &data, std::vector< double > &weight, unsigned int hist=0)
for data[i] increase according bin about weight[i]
int | AppendChannel (Image< unsigned char > &img)
Append means: RGB + A => RGBA.
int | BelowThresholdToValue (unsigned charThreshold, unsigned charValue)
sets alls pixels with values below Threshold to Value
double | BicubicInterpolation (const double &x, const double &y, const unsigned short int channel=0) const
Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !
double | BilinearInterpolation (const double x, const double y, const unsigned short int channel=0) const
Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.
double | BilinearInterpolationGrey (const double x, const double y) const
no boundary checking ! ignores ROI
double | BilinearInterpolationGreyMinVal (const double x, const double y, const unsigned char &minVal) const
bilinear interpolation pixel value with value check.
double | BilinearInterpolationRGBInterleaved (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
double | BilinearInterpolationRGBPlanar (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
void | BilinearInterpolationShiftRegion (const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer)
sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .
void | Binarize (unsigned charThreshold)
sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images
int | BinaryThreshold (unsigned charThreshold, unsigned charMinValue, unsigned charMaxValue)
Test for every pixel wether it is >= than the threshold.
int | CalcScaleShift (double Min, double Max, double &Scale, double &Shift) const
calculate the values needed by ScaleShiftBetween
void | Clear (const unsigned charvalue=0)
sets all pixels to zero/value
void | CooTransf (double datacoo[2], unsigned imcoo[2], unsigned hist=0)
transforms data coordinates to image coordinates does automatic clipping and rounding
void | CooTransf (double datacoo[2], double imcoo[2], unsigned hist=0)
transforms data coordinates to image coordinates does automatic clipping
void | CopyIn_NoInit (void *data)
Take some data and fill it into the Image.
bool | DebugLevelIsSet (long int lv) const
int | Draw ()
actually draws histogram(s) from the internal data structures
int | DrawLog ()
actually draws histogram(s) from the internal data structures uses a logarithmic y axis
void | Dump (std::ostream &os=std::cout)
unsigned char | FastBilinearInterpolationGrey (const double x, const double y) const
fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below
void | FillImageWithConstValue (unsigned charValue[])
fill color images
void | FillImageWithConstValue (unsigned charValue)
fill grey images
void FillImageWithXValue ()
fills image with value depending on x coordinate
double | GetBin (unsigned int bin, unsigned int hist=0)
Get the counted number of bin from hist, -1 for invalid bin/hist.
unsigned int | GetBinCount ()
void | GetDataRange (double &min, double &max, unsigned int hist=0)
returns the range of the histogram, i.e.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
unsigned int | GetHistCount ()
unsigned char * | GetImageData () const
overloaded GetImageData() from ImageBase
unsigned char ** | GetImageDataArray () const
overloaded GetImageData() from ImageBase
void | GetMaxHistEntry (double &maxentry, unsigned int hist=0)
returns the biggest bin in histogram hist
unsigned char | GetMaxPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.
void | GetMeanPixelValue (unsigned charmean[])
void | GetMinMaxPixelValue (unsigned char &min, unsigned char &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const
returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.
bool | GetMinMaxPixelValueIgnoreRange (unsigned char &min, unsigned char &max, const unsigned charignoreStart=0, const unsigned charignoreEnd=0, const unsigned short int channel=0) const
Get both, minimal and maximal pixel value --actual implementation only for planar images--.
unsigned char | GetMinPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.
unsigned char & | GetPixelNearestNeighbor (const float x, const float y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.
unsigned char & | GetPixelNearestNeighbor (const double x, const double y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given double coordinates.
Histogram (unsigned short int zoomfactor=2)
Image (const ImageBase &im)
create image from imagebase.
Image (unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true)
constructor with size and channels allocates image data
Image ()
void | Init (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Initialize image size and channels.
void | Init (unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
int | InitHist (unsigned int bincount=256, unsigned int histcount=1)
reserves the internal data structures for histcount histograms with bincount bins in each in one image
int | InitWithForeignData (unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true)
This is used to construct a BIAS::Image hull around existing image data.
double | InterpolationGrey (const double x, const double y) const
interpolation with weights according to distances to x and y
bool | IsEmpty () const
check if ImageData_ points to allocated image buffer or not
bool | IsEmpty ()
returns true if MaxHistEntry==0 for all histograms
double | LinearInterpolation (const double x, const unsigned int y) const
double | LinearInterpolation (const unsigned int x, const double y) const
unsigned char | MaxSTValue ()
returns the maximal possible StorageType
unsigned char | MinSTValue ()
returns the minimal possible StorageType
Image< unsigned char > | operator * (const Image< unsigned char > &argimage)
Operator * for another image as argument, returning a new image.
Image< unsigned char > | operator * (const unsigned char &argimage)
Operator * for scalar value, returning a new image.
Image< unsigned char > & | operator *= (const Image< unsigned char > &argimage)
Operator *= for another image as argument.
Image< unsigned char > & | operator *= (const unsigned char &argimage)
Operator *= for scalar value.
Image< unsigned char > | operator+ (const Image< unsigned char > &argimage)
Operator + for another image as argument, returning a new image.
Image< unsigned char > | operator+ (const unsigned char &argimage)
Operator + for scalar value, returning a new image.
Image< unsigned char > & | operator+= (const Image< unsigned char > &argimage)
Operator += for another image as argument.
Image< unsigned char > & | operator+= (const unsigned char &argimage)
Operator += for scalar value.
Image< unsigned char > | operator- (const Image< unsigned char > &argimage)
subtracts every from every pixel (in ROI if defined) the pixel value from argimage !!! negative results are clipped to zero !!!
Image< unsigned char > | operator- (const unsigned char &argimage)
Operator - for scalar value, returning a new image.
Image< unsigned char > & | operator-= (const Image< unsigned char > &argimage)
Operator -= for another image as argument.
Image< unsigned char > & | operator-= (const unsigned char &argimage)
Operator -= for scalar value.
Image< unsigned char > | operator/ (const Image< unsigned char > &argimage)
Operator / for another image as argument, returning a new image.
Image< unsigned char > | operator/ (const unsigned char &argimage)
Operator / for scalar value, returning a new image.
Image< unsigned char > & | operator/= (const Image< unsigned char > &argimage)
Operator /= for another image as argument.
Image< unsigned char > & | operator/= (const unsigned char &argimage)
Operator /= for scalar value.
Image< unsigned char > & | operator| (const Image< unsigned char > &argimage)
unsigned char | PixelValue (const unsigned int x, const unsigned int y, const unsigned short int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
unsigned char | PixelValueInterleaved (const int x, const int y, const int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
std::ostream & | PrintData (std::ostream &os) const
writes data of IplImage_ to os (ascii)
void | PrintDebugLevel (std::ostream &os=std::cout) const
std::ostream & | PrintPointer (std::ostream &os) const
writes pointer of IplImage_ to os (ascii)
Image< float > | Reciprocal (const float factor=1.0, const unsigned short int channel=0)
void Release ()
reimplemented from ImageBase
int | ReleaseHist ()
releases internal data structures (Hist_)
void | RemoveDebugLevel (long int lv)
int | ScaleShift (double Scale, double Shift)
scales and shifts image (all channels simultanously)
int | ScaleShiftBetween (double Min, double Max)
scales and shifts image so afterwards every pixel has a value between Min and Max
int | SetBin (unsigned int bin, double value, unsigned int hist=0)
Set the counted number of bin from hist to manipulate the histogram.
void | SetBinCount (unsigned int bincount)
resizes Hist_
int | SetColor (unsigned char R, unsigned char G, unsigned char B, unsigned int hist=0)
void SetColorModel ()
dummy function to avoid swapping color model in this class
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDrawMode (HistMode m)
Select drawing style. Default is HIST_POINTS.
void | SetFactor (unsigned short Factor)
void | SetHistCount (unsigned int histcount)
Reserves internal data structures for histcount histograms.
void | SetPixel (const unsigned char &value0, const unsigned char &value1, const unsigned char &value2, const unsigned int &x, const unsigned int &y)
set the values of the first three channels of a given pixel (x,y) in channel to value[0.
void | SetPixel (const unsigned char &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0)
set the value of a given pixel (x,y) in channel to value.
void | SetScaleYToMaxEntry (bool s)
if true, the upper border of histogram is MaxHistEntry, otherwise the upper border of histogram k is Hist[k][i] = NumData_[k]
int | StealImage (ImageBase &source)
steals the image data array from source, after releasing the actual image data and sets source image data to NULL
int | WriteASCII (const std::string &filename)
opens file and calls WriteASCII() with it
void | WriteASCII (std::ostream &os=std::cout)
writes ascii data to stream, can be used later e.g. with gnuplot
int | ZeroHist (unsigned int hist=0)
zeros existing histogram
~Histogram ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | CalcAverage_ (unsigned int hist)
int | DeleteHist_ (unsigned int hist)
int | DrawHist_ (unsigned int hist)
int | DrawHistLog_ (unsigned int hist)
int | RedrawHist_ (unsigned int hist)
int | UpdateImageDataArrayFromImageData_ ()
recomputes pointer array returned by GetImageDataArray

Protected Attributes

long int | _liDebugLevel
MetaData _MetaData
additional data block, handled by derived classes
unsigned char | _ucBorderColor
unsigned int | _uiBorder
BIAS::UUID _UID
unique id for every image
double * | Average_
unsigned int | BinCount_
double * | BinSize_
unsigned int | BitDepth_
relevant bits per pixel per channel
unsigned int | ChannelCount_
number of channels per pixel
unsigned char ** | Color_
enum EColorModel | ColorModel_
the color model of the pixels
unsigned int | Depth_
size of one channel of one pixel in bytes
unsigned short int | Factor_
unsigned int | Height_
image height in pixels
double ** | Hist_
unsigned short int | HistCount_
unsigned int | HistSize_
void * ImageData_
a pointer to the image data
void ** ImageDataArray_
array of pointers to the first byte in an image row
bool | InterleavedDataOrder_
planar or interleaved: planar means we have several image planes, e.g.
double * | MaxBinVal_
double * | MaxHistEntry_
double * | MinBinVal_
HistMode Mode_
double * | NumData_
ROI Roi_
roi object
bool | ScaleYToMaxEntry_
enum EStorageType | StorageType_
the storage type in a pixel channel
unsigned int | Width_
image width in pixels
unsigned int | WidthStep_
size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = VERSION_NUMBER
version number of imagebase class

Detailed Description

class for easy histogram generation

Automatically generate and draw some histograms in one image.

The histogram image has size bincount*zoomfactor+border by bincount*zoomfactor+border and can display some histograms simultanously. The zoomfactor represents the size of one point in the histogram image in pixel units. It can be set via the constructor Histogram(). The Border is fixed to 2 pixel.

For usage, see ExampleHistogram.cpp or call successivly

  • InitHist()

  • AddHist()

  • Draw()

Two styles are possible: point (HIST_POINTS) and bar (HIST_BARS) style. Use SetDrawMode() for choosing a style.

Colors can be set for each histogram via SetColor().

see also ExampleHistogram.cpp

Since Histogram is derived from Image<unsigned char>, any drawing function working on Image<unsigned char> can be used on Histogram as well.

Author:
woelk

Definition at line 76 of file Histogram.hh.

Member Enumeration Documentation

enum BIAS::ImageBase::EColorModel [inherited]

These are the most often used color models.

Enumerator:
CM_invalid | invalid (not set) image format
CM_Grey | gray values (one channel: gray value)
CM_RGB | color values (three channel order: red,green,blue)
CM_BGR | color values (three channel order: blue,green,red)
CM_YUYV422 | YUYV422 (please insert a description).
CM_UYVY422 | (please insert a description)
CM_YUV420P | (please insert a description)
CM_YUV444 | (please insert a description)
CM_YUV411 | (please insert a description)
CM_HSV | HSV (three channel order: hue, sat , value).
CM_HSI_OBS | obsolete, HSI is unused and identical to HSL
CM_DV | DV (please insert a description).
CM_RGBA | RGBA (four channel order: red,green,blue,alpha).
CM_GreyA | Grey (or Gray) plus Alpha channel.
CM_Bayer_RGGB | One channel RGB image Bayer tile.
CM_Bayer_GBRG | One channel RGB image Bayer tile.
CM_Bayer_GRBG | One channel RGB image Bayer tile.
CM_Bayer_BGGR | One channel RGB image Bayer tile.
CM_HSL | similar to HSV but space is a double tipped cone
CM_hsL | similar to HSL but euclidean (h,s) for CNCC
CM_SymTensor2x2 | The image contains a 2x2 symmetric tensor.
CM_BGRA | BGRA (four channel order: blue,green,red,alpha).
CM_RGBE | RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent).

Definition at line 113 of file ImageBase.hh.

enum BIAS::ImageBase::EStorageType [inherited]

Enumerator:
ST_invalid | invalid not set image storage type
ST_unsignedchar | (8bit) unsigned char image storage type
ST_char | (8bit) signed char image storage type
ST_unsignedshortint | (16bit) unsigned integer image storage type
ST_shortint | (16bit) signed integer image storage type
ST_unsignedint | (32bit) unsigned integer image storage type
ST_int | (32bit) signed integer image storage type
ST_float | float image storage type
ST_double | double image storage type

Definition at line 98 of file ImageBase.hh.

Constructor & Destructor Documentation

BIAS::Histogram::Histogram ( unsigned short int zoomfactor = 2 )

Definition at line 41 of file Histogram.cpp.

References _ucBorderColor, _uiBorder, Average_, BinCount_, BinSize_, BIAS::ImageBase::CM_RGB, Color_, BIAS::ImageBase::ColorModel_, Factor_, Hist_, HistCount_, HistSize_, BIAS::ImageBase::InterleavedDataOrder_, MaxBinVal_, MaxHistEntry_, MinBinVal_, NumData_, and ScaleYToMaxEntry_.

BIAS::Histogram::~Histogram ( )

Definition at line 63 of file Histogram.cpp.

References ReleaseHist().

Member Function Documentation

int BIAS::Image< unsigned char >::AboveThresholdToValue | ( | unsigned char | Threshold,
 |  | unsigned char | Value
 | ) | [inherited]

sets alls pixels with values above Threshold to Value

void BIAS::Image< unsigned char >::AbsDiff | ( | const Image< unsigned char > & | im1,
 |  | const Image< unsigned char > & | im2
 | ) | [inherited]

absolut difference

Author:
Felix Woelk

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class DataType>
int BIAS::Histogram::AddHist | ( | vector< DataType > & | data,
 |  | DataType | min,
 |  | DataType | max,
 |  | unsigned int | hist
 | ) |

Definition at line 258 of file Histogram.cpp.

References BIASERR.

template<class DataType>
int BIAS::Histogram::AddHist | ( | vector< DataType > & | data,
 |  | unsigned int | hist
 | ) |

Definition at line 243 of file Histogram.cpp.

References BIASCDOUT, D_HIST_VEC, it, max, and min.

template<>
BIASImage_EXPORT int BIAS::Histogram::AddHist | ( | Image< unsigned char > & | Image,
 |  | unsigned int | hist
 | ) |

Definition at line 212 of file Histogram.cpp.

References BIASERR, BinCount_, BinSize_, CalcAverage_(), BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), Hist_, HistCount_, BIAS::ImageBase::IsEmpty(), MaxBinVal_, MaxHistEntry_, MinBinVal_, and NumData_.

template<class DataType>
int BIAS::Histogram::AddHist | ( | std::vector< DataType > & | data,
 |  | DataType | min,
 |  | DataType | max,
 |  | unsigned int | hist = 0
 | ) |

template<class DataType>
int BIAS::Histogram::AddHist | ( | std::vector< DataType > & | data,
 |  | unsigned int | hist = 0
 | ) |

Calcluates the histogram from data and adds them to the internal data structures.

Minimum and maximum data values are determined automatically and BinCount_ bins are calculated evenspaced between min and max.

Author:
woelk

template<class StorageType>
int BIAS::Histogram::AddHist | ( | Image< StorageType > & | Image,
 |  | unsigned int | hist = 0
 | ) |

calculates the histogram of image and adds them to the internal data structures

Author:
woelk

Definition at line 165 of file Histogram.cpp.

References BIASERR, BinCount_, BinSize_, CalcAverage_(), BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetPixelCount(), Hist_, HistCount_, BIAS::ImageBase::IsEmpty(), max, MaxBinVal_, MaxHistEntry_, min, MinBinVal_, NumData_, and StorageType.

Referenced by main(), and showhistogram().

template<class DataType>
int BIAS::Histogram::AddWeightedHist | ( | vector< DataType > & | data,
 |  | vector< double > & | weight,
 |  | unsigned int | hist
 | ) |

Definition at line 316 of file Histogram.cpp.

References BIASASSERT, BIASERR, max, and min.

template<class DataType>
int BIAS::Histogram::AddWeightedHist | ( | std::vector< DataType > & | data,
 |  | std::vector< double > & | weight,
 |  | unsigned int | hist = 0
 | ) |

for data[i] increase according bin about weight[i]

Author:
woelk

int BIAS::Image< unsigned char >::AppendChannel ( Image< unsigned char > & img ) [inherited]

Append means: RGB + A => RGBA.

int BIAS::Image< unsigned char >::BelowThresholdToValue | ( | unsigned char | Threshold,
 |  | unsigned char | Value
 | ) | [inherited]

sets alls pixels with values below Threshold to Value

double BIAS::Image< unsigned char >::BicubicInterpolation | ( | const double & | x,
 |  | const double & | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !

The subpixel value is obtained by computing a weighted average of the surrounding 4x4 pixel block. The weights are computed by independent x and y-dir cubic polynomials which guarantee constant first order derivatives at the grid positions

Attention:
1.0<=x<Width-2 and 1.0<=y<Height-2 is required but not checked
Author:
koeser 02/2005

double BIAS::Image< unsigned char >::BilinearInterpolation | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.

Author:
Ingo Thomsen
Date:
04.03.2002 tested (only with gray images yet)

double BIAS::Image< unsigned char >::BilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

double BIAS::Image< unsigned char >::BilinearInterpolationGreyMinVal | ( | const double | x,
 |  | const double | y,
 |  | const unsigned char & | minVal
 | ) | const [inline, inherited]

bilinear interpolation pixel value with value check.

If at least one of the input values is <=minVal, then the unknown value minVal is returned, too.

Parameters:
minVal all values <= minVal are invalid/unknown.
Author:
Jan Woetzel 12/2004

double BIAS::Image< unsigned char >::BilinearInterpolationRGBInterleaved | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

double BIAS::Image< unsigned char >::BilinearInterpolationRGBPlanar | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

void BIAS::Image< unsigned char >::BilinearInterpolationShiftRegion | ( | const double & | x,
 |  | const double & | y,
 |  | unsigned int | hws_x,
 |  | unsigned int | hws_y,
 |  | unsigned char * | Buffer
 | ) | [inline, inherited]

sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .

.. (x,y), ... (x-hws, y-hws) You get a window of size (2*hws_x+1)*(2*hws_y+1) which is exactly centered at x,y (a subpixel position) of the original image

Parameters:
Buffer | must have size (2*hws_x+1)*(2*hws_y+1)
hws_x | half window size in x direction
hws_y | half window size in y direction
x | x-center of window
y | y-center of window
Author:
koeser 01/2004

Definition at line 944 of file Image.hh.

void BIAS::Image< unsigned char >::Binarize ( unsigned char Threshold ) [inherited]

sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images

Author:
woelk 01 2003

int BIAS::Image< unsigned char >::BinaryThreshold | ( | unsigned char | Threshold,
 |  | unsigned char | MinValue,
 |  | unsigned char | MaxValue
 | ) | [inherited]

Test for every pixel wether it is >= than the threshold.

If so set to a MaxValue, otherwise to an MinValue.

Author:
Ingo Thomsen
Date:
03/28/2002 tested

int BIAS::Histogram::CalcAverage_ ( unsigned int hist ) [protected]

Definition at line 368 of file Histogram.cpp.

References Average_, BinCount_, and Hist_.

Referenced by AddHist(), and SetBin().

int BIAS::Image< unsigned char >::CalcScaleShift | ( | double | Min,
 |  | double | Max,
 |  | double & | Scale,
 |  | double & | Shift
 | ) | const [inherited]

calculate the values needed by ScaleShiftBetween

void BIAS::Image< unsigned char >::Clear ( const unsigned char value = 0 ) [inline, inherited]

sets all pixels to zero/value

clear all pixels elements and set them to a 'default' value JW 04/2003

Definition at line 233 of file Image.hh.

void BIAS::ImageBase::ClearDataPointer ( ) [inline, inherited]

set data pointer to NULL, such that image IsEmpty _without_ deletion of data.

Author:
evers

Definition at line 560 of file ImageBase.hh.

Referenced by main().

void BIAS::Histogram::CooTransf | ( | double | datacoo[2],
 |  | unsigned | imcoo[2],
 |  | unsigned | hist = 0
 | ) |

transforms data coordinates to image coordinates does automatic clipping and rounding

Definition at line 750 of file Histogram.cpp.

References CooTransf().

void BIAS::Histogram::CooTransf | ( | double | datacoo[2],
 |  | double | imcoo[2],
 |  | unsigned | hist = 0
 | ) |

transforms data coordinates to image coordinates does automatic clipping

Definition at line 734 of file Histogram.cpp.

References _uiBorder, BinSize_, Factor_, HistSize_, MaxBinVal_, MinBinVal_, NumData_, and ScaleYToMaxEntry_.

Referenced by CooTransf(), and main().

void ImageBase::CopyIn_NoInit ( void * data ) [inherited]

Take some data and fill it into the Image.

Warning:
Image must be initialized already !
Author:
Evers

Definition at line 693 of file ImageBase.cpp.

References BIASDOUT, D_COPYIN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), and BIAS::ImageBase::GetPixelCount().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_uEye::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

int ImageBase::Cut2ROI ( ) [inherited]

reduces image to current ROI, !!! image size changes !!!

Author:
Felix Woelk untested
Todo:
Make it work on colored Images

Definition at line 556 of file ImageBase.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ROI::Resize(), BIAS::ImageBase::UnsetROI(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Histogram::DeleteHist_ ( unsigned int hist ) [protected]

Definition at line 556 of file Histogram.cpp.

References Color_, BIAS::ImageBase::GetChannelCount(), BIAS::Image< unsigned char >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and r.

Referenced by RedrawHist_().

bool ImageBase::DimensionMatch ( const BIAS::ImageBase & other ) const [inherited]

Returns:
true if the image dimension w x h of this and other match = are equal
Author:
JW

Definition at line 845 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

int ImageBase::Display ( ) [inherited]

display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.

This signature is required because MSVS debugger does not support default params.

Author:
Jan Woetzel

Definition at line 1221 of file ImageBase.cpp.

References DEFAULT_32to8_scale, and DEFAULT_Display_delay.

Referenced by BIAS::ImageBase::Display().

int ImageBase::Display | ( | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec = DEFAULT_Display_delay,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

interface for the above

Author:
Jan Woetzel 2005

Definition at line 1211 of file ImageBase.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and BIAS::ImageBase::Display().

int ImageBase::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

display image as popup to screnn sing OpenCv IplImage usign Highgui functions.

Very useful to easily display in aimge, e.g. for debugging.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 1193 of file ImageBase.cpp.

References BIAS::WrapBias2Ipl::Display().

Referenced by main().

int BIAS::Histogram::Draw ( )

actually draws histogram(s) from the internal data structures

Definition at line 590 of file Histogram.cpp.

References _ucBorderColor, _uiBorder, DrawHist_(), Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), HistCount_, and MaxHistEntry_.

Referenced by main(), and showhistogram().

int BIAS::Histogram::DrawHist_ ( unsigned int hist ) [protected]

Definition at line 400 of file Histogram.cpp.

References _uiBorder, Average_, BIASABORT, BIASERR, BinCount_, Color_, Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), Hist_, BIAS::HIST_BARS, BIAS::HIST_LINES, BIAS::HIST_POINTS, HistSize_, MaxHistEntry_, Mode_, NumData_, and ScaleYToMaxEntry_.

Referenced by Draw(), and RedrawHist_().

int BIAS::Histogram::DrawHistLog_ ( unsigned int hist ) [protected]

Definition at line 477 of file Histogram.cpp.

References _uiBorder, Average_, BIASABORT, BIASERR, BinCount_, Color_, Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), Hist_, BIAS::HIST_BARS, BIAS::HIST_LINES, BIAS::HIST_POINTS, HistSize_, MaxHistEntry_, Mode_, NumData_, and ScaleYToMaxEntry_.

Referenced by DrawLog().

int BIAS::Histogram::DrawLog ( )

actually draws histogram(s) from the internal data structures uses a logarithmic y axis

Definition at line 613 of file Histogram.cpp.

References _ucBorderColor, _uiBorder, DrawHistLog_(), Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), and HistCount_.

void BIAS::Histogram::Dump ( std::ostream & os = std::cout )

unsigned char BIAS::Image< unsigned char >::FastBilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below

Author:
woelk 01 2003

Definition at line 880 of file Image.hh.

void BIAS::Image< unsigned char >::FillImageWithConstValue ( unsigned char Value[] ) [inherited]

fill color images

void BIAS::Image< unsigned char >::FillImageWithConstValue ( unsigned char Value ) [inherited]

fill grey images

Referenced by BIAS::Histogram2D::InitHist(), InitHist(), and ZeroHist().

void BIAS::Image< unsigned char >::FillImageWithXValue ( ) [inherited]

fills image with value depending on x coordinate

int ImageBase::Flip ( ) [inherited]

flips the image vertically (row order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
Daniel Grest
Date:
Jun 2002 Interleaved tested, planar untested Aug 2002: Jan-Friso Evers: fixed interleaved for float and other

Definition at line 700 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by BIAS::ThreeDOut::AddTriangleMesh(), MyFrame::OnTimer(), BIAS::ImageBase::PadToPowerOfTwoAndFlip(), and BIAS::OpenGLCanvasBase::ScreenShot().

int ImageBase::FlipHorizontal ( ) [inherited]

flips the image horizontal (column order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
woelk 10/2004

Definition at line 744 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

double BIAS::Histogram::GetBin | ( | unsigned int | bin,
 |  | unsigned int | hist = 0
 | ) |

Get the counted number of bin from hist, -1 for invalid bin/hist.

Definition at line 635 of file Histogram.cpp.

References BinCount_, Hist_, and HistCount_.

unsigned int BIAS::Histogram::GetBinCount ( ) [inline]

Definition at line 86 of file Histogram.hh.

unsigned int BIAS::ImageBase::GetBitDepth ( ) const [inline, inherited]

returns the bits per channel, which is not necessairily 8*sizeof(StorageType).

Author:
woelk 12/2004

Definition at line 235 of file ImageBase.hh.

Referenced by BIAS::ImgObjGL::GetGLInternalFormat(), MainFrame::OnInfo(), and BIAS::ImageBase::Pad().

int ImageBase::GetChannel | ( | ImageBase & | source,
 |  | unsigned int | channel
 | ) | [inherited]

copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB

Author:
Felix Woelk untested (17/04/2002)

Definition at line 337 of file ImageBase.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::IsPlanar().

int ImageBase::GetChannelcount ( const enum BIAS::ImageBase::EColorModel & colormodel ) [static, inherited]

get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1153 of file ImageBase.cpp.

References BIASERR, BIASWARN, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_RGBA.

unsigned int BIAS::ImageBase::GetChannelCount ( ) const [inline, inherited]

returns the number of Color channels, e.g.

RGB 3

the value returned is independent of the StorageType

Definition at line 252 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), AddHist(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::CalcScaleShift(), castchar(), castfloat(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImageBase::Cut2ROI(), DeleteHist_(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), Draw(), BIAS::SphericalUndistortion::DrawCircles(), DrawHist_(), DrawHistLog_(), BIAS::Histogram2D::DrawLog(), DrawLog(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::ImageIO::ExportMagickPP(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageDraw< StorageType >::InterpolatedLine(), BIAS::ImageDraw< StorageType >::Line(), LoadImage(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Image< StorageType >::ScaleShift(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), and BIAS::PMDImageProc::Write().

enum EColorModel BIAS::ImageBase::GetColorModel ( ) const [inline, inherited]

Definition at line 270 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), ComputeCutoutImage(), BIAS::ImageConvert::Convert(), BIAS::ColorHarris::CreateSTColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::ImageIO::ExportMagickPP(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), main(), MainFrame::OnInfo(), BIAS::ImageBase::operator=(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageBase::GetCopyOfROI ( ImageBase & copy ) const [inherited]

returns a copy of ROI (a new image) lower right point excluded, only interleaved images !

Author:
Felix Woelk, grest untested

Definition at line 484 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Release(), and BIAS::ImageBase::SetColorModel().

int ImageBase::GetCopyOfROI2 ( ImageBase & copy ) const [inherited]

like GetCopyOfROI, but with lower right point included only interleaved images !

Note:
GetCopyOfROI returns an image where the lower right ROI point is not included. This version does it. Correction are not made in the original method, because extensive corrections would become necessary in other methods.
Author:
Ingo Thomsen

Definition at line 451 of file ImageBase.cpp.

References BIASABORT, and BIASERR.

void BIAS::Histogram::GetDataRange | ( | double & | min,
 |  | double & | max,
 |  | unsigned int | hist = 0
 | ) | [inline]

returns the range of the histogram, i.e.

the data value associated with bin[0] and bin[bincount-1]

Definition at line 144 of file Histogram.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int BIAS::ImageBase::GetDepth ( ) const [inline, inherited]

returns the bytes per channel, which is the sizeof(StorageType)

Definition at line 229 of file ImageBase.hh.

Referenced by BIAS::ImageBase::CopyIn_NoInit(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPP(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::ImageBase::Pad(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::ImageBase::SetOutsideROIZero().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::ImageBase::GetHeight ( ) const [inline, inherited]

Definition at line 225 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), DrawHist_(), DrawHistLog_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), MainFrame::FitSizetIfTooSmall(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::Histogram::GetHistCount ( ) [inline]

Definition at line 89 of file Histogram.hh.

void* BIAS::ImageBase::GetImageData ( ) [inline, inherited]

Definition at line 205 of file ImageBase.hh.

unsigned char * BIAS::Image< unsigned char >::GetImageData ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 127 of file Image.hh.

Referenced by DeleteHist_().

unsigned char ** BIAS::Image< unsigned char >::GetImageDataArray ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 133 of file Image.hh.

Referenced by BIAS::Histogram2D::Draw(), Draw(), DrawHist_(), DrawHistLog_(), BIAS::Histogram2D::DrawLog(), and DrawLog().

void BIAS::Histogram::GetMaxHistEntry | ( | double & | maxentry,
 |  | unsigned int | hist = 0
 | ) | [inline]

returns the biggest bin in histogram hist

Definition at line 148 of file Histogram.hh.

unsigned char BIAS::Image< unsigned char >::GetMaxPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.

Author:
Felix Woelk

void BIAS::Image< unsigned char >::GetMeanPixelValue ( unsigned char mean[] ) [inherited]

Author:
woelk 08/2004

MetaData* BIAS::ImageBase::GetMetaData ( ) [inline, inherited]

Definition at line 301 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::Image< unsigned char >::GetMinMaxPixelValue | ( | unsigned char & | min,
 |  | unsigned char & | max,
 |  | unsigned short int | channel = 0,
 |  | unsigned int * | mincoo = NULL,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.

all other channels are ignored during the search. Returns the first occurance of min/max pixelvalue, if they occure multiple times.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value if mincoo or maxcoo !=NULL, also stores the location of min resp. max, works slow on woelk 10/2004 ( Examples/ExampleMinMax.cpp )
Author:
Jan Frahm, woelk 01/2003, woelk 10/2004

bool BIAS::Image< unsigned char >::GetMinMaxPixelValueIgnoreRange | ( | unsigned char & | min,
 |  | unsigned char & | max,
 |  | const unsigned char | ignoreStart = 0,
 |  | const unsigned char | ignoreEnd = 0,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Get both, minimal and maximal pixel value --actual implementation only for planar images--.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value
ignoreStart,ignoreEnd | define teh range of values to be ignored
channel | to be searched fro multi-channel images
Returns:
true if a value within raneg was found, else false
Author:
Jan Woetzel 01/2003

unsigned char BIAS::Image< unsigned char >::GetMinPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.

Author:
Felix Woelk

unsigned long int BIAS::ImageBase::GetPixelCount ( ) const [inline, inherited]

returns number of pixels in image

Definition at line 277 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::AboveThresholdToValue(), AddHist(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::ImageBase::CopyIn_NoInit(), DeleteHist_(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::ImageBase::GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ROI::SetMaskImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

unsigned char & BIAS::Image< unsigned char >::GetPixelNearestNeighbor | ( | const float | x,
 |  | const float | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.

Author:
Ingo Thomsen
Date:
03/28/2002 tested (only with interleaved gray images)

unsigned char & BIAS::Image< unsigned char >::GetPixelNearestNeighbor | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given double coordinates.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved grey images)

unsigned int BIAS::ImageBase::GetPixelPosition | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned short int | channel = 0
 | ) | const [inline, inherited]

returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).

Changed this method to return position in StorageType Jan-Friso Evers

Definition at line 770 of file ImageBase.hh.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

void ImageBase::GetROI | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 899 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

void ImageBase::GetROI | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 887 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

const ROI* BIAS::ImageBase::GetROI ( ) const [inline, inherited]

Definition at line 358 of file ImageBase.hh.

ROI* BIAS::ImageBase::GetROI ( ) [inline, inherited]

Returns a pointer to the roi object.

Author:
woelk 07/2005

Definition at line 355 of file ImageBase.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::ImageBase::Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), main(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::PrintROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageBase::UnsetROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void ImageBase::GetROICorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 904 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

void ImageBase::GetROICorners | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 892 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), and BIAS::Image< StorageType >::operator/=().

const unsigned int ImageBase::GetROILowerRightX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 931 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROILowerRightY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 938 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 917 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 924 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

int ImageBase::GetSize ( const enum BIAS::ImageBase::EStorageType & storagetype ) [static, inherited]

get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1120 of file ImageBase.cpp.

References BIASBREAK, BIASERR, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedint.

unsigned int BIAS::ImageBase::GetSize ( ) const [inline, inherited]

returns the image size in bytes = count - NOT the dimension

Definition at line 239 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and MainFrame::OnInfo().

enum EStorageType BIAS::ImageBase::GetStorageType ( ) const [inline, inherited]

Definition at line 273 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::Convert(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoSource::InitImage(), main(), BIAS::GuiGTK::MouseMotionCallback_(), MainFrame::OnInfo(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ImageBase::Pad(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), Scale(), BIAS::ROI::SetMaskImage(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::PMDImageProc::Write().

const BIAS::UUID& BIAS::ImageBase::GetUID ( ) const [inline, inherited]

returns the UUID of the image

Examples:
ExampleImageLoad.cpp.

Definition at line 298 of file ImageBase.hh.

Referenced by main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

int BIAS::ImageBase::GetVersionNumber ( ) const [inline, inherited]

Definition at line 307 of file ImageBase.hh.

Referenced by MainFrame::OnInfo(), and BIAS::operator<<().

unsigned int BIAS::ImageBase::GetWidth ( ) const [inline, inherited]

Definition at line 222 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::WrapBias2Ipl::Consistent(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), MainFrame::FitSizetIfTooSmall(), BIAS::ImageBase::Flip(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::ImageBase::GetWidthStep ( ) const [inline, inherited]

returns the number of bytes per line

returns the number of bytes per line, not the number of StorageTypes

interleaved data order: = Width * Depth * ChannelCount planar data order: = Width * Depth

Useful for memory aligned images (e.g. 4/8 Byte) and packing of textures. JW

Definition at line 267 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Histogram2D::Draw(), Draw(), BIAS::Histogram2D::DrawLog(), DrawLog(), and BIAS::ImageBase::SetOutsideROIZero().

BIAS::Image< unsigned char >::Image ( const ImageBase & im ) [explicit, inherited]

create image from imagebase.

this is a dangerous operation and must therefore not be used by implicit conversion. That means, you can manually convert ImageBase->Image, but you cannot pass an Image<float> where Image<char> is expected.

Definition at line 90 of file Image.cpp.

References BIASABORT, BIASERR, BIASGDOUT, BIAS::ImageBase::BitDepth_, D_IMAGE_TRACE, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

BIAS::Image< unsigned char >::Image | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | const bool | interleaved = true
 | ) | [inherited]

constructor with size and channels allocates image data

Definition at line 150 of file Image.cpp.

References BIASGDOUT, D_IMAGE_TRACE, BIAS::ImageBase::Init(), BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

BIAS::Image< unsigned char >::Image ( ) [inherited]

Definition at line 49 of file Image.cpp.

References BIASGDOUT, BIAS::ImageBase::BitDepth_, D_IMAGE_TRACE, BIAS::ImageBase::Depth_, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

void ImageBase::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

Initialize image size and channels.

Warning:
call this only for empty images, calls new for the image data array. Overwrites the color model with some kind of best guess
Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes

Definition at line 117 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ROI::Resize(), BIAS::ImageBase::Roi_, BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, StorageType, BIAS::ImageBase::StorageType_, BIAS::ROI::UnsetROI(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

void BIAS::Image< unsigned char >::Init | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

calls Init from ImageBase storageType is ignored, just dummy argument

Referenced by BIAS::Histogram2D::InitHist(), and InitHist().

int BIAS::Histogram::InitHist | ( | unsigned int | bincount = 256,
 |  | unsigned int | histcount = 1
 | ) |

reserves the internal data structures for histcount histograms with bincount bins in each in one image

Author:
woelk

Definition at line 95 of file Histogram.cpp.

References _uiBorder, Average_, BinCount_, BinSize_, Color_, Factor_, BIAS::Image< unsigned char >::FillImageWithConstValue(), Hist_, HistCount_, HistSize_, BIAS::Image< unsigned char >::Init(), MaxBinVal_, MaxHistEntry_, MinBinVal_, NumData_, and ReleaseHist().

Referenced by main(), SetBinCount(), SetFactor(), SetHistCount(), and showhistogram().

int BIAS::Image< unsigned char >::InitWithForeignData | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | void * | data,
 |  | const bool | interleaved = true
 | ) | [inherited]

This is used to construct a BIAS::Image hull around existing image data.

Be sure to ClearDataPointer() _before_ destructing the Image object to avoid deletion of the data array

Author:
evers

double BIAS::Image< unsigned char >::InterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

interpolation with weights according to distances to x and y

void BIAS::ImageBase::InvalidateUID ( ) [inline, inherited]

sets the image's uid to invalid

Definition at line 341 of file ImageBase.hh.

References BIAS::UUID::Invalidate().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::ImageIO::ImportOpenEXR().

bool BIAS::ImageBase::IsEmpty ( ) const [inline, inherited]

check if ImageData_ points to allocated image buffer or not

Definition at line 177 of file ImageBase.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AbsDiff(), AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), deflate_JPEG_file(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::ImageConvert::FromInterleaved(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ColorSegmentation::GetGreyImage(), BIAS::ColorSegmentation::GetHueImage(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ColorSegmentation::GetSatImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::VideoSource::InitImage(), BIAS::ImageConvert::Ipl2BIAS(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), mirror(), BIAS::ImageBase::operator=(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::PMDImageProc::Read(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageBase::Release(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), MainFrame::SaveUnVignetted(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::StealImage(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::PMDImageProc::Write().

bool BIAS::Histogram::IsEmpty ( )

returns true if MaxHistEntry==0 for all histograms

Author:
woelk 10/2004

Definition at line 682 of file Histogram.cpp.

References HistCount_, and MaxHistEntry_.

const bool BIAS::ImageBase::IsInROI | ( | double & | x,
 |  | double & | y
 | ) | const [inline, inherited]

Definition at line 419 of file ImageBase.hh.

bool BIAS::ImageBase::IsInterleaved ( ) const [inline, inherited]

Definition at line 313 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), mytoplanar(), MainFrame::OnInfo(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2().

bool BIAS::ImageBase::IsPlanar ( ) const [inline, inherited]

Definition at line 310 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageConvert::Convert(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageConvert::IP_RGBToGrey_(), MainFrame::OnInfo(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

bool BIAS::ImageBase::IsPositionInImage | ( | const int & | x,
 |  | const int & | y
 | ) | const [inline, inherited]

check if image contains that pixel position

Definition at line 781 of file ImageBase.hh.

Referenced by BIAS::EpipolarLine::DrawWhole().

bool ImageBase::IsPowerOfTwoSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [static, inherited]

Definition at line 810 of file ImageBase.cpp.

bool ImageBase::IsPowerOfTwoSize ( ) const [inherited]

Returns:
true if image size is a power of two JW

Definition at line 800 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::ImgObjGL::CreateGLTexture(), and BIAS::ImageCanvasGLBase::ValidTexobj().

double BIAS::Image< unsigned char >::LinearInterpolation | ( | const double | x,
 |  | const unsigned int | y
 | ) | const [inline, inherited]

double BIAS::Image< unsigned char >::LinearInterpolation | ( | const unsigned int | x,
 |  | const double | y
 | ) | const [inline, inherited]

unsigned char BIAS::Image< unsigned char >::MaxSTValue ( ) [inline, inherited]

returns the maximal possible StorageType

Definition at line 577 of file Image.hh.

unsigned char BIAS::Image< unsigned char >::MinSTValue ( ) [inline, inherited]

returns the minimal possible StorageType

Definition at line 626 of file Image.hh.

int BIAS::ImageBase::MoveToClosestPositionInImage | ( | int & | x,
 |  | int & | y
 | ) | const [inline, inherited]

find closest valid pixel position to x,y

Author:
koeser 01/2005
Returns:
0=was correct 3,4=y out of range, 1,2 x out of range

Definition at line 785 of file ImageBase.hh.

Image<unsigned char > BIAS::Image< unsigned char >::operator * ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator * operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator * ( const unsigned char & argimage ) [inherited]

Binary operator * operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator *= ( const Image< unsigned char > & argimage ) [inherited]

Operator *= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator *= ( const unsigned char & argimage ) [inherited]

Operator *= with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator+ ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator + operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator+ ( const unsigned char & argimage ) [inherited]

Binary operator + operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator+= ( const Image< unsigned char > & argimage ) [inherited]

Operator += operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator+= ( const unsigned char & argimage ) [inherited]

Operator += with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator- ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator - operating pixel values with pixel values of another image, returning a new image.

Author:
Ingo Thomsen tested (18/04/2002)

Image<unsigned char > BIAS::Image< unsigned char >::operator- ( const unsigned char & argimage ) [inherited]

Binary operator - operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator-= ( const Image< unsigned char > & argimage ) [inherited]

Operator -= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator-= ( const unsigned char & argimage ) [inherited]

Operator -= with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator/ ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator / operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator/ ( const unsigned char & argimage ) [inherited]

Binary operator / operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator/= ( const Image< unsigned char > & argimage ) [inherited]

Operator /= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator/= ( const unsigned char & argimage ) [inherited]

Operator /= with scalar on pixel values of an image.

bool BIAS::ImageBase::operator== ( const ImageBase & img ) [inline, inherited]

comparison operator, based upon the adresses of the actual image data

Author:
Ingo Thomsen tested

Definition at line 449 of file ImageBase.hh.

References BIAS::ImageBase::GetImageData().

Image< unsigned char > & BIAS::Image< unsigned char >::operator| ( const Image< unsigned char > & argimage ) [inherited]

logical Operator || operating pixel values with pixel values of another image, returning a new image

Definition at line 566 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

int ImageBase::Pad | ( | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | [inherited]

Definition at line 1007 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageBase::Pad().

int ImageBase::Pad | ( | BIAS::ImageBase & | dest,
 |  | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | const [inherited]

Definition at line 1032 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageBase::SetBitDepth().

Referenced by BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::ZeroPad().

int ImageBase::PadToPowerOfTwo ( const int & padVal = 0 ) [inherited]

in place version of the above

Author:
JW

Definition at line 956 of file ImageBase.cpp.

References img, BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

int ImageBase::PadToPowerOfTwo | ( | BIAS::ImageBase & | dest,
 |  | const int & | padVal = 0
 | ) | const [inherited]

increase the size of this image to next power of two (e.g.

384x100>512x128) the original image S is set to upper left rectangle

Parameters:
padVal used by memset to pad the right and lower added pixels No scale, just padding!
    orig xx
    xxxxxxx
Author:
Jan Woetzel 09/2003 - 11/2005

Definition at line 979 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::Pad(), and BIAS::ImageBase::PowerOfTwoSize().

Referenced by BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PadToPowerOfTwoAndFlip().

int ImageBase::PadToPowerOfTwoAndFlip ( const int & padVal = 0 ) [inherited]

first pad, then flip.

useful for OpenGL texture image which must be pow2 size and Y-flipped ics. example:

    0 1 2
    3 4 5
    -->
    x x x x
    x x x x
    3 4 5 x
    0 1 2 x
Todo:
more efficient in place with memmove
Author:
Jan Woetzel

Definition at line 1105 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::Flip(), and BIAS::ImageBase::PadToPowerOfTwo().

int ImageBase::Paste2ROI ( const ImageBase & Image ) [inherited]

paste Image to current ROI

Author:
Felix Woelk 02 2003

Definition at line 519 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

Referenced by main(), and BIAS::ImageConvertThreaded::MergeImage_().

unsigned char BIAS::Image< unsigned char >::PixelValue | ( | const unsigned int | x,
 |  | const unsigned int | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved image)

void * ImageBase::PixelValueBase | ( | unsigned | x,
 |  | unsigned | y,
 |  | unsigned | channel = 0
 | ) | [inherited]

Definition at line 852 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

unsigned char BIAS::Image< unsigned char >::PixelValueInterleaved | ( | const int | x,
 |  | const int | y,
 |  | const int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Faster than PixelValue because it has no error check, works only for interleaved images

Author:
Johan Skoglund
Date:
06/10/2004 untested

bool ImageBase::PowerOfTwoSize | ( | unsigned int & | width2,
 |  | unsigned int & | height2
 | ) | const [inherited]

Returns:
true if both, width and height are already a power of two. The next power of two size >= actual size is computed and stored in args. useful for OpenGL texture enlargement for 'power of two' textures.
Author:
Jan Woetzel 09/2003

Definition at line 821 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::PowerOfTwoSize().

unsigned int ImageBase::PowerOfTwoSize ( const unsigned int & val ) [static, inherited]

Returns:
next pow2 >= val JW

Definition at line 831 of file ImageBase.cpp.

References res.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

std::ostream& BIAS::Image< unsigned char >::PrintData ( std::ostream & os ) const [inherited]

writes data of IplImage_ to os (ascii)

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::ImageBase::PrintHeader ( std::ostream & os = std::cout ) const [inherited]

Referenced by BIAS::ImageIO::ImportMagickPP(), main(), and mainloop().

std::ostream& BIAS::Image< unsigned char >::PrintPointer ( std::ostream & os ) const [inherited]

writes pointer of IplImage_ to os (ascii)

void ImageBase::PrintROI ( std::ostream & os = std::cout ) const [inherited]

deprecated, use 'os << *GetROI()'

Definition at line 912 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

Image<float> BIAS::Image< unsigned char >::Reciprocal | ( | const float | factor = 1.0,
 |  | const unsigned short int | channel = 0
 | ) | [inherited]

Jan Woetzel 01/2003.

Returns:
the reciprocal for each pixel: x' = 1/x computes for exactly one channel (in case of multi channel images) returns float/double image
Author:
Jan Woetzel 01/2003

void BIAS::ImageBase::RedirectImageDataPointer ( void * data ) [inline, inherited]

This method takes data and set the internal image data pointer to this.

You should really know what you are doing using this method. Don't say you haven't been warned.

Author:
Friso Evers

Definition at line 549 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

int BIAS::Histogram::RedrawHist_ ( unsigned int hist ) [protected]

Definition at line 394 of file Histogram.cpp.

References DeleteHist_(), and DrawHist_().

void BIAS::Image< unsigned char >::Release ( ) [inherited]

reimplemented from ImageBase

Reimplemented from BIAS::ImageBase.

Referenced by BIAS::Histogram2D::_ReleaseHist(), and ReleaseHist().

int BIAS::Histogram::ReleaseHist ( )

releases internal data structures (Hist_)

Definition at line 143 of file Histogram.cpp.

References Average_, BinSize_, Color_, Hist_, HistCount_, MaxBinVal_, MaxHistEntry_, MinBinVal_, NumData_, and BIAS::Image< unsigned char >::Release().

Referenced by InitHist(), and ~Histogram().

void BIAS::ImageBase::ReleaseImageDataPointer ( ) [inline, inherited]

Releases ImageData_ (to be used together with RedirectImageDataPointer).

Author:
Felix woelk

Definition at line 761 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::ImageBase::SamePixelAndChannelCount ( const ImageBase & Image ) const [inline, inherited]

checks if data area has same "size" as Image of other type

Definition at line 749 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::VideoSource_Net::GrabSingle(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::Label4Neighbour(), main(), mytoplanar(), BIAS::ImageBase::operator=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Label::Process(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB(), and BIAS::ImageConvert::ToPlanar().

int BIAS::Image< unsigned char >::ScaleShift | ( | double | Scale,
 |  | double | Shift
 | ) | [inherited]

scales and shifts image (all channels simultanously)

does scale and shift every channel with same factor so that (max of all channels) = Max and (min of all channels) = Min. First shifts, then scales.

Author:
Felix Woelk

int BIAS::Image< unsigned char >::ScaleShiftBetween | ( | double | Min,
 |  | double | Max
 | ) | [inherited]

scales and shifts image so afterwards every pixel has a value between Min and Max

scales and shifts every channel with same factor

Author:
Felix Woelk

int BIAS::Histogram::SetBin | ( | unsigned int | bin,
 |  | double | value,
 |  | unsigned int | hist = 0
 | ) |

Set the counted number of bin from hist to manipulate the histogram.

Definition at line 641 of file Histogram.cpp.

References BinCount_, CalcAverage_(), Hist_, HistCount_, and MaxHistEntry_.

void BIAS::Histogram::SetBinCount ( unsigned int bincount )

resizes Hist_

Definition at line 80 of file Histogram.cpp.

References BinCount_, HistCount_, and InitHist().

void BIAS::ImageBase::SetBitDepth ( unsigned bitdepth ) [inline, inherited]

needed by ImageIO

Definition at line 334 of file ImageBase.hh.

References BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR(), and BIAS::ImageBase::Pad().

int BIAS::Histogram::SetColor | ( | unsigned char | R,
 |  | unsigned char | G,
 |  | unsigned char | B,
 |  | unsigned int | hist = 0
 | ) |

Definition at line 575 of file Histogram.cpp.

References BIASERR, Color_, and HistCount_.

Referenced by main(), and showhistogram().

void BIAS::ImageBase::SetColorModel ( EColorModel Model ) [inline, inherited]

Definition at line 327 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), createst(), createst2(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageBase::Init(), main(), mytoplanar(), BIAS::PMDImageProc::Read(), BIAS::ImageConvert::ToHSL(), and BIAS::ImageConvert::ToInterleavedRGB_().

void BIAS::Histogram::SetColorModel ( )

dummy function to avoid swapping color model in this class

Definition at line 74 of file Histogram.cpp.

References BIASERR.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::Histogram::SetDrawMode ( HistMode m ) [inline]

Select drawing style. Default is HIST_POINTS.

Definition at line 100 of file Histogram.hh.

Referenced by main(), and showhistogram().

void BIAS::Histogram::SetFactor ( unsigned short Factor )

Todo:
factor also scales the y axis, this is most probably not desired

Definition at line 68 of file Histogram.cpp.

References BinCount_, Factor_, HistCount_, and InitHist().

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Histogram::SetHistCount ( unsigned int histcount )

Reserves internal data structures for histcount histograms.

Definition at line 88 of file Histogram.cpp.

References BinCount_, HistCount_, and InitHist().

void BIAS::ImageBase::SetInterleaved ( bool interleaved ) [inline, inherited]

Definition at line 330 of file ImageBase.hh.

void BIAS::ImageBase::SetMetaData ( const MetaData & m ) [inline, inherited]

Definition at line 304 of file ImageBase.hh.

void ImageBase::SetOutsideROIZero ( ) [inherited]

sets all pixel not in ROI to zero

Author:
woelk 10/2004

Definition at line 585 of file ImageBase.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::GetWidthStep().

Referenced by main().

void BIAS::Image< unsigned char >::SetPixel | ( | const unsigned char & | value0,
 |  | const unsigned char & | value1,
 |  | const unsigned char & | value2,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y
 | ) | [inline, inherited]

set the values of the first three channels of a given pixel (x,y) in channel to value[0.

.2].

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

void BIAS::Image< unsigned char >::SetPixel | ( | const unsigned char & | value,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y,
 |  | const unsigned short int | channel = 0
 | ) | [inline, inherited]

set the value of a given pixel (x,y) in channel to value.

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

int ImageBase::SetROI | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

deprecated, use SetROICorners()

Definition at line 866 of file ImageBase.cpp.

References BIAS::ImageBase::SetROICorners().

Referenced by BIAS::ThreeDOut::AddImage(), BIAS::ImageConvert::BayerToRGBSlow_(), main(), mysobel(), mysobel2(), and BIAS::VideoSource::SoftwareWhiteBalance().

int ImageBase::SetROICorners | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

Definition at line 873 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by main(), and BIAS::ImageBase::SetROI().

void BIAS::Histogram::SetScaleYToMaxEntry ( bool s ) [inline]

if true, the upper border of histogram is MaxHistEntry, otherwise the upper border of histogram k is Hist[k][i] = NumData_[k]

Definition at line 153 of file Histogram.hh.

void BIAS::ImageBase::SetUID ( const BIAS::UUID & id ) [inline, inherited]

Definition at line 337 of file ImageBase.hh.

Referenced by BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::ProcessOneImage(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::ImageBase::SetZero ( ) [inline, inherited]

zeroes the image

Definition at line 754 of file ImageBase.hh.

Referenced by main().

int ImageBase::StealImage ( ImageBase & source ) [inherited]

steals the image data array from source, after releasing the actual image data and sets source image data to NULL

Warning:
Important for template: Steal images only, if u know the storageTypes are euqal!
Author:
Daniel Grest tested

Definition at line 304 of file ImageBase.cpp.

References BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::ImageConvert::Convert(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), and BIAS::ImageConvert::ToGrey().

void ImageBase::UnsetROI ( ) [inherited]

deprecated, use GetROI()->UnsetROI()

Definition at line 882 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::UnsetROI().

Referenced by BIAS::ImageBase::Cut2ROI(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

int ImageBase::UpdateImageDataArrayFromImageData_ ( ) [protected, inherited]

recomputes pointer array returned by GetImageDataArray

Definition at line 230 of file ImageBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), and BIAS::ImageBase::Init().

int BIAS::Histogram::WriteASCII ( const std::string & filename )

opens file and calls WriteASCII() with it

Definition at line 691 of file Histogram.cpp.

References BIASERR, and WriteASCII().

void BIAS::Histogram::WriteASCII ( std::ostream & os = std::cout )

writes ascii data to stream, can be used later e.g. with gnuplot

Referenced by WriteASCII().

int BIAS::Histogram::ZeroHist ( unsigned int hist = 0 )

zeros existing histogram

Definition at line 381 of file Histogram.cpp.

References Average_, BinCount_, BinSize_, BIAS::Image< unsigned char >::FillImageWithConstValue(), Hist_, MaxBinVal_, MaxHistEntry_, MinBinVal_, and NumData_.

int ImageBase::ZeroPad | ( | const unsigned int | newwidth,
 |  | const unsigned int | newheight,
 |  | unsigned char | bgcolor = 0
 | ) | [inherited]

backward compatibility interface for Pad.

DEPRECATED

Author:
Jan Woetzel 2005

Definition at line 947 of file ImageBase.cpp.

References BIAS::ImageBase::Pad().

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img
 | ) | [friend, inherited]

Definition at line 1234 of file ImageBase.cpp.

BIASImageBase_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) | [friend, inherited]

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

MetaData BIAS::ImageBase::_MetaData [protected, inherited]

additional data block, handled by derived classes

Definition at line 679 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned char BIAS::Histogram::_ucBorderColor [protected]

Definition at line 203 of file Histogram.hh.

Referenced by Draw(), DrawLog(), and Histogram().

unsigned int BIAS::Histogram::_uiBorder [protected]

Definition at line 202 of file Histogram.hh.

Referenced by CooTransf(), Draw(), DrawHist_(), DrawHistLog_(), DrawLog(), Histogram(), and InitHist().

BIAS::UUID BIAS::ImageBase::_UID [protected, inherited]

unique id for every image

Definition at line 677 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), and BIAS::operator>>().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double* BIAS::Histogram::Average_ [protected]

Definition at line 200 of file Histogram.hh.

Referenced by CalcAverage_(), DrawHist_(), DrawHistLog_(), Histogram(), InitHist(), ReleaseHist(), and ZeroHist().

unsigned int BIAS::Histogram::BinCount_ [protected]

Definition at line 193 of file Histogram.hh.

Referenced by AddHist(), CalcAverage_(), DrawHist_(), DrawHistLog_(), GetBin(), Histogram(), InitHist(), SetBin(), SetBinCount(), SetFactor(), SetHistCount(), and ZeroHist().

double * BIAS::Histogram::BinSize_ [protected]

Definition at line 204 of file Histogram.hh.

Referenced by AddHist(), CooTransf(), Histogram(), InitHist(), ReleaseHist(), and ZeroHist().

unsigned int BIAS::ImageBase::BitDepth_ [protected, inherited]

relevant bits per pixel per channel

Definition at line 661 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::ChannelCount_ [protected, inherited]

number of channels per pixel

Definition at line 657 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned char** BIAS::Histogram::Color_ [protected]

Definition at line 195 of file Histogram.hh.

Referenced by DeleteHist_(), DrawHist_(), DrawHistLog_(), Histogram(), InitHist(), ReleaseHist(), and SetColor().

enum EColorModel BIAS::ImageBase::ColorModel_ [protected, inherited]

the color model of the pixels

Definition at line 653 of file ImageBase.hh.

Referenced by Histogram(), BIAS::ImageBase::ImageBase(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::Depth_ [protected, inherited]

size of one channel of one pixel in bytes

Definition at line 659 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned short int BIAS::Histogram::Factor_ [protected]

Definition at line 199 of file Histogram.hh.

Referenced by CooTransf(), Draw(), DrawHist_(), DrawHistLog_(), DrawLog(), Histogram(), InitHist(), and SetFactor().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ImageBase::Height_ [protected, inherited]

image height in pixels

Definition at line 665 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

double** BIAS::Histogram::Hist_ [protected]

Definition at line 194 of file Histogram.hh.

Referenced by AddHist(), CalcAverage_(), DrawHist_(), DrawHistLog_(), GetBin(), Histogram(), InitHist(), ReleaseHist(), SetBin(), and ZeroHist().

unsigned short int BIAS::Histogram::HistCount_ [protected]

Definition at line 192 of file Histogram.hh.

Referenced by AddHist(), Draw(), DrawLog(), GetBin(), Histogram(), InitHist(), IsEmpty(), ReleaseHist(), SetBin(), SetBinCount(), SetColor(), SetFactor(), and SetHistCount().

unsigned int BIAS::Histogram::HistSize_ [protected]

Definition at line 196 of file Histogram.hh.

Referenced by CooTransf(), DrawHist_(), DrawHistLog_(), Histogram(), and InitHist().

void* BIAS::ImageBase::ImageData_ [protected, inherited]

a pointer to the image data

Definition at line 675 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::~ImageBase().

void** BIAS::ImageBase::ImageDataArray_ [protected, inherited]

array of pointers to the first byte in an image row

Definition at line 673 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::ImageBase::~ImageBase().

bool BIAS::ImageBase::InterleavedDataOrder_ [protected, inherited]

planar or interleaved: planar means we have several image planes, e.g.

for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB

Definition at line 669 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), Histogram(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

double * BIAS::Histogram::MaxBinVal_ [protected]

Definition at line 204 of file Histogram.hh.

Referenced by AddHist(), CooTransf(), Histogram(), InitHist(), ReleaseHist(), and ZeroHist().

double* BIAS::Histogram::MaxHistEntry_ [protected]

Definition at line 197 of file Histogram.hh.

Referenced by AddHist(), Draw(), DrawHist_(), DrawHistLog_(), Histogram(), InitHist(), IsEmpty(), ReleaseHist(), SetBin(), and ZeroHist().

double* BIAS::Histogram::MinBinVal_ [protected]

Definition at line 204 of file Histogram.hh.

Referenced by AddHist(), CooTransf(), Histogram(), InitHist(), ReleaseHist(), and ZeroHist().

HistMode BIAS::Histogram::Mode_ [protected]

Definition at line 201 of file Histogram.hh.

Referenced by DrawHist_(), and DrawHistLog_().

double* BIAS::Histogram::NumData_ [protected]

Definition at line 198 of file Histogram.hh.

Referenced by AddHist(), CooTransf(), DrawHist_(), DrawHistLog_(), Histogram(), InitHist(), ReleaseHist(), and ZeroHist().

ROI BIAS::ImageBase::Roi_ [protected, inherited]

roi object

Definition at line 681 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), and BIAS::ImageBase::Release().

bool BIAS::Histogram::ScaleYToMaxEntry_ [protected]

Definition at line 207 of file Histogram.hh.

Referenced by CooTransf(), DrawHist_(), DrawHistLog_(), and Histogram().

enum EStorageType BIAS::ImageBase::StorageType_ [protected, inherited]

the storage type in a pixel channel

Definition at line 655 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator<<(), and BIAS::ImageBase::Release().

const int BIAS::ImageBase::Version_ = VERSION_NUMBER [static, protected, inherited]

version number of imagebase class

Definition at line 651 of file ImageBase.hh.

unsigned int BIAS::ImageBase::Width_ [protected, inherited]

image width in pixels

Definition at line 663 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned int BIAS::ImageBase::WidthStep_ [protected, inherited]

size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Definition at line 671 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

The documentation for this class was generated from the following files:
  • Image/Histogram.hh
  • Image/Histogram.cpp
Generated on Wed Jun 21 19:07:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Histogram2D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Histogram2D

BIAS::Histogram2D Class Reference

#include <Image/Histogram.hh>

Inheritance diagram for BIAS::Histogram2D:

[legend]
Collaboration diagram for BIAS::Histogram2D:

[legend]
List of all members.

Misc functions

void ClearDataPointer ()
set data pointer to NULL, such that image IsEmpty _without_ deletion of data.
int | Display ()
display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.
int | Display (const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale)
interface for the above
int | Display (const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
bool | IsPositionInImage (const int &x, const int &y) const
check if image contains that pixel position
bool | IsPowerOfTwoSize () const
int | MoveToClosestPositionInImage (int &x, int &y) const
find closest valid pixel position to x,y
void * | PixelValueBase (unsigned x, unsigned y, unsigned channel=0)
bool | PowerOfTwoSize (unsigned int &width2, unsigned int &height2) const
void | PrintHeader (std::ostream &os=std::cout) const
void | RedirectImageDataPointer (void *data)
This method takes data and set the internal image data pointer to this.
void ReleaseImageDataPointer ()
Releases ImageData_ (to be used together with RedirectImageDataPointer).
bool | SamePixelAndChannelCount (const ImageBase &Image) const
checks if data area has same "size" as Image of other type
void SetZero ()
zeroes the image
static int | GetChannelcount (const enum BIAS::ImageBase::EColorModel &colormodel)
get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.
static int | GetSize (const enum BIAS::ImageBase::EStorageType &storagetype)
get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.
static bool | IsPowerOfTwoSize (const unsigned int w, const unsigned int h)
static unsigned int | PowerOfTwoSize (const unsigned int &val)

Get functions

bool | DimensionMatch (const BIAS::ImageBase &other) const
unsigned int | GetBitDepth () const
returns the bits per channel, which is not necessairily 8*sizeof(StorageType).
int | GetChannel (ImageBase &source, unsigned int channel)
copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB
unsigned int | GetChannelCount () const
returns the number of Color channels, e.g.
enum EColorModel | GetColorModel () const
unsigned int | GetDepth () const
returns the bytes per channel, which is the sizeof(StorageType)
unsigned int | GetHeight () const
void * GetImageData ()
MetaData * GetMetaData ()
unsigned long int | GetPixelCount () const
returns number of pixels in image
unsigned int | GetPixelPosition (unsigned int x, unsigned int y, unsigned short int channel=0) const
returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).
unsigned int | GetSize () const
returns the image size in bytes = count - NOT the dimension
enum EStorageType | GetStorageType () const
const BIAS::UUID & | GetUID () const
returns the UUID of the image
int | GetVersionNumber () const
unsigned int | GetWidth () const
unsigned int | GetWidthStep () const
returns the number of bytes per line
bool | IsInterleaved () const
bool | IsPlanar () const
void | SetMetaData (const MetaData &m)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ImageBase &img)
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, ImageBase &img)

Public Types

enum EColorModel {
CM_invalid = -1, CM_Grey, CM_RGB, CM_BGR,
CM_YUYV422, CM_UYVY422, CM_YUV420P, CM_YUV444,
CM_YUV411, CM_HSV, CM_HSI_OBS, CM_DV,
CM_RGBA, CM_GreyA, CM_Bayer_RGGB, CM_Bayer_GBRG,
CM_Bayer_GRBG, CM_Bayer_BGGR, CM_HSL, CM_hsL,
CM_SymTensor2x2, CM_BGRA, CM_RGBE
}
These are the most often used color models. More...
enum EStorageType {
ST_invalid = -1, ST_unsignedchar, ST_char, ST_unsignedshortint,
ST_shortint, ST_unsignedint, ST_int, ST_float,
ST_double
}

Public Member Functions

int | AboveThresholdToValue (unsigned charThreshold, unsigned charValue)
sets alls pixels with values above Threshold to Value
void | AbsDiff (const Image< unsigned char > &im1, const Image< unsigned char > &im2)
(*this) = | im1 - im2 | sets this as the absolute difference between two arg images
void | AddDebugLevel (long int lv)
template<class DataType>
void | AddHist (vector< DataType > &xdata, vector< DataType > &ydata)
template<class DataType>
void | AddHist (std::vector< DataType > &xdata, std::vector< DataType > &ydata)
int | AppendChannel (Image< unsigned char > &img)
Append means: RGB + A => RGBA.
int | BelowThresholdToValue (unsigned charThreshold, unsigned charValue)
sets alls pixels with values below Threshold to Value
double | BicubicInterpolation (const double &x, const double &y, const unsigned short int channel=0) const
Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !
double | BilinearInterpolation (const double x, const double y, const unsigned short int channel=0) const
Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.
double | BilinearInterpolationGrey (const double x, const double y) const
no boundary checking ! ignores ROI
double | BilinearInterpolationGreyMinVal (const double x, const double y, const unsigned char &minVal) const
bilinear interpolation pixel value with value check.
double | BilinearInterpolationRGBInterleaved (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
double | BilinearInterpolationRGBPlanar (const double x, const double y, unsigned int channel) const
no boundary checking ! ignores ROI
void | BilinearInterpolationShiftRegion (const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer)
sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .
void | Binarize (unsigned charThreshold)
sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images
int | BinaryThreshold (unsigned charThreshold, unsigned charMinValue, unsigned charMaxValue)
Test for every pixel wether it is >= than the threshold.
int | CalcScaleShift (double Min, double Max, double &Scale, double &Shift) const
calculate the values needed by ScaleShiftBetween
void | Clear (const unsigned charvalue=0)
sets all pixels to zero/value
void | CooTransf (double datacoo[2], unsigned imcoo[2])
transforms data coordinates to image coordinates automatic clipping of imcoo is performed
void | CooTransf (double datacoo[2], double imcoo[2])
transforms data coordinates to image coordinates automatic clipping of imcoo is performed
void | CopyIn_NoInit (void *data)
Take some data and fill it into the Image.
bool | DebugLevelIsSet (long int lv) const
void Draw ()
void DrawLog ()
void | Dump (std::ostream &os=std::cout)
unsigned char | FastBilinearInterpolationGrey (const double x, const double y) const
fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below
void | FillImageWithConstValue (unsigned charValue[])
fill color images
void | FillImageWithConstValue (unsigned charValue)
fill grey images
void FillImageWithXValue ()
fills image with value depending on x coordinate
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
unsigned char * | GetImageData () const
overloaded GetImageData() from ImageBase
unsigned char ** | GetImageDataArray () const
overloaded GetImageData() from ImageBase
unsigned char | GetMaxPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.
void | GetMeanPixelValue (unsigned charmean[])
void | GetMinMaxPixelValue (unsigned char &min, unsigned char &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const
returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.
bool | GetMinMaxPixelValueIgnoreRange (unsigned char &min, unsigned char &max, const unsigned charignoreStart=0, const unsigned charignoreEnd=0, const unsigned short int channel=0) const
Get both, minimal and maximal pixel value --actual implementation only for planar images--.
unsigned char | GetMinPixelValue (unsigned short int channel=0, unsigned int *coo=NULL) const
Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.
unsigned char & | GetPixelNearestNeighbor (const float x, const float y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.
unsigned char & | GetPixelNearestNeighbor (const double x, const double y, const unsigned short int channel=0) const
Get the value of a specific channel offset of specific pixel nearest to given double coordinates.
Histogram2D (unsigned short zoomfactor=2)
Image (const ImageBase &im)
create image from imagebase.
Image (unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true)
constructor with size and channels allocates image data
Image ()
void | Init (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Initialize image size and channels.
void | Init (unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
void | InitHist (unsigned xbincount=256, unsigned ybincount=256)
int | InitWithForeignData (unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true)
This is used to construct a BIAS::Image hull around existing image data.
double | InterpolationGrey (const double x, const double y) const
interpolation with weights according to distances to x and y
bool | IsEmpty () const
check if ImageData_ points to allocated image buffer or not
double | LinearInterpolation (const double x, const unsigned int y) const
double | LinearInterpolation (const unsigned int x, const double y) const
unsigned char | MaxSTValue ()
returns the maximal possible StorageType
unsigned char | MinSTValue ()
returns the minimal possible StorageType
Image< unsigned char > | operator * (const Image< unsigned char > &argimage)
Operator * for another image as argument, returning a new image.
Image< unsigned char > | operator * (const unsigned char &argimage)
Operator * for scalar value, returning a new image.
Image< unsigned char > & | operator *= (const Image< unsigned char > &argimage)
Operator *= for another image as argument.
Image< unsigned char > & | operator *= (const unsigned char &argimage)
Operator *= for scalar value.
Image< unsigned char > | operator+ (const Image< unsigned char > &argimage)
Operator + for another image as argument, returning a new image.
Image< unsigned char > | operator+ (const unsigned char &argimage)
Operator + for scalar value, returning a new image.
Image< unsigned char > & | operator+= (const Image< unsigned char > &argimage)
Operator += for another image as argument.
Image< unsigned char > & | operator+= (const unsigned char &argimage)
Operator += for scalar value.
Image< unsigned char > | operator- (const Image< unsigned char > &argimage)
subtracts every from every pixel (in ROI if defined) the pixel value from argimage !!! negative results are clipped to zero !!!
Image< unsigned char > | operator- (const unsigned char &argimage)
Operator - for scalar value, returning a new image.
Image< unsigned char > & | operator-= (const Image< unsigned char > &argimage)
Operator -= for another image as argument.
Image< unsigned char > & | operator-= (const unsigned char &argimage)
Operator -= for scalar value.
Image< unsigned char > | operator/ (const Image< unsigned char > &argimage)
Operator / for another image as argument, returning a new image.
Image< unsigned char > | operator/ (const unsigned char &argimage)
Operator / for scalar value, returning a new image.
Image< unsigned char > & | operator/= (const Image< unsigned char > &argimage)
Operator /= for another image as argument.
Image< unsigned char > & | operator/= (const unsigned char &argimage)
Operator /= for scalar value.
Image< unsigned char > & | operator| (const Image< unsigned char > &argimage)
unsigned char | PixelValue (const unsigned int x, const unsigned int y, const unsigned short int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
unsigned char | PixelValueInterleaved (const int x, const int y, const int channel=0) const
Returns value of pixel at specific position, using specific channel as offset.
std::ostream & | PrintData (std::ostream &os) const
writes data of IplImage_ to os (ascii)
void | PrintDebugLevel (std::ostream &os=std::cout) const
std::ostream & | PrintPointer (std::ostream &os) const
writes pointer of IplImage_ to os (ascii)
Image< float > | Reciprocal (const float factor=1.0, const unsigned short int channel=0)
void Release ()
reimplemented from ImageBase
void | RemoveDebugLevel (long int lv)
int | ScaleShift (double Scale, double Shift)
scales and shifts image (all channels simultanously)
int | ScaleShiftBetween (double Min, double Max)
scales and shifts image so afterwards every pixel has a value between Min and Max
void SetColorModel ()
dummy function to avoid swapping color model in this class
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetFactor (unsigned short Factor)
sets the zoomfactor
void | SetPixel (const unsigned char &value0, const unsigned char &value1, const unsigned char &value2, const unsigned int &x, const unsigned int &y)
set the values of the first three channels of a given pixel (x,y) in channel to value[0.
void | SetPixel (const unsigned char &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0)
set the value of a given pixel (x,y) in channel to value.
int | StealImage (ImageBase &source)
steals the image data array from source, after releasing the actual image data and sets source image data to NULL
void | WriteASCII (std::ostream &os=std::cout)
writes ascii data to stream, can be used later e.g. with gnuplot
void ZeroHist ()
~Histogram2D ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void _ReleaseHist ()
int | UpdateImageDataArrayFromImageData_ ()
recomputes pointer array returned by GetImageDataArray

Protected Attributes

long int | _liDebugLevel
MetaData _MetaData
additional data block, handled by derived classes
unsigned char | _ucBorderColor
unsigned int | _uiBorder
BIAS::UUID _UID
unique id for every image
unsigned int | BitDepth_
relevant bits per pixel per channel
unsigned int | ChannelCount_
number of channels per pixel
enum EColorModel | ColorModel_
the color model of the pixels
unsigned int | Depth_
size of one channel of one pixel in bytes
unsigned short int | Factor_
unsigned int | Height_
image height in pixels
double ** | Hist_
void * ImageData_
a pointer to the image data
void ** ImageDataArray_
array of pointers to the first byte in an image row
bool | InterleavedDataOrder_
planar or interleaved: planar means we have several image planes, e.g.
double | MaxHistEntry_
ROI Roi_
roi object
enum EStorageType | StorageType_
the storage type in a pixel channel
unsigned int | Width_
image width in pixels
unsigned int | WidthStep_
size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)
unsigned | XBinCount_
double | XBinSize_
double | XMaxBinVal_
double | XMinBinVal_
unsigned | YBinCount_
double | YBinSize_
double | YMaxBinVal_
double | YMinBinVal_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = VERSION_NUMBER
version number of imagebase class

Detailed Description

Definition at line 226 of file Histogram.hh.

Member Enumeration Documentation

enum BIAS::ImageBase::EColorModel [inherited]

These are the most often used color models.

Enumerator:
CM_invalid | invalid (not set) image format
CM_Grey | gray values (one channel: gray value)
CM_RGB | color values (three channel order: red,green,blue)
CM_BGR | color values (three channel order: blue,green,red)
CM_YUYV422 | YUYV422 (please insert a description).
CM_UYVY422 | (please insert a description)
CM_YUV420P | (please insert a description)
CM_YUV444 | (please insert a description)
CM_YUV411 | (please insert a description)
CM_HSV | HSV (three channel order: hue, sat , value).
CM_HSI_OBS | obsolete, HSI is unused and identical to HSL
CM_DV | DV (please insert a description).
CM_RGBA | RGBA (four channel order: red,green,blue,alpha).
CM_GreyA | Grey (or Gray) plus Alpha channel.
CM_Bayer_RGGB | One channel RGB image Bayer tile.
CM_Bayer_GBRG | One channel RGB image Bayer tile.
CM_Bayer_GRBG | One channel RGB image Bayer tile.
CM_Bayer_BGGR | One channel RGB image Bayer tile.
CM_HSL | similar to HSV but space is a double tipped cone
CM_hsL | similar to HSL but euclidean (h,s) for CNCC
CM_SymTensor2x2 | The image contains a 2x2 symmetric tensor.
CM_BGRA | BGRA (four channel order: blue,green,red,alpha).
CM_RGBE | RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent).

Definition at line 113 of file ImageBase.hh.

enum BIAS::ImageBase::EStorageType [inherited]

Enumerator:
ST_invalid | invalid not set image storage type
ST_unsignedchar | (8bit) unsigned char image storage type
ST_char | (8bit) signed char image storage type
ST_unsignedshortint | (16bit) unsigned integer image storage type
ST_shortint | (16bit) signed integer image storage type
ST_unsignedint | (32bit) unsigned integer image storage type
ST_int | (32bit) signed integer image storage type
ST_float | float image storage type
ST_double | double image storage type

Definition at line 98 of file ImageBase.hh.

Constructor & Destructor Documentation

BIAS::Histogram2D::Histogram2D ( unsigned short zoomfactor = 2 )

BIAS::Histogram2D::~Histogram2D ( )

Definition at line 776 of file Histogram.cpp.

References _ReleaseHist().

Member Function Documentation

void BIAS::Histogram2D::_ReleaseHist ( ) [protected]

Definition at line 792 of file Histogram.cpp.

References Hist_, BIAS::Image< unsigned char >::Release(), XBinCount_, XBinSize_, XMaxBinVal_, XMinBinVal_, YBinCount_, YBinSize_, YMaxBinVal_, and YMinBinVal_.

Referenced by InitHist(), and ~Histogram2D().

int BIAS::Image< unsigned char >::AboveThresholdToValue | ( | unsigned char | Threshold,
 |  | unsigned char | Value
 | ) | [inherited]

sets alls pixels with values above Threshold to Value

void BIAS::Image< unsigned char >::AbsDiff | ( | const Image< unsigned char > & | im1,
 |  | const Image< unsigned char > & | im2
 | ) | [inherited]

absolut difference

Author:
Felix Woelk

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class DataType>
void BIAS::Histogram2D::AddHist | ( | vector< DataType > & | xdata,
 |  | vector< DataType > & | ydata
 | ) |

Definition at line 824 of file Histogram.cpp.

template<class DataType>
void BIAS::Histogram2D::AddHist | ( | std::vector< DataType > & | xdata,
 |  | std::vector< DataType > & | ydata
 | ) |

Referenced by main().

int BIAS::Image< unsigned char >::AppendChannel ( Image< unsigned char > & img ) [inherited]

Append means: RGB + A => RGBA.

int BIAS::Image< unsigned char >::BelowThresholdToValue | ( | unsigned char | Threshold,
 |  | unsigned char | Value
 | ) | [inherited]

sets alls pixels with values below Threshold to Value

double BIAS::Image< unsigned char >::BicubicInterpolation | ( | const double & | x,
 |  | const double & | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !

The subpixel value is obtained by computing a weighted average of the surrounding 4x4 pixel block. The weights are computed by independent x and y-dir cubic polynomials which guarantee constant first order derivatives at the grid positions

Attention:
1.0<=x<Width-2 and 1.0<=y<Height-2 is required but not checked
Author:
koeser 02/2005

double BIAS::Image< unsigned char >::BilinearInterpolation | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.

Author:
Ingo Thomsen
Date:
04.03.2002 tested (only with gray images yet)

double BIAS::Image< unsigned char >::BilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

double BIAS::Image< unsigned char >::BilinearInterpolationGreyMinVal | ( | const double | x,
 |  | const double | y,
 |  | const unsigned char & | minVal
 | ) | const [inline, inherited]

bilinear interpolation pixel value with value check.

If at least one of the input values is <=minVal, then the unknown value minVal is returned, too.

Parameters:
minVal all values <= minVal are invalid/unknown.
Author:
Jan Woetzel 12/2004

double BIAS::Image< unsigned char >::BilinearInterpolationRGBInterleaved | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

double BIAS::Image< unsigned char >::BilinearInterpolationRGBPlanar | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline, inherited]

no boundary checking ! ignores ROI

Author:
Felix Woelk

void BIAS::Image< unsigned char >::BilinearInterpolationShiftRegion | ( | const double & | x,
 |  | const double & | y,
 |  | unsigned int | hws_x,
 |  | unsigned int | hws_y,
 |  | unsigned char * | Buffer
 | ) | [inline, inherited]

sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .

.. (x,y), ... (x-hws, y-hws) You get a window of size (2*hws_x+1)*(2*hws_y+1) which is exactly centered at x,y (a subpixel position) of the original image

Parameters:
Buffer | must have size (2*hws_x+1)*(2*hws_y+1)
hws_x | half window size in x direction
hws_y | half window size in y direction
x | x-center of window
y | y-center of window
Author:
koeser 01/2004

Definition at line 944 of file Image.hh.

void BIAS::Image< unsigned char >::Binarize ( unsigned char Threshold ) [inherited]

sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images

Author:
woelk 01 2003

int BIAS::Image< unsigned char >::BinaryThreshold | ( | unsigned char | Threshold,
 |  | unsigned char | MinValue,
 |  | unsigned char | MaxValue
 | ) | [inherited]

Test for every pixel wether it is >= than the threshold.

If so set to a MaxValue, otherwise to an MinValue.

Author:
Ingo Thomsen
Date:
03/28/2002 tested

int BIAS::Image< unsigned char >::CalcScaleShift | ( | double | Min,
 |  | double | Max,
 |  | double & | Scale,
 |  | double & | Shift
 | ) | const [inherited]

calculate the values needed by ScaleShiftBetween

void BIAS::Image< unsigned char >::Clear ( const unsigned char value = 0 ) [inline, inherited]

sets all pixels to zero/value

clear all pixels elements and set them to a 'default' value JW 04/2003

Definition at line 233 of file Image.hh.

void BIAS::ImageBase::ClearDataPointer ( ) [inline, inherited]

set data pointer to NULL, such that image IsEmpty _without_ deletion of data.

Author:
evers

Definition at line 560 of file ImageBase.hh.

Referenced by main().

void BIAS::Histogram2D::CooTransf | ( | double | datacoo[2],
 |  | unsigned | imcoo[2]
 | ) |

transforms data coordinates to image coordinates automatic clipping of imcoo is performed

Definition at line 1052 of file Histogram.cpp.

References CooTransf().

void BIAS::Histogram2D::CooTransf | ( | double | datacoo[2],
 |  | double | imcoo[2]
 | ) |

transforms data coordinates to image coordinates automatic clipping of imcoo is performed

Definition at line 1039 of file Histogram.cpp.

References _uiBorder, Factor_, XBinSize_, XMaxBinVal_, XMinBinVal_, YBinSize_, YMaxBinVal_, and YMinBinVal_.

Referenced by CooTransf().

void ImageBase::CopyIn_NoInit ( void * data ) [inherited]

Take some data and fill it into the Image.

Warning:
Image must be initialized already !
Author:
Evers

Definition at line 693 of file ImageBase.cpp.

References BIASDOUT, D_COPYIN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), and BIAS::ImageBase::GetPixelCount().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_uEye::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

int ImageBase::Cut2ROI ( ) [inherited]

reduces image to current ROI, !!! image size changes !!!

Author:
Felix Woelk untested
Todo:
Make it work on colored Images

Definition at line 556 of file ImageBase.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ROI::Resize(), BIAS::ImageBase::UnsetROI(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool ImageBase::DimensionMatch ( const BIAS::ImageBase & other ) const [inherited]

Returns:
true if the image dimension w x h of this and other match = are equal
Author:
JW

Definition at line 845 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

int ImageBase::Display ( ) [inherited]

display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.

This signature is required because MSVS debugger does not support default params.

Author:
Jan Woetzel

Definition at line 1221 of file ImageBase.cpp.

References DEFAULT_32to8_scale, and DEFAULT_Display_delay.

Referenced by BIAS::ImageBase::Display().

int ImageBase::Display | ( | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec = DEFAULT_Display_delay,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

interface for the above

Author:
Jan Woetzel 2005

Definition at line 1211 of file ImageBase.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and BIAS::ImageBase::Display().

int ImageBase::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

display image as popup to screnn sing OpenCv IplImage usign Highgui functions.

Very useful to easily display in aimge, e.g. for debugging.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 1193 of file ImageBase.cpp.

References BIAS::WrapBias2Ipl::Display().

Referenced by main().

void BIAS::Histogram2D::Draw ( )

Definition at line 895 of file Histogram.cpp.

References _ucBorderColor, _uiBorder, a, BIASASSERT, BIASERR, Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), Hist_, r, XBinCount_, and YBinCount_.

void BIAS::Histogram2D::DrawLog ( )

Definition at line 945 of file Histogram.cpp.

References _ucBorderColor, _uiBorder, a, BIASASSERT, BIASERR, Factor_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< unsigned char >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), Hist_, r, XBinCount_, and YBinCount_.

Referenced by main().

void BIAS::Histogram2D::Dump ( std::ostream & os = std::cout )

Definition at line 995 of file Histogram.cpp.

References Hist_, XBinCount_, XBinSize_, XMaxBinVal_, XMinBinVal_, YBinCount_, YBinSize_, YMaxBinVal_, and YMinBinVal_.

unsigned char BIAS::Image< unsigned char >::FastBilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below

Author:
woelk 01 2003

Definition at line 880 of file Image.hh.

void BIAS::Image< unsigned char >::FillImageWithConstValue ( unsigned char Value[] ) [inherited]

fill color images

void BIAS::Image< unsigned char >::FillImageWithConstValue ( unsigned char Value ) [inherited]

fill grey images

Referenced by InitHist(), BIAS::Histogram::InitHist(), and BIAS::Histogram::ZeroHist().

void BIAS::Image< unsigned char >::FillImageWithXValue ( ) [inherited]

fills image with value depending on x coordinate

int ImageBase::Flip ( ) [inherited]

flips the image vertically (row order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
Daniel Grest
Date:
Jun 2002 Interleaved tested, planar untested Aug 2002: Jan-Friso Evers: fixed interleaved for float and other

Definition at line 700 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by BIAS::ThreeDOut::AddTriangleMesh(), MyFrame::OnTimer(), BIAS::ImageBase::PadToPowerOfTwoAndFlip(), and BIAS::OpenGLCanvasBase::ScreenShot().

int ImageBase::FlipHorizontal ( ) [inherited]

flips the image horizontal (column order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
woelk 10/2004

Definition at line 744 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

unsigned int BIAS::ImageBase::GetBitDepth ( ) const [inline, inherited]

returns the bits per channel, which is not necessairily 8*sizeof(StorageType).

Author:
woelk 12/2004

Definition at line 235 of file ImageBase.hh.

Referenced by BIAS::ImgObjGL::GetGLInternalFormat(), MainFrame::OnInfo(), and BIAS::ImageBase::Pad().

int ImageBase::GetChannel | ( | ImageBase & | source,
 |  | unsigned int | channel
 | ) | [inherited]

copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB

Author:
Felix Woelk untested (17/04/2002)

Definition at line 337 of file ImageBase.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::IsPlanar().

int ImageBase::GetChannelcount ( const enum BIAS::ImageBase::EColorModel & colormodel ) [static, inherited]

get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1153 of file ImageBase.cpp.

References BIASERR, BIASWARN, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_RGBA.

unsigned int BIAS::ImageBase::GetChannelCount ( ) const [inline, inherited]

returns the number of Color channels, e.g.

RGB 3

the value returned is independent of the StorageType

Definition at line 252 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::CalcScaleShift(), castchar(), castfloat(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImageBase::Cut2ROI(), BIAS::Histogram::DeleteHist_(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::Histogram::Draw(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::ImageIO::ExportMagickPP(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageDraw< StorageType >::InterpolatedLine(), BIAS::ImageDraw< StorageType >::Line(), LoadImage(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Image< StorageType >::ScaleShift(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), and BIAS::PMDImageProc::Write().

enum EColorModel BIAS::ImageBase::GetColorModel ( ) const [inline, inherited]

Definition at line 270 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), ComputeCutoutImage(), BIAS::ImageConvert::Convert(), BIAS::ColorHarris::CreateSTColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::ImageIO::ExportMagickPP(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), main(), MainFrame::OnInfo(), BIAS::ImageBase::operator=(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageBase::GetCopyOfROI ( ImageBase & copy ) const [inherited]

returns a copy of ROI (a new image) lower right point excluded, only interleaved images !

Author:
Felix Woelk, grest untested

Definition at line 484 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Release(), and BIAS::ImageBase::SetColorModel().

int ImageBase::GetCopyOfROI2 ( ImageBase & copy ) const [inherited]

like GetCopyOfROI, but with lower right point included only interleaved images !

Note:
GetCopyOfROI returns an image where the lower right ROI point is not included. This version does it. Correction are not made in the original method, because extensive corrections would become necessary in other methods.
Author:
Ingo Thomsen

Definition at line 451 of file ImageBase.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int BIAS::ImageBase::GetDepth ( ) const [inline, inherited]

returns the bytes per channel, which is the sizeof(StorageType)

Definition at line 229 of file ImageBase.hh.

Referenced by BIAS::ImageBase::CopyIn_NoInit(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPP(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::ImageBase::Pad(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::ImageBase::SetOutsideROIZero().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::ImageBase::GetHeight ( ) const [inline, inherited]

Definition at line 225 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::CondensHisto::DrawHistoSizes(), DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), MainFrame::FitSizetIfTooSmall(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

void* BIAS::ImageBase::GetImageData ( ) [inline, inherited]

Definition at line 205 of file ImageBase.hh.

unsigned char * BIAS::Image< unsigned char >::GetImageData ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 127 of file Image.hh.

Referenced by BIAS::Histogram::DeleteHist_().

unsigned char ** BIAS::Image< unsigned char >::GetImageDataArray ( ) const [inline, inherited]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 133 of file Image.hh.

Referenced by Draw(), BIAS::Histogram::Draw(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), DrawLog(), and BIAS::Histogram::DrawLog().

unsigned char BIAS::Image< unsigned char >::GetMaxPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.

Author:
Felix Woelk

void BIAS::Image< unsigned char >::GetMeanPixelValue ( unsigned char mean[] ) [inherited]

Author:
woelk 08/2004

MetaData* BIAS::ImageBase::GetMetaData ( ) [inline, inherited]

Definition at line 301 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::Image< unsigned char >::GetMinMaxPixelValue | ( | unsigned char & | min,
 |  | unsigned char & | max,
 |  | unsigned short int | channel = 0,
 |  | unsigned int * | mincoo = NULL,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.

all other channels are ignored during the search. Returns the first occurance of min/max pixelvalue, if they occure multiple times.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value if mincoo or maxcoo !=NULL, also stores the location of min resp. max, works slow on woelk 10/2004 ( Examples/ExampleMinMax.cpp )
Author:
Jan Frahm, woelk 01/2003, woelk 10/2004

bool BIAS::Image< unsigned char >::GetMinMaxPixelValueIgnoreRange | ( | unsigned char & | min,
 |  | unsigned char & | max,
 |  | const unsigned char | ignoreStart = 0,
 |  | const unsigned char | ignoreEnd = 0,
 |  | const unsigned short int | channel = 0
 | ) | const [inherited]

Get both, minimal and maximal pixel value --actual implementation only for planar images--.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value
ignoreStart,ignoreEnd | define teh range of values to be ignored
channel | to be searched fro multi-channel images
Returns:
true if a value within raneg was found, else false
Author:
Jan Woetzel 01/2003

unsigned char BIAS::Image< unsigned char >::GetMinPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const [inherited]

Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.

Author:
Felix Woelk

unsigned long int BIAS::ImageBase::GetPixelCount ( ) const [inline, inherited]

returns number of pixels in image

Definition at line 277 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::Histogram::DeleteHist_(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::ImageBase::GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ROI::SetMaskImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

unsigned char & BIAS::Image< unsigned char >::GetPixelNearestNeighbor | ( | const float | x,
 |  | const float | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.

Author:
Ingo Thomsen
Date:
03/28/2002 tested (only with interleaved gray images)

unsigned char & BIAS::Image< unsigned char >::GetPixelNearestNeighbor | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Get the value of a specific channel offset of specific pixel nearest to given double coordinates.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved grey images)

unsigned int BIAS::ImageBase::GetPixelPosition | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned short int | channel = 0
 | ) | const [inline, inherited]

returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).

Changed this method to return position in StorageType Jan-Friso Evers

Definition at line 770 of file ImageBase.hh.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

void ImageBase::GetROI | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 899 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

void ImageBase::GetROI | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 887 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

const ROI* BIAS::ImageBase::GetROI ( ) const [inline, inherited]

Definition at line 358 of file ImageBase.hh.

ROI* BIAS::ImageBase::GetROI ( ) [inline, inherited]

Returns a pointer to the roi object.

Author:
woelk 07/2005

Definition at line 355 of file ImageBase.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::ImageBase::Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), main(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::PrintROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageBase::UnsetROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void ImageBase::GetROICorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 904 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

void ImageBase::GetROICorners | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 892 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), and BIAS::Image< StorageType >::operator/=().

const unsigned int ImageBase::GetROILowerRightX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 931 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROILowerRightY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 938 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 917 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 924 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

int ImageBase::GetSize ( const enum BIAS::ImageBase::EStorageType & storagetype ) [static, inherited]

get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1120 of file ImageBase.cpp.

References BIASBREAK, BIASERR, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedint.

unsigned int BIAS::ImageBase::GetSize ( ) const [inline, inherited]

returns the image size in bytes = count - NOT the dimension

Definition at line 239 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and MainFrame::OnInfo().

enum EStorageType BIAS::ImageBase::GetStorageType ( ) const [inline, inherited]

Definition at line 273 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::Convert(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoSource::InitImage(), main(), BIAS::GuiGTK::MouseMotionCallback_(), MainFrame::OnInfo(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ImageBase::Pad(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), Scale(), BIAS::ROI::SetMaskImage(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::PMDImageProc::Write().

const BIAS::UUID& BIAS::ImageBase::GetUID ( ) const [inline, inherited]

returns the UUID of the image

Examples:
ExampleImageLoad.cpp.

Definition at line 298 of file ImageBase.hh.

Referenced by main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

int BIAS::ImageBase::GetVersionNumber ( ) const [inline, inherited]

Definition at line 307 of file ImageBase.hh.

Referenced by MainFrame::OnInfo(), and BIAS::operator<<().

unsigned int BIAS::ImageBase::GetWidth ( ) const [inline, inherited]

Definition at line 222 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::WrapBias2Ipl::Consistent(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::CondensHisto::DrawHistoSizes(), DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), MainFrame::FitSizetIfTooSmall(), BIAS::ImageBase::Flip(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::ImageBase::GetWidthStep ( ) const [inline, inherited]

returns the number of bytes per line

returns the number of bytes per line, not the number of StorageTypes

interleaved data order: = Width * Depth * ChannelCount planar data order: = Width * Depth

Useful for memory aligned images (e.g. 4/8 Byte) and packing of textures. JW

Definition at line 267 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BayerToRGBSlow_(), Draw(), BIAS::Histogram::Draw(), DrawLog(), BIAS::Histogram::DrawLog(), and BIAS::ImageBase::SetOutsideROIZero().

BIAS::Image< unsigned char >::Image ( const ImageBase & im ) [explicit, inherited]

create image from imagebase.

this is a dangerous operation and must therefore not be used by implicit conversion. That means, you can manually convert ImageBase->Image, but you cannot pass an Image<float> where Image<char> is expected.

Definition at line 90 of file Image.cpp.

References BIASABORT, BIASERR, BIASGDOUT, BIAS::ImageBase::BitDepth_, D_IMAGE_TRACE, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

BIAS::Image< unsigned char >::Image | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | const bool | interleaved = true
 | ) | [inherited]

constructor with size and channels allocates image data

Definition at line 150 of file Image.cpp.

References BIASGDOUT, D_IMAGE_TRACE, BIAS::ImageBase::Init(), BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

BIAS::Image< unsigned char >::Image ( ) [inherited]

Definition at line 49 of file Image.cpp.

References BIASGDOUT, BIAS::ImageBase::BitDepth_, D_IMAGE_TRACE, BIAS::ImageBase::Depth_, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StorageType_.

void ImageBase::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

Initialize image size and channels.

Warning:
call this only for empty images, calls new for the image data array. Overwrites the color model with some kind of best guess
Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes

Definition at line 117 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ROI::Resize(), BIAS::ImageBase::Roi_, BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, StorageType, BIAS::ImageBase::StorageType_, BIAS::ROI::UnsetROI(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

void BIAS::Image< unsigned char >::Init | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

calls Init from ImageBase storageType is ignored, just dummy argument

Referenced by InitHist(), and BIAS::Histogram::InitHist().

void BIAS::Histogram2D::InitHist | ( | unsigned | xbincount = 256,
 |  | unsigned | ybincount = 256
 | ) |

Definition at line 805 of file Histogram.cpp.

References _ReleaseHist(), _uiBorder, Factor_, BIAS::Image< unsigned char >::FillImageWithConstValue(), Hist_, BIAS::Image< unsigned char >::Init(), XBinCount_, and YBinCount_.

Referenced by main(), and SetFactor().

int BIAS::Image< unsigned char >::InitWithForeignData | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | void * | data,
 |  | const bool | interleaved = true
 | ) | [inherited]

This is used to construct a BIAS::Image hull around existing image data.

Be sure to ClearDataPointer() _before_ destructing the Image object to avoid deletion of the data array

Author:
evers

double BIAS::Image< unsigned char >::InterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline, inherited]

interpolation with weights according to distances to x and y

void BIAS::ImageBase::InvalidateUID ( ) [inline, inherited]

sets the image's uid to invalid

Definition at line 341 of file ImageBase.hh.

References BIAS::UUID::Invalidate().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::ImageIO::ImportOpenEXR().

bool BIAS::ImageBase::IsEmpty ( ) const [inline, inherited]

check if ImageData_ points to allocated image buffer or not

Definition at line 177 of file ImageBase.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), deflate_JPEG_file(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::ImageConvert::FromInterleaved(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ColorSegmentation::GetGreyImage(), BIAS::ColorSegmentation::GetHueImage(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ColorSegmentation::GetSatImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::VideoSource::InitImage(), BIAS::ImageConvert::Ipl2BIAS(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), mirror(), BIAS::ImageBase::operator=(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::PMDImageProc::Read(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageBase::Release(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), MainFrame::SaveUnVignetted(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::StealImage(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::PMDImageProc::Write().

const bool BIAS::ImageBase::IsInROI | ( | double & | x,
 |  | double & | y
 | ) | const [inline, inherited]

Definition at line 419 of file ImageBase.hh.

bool BIAS::ImageBase::IsInterleaved ( ) const [inline, inherited]

Definition at line 313 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), mytoplanar(), MainFrame::OnInfo(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2().

bool BIAS::ImageBase::IsPlanar ( ) const [inline, inherited]

Definition at line 310 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageConvert::Convert(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageConvert::IP_RGBToGrey_(), MainFrame::OnInfo(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

bool BIAS::ImageBase::IsPositionInImage | ( | const int & | x,
 |  | const int & | y
 | ) | const [inline, inherited]

check if image contains that pixel position

Definition at line 781 of file ImageBase.hh.

Referenced by BIAS::EpipolarLine::DrawWhole().

bool ImageBase::IsPowerOfTwoSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [static, inherited]

Definition at line 810 of file ImageBase.cpp.

bool ImageBase::IsPowerOfTwoSize ( ) const [inherited]

Returns:
true if image size is a power of two JW

Definition at line 800 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::ImgObjGL::CreateGLTexture(), and BIAS::ImageCanvasGLBase::ValidTexobj().

double BIAS::Image< unsigned char >::LinearInterpolation | ( | const double | x,
 |  | const unsigned int | y
 | ) | const [inline, inherited]

double BIAS::Image< unsigned char >::LinearInterpolation | ( | const unsigned int | x,
 |  | const double | y
 | ) | const [inline, inherited]

unsigned char BIAS::Image< unsigned char >::MaxSTValue ( ) [inline, inherited]

returns the maximal possible StorageType

Definition at line 577 of file Image.hh.

unsigned char BIAS::Image< unsigned char >::MinSTValue ( ) [inline, inherited]

returns the minimal possible StorageType

Definition at line 626 of file Image.hh.

int BIAS::ImageBase::MoveToClosestPositionInImage | ( | int & | x,
 |  | int & | y
 | ) | const [inline, inherited]

find closest valid pixel position to x,y

Author:
koeser 01/2005
Returns:
0=was correct 3,4=y out of range, 1,2 x out of range

Definition at line 785 of file ImageBase.hh.

Image<unsigned char > BIAS::Image< unsigned char >::operator * ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator * operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator * ( const unsigned char & argimage ) [inherited]

Binary operator * operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator *= ( const Image< unsigned char > & argimage ) [inherited]

Operator *= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator *= ( const unsigned char & argimage ) [inherited]

Operator *= with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator+ ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator + operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator+ ( const unsigned char & argimage ) [inherited]

Binary operator + operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator+= ( const Image< unsigned char > & argimage ) [inherited]

Operator += operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator+= ( const unsigned char & argimage ) [inherited]

Operator += with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator- ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator - operating pixel values with pixel values of another image, returning a new image.

Author:
Ingo Thomsen tested (18/04/2002)

Image<unsigned char > BIAS::Image< unsigned char >::operator- ( const unsigned char & argimage ) [inherited]

Binary operator - operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator-= ( const Image< unsigned char > & argimage ) [inherited]

Operator -= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator-= ( const unsigned char & argimage ) [inherited]

Operator -= with scalar on pixel values of an image.

Image<unsigned char > BIAS::Image< unsigned char >::operator/ ( const Image< unsigned char > & argimage ) [inherited]

Binary Operator / operating pixel values with pixel values of another image, returning a new image.

Image<unsigned char > BIAS::Image< unsigned char >::operator/ ( const unsigned char & argimage ) [inherited]

Binary operator / operating on pixel values with a scalar, returning a new image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator/= ( const Image< unsigned char > & argimage ) [inherited]

Operator /= operating on pixel values with pixel values of another image.

Image<unsigned char >& BIAS::Image< unsigned char >::operator/= ( const unsigned char & argimage ) [inherited]

Operator /= with scalar on pixel values of an image.

bool BIAS::ImageBase::operator== ( const ImageBase & img ) [inline, inherited]

comparison operator, based upon the adresses of the actual image data

Author:
Ingo Thomsen tested

Definition at line 449 of file ImageBase.hh.

References BIAS::ImageBase::GetImageData().

Image< unsigned char > & BIAS::Image< unsigned char >::operator| ( const Image< unsigned char > & argimage ) [inherited]

logical Operator || operating pixel values with pixel values of another image, returning a new image

Definition at line 566 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

int ImageBase::Pad | ( | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | [inherited]

Definition at line 1007 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageBase::Pad().

int ImageBase::Pad | ( | BIAS::ImageBase & | dest,
 |  | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | const [inherited]

Definition at line 1032 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageBase::SetBitDepth().

Referenced by BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::ZeroPad().

int ImageBase::PadToPowerOfTwo ( const int & padVal = 0 ) [inherited]

in place version of the above

Author:
JW

Definition at line 956 of file ImageBase.cpp.

References img, BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

int ImageBase::PadToPowerOfTwo | ( | BIAS::ImageBase & | dest,
 |  | const int & | padVal = 0
 | ) | const [inherited]

increase the size of this image to next power of two (e.g.

384x100>512x128) the original image S is set to upper left rectangle

Parameters:
padVal used by memset to pad the right and lower added pixels No scale, just padding!
    orig xx
    xxxxxxx
Author:
Jan Woetzel 09/2003 - 11/2005

Definition at line 979 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::Pad(), and BIAS::ImageBase::PowerOfTwoSize().

Referenced by BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PadToPowerOfTwoAndFlip().

int ImageBase::PadToPowerOfTwoAndFlip ( const int & padVal = 0 ) [inherited]

first pad, then flip.

useful for OpenGL texture image which must be pow2 size and Y-flipped ics. example:

    0 1 2
    3 4 5
    -->
    x x x x
    x x x x
    3 4 5 x
    0 1 2 x
Todo:
more efficient in place with memmove
Author:
Jan Woetzel

Definition at line 1105 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::Flip(), and BIAS::ImageBase::PadToPowerOfTwo().

int ImageBase::Paste2ROI ( const ImageBase & Image ) [inherited]

paste Image to current ROI

Author:
Felix Woelk 02 2003

Definition at line 519 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

Referenced by main(), and BIAS::ImageConvertThreaded::MergeImage_().

unsigned char BIAS::Image< unsigned char >::PixelValue | ( | const unsigned int | x,
 |  | const unsigned int | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved image)

void * ImageBase::PixelValueBase | ( | unsigned | x,
 |  | unsigned | y,
 |  | unsigned | channel = 0
 | ) | [inherited]

Definition at line 852 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

unsigned char BIAS::Image< unsigned char >::PixelValueInterleaved | ( | const int | x,
 |  | const int | y,
 |  | const int | channel = 0
 | ) | const [inline, inherited]

Returns value of pixel at specific position, using specific channel as offset.

Faster than PixelValue because it has no error check, works only for interleaved images

Author:
Johan Skoglund
Date:
06/10/2004 untested

bool ImageBase::PowerOfTwoSize | ( | unsigned int & | width2,
 |  | unsigned int & | height2
 | ) | const [inherited]

Returns:
true if both, width and height are already a power of two. The next power of two size >= actual size is computed and stored in args. useful for OpenGL texture enlargement for 'power of two' textures.
Author:
Jan Woetzel 09/2003

Definition at line 821 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::PowerOfTwoSize().

unsigned int ImageBase::PowerOfTwoSize ( const unsigned int & val ) [static, inherited]

Returns:
next pow2 >= val JW

Definition at line 831 of file ImageBase.cpp.

References res.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

std::ostream& BIAS::Image< unsigned char >::PrintData ( std::ostream & os ) const [inherited]

writes data of IplImage_ to os (ascii)

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::ImageBase::PrintHeader ( std::ostream & os = std::cout ) const [inherited]

Referenced by BIAS::ImageIO::ImportMagickPP(), main(), and mainloop().

std::ostream& BIAS::Image< unsigned char >::PrintPointer ( std::ostream & os ) const [inherited]

writes pointer of IplImage_ to os (ascii)

void ImageBase::PrintROI ( std::ostream & os = std::cout ) const [inherited]

deprecated, use 'os << *GetROI()'

Definition at line 912 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

Image<float> BIAS::Image< unsigned char >::Reciprocal | ( | const float | factor = 1.0,
 |  | const unsigned short int | channel = 0
 | ) | [inherited]

Jan Woetzel 01/2003.

Returns:
the reciprocal for each pixel: x' = 1/x computes for exactly one channel (in case of multi channel images) returns float/double image
Author:
Jan Woetzel 01/2003

void BIAS::ImageBase::RedirectImageDataPointer ( void * data ) [inline, inherited]

This method takes data and set the internal image data pointer to this.

You should really know what you are doing using this method. Don't say you haven't been warned.

Author:
Friso Evers

Definition at line 549 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Image< unsigned char >::Release ( ) [inherited]

reimplemented from ImageBase

Reimplemented from BIAS::ImageBase.

Referenced by _ReleaseHist(), and BIAS::Histogram::ReleaseHist().

void BIAS::ImageBase::ReleaseImageDataPointer ( ) [inline, inherited]

Releases ImageData_ (to be used together with RedirectImageDataPointer).

Author:
Felix woelk

Definition at line 761 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::ImageBase::SamePixelAndChannelCount ( const ImageBase & Image ) const [inline, inherited]

checks if data area has same "size" as Image of other type

Definition at line 749 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::VideoSource_Net::GrabSingle(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::Label4Neighbour(), main(), mytoplanar(), BIAS::ImageBase::operator=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Label::Process(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB(), and BIAS::ImageConvert::ToPlanar().

int BIAS::Image< unsigned char >::ScaleShift | ( | double | Scale,
 |  | double | Shift
 | ) | [inherited]

scales and shifts image (all channels simultanously)

does scale and shift every channel with same factor so that (max of all channels) = Max and (min of all channels) = Min. First shifts, then scales.

Author:
Felix Woelk

int BIAS::Image< unsigned char >::ScaleShiftBetween | ( | double | Min,
 |  | double | Max
 | ) | [inherited]

scales and shifts image so afterwards every pixel has a value between Min and Max

scales and shifts every channel with same factor

Author:
Felix Woelk

void BIAS::ImageBase::SetBitDepth ( unsigned bitdepth ) [inline, inherited]

needed by ImageIO

Definition at line 334 of file ImageBase.hh.

References BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR(), and BIAS::ImageBase::Pad().

void BIAS::ImageBase::SetColorModel ( EColorModel Model ) [inline, inherited]

Definition at line 327 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), createst(), createst2(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageBase::Init(), main(), mytoplanar(), BIAS::PMDImageProc::Read(), BIAS::ImageConvert::ToHSL(), and BIAS::ImageConvert::ToInterleavedRGB_().

void BIAS::Histogram2D::SetColorModel ( )

dummy function to avoid swapping color model in this class

Definition at line 781 of file Histogram.cpp.

References BIASERR.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::Histogram2D::SetFactor ( unsigned short Factor )

sets the zoomfactor

Definition at line 786 of file Histogram.cpp.

References Factor_, InitHist(), XBinCount_, and YBinCount_.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageBase::SetInterleaved ( bool interleaved ) [inline, inherited]

Definition at line 330 of file ImageBase.hh.

void BIAS::ImageBase::SetMetaData ( const MetaData & m ) [inline, inherited]

Definition at line 304 of file ImageBase.hh.

void ImageBase::SetOutsideROIZero ( ) [inherited]

sets all pixel not in ROI to zero

Author:
woelk 10/2004

Definition at line 585 of file ImageBase.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::GetWidthStep().

Referenced by main().

void BIAS::Image< unsigned char >::SetPixel | ( | const unsigned char & | value0,
 |  | const unsigned char & | value1,
 |  | const unsigned char & | value2,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y
 | ) | [inline, inherited]

set the values of the first three channels of a given pixel (x,y) in channel to value[0.

.2].

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

void BIAS::Image< unsigned char >::SetPixel | ( | const unsigned char & | value,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y,
 |  | const unsigned short int | channel = 0
 | ) | [inline, inherited]

set the value of a given pixel (x,y) in channel to value.

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

int ImageBase::SetROI | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

deprecated, use SetROICorners()

Definition at line 866 of file ImageBase.cpp.

References BIAS::ImageBase::SetROICorners().

Referenced by BIAS::ThreeDOut::AddImage(), BIAS::ImageConvert::BayerToRGBSlow_(), main(), mysobel(), mysobel2(), and BIAS::VideoSource::SoftwareWhiteBalance().

int ImageBase::SetROICorners | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

Definition at line 873 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by main(), and BIAS::ImageBase::SetROI().

void BIAS::ImageBase::SetUID ( const BIAS::UUID & id ) [inline, inherited]

Definition at line 337 of file ImageBase.hh.

Referenced by BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::ProcessOneImage(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::ImageBase::SetZero ( ) [inline, inherited]

zeroes the image

Definition at line 754 of file ImageBase.hh.

Referenced by main().

int ImageBase::StealImage ( ImageBase & source ) [inherited]

steals the image data array from source, after releasing the actual image data and sets source image data to NULL

Warning:
Important for template: Steal images only, if u know the storageTypes are euqal!
Author:
Daniel Grest tested

Definition at line 304 of file ImageBase.cpp.

References BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::ImageConvert::Convert(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), and BIAS::ImageConvert::ToGrey().

void ImageBase::UnsetROI ( ) [inherited]

deprecated, use GetROI()->UnsetROI()

Definition at line 882 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::UnsetROI().

Referenced by BIAS::ImageBase::Cut2ROI(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

int ImageBase::UpdateImageDataArrayFromImageData_ ( ) [protected, inherited]

recomputes pointer array returned by GetImageDataArray

Definition at line 230 of file ImageBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), and BIAS::ImageBase::Init().

void BIAS::Histogram2D::WriteASCII ( std::ostream & os = std::cout )

writes ascii data to stream, can be used later e.g. with gnuplot

Definition at line 1018 of file Histogram.cpp.

References Hist_, XBinCount_, XBinSize_, XMaxBinVal_, XMinBinVal_, YBinCount_, YBinSize_, YMaxBinVal_, and YMinBinVal_.

void BIAS::Histogram2D::ZeroHist ( )

Definition at line 889 of file Histogram.cpp.

References BIASASSERT, Hist_, XBinCount_, and YBinCount_.

Referenced by main().

int ImageBase::ZeroPad | ( | const unsigned int | newwidth,
 |  | const unsigned int | newheight,
 |  | unsigned char | bgcolor = 0
 | ) | [inherited]

backward compatibility interface for Pad.

DEPRECATED

Author:
Jan Woetzel 2005

Definition at line 947 of file ImageBase.cpp.

References BIAS::ImageBase::Pad().

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img
 | ) | [friend, inherited]

Definition at line 1234 of file ImageBase.cpp.

BIASImageBase_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) | [friend, inherited]

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

MetaData BIAS::ImageBase::_MetaData [protected, inherited]

additional data block, handled by derived classes

Definition at line 679 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned char BIAS::Histogram2D::_ucBorderColor [protected]

Definition at line 268 of file Histogram.hh.

Referenced by Draw(), and DrawLog().

unsigned int BIAS::Histogram2D::_uiBorder [protected]

Definition at line 267 of file Histogram.hh.

Referenced by CooTransf(), Draw(), DrawLog(), and InitHist().

BIAS::UUID BIAS::ImageBase::_UID [protected, inherited]

unique id for every image

Definition at line 677 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), and BIAS::operator>>().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

unsigned int BIAS::ImageBase::BitDepth_ [protected, inherited]

relevant bits per pixel per channel

Definition at line 661 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::ChannelCount_ [protected, inherited]

number of channels per pixel

Definition at line 657 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

enum EColorModel BIAS::ImageBase::ColorModel_ [protected, inherited]

the color model of the pixels

Definition at line 653 of file ImageBase.hh.

Referenced by BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::Depth_ [protected, inherited]

size of one channel of one pixel in bytes

Definition at line 659 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned short int BIAS::Histogram2D::Factor_ [protected]

Definition at line 269 of file Histogram.hh.

Referenced by CooTransf(), Draw(), DrawLog(), InitHist(), and SetFactor().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ImageBase::Height_ [protected, inherited]

image height in pixels

Definition at line 665 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

double** BIAS::Histogram2D::Hist_ [protected]

Definition at line 263 of file Histogram.hh.

Referenced by _ReleaseHist(), Draw(), DrawLog(), Dump(), InitHist(), WriteASCII(), and ZeroHist().

void* BIAS::ImageBase::ImageData_ [protected, inherited]

a pointer to the image data

Definition at line 675 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::~ImageBase().

void** BIAS::ImageBase::ImageDataArray_ [protected, inherited]

array of pointers to the first byte in an image row

Definition at line 673 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::ImageBase::~ImageBase().

bool BIAS::ImageBase::InterleavedDataOrder_ [protected, inherited]

planar or interleaved: planar means we have several image planes, e.g.

for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB

Definition at line 669 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

double BIAS::Histogram2D::MaxHistEntry_ [protected]

Definition at line 264 of file Histogram.hh.

ROI BIAS::ImageBase::Roi_ [protected, inherited]

roi object

Definition at line 681 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), and BIAS::ImageBase::Release().

enum EStorageType BIAS::ImageBase::StorageType_ [protected, inherited]

the storage type in a pixel channel

Definition at line 655 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator<<(), and BIAS::ImageBase::Release().

const int BIAS::ImageBase::Version_ = VERSION_NUMBER [static, protected, inherited]

version number of imagebase class

Definition at line 651 of file ImageBase.hh.

unsigned int BIAS::ImageBase::Width_ [protected, inherited]

image width in pixels

Definition at line 663 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned int BIAS::ImageBase::WidthStep_ [protected, inherited]

size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Definition at line 671 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned BIAS::Histogram2D::XBinCount_ [protected]

Definition at line 262 of file Histogram.hh.

Referenced by _ReleaseHist(), Draw(), DrawLog(), Dump(), InitHist(), SetFactor(), WriteASCII(), and ZeroHist().

double BIAS::Histogram2D::XBinSize_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

double BIAS::Histogram2D::XMaxBinVal_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

double BIAS::Histogram2D::XMinBinVal_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

unsigned BIAS::Histogram2D::YBinCount_ [protected]

Definition at line 262 of file Histogram.hh.

Referenced by _ReleaseHist(), Draw(), DrawLog(), Dump(), InitHist(), SetFactor(), WriteASCII(), and ZeroHist().

double BIAS::Histogram2D::YBinSize_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

double BIAS::Histogram2D::YMaxBinVal_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

double BIAS::Histogram2D::YMinBinVal_ [protected]

Definition at line 265 of file Histogram.hh.

Referenced by _ReleaseHist(), CooTransf(), Dump(), and WriteASCII().

The documentation for this class was generated from the following files:
  • Image/Histogram.hh
  • Image/Histogram.cpp
Generated on Wed Jun 21 19:07:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HMatrix

BIAS::HMatrix Class Reference
[Geometry and Transformations]

a 3x3 Matrix describing projective transformations between planes More...

#include <Geometry/HMatrix.hh>

Inheritance diagram for BIAS::HMatrix:

[legend]
Collaboration diagram for BIAS::HMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< HMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const HMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
HMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const HMATRIX_TYPE &scalar)
in place division function
void | Fill (const HMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< HMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< HMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
HMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
HMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
HMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
HMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
HMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
void | GetJacobian (const HomgPoint2D &x, Matrix< double > &Jac) const
returns jacobian of H: R^2 --> R^2
double | GetMappedError (const BIAS::HomgPoint2D &PointPicOne, const BIAS::HomgPoint2D &PointPicTwo) const
void | GetMappedRange (const unsigned int OrigWidth, const unsigned int OrigHeight, BIAS::Vector2< double > &corner, double &sizeWidth, double &sizeHeight) const
maps the rectangle (0,0),(OrigWidth,OrigHeight) with this H and computes mapped range as corner + size.
HMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (HMATRIX_TYPE &max, HMATRIX_TYPE &min) const
return biggest and smallest entry
HMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
HMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< HMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< HMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< HMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< HMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
HMatrix (Matrix3x3< double > Mat)
HMatrix (const MatrixInitType &i)
HMatrix ()
int | Invert (Matrix3x3< HMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< HMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< HMATRIX_TYPE > &A)
Matrix (const Matrix< HMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const HMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< HMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< HMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< HMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const HMATRIX_TYPEa0, const HMATRIX_TYPEa1, const HMATRIX_TYPEa2, const HMATRIX_TYPEa3, const HMATRIX_TYPEa4, const HMATRIX_TYPEa5, const HMATRIX_TYPEa6, const HMATRIX_TYPEa7, const HMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (HMATRIX_TYPE &max, HMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< HMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< HMATRIX_TYPE > &arg, Matrix< HMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< HMATRIX_TYPE > &argmat, Matrix3x4< HMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< HMATRIX_TYPE > &argmat, Matrix3x3< HMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const HMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< HMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
HMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
HMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
HMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
HMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
HMatrix & | operator= (const HMatrix &mat)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const HMATRIX_TYPE &scalar, Matrix3x3< HMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, HMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, HMATRIX_TYPEscale)
Scales row NoRow with scale.
void | SetAsCrossProductMatrix (const HMATRIX_TYPE &x, const HMATRIX_TYPE &y, const HMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< HMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< HMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< HMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< HMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const HMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< HMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
HMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< HMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< HMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~HMatrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

a 3x3 Matrix describing projective transformations between planes

Definition at line 40 of file HMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

HMatrix::HMatrix ( )

Definition at line 37 of file HMatrix.cpp.

BIAS::HMatrix::HMatrix ( const MatrixInitType & i ) [inline, explicit]

Definition at line 45 of file HMatrix.hh.

HMatrix::HMatrix ( Matrix3x3< double > Mat )

Definition at line 41 of file HMatrix.cpp.

HMatrix::~HMatrix ( )

Definition at line 53 of file HMatrix.cpp.

Member Function Documentation

void BIAS::Matrix< HMATRIX_TYPE >::Add | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::AddIP ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< HMATRIX_TYPE >::AddIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< HMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< HMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< HMATRIX_TYPE >::Divide | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::DivideIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::Fill ( const HMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<HMATRIX_TYPE > BIAS::Matrix< HMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< HMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

HMATRIX_TYPE * BIAS::Matrix< HMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

HMATRIX_TYPE ** BIAS::Matrix< HMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

HMATRIX_TYPE ** BIAS::Matrix< HMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

HMATRIX_TYPE * BIAS::Matrix< HMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

void HMatrix::GetJacobian | ( | const HomgPoint2D & | x,
 |  | Matrix< double > & | Jac
 | ) | const

returns jacobian of H: R^2 --> R^2

H as a mapping of 2D to 2D is not always a linear mapping, because of the nonlinear homogenization. This function returns the 2x2 Jacobian matrix at the point x. You have to pass homogenized points and a correctly sized jacobian

Parameters:
x | homogenized point (real point in R^2) for the jacobian
Jac | (output) 2x2 jacobian at x
Author:
koeser 04/2005

Definition at line 113 of file HMatrix.cpp.

References BIASABORT, and BIASERR.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetJacobian_().

double HMatrix::GetMappedError | ( | const BIAS::HomgPoint2D & | PointPicOne,
 |  | const BIAS::HomgPoint2D & | PointPicTwo
 | ) | const

Returns:
the squared distance between the mapped point from the first picture and the measured point in the second picture
Author:
mdunad 02 2004

Definition at line 100 of file HMatrix.cpp.

References BIAS::HomgPoint2D::Homogenize().

void HMatrix::GetMappedRange | ( | const unsigned int | OrigWidth,
 |  | const unsigned int | OrigHeight,
 |  | BIAS::Vector2< double > & | corner,
 |  | double & | sizeWidth,
 |  | double & | sizeHeight
 | ) | const

maps the rectangle (0,0),(OrigWidth,OrigHeight) with this H and computes mapped range as corner + size.

JW 07/2003

Definition at line 56 of file HMatrix.cpp.

References BIAS::HomgPoint2D::Homogenize().

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< HMATRIX_TYPE >::GetMaxMin | ( | HMATRIX_TYPE & | max,
 |  | HMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< HMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<HMATRIX_TYPE > BIAS::Matrix< HMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< HMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< HMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< HMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::GetSystemMatrix ( Matrix< HMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< HMATRIX_TYPE >::Invert ( Matrix3x3< HMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< HMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< HMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< HMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< HMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< HMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< HMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( const TNT::Matrix< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( const Matrix< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const HMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< HMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const Matrix< HMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 | ( | const HMATRIX_TYPE | a0,
 |  | const HMATRIX_TYPE | a1,
 |  | const HMATRIX_TYPE | a2,
 |  | const HMATRIX_TYPE | a3,
 |  | const HMATRIX_TYPE | a4,
 |  | const HMATRIX_TYPE | a5,
 |  | const HMATRIX_TYPE | a6,
 |  | const HMATRIX_TYPE | a7,
 |  | const HMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< HMATRIX_TYPE >::MaxMin | ( | HMATRIX_TYPE & | max,
 |  | HMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< HMATRIX_TYPE >::Mult | ( | const Vector< HMATRIX_TYPE > & | arg,
 |  | Vector< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< HMATRIX_TYPE >::Mult ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< HMATRIX_TYPE >::Mult | ( | const Matrix< HMATRIX_TYPE > & | arg,
 |  | Matrix< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Matrix3x4< HMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Matrix3x3< HMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Vector3< HMATRIX_TYPE > & | argvec,
 |  | Vector3< HMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< HMATRIX_TYPE >::Multiply | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::MultiplyIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::MultLeft | ( | const Vector< HMATRIX_TYPE > & | arg,
 |  | Vector< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< HMATRIX_TYPE >::MultLeft ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< HMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

HMatrix & HMatrix::operator= ( const HMatrix & mat )

Definition at line 46 of file HMatrix.cpp.

References BIAS::HMatrixBase::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< HMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< HMATRIX_TYPE >::Scale | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix3x3< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< HMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | HMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< HMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | HMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const HMATRIX_TYPE & | x,
 |  | const HMATRIX_TYPE & | y,
 |  | const HMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< HMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< HMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< HMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< HMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< HMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromVector ( const TNT::Vector< HMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

void BIAS::Matrix< HMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< HMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< HMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< HMATRIX_TYPE >::Sub | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::SubIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::SubIP ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< HMATRIX_TYPE >::Transpose ( const Matrix3x3< HMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

void BIAS::Matrix3x3< HMATRIX_TYPE >::TransposedMult | ( | const Vector3< HMATRIX_TYPE > & | argvec,
 |  | Vector3< HMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/HMatrix.hh
  • Geometry/HMatrix.cpp
Generated on Wed Jun 21 19:07:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HMatrixBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HMatrixBase

BIAS::HMatrixBase Class Reference
[Geometry and Transformations]

describes a homography More...

#include <Base/Geometry/HMatrixBase.hh>

Inheritance diagram for BIAS::HMatrixBase:

[legend]
Collaboration diagram for BIAS::HMatrixBase:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< HMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const HMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
HMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const HMATRIX_TYPE &scalar)
in place division function
void | Fill (const HMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< HMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< HMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
HMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
HMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
HMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
HMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
HMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
HMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (HMATRIX_TYPE &max, HMATRIX_TYPE &min) const
return biggest and smallest entry
HMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
HMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< HMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< HMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< HMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< HMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
HMatrixBase (const Matrix< HMATRIX_TYPE > &A)
HMatrixBase (const Matrix3x3< HMATRIX_TYPE > &A)
HMatrixBase (const HMatrixBase &A)
HMatrixBase (const MatrixInitType &i)
constructor setting identity or zero author koeser
HMatrixBase ()
default constructor alpha (02/25/2002) , tested in part
int | Invert (Matrix3x3< HMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< HMATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< HMATRIX_TYPE > &A)
Matrix (const Matrix< HMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const HMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< HMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< HMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< HMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const HMATRIX_TYPEa0, const HMATRIX_TYPEa1, const HMATRIX_TYPEa2, const HMATRIX_TYPEa3, const HMATRIX_TYPEa4, const HMATRIX_TYPEa5, const HMATRIX_TYPEa6, const HMATRIX_TYPEa7, const HMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (HMATRIX_TYPE &max, HMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< HMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< HMATRIX_TYPE > &arg, Matrix< HMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< HMATRIX_TYPE > &argmat, Matrix3x4< HMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< HMATRIX_TYPE > &argmat, Matrix3x3< HMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const HMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< HMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
HMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
HMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
HMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
HMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
HMatrixBase & | operator= (const HMatrixBase &mat)
assignment operators calls corresponding operator from parent
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const HMATRIX_TYPE &scalar, Matrix3x3< HMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, HMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, HMATRIX_TYPEscale)
Scales row NoRow with scale.
void | SetAsCrossProductMatrix (const HMATRIX_TYPE &x, const HMATRIX_TYPE &y, const HMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< HMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< HMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< HMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< HMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const HMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< HMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
HMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< HMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< HMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~HMatrixBase ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

describes a homography

A HMatrixBase describes a homography (mapping between two planes) between homogenous 2D coordinates by a 3x3 Matrix. It is derived from Matrix3x3. Only implementation very specific to HMatrixBase (and not valid for general 3x3 matrices, e.g. like decomposition) should be implemented here.

Author:
Jan Woetzel alpha (04/18/2002) now a direct child of Matrix3x3 (and no more of Matrix<HMATRIX_TYPE>) alpha (02/26/2002)

Definition at line 58 of file HMatrixBase.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::HMatrixBase::HMatrixBase ( ) [inline]

default constructor alpha (02/25/2002) , tested in part

Definition at line 63 of file HMatrixBase.hh.

BIAS::HMatrixBase::HMatrixBase ( const MatrixInitType & i ) [inline, explicit]

constructor setting identity or zero author koeser

Definition at line 70 of file HMatrixBase.hh.

BIAS::HMatrixBase::HMatrixBase ( const HMatrixBase & A ) [inline]

Author:
Jan Woetzel untested (02/25/2002)

Definition at line 75 of file HMatrixBase.hh.

BIAS::HMatrixBase::HMatrixBase ( const Matrix3x3< HMATRIX_TYPE > & A ) [inline]

Definition at line 77 of file HMatrixBase.hh.

BIAS::HMatrixBase::HMatrixBase ( const Matrix< HMATRIX_TYPE > & A ) [inline]

Definition at line 80 of file HMatrixBase.hh.

HMatrixBase::~HMatrixBase ( )

Definition at line 31 of file HMatrixBase.cpp.

Member Function Documentation

void BIAS::Matrix< HMATRIX_TYPE >::Add | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::AddIP ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< HMATRIX_TYPE >::AddIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< HMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< HMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< HMATRIX_TYPE >::Divide | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::DivideIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::Fill ( const HMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<HMATRIX_TYPE > BIAS::Matrix< HMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< HMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

HMATRIX_TYPE * BIAS::Matrix< HMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

HMATRIX_TYPE ** BIAS::Matrix< HMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

HMATRIX_TYPE ** BIAS::Matrix< HMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

HMATRIX_TYPE * BIAS::Matrix< HMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< HMATRIX_TYPE >::GetMaxMin | ( | HMATRIX_TYPE & | max,
 |  | HMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< HMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<HMATRIX_TYPE > BIAS::Matrix< HMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< HMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< HMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< HMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::GetSystemMatrix ( Matrix< HMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< HMATRIX_TYPE >::Invert ( Matrix3x3< HMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< HMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< HMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< HMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< HMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< HMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< HMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( const TNT::Matrix< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( const Matrix< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const HMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< HMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< HMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const Matrix< HMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< HMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 | ( | const HMATRIX_TYPE | a0,
 |  | const HMATRIX_TYPE | a1,
 |  | const HMATRIX_TYPE | a2,
 |  | const HMATRIX_TYPE | a3,
 |  | const HMATRIX_TYPE | a4,
 |  | const HMATRIX_TYPE | a5,
 |  | const HMATRIX_TYPE | a6,
 |  | const HMATRIX_TYPE | a7,
 |  | const HMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< HMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< HMATRIX_TYPE >::MaxMin | ( | HMATRIX_TYPE & | max,
 |  | HMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< HMATRIX_TYPE >::Mult | ( | const Vector< HMATRIX_TYPE > & | arg,
 |  | Vector< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< HMATRIX_TYPE >::Mult ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< HMATRIX_TYPE >::Mult | ( | const Matrix< HMATRIX_TYPE > & | arg,
 |  | Matrix< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Matrix3x4< HMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Matrix3x3< HMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< HMATRIX_TYPE >::Mult | ( | const Vector3< HMATRIX_TYPE > & | argvec,
 |  | Vector3< HMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< HMATRIX_TYPE >::Multiply | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::MultiplyIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::MultLeft | ( | const Vector< HMATRIX_TYPE > & | arg,
 |  | Vector< HMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< HMATRIX_TYPE >::MultLeft ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< HMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< HMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

HMATRIX_TYPE BIAS::Matrix< HMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

HMatrixBase& BIAS::HMatrixBase::operator= ( const HMatrixBase & mat ) [inline]

assignment operators calls corresponding operator from parent

Author:
Felix Woelk alpha (10/28/2002)

Definition at line 87 of file HMatrixBase.hh.

References BIAS::Matrix3x3< HMATRIX_TYPE >::operator=().

Referenced by BIAS::HMatrix::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< HMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< HMATRIX_TYPE >::Scale | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix3x3< HMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< HMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | HMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< HMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | HMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const HMATRIX_TYPE & | x,
 |  | const HMATRIX_TYPE & | y,
 |  | const HMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< HMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< HMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< HMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< HMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< HMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< HMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetFromVector ( const TNT::Vector< HMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< HMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

void BIAS::Matrix< HMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< HMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< HMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< HMATRIX_TYPE >::Sub | ( | const HMATRIX_TYPE & | scalar,
 |  | Matrix< HMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< HMATRIX_TYPE >::SubIP ( const HMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< HMATRIX_TYPE >::SubIP ( const Matrix< HMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

HMATRIX_TYPE BIAS::Matrix3x3< HMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< HMATRIX_TYPE >::Transpose ( const Matrix3x3< HMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<HMATRIX_TYPE > BIAS::Matrix3x3< HMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< HMATRIX_TYPE >.

void BIAS::Matrix3x3< HMATRIX_TYPE >::TransposedMult | ( | const Vector3< HMATRIX_TYPE > & | argvec,
 |  | Vector3< HMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< HMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/HMatrixBase.hh
  • Base/Geometry/HMatrixBase.cpp
Generated on Wed Jun 21 19:07:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HMatrixEstimation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HMatrixEstimation

BIAS::HMatrixEstimation Class Reference
[Geometry and Transformations]

estimate 3x3 Matrix (homography, affine transformation, . More...

#include <Geometry/HMatrixEstimation.hh>

Collaboration diagram for BIAS::HMatrixEstimation:

[legend]
List of all members.

Public Member Functions

int | Compute (const std::vector< BIAS::Vector2< double > > &frompoints, const std::vector< BIAS::Vector2< double > > &topoints, HMatrix &H)
same as above, different interface, calls Compute(HomgPoints)
int | Compute (const std::vector< BIAS::HomgPoint2D > &frompoints, const std::vector< BIAS::HomgPoint2D > &topoints, HMatrix &H)
calculatinges H using the basic linear transformation algorithm (see Hartley, Zisserman "Multiple View Geometry", p.73) p'=Hp -> (homg.
int | ComputeAffine (const std::vector< BIAS::HomgPoint2D > &frompoints, const std::vector< BIAS::HomgPoint2D > &topoints, HMatrix &H)
compute affine transformation (not using DLT !)
double | GetError ()
returns the average squared error of the estimation applying the H to all correspondences
HMatrixEstimation (bool normalizehartley=true)
int | Optimize (BIAS::HMatrix &H, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2)
optimize a given HMatrix regarding n 2d point correspondences

Public Attributes

std::vector< BIAS::HomgPoint2D
> const * 		p1_
pointer to vector of points in image1 (hack for Optimize)
std::vector< BIAS::HomgPoint2D
> const * 		p2_
pointer to vector of points in image2 (hack for Optimize)

Protected Attributes

HMatrix H_
Normalization normalization_
the normalization object
bool | normalizeHartley_
and denormalize the fmatrix after computation, so that it refers to the original points
std::vector< BIAS::HomgPoint2D > | pointsFrom_
std::vector< BIAS::HomgPoint2D > | pointsTo_

Detailed Description

estimate 3x3 Matrix (homography, affine transformation, .

..)

code was originally in HMatrix, moved and extended by koeser 12/2005

Definition at line 41 of file HMatrixEstimation.hh.

Constructor & Destructor Documentation

BIAS::HMatrixEstimation::HMatrixEstimation ( bool normalizehartley = true ) [inline, explicit]

Definition at line 45 of file HMatrixEstimation.hh.

Member Function Documentation

int BIAS::HMatrixEstimation::Compute | ( | const std::vector< BIAS::Vector2< double > > & | frompoints,
 |  | const std::vector< BIAS::Vector2< double > > & | topoints,
 |  | HMatrix & | H
 | ) |

same as above, different interface, calls Compute(HomgPoints)

Author:
grest, May 2006

int BIAS::HMatrixEstimation::Compute | ( | const std::vector< BIAS::HomgPoint2D > & | frompoints,
 |  | const std::vector< BIAS::HomgPoint2D > & | topoints,
 |  | HMatrix & | H
 | ) |

calculatinges H using the basic linear transformation algorithm (see Hartley, Zisserman "Multiple View Geometry", p.73) p'=Hp -> (homg.

coo) [p']x Hp = 0 3 row linear system, but rank 2 -> take only first two rows p=1...numpoints -> 2*numpoints equations solve A*h=0 with SVD

Author:
Woelk/Frahm

int BIAS::HMatrixEstimation::ComputeAffine | ( | const std::vector< BIAS::HomgPoint2D > & | frompoints,
 |  | const std::vector< BIAS::HomgPoint2D > & | topoints,
 |  | HMatrix & | H
 | ) |

compute affine transformation (not using DLT !)

Author:
koeser 12/2005

Referenced by main().

double HMatrixEstimation::GetError ( )

returns the average squared error of the estimation applying the H to all correspondences

Definition at line 285 of file HMatrixEstimation.cpp.

References H_, BIAS::HomgPoint2D::Homogenize(), pointsFrom_, and pointsTo_.

int HMatrixEstimation::Optimize | ( | BIAS::HMatrix & | H,
 |  | const std::vector< BIAS::HomgPoint2D > & | p1,
 |  | const std::vector< BIAS::HomgPoint2D > & | p2
 | ) |

optimize a given HMatrix regarding n 2d point correspondences

minimize an error function on H matrix using iterative nonlinear optimization techniques such as Levenberg/Marquardt

Attention:
susceptable to local minima, provide good starting point H
Parameters:
H | matrix which is optimized
p1 | (homogenized!) points in image 1
p2 | corresponding (homogenized!) points in image 2
Returns:
0=success, !=0: error
Author:
koeser 06/2006

Definition at line 70 of file HMatrixEstimation.cpp.

References BIASABORT, and BIASERR.

Member Data Documentation

HMatrix BIAS::HMatrixEstimation::H_ [protected]

Definition at line 116 of file HMatrixEstimation.hh.

Referenced by GetError().

Normalization BIAS::HMatrixEstimation::normalization_ [protected]

the normalization object

Definition at line 114 of file HMatrixEstimation.hh.

bool BIAS::HMatrixEstimation::normalizeHartley_ [protected]

and denormalize the fmatrix after computation, so that it refers to the original points

Definition at line 111 of file HMatrixEstimation.hh.

std::vector<BIAS::HomgPoint2D> const* BIAS::HMatrixEstimation::p1_

pointer to vector of points in image1 (hack for Optimize)

Definition at line 99 of file HMatrixEstimation.hh.

Referenced by HErrorFunction().

std::vector<BIAS::HomgPoint2D> const* BIAS::HMatrixEstimation::p2_

pointer to vector of points in image2 (hack for Optimize)

Definition at line 101 of file HMatrixEstimation.hh.

Referenced by HErrorFunction().

std::vector<BIAS::HomgPoint2D> BIAS::HMatrixEstimation::pointsFrom_ [protected]

Definition at line 117 of file HMatrixEstimation.hh.

Referenced by GetError().

std::vector<BIAS::HomgPoint2D> BIAS::HMatrixEstimation::pointsTo_ [protected]

Definition at line 118 of file HMatrixEstimation.hh.

Referenced by GetError().

The documentation for this class was generated from the following files:
  • Geometry/HMatrixEstimation.hh
  • Geometry/HMatrixEstimation.cpp
Generated on Wed Jun 21 19:07:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgLine2D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgLine2D

BIAS::HomgLine2D Class Reference

#include <Base/Geometry/HomgLine2D.hh>

Inheritance diagram for BIAS::HomgLine2D:

[legend]
Collaboration diagram for BIAS::HomgLine2D:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector3< HOMGLINE2D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGLINE2D_TYPE &scalar)
Addition (in place) of an scalar.
BIAS::Vector3< HOMGLINE2D_TYPE > | CartesianToPolar () const
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordEuclidianToSphere () const
coordinate transform.
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordSphereToEuclidian () const
coordinate transfrom.
Vector3< HOMGLINE2D_TYPE > | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
void | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
cross product of two vectors destvec = this x argvec
double | Dist (const Vector3< HOMGLINE2D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
HOMGLINE2D_TYPE | Distance (const HomgPoint2D &point)
calculates distance of a point from line
HOMGLINE2D_TYPE | Distance (HomgPoint2D &point)
calculates distance of a point from line
HOMGLINE2D_TYPE | DistanceSquared (const HomgPoint2D &point)
calculates squared distance of a point from line
void | Div (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
void | Divide (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const HOMGLINE2D_TYPE &scalar)
Division (in place) of an scalar.
void | DivIP (const HOMGLINE2D_TYPE &scalar)
Vector3< HOMGLINE2D_TYPE > | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec) const
divide elementwise
void | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
Vector3< HOMGLINE2D_TYPE > | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
multiply two vectors elementwise and return the result vector
void | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
multiply two vectors elementwise and store the result vector to destvec
HOMGLINE2D_TYPE * | GetData ()
const HOMGLINE2D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
bool | GetIntersectionsWithImage (unsigned int width, unsigned int height, unsigned int coo[4])
! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine
BIAS::Vector3< HOMGLINE2D_TYPE > | GetNormalized () const
return a normalized vector of this
void | GetPerpendicularLine (HomgPoint2D &point, HomgLine2D &perpline)
return perpendicular line throug point
Matrix< HOMGLINE2D_TYPE > | GetSkewSymmetricMatrix () const
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product
HOMGLINE2D_TYPE | GetW ()
returns length of hypothenuse in gradient triangle
HomgLine2D (const HomgPoint2D &p1, const HomgPoint2D &p2)
constructing a line through two points
HomgLine2D (const HomgLine2D &line)
copy constructor
HomgLine2D (HOMGLINE2D_TYPE a, HOMGLINE2D_TYPE b, HOMGLINE2D_TYPE c)
HomgLine2D (const Vector3< HOMGLINE2D_TYPE > &vec)
HomgLine2D ()
void Homogenize ()
aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1
HomgPoint2D | Intersection (HomgLine2D &line) const
calls the above
void | Intersection (HomgLine2D &line, HomgPoint2D &intersect) const
calculates homogenized intersection of two lines
bool | IsZero () const
double | Length () const
returns the Euclidean Length of the Vector
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogTC (const std::string &filename)
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.
void | Mult (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
void | MultIP (const HOMGLINE2D_TYPE &scalar)
void | Multiply (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Multiplication with a scalar, storing results in destination vector.
void | MultiplyIP (const HOMGLINE2D_TYPE &scalar)
Multiplication (in place) of an scalar.
Vector3< HOMGLINE2D_TYPE > & | Normalize (Matrix3x3< HOMGLINE2D_TYPE > &cov)
normalizes the vector to 1 and transfroms the associated covaqriance matrix
Vector3< HOMGLINE2D_TYPE > & | Normalize ()
normalize this vector to length 1
HOMGLINE2D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|.
double | NormL2 () const
the L2 norm sqrt(a^2 + b^2 + c^2)
bool | operator!= (const Vector3< HOMGLINE2D_TYPE > &arg) const
Comparison operator 'not equal'.
bool | operator== (const Vector3< HOMGLINE2D_TYPE > &arg) const
Comparison operator 'equal'.
HOMGLINE2D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGLINE2D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix3x3< HOMGLINE2D_TYPE > | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v) const
void | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v, Matrix3x3< HOMGLINE2D_TYPE > &res) const
outer product, constructs a matrix.
HOMGLINE2D_TYPE | Phi () const
HOMGLINE2D_TYPE & | Phi ()
BIAS::Vector3< HOMGLINE2D_TYPE > | PolarToCartesian () const
HOMGLINE2D_TYPE | Radius () const
HOMGLINE2D_TYPE & | Radius ()
r for polar/sphere content JW
bool | Save (const std::string &filename) const
method to save directly to a given filename.
HOMGLINE2D_TYPE | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const
scalar product (=inner product) of two vectors returns a scalar
void | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, HOMGLINE2D_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const Vector< HOMGLINE2D_TYPE > &vec)
Sets this form elements of Vector<T>.
void | Set (const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z)
set elementwise with given scalar values
void | Set (const HOMGLINE2D_TYPE &scalar)
set all elements to a scalar value
void | Set (const HOMGLINE2D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
void | Set (const HomgPoint2D &p1, const HomgPoint2D &p2)
constructing a line through two points
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const
Substraction with a scalar, storing results in destination vector.
void | SubIP (const Vector3< HOMGLINE2D_TYPE > &argvec)
in place substraction
void | SubIP (const HOMGLINE2D_TYPE &scalar)
Substraction (in place) of an scalar.
HOMGLINE2D_TYPE | Theta () const
HOMGLINE2D_TYPE & | Theta ()
Vector3 (const Vector< HOMGLINE2D_TYPE > &v)
cast constructor
Vector3 (const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z)
constructor with element assigment using explicit values
Vector3 (char *s)
constructor with element assignment
Vector3 (const HOMGLINE2D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector3 (const HOMGLINE2D_TYPE &scalar)
assignment with a constant value for all elements
Vector3 (const Vector3< HOMGLINE2D_TYPE > &vec)
copy constructor
Vector3 ()
~HomgLine2D ()
destructor

Protected Attributes

HOMGLINE2D_TYPE | data_ [VECTOR3_SIZE]

Detailed Description

Definition at line 43 of file HomgLine2D.hh.

Constructor & Destructor Documentation

HomgLine2D::HomgLine2D ( ) [inline]

Definition at line 121 of file HomgLine2D.hh.

HomgLine2D::HomgLine2D ( const Vector3< HOMGLINE2D_TYPE > & vec ) [inline, explicit]

Definition at line 124 of file HomgLine2D.hh.

HomgLine2D::HomgLine2D | ( | HOMGLINE2D_TYPE | a,
 |  | HOMGLINE2D_TYPE | b,
 |  | HOMGLINE2D_TYPE | c
 | ) | [inline]

Definition at line 127 of file HomgLine2D.hh.

HomgLine2D::HomgLine2D ( const HomgLine2D & line ) [inline]

copy constructor

Definition at line 133 of file HomgLine2D.hh.

HomgLine2D::HomgLine2D | ( | const HomgPoint2D & | p1,
 |  | const HomgPoint2D & | p2
 | ) | [inline]

constructing a line through two points

Definition at line 137 of file HomgLine2D.hh.

BIAS::HomgLine2D::~HomgLine2D ( ) [inline]

destructor

Definition at line 69 of file HomgLine2D.hh.

Member Function Documentation

void BIAS::Vector3< HOMGLINE2D_TYPE >::Add | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGLINE2D_TYPE >::Add | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::AddIP ( const Vector3< HOMGLINE2D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

Definition at line 287 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::AddIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 248 of file Vector3.hh.

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CartesianToPolar ( ) const [inline, inherited]

Definition at line 357 of file Vector3.hh.

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CoordEuclidianToSphere ( ) const [inherited]

coordinate transform.

compute the sphere coordinates(r, phi, theta) for (this) given euclidian point p=(x,y,z) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CoordSphereToEuclidian ( ) const [inherited]

coordinate transfrom.

compute the euclidian coord p=(x,y,z) for (this) given sphere coord sph=(radius, phi, theta) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::CrossProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

Returns:
cross product = this x argvec
Author:
Jan Woetzel alpha

Definition at line 205 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::CrossProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

cross product of two vectors destvec = this x argvec

Author:
Ingo Thomsen, Jan Woetzel alpha

double BIAS::Vector3< HOMGLINE2D_TYPE >::Dist ( const Vector3< HOMGLINE2D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

HOMGLINE2D_TYPE BIAS::HomgLine2D::Distance ( const HomgPoint2D & point ) [inline]

calculates distance of a point from line

Definition at line 86 of file HomgLine2D.hh.

HOMGLINE2D_TYPE BIAS::HomgLine2D::Distance ( HomgPoint2D & point ) [inline]

calculates distance of a point from line

Definition at line 82 of file HomgLine2D.hh.

HOMGLINE2D_TYPE HomgLine2D::DistanceSquared ( const HomgPoint2D & point ) [inline]

calculates squared distance of a point from line

Definition at line 184 of file HomgLine2D.hh.

References HOMGLINE2D_EPS, and HOMGLINE2D_TYPE.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Div | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 281 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Divide | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::DivideIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::DivIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Definition at line 276 of file Vector3.hh.

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseDivision ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

divide elementwise

Author:
Jan Woetzel

Definition at line 238 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseDivision | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

multiply two vectors elementwise and return the result vector

Author:
Jan Woetzel (03/06/2002)

Definition at line 226 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::ElementwiseProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise and store the result vector to destvec

Author:
Jan Woetzel alpha (03/06/2002)

HOMGLINE2D_TYPE * BIAS::Vector3< HOMGLINE2D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 147 of file Vector3.hh.

const HOMGLINE2D_TYPE * BIAS::Vector3< HOMGLINE2D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 146 of file Vector3.hh.

bool HomgLine2D::GetIntersectionsWithImage | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | coo[4]
 | ) |

! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine

Definition at line 32 of file HomgLine2D.cpp.

References HOMGLINE2D_EPS, and Intersection().

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::GetNormalized ( ) const [inherited]

return a normalized vector of this

norm. to length 1

Author:
Jan Woetzel
Date:
06/2003

void HomgLine2D::GetPerpendicularLine | ( | HomgPoint2D & | point,
 |  | HomgLine2D & | perpline
 | ) | [inline]

return perpendicular line throug point

Definition at line 211 of file HomgLine2D.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by BIAS::TrifocalTensor::TransferView3().

Matrix<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::GetSkewSymmetricMatrix ( ) const [inherited]

constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product

Author:
koeser 09/2003

HOMGLINE2D_TYPE HomgLine2D::GetW ( ) [inline]

returns length of hypothenuse in gradient triangle

Definition at line 156 of file HomgLine2D.hh.

void HomgLine2D::Homogenize ( ) [inline]

aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1

Definition at line 161 of file HomgLine2D.hh.

References BIASASSERT, and HOMGLINE2D_TYPE.

Referenced by AddErr(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EpipolarLine::GetNextLine(), BIAS::EpipolarLine::Init(), BIAS::EpipolarLine::Recalc(), and BIAS::EpipolarLine::ScanLine().

HomgPoint2D HomgLine2D::Intersection ( HomgLine2D & line ) const [inline]

calls the above

Definition at line 196 of file HomgLine2D.hh.

void HomgLine2D::Intersection | ( | HomgLine2D & | line,
 |  | HomgPoint2D & | intersect
 | ) | const [inline]

calculates homogenized intersection of two lines

Definition at line 204 of file HomgLine2D.hh.

References BIAS::HomgPoint2D::Homogenize().

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_(), and GetIntersectionsWithImage().

bool BIAS::Vector3< HOMGLINE2D_TYPE >::IsZero ( ) const [inline, inherited]

Returns:
true iff all elements are equal zero JW

double BIAS::Vector3< HOMGLINE2D_TYPE >::Length ( ) const [inline, inherited]

returns the Euclidean Length of the Vector

Author:
Jan Woetzel

Definition at line 137 of file Vector3.hh.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

int BIAS::Vector3< HOMGLINE2D_TYPE >::LoadBogTC ( const std::string & filename ) [inherited]

reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

void BIAS::Vector3< HOMGLINE2D_TYPE >::Mult | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 270 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::MultIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Definition at line 265 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Multiply | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::MultiplyIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 264 of file Vector3.hh.

Vector3<HOMGLINE2D_TYPE >& BIAS::Vector3< HOMGLINE2D_TYPE >::Normalize ( Matrix3x3< HOMGLINE2D_TYPE > & cov ) [inherited]

normalizes the vector to 1 and transfroms the associated covaqriance matrix

Author:
woelk 03/2006

Vector3<HOMGLINE2D_TYPE >& BIAS::Vector3< HOMGLINE2D_TYPE >::Normalize ( ) [inline, inherited]

normalize this vector to length 1

Author:
Jan Woetzel / koeser
Returns:
reference to updated (*this)
Date:
04/25/2002

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Vector3< HOMGLINE2D_TYPE >::NormL2 ( ) const [inline, inherited]

the L2 norm sqrt(a^2 + b^2 + c^2)

Author:
woelk 01 2003

bool BIAS::Vector3< HOMGLINE2D_TYPE >::operator!= ( const Vector3< HOMGLINE2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
woelk 01 2003

Definition at line 436 of file Vector3.hh.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::operator== ( const Vector3< HOMGLINE2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 431 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

const HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member function const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Matrix3x3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::OuterProduct ( const Vector3< HOMGLINE2D_TYPE > & v ) const [inline, inherited]

Definition at line 317 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::OuterProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | v,
 |  | Matrix3x3< HOMGLINE2D_TYPE > & | res
 | ) | const [inherited]

outer product, constructs a matrix.

Often written as (*this) * v^T for col vectors made it fast

Author:
Daniel Grest, Sept 2003, woelk 07/2004 tested

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Phi ( ) const [inline, inherited]

Definition at line 369 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Phi ( ) [inline, inherited]

Definition at line 367 of file Vector3.hh.

BIAS::Vector3<HOMGLINE2D_TYPE > BIAS::Vector3< HOMGLINE2D_TYPE >::PolarToCartesian ( ) const [inline, inherited]

Definition at line 341 of file Vector3.hh.

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Radius ( ) const [inline, inherited]

Definition at line 364 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Radius ( ) [inline, inherited]

r for polar/sphere content JW

Definition at line 362 of file Vector3.hh.

bool BIAS::Vector3< HOMGLINE2D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::ScalarProduct ( const Vector3< HOMGLINE2D_TYPE > & argvec ) const [inline, inherited]

scalar product (=inner product) of two vectors returns a scalar

Author:
Jan Woetzel, Ingo Thomsen alpha

void BIAS::Vector3< HOMGLINE2D_TYPE >::ScalarProduct | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | HOMGLINE2D_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const Vector< HOMGLINE2D_TYPE > & vec ) [inline, inherited]

Sets this form elements of Vector<T>.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set | ( | const HOMGLINE2D_TYPE & | x,
 |  | const HOMGLINE2D_TYPE & | y,
 |  | const HOMGLINE2D_TYPE & | z
 | ) | [inline, inherited]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

set all elements to a scalar value

Author:
Jan Woetzel, untested (02/28/2002)

Definition at line 110 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Set ( const HOMGLINE2D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel, untested (02/28/2002)

void HomgLine2D::Set | ( | const HomgPoint2D & | p1,
 |  | const HomgPoint2D & | p2
 | ) | [inline]

constructing a line through two points

Definition at line 143 of file HomgLine2D.hh.

References BIAS::Vector3< T >::CrossProduct(), and HOMGLINE2D_EPS.

Referenced by AddErr(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and BIAS::EMatrixBase::GetCosAngleErrorHomogenized().

void BIAS::Vector3< HOMGLINE2D_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel 01/2003

const int BIAS::Vector3< HOMGLINE2D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel (02/28/2002)

Definition at line 131 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::Sub | ( | const Vector3< HOMGLINE2D_TYPE > & | argvec,
 |  | Vector3< HOMGLINE2D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGLINE2D_TYPE >::Sub | ( | const HOMGLINE2D_TYPE & | scalar,
 |  | Vector3< HOMGLINE2D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGLINE2D_TYPE >::SubIP ( const Vector3< HOMGLINE2D_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

Definition at line 297 of file Vector3.hh.

void BIAS::Vector3< HOMGLINE2D_TYPE >::SubIP ( const HOMGLINE2D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 256 of file Vector3.hh.

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::Theta ( ) const [inline, inherited]

Definition at line 374 of file Vector3.hh.

HOMGLINE2D_TYPE & BIAS::Vector3< HOMGLINE2D_TYPE >::Theta ( ) [inline, inherited]

Definition at line 372 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const Vector< HOMGLINE2D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel, untested (03/22/2002)

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 | ( | const HOMGLINE2D_TYPE & | x,
 |  | const HOMGLINE2D_TYPE & | y,
 |  | const HOMGLINE2D_TYPE & | z
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen, tested (03/04/2002)

Definition at line 94 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const HOMGLINE2D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel (02/28/2002)

Definition at line 85 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const HOMGLINE2D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel (03/01/2002)

Definition at line 80 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( const Vector3< HOMGLINE2D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Jan Woetzel (03/05/2002)

Definition at line 76 of file Vector3.hh.

BIAS::Vector3< HOMGLINE2D_TYPE >::Vector3 ( ) [inline, inherited]

Definition at line 70 of file Vector3.hh.

Member Data Documentation

HOMGLINE2D_TYPE BIAS::Vector3< HOMGLINE2D_TYPE >::data_[VECTOR3_SIZE] [protected, inherited]

Definition at line 445 of file Vector3.hh.

Referenced by BIAS::EpipolarLine::CalcTransformed_(), BIAS::EpipolarLine::GetNextLine(), BIAS::EpipolarLine::Init(), BIAS::EpipolarLine::Recalc(), and BIAS::EpipolarLine::ScanLine().

The documentation for this class was generated from the following files:
  • Base/Geometry/HomgLine2D.hh
  • Base/Geometry/HomgLine2D.cpp
Generated on Wed Jun 21 19:07:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: HomgLine2D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

HomgLine2D Class Reference
[Geometry and Transformations]

a line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy More...

Detailed Description

a line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy

Author:
woelk 08 2002

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgLine2D.hh
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgLine3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgLine3D

BIAS::HomgLine3D Class Reference

a homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and a starting point PointFin_ (which is the closest vector from the coordinate origin to the line if the line is not homogenized, it can bve described by any two points More...

#include <Base/Geometry/HomgLine3D.hh>

Collaboration diagram for BIAS::HomgLine3D:

[legend]
List of all members.

Public Member Functions

void | CalculateFootpoint (HomgPoint3D &p, HomgPoint3D &footp)
void | Distance (HomgPoint3D &p, HOMGLINE3D_TYPE &dist)
HomgPoint3D | GetPointFin () const
HomgPoint3D | GetPointInf () const
HomgLine3D (const HomgPoint3D &p1, const HomgPoint3D &p2)
HomgLine3D ()
void Homogenize ()
void | Set (const HomgPoint3D &p1, const HomgPoint3D &p2)
~HomgLine3D ()

Protected Attributes

HomgPoint3D PointFin_
HomgPoint3D PointInf_

Detailed Description

a homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and a starting point PointFin_ (which is the closest vector from the coordinate origin to the line if the line is not homogenized, it can bve described by any two points

Definition at line 43 of file HomgLine3D.hh.

Constructor & Destructor Documentation

BIAS::HomgLine3D::HomgLine3D ( ) [inline]

Definition at line 72 of file HomgLine3D.hh.

BIAS::HomgLine3D::HomgLine3D | ( | const HomgPoint3D & | p1,
 |  | const HomgPoint3D & | p2
 | ) | [inline]

Definition at line 75 of file HomgLine3D.hh.

BIAS::HomgLine3D::~HomgLine3D ( ) [inline]

Definition at line 79 of file HomgLine3D.hh.

Member Function Documentation

void BIAS::HomgLine3D::CalculateFootpoint | ( | HomgPoint3D & | p,
 |  | HomgPoint3D & | footp
 | ) | [inline]

Definition at line 126 of file HomgLine3D.hh.

References BIASASSERT, Homogenize(), PointFin_, PointInf_, BIAS::Vector3< T >::ScalarProduct(), and BIAS::Vector3< T >::SubIP().

Referenced by Distance().

void BIAS::HomgLine3D::Distance | ( | HomgPoint3D & | p,
 |  | HOMGLINE3D_TYPE & | dist
 | ) | [inline]

Definition at line 154 of file HomgLine3D.hh.

References CalculateFootpoint(), and BIAS::Vector4< T >::NormL2().

HomgPoint3D BIAS::HomgLine3D::GetPointFin ( ) const [inline]

Definition at line 55 of file HomgLine3D.hh.

HomgPoint3D BIAS::HomgLine3D::GetPointInf ( ) const [inline]

Definition at line 52 of file HomgLine3D.hh.

void BIAS::HomgLine3D::Homogenize ( ) [inline]

Definition at line 88 of file HomgLine3D.hh.

References BIASASSERT, BIAS::HomgPoint3D::GetW(), BIAS::HomgPoint3D::Homogenize(), BIAS::Vector4< T >::NormL2(), PointFin_, PointInf_, and BIAS::Vector3< T >::ScalarProduct().

Referenced by CalculateFootpoint().

void BIAS::HomgLine3D::Set | ( | const HomgPoint3D & | p1,
 |  | const HomgPoint3D & | p2
 | ) | [inline]

Definition at line 82 of file HomgLine3D.hh.

References PointFin_, and PointInf_.

Member Data Documentation

HomgPoint3D BIAS::HomgLine3D::PointFin_ [protected]

Definition at line 67 of file HomgLine3D.hh.

Referenced by CalculateFootpoint(), Homogenize(), and Set().

HomgPoint3D BIAS::HomgLine3D::PointInf_ [protected]

Definition at line 67 of file HomgLine3D.hh.

Referenced by CalculateFootpoint(), Homogenize(), and Set().

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgLine3D.hh
Generated on Wed Jun 21 19:07:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPlane3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPlane3D

BIAS::HomgPlane3D Class Reference
[Geometry and Transformations]

A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0. More...

#include <Base/Geometry/HomgPlane3D.hh>

Inheritance diagram for BIAS::HomgPlane3D:

[legend]
Collaboration diagram for BIAS::HomgPlane3D:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector4< HOMGPLANE3D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGPLANE3D_TYPE &scalar)
Addition (in place) of an scalar.
void | Copy (const HOMGPLANE3D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector4< HOMGPLANE3D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
HOMGPLANE3D_TYPE | DistanceSquared (const HomgPoint3D &point) const
calculates squared distance of a point from plane
void | Divide (const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const
Division with a scalar, storing results in destionation vector.
void | DivideIP (const HOMGPLANE3D_TYPE &scalar)
Division (in place) of an scalar.
void | ElementwiseProduct (const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const
multiply two vectors elementwise, storing the result in destvec
HOMGPLANE3D_TYPE * | GetData ()
const HOMGPLANE3D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
int | GetLineIntersection (const HomgPoint3D &PointOnLine, const HomgPoint3D &LineDir, HomgPoint3D &Intersection) const
compute the intersection point of the plane with a line (defined by point and direction)
Vector3< HOMGPLANE3D_TYPE > | GetNormalVector () const
returns normal vector, only wrapper
void | GetNormalVector (Vector3< HOMGPLANE3D_TYPE > &normalv) const
returns normal vector
HomgPlane3D (const Vector< HOMGPLANE3D_TYPE > &theplane)
HomgPlane3D (const Vector4< HOMGPLANE3D_TYPE > &theplane)
HomgPlane3D (const Vector3< double > &PointOnPlane, const Vector3< double > &NormalVector)
construct plane, given arbitrary point and normal
HomgPlane3D (const HomgPoint3D &p1, const HomgPoint3D &p2, const HomgPoint3D &p3)
constructs a homogeneous plane from three points
HomgPlane3D (HOMGPLANE3D_TYPE a, HOMGPLANE3D_TYPE b, HOMGPLANE3D_TYPE c, HOMGPLANE3D_TYPE d)
set four values of the plane vector
HomgPlane3D ()
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const HOMGPLANE3D_TYPE &scalar)
Multiplication (in place) of an scalar.
void Normalize ()
set first three components to vector of norm 1 and scales w accordingly => encodes Hesse normal form
HOMGPLANE3D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|+ |d|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).
Vector4< HOMGPLANE3D_TYPE > & | operator *= (const HOMGPLANE3D_TYPE &scalar)
Multiplication operator with scalar argument.
bool | operator!= (const Vector4< HOMGPLANE3D_TYPE > &arg) const
Comparison operator 'not equal'.
Vector4< HOMGPLANE3D_TYPE > & | operator+= (const Vector4< HOMGPLANE3D_TYPE > &argvec)
add operator for two Vectors
Vector4< HOMGPLANE3D_TYPE > & | operator+= (const HOMGPLANE3D_TYPE &scalar)
Addition operator with scalar argument.
Vector4< HOMGPLANE3D_TYPE > & | operator-= (const Vector4< HOMGPLANE3D_TYPE > &argvec)
sub operator for two Vectors
Vector4< HOMGPLANE3D_TYPE > & | operator-= (const HOMGPLANE3D_TYPE &scalar)
Substraction operator with scalar argument.
Vector4< HOMGPLANE3D_TYPE > & | operator/= (const HOMGPLANE3D_TYPE &scalar)
Division operator with scalar argument.
bool | operator== (const Vector4< HOMGPLANE3D_TYPE > &arg) const
Comparison operator 'equal'.
HOMGPLANE3D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGPLANE3D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix4x4< HOMGPLANE3D_TYPE > | OuterProduct (const Vector4< HOMGPLANE3D_TYPE > &v) const
outer product, constructs a matrix.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScalarProduct (const Vector4< HOMGPLANE3D_TYPE > &argvec, HOMGPLANE3D_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const HOMGPLANE3D_TYPE &x, const HOMGPLANE3D_TYPE &y, const HOMGPLANE3D_TYPE &z, const HOMGPLANE3D_TYPE &w)
set elementwise with given scalr values
void | Set (const HOMGPLANE3D_TYPE &scalar)
set all elements to a scalat value
void | Set (const Vector3< double > &PointOnPlane, const Vector3< double > &NormalVector)
construct plane, given arbitrary point and normal
void | SetFromVector (const Vector< HOMGPLANE3D_TYPE > &theplane)
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector4< HOMGPLANE3D_TYPE > &argvec)
in place substraction
void | SubIP (const HOMGPLANE3D_TYPE &scalar)
Substraction (in place) of an scalar.
Matrix< HOMGPLANE3D_TYPE > | transposed () const
return a new Matrix with 1 row and 4 columns representing a transposed vector
Vector4 (const Vector< HOMGPLANE3D_TYPE > &v)
cast constructor
Vector4 (const HOMGPLANE3D_TYPEv0, const HOMGPLANE3D_TYPEv1, const HOMGPLANE3D_TYPEv2, const HOMGPLANE3D_TYPEv3)
constructor with element assigment using explicit values
Vector4 (char *s)
constructor with element assignment
Vector4 (const HOMGPLANE3D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector4 (const HOMGPLANE3D_TYPE &scalar)
assignment with a constant value for all elements
Vector4 (const Vector4< HOMGPLANE3D_TYPE > &vec)
copy constructor
Vector4 ()
~HomgPlane3D ()
empty destructor

Protected Attributes

HOMGPLANE3D_TYPE | data_ [VECTOR4SIZE]

Detailed Description

A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0.

Definition at line 47 of file HomgPlane3D.hh.

Constructor & Destructor Documentation

BIAS::HomgPlane3D::HomgPlane3D ( ) [inline]

Definition at line 50 of file HomgPlane3D.hh.

BIAS::HomgPlane3D::HomgPlane3D | ( | HOMGPLANE3D_TYPE | a,
 |  | HOMGPLANE3D_TYPE | b,
 |  | HOMGPLANE3D_TYPE | c,
 |  | HOMGPLANE3D_TYPE | d
 | ) | [inline]

set four values of the plane vector

Definition at line 54 of file HomgPlane3D.hh.

BIAS::HomgPlane3D::HomgPlane3D | ( | const HomgPoint3D & | p1,
 |  | const HomgPoint3D & | p2,
 |  | const HomgPoint3D & | p3
 | ) | [inline]

constructs a homogeneous plane from three points

Author:
koeser 07/2004

Definition at line 171 of file HomgPlane3D.hh.

References BIAS::Matrix3x3< T >::det().

BIAS::HomgPlane3D::HomgPlane3D | ( | const Vector3< double > & | PointOnPlane,
 |  | const Vector3< double > & | NormalVector
 | ) | [inline, explicit]

construct plane, given arbitrary point and normal

Parameters:
NormalVector | unit length normal vector
PointOnPlane | arbitrary point on the plane
Author:
koeser 02/2005

Definition at line 68 of file HomgPlane3D.hh.

BIAS::HomgPlane3D::HomgPlane3D ( const Vector4< HOMGPLANE3D_TYPE > & theplane ) [inline, explicit]

Definition at line 72 of file HomgPlane3D.hh.

References BIAS::Vector4< HOMGPLANE3D_TYPE >::operator=().

BIAS::HomgPlane3D::HomgPlane3D ( const Vector< HOMGPLANE3D_TYPE > & theplane ) [inline, explicit]

Definition at line 75 of file HomgPlane3D.hh.

BIAS::HomgPlane3D::~HomgPlane3D ( ) [inline]

empty destructor

Definition at line 85 of file HomgPlane3D.hh.

Member Function Documentation

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Add | ( | const Vector4< HOMGPLANE3D_TYPE > & | argvec,
 |  | Vector4< HOMGPLANE3D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Add | ( | const HOMGPLANE3D_TYPE & | scalar,
 |  | Vector4< HOMGPLANE3D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::AddIP ( const Vector4< HOMGPLANE3D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPLANE3D_TYPE >::AddIP ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Copy ( const HOMGPLANE3D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

double BIAS::Vector4< HOMGPLANE3D_TYPE >::Dist ( const Vector4< HOMGPLANE3D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

HOMGPLANE3D_TYPE BIAS::HomgPlane3D::DistanceSquared ( const HomgPoint3D & point ) const [inline]

calculates squared distance of a point from plane

Definition at line 160 of file HomgPlane3D.hh.

References BIAS::Vector4< HOMGPLANE3D_TYPE >::data_, and HOMGPLANE3D_TYPE.

Referenced by BIAS::PlaneRANSAC::EvaluateSolution().

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Divide | ( | const HOMGPLANE3D_TYPE & | scalar,
 |  | Vector4< HOMGPLANE3D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::DivideIP ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::ElementwiseProduct | ( | const Vector4< HOMGPLANE3D_TYPE > & | argvec,
 |  | Vector4< HOMGPLANE3D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel untested (03/06/2002)

HOMGPLANE3D_TYPE * BIAS::Vector4< HOMGPLANE3D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 134 of file Vector4.hh.

const HOMGPLANE3D_TYPE * BIAS::Vector4< HOMGPLANE3D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 130 of file Vector4.hh.

int BIAS::HomgPlane3D::GetLineIntersection | ( | const HomgPoint3D & | PointOnLine,
 |  | const HomgPoint3D & | LineDir,
 |  | HomgPoint3D & | Intersection
 | ) | const [inline]

compute the intersection point of the plane with a line (defined by point and direction)

Parameters:
PointOnLine | one arbitrary point on the line
LineDir | The direction of the line, LineDir[3]==0 !
Intersection | (output) A point lying on the line and on the plane
Returns:
- 0 on success
  • +1 point is at infinity (line and plane parallel)
  • -1 line is in the plane, whole line is solution
Author:
koeser 01/2005

Definition at line 214 of file HomgPlane3D.hh.

References BIASABORT, BIASERR, BIAS::Vector4< HOMGPLANE3D_TYPE >::data_, and HOMGPLANE3D_EPS.

Vector3< HOMGPLANE3D_TYPE > BIAS::HomgPlane3D::GetNormalVector ( ) const [inline]

returns normal vector, only wrapper

Definition at line 139 of file HomgPlane3D.hh.

References BIAS::Vector4< HOMGPLANE3D_TYPE >::data_, and HOMGPLANE3D_TYPE.

void BIAS::HomgPlane3D::GetNormalVector ( Vector3< HOMGPLANE3D_TYPE > & normalv ) const [inline]

returns normal vector

Definition at line 149 of file HomgPlane3D.hh.

References BIAS::Vector4< HOMGPLANE3D_TYPE >::data_, and HOMGPLANE3D_TYPE.

bool BIAS::Vector4< HOMGPLANE3D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Multiply | ( | const HOMGPLANE3D_TYPE & | scalar,
 |  | Vector4< HOMGPLANE3D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::MultiplyIP ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::HomgPlane3D::Normalize ( ) [inline]

set first three components to vector of norm 1 and scales w accordingly => encodes Hesse normal form

afterwards w contains the distance of the plane from the origin, while the first three coordinates are the normal vector in euclidian 3-space. This is called the Hesse normal form.

Definition at line 134 of file HomgPlane3D.hh.

References BIAS::Vector4< HOMGPLANE3D_TYPE >::data_.

HOMGPLANE3D_TYPE BIAS::Vector4< HOMGPLANE3D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|+ |d|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Vector4< HOMGPLANE3D_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator *= ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Multiplication operator with scalar argument.

Author:
Ingo Thomsen tested

bool BIAS::Vector4< HOMGPLANE3D_TYPE >::operator!= ( const Vector4< HOMGPLANE3D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
Ingo Thomsen

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator+= ( const Vector4< HOMGPLANE3D_TYPE > & argvec ) [inline, inherited]

add operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator+= ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Addition operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator-= ( const Vector4< HOMGPLANE3D_TYPE > & argvec ) [inline, inherited]

sub operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator-= ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Substraction operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<HOMGPLANE3D_TYPE >& BIAS::Vector4< HOMGPLANE3D_TYPE >::operator/= ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Division operator with scalar argument.

Author:
Ingo Thomsen tested

bool BIAS::Vector4< HOMGPLANE3D_TYPE >::operator== ( const Vector4< HOMGPLANE3D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

HOMGPLANE3D_TYPE & BIAS::Vector4< HOMGPLANE3D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel alpha (03/01/2002)

const HOMGPLANE3D_TYPE & BIAS::Vector4< HOMGPLANE3D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel alpha (03/01/2002)

Matrix4x4<HOMGPLANE3D_TYPE > BIAS::Vector4< HOMGPLANE3D_TYPE >::OuterProduct ( const Vector4< HOMGPLANE3D_TYPE > & v ) const [inherited]

outer product, constructs a matrix.

Often written as v * v^T for col vectors

Author:
frick

bool BIAS::Vector4< HOMGPLANE3D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

void BIAS::Vector4< HOMGPLANE3D_TYPE >::ScalarProduct | ( | const Vector4< HOMGPLANE3D_TYPE > & | argvec,
 |  | HOMGPLANE3D_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel untested

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Set | ( | const HOMGPLANE3D_TYPE & | x,
 |  | const HOMGPLANE3D_TYPE & | y,
 |  | const HOMGPLANE3D_TYPE & | z,
 |  | const HOMGPLANE3D_TYPE & | w
 | ) | [inline, inherited]

set elementwise with given scalr values

Author:
Jan Woetzel, Ingo Thomsen tested (02/28/2002)

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Set ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

set all elements to a scalat value

Author:
Jan Woetzel untested (02/28/2002)

void BIAS::HomgPlane3D::Set | ( | const Vector3< double > & | PointOnPlane,
 |  | const Vector3< double > & | NormalVector
 | ) | [inline]

construct plane, given arbitrary point and normal

Parameters:
NormalVector | unit length normal vector
PointOnPlane | arbitrary point on the plane
Author:
koeser 02/2005

Definition at line 91 of file HomgPlane3D.hh.

References BIAS::Vector3< T >::ScalarProduct().

void BIAS::HomgPlane3D::SetFromVector ( const Vector< HOMGPLANE3D_TYPE > & theplane ) [inline]

Definition at line 78 of file HomgPlane3D.hh.

References BIASASSERT, and TNT::Vector< T >::size().

void BIAS::Vector4< HOMGPLANE3D_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel

const int BIAS::Vector4< HOMGPLANE3D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Sub | ( | const Vector4< HOMGPLANE3D_TYPE > & | argvec,
 |  | Vector4< HOMGPLANE3D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPLANE3D_TYPE >::Sub | ( | const HOMGPLANE3D_TYPE & | scalar,
 |  | Vector4< HOMGPLANE3D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPLANE3D_TYPE >::SubIP ( const Vector4< HOMGPLANE3D_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPLANE3D_TYPE >::SubIP ( const HOMGPLANE3D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Matrix<HOMGPLANE3D_TYPE > BIAS::Vector4< HOMGPLANE3D_TYPE >::transposed ( ) const [inline, inherited]

return a new Matrix with 1 row and 4 columns representing a transposed vector

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( const Vector< HOMGPLANE3D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel untested (03/22/2002)

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 | ( | const HOMGPLANE3D_TYPE | v0,
 |  | const HOMGPLANE3D_TYPE | v1,
 |  | const HOMGPLANE3D_TYPE | v2,
 |  | const HOMGPLANE3D_TYPE | v3
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( const HOMGPLANE3D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( const HOMGPLANE3D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( const Vector4< HOMGPLANE3D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Daniel Grest (06/2003)

Definition at line 70 of file Vector4.hh.

BIAS::Vector4< HOMGPLANE3D_TYPE >::Vector4 ( ) [inline, inherited]

Definition at line 65 of file Vector4.hh.

Member Data Documentation

HOMGPLANE3D_TYPE BIAS::Vector4< HOMGPLANE3D_TYPE >::data_[VECTOR4SIZE] [protected, inherited]

Definition at line 326 of file Vector4.hh.

Referenced by DistanceSquared(), GetLineIntersection(), GetNormalVector(), and Normalize().

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgPlane3D.hh
Generated on Wed Jun 21 19:07:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPoint1D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPoint1D

BIAS::HomgPoint1D Class Reference

class HomgPoint1D describes a point with 2 degrees of freedom in projective coordinates. More...

#include <Base/Geometry/HomgPoint1D.hh>

Inheritance diagram for BIAS::HomgPoint1D:

[legend]
Collaboration diagram for BIAS::HomgPoint1D:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector2< HOMGPOINT1D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGPOINT1D_TYPE &scalar)
Addition (in place) of an scalar.
BIAS::Vector2< HOMGPOINT1D_TYPE > | CoordEuclidianToPolar () const
coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y).
BIAS::Vector2< HOMGPOINT1D_TYPE > | CoordPolarToEuclidian () const
coordinate transform compute the euclidian coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.
void | Copy (const HOMGPOINT1D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector2< HOMGPOINT1D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
void | Divide (const Vector2< HOMGPOINT1D_TYPE > &vec, Vector2< HOMGPOINT1D_TYPE > &dest) const
void | Divide (const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const Vector2< HOMGPOINT1D_TYPE > &vec)
elementwise Division (in place) by a vector
void | DivideIP (const HOMGPOINT1D_TYPE &scalar)
Division (in place) of an scalar.
Vector2< HOMGPOINT1D_TYPE > | ElementwiseDivision (const Vector2< HOMGPOINT1D_TYPE > &argvec) const
void | ElementwiseDivision (const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const
Vector2< HOMGPOINT1D_TYPE > | ElementwiseProduct (const Vector2< HOMGPOINT1D_TYPE > &argvec) const
void | ElementwiseProduct (const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const
multiply two vectors elementwise, storing the result in destvec
void | Fill (HOMGPOINT1D_TYPEvalue)
HOMGPOINT1D_TYPE * | GetData ()
const HOMGPOINT1D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
HOMGPOINT1D_TYPE | GetEuclidian ()
return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
HOMGPOINT1D_TYPE | GetW () const
HOMGPOINT1D_TYPE & | GetW ()
HOMGPOINT1D_TYPE | GetX () const
HOMGPOINT1D_TYPE & | GetX ()
read only access functions to use names instead of indizes
HOMGPOINT1D_TYPE | GetY () const
HOMGPOINT1D_TYPE & | GetY ()
HomgPoint1D (char *s)
constructor with element assignment
HomgPoint1D (const HOMGPOINT1D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
HomgPoint1D (const HOMGPOINT1D_TYPE &scalar)
assignment with a constant value for all elements
HomgPoint1D (const HomgPoint1D &p)
copy constructor
HomgPoint1D ()
default constructor
void Homogenize ()
homogenize class data member elements to W==1 by divison by W
bool | IsZero () const
double | Length () const
return euclidian length
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const HOMGPOINT1D_TYPE &scalar)
Multiplication (in place) of an scalar.
HOMGPOINT1D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2).
bool | operator!= (const Vector2< HOMGPOINT1D_TYPE > &arg) const
Comparison operator 'not equal'.
bool | operator!= (HomgPoint1D &arg)
Comparison operator 'not equal'.
HomgPoint1D & | operator= (const HOMGPOINT1D_TYPE &scalar)
assignment operator set the vector elementwise to scalar value
HomgPoint1D & | operator= (const Vector2< HOMGPOINT1D_TYPE > &vec)
assignment operator set the elements of this HomgPoint to the element of vec
bool | operator== (const Vector2< HOMGPOINT1D_TYPE > &arg) const
Comparison operator 'equal'.
bool | operator== (HomgPoint1D &arg)
Comparison operator 'equal'.
HOMGPOINT1D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGPOINT1D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix2x2< HOMGPOINT1D_TYPE > | OuterProduct (const BIAS::Vector2< HOMGPOINT1D_TYPE > &v) const
void | OuterProduct (const BIAS::Vector2< HOMGPOINT1D_TYPE > &v, BIAS::Matrix2x2< HOMGPOINT1D_TYPE > &mat) const
outer product, constructs a matrix (e.g.
HOMGPOINT1D_TYPE | Phi () const
HOMGPOINT1D_TYPE & | Phi ()
polar form JW
HOMGPOINT1D_TYPE | Radius () const
HOMGPOINT1D_TYPE & | Radius ()
polar form JW
bool | Save (const std::string &filename) const
method to save directly to a given filename.
HOMGPOINT1D_TYPE | ScalarProduct (const Vector2< HOMGPOINT1D_TYPE > &argvec) const
void | ScalarProduct (const Vector2< HOMGPOINT1D_TYPE > &argvec, HOMGPOINT1D_TYPE &result) const
scalar product of two vectors, storing the result in result
void | Set (const HOMGPOINT1D_TYPE &x, const HOMGPOINT1D_TYPE &y)
set elementwise with given scalar values
void | Set (const HOMGPOINT1D_TYPE &scalar)
set all elements to a scalar value
void | SetW (const HOMGPOINT1D_TYPEw)
void | SetX (const HOMGPOINT1D_TYPEx)
set (write) access functions to use names instead of indizes
void | SetY (const HOMGPOINT1D_TYPEy)
void SetZero ()
const int | Size () const
void | Sub (const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector2< HOMGPOINT1D_TYPE > &argvec)
in place subtraction
void | SubIP (const HOMGPOINT1D_TYPE &scalar)
Substraction (in place) of an scalar.
Vector2 (const Vector< HOMGPOINT1D_TYPE > &v)
cast constructor
Vector2 (char *s)
constructor with element assignment
Vector2 (const HOMGPOINT1D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector2 (const HOMGPOINT1D_TYPEv0, const HOMGPOINT1D_TYPEv1)
constructor with element assigment using explicit values
Vector2 (const HOMGPOINT1D_TYPE &scalar)
assignment with a constant value for all elements
Vector2 (const Vector2< HOMGPOINT1D_TYPE > &vec)
copy constructor
Vector2 ()
default constructor
~HomgPoint1D ()
destructor

Protected Attributes

HOMGPOINT1D_TYPE | data_ [VECTOR2SIZE]

Detailed Description

class HomgPoint1D describes a point with 2 degrees of freedom in projective coordinates.

manual loop unrolling is used if possible. The Vector is in row-major order (3 rows, 1 column) the indizes begin with zero (to size-1)

constructors and assignment operators are never inherited, so they are wrapped (or reimplemented) here.

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 56 of file HomgPoint1D.hh.

Constructor & Destructor Documentation

BIAS::HomgPoint1D::~HomgPoint1D ( ) [inline]

destructor

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 64 of file HomgPoint1D.hh.

BIAS::HomgPoint1D::HomgPoint1D ( ) [inline]

default constructor

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 72 of file HomgPoint1D.hh.

BIAS::HomgPoint1D::HomgPoint1D ( const HomgPoint1D & p ) [inline]

copy constructor

Author:
Jan Woetzel untested (03/05/2002)

Definition at line 79 of file HomgPoint1D.hh.

BIAS::HomgPoint1D::HomgPoint1D ( const HOMGPOINT1D_TYPE & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 87 of file HomgPoint1D.hh.

BIAS::HomgPoint1D::HomgPoint1D ( const HOMGPOINT1D_TYPE * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 95 of file HomgPoint1D.hh.

BIAS::HomgPoint1D::HomgPoint1D ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 102 of file HomgPoint1D.hh.

Member Function Documentation

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Add | ( | const Vector2< HOMGPOINT1D_TYPE > & | argvec,
 |  | Vector2< HOMGPOINT1D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 498 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Add | ( | const HOMGPOINT1D_TYPE & | scalar,
 |  | Vector2< HOMGPOINT1D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 418 of file Vector2.hh.

References BIAS::Vector2< T >::data_.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::AddIP ( const Vector2< HOMGPOINT1D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

Definition at line 490 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::AddIP ( const HOMGPOINT1D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 412 of file Vector2.hh.

BIAS::Vector2<HOMGPOINT1D_TYPE > BIAS::Vector2< HOMGPOINT1D_TYPE >::CoordEuclidianToPolar ( ) const [inherited]

coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y).

with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

BIAS::Vector2<HOMGPOINT1D_TYPE > BIAS::Vector2< HOMGPOINT1D_TYPE >::CoordPolarToEuclidian ( ) const [inherited]

coordinate transform compute the euclidian coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Copy ( const HOMGPOINT1D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 139 of file Vector2.hh.

double BIAS::Vector2< HOMGPOINT1D_TYPE >::Dist ( const Vector2< HOMGPOINT1D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

Definition at line 379 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Divide | ( | const Vector2< HOMGPOINT1D_TYPE > & | vec,
 |  | Vector2< HOMGPOINT1D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 474 of file Vector2.hh.

References BIASERR.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Divide | ( | const HOMGPOINT1D_TYPE & | scalar,
 |  | Vector2< HOMGPOINT1D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

Definition at line 464 of file Vector2.hh.

References BIASERR, and BIAS::Vector2< T >::data_.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::DivideIP ( const Vector2< HOMGPOINT1D_TYPE > & vec ) [inline, inherited]

elementwise Division (in place) by a vector

Author:
JW

Definition at line 457 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::DivideIP ( const HOMGPOINT1D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 451 of file Vector2.hh.

Vector2<HOMGPOINT1D_TYPE > BIAS::Vector2< HOMGPOINT1D_TYPE >::ElementwiseDivision ( const Vector2< HOMGPOINT1D_TYPE > & argvec ) const [inline, inherited]

Definition at line 330 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::ElementwiseDivision | ( | const Vector2< HOMGPOINT1D_TYPE > & | argvec,
 |  | Vector2< HOMGPOINT1D_TYPE > & | destvec
 | ) | const [inline, inherited]

Definition at line 323 of file Vector2.hh.

Vector2<HOMGPOINT1D_TYPE > BIAS::Vector2< HOMGPOINT1D_TYPE >::ElementwiseProduct ( const Vector2< HOMGPOINT1D_TYPE > & argvec ) const [inline, inherited]

Definition at line 314 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::ElementwiseProduct | ( | const Vector2< HOMGPOINT1D_TYPE > & | argvec,
 |  | Vector2< HOMGPOINT1D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel (03/06/2002)

Definition at line 307 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Fill ( HOMGPOINT1D_TYPE value ) [inline, inherited]

Definition at line 519 of file Vector2.hh.

HOMGPOINT1D_TYPE * BIAS::Vector2< HOMGPOINT1D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 195 of file Vector2.hh.

const HOMGPOINT1D_TYPE * BIAS::Vector2< HOMGPOINT1D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 191 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::HomgPoint1D::GetEuclidian ( ) [inline]

return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 146 of file HomgPoint1D.hh.

References BIASASSERT, and HOMGPOINT1D_TYPE_EPS.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::GetW ( ) const [inline, inherited]

Definition at line 261 of file Vector2.hh.

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::GetW ( ) [inline, inherited]

Definition at line 250 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::GetX ( ) const [inline, inherited]

Definition at line 255 of file Vector2.hh.

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::GetX ( ) [inline, inherited]

read only access functions to use names instead of indizes

Returns:
the projective coordinate of the vector (they are usually not euclidian!)
Author:
Jan Woetzel untested (03/04/2002)

Definition at line 244 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::GetY ( ) const [inline, inherited]

Definition at line 258 of file Vector2.hh.

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::GetY ( ) [inline, inherited]

Definition at line 247 of file Vector2.hh.

void BIAS::HomgPoint1D::Homogenize ( ) [inline]

homogenize class data member elements to W==1 by divison by W

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 131 of file HomgPoint1D.hh.

References BIASASSERT, and HOMGPOINT1D_TYPE_EPS.

Referenced by operator==().

bool BIAS::Vector2< HOMGPOINT1D_TYPE >::IsZero ( ) const [inline, inherited]

Author:
Jan Woetzel

Definition at line 161 of file Vector2.hh.

References T.

double BIAS::Vector2< HOMGPOINT1D_TYPE >::Length ( ) const [inline, inherited]

return euclidian length

Author:
JW

Definition at line 372 of file Vector2.hh.

bool BIAS::Vector2< HOMGPOINT1D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Multiply | ( | const HOMGPOINT1D_TYPE & | scalar,
 |  | Vector2< HOMGPOINT1D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 444 of file Vector2.hh.

References BIAS::Vector2< T >::data_.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::MultiplyIP ( const HOMGPOINT1D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 438 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 358 of file Vector2.hh.

double BIAS::Vector2< HOMGPOINT1D_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: sqrt(a^2 + b^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 367 of file Vector2.hh.

bool BIAS::Vector2< HOMGPOINT1D_TYPE >::operator!= ( const Vector2< HOMGPOINT1D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
Ingo Thomsen tested

Definition at line 399 of file Vector2.hh.

References BIAS::Vector2< T >::data_.

bool BIAS::HomgPoint1D::operator!= ( HomgPoint1D & arg ) [inline]

Comparison operator 'not equal'.

Author:
Ingo Thomsen tested

Definition at line 179 of file HomgPoint1D.hh.

HomgPoint1D& BIAS::HomgPoint1D::operator= ( const HOMGPOINT1D_TYPE & scalar ) [inline]

assignment operator set the vector elementwise to scalar value

Author:
Jan Woetzel untested (02/28/2002)

Reimplemented from BIAS::Vector2< HOMGPOINT1D_TYPE >.

Definition at line 121 of file HomgPoint1D.hh.

HomgPoint1D& BIAS::HomgPoint1D::operator= ( const Vector2< HOMGPOINT1D_TYPE > & vec ) [inline]

assignment operator set the elements of this HomgPoint to the element of vec

Author:
Jan Woetzel untested (02/25/2002)

Reimplemented from BIAS::Vector2< HOMGPOINT1D_TYPE >.

Definition at line 111 of file HomgPoint1D.hh.

bool BIAS::Vector2< HOMGPOINT1D_TYPE >::operator== ( const Vector2< HOMGPOINT1D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 392 of file Vector2.hh.

References BIAS::Vector2< T >::data_.

bool BIAS::HomgPoint1D::operator== ( HomgPoint1D & arg ) [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 161 of file HomgPoint1D.hh.

References BIAS::Vector2< T >::data_, and Homogenize().

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 232 of file Vector2.hh.

References BIASASSERT, and VECTOR2SIZE.

const HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 222 of file Vector2.hh.

References BIASASSERT, and VECTOR2SIZE.

Matrix2x2<HOMGPOINT1D_TYPE > BIAS::Vector2< HOMGPOINT1D_TYPE >::OuterProduct ( const BIAS::Vector2< HOMGPOINT1D_TYPE > & v ) const [inline, inherited]

Definition at line 350 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::OuterProduct | ( | const BIAS::Vector2< HOMGPOINT1D_TYPE > & | v,
 |  | BIAS::Matrix2x2< HOMGPOINT1D_TYPE > & | mat
 | ) | const [inline, inherited]

outer product, constructs a matrix (e.g.

for covariance).

Author:
koeser 08/2005 (cloned from vector3)

Definition at line 341 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::Phi ( ) const [inline, inherited]

Definition at line 289 of file Vector2.hh.

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::Phi ( ) [inline, inherited]

polar form JW

Definition at line 287 of file Vector2.hh.

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::Radius ( ) const [inline, inherited]

Definition at line 283 of file Vector2.hh.

HOMGPOINT1D_TYPE & BIAS::Vector2< HOMGPOINT1D_TYPE >::Radius ( ) [inline, inherited]

polar form JW

Definition at line 281 of file Vector2.hh.

bool BIAS::Vector2< HOMGPOINT1D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::ScalarProduct ( const Vector2< HOMGPOINT1D_TYPE > & argvec ) const [inline, inherited]

Definition at line 300 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::ScalarProduct | ( | const Vector2< HOMGPOINT1D_TYPE > & | argvec,
 |  | HOMGPOINT1D_TYPE & | result
 | ) | const [inline, inherited]

scalar product of two vectors, storing the result in result

Author:
Jan Woetzel untested

Definition at line 296 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Set | ( | const HOMGPOINT1D_TYPE & | x,
 |  | const HOMGPOINT1D_TYPE & | y
 | ) | [inline, inherited]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 171 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Set ( const HOMGPOINT1D_TYPE & scalar ) [inline, inherited]

set all elements to a scalar value

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 149 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SetW ( const HOMGPOINT1D_TYPE w ) [inline, inherited]

Definition at line 276 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SetX ( const HOMGPOINT1D_TYPE x ) [inline, inherited]

set (write) access functions to use names instead of indizes

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 270 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SetY ( const HOMGPOINT1D_TYPE y ) [inline, inherited]

Definition at line 273 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SetZero ( ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 155 of file Vector2.hh.

const int BIAS::Vector2< HOMGPOINT1D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 180 of file Vector2.hh.

References VECTOR2SIZE.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Sub | ( | const Vector2< HOMGPOINT1D_TYPE > & | argvec,
 |  | Vector2< HOMGPOINT1D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 514 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::Sub | ( | const HOMGPOINT1D_TYPE & | scalar,
 |  | Vector2< HOMGPOINT1D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 431 of file Vector2.hh.

References BIAS::Vector2< T >::data_.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SubIP ( const Vector2< HOMGPOINT1D_TYPE > & argvec ) [inline, inherited]

in place subtraction

Author:
Ingo Thomsen tested

Definition at line 506 of file Vector2.hh.

void BIAS::Vector2< HOMGPOINT1D_TYPE >::SubIP ( const HOMGPOINT1D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 425 of file Vector2.hh.

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( const Vector< HOMGPOINT1D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel alpha (03/22/2002)

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 123 of file Vector2.hh.

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( const HOMGPOINT1D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 116 of file Vector2.hh.

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 | ( | const HOMGPOINT1D_TYPE | v0,
 |  | const HOMGPOINT1D_TYPE | v1
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

Definition at line 106 of file Vector2.hh.

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( const HOMGPOINT1D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 98 of file Vector2.hh.

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( const Vector2< HOMGPOINT1D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Jan Woetzel alpha (03/05/2002)

Definition at line 91 of file Vector2.hh.

References BIAS::Vector2< T >::GetData().

BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2 ( ) [inline, inherited]

default constructor

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 86 of file Vector2.hh.

Member Data Documentation

HOMGPOINT1D_TYPE BIAS::Vector2< HOMGPOINT1D_TYPE >::data_[VECTOR2SIZE] [protected, inherited]

Definition at line 560 of file Vector2.hh.

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgPoint1D.hh
Generated on Wed Jun 21 19:07:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPoint2D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPoint2D

BIAS::HomgPoint2D Class Reference
[Geometry and Transformations]

class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates. More...

#include <Base/Geometry/HomgPoint2D.hh>

Inheritance diagram for BIAS::HomgPoint2D:

[legend]
Collaboration diagram for BIAS::HomgPoint2D:

[legend]
List of all members.

Public Types

enum ELocation {
LOC_LEFT, LOC_RIGHT, LOC_MIDDLE, LOC_UPPER,
LOC_LOWER, LOC_undef
}
enum EPosition {
Left, Right, Bottom, Top,
TopLeft, TopRight, BottomLeft, BottomRight,
Center, Infinity, InvalidPosition
}

Public Member Functions

void | Add (const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector3< HOMGPOINT2D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGPOINT2D_TYPE &scalar)
Addition (in place) of an scalar.
BIAS::Vector3< HOMGPOINT2D_TYPE > | CartesianToPolar () const
BIAS::Vector3< HOMGPOINT2D_TYPE > | CoordEuclidianToSphere () const
coordinate transform.
BIAS::Vector3< HOMGPOINT2D_TYPE > | CoordSphereToEuclidian () const
coordinate transfrom.
Vector3< HOMGPOINT2D_TYPE > | CrossProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec) const
void | CrossProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const
cross product of two vectors destvec = this x argvec
enum EPosition | DeterminePosition (unsigned int width, unsigned int height)
double | Dist (const Vector3< HOMGPOINT2D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
HOMGPOINT2D_TYPE | Distance (HomgPoint2D &point)
HOMGPOINT2D_TYPE | DistanceSquared (HomgPoint2D &point)
void | Div (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
void | Divide (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const HOMGPOINT2D_TYPE &scalar)
Division (in place) of an scalar.
void | DivIP (const HOMGPOINT2D_TYPE &scalar)
Vector3< HOMGPOINT2D_TYPE > | ElementwiseDivision (const Vector3< HOMGPOINT2D_TYPE > &argvec) const
divide elementwise
void | ElementwiseDivision (const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const
Vector3< HOMGPOINT2D_TYPE > | ElementwiseProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec) const
multiply two vectors elementwise and return the result vector
void | ElementwiseProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const
multiply two vectors elementwise and store the result vector to destvec
HOMGPOINT2D_TYPE * | GetData ()
const HOMGPOINT2D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
Vector2< HOMGPOINT2D_TYPE > | GetEuclidian () const
return teh euclidian coordinates of this homg 2D point Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
void | GetEuclidian (Vector2< HOMGPOINT2D_TYPE > &dest) const
calculate affine coordinates of this and write them to dest affine coordinates are projective coordinates with last element w == 1; Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
HOMGPOINT2D_TYPE | GetEuclidianX () const
return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
HOMGPOINT2D_TYPE | GetEuclidianY () const
bool | GetImageCoo (unsigned int width, unsigned int height, unsigned int coo[2])
return image coordinates for drawing , coo[0]=x, coo[1]=y
BIAS::Vector3< HOMGPOINT2D_TYPE > | GetNormalized () const
return a normalized vector of this
Matrix< HOMGPOINT2D_TYPE > | GetSkewSymmetricMatrix () const
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product
HOMGPOINT2D_TYPE | GetW () const
HomgPoint2D (const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &w)
constructor
HomgPoint2D (const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y)
constructor using euclidic coordinates, setting the 3rd HomgPoint2D component to 1
HomgPoint2D (const Vector3< double > &vec)
constructor from Vector3
HomgPoint2D (char *s)
constructor with element assignment
HomgPoint2D (const HOMGPOINT2D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
HomgPoint2D (const HOMGPOINT2D_TYPE &scalar)
assignment with a constant value for all elements
HomgPoint2D (const HomgPoint2D &p)
copy constructor
HomgPoint2D ()
default constructor
HomgPoint2D & | Homogenize (Matrix3x3< double > &cov)
homogenizes the point and transforms the associated covariance matrix
HomgPoint2D & Homogenize ()
homogenize class data member elements to W==1 by divison by W
bool | IsAtInfinity () const
bool | IsHomogenized () const
bool | IsInROI (const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const
determines if point is within rectangular RegionOfInterest
bool | IsInROIHomogenized (const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const
determines if point is within rectangular RegionOfInterest
bool | IsZero () const
double | Length () const
returns the Euclidean Length of the Vector
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogTC (const std::string &filename)
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.
void | Mult (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
void | MultIP (const HOMGPOINT2D_TYPE &scalar)
void | Multiply (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
Multiplication with a scalar, storing results in destination vector.
void | MultiplyIP (const HOMGPOINT2D_TYPE &scalar)
Multiplication (in place) of an scalar.
Vector3< HOMGPOINT2D_TYPE > & | Normalize (Matrix3x3< HOMGPOINT2D_TYPE > &cov)
normalizes the vector to 1 and transfroms the associated covaqriance matrix
Vector3< HOMGPOINT2D_TYPE > & | Normalize ()
normalize this vector to length 1
HOMGPOINT2D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|.
double | NormL2 () const
the L2 norm sqrt(a^2 + b^2 + c^2)
bool | operator!= (const Vector3< HOMGPOINT2D_TYPE > &arg) const
Comparison operator 'not equal'.
bool | operator!= (HomgPoint2D &arg)
Comparison operator 'not equal'.
HomgPoint2D & | operator= (const HOMGPOINT2D_TYPE &scalar)
assignment operator set the vector elementwise to scalar value
HomgPoint2D & | operator= (const Vector3< HOMGPOINT2D_TYPE > &vec)
assignment operator set the elements of this HomgPoint to the element of vec
bool | operator== (const Vector3< HOMGPOINT2D_TYPE > &arg) const
Comparison operator 'equal'.
bool | operator== (HomgPoint2D &arg)
Comparison operator 'equal'.
HOMGPOINT2D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGPOINT2D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix3x3< HOMGPOINT2D_TYPE > | OuterProduct (const Vector3< HOMGPOINT2D_TYPE > &v) const
void | OuterProduct (const Vector3< HOMGPOINT2D_TYPE > &v, Matrix3x3< HOMGPOINT2D_TYPE > &res) const
outer product, constructs a matrix.
HOMGPOINT2D_TYPE | Phi () const
HOMGPOINT2D_TYPE & | Phi ()
BIAS::Vector3< HOMGPOINT2D_TYPE > | PolarToCartesian () const
HOMGPOINT2D_TYPE | Radius () const
HOMGPOINT2D_TYPE & | Radius ()
r for polar/sphere content JW
bool | Save (const std::string &filename) const
method to save directly to a given filename.
HOMGPOINT2D_TYPE | ScalarProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec) const
scalar product (=inner product) of two vectors returns a scalar
void | ScalarProduct (const Vector3< HOMGPOINT2D_TYPE > &argvec, HOMGPOINT2D_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const HOMGPOINT2D_TYPE &scalar)
set all elements to a scalar value
void | Set (const HOMGPOINT2D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
void | Set (const Vector< HOMGPOINT2D_TYPE > &vec)
Sets this form elements of Vector<T>.
void | Set (const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &z)
set elementwise with given scalar values
void | Set (const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y)
set elementwise with given 2 euclidian scalar values.
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const
Substraction with a scalar, storing results in destination vector.
void | SubIP (const Vector3< HOMGPOINT2D_TYPE > &argvec)
in place substraction
void | SubIP (const HOMGPOINT2D_TYPE &scalar)
Substraction (in place) of an scalar.
HOMGPOINT2D_TYPE | Theta () const
HOMGPOINT2D_TYPE & | Theta ()
Vector3 (const Vector< HOMGPOINT2D_TYPE > &v)
cast constructor
Vector3 (const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &z)
constructor with element assigment using explicit values
Vector3 (char *s)
constructor with element assignment
Vector3 (const HOMGPOINT2D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector3 (const HOMGPOINT2D_TYPE &scalar)
assignment with a constant value for all elements
Vector3 (const Vector3< HOMGPOINT2D_TYPE > &vec)
copy constructor
Vector3 ()
~HomgPoint2D ()
destructor

Protected Attributes

HOMGPOINT2D_TYPE | data_ [VECTOR3_SIZE]

Detailed Description

class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.

manual loop unrolling is used if possible. The Vector is in row-major order (3 rows, 1 column) the indizes begin with zero (to size-1)

constructors and assignment operators are never inherited, so they are wrapped (or reimplemented) here.

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 63 of file HomgPoint2D.hh.

Member Enumeration Documentation

enum BIAS::HomgPoint2D::ELocation

Enumerator:
LOC_LEFT
LOC_RIGHT
LOC_MIDDLE
LOC_UPPER
LOC_LOWER
LOC_undef

Definition at line 66 of file HomgPoint2D.hh.

enum BIAS::HomgPoint2D::EPosition

Enumerator:
Left
Right
Bottom
Top
TopLeft
TopRight
BottomLeft
BottomRight
Center
Infinity
InvalidPosition

Definition at line 69 of file HomgPoint2D.hh.

Constructor & Destructor Documentation

BIAS::HomgPoint2D::HomgPoint2D ( ) [inline]

default constructor

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 75 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D ( const HomgPoint2D & p ) [inline]

copy constructor

Author:
Jan Woetzel (03/05/2002)

Definition at line 86 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D ( const HOMGPOINT2D_TYPE & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel (03/01/2002)

Definition at line 92 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D ( const HOMGPOINT2D_TYPE * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel (02/28/2002)

Definition at line 98 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel (03/01/2002)

Definition at line 103 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D ( const Vector3< double > & vec ) [inline]

constructor from Vector3

Definition at line 106 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D | ( | const HOMGPOINT2D_TYPE & | x,
 |  | const HOMGPOINT2D_TYPE & | y
 | ) | [inline]

constructor using euclidic coordinates, setting the 3rd HomgPoint2D component to 1

Author:
Ingo Thomsen

Definition at line 115 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::HomgPoint2D | ( | const HOMGPOINT2D_TYPE & | x,
 |  | const HOMGPOINT2D_TYPE & | y,
 |  | const HOMGPOINT2D_TYPE & | w
 | ) | [inline]

constructor

Author:
woelk 02 2003

Definition at line 125 of file HomgPoint2D.hh.

BIAS::HomgPoint2D::~HomgPoint2D ( ) [inline]

destructor

Author:
Jan Woetzel (02/28/2002)

Definition at line 134 of file HomgPoint2D.hh.

Member Function Documentation

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Add | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | Vector3< HOMGPOINT2D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Add | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGPOINT2D_TYPE >::AddIP ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

Definition at line 287 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::AddIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 248 of file Vector3.hh.

BIAS::Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::CartesianToPolar ( ) const [inline, inherited]

Definition at line 357 of file Vector3.hh.

BIAS::Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::CoordEuclidianToSphere ( ) const [inherited]

coordinate transform.

compute the sphere coordinates(r, phi, theta) for (this) given euclidian point p=(x,y,z) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

BIAS::Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::CoordSphereToEuclidian ( ) const [inherited]

coordinate transfrom.

compute the euclidian coord p=(x,y,z) for (this) given sphere coord sph=(radius, phi, theta) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::CrossProduct ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) const [inline, inherited]

Returns:
cross product = this x argvec
Author:
Jan Woetzel alpha

Definition at line 205 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::CrossProduct | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | Vector3< HOMGPOINT2D_TYPE > & | destvec
 | ) | const [inline, inherited]

cross product of two vectors destvec = this x argvec

Author:
Ingo Thomsen, Jan Woetzel alpha

enum HomgPoint2D::EPosition BIAS::HomgPoint2D::DeterminePosition | ( | unsigned int | width,
 |  | unsigned int | height
 | ) | [inline]

Definition at line 357 of file HomgPoint2D.hh.

References BIASERR, Bottom, BottomLeft, BottomRight, Center, InvalidPosition, IsAtInfinity(), Left, LOC_LEFT, LOC_LOWER, LOC_MIDDLE, LOC_RIGHT, LOC_undef, LOC_UPPER, Right, Top, TopLeft, and TopRight.

Referenced by BIAS::EpipolarLine::Init(), and MainFrame::OnLeftDown().

double BIAS::Vector3< HOMGPOINT2D_TYPE >::Dist ( const Vector3< HOMGPOINT2D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

HOMGPOINT2D_TYPE BIAS::HomgPoint2D::Distance ( HomgPoint2D & point ) [inline]

Definition at line 327 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::data_, and Homogenize().

Referenced by AddErr(), BIAS::TrackerSynth< StorageType, CalculationType >::FindNearest_(), and main().

HOMGPOINT2D_TYPE BIAS::HomgPoint2D::DistanceSquared ( HomgPoint2D & point ) [inline]

Definition at line 334 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::data_, and Homogenize().

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Div | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 281 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Divide | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGPOINT2D_TYPE >::DivideIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGPOINT2D_TYPE >::DivIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Definition at line 276 of file Vector3.hh.

Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::ElementwiseDivision ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) const [inline, inherited]

divide elementwise

Author:
Jan Woetzel

Definition at line 238 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::ElementwiseDivision | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | Vector3< HOMGPOINT2D_TYPE > & | destvec
 | ) | const [inline, inherited]

Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::ElementwiseProduct ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) const [inline, inherited]

multiply two vectors elementwise and return the result vector

Author:
Jan Woetzel (03/06/2002)

Definition at line 226 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::ElementwiseProduct | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | Vector3< HOMGPOINT2D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise and store the result vector to destvec

Author:
Jan Woetzel alpha (03/06/2002)

HOMGPOINT2D_TYPE * BIAS::Vector3< HOMGPOINT2D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 147 of file Vector3.hh.

const HOMGPOINT2D_TYPE * BIAS::Vector3< HOMGPOINT2D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 146 of file Vector3.hh.

Vector2<HOMGPOINT2D_TYPE> BIAS::HomgPoint2D::GetEuclidian ( ) const [inline]

return teh euclidian coordinates of this homg 2D point Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 232 of file HomgPoint2D.hh.

void BIAS::HomgPoint2D::GetEuclidian ( Vector2< HOMGPOINT2D_TYPE > & dest ) const [inline]

calculate affine coordinates of this and write them to dest affine coordinates are projective coordinates with last element w == 1; Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)

Author:
Jan Woetzel, (03/04/2002)

Definition at line 220 of file HomgPoint2D.hh.

References BIAS::Vector2< T >::GetData().

HOMGPOINT2D_TYPE BIAS::HomgPoint2D::GetEuclidianX ( ) const [inline]

return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 244 of file HomgPoint2D.hh.

References BIASASSERT, and HOMGPOINT2D_TYPE_EPS.

HOMGPOINT2D_TYPE BIAS::HomgPoint2D::GetEuclidianY ( ) const [inline]

Definition at line 251 of file HomgPoint2D.hh.

References BIASASSERT, and HOMGPOINT2D_TYPE_EPS.

bool BIAS::HomgPoint2D::GetImageCoo | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | coo[2]
 | ) | [inline]

return image coordinates for drawing , coo[0]=x, coo[1]=y

Definition at line 342 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::data_, and Homogenize().

BIAS::Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::GetNormalized ( ) const [inherited]

return a normalized vector of this

norm. to length 1

Author:
Jan Woetzel
Date:
06/2003

Matrix<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::GetSkewSymmetricMatrix ( ) const [inherited]

constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product

Author:
koeser 09/2003

HOMGPOINT2D_TYPE BIAS::HomgPoint2D::GetW ( ) const [inline]

Definition at line 130 of file HomgPoint2D.hh.

HomgPoint2D& BIAS::HomgPoint2D::Homogenize ( Matrix3x3< double > & cov )

homogenizes the point and transforms the associated covariance matrix

Author:
woelk 03/2005 untested

HomgPoint2D& BIAS::HomgPoint2D::Homogenize ( ) [inline]

homogenize class data member elements to W==1 by divison by W

Author:
koeser (originally jw) optimized

Definition at line 192 of file HomgPoint2D.hh.

References HOMGPOINT2D_TYPE, and HOMGPOINT2D_TYPE_EPS.

Referenced by BIAS::GenSynthMatches::_IsSeen(), BIAS::FMatrixBase::Compose(), BIAS::Triangulation::CorrectCorrespondences(), CreateMatches(), CreateMatches2(), Distance(), DistanceSquared(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::EpipolarLine::DrawWhole(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::Triangulation::GetCovariance2D(), BIAS::FMatrixBase::GetEpipolarError(), BIAS::FMatrix::GetEpipolesHomogenized(), BIAS::HMatrixEstimation::GetError(), GetImageCoo(), BIAS::HMatrix::GetMappedError(), BIAS::HMatrix::GetMappedRange(), BIAS::HomgLine2D::GetPerpendicularLine(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), HErrorFunction(), BIAS::HomgPoint2DCov::Homogenize(), BIAS::HomgLine2D::Intersection(), main(), operator==(), BIAS::FMatrixBase::Set(), BIAS::EMatrixBase::Set(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersZoom::Undistort(), and BIAS::ProjectionParametersPerspective::Undistort().

bool BIAS::HomgPoint2D::IsAtInfinity ( ) const [inline]

Definition at line 155 of file HomgPoint2D.hh.

References HOMGPOINT2D_TYPE_EPS.

Referenced by DeterminePosition(), BIAS::Triangulation::GetCovariance(), BIAS::HomgPoint2DCov::Homogenize(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::Conic2D::SetPointAndCovariance(), and BIAS::CornerMatcher::SSD().

bool BIAS::HomgPoint2D::IsHomogenized ( ) const [inline]

Author:
woelk 04 2003

Definition at line 183 of file HomgPoint2D.hh.

References HOMGPOINT2D_TYPE_EPS.

Referenced by BIAS::Triangulation::GetCovariance(), BIAS::Triangulation::GetCovarianceAnalytic(), and IsInROIHomogenized().

bool BIAS::HomgPoint2D::IsInROI | ( | const HOMGPOINT2D_TYPE & | xmin,
 |  | const HOMGPOINT2D_TYPE & | ymin,
 |  | const HOMGPOINT2D_TYPE & | xmax,
 |  | const HOMGPOINT2D_TYPE & | ymax
 | ) | const [inline]

determines if point is within rectangular RegionOfInterest

Author:
koeser 03/2004

Definition at line 462 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::data_.

bool BIAS::HomgPoint2D::IsInROIHomogenized | ( | const HOMGPOINT2D_TYPE & | xmin,
 |  | const HOMGPOINT2D_TYPE & | ymin,
 |  | const HOMGPOINT2D_TYPE & | xmax,
 |  | const HOMGPOINT2D_TYPE & | ymax
 | ) | const [inline]

determines if point is within rectangular RegionOfInterest

Attention:
point is assumed to be homogenized !
Author:
koeser 03/2004

Definition at line 444 of file HomgPoint2D.hh.

References BIASABORT, BIASERR, BIAS::Vector3< HOMGPOINT2D_TYPE >::data_, and IsHomogenized().

bool BIAS::Vector3< HOMGPOINT2D_TYPE >::IsZero ( ) const [inline, inherited]

Returns:
true iff all elements are equal zero JW

double BIAS::Vector3< HOMGPOINT2D_TYPE >::Length ( ) const [inline, inherited]

returns the Euclidean Length of the Vector

Author:
Jan Woetzel

Definition at line 137 of file Vector3.hh.

bool BIAS::Vector3< HOMGPOINT2D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

int BIAS::Vector3< HOMGPOINT2D_TYPE >::LoadBogTC ( const std::string & filename ) [inherited]

reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Mult | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Definition at line 270 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::MultIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Definition at line 265 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Multiply | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGPOINT2D_TYPE >::MultiplyIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 264 of file Vector3.hh.

Vector3<HOMGPOINT2D_TYPE >& BIAS::Vector3< HOMGPOINT2D_TYPE >::Normalize ( Matrix3x3< HOMGPOINT2D_TYPE > & cov ) [inherited]

normalizes the vector to 1 and transfroms the associated covaqriance matrix

Author:
woelk 03/2006

Vector3<HOMGPOINT2D_TYPE >& BIAS::Vector3< HOMGPOINT2D_TYPE >::Normalize ( ) [inline, inherited]

normalize this vector to length 1

Author:
Jan Woetzel / koeser
Returns:
reference to updated (*this)
Date:
04/25/2002

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Vector3< HOMGPOINT2D_TYPE >::NormL2 ( ) const [inline, inherited]

the L2 norm sqrt(a^2 + b^2 + c^2)

Author:
woelk 01 2003

bool BIAS::Vector3< HOMGPOINT2D_TYPE >::operator!= ( const Vector3< HOMGPOINT2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
woelk 01 2003

Definition at line 436 of file Vector3.hh.

References BIAS::operator==().

bool BIAS::HomgPoint2D::operator!= ( HomgPoint2D & arg ) [inline]

Comparison operator 'not equal'.

Author:
Ingo Thomsen tested

Definition at line 289 of file HomgPoint2D.hh.

References HOMGPOINT2D_TYPE.

HomgPoint2D& BIAS::HomgPoint2D::operator= ( const HOMGPOINT2D_TYPE & scalar ) [inline]

assignment operator set the vector elementwise to scalar value

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 149 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::Set().

HomgPoint2D& BIAS::HomgPoint2D::operator= ( const Vector3< HOMGPOINT2D_TYPE > & vec ) [inline]

assignment operator set the elements of this HomgPoint to the element of vec

Author:
Jan Woetzel alpha (02/25/2002)

Reimplemented from BIAS::Vector3< HOMGPOINT2D_TYPE >.

Definition at line 140 of file HomgPoint2D.hh.

References BIAS::Vector3< T >::GetData(), and BIAS::Vector3< HOMGPOINT2D_TYPE >::Set().

bool BIAS::Vector3< HOMGPOINT2D_TYPE >::operator== ( const Vector3< HOMGPOINT2D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 431 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

bool BIAS::HomgPoint2D::operator== ( HomgPoint2D & arg ) [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 268 of file HomgPoint2D.hh.

References BIAS::Vector3< T >::data_, and Homogenize().

HOMGPOINT2D_TYPE & BIAS::Vector3< HOMGPOINT2D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

const HOMGPOINT2D_TYPE & BIAS::Vector3< HOMGPOINT2D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member function const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Matrix3x3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::OuterProduct ( const Vector3< HOMGPOINT2D_TYPE > & v ) const [inline, inherited]

Definition at line 317 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::OuterProduct | ( | const Vector3< HOMGPOINT2D_TYPE > & | v,
 |  | Matrix3x3< HOMGPOINT2D_TYPE > & | res
 | ) | const [inherited]

outer product, constructs a matrix.

Often written as (*this) * v^T for col vectors made it fast

Author:
Daniel Grest, Sept 2003, woelk 07/2004 tested

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::Phi ( ) const [inline, inherited]

Definition at line 369 of file Vector3.hh.

HOMGPOINT2D_TYPE & BIAS::Vector3< HOMGPOINT2D_TYPE >::Phi ( ) [inline, inherited]

Definition at line 367 of file Vector3.hh.

BIAS::Vector3<HOMGPOINT2D_TYPE > BIAS::Vector3< HOMGPOINT2D_TYPE >::PolarToCartesian ( ) const [inline, inherited]

Definition at line 341 of file Vector3.hh.

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::Radius ( ) const [inline, inherited]

Definition at line 364 of file Vector3.hh.

HOMGPOINT2D_TYPE & BIAS::Vector3< HOMGPOINT2D_TYPE >::Radius ( ) [inline, inherited]

r for polar/sphere content JW

Definition at line 362 of file Vector3.hh.

bool BIAS::Vector3< HOMGPOINT2D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::ScalarProduct ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) const [inline, inherited]

scalar product (=inner product) of two vectors returns a scalar

Author:
Jan Woetzel, Ingo Thomsen alpha

void BIAS::Vector3< HOMGPOINT2D_TYPE >::ScalarProduct | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | HOMGPOINT2D_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Set ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

set all elements to a scalar value

Author:
Jan Woetzel, untested (02/28/2002)

Definition at line 110 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Set ( const HOMGPOINT2D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel, untested (02/28/2002)

Referenced by operator=(), and Set().

void BIAS::HomgPoint2D::Set ( const Vector< HOMGPOINT2D_TYPE > & vec ) [inline]

Sets this form elements of Vector<T>.

Reimplemented from BIAS::Vector3< HOMGPOINT2D_TYPE >.

Definition at line 172 of file HomgPoint2D.hh.

References BIASERR, and TNT::Vector< T >::size().

void BIAS::HomgPoint2D::Set | ( | const HOMGPOINT2D_TYPE & | x,
 |  | const HOMGPOINT2D_TYPE & | y,
 |  | const HOMGPOINT2D_TYPE & | z
 | ) | [inline]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

Reimplemented from BIAS::Vector3< HOMGPOINT2D_TYPE >.

Definition at line 167 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::Set().

void BIAS::HomgPoint2D::Set | ( | const HOMGPOINT2D_TYPE & | x,
 |  | const HOMGPOINT2D_TYPE & | y
 | ) | [inline]

set elementwise with given 2 euclidian scalar values.

the additional W-coordinate is set to 1

Author:
Jan Woetzel alpha (03/05/2002)

Definition at line 164 of file HomgPoint2D.hh.

References BIAS::Vector3< HOMGPOINT2D_TYPE >::Set().

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::Triangulation::GetCovariance2D(), BIAS::GeometryGL::GetImgCorner3d(), BIAS::Conic2D::GetTangentPoints(), BIAS::Camera< StorageType >::Init_(), main(), BIAS::CornerMatcher::NCCSearch(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), and BIAS::SphericalUndistortion::ProjectCoord().

void BIAS::Vector3< HOMGPOINT2D_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel 01/2003

const int BIAS::Vector3< HOMGPOINT2D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel (02/28/2002)

Definition at line 131 of file Vector3.hh.

References VECTOR3_SIZE.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Sub | ( | const Vector3< HOMGPOINT2D_TYPE > & | argvec,
 |  | Vector3< HOMGPOINT2D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector3< HOMGPOINT2D_TYPE >::Sub | ( | const HOMGPOINT2D_TYPE & | scalar,
 |  | Vector3< HOMGPOINT2D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

void BIAS::Vector3< HOMGPOINT2D_TYPE >::SubIP ( const Vector3< HOMGPOINT2D_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

Definition at line 297 of file Vector3.hh.

void BIAS::Vector3< HOMGPOINT2D_TYPE >::SubIP ( const HOMGPOINT2D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 256 of file Vector3.hh.

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::Theta ( ) const [inline, inherited]

Definition at line 374 of file Vector3.hh.

HOMGPOINT2D_TYPE & BIAS::Vector3< HOMGPOINT2D_TYPE >::Theta ( ) [inline, inherited]

Definition at line 372 of file Vector3.hh.

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( const Vector< HOMGPOINT2D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel, untested (03/22/2002)

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 | ( | const HOMGPOINT2D_TYPE & | x,
 |  | const HOMGPOINT2D_TYPE & | y,
 |  | const HOMGPOINT2D_TYPE & | z
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen, tested (03/04/2002)

Definition at line 94 of file Vector3.hh.

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( const HOMGPOINT2D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel (02/28/2002)

Definition at line 85 of file Vector3.hh.

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( const HOMGPOINT2D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel (03/01/2002)

Definition at line 80 of file Vector3.hh.

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( const Vector3< HOMGPOINT2D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Jan Woetzel (03/05/2002)

Definition at line 76 of file Vector3.hh.

BIAS::Vector3< HOMGPOINT2D_TYPE >::Vector3 ( ) [inline, inherited]

Definition at line 70 of file Vector3.hh.

Member Data Documentation

HOMGPOINT2D_TYPE BIAS::Vector3< HOMGPOINT2D_TYPE >::data_[VECTOR3_SIZE] [protected, inherited]

Definition at line 445 of file Vector3.hh.

Referenced by Distance(), DistanceSquared(), GetImageCoo(), IsInROI(), and IsInROIHomogenized().

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgPoint2D.hh
Generated on Wed Jun 21 19:07:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPoint2DCov Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPoint2DCov

BIAS::HomgPoint2DCov Class Reference

class representing the covariance matrix of a homogenous point 2D More...

#include <Base/Geometry/HomgPoint2DCov.hh>

Inheritance diagram for BIAS::HomgPoint2DCov:

[legend]
Collaboration diagram for BIAS::HomgPoint2DCov:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
double | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< double > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
double | GetDeterminant () const
returns the Determinant |A| of this
Matrix2x2< double > | GetEuclidean () const
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< double > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< double > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
HomgPoint2DCov (const TNT::Matrix< double > &m)
HomgPoint2DCov (const Matrix< double > &m)
HomgPoint2DCov (const Matrix3x3< double > &m)
HomgPoint2DCov (const MatrixInitType &i)
HomgPoint2DCov ()
void Homogenize (HomgPoint2D &p)
homogenizes p and *this
int | Invert (Matrix3x3< double > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< double > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsHomogenized () const
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
bool | IsZero () const
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< double > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< double > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< double > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (double &max, double &min) const
return biggest and smallest entry
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< double > &argmat, Matrix3x4< double > &destmat) const
void | Mult (const Matrix3x3< double > &argmat, Matrix3x3< double > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< double > &argvec, Vector3< double > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const double &scalar, Matrix3x3< double > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | SetAsCrossProductMatrix (const double &x, const double &y, const double &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< double > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void | SetEuclidean (const Matrix2x2< double > &m)
void | SetFromColumnVectors (const BIAS::Vector3< double > &v0, const BIAS::Vector3< double > &v1, const BIAS::Vector3< double > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< double > &v0, const BIAS::Vector3< double > &v1, const BIAS::Vector3< double > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< double > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< double > &arg)
sets this as transposed arg, fw
Matrix3x3< double > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< double > &argvec, Vector3< double > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
virtual | ~HomgPoint2DCov ()

Protected Member Functions

bool | CheckSymmetry_ () const
void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class representing the covariance matrix of a homogenous point 2D

Author:
woelk 03/2006

Definition at line 40 of file HomgPoint2DCov.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

HomgPoint2DCov::HomgPoint2DCov ( )

Definition at line 35 of file HomgPoint2DCov.cpp.

HomgPoint2DCov::HomgPoint2DCov ( const MatrixInitType & i )

Definition at line 40 of file HomgPoint2DCov.cpp.

HomgPoint2DCov::HomgPoint2DCov ( const Matrix3x3< double > & m )

Definition at line 44 of file HomgPoint2DCov.cpp.

References BEXCEPTION, and CheckSymmetry_().

HomgPoint2DCov::HomgPoint2DCov ( const Matrix< double > & m )

Definition at line 56 of file HomgPoint2DCov.cpp.

References BEXCEPTION, and CheckSymmetry_().

HomgPoint2DCov::HomgPoint2DCov ( const TNT::Matrix< double > & m )

Definition at line 65 of file HomgPoint2DCov.cpp.

References BEXCEPTION, and CheckSymmetry_().

HomgPoint2DCov::~HomgPoint2DCov ( ) [virtual]

Definition at line 74 of file HomgPoint2DCov.cpp.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

bool HomgPoint2DCov::CheckSymmetry_ ( ) const [protected]

Definition at line 128 of file HomgPoint2DCov.cpp.

References BIAS::Equal().

Referenced by HomgPoint2DCov(), and SetEuclidean().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

double BIAS::Matrix3x3< double >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<double > BIAS::Matrix3x3< double >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::EuclideanTransf3D::Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

double BIAS::Matrix3x3< double >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

Matrix2x2< double > HomgPoint2DCov::GetEuclidean ( ) const

Definition at line 99 of file HomgPoint2DCov.cpp.

References BEXCEPTION, IsHomogenized(), and res.

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<double > BIAS::Matrix3x3< double >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< double >::GetRow | ( | const unsigned int | row,
 |  | Vector3< double > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

void HomgPoint2DCov::Homogenize ( HomgPoint2D & p )

homogenizes p and *this

Author:
woelk 03/2006

Definition at line 78 of file HomgPoint2DCov.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint2D::IsAtInfinity(), and BIAS::MatrixZero.

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< double >::Invert ( Matrix3x3< double > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<double > BIAS::Matrix3x3< double >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< double >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::HomgPoint2DCov::IsHomogenized ( ) const [inline]

Definition at line 64 of file HomgPoint2DCov.hh.

References BIAS::Equal().

Referenced by GetEuclidean().

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::HomgPoint2DCov::IsZero ( ) const [inline]

Definition at line 70 of file HomgPoint2DCov.hh.

References BIAS::Equal().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< double >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, and BIAS::Pose.

int BIAS::Matrix3x3< double >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< double >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< double >::Matrix3x3 ( const TNT::Matrix< double > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< double >::Matrix3x3 ( const Matrix< double > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< double >::Matrix3x3 ( const Matrix3x3< double > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< double >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< double >::Matrix3x3 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< double >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< double >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< double >::MaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< double >::Mult | ( | const Matrix3x4< double > & | argmat,
 |  | Matrix3x4< double > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< double >::Mult | ( | const Matrix3x3< double > & | argmat,
 |  | Matrix3x3< double > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< double >::Mult | ( | const Vector3< double > & | argvec,
 |  | Vector3< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< double >::Scale | ( | const double & | scalar,
 |  | Matrix3x3< double > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix3x3< double >::SetAsCrossProductMatrix | ( | const double & | x,
 |  | const double & | y,
 |  | const double & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< double >::SetAsCrossProductMatrix ( const Vector3< double > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void HomgPoint2DCov::SetEuclidean ( const Matrix2x2< double > & m )

Definition at line 114 of file HomgPoint2DCov.cpp.

References BEXCEPTION, CheckSymmetry_(), and BIAS::Matrix< double >::SetZero().

void BIAS::Matrix3x3< double >::SetFromColumnVectors | ( | const BIAS::Vector3< double > & | v0,
 |  | const BIAS::Vector3< double > & | v1,
 |  | const BIAS::Vector3< double > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< double >::SetFromRowVectors | ( | const BIAS::Vector3< double > & | v0,
 |  | const BIAS::Vector3< double > & | v1,
 |  | const BIAS::Vector3< double > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< double >::SetFromVector ( const TNT::Vector< double > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by BIAS::HomgPoint3DCov::SetEuclidean(), and SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

double BIAS::Matrix3x3< double >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< double >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< double >::Transpose ( const Matrix3x3< double > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<double > BIAS::Matrix3x3< double >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< double >.

void BIAS::Matrix3x3< double >::TransposedMult | ( | const Vector3< double > & | argvec,
 |  | Vector3< double > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< double >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/HomgPoint2DCov.hh
  • Base/Geometry/HomgPoint2DCov.cpp
Generated on Wed Jun 21 19:07:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPoint3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPoint3D

BIAS::HomgPoint3D Class Reference
[Geometry and Transformations]

class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates. More...

#include <Base/Geometry/HomgPoint3D.hh>

Inheritance diagram for BIAS::HomgPoint3D:

[legend]
Collaboration diagram for BIAS::HomgPoint3D:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector4< HOMGPOINT3D_TYPE > &argvec)
in place adding
void | AddIP (const HOMGPOINT3D_TYPE &scalar)
Addition (in place) of an scalar.
void | Copy (const HOMGPOINT3D_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector4< HOMGPOINT3D_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
HOMGPOINT3D_TYPE | Distance (HomgPoint3D &point)
void | Divide (const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const
Division with a scalar, storing results in destionation vector.
void | DivideIP (const HOMGPOINT3D_TYPE &scalar)
Division (in place) of an scalar.
void | ElementwiseProduct (const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const
multiply two vectors elementwise, storing the result in destvec
HOMGPOINT3D_TYPE * | GetData ()
const HOMGPOINT3D_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
void | GetEuclidian (Vector3< HOMGPOINT3D_TYPE > &dest) const
void | GetEuclidian (Vector3< HOMGPOINT3D_TYPE > &dest)
calculate affine coordinates of this and write them to dest affine coordinates are projective coordinates with last element w == 1; For w==0 the first three elements are copied describing a direction, not a point.
HOMGPOINT3D_TYPE | GetEuclidianX ()
return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
HOMGPOINT3D_TYPE | GetEuclidianY ()
HOMGPOINT3D_TYPE | GetEuclidianZ ()
HOMGPOINT3D_TYPE | GetW ()
HOMGPOINT3D_TYPE | GetX ()
HOMGPOINT3D_TYPE | GetY ()
HOMGPOINT3D_TYPE | GetZ ()
HomgPoint3D (const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z, const HOMGPOINT3D_TYPE &w)
HomgPoint3D (const Vector< double > &vec)
constructor using projective coordinates and initializes *this from Vector<double> of length 4 or length 3 in this case the fourth entry is 1.0.
HomgPoint3D (const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z)
constructor using euclidic coordinates, setting the 4th HomgPoint3D component to 1
HomgPoint3D (char *s)
constructor with element assignment
HomgPoint3D (const HOMGPOINT3D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
HomgPoint3D (const HOMGPOINT3D_TYPE &scalar)
assignment with a constant value for all elements
HomgPoint3D (const Vector3< HOMGPOINT3D_TYPE > &vec)
HomgPoint3D (const Vector4< HOMGPOINT3D_TYPE > &p)
HomgPoint3D (const HomgPoint3D &p)
HomgPoint3D ()
void Homogenize ()
homogenize class data member elements to W==1 by divison by W
bool | IsAtInfinity () const
bool | IsHomogenized () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const HOMGPOINT3D_TYPE &scalar)
Multiplication (in place) of an scalar.
HOMGPOINT3D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|+ |d|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).
Vector4< HOMGPOINT3D_TYPE > & | operator *= (const HOMGPOINT3D_TYPE &scalar)
Multiplication operator with scalar argument.
bool | operator!= (const Vector4< HOMGPOINT3D_TYPE > &arg) const
Comparison operator 'not equal'.
bool | operator!= (HomgPoint3D &arg)
Comparison operator 'not equal'.
Vector4< HOMGPOINT3D_TYPE > & | operator+= (const Vector4< HOMGPOINT3D_TYPE > &argvec)
add operator for two Vectors
Vector4< HOMGPOINT3D_TYPE > & | operator+= (const HOMGPOINT3D_TYPE &scalar)
Addition operator with scalar argument.
Vector4< HOMGPOINT3D_TYPE > & | operator-= (const Vector4< HOMGPOINT3D_TYPE > &argvec)
sub operator for two Vectors
Vector4< HOMGPOINT3D_TYPE > & | operator-= (const HOMGPOINT3D_TYPE &scalar)
Substraction operator with scalar argument.
Vector4< HOMGPOINT3D_TYPE > & | operator/= (const HOMGPOINT3D_TYPE &scalar)
Division operator with scalar argument.
HomgPoint3D & | operator= (const Vector3< HOMGPOINT3D_TYPE > &vec)
HomgPoint3D & | operator= (const HOMGPOINT3D_TYPE &scalar)
assignment operator set the vector elementwise to scalar value
HomgPoint3D & | operator= (const Vector4< HOMGPOINT3D_TYPE > &vec)
assignment operator set the elements of this HomgPoint to the element of vec
bool | operator== (const Vector4< HOMGPOINT3D_TYPE > &arg) const
Comparison operator 'equal'.
bool | operator== (HomgPoint3D &arg)
Comparison operator 'equal'.
HOMGPOINT3D_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const HOMGPOINT3D_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix4x4< HOMGPOINT3D_TYPE > | OuterProduct (const Vector4< HOMGPOINT3D_TYPE > &v) const
outer product, constructs a matrix.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScalarProduct (const Vector4< HOMGPOINT3D_TYPE > &argvec, HOMGPOINT3D_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const HOMGPOINT3D_TYPE &scalar)
set all elements to a scalat value
void | Set (const Vector3< HOMGPOINT3D_TYPE > &vec)
set from Vector3
void | Set (const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z, const HOMGPOINT3D_TYPE &w)
set elementwise
void | Set (const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z)
set elementwise with given 3 euclidian scalar values.
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector4< HOMGPOINT3D_TYPE > &argvec)
in place substraction
void | SubIP (const HOMGPOINT3D_TYPE &scalar)
Substraction (in place) of an scalar.
Matrix< HOMGPOINT3D_TYPE > | transposed () const
return a new Matrix with 1 row and 4 columns representing a transposed vector
Vector4 (const Vector< HOMGPOINT3D_TYPE > &v)
cast constructor
Vector4 (const HOMGPOINT3D_TYPEv0, const HOMGPOINT3D_TYPEv1, const HOMGPOINT3D_TYPEv2, const HOMGPOINT3D_TYPEv3)
constructor with element assigment using explicit values
Vector4 (char *s)
constructor with element assignment
Vector4 (const HOMGPOINT3D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector4 (const HOMGPOINT3D_TYPE &scalar)
assignment with a constant value for all elements
Vector4 (const Vector4< HOMGPOINT3D_TYPE > &vec)
copy constructor
Vector4 ()
~HomgPoint3D ()

Protected Attributes

HOMGPOINT3D_TYPE | data_ [VECTOR4SIZE]

Detailed Description

class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.

manual loop unrolling is used if possible. The Vector is in row-major order (4 rows, 1 column) the indizes begin with zero (to size-1)

constructors and assignment operators are never inherited, so they have be wrapped (or reimplemented) here.

Author:
Jan Woetzel tested in part (03/04/2002)
To DO:
  • CrossProduvt von zwei HomgPOint3D (Aunterscheidung beide w==0 / beide w!=0, sonst Meldung.

Definition at line 61 of file HomgPoint3D.hh.

Constructor & Destructor Documentation

BIAS::HomgPoint3D::HomgPoint3D ( ) [inline]

Definition at line 65 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( const HomgPoint3D & p ) [inline]

Definition at line 67 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( const Vector4< HOMGPOINT3D_TYPE > & p ) [inline]

Definition at line 70 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( const Vector3< HOMGPOINT3D_TYPE > & vec ) [inline, explicit]

Definition at line 204 of file HomgPoint3D.hh.

References Set().

BIAS::HomgPoint3D::~HomgPoint3D ( ) [inline]

Definition at line 75 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( const HOMGPOINT3D_TYPE & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 80 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( const HOMGPOINT3D_TYPE * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 87 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 93 of file HomgPoint3D.hh.

BIAS::HomgPoint3D::HomgPoint3D | ( | const HOMGPOINT3D_TYPE & | x,
 |  | const HOMGPOINT3D_TYPE & | y,
 |  | const HOMGPOINT3D_TYPE & | z
 | ) | [inline]

constructor using euclidic coordinates, setting the 4th HomgPoint3D component to 1

Author:
Ingo Thomsen untested

Definition at line 209 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

BIAS::HomgPoint3D::HomgPoint3D ( const Vector< double > & vec ) [inline]

constructor using projective coordinates and initializes *this from Vector<double> of length 4 or length 3 in this case the fourth entry is 1.0.

Author:
JMF tested

Definition at line 268 of file HomgPoint3D.hh.

References BIASERR, BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, and TNT::Vector< T >::size().

BIAS::HomgPoint3D::HomgPoint3D | ( | const HOMGPOINT3D_TYPE & | x,
 |  | const HOMGPOINT3D_TYPE & | y,
 |  | const HOMGPOINT3D_TYPE & | z,
 |  | const HOMGPOINT3D_TYPE & | w
 | ) | [inline]

Author:
woelk 11/2003

Definition at line 112 of file HomgPoint3D.hh.

Member Function Documentation

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Add | ( | const Vector4< HOMGPOINT3D_TYPE > & | argvec,
 |  | Vector4< HOMGPOINT3D_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Add | ( | const HOMGPOINT3D_TYPE & | scalar,
 |  | Vector4< HOMGPOINT3D_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::AddIP ( const Vector4< HOMGPOINT3D_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPOINT3D_TYPE >::AddIP ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Copy ( const HOMGPOINT3D_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

Referenced by operator=().

double BIAS::Vector4< HOMGPOINT3D_TYPE >::Dist ( const Vector4< HOMGPOINT3D_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::Distance ( HomgPoint3D & point ) [inline]

Definition at line 370 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, HOMGPOINT3D_TYPE, and Homogenize().

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Divide | ( | const HOMGPOINT3D_TYPE & | scalar,
 |  | Vector4< HOMGPOINT3D_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::DivideIP ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::ElementwiseProduct | ( | const Vector4< HOMGPOINT3D_TYPE > & | argvec,
 |  | Vector4< HOMGPOINT3D_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel untested (03/06/2002)

HOMGPOINT3D_TYPE * BIAS::Vector4< HOMGPOINT3D_TYPE >::GetData ( ) [inline, inherited]

Definition at line 134 of file Vector4.hh.

const HOMGPOINT3D_TYPE * BIAS::Vector4< HOMGPOINT3D_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 130 of file Vector4.hh.

void BIAS::HomgPoint3D::GetEuclidian ( Vector3< HOMGPOINT3D_TYPE > & dest ) const [inline]

Definition at line 324 of file HomgPoint3D.hh.

References GetEuclidian(), and p.

void BIAS::HomgPoint3D::GetEuclidian ( Vector3< HOMGPOINT3D_TYPE > & dest ) [inline]

calculate affine coordinates of this and write them to dest affine coordinates are projective coordinates with last element w == 1; For w==0 the first three elements are copied describing a direction, not a point.

Definition at line 310 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, GetW(), and HOMGPOINT3D_TYPE.

Referenced by BIAS::TrifocalTensorBase::Compose(), BIAS::PMatrix::Decompose_(), BIAS::ProjectionParametersBase::DoesPointProjectIntoImage(), BIAS::TriangleMesh::GenerateDenseMesh(), and GetEuclidian().

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetEuclidianX ( ) [inline]

return the euclidian coordinates Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 330 of file HomgPoint3D.hh.

References BIASASSERT, BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, GetW(), and HOMGPOINT3D_TYPE.

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetEuclidianY ( ) [inline]

Definition at line 337 of file HomgPoint3D.hh.

References BIASASSERT, BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, GetW(), and HOMGPOINT3D_TYPE.

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetEuclidianZ ( ) [inline]

Definition at line 344 of file HomgPoint3D.hh.

References BIASASSERT, BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, GetW(), and HOMGPOINT3D_TYPE.

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetW ( ) [inline]

Definition at line 234 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, and HOMGPOINT3D_EPS.

Referenced by GetEuclidian(), GetEuclidianX(), GetEuclidianY(), GetEuclidianZ(), Homogenize(), and BIAS::HomgLine3D::Homogenize().

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetX ( ) [inline]

Definition at line 219 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetY ( ) [inline]

Definition at line 224 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

HOMGPOINT3D_TYPE BIAS::HomgPoint3D::GetZ ( ) [inline]

Definition at line 229 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

void BIAS::HomgPoint3D::Homogenize ( ) [inline]

homogenize class data member elements to W==1 by divison by W

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 284 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, GetW(), HOMGPOINT3D_EPS, and HOMGPOINT3D_TYPE.

Referenced by BIAS::PMatrix::BackprojectPseudoinverse(), Distance(), BIAS::Triangulation::GetCovariance2D(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::HomgPoint3DCov::Homogenize(), BIAS::HomgLine3D::Homogenize(), operator==(), BIAS::ProjectionParametersProjective::ProjectLocal(), BIAS::Triangulation::Triangulate(), BIAS::Triangulation::TriangulateLinear(), and BIAS::ProjectionParametersProjective::UnProjectLocal().

bool BIAS::HomgPoint3D::IsAtInfinity ( ) const [inline]

Definition at line 364 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, and HOMGPOINT3D_EPS.

Referenced by BIAS::PMatrix::Compose(), BIAS::PMatrixBase::Compose(), and BIAS::HomgPoint3DCov::Homogenize().

bool BIAS::HomgPoint3D::IsHomogenized ( ) const [inline]

Author:
woelk 10 2003

Definition at line 146 of file HomgPoint3D.hh.

References HOMGPOINT3D_EPS.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), BIAS::ThreeDOut::AddLine(), BIAS::ThreeDOut::AddPoint(), BIAS::ThreeDOut::UpdateEllipsoid(), BIAS::ThreeDOut::UpdateLine(), and BIAS::ThreeDOut::UpdatePoint().

bool BIAS::Vector4< HOMGPOINT3D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Multiply | ( | const HOMGPOINT3D_TYPE & | scalar,
 |  | Vector4< HOMGPOINT3D_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::MultiplyIP ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

HOMGPOINT3D_TYPE BIAS::Vector4< HOMGPOINT3D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|+ |d|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Vector4< HOMGPOINT3D_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator *= ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Multiplication operator with scalar argument.

Author:
Ingo Thomsen tested

bool BIAS::Vector4< HOMGPOINT3D_TYPE >::operator!= ( const Vector4< HOMGPOINT3D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
Ingo Thomsen

bool BIAS::HomgPoint3D::operator!= ( HomgPoint3D & arg ) [inline]

Comparison operator 'not equal'.

Author:
Ingo Thomsen tested

Definition at line 359 of file HomgPoint3D.hh.

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator+= ( const Vector4< HOMGPOINT3D_TYPE > & argvec ) [inline, inherited]

add operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator+= ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Addition operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator-= ( const Vector4< HOMGPOINT3D_TYPE > & argvec ) [inline, inherited]

sub operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator-= ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Substraction operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<HOMGPOINT3D_TYPE >& BIAS::Vector4< HOMGPOINT3D_TYPE >::operator/= ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Division operator with scalar argument.

Author:
Ingo Thomsen tested

HomgPoint3D & BIAS::HomgPoint3D::operator= ( const Vector3< HOMGPOINT3D_TYPE > & vec ) [inline]

Definition at line 242 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

HomgPoint3D & BIAS::HomgPoint3D::operator= ( const HOMGPOINT3D_TYPE & scalar ) [inline]

assignment operator set the vector elementwise to scalar value

Author:
Jan Woetzel alpha (02/28/2002)

Reimplemented from BIAS::Vector4< HOMGPOINT3D_TYPE >.

Definition at line 259 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

HomgPoint3D & BIAS::HomgPoint3D::operator= ( const Vector4< HOMGPOINT3D_TYPE > & vec ) [inline]

assignment operator set the elements of this HomgPoint to the element of vec

Author:
Jan Woetzel alpha (02/25/2002)

Reimplemented from BIAS::Vector4< HOMGPOINT3D_TYPE >.

Definition at line 252 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::Copy(), and BIAS::Vector4< T >::GetData().

bool BIAS::Vector4< HOMGPOINT3D_TYPE >::operator== ( const Vector4< HOMGPOINT3D_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

bool BIAS::HomgPoint3D::operator== ( HomgPoint3D & arg ) [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 351 of file HomgPoint3D.hh.

References BIAS::Vector4< T >::data_, BIAS::Vector4< HOMGPOINT3D_TYPE >::data_, and Homogenize().

HOMGPOINT3D_TYPE & BIAS::Vector4< HOMGPOINT3D_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel alpha (03/01/2002)

const HOMGPOINT3D_TYPE & BIAS::Vector4< HOMGPOINT3D_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel alpha (03/01/2002)

Matrix4x4<HOMGPOINT3D_TYPE > BIAS::Vector4< HOMGPOINT3D_TYPE >::OuterProduct ( const Vector4< HOMGPOINT3D_TYPE > & v ) const [inherited]

outer product, constructs a matrix.

Often written as v * v^T for col vectors

Author:
frick

bool BIAS::Vector4< HOMGPOINT3D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

void BIAS::Vector4< HOMGPOINT3D_TYPE >::ScalarProduct | ( | const Vector4< HOMGPOINT3D_TYPE > & | argvec,
 |  | HOMGPOINT3D_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel untested

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Set ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

set all elements to a scalat value

Author:
Jan Woetzel untested (02/28/2002)

Referenced by Set().

void BIAS::HomgPoint3D::Set ( const Vector3< HOMGPOINT3D_TYPE > & vec ) [inline]

set from Vector3

Author:
woelk 03/2004

Definition at line 302 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::data_.

void BIAS::HomgPoint3D::Set | ( | const HOMGPOINT3D_TYPE & | x,
 |  | const HOMGPOINT3D_TYPE & | y,
 |  | const HOMGPOINT3D_TYPE & | z,
 |  | const HOMGPOINT3D_TYPE & | w
 | ) | [inline]

set elementwise

Author:
woelk 11/2003

Reimplemented from BIAS::Vector4< HOMGPOINT3D_TYPE >.

Definition at line 160 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::Set().

void BIAS::HomgPoint3D::Set | ( | const HOMGPOINT3D_TYPE & | x,
 |  | const HOMGPOINT3D_TYPE & | y,
 |  | const HOMGPOINT3D_TYPE & | z
 | ) | [inline]

set elementwise with given 3 euclidian scalar values.

the additional W-coordinate is set to 1

Author:
Jan Woetzel alpha (03/05/2002)

Definition at line 295 of file HomgPoint3D.hh.

References BIAS::Vector4< HOMGPOINT3D_TYPE >::Set().

Referenced by BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::PMatrix::BackprojectByZDepth(), BIAS::PMatrix::BackprojectWorldCoo(), CreateMatches2(), BIAS::PMatrix::GetC(), BIAS::CovMatrix3x3::GetSearchArea(), HomgPoint3D(), main(), and BIAS::Triangulation::Triangulate2D().

void BIAS::Vector4< HOMGPOINT3D_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel

const int BIAS::Vector4< HOMGPOINT3D_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Sub | ( | const Vector4< HOMGPOINT3D_TYPE > & | argvec,
 |  | Vector4< HOMGPOINT3D_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPOINT3D_TYPE >::Sub | ( | const HOMGPOINT3D_TYPE & | scalar,
 |  | Vector4< HOMGPOINT3D_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< HOMGPOINT3D_TYPE >::SubIP ( const Vector4< HOMGPOINT3D_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

void BIAS::Vector4< HOMGPOINT3D_TYPE >::SubIP ( const HOMGPOINT3D_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Matrix<HOMGPOINT3D_TYPE > BIAS::Vector4< HOMGPOINT3D_TYPE >::transposed ( ) const [inline, inherited]

return a new Matrix with 1 row and 4 columns representing a transposed vector

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( const Vector< HOMGPOINT3D_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel untested (03/22/2002)

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 | ( | const HOMGPOINT3D_TYPE | v0,
 |  | const HOMGPOINT3D_TYPE | v1,
 |  | const HOMGPOINT3D_TYPE | v2,
 |  | const HOMGPOINT3D_TYPE | v3
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( const HOMGPOINT3D_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( const HOMGPOINT3D_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( const Vector4< HOMGPOINT3D_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Daniel Grest (06/2003)

Definition at line 70 of file Vector4.hh.

BIAS::Vector4< HOMGPOINT3D_TYPE >::Vector4 ( ) [inline, inherited]

Definition at line 65 of file Vector4.hh.

Member Data Documentation

HOMGPOINT3D_TYPE BIAS::Vector4< HOMGPOINT3D_TYPE >::data_[VECTOR4SIZE] [protected, inherited]

Definition at line 326 of file Vector4.hh.

Referenced by Distance(), GetEuclidian(), GetEuclidianX(), GetEuclidianY(), GetEuclidianZ(), GetW(), GetX(), GetY(), GetZ(), HomgPoint3D(), Homogenize(), IsAtInfinity(), operator=(), operator==(), and Set().

The documentation for this class was generated from the following file:
  • Base/Geometry/HomgPoint3D.hh
Generated on Wed Jun 21 19:07:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomgPoint3DCov Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomgPoint3DCov

BIAS::HomgPoint3DCov Class Reference

class representing the covariance matrix of a homogenous point 3D More...

#include <Base/Geometry/HomgPoint3DCov.hh>

Inheritance diagram for BIAS::HomgPoint3DCov:

[legend]
Collaboration diagram for BIAS::HomgPoint3DCov:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
double | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
Matrix3x3< double > | GetEuclidean () const
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
HomgPoint3DCov (const TNT::Matrix< double > &m)
HomgPoint3DCov (const Matrix< double > &m)
HomgPoint3DCov (const Matrix4x4< double > &m)
HomgPoint3DCov (const MatrixInitType &i)
HomgPoint3DCov ()
void Homogenize (HomgPoint3D &p)
homogenizes p and *this
bool | IsHomogenized () const
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
bool | IsZero () const
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< double > &R, const Vector3< double > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< double > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< double > &arg)
Matrix4x4 (const Matrix4x4< double > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< double > &argvec, Vector4< double > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void | SetEuclidean (const Matrix3x3< double > &m)
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
Matrix< double > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
virtual | ~HomgPoint3DCov ()

Protected Member Functions

bool | CheckSymmetry_ () const
void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void MakeSymmetric_ ()
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class representing the covariance matrix of a homogenous point 3D

Author:
woelk 03/2006

Definition at line 41 of file HomgPoint3DCov.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

HomgPoint3DCov::HomgPoint3DCov ( )

Definition at line 35 of file HomgPoint3DCov.cpp.

HomgPoint3DCov::HomgPoint3DCov ( const MatrixInitType & i )

Definition at line 40 of file HomgPoint3DCov.cpp.

HomgPoint3DCov::HomgPoint3DCov ( const Matrix4x4< double > & m )

Definition at line 44 of file HomgPoint3DCov.cpp.

References BIASERR, CheckSymmetry_(), and MakeSymmetric_().

HomgPoint3DCov::HomgPoint3DCov ( const Matrix< double > & m )

Definition at line 58 of file HomgPoint3DCov.cpp.

References BIASERR, CheckSymmetry_(), and MakeSymmetric_().

HomgPoint3DCov::HomgPoint3DCov ( const TNT::Matrix< double > & m )

Definition at line 68 of file HomgPoint3DCov.cpp.

References BIASERR, CheckSymmetry_(), and MakeSymmetric_().

HomgPoint3DCov::~HomgPoint3DCov ( ) [virtual]

Definition at line 78 of file HomgPoint3DCov.cpp.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::HomgPoint3DCov::CheckSymmetry_ ( ) const [inline, protected]

Definition at line 83 of file HomgPoint3DCov.hh.

References BIAS::Equal().

Referenced by HomgPoint3DCov(), and SetEuclidean().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

double BIAS::Matrix4x4< double >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::EuclideanTransf3D::Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Matrix3x3< double > HomgPoint3DCov::GetEuclidean ( ) const

Definition at line 104 of file HomgPoint3DCov.cpp.

References BEXCEPTION, IsHomogenized(), and res.

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

void HomgPoint3DCov::Homogenize ( HomgPoint3D & p )

homogenizes p and *this

Author:
woelk 03/2006

Definition at line 82 of file HomgPoint3DCov.cpp.

References BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint3D::IsAtInfinity(), and BIAS::MatrixZero.

Referenced by BIAS::CovMatrix3x3::SetFromHomogenized().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::HomgPoint3DCov::IsHomogenized ( ) const [inline]

Definition at line 65 of file HomgPoint3DCov.hh.

References BIAS::Equal().

Referenced by GetEuclidean().

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::HomgPoint3DCov::IsZero ( ) const [inline]

Definition at line 72 of file HomgPoint3DCov.hh.

References BIAS::Equal().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< double >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, and BIAS::Pose.

void BIAS::HomgPoint3DCov::MakeSymmetric_ ( ) [inline, protected]

Definition at line 91 of file HomgPoint3DCov.hh.

Referenced by HomgPoint3DCov(), and SetEuclidean().

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const Matrix3x3< double > & | R,
 |  | const Vector3< double > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< double >::Matrix4x4 ( const TNT::Matrix< double > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix< double > & arg ) [inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix4x4< double > & A ) [inline, inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8,
 |  | const double | a9,
 |  | const double | a10,
 |  | const double | a11,
 |  | const double | a12,
 |  | const double | a13,
 |  | const double | a14,
 |  | const double | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< double >::Mult | ( | const Matrix4x4< double > & | argmat,
 |  | Matrix4x4< double > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< double >::Mult | ( | const Vector4< double > & | argvec,
 |  | Vector4< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void HomgPoint3DCov::SetEuclidean ( const Matrix3x3< double > & m )

Definition at line 124 of file HomgPoint3DCov.cpp.

References CheckSymmetry_(), MakeSymmetric_(), and BIAS::Matrix< double >::SetZero().

void BIAS::Matrix4x4< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

Definition at line 261 of file Matrix4x4.hh.

Referenced by BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by SetEuclidean(), and BIAS::HomgPoint2DCov::SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

double BIAS::Matrix< double >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< double >.

Matrix<double > BIAS::Matrix< double >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix3x3< double >.

void BIAS::Matrix4x4< double >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/HomgPoint3DCov.hh
  • Base/Geometry/HomgPoint3DCov.cpp
Generated on Wed Jun 21 19:07:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::HomographyMapping< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::HomographyMapping

BIAS::HomographyMapping< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Maps image src to image sink with homography H (software implementation). More...

#include <Image/HomographyMapping.hh>

Inheritance diagram for BIAS::HomographyMapping< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::HomographyMapping< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

template<>
void | ClipValue_ (const double &value, float &newvalue)
virtual int | GetBoundingBox (unsigned int srcwidth, unsigned int srcheight, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
HMatrix | GetChangedHomography () const
if Map() is called with newDist=true, the real applied Homography is changed
HomographyMapping (const HomographyMapping &src)
required because assignment is
HomographyMapping ()
HomographyMapping< InputStorageType,
OutputStorageType > & 		operator= (const HomographyMapping &src)
required because of const members
int | RotateToGrey (Image< InputStorageType > &src, Image< OutputStorageType > &sink, float PhiX, float PhiY, float PhiZ, const Matrix3x3< double > &K)
given a calibration and 3 rot angles, compute mapped image Mainly computes the homography and calls map
void | SetHomography (const HMatrix &H)
set your homography H (source = H * sink) before calling Map()
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
virtual void | UpdatePyramidSize (const Image< OutputStorageType > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size
virtual | ~HomographyMapping ()

Protected Member Functions

virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source)
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, OutputStorageType &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
analytic jacobian
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const
reimplementation for homography, takes sink and computes coords in source
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing

Protected Attributes

bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
HMatrix H_
the homography for backward mapping: run over sink and compute source = H_ * sink
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
int | offsetX_
int | offsetY_
PyramidImage< InputStorageType > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
double | width_

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::HomographyMapping< InputStorageType, OutputStorageType >

Maps image src to image sink with homography H (software implementation).

Author:
koeser, edited by grest Nov. 2005

Definition at line 43 of file HomographyMapping.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
HomographyMapping::~HomographyMapping ( ) [virtual]

Definition at line 35 of file HomographyMapping.cpp.

template<class InputStorageType, class OutputStorageType>
HomographyMapping::HomographyMapping ( )

Definition at line 41 of file HomographyMapping.cpp.

template<class InputStorageType, class OutputStorageType>
HomographyMapping::HomographyMapping ( const HomographyMapping< InputStorageType, OutputStorageType > & src )

required because assignment is

Author:
Jan Woetzel

Definition at line 48 of file HomographyMapping.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_ | ( | const Image< InputStorageType > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual, inherited]

compute maximum number of pyramid levels needed

Definition at line 154 of file BackwardMapping.cpp.

References BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, and BIAS::PyramidImage< StorageType >::Release().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_ | ( | const Image< OutputStorageType > & | sink,
 |  | const Image< InputStorageType > & | source
 | ) | [protected, virtual, inherited]

Definition at line 753 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_ | ( | Image< OutputStorageType > & | ,
 |  | const Image< InputStorageType > & |
 | ) | [protected, virtual, inherited]

Definition at line 780 of file BackwardMapping.cpp.

References abs, BUILD_IMAGE_CHAR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< OutputStorageType > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

clip computed region in dest image to roi

Definition at line 666 of file BackwardMapping.cpp.

References BIAS::ImageBase::GetROICorners().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<>
void BIAS::BackwardMapping< float, float >::ClipValue_ | ( | const double & | value,
 |  | float & | newvalue
 | ) | [inherited]

Definition at line 719 of file BackwardMapping.cpp.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_ | ( | const double & | value,
 |  | OutputStorageType & | newvalue
 | ) | [protected, virtual, inherited]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 690 of file BackwardMapping.cpp.

References max, min, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected, inherited]

use jacobian of mapping function to do anisotropic antialiasing

Definition at line 591 of file BackwardMapping.cpp.

References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Matrix< T >::GetData(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::Matrix2x2< T >::Transpose().

template<class InputStorageType, class OutputStorageType>
int HomographyMapping::GetBoundingBox | ( | unsigned int | srcwidth,
 |  | unsigned int | srcheight,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [virtual]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates must be valid in sink, and the resulting br position should be outside the region.

Author:
grest, Nov. 2005

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 140 of file HomographyMapping.cpp.

References BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_, BIAS::HomgPoint2D::Homogenize(), BIAS::Matrix3x3< T >::Invert(), and tr.

template<class InputStorageType, class OutputStorageType>
HMatrix HomographyMapping::GetChangedHomography ( ) const

if Map() is called with newDist=true, the real applied Homography is changed

Definition at line 199 of file HomographyMapping.cpp.

References BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, and BIAS::Matrix3x3< T >::SetIdentity().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< InputStorageType > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 506 of file BackwardMapping.cpp.

References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int HomographyMapping::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual]

analytic jacobian

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 129 of file HomographyMapping.cpp.

References BIAS::HMatrix::GetJacobian(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_.

template<class InputStorageType, class OutputStorageType>
int HomographyMapping::GetSourceCoordinates_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected, virtual]

reimplementation for homography, takes sink and computes coords in source

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 119 of file HomographyMapping.cpp.

References BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_, BIAS::HomgPoint2D::Homogenize(), and BIAS::Matrix3x3< T >::Mult().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 532 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected, inherited]

takes jacobian to compute gaussian kernel for anisotropic smoothing

Definition at line 728 of file BackwardMapping.cpp.

References a, BIAS::Matrix< T >::GetData(), BIAS::Matrix2x2< T >::Invert(), and TNT::Matrix< T >::num_cols().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map ( Image< OutputStorageType > & sink ) [inherited]

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

Definition at line 223 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::MapTrilinear.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) | [inherited]

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

Definition at line 170 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_ | ( | const Image< InputStorageType > & | source,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected, inherited]

bilinear, bicubc and nearest neighbor interpolation

Definition at line 238 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_, BIASERR, BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ImageBase::GetSize(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), BIAS::ROI::IsInROI(), BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_, and value.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_ ( Image< OutputStorageType > & sink ) [protected, inherited]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

Definition at line 363 of file BackwardMapping.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::PyramidImage< StorageType >::IsEmpty(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
HomographyMapping< InputStorageType, OutputStorageType > & HomographyMapping::operator= ( const HomographyMapping< InputStorageType, OutputStorageType > & src )

required because of const members

Author:
Jan Woetzel

Definition at line 57 of file HomographyMapping.cpp.

References BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_.

template<class InputStorageType, class OutputStorageType>
int HomographyMapping::RotateToGrey | ( | Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | float | PhiX,
 |  | float | PhiY,
 |  | float | PhiZ,
 |  | const Matrix3x3< double > & | K
 | ) |

given a calibration and 3 rot angles, compute mapped image Mainly computes the homography and calls map

Author:
unknown (woelk ?)

Definition at line 67 of file HomographyMapping.cpp.

References BIAS::ImageBase::CM_Grey, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), Kinv, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), R, BIAS::Image< StorageType >::Release(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::SetHomography(), BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::RMatrixBase::SetXYZ().

template<class InputStorageType, class OutputStorageType>
void BIAS::HomographyMapping< InputStorageType, OutputStorageType >::SetHomography ( const HMatrix & H ) [inline]

set your homography H (source = H * sink) before calling Map()

Definition at line 61 of file HomographyMapping.hh.

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize ( const int newsize ) [inherited]

sets pyramid size to pyramid and updates if neccessary

Definition at line 135 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, BIAS::PyramidImage< StorageType >::SetPyramidSize(), and BIAS::ImageBase::StealImage().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize ( const Image< OutputStorageType > & sink ) [virtual, inherited]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Definition at line 86 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::ImageBase::GetHeight(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_ [protected, inherited]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_().

template<class InputStorageType, class OutputStorageType>
BIAS::Image<float> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_ [protected, inherited]

Definition at line 298 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_ [protected, inherited]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
HMatrix BIAS::HomographyMapping< InputStorageType, OutputStorageType >::H_ [protected]

the homography for backward mapping: run over sink and compute source = H_ * sink

Definition at line 102 of file HomographyMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::operator=().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::height_ [protected, inherited]

Definition at line 296 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_ [protected, inherited]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
PyramidImage<InputStorageType> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_ [protected, inherited]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_ [protected, inherited]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_().

template<class InputStorageType, class OutputStorageType>
ROI BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_ [protected, inherited]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::width_ [protected, inherited]

Definition at line 295 of file BackwardMapping.hh.

The documentation for this class was generated from the following files:
  • Image/HomographyMapping.hh
  • Image/HomographyMapping.cpp
Generated on Wed Jun 21 19:07:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ICECallBackInterface Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ICECallBackInterface Class Reference
[Graphical User Interfaces]

callback interface for ImageCanvasExtended More...

#include <Gui/ImageCanvasEnhanced.hh>

Detailed Description

callback interface for ImageCanvasExtended

instructions: derive your class e.g. MyFrame from ICECallBackInterface and override the method RectangleSelected(...)to react to a finished selection of a rectangle

also declare a pointer to ImageCanvas Enhanced, e.g. ImageCanvasEnhanced *_ic;

to select a rectangle then call _ic->SelectRectangle(*this); where *this is a reference to a ICECallBackInterface (if your class is derived from ICECallBackInterface this is *this)

Author:
woelk 08/2004

The documentation for this class was generated from the following file:
  • Gui/ImageCanvasEnhanced.hh
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ICECallbackInterface Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ICECallbackInterface

BIAS::ICECallbackInterface Class Reference

#include <Gui/ImageCanvasEnhanced.hh>

Inheritance diagram for BIAS::ICECallbackInterface:

[legend]
List of all members.

Public Member Functions

ICECallbackInterface ()
virtual void | RectangleSelected (int tl[2], int br[2])
this function should be overloaded
virtual | ~ICECallbackInterface ()

Detailed Description

Definition at line 28 of file ImageCanvasEnhanced.hh.

Constructor & Destructor Documentation

ICECallbackInterface::ICECallbackInterface ( )

Definition at line 11 of file ImageCanvasEnhanced.cpp.

ICECallbackInterface::~ICECallbackInterface ( ) [virtual]

Definition at line 14 of file ImageCanvasEnhanced.cpp.

Member Function Documentation

void ICECallbackInterface::RectangleSelected | ( | int | tl[2],
 |  | int | br[2]
 | ) | [virtual]

this function should be overloaded

Reimplemented in MyFrame.

Definition at line 18 of file ImageCanvasEnhanced.cpp.

References BIASERR.

The documentation for this class was generated from the following files:
  • Gui/ImageCanvasEnhanced.hh
  • Gui/ImageCanvasEnhanced.cpp
Generated on Wed Jun 21 19:07:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: icilist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

icilist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef flag | iciend
typedef flag | iciend
typedef flag | icierr
typedef flag | icierr
typedef char * | icifmt
typedef char * | icifmt
typedef ftnint | icirlen
typedef ftnint | icirlen
typedef ftnint | icirnum
typedef ftnint | icirnum
typedef char * | iciunit
typedef char * | iciunit

Detailed Description

Definition at line 60 of file f2c_gnu011.h.

Member Typedef Documentation

typedef flag icilist::iciend

Definition at line 59 of file win32_f2c.h.

typedef flag icilist::iciend

Definition at line 63 of file f2c_gnu011.h.

typedef flag icilist::icierr

Definition at line 57 of file win32_f2c.h.

typedef flag icilist::icierr

Definition at line 61 of file f2c_gnu011.h.

typedef char* icilist::icifmt

Definition at line 60 of file win32_f2c.h.

typedef char* icilist::icifmt

Definition at line 64 of file f2c_gnu011.h.

typedef ftnint icilist::icirlen

Definition at line 61 of file win32_f2c.h.

typedef ftnint icilist::icirlen

Definition at line 65 of file f2c_gnu011.h.

typedef ftnint icilist::icirnum

Definition at line 62 of file win32_f2c.h.

typedef ftnint icilist::icirnum

Definition at line 66 of file f2c_gnu011.h.

typedef char* icilist::iciunit

Definition at line 58 of file win32_f2c.h.

typedef char* icilist::iciunit

Definition at line 62 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Image< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Image

BIAS::Image< StorageType > Class Template Reference
[Image and Image Base]

The image template class for specific storage types. More...

#include <Base/Image/Image.hh>

Inheritance diagram for BIAS::Image< StorageType >:

[legend]
Collaboration diagram for BIAS::Image< StorageType >:

[legend]
List of all members.

Misc functions

void ClearDataPointer ()
set data pointer to NULL, such that image IsEmpty _without_ deletion of data.
int | Display ()
display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.
int | Display (const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale)
interface for the above
int | Display (const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
bool | IsPositionInImage (const int &x, const int &y) const
check if image contains that pixel position
bool | IsPowerOfTwoSize () const
int | MoveToClosestPositionInImage (int &x, int &y) const
find closest valid pixel position to x,y
void * | PixelValueBase (unsigned x, unsigned y, unsigned channel=0)
bool | PowerOfTwoSize (unsigned int &width2, unsigned int &height2) const
void | PrintHeader (std::ostream &os=std::cout) const
void | RedirectImageDataPointer (void *data)
This method takes data and set the internal image data pointer to this.
void ReleaseImageDataPointer ()
Releases ImageData_ (to be used together with RedirectImageDataPointer).
bool | SamePixelAndChannelCount (const ImageBase &Image) const
checks if data area has same "size" as Image of other type
void SetZero ()
zeroes the image
static int | GetChannelcount (const enum BIAS::ImageBase::EColorModel &colormodel)
get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.
static int | GetSize (const enum BIAS::ImageBase::EStorageType &storagetype)
get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.
static bool | IsPowerOfTwoSize (const unsigned int w, const unsigned int h)
static unsigned int | PowerOfTwoSize (const unsigned int &val)

Get functions

bool | DimensionMatch (const BIAS::ImageBase &other) const
unsigned int | GetBitDepth () const
returns the bits per channel, which is not necessairily 8*sizeof(StorageType).
int | GetChannel (ImageBase &source, unsigned int channel)
copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB
unsigned int | GetChannelCount () const
returns the number of Color channels, e.g.
enum EColorModel | GetColorModel () const
unsigned int | GetDepth () const
returns the bytes per channel, which is the sizeof(StorageType)
unsigned int | GetHeight () const
void * GetImageData ()
MetaData * GetMetaData ()
unsigned long int | GetPixelCount () const
returns number of pixels in image
unsigned int | GetPixelPosition (unsigned int x, unsigned int y, unsigned short int channel=0) const
returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).
unsigned int | GetSize () const
returns the image size in bytes = count - NOT the dimension
enum EStorageType | GetStorageType () const
const BIAS::UUID & | GetUID () const
returns the UUID of the image
int | GetVersionNumber () const
unsigned int | GetWidth () const
unsigned int | GetWidthStep () const
returns the number of bytes per line
bool | IsInterleaved () const
bool | IsPlanar () const
void | SetMetaData (const MetaData &m)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ImageBase &img)
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, ImageBase &img)

Operators

Operators -,+,*,/,-=,+=,*=,/= for scalar and image arguments
Operators do only work for argument of the same type
Division Operators do zero checks (if BIAS_DEBUG is defined)

Image< StorageType > | operator * (const Image< StorageType > &argimage)
Binary Operator * operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator * (const StorageType &argimage)
Binary operator * operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator *= (const Image< StorageType > &argimage)
Operator *= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator *= (const StorageType &argimage)
Operator *= with scalar on pixel values of an image.
Image< StorageType > | operator+ (const Image< StorageType > &argimage)
Binary Operator + operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator+ (const StorageType &argimage)
Binary operator + operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator+= (const Image< StorageType > &argimage)
Operator += operating on pixel values with pixel values of another image.
Image< StorageType > & | operator+= (const StorageType &argimage)
Operator += with scalar on pixel values of an image.
Image< StorageType > | operator- (const Image< StorageType > &argimage)
Binary Operator - operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator- (const StorageType &argimage)
Binary operator - operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator-= (const Image< StorageType > &argimage)
Operator -= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator-= (const StorageType &argimage)
Operator -= with scalar on pixel values of an image.
Image< StorageType > | operator/ (const Image< StorageType > &argimage)
Binary Operator / operating pixel values with pixel values of another image, returning a new image.
Image< StorageType > | operator/ (const StorageType &argimage)
Binary operator / operating on pixel values with a scalar, returning a new image.
Image< StorageType > & | operator/= (const Image< StorageType > &argimage)
Operator /= operating on pixel values with pixel values of another image.
Image< StorageType > & | operator/= (const StorageType &argimage)
Operator /= with scalar on pixel values of an image.
Image< StorageType > & | operator= (const ImageBase &Source)
copies ImageBase to an desired Image<>, be careful with this, because u can do something like: Image<char> = Image<float>, what usualluy not makes sense
Image< StorageType > & | operator| (const Image< StorageType > &argimage)
logical Operator || operating pixel values with pixel values of another image, returning a new image

Public Types

enum EColorModel {
CM_invalid = -1, CM_Grey, CM_RGB, CM_BGR,
CM_YUYV422, CM_UYVY422, CM_YUV420P, CM_YUV444,
CM_YUV411, CM_HSV, CM_HSI_OBS, CM_DV,
CM_RGBA, CM_GreyA, CM_Bayer_RGGB, CM_Bayer_GBRG,
CM_Bayer_GRBG, CM_Bayer_BGGR, CM_HSL, CM_hsL,
CM_SymTensor2x2, CM_BGRA, CM_RGBE
}
These are the most often used color models. More...
enum EStorageType {
ST_invalid = -1, ST_unsignedchar, ST_char, ST_unsignedshortint,
ST_shortint, ST_unsignedint, ST_int, ST_float,
ST_double
}

Public Member Functions

void | AddDebugLevel (long int lv)
int | AppendChannel (Image< StorageType > &img)
Append means: RGB + A => RGBA.
void | CopyIn_NoInit (void *data)
Take some data and fill it into the Image.
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
template<>
Image (unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved)
template<>
Image (const ImageBase &im)
template<>
Image ()
template<>
Image (unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved)
template<>
Image (const ImageBase &im)
template<>
Image ()
Image (const ImageBase &im)
create image from imagebase.
Image (unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true)
constructor with size and channels allocates image data
Image ()
void | Init (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Initialize image size and channels.
void | Init (unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
int | InitWithForeignData (unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true)
This is used to construct a BIAS::Image hull around existing image data.
bool | IsEmpty () const
check if ImageData_ points to allocated image buffer or not
template<>
int | MaxSTValue ()
template<>
char | MaxSTValue ()
template<>
int | MinSTValue ()
template<>
char | MinSTValue ()
template<>
Image< short int > & | operator| (const Image< short int > &argimage)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Release ()
reimplemented from ImageBase
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | StealImage (ImageBase &source)
steals the image data array from source, after releasing the actual image data and sets source image data to NULL
virtual | ~Image ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | UpdateImageDataArrayFromImageData_ ()
recomputes pointer array returned by GetImageDataArray

Protected Attributes

long int | _liDebugLevel
MetaData _MetaData
additional data block, handled by derived classes
BIAS::UUID _UID
unique id for every image
unsigned int | BitDepth_
relevant bits per pixel per channel
unsigned int | ChannelCount_
number of channels per pixel
enum EColorModel | ColorModel_
the color model of the pixels
unsigned int | Depth_
size of one channel of one pixel in bytes
unsigned int | Height_
image height in pixels
void * ImageData_
a pointer to the image data
void ** ImageDataArray_
array of pointers to the first byte in an image row
bool | InterleavedDataOrder_
planar or interleaved: planar means we have several image planes, e.g.
ROI Roi_
roi object
enum EStorageType | StorageType_
the storage type in a pixel channel
unsigned int | Width_
image width in pixels
unsigned int | WidthStep_
size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = VERSION_NUMBER
version number of imagebase class

Detailed Description

template<class StorageType>
class BIAS::Image< StorageType >

The image template class for specific storage types.

The real image data is stored as an array of the specific storage type. You can get the pointer by GetImageData() while accessing the image data could also be more efficiently done by GetImageDataArray()[y][x], which gives the first channel of pixel at position (x,y). The second and third channels for interleaved images are at [y][channelcount*x+1] and [y][channelcount*x+2].

There is an additional MetaData array, which holds information like the Pmatrix, which are used by derived classes.

see also ExampleLoad.cpp , ExampleOperator.cpp, ExampleChessboard.cpp

Definition at line 84 of file Image.hh.

Member Enumeration Documentation

enum BIAS::ImageBase::EColorModel [inherited]

These are the most often used color models.

Enumerator:
CM_invalid | invalid (not set) image format
CM_Grey | gray values (one channel: gray value)
CM_RGB | color values (three channel order: red,green,blue)
CM_BGR | color values (three channel order: blue,green,red)
CM_YUYV422 | YUYV422 (please insert a description).
CM_UYVY422 | (please insert a description)
CM_YUV420P | (please insert a description)
CM_YUV444 | (please insert a description)
CM_YUV411 | (please insert a description)
CM_HSV | HSV (three channel order: hue, sat , value).
CM_HSI_OBS | obsolete, HSI is unused and identical to HSL
CM_DV | DV (please insert a description).
CM_RGBA | RGBA (four channel order: red,green,blue,alpha).
CM_GreyA | Grey (or Gray) plus Alpha channel.
CM_Bayer_RGGB | One channel RGB image Bayer tile.
CM_Bayer_GBRG | One channel RGB image Bayer tile.
CM_Bayer_GRBG | One channel RGB image Bayer tile.
CM_Bayer_BGGR | One channel RGB image Bayer tile.
CM_HSL | similar to HSV but space is a double tipped cone
CM_hsL | similar to HSL but euclidean (h,s) for CNCC
CM_SymTensor2x2 | The image contains a 2x2 symmetric tensor.
CM_BGRA | BGRA (four channel order: blue,green,red,alpha).
CM_RGBE | RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent).

Definition at line 113 of file ImageBase.hh.

enum BIAS::ImageBase::EStorageType [inherited]

Enumerator:
ST_invalid | invalid not set image storage type
ST_unsignedchar | (8bit) unsigned char image storage type
ST_char | (8bit) signed char image storage type
ST_unsignedshortint | (16bit) unsigned integer image storage type
ST_shortint | (16bit) signed integer image storage type
ST_unsignedint | (32bit) unsigned integer image storage type
ST_int | (32bit) signed integer image storage type
ST_float | float image storage type
ST_double | double image storage type

Definition at line 98 of file ImageBase.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::Image< StorageType >::Image ( )

Definition at line 81 of file Image.cpp.

References BIASERR, PRINTTYPE, and StorageType.

Referenced by BIAS::Image< float >::Image().

template<class StorageType>
BIAS::Image< StorageType >::~Image ( ) [virtual]

Definition at line 44 of file Image.cpp.

template<class StorageType>
BIAS::Image< StorageType >::Image | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | const bool | interleaved = true
 | ) |

constructor with size and channels allocates image data

Definition at line 142 of file Image.cpp.

References BIASABORT, BIASERR, PRINTTYPE, and StorageType.

template<class StorageType>
BIAS::Image< StorageType >::Image ( const ImageBase & im ) [explicit]

create image from imagebase.

this is a dangerous operation and must therefore not be used by implicit conversion. That means, you can manually convert ImageBase->Image, but you cannot pass an Image<float> where Image<char> is expected.

Definition at line 130 of file Image.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::GetStorageType(), PRINTTYPE, and StorageType.

template<>
BIAS::Image< char >::Image ( )

Definition at line 175 of file Image.cpp.

References BIAS::ImageBase::BitDepth_, BIAS::ImageBase::Depth_, BIAS::ImageBase::ST_char, and BIAS::ImageBase::StorageType_.

template<>
BIAS::Image< char >::Image ( const ImageBase & im )

Definition at line 182 of file Image.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::ST_char, and BIAS::ImageBase::StorageType_.

template<>
BIAS::Image< char >::Image | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | Channels,
 |  | bool | interleaved
 | ) |

Definition at line 198 of file Image.cpp.

References BIAS::ImageBase::Init(), BIAS::ImageBase::ST_char, and BIAS::ImageBase::StorageType_.

template<>
BIAS::Image< int >::Image ( )

Definition at line 301 of file Image.cpp.

References BIAS::ImageBase::BitDepth_, BIAS::ImageBase::Depth_, BIAS::ImageBase::ST_int, and BIAS::ImageBase::StorageType_.

template<>
BIAS::Image< int >::Image ( const ImageBase & im )

Definition at line 308 of file Image.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::ST_int, and BIAS::ImageBase::StorageType_.

template<>
BIAS::Image< int >::Image | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | Channels,
 |  | bool | interleaved
 | ) |

Definition at line 322 of file Image.cpp.

References BIAS::ImageBase::Init(), BIAS::ImageBase::ST_int, and BIAS::ImageBase::StorageType_.

Member Function Documentation

template<class StorageType>
int BIAS::Image< StorageType >::AboveThresholdToValue | ( | StorageType | Threshold,
 |  | StorageType | Value
 | ) |

sets alls pixels with values above Threshold to Value

Definition at line 760 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
void BIAS::Image< StorageType >::AbsDiff | ( | const Image< StorageType > & | im1,
 |  | const Image< StorageType > & | im2
 | ) |

absolut difference

Author:
Felix Woelk

Definition at line 597 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), BIAS::HaveImagesMatchingROI(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), and StorageType.

Referenced by main().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
int BIAS::Image< StorageType >::AppendChannel ( Image< StorageType > & img )

Append means: RGB + A => RGBA.

Definition at line 944 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and StorageType.

Referenced by BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), and BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter().

template<class StorageType>
int BIAS::Image< StorageType >::BelowThresholdToValue | ( | StorageType | Threshold,
 |  | StorageType | Value
 | ) |

sets alls pixels with values below Threshold to Value

Definition at line 746 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
double BIAS::Image< StorageType >::BicubicInterpolation | ( | const double & | x,
 |  | const double & | y,
 |  | const unsigned short int | channel = 0
 | ) | const

Returns the bicubic interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existing ROI Does not work for planar multi-channel images !

The subpixel value is obtained by computing a weighted average of the surrounding 4x4 pixel block. The weights are computed by independent x and y-dir cubic polynomials which guarantee constant first order derivatives at the grid positions

Attention:
1.0<=x<Width-2 and 1.0<=y<Height-2 is required but not checked
Author:
koeser 02/2005

Definition at line 898 of file Image.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::Image< StorageType >::GetImageDataArray(), and StorageType.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), and main().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolation | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const

Returns the bilinear interpolated pixel value (using channel offset) value of pixel defined by double coordinates, ignoring an existingROI.

Author:
Ingo Thomsen
Date:
04.03.2002 tested (only with gray images yet)

Definition at line 863 of file Image.cpp.

References BIASERR, BIAS::Image< StorageType >::BilinearInterpolationGrey(), BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::Image< StorageType >::BilinearInterpolationRGBPlanar(), BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and res.

Referenced by BIAS::TrackerBase< StorageType >::_am_computeIntensityDifferenceAffine(), main(), and BIAS::SphericalUndistortion::ProjectImageCylindric().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 806 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation(), and BIAS::EpipolarLine::ScanLine_().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationGreyMinVal | ( | const double | x,
 |  | const double | y,
 |  | const StorageType & | minVal
 | ) | const [inline]

bilinear interpolation pixel value with value check.

If at least one of the input values is <=minVal, then the unknown value minVal is returned, too.

Parameters:
minVal all values <= minVal are invalid/unknown.
Author:
Jan Woetzel 12/2004

Definition at line 827 of file Image.hh.

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 918 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class StorageType>
double BIAS::Image< StorageType >::BilinearInterpolationRGBPlanar | ( | const double | x,
 |  | const double | y,
 |  | unsigned int | channel
 | ) | const [inline]

no boundary checking ! ignores ROI

Author:
Felix Woelk

Definition at line 899 of file Image.hh.

Referenced by BIAS::Image< StorageType >::BilinearInterpolation().

template<class StorageType>
void BIAS::Image< StorageType >::BilinearInterpolationShiftRegion | ( | const double & | x,
 |  | const double & | y,
 |  | unsigned int | hws_x,
 |  | unsigned int | hws_y,
 |  | unsigned char * | Buffer
 | ) | [inline]

sample the continuous (bilinear interpolation of (*this)) image using a grid with one pixel spacing at subpixel positions (x-hws, y-hws) , .

.. (x,y), ... (x-hws, y-hws) You get a window of size (2*hws_x+1)*(2*hws_y+1) which is exactly centered at x,y (a subpixel position) of the original image

Parameters:
Buffer | must have size (2*hws_x+1)*(2*hws_y+1)
hws_x | half window size in x direction
hws_y | half window size in y direction
x | x-center of window
y | y-center of window
Author:
koeser 01/2004

Definition at line 1011 of file Image.hh.

template<class StorageType>
void BIAS::Image< StorageType >::Binarize ( StorageType Threshold )

sets all pixels >= Threshold to MaxPixelValue and all others to MinPixelValue only for one channel / grey images

Author:
woelk 01 2003

Definition at line 773 of file Image.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::Image< StorageType >::MaxSTValue(), BIAS::Image< StorageType >::MinSTValue(), and StorageType.

template<class StorageType>
int BIAS::Image< StorageType >::BinaryThreshold | ( | StorageType | Threshold,
 |  | StorageType | MinValue,
 |  | StorageType | MaxValue
 | ) |

Test for every pixel wether it is >= than the threshold.

If so set to a MaxValue, otherwise to an MinValue.

Author:
Ingo Thomsen
Date:
03/28/2002 tested

Definition at line 840 of file Image.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::Image< StorageType >::CalcScaleShift | ( | double | Min,
 |  | double | Max,
 |  | double & | Scale,
 |  | double & | Shift
 | ) | const

calculate the values needed by ScaleShiftBetween

Definition at line 814 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

Referenced by BIAS::Image< StorageType >::ScaleShiftBetween().

template<class StorageType>
void BIAS::Image< StorageType >::Clear ( const StorageType value = 0 ) [inline]

sets all pixels to zero/value

clear all pixels elements and set them to a 'default' value JW 04/2003

Definition at line 233 of file Image.hh.

void BIAS::ImageBase::ClearDataPointer ( ) [inline, inherited]

set data pointer to NULL, such that image IsEmpty _without_ deletion of data.

Author:
evers

Definition at line 560 of file ImageBase.hh.

Referenced by main().

void ImageBase::CopyIn_NoInit ( void * data ) [inherited]

Take some data and fill it into the Image.

Warning:
Image must be initialized already !
Author:
Evers

Definition at line 693 of file ImageBase.cpp.

References BIASDOUT, D_COPYIN, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageData(), and BIAS::ImageBase::GetPixelCount().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_uEye::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

int ImageBase::Cut2ROI ( ) [inherited]

reduces image to current ROI, !!! image size changes !!!

Author:
Felix Woelk untested
Todo:
Make it work on colored Images

Definition at line 556 of file ImageBase.cpp.

References BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ROI::Resize(), BIAS::ImageBase::UnsetROI(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool ImageBase::DimensionMatch ( const BIAS::ImageBase & other ) const [inherited]

Returns:
true if the image dimension w x h of this and other match = are equal
Author:
JW

Definition at line 845 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

int ImageBase::Display ( ) [inherited]

display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.

This signature is required because MSVS debugger does not support default params.

Author:
Jan Woetzel

Definition at line 1221 of file ImageBase.cpp.

References DEFAULT_32to8_scale, and DEFAULT_Display_delay.

Referenced by BIAS::ImageBase::Display().

int ImageBase::Display | ( | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec = DEFAULT_Display_delay,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

interface for the above

Author:
Jan Woetzel 2005

Definition at line 1211 of file ImageBase.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and BIAS::ImageBase::Display().

int ImageBase::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [inherited]

display image as popup to screnn sing OpenCv IplImage usign Highgui functions.

Very useful to easily display in aimge, e.g. for debugging.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 1193 of file ImageBase.cpp.

References BIAS::WrapBias2Ipl::Display().

Referenced by main().

template<class StorageType>
StorageType BIAS::Image< StorageType >::FastBilinearInterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline]

fast bilinear interpolation specialisation for unsigned char exists, 20% faster than function below

Author:
woelk 01 2003

Definition at line 859 of file Image.hh.

Referenced by BIAS::SphericalUndistortion::ProjectImageCylindric().

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithConstValue ( StorageType Value[] )

fill color images

Definition at line 424 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), p, step(), and StorageType.

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithConstValue ( StorageType Value )

fill grey images

Definition at line 397 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), p, step(), and StorageType.

Referenced by BIAS::GenSynthMatches::_Draw(), drawCubic(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), drawQuadratic(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), main(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_().

template<class StorageType>
void BIAS::Image< StorageType >::FillImageWithXValue ( )

fills image with value depending on x coordinate

Definition at line 472 of file Image.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), p, and StorageType.

Referenced by main().

int ImageBase::Flip ( ) [inherited]

flips the image vertically (row order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
Daniel Grest
Date:
Jun 2002 Interleaved tested, planar untested Aug 2002: Jan-Friso Evers: fixed interleaved for float and other

Definition at line 700 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by BIAS::ThreeDOut::AddTriangleMesh(), MyFrame::OnTimer(), BIAS::ImageBase::PadToPowerOfTwoAndFlip(), and BIAS::OpenGLCanvasBase::ScreenShot().

int ImageBase::FlipHorizontal ( ) [inherited]

flips the image horizontal (column order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
woelk 10/2004

Definition at line 744 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

unsigned int BIAS::ImageBase::GetBitDepth ( ) const [inline, inherited]

returns the bits per channel, which is not necessairily 8*sizeof(StorageType).

Author:
woelk 12/2004

Definition at line 235 of file ImageBase.hh.

Referenced by BIAS::ImgObjGL::GetGLInternalFormat(), MainFrame::OnInfo(), and BIAS::ImageBase::Pad().

int ImageBase::GetChannel | ( | ImageBase & | source,
 |  | unsigned int | channel
 | ) | [inherited]

copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB

Author:
Felix Woelk untested (17/04/2002)

Definition at line 337 of file ImageBase.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageBase::IsPlanar().

int ImageBase::GetChannelcount ( const enum BIAS::ImageBase::EColorModel & colormodel ) [static, inherited]

get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1153 of file ImageBase.cpp.

References BIASERR, BIASWARN, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_RGBA.

unsigned int BIAS::ImageBase::GetChannelCount ( ) const [inline, inherited]

returns the number of Color channels, e.g.

RGB 3

the value returned is independent of the StorageType

Definition at line 252 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::CalcScaleShift(), castchar(), castfloat(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImageBase::Cut2ROI(), BIAS::Histogram::DeleteHist_(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::ImageIO::ExportMagickPP(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageDraw< StorageType >::InterpolatedLine(), BIAS::ImageDraw< StorageType >::Line(), LoadImage(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Image< StorageType >::ScaleShift(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), and BIAS::PMDImageProc::Write().

enum EColorModel BIAS::ImageBase::GetColorModel ( ) const [inline, inherited]

Definition at line 270 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), ComputeCutoutImage(), BIAS::ImageConvert::Convert(), BIAS::ColorHarris::CreateSTColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::ImageIO::ExportMagickPP(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), main(), MainFrame::OnInfo(), BIAS::ImageBase::operator=(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageBase::GetCopyOfROI ( ImageBase & copy ) const [inherited]

returns a copy of ROI (a new image) lower right point excluded, only interleaved images !

Author:
Felix Woelk, grest untested

Definition at line 484 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Release(), and BIAS::ImageBase::SetColorModel().

int ImageBase::GetCopyOfROI2 ( ImageBase & copy ) const [inherited]

like GetCopyOfROI, but with lower right point included only interleaved images !

Note:
GetCopyOfROI returns an image where the lower right ROI point is not included. This version does it. Correction are not made in the original method, because extensive corrections would become necessary in other methods.
Author:
Ingo Thomsen

Definition at line 451 of file ImageBase.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int BIAS::ImageBase::GetDepth ( ) const [inline, inherited]

returns the bytes per channel, which is the sizeof(StorageType)

Definition at line 229 of file ImageBase.hh.

Referenced by BIAS::ImageBase::CopyIn_NoInit(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPP(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::ImageBase::Pad(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::ImageBase::SetOutsideROIZero().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::ImageBase::GetHeight ( ) const [inline, inherited]

Definition at line 225 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), MainFrame::FitSizetIfTooSmall(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

void* BIAS::ImageBase::GetImageData ( ) [inline, inherited]

Definition at line 205 of file ImageBase.hh.

template<class StorageType>
StorageType* BIAS::Image< StorageType >::GetImageData ( ) const [inline]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 127 of file Image.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::MySampleGrabberCB::BufferCB(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), castchar(), castfloat(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), cut(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::ImageConvert::DVToRGB_(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::VideoSource_Net::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::Label4Neighbour_(), main(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mysobel2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::MySampleGrabberCB::SampleCB(), BIAS::Image< StorageType >::ScaleShift(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoStream::SplitIntoFiles(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::ImageConvert::ToRGB(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::ImageConvert::YUV420PToGrey_(), BIAS::ImageConvert::YUV420PToRGB_(), BIAS::ImageConvert::YUV422ToGrey_(), BIAS::ImageConvert::YUV422ToRGB_(), and BIAS::MySampleGrabberCB::~MySampleGrabberCB().

template<class StorageType>
StorageType** BIAS::Image< StorageType >::GetImageDataArray ( ) const [inline]

overloaded GetImageData() from ImageBase

Author:
Daniel Grest

Reimplemented from BIAS::ImageBase.

Definition at line 133 of file Image.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::SphericalUndistortion::CorrectVignette(), demo(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Conic2D::Draw(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::CondensHisto::GetSamplePositions(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Contour::Init_(), BIAS::ImageDraw< StorageType >::InterpolatedLineGrey(), BIAS::ImageDraw< StorageType >::Line(), main(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mysobel(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Image< StorageType >::PrintPointer(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::CornerMatcher::SSD(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::ScaledImageCanvas::UpdateScaleOffset(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

template<class StorageType>
StorageType BIAS::Image< StorageType >::GetMaxPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const

Get the maximal pixel value if coo!=NULL the coo[0]=x of max and coo[1]=y of max.

Author:
Felix Woelk

Definition at line 730 of file Image.cpp.

References BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

template<class StorageType>
void BIAS::Image< StorageType >::GetMeanPixelValue ( StorageType mean[] )

Author:
woelk 08/2004

Definition at line 485 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), p, step(), and StorageType.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

MetaData* BIAS::ImageBase::GetMetaData ( ) [inline, inherited]

Definition at line 301 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), and BIAS::ImageIO::WriteUnbuffered().

template<class StorageType>
void BIAS::Image< StorageType >::GetMinMaxPixelValue | ( | StorageType & | min,
 |  | StorageType & | max,
 |  | unsigned short int | channel = 0,
 |  | unsigned int * | mincoo = NULL,
 |  | unsigned int * | coo = NULL
 | ) | const

returns the minimal and maximal pixel value in channel only Finds minimum and maximum pixel value in image in channel only, i.e.

all other channels are ignored during the search. Returns the first occurance of min/max pixelvalue, if they occure multiple times.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value if mincoo or maxcoo !=NULL, also stores the location of min resp. max, works slow on woelk 10/2004 ( Examples/ExampleMinMax.cpp )
Author:
Jan Frahm, woelk 01/2003, woelk 10/2004

Definition at line 587 of file Image.cpp.

References BIASASSERT, BIASCDOUT, BIASERR, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, D_IMAGE_MINMAXCOO, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), and StorageType.

Referenced by BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::CalcScaleShift(), BIAS::Image< StorageType >::GetMaxPixelValue(), BIAS::Image< StorageType >::GetMinPixelValue(), main(), BIAS::ImageConvert::RGBToHSV_(), and Scale().

template<class StorageType>
bool BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange | ( | StorageType & | min,
 |  | StorageType & | max,
 |  | const StorageType | ignoreStart = 0,
 |  | const StorageType | ignoreEnd = 0,
 |  | const unsigned short int | channel = 0
 | ) | const

Get both, minimal and maximal pixel value --actual implementation only for planar images--.

Parameters:
min | The variable where to store the minimun value
min | The variable where to store the maximum value
ignoreStart,ignoreEnd | define teh range of values to be ignored
channel | to be searched fro multi-channel images
Returns:
true if a value within raneg was found, else false
Author:
Jan Woetzel 01/2003

Definition at line 523 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), and StorageType.

template<class StorageType>
StorageType BIAS::Image< StorageType >::GetMinPixelValue | ( | unsigned short int | channel = 0,
 |  | unsigned int * | coo = NULL
 | ) | const

Get the minimal pixel value if coo!=NULL the coo[0]=x of min and coo[1]=y of min.

Author:
Felix Woelk

Definition at line 713 of file Image.cpp.

References BIAS::Image< StorageType >::GetMinMaxPixelValue(), and StorageType.

unsigned long int BIAS::ImageBase::GetPixelCount ( ) const [inline, inherited]

returns number of pixels in image

Definition at line 277 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), BIAS::ImageBase::CopyIn_NoInit(), BIAS::Histogram::DeleteHist_(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::ImageBase::GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ROI::SetMaskImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

template<class StorageType>
StorageType & BIAS::Image< StorageType >::GetPixelNearestNeighbor | ( | const float | x,
 |  | const float | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline]

Get the value of a specific channel offset of specific pixel nearest to given float coordinates, using the double version.

Author:
Ingo Thomsen
Date:
03/28/2002 tested (only with interleaved gray images)

Definition at line 680 of file Image.hh.

template<class StorageType>
StorageType & BIAS::Image< StorageType >::GetPixelNearestNeighbor | ( | const double | x,
 |  | const double | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline]

Get the value of a specific channel offset of specific pixel nearest to given double coordinates.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved grey images)

Definition at line 657 of file Image.hh.

unsigned int BIAS::ImageBase::GetPixelPosition | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned short int | channel = 0
 | ) | const [inline, inherited]

returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).

Changed this method to return position in StorageType Jan-Friso Evers

Definition at line 770 of file ImageBase.hh.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

void ImageBase::GetROI | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 899 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

void ImageBase::GetROI | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

deprecated, use GetROICorners()

Definition at line 887 of file ImageBase.cpp.

References BIAS::ImageBase::GetROICorners().

const ROI* BIAS::ImageBase::GetROI ( ) const [inline, inherited]

Definition at line 358 of file ImageBase.hh.

ROI* BIAS::ImageBase::GetROI ( ) [inline, inherited]

Returns a pointer to the roi object.

Author:
woelk 07/2005

Definition at line 355 of file ImageBase.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::ImageBase::Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), main(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::ImageBase::Paste2ROI(), BIAS::ImageBase::PrintROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageBase::UnsetROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void ImageBase::GetROICorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 904 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

void ImageBase::GetROICorners | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const [inherited]

access region of interest rectangle JW

Definition at line 892 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), and BIAS::Image< StorageType >::operator/=().

const unsigned int ImageBase::GetROILowerRightX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 931 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROILowerRightY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 938 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftX ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 917 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftY ( ) const [inherited]

deprecated, use GetROI()->GetCorners()

Definition at line 924 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

int ImageBase::GetSize ( const enum BIAS::ImageBase::EStorageType & storagetype ) [static, inherited]

get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1120 of file ImageBase.cpp.

References BIASBREAK, BIASERR, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedint.

unsigned int BIAS::ImageBase::GetSize ( ) const [inline, inherited]

returns the image size in bytes = count - NOT the dimension

Definition at line 239 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and MainFrame::OnInfo().

enum EStorageType BIAS::ImageBase::GetStorageType ( ) const [inline, inherited]

Definition at line 273 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::Convert(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoSource::InitImage(), main(), BIAS::GuiGTK::MouseMotionCallback_(), MainFrame::OnInfo(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::ImageBase::Pad(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), Scale(), BIAS::ROI::SetMaskImage(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::PMDImageProc::Write().

const BIAS::UUID& BIAS::ImageBase::GetUID ( ) const [inline, inherited]

returns the UUID of the image

Examples:
ExampleImageLoad.cpp.

Definition at line 298 of file ImageBase.hh.

Referenced by main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

int BIAS::ImageBase::GetVersionNumber ( ) const [inline, inherited]

Definition at line 307 of file ImageBase.hh.

Referenced by MainFrame::OnInfo(), and BIAS::operator<<().

unsigned int BIAS::ImageBase::GetWidth ( ) const [inline, inherited]

Definition at line 222 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::WrapBias2Ipl::Consistent(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), createst(), cut(), BIAS::ImageBase::Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::ImageBase::DimensionMatch(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), MainFrame::FitSizetIfTooSmall(), BIAS::ImageBase::Flip(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::ImageBase::Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), BIAS::ImageBase::SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::ImageBase::GetWidthStep ( ) const [inline, inherited]

returns the number of bytes per line

returns the number of bytes per line, not the number of StorageTypes

interleaved data order: = Width * Depth * ChannelCount planar data order: = Width * Depth

Useful for memory aligned images (e.g. 4/8 Byte) and packing of textures. JW

Definition at line 267 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), and BIAS::ImageBase::SetOutsideROIZero().

void ImageBase::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) | [inherited]

Initialize image size and channels.

Warning:
call this only for empty images, calls new for the image data array. Overwrites the color model with some kind of best guess
Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes

Definition at line 117 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ROI::Resize(), BIAS::ImageBase::Roi_, BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, StorageType, BIAS::ImageBase::StorageType_, BIAS::ROI::UnsetROI(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

template<class StorageType>
void BIAS::Image< StorageType >::Init | ( | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) |

calls Init from ImageBase storageType is ignored, just dummy argument

Definition at line 363 of file Image.cpp.

References BIAS::ImageBase::Init(), and BIAS::ImageBase::StorageType_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::GenSynthMatches::_Draw(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), ComputeCutoutImage(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), createst2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), cut(), deflate_JPEG_file(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::LabelInit_(), main(), mainloop(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mytoplanar(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::UnVignette::PrepareLuImage_(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::VideoStream::SplitIntoFiles(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::MatlabTBUndistortion::UndistortFast().

template<class StorageType>
int BIAS::Image< StorageType >::InitWithForeignData | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | void * | data,
 |  | const bool | interleaved = true
 | ) |

This is used to construct a BIAS::Image hull around existing image data.

Be sure to ClearDataPointer() _before_ destructing the Image object to avoid deletion of the data array

Author:
evers

Definition at line 1044 of file Image.cpp.

References BIAS::ImageBase::Init(), BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), and BIAS::ImageBase::StorageType_.

Referenced by main(), and BIAS::PMDImageProc::Read().

template<class StorageType>
double BIAS::Image< StorageType >::InterpolationGrey | ( | const double | x,
 |  | const double | y
 | ) | const [inline]

interpolation with weights according to distances to x and y

Definition at line 775 of file Image.hh.

void BIAS::ImageBase::InvalidateUID ( ) [inline, inherited]

sets the image's uid to invalid

Definition at line 341 of file ImageBase.hh.

References BIAS::UUID::Invalidate().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::ImageIO::ImportOpenEXR().

bool BIAS::ImageBase::IsEmpty ( ) const [inline, inherited]

check if ImageData_ points to allocated image buffer or not

Definition at line 177 of file ImageBase.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), deflate_JPEG_file(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::ImageConvert::FromInterleaved(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ColorSegmentation::GetGreyImage(), BIAS::ColorSegmentation::GetHueImage(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ColorSegmentation::GetSatImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::VideoSource::InitImage(), BIAS::ImageConvert::Ipl2BIAS(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), mirror(), BIAS::ImageBase::operator=(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::PMDImageProc::Read(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageBase::Release(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), MainFrame::SaveUnVignetted(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageBase::StealImage(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::PMDImageProc::Write().

const bool BIAS::ImageBase::IsInROI | ( | double & | x,
 |  | double & | y
 | ) | const [inline, inherited]

Definition at line 419 of file ImageBase.hh.

bool BIAS::ImageBase::IsInterleaved ( ) const [inline, inherited]

Definition at line 313 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), mytoplanar(), MainFrame::OnInfo(), BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2().

bool BIAS::ImageBase::IsPlanar ( ) const [inline, inherited]

Definition at line 310 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageConvert::Convert(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::ImageBase::GetChannel(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageConvert::IP_RGBToGrey_(), MainFrame::OnInfo(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

bool BIAS::ImageBase::IsPositionInImage | ( | const int & | x,
 |  | const int & | y
 | ) | const [inline, inherited]

check if image contains that pixel position

Definition at line 781 of file ImageBase.hh.

Referenced by BIAS::EpipolarLine::DrawWhole().

bool ImageBase::IsPowerOfTwoSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [static, inherited]

Definition at line 810 of file ImageBase.cpp.

bool ImageBase::IsPowerOfTwoSize ( ) const [inherited]

Returns:
true if image size is a power of two JW

Definition at line 800 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::ImgObjGL::CreateGLTexture(), and BIAS::ImageCanvasGLBase::ValidTexobj().

template<class StorageType>
double BIAS::Image< StorageType >::LinearInterpolation | ( | const double | x,
 |  | const unsigned int | y
 | ) | const [inline]

Definition at line 758 of file Image.hh.

template<class StorageType>
double BIAS::Image< StorageType >::LinearInterpolation | ( | const unsigned int | x,
 |  | const double | y
 | ) | const [inline]

Definition at line 741 of file Image.hh.

template<>
int BIAS::Image< int >::MaxSTValue ( ) [inline]

Definition at line 602 of file Image.hh.

template<>
char BIAS::Image< char >::MaxSTValue ( ) [inline]

Definition at line 584 of file Image.hh.

template<class StorageType>
StorageType BIAS::Image< StorageType >::MaxSTValue ( ) [inline]

returns the maximal possible StorageType

Definition at line 571 of file Image.hh.

Referenced by BIAS::Image< StorageType >::Binarize(), and Scale().

template<>
int BIAS::Image< int >::MinSTValue ( ) [inline]

Definition at line 604 of file Image.hh.

template<>
char BIAS::Image< char >::MinSTValue ( ) [inline]

Definition at line 586 of file Image.hh.

template<class StorageType>
StorageType BIAS::Image< StorageType >::MinSTValue ( ) [inline]

returns the minimal possible StorageType

Definition at line 620 of file Image.hh.

Referenced by BIAS::Image< StorageType >::Binarize(), and Scale().

int BIAS::ImageBase::MoveToClosestPositionInImage | ( | int & | x,
 |  | int & | y
 | ) | const [inline, inherited]

find closest valid pixel position to x,y

Author:
koeser 01/2005
Returns:
0=was correct 3,4=y out of range, 1,2 x out of range

Definition at line 785 of file ImageBase.hh.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator * ( const Image< StorageType > & argimage )

Binary Operator * operating pixel values with pixel values of another image, returning a new image.

Definition at line 484 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator * ( const StorageType & argimage )

Binary operator * operating on pixel values with a scalar, returning a new image.

Definition at line 393 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and GRAYTEST.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator *= ( const Image< StorageType > & argimage )

Operator *= operating on pixel values with pixel values of another image.

Definition at line 291 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator *= ( const StorageType & argimage )

Operator *= with scalar on pixel values of an image.

Definition at line 177 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator+ ( const Image< StorageType > & argimage )

Binary Operator + operating pixel values with pixel values of another image, returning a new image.

Definition at line 437 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator+ ( const StorageType & argimage )

Binary operator + operating on pixel values with a scalar, returning a new image.

Definition at line 351 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::Image< StorageType >::Init(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator+= ( const Image< StorageType > & argimage )

Operator += operating on pixel values with pixel values of another image.

Definition at line 241 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator+= ( const StorageType & argimage )

Operator += with scalar on pixel values of an image.

Definition at line 124 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, p, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator- ( const Image< StorageType > & argimage )

Binary Operator - operating pixel values with pixel values of another image, returning a new image.

Author:
Ingo Thomsen tested (18/04/2002)

Definition at line 461 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator- ( const StorageType & argimage )

Binary operator - operating on pixel values with a scalar, returning a new image.

Definition at line 375 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and GRAYTEST.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator-= ( const Image< StorageType > & argimage )

Operator -= operating on pixel values with pixel values of another image.

Definition at line 266 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator-= ( const StorageType & argimage )

Operator -= with scalar on pixel values of an image.

Definition at line 153 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator/ ( const Image< StorageType > & argimage )

Binary Operator / operating pixel values with pixel values of another image, returning a new image.

Definition at line 508 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > BIAS::Image< StorageType >::operator/ ( const StorageType & argimage )

Binary operator / operating on pixel values with a scalar, returning a new image.

Definition at line 411 of file Operators.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator/= ( const Image< StorageType > & argimage )

Operator /= operating on pixel values with pixel values of another image.

Definition at line 315 of file Operators.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), GRAYTEST, step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator/= ( const StorageType & argimage )

Operator /= with scalar on pixel values of an image.

Definition at line 203 of file Operators.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetWidth(), step(), and StorageType.

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator= ( const ImageBase & Source )

copies ImageBase to an desired Image<>, be careful with this, because u can do something like: Image<char> = Image<float>, what usualluy not makes sense

Author:
Friso Evers, Nov. 2002

Reimplemented from BIAS::ImageBase.

Definition at line 41 of file Operators.cpp.

References BIAS::Debug::_liDebugLevel, BIASERR, BIASGDOUT, BIAS::ImageConvert::ConvertST(), D_IMAGE_TRACE, BIAS::Debug::GetDebugLevel(), BIAS::ImageBase::GetStorageType(), PRINTTYPE, and StorageType.

bool BIAS::ImageBase::operator== ( const ImageBase & img ) [inline, inherited]

comparison operator, based upon the adresses of the actual image data

Author:
Ingo Thomsen tested

Definition at line 449 of file ImageBase.hh.

References BIAS::ImageBase::GetImageData().

template<>
Image< short int > & BIAS::Image< short int >::operator| ( const Image< short int > & argimage )

Definition at line 539 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GRAYTEST, BIAS::HaveImagesMatchingROI(), and BIAS::Image< StorageType >::Init().

template<class StorageType>
Image< StorageType > & BIAS::Image< StorageType >::operator| ( const Image< StorageType > & argimage )

logical Operator || operating pixel values with pixel values of another image, returning a new image

Definition at line 532 of file Operators.cpp.

References BIASERR.

int ImageBase::Pad | ( | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | [inherited]

Definition at line 1007 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), img, and BIAS::ImageBase::Pad().

int ImageBase::Pad | ( | BIAS::ImageBase & | dest,
 |  | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | const [inherited]

Definition at line 1032 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageBase::SetBitDepth().

Referenced by BIAS::ImageBase::Pad(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::ZeroPad().

int ImageBase::PadToPowerOfTwo ( const int & padVal = 0 ) [inherited]

in place version of the above

Author:
JW

Definition at line 956 of file ImageBase.cpp.

References img, BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

int ImageBase::PadToPowerOfTwo | ( | BIAS::ImageBase & | dest,
 |  | const int & | padVal = 0
 | ) | const [inherited]

increase the size of this image to next power of two (e.g.

384x100>512x128) the original image S is set to upper left rectangle

Parameters:
padVal used by memset to pad the right and lower added pixels No scale, just padding!
    orig xx
    xxxxxxx
Author:
Jan Woetzel 09/2003 - 11/2005

Definition at line 979 of file ImageBase.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::ImageBase(), BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::Pad(), and BIAS::ImageBase::PowerOfTwoSize().

Referenced by BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PadToPowerOfTwoAndFlip().

int ImageBase::PadToPowerOfTwoAndFlip ( const int & padVal = 0 ) [inherited]

first pad, then flip.

useful for OpenGL texture image which must be pow2 size and Y-flipped ics. example:

    0 1 2
    3 4 5
    -->
    x x x x
    x x x x
    3 4 5 x
    0 1 2 x
Todo:
more efficient in place with memmove
Author:
Jan Woetzel

Definition at line 1105 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::Flip(), and BIAS::ImageBase::PadToPowerOfTwo().

int ImageBase::Paste2ROI ( const ImageBase & Image ) [inherited]

paste Image to current ROI

Author:
Felix Woelk 02 2003

Definition at line 519 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

Referenced by main(), and BIAS::ImageConvertThreaded::MergeImage_().

template<class StorageType>
StorageType BIAS::Image< StorageType >::PixelValue | ( | const unsigned int | x,
 |  | const unsigned int | y,
 |  | const unsigned short int | channel = 0
 | ) | const [inline]

Returns value of pixel at specific position, using specific channel as offset.

Author:
Ingo Thomsen
Date:
03/27/2002 tested (only with interleaved image)

Definition at line 635 of file Image.hh.

Referenced by MainFrame::CalcImageMean3x3(), and BIAS::PMDImageProc::CalcSigmaDepth().

void * ImageBase::PixelValueBase | ( | unsigned | x,
 |  | unsigned | y,
 |  | unsigned | channel = 0
 | ) | [inherited]

Definition at line 852 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

template<class StorageType>
StorageType BIAS::Image< StorageType >::PixelValueInterleaved | ( | const int | x,
 |  | const int | y,
 |  | const int | channel = 0
 | ) | const [inline]

Returns value of pixel at specific position, using specific channel as offset.

Faster than PixelValue because it has no error check, works only for interleaved images

Author:
Johan Skoglund
Date:
06/10/2004 untested

Definition at line 650 of file Image.hh.

bool ImageBase::PowerOfTwoSize | ( | unsigned int & | width2,
 |  | unsigned int & | height2
 | ) | const [inherited]

Returns:
true if both, width and height are already a power of two. The next power of two size >= actual size is computed and stored in args. useful for OpenGL texture enlargement for 'power of two' textures.
Author:
Jan Woetzel 09/2003

Definition at line 821 of file ImageBase.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::PowerOfTwoSize().

unsigned int ImageBase::PowerOfTwoSize ( const unsigned int & val ) [static, inherited]

Returns:
next pow2 >= val JW

Definition at line 831 of file ImageBase.cpp.

References res.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::GeometryGL::GetImgCorner2d(), BIAS::ImageBase::PadToPowerOfTwo(), and BIAS::ImageBase::PowerOfTwoSize().

template<class StorageType>
std::ostream & BIAS::Image< StorageType >::PrintData ( std::ostream & os ) const

writes data of IplImage_ to os (ascii)

Definition at line 383 of file Image.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::ImageData_, and StorageType.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::ImageBase::PrintHeader ( std::ostream & os = std::cout ) const [inherited]

Referenced by BIAS::ImageIO::ImportMagickPP(), main(), and mainloop().

template<class StorageType>
std::ostream & BIAS::Image< StorageType >::PrintPointer ( std::ostream & os ) const

writes pointer of IplImage_ to os (ascii)

Definition at line 372 of file Image.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::ImageData_, and BIAS::ImageBase::ImageDataArray_.

void ImageBase::PrintROI ( std::ostream & os = std::cout ) const [inherited]

deprecated, use 'os << *GetROI()'

Definition at line 912 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

template<class StorageType>
Image< float > BIAS::Image< StorageType >::Reciprocal | ( | const float | factor = 1.0,
 |  | const unsigned short int | channel = 0
 | ) |

Jan Woetzel 01/2003.

Returns:
the reciprocal for each pixel: x' = 1/x computes for exactly one channel (in case of multi channel images) returns float/double image
Author:
Jan Woetzel 01/2003

Definition at line 1007 of file Image.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), res, and StorageType.

void BIAS::ImageBase::RedirectImageDataPointer ( void * data ) [inline, inherited]

This method takes data and set the internal image data pointer to this.

You should really know what you are doing using this method. Don't say you haven't been warned.

Author:
Friso Evers

Definition at line 549 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

template<class StorageType>
void BIAS::Image< StorageType >::Release ( )

reimplemented from ImageBase

Reimplemented from BIAS::ImageBase.

Definition at line 989 of file Image.cpp.

References BIAS::ImageBase::_MetaData, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::ColorModel_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetROI(), BIAS::ImageBase::Height_, BIAS::ImageBase::ImageData_, BIAS::ImageBase::ImageDataArray_, BIAS::ROI::Release(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Image< StorageType >::AbsDiff(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), createst2(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::Label::LabelRelease_(), main(), mirror(), BIAS::MySampleGrabberCB::MySampleGrabberCB(), mytoplanar(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::PMDImageProc::Read(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), and BIAS::MySampleGrabberCB::~MySampleGrabberCB().

void BIAS::ImageBase::ReleaseImageDataPointer ( ) [inline, inherited]

Releases ImageData_ (to be used together with RedirectImageDataPointer).

Author:
Felix woelk

Definition at line 761 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::ImageBase::SamePixelAndChannelCount ( const ImageBase & Image ) const [inline, inherited]

checks if data area has same "size" as Image of other type

Definition at line 749 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::VideoSource_Net::GrabSingle(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::Label4Neighbour(), main(), mytoplanar(), BIAS::ImageBase::operator=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Label::Process(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB(), and BIAS::ImageConvert::ToPlanar().

template<class StorageType>
int BIAS::Image< StorageType >::ScaleShift | ( | double | Scale,
 |  | double | Shift
 | ) |

scales and shifts image (all channels simultanously)

does scale and shift every channel with same factor so that (max of all channels) = Max and (min of all channels) = Min. First shifts, then scales.

Author:
Felix Woelk

Definition at line 788 of file Image.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

Referenced by Draw(), BIAS::Image< StorageType >::ScaleShiftBetween(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

template<class StorageType>
int BIAS::Image< StorageType >::ScaleShiftBetween | ( | double | Min,
 |  | double | Max
 | ) |

scales and shifts image so afterwards every pixel has a value between Min and Max

scales and shifts every channel with same factor

Author:
Felix Woelk

Definition at line 801 of file Image.cpp.

References BIASERR, BIAS::Image< StorageType >::CalcScaleShift(), res, and BIAS::Image< StorageType >::ScaleShift().

Referenced by BIAS::GuiBase::ConvertToUC_(), and Scale().

void BIAS::ImageBase::SetBitDepth ( unsigned bitdepth ) [inline, inherited]

needed by ImageIO

Definition at line 334 of file ImageBase.hh.

References BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR(), and BIAS::ImageBase::Pad().

void BIAS::ImageBase::SetColorModel ( EColorModel Model ) [inline, inherited]

Definition at line 327 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), createst(), createst2(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageBase::Init(), main(), mytoplanar(), BIAS::PMDImageProc::Read(), BIAS::ImageConvert::ToHSL(), and BIAS::ImageConvert::ToInterleavedRGB_().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageBase::SetInterleaved ( bool interleaved ) [inline, inherited]

Definition at line 330 of file ImageBase.hh.

void BIAS::ImageBase::SetMetaData ( const MetaData & m ) [inline, inherited]

Definition at line 304 of file ImageBase.hh.

void ImageBase::SetOutsideROIZero ( ) [inherited]

sets all pixel not in ROI to zero

Author:
woelk 10/2004

Definition at line 585 of file ImageBase.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::GetWidthStep().

Referenced by main().

template<class StorageType>
void BIAS::Image< StorageType >::SetPixel | ( | const StorageType & | value0,
 |  | const StorageType & | value1,
 |  | const StorageType & | value2,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y
 | ) | [inline]

set the values of the first three channels of a given pixel (x,y) in channel to value[0.

.2].

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

Definition at line 723 of file Image.hh.

template<class StorageType>
void BIAS::Image< StorageType >::SetPixel | ( | const StorageType & | value,
 |  | const unsigned int & | x,
 |  | const unsigned int & | y,
 |  | const unsigned short int | channel = 0
 | ) | [inline]

set the value of a given pixel (x,y) in channel to value.

Warning:
this function is slower than direct pointer acces if you want to access ALL pixels of an image!
Author:
Jan Woetzel 08/2003

Definition at line 702 of file Image.hh.

Referenced by MainFrame::DrawDistortedLine(), and main().

int ImageBase::SetROI | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

deprecated, use SetROICorners()

Definition at line 866 of file ImageBase.cpp.

References BIAS::ImageBase::SetROICorners().

Referenced by BIAS::ThreeDOut::AddImage(), BIAS::ImageConvert::BayerToRGBSlow_(), main(), mysobel(), mysobel2(), and BIAS::VideoSource::SoftwareWhiteBalance().

int ImageBase::SetROICorners | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) | [inherited]

Definition at line 873 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::SetCorners().

Referenced by main(), and BIAS::ImageBase::SetROI().

void BIAS::ImageBase::SetUID ( const BIAS::UUID & id ) [inline, inherited]

Definition at line 337 of file ImageBase.hh.

Referenced by BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::ProcessOneImage(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::ImageBase::SetZero ( ) [inline, inherited]

zeroes the image

Definition at line 754 of file ImageBase.hh.

Referenced by main().

int ImageBase::StealImage ( ImageBase & source ) [inherited]

steals the image data array from source, after releasing the actual image data and sets source image data to NULL

Warning:
Important for template: Steal images only, if u know the storageTypes are euqal!
Author:
Daniel Grest tested

Definition at line 304 of file ImageBase.cpp.

References BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::ImageConvert::Convert(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), and BIAS::ImageConvert::ToGrey().

void ImageBase::UnsetROI ( ) [inherited]

deprecated, use GetROI()->UnsetROI()

Definition at line 882 of file ImageBase.cpp.

References BIAS::ImageBase::GetROI(), and BIAS::ROI::UnsetROI().

Referenced by BIAS::ImageBase::Cut2ROI(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

int ImageBase::UpdateImageDataArrayFromImageData_ ( ) [protected, inherited]

recomputes pointer array returned by GetImageDataArray

Definition at line 230 of file ImageBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::ImageDataArray_, BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), and BIAS::ImageBase::Init().

int ImageBase::ZeroPad | ( | const unsigned int | newwidth,
 |  | const unsigned int | newheight,
 |  | unsigned char | bgcolor = 0
 | ) | [inherited]

backward compatibility interface for Pad.

DEPRECATED

Author:
Jan Woetzel 2005

Definition at line 947 of file ImageBase.cpp.

References BIAS::ImageBase::Pad().

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img
 | ) | [friend, inherited]

Definition at line 1234 of file ImageBase.cpp.

BIASImageBase_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) | [friend, inherited]

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

MetaData BIAS::ImageBase::_MetaData [protected, inherited]

additional data block, handled by derived classes

Definition at line 679 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

BIAS::UUID BIAS::ImageBase::_UID [protected, inherited]

unique id for every image

Definition at line 677 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), and BIAS::operator>>().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

unsigned int BIAS::ImageBase::BitDepth_ [protected, inherited]

relevant bits per pixel per channel

Definition at line 661 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::ChannelCount_ [protected, inherited]

number of channels per pixel

Definition at line 657 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

enum EColorModel BIAS::ImageBase::ColorModel_ [protected, inherited]

the color model of the pixels

Definition at line 653 of file ImageBase.hh.

Referenced by BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::Depth_ [protected, inherited]

size of one channel of one pixel in bytes

Definition at line 659 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ImageBase::Height_ [protected, inherited]

image height in pixels

Definition at line 665 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), and BIAS::Image< StorageType >::Release().

void* BIAS::ImageBase::ImageData_ [protected, inherited]

a pointer to the image data

Definition at line 675 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::~ImageBase().

void** BIAS::ImageBase::ImageDataArray_ [protected, inherited]

array of pointers to the first byte in an image row

Definition at line 673 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::PrintPointer(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::UpdateImageDataArrayFromImageData_(), and BIAS::ImageBase::~ImageBase().

bool BIAS::ImageBase::InterleavedDataOrder_ [protected, inherited]

planar or interleaved: planar means we have several image planes, e.g.

for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB

Definition at line 669 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Flip(), BIAS::ImageBase::FlipHorizontal(), BIAS::Histogram::Histogram(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

ROI BIAS::ImageBase::Roi_ [protected, inherited]

roi object

Definition at line 681 of file ImageBase.hh.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), and BIAS::ImageBase::Release().

enum EStorageType BIAS::ImageBase::StorageType_ [protected, inherited]

the storage type in a pixel channel

Definition at line 655 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator<<(), and BIAS::ImageBase::Release().

const int BIAS::ImageBase::Version_ = VERSION_NUMBER [static, protected, inherited]

version number of imagebase class

Definition at line 651 of file ImageBase.hh.

unsigned int BIAS::ImageBase::Width_ [protected, inherited]

image width in pixels

Definition at line 663 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

unsigned int BIAS::ImageBase::WidthStep_ [protected, inherited]

size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Definition at line 671 of file ImageBase.hh.

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::FlipHorizontal(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::operator<<(), BIAS::operator>>(), BIAS::ImageBase::PixelValueBase(), BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

The documentation for this class was generated from the following files:
  • Base/Image/Image.hh
  • Base/Image/Image.cpp
  • Base/Image/Operators.cpp
Generated on Wed Jun 21 19:07:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Image3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Image3DData

BIAS::Image3DData Class Reference

stores datas for a textured plane More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::Image3DData:

[legend]
List of all members.

Public Member Functions

Image3DData (const Image3DData &d)
Image3DData ()

Public Attributes

Image< unsigned char > | ImageData
data of texture image
Vector3< double > | LL
lower left corner of image plane in wcs
Vector3< double > | LR
lower right corner of image plane in wcs
std::string | name
Vector3< double > | UL
upper left corner of image plane in wcs
Vector3< double > | UR
upper right corner of image plane in wcs

Detailed Description

stores datas for a textured plane

Definition at line 152 of file ThreeDOut.hh.

Constructor & Destructor Documentation

BIAS::Image3DData::Image3DData ( ) [inline]

Definition at line 160 of file ThreeDOut.hh.

BIAS::Image3DData::Image3DData ( const Image3DData & d ) [inline]

Definition at line 162 of file ThreeDOut.hh.

References ImageData, LL, LR, name, UL, and UR.

Member Data Documentation

Image<unsigned char> BIAS::Image3DData::ImageData

data of texture image

Definition at line 158 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

Vector3<double> BIAS::Image3DData::LL

lower left corner of image plane in wcs

Definition at line 156 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

Vector3<double> BIAS::Image3DData::LR

lower right corner of image plane in wcs

Definition at line 157 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

std::string BIAS::Image3DData::name

Definition at line 159 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

Vector3<double> BIAS::Image3DData::UL

upper left corner of image plane in wcs

Definition at line 154 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

Vector3<double> BIAS::Image3DData::UR

upper right corner of image plane in wcs

Definition at line 155 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and Image3DData().

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:07:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageAttributes Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageAttributes

BIAS::ImageAttributes Class Reference

contains all atribute info and values of e.g. a file. More...

#include <Base/Image/ImageAttributes.hh>

Inheritance diagram for BIAS::ImageAttributes:

[legend]
Collaboration diagram for BIAS::ImageAttributes:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetFieldOfViewDegree (double &x, double &y)
compute field of view in degree
int | GetFocalLengthMeter (double &fm)
compute focallength in meters
int | GetFocalLengthXPixel (double &fp)
compute focallength in pixels
int | GetFocalLengthYPixel (double &fp)
compute focallength in pixels
int | GetHardwareName (std::string &Make, std::string &Model)
look up camera make and model
int | GetImageDimensions (int &width, int &height)
get width and height of image
int | GetPixelSizeXMeter (double &p)
compute pixel size in meter
int | GetPixelSizeYMeter (double &p)
compute pixel size in meter
int | GetPrincipalPoint (double &x, double &y)
look up principal point
ImageAttributes ()
void InitExifTags ()
initialize me vector with all known EXIF tags
std::ostream & | Print (std::ostream &os=std::cout, const bool printAll=false) const
print teh content of this to os
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | Read (const std::string &filename)
main entry routine to read all EXIF tags from the header of image file.
int | ReadMagickPP (Magick::Image &img)
direct interface to Magick::IMage to be able to read the XIF tags of an already opened image.
int | ReadMagickPP (const std::string &filename)
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~ImageAttributes ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

bool | GetRational_ (const std::string &key, double &value)
bool | GetShort_ (const std::string &key, int &value)
bool | GetString_ (const std::string &key, std::string &value)

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Attributes

std::map< std::string, unsigned
int > 		mapValidTags_

Detailed Description

contains all atribute info and values of e.g. a file.

Todo:
Add Image Attributes write functionality to write meta data directly to images EXIF Tags, comments etc.
Author:
Jan Woetzel 10/2004
Examples:

ExampleImageAttributes.cpp.

Definition at line 33 of file ImageAttributes.hh.

Constructor & Destructor Documentation

BIAS::ImageAttributes::~ImageAttributes ( ) [inline]

Definition at line 37 of file ImageAttributes.hh.

BIAS::ImageAttributes::ImageAttributes ( ) [inline]

Definition at line 38 of file ImageAttributes.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

int ImageAttributes::GetFieldOfViewDegree | ( | double & | x,
 |  | double & | y
 | ) |

compute field of view in degree

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 365 of file ImageAttributes.cpp.

References GetFocalLengthXPixel(), GetFocalLengthYPixel(), and GetImageDimensions().

int ImageAttributes::GetFocalLengthMeter ( double & fm )

compute focallength in meters

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 291 of file ImageAttributes.cpp.

References BIASDOUT, D_EXIF, and GetRational_().

Referenced by GetFocalLengthXPixel(), and GetFocalLengthYPixel().

int ImageAttributes::GetFocalLengthXPixel ( double & fp )

compute focallength in pixels

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 300 of file ImageAttributes.cpp.

References BIASDOUT, D_EXIF, GetFocalLengthMeter(), GetPixelSizeXMeter(), and res.

Referenced by GetFieldOfViewDegree(), main(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetFocalLengthYPixel ( double & fp )

compute focallength in pixels

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 311 of file ImageAttributes.cpp.

References BIASDOUT, D_EXIF, GetFocalLengthMeter(), GetPixelSizeYMeter(), and res.

Referenced by GetFieldOfViewDegree(), and main().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ImageAttributes::GetHardwareName | ( | std::string & | Make,
 |  | std::string & | Model
 | ) |

look up camera make and model

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Referenced by BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetImageDimensions | ( | int & | width,
 |  | int & | height
 | ) |

get width and height of image

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 378 of file ImageAttributes.cpp.

References GetShort_().

Referenced by GetFieldOfViewDegree(), GetPrincipalPoint(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPixelSizeXMeter ( double & p )

compute pixel size in meter

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 322 of file ImageAttributes.cpp.

References BIASDOUT, D_EXIF, GetRational_(), GetShort_(), and METER_PER_INCH.

Referenced by GetFocalLengthXPixel(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPixelSizeYMeter ( double & p )

compute pixel size in meter

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 342 of file ImageAttributes.cpp.

References BIASDOUT, D_EXIF, GetRational_(), GetShort_(), and METER_PER_INCH.

Referenced by GetFocalLengthYPixel(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPrincipalPoint | ( | double & | x,
 |  | double & | y
 | ) |

look up principal point

Returns:
0:ok, <0:information missing, >0:missing information guessed
Author:
koeser 07/2005

Definition at line 393 of file ImageAttributes.cpp.

References GetImageDimensions().

Referenced by main(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

bool BIAS::ImageAttributes::GetRational_ | ( | const std::string & | key,
 |  | double & | value
 | ) | [protected]

Referenced by GetFocalLengthMeter(), GetPixelSizeXMeter(), and GetPixelSizeYMeter().

bool BIAS::ImageAttributes::GetShort_ | ( | const std::string & | key,
 |  | int & | value
 | ) | [protected]

Referenced by GetImageDimensions(), GetPixelSizeXMeter(), and GetPixelSizeYMeter().

bool BIAS::ImageAttributes::GetString_ | ( | const std::string & | key,
 |  | std::string & | value
 | ) | [protected]

void ImageAttributes::InitExifTags ( )

initialize me vector with all known EXIF tags

http://www.stefanheymann.de/homegallery/exif-felder.htm

http://www.exif.org/specifications.html

Examples:
ExampleImageAttributes.cpp.

Definition at line 150 of file ImageAttributes.cpp.

References COUT.

Referenced by main(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

std::ostream & ImageAttributes::Print | ( | std::ostream & | os = std::cout,
 |  | const bool | printAll = false
 | ) | const

print teh content of this to os

Parameters:
printAll true prints all tags, false only those whose value is not empty.

Definition at line 234 of file ImageAttributes.cpp.

References it.

Referenced by operator<<().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int ImageAttributes::Read ( const std::string & filename )

main entry routine to read all EXIF tags from the header of image file.

Returns:
BIAS_IMAGEATTRIBUTES_SUCCESS if OK.
Parameters:
filename image to ping and read header from.
Author:
Jan Woetzel
Examples:
ExampleImageAttributes.cpp.

Definition at line 172 of file ImageAttributes.cpp.

References ReadMagickPP().

Referenced by main(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::ReadMagickPP ( Magick::Image & img )

direct interface to Magick::IMage to be able to read the XIF tags of an already opened image.

Returns:
BIAS_IMAGEATTRIBUTES_SUCCESS;BIAS_EXIFTAGTABLE_SUCCESS
Parameters:
filename image to ping and read header from.
Author:
Jan Woetzel

Definition at line 204 of file ImageAttributes.cpp.

References it, and mapValidTags_.

int ImageAttributes::ReadMagickPP ( const std::string & filename )

Returns:
BIAS_IMAGEATTRIBUTES_SUCCESS if reading was OK, negative number in case of error.
Parameters:
filename image file to read attributes form header.
Author:
Jan Woetzel

Definition at line 178 of file ImageAttributes.cpp.

References BIAS_HAVE_IMAGEMAGICKLIB, BIASERR, BIAS::Image, and img.

Referenced by Read().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::map<std::string, unsigned int> BIAS::ImageAttributes::mapValidTags_ [private]

Definition at line 120 of file ImageAttributes.hh.

Referenced by ReadMagickPP().

The documentation for this class was generated from the following files:
  • Base/Image/ImageAttributes.hh
  • Base/Image/ImageAttributes.cpp
Generated on Wed Jun 21 19:07:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageBase

BIAS::ImageBase Class Reference
[Image and Image Base]

This is the base class for images in BIAS. More...

#include <Base/Image/ImageBase.hh>

Inheritance diagram for BIAS::ImageBase:

[legend]
Collaboration diagram for BIAS::ImageBase:

[legend]
List of all members.

Misc functions

void ClearDataPointer ()
set data pointer to NULL, such that image IsEmpty _without_ deletion of data.
int | Display ()
display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.
int | Display (const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale)
interface for the above
int | Display (const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
bool | IsPositionInImage (const int &x, const int &y) const
check if image contains that pixel position
bool | IsPowerOfTwoSize () const
int | MoveToClosestPositionInImage (int &x, int &y) const
find closest valid pixel position to x,y
void * | PixelValueBase (unsigned x, unsigned y, unsigned channel=0)
bool | PowerOfTwoSize (unsigned int &width2, unsigned int &height2) const
void | PrintHeader (std::ostream &os=std::cout) const
void | RedirectImageDataPointer (void *data)
This method takes data and set the internal image data pointer to this.
void ReleaseImageDataPointer ()
Releases ImageData_ (to be used together with RedirectImageDataPointer).
bool | SamePixelAndChannelCount (const ImageBase &Image) const
checks if data area has same "size" as Image of other type
void SetZero ()
zeroes the image
static int | GetChannelcount (const enum BIAS::ImageBase::EColorModel &colormodel)
get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.
static int | GetSize (const enum BIAS::ImageBase::EStorageType &storagetype)
get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.
static bool | IsPowerOfTwoSize (const unsigned int w, const unsigned int h)
static unsigned int | PowerOfTwoSize (const unsigned int &val)

Get functions

bool | DimensionMatch (const BIAS::ImageBase &other) const
unsigned int | GetBitDepth () const
returns the bits per channel, which is not necessairily 8*sizeof(StorageType).
int | GetChannel (ImageBase &source, unsigned int channel)
copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB
unsigned int | GetChannelCount () const
returns the number of Color channels, e.g.
enum EColorModel | GetColorModel () const
unsigned int | GetDepth () const
returns the bytes per channel, which is the sizeof(StorageType)
unsigned int | GetHeight () const
void * GetImageData ()
void * | GetImageData () const
void ** | GetImageDataArray () const
Get an array of pointers to image data.
MetaData * GetMetaData ()
unsigned long int | GetPixelCount () const
returns number of pixels in image
unsigned int | GetPixelPosition (unsigned int x, unsigned int y, unsigned short int channel=0) const
returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).
unsigned int | GetSize () const
returns the image size in bytes = count - NOT the dimension
enum EStorageType | GetStorageType () const
const BIAS::UUID & | GetUID () const
returns the UUID of the image
int | GetVersionNumber () const
unsigned int | GetWidth () const
unsigned int | GetWidthStep () const
returns the number of bytes per line
bool | IsInterleaved () const
bool | IsPlanar () const
void | SetMetaData (const MetaData &m)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ImageBase &img)
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, ImageBase &img)

Operators

ImageBase & | operator= (const ImageBase &Source)
assignment operator, allocates memory structure via Init only if necessary
bool | operator== (const ImageBase &img)
comparison operator, based upon the adresses of the actual image data

Public Types

enum EColorModel {
CM_invalid = -1, CM_Grey, CM_RGB, CM_BGR,
CM_YUYV422, CM_UYVY422, CM_YUV420P, CM_YUV444,
CM_YUV411, CM_HSV, CM_HSI_OBS, CM_DV,
CM_RGBA, CM_GreyA, CM_Bayer_RGGB, CM_Bayer_GBRG,
CM_Bayer_GRBG, CM_Bayer_BGGR, CM_HSL, CM_hsL,
CM_SymTensor2x2, CM_BGRA, CM_RGBE
}
These are the most often used color models. More...
enum EStorageType {
ST_invalid = -1, ST_unsignedchar, ST_char, ST_unsignedshortint,
ST_shortint, ST_unsignedint, ST_int, ST_float,
ST_double
}

Public Member Functions

void | AddDebugLevel (long int lv)
void | CopyIn_NoInit (void *data)
Take some data and fill it into the Image.
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
ImageBase (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Constructor, initializing image size and channels.
ImageBase (const ImageBase &im)
ImageBase ()
void | Init (unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
Initialize image size and channels.
bool | IsEmpty () const
check if ImageData_ points to allocated image buffer or not
void | PrintDebugLevel (std::ostream &os=std::cout) const
void Release ()
Free the allocated data structures.
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | StealImage (ImageBase &source)
steals the image data array from source, after releasing the actual image data and sets source image data to NULL
virtual | ~ImageBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | UpdateImageDataArrayFromImageData_ ()
recomputes pointer array returned by GetImageDataArray

Protected Attributes

long int | _liDebugLevel
MetaData _MetaData
additional data block, handled by derived classes
BIAS::UUID _UID
unique id for every image
unsigned int | BitDepth_
relevant bits per pixel per channel
unsigned int | ChannelCount_
number of channels per pixel
enum EColorModel | ColorModel_
the color model of the pixels
unsigned int | Depth_
size of one channel of one pixel in bytes
unsigned int | Height_
image height in pixels
void * ImageData_
a pointer to the image data
void ** ImageDataArray_
array of pointers to the first byte in an image row
bool | InterleavedDataOrder_
planar or interleaved: planar means we have several image planes, e.g.
ROI Roi_
roi object
enum EStorageType | StorageType_
the storage type in a pixel channel
unsigned int | Width_
image width in pixels
unsigned int | WidthStep_
size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = VERSION_NUMBER
version number of imagebase class

Friends

class | ImageConvert
class | ImageIO
class | WrapBias2Ipl

Detailed Description

This is the base class for images in BIAS.

It is a non template class, so you can write image type independet functions. Use this class if you deal with different storage types or you don't know the storage type, eg. when loading an image from disk.

Examples:

ExampleImageLoad.cpp, and viff2mip.cpp.

Definition at line 91 of file ImageBase.hh.

Member Enumeration Documentation

enum BIAS::ImageBase::EColorModel

These are the most often used color models.

Enumerator:
CM_invalid | invalid (not set) image format
CM_Grey | gray values (one channel: gray value)
CM_RGB | color values (three channel order: red,green,blue)
CM_BGR | color values (three channel order: blue,green,red)
CM_YUYV422 | YUYV422 (please insert a description).
CM_UYVY422 | (please insert a description)
CM_YUV420P | (please insert a description)
CM_YUV444 | (please insert a description)
CM_YUV411 | (please insert a description)
CM_HSV | HSV (three channel order: hue, sat , value).
CM_HSI_OBS | obsolete, HSI is unused and identical to HSL
CM_DV | DV (please insert a description).
CM_RGBA | RGBA (four channel order: red,green,blue,alpha).
CM_GreyA | Grey (or Gray) plus Alpha channel.
CM_Bayer_RGGB | One channel RGB image Bayer tile.
CM_Bayer_GBRG | One channel RGB image Bayer tile.
CM_Bayer_GRBG | One channel RGB image Bayer tile.
CM_Bayer_BGGR | One channel RGB image Bayer tile.
CM_HSL | similar to HSV but space is a double tipped cone
CM_hsL | similar to HSL but euclidean (h,s) for CNCC
CM_SymTensor2x2 | The image contains a 2x2 symmetric tensor.
CM_BGRA | BGRA (four channel order: blue,green,red,alpha).
CM_RGBE | RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent).

Definition at line 113 of file ImageBase.hh.

enum BIAS::ImageBase::EStorageType

Enumerator:
ST_invalid | invalid not set image storage type
ST_unsignedchar | (8bit) unsigned char image storage type
ST_char | (8bit) signed char image storage type
ST_unsignedshortint | (16bit) unsigned integer image storage type
ST_shortint | (16bit) signed integer image storage type
ST_unsignedint | (32bit) unsigned integer image storage type
ST_int | (32bit) signed integer image storage type
ST_float | float image storage type
ST_double | double image storage type

Definition at line 98 of file ImageBase.hh.

Constructor & Destructor Documentation

ImageBase::ImageBase ( )

Definition at line 57 of file ImageBase.cpp.

References _MetaData, _UID, BIASGDOUT, BitDepth_, ChannelCount_, CM_invalid, ColorModel_, D_IMAGE_TRACE, Depth_, Height_, ImageData_, ImageDataArray_, InterleavedDataOrder_, ST_invalid, StorageType_, Width_, and WidthStep_.

Referenced by BIAS::Image< float >::Image(), Pad(), and PadToPowerOfTwo().

ImageBase::~ImageBase ( ) [virtual]

Definition at line 43 of file ImageBase.cpp.

References ImageData_, and ImageDataArray_.

ImageBase::ImageBase ( const ImageBase & im )

Definition at line 79 of file ImageBase.cpp.

References BIASGDOUT, ChannelCount_, D_IMAGE_TRACE, Height_, ImageData_, ImageDataArray_, and Width_.

ImageBase::ImageBase | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) |

Constructor, initializing image size and channels.

Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes
Note:
Example: Defining an RGB image.
    ImageBase im;
    im.init(width, height, 3);

Definition at line 94 of file ImageBase.cpp.

References BIASGDOUT, CM_invalid, ColorModel_, D_IMAGE_TRACE, ImageData_, ImageDataArray_, Init(), InterleavedDataOrder_, BIAS::ROI::Resize(), Roi_, and BIAS::ROI::UnsetROI().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::ImageBase::ClearDataPointer ( ) [inline]

set data pointer to NULL, such that image IsEmpty _without_ deletion of data.

Author:
evers

Definition at line 560 of file ImageBase.hh.

Referenced by main().

void ImageBase::CopyIn_NoInit ( void * data )

Take some data and fill it into the Image.

Warning:
Image must be initialized already !
Author:
Evers

Definition at line 693 of file ImageBase.cpp.

References BIASDOUT, D_COPYIN, GetChannelCount(), GetDepth(), GetImageData(), and GetPixelCount().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_uEye::GrabSingle(), BIAS::VideoSource_Net::GrabSingle(), BIAS::VideoSource_DSHOW::GrabSingle(), and BIAS::VideoSource_DCAM::GrabSingle().

int ImageBase::Cut2ROI ( )

reduces image to current ROI, !!! image size changes !!!

Author:
Felix Woelk untested
Todo:
Make it work on colored Images

Definition at line 556 of file ImageBase.cpp.

References ChannelCount_, Depth_, GetChannelCount(), BIAS::ROI::GetCorners(), GetDepth(), GetHeight(), GetImageDataArray(), GetROI(), GetWidth(), Height_, RedirectImageDataPointer(), ReleaseImageDataPointer(), BIAS::ROI::Resize(), UnsetROI(), Width_, and WidthStep_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool ImageBase::DimensionMatch ( const BIAS::ImageBase & other ) const

Returns:
true if the image dimension w x h of this and other match = are equal
Author:
JW

Definition at line 845 of file ImageBase.cpp.

References GetHeight(), and GetWidth().

int ImageBase::Display ( )

display image simple signature interface for Debugger usage This function can be used to display an (intermediate) image "interactively" with the MS Visual Studio Debugger in "Watch+Debug" expert mode.

This signature is required because MSVS debugger does not support default params.

Author:
Jan Woetzel

Definition at line 1221 of file ImageBase.cpp.

References DEFAULT_32to8_scale, and DEFAULT_Display_delay.

Referenced by Display().

int ImageBase::Display | ( | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec = DEFAULT_Display_delay,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) |

interface for the above

Author:
Jan Woetzel 2005

Definition at line 1211 of file ImageBase.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and Display().

int ImageBase::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) |

display image as popup to screnn sing OpenCv IplImage usign Highgui functions.

Very useful to easily display in aimge, e.g. for debugging.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 1193 of file ImageBase.cpp.

References BIAS::WrapBias2Ipl::Display().

Referenced by main().

int ImageBase::Flip ( )

flips the image vertically (row order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
Daniel Grest
Date:
Jun 2002 Interleaved tested, planar untested Aug 2002: Jan-Friso Evers: fixed interleaved for float and other

Definition at line 700 of file ImageBase.cpp.

References BIASERR, GetChannelCount(), GetDepth(), GetPixelCount(), GetWidth(), Height_, ImageDataArray_, InterleavedDataOrder_, RedirectImageDataPointer(), and ReleaseImageDataPointer().

Referenced by BIAS::ThreeDOut::AddTriangleMesh(), MyFrame::OnTimer(), PadToPowerOfTwoAndFlip(), and BIAS::OpenGLCanvasBase::ScreenShot().

int ImageBase::FlipHorizontal ( )

flips the image horizontal (column order is inverted) In place function return 0 in case of success, -1 otherwise

Author:
woelk 10/2004

Definition at line 744 of file ImageBase.cpp.

References BIASERR, GetChannelCount(), GetDepth(), GetPixelCount(), Height_, ImageDataArray_, InterleavedDataOrder_, RedirectImageDataPointer(), ReleaseImageDataPointer(), Width_, and WidthStep_.

unsigned int BIAS::ImageBase::GetBitDepth ( ) const [inline]

returns the bits per channel, which is not necessairily 8*sizeof(StorageType).

Author:
woelk 12/2004

Definition at line 235 of file ImageBase.hh.

Referenced by BIAS::ImgObjGL::GetGLInternalFormat(), MainFrame::OnInfo(), and Pad().

int ImageBase::GetChannel | ( | ImageBase & | source,
 |  | unsigned int | channel
 | ) |

copies one specific channel from source to Image can only be called from an planar image, so call ToPlanar() befor so far only implemented for CM_YUYV422, BGR and RGB

Author:
Felix Woelk untested (17/04/2002)

Definition at line 337 of file ImageBase.cpp.

References BIAS_DEBUG, BIASERR, CM_YUYV422, GetChannelCount(), GetColorModel(), GetDepth(), GetHeight(), GetImageData(), GetPixelCount(), GetStorageType(), GetWidth(), Init(), IsEmpty(), and IsPlanar().

int ImageBase::GetChannelcount ( const enum BIAS::ImageBase::EColorModel & colormodel ) [static]

get the number of channels corresponding to the enum ColorModel Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1153 of file ImageBase.cpp.

References BIASERR, BIASWARN, CM_Bayer_BGGR, CM_Bayer_GBRG, CM_Bayer_GRBG, CM_Bayer_RGGB, CM_BGR, CM_BGRA, CM_Grey, CM_GreyA, CM_hsL, CM_HSL, CM_HSV, CM_RGB, and CM_RGBA.

unsigned int BIAS::ImageBase::GetChannelCount ( ) const [inline]

returns the number of Color channels, e.g.

RGB 3

the value returned is independent of the StorageType

Definition at line 252 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::CalcScaleShift(), castchar(), castfloat(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), CopyIn_NoInit(), BIAS::SphericalUndistortion::CorrectVignette(), Cut2ROI(), BIAS::Histogram::DeleteHist_(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::ImageIO::ExportMagickPP(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterIgnoreZero5x5(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero3x3(), BIAS::Median< InputStorageType, OutputStorageType >::FilterOnlyZeroIgnoreZero5x5(), Flip(), FlipHorizontal(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), GetChannel(), GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageDraw< StorageType >::InterpolatedLine(), BIAS::ImageDraw< StorageType >::Line(), LoadImage(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), Pad(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::Image< StorageType >::ScaleShift(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::MatlabTBUndistortion::UndistortFast(), UpdateImageDataArrayFromImageData_(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), and BIAS::PMDImageProc::Write().

enum EColorModel BIAS::ImageBase::GetColorModel ( ) const [inline]

Definition at line 270 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), ComputeCutoutImage(), BIAS::ImageConvert::Convert(), BIAS::ColorHarris::CreateSTColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), Draw(), BIAS::ImageIO::ExportMagickPP(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ColorHistogram< unsigned char >::GenerateHist(), BIAS::ColorHistogram< StorageType >::GenerateHist(), BIAS::IntegralHistogram::GenerateIntegralHistDiffBin(), GetChannel(), GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_ToGrey(), main(), MainFrame::OnInfo(), operator=(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::VideoServer::ProcessOneImage(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToInterleaved(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageBase::GetCopyOfROI ( ImageBase & copy ) const

returns a copy of ROI (a new image) lower right point excluded, only interleaved images !

Author:
Felix Woelk, grest untested

Definition at line 484 of file ImageBase.cpp.

References BIASABORT, BIASERR, GetChannelCount(), GetColorModel(), BIAS::ROI::GetCorners(), GetDepth(), GetImageDataArray(), GetROI(), GetStorageType(), Init(), IsEmpty(), IsPlanar(), Release(), and SetColorModel().

int ImageBase::GetCopyOfROI2 ( ImageBase & copy ) const

like GetCopyOfROI, but with lower right point included only interleaved images !

Note:
GetCopyOfROI returns an image where the lower right ROI point is not included. This version does it. Correction are not made in the original method, because extensive corrections would become necessary in other methods.
Author:
Ingo Thomsen

Definition at line 451 of file ImageBase.cpp.

References BIASABORT, and BIASERR.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int BIAS::ImageBase::GetDepth ( ) const [inline]

returns the bytes per channel, which is the sizeof(StorageType)

Definition at line 229 of file ImageBase.hh.

Referenced by CopyIn_NoInit(), Cut2ROI(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), Flip(), FlipHorizontal(), GetChannel(), GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportMagickPP(), MainFrame::OnInfo(), BIAS::VideoSource_Net::OpenDevice(), Pad(), BIAS::OpenGLCanvasBase::ScreenShot(), and SetOutsideROIZero().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::ImageBase::GetHeight ( ) const [inline]

Definition at line 225 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), createst(), cut(), Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), DimensionMatch(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::Histogram::DrawHist_(), BIAS::Histogram::DrawHistLog_(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), MainFrame::FitSizetIfTooSmall(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

void* BIAS::ImageBase::GetImageData ( ) [inline]

Definition at line 205 of file ImageBase.hh.

void* BIAS::ImageBase::GetImageData ( ) const [inline]

Reimplemented in BIAS::Image< StorageType >, BIAS::Image< LABEL_CALC_TYPE >, BIAS::Image< float >, BIAS::Image< CONV_FLOAT >, BIAS::Image< unsigned char >, BIAS::Image< OutputStorageType >, BIAS::Image< CONV_INT >, and BIAS::Image< CalculationType >.

Definition at line 202 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::Consistent(), BIAS::ImageConvert::ConvertST(), CopyIn_NoInit(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageConvert::FloatToUC_(), GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::GuiGTK::MouseMotionCallback_(), operator==(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ROI::SetMaskImage(), and UpdateImageDataArrayFromImageData_().

void** BIAS::ImageBase::GetImageDataArray ( ) const [inline]

Get an array of pointers to image data.

A pixel can be accessed by GetImageDataArray()[row][col] or GetImageDataArray()[y][x]
For multi channel images with interleaved data order, access with GetImageDataArray()[row][col * GetChannelCount() + Channel]
For multi channel images with planar data order, access with GetImageDataArray()[row + GetHeight * Channel][col]

Author:
Felix Woelk
Returns:
array with pointer to the first pixels in every row.

Reimplemented in BIAS::Image< StorageType >, BIAS::Image< LABEL_CALC_TYPE >, BIAS::Image< float >, BIAS::Image< CONV_FLOAT >, BIAS::Image< unsigned char >, BIAS::Image< OutputStorageType >, BIAS::Image< CONV_INT >, and BIAS::Image< CalculationType >.

Definition at line 219 of file ImageBase.hh.

Referenced by Cut2ROI(), BIAS::ImageIO::ExportOpenEXR(), GetCopyOfROI(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportOpenEXR(), Pad(), and SetOutsideROIZero().

MetaData* BIAS::ImageBase::GetMetaData ( ) [inline]

Definition at line 301 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), and BIAS::ImageIO::WriteUnbuffered().

unsigned long int BIAS::ImageBase::GetPixelCount ( ) const [inline]

returns number of pixels in image

Definition at line 277 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Histogram::AddHist(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIAS::ImageConvert::BGRAToRGB_(), BIAS::ImageConvert::BGRToRGB_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::Binarize(), CopyIn_NoInit(), BIAS::Histogram::DeleteHist_(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate3Fast(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode3Fast(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), Flip(), FlipHorizontal(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), GetChannel(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::GreyToRGB_(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportOpenEXR(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Image< StorageType >::PrintData(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageConvert::RGBAToRGB_(), BIAS::ImageConvert::RGBToHSV_(), BIAS::Image< StorageType >::ScaleShift(), BIAS::ROI::SetMaskImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanarRGB_(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::MatlabTBUndistortion::UndistortFast(), UpdateImageDataArrayFromImageData_(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey().

unsigned int BIAS::ImageBase::GetPixelPosition | ( | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned short int | channel = 0
 | ) | const [inline]

returns the Position (index from array start) in ImageData Warning: until 2005-01-04 the position inbyte was returned but used as position in <StorageType> (ImageDraw).

Changed this method to return position in StorageType Jan-Friso Evers

Definition at line 770 of file ImageBase.hh.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

void ImageBase::GetROI | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const

deprecated, use GetROICorners()

Definition at line 899 of file ImageBase.cpp.

References GetROICorners().

void ImageBase::GetROI | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const

deprecated, use GetROICorners()

Definition at line 887 of file ImageBase.cpp.

References GetROICorners().

const ROI* BIAS::ImageBase::GetROI ( ) const [inline]

Definition at line 358 of file ImageBase.hh.

ROI* BIAS::ImageBase::GetROI ( ) [inline]

Returns a pointer to the roi object.

Author:
woelk 07/2005

Definition at line 355 of file ImageBase.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), GetROICorners(), GetROILowerRightX(), GetROILowerRightY(), GetROIUpperLeftX(), GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), main(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), Paste2ROI(), PrintROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::Image< StorageType >::Release(), SetOutsideROIZero(), SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), UnsetROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void ImageBase::GetROICorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const

access region of interest rectangle JW

Definition at line 904 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

void ImageBase::GetROICorners | ( | unsigned int & | UpperLeftX,
 |  | unsigned int & | UpperLeftY,
 |  | unsigned int & | LowerRightX,
 |  | unsigned int & | LowerRightY
 | ) | const

access region of interest rectangle JW

Definition at line 892 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), GetROI(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-=(), and BIAS::Image< StorageType >::operator/=().

const unsigned int ImageBase::GetROILowerRightX ( ) const

deprecated, use GetROI()->GetCorners()

Definition at line 931 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROILowerRightY ( ) const

deprecated, use GetROI()->GetCorners()

Definition at line 938 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftX ( ) const

deprecated, use GetROI()->GetCorners()

Definition at line 917 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

Referenced by BIAS::Image< StorageType >::BinaryThreshold(), and BIAS::HaveImagesMatchingROI().

const unsigned int ImageBase::GetROIUpperLeftY ( ) const

deprecated, use GetROI()->GetCorners()

Definition at line 924 of file ImageBase.cpp.

References BIAS::ROI::GetCorners(), and GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

int ImageBase::GetSize ( const enum BIAS::ImageBase::EStorageType & storagetype ) [static]

get the size in Byte of the type corresponding to a storagetype Useful for allocation calculations.

Author:
Jan Woetzel

Definition at line 1120 of file ImageBase.cpp.

References BIASBREAK, BIASERR, ST_char, ST_double, ST_int, ST_unsignedchar, and ST_unsignedint.

unsigned int BIAS::ImageBase::GetSize ( ) const [inline]

returns the image size in bytes = count - NOT the dimension

Definition at line 239 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageConvert::Ipl2BIAS(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), and MainFrame::OnInfo().

enum EStorageType BIAS::ImageBase::GetStorageType ( ) const [inline]

Definition at line 273 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS::ImageConvert::Convert(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), GetChannel(), GetCopyOfROI(), BIAS::ImgObjGL::GetGLInternalFormat(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_Net::GrabSingle(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoSource::InitImage(), main(), BIAS::GuiGTK::MouseMotionCallback_(), MainFrame::OnInfo(), BIAS::Image< StorageType >::operator=(), operator=(), Pad(), BIAS::ImageConvert::RGBTohsL_(), BIAS::ImageConvert::RGBToHSL_(), Scale(), BIAS::ROI::SetMaskImage(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ZoomImageCanvas::UpdateStatusBar(), and BIAS::PMDImageProc::Write().

const BIAS::UUID& BIAS::ImageBase::GetUID ( ) const [inline]

returns the UUID of the image

Examples:
ExampleImageLoad.cpp.

Definition at line 298 of file ImageBase.hh.

Referenced by main(), MainFrame::OnInfo(), BIAS::operator<<(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

int BIAS::ImageBase::GetVersionNumber ( ) const [inline]

Definition at line 307 of file ImageBase.hh.

Referenced by MainFrame::OnInfo(), and BIAS::operator<<().

unsigned int BIAS::ImageBase::GetWidth ( ) const [inline]

Definition at line 222 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::GuiGTK::AllocateBuffer_(), BIAS::Image< StorageType >::AppendChannel(), BIAS::ImageConvert::BayerToGrey_(), BIAS::ImageConvert::BayerToRGB_(), BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::BinaryThreshold(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), MainFrame::CalcImageMean3x3(), BIAS::PMDImageProc::CalcSigmaDepth(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), MainFrame::CalculateSteps(), castchar(), castfloat(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::StereoRedGreen::Combine(), BIAS::JpegHandler::Compress(), BIAS::UnVignette::Compute(), ComputeCutoutImage(), BIAS::WrapBias2Ipl::Consistent(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::ImgObjGL::CreateGLTexture(), BIAS::WrapBias2Ipl::CreateIplImageShared(), createst(), cut(), Cut2ROI(), demo(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), DimensionMatch(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Contour::Draw(), BIAS::Conic2D::Draw(), MainFrame::DrawDistortedLine(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), BIAS::CondensHisto::DrawMean(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesExt(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::CondensHisto::EvaluateFromIntegralHistoImage_(), BIAS::CondensImg::EvaluateObservationDensities(), BIAS::ImageIO::ExportDevIL(), BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExportOpenEXR(), BIAS::Morphology< InputStorageType, OutputStorageType >::FillBorderConst(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::Image< StorageType >::FillImageWithXValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), MainFrame::FitSizetIfTooSmall(), Flip(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Forward_(), BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::TriangleMesh::GenerateDenseMesh(), GetChannel(), BIAS::ColorSegmentation::GetHueImage(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::PyramidImage< StorageType >::GetSingleImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::Contour::Init_(), BIAS::DistTransform< InputStorageType, OutputStorageType >::InitDistanceImage_(), BIAS::ImageConvert::IP_RGBToGrey_(), IsPowerOfTwoSize(), BIAS::Label::Label4Neighbour_(), BIAS::ImageDraw< StorageType >::Line(), main(), mainloop(), BIAS::DistTransform< InputStorageType, OutputStorageType >::MakeDistanceImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_(), mirror(), BIAS::GuiGTK::MouseMotionCallback_(), mytoplanar(), BIAS::CornerMatcher::NCC(), BIAS::CornerMatcher::NCCSearch(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Normalize(), MainFrame::OnInfo(), MainFrame::OnLeftDown(), BIAS::VideoSource_Net::OpenDevice(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator *=(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator+=(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator-=(), BIAS::Image< StorageType >::operator/(), BIAS::Image< StorageType >::operator/=(), BIAS::Image< unsigned char >::operator|(), BIAS::Image< StorageType >::operator|(), Pad(), BIAS::CornerMatcher::ParabolaNCC(), BIAS::CornerMatcher::ParabolaNCC5(), Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), PowerOfTwoSize(), BIAS::UnVignette::PrepareLuImage_(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageDraw< StorageType >::RectangleCenter(), BIAS::ImageDraw< StorageType >::RectangleCenterGrey(), BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill(), BIAS::ImageDraw< StorageType >::RectangleCorners(), BIAS::ImageDraw< StorageType >::RectangleCornersGrey(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Reverse_(), BIAS::ImageConvert::RGBToGrey_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::EpipolarLine::ScanLine_(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), BIAS::ROI::SetMaskImage(), SetOutsideROIZero(), ShiftAndMark(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::CornerMatcher::SSD(), BIAS::GuiGTK::TestImage_(), BIAS::GuiBase::TestImage_(), BIAS::ImageConvert::ToGrey(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::ImageConvert::ToPlanarYUYV422_(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::MatlabTBUndistortion::UndistortFast(), MainFrame::UnVignette(), UpdateImageDataArrayFromImageData_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::ZoomImageCanvas::UpdateStatusBar(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2RGBInterleaved(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::PMDImageProc::Write(), and BIAS::ImageConvert::YUV420PToGrey_().

unsigned int BIAS::ImageBase::GetWidthStep ( ) const [inline]

returns the number of bytes per line

returns the number of bytes per line, not the number of StorageTypes

interleaved data order: = Width * Depth * ChannelCount planar data order: = Width * Depth

Useful for memory aligned images (e.g. 4/8 Byte) and packing of textures. JW

Definition at line 267 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BayerToRGBSlow_(), BIAS::Histogram2D::Draw(), BIAS::Histogram::Draw(), BIAS::Histogram2D::DrawLog(), BIAS::Histogram::DrawLog(), and SetOutsideROIZero().

void ImageBase::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels = 1,
 |  | enum EStorageType | storageType = ST_unsignedchar,
 |  | const bool | interleaved = true
 | ) |

Initialize image size and channels.

Warning:
call this only for empty images, calls new for the image data array. Overwrites the color model with some kind of best guess
Author:
Felix Woelk tested
Parameters:
width | image width of the new image
height | image height of the new image
channels | number of color planes

Definition at line 117 of file ImageBase.cpp.

References BIASERR, BitDepth_, ChannelCount_, CM_Grey, CM_invalid, CM_RGB, CM_RGBA, CM_YUYV422, Depth_, Height_, ImageData_, ImageDataArray_, InterleavedDataOrder_, BIAS::ROI::Resize(), Roi_, SetColorModel(), ST_char, ST_double, ST_float, ST_int, ST_shortint, ST_unsignedchar, ST_unsignedint, ST_unsignedshortint, StorageType, StorageType_, BIAS::ROI::UnsetROI(), UpdateImageDataArrayFromImageData_(), Width_, and WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), GetChannel(), GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), ImageBase(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::Image< StorageType >::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

void BIAS::ImageBase::InvalidateUID ( ) [inline]

sets the image's uid to invalid

Definition at line 341 of file ImageBase.hh.

References BIAS::UUID::Invalidate().

Referenced by BIAS::VideoSource_V4L::GrabSingle(), MIP::VideoSource_DV2::GrabSingle(), MIP::VideoSource_DV::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::ImageIO::ImportOpenEXR().

bool BIAS::ImageBase::IsEmpty ( ) const [inline]

check if ImageData_ points to allocated image buffer or not

Definition at line 177 of file ImageBase.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::GenSynthMatches::_Draw(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::Image< StorageType >::AbsDiff(), BIAS::Histogram::AddHist(), BIAS::ThreeDOut::AddImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), ComputeCutoutImage(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), BIAS::FFT2D< InputStorageType, OutputStorageType >::CrossPowerSpectrum(), deflate_JPEG_file(), BIAS::CornerDetectorSusan< StorageType >::Detect(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::CondensHisto::DrawHistoSizes(), BIAS::CondensImg::DrawPosteriorDistribution(), BIAS::CondensHisto::DrawPosteriorDistribution(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::ImageConvert::DVToRGB_(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::Filter(), BIAS::FFT2D< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::ImageConvert::FromInterleaved(), GetChannel(), GetCopyOfROI(), BIAS::ColorSegmentation::GetGreyImage(), BIAS::ColorSegmentation::GetHueImage(), BIAS::ROI::GetMaskImage(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ColorSegmentation::GetSatImage(), BIAS::ZoomImageCanvas::GetZoomImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ColorHarris::HarrisValue(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), BIAS::VideoSource::InitImage(), BIAS::ImageConvert::Ipl2BIAS(), main(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), mirror(), operator=(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::PMDImageProc::Read(), BIAS::Image< StorageType >::Reciprocal(), Release(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), MainFrame::SaveUnVignetted(), BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::ColorSegmentationThreaded::Segment(), BIAS::ColorSegmentation::Segment(), StealImage(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformLogAbs(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformPhase(), BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::FFT2D< InputStorageType, OutputStorageType >::TransformReverse(), BIAS::MatlabTBUndistortion::UndistortFast(), UpdateImageDataArrayFromImageData_(), and BIAS::PMDImageProc::Write().

const bool BIAS::ImageBase::IsInROI | ( | double & | x,
 |  | double & | y
 | ) | const [inline]

Definition at line 419 of file ImageBase.hh.

bool BIAS::ImageBase::IsInterleaved ( ) const [inline]

Definition at line 313 of file ImageBase.hh.

Referenced by BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::WrapBias2Ipl::CreateIplImageShared(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), mytoplanar(), MainFrame::OnInfo(), Pad(), PadToPowerOfTwo(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleBy2().

bool BIAS::ImageBase::IsPlanar ( ) const [inline]

Definition at line 310 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::BIAS2ipl(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ImageConvert::Convert(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), GetChannel(), GetCopyOfROI(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageConvert::HSLToGrey_(), BIAS::ImageConvert::IP_RGBToGrey_(), MainFrame::OnInfo(), BIAS::ImageConvert::RGBToGrey_(), BIAS::ImageConvert::ToInterleavedRGB_(), BIAS::ImageConvert::ToPlanar(), and UpdateImageDataArrayFromImageData_().

bool BIAS::ImageBase::IsPositionInImage | ( | const int & | x,
 |  | const int & | y
 | ) | const [inline]

check if image contains that pixel position

Definition at line 781 of file ImageBase.hh.

Referenced by BIAS::EpipolarLine::DrawWhole().

bool ImageBase::IsPowerOfTwoSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [static]

Definition at line 810 of file ImageBase.cpp.

bool ImageBase::IsPowerOfTwoSize ( ) const

Returns:
true if image size is a power of two JW

Definition at line 800 of file ImageBase.cpp.

References GetHeight(), and GetWidth().

Referenced by BIAS::ImgObjGL::CreateGLTexture(), and BIAS::ImageCanvasGLBase::ValidTexobj().

int BIAS::ImageBase::MoveToClosestPositionInImage | ( | int & | x,
 |  | int & | y
 | ) | const [inline]

find closest valid pixel position to x,y

Author:
koeser 01/2005
Returns:
0=was correct 3,4=y out of range, 1,2 x out of range

Definition at line 785 of file ImageBase.hh.

ImageBase & ImageBase::operator= ( const ImageBase & Source )

assignment operator, allocates memory structure via Init only if necessary

Author:
Felix Woelk

Reimplemented in BIAS::Image< StorageType >, BIAS::Image< LABEL_CALC_TYPE >, BIAS::Image< float >, BIAS::Image< CONV_FLOAT >, BIAS::Image< unsigned char >, BIAS::Image< OutputStorageType >, BIAS::Image< CONV_INT >, and BIAS::Image< CalculationType >.

Definition at line 613 of file ImageBase.cpp.

References BIAS::Debug::_liDebugLevel, BIASGDOUT, D_IMAGE_TRACE, GetColorModel(), BIAS::Debug::GetDebugLevel(), GetStorageType(), IsEmpty(), Release(), and SamePixelAndChannelCount().

bool BIAS::ImageBase::operator== ( const ImageBase & img ) [inline]

comparison operator, based upon the adresses of the actual image data

Author:
Ingo Thomsen tested

Definition at line 449 of file ImageBase.hh.

References GetImageData().

int ImageBase::Pad | ( | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) |

Definition at line 1007 of file ImageBase.cpp.

References GetHeight(), GetWidth(), img, and Pad().

int ImageBase::Pad | ( | BIAS::ImageBase & | dest,
 |  | const unsigned int & | newwidth,
 |  | const unsigned int & | newheight,
 |  | const int & | padVal = 0
 | ) | const

Definition at line 1032 of file ImageBase.cpp.

References BIASASSERT, BIASERR, GetBitDepth(), GetChannelCount(), GetDepth(), GetHeight(), GetImageDataArray(), GetStorageType(), GetWidth(), ImageBase(), IsInterleaved(), and SetBitDepth().

Referenced by Pad(), PadToPowerOfTwo(), and ZeroPad().

int ImageBase::PadToPowerOfTwo ( const int & padVal = 0 )

in place version of the above

Author:
JW

Definition at line 956 of file ImageBase.cpp.

References img, PadToPowerOfTwo(), and PowerOfTwoSize().

int ImageBase::PadToPowerOfTwo | ( | BIAS::ImageBase & | dest,
 |  | const int & | padVal = 0
 | ) | const

increase the size of this image to next power of two (e.g.

384x100>512x128) the original image S is set to upper left rectangle

Parameters:
padVal used by memset to pad the right and lower added pixels No scale, just padding!
    orig xx
    xxxxxxx
Author:
Jan Woetzel 09/2003 - 11/2005

Definition at line 979 of file ImageBase.cpp.

References BIASASSERT, BIASERR, ImageBase(), IsInterleaved(), Pad(), and PowerOfTwoSize().

Referenced by PadToPowerOfTwo(), and PadToPowerOfTwoAndFlip().

int ImageBase::PadToPowerOfTwoAndFlip ( const int & padVal = 0 )

first pad, then flip.

useful for OpenGL texture image which must be pow2 size and Y-flipped ics. example:

    0 1 2
    3 4 5
    -->
    x x x x
    x x x x
    3 4 5 x
    0 1 2 x
Todo:
more efficient in place with memmove
Author:
Jan Woetzel

Definition at line 1105 of file ImageBase.cpp.

References BIASERR, Flip(), and PadToPowerOfTwo().

int ImageBase::Paste2ROI ( const ImageBase & Image )

paste Image to current ROI

Author:
Felix Woelk 02 2003

Definition at line 519 of file ImageBase.cpp.

References BIASABORT, BIASERR, BIAS::ROI::GetCorners(), GetHeight(), GetROI(), and GetWidth().

Referenced by main(), and BIAS::ImageConvertThreaded::MergeImage_().

void * ImageBase::PixelValueBase | ( | unsigned | x,
 |  | unsigned | y,
 |  | unsigned | channel = 0
 | ) |

Definition at line 852 of file ImageBase.cpp.

References BIASERR, ChannelCount_, Depth_, Height_, ImageData_, InterleavedDataOrder_, Width_, and WidthStep_.

bool ImageBase::PowerOfTwoSize | ( | unsigned int & | width2,
 |  | unsigned int & | height2
 | ) | const

Returns:
true if both, width and height are already a power of two. The next power of two size >= actual size is computed and stored in args. useful for OpenGL texture enlargement for 'power of two' textures.
Author:
Jan Woetzel 09/2003

Definition at line 821 of file ImageBase.cpp.

References GetHeight(), GetWidth(), and PowerOfTwoSize().

unsigned int ImageBase::PowerOfTwoSize ( const unsigned int & val ) [static]

Returns:
next pow2 >= val JW

Definition at line 831 of file ImageBase.cpp.

References res.

Referenced by BIAS::ImgObjGL::CreateGLTexture(), BIAS::GeometryGL::GetImgCorner2d(), PadToPowerOfTwo(), and PowerOfTwoSize().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::ImageBase::PrintHeader ( std::ostream & os = std::cout ) const

Referenced by BIAS::ImageIO::ImportMagickPP(), main(), and mainloop().

void ImageBase::PrintROI ( std::ostream & os = std::cout ) const

deprecated, use 'os << *GetROI()'

Definition at line 912 of file ImageBase.cpp.

References GetROI().

Referenced by BIAS::HaveImagesMatchingROI().

void BIAS::ImageBase::RedirectImageDataPointer ( void * data ) [inline]

This method takes data and set the internal image data pointer to this.

You should really know what you are doing using this method. Don't say you haven't been warned.

Author:
Friso Evers

Definition at line 549 of file ImageBase.hh.

Referenced by Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), Flip(), FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void ImageBase::Release ( )

Free the allocated data structures.

Reimplemented in BIAS::Image< StorageType >, BIAS::Image< LABEL_CALC_TYPE >, BIAS::Image< float >, BIAS::Image< CONV_FLOAT >, BIAS::Image< unsigned char >, BIAS::Image< OutputStorageType >, BIAS::Image< CONV_INT >, and BIAS::Image< CalculationType >.

Definition at line 278 of file ImageBase.cpp.

References _MetaData, BIASERR, BitDepth_, ChannelCount_, CM_invalid, ColorModel_, Depth_, Height_, ImageData_, ImageDataArray_, IsEmpty(), BIAS::ROI::Release(), Roi_, ST_invalid, StorageType_, Width_, and WidthStep_.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), GetCopyOfROI(), BIAS::ROI::GetMaskImage(), BIAS::GuiEnhanced::GetZoomImage(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), BIAS::ImageIO::ImportReal32(), operator=(), BIAS::operator>>(), and BIAS::OpenGLCanvasBase::ScreenShot().

void BIAS::ImageBase::ReleaseImageDataPointer ( ) [inline]

Releases ImageData_ (to be used together with RedirectImageDataPointer).

Author:
Felix woelk

Definition at line 761 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), Cut2ROI(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), Flip(), FlipHorizontal(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool BIAS::ImageBase::SamePixelAndChannelCount ( const ImageBase & Image ) const [inline]

checks if data area has same "size" as Image of other type

Definition at line 749 of file ImageBase.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::Image< StorageType >::AbsDiff(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Cornerness(), createst(), BIAS::Dilation< InputStorageType, OutputStorageType >::Dilate(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::VideoSource_Net::GrabSingle(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::Label4Neighbour(), main(), mytoplanar(), operator=(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Label::Process(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvert::TohsL(), BIAS::ImageConvert::ToHSV(), BIAS::ImageConvert::ToInterleavedRGB(), and BIAS::ImageConvert::ToPlanar().

void BIAS::ImageBase::SetBitDepth ( unsigned bitdepth ) [inline]

needed by ImageIO

Definition at line 334 of file ImageBase.hh.

References BIASASSERT.

Referenced by BIAS::ImageIO::ImportOpenEXR(), and Pad().

void BIAS::ImageBase::SetColorModel ( EColorModel Model ) [inline]

Definition at line 327 of file ImageBase.hh.

Referenced by BIAS::ImageConvert::ConvertST(), BIAS::WrapBias2Ipl::CreateBiasImageShared(), createst(), createst2(), BIAS::CondensImg::DrawSamples(), BIAS::CondensHisto::DrawSamplesWhite(), BIAS::CondensHisto::DrawWeightedSamples(), BIAS::Erosion< InputStorageType, OutputStorageType >::Erode(), GetCopyOfROI(), BIAS::ImageIO::ImportDevIL(), BIAS::ImageIO::ImportImageViff_(), BIAS::ImageIO::ImportMagickPPAutoconvert(), BIAS::ImageIO::ImportOpenEXR(), Init(), main(), mytoplanar(), BIAS::PMDImageProc::Read(), BIAS::ImageConvert::ToHSL(), and BIAS::ImageConvert::ToInterleavedRGB_().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageBase::SetInterleaved ( bool interleaved ) [inline]

Definition at line 330 of file ImageBase.hh.

void BIAS::ImageBase::SetMetaData ( const MetaData & m ) [inline]

Definition at line 304 of file ImageBase.hh.

void ImageBase::SetOutsideROIZero ( )

sets all pixel not in ROI to zero

Author:
woelk 10/2004

Definition at line 585 of file ImageBase.cpp.

References GetChannelCount(), BIAS::ROI::GetCorners(), GetDepth(), GetHeight(), GetImageDataArray(), GetROI(), GetWidth(), and GetWidthStep().

Referenced by main().

int ImageBase::SetROI | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) |

deprecated, use SetROICorners()

Definition at line 866 of file ImageBase.cpp.

References SetROICorners().

Referenced by BIAS::ThreeDOut::AddImage(), BIAS::ImageConvert::BayerToRGBSlow_(), main(), mysobel(), mysobel2(), and BIAS::VideoSource::SoftwareWhiteBalance().

int ImageBase::SetROICorners | ( | unsigned int | UpperLeftX,
 |  | unsigned int | UpperLeftY,
 |  | unsigned int | LowerRightX,
 |  | unsigned int | LowerRightY
 | ) |

Definition at line 873 of file ImageBase.cpp.

References GetROI(), and BIAS::ROI::SetCorners().

Referenced by main(), and SetROI().

void BIAS::ImageBase::SetUID ( const BIAS::UUID & id ) [inline]

Definition at line 337 of file ImageBase.hh.

Referenced by BIAS::VideoSource_DCAM::GrabSingle(), BIAS::ImageIO::ImportOpenEXR(), BIAS::VideoServer::ProcessOneImage(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::ImageIO::WriteUnbuffered().

void BIAS::ImageBase::SetZero ( ) [inline]

zeroes the image

Definition at line 754 of file ImageBase.hh.

Referenced by main().

int ImageBase::StealImage ( ImageBase & source )

steals the image data array from source, after releasing the actual image data and sets source image data to NULL

Warning:
Important for template: Steal images only, if u know the storageTypes are euqal!
Author:
Daniel Grest tested

Definition at line 304 of file ImageBase.cpp.

References BIASERR, and IsEmpty().

Referenced by BIAS::ImageConvert::Convert(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), ShiftAndMark(), BIAS::GuiBase::ShowImage(), and BIAS::ImageConvert::ToGrey().

void ImageBase::UnsetROI ( )

deprecated, use GetROI()->UnsetROI()

Definition at line 882 of file ImageBase.cpp.

References GetROI(), and BIAS::ROI::UnsetROI().

Referenced by Cut2ROI(), and BIAS::Gauss< InputStorageType, OutputStorageType >::FilterGrey().

int ImageBase::UpdateImageDataArrayFromImageData_ ( ) [protected]

recomputes pointer array returned by GetImageDataArray

Definition at line 230 of file ImageBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, ChannelCount_, Depth_, GetChannelCount(), GetHeight(), GetImageData(), GetPixelCount(), GetWidth(), ImageDataArray_, InterleavedDataOrder_, IsEmpty(), IsPlanar(), Width_, and WidthStep_.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), and Init().

int ImageBase::ZeroPad | ( | const unsigned int | newwidth,
 |  | const unsigned int | newheight,
 |  | unsigned char | bgcolor = 0
 | ) |

backward compatibility interface for Pad.

DEPRECATED

Author:
Jan Woetzel 2005

Definition at line 947 of file ImageBase.cpp.

References Pad().

Referenced by BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >::TransformAbs().

Friends And Related Function Documentation

friend class ImageConvert [friend]

Definition at line 93 of file ImageBase.hh.

friend class ImageIO [friend]

Definition at line 94 of file ImageBase.hh.

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img
 | ) | [friend]

Definition at line 1234 of file ImageBase.cpp.

BIASImageBase_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) | [friend]

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

friend class WrapBias2Ipl [friend]

Definition at line 95 of file ImageBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), operator=(), and BIAS::Debug::operator=().

MetaData BIAS::ImageBase::_MetaData [protected]

additional data block, handled by derived classes

Definition at line 679 of file ImageBase.hh.

Referenced by ImageBase(), Release(), and BIAS::Image< StorageType >::Release().

BIAS::UUID BIAS::ImageBase::_UID [protected]

unique id for every image

Definition at line 677 of file ImageBase.hh.

Referenced by ImageBase(), and BIAS::operator>>().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

unsigned int BIAS::ImageBase::BitDepth_ [protected]

relevant bits per pixel per channel

Definition at line 661 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), ImageBase(), Init(), BIAS::operator<<(), BIAS::operator>>(), Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::ChannelCount_ [protected]

number of channels per pixel

Definition at line 657 of file ImageBase.hh.

Referenced by BIAS::Image< StorageType >::BicubicInterpolation(), Cut2ROI(), ImageBase(), Init(), BIAS::operator<<(), BIAS::operator>>(), PixelValueBase(), Release(), BIAS::Image< StorageType >::Release(), and UpdateImageDataArrayFromImageData_().

enum EColorModel BIAS::ImageBase::ColorModel_ [protected]

the color model of the pixels

Definition at line 653 of file ImageBase.hh.

Referenced by BIAS::Histogram::Histogram(), ImageBase(), BIAS::operator<<(), BIAS::operator>>(), Release(), and BIAS::Image< StorageType >::Release().

unsigned int BIAS::ImageBase::Depth_ [protected]

size of one channel of one pixel in bytes

Definition at line 659 of file ImageBase.hh.

Referenced by Cut2ROI(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), ImageBase(), Init(), BIAS::operator<<(), BIAS::operator>>(), PixelValueBase(), Release(), BIAS::Image< StorageType >::Release(), and UpdateImageDataArrayFromImageData_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ImageBase::Height_ [protected]

image height in pixels

Definition at line 665 of file ImageBase.hh.

Referenced by Cut2ROI(), Flip(), FlipHorizontal(), ImageBase(), Init(), BIAS::operator<<(), PixelValueBase(), Release(), and BIAS::Image< StorageType >::Release().

void* BIAS::ImageBase::ImageData_ [protected]

a pointer to the image data

Definition at line 675 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), ImageBase(), Init(), BIAS::operator>>(), PixelValueBase(), BIAS::Image< StorageType >::PrintData(), BIAS::Image< StorageType >::PrintPointer(), Release(), BIAS::Image< StorageType >::Release(), and ~ImageBase().

void** BIAS::ImageBase::ImageDataArray_ [protected]

array of pointers to the first byte in an image row

Definition at line 673 of file ImageBase.hh.

Referenced by Flip(), FlipHorizontal(), ImageBase(), Init(), BIAS::Image< StorageType >::PrintPointer(), Release(), BIAS::Image< StorageType >::Release(), UpdateImageDataArrayFromImageData_(), and ~ImageBase().

bool BIAS::ImageBase::InterleavedDataOrder_ [protected]

planar or interleaved: planar means we have several image planes, e.g.

for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB

Definition at line 669 of file ImageBase.hh.

Referenced by Flip(), FlipHorizontal(), BIAS::Histogram::Histogram(), ImageBase(), Init(), BIAS::operator<<(), BIAS::operator>>(), PixelValueBase(), and UpdateImageDataArrayFromImageData_().

ROI BIAS::ImageBase::Roi_ [protected]

roi object

Definition at line 681 of file ImageBase.hh.

Referenced by ImageBase(), Init(), and Release().

enum EStorageType BIAS::ImageBase::StorageType_ [protected]

the storage type in a pixel channel

Definition at line 655 of file ImageBase.hh.

Referenced by BIAS::WrapBias2Ipl::CreateBiasImageShared(), BIAS::Image< StorageType >::Image(), BIAS::Image< float >::Image(), BIAS::Image< unsigned char >::Image(), ImageBase(), Init(), BIAS::Image< StorageType >::Init(), BIAS::Image< StorageType >::InitWithForeignData(), BIAS::operator<<(), and Release().

const int BIAS::ImageBase::Version_ = VERSION_NUMBER [static, protected]

version number of imagebase class

Definition at line 651 of file ImageBase.hh.

unsigned int BIAS::ImageBase::Width_ [protected]

image width in pixels

Definition at line 663 of file ImageBase.hh.

Referenced by Cut2ROI(), FlipHorizontal(), ImageBase(), Init(), BIAS::operator<<(), PixelValueBase(), Release(), BIAS::Image< StorageType >::Release(), and UpdateImageDataArrayFromImageData_().

unsigned int BIAS::ImageBase::WidthStep_ [protected]

size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)

Definition at line 671 of file ImageBase.hh.

Referenced by Cut2ROI(), FlipHorizontal(), ImageBase(), Init(), BIAS::operator<<(), BIAS::operator>>(), PixelValueBase(), Release(), BIAS::Image< StorageType >::Release(), and UpdateImageDataArrayFromImageData_().

The documentation for this class was generated from the following files:
  • Base/Image/ImageBase.hh
  • Base/Image/ImageBase.cpp
Generated on Wed Jun 21 19:08:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageCanvas

BIAS::ImageCanvas Class Reference
[Graphical User Interfaces]

display image in wx application, provides zoom and investigation functionality More...

#include <Gui/ImageCanvas.hh>

Inheritance diagram for BIAS::ImageCanvas:

[legend]
Collaboration diagram for BIAS::ImageCanvas:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetMousePos (int &x, int &y)
BIAS::ImageBase * GetOrigImage ()
bool | GetShowScaled ()
ImageCanvas (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL &wxTRANSPARENT, const wxString &name=wxT("ScrolledWindow"))
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetClearDrawingContext (bool clear)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultZoom (unsigned z)
void | SetScaledImageSize (int width, int height)
Sets the size of the scaled image.
void | SetShowScaled (bool on)
void | SetZoomed (bool s)
virtual bool | Show (bool show=true)
void | Show (BIAS::PyramidImage< unsigned char > &pim, std::string name)
void | Show (BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name)
void | Show (BIAS::Image< unsigned char > &im, std::string name)
~ImageCanvas ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | OnErase (wxEraseEvent &event)
void | OnMouseLeave (wxMouseEvent &event)
void | OnMouseMove (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnRightMouseButton (wxMouseEvent &event)
void | OnSize (wxSizeEvent &event)
void | UpdateStatusBar (unsigned x, unsigned y)
void | Zoom (unsigned x, unsigned y)

Protected Attributes

long int | _liDebugLevel
wxBitmap * | Bitmap_
bool | ClearDrawingContext_
unsigned | DefaultZoom_
unsigned | height_
std::string | ImageName_
int | mousex_
int | mousey_
ZoomFrame * MyZoomWin_
BIAS::ImageBase origim_
pthread_mutex_t * | origim_mutex_
BIAS::Image< unsigned char > | rgbim_
wxStatusBar * | SBar_
int | SBarID_
int | ScaledImageSizeX_
int | ScaledImageSizeY_
bool | ShowScaled_
wxString | Title_
unsigned | width_
pthread_mutex_t * | wxbitmap_mutex_
wxImage * | wximage_
bool | Zoomed_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

display image in wx application, provides zoom and investigation functionality

Author:
woelk

Definition at line 119 of file ImageCanvas.hh.

Constructor & Destructor Documentation

ImageCanvas::ImageCanvas | ( | wxWindow * | parent,
 |  | wxStatusBar * | sbar = NULL,
 |  | int | sbarid = 0,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxSize(320, 240),
 |  | long | style = wxHSCROLL|wxVSCROLL &wxTRANSPARENT,
 |  | const wxString & | name = wxT("ScrolledWindow")
 | ) |

Definition at line 438 of file ImageCanvas.cpp.

References Bitmap_, DefaultZoom_, mousex_, mousey_, origim_mutex_, SBar_, SBarID_, ShowScaled_, Title_, wxbitmap_mutex_, wximage_, and Zoomed_.

ImageCanvas::~ImageCanvas ( )

Definition at line 461 of file ImageCanvas.cpp.

References Bitmap_, origim_mutex_, wxbitmap_mutex_, and wximage_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool ImageCanvas::GetMousePos | ( | int & | x,
 |  | int & | y
 | ) |

Definition at line 606 of file ImageCanvas.cpp.

References mousex_, and mousey_.

BIAS::ImageBase* BIAS::ImageCanvas::GetOrigImage ( ) [inline]

Definition at line 142 of file ImageCanvas.hh.

Referenced by MainFrame::FitSizetIfTooSmall(), and MainFrame::OnInfo().

bool BIAS::ImageCanvas::GetShowScaled ( ) [inline]

Definition at line 153 of file ImageCanvas.hh.

void ImageCanvas::OnErase ( wxEraseEvent & event ) [protected]

Definition at line 625 of file ImageCanvas.cpp.

void ImageCanvas::OnMouseLeave ( wxMouseEvent & event ) [protected]

Definition at line 662 of file ImageCanvas.cpp.

References mousex_, mousey_, SBar_, and SBarID_.

void ImageCanvas::OnMouseMove ( wxMouseEvent & event ) [protected]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 668 of file ImageCanvas.cpp.

References mousex_, mousey_, ScaledImageSizeX_, ScaledImageSizeY_, ShowScaled_, and UpdateStatusBar().

void ImageCanvas::OnPaint ( wxPaintEvent & event ) [protected]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 630 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, Bitmap_, ScaledImageSizeX_, ScaledImageSizeY_, ShowScaled_, wxbitmap_mutex_, and wximage_.

void ImageCanvas::OnRightMouseButton ( wxMouseEvent & event ) [protected]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 688 of file ImageCanvas.cpp.

References Zoom().

void ImageCanvas::OnSize ( wxSizeEvent & event ) [protected]

Definition at line 698 of file ImageCanvas.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::ImageCanvas::SetClearDrawingContext ( bool clear ) [inline]

Definition at line 149 of file ImageCanvas.hh.

Referenced by MainFrame::SetImages().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetDefaultZoom ( unsigned z ) [inline]

Definition at line 146 of file ImageCanvas.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetScaledImageSize | ( | int | width,
 |  | int | height
 | ) | [inline]

Sets the size of the scaled image.

Only used if show scaled is on.

Definition at line 156 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetShowScaled ( bool on ) [inline]

Definition at line 152 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetZoomed ( bool s ) [inline]

Definition at line 141 of file ImageCanvas.hh.

virtual bool BIAS::ImageCanvas::Show ( bool show = true ) [inline, virtual]

Definition at line 139 of file ImageCanvas.hh.

void BIAS::ImageCanvas::Show | ( | BIAS::PyramidImage< unsigned char > & | pim,
 |  | std::string | name
 | ) |

void ImageCanvas::Show | ( | BIAS::ImageBase & | origim,
 |  | BIAS::Image< unsigned char > & | scaledrgbim,
 |  | std::string | name
 | ) |

Definition at line 494 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT, D_IC_IM, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), height_, ImageName_, origim_, origim_mutex_, rgbim_, ScaledImageSizeX_, ScaledImageSizeY_, ShowScaled_, and width_.

void BIAS::ImageCanvas::Show | ( | BIAS::Image< unsigned char > & | im,
 |  | std::string | name
 | ) |

Referenced by MainFrame::OnLeftDown(), MainFrame::SetImages(), BIAS::GuiWX::ShowConvertedImage_(), and CutoutFrame::ShowImage().

void ImageCanvas::UpdateStatusBar | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected]

Definition at line 557 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASERR, Bitmap_, height_, origim_mutex_, SBar_, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, width_, and wxbitmap_mutex_.

Referenced by OnMouseMove().

void ImageCanvas::Zoom | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected]

Definition at line 540 of file ImageCanvas.cpp.

References BIAS::AsciiToWx().

Referenced by OnRightMouseButton().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

wxBitmap* BIAS::ImageCanvas::Bitmap_ [protected]

Definition at line 176 of file ImageCanvas.hh.

Referenced by ImageCanvas(), OnPaint(), UpdateStatusBar(), and ~ImageCanvas().

bool BIAS::ImageCanvas::ClearDrawingContext_ [protected]

Definition at line 196 of file ImageCanvas.hh.

unsigned BIAS::ImageCanvas::DefaultZoom_ [protected]

Definition at line 193 of file ImageCanvas.hh.

Referenced by ImageCanvas().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned BIAS::ImageCanvas::height_ [protected]

Definition at line 181 of file ImageCanvas.hh.

Referenced by Show(), and UpdateStatusBar().

std::string BIAS::ImageCanvas::ImageName_ [protected]

Definition at line 198 of file ImageCanvas.hh.

Referenced by Show().

int BIAS::ImageCanvas::mousex_ [protected]

Definition at line 182 of file ImageCanvas.hh.

Referenced by GetMousePos(), ImageCanvas(), OnMouseLeave(), and OnMouseMove().

int BIAS::ImageCanvas::mousey_ [protected]

Definition at line 182 of file ImageCanvas.hh.

Referenced by GetMousePos(), ImageCanvas(), OnMouseLeave(), and OnMouseMove().

ZoomFrame* BIAS::ImageCanvas::MyZoomWin_ [protected]

Definition at line 180 of file ImageCanvas.hh.

BIAS::ImageBase BIAS::ImageCanvas::origim_ [protected]

Definition at line 184 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::ImageCanvasEnhanced::SelectRectangle(), and Show().

pthread_mutex_t * BIAS::ImageCanvas::origim_mutex_ [protected]

Definition at line 191 of file ImageCanvas.hh.

Referenced by ImageCanvas(), BIAS::ImageCanvasEnhanced::SelectRectangle(), Show(), UpdateStatusBar(), and ~ImageCanvas().

BIAS::Image<unsigned char> BIAS::ImageCanvas::rgbim_ [protected]

Definition at line 185 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvasEnhanced::DrawRectangle_(), and Show().

wxStatusBar* BIAS::ImageCanvas::SBar_ [protected]

Definition at line 178 of file ImageCanvas.hh.

Referenced by ImageCanvas(), OnMouseLeave(), and UpdateStatusBar().

int BIAS::ImageCanvas::SBarID_ [protected]

Definition at line 179 of file ImageCanvas.hh.

Referenced by ImageCanvas(), and OnMouseLeave().

int BIAS::ImageCanvas::ScaledImageSizeX_ [protected]

Definition at line 189 of file ImageCanvas.hh.

Referenced by OnMouseMove(), OnPaint(), and Show().

int BIAS::ImageCanvas::ScaledImageSizeY_ [protected]

Definition at line 189 of file ImageCanvas.hh.

Referenced by OnMouseMove(), OnPaint(), and Show().

bool BIAS::ImageCanvas::ShowScaled_ [protected]

Definition at line 188 of file ImageCanvas.hh.

Referenced by ImageCanvas(), OnMouseMove(), OnPaint(), and Show().

wxString BIAS::ImageCanvas::Title_ [protected]

Definition at line 199 of file ImageCanvas.hh.

Referenced by ImageCanvas().

unsigned BIAS::ImageCanvas::width_ [protected]

Definition at line 181 of file ImageCanvas.hh.

Referenced by Show(), and UpdateStatusBar().

pthread_mutex_t* BIAS::ImageCanvas::wxbitmap_mutex_ [protected]

Definition at line 191 of file ImageCanvas.hh.

Referenced by ImageCanvas(), OnPaint(), UpdateStatusBar(), and ~ImageCanvas().

wxImage* BIAS::ImageCanvas::wximage_ [protected]

Definition at line 177 of file ImageCanvas.hh.

Referenced by ImageCanvas(), OnPaint(), and ~ImageCanvas().

bool BIAS::ImageCanvas::Zoomed_ [protected]

Definition at line 183 of file ImageCanvas.hh.

Referenced by ImageCanvas().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvas.hh
  • Gui/ImageCanvas.cpp
Generated on Wed Jun 21 19:08:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageCanvasEnhanced Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageCanvasEnhanced

BIAS::ImageCanvasEnhanced Class Reference
[Graphical User Interfaces]

provides functionality for selection of rectangle, point, . More...

#include <Gui/ImageCanvasEnhanced.hh>

Inheritance diagram for BIAS::ImageCanvasEnhanced:

[legend]
Collaboration diagram for BIAS::ImageCanvasEnhanced:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetMousePos (int &x, int &y)
BIAS::ImageBase * GetOrigImage ()
bool | GetShowScaled ()
ImageCanvasEnhanced (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL, const wxString &name=AsciiToWx("ScrolledWindow"))
void | OnLeftMouseButton (wxMouseEvent &event)
void | OnMouseMove (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnRightMouseButton (wxMouseEvent &event)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SelectRectangle (ICECallbackInterface &obj)
Call SelectRectangle with an object derived from ICECallbackInterface.
void | SetClearDrawingContext (bool clear)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultZoom (unsigned z)
void | SetScaledImageSize (int width, int height)
Sets the size of the scaled image.
void | SetShowScaled (bool on)
void | SetZoomed (bool s)
virtual bool | Show (bool show=true)
void | Show (BIAS::PyramidImage< unsigned char > &pim, std::string name)
void | Show (BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name)
void | Show (BIAS::Image< unsigned char > &im, std::string name)
~ImageCanvasEnhanced ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | DrawRectangle_ (int tl[2], int br[2])
void | OnErase (wxEraseEvent &event)
void | OnMouseLeave (wxMouseEvent &event)
void | OnSize (wxSizeEvent &event)
void RefreshDrawIm_ ()
void | UpdateStatusBar (unsigned x, unsigned y)
void | Zoom (unsigned x, unsigned y)

Protected Attributes

long int | _liDebugLevel
wxBitmap * | Bitmap_
int | BottomRight_ [2]
ICECallbackInterface * CallbackObj_
bool | ClearDrawingContext_
unsigned | DefaultZoom_
unsigned | height_
std::string | ImageName_
int | mousex_
int | mousey_
ZoomFrame * MyZoomWin_
int | NumLeftClicks_
BIAS::ImageBase origim_
pthread_mutex_t * | origim_mutex_
BIAS::Image< unsigned char > | rgbim_
wxStatusBar * | SBar_
int | SBarID_
int | ScaledImageSizeX_
int | ScaledImageSizeY_
bool | SelectRectangle_
bool | ShowScaled_
wxString | Title_
int | TopLeft_ [2]
unsigned | width_
pthread_mutex_t * | wxbitmap_mutex_
wxImage * | wximage_
bool | Zoomed_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

provides functionality for selection of rectangle, point, .

..

Author:
woelk 08/2004

Definition at line 43 of file ImageCanvasEnhanced.hh.

Constructor & Destructor Documentation

ImageCanvasEnhanced::ImageCanvasEnhanced | ( | wxWindow * | parent,
 |  | wxStatusBar * | sbar = NULL,
 |  | int | sbarid = 0,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxSize(320, 240),
 |  | long | style = wxHSCROLL|wxVSCROLL,
 |  | const wxString & | name = AsciiToWx("ScrolledWindow")
 | ) |

Definition at line 25 of file ImageCanvasEnhanced.cpp.

References BottomRight_, CallbackObj_, NumLeftClicks_, SelectRectangle_, and TopLeft_.

ImageCanvasEnhanced::~ImageCanvasEnhanced ( )

Definition at line 43 of file ImageCanvasEnhanced.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void ImageCanvasEnhanced::DrawRectangle_ | ( | int | tl[2],
 |  | int | br[2]
 | ) | [protected]

Definition at line 146 of file ImageCanvasEnhanced.cpp.

References BIASDOUT, D_IC_IM, RefreshDrawIm_(), and BIAS::ImageCanvas::rgbim_.

Referenced by OnMouseMove().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool ImageCanvas::GetMousePos | ( | int & | x,
 |  | int & | y
 | ) | [inherited]

Definition at line 606 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::mousex_, and BIAS::ImageCanvas::mousey_.

BIAS::ImageBase* BIAS::ImageCanvas::GetOrigImage ( ) [inline, inherited]

Definition at line 142 of file ImageCanvas.hh.

Referenced by MainFrame::FitSizetIfTooSmall(), and MainFrame::OnInfo().

bool BIAS::ImageCanvas::GetShowScaled ( ) [inline, inherited]

Definition at line 153 of file ImageCanvas.hh.

void ImageCanvas::OnErase ( wxEraseEvent & event ) [protected, inherited]

Definition at line 625 of file ImageCanvas.cpp.

void ImageCanvasEnhanced::OnLeftMouseButton ( wxMouseEvent & event )

Definition at line 66 of file ImageCanvasEnhanced.cpp.

References BIASERR.

void ImageCanvas::OnMouseLeave ( wxMouseEvent & event ) [protected, inherited]

Definition at line 662 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::mousex_, BIAS::ImageCanvas::mousey_, BIAS::ImageCanvas::SBar_, and BIAS::ImageCanvas::SBarID_.

void ImageCanvasEnhanced::OnMouseMove ( wxMouseEvent & event )

Reimplemented from BIAS::ImageCanvas.

Definition at line 129 of file ImageCanvasEnhanced.cpp.

References BottomRight_, DrawRectangle_(), NumLeftClicks_, SelectRectangle_, and TopLeft_.

void ImageCanvasEnhanced::OnPaint ( wxPaintEvent & event )

Reimplemented from BIAS::ImageCanvas.

Definition at line 118 of file ImageCanvasEnhanced.cpp.

References NumLeftClicks_, and SelectRectangle_.

void ImageCanvasEnhanced::OnRightMouseButton ( wxMouseEvent & event )

Reimplemented from BIAS::ImageCanvas.

Definition at line 102 of file ImageCanvasEnhanced.cpp.

References NumLeftClicks_, RefreshDrawIm_(), and SelectRectangle_.

void ImageCanvas::OnSize ( wxSizeEvent & event ) [protected, inherited]

Definition at line 698 of file ImageCanvas.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void ImageCanvasEnhanced::RefreshDrawIm_ ( ) [protected]

Definition at line 163 of file ImageCanvasEnhanced.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageBase::GetColorModel(), and BIAS::ImageCanvas::origim_.

Referenced by DrawRectangle_(), and OnRightMouseButton().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void ImageCanvasEnhanced::SelectRectangle ( ICECallbackInterface & obj )

Call SelectRectangle with an object derived from ICECallbackInterface.

The function RectangleSelected() should be overloaded in this object. After rectangle selection is finished (2 clicks with left mouse, right button cancels) the function obj.RectangleSelected() is called with top left (tl) and bottom right (br) coordinates.

Author:
woelk 08/2004

Definition at line 46 of file ImageCanvasEnhanced.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT, CallbackObj_, D_IC_IM, NumLeftClicks_, BIAS::ImageCanvas::origim_, BIAS::ImageCanvas::origim_mutex_, and SelectRectangle_.

void BIAS::ImageCanvas::SetClearDrawingContext ( bool clear ) [inline, inherited]

Definition at line 149 of file ImageCanvas.hh.

Referenced by MainFrame::SetImages().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetDefaultZoom ( unsigned z ) [inline, inherited]

Definition at line 146 of file ImageCanvas.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetScaledImageSize | ( | int | width,
 |  | int | height
 | ) | [inline, inherited]

Sets the size of the scaled image.

Only used if show scaled is on.

Definition at line 156 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetShowScaled ( bool on ) [inline, inherited]

Definition at line 152 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetZoomed ( bool s ) [inline, inherited]

Definition at line 141 of file ImageCanvas.hh.

virtual bool BIAS::ImageCanvas::Show ( bool show = true ) [inline, virtual, inherited]

Definition at line 139 of file ImageCanvas.hh.

void BIAS::ImageCanvas::Show | ( | BIAS::PyramidImage< unsigned char > & | pim,
 |  | std::string | name
 | ) | [inherited]

void ImageCanvas::Show | ( | BIAS::ImageBase & | origim,
 |  | BIAS::Image< unsigned char > & | scaledrgbim,
 |  | std::string | name
 | ) | [inherited]

Definition at line 494 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT, D_IC_IM, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageCanvas::height_, BIAS::ImageCanvas::ImageName_, BIAS::ImageCanvas::origim_, BIAS::ImageCanvas::origim_mutex_, BIAS::ImageCanvas::rgbim_, BIAS::ImageCanvas::ScaledImageSizeX_, BIAS::ImageCanvas::ScaledImageSizeY_, BIAS::ImageCanvas::ShowScaled_, and BIAS::ImageCanvas::width_.

void BIAS::ImageCanvas::Show | ( | BIAS::Image< unsigned char > & | im,
 |  | std::string | name
 | ) | [inherited]

Referenced by MainFrame::OnLeftDown(), MainFrame::SetImages(), BIAS::GuiWX::ShowConvertedImage_(), and CutoutFrame::ShowImage().

void ImageCanvas::UpdateStatusBar | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected, inherited]

Definition at line 557 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASERR, BIAS::ImageCanvas::Bitmap_, BIAS::ImageCanvas::height_, BIAS::ImageCanvas::origim_mutex_, BIAS::ImageCanvas::SBar_, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageCanvas::width_, and BIAS::ImageCanvas::wxbitmap_mutex_.

Referenced by BIAS::ImageCanvas::OnMouseMove().

void ImageCanvas::Zoom | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected, inherited]

Definition at line 540 of file ImageCanvas.cpp.

References BIAS::AsciiToWx().

Referenced by BIAS::ImageCanvas::OnRightMouseButton().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

wxBitmap* BIAS::ImageCanvas::Bitmap_ [protected, inherited]

Definition at line 176 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

int BIAS::ImageCanvasEnhanced::BottomRight_[2] [protected]

Definition at line 69 of file ImageCanvasEnhanced.hh.

Referenced by ImageCanvasEnhanced(), and OnMouseMove().

ICECallbackInterface* BIAS::ImageCanvasEnhanced::CallbackObj_ [protected]

Definition at line 72 of file ImageCanvasEnhanced.hh.

Referenced by ImageCanvasEnhanced(), and SelectRectangle().

bool BIAS::ImageCanvas::ClearDrawingContext_ [protected, inherited]

Definition at line 196 of file ImageCanvas.hh.

unsigned BIAS::ImageCanvas::DefaultZoom_ [protected, inherited]

Definition at line 193 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned BIAS::ImageCanvas::height_ [protected, inherited]

Definition at line 181 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show(), and BIAS::ImageCanvas::UpdateStatusBar().

std::string BIAS::ImageCanvas::ImageName_ [protected, inherited]

Definition at line 198 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show().

int BIAS::ImageCanvas::mousex_ [protected, inherited]

Definition at line 182 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::GetMousePos(), BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::OnMouseMove().

int BIAS::ImageCanvas::mousey_ [protected, inherited]

Definition at line 182 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::GetMousePos(), BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::OnMouseMove().

ZoomFrame* BIAS::ImageCanvas::MyZoomWin_ [protected, inherited]

Definition at line 180 of file ImageCanvas.hh.

int BIAS::ImageCanvasEnhanced::NumLeftClicks_ [protected]

Definition at line 68 of file ImageCanvasEnhanced.hh.

Referenced by ImageCanvasEnhanced(), OnMouseMove(), OnPaint(), OnRightMouseButton(), and SelectRectangle().

BIAS::ImageBase BIAS::ImageCanvas::origim_ [protected, inherited]

Definition at line 184 of file ImageCanvas.hh.

Referenced by RefreshDrawIm_(), SelectRectangle(), and BIAS::ImageCanvas::Show().

pthread_mutex_t * BIAS::ImageCanvas::origim_mutex_ [protected, inherited]

Definition at line 191 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), SelectRectangle(), BIAS::ImageCanvas::Show(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

BIAS::Image<unsigned char> BIAS::ImageCanvas::rgbim_ [protected, inherited]

Definition at line 185 of file ImageCanvas.hh.

Referenced by DrawRectangle_(), and BIAS::ImageCanvas::Show().

wxStatusBar* BIAS::ImageCanvas::SBar_ [protected, inherited]

Definition at line 178 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::UpdateStatusBar().

int BIAS::ImageCanvas::SBarID_ [protected, inherited]

Definition at line 179 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), and BIAS::ImageCanvas::OnMouseLeave().

int BIAS::ImageCanvas::ScaledImageSizeX_ [protected, inherited]

Definition at line 189 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

int BIAS::ImageCanvas::ScaledImageSizeY_ [protected, inherited]

Definition at line 189 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

bool BIAS::ImageCanvasEnhanced::SelectRectangle_ [protected]

Definition at line 70 of file ImageCanvasEnhanced.hh.

Referenced by ImageCanvasEnhanced(), OnMouseMove(), OnPaint(), OnRightMouseButton(), and SelectRectangle().

bool BIAS::ImageCanvas::ShowScaled_ [protected, inherited]

Definition at line 188 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

wxString BIAS::ImageCanvas::Title_ [protected, inherited]

Definition at line 199 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

int BIAS::ImageCanvasEnhanced::TopLeft_[2] [protected]

Definition at line 69 of file ImageCanvasEnhanced.hh.

Referenced by ImageCanvasEnhanced(), and OnMouseMove().

unsigned BIAS::ImageCanvas::width_ [protected, inherited]

Definition at line 181 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show(), and BIAS::ImageCanvas::UpdateStatusBar().

pthread_mutex_t* BIAS::ImageCanvas::wxbitmap_mutex_ [protected, inherited]

Definition at line 191 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

wxImage* BIAS::ImageCanvas::wximage_ [protected, inherited]

Definition at line 177 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::~ImageCanvas().

bool BIAS::ImageCanvas::Zoomed_ [protected, inherited]

Definition at line 183 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvasEnhanced.hh
  • Gui/ImageCanvasEnhanced.cpp
Generated on Wed Jun 21 19:08:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ImageCanvasGLBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ImageCanvasGLBase Class Reference
[Graphical User Interfaces]

2D image display canvas using OpenGL rendering internally. More...

#include <Gui/ImageCanvasGLBase.hh>

Detailed Description

2D image display canvas using OpenGL rendering internally.

Thus zooming, interpolation etc is easy and very fast. In particular useful if you use shared contexts to display OPenGL Image (ids). This class should not have extended dependencies. Use The CG Version to display non power of two textures bceause you need a shder for display.

An OpenGL texture (id) is displayed. This can be created by feeding in a BIAS image, the "value" image.

Thus the true values from "valueimage" are displayed even with fewer bit depth display.

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Gui/ImageCanvasGLBase.hh
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageCanvasGLBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageCanvasGLBase

BIAS::ImageCanvasGLBase Class Reference

#include <Gui/ImageCanvasGLBase.hh>

Inheritance diagram for BIAS::ImageCanvasGLBase:

[legend]
Collaboration diagram for BIAS::ImageCanvasGLBase:

[legend]
List of all members.

Public Member Functions

virtual void | Display ()
main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance
virtual void | DisplayCalls ()
virtual void | DisplayCameraView ()
display call to be overridden by child classes
virtual void | DisplayCameraViewExternalParams ()
virtual void | DisplayCameraViewInternalParams ()
virtual void | DisplayClear ()
clears buffers and resets virtual camera to identity
void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
virtual void | DisplayRenderMode ()
display default shade model, polygon mode,
void DisplaySelectBuffer ()
useful for quadbuffered stereo, e.g. shutetr glasses
void | EnableMipMapping (const bool &avoidAliasingByMipmapping=true)
set to true for prettier OpenGL texture mipmapping display (which costs performance) JW
float | GetAspectRatio () const
GetAspectRatio is X/Y.
unsigned long | GetFrameCount () const
unsigned int | GetHeight () const
virtual void | GetInfoGL (std::ostream &os=std::cout)
return GL state info
wxFrame * | GetOwnerframe ()
float | GetPixelValueDepth (const wxPoint &pos2d) const
BIAS::Vector3< float > | GetPixelValueRGB (const wxPoint &pos2d)
BIAS::Vector4< float > | GetPixelValueRGBA (const wxPoint &pos2d)
GLuint | GetTexId () const
ImgObjGL & GetTexobj ()
ImgObjGL | GetTexobj () const
GLenum | GetTexTarget () const
CameraViewController & GetViewController ()
CameraViewController | GetViewController () const
unsigned int | GetWidth () const
ImageCanvasGLBase (wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("ImageCanvasGLBase"), int *attribList=0, const wxPalette &palette=wxNullPalette)
constructor using a shared context
ImageCanvasGLBase (wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("ImageCanvasGLBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette)
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
virtual void | InitWithContext ()
init all things that need a context.
bool | IsContextAvailable ()
activates the current rendereing context if there is one and
virtual void | OnChar (wxKeyEvent &event)
void | OnEraseBackground (wxEraseEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnMotion (wxMouseEvent &event)
void | OnMouseDown (wxMouseEvent &event)
void | OnMouseWheel (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnSize (wxSizeEvent &event)
virtual std::ostream & | PrintHelp (std::ostream &os)
pop up keyboard layout help.
virtual void | Reshape ()
change of size and aspect ratio.
void ScreenShot ()
JW automatic screenshot to file with filename based on frame, instance etc.
void | ScreenShot (const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | ScreenShot (BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
int | Set (BIAS::ImageBase &img, const std::string &name=std::string("Image<unsigned char>"), const bool &forcePow2tex=true, const bool &flipY=true)
int | Set (const ImgObjGL &NewTexobj, const std::string &name=std::string("ImgObjGL"))
feed in an existing, possibly shared, GL texture obj for display note: it is *no* good idea to call thsi method Show because it conflicts with WX::Show(bool) (JW)
void | SetFrameCount (const unsigned long &newVal)
void | SetOwnerframe (wxFrame *ptr)
int | SetRECT (BIAS::ImageBase &img, const std::string &name=std::string("RECT Image<unsigned char>"), const bool &flipY=true)
sets imaeg as a RECT texture JW
void | SetStatusText (const wxString &text, const int c_field=0)
let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)
void ShowFPS ()
simple interface for the above
void | ShowFPS (const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField)
shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.
void | ShowValue (const wxPoint &pos)
void SwapBuffers ()
expands parents SwapBUffers by automatic framecount increase
void ToggleFullScreen ()
BIAS::Vector3< float > | Unproject (const wxPoint &pos2d, double &d)
computes 3D coordinate from 2D+Z by "unprojection" JW
virtual void | UpdateTime ()
sets the internal time param, by default based on realtime wall clock
bool | ValidTexobj (const ImgObjGL &t) const
virtual | ~ImageCanvasGLBase ()
destructor

Static Public Member Functions

static void | DisplaySampleScene ()
display soem very simple Gl calls to draw something at all
static bool | GetVSync ()
static void | SetVSync (const bool &trueForOn)
vertical sync control on or off (VSYNC) JW
static void | StereoI_CaptureStereoImage (const int &format, const int &quality)
static float | StereoI_GetConvergence ()
static void | StereoI_GetInfo (std::ostream &os=std::cout)
query status information on current NVStereo rendering state JW
static float | StereoI_GetSeparation ()
static int | StereoI_GetStereoState ()
wrappers for StereoI interface
static int | StereoI_Init ()
interace to NVidias consumer Stereo NVStereo driver API.
static float | StereoI_SetConvergence (const float &val)
static float | StereoI_SetSeparation (const float &val)
static int | StereoI_SetStereoState (const int &val)
static bool | ToggleIP (bool &value)
helper toggling a bool value in place
static bool | ToggleVSync ()
try to toggle VSync setting.

Static Public Attributes

static bool | animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
static bool | idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled
static bool | realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation
static double | time = 0.0

Protected Attributes

GLenum | _polygonmodeGL
unsigned long | framecount_
bool | InitWithContextDone_
unsigned int | instance_
BIAS::Vector2< float > | InterestPoint
std::string | name
BIAS::DrawTextGL * p_font
wxFrame * | p_ownerframe
CameraViewController * p_viewCtrl_
BIAS::RenderModeGL rendermode
float | scalefactor
BIAS::ImgObjGL texobj

Static Protected Attributes

static unsigned int | instancesTotalNo_ = 0

Detailed Description

Definition at line 49 of file ImageCanvasGLBase.hh.

Constructor & Destructor Documentation

ImageCanvasGLBase::~ImageCanvasGLBase ( ) [virtual]

destructor

Definition at line 19 of file ImageCanvasGLBase.cpp.

ImageCanvasGLBase::ImageCanvasGLBase | ( | wxFrame * | parent,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("ImageCanvasGLBase"),
 |  | int * | attribList = NULL,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

Definition at line 23 of file ImageCanvasGLBase.cpp.

References InitMembers().

ImageCanvasGLBase::ImageCanvasGLBase | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext = NULL,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("ImageCanvasGLBase"),
 |  | int * | attribList = 0,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

Definition at line 40 of file ImageCanvasGLBase.cpp.

References InitMembers().

Member Function Documentation

void OpenGLCanvasBase::Display ( ) [virtual, inherited]

main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance

Author:
Jan Woetzel.

Definition at line 288 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayCalls(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::SwapBuffers(), and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvas::OnIdle(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and Set().

void ImageCanvasGLBase::DisplayCalls ( ) [virtual]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 57 of file ImageCanvasGLBase.cpp.

References BIAS::CameraViewport::DisplayGL(), BIAS::GeometryGL::DisplayQuadTexCoord2DFull(), BIAS::CameraViewController::GetInternals(), BIAS::OpenGLCanvas::GetViewController(), BIAS::ImgObjGL::heightBrutto, texobj, BIAS::CameraViewInternals::viewport, and BIAS::ImgObjGL::widthBrutto.

void OpenGLCanvas::DisplayCameraView ( ) [virtual, inherited]

display call to be overridden by child classes

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 99 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), and BIAS::OpenGLCanvas::DisplayCameraViewInternalParams().

void OpenGLCanvas::DisplayCameraViewExternalParams ( ) [virtual, inherited]

Definition at line 111 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLExternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvas::DisplayCameraViewInternalParams ( ) [virtual, inherited]

Definition at line 106 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLInternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvasBase::DisplayClear ( ) [virtual, inherited]

clears buffers and resets virtual camera to identity

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 401 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::GeometryGL::DisplayClear().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) | [inherited]

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 421 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIAS::GeometryGL::DisplayCoordCross(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), and BIAS::OpenGLCanvasBase::p_font.

Referenced by MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayRenderMode ( ) [virtual, inherited]

display default shade model, polygon mode,

Examples:
ExampleGLShared.cpp.

Definition at line 408 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplayRenderMode(), and BIAS::OpenGLCanvasBase::rendermode.

Referenced by BIAS::OpenGLCanvasBase::Display(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplaySampleScene ( ) [static, inherited]

display soem very simple Gl calls to draw something at all

Definition at line 415 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplaySceneExampleSimple().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls().

void OpenGLCanvasBase::DisplaySelectBuffer ( ) [inherited]

useful for quadbuffered stereo, e.g. shutetr glasses

Definition at line 347 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::drawbuffermode, BIAS::MONO, BIAS::OpenGLCanvasBase::rendermode, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_QUADBUFFERED, and BIAS::STEREO_UNTOUCHED.

Referenced by BIAS::OpenGLCanvasBase::Display().

void ImageCanvasGLBase::EnableMipMapping ( const bool & avoidAliasingByMipmapping = true )

set to true for prettier OpenGL texture mipmapping display (which costs performance) JW

Definition at line 82 of file ImageCanvasGLBase.cpp.

References BIAS::ImgObjGL::minificationMode, and texobj.

float OpenGLCanvasBase::GetAspectRatio ( ) const [inherited]

GetAspectRatio is X/Y.

Returns:
aspect 'X/Y' = ratio of width being 'bigger' than reference height
Examples:
ExampleGLShared.cpp.

Definition at line 468 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::GetHeight(), and BIAS::OpenGLCanvasBase::GetWidth().

Referenced by MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::GetFrameCount ( ) const [inline, inherited]

Definition at line 290 of file OpenGLCanvasBase.hh.

unsigned int OpenGLCanvasBase::GetHeight ( ) const [inherited]

Definition at line 458 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::GetInfoGL ( std::ostream & os = std::cout ) [virtual, inherited]

return GL state info

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 203 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::Print().

wxFrame * OpenGLCanvasBase::GetOwnerframe ( ) [inherited]

Definition at line 252 of file OpenGLCanvasBase.cpp.

References BIASASSERT, and BIAS::OpenGLCanvasBase::p_ownerframe.

float OpenGLCanvasBase::GetPixelValueDepth ( const wxPoint & pos2d ) const [inherited]

Definition at line 514 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::OpenGLCanvasBase::GetHeight().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

BIAS::Vector3< float > OpenGLCanvasBase::GetPixelValueRGB ( const wxPoint & pos2d ) [inherited]

Definition at line 475 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector3< T >::Set().

BIAS::Vector4< float > OpenGLCanvasBase::GetPixelValueRGBA ( const wxPoint & pos2d ) [inherited]

Definition at line 495 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector4< T >::Set().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

GLuint ImageCanvasGLBase::GetTexId ( ) const

Definition at line 93 of file ImageCanvasGLBase.cpp.

References BIASASSERT, BIAS::ImgObjGL::id, and texobj.

ImgObjGL& BIAS::ImageCanvasGLBase::GetTexobj ( ) [inline]

Definition at line 118 of file ImageCanvasGLBase.hh.

ImgObjGL BIAS::ImageCanvasGLBase::GetTexobj ( ) const [inline]

Definition at line 117 of file ImageCanvasGLBase.hh.

Referenced by SetRECT().

GLenum ImageCanvasGLBase::GetTexTarget ( ) const

Definition at line 104 of file ImageCanvasGLBase.cpp.

References BIASASSERT, BIAS::ImgObjGL::target, and texobj.

CameraViewController & OpenGLCanvas::GetViewController ( ) [inherited]

Definition at line 223 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

CameraViewController OpenGLCanvas::GetViewController ( ) const [inherited]

Definition at line 228 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

Referenced by DisplayCalls(), BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), BIAS::OpenGLCanvas::DisplayCameraViewInternalParams(), BIAS::OpenGLCanvas::GetInfoGL(), BIAS::OpenGLCanvas::OnMotion(), BIAS::OpenGLCanvas::OnMouseWheel(), and BIAS::OpenGLCanvas::Reshape().

bool OpenGLCanvasBase::GetVSync ( ) [static, inherited]

Returns:
true if vertical sync is enable, false for free running mode JW

Definition at line 1144 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::GetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleVSync().

unsigned int OpenGLCanvasBase::GetWidth ( ) const [inherited]

Definition at line 449 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void ImageCanvasGLBase::InitMembers ( ) [virtual]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Reimplemented from BIAS::OpenGLCanvas.

Definition at line 71 of file ImageCanvasGLBase.cpp.

References BIAS::OpenGLCanvas::InitMembers(), InterestPoint, scalefactor, and BIAS::Vector2< T >::Set().

Referenced by ImageCanvasGLBase().

void OpenGLCanvasBase::InitWithContext ( ) [virtual, inherited]

init all things that need a context.

sets _InitWithContextDone

Definition at line 137 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, BIAS::OpenGLCanvasBase::GetVSync(), BIAS::DrawTextGL::InitFont(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::p_font, BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::SetVSync(), and BIAS::RenderModeGL::vsync.

Referenced by BIAS::OpenGLCanvasBase::Display().

bool OpenGLCanvasBase::IsContextAvailable ( ) [inherited]

activates the current rendereing context if there is one and

Returns:
true if gl rendering context is available, false if there is none available (yet).

Definition at line 218 of file OpenGLCanvasBase.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), and BIAS::OpenGLCanvasBase::InitWithContext().

void OpenGLCanvasBase::OnChar ( wxKeyEvent & event ) [virtual, inherited]

Definition at line 957 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::AsciiToWx(), BIASASSERT, BIASERR, COUT, BIAS::RenderModeGL::cullface, BIAS::OpenGLCanvasBase::Display(), BIAS::RenderModeGL::enable_cullface, BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::GetVSync(), BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, BIAS::OpenGLCanvasBase::PrintHelp(), BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::OpenGLCanvasBase::SetStatusText(), BIAS::RenderModeGL::shademodel, BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::ToggleFullScreen(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::OnEraseBackground ( wxEraseEvent & event ) [inherited]

Definition at line 1129 of file OpenGLCanvasBase.cpp.

void OpenGLCanvas::OnIdle ( wxIdleEvent & event ) [inherited]

Definition at line 165 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvas::UpdateTime().

void OpenGLCanvas::OnMotion ( wxMouseEvent & event ) [inherited]

Definition at line 118 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MotionTranslation().

void OpenGLCanvas::OnMouseDown ( wxMouseEvent & event ) [inherited]

Definition at line 137 of file OpenGLCanvas.cpp.

void OpenGLCanvas::OnMouseWheel ( wxMouseEvent & event ) [inherited]

Definition at line 146 of file OpenGLCanvas.cpp.

References BIASBREAK, BIASWARN, BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MoveToCenter().

void BIAS::OpenGLCanvasBase::OnPaint ( wxPaintEvent & event ) [inherited]

void OpenGLCanvasBase::OnSize ( wxSizeEvent & event ) [inherited]

Definition at line 923 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::Reshape().

std::ostream & OpenGLCanvasBase::PrintHelp ( std::ostream & os ) [virtual, inherited]

pop up keyboard layout help.

Mut ebe virtualto let child class add their bindings

Definition at line 929 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

void OpenGLCanvas::Reshape ( ) [virtual, inherited]

change of size and aspect ratio.

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 211 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::CameraViewController::GetInternals(), BIAS::OpenGLCanvas::GetViewController(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::CameraViewport::height, BIAS::CameraViewInternals::viewport, and BIAS::CameraViewport::width.

void OpenGLCanvasBase::ScreenShot ( ) [inherited]

JW automatic screenshot to file with filename based on frame, instance etc.

JW

Definition at line 681 of file OpenGLCanvasBase.cpp.

References BIAS_SCREENSHOT_DEFAULT_EXTENSION, BIAS::OpenGLCanvasBase::framecount_, BIAS::OpenGLCanvasBase::instance_, and BIAS::LeadingZeroString().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | const std::string & | filename,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Definition at line 567 of file OpenGLCanvasBase.cpp.

References BIASERR, COUT, BIAS::ImageIO::ExportImage(), FUNCNAME, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::GetWidth(), img, and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | BIAS::ImageBase & | dest,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 593 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and type.

Referenced by MyFrame::OnTestShot().

int ImageCanvasGLBase::Set | ( | BIAS::ImageBase & | img,
 |  | const std::string & | name = std::string("Image<unsigned char>"),
 |  | const bool & | forcePow2tex = true,
 |  | const bool & | flipY = true
 | ) |

Definition at line 166 of file ImageCanvasGLBase.cpp.

References BIAS::ImgObjGL::CreateGLTexture(), BIAS::OpenGLCanvasBase::Display(), and texobj.

int ImageCanvasGLBase::Set | ( | const ImgObjGL & | NewTexobj,
 |  | const std::string & | name = std::string("ImgObjGL")
 | ) |

feed in an existing, possibly shared, GL texture obj for display note: it is *no* good idea to call thsi method Show because it conflicts with WX::Show(bool) (JW)

Definition at line 137 of file ImageCanvasGLBase.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::ImgObjGL::p_valueImage, BIAS::ImgObjGL::p_valueImage_SelfAllocated, texobj, and ValidTexobj().

Referenced by MyFrame::LoadImages(), and SetRECT().

void BIAS::OpenGLCanvasBase::SetFrameCount ( const unsigned long & newVal ) [inline, inherited]

Definition at line 291 of file OpenGLCanvasBase.hh.

void OpenGLCanvasBase::SetOwnerframe ( wxFrame * ptr ) [inherited]

Definition at line 258 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::p_ownerframe.

int ImageCanvasGLBase::SetRECT | ( | BIAS::ImageBase & | img,
 |  | const std::string & | name = std::string("RECT Image<unsigned char>"),
 |  | const bool & | flipY = true
 | ) |

sets imaeg as a RECT texture JW

Definition at line 188 of file ImageCanvasGLBase.cpp.

References GetTexobj(), Set(), and BIAS::ImgObjGL::SetTargetRECT().

void OpenGLCanvasBase::SetStatusText | ( | const wxString & | text,
 |  | const int | c_field = 0
 | ) | [inherited]

let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)

Definition at line 741 of file OpenGLCanvasBase.cpp.

References BIASERR, and BIAS::OpenGLCanvasBase::p_ownerframe.

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvasBase::SetVSync ( const bool & trueForOn ) [static, inherited]

vertical sync control on or off (VSYNC) JW

Definition at line 1135 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::SetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::ShowFPS ( ) [inherited]

simple interface for the above

Definition at line 900 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvas::OnIdle().

void OpenGLCanvasBase::ShowFPS | ( | const int & | framecounter,
 |  | const float & | minUpdateIntervalSec,
 |  | const unsigned int & | minNewFrames,
 |  | const unsigned int | nField
 | ) | [inherited]

shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.

at least minUpdateIntervalSec seconds have passed since prvious update 2. at least minNewFrames were drawn since a previous update Shouls handle multiplem, shared contextst correctly (jw). JW

Definition at line 820 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), and BIAS::OpenGLCanvasBase::SetStatusText().

void OpenGLCanvasBase::ShowValue ( const wxPoint & pos ) [inherited]

Definition at line 780 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::Unproject().

void OpenGLCanvasBase::StereoI_CaptureStereoImage | ( | const int & | format,
 |  | const int & | quality
 | ) | [static, inherited]

Definition at line 1294 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_GetConvergence ( ) [static, inherited]

Definition at line 1278 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::StereoI_GetInfo ( std::ostream & os = std::cout ) [static, inherited]

query status information on current NVStereo rendering state JW

Definition at line 1213 of file OpenGLCanvasBase.cpp.

References BIASERR, Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_Init().

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), and BIAS::OpenGLCanvasBase::OnChar().

float OpenGLCanvasBase::StereoI_GetSeparation ( ) [static, inherited]

Definition at line 1262 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_GetStereoState ( ) [static, inherited]

wrappers for StereoI interface

Definition at line 1246 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_Init ( ) [static, inherited]

interace to NVidias consumer Stereo NVStereo driver API.

to enable/disbale stereo and control convergence and separation for stereo rendering

Returns:
0 on success, negative on error.
Author:
Jan Woetzel

Definition at line 1172 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, and g_pStereoAPI.

Referenced by Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_GetInfo().

float OpenGLCanvasBase::StereoI_SetConvergence ( const float & val ) [static, inherited]

Definition at line 1286 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_SetSeparation ( const float & val ) [static, inherited]

Definition at line 1270 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_SetStereoState ( const int & val ) [static, inherited]

Definition at line 1254 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::SwapBuffers ( ) [inherited]

expands parents SwapBUffers by automatic framecount increase

Definition at line 282 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::framecount_.

Referenced by BIAS::OpenGLCanvasBase::Display().

void OpenGLCanvasBase::ToggleFullScreen ( ) [inherited]

Definition at line 876 of file OpenGLCanvasBase.cpp.

References BIAS::RenderModeGL::drawbuffermode, OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE, BIAS::OpenGLCanvasBase::p_ownerframe, BIAS::OpenGLCanvasBase::rendermode, and BIAS::STEREO_CONSUMER_NV.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

bool OpenGLCanvasBase::ToggleIP ( bool & value ) [static, inherited]

helper toggling a bool value in place

Returns:
new value JW

Definition at line 1164 of file OpenGLCanvasBase.cpp.

bool OpenGLCanvasBase::ToggleVSync ( ) [static, inherited]

try to toggle VSync setting.

Returns:
true if toggling worked, false if status persisted.

Definition at line 1150 of file OpenGLCanvasBase.cpp.

References act, BIAS::OpenGLCanvasBase::GetVSync(), and BIAS::OpenGLCanvasBase::SetVSync().

Referenced by BIAS::OpenGLCanvasBase::OnChar().

BIAS::Vector3< float > OpenGLCanvasBase::Unproject | ( | const wxPoint & | pos2d,
 |  | double & | d
 | ) | [inherited]

computes 3D coordinate from 2D+Z by "unprojection" JW

Definition at line 530 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvas::UpdateTime ( ) [virtual, inherited]

sets the internal time param, by default based on realtime wall clock

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 186 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::OpenGLCanvas::realtimeAnimation, TARGET_FPS, BIAS::OpenGLCanvasBase::time, and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvas::OnIdle().

bool ImageCanvasGLBase::ValidTexobj ( const ImgObjGL & t ) const

Definition at line 113 of file ImageCanvasGLBase.cpp.

References BIASERR, BIAS::ImgObjGL::heightBrutto, BIAS::ImgObjGL::id, BIAS::ImageBase::IsPowerOfTwoSize(), BIAS::ImgObjGL::target, and BIAS::ImgObjGL::widthBrutto.

Referenced by Set().

Member Data Documentation

GLenum BIAS::OpenGLCanvas::_polygonmodeGL [protected, inherited]

Definition at line 142 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled [static, inherited]

Definition at line 343 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvas::UpdateTime().

unsigned long BIAS::OpenGLCanvasBase::framecount_ [protected, inherited]

Definition at line 348 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::OpenGLCanvasBase::SwapBuffers().

bool OpenGLCanvas::idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled [static, inherited]

Definition at line 127 of file OpenGLCanvas.hh.

bool BIAS::OpenGLCanvasBase::InitWithContextDone_ [protected, inherited]

Definition at line 354 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::InitWithContext().

unsigned int BIAS::OpenGLCanvasBase::instance_ [protected, inherited]

Definition at line 356 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::ScreenShot().

unsigned int OpenGLCanvasBase::instancesTotalNo_ = 0 [static, protected, inherited]

Definition at line 357 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::OpenGLCanvasBase().

BIAS::Vector2<float> BIAS::ImageCanvasGLBase::InterestPoint [protected]

Definition at line 137 of file ImageCanvasGLBase.hh.

Referenced by InitMembers().

std::string BIAS::ImageCanvasGLBase::name [protected]

Definition at line 134 of file ImageCanvasGLBase.hh.

BIAS::DrawTextGL* BIAS::OpenGLCanvasBase::p_font [protected, inherited]

Definition at line 365 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and BIAS::OpenGLCanvasBase::InitWithContext().

wxFrame* BIAS::OpenGLCanvasBase::p_ownerframe [protected, inherited]

Definition at line 351 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetOwnerframe(), BIAS::OpenGLCanvasBase::OpenGLCanvasBase(), BIAS::OpenGLCanvasBase::SetOwnerframe(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

CameraViewController* BIAS::OpenGLCanvas::p_viewCtrl_ [protected, inherited]

Definition at line 138 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::GetViewController(), and BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvas::realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation [static, inherited]

Definition at line 129 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::UpdateTime().

BIAS::RenderModeGL BIAS::OpenGLCanvasBase::rendermode [protected, inherited]

Definition at line 360 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

float BIAS::ImageCanvasGLBase::scalefactor [protected]

Definition at line 139 of file ImageCanvasGLBase.hh.

Referenced by InitMembers().

BIAS::ImgObjGL BIAS::ImageCanvasGLBase::texobj [protected]

Definition at line 131 of file ImageCanvasGLBase.hh.

Referenced by DisplayCalls(), EnableMipMapping(), GetTexId(), GetTexTarget(), and Set().

double OpenGLCanvasBase::time = 0.0 [static, inherited]

Definition at line 341 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::UpdateTime(), and BIAS::OpenGLCanvas::UpdateTime().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvasGLBase.hh
  • Gui/ImageCanvasGLBase.cpp
Generated on Wed Jun 21 19:08:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageConvert Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageConvert

BIAS::ImageConvert Class Reference
[ImageIO and Conversions]

class with static functions for converting all kinds of color formats and storage types More...

#include <Base/Image/ImageConvert.hh>

Inheritance diagram for BIAS::ImageConvert:

[legend]
Collaboration diagram for BIAS::ImageConvert:

[legend]
List of all members.

Public Member Functions

template<>
int | BGRAToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | BGRToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | DVToRGB_ (const Image< unsigned char > &source, Image< unsigned char > &dest, unsigned char quality)
template<>
BIASImageBase_EXPORT int | RGBTohsL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
BIASImageBase_EXPORT int | RGBTohsL_ (Image< int > &source, Image< int > &dest)
template<>
int | RGBToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | RGBToHSL_ (Image< float > &source, Image< float > &dest)
template<>
int | RGBToHSV_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | RGBToHSV_ (Image< float > &source, Image< float > &dest)

Static Public Member Functions

template<class StorageType>
static int | BayerToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
added border calculation, woelk evers, woelk
template<class StorageType>
static int | BIAS2ipl (const Image< StorageType > &source, IplImage *&dest)
Returns a new, separate IplImage for use with OpenCV created rom teh source BIAS Image.
static int | Convert (BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false)
main general function, calls desired specialized functions, always initializes the destImage(if not source==dest)
static int | ConvertST (const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST)
ask Felix or Friso
template<class StorageType>
static int | DVToRGB_ (const Image< StorageType > &source, Image< StorageType > &dest, unsigned char quality=4)
Can specify speed/quality trade off 0 : monochrome , DC coeffs only 1 : monochrome , AC 1 coeffs 2 : color , DC coeffs only 3 : color , AC 1 coeffs 4 : color, AC 2 coeffs (slowest but best quality).
template<class StorageType>
static BIASImageBase_EXPORT
int 		FromInterleaved (Image< StorageType > &source, Image< StorageType > &Image1, Image< StorageType > &Image2, Image< StorageType > &Image3)
extracts color planes to argument images without changing source.
template<class StorageType>
static BIASImageBase_EXPORT
int 		IP_ToGrey (Image< StorageType > &img)
In place conversion to gray image.
template<class StorageType>
static int | Ipl2BIAS (IplImage *source, Image< StorageType > &dest)
Takes the image information and data of an existing IplImage and builds a Image.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToGrey (const Image< StorageType > &source, Image< StorageType > &dest)
Create a grey converted copy of source image in this.
static int | ToGrey (const ImageBase &source, ImageBase &dest)
wrapper for the templated function below
template<class StorageType>
static BIASImageBase_EXPORT
int 		TohsL (Image< StorageType > &source, Image< StorageType > &dest)
create a hsL converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToHSL (Image< StorageType > &source, Image< StorageType > &dest)
create a HSL converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToHSV (Image< StorageType > &source, Image< StorageType > &dest)
create a HSV converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToInterleaved (Image< StorageType > &source, Image< StorageType > &dest)
Takes the source image, and build an interleaved version.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToInterleavedRGB (Image< StorageType > &red, Image< StorageType > &green, Image< StorageType > &blue, Image< StorageType > &dest)
Takes the three channels an compose one interleaved RGB image.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToPlanar (Image< StorageType > &source, Image< StorageType > &dest)
Converts the existing image to an planar version,.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToRGB (Image< StorageType > &source, Image< StorageType > &dest)
Create a RGB converted copy of source image in this.

Static Protected Member Functions

template<class StorageType>
static int | BayerToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
interpolates, better than above
template<class StorageType>
static int | BayerToRGBSlow_ (Image< StorageType > &source, Image< StorageType > &dest)
this is the right way, green interpoaltion is mostly done out of two values no visible difference to fast calculation as used above
template<class StorageType>
static int | BGRAToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static BIASImageBase_EXPORT
int 		BGRAToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | BGRToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | BGRToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
static int | FloatToUC_ (const ImageBase &source, ImageBase &dest)
template<class StorageType>
static int | FromInterleavedRGB_ (Image< StorageType > &source, Image< StorageType > &R, Image< StorageType > &G, Image< StorageType > &B)
template<class StorageType>
static int | FromInterleavedYUYV422_ (Image< StorageType > &source, Image< StorageType > &Y, Image< StorageType > &U, Image< StorageType > &V)
template<class StorageType>
static int | GreyToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | HSLToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
just copies the L channel
template<class StorageType>
static int | IP_RGBToGrey_ (Image< StorageType > &img)
template<class StorageType>
static int | IP_YUV422ToGrey_ (Image< StorageType > &img)
template<class StorageType>
static BIASImageBase_EXPORT
int 		RGBAToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static BIASImageBase_EXPORT
int 		RGBTohsL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToHSV_ (Image< StorageType > &source, Image< StorageType > &dest)
so far only implemented for StorageType=float
template<class StorageType>
static int | ToInterleavedRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToInterleavedYUYV422_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToPlanarRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToPlanarYUYV422_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV420PToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV420PToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV422ToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV422ToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)

Static Protected Attributes

static dv_decoder_t * | DVDecoder_ = NULL

Private Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Private Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Private Attributes

long int | _liDebugLevel

Static Private Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

class | ImageBase

Detailed Description

class with static functions for converting all kinds of color formats and storage types

As all fucntions are static they have to be called by eg. ImageConvert::Convert() and not with an object.

Author:
Daniel Grest, Nov. 2002

Definition at line 55 of file ImageConvert.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
int BIAS::ImageConvert::BayerToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

interpolates, better than above

Author:
woelk 03 2003

Definition at line 1091 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), R, and StorageType.

template<class StorageType>
int BIAS::ImageConvert::BayerToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

added border calculation, woelk evers, woelk

Definition at line 1385 of file ImageConvert.cpp.

References BIASASSERT, BIASGDOUT, BIAS::ImageBase::GetColorModel(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::BayerToRGBSlow_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

this is the right way, green interpoaltion is mostly done out of two values no visible difference to fast calculation as used above

Author:
woelk 03 2003

Definition at line 1708 of file ImageConvert.cpp.

References BIASGDOUT, D1, D2, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), BIAS::ImageBase::SetROI(), and StorageType.

template<>
int BIAS::ImageConvert::BGRAToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) |

Definition at line 477 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_BGRA.

template<class StorageType>
int BIAS::ImageConvert::BGRAToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 463 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by ToHSL().

template<class StorageType>
int BIAS::ImageConvert::BGRAToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 863 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<>
int BIAS::ImageConvert::BGRToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) |

Definition at line 348 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_BGR.

template<class StorageType>
int BIAS::ImageConvert::BGRToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 334 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by ToHSL().

template<class StorageType>
int BIAS::ImageConvert::BGRToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 813 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int ImageConvert::BIAS2ipl | ( | const Image< StorageType > & | source,
 |  | IplImage *& | dest
 | ) | [static]

Returns a new, separate IplImage for use with OpenCV created rom teh source BIAS Image.

The dest has to be a call by reference "*&" because the pointer itself is changed due to new (JW). The colorChannel order is swapped because OpenCv used BGR - which may be inefficient. See WrapBias2Ipl class, too (jw).

Returns:
newly created IplImage
Todo:
ROIs are not yet kept, when converted to IplImages
Author:
Ingo Thomsen 04.05.2002, Jan Woetzel 2005

Definition at line 2081 of file ImageConvert.cpp.

References act, BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetSize(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and StorageType.

int ImageConvert::Convert | ( | BIAS::ImageBase & | source,
 |  | BIAS::ImageBase & | dest,
 |  | enum BIAS::ImageBase::EColorModel | targetColorModel,
 |  | bool | bPlanar = false
 | ) | [static]

main general function, calls desired specialized functions, always initializes the destImage(if not source==dest)

Author:
Daniel Grest, Nov. 2002

Definition at line 132 of file ImageConvert.cpp.

References BIASERR, CALLFUNC, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), IP_ToGrey(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, BIAS::ImageBase::StealImage(), and ToInterleaved().

Referenced by BIAS::ImageConvertThreaded::ConvertThread_(), BIAS::GuiBase::ConvertToUC_(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageConvert::ConvertST | ( | const BIAS::ImageBase & | source,
 |  | BIAS::ImageBase & | dest,
 |  | ImageBase::EStorageType | targetST
 | ) | [static]

ask Felix or Friso

Author:
Felix Woelk or Friso Evers

Definition at line 1884 of file ImageConvert.cpp.

References BIASERR, BUILD_IMAGE_CHAR, FloatToUC_(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), and BIAS::ImageBase::ST_int.

Referenced by BIAS::GuiBase::ConvertToUC_(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), main(), BIAS::Image< StorageType >::operator=(), BIAS::GuiBase::ShowImage(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<>
int BIAS::ImageConvert::DVToRGB_ | ( | const Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest,
 |  | unsigned char | quality
 | ) |

Definition at line 1028 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, DVDecoder_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class StorageType>
int BIAS::ImageConvert::DVToRGB_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest,
 |  | unsigned char | quality = 4
 | ) | [static]

Can specify speed/quality trade off 0 : monochrome , DC coeffs only 1 : monochrome , AC 1 coeffs 2 : color , DC coeffs only 3 : color , AC 1 coeffs 4 : color, AC 2 coeffs (slowest but best quality).

Definition at line 1019 of file ImageConvert.cpp.

References BIASERR.

int ImageConvert::FloatToUC_ | ( | const ImageBase & | source,
 |  | ImageBase & | dest
 | ) | [static, protected]

Definition at line 1867 of file ImageConvert.cpp.

References BIAS::ImageBase::GetImageData().

Referenced by ConvertST().

template<class StorageType>
int BIAS::ImageConvert::FromInterleaved | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | Image1,
 |  | Image< StorageType > & | Image2,
 |  | Image< StorageType > & | Image3
 | ) | [static]

extracts color planes to argument images without changing source.

So far only implemented for CM_YUYV422

Author:
Felix Woelk alpha (18/04/2002)

Definition at line 141 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, FromInterleavedRGB_(), FromInterleavedYUYV422_(), BIAS::ImageBase::IsEmpty(), and res.

template<class StorageType>
int BIAS::ImageConvert::FromInterleavedRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | R,
 |  | Image< StorageType > & | G,
 |  | Image< StorageType > & | B
 | ) | [static, protected]

Definition at line 171 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), and r.

Referenced by FromInterleaved().

template<class StorageType>
int BIAS::ImageConvert::FromInterleavedYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | Y,
 |  | Image< StorageType > & | U,
 |  | Image< StorageType > & | V
 | ) | [static, protected]

Definition at line 203 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

Referenced by FromInterleaved().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::ImageConvert::GreyToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 999 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::HSLToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

just copies the L channel

Author:
Daniel Grest

Definition at line 2036 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, and StorageType.

template<class StorageType>
int BIAS::ImageConvert::IP_RGBToGrey_ ( Image< StorageType > & img ) [static, protected]

Definition at line 616 of file ImageConvert.cpp.

References BIASERR, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, r, and StorageType.

Referenced by IP_ToGrey().

template<class StorageType>
int BIAS::ImageConvert::IP_ToGrey ( Image< StorageType > & img ) [static]

In place conversion to gray image.

No further memory is allocated, because only the the first part of the existing image is used.

Author:
Felix Woelk

Definition at line 575 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_YUYV422, D_CONVERT, BIAS::ImageBase::GetColorModel(), IP_RGBToGrey_(), IP_YUV422ToGrey_(), and res.

Referenced by Convert().

template<class StorageType>
int BIAS::ImageConvert::IP_YUV422ToGrey_ ( Image< StorageType > & img ) [static, protected]

Definition at line 670 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, and StorageType.

Referenced by IP_ToGrey().

template<class StorageType>
int ImageConvert::Ipl2BIAS | ( | IplImage * | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

Takes the image information and data of an existing IplImage and builds a Image.

The existing data is discarded.

Author:
Ingo Thomsen
Date:
04.17.2002
Returns:
-1 in case of failure
Parameters:
image The IplImage to be transfered untested
Todo:
Make it work for colored images

Make it work for ROIs

Definition at line 2179 of file ImageConvert.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetSize(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and StorageType.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
int BIAS::ImageConvert::RGBAToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 844 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::RGBToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 469 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, r, and StorageType.

template<>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) |

Definition at line 678 of file ToHSL.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< int > & | source,
 |  | Image< int > & | dest
 | ) |

Definition at line 602 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_RGB.

template<>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) |

Definition at line 219 of file ToHSL.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< float > & | source,
 |  | Image< float > & | dest
 | ) |

Definition at line 86 of file ToHSL.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), and R.

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 588 of file ToHSL.cpp.

References BIASERR, BIASImageBase_EXPORT, and BIAS::ImageBase::GetStorageType().

template<class StorageType>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 74 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by ToHSL().

template<>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) |

Definition at line 225 of file ToHSV.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< float > & | source,
 |  | Image< float > & | dest
 | ) |

Definition at line 75 of file ToHSV.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetPixelCount(), and R.

template<class StorageType>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

so far only implemented for StorageType=float

Definition at line 66 of file ToHSV.cpp.

References BIASERR.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
int BIAS::ImageConvert::ToGrey | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

Create a grey converted copy of source image in this.

Release() and Init() are called if necessary.

Author:
Felix Woelk

Definition at line 361 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Release(), and res.

int BIAS::ImageConvert::ToGrey | ( | const ImageBase & | source,
 |  | ImageBase & | dest
 | ) | [static]

wrapper for the templated function below

Author:
woelk 02/2006

Definition at line 435 of file ImageConvert.cpp.

References BIASASSERT, BIAS::ImageBase::GetStorageType(), res, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StealImage().

Referenced by BIAS::VideoServer::ProcessOneImage().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::TohsL | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

create a hsL converted copy of source image in this Release() and Init() are called if necessary.

only for unsigned char similar to HSL but in euclidean coordinates for the CNCC

Author:
Daniel Grest, June 2003 tested for unsigned char interleaved

Definition at line 557 of file ToHSL.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToHSL | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

create a HSL converted copy of source image in this Release() and Init() are called if necessary.

only for float and unsigned char

Author:
Daniel Grest, April 2003 tested for unsigned char interleaved

Definition at line 35 of file ToHSL.cpp.

References BGRAToHSL_(), BGRToHSL_(), BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, RGBToHSL_(), and BIAS::ImageBase::SetColorModel().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToHSV | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

create a HSV converted copy of source image in this Release() and Init() are called if necessary.

HSV space is implemented as a cylinder not as a cone! only for float and unsigned char

Author:
Felix Woelk partially tested

Definition at line 35 of file ToHSV.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToInterleaved | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

Takes the source image, and build an interleaved version.

Author:
Ingo Thomsen
Date:
11.06.2002 tested
Todo:
make it work for yuv

Definition at line 33 of file ToInterleaved.cpp.

References BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetColorModel(), and ToInterleavedRGB_().

Referenced by Convert().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedRGB | ( | Image< StorageType > & | red,
 |  | Image< StorageType > & | green,
 |  | Image< StorageType > & | blue,
 |  | Image< StorageType > & | dest
 | ) | [static]

Takes the three channels an compose one interleaved RGB image.

Definition at line 61 of file ToInterleaved.cpp.

References BIASERR, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 109 of file ToInterleaved.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetColorModel(), and StorageType.

Referenced by ToInterleaved().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 100 of file ToInterleaved.cpp.

References BIASERR.

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToPlanar | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

Converts the existing image to an planar version,.

Author:
Ingo Thomsen
Date:
03.04.2002 none case CM_YUYV422 not yet tested

Definition at line 33 of file ToPlanar.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), res, BIAS::ImageBase::SamePixelAndChannelCount(), ToPlanarRGB_(), and ToPlanarYUYV422_().

template<class StorageType>
int BIAS::ImageConvert::ToPlanarRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 70 of file ToPlanar.cpp.

References BIASGDOUT, D_MI_TOPLANAR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), and StorageType.

Referenced by ToPlanar().

template<class StorageType>
int BIAS::ImageConvert::ToPlanarYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 107 of file ToPlanar.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by ToPlanar().

template<class StorageType>
int BIAS::ImageConvert::ToRGB | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static]

Create a RGB converted copy of source image in this.

Release() and Init() are called if necessary.

Author:
Felix Woelk
Examples:
convertRAW.cpp.

Definition at line 719 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), and res.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), BIAS::VideoServer::ProcessOneImage(), and BIAS::VideoSource::SoftwareWhiteBalance().

template<class StorageType>
int BIAS::ImageConvert::YUV420PToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 1848 of file ImageConvert.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV420PToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 1806 of file ImageConvert.cpp.

References BIAS::Image< StorageType >::GetImageData(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV422ToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 522 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, D_MI_CONVGREY, BIAS::Image< StorageType >::GetImageData(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV422ToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected]

Definition at line 883 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), and StorageType.

Friends And Related Function Documentation

friend class ImageBase [friend]

Definition at line 56 of file ImageConvert.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

dv_decoder_t * ImageConvert::DVDecoder_ = NULL [static, protected]

Definition at line 395 of file ImageConvert.hh.

Referenced by DVToRGB_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Base/Image/ImageConvert.hh
  • Base/Image/ImageConvert.cpp
  • Base/Image/ToHSL.cpp
  • Base/Image/ToHSV.cpp
  • Base/Image/ToInterleaved.cpp
  • Base/Image/ToPlanar.cpp
Generated on Wed Jun 21 19:08:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageConvertThreaded Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageConvertThreaded

BIAS::ImageConvertThreaded Class Reference

#include <Base/Image/ImageConvertThreaded.hh>

Inheritance diagram for BIAS::ImageConvertThreaded:

[legend]
Collaboration diagram for BIAS::ImageConvertThreaded:

[legend]
List of all members.

Public Member Functions

template<>
int | BGRAToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | BGRToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | DVToRGB_ (const Image< unsigned char > &source, Image< unsigned char > &dest, unsigned char quality)
ImageConvertThreaded ()
template<>
BIASImageBase_EXPORT int | RGBTohsL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
BIASImageBase_EXPORT int | RGBTohsL_ (Image< int > &source, Image< int > &dest)
template<>
int | RGBToHSL_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | RGBToHSL_ (Image< float > &source, Image< float > &dest)
template<>
int | RGBToHSV_ (Image< unsigned char > &source, Image< unsigned char > &dest)
template<>
int | RGBToHSV_ (Image< float > &source, Image< float > &dest)
~ImageConvertThreaded ()

Static Public Member Functions

template<class StorageType>
static int | BayerToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
added border calculation, woelk evers, woelk
template<class StorageType>
static int | BIAS2ipl (const Image< StorageType > &source, IplImage *&dest)
Returns a new, separate IplImage for use with OpenCV created rom teh source BIAS Image.
static int | Convert (BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false)
main general function, calls desired specialized functions, always initializes the destImage(if not source==dest)
static int | ConvertST (const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST)
ask Felix or Friso
static int | ConvertThreaded (BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false, const int num_threads=2)
template<class StorageType>
static int | DVToRGB_ (const Image< StorageType > &source, Image< StorageType > &dest, unsigned char quality=4)
Can specify speed/quality trade off 0 : monochrome , DC coeffs only 1 : monochrome , AC 1 coeffs 2 : color , DC coeffs only 3 : color , AC 1 coeffs 4 : color, AC 2 coeffs (slowest but best quality).
template<class StorageType>
static BIASImageBase_EXPORT
int 		FromInterleaved (Image< StorageType > &source, Image< StorageType > &Image1, Image< StorageType > &Image2, Image< StorageType > &Image3)
extracts color planes to argument images without changing source.
template<class StorageType>
static BIASImageBase_EXPORT
int 		IP_ToGrey (Image< StorageType > &img)
In place conversion to gray image.
template<class StorageType>
static int | Ipl2BIAS (IplImage *source, Image< StorageType > &dest)
Takes the image information and data of an existing IplImage and builds a Image.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToGrey (const Image< StorageType > &source, Image< StorageType > &dest)
Create a grey converted copy of source image in this.
static int | ToGrey (const ImageBase &source, ImageBase &dest)
wrapper for the templated function below
template<class StorageType>
static BIASImageBase_EXPORT
int 		TohsL (Image< StorageType > &source, Image< StorageType > &dest)
create a hsL converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToHSL (Image< StorageType > &source, Image< StorageType > &dest)
create a HSL converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToHSV (Image< StorageType > &source, Image< StorageType > &dest)
create a HSV converted copy of source image in this Release() and Init() are called if necessary.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToInterleaved (Image< StorageType > &source, Image< StorageType > &dest)
Takes the source image, and build an interleaved version.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToInterleavedRGB (Image< StorageType > &red, Image< StorageType > &green, Image< StorageType > &blue, Image< StorageType > &dest)
Takes the three channels an compose one interleaved RGB image.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToPlanar (Image< StorageType > &source, Image< StorageType > &dest)
Converts the existing image to an planar version,.
template<class StorageType>
static BIASImageBase_EXPORT
int 		ToRGB (Image< StorageType > &source, Image< StorageType > &dest)
Create a RGB converted copy of source image in this.

Static Protected Member Functions

template<class StorageType>
static int | BayerToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
interpolates, better than above
template<class StorageType>
static int | BayerToRGBSlow_ (Image< StorageType > &source, Image< StorageType > &dest)
this is the right way, green interpoaltion is mostly done out of two values no visible difference to fast calculation as used above
template<class StorageType>
static int | BGRAToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static BIASImageBase_EXPORT
int 		BGRAToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | BGRToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | BGRToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
static void * | ConvertThread_ (void *arg)
static int | FloatToUC_ (const ImageBase &source, ImageBase &dest)
template<class StorageType>
static int | FromInterleavedRGB_ (Image< StorageType > &source, Image< StorageType > &R, Image< StorageType > &G, Image< StorageType > &B)
template<class StorageType>
static int | FromInterleavedYUYV422_ (Image< StorageType > &source, Image< StorageType > &Y, Image< StorageType > &U, Image< StorageType > &V)
template<class StorageType>
static int | GreyToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | HSLToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
just copies the L channel
template<class StorageType>
static int | IP_RGBToGrey_ (Image< StorageType > &img)
template<class StorageType>
static int | IP_YUV422ToGrey_ (Image< StorageType > &img)
static void | MergeImage_ (const std::vector< ImageBase > &parts, ImageBase &dest)
template<class StorageType>
static BIASImageBase_EXPORT
int 		RGBAToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static BIASImageBase_EXPORT
int 		RGBTohsL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToHSL_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | RGBToHSV_ (Image< StorageType > &source, Image< StorageType > &dest)
so far only implemented for StorageType=float
static void | SplitImage_ (const ImageBase &source, const int num, std::vector< ImageBase > &parts)
template<class StorageType>
static int | ToInterleavedRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToInterleavedYUYV422_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToPlanarRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | ToPlanarYUYV422_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV420PToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV420PToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV422ToGrey_ (const Image< StorageType > &source, Image< StorageType > &dest)
template<class StorageType>
static int | YUV422ToRGB_ (Image< StorageType > &source, Image< StorageType > &dest)

Static Protected Attributes

static dv_decoder_t * | DVDecoder_ = NULL

Detailed Description

Definition at line 37 of file ImageConvertThreaded.hh.

Constructor & Destructor Documentation

BIAS::ImageConvertThreaded::ImageConvertThreaded ( )

Definition at line 18 of file ImageConvertThreaded.cpp.

BIAS::ImageConvertThreaded::~ImageConvertThreaded ( )

Definition at line 23 of file ImageConvertThreaded.cpp.

Member Function Documentation

template<class StorageType>
int BIAS::ImageConvert::BayerToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

interpolates, better than above

Author:
woelk 03 2003

Definition at line 1091 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), R, and StorageType.

template<class StorageType>
int BIAS::ImageConvert::BayerToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

added border calculation, woelk evers, woelk

Definition at line 1385 of file ImageConvert.cpp.

References BIASASSERT, BIASGDOUT, BIAS::ImageBase::GetColorModel(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::BayerToRGBSlow_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

this is the right way, green interpoaltion is mostly done out of two values no visible difference to fast calculation as used above

Author:
woelk 03 2003

Definition at line 1708 of file ImageConvert.cpp.

References BIASGDOUT, D1, D2, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::GetWidthStep(), BIAS::ImageBase::SetROI(), and StorageType.

template<>
int BIAS::ImageConvert::BGRAToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) | [inherited]

Definition at line 477 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_BGRA.

template<class StorageType>
int BIAS::ImageConvert::BGRAToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 463 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by BIAS::ImageConvert::ToHSL().

template<class StorageType>
int BIAS::ImageConvert::BGRAToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 863 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<>
int BIAS::ImageConvert::BGRToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) | [inherited]

Definition at line 348 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_BGR.

template<class StorageType>
int BIAS::ImageConvert::BGRToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 334 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by BIAS::ImageConvert::ToHSL().

template<class StorageType>
int BIAS::ImageConvert::BGRToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 813 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int ImageConvert::BIAS2ipl | ( | const Image< StorageType > & | source,
 |  | IplImage *& | dest
 | ) | [static, inherited]

Returns a new, separate IplImage for use with OpenCV created rom teh source BIAS Image.

The dest has to be a call by reference "*&" because the pointer itself is changed due to new (JW). The colorChannel order is swapped because OpenCv used BGR - which may be inefficient. See WrapBias2Ipl class, too (jw).

Returns:
newly created IplImage
Todo:
ROIs are not yet kept, when converted to IplImages
Author:
Ingo Thomsen 04.05.2002, Jan Woetzel 2005

Definition at line 2081 of file ImageConvert.cpp.

References act, BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetSize(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), and StorageType.

int ImageConvert::Convert | ( | BIAS::ImageBase & | source,
 |  | BIAS::ImageBase & | dest,
 |  | enum BIAS::ImageBase::EColorModel | targetColorModel,
 |  | bool | bPlanar = false
 | ) | [static, inherited]

main general function, calls desired specialized functions, always initializes the destImage(if not source==dest)

Author:
Daniel Grest, Nov. 2002

Definition at line 132 of file ImageConvert.cpp.

References BIASERR, CALLFUNC, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetStorageType(), BIAS::ImageConvert::IP_ToGrey(), BIAS::ImageBase::IsPlanar(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, BIAS::ImageBase::StealImage(), and BIAS::ImageConvert::ToInterleaved().

Referenced by ConvertThread_(), BIAS::GuiBase::ConvertToUC_(), BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::GuiBase::ShowImage(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

int ImageConvert::ConvertST | ( | const BIAS::ImageBase & | source,
 |  | BIAS::ImageBase & | dest,
 |  | ImageBase::EStorageType | targetST
 | ) | [static, inherited]

ask Felix or Friso

Author:
Felix Woelk or Friso Evers

Definition at line 1884 of file ImageConvert.cpp.

References BIASERR, BUILD_IMAGE_CHAR, BIAS::ImageConvert::FloatToUC_(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), and BIAS::ImageBase::ST_int.

Referenced by BIAS::GuiBase::ConvertToUC_(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::DistTransform< InputStorageType, OutputStorageType >::Filter(), main(), BIAS::Image< StorageType >::operator=(), BIAS::GuiBase::ShowImage(), and BIAS::ScaledImageCanvas::UpdateScaleOffset().

void * BIAS::ImageConvertThreaded::ConvertThread_ ( void * arg ) [static, protected]

Definition at line 84 of file ImageConvertThreaded.cpp.

References ThreadArg__::colormodel, BIAS::ImageConvert::Convert(), ThreadArg__::dst, ThreadArg__::planar, res, and ThreadArg__::src.

Referenced by ConvertThreaded().

int BIAS::ImageConvertThreaded::ConvertThreaded | ( | BIAS::ImageBase & | source,
 |  | BIAS::ImageBase & | dest,
 |  | enum BIAS::ImageBase::EColorModel | targetColorModel,
 |  | bool | bPlanar = false,
 |  | const int | num_threads = 2
 | ) | [static]

Definition at line 34 of file ImageConvertThreaded.cpp.

References BEXCEPTION, ConvertThread_(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), res, BIAS::ImageBase::SamePixelAndChannelCount(), and SplitImage_().

template<>
int BIAS::ImageConvert::DVToRGB_ | ( | const Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest,
 |  | unsigned char | quality
 | ) | [inherited]

Definition at line 1028 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, BIAS::ImageConvert::DVDecoder_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class StorageType>
int BIAS::ImageConvert::DVToRGB_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest,
 |  | unsigned char | quality = 4
 | ) | [static, inherited]

Can specify speed/quality trade off 0 : monochrome , DC coeffs only 1 : monochrome , AC 1 coeffs 2 : color , DC coeffs only 3 : color , AC 1 coeffs 4 : color, AC 2 coeffs (slowest but best quality).

Definition at line 1019 of file ImageConvert.cpp.

References BIASERR.

int ImageConvert::FloatToUC_ | ( | const ImageBase & | source,
 |  | ImageBase & | dest
 | ) | [static, protected, inherited]

Definition at line 1867 of file ImageConvert.cpp.

References BIAS::ImageBase::GetImageData().

Referenced by BIAS::ImageConvert::ConvertST().

template<class StorageType>
int BIAS::ImageConvert::FromInterleaved | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | Image1,
 |  | Image< StorageType > & | Image2,
 |  | Image< StorageType > & | Image3
 | ) | [static, inherited]

extracts color planes to argument images without changing source.

So far only implemented for CM_YUYV422

Author:
Felix Woelk alpha (18/04/2002)

Definition at line 141 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::FromInterleavedRGB_(), BIAS::ImageConvert::FromInterleavedYUYV422_(), BIAS::ImageBase::IsEmpty(), and res.

template<class StorageType>
int BIAS::ImageConvert::FromInterleavedRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | R,
 |  | Image< StorageType > & | G,
 |  | Image< StorageType > & | B
 | ) | [static, protected, inherited]

Definition at line 171 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), and r.

Referenced by BIAS::ImageConvert::FromInterleaved().

template<class StorageType>
int BIAS::ImageConvert::FromInterleavedYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | Y,
 |  | Image< StorageType > & | U,
 |  | Image< StorageType > & | V
 | ) | [static, protected, inherited]

Definition at line 203 of file ToPlanar.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::ImageConvert::FromInterleaved().

template<class StorageType>
int BIAS::ImageConvert::GreyToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 999 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::HSLToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

just copies the L channel

Author:
Daniel Grest

Definition at line 2036 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, and StorageType.

template<class StorageType>
int BIAS::ImageConvert::IP_RGBToGrey_ ( Image< StorageType > & img ) [static, protected, inherited]

Definition at line 616 of file ImageConvert.cpp.

References BIASERR, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, r, and StorageType.

Referenced by BIAS::ImageConvert::IP_ToGrey().

template<class StorageType>
int BIAS::ImageConvert::IP_ToGrey ( Image< StorageType > & img ) [static, inherited]

In place conversion to gray image.

No further memory is allocated, because only the the first part of the existing image is used.

Author:
Felix Woelk

Definition at line 575 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_YUYV422, D_CONVERT, BIAS::ImageBase::GetColorModel(), BIAS::ImageConvert::IP_RGBToGrey_(), BIAS::ImageConvert::IP_YUV422ToGrey_(), and res.

Referenced by BIAS::ImageConvert::Convert().

template<class StorageType>
int BIAS::ImageConvert::IP_YUV422ToGrey_ ( Image< StorageType > & img ) [static, protected, inherited]

Definition at line 670 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, and StorageType.

Referenced by BIAS::ImageConvert::IP_ToGrey().

template<class StorageType>
int ImageConvert::Ipl2BIAS | ( | IplImage * | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Takes the image information and data of an existing IplImage and builds a Image.

The existing data is discarded.

Author:
Ingo Thomsen
Date:
04.17.2002
Returns:
-1 in case of failure
Parameters:
image The IplImage to be transfered untested
Todo:
Make it work for colored images

Make it work for ROIs

Definition at line 2179 of file ImageConvert.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetSize(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and StorageType.

void BIAS::ImageConvertThreaded::MergeImage_ | ( | const std::vector< ImageBase > & | parts,
 |  | ImageBase & | dest
 | ) | [static, protected]

Definition at line 121 of file ImageConvertThreaded.cpp.

References BEXCEPTION, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::Paste2ROI(), and BIAS::ROI::SetCorners().

template<class StorageType>
int BIAS::ImageConvert::RGBAToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 844 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::RGBToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 469 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPlanar(), p, r, and StorageType.

template<>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) | [inherited]

Definition at line 678 of file ToHSL.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< int > & | source,
 |  | Image< int > & | dest
 | ) | [inherited]

Definition at line 602 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::CM_RGB.

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::RGBTohsL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 588 of file ToHSL.cpp.

References BIASERR, BIASImageBase_EXPORT, and BIAS::ImageBase::GetStorageType().

template<>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) | [inherited]

Definition at line 219 of file ToHSL.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< float > & | source,
 |  | Image< float > & | dest
 | ) | [inherited]

Definition at line 86 of file ToHSL.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), and R.

template<class StorageType>
int BIAS::ImageConvert::RGBToHSL_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 74 of file ToHSL.cpp.

References BIASERR, and BIAS::ImageBase::GetStorageType().

Referenced by BIAS::ImageConvert::ToHSL().

template<>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< unsigned char > & | source,
 |  | Image< unsigned char > & | dest
 | ) | [inherited]

Definition at line 225 of file ToHSV.cpp.

References BIASERR, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::GetColorModel().

template<>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< float > & | source,
 |  | Image< float > & | dest
 | ) | [inherited]

Definition at line 75 of file ToHSV.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetPixelCount(), and R.

template<class StorageType>
int BIAS::ImageConvert::RGBToHSV_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

so far only implemented for StorageType=float

Definition at line 66 of file ToHSV.cpp.

References BIASERR.

void BIAS::ImageConvertThreaded::SplitImage_ | ( | const ImageBase & | source,
 |  | const int | num,
 |  | std::vector< ImageBase > & | parts
 | ) | [static, protected]

Definition at line 94 of file ImageConvertThreaded.cpp.

Referenced by ConvertThreaded().

template<class StorageType>
int BIAS::ImageConvert::ToGrey | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Create a grey converted copy of source image in this.

Release() and Init() are called if necessary.

Author:
Felix Woelk

Definition at line 361 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Release(), and res.

int BIAS::ImageConvert::ToGrey | ( | const ImageBase & | source,
 |  | ImageBase & | dest
 | ) | [static, inherited]

wrapper for the templated function below

Author:
woelk 02/2006

Definition at line 435 of file ImageConvert.cpp.

References BIASASSERT, BIAS::ImageBase::GetStorageType(), res, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::StealImage().

Referenced by BIAS::VideoServer::ProcessOneImage().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::TohsL | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

create a hsL converted copy of source image in this Release() and Init() are called if necessary.

only for unsigned char similar to HSL but in euclidean coordinates for the CNCC

Author:
Daniel Grest, June 2003 tested for unsigned char interleaved

Definition at line 557 of file ToHSL.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToHSL | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

create a HSL converted copy of source image in this Release() and Init() are called if necessary.

only for float and unsigned char

Author:
Daniel Grest, April 2003 tested for unsigned char interleaved

Definition at line 35 of file ToHSL.cpp.

References BIAS::ImageConvert::BGRAToHSL_(), BIAS::ImageConvert::BGRToHSL_(), BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, BIAS::ImageConvert::RGBToHSL_(), and BIAS::ImageBase::SetColorModel().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToHSV | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

create a HSV converted copy of source image in this Release() and Init() are called if necessary.

HSV space is implemented as a cylinder not as a cone! only for float and unsigned char

Author:
Felix Woelk partially tested

Definition at line 35 of file ToHSV.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToInterleaved | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Takes the source image, and build an interleaved version.

Author:
Ingo Thomsen
Date:
11.06.2002 tested
Todo:
make it work for yuv

Definition at line 33 of file ToInterleaved.cpp.

References BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetColorModel(), and BIAS::ImageConvert::ToInterleavedRGB_().

Referenced by BIAS::ImageConvert::Convert().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedRGB | ( | Image< StorageType > & | red,
 |  | Image< StorageType > & | green,
 |  | Image< StorageType > & | blue,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Takes the three channels an compose one interleaved RGB image.

Definition at line 61 of file ToInterleaved.cpp.

References BIASERR, and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 109 of file ToInterleaved.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetColorModel(), and StorageType.

Referenced by BIAS::ImageConvert::ToInterleaved().

template<class StorageType>
int BIAS::ImageConvert::ToInterleavedYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 100 of file ToInterleaved.cpp.

References BIASERR.

template<class StorageType>
BIASImageBase_EXPORT int BIAS::ImageConvert::ToPlanar | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Converts the existing image to an planar version,.

Author:
Ingo Thomsen
Date:
03.04.2002 none case CM_YUYV422 not yet tested

Definition at line 33 of file ToPlanar.cpp.

References BIAS_DEBUG, BIASERR, BIAS::ImageBase::CM_YUYV422, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), res, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ImageConvert::ToPlanarRGB_(), and BIAS::ImageConvert::ToPlanarYUYV422_().

template<class StorageType>
int BIAS::ImageConvert::ToPlanarRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 70 of file ToPlanar.cpp.

References BIASGDOUT, D_MI_TOPLANAR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::RedirectImageDataPointer(), BIAS::ImageBase::ReleaseImageDataPointer(), and StorageType.

Referenced by BIAS::ImageConvert::ToPlanar().

template<class StorageType>
int BIAS::ImageConvert::ToPlanarYUYV422_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 107 of file ToPlanar.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::RedirectImageDataPointer(), and BIAS::ImageBase::ReleaseImageDataPointer().

Referenced by BIAS::ImageConvert::ToPlanar().

template<class StorageType>
int BIAS::ImageConvert::ToRGB | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, inherited]

Create a RGB converted copy of source image in this.

Release() and Init() are called if necessary.

Author:
Felix Woelk
Examples:
convertRAW.cpp.

Definition at line 719 of file ImageConvert.cpp.

References BIASGDOUT, D_CONVERT, BIAS::Image< StorageType >::GetImageData(), and res.

Referenced by BIAS::ImageIO::ImportOpenEXR(), main(), BIAS::VideoServer::ProcessOneImage(), and BIAS::VideoSource::SoftwareWhiteBalance().

template<class StorageType>
int BIAS::ImageConvert::YUV420PToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 1848 of file ImageConvert.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV420PToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 1806 of file ImageConvert.cpp.

References BIAS::Image< StorageType >::GetImageData(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV422ToGrey_ | ( | const Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 522 of file ImageConvert.cpp.

References BIASERR, BIASGDOUT, D_CONVERT, D_MI_CONVGREY, BIAS::Image< StorageType >::GetImageData(), and StorageType.

template<class StorageType>
int BIAS::ImageConvert::YUV422ToRGB_ | ( | Image< StorageType > & | source,
 |  | Image< StorageType > & | dest
 | ) | [static, protected, inherited]

Definition at line 883 of file ImageConvert.cpp.

References BIASGDOUT, BIAS::Image< StorageType >::GetImageData(), and StorageType.

Member Data Documentation

dv_decoder_t * ImageConvert::DVDecoder_ = NULL [static, protected, inherited]

Definition at line 395 of file ImageConvert.hh.

Referenced by BIAS::ImageConvert::DVToRGB_().

The documentation for this class was generated from the following files:
  • Base/Image/ImageConvertThreaded.hh
  • Base/Image/ImageConvertThreaded.cpp
Generated on Wed Jun 21 19:08:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageDraw< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageDraw

BIAS::ImageDraw< StorageType > Class Template Reference
[Drawing]

drawing simple entities into the image like rectangles or lines More...

#include <Base/Image/ImageDraw.hh>

List of all members.

Public Member Functions

template<>
float | GetContrastValue (float t)
template<>
unsigned char | GetContrastValue (unsigned char t)

Static Public Member Functions

static int | Arrow (Image< StorageType > &im, const unsigned start[2], const unsigned end[2], const unsigned length, const unsigned width, const StorageType value[])
draws an arrow from start to end, the tips of the head are length pixel back on the line and width pixel away from the line
static void | Circle (BIAS::Image< StorageType > &dstImg, const int &centerX, const int &centerY, const int &radius=3, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int &thickness=1, const int &linetype=8, const int &shift=0)
OpenCV: Draws a circle.
static int | CircleCenter (Image< StorageType > &im, unsigned int CenterX, unsigned int CenterY, unsigned int Radius, const StorageType Value[]=NULL)
draws a circular line, either using Value or a good contrast value
static int | CircleCenterFilled (Image< StorageType > &im, unsigned int CenterX, unsigned int CenterY, unsigned int Radius, const StorageType Value[])
draws a filled circle using Value
static void | Ellipse (BIAS::Image< StorageType > &dstImg, const int &centerX, const int &centerY, const int &axesX, const int &axesY, const double &angle, const double &start_angle=0, const double &end_angle=360, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int &thickness=1, const int &linetype=8, const int &shift=0)
OpenCV: Draws simple or thick elliptic arc or fills ellipse sector angles are given in degree.
static int | Ellipse (Image< StorageType > &im, double center[2], double a[2], double b[2], const StorageType Value[])
draws an ellipse at center with half axes a and b
static StorageType | GetContrastValue (StorageType t)
class for Drawing in Images
static int | InterpolatedLine (Image< StorageType > &im, const int StartX, const int StartY, const int EndX, const int EndY, const StorageType Value[])
draws an interpolated line just a wrapper for the below
static int | InterpolatedLineGrey (Image< StorageType > &im, unsigned int coo[4], const StorageType Value)
static int | InterpolatedLineGrey (Image< StorageType > &im, const int StartX, const int StartY, const int EndX, const int EndY, const StorageType Value)
static void | Line (BIAS::Image< StorageType > &dstImg, const int &pt1X, const int &pt1Y, const int &pt2X, const int &pt2Y, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int thickness=1, const int linetype=8, const int shift=0)
OpenCV: Draws a line segment connecting two points.
static int | Line (Image< StorageType > &im, const double start[2], const double end[2], const StorageType value[])
Convenience wrapper, draws a line even if start or end point are not positioned in the image.
static int | Line (Image< StorageType > &im, unsigned int coo[4], const StorageType value[])
convenience wrapper
static int | Line (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY)
convenience wrapper
static int | Line (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value)
convenience wrapper
static int | Line (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value[])
convenience wrapper
static int | Line (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType color[], const float thickness)
JW:.
static int | Line (Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2])
decides which color to use
static int | Line (Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value)
uses value in every channel
static int | Line (Image< StorageType > &im, const int start[2], const int end[2], const StorageType value[])
differnet interface for the function above
static int | Line (Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value[])
Draws a line between the two points using the bresenham algorithm uses value[i] in channel i.
static int | LineGrey (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value)
convenience wrapper
static int | LineGrey (Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2])
faster algorithm for 1 channel images, decides which color to use
static int | LineGrey (Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value)
faster algorithm for 1 channel images
static void | Rectangle (BIAS::Image< StorageType > &dstImg, const int &pt1X, const int &pt1Y, const int &pt2X, const int &pt2Y, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int thickness=1, const int linetype=8, const int shift=0)
OpenCV: Draws a simple, thick or filled rectangle.
static int | RectangleCenter (Image< StorageType > &im, unsigned int coo[2], unsigned int size)
convenience wrapper
static int | RectangleCenter (Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size)
draws a rectangle of size around x and y, decides which color to use
static int | RectangleCenter (Image< StorageType > &im, unsigned int coo[2], unsigned int size, const StorageType value[])
convenience wrapper
static int | RectangleCenter (Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value[])
Draws the rectangle around X, Y with Size and Value[i] in channel i.
static int | RectangleCenterGrey (Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value)
fills the channels with value
static int | RectangleCenterGreyFill (Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value)
static int | RectangleCorners (Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy)
decides which color to use
static int | RectangleCorners (Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType value)
as above but fills all channels with value
static int | RectangleCorners (Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType value[])
Draws the rectangle defined by upper left and bottom right corner with value[i] in channel i.
static int | RectangleCornersGrey (Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType GreyValue)
faster for one channel images
static int | RectangleCornersGreyFill (Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType GreyValue)
faster for one channel images
static void | Text (BIAS::Image< StorageType > &dstImg, const std::string &message, const int &posX=0, const int &posY=20, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int fontface=CV_FONT_HERSHEY_PLAIN, const double hscale=1.0, const double vscale=1.0, const double shear=0, const int thickness=1, const int linetype=8)
OpenCV: Draw Text into image.

Detailed Description

template<class StorageType>
class BIAS::ImageDraw< StorageType >

drawing simple entities into the image like rectangles or lines

As all fucntions are static they have to be called by eg. ImageDraw::RectangleCenter() and not with an object.

Definition at line 50 of file ImageDraw.hh.

Member Function Documentation

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Arrow | ( | Image< StorageType > & | im,
 |  | const unsigned | start[2],
 |  | const unsigned | end[2],
 |  | const unsigned | length,
 |  | const unsigned | width,
 |  | const StorageType | value[]
 | ) | [static]

draws an arrow from start to end, the tips of the head are length pixel back on the line and width pixel away from the line

Author:
woelk 12/2003

Definition at line 974 of file ImageDraw.cpp.

References BIASABORT, BIASERR, BIAS::Bresenham::GetNext(), BIAS::Bresenham::Init(), and BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
void BIAS::ImageDraw< StorageType >::Circle | ( | BIAS::Image< StorageType > & | dstImg,
 |  | const int & | centerX,
 |  | const int & | centerY,
 |  | const int & | radius = 3,
 |  | const BIAS::Vector3< StorageType > & | colorRGB = Vector3< StorageType >(255, 255, 255),
 |  | const int & | thickness = 1,
 |  | const int & | linetype = 8,
 |  | const int & | shift = 0
 | ) | [static]

OpenCV: Draws a circle.

Author:
JW 2005

Definition at line 1246 of file ImageDraw.cpp.

References BIAS::WrapBias2Ipl::p_imgIpl.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::CircleCenter | ( | Image< StorageType > & | im,
 |  | unsigned int | CenterX,
 |  | unsigned int | CenterY,
 |  | unsigned int | Radius,
 |  | const StorageType | Value[] = NULL
 | ) | [static]

draws a circular line, either using Value or a good contrast value

Definition at line 883 of file ImageDraw.cpp.

References center, BIAS::ImageBase::GetChannelCount(), BIAS::ImageDraw< StorageType >::GetContrastValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BresenhamCircle::GetNext(), BIAS::ImageBase::GetWidth(), BIAS::BresenhamCircle::Init(), res, and StorageType.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::CircleCenterFilled | ( | Image< StorageType > & | im,
 |  | unsigned int | CenterX,
 |  | unsigned int | CenterY,
 |  | unsigned int | Radius,
 |  | const StorageType | Value[]
 | ) | [static]

draws a filled circle using Value

Definition at line 929 of file ImageDraw.cpp.

References center, BIAS::BresenhamCircleEighth::GetNext(), BIAS::BresenhamCircleEighth::Init(), BIAS::ImageDraw< StorageType >::Line(), and res.

template<class StorageType>
void BIAS::ImageDraw< StorageType >::Ellipse | ( | BIAS::Image< StorageType > & | dstImg,
 |  | const int & | centerX,
 |  | const int & | centerY,
 |  | const int & | axesX,
 |  | const int & | axesY,
 |  | const double & | angle,
 |  | const double & | start_angle = 0,
 |  | const double & | end_angle = 360,
 |  | const BIAS::Vector3< StorageType > & | colorRGB = Vector3< StorageType >(255, 255, 255),
 |  | const int & | thickness = 1,
 |  | const int & | linetype = 8,
 |  | const int & | shift = 0
 | ) | [static]

OpenCV: Draws simple or thick elliptic arc or fills ellipse sector angles are given in degree.

Author:
JW 2005

Definition at line 1317 of file ImageDraw.cpp.

References BIAS::WrapBias2Ipl::p_imgIpl.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Ellipse | ( | Image< StorageType > & | im,
 |  | double | center[2],
 |  | double | a[2],
 |  | double | b[2],
 |  | const StorageType | Value[]
 | ) | [static]

draws an ellipse at center with half axes a and b

Author:
woelk 05/2005

Definition at line 1081 of file ImageDraw.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), p, and StorageType.

template<>
float BIAS::ImageDraw< float >::GetContrastValue ( float t )

Definition at line 57 of file ImageDraw.cpp.

template<>
unsigned char BIAS::ImageDraw< unsigned char >::GetContrastValue ( unsigned char t )

Definition at line 51 of file ImageDraw.cpp.

template<class StorageType>
StorageType BIAS::ImageDraw< StorageType >::GetContrastValue ( StorageType t ) [static]

class for Drawing in Images

Author:
fw

Definition at line 43 of file ImageDraw.cpp.

References BIASERR, PRINTTYPE, and StorageType.

Referenced by BIAS::ImageDraw< StorageType >::CircleCenter(), and BIAS::ImageDraw< StorageType >::RectangleCorners().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::InterpolatedLine | ( | Image< StorageType > & | im,
 |  | const int | StartX,
 |  | const int | StartY,
 |  | const int | EndX,
 |  | const int | EndY,
 |  | const StorageType | Value[]
 | ) | [static]

draws an interpolated line just a wrapper for the below

Author:
Felix Woelk

Definition at line 792 of file ImageDraw.cpp.

References BIAS::ImageBase::GetChannelCount(), and BIAS::ImageDraw< StorageType >::InterpolatedLineGrey().

template<class StorageType>
static int BIAS::ImageDraw< StorageType >::InterpolatedLineGrey | ( | Image< StorageType > & | im,
 |  | unsigned int | coo[4],
 |  | const StorageType | Value
 | ) | [inline, static]

Definition at line 241 of file ImageDraw.hh.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::InterpolatedLineGrey | ( | Image< StorageType > & | im,
 |  | const int | StartX,
 |  | const int | StartY,
 |  | const int | EndX,
 |  | const int | EndY,
 |  | const StorageType | Value
 | ) | [static]

Definition at line 808 of file ImageDraw.cpp.

References BIAS::EightWaySymmetry< T >::DetermineLineType(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::EightWaySymmetry< T >::InverseTransform(), StorageType, BIAS::EightWaySymmetry< T >::Transform(), and type.

Referenced by BIAS::ImageDraw< StorageType >::InterpolatedLine().

template<class StorageType>
void BIAS::ImageDraw< StorageType >::Line | ( | BIAS::Image< StorageType > & | dstImg,
 |  | const int & | pt1X,
 |  | const int & | pt1Y,
 |  | const int & | pt2X,
 |  | const int & | pt2Y,
 |  | const BIAS::Vector3< StorageType > & | colorRGB = Vector3< StorageType >(255, 255, 255),
 |  | const int | thickness = 1,
 |  | const int | linetype = 8,
 |  | const int | shift = 0
 | ) | [static]

OpenCV: Draws a line segment connecting two points.

Author:
JW 2005

Definition at line 1269 of file ImageDraw.cpp.

References BIAS::WrapBias2Ipl::p_imgIpl.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const double | start[2],
 |  | const double | end[2],
 |  | const StorageType | value[]
 | ) | [static]

Convenience wrapper, draws a line even if start or end point are not positioned in the image.

untested so far

Author:
woelk 06/2005

Definition at line 622 of file ImageDraw.cpp.

References BIAS_DRAW_CROSS_PRODUCT, BIAS_DRAW_PRECISION, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
static int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | unsigned int | coo[4],
 |  | const StorageType | value[]
 | ) | [inline, static]

convenience wrapper

Definition at line 212 of file ImageDraw.hh.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | StartX,
 |  | const unsigned int | StartY,
 |  | const unsigned int | EndX,
 |  | const unsigned int | EndY
 | ) | [static]

convenience wrapper

Definition at line 505 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | StartX,
 |  | const unsigned int | StartY,
 |  | const unsigned int | EndX,
 |  | const unsigned int | EndY,
 |  | const StorageType | Value
 | ) | [static]

convenience wrapper

Definition at line 493 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | StartX,
 |  | const unsigned int | StartY,
 |  | const unsigned int | EndX,
 |  | const unsigned int | EndY,
 |  | const StorageType | Value[]
 | ) | [static]

convenience wrapper

Definition at line 480 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | StartX,
 |  | const unsigned int | StartY,
 |  | const unsigned int | EndX,
 |  | const unsigned int | EndY,
 |  | const StorageType | color[],
 |  | const float | thickness
 | ) | [static]

JW:.

Internally implemented as drawing multiple Bresenham lines, for now.

Bug:
This routine is a HACK and incorrect. A generela "solid fill by 4 given corners" algorithm has to be used or a Bresenham with eps=thckness/2.
Parameters:
Value | the line color.
thickness | of the line in pixel (perpendicualr to the direction).
Author:
Jan Woetzel 01/2005 DEPRECATED by JW 2005/08/09, replaced by OpenCV routine call.

Definition at line 1027 of file ImageDraw.cpp.

References BIASERR, BIAS::ImageDraw< StorageType >::Line(), BIAS::Vector2< T >::NormL2(), and BIAS::Vector2< T >::Set().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [static]

decides which color to use

Definition at line 416 of file ImageDraw.cpp.

References BIASABORT, and BIASERR.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const StorageType | value
 | ) | [static]

uses value in every channel

Definition at line 358 of file ImageDraw.cpp.

References BIASABORT, and BIASERR.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const int | start[2],
 |  | const int | end[2],
 |  | const StorageType | value[]
 | ) | [static]

differnet interface for the function above

Definition at line 300 of file ImageDraw.cpp.

References BIASASSERT, and BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::Line | ( | Image< StorageType > & | im,
 |  | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const StorageType | value[]
 | ) | [static]

Draws a line between the two points using the bresenham algorithm uses value[i] in channel i.

Definition at line 320 of file ImageDraw.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and StorageType.

Referenced by BIAS::ImageDraw< StorageType >::Arrow(), BIAS::ImageDraw< StorageType >::CircleCenterFilled(), and BIAS::ImageDraw< StorageType >::Line().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::LineGrey | ( | Image< StorageType > & | im,
 |  | const unsigned int | StartX,
 |  | const unsigned int | StartY,
 |  | const unsigned int | EndX,
 |  | const unsigned int | EndY,
 |  | const StorageType | Value
 | ) | [static]

convenience wrapper

Definition at line 518 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::LineGrey().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::LineGrey | ( | Image< StorageType > & | im,
 |  | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [static]

faster algorithm for 1 channel images, decides which color to use

Definition at line 447 of file ImageDraw.cpp.

References BIASABORT, and BIASERR.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::LineGrey | ( | Image< StorageType > & | im,
 |  | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const StorageType | value
 | ) | [static]

faster algorithm for 1 channel images

Definition at line 387 of file ImageDraw.cpp.

References BIASABORT, and BIASERR.

Referenced by BIAS::ImageDraw< StorageType >::LineGrey().

template<class StorageType>
void BIAS::ImageDraw< StorageType >::Rectangle | ( | BIAS::Image< StorageType > & | dstImg,
 |  | const int & | pt1X,
 |  | const int & | pt1Y,
 |  | const int & | pt2X,
 |  | const int & | pt2Y,
 |  | const BIAS::Vector3< StorageType > & | colorRGB = Vector3< StorageType >(255, 255, 255),
 |  | const int | thickness = 1,
 |  | const int | linetype = 8,
 |  | const int | shift = 0
 | ) | [static]

OpenCV: Draws a simple, thick or filled rectangle.

Author:
JW 2005 Jan Woetzel 2005

Definition at line 1293 of file ImageDraw.cpp.

References BIAS::WrapBias2Ipl::p_imgIpl.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCenter | ( | Image< StorageType > & | im,
 |  | unsigned int | coo[2],
 |  | unsigned int | size
 | ) | [static]

convenience wrapper

Definition at line 290 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::RectangleCenter().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCenter | ( | Image< StorageType > & | im,
 |  | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | size
 | ) | [static]

draws a rectangle of size around x and y, decides which color to use

Definition at line 278 of file ImageDraw.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCorners().

template<class StorageType>
static int BIAS::ImageDraw< StorageType >::RectangleCenter | ( | Image< StorageType > & | im,
 |  | unsigned int | coo[2],
 |  | unsigned int | size,
 |  | const StorageType | value[]
 | ) | [inline, static]

convenience wrapper

Definition at line 118 of file ImageDraw.hh.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCenter | ( | Image< StorageType > & | im,
 |  | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | size,
 |  | const StorageType | value[]
 | ) | [static]

Draws the rectangle around X, Y with Size and Value[i] in channel i.

Author:
Felix Woelk

Definition at line 201 of file ImageDraw.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCornersGrey().

Referenced by BIAS::ImageDraw< StorageType >::RectangleCenter().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCenterGrey | ( | Image< StorageType > & | im,
 |  | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | size,
 |  | const StorageType | value
 | ) | [static]

fills the channels with value

Definition at line 233 of file ImageDraw.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCornersGrey().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill | ( | Image< StorageType > & | im,
 |  | unsigned int | x,
 |  | unsigned int | y,
 |  | unsigned int | size,
 |  | const StorageType | value
 | ) | [static]

Definition at line 254 of file ImageDraw.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCorners | ( | Image< StorageType > & | im,
 |  | unsigned int | minx,
 |  | unsigned int | miny,
 |  | unsigned int | maxx,
 |  | unsigned int | maxy
 | ) | [static]

decides which color to use

Definition at line 113 of file ImageDraw.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageDraw< StorageType >::GetContrastValue(), BIAS::Image< StorageType >::GetImageDataArray(), and StorageType.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCorners | ( | Image< StorageType > & | im,
 |  | unsigned int | minx,
 |  | unsigned int | miny,
 |  | unsigned int | maxx,
 |  | unsigned int | maxy,
 |  | const StorageType | value
 | ) | [static]

as above but fills all channels with value

Definition at line 98 of file ImageDraw.cpp.

References BIAS::ImageDraw< StorageType >::RectangleCorners(), and StorageType.

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCorners | ( | Image< StorageType > & | im,
 |  | unsigned int | minx,
 |  | unsigned int | miny,
 |  | unsigned int | maxx,
 |  | unsigned int | maxy,
 |  | const StorageType | value[]
 | ) | [static]

Draws the rectangle defined by upper left and bottom right corner with value[i] in channel i.

Definition at line 67 of file ImageDraw.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and StorageType.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCenter(), and BIAS::ImageDraw< StorageType >::RectangleCorners().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCornersGrey | ( | Image< StorageType > & | im,
 |  | unsigned int | minx,
 |  | unsigned int | miny,
 |  | unsigned int | maxx,
 |  | unsigned int | maxy,
 |  | const StorageType | GreyValue
 | ) | [static]

faster for one channel images

Definition at line 141 of file ImageDraw.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelPosition(), BIAS::ImageBase::GetWidth(), and StorageType.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCenter(), and BIAS::ImageDraw< StorageType >::RectangleCenterGrey().

template<class StorageType>
int BIAS::ImageDraw< StorageType >::RectangleCornersGreyFill | ( | Image< StorageType > & | im,
 |  | unsigned int | minx,
 |  | unsigned int | miny,
 |  | unsigned int | maxx,
 |  | unsigned int | maxy,
 |  | const StorageType | GreyValue
 | ) | [static]

faster for one channel images

Definition at line 179 of file ImageDraw.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelPosition(), and StorageType.

Referenced by BIAS::ImageDraw< StorageType >::RectangleCenterGreyFill().

template<class StorageType>
void BIAS::ImageDraw< StorageType >::Text | ( | BIAS::Image< StorageType > & | dstImg,
 |  | const std::string & | message,
 |  | const int & | posX = 0,
 |  | const int & | posY = 20,
 |  | const BIAS::Vector3< StorageType > & | colorRGB = Vector3< StorageType >(255, 255, 255),
 |  | const int | fontface = CV_FONT_HERSHEY_PLAIN,
 |  | const double | hscale = 1.0,
 |  | const double | vscale = 1.0,
 |  | const double | shear = 0,
 |  | const int | thickness = 1,
 |  | const int | linetype = 8
 | ) | [static]

OpenCV: Draw Text into image.

Parameters:
message | text to display.
posX | (bottom) left corner of textbox, may be negative and outside image
posY | bottom (left) corner of textbox, may be negative and outside image
colorRGB | color to use
fontface | e.g. CV_FONT_HERSHEY_SIMPLEX, CV_FONT_HERSHEY_PLAIN, CV_FONT_HERSHEY_COMPLEX
Author:
Jan Woetzel 2005

Definition at line 1213 of file ImageDraw.cpp.

References BIAS::WrapBias2Ipl::p_imgIpl.

The documentation for this class was generated from the following files:
  • Base/Image/ImageDraw.hh
  • Base/Image/ImageDraw.cpp
Generated on Wed Jun 21 19:08:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImageIO Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImageIO

BIAS::ImageIO Class Reference
[ImageIO and Conversions]

routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g.
More...

#include <Base/Image/ImageIO.hh>

List of all members.

Public Types

enum TFileFormat {
FF_auto = 4242, FF_unknown = 9999, FF_mip = 0, FF_ppm = 1,
FF_pgm = 2, FF_jpg = 3, FF_tif = 4, FF_png = 5,
FF_viff = 6, FF_exr = 7, FF_dds = 8, FF_raw4096 = 9,
FF_bmp = 10, FF_pbm = 12, FF_Real32 = 13
}
format specifier when writing an image to a file Do *NOT* change order or associated enum value because it may confuse IO rotines for loading old images. More...

Static Public Member Functions

static int | ExportDevIL (const std::string &FileName, const ImageBase &img, const bool &fileOverwrite=true, const bool &allowPadding=true)
Save to disk using the DevIL/OpenIL library.
static int | ExportImage (const std::string &filename, ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file.
static int | ExportImlib (const std::string &c_filename, BIAS::ImageBase &img, enum TFileFormat FileFormat, bool sync=BIAS_DEFAULT_SYNC, int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Writes an image to disk using the imlib library.
static int | ExportMagickPP (const std::string &FileName, const ImageBase &img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false)
Reads an image from disk using the ImageMagick++ library.
static int | ExportOpenEXR (const std::string &FileName, const ImageBase &result)
save an .exr OpenEXR image to disk.
static std::string | ExtensionName (const std::string &oldName, const std::string &newExtension)
appends extension to name if extension is not already extension, avoids double extension like ".pgm.pgm"
static std::string | GetExtension (const BIAS::ImageIO::TFileFormat &fmt)
return the default extension for a given FileFormat enum
static BIAS::ImageIO::TFileFormat | GetFileFormat (const std::string &str)
determines the BIAS::ImageIO::TFileFormat for a given filename/extension Decision based on extension comparison
static int | ImportDevIL (const std::string &FileName, ImageBase &result)
Reads an image from disk using the DevIL/OpenIL library.
static int | ImportImage (const std::string &filename, ImageBase &result)
Try to import an image from a file.
static int | ImportImlib (const std::string &filename, ImageBase &result, bool assumeGrey=false)
Reads an image from disk using the imlib library.
static int | ImportMagickPP (const std::string &FileName, ImageBase &result, const bool &dummy=false, const bool &readMetaData=true)
Reads an image from disk using the ImageMagick++ library.
static int | ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
Reads an image from disk using the ImageMagick++ library.
static int | ImportOpenEXR (const std::string &FileName, ImageBase &result)
load an .exr OpenEXR image from disk.
static int | ImportRADIANCE (const std::string &FileName, ImageBase &result)
import Greg Wards Radiance RGBE image format (.hdr, .rad) A high dynamic range RGBE image contains 24 bits RGB Mantissa and 8 common exponent bits that encode the dynamic range.
static int | ImportRAWwithHeader (const std::string &filename, BIAS::ImageBase &img)
Reads a proprietary .RAW format from disk A typical file consists of these blocks:
  • magick cookie + HEADER size - 7 Byte, e.g.

static int | ImportReal32 (const std::string &FileName, ImageBase &result)
Loads proprietary raw floating point 2d image from Mathematica Real32 values Example how to export in Mathematica:.
static void | InitDevIL ()
initialize devIL once globally.
static int | Load (const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other available format loaders and third party libraries.
static int | ParseRAWwithHeader (const std::string &buf, const std::string &tag, unsigned int &retVal)
helper function for ImportRAWwithHeader Parses buf for tag
static void | PrintInfoDevIL (std::ostream &os=std::cout)
print info in currently bound DevIL image
static int | Read (const std::string &FileName, ImageBase &img)
Read a mip binary Image from disk and allocate memory structure.
static int | Save (const std::string &FileName, ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=false, const bool &writeMetaData=false)
Save an image to disk Interface for ExportImage.
static int | Write (const std::string &FileName, ImageBase &img, bool sync=false, bool forceNewID=true)
Write a mip binary Image to disk.
static int | WriteUnbuffered (const std::string &FileName, ImageBase &img)
Write a mip binary image to disk circumventing OS caches as good as possible.

Static Protected Member Functions

static int | ExportImagePnm_ (const std::string &FileName, ImageBase &img, bool sync=false, const bool &writeMetaData=true)
static int | ImportImagePnm_ (std::ifstream &ifs, ImageBase &result, int depth)
static int | ImportImageViff_ (std::ifstream &ifs, ImageBase &result)
import a one channel grey float viff image (Khoros image format) for compatibility to old stereo code

Static Protected Attributes

static char * | MemAlignedBuffer_ = NULL
static unsigned long int | MemAlignedBufferSize_ = 0

Detailed Description

routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g.

Read/Write for proprietary mip fmt. As all functions are static call them like ImageIO::Load().

Definition at line 58 of file ImageIO.hh.

Member Enumeration Documentation

enum BIAS::ImageIO::TFileFormat

format specifier when writing an image to a file Do *NOT* change order or associated enum value because it may confuse IO rotines for loading old images.

Enumerator:
FF_auto
FF_unknown
FF_mip
FF_ppm
FF_pgm
FF_jpg
FF_tif
FF_png
FF_viff
FF_exr
FF_dds
FF_raw4096
FF_bmp
FF_pbm
FF_Real32

Definition at line 65 of file ImageIO.hh.

Member Function Documentation

int ImageIO::ExportDevIL | ( | const std::string & | FileName,
 |  | const ImageBase & | img,
 |  | const bool & | fileOverwrite = true,
 |  | const bool & | allowPadding = true
 | ) | [static]

Save to disk using the DevIL/OpenIL library.

See http://openil.sourceforge.net for details. Supports writing multiple formats, including

  • .dds
  • .tga, .tif,
  • .bmp, .jpg, .pcx, .png, .pnm
  • .sgi,.tga Teh fiel format is determined from teh Filenames extension.
    Returns:
    0 in case of succes, negative value in case of error.
    Parameters:
    FileName | the output filename to read from.
    img | image to be saved
    fileOverwrite | true to overwrite file if exists
    Author:
    Jan Woetzel 12/2005

Definition at line 2276 of file ImageIO.cpp.

References BIASERR, CALLINFO, BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), and InitDevIL().

static int BIAS::ImageIO::ExportImage | ( | const std::string & | filename,
 |  | ImageBase & | img,
 |  | const enum TFileFormat | FileFormat = FF_auto,
 |  | const bool | sync = BIAS_DEFAULT_SYNC,
 |  | const int | c_jpeg_quality = BIAS_DEFAULT_IMAGE_QUALITY,
 |  | const bool | forceNewID = BIAS_DEFAULT_FORCENEWID,
 |  | const bool & | writeMetaData = true
 | ) | [static]

Export image as file.

There is a side effect on the img - a may be assigned

  • if there is no valid one
  • or forceNew flag is set. attention Do NOT scale or shift in this routine, do it by hand if you need it. (JW 04/2003)
    Parameters:
    filename | name of the file to be loaded
    img | Image to be saved, not const because of setUUID side effect.
    FileFormat | What file format shall be used for saving
    jpeg_quality | Quality of a jpeg image to be saved, unused in all other formats
    sync | does only worlk with pgm/ppm (woelk)
    writeMetaData | true to (try to) write meta data to disk and false to drop it.
    Returns:
    0 on success
    Author:
    (Ingo Thomsen) - complete rewrite by Jan Woetzel
Examples:
ExampleImageMagickIO.cpp, ExampleIplImageDraw.cpp, and ExampleIplWrapOpenCV.cpp.

Referenced by main(), Save(), and BIAS::OpenGLCanvasBase::ScreenShot().

static int BIAS::ImageIO::ExportImagePnm_ | ( | const std::string & | FileName,
 |  | ImageBase & | img,
 |  | bool | sync = false,
 |  | const bool & | writeMetaData = true
 | ) | [static, protected]

static int BIAS::ImageIO::ExportImlib | ( | const std::string & | c_filename,
 |  | BIAS::ImageBase & | img,
 |  | enum TFileFormat | FileFormat,
 |  | bool | sync = BIAS_DEFAULT_SYNC,
 |  | int | jpeg_quality = BIAS_DEFAULT_IMAGE_QUALITY,
 |  | bool | forceNewID = BIAS_DEFAULT_FORCENEWID,
 |  | const bool & | writeMetaData = true
 | ) | [static]

Writes an image to disk using the imlib library.

Deprecated:
Deprecated, ExportMagickPP is succesor. (jw) !!!
encapsuled from ExportImage 07/2005 JW

Referenced by ImportOpenEXR().

int ImageIO::ExportMagickPP | ( | const std::string & | FileName,
 |  | const ImageBase & | img,
 |  | const int & | quality = BIAS_DEFAULT_IMAGE_QUALITY,
 |  | const bool & | writeMetaData = false,
 |  | const bool & | forceBinaryPNMformat = true,
 |  | const bool & | losslesJpgMode = false,
 |  | const bool & | writeGZipped = false
 | ) | [static]

Reads an image from disk using the ImageMagick++ library.

Todo:
Implement 16bit short write with Magick++ using BLOB.

Implement quality directive for jpg saving with Magick++.

Bug:
IMageMagick PPM files are alwyas written as ASCII instaed of binary (JW)
Returns:
0 in case of succes, negative value in case of error.
Parameters:
FileName | the input filename to read from.
img | contains the image to be written to disk.
quality | for saving, e.g.1-100 for jpeg, tested for jpeg. Is overridden by losslessMode parameter
writeMetaData | try to write ASCII MetaData as comment to file.
forceBinaryPNMformat | true to write BINARY pnm/pbm/pgmp/ppm instead of human readable ASCII.
losslesMode | true to write in jpeg loslles mode. overrides quality setting
writeGZipped | true for additional gzip compression (e.g. .pgm.gz) which may be useful for human readable ASCII pgm output but save disk space.
Output file type is determined automatically by file extension.

See http://www.imagemagick.org/script/formats.php or

 identify -list format
for supported formats.
Author:
Jan Woetzel 10/2004
Examples:
ExampleImageMagickIO.cpp.

Definition at line 1616 of file ImageIO.cpp.

References BIASASSERT, BIASERR, CALLINFO, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, COUT, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image, BIAS::LowerCase(), BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, StorageType, and BIAS::Suffix().

Referenced by main().

int ImageIO::ExportOpenEXR | ( | const std::string & | FileName,
 |  | const ImageBase & | result
 | ) | [static]

save an .exr OpenEXR image to disk.

Author:
Jan Woetzel 2005/09

Definition at line 369 of file ImageIO.cpp.

References a, BIAS_IO_SUCCESS, BIASERR, CALLINFO, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), and BIAS::ImageBase::GetWidth().

std::string ImageIO::ExtensionName | ( | const std::string & | oldName,
 |  | const std::string & | newExtension
 | ) | [static]

appends extension to name if extension is not already extension, avoids double extension like ".pgm.pgm"

Parameters:
oldName | filename (maybe selected by user)
newExtension | desired extension
Returns:
a filename with extension
Author:
Jan Woetzel 04/2003

Definition at line 1223 of file ImageIO.cpp.

References BIASASSERT, BIAS::Extension(), and BIAS::LowerCase().

std::string ImageIO::GetExtension ( const BIAS::ImageIO::TFileFormat & fmt ) [static]

return the default extension for a given FileFormat enum

Author:
Jan Woetzel

Definition at line 2487 of file ImageIO.cpp.

References BIASERR, FF_auto, FF_bmp, FF_dds, FF_exr, FF_jpg, FF_mip, FF_pbm, FF_pgm, FF_png, FF_ppm, FF_raw4096, FF_Real32, FF_tif, FF_unknown, and FF_viff.

BIAS::ImageIO::TFileFormat ImageIO::GetFileFormat ( const std::string & str ) [static]

determines the BIAS::ImageIO::TFileFormat for a given filename/extension Decision based on extension comparison

Author:
Jan Woetzel

Definition at line 2531 of file ImageIO.cpp.

References BIAS::Extension(), FF_dds, FF_exr, FF_jpg, FF_mip, FF_pbm, FF_pgm, FF_png, FF_ppm, FF_raw4096, FF_Real32, FF_tif, FF_unknown, FF_viff, and BIAS::LowerCase().

Referenced by DetermineFiletype().

int ImageIO::ImportDevIL | ( | const std::string & | FileName,
 |  | ImageBase & | result
 | ) | [static]

Reads an image from disk using the DevIL/OpenIL library.

See http://openil.sourceforge.net for details. Supports reading multiple formats, including

  • .bmp, .gif, .jpg, .pcd, .pcx, .pic, .png, .pnm
  • .tga, .tif , .io
  • .dds
  • Doom graphics, ... and many other.

Returns:
0 in case of succes, negative value in case of error.
Parameters:
FileName | the input filename to read from.
result | contains the read image if success.
Author:
Jan Woetzel 12/2005

Definition at line 2144 of file ImageIO.cpp.

References BIAS_DEBUG, BIASASSERT, BIASERR, CALLINFO, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::Init(), InitDevIL(), BIAS::ImageBase::IsEmpty(), PrintInfoDevIL(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by ImportOpenEXR().

static int BIAS::ImageIO::ImportImage | ( | const std::string & | filename,
 |  | ImageBase & | result
 | ) | [static]

Try to import an image from a file.

Formats supported are listed in TFileFormat. More over a few other formats may be includeable like GIF. The imported image is always of the type RGB.

Parameters:
filename name of the file to be loaded
Returns:
-1 in case of error

UNKNOWN_META_DATA if meta data could not be read param assumeGrey : DEPRECATED. Was used to speed up loading with imlib

Author:
Ingo Thomsen 2002: Complete Rewrite by Jan Woetzel 2005

Referenced by ImportOpenEXR().

static int BIAS::ImageIO::ImportImagePnm_ | ( | std::ifstream & | ifs,
 |  | ImageBase & | result,
 |  | int | depth
 | ) | [static, protected]

Referenced by ImportOpenEXR().

int ImageIO::ImportImageViff_ | ( | std::ifstream & | ifs,
 |  | ImageBase & | result
 | ) | [static, protected]

import a one channel grey float viff image (Khoros image format) for compatibility to old stereo code

Parameters:
FileName | destination filename
img | BIAS ImageBase to be written to disk
Author:
Jan Woetzel 01/2003

Definition at line 1363 of file ImageIO.cpp.

References BIASERR, CALLINFO, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetSize(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), and BIAS::ImageBase::ST_float.

Referenced by ImportOpenEXR().

static int BIAS::ImageIO::ImportImlib | ( | const std::string & | filename,
 |  | ImageBase & | result,
 |  | bool | assumeGrey = false
 | ) | [static]

Reads an image from disk using the imlib library.

encapsuled from ImportImage 10/2004

Deprecated:
Deprecated, ImportMagickPP is succesor. (jw) !!!
Returns:
0 in case of succes, negative value in case of error.
Parameters:
filename | the input filename to read from.
result | is the returned read image
Author:
Jan Woetzel 10/2004

Referenced by ImportOpenEXR().

int ImageIO::ImportMagickPP | ( | const std::string & | FileName,
 |  | ImageBase & | result,
 |  | const bool & | dummy = false,
 |  | const bool & | readMetaData = true
 | ) | [static]

Reads an image from disk using the ImageMagick++ library.

is called automatically by ImportImage.

Parameters:
dummy | ignored, for consistency with ImportMagickPPAutoconvert
readMetaData | true to try to read metadat (from comment field)
Returns:
0 in case of succes, negative value in case of error.
Todo:
fix the error on reading reference streaming in Metadata operator>> e.g. on loading ibak "M34/Front/image00000000.jpg" (jw)
Author:
jw and woelk 12/2004

Definition at line 160 of file ImageIO.cpp.

References BIASERR, CALLINFO, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetStorageType(), BIAS::Image, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::PrintHeader(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and StorageType.

Referenced by ImportOpenEXR().

int ImageIO::ImportMagickPPAutoconvert | ( | const std::string & | FileName,
 |  | ImageBase & | result,
 |  | const bool & | assumeGrey = false,
 |  | const bool & | readMetaData = false
 | ) | [static]

Reads an image from disk using the ImageMagick++ library.

Todo:
Implement assumeGrey for MagickPP like for Imlib (JW).
result image must be initialized. Th read image is automatically converted to match the result image.

Returns:
0 in case of succes, negative value in case of error.
Parameters:
FileName | the input filename to read from.
img | contains the read image if success.
assumeGrey | not implemented for now, just for interface compatibility with Bias Import functions
readMetaData | try to read ASCII metadata from file comment.
See http://www.imagemagick.org/script/formats.php for supported formats.
Author:
Jan Woetzel 10/2004
Examples:
ExampleImageMagickIO.cpp.

Definition at line 1416 of file ImageIO.cpp.

References BIAS_IO_SUCCESS, BIASASSERT, BIASERR, CALLINFO, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, COUT, BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image, BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, BIAS::ImageBase::ST_unsignedshortint, and StorageType.

Referenced by main().

int ImageIO::ImportOpenEXR | ( | const std::string & | FileName,
 |  | ImageBase & | result
 | ) | [static]

load an .exr OpenEXR image from disk.

Author:
Patrick Fittkau, Jan Woetzel 2005/08

Definition at line 414 of file ImageIO.cpp.

References BIAS_DEBUG, BIAS_IO_SUCCESS, BIASABORT, BIASASSERT, BIASERR, BIASWARN, CALLINFO, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, COUT, cp, ExportImlib(), BIAS::MetaData::Find(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetImageDataArray(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), ImportDevIL(), ImportImage(), ImportImagePnm_(), ImportImageViff_(), ImportImlib(), ImportMagickPP(), ImportRADIANCE(), ImportRAWwithHeader(), BIAS::ImageBase::Init(), BIAS::ImageBase::InvalidateUID(), BIAS::ImageBase::IsEmpty(), BIAS::AppData::MD_USE_ASCII, BIAS::AppData::MD_UUID, p, PrintInfoEXR(), r, BIAS::ImageBase::Release(), res, BIAS::AppData::sdata, BIAS::ImageBase::SetBitDepth(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::SetUID(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, swap, BIAS::AppData::tag, and BIAS::ImageConvert::ToRGB().

int BIAS::ImageIO::ImportRADIANCE | ( | const std::string & | FileName,
 |  | ImageBase & | result
 | ) | [static]

import Greg Wards Radiance RGBE image format (.hdr, .rad) A high dynamic range RGBE image contains 24 bits RGB Mantissa and 8 common exponent bits that encode the dynamic range.

See http://radsite.lbl.gov/radiance/ Own implementation just for copyright reasons.

Author:
Jan Woetzel 01/2006

Definition at line 2605 of file ImageIO.cpp.

References BIASERR.

Referenced by ImportOpenEXR().

int ImageIO::ImportRAWwithHeader | ( | const std::string & | filename,
 |  | BIAS::ImageBase & | img
 | ) | [static]

Reads a proprietary .RAW format from disk A typical file consists of these blocks:

  • magick cookie + HEADER size - 7 Byte, e.g.

"RAW4096" thus magick cookies are "RAW8", "RAW4", "RAW2" ,"RAW1", "RAW0" for 8192, 4096, 2048, 1024, 0512 Byte header inclufing cookie.

E.g. RAW4096 is 4096 Byte text header followed by arbitrary size RAW datat specicified in the header. Used for most efficient write to disk on WIN32 using system calls without buffering and cache with DMA. E.g:

    Block Name   -  4   Byte  -  RAW8[192] / RAW4[096] /RAW2[048] /RAW1[024] / RAW0[512]
    Block Length -  3/4 Byte  -  8192/192    4096/096  should be 4 Byte but is 3 Byte in old RAW4096 fmt witten for "Mediendom" project.
    Block Data   -  binary data area begins at Byte nr. "block length+1", e.g. 4096+1 from teh begginning of file, including header.
TODO: encode header information in Write routine compatible to digital cameras .raw format which is very similar.

FYI: IrFanView can read and display this format natively (on WIN32).

Inspired by http://www.dalibor.cz/minolta/raw_file_format.htm and the need to write exactly on aligned memory and disk block sizes for performance reasons, in particular on WIN32.

Works only with 8 bpp one plane Bayer pattern raw images (from scorpion camera) actually.

Bug:
Reading teh data on Linux is broken because fopen ignores teh binary flag, see "man fopen".
Returns:
0 in case of succes, negative value in case of error.
Author:
Jan Woetzel 2005
Examples:
convertRAW.cpp.

Definition at line 1852 of file ImageIO.cpp.

References BIASERR, CALLINFO, COUT, and ParseRAWwithHeader().

Referenced by ImportOpenEXR(), and main().

int BIAS::ImageIO::ImportReal32 | ( | const std::string & | FileName,
 |  | ImageBase & | result
 | ) | [static]

Loads proprietary raw floating point 2d image from Mathematica Real32 values Example how to export in Mathematica:.

    (* helper functions *)
    Header[img_] := ({1, Dimensions[img][[1]], Dimensions[img][[2]], 1})
    ExportReal32[filename_, img_] := Export[filename <> ".real32", Append[Header[img], img], "Real32"]

    (* sample data *)
    img = {
      {1.1, 2.2},
      {3.3, 4.4},
      {5.5, 6.6} };

    (* final usage writing to disk in appropriate format: *)
    ExportReal32["out_img", img]
Author:
Jan Woetzel

Definition at line 2761 of file ImageIO.cpp.

References BIASASSERT, BIASERR, CALLINFO, BIAS::ImageBase::GetImageData(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, and version.

void ImageIO::InitDevIL ( ) [static]

initialize devIL once globally.

Usually called by IL load and save functions automatically. To speed up first load/save you can "pre-call" it on startup.

Author:
Jan Woetzel

Definition at line 2070 of file ImageIO.cpp.

References BIASERR, and COUT.

Referenced by ExportDevIL(), and ImportDevIL().

static int BIAS::ImageIO::Load | ( | const std::string & | FileName,
 |  | ImageBase & | img
 | ) | [static]

first tries a call to Read MIP image and if that fails, tries to Import Image with all other available format loaders and third party libraries.

Returns:
-1 in case of error

UNKNOWN_META_DATA if meta data could not be read

Author:
Felix Woelk, Jan Woetzel
Examples:
ExampleIplImageDisplay.cpp, ExampleIplImageDraw.cpp, and ExampleIplWrapOpenCV.cpp.

Referenced by MyFrame::LoadImages(), and main().

int ImageIO::ParseRAWwithHeader | ( | const std::string & | buf,
 |  | const std::string & | tag,
 |  | unsigned int & | retVal
 | ) | [static]

helper function for ImportRAWwithHeader Parses buf for tag

Returns:
retVal value associated to tag in buf
Author:
Jan Woetzel 2005

Definition at line 1978 of file ImageIO.cpp.

Referenced by ImportRAWwithHeader().

void ImageIO::PrintInfoDevIL ( std::ostream & os = std::cout ) [static]

print info in currently bound DevIL image

Author:
Jan Woetzel

Definition at line 2111 of file ImageIO.cpp.

Referenced by ImportDevIL().

static int BIAS::ImageIO::Read | ( | const std::string & | FileName,
 |  | ImageBase & | img
 | ) | [static]

Read a mip binary Image from disk and allocate memory structure.

Parameters:
FileName | complete name of file to be loaded
img | object to receive the image data fro the file
id | The image is assigned id if there is no id in the file
Author:
Felix Woelk

int ImageIO::Save | ( | const std::string & | FileName,
 |  | ImageBase & | img,
 |  | const enum TFileFormat | FileFormat = FF_auto,
 |  | const bool | sync = BIAS_DEFAULT_SYNC,
 |  | const int | jpeg_quality = BIAS_DEFAULT_IMAGE_QUALITY,
 |  | const bool | forceNewID = false,
 |  | const bool & | writeMetaData = false
 | ) | [static]

Save an image to disk Interface for ExportImage.

There is a side effect on the image, thus it is not const. A uuid may be assigned

  • if there is no valid one
  • or forceNew flag is set.
    Returns:
    0 on success
    Author:
    Jan Woetzel

Definition at line 917 of file ImageIO.cpp.

References ExportImage().

static int BIAS::ImageIO::Write | ( | const std::string & | FileName,
 |  | ImageBase & | img,
 |  | bool | sync = false,
 |  | bool | forceNewID = true
 | ) | [static]

Write a mip binary Image to disk.

Parameters:
FileName output file name. Extension .mip is added if extension isn't already (case insensitive) 'mip' (JW 04/2003)
Author:
Felix Woelk
Parameters:
sync tries to flush all open buffers/caches
Examples:
ExampleImageMagickIO.cpp.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedColor(), BIAS::Rescale< unsigned char, unsigned char >::_FillInterpolatedGrey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::PMDImageProc::FitDepthTo2DImage(), main(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor(), BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey(), BIAS::VideoStream::SplitIntoFiles(), and BIAS::PyramidImage< StorageType >::WriteImages().

int ImageIO::WriteUnbuffered | ( | const std::string & | FileName,
 |  | ImageBase & | img
 | ) | [static]

Write a mip binary image to disk circumventing OS caches as good as possible.

(O_DIRECT)

Author:
Jan-Friso Evers

Definition at line 2016 of file ImageIO.cpp.

References BIASERR, CALLINFO, BIAS::UUID::GenerateUUID(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetUID(), BIAS::UUID::IsValid(), MemAlignedBuffer_, MemAlignedBufferSize_, BIAS::ImageBase::SetUID(), and BIAS::MetaData::WriteBinary().

Member Data Documentation

char * ImageIO::MemAlignedBuffer_ = NULL [static, protected]

Definition at line 432 of file ImageIO.hh.

Referenced by WriteUnbuffered().

unsigned long int ImageIO::MemAlignedBufferSize_ = 0 [static, protected]

Definition at line 433 of file ImageIO.hh.

Referenced by WriteUnbuffered().

The documentation for this class was generated from the following files:
  • Base/Image/ImageIO.hh
  • Base/Image/ImageIO.cpp
Generated on Wed Jun 21 19:08:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ImgObjGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ImgObjGL

BIAS::ImgObjGL Class Reference

#include <Gui/ImgObjGL.hh>

Collaboration diagram for BIAS::ImgObjGL:

[legend]
List of all members.

Public Member Functions

void | CreateGLTexture (const BIAS::ImageBase &c_img, const bool &forcePow2tex=true, const bool &flipY=true, const bool ImmediateCopyData=true)
creates an OpenGL texture from p_valueImage JW if ImmediateCopyData is false teh memory is just allocated and not copied from c_img.
void DeleteGLTexture ()
deletes the texture memory and frees texture in GL
ImgObjGL (const GLuint &id, const unsigned int &widthBrutto, const unsigned int &heightBrutto, const GLenum &target=GL_TEXTURE_2D)
ImgObjGL ()
void InitMembers ()
bool | IsRectangleTexture () const
void Release ()
frees the pointer members if we allocated them
void SetTarget2D ()
void SetTargetPOW2 ()
set the textur retarget to rectangular or pow 2 texture JW
void SetTargetRECT ()
~ImgObjGL ()

Static Public Member Functions

static GLint | GetGLInternalFormat (const BIAS::ImageBase &img)
interface for teh above
static GLint | GetGLInternalFormat (const BIAS::ImageBase::EStorageType &biasST, const BIAS::ImageBase::EColorModel &biasCM, const unsigned int &channelcount, const unsigned int &ByteDepth, const unsigned int &BitDepth)
JW determin teh GPU internal format teh src data should be mapped to.
static GLenum | GetGLPixelFormat (const BIAS::ImageBase::EColorModel &biasCM, const unsigned int &channelcount)
get the GLenum pixel src format for the corresponding BIAS enum ColroModel
static GLenum | GetGLStorageType (const BIAS::ImageBase::EStorageType &biasST, const unsigned int &ByteDepth)
get the GLenum pixel storage type for the corresponding BIAS enum

Public Attributes

unsigned int | heightBrutto
unsigned int | heightOrig
GLuint | id
GLenum | magnificationMode
GLenum | minificationMode
bool | p_id_SelfAllocated
BIAS::ImageBase * p_valueImage
bool | p_valueImage_SelfAllocated
GLenum | target
unsigned int | widthBrutto
unsigned int | widthOrig

Detailed Description

Definition at line 24 of file ImgObjGL.hh.

Constructor & Destructor Documentation

ImgObjGL::~ImgObjGL ( )

Definition at line 15 of file ImgObjGL.cpp.

References Release().

ImgObjGL::ImgObjGL ( )

Definition at line 22 of file ImgObjGL.cpp.

References InitMembers().

ImgObjGL::ImgObjGL | ( | const GLuint & | id,
 |  | const unsigned int & | widthBrutto,
 |  | const unsigned int & | heightBrutto,
 |  | const GLenum & | target = GL_TEXTURE_2D
 | ) |

Definition at line 30 of file ImgObjGL.cpp.

References heightOrig, InitMembers(), and widthOrig.

Member Function Documentation

void ImgObjGL::CreateGLTexture | ( | const BIAS::ImageBase & | c_img,
 |  | const bool & | forcePow2tex = true,
 |  | const bool & | flipY = true,
 |  | const bool | ImmediateCopyData = true
 | ) |

creates an OpenGL texture from p_valueImage JW if ImmediateCopyData is false teh memory is just allocated and not copied from c_img.

JW

Definition at line 113 of file ImgObjGL.cpp.

References BIASBREAK, BIASERR, BIASWARN, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), heightBrutto, heightOrig, img, BIAS::ImageBase::IsPowerOfTwoSize(), IsRectangleTexture(), BIAS::ImageBase::PowerOfTwoSize(), Release(), target, widthBrutto, and widthOrig.

Referenced by BIAS::ImageCanvasGLBase::Set().

void ImgObjGL::DeleteGLTexture ( )

deletes the texture memory and frees texture in GL

Definition at line 91 of file ImgObjGL.cpp.

References CHECK_GL_ERROR, and target.

Referenced by Release().

GLint ImgObjGL::GetGLInternalFormat ( const BIAS::ImageBase & img ) [static]

interface for teh above

Author:
Jan Woetzel

Definition at line 422 of file ImgObjGL.cpp.

References BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), GetGLInternalFormat(), and BIAS::ImageBase::GetStorageType().

GLint ImgObjGL::GetGLInternalFormat | ( | const BIAS::ImageBase::EStorageType & | biasST,
 |  | const BIAS::ImageBase::EColorModel & | biasCM,
 |  | const unsigned int & | channelcount,
 |  | const unsigned int & | ByteDepth,
 |  | const unsigned int & | BitDepth
 | ) | [static]

JW determin teh GPU internal format teh src data should be mapped to.

Author:
Jan Woetzel

Definition at line 435 of file ImgObjGL.cpp.

References BIASASSERT, BIASBREAK, BIASERR, and BIAS::ImageBase::GetSize().

Referenced by GetGLInternalFormat().

GLenum ImgObjGL::GetGLPixelFormat | ( | const BIAS::ImageBase::EColorModel & | biasCM,
 |  | const unsigned int & | channelcount
 | ) | [static]

get the GLenum pixel src format for the corresponding BIAS enum ColroModel

Author:
Jan Woetzel

Definition at line 352 of file ImgObjGL.cpp.

References BIASASSERT, BIASBREAK, BIASERR, BIASWARN, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_GreyA, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_RGBA.

GLenum ImgObjGL::GetGLStorageType | ( | const BIAS::ImageBase::EStorageType & | biasST,
 |  | const unsigned int & | ByteDepth
 | ) | [static]

get the GLenum pixel storage type for the corresponding BIAS enum

Author:
Jan Woetzel

Definition at line 309 of file ImgObjGL.cpp.

References BIASASSERT, BIASBREAK, BIASERR, BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, and BIAS::ImageBase::ST_unsignedshortint.

void ImgObjGL::InitMembers ( )

Definition at line 49 of file ImgObjGL.cpp.

References heightBrutto, heightOrig, magnificationMode, minificationMode, p_id_SelfAllocated, p_valueImage, p_valueImage_SelfAllocated, target, widthBrutto, and widthOrig.

Referenced by ImgObjGL().

bool ImgObjGL::IsRectangleTexture ( ) const

Returns:
true ibn RECT instead of 2D pow2 object

Definition at line 106 of file ImgObjGL.cpp.

References target.

Referenced by CreateGLTexture(), and BIAS::GeometryGL::DisplayQuadTexCoord2D().

void ImgObjGL::Release ( )

frees the pointer members if we allocated them

Definition at line 78 of file ImgObjGL.cpp.

References DeleteGLTexture(), p_id_SelfAllocated, p_valueImage, and p_valueImage_SelfAllocated.

Referenced by CreateGLTexture(), and ~ImgObjGL().

void BIAS::ImgObjGL::SetTarget2D ( ) [inline]

Definition at line 62 of file ImgObjGL.hh.

References target.

Referenced by SetTargetPOW2().

void BIAS::ImgObjGL::SetTargetPOW2 ( ) [inline]

set the textur retarget to rectangular or pow 2 texture JW

Definition at line 61 of file ImgObjGL.hh.

References SetTarget2D().

void BIAS::ImgObjGL::SetTargetRECT ( ) [inline]

Definition at line 63 of file ImgObjGL.hh.

References target.

Referenced by BIAS::ImageCanvasGLBase::SetRECT().

Member Data Documentation

unsigned int BIAS::ImgObjGL::heightBrutto

Definition at line 103 of file ImgObjGL.hh.

Referenced by CreateGLTexture(), BIAS::ImageCanvasGLBase::DisplayCalls(), InitMembers(), and BIAS::ImageCanvasGLBase::ValidTexobj().

unsigned int BIAS::ImgObjGL::heightOrig

Definition at line 99 of file ImgObjGL.hh.

Referenced by CreateGLTexture(), BIAS::GeometryGL::DisplayQuadTexCoord2D(), ImgObjGL(), and InitMembers().

GLuint BIAS::ImgObjGL::id

Definition at line 88 of file ImgObjGL.hh.

Referenced by BIAS::GeometryGL::DisplayQuadTexCoord2D(), BIAS::ImageCanvasGLBase::GetTexId(), and BIAS::ImageCanvasGLBase::ValidTexobj().

GLenum BIAS::ImgObjGL::magnificationMode

Definition at line 95 of file ImgObjGL.hh.

Referenced by InitMembers().

GLenum BIAS::ImgObjGL::minificationMode

Definition at line 94 of file ImgObjGL.hh.

Referenced by BIAS::ImageCanvasGLBase::EnableMipMapping(), and InitMembers().

bool BIAS::ImgObjGL::p_id_SelfAllocated

Definition at line 92 of file ImgObjGL.hh.

Referenced by InitMembers(), and Release().

BIAS::ImageBase* BIAS::ImgObjGL::p_valueImage

Definition at line 106 of file ImgObjGL.hh.

Referenced by InitMembers(), Release(), and BIAS::ImageCanvasGLBase::Set().

bool BIAS::ImgObjGL::p_valueImage_SelfAllocated

Definition at line 110 of file ImgObjGL.hh.

Referenced by InitMembers(), Release(), and BIAS::ImageCanvasGLBase::Set().

GLenum BIAS::ImgObjGL::target

Definition at line 89 of file ImgObjGL.hh.

Referenced by CreateGLTexture(), DeleteGLTexture(), BIAS::ImageCanvasGLBase::GetTexTarget(), InitMembers(), IsRectangleTexture(), SetTarget2D(), SetTargetRECT(), and BIAS::ImageCanvasGLBase::ValidTexobj().

unsigned int BIAS::ImgObjGL::widthBrutto

Definition at line 102 of file ImgObjGL.hh.

Referenced by CreateGLTexture(), BIAS::ImageCanvasGLBase::DisplayCalls(), InitMembers(), and BIAS::ImageCanvasGLBase::ValidTexobj().

unsigned int BIAS::ImgObjGL::widthOrig

Definition at line 98 of file ImgObjGL.hh.

Referenced by CreateGLTexture(), BIAS::GeometryGL::DisplayQuadTexCoord2D(), ImgObjGL(), and InitMembers().

The documentation for this class was generated from the following files:
  • Gui/ImgObjGL.hh
  • Gui/ImgObjGL.cpp
Generated on Wed Jun 21 19:08:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Index1D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Index1D

TNT::Index1D Class Reference

#include <Base/Math/tnt/index.h>

List of all members.

Public Member Functions

Index1D (Subscript i1, Subscript i2)
Index1D (const Index1D &D)
Subscript | lbound () const
Index1D & | operator= (const Index1D &D)
Subscript | ubound () const

Private Attributes

Subscript lbound_
Subscript ubound_

Detailed Description

Definition at line 44 of file index.h.

Constructor & Destructor Documentation

TNT::Index1D::Index1D ( const Index1D & D ) [inline]

Definition at line 54 of file index.h.

TNT::Index1D::Index1D | ( | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 55 of file index.h.

Member Function Documentation

Subscript TNT::Index1D::lbound ( ) const [inline]

Definition at line 51 of file index.h.

References lbound_.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D(), TNT::const_Region2D< Array2D >::const_Region2D(), TNT::Region2D< Array2D >::operator()(), TNT::operator+(), TNT::operator-(), TNT::Region1D< Array1D >::Region1D(), and TNT::Region2D< Array2D >::Region2D().

Index1D& TNT::Index1D::operator= ( const Index1D & D ) [inline]

Definition at line 57 of file index.h.

References lbound_, and ubound_.

Subscript TNT::Index1D::ubound ( ) const [inline]

Definition at line 52 of file index.h.

References ubound_.

Referenced by TNT::const_Region1D< Array1D >::const_Region1D(), TNT::const_Region2D< Array2D >::const_Region2D(), TNT::Region2D< Array2D >::operator()(), TNT::operator+(), TNT::operator-(), TNT::Region1D< Array1D >::Region1D(), and TNT::Region2D< Array2D >::Region2D().

Member Data Documentation

Subscript TNT::Index1D::lbound_ [private]

Definition at line 46 of file index.h.

Referenced by lbound(), and operator=().

Subscript TNT::Index1D::ubound_ [private]

Definition at line 47 of file index.h.

Referenced by operator=(), and ubound().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/index.h
Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::IndexedFaceSet Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::IndexedFaceSet

BIAS::IndexedFaceSet Class Reference

stores data for drawing a indexed face set. More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::IndexedFaceSet:

[legend]
List of all members.

Public Attributes

std::vector< BIAS::Vector<
int > > 		faceIndices
std::string | name
std::vector< BIAS::Vector2<
float > > 		texCoordSet
BIAS::Image< unsigned char > | texture
std::string | textureName
std::vector< BIAS::Vector3<
double > > 		vertexSet
bool | writeOutTexture

Detailed Description

stores data for drawing a indexed face set.

Faces beeing (preferably flat) polygons

Definition at line 180 of file ThreeDOut.hh.

Member Data Documentation

std::vector<BIAS::Vector<int> > BIAS::IndexedFaceSet::faceIndices

Definition at line 186 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

std::string BIAS::IndexedFaceSet::name

Definition at line 187 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

std::vector<BIAS::Vector2<float> > BIAS::IndexedFaceSet::texCoordSet

Definition at line 184 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

BIAS::Image<unsigned char> BIAS::IndexedFaceSet::texture

Definition at line 182 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

std::string BIAS::IndexedFaceSet::textureName

Definition at line 188 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

std::vector<BIAS::Vector3<double> > BIAS::IndexedFaceSet::vertexSet

Definition at line 183 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

bool BIAS::IndexedFaceSet::writeOutTexture

Definition at line 189 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:08:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: inlist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

inlist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef char * | inacc
typedef char * | inacc
typedef ftnlen | inacclen
typedef ftnlen | inacclen
typedef char * | inblank
typedef char * | inblank
typedef ftnlen | inblanklen
typedef ftnlen | inblanklen
typedef char * | indir
typedef char * | indir
typedef ftnlen | indirlen
typedef ftnlen | indirlen
typedef flag | inerr
typedef flag | inerr
typedef ftnint * | inex
typedef ftnint * | inex
typedef char * | infile
typedef char * | infile
typedef ftnlen | infilen
typedef ftnlen | infilen
typedef char * | infmt
typedef char * | infmt
typedef ftnlen | infmtlen
typedef ftnlen | infmtlen
typedef char * | inform
typedef char * | inform
typedef ftnint | informlen
typedef ftnint | informlen
typedef char * | inname
typedef char * | inname
typedef ftnint * | innamed
typedef ftnint * | innamed
typedef ftnlen | innamlen
typedef ftnlen | innamlen
typedef ftnint * | innrec
typedef ftnint * | innrec
typedef ftnint * | innum
typedef ftnint * | innum
typedef ftnint * | inopen
typedef ftnint * | inopen
typedef ftnint * | inrecl
typedef ftnint * | inrecl
typedef char * | inseq
typedef char * | inseq
typedef ftnlen | inseqlen
typedef ftnlen | inseqlen
typedef char * | inunf
typedef char * | inunf
typedef ftnlen | inunflen
typedef ftnlen | inunflen
typedef ftnint | inunit
typedef ftnint | inunit

Detailed Description

Definition at line 96 of file f2c_gnu011.h.

Member Typedef Documentation

typedef char* inlist::inacc

Definition at line 103 of file win32_f2c.h.

typedef char* inlist::inacc

Definition at line 107 of file f2c_gnu011.h.

typedef ftnlen inlist::inacclen

Definition at line 104 of file win32_f2c.h.

typedef ftnlen inlist::inacclen

Definition at line 108 of file f2c_gnu011.h.

typedef char* inlist::inblank

Definition at line 117 of file win32_f2c.h.

typedef char* inlist::inblank

Definition at line 121 of file f2c_gnu011.h.

typedef ftnlen inlist::inblanklen

Definition at line 118 of file win32_f2c.h.

typedef ftnlen inlist::inblanklen

Definition at line 122 of file f2c_gnu011.h.

typedef char* inlist::indir

Definition at line 107 of file win32_f2c.h.

typedef char* inlist::indir

Definition at line 111 of file f2c_gnu011.h.

typedef ftnlen inlist::indirlen

Definition at line 108 of file win32_f2c.h.

typedef ftnlen inlist::indirlen

Definition at line 112 of file f2c_gnu011.h.

typedef flag inlist::inerr

Definition at line 93 of file win32_f2c.h.

typedef flag inlist::inerr

Definition at line 97 of file f2c_gnu011.h.

typedef ftnint* inlist::inex

Definition at line 97 of file win32_f2c.h.

typedef ftnint* inlist::inex

Definition at line 101 of file f2c_gnu011.h.

typedef char* inlist::infile

Definition at line 95 of file win32_f2c.h.

typedef char* inlist::infile

Definition at line 99 of file f2c_gnu011.h.

typedef ftnlen inlist::infilen

Definition at line 96 of file win32_f2c.h.

typedef ftnlen inlist::infilen

Definition at line 100 of file f2c_gnu011.h.

typedef char* inlist::infmt

Definition at line 109 of file win32_f2c.h.

typedef char* inlist::infmt

Definition at line 113 of file f2c_gnu011.h.

typedef ftnlen inlist::infmtlen

Definition at line 110 of file win32_f2c.h.

typedef ftnlen inlist::infmtlen

Definition at line 114 of file f2c_gnu011.h.

typedef char* inlist::inform

Definition at line 111 of file win32_f2c.h.

typedef char* inlist::inform

Definition at line 115 of file f2c_gnu011.h.

typedef ftnint inlist::informlen

Definition at line 112 of file win32_f2c.h.

typedef ftnint inlist::informlen

Definition at line 116 of file f2c_gnu011.h.

typedef char* inlist::inname

Definition at line 101 of file win32_f2c.h.

typedef char* inlist::inname

Definition at line 105 of file f2c_gnu011.h.

typedef ftnint* inlist::innamed

Definition at line 100 of file win32_f2c.h.

typedef ftnint* inlist::innamed

Definition at line 104 of file f2c_gnu011.h.

typedef ftnlen inlist::innamlen

Definition at line 102 of file win32_f2c.h.

typedef ftnlen inlist::innamlen

Definition at line 106 of file f2c_gnu011.h.

typedef ftnint* inlist::innrec

Definition at line 116 of file win32_f2c.h.

typedef ftnint* inlist::innrec

Definition at line 120 of file f2c_gnu011.h.

typedef ftnint* inlist::innum

Definition at line 99 of file win32_f2c.h.

typedef ftnint* inlist::innum

Definition at line 103 of file f2c_gnu011.h.

typedef ftnint* inlist::inopen

Definition at line 98 of file win32_f2c.h.

typedef ftnint* inlist::inopen

Definition at line 102 of file f2c_gnu011.h.

typedef ftnint* inlist::inrecl

Definition at line 115 of file win32_f2c.h.

typedef ftnint* inlist::inrecl

Definition at line 119 of file f2c_gnu011.h.

typedef char* inlist::inseq

Definition at line 105 of file win32_f2c.h.

typedef char* inlist::inseq

Definition at line 109 of file f2c_gnu011.h.

typedef ftnlen inlist::inseqlen

Definition at line 106 of file win32_f2c.h.

typedef ftnlen inlist::inseqlen

Definition at line 110 of file f2c_gnu011.h.

typedef char* inlist::inunf

Definition at line 113 of file win32_f2c.h.

typedef char* inlist::inunf

Definition at line 117 of file f2c_gnu011.h.

typedef ftnlen inlist::inunflen

Definition at line 114 of file win32_f2c.h.

typedef ftnlen inlist::inunflen

Definition at line 118 of file f2c_gnu011.h.

typedef ftnint inlist::inunit

Definition at line 94 of file win32_f2c.h.

typedef ftnint inlist::inunit

Definition at line 98 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::IntegralHistogram Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::IntegralHistogram

BIAS::IntegralHistogram Class Reference
[PyramidImage, Camera, Histogram]

This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms. More...

#include <Image/IntegralHistogram.hh>

Collaboration diagram for BIAS::IntegralHistogram:

[legend]
List of all members.

Public Member Functions

double | CalcSimilarity (ColorHistogram< unsigned char > &chist1, int ux1, int uy1, int lx1, int ly1, ColorHistogram< unsigned char > &chist2, int ux2, int uy2, int lx2, int ly2, double weightSecond=0.5)
Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.
double | CalcSimilarity (ColorHistogram< unsigned char > &chist, int ux, int uy, int lx, int ly)
Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.
void Clear ()
Deletes ALL current Histogram information.
void | Dump (std::ostream &os, int y, int x)
dumps information on histogram
int | GenerateIntegralHist (BIAS::Image< unsigned char > &image, int nBinsize)
calcluates the histogram from the picture and fills the data structs
int | GenerateIntegralHistDiffBin (BIAS::Image< unsigned char > &image, int nBinsizeHue, int nBinsizeSat)
calcluates the histogram from the picture and fills the data structs
int | GetBinSize () const
GetBinSize.
int | GetBinSizeSat () const
GetBinSizeSat.
Vector< int > | GetHistogram (int ux, int uy, int lx, int ly)
Get Histogram.
IntegralHistogram ()
This class creates an IntegralHistogram in the HSL color space.
void | SetBinSize (int binsize)
set the binsize (must be divideable by 2pown)
void | SetExpDist (bool expdist)
sets expDist_ true or false, used to calculate the dist in CalcSimilarity
void | SetLambda (int lambda)
sets Lambda, which is used to calculate the dist in CalcSimilarity
void | SetMinSat (int minsat)
set minsat_, which defines the minimum saturation
~IntegralHistogram ()

Protected Member Functions

void | CopyNoCheck (const BIAS::Vector< int > &src, BIAS::Vector< int > &dst)

Protected Attributes

bool | bExpDist_
std::vector< std::vector<
double > > 		m_cHSData
std::vector< double > | m_cLData
TNT::Matrix< BIAS::Vector<
int > > 		mHists_
int | nBinsize_
int | nBinsizeSat_
int | nLambda_
int | nMinSat_
int | nOldBinsize_
int | nOldBinsizeSat_
int | nShift_
int | nShiftSat_

Detailed Description

This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms.

Author:
Ingo Schiller untested
Date:
25.Oktober 2004

Definition at line 53 of file IntegralHistogram.hh.

Constructor & Destructor Documentation

IntegralHistogram::IntegralHistogram ( )

This class creates an IntegralHistogram in the HSL color space.

Author:
ingo schiller
Date:
feb 2004

Definition at line 43 of file IntegralHistogram.cpp.

References bExpDist_, nBinsize_, nBinsizeSat_, nLambda_, nMinSat_, and nOldBinsize_.

IntegralHistogram::~IntegralHistogram ( )

Definition at line 54 of file IntegralHistogram.cpp.

References Clear().

Member Function Documentation

double IntegralHistogram::CalcSimilarity | ( | ColorHistogram< unsigned char > & | chist1,
 |  | int | ux1,
 |  | int | uy1,
 |  | int | lx1,
 |  | int | ly1,
 |  | ColorHistogram< unsigned char > & | chist2,
 |  | int | ux2,
 |  | int | uy2,
 |  | int | lx2,
 |  | int | ly2,
 |  | double | weightSecond = 0.5
 | ) |

Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.

The similarity is calculated for two image regions/histograms the resulting probability is the weighted sum of both.

Returns:
double value, which indicates the similarity. 1 if equal.
Author:
grest Oct 2005

Definition at line 434 of file IntegralHistogram.cpp.

References CalcSimilarity().

double IntegralHistogram::CalcSimilarity | ( | ColorHistogram< unsigned char > & | chist,
 |  | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

Calculates the Bhattacharyya similarity Coeiffient^2 which is the distance or difference of 2 colorhistograms.

Parameters:
chist | = the colorHistogram we compare with
roi | = the roi to compare with: upperx, uppery, lowerx, lowery
Returns:
double value, which indicates the similarity. 1 if similar.
Author:
Schiller oktober 2004

Definition at line 363 of file IntegralHistogram.cpp.

References BIAS::ColorHistogram< StorageType >::GetHist(), BIAS::ColorHistogram< StorageType >::GetHistL(), m_cHSData, m_cLData, mHists_, nBinsize_, nBinsizeSat_, and TNT::Vector< T >::size().

Referenced by CalcSimilarity(), and BIAS::CondensHisto::EvaluateFromIntegralHistoImage_().

void IntegralHistogram::Clear ( )

Deletes ALL current Histogram information.

Definition at line 65 of file IntegralHistogram.cpp.

References bExpDist_, nBinsize_, nBinsizeSat_, nLambda_, nMinSat_, and nOldBinsize_.

Referenced by ~IntegralHistogram().

void BIAS::IntegralHistogram::CopyNoCheck | ( | const BIAS::Vector< int > & | src,
 |  | BIAS::Vector< int > & | dst
 | ) | [inline, protected]

Definition at line 177 of file IntegralHistogram.hh.

References BIAS::Vector< T >::GetData(), and TNT::Vector< T >::size().

void IntegralHistogram::Dump | ( | std::ostream & | os,
 |  | int | y,
 |  | int | x
 | ) |

dumps information on histogram

Parameters:
os = the outstream, default std::cout
Author:
Schiller

Definition at line 452 of file IntegralHistogram.cpp.

References mHists_.

int IntegralHistogram::GenerateIntegralHist | ( | BIAS::Image< unsigned char > & | image,
 |  | int | nBinsize
 | ) |

calcluates the histogram from the picture and fills the data structs

Author:
Schiller
Parameters:
image = the image

Definition at line 98 of file IntegralHistogram.cpp.

References BIASERR, and BIAS::ImageBase::CM_HSL.

int IntegralHistogram::GenerateIntegralHistDiffBin | ( | BIAS::Image< unsigned char > & | image,
 |  | int | nBinsizeHue,
 |  | int | nBinsizeSat
 | ) |

calcluates the histogram from the picture and fills the data structs

Author:
Schiller
Parameters:
image | = the image
nBinsizeHue | = binsize in hue direction
nBinsizeSat | = binsize in sat direction

Definition at line 223 of file IntegralHistogram.cpp.

References BIASERR, BIAS::ImageBase::CM_HSL, and BIAS::ImageBase::GetColorModel().

Referenced by BIAS::CondensHisto::EvaluateFromIntegralHistoImage_().

int BIAS::IntegralHistogram::GetBinSize ( ) const [inline]

GetBinSize.

Definition at line 92 of file IntegralHistogram.hh.

int BIAS::IntegralHistogram::GetBinSizeSat ( ) const [inline]

GetBinSizeSat.

Definition at line 97 of file IntegralHistogram.hh.

Vector< int > IntegralHistogram::GetHistogram | ( | int | ux,
 |  | int | uy,
 |  | int | lx,
 |  | int | ly
 | ) |

Get Histogram.

Parameters:
roi = the Region in which the histogram should be created
Returns:
= Vector which holds teh Histogram, structure: binsizeSat * binsizeHue elements(hue and sat ) + binsizeSat elements(luminance) + totalNumber of entries (last element)

Definition at line 76 of file IntegralHistogram.cpp.

References mHists_.

void IntegralHistogram::SetBinSize ( int binsize )

set the binsize (must be divideable by 2pown)

Definition at line 60 of file IntegralHistogram.cpp.

References nBinsize_.

void BIAS::IntegralHistogram::SetExpDist ( bool expdist )

sets expDist_ true or false, used to calculate the dist in CalcSimilarity

void BIAS::IntegralHistogram::SetLambda ( int lambda )

sets Lambda, which is used to calculate the dist in CalcSimilarity

void BIAS::IntegralHistogram::SetMinSat ( int minsat )

set minsat_, which defines the minimum saturation

Member Data Documentation

bool BIAS::IntegralHistogram::bExpDist_ [protected]

Definition at line 169 of file IntegralHistogram.hh.

Referenced by Clear(), and IntegralHistogram().

std::vector<std::vector<double> > BIAS::IntegralHistogram::m_cHSData [protected]

Definition at line 164 of file IntegralHistogram.hh.

Referenced by CalcSimilarity().

std::vector<double> BIAS::IntegralHistogram::m_cLData [protected]

Definition at line 165 of file IntegralHistogram.hh.

Referenced by CalcSimilarity().

TNT::Matrix<BIAS::Vector<int> > BIAS::IntegralHistogram::mHists_ [protected]

Definition at line 163 of file IntegralHistogram.hh.

Referenced by CalcSimilarity(), Dump(), and GetHistogram().

int BIAS::IntegralHistogram::nBinsize_ [protected]

Definition at line 170 of file IntegralHistogram.hh.

Referenced by CalcSimilarity(), Clear(), IntegralHistogram(), and SetBinSize().

int BIAS::IntegralHistogram::nBinsizeSat_ [protected]

Definition at line 171 of file IntegralHistogram.hh.

Referenced by CalcSimilarity(), Clear(), and IntegralHistogram().

int BIAS::IntegralHistogram::nLambda_ [protected]

Definition at line 168 of file IntegralHistogram.hh.

Referenced by Clear(), and IntegralHistogram().

int BIAS::IntegralHistogram::nMinSat_ [protected]

Definition at line 167 of file IntegralHistogram.hh.

Referenced by Clear(), and IntegralHistogram().

int BIAS::IntegralHistogram::nOldBinsize_ [protected]

Definition at line 172 of file IntegralHistogram.hh.

Referenced by Clear(), and IntegralHistogram().

int BIAS::IntegralHistogram::nOldBinsizeSat_ [protected]

Definition at line 173 of file IntegralHistogram.hh.

int BIAS::IntegralHistogram::nShift_ [protected]

Definition at line 175 of file IntegralHistogram.hh.

int BIAS::IntegralHistogram::nShiftSat_ [protected]

Definition at line 176 of file IntegralHistogram.hh.

The documentation for this class was generated from the following files:
  • Image/IntegralHistogram.hh
  • Image/IntegralHistogram.cpp
Generated on Wed Jun 21 19:08:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Interpolator Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Interpolator

BIAS::Interpolator Class Reference
[Algorithms]

this class interpolates a function y=f(t) between given control points (the y-values) More...

#include <MathAlgo/Interpolator.hh>

Inheritance diagram for BIAS::Interpolator:

[legend]
Collaboration diagram for BIAS::Interpolator:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | Bezier3 (BIAS::Vector3< double > &res, double t)
3 dimensional case 28.04.03 tested and working
int | Bezier3 (BIAS::Vector2< double > &res, double t)
2 dimensional case tested 28.04.03
int | Bezier3 (double &res, double t)
these functions do the bezier interpolation as described in David Salomon 4.14.19 which reaches each control point /////////////////////////////////////////// IMPORTANT NOTICE: if the knotpoints are not set, the value of t must be between 0 and 1! if t > 1 the value of the last controlpoint is returned! /////////////////////////////////////////// calculates P(t)= tvector(t)*nmatrix*cpoints
void Clear ()
resets everything.
void ClearEndTangent ()
void ClearStartTangent ()
bool | DebugLevelIsSet (long int lv) const
void | DrawBezierCoords2 (Image< unsigned char > &img)
void | GetControlPoints (std::vector< BIAS::Vector3< double > > &cPnt) const
void | GetControlPoints (std::vector< BIAS::Vector2< double > > &cPnt) const
void | GetControlPoints (std::vector< double > &cPnt) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetKnotPoints (std::vector< double > &kPnt) const
void | InitBezier (int dim_of_CP)
here the calculation of all coefficients for the bezier interpolation is done and the nmatrix is set is called by Bezier3() if not called manually
void InitSpline ()
call this for restart at t= first knot point initiates recalculation of all polynom coeefficients at first call of Spline()
Interpolator (const Interpolator &ip)
Interpolator ()
int | PrepareLuTSpline (double min, double max, unsigned int N, unsigned int k=3)
Prepare Look-up-Table in range [min,max] with N samples.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetControlPoints (const std::vector< BIAS::Vector3< double > > &cPnt)
void | SetControlPoints (const std::vector< BIAS::Vector2< double > > &cPnt)
void | SetControlPoints (const std::vector< double > &cPnt1)
set the control points, which control the interpolating curve
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetEndTangent (BIAS::Vector3< double > endTangent)
void | SetEndTangent (BIAS::Vector2< double > endTangent)
void | SetEndTangent (double endTangent)
void | SetKnotPoints (const std::vector< double > &kPnt)
set the additional knot points, if you want nonuniform interpolation.
void | SetStartTangent (BIAS::Vector3< double > startTangent)
void | SetStartTangent (BIAS::Vector2< double > startTangent)
void | SetStartTangent (double startTangent)
int | Spline (BIAS::Vector3< double > &res, double t, unsigned int k=3)
int | Spline (BIAS::Vector2< double > &res, double t, unsigned int k=3)
int | Spline (double &res, double t, unsigned int k=3)
these functions do the Spline interpolation which reaches each control point.
int | SplineFromLuT (double &res, double t) const
Get spline interpolation using Look-up-Table.
~Interpolator ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | fakima (BIAS::Vector< double > &a, BIAS::Vector< double > Px, BIAS::Vector< double > Py, int from, int to, int intervall)
void | InitLinear (std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt)
void | InitSpline (unsigned int k, unsigned int dim)
void | InitSpline2 (std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent=0)
void | InitSpline3 (std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent=0, double endTangent=0)
void | InitSplineAkima (std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent, double endTangent)
bool | validate (double &t)

Protected Attributes

long int | _liDebugLevel
int | actIndex_
bool | bezierInitialized_
std::vector< double > | bXK_1_
std::vector< double > | bXK_2_
std::vector< double > | bXK_3_
std::vector< double > | bYK_1_
std::vector< double > | bYK_2_
std::vector< double > | bYK_3_
double | endTangentX_
double | endTangentY_
double | endTangentZ_
unsigned int | initializedPoly_
std::vector< double > | KPts_
std::vector< double > | listPntDim1_
std::vector< double > | listPntDim2_
std::vector< double > | listPntDim3_
std::vector< BIAS::Vector<
double > > 		listPolynoms1_
std::vector< BIAS::Vector<
double > > 		listPolynoms2_
std::vector< BIAS::Vector<
double > > 		listPolynoms3_
double | LuTMax1_
double | LuTMin1_
double | LuTSampleDist1_
BIAS::Matrix< double > | nmatrix_
std::vector< double > | SplineLuT1_
double | startTangentX_
double | startTangentY_
double | startTangentZ_
std::vector< double > | T_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

this class interpolates a function y=f(t) between given control points (the y-values)

this class interpolates a function y=f(t) with different algorithms between given control points (the y-values), which can be one, two or three dimensional. Interpolation means, the curve reaches all control points.

usage:

  1. SetControlPoints()

  1. optional: SetKnotPoints(), if not set the t values range form 0 to 1 such that the controlpoints are uniformly spaced

  1. call a Interpolation function, like Spline() or Bezier3()

see also 'Computer Graphics & Geometric Modeling' from David Salomon

Author:
Daniel Grest, Juli 2002

Definition at line 67 of file Interpolator.hh.

Constructor & Destructor Documentation

Interpolator::Interpolator ( )

Definition at line 39 of file Interpolator.cpp.

References actIndex_, bezierInitialized_, endTangentX_, endTangentY_, endTangentZ_, initializedPoly_, TNT::Matrix< T >::newsize(), nmatrix_, startTangentX_, startTangentY_, and startTangentZ_.

BIAS::Interpolator::Interpolator ( const Interpolator & ip ) [inline]

Definition at line 72 of file Interpolator.hh.

BIAS::Interpolator::~Interpolator ( ) [inline]

Definition at line 74 of file Interpolator.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int Interpolator::Bezier3 | ( | BIAS::Vector3< double > & | res,
 |  | double | t
 | ) |

3 dimensional case 28.04.03 tested and working

Author:
Ingo Schiller
detection in which segment t is found starting with a segment 0

Definition at line 1015 of file Interpolator.cpp.

References actIndex_, bezierInitialized_, BIASERR, InitBezier(), KPts_, listPntDim1_, listPntDim2_, listPntDim3_, and validate().

int Interpolator::Bezier3 | ( | BIAS::Vector2< double > & | res,
 |  | double | t
 | ) |

2 dimensional case tested 28.04.03

Author:
Ingo Schiller
detection in which segment t is found starting with a segment 0

Definition at line 928 of file Interpolator.cpp.

References actIndex_, bezierInitialized_, BIASERR, InitBezier(), KPts_, listPntDim1_, listPntDim2_, and validate().

int Interpolator::Bezier3 | ( | double & | res,
 |  | double | t
 | ) |

these functions do the bezier interpolation as described in David Salomon 4.14.19 which reaches each control point /////////////////////////////////////////// IMPORTANT NOTICE: if the knotpoints are not set, the value of t must be between 0 and 1! if t > 1 the value of the last controlpoint is returned! /////////////////////////////////////////// calculates P(t)= tvector(t)*nmatrix*cpoints

Author:
Ingo Schiller
Parameters:
reference | to the result(return value)
time | t of which value is to be calculated

Definition at line 850 of file Interpolator.cpp.

References actIndex_, bezierInitialized_, BIASERR, InitBezier(), KPts_, listPntDim1_, and validate().

void Interpolator::Clear ( )

resets everything.

clears all lists and calls constructor

Definition at line 59 of file Interpolator.cpp.

References bezierInitialized_, bXK_1_, bXK_2_, bXK_3_, bYK_1_, bYK_2_, bYK_3_, endTangentX_, endTangentY_, endTangentZ_, initializedPoly_, KPts_, listPntDim1_, listPntDim2_, listPntDim3_, listPolynoms1_, listPolynoms2_, listPolynoms3_, startTangentX_, startTangentY_, startTangentZ_, and T_.

void BIAS::Interpolator::ClearEndTangent ( ) [inline]

Definition at line 124 of file Interpolator.hh.

void BIAS::Interpolator::ClearStartTangent ( ) [inline]

Definition at line 113 of file Interpolator.hh.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void BIAS::Interpolator::DrawBezierCoords2 ( Image< unsigned char > & img )

void Interpolator::fakima | ( | BIAS::Vector< double > & | a,
 |  | BIAS::Vector< double > | Px,
 |  | BIAS::Vector< double > | Py,
 |  | int | from,
 |  | int | to,
 |  | int | intervall
 | ) | [protected]

Definition at line 248 of file Interpolator.cpp.

References TNT::Lapack_LU_linear_solve().

Referenced by InitSplineAkima().

void Interpolator::GetControlPoints ( std::vector< BIAS::Vector3< double > > & cPnt ) const

Definition at line 119 of file Interpolator.cpp.

References listPntDim1_, listPntDim2_, and listPntDim3_.

void BIAS::Interpolator::GetControlPoints ( std::vector< BIAS::Vector2< double > > & cPnt ) const

void BIAS::Interpolator::GetControlPoints ( std::vector< double > & cPnt ) const [inline]

Definition at line 87 of file Interpolator.hh.

Referenced by BIAS::ProjectionParametersSpherical::XMLOut().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Interpolator::GetKnotPoints ( std::vector< double > & kPnt ) const [inline]

Definition at line 99 of file Interpolator.hh.

Referenced by BIAS::ProjectionParametersSpherical::XMLOut().

void Interpolator::InitBezier ( int dim_of_CP )

here the calculation of all coefficients for the bezier interpolation is done and the nmatrix is set is called by Bezier3() if not called manually

Author:
Ingo Schiller
Parameters:
dimension of Control Points

Definition at line 681 of file Interpolator.cpp.

References bezierInitialized_, BIASDOUT, bXK_1_, bYK_1_, D_INTERPOL_BEZIER, endTangentX_, endTangentY_, endTangentZ_, BIAS::Matrix< T >::Fill(), listPntDim1_, nmatrix_, startTangentX_, startTangentY_, and startTangentZ_.

Referenced by Bezier3(), initDim1(), and initDim2().

void Interpolator::InitLinear | ( | std::vector< BIAS::Vector< double > > & | listP,
 |  | std::vector< double > | listPnt
 | ) | [protected]

Definition at line 500 of file Interpolator.cpp.

References a, initializedPoly_, KPts_, and T_.

Referenced by InitSpline(), and InitSpline2().

void Interpolator::InitSpline | ( | unsigned int | k,
 |  | unsigned int | dim
 | ) | [protected]

Definition at line 517 of file Interpolator.cpp.

References actIndex_, endTangentX_, endTangentY_, endTangentZ_, InitLinear(), InitSpline2(), InitSpline3(), InitSplineAkima(), listPntDim1_, listPntDim2_, listPntDim3_, listPolynoms1_, listPolynoms2_, listPolynoms3_, startTangentX_, startTangentY_, and startTangentZ_.

void Interpolator::InitSpline ( )

call this for restart at t= first knot point initiates recalculation of all polynom coeefficients at first call of Spline()

Definition at line 167 of file Interpolator.cpp.

References initializedPoly_.

Referenced by BIAS::UnVignette::Init(), BIAS::SphericalUndistortion::Init(), initDim1(), initDim2(), main(), BIAS::ProjectionParametersSpherical::SetUndistortion(), and Spline().

void Interpolator::InitSpline2 | ( | std::vector< BIAS::Vector< double > > & | listP,
 |  | std::vector< double > | listPnt,
 |  | double | startTangent = 0
 | ) | [protected]

Definition at line 463 of file Interpolator.cpp.

References a, BIASDOUT, D_INTERPOL_SPLINE2, initializedPoly_, InitLinear(), and KPts_.

Referenced by InitSpline(), InitSpline3(), and InitSplineAkima().

void Interpolator::InitSpline3 | ( | std::vector< BIAS::Vector< double > > & | listP,
 |  | std::vector< double > | listPnt,
 |  | double | startTangent = 0,
 |  | double | endTangent = 0
 | ) | [protected]

Definition at line 337 of file Interpolator.cpp.

References a, BIASDOUT, D_INTERPOL_SPLINE3, BIAS::Matrix< T >::Fill(), initializedPoly_, InitSpline2(), TNT::Lapack_LU_linear_solve(), and T_.

Referenced by InitSpline().

void Interpolator::InitSplineAkima | ( | std::vector< BIAS::Vector< double > > & | listP,
 |  | std::vector< double > | listPnt,
 |  | double | startTangent,
 |  | double | endTangent
 | ) | [protected]

Definition at line 173 of file Interpolator.cpp.

References a, BIASDOUT, D_INTERPOL_SPLINE3, fakima(), initializedPoly_, InitSpline2(), and KPts_.

Referenced by InitSpline().

int Interpolator::PrepareLuTSpline | ( | double | min,
 |  | double | max,
 |  | unsigned int | N,
 |  | unsigned int | k = 3
 | ) |

Prepare Look-up-Table in range [min,max] with N samples.

Prepare a Look-up-Table for spline interpolation in the range [min,max] with N samples. Use SplineFromLuT() afterwards;

Author:
evers
Date:
2005-04-15

Definition at line 1105 of file Interpolator.cpp.

References LuTMax1_, LuTMin1_, LuTSampleDist1_, Spline(), and SplineLuT1_.

Referenced by BIAS::UnVignette::Init(), BIAS::SphericalUndistortion::Init(), main(), and BIAS::ProjectionParametersSpherical::SetUndistortion().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void Interpolator::SetControlPoints ( const std::vector< BIAS::Vector3< double > > & cPnt )

Definition at line 96 of file Interpolator.cpp.

References listPntDim1_, listPntDim2_, and listPntDim3_.

void BIAS::Interpolator::SetControlPoints ( const std::vector< BIAS::Vector2< double > > & cPnt )

void BIAS::Interpolator::SetControlPoints ( const std::vector< double > & cPnt1 ) [inline]

set the control points, which control the interpolating curve

Definition at line 83 of file Interpolator.hh.

Referenced by BIAS::UnVignette::Init(), BIAS::SphericalUndistortion::Init(), initDim1(), initDim2(), main(), and BIAS::ProjectionParametersSpherical::SetUndistortion().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::Interpolator::SetEndTangent ( BIAS::Vector3< double > endTangent ) [inline]

Definition at line 120 of file Interpolator.hh.

void BIAS::Interpolator::SetEndTangent ( BIAS::Vector2< double > endTangent ) [inline]

Definition at line 118 of file Interpolator.hh.

void BIAS::Interpolator::SetEndTangent ( double endTangent ) [inline]

Definition at line 117 of file Interpolator.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void Interpolator::SetKnotPoints ( const std::vector< double > & kPnt )

set the additional knot points, if you want nonuniform interpolation.

Otherwise they will be uniformly spaced. The values in kPnt must be increasing, such that kPnt[i]<kPnt[i+1]

Definition at line 156 of file Interpolator.cpp.

References KPts_, and T_.

Referenced by BIAS::UnVignette::Init(), BIAS::SphericalUndistortion::Init(), initDim1(), initDim2(), main(), and BIAS::ProjectionParametersSpherical::SetUndistortion().

void BIAS::Interpolator::SetStartTangent ( BIAS::Vector3< double > startTangent ) [inline]

Definition at line 109 of file Interpolator.hh.

void BIAS::Interpolator::SetStartTangent ( BIAS::Vector2< double > startTangent ) [inline]

Definition at line 106 of file Interpolator.hh.

void BIAS::Interpolator::SetStartTangent ( double startTangent ) [inline]

Definition at line 103 of file Interpolator.hh.

int Interpolator::Spline | ( | BIAS::Vector3< double > & | res,
 |  | double | t,
 |  | unsigned int | k = 3
 | ) |

Definition at line 639 of file Interpolator.cpp.

References actIndex_, BIASDOUT, BIASERR, D_INTERPOL_COMMON, initializedPoly_, InitSpline(), KPts_, listPntDim1_, listPntDim2_, listPntDim3_, listPolynoms1_, listPolynoms2_, listPolynoms3_, BIAS::Vector3< T >::Set(), T_, and validate().

int Interpolator::Spline | ( | BIAS::Vector2< double > & | res,
 |  | double | t,
 |  | unsigned int | k = 3
 | ) |

Definition at line 609 of file Interpolator.cpp.

References actIndex_, BIASERR, initializedPoly_, InitSpline(), KPts_, listPntDim1_, listPntDim2_, listPolynoms1_, listPolynoms2_, BIAS::Vector2< T >::Set(), T_, and validate().

int Interpolator::Spline | ( | double & | res,
 |  | double | t,
 |  | unsigned int | k = 3
 | ) |

these functions do the Spline interpolation which reaches each control point.

k is the degree of the interpolation polynom. implemented for k=1,2,3,4 (linear, quadratic splines, cubic splines, akima cubic splines) If no start or end tangents are set, the end condition is relaxed for cubic and akima splines.

Definition at line 576 of file Interpolator.cpp.

References actIndex_, BIASERR, initializedPoly_, InitSpline(), KPts_, listPntDim1_, listPolynoms1_, and validate().

Referenced by BIAS::SphericalUndistortion::CorrectVignette(), BIAS::SphericalUndistortion::Init(), main(), BIAS::UnVignette::PrepareLuImage_(), PrepareLuTSpline(), and BIAS::ProjectionParametersSpherical::SetUndistortion().

int Interpolator::SplineFromLuT | ( | double & | res,
 |  | double | t
 | ) | const

Get spline interpolation using Look-up-Table.

return code is negativ if argument is out of bound os LuT

Author:
evers
Date:
2005-04-15

Definition at line 1125 of file Interpolator.cpp.

References BIASASSERT, LuTMax1_, LuTMin1_, LuTSampleDist1_, and SplineLuT1_.

Referenced by BIAS::SphericalUndistortion::DrawCircles(), main(), BIAS::UnVignette::PrepareLuImage_(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), and BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_().

bool Interpolator::validate ( double & t ) [protected]

Definition at line 131 of file Interpolator.cpp.

References BIASDOUT, D_INTERPOL_COMMON, KPts_, listPntDim1_, and T_.

Referenced by Bezier3(), and Spline().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

int BIAS::Interpolator::actIndex_ [protected]

Definition at line 257 of file Interpolator.hh.

Referenced by Bezier3(), InitSpline(), Interpolator(), and Spline().

bool BIAS::Interpolator::bezierInitialized_ [protected]

Definition at line 261 of file Interpolator.hh.

Referenced by Bezier3(), Clear(), InitBezier(), and Interpolator().

std::vector<double> BIAS::Interpolator::bXK_1_ [protected]

Definition at line 240 of file Interpolator.hh.

Referenced by Clear(), and InitBezier().

std::vector<double> BIAS::Interpolator::bXK_2_ [protected]

Definition at line 241 of file Interpolator.hh.

Referenced by Clear().

std::vector<double> BIAS::Interpolator::bXK_3_ [protected]

Definition at line 242 of file Interpolator.hh.

Referenced by Clear().

std::vector<double> BIAS::Interpolator::bYK_1_ [protected]

Definition at line 244 of file Interpolator.hh.

Referenced by Clear(), and InitBezier().

std::vector<double> BIAS::Interpolator::bYK_2_ [protected]

Definition at line 245 of file Interpolator.hh.

Referenced by Clear().

std::vector<double> BIAS::Interpolator::bYK_3_ [protected]

Definition at line 246 of file Interpolator.hh.

Referenced by Clear().

double BIAS::Interpolator::endTangentX_ [protected]

Definition at line 253 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

double BIAS::Interpolator::endTangentY_ [protected]

Definition at line 254 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

double BIAS::Interpolator::endTangentZ_ [protected]

Definition at line 255 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::Interpolator::initializedPoly_ [protected]

Definition at line 259 of file Interpolator.hh.

Referenced by Clear(), InitLinear(), InitSpline(), InitSpline2(), InitSpline3(), InitSplineAkima(), Interpolator(), and Spline().

std::vector<double> BIAS::Interpolator::KPts_ [protected]

Definition at line 226 of file Interpolator.hh.

Referenced by Bezier3(), Clear(), InitLinear(), InitSpline2(), InitSplineAkima(), SetKnotPoints(), Spline(), and validate().

std::vector<double> BIAS::Interpolator::listPntDim1_ [protected]

Definition at line 230 of file Interpolator.hh.

Referenced by Bezier3(), Clear(), GetControlPoints(), InitBezier(), InitSpline(), SetControlPoints(), Spline(), and validate().

std::vector<double> BIAS::Interpolator::listPntDim2_ [protected]

Definition at line 231 of file Interpolator.hh.

Referenced by Bezier3(), Clear(), GetControlPoints(), InitSpline(), SetControlPoints(), and Spline().

std::vector<double> BIAS::Interpolator::listPntDim3_ [protected]

Definition at line 232 of file Interpolator.hh.

Referenced by Bezier3(), Clear(), GetControlPoints(), InitSpline(), SetControlPoints(), and Spline().

std::vector<BIAS::Vector<double> > BIAS::Interpolator::listPolynoms1_ [protected]

Definition at line 235 of file Interpolator.hh.

Referenced by Clear(), InitSpline(), and Spline().

std::vector<BIAS::Vector<double> > BIAS::Interpolator::listPolynoms2_ [protected]

Definition at line 236 of file Interpolator.hh.

Referenced by Clear(), InitSpline(), and Spline().

std::vector<BIAS::Vector<double> > BIAS::Interpolator::listPolynoms3_ [protected]

Definition at line 237 of file Interpolator.hh.

Referenced by Clear(), InitSpline(), and Spline().

double BIAS::Interpolator::LuTMax1_ [protected]

Definition at line 264 of file Interpolator.hh.

Referenced by PrepareLuTSpline(), and SplineFromLuT().

double BIAS::Interpolator::LuTMin1_ [protected]

Definition at line 264 of file Interpolator.hh.

Referenced by PrepareLuTSpline(), and SplineFromLuT().

double BIAS::Interpolator::LuTSampleDist1_ [protected]

Definition at line 264 of file Interpolator.hh.

Referenced by PrepareLuTSpline(), and SplineFromLuT().

BIAS::Matrix<double> BIAS::Interpolator::nmatrix_ [protected]

Definition at line 248 of file Interpolator.hh.

Referenced by InitBezier(), and Interpolator().

std::vector<double> BIAS::Interpolator::SplineLuT1_ [protected]

Definition at line 263 of file Interpolator.hh.

Referenced by PrepareLuTSpline(), and SplineFromLuT().

double BIAS::Interpolator::startTangentX_ [protected]

Definition at line 250 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

double BIAS::Interpolator::startTangentY_ [protected]

Definition at line 251 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

double BIAS::Interpolator::startTangentZ_ [protected]

Definition at line 252 of file Interpolator.hh.

Referenced by Clear(), InitBezier(), InitSpline(), and Interpolator().

std::vector<double> BIAS::Interpolator::T_ [protected]

Definition at line 227 of file Interpolator.hh.

Referenced by Clear(), InitLinear(), InitSpline3(), SetKnotPoints(), Spline(), and validate().

The documentation for this class was generated from the following files:
  • MathAlgo/Interpolator.hh
  • MathAlgo/Interpolator.cpp
Generated on Wed Jun 21 19:08:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ItemAndWidget Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ItemAndWidget

BIAS::ItemAndWidget Struct Reference

#include <Gui/ParamGUI.hh>

Collaboration diagram for BIAS::ItemAndWidget:

[legend]
List of all members.

Public Attributes

BIAS::ParamTypeBase * item
wxControl * widget

Detailed Description

Definition at line 21 of file ParamGUI.hh.

Member Data Documentation

BIAS::ParamTypeBase* BIAS::ItemAndWidget::item

Definition at line 23 of file ParamGUI.hh.

Referenced by BIAS::ParamGUIPanel::AddBoolWidgets(), BIAS::ParamGUIPanel::AddDoubleWidgets(), BIAS::ParamGUIPanel::AddIntWidgets(), BIAS::ParamGUIPanel::AddStringWidgets(), BIAS::ParamGUIPanel::AddVecDblWidgets(), and BIAS::ParamGUIPanel::AddVecIntWidgets().

wxControl* BIAS::ItemAndWidget::widget

Definition at line 22 of file ParamGUI.hh.

Referenced by BIAS::ParamGUIPanel::AddBoolWidgets(), BIAS::ParamGUIPanel::AddDoubleWidgets(), BIAS::ParamGUIPanel::AddIntWidgets(), BIAS::ParamGUIPanel::AddStringWidgets(), BIAS::ParamGUIPanel::AddVecDblWidgets(), and BIAS::ParamGUIPanel::AddVecIntWidgets().

The documentation for this struct was generated from the following file:
  • Gui/ParamGUI.hh
Generated on Wed Jun 21 19:08:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::JpegHandler Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::JpegHandler

BIAS::JpegHandler Class Reference

#include <Image/CompressJpeg.hh>

List of all members.

Public Member Functions

int | Compress (unsigned int width, unsigned int height, unsigned int channels, unsigned char *data, int quality=60)
Start compression for image.
int | Compress (BIAS::Image< unsigned char > &srcImg, int quality=60)
Start compression for given BIAS::Image.
int | Decompress (unsigned int &width, unsigned int &height, unsigned int &channels, unsigned char *&data)
Start decompression of previous given data (from ReadJPEG or SetCompressedData), results will be stored in 'data','width',.
int | Decompress (BIAS::Image< unsigned char > &destImg)
Start decompression of previous given data (from ReadJPEG or SetCompressedData), results will be stored in 'destImg'.
void | GetCompressedData (void *&data, long &length)
Get pointer to memory where to find compressed data and its length in byte NO copy will be used, so make sure it's still valid when starting Decompress or reusing this!!!
int | Init (long size=1048576)
(Re-)Initialize object with standard values and limit shared memory area to 'size' (in Byte, default 1MB)
JpegHandler ()
Standard constructor.
int | ReadJPEG (const string &filename)
Read JPEG-file named 'filename' and store its informations in compressed data field.
void Release ()
Releases allocated mem-structures.
void | SetCompressedData (void *data, long length)
Copy memory-area in which compressed data can be found and set its length in byte.
int | WriteJPEG (const string &filename)
Write previously compressed data to file named filename.
virtual | ~JpegHandler ()
Standard destructor.

Protected Attributes

long | buffsize_
void * data_
long | dataLength_
bool | setup_

Detailed Description

Definition at line 60 of file CompressJpeg.hh.

Constructor & Destructor Documentation

JpegHandler::JpegHandler ( )

Standard constructor.

Definition at line 618 of file CompressJpeg.cpp.

References buffsize_, data_, dataLength_, and setup_.

JpegHandler::~JpegHandler ( ) [virtual]

Standard destructor.

Definition at line 627 of file CompressJpeg.cpp.

References Release(), and setup_.

Member Function Documentation

int JpegHandler::Compress | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | unsigned char * | data,
 |  | int | quality = 60
 | ) |

Start compression for image.

Definition at line 684 of file CompressJpeg.cpp.

References BIASERR, buffsize_, create_JPEG_file(), data_, dataLength_, image_buffer, image_channels, image_height, image_width, and setup_.

int JpegHandler::Compress | ( | BIAS::Image< unsigned char > & | srcImg,
 |  | int | quality = 60
 | ) |

Start compression for given BIAS::Image.

Definition at line 661 of file CompressJpeg.cpp.

References BIASERR, buffsize_, create_JPEG_file(), data_, dataLength_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), image_buffer, image_channels, image_height, image_width, and setup_.

Referenced by BIAS::VideoServer::ProcessOneImage().

int JpegHandler::Decompress | ( | unsigned int & | width,
 |  | unsigned int & | height,
 |  | unsigned int & | channels,
 |  | unsigned char *& | data
 | ) |

Start decompression of previous given data (from ReadJPEG or SetCompressedData), results will be stored in 'data','width',.

... New mem for 'data' will only be allocated if 'data == NULL', else old allocated mem will be used (!!!so set data=NULL if not shure about it's size!!!)

Definition at line 718 of file CompressJpeg.cpp.

References BIASERR, data_, dataLength_, deflate_JPEG_file(), and setup_.

int JpegHandler::Decompress ( BIAS::Image< unsigned char > & destImg )

Start decompression of previous given data (from ReadJPEG or SetCompressedData), results will be stored in 'destImg'.

Decompress will initialize 'destImg' properly if it isn't.

Definition at line 708 of file CompressJpeg.cpp.

References BIASERR, data_, dataLength_, deflate_JPEG_file(), and setup_.

Referenced by BIAS::VideoSource_Net::GrabSingle().

void BIAS::JpegHandler::GetCompressedData | ( | void *& | data,
 |  | long & | length
 | ) | [inline]

Get pointer to memory where to find compressed data and its length in byte NO copy will be used, so make sure it's still valid when starting Decompress or reusing this!!!

Definition at line 119 of file CompressJpeg.hh.

References data_, and dataLength_.

int JpegHandler::Init ( long size = 1048576 )

(Re-)Initialize object with standard values and limit shared memory area to 'size' (in Byte, default 1MB)

!!! Init object BEVOR first use !!!

(reinit only requiered for changing buffer size)

Definition at line 631 of file CompressJpeg.cpp.

References BIASERR, buffsize_, data_, Release(), and setup_.

Referenced by BIAS::VideoServer::Init(), and BIAS::VideoSource_Net::VideoSource_Net().

int JpegHandler::ReadJPEG ( const string & filename )

Read JPEG-file named 'filename' and store its informations in compressed data field.

Definition at line 753 of file CompressJpeg.cpp.

References BIASERR, buffsize_, data_, dataLength_, and setup_.

void JpegHandler::Release ( )

Releases allocated mem-structures.

Use it to regain memory but call Init again bevor using object afterwards!!!

Definition at line 652 of file CompressJpeg.cpp.

References buffsize_, data_, and setup_.

Referenced by BIAS::VideoSource_Net::CloseDevice(), Init(), and ~JpegHandler().

void BIAS::JpegHandler::SetCompressedData | ( | void * | data,
 |  | long | length
 | ) | [inline]

Copy memory-area in which compressed data can be found and set its length in byte.

Definition at line 128 of file CompressJpeg.hh.

References data_, and dataLength_.

Referenced by BIAS::VideoSource_Net::GrabSingle().

int JpegHandler::WriteJPEG ( const string & filename )

Write previously compressed data to file named filename.

Definition at line 729 of file CompressJpeg.cpp.

References BIASERR, data_, dataLength_, and setup_.

Member Data Documentation

long BIAS::JpegHandler::buffsize_ [protected]

Definition at line 152 of file CompressJpeg.hh.

Referenced by Compress(), Init(), JpegHandler(), ReadJPEG(), and Release().

void* BIAS::JpegHandler::data_ [protected]

Definition at line 146 of file CompressJpeg.hh.

Referenced by Compress(), Decompress(), GetCompressedData(), Init(), JpegHandler(), ReadJPEG(), Release(), SetCompressedData(), and WriteJPEG().

long BIAS::JpegHandler::dataLength_ [protected]

Definition at line 149 of file CompressJpeg.hh.

Referenced by Compress(), Decompress(), GetCompressedData(), JpegHandler(), ReadJPEG(), SetCompressedData(), and WriteJPEG().

bool BIAS::JpegHandler::setup_ [protected]

Definition at line 155 of file CompressJpeg.hh.

Referenced by Compress(), Decompress(), Init(), JpegHandler(), ReadJPEG(), Release(), WriteJPEG(), and ~JpegHandler().

The documentation for this class was generated from the following files:
  • Image/CompressJpeg.hh
  • Image/CompressJpeg.cpp
Generated on Wed Jun 21 19:08:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Kalman Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Kalman

BIAS::Kalman Class Reference

Classical Kalman filter. More...

#include <StateEstimator/Kalman.hh>

Inheritance diagram for BIAS::Kalman:

[legend]
Collaboration diagram for BIAS::Kalman:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | GetCovariance (Matrix< double > &cov) const
Returns the system state covariance.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetState (Vector< double > &state) const
Returns the system state.
void | Init (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance)
Kalman (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance)
Kalman ()
void | Predict (const Matrix< double > &SystemMatrix, const Matrix< double > &ProcessCovariance)
Use this prediction function system in case of varying system matrix A.
void | Predict (const Matrix< double > &ProcessCovariance)
Calculates the prediction using the system matrix A.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Update (const Vector< double > &Measurement, const Matrix< double > &MeasurementCovariance)
Calculates the update step.
~Kalman ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
Matrix< double > | A_
measurement matrix and transposed
Matrix< double > | AT_
Matrix< double > | Covariance_
The covariance matrix corresponding to State_.
Matrix< double > | H_
measurement matrix and transposed
Matrix< double > | HT_
Matrix< double > | Identity_
identity matrix
int | MeasurementDim_
Vector< double > | State_
Contains either the prediction (prior) or Bayes optimal system estimate (posterior) depending what function (Predict()/Update()) wascalled last.
SVD svd_
needed for matrix inversion
int | SystemStateDim_
dimensions of system space and measurement space

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Classical Kalman filter.

See http://www.cs.unc.edu/~welch/kalman/ for details.

Initialize it by either

  • either calling Init
  • or calling the approbriate constructor with the initial system state, the system matrix and the measurement matrix.

Use it by consecutively call

  • Predict()
  • Update()

Extract the prediction (prior) by calling GetState() and GetCovariance() after the Predict() step.

Extract the estimated system state by calling GetState() and GetCovariance() after the Update() step.

Author:
Felix Woelk 05/2005, untested so far

Definition at line 59 of file Kalman.hh.

Constructor & Destructor Documentation

Kalman::Kalman ( )

Definition at line 10 of file Kalman.cpp.

References MeasurementDim_, and SystemStateDim_.

Kalman::Kalman | ( | const Matrix< double > & | SystemMatrix,
 |  | const Matrix< double > & | MeasurementMatrix,
 |  | const Vector< double > & | InitialSystemState,
 |  | const Matrix< double > & | InitialSystemCovariance
 | ) |

Definition at line 15 of file Kalman.cpp.

References Init().

Kalman::~Kalman ( )

Definition at line 24 of file Kalman.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void BIAS::Kalman::GetCovariance ( Matrix< double > & cov ) const [inline]

Returns the system state covariance.

It could be the covariance of the prediction, if called after the predict step or the covariance of the posterior, if GetState is called after the update step.

Author:
woelk 05/2005

Definition at line 101 of file Kalman.hh.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Kalman::GetState ( Vector< double > & state ) const [inline]

Returns the system state.

It could be the prediction, if called after the predict step or the posterior, if GetState is called after the update step.

Author:
woelk 05/2005

Definition at line 94 of file Kalman.hh.

Referenced by main().

void Kalman::Init | ( | const Matrix< double > & | SystemMatrix,
 |  | const Matrix< double > & | MeasurementMatrix,
 |  | const Vector< double > & | InitialSystemState,
 |  | const Matrix< double > & | InitialSystemCovariance
 | ) |

Definition at line 27 of file Kalman.cpp.

References A_, AT_, BIASASSERT, Covariance_, H_, HT_, Identity_, MeasurementDim_, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Matrix< T >::SetIdentity(), TNT::Vector< T >::size(), State_, SystemStateDim_, and BIAS::Matrix< T >::Transpose().

Referenced by Kalman(), and main().

void Kalman::Predict | ( | const Matrix< double > & | SystemMatrix,
 |  | const Matrix< double > & | ProcessCovariance
 | ) |

Use this prediction function system in case of varying system matrix A.

Author:
woelk 05/2005

Definition at line 59 of file Kalman.cpp.

References A_, AT_, BIASASSERT, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), Predict(), SystemStateDim_, and BIAS::Matrix< T >::Transpose().

void Kalman::Predict ( const Matrix< double > & ProcessCovariance )

Calculates the prediction using the system matrix A.

Author:
woelk 05/2005

Definition at line 51 of file Kalman.cpp.

References A_, AT_, BIASASSERT, Covariance_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and State_.

Referenced by main(), and Predict().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void Kalman::Update | ( | const Vector< double > & | Measurement,
 |  | const Matrix< double > & | MeasurementCovariance
 | ) |

Calculates the update step.

Author:
woelk 05/2005

Definition at line 72 of file Kalman.cpp.

References BIASASSERT, Covariance_, H_, HT_, Identity_, BIAS::SVD::Invert(), K, MeasurementDim_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Vector< T >::size(), State_, and svd_.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

Matrix<double> BIAS::Kalman::A_ [protected]

measurement matrix and transposed

Definition at line 115 of file Kalman.hh.

Referenced by Init(), and Predict().

Matrix<double> BIAS::Kalman::AT_ [protected]

Definition at line 115 of file Kalman.hh.

Referenced by Init(), and Predict().

Matrix<double> BIAS::Kalman::Covariance_ [protected]

The covariance matrix corresponding to State_.

Definition at line 109 of file Kalman.hh.

Referenced by Init(), Predict(), and Update().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

Matrix<double> BIAS::Kalman::H_ [protected]

measurement matrix and transposed

Definition at line 112 of file Kalman.hh.

Referenced by Init(), and Update().

Matrix<double> BIAS::Kalman::HT_ [protected]

Definition at line 112 of file Kalman.hh.

Referenced by Init(), and Update().

Matrix<double> BIAS::Kalman::Identity_ [protected]

identity matrix

Definition at line 118 of file Kalman.hh.

Referenced by Init(), and Update().

int BIAS::Kalman::MeasurementDim_ [protected]

Definition at line 121 of file Kalman.hh.

Referenced by Init(), Kalman(), and Update().

Vector<double> BIAS::Kalman::State_ [protected]

Contains either the prediction (prior) or Bayes optimal system estimate (posterior) depending what function (Predict()/Update()) wascalled last.

Definition at line 107 of file Kalman.hh.

Referenced by Init(), Predict(), and Update().

SVD BIAS::Kalman::svd_ [protected]

needed for matrix inversion

Definition at line 124 of file Kalman.hh.

Referenced by Update().

int BIAS::Kalman::SystemStateDim_ [protected]

dimensions of system space and measurement space

Definition at line 121 of file Kalman.hh.

Referenced by Init(), Kalman(), and Predict().

The documentation for this class was generated from the following files:
  • StateEstimator/Kalman.hh
  • StateEstimator/Kalman.cpp
Generated on Wed Jun 21 19:08:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::KMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::KMatrix

BIAS::KMatrix Class Reference
[Geometry and Transformations]

K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs). More...

#include <Base/Geometry/KMatrix.hh>

Inheritance diagram for BIAS::KMatrix:

[legend]
Collaboration diagram for BIAS::KMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< KMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const KMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
KMATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const KMATRIX_TYPE &scalar)
in place division function
void | Fill (const KMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< KMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< KMATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
KMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
KMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
KMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
KMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
KMATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
KMATRIX_TYPE | GetFx () const
KMATRIX_TYPE | GetFy () const
KMATRIX_TYPE | GetHx () const
KMATRIX_TYPE | GetHy () const
KMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (KMATRIX_TYPE &max, KMATRIX_TYPE &min) const
return biggest and smallest entry
KMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
KMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< KMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< KMATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< KMATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
KMATRIX_TYPE | GetSkew () const
void | GetSystemMatrix (Matrix< KMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< KMATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
KMatrix | Invert () const
returns analyticaly inverted matrix
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
KMatrix (const Matrix3x3< KMATRIX_TYPE > &A)
KMatrix (const MatrixInitType &i)
constructor setting identity or zero author koeser
KMatrix ()
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< KMATRIX_TYPE > &A)
Matrix (const Matrix< KMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const KMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< KMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< KMATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< KMATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const KMATRIX_TYPEa0, const KMATRIX_TYPEa1, const KMATRIX_TYPEa2, const KMATRIX_TYPEa3, const KMATRIX_TYPEa4, const KMATRIX_TYPEa5, const KMATRIX_TYPEa6, const KMATRIX_TYPEa7, const KMATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (KMATRIX_TYPE &max, KMATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< KMATRIX_TYPE > &arg, Vector< KMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< KMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< KMATRIX_TYPE > &arg, Matrix< KMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< KMATRIX_TYPE > &argmat, Matrix3x4< KMATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< KMATRIX_TYPE > &argmat, Matrix3x3< KMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< KMATRIX_TYPE > &argvec, Vector3< KMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const KMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< KMATRIX_TYPE > &arg, Vector< KMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< KMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
KMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
KMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
KMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
KMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const KMATRIX_TYPE &scalar, Matrix3x3< KMATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, KMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, KMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (const KMATRIX_TYPE &fx, const KMATRIX_TYPE &fy, const KMATRIX_TYPE &hx, const KMATRIX_TYPE &hy, const KMATRIX_TYPE &skew=KMATRIX_TYPE(0))
get and set data members by verbose names.
void | SetAsCrossProductMatrix (const KMATRIX_TYPE &x, const KMATRIX_TYPE &y, const KMATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< KMATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< KMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromColumnVectors (const BIAS::Vector3< KMATRIX_TYPE > &v0, const BIAS::Vector3< KMATRIX_TYPE > &v1, const BIAS::Vector3< KMATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< KMATRIX_TYPE > &v0, const BIAS::Vector3< KMATRIX_TYPE > &v1, const BIAS::Vector3< KMATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< KMATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void | SetFx (const KMATRIX_TYPE &val)
void | SetFy (const KMATRIX_TYPE &val)
void | SetHx (const KMATRIX_TYPE &val)
void | SetHy (const KMATRIX_TYPE &val)
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< KMATRIX_TYPE > &data)
set a row of matrix from vector
void | SetSkew (const KMATRIX_TYPE &val)
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const KMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< KMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
KMATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< KMATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< KMATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< KMATRIX_TYPE > &argvec, Vector3< KMATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
~KMatrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).

To remember: (1) (R' | -R' C) projects a homgenous 3D (scene) point from wcs to 2d ics. (2) K transfroms a 2d scene point from ics to pcs (pixel coordinates) (which is mainly shift of origin + scale).

Author:
Jan Woetzel

Definition at line 48 of file KMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::KMatrix::KMatrix ( ) [inline]

Definition at line 51 of file KMatrix.hh.

BIAS::KMatrix::KMatrix ( const MatrixInitType & i ) [inline, explicit]

constructor setting identity or zero author koeser

Definition at line 55 of file KMatrix.hh.

BIAS::KMatrix::KMatrix ( const Matrix3x3< KMATRIX_TYPE > & A ) [inline]

Definition at line 58 of file KMatrix.hh.

BIAS::KMatrix::~KMatrix ( ) [inline]

Definition at line 60 of file KMatrix.hh.

Member Function Documentation

void BIAS::Matrix< KMATRIX_TYPE >::Add | ( | const KMATRIX_TYPE & | scalar,
 |  | Matrix< KMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< KMATRIX_TYPE >::AddIP ( const Matrix< KMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< KMATRIX_TYPE >::AddIP ( const KMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< KMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< KMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

KMATRIX_TYPE BIAS::Matrix3x3< KMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< KMATRIX_TYPE >::Divide | ( | const KMATRIX_TYPE & | scalar,
 |  | Matrix< KMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< KMATRIX_TYPE >::DivideIP ( const KMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< KMATRIX_TYPE >::Fill ( const KMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<KMATRIX_TYPE > BIAS::Matrix< KMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< KMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<KMATRIX_TYPE > BIAS::Matrix3x3< KMATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

KMATRIX_TYPE * BIAS::Matrix< KMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

KMATRIX_TYPE ** BIAS::Matrix< KMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

KMATRIX_TYPE ** BIAS::Matrix< KMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

KMATRIX_TYPE * BIAS::Matrix< KMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

KMATRIX_TYPE BIAS::Matrix3x3< KMATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

KMATRIX_TYPE KMatrix::GetFx ( ) const

Definition at line 48 of file KMatrix.cpp.

Referenced by BIAS::Projection::CreatePerspective(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

KMATRIX_TYPE KMatrix::GetFy ( ) const

Definition at line 51 of file KMatrix.cpp.

Referenced by BIAS::Projection::CreatePerspective(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

KMATRIX_TYPE KMatrix::GetHx ( ) const

Definition at line 57 of file KMatrix.cpp.

Referenced by BIAS::Projection::CreatePerspective(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

KMATRIX_TYPE KMatrix::GetHy ( ) const

Definition at line 60 of file KMatrix.cpp.

Referenced by BIAS::Projection::CreatePerspective(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< KMATRIX_TYPE >::GetMaxMin | ( | KMATRIX_TYPE & | max,
 |  | KMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< KMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<KMATRIX_TYPE > BIAS::Matrix< KMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<KMATRIX_TYPE > BIAS::Matrix3x3< KMATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< KMATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< KMATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< KMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

KMATRIX_TYPE KMatrix::GetSkew ( ) const

Definition at line 54 of file KMatrix.cpp.

void BIAS::Matrix< KMATRIX_TYPE >::GetSystemMatrix ( Matrix< KMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< KMATRIX_TYPE >::Invert ( Matrix3x3< KMATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

KMatrix KMatrix::Invert ( ) const

returns analyticaly inverted matrix

Reimplemented from BIAS::Matrix3x3< KMATRIX_TYPE >.

Definition at line 31 of file KMatrix.cpp.

References Kinv, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::MatchDataBase::_SetCamData(), BIAS::PMatrix::BackprojectByZDepth(), BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::PMatrix::GetRayWorldCoo(), BIAS::PMDImageProc::HFromMeta_(), main(), BIAS::SphericalUndistortion::ProjectCoordBack(), and BIAS::ProjectionParametersPerspective::SetK().

int BIAS::Matrix3x3< KMATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< KMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< KMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< KMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< KMATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Examples:
ExampleLoadBOG.cpp.

int BIAS::Matrix3x3< KMATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

BIAS::Matrix< KMATRIX_TYPE >::Matrix ( const TNT::Matrix< KMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< KMATRIX_TYPE >::Matrix ( const Matrix< KMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< KMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< KMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< KMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const KMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< KMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< KMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< KMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( const Matrix< KMATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< KMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 | ( | const KMATRIX_TYPE | a0,
 |  | const KMATRIX_TYPE | a1,
 |  | const KMATRIX_TYPE | a2,
 |  | const KMATRIX_TYPE | a3,
 |  | const KMATRIX_TYPE | a4,
 |  | const KMATRIX_TYPE | a5,
 |  | const KMATRIX_TYPE | a6,
 |  | const KMATRIX_TYPE | a7,
 |  | const KMATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< KMATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< KMATRIX_TYPE >::MaxMin | ( | KMATRIX_TYPE & | max,
 |  | KMATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< KMATRIX_TYPE >::Mult | ( | const Vector< KMATRIX_TYPE > & | arg,
 |  | Vector< KMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< KMATRIX_TYPE >::Mult ( const Matrix< KMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< KMATRIX_TYPE >::Mult | ( | const Matrix< KMATRIX_TYPE > & | arg,
 |  | Matrix< KMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< KMATRIX_TYPE >::Mult | ( | const Matrix3x4< KMATRIX_TYPE > & | argmat,
 |  | Matrix3x4< KMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< KMATRIX_TYPE >::Mult | ( | const Matrix3x3< KMATRIX_TYPE > & | argmat,
 |  | Matrix3x3< KMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< KMATRIX_TYPE >::Mult | ( | const Vector3< KMATRIX_TYPE > & | argvec,
 |  | Vector3< KMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< KMATRIX_TYPE >::Multiply | ( | const KMATRIX_TYPE & | scalar,
 |  | Matrix< KMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< KMATRIX_TYPE >::MultiplyIP ( const KMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< KMATRIX_TYPE >::MultLeft | ( | const Vector< KMATRIX_TYPE > & | arg,
 |  | Vector< KMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< KMATRIX_TYPE >::MultLeft ( const Matrix< KMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< KMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< KMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< KMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< KMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< KMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

KMATRIX_TYPE BIAS::Matrix< KMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< KMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< KMATRIX_TYPE >::Scale | ( | const KMATRIX_TYPE & | scalar,
 |  | Matrix3x3< KMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< KMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | KMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< KMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | KMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void KMatrix::Set | ( | const KMATRIX_TYPE & | fx,
 |  | const KMATRIX_TYPE & | fy,
 |  | const KMATRIX_TYPE & | hx,
 |  | const KMATRIX_TYPE & | hy,
 |  | const KMATRIX_TYPE & | skew = KMATRIX_TYPE(0)
 | ) |

get and set data members by verbose names.

fx skew hx 0 fy hy 0 0 1

Author:
JW 2005

Definition at line 65 of file KMatrix.cpp.

References SetFx(), SetFy(), SetHx(), SetHy(), BIAS::Matrix3x3< KMATRIX_TYPE >::SetIdentity(), and SetSkew().

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetAsCrossProductMatrix | ( | const KMATRIX_TYPE & | x,
 |  | const KMATRIX_TYPE & | y,
 |  | const KMATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< KMATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< KMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< KMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< KMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< KMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< KMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< KMATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< KMATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< KMATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetFromVector ( const TNT::Vector< KMATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void KMatrix::SetFx ( const KMATRIX_TYPE & val )

Definition at line 49 of file KMatrix.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), Set(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

void KMatrix::SetFy ( const KMATRIX_TYPE & val )

Definition at line 52 of file KMatrix.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), Set(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

void KMatrix::SetHx ( const KMATRIX_TYPE & val )

Definition at line 58 of file KMatrix.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), Set(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

void KMatrix::SetHy ( const KMATRIX_TYPE & val )

Definition at line 61 of file KMatrix.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), Set(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

void BIAS::Matrix3x3< KMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< KMATRIX_TYPE >.

Referenced by Set().

void BIAS::Matrix< KMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< KMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void KMatrix::SetSkew ( const KMATRIX_TYPE & val )

Definition at line 55 of file KMatrix.cpp.

Referenced by Set().

void BIAS::Matrix< KMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< KMATRIX_TYPE >::Sub | ( | const KMATRIX_TYPE & | scalar,
 |  | Matrix< KMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< KMATRIX_TYPE >::SubIP ( const KMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< KMATRIX_TYPE >::SubIP ( const Matrix< KMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

KMATRIX_TYPE BIAS::Matrix3x3< KMATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< KMATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< KMATRIX_TYPE >::Transpose ( const Matrix3x3< KMATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<KMATRIX_TYPE > BIAS::Matrix3x3< KMATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< KMATRIX_TYPE >.

void BIAS::Matrix3x3< KMATRIX_TYPE >::TransposedMult | ( | const Vector3< KMATRIX_TYPE > & | argvec,
 |  | Vector3< KMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< KMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/KMatrix.hh
  • Base/Geometry/KMatrix.cpp
Generated on Wed Jun 21 19:08:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Label Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Label

BIAS::Label Class Reference
[Image Filters and Image Transformations]

does a connected component analysis and labels all connected regions More...

#include <Filter/Label.hh>

Inheritance diagram for BIAS::Label:

[legend]
Collaboration diagram for BIAS::Label:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< unsigned char > &src, Image< unsigned char > &dst)
prototyp for filter computation function
FilterBase (Param &para, const int group_id, const std::string &postfix)
FilterBase (Param &para, const std::string &postfix="")
FilterBase ()
need contructor for param handling
std::vector< int > | GetBlobCounts ()
returns a list with the size of each blob, largest first, if no blobs are found a list with a single 0 is returned
std::map< unsigned char, int > | GetBlobMap ()
Returns a map that hold the blob size for each label.
void | GetBlobSizes (std::vector< int > &sizes) const
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetBoundingBoxes (std::vector< BIAS::Vector2< int > > &topLefts, std::vector< BIAS::Vector2< int > > &botRights)
returns two lists,one with the topLeft coordinates of the bounding boxes of each region and one with the botrights, sorted by size of regions (in pixel)
void | GetCenters (std::vector< BIAS::Vector2< double > > &centers) const
returns the centers of the blobs
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetLabelImage (Image< LABEL_CALC_TYPE > &li)
returns in li the image where each region has a different grey value, value zero is the background region
void | GetMedianCenters (std::vector< BIAS::Vector2< double > > &cts) const
returns the median centers of the blobs
Label ()
standard constructor
int | Label4Neighbour (const BIAS::Image< LABEL_CALC_TYPE > &Image, BIAS::Image< LABEL_CALC_TYPE > &DestinationImage)
labels an unsigned short int using an 4er neighbourhood and returns it in DestinationImage if DestinationImage is allocated it is not reallocated
int | Label4Neighbour (const BIAS::Image< unsigned char > &Image, BIAS::Image< unsigned char > &DestinationImage)
labels an unsigned short int using an 4er neighbourhood and returns it in DestinationImage if DestinationImage is allocated it is not reallocated untested
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | Process (const Image< unsigned char > &im)
call this if you don't need the output image, is faster than Filter
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~Label ()
standard destructor

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const
int | Label4Neighbour_ ()
void | LabelInit_ (const Image< LABEL_CALC_TYPE > &Image)
void | LabelInit_ (const Image< unsigned char > &Image)
void LabelRelease_ ()

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
std::vector< int > | BlobCount_
std::vector< BIAS::Vector2<
int > > 		BotRights_
std::vector< BIAS::Vector2<
double > > 		Centers_
bool | LabelInitialized_
Image< LABEL_CALC_TYPE > | LabelResultImage_
Image< LABEL_CALC_TYPE > | LabelSumImage_
std::vector< BIAS::Vector2<
double > > 		MedianCenters_
std::vector< int > | Num_
std::vector< BIAS::CCAStruct > | SortVec_
std::vector< BIAS::Vector2<
int > > 		TopLefts_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Attributes

std::map< unsigned char, int > | BlobMap_

Detailed Description

does a connected component analysis and labels all connected regions

there is no difference between fore and background. Each region that has a different color than all its neighbouring pixels is its own region. Each pixel is assigned to one region.

There are utility functions to get Blobcounts and bounding boxes. So far only 4neighborhoud and grey value images only. Important: When using Filter(), the resulting image is only valid if there are less than 255 regions!!

Author:
woelk

Definition at line 94 of file Label.hh.

Constructor & Destructor Documentation

Label::Label ( )

standard constructor

Definition at line 55 of file Label.cpp.

References BIAS::FilterBase< unsigned char, unsigned char >::_FilterBorderHandling, LabelInitialized_, and BIAS::FilterBase< unsigned char, unsigned char >::TBH_same.

Label::~Label ( )

standard destructor

Definition at line 62 of file Label.cpp.

Member Function Documentation

void BIAS::FilterBase< unsigned char , unsigned char >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< unsigned char, unsigned char >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::Mean< unsigned char, unsigned char >, and BIAS::Rescale< unsigned char, unsigned char >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int Label::Filter | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst
 | ) | [virtual]

prototyp for filter computation function

Implements BIAS::FilterBase< unsigned char, unsigned char >.

Definition at line 449 of file Label.cpp.

References BIASCDOUT, BIASERR, BlobCount_, D_FILTERBASE_CALLSTACK, and Process().

BIAS::FilterBase< unsigned char , unsigned char >::FilterBase | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) | [inherited]

BIAS::FilterBase< unsigned char , unsigned char >::FilterBase | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) | [inherited]

BIAS::FilterBase< unsigned char , unsigned char >::FilterBase ( ) [inherited]

need contructor for param handling

std::vector<int> BIAS::Label::GetBlobCounts ( ) [inline]

returns a list with the size of each blob, largest first, if no blobs are found a list with a single 0 is returned

Author:
Daniel Grest, Aug. 2004

Definition at line 133 of file Label.hh.

std::map<unsigned char, int> BIAS::Label::GetBlobMap ( ) [inline]

Returns a map that hold the blob size for each label.

Definition at line 137 of file Label.hh.

void BIAS::Label::GetBlobSizes ( std::vector< int > & sizes ) const [inline]

Definition at line 167 of file Label.hh.

int BIAS::FilterBase< unsigned char , unsigned char >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

void BIAS::FilterBase< unsigned char , unsigned char >::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

void Label::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< unsigned char, unsigned char >.

Definition at line 482 of file Label.cpp.

int BIAS::Label::GetBoundingBoxes | ( | std::vector< BIAS::Vector2< int > > & | topLefts,
 |  | std::vector< BIAS::Vector2< int > > & | botRights
 | ) | [inline]

returns two lists,one with the topLeft coordinates of the bounding boxes of each region and one with the botrights, sorted by size of regions (in pixel)

Returns:
0, in case of no error
Author:
woelk

Definition at line 153 of file Label.hh.

void BIAS::Label::GetCenters ( std::vector< BIAS::Vector2< double > > & centers ) const [inline]

returns the centers of the blobs

Author:
woelk 03/2006

Definition at line 159 of file Label.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Label::GetLabelImage ( Image< LABEL_CALC_TYPE > & li ) [inline]

returns in li the image where each region has a different grey value, value zero is the background region

Definition at line 143 of file Label.hh.

void BIAS::Label::GetMedianCenters ( std::vector< BIAS::Vector2< double > > & cts ) const [inline]

returns the median centers of the blobs

Author:
woelk 03/2006

Definition at line 164 of file Label.hh.

int Label::Label4Neighbour | ( | const BIAS::Image< LABEL_CALC_TYPE > & | Image,
 |  | BIAS::Image< LABEL_CALC_TYPE > & | DestinationImage
 | ) |

labels an unsigned short int using an 4er neighbourhood and returns it in DestinationImage if DestinationImage is allocated it is not reallocated

Definition at line 275 of file Label.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, LabelInit_(), LabelInitialized_, LabelRelease_(), LabelSumImage_, and BIAS::ImageBase::SamePixelAndChannelCount().

int Label::Label4Neighbour | ( | const BIAS::Image< unsigned char > & | Image,
 |  | BIAS::Image< unsigned char > & | DestinationImage
 | ) |

labels an unsigned short int using an 4er neighbourhood and returns it in DestinationImage if DestinationImage is allocated it is not reallocated untested

Author:
Felix Woelk

Definition at line 297 of file Label.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, LabelInit_(), LabelInitialized_, LabelRelease_(), and LabelSumImage_.

int Label::Label4Neighbour_ ( ) [protected]

Definition at line 99 of file Label.cpp.

References BIASCDOUT, BIASERR, D_FILTERBASE_CALLSTACK, ERR_NOLB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), LABEL_CALC_TYPE, LabelResultImage_, LabelSumImage_, MAX_LAB, SEGDEF, and value.

void Label::LabelInit_ ( const Image< LABEL_CALC_TYPE > & Image ) [protected]

Definition at line 66 of file Label.cpp.

References BIASDOUT, D_INIT, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::Init(), LabelInitialized_, LabelResultImage_, and LabelSumImage_.

void Label::LabelInit_ ( const Image< unsigned char > & Image ) [protected]

Definition at line 77 of file Label.cpp.

References BIASDOUT, D_INIT, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetROI(), BIAS::Image< StorageType >::Init(), LabelInitialized_, LabelResultImage_, and LabelSumImage_.

Referenced by Label4Neighbour(), and Process().

void Label::LabelRelease_ ( ) [protected]

Definition at line 89 of file Label.cpp.

References BIASDOUT, D_INIT, LabelInitialized_, LabelResultImage_, LabelSumImage_, and BIAS::Image< StorageType >::Release().

Referenced by Label4Neighbour(), and Process().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int Label::Process ( const Image< unsigned char > & im )

call this if you don't need the output image, is faster than Filter

Definition at line 333 of file Label.cpp.

References BIASCDOUT, D_FILTERBASE_CALLSTACK, LabelInit_(), LabelInitialized_, LabelRelease_(), LabelResultImage_, and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by Filter().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::FilterBase< unsigned char , unsigned char >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

int* BIAS::FilterBase< unsigned char , unsigned char >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by Label().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

bool BIAS::FilterBase< unsigned char , unsigned char >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<int> BIAS::Label::BlobCount_ [protected]

Definition at line 194 of file Label.hh.

Referenced by Filter().

std::map<unsigned char,int> BIAS::Label::BlobMap_ [private]

Definition at line 202 of file Label.hh.

std::vector<BIAS::Vector2<int> > BIAS::Label::BotRights_ [protected]

Definition at line 195 of file Label.hh.

std::vector<BIAS::Vector2<double> > BIAS::Label::Centers_ [protected]

Definition at line 196 of file Label.hh.

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::Label::LabelInitialized_ [protected]

Definition at line 181 of file Label.hh.

Referenced by Label(), Label4Neighbour(), LabelInit_(), LabelRelease_(), and Process().

Image<LABEL_CALC_TYPE> BIAS::Label::LabelResultImage_ [protected]

Definition at line 183 of file Label.hh.

Referenced by Label4Neighbour_(), LabelInit_(), LabelRelease_(), and Process().

Image<LABEL_CALC_TYPE> BIAS::Label::LabelSumImage_ [protected]

Definition at line 182 of file Label.hh.

Referenced by Label4Neighbour(), Label4Neighbour_(), LabelInit_(), and LabelRelease_().

std::vector<BIAS::Vector2<double> > BIAS::Label::MedianCenters_ [protected]

Definition at line 197 of file Label.hh.

std::vector<int> BIAS::Label::Num_ [protected]

Definition at line 189 of file Label.hh.

std::vector<BIAS::CCAStruct> BIAS::Label::SortVec_ [protected]

Definition at line 191 of file Label.hh.

std::vector<BIAS::Vector2<int> > BIAS::Label::TopLefts_ [protected]

Definition at line 195 of file Label.hh.

The documentation for this class was generated from the following files:
  • Filter/Label.hh
  • Filter/Label.cpp
Generated on Wed Jun 21 19:08:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LeastSquaresBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LeastSquaresBase

BIAS::LeastSquaresBase Class Reference

#include <MathAlgo/LeastSquares.hh>

Inheritance diagram for BIAS::LeastSquaresBase:

[legend]
Collaboration diagram for BIAS::LeastSquaresBase:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | Init (unsigned SolutionSize, bool ReduceToATA=true)
LeastSquaresBase.
LeastSquaresBase ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual int | Solve (Matrix< double > &A, Vector< double > &x)
virtual int | Solve (Matrix< double > &A, Vector< double > &b, Vector< double > &x)
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &weights, Vector< double > &x)
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x)
virtual | ~LeastSquaresBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

Matrix< double > | _AT
Matrix< double > | _ATA
Vector< double > | _ATb
long int | _liDebugLevel
bool | _ReduceToATA
unsigned | _SolutionSize
Matrix< double > | _Weight

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 40 of file LeastSquares.hh.

Constructor & Destructor Documentation

BIAS::LeastSquaresBase::LeastSquaresBase ( ) [inline]

Definition at line 43 of file LeastSquares.hh.

virtual BIAS::LeastSquaresBase::~LeastSquaresBase ( ) [inline, virtual]

Definition at line 44 of file LeastSquares.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int LeastSquaresBase::Init | ( | unsigned | SolutionSize,
 |  | bool | ReduceToATA = true
 | ) |

LeastSquaresBase.

Definition at line 39 of file LeastSquares.cpp.

References _ATA, _ATb, _ReduceToATA, _SolutionSize, _Weight, TNT::Vector< T >::newsize(), and TNT::Matrix< T >::newsize().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int LeastSquaresBase::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented in BIAS::LeastSquaresLapack, and BIAS::LeastSquaresSVD.

Definition at line 56 of file LeastSquares.cpp.

References BIASERR.

int LeastSquaresBase::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented in BIAS::LeastSquaresLapack, and BIAS::LeastSquaresSVD.

Definition at line 49 of file LeastSquares.cpp.

References BIASERR.

int LeastSquaresBase::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented in BIAS::LeastSquaresLapack, and BIAS::LeastSquaresSVD.

Definition at line 69 of file LeastSquares.cpp.

References BIASERR.

int LeastSquaresBase::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented in BIAS::LeastSquaresLapack, and BIAS::LeastSquaresSVD.

Definition at line 62 of file LeastSquares.cpp.

References BIASERR.

Member Data Documentation

Matrix<double> BIAS::LeastSquaresBase::_AT [protected]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_ATA [protected]

Definition at line 61 of file LeastSquares.hh.

Referenced by Init(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Vector<double> BIAS::LeastSquaresBase::_ATb [protected]

Definition at line 62 of file LeastSquares.hh.

Referenced by Init(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

bool BIAS::LeastSquaresBase::_ReduceToATA [protected]

Definition at line 59 of file LeastSquares.hh.

Referenced by Init(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

unsigned BIAS::LeastSquaresBase::_SolutionSize [protected]

Definition at line 60 of file LeastSquares.hh.

Referenced by Init(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_Weight [protected]

Definition at line 61 of file LeastSquares.hh.

Referenced by Init(), and BIAS::LeastSquaresLapack::WeightedSolve().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/LeastSquares.hh
  • MathAlgo/LeastSquares.cpp
Generated on Wed Jun 21 19:08:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LeastSquaresLapack Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LeastSquaresLapack

BIAS::LeastSquaresLapack Class Reference

#include <MathAlgo/LeastSquares.hh>

Inheritance diagram for BIAS::LeastSquaresLapack:

[legend]
Collaboration diagram for BIAS::LeastSquaresLapack:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | Init (unsigned SolutionSize, bool ReduceToATA=true)
LeastSquaresBase.
LeastSquaresLapack ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual int | Solve (Matrix< double > &A, Vector< double > &x)
virtual int | Solve (Matrix< double > &A, Vector< double > &b, Vector< double > &x)
LeastSquaresLapack.
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &weights, Vector< double > &x)
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x)
virtual | ~LeastSquaresLapack ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

Matrix< double > | _AT
Matrix< double > | _ATA
Vector< double > | _ATb
long int | _liDebugLevel
bool | _ReduceToATA
unsigned | _SolutionSize
Matrix< double > | _Weight

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 68 of file LeastSquares.hh.

Constructor & Destructor Documentation

BIAS::LeastSquaresLapack::LeastSquaresLapack ( ) [inline]

Definition at line 71 of file LeastSquares.hh.

virtual BIAS::LeastSquaresLapack::~LeastSquaresLapack ( ) [inline, virtual]

Definition at line 72 of file LeastSquares.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int LeastSquaresBase::Init | ( | unsigned | SolutionSize,
 |  | bool | ReduceToATA = true
 | ) | [inherited]

LeastSquaresBase.

Definition at line 39 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ATb, BIAS::LeastSquaresBase::_ReduceToATA, BIAS::LeastSquaresBase::_SolutionSize, BIAS::LeastSquaresBase::_Weight, TNT::Vector< T >::newsize(), and TNT::Matrix< T >::newsize().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int LeastSquaresLapack::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 100 of file LeastSquares.cpp.

References BIASERR.

int LeastSquaresLapack::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | x
 | ) | [virtual]

LeastSquaresLapack.

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 82 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_AT, BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ATb, BIAS::LeastSquaresBase::_ReduceToATA, BIASDOUT, D_LS_MATRIXES, D_LS_RED_MATRIXES, TNT::Lapack_LLS_QR_linear_solve(), BIAS::Matrix< T >::Mult(), res, and BIAS::Matrix< T >::Transpose().

Referenced by TestNoWeightAx(), and TestNoWeightAxb().

int LeastSquaresLapack::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 134 of file LeastSquares.cpp.

References BIASERR.

int LeastSquaresLapack::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 106 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_AT, BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ATb, BIAS::LeastSquaresBase::_ReduceToATA, BIAS::LeastSquaresBase::_SolutionSize, BIAS::LeastSquaresBase::_Weight, BIASDOUT, D_LS_MATRIXES, D_LS_RED_MATRIXES, TNT::Lapack_LLS_QR_linear_solve(), Lapack_WLLS_solve(), BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_rows(), res, BIAS::Matrix< T >::ScaleRow(), and BIAS::Matrix< T >::Transpose().

Referenced by TestWeightAx(), and TestWeightAxb().

Member Data Documentation

Matrix<double> BIAS::LeastSquaresBase::_AT [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresSVD::Solve(), Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_ATA [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), BIAS::LeastSquaresSVD::Solve(), Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and WeightedSolve().

Vector<double> BIAS::LeastSquaresBase::_ATb [protected, inherited]

Definition at line 62 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), BIAS::LeastSquaresSVD::Solve(), Solve(), and WeightedSolve().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

bool BIAS::LeastSquaresBase::_ReduceToATA [protected, inherited]

Definition at line 59 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), BIAS::LeastSquaresSVD::Solve(), Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and WeightedSolve().

unsigned BIAS::LeastSquaresBase::_SolutionSize [protected, inherited]

Definition at line 60 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_Weight [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), and WeightedSolve().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/LeastSquares.hh
  • MathAlgo/LeastSquares.cpp
Generated on Wed Jun 21 19:08:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LeastSquaresSVD Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LeastSquaresSVD

BIAS::LeastSquaresSVD Class Reference

#include <MathAlgo/LeastSquares.hh>

Inheritance diagram for BIAS::LeastSquaresSVD:

[legend]
Collaboration diagram for BIAS::LeastSquaresSVD:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | Init (unsigned SolutionSize, bool ReduceToATA=true)
LeastSquaresBase.
LeastSquaresSVD ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual int | Solve (Matrix< double > &A, Vector< double > &x)
virtual int | Solve (Matrix< double > &A, Vector< double > &b, Vector< double > &x)
solve |Ax-b|=min using svd with mxn Matrix A
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &weights, Vector< double > &x)
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x)
virtual | ~LeastSquaresSVD ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

Matrix< double > | _AT
Matrix< double > | _ATA
Vector< double > | _ATb
long int | _liDebugLevel
bool | _ReduceToATA
Vector< double > | _S
unsigned | _SolutionSize
SVD _svd
Matrix< double > | _VT
Matrix< double > | _Weight

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 89 of file LeastSquares.hh.

Constructor & Destructor Documentation

BIAS::LeastSquaresSVD::LeastSquaresSVD ( ) [inline]

Definition at line 92 of file LeastSquares.hh.

virtual BIAS::LeastSquaresSVD::~LeastSquaresSVD ( ) [inline, virtual]

Definition at line 93 of file LeastSquares.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int LeastSquaresBase::Init | ( | unsigned | SolutionSize,
 |  | bool | ReduceToATA = true
 | ) | [inherited]

LeastSquaresBase.

Definition at line 39 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ATb, BIAS::LeastSquaresBase::_ReduceToATA, BIAS::LeastSquaresBase::_SolutionSize, BIAS::LeastSquaresBase::_Weight, TNT::Vector< T >::newsize(), and TNT::Matrix< T >::newsize().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int LeastSquaresSVD::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 198 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_AT, BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ReduceToATA, _S, BIAS::LeastSquaresBase::_SolutionSize, _VT, BIASDOUT, BIASERR, D_LS_MATRIXES, D_LS_RED_MATRIXES, General_singular_value_decomposition(), BIAS::Matrix< T >::Mult(), TNT::Vector< T >::newsize(), TNT::Vector< T >::size(), and BIAS::Matrix< T >::Transpose().

int LeastSquaresSVD::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | x
 | ) | [virtual]

solve |Ax-b|=min using svd with mxn Matrix A

|r|^2 = |Ax-b|^2 = (Ax-b)^T(Ax-b) = x^T A^T A x - x^T A^T b - b^T A x + b^T b = use x^T A^T b = b^T A x (both are real) = x^T A^T A x - 2 x^T A^T b + b^T b = use SVD(A^T A) := W S W^T since A^T A is symmetric = x^T W S W^T x - 2 x^T A^T b + b^T b = set z:=W^T x -> x=Wz or x^T = z^T W^T = z^T S z - 2 z^T W^T A^T b + b^T b = set d:= W^T A^T b = z^T S z - 2 z^T d + b^T b = = sum_i(S_i*z_i^2 - 2 z_i d_i + b_i^2)

d |r|^2 / dx = d|r|^2/dz * dz/dx == 0 -> d|r|^2/dz=0 -> z_i = d_i / S_i

x = W z

solve least squares using svd: 1. calculate SVD(A^T A) = W S W^T 2. calculate d = W^T A^T b 3. calculate z: z_i = d_i/S_i 4. calculate x = W z

Author:
woelk 04 2003

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 175 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_AT, BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ATb, _svd, BIASDOUT, BIAS::SVD::Compute(), D_LS_MATRIXES, D_LS_RED_MATRIXES, D_LS_SVD, DEFAULT_DOUBLE_ZERO_THRESHOLD, BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and BIAS::Matrix< T >::Transpose().

int LeastSquaresSVD::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 235 of file LeastSquares.cpp.

References BIAS::LeastSquaresBase::_AT, BIAS::LeastSquaresBase::_ATA, BIAS::LeastSquaresBase::_ReduceToATA, _S, BIAS::LeastSquaresBase::_SolutionSize, _VT, BIASDOUT, BIASERR, D_LS_MATRIXES, D_LS_RED_MATRIXES, General_singular_value_decomposition(), BIAS::Matrix< T >::Mult(), TNT::Vector< T >::newsize(), BIAS::Matrix< T >::ScaleRow(), TNT::Vector< T >::size(), and BIAS::Matrix< T >::Transpose().

int LeastSquaresSVD::WeightedSolve | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | Vector< double > & | weights,
 |  | Vector< double > & | x
 | ) | [virtual]

Reimplemented from BIAS::LeastSquaresBase.

Definition at line 228 of file LeastSquares.cpp.

References BIASERR.

Member Data Documentation

Matrix<double> BIAS::LeastSquaresBase::_AT [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by Solve(), BIAS::LeastSquaresLapack::Solve(), WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_ATA [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), Solve(), BIAS::LeastSquaresLapack::Solve(), WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Vector<double> BIAS::LeastSquaresBase::_ATb [protected, inherited]

Definition at line 62 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), Solve(), BIAS::LeastSquaresLapack::Solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

bool BIAS::LeastSquaresBase::_ReduceToATA [protected, inherited]

Definition at line 59 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), Solve(), BIAS::LeastSquaresLapack::Solve(), WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Vector<double> BIAS::LeastSquaresSVD::_S [protected]

Definition at line 108 of file LeastSquares.hh.

Referenced by Solve(), and WeightedSolve().

unsigned BIAS::LeastSquaresBase::_SolutionSize [protected, inherited]

Definition at line 60 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), Solve(), WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

SVD BIAS::LeastSquaresSVD::_svd [protected]

Definition at line 106 of file LeastSquares.hh.

Referenced by Solve().

Matrix<double> BIAS::LeastSquaresSVD::_VT [protected]

Definition at line 107 of file LeastSquares.hh.

Referenced by Solve(), and WeightedSolve().

Matrix<double> BIAS::LeastSquaresBase::_Weight [protected, inherited]

Definition at line 61 of file LeastSquares.hh.

Referenced by BIAS::LeastSquaresBase::Init(), and BIAS::LeastSquaresLapack::WeightedSolve().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/LeastSquares.hh
  • MathAlgo/LeastSquares.cpp
Generated on Wed Jun 21 19:08:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Line3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Line3DData

BIAS::Line3DData Class Reference

stores data for drawing a line More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::Line3DData:

[legend]
List of all members.

Public Attributes

BIAS::RGBAuc Color
BIAS::Vector3< double > | End
BIAS::Vector3< double > | Start

Detailed Description

stores data for drawing a line

Definition at line 170 of file ThreeDOut.hh.

Member Data Documentation

BIAS::RGBAuc BIAS::Line3DData::Color

Definition at line 174 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddLine(), and BIAS::ThreeDOut::UpdateLine().

BIAS::Vector3<double> BIAS::Line3DData::End

Definition at line 173 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddLine(), and BIAS::ThreeDOut::UpdateLine().

BIAS::Vector3<double> BIAS::Line3DData::Start

Definition at line 172 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddLine(), and BIAS::ThreeDOut::UpdateLine().

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:08:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LinearRegionDetector< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LinearRegionDetector

BIAS::LinearRegionDetector< StorageType, CalculationType > Class Template Reference
[Feature Detectors]

try to detect linear regions (const gradient) in images, experimental code for testing More...

#include <FeatureDetector/LinearRegionDetector.hh>

Inheritance diagram for BIAS::LinearRegionDetector< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::LinearRegionDetector< StorageType, CalculationType >:

[legend]
List of all members.

Public Types

enum ECDType {
CDT_Invalid, CDT_Susan, CDT_Harris, CDT_Foerstner,
CDT_KLT, CDT_Laplace
}
the differnet types of corner detectors More...

Public Member Functions

void | AddDebugLevel (long int lv)
int | Cornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
bool | DebugLevelIsSet (long int lv) const
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
purely virtual interface definition
virtual int | Detect (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners given the gradient images
virtual int | Detect (const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL)
detect corners in a grey image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
virtual int | DetectFromCornerness (const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
detect corners avoiding double calculation of cornerness image
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetMaxNumFeatures ()
double | GetMinCornerness ()
rets minimum cornernes of detectable features (simple parameter access function - does nothing else)
int | GetMinDistance () const
rets the min distance of features (simple parameter access function - does nothing else)
LinearRegionDetector (Param &para, const int grp, const std::string &postfix)
LinearRegionDetector (Param &para, const std::string &postfix="")
LinearRegionDetector ()
virtual void | ParameterChanged (const std::string &paramname, const void *data)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxNumFeatures (const int maxnum)
void | SetMinCornerness (double min_cornerness)
sets minimum cornernes of detectable features
void | SetMinDistance (int mindist)
sets the min distance of features (simple parameter access function - does nothing else)
void | SetStructureTensorHalfWinSize (int halfwinsize)
void | SetSubpixelAccuracy (bool subpixel_accuracy)
~LinearRegionDetector ()

Static Public Member Functions

static int * | AddCornerDetectorType (Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL)
build the appropriate vectors and adds an enum for corner detector selection to param in group groupid
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
registers and handles parameters
void | _AddParameter (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _Cornerness , _sgxx, _sgxy and _sgyy
int | _CalcCornerness (const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness)
calculates the cornerness using the gradients gx and gy
int | _CalcCornerness (const Image< StorageType > &src, Image< CalculationType > &cornerness)
calculates the cornerness using the src image
virtual int | _ComputeCornerness (Image< CalculationType > &im)
Computes the larger eigenvalue of the structure tensor points are accepted only if smaller eigenvalue is significantly smaller than the larger one.
void _DeleteInternalMem ()
frees _Cornerness, _sgxx, _sgxy and _sgyy
int | _EnforceMinimumDistance (std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality)
selects features sorted by quality from _FeatList such that they have a min distance as given in the param object
void | _FillFeatureMap (std::vector< HomgPoint2D > &p)
fills feature map with every point from p which isnt at infinity
bool | _RefineCornerPosition (int col, int row, double &x, double &y, QUAL &SubPixelCornerness)
fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y
void | _RefineCorners (std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality)
refines corner position and quality for all corners in list, internal Cornerness_ image must be valid
void _ZeroFeatureMap ()
zeros the feature map
void | GetCov_ (const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const
returns the inverse structure tensor, multiplied by noise^2

Protected Attributes

Image< CalculationType > | _Cornerness
resulting image which tells for each pixel how cornerlike it is
bool * | _DoRefinement
tells whether subpixel refinement should be done
std::vector< class Feat > | _FeatList
temporary list of detected corners
bool ** | _FeatureMap
array used to enforce a min distance / neighbor suppression
Gauss< StorageType, StorageType > | _gauss
Gauss for pre-smoothing.
long int | _liDebugLevel
int * | _MaxNum
maximum number of corners to return
double * | _MinCornerness
threshold to accept a feature
int * | _MinDistance
minimal distance between points
int | _NumberFeaturesSoFar
initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class
int * | _NumTilesX
int * | _NumTilesY
Image< CalculationType > | _sgxx
internal structure tensor images
Image< CalculationType > | _sgxy
Image< CalculationType > | _sgyy
StructureTensor< CalculationType,
CalculationType > 		_st
structure tensor computation object
bool | ParamsAllocated_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::LinearRegionDetector< StorageType, CalculationType >

try to detect linear regions (const gradient) in images, experimental code for testing

Author:
koeser 09/2004

Definition at line 37 of file LinearRegionDetector.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::CornerDetectorBase::ECDType [inherited]

the differnet types of corner detectors

Enumerator:
CDT_Invalid
CDT_Susan
CDT_Harris
CDT_Foerstner
CDT_KLT
CDT_Laplace

Definition at line 55 of file CornerDetectorBase.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
LinearRegionDetector::LinearRegionDetector ( )

Definition at line 48 of file LinearRegionDetector.cpp.

template<class StorageType, class CalculationType>
LinearRegionDetector::LinearRegionDetector | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 57 of file LinearRegionDetector.cpp.

template<class StorageType, class CalculationType>
LinearRegionDetector::LinearRegionDetector | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 68 of file LinearRegionDetector.cpp.

template<class StorageType, class CalculationType>
LinearRegionDetector::~LinearRegionDetector ( )

Definition at line 76 of file LinearRegionDetector.cpp.

Member Function Documentation

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

registers and handles parameters

Reimplemented in BIAS::CornerDetectorHarris< StorageType, CalculationType >.

Definition at line 652 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType>
void CornerDetectorBase::_AddParameter | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 113 of file CornerDetectorBase.cpp.

References BIAS::CornerDetectorBase< StorageType >::_MaxNum, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase().

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected, inherited]

allocates _Cornerness , _sgxx, _sgxy and _sgyy

Definition at line 632 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, and BIAS::Image< StorageType >::Init().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 723 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ComputeCornerness(), BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::_CalcCornerness | ( | const Image< StorageType > & | src,
 |  | Image< CalculationType > & | cornerness
 | ) | [protected, inherited]

calculates the cornerness using the src image

Author:
woelk 09/2004

Definition at line 683 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int LinearRegionDetector::_ComputeCornerness ( Image< CalculationType > & im ) [protected, virtual]

Computes the larger eigenvalue of the structure tensor points are accepted only if smaller eigenvalue is significantly smaller than the larger one.

c = max(e1,e2) Also fills up _FeatList.

Author:
koeser 09/2004
Todo:
optimize for ROI usage

Reimplemented from BIAS::CornerDetectorGradient< StorageType, CalculationType >.

Definition at line 88 of file LinearRegionDetector.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy, BIASASSERT, CalculationType, BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), MIN_EIGENVALUE_RATIO, BIAS::ROI::SetCorners(), BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void CornerDetectorGradient::_DeleteInternalMem ( ) [protected, inherited]

frees _Cornerness, _sgxx, _sgxy and _sgyy

Definition at line 620 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap, BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance | ( | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [protected, inherited]

selects features sorted by quality from _FeatList such that they have a min distance as given in the param object

assumes feature map is zeroed

Author:
woelk 09/2004

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FillFeatureMap ( std::vector< HomgPoint2D > & p ) [protected, inherited]

fills feature map with every point from p which isnt at infinity

template<class StorageType, class CalculationType>
bool CornerDetectorGradient::_RefineCornerPosition | ( | int | col,
 |  | int | row,
 |  | double & | x,
 |  | double & | y,
 |  | QUAL & | SubPixelCornerness
 | ) | [protected, inherited]

fit quadratic surface around (row;col) to find the maximum cornerness subpixel position and save it in x;y

Parameters:
col | column in image where refinement should take place
row | row in image where refinement should take place
x | output, refined coordinate
y | output, refined coordinate
SubPixelCornerness | cornerness value at subpixel maximum
Author:
koeser 01/2004

Definition at line 474 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness, a, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCorners | ( | std::vector< HomgPoint2D > & | pos,
 |  | std::vector< QUAL > & | quality
 | ) | [inline, protected, inherited]

refines corner position and quality for all corners in list, internal Cornerness_ image must be valid

Parameters:
pos | input/output of old/new position
quality | holds new cornernesses afterwards
Author:
koeser 09/2004

Definition at line 252 of file CornerDetectorGradient.hh.

References BIASASSERT.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap ( ) [inline, protected, inherited]

zeros the feature map

Definition at line 272 of file CornerDetectorGradient.hh.

References cov.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType>
static int* BIAS::CornerDetectorBase< StorageType >::AddCornerDetectorType | ( | Param & | param,
 |  | const std::string & | name = "CornerDetectorType",
 |  | const int | groupid = GRP_ALL
 | ) | [static, inherited]

build the appropriate vectors and adds an enum for corner detector selection to param in group groupid

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Cornerness | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | Image< CalculationType > & | cornerness
 | ) | [inherited]

calculates the cornerness using the gradients gx and gy

Author:
woelk 09/2004

Definition at line 261 of file CornerDetectorGradient.cpp.

References BIASERR, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int CornerDetectorBase::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

purely virtual interface definition

Reimplemented in BIAS::CornerDetectorSusan< StorageType >.

Definition at line 76 of file CornerDetectorBase.cpp.

References BIASERR.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< CalculationType > & | gradx,
 |  | const Image< CalculationType > & | grady,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners given the gradient images

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
gradx | image containing gradient x component
grady | image containing gradient y component
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image. In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 172 of file CornerDetectorGradient.cpp.

References D_CD_WRITE_DEBUG_IM, BIAS::TimeMeasure::Start(), and BIAS::ImageIO::Write().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::Detect | ( | const Image< StorageType > & | image,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality,
 |  | std::vector< Matrix2x2< double > > * | cov = NULL
 | ) | [virtual, inherited]

detect corners in a grey image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
image | grey value input image
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 103 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss, D_CD_WRITE_DEBUG_IM, BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), and BIAS::ImageIO::Write().

Referenced by main().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | const std::vector< Vector2< int > > & | region,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

Author:
Dennis Herzog, June 2005

Definition at line 327 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIASASSERT, and BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType, class CalculationType>
int CornerDetectorGradient::DetectFromCornerness | ( | const Image< CalculationType > & | cornerness,
 |  | std::vector< HomgPoint2D > & | p,
 |  | std::vector< QUAL > & | quality
 | ) | [virtual, inherited]

detect corners avoiding double calculation of cornerness image

see documentation of BIAS::CornerDetectorGradient class for more info

Parameters:
cornerness | image with already computed cornerness
p | all points in p _not_ lying at infinity (p[i][2]!=0) are assumed to be corners of very good quality, in the region around these points no new features are detected, leave empty if you just want to detect some features in the image In any case p is cleared and only new detected points are added before returning. Example: assume MaxNum=100, you pass a vector p with 40 points of which 12 have the third coordinate w=0. You will get back a vector of maximum size 72, it may be smaller if Distance and MinCornerness have too large values
quality | after returning, for each point in p there is a quality in quality, no input requirements

Definition at line 288 of file CornerDetectorGradient.cpp.

References BIAS::CornerDetectorGradient< StorageType, CalculationType >::_EnforceMinimumDistance(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList, BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ZeroFeatureMap(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), res, BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetCov_ | ( | const std::vector< HomgPoint2D > & | p,
 |  | std::vector< Matrix2x2< double > > & | cov,
 |  | const double | noise = 5
 | ) | const [protected, inherited]

returns the inverse structure tensor, multiplied by noise^2

Author:
woelk 03/2006

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::CornerDetectorBase< StorageType >::GetMaxNumFeatures ( ) [inline, inherited]

Author:
Dennis Herzog

Definition at line 83 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
double BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinCornerness ( ) [inline, inherited]

rets minimum cornernes of detectable features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-07-04

Definition at line 189 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::GetMinDistance ( ) const [inline, inherited]

rets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 177 of file CornerDetectorGradient.hh.

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual, inherited]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::CornerDetectorBase< StorageType >::SetMaxNumFeatures ( const int maxnum ) [inline, inherited]

Definition at line 80 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinCornerness ( double min_cornerness ) [inline, inherited]

sets minimum cornernes of detectable features

Author:
woelk 02/2006

Definition at line 194 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetMinDistance ( int mindist ) [inline, inherited]

sets the min distance of features (simple parameter access function - does nothing else)

Author:
Dennis Herzog, 2005-06-22

Definition at line 183 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetStructureTensorHalfWinSize ( int halfwinsize ) [inline, inherited]

Definition at line 201 of file CornerDetectorGradient.hh.

template<class StorageType, class CalculationType>
void BIAS::CornerDetectorGradient< StorageType, CalculationType >::SetSubpixelAccuracy ( bool subpixel_accuracy ) [inline, inherited]

Author:
woelk 02/2006

Definition at line 198 of file CornerDetectorGradient.hh.

Member Data Documentation

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_Cornerness [protected, inherited]

resulting image which tells for each pixel how cornerlike it is

Definition at line 293 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::_RefineCornerPosition().

template<class StorageType, class CalculationType>
bool* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DoRefinement [protected, inherited]

tells whether subpixel refinement should be done

Definition at line 311 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
std::vector<class Feat> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatList [protected, inherited]

temporary list of detected corners

Definition at line 299 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness().

template<class StorageType, class CalculationType>
bool** BIAS::CornerDetectorGradient< StorageType, CalculationType >::_FeatureMap [protected, inherited]

array used to enforce a min distance / neighbor suppression

Definition at line 296 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AllocInternalMem(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_DeleteInternalMem(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient().

template<class StorageType, class CalculationType>
Gauss<StorageType, StorageType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_gauss [protected, inherited]

Gauss for pre-smoothing.

Definition at line 302 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_CalcCornerness(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_MaxNum [protected, inherited]

maximum number of corners to return

Definition at line 91 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), and BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase().

template<class StorageType, class CalculationType>
double* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinCornerness [protected, inherited]

threshold to accept a feature

Definition at line 310 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int* BIAS::CornerDetectorGradient< StorageType, CalculationType >::_MinDistance [protected, inherited]

minimal distance between points

Definition at line 309 of file CornerDetectorGradient.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

template<class StorageType, class CalculationType>
int BIAS::CornerDetectorGradient< StorageType, CalculationType >::_NumberFeaturesSoFar [protected, inherited]

initialized with the old features provided by user, then counted up and compared against _MaxNumFeatures from Base class

Definition at line 306 of file CornerDetectorGradient.hh.

template<class StorageType>
int* BIAS::CornerDetectorBase< StorageType >::_NumTilesX [protected, inherited]

Todo:
implement tiling mechanism

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType>
int * BIAS::CornerDetectorBase< StorageType >::_NumTilesY [protected, inherited]

Definition at line 88 of file CornerDetectorBase.hh.

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxx [protected, inherited]

internal structure tensor images

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgxy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
Image<CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_sgyy [protected, inherited]

Definition at line 290 of file CornerDetectorGradient.hh.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), and BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness().

template<class StorageType, class CalculationType>
StructureTensor<CalculationType, CalculationType> BIAS::CornerDetectorGradient< StorageType, CalculationType >::_st [protected, inherited]

structure tensor computation object

Definition at line 287 of file CornerDetectorGradient.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
bool BIAS::CornerDetectorBase< StorageType >::ParamsAllocated_ [protected, inherited]

Definition at line 95 of file CornerDetectorBase.hh.

Referenced by BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::CornerDetectorBase< StorageType >::~CornerDetectorBase(), and BIAS::CornerDetectorGradient< StorageType, CalculationType >::~CornerDetectorGradient().

The documentation for this class was generated from the following files:
  • FeatureDetector/LinearRegionDetector.hh
  • FeatureDetector/LinearRegionDetector.cpp
Generated on Wed Jun 21 19:08:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LogFacility Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LogFacility

BIAS::LogFacility Class Reference

#include <Base/Debug/LogFacility.hh>

Collaboration diagram for BIAS::LogFacility:

[legend]
List of all members.

Public Member Functions

bool | GetAbortOnFatal ()
BIAS_LOG_LEVEL GetLogLevel ()
std::ostream & | GetLogStream ()
bool | GetLogStream (std::ostream &zStream)
bool | GetShowCodeInfo ()
bool | OpenLogFile (const std::string &sFileName)
void PrintLogLevel ()
bool | ResetStream ()
void | SetAbortOnFatal (bool b)
bool | SetLogLevel (BIAS_LOG_LEVEL dLogLevel)
bool | SetLogStream (std::ostream zStream)
void | SetShowCodeInfo (bool b)

Static Public Member Functions

static void | DeleteInstance ()
avoid memory leaks by explicit delete on instance JW
static LogFacility * | Instance ()
static void | SetInstance (LogFacility *other)

Protected Member Functions

LogFacility (const LogFacility &l)
no one can copy me
LogFacility (void)
no one can inherit from me
LogFacility & | operator= (const LogFacility &l)
~LogFacility (void)

Protected Attributes

bool | bAbortOnFatal_
bool | bCodeInfo_
BIAS_LOG_LEVEL dLogLevel_
std::ofstream | zLogFileStream_
std::ostream | zLogStream_

Static Protected Attributes

static LogFacility * | pInstance_ = NULL

Detailed Description

Definition at line 118 of file LogFacility.hh.

Constructor & Destructor Documentation

LogFacility::LogFacility ( void ) [protected]

no one can inherit from me

Definition at line 12 of file LogFacility.cpp.

References bAbortOnFatal_, bCodeInfo_, BIAS::BIAS_LOG_DEBUG, and dLogLevel_.

LogFacility::LogFacility ( const LogFacility & l ) [protected]

no one can copy me

Definition at line 22 of file LogFacility.cpp.

BIAS::LogFacility::~LogFacility ( void ) [inline, protected]

Definition at line 212 of file LogFacility.hh.

Member Function Documentation

void LogFacility::DeleteInstance ( ) [static]

avoid memory leaks by explicit delete on instance JW

Definition at line 40 of file LogFacility.cpp.

References SetInstance().

bool BIAS::LogFacility::GetAbortOnFatal ( ) [inline]

Definition at line 200 of file LogFacility.hh.

BIAS_LOG_LEVEL BIAS::LogFacility::GetLogLevel ( ) [inline]

Definition at line 150 of file LogFacility.hh.

std::ostream& BIAS::LogFacility::GetLogStream ( ) [inline]

Definition at line 166 of file LogFacility.hh.

bool BIAS::LogFacility::GetLogStream ( std::ostream & zStream ) [inline]

Definition at line 161 of file LogFacility.hh.

bool BIAS::LogFacility::GetShowCodeInfo ( ) [inline]

Definition at line 193 of file LogFacility.hh.

static LogFacility* BIAS::LogFacility::Instance ( ) [inline, static]

Definition at line 122 of file LogFacility.hh.

Referenced by operator=().

bool BIAS::LogFacility::OpenLogFile ( const std::string & sFileName ) [inline]

Definition at line 133 of file LogFacility.hh.

LogFacility & LogFacility::operator= ( const LogFacility & l ) [protected]

Definition at line 26 of file LogFacility.cpp.

References Instance().

void BIAS::LogFacility::PrintLogLevel ( ) [inline]

Definition at line 178 of file LogFacility.hh.

References BIAS::BIAS_LOG_DEBUG, BIAS::BIAS_LOG_FATAL, BIAS::BIAS_LOG_INFO, BIAS::BIAS_LOG_NONE, and BIAS::BIAS_LOG_WARNING.

bool BIAS::LogFacility::ResetStream ( ) [inline]

Definition at line 171 of file LogFacility.hh.

void BIAS::LogFacility::SetAbortOnFatal ( bool b ) [inline]

Definition at line 197 of file LogFacility.hh.

void LogFacility::SetInstance ( LogFacility * other ) [static]

Definition at line 31 of file LogFacility.cpp.

References pInstance_.

Referenced by DeleteInstance().

bool BIAS::LogFacility::SetLogLevel ( BIAS_LOG_LEVEL dLogLevel ) [inline]

Definition at line 145 of file LogFacility.hh.

bool BIAS::LogFacility::SetLogStream ( std::ostream zStream ) [inline]

Definition at line 154 of file LogFacility.hh.

void BIAS::LogFacility::SetShowCodeInfo ( bool b ) [inline]

Definition at line 190 of file LogFacility.hh.

Member Data Documentation

bool BIAS::LogFacility::bAbortOnFatal_ [protected]

Definition at line 228 of file LogFacility.hh.

Referenced by LogFacility().

bool BIAS::LogFacility::bCodeInfo_ [protected]

Definition at line 227 of file LogFacility.hh.

Referenced by LogFacility().

BIAS_LOG_LEVEL BIAS::LogFacility::dLogLevel_ [protected]

Definition at line 224 of file LogFacility.hh.

Referenced by LogFacility().

LogFacility * LogFacility::pInstance_ = NULL [static, protected]

Definition at line 230 of file LogFacility.hh.

Referenced by SetInstance().

std::ofstream BIAS::LogFacility::zLogFileStream_ [protected]

Definition at line 226 of file LogFacility.hh.

std::ostream BIAS::LogFacility::zLogStream_ [protected]

Definition at line 218 of file LogFacility.hh.

The documentation for this class was generated from the following files:
  • Base/Debug/LogFacility.hh
  • Base/Debug/LogFacility.cpp
Generated on Wed Jun 21 19:08:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::LogPolarMapping< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::LogPolarMapping

BIAS::LogPolarMapping< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Maps cartesian source coordinates to log-polar sink coordinates. More...

#include <Image/LogPolarMapping.hh>

Inheritance diagram for BIAS::LogPolarMapping< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::LogPolarMapping< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

template<>
void | ClipValue_ (const double &value, float &newvalue)
virtual int | GetBoundingBox (unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
LogPolarMapping (const LogPolarMapping &src)
required because assignment is
LogPolarMapping ()
LogPolarMapping< InputStorageType,
OutputStorageType > & 		operator= (const LogPolarMapping &src)
required because of const members
void | SetImageCenter (const int &x, const int &y)
set your image center before calling Map().
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
virtual void | UpdatePyramidSize (const Image< OutputStorageType > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size
virtual | ~LogPolarMapping ()

Protected Member Functions

virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source)
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, OutputStorageType &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const
reimplementation for Pixel transformation, takes sink and computes coords in source
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing

Protected Attributes

HomgPoint2D * _XYMap
double | A_
bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
int | offsetX_
int | offsetY_
PyramidImage< InputStorageType > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
double | R_
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
double | width_
int | XCenter_
int | YCenter_

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::LogPolarMapping< InputStorageType, OutputStorageType >

Maps cartesian source coordinates to log-polar sink coordinates.

The center of rotation must be set. The minimum center value is the radius of the circle.

Author:
oniemann

Definition at line 43 of file LogPolarMapping.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
LogPolarMapping::~LogPolarMapping ( ) [virtual]

Definition at line 34 of file LogPolarMapping.cpp.

template<class InputStorageType, class OutputStorageType>
LogPolarMapping::LogPolarMapping ( )

Definition at line 39 of file LogPolarMapping.cpp.

template<class InputStorageType, class OutputStorageType>
LogPolarMapping::LogPolarMapping ( const LogPolarMapping< InputStorageType, OutputStorageType > & src )

required because assignment is

Author:
Jan Woetzel

Definition at line 44 of file LogPolarMapping.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_ | ( | const Image< InputStorageType > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual, inherited]

compute maximum number of pyramid levels needed

Definition at line 154 of file BackwardMapping.cpp.

References BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, and BIAS::PyramidImage< StorageType >::Release().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_ | ( | const Image< OutputStorageType > & | sink,
 |  | const Image< InputStorageType > & | source
 | ) | [protected, virtual, inherited]

Definition at line 753 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_ | ( | Image< OutputStorageType > & | ,
 |  | const Image< InputStorageType > & |
 | ) | [protected, virtual, inherited]

Definition at line 780 of file BackwardMapping.cpp.

References abs, BUILD_IMAGE_CHAR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< OutputStorageType > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

clip computed region in dest image to roi

Definition at line 666 of file BackwardMapping.cpp.

References BIAS::ImageBase::GetROICorners().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<>
void BIAS::BackwardMapping< float, float >::ClipValue_ | ( | const double & | value,
 |  | float & | newvalue
 | ) | [inherited]

Definition at line 719 of file BackwardMapping.cpp.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_ | ( | const double & | value,
 |  | OutputStorageType & | newvalue
 | ) | [protected, virtual, inherited]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 690 of file BackwardMapping.cpp.

References max, min, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected, inherited]

use jacobian of mapping function to do anisotropic antialiasing

Definition at line 591 of file BackwardMapping.cpp.

References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Matrix< T >::GetData(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::Matrix2x2< T >::Transpose().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox | ( | unsigned int | ,
 |  | unsigned int | ,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [inline, virtual, inherited]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates can be negative ! The br position is the first pixel outside the region(as for a ROI). Implement this in a derived class for speeding up calculation.

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 149 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< InputStorageType > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 506 of file BackwardMapping.cpp.

References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual, inherited]

numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 55 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int LogPolarMapping::GetSourceCoordinates_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected, virtual]

reimplementation for Pixel transformation, takes sink and computes coords in source

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 84 of file LogPolarMapping.cpp.

References BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::_XYMap, and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::XCenter_.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 532 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected, inherited]

takes jacobian to compute gaussian kernel for anisotropic smoothing

Definition at line 728 of file BackwardMapping.cpp.

References a, BIAS::Matrix< T >::GetData(), BIAS::Matrix2x2< T >::Invert(), and TNT::Matrix< T >::num_cols().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map ( Image< OutputStorageType > & sink ) [inherited]

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

Definition at line 223 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::MapTrilinear.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) | [inherited]

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

Definition at line 170 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_ | ( | const Image< InputStorageType > & | source,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected, inherited]

bilinear, bicubc and nearest neighbor interpolation

Definition at line 238 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_, BIASERR, BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ImageBase::GetSize(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), BIAS::ROI::IsInROI(), BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_, and value.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_ ( Image< OutputStorageType > & sink ) [protected, inherited]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

Definition at line 363 of file BackwardMapping.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::PyramidImage< StorageType >::IsEmpty(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
LogPolarMapping< InputStorageType, OutputStorageType > & LogPolarMapping::operator= ( const LogPolarMapping< InputStorageType, OutputStorageType > & src )

required because of const members

Author:
Jan Woetzel

Definition at line 52 of file LogPolarMapping.cpp.

References BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::XCenter_, and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::YCenter_.

template<class InputStorageType, class OutputStorageType>
void LogPolarMapping::SetImageCenter | ( | const int & | x,
 |  | const int & | y
 | ) |

set your image center before calling Map().

min(x,y) = radius of circle.

Definition at line 61 of file LogPolarMapping.cpp.

References BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::_XYMap, a, r, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::XCenter_, and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::YCenter_.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize ( const int newsize ) [inherited]

sets pyramid size to pyramid and updates if neccessary

Definition at line 135 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, BIAS::PyramidImage< StorageType >::SetPyramidSize(), and BIAS::ImageBase::StealImage().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize ( const Image< OutputStorageType > & sink ) [virtual, inherited]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Definition at line 86 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::ImageBase::GetHeight(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
HomgPoint2D* BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::_XYMap [protected]

Definition at line 71 of file LogPolarMapping.hh.

Referenced by BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter().

template<class InputStorageType, class OutputStorageType>
double BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::A_ [protected]

Definition at line 70 of file LogPolarMapping.hh.

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_ [protected, inherited]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_().

template<class InputStorageType, class OutputStorageType>
BIAS::Image<float> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_ [protected, inherited]

Definition at line 298 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_ [protected, inherited]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::height_ [protected, inherited]

Definition at line 296 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_ [protected, inherited]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
PyramidImage<InputStorageType> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_ [protected, inherited]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
double BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::R_ [protected]

Definition at line 70 of file LogPolarMapping.hh.

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_ [protected, inherited]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_().

template<class InputStorageType, class OutputStorageType>
ROI BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_ [protected, inherited]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::width_ [protected, inherited]

Definition at line 295 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::XCenter_ [protected]

Definition at line 69 of file LogPolarMapping.hh.

Referenced by BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::operator=(), and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter().

template<class InputStorageType, class OutputStorageType>
int BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::YCenter_ [protected]

Definition at line 69 of file LogPolarMapping.hh.

Referenced by BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::operator=(), and BIAS::LogPolarMapping< InputStorageType, OutputStorageType >::SetImageCenter().

The documentation for this class was generated from the following files:
  • Image/LogPolarMapping.hh
  • Image/LogPolarMapping.cpp
Generated on Wed Jun 21 19:08:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::LowerTriangularView< MaTRiX > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::LowerTriangularView

TNT::LowerTriangularView< MaTRiX > Class Template Reference

#include <Base/Math/tnt/triang.h>

Collaboration diagram for TNT::LowerTriangularView< MaTRiX >:

[legend]
List of all members.

Public Types

typedef MaTRiX::const_reference | const_reference
typedef const MaTRiX::element_type | element_type
typedef element_type | T
typedef const MaTRiX::element_type | value_type

Public Member Functions

Subscript | dim (Subscript d) const
const_reference | get (Subscript i, Subscript j) const
Subscript | lbound () const
LowerTriangularView (MaTRiX &A)
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const

Protected Attributes

const MaTRiX & | A_
const MaTRiX::element_type | zero_

Detailed Description

template<class MaTRiX>
class TNT::LowerTriangularView< MaTRiX >

Definition at line 46 of file triang.h.

Member Typedef Documentation

template<class MaTRiX>
typedef MaTRiX::const_reference TNT::LowerTriangularView< MaTRiX >::const_reference

Definition at line 57 of file triang.h.

template<class MaTRiX>
typedef const MaTRiX::element_type TNT::LowerTriangularView< MaTRiX >::element_type

Definition at line 58 of file triang.h.

template<class MaTRiX>
typedef element_type TNT::LowerTriangularView< MaTRiX >::T

Definition at line 60 of file triang.h.

template<class MaTRiX>
typedef const MaTRiX::element_type TNT::LowerTriangularView< MaTRiX >::value_type

Definition at line 59 of file triang.h.

Constructor & Destructor Documentation

template<class MaTRiX>
TNT::LowerTriangularView< MaTRiX >::LowerTriangularView ( MaTRiX & A ) [inline]

Definition at line 70 of file triang.h.

Member Function Documentation

template<class MaTRiX>
Subscript TNT::LowerTriangularView< MaTRiX >::dim ( Subscript d ) const [inline]

Definition at line 62 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_.

template<class MaTRiX>
const_reference TNT::LowerTriangularView< MaTRiX >::get | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 73 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_, TNT::LowerTriangularView< MaTRiX >::lbound(), and TNT::LowerTriangularView< MaTRiX >::zero_.

template<class MaTRiX>
Subscript TNT::LowerTriangularView< MaTRiX >::lbound ( ) const [inline]

Definition at line 63 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_.

Referenced by TNT::LowerTriangularView< MaTRiX >::get(), TNT::matmult(), and TNT::LowerTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
Subscript TNT::LowerTriangularView< MaTRiX >::num_cols ( ) const [inline]

Definition at line 65 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_.

Referenced by TNT::matmult().

template<class MaTRiX>
Subscript TNT::LowerTriangularView< MaTRiX >::num_rows ( ) const [inline]

Definition at line 64 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_.

Referenced by TNT::matmult().

template<class MaTRiX>
const_reference TNT::LowerTriangularView< MaTRiX >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 88 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::A_, TNT::LowerTriangularView< MaTRiX >::lbound(), and TNT::LowerTriangularView< MaTRiX >::zero_.

Member Data Documentation

template<class MaTRiX>
const MaTRiX& TNT::LowerTriangularView< MaTRiX >::A_ [protected]

Definition at line 51 of file triang.h.

Referenced by TNT::LowerTriangularView< MaTRiX >::dim(), TNT::LowerTriangularView< MaTRiX >::get(), TNT::LowerTriangularView< MaTRiX >::lbound(), TNT::LowerTriangularView< MaTRiX >::num_cols(), TNT::LowerTriangularView< MaTRiX >::num_rows(), and TNT::LowerTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
const MaTRiX::element_type TNT::LowerTriangularView< MaTRiX >::zero_ [protected]

Definition at line 52 of file triang.h.

Referenced by TNT::LowerTriangularView< MaTRiX >::get(), and TNT::LowerTriangularView< MaTRiX >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/triang.h
Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MainFrame Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MainFrame Class Reference

Collaboration diagram for MainFrame:

[legend]
List of all members.

Public Member Functions

double | CalcImageMean3x3 (BIAS::Image< unsigned char > img, int x, int y)
void FitSizetIfTooSmall ()
fits the frame size if it is too small for curent image
void FitSizetIfTooSmall ()
fits the frame size if it is too small for curent image
void | LoadImages (const wxArrayString &paths)
bool | LoadImagesAndCalculate (const wxArrayString &fileNames)
MainFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MainFrame ()
MainFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
void RefitClients ()
workaround adapting client canvases size
void | SetFileList (const vector< string > &fileNames)
void | SetImages (Image< unsigned char > &image1, const Projection &proj1, const string &name1, Image< unsigned char > &image2, const Projection &proj2, const string &name2)

Public Attributes

wxArrayString | ImageFileNames_

Protected Member Functions

void | CalculateSteps (int dImageNumber)
void | LoadImageFromList (int index)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnDelay (wxSpinEvent &event)
void | OnExit (wxCommandEvent &event)
void | OnExit (wxCommandEvent &event)
void | OnFit (wxCommandEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnInfo (wxCommandEvent &event)
void | OnKeyInfo (wxCommandEvent &event)
void | OnLoad (wxCommandEvent &event)
void | OnLoad (wxCommandEvent &event)
void | OnMetaData (wxCommandEvent &event)
void | OnNext (wxCommandEvent &event)
void | OnPrev (wxCommandEvent &event)
void | OnRunStop (wxCommandEvent &event)
void | OnSize (wxSizeEvent &event)
void | OnSize (wxSizeEvent &event)
void | OnStepsEnter (wxCommandEvent &event)
void | OnTimer (wxTimerEvent &event)
void | OnTimer (wxTimerEvent &event)
void RefitClients ()
void | SaveUnVignetted (wxCommandEvent &event)
void UnVignette ()
void | WriteCameraData (wxCommandEvent &event)

Protected Attributes

bool | _BlockAnimation
int | _CurrentImage
wxString | _DefaultDir
wxString | _DefaultFile
wxSpinCtrl * | _DelaySpin
vector< string > | _FileNames
wxCheckBox * | _FitCheckBox
ScaledImageCanvas * _ImageCanvasFloat
ImageCanvas * _ImageCanvasUC
string | _MetaData
bool | _NeedReload
wxCheckBox * | _ReverseCheckBox
wxButton * | _RunStopButton
wxTimer | _Timer
bool | bImageLoaded_
bool | bUnVignetteParamsReady_
std::vector< double > | controlPoints_
wxString | DefaultDir_
wxString | DefaultFile_
int | dGroundThruthWhite_
int | dNumberOfSteps_
wxString | fileName_
ImageCanvas * ImageCanvasUC_
int | ImageHeight_
int | ImageWidth_
ImageBase origImage_
wxTextCtrl * | PPXTextCtrl_
wxTextCtrl * | PPYTextCtrl_
int | PrinciplePointX_
int | PrinciplePointY_
wxStaticText * | StaticLabel_
wxTextCtrl * | StepsTextCtrl_
wxTimer | Timer_
Image< unsigned char > | ucImage_
Image< unsigned char > | unVigImage_
BIAS::UnVignette UnVignette_
std::vector< double > | VignettePercentage_

Private Member Functions

void | DrawDistortedLine (EpipolarLine &line, Image< unsigned char > &image, const ProjectionParametersPerspective *paramsPersp, const ProjectionParametersSpherical *paramsSpherical)
void | OnLeftDown (wxMouseEvent &event)

Private Attributes

CutoutFrame * _CutoutFrame1
CutoutFrame * _CutoutFrame2
Image< unsigned char > | _Image1
Image< unsigned char > | _Image2
PlainImageCanvas * _ImageCanvas1
PlainImageCanvas * _ImageCanvas2
std::string | _ImageName1
std::string | _ImageName2
Projection _Projection1
Projection _Projection2
wxPoint | _SelectedPoint1
wxPoint | _SelectedPoint2

Friends

class | DragAndDropTarget

Detailed Description

Definition at line 48 of file biasdetectunvignettewx.cpp.

Constructor & Destructor Documentation

MainFrame::MainFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

Definition at line 144 of file biasdetectunvignettewx.cpp.

MainFrame::MainFrame ( )

Definition at line 314 of file biasshowepiwx.cpp.

MainFrame::MainFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

Member Function Documentation

double MainFrame::CalcImageMean3x3 | ( | BIAS::Image< unsigned char > | img,
 |  | int | x,
 |  | int | y
 | ) |

Definition at line 503 of file biasdetectunvignettewx.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::PixelValue().

void MainFrame::CalculateSteps ( int dImageNumber ) [protected]

Definition at line 282 of file biasdetectunvignettewx.cpp.

References controlPoints_, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), ImageHeight_, ImageWidth_, origImage_, ucImage_, and VignettePercentage_.

Referenced by LoadImagesAndCalculate().

void MainFrame::DrawDistortedLine | ( | EpipolarLine & | line,
 |  | Image< unsigned char > & | image,
 |  | const ProjectionParametersPerspective * | paramsPersp,
 |  | const ProjectionParametersSpherical * | paramsSpherical
 | ) | [private]

Definition at line 355 of file biasshowepiwx.cpp.

References BIAS::ProjectionParametersPerspective::Distort(), BIAS::EpipolarLine::GetCloseIntersectionWithImageBorder(), BIAS::EpipolarLine::GetFarIntersectionWithImageBorder(), BIAS::ImageBase::GetHeight(), BIAS::ProjectionParametersBase::GetImageSize(), BIAS::Bresenham::GetNext(), BIAS::ImageBase::GetWidth(), BIAS::HomgPoint2D::Homogenize(), BIAS::ProjectionParametersSpherical::ProjectLocal(), BIAS::Image< StorageType >::SetPixel(), and BIAS::ProjectionParametersPerspective::UnProjectLocal().

Referenced by OnLeftDown().

void MainFrame::FitSizetIfTooSmall ( )

fits the frame size if it is too small for curent image

void MainFrame::FitSizetIfTooSmall ( )

fits the frame size if it is too small for curent image

Definition at line 445 of file biasviewwx.cpp.

References _ImageCanvasFloat, _ImageCanvasUC, BIAS::ImageBase::GetHeight(), BIAS::ImageCanvas::GetOrigImage(), BIAS::ScaledImageCanvas::GetOrigimg(), BIAS::ImageBase::GetWidth(), min, and RefitClients().

Referenced by BiasViewApp::OnInit().

void MainFrame::LoadImageFromList ( int index ) [protected]

Definition at line 227 of file biasviewwx.cpp.

References _CurrentImage, _FileNames, BIAS::AsciiToWx(), and BIASERR.

Referenced by LoadImages(), OnFit(), OnNext(), OnPrev(), and SetFileList().

void MainFrame::LoadImages ( const wxArrayString & paths )

Definition at line 402 of file biasviewwx.cpp.

References _DefaultFile, _FileNames, BIAS::AsciiToWx(), BIASERR, LoadImageFromList(), BIAS::Param::ParseListFile(), and WxToAscii.

Referenced by BiasViewApp::OnInit().

bool MainFrame::LoadImagesAndCalculate ( const wxArrayString & fileNames )

Definition at line 432 of file biasdetectunvignettewx.cpp.

References BIAS::AsciiToWx(), BIASERR, bImageLoaded_, CalculateSteps(), dNumberOfSteps_, fileName_, ImageCanvasUC_, origImage_, PPXTextCtrl_, PPYTextCtrl_, PrinciplePointX_, PrinciplePointY_, RefitClients(), StepsTextCtrl_, and WxToAscii.

Referenced by DragAndDropTarget::OnDropFiles(), OnLoad(), and OnStepsEnter().

void MainFrame::OnAbout ( wxCommandEvent & event ) [protected]

void MainFrame::OnAbout ( wxCommandEvent & event ) [protected]

Definition at line 522 of file biasdetectunvignettewx.cpp.

References BIAS::AsciiToWx().

void MainFrame::OnDelay ( wxSpinEvent & event ) [protected]

Definition at line 647 of file biasviewwx.cpp.

References _DelaySpin, and _Timer.

void MainFrame::OnExit ( wxCommandEvent & event ) [protected]

void MainFrame::OnExit ( wxCommandEvent & event ) [protected]

Definition at line 521 of file biasdetectunvignettewx.cpp.

void MainFrame::OnFit ( wxCommandEvent & event ) [protected]

Definition at line 655 of file biasviewwx.cpp.

References _CurrentImage, and LoadImageFromList().

void MainFrame::OnIdle ( wxIdleEvent & event ) [protected]

void MainFrame::OnIdle ( wxIdleEvent & event ) [protected]

Definition at line 539 of file biasdetectunvignettewx.cpp.

void MainFrame::OnInfo ( wxCommandEvent & event ) [protected]

Definition at line 521 of file biasviewwx.cpp.

References _ImageCanvasFloat, _ImageCanvasUC, BIAS::AsciiToWx(), BIAS::ImageBase::GetBitDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageCanvas::GetOrigImage(), BIAS::ScaledImageCanvas::GetOrigimg(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetSize(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetUID(), BIAS::ImageBase::GetVersionNumber(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageBase::IsPlanar().

void MainFrame::OnKeyInfo ( wxCommandEvent & event ) [protected]

Definition at line 583 of file biasviewwx.cpp.

void MainFrame::OnLeftDown ( wxMouseEvent & event ) [private]

Definition at line 396 of file biasshowepiwx.cpp.

References _CutoutFrame1, _Image1, _Image2, _ImageCanvas1, _ImageCanvas2, _ImageName1, _ImageName2, _Projection1, _Projection2, _SelectedPoint1, ComputeCutoutImage(), BIAS::Vector3< T >::CrossProduct(), CUTOUT_SIZE, BIAS::HomgPoint2D::DeterminePosition(), DrawDistortedLine(), BIAS::FMatrix::GetEpipolesHomogenized(), BIAS::ImageBase::GetHeight(), BIAS::ProjectionParametersPerspective::GetP(), BIAS::Projection::GetParameters(), BIAS::ImageBase::GetWidth(), HALF_CUTOUT_SIZE, K, BIAS::ProjectionParametersPerspective::ProjectLocal(), BIAS::EpipolarLine::Recalc(), SCALE, BIAS::ProjectionParametersBase::SetC(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersPerspective::SetK(), BIAS::ProjectionParametersBase::SetQ(), CutoutFrame::SetTransform(), BIAS::ImageCanvas::Show(), CutoutFrame::ShowImage(), and BIAS::ProjectionParametersPerspective::Undistort().

void MainFrame::OnLoad ( wxCommandEvent & event ) [protected]

void MainFrame::OnLoad ( wxCommandEvent & event ) [protected]

Definition at line 474 of file biasdetectunvignettewx.cpp.

References DefaultDir_, DefaultFile_, ImageFileNames_, and LoadImagesAndCalculate().

void MainFrame::OnMetaData ( wxCommandEvent & event ) [protected]

Definition at line 559 of file biasviewwx.cpp.

References _MetaData, and BIAS::AsciiToWx().

void MainFrame::OnNext ( wxCommandEvent & event ) [protected]

Definition at line 613 of file biasviewwx.cpp.

References _CurrentImage, _FileNames, and LoadImageFromList().

void MainFrame::OnPrev ( wxCommandEvent & event ) [protected]

Definition at line 623 of file biasviewwx.cpp.

References _CurrentImage, _FileNames, and LoadImageFromList().

void MainFrame::OnRunStop ( wxCommandEvent & event ) [protected]

Definition at line 633 of file biasviewwx.cpp.

References _RunStopButton, and _Timer.

void MainFrame::OnSize ( wxSizeEvent & event ) [protected]

void MainFrame::OnSize ( wxSizeEvent & event ) [protected]

Definition at line 540 of file biasdetectunvignettewx.cpp.

References RefitClients().

void MainFrame::OnStepsEnter ( wxCommandEvent & event ) [protected]

Definition at line 276 of file biasdetectunvignettewx.cpp.

References ImageFileNames_, LoadImagesAndCalculate(), and StepsTextCtrl_.

void MainFrame::OnTimer ( wxTimerEvent & event ) [protected]

void MainFrame::OnTimer ( wxTimerEvent & event ) [protected]

Definition at line 538 of file biasdetectunvignettewx.cpp.

void MainFrame::RefitClients ( )

workaround adapting client canvases size

void MainFrame::RefitClients ( ) [protected]

Definition at line 421 of file biasdetectunvignettewx.cpp.

References ImageCanvasUC_.

Referenced by FitSizetIfTooSmall(), LoadImagesAndCalculate(), and OnSize().

void MainFrame::SaveUnVignetted ( wxCommandEvent & event ) [protected]

Definition at line 245 of file biasdetectunvignettewx.cpp.

References BIAS::ImageBase::IsEmpty(), and unVigImage_.

void MainFrame::SetFileList ( const vector< string > & fileNames )

Definition at line 218 of file biasviewwx.cpp.

References _FileNames, and LoadImageFromList().

void MainFrame::SetImages | ( | Image< unsigned char > & | image1,
 |  | const Projection & | proj1,
 |  | const string & | name1,
 |  | Image< unsigned char > & | image2,
 |  | const Projection & | proj2,
 |  | const string & | name2
 | ) |

Definition at line 326 of file biasshowepiwx.cpp.

References _Image1, _Image2, _ImageCanvas1, _ImageCanvas2, _ImageName1, _ImageName2, _Projection1, _Projection2, BIAS::ImageCanvas::SetClearDrawingContext(), and BIAS::ImageCanvas::Show().

Referenced by BiasShowEpiApp::OnInit().

void MainFrame::UnVignette ( ) [protected]

Definition at line 403 of file biasdetectunvignettewx.cpp.

References bImageLoaded_, bUnVignetteParamsReady_, BIAS::UnVignette::Compute(), controlPoints_, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::UnVignette::Init(), LEAST_SQUARES, origImage_, PrinciplePointX_, PrinciplePointY_, unVigImage_, UnVignette_, and VignettePercentage_.

void MainFrame::WriteCameraData ( wxCommandEvent & event ) [protected]

Definition at line 205 of file biasdetectunvignettewx.cpp.

References bUnVignetteParamsReady_.

Friends And Related Function Documentation

DragAndDropTarget [friend]

Definition at line 51 of file biasdetectunvignettewx.cpp.

Member Data Documentation

bool MainFrame::_BlockAnimation [protected]

Definition at line 91 of file biasviewwx.cpp.

int MainFrame::_CurrentImage [protected]

Definition at line 88 of file biasviewwx.cpp.

Referenced by LoadImageFromList(), OnFit(), OnNext(), and OnPrev().

CutoutFrame* MainFrame::_CutoutFrame1 [private]

Definition at line 296 of file biasshowepiwx.cpp.

Referenced by OnLeftDown().

CutoutFrame* MainFrame::_CutoutFrame2 [private]

Definition at line 297 of file biasshowepiwx.cpp.

wxString MainFrame::_DefaultDir [protected]

Definition at line 100 of file biasviewwx.cpp.

wxString MainFrame::_DefaultFile [protected]

Definition at line 99 of file biasviewwx.cpp.

Referenced by LoadImages().

wxSpinCtrl* MainFrame::_DelaySpin [protected]

Definition at line 92 of file biasviewwx.cpp.

Referenced by OnDelay().

vector<string> MainFrame::_FileNames [protected]

Definition at line 87 of file biasviewwx.cpp.

Referenced by LoadImageFromList(), LoadImages(), OnNext(), OnPrev(), and SetFileList().

wxCheckBox* MainFrame::_FitCheckBox [protected]

Definition at line 93 of file biasviewwx.cpp.

Image<unsigned char> MainFrame::_Image1 [private]

Definition at line 293 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

Image<unsigned char> MainFrame::_Image2 [private]

Definition at line 293 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

PlainImageCanvas* MainFrame::_ImageCanvas1 [private]

Definition at line 291 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

PlainImageCanvas* MainFrame::_ImageCanvas2 [private]

Definition at line 292 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

ScaledImageCanvas* MainFrame::_ImageCanvasFloat [protected]

Definition at line 86 of file biasviewwx.cpp.

Referenced by FitSizetIfTooSmall(), and OnInfo().

ImageCanvas* MainFrame::_ImageCanvasUC [protected]

Definition at line 85 of file biasviewwx.cpp.

Referenced by FitSizetIfTooSmall(), and OnInfo().

std::string MainFrame::_ImageName1 [private]

Definition at line 295 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

std::string MainFrame::_ImageName2 [private]

Definition at line 295 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

string MainFrame::_MetaData [protected]

Definition at line 89 of file biasviewwx.cpp.

Referenced by OnMetaData().

bool MainFrame::_NeedReload [protected]

Definition at line 96 of file biasviewwx.cpp.

Projection MainFrame::_Projection1 [private]

Definition at line 294 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

Projection MainFrame::_Projection2 [private]

Definition at line 294 of file biasshowepiwx.cpp.

Referenced by OnLeftDown(), and SetImages().

wxCheckBox* MainFrame::_ReverseCheckBox [protected]

Definition at line 94 of file biasviewwx.cpp.

wxButton* MainFrame::_RunStopButton [protected]

Definition at line 95 of file biasviewwx.cpp.

Referenced by OnRunStop().

wxPoint MainFrame::_SelectedPoint1 [private]

Definition at line 298 of file biasshowepiwx.cpp.

Referenced by OnLeftDown().

wxPoint MainFrame::_SelectedPoint2 [private]

Definition at line 299 of file biasshowepiwx.cpp.

wxTimer MainFrame::_Timer [protected]

Definition at line 90 of file biasviewwx.cpp.

Referenced by OnDelay(), and OnRunStop().

bool MainFrame::bImageLoaded_ [protected]

Definition at line 79 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate(), and UnVignette().

bool MainFrame::bUnVignetteParamsReady_ [protected]

Definition at line 78 of file biasdetectunvignettewx.cpp.

Referenced by UnVignette(), and WriteCameraData().

std::vector<double> MainFrame::controlPoints_ [protected]

Definition at line 91 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps(), and UnVignette().

wxString MainFrame::DefaultDir_ [protected]

Definition at line 83 of file biasdetectunvignettewx.cpp.

Referenced by OnLoad().

wxString MainFrame::DefaultFile_ [protected]

Definition at line 82 of file biasdetectunvignettewx.cpp.

Referenced by OnLoad().

int MainFrame::dGroundThruthWhite_ [protected]

Definition at line 94 of file biasdetectunvignettewx.cpp.

int MainFrame::dNumberOfSteps_ [protected]

Definition at line 80 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate().

wxString MainFrame::fileName_ [protected]

Definition at line 84 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate().

ImageCanvas* MainFrame::ImageCanvasUC_ [protected]

Definition at line 70 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate(), and RefitClients().

wxArrayString MainFrame::ImageFileNames_

Definition at line 63 of file biasdetectunvignettewx.cpp.

Referenced by DragAndDropTarget::OnDropFiles(), OnLoad(), and OnStepsEnter().

int MainFrame::ImageHeight_ [protected]

Definition at line 97 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps().

int MainFrame::ImageWidth_ [protected]

Definition at line 96 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps().

ImageBase MainFrame::origImage_ [protected]

Definition at line 89 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps(), LoadImagesAndCalculate(), and UnVignette().

wxTextCtrl* MainFrame::PPXTextCtrl_ [protected]

Definition at line 75 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate().

wxTextCtrl* MainFrame::PPYTextCtrl_ [protected]

Definition at line 76 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate().

int MainFrame::PrinciplePointX_ [protected]

Definition at line 100 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate(), and UnVignette().

int MainFrame::PrinciplePointY_ [protected]

Definition at line 101 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate(), and UnVignette().

wxStaticText* MainFrame::StaticLabel_ [protected]

Definition at line 73 of file biasdetectunvignettewx.cpp.

wxTextCtrl* MainFrame::StepsTextCtrl_ [protected]

Definition at line 74 of file biasdetectunvignettewx.cpp.

Referenced by LoadImagesAndCalculate(), and OnStepsEnter().

wxTimer MainFrame::Timer_ [protected]

Definition at line 72 of file biasdetectunvignettewx.cpp.

Image<unsigned char> MainFrame::ucImage_ [protected]

Definition at line 88 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps().

Image<unsigned char> MainFrame::unVigImage_ [protected]

Definition at line 87 of file biasdetectunvignettewx.cpp.

Referenced by SaveUnVignetted(), and UnVignette().

BIAS::UnVignette MainFrame::UnVignette_ [protected]

Definition at line 68 of file biasdetectunvignettewx.cpp.

Referenced by UnVignette().

std::vector<double> MainFrame::VignettePercentage_ [protected]

Definition at line 92 of file biasdetectunvignettewx.cpp.

Referenced by CalculateSteps(), and UnVignette().

The documentation for this class was generated from the following files:
  • Tools/biasdetectunvignettewx.cpp
  • Tools/biasshowepiwx.cpp
  • Tools/biasviewwx.cpp
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: mainpage Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

mainpage Class Reference
[Graphical User Interfaces]

base class for OpenGL canvases you could derive from to get base functionality (JW) More...

#include <Gui/OpenGLCanvasBase.hh>

Detailed Description

base class for OpenGL canvases you could derive from to get base functionality (JW)

Has minimal dependencies and minimal event interceptions, just functionality. Use a derrived class for automatic event handling. Supports shared GL context. The idea is that you usually just need to derive and reimplement the DisplayCalls() routine. This clas is -NOT writing mous epos value to status bar -NOT updating periodically. See OpenGLCanvas for an extended version. TODO: page flipping stereo for windows mode (no fullscreen) TODO: handle multiple rendering contexts with different caabilites (e.g 2 differen GPUs) using "GLEW MX" TODO: add application controlled VSYNC enable/disable TODO: add application controlled antialiasing settings TODO: add keys for switching between 3D stereo rendering modes TODO: Rendertexture and Framebufferobject support? TODO: support for shared display lists and vertex buffer objects (VBO,VAR)?

Use the attriblist like RGBASD for setting the correct pixel formato rliek this:

   int attriblist[] =  {
      WX_GL_RGBA,
      WX_GL_MIN_RED, 1,
      WX_GL_MIN_GREEN, 1,
      WX_GL_MIN_BLUE, 1,
      WX_GL_MIN_ALPHA, 1,
      WX_GL_STENCIL_SIZE, 1,
      WX_GL_DOUBLEBUFFER,
      0
  };

The documentation for this class was generated from the following file:
  • Gui/OpenGLCanvasBase.hh
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MatchDataBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MatchDataBase

BIAS::MatchDataBase Class Reference
[Utilities]

class for representing matches, used in GenSynthMatches and biasshowsm More...

#include <Utils/MatchDataBase.hh>

Inheritance diagram for BIAS::MatchDataBase:

[legend]
Collaboration diagram for BIAS::MatchDataBase:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | GetC (std::vector< HomgPoint3D > &C) const
void | GetC (int imNo, HomgPoint3D &C) const
void | GetCorrespondences (std::vector< std::vector< HomgPoint2D > > &p) const
same as GetPOints with inverted indices : p[i][k] is point number i in image k
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetK (KMatrix &K) const
void | GetNormalizedCorrespondences (std::vector< std::vector< HomgPoint2D > > &p) const
same as GetNormalizedPoints with inverted indices : p[i][k] is point number i in image k
void | GetNormalizedPoints (std::vector< std::vector< HomgPoint2D > > &p) const
p[i][k] is point number k in image i
void | GetNormalizedPoints (int imNo, std::vector< HomgPoint2D > &p) const
int | GetNumImages () const
void | GetP (std::vector< PMatrixBase > &P) const
void | GetP (int imNo, PMatrixBase &P) const
void | GetPoints (std::vector< std::vector< HomgPoint2D > > &p) const
p[i][k] is point number k in image i
void | GetPoints (int imNo, std::vector< HomgPoint2D > &p) const
void | GetR (std::vector< RMatrixBase > &R) const
void | GetR (int imNo, RMatrixBase &R) const
MatchDataBase (Param &para)
bool | operator== (MatchDataBase &l)
void | PrintDebugLevel (std::ostream &os=std::cout) const
virtual int | Read (std::istream &is)
binary read
int | Read (const std::string &fname)
binary read
void | RemoveDebugLevel (long int lv)
void Reset ()
void | SetData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetNormalizedData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m)
virtual int | Write (std::ostream &os) const
binary write
int | Write (const std::string &fname) const
binary write
virtual | ~MatchDataBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

virtual void | _AddParameter (Param &para)
void | _SetCamData (KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C)
void | _Transpose (const std::vector< std::vector< HomgPoint2D > > &src, std::vector< std::vector< HomgPoint2D > > &dst) const

Protected Attributes

std::vector< HomgPoint3D > | _C
KMatrix _K
KMatrix _Ki
long int | _liDebugLevel
std::vector< std::vector<
HomgPoint2D > > 		_NormalizedPoints
int * | _NumImages
int * | _NumPoints
std::vector< PMatrixBase > | _P
std::vector< std::vector<
HomgPoint2D > > 		_Points
std::vector< RMatrixBase > | _R

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

BIASUtils_EXPORT std::ostream & | operator<< (std::ostream &os, const MatchDataBase &m)
BIASUtils_EXPORT std::istream & | operator>> (std::istream &is, MatchDataBase &m)

Detailed Description

class for representing matches, used in GenSynthMatches and biasshowsm

Author:
woelk 2004

Definition at line 47 of file MatchDataBase.hh.

Constructor & Destructor Documentation

MatchDataBase::MatchDataBase ( Param & para )

Definition at line 36 of file MatchDataBase.cpp.

References _AddParameter(), _NumImages, and _NumPoints.

MatchDataBase::~MatchDataBase ( ) [virtual]

Definition at line 43 of file MatchDataBase.cpp.

Member Function Documentation

void MatchDataBase::_AddParameter ( Param & para ) [protected, virtual]

Reimplemented in BIAS::GenSynthMatches.

Definition at line 272 of file MatchDataBase.cpp.

References BIAS::Param::CheckParam(), and BIAS::Param::GetGroupID().

Referenced by MatchDataBase().

void MatchDataBase::_SetCamData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C
 | ) | [protected]

Definition at line 139 of file MatchDataBase.cpp.

References _C, _K, _Ki, _P, _R, BIASASSERT, and BIAS::KMatrix::Invert().

Referenced by SetData(), and SetNormalizedData().

void BIAS::MatchDataBase::_Transpose | ( | const std::vector< std::vector< HomgPoint2D > > & | src,
 |  | std::vector< std::vector< HomgPoint2D > > & | dst
 | ) | const [inline, protected]

Definition at line 131 of file MatchDataBase.hh.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void MatchDataBase::GetC ( std::vector< HomgPoint3D > & C ) const

Definition at line 71 of file MatchDataBase.cpp.

References _C.

void MatchDataBase::GetC | ( | int | imNo,
 |  | HomgPoint3D & | C
 | ) | const

Definition at line 69 of file MatchDataBase.cpp.

References _C.

Referenced by main().

void BIAS::MatchDataBase::GetCorrespondences ( std::vector< std::vector< HomgPoint2D > > & p ) const

same as GetPOints with inverted indices : p[i][k] is point number i in image k

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void MatchDataBase::GetK ( KMatrix & K ) const

Definition at line 60 of file MatchDataBase.cpp.

References _K.

Referenced by main().

void BIAS::MatchDataBase::GetNormalizedCorrespondences ( std::vector< std::vector< HomgPoint2D > > & p ) const

same as GetNormalizedPoints with inverted indices : p[i][k] is point number i in image k

void BIAS::MatchDataBase::GetNormalizedPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const

p[i][k] is point number k in image i

void MatchDataBase::GetNormalizedPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const

Definition at line 86 of file MatchDataBase.cpp.

References _NormalizedPoints.

Referenced by main().

int BIAS::MatchDataBase::GetNumImages ( ) const [inline]

Definition at line 89 of file MatchDataBase.hh.

Referenced by main().

void MatchDataBase::GetP ( std::vector< PMatrixBase > & P ) const

Definition at line 76 of file MatchDataBase.cpp.

References _P.

void MatchDataBase::GetP | ( | int | imNo,
 |  | PMatrixBase & | P
 | ) | const

Definition at line 74 of file MatchDataBase.cpp.

References _P.

void MatchDataBase::GetPoints ( std::vector< std::vector< HomgPoint2D > > & p ) const

p[i][k] is point number k in image i

Definition at line 81 of file MatchDataBase.cpp.

References _Points, and p.

void MatchDataBase::GetPoints | ( | int | imNo,
 |  | std::vector< HomgPoint2D > & | p
 | ) | const

Definition at line 79 of file MatchDataBase.cpp.

References _Points.

Referenced by main().

void MatchDataBase::GetR ( std::vector< RMatrixBase > & R ) const

Definition at line 65 of file MatchDataBase.cpp.

References _R.

void MatchDataBase::GetR | ( | int | imNo,
 |  | RMatrixBase & | R
 | ) | const

Definition at line 63 of file MatchDataBase.cpp.

References _R.

Referenced by main().

bool MatchDataBase::operator== ( MatchDataBase & l )

Definition at line 242 of file MatchDataBase.cpp.

References _C, _K, _Ki, _NormalizedPoints, _NumImages, _NumPoints, _P, _Points, and _R.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

virtual int BIAS::MatchDataBase::Read ( std::istream & is ) [virtual]

binary read

Reimplemented in BIAS::GenSynthMatches.

int BIAS::MatchDataBase::Read ( const std::string & fname )

binary read

Reimplemented in BIAS::GenSynthMatches.

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void MatchDataBase::Reset ( )

Reimplemented in BIAS::GenSynthMatches.

Definition at line 46 of file MatchDataBase.cpp.

References _C, _K, _Ki, _NormalizedPoints, _P, _Points, _R, and BIAS::Matrix< T >::SetZero().

Referenced by BIAS::GenSynthMatches::Reset().

void MatchDataBase::SetData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C,
 |  | std::vector< std::vector< HomgPoint2D > > & | m
 | ) |

Definition at line 93 of file MatchDataBase.cpp.

References _Ki, _NormalizedPoints, _NumImages, _NumPoints, _Points, _SetCamData(), BIASASSERT, and p.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void MatchDataBase::SetNormalizedData | ( | KMatrix & | K,
 |  | std::vector< RMatrixBase > & | R,
 |  | std::vector< HomgPoint3D > & | C,
 |  | std::vector< std::vector< HomgPoint2D > > & | m
 | ) |

Definition at line 116 of file MatchDataBase.cpp.

References _K, _NormalizedPoints, _NumImages, _NumPoints, _Points, _SetCamData(), BIASASSERT, and p.

Referenced by main().

virtual int BIAS::MatchDataBase::Write ( std::ostream & os ) const [virtual]

binary write

Reimplemented in BIAS::GenSynthMatches.

int BIAS::MatchDataBase::Write ( const std::string & fname ) const

binary write

Reimplemented in BIAS::GenSynthMatches.

Referenced by BIAS::GenSynthMatches::Write().

Friends And Related Function Documentation

BIASUtils_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const MatchDataBase & | m
 | ) | [friend]

BIASUtils_EXPORT std::istream& operator>> | ( | std::istream & | is,
 |  | MatchDataBase & | m
 | ) | [friend]

Member Data Documentation

std::vector<HomgPoint3D> BIAS::MatchDataBase::_C [protected]

Definition at line 116 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::GenSynthMatches::_CreateCamMovement(), _SetCamData(), GetC(), BIAS::GenSynthMatches::operator=(), operator==(), and Reset().

KMatrix BIAS::MatchDataBase::_K [protected]

Definition at line 112 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_CreateCamMovement(), _SetCamData(), GetK(), BIAS::operator<<(), operator==(), Reset(), and SetNormalizedData().

KMatrix BIAS::MatchDataBase::_Ki [protected]

Definition at line 112 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::_CreateStaticGT2DPoints(), _SetCamData(), operator==(), Reset(), and SetData().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::vector<std::vector<HomgPoint2D> > BIAS::MatchDataBase::_NormalizedPoints [protected]

Definition at line 123 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), GetNormalizedPoints(), BIAS::operator<<(), BIAS::GenSynthMatches::operator=(), operator==(), Reset(), SetData(), and SetNormalizedData().

int* BIAS::MatchDataBase::_NumImages [protected]

Definition at line 109 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::GenSynthMatches::_CheckParams(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateMoving2DPoints(), BIAS::GenSynthMatches::_CreateMoving3DPoints(), BIAS::GenSynthMatches::_CreateMovingGT2DPoints(), BIAS::GenSynthMatches::_CreateMovingTransforms(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::GenSynthMatches::_CreateStaticGT2DPoints(), BIAS::GenSynthMatches::_Draw(), BIAS::GenSynthMatches::GetGTNormalizedF(), MatchDataBase(), BIAS::operator<<(), operator==(), SetData(), and SetNormalizedData().

int * BIAS::MatchDataBase::_NumPoints [protected]

Definition at line 109 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_CheckParams(), BIAS::GenSynthMatches::GetInliers(), MatchDataBase(), BIAS::operator<<(), operator==(), SetData(), and SetNormalizedData().

std::vector<PMatrixBase> BIAS::MatchDataBase::_P [protected]

Definition at line 118 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateMoving3DPoints(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), _SetCamData(), GetP(), BIAS::operator<<(), BIAS::GenSynthMatches::operator=(), operator==(), and Reset().

std::vector<std::vector<HomgPoint2D> > BIAS::MatchDataBase::_Points [protected]

Definition at line 122 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::GenSynthMatches::DrawNoisy(), GetPoints(), BIAS::operator<<(), BIAS::GenSynthMatches::operator=(), operator==(), Reset(), SetData(), and SetNormalizedData().

std::vector<RMatrixBase> BIAS::MatchDataBase::_R [protected]

Definition at line 114 of file MatchDataBase.hh.

Referenced by BIAS::GenSynthMatches::_AreMovingObjectsVisible(), BIAS::GenSynthMatches::_CreateCamMovement(), _SetCamData(), GetR(), BIAS::GenSynthMatches::operator=(), operator==(), and Reset().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Utils/MatchDataBase.hh
  • Utils/MatchDataBase.cpp
Generated on Wed Jun 21 19:08:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MatlabTBUndistortion Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MatlabTBUndistortion

BIAS::MatlabTBUndistortion Class Reference

#include <Image/MatlabTBUndistortion.hh>

Inheritance diagram for BIAS::MatlabTBUndistortion:

[legend]
Collaboration diagram for BIAS::MatlabTBUndistortion:

[legend]
List of all members.

Public Member Functions

int | AddCameraDataToRig (XMLIO &myXML, xmlNodePtr &cameraDataNode) const
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.
void | DebugOut () const
void | Distort (double &origx, double &origy) const
void | Distort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.
std::vector< double > | GetAngleCorrX () const
std::vector< double > | GetAngleCorrY () const
double | GetAspectRatio () const
double | GetAspectratio () const
int | GetCamID () const
double | GetCellSizeX ()
double | GetCellSizeY ()
void | GetDefaultUndistortion (double &f, double &kc1, double &kc2, double &kc3, double &kc4) const
double | GetDownsamplingFactor ()
double | GetFocalLength () const
Get the current camera focal length.
unsigned int | GetHeight () const
get camera image height.
std::vector< double > | GetIlluCorrX () const
std::vector< double > | GetIlluCorrY () const
BIAS::KMatrix | GetKMatrix () const
double | GetPrincipalX () const
get principal point, x in pixels relative to top left corner
double | GetPrincipalY () const
get principal point, y in pixels relative to top left corner
double | GetRadius () const
unsigned int | GetWidth () const
get camera image width.
double | GetZoom () const
Set the current camera zoom, the focal length will be calculated.
void | GetZoomUndistortion (std::vector< CPDiscreteParam > &vp) const
int | Init (XMLIO &myXML, xmlNodePtr &cameraNode)
int | Init (const std::string &filename)
void Init ()
int | Init (BIAS::Projection &projection)
int | Init (const CameraParam &cp)
void | InitPerspective (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
void | InitSpherical (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
bool | IsInitialized () const
bool | IsPerspective () const
bool | IsSpherical () const
bool | IsZoomCamera () const
True, if camera has a zoom lens.
MatlabTBUndistortion (const CameraParam &cp)
MatlabTBUndistortion ()
int | ReadCameraData (XMLIO &myXML, xmlNodePtr &cameraNode)
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.
int | ReadCameraData (const std::string &Filename)
Read a camera data parameter file and store the data in (*this).
int | ReadFromEXIF (const std::string &filename)
read jpeg EXIF header and set camera parameter
void | SetCellSize (const double CellSizeX, const double AspectRatio)
Set CCD cell-size in meter.
void SetData_EVID31_147094 ()
void SetData_OMNITECH_ORIFL_190_3 ()
void | SetDownsampling (const double factor)
Set downsampling factor - all get functions will return transformed values.
void | SetFocalLength (const double f)
get the current camera focal length
void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
double | SetRadius (double r)
void | SetSize (unsigned int w, unsigned int h)
set size of image seperatly
void SetUnzoomed ()
Set the zoom and focal length of a zoom camera to the default settings.
int | SetupProjectionLUT (const unsigned int &srcwidth, const unsigned int &srcheight, const unsigned int &ChanCnt, const unsigned int &SizeX, const unsigned int &SizeY)
void | SetZoom (const double abszoom)
Set the current camera zoom, the focal length will be calculated.
void | SetZoomCamera (const bool zoomCam)
Set to 'true', if camera has a zoom lens.
void | Undistort (double &origx, double &origy) const
void | Undistort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates - correct implementation (Error in the Christian Buck implementation: Iteration does not converge?!).
int | UndistortFast (const Image< unsigned char > &src, Image< unsigned char > &dst)
Undistortion of an image via a Lookup table corrects only lens distortion and not aspect ratio.
int | WriteCameraData (const std::string &Filename) const
Write all data to a camera data parameter file ).
~MatlabTBUndistortion ()

Protected Member Functions

int | AddCameraDataToXMLTree (XMLIO &myXML, xmlNodePtr &rootNode) const
double | InterpolateAbsZoom_ ()
void | InterpolateDistortionFromIndex_ (unsigned int i, double relnorm)
double | InterpolateFocalLength_ ()
int | ReadCameraDataV0_8 (XMLIO &myXML, xmlNodePtr &cameraNode)
int | ReadCameraDataV1_0 (XMLIO &myXML, xmlNodePtr &cameraNode)

Protected Attributes

std::vector< double > | AngleCorrX_
std::vector< double > | AngleCorrY_
double | aspectratio_
int | CamID_
std::string | CamModel_
double | cellSizeX_
double | cellSizeY_
unsigned int | CutOutHeight_
unsigned int | CutOutWidth_
double | downsamplingFactor_
double | focallengthDef_
double | focallengthZoom_
unsigned int | height_
std::vector< double > | IlluCorrX_
std::vector< double > | IlluCorrY_
bool | IsInitialized_
double | kc1Def_
double | kc1Zoom_
double | kc2Def_
double | kc2Zoom_
double | kc3Def_
double | kc3Zoom_
double | kc4Def_
double | kc4Zoom_
std::vector< CPDiscreteParam > | knownparams_vect_
bool | LensIsSpherical_
std::string | LensModel_
LuTEntry * LuT_
double | MaxCamAngle_
double | principalX_
double | principalY_
double | radius_
unsigned int | width_
double | zoom_
bool | zoomCamera_

Classes

struct | LuTEntry

Detailed Description

Definition at line 43 of file MatlabTBUndistortion.hh.

Constructor & Destructor Documentation

MatlabTBUndistortion::MatlabTBUndistortion ( )

Definition at line 35 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, and LuT_.

MatlabTBUndistortion::MatlabTBUndistortion ( const CameraParam & cp )

Definition at line 40 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::Init(), and LuT_.

MatlabTBUndistortion::~MatlabTBUndistortion ( )

Definition at line 45 of file MatlabTBUndistortion.cpp.

References LuT_.

Member Function Documentation

int CameraParam::AddCameraDataToRig | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraDataNode
 | ) | const [inherited]

Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
cameraDataNode | points to a "CameraData"-node to append the "Camera"-node
Author:
streckel 06/2004

Definition at line 377 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::XMLIO::addChildNode(), BIASERR, and BIAS::CameraParam::IsInitialized_.

int CameraParam::AddCameraDataToXMLTree | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | rootNode
 | ) | const [protected, inherited]

Definition at line 397 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeX_, BIAS::CameraParam::height_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, and BIAS::CameraParam::width_.

Referenced by BIAS::CameraParam::AddCameraDataToRig(), and BIAS::CameraParam::WriteCameraData().

void CameraParam::DebugOut ( ) const [inherited]

Definition at line 1275 of file CameraParam.cpp.

References BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::height_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

Referenced by main().

void MatlabTBUndistortion::Distort | ( | double & | origx,
 |  | double & | origy
 | ) | const

Definition at line 241 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::kc1Def_, kc1Zoom_, BIAS::CameraParam::kc2Def_, kc2Zoom_, BIAS::CameraParam::kc3Def_, kc3Zoom_, BIAS::CameraParam::kc4Def_, kc4Zoom_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::CameraParam::zoomCamera_.

void MatlabTBUndistortion::Distort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.

Inverse to the undistort function.

Author:
streckel 06/2004

Definition at line 233 of file MatlabTBUndistortion.cpp.

References BIASERR, and BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), and SetupProjectionLUT().

std::vector<double> BIAS::CameraParam::GetAngleCorrX ( ) const [inline, inherited]

Definition at line 244 of file CameraParam.hh.

std::vector<double> BIAS::CameraParam::GetAngleCorrY ( ) const [inline, inherited]

Definition at line 247 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectRatio ( ) const [inline, inherited]

Definition at line 236 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectratio ( ) const [inline, inherited]

Definition at line 167 of file CameraParam.hh.

References BIASERR.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

int BIAS::CameraParam::GetCamID ( ) const [inline, inherited]

Definition at line 191 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeX ( ) [inline, inherited]

Definition at line 142 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeY ( ) [inline, inherited]

Definition at line 143 of file CameraParam.hh.

void BIAS::CameraParam::GetDefaultUndistortion | ( | double & | f,
 |  | double & | kc1,
 |  | double & | kc2,
 |  | double & | kc3,
 |  | double & | kc4
 | ) | const [inline, inherited]

Definition at line 214 of file CameraParam.hh.

double CameraParam::GetDownsamplingFactor ( ) [inherited]

Definition at line 292 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, and BIAS::CameraParam::IsInitialized_.

double CameraParam::GetFocalLength ( ) const [inherited]

Get the current camera focal length.

Author:
buck

Definition at line 275 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::CameraParam::GetKMatrix().

unsigned int CameraParam::GetHeight ( ) const [inherited]

get camera image height.

Author:
buck

Definition at line 218 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::height_, and BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrX ( ) const [inline, inherited]

Definition at line 250 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrY ( ) const [inline, inherited]

Definition at line 253 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

KMatrix CameraParam::GetKMatrix ( ) const [inherited]

Definition at line 179 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::IsPerspective(), K, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::RigParameter::ReadRigDataV0_8(), and BIAS::RigParameter::SetData_DummyRig().

double CameraParam::GetPrincipalX ( ) const [inherited]

get principal point, x in pixels relative to top left corner

Author:
buck

Definition at line 200 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::principalX_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double CameraParam::GetPrincipalY ( ) const [inherited]

get principal point, y in pixels relative to top left corner

Author:
buck

Definition at line 209 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::principalY_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double BIAS::CameraParam::GetRadius ( ) const [inline, inherited]

Definition at line 195 of file CameraParam.hh.

unsigned int CameraParam::GetWidth ( ) const [inherited]

get camera image width.

Author:
buck

Definition at line 226 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::width_.

Referenced by BIAS::UnVignette::UnVignette().

double CameraParam::GetZoom ( ) const [inherited]

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Definition at line 259 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

void BIAS::CameraParam::GetZoomUndistortion ( std::vector< CPDiscreteParam > & vp ) const [inline, inherited]

Definition at line 225 of file CameraParam.hh.

References it.

int CameraParam::Init | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [inherited]

Reimplemented in BIAS::SphericalUndistortion.

Definition at line 165 of file CameraParam.cpp.

References BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::ReadCameraData(), and res.

int CameraParam::Init ( const std::string & filename ) [inherited]

Reimplemented in BIAS::SphericalUndistortion.

Definition at line 155 of file CameraParam.cpp.

References BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::ReadCameraData(), and res.

void CameraParam::Init ( ) [inherited]

Definition at line 87 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeX_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::kc1Def_, BIAS::CameraParam::kc2Def_, BIAS::CameraParam::kc3Def_, BIAS::CameraParam::kc4Def_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::CameraParam::width_, BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::SphericalUndistortion::Init(), Init(), MatlabTBUndistortion(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

int MatlabTBUndistortion::Init ( BIAS::Projection & projection )

Definition at line 49 of file MatlabTBUndistortion.cpp.

References BIASABORT, BIASERR, cp, and BIAS::Projection::GetParameters().

int MatlabTBUndistortion::Init ( const CameraParam & cp )

Reimplemented from BIAS::CameraParam.

Definition at line 84 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::Init(), BIAS::CameraParam::IsPerspective(), kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_, knownparams_vect_, and BIAS::CameraParam::zoomCamera_.

Referenced by main().

void BIAS::CameraParam::InitPerspective | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | focallength,
 |  | const double | aspectratio,
 |  | const double | k1,
 |  | const double | k2,
 |  | const double | k3,
 |  | const double | k4,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) | [inherited]

void BIAS::CameraParam::InitSpherical | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | radius,
 |  | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) | [inherited]

double MatlabTBUndistortion::InterpolateAbsZoom_ ( ) [protected]

Reimplemented from BIAS::CameraParam.

Definition at line 360 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::focallengthZoom_, and knownparams_vect_.

Referenced by SetFocalLength().

void MatlabTBUndistortion::InterpolateDistortionFromIndex_ | ( | unsigned int | i,
 |  | double | relnorm
 | ) | [protected]

Definition at line 299 of file MatlabTBUndistortion.cpp.

References kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_, and knownparams_vect_.

double MatlabTBUndistortion::InterpolateFocalLength_ ( ) [protected]

Reimplemented from BIAS::CameraParam.

Definition at line 318 of file MatlabTBUndistortion.cpp.

References knownparams_vect_, and BIAS::CameraParam::zoom_.

Referenced by SetZoom().

bool CameraParam::IsInitialized ( ) const [inherited]

Definition at line 175 of file CameraParam.cpp.

References BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), main(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage(), and BIAS::UnVignette::UnVignette().

bool BIAS::CameraParam::IsPerspective ( ) const [inline, inherited]

Definition at line 242 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetZoom(), Init(), main(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), and BIAS::CameraParam::SetZoom().

bool BIAS::CameraParam::IsSpherical ( ) const [inline, inherited]

Definition at line 240 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::Init(), main(), and BIAS::RigParameter::ReadRigDataV0_8().

bool CameraParam::IsZoomCamera ( ) const [inherited]

True, if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 251 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::zoomCamera_.

int CameraParam::ReadCameraData | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [inherited]

Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
rigNode | points to a "Camera"-node to evaluate
Author:
streckel 06/2004

Definition at line 628 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIASWARN, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::CameraParam::height_, BIAS::CameraParam::Init(), BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

int CameraParam::ReadCameraData ( const std::string & Filename ) [inherited]

Read a camera data parameter file and store the data in (*this).

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Camera"
Author:
streckel 06/2004

Definition at line 604 of file CameraParam.cpp.

References BIASERR, BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().

Referenced by BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), and main().

int CameraParam::ReadCameraDataV0_8 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected, inherited]

Definition at line 1026 of file CameraParam.cpp.

References BIASERR.

Referenced by BIAS::CameraParam::ReadCameraData().

int CameraParam::ReadCameraDataV1_0 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected, inherited]

Definition at line 820 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentDouble(), BIAS::XMLIO::getNodeContentInt(), BIAS::XMLIO::getNodeName(), BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::CameraParam::ReadCameraData().

int CameraParam::ReadFromEXIF ( const std::string & filename ) [inherited]

read jpeg EXIF header and set camera parameter

Returns:
0 on success
Author:
koeser 07/2005

Definition at line 1531 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetHardwareName(), BIAS::ImageAttributes::GetImageDimensions(), BIAS::ImageAttributes::GetPixelSizeXMeter(), BIAS::ImageAttributes::GetPixelSizeYMeter(), BIAS::ImageAttributes::GetPrincipalPoint(), BIAS::CameraParam::height_, BIAS::CameraParam::Init(), BIAS::ImageAttributes::InitExifTags(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::ImageAttributes::Read(), BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

void CameraParam::SetCellSize | ( | const double | CellSizeX,
 |  | const double | AspectRatio
 | ) | [inherited]

Set CCD cell-size in meter.

AspectRatio is CS_Y/CS_X

Author:
streckel

Definition at line 234 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIAS::CameraParam::cellSizeX_, and BIAS::CameraParam::cellSizeY_.

void CameraParam::SetData_EVID31_147094 ( ) [inherited]

Definition at line 1324 of file CameraParam.cpp.

Referenced by BIAS::RigParameter::SetData_DummyRig().

void CameraParam::SetData_OMNITECH_ORIFL_190_3 ( ) [inherited]

Definition at line 1605 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::radius_, and BIAS::CameraParam::width_.

Referenced by main(), and BIAS::RigParameter::SetData_DummyRig().

void CameraParam::SetDownsampling ( const double factor ) [inherited]

Set downsampling factor - all get functions will return transformed values.

E.g. if your image size(width and height) is half the original and the field of view did stay the same, then set factor to 2.
CAUTION: The Set-functions still require the original values

Author:
streckel

Definition at line 333 of file CameraParam.cpp.

References BIAS::CameraParam::downsamplingFactor_.

void MatlabTBUndistortion::SetFocalLength ( const double f )

get the current camera focal length

Author:
buck

Reimplemented from BIAS::CameraParam.

Definition at line 120 of file MatlabTBUndistortion.cpp.

References BIASERR, BIAS::CameraParam::focallengthZoom_, InterpolateAbsZoom_(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

void CameraParam::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inherited]

Set principal point in pixels relative to top left corner.

Author:
streckel

Definition at line 195 of file CameraParam.cpp.

References BIAS::CameraParam::principalX_, and BIAS::CameraParam::principalY_.

double BIAS::CameraParam::SetRadius ( double r ) [inline, inherited]

Definition at line 203 of file CameraParam.hh.

References BIASERR.

void BIAS::CameraParam::SetSize | ( | unsigned int | w,
 |  | unsigned int | h
 | ) | [inline, inherited]

set size of image seperatly

Definition at line 176 of file CameraParam.hh.

void MatlabTBUndistortion::SetUnzoomed ( )

Set the zoom and focal length of a zoom camera to the default settings.

Author:
streckel 06/2004

Reimplemented from BIAS::CameraParam.

Definition at line 135 of file MatlabTBUndistortion.cpp.

References BIASERR, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::kc1Def_, kc1Zoom_, BIAS::CameraParam::kc2Def_, kc2Zoom_, BIAS::CameraParam::kc3Def_, kc3Zoom_, BIAS::CameraParam::kc4Def_, kc4Zoom_, knownparams_vect_, and BIAS::CameraParam::SetUnzoomed().

int MatlabTBUndistortion::SetupProjectionLUT | ( | const unsigned int & | srcwidth,
 |  | const unsigned int & | srcheight,
 |  | const unsigned int & | ChanCnt,
 |  | const unsigned int & | SizeX,
 |  | const unsigned int & | SizeY
 | ) |

Definition at line 399 of file MatlabTBUndistortion.cpp.

References BIASERR, CutOutHeight_, CutOutWidth_, Distort(), BIAS::CameraParam::IsInitialized_, LuT_, BIAS::MatlabTBUndistortion::LuTEntry::offset, and BIAS::MatlabTBUndistortion::LuTEntry::weight.

void MatlabTBUndistortion::SetZoom ( const double abszoom )

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Reimplemented from BIAS::CameraParam.

Definition at line 103 of file MatlabTBUndistortion.cpp.

References BIASERR, BIAS::CameraParam::focallengthZoom_, InterpolateFocalLength_(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

void CameraParam::SetZoomCamera ( const bool zoomCam ) [inherited]

Set to 'true', if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 246 of file CameraParam.cpp.

References BIAS::CameraParam::zoomCamera_.

void MatlabTBUndistortion::Undistort | ( | double & | origx,
 |  | double & | origy
 | ) | const

Definition at line 162 of file MatlabTBUndistortion.cpp.

References BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::kc1Def_, kc1Zoom_, BIAS::CameraParam::kc2Def_, kc2Zoom_, BIAS::CameraParam::kc3Def_, kc3Zoom_, BIAS::CameraParam::kc4Def_, kc4Zoom_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::CameraParam::zoomCamera_.

void MatlabTBUndistortion::Undistort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates - correct implementation (Error in the Christian Buck implementation: Iteration does not converge?!).

Author:
streckel 06/2004

Definition at line 154 of file MatlabTBUndistortion.cpp.

References BIASERR, and BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_().

int MatlabTBUndistortion::UndistortFast | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst
 | ) |

Undistortion of an image via a Lookup table corrects only lens distortion and not aspect ratio.

Author:
streckel 06/2004

Definition at line 465 of file MatlabTBUndistortion.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), LuT_, and BIAS::MatlabTBUndistortion::LuTEntry::offset.

int CameraParam::WriteCameraData ( const std::string & Filename ) const [inherited]

Write all data to a camera data parameter file ).

Parameters:
Filename Name of the XML-camera-data-file, document tag will be to be "Camera"
Author:
streckel 06/2004

Definition at line 355 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIASERR, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::XMLIO::create(), BIAS::CameraParam::IsInitialized_, and BIAS::XMLIO::write().

Referenced by main().

Member Data Documentation

std::vector<double> BIAS::CameraParam::AngleCorrX_ [protected, inherited]

Definition at line 356 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

std::vector<double> BIAS::CameraParam::AngleCorrY_ [protected, inherited]

Definition at line 357 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::SphericalUndistortion::SphericalUndistortion().

double BIAS::CameraParam::aspectratio_ [protected, inherited]

Definition at line 317 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), Distort(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetCellSize(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and Undistort().

int BIAS::CameraParam::CamID_ [protected, inherited]

Definition at line 301 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

std::string BIAS::CameraParam::CamModel_ [protected, inherited]

Definition at line 300 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::cellSizeX_ [protected, inherited]

Definition at line 320 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::Init(), and BIAS::CameraParam::SetCellSize().

double BIAS::CameraParam::cellSizeY_ [protected, inherited]

Definition at line 320 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetCellSize(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

unsigned int BIAS::MatlabTBUndistortion::CutOutHeight_ [protected]

Definition at line 126 of file MatlabTBUndistortion.hh.

Referenced by SetupProjectionLUT().

unsigned int BIAS::MatlabTBUndistortion::CutOutWidth_ [protected]

Definition at line 126 of file MatlabTBUndistortion.hh.

Referenced by SetupProjectionLUT().

double BIAS::CameraParam::downsamplingFactor_ [protected, inherited]

Definition at line 332 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetDownsamplingFactor(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetHeight(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetDownsampling().

double BIAS::CameraParam::focallengthDef_ [protected, inherited]

Definition at line 338 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetFocalLength(), SetUnzoomed(), BIAS::CameraParam::SetUnzoomed(), and Undistort().

double BIAS::CameraParam::focallengthZoom_ [protected, inherited]

Definition at line 346 of file CameraParam.hh.

Referenced by Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::Init(), InterpolateAbsZoom_(), BIAS::CameraParam::InterpolateAbsZoom_(), SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), SetZoom(), BIAS::CameraParam::SetZoom(), and Undistort().

unsigned int BIAS::CameraParam::height_ [protected, inherited]

Definition at line 311 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::GetHeight(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

std::vector<double> BIAS::MatlabTBUndistortion::IlluCorrX_ [protected]

Reimplemented from BIAS::CameraParam.

Definition at line 112 of file MatlabTBUndistortion.hh.

std::vector<double> BIAS::MatlabTBUndistortion::IlluCorrY_ [protected]

Reimplemented from BIAS::CameraParam.

Definition at line 113 of file MatlabTBUndistortion.hh.

bool BIAS::CameraParam::IsInitialized_ [protected, inherited]

Definition at line 297 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToRig(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::SphericalUndistortion::CorrectVignette(), BIAS::CameraParam::DebugOut(), Distort(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::CameraParam::GetDownsamplingFactor(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetHeight(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::SphericalUndistortion::GetMaxCamAngle(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::GetSphereRadius(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::GetZoom(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized(), BIAS::CameraParam::IsZoomCamera(), MatlabTBUndistortion(), BIAS::SphericalUndistortion::ProjectCoord(), BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), SetFocalLength(), BIAS::CameraParam::SetFocalLength(), SetUnzoomed(), BIAS::CameraParam::SetUnzoomed(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SetupLutPxPySphere1(), BIAS::SphericalUndistortion::SetupLutPxPySphere2(), SetupProjectionLUT(), SetZoom(), BIAS::CameraParam::SetZoom(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), Undistort(), and BIAS::CameraParam::WriteCameraData().

double BIAS::CameraParam::kc1Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by Distort(), BIAS::CameraParam::Init(), SetUnzoomed(), and Undistort().

double BIAS::MatlabTBUndistortion::kc1Zoom_ [protected]

Definition at line 107 of file MatlabTBUndistortion.hh.

Referenced by Distort(), Init(), InterpolateDistortionFromIndex_(), SetUnzoomed(), and Undistort().

double BIAS::CameraParam::kc2Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by Distort(), BIAS::CameraParam::Init(), SetUnzoomed(), and Undistort().

double BIAS::MatlabTBUndistortion::kc2Zoom_ [protected]

Definition at line 107 of file MatlabTBUndistortion.hh.

Referenced by Distort(), Init(), InterpolateDistortionFromIndex_(), SetUnzoomed(), and Undistort().

double BIAS::CameraParam::kc3Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by Distort(), BIAS::CameraParam::Init(), SetUnzoomed(), and Undistort().

double BIAS::MatlabTBUndistortion::kc3Zoom_ [protected]

Definition at line 107 of file MatlabTBUndistortion.hh.

Referenced by Distort(), Init(), InterpolateDistortionFromIndex_(), SetUnzoomed(), and Undistort().

double BIAS::CameraParam::kc4Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by Distort(), BIAS::CameraParam::Init(), SetUnzoomed(), and Undistort().

double BIAS::MatlabTBUndistortion::kc4Zoom_ [protected]

Definition at line 107 of file MatlabTBUndistortion.hh.

Referenced by Distort(), Init(), InterpolateDistortionFromIndex_(), SetUnzoomed(), and Undistort().

std::vector<CPDiscreteParam> BIAS::MatlabTBUndistortion::knownparams_vect_ [protected]

Reimplemented from BIAS::CameraParam.

Definition at line 102 of file MatlabTBUndistortion.hh.

Referenced by Init(), InterpolateAbsZoom_(), InterpolateDistortionFromIndex_(), InterpolateFocalLength_(), and SetUnzoomed().

bool BIAS::CameraParam::LensIsSpherical_ [protected, inherited]

Definition at line 308 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), and BIAS::CameraParam::ReadCameraData().

std::string BIAS::CameraParam::LensModel_ [protected, inherited]

Definition at line 302 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

LuTEntry* BIAS::MatlabTBUndistortion::LuT_ [protected]

Definition at line 125 of file MatlabTBUndistortion.hh.

Referenced by MatlabTBUndistortion(), SetupProjectionLUT(), UndistortFast(), and ~MatlabTBUndistortion().

double BIAS::CameraParam::MaxCamAngle_ [protected, inherited]

Definition at line 329 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::EnforceNormalRange(), BIAS::SphericalUndistortion::GetMaxCamAngle(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), and BIAS::SphericalUndistortion::TransfCoordSphere2Image().

double BIAS::CameraParam::principalX_ [protected, inherited]

Definition at line 323 of file CameraParam.hh.

Referenced by Distort(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetPrincipalX(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::CameraParam::SetPrincipal(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), and Undistort().

double BIAS::CameraParam::principalY_ [protected, inherited]

Definition at line 323 of file CameraParam.hh.

Referenced by Distort(), BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetPrincipalY(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::CameraParam::SetPrincipal(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), BIAS::SphericalUndistortion::TransfCoordSphere2Image(), and Undistort().

double BIAS::CameraParam::radius_ [protected, inherited]

Definition at line 326 of file CameraParam.hh.

Referenced by BIAS::SphericalUndistortion::DrawCircles(), BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::GetSphereRadius(), BIAS::SphericalUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::SphericalUndistortion::ProjectImageCylindric(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), BIAS::SphericalUndistortion::SphericalUndistortion(), BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::SphericalUndistortion::TransfCoordSphere2CalibImage(), and BIAS::SphericalUndistortion::TransfCoordSphere2Image().

unsigned int BIAS::CameraParam::width_ [protected, inherited]

Definition at line 311 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::zoom_ [protected, inherited]

Definition at line 345 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetZoom(), BIAS::CameraParam::Init(), InterpolateFocalLength_(), BIAS::CameraParam::InterpolateFocalLength_(), SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), SetZoom(), and BIAS::CameraParam::SetZoom().

bool BIAS::CameraParam::zoomCamera_ [protected, inherited]

Definition at line 305 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetZoom(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::IsZoomCamera(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), SetZoom(), BIAS::CameraParam::SetZoom(), BIAS::CameraParam::SetZoomCamera(), and Undistort().

The documentation for this class was generated from the following files:
  • Image/MatlabTBUndistortion.hh
  • Image/MatlabTBUndistortion.cpp
Generated on Wed Jun 21 19:08:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MatlabTBUndistortion::LuTEntry Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MatlabTBUndistortion::LuTEntry

BIAS::MatlabTBUndistortion::LuTEntry Struct Reference

#include <Image/MatlabTBUndistortion.hh>

List of all members.

Public Attributes

unsigned int | offset [4]
unsigned int | weight [2]

Detailed Description

Definition at line 121 of file MatlabTBUndistortion.hh.

Member Data Documentation

unsigned int BIAS::MatlabTBUndistortion::LuTEntry::offset[4]

Definition at line 122 of file MatlabTBUndistortion.hh.

Referenced by BIAS::MatlabTBUndistortion::SetupProjectionLUT(), and BIAS::MatlabTBUndistortion::UndistortFast().

unsigned int BIAS::MatlabTBUndistortion::LuTEntry::weight[2]

Definition at line 123 of file MatlabTBUndistortion.hh.

Referenced by BIAS::MatlabTBUndistortion::SetupProjectionLUT().

The documentation for this struct was generated from the following file:
  • Image/MatlabTBUndistortion.hh
Generated on Wed Jun 21 19:08:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Matrix< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Matrix

BIAS::Matrix< T > Class Template Reference
[Matrix and Vector Classes]

matrix class with arbitrary size, indexing is row major. More...

#include <Base/Math/Matrix.hh>

Inheritance diagram for BIAS::Matrix< T >:

[legend]
Collaboration diagram for BIAS::Matrix< T >:

[legend]
List of all members.

Arithmetic

void | Add (const T &scalar, Matrix< T > &dest) const
implementation
void | AddIP (const Matrix< T > &arg)
Adds arg to this.
void | AddIP (const T &scalar)
in place addition function
void | Divide (const T &scalar, Matrix< T > &dest) const
division function, storing data destination matrix
void | DivideIP (const T &scalar)
in place division function
void | GetSystemMatrix (Matrix< T > &dest) const
compute square system matrix dest = A^T * A
void | Mult (const Vector< T > &arg, Vector< T > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< T > &arg, Matrix< T > &result) const
matrix multiplication, result is not allocated
void | Multiply (const T &scalar, Matrix< T > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const T &scalar)
in place multiplication function
void | MultLeft (const Vector< T > &arg, Vector< T > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | operator= (const Matrix< T > &mat)
Matrix< T > & | operator= (const TNT::Matrix< T > &mat)
assignment operators calling corresponding operator from base class if appropriate
void | Sub (const T &scalar, Matrix< T > &dest) const
substraction function, storing data destination matrix
void | SubIP (const T &scalar)
in place subtraction function
void | SubIP (const Matrix< T > &arg)
Subtracts arg from this
this -= arg.

Set Functions

void | Fill (const T &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
void SetIdentity ()
Converts matrix to identity matrix.
void SetZero ()
Sets all values to zero.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

Subscript | dim (Subscript d) const
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
Matrix (const TNT::Matrix< T > &A)
Matrix (const Matrix< T > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const T value)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix< T > & | newsize (Subscript M, Subscript N)
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
Subscript | size () const
Matrix< T > | Transpose () const
transpose function, storing data destination matrix
virtual | ~Matrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator * (const Matrix3x3< T > &argLeft, const Matrix< T > &argMat)
Matrix< T > | operator * (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator * (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator *= (Matrix< T > &mat, const T &scalar)
bool | operator!= (const Matrix< T > &argl, const Matrix< T > &argr)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator+ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator+= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > & | operator+= (Matrix< T > &mat, const T &scalar)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator- (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > | operator/ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator/= (Matrix< T > &mat, const T &scalar)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
bool | operator== (const Matrix< T > &argl, const Matrix< T > &argr)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T = double>
class BIAS::Matrix< T >

matrix class with arbitrary size, indexing is row major.

Access the data by M[row][col].

class Matrix is the matrix class that should be used by common BIAS algorithms and data structures with arbitrary size

Access the data simply by M[row][col].

It is derived from TNT::Matrix to inherit the basic operations and algorithm. special implementations should be done here and NOT in TNT:Matrix because the true 'base' Matrix class "TNT::Matrix" should be interchangeable and aside from this maintained by NIST.

changed from MIP to BIAS (j1. 11/05/2002) operators are no longer class members, they are defined after the class, woelk

Author:
Jan Woetzel, woelk

Definition at line 79 of file Matrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T>
BIAS::Matrix< T >::~Matrix ( ) [virtual]

Reimplemented from TNT::Matrix< T >.

Definition at line 40 of file Matrix.cpp.

template<class T = double>
BIAS::Matrix< T >::Matrix ( ) [inline]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

template<class T = double>
BIAS::Matrix< T >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

template<class T = double>
BIAS::Matrix< T >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const T | value
 | ) | [inline]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

template<class T = double>
BIAS::Matrix< T >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

template<class T>
BIAS::Matrix< T >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

Definition at line 44 of file Matrix.cpp.

template<class T = double>
BIAS::Matrix< T >::Matrix ( const Matrix< T > & A ) [inline]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

template<class T = double>
BIAS::Matrix< T >::Matrix ( const TNT::Matrix< T > & A ) [inline]

Author:
Jan Woetzel

Reimplemented from TNT::Matrix< T >.

Definition at line 126 of file Matrix.hh.

Member Function Documentation

template<class T>
void BIAS::Matrix< T >::Add | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline]

implementation

Author:
Ingo Thomsen tested

Definition at line 532 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator+().

template<class T>
void BIAS::Matrix< T >::AddIP ( const Matrix< T > & arg ) [inline]

Adds arg to this.

Author:
grest,2004

Definition at line 736 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
void BIAS::Matrix< T >::AddIP ( const T & scalar ) [inline]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator+=(), and BIAS::Matrix< T >::operator-=().

template<class T>
bool BIAS::Matrix< T >::BinRead ( const char * filename ) const

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 340 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
bool BIAS::Matrix< T >::BinWrite ( const char * filename ) const

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 375 of file Matrix.cpp.

References TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

template<class T>
void BIAS::Matrix< T >::Divide | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 570 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator/().

template<class T = double>
void BIAS::Matrix< T >::DivideIP ( const T & scalar ) [inline]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator/=().

template<class T>
void BIAS::Matrix< T >::Fill ( const T & scalar )

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Definition at line 50 of file Matrix.cpp.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::Decompose_(), BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline3(), BIAS::PMatrix::InvalidateDecomposition(), and main().

template<class T>
Vector< T > BIAS::Matrix< T >::GetCol ( const int & col ) const

return a copy of column "col", zero based counting

Author:
Jan Woetzel

Definition at line 190 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EMatrix::GetRotationTranslation(), and BIAS::Matrix< T >::NormalizeCols().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetCols ( ) const [inline]

Definition at line 163 of file Matrix.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T = double>
T* BIAS::Matrix< T >::GetData ( ) const [inline]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::Add(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), Fortran_Matrix_to_Matrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix3x3< T >::GetRow(), BIAS::CovMatrix3x3::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Matrix3x4< T >::Matrix3x4(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), MyLinTransform(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix2x2< T >::operator *(), BIAS::Matrix2x2< T >::operator=(), BIAS::AffineTransf::operator=(), BIAS::Matrix< T >::operator==(), BIAS::operator==(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Matrix3x3< T >::Scale(), BIAS::EuclideanTransf3D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Vector4< T >::transposed(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::ProjectionParametersProjective::XMLOut(), and BIAS::PMatrix::XMLOut().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray ( ) const [inline]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

Referenced by BIAS::PMatrixLinear::GetPEstSystemInHom().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray1 ( ) const [inline]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

Referenced by BIAS::SVD3x3::Compute().

template<class T = double>
T* BIAS::Matrix< T >::GetDataLast ( ) const [inline]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix< T >::operator==(), and BIAS::Matrix< T >::SetZero().

template<class T>
T BIAS::Matrix< T >::GetMax ( ) const

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 275 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
void BIAS::Matrix< T >::GetMaxMin | ( | T & | max,
 |  | T & | min
 | ) | const

return biggest and smallest entry

Definition at line 289 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::GetMean ( ) const

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 299 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), BIAS::Matrix< T >::GetNumElements(), and T.

template<class T>
T BIAS::Matrix< T >::GetMin ( ) const

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 249 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T = double>
int BIAS::Matrix< T >::GetNumElements ( ) const [inline]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMean().

template<class T>
Vector< T > BIAS::Matrix< T >::GetRow ( const int & row ) const

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Definition at line 171 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by DistanceFromRotation4Var(), BIAS::Quadric3D::GetSignature(), BIAS::Matrix< T >::NormalizeRows(), and BIAS::Triangulation::TriangulateLinear().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetRows ( ) const [inline]

Definition at line 161 of file Matrix.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
void BIAS::Matrix< T >::GetSystemMatrix ( Matrix< T > & dest ) const [inline]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

Definition at line 778 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::row_, and T.

Referenced by BIAS::SVD::Solve().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
bool BIAS::Matrix< T >::IsIdentity ( double eps = 0.0 ) const

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 444 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose().

template<class T>
bool BIAS::Matrix< T >::IsZero ( double eps = 0.0 ) const

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 413 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by main(), MatrixSqrt(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Load ( const std::string & filename )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, BIAS::PMatrix, and BIAS::Pose.

Definition at line 312 of file Matrix.cpp.

Referenced by main().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 690 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::Mult ( const Matrix< T > & arg ) [inline]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

Definition at line 676 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Matrix< T > & | arg,
 |  | Matrix< T > & | result
 | ) | const [inline]

matrix multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 650 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void BIAS::Matrix< T >::Multiply | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 558 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator *().

template<class T = double>
void BIAS::Matrix< T >::MultiplyIP ( const T & scalar ) [inline]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

Referenced by BIAS::Conic2D::GetTangentPoints(), and BIAS::Matrix< T >::operator *=().

template<class T>
void BIAS::Matrix< T >::MultLeft | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

Definition at line 712 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::MultLeft ( const Matrix< T > & arg ) [inline]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

Definition at line 683 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Conic2D::GetTangentPoints().

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
T BIAS::Matrix< T >::Normalize ( )

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::Conic2D, BIAS::PMatrix, and BIAS::Quadric3D.

Definition at line 263 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by main(), and BIAS::ProjectionParametersPerspective::ViewDifference().

template<class T>
void BIAS::Matrix< T >::NormalizeCols ( )

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

Definition at line 142 of file Matrix.cpp.

References BIAS::Matrix< T >::GetCol(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix< T >::NormalizeColsToOne ( const int norm_row_index )

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

Definition at line 57 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::NormalizeRows ( )

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

Definition at line 131 of file Matrix.cpp.

References BIAS::Matrix< T >::GetRow(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Triangulation::TriangulateLinear().

template<class T>
void BIAS::Matrix< T >::NormalizeRowsToOne ( const int norm_col_index )

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

Definition at line 96 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
T BIAS::Matrix< T >::NormFrobenius ( ) const [inline]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

Definition at line 625 of file Matrix.hh.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::EMatrix::InitFromF(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
T BIAS::Matrix< T >::NormL1 ( ) const [inline]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 605 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::NormL2 ( ) const [inline]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Definition at line 615 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
Matrix< T > & BIAS::Matrix< T >::operator= ( const Matrix< T > & mat ) [inline]

Reimplemented in BIAS::Matrix3x4< T >, BIAS::Matrix4x4< T >, BIAS::Conic2D, BIAS::Quadric3D, BIAS::Matrix3x4< double >, BIAS::Matrix3x4< PMATRIX_TYPE >, BIAS::Matrix4x4< double >, BIAS::Matrix4x4< QUADRIC3D_TYPE >, BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >, and BIAS::Matrix4x4< PMATRIX_TYPE >.

Definition at line 807 of file Matrix.hh.

References TNT::Matrix< T >::operator=().

template<class T>
Matrix< T > & BIAS::Matrix< T >::operator= ( const TNT::Matrix< T > & mat ) [inline]

assignment operators calling corresponding operator from base class if appropriate

Author:
Jan Woetzel alpha (02/25/2002)

Reimplemented from TNT::Matrix< T >.

Definition at line 800 of file Matrix.hh.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrixBase::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Save ( const std::string & filename ) const

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Definition at line 326 of file Matrix.cpp.

template<class T>
void BIAS::Matrix< T >::ScaleCol | ( | int | NoCol,
 |  | T | scale
 | ) |

Scales column NoCol with scale.

Definition at line 162 of file Matrix.cpp.

References TNT::Matrix< T >::num_rows().

template<class T>
void BIAS::Matrix< T >::ScaleRow | ( | int | NoRow,
 |  | T | scale
 | ) |

Scales row NoRow with scale.

Definition at line 153 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols().

Referenced by BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void BIAS::Matrix< T >::SetCol | ( | const int | row,
 |  | const Vector< T > & | data
 | ) |

set a col of matrix from vector

Author:
woelk 08/2004

Definition at line 213 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetIdentity ( )

Converts matrix to identity matrix.

Even if the matrix is not quadratic, the diagonal values starting with the upper left element are set to 1. Example:

1 0 0 1 0 0 0 0 1 0 or 0 1 0 0 0 0 1 0 0 1 0 0 0 0

Author:
Ingo Thomsen

Reimplemented in BIAS::Matrix2x2< T >, BIAS::Matrix3x3< T >, BIAS::Matrix3x4< T >, BIAS::Matrix4x4< T >, BIAS::Matrix2x2< KLT_TYPE >, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, BIAS::Matrix3x3< EMATRIX_TYPE >, BIAS::Matrix3x4< double >, BIAS::Matrix3x4< PMATRIX_TYPE >, BIAS::Matrix4x4< double >, BIAS::Matrix4x4< QUADRIC3D_TYPE >, BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >, and BIAS::Matrix4x4< PMATRIX_TYPE >.

Definition at line 223 of file Matrix.cpp.

Referenced by BIAS::Kalman::Init(), main(), and MyConstTransform().

template<class T>
void BIAS::Matrix< T >::SetRow | ( | const int | row,
 |  | const Vector< T > & | data
 | ) |

set a row of matrix from vector

Author:
woelk 08/2004

Definition at line 203 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetZero ( ) [inline]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 598 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::Decompose_(), BIAS::Triangulation::GetCovariance2D(), BIAS::RigParameter::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Camera< StorageType >::Init_(), BIAS::SVD::Invert(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::MatchDataBase::Reset(), BIAS::Pose::Set(), BIAS::Pose::SetC(), BIAS::Pose::SetCovariance(), BIAS::PoseParametrization::SetOrientation(), BIAS::PoseParametrization::SetPosition(), BIAS::Pose::SetQ(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
void BIAS::Matrix< T >::Sub | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 545 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator-().

template<class T = double>
void BIAS::Matrix< T >::SubIP ( const T & scalar ) [inline]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

template<class T>
void BIAS::Matrix< T >::SubIP ( const Matrix< T > & arg ) [inline]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Definition at line 757 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::operator-=().

template<class T>
T BIAS::Matrix< T >::Trace ( ) const [inline]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< T >, BIAS::CovMatrix3x3, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 641 of file Matrix.hh.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and T.

template<class T>
Matrix< T > BIAS::Matrix< T >::Transpose ( ) const [inline]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix2x2< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< KLT_TYPE >, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 588 of file Matrix.hh.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrixEstimation::FindClosestP2(), BIAS::EMatrix::GetRotationTranslation(), BIAS::SVD::GetV(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::CoordinateTransform3D::LocalToGlobal(), main(), BIAS::Kalman::Predict(), BIAS::Quadric3D::Quadric3D(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::Conic2D::SetQuadricProjection(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::PoseParametrizationCovariance::Transform(), BIAS::FilterMask::Transpose(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const Matrix3x3< T > & | argLeft,
 |  | const Matrix< T > & | argMat
 | ) | [related]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 673 of file Operators.hh.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related]

Definition at line 499 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > operator * | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

multiplication operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 494 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > & operator *= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

multiplication operator

Author:
Ingo Thomsen

Definition at line 498 of file Matrix.hh.

References BIAS::Matrix< T >::MultiplyIP().

template<class T = double>
bool operator!= | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related]

operator for not equal

Author:
Ingo Thomsen (07/02/2002)

Definition at line 524 of file Matrix.hh.

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator+ | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related]

Definition at line 475 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > operator+ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

addition operator, returning new matrix

Author:
Ingo Thomsen, woelk

Definition at line 470 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related]

addition in place operator

Author:
grest

Definition at line 477 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

addition operator

Author:
Ingo Thomsen

Definition at line 470 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator- | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related]

Definition at line 487 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > operator- | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

substraction operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 482 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

substraction operator

Author:
Ingo Thomsen

Definition at line 491 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related]

subtracts arg from mat, mat = mat - arg

Author:
grest

Definition at line 484 of file Matrix.hh.

References BIAS::Matrix< T >::SubIP().

template<class T = double>
Matrix< T > operator/ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

division operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 506 of file Operators.hh.

References BIAS::Matrix< T >::Divide(), and res.

template<class T = double>
Matrix< T > & operator/= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

division operator

Author:
Ingo Thomsen

Definition at line 513 of file Operators.hh.

References BIAS::Matrix< T >::DivideIP().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T = double>
bool operator== | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related]

operator for equal

Author:
Ingo Thomsen (07/02/2002) tested

Definition at line 509 of file Matrix.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), TNT::Matrix< T >::size(), and T.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Matrix.hh
  • Base/Math/Matrix.cpp
  • Base/Math/Operators.hh
Generated on Wed Jun 21 19:08:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Matrix< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Matrix

TNT::Matrix< T > Class Template Reference

#include <Base/Math/tnt/cmat.h>

Inheritance diagram for TNT::Matrix< T >:

[legend]
Collaboration diagram for TNT::Matrix< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

Subscript | dim (Subscript d) const
Subscript | lbound () const
Matrix (Subscript M, Subscript N, const std::string &s)
replacement for above JW
Matrix (Subscript M, Subscript N, const T *v)
Matrix (Subscript M, Subscript N, const T &value=T())
Matrix (const Matrix< T > &A)
Matrix ()
Matrix< T > & | newsize (Subscript M, Subscript N)
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Matrix< T > & | operator= (const T &scalar)
Matrix< T > & | operator= (const Matrix< T > &A)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
Subscript | size () const
virtual | ~Matrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T>
class TNT::Matrix< T >

Definition at line 56 of file cmat.h.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T>
TNT::Matrix< T >::Matrix ( ) [inline]

Reimplemented in BIAS::Matrix< T >, BIAS::Matrix< KLT_TYPE >, BIAS::Matrix< double >, BIAS::Matrix< COVMATRIX3X3_TYPE >, BIAS::Matrix< PP_TYPE >, BIAS::Matrix< FMATRIX_TYPE >, BIAS::Matrix< QUADRIC3D_TYPE >, BIAS::Matrix< HMATRIX_TYPE >, BIAS::Matrix< FM_FLOAT >, BIAS::Matrix< FM_INT >, BIAS::Matrix< PLUECKERMATRIX_TYPE >, BIAS::Matrix< KMATRIX_TYPE >, BIAS::Matrix< CONIC2D_TYPE >, BIAS::Matrix< ROTATION_MATRIX_TYPE >, BIAS::Matrix< POSECOVARIANCE_TYPE >, BIAS::Matrix< POSE_TYPE >, BIAS::Matrix< EMATRIX_TYPE >, and BIAS::Matrix< PMATRIX_TYPE >.

Definition at line 197 of file cmat.h.

template<class T>
TNT::Matrix< T >::Matrix ( const Matrix< T > & A ) [inline]

Reimplemented in BIAS::Matrix< T >.

Definition at line 200 of file cmat.h.

template<class T>
TNT::Matrix< T >::Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | const T & | value = T()
 | ) | [inline]

Definition at line 206 of file cmat.h.

template<class T>
TNT::Matrix< T >::Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | const T * | v
 | ) | [inline]

Definition at line 212 of file cmat.h.

template<class T>
TNT::Matrix< T >::Matrix | ( | Subscript | M,
 |  | Subscript | N,
 |  | const std::string & | s
 | ) | [inline]

replacement for above JW

Definition at line 229 of file cmat.h.

template<class T>
virtual TNT::Matrix< T >::~Matrix ( ) [inline, virtual]

Reimplemented in BIAS::Matrix< T >, BIAS::Matrix< KLT_TYPE >, BIAS::Matrix< double >, BIAS::Matrix< COVMATRIX3X3_TYPE >, BIAS::Matrix< PP_TYPE >, BIAS::Matrix< FMATRIX_TYPE >, BIAS::Matrix< QUADRIC3D_TYPE >, BIAS::Matrix< HMATRIX_TYPE >, BIAS::Matrix< FM_FLOAT >, BIAS::Matrix< FM_INT >, BIAS::Matrix< PLUECKERMATRIX_TYPE >, BIAS::Matrix< KMATRIX_TYPE >, BIAS::Matrix< CONIC2D_TYPE >, BIAS::Matrix< ROTATION_MATRIX_TYPE >, BIAS::Matrix< POSECOVARIANCE_TYPE >, BIAS::Matrix< POSE_TYPE >, BIAS::Matrix< EMATRIX_TYPE >, and BIAS::Matrix< PMATRIX_TYPE >.

Definition at line 242 of file cmat.h.

Member Function Documentation

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline]

Definition at line 291 of file cmat.h.

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline]

Definition at line 71 of file cmat.h.

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline]

Definition at line 324 of file cmat.h.

template<class T>
Matrix<T>& TNT::Matrix< T >::operator= ( const T & scalar ) [inline]

Definition at line 284 of file cmat.h.

template<class T>
Matrix<T>& TNT::Matrix< T >::operator= ( const Matrix< T > & A ) [inline]

Reimplemented in BIAS::Matrix< T >.

Definition at line 266 of file cmat.h.

Referenced by BIAS::Matrix< T >::Fill(), and BIAS::Matrix< T >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline]

Definition at line 306 of file cmat.h.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/cmat.h
Generated on Wed Jun 21 19:13:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Matrix2x2< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Matrix2x2

BIAS::Matrix2x2< T > Class Template Reference
[Matrix and Vector Classes]

is a 'fixed size' quadratic matrix of dim. More...

#include <Base/Math/Matrix2x2.hh>

Inheritance diagram for BIAS::Matrix2x2< T >:

[legend]
Collaboration diagram for BIAS::Matrix2x2< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

T | det () const
calculate the determinante
Subscript | dim (Subscript d) const
template<>
int | EigenvalueDecomposition (double &value1, Vector2< double > &vec1, double &value2, Vector2< double > &vec2) const
int | EigenvalueDecomposition (T &value1, Vector2< T > &vector1, T &value2, Vector2< T > &vector2) const
Eigenvalue decomposition.
template<>
int | Invert (Matrix2x2< unsigned int > &result) const
Matrix2x2< T > | Invert () const
int | Invert (Matrix2x2< T > &result) const
analyticaly inverts matrix
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
Matrix2x2 (const T a0, const T a1, const T a2, const T a3)
Set the matrix to | a0 a1 | | a2 a3 |.
Matrix2x2 (const TNT::Matrix< T > &A)
cast constructor from TNT::Matrix
Matrix2x2 (const Matrix2x2< T > &A)
Matrix2x2 (const std::string &s)
Matrix2x2 (const MatrixInitType &i)
Matrix2x2 ()
void | Mult (const Matrix2x2< T > &argmat, Matrix2x2< T > &destmat) const
matrix-matrix multiplication with other Matrix2x2, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector2< T > &argvec, Vector2< T > &destvec) const
matrix - vector multiplicate this matrix with Vector2, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | MultIP (const Matrix2x2< T > &argmat)
Multiplication in place with argmat.
Vector2< T > | MultLeft (const Vector2< T > &argvec) const
transposed argvec multipied from left, wrapper function
void | MultLeft (const Vector2< T > &argvec, Vector2< T > &destvec) const
matrix - vector multiplicate this matrix with Vector2, storing the result in destvec calculates: destvec^T = argvec^T * (this Matrix)
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix2x2 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix2x2 becomes a base class.
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Matrix2x2< T > & | operator= (const Matrix2x2< T > &mat)
assignment operator
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void SetIdentity ()
set the elements of this matrix to the identity matrix
Subscript | size () const
void | Transpose (const Matrix2x2< T > &arg)
set this as transposed arg
Matrix2x2< T > | Transpose () const
returns transposed matrix
void TransposeIP ()
transpose matrix in place
virtual | ~Matrix2x2 ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator * (const Matrix3x3< T > &argLeft, const Matrix< T > &argMat)
Matrix< T > | operator * (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator * (const Matrix< T > &mat, const T &scalar)
Matrix2x2< T > | operator * (const Matrix2x2< T > &mat, const Matrix2x2< T > &argMat)
Matrix< T > & | operator *= (Matrix< T > &mat, const T &scalar)
bool | operator!= (const Matrix< T > &argl, const Matrix< T > &argr)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator+ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator+= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > & | operator+= (Matrix< T > &mat, const T &scalar)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator- (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > | operator/ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator/= (Matrix< T > &mat, const T &scalar)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
bool | operator== (const Matrix< T > &argl, const Matrix< T > &argr)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T = double>
class BIAS::Matrix2x2< T >

is a 'fixed size' quadratic matrix of dim.

2 x 2 which is templated over the elemnt-type.

Definition at line 49 of file Matrix2x2.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T = double>
BIAS::Matrix2x2< T >::Matrix2x2 ( ) [inline]

template<class T = double>
BIAS::Matrix2x2< T >::Matrix2x2 ( const MatrixInitType & i ) [inline, explicit]

Definition at line 52 of file Matrix2x2.hh.

template<class T>
BIAS::Matrix2x2< T >::Matrix2x2 ( const std::string & s ) [explicit]

Definition at line 62 of file Matrix2x2.cpp.

template<class T = double>
BIAS::Matrix2x2< T >::Matrix2x2 ( const Matrix2x2< T > & A ) [inline]

Author:
Jan Woetzel untested (04/17/2002)

template<class T>
BIAS::Matrix2x2< T >::Matrix2x2 ( const TNT::Matrix< T > & A )

cast constructor from TNT::Matrix

Definition at line 52 of file Matrix2x2.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
BIAS::Matrix2x2< T >::Matrix2x2 | ( | const T | a0,
 |  | const T | a1,
 |  | const T | a2,
 |  | const T | a3
 | ) |

Set the matrix to | a0 a1 | | a2 a3 |.

Definition at line 68 of file Matrix2x2.cpp.

template<class T>
BIAS::Matrix2x2< T >::~Matrix2x2 ( ) [virtual]

Definition at line 78 of file Matrix2x2.cpp.

Member Function Documentation

template<class T>
void BIAS::Matrix< T >::Add | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

Definition at line 532 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator+().

template<class T>
void BIAS::Matrix< T >::AddIP ( const Matrix< T > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

Definition at line 736 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
void BIAS::Matrix< T >::AddIP ( const T & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator+=(), and BIAS::Matrix< T >::operator-=().

template<class T>
bool BIAS::Matrix< T >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 340 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
bool BIAS::Matrix< T >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 375 of file Matrix.cpp.

References TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
T BIAS::Matrix2x2< T >::det ( ) const [inline]

calculate the determinante

Definition at line 252 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

template<class T>
void BIAS::Matrix< T >::Divide | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 570 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator/().

template<class T = double>
void BIAS::Matrix< T >::DivideIP ( const T & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator/=().

template<>
int BIAS::Matrix2x2< double >::EigenvalueDecomposition | ( | double & | value1,
 |  | Vector2< double > & | vec1,
 |  | double & | value2,
 |  | Vector2< double > & | vec2
 | ) | const

Definition at line 128 of file Matrix2x2.cpp.

References a, DOUBLE_EPSILON, MATRIX2X2_ZERO_EPS, and res.

template<class T>
int BIAS::Matrix2x2< T >::EigenvalueDecomposition | ( | T & | value1,
 |  | Vector2< T > & | vector1,
 |  | T & | value2,
 |  | Vector2< T > & | vector2
 | ) | const

Eigenvalue decomposition.

The eigenvalues and eigenvectors of the matrix are returned in value1/2 vector1/2.

Returns:
number of linear independent eigenvectors = rank of matrix
Author:
woelk 06/2005

Definition at line 121 of file Matrix2x2.cpp.

References BIASERR.

Referenced by Draw(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), and BIAS::Conic2D::GetEllipseParameters().

template<class T>
void BIAS::Matrix< T >::Fill ( const T & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Definition at line 50 of file Matrix.cpp.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::Decompose_(), BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline3(), BIAS::PMatrix::InvalidateDecomposition(), and main().

template<class T>
Vector< T > BIAS::Matrix< T >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

Definition at line 190 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EMatrix::GetRotationTranslation(), and BIAS::Matrix< T >::NormalizeCols().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T = double>
T* BIAS::Matrix< T >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::Add(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), Fortran_Matrix_to_Matrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix3x3< T >::GetRow(), BIAS::CovMatrix3x3::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Matrix3x4< T >::Matrix3x4(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), MyLinTransform(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix2x2< T >::operator *(), BIAS::Matrix2x2< T >::operator=(), BIAS::AffineTransf::operator=(), BIAS::Matrix< T >::operator==(), BIAS::operator==(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Matrix3x3< T >::Scale(), BIAS::EuclideanTransf3D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Vector4< T >::transposed(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::ProjectionParametersProjective::XMLOut(), and BIAS::PMatrix::XMLOut().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

Referenced by BIAS::PMatrixLinear::GetPEstSystemInHom().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

Referenced by BIAS::SVD3x3::Compute().

template<class T = double>
T* BIAS::Matrix< T >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix< T >::operator==(), and BIAS::Matrix< T >::SetZero().

template<class T>
T BIAS::Matrix< T >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 275 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
void BIAS::Matrix< T >::GetMaxMin | ( | T & | max,
 |  | T & | min
 | ) | const [inherited]

return biggest and smallest entry

Definition at line 289 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 299 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), BIAS::Matrix< T >::GetNumElements(), and T.

template<class T>
T BIAS::Matrix< T >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 249 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T = double>
int BIAS::Matrix< T >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMean().

template<class T>
Vector< T > BIAS::Matrix< T >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Definition at line 171 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by DistanceFromRotation4Var(), BIAS::Quadric3D::GetSignature(), BIAS::Matrix< T >::NormalizeRows(), and BIAS::Triangulation::TriangulateLinear().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
void BIAS::Matrix< T >::GetSystemMatrix ( Matrix< T > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

Definition at line 778 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::row_, and T.

Referenced by BIAS::SVD::Solve().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<>
int BIAS::Matrix2x2< unsigned int >::Invert ( Matrix2x2< unsigned int > & result ) const

Definition at line 98 of file Matrix2x2.cpp.

References BIASBREAK, and BIASERR.

template<class T = double>
Matrix2x2<T> BIAS::Matrix2x2< T >::Invert ( ) const [inline]

Definition at line 144 of file Matrix2x2.hh.

template<class T>
int BIAS::Matrix2x2< T >::Invert ( Matrix2x2< T > & result ) const

analyticaly inverts matrix

Author:
woelk 12 2002

Definition at line 106 of file Matrix2x2.cpp.

References BIASASSERT, and T.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), and BIAS::Conic2D::SetPointAndCovariance().

template<class T>
bool BIAS::Matrix< T >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 444 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose().

template<class T>
bool BIAS::Matrix< T >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 413 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by main(), MatrixSqrt(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, BIAS::PMatrix, and BIAS::Pose.

Definition at line 312 of file Matrix.cpp.

Referenced by main().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 690 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::Mult ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

Definition at line 676 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Matrix< T > & | arg,
 |  | Matrix< T > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 650 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void BIAS::Matrix2x2< T >::Mult | ( | const Matrix2x2< T > & | argmat,
 |  | Matrix2x2< T > & | destmat
 | ) | const [inline]

matrix-matrix multiplication with other Matrix2x2, storing the result in destmat calculates: destmat = (this mat) * argmat

Definition at line 181 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix2x2< T >::Mult | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

matrix - vector multiplicate this matrix with Vector2, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Definition at line 220 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix2x2< T >::MultIP ( const Matrix2x2< T > & argmat ) [inline]

Multiplication in place with argmat.

Definition at line 201 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), T, and TNT::Matrix< T >::v_.

template<class T>
void BIAS::Matrix< T >::Multiply | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 558 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator *().

template<class T = double>
void BIAS::Matrix< T >::MultiplyIP ( const T & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

Referenced by BIAS::Conic2D::GetTangentPoints(), and BIAS::Matrix< T >::operator *=().

template<class T>
void BIAS::Matrix< T >::MultLeft | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

Definition at line 712 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::MultLeft ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

Definition at line 683 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Conic2D::GetTangentPoints().

template<class T = double>
Vector2<T> BIAS::Matrix2x2< T >::MultLeft ( const Vector2< T > & argvec ) const [inline]

transposed argvec multipied from left, wrapper function

Definition at line 101 of file Matrix2x2.hh.

template<class T>
void BIAS::Matrix2x2< T >::MultLeft | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

matrix - vector multiplicate this matrix with Vector2, storing the result in destvec calculates: destvec^T = argvec^T * (this Matrix)

Definition at line 231 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
Matrix2x2< T > & BIAS::Matrix2x2< T >::newsize | ( | int | rows,
 |  | int | cols
 | ) |

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix2x2 becomes a base class.

(04/17/2002) Felix Woelk

Definition at line 90 of file Matrix2x2.cpp.

References BIASERR.

template<class T>
T BIAS::Matrix< T >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::Conic2D, BIAS::PMatrix, and BIAS::Quadric3D.

Definition at line 263 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by main(), and BIAS::ProjectionParametersPerspective::ViewDifference().

template<class T>
void BIAS::Matrix< T >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

Definition at line 142 of file Matrix.cpp.

References BIAS::Matrix< T >::GetCol(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix< T >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

Definition at line 57 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

Definition at line 131 of file Matrix.cpp.

References BIAS::Matrix< T >::GetRow(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Triangulation::TriangulateLinear().

template<class T>
void BIAS::Matrix< T >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

Definition at line 96 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
T BIAS::Matrix< T >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

Definition at line 625 of file Matrix.hh.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::EMatrix::InitFromF(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
T BIAS::Matrix< T >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 605 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Definition at line 615 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
Matrix2x2< T > & BIAS::Matrix2x2< T >::operator= ( const Matrix2x2< T > & mat )

assignment operator

Definition at line 81 of file Matrix2x2.cpp.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Definition at line 326 of file Matrix.cpp.

template<class T>
void BIAS::Matrix< T >::ScaleCol | ( | int | NoCol,
 |  | T | scale
 | ) | [inherited]

Scales column NoCol with scale.

Definition at line 162 of file Matrix.cpp.

References TNT::Matrix< T >::num_rows().

template<class T>
void BIAS::Matrix< T >::ScaleRow | ( | int | NoRow,
 |  | T | scale
 | ) | [inherited]

Scales row NoRow with scale.

Definition at line 153 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols().

Referenced by BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void BIAS::Matrix< T >::SetCol | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

Definition at line 213 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix2x2< T >::SetIdentity ( ) [inline]

set the elements of this matrix to the identity matrix

Reimplemented from BIAS::Matrix< T >.

Definition at line 243 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix< T >::SetRow | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

Definition at line 203 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 598 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::Decompose_(), BIAS::Triangulation::GetCovariance2D(), BIAS::RigParameter::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Camera< StorageType >::Init_(), BIAS::SVD::Invert(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::MatchDataBase::Reset(), BIAS::Pose::Set(), BIAS::Pose::SetC(), BIAS::Pose::SetCovariance(), BIAS::PoseParametrization::SetOrientation(), BIAS::PoseParametrization::SetPosition(), BIAS::Pose::SetQ(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
void BIAS::Matrix< T >::Sub | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 545 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator-().

template<class T = double>
void BIAS::Matrix< T >::SubIP ( const T & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

template<class T>
void BIAS::Matrix< T >::SubIP ( const Matrix< T > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Definition at line 757 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::operator-=().

template<class T>
T BIAS::Matrix< T >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< T >, BIAS::CovMatrix3x3, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 641 of file Matrix.hh.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix2x2< T >::Transpose ( const Matrix2x2< T > & arg ) [inline]

set this as transposed arg

Definition at line 156 of file Matrix2x2.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
Matrix2x2< T > BIAS::Matrix2x2< T >::Transpose ( ) const [inline]

returns transposed matrix

Reimplemented from BIAS::Matrix< T >.

Definition at line 165 of file Matrix2x2.hh.

References BIAS::Matrix2x2< T >::Transpose().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), and BIAS::Matrix2x2< T >::Transpose().

template<class T>
void BIAS::Matrix2x2< T >::TransposeIP ( ) [inline]

transpose matrix in place

Definition at line 173 of file Matrix2x2.hh.

References T, and TNT::Matrix< T >::v_.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const Matrix3x3< T > & | argLeft,
 |  | const Matrix< T > & | argMat
 | ) | [related, inherited]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 673 of file Operators.hh.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 499 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > operator * | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 494 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix2x2< T > operator * | ( | const Matrix2x2< T > & | mat,
 |  | const Matrix2x2< T > & | argMat
 | ) | [related]

untested

Definition at line 638 of file Operators.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T = double>
Matrix< T > & operator *= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator

Author:
Ingo Thomsen

Definition at line 498 of file Matrix.hh.

References BIAS::Matrix< T >::MultiplyIP().

template<class T = double>
bool operator!= | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for not equal

Author:
Ingo Thomsen (07/02/2002)

Definition at line 524 of file Matrix.hh.

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator+ | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 475 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > operator+ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator, returning new matrix

Author:
Ingo Thomsen, woelk

Definition at line 470 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

addition in place operator

Author:
grest

Definition at line 477 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator

Author:
Ingo Thomsen

Definition at line 470 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator- | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 487 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > operator- | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 482 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator

Author:
Ingo Thomsen

Definition at line 491 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

subtracts arg from mat, mat = mat - arg

Author:
grest

Definition at line 484 of file Matrix.hh.

References BIAS::Matrix< T >::SubIP().

template<class T = double>
Matrix< T > operator/ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 506 of file Operators.hh.

References BIAS::Matrix< T >::Divide(), and res.

template<class T = double>
Matrix< T > & operator/= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator

Author:
Ingo Thomsen

Definition at line 513 of file Operators.hh.

References BIAS::Matrix< T >::DivideIP().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T = double>
bool operator== | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for equal

Author:
Ingo Thomsen (07/02/2002) tested

Definition at line 509 of file Matrix.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), TNT::Matrix< T >::size(), and T.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Matrix2x2.hh
  • Base/Math/Matrix2x2.cpp
  • Base/Math/Operators.hh
Generated on Wed Jun 21 19:08:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Matrix3x3< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Matrix3x3

BIAS::Matrix3x3< T > Class Template Reference
[Matrix and Vector Classes]

is a 'fixed size' quadratic matrix of dim. More...

#include <Base/Math/Matrix3x3.hh>

Inheritance diagram for BIAS::Matrix3x3< T >:

[legend]
Collaboration diagram for BIAS::Matrix3x3< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

T | det () const
calculate the determinante
Subscript | dim (Subscript d) const
BIAS::Vector3< T > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
T | GetDeterminant () const
returns the Determinant |A| of this
Vector3< T > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< T > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
template<>
int | Invert (Matrix3x3< unsigned int > &x) const
int | Invert (Matrix3x3< T > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< T > | Invert () const
Complete inversion.
template<>
int | InvertIP ()
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix3x3 (const TNT::Matrix< T > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< T > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< T > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (T &max, T &min) const
return biggest and smallest entry
void | Mult (const Matrix3x4< T > &argmat, Matrix3x4< T > &destmat) const
void | Mult (const Matrix3x3< T > &argmat, Matrix3x3< T > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< T > &argvec, Vector3< T > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Matrix3x3< T > & | operator= (const Matrix3x3< T > &mat)
assignment operator calls corresponding operator from base class
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void | Scale (const T &scalar, Matrix3x3< T > &destmat) const
scalar-matrix multiplication
template<>
void | SetAsCrossProductMatrix (const unsigned int &, const unsigned int &, const unsigned int &)
template<>
void | SetAsCrossProductMatrix (const Vector3< unsigned int > &)
void | SetAsCrossProductMatrix (const T &x, const T &y, const T &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< T > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetFromColumnVectors (const BIAS::Vector3< T > &v0, const BIAS::Vector3< T > &v1, const BIAS::Vector3< T > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromRowVectors (const BIAS::Vector3< T > &v0, const BIAS::Vector3< T > &v1, const BIAS::Vector3< T > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< T > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
Subscript | size () const
T | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< T > &arg)
sets this as transposed arg, fw
Matrix3x3< T > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< T > &argvec, Vector3< T > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
virtual | ~Matrix3x3 ()
destructor untested (04/17/2002)

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator * (const Matrix3x3< T > &argLeft, const Matrix< T > &argMat)
Matrix< T > | operator * (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator * (const Matrix< T > &mat, const T &scalar)
Matrix3x3< T > | operator * (const Matrix3x3< T > &argL, const Matrix3x3< T > &argR)
Matrix3x3< T > | operator * (const Matrix3x3< T > &mat, const T &scalar)
Matrix< T > & | operator *= (Matrix< T > &mat, const T &scalar)
bool | operator!= (const Matrix< T > &argl, const Matrix< T > &argr)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator+ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator+= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > & | operator+= (Matrix< T > &mat, const T &scalar)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator- (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > | operator/ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator/= (Matrix< T > &mat, const T &scalar)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
bool | operator== (const Matrix< T > &argl, const Matrix< T > &argr)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T = double>
class BIAS::Matrix3x3< T >

is a 'fixed size' quadratic matrix of dim.

3 x 3 which is templated over the elemnt-type.

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 60 of file Matrix3x3.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T = double>
BIAS::Matrix3x3< T >::Matrix3x3 ( ) [inline]

default constructor untested

template<class T>
BIAS::Matrix3x3< T >::Matrix3x3 ( const std::string & s ) [explicit]

JW.

Definition at line 50 of file Matrix3x3.cpp.

template<class T>
BIAS::Matrix3x3< T >::Matrix3x3 | ( | const T | a0,
 |  | const T | a1,
 |  | const T | a2,
 |  | const T | a3,
 |  | const T | a4,
 |  | const T | a5,
 |  | const T | a6,
 |  | const T | a7,
 |  | const T | a8
 | ) |

Set the matrix values JW.

Definition at line 66 of file Matrix3x3.cpp.

template<class T = double>
BIAS::Matrix3x3< T >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit]

init matrix with identity or zero

Author:
koeser

template<class T = double>
BIAS::Matrix3x3< T >::Matrix3x3 ( const Matrix3x3< T > & A ) [inline]

Author:
Jan Woetzel untested (04/17/2002)

template<class T>
BIAS::Matrix3x3< T >::Matrix3x3 ( const Matrix< T > & A )

cast constructor from Matrix

Definition at line 41 of file Matrix3x3.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
BIAS::Matrix3x3< T >::Matrix3x3 ( const TNT::Matrix< T > & A )

cast constructor from TNT::Matrix

Definition at line 56 of file Matrix3x3.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
BIAS::Matrix3x3< T >::~Matrix3x3 ( ) [virtual]

destructor untested (04/17/2002)

Definition at line 78 of file Matrix3x3.cpp.

Member Function Documentation

template<class T>
void BIAS::Matrix< T >::Add | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

Definition at line 532 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator+().

template<class T>
void BIAS::Matrix< T >::AddIP ( const Matrix< T > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

Definition at line 736 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
void BIAS::Matrix< T >::AddIP ( const T & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator+=(), and BIAS::Matrix< T >::operator-=().

template<class T>
bool BIAS::Matrix< T >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 340 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
bool BIAS::Matrix< T >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 375 of file Matrix.cpp.

References TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
T BIAS::Matrix3x3< T >::det ( ) const [inline]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

Definition at line 449 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::Matrix4x4< PMATRIX_TYPE >::det(), BIAS::HomgPlane3D::HomgPlane3D(), BIAS::Matrix3x3< T >::Invert(), and BIAS::Matrix3x3< T >::InvertIP().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

template<class T>
void BIAS::Matrix< T >::Divide | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 570 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator/().

template<class T = double>
void BIAS::Matrix< T >::DivideIP ( const T & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator/=().

template<class T>
void BIAS::Matrix< T >::Fill ( const T & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Definition at line 50 of file Matrix.cpp.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::Decompose_(), BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline3(), BIAS::PMatrix::InvalidateDecomposition(), and main().

template<class T>
Vector< T > BIAS::Matrix< T >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

Definition at line 190 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EMatrix::GetRotationTranslation(), and BIAS::Matrix< T >::NormalizeCols().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
BIAS::Vector3< T > BIAS::Matrix3x3< T >::GetColumn ( const unsigned int col ) const

extract one column ('Spalte') from this matrix (for convenience) JW

Definition at line 185 of file Matrix3x3.cpp.

References BIASASSERT.

template<class T = double>
T* BIAS::Matrix< T >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::Add(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), Fortran_Matrix_to_Matrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix3x3< T >::GetRow(), BIAS::CovMatrix3x3::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Matrix3x4< T >::Matrix3x4(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), MyLinTransform(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix2x2< T >::operator *(), BIAS::Matrix2x2< T >::operator=(), BIAS::AffineTransf::operator=(), BIAS::Matrix< T >::operator==(), BIAS::operator==(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Matrix3x3< T >::Scale(), BIAS::EuclideanTransf3D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Vector4< T >::transposed(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::ProjectionParametersProjective::XMLOut(), and BIAS::PMatrix::XMLOut().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

Referenced by BIAS::PMatrixLinear::GetPEstSystemInHom().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

Referenced by BIAS::SVD3x3::Compute().

template<class T = double>
T* BIAS::Matrix< T >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix< T >::operator==(), and BIAS::Matrix< T >::SetZero().

template<class T>
T BIAS::Matrix3x3< T >::GetDeterminant ( ) const

returns the Determinant |A| of this

Author:
grest

Definition at line 192 of file Matrix3x3.cpp.

References T.

template<class T>
T BIAS::Matrix< T >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 275 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
void BIAS::Matrix< T >::GetMaxMin | ( | T & | max,
 |  | T & | min
 | ) | const [inherited]

return biggest and smallest entry

Definition at line 289 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 299 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), BIAS::Matrix< T >::GetNumElements(), and T.

template<class T>
T BIAS::Matrix< T >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 249 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T = double>
int BIAS::Matrix< T >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMean().

template<class T>
Vector< T > BIAS::Matrix< T >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Definition at line 171 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by DistanceFromRotation4Var(), BIAS::Quadric3D::GetSignature(), BIAS::Matrix< T >::NormalizeRows(), and BIAS::Triangulation::TriangulateLinear().

template<class T = double>
Vector3<T> BIAS::Matrix3x3< T >::GetRow ( const unsigned int row ) const [inline]

Definition at line 186 of file Matrix3x3.hh.

template<class T>
void BIAS::Matrix3x3< T >::GetRow | ( | const unsigned int | row,
 |  | Vector3< T > & | r
 | ) | const

extract one row ('Zeile') from ths matrix (for convenience) JW

Definition at line 172 of file Matrix3x3.cpp.

References BIASASSERT, BIAS::Matrix< T >::GetData(), p, and T.

Referenced by BIAS::TrifocalTensorBase::Compose(), BIAS::CovMatrix3x3::GetSearchArea(), and BIAS::Conic2D::GetSignature().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
void BIAS::Matrix< T >::GetSystemMatrix ( Matrix< T > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

Definition at line 778 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::row_, and T.

Referenced by BIAS::SVD::Solve().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<>
int BIAS::Matrix3x3< unsigned int >::Invert ( Matrix3x3< unsigned int > & x ) const

Definition at line 227 of file Matrix3x3.cpp.

References BIASBREAK, and BIASERR.

template<class T>
int BIAS::Matrix3x3< T >::Invert ( Matrix3x3< T > & inv ) const

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Definition at line 234 of file Matrix3x3.cpp.

References BIASASSERT, BIAS::Matrix3x3< T >::det(), BIAS::Matrix< T >::GetData(), res, and T.

template<class T>
Matrix3x3< T > BIAS::Matrix3x3< T >::Invert ( ) const

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

Reimplemented in BIAS::KMatrix.

Definition at line 205 of file Matrix3x3.cpp.

References BIASASSERT, BIASERR, and res.

Referenced by BIAS::PMatrix::Decompose_(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), HErrorFunction(), BIAS::PMDImageProc::HFromMeta_(), BIAS::Matrix3x3< T >::InvertIP(), main(), and BIAS::Quadric3D::Quadric3D().

template<>
int BIAS::Matrix3x3< unsigned int >::InvertIP ( )

Definition at line 269 of file Matrix3x3.cpp.

References BIASBREAK, and BIASERR.

template<class T>
int BIAS::Matrix3x3< T >::InvertIP ( )

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Definition at line 278 of file Matrix3x3.cpp.

References BIASASSERT, BIAS::Matrix3x3< T >::det(), BIAS::Matrix< T >::GetData(), BIAS::Matrix3x3< T >::Invert(), res, and T.

Referenced by BIAS::PMatrixBase::Backproject(), and BIAS::PMatrix::Compose().

template<class T>
bool BIAS::Matrix< T >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 444 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose().

template<class T>
bool BIAS::Matrix< T >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 413 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by main(), MatrixSqrt(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, BIAS::PMatrix, and BIAS::Pose.

Definition at line 312 of file Matrix.cpp.

Referenced by main().

template<class T>
int BIAS::Matrix3x3< T >::LoadBogK ( const std::string & filename )

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

Definition at line 403 of file Matrix3x3.cpp.

References BIASASSERT, and BIASERR.

Referenced by BIAS::PMatrixBase::LoadBOG(), and main().

template<class T>
int BIAS::Matrix3x3< T >::LoadBogRC ( const std::string & filename )

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

Definition at line 329 of file Matrix3x3.cpp.

References BIASASSERT, BIASERR, BIAS::Matrix< T >::GetData(), and BIAS::Matrix< T >::SetZero().

Referenced by BIAS::PMatrixBase::LoadBOG(), and main().

template<class T>
void BIAS::Matrix3x3< T >::MaxMin | ( | T & | max,
 |  | T & | min
 | ) | const [inline]

return biggest and smallest entry

Author:
woelk 08/2004

Definition at line 530 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 690 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::Mult ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

Definition at line 676 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Matrix< T > & | arg,
 |  | Matrix< T > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 650 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void BIAS::Matrix3x3< T >::Mult | ( | const Matrix3x4< T > & | argmat,
 |  | Matrix3x4< T > & | destmat
 | ) | const [inline]

Author:
woelk 06 2003

Definition at line 342 of file Matrix3x3.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix3x3< T >::Mult | ( | const Matrix3x3< T > & | argmat,
 |  | Matrix3x3< T > & | destmat
 | ) | const [inline]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Definition at line 305 of file Matrix3x3.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix3x3< T >::Mult | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

Definition at line 267 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::TrifocalTensorBase::CheckPointCorr(), BIAS::TrifocalTensorBase::Compose(), BIAS::PMatrixBase::Compose(), BIAS::FMatrixBase::Compose(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EMatrixBase::GetCosAngleErrorHomogenized(), BIAS::TrifocalTensor::GetFMatrix21(), BIAS::TrifocalTensor::GetFMatrix31(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::PMatrix::GetImagePlane(), BIAS::TrifocalTensor::GetPMatrix2(), BIAS::TrifocalTensor::GetPMatrix3(), BIAS::PMatrix::GetRayWorldCoo(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::Matrix3x4< T >::operator *(), BIAS::Matrix3x3< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::ProjectionParametersZoom::ProjectLocal(), BIAS::ProjectionParametersPerspective::ProjectLocal(), BIAS::FMatrixBase::Set(), BIAS::EMatrixBase::Set(), BIAS::ProjectionParametersZoom::UnProjectLocal(), BIAS::ProjectionParametersPerspective::UnProjectLocal(), BIAS::ProjectionParametersBase::UnProjectToRay(), and BIAS::Projection::UnProjectToRay().

template<class T>
void BIAS::Matrix< T >::Multiply | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 558 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator *().

template<class T = double>
void BIAS::Matrix< T >::MultiplyIP ( const T & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

Referenced by BIAS::Conic2D::GetTangentPoints(), and BIAS::Matrix< T >::operator *=().

template<class T>
void BIAS::Matrix< T >::MultLeft | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

Definition at line 712 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::MultLeft ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

Definition at line 683 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Conic2D::GetTangentPoints().

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
Matrix3x3< T > & BIAS::Matrix3x3< T >::newsize | ( | int | rows,
 |  | int | cols
 | ) |

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

Definition at line 102 of file Matrix3x3.cpp.

References BIASASSERT, and BIASERR.

Referenced by BIAS::operator>>().

template<class T>
T BIAS::Matrix< T >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::Conic2D, BIAS::PMatrix, and BIAS::Quadric3D.

Definition at line 263 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by main(), and BIAS::ProjectionParametersPerspective::ViewDifference().

template<class T>
void BIAS::Matrix< T >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

Definition at line 142 of file Matrix.cpp.

References BIAS::Matrix< T >::GetCol(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix< T >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

Definition at line 57 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

Definition at line 131 of file Matrix.cpp.

References BIAS::Matrix< T >::GetRow(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Triangulation::TriangulateLinear().

template<class T>
void BIAS::Matrix< T >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

Definition at line 96 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
T BIAS::Matrix< T >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

Definition at line 625 of file Matrix.hh.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::EMatrix::InitFromF(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
T BIAS::Matrix< T >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 605 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Definition at line 615 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
Matrix3x3< T > & BIAS::Matrix3x3< T >::operator= ( const Matrix3x3< T > & mat ) [inline]

assignment operator calls corresponding operator from base class

Author:
Felix Woelk

Reimplemented in BIAS::FMatrixBase, BIAS::CovMatrix3x3, BIAS::EMatrix, and BIAS::FMatrix.

Definition at line 523 of file Matrix3x3.hh.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Definition at line 326 of file Matrix.cpp.

template<class T>
void BIAS::Matrix3x3< T >::Scale | ( | const T & | scalar,
 |  | Matrix3x3< T > & | destmat
 | ) | const [inline]

scalar-matrix multiplication

Definition at line 390 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::Matrix3x3< T >::operator *().

template<class T>
void BIAS::Matrix< T >::ScaleCol | ( | int | NoCol,
 |  | T | scale
 | ) | [inherited]

Scales column NoCol with scale.

Definition at line 162 of file Matrix.cpp.

References TNT::Matrix< T >::num_rows().

template<class T>
void BIAS::Matrix< T >::ScaleRow | ( | int | NoRow,
 |  | T | scale
 | ) | [inherited]

Scales row NoRow with scale.

Definition at line 153 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols().

Referenced by BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<>
void BIAS::Matrix3x3< unsigned int >::SetAsCrossProductMatrix | ( | const unsigned int & | ,
 |  | const unsigned int & | ,
 |  | const unsigned int & |
 | ) | [inline]

Definition at line 480 of file Matrix3x3.hh.

References BIASBREAK, and BIASERR.

template<>
void BIAS::Matrix3x3< unsigned int >::SetAsCrossProductMatrix ( const Vector3< unsigned int > & ) [inline]

Definition at line 463 of file Matrix3x3.hh.

References BIASBREAK, and BIASERR.

template<class T>
void BIAS::Matrix3x3< T >::SetAsCrossProductMatrix | ( | const T & | x,
 |  | const T & | y,
 |  | const T & | z
 | ) | [inline]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

Definition at line 487 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void BIAS::Matrix3x3< T >::SetAsCrossProductMatrix ( const Vector3< T > & vec ) [inline]

Sets matrix from vector as cross product matrix of this vector.

Definition at line 469 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by AddErr(), BIAS::TrifocalTensorBase::CheckPointCorr(), BIAS::FMatrixBase::Compose(), BIAS::PMatrixEstimation::ComputeRotation(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::FMatrix::DecomposetoSR(), BIAS::Conic2D::GetTangentPoints(), BIAS::FMatrixBase::Set(), and BIAS::EMatrixBase::Set().

template<class T>
void BIAS::Matrix< T >::SetCol | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

Definition at line 213 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix3x3< T >::SetFromColumnVectors | ( | const BIAS::Vector3< T > & | v0,
 |  | const BIAS::Vector3< T > & | v1,
 |  | const BIAS::Vector3< T > & | v2
 | ) |

set this matrix from 3 vectors each representating a column JW 07/2003

Definition at line 142 of file Matrix3x3.cpp.

template<class T>
void BIAS::Matrix3x3< T >::SetFromRowVectors | ( | const BIAS::Vector3< T > & | v0,
 |  | const BIAS::Vector3< T > & | v1,
 |  | const BIAS::Vector3< T > & | v2
 | ) |

set this matrix from 3 vectors, each representating a row JW 07/2003

Definition at line 157 of file Matrix3x3.cpp.

template<class T>
void BIAS::Matrix3x3< T >::SetFromVector ( const TNT::Vector< T > & vec )

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

Definition at line 125 of file Matrix3x3.cpp.

References BIASASSERT, BIAS::Matrix< T >::GetData(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix3x3< T >::SetIdentity ( ) [inline]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< T >.

Definition at line 434 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::RigParameter::AddCameraOnly(), BIAS::PMatrixBase::Compose(), BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::Triangulation::CorrectCorrespondences(), CreateMatches2(), BIAS::GeometryGL::CreateTextureMatrix(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), BIAS::FMatrix::GetEpipoles(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::KMatrix::Invert(), BIAS::PMDImageProc::KFromMeta(), BIAS::PMatrix::LoadBBC(), main(), BIAS::RigParameter::ReadRigData(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::RMatrixBase::Set(), BIAS::Conic2D::SetEllipse(), BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), BIAS::SphericalUndistortion::SetupLutPerspPxPy2(), BIAS::SphericalUndistortion::SetupProjectionLUT(), BIAS::RMatrixBase::SetXYZ(), and BIAS::RMatrixBase::SetZYX().

template<class T>
void BIAS::Matrix< T >::SetRow | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

Definition at line 203 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 598 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::Decompose_(), BIAS::Triangulation::GetCovariance2D(), BIAS::RigParameter::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Camera< StorageType >::Init_(), BIAS::SVD::Invert(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::MatchDataBase::Reset(), BIAS::Pose::Set(), BIAS::Pose::SetC(), BIAS::Pose::SetCovariance(), BIAS::PoseParametrization::SetOrientation(), BIAS::PoseParametrization::SetPosition(), BIAS::Pose::SetQ(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
void BIAS::Matrix< T >::Sub | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 545 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator-().

template<class T = double>
void BIAS::Matrix< T >::SubIP ( const T & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

template<class T>
void BIAS::Matrix< T >::SubIP ( const Matrix< T > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Definition at line 757 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::operator-=().

template<class T = double>
T BIAS::Matrix3x3< T >::Trace ( ) const [inline]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< T >.

Reimplemented in BIAS::CovMatrix3x3.

Definition at line 233 of file Matrix3x3.hh.

template<class T>
void BIAS::Matrix3x3< T >::Transpose ( const Matrix3x3< T > & arg ) [inline]

sets this as transposed arg, fw

Definition at line 424 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), T, and TNT::Matrix< T >::v_.

template<class T>
Matrix3x3< T > BIAS::Matrix3x3< T >::Transpose ( ) const

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< T >.

Definition at line 83 of file Matrix3x3.cpp.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), BIAS::TrifocalTensorBase::Compose(), BIAS::FMatrixBase::Compose(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeRotation(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::RMatrix::GetAverageRMatrix(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::TrifocalTensor::GetPMatrix3(), BIAS::EMatrix::GetRotationTranslation(), BIAS::EMatrix::InitFromF(), main(), BIAS::Vector3< T >::Normalize(), operator<<(), BIAS::FMatrixBase::Set(), BIAS::Conic2D::SetEllipse(), BIAS::ThreeDOut::UpdateEllipsoid(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

template<class T>
void BIAS::Matrix3x3< T >::TransposedMult | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

Definition at line 286 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::Triangulation::CorrectCorrespondences().

template<class T>
void BIAS::Matrix3x3< T >::TransposeIP ( ) [inline]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 401 of file Matrix3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::PMatrixBase::Compose(), and BIAS::PMatrix::GetIntersectionOfImagePlanes().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const Matrix3x3< T > & | argLeft,
 |  | const Matrix< T > & | argMat
 | ) | [related, inherited]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 673 of file Operators.hh.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 499 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > operator * | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 494 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix3x3< T > operator * | ( | const Matrix3x3< T > & | argL,
 |  | const Matrix3x3< T > & | argR
 | ) | [related]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 661 of file Operators.hh.

References BIAS::Matrix3x3< T >::Mult().

template<class T = double>
Matrix3x3< T > operator * | ( | const Matrix3x3< T > & | mat,
 |  | const T & | scalar
 | ) | [related]

Definition at line 518 of file Operators.hh.

References res, and BIAS::Matrix3x3< T >::Scale().

template<class T = double>
Matrix< T > & operator *= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator

Author:
Ingo Thomsen

Definition at line 498 of file Matrix.hh.

References BIAS::Matrix< T >::MultiplyIP().

template<class T = double>
bool operator!= | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for not equal

Author:
Ingo Thomsen (07/02/2002)

Definition at line 524 of file Matrix.hh.

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator+ | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 475 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > operator+ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator, returning new matrix

Author:
Ingo Thomsen, woelk

Definition at line 470 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

addition in place operator

Author:
grest

Definition at line 477 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator

Author:
Ingo Thomsen

Definition at line 470 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator- | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 487 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > operator- | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 482 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator

Author:
Ingo Thomsen

Definition at line 491 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

subtracts arg from mat, mat = mat - arg

Author:
grest

Definition at line 484 of file Matrix.hh.

References BIAS::Matrix< T >::SubIP().

template<class T = double>
Matrix< T > operator/ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 506 of file Operators.hh.

References BIAS::Matrix< T >::Divide(), and res.

template<class T = double>
Matrix< T > & operator/= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator

Author:
Ingo Thomsen

Definition at line 513 of file Operators.hh.

References BIAS::Matrix< T >::DivideIP().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T = double>
bool operator== | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for equal

Author:
Ingo Thomsen (07/02/2002) tested

Definition at line 509 of file Matrix.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), TNT::Matrix< T >::size(), and T.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Matrix3x3.hh
  • Base/Math/Matrix3x3.cpp
  • Base/Math/Operators.hh
Generated on Wed Jun 21 19:08:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Matrix3x4< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Matrix3x4

BIAS::Matrix3x4< T > Class Template Reference
[Matrix and Vector Classes]

is a 'fixed size' rectangular matrix of dim. More...

#include <Base/Math/Matrix3x4.hh>

Inheritance diagram for BIAS::Matrix3x4< T >:

[legend]
Collaboration diagram for BIAS::Matrix3x4< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

Subscript | dim (Subscript d) const
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
int | LoadBan (const std::string &filename, const unsigned int &Time=0)
Loads a PMatrix from .ban file given by AddCameraKey and Time index.
Matrix3x4 (const Matrix3x4< T > &A)
Matrix3x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x4 (const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8, const T a9, const T a10, const T a11)
Set the matrix values JW.
Matrix3x4 (const std::string &s)
JW.
Matrix3x4 ()
default constructor untested
void | Mult (const Vector4< T > &argvec, Vector3< T > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix3x4 becomes a base class.
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Matrix3x4 & | operator= (const Matrix< T > &mat)
assignment operator calling corresponding operator from base class if appropriate.
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void SetIdentity ()
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)
Subscript | size () const
Matrix< T > | Transpose () const
transpose function, storing data destination matrix
virtual | ~Matrix3x4 ()
destructor untested (04/17/2002)

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator * (const Matrix3x3< T > &argLeft, const Matrix< T > &argMat)
Matrix< T > | operator * (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator * (const Matrix< T > &mat, const T &scalar)
Matrix3x4< T > | operator * (const Matrix3x3< T > &mat, const Matrix3x4< T > &arg)
Matrix< T > & | operator *= (Matrix< T > &mat, const T &scalar)
bool | operator!= (const Matrix< T > &argl, const Matrix< T > &argr)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator+ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator+= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > & | operator+= (Matrix< T > &mat, const T &scalar)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator- (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > | operator/ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator/= (Matrix< T > &mat, const T &scalar)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
bool | operator== (const Matrix< T > &argl, const Matrix< T > &argr)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T = double>
class BIAS::Matrix3x4< T >

is a 'fixed size' rectangular matrix of dim.

3 x 4 which is templated over the element-type

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 57 of file Matrix3x4.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T = double>
BIAS::Matrix3x4< T >::Matrix3x4 ( ) [inline]

default constructor untested

template<class T>
BIAS::Matrix3x4< T >::Matrix3x4 ( const std::string & s ) [explicit]

JW.

Definition at line 57 of file Matrix3x4.cpp.

template<class T>
BIAS::Matrix3x4< T >::Matrix3x4 | ( | const T | a0,
 |  | const T | a1,
 |  | const T | a2,
 |  | const T | a3,
 |  | const T | a4,
 |  | const T | a5,
 |  | const T | a6,
 |  | const T | a7,
 |  | const T | a8,
 |  | const T | a9,
 |  | const T | a10,
 |  | const T | a11
 | ) |

Set the matrix values JW.

Definition at line 44 of file Matrix3x4.cpp.

References BIAS::Matrix< T >::GetData().

template<class T = double>
BIAS::Matrix3x4< T >::Matrix3x4 ( const MatrixInitType & i ) [inline, explicit]

init matrix with identity or zero

Author:
koeser

template<class T = double>
BIAS::Matrix3x4< T >::Matrix3x4 ( const Matrix3x4< T > & A ) [inline]

Author:
Jan Woetzel untested (04/17/2002)

template<class T>
BIAS::Matrix3x4< T >::~Matrix3x4 ( ) [virtual]

destructor untested (04/17/2002)

Definition at line 40 of file Matrix3x4.cpp.

Member Function Documentation

template<class T>
void BIAS::Matrix< T >::Add | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

Definition at line 532 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator+().

template<class T>
void BIAS::Matrix< T >::AddIP ( const Matrix< T > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

Definition at line 736 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
void BIAS::Matrix< T >::AddIP ( const T & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator+=(), and BIAS::Matrix< T >::operator-=().

template<class T>
bool BIAS::Matrix< T >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 340 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
bool BIAS::Matrix< T >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 375 of file Matrix.cpp.

References TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

template<class T>
void BIAS::Matrix< T >::Divide | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 570 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator/().

template<class T = double>
void BIAS::Matrix< T >::DivideIP ( const T & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator/=().

template<class T>
void BIAS::Matrix< T >::Fill ( const T & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Definition at line 50 of file Matrix.cpp.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::Decompose_(), BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline3(), BIAS::PMatrix::InvalidateDecomposition(), and main().

template<class T>
Vector< T > BIAS::Matrix< T >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

Definition at line 190 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EMatrix::GetRotationTranslation(), and BIAS::Matrix< T >::NormalizeCols().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T = double>
T* BIAS::Matrix< T >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::Add(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), Fortran_Matrix_to_Matrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix3x3< T >::GetRow(), BIAS::CovMatrix3x3::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Matrix3x4< T >::Matrix3x4(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), MyLinTransform(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix2x2< T >::operator *(), BIAS::Matrix2x2< T >::operator=(), BIAS::AffineTransf::operator=(), BIAS::Matrix< T >::operator==(), BIAS::operator==(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Matrix3x3< T >::Scale(), BIAS::EuclideanTransf3D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Vector4< T >::transposed(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::ProjectionParametersProjective::XMLOut(), and BIAS::PMatrix::XMLOut().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

Referenced by BIAS::PMatrixLinear::GetPEstSystemInHom().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

Referenced by BIAS::SVD3x3::Compute().

template<class T = double>
T* BIAS::Matrix< T >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix< T >::operator==(), and BIAS::Matrix< T >::SetZero().

template<class T>
T BIAS::Matrix< T >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 275 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
void BIAS::Matrix< T >::GetMaxMin | ( | T & | max,
 |  | T & | min
 | ) | const [inherited]

return biggest and smallest entry

Definition at line 289 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 299 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), BIAS::Matrix< T >::GetNumElements(), and T.

template<class T>
T BIAS::Matrix< T >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 249 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T = double>
int BIAS::Matrix< T >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMean().

template<class T>
Vector< T > BIAS::Matrix< T >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Definition at line 171 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by DistanceFromRotation4Var(), BIAS::Quadric3D::GetSignature(), BIAS::Matrix< T >::NormalizeRows(), and BIAS::Triangulation::TriangulateLinear().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
void BIAS::Matrix< T >::GetSystemMatrix ( Matrix< T > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

Definition at line 778 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::row_, and T.

Referenced by BIAS::SVD::Solve().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
bool BIAS::Matrix< T >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 444 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose().

template<class T>
bool BIAS::Matrix< T >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 413 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by main(), MatrixSqrt(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, BIAS::PMatrix, and BIAS::Pose.

Definition at line 312 of file Matrix.cpp.

Referenced by main().

template<class T>
int BIAS::Matrix3x4< T >::LoadBan | ( | const std::string & | filename,
 |  | const unsigned int & | Time = 0
 | ) |

Loads a PMatrix from .ban file given by AddCameraKey and Time index.

Returns:
0 in case of success and negative nr. in case of error.
Author:
Jan Woetzel

Definition at line 102 of file Matrix3x4.cpp.

Referenced by main().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 690 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::Mult ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

Definition at line 676 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Matrix< T > & | arg,
 |  | Matrix< T > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 650 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void BIAS::Matrix3x4< T >::Mult | ( | const Vector4< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 148 of file Matrix3x4.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::Vector4< T >::operator *().

template<class T>
void BIAS::Matrix< T >::Multiply | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 558 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator *().

template<class T = double>
void BIAS::Matrix< T >::MultiplyIP ( const T & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

Referenced by BIAS::Conic2D::GetTangentPoints(), and BIAS::Matrix< T >::operator *=().

template<class T>
void BIAS::Matrix< T >::MultLeft | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

Definition at line 712 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::MultLeft ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

Definition at line 683 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Conic2D::GetTangentPoints().

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
Matrix3x4< T > & BIAS::Matrix3x4< T >::newsize | ( | int | rows,
 |  | int | cols
 | ) |

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix3x4 becomes a base class.

(04/17/2002)

Author:
Jan Woetzel

Reimplemented in BIAS::PMatrixBase, and BIAS::PMatrix.

Definition at line 79 of file Matrix3x4.cpp.

References BIASASSERT, and BIASERR.

template<class T>
T BIAS::Matrix< T >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::Conic2D, BIAS::PMatrix, and BIAS::Quadric3D.

Definition at line 263 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by main(), and BIAS::ProjectionParametersPerspective::ViewDifference().

template<class T>
void BIAS::Matrix< T >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

Definition at line 142 of file Matrix.cpp.

References BIAS::Matrix< T >::GetCol(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix< T >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

Definition at line 57 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

Definition at line 131 of file Matrix.cpp.

References BIAS::Matrix< T >::GetRow(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Triangulation::TriangulateLinear().

template<class T>
void BIAS::Matrix< T >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

Definition at line 96 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
T BIAS::Matrix< T >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

Definition at line 625 of file Matrix.hh.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::EMatrix::InitFromF(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
T BIAS::Matrix< T >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 605 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Definition at line 615 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
Matrix3x4< T > & BIAS::Matrix3x4< T >::operator= ( const Matrix< T > & mat )

assignment operator calling corresponding operator from base class if appropriate.

Author:
Jan Woetzel untested (02/25/2002)

Reimplemented from BIAS::Matrix< T >.

Definition at line 63 of file Matrix3x4.cpp.

References BIASERR, DEBUG, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Definition at line 326 of file Matrix.cpp.

template<class T>
void BIAS::Matrix< T >::ScaleCol | ( | int | NoCol,
 |  | T | scale
 | ) | [inherited]

Scales column NoCol with scale.

Definition at line 162 of file Matrix.cpp.

References TNT::Matrix< T >::num_rows().

template<class T>
void BIAS::Matrix< T >::ScaleRow | ( | int | NoRow,
 |  | T | scale
 | ) | [inherited]

Scales row NoRow with scale.

Definition at line 153 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols().

Referenced by BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void BIAS::Matrix< T >::SetCol | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

Definition at line 213 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix3x4< T >::SetIdentity ( ) [inline]

set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)

Author:
Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< T >.

Definition at line 178 of file Matrix3x4.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::EMatrix::GetRotationTranslation(), and main().

template<class T>
void BIAS::Matrix< T >::SetRow | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

Definition at line 203 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 598 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::Decompose_(), BIAS::Triangulation::GetCovariance2D(), BIAS::RigParameter::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Camera< StorageType >::Init_(), BIAS::SVD::Invert(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::MatchDataBase::Reset(), BIAS::Pose::Set(), BIAS::Pose::SetC(), BIAS::Pose::SetCovariance(), BIAS::PoseParametrization::SetOrientation(), BIAS::PoseParametrization::SetPosition(), BIAS::Pose::SetQ(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
void BIAS::Matrix< T >::Sub | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 545 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator-().

template<class T = double>
void BIAS::Matrix< T >::SubIP ( const T & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

template<class T>
void BIAS::Matrix< T >::SubIP ( const Matrix< T > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Definition at line 757 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::operator-=().

template<class T>
T BIAS::Matrix< T >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< T >, BIAS::CovMatrix3x3, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 641 of file Matrix.hh.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and T.

template<class T>
Matrix< T > BIAS::Matrix< T >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix2x2< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< KLT_TYPE >, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 588 of file Matrix.hh.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrixEstimation::FindClosestP2(), BIAS::EMatrix::GetRotationTranslation(), BIAS::SVD::GetV(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::CoordinateTransform3D::LocalToGlobal(), main(), BIAS::Kalman::Predict(), BIAS::Quadric3D::Quadric3D(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::Conic2D::SetQuadricProjection(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::PoseParametrizationCovariance::Transform(), BIAS::FilterMask::Transpose(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const Matrix3x3< T > & | argLeft,
 |  | const Matrix< T > & | argMat
 | ) | [related, inherited]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 673 of file Operators.hh.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 499 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > operator * | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 494 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix3x4< T > operator * | ( | const Matrix3x3< T > & | mat,
 |  | const Matrix3x4< T > & | arg
 | ) | [related]

Definition at line 692 of file Operators.hh.

References BIAS::Matrix3x3< T >::Mult().

template<class T = double>
Matrix< T > & operator *= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator

Author:
Ingo Thomsen

Definition at line 498 of file Matrix.hh.

References BIAS::Matrix< T >::MultiplyIP().

template<class T = double>
bool operator!= | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for not equal

Author:
Ingo Thomsen (07/02/2002)

Definition at line 524 of file Matrix.hh.

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator+ | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 475 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > operator+ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator, returning new matrix

Author:
Ingo Thomsen, woelk

Definition at line 470 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

addition in place operator

Author:
grest

Definition at line 477 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator

Author:
Ingo Thomsen

Definition at line 470 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator- | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 487 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > operator- | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 482 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator

Author:
Ingo Thomsen

Definition at line 491 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

subtracts arg from mat, mat = mat - arg

Author:
grest

Definition at line 484 of file Matrix.hh.

References BIAS::Matrix< T >::SubIP().

template<class T = double>
Matrix< T > operator/ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 506 of file Operators.hh.

References BIAS::Matrix< T >::Divide(), and res.

template<class T = double>
Matrix< T > & operator/= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator

Author:
Ingo Thomsen

Definition at line 513 of file Operators.hh.

References BIAS::Matrix< T >::DivideIP().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T = double>
bool operator== | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for equal

Author:
Ingo Thomsen (07/02/2002) tested

Definition at line 509 of file Matrix.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), TNT::Matrix< T >::size(), and T.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Matrix3x4.hh
  • Base/Math/Matrix3x4.cpp
  • Base/Math/Operators.hh
Generated on Wed Jun 21 19:08:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Matrix4x4< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Matrix4x4

BIAS::Matrix4x4< T > Class Template Reference
[Matrix and Vector Classes]

is a 'fixed size' quadratic matrix of dim. More...

#include <Base/Math/Matrix4x4.hh>

Inheritance diagram for BIAS::Matrix4x4< T >:

[legend]
Collaboration diagram for BIAS::Matrix4x4< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

T | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
Matrix4x4 (const Matrix3x3< T > &R, const Vector3< T > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< T > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< T > &arg)
Matrix4x4 (const Matrix4x4< T > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8, const T a9, const T a10, const T a11, const T a12, const T a13, const T a14, const T a15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Matrix4x4< T > &argmat, Matrix4x4< T > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< T > &argvec, Vector4< T > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Matrix4x4 & | operator= (const Matrix< T > &mat)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
Subscript | size () const
Matrix< T > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
virtual | ~Matrix4x4 ()
destructor untested (04/17/2002)
Input / Output
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
bool | Load (const std::string &filename)
method to load directly from a given filename.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
Get Functions
Vector< T > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
T * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
T ** | GetDataArray () const
returns zero based arry for data access
T ** | GetDataArray1 () const
returns 1 based array to data access
T * | GetDataLast () const
Get a pointer to the last data element.
T | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (T &max, T &min) const
return biggest and smallest entry
T | GetMean () const
Returns the mean value of the matrix elements.
T | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< T > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
T | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
T | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
void | SetCol (const int row, const Vector< T > &data)
set a col of matrix from vector
void | SetRow (const int row, const Vector< T > &data)
set a row of matrix from vector
T | Trace () const
Scaling and Normalization
T Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
void | ScaleCol (int NoCol, T scale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, T scale)
Scales row NoRow with scale.
Arithmetic
void | Add (const T &scalar, Matrix< T > &dest) const
implementation
void | AddIP (const Matrix< T > &arg)
Adds arg to this.
void | AddIP (const T &scalar)
in place addition function
void | Divide (const T &scalar, Matrix< T > &dest) const
division function, storing data destination matrix
void | DivideIP (const T &scalar)
in place division function
void | GetSystemMatrix (Matrix< T > &dest) const
compute square system matrix dest = A^T * A
void | Mult (const Vector< T > &arg, Vector< T > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< T > &arg, Matrix< T > &result) const
matrix multiplication, result is not allocated
void | Multiply (const T &scalar, Matrix< T > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const T &scalar)
in place multiplication function
void | MultLeft (const Vector< T > &arg, Vector< T > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
void | Sub (const T &scalar, Matrix< T > &dest) const
substraction function, storing data destination matrix
void | SubIP (const T &scalar)
in place subtraction function
void | SubIP (const Matrix< T > &arg)
Subtracts arg from this
this -= arg.
Input / Output
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
bool | Load (const std::string &filename)
method to load directly from a given filename.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
Set Functions
void | Fill (const T &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
void SetZero ()
Sets all values to zero.
Get Functions
Vector< T > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
T * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
T ** | GetDataArray () const
returns zero based arry for data access
T ** | GetDataArray1 () const
returns 1 based array to data access
T * | GetDataLast () const
Get a pointer to the last data element.
T | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (T &max, T &min) const
return biggest and smallest entry
T | GetMean () const
Returns the mean value of the matrix elements.
T | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< T > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
T | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
T | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
void | SetCol (const int row, const Vector< T > &data)
set a col of matrix from vector
void | SetRow (const int row, const Vector< T > &data)
set a row of matrix from vector
T | Trace () const
Scaling and Normalization
T Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
void | ScaleCol (int NoCol, T scale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, T scale)
Scales row NoRow with scale.
Arithmetic
void | Add (const T &scalar, Matrix< T > &dest) const
implementation
void | AddIP (const Matrix< T > &arg)
Adds arg to this.
void | AddIP (const T &scalar)
in place addition function
void | Divide (const T &scalar, Matrix< T > &dest) const
division function, storing data destination matrix
void | DivideIP (const T &scalar)
in place division function
void | GetSystemMatrix (Matrix< T > &dest) const
compute square system matrix dest = A^T * A
void | Mult (const Vector< T > &arg, Vector< T > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< T > &arg, Matrix< T > &result) const
matrix multiplication, result is not allocated
void | Multiply (const T &scalar, Matrix< T > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const T &scalar)
in place multiplication function
void | MultLeft (const Vector< T > &arg, Vector< T > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
void | Sub (const T &scalar, Matrix< T > &dest) const
substraction function, storing data destination matrix
void | SubIP (const T &scalar)
in place subtraction function
void | SubIP (const Matrix< T > &arg)
Subtracts arg from this
this -= arg.
Input / Output
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
bool | Load (const std::string &filename)
method to load directly from a given filename.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
Set Functions
void | Fill (const T &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
void SetZero ()
Sets all values to zero.
Get Functions
Vector< T > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
T * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
T ** | GetDataArray () const
returns zero based arry for data access
T ** | GetDataArray1 () const
returns 1 based array to data access
T * | GetDataLast () const
Get a pointer to the last data element.
T | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (T &max, T &min) const
return biggest and smallest entry
T | GetMean () const
Returns the mean value of the matrix elements.
T | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< T > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
T | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
T | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
void | SetCol (const int row, const Vector< T > &data)
set a col of matrix from vector
void | SetRow (const int row, const Vector< T > &data)
set a row of matrix from vector
Scaling and Normalization
T Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
void | ScaleCol (int NoCol, T scale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, T scale)
Scales row NoRow with scale.
Arithmetic
void | Add (const T &scalar, Matrix< T > &dest) const
implementation
void | AddIP (const Matrix< T > &arg)
Adds arg to this.
void | AddIP (const T &scalar)
in place addition function
void | Divide (const T &scalar, Matrix< T > &dest) const
division function, storing data destination matrix
void | DivideIP (const T &scalar)
in place division function
void | GetSystemMatrix (Matrix< T > &dest) const
compute square system matrix dest = A^T * A
void | Mult (const Vector< T > &arg, Vector< T > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< T > &arg, Matrix< T > &result) const
matrix multiplication, result is not allocated
void | Multiply (const T &scalar, Matrix< T > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const T &scalar)
in place multiplication function
void | MultLeft (const Vector< T > &arg, Vector< T > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
void | Sub (const T &scalar, Matrix< T > &dest) const
substraction function, storing data destination matrix
void | SubIP (const T &scalar)
in place subtraction function
void | SubIP (const Matrix< T > &arg)
Subtracts arg from this
this -= arg.
Input / Output
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
bool | Load (const std::string &filename)
method to load directly from a given filename.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
Set Functions
void | Fill (const T &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
void SetZero ()
Sets all values to zero.
Get Functions
Vector< T > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
T * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
T ** | GetDataArray () const
returns zero based arry for data access
T ** | GetDataArray1 () const
returns 1 based array to data access
T * | GetDataLast () const
Get a pointer to the last data element.
T | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (T &max, T &min) const
return biggest and smallest entry
T | GetMean () const
Returns the mean value of the matrix elements.
T | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< T > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
T | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
T | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
void | SetCol (const int row, const Vector< T > &data)
set a col of matrix from vector
void | SetRow (const int row, const Vector< T > &data)
set a row of matrix from vector
T | Trace () const
Scaling and Normalization
T Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
void | ScaleCol (int NoCol, T scale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, T scale)
Scales row NoRow with scale.
Arithmetic
void | Add (const T &scalar, Matrix< T > &dest) const
implementation
void | AddIP (const Matrix< T > &arg)
Adds arg to this.
void | AddIP (const T &scalar)
in place addition function
void | Divide (const T &scalar, Matrix< T > &dest) const
division function, storing data destination matrix
void | DivideIP (const T &scalar)
in place division function
void | GetSystemMatrix (Matrix< T > &dest) const
compute square system matrix dest = A^T * A
void | Mult (const Vector< T > &arg, Vector< T > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< T > &arg, Matrix< T > &result) const
matrix multiplication, result is not allocated
void | Multiply (const T &scalar, Matrix< T > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const T &scalar)
in place multiplication function
void | MultLeft (const Vector< T > &arg, Vector< T > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< T > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
void | Sub (const T &scalar, Matrix< T > &dest) const
substraction function, storing data destination matrix
void | SubIP (const T &scalar)
in place subtraction function
void | SubIP (const Matrix< T > &arg)
Subtracts arg from this
this -= arg.
Input / Output
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
bool | Load (const std::string &filename)
method to load directly from a given filename.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
Set Functions
void | Fill (const T &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
void SetZero ()
Sets all values to zero.
Get Functions
Vector< T > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
T * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
T ** | GetDataArray () const
returns zero based arry for data access
T ** | GetDataArray1 () const
returns 1 based array to data access
T * | GetDataLast () const
Get a pointer to the last data element.
T | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (T &max, T &min) const
return biggest and smallest entry
T | GetMean () const
Returns the mean value of the matrix elements.
T | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< T > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
T | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
T | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
void | SetCol (const int row, const Vector< T > &data)
set a col of matrix from vector
void | SetRow (const int row, const Vector< T > &data)
set a row of matrix from vector
T | Trace () const
Scaling and Normalization
T Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
void | ScaleCol (int NoCol, T scale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, T scale)
Scales row NoRow with scale.

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator * (const Matrix3x3< T > &argLeft, const Matrix< T > &argMat)
Matrix< T > | operator * (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator * (const Matrix< T > &mat, const T &scalar)
Matrix4x4< T > | operator * (const Matrix4x4< T > &mat, const Matrix4x4< T > &argMat)
Matrix< T > & | operator *= (Matrix< T > &mat, const T &scalar)
bool | operator!= (const Matrix< T > &argl, const Matrix< T > &argr)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator+ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator+= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > & | operator+= (Matrix< T > &mat, const T &scalar)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const T &scalar, const Matrix< T > &mat)
Matrix< T > | operator- (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator-= (Matrix< T > &mat, const Matrix< T > &arg)
Matrix< T > | operator/ (const Matrix< T > &mat, const T &scalar)
Matrix< T > & | operator/= (Matrix< T > &mat, const T &scalar)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
bool | operator== (const Matrix< T > &argl, const Matrix< T > &argr)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

template<class T = double>
class BIAS::Matrix4x4< T >

is a 'fixed size' quadratic matrix of dim.

4 x 4 which is templated over the element-type

Author:
Jan Woetzel, (04/17/2002)

Definition at line 55 of file Matrix4x4.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

template<class T = double>
BIAS::Matrix4x4< T >::Matrix4x4 ( ) [inline]

default constructor

template<class T>
BIAS::Matrix4x4< T >::Matrix4x4 ( const std::string & s ) [explicit]

JW.

Definition at line 40 of file Matrix4x4.cpp.

template<class T>
BIAS::Matrix4x4< T >::Matrix4x4 | ( | const T | a0,
 |  | const T | a1,
 |  | const T | a2,
 |  | const T | a3,
 |  | const T | a4,
 |  | const T | a5,
 |  | const T | a6,
 |  | const T | a7,
 |  | const T | a8,
 |  | const T | a9,
 |  | const T | a10,
 |  | const T | a11,
 |  | const T | a12,
 |  | const T | a13,
 |  | const T | a14,
 |  | const T | a15
 | ) |

Set the matrix values JW.

Definition at line 47 of file Matrix4x4.cpp.

References BIAS::Matrix< T >::GetData().

template<class T = double>
BIAS::Matrix4x4< T >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit]

init matrix with identity or zero

Author:
koeser

template<class T = double>
BIAS::Matrix4x4< T >::Matrix4x4 ( const Matrix4x4< T > & A ) [inline]

template<class T>
BIAS::Matrix4x4< T >::Matrix4x4 ( const Matrix< T > & arg )

Definition at line 77 of file Matrix4x4.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
BIAS::Matrix4x4< T >::Matrix4x4 ( const TNT::Matrix< T > & A )

cast constructor from TNT::Matrix

Definition at line 86 of file Matrix4x4.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
BIAS::Matrix4x4< T >::Matrix4x4 | ( | const Matrix3x3< T > & | R,
 |  | const Vector3< T > & | trans
 | ) |

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

Definition at line 116 of file Matrix4x4.cpp.

References T.

template<class T>
BIAS::Matrix4x4< T >::~Matrix4x4 ( ) [virtual]

destructor untested (04/17/2002)

Definition at line 35 of file Matrix4x4.cpp.

Member Function Documentation

template<class T>
void BIAS::Matrix< T >::Add | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

Definition at line 532 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator+().

template<class T>
void BIAS::Matrix< T >::AddIP ( const Matrix< T > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

Definition at line 736 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
void BIAS::Matrix< T >::AddIP ( const T & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator+=(), and BIAS::Matrix< T >::operator-=().

template<class T>
bool BIAS::Matrix< T >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 340 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
bool BIAS::Matrix< T >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

Definition at line 375 of file Matrix.cpp.

References TNT::Matrix< T >::m_, TNT::Matrix< T >::n_, and T.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T = double>
T BIAS::Matrix4x4< T >::det ( ) const [inline]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

template<class T>
void BIAS::Matrix< T >::Divide | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 570 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator/().

template<class T = double>
void BIAS::Matrix< T >::DivideIP ( const T & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::operator/=().

template<class T>
void BIAS::Matrix< T >::Fill ( const T & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Definition at line 50 of file Matrix.cpp.

References TNT::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::Decompose_(), BIAS::Interpolator::InitBezier(), BIAS::Interpolator::InitSpline3(), BIAS::PMatrix::InvalidateDecomposition(), and main().

template<class T>
Vector< T > BIAS::Matrix< T >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

Definition at line 190 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::EMatrix::GetRotationTranslation(), and BIAS::Matrix< T >::NormalizeCols().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T = double>
T* BIAS::Matrix< T >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::Add(), BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), BIAS::Matrix3x3< T >::det(), BIAS::Matrix2x2< T >::det(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), Fortran_Matrix_to_Matrix(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_(), BIAS::Tensor3D3x3x3< T >::GetMatrices(), BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::CovMatrix3x3::GetPCA(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix3x3< T >::GetRow(), BIAS::CovMatrix3x3::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Matrix3x3< T >::Invert(), BIAS::Matrix3x3< T >::InvertIP(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Matrix3x4< T >::Matrix3x4(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix3x3< T >::MaxMin(), BIAS::Matrix4x4< PMATRIX_TYPE >::Mult(), BIAS::Matrix3x4< T >::Mult(), BIAS::Matrix3x3< T >::Mult(), BIAS::Matrix2x2< T >::Mult(), BIAS::Matrix2x2< T >::MultIP(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix2x2< T >::MultLeft(), MyLinTransform(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix2x2< T >::operator *(), BIAS::Matrix2x2< T >::operator=(), BIAS::AffineTransf::operator=(), BIAS::Matrix< T >::operator==(), BIAS::operator==(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Matrix3x3< T >::Scale(), BIAS::EuclideanTransf3D::Set(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Tensor3D3x3x3< T >::SetFromMatrices(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::Matrix3x4< T >::SetIdentity(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix2x2< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBase< StorageType >::Track(), BIAS::Matrix3x3< T >::Transpose(), BIAS::Matrix2x2< T >::Transpose(), BIAS::Vector4< T >::transposed(), BIAS::Matrix3x3< T >::TransposedMult(), BIAS::Matrix3x3< T >::TransposeIP(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::PMatrix::XMLIn(), BIAS::ProjectionParametersProjective::XMLOut(), and BIAS::PMatrix::XMLOut().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

Referenced by BIAS::PMatrixLinear::GetPEstSystemInHom().

template<class T = double>
T** BIAS::Matrix< T >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

Referenced by BIAS::SVD3x3::Compute().

template<class T = double>
T* BIAS::Matrix< T >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMax(), BIAS::Matrix< T >::GetMaxMin(), BIAS::Matrix< T >::GetMean(), BIAS::Matrix< T >::GetMin(), BIAS::Matrix< T >::NormL1(), BIAS::Matrix< T >::NormL2(), BIAS::Matrix< T >::operator==(), and BIAS::Matrix< T >::SetZero().

template<class T>
T BIAS::Matrix< T >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 275 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
void BIAS::Matrix< T >::GetMaxMin | ( | T & | max,
 |  | T & | min
 | ) | const [inherited]

return biggest and smallest entry

Definition at line 289 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 299 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), BIAS::Matrix< T >::GetNumElements(), and T.

template<class T>
T BIAS::Matrix< T >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 249 of file Matrix.cpp.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T = double>
int BIAS::Matrix< T >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Referenced by BIAS::Matrix< T >::GetMean().

template<class T>
Vector< T > BIAS::Matrix< T >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Definition at line 171 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by DistanceFromRotation4Var(), BIAS::Quadric3D::GetSignature(), BIAS::Matrix< T >::NormalizeRows(), and BIAS::Triangulation::TriangulateLinear().

template<class T = double>
unsigned int BIAS::Matrix< T >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

Referenced by _am_gauss_jordan_elimination(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Pose::SetCovariance(), BIAS::Pose::SetCovEuclidian(), BIAS::MatrixPanel::SetMatrix(), BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class T>
void BIAS::Matrix< T >::GetSystemMatrix ( Matrix< T > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

Definition at line 778 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), TNT::Matrix< T >::row_, and T.

Referenced by BIAS::SVD::Solve().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
bool BIAS::Matrix< T >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 444 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::TrifocalTensor::Compose().

template<class T>
bool BIAS::Matrix< T >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 413 of file Matrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by main(), MatrixSqrt(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::CoordinateTransform3D, BIAS::PMatrix, and BIAS::Pose.

Definition at line 312 of file Matrix.cpp.

Referenced by main().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 690 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::Mult ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

Definition at line 676 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::Mult | ( | const Matrix< T > & | arg,
 |  | Matrix< T > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

Definition at line 650 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::MultLeft(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T = double>
void BIAS::Matrix4x4< T >::Mult | ( | const Matrix4x4< T > & | argmat,
 |  | Matrix4x4< T > & | destmat
 | ) | const [inline]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

template<class T = double>
void BIAS::Matrix4x4< T >::Mult | ( | const Vector4< T > & | argvec,
 |  | Vector4< T > & | destvec
 | ) | const [inline]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

Referenced by BIAS::Matrix4x4< T >::operator *(), and BIAS::Vector4< T >::operator *().

template<class T>
void BIAS::Matrix< T >::Multiply | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 558 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator *().

template<class T = double>
void BIAS::Matrix< T >::MultiplyIP ( const T & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

Referenced by BIAS::Conic2D::GetTangentPoints(), and BIAS::Matrix< T >::operator *=().

template<class T>
void BIAS::Matrix< T >::MultLeft | ( | const Vector< T > & | arg,
 |  | Vector< T > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

Definition at line 712 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::MultLeft ( const Matrix< T > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

Definition at line 683 of file Matrix.hh.

References BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Conic2D::GetTangentPoints().

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
Matrix4x4< T > & BIAS::Matrix4x4< T >::newsize | ( | int | rows,
 |  | int | cols
 | ) |

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

Definition at line 95 of file Matrix4x4.cpp.

References BIASASSERT, and BIASERR.

template<class T>
T BIAS::Matrix< T >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::Conic2D, BIAS::PMatrix, and BIAS::Quadric3D.

Definition at line 263 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by main(), and BIAS::ProjectionParametersPerspective::ViewDifference().

template<class T>
void BIAS::Matrix< T >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

Definition at line 142 of file Matrix.cpp.

References BIAS::Matrix< T >::GetCol(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
void BIAS::Matrix< T >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

Definition at line 57 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
void BIAS::Matrix< T >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

Definition at line 131 of file Matrix.cpp.

References BIAS::Matrix< T >::GetRow(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Triangulation::TriangulateLinear().

template<class T>
void BIAS::Matrix< T >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

Definition at line 96 of file Matrix.cpp.

References BIASERR, and TNT::Matrix< T >::num_cols().

template<class T>
T BIAS::Matrix< T >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

Definition at line 625 of file Matrix.hh.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotation(), BIAS::EMatrix::InitFromF(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
T BIAS::Matrix< T >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 605 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
T BIAS::Matrix< T >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

Definition at line 615 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
Matrix4x4< T > & BIAS::Matrix4x4< T >::operator= ( const Matrix< T > & mat )

assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate

Author:
Jan Woetzel untested (02/25/2002)

Reimplemented from BIAS::Matrix< T >.

Reimplemented in BIAS::Quadric3D.

Definition at line 61 of file Matrix4x4.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

template<class T>
bool BIAS::Matrix< T >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Definition at line 326 of file Matrix.cpp.

template<class T>
void BIAS::Matrix< T >::ScaleCol | ( | int | NoCol,
 |  | T | scale
 | ) | [inherited]

Scales column NoCol with scale.

Definition at line 162 of file Matrix.cpp.

References TNT::Matrix< T >::num_rows().

template<class T>
void BIAS::Matrix< T >::ScaleRow | ( | int | NoRow,
 |  | T | scale
 | ) | [inherited]

Scales row NoRow with scale.

Definition at line 153 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols().

Referenced by BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void BIAS::Matrix< T >::SetCol | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

Definition at line 213 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_cols(), and TNT::Vector< T >::size().

template<class T = double>
void BIAS::Matrix4x4< T >::SetIdentity ( ) [inline]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< T >.

Definition at line 261 of file Matrix4x4.hh.

Referenced by BIAS::GeometryGL::CreateTextureMatrix(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

template<class T>
void BIAS::Matrix< T >::SetRow | ( | const int | row,
 |  | const Vector< T > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

Definition at line 203 of file Matrix.cpp.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().

template<class T>
void BIAS::Matrix< T >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 598 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), and T.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::Decompose_(), BIAS::Triangulation::GetCovariance2D(), BIAS::RigParameter::GetKMatrix(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Camera< StorageType >::Init_(), BIAS::SVD::Invert(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2(), BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3(), BIAS::Matrix3x3< T >::LoadBogRC(), main(), BIAS::Quadric3D::Quadric3D(), BIAS::MatchDataBase::Reset(), BIAS::Pose::Set(), BIAS::Pose::SetC(), BIAS::Pose::SetCovariance(), BIAS::PoseParametrization::SetOrientation(), BIAS::PoseParametrization::SetPosition(), BIAS::Pose::SetQ(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::UnscentedTransform::Transform().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
void BIAS::Matrix< T >::Sub | ( | const T & | scalar,
 |  | Matrix< T > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

Definition at line 545 of file Matrix.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by BIAS::Matrix< T >::operator-().

template<class T = double>
void BIAS::Matrix< T >::SubIP ( const T & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

template<class T>
void BIAS::Matrix< T >::SubIP ( const Matrix< T > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Definition at line 757 of file Matrix.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Matrix< T >::operator-=().

template<class T>
T BIAS::Matrix< T >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< T >, BIAS::CovMatrix3x3, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 641 of file Matrix.hh.

References BIASASSERT, TNT::Matrix< T >::num_rows(), and T.

template<class T>
Matrix< T > BIAS::Matrix< T >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix2x2< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< KLT_TYPE >, BIAS::Matrix3x3< double >, BIAS::Matrix3x3< COVMATRIX3X3_TYPE >, BIAS::Matrix3x3< FMATRIX_TYPE >, BIAS::Matrix3x3< HMATRIX_TYPE >, BIAS::Matrix3x3< KMATRIX_TYPE >, BIAS::Matrix3x3< CONIC2D_TYPE >, BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >, and BIAS::Matrix3x3< EMATRIX_TYPE >.

Definition at line 588 of file Matrix.hh.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrixEstimation::FindClosestP2(), BIAS::EMatrix::GetRotationTranslation(), BIAS::SVD::GetV(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::CoordinateTransform3D::LocalToGlobal(), main(), BIAS::Kalman::Predict(), BIAS::Quadric3D::Quadric3D(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::Conic2D::SetQuadricProjection(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::LeastSquaresLapack::Solve(), BIAS::PoseParametrizationCovariance::Transform(), BIAS::FilterMask::Transpose(), BIAS::LeastSquaresSVD::WeightedSolve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T = double>
void BIAS::Matrix4x4< T >::TransposeIP ( ) [inline]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const Matrix3x3< T > & | argLeft,
 |  | const Matrix< T > & | argMat
 | ) | [related, inherited]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, tested (04/17/2002)

Definition at line 673 of file Operators.hh.

References TNT::matmult().

template<class T = double>
Matrix< T > operator * | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 499 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix< T > operator * | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 494 of file Operators.hh.

References BIAS::Matrix< T >::Multiply(), and res.

template<class T = double>
Matrix4x4< T > operator * | ( | const Matrix4x4< T > & | mat,
 |  | const Matrix4x4< T > & | argMat
 | ) | [related]

matrix-matrix multiplication using 'Mult'

Author:
Jan Woetzel, status untested (04/17/2002)

Definition at line 682 of file Operators.hh.

References BIAS::Matrix4x4< T >::Mult().

template<class T = double>
Matrix< T > & operator *= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

multiplication operator

Author:
Ingo Thomsen

Definition at line 498 of file Matrix.hh.

References BIAS::Matrix< T >::MultiplyIP().

template<class T = double>
bool operator!= | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for not equal

Author:
Ingo Thomsen (07/02/2002)

Definition at line 524 of file Matrix.hh.

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator+ | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 475 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > operator+ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator, returning new matrix

Author:
Ingo Thomsen, woelk

Definition at line 470 of file Operators.hh.

References BIAS::Matrix< T >::Add(), and res.

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

addition in place operator

Author:
grest

Definition at line 477 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator+= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

addition operator

Author:
Ingo Thomsen

Definition at line 470 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T = double>
Matrix< T > operator- | ( | const T & | scalar,
 |  | const Matrix< T > & | mat
 | ) | [related, inherited]

Definition at line 487 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > operator- | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 482 of file Operators.hh.

References res, and BIAS::Matrix< T >::Sub().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

substraction operator

Author:
Ingo Thomsen

Definition at line 491 of file Matrix.hh.

References BIAS::Matrix< T >::AddIP().

template<class T = double>
Matrix< T > & operator-= | ( | Matrix< T > & | mat,
 |  | const Matrix< T > & | arg
 | ) | [related, inherited]

subtracts arg from mat, mat = mat - arg

Author:
grest

Definition at line 484 of file Matrix.hh.

References BIAS::Matrix< T >::SubIP().

template<class T = double>
Matrix< T > operator/ | ( | const Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator, returning new matrix

Author:
Ingo Thomsen

Definition at line 506 of file Operators.hh.

References BIAS::Matrix< T >::Divide(), and res.

template<class T = double>
Matrix< T > & operator/= | ( | Matrix< T > & | mat,
 |  | const T & | scalar
 | ) | [related, inherited]

division operator

Author:
Ingo Thomsen

Definition at line 513 of file Operators.hh.

References BIAS::Matrix< T >::DivideIP().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T = double>
bool operator== | ( | const Matrix< T > & | argl,
 |  | const Matrix< T > & | argr
 | ) | [related, inherited]

operator for equal

Author:
Ingo Thomsen (07/02/2002) tested

Definition at line 509 of file Matrix.hh.

References BIASASSERT, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataLast(), TNT::Matrix< T >::size(), and T.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Matrix4x4.hh
  • Base/Math/Matrix4x4.cpp
  • Base/Math/Operators.hh
Generated on Wed Jun 21 19:08:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MatrixPanel Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MatrixPanel

BIAS::MatrixPanel Class Reference

Panel for displaying and editing matrices. More...

#include <Gui/ProjectionGUI.hh>

List of all members.

Public Member Functions

Matrix< double > | GetMatrix ()
MatrixPanel (wxWindow *parent, wxWindowID id, bool editable)
void | SetMatrix (const Matrix< double > &matrix)

Private Attributes

int | cols_
std::vector< wxTextCtrl * > | controls_
bool | editable_
int | rows_

Detailed Description

Panel for displaying and editing matrices.

Author:
jkollmann

Definition at line 35 of file ProjectionGUI.hh.

Constructor & Destructor Documentation

MatrixPanel::MatrixPanel | ( | wxWindow * | parent,
 |  | wxWindowID | id,
 |  | bool | editable
 | ) |

Definition at line 67 of file ProjectionGUI.cpp.

References editable_.

Member Function Documentation

Matrix< double > MatrixPanel::GetMatrix ( )

Definition at line 111 of file ProjectionGUI.cpp.

References cols_, controls_, rows_, and WxToAscii.

void MatrixPanel::SetMatrix ( const Matrix< double > & matrix )

Definition at line 73 of file ProjectionGUI.cpp.

References cols_, controls_, editable_, BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), and rows_.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

Member Data Documentation

int BIAS::MatrixPanel::cols_ [private]

Definition at line 44 of file ProjectionGUI.hh.

Referenced by GetMatrix(), and SetMatrix().

std::vector<wxTextCtrl*> BIAS::MatrixPanel::controls_ [private]

Definition at line 45 of file ProjectionGUI.hh.

Referenced by GetMatrix(), and SetMatrix().

bool BIAS::MatrixPanel::editable_ [private]

Definition at line 43 of file ProjectionGUI.hh.

Referenced by MatrixPanel(), and SetMatrix().

int BIAS::MatrixPanel::rows_ [private]

Definition at line 44 of file ProjectionGUI.hh.

Referenced by GetMatrix(), and SetMatrix().

The documentation for this class was generated from the following files:
  • Gui/ProjectionGUI.hh
  • Gui/ProjectionGUI.cpp
Generated on Wed Jun 21 19:08:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MDcam Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MDcam

BIAS::MDcam Class Reference

VideoG MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster. More...

#include <VideoSource/MDcam.hh>

Inheritance diagram for BIAS::MDcam:

[legend]
Collaboration diagram for BIAS::MDcam:

[legend]
List of all members.

Public Member Functions

void ActivateScorpionTimestamp ()
void | AddDebugLevel (long int lv)
int | AutoMode (int feature, bool on)
bool | DebugLevelIsSet (long int lv) const
int | EqualizeFeature (int master, int feature)
Read.
int | ExternalTrigger (bool on, bool active)
if on==true && active=true try to open parport at ParPort_, if it fails, return -1 else set cameras to external trigger mode if on==false set cameras to internal trigger mode if active==true est cameras into external trigger mode but ignore parport
VideoSource_DCAM * | GetCamera (int n)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
float | GetGain ()
int | GetID (int i)
int | GetNumCams ()
float | GetShutter ()
int | GrabSingle (BIAS::Camera< unsigned char > *Image)
The size of the array MUST be the numaber of cameras.
int | InitCameras (const std::string filename)
MDcam ()
int | OnePushAuto (int feature)
int | PostGrab ()
int | PreGrab ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | ReleaseCameras ()
void | RemoveDebugLevel (long int lv)
int | ScanBus (int bus, std::ofstream &ofs)
int | SetCamera (CameraParameterSet camparam)
void | SetDebugLevel (long int lv)
void | SetDebugLevelDcam (int d)
void | SetDebugStream (std::ostream &os)
int | SetFeature (int feature, unsigned int value)
void | SetFps (float fps)
int | SetGain (float g)
int | SetShutter (float exptime)
~MDcam ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
bool | ActiveTrigger_
VideoSource_DCAM ** Camera_
int | DebuglevelDcam_
bool | ExternalTrigger_
float | Fps_
int | NumCams_
unsigned long | ParPort_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

VideoG MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster.

Author:
evers

Definition at line 59 of file MDcam.hh.

Constructor & Destructor Documentation

MDcam::MDcam ( )

Definition at line 37 of file MDcam.cpp.

References ActiveTrigger_, Camera_, ExternalTrigger_, NumCams_, and ParPort_.

MDcam::~MDcam ( )

Definition at line 49 of file MDcam.cpp.

References NumCams_, and ReleaseCameras().

Member Function Documentation

void MDcam::ActivateScorpionTimestamp ( )

Activates the timestamp for PointGrey Scorpion SCOR-20SO

Definition at line 188 of file MDcam.cpp.

References BIAS::VideoSource_DCAM::ActivateScorpionTimestamp(), Camera_, and NumCams_.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int MDcam::AutoMode | ( | int | feature,
 |  | bool | on
 | ) |

Definition at line 293 of file MDcam.cpp.

References BIAS::VideoSource_DCAM::AutoMode(), Camera_, and NumCams_.

Referenced by MyFrame::OnAutoExposure().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int MDcam::EqualizeFeature | ( | int | master,
 |  | int | feature
 | ) |

Read.

Parameters:
feature | from
master | and distributed it to all

Definition at line 339 of file MDcam.cpp.

References Camera_, BIAS::VideoSource_DCAM::GetFeature(), NumCams_, and BIAS::VideoSource_DCAM::SetFeature().

int MDcam::ExternalTrigger | ( | bool | on,
 |  | bool | active
 | ) |

if on==true && active=true try to open parport at ParPort_, if it fails, return -1 else set cameras to external trigger mode if on==false set cameras to internal trigger mode if active==true est cameras into external trigger mode but ignore parport

Definition at line 313 of file MDcam.cpp.

References ActiveTrigger_, BIASERR, Camera_, BIAS::VideoSource_DCAM::ExternalTrigger(), ExternalTrigger_, NumCams_, and ParPort_.

VideoSource_DCAM* BIAS::MDcam::GetCamera ( int n ) [inline]

Definition at line 117 of file MDcam.hh.

References Camera_.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

float BIAS::MDcam::GetGain ( ) [inline]

Definition at line 94 of file MDcam.hh.

References Camera_, and BIAS::VideoSource_DCAM::GetGain().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::MDcam::GetID ( int i ) [inline]

Definition at line 118 of file MDcam.hh.

References Camera_, BIAS::VideoSource::GetID(), and NumCams_.

int BIAS::MDcam::GetNumCams ( ) [inline]

Definition at line 115 of file MDcam.hh.

References NumCams_.

float BIAS::MDcam::GetShutter ( ) [inline]

Definition at line 91 of file MDcam.hh.

References Camera_, and BIAS::VideoSource_DCAM::GetShutter().

int MDcam::GrabSingle ( BIAS::Camera< unsigned char > * Image )

The size of the array MUST be the numaber of cameras.

Definition at line 222 of file MDcam.cpp.

References ActiveTrigger_, Camera_, ExternalTrigger_, BIAS::VideoSource_DCAM::GrabSingle(), NumCams_, ParPort_, and BIAS::Camera< StorageType >::SetASCIIString().

Referenced by main().

int BIAS::MDcam::InitCameras ( const std::string filename )

Referenced by main().

int MDcam::OnePushAuto ( int feature )

Definition at line 303 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::OnePushAuto().

int MDcam::PostGrab ( )

Definition at line 209 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::PostGrab().

Referenced by main().

int MDcam::PreGrab ( )

Definition at line 195 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::PreGrab().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int MDcam::ReleaseCameras ( )

Definition at line 171 of file MDcam.cpp.

References BIASERR, Camera_, BIAS::VideoSource_DCAM::CloseDevice(), and NumCams_.

Referenced by main(), and ~MDcam().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int MDcam::ScanBus | ( | int | bus,
 |  | std::ofstream & | ofs
 | ) |

Definition at line 65 of file MDcam.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource_DCAM::CloseDevice(), D_MDCAM_INIT, DebuglevelDcam_, GetCamIDs(), BIAS::VideoSource::GetHeight(), BIAS::VideoSource::GetWidth(), BIAS::VideoSource_DCAM::OpenDevice(), BIAS::Debug::SetDebugLevel(), and BIAS::VideoSource::SetSize().

Referenced by main().

int MDcam::SetCamera ( CameraParameterSet camparam )

Definition at line 351 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::SetCamera().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), ScanBus(), SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void MDcam::SetDebugLevelDcam ( int d )

Definition at line 57 of file MDcam.cpp.

References Camera_, DebuglevelDcam_, NumCams_, and BIAS::Debug::SetDebugLevel().

Referenced by main().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int MDcam::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) |

Definition at line 261 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::SetFeature().

void BIAS::MDcam::SetFps ( float fps ) [inline]

Definition at line 97 of file MDcam.hh.

References Fps_.

Referenced by main().

int MDcam::SetGain ( float g )

Definition at line 271 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::SetGain().

Referenced by MyFrame::OnGain().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int MDcam::SetShutter ( float exptime )

Definition at line 281 of file MDcam.cpp.

References Camera_, NumCams_, and BIAS::VideoSource_DCAM::SetShutter().

Referenced by MyFrame::OnShutter().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::MDcam::ActiveTrigger_ [protected]

Definition at line 136 of file MDcam.hh.

Referenced by ExternalTrigger(), GrabSingle(), and MDcam().

VideoSource_DCAM** BIAS::MDcam::Camera_ [protected]

Definition at line 133 of file MDcam.hh.

Referenced by ActivateScorpionTimestamp(), AutoMode(), EqualizeFeature(), ExternalTrigger(), GetCamera(), GetGain(), GetID(), GetShutter(), GrabSingle(), MDcam(), OnePushAuto(), PostGrab(), PreGrab(), ReleaseCameras(), SetCamera(), SetDebugLevelDcam(), SetFeature(), SetGain(), and SetShutter().

int BIAS::MDcam::DebuglevelDcam_ [protected]

Definition at line 130 of file MDcam.hh.

Referenced by ScanBus(), and SetDebugLevelDcam().

bool BIAS::MDcam::ExternalTrigger_ [protected]

Definition at line 135 of file MDcam.hh.

Referenced by ExternalTrigger(), GrabSingle(), and MDcam().

float BIAS::MDcam::Fps_ [protected]

Definition at line 123 of file MDcam.hh.

Referenced by SetFps().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int BIAS::MDcam::NumCams_ [protected]

Definition at line 134 of file MDcam.hh.

Referenced by ActivateScorpionTimestamp(), AutoMode(), EqualizeFeature(), ExternalTrigger(), GetID(), GetNumCams(), GrabSingle(), MDcam(), OnePushAuto(), PostGrab(), PreGrab(), ReleaseCameras(), SetCamera(), SetDebugLevelDcam(), SetFeature(), SetGain(), SetShutter(), and ~MDcam().

unsigned long BIAS::MDcam::ParPort_ [protected]

Definition at line 139 of file MDcam.hh.

Referenced by ExternalTrigger(), GrabSingle(), and MDcam().

The documentation for this class was generated from the following files:
  • VideoSource/MDcam.hh
  • VideoSource/MDcam.cpp
Generated on Wed Jun 21 19:08:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Mean< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Mean

BIAS::Mean< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations, Image Filters and Image Transformations]

deinterlacer filter More...

#include <Filter/Mean.hh>

Inheritance diagram for BIAS::Mean< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Mean< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | CalculationInFloat () const
decides if calculation is done in integer or floating point
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
averages over a region with constant weights
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
only calls filter, for consistency of params
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
only calls filter, for consistency of params
int | FilterMean (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
deprecated
int | FilterMean2x2 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst width = src width - 1, dst height = src height - 1
int | FilterMean2x2Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
dst must be initialized: dst width = src width - 1, dst height = src height - 1 Does support ROI.
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetKernel (FilterMask &fm) const
get the current filter mask
int | GetSize () const
int * | GetSizePointer ()
Mean (const Mean< InputStorageType, OutputStorageType > &m)
Mean (Param &para, const int group_id, const std::string &postfix)
Mean (Param &para, const std::string &postfix="")
Mean ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | PrintKernel () const
prints the used filter mask, for debugging
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKernel (FilterMask &fm)
set a new filter mask
void | SetSize (const int size)
~Mean ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int group_id, const std::string &postfix)
void _SetKernel ()
sets the vector members of Convolution
int | ConvFloatHori_ (const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst)
worker function for float separated (horizontal) convolution
int | ConvFloatMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for float matrix convolution
int | ConvFloatVert_ (const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst)
worker function for float separated (vertical) convolution
int | ConvIntHori_ (const Image< InputStorageType > &src, Image< CONV_INT > &dst)
worker function for int separated (horizontal) convolution
int | ConvIntMat_ (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
worker function for int matrix convolution
int | ConvIntVert_ (const Image< CONV_INT > &src, Image< OutputStorageType > &dst)
worker function for int separated (vertical) convolution
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
FilterMask _fm
the kernel data used for convolution
long int | _liDebugLevel
int * | _MeanSize
bool | _ParamsAllocated
Image< CONV_FLOAT > | _tmpFloat
temporary memory, needed for separable filters when float filtering
Image< CONV_INT > | _tmpInt
temporary memory, needed for separable filters when integer filtering

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Mean< InputStorageType, OutputStorageType >

deinterlacer filter

Author:
ischiller 01/2005

Definition at line 41 of file Mean.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Mean::Mean ( )

Definition at line 39 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

template<class InputStorageType, class OutputStorageType>
Mean::Mean | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 49 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
Mean::Mean | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Definition at line 62 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), and BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize.

template<class InputStorageType, class OutputStorageType>
BIAS::Mean< InputStorageType, OutputStorageType >::Mean ( const Mean< InputStorageType, OutputStorageType > & m ) [inline]

Definition at line 50 of file Mean.hh.

template<class InputStorageType, class OutputStorageType>
Mean::~Mean ( )

Definition at line 71 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void Mean::_AddParam | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 206 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::Mean().

template<class InputStorageType, class OutputStorageType>
void Mean::_SetKernel ( ) [protected]

sets the vector members of Convolution

Author:
woelk 09/2004

Definition at line 219 of file Mean.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize, BIAS::FilterMask::ComputeIntPrecisionBits(), CONV_INT, BIAS::FilterMask::CreateIntFilter(), FM_FLOAT, and BIAS::FilterMask::Init().

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::Filter().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
bool BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat ( ) const [inline, inherited]

decides if calculation is done in integer or floating point

Definition at line 104 of file Convolution.hh.

Referenced by BIAS::Convolution< InputStorageType, OutputStorageType >::Filter(), and BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_FLOAT > & | dst
 | ) | [protected, inherited]

worker function for float separated (horizontal) convolution

Definition at line 294 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfh(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float matrix convolution

Definition at line 232 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvFloatVert_ | ( | const Image< CONV_FLOAT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for float separated (vertical) convolution

Definition at line 348 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_FLOAT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntHori_ | ( | const Image< InputStorageType > & | src,
 |  | Image< CONV_INT > & | dst
 | ) | [protected, inherited]

worker function for int separated (horizontal) convolution

Definition at line 115 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetHorizRightShift(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepih(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntMat_ | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int matrix convolution

Definition at line 50 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKerneli(), BIAS::FilterMask::GetKernelRightShift(), BIAS::Matrix< T >::GetRows(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, and kernel.

template<class InputStorageType, class OutputStorageType>
int Convolution::ConvIntVert_ | ( | const Image< CONV_INT > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected, inherited]

worker function for int separated (vertical) convolution

Definition at line 172 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIASCDOUT, CONV_INT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetSepiv(), BIAS::FilterMask::GetVertRightShift(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), KERNCENTER, kernel, max, min, and BIAS::Vector< T >::Size().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Mean::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

averages over a region with constant weights

Author:
woelk 09/2004

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 81 of file Mean.cpp.

References BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize, BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIASCDOUT, D_FILTERBASE_CALLSTACK, BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2(), and res.

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::FilterFloat(), and BIAS::Mean< InputStorageType, OutputStorageType >::FilterInt().

template<class InputStorageType, class OutputStorageType>
int Mean::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

only calls filter, for consistency of params

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 110 of file Mean.cpp.

References BIASERR, and BIAS::Mean< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Mean::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

only calls filter, for consistency of params

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 102 of file Mean.cpp.

References BIASERR, and BIAS::Mean< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Mean::FilterMean | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

deprecated

Author:
woelk 09/2004

Definition at line 118 of file Mean.cpp.

References BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int Mean::FilterMean2x2 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

dst width = src width - 1, dst height = src height - 1

Todo:
support for ROI is still missing.
Author:
woelk 01/2003

Definition at line 181 of file Mean.cpp.

References BIASCDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Mean::FilterMean2x2Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

dst must be initialized: dst width = src width - 1, dst height = src height - 1 Does support ROI.

No specialization for integer data types.

Author:
woelk 09/2004

Definition at line 129 of file Mean.cpp.

References BIASASSERT, BIASCDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), and step().

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void Mean::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Reimplemented from BIAS::Convolution< InputStorageType, OutputStorageType >.

Definition at line 234 of file Mean.cpp.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::GetKernel ( FilterMask & fm ) const [inline, inherited]

get the current filter mask

Definition at line 93 of file Convolution.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::Mean< InputStorageType, OutputStorageType >::GetSize ( ) const [inline]

Definition at line 89 of file Mean.hh.

template<class InputStorageType, class OutputStorageType>
int* BIAS::Mean< InputStorageType, OutputStorageType >::GetSizePointer ( ) [inline]

Definition at line 91 of file Mean.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class InputStorageType, class OutputStorageType>
void Convolution::PrintKernel ( ) const [inherited]

prints the used filter mask, for debugging

Definition at line 582 of file Convolution.cpp.

References BIAS::Convolution< InputStorageType, OutputStorageType >::_fm, BIAS::Convolution< InputStorageType, OutputStorageType >::CalculationInFloat(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), and BIAS::FilterMask::IsSeparable().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Convolution< InputStorageType, OutputStorageType >::SetKernel ( FilterMask & fm ) [inline, inherited]

set a new filter mask

Definition at line 97 of file Convolution.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Mean< InputStorageType, OutputStorageType >::SetSize ( const int size ) [inline]

Definition at line 87 of file Mean.hh.

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
FilterMask BIAS::Convolution< InputStorageType, OutputStorageType >::_fm [protected, inherited]

the kernel data used for convolution

Definition at line 108 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::Gauss< InputStorageType, OutputStorageType >::_CalculateKernels(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntMat_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::Convolution(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter11x11Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter13x13Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter3x3GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter5x5GreyThreshold(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter7x7Grey(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter9x9Grey(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Convolution< InputStorageType, OutputStorageType >::PrintKernel(), and BIAS::Convolution< InputStorageType, OutputStorageType >::~Convolution().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Mean< InputStorageType, OutputStorageType >::_MeanSize [protected]

Definition at line 91 of file Mean.hh.

Referenced by BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_SetKernel(), BIAS::Mean< InputStorageType, OutputStorageType >::Filter(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), and BIAS::Mean< InputStorageType, OutputStorageType >::~Mean().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<CONV_FLOAT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpFloat [protected, inherited]

temporary memory, needed for separable filters when float filtering

Definition at line 115 of file Convolution.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), and BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat().

template<class InputStorageType, class OutputStorageType>
Image<CONV_INT> BIAS::Convolution< InputStorageType, OutputStorageType >::_tmpInt [protected, inherited]

temporary memory, needed for separable filters when integer filtering

Definition at line 118 of file Convolution.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Mean.hh
  • Filter/Mean.cpp
Generated on Wed Jun 21 19:08:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Median< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Median

BIAS::Median< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

2D median filter More...

#include <Filter/Median.hh>

Inheritance diagram for BIAS::Median< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Median< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual function for interface definition
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | FilterIgnoreZero5x5 (Image< InputStorageType > &src, Image< OutputStorageType > &dst)
2D-Median filter, filtersize is 2*halfsize+1 Zero values are ignored src and dst cannot be identical also removes single values in detection window
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | FilterOnlyZeroIgnoreZero3x3 (Image< InputStorageType > &src, Image< OutputStorageType > &dst, const float &Threshold=0.0f)
fill spurious gaps in depth maps
int | FilterOnlyZeroIgnoreZero5x5 (Image< InputStorageType > &src, Image< OutputStorageType > &dst, const float &Threshold=0.0f)
fill spurious gaps in depth maps
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Median ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetSize (int newsize)
NYI InputStorageType Filter(InputStorageType arr[], int n);.
virtual | ~Median ()
NYI Median(Param& para, const int group_id, const std::string& postfix);.

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
int * | _MedianSize
half win size of median, 1 means 3x3
bool | _ParamsAllocated

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Median< InputStorageType, OutputStorageType >

2D median filter

Todo:
reanimate this class using filter interface

Definition at line 41 of file Median.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Median::Median ( )

Definition at line 34 of file Median.cpp.

References BIAS::Median< InputStorageType, OutputStorageType >::_MedianSize, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

template<class InputStorageType, class OutputStorageType>
Median::~Median ( ) [virtual]

NYI Median(Param& para, const int group_id, const std::string& postfix);.

Definition at line 42 of file Median.cpp.

References BIAS::Median< InputStorageType, OutputStorageType >::_MedianSize.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected, inherited]

Reimplemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Median::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

virtual function for interface definition

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Definition at line 59 of file Median.cpp.

References BIAS::Median< InputStorageType, OutputStorageType >::_MedianSize, BIASERR, and BIAS::ImageBase::GetChannelCount().

Referenced by BIAS::Median< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Median< InputStorageType, OutputStorageType >::FilterInt(), and main().

template<class InputStorageType, class OutputStorageType>
int Median::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Definition at line 145 of file Median.cpp.

References BIASERR, and BIAS::Median< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Median::FilterIgnoreZero5x5 | ( | Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

2D-Median filter, filtersize is 2*halfsize+1 Zero values are ignored src and dst cannot be identical also removes single values in detection window

Author:
woelk 09 2003

Definition at line 215 of file Median.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

template<class InputStorageType, class OutputStorageType>
int Median::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Implements BIAS::FilterNToN< InputStorageType, OutputStorageType >.

Definition at line 137 of file Median.cpp.

References BIASERR, and BIAS::Median< InputStorageType, OutputStorageType >::Filter().

template<class InputStorageType, class OutputStorageType>
int Median::FilterOnlyZeroIgnoreZero3x3 | ( | Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const float & | Threshold = 0.0f
 | ) |

fill spurious gaps in depth maps

compute 3x3 median at zero points, thereby ignoring zero values

Parameters:
Threshold all values<=threshold are rewritten, all values>threshold are used for median sorting

Definition at line 415 of file Median.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

template<class InputStorageType, class OutputStorageType>
int Median::FilterOnlyZeroIgnoreZero5x5 | ( | Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const float & | Threshold = 0.0f
 | ) |

fill spurious gaps in depth maps

compute 5x5 median at zero points, thereby ignoring zero values

Parameters:
Threshold all values<=threshold are rewritten, all values>threshold are used for median sorting

Definition at line 312 of file Median.cpp.

References BIASERR, and BIAS::ImageBase::GetChannelCount().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void Median::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 598 of file Median.cpp.

References BIAS::Median< InputStorageType, OutputStorageType >::_MedianSize.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Median< InputStorageType, OutputStorageType >::SetSize ( int newsize ) [inline]

NYI InputStorageType Filter(InputStorageType arr[], int n);.

Author:
woelk 01/2004

Definition at line 115 of file Median.hh.

References BIASASSERT.

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Median< InputStorageType, OutputStorageType >::_MedianSize [protected]

half win size of median, 1 means 3x3

Definition at line 121 of file Median.hh.

Referenced by BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::Median< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), and BIAS::Median< InputStorageType, OutputStorageType >::~Median().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Median.hh
  • Filter/Median.cpp
Generated on Wed Jun 21 19:08:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Median1D< DataType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Median1D

BIAS::Median1D< DataType > Class Template Reference
[Algorithms]

computes the median of a vector More...

#include <MathAlgo/Median1D.hh>

Inheritance diagram for BIAS::Median1D< DataType >:

[legend]
Collaboration diagram for BIAS::Median1D< DataType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void | Compute (const std::vector< DataType > &vec)
void | Compute (std::vector< DataType > &vec)
computation of the median using a quicksort approach
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
DataType | GetMedian ()
Median1D (const std::vector< DataType > &vec)
Median1D (std::vector< DataType > &vec)
Median1D ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~Median1D ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
DataType | _Median

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class DataType>
class BIAS::Median1D< DataType >

computes the median of a vector

Author:
woelk 06/2005

Definition at line 40 of file Median1D.hh.

Constructor & Destructor Documentation

template<class DataType>
Median1D::Median1D ( )

Definition at line 35 of file Median1D.cpp.

template<class DataType>
BIAS::Median1D< DataType >::Median1D ( std::vector< DataType > & vec )

template<class DataType>
BIAS::Median1D< DataType >::Median1D ( const std::vector< DataType > & vec )

template<class DataType>
Median1D::~Median1D ( )

Definition at line 51 of file Median1D.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class DataType>
void BIAS::Median1D< DataType >::Compute ( const std::vector< DataType > & vec )

template<class DataType>
void BIAS::Median1D< DataType >::Compute ( std::vector< DataType > & vec )

computation of the median using a quicksort approach

Author:
woelk 06/2005

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class DataType>
DataType BIAS::Median1D< DataType >::GetMedian ( ) [inline]

Definition at line 57 of file Median1D.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class DataType>
DataType BIAS::Median1D< DataType >::_Median [protected]

Definition at line 61 of file Median1D.hh.

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • MathAlgo/Median1D.hh
  • MathAlgo/Median1D.cpp
Generated on Wed Jun 21 19:08:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MetaData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MetaData

BIAS::MetaData Class Reference

this class collects all additional data chunks of type AppData to be written into/read from an image file More...

#include <Base/Image/MetaData.hh>

List of all members.

Public Member Functions

void | Add (const std::string &tag, const std::string &data)
Add a new ascii meta datum.
void | Add (AppData &ad)
void | Add (enum AppData::TAppData ID, unsigned int length, char *data)
Add a new binary meta datum.
void | Delete (const std::string &tag)
Delete the meta datum identified by tag.
void | Delete (enum AppData::TAppData tag)
Delete the meta datum identified by tag.
void | Dump (std::ostream &os=std::cout)
dumps this to cout, unfinished piece of code
int | Find (enum AppData::TAppData tag, std::string stag, AppData &data)
cascades Find(enum AppData::TAppData tag, AppData &data) and Find(std::string tag, AppData &data)
int | Find (std::string tag, AppData &data)
searches for tag in ascii coded AppDatas.
int | Find (enum AppData::TAppData tag, AppData &data)
searches for tag in binary coded AppDatas.
MetaData (const MetaData &M)
MetaData ()
MetaData & | operator= (const MetaData &M)
std::ostream & | WriteAscii (std::ostream &os)
Writes only the meta datas where AppData::tag==MD_USE_ASCII to os.
std::ostream & | WriteBinary (std::ostream &os)
Writes only the meta datas where AppData::tag!=MD_USE_ASCII to os.
~MetaData ()

Related Functions

(Note that these are not member functions.)

BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &is, const MetaData &md)
Dumb write operator writes everything to os. !!! binary and ascii data are written mixed, if both are present !!!
BIASImageBase_EXPORT std::istream & | operator>> (std::istream &is, MetaData &md)
Reads from is. Decides whether to read ascii format or binary format.

Detailed Description

this class collects all additional data chunks of type AppData to be written into/read from an image file

See ExampleMetaData for usage.

Author:
woelk 11/2003

Definition at line 119 of file MetaData.hh.

Constructor & Destructor Documentation

MetaData::MetaData ( )

Definition at line 304 of file MetaData.cpp.

BIAS::MetaData::MetaData ( const MetaData & M ) [inline]

Definition at line 124 of file MetaData.hh.

MetaData::~MetaData ( )

Definition at line 308 of file MetaData.cpp.

Member Function Documentation

void BIAS::MetaData::Add | ( | const std::string & | tag,
 |  | const std::string & | data
 | ) |

Add a new ascii meta datum.

Replace old ascii meta datum if already present. Does not check if corresponding binary datum is present.

void MetaData::Add ( AppData & ad )

Definition at line 324 of file MetaData.cpp.

References BIAS::AppData::CheckFormat(), Delete(), Find(), BIAS::AppData::MD_USE_ASCII, BIAS::AppData::stag, and BIAS::AppData::tag.

void MetaData::Add | ( | enum AppData::TAppData | ID,
 |  | unsigned int | length,
 |  | char * | data
 | ) |

Add a new binary meta datum.

Replace old binary meta datum if already present. Does not check if corresponding ascii datum is present.

Definition at line 311 of file MetaData.cpp.

References BIAS::AppData::Clear(), BIAS::AppData::data, Delete(), Find(), BIAS::AppData::length, and BIAS::AppData::tag.

Referenced by main().

void MetaData::Delete ( const std::string & tag )

Delete the meta datum identified by tag.

Does not search for the corresponding binary meta datum.

Definition at line 421 of file MetaData.cpp.

void MetaData::Delete ( enum AppData::TAppData tag )

Delete the meta datum identified by tag.

Does not search for the corresponding ascii meta datum.

Definition at line 410 of file MetaData.cpp.

Referenced by Add().

void BIAS::MetaData::Dump ( std::ostream & os = std::cout )

dumps this to cout, unfinished piece of code

Referenced by main().

int BIAS::MetaData::Find | ( | enum AppData::TAppData | tag,
 |  | std::string | stag,
 |  | AppData & | data
 | ) |

cascades Find(enum AppData::TAppData tag, AppData &data) and Find(std::string tag, AppData &data)

int BIAS::MetaData::Find | ( | std::string | tag,
 |  | AppData & | data
 | ) |

searches for tag in ascii coded AppDatas.

returns: - position in vector if tag is found

  • -2 if tag not found but binary data present

  • -1 if tag not found and no binary data present

int MetaData::Find | ( | enum AppData::TAppData | tag,
 |  | AppData & | data
 | ) |

searches for tag in binary coded AppDatas.

returns: - position in vector if tag is found

  • -2 if tag not found but ascii data present

  • -1 if tag not found and no ascii data present

Definition at line 357 of file MetaData.cpp.

References BIAS::AppData::Clear(), it, and BIAS::AppData::MD_USE_ASCII.

Referenced by Add(), BIAS::ImageIO::ImportOpenEXR(), and main().

MetaData& BIAS::MetaData::operator= ( const MetaData & M ) [inline]

Definition at line 128 of file MetaData.hh.

std::ostream& BIAS::MetaData::WriteAscii ( std::ostream & os )

Writes only the meta datas where AppData::tag==MD_USE_ASCII to os.

std::ostream& BIAS::MetaData::WriteBinary ( std::ostream & os )

Writes only the meta datas where AppData::tag!=MD_USE_ASCII to os.

Referenced by BIAS::ImageIO::WriteUnbuffered().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream & operator<< | ( | std::ostream & | is,
 |  | const MetaData & | md
 | ) | [related]

Dumb write operator writes everything to os. !!! binary and ascii data are written mixed, if both are present !!!

BIASImageBase_EXPORT std::istream & operator>> | ( | std::istream & | is,
 |  | MetaData & | md
 | ) | [related]

Reads from is. Decides whether to read ascii format or binary format.

The documentation for this class was generated from the following files:
  • Base/Image/MetaData.hh
  • Base/Image/MetaData.cpp
Generated on Wed Jun 21 19:08:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Morphology< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Morphology

BIAS::Morphology< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

base class for Erosion, Dilation, and single Deletion More...

#include <Filter/Morphology.hh>

Inheritance diagram for BIAS::Morphology< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Morphology< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | FillBorderConst (Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value)
fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
prototyp for filter computation function
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Morphology (Param &para, const int group_id, const std::string &postfix)
Morphology (Param &para, const std::string &postfix="")
Morphology ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetKernelSize (int size)
virtual | ~Morphology ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp_id, const std::string &postfix="")
Very fast deletion of pixels with no neighbours.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const =0

Protected Attributes

int * | _FilterBorderHandling
long int | _liDebugLevel
bool | _ParamsAllocated
int * | kernelSize_
pointer into param object, determines influence region size

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Morphology< InputStorageType, OutputStorageType >

base class for Erosion, Dilation, and single Deletion

Author:
grest, Oct. 2004

Definition at line 41 of file Morphology.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
Morphology::Morphology ( )

Definition at line 35 of file Morphology.cpp.

References BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated, and BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_.

template<class InputStorageType, class OutputStorageType>
Morphology::~Morphology ( ) [virtual]

Definition at line 61 of file Morphology.cpp.

template<class InputStorageType, class OutputStorageType>
BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

template<class InputStorageType, class OutputStorageType>
BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology | ( | Param & | para,
 |  | const int | group_id,
 |  | const std::string & | postfix
 | ) |

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::_AddParam | ( | Param & | para,
 |  | const int | grp_id,
 |  | const std::string & | postfix = ""
 | ) | [protected]

Very fast deletion of pixels with no neighbours.

All values, which are not zero, are treated as foreground. The border of one pixel is always deleted (set to zero). default is 8-neighborhood. src and dest must NOT be the same!

Author:
Daniel Grest, Sept. 2002 tested

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int Morphology::FillBorderConst | ( | Image< OutputStorageType > & | Image,
 |  | unsigned short int | XBorderSize,
 |  | unsigned short int | YBorderSize,
 |  | OutputStorageType | Value
 | ) |

fills the XBorderSize respectivly YBorderSize nearest Pixels to picture border with Value XBorderSize defines the border parallel to the x axis

Definition at line 66 of file Morphology.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterBase< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual, inherited]

prototyp for filter computation function

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::FilterNTo3N< CalculationType, CalculationType >, BIAS::FilterNToN< InputStorageType, InputStorageType >, BIAS::FilterNToN< StorageType, CalculationType >, BIAS::FilterNToN< CalculationType, CalculationType >, BIAS::FilterNToN< StorageType, StorageType >, BIAS::FilterNToN< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
virtual void BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, pure virtual, inherited]

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Morphology< InputStorageType, OutputStorageType >::SetKernelSize ( int size ) [inline]

Definition at line 58 of file Morphology.hh.

Referenced by main().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
int* BIAS::Morphology< InputStorageType, OutputStorageType >::kernelSize_ [protected]

pointer into param object, determines influence region size

Definition at line 75 of file Morphology.hh.

Referenced by BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology().

The documentation for this class was generated from the following files:
  • Filter/Morphology.hh
  • Filter/Morphology.cpp
Generated on Wed Jun 21 19:08:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MSAC< SolutionType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MSAC

BIAS::MSAC< SolutionType > Class Template Reference

#include <MathAlgo/MSAC.hh>

Inheritance diagram for BIAS::MSAC< SolutionType >:

[legend]
Collaboration diagram for BIAS::MSAC< SolutionType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual bool | EvaluateSolution (const SolutionType &solution, std::vector< bool > &inlier, int &num_inliers, double &evaluate_score)
virtual bool | GenerateSamples (int sample_index, std::vector< unsigned int > &which_samples)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual int | GetSampleSolution (std::vector< unsigned int > &which_samples, SolutionType &solutions)
int | Init (int data_size, double terminate_score, int solution_count)
int | Init (int data_size)
MSAC (BIAS::Param &para, const int grp, const std::string &postfix)
MSAC (BIAS::Param &para)
void | PrintDebugLevel (std::ostream &os=std::cout) const
virtual bool | RefineSolution (std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers)
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SolveMaster (SolutionType &solution, std::vector< bool > &inliers)
virtual | ~MSAC ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParameter (BIAS::Param &para, int grp, const std::string &postfix)
int | _CalculateSampleCount (double expected_inlier_fraction)
double | _CalculateTerminateScore (double sigma, double expected_inlier_fraction)
bool | _GenerateSamplesRandom (int sample_index, std::vector< unsigned int > &which_samples)

Protected Attributes

double * | _dExpectedInlierFraction
double * | _dExpectedSigma
double | _dTerminateScore
int | _iDataSize
int * | _iSampleSize
int | _iSolutionCount
long int | _liDebugLevel
double * | _MSACConfidenceThresh
bool * | _MSACRefineSolution
double * | _MSACSigmaFac

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class SolutionType>
class BIAS::MSAC< SolutionType >

Definition at line 20 of file MSAC.hh.

Constructor & Destructor Documentation

template<class SolutionType>
BIAS::MSAC< SolutionType >::MSAC ( BIAS::Param & para )

Definition at line 88 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_AddParameter(), BIAS::MSAC< SolutionType >::_dExpectedInlierFraction, BIAS::MSAC< SolutionType >::_dExpectedSigma, BIAS::MSAC< SolutionType >::_dTerminateScore, BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_iSampleSize, BIAS::MSAC< SolutionType >::_iSolutionCount, BIAS::MSAC< SolutionType >::_MSACConfidenceThresh, BIAS::MSAC< SolutionType >::_MSACRefineSolution, BIAS::MSAC< SolutionType >::_MSACSigmaFac, and BIAS::Param::GetFreeGroupID().

template<class SolutionType>
BIAS::MSAC< SolutionType >::MSAC | ( | BIAS::Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 106 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_AddParameter(), BIAS::MSAC< SolutionType >::_dExpectedInlierFraction, BIAS::MSAC< SolutionType >::_dExpectedSigma, BIAS::MSAC< SolutionType >::_dTerminateScore, BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_iSampleSize, BIAS::MSAC< SolutionType >::_iSolutionCount, BIAS::MSAC< SolutionType >::_MSACConfidenceThresh, BIAS::MSAC< SolutionType >::_MSACRefineSolution, and BIAS::MSAC< SolutionType >::_MSACSigmaFac.

template<class SolutionType>
BIAS::MSAC< SolutionType >::~MSAC ( ) [virtual]

Definition at line 123 of file MSAC.hh.

Member Function Documentation

template<class SolutionType>
void BIAS::MSAC< SolutionType >::_AddParameter | ( | BIAS::Param & | para,
 |  | int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Definition at line 397 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_MSACRefineSolution, BIAS::Param::CheckParam(), and BIAS::Param::GetParamBool().

Referenced by BIAS::MSAC< SolutionType >::MSAC().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::_CalculateSampleCount ( double expected_inlier_fraction ) [protected]

Definition at line 376 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_iSampleSize, and BIAS::MSAC< SolutionType >::_MSACConfidenceThresh.

Referenced by BIAS::MSAC< SolutionType >::Init().

template<class SolutionType>
double BIAS::MSAC< SolutionType >::_CalculateTerminateScore | ( | double | sigma,
 |  | double | expected_inlier_fraction
 | ) | [protected]

Definition at line 362 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_MSACSigmaFac, and res.

Referenced by BIAS::MSAC< SolutionType >::Init().

template<class SolutionType>
bool BIAS::MSAC< SolutionType >::_GenerateSamplesRandom | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [protected]

Definition at line 311 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_iSampleSize, BIASASSERT, BIASERR, BIAS::Random::GetUniformDistributedInt(), and res.

Referenced by BIAS::MSAC< SolutionType >::GenerateSamples().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class SolutionType>
bool BIAS::MSAC< SolutionType >::EvaluateSolution | ( | const SolutionType & | solution,
 |  | std::vector< bool > & | inlier,
 |  | int & | num_inliers,
 |  | double & | evaluate_score
 | ) | [virtual]

Definition at line 278 of file MSAC.hh.

References BIASERR.

Referenced by BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::MSAC< SolutionType >::GenerateSamples | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [virtual]

Definition at line 301 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_GenerateSamplesRandom().

Referenced by BIAS::MSAC< SolutionType >::SolveMaster().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::GetSampleSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | SolutionType & | solutions
 | ) | [virtual]

Definition at line 267 of file MSAC.hh.

References BIASERR.

Referenced by BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::Init | ( | int | data_size,
 |  | double | terminate_score,
 |  | int | solution_count
 | ) |

Definition at line 140 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_dExpectedInlierFraction, BIAS::MSAC< SolutionType >::_dExpectedSigma, BIAS::MSAC< SolutionType >::_dTerminateScore, BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_iSampleSize, BIAS::MSAC< SolutionType >::_iSolutionCount, BIAS::MSAC< SolutionType >::_MSACConfidenceThresh, BIASASSERT, BIASCDOUT, and D_MSAC_INIT.

template<class SolutionType>
int BIAS::MSAC< SolutionType >::Init ( int data_size )

Definition at line 128 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_CalculateSampleCount(), BIAS::MSAC< SolutionType >::_CalculateTerminateScore(), BIAS::MSAC< SolutionType >::_dExpectedInlierFraction, BIAS::MSAC< SolutionType >::_dExpectedSigma, BIAS::MSAC< SolutionType >::_dTerminateScore, BIAS::MSAC< SolutionType >::_iDataSize, and BIAS::MSAC< SolutionType >::_iSolutionCount.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class SolutionType>
bool BIAS::MSAC< SolutionType >::RefineSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | SolutionType & | solution,
 |  | std::vector< bool > & | new_inliers
 | ) | [virtual]

Definition at line 290 of file MSAC.hh.

References BIASERR.

Referenced by BIAS::MSAC< SolutionType >::SolveMaster().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::SolveMaster | ( | SolutionType & | solution,
 |  | std::vector< bool > & | inliers
 | ) |

Definition at line 163 of file MSAC.hh.

References BIAS::MSAC< SolutionType >::_dTerminateScore, BIAS::MSAC< SolutionType >::_iDataSize, BIAS::MSAC< SolutionType >::_iSampleSize, BIAS::MSAC< SolutionType >::_iSolutionCount, BIAS::MSAC< SolutionType >::_MSACRefineSolution, BIASASSERT, BIASCDOUT, BIASERR, D_MSAC_SOLVEM, BIAS::MSAC< SolutionType >::EvaluateSolution(), BIAS::MSAC< SolutionType >::GenerateSamples(), BIAS::MSAC< SolutionType >::GetSampleSolution(), and BIAS::MSAC< SolutionType >::RefineSolution().

Member Data Documentation

template<class SolutionType>
double* BIAS::MSAC< SolutionType >::_dExpectedInlierFraction [protected]

Definition at line 59 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::Init(), and BIAS::MSAC< SolutionType >::MSAC().

template<class SolutionType>
double* BIAS::MSAC< SolutionType >::_dExpectedSigma [protected]

Definition at line 58 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::Init(), and BIAS::MSAC< SolutionType >::MSAC().

template<class SolutionType>
double BIAS::MSAC< SolutionType >::_dTerminateScore [protected]

Definition at line 63 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::Init(), BIAS::MSAC< SolutionType >::MSAC(), and BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::_iDataSize [protected]

Definition at line 60 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::_CalculateTerminateScore(), BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::MSAC< SolutionType >::Init(), BIAS::MSAC< SolutionType >::MSAC(), and BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int* BIAS::MSAC< SolutionType >::_iSampleSize [protected]

Definition at line 62 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::_CalculateSampleCount(), BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::MSAC< SolutionType >::Init(), BIAS::MSAC< SolutionType >::MSAC(), and BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::MSAC< SolutionType >::_iSolutionCount [protected]

Definition at line 61 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::Init(), BIAS::MSAC< SolutionType >::MSAC(), and BIAS::MSAC< SolutionType >::SolveMaster().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class SolutionType>
double* BIAS::MSAC< SolutionType >::_MSACConfidenceThresh [protected]

Definition at line 56 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::_CalculateSampleCount(), BIAS::MSAC< SolutionType >::Init(), and BIAS::MSAC< SolutionType >::MSAC().

template<class SolutionType>
bool* BIAS::MSAC< SolutionType >::_MSACRefineSolution [protected]

Definition at line 55 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::_AddParameter(), BIAS::MSAC< SolutionType >::MSAC(), and BIAS::MSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double* BIAS::MSAC< SolutionType >::_MSACSigmaFac [protected]

Definition at line 57 of file MSAC.hh.

Referenced by BIAS::MSAC< SolutionType >::_CalculateTerminateScore(), and BIAS::MSAC< SolutionType >::MSAC().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following file:
  • MathAlgo/MSAC.hh
Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Multitype Union Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Multitype Union Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef complex | c
typedef complex | c
typedef doublereal | d
typedef doublereal | d
typedef integer1 | g
typedef integer1 | g
typedef shortint | h
typedef shortint | h
typedef integer | i
typedef integer | i
typedef longint | j
typedef real | r
typedef real | r
typedef doublecomplex | z
typedef doublecomplex | z

Detailed Description

Definition at line 127 of file f2c_gnu011.h.

Member Typedef Documentation

typedef complex Multitype::c

Definition at line 130 of file win32_f2c.h.

typedef complex Multitype::c

Definition at line 134 of file f2c_gnu011.h.

typedef doublereal Multitype::d

Definition at line 129 of file win32_f2c.h.

typedef doublereal Multitype::d

Definition at line 133 of file f2c_gnu011.h.

typedef integer1 Multitype::g

Definition at line 124 of file win32_f2c.h.

typedef integer1 Multitype::g

Definition at line 128 of file f2c_gnu011.h.

typedef shortint Multitype::h

Definition at line 125 of file win32_f2c.h.

typedef shortint Multitype::h

Definition at line 129 of file f2c_gnu011.h.

typedef integer Multitype::i

Definition at line 126 of file win32_f2c.h.

typedef integer Multitype::i

Definition at line 130 of file f2c_gnu011.h.

typedef longint Multitype::j

Definition at line 127 of file win32_f2c.h.

typedef real Multitype::r

Definition at line 128 of file win32_f2c.h.

typedef real Multitype::r

Definition at line 132 of file f2c_gnu011.h.

typedef doublecomplex Multitype::z

Definition at line 131 of file win32_f2c.h.

typedef doublecomplex Multitype::z

Definition at line 135 of file f2c_gnu011.h.

The documentation for this union was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: my_error_mgr Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

my_error_mgr Struct Reference

List of all members.

Public Attributes

jpeg_error_mgr | pub
jmp_buf | setjmp_buffer

Detailed Description

Definition at line 77 of file CompressJpeg.cpp.

Member Data Documentation

struct jpeg_error_mgr my_error_mgr::pub

Definition at line 78 of file CompressJpeg.cpp.

Referenced by deflate_JPEG_file().

jmp_buf my_error_mgr::setjmp_buffer

Definition at line 80 of file CompressJpeg.cpp.

Referenced by deflate_JPEG_file(), and my_error_exit().

The documentation for this struct was generated from the following file:
  • Image/CompressJpeg.cpp
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyAlgorithm Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyAlgorithm Class Reference

Inheritance diagram for MyAlgorithm:

[legend]
Collaboration diagram for MyAlgorithm:

[legend]
List of all members.

Public Member Functions

MyAlgorithm ()
MyAlgorithm ()
void ParamAdd (Param &p)
void ParamAdd (Param &p)
void | ParameterChanged (const std::string &name, const void *data)
void | ParameterChanged (const std::string &name, const void *data)
~MyAlgorithm ()
~MyAlgorithm ()

Protected Attributes

double * | cooldbl
int * | coollevel
int * | coollevel

Detailed Description

Definition at line 17 of file ParamGUISample1.cpp.

Constructor & Destructor Documentation

MyAlgorithm::MyAlgorithm ( ) [inline]

Definition at line 20 of file ParamGUISample1.cpp.

References coollevel.

MyAlgorithm::~MyAlgorithm ( ) [inline]

Definition at line 21 of file ParamGUISample1.cpp.

MyAlgorithm::MyAlgorithm ( ) [inline]

Definition at line 17 of file ParamGUISample3.cpp.

References coollevel.

MyAlgorithm::~MyAlgorithm ( ) [inline]

Definition at line 18 of file ParamGUISample3.cpp.

Member Function Documentation

void MyAlgorithm::ParamAdd ( Param & p ) [inline]

Definition at line 20 of file ParamGUISample3.cpp.

References BIAS::Param::AddParamInt(), coollevel, and BIAS::Param::RegisterCallbackObject().

void MyAlgorithm::ParamAdd ( Param & p ) [inline]

Definition at line 23 of file ParamGUISample1.cpp.

References BIAS::Param::AddParamDouble(), BIAS::Param::AddParamInt(), cooldbl, coollevel, and BIAS::Param::RegisterCallbackObject().

Referenced by MyFrame::MyFrame().

void MyAlgorithm::ParameterChanged | ( | const std::string & | name,
 |  | const void * | data
 | ) | [inline, virtual]

Reimplemented from BIAS::ParamCallbackInterface.

Definition at line 23 of file ParamGUISample3.cpp.

References coollevel.

void MyAlgorithm::ParameterChanged | ( | const std::string & | name,
 |  | const void * | data
 | ) | [inline, virtual]

Reimplemented from BIAS::ParamCallbackInterface.

Definition at line 31 of file ParamGUISample1.cpp.

References coollevel.

Member Data Documentation

double* MyAlgorithm::cooldbl [protected]

Definition at line 40 of file ParamGUISample1.cpp.

Referenced by ParamAdd().

int* MyAlgorithm::coollevel [protected]

Definition at line 28 of file ParamGUISample3.cpp.

int* MyAlgorithm::coollevel [protected]

Definition at line 36 of file ParamGUISample1.cpp.

Referenced by MyAlgorithm(), ParamAdd(), and ParameterChanged().

The documentation for this class was generated from the following files:
  • Gui/Examples/ParamGUISample1.cpp
  • Gui/Examples/ParamGUISample3.cpp
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyApp Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyApp Class Reference

Collaboration diagram for MyApp:

[legend]
List of all members.

Public Member Functions

virtual bool | OnInit ()
virtual bool | OnInit ()
virtual bool | OnInit ()
virtual bool | OnInit ()
~MyApp ()

Public Attributes

MyFrame * ToplevelWindow_

Private Member Functions

virtual bool | OnInit ()
virtual bool | OnInit ()
virtual bool | OnInit ()
virtual bool | OnInit ()

Detailed Description

Definition at line 12 of file ExampleImageCanvas.cpp.

Constructor & Destructor Documentation

MyApp::~MyApp ( )

Definition at line 486 of file ShowCamWx.cpp.

Member Function Documentation

virtual bool MyApp::OnInit ( ) [private, virtual]

virtual bool MyApp::OnInit ( ) [virtual]

virtual bool MyApp::OnInit ( ) [virtual]

virtual bool MyApp::OnInit ( ) [virtual]

virtual bool MyApp::OnInit ( ) [virtual]

virtual bool MyApp::OnInit ( ) [private, virtual]

virtual bool MyApp::OnInit ( ) [private, virtual]

bool MyApp::OnInit ( ) [private, virtual]

Definition at line 34 of file ExampleImageCanvas.cpp.

Member Data Documentation

MyFrame* MyApp::ToplevelWindow_

Definition at line 286 of file ShowCamWx.cpp.

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleImageCanvas.cpp
  • Tools/ShowCamWx.cpp
  • Gui/Examples/ExampleImageCanvasEnhanced.cpp
  • Gui/Examples/ExampleImageCanvasFloat.cpp
  • Gui/Examples/ParamGUISample1.cpp
  • Gui/Examples/ParamGUISample2.cpp
  • Gui/Examples/ParamGUISample3.cpp
  • VideoSource/Examples/ExampleMDCamToShmWx.cpp
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyFactory Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyFactory Class Reference

Inheritance diagram for MyFactory:

[legend]
Collaboration diagram for MyFactory:

[legend]
List of all members.

Public Types

typedef Base *(* | AllocatorFunctionPointer )()
typedef for function pointer to class allocator function

Public Member Functions

void | AddDebugLevel (long int lv)
virtual void | AddType (AllocatorFunctionPointer allocFunc)
add a new class entry to map
BaseFactory ()
constructor
void Clear ()
empties the map
bool | DebugLevelIsSet (long int lv) const
Base * | Generate (const TagType &tag) const
function for generic class generation from
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetKnownTags (std::vector< TagType > &tags) const
void | GetNearTag (const TagType &tag, TagType &t1, TagType &t2)
MyFactory ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

bool | IsInMap_ (const TagType &tag) const
checks if tag is already in map

Protected Attributes

long int | _liDebugLevel
std::map< TagType, MapEntry > | Map_
tag - class correspondences are stored in this map

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const BaseFactory< Base > &bf)

Detailed Description

Definition at line 70 of file ExampleFactory.cpp.

Member Typedef Documentation

typedef Base *(* BIAS::BaseFactory< Base >::AllocatorFunctionPointer)() [inherited]

typedef for function pointer to class allocator function

Definition at line 125 of file BaseFactory.hh.

Constructor & Destructor Documentation

MyFactory::MyFactory ( ) [inline]

Definition at line 74 of file ExampleFactory.cpp.

References BIAS::BaseFactory< Base >::AddType().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

virtual void BIAS::BaseFactory< Base >::AddType ( AllocatorFunctionPointer allocFunc ) [virtual, inherited]

add a new class entry to map

Returns:
0 on success, negative value on error

Referenced by MyFactory().

BIAS::BaseFactory< Base >::BaseFactory ( ) [inherited]

constructor

void BIAS::BaseFactory< Base >::Clear ( ) [inline, inherited]

empties the map

Definition at line 153 of file BaseFactory.hh.

References BIAS::BaseFactory< BaseClassType >::Map_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

Base * BIAS::BaseFactory< Base >::Generate ( const TagType & tag ) const [inherited]

function for generic class generation from

Returns:
pointer to class on success, NULL on error

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::BaseFactory< Base >::GetKnownTags ( std::vector< TagType > & tags ) const [inherited]

Returns:
number of tags on success, negative value on error

void BIAS::BaseFactory< Base >::GetNearTag | ( | const TagType & | tag,
 |  | TagType & | t1,
 |  | TagType & | t2
 | ) | [inherited]

bool BIAS::BaseFactory< Base >::IsInMap_ ( const TagType & tag ) const [inline, protected, inherited]

checks if tag is already in map

Definition at line 162 of file BaseFactory.hh.

References BIAS::BaseFactory< BaseClassType >::Map_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const BaseFactory< Base > & | bf
 | ) | [friend, inherited]

prints Map_ to stream

()

Author:
woelk

Definition at line 284 of file BaseFactory.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::map<TagType, MapEntry> BIAS::BaseFactory< Base >::Map_ [protected, inherited]

tag - class correspondences are stored in this map

Definition at line 168 of file BaseFactory.hh.

The documentation for this class was generated from the following file:
  • Base/Common/Examples/ExampleFactory.cpp
Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyFrame Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyFrame Class Reference

#include <Gui/Examples/ExampleGLShared.hh>

Inheritance diagram for MyFrame:

[legend]
Collaboration diagram for MyFrame:

[legend]
List of all members.

Public Member Functions

void LoadImages ()
laod images and update content on Linux thsi has to be called after initialzation.
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size, VideoSource *cam, VideoSource *cam2)
MyFrame ()
MyFrame ()
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
MyFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAbout (wxCommandEvent &event)
void | OnAutoExposure (wxCommandEvent &event)
void | OnConfig (wxCommandEvent &WXUNUSED(event))
void | OnConfigPin (wxCommandEvent &WXUNUSED(event))
void | OnGain (wxScrollEvent &event)
void | OnGrab (wxCommandEvent &WXUNUSED(event))
void | OnGrabContinuous (wxCommandEvent &WXUNUSED(event))
void | OnKey (wxKeyEvent &event)
void | OnLoad (wxCommandEvent &event)
void | OnLoad (wxCommandEvent &event)
void | OnLoad (wxCommandEvent &event)
void | OnLoadImage (wxCommandEvent &)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &WXUNUSED(event))
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnRect (wxCommandEvent &event)
void | OnShutter (wxScrollEvent &event)
void | OnTestShot (wxCommandEvent &event)
void | OnTimer (wxTimerEvent &event)
void | OnTimer (wxTimerEvent &)
void | OnWhiteBalance (wxCommandEvent &event)
virtual void | RectangleSelected (int tl[2], int br[2])
this function should be overloaded
~MyFrame ()
~MyFrame ()

Public Attributes

ScaledImageCanvas * _ic
ImageCanvasEnhanced * _ic
ImageCanvas * _ic
MyGLCanvas2 * p_2nd_canvas
BIAS::OpenGLCanvasBase * p_canvas
MyGLCanvas * p_canvas
MyGLCanvas * p_canvas
BIAS::ImageCanvasGLBase * p_canvas1
BIAS::ImageCanvasGLBase * p_canvas2
ParamGUI param_

Protected Attributes

wxCheckBox * | AutoExposure_
VideoSource * Cam2_
VideoSource * Cam_
const string | camfile
Camera< unsigned char > | CamImg2_
Camera< unsigned char > | CamImg_
MDcam cams
int | framecount
unsigned int | FrameCounter_
Camera< unsigned char > * | GrabImage
ImageCanvas * IC_
unsigned int | lastheight
unsigned int | lastwidth
const float | max_gain
const float | max_shutter
int | numcams
wxButton * | QuitButton_
int * | scanbus
vector< VideoShMFeeder * > ShmFeeder
vector< string > | ShmNames
const string | ShmPrefix
Camera< unsigned char > | ShowImg_
wxSlider * | SliderGain_
wxSlider * | SliderShutter_
wxStatusBar * | StatusBar_
TimeMeasure StopWatch_
wxTimer | Timer_
wxButton * | WhiteBalanceButton_

Detailed Description

Examples:

ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 106 of file ExampleGLShared.hh.

Constructor & Destructor Documentation

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

Definition at line 325 of file ExampleGLShared.cpp.

References BIASERR.

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

MyFrame::MyFrame ( )

Definition at line 77 of file ParamGUISample1.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamEnum(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::ParamGUI::GetPanel(), param_, MyAlgorithm::ParamAdd(), BIAS::Param::ParseCommandLine(), and BIAS::Param::ShowData().

MyFrame::~MyFrame ( )

Definition at line 103 of file ParamGUISample1.cpp.

References param_, and BIAS::Param::ShowData().

MyFrame::MyFrame ( )

MyFrame::~MyFrame ( )

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size,
 |  | VideoSource * | cam,
 |  | VideoSource * | cam2
 | ) | [inline]

Definition at line 52 of file ShowCamWx.cpp.

References Cam_, CamImg_, FrameCounter_, id_timer, and Timer_.

MyFrame::MyFrame | ( | const wxString & | title,
 |  | const wxPoint & | pos,
 |  | const wxSize & | size
 | ) |

Member Function Documentation

void MyFrame::LoadImages ( )

laod images and update content on Linux thsi has to be called after initialzation.

JW

Definition at line 134 of file ExampleImageCanvasGLBase.cpp.

References BIAS_TESTS_DATA, BIASERR, CALLINFO, COUT, FUNCNAME, img, BIAS::ImageIO::Load(), p_canvas1, p_canvas2, and BIAS::ImageCanvasGLBase::Set().

Referenced by OnLoadImage().

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

void MyFrame::OnAbout ( wxCommandEvent & event )

Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 381 of file ExampleGLShared.cpp.

References BIAS::AsciiToWx(), COUT, and FUNCNAME.

void MyFrame::OnAutoExposure ( wxCommandEvent & event )

Definition at line 208 of file ExampleMDCamToShmWx.cpp.

References AutoExposure_, BIAS::MDcam::AutoMode(), BEXCEPTION, cams, gain, max_gain, max_shutter, SliderGain_, SliderShutter_, and value.

void MyFrame::OnConfig ( wxCommandEvent & WXUNUSED(event) ) [inline]

Definition at line 223 of file ShowCamWx.cpp.

void MyFrame::OnConfigPin ( wxCommandEvent & WXUNUSED(event) ) [inline]

Definition at line 234 of file ShowCamWx.cpp.

void MyFrame::OnGain ( wxScrollEvent & event )

Definition at line 239 of file ExampleMDCamToShmWx.cpp.

References AutoExposure_, BEXCEPTION, cams, gain, max_gain, BIAS::MDcam::SetGain(), SliderGain_, and value.

void MyFrame::OnGrab ( wxCommandEvent & WXUNUSED(event) ) [inline]

Definition at line 154 of file ShowCamWx.cpp.

References WxToAscii.

void MyFrame::OnGrabContinuous ( wxCommandEvent & WXUNUSED(event) ) [inline]

Definition at line 217 of file ShowCamWx.cpp.

References bSaveImages_.

void MyFrame::OnKey ( wxKeyEvent & event ) [inline]

Definition at line 117 of file ShowCamWx.cpp.

References bSaveImages_, and code.

void MyFrame::OnLoad ( wxCommandEvent & event )

void MyFrame::OnLoad ( wxCommandEvent & event )

void MyFrame::OnLoad ( wxCommandEvent & event )

void MyFrame::OnLoadImage ( wxCommandEvent & )

Definition at line 167 of file ExampleImageCanvasGLBase.cpp.

References LoadImages().

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & WXUNUSED(event) ) [inline]

Definition at line 137 of file ShowCamWx.cpp.

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

void MyFrame::OnQuit ( wxCommandEvent & event )

Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 376 of file ExampleGLShared.cpp.

void MyFrame::OnRect ( wxCommandEvent & event )

void MyFrame::OnShutter ( wxScrollEvent & event )

Definition at line 251 of file ExampleMDCamToShmWx.cpp.

References AutoExposure_, BEXCEPTION, cams, max_shutter, BIAS::MDcam::SetShutter(), SliderShutter_, and value.

void MyFrame::OnTestShot ( wxCommandEvent & event )

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 174 of file ExampleOpenGLCanvas.cpp.

References p_canvas, and BIAS::OpenGLCanvasBase::ScreenShot().

void MyFrame::OnTimer ( wxTimerEvent & event )

void MyFrame::OnTimer ( wxTimerEvent & event ) [inline]

Definition at line 162 of file ShowCamWx.cpp.

References BIAS::StereoRedGreen::Combine(), and BIAS::ImageBase::Flip().

void MyFrame::OnWhiteBalance ( wxCommandEvent & event )

void MyFrame::RectangleSelected | ( | int | tl[2],
 |  | int | br[2]
 | ) | [virtual]

this function should be overloaded

Reimplemented from BIAS::ICECallbackInterface.

Definition at line 117 of file ExampleImageCanvasEnhanced.cpp.

Member Data Documentation

ScaledImageCanvas* MyFrame::_ic

Definition at line 30 of file ExampleImageCanvasFloat.cpp.

ImageCanvasEnhanced* MyFrame::_ic

Definition at line 31 of file ExampleImageCanvasEnhanced.cpp.

ImageCanvas* MyFrame::_ic

Definition at line 29 of file ExampleImageCanvas.cpp.

wxCheckBox* MyFrame::AutoExposure_ [protected]

Definition at line 37 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), OnGain(), and OnShutter().

VideoSource* MyFrame::Cam2_ [protected]

Definition at line 247 of file ShowCamWx.cpp.

VideoSource* MyFrame::Cam_ [protected]

Definition at line 246 of file ShowCamWx.cpp.

Referenced by MyFrame().

const string MyFrame::camfile [protected]

Definition at line 46 of file ExampleMDCamToShmWx.cpp.

Camera<unsigned char> MyFrame::CamImg2_ [protected]

Definition at line 253 of file ShowCamWx.cpp.

Camera<unsigned char> MyFrame::CamImg_ [protected]

Definition at line 253 of file ShowCamWx.cpp.

Referenced by MyFrame().

MDcam MyFrame::cams [protected]

Definition at line 42 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), OnGain(), and OnShutter().

int MyFrame::framecount [protected]

Definition at line 50 of file ExampleMDCamToShmWx.cpp.

unsigned int MyFrame::FrameCounter_ [protected]

Definition at line 251 of file ShowCamWx.cpp.

Referenced by MyFrame().

Camera<unsigned char>* MyFrame::GrabImage [protected]

Definition at line 44 of file ExampleMDCamToShmWx.cpp.

ImageCanvas* MyFrame::IC_ [protected]

Definition at line 248 of file ShowCamWx.cpp.

unsigned int MyFrame::lastheight [protected]

Definition at line 252 of file ShowCamWx.cpp.

unsigned int MyFrame::lastwidth [protected]

Definition at line 252 of file ShowCamWx.cpp.

const float MyFrame::max_gain [protected]

Definition at line 51 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), and OnGain().

const float MyFrame::max_shutter [protected]

Definition at line 52 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), and OnShutter().

int MyFrame::numcams [protected]

Definition at line 43 of file ExampleMDCamToShmWx.cpp.

MyGLCanvas2* MyFrame::p_2nd_canvas

Definition at line 115 of file ExampleGLShared.hh.

BIAS::OpenGLCanvasBase* MyFrame::p_canvas

Definition at line 40 of file ExampleOpenGLCanvasBase.hh.

MyGLCanvas* MyFrame::p_canvas

Definition at line 68 of file ExampleOpenGLCanvas.hh.

MyGLCanvas* MyFrame::p_canvas

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 114 of file ExampleGLShared.hh.

Referenced by OnTestShot().

BIAS::ImageCanvasGLBase* MyFrame::p_canvas1

Definition at line 39 of file ExampleImageCanvasGLBase.hh.

Referenced by LoadImages().

BIAS::ImageCanvasGLBase* MyFrame::p_canvas2

Definition at line 40 of file ExampleImageCanvasGLBase.hh.

Referenced by LoadImages().

ParamGUI MyFrame::param_

Definition at line 59 of file ParamGUISample1.cpp.

Referenced by MyFrame(), and ~MyFrame().

wxButton* MyFrame::QuitButton_ [protected]

Definition at line 36 of file ExampleMDCamToShmWx.cpp.

int* MyFrame::scanbus [protected]

Definition at line 48 of file ExampleMDCamToShmWx.cpp.

vector<VideoShMFeeder *> MyFrame::ShmFeeder [protected]

Definition at line 49 of file ExampleMDCamToShmWx.cpp.

vector<string> MyFrame::ShmNames [protected]

Definition at line 45 of file ExampleMDCamToShmWx.cpp.

const string MyFrame::ShmPrefix [protected]

Definition at line 47 of file ExampleMDCamToShmWx.cpp.

Camera<unsigned char> MyFrame::ShowImg_ [protected]

Definition at line 253 of file ShowCamWx.cpp.

wxSlider* MyFrame::SliderGain_ [protected]

Definition at line 38 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), and OnGain().

wxSlider* MyFrame::SliderShutter_ [protected]

Definition at line 39 of file ExampleMDCamToShmWx.cpp.

Referenced by OnAutoExposure(), and OnShutter().

wxStatusBar* MyFrame::StatusBar_ [protected]

Definition at line 249 of file ShowCamWx.cpp.

TimeMeasure MyFrame::StopWatch_ [protected]

Definition at line 250 of file ShowCamWx.cpp.

wxTimer MyFrame::Timer_ [protected]

Definition at line 254 of file ShowCamWx.cpp.

Referenced by MyFrame().

wxButton * MyFrame::WhiteBalanceButton_ [protected]

Definition at line 36 of file ExampleMDCamToShmWx.cpp.

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleGLShared.hh
  • Gui/Examples/ExampleImageCanvas.cpp
  • Gui/Examples/ExampleImageCanvasEnhanced.cpp
  • Gui/Examples/ExampleImageCanvasFloat.cpp
  • Gui/Examples/ExampleImageCanvasGLBase.hh
  • Gui/Examples/ExampleOpenGLCanvas.hh
  • Gui/Examples/ExampleOpenGLCanvasBase.hh
  • Gui/Examples/ParamGUISample1.cpp
  • Gui/Examples/ParamGUISample3.cpp
  • Tools/ShowCamWx.cpp
  • VideoSource/Examples/ExampleMDCamToShmWx.cpp
  • Gui/Examples/ExampleGLShared.cpp
  • Gui/Examples/ExampleImageCanvasGLBase.cpp
  • Gui/Examples/ExampleOpenGLCanvas.cpp
  • Gui/Examples/ExampleOpenGLCanvasBase.cpp
Generated on Wed Jun 21 19:06:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyGLCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyGLCanvas Class Reference

Implement your own OopenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / GL scene. More...

#include <Gui/Examples/ExampleGLShared.hh>

Inheritance diagram for MyGLCanvas:

[legend]
Collaboration diagram for MyGLCanvas:

[legend]
List of all members.

Public Member Functions

virtual void | Display ()
main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance
void DisplayCalls ()
void DisplayCalls ()
virtual void | DisplayCameraView ()
display call to be overridden by child classes
virtual void | DisplayCameraViewExternalParams ()
virtual void | DisplayCameraViewInternalParams ()
virtual void | DisplayClear ()
clears buffers and resets virtual camera to identity
void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
virtual void | DisplayRenderMode ()
display default shade model, polygon mode,
void DisplaySelectBuffer ()
useful for quadbuffered stereo, e.g. shutetr glasses
float | GetAspectRatio () const
GetAspectRatio is X/Y.
unsigned long | GetFrameCount () const
unsigned int | GetHeight () const
virtual void | GetInfoGL (std::ostream &os=std::cout)
return GL state info
wxFrame * | GetOwnerframe ()
float | GetPixelValueDepth (const wxPoint &pos2d) const
BIAS::Vector3< float > | GetPixelValueRGB (const wxPoint &pos2d)
BIAS::Vector4< float > | GetPixelValueRGBA (const wxPoint &pos2d)
CameraViewController & GetViewController ()
CameraViewController | GetViewController () const
unsigned int | GetWidth () const
void InitGeometry ()
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
virtual void | InitWithContext ()
init all things that need a context.
bool | IsContextAvailable ()
activates the current rendereing context if there is one and
MyGLCanvas (wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette)
constructor using a shared context
MyGLCanvas (wxFrame *parent)
MyGLCanvas (wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette)
constructor using a shared context
MyGLCanvas (wxFrame *parent)
your own implementation of the scenes GL calls:
virtual void | OnChar (wxKeyEvent &event)
void | OnEraseBackground (wxEraseEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnMotion (wxMouseEvent &event)
void | OnMouseDown (wxMouseEvent &event)
void | OnMouseWheel (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnSize (wxSizeEvent &event)
virtual std::ostream & | PrintHelp (std::ostream &os)
pop up keyboard layout help.
virtual void | Reshape ()
change of size and aspect ratio.
void ScreenShot ()
JW automatic screenshot to file with filename based on frame, instance etc.
void | ScreenShot (const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | ScreenShot (BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | SetFrameCount (const unsigned long &newVal)
void | SetOwnerframe (wxFrame *ptr)
void | SetStatusText (const wxString &text, const int c_field=0)
let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)
void ShowFPS ()
simple interface for the above
void | ShowFPS (const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField)
shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.
void | ShowValue (const wxPoint &pos)
void SwapBuffers ()
expands parents SwapBUffers by automatic framecount increase
void ToggleFullScreen ()
BIAS::Vector3< float > | Unproject (const wxPoint &pos2d, double &d)
computes 3D coordinate from 2D+Z by "unprojection" JW
virtual void | UpdateTime ()
sets the internal time param, by default based on realtime wall clock

Static Public Member Functions

static void | DisplaySampleScene ()
display soem very simple Gl calls to draw something at all
static bool | GetVSync ()
static void | SetVSync (const bool &trueForOn)
vertical sync control on or off (VSYNC) JW
static void | StereoI_CaptureStereoImage (const int &format, const int &quality)
static float | StereoI_GetConvergence ()
static void | StereoI_GetInfo (std::ostream &os=std::cout)
query status information on current NVStereo rendering state JW
static float | StereoI_GetSeparation ()
static int | StereoI_GetStereoState ()
wrappers for StereoI interface
static int | StereoI_Init ()
interace to NVidias consumer Stereo NVStereo driver API.
static float | StereoI_SetConvergence (const float &val)
static float | StereoI_SetSeparation (const float &val)
static int | StereoI_SetStereoState (const int &val)
static bool | ToggleIP (bool &value)
helper toggling a bool value in place
static bool | ToggleVSync ()
try to toggle VSync setting.

Public Attributes

int | dplist
DrawTextGL font

Static Public Attributes

static bool | animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
static bool | idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled
static bool | realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation
static double | time = 0.0

Protected Attributes

GLenum | _polygonmodeGL
unsigned long | framecount_
bool | InitWithContextDone_
unsigned int | instance_
BIAS::DrawTextGL * p_font
wxFrame * | p_ownerframe
CameraViewController * | p_viewCtrl_
BIAS::RenderModeGL rendermode

Static Protected Attributes

static unsigned int | instancesTotalNo_ = 0

Detailed Description

Implement your own OopenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / GL scene.

Author:
Jan Woetzl
Examples:

ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 45 of file ExampleGLShared.hh.

Constructor & Destructor Documentation

MyGLCanvas::MyGLCanvas ( wxFrame * parent )

your own implementation of the scenes GL calls:

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 29 of file ExampleGLShared.cpp.

MyGLCanvas::MyGLCanvas | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = wxT("MyGLCanvas sharedContext"),
 |  | int * | attribList = 0,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

MyGLCanvas::MyGLCanvas ( wxFrame * parent )

MyGLCanvas::MyGLCanvas | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = wxT("MyGLCanvas sharedContext"),
 |  | int * | attribList = 0,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

Member Function Documentation

void OpenGLCanvasBase::Display ( ) [virtual, inherited]

main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance

Author:
Jan Woetzel.

Definition at line 288 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayCalls(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::SwapBuffers(), and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvas::OnIdle(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::ImageCanvasGLBase::Set().

void MyGLCanvas::DisplayCalls ( ) [virtual]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented from BIAS::OpenGLCanvasBase.

void MyGLCanvas::DisplayCalls ( ) [virtual]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented from BIAS::OpenGLCanvasBase.

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 158 of file ExampleGLShared.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayClear(), BIAS::OpenGLCanvasBase::DisplayCoordCross(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), dplist, font, BIAS::OpenGLCanvasBase::GetAspectRatio(), InitGeometry(), BIAS::DrawTextGL::IsInitialized(), and BIAS::DrawTextGL::PrintWinCoords().

void OpenGLCanvas::DisplayCameraView ( ) [virtual, inherited]

display call to be overridden by child classes

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 99 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), and BIAS::OpenGLCanvas::DisplayCameraViewInternalParams().

void OpenGLCanvas::DisplayCameraViewExternalParams ( ) [virtual, inherited]

Definition at line 111 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLExternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvas::DisplayCameraViewInternalParams ( ) [virtual, inherited]

Definition at line 106 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLInternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvasBase::DisplayClear ( ) [virtual, inherited]

clears buffers and resets virtual camera to identity

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 401 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::GeometryGL::DisplayClear().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls(), MyGLCanvas2::DisplayCalls(), and DisplayCalls().

void OpenGLCanvasBase::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) | [inherited]

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 421 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIAS::GeometryGL::DisplayCoordCross(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), and BIAS::OpenGLCanvasBase::p_font.

Referenced by DisplayCalls().

void OpenGLCanvasBase::DisplayRenderMode ( ) [virtual, inherited]

display default shade model, polygon mode,

Examples:
ExampleGLShared.cpp.

Definition at line 408 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplayRenderMode(), and BIAS::OpenGLCanvasBase::rendermode.

Referenced by BIAS::OpenGLCanvasBase::Display(), MyGLCanvas2::DisplayCalls(), and DisplayCalls().

void OpenGLCanvasBase::DisplaySampleScene ( ) [static, inherited]

display soem very simple Gl calls to draw something at all

Definition at line 415 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplaySceneExampleSimple().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls().

void OpenGLCanvasBase::DisplaySelectBuffer ( ) [inherited]

useful for quadbuffered stereo, e.g. shutetr glasses

Definition at line 347 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::drawbuffermode, BIAS::MONO, BIAS::OpenGLCanvasBase::rendermode, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_QUADBUFFERED, and BIAS::STEREO_UNTOUCHED.

Referenced by BIAS::OpenGLCanvasBase::Display().

float OpenGLCanvasBase::GetAspectRatio ( ) const [inherited]

GetAspectRatio is X/Y.

Returns:
aspect 'X/Y' = ratio of width being 'bigger' than reference height
Examples:
ExampleGLShared.cpp.

Definition at line 468 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::GetHeight(), and BIAS::OpenGLCanvasBase::GetWidth().

Referenced by MyGLCanvas2::DisplayCalls(), and DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::GetFrameCount ( ) const [inline, inherited]

Definition at line 290 of file OpenGLCanvasBase.hh.

unsigned int OpenGLCanvasBase::GetHeight ( ) const [inherited]

Definition at line 458 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::GetInfoGL ( std::ostream & os = std::cout ) [virtual, inherited]

return GL state info

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 203 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::Print().

wxFrame * OpenGLCanvasBase::GetOwnerframe ( ) [inherited]

Definition at line 252 of file OpenGLCanvasBase.cpp.

References BIASASSERT, and BIAS::OpenGLCanvasBase::p_ownerframe.

float OpenGLCanvasBase::GetPixelValueDepth ( const wxPoint & pos2d ) const [inherited]

Definition at line 514 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::OpenGLCanvasBase::GetHeight().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

BIAS::Vector3< float > OpenGLCanvasBase::GetPixelValueRGB ( const wxPoint & pos2d ) [inherited]

Definition at line 475 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector3< T >::Set().

BIAS::Vector4< float > OpenGLCanvasBase::GetPixelValueRGBA ( const wxPoint & pos2d ) [inherited]

Definition at line 495 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector4< T >::Set().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

CameraViewController & OpenGLCanvas::GetViewController ( ) [inherited]

Definition at line 223 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

CameraViewController OpenGLCanvas::GetViewController ( ) const [inherited]

Definition at line 228 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), BIAS::OpenGLCanvas::DisplayCameraViewInternalParams(), BIAS::OpenGLCanvas::GetInfoGL(), BIAS::OpenGLCanvas::OnMotion(), BIAS::OpenGLCanvas::OnMouseWheel(), and BIAS::OpenGLCanvas::Reshape().

bool OpenGLCanvasBase::GetVSync ( ) [static, inherited]

Returns:
true if vertical sync is enable, false for free running mode JW

Definition at line 1144 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::GetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleVSync().

unsigned int OpenGLCanvasBase::GetWidth ( ) const [inherited]

Definition at line 449 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void MyGLCanvas::InitGeometry ( )

Examples:
ExampleGLShared.cpp.

Definition at line 36 of file ExampleGLShared.cpp.

References CHECK_GL_ERROR, dplist, font, and BIAS::DrawTextGL::InitFont().

Referenced by DisplayCalls().

void OpenGLCanvas::InitMembers ( ) [virtual, inherited]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Reimplemented from BIAS::OpenGLCanvasBase.

Reimplemented in BIAS::ImageCanvasGLBase.

Definition at line 86 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::_polygonmodeGL, BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvas::p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::InitMembers(), and BIAS::OpenGLCanvas::OpenGLCanvas().

void OpenGLCanvasBase::InitWithContext ( ) [virtual, inherited]

init all things that need a context.

sets _InitWithContextDone

Definition at line 137 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, BIAS::OpenGLCanvasBase::GetVSync(), BIAS::DrawTextGL::InitFont(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::p_font, BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::SetVSync(), and BIAS::RenderModeGL::vsync.

Referenced by BIAS::OpenGLCanvasBase::Display().

bool OpenGLCanvasBase::IsContextAvailable ( ) [inherited]

activates the current rendereing context if there is one and

Returns:
true if gl rendering context is available, false if there is none available (yet).

Definition at line 218 of file OpenGLCanvasBase.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), and BIAS::OpenGLCanvasBase::InitWithContext().

void OpenGLCanvasBase::OnChar ( wxKeyEvent & event ) [virtual, inherited]

Definition at line 957 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::AsciiToWx(), BIASASSERT, BIASERR, COUT, BIAS::RenderModeGL::cullface, BIAS::OpenGLCanvasBase::Display(), BIAS::RenderModeGL::enable_cullface, BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::GetVSync(), BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, BIAS::OpenGLCanvasBase::PrintHelp(), BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::OpenGLCanvasBase::SetStatusText(), BIAS::RenderModeGL::shademodel, BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::ToggleFullScreen(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::OnEraseBackground ( wxEraseEvent & event ) [inherited]

Definition at line 1129 of file OpenGLCanvasBase.cpp.

void OpenGLCanvas::OnIdle ( wxIdleEvent & event ) [inherited]

Definition at line 165 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvas::UpdateTime().

void OpenGLCanvas::OnMotion ( wxMouseEvent & event ) [inherited]

Definition at line 118 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MotionTranslation().

void OpenGLCanvas::OnMouseDown ( wxMouseEvent & event ) [inherited]

Definition at line 137 of file OpenGLCanvas.cpp.

void OpenGLCanvas::OnMouseWheel ( wxMouseEvent & event ) [inherited]

Definition at line 146 of file OpenGLCanvas.cpp.

References BIASBREAK, BIASWARN, BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MoveToCenter().

void BIAS::OpenGLCanvasBase::OnPaint ( wxPaintEvent & event ) [inherited]

void OpenGLCanvasBase::OnSize ( wxSizeEvent & event ) [inherited]

Definition at line 923 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::Reshape().

std::ostream & OpenGLCanvasBase::PrintHelp ( std::ostream & os ) [virtual, inherited]

pop up keyboard layout help.

Mut ebe virtualto let child class add their bindings

Definition at line 929 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

void OpenGLCanvas::Reshape ( ) [virtual, inherited]

change of size and aspect ratio.

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 211 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::CameraViewController::GetInternals(), BIAS::OpenGLCanvas::GetViewController(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::CameraViewport::height, BIAS::CameraViewInternals::viewport, and BIAS::CameraViewport::width.

void OpenGLCanvasBase::ScreenShot ( ) [inherited]

JW automatic screenshot to file with filename based on frame, instance etc.

JW

Definition at line 681 of file OpenGLCanvasBase.cpp.

References BIAS_SCREENSHOT_DEFAULT_EXTENSION, BIAS::OpenGLCanvasBase::framecount_, BIAS::OpenGLCanvasBase::instance_, and BIAS::LeadingZeroString().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | const std::string & | filename,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Definition at line 567 of file OpenGLCanvasBase.cpp.

References BIASERR, COUT, BIAS::ImageIO::ExportImage(), FUNCNAME, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::GetWidth(), img, and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | BIAS::ImageBase & | dest,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 593 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and type.

Referenced by MyFrame::OnTestShot().

void BIAS::OpenGLCanvasBase::SetFrameCount ( const unsigned long & newVal ) [inline, inherited]

Definition at line 291 of file OpenGLCanvasBase.hh.

void OpenGLCanvasBase::SetOwnerframe ( wxFrame * ptr ) [inherited]

Definition at line 258 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::p_ownerframe.

void OpenGLCanvasBase::SetStatusText | ( | const wxString & | text,
 |  | const int | c_field = 0
 | ) | [inherited]

let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)

Definition at line 741 of file OpenGLCanvasBase.cpp.

References BIASERR, and BIAS::OpenGLCanvasBase::p_ownerframe.

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvasBase::SetVSync ( const bool & trueForOn ) [static, inherited]

vertical sync control on or off (VSYNC) JW

Definition at line 1135 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::SetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::ShowFPS ( ) [inherited]

simple interface for the above

Definition at line 900 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvas::OnIdle().

void OpenGLCanvasBase::ShowFPS | ( | const int & | framecounter,
 |  | const float & | minUpdateIntervalSec,
 |  | const unsigned int & | minNewFrames,
 |  | const unsigned int | nField
 | ) | [inherited]

shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.

at least minUpdateIntervalSec seconds have passed since prvious update 2. at least minNewFrames were drawn since a previous update Shouls handle multiplem, shared contextst correctly (jw). JW

Definition at line 820 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), and BIAS::OpenGLCanvasBase::SetStatusText().

void OpenGLCanvasBase::ShowValue ( const wxPoint & pos ) [inherited]

Definition at line 780 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::Unproject().

void OpenGLCanvasBase::StereoI_CaptureStereoImage | ( | const int & | format,
 |  | const int & | quality
 | ) | [static, inherited]

Definition at line 1294 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_GetConvergence ( ) [static, inherited]

Definition at line 1278 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::StereoI_GetInfo ( std::ostream & os = std::cout ) [static, inherited]

query status information on current NVStereo rendering state JW

Definition at line 1213 of file OpenGLCanvasBase.cpp.

References BIASERR, Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_Init().

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), and BIAS::OpenGLCanvasBase::OnChar().

float OpenGLCanvasBase::StereoI_GetSeparation ( ) [static, inherited]

Definition at line 1262 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_GetStereoState ( ) [static, inherited]

wrappers for StereoI interface

Definition at line 1246 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_Init ( ) [static, inherited]

interace to NVidias consumer Stereo NVStereo driver API.

to enable/disbale stereo and control convergence and separation for stereo rendering

Returns:
0 on success, negative on error.
Author:
Jan Woetzel

Definition at line 1172 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, and g_pStereoAPI.

Referenced by Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_GetInfo().

float OpenGLCanvasBase::StereoI_SetConvergence ( const float & val ) [static, inherited]

Definition at line 1286 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_SetSeparation ( const float & val ) [static, inherited]

Definition at line 1270 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_SetStereoState ( const int & val ) [static, inherited]

Definition at line 1254 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::SwapBuffers ( ) [inherited]

expands parents SwapBUffers by automatic framecount increase

Definition at line 282 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::framecount_.

Referenced by BIAS::OpenGLCanvasBase::Display().

void OpenGLCanvasBase::ToggleFullScreen ( ) [inherited]

Definition at line 876 of file OpenGLCanvasBase.cpp.

References BIAS::RenderModeGL::drawbuffermode, OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE, BIAS::OpenGLCanvasBase::p_ownerframe, BIAS::OpenGLCanvasBase::rendermode, and BIAS::STEREO_CONSUMER_NV.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

bool OpenGLCanvasBase::ToggleIP ( bool & value ) [static, inherited]

helper toggling a bool value in place

Returns:
new value JW

Definition at line 1164 of file OpenGLCanvasBase.cpp.

bool OpenGLCanvasBase::ToggleVSync ( ) [static, inherited]

try to toggle VSync setting.

Returns:
true if toggling worked, false if status persisted.

Definition at line 1150 of file OpenGLCanvasBase.cpp.

References act, BIAS::OpenGLCanvasBase::GetVSync(), and BIAS::OpenGLCanvasBase::SetVSync().

Referenced by BIAS::OpenGLCanvasBase::OnChar().

BIAS::Vector3< float > OpenGLCanvasBase::Unproject | ( | const wxPoint & | pos2d,
 |  | double & | d
 | ) | [inherited]

computes 3D coordinate from 2D+Z by "unprojection" JW

Definition at line 530 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvas::UpdateTime ( ) [virtual, inherited]

sets the internal time param, by default based on realtime wall clock

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 186 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::OpenGLCanvas::realtimeAnimation, TARGET_FPS, BIAS::OpenGLCanvasBase::time, and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvas::OnIdle().

Member Data Documentation

GLenum BIAS::OpenGLCanvas::_polygonmodeGL [protected, inherited]

Definition at line 142 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled [static, inherited]

Definition at line 343 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvas::UpdateTime().

int MyGLCanvas::dplist

Examples:
ExampleGLShared.cpp.

Definition at line 73 of file ExampleGLShared.hh.

Referenced by DisplayCalls(), and InitGeometry().

DrawTextGL MyGLCanvas::font

Examples:
ExampleGLShared.cpp.

Definition at line 75 of file ExampleGLShared.hh.

Referenced by DisplayCalls(), and InitGeometry().

unsigned long BIAS::OpenGLCanvasBase::framecount_ [protected, inherited]

Definition at line 348 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::OpenGLCanvasBase::SwapBuffers().

bool OpenGLCanvas::idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled [static, inherited]

Definition at line 127 of file OpenGLCanvas.hh.

bool BIAS::OpenGLCanvasBase::InitWithContextDone_ [protected, inherited]

Definition at line 354 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::InitWithContext().

unsigned int BIAS::OpenGLCanvasBase::instance_ [protected, inherited]

Definition at line 356 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::ScreenShot().

unsigned int OpenGLCanvasBase::instancesTotalNo_ = 0 [static, protected, inherited]

Definition at line 357 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::OpenGLCanvasBase().

BIAS::DrawTextGL* BIAS::OpenGLCanvasBase::p_font [protected, inherited]

Definition at line 365 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and BIAS::OpenGLCanvasBase::InitWithContext().

wxFrame* BIAS::OpenGLCanvasBase::p_ownerframe [protected, inherited]

Definition at line 351 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetOwnerframe(), BIAS::OpenGLCanvasBase::OpenGLCanvasBase(), BIAS::OpenGLCanvasBase::SetOwnerframe(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

CameraViewController* BIAS::OpenGLCanvas::p_viewCtrl_ [protected, inherited]

Definition at line 138 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::GetViewController(), and BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvas::realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation [static, inherited]

Definition at line 129 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::UpdateTime().

BIAS::RenderModeGL BIAS::OpenGLCanvasBase::rendermode [protected, inherited]

Definition at line 360 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

double OpenGLCanvasBase::time = 0.0 [static, inherited]

Definition at line 341 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::UpdateTime(), and BIAS::OpenGLCanvas::UpdateTime().

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleGLShared.hh
  • Gui/Examples/ExampleOpenGLCanvas.hh
  • Gui/Examples/ExampleGLShared.cpp
  • Gui/Examples/ExampleOpenGLCanvas.cpp
Generated on Wed Jun 21 19:06:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyGLCanvas2 Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyGLCanvas2 Class Reference

#include <Gui/Examples/ExampleGLShared.hh>

Inheritance diagram for MyGLCanvas2:

[legend]
Collaboration diagram for MyGLCanvas2:

[legend]
List of all members.

Public Member Functions

virtual void | Display ()
main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance
void DisplayCalls ()
virtual void | DisplayCameraView ()
display call to be overridden by child classes
virtual void | DisplayCameraViewExternalParams ()
virtual void | DisplayCameraViewInternalParams ()
virtual void | DisplayClear ()
clears buffers and resets virtual camera to identity
void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
virtual void | DisplayRenderMode ()
display default shade model, polygon mode,
void DisplaySelectBuffer ()
useful for quadbuffered stereo, e.g. shutetr glasses
float | GetAspectRatio () const
GetAspectRatio is X/Y.
unsigned long | GetFrameCount () const
unsigned int | GetHeight () const
virtual void | GetInfoGL (std::ostream &os=std::cout)
return GL state info
wxFrame * | GetOwnerframe ()
float | GetPixelValueDepth (const wxPoint &pos2d) const
BIAS::Vector3< float > | GetPixelValueRGB (const wxPoint &pos2d)
BIAS::Vector4< float > | GetPixelValueRGBA (const wxPoint &pos2d)
CameraViewController & GetViewController ()
CameraViewController | GetViewController () const
unsigned int | GetWidth () const
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
virtual void | InitWithContext ()
init all things that need a context.
bool | IsContextAvailable ()
activates the current rendereing context if there is one and
MyGLCanvas2 (wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette)
constructor using a shared context
MyGLCanvas2 (wxFrame *parent)
virtual void | OnChar (wxKeyEvent &event)
void | OnEraseBackground (wxEraseEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnMotion (wxMouseEvent &event)
void | OnMouseDown (wxMouseEvent &event)
void | OnMouseWheel (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnSize (wxSizeEvent &event)
virtual std::ostream & | PrintHelp (std::ostream &os)
pop up keyboard layout help.
virtual void | Reshape ()
change of size and aspect ratio.
void ScreenShot ()
JW automatic screenshot to file with filename based on frame, instance etc.
void | ScreenShot (const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | ScreenShot (BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | SetFrameCount (const unsigned long &newVal)
void | SetOwnerframe (wxFrame *ptr)
void | SetStatusText (const wxString &text, const int c_field=0)
let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)
void ShowFPS ()
simple interface for the above
void | ShowFPS (const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField)
shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.
void | ShowValue (const wxPoint &pos)
void SwapBuffers ()
expands parents SwapBUffers by automatic framecount increase
void ToggleFullScreen ()
BIAS::Vector3< float > | Unproject (const wxPoint &pos2d, double &d)
computes 3D coordinate from 2D+Z by "unprojection" JW
virtual void | UpdateTime ()
sets the internal time param, by default based on realtime wall clock

Static Public Member Functions

static void | DisplaySampleScene ()
display soem very simple Gl calls to draw something at all
static bool | GetVSync ()
static void | SetVSync (const bool &trueForOn)
vertical sync control on or off (VSYNC) JW
static void | StereoI_CaptureStereoImage (const int &format, const int &quality)
static float | StereoI_GetConvergence ()
static void | StereoI_GetInfo (std::ostream &os=std::cout)
query status information on current NVStereo rendering state JW
static float | StereoI_GetSeparation ()
static int | StereoI_GetStereoState ()
wrappers for StereoI interface
static int | StereoI_Init ()
interace to NVidias consumer Stereo NVStereo driver API.
static float | StereoI_SetConvergence (const float &val)
static float | StereoI_SetSeparation (const float &val)
static int | StereoI_SetStereoState (const int &val)
static bool | ToggleIP (bool &value)
helper toggling a bool value in place
static bool | ToggleVSync ()
try to toggle VSync setting.

Public Attributes

int | dplist

Static Public Attributes

static bool | animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
static bool | idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled
static bool | realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation
static double | time = 0.0

Protected Attributes

GLenum | _polygonmodeGL
unsigned long | framecount_
bool | InitWithContextDone_
unsigned int | instance_
BIAS::DrawTextGL * p_font
wxFrame * | p_ownerframe
CameraViewController * | p_viewCtrl_
BIAS::RenderModeGL rendermode

Static Protected Attributes

static unsigned int | instancesTotalNo_ = 0

Detailed Description

Examples:

ExampleGLShared.cpp.

Definition at line 80 of file ExampleGLShared.hh.

Constructor & Destructor Documentation

MyGLCanvas2::MyGLCanvas2 ( wxFrame * parent )

Examples:
ExampleGLShared.cpp.

Definition at line 234 of file ExampleGLShared.cpp.

MyGLCanvas2::MyGLCanvas2 | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = wxT("MyGLCanvas sharedContext"),
 |  | int * | attribList = 0,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

Definition at line 242 of file ExampleGLShared.cpp.

Member Function Documentation

void OpenGLCanvasBase::Display ( ) [virtual, inherited]

main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance

Author:
Jan Woetzel.

Definition at line 288 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayCalls(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::SwapBuffers(), and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvas::OnIdle(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::ImageCanvasGLBase::Set().

void MyGLCanvas2::DisplayCalls ( ) [virtual]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented from BIAS::OpenGLCanvasBase.

Examples:
ExampleGLShared.cpp.

Definition at line 256 of file ExampleGLShared.cpp.

References CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayClear(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), dplist, and BIAS::OpenGLCanvasBase::GetAspectRatio().

void OpenGLCanvas::DisplayCameraView ( ) [virtual, inherited]

display call to be overridden by child classes

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 99 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), and BIAS::OpenGLCanvas::DisplayCameraViewInternalParams().

void OpenGLCanvas::DisplayCameraViewExternalParams ( ) [virtual, inherited]

Definition at line 111 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLExternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvas::DisplayCameraViewInternalParams ( ) [virtual, inherited]

Definition at line 106 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLInternal(), and BIAS::OpenGLCanvas::GetViewController().

Referenced by BIAS::OpenGLCanvas::DisplayCameraView().

void OpenGLCanvasBase::DisplayClear ( ) [virtual, inherited]

clears buffers and resets virtual camera to identity

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 401 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::GeometryGL::DisplayClear().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls(), DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) | [inherited]

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 421 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIAS::GeometryGL::DisplayCoordCross(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), and BIAS::OpenGLCanvasBase::p_font.

Referenced by MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayRenderMode ( ) [virtual, inherited]

display default shade model, polygon mode,

Examples:
ExampleGLShared.cpp.

Definition at line 408 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplayRenderMode(), and BIAS::OpenGLCanvasBase::rendermode.

Referenced by BIAS::OpenGLCanvasBase::Display(), DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplaySampleScene ( ) [static, inherited]

display soem very simple Gl calls to draw something at all

Definition at line 415 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplaySceneExampleSimple().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls().

void OpenGLCanvasBase::DisplaySelectBuffer ( ) [inherited]

useful for quadbuffered stereo, e.g. shutetr glasses

Definition at line 347 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::drawbuffermode, BIAS::MONO, BIAS::OpenGLCanvasBase::rendermode, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_QUADBUFFERED, and BIAS::STEREO_UNTOUCHED.

Referenced by BIAS::OpenGLCanvasBase::Display().

float OpenGLCanvasBase::GetAspectRatio ( ) const [inherited]

GetAspectRatio is X/Y.

Returns:
aspect 'X/Y' = ratio of width being 'bigger' than reference height
Examples:
ExampleGLShared.cpp.

Definition at line 468 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::GetHeight(), and BIAS::OpenGLCanvasBase::GetWidth().

Referenced by DisplayCalls(), and MyGLCanvas::DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::GetFrameCount ( ) const [inline, inherited]

Definition at line 290 of file OpenGLCanvasBase.hh.

unsigned int OpenGLCanvasBase::GetHeight ( ) const [inherited]

Definition at line 458 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::GetInfoGL ( std::ostream & os = std::cout ) [virtual, inherited]

return GL state info

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 203 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::Print().

wxFrame * OpenGLCanvasBase::GetOwnerframe ( ) [inherited]

Definition at line 252 of file OpenGLCanvasBase.cpp.

References BIASASSERT, and BIAS::OpenGLCanvasBase::p_ownerframe.

float OpenGLCanvasBase::GetPixelValueDepth ( const wxPoint & pos2d ) const [inherited]

Definition at line 514 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::OpenGLCanvasBase::GetHeight().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

BIAS::Vector3< float > OpenGLCanvasBase::GetPixelValueRGB ( const wxPoint & pos2d ) [inherited]

Definition at line 475 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector3< T >::Set().

BIAS::Vector4< float > OpenGLCanvasBase::GetPixelValueRGBA ( const wxPoint & pos2d ) [inherited]

Definition at line 495 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector4< T >::Set().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

CameraViewController & OpenGLCanvas::GetViewController ( ) [inherited]

Definition at line 223 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

CameraViewController OpenGLCanvas::GetViewController ( ) const [inherited]

Definition at line 228 of file OpenGLCanvas.cpp.

References BIASASSERT, and BIAS::OpenGLCanvas::p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), BIAS::OpenGLCanvas::DisplayCameraViewExternalParams(), BIAS::OpenGLCanvas::DisplayCameraViewInternalParams(), BIAS::OpenGLCanvas::GetInfoGL(), BIAS::OpenGLCanvas::OnMotion(), BIAS::OpenGLCanvas::OnMouseWheel(), and BIAS::OpenGLCanvas::Reshape().

bool OpenGLCanvasBase::GetVSync ( ) [static, inherited]

Returns:
true if vertical sync is enable, false for free running mode JW

Definition at line 1144 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::GetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleVSync().

unsigned int OpenGLCanvasBase::GetWidth ( ) const [inherited]

Definition at line 449 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::InitMembers ( ) [virtual, inherited]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Reimplemented from BIAS::OpenGLCanvasBase.

Reimplemented in BIAS::ImageCanvasGLBase.

Definition at line 86 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::_polygonmodeGL, BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvas::p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::InitMembers(), and BIAS::OpenGLCanvas::OpenGLCanvas().

void OpenGLCanvasBase::InitWithContext ( ) [virtual, inherited]

init all things that need a context.

sets _InitWithContextDone

Definition at line 137 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, BIAS::OpenGLCanvasBase::GetVSync(), BIAS::DrawTextGL::InitFont(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::p_font, BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::SetVSync(), and BIAS::RenderModeGL::vsync.

Referenced by BIAS::OpenGLCanvasBase::Display().

bool OpenGLCanvasBase::IsContextAvailable ( ) [inherited]

activates the current rendereing context if there is one and

Returns:
true if gl rendering context is available, false if there is none available (yet).

Definition at line 218 of file OpenGLCanvasBase.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), and BIAS::OpenGLCanvasBase::InitWithContext().

void OpenGLCanvasBase::OnChar ( wxKeyEvent & event ) [virtual, inherited]

Definition at line 957 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::AsciiToWx(), BIASASSERT, BIASERR, COUT, BIAS::RenderModeGL::cullface, BIAS::OpenGLCanvasBase::Display(), BIAS::RenderModeGL::enable_cullface, BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::GetVSync(), BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, BIAS::OpenGLCanvasBase::PrintHelp(), BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::OpenGLCanvasBase::SetStatusText(), BIAS::RenderModeGL::shademodel, BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::ToggleFullScreen(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::OnEraseBackground ( wxEraseEvent & event ) [inherited]

Definition at line 1129 of file OpenGLCanvasBase.cpp.

void OpenGLCanvas::OnIdle ( wxIdleEvent & event ) [inherited]

Definition at line 165 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvas::UpdateTime().

void OpenGLCanvas::OnMotion ( wxMouseEvent & event ) [inherited]

Definition at line 118 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MotionTranslation().

void OpenGLCanvas::OnMouseDown ( wxMouseEvent & event ) [inherited]

Definition at line 137 of file OpenGLCanvas.cpp.

void OpenGLCanvas::OnMouseWheel ( wxMouseEvent & event ) [inherited]

Definition at line 146 of file OpenGLCanvas.cpp.

References BIASBREAK, BIASWARN, BIAS::OpenGLCanvas::GetViewController(), and BIAS::CameraViewController::MoveToCenter().

void BIAS::OpenGLCanvasBase::OnPaint ( wxPaintEvent & event ) [inherited]

void OpenGLCanvasBase::OnSize ( wxSizeEvent & event ) [inherited]

Definition at line 923 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::Reshape().

std::ostream & OpenGLCanvasBase::PrintHelp ( std::ostream & os ) [virtual, inherited]

pop up keyboard layout help.

Mut ebe virtualto let child class add their bindings

Definition at line 929 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

void OpenGLCanvas::Reshape ( ) [virtual, inherited]

change of size and aspect ratio.

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 211 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::CameraViewController::GetInternals(), BIAS::OpenGLCanvas::GetViewController(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::CameraViewport::height, BIAS::CameraViewInternals::viewport, and BIAS::CameraViewport::width.

void OpenGLCanvasBase::ScreenShot ( ) [inherited]

JW automatic screenshot to file with filename based on frame, instance etc.

JW

Definition at line 681 of file OpenGLCanvasBase.cpp.

References BIAS_SCREENSHOT_DEFAULT_EXTENSION, BIAS::OpenGLCanvasBase::framecount_, BIAS::OpenGLCanvasBase::instance_, and BIAS::LeadingZeroString().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | const std::string & | filename,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Definition at line 567 of file OpenGLCanvasBase.cpp.

References BIASERR, COUT, BIAS::ImageIO::ExportImage(), FUNCNAME, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::GetWidth(), img, and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | BIAS::ImageBase & | dest,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 593 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and type.

Referenced by MyFrame::OnTestShot().

void BIAS::OpenGLCanvasBase::SetFrameCount ( const unsigned long & newVal ) [inline, inherited]

Definition at line 291 of file OpenGLCanvasBase.hh.

void OpenGLCanvasBase::SetOwnerframe ( wxFrame * ptr ) [inherited]

Definition at line 258 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::p_ownerframe.

void OpenGLCanvasBase::SetStatusText | ( | const wxString & | text,
 |  | const int | c_field = 0
 | ) | [inherited]

let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)

Definition at line 741 of file OpenGLCanvasBase.cpp.

References BIASERR, and BIAS::OpenGLCanvasBase::p_ownerframe.

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvasBase::SetVSync ( const bool & trueForOn ) [static, inherited]

vertical sync control on or off (VSYNC) JW

Definition at line 1135 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::SetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::ShowFPS ( ) [inherited]

simple interface for the above

Definition at line 900 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvas::OnIdle().

void OpenGLCanvasBase::ShowFPS | ( | const int & | framecounter,
 |  | const float & | minUpdateIntervalSec,
 |  | const unsigned int & | minNewFrames,
 |  | const unsigned int | nField
 | ) | [inherited]

shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.

at least minUpdateIntervalSec seconds have passed since prvious update 2. at least minNewFrames were drawn since a previous update Shouls handle multiplem, shared contextst correctly (jw). JW

Definition at line 820 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), and BIAS::OpenGLCanvasBase::SetStatusText().

void OpenGLCanvasBase::ShowValue ( const wxPoint & pos ) [inherited]

Definition at line 780 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::Unproject().

void OpenGLCanvasBase::StereoI_CaptureStereoImage | ( | const int & | format,
 |  | const int & | quality
 | ) | [static, inherited]

Definition at line 1294 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_GetConvergence ( ) [static, inherited]

Definition at line 1278 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::StereoI_GetInfo ( std::ostream & os = std::cout ) [static, inherited]

query status information on current NVStereo rendering state JW

Definition at line 1213 of file OpenGLCanvasBase.cpp.

References BIASERR, Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_Init().

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), and BIAS::OpenGLCanvasBase::OnChar().

float OpenGLCanvasBase::StereoI_GetSeparation ( ) [static, inherited]

Definition at line 1262 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_GetStereoState ( ) [static, inherited]

wrappers for StereoI interface

Definition at line 1246 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_Init ( ) [static, inherited]

interace to NVidias consumer Stereo NVStereo driver API.

to enable/disbale stereo and control convergence and separation for stereo rendering

Returns:
0 on success, negative on error.
Author:
Jan Woetzel

Definition at line 1172 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, and g_pStereoAPI.

Referenced by Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_GetInfo().

float OpenGLCanvasBase::StereoI_SetConvergence ( const float & val ) [static, inherited]

Definition at line 1286 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_SetSeparation ( const float & val ) [static, inherited]

Definition at line 1270 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_SetStereoState ( const int & val ) [static, inherited]

Definition at line 1254 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::SwapBuffers ( ) [inherited]

expands parents SwapBUffers by automatic framecount increase

Definition at line 282 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::framecount_.

Referenced by BIAS::OpenGLCanvasBase::Display().

void OpenGLCanvasBase::ToggleFullScreen ( ) [inherited]

Definition at line 876 of file OpenGLCanvasBase.cpp.

References BIAS::RenderModeGL::drawbuffermode, OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE, BIAS::OpenGLCanvasBase::p_ownerframe, BIAS::OpenGLCanvasBase::rendermode, and BIAS::STEREO_CONSUMER_NV.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

bool OpenGLCanvasBase::ToggleIP ( bool & value ) [static, inherited]

helper toggling a bool value in place

Returns:
new value JW

Definition at line 1164 of file OpenGLCanvasBase.cpp.

bool OpenGLCanvasBase::ToggleVSync ( ) [static, inherited]

try to toggle VSync setting.

Returns:
true if toggling worked, false if status persisted.

Definition at line 1150 of file OpenGLCanvasBase.cpp.

References act, BIAS::OpenGLCanvasBase::GetVSync(), and BIAS::OpenGLCanvasBase::SetVSync().

Referenced by BIAS::OpenGLCanvasBase::OnChar().

BIAS::Vector3< float > OpenGLCanvasBase::Unproject | ( | const wxPoint & | pos2d,
 |  | double & | d
 | ) | [inherited]

computes 3D coordinate from 2D+Z by "unprojection" JW

Definition at line 530 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvas::UpdateTime ( ) [virtual, inherited]

sets the internal time param, by default based on realtime wall clock

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 186 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::OpenGLCanvas::realtimeAnimation, TARGET_FPS, BIAS::OpenGLCanvasBase::time, and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvas::OnIdle().

Member Data Documentation

GLenum BIAS::OpenGLCanvas::_polygonmodeGL [protected, inherited]

Definition at line 142 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled [static, inherited]

Definition at line 343 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvas::UpdateTime().

int MyGLCanvas2::dplist

Examples:
ExampleGLShared.cpp.

Definition at line 100 of file ExampleGLShared.hh.

Referenced by DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::framecount_ [protected, inherited]

Definition at line 348 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::OpenGLCanvasBase::SwapBuffers().

bool OpenGLCanvas::idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled [static, inherited]

Definition at line 127 of file OpenGLCanvas.hh.

bool BIAS::OpenGLCanvasBase::InitWithContextDone_ [protected, inherited]

Definition at line 354 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::InitWithContext().

unsigned int BIAS::OpenGLCanvasBase::instance_ [protected, inherited]

Definition at line 356 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::ScreenShot().

unsigned int OpenGLCanvasBase::instancesTotalNo_ = 0 [static, protected, inherited]

Definition at line 357 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::OpenGLCanvasBase().

BIAS::DrawTextGL* BIAS::OpenGLCanvasBase::p_font [protected, inherited]

Definition at line 365 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and BIAS::OpenGLCanvasBase::InitWithContext().

wxFrame* BIAS::OpenGLCanvasBase::p_ownerframe [protected, inherited]

Definition at line 351 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetOwnerframe(), BIAS::OpenGLCanvasBase::OpenGLCanvasBase(), BIAS::OpenGLCanvasBase::SetOwnerframe(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

CameraViewController* BIAS::OpenGLCanvas::p_viewCtrl_ [protected, inherited]

Definition at line 138 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::GetViewController(), and BIAS::OpenGLCanvas::InitMembers().

bool OpenGLCanvas::realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation [static, inherited]

Definition at line 129 of file OpenGLCanvas.hh.

Referenced by BIAS::OpenGLCanvas::UpdateTime().

BIAS::RenderModeGL BIAS::OpenGLCanvasBase::rendermode [protected, inherited]

Definition at line 360 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

double OpenGLCanvasBase::time = 0.0 [static, inherited]

Definition at line 341 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::UpdateTime(), and BIAS::OpenGLCanvas::UpdateTime().

The documentation for this class was generated from the following files:
  • Gui/Examples/ExampleGLShared.hh
  • Gui/Examples/ExampleGLShared.cpp
Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::MySampleGrabberCB Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::MySampleGrabberCB

BIAS::MySampleGrabberCB Class Reference

#include <VideoSource/VideoSource_DSHOW.hh>

Collaboration diagram for BIAS::MySampleGrabberCB:

[legend]
List of all members.

Public Member Functions

STDMETHODIMP | BufferCB (double SampleTime, BYTE *pBuffer, long BufferLen)
MySampleGrabberCB (int width, int height, int depth)
STDMETHODIMP | QueryInterface (REFIID riid, void **ppv)
STDMETHODIMP | SampleCB (double SampleTime, IMediaSample *pSample)
STDMETHODIMP_ (ULONG) Release()
STDMETHODIMP_ (ULONG) AddRef()
~MySampleGrabberCB ()

Public Attributes

BIAS::Camera< unsigned char > | camera_

Protected Attributes

AM_MEDIA_TYPE | mediaType

Detailed Description

Definition at line 30 of file VideoSource_DSHOW.hh.

Constructor & Destructor Documentation

MySampleGrabberCB::MySampleGrabberCB | ( | int | width,
 |  | int | height,
 |  | int | depth
 | ) |

Definition at line 731 of file VideoSource_DSHOW.cpp.

References camera_, BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::Init(), and BIAS::Image< StorageType >::Release().

MySampleGrabberCB::~MySampleGrabberCB ( )

Definition at line 740 of file VideoSource_DSHOW.cpp.

References camera_, BIAS::Image< StorageType >::GetImageData(), and BIAS::Image< StorageType >::Release().

Member Function Documentation

STDMETHODIMP MySampleGrabberCB::BufferCB | ( | double | SampleTime,
 |  | BYTE * | pBuffer,
 |  | long | BufferLen
 | ) |

Definition at line 745 of file VideoSource_DSHOW.cpp.

References camera_, and BIAS::Image< StorageType >::GetImageData().

STDMETHODIMP MySampleGrabberCB::QueryInterface | ( | REFIID | riid,
 |  | void ** | ppv
 | ) |

Definition at line 767 of file VideoSource_DSHOW.cpp.

STDMETHODIMP MySampleGrabberCB::SampleCB | ( | double | SampleTime,
 |  | IMediaSample * | pSample
 | ) |

Definition at line 753 of file VideoSource_DSHOW.cpp.

References camera_, and BIAS::Image< StorageType >::GetImageData().

BIAS::MySampleGrabberCB::STDMETHODIMP_ ( ULONG ) [inline]

Definition at line 53 of file VideoSource_DSHOW.hh.

BIAS::MySampleGrabberCB::STDMETHODIMP_ ( ULONG ) [inline]

Definition at line 52 of file VideoSource_DSHOW.hh.

Member Data Documentation

BIAS::Camera<unsigned char> BIAS::MySampleGrabberCB::camera_

Definition at line 39 of file VideoSource_DSHOW.hh.

Referenced by BufferCB(), BIAS::VideoSource_DSHOW::GrabSingle(), MySampleGrabberCB(), SampleCB(), and ~MySampleGrabberCB().

AM_MEDIA_TYPE BIAS::MySampleGrabberCB::mediaType [protected]

Definition at line 35 of file VideoSource_DSHOW.hh.

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DSHOW.hh
  • VideoSource/VideoSource_DSHOW.cpp
Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyTemplate< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyTemplate< T > Class Template Reference

Inheritance diagram for MyTemplate< T >:

[legend]
Collaboration diagram for MyTemplate< T >:

[legend]
List of all members.

Public Member Functions

DerivedFrom ()
MyTemplate ()

Static Public Member Functions

static void Constraints (T *p)

Detailed Description

template<class T>
class MyTemplate< T >

Definition at line 48 of file ExampleConstraints.cpp.

Constructor & Destructor Documentation

template<class T>
MyTemplate< T >::MyTemplate ( ) [inline]

Definition at line 52 of file ExampleConstraints.cpp.

Member Function Documentation

static void BIAS::DerivedFrom< T , Base >::Constraints ( T * p ) [inline, static, inherited]

Definition at line 38 of file Constraints.hh.

BIAS::DerivedFrom< T , Base >::DerivedFrom ( ) [inline, inherited]

Definition at line 44 of file Constraints.hh.

References BIAS::DerivedFrom< T, B >::Constraints(), p, T, and void.

The documentation for this class was generated from the following file:
  • Base/Debug/Examples/ExampleConstraints.cpp
Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: myTestClass Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

myTestClass Class Reference

Inheritance diagram for myTestClass:

[legend]
Collaboration diagram for myTestClass:

[legend]
List of all members.

Public Member Functions

int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const =0
derived classes must implement this, so that it returns the name of the class for the top level tag in the XML file
virtual int | XMLGetClassName (string &TopLevelTag, double &Version) const
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
derived classes must implement this to read everything in Node into (*this).
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
derived classes must implement this to write the code of (*this) into the XML tree
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~myTestClass ()

Public Attributes

int | thedata

Private Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Private Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Private Attributes

long int | _liDebugLevel

Static Private Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 12 of file ExampleXMLBase.cpp.

Constructor & Destructor Documentation

myTestClass::~myTestClass ( ) [virtual]

Definition at line 23 of file ExampleXMLBase.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

virtual int BIAS::XMLBase::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [pure virtual, inherited]

derived classes must implement this, so that it returns the name of the class for the top level tag in the XML file

Implemented in BIAS::PMatrix, BIAS::Projection, BIAS::ProjectionParametersBase, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by BIAS::XMLBase::XMLAdd(), BIAS::XMLBase::XMLRead(), BIAS::XMLBase::XMLReadFromString(), and BIAS::XMLBase::XMLWrite().

virtual int myTestClass::XMLGetClassName | ( | string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

int myTestClass::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

derived classes must implement this to read everything in Node into (*this).

Returns:
0 on success, <0 on error

Implements BIAS::XMLBase.

Definition at line 38 of file ExampleXMLBase.cpp.

References BIAS::XMLIO::getAttributeValueInt(), and thedata.

int myTestClass::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

derived classes must implement this to write the code of (*this) into the XML tree

Parameters:
node always points to a node with a name given by the function XMLGetTopLevelName

Implements BIAS::XMLBase.

Definition at line 32 of file ExampleXMLBase.cpp.

References BIAS::XMLIO::addAttribute(), and thedata.

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int myTestClass::thedata

Definition at line 18 of file ExampleXMLBase.cpp.

Referenced by main(), XMLIn(), and XMLOut().

The documentation for this class was generated from the following file:
  • Base/Common/Examples/ExampleXMLBase.cpp
Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MyUnscentedTransform Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyUnscentedTransform Class Reference

Inheritance diagram for MyUnscentedTransform:

[legend]
Collaboration diagram for MyUnscentedTransform:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
MyUnscentedTransform ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const
virtual | ~MyUnscentedTransform ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
double | Kappa_
kappa is a secondary scaling parameter.

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 64 of file ExampleUnscentedTransform.cpp.

Constructor & Destructor Documentation

MyUnscentedTransform::MyUnscentedTransform ( ) [inline]

Definition at line 68 of file ExampleUnscentedTransform.cpp.

virtual MyUnscentedTransform::~MyUnscentedTransform ( ) [inline, virtual]

Definition at line 74 of file ExampleUnscentedTransform.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

virtual void MyUnscentedTransform::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [inline, protected, virtual]

Implements BIAS::UnscentedTransform.

Definition at line 78 of file ExampleUnscentedTransform.cpp.

References MyLinTransform().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

The documentation for this class was generated from the following file:
  • MathAlgo/Examples/ExampleUnscentedTransform.cpp
Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Namelist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Namelist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef char * | name
typedef char * | name
typedef int | nvars
typedef int | nvars
typedef Vardesc ** | vars
typedef Vardesc ** | vars

Detailed Description

Definition at line 150 of file f2c_gnu011.h.

Member Typedef Documentation

typedef char* Namelist::name

Definition at line 147 of file win32_f2c.h.

typedef char* Namelist::name

Definition at line 151 of file f2c_gnu011.h.

typedef int Namelist::nvars

Definition at line 149 of file win32_f2c.h.

typedef int Namelist::nvars

Definition at line 153 of file f2c_gnu011.h.

typedef Vardesc** Namelist::vars

Definition at line 148 of file win32_f2c.h.

typedef Vardesc** Namelist::vars

Definition at line 152 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NonBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

NonBase Class Reference

List of all members.

Public Member Functions

NonBase ()

Detailed Description

Definition at line 35 of file ExampleConstraints.cpp.

Constructor & Destructor Documentation

NonBase::NonBase ( ) [inline]

Definition at line 37 of file ExampleConstraints.cpp.

The documentation for this class was generated from the following file:
  • Base/Debug/Examples/ExampleConstraints.cpp
Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Normalization Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Normalization

BIAS::Normalization Class Reference
[Geometry and Transformations]

class Normalization Functions, e.g. More...

#include <Base/Geometry/Normalization.hh>

List of all members.

Public Member Functions

int Hartley (const std::vector< HomgPoint2D > &Points, std::vector< HomgPoint2D > &NormPoints, KMatrix &Normalization) const
linearly transform Points with 3x3 matrix, such that they have mean zero and stddev sqrt(2)
Normalization ()
default constructor, does nothing

Detailed Description

class Normalization Functions, e.g.

Hartley

Author:
koeser 07/2004

Definition at line 45 of file Normalization.hh.

Constructor & Destructor Documentation

BIAS::Normalization::Normalization ( ) [inline]

default constructor, does nothing

Definition at line 49 of file Normalization.hh.

Member Function Documentation

int BIAS::Normalization::Hartley | ( | const std::vector< HomgPoint2D > & | Points,
 |  | std::vector< HomgPoint2D > & | NormPoints,
 |  | KMatrix & | Normalization
 | ) | const

linearly transform Points with 3x3 matrix, such that they have mean zero and stddev sqrt(2)

Parameters:
Points | original (homogenized) points
NormPoints | normalized (homogenized) points correponding to Points
Normalization | matrix used for normalization
Author:
koeser

Referenced by BIAS::FMatrixEstimation::Linear(), and BIAS::FMatrixEstimation::SevenPoint().

The documentation for this class was generated from the following file:
  • Base/Geometry/Normalization.hh
Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: olist Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

olist Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef char * | oacc
typedef char * | oacc
typedef char * | oblnk
typedef char * | oblnk
typedef flag | oerr
typedef flag | oerr
typedef char * | ofm
typedef char * | ofm
typedef char * | ofnm
typedef char * | ofnm
typedef ftnlen | ofnmlen
typedef ftnlen | ofnmlen
typedef ftnint | orl
typedef ftnint | orl
typedef char * | osta
typedef char * | osta
typedef ftnint | ounit
typedef ftnint | ounit

Detailed Description

Definition at line 70 of file f2c_gnu011.h.

Member Typedef Documentation

typedef char* olist::oacc

Definition at line 72 of file win32_f2c.h.

typedef char* olist::oacc

Definition at line 76 of file f2c_gnu011.h.

typedef char* olist::oblnk

Definition at line 75 of file win32_f2c.h.

typedef char* olist::oblnk

Definition at line 79 of file f2c_gnu011.h.

typedef flag olist::oerr

Definition at line 67 of file win32_f2c.h.

typedef flag olist::oerr

Definition at line 71 of file f2c_gnu011.h.

typedef char* olist::ofm

Definition at line 73 of file win32_f2c.h.

typedef char* olist::ofm

Definition at line 77 of file f2c_gnu011.h.

typedef char* olist::ofnm

Definition at line 69 of file win32_f2c.h.

typedef char* olist::ofnm

Definition at line 73 of file f2c_gnu011.h.

typedef ftnlen olist::ofnmlen

Definition at line 70 of file win32_f2c.h.

typedef ftnlen olist::ofnmlen

Definition at line 74 of file f2c_gnu011.h.

typedef ftnint olist::orl

Definition at line 74 of file win32_f2c.h.

typedef ftnint olist::orl

Definition at line 78 of file f2c_gnu011.h.

typedef char* olist::osta

Definition at line 71 of file win32_f2c.h.

typedef char* olist::osta

Definition at line 75 of file f2c_gnu011.h.

typedef ftnint olist::ounit

Definition at line 68 of file win32_f2c.h.

typedef ftnint olist::ounit

Definition at line 72 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::OpenGLCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::OpenGLCanvas

BIAS::OpenGLCanvas Class Reference
[Graphical User Interfaces]

OpenGL canvases with additinal event handling (JW). More...

#include <Gui/OpenGLCanvas.hh>

Inheritance diagram for BIAS::OpenGLCanvas:

[legend]
Collaboration diagram for BIAS::OpenGLCanvas:

[legend]
List of all members.

Public Member Functions

virtual void | Display ()
main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance
virtual void | DisplayCalls ()
virtual void | DisplayCameraView ()
display call to be overridden by child classes
virtual void | DisplayCameraViewExternalParams ()
virtual void | DisplayCameraViewInternalParams ()
virtual void | DisplayClear ()
clears buffers and resets virtual camera to identity
void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
virtual void | DisplayRenderMode ()
display default shade model, polygon mode,
void DisplaySelectBuffer ()
useful for quadbuffered stereo, e.g. shutetr glasses
float | GetAspectRatio () const
GetAspectRatio is X/Y.
unsigned long | GetFrameCount () const
unsigned int | GetHeight () const
virtual void | GetInfoGL (std::ostream &os=std::cout)
return GL state info
wxFrame * | GetOwnerframe ()
float | GetPixelValueDepth (const wxPoint &pos2d) const
BIAS::Vector3< float > | GetPixelValueRGB (const wxPoint &pos2d)
BIAS::Vector4< float > | GetPixelValueRGBA (const wxPoint &pos2d)
CameraViewController & GetViewController ()
CameraViewController | GetViewController () const
unsigned int | GetWidth () const
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
virtual void | InitWithContext ()
init all things that need a context.
bool | IsContextAvailable ()
activates the current rendereing context if there is one and
virtual void | OnChar (wxKeyEvent &event)
void | OnEraseBackground (wxEraseEvent &event)
void | OnIdle (wxIdleEvent &event)
void | OnMotion (wxMouseEvent &event)
void | OnMouseDown (wxMouseEvent &event)
void | OnMouseWheel (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnSize (wxSizeEvent &event)
OpenGLCanvas (wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=0, const wxPalette &palette=wxNullPalette)
constructor using a shared context
OpenGLCanvas (wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=NULL, const wxPalette &palette=wxNullPalette)
virtual std::ostream & | PrintHelp (std::ostream &os)
pop up keyboard layout help.
virtual void | Reshape ()
change of size and aspect ratio.
void ScreenShot ()
JW automatic screenshot to file with filename based on frame, instance etc.
void | ScreenShot (const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | ScreenShot (BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | SetFrameCount (const unsigned long &newVal)
void | SetOwnerframe (wxFrame *ptr)
void | SetStatusText (const wxString &text, const int c_field=0)
let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)
void ShowFPS ()
simple interface for the above
void | ShowFPS (const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField)
shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.
void | ShowValue (const wxPoint &pos)
void SwapBuffers ()
expands parents SwapBUffers by automatic framecount increase
void ToggleFullScreen ()
BIAS::Vector3< float > | Unproject (const wxPoint &pos2d, double &d)
computes 3D coordinate from 2D+Z by "unprojection" JW
virtual void | UpdateTime ()
sets the internal time param, by default based on realtime wall clock
virtual | ~OpenGLCanvas ()
destructor

Static Public Member Functions

static void | DisplaySampleScene ()
display soem very simple Gl calls to draw something at all
static bool | GetVSync ()
static void | SetVSync (const bool &trueForOn)
vertical sync control on or off (VSYNC) JW
static void | StereoI_CaptureStereoImage (const int &format, const int &quality)
static float | StereoI_GetConvergence ()
static void | StereoI_GetInfo (std::ostream &os=std::cout)
query status information on current NVStereo rendering state JW
static float | StereoI_GetSeparation ()
static int | StereoI_GetStereoState ()
wrappers for StereoI interface
static int | StereoI_Init ()
interace to NVidias consumer Stereo NVStereo driver API.
static float | StereoI_SetConvergence (const float &val)
static float | StereoI_SetSeparation (const float &val)
static int | StereoI_SetStereoState (const int &val)
static bool | ToggleIP (bool &value)
helper toggling a bool value in place
static bool | ToggleVSync ()
try to toggle VSync setting.

Static Public Attributes

static bool | animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
static bool | idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled
static bool | realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation
static double | time = 0.0

Protected Attributes

GLenum | _polygonmodeGL
unsigned long | framecount_
bool | InitWithContextDone_
unsigned int | instance_
BIAS::DrawTextGL * p_font
wxFrame * | p_ownerframe
CameraViewController * p_viewCtrl_
BIAS::RenderModeGL rendermode

Static Protected Attributes

static unsigned int | instancesTotalNo_ = 0

Detailed Description

OpenGL canvases with additinal event handling (JW).

In addition to OpenGLCanvasbase "automatioc" event handling is integrated, e.g. -Display value under mouse in status bar, -internal storage of camera view, -navigation through mouse and keys And it is optionally adding -automatic repaint by Onidle function (like in glut) -automatic update of time for animations.

Author:
Jan Woetzel

Definition at line 67 of file OpenGLCanvas.hh.

Constructor & Destructor Documentation

OpenGLCanvas::~OpenGLCanvas ( ) [virtual]

destructor

Definition at line 43 of file OpenGLCanvas.cpp.

OpenGLCanvas::OpenGLCanvas | ( | wxFrame * | parent,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("OpenGLCanvas"),
 |  | int * | attribList = NULL,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

Definition at line 49 of file OpenGLCanvas.cpp.

References InitMembers().

OpenGLCanvas::OpenGLCanvas | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext = NULL,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("OpenGLCanvas"),
 |  | int * | attribList = 0,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

Definition at line 67 of file OpenGLCanvas.cpp.

References InitMembers().

Member Function Documentation

void OpenGLCanvasBase::Display ( ) [virtual, inherited]

main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance

Author:
Jan Woetzel.

Definition at line 288 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::DisplayCalls(), BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::SwapBuffers(), and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), OnIdle(), BIAS::OpenGLCanvasBase::Reshape(), Reshape(), and BIAS::ImageCanvasGLBase::Set().

void OpenGLCanvasBase::DisplayCalls ( ) [virtual, inherited]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented in MyGLCanvas, MyGLCanvas2, MyGLCanvas, and BIAS::ImageCanvasGLBase.

Definition at line 334 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::DisplayClear(), and BIAS::OpenGLCanvasBase::DisplaySampleScene().

Referenced by BIAS::OpenGLCanvasBase::Display().

void OpenGLCanvas::DisplayCameraView ( ) [virtual]

display call to be overridden by child classes

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 99 of file OpenGLCanvas.cpp.

References DisplayCameraViewExternalParams(), and DisplayCameraViewInternalParams().

void OpenGLCanvas::DisplayCameraViewExternalParams ( ) [virtual]

Definition at line 111 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLExternal(), and GetViewController().

Referenced by DisplayCameraView().

void OpenGLCanvas::DisplayCameraViewInternalParams ( ) [virtual]

Definition at line 106 of file OpenGLCanvas.cpp.

References BIAS::CameraViewController::DisplayGLInternal(), and GetViewController().

Referenced by DisplayCameraView().

void OpenGLCanvasBase::DisplayClear ( ) [virtual, inherited]

clears buffers and resets virtual camera to identity

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 401 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::GeometryGL::DisplayClear().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) | [inherited]

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 421 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIAS::GeometryGL::DisplayCoordCross(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), and BIAS::OpenGLCanvasBase::p_font.

Referenced by MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayRenderMode ( ) [virtual, inherited]

display default shade model, polygon mode,

Examples:
ExampleGLShared.cpp.

Definition at line 408 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplayRenderMode(), and BIAS::OpenGLCanvasBase::rendermode.

Referenced by BIAS::OpenGLCanvasBase::Display(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplaySampleScene ( ) [static, inherited]

display soem very simple Gl calls to draw something at all

Definition at line 415 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplaySceneExampleSimple().

Referenced by BIAS::OpenGLCanvasBase::DisplayCalls().

void OpenGLCanvasBase::DisplaySelectBuffer ( ) [inherited]

useful for quadbuffered stereo, e.g. shutetr glasses

Definition at line 347 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::drawbuffermode, BIAS::MONO, BIAS::OpenGLCanvasBase::rendermode, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_QUADBUFFERED, and BIAS::STEREO_UNTOUCHED.

Referenced by BIAS::OpenGLCanvasBase::Display().

float OpenGLCanvasBase::GetAspectRatio ( ) const [inherited]

GetAspectRatio is X/Y.

Returns:
aspect 'X/Y' = ratio of width being 'bigger' than reference height
Examples:
ExampleGLShared.cpp.

Definition at line 468 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::GetHeight(), and BIAS::OpenGLCanvasBase::GetWidth().

Referenced by MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::GetFrameCount ( ) const [inline, inherited]

Definition at line 290 of file OpenGLCanvasBase.hh.

unsigned int OpenGLCanvasBase::GetHeight ( ) const [inherited]

Definition at line 458 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::Reshape(), Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::GetInfoGL ( std::ostream & os = std::cout ) [virtual]

return GL state info

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 203 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::GetInfoGL(), GetViewController(), and BIAS::CameraViewController::Print().

wxFrame * OpenGLCanvasBase::GetOwnerframe ( ) [inherited]

Definition at line 252 of file OpenGLCanvasBase.cpp.

References BIASASSERT, and BIAS::OpenGLCanvasBase::p_ownerframe.

float OpenGLCanvasBase::GetPixelValueDepth ( const wxPoint & pos2d ) const [inherited]

Definition at line 514 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::OpenGLCanvasBase::GetHeight().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

BIAS::Vector3< float > OpenGLCanvasBase::GetPixelValueRGB ( const wxPoint & pos2d ) [inherited]

Definition at line 475 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector3< T >::Set().

BIAS::Vector4< float > OpenGLCanvasBase::GetPixelValueRGBA ( const wxPoint & pos2d ) [inherited]

Definition at line 495 of file OpenGLCanvasBase.cpp.

References BIASERR, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::IsContextAvailable(), and BIAS::Vector4< T >::Set().

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

CameraViewController & OpenGLCanvas::GetViewController ( )

Definition at line 223 of file OpenGLCanvas.cpp.

References BIASASSERT, and p_viewCtrl_.

CameraViewController OpenGLCanvas::GetViewController ( ) const

Definition at line 228 of file OpenGLCanvas.cpp.

References BIASASSERT, and p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls(), DisplayCameraViewExternalParams(), DisplayCameraViewInternalParams(), GetInfoGL(), OnMotion(), OnMouseWheel(), and Reshape().

bool OpenGLCanvasBase::GetVSync ( ) [static, inherited]

Returns:
true if vertical sync is enable, false for free running mode JW

Definition at line 1144 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::GetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleVSync().

unsigned int OpenGLCanvasBase::GetWidth ( ) const [inherited]

Definition at line 449 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetAspectRatio(), BIAS::OpenGLCanvasBase::Reshape(), Reshape(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvas::InitMembers ( ) [virtual]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Reimplemented from BIAS::OpenGLCanvasBase.

Reimplemented in BIAS::ImageCanvasGLBase.

Definition at line 86 of file OpenGLCanvas.cpp.

References _polygonmodeGL, BIAS::OpenGLCanvasBase::InitMembers(), and p_viewCtrl_.

Referenced by BIAS::ImageCanvasGLBase::InitMembers(), and OpenGLCanvas().

void OpenGLCanvasBase::InitWithContext ( ) [virtual, inherited]

init all things that need a context.

sets _InitWithContextDone

Definition at line 137 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, BIAS::OpenGLCanvasBase::GetVSync(), BIAS::DrawTextGL::InitFont(), BIAS::OpenGLCanvasBase::InitWithContextDone_, BIAS::OpenGLCanvasBase::IsContextAvailable(), BIAS::OpenGLCanvasBase::p_font, BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::SetVSync(), and BIAS::RenderModeGL::vsync.

Referenced by BIAS::OpenGLCanvasBase::Display().

bool OpenGLCanvasBase::IsContextAvailable ( ) [inherited]

activates the current rendereing context if there is one and

Returns:
true if gl rendering context is available, false if there is none available (yet).

Definition at line 218 of file OpenGLCanvasBase.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), and BIAS::OpenGLCanvasBase::InitWithContext().

void OpenGLCanvasBase::OnChar ( wxKeyEvent & event ) [virtual, inherited]

Definition at line 957 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, BIAS::AsciiToWx(), BIASASSERT, BIASERR, COUT, BIAS::RenderModeGL::cullface, BIAS::OpenGLCanvasBase::Display(), BIAS::RenderModeGL::enable_cullface, BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::GetVSync(), BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, BIAS::OpenGLCanvasBase::PrintHelp(), BIAS::OpenGLCanvasBase::rendermode, BIAS::OpenGLCanvasBase::ScreenShot(), BIAS::OpenGLCanvasBase::SetStatusText(), BIAS::RenderModeGL::shademodel, BIAS::OpenGLCanvasBase::StereoI_GetInfo(), BIAS::OpenGLCanvasBase::ToggleFullScreen(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::OnEraseBackground ( wxEraseEvent & event ) [inherited]

Definition at line 1129 of file OpenGLCanvasBase.cpp.

void OpenGLCanvas::OnIdle ( wxIdleEvent & event )

Definition at line 165 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::ShowFPS(), and UpdateTime().

void OpenGLCanvas::OnMotion ( wxMouseEvent & event )

Definition at line 118 of file OpenGLCanvas.cpp.

References GetViewController(), and BIAS::CameraViewController::MotionTranslation().

void OpenGLCanvas::OnMouseDown ( wxMouseEvent & event )

Definition at line 137 of file OpenGLCanvas.cpp.

void OpenGLCanvas::OnMouseWheel ( wxMouseEvent & event )

Definition at line 146 of file OpenGLCanvas.cpp.

References BIASBREAK, BIASWARN, GetViewController(), and BIAS::CameraViewController::MoveToCenter().

void BIAS::OpenGLCanvasBase::OnPaint ( wxPaintEvent & event ) [inherited]

void OpenGLCanvasBase::OnSize ( wxSizeEvent & event ) [inherited]

Definition at line 923 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::Reshape().

std::ostream & OpenGLCanvasBase::PrintHelp ( std::ostream & os ) [virtual, inherited]

pop up keyboard layout help.

Mut ebe virtualto let child class add their bindings

Definition at line 929 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

void OpenGLCanvas::Reshape ( ) [virtual]

change of size and aspect ratio.

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 211 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::CameraViewController::GetInternals(), GetViewController(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::CameraViewport::height, BIAS::CameraViewInternals::viewport, and BIAS::CameraViewport::width.

void OpenGLCanvasBase::ScreenShot ( ) [inherited]

JW automatic screenshot to file with filename based on frame, instance etc.

JW

Definition at line 681 of file OpenGLCanvasBase.cpp.

References BIAS_SCREENSHOT_DEFAULT_EXTENSION, BIAS::OpenGLCanvasBase::framecount_, BIAS::OpenGLCanvasBase::instance_, and BIAS::LeadingZeroString().

Referenced by BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | const std::string & | filename,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Definition at line 567 of file OpenGLCanvasBase.cpp.

References BIASERR, COUT, BIAS::ImageIO::ExportImage(), FUNCNAME, BIAS::OpenGLCanvasBase::GetHeight(), BIAS::OpenGLCanvasBase::GetWidth(), img, and BIAS::OpenGLCanvasBase::ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | BIAS::ImageBase & | dest,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) | [inherited]

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 593 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::OpenGLCanvasBase::GetHeight(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::OpenGLCanvasBase::GetWidth(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and type.

Referenced by MyFrame::OnTestShot().

void BIAS::OpenGLCanvasBase::SetFrameCount ( const unsigned long & newVal ) [inline, inherited]

Definition at line 291 of file OpenGLCanvasBase.hh.

void OpenGLCanvasBase::SetOwnerframe ( wxFrame * ptr ) [inherited]

Definition at line 258 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::p_ownerframe.

void OpenGLCanvasBase::SetStatusText | ( | const wxString & | text,
 |  | const int | c_field = 0
 | ) | [inherited]

let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)

Definition at line 741 of file OpenGLCanvasBase.cpp.

References BIASERR, and BIAS::OpenGLCanvasBase::p_ownerframe.

Referenced by BIAS::OpenGLCanvasBase::OnChar(), BIAS::OpenGLCanvasBase::ShowFPS(), and BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvasBase::SetVSync ( const bool & trueForOn ) [static, inherited]

vertical sync control on or off (VSYNC) JW

Definition at line 1135 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::SetVSyncInterval().

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), and BIAS::OpenGLCanvasBase::ToggleVSync().

void OpenGLCanvasBase::ShowFPS ( ) [inherited]

simple interface for the above

Definition at line 900 of file OpenGLCanvasBase.cpp.

Referenced by OnIdle().

void OpenGLCanvasBase::ShowFPS | ( | const int & | framecounter,
 |  | const float & | minUpdateIntervalSec,
 |  | const unsigned int & | minNewFrames,
 |  | const unsigned int | nField
 | ) | [inherited]

shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.

at least minUpdateIntervalSec seconds have passed since prvious update 2. at least minNewFrames were drawn since a previous update Shouls handle multiplem, shared contextst correctly (jw). JW

Definition at line 820 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), and BIAS::OpenGLCanvasBase::SetStatusText().

void OpenGLCanvasBase::ShowValue ( const wxPoint & pos ) [inherited]

Definition at line 780 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), CHECK_GL_ERROR, BIAS::OpenGLCanvasBase::GetPixelValueDepth(), BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::Unproject().

void OpenGLCanvasBase::StereoI_CaptureStereoImage | ( | const int & | format,
 |  | const int & | quality
 | ) | [static, inherited]

Definition at line 1294 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_GetConvergence ( ) [static, inherited]

Definition at line 1278 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::StereoI_GetInfo ( std::ostream & os = std::cout ) [static, inherited]

query status information on current NVStereo rendering state JW

Definition at line 1213 of file OpenGLCanvasBase.cpp.

References BIASERR, Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_Init().

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), and BIAS::OpenGLCanvasBase::OnChar().

float OpenGLCanvasBase::StereoI_GetSeparation ( ) [static, inherited]

Definition at line 1262 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_GetStereoState ( ) [static, inherited]

wrappers for StereoI interface

Definition at line 1246 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_Init ( ) [static, inherited]

interace to NVidias consumer Stereo NVStereo driver API.

to enable/disbale stereo and control convergence and separation for stereo rendering

Returns:
0 on success, negative on error.
Author:
Jan Woetzel

Definition at line 1172 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, and g_pStereoAPI.

Referenced by Get_pStereoAPI(), and BIAS::OpenGLCanvasBase::StereoI_GetInfo().

float OpenGLCanvasBase::StereoI_SetConvergence ( const float & val ) [static, inherited]

Definition at line 1286 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_SetSeparation ( const float & val ) [static, inherited]

Definition at line 1270 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_SetStereoState ( const int & val ) [static, inherited]

Definition at line 1254 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::SwapBuffers ( ) [inherited]

expands parents SwapBUffers by automatic framecount increase

Definition at line 282 of file OpenGLCanvasBase.cpp.

References BIAS::OpenGLCanvasBase::framecount_.

Referenced by BIAS::OpenGLCanvasBase::Display().

void OpenGLCanvasBase::ToggleFullScreen ( ) [inherited]

Definition at line 876 of file OpenGLCanvasBase.cpp.

References BIAS::RenderModeGL::drawbuffermode, OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE, BIAS::OpenGLCanvasBase::p_ownerframe, BIAS::OpenGLCanvasBase::rendermode, and BIAS::STEREO_CONSUMER_NV.

Referenced by BIAS::OpenGLCanvasBase::OnChar().

bool OpenGLCanvasBase::ToggleIP ( bool & value ) [static, inherited]

helper toggling a bool value in place

Returns:
new value JW

Definition at line 1164 of file OpenGLCanvasBase.cpp.

bool OpenGLCanvasBase::ToggleVSync ( ) [static, inherited]

try to toggle VSync setting.

Returns:
true if toggling worked, false if status persisted.

Definition at line 1150 of file OpenGLCanvasBase.cpp.

References act, BIAS::OpenGLCanvasBase::GetVSync(), and BIAS::OpenGLCanvasBase::SetVSync().

Referenced by BIAS::OpenGLCanvasBase::OnChar().

BIAS::Vector3< float > OpenGLCanvasBase::Unproject | ( | const wxPoint & | pos2d,
 |  | double & | d
 | ) | [inherited]

computes 3D coordinate from 2D+Z by "unprojection" JW

Definition at line 530 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvasBase::ShowValue().

void OpenGLCanvas::UpdateTime ( ) [virtual]

sets the internal time param, by default based on realtime wall clock

Reimplemented from BIAS::OpenGLCanvasBase.

Definition at line 186 of file OpenGLCanvas.cpp.

References BIAS::OpenGLCanvasBase::animationUpdateEnabled, realtimeAnimation, TARGET_FPS, BIAS::OpenGLCanvasBase::time, and BIAS::OpenGLCanvasBase::UpdateTime().

Referenced by OnIdle().

Member Data Documentation

GLenum BIAS::OpenGLCanvas::_polygonmodeGL [protected]

Definition at line 142 of file OpenGLCanvas.hh.

Referenced by InitMembers().

bool OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled [static, inherited]

Definition at line 343 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::OnChar(), and UpdateTime().

unsigned long BIAS::OpenGLCanvasBase::framecount_ [protected, inherited]

Definition at line 348 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), BIAS::OpenGLCanvasBase::ScreenShot(), and BIAS::OpenGLCanvasBase::SwapBuffers().

bool OpenGLCanvas::idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled [static]

Definition at line 127 of file OpenGLCanvas.hh.

bool BIAS::OpenGLCanvasBase::InitWithContextDone_ [protected, inherited]

Definition at line 354 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::Display(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::InitWithContext().

unsigned int BIAS::OpenGLCanvasBase::instance_ [protected, inherited]

Definition at line 356 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL(), BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::ScreenShot().

unsigned int OpenGLCanvasBase::instancesTotalNo_ = 0 [static, protected, inherited]

Definition at line 357 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::InitMembers(), and BIAS::OpenGLCanvasBase::OpenGLCanvasBase().

BIAS::DrawTextGL* BIAS::OpenGLCanvasBase::p_font [protected, inherited]

Definition at line 365 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and BIAS::OpenGLCanvasBase::InitWithContext().

wxFrame* BIAS::OpenGLCanvasBase::p_ownerframe [protected, inherited]

Definition at line 351 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::GetOwnerframe(), BIAS::OpenGLCanvasBase::OpenGLCanvasBase(), BIAS::OpenGLCanvasBase::SetOwnerframe(), BIAS::OpenGLCanvasBase::SetStatusText(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

CameraViewController* BIAS::OpenGLCanvas::p_viewCtrl_ [protected]

Definition at line 138 of file OpenGLCanvas.hh.

Referenced by GetViewController(), and InitMembers().

bool OpenGLCanvas::realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation [static]

Definition at line 129 of file OpenGLCanvas.hh.

Referenced by UpdateTime().

BIAS::RenderModeGL BIAS::OpenGLCanvasBase::rendermode [protected, inherited]

Definition at line 360 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplayRenderMode(), BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), BIAS::OpenGLCanvasBase::InitWithContext(), BIAS::OpenGLCanvasBase::OnChar(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

double OpenGLCanvasBase::time = 0.0 [static, inherited]

Definition at line 341 of file OpenGLCanvasBase.hh.

Referenced by BIAS::OpenGLCanvasBase::UpdateTime(), and UpdateTime().

The documentation for this class was generated from the following files:
  • Gui/OpenGLCanvas.hh
  • Gui/OpenGLCanvas.cpp
Generated on Wed Jun 21 19:09:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::OpenGLCanvasBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::OpenGLCanvasBase

BIAS::OpenGLCanvasBase Class Reference

#include <Gui/OpenGLCanvasBase.hh>

Inheritance diagram for BIAS::OpenGLCanvasBase:

[legend]
Collaboration diagram for BIAS::OpenGLCanvasBase:

[legend]
List of all members.

Public Member Functions

virtual void | Display ()
main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance
virtual void | DisplayCalls ()
virtual void | DisplayClear ()
clears buffers and resets virtual camera to identity
void | DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
virtual void | DisplayRenderMode ()
display default shade model, polygon mode,
void DisplaySelectBuffer ()
useful for quadbuffered stereo, e.g. shutetr glasses
float | GetAspectRatio () const
GetAspectRatio is X/Y.
unsigned long | GetFrameCount () const
unsigned int | GetHeight () const
virtual void | GetInfoGL (std::ostream &os)
return GL state information
wxFrame * | GetOwnerframe ()
float | GetPixelValueDepth (const wxPoint &pos2d) const
BIAS::Vector3< float > | GetPixelValueRGB (const wxPoint &pos2d)
BIAS::Vector4< float > | GetPixelValueRGBA (const wxPoint &pos2d)
unsigned int | GetWidth () const
virtual void | InitMembers ()
any constructor should call this function to initialize all data members (e.g.
virtual void | InitWithContext ()
init all things that need a context.
bool | IsContextAvailable ()
activates the current rendereing context if there is one and
virtual void | OnChar (wxKeyEvent &event)
void | OnEraseBackground (wxEraseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnSize (wxSizeEvent &event)
OpenGLCanvasBase (wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette)
constructor using a shared context
OpenGLCanvasBase (wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette)
virtual std::ostream & | PrintHelp (std::ostream &os)
pop up keyboard layout help.
virtual void | Reshape ()
change of size and aspect ratio.
void ScreenShot ()
JW automatic screenshot to file with filename based on frame, instance etc.
void | ScreenShot (const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | ScreenShot (BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false)
void | SetFrameCount (const unsigned long &newVal)
void | SetOwnerframe (wxFrame *ptr)
void | SetStatusText (const wxString &text, const int c_field=0)
let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)
void ShowFPS ()
simple interface for the above
void | ShowFPS (const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField)
shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.
void | ShowValue (const wxPoint &pos)
void SwapBuffers ()
expands parents SwapBUffers by automatic framecount increase
void ToggleFullScreen ()
BIAS::Vector3< float > | Unproject (const wxPoint &pos2d, double &d)
computes 3D coordinate from 2D+Z by "unprojection" JW
virtual void | UpdateTime ()
sets the internal time param, by default based on realtime wall clock
virtual | ~OpenGLCanvasBase ()
destructor

Static Public Member Functions

static void | DisplaySampleScene ()
display soem very simple Gl calls to draw something at all
static bool | GetVSync ()
static void | SetVSync (const bool &trueForOn)
vertical sync control on or off (VSYNC) JW
static void | StereoI_CaptureStereoImage (const int &format, const int &quality)
static float | StereoI_GetConvergence ()
static void | StereoI_GetInfo (std::ostream &os=std::cout)
query status information on current NVStereo rendering state JW
static float | StereoI_GetSeparation ()
static int | StereoI_GetStereoState ()
wrappers for StereoI interface
static int | StereoI_Init ()
interace to NVidias consumer Stereo NVStereo driver API.
static float | StereoI_SetConvergence (const float &val)
static float | StereoI_SetSeparation (const float &val)
static int | StereoI_SetStereoState (const int &val)
static bool | ToggleIP (bool &value)
helper toggling a bool value in place
static bool | ToggleVSync ()
try to toggle VSync setting.

Static Public Attributes

static bool | animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
static double | time = 0.0

Protected Attributes

unsigned long | framecount_
bool | InitWithContextDone_
unsigned int | instance_
BIAS::DrawTextGL * p_font
wxFrame * | p_ownerframe
BIAS::RenderModeGL rendermode

Static Protected Attributes

static unsigned int | instancesTotalNo_ = 0

Detailed Description

Examples:

ExampleOpenGLCanvasBase.cpp.

Definition at line 138 of file OpenGLCanvasBase.hh.

Constructor & Destructor Documentation

OpenGLCanvasBase::~OpenGLCanvasBase ( ) [virtual]

destructor

Definition at line 70 of file OpenGLCanvasBase.cpp.

OpenGLCanvasBase::OpenGLCanvasBase | ( | wxFrame * | parent,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("OpenGLCanvasBase"),
 |  | int * | attribList = NULL,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

Definition at line 79 of file OpenGLCanvasBase.cpp.

References InitMembers(), instancesTotalNo_, and p_ownerframe.

OpenGLCanvasBase::OpenGLCanvasBase | ( | wxFrame * | parent,
 |  | wxGLContext * | sharedContext = NULL,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = 0,
 |  | const wxString & | name = AsciiToWx("OpenGLCanvasBase"),
 |  | int * | attribList = NULL,
 |  | const wxPalette & | palette = wxNullPalette
 | ) |

constructor using a shared context

Definition at line 102 of file OpenGLCanvasBase.cpp.

References InitMembers(), instancesTotalNo_, and p_ownerframe.

Member Function Documentation

void OpenGLCanvasBase::Display ( ) [virtual]

main display call to be overridden by child classes usually displays: -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!) -Clear -Camera/virtual view -Geometry Implements instance

Author:
Jan Woetzel.

Definition at line 288 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, DisplayCalls(), DisplayRenderMode(), DisplaySelectBuffer(), InitWithContext(), InitWithContextDone_, IsContextAvailable(), SwapBuffers(), and UpdateTime().

Referenced by OnChar(), BIAS::OpenGLCanvas::OnIdle(), Reshape(), BIAS::OpenGLCanvas::Reshape(), and BIAS::ImageCanvasGLBase::Set().

void OpenGLCanvasBase::DisplayCalls ( ) [virtual]

>>> begin your fancy GL calls

<<< end of your GL calls

Reimplemented in MyGLCanvas, MyGLCanvas2, MyGLCanvas, and BIAS::ImageCanvasGLBase.

Definition at line 334 of file OpenGLCanvasBase.cpp.

References DisplayClear(), and DisplaySampleScene().

Referenced by Display().

void OpenGLCanvasBase::DisplayClear ( ) [virtual]

clears buffers and resets virtual camera to identity

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 401 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and BIAS::GeometryGL::DisplayClear().

Referenced by DisplayCalls(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayCoordCross | ( | const float & | size = 1.0f,
 |  | const float & | linewidth = 1.0f
 | ) |

Examples:
ExampleGLShared.cpp, and ExampleOpenGLCanvas.cpp.

Definition at line 421 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIAS::GeometryGL::DisplayCoordCross(), BIAS::GeometryGL::DisplayCoordCrossAxesLabel(), and p_font.

Referenced by MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplayRenderMode ( ) [virtual]

display default shade model, polygon mode,

Examples:
ExampleGLShared.cpp.

Definition at line 408 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplayRenderMode(), and rendermode.

Referenced by Display(), MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

void OpenGLCanvasBase::DisplaySampleScene ( ) [static]

display soem very simple Gl calls to draw something at all

Definition at line 415 of file OpenGLCanvasBase.cpp.

References BIAS::GeometryGL::DisplaySceneExampleSimple().

Referenced by DisplayCalls().

void OpenGLCanvasBase::DisplaySelectBuffer ( )

useful for quadbuffered stereo, e.g. shutetr glasses

Definition at line 347 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::RenderModeGL::drawbuffermode, BIAS::MONO, rendermode, BIAS::STEREO_CONSUMER_NV, BIAS::STEREO_LEFT_RIGHT, BIAS::STEREO_QUADBUFFERED, and BIAS::STEREO_UNTOUCHED.

Referenced by Display().

float OpenGLCanvasBase::GetAspectRatio ( ) const

GetAspectRatio is X/Y.

Returns:
aspect 'X/Y' = ratio of width being 'bigger' than reference height
Examples:
ExampleGLShared.cpp.

Definition at line 468 of file OpenGLCanvasBase.cpp.

References GetHeight(), and GetWidth().

Referenced by MyGLCanvas2::DisplayCalls(), and MyGLCanvas::DisplayCalls().

unsigned long BIAS::OpenGLCanvasBase::GetFrameCount ( ) const [inline]

Definition at line 290 of file OpenGLCanvasBase.hh.

unsigned int OpenGLCanvasBase::GetHeight ( ) const

Definition at line 458 of file OpenGLCanvasBase.cpp.

Referenced by GetAspectRatio(), GetPixelValueDepth(), GetPixelValueRGB(), GetPixelValueRGBA(), Reshape(), BIAS::OpenGLCanvas::Reshape(), and ScreenShot().

void OpenGLCanvasBase::GetInfoGL ( std::ostream & os ) [virtual]

return GL state information

Reimplemented in BIAS::OpenGLCanvas.

Definition at line 265 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, BIAS::GeometryGL::GetInfoGL(), instance_, and StereoI_GetInfo().

Referenced by BIAS::OpenGLCanvas::GetInfoGL(), and OnChar().

wxFrame * OpenGLCanvasBase::GetOwnerframe ( )

Definition at line 252 of file OpenGLCanvasBase.cpp.

References BIASASSERT, and p_ownerframe.

float OpenGLCanvasBase::GetPixelValueDepth ( const wxPoint & pos2d ) const

Definition at line 514 of file OpenGLCanvasBase.cpp.

References CHECK_GL_ERROR, and GetHeight().

Referenced by ShowValue().

BIAS::Vector3< float > OpenGLCanvasBase::GetPixelValueRGB ( const wxPoint & pos2d )

Definition at line 475 of file OpenGLCanvasBase.cpp.

References BIASERR, GetHeight(), IsContextAvailable(), and BIAS::Vector3< T >::Set().

BIAS::Vector4< float > OpenGLCanvasBase::GetPixelValueRGBA ( const wxPoint & pos2d )

Definition at line 495 of file OpenGLCanvasBase.cpp.

References BIASERR, GetHeight(), IsContextAvailable(), and BIAS::Vector4< T >::Set().

Referenced by ShowValue().

bool OpenGLCanvasBase::GetVSync ( ) [static]

Returns:
true if vertical sync is enable, false for free running mode JW

Definition at line 1144 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::GetVSyncInterval().

Referenced by InitWithContext(), OnChar(), and ToggleVSync().

unsigned int OpenGLCanvasBase::GetWidth ( ) const

Definition at line 449 of file OpenGLCanvasBase.cpp.

Referenced by GetAspectRatio(), Reshape(), BIAS::OpenGLCanvas::Reshape(), and ScreenShot().

void OpenGLCanvasBase::InitMembers ( ) [virtual]

any constructor should call this function to initialize all data members (e.g.

pointers to NULL)

Reimplemented in BIAS::ImageCanvasGLBase, and BIAS::OpenGLCanvas.

Definition at line 126 of file OpenGLCanvasBase.cpp.

References animationUpdateEnabled, framecount_, InitWithContextDone_, instance_, and instancesTotalNo_.

Referenced by BIAS::OpenGLCanvas::InitMembers(), and OpenGLCanvasBase().

void OpenGLCanvasBase::InitWithContext ( ) [virtual]

init all things that need a context.

sets _InitWithContextDone

Definition at line 137 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, GetVSync(), BIAS::DrawTextGL::InitFont(), InitWithContextDone_, IsContextAvailable(), p_font, rendermode, SetVSync(), and BIAS::RenderModeGL::vsync.

Referenced by Display().

bool OpenGLCanvasBase::IsContextAvailable ( )

activates the current rendereing context if there is one and

Returns:
true if gl rendering context is available, false if there is none available (yet).

Definition at line 218 of file OpenGLCanvasBase.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by Display(), GetPixelValueRGB(), GetPixelValueRGBA(), and InitWithContext().

void OpenGLCanvasBase::OnChar ( wxKeyEvent & event ) [virtual]

Definition at line 957 of file OpenGLCanvasBase.cpp.

References animationUpdateEnabled, BIAS::AsciiToWx(), BIASASSERT, BIASERR, COUT, BIAS::RenderModeGL::cullface, Display(), BIAS::RenderModeGL::enable_cullface, GetInfoGL(), GetVSync(), BIAS::RenderModeGL::pointsize, BIAS::RenderModeGL::polygonmodeBACK, BIAS::RenderModeGL::polygonmodeFRONT, PrintHelp(), rendermode, ScreenShot(), SetStatusText(), BIAS::RenderModeGL::shademodel, StereoI_GetInfo(), ToggleFullScreen(), and ToggleVSync().

void OpenGLCanvasBase::OnEraseBackground ( wxEraseEvent & event )

Definition at line 1129 of file OpenGLCanvasBase.cpp.

void BIAS::OpenGLCanvasBase::OnPaint ( wxPaintEvent & event )

void OpenGLCanvasBase::OnSize ( wxSizeEvent & event )

Definition at line 923 of file OpenGLCanvasBase.cpp.

References Reshape().

std::ostream & OpenGLCanvasBase::PrintHelp ( std::ostream & os ) [virtual]

pop up keyboard layout help.

Mut ebe virtualto let child class add their bindings

Definition at line 929 of file OpenGLCanvasBase.cpp.

Referenced by OnChar().

void OpenGLCanvasBase::Reshape ( ) [virtual]

change of size and aspect ratio.

Reimplemented in BIAS::OpenGLCanvas.

Definition at line 439 of file OpenGLCanvasBase.cpp.

References Display(), GetHeight(), and GetWidth().

Referenced by OnSize().

void OpenGLCanvasBase::ScreenShot ( )

JW automatic screenshot to file with filename based on frame, instance etc.

JW

Definition at line 681 of file OpenGLCanvasBase.cpp.

References BIAS_SCREENSHOT_DEFAULT_EXTENSION, framecount_, instance_, and BIAS::LeadingZeroString().

Referenced by OnChar(), and ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | const std::string & | filename,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) |

Definition at line 567 of file OpenGLCanvasBase.cpp.

References BIASERR, COUT, BIAS::ImageIO::ExportImage(), FUNCNAME, GetHeight(), GetWidth(), img, and ScreenShot().

void OpenGLCanvasBase::ScreenShot | ( | BIAS::ImageBase & | dest,
 |  | const bool & | flipY = true,
 |  | const GLenum & | format = GL_RGB,
 |  | const bool & | force8Bit = false
 | ) |

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 593 of file OpenGLCanvasBase.cpp.

References BIASERR, CHECK_GL_ERROR, BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), GetHeight(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), GetWidth(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::Release(), BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and type.

Referenced by MyFrame::OnTestShot().

void BIAS::OpenGLCanvasBase::SetFrameCount ( const unsigned long & newVal ) [inline]

Definition at line 291 of file OpenGLCanvasBase.hh.

void OpenGLCanvasBase::SetOwnerframe ( wxFrame * ptr )

Definition at line 258 of file OpenGLCanvasBase.cpp.

References p_ownerframe.

void OpenGLCanvasBase::SetStatusText | ( | const wxString & | text,
 |  | const int | c_field = 0
 | ) |

let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW)

Definition at line 741 of file OpenGLCanvasBase.cpp.

References BIASERR, and p_ownerframe.

Referenced by OnChar(), ShowFPS(), and ShowValue().

void OpenGLCanvasBase::SetVSync ( const bool & trueForOn ) [static]

vertical sync control on or off (VSYNC) JW

Definition at line 1135 of file OpenGLCanvasBase.cpp.

References BIAS::SettingsGL::SetVSyncInterval().

Referenced by InitWithContext(), and ToggleVSync().

void OpenGLCanvasBase::ShowFPS ( )

simple interface for the above

Definition at line 900 of file OpenGLCanvasBase.cpp.

Referenced by BIAS::OpenGLCanvas::OnIdle().

void OpenGLCanvasBase::ShowFPS | ( | const int & | framecounter,
 |  | const float & | minUpdateIntervalSec,
 |  | const unsigned int & | minNewFrames,
 |  | const unsigned int | nField
 | ) |

shows FPS to status bar base don frame counter and last call to this function Measures and updates only, if two conditions ar eboth met: 1.

at least minUpdateIntervalSec seconds have passed since prvious update 2. at least minNewFrames were drawn since a previous update Shouls handle multiplem, shared contextst correctly (jw). JW

Definition at line 820 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), and SetStatusText().

void OpenGLCanvasBase::ShowValue ( const wxPoint & pos )

Definition at line 780 of file OpenGLCanvasBase.cpp.

References BIAS::AsciiToWx(), CHECK_GL_ERROR, GetPixelValueDepth(), GetPixelValueRGBA(), SetStatusText(), and Unproject().

void OpenGLCanvasBase::StereoI_CaptureStereoImage | ( | const int & | format,
 |  | const int & | quality
 | ) | [static]

Definition at line 1294 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_GetConvergence ( ) [static]

Definition at line 1278 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::StereoI_GetInfo ( std::ostream & os = std::cout ) [static]

query status information on current NVStereo rendering state JW

Definition at line 1213 of file OpenGLCanvasBase.cpp.

References BIASERR, Get_pStereoAPI(), and StereoI_Init().

Referenced by GetInfoGL(), and OnChar().

float OpenGLCanvasBase::StereoI_GetSeparation ( ) [static]

Definition at line 1262 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_GetStereoState ( ) [static]

wrappers for StereoI interface

Definition at line 1246 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_Init ( ) [static]

interace to NVidias consumer Stereo NVStereo driver API.

to enable/disbale stereo and control convergence and separation for stereo rendering

Returns:
0 on success, negative on error.
Author:
Jan Woetzel

Definition at line 1172 of file OpenGLCanvasBase.cpp.

References BIASASSERT, BIASERR, and g_pStereoAPI.

Referenced by Get_pStereoAPI(), and StereoI_GetInfo().

float OpenGLCanvasBase::StereoI_SetConvergence ( const float & val ) [static]

Definition at line 1286 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

float OpenGLCanvasBase::StereoI_SetSeparation ( const float & val ) [static]

Definition at line 1270 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

int OpenGLCanvasBase::StereoI_SetStereoState ( const int & val ) [static]

Definition at line 1254 of file OpenGLCanvasBase.cpp.

References BIASERR, and Get_pStereoAPI().

void OpenGLCanvasBase::SwapBuffers ( )

expands parents SwapBUffers by automatic framecount increase

Definition at line 282 of file OpenGLCanvasBase.cpp.

References framecount_.

Referenced by Display().

void OpenGLCanvasBase::ToggleFullScreen ( )

Definition at line 876 of file OpenGLCanvasBase.cpp.

References BIAS::RenderModeGL::drawbuffermode, OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE, p_ownerframe, rendermode, and BIAS::STEREO_CONSUMER_NV.

Referenced by OnChar().

bool OpenGLCanvasBase::ToggleIP ( bool & value ) [static]

helper toggling a bool value in place

Returns:
new value JW

Definition at line 1164 of file OpenGLCanvasBase.cpp.

bool OpenGLCanvasBase::ToggleVSync ( ) [static]

try to toggle VSync setting.

Returns:
true if toggling worked, false if status persisted.

Definition at line 1150 of file OpenGLCanvasBase.cpp.

References act, GetVSync(), and SetVSync().

Referenced by OnChar().

BIAS::Vector3< float > OpenGLCanvasBase::Unproject | ( | const wxPoint & | pos2d,
 |  | double & | d
 | ) |

computes 3D coordinate from 2D+Z by "unprojection" JW

Definition at line 530 of file OpenGLCanvasBase.cpp.

Referenced by ShowValue().

void OpenGLCanvasBase::UpdateTime ( ) [virtual]

sets the internal time param, by default based on realtime wall clock

Reimplemented in BIAS::OpenGLCanvas.

Definition at line 1159 of file OpenGLCanvasBase.cpp.

References time.

Referenced by Display(), and BIAS::OpenGLCanvas::UpdateTime().

Member Data Documentation

bool OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled [static]

Definition at line 343 of file OpenGLCanvasBase.hh.

Referenced by InitMembers(), OnChar(), and BIAS::OpenGLCanvas::UpdateTime().

unsigned long BIAS::OpenGLCanvasBase::framecount_ [protected]

Definition at line 348 of file OpenGLCanvasBase.hh.

Referenced by InitMembers(), ScreenShot(), and SwapBuffers().

bool BIAS::OpenGLCanvasBase::InitWithContextDone_ [protected]

Definition at line 354 of file OpenGLCanvasBase.hh.

Referenced by Display(), InitMembers(), and InitWithContext().

unsigned int BIAS::OpenGLCanvasBase::instance_ [protected]

Definition at line 356 of file OpenGLCanvasBase.hh.

Referenced by GetInfoGL(), InitMembers(), and ScreenShot().

unsigned int OpenGLCanvasBase::instancesTotalNo_ = 0 [static, protected]

Definition at line 357 of file OpenGLCanvasBase.hh.

Referenced by InitMembers(), and OpenGLCanvasBase().

BIAS::DrawTextGL* BIAS::OpenGLCanvasBase::p_font [protected]

Definition at line 365 of file OpenGLCanvasBase.hh.

Referenced by DisplayCoordCross(), and InitWithContext().

wxFrame* BIAS::OpenGLCanvasBase::p_ownerframe [protected]

Definition at line 351 of file OpenGLCanvasBase.hh.

Referenced by GetOwnerframe(), OpenGLCanvasBase(), SetOwnerframe(), SetStatusText(), and ToggleFullScreen().

BIAS::RenderModeGL BIAS::OpenGLCanvasBase::rendermode [protected]

Definition at line 360 of file OpenGLCanvasBase.hh.

Referenced by DisplayRenderMode(), DisplaySelectBuffer(), InitWithContext(), OnChar(), and ToggleFullScreen().

double OpenGLCanvasBase::time = 0.0 [static]

Definition at line 341 of file OpenGLCanvasBase.hh.

Referenced by UpdateTime(), and BIAS::OpenGLCanvas::UpdateTime().

The documentation for this class was generated from the following files:
  • Gui/OpenGLCanvasBase.hh
  • Gui/OpenGLCanvasBase.cpp
Generated on Wed Jun 21 19:09:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: option Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

option Struct Reference

#include <Base/Common/getopt_W32.h>

List of all members.

Public Attributes

int * | flag
int | has_arg
const char * | name
int | val

Detailed Description

Definition at line 66 of file getopt_W32.h.

Member Data Documentation

int* option::flag

Definition at line 75 of file getopt_W32.h.

Referenced by getopt_long(), and BIAS::Param::ParseCommandLine().

int option::has_arg

Definition at line 73 of file getopt_W32.h.

Referenced by BIAS::Param::ParseCommandLine().

const char* option::name

Definition at line 68 of file getopt_W32.h.

int option::val

Definition at line 77 of file getopt_W32.h.

Referenced by getopt_long(), and BIAS::Param::ParseCommandLine().

The documentation for this struct was generated from the following file:
  • Base/Common/getopt_W32.h
Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Param Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Param

BIAS::Param Class Reference
[Utilities]

This class Param provides generic support for parameters. More...

#include <Utils/Param.hh>

Inheritance diagram for BIAS::Param:

[legend]
Collaboration diagram for BIAS::Param:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool * | AddParamBool (const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW)
double * | AddParamDouble (const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW)
int * | AddParamEnum (const std::string &name, const std::string &help, const std::vector< std::string > &enums, const int deflt=0, const std::vector< int > *IDs=NULL, const char cmdshort=0, const int Group=GRP_NOSHOW)
int * | AddParamInt (const std::string &name, const std::string &help, int deflt=0, int min=INT_MIN, int max=INT_MAX, char cmdshort=0, int Group=GRP_NOSHOW)
For all adding routines:.
std::string * | AddParamString (const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW)
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
The same as above, but default is given by a string, syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values.
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
The same as other AddParamVecInt(), but default is given by a string, syntax is as at command line "v_0 v_1 v_2".
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const BIAS::Vector< int > &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!
bool | CheckParam (const std::string &name)
Check if parameter has already been added.
bool | DebugLevelIsSet (long int lv) const
void DisableDestructorWarning ()
Uses this just before end of your program to avoid error from destructor.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetFreeGroupID ()
returns unused group id
int | GetGroupID (const std::string &name)
returns group id of parameter with name
int | GetGroupIDForGroupName (const std::string &name)
std::string | GetGroupName (const int group_id)
gets the name of a group
bool * | GetParamBool (const std::string &name) const
double * | GetParamDouble (const std::string &name) const
int * | GetParamEnum (const std::string &name) const
int * | GetParamInt (const std::string &name) const
std::string * | GetParamString (const std::string &name) const
BIAS::Vector< double > * | GetParamVecDbl (const std::string &name) const
BIAS::Vector< int > * | GetParamVecInt (const std::string &name) const
int | GetSizeOfLongestParamName ()
returns the size of the longest param name not marked as enhanced or hidden
int | GetSizeOfLongestParamValueString ()
returns the size of the longest param value string not marked as enhanced or hidden
bool | IsUsedGroupID (const int group_id)
returns if the group id is used
Param (bool DisableDestructorWarning=false)
int | ParseCommandLine (int &argc, char *argv[])
argv is reordered according to getopt() all no recognized arguments are at the end.
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | ReadParameter (const std::string &filename)
read values for parameters from file
int | ReadParameterXML (const std::string &filename)
read values for parameters from xml-file
int | RegisterCallbackObject (const std::string &name, ParamCallbackInterface *obj)
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void SetDefaults ()
sets all entries to their initially (AddParam) given default values
int | SetEnhancedFlag (const std::string &name, bool enhanced)
if a parametr is marked as enhanced, it is hidden from the naive user
int | SetGroupName (const int group_id, const std::string &name)
sets the name for a group
int | SetHiddenFlag (const std::string &name, bool hidden)
if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class
bool * | SetParamBool (const std::string &name, const bool &value)
double * | SetParamDouble (const std::string &name, const double &value)
int * | SetParamEnum (const std::string &name, const std::string &value)
set the enum to the ID corresponding to the string 'value'
int * | SetParamEnum (const std::string &name, const int &value)
set the enum to the ID 'value'
int | SetParameterWriteToFile (const std::string &name, bool writeToFile)
int * | SetParamInt (const std::string &name, const int &value)
std::string * | SetParamString (const std::string &name, const std::string &value)
BIAS::Vector< double > * | SetParamVecDbl (const std::string &name, const BIAS::Vector< double > &value)
BIAS::Vector< int > * | SetParamVecInt (const std::string &name, const BIAS::Vector< int > &value)
virtual int | SetRangeInt (const std::string &name, const int min, const int max)
Set [Min,Max] as new range, especially usefull in derived class PramGUI.
int | SetShortCommand (const std::string &name, const char cmd)
Add a short commandline switch to an existing parameter.
void | SetWriteOptions (bool indent, bool comments, bool enhanced)
void | ShowData (std::ostream &os=std::cout, int grp=GRP_ALL, bool showenhanced=true)
print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown
std::vector< int > | UniqueSortedGroups ()
Returns a vector of all group IDs (unique) in ascending order.
int | UpdateParameter (int &argc, char *argv[], const std::string &default_filename)
update all arguments from command line and parameter file 1.
void | Usage (std::ostream &os=std::cout)
print Help-Information to stdout
int | WriteParameter (const std::string &filename)
store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written
int | WriteParameterXML (const std::string &filename)
int | WriteRunMe (const std::string &filename)
writes complete command line including program name and unknown command line options, no defaults, no params read from file
virtual | ~Param ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static int | ParseListFile (const std::string &ListFileName, std::vector< std::string > &LinesInFile)
Extracts lines from passed file.
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

const std::map< const std::string,
BIAS::ParamTypeBase * > & 		GetParamMap () const
std::map< const std::string,
BIAS::ParamTypeBase * > & 		GetParamMap ()

Protected Attributes

long int | _liDebugLevel
std::vector< std::string > | ArgV_
bool | DestructorWarning_
std::vector< std::string > | GroupNames_
option * longopts
bool | WriteComments_
bool | WriteEnhanced_
bool | WriteIndent_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Attributes

std::map< const std::string,
BIAS::ParamTypeBase * > 		ParamMap_
this STL map holds the name-ParamType-pairs

Detailed Description

This class Param provides generic support for parameters.

This is the documentation for the

BIAS::Param

and the

BIAS::ParamGUI

classes.

Philosophy ==========

The idea behind the Param object is a common class to register all program parameters in. These parameters can be set from the command line, read and written to a file or be edited in a graphical interface that is programmed using the wxWidgets framework toolkit.

Usage =====

There are the following seven parameter types:

  • Integer
  • Boolean
  • String
  • Double
  • Vector of Double
  • Vector of Integer
  • Enumeration

At first you create your instance of the Param oder ParamGUI object in your application. Afterwards you register your parameters by using the AddParam... methods corresponding to each of the types above:

The methods are

  • AddParamInt
  • AddParamBool
  • AddParamString
  • AddParamDouble
  • AddParamVecDbl
  • AddParamVecInt
  • AddParamEnum.

Each method has the parameters name, a help-string, a default-value, a short-command and a group ID as parameters.

The name must be unique! An error is displayed if you add a new parameter with an already existing name.

The help-string should describe the command in a short way.

If you use the short-command, the parameter can be set at the command line with -<short-command> additionally to --<parameter-name>.

Using the group ID you can put parameters of similar meaning in single groups, which is useful for visualization.

The first four parameter types come along with standard default values. For the vector types you must provide an initial vector when adding a new parameter. When setting new vectors later in your program, the vector must be of the size given by the initial one.

Using the method ParseCommandLine you can set the values for the registered parameters from the command line. Also you can use the default parameters 'readconfig' and 'writeconfig' to read or write a configuration from/to a file.

In your program you can use the GetParam... and SetParam... methods to receive a pointer to the data or to set new values for the parameters.

The GUI =======

The BIAS::ParamGUI class is derived from the BIAS::Param class and provides the three methods

GetPanel, GetNotebook and GetFrame.

The GetPanel method returns a pointer to a wxPanel where the widgets for the parameters belonging to the given group are placed.

The GetNotebook method returns a pointer to a wxNotebook where on each notebook page is placed a panel with the parameters of one group.

These two can be placed in your GUI application as you like to. If you want a standalone frame with the notebook inside you use the GetFrame method.

The GetFrame method returns a pointer to a wxFrame in which a wxNotebook with all groups of parameters is embedded.

Why pointers? =============

A big question about this object is why pointers are returned by the Add-, Get- and Set-methods. Well, is it wanted, that the data is only stored at one location and that is the Param object, so if you are interested in a value, you get the pointer to it.

Internals =========

Classes:

BIAS::ParamTypeBase | +-- BIAS::ParamTypeInt | +-- BIAS::ParamTypeBool | +-- BIAS::ParamTypeString | +-- BIAS::ParamTypeDouble | +-- BIAS::ParamTypeVecDbl | +-- BIAS::ParamTypeVecInt | +-- BIAS::ParamTypeEnum

BIAS::Param | +-- BIAS::ParamGUI

STL maps:

In BIAS::Param the main data struct holding the parameter data is a STL map. The key-value-pairs are of the type string,ParamTypeBase*.

The key-string holds the name of the parameter which is also stored in the parameter type class.

The ParamTypeEnum class holds another STL map with key of type string and value of type int. This is used for easier name->number translation.

In the GUI class also has a STL map of type unsigned int,struct ItemAndWidget to map event IDs to the corresponding control widget and parameter data.

Author:
Jan-Friso Evers-Senne, Matthias Dunda
Note about bool: bool options can be used on the cmdl as follow: -b -> result in "true" --bool=true -> result in "true" --bool=<any other="" string>=""> -> result in "false" --bool <any string>=""> -> Not allowed.

Definition at line 250 of file Param.hh.

Constructor & Destructor Documentation

Param::Param ( bool DisableDestructorWarning = false ) [explicit]

Definition at line 77 of file Param.cpp.

References AddParamBool(), AddParamString(), DestructorWarning_, ParamMap_, SetParameterWriteToFile(), WriteComments_, WriteEnhanced_, and WriteIndent_.

Param::~Param ( ) [virtual]

Definition at line 106 of file Param.cpp.

References it, and ParamMap_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool * Param::AddParamBool | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | bool | deflt = false,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

Definition at line 314 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), Param(), and ParamInit().

double * Param::AddParamDouble | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | double | deflt = 0.0,
 |  | double | min = -DBL_MAX,
 |  | double | max = DBL_MAX,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

Definition at line 361 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), MyAlgorithm::ParamAdd(), and ParamInit().

int * Param::AddParamEnum | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::vector< std::string > & | enums,
 |  | const int | deflt = 0,
 |  | const std::vector< int > * | IDs = NULL,
 |  | const char | cmdshort = 0,
 |  | const int | Group = GRP_NOSHOW
 | ) |

Parameters:
enums | holds all enumeration names.
IDs | can be a pointer to a vector of integers. It must have the same size as 'enums' and gives each name a number, which must be unique! If NULL the enums are numbered from 0 to enums.size()-1
Author:
mdunda 03 2004

Definition at line 479 of file Param.cpp.

References BIASERR, and ParamMap_.

Referenced by main(), and MyFrame::MyFrame().

int * Param::AddParamInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | int | deflt = 0,
 |  | int | min = INT_MIN,
 |  | int | max = INT_MAX,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

For all adding routines:.

Parameters:
name | is the unique identifier of the parameter
help | is a help or 'tooltip' string for that parameter
deflt | is a default value for that parameter. Note that not every parameter type has a default at compile time!
cmdshort | is a short command option for the command line
Group | is a number to group some parameters for visualization, e.g. all matchers are in group 1, all trackers are in group 37 etc. When printing to screen, you can limit the output to a group of interest. The default is 0 - no special group.
Author:
mdunda 03 2004

Definition at line 285 of file Param.cpp.

References BIASERR, and ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), MyAlgorithm::ParamAdd(), and ParamInit().

std::string * Param::AddParamString | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | std::string | deflt = "",
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

Definition at line 337 of file Param.cpp.

References BIASERR, and ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), Param(), and ParamInit().

BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::string & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

The same as above, but default is given by a string, syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values.

Author:
Daniel Grest, July 2005

Definition at line 412 of file Param.cpp.

BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const BIAS::Vector< double > & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!

Definition at line 389 of file Param.cpp.

References BIASERR, and ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), and main().

BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::string & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

The same as other AddParamVecInt(), but default is given by a string, syntax is as at command line "v_0 v_1 v_2".

Don't set empty string, cause the length is determined also by the number of values

Author:
Daniel Grest, July 2005

Definition at line 457 of file Param.cpp.

BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const BIAS::Vector< int > & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) |

Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!

Definition at line 434 of file Param.cpp.

References BIASERR, and ParamMap_.

Referenced by main().

bool Param::CheckParam ( const std::string & name )

Check if parameter has already been added.

Definition at line 538 of file Param.cpp.

References ParamMap_.

Referenced by BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), BIAS::MSAC< SolutionType >::_AddParameter(), BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::AddGradientType(), BIAS::AddLowPassType(), BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void BIAS::Param::DisableDestructorWarning ( ) [inline]

Uses this just before end of your program to avoid error from destructor.

Author:
evers

Definition at line 502 of file Param.hh.

Referenced by main(), and ParamInit().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

int Param::GetFreeGroupID ( )

returns unused group id

Author:
woelk

Definition at line 1350 of file Param.cpp.

References UniqueSortedGroups().

Referenced by BIAS::VideoServer::AddParams_(), BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), main(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::MSAC< SolutionType >::MSAC(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::Param::GetGroupID ( const std::string & name )

returns group id of parameter with name

Author:
woelk

Referenced by BIAS::MatchDataBase::_AddParameter(), and BIAS::GenSynthMatches::_AddParameter().

int BIAS::Param::GetGroupIDForGroupName ( const std::string & name )

Author:
evers

std::string Param::GetGroupName ( const int group_id )

gets the name of a group

Author:
woelk

Definition at line 1394 of file Param.cpp.

References BIASERR, GroupNames_, GRP_ALL, and GRP_NOSHOW.

Referenced by BIAS::ParamGUI::GetNotebook(), and ShowData().

bool * Param::GetParamBool ( const std::string & name ) const

Definition at line 563 of file Param.cpp.

References BIASERR, it, and ParamMap_.

Referenced by BIAS::MSAC< SolutionType >::_AddParameter(), main(), ParamInit(), UpdateParameter(), and Usage().

double * Param::GetParamDouble ( const std::string & name ) const

Definition at line 595 of file Param.cpp.

References BIASERR, it, and ParamMap_.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), and main().

int * Param::GetParamEnum ( const std::string & name ) const

Definition at line 644 of file Param.cpp.

References BIASERR, it, and ParamMap_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::AddGradientType(), and BIAS::AddLowPassType().

int * Param::GetParamInt ( const std::string & name ) const

Definition at line 546 of file Param.cpp.

References BIASERR, it, and ParamMap_.

Referenced by BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and main().

const std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( ) const [protected]

Definition at line 1812 of file Param.cpp.

References ParamMap_.

std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( ) [protected]

Definition at line 1806 of file Param.cpp.

References ParamMap_.

Referenced by BIAS::ParamGUI::GetPanel().

std::string * Param::GetParamString ( const std::string & name ) const

Definition at line 579 of file Param.cpp.

References BIASERR, it, and ParamMap_.

Referenced by main(), ParseCommandLine(), and UpdateParameter().

BIAS::Vector< double > * Param::GetParamVecDbl ( const std::string & name ) const

Definition at line 612 of file Param.cpp.

References BIASERR, it, and ParamMap_.

BIAS::Vector< int > * Param::GetParamVecInt ( const std::string & name ) const

Definition at line 628 of file Param.cpp.

References BIASERR, it, and ParamMap_.

int Param::GetSizeOfLongestParamName ( )

returns the size of the longest param name not marked as enhanced or hidden

Author:
woelk 10/2004

Definition at line 1430 of file Param.cpp.

Referenced by ShowData().

int Param::GetSizeOfLongestParamValueString ( )

returns the size of the longest param value string not marked as enhanced or hidden

Author:
woelk 10/2004

Definition at line 1442 of file Param.cpp.

References ParamMap_.

Referenced by ShowData().

bool Param::IsUsedGroupID ( const int group_id )

returns if the group id is used

Author:
woelk

Definition at line 1424 of file Param.cpp.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

int Param::ParseCommandLine | ( | int & | argc,
 |  | char * | argv[]
 | ) |

argv is reordered according to getopt() all no recognized arguments are at the end.

Return value is optind from getopt(), the index of the next not recognized argument. Sometimes, the function however returns negative values. ?

Todo:
document concept of return value of ParseCommandLine Reads parameter from file if argument --readconfig is given.
Author:
evers

Definition at line 971 of file Param.cpp.

References ArgV_, BIASDOUT, D_PARAM_CONF_FILE, D_PARAM_PARSECMDL, done, option::flag, getopt_long(), GetParamString(), option::has_arg, longopts, optarg, optind, optional_argument, ParamMap_, ReadParameter(), required_argument, Usage(), and option::val.

Referenced by main(), MyFrame::MyFrame(), ParamInit(), and UpdateParameter().

int Param::ParseListFile | ( | const std::string & | ListFileName,
 |  | std::vector< std::string > & | LinesInFile
 | ) | [static]

Extracts lines from passed file.

The specified file is expected to contain a list of entries. Those entries are assumed to be seperated by newlines.

Parameters:
ListFileName | Routine tries to open file with this name.
LinesInFile | result of line extraction.
Returns:
-1 if file could not be opened.

0 all good.

Definition at line 1779 of file Param.cpp.

References BIASERR.

Referenced by MainFrame::LoadImages().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int BIAS::Param::ReadParameter ( const std::string & filename )

read values for parameters from file

Referenced by main(), and ParseCommandLine().

int BIAS::Param::ReadParameterXML ( const std::string & filename )

read values for parameters from xml-file

int BIAS::Param::RegisterCallbackObject | ( | const std::string & | name,
 |  | ParamCallbackInterface * | obj
 | ) |

Author:
evers

Referenced by MyAlgorithm::ParamAdd().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Param::SetDefaults ( )

sets all entries to their initially (AddParam) given default values

Definition at line 1732 of file Param.cpp.

References ParamMap_.

int Param::SetEnhancedFlag | ( | const std::string & | name,
 |  | bool | enhanced
 | ) |

if a parametr is marked as enhanced, it is hidden from the naive user

Definition at line 898 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

Referenced by MarkEnhancedAndSetDefaults().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int BIAS::Param::SetGroupName | ( | const int | group_id,
 |  | const std::string & | name
 | ) |

sets the name for a group

Author:
woelk

Referenced by BIAS::VideoServer::AddParams_(), BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), main(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

int Param::SetHiddenFlag | ( | const std::string & | name,
 |  | bool | hidden
 | ) |

if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class

Definition at line 912 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

bool * Param::SetParamBool | ( | const std::string & | name,
 |  | const bool & | value
 | ) |

Definition at line 690 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

double * Param::SetParamDouble | ( | const std::string & | name,
 |  | const double & | value
 | ) |

Definition at line 737 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

Referenced by main(), and MarkEnhancedAndSetDefaults().

int * Param::SetParamEnum | ( | const std::string & | name,
 |  | const std::string & | value
 | ) |

set the enum to the ID corresponding to the string 'value'

Definition at line 828 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

int * Param::SetParamEnum | ( | const std::string & | name,
 |  | const int & | value
 | ) |

set the enum to the ID 'value'

Definition at line 856 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

Referenced by main(), and MarkEnhancedAndSetDefaults().

int Param::SetParameterWriteToFile | ( | const std::string & | name,
 |  | bool | writeToFile
 | ) |

Definition at line 884 of file Param.cpp.

References BIASABORT, BIASERR, and ParamMap_.

Referenced by Param().

int * Param::SetParamInt | ( | const std::string & | name,
 |  | const int & | value
 | ) |

Definition at line 661 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

Referenced by MarkEnhancedAndSetDefaults().

std::string * Param::SetParamString | ( | const std::string & | name,
 |  | const std::string & | value
 | ) |

Definition at line 713 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

BIAS::Vector< double > * Param::SetParamVecDbl | ( | const std::string & | name,
 |  | const BIAS::Vector< double > & | value
 | ) |

Definition at line 766 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

BIAS::Vector< int > * Param::SetParamVecInt | ( | const std::string & | name,
 |  | const BIAS::Vector< int > & | value
 | ) |

Definition at line 797 of file Param.cpp.

References BIASABORT, BIASERR, it, and ParamMap_.

int Param::SetRangeInt | ( | const std::string & | name,
 |  | const int | min,
 |  | const int | max
 | ) | [virtual]

Set [Min,Max] as new range, especially usefull in derived class PramGUI.

Definition at line 1751 of file Param.cpp.

References ParamMap_.

int BIAS::Param::SetShortCommand | ( | const std::string & | name,
 |  | const char | cmd
 | ) |

Add a short commandline switch to an existing parameter.

Useful for readconfig/writeconfig.

Author:
evers

Referenced by main().

void BIAS::Param::SetWriteOptions | ( | bool | indent,
 |  | bool | comments,
 |  | bool | enhanced
 | ) | [inline]

Definition at line 519 of file Param.hh.

Referenced by main(), and UpdateParameter().

void Param::ShowData | ( | std::ostream & | os = std::cout,
 |  | int | grp = GRP_ALL,
 |  | bool | showenhanced = true
 | ) |

print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown

Definition at line 120 of file Param.cpp.

References GetGroupName(), GetSizeOfLongestParamName(), GetSizeOfLongestParamValueString(), GRP_ALL, it, ParamMap_, and UniqueSortedGroups().

Referenced by main(), MyFrame::MyFrame(), and MyFrame::~MyFrame().

vector< int > Param::UniqueSortedGroups ( )

Returns a vector of all group IDs (unique) in ascending order.

Only parameters are with WriteToFile_ = true are considered.

Author:
woelk 03 2004

Definition at line 1411 of file Param.cpp.

References ParamMap_.

Referenced by GetFreeGroupID(), BIAS::ParamGUI::GetNotebook(), and ShowData().

int Param::UpdateParameter | ( | int & | argc,
 |  | char * | argv[],
 |  | const std::string & | default_filename
 | ) |

update all arguments from command line and parameter file 1.

reads parameter from default file 2. if --readconfig is given on commandline, reads parameter from this file 3. evaluates parameter given on command line

Command line arguments take precedence over arguments from parameter file. Parameter from parameter file specified with --readconfig=fname take precedencor over parameter read from default_filename. If no parameterfile is found, the defaults are written to default_name.

Author:
woelk 09/2004

Definition at line 928 of file Param.cpp.

References BIASDOUT, D_PARAM_CONF_FILE, GetParamBool(), GetParamString(), ParseCommandLine(), res, SetWriteOptions(), WriteEnhanced_, WriteIndent_, and WriteParameter().

Referenced by main().

void Param::Usage ( std::ostream & os = std::cout )

print Help-Information to stdout

Definition at line 175 of file Param.cpp.

References GetParamBool(), it, and ParamMap_.

Referenced by main(), ParamInit(), ParseCommandLine(), and usage().

int BIAS::Param::WriteParameter ( const std::string & filename )

store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written

Author:
??

Referenced by main(), and UpdateParameter().

int BIAS::Param::WriteParameterXML ( const std::string & filename )

int Param::WriteRunMe ( const std::string & filename )

writes complete command line including program name and unknown command line options, no defaults, no params read from file

Definition at line 1699 of file Param.cpp.

References ArgV_.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<std::string> BIAS::Param::ArgV_ [protected]

Definition at line 531 of file Param.hh.

Referenced by ParseCommandLine(), and WriteRunMe().

bool BIAS::Param::DestructorWarning_ [protected]

Definition at line 534 of file Param.hh.

Referenced by Param().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::vector<std::string> BIAS::Param::GroupNames_ [protected]

Definition at line 532 of file Param.hh.

Referenced by GetGroupName(), and BIAS::ParamGUI::GetNotebook().

struct option* BIAS::Param::longopts [protected]

Definition at line 533 of file Param.hh.

Referenced by ParseCommandLine().

std::map<const std::string,BIAS::ParamTypeBase*> BIAS::Param::ParamMap_ [private]

this STL map holds the name-ParamType-pairs

Definition at line 542 of file Param.hh.

Referenced by AddParamBool(), AddParamDouble(), AddParamEnum(), AddParamInt(), AddParamString(), AddParamVecDbl(), AddParamVecInt(), CheckParam(), GetParamBool(), GetParamDouble(), GetParamEnum(), GetParamInt(), GetParamMap(), GetParamString(), GetParamVecDbl(), GetParamVecInt(), GetSizeOfLongestParamValueString(), Param(), ParseCommandLine(), SetDefaults(), SetEnhancedFlag(), SetHiddenFlag(), SetParamBool(), SetParamDouble(), SetParamEnum(), SetParameterWriteToFile(), SetParamInt(), SetParamString(), SetParamVecDbl(), SetParamVecInt(), SetRangeInt(), ShowData(), UniqueSortedGroups(), Usage(), and ~Param().

bool BIAS::Param::WriteComments_ [protected]

Definition at line 537 of file Param.hh.

Referenced by Param().

bool BIAS::Param::WriteEnhanced_ [protected]

Definition at line 538 of file Param.hh.

Referenced by Param(), and UpdateParameter().

bool BIAS::Param::WriteIndent_ [protected]

Definition at line 536 of file Param.hh.

Referenced by Param(), and UpdateParameter().

The documentation for this class was generated from the following files:
  • Utils/Param.hh
  • Utils/Param.cpp
Generated on Wed Jun 21 19:09:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamCallbackInterface Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamCallbackInterface

BIAS::ParamCallbackInterface Class Reference
[Utilities]

This class provides an interface to be called if parameter changes occured. More...

#include <Utils/Param.hh>

Inheritance diagram for BIAS::ParamCallbackInterface:

[legend]
List of all members.

Public Member Functions

ParamCallbackInterface ()
virtual void | ParameterChanged (const std::string &paramname, const void *data)
virtual | ~ParamCallbackInterface ()

Detailed Description

This class provides an interface to be called if parameter changes occured.

If an application makes use of ParamGui and has to react on parameter changes, it should be derived from this class and could register a callback for each instance to this method.

Definition at line 75 of file Param.hh.

Constructor & Destructor Documentation

ParamCallbackInterface::~ParamCallbackInterface ( ) [virtual]

Definition at line 61 of file Param.cpp.

ParamCallbackInterface::ParamCallbackInterface ( )

Definition at line 64 of file Param.cpp.

Member Function Documentation

void ParamCallbackInterface::ParameterChanged | ( | const std::string & | paramname,
 |  | const void * | data
 | ) | [virtual]

Reimplemented in MyAlgorithm, and MyAlgorithm.

Definition at line 69 of file Param.cpp.

The documentation for this class was generated from the following files:
  • Utils/Param.hh
  • Utils/Param.cpp
Generated on Wed Jun 21 19:09:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Parametrization Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Parametrization

BIAS::Parametrization Class Reference

#include <Geometry/Parametrization.hh>

Collaboration diagram for BIAS::Parametrization:

[legend]
List of all members.

Public Member Functions

bool | FMatrixToParams (const BIAS::FMatrix &Mat, std::vector< double > &Params)
parametizes an F-matrix to seven parameters
double | GetFScaling ()
double | GetHScaling ()
bool | HMatrixToParams (const BIAS::HMatrix &Mat, std::vector< double > &Params)
parametizes an H-matrix to eight parameters
Parametrization ()
bool | ParamsToFMatrix (BIAS::FMatrix &Mat, const std::vector< double > &Params)
composes an F-matrix from the seven given parameters The deparametrization only works with the previously parametized values of 'FMatrixToParams', because some internally stored parameters are important for the correct composition.
bool | ParamsToHMatrix (BIAS::HMatrix &Mat, const std::vector< double > &Params)
composes an H-matrix from the seven given parameters
~Parametrization ()

Static Public Member Functions

static bool | EMatrixToParams (BIAS::EMatrix &Mat, Vector< double > &Params, std::vector< BIAS::HomgPoint2D > &inlier1, std::vector< BIAS::HomgPoint2D > &inlier2)
parametizes an essential-matrix to five parameters
static bool | ParamsToEMatrix (BIAS::EMatrix &Mat, const Vector< double > &Params)
composes an essential-matrix from the five given parameters

Protected Member Functions

double | GetBiggestAbsEntry ()
Find the biggest absolute entry of the upper left 2x2 submatrix of the internally stored F matrix member.

Protected Attributes

BIAS::FMatrix F_
int | Fcol_
std::vector< double > | FParams_
int | Frow_
double | Fscale_
BIAS::HMatrix H_
std::vector< double > | HParams_
double | Hscale_

Detailed Description

Definition at line 51 of file Parametrization.hh.

Constructor & Destructor Documentation

Parametrization::Parametrization ( )

Definition at line 35 of file Parametrization.cpp.

Parametrization::~Parametrization ( )

Definition at line 36 of file Parametrization.cpp.

Member Function Documentation

bool Parametrization::EMatrixToParams | ( | BIAS::EMatrix & | Mat,
 |  | Vector< double > & | Params,
 |  | std::vector< BIAS::HomgPoint2D > & | inlier1,
 |  | std::vector< BIAS::HomgPoint2D > & | inlier2
 | ) | [static]

parametizes an essential-matrix to five parameters

Returns:
true on success, false on error
Author:
frahm 03 2004

Definition at line 251 of file Parametrization.cpp.

References BIASABORT, BIASERR, BIAS::EMatrix::GetRotationTranslation(), MINIMUM_ROTATION, BIAS::Vector3< T >::NormL2(), NUM_PARAM_ESSENTIAL, R, BIAS::Vector3< T >::Set(), and TNT::Vector< T >::size().

bool BIAS::Parametrization::FMatrixToParams | ( | const BIAS::FMatrix & | Mat,
 |  | std::vector< double > & | Params
 | ) |

parametizes an F-matrix to seven parameters

Returns:
true on success, false on error
Author:
mdunda 09 2003

double Parametrization::GetBiggestAbsEntry ( ) [protected]

Find the biggest absolute entry of the upper left 2x2 submatrix of the internally stored F matrix member.

The position of this element is stored internally and used for the composition of the F matrix in ParamsToFMatrix.

Returns:
value of the entry with biggest absolute value
Author:
mdunda 09 2003

Definition at line 235 of file Parametrization.cpp.

References abs, F_, Fcol_, Frow_, max, and r.

double BIAS::Parametrization::GetFScaling ( ) [inline]

Definition at line 98 of file Parametrization.hh.

double BIAS::Parametrization::GetHScaling ( ) [inline]

Definition at line 99 of file Parametrization.hh.

bool BIAS::Parametrization::HMatrixToParams | ( | const BIAS::HMatrix & | Mat,
 |  | std::vector< double > & | Params
 | ) |

parametizes an H-matrix to eight parameters

Returns:
true on success, false on error
Author:
mdunda 09 2003

bool Parametrization::ParamsToEMatrix | ( | BIAS::EMatrix & | Mat,
 |  | const Vector< double > & | Params
 | ) | [static]

composes an essential-matrix from the five given parameters

Returns:
true on success, false on error
Author:
frahm 03 2004

Definition at line 289 of file Parametrization.cpp.

References BIASABORT, BIASERR, BIAS::Vector3< T >::CoordSphereToEuclidian(), MINIMUM_ROTATION, BIAS::Vector3< T >::NormL2(), NUM_PARAM_ESSENTIAL, R, and TNT::Vector< T >::size().

bool BIAS::Parametrization::ParamsToFMatrix | ( | BIAS::FMatrix & | Mat,
 |  | const std::vector< double > & | Params
 | ) |

composes an F-matrix from the seven given parameters The deparametrization only works with the previously parametized values of 'FMatrixToParams', because some internally stored parameters are important for the correct composition.

Returns:
true on success, false on error
Author:
mdunda 09 2003

Referenced by FErrorFunction().

bool BIAS::Parametrization::ParamsToHMatrix | ( | BIAS::HMatrix & | Mat,
 |  | const std::vector< double > & | Params
 | ) |

composes an H-matrix from the seven given parameters

Returns:
true on success, false on error
Author:
mdunda 09 2003

Referenced by HErrorFunction().

Member Data Documentation

BIAS::FMatrix BIAS::Parametrization::F_ [protected]

Definition at line 103 of file Parametrization.hh.

Referenced by GetBiggestAbsEntry().

int BIAS::Parametrization::Fcol_ [protected]

Definition at line 108 of file Parametrization.hh.

Referenced by GetBiggestAbsEntry().

std::vector<double> BIAS::Parametrization::FParams_ [protected]

Definition at line 104 of file Parametrization.hh.

int BIAS::Parametrization::Frow_ [protected]

Definition at line 108 of file Parametrization.hh.

Referenced by GetBiggestAbsEntry().

double BIAS::Parametrization::Fscale_ [protected]

Definition at line 122 of file Parametrization.hh.

BIAS::HMatrix BIAS::Parametrization::H_ [protected]

Definition at line 111 of file Parametrization.hh.

std::vector<double> BIAS::Parametrization::HParams_ [protected]

Definition at line 112 of file Parametrization.hh.

double BIAS::Parametrization::Hscale_ [protected]

Definition at line 123 of file Parametrization.hh.

The documentation for this class was generated from the following files:
  • Geometry/Parametrization.hh
  • Geometry/Parametrization.cpp
Generated on Wed Jun 21 19:09:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamGUI Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamGUI

BIAS::ParamGUI Class Reference
[Graphical User Interfaces]

?? More...

#include <Gui/ParamGUI.hh>

Inheritance diagram for BIAS::ParamGUI:

[legend]
Collaboration diagram for BIAS::ParamGUI:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool * | AddParamBool (const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW)
double * | AddParamDouble (const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW)
int * | AddParamEnum (const std::string &name, const std::string &help, const std::vector< std::string > &enums, const int deflt=0, const std::vector< int > *IDs=NULL, const char cmdshort=0, const int Group=GRP_NOSHOW)
int * | AddParamInt (const std::string &name, const std::string &help, int deflt=0, int min=INT_MIN, int max=INT_MAX, char cmdshort=0, int Group=GRP_NOSHOW)
For all adding routines:.
std::string * | AddParamString (const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW)
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
The same as above, but default is given by a string, syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values.
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
The same as other AddParamVecInt(), but default is given by a string, syntax is as at command line "v_0 v_1 v_2".
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const BIAS::Vector< int > &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!
bool | CheckParam (const std::string &name)
Check if parameter has already been added.
bool | DebugLevelIsSet (long int lv) const
void DisableDestructorWarning ()
Uses this just before end of your program to avoid error from destructor.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
ParamGUIDialog * | GetDialog (wxWindow *parent, const wxString &title)
Builds up a wxDialog with a notebook embedded in it.
wxFrame * | GetFrame (wxWindow *parent)
Builds up a standalone wxFrame with a notebook embedded in it.
int | GetFreeGroupID ()
returns unused group id
int | GetGroupID (const std::string &name)
returns group id of parameter with name
int | GetGroupIDForGroupName (const std::string &name)
std::string | GetGroupName (const int group_id)
gets the name of a group
wxNotebook * | GetNotebook (wxWindow *parent)
Builds up a wxNotebook with each parameter group on one page.
wxPanel * | GetPanel (wxWindow *parent, int GroupID=GRP_ALL)
Builds up a wxPanel with the parameters specified by GroupID.
bool * | GetParamBool (const std::string &name) const
double * | GetParamDouble (const std::string &name) const
int * | GetParamEnum (const std::string &name) const
int * | GetParamInt (const std::string &name) const
std::string * | GetParamString (const std::string &name) const
BIAS::Vector< double > * | GetParamVecDbl (const std::string &name) const
BIAS::Vector< int > * | GetParamVecInt (const std::string &name) const
int | GetSizeOfLongestParamName ()
returns the size of the longest param name not marked as enhanced or hidden
int | GetSizeOfLongestParamValueString ()
returns the size of the longest param value string not marked as enhanced or hidden
bool | IsUsedGroupID (const int group_id)
returns if the group id is used
ParamGUI ()
int | ParseCommandLine (int &argc, char *argv[])
argv is reordered according to getopt() all no recognized arguments are at the end.
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | ReadParameter (const std::string &filename)
read values for parameters from file
int | ReadParameterXML (const std::string &filename)
read values for parameters from xml-file
int | RegisterCallbackObject (const std::string &name, ParamCallbackInterface *obj)
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void SetDefaults ()
sets all entries to their initially (AddParam) given default values
int | SetEnhancedFlag (const std::string &name, bool enhanced)
if a parametr is marked as enhanced, it is hidden from the naive user
int | SetGroupName (const int group_id, const std::string &name)
sets the name for a group
int | SetHiddenFlag (const std::string &name, bool hidden)
if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class
bool * | SetParamBool (const std::string &name, const bool &value)
double * | SetParamDouble (const std::string &name, const double &value)
int * | SetParamEnum (const std::string &name, const std::string &value)
set the enum to the ID corresponding to the string 'value'
int * | SetParamEnum (const std::string &name, const int &value)
set the enum to the ID 'value'
int | SetParameterWriteToFile (const std::string &name, bool writeToFile)
int * | SetParamInt (const std::string &name, const int &value)
std::string * | SetParamString (const std::string &name, const std::string &value)
BIAS::Vector< double > * | SetParamVecDbl (const std::string &name, const BIAS::Vector< double > &value)
BIAS::Vector< int > * | SetParamVecInt (const std::string &name, const BIAS::Vector< int > &value)
virtual int | SetRangeInt (const std::string &name, const int min, const int max)
Set [Min,Max] as new range, especially usefull in derived class PramGUI.
int | SetShortCommand (const std::string &name, const char cmd)
Add a short commandline switch to an existing parameter.
void | SetWriteOptions (bool indent, bool comments, bool enhanced)
void | ShowData (std::ostream &os=std::cout, int grp=GRP_ALL, bool showenhanced=true)
print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown
std::vector< int > | UniqueSortedGroups ()
Returns a vector of all group IDs (unique) in ascending order.
int | UpdateParameter (int &argc, char *argv[], const std::string &default_filename)
update all arguments from command line and parameter file 1.
void | Usage (std::ostream &os=std::cout)
print Help-Information to stdout
int | WriteParameter (const std::string &filename)
store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written
int | WriteParameterXML (const std::string &filename)
int | WriteRunMe (const std::string &filename)
writes complete command line including program name and unknown command line options, no defaults, no params read from file
~ParamGUI ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static int | ParseListFile (const std::string &ListFileName, std::vector< std::string > &LinesInFile)
Extracts lines from passed file.
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

const std::map< const std::string,
BIAS::ParamTypeBase * > & 		GetParamMap () const
std::map< const std::string,
BIAS::ParamTypeBase * > & 		GetParamMap ()

Protected Attributes

long int | _liDebugLevel
std::vector< std::string > | ArgV_
bool | DestructorWarning_
std::vector< std::string > | GroupNames_
option * longopts
bool | WriteComments_
bool | WriteEnhanced_
bool | WriteIndent_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

??

Author:
evers/mdunda

Definition at line 79 of file ParamGUI.hh.

Constructor & Destructor Documentation

ParamGUI::ParamGUI ( )

Definition at line 25 of file ParamGUI.cpp.

ParamGUI::~ParamGUI ( )

Definition at line 31 of file ParamGUI.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool * Param::AddParamBool | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | bool | deflt = false,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

Definition at line 314 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), BIAS::Param::Param(), and ParamInit().

double * Param::AddParamDouble | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | double | deflt = 0.0,
 |  | double | min = -DBL_MAX,
 |  | double | max = DBL_MAX,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

Definition at line 361 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), MyAlgorithm::ParamAdd(), and ParamInit().

int * Param::AddParamEnum | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::vector< std::string > & | enums,
 |  | const int | deflt = 0,
 |  | const std::vector< int > * | IDs = NULL,
 |  | const char | cmdshort = 0,
 |  | const int | Group = GRP_NOSHOW
 | ) | [inherited]

Parameters:
enums | holds all enumeration names.
IDs | can be a pointer to a vector of integers. It must have the same size as 'enums' and gives each name a number, which must be unique! If NULL the enums are numbered from 0 to enums.size()-1
Author:
mdunda 03 2004

Definition at line 479 of file Param.cpp.

References BIASERR, and BIAS::Param::ParamMap_.

Referenced by main(), and MyFrame::MyFrame().

int * Param::AddParamInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | int | deflt = 0,
 |  | int | min = INT_MIN,
 |  | int | max = INT_MAX,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

For all adding routines:.

Parameters:
name | is the unique identifier of the parameter
help | is a help or 'tooltip' string for that parameter
deflt | is a default value for that parameter. Note that not every parameter type has a default at compile time!
cmdshort | is a short command option for the command line
Group | is a number to group some parameters for visualization, e.g. all matchers are in group 1, all trackers are in group 37 etc. When printing to screen, you can limit the output to a group of interest. The default is 0 - no special group.
Author:
mdunda 03 2004

Definition at line 285 of file Param.cpp.

References BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), MyAlgorithm::ParamAdd(), and ParamInit().

std::string * Param::AddParamString | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | std::string | deflt = "",
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

Definition at line 337 of file Param.cpp.

References BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), main(), MyFrame::MyFrame(), BIAS::Param::Param(), and ParamInit().

BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::string & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

The same as above, but default is given by a string, syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values.

Author:
Daniel Grest, July 2005

Definition at line 412 of file Param.cpp.

BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const BIAS::Vector< double > & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!

Definition at line 389 of file Param.cpp.

References BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::VideoServer::AddParams_(), and main().

BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const std::string & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

The same as other AddParamVecInt(), but default is given by a string, syntax is as at command line "v_0 v_1 v_2".

Don't set empty string, cause the length is determined also by the number of values

Author:
Daniel Grest, July 2005

Definition at line 457 of file Param.cpp.

BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name,
 |  | const std::string & | help,
 |  | const BIAS::Vector< int > & | deflt,
 |  | char | cmdshort = 0,
 |  | int | Group = GRP_NOSHOW
 | ) | [inherited]

Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!

Definition at line 434 of file Param.cpp.

References BIASERR, and BIAS::Param::ParamMap_.

Referenced by main().

bool Param::CheckParam ( const std::string & name ) [inherited]

Check if parameter has already been added.

Definition at line 538 of file Param.cpp.

References BIAS::Param::ParamMap_.

Referenced by BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), BIAS::MSAC< SolutionType >::_AddParameter(), BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::AddGradientType(), BIAS::AddLowPassType(), BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void BIAS::Param::DisableDestructorWarning ( ) [inline, inherited]

Uses this just before end of your program to avoid error from destructor.

Author:
evers

Definition at line 502 of file Param.hh.

Referenced by main(), and ParamInit().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

ParamGUIDialog * ParamGUI::GetDialog | ( | wxWindow * | parent,
 |  | const wxString & | title
 | ) |

Builds up a wxDialog with a notebook embedded in it.

Returns:
a pointer to the new dialog NULL on error
Author:
evers 2004-01

Definition at line 136 of file ParamGUI.cpp.

wxFrame * ParamGUI::GetFrame ( wxWindow * parent )

Builds up a standalone wxFrame with a notebook embedded in it.

Returns:
a pointer to the new frame NULL on error
Author:
mdunda 03 2004

Definition at line 117 of file ParamGUI.cpp.

References GetNotebook().

int Param::GetFreeGroupID ( ) [inherited]

returns unused group id

Author:
woelk

Definition at line 1350 of file Param.cpp.

References BIAS::Param::UniqueSortedGroups().

Referenced by BIAS::VideoServer::AddParams_(), BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), main(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::MSAC< SolutionType >::MSAC(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::Param::GetGroupID ( const std::string & name ) [inherited]

returns group id of parameter with name

Author:
woelk

Referenced by BIAS::MatchDataBase::_AddParameter(), and BIAS::GenSynthMatches::_AddParameter().

int BIAS::Param::GetGroupIDForGroupName ( const std::string & name ) [inherited]

Author:
evers

std::string Param::GetGroupName ( const int group_id ) [inherited]

gets the name of a group

Author:
woelk

Definition at line 1394 of file Param.cpp.

References BIASERR, BIAS::Param::GroupNames_, GRP_ALL, and GRP_NOSHOW.

Referenced by GetNotebook(), and BIAS::Param::ShowData().

wxNotebook * ParamGUI::GetNotebook ( wxWindow * parent )

Builds up a wxNotebook with each parameter group on one page.

Group-ID -1 (GRP_NOSHOW) will be ignored.

Returns:
a pointer to the new notebook NULL on error
Author:
mdunda 03 2004 now GroupNames are shown in tabs if all Groupnames are set ischiller 08.09.04

Definition at line 85 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIASERR, BIAS::Param::GetGroupName(), GetPanel(), BIAS::Param::GroupNames_, GRP_NOSHOW, and BIAS::Param::UniqueSortedGroups().

Referenced by GetFrame(), and BIAS::ParamGUIDialog::ParamGUIDialog().

wxPanel * ParamGUI::GetPanel | ( | wxWindow * | parent,
 |  | int | GroupID = GRP_ALL
 | ) |

Builds up a wxPanel with the parameters specified by GroupID.

Returns:
a pointer to the new panel

NULL on error

Author:
mdunda 03 2004

Definition at line 36 of file ParamGUI.cpp.

References BIAS::ParamGUIPanel::AddBoolWidgets(), BIAS::ParamGUIPanel::AddDoubleWidgets(), BIAS::ParamGUIPanel::AddEnumWidgets(), BIAS::ParamGUIPanel::AddIntWidgets(), BIAS::ParamGUIPanel::AddStringWidgets(), BIAS::ParamGUIPanel::AddVecDblWidgets(), BIAS::ParamGUIPanel::AddVecIntWidgets(), BIASERR, BIAS::Param::GetParamMap(), and it.

Referenced by GetNotebook(), and MyFrame::MyFrame().

bool * Param::GetParamBool ( const std::string & name ) const [inherited]

Definition at line 563 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by BIAS::MSAC< SolutionType >::_AddParameter(), main(), ParamInit(), BIAS::Param::UpdateParameter(), and BIAS::Param::Usage().

double * Param::GetParamDouble ( const std::string & name ) const [inherited]

Definition at line 595 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by BIAS::GradientGauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Gauss< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_AddParam(), and main().

int * Param::GetParamEnum ( const std::string & name ) const [inherited]

Definition at line 644 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::_AddParam(), BIAS::AddGradientType(), and BIAS::AddLowPassType().

int * Param::GetParamInt ( const std::string & name ) const [inherited]

Definition at line 546 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::Mean< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Binomial< InputStorageType, OutputStorageType >::_AddParam(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::_AddParam(), BIAS::CornerDetectorSusan< StorageType >::_AddParameter(), BIAS::CornerDetectorBase< StorageType >::_AddParameter(), BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and main().

const std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( ) const [protected, inherited]

Definition at line 1812 of file Param.cpp.

References BIAS::Param::ParamMap_.

std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( ) [protected, inherited]

Definition at line 1806 of file Param.cpp.

References BIAS::Param::ParamMap_.

Referenced by GetPanel().

std::string * Param::GetParamString ( const std::string & name ) const [inherited]

Definition at line 579 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by main(), BIAS::Param::ParseCommandLine(), and BIAS::Param::UpdateParameter().

BIAS::Vector< double > * Param::GetParamVecDbl ( const std::string & name ) const [inherited]

Definition at line 612 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

BIAS::Vector< int > * Param::GetParamVecInt ( const std::string & name ) const [inherited]

Definition at line 628 of file Param.cpp.

References BIASERR, it, and BIAS::Param::ParamMap_.

int Param::GetSizeOfLongestParamName ( ) [inherited]

returns the size of the longest param name not marked as enhanced or hidden

Author:
woelk 10/2004

Definition at line 1430 of file Param.cpp.

Referenced by BIAS::Param::ShowData().

int Param::GetSizeOfLongestParamValueString ( ) [inherited]

returns the size of the longest param value string not marked as enhanced or hidden

Author:
woelk 10/2004

Definition at line 1442 of file Param.cpp.

References BIAS::Param::ParamMap_.

Referenced by BIAS::Param::ShowData().

bool Param::IsUsedGroupID ( const int group_id ) [inherited]

returns if the group id is used

Author:
woelk

Definition at line 1424 of file Param.cpp.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

int Param::ParseCommandLine | ( | int & | argc,
 |  | char * | argv[]
 | ) | [inherited]

argv is reordered according to getopt() all no recognized arguments are at the end.

Return value is optind from getopt(), the index of the next not recognized argument. Sometimes, the function however returns negative values. ?

Todo:
document concept of return value of ParseCommandLine Reads parameter from file if argument --readconfig is given.
Author:
evers

Definition at line 971 of file Param.cpp.

References BIAS::Param::ArgV_, BIASDOUT, D_PARAM_CONF_FILE, D_PARAM_PARSECMDL, done, option::flag, getopt_long(), BIAS::Param::GetParamString(), option::has_arg, BIAS::Param::longopts, optarg, optind, optional_argument, BIAS::Param::ParamMap_, BIAS::Param::ReadParameter(), required_argument, BIAS::Param::Usage(), and option::val.

Referenced by main(), MyFrame::MyFrame(), ParamInit(), and BIAS::Param::UpdateParameter().

int Param::ParseListFile | ( | const std::string & | ListFileName,
 |  | std::vector< std::string > & | LinesInFile
 | ) | [static, inherited]

Extracts lines from passed file.

The specified file is expected to contain a list of entries. Those entries are assumed to be seperated by newlines.

Parameters:
ListFileName | Routine tries to open file with this name.
LinesInFile | result of line extraction.
Returns:
-1 if file could not be opened.

0 all good.

Definition at line 1779 of file Param.cpp.

References BIASERR.

Referenced by MainFrame::LoadImages().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int BIAS::Param::ReadParameter ( const std::string & filename ) [inherited]

read values for parameters from file

Referenced by main(), and BIAS::Param::ParseCommandLine().

int BIAS::Param::ReadParameterXML ( const std::string & filename ) [inherited]

read values for parameters from xml-file

int BIAS::Param::RegisterCallbackObject | ( | const std::string & | name,
 |  | ParamCallbackInterface * | obj
 | ) | [inherited]

Author:
evers

Referenced by MyAlgorithm::ParamAdd().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void Param::SetDefaults ( ) [inherited]

sets all entries to their initially (AddParam) given default values

Definition at line 1732 of file Param.cpp.

References BIAS::Param::ParamMap_.

int Param::SetEnhancedFlag | ( | const std::string & | name,
 |  | bool | enhanced
 | ) | [inherited]

if a parametr is marked as enhanced, it is hidden from the naive user

Definition at line 898 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

Referenced by MarkEnhancedAndSetDefaults().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int BIAS::Param::SetGroupName | ( | const int | group_id,
 |  | const std::string & | name
 | ) | [inherited]

sets the name for a group

Author:
woelk

Referenced by BIAS::VideoServer::AddParams_(), BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::CornerDetectorBase< StorageType >::CornerDetectorBase(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::CornerDetectorGradient(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::CornerDetectorHarris(), BIAS::CornerDetectorSusan< StorageType >::CornerDetectorSusan(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::FilterNTo2N(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::GradientGauss(), main(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::TrackerBase< StorageType >::TrackerBase().

int Param::SetHiddenFlag | ( | const std::string & | name,
 |  | bool | hidden
 | ) | [inherited]

if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class

Definition at line 912 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

bool * Param::SetParamBool | ( | const std::string & | name,
 |  | const bool & | value
 | ) | [inherited]

Definition at line 690 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

double * Param::SetParamDouble | ( | const std::string & | name,
 |  | const double & | value
 | ) | [inherited]

Definition at line 737 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by main(), and MarkEnhancedAndSetDefaults().

int * Param::SetParamEnum | ( | const std::string & | name,
 |  | const std::string & | value
 | ) | [inherited]

set the enum to the ID corresponding to the string 'value'

Definition at line 828 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

int * Param::SetParamEnum | ( | const std::string & | name,
 |  | const int & | value
 | ) | [inherited]

set the enum to the ID 'value'

Definition at line 856 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

Referenced by main(), and MarkEnhancedAndSetDefaults().

int Param::SetParameterWriteToFile | ( | const std::string & | name,
 |  | bool | writeToFile
 | ) | [inherited]

Definition at line 884 of file Param.cpp.

References BIASABORT, BIASERR, and BIAS::Param::ParamMap_.

Referenced by BIAS::Param::Param().

int * Param::SetParamInt | ( | const std::string & | name,
 |  | const int & | value
 | ) | [inherited]

Definition at line 661 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

Referenced by MarkEnhancedAndSetDefaults().

std::string * Param::SetParamString | ( | const std::string & | name,
 |  | const std::string & | value
 | ) | [inherited]

Definition at line 713 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

BIAS::Vector< double > * Param::SetParamVecDbl | ( | const std::string & | name,
 |  | const BIAS::Vector< double > & | value
 | ) | [inherited]

Definition at line 766 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

BIAS::Vector< int > * Param::SetParamVecInt | ( | const std::string & | name,
 |  | const BIAS::Vector< int > & | value
 | ) | [inherited]

Definition at line 797 of file Param.cpp.

References BIASABORT, BIASERR, it, and BIAS::Param::ParamMap_.

int Param::SetRangeInt | ( | const std::string & | name,
 |  | const int | min,
 |  | const int | max
 | ) | [virtual, inherited]

Set [Min,Max] as new range, especially usefull in derived class PramGUI.

Definition at line 1751 of file Param.cpp.

References BIAS::Param::ParamMap_.

int BIAS::Param::SetShortCommand | ( | const std::string & | name,
 |  | const char | cmd
 | ) | [inherited]

Add a short commandline switch to an existing parameter.

Useful for readconfig/writeconfig.

Author:
evers

Referenced by main().

void BIAS::Param::SetWriteOptions | ( | bool | indent,
 |  | bool | comments,
 |  | bool | enhanced
 | ) | [inline, inherited]

Definition at line 519 of file Param.hh.

Referenced by main(), and BIAS::Param::UpdateParameter().

void Param::ShowData | ( | std::ostream & | os = std::cout,
 |  | int | grp = GRP_ALL,
 |  | bool | showenhanced = true
 | ) | [inherited]

print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown

Definition at line 120 of file Param.cpp.

References BIAS::Param::GetGroupName(), BIAS::Param::GetSizeOfLongestParamName(), BIAS::Param::GetSizeOfLongestParamValueString(), GRP_ALL, it, BIAS::Param::ParamMap_, and BIAS::Param::UniqueSortedGroups().

Referenced by main(), MyFrame::MyFrame(), and MyFrame::~MyFrame().

vector< int > Param::UniqueSortedGroups ( ) [inherited]

Returns a vector of all group IDs (unique) in ascending order.

Only parameters are with WriteToFile_ = true are considered.

Author:
woelk 03 2004

Definition at line 1411 of file Param.cpp.

References BIAS::Param::ParamMap_.

Referenced by BIAS::Param::GetFreeGroupID(), GetNotebook(), and BIAS::Param::ShowData().

int Param::UpdateParameter | ( | int & | argc,
 |  | char * | argv[],
 |  | const std::string & | default_filename
 | ) | [inherited]

update all arguments from command line and parameter file 1.

reads parameter from default file 2. if --readconfig is given on commandline, reads parameter from this file 3. evaluates parameter given on command line

Command line arguments take precedence over arguments from parameter file. Parameter from parameter file specified with --readconfig=fname take precedencor over parameter read from default_filename. If no parameterfile is found, the defaults are written to default_name.

Author:
woelk 09/2004

Definition at line 928 of file Param.cpp.

References BIASDOUT, D_PARAM_CONF_FILE, BIAS::Param::GetParamBool(), BIAS::Param::GetParamString(), BIAS::Param::ParseCommandLine(), res, BIAS::Param::SetWriteOptions(), BIAS::Param::WriteEnhanced_, BIAS::Param::WriteIndent_, and BIAS::Param::WriteParameter().

Referenced by main().

void Param::Usage ( std::ostream & os = std::cout ) [inherited]

print Help-Information to stdout

Definition at line 175 of file Param.cpp.

References BIAS::Param::GetParamBool(), it, and BIAS::Param::ParamMap_.

Referenced by main(), ParamInit(), BIAS::Param::ParseCommandLine(), and usage().

int BIAS::Param::WriteParameter ( const std::string & filename ) [inherited]

store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written

Author:
??

Referenced by main(), and BIAS::Param::UpdateParameter().

int BIAS::Param::WriteParameterXML ( const std::string & filename ) [inherited]

int Param::WriteRunMe ( const std::string & filename ) [inherited]

writes complete command line including program name and unknown command line options, no defaults, no params read from file

Definition at line 1699 of file Param.cpp.

References BIAS::Param::ArgV_.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<std::string> BIAS::Param::ArgV_ [protected, inherited]

Definition at line 531 of file Param.hh.

Referenced by BIAS::Param::ParseCommandLine(), and BIAS::Param::WriteRunMe().

bool BIAS::Param::DestructorWarning_ [protected, inherited]

Definition at line 534 of file Param.hh.

Referenced by BIAS::Param::Param().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::vector<std::string> BIAS::Param::GroupNames_ [protected, inherited]

Definition at line 532 of file Param.hh.

Referenced by BIAS::Param::GetGroupName(), and GetNotebook().

struct option* BIAS::Param::longopts [protected, inherited]

Definition at line 533 of file Param.hh.

Referenced by BIAS::Param::ParseCommandLine().

bool BIAS::Param::WriteComments_ [protected, inherited]

Definition at line 537 of file Param.hh.

Referenced by BIAS::Param::Param().

bool BIAS::Param::WriteEnhanced_ [protected, inherited]

Definition at line 538 of file Param.hh.

Referenced by BIAS::Param::Param(), and BIAS::Param::UpdateParameter().

bool BIAS::Param::WriteIndent_ [protected, inherited]

Definition at line 536 of file Param.hh.

Referenced by BIAS::Param::Param(), and BIAS::Param::UpdateParameter().

The documentation for this class was generated from the following files:
  • Gui/ParamGUI.hh
  • Gui/ParamGUI.cpp
Generated on Wed Jun 21 19:09:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamGUIDialog Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamGUIDialog

BIAS::ParamGUIDialog Class Reference

#include <Gui/ParamGUI.hh>

List of all members.

Public Member Functions

ParamGUIDialog (wxWindow *parent, const wxString &title, const wxPoint &p, const wxSize &s, ParamGUI *pg)
~ParamGUIDialog ()

Detailed Description

Definition at line 64 of file ParamGUI.hh.

Constructor & Destructor Documentation

ParamGUIDialog::ParamGUIDialog | ( | wxWindow * | parent,
 |  | const wxString & | title,
 |  | const wxPoint & | p,
 |  | const wxSize & | s,
 |  | ParamGUI * | pg
 | ) |

Definition at line 508 of file ParamGUI.cpp.

References BIAS::ParamGUI::GetNotebook().

ParamGUIDialog::~ParamGUIDialog ( )

Definition at line 535 of file ParamGUI.cpp.

The documentation for this class was generated from the following files:
  • Gui/ParamGUI.hh
  • Gui/ParamGUI.cpp
Generated on Wed Jun 21 19:09:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamGUIPanel Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamGUIPanel

BIAS::ParamGUIPanel Class Reference
[Graphical User Interfaces]

?? More...

#include <Gui/ParamGUI.hh>

Collaboration diagram for BIAS::ParamGUIPanel:

[legend]
List of all members.

Public Member Functions

void | AddBoolWidgets (BIAS::ParamTypeBool *item)
void | AddDoubleWidgets (BIAS::ParamTypeDouble *item)
void | AddEnumWidgets (BIAS::ParamTypeEnum *item)
void | AddIntWidgets (BIAS::ParamTypeInt *item)
void | AddStringWidgets (BIAS::ParamTypeString *item)
void | AddVecDblWidgets (BIAS::ParamTypeVecDbl *item)
void | AddVecIntWidgets (BIAS::ParamTypeVecInt *item)
ParamGUIPanel (wxWindow *parent)
~ParamGUIPanel ()

Protected Member Functions

void | OnCheckBox (wxCommandEvent &event)
void | OnChoice (wxCommandEvent &event)
void | OnSpinCtrl (wxSpinEvent &event)
void | OnTextEnter (wxCommandEvent &event)

Protected Attributes

wxFlexGridSizer * | Grid_
wxWindow * Parent_

Private Attributes

std::map< unsigned int, struct
ItemAndWidget > 		WidgetIDs_

Detailed Description

??

Author:
evers/mdunda

Definition at line 30 of file ParamGUI.hh.

Constructor & Destructor Documentation

ParamGUIPanel::ParamGUIPanel ( wxWindow * parent )

Definition at line 151 of file ParamGUI.cpp.

References Grid_, Parent_, and WidgetIDs_.

ParamGUIPanel::~ParamGUIPanel ( )

Definition at line 169 of file ParamGUI.cpp.

Member Function Documentation

void ParamGUIPanel::AddBoolWidgets ( BIAS::ParamTypeBool * item )

Definition at line 207 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddDoubleWidgets ( BIAS::ParamTypeDouble * item )

Definition at line 231 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddEnumWidgets ( BIAS::ParamTypeEnum * item )

Definition at line 325 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), and it.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddIntWidgets ( BIAS::ParamTypeInt * item )

Definition at line 182 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddStringWidgets ( BIAS::ParamTypeString * item )

Definition at line 256 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddVecDblWidgets ( BIAS::ParamTypeVecDbl * item )

Definition at line 279 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::AddVecIntWidgets ( BIAS::ParamTypeVecInt * item )

Definition at line 302 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::ItemAndWidget::item, and BIAS::ItemAndWidget::widget.

Referenced by BIAS::ParamGUI::GetPanel().

void ParamGUIPanel::OnCheckBox ( wxCommandEvent & event ) [protected]

Definition at line 382 of file ParamGUI.cpp.

References BIASERR, it, and WidgetIDs_.

void ParamGUIPanel::OnChoice ( wxCommandEvent & event ) [protected]

Definition at line 478 of file ParamGUI.cpp.

References BIASERR, it, and WidgetIDs_.

void ParamGUIPanel::OnSpinCtrl ( wxSpinEvent & event ) [protected]

Definition at line 357 of file ParamGUI.cpp.

References BIASERR, and it.

void ParamGUIPanel::OnTextEnter ( wxCommandEvent & event ) [protected]

Bug:
here a bit SetFromStrng()!!
Bug:
here a bit SetFromStrng()!!

Definition at line 406 of file ParamGUI.cpp.

References BIASERR, COUT, it, and WidgetIDs_.

Member Data Documentation

wxFlexGridSizer* BIAS::ParamGUIPanel::Grid_ [protected]

Definition at line 50 of file ParamGUI.hh.

Referenced by ParamGUIPanel().

wxWindow* BIAS::ParamGUIPanel::Parent_ [protected]

Definition at line 46 of file ParamGUI.hh.

Referenced by ParamGUIPanel().

std::map<unsigned int, struct ItemAndWidget> BIAS::ParamGUIPanel::WidgetIDs_ [private]

Definition at line 48 of file ParamGUI.hh.

Referenced by OnCheckBox(), OnChoice(), OnTextEnter(), and ParamGUIPanel().

The documentation for this class was generated from the following files:
  • Gui/ParamGUI.hh
  • Gui/ParamGUI.cpp
Generated on Wed Jun 21 19:09:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeBase

BIAS::ParamTypeBase Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeBase:

[legend]
Collaboration diagram for BIAS::ParamTypeBase:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeBase ()
virtual void | SetDefault ()
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeBase ()

Public Attributes

ParamCallbackInterface * CallbackObject_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::string | Name_
char | ShortCmd_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 48 of file ParamTypes.hh.

Constructor & Destructor Documentation

ParamTypeBase::~ParamTypeBase ( ) [virtual]

Definition at line 22 of file ParamTypes.cpp.

References CallbackObject_.

ParamTypeBase::ParamTypeBase ( )

Definition at line 15 of file ParamTypes.cpp.

References CallbackObject_.

Member Function Documentation

virtual std::string BIAS::ParamTypeBase::GetHint ( ) [inline, virtual]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, and BIAS::ParamTypeEnum.

Definition at line 81 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeBase::GetTypeName ( ) [inline, virtual]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, BIAS::ParamTypeVecDbl, BIAS::ParamTypeVecInt, and BIAS::ParamTypeEnum.

Definition at line 79 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeBase::GetValueString ( ) [inline, virtual]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, BIAS::ParamTypeVecDbl, BIAS::ParamTypeVecInt, and BIAS::ParamTypeEnum.

Definition at line 80 of file ParamTypes.hh.

virtual void BIAS::ParamTypeBase::SetDefault ( ) [inline, virtual]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, BIAS::ParamTypeVecDbl, BIAS::ParamTypeVecInt, and BIAS::ParamTypeEnum.

Definition at line 70 of file ParamTypes.hh.

int ParamTypeBase::SetFromString ( const std::string & s ) [virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, BIAS::ParamTypeVecDbl, BIAS::ParamTypeVecInt, and BIAS::ParamTypeEnum.

Definition at line 33 of file ParamTypes.cpp.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_

Definition at line 68 of file ParamTypes.hh.

Referenced by ParamTypeBase(), and ~ParamTypeBase().

bool BIAS::ParamTypeBase::Enhanced_

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_

Definition at line 60 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following files:
  • Utils/ParamTypes.hh
  • Utils/ParamTypes.cpp
Generated on Wed Jun 21 19:09:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeBool Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeBool

BIAS::ParamTypeBool Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeBool:

[legend]
Collaboration diagram for BIAS::ParamTypeBool:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeBool ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeBool ()

Public Attributes

ParamCallbackInterface * CallbackObject_
bool | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::string | Name_
char | ShortCmd_
bool | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 90 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeBool::ParamTypeBool ( ) [inline]

Definition at line 94 of file ParamTypes.hh.

virtual BIAS::ParamTypeBool::~ParamTypeBool ( ) [inline, virtual]

Definition at line 95 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeBool::GetHint ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 110 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeBool::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 108 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeBool::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 109 of file ParamTypes.hh.

void BIAS::ParamTypeBool::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 102 of file ParamTypes.hh.

virtual int BIAS::ParamTypeBool::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 103 of file ParamTypes.hh.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

bool BIAS::ParamTypeBool::default_

Definition at line 100 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

bool BIAS::ParamTypeBool::value_

Definition at line 99 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeDouble Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeDouble

BIAS::ParamTypeDouble Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeDouble:

[legend]
Collaboration diagram for BIAS::ParamTypeDouble:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeDouble ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeDouble ()

Public Attributes

ParamCallbackInterface * CallbackObject_
double | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
double | max_
double | min_
std::string | Name_
char | ShortCmd_
double | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 167 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeDouble::ParamTypeDouble ( ) [inline]

Definition at line 171 of file ParamTypes.hh.

virtual BIAS::ParamTypeDouble::~ParamTypeDouble ( ) [inline, virtual]

Definition at line 172 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeDouble::GetHint ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 196 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeDouble::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 193 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeDouble::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 194 of file ParamTypes.hh.

void BIAS::ParamTypeDouble::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 179 of file ParamTypes.hh.

virtual int BIAS::ParamTypeDouble::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 180 of file ParamTypes.hh.

References BIASERR.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

double BIAS::ParamTypeDouble::default_

Definition at line 175 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

double BIAS::ParamTypeDouble::max_

Definition at line 177 of file ParamTypes.hh.

double BIAS::ParamTypeDouble::min_

Definition at line 176 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

double BIAS::ParamTypeDouble::value_

Definition at line 174 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeEnum Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeEnum

BIAS::ParamTypeEnum Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeEnum:

[legend]
Collaboration diagram for BIAS::ParamTypeEnum:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeEnum ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeEnum ()

Public Attributes

ParamCallbackInterface * CallbackObject_
int | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::map< std::string, int > | Map_
std::string | Name_
char | ShortCmd_
int | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 324 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeEnum::ParamTypeEnum ( ) [inline]

Definition at line 328 of file ParamTypes.hh.

virtual BIAS::ParamTypeEnum::~ParamTypeEnum ( ) [inline, virtual]

Definition at line 329 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeEnum::GetHint ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 353 of file ParamTypes.hh.

References it.

virtual std::string BIAS::ParamTypeEnum::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 345 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeEnum::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 346 of file ParamTypes.hh.

References it.

void BIAS::ParamTypeEnum::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 335 of file ParamTypes.hh.

virtual int BIAS::ParamTypeEnum::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 336 of file ParamTypes.hh.

References BIASERR, and it.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

int BIAS::ParamTypeEnum::default_

Definition at line 332 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::map<std::string,int> BIAS::ParamTypeEnum::Map_

Definition at line 333 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

int BIAS::ParamTypeEnum::value_

Definition at line 331 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeInt Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeInt

BIAS::ParamTypeInt Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeInt:

[legend]
Collaboration diagram for BIAS::ParamTypeInt:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeInt ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeInt ()

Public Attributes

ParamCallbackInterface * CallbackObject_
int | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
int | max_
int | min_
std::string | Name_
char | ShortCmd_
int | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 117 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeInt::ParamTypeInt ( ) [inline]

Definition at line 121 of file ParamTypes.hh.

virtual BIAS::ParamTypeInt::~ParamTypeInt ( ) [inline, virtual]

Definition at line 125 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeInt::GetHint ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 155 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeInt::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 148 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeInt::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 150 of file ParamTypes.hh.

void BIAS::ParamTypeInt::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 134 of file ParamTypes.hh.

virtual int BIAS::ParamTypeInt::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 135 of file ParamTypes.hh.

References BIASERR.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

int BIAS::ParamTypeInt::default_

Definition at line 130 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

int BIAS::ParamTypeInt::max_

Definition at line 132 of file ParamTypes.hh.

int BIAS::ParamTypeInt::min_

Definition at line 131 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

int BIAS::ParamTypeInt::value_

Definition at line 129 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeString Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeString

BIAS::ParamTypeString Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeString:

[legend]
Collaboration diagram for BIAS::ParamTypeString:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeString ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeString ()

Public Attributes

ParamCallbackInterface * CallbackObject_
std::string | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::string | Name_
char | ShortCmd_
std::string | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 205 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeString::ParamTypeString ( ) [inline]

Definition at line 209 of file ParamTypes.hh.

virtual BIAS::ParamTypeString::~ParamTypeString ( ) [inline, virtual]

Definition at line 210 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeString::GetHint ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 222 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeString::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 220 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeString::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 221 of file ParamTypes.hh.

void BIAS::ParamTypeString::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 215 of file ParamTypes.hh.

virtual int BIAS::ParamTypeString::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 216 of file ParamTypes.hh.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

std::string BIAS::ParamTypeString::default_

Definition at line 213 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

std::string BIAS::ParamTypeString::value_

Definition at line 212 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeVecDbl Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeVecDbl

BIAS::ParamTypeVecDbl Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeVecDbl:

[legend]
Collaboration diagram for BIAS::ParamTypeVecDbl:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeVecDbl ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeVecDbl ()

Public Attributes

ParamCallbackInterface * CallbackObject_
BIAS::Vector< double > | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::string | Name_
char | ShortCmd_
BIAS::Vector< double > | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 231 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeVecDbl::ParamTypeVecDbl ( ) [inline]

Definition at line 235 of file ParamTypes.hh.

virtual BIAS::ParamTypeVecDbl::~ParamTypeVecDbl ( ) [inline, virtual]

Definition at line 236 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeBase::GetHint ( ) [inline, virtual, inherited]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, and BIAS::ParamTypeEnum.

Definition at line 81 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeVecDbl::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 261 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeVecDbl::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 262 of file ParamTypes.hh.

void BIAS::ParamTypeVecDbl::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 241 of file ParamTypes.hh.

virtual int BIAS::ParamTypeVecDbl::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 242 of file ParamTypes.hh.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

BIAS::Vector<double> BIAS::ParamTypeVecDbl::default_

Definition at line 239 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

BIAS::Vector<double> BIAS::ParamTypeVecDbl::value_

Definition at line 238 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ParamTypeVecInt Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ParamTypeVecInt

BIAS::ParamTypeVecInt Class Reference

#include <Utils/ParamTypes.hh>

Inheritance diagram for BIAS::ParamTypeVecInt:

[legend]
Collaboration diagram for BIAS::ParamTypeVecInt:

[legend]
List of all members.

Public Member Functions

virtual std::string | GetHint ()
virtual std::string | GetTypeName ()
virtual std::string | GetValueString ()
ParamTypeVecInt ()
void SetDefault ()
resets to default value
virtual int | SetFromString (const std::string &s)
This is a common interface to let a specialized instance read its data from a string.
virtual | ~ParamTypeVecInt ()

Public Attributes

ParamCallbackInterface * CallbackObject_
BIAS::Vector< int > | default_
bool | Enhanced_
hide this parameter from the 'naive' user
int | Group_
std::string | Help_
bool | Hidden_
hide this parameter from all users
std::string | Name_
char | ShortCmd_
BIAS::Vector< int > | value_
bool | WriteToFile_
is only written to parameter file if true

Detailed Description

Definition at line 278 of file ParamTypes.hh.

Constructor & Destructor Documentation

BIAS::ParamTypeVecInt::ParamTypeVecInt ( ) [inline]

Definition at line 282 of file ParamTypes.hh.

virtual BIAS::ParamTypeVecInt::~ParamTypeVecInt ( ) [inline, virtual]

Definition at line 283 of file ParamTypes.hh.

Member Function Documentation

virtual std::string BIAS::ParamTypeBase::GetHint ( ) [inline, virtual, inherited]

Reimplemented in BIAS::ParamTypeBool, BIAS::ParamTypeInt, BIAS::ParamTypeDouble, BIAS::ParamTypeString, and BIAS::ParamTypeEnum.

Definition at line 81 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeVecInt::GetTypeName ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 307 of file ParamTypes.hh.

virtual std::string BIAS::ParamTypeVecInt::GetValueString ( ) [inline, virtual]

Reimplemented from BIAS::ParamTypeBase.

Definition at line 308 of file ParamTypes.hh.

void BIAS::ParamTypeVecInt::SetDefault ( ) [inline, virtual]

resets to default value

Reimplemented from BIAS::ParamTypeBase.

Definition at line 288 of file ParamTypes.hh.

virtual int BIAS::ParamTypeVecInt::SetFromString ( const std::string & s ) [inline, virtual]

This is a common interface to let a specialized instance read its data from a string.

Used from ParseCommandLine() and ReadParam() to be overwritten in derived class

Reimplemented from BIAS::ParamTypeBase.

Definition at line 289 of file ParamTypes.hh.

Member Data Documentation

ParamCallbackInterface* BIAS::ParamTypeBase::CallbackObject_ [inherited]

Definition at line 68 of file ParamTypes.hh.

Referenced by BIAS::ParamTypeBase::ParamTypeBase(), and BIAS::ParamTypeBase::~ParamTypeBase().

BIAS::Vector<int> BIAS::ParamTypeVecInt::default_

Definition at line 286 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Enhanced_ [inherited]

hide this parameter from the 'naive' user

Definition at line 62 of file ParamTypes.hh.

int BIAS::ParamTypeBase::Group_ [inherited]

Definition at line 64 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Help_ [inherited]

Definition at line 59 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::Hidden_ [inherited]

hide this parameter from all users

Definition at line 63 of file ParamTypes.hh.

std::string BIAS::ParamTypeBase::Name_ [inherited]

Definition at line 58 of file ParamTypes.hh.

char BIAS::ParamTypeBase::ShortCmd_ [inherited]

Definition at line 60 of file ParamTypes.hh.

BIAS::Vector<int> BIAS::ParamTypeVecInt::value_

Definition at line 285 of file ParamTypes.hh.

bool BIAS::ParamTypeBase::WriteToFile_ [inherited]

is only written to parameter file if true

Definition at line 61 of file ParamTypes.hh.

The documentation for this class was generated from the following file:
  • Utils/ParamTypes.hh
Generated on Wed Jun 21 19:09:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: PlainImageCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

PlainImageCanvas Class Reference

Inheritance diagram for PlainImageCanvas:

[legend]
Collaboration diagram for PlainImageCanvas:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetMousePos (int &x, int &y)
BIAS::ImageBase * GetOrigImage ()
bool | GetShowScaled ()
PlainImageCanvas (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0)
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetClearDrawingContext (bool clear)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDefaultZoom (unsigned z)
void | SetScaledImageSize (int width, int height)
Sets the size of the scaled image.
void | SetShowScaled (bool on)
void | SetZoomed (bool s)
virtual bool | Show (bool show=true)
void | Show (BIAS::PyramidImage< unsigned char > &pim, std::string name)
void | Show (BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name)
void | Show (BIAS::Image< unsigned char > &im, std::string name)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | OnErase (wxEraseEvent &event)
void | OnMouseLeave (wxMouseEvent &event)
void | OnMouseMove (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnRightMouseButton (wxMouseEvent &event)
void | OnSize (wxSizeEvent &event)
void | UpdateStatusBar (unsigned x, unsigned y)
void | Zoom (unsigned x, unsigned y)

Protected Attributes

long int | _liDebugLevel
wxBitmap * | Bitmap_
bool | ClearDrawingContext_
unsigned | DefaultZoom_
unsigned | height_
std::string | ImageName_
int | mousex_
int | mousey_
ZoomFrame * | MyZoomWin_
BIAS::ImageBase origim_
pthread_mutex_t * | origim_mutex_
BIAS::Image< unsigned char > | rgbim_
wxStatusBar * | SBar_
int | SBarID_
int | ScaledImageSizeX_
int | ScaledImageSizeY_
bool | ShowScaled_
wxString | Title_
unsigned | width_
pthread_mutex_t * | wxbitmap_mutex_
wxImage * | wximage_
bool | Zoomed_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Member Functions

void | OnLeftDown (wxMouseEvent &event)
void | OnMotion (wxMouseEvent &event)
void | OnRightDown (wxMouseEvent &event)

Detailed Description

Definition at line 133 of file biasshowepiwx.cpp.

Constructor & Destructor Documentation

PlainImageCanvas::PlainImageCanvas | ( | wxWindow * | parent,
 |  | wxStatusBar * | sbar = NULL,
 |  | int | sbarid = 0
 | ) |

Definition at line 152 of file biasshowepiwx.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool ImageCanvas::GetMousePos | ( | int & | x,
 |  | int & | y
 | ) | [inherited]

Definition at line 606 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::mousex_, and BIAS::ImageCanvas::mousey_.

BIAS::ImageBase* BIAS::ImageCanvas::GetOrigImage ( ) [inline, inherited]

Definition at line 142 of file ImageCanvas.hh.

Referenced by MainFrame::FitSizetIfTooSmall(), and MainFrame::OnInfo().

bool BIAS::ImageCanvas::GetShowScaled ( ) [inline, inherited]

Definition at line 153 of file ImageCanvas.hh.

void ImageCanvas::OnErase ( wxEraseEvent & event ) [protected, inherited]

Definition at line 625 of file ImageCanvas.cpp.

void PlainImageCanvas::OnLeftDown ( wxMouseEvent & event ) [private]

Definition at line 157 of file biasshowepiwx.cpp.

void PlainImageCanvas::OnMotion ( wxMouseEvent & event ) [private]

Definition at line 173 of file biasshowepiwx.cpp.

void ImageCanvas::OnMouseLeave ( wxMouseEvent & event ) [protected, inherited]

Definition at line 662 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::mousex_, BIAS::ImageCanvas::mousey_, BIAS::ImageCanvas::SBar_, and BIAS::ImageCanvas::SBarID_.

void ImageCanvas::OnMouseMove ( wxMouseEvent & event ) [protected, inherited]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 668 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::mousex_, BIAS::ImageCanvas::mousey_, BIAS::ImageCanvas::ScaledImageSizeX_, BIAS::ImageCanvas::ScaledImageSizeY_, BIAS::ImageCanvas::ShowScaled_, and BIAS::ImageCanvas::UpdateStatusBar().

void ImageCanvas::OnPaint ( wxPaintEvent & event ) [protected, inherited]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 630 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS::ImageCanvas::Bitmap_, BIAS::ImageCanvas::ScaledImageSizeX_, BIAS::ImageCanvas::ScaledImageSizeY_, BIAS::ImageCanvas::ShowScaled_, BIAS::ImageCanvas::wxbitmap_mutex_, and BIAS::ImageCanvas::wximage_.

void PlainImageCanvas::OnRightDown ( wxMouseEvent & event ) [private]

Definition at line 165 of file biasshowepiwx.cpp.

void ImageCanvas::OnRightMouseButton ( wxMouseEvent & event ) [protected, inherited]

Reimplemented in BIAS::ImageCanvasEnhanced.

Definition at line 688 of file ImageCanvas.cpp.

References BIAS::ImageCanvas::Zoom().

void ImageCanvas::OnSize ( wxSizeEvent & event ) [protected, inherited]

Definition at line 698 of file ImageCanvas.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::ImageCanvas::SetClearDrawingContext ( bool clear ) [inline, inherited]

Definition at line 149 of file ImageCanvas.hh.

Referenced by MainFrame::SetImages().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetDefaultZoom ( unsigned z ) [inline, inherited]

Definition at line 146 of file ImageCanvas.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::ImageCanvas::SetScaledImageSize | ( | int | width,
 |  | int | height
 | ) | [inline, inherited]

Sets the size of the scaled image.

Only used if show scaled is on.

Definition at line 156 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetShowScaled ( bool on ) [inline, inherited]

Definition at line 152 of file ImageCanvas.hh.

void BIAS::ImageCanvas::SetZoomed ( bool s ) [inline, inherited]

Definition at line 141 of file ImageCanvas.hh.

virtual bool BIAS::ImageCanvas::Show ( bool show = true ) [inline, virtual, inherited]

Definition at line 139 of file ImageCanvas.hh.

void BIAS::ImageCanvas::Show | ( | BIAS::PyramidImage< unsigned char > & | pim,
 |  | std::string | name
 | ) | [inherited]

void ImageCanvas::Show | ( | BIAS::ImageBase & | origim,
 |  | BIAS::Image< unsigned char > & | scaledrgbim,
 |  | std::string | name
 | ) | [inherited]

Definition at line 494 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASDOUT, D_IC_IM, BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::ImageCanvas::height_, BIAS::ImageCanvas::ImageName_, BIAS::ImageCanvas::origim_, BIAS::ImageCanvas::origim_mutex_, BIAS::ImageCanvas::rgbim_, BIAS::ImageCanvas::ScaledImageSizeX_, BIAS::ImageCanvas::ScaledImageSizeY_, BIAS::ImageCanvas::ShowScaled_, and BIAS::ImageCanvas::width_.

void BIAS::ImageCanvas::Show | ( | BIAS::Image< unsigned char > & | im,
 |  | std::string | name
 | ) | [inherited]

Referenced by MainFrame::OnLeftDown(), MainFrame::SetImages(), BIAS::GuiWX::ShowConvertedImage_(), and CutoutFrame::ShowImage().

void ImageCanvas::UpdateStatusBar | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected, inherited]

Definition at line 557 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, BIASERR, BIAS::ImageCanvas::Bitmap_, BIAS::ImageCanvas::height_, BIAS::ImageCanvas::origim_mutex_, BIAS::ImageCanvas::SBar_, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageCanvas::width_, and BIAS::ImageCanvas::wxbitmap_mutex_.

Referenced by BIAS::ImageCanvas::OnMouseMove().

void ImageCanvas::Zoom | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected, inherited]

Definition at line 540 of file ImageCanvas.cpp.

References BIAS::AsciiToWx().

Referenced by BIAS::ImageCanvas::OnRightMouseButton().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

wxBitmap* BIAS::ImageCanvas::Bitmap_ [protected, inherited]

Definition at line 176 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

bool BIAS::ImageCanvas::ClearDrawingContext_ [protected, inherited]

Definition at line 196 of file ImageCanvas.hh.

unsigned BIAS::ImageCanvas::DefaultZoom_ [protected, inherited]

Definition at line 193 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned BIAS::ImageCanvas::height_ [protected, inherited]

Definition at line 181 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show(), and BIAS::ImageCanvas::UpdateStatusBar().

std::string BIAS::ImageCanvas::ImageName_ [protected, inherited]

Definition at line 198 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show().

int BIAS::ImageCanvas::mousex_ [protected, inherited]

Definition at line 182 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::GetMousePos(), BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::OnMouseMove().

int BIAS::ImageCanvas::mousey_ [protected, inherited]

Definition at line 182 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::GetMousePos(), BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::OnMouseMove().

ZoomFrame* BIAS::ImageCanvas::MyZoomWin_ [protected, inherited]

Definition at line 180 of file ImageCanvas.hh.

BIAS::ImageBase BIAS::ImageCanvas::origim_ [protected, inherited]

Definition at line 184 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvasEnhanced::RefreshDrawIm_(), BIAS::ImageCanvasEnhanced::SelectRectangle(), and BIAS::ImageCanvas::Show().

pthread_mutex_t * BIAS::ImageCanvas::origim_mutex_ [protected, inherited]

Definition at line 191 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvasEnhanced::SelectRectangle(), BIAS::ImageCanvas::Show(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

BIAS::Image<unsigned char> BIAS::ImageCanvas::rgbim_ [protected, inherited]

Definition at line 185 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvasEnhanced::DrawRectangle_(), and BIAS::ImageCanvas::Show().

wxStatusBar* BIAS::ImageCanvas::SBar_ [protected, inherited]

Definition at line 178 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseLeave(), and BIAS::ImageCanvas::UpdateStatusBar().

int BIAS::ImageCanvas::SBarID_ [protected, inherited]

Definition at line 179 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), and BIAS::ImageCanvas::OnMouseLeave().

int BIAS::ImageCanvas::ScaledImageSizeX_ [protected, inherited]

Definition at line 189 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

int BIAS::ImageCanvas::ScaledImageSizeY_ [protected, inherited]

Definition at line 189 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

bool BIAS::ImageCanvas::ShowScaled_ [protected, inherited]

Definition at line 188 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnMouseMove(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::Show().

wxString BIAS::ImageCanvas::Title_ [protected, inherited]

Definition at line 199 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

unsigned BIAS::ImageCanvas::width_ [protected, inherited]

Definition at line 181 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::Show(), and BIAS::ImageCanvas::UpdateStatusBar().

pthread_mutex_t* BIAS::ImageCanvas::wxbitmap_mutex_ [protected, inherited]

Definition at line 191 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), BIAS::ImageCanvas::UpdateStatusBar(), and BIAS::ImageCanvas::~ImageCanvas().

wxImage* BIAS::ImageCanvas::wximage_ [protected, inherited]

Definition at line 177 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas(), BIAS::ImageCanvas::OnPaint(), and BIAS::ImageCanvas::~ImageCanvas().

bool BIAS::ImageCanvas::Zoomed_ [protected, inherited]

Definition at line 183 of file ImageCanvas.hh.

Referenced by BIAS::ImageCanvas::ImageCanvas().

The documentation for this class was generated from the following file:
  • Tools/biasshowepiwx.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PlaneRANSAC Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PlaneRANSAC

BIAS::PlaneRANSAC Class Reference

#include <MathAlgo/Examples/ExampleRANSACPlane.hh>

Inheritance diagram for BIAS::PlaneRANSAC:

[legend]
Collaboration diagram for BIAS::PlaneRANSAC:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
bool | EvaluateSolution (const HomgPlane3D &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag)
evaluate the goodness of a solution
virtual bool | GenerateSamples (int sample_index, std::vector< unsigned int > &which_samples)
pick a set of samples
bool | GenerateSamplesEvenspace (int sample_index, std::vector< unsigned int > &sample_table)
bool | GenerateSamplesRandom (int sample_index, std::vector< unsigned int > &sampletable)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFinalScore () const
int | GetSampleSolutions (std::vector< unsigned int > &which_samples, std::vector< HomgPlane3D > &solutions)
Compute solution(s) for the given set of samples.
void | Init (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
void | Init (std::vector< HomgPoint3D > &data, unsigned int data_length, double inlier_distance_threshold, bool refine_solution, unsigned int sample_size, double expected_inlier_fraction, double solution_error_threshold)
PlaneRANSAC ()
this is a class evaluating the mean of the double data assuming some outlier using the RANSAC algorithm
void | PrintDebugLevel (std::ostream &os=std::cout) const
RANSAC (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.
RANSAC ()
bool | RefineSolution (std::vector< unsigned int > &which_samples, HomgPlane3D &solution, std::vector< bool > &new_inliers)
refine previously computed solution based on its inliers
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxSamples (unsigned int max_samples)
Explicitly set max number of samples.
void | SetSampleCount (unsigned int uiSamples)
Explicitly set number of samples.
virtual int | SolveMaster (double inlying_data_fraction, HomgPlane3D &solution, std::vector< bool > &inliers)
MAIN function called by user.
~PlaneRANSAC ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Static Protected Member Functions

static int | ComputeSampleCount (double inlying_data_fraction, double desired_prob_good, unsigned int sample_size)

Protected Attributes

bool | _bRefineSolution
do we want to refine a good sample
double | _dBestInlierEvaluateScore
double | _dBestSampleEvaluateScore
double | _dExpectedInlierFraction
double | _dInlierDistanceThreshold
double | _dProbabilityOfGoodSolution
prob. for computing number of samples, set close to 1
double | _dSolutionErrorThreshold
double | _dSoSmallSolutionChange
If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.
bool | _got_solution_flag
if we already have a solution for which EvaluateSolution returned true
bool | _greedy
if true, the first acceptable solution is returned
int | _iBestInlierAcceptCount
refined best values
int | _iBestSampleAcceptCount
sampled best values
long int | _liDebugLevel
unsigned | _uiDataSize
number of data elements needed to compute a solution
unsigned int | _uiExplicitSampleNo
use this number of samples
unsigned int | _uiMaxSamples
absolute max number of samples
unsigned | _uiMaxSolutionsPerSample
max number of solutions that are to be computed for one sample set
unsigned | _uiSampleSize
number of samples available
std::vector< HomgPoint3D > | _vData

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 41 of file ExampleRANSACPlane.hh.

Constructor & Destructor Documentation

BIAS::PlaneRANSAC::PlaneRANSAC ( ) [inline]

this is a class evaluating the mean of the double data assuming some outlier using the RANSAC algorithm

Definition at line 82 of file ExampleRANSACPlane.hh.

BIAS::PlaneRANSAC::~PlaneRANSAC ( ) [inline]

Definition at line 85 of file ExampleRANSACPlane.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

static int BIAS::RANSAC< HomgPlane3D >::ComputeSampleCount | ( | double | inlying_data_fraction,
 |  | double | desired_prob_good,
 |  | unsigned int | sample_size
 | ) | [static, protected, inherited]

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool BIAS::PlaneRANSAC::EvaluateSolution | ( | const HomgPlane3D & | solution,
 |  | bool | existing_solution_flag,
 |  | std::vector< bool > & | inlier,
 |  | int & | accept_count,
 |  | double & | evaluate_score,
 |  | bool & | ok_to_terminate_flag
 | ) | [inline, virtual]

evaluate the goodness of a solution

For the specified solution, set

  • an accept count indicating the number of data which are inliers to the given solution,
  • the inlier flag for each datum to true if the datum is inlying
  • an evaluate score (typically the average residual) indicating the goodness of fit of the inliers - the solver code requires a positive number where zero is a perfect solution, larger positive scores mean a worse solution.
  • an ok_to_terminate flag which is set TRUE if the solution is good enough that the robust solver can discontinue search for a better solution.

If existing_solution_flag is true, then the best accept count so far is in accept_count. The function can terminate early if it is not going to beat this.

A skeleton implementation of this function would be written as follows:

     *  int my_accept_count = 0;
     *  for (unsigned int i=0; i<_uiDataSize; i++) {
     *    inlier[i] = Consistent(corner_matches[i], solution);
     *    if (inlier[i]) {
     *      my_accept_count++;
     *      evaluate_score += Residual(corner_matches[i], solution);
     *      if (existing_solution_flag && my_accept_count>accept_count)
     *        break;
     *    }
     *  }
     *  accept_count=my_accept_count;
     *  evaluate_score=(accept_count!=0)?(evaluate_score/accept_count):
     *    (DBL_MAX);
     *  if (evaluate_score < solution_error_threshold &&
     *      (double)accept_count/(double)_uiDataSize > min_inlier_fraction)
     *    ok_to_terminate_flag=true;
     *  else
     *    ok_to_terminate_flag=false;
     *  return (accept_count!=0) // maybe even (accept_count>inl_frac)
     *

Parameters:
solution | (in) solution to be evaluated
existing_solution_flag | (in) if true the best accept_cout so far is given in accept_count
accept_count | (in/out) input: best accept_cout so far if existing_solution_flag==true, output: number of inliers to the current solution
inlier | (out) inlier[i] ==> datum i is inlying
evaluate_score | (out) a score for the solution, 0 means ideal solution, larger score means worse solution
ok_to_termiate_flag | (out) if true, RANSACing will stop

Reimplemented from BIAS::RANSAC< HomgPlane3D >.

Definition at line 115 of file ExampleRANSACPlane.hh.

References _dExpectedInlierFraction, _dInlierDistanceThreshold, _dSolutionErrorThreshold, BIAS::RANSAC< HomgPlane3D >::_uiDataSize, _vData, and BIAS::HomgPlane3D::DistanceSquared().

virtual bool BIAS::RANSAC< HomgPlane3D >::GenerateSamples | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [virtual, inherited]

pick a set of samples

Override this to specialize the technique used to generate samples. By default, random sampling is assumed but implementations may wish to use the latin-square sampling provided by generate_sample_evenspace (below), or some other problem-specific sampling strategy.

bool BIAS::RANSAC< HomgPlane3D >::GenerateSamplesEvenspace | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sample_table
 | ) | [inherited]

bool BIAS::RANSAC< HomgPlane3D >::GenerateSamplesRandom | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sampletable
 | ) | [inherited]

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

double BIAS::RANSAC< HomgPlane3D >::GetFinalScore ( ) const [inline, inherited]

Definition at line 233 of file RANSAC.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::PlaneRANSAC::GetSampleSolutions | ( | std::vector< unsigned int > & | which_samples,
 |  | std::vector< HomgPlane3D > & | solutions
 | ) | [inline, virtual]

Compute solution(s) for the given set of samples.

Returns:
the number of solutions found.
The which_samples array will be of length sample_size, selecting the indices to be fit to from the subclass's data array.

Reimplemented from BIAS::RANSAC< HomgPlane3D >.

Definition at line 104 of file ExampleRANSACPlane.hh.

References _vData.

void BIAS::RANSAC< HomgPlane3D >::Init | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) | [inherited]

Referenced by Init().

void BIAS::PlaneRANSAC::Init | ( | std::vector< HomgPoint3D > & | data,
 |  | unsigned int | data_length,
 |  | double | inlier_distance_threshold,
 |  | bool | refine_solution,
 |  | unsigned int | sample_size,
 |  | double | expected_inlier_fraction,
 |  | double | solution_error_threshold
 | ) | [inline]

Definition at line 88 of file ExampleRANSACPlane.hh.

References _dExpectedInlierFraction, _dInlierDistanceThreshold, _dSolutionErrorThreshold, BIAS::RANSAC< HomgPlane3D >::_uiDataSize, _vData, and BIAS::RANSAC< HomgPlane3D >::Init().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

BIAS::RANSAC< HomgPlane3D >::RANSAC | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) | [inherited]

Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.

If the refine_solution flag is true, a routine has been supplied to refine the initial fits before evaluation.

BIAS::RANSAC< HomgPlane3D >::RANSAC ( ) [inherited]

bool BIAS::PlaneRANSAC::RefineSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | HomgPlane3D & | solution,
 |  | std::vector< bool > & | new_inliers
 | ) | [inline, virtual]

refine previously computed solution based on its inliers

If implemented, this function should compute a more accurate solution, e.g. a least squares on all inliers, possibly using as an initial estimate the solution in solution. The output array new_inliers should be set to reflect the inliers to the new solution.

Returns:
false if no better solution than the initial could be found

Reimplemented from BIAS::RANSAC< HomgPlane3D >.

Definition at line 155 of file ExampleRANSACPlane.hh.

References _vData, BIAS::SVD::GetNullvector(), TNT::Matrix< T >::newsize(), BIAS::SVD::Rank(), and BIAS::Matrix< T >::Transpose().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::RANSAC< HomgPlane3D >::SetMaxSamples ( unsigned int max_samples ) [inline, inherited]

Explicitly set max number of samples.

Ransacing will stop after max_samples samples, regardless of solution quality. Normally, more than a few thousand samples signifies a problem.

Definition at line 100 of file RANSAC.hh.

void BIAS::RANSAC< HomgPlane3D >::SetSampleCount ( unsigned int uiSamples ) [inline, inherited]

Explicitly set number of samples.

Explicitly set number of samples to make in SolveMaster, i.e. Value of ComputeSampleCount() is ignored if this function is called with a strictly positive value uiSamples. Note: SolveMaster performs at most min(_uiMaxSamples, uiSamples) iterations

Author:
koeser

Definition at line 112 of file RANSAC.hh.

virtual int BIAS::RANSAC< HomgPlane3D >::SolveMaster | ( | double | inlying_data_fraction,
 |  | HomgPlane3D & | solution,
 |  | std::vector< bool > & | inliers
 | ) | [virtual, inherited]

MAIN function called by user.

This function is called to run the computation. On output, solution is set to the best solution found and inliers indicate which data were inliers to that solution. The inlying_data_fraction is responsible for the maximal number of sample sets taken from the data. The smaller the inlying_data_fraction, the more sample sets are taken

Attention:
Do NOT override this function in derived classes, unless you want to do modifications in the RANSAC _algorithm_ itself (and usually you dont want to do this ...) input : inlying_data_fraction expected inlier fraction output: solution solution inliers inlier flags
Returns:
<0 indicates an error, otherwise number of chosen sample
Author:
frahm, woelk

Member Data Documentation

bool BIAS::RANSAC< HomgPlane3D >::_bRefineSolution [protected, inherited]

do we want to refine a good sample

Definition at line 246 of file RANSAC.hh.

double BIAS::RANSAC< HomgPlane3D >::_dBestInlierEvaluateScore [protected, inherited]

Definition at line 254 of file RANSAC.hh.

double BIAS::RANSAC< HomgPlane3D >::_dBestSampleEvaluateScore [protected, inherited]

Definition at line 250 of file RANSAC.hh.

double BIAS::PlaneRANSAC::_dExpectedInlierFraction [protected]

Definition at line 78 of file ExampleRANSACPlane.hh.

Referenced by EvaluateSolution(), and Init().

double BIAS::PlaneRANSAC::_dInlierDistanceThreshold [protected]

Definition at line 74 of file ExampleRANSACPlane.hh.

Referenced by EvaluateSolution(), and Init().

double BIAS::RANSAC< HomgPlane3D >::_dProbabilityOfGoodSolution [protected, inherited]

prob. for computing number of samples, set close to 1

Definition at line 263 of file RANSAC.hh.

double BIAS::PlaneRANSAC::_dSolutionErrorThreshold [protected]

Definition at line 79 of file ExampleRANSACPlane.hh.

Referenced by EvaluateSolution(), and Init().

double BIAS::RANSAC< HomgPlane3D >::_dSoSmallSolutionChange [protected, inherited]

If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.

Definition at line 267 of file RANSAC.hh.

bool BIAS::RANSAC< HomgPlane3D >::_got_solution_flag [protected, inherited]

if we already have a solution for which EvaluateSolution returned true

Definition at line 270 of file RANSAC.hh.

bool BIAS::RANSAC< HomgPlane3D >::_greedy [protected, inherited]

if true, the first acceptable solution is returned

Definition at line 273 of file RANSAC.hh.

int BIAS::RANSAC< HomgPlane3D >::_iBestInlierAcceptCount [protected, inherited]

refined best values

Definition at line 253 of file RANSAC.hh.

int BIAS::RANSAC< HomgPlane3D >::_iBestSampleAcceptCount [protected, inherited]

sampled best values

Definition at line 249 of file RANSAC.hh.

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

unsigned BIAS::RANSAC< HomgPlane3D >::_uiDataSize [protected, inherited]

number of data elements needed to compute a solution

Definition at line 243 of file RANSAC.hh.

Referenced by EvaluateSolution(), and Init().

unsigned int BIAS::RANSAC< HomgPlane3D >::_uiExplicitSampleNo [protected, inherited]

use this number of samples

Definition at line 260 of file RANSAC.hh.

unsigned int BIAS::RANSAC< HomgPlane3D >::_uiMaxSamples [protected, inherited]

absolute max number of samples

Definition at line 257 of file RANSAC.hh.

unsigned BIAS::RANSAC< HomgPlane3D >::_uiMaxSolutionsPerSample [protected, inherited]

max number of solutions that are to be computed for one sample set

Definition at line 240 of file RANSAC.hh.

unsigned BIAS::RANSAC< HomgPlane3D >::_uiSampleSize [protected, inherited]

number of samples available

Definition at line 237 of file RANSAC.hh.

std::vector<HomgPoint3D> BIAS::PlaneRANSAC::_vData [protected]

Definition at line 71 of file ExampleRANSACPlane.hh.

Referenced by EvaluateSolution(), GetSampleSolutions(), Init(), and RefineSolution().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following file:
  • MathAlgo/Examples/ExampleRANSACPlane.hh
Generated on Wed Jun 21 19:09:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PlueckerMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PlueckerMatrix

BIAS::PlueckerMatrix Class Reference

represente a 3d line using a 4x4 Pluecker matrix More...

#include <Base/Geometry/PlueckerMatrix.hh>

Inheritance diagram for BIAS::PlueckerMatrix:

[legend]
Collaboration diagram for BIAS::PlueckerMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< PLUECKERMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const PLUECKERMATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
PLUECKERMATRIX_TYPE | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const PLUECKERMATRIX_TYPE &scalar)
in place division function
void | Fill (const PLUECKERMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< PLUECKERMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
PLUECKERMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
PLUECKERMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
PLUECKERMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
PLUECKERMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
HomgPoint3D | GetDirection () const
direction vetor
PLUECKERMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (PLUECKERMATRIX_TYPE &max, PLUECKERMATRIX_TYPE &min) const
return biggest and smallest entry
PLUECKERMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
PLUECKERMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
HomgPoint3D | GetNormal () const
normal vector to the line
int | GetNumElements () const
Returns the total number of elements.
Vector< PLUECKERMATRIX_TYPE > | GetPlueckerLineCoordinates () const
Vector< PLUECKERMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< PLUECKERMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
Matrix (const TNT::Matrix< PLUECKERMATRIX_TYPE > &A)
Matrix (const Matrix< PLUECKERMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const PLUECKERMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< PLUECKERMATRIX_TYPE > &R, const Vector3< PLUECKERMATRIX_TYPE > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< PLUECKERMATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< PLUECKERMATRIX_TYPE > &arg)
Matrix4x4 (const Matrix4x4< PLUECKERMATRIX_TYPE > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const PLUECKERMATRIX_TYPEa0, const PLUECKERMATRIX_TYPEa1, const PLUECKERMATRIX_TYPEa2, const PLUECKERMATRIX_TYPEa3, const PLUECKERMATRIX_TYPEa4, const PLUECKERMATRIX_TYPEa5, const PLUECKERMATRIX_TYPEa6, const PLUECKERMATRIX_TYPEa7, const PLUECKERMATRIX_TYPEa8, const PLUECKERMATRIX_TYPEa9, const PLUECKERMATRIX_TYPEa10, const PLUECKERMATRIX_TYPEa11, const PLUECKERMATRIX_TYPEa12, const PLUECKERMATRIX_TYPEa13, const PLUECKERMATRIX_TYPEa14, const PLUECKERMATRIX_TYPEa15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< PLUECKERMATRIX_TYPE > &arg, Vector< PLUECKERMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< PLUECKERMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< PLUECKERMATRIX_TYPE > &arg, Matrix< PLUECKERMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< PLUECKERMATRIX_TYPE > &argmat, Matrix4x4< PLUECKERMATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< PLUECKERMATRIX_TYPE > &argvec, Vector4< PLUECKERMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const PLUECKERMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< PLUECKERMATRIX_TYPE > &arg, Vector< PLUECKERMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< PLUECKERMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
PLUECKERMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
PLUECKERMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
PLUECKERMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
PLUECKERMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
PlueckerMatrix (const HomgPoint3D &p1, const HomgPoint3D &p2)
construction of a line through 2 points
PlueckerMatrix (const BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > &m)
cast constructor, checks special constraints
PlueckerMatrix ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, PLUECKERMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, PLUECKERMATRIX_TYPEscale)
Scales row NoRow with scale.
void | Set (const HomgPoint3D &p1, const HomgPoint3D &p2)
construction of a line through 2 points
void | SetCol (const int row, const Vector< PLUECKERMATRIX_TYPE > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< PLUECKERMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const PLUECKERMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< PLUECKERMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
PLUECKERMATRIX_TYPE | Trace () const
Matrix< PLUECKERMATRIX_TYPE > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
virtual | ~PlueckerMatrix ()

Protected Member Functions

bool | CheckConstraint_ () const
checks for the rank two constraint, i.e.
void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

represente a 3d line using a 4x4 Pluecker matrix

Author:
woelk 03/2006

Definition at line 44 of file PlueckerMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::PlueckerMatrix::PlueckerMatrix ( ) [inline]

Definition at line 48 of file PlueckerMatrix.hh.

PlueckerMatrix::PlueckerMatrix ( const BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > & m )

cast constructor, checks special constraints

Definition at line 10 of file PlueckerMatrix.cpp.

References BEXCEPTION, and CheckConstraint_().

BIAS::PlueckerMatrix::PlueckerMatrix | ( | const HomgPoint3D & | p1,
 |  | const HomgPoint3D & | p2
 | ) | [inline]

construction of a line through 2 points

Definition at line 54 of file PlueckerMatrix.hh.

References Set().

virtual BIAS::PlueckerMatrix::~PlueckerMatrix ( ) [inline, virtual]

Definition at line 57 of file PlueckerMatrix.hh.

Member Function Documentation

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Add | ( | const PLUECKERMATRIX_TYPE & | scalar,
 |  | Matrix< PLUECKERMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::AddIP ( const Matrix< PLUECKERMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::AddIP ( const PLUECKERMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

bool PlueckerMatrix::CheckConstraint_ ( ) const [protected]

checks for the rank two constraint, i.e.

f the direction and the normal vector are perpendicular to each other

Definition at line 21 of file PlueckerMatrix.cpp.

References BIAS::Equal(), and GetPlueckerLineCoordinates().

Referenced by PlueckerMatrix().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

PLUECKERMATRIX_TYPE BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Divide | ( | const PLUECKERMATRIX_TYPE & | scalar,
 |  | Matrix< PLUECKERMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::DivideIP ( const PLUECKERMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Fill ( const PLUECKERMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<PLUECKERMATRIX_TYPE > BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

PLUECKERMATRIX_TYPE * BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

PLUECKERMATRIX_TYPE ** BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

PLUECKERMATRIX_TYPE ** BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

PLUECKERMATRIX_TYPE * BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

HomgPoint3D PlueckerMatrix::GetDirection ( ) const

direction vetor

Definition at line 51 of file PlueckerMatrix.cpp.

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetMaxMin | ( | PLUECKERMATRIX_TYPE & | max,
 |  | PLUECKERMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

HomgPoint3D PlueckerMatrix::GetNormal ( ) const

normal vector to the line

Definition at line 58 of file PlueckerMatrix.cpp.

int BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector< PLUECKERMATRIX_TYPE > PlueckerMatrix::GetPlueckerLineCoordinates ( ) const

Definition at line 37 of file PlueckerMatrix.cpp.

References res.

Referenced by CheckConstraint_().

Vector<PLUECKERMATRIX_TYPE > BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::GetSystemMatrix ( Matrix< PLUECKERMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix ( const TNT::Matrix< PLUECKERMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix ( const Matrix< PLUECKERMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const PLUECKERMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< PLUECKERMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 | ( | const Matrix3x3< PLUECKERMATRIX_TYPE > & | R,
 |  | const Vector3< PLUECKERMATRIX_TYPE > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( const TNT::Matrix< PLUECKERMATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( const Matrix< PLUECKERMATRIX_TYPE > & arg ) [inherited]

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( const Matrix4x4< PLUECKERMATRIX_TYPE > & A ) [inline, inherited]

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 | ( | const PLUECKERMATRIX_TYPE | a0,
 |  | const PLUECKERMATRIX_TYPE | a1,
 |  | const PLUECKERMATRIX_TYPE | a2,
 |  | const PLUECKERMATRIX_TYPE | a3,
 |  | const PLUECKERMATRIX_TYPE | a4,
 |  | const PLUECKERMATRIX_TYPE | a5,
 |  | const PLUECKERMATRIX_TYPE | a6,
 |  | const PLUECKERMATRIX_TYPE | a7,
 |  | const PLUECKERMATRIX_TYPE | a8,
 |  | const PLUECKERMATRIX_TYPE | a9,
 |  | const PLUECKERMATRIX_TYPE | a10,
 |  | const PLUECKERMATRIX_TYPE | a11,
 |  | const PLUECKERMATRIX_TYPE | a12,
 |  | const PLUECKERMATRIX_TYPE | a13,
 |  | const PLUECKERMATRIX_TYPE | a14,
 |  | const PLUECKERMATRIX_TYPE | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult | ( | const Vector< PLUECKERMATRIX_TYPE > & | arg,
 |  | Vector< PLUECKERMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult ( const Matrix< PLUECKERMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult | ( | const Matrix< PLUECKERMATRIX_TYPE > & | arg,
 |  | Matrix< PLUECKERMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Mult | ( | const Matrix4x4< PLUECKERMATRIX_TYPE > & | argmat,
 |  | Matrix4x4< PLUECKERMATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::Mult | ( | const Vector4< PLUECKERMATRIX_TYPE > & | argvec,
 |  | Vector4< PLUECKERMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Multiply | ( | const PLUECKERMATRIX_TYPE & | scalar,
 |  | Matrix< PLUECKERMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::MultiplyIP ( const PLUECKERMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::MultLeft | ( | const Vector< PLUECKERMATRIX_TYPE > & | arg,
 |  | Vector< PLUECKERMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::MultLeft ( const Matrix< PLUECKERMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< PLUECKERMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | PLUECKERMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | PLUECKERMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void PlueckerMatrix::Set | ( | const HomgPoint3D & | p1,
 |  | const HomgPoint3D & | p2
 | ) |

construction of a line through 2 points

Definition at line 29 of file PlueckerMatrix.cpp.

References BIAS::Vector4< T >::OuterProduct(), and BIAS::Matrix< PLUECKERMATRIX_TYPE >::SubIP().

Referenced by PlueckerMatrix().

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< PLUECKERMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< PLUECKERMATRIX_TYPE >.

Definition at line 261 of file Matrix4x4.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< PLUECKERMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::Sub | ( | const PLUECKERMATRIX_TYPE & | scalar,
 |  | Matrix< PLUECKERMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::SubIP ( const PLUECKERMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< PLUECKERMATRIX_TYPE >::SubIP ( const Matrix< PLUECKERMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

Referenced by Set().

PLUECKERMATRIX_TYPE BIAS::Matrix< PLUECKERMATRIX_TYPE >::Trace ( ) const [inline, inherited]

Author:
koeser

Matrix<PLUECKERMATRIX_TYPE > BIAS::Matrix< PLUECKERMATRIX_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

void BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/PlueckerMatrix.hh
  • Base/Geometry/PlueckerMatrix.cpp
Generated on Wed Jun 21 19:09:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMatrix

BIAS::PMatrix Class Reference
[Geometry and Transformations]

describes a projective 3D -> 2D mapping in homogenous coordinates More...

#include <Geometry/PMatrix.hh>

Inheritance diagram for BIAS::PMatrix:

[legend]
Collaboration diagram for BIAS::PMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
enum | E_ParametrizationType { AXIS_TIMES_ANGLE, AXIS_AND_ANGLE, EULER, QUATERNION }
description of supported parametrization types More...
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< PMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const PMATRIX_TYPE &scalar)
in place addition function
HomgPoint3D | Backproject (const HomgPoint2D &x, double mu=1)
Back projects image point x to 3D space and returns ray on which the 3D space point lies.
void | BackprojectByZDepth (const double &x, const double &y, const double &z_depth, HomgPoint3D &res)
Inverts the PMatrix application to a 3D point whose z-component in cameracoordinates and its imagepoint (x,y) is known.
HomgPoint3D | BackprojectPseudoinverse (const HomgPoint2D &x)
Returns a homogenized 3D point X on the viewray of x, which always lies in front of the camera(this is checked).
void | BackprojectWorldCoo (const HomgPoint2D &point, double depth, HomgPoint3D &res)
returns a 3D point res which is located depth away from center of projection in direction given by point
int | BBCIn (std::ifstream &ifs, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0)
Load next piece of calibration data from an open BBC-Free-D file.
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type)
Compose a projection matrix using a parametrization.
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C)
calibrated case, uses K=Identity
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
calibrated case, uses K=Identity
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C)
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)
void | Compose (const Matrix3x3< double > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type)
void | Compose (const Matrix3x3< double > &K, const Matrix3x3< double > &R, const HomgPoint3D &C)
void | Compose (const Matrix3x3< double > &K, const Matrix3x3< double > &R, const Vector3< double > &C)
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)
void | DecomposeAa (BIAS::Matrix3x3< PMATRIX_TYPE > &A, BIAS::Vector3< PMATRIX_TYPE > &a) const
decompose the P-matrix to [ A | a ] where A is a 3x3-matrix and a is a 3-vector.
Subscript | dim (Subscript d) const
void | Divide (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const PMATRIX_TYPE &scalar)
in place division function
void | Fill (const PMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
BIAS::Vector3< double > | GetA ()
returns the unit vector A which is the normal vector to the image plane in world coordinates.
int | GetA (Vector3< double > &A)
returns the unit vector A which is the normal vector to the image plane in world coordinates.
int | GetC (HomgPoint3D &C)
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
BIAS::Vector3< double > | GetC ()
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
int | GetC (Vector3< double > &C)
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
void | GetCanonicalH (Matrix4x4< PMATRIX_TYPE > &ProjH) const
Matrix4x4< PMATRIX_TYPE > | GetCanonicalH () const
Get the projective homography matrix so that P * H = [ I | 0 ].
Vector< PMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
int | GetCovariance (BIAS::Matrix< double > &cov)
PMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
PMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
PMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
PMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
float | GetFieldOfView (const unsigned int dimX, const unsigned int dimY, const bool optmin=true)
float | GetFieldOfViewX (const unsigned int dimX, const unsigned int dimY)
float | GetFieldOfViewY (const unsigned int dimX, const unsigned int dimY, const bool &compY=true)
BIAS::Vector3< double > | GetH ()
int | GetH (Vector3< double > &H)
This is not the cam.# standard CAHV, but the unit vector H0.
int | GetHinf (BIAS::Matrix3x3< double > &Hinf)
HomgPlane3D GetImagePlane ()
calls the above
void | GetImagePlane (HomgPlane3D &plane)
returns image plane in world coordinates
HomgLine2D | GetIntersectionOfImagePlanes (PMatrix &P)
calls the above returns line at infinity if planes are parallel
int | GetIntersectionOfImagePlanes (PMatrix &P, HomgLine2D &intersection)
return line resulting of intersection of the two image planes in pixel coordinates of this camera return -1 if camera planes are parallel
KMatrix GetK ()
int | GetK (KMatrix &K)
calibration matrix
PMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (PMATRIX_TYPE &max, PMATRIX_TYPE &min) const
return biggest and smallest entry
PMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
PMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
Vector3< double > | GetNormRayWorldCoo (const HomgPoint2D &point)
returns normed vector from C to point analytical inverse of K is used
int | GetNullVector (HomgPoint3D &C)
this is another way of getting C, especially interesting for non-metric cameras
int | GetNumElements () const
Returns the total number of elements.
int | GetPseudoInverse (BIAS::Matrix< double > &Pinv)
Matrix3x3< double > | GetR ()
int | GetR (Matrix3x3< double > &R)
Vector3< double > | GetRayWorldCoo (const HomgPoint2D &point)
returns vector from C to point, w of point determines ray length analytical inverse of K is used
Vector< PMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSVD (Matrix< double > &U, Vector< double > &S, Matrix< double > &VT)
Returns SVD of this.
void | GetSystemMatrix (Matrix< PMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
BIAS::Vector3< double > | GetUp_gl ()
BIAS::Vector3< double > | GetV ()
int | GetV (Vector3< double > &V)
This is not the cam.# standard CAHV, but the unit vector H0.
void InvalidateDecomposition ()
to re-Decompose_() after filling with data use this.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsInFrontOfCamera (const Vector3< double > &X)
checks whether X is in optical A-dir from C (only for metric cameras)
bool | IsMetric ()
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
overload Load because it has to invalidate decomposition! JW 09/2003
int | LoadBan (const std::string &filename, const unsigned int &Time=0)
Loads a PMatrix from .ban file given by AddCameraKey and Time index.
int | LoadBBC (const std::string &filename, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0)
Load calibration data file from BBC-Free-D system.
int | LoadBOG (const std::string &filename)
Load a Daimler .bog fiel and compose a P matri xfrom it.
Matrix (const TNT::Matrix< PMATRIX_TYPE > &A)
Matrix (const Matrix< PMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const PMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x4 (const Matrix3x4< PMATRIX_TYPE > &A)
Matrix3x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x4 (const PMATRIX_TYPEa0, const PMATRIX_TYPEa1, const PMATRIX_TYPEa2, const PMATRIX_TYPEa3, const PMATRIX_TYPEa4, const PMATRIX_TYPEa5, const PMATRIX_TYPEa6, const PMATRIX_TYPEa7, const PMATRIX_TYPEa8, const PMATRIX_TYPEa9, const PMATRIX_TYPEa10, const PMATRIX_TYPEa11)
Set the matrix values JW.
Matrix3x4 (const std::string &s)
JW.
Matrix3x4 ()
default constructor untested
void | Mult (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< PMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Vector4< PMATRIX_TYPE > &argvec, Vector3< PMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const PMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< PMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
PMatrix & | newsize (int rows, int cols)
setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class
void Normalize ()
scale P such that optical axis (first three entries of last row) has unit length
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
PMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
PMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
PMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
PMatrix & | operator= (const PMatrix &mat)
assignment operator
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
PMatrix (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
Take R, K, C and compose PMatrix.
PMatrix (const Matrix< PMATRIX_TYPE > &Amat)
PMatrix (const PMatrixBase &Amat_)
PMatrix (const PMatrix &A)
PMatrix (const std::string &s)
replacement for above JW
PMatrix (const MatrixInitType &i)
PMatrix ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
bool | Save (const std::string &filename)
void | ScaleCol (int NoCol, PMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, PMATRIX_TYPEscale)
Scales row NoRow with scale.
void set_identity ()
Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0.
void | SetC (const Vector3< double > &newC)
modify C and re-compose P not fine to use, better use: Compose()
void | SetCol (const int row, const Vector< PMATRIX_TYPE > &data)
set a col of matrix from vector
int | SetCovariance (const BIAS::Matrix< double > &cov)
void | SetFromVector (const Vector< PMATRIX_TYPE > &vals)
Sets P-Matrix from a vector which contains the elements of P row wise.
void SetIdentity ()
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)
void | SetRow (const int row, const Vector< PMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const PMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< PMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
PMATRIX_TYPE | Trace () const
Matrix< PMATRIX_TYPE > | Transpose () const
transpose function, storing data destination matrix
int | WriteCAHV_10 (int cols, int rows, std::ostream &os=std::cout)
write the CAHV decomposition of this P matrix in CAHV 1,0 format to stream os (see RK's/TNT CAHV1.0 fromat in SequenceReconstruction/ Sequenetracking/KochSI.C) cols, rows is the size of the image this P matrix corresponds to.
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~PMatrix ()
destructor untested (04/17/2002)

Protected Member Functions

void CheckDecomposition_ ()
check if Decomposition is still valid
void CheckSVD_ ()
check if SVD is still valid
void Compose_ ()
void | copy (const T *v)
int | Decompose_ ()
Computes K,R,C, assuming a metric PMatrix P = K[R^T | -R^T * C] with K[0][1]=0 (zero skew) and K[2][2]=1.
void destroy ()
void | initialize (Subscript M, Subscript N)
int | MakeSVD_ ()
RMatrixBase | Parametrization2R_ (const Vector< double > &parametrization, enum E_ParametrizationType param_type) const
void | set (const T &val)

Protected Attributes

Vector3< double > | A_
unit vector in wcs assigning the direction of the optical axis
Vector3< double > | C_
camera center in wcs (extrinsic parameter)
Matrix< double > | Covariance_
Vector3< double > | H0_
unit vector in wcs assigning the direction of the horizontal axis of the image plane
Matrix3x3< double > | Hinf_
Hinfinity.
bool | IsDecomposed_
tells us whether we have a chached decomposition with C,A,...
bool | IsMetric_
tells us whether we have an arbitrary 3x4 matrix or a P which is exactly a composition of P = K * R [ I | -C ] this is called a metric pmatrix
KMatrix K_
camera calibration matrix (intrinsic parameter)
Subscript m_
Subscript mn_
Subscript n_
Matrix3x4< double > | PConsistencyBackup_
backup of P at time of last decomposition to check whether decomposition is still valid
Matrix3x4< double > | PConsistencyBackupSVD_
Matrix3x3< double > | R_
rotation matrix (intrinsic parameter)
T ** row_
T ** rowm1_
SVD * Svd_
(for decomposition, docu: JW 11/2002)
Vector3< double > | V0_
unit vector in wcs assigning the direction of the vertical axis of the image plane
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

describes a projective 3D -> 2D mapping in homogenous coordinates

The P Matrix is a 3x4 matrix (3 rows {Zeilen}, 4 columns{Spalten}) describing a mapping between a 3D projective point X in space and the corresponding projective 2D point x (in an image plane).

x = P * X

where X is of type HomgPoint3D and x of type HomgPoint2D. After homogenizing, x[0] and x[1] contain the image coordinates of the projection of the 3D point.

If P is a metric camera, it can be composed/decomposed into external parameters (orientation R and center C) and internal parameters (such as the focal length in the calibration matrix K):

With R' = transpose of R, K = Camera calibration matrix and C = Camera center is: P = (K R' | -K R' C)

See also the more general geometry section.

Only implementation very specific to PMatrix (and not valid for general matrices, e.g. like decomposition) should be implemented here.

Attention:
For performance reasons, the PMatrix decomposition/svd is only done once, subsequent calls to GetC(),... only return copies of the precomputed values. If the fields of the PMatrix have changed, the user is responsible for calling InvalidateDecomposition() to force a re-decomposition at the next GetC(),... call. If one does not call InvalidateDecomposition() after changing a PMatrix, subsequent calls of GetC() may return outdated values !
Author:
Jan Woetzel

Definition at line 88 of file PMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Member Enumeration Documentation

enum BIAS::PMatrixBase::E_ParametrizationType [inherited]

description of supported parametrization types

Enumerator:
AXIS_TIMES_ANGLE
AXIS_AND_ANGLE
EULER
QUATERNION

Definition at line 171 of file PMatrixBase.hh.

Constructor & Destructor Documentation

BIAS::PMatrix::PMatrix ( ) [inline]

Definition at line 95 of file PMatrix.hh.

BIAS::PMatrix::PMatrix ( const MatrixInitType & i ) [inline, explicit]

Definition at line 98 of file PMatrix.hh.

BIAS::PMatrix::PMatrix ( const std::string & s ) [explicit]

replacement for above JW

Definition at line 52 of file PMatrix.cpp.

References InvalidateDecomposition(), and Svd_.

BIAS::PMatrix::PMatrix ( const PMatrix & A ) [inline]

Author:
grest

Definition at line 107 of file PMatrix.hh.

BIAS::PMatrix::PMatrix ( const PMatrixBase & Amat_ ) [inline]

Author:
Jan Woetzel beta (04/17/2002)

Definition at line 112 of file PMatrix.hh.

BIAS::PMatrix::PMatrix ( const Matrix< PMATRIX_TYPE > & Amat )

Author:
Jan Woetzel not fine, should no be here, better cast stepwise between direct father and child untested (04/17/2002)

Definition at line 69 of file PMatrix.cpp.

References BIASASSERT, BIASERR, InvalidateDecomposition(), IsMetric_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and Svd_.

BIAS::PMatrix::PMatrix | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) | [inline]

Take R, K, C and compose PMatrix.

Author:
Jan-Friso Evers-Senne
Date:
2002-08-20

Definition at line 125 of file PMatrix.hh.

BIAS::PMatrix::~PMatrix ( ) [virtual]

destructor untested (04/17/2002)

Definition at line 45 of file PMatrix.cpp.

References Svd_.

Member Function Documentation

void BIAS::Matrix< PMATRIX_TYPE >::Add | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::AddIP ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< PMATRIX_TYPE >::AddIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

HomgPoint3D BIAS::PMatrixBase::Backproject | ( | const HomgPoint2D & | x,
 |  | double | mu = 1
 | ) | [inherited]

Back projects image point x to 3D space and returns ray on which the 3D space point lies.

Author:
jmf

Definition at line 186 of file PMatrixBase.cpp.

References BIASERR, BIAS::Matrix3x3< T >::InvertIP(), and M.

void BIAS::PMatrix::BackprojectByZDepth | ( | const double & | x,
 |  | const double & | y,
 |  | const double & | z_depth,
 |  | HomgPoint3D & | res
 | ) |

Inverts the PMatrix application to a 3D point whose z-component in cameracoordinates and its imagepoint (x,y) is known.

Definition at line 426 of file PMatrix.cpp.

References GetC(), GetK(), GetR(), BIAS::KMatrix::Invert(), p, and BIAS::HomgPoint3D::Set().

HomgPoint3D BIAS::PMatrix::BackprojectPseudoinverse ( const HomgPoint2D & x )

Returns a homogenized 3D point X on the viewray of x, which always lies in front of the camera(this is checked).

Author:
Daniel Grest, last edit Jan 2003

Definition at line 455 of file PMatrix.cpp.

References center, GetC(), GetPseudoInverse(), and BIAS::HomgPoint3D::Homogenize().

void BIAS::PMatrix::BackprojectWorldCoo | ( | const HomgPoint2D & | point,
 |  | double | depth,
 |  | HomgPoint3D & | res
 | ) |

returns a 3D point res which is located depth away from center of projection in direction given by point

Definition at line 440 of file PMatrix.cpp.

References BIASABORT, BIASERR, GetC(), GetNormRayWorldCoo(), and BIAS::HomgPoint3D::Set().

Referenced by BIAS::GenSynthMatches::_CreateStatic3DPoints(), and BIAS::TriangleMesh::GenerateDenseMesh().

int BIAS::PMatrix::BBCIn | ( | std::ifstream & | ifs,
 |  | const double & | AddCenterPointShiftX = 0.0,
 |  | const double & | AddCenterPointShiftY = 0.0
 | ) |

Load next piece of calibration data from an open BBC-Free-D file.

Parameters:
AddCenterPointShiftX | add this to the principle point (in meter)
AddCenterPointShiftY | add this to the principle point (in meter)
Author:
evers, koeser

Referenced by LoadBBC().

bool BIAS::Matrix< PMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< PMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void BIAS::PMatrix::CheckDecomposition_ ( ) [inline, protected]

check if Decomposition is still valid

Definition at line 554 of file PMatrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< PMATRIX_TYPE >::GetData(), BIAS::Matrix< T >::GetData(), and PConsistencyBackup_.

Referenced by GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), GetV(), and Normalize().

void BIAS::PMatrix::CheckSVD_ ( ) [inline, protected]

check if SVD is still valid

Definition at line 542 of file PMatrix.hh.

References BIASABORT, BIASERR, BIAS::Matrix< PMATRIX_TYPE >::GetData(), BIAS::Matrix< T >::GetData(), and PConsistencyBackupSVD_.

Referenced by GetPseudoInverse(), MakeSVD_(), and Normalize().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Vector< double > & | parametrization,
 |  | enum E_ParametrizationType | param_type
 | ) | [inherited]

Compose a projection matrix using a parametrization.

The supported parametrization vector always starts with the camera center followed by the camera orientation. Currently Euler angles, axis (norm 1) and angle, axis times angle and quaternion are supported as orientation parametrization.

Author:
woelk 02/2006

Definition at line 103 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::Compose(), BIAS::PMatrixBase::Parametrization2R_(), and R.

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const HomgPoint3D & | C
 | ) | [inherited]

calibrated case, uses K=Identity

Definition at line 95 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::Compose(), K, and BIAS::Matrix3x3< T >::SetIdentity().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) | [inherited]

calibrated case, uses K=Identity

Definition at line 87 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::Compose(), K, and BIAS::Matrix3x3< T >::SetIdentity().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const HomgPoint3D & | C
 | ) | [inherited]

Definition at line 74 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::Compose(), BIAS::HomgPoint3D::IsAtInfinity(), and BIAS::Vector3< T >::Set().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) | [inherited]

composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)

Author:
Felix Woelk

Definition at line 48 of file PMatrixBase.cpp.

References BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::MultIP(), and BIAS::Matrix3x3< T >::TransposeIP().

Referenced by Compose(), BIAS::PMatrixBase::Compose(), BIAS::PMatrixBase::LoadBOG(), and BIAS::PMatrixBase::PMatrixBase().

void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K,
 |  | const Vector< double > & | parametrization,
 |  | enum E_ParametrizationType | param_type
 | ) |

Author:
woelk 02/2006

Definition at line 615 of file PMatrix.cpp.

References Compose(), BIAS::PMatrixBase::Parametrization2R_(), R, and BIAS::Vector3< T >::Set().

void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K,
 |  | const Matrix3x3< double > & | R,
 |  | const HomgPoint3D & | C
 | ) |

Definition at line 589 of file PMatrix.cpp.

References BIASERR, Compose(), Hinf_, BIAS::Matrix3x3< T >::InvertIP(), BIAS::HomgPoint3D::IsAtInfinity(), IsDecomposed_, PConsistencyBackup_, and BIAS::Vector3< T >::Set().

void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K,
 |  | const Matrix3x3< double > & | R,
 |  | const Vector3< double > & | C
 | ) |

composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)

Author:
Felix Woelk

Definition at line 553 of file PMatrix.cpp.

References A_, BIASABORT, BIASERR, C_, BIAS::PMatrixBase::Compose(), H0_, Hinf_, BIAS::Matrix3x3< T >::InvertIP(), IsDecomposed_, IsMetric_, K_, PConsistencyBackup_, R_, res, Svd_, and V0_.

Referenced by Compose(), CreateMatches2(), BIAS::TriangleMesh::GenerateDenseMesh(), and main().

void BIAS::PMatrix::Compose_ ( ) [protected]

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::PMatrix::Decompose_ ( ) [protected]

Computes K,R,C, assuming a metric PMatrix P = K[R^T | -R^T * C] with K[0][1]=0 (zero skew) and K[2][2]=1.

Does a LU-Decomposition of the first 3x3 part. Finally C is computed from the last column of P

Attention:
this is NOT the cam.### 'standard' CAHV ! and pmatrix must be metric, i.e. there must not be a _projective_ skew due to distorted 3d space coordinates: .Projection equation: x = P * H^-1 * H * X . = (P * H^-1) * (H * X) . = P' * X' If such a P' (with a projective distortion H) is estimated for some reason, the lu factorization makes no sense and the Get-Functions will return bad values, e.g. R is no rotation ... To get the center in the H-distorted space in that case, you should call PMatrix::GetNullVector instead. If you get a k[0][1]==skew!=0.0 the decomposition failed. (comments added by koeser)
Author:
woelk

Definition at line 318 of file PMatrix.cpp.

References A_, BIASERR, C_, BIAS::Matrix< T >::Fill(), BIAS::HomgPoint3D::GetEuclidian(), GetNullVector(), H0_, Hinf_, BIAS::Matrix3x3< T >::Invert(), IsDecomposed_, K_, BIAS::Vector3< T >::NormL2(), PConsistencyBackup_, R_, BIAS::Vector3< T >::ScalarProduct(), BIAS::Matrix< T >::SetZero(), and V0_.

Referenced by GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), and GetV().

void BIAS::PMatrix::DecomposeAa | ( | BIAS::Matrix3x3< PMATRIX_TYPE > & | A,
 |  | BIAS::Vector3< PMATRIX_TYPE > & | a
 | ) | const

decompose the P-matrix to [ A | a ] where A is a 3x3-matrix and a is a 3-vector.

Author:
mdunda 01 2004

Definition at line 826 of file PMatrix.cpp.

Referenced by GetCanonicalH().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< PMATRIX_TYPE >::Divide | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::DivideIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::Fill ( const PMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

BIAS::Vector3< double > BIAS::PMatrix::GetA ( )

returns the unit vector A which is the normal vector to the image plane in world coordinates.

or in other words: the camera orientation
A,H,V are orthonormal

Definition at line 304 of file PMatrix.cpp.

References a, and BIASERR.

int BIAS::PMatrix::GetA ( Vector3< double > & A )

returns the unit vector A which is the normal vector to the image plane in world coordinates.

or in other words: the camera orientation
A,H,V are orthonormal

Definition at line 287 of file PMatrix.cpp.

References A_, CheckDecomposition_(), Decompose_(), and IsDecomposed_.

Referenced by BIAS::GeometryGL::DisplayCameraExternalParams().

int BIAS::PMatrix::GetC ( HomgPoint3D & C )

computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached

Definition at line 188 of file PMatrix.cpp.

References C_, CheckDecomposition_(), Decompose_(), IsDecomposed_, and BIAS::HomgPoint3D::Set().

BIAS::Vector3< double > BIAS::PMatrix::GetC ( )

computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached

Definition at line 182 of file PMatrix.cpp.

Referenced by BackprojectByZDepth(), BackprojectPseudoinverse(), and BackprojectWorldCoo().

int BIAS::PMatrix::GetC ( Vector3< double > & C )

computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached

Definition at line 165 of file PMatrix.cpp.

References C_, CheckDecomposition_(), Decompose_(), and IsDecomposed_.

Referenced by AdoptPMatrix(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::GeometryGL::DisplayCameraExternalParams(), BIAS::GeometryGL::DisplayP(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::GeometryGL::GetImgCorner3d(), main(), PtoPPP(), BIAS::ProjectionParametersPerspective::SetP(), and BIAS::Triangulation::Triangulate2D().

void BIAS::PMatrix::GetCanonicalH ( Matrix4x4< PMATRIX_TYPE > & ProjH ) const

Definition at line 844 of file PMatrix.cpp.

References a, DecomposeAa(), BIAS::SVD::Invert(), and BIAS::SVD::solve().

Matrix4x4< PMATRIX_TYPE > BIAS::PMatrix::GetCanonicalH ( ) const

Get the projective homography matrix so that P * H = [ I | 0 ].

Author:
mdunda 01 2004

Definition at line 837 of file PMatrix.cpp.

Referenced by BIAS::TrifocalTensor::Compose().

Vector<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

int BIAS::PMatrix::GetCovariance ( BIAS::Matrix< double > & cov ) [inline]

Definition at line 408 of file PMatrix.hh.

PMATRIX_TYPE * BIAS::Matrix< PMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by CheckDecomposition_(), CheckSVD_(), BIAS::PMatrixBase::PMatrixBase(), BIAS::PMatrixBase::set_identity(), and XMLOut().

PMATRIX_TYPE ** BIAS::Matrix< PMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

PMATRIX_TYPE ** BIAS::Matrix< PMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

PMATRIX_TYPE * BIAS::Matrix< PMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

float BIAS::PMatrix::GetFieldOfView | ( | const unsigned int | dimX,
 |  | const unsigned int | dimY,
 |  | const bool | optmin = true
 | ) |

Returns:
field of view angle in rad. for max: angle in rad between upper left and lower right opposing image corners. for min: min. angle of (horiz. vert) angle. Max. field of view (not horizontal or verttical fov.)
Parameters:
optmin | true if the min angle should be used, else the max angle(=quer)
dimX | horiz. image dimension in pixel (=columns)
dimY | vert. image dimension in pixel (=rows) unfortunately not const because missing consts in decompose etc.. we assume rectangular pixels for min(x,y) selection.
Author:
JW 06/2003

Definition at line 761 of file PMatrix.cpp.

References GetNormRayWorldCoo(), and BIAS::Vector3< T >::ScalarProduct().

float BIAS::PMatrix::GetFieldOfViewX | ( | const unsigned int | dimX,
 |  | const unsigned int | dimY
 | ) | [inline]

Definition at line 336 of file PMatrix.hh.

float BIAS::PMatrix::GetFieldOfViewY | ( | const unsigned int | dimX,
 |  | const unsigned int | dimY,
 |  | const bool & | compY = true
 | ) |

Returns:
field of view in y-direction in rad this routine is complexer than expected... ... because the principal point may *not* be within camera center. HACK/FIXME/TODO:
Todo:
not in general correct impl. !!! the principal may converge the view -> what is the field of view? (JW 09/2003)

Definition at line 800 of file PMatrix.cpp.

References GetNormRayWorldCoo(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().

BIAS::Vector3< double > BIAS::PMatrix::GetH ( )

Definition at line 256 of file PMatrix.cpp.

References BIASERR.

int BIAS::PMatrix::GetH ( Vector3< double > & H )

This is not the cam.# standard CAHV, but the unit vector H0.

returns the unit vector H0 which is not the cam. standard CAHV because image size is unknown (docu: JW 11/2002) represents the world coordinates of the vector (1,0,0) in ics A,H,V are orthonormal

Definition at line 237 of file PMatrix.cpp.

References BIAS_DEBUG, CheckDecomposition_(), Decompose_(), H0_, and IsDecomposed_.

int BIAS::PMatrix::GetHinf ( BIAS::Matrix3x3< double > & Hinf )

Definition at line 151 of file PMatrix.cpp.

References CheckDecomposition_(), Decompose_(), Hinf_, and IsDecomposed_.

Referenced by main(), and BIAS::Triangulation::Triangulate().

HomgPlane3D BIAS::PMatrix::GetImagePlane ( )

calls the above

Definition at line 505 of file PMatrix.cpp.

void BIAS::PMatrix::GetImagePlane ( HomgPlane3D & plane )

returns image plane in world coordinates

Definition at line 485 of file PMatrix.cpp.

References A_, C_, CheckDecomposition_(), Decompose_(), IsDecomposed_, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::NormL2(), and R_.

Referenced by GetIntersectionOfImagePlanes().

HomgLine2D BIAS::PMatrix::GetIntersectionOfImagePlanes ( PMatrix & P ) [inline]

calls the above returns line at infinity if planes are parallel

Definition at line 489 of file PMatrix.hh.

References GetIntersectionOfImagePlanes().

int BIAS::PMatrix::GetIntersectionOfImagePlanes | ( | PMatrix & | P,
 |  | HomgLine2D & | intersection
 | ) |

return line resulting of intersection of the two image planes in pixel coordinates of this camera return -1 if camera planes are parallel

Definition at line 511 of file PMatrix.cpp.

References at, GetImagePlane(), GetR(), BIAS::AffineTransf::Mult(), PMATRIX_EPSILON, R, res, BIAS::Vector4< T >::ScalarProduct(), BIAS::AffineTransf::SetAsRotationMatrix(), and BIAS::Matrix3x3< T >::TransposeIP().

Referenced by GetIntersectionOfImagePlanes().

KMatrix BIAS::PMatrix::GetK ( ) [inline]

Definition at line 168 of file PMatrix.hh.

References BIASERR.

Referenced by BackprojectByZDepth().

int BIAS::PMatrix::GetK ( KMatrix & K )

calibration matrix

Definition at line 220 of file PMatrix.cpp.

References CheckDecomposition_(), Decompose_(), IsDecomposed_, and K_.

Referenced by AdoptPMatrix(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::GeometryGL::GetImgCorner3d(), main(), PtoPPP(), and BIAS::ProjectionParametersPerspective::SetP().

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< PMATRIX_TYPE >::GetMaxMin | ( | PMATRIX_TYPE & | max,
 |  | PMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Vector3< double > BIAS::PMatrix::GetNormRayWorldCoo ( const HomgPoint2D & point )

returns normed vector from C to point analytical inverse of K is used

Definition at line 628 of file PMatrix.cpp.

References GetRayWorldCoo(), and BIAS::Vector3< T >::NormL2().

Referenced by BackprojectWorldCoo(), GetFieldOfView(), GetFieldOfViewY(), and BIAS::Triangulation::Triangulate2D().

int BIAS::PMatrix::GetNullVector ( HomgPoint3D & C )

this is another way of getting C, especially interesting for non-metric cameras

Author:
koeser 07/2004

Definition at line 137 of file PMatrix.cpp.

References BIAS::SVD::GetNullvector(), MakeSVD_(), and Svd_.

Referenced by BIAS::FMatrix::ComputeFromPMatrices(), Decompose_(), and BIAS::Triangulation::Triangulate().

int BIAS::Matrix< PMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

int BIAS::PMatrix::GetPseudoInverse ( BIAS::Matrix< double > & Pinv )

Todo:
5 different Back-Project-Funktions, "Please cleanup" (evers 2004-11-29)

Definition at line 113 of file PMatrix.cpp.

References CheckSVD_(), BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetV(), MakeSVD_(), and Svd_.

Referenced by BackprojectPseudoinverse(), and BIAS::FMatrix::ComputeFromPMatrices().

Matrix3x3<double> BIAS::PMatrix::GetR ( ) [inline]

Definition at line 161 of file PMatrix.hh.

References BIASERR.

Referenced by BackprojectByZDepth(), and GetIntersectionOfImagePlanes().

int BIAS::PMatrix::GetR ( Matrix3x3< double > & R )

Returns:
rotation matrix camera -> world coo (which contains the column-vectors H0, V0, A (from left to right) )

Definition at line 204 of file PMatrix.cpp.

References CheckDecomposition_(), Decompose_(), IsDecomposed_, and R_.

Referenced by AdoptPMatrix(), BIAS::TriangleMesh::GenerateDenseMesh(), main(), PtoPPP(), and BIAS::ProjectionParametersPerspective::SetP().

Vector3< double > BIAS::PMatrix::GetRayWorldCoo ( const HomgPoint2D & point )

returns vector from C to point, w of point determines ray length analytical inverse of K is used

Definition at line 637 of file PMatrix.cpp.

References CheckDecomposition_(), Decompose_(), BIAS::KMatrix::Invert(), IsDecomposed_, K_, Kinv, BIAS::Matrix3x3< T >::Mult(), and R_.

Referenced by BIAS::GeometryGL::GetImgCorner3d(), and GetNormRayWorldCoo().

Vector<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::PMatrix::GetSVD | ( | Matrix< double > & | U,
 |  | Vector< double > & | S,
 |  | Matrix< double > & | VT
 | ) |

Returns SVD of this.

Definition at line 310 of file PMatrix.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), MakeSVD_(), and Svd_.

void BIAS::Matrix< PMATRIX_TYPE >::GetSystemMatrix ( Matrix< PMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

BIAS::Vector3<double> BIAS::PMatrix::GetUp_gl ( ) [inline]

Definition at line 191 of file PMatrix.hh.

BIAS::Vector3< double > BIAS::PMatrix::GetV ( )

Definition at line 281 of file PMatrix.cpp.

References BIASERR.

int BIAS::PMatrix::GetV ( Vector3< double > & V )

This is not the cam.# standard CAHV, but the unit vector H0.

Returns:
the unit vector V0 which is not the cam.# standard CAHV because image size is unknown (docu: JW 11/2002) A,H,V are orthonormal

Definition at line 264 of file PMatrix.cpp.

References CheckDecomposition_(), Decompose_(), IsDecomposed_, and V0_.

Referenced by BIAS::GeometryGL::DisplayCameraExternalParams().

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::PMatrix::InvalidateDecomposition ( ) [inline]

to re-Decompose_() after filling with data use this.

Author:
Jan-Friso Evers-Senne

Definition at line 496 of file PMatrix.hh.

References BIAS::Matrix< T >::Fill(), IsDecomposed_, IsMetric_, PConsistencyBackup_, PConsistencyBackupSVD_, and Svd_.

Referenced by BIAS::PMatrixEstimation::ComputeFromFDirect(), main(), and PMatrix().

bool BIAS::Matrix< PMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::PMatrix::IsInFrontOfCamera ( const Vector3< double > & X ) [inline]

checks whether X is in optical A-dir from C (only for metric cameras)

Author:
koeser 01/05

Definition at line 198 of file PMatrix.hh.

bool BIAS::PMatrix::IsMetric ( ) [inline]

Definition at line 134 of file PMatrix.hh.

Referenced by BIAS::TriangleMesh::GenerateDenseMesh().

bool BIAS::Matrix< PMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::PMatrix::Load ( const std::string & filename ) [inline]

overload Load because it has to invalidate decomposition! JW 09/2003

Reimplemented from BIAS::Matrix< PMATRIX_TYPE >.

Definition at line 348 of file PMatrix.hh.

References BIAS::Matrix< PMATRIX_TYPE >::Load().

Referenced by main(), and PtoPPP().

int BIAS::Matrix3x4< PMATRIX_TYPE >::LoadBan | ( | const std::string & | filename,
 |  | const unsigned int & | Time = 0
 | ) | [inherited]

Loads a PMatrix from .ban file given by AddCameraKey and Time index.

Returns:
0 in case of success and negative nr. in case of error.
Author:
Jan Woetzel

int BIAS::PMatrix::LoadBBC | ( | const std::string & | filename,
 |  | const double & | AddCenterPointShiftX = 0.0,
 |  | const double & | AddCenterPointShiftY = 0.0
 | ) |

Load calibration data file from BBC-Free-D system.

opens a free-d file and reads first (or only) piece of free-d data

Parameters:
AddCenterPointShiftX | add this to the principle point (in meter)
AddCenterPointShiftY | add this to the principle point (in meter)
Author:
evers, koeser

Definition at line 873 of file PMatrix.cpp.

References BBCIn(), R, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by main().

int BIAS::PMatrixBase::LoadBOG ( const std::string & filename ) [inherited]

Load a Daimler .bog fiel and compose a P matri xfrom it.

Author:
Jan Woetzel 03/2005

Definition at line 216 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::Compose(), K, BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), and R.

Referenced by main().

int BIAS::PMatrix::MakeSVD_ ( ) [inline, protected]

Definition at line 526 of file PMatrix.hh.

References CheckSVD_(), BIAS::SVD::compute(), PConsistencyBackupSVD_, and Svd_.

Referenced by GetNullVector(), GetPseudoInverse(), and GetSVD().

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( const TNT::Matrix< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( const Matrix< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::MatrixIdentity, BIAS::MatrixZero, r, and T.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const PMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const Matrix3x4< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 | ( | const PMATRIX_TYPE | a0,
 |  | const PMATRIX_TYPE | a1,
 |  | const PMATRIX_TYPE | a2,
 |  | const PMATRIX_TYPE | a3,
 |  | const PMATRIX_TYPE | a4,
 |  | const PMATRIX_TYPE | a5,
 |  | const PMATRIX_TYPE | a6,
 |  | const PMATRIX_TYPE | a7,
 |  | const PMATRIX_TYPE | a8,
 |  | const PMATRIX_TYPE | a9,
 |  | const PMATRIX_TYPE | a10,
 |  | const PMATRIX_TYPE | a11
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix< PMATRIX_TYPE >::Mult | ( | const Vector< PMATRIX_TYPE > & | arg,
 |  | Vector< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< PMATRIX_TYPE >::Mult ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< PMATRIX_TYPE >::Mult | ( | const Matrix< PMATRIX_TYPE > & | arg,
 |  | Matrix< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x4< PMATRIX_TYPE >::Mult | ( | const Vector4< PMATRIX_TYPE > & | argvec,
 |  | Vector3< PMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< PMATRIX_TYPE >::Multiply | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::MultiplyIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::MultLeft | ( | const Vector< PMATRIX_TYPE > & | arg,
 |  | Vector< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< PMATRIX_TYPE >::MultLeft ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

PMatrix & BIAS::PMatrix::newsize | ( | int | rows,
 |  | int | cols
 | ) |

setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class

Author:
Jan Woetzel

Reimplemented from BIAS::PMatrixBase.

Definition at line 61 of file PMatrix.cpp.

References BIASERR.

void BIAS::PMatrix::Normalize ( ) [inline]

scale P such that optical axis (first three entries of last row) has unit length

Author:
koeser 03/2004

Reimplemented from BIAS::Matrix< PMATRIX_TYPE >.

Definition at line 506 of file PMatrix.hh.

References CheckDecomposition_(), CheckSVD_(), IsDecomposed_, PConsistencyBackup_, PConsistencyBackupSVD_, PMATRIX_TYPE, TNT::Matrix< T >::row_, and Svd_.

Referenced by main().

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

PMatrix & BIAS::PMatrix::operator= ( const PMatrix & mat )

assignment operator

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 84 of file PMatrix.cpp.

References A_, C_, Covariance_, H0_, Hinf_, IsDecomposed_, IsMetric_, K_, BIAS::PMatrixBase::operator=(), PConsistencyBackup_, PConsistencyBackupSVD_, R_, Svd_, and V0_.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

RMatrixBase BIAS::PMatrixBase::Parametrization2R_ | ( | const Vector< double > & | parametrization,
 |  | enum E_ParametrizationType | param_type
 | ) | const [protected, inherited]

Author:
woelk 03/2006

Definition at line 115 of file PMatrixBase.cpp.

References BIAS::PMatrixBase::AXIS_AND_ANGLE, BIAS::PMatrixBase::AXIS_TIMES_ANGLE, BEXCEPTION, BIASERR, BIAS::PMatrixBase::EULER, BIAS::PMatrixBase::QUATERNION, R, BIAS::RMatrixBase::Set(), BIAS::RMatrixBase::SetFromAxisAngle(), BIAS::RMatrixBase::SetFromQuaternion(), BIAS::RMatrixBase::SetXYZ(), and BIAS::Vector< T >::Size().

Referenced by Compose(), and BIAS::PMatrixBase::Compose().

bool BIAS::Matrix< PMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

bool BIAS::PMatrix::Save ( const std::string & filename )

Definition at line 1114 of file PMatrix.cpp.

References C_, Covariance_, IsMetric_, K_, and R_.

Referenced by main().

void BIAS::Matrix< PMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | PMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< PMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | PMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::PMatrixBase::set_identity ( ) [inline, inherited]

Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 208 of file PMatrixBase.hh.

References BIAS::Matrix< PMATRIX_TYPE >::GetData(), and PMATRIX_TYPE.

Referenced by BIAS::PMatrixEstimation::InitP1P2Trans(), and main().

void BIAS::PMatrix::SetC ( const Vector3< double > & newC )

modify C and re-compose P not fine to use, better use: Compose()

void BIAS::Matrix< PMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< PMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

int BIAS::PMatrix::SetCovariance ( const BIAS::Matrix< double > & cov ) [inline]

Definition at line 405 of file PMatrix.hh.

void BIAS::PMatrixBase::SetFromVector ( const Vector< PMATRIX_TYPE > & vals ) [inherited]

Sets P-Matrix from a vector which contains the elements of P row wise.

Definition at line 177 of file PMatrixBase.cpp.

References BIAS::Vector< T >::GetData(), P_MATRIX_COLS, P_MATRIX_ROWS, and PMATRIX_TYPE.

void BIAS::Matrix3x4< PMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)

Author:
Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< PMATRIX_TYPE >.

void BIAS::Matrix< PMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< PMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< PMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< PMATRIX_TYPE >::Sub | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::SubIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::SubIP ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::Trace ( ) const [inline, inherited]

Author:
koeser

Matrix<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

int BIAS::PMatrix::WriteCAHV_10 | ( | int | cols,
 |  | int | rows,
 |  | std::ostream & | os = std::cout
 | ) |

write the CAHV decomposition of this P matrix in CAHV 1,0 format to stream os (see RK's/TNT CAHV1.0 fromat in SequenceReconstruction/ Sequenetracking/KochSI.C) cols, rows is the size of the image this P matrix corresponds to.

image size is neccessary because of shift of the axis origin cenetered/in left corner This is the 'Cunningham' format (see diss. Reinhard Koch, p.14)

Author:
Jan Woetzel 11/2002 cols number of pixels rows number of pixels

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int BIAS::PMatrix::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Implements BIAS::XMLBase.

Definition at line 967 of file PMatrix.cpp.

int BIAS::PMatrix::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Implements BIAS::XMLBase.

Definition at line 1024 of file PMatrix.cpp.

References BIASERR, BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::Matrix< T >::GetData(), BIAS::XMLIO::getNodeContentString(), IsMetric_, K_, and R_.

int BIAS::PMatrix::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Implements BIAS::XMLBase.

Definition at line 974 of file PMatrix.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), BIASABORT, BIASERR, C_, BIAS::Matrix< PMATRIX_TYPE >::GetData(), BIAS::Matrix< T >::GetData(), IsDecomposed_, IsMetric_, K_, R_, and STREAM_PRECISION.

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

Vector3<double> BIAS::PMatrix::A_ [protected]

unit vector in wcs assigning the direction of the optical axis

Definition at line 449 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetA(), GetImagePlane(), and operator=().

Vector3<double> BIAS::PMatrix::C_ [protected]

camera center in wcs (extrinsic parameter)

Definition at line 445 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetC(), GetImagePlane(), operator=(), Save(), and XMLOut().

Matrix<double> BIAS::PMatrix::Covariance_ [protected]

Definition at line 473 of file PMatrix.hh.

Referenced by operator=(), and Save().

Vector3<double> BIAS::PMatrix::H0_ [protected]

unit vector in wcs assigning the direction of the horizontal axis of the image plane

Definition at line 453 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetH(), and operator=().

Matrix3x3<double> BIAS::PMatrix::Hinf_ [protected]

Hinfinity.

Definition at line 460 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetHinf(), and operator=().

bool BIAS::PMatrix::IsDecomposed_ [protected]

tells us whether we have a chached decomposition with C,A,...

Definition at line 476 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), GetV(), InvalidateDecomposition(), Normalize(), operator=(), and XMLOut().

bool BIAS::PMatrix::IsMetric_ [protected]

tells us whether we have an arbitrary 3x4 matrix or a P which is exactly a composition of P = K * R [ I | -C ] this is called a metric pmatrix

Definition at line 481 of file PMatrix.hh.

Referenced by Compose(), InvalidateDecomposition(), operator=(), PMatrix(), Save(), XMLIn(), and XMLOut().

KMatrix BIAS::PMatrix::K_ [protected]

camera calibration matrix (intrinsic parameter)

Definition at line 463 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetK(), GetRayWorldCoo(), operator=(), Save(), XMLIn(), and XMLOut().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

Matrix3x4<double> BIAS::PMatrix::PConsistencyBackup_ [protected]

backup of P at time of last decomposition to check whether decomposition is still valid

Definition at line 469 of file PMatrix.hh.

Referenced by CheckDecomposition_(), Compose(), Decompose_(), InvalidateDecomposition(), Normalize(), and operator=().

Matrix3x4<double> BIAS::PMatrix::PConsistencyBackupSVD_ [protected]

Definition at line 470 of file PMatrix.hh.

Referenced by CheckSVD_(), InvalidateDecomposition(), MakeSVD_(), Normalize(), and operator=().

Matrix3x3<double> BIAS::PMatrix::R_ [protected]

rotation matrix (intrinsic parameter)

Definition at line 462 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetImagePlane(), GetR(), GetRayWorldCoo(), operator=(), Save(), XMLIn(), and XMLOut().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

SVD* BIAS::PMatrix::Svd_ [protected]

(for decomposition, docu: JW 11/2002)

Definition at line 464 of file PMatrix.hh.

Referenced by Compose(), GetNullVector(), GetPseudoInverse(), GetSVD(), InvalidateDecomposition(), MakeSVD_(), Normalize(), operator=(), PMatrix(), and ~PMatrix().

Vector3<double> BIAS::PMatrix::V0_ [protected]

unit vector in wcs assigning the direction of the vertical axis of the image plane

Definition at line 457 of file PMatrix.hh.

Referenced by Compose(), Decompose_(), GetV(), and operator=().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/PMatrix.hh
  • Geometry/PMatrix.cpp
Generated on Wed Jun 21 19:09:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMatrix3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMatrix3DData

BIAS::PMatrix3DData Class Reference

stores important data for drawing a camera More...

#include <Utils/PMatrix3DData.hh>

Collaboration diagram for BIAS::PMatrix3DData:

[legend]
List of all members.

Public Attributes

BIAS::Vector3< double > | C
camera center in wcs
BIAS::RGBAuc Color
RGBA color+opacity, 255=opaque, 0=transp.
BIAS::Vector3< double > | LL
lower left corner of image plane in wcs
BIAS::Vector3< double > | LR
lower right corner of image plane in wcs
std::string | name
BIAS::Vector3< double > | PP
principle point in wcs
BIAS::Vector3< double > | UL
upper left corner of image plane in wcs
BIAS::Vector3< double > | Up
Up-Vector (V).
BIAS::Vector3< double > | UR
upper right corner of image plane in wcs

Detailed Description

stores important data for drawing a camera

Definition at line 17 of file PMatrix3DData.hh.

Member Data Documentation

BIAS::Vector3<double> BIAS::PMatrix3DData::C

camera center in wcs

Definition at line 19 of file PMatrix3DData.hh.

BIAS::RGBAuc BIAS::PMatrix3DData::Color

RGBA color+opacity, 255=opaque, 0=transp.

Definition at line 27 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::LL

lower left corner of image plane in wcs

Definition at line 22 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::LR

lower right corner of image plane in wcs

Definition at line 23 of file PMatrix3DData.hh.

std::string BIAS::PMatrix3DData::name

Definition at line 28 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::PP

principle point in wcs

Definition at line 24 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::UL

upper left corner of image plane in wcs

Definition at line 20 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::Up

Up-Vector (V).

Definition at line 25 of file PMatrix3DData.hh.

BIAS::Vector3<double> BIAS::PMatrix3DData::UR

upper right corner of image plane in wcs

Definition at line 21 of file PMatrix3DData.hh.

The documentation for this class was generated from the following file:
  • Utils/PMatrix3DData.hh
Generated on Wed Jun 21 19:09:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMatrixBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMatrixBase

BIAS::PMatrixBase Class Reference
[Geometry and Transformations]

describes a projective 3D -> 2D mapping in homogenous coordinates More...

#include <Base/Geometry/PMatrixBase.hh>

Inheritance diagram for BIAS::PMatrixBase:

[legend]
Collaboration diagram for BIAS::PMatrixBase:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
enum | E_ParametrizationType { AXIS_TIMES_ANGLE, AXIS_AND_ANGLE, EULER, QUATERNION }
description of supported parametrization types More...
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< PMATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const PMATRIX_TYPE &scalar)
in place addition function
HomgPoint3D | Backproject (const HomgPoint2D &x, double mu=1)
Back projects image point x to 3D space and returns ray on which the 3D space point lies.
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type)
Compose a projection matrix using a parametrization.
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C)
calibrated case, uses K=Identity
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
calibrated case, uses K=Identity
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C)
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)
Subscript | dim (Subscript d) const
void | Divide (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const PMATRIX_TYPE &scalar)
in place division function
void | Fill (const PMATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< PMATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
PMATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
PMATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
PMATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
PMATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
PMATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (PMATRIX_TYPE &max, PMATRIX_TYPE &min) const
return biggest and smallest entry
PMATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
PMATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< PMATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< PMATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBan (const std::string &filename, const unsigned int &Time=0)
Loads a PMatrix from .ban file given by AddCameraKey and Time index.
int | LoadBOG (const std::string &filename)
Load a Daimler .bog fiel and compose a P matri xfrom it.
Matrix (const TNT::Matrix< PMATRIX_TYPE > &A)
Matrix (const Matrix< PMATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const PMATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x4 (const Matrix3x4< PMATRIX_TYPE > &A)
Matrix3x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x4 (const PMATRIX_TYPEa0, const PMATRIX_TYPEa1, const PMATRIX_TYPEa2, const PMATRIX_TYPEa3, const PMATRIX_TYPEa4, const PMATRIX_TYPEa5, const PMATRIX_TYPEa6, const PMATRIX_TYPEa7, const PMATRIX_TYPEa8, const PMATRIX_TYPEa9, const PMATRIX_TYPEa10, const PMATRIX_TYPEa11)
Set the matrix values JW.
Matrix3x4 (const std::string &s)
JW.
Matrix3x4 ()
default constructor untested
void | Mult (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< PMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Vector4< PMATRIX_TYPE > &argvec, Vector3< PMATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const PMATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< PMATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
PMatrixBase & | newsize (int rows, int cols)
setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class
PMATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
PMATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
PMATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
PMATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
PMatrixBase & | operator= (const PMatrixBase &mat)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
PMatrixBase (const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
implementation
PMatrixBase (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C)
Take R, K, C and compose PMatrixBase.
PMatrixBase (const Matrix< PMATRIX_TYPE > &Amat)
PMatrixBase (const Matrix3x4< PMATRIX_TYPE > &Amat_)
PMatrixBase (const PMatrixBase &A)
PMatrixBase (const std::string &s)
replacement for above JW
PMatrixBase (const MatrixInitType &i)
constructor setting identity or zero author koeser
PMatrixBase ()
default constructor
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, PMATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, PMATRIX_TYPEscale)
Scales row NoRow with scale.
void set_identity ()
Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0.
void | SetCol (const int row, const Vector< PMATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromVector (const Vector< PMATRIX_TYPE > &vals)
Sets P-Matrix from a vector which contains the elements of P row wise.
void SetIdentity ()
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)
void | SetRow (const int row, const Vector< PMATRIX_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const PMATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< PMATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
PMATRIX_TYPE | Trace () const
Matrix< PMATRIX_TYPE > | Transpose () const
transpose function, storing data destination matrix
virtual | ~PMatrixBase ()
destructor

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
RMatrixBase | Parametrization2R_ (const Vector< double > &parametrization, enum E_ParametrizationType param_type) const
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

describes a projective 3D -> 2D mapping in homogenous coordinates

Matrix P is a 3x4 matrix (3 rows {Zeilen}, 4 columns{Spalten}) describing a mapping between a 3D projective point in space and the corresponding projective 2D point (in an image plane).

With R' = transpose of R, K = Kamera calibration matrix and C = Kamera center is: P = (K R' | -K R' C) This means that R is the rotation from camera to world coo, and R' = R.Transpose() the rotation from world to camera coo.

Only implementation very specific to PMatrix (and not valid for general matrices, e.g. like decomposition) should be implemented here.

Author:
Jan Woetzel alpha (02/26/2002)

Definition at line 74 of file PMatrixBase.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Member Enumeration Documentation

enum BIAS::PMatrixBase::E_ParametrizationType

description of supported parametrization types

Enumerator:
AXIS_TIMES_ANGLE
AXIS_AND_ANGLE
EULER
QUATERNION

Definition at line 171 of file PMatrixBase.hh.

Constructor & Destructor Documentation

BIAS::PMatrixBase::PMatrixBase ( ) [inline]

default constructor

Definition at line 80 of file PMatrixBase.hh.

BIAS::PMatrixBase::PMatrixBase ( const MatrixInitType & i ) [inline, explicit]

constructor setting identity or zero author koeser

Definition at line 85 of file PMatrixBase.hh.

BIAS::PMatrixBase::PMatrixBase ( const std::string & s ) [explicit]

replacement for above JW

Definition at line 43 of file PMatrixBase.cpp.

BIAS::PMatrixBase::PMatrixBase ( const PMatrixBase & A ) [inline]

Author:
Jan Woetzel

Definition at line 96 of file PMatrixBase.hh.

BIAS::PMatrixBase::PMatrixBase ( const Matrix3x4< PMATRIX_TYPE > & Amat_ ) [inline]

Author:
Jan Woetzel

Definition at line 100 of file PMatrixBase.hh.

BIAS::PMatrixBase::PMatrixBase ( const Matrix< PMATRIX_TYPE > & Amat ) [inline, explicit]

Author:
Jan Woetzel not fine, should no be here, better cast stepwise between direct father and child

Definition at line 214 of file PMatrixBase.hh.

References BIASERR, BIAS::Matrix< T >::GetData(), BIAS::Matrix< PMATRIX_TYPE >::GetData(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

BIAS::PMatrixBase::PMatrixBase | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) |

Take R, K, C and compose PMatrixBase.

Author:
Jan-Friso Evers-Senne
Date:
2002-08-20

Definition at line 35 of file PMatrixBase.cpp.

References Compose().

BIAS::PMatrixBase::PMatrixBase | ( | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) | [inline]

implementation

Author:
woelk 08/2004

Definition at line 204 of file PMatrixBase.hh.

References Compose().

BIAS::PMatrixBase::~PMatrixBase ( ) [virtual]

destructor

Definition at line 163 of file PMatrixBase.cpp.

Member Function Documentation

void BIAS::Matrix< PMATRIX_TYPE >::Add | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::AddIP ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< PMATRIX_TYPE >::AddIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

HomgPoint3D BIAS::PMatrixBase::Backproject | ( | const HomgPoint2D & | x,
 |  | double | mu = 1
 | ) |

Back projects image point x to 3D space and returns ray on which the 3D space point lies.

Author:
jmf

Definition at line 186 of file PMatrixBase.cpp.

References BIASERR, BIAS::Matrix3x3< T >::InvertIP(), and M.

bool BIAS::Matrix< PMATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< PMATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Vector< double > & | parametrization,
 |  | enum E_ParametrizationType | param_type
 | ) |

Compose a projection matrix using a parametrization.

The supported parametrization vector always starts with the camera center followed by the camera orientation. Currently Euler angles, axis (norm 1) and angle, axis times angle and quaternion are supported as orientation parametrization.

Author:
woelk 02/2006

Definition at line 103 of file PMatrixBase.cpp.

References Compose(), Parametrization2R_(), and R.

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const HomgPoint3D & | C
 | ) |

calibrated case, uses K=Identity

Definition at line 95 of file PMatrixBase.cpp.

References Compose(), K, and BIAS::Matrix3x3< T >::SetIdentity().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) |

calibrated case, uses K=Identity

Definition at line 87 of file PMatrixBase.cpp.

References Compose(), K, and BIAS::Matrix3x3< T >::SetIdentity().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const HomgPoint3D & | C
 | ) |

Definition at line 74 of file PMatrixBase.cpp.

References Compose(), BIAS::HomgPoint3D::IsAtInfinity(), and BIAS::Vector3< T >::Set().

void BIAS::PMatrixBase::Compose | ( | const Matrix3x3< PMATRIX_TYPE > & | K,
 |  | const Matrix3x3< PMATRIX_TYPE > & | R,
 |  | const Vector3< PMATRIX_TYPE > & | C
 | ) |

composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)

Author:
Felix Woelk

Definition at line 48 of file PMatrixBase.cpp.

References BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::MultIP(), and BIAS::Matrix3x3< T >::TransposeIP().

Referenced by BIAS::PMatrix::Compose(), Compose(), LoadBOG(), and PMatrixBase().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< PMATRIX_TYPE >::Divide | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::DivideIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::Fill ( const PMATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PMATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

PMATRIX_TYPE * BIAS::Matrix< PMATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::PMatrix::CheckDecomposition_(), BIAS::PMatrix::CheckSVD_(), PMatrixBase(), set_identity(), and BIAS::PMatrix::XMLOut().

PMATRIX_TYPE ** BIAS::Matrix< PMATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

PMATRIX_TYPE ** BIAS::Matrix< PMATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

PMATRIX_TYPE * BIAS::Matrix< PMATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< PMATRIX_TYPE >::GetMaxMin | ( | PMATRIX_TYPE & | max,
 |  | PMATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< PMATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< PMATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::GetSystemMatrix ( Matrix< PMATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< PMATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< PMATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< PMATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented in BIAS::PMatrix.

Referenced by BIAS::PMatrix::Load().

int BIAS::Matrix3x4< PMATRIX_TYPE >::LoadBan | ( | const std::string & | filename,
 |  | const unsigned int & | Time = 0
 | ) | [inherited]

Loads a PMatrix from .ban file given by AddCameraKey and Time index.

Returns:
0 in case of success and negative nr. in case of error.
Author:
Jan Woetzel

int BIAS::PMatrixBase::LoadBOG ( const std::string & filename )

Load a Daimler .bog fiel and compose a P matri xfrom it.

Author:
Jan Woetzel 03/2005

Definition at line 216 of file PMatrixBase.cpp.

References Compose(), K, BIAS::Matrix3x3< T >::LoadBogK(), BIAS::Matrix3x3< T >::LoadBogRC(), BIAS::Vector3< T >::LoadBogTC(), and R.

Referenced by main().

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( const TNT::Matrix< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( const Matrix< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

References BIASABORT, BIASERR, BIAS::MatrixIdentity, BIAS::MatrixZero, r, and T.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const PMATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< PMATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const Matrix3x4< PMATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 | ( | const PMATRIX_TYPE | a0,
 |  | const PMATRIX_TYPE | a1,
 |  | const PMATRIX_TYPE | a2,
 |  | const PMATRIX_TYPE | a3,
 |  | const PMATRIX_TYPE | a4,
 |  | const PMATRIX_TYPE | a5,
 |  | const PMATRIX_TYPE | a6,
 |  | const PMATRIX_TYPE | a7,
 |  | const PMATRIX_TYPE | a8,
 |  | const PMATRIX_TYPE | a9,
 |  | const PMATRIX_TYPE | a10,
 |  | const PMATRIX_TYPE | a11
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x4< PMATRIX_TYPE >::Matrix3x4 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix< PMATRIX_TYPE >::Mult | ( | const Vector< PMATRIX_TYPE > & | arg,
 |  | Vector< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< PMATRIX_TYPE >::Mult ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< PMATRIX_TYPE >::Mult | ( | const Matrix< PMATRIX_TYPE > & | arg,
 |  | Matrix< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x4< PMATRIX_TYPE >::Mult | ( | const Vector4< PMATRIX_TYPE > & | argvec,
 |  | Vector3< PMATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< PMATRIX_TYPE >::Multiply | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::MultiplyIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::MultLeft | ( | const Vector< PMATRIX_TYPE > & | arg,
 |  | Vector< PMATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< PMATRIX_TYPE >::MultLeft ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

PMatrixBase & BIAS::PMatrixBase::newsize | ( | int | rows,
 |  | int | cols
 | ) |

setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class

Author:
Jan Woetzel alpha (02/25/2002)

Reimplemented from BIAS::Matrix3x4< PMATRIX_TYPE >.

Reimplemented in BIAS::PMatrix.

Definition at line 166 of file PMatrixBase.cpp.

References BIASERR.

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

Reimplemented in BIAS::PMatrix.

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< PMATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

PMatrixBase & BIAS::PMatrixBase::operator= ( const PMatrixBase & mat ) [inline]

Definition at line 242 of file PMatrixBase.hh.

References BIAS::Matrix< T >::operator=().

Referenced by BIAS::PMatrix::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

RMatrixBase BIAS::PMatrixBase::Parametrization2R_ | ( | const Vector< double > & | parametrization,
 |  | enum E_ParametrizationType | param_type
 | ) | const [protected]

Author:
woelk 03/2006

Definition at line 115 of file PMatrixBase.cpp.

References AXIS_AND_ANGLE, AXIS_TIMES_ANGLE, BEXCEPTION, BIASERR, EULER, QUATERNION, R, BIAS::RMatrixBase::Set(), BIAS::RMatrixBase::SetFromAxisAngle(), BIAS::RMatrixBase::SetFromQuaternion(), BIAS::RMatrixBase::SetXYZ(), and BIAS::Vector< T >::Size().

Referenced by BIAS::PMatrix::Compose(), and Compose().

bool BIAS::Matrix< PMATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< PMATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | PMATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< PMATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | PMATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::PMatrixBase::set_identity ( ) [inline]

Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 208 of file PMatrixBase.hh.

References BIAS::Matrix< PMATRIX_TYPE >::GetData(), and PMATRIX_TYPE.

Referenced by BIAS::PMatrixEstimation::InitP1P2Trans(), and main().

void BIAS::Matrix< PMATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< PMATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::PMatrixBase::SetFromVector ( const Vector< PMATRIX_TYPE > & vals )

Sets P-Matrix from a vector which contains the elements of P row wise.

Definition at line 177 of file PMatrixBase.cpp.

References BIAS::Vector< T >::GetData(), P_MATRIX_COLS, P_MATRIX_ROWS, and PMATRIX_TYPE.

void BIAS::Matrix3x4< PMATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)

Author:
Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< PMATRIX_TYPE >.

void BIAS::Matrix< PMATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< PMATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< PMATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< PMATRIX_TYPE >::Sub | ( | const PMATRIX_TYPE & | scalar,
 |  | Matrix< PMATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< PMATRIX_TYPE >::SubIP ( const PMATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< PMATRIX_TYPE >::SubIP ( const Matrix< PMATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

PMATRIX_TYPE BIAS::Matrix< PMATRIX_TYPE >::Trace ( ) const [inline, inherited]

Author:
koeser

Matrix<PMATRIX_TYPE > BIAS::Matrix< PMATRIX_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/PMatrixBase.hh
  • Base/Geometry/PMatrixBase.cpp
Generated on Wed Jun 21 19:09:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMatrixEstimation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMatrixEstimation

BIAS::PMatrixEstimation Class Reference
[Estimation]

compute standard P1/P2 from F. More...

#include <Geometry/PMatrixEstimation.hh>

Inheritance diagram for BIAS::PMatrixEstimation:

[legend]
Collaboration diagram for BIAS::PMatrixEstimation:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | ComputeFromFDirect (BIAS::FMatrix &F, const double &BaselineMagnitude, BIAS::PMatrix &P1, BIAS::PMatrix &P2)
given an FMatrix set P1 as identity and compute P2 to be consistent with F and P1 such that P2 is euclidean with direct solution of the problem
void | ComputeFromFQuasiEuklid (BIAS::FMatrix &F, double BaselineMagnitude, BIAS::PMatrix &P1, BIAS::PMatrix &P2)
given an FMatrix set P1 as identity and compute P2 to be consistent with F and P1 such that P2 is euclidean with nonlinear estimation.
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
PMatrixEstimation ()
Standard constructor does nothing.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~PMatrixEstimation ()
Standard Destructor does nothing.

Static Public Member Functions

static void | ComputeRotation (BIAS::FMatrix &F, BIAS::HomgPoint2D &Epipole1, BIAS::HomgPoint2D &Epipole2, BIAS::RMatrix &R)
static void | ComputeRotationCenter (BIAS::PMatrix P1, BIAS::PMatrix P2, BIAS::RMatrix &R, BIAS::Vector3< double > &C)
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | FindClosestP2 (BIAS::FMatrix &F, BIAS::PMatrix &P2, Matrix3x3< double > &M2Matrix, Vector< double > &C, HomgPoint2D &Epipole2)
given approximate P2, compute the nearest value of P2 which is exactly compatible with P1 and F
void | InitP1P2Trans (BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::HomgPoint2D &Epipole2)
set P1 to identity, set P2 to identity with last column epipole2

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

compute standard P1/P2 from F.

P1 is set to [ I | 0 ]. The epipole (determined by from F) tells us only the direction of C2, so choose a C2 with |C2| = 1

Author:
frahm, koeser

Definition at line 53 of file PMatrixEstimation.hh.

Constructor & Destructor Documentation

BIAS::PMatrixEstimation::PMatrixEstimation ( ) [inline]

Standard constructor does nothing.

Definition at line 57 of file PMatrixEstimation.hh.

BIAS::PMatrixEstimation::~PMatrixEstimation ( ) [inline]

Standard Destructor does nothing.

Definition at line 60 of file PMatrixEstimation.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int PMatrixEstimation::ComputeFromFDirect | ( | BIAS::FMatrix & | F,
 |  | const double & | BaselineMagnitude,
 |  | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2
 | ) |

given an FMatrix set P1 as identity and compute P2 to be consistent with F and P1 such that P2 is euclidean with direct solution of the problem

Returns:
0: ok <0: if epipoles could not be extracted and P computation failed

Definition at line 66 of file PMatrixEstimation.cpp.

References ComputeRotation(), BIAS::FMatrix::GetEpipoles(), BIAS::SVD::GetS(), InitP1P2Trans(), BIAS::PMatrix::InvalidateDecomposition(), BIAS::Vector3< T >::Normalize(), R, and BIAS::Matrix3x3< T >::Transpose().

Referenced by main().

void PMatrixEstimation::ComputeFromFQuasiEuklid | ( | BIAS::FMatrix & | F,
 |  | double | BaselineMagnitude,
 |  | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2
 | ) |

given an FMatrix set P1 as identity and compute P2 to be consistent with F and P1 such that P2 is euclidean with nonlinear estimation.

Todo:
dirty hack: set global variables, which are accessible in error function called from fortran-powell this is not thread-safe ! ***

Definition at line 173 of file PMatrixEstimation.cpp.

References BIAS_FMATRIXDEBUG, BIAS_FQuasiEuklid, BIASDOUT, BIASERR, DistanceFromRotation4Var(), FindClosestP2(), BIAS::FMatrix::GetEpipoles(), InitP1P2Trans(), BIAS::Vector3< T >::Normalize(), and BIAS::Powell().

Referenced by main().

void PMatrixEstimation::ComputeRotation | ( | BIAS::FMatrix & | F,
 |  | BIAS::HomgPoint2D & | Epipole1,
 |  | BIAS::HomgPoint2D & | Epipole2,
 |  | BIAS::RMatrix & | R
 | ) | [static]

Definition at line 106 of file PMatrixEstimation.cpp.

References BIAS::Matrix3x3< T >::det(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector3< T >::OuterProduct(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), and BIAS::Matrix3x3< T >::Transpose().

Referenced by ComputeFromFDirect(), and ComputeRotationCenter().

void PMatrixEstimation::ComputeRotationCenter | ( | BIAS::PMatrix | P1,
 |  | BIAS::PMatrix | P2,
 |  | BIAS::RMatrix & | R,
 |  | BIAS::Vector3< double > & | C
 | ) | [static]

Definition at line 136 of file PMatrixEstimation.cpp.

References BIASERR, ComputeRotation(), BIAS::PMatrix::GetC(), BIAS::FMatrix::GetEpipoles(), BIAS::Vector< T >::MultiplyIP(), BIAS::Vector< T >::NormL2(), BIAS::Matrix3x3< T >::SetAsCrossProductMatrix(), and BIAS::Matrix3x3< T >::Transpose().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void PMatrixEstimation::FindClosestP2 | ( | BIAS::FMatrix & | F,
 |  | BIAS::PMatrix & | P2,
 |  | Matrix3x3< double > & | M2Matrix,
 |  | Vector< double > & | C,
 |  | HomgPoint2D & | Epipole2
 | ) | [protected]

given approximate P2, compute the nearest value of P2 which is exactly compatible with P1 and F

Definition at line 272 of file PMatrixEstimation.cpp.

References BIAS_FMATRIXDEBUG, BIAS_PMATRIXDEBUG, BIASDOUT, BIAS::FMatrix::DecomposetoSR(), TNT::Lapack_LU_linear_solve(), BIAS::Vector3< T >::NormL2(), and BIAS::Matrix< T >::Transpose().

Referenced by ComputeFromFQuasiEuklid().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void PMatrixEstimation::InitP1P2Trans | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2,
 |  | BIAS::HomgPoint2D & | Epipole2
 | ) | [protected]

set P1 to identity, set P2 to identity with last column epipole2

Definition at line 253 of file PMatrixEstimation.cpp.

References BIAS::PMatrixBase::set_identity().

Referenced by ComputeFromFDirect(), and ComputeFromFQuasiEuklid().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Geometry/PMatrixEstimation.hh
  • Geometry/PMatrixEstimation.cpp
Generated on Wed Jun 21 19:09:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMatrixLinear Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMatrixLinear

BIAS::PMatrixLinear Class Reference
[Estimation]

This class computes a PMatrix from 2D/3D correspondences with linear methods. More...

#include <Geometry/PMatrixLinear.hh>

Inheritance diagram for BIAS::PMatrixLinear:

[legend]
Collaboration diagram for BIAS::PMatrixLinear:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | Compute (std::vector< HomgPoint3D > &points3D, std::vector< HomgPoint2D > &points2D, PMatrix &P)
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences are provided in points3D and points2D
bool | Compute (std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D, PMatrix &P)
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences (pointers) are provided in points3D and points2D.
bool | ComputeCalibrated (const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D, PMatrix &Pose)
given n>=6 2D/3D correspondences, compute approximate R and C using linear methods (thats why we need 6, not 3 correspondences !)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
bool | GetPEstSystemHom (Matrix< double > &A, std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D)
sets up the homogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided
bool | GetPEstSystemInHom (Matrix< double > &A, Vector< double > &b, std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D)
sets up an inhomogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided
PMatrixLinear ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

This class computes a PMatrix from 2D/3D correspondences with linear methods.

No nonlinear constraints are enforced: If you have noisy points, you may get inexact rotations or non-metric PMatrices, although you compute in a metric framework. however, this class provides functions which can also be applied in projectively skewed space.

Author:
koeser/frahm

Definition at line 52 of file PMatrixLinear.hh.

Constructor & Destructor Documentation

BIAS::PMatrixLinear::PMatrixLinear ( ) [inline]

Definition at line 56 of file PMatrixLinear.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool PMatrixLinear::Compute | ( | std::vector< HomgPoint3D > & | points3D,
 |  | std::vector< HomgPoint2D > & | points2D,
 |  | PMatrix & | P
 | ) |

computes a least squares solution P via SVD, if at least 6 2d-3d correspondences are provided in points3D and points2D

Algorithm used is DLT. Fails if points3D are coplanar.

Attention:
P may not exactly be decomposable due to noise in points
Parameters:
points3D | 3D points which project to points2D
points2D | 2D projections of points3D, any K allowed !
P | resulting (not always metric) PMatrix
Returns:
false on ambiguity, true on success

Definition at line 32 of file PMatrixLinear.cpp.

References Compute().

bool PMatrixLinear::Compute | ( | std::vector< HomgPoint3D * > & | points3D,
 |  | std::vector< HomgPoint2D * > & | points2D,
 |  | PMatrix & | P
 | ) |

computes a least squares solution P via SVD, if at least 6 2d-3d correspondences (pointers) are provided in points3D and points2D.

Attention:
P may not exactly be decomposable due to noise in points
Parameters:
points3D | 3D points which project to points2D
points2D | 2D projections of points3D, any K allowed !
P | resulting (not always metric) PMatrix
Returns:
false on ambiguity, true on success

Definition at line 49 of file PMatrixLinear.cpp.

References BIASABORT, and BIASERR.

Referenced by Compute().

bool BIAS::PMatrixLinear::ComputeCalibrated | ( | const std::vector< HomgPoint3D * > & | points3D,
 |  | const std::vector< HomgPoint2D * > & | points2D,
 |  | PMatrix & | Pose
 | ) |

given n>=6 2D/3D correspondences, compute approximate R and C using linear methods (thats why we need 6, not 3 correspondences !)

The lines of each two 3D points and their projections into the image are used to determine the rotation of P. For n points, we have n(n-1)/2 lines (quadratic in n!) and also linear equations, dont pass too many points if you are interested in performance ! After R is determined, C is computed separately using linear methods (DLT) starting from the equation Rx ~= [ I |-C] X Algorithm fails if points3D are coplanar

Attention:
R is no real rotation, enforce afterwards, if you want that!
Parameters:
points3D | 3D points which project to points2D
points2D | 2D projections of points3D, K=Identity required !
Pose | result R^T*[ I |-C]
Returns:
true on success, false on error (ambiguity)
Author:
koeser 10/2004

Referenced by GetPEstSystemInHom().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool PMatrixLinear::GetPEstSystemHom | ( | Matrix< double > & | A,
 |  | std::vector< HomgPoint3D * > & | points3D,
 |  | std::vector< HomgPoint2D * > & | points2D
 | ) |

sets up the homogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided

Author:
frahm

Definition at line 108 of file PMatrixLinear.cpp.

References BIASERR.

bool PMatrixLinear::GetPEstSystemInHom | ( | Matrix< double > & | A,
 |  | Vector< double > & | b,
 |  | std::vector< HomgPoint3D * > & | points3D,
 |  | std::vector< HomgPoint2D * > & | points2D
 | ) |

sets up an inhomogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided

Author:
frahm

Definition at line 160 of file PMatrixLinear.cpp.

References BIAS_DEBUG, BIASABORT, BIASASSERT, BIASERR, ComputeCalibrated(), BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::GetDataArray(), TNT::Vector< T >::newsize(), BIAS::Vector3< T >::OuterProduct(), and BIAS::Vector3< T >::Set().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Geometry/PMatrixLinear.hh
  • Geometry/PMatrixLinear.cpp
Generated on Wed Jun 21 19:09:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMDImageIO Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMDImageIO

BIAS::PMDImageIO Class Reference
[Image and Image Base]

Save 2D/3D-image-data together with some metadata in a single tiff-datafile. More...

#include <Base/Image/PMDImageIO.hh>

List of all members.

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.
static int | Read (const std::string &FileName, uint16 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth)
static int | Read (const std::string &FileName, uint8 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth)
Read a PMD-data 2d/3d-tiff image from disk.
static int | Write (const std::string &FileName, uint16 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth)
static int | Write (const std::string &FileName, uint8 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth)
Write a PMD-data 2d/3d-tiff image to disk.

Static Protected Member Functions

static void | NewTagsCallback_ (TIFF *tif)
static void | NewTagsInitialize_ ()
static int | Read2DImage16Bit_ (TIFF *tiffimage, uint16 *&Img2D, PMDImageMetaData &MetaData2D)
static int | Read2DImage8Bit_ (TIFF *tiffimage, uint8 *&Img2D, PMDImageMetaData &MetaData2D)
static int | ReadDepthImage_ (TIFF *tiffimage, uint16 *&ImgDepth, PMDImageMetaData &MetaDataDepth)
static int | ReadMetaData_ (TIFF *tiffimage, PMDImageMetaData &MetaData)
static int | ReadModCoeffImage_ (TIFF *tiffimage, uint16 *&ImgModCoeff, PMDImageMetaData MetaDataDepth)
static int | Write2DImage16Bit_ (TIFF *tiffimage, uint16 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip)
static int | Write2DImage8Bit_ (TIFF *tiffimage, uint8 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip)
static int | WriteDepthImage_ (TIFF *tiffimage, uint16 *ImgDepth, PMDImageMetaData MetaDataDepth, int LinesPerStrip)
static int | WriteMetaData_ (TIFF *tiffimage, const PMDImageMetaData &MetaData)
static int | WriteModCoeffImage_ (TIFF *tiffimage, uint16 *ImgModCoeff, PMDImageMetaData MetaDataDepth, int LinesPerStrip)

Detailed Description

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.

Author:
streckel 02/2006

Definition at line 99 of file PMDImageIO.hh.

Member Function Documentation

int PMDImageIO::GetBitRep ( const std::string & FileName ) [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.

Author:
Birger Streckel

Definition at line 548 of file PMDImageIO.cpp.

References BIASERR.

static void BIAS::PMDImageIO::NewTagsCallback_ ( TIFF * tif ) [inline, static, protected]

Definition at line 164 of file PMDImageIO.hh.

References ParentExtender, and tiffFieldInfo.

static void BIAS::PMDImageIO::NewTagsInitialize_ ( ) [inline, static, protected]

Definition at line 151 of file PMDImageIO.hh.

References ParentExtender.

Referenced by Read(), and Write().

int PMDImageIO::Read | ( | const std::string & | FileName,
 |  | uint16 *& | Img2D,
 |  | uint16 *& | ImgDepth,
 |  | uint16 *& | ImgModCoeff,
 |  | PMDImageMetaData & | MetaData2D,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static]

Definition at line 446 of file PMDImageIO.cpp.

References BIASERR, and NewTagsInitialize_().

int PMDImageIO::Read | ( | const std::string & | FileName,
 |  | uint8 *& | Img2D,
 |  | uint16 *& | ImgDepth,
 |  | uint16 *& | ImgModCoeff,
 |  | PMDImageMetaData & | MetaData2D,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static]

Read a PMD-data 2d/3d-tiff image from disk.

Parameters:
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
Author:
Birger Streckel

Definition at line 497 of file PMDImageIO.cpp.

References BIASERR, and NewTagsInitialize_().

Referenced by BIAS::PMDImageProc::Read().

int PMDImageIO::Read2DImage16Bit_ | ( | TIFF * | tiffimage,
 |  | uint16 *& | Img2D,
 |  | PMDImageMetaData & | MetaData2D
 | ) | [static, protected]

Definition at line 300 of file PMDImageIO.cpp.

References BIASERR.

int PMDImageIO::Read2DImage8Bit_ | ( | TIFF * | tiffimage,
 |  | uint8 *& | Img2D,
 |  | PMDImageMetaData & | MetaData2D
 | ) | [static, protected]

Definition at line 250 of file PMDImageIO.cpp.

References BIASERR.

int PMDImageIO::ReadDepthImage_ | ( | TIFF * | tiffimage,
 |  | uint16 *& | ImgDepth,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static, protected]

Definition at line 349 of file PMDImageIO.cpp.

References BIASERR.

int PMDImageIO::ReadMetaData_ | ( | TIFF * | tiffimage,
 |  | PMDImageMetaData & | MetaData
 | ) | [static, protected]

Definition at line 576 of file PMDImageIO.cpp.

References BIASERR.

int PMDImageIO::ReadModCoeffImage_ | ( | TIFF * | tiffimage,
 |  | uint16 *& | ImgModCoeff,
 |  | PMDImageMetaData | MetaDataDepth
 | ) | [static, protected]

Definition at line 397 of file PMDImageIO.cpp.

References BIASERR.

static int BIAS::PMDImageIO::Write | ( | const std::string & | FileName,
 |  | uint16 * | Img2D,
 |  | uint16 * | ImgDepth,
 |  | uint16 * | ImgModCoeff,
 |  | const PMDImageMetaData & | MetaData2D,
 |  | const PMDImageMetaData & | MetaDataDepth
 | ) | [static]

int PMDImageIO::Write | ( | const std::string & | FileName,
 |  | uint8 * | Img2D,
 |  | uint16 * | ImgDepth,
 |  | uint16 * | ImgModCoeff,
 |  | const PMDImageMetaData & | MetaData2D,
 |  | const PMDImageMetaData & | MetaDataDepth
 | ) | [static]

Write a PMD-data 2d/3d-tiff image to disk.

Parameters:
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
Author:
Birger Streckel

Definition at line 206 of file PMDImageIO.cpp.

References BIASERR, and NewTagsInitialize_().

int PMDImageIO::Write2DImage16Bit_ | ( | TIFF * | tiffimage,
 |  | uint16 * | Img2D,
 |  | PMDImageMetaData | MetaData2D,
 |  | int | LinesPerStrip
 | ) | [static, protected]

Definition at line 89 of file PMDImageIO.cpp.

References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::width, and WriteMetaData_().

int PMDImageIO::Write2DImage8Bit_ | ( | TIFF * | tiffimage,
 |  | uint8 * | Img2D,
 |  | PMDImageMetaData | MetaData2D,
 |  | int | LinesPerStrip
 | ) | [static, protected]

Definition at line 49 of file PMDImageIO.cpp.

References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::width, and WriteMetaData_().

int PMDImageIO::WriteDepthImage_ | ( | TIFF * | tiffimage,
 |  | uint16 * | ImgDepth,
 |  | PMDImageMetaData | MetaDataDepth,
 |  | int | LinesPerStrip
 | ) | [static, protected]

Definition at line 129 of file PMDImageIO.cpp.

References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::width, and WriteMetaData_().

int PMDImageIO::WriteMetaData_ | ( | TIFF * | tiffimage,
 |  | const PMDImageMetaData & | MetaData
 | ) | [static, protected]

Definition at line 663 of file PMDImageIO.cpp.

References a, BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::PMDImageMetaData::FocallengthX, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, TIFFTAG_ASPECTRATIO, TIFFTAG_CAMERACENTER, TIFFTAG_CAMERAROTATION, TIFFTAG_FOCALLENGTHX, TIFFTAG_PRINCIPALPOINT, TIFFTAG_UNDISTORTION, and BIAS::PMDImageMetaData::UndistCoeff.

Referenced by Write2DImage16Bit_(), Write2DImage8Bit_(), WriteDepthImage_(), and WriteModCoeffImage_().

int PMDImageIO::WriteModCoeffImage_ | ( | TIFF * | tiffimage,
 |  | uint16 * | ImgModCoeff,
 |  | PMDImageMetaData | MetaDataDepth,
 |  | int | LinesPerStrip
 | ) | [static, protected]

Definition at line 166 of file PMDImageIO.cpp.

References BIAS::PMDImageMetaData::channels, BIAS::PMDImageMetaData::height, BIAS::PMDImageMetaData::width, and WriteMetaData_().

The documentation for this class was generated from the following files:
  • Base/Image/PMDImageIO.hh
  • Base/Image/PMDImageIO.cpp
Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMDImageMetaData Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMDImageMetaData

BIAS::PMDImageMetaData Struct Reference

Store extrinsic and intrinsic camera parameters for Rotation is in axis * angle representation image padding and Metadata. More...

#include <Base/Image/PMDImageIO.hh>

List of all members.

Public Attributes

double | AspectRatio
double | CameraCenter [3]
double | CameraRotation [3]
unsigned int | channels
double | FocallengthX
unsigned int | height
double | PrincipalX
double | PrincipalY
double | UndistCoeff [4]
unsigned int | width

Detailed Description

Store extrinsic and intrinsic camera parameters for Rotation is in axis * angle representation image padding and Metadata.

Author:
streckel 02/2006

Definition at line 77 of file PMDImageIO.hh.

Member Data Documentation

double BIAS::PMDImageMetaData::AspectRatio

Definition at line 84 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::KFromMeta(), main(), and BIAS::PMDImageIO::WriteMetaData_().

double BIAS::PMDImageMetaData::CameraCenter[3]

Definition at line 86 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::HFromMeta_(), main(), BIAS::PMDImageProc::PoseFromMeta(), and BIAS::PMDImageIO::WriteMetaData_().

double BIAS::PMDImageMetaData::CameraRotation[3]

Definition at line 87 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::HFromMeta_(), main(), BIAS::PMDImageProc::PoseFromMeta(), and BIAS::PMDImageIO::WriteMetaData_().

unsigned int BIAS::PMDImageMetaData::channels

Definition at line 80 of file PMDImageIO.hh.

Referenced by main(), BIAS::PMDImageProc::Read(), BIAS::PMDImageProc::Write(), BIAS::PMDImageIO::Write2DImage16Bit_(), BIAS::PMDImageIO::Write2DImage8Bit_(), BIAS::PMDImageIO::WriteDepthImage_(), and BIAS::PMDImageIO::WriteModCoeffImage_().

double BIAS::PMDImageMetaData::FocallengthX

Definition at line 83 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::KFromMeta(), main(), and BIAS::PMDImageIO::WriteMetaData_().

unsigned int BIAS::PMDImageMetaData::height

Definition at line 79 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), BIAS::PMDImageProc::Read(), BIAS::PMDImageProc::Write(), BIAS::PMDImageIO::Write2DImage16Bit_(), BIAS::PMDImageIO::Write2DImage8Bit_(), BIAS::PMDImageIO::WriteDepthImage_(), and BIAS::PMDImageIO::WriteModCoeffImage_().

double BIAS::PMDImageMetaData::PrincipalX

Definition at line 81 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::KFromMeta(), main(), and BIAS::PMDImageIO::WriteMetaData_().

double BIAS::PMDImageMetaData::PrincipalY

Definition at line 82 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::KFromMeta(), main(), and BIAS::PMDImageIO::WriteMetaData_().

double BIAS::PMDImageMetaData::UndistCoeff[4]

Definition at line 85 of file PMDImageIO.hh.

Referenced by main(), and BIAS::PMDImageIO::WriteMetaData_().

unsigned int BIAS::PMDImageMetaData::width

Definition at line 78 of file PMDImageIO.hh.

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), BIAS::PMDImageProc::Read(), BIAS::PMDImageProc::Write(), BIAS::PMDImageIO::Write2DImage16Bit_(), BIAS::PMDImageIO::Write2DImage8Bit_(), BIAS::PMDImageIO::WriteDepthImage_(), and BIAS::PMDImageIO::WriteModCoeffImage_().

The documentation for this struct was generated from the following file:
  • Base/Image/PMDImageIO.hh
Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PMDImageProc Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PMDImageProc

BIAS::PMDImageProc Class Reference

#include <Image/PMDImageProc.hh>

List of all members.

Static Public Member Functions

static double | CalcSigmaDepth (Image< float > &ImgDepth, unsigned int x, unsigned int y)
static int | FitDepthTo2DImage (Image< float > &ImgDepth, const PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth)
convert a depth image such that the depth and the grey value at the same pixel position belong to the same ray.
static KMatrix | KFromMeta (const PMDImageMetaData &MetaData)
static Pose | PoseFromMeta (const PMDImageMetaData &MetaData)
static int | Read (const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth)
Read a PMD-data 2d/3d-tiff image from disk.
static int | Write (const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth)
Write a PMD-data 2d/3d-tiff image to disk.

Static Protected Member Functions

static float | Convert_ (uint16 val, float lower, float upper)
static uint16 | Convert_ (float val, float lower, float upper)
static float | DepthConvert_ (uint16 depth)
static uint16 | DepthConvert_ (float depth)
static HMatrix | HFromMeta_ (const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth)
static float | ModCoeffConvert_ (uint16 modcoeff)
static uint16 | ModCoeffConvert_ (float modcoeff)

Detailed Description

Definition at line 46 of file PMDImageProc.hh.

Member Function Documentation

double PMDImageProc::CalcSigmaDepth | ( | Image< float > & | ImgDepth,
 |  | unsigned int | x,
 |  | unsigned int | y
 | ) | [static]

Definition at line 257 of file PMDImageProc.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::PixelValue().

float PMDImageProc::Convert_ | ( | uint16 | val,
 |  | float | lower,
 |  | float | upper
 | ) | [static, protected]

Definition at line 314 of file PMDImageProc.cpp.

References step(), and UINT16_MAX.

uint16 PMDImageProc::Convert_ | ( | float | val,
 |  | float | lower,
 |  | float | upper
 | ) | [static, protected]

Definition at line 307 of file PMDImageProc.cpp.

References step(), and UINT16_MAX.

Referenced by DepthConvert_(), and ModCoeffConvert_().

float PMDImageProc::DepthConvert_ ( uint16 depth ) [static, protected]

Definition at line 295 of file PMDImageProc.cpp.

References Convert_(), DEPTH_MAX, and DEPTH_MIN.

uint16 PMDImageProc::DepthConvert_ ( float depth ) [static, protected]

Definition at line 291 of file PMDImageProc.cpp.

References Convert_(), DEPTH_MAX, and DEPTH_MIN.

Referenced by Read().

int PMDImageProc::FitDepthTo2DImage | ( | Image< float > & | ImgDepth,
 |  | const PMDImageMetaData & | MetaData2D,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static]

convert a depth image such that the depth and the grey value at the same pixel position belong to the same ray.

The transformaton information is taken from the metadata. MetaDataDepth is changed for the converted depth image and is identical to MetaData2D afterwards

Parameters:
ImgDepth | is the image to convert. This image has to contain depth informaiton and is changed in size and contents.
MetaData2D | this is the metadata for the 2D-image.
MetaDataDepth | the metadata for the depth image. Is adapted to reflect the image transformation.
Author:
Birger Streckel

Definition at line 190 of file PMDImageProc.cpp.

References BIAS::PMDImageMetaData::height, HFromMeta_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::SetHomography(), BIAS::PMDImageMetaData::width, and BIAS::ImageIO::Write().

HMatrix PMDImageProc::HFromMeta_ | ( | const PMDImageMetaData & | MetaData2D,
 |  | const PMDImageMetaData & | MetaDataDepth
 | ) | [static, protected]

Definition at line 205 of file PMDImageProc.cpp.

References BIASERR, BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::Equal(), BIAS::KMatrix::Invert(), BIAS::Matrix3x3< T >::Invert(), KFromMeta(), and BIAS::RMatrixBase::SetFromAxisAngle().

Referenced by FitDepthTo2DImage().

KMatrix PMDImageProc::KFromMeta ( const PMDImageMetaData & MetaData ) [static]

Definition at line 234 of file PMDImageProc.cpp.

References BIAS::PMDImageMetaData::AspectRatio, BIAS::PMDImageMetaData::FocallengthX, K, BIAS::PMDImageMetaData::PrincipalX, BIAS::PMDImageMetaData::PrincipalY, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by HFromMeta_().

float PMDImageProc::ModCoeffConvert_ ( uint16 modcoeff ) [static, protected]

Definition at line 303 of file PMDImageProc.cpp.

References Convert_(), MODCOEFF_MAX, and MODCOEFF_MIN.

uint16 PMDImageProc::ModCoeffConvert_ ( float modcoeff ) [static, protected]

Definition at line 299 of file PMDImageProc.cpp.

References Convert_(), MODCOEFF_MAX, and MODCOEFF_MIN.

Referenced by Read().

Pose PMDImageProc::PoseFromMeta ( const PMDImageMetaData & MetaData ) [static]

Definition at line 245 of file PMDImageProc.cpp.

References BIAS::PMDImageMetaData::CameraCenter, BIAS::PMDImageMetaData::CameraRotation, BIAS::RMatrixBase::GetQuaternion(), R, BIAS::Pose::SetC(), BIAS::RMatrixBase::SetFromAxisAngle(), and BIAS::Pose::SetQ().

int PMDImageProc::Read | ( | const std::string & | FileName,
 |  | Image< unsigned char > & | Img2D,
 |  | Image< float > & | ImgDepth,
 |  | Image< float > & | ImgModCoeff,
 |  | PMDImageMetaData & | MetaData2D,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static]

Read a PMD-data 2d/3d-tiff image from disk.

Parameters:
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
Author:
Birger Streckel

Definition at line 123 of file PMDImageProc.cpp.

References BIASERR, BIAS::PMDImageMetaData::channels, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, DepthConvert_(), BIAS::PMDImageMetaData::height, BIAS::Image< StorageType >::InitWithForeignData(), BIAS::ImageBase::IsEmpty(), ModCoeffConvert_(), BIAS::PMDImageIO::Read(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetColorModel(), and BIAS::PMDImageMetaData::width.

int PMDImageProc::Write | ( | const std::string & | FileName,
 |  | Image< unsigned char > & | Img2D,
 |  | Image< float > & | ImgDepth,
 |  | Image< float > & | ImgModCoeff,
 |  | PMDImageMetaData & | MetaData2D,
 |  | PMDImageMetaData & | MetaDataDepth
 | ) | [static]

Write a PMD-data 2d/3d-tiff image to disk.

Parameters:
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
Author:
Birger Streckel

Definition at line 45 of file PMDImageProc.cpp.

References BIASERR, BIAS::PMDImageMetaData::channels, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::PMDImageMetaData::height, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_unsignedchar, and BIAS::PMDImageMetaData::width.

The documentation for this class was generated from the following files:
  • Image/PMDImageProc.hh
  • Image/PMDImageProc.cpp
Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Point3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Point3DData

BIAS::Point3DData Class Reference

stores data for drawing a point More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::Point3DData:

[legend]
List of all members.

Public Attributes

BIAS::RGBAuc Color
BIAS::Vector3< double > Point

Detailed Description

stores data for drawing a point

Definition at line 144 of file ThreeDOut.hh.

Member Data Documentation

BIAS::RGBAuc BIAS::Point3DData::Color

Definition at line 147 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPoint(), and BIAS::ThreeDOut::UpdatePoint().

BIAS::Vector3<double> BIAS::Point3DData::Point

Definition at line 146 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPoint(), and BIAS::ThreeDOut::UpdatePoint().

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:09:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Polynom Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Polynom

BIAS::Polynom Class Reference
[Matrix and Vector Classes]

class for Polynoms of arbitary order More...

#include <Base/Math/Polynom.hh>

Inheritance diagram for BIAS::Polynom:

[legend]
Collaboration diagram for BIAS::Polynom:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
unsigned int | GetOrder () const
Polynom & | operator *= (const double &d)
Polynom & | operator *= (const Polynom &a)
bool | operator!= (const Polynom &a) const
Polynom & | operator+= (const double &d)
Polynom & | operator+= (const Polynom &a)
Polynom & | operator-= (const double &d)
Polynom & | operator-= (const Polynom &a)
Polynom & | operator= (const Polynom &a)
bool | operator== (const Polynom &a) const
double & | operator[] (const unsigned int i)
returns a reference to ith coefficent of the polynom writable
const double & | operator[] (const unsigned int i) const
returns a reference to ith coefficent of the polynom readonly
Polynom (unsigned int i)
constructs a polynom of order=i the coefficients are 0
Polynom (const Polynom &toCopy)
Polynom ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetOrder (unsigned int i)
sets the order of polynom to i new generated coefficients are 0
~Polynom ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
unsigned int | order_
std::vector< double > | poly_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

class for Polynoms of arbitary order

class Polynom represents a Polynom of arbitary order, where ith element is the coefficient of the ith exponent

Author:
Marcel Lilienthal, June 2005

Definition at line 46 of file Polynom.hh.

Constructor & Destructor Documentation

BIAS::Polynom::Polynom ( ) [inline]

Definition at line 49 of file Polynom.hh.

References order_.

BIAS::Polynom::~Polynom ( ) [inline]

Definition at line 52 of file Polynom.hh.

BIAS::Polynom::Polynom ( const Polynom & toCopy ) [inline]

Definition at line 54 of file Polynom.hh.

References operator=().

BIAS::Polynom::Polynom ( unsigned int i ) [inline]

constructs a polynom of order=i the coefficients are 0

Author:
Marcel Lilienthal

Definition at line 64 of file Polynom.hh.

References order_, and poly_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::Polynom::GetOrder ( ) const [inline]

Definition at line 81 of file Polynom.hh.

References order_.

Referenced by BIAS::operator *(), BIAS::operator+(), BIAS::operator-(), and printPolynom().

Polynom & BIAS::Polynom::operator *= ( const double & d ) [inline]

Definition at line 187 of file Polynom.hh.

Polynom & BIAS::Polynom::operator *= ( const Polynom & a ) [inline]

Definition at line 170 of file Polynom.hh.

References order_, and poly_.

bool BIAS::Polynom::operator!= ( const Polynom & a ) const [inline]

Definition at line 214 of file Polynom.hh.

References BIAS::operator==().

Polynom & BIAS::Polynom::operator+= ( const double & d ) [inline]

Definition at line 146 of file Polynom.hh.

References order_, poly_, and SetOrder().

Polynom & BIAS::Polynom::operator+= ( const Polynom & a ) [inline]

Definition at line 136 of file Polynom.hh.

References order_, poly_, and SetOrder().

Polynom & BIAS::Polynom::operator-= ( const double & d ) [inline]

Definition at line 163 of file Polynom.hh.

References order_, poly_, and SetOrder().

Polynom & BIAS::Polynom::operator-= ( const Polynom & a ) [inline]

Definition at line 153 of file Polynom.hh.

References order_, poly_, and SetOrder().

Polynom & BIAS::Polynom::operator= ( const Polynom & a ) [inline]

Definition at line 124 of file Polynom.hh.

References order_, and poly_.

Referenced by Polynom().

bool BIAS::Polynom::operator== ( const Polynom & a ) const [inline]

Definition at line 195 of file Polynom.hh.

References order_, poly_, and res.

double & BIAS::Polynom::operator[] ( const unsigned int i ) [inline]

returns a reference to ith coefficent of the polynom writable

Author:
Marcel Lilienthal

Definition at line 119 of file Polynom.hh.

References BIASASSERT, order_, and poly_.

const double & BIAS::Polynom::operator[] ( const unsigned int i ) const [inline]

returns a reference to ith coefficent of the polynom readonly

Author:
Marcel Lilienthal

Definition at line 114 of file Polynom.hh.

References BIASASSERT, order_, and poly_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::Polynom::SetOrder ( unsigned int i ) [inline]

sets the order of polynom to i new generated coefficients are 0

Author:
Marcel Lilienthal

Definition at line 76 of file Polynom.hh.

References order_, and poly_.

Referenced by BIAS::operator+(), operator+=(), BIAS::operator-(), and operator-=().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::Polynom::order_ [protected]

Definition at line 111 of file Polynom.hh.

Referenced by GetOrder(), operator *=(), operator+=(), operator-=(), operator=(), operator==(), operator[](), Polynom(), and SetOrder().

std::vector<double> BIAS::Polynom::poly_ [protected]

Definition at line 110 of file Polynom.hh.

Referenced by operator *=(), operator+=(), operator-=(), operator=(), operator==(), operator[](), Polynom(), and SetOrder().

The documentation for this class was generated from the following file:
  • Base/Math/Polynom.hh
Generated on Wed Jun 21 19:09:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PolynomialSolve Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PolynomialSolve

BIAS::PolynomialSolve Class Reference
[Algorithms]

base class for solving polynomial equations More...

#include <MathAlgo/PolynomialSolve.hh>

Inheritance diagram for BIAS::PolynomialSolve:

[legend]
Collaboration diagram for BIAS::PolynomialSolve:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | Analytic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solves polynomial of arbitrary order n<=3 analytically coeff[n]x^n+.
int | Analytic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solves polynomial of arbitrary order n<=4 analytically coeff[n]x^n+.
void | CalCoefficients (const std::vector< POLYNOMIALSOLVE_TYPE > &sol, std::vector< POLYNOMIALSOLVE_TYPE > &coeff)
helper function, calulates the coefficients from the solutions
void | CheckCoefficients (std::vector< POLYNOMIALSOLVE_TYPE > &coeff, double eps=DBL_EPSILON)
removes leading zeros in coefficients
int | Cubic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solve a polynomial of degree 1 coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[3] != 0.0 is asserted returns the number of real solutions
int | Cubic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solve a polynomial of degree 1 coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[3] != 0.0 is asserted returns the number of real solutions
bool | DebugLevelIsSet (long int lv) const
POLYNOMIALSOLVE_TYPE | EvaluatePolynomial (const POLYNOMIALSOLVE_TYPE x, const std::vector< POLYNOMIALSOLVE_TYPE > &coeff)
numerically robust way to evaluate a polynomial at position x, same principle as in gsl_poly_eval
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetNumberOfRealSolutions (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff)
determine number of real solutions of polynomial
bool | HasRealSolution (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff)
determine whether the polynomial has a solution in IR
int | Linear (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solve a polynomial of degree 1 coeff[1]*x+coeff[0]=0 coeff[1] != 0.0 is asserted returns the number of complex solutions (always 1)
int | Linear (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solve a polynomial of degree 1 coeff[1]*x+coeff[0]=0 coeff[1] != 0.0 is asserted returns the number of real solutions (always 1)
int | NonLinearRefine (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
does a non linear refinement using Powel from minpack for real roots (non imaginary) only
int | Numeric (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solves polynomial of arbitrary order n numerically coeff[n]x^n+.
int | Numeric (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solves polynomial of arbitrary order n numerically coeff[n]x^n+.
PolynomialSolve ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | Quadratic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solve a polynomial of degree 2 coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[2] != 0.0 is asserted returns the number of complex solutions (alway 2)
int | Quadratic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solve a polynomial of degree 2 coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[2] != 0.0 is asserted returns the number of real solutions (0, 1 or 2)
int | Quartic (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solve a polynomial of degree 1 coeff[4]*x^4+coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[4] != 0.0 is asserted returns the number of real solutions
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | Solve (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol)
solve polynomial of arbitrary order n coeff[n]x^n+.
int | Solve (const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol)
solve polynomial of arbitrary order n coeff[n]x^n+.
~PolynomialSolve ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

POLYNOMIALSOLVE_TYPE | _GetCoeff (int order, int b, const std::vector< POLYNOMIALSOLVE_TYPE > &sol)
helper function for CalCoefficients

Protected Attributes

long int | _liDebugLevel

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

base class for solving polynomial equations

Author:
koeser 10/2003, woelk 08/2004

Definition at line 50 of file PolynomialSolve.hh.

Constructor & Destructor Documentation

BIAS::PolynomialSolve::PolynomialSolve ( ) [inline]

Definition at line 54 of file PolynomialSolve.hh.

BIAS::PolynomialSolve::~PolynomialSolve ( ) [inline]

Definition at line 55 of file PolynomialSolve.hh.

Member Function Documentation

POLYNOMIALSOLVE_TYPE BIAS::PolynomialSolve::_GetCoeff | ( | int | order,
 |  | int | b,
 |  | const std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) | [protected]

helper function for CalCoefficients

Author:
woelk 08/2004

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int BIAS::PolynomialSolve::Analytic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solves polynomial of arbitrary order n<=3 analytically coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted.

Returns:
number of complex solutions, negative value on error
Author:
woelk 08/2004 untested

int BIAS::PolynomialSolve::Analytic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solves polynomial of arbitrary order n<=4 analytically coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted.

Returns:
number of real solutions, negative value on error
Author:
woelk 08/2004 untested

Referenced by main().

void BIAS::PolynomialSolve::CalCoefficients | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | sol,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | coeff
 | ) |

helper function, calulates the coefficients from the solutions

Author:
woelk 08/2004

Referenced by main().

void BIAS::PolynomialSolve::CheckCoefficients | ( | std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | double | eps = DBL_EPSILON
 | ) |

removes leading zeros in coefficients

Author:
woelk 08/2004

Referenced by BIAS::Triangulation::CorrectCorrespondences(), and BIAS::Conic2D::IntersectsCircle().

int BIAS::PolynomialSolve::Cubic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solve a polynomial of degree 1 coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[3] != 0.0 is asserted returns the number of real solutions

Author:
woelk 08/2004

int BIAS::PolynomialSolve::Cubic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solve a polynomial of degree 1 coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[3] != 0.0 is asserted returns the number of real solutions

Author:
koeser, woelk 08/2004

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

POLYNOMIALSOLVE_TYPE BIAS::PolynomialSolve::EvaluatePolynomial | ( | const POLYNOMIALSOLVE_TYPE | x,
 |  | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff
 | ) | [inline]

numerically robust way to evaluate a polynomial at position x, same principle as in gsl_poly_eval

Author:
koeser

Definition at line 201 of file PolynomialSolve.hh.

References POLYNOMIALSOLVE_TYPE.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::PolynomialSolve::GetNumberOfRealSolutions ( const std::vector< POLYNOMIALSOLVE_TYPE > & coeff )

determine number of real solutions of polynomial

bool BIAS::PolynomialSolve::HasRealSolution ( const std::vector< POLYNOMIALSOLVE_TYPE > & coeff ) [inline]

determine whether the polynomial has a solution in IR

Definition at line 179 of file PolynomialSolve.hh.

Referenced by BIAS::Conic2D::IntersectsCircle().

int BIAS::PolynomialSolve::Linear | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solve a polynomial of degree 1 coeff[1]*x+coeff[0]=0 coeff[1] != 0.0 is asserted returns the number of complex solutions (always 1)

Author:
woelk 08/2004

int BIAS::PolynomialSolve::Linear | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solve a polynomial of degree 1 coeff[1]*x+coeff[0]=0 coeff[1] != 0.0 is asserted returns the number of real solutions (always 1)

Author:
koeser, woelk 08/2004

int BIAS::PolynomialSolve::NonLinearRefine | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

does a non linear refinement using Powel from minpack for real roots (non imaginary) only

Author:
woelk, koeser 08/2004

Referenced by BIAS::Triangulation::CorrectCorrespondences().

int BIAS::PolynomialSolve::Numeric | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solves polynomial of arbitrary order n numerically coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted.

Returns:
number of complex solutions, negative value on error
Author:
woelk 08/2004 untested

int BIAS::PolynomialSolve::Numeric | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solves polynomial of arbitrary order n numerically coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted.

Returns:
number of real solutions, negative value on error
Author:
woelk 08/2004 untested

Referenced by BIAS::Triangulation::CorrectCorrespondences(), and main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int BIAS::PolynomialSolve::Quadratic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solve a polynomial of degree 2 coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[2] != 0.0 is asserted returns the number of complex solutions (alway 2)

Author:
woelk 08/2004

int BIAS::PolynomialSolve::Quadratic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solve a polynomial of degree 2 coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[2] != 0.0 is asserted returns the number of real solutions (0, 1 or 2)

Author:
koeser, woelk 08/2004

int BIAS::PolynomialSolve::Quartic | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solve a polynomial of degree 1 coeff[4]*x^4+coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0 coeff[4] != 0.0 is asserted returns the number of real solutions

Author:
koeser, woelk 08/2004

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int BIAS::PolynomialSolve::Solve | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > & | sol
 | ) |

solve polynomial of arbitrary order n coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted. Uses analytical solution if n<=3

Returns:
number of solutions, negative value on error
Author:
woelk 08/2004 untested

int BIAS::PolynomialSolve::Solve | ( | const std::vector< POLYNOMIALSOLVE_TYPE > & | coeff,
 |  | std::vector< POLYNOMIALSOLVE_TYPE > & | sol
 | ) |

solve polynomial of arbitrary order n coeff[n]x^n+.

..+coeff[2]x^2+coeff[1]x+coeff[0]=0 coeff[n]!=0.0 is asserted Uses analytical solution if n<=4

Returns:
number of real solutions, negative value on error
Author:
koeser, woelk 08/2004 untested

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following file:
  • MathAlgo/PolynomialSolve.hh
Generated on Wed Jun 21 19:09:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Pose Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Pose

BIAS::Pose Class Reference

Container for 3D pose, parametrized as euclidean center and quaternion orientation. More...

#include <Geometry/Pose.hh>

Inheritance diagram for BIAS::Pose:

[legend]
Collaboration diagram for BIAS::Pose:

[legend]
List of all members.

Public Member Functions

void | ConcatenateLocalTransform (const CoordinateTransform3D &localT, CoordinateTransform3D &res) const
Calculates transformation from global system of this to local system of argument transformation.
const Vector3< double > & | GetC () const
Matrix< POSE_TYPE > | GetCov () const
returns the 7x7 covariance matrix
const Matrix< POSE_TYPE > & | GetCovariance () const
Matrix3x3< POSE_TYPE > | GetCovC ()
Only to use for projective P's which are not decomposable! Invalidates the pose vector and the covariance.
Matrix4x4< POSE_TYPE > | GetCovQ ()
const Vector< double > | GetCQ () const
Matrix4x4< double > | GetGlobalToLocalTransform () const
Matrix4x4< double > | GetLocalToGlobalTransform () const
Matrix3x4< double > | GetMatrix3x4 () const
get matrix, which transforms points in global coordinate system to points in local coordinate system
PoseParametrization | GetPoseParameters () const
const Quaternion< double > & | GetQ () const
BIAS::RMatrixBase | GetR () const
void | GlobalToLocal (HomgPoint3D &X_G, HomgPoint3DCov &Cov_G) const
HomgPoint3D | GlobalToLocal (const HomgPoint3D &X_G) const
void InvertIP ()
Swapps the meaning of global and local.
bool | Load (const std::string &inputFile)
method to load directly from a given filename.
void | LocalToGlobal (HomgPoint3D &X_L, HomgPoint3DCov &Cov_L) const
HomgPoint3D | LocalToGlobal (const HomgPoint3D &X_L) const
const Pose & | operator= (const Pose &p)
Pose ()
bool | Save (const std::string &outputFile)
void | Set (const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0)
Define local coordinate frame from within the world frame.
void | Set (const Quaternion< POSE_TYPE > &Q, const Vector3< POSE_TYPE > &C, const Matrix< POSE_TYPE > &cov)
void | Set (const Quaternion< POSE_TYPE > &Q, const Vector3< POSE_TYPE > &C)
int | Set (const PoseParametrization &pose)
void | SetC (const Vector3< double > &C)
sets origin of local coordinate system in global coordinates
void | SetC (const Vector3< POSE_TYPE > &C)
void | SetC (const HomgPoint3D &C, const HomgPoint3DCov &cov)
void | SetC (const Vector3< POSE_TYPE > &C, const Matrix3x3< POSE_TYPE > &cov)
int | SetCovariance (const Matrix< POSE_TYPE > &c)
int | SetCovEuclidian (Matrix< POSE_TYPE > Cov)
Set internal covariance fron an Euclidian covariance matrix Elements 0,1,2 are C, Elements 3,4,5 are rotation angles.
void | SetFromMatrix3x4 (const Matrix3x4< double > &M)
use matrix, which transforms points in global coordinate system to points in local coordinate system (like pmatrix )
void | SetQ (const Quaternion< double > &Q)
void | SetQ (const Quaternion< POSE_TYPE > &Q)
void | SetQ (const Quaternion< POSE_TYPE > &Q, const Matrix4x4< POSE_TYPE > &cov)
void | SetR (const BIAS::RMatrixBase &R)
Sets the upper 3x3 matrix accordingly (copies values).
void Talk ()
Prints Transformation together with more intutive rotation representations.
void | TransformToNewGlobalBy (const CoordinateTransform3D &trsf)
Transforms the position and orientation stored in the pose into another global coordinate system.
~Pose ()

Protected Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Protected Member Functions

void | Add (const double &scalar, Matrix< double > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< double > &arg)
Adds arg to this.
void | AddIP (const double &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void | copy (const T *v)
void destroy ()
double | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const double &scalar, Matrix< double > &dest) const
division function, storing data destination matrix
void | DivideIP (const double &scalar)
in place division function
void | Fill (const double &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< double > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
double * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
double ** | GetDataArray () const
returns zero based arry for data access
double ** | GetDataArray1 () const
returns 1 based array to data access
double * | GetDataLast () const
Get a pointer to the last data element.
double | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (double &max, double &min) const
return biggest and smallest entry
double | GetMean () const
Returns the mean value of the matrix elements.
double | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< double > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< double > &dest) const
compute square system matrix dest = A^T * A
void | initialize (Subscript M, Subscript N)
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
Matrix (const TNT::Matrix< double > &A)
Matrix (const Matrix< double > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const doublevalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< double > &R, const Vector3< double > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< double > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< double > &arg)
Matrix4x4 (const Matrix4x4< double > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< double > &arg, Vector< double > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< double > &arg, Matrix< double > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< double > &argvec, Vector4< double > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const double &scalar, Matrix< double > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const double &scalar)
in place multiplication function
void | MultLeft (const Vector< double > &arg, Vector< double > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< double > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
double | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
double | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
double | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, doublescale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, doublescale)
Scales row NoRow with scale.
void | set (const T &val)
void | SetCol (const int row, const Vector< double > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< double > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const double &scalar, Matrix< double > &dest) const
substraction function, storing data destination matrix
void | SubIP (const double &scalar)
in place subtraction function
void | SubIP (const Matrix< double > &arg)
Subtracts arg from this
this -= arg.
double | Trace () const
Matrix< double > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15
void UpdateMatrix_ ()
computes the 4x4 matrix

Protected Attributes

Vector3< double > | C_
the translation between the systems
Matrix< POSE_TYPE > | Cov_
Matrix4x4< double > | invTransform_
matrix representation of inverse transform (LocalToGlobalTranform)
Subscript m_
Subscript mn_
Subscript n_
Quaternion< double > | Q_
this is the rotation between the systems
T ** row_
T ** rowm1_
double | scale_
the scale between the systems ||vec1Global|| * scale_ = ||vec1Local||
T * v_
T * vm1_

Friends

std::ostream & | operator<< (std::ostream &os, const CoordinateTransform3D &p)
std::istream & | operator>> (std::istream &is, CoordinateTransform3D &p)
std::istream & | operator>> (std::istream &is, Pose &p)

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

Container for 3D pose, parametrized as euclidean center and quaternion orientation.

Special coordinate transformation that can also be interpreted as measureable entity. Meaning: a (camera) pose is measured in the coordinate system A. In A the pose will define the transformation from coordinate in A to the pose (camera) coordinate system. This transformation does not contain scale. Imagine A beeing embedded in another coordinate system B. In order to find the pose in B the method TransformBy() can be used. The result will not be able to transform coordinates from A into the pose system. This transform can be found using the method CoordinateTransform3D::ConcatenateLocalTransform() on a pose object.

Author:
woelk/koeser/bartczak 03/2006

Definition at line 60 of file Pose.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::Pose::Pose ( )

Definition at line 33 of file Pose.cpp.

BIAS::Pose::~Pose ( )

Definition at line 39 of file Pose.cpp.

Member Function Documentation

void BIAS::Matrix< double >::Add | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::AddIP ( const Matrix< double > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< double >::AddIP ( const double & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< double >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< double >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void CoordinateTransform3D::ConcatenateLocalTransform | ( | const CoordinateTransform3D & | localT,
 |  | CoordinateTransform3D & | res
 | ) | const [inherited]

Calculates transformation from global system of this to local system of argument transformation.

if this defines [global <-> local] and argument (localT) defines [local <-> local(2)]. the res then defines [global <-> local(2)].

Definition at line 129 of file CoordinateTransform3D.cpp.

References BIAS::CoordinateTransform3D::C_, BIAS::Quaternion< QUAT_TYPE >::MultVec(), BIAS::CoordinateTransform3D::Q_, BIAS::CoordinateTransform3D::scale_, and BIAS::CoordinateTransform3D::Set().

Referenced by TransformToNewGlobalBy().

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

double BIAS::Matrix4x4< double >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< double >::Divide | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::DivideIP ( const double & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< double >::Fill ( const double & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

const Vector3<double>& BIAS::CoordinateTransform3D::GetC ( ) const [inline, inherited]

Definition at line 174 of file CoordinateTransform3D.hh.

Referenced by TransformToNewGlobalBy().

Vector<double > BIAS::Matrix< double >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Matrix<POSE_TYPE> BIAS::Pose::GetCov ( ) const [inline]

returns the 7x7 covariance matrix

Definition at line 96 of file Pose.hh.

References Cov_.

const Matrix<POSE_TYPE>& BIAS::Pose::GetCovariance ( ) const [inline]

Definition at line 128 of file Pose.hh.

References Cov_.

Matrix3x3< POSE_TYPE > BIAS::Pose::GetCovC ( )

Only to use for projective P's which are not decomposable! Invalidates the pose vector and the covariance.

Definition at line 45 of file Pose.cpp.

References Cov_.

Matrix4x4< POSE_TYPE > BIAS::Pose::GetCovQ ( )

Definition at line 58 of file Pose.cpp.

References Cov_.

const Vector<double> BIAS::CoordinateTransform3D::GetCQ ( ) const [inline, inherited]

Definition at line 176 of file CoordinateTransform3D.hh.

References res.

double * BIAS::Matrix< double >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

Referenced by BIAS::EuclideanTransf3D::Set().

double ** BIAS::Matrix< double >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

double ** BIAS::Matrix< double >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

double * BIAS::Matrix< double >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Matrix4x4<double> BIAS::CoordinateTransform3D::GetGlobalToLocalTransform ( ) const [inline, inherited]

Definition at line 191 of file CoordinateTransform3D.hh.

Matrix4x4<double> BIAS::CoordinateTransform3D::GetLocalToGlobalTransform ( ) const [inline, inherited]

Definition at line 194 of file CoordinateTransform3D.hh.

BIAS::Matrix3x4< double > CoordinateTransform3D::GetMatrix3x4 ( ) const [inherited]

get matrix, which transforms points in global coordinate system to points in local coordinate system

Definition at line 85 of file CoordinateTransform3D.cpp.

Referenced by BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::Matrix< double >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< double >::GetMaxMin | ( | double & | max,
 |  | double & | min
 | ) | const [inherited]

return biggest and smallest entry

double BIAS::Matrix< double >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

double BIAS::Matrix< double >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< double >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

PoseParametrization BIAS::Pose::GetPoseParameters ( ) const [inline]

Definition at line 86 of file Pose.hh.

References BIAS::CoordinateTransform3D::C_, Cov_, BIAS::CoordinateTransform3D::Q_, res, BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrization::SetOrientation(), and BIAS::PoseParametrization::SetPosition().

const Quaternion<double>& BIAS::CoordinateTransform3D::GetQ ( ) const [inline, inherited]

Definition at line 172 of file CoordinateTransform3D.hh.

Referenced by TransformToNewGlobalBy().

BIAS::RMatrixBase BIAS::CoordinateTransform3D::GetR ( ) const [inline, inherited]

Definition at line 185 of file CoordinateTransform3D.hh.

References R, and BIAS::RMatrixBase::SetFromQuaternion().

Vector<double > BIAS::Matrix< double >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< double >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< double >::GetSystemMatrix ( Matrix< double > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

void BIAS::CoordinateTransform3D::GlobalToLocal | ( | HomgPoint3D & | X_G,
 |  | HomgPoint3DCov & | Cov_G
 | ) | const [inline, inherited]

Definition at line 158 of file CoordinateTransform3D.hh.

HomgPoint3D BIAS::CoordinateTransform3D::GlobalToLocal ( const HomgPoint3D & X_G ) const [inline, inherited]

Definition at line 146 of file CoordinateTransform3D.hh.

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::CoordinateTransform3D::InvertIP ( ) [inline, inherited]

Swapps the meaning of global and local.

Definition at line 217 of file CoordinateTransform3D.hh.

bool BIAS::Matrix< double >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

Definition at line 429 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

bool BIAS::Matrix< double >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

Definition at line 401 of file Matrix.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Pose::Load ( const std::string & inputFile )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

Reimplemented from BIAS::CoordinateTransform3D.

Definition at line 128 of file Pose.cpp.

References BIASERR, BIAS::CoordinateTransform3D::Load(), res, and BIAS::CoordinateTransform3D::scale_.

void BIAS::CoordinateTransform3D::LocalToGlobal | ( | HomgPoint3D & | X_L,
 |  | HomgPoint3DCov & | Cov_L
 | ) | const [inline, inherited]

Definition at line 165 of file CoordinateTransform3D.hh.

References BIAS::Matrix< T >::Transpose().

HomgPoint3D BIAS::CoordinateTransform3D::LocalToGlobal ( const HomgPoint3D & X_L ) const [inline, inherited]

Definition at line 152 of file CoordinateTransform3D.hh.

BIAS::Matrix< double >::Matrix ( const TNT::Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( const Matrix< double > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const double | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< double >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< double >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const Matrix3x3< double > & | R,
 |  | const Vector3< double > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< double >::Matrix4x4 ( const TNT::Matrix< double > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix< double > & arg ) [inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const Matrix4x4< double > & A ) [inline, inherited]

BIAS::Matrix4x4< double >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< double >::Matrix4x4 | ( | const double | a0,
 |  | const double | a1,
 |  | const double | a2,
 |  | const double | a3,
 |  | const double | a4,
 |  | const double | a5,
 |  | const double | a6,
 |  | const double | a7,
 |  | const double | a8,
 |  | const double | a9,
 |  | const double | a10,
 |  | const double | a11,
 |  | const double | a12,
 |  | const double | a13,
 |  | const double | a14,
 |  | const double | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< double >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< double >::Mult | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< double >::Mult ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< double >::Mult | ( | const Matrix< double > & | arg,
 |  | Matrix< double > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< double >::Mult | ( | const Matrix4x4< double > & | argmat,
 |  | Matrix4x4< double > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< double >::Mult | ( | const Vector4< double > & | argvec,
 |  | Vector4< double > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< double >::Multiply | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::MultiplyIP ( const double & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< double >::MultLeft | ( | const Vector< double > & | arg,
 |  | Vector< double > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< double >::MultLeft ( const Matrix< double > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< double >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

double BIAS::Matrix< double >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< double >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< double >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< double >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

double BIAS::Matrix< double >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

double BIAS::Matrix< double >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Matrix< double >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

const Pose& BIAS::Pose::operator= ( const Pose & p ) [inline]

Definition at line 123 of file Pose.hh.

References BIAS::CoordinateTransform3D::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< double >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

bool CoordinateTransform3D::Save ( const std::string & outputFile ) [inherited]

Definition at line 113 of file CoordinateTransform3D.cpp.

void BIAS::Matrix< double >::ScaleCol | ( | int | NoCol,
 |  | double | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< double >::ScaleRow | ( | int | NoRow,
 |  | double | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::CoordinateTransform3D::Set | ( | const Quaternion< double > & | Q,
 |  | const Vector3< double > & | C,
 |  | const double & | scale = 1.0
 | ) | [inline, inherited]

Define local coordinate frame from within the world frame.

Parameters:
[in] | Q | Tells the orientation of the local frame in the world frame base: Q*(global base vecor)*Q_conj = local base vector.
[in] | C | Tells the position of th origin of the local frame in the world coordinate frame: global base origin + C_ = local base origin.
[in] | scale | Is the isotropic scale of base vector length to get local base vector length: ||global base vector||*scale = ||local base vector||.

Definition at line 140 of file CoordinateTransform3D.hh.

Referenced by BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), and Set().

void BIAS::Pose::Set | ( | const Quaternion< POSE_TYPE > & | Q,
 |  | const Vector3< POSE_TYPE > & | C,
 |  | const Matrix< POSE_TYPE > & | cov
 | ) |

Definition at line 119 of file Pose.cpp.

References Set(), and SetCovariance().

void BIAS::Pose::Set | ( | const Quaternion< POSE_TYPE > & | Q,
 |  | const Vector3< POSE_TYPE > & | C
 | ) |

Definition at line 85 of file Pose.cpp.

References Cov_, BIAS::CoordinateTransform3D::Set(), and BIAS::Matrix< T >::SetZero().

int BIAS::Pose::Set ( const PoseParametrization & pose )

Definition at line 108 of file Pose.cpp.

References BIAS::PoseParametrization::GetCovarianceMatrix(), BIAS::PoseParametrization::GetOrientation(), BIAS::PoseParametrization::GetPosition(), and SetCovariance().

Referenced by Set(), TransformToNewGlobalBy(), and BIAS::ProjectionParametersBase::XMLIn().

void BIAS::CoordinateTransform3D::SetC ( const Vector3< double > & C ) [inline, inherited]

sets origin of local coordinate system in global coordinates

Definition at line 127 of file CoordinateTransform3D.hh.

Referenced by SetC().

void BIAS::Pose::SetC ( const Vector3< POSE_TYPE > & C )

Definition at line 78 of file Pose.cpp.

References Cov_, BIAS::CoordinateTransform3D::SetC(), and BIAS::Matrix< T >::SetZero().

void BIAS::Pose::SetC | ( | const HomgPoint3D & | C,
 |  | const HomgPoint3DCov & | cov
 | ) |

void BIAS::Pose::SetC | ( | const Vector3< POSE_TYPE > & | C,
 |  | const Matrix3x3< POSE_TYPE > & | cov
 | ) |

Referenced by BIAS::PMDImageProc::PoseFromMeta().

void BIAS::Matrix< double >::SetCol | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

int BIAS::Pose::SetCovariance ( const Matrix< POSE_TYPE > & c ) [inline]

Definition at line 132 of file Pose.hh.

References BIASERR, Cov_, BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), and BIAS::Matrix< T >::SetZero().

Referenced by Set().

int BIAS::Pose::SetCovEuclidian ( Matrix< POSE_TYPE > Cov )

Set internal covariance fron an Euclidian covariance matrix Elements 0,1,2 are C, Elements 3,4,5 are rotation angles.

Definition at line 93 of file Pose.cpp.

References BIASERR, BIAS::Matrix< T >::GetCols(), and BIAS::Matrix< T >::GetRows().

void CoordinateTransform3D::SetFromMatrix3x4 ( const Matrix3x4< double > & M ) [inherited]

use matrix, which transforms points in global coordinate system to points in local coordinate system (like pmatrix )

Attention:
use only for matrices that cannot be decomposed properly, otherwise use Set method!

Definition at line 63 of file CoordinateTransform3D.cpp.

References BIAS::CoordinateTransform3D::C_, BIAS::SVD::Invert(), BIAS::CoordinateTransform3D::invTransform_, BIAS::CoordinateTransform3D::Q_, BIAS::CoordinateTransform3D::scale_, BIAS::Vector3< T >::Set(), BIAS::Vector4< T >::Set(), BIAS::Matrix4x4< T >::SetIdentity(), and BIAS::Matrix4x4< double >::SetIdentity().

void BIAS::Matrix4x4< double >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< double >.

Definition at line 261 of file Matrix4x4.hh.

Referenced by BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

void BIAS::CoordinateTransform3D::SetQ ( const Quaternion< double > & Q ) [inline, inherited]

Definition at line 120 of file CoordinateTransform3D.hh.

Referenced by SetQ().

void BIAS::Pose::SetQ ( const Quaternion< POSE_TYPE > & Q )

Definition at line 71 of file Pose.cpp.

References Cov_, BIAS::CoordinateTransform3D::SetQ(), and BIAS::Matrix< T >::SetZero().

void BIAS::Pose::SetQ | ( | const Quaternion< POSE_TYPE > & | Q,
 |  | const Matrix4x4< POSE_TYPE > & | cov
 | ) |

Referenced by BIAS::PMDImageProc::PoseFromMeta().

void CoordinateTransform3D::SetR ( const BIAS::RMatrixBase & R ) [inherited]

Sets the upper 3x3 matrix accordingly (copies values).

Definition at line 164 of file CoordinateTransform3D.cpp.

References BIASABORT, BIASERR, BIAS::RMatrixBase::GetQuaternion(), BIAS::CoordinateTransform3D::Q_, and r.

void BIAS::Matrix< double >::SetRow | ( | const int | row,
 |  | const Vector< double > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< double >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Referenced by BIAS::HomgPoint3DCov::SetEuclidean(), and BIAS::HomgPoint2DCov::SetEuclidean().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< double >::Sub | ( | const double & | scalar,
 |  | Matrix< double > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< double >::SubIP ( const double & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< double >::SubIP ( const Matrix< double > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

void CoordinateTransform3D::Talk ( ) [inherited]

Prints Transformation together with more intutive rotation representations.

Definition at line 146 of file CoordinateTransform3D.cpp.

References BIAS::RMatrixBase::GetRotationAxisAngle(), BIAS::CoordinateTransform3D::Q_, R, and BIAS::RMatrixBase::SetFromQuaternion().

double BIAS::Matrix< double >::Trace ( ) const [inline, inherited]

Author:
koeser

Reimplemented in BIAS::Matrix3x3< double >.

void BIAS::Pose::TransformToNewGlobalBy ( const CoordinateTransform3D & trsf )

Transforms the position and orientation stored in the pose into another global coordinate system.

Definition at line 139 of file Pose.cpp.

References BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), BIAS::CoordinateTransform3D::GetC(), BIAS::CoordinateTransform3D::GetQ(), and Set().

Matrix<double > BIAS::Matrix< double >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Reimplemented in BIAS::Matrix3x3< double >.

void BIAS::Matrix4x4< double >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

void CoordinateTransform3D::UpdateMatrix_ ( ) [protected, inherited]

computes the 4x4 matrix

Definition at line 37 of file CoordinateTransform3D.cpp.

References BIAS::CoordinateTransform3D::C_, BIAS::CoordinateTransform3D::invTransform_, BIAS::CoordinateTransform3D::Q_, R, BIAS::CoordinateTransform3D::scale_, BIAS::RMatrixBase::SetFromQuaternion(), BIAS::Matrix4x4< T >::SetIdentity(), BIAS::Matrix4x4< double >::SetIdentity(), and BIAS::Matrix3x3< T >::Transpose().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const CoordinateTransform3D & | p
 | ) | [friend, inherited]

Definition at line 251 of file CoordinateTransform3D.hh.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

std::istream& operator>> | ( | std::istream & | is,
 |  | CoordinateTransform3D & | p
 | ) | [friend, inherited]

Definition at line 257 of file CoordinateTransform3D.hh.

std::istream& operator>> | ( | std::istream & | is,
 |  | Pose & | p
 | ) | [friend]

Definition at line 155 of file Pose.hh.

Member Data Documentation

Vector3<double> BIAS::CoordinateTransform3D::C_ [protected, inherited]

the translation between the systems

Definition at line 236 of file CoordinateTransform3D.hh.

Referenced by BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), GetPoseParameters(), BIAS::operator<<(), BIAS::CoordinateTransform3D::operator=(), BIAS::operator>>(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

Matrix<POSE_TYPE> BIAS::Pose::Cov_ [protected]

Definition at line 151 of file Pose.hh.

Referenced by GetCov(), GetCovariance(), GetCovC(), GetCovQ(), GetPoseParameters(), Set(), SetC(), SetCovariance(), and SetQ().

Matrix4x4<double> BIAS::CoordinateTransform3D::invTransform_ [protected, inherited]

matrix representation of inverse transform (LocalToGlobalTranform)

Definition at line 248 of file CoordinateTransform3D.hh.

Referenced by BIAS::CoordinateTransform3D::operator=(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

Quaternion<double> BIAS::CoordinateTransform3D::Q_ [protected, inherited]

this is the rotation between the systems

Definition at line 233 of file CoordinateTransform3D.hh.

Referenced by BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), GetPoseParameters(), BIAS::operator<<(), BIAS::CoordinateTransform3D::operator=(), BIAS::operator>>(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), BIAS::CoordinateTransform3D::SetR(), BIAS::CoordinateTransform3D::Talk(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

double BIAS::CoordinateTransform3D::scale_ [protected, inherited]

the scale between the systems ||vec1Global|| * scale_ = ||vec1Local||

Definition at line 241 of file CoordinateTransform3D.hh.

Referenced by BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), Load(), BIAS::operator<<(), BIAS::CoordinateTransform3D::operator=(), BIAS::operator>>(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/Pose.hh
  • Geometry/Pose.cpp
Generated on Wed Jun 21 19:09:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PoseParametrization Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PoseParametrization

BIAS::PoseParametrization Class Reference

Slim class bundeling pose parametrization and associated covariance matrix. More...

#include <Base/Geometry/PoseParametrization.hh>

Collaboration diagram for BIAS::PoseParametrization:

[legend]
List of all members.

Public Member Functions

const Matrix< PP_TYPE > & | GetCovarianceMatrix () const
returns the covariance matrix associated with the CQ vector
const Vector< PP_TYPE > & | GetCQ () const
returns a vector of dimension 7 where first 3 entries are the position and the last 4 entries are the quaternion orientation
Quaternion< PP_TYPE > | GetOrientation () const
returns the quaternion (last 4 entries) part of the pose parametrization vector
Vector3< PP_TYPE > | GetPosition () const
returns the position (first 3 entries) part of the pose parametrization vector
bool | Load (const std::string &file)
PoseParametrization (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance)
PoseParametrization (const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &covariance)
PoseParametrization ()
bool | Save (const std::string &file) const
void | Set (const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &Cov)
void | Set (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance)
Set this from position, orientation and covariance.
void | SetCovarianceMatrix (const Matrix< PP_TYPE > &Cov)
Sets covariance matrix from Cov.
void | SetCQ (const Vector< PP_TYPE > &CQvec)
Set this from pose parametrization and zeros associated covarinace matrix.
void | SetOrientation (const Quaternion< PP_TYPE > &q)
set orientation part of vector and zero covariance matrix
void | SetPosition (const Vector3< PP_TYPE > &C)
set position part of vector and zero covariance matrix
void | Transform (const Vector3< double > &T, const Quaternion< double > &q)
Transforms the pose and associated covariance according to the point transformation parametrized as translation T and rotation Q.
void | Transform (const Matrix4x4< PP_TYPE > &T)
Transfroms the pose and associated covariance according to the point transformation T.

Protected Member Functions

void | CQ2Pose_ (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, Vector< PP_TYPE > &pose) const
void | Pose2CQ_ (const Vector< PP_TYPE > &pose, Vector3< PP_TYPE > &position, Quaternion< PP_TYPE > &orientation) const

Protected Attributes

Matrix< PP_TYPE > | Cov_
first columns relate to position
Vector< PP_TYPE > | Pose_
first 3 entries relate to the position

Detailed Description

Slim class bundeling pose parametrization and associated covariance matrix.

The pose is parametrized as vector of dimension 7 where the first 3 entries represent the position (euclidean vector of dimension 3) and the last 4 entries represent the quaternion orientation.

Author:
bartczak/woelk e.a. 04/2006

Definition at line 53 of file PoseParametrization.hh.

Constructor & Destructor Documentation

PoseParametrization::PoseParametrization ( )

Definition at line 13 of file PoseParametrization.cpp.

References Pose_, and BIAS::Vector< T >::SetZero().

PoseParametrization::PoseParametrization | ( | const Vector< PP_TYPE > & | CQvec,
 |  | const Matrix< PP_TYPE > & | covariance
 | ) |

Definition at line 21 of file PoseParametrization.cpp.

References Set().

PoseParametrization::PoseParametrization | ( | const Vector3< PP_TYPE > & | position,
 |  | const Quaternion< PP_TYPE > & | orientation,
 |  | const Matrix< PP_TYPE > & | covariance
 | ) |

Definition at line 29 of file PoseParametrization.cpp.

References Set().

Member Function Documentation

void BIAS::PoseParametrization::CQ2Pose_ | ( | const Vector3< PP_TYPE > & | position,
 |  | const Quaternion< PP_TYPE > & | orientation,
 |  | Vector< PP_TYPE > & | pose
 | ) | const [inline, protected]

Definition at line 136 of file PoseParametrization.hh.

Referenced by Set().

const Matrix<PP_TYPE>& BIAS::PoseParametrization::GetCovarianceMatrix ( ) const [inline]

returns the covariance matrix associated with the CQ vector

Definition at line 87 of file PoseParametrization.hh.

Referenced by BIAS::operator<<(), BIAS::Pose::Set(), and Transform().

const Vector<PP_TYPE>& BIAS::PoseParametrization::GetCQ ( ) const [inline]

returns a vector of dimension 7 where first 3 entries are the position and the last 4 entries are the quaternion orientation

Definition at line 83 of file PoseParametrization.hh.

Quaternion< PP_TYPE > PoseParametrization::GetOrientation ( ) const

returns the quaternion (last 4 entries) part of the pose parametrization vector

Definition at line 80 of file PoseParametrization.cpp.

References Pose2CQ_(), and Pose_.

Referenced by BIAS::operator<<(), BIAS::Projection3DData::Set(), BIAS::Pose::Set(), and BIAS::PoseParametrizationCovariance::Transform().

Vector3< PP_TYPE > PoseParametrization::GetPosition ( ) const

returns the position (first 3 entries) part of the pose parametrization vector

Definition at line 70 of file PoseParametrization.cpp.

References Pose2CQ_(), and Pose_.

Referenced by BIAS::operator<<(), BIAS::Projection3DData::Set(), and BIAS::Pose::Set().

bool PoseParametrization::Load ( const std::string & file )

Definition at line 111 of file PoseParametrization.cpp.

void BIAS::PoseParametrization::Pose2CQ_ | ( | const Vector< PP_TYPE > & | pose,
 |  | Vector3< PP_TYPE > & | position,
 |  | Quaternion< PP_TYPE > & | orientation
 | ) | const [inline, protected]

Definition at line 125 of file PoseParametrization.hh.

Referenced by GetOrientation(), and GetPosition().

bool PoseParametrization::Save ( const std::string & file ) const

Definition at line 127 of file PoseParametrization.cpp.

void BIAS::PoseParametrization::Set | ( | const Vector< PP_TYPE > & | CQvec,
 |  | const Matrix< PP_TYPE > & | Cov
 | ) | [inline]

Definition at line 74 of file PoseParametrization.hh.

void PoseParametrization::Set | ( | const Vector3< PP_TYPE > & | position,
 |  | const Quaternion< PP_TYPE > & | orientation,
 |  | const Matrix< PP_TYPE > & | covariance
 | ) |

Set this from position, orientation and covariance.

Definition at line 38 of file PoseParametrization.cpp.

References CQ2Pose_().

Referenced by BIAS::operator>>(), and PoseParametrization().

void PoseParametrization::SetCovarianceMatrix ( const Matrix< PP_TYPE > & Cov )

Sets covariance matrix from Cov.

Cov must be a 7x7 symmetric positiv definit matrix (i.e. a covariance matrix)

Definition at line 59 of file PoseParametrization.cpp.

References BEXCEPTION, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by BIAS::Pose::GetPoseParameters(), and Transform().

void PoseParametrization::SetCQ ( const Vector< PP_TYPE > & CQvec )

Set this from pose parametrization and zeros associated covarinace matrix.

Definition at line 48 of file PoseParametrization.cpp.

References BEXCEPTION, and TNT::Vector< T >::size().

void PoseParametrization::SetOrientation ( const Quaternion< PP_TYPE > & q )

set orientation part of vector and zero covariance matrix

Definition at line 100 of file PoseParametrization.cpp.

References Cov_, Pose_, and BIAS::Matrix< T >::SetZero().

Referenced by BIAS::Pose::GetPoseParameters().

void PoseParametrization::SetPosition ( const Vector3< PP_TYPE > & C )

set position part of vector and zero covariance matrix

Definition at line 90 of file PoseParametrization.cpp.

References Cov_, Pose_, and BIAS::Matrix< T >::SetZero().

Referenced by BIAS::Pose::GetPoseParameters().

void BIAS::PoseParametrization::Transform | ( | const Vector3< double > & | T,
 |  | const Quaternion< double > & | q
 | ) |

Transforms the pose and associated covariance according to the point transformation parametrized as translation T and rotation Q.

Author:
woelk 05/2006 (untested)

void PoseParametrization::Transform ( const Matrix4x4< PP_TYPE > & T )

Transfroms the pose and associated covariance according to the point transformation T.

Only affine transformations are supported.

Author:
woelk 03/2006

Definition at line 143 of file PoseParametrization.cpp.

References BIASABORT, BIASERR, cov, GetCovarianceMatrix(), SetCovarianceMatrix(), and BIAS::PoseParametrizationCovariance::Transform().

Member Data Documentation

Matrix<PP_TYPE> BIAS::PoseParametrization::Cov_ [protected]

first columns relate to position

Definition at line 123 of file PoseParametrization.hh.

Referenced by SetOrientation(), and SetPosition().

Vector<PP_TYPE> BIAS::PoseParametrization::Pose_ [protected]

first 3 entries relate to the position

Definition at line 121 of file PoseParametrization.hh.

Referenced by GetOrientation(), GetPosition(), PoseParametrization(), SetOrientation(), and SetPosition().

The documentation for this class was generated from the following files:
  • Base/Geometry/PoseParametrization.hh
  • Base/Geometry/PoseParametrization.cpp
Generated on Wed Jun 21 19:09:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PoseParametrizationCovariance Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PoseParametrizationCovariance

BIAS::PoseParametrizationCovariance Class Reference
[Matrix and Vector Classes, Geometry and Transformations]

class encapsulating the transfromations between different pose parametrizations More...

#include <Base/Geometry/PoseParametrizationCovariance.hh>

Inheritance diagram for BIAS::PoseParametrizationCovariance:

[legend]
Collaboration diagram for BIAS::PoseParametrizationCovariance:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< POSECOVARIANCE_TYPE > &arg)
Adds arg to this.
void | AddIP (const POSECOVARIANCE_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
void Clear ()
Subscript | dim (Subscript d) const
void | Divide (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const POSECOVARIANCE_TYPE &scalar)
in place division function
void | Fill (const POSECOVARIANCE_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< POSECOVARIANCE_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
Matrix3x3< POSECOVARIANCE_TYPE > | GetCovC ()
Matrix4x4< POSECOVARIANCE_TYPE > | GetCovQ ()
POSECOVARIANCE_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
POSECOVARIANCE_TYPE ** | GetDataArray () const
returns zero based arry for data access
POSECOVARIANCE_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
POSECOVARIANCE_TYPE * | GetDataLast () const
Get a pointer to the last data element.
POSECOVARIANCE_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (POSECOVARIANCE_TYPE &max, POSECOVARIANCE_TYPE &min) const
return biggest and smallest entry
POSECOVARIANCE_TYPE | GetMean () const
Returns the mean value of the matrix elements.
POSECOVARIANCE_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< POSECOVARIANCE_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< POSECOVARIANCE_TYPE > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
Matrix (const TNT::Matrix< POSECOVARIANCE_TYPE > &A)
Matrix (const Matrix< POSECOVARIANCE_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const POSECOVARIANCE_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
void | Mult (const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< POSECOVARIANCE_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< POSECOVARIANCE_TYPE > &arg, Matrix< POSECOVARIANCE_TYPE > &result) const
matrix multiplication, result is not allocated
void | Multiply (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const POSECOVARIANCE_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< POSECOVARIANCE_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
POSECOVARIANCE_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
POSECOVARIANCE_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
POSECOVARIANCE_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
POSECOVARIANCE_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
PoseParametrizationCovariance (const TNT::Matrix< POSECOVARIANCE_TYPE > &T)
PoseParametrizationCovariance (const Matrix< POSECOVARIANCE_TYPE > &T)
PoseParametrizationCovariance ()
PoseParametrizationCovariance (MatrixInitType T)
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, POSECOVARIANCE_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, POSECOVARIANCE_TYPEscale)
Scales row NoRow with scale.
void | SetCol (const int row, const Vector< POSECOVARIANCE_TYPE > &data)
set a col of matrix from vector
void | SetFromEulerAngles (const Matrix< double > &cov_pose, const Vector< double > &pose)
Given a 6D pose (position and euler angles) and its associated covariance, the function transforms the covaruiance into pose and quaternion parametrization.
void SetIdentity ()
Converts matrix to identity matrix.
void | SetRow (const int row, const Vector< POSECOVARIANCE_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const POSECOVARIANCE_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< POSECOVARIANCE_TYPE > &arg)
Subtracts arg from this
this -= arg.
POSECOVARIANCE_TYPE | Trace () const
void | Transform (const Matrix4x4< double > &transf, const PoseParametrization &pose)
Transfroms the covariance associated with pose according to the point transformation transf.
Matrix< POSECOVARIANCE_TYPE > | Transpose () const
transpose function, storing data destination matrix
~PoseParametrizationCovariance ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

class encapsulating the transfromations between different pose parametrizations

This class represents the covariance of a camerpose with translation and rotation. The pose is assumed to be tx,ty,tz,q1,q2,q3,q4 with translation t and rotation q as quaternion. The covariance therefore must be 7x7.

Author:
woelk 03/2006

Definition at line 49 of file PoseParametrizationCovariance.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( MatrixInitType T ) [inline]

Definition at line 53 of file PoseParametrizationCovariance.hh.

PoseParametrizationCovariance::PoseParametrizationCovariance ( )

Definition at line 10 of file PoseParametrizationCovariance.cpp.

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( const Matrix< POSECOVARIANCE_TYPE > & T ) [inline, explicit]

Definition at line 58 of file PoseParametrizationCovariance.hh.

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( const TNT::Matrix< POSECOVARIANCE_TYPE > & T ) [inline]

Definition at line 61 of file PoseParametrizationCovariance.hh.

PoseParametrizationCovariance::~PoseParametrizationCovariance ( )

Definition at line 15 of file PoseParametrizationCovariance.cpp.

Member Function Documentation

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Add | ( | const POSECOVARIANCE_TYPE & | scalar,
 |  | Matrix< POSECOVARIANCE_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< POSECOVARIANCE_TYPE >::AddIP ( const Matrix< POSECOVARIANCE_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< POSECOVARIANCE_TYPE >::AddIP ( const POSECOVARIANCE_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

void BIAS::PoseParametrizationCovariance::Clear ( ) [inline]

Definition at line 70 of file PoseParametrizationCovariance.hh.

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Divide | ( | const POSECOVARIANCE_TYPE & | scalar,
 |  | Matrix< POSECOVARIANCE_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< POSECOVARIANCE_TYPE >::DivideIP ( const POSECOVARIANCE_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Fill ( const POSECOVARIANCE_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

Matrix3x3<POSECOVARIANCE_TYPE> BIAS::PoseParametrizationCovariance::GetCovC ( )

Matrix4x4<POSECOVARIANCE_TYPE> BIAS::PoseParametrizationCovariance::GetCovQ ( )

POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

POSECOVARIANCE_TYPE ** BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

POSECOVARIANCE_TYPE ** BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMaxMin | ( | POSECOVARIANCE_TYPE & | max,
 |  | POSECOVARIANCE_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetSystemMatrix ( Matrix< POSECOVARIANCE_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix ( const TNT::Matrix< POSECOVARIANCE_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix ( const Matrix< POSECOVARIANCE_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const POSECOVARIANCE_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< POSECOVARIANCE_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult | ( | const Vector< POSECOVARIANCE_TYPE > & | arg,
 |  | Vector< POSECOVARIANCE_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult ( const Matrix< POSECOVARIANCE_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult | ( | const Matrix< POSECOVARIANCE_TYPE > & | arg,
 |  | Matrix< POSECOVARIANCE_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Multiply | ( | const POSECOVARIANCE_TYPE & | scalar,
 |  | Matrix< POSECOVARIANCE_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultiplyIP ( const POSECOVARIANCE_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultLeft | ( | const Vector< POSECOVARIANCE_TYPE > & | arg,
 |  | Vector< POSECOVARIANCE_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultLeft ( const Matrix< POSECOVARIANCE_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< POSECOVARIANCE_TYPE >::ScaleCol | ( | int | NoCol,
 |  | POSECOVARIANCE_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::ScaleRow | ( | int | NoRow,
 |  | POSECOVARIANCE_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< POSECOVARIANCE_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void PoseParametrizationCovariance::SetFromEulerAngles | ( | const Matrix< double > & | cov_pose,
 |  | const Vector< double > & | pose
 | ) |

Given a 6D pose (position and euler angles) and its associated covariance, the function transforms the covaruiance into pose and quaternion parametrization.

The 1st 3 entries of the 6D pose must be the euclidean position coordinates and the last 3 entries must be the Euler angles such that the final rotation matrix is composed from Rz * Ry * Rx. Where Rx denotes the rotation matrix describing the rotation around the x axis, ....

Author:
woelk 03/2006

Definition at line 19 of file PoseParametrizationCovariance.cpp.

References BEXCEPTION, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetIdentity ( ) [inherited]

Converts matrix to identity matrix.

Even if the matrix is not quadratic, the diagonal values starting with the upper left element are set to 1. Example:

1 0 0 1 0 0 0 0 1 0 or 0 1 0 0 0 0 1 0 0 1 0 0 0 0

Author:
Ingo Thomsen

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< POSECOVARIANCE_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Sub | ( | const POSECOVARIANCE_TYPE & | scalar,
 |  | Matrix< POSECOVARIANCE_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SubIP ( const POSECOVARIANCE_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SubIP ( const Matrix< POSECOVARIANCE_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::Trace ( ) const [inline, inherited]

Author:
koeser

void PoseParametrizationCovariance::Transform | ( | const Matrix4x4< double > & | transf,
 |  | const PoseParametrization & | pose
 | ) |

Transfroms the covariance associated with pose according to the point transformation transf.

Only affine transformations are supported.

Author:
woelk 03/2006

Definition at line 117 of file PoseParametrizationCovariance.cpp.

References BEXCEPTION, BIAS::Equal(), BIAS::PoseParametrization::GetOrientation(), BIAS::MatrixZero, T, and BIAS::Matrix< T >::Transpose().

Referenced by BIAS::PoseParametrization::Transform().

Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/PoseParametrizationCovariance.hh
  • Base/Geometry/PoseParametrizationCovariance.cpp
Generated on Wed Jun 21 19:09:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Position Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Position

BIAS::Position Class Reference
[Image and Image Base]

store positions in image More...

#include <Base/Image/ROI.hh>

List of all members.

Public Member Functions

bool | operator< (const Position &p) const
comparison, needed for sorting
Position & | operator= (const Position &p)
assignment operator
Position (const Position &pos)
Position (unsigned xx, unsigned yy)
Position ()
~Position ()

Public Attributes

unsigned | x
member variables
unsigned | y

Friends

BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const Position &pos)

Detailed Description

store positions in image

Author:
woelk 07/2005

Definition at line 51 of file ROI.hh.

Constructor & Destructor Documentation

BIAS::Position::Position ( ) [inline]

Definition at line 54 of file ROI.hh.

BIAS::Position::Position | ( | unsigned | xx,
 |  | unsigned | yy
 | ) | [inline]

Definition at line 55 of file ROI.hh.

BIAS::Position::Position ( const Position & pos ) [inline]

Definition at line 56 of file ROI.hh.

BIAS::Position::~Position ( ) [inline]

Definition at line 58 of file ROI.hh.

Member Function Documentation

bool BIAS::Position::operator< ( const Position & p ) const [inline]

comparison, needed for sorting

Definition at line 64 of file ROI.hh.

References x, and y.

Position& BIAS::Position::operator= ( const Position & p ) [inline]

assignment operator

Definition at line 61 of file ROI.hh.

References x, and y.

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const Position & | pos
 | ) | [friend]

Member Data Documentation

unsigned BIAS::Position::x

member variables

Definition at line 70 of file ROI.hh.

Referenced by operator<(), BIAS::operator<<(), and operator=().

unsigned BIAS::Position::y

Definition at line 70 of file ROI.hh.

Referenced by operator<(), BIAS::operator<<(), and operator=().

The documentation for this class was generated from the following file:
  • Base/Image/ROI.hh
Generated on Wed Jun 21 19:09:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Projection Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Projection

BIAS::Projection Class Reference

This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion, . More...

#include <Geometry/Projection.hh>

Inheritance diagram for BIAS::Projection:

[legend]
Collaboration diagram for BIAS::Projection:

[legend]
List of all members.

Public Member Functions

void | CreatePerspective (const BIAS::Pose &pose, const BIAS::KMatrix &K, int width, int height, const BIAS::Vector4< double > &UndistortionCoefficients=BIAS::Vector4< double >())
bool | DoesPointProjectIntoImage (const BIAS::HomgPoint3D &X, BIAS::HomgPoint2D &x, unsigned int cam=0, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
Vector3< double > | GetC (unsigned int cam=0) const
return Center of camera with index cam
virtual Matrix< double > | GetCov (unsigned int cam=0) const
Get the Pose covariance.
Matrix3x4< double > | GetExternals (unsigned int cam=0) const
return const ref to Pose
std::string | GetIdentifier () const
ProjectionParametersBase * | GetParameters (unsigned int cam=0)
parameter write function has to invalidate cache !
const ProjectionParametersBase * | GetParameters (unsigned int cam=0) const
parameter read function
virtual const Pose & | GetPose (unsigned int cam=0) const
return complete pose object
BIAS::Quaternion< double > | GetQ (unsigned int cam=0) const
return rotation quaternion of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0
RMatrix | GetR (unsigned int cam=0) const
return RMatrix of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0
bool | IsEmpty () const
const Projection & | operator= (const Projection &p)
HomgPoint2D | Project (const HomgPoint3D &X, unsigned int cam=0, bool IgnoreDistortion=false) const
returns the 2d projection of X in camera cam, where X is given in the global coordinate frame (not the rig) (need HomgPoint3D to map points at infinity)
Projection (const Projection &p)
Projection (const ProjectionParametersBase &p)
Projection ()
int | ReadFromCamParamFile (const std::string &filename)
Reads a camera data XML file and constructs the ProjectionParametersBase-pointer, using the ProjectionParametersIO and the CameraParameter file format.
void | Rescale (float ratio, unsigned int cam=0)
adapt internal params to resampled image
void | SetC (const Vector3< double > &C, unsigned int cam=0)
virtual void | SetCov (const Matrix< double > &Cov, unsigned int cam=0)
Set the Pose covariance.
void | SetIdentifier (const std::string &identString)
virtual void | SetPose (const BIAS::Pose pose, unsigned int cam=0)
Set the Pose.
Matrix3x3< double > | UnProjectToCovLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const
calculate 3D point and associated covariance by unprojection
Vector3< double > | UnProjectToPoint (const HomgPoint2D &pos, double depth, unsigned int cam=0, bool IgnoreDistortion=false) const
calculates a 3D point in the global (not the rig) coordinate system, which belongs to the image position pos with distance depth to the camera center.
Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const
calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, unsigned int cam=0, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position.
Vector3< double > | UnProjectToRayLocal (const HomgPoint2D &pos, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const
calculates a 3D ray in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam.
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~Projection ()

Protected Attributes

std::string | identifier_
Multifunctional identifier.
std::vector< ProjectionParametersBase * > | vecParameters_
the intrinsics (like K, .

Friends

std::ostream & | operator<< (std::ostream &os, const Projection &p)

Detailed Description

This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion, .

..

Definition at line 55 of file Projection.hh.

Constructor & Destructor Documentation

BIAS::Projection::Projection ( ) [inline]

Definition at line 61 of file Projection.hh.

BIAS::Projection::Projection ( const ProjectionParametersBase & p ) [inline]

Definition at line 66 of file Projection.hh.

References BIAS::ProjectionParametersBase::Clone().

BIAS::Projection::Projection ( const Projection & p ) [inline]

Definition at line 71 of file Projection.hh.

virtual BIAS::Projection::~Projection ( ) [inline, virtual]

Definition at line 280 of file Projection.hh.

References Version.

Member Function Documentation

void BIAS::Projection::CreatePerspective | ( | const BIAS::Pose & | pose,
 |  | const BIAS::KMatrix & | K,
 |  | int | width,
 |  | int | height,
 |  | const BIAS::Vector4< double > & | UndistortionCoefficients = BIAS::Vector4< double >()
 | ) |

Definition at line 116 of file Projection.cpp.

References BIAS::KMatrix::GetFx(), BIAS::KMatrix::GetFy(), BIAS::KMatrix::GetHx(), BIAS::KMatrix::GetHy(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersBase::SetPose(), BIAS::ProjectionParametersPerspective::SetPrincipal(), BIAS::ProjectionParametersPerspective::SetUndistortion(), and vecParameters_.

bool BIAS::Projection::DoesPointProjectIntoImage | ( | const BIAS::HomgPoint3D & | X,
 |  | BIAS::HomgPoint2D & | x,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 153 of file Projection.cpp.

References BIASERR.

Vector3<double> BIAS::Projection::GetC ( unsigned int cam = 0 ) const [inline]

return Center of camera with index cam

if cam>0 this is a relative pose in the coordinate system of cam 0

Definition at line 118 of file Projection.hh.

References BIASABORT, and BIASERR.

Referenced by BIAS::Projection3DData::Set(), and UnProjectToPoint().

virtual Matrix<double> BIAS::Projection::GetCov ( unsigned int cam = 0 ) const [inline, virtual]

Get the Pose covariance.

Definition at line 164 of file Projection.hh.

References BIASABORT, and BIASERR.

Matrix3x4<double> BIAS::Projection::GetExternals ( unsigned int cam = 0 ) const [inline]

return const ref to Pose

Author:
koeser 02/2006

Definition at line 151 of file Projection.hh.

References BIASABORT, BIASASSERT, and BIASERR.

std::string BIAS::Projection::GetIdentifier ( ) const [inline]

Definition at line 309 of file Projection.hh.

Referenced by BIAS::Projection3DData::Set().

ProjectionParametersBase* BIAS::Projection::GetParameters ( unsigned int cam = 0 ) [inline]

parameter write function has to invalidate cache !

Definition at line 111 of file Projection.hh.

const ProjectionParametersBase* BIAS::Projection::GetParameters ( unsigned int cam = 0 ) const [inline]

parameter read function

Definition at line 106 of file Projection.hh.

Referenced by GetSequenceAngle(), BIAS::MatlabTBUndistortion::Init(), MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnModified(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), PtoPPP(), BIAS::ProjectionGUI::SetProjection(), SetRotation(), and BIAS::ProjectionGUI::UpdateGUI().

virtual const Pose& BIAS::Projection::GetPose ( unsigned int cam = 0 ) const [inline, virtual]

return complete pose object

Definition at line 175 of file Projection.hh.

References BIASABORT, and BIASERR.

BIAS::Quaternion< double > BIAS::Projection::GetQ ( unsigned int cam = 0 ) const

return rotation quaternion of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0

Definition at line 333 of file Projection.cpp.

References BIASASSERT, BIASERR, and BIASEXIT.

RMatrix BIAS::Projection::GetR ( unsigned int cam = 0 ) const [inline]

return RMatrix of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0

Definition at line 131 of file Projection.hh.

References BIASABORT, BIASASSERT, and BIASERR.

Referenced by BIAS::Projection3DData::Set().

bool BIAS::Projection::IsEmpty ( ) const [inline]

Definition at line 102 of file Projection.hh.

const Projection& BIAS::Projection::operator= ( const Projection & p ) [inline]

Definition at line 75 of file Projection.hh.

References vecParameters_.

HomgPoint2D BIAS::Projection::Project | ( | const HomgPoint3D & | X,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

returns the 2d projection of X in camera cam, where X is given in the global coordinate frame (not the rig) (need HomgPoint3D to map points at infinity)

Definition at line 137 of file Projection.cpp.

References BIASABORT, BIASERR, and vecParameters_.

Referenced by BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

int BIAS::Projection::ReadFromCamParamFile ( const std::string & filename )

Reads a camera data XML file and constructs the ProjectionParametersBase-pointer, using the ProjectionParametersIO and the CameraParameter file format.

Parameters:
filename Name of the XML parameter file

Referenced by main().

void BIAS::Projection::Rescale | ( | float | ratio,
 |  | unsigned int | cam = 0
 | ) | [inline]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample

Definition at line 300 of file Projection.hh.

void BIAS::Projection::SetC | ( | const Vector3< double > & | C,
 |  | unsigned int | cam = 0
 | ) | [inline]

Definition at line 193 of file Projection.hh.

References BIASABORT, and BIASERR.

virtual void BIAS::Projection::SetCov | ( | const Matrix< double > & | Cov,
 |  | unsigned int | cam = 0
 | ) | [inline, virtual]

Set the Pose covariance.

Definition at line 185 of file Projection.hh.

References BIASABORT, and BIASERR.

void BIAS::Projection::SetIdentifier ( const std::string & identString ) [inline]

Definition at line 305 of file Projection.hh.

virtual void BIAS::Projection::SetPose | ( | const BIAS::Pose | pose,
 |  | unsigned int | cam = 0
 | ) | [inline, virtual]

Set the Pose.

Definition at line 202 of file Projection.hh.

References BIASABORT, and BIASERR.

Matrix3x3< double > BIAS::Projection::UnProjectToCovLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | const double & | depth,
 |  | unsigned int | camSystem = 0,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

calculate 3D point and associated covariance by unprojection

Author:
woelk 03/2006

Definition at line 218 of file Projection.cpp.

References BIASABORT, BIASERR, and vecParameters_.

Vector3< double > BIAS::Projection::UnProjectToPoint | ( | const HomgPoint2D & | pos,
 |  | double | depth,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

calculates a 3D point in the global (not the rig) coordinate system, which belongs to the image position pos with distance depth to the camera center.

Definition at line 187 of file Projection.cpp.

References BIASERR, GetC(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and UnProjectToRay().

Referenced by BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

Vector3< double > BIAS::Projection::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | unsigned int | camSystem = 0,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Definition at line 201 of file Projection.cpp.

References BIASABORT, BIASERR, and vecParameters_.

Vector3< double > BIAS::Projection::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Definition at line 169 of file Projection.cpp.

References BIASABORT, BIASERR, BIAS::Matrix3x3< T >::Mult(), and vecParameters_.

Referenced by UnProjectToPoint().

Vector3< double > BIAS::Projection::UnProjectToRayLocal | ( | const HomgPoint2D & | pos,
 |  | unsigned int | camSystem = 0,
 |  | unsigned int | cam = 0,
 |  | bool | IgnoreDistortion = false
 | ) | const

calculates a 3D ray in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam.

Definition at line 231 of file Projection.cpp.

References BIASABORT, and BIASERR.

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

virtual int BIAS::Projection::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Implements BIAS::XMLBase.

int BIAS::Projection::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Implements BIAS::XMLBase.

Definition at line 278 of file Projection.cpp.

References BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNodeName(), and vecParameters_.

int BIAS::Projection::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Implements BIAS::XMLBase.

Definition at line 257 of file Projection.cpp.

References BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), identifier_, and Version.

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const Projection & | p
 | ) | [friend]

Definition at line 333 of file Projection.hh.

Member Data Documentation

std::string BIAS::Projection::identifier_ [protected]

Multifunctional identifier.

Definition at line 329 of file Projection.hh.

Referenced by XMLOut().

std::vector<ProjectionParametersBase* > BIAS::Projection::vecParameters_ [protected]

the intrinsics (like K, .

..) of the camera usually only one only in rig mode there may be many, in that case vecIntrinsics[0] holds the external pose while the others hold the internal pose (pose in the coordinate system of the first camera)

Definition at line 325 of file Projection.hh.

Referenced by CreatePerspective(), operator=(), Project(), UnProjectToCovLocal(), UnProjectToPointLocal(), UnProjectToRay(), and XMLIn().

The documentation for this class was generated from the following files:
  • Geometry/Projection.hh
  • Geometry/Projection.cpp
Generated on Wed Jun 21 19:09:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Projection3DData Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Projection3DData

BIAS::Projection3DData Class Reference

class Projection3DData stores data for drawing a the extrinisc paramters of a projection. More...

#include <Utils/ThreeDOut.hh>

Collaboration diagram for BIAS::Projection3DData:

[legend]
List of all members.

Public Member Functions

Projection3DData ()
void | Set (const BIAS::Vector3< double > &C, const BIAS::RMatrixBase &R, const double scale=1.0)
void | Set (const BIAS::Projection &p, const double scale=1.0)
void | Set (const BIAS::PoseParametrization &p, const double scale=1.0)

Public Attributes

Vector3< double > | A
double | angle
Vector3< double > | axis
Vector3< double > | C
BIAS::RGBAuc ColorOfSelection
Vector3< double > | H
std::string | identifier
double | radiusSelection
Vector3< double > | V

Detailed Description

class Projection3DData stores data for drawing a the extrinisc paramters of a projection.

Definition at line 85 of file ThreeDOut.hh.

Constructor & Destructor Documentation

BIAS::Projection3DData::Projection3DData ( ) [inline]

Definition at line 118 of file ThreeDOut.hh.

Member Function Documentation

void BIAS::Projection3DData::Set | ( | const BIAS::Vector3< double > & | C,
 |  | const BIAS::RMatrixBase & | R,
 |  | const double | scale = 1.0
 | ) | [inline]

Definition at line 103 of file ThreeDOut.hh.

References BIAS::RMatrixBase::GetRotationAxisAngle().

void BIAS::Projection3DData::Set | ( | const BIAS::Projection & | p,
 |  | const double | scale = 1.0
 | ) | [inline]

Definition at line 96 of file ThreeDOut.hh.

References BIAS::Projection::GetC(), BIAS::Projection::GetIdentifier(), BIAS::Projection::GetR(), and R.

void BIAS::Projection3DData::Set | ( | const BIAS::PoseParametrization & | p,
 |  | const double | scale = 1.0
 | ) | [inline]

Definition at line 87 of file ThreeDOut.hh.

References BIAS::PoseParametrization::GetOrientation(), BIAS::PoseParametrization::GetPosition(), R, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by BIAS::ThreeDOut::AddPose(), and BIAS::ThreeDOut::AddProjection().

Member Data Documentation

Vector3<double> BIAS::Projection3DData::A

Definition at line 120 of file ThreeDOut.hh.

double BIAS::Projection3DData::angle

Definition at line 124 of file ThreeDOut.hh.

Vector3<double> BIAS::Projection3DData::axis

Definition at line 123 of file ThreeDOut.hh.

Vector3<double> BIAS::Projection3DData::C

Definition at line 119 of file ThreeDOut.hh.

BIAS::RGBAuc BIAS::Projection3DData::ColorOfSelection

Definition at line 127 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPose(), and BIAS::ThreeDOut::AddProjection().

Vector3<double> BIAS::Projection3DData::H

Definition at line 121 of file ThreeDOut.hh.

std::string BIAS::Projection3DData::identifier

Definition at line 128 of file ThreeDOut.hh.

double BIAS::Projection3DData::radiusSelection

Definition at line 125 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPose(), and BIAS::ThreeDOut::AddProjection().

Vector3<double> BIAS::Projection3DData::V

Definition at line 122 of file ThreeDOut.hh.

The documentation for this class was generated from the following file:
  • Utils/ThreeDOut.hh
Generated on Wed Jun 21 19:09:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionDialog Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionDialog

BIAS::ProjectionDialog Class Reference

Dialog containing a ProjectionGUI. More...

#include <Gui/ProjectionGUI.hh>

Collaboration diagram for BIAS::ProjectionDialog:

[legend]
List of all members.

Public Member Functions

const Projection & GetProjection () const
ProjectionDialog (const Projection &projection, wxWindow *parent=NULL, wxWindowID id=-1, const wxString &title=wxT("Projection"))

Private Attributes

ProjectionGUI * projgui_

Detailed Description

Dialog containing a ProjectionGUI.

Author:
jkollmann

Definition at line 93 of file ProjectionGUI.hh.

Constructor & Destructor Documentation

ProjectionDialog::ProjectionDialog | ( | const Projection & | projection,
 |  | wxWindow * | parent = NULL,
 |  | wxWindowID | id = -1,
 |  | const wxString & | title = wxT("Projection")
 | ) |

Definition at line 480 of file ProjectionGUI.cpp.

References projgui_, and BIAS::ProjectionGUI::SetProjection().

Member Function Documentation

const Projection & ProjectionDialog::GetProjection ( ) const

Definition at line 499 of file ProjectionGUI.cpp.

References BIAS::ProjectionGUI::GetProjection(), and projgui_.

Member Data Documentation

ProjectionGUI* BIAS::ProjectionDialog::projgui_ [private]

Definition at line 101 of file ProjectionGUI.hh.

Referenced by GetProjection(), and ProjectionDialog().

The documentation for this class was generated from the following files:
  • Gui/ProjectionGUI.hh
  • Gui/ProjectionGUI.cpp
Generated on Wed Jun 21 19:09:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionGUI Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionGUI

BIAS::ProjectionGUI Class Reference

Panel for displaying and editing projections. More...

#include <Gui/ProjectionGUI.hh>

Collaboration diagram for BIAS::ProjectionGUI:

[legend]
List of all members.

Public Member Functions

const Projection & | GetProjection () const
ProjectionGUI (wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
void | SetProjection (const Projection &projection)

Private Member Functions

MatrixPanel * | AddMatrixPanel (const wxString &name, wxWindowID id, bool editable)
VectorPanel * | AddVectorPanel (const wxString &name, wxWindowID id, bool editable)
void | OnLoad (wxCommandEvent &event)
void | OnModified (wxCommandEvent &event)
void | OnNew (wxCommandEvent &event)
void | OnNormalizeQuaternion (wxCommandEvent &event)
void | OnSave (wxCommandEvent &event)
void UpdateGUI ()

Private Attributes

VectorPanel * panelAspectRatio_
VectorPanel * panelCenter_
VectorPanel * panelFocalLength_
VectorPanel * panelImageSize_
MatrixPanel * panelKMatrix_
VectorPanel * panelPrincipal_
VectorPanel * panelQuaternion_
VectorPanel * panelRadius_
MatrixPanel * panelRMatrix_
VectorPanel * panelUndistortion_
Projection projection_
wxScrolledWindow * projectionPanel_
bool | selfModifying_

Detailed Description

Panel for displaying and editing projections.

Author:
jkollmann

Definition at line 50 of file ProjectionGUI.hh.

Constructor & Destructor Documentation

ProjectionGUI::ProjectionGUI | ( | wxWindow * | parent,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = wxTAB_TRAVERSAL,
 |  | const wxString & | name = wxT("panel")
 | ) |

Definition at line 163 of file ProjectionGUI.cpp.

Member Function Documentation

MatrixPanel * ProjectionGUI::AddMatrixPanel | ( | const wxString & | name,
 |  | wxWindowID | id,
 |  | bool | editable
 | ) | [private]

Definition at line 274 of file ProjectionGUI.cpp.

References projectionPanel_.

Referenced by SetProjection().

VectorPanel * ProjectionGUI::AddVectorPanel | ( | const wxString & | name,
 |  | wxWindowID | id,
 |  | bool | editable
 | ) | [private]

Definition at line 262 of file ProjectionGUI.cpp.

References projectionPanel_.

Referenced by SetProjection().

const Projection & ProjectionGUI::GetProjection ( ) const

Definition at line 257 of file ProjectionGUI.cpp.

References projection_.

Referenced by BIAS::ProjectionDialog::GetProjection(), and OnSave().

void ProjectionGUI::OnLoad ( wxCommandEvent & event ) [private]

Definition at line 442 of file ProjectionGUI.cpp.

References WxToAscii.

void ProjectionGUI::OnModified ( wxCommandEvent & event ) [private]

Definition at line 341 of file ProjectionGUI.cpp.

References BIAS::Projection::GetParameters(), BIAS::VectorPanel::GetVector(), panelCenter_, projection_, and selfModifying_.

void ProjectionGUI::OnNew ( wxCommandEvent & event ) [private]

Definition at line 421 of file ProjectionGUI.cpp.

References SetProjection().

void ProjectionGUI::OnNormalizeQuaternion ( wxCommandEvent & event ) [private]

Definition at line 332 of file ProjectionGUI.cpp.

References BIAS::Projection::GetParameters(), BIAS::ProjectionParametersBase::GetQ(), BIAS::Quaternion< QUAT_TYPE >::Normalize(), projection_, BIAS::ProjectionParametersBase::SetQ(), and UpdateGUI().

void ProjectionGUI::OnSave ( wxCommandEvent & event ) [private]

Definition at line 461 of file ProjectionGUI.cpp.

References GetProjection(), and WxToAscii.

void ProjectionGUI::SetProjection ( const Projection & projection )

Definition at line 196 of file ProjectionGUI.cpp.

References AddMatrixPanel(), AddVectorPanel(), BIAS::Projection::GetParameters(), ID_AspectRatio, ID_Center, ID_FocalLength, ID_ImageSize, ID_KMatrix, ID_Principal, ID_Quaternion, ID_RMatrix, ID_Undistortion, panelAspectRatio_, panelCenter_, panelFocalLength_, panelImageSize_, panelKMatrix_, panelPrincipal_, panelQuaternion_, panelRadius_, panelRMatrix_, panelUndistortion_, projection_, projectionPanel_, and UpdateGUI().

Referenced by OnNew(), and BIAS::ProjectionDialog::ProjectionDialog().

void ProjectionGUI::UpdateGUI ( ) [private]

Definition at line 286 of file ProjectionGUI.cpp.

References BIAS::ProjectionParametersBase::GetAspectratio(), BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersPerspective::GetFocalLength(), BIAS::ProjectionParametersBase::GetImageSize(), BIAS::ProjectionParametersPerspective::GetK(), BIAS::Projection::GetParameters(), BIAS::ProjectionParametersBase::GetPrincipal(), BIAS::ProjectionParametersBase::GetQ(), BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionParametersSpherical::GetRadius(), BIAS::ProjectionParametersPerspective::GetUndistortion(), panelAspectRatio_, panelCenter_, panelFocalLength_, panelImageSize_, panelKMatrix_, panelPrincipal_, panelQuaternion_, panelRadius_, panelRMatrix_, panelUndistortion_, projection_, selfModifying_, BIAS::MatrixPanel::SetMatrix(), and BIAS::VectorPanel::SetVector().

Referenced by OnNormalizeQuaternion(), and SetProjection().

Member Data Documentation

VectorPanel* BIAS::ProjectionGUI::panelAspectRatio_ [private]

Definition at line 81 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelCenter_ [private]

Definition at line 77 of file ProjectionGUI.hh.

Referenced by OnModified(), SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelFocalLength_ [private]

Definition at line 84 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelImageSize_ [private]

Definition at line 80 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

MatrixPanel* BIAS::ProjectionGUI::panelKMatrix_ [private]

Definition at line 83 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelPrincipal_ [private]

Definition at line 82 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelQuaternion_ [private]

Definition at line 78 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelRadius_ [private]

Definition at line 86 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

MatrixPanel* BIAS::ProjectionGUI::panelRMatrix_ [private]

Definition at line 79 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

VectorPanel* BIAS::ProjectionGUI::panelUndistortion_ [private]

Definition at line 85 of file ProjectionGUI.hh.

Referenced by SetProjection(), and UpdateGUI().

Projection BIAS::ProjectionGUI::projection_ [private]

Definition at line 74 of file ProjectionGUI.hh.

Referenced by GetProjection(), OnModified(), OnNormalizeQuaternion(), SetProjection(), and UpdateGUI().

wxScrolledWindow* BIAS::ProjectionGUI::projectionPanel_ [private]

Definition at line 75 of file ProjectionGUI.hh.

Referenced by AddMatrixPanel(), AddVectorPanel(), and SetProjection().

bool BIAS::ProjectionGUI::selfModifying_ [private]

Definition at line 73 of file ProjectionGUI.hh.

Referenced by OnModified(), and UpdateGUI().

The documentation for this class was generated from the following files:
  • Gui/ProjectionGUI.hh
  • Gui/ProjectionGUI.cpp
Generated on Wed Jun 21 19:09:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionMapping< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionMapping

BIAS::ProjectionMapping< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Maps source pixel to sink pixel of given projections. More...

#include <Image/ProjectionMapping.hh>

Inheritance diagram for BIAS::ProjectionMapping< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::ProjectionMapping< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

template<>
void | ClipValue_ (const double &value, float &newvalue)
virtual int | GetBoundingBox (unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
ProjectionMapping< InputStorageType,
OutputStorageType > & 		operator= (const ProjectionMapping &src)
required because of const members
ProjectionMapping (const ProjectionMapping &src)
required because assignment is
ProjectionMapping ()
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
void | SetSinkCam (const Projection &P)
set your sink projection before calling Map()
void | SetSourceCam (const Projection &P)
set your source projection before calling Map()
virtual void | UpdatePyramidSize (const Image< OutputStorageType > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size
virtual | ~ProjectionMapping ()

Protected Member Functions

virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source)
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, OutputStorageType &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const
reimplementation for Pixel transformation, takes sink and computes coords in source
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing

Protected Attributes

bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
int | offsetX_
int | offsetY_
PyramidImage< InputStorageType > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
Projection SinkP_
Projection SourceP_
the projections for backward mapping: run over sink and compute source
double | width_

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::ProjectionMapping< InputStorageType, OutputStorageType >

Maps source pixel to sink pixel of given projections.

Author:
niemann

Definition at line 43 of file ProjectionMapping.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
ProjectionMapping::~ProjectionMapping ( ) [virtual]

Definition at line 36 of file ProjectionMapping.cpp.

template<class InputStorageType, class OutputStorageType>
ProjectionMapping::ProjectionMapping ( )

Definition at line 41 of file ProjectionMapping.cpp.

template<class InputStorageType, class OutputStorageType>
ProjectionMapping::ProjectionMapping ( const ProjectionMapping< InputStorageType, OutputStorageType > & src )

required because assignment is

Author:
Jan Woetzel

Definition at line 49 of file ProjectionMapping.cpp.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_ | ( | const Image< InputStorageType > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual, inherited]

compute maximum number of pyramid levels needed

Definition at line 154 of file BackwardMapping.cpp.

References BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, and BIAS::PyramidImage< StorageType >::Release().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_ | ( | const Image< OutputStorageType > & | sink,
 |  | const Image< InputStorageType > & | source
 | ) | [protected, virtual, inherited]

Definition at line 753 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_ | ( | Image< OutputStorageType > & | ,
 |  | const Image< InputStorageType > & |
 | ) | [protected, virtual, inherited]

Definition at line 780 of file BackwardMapping.cpp.

References abs, BUILD_IMAGE_CHAR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< OutputStorageType > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

clip computed region in dest image to roi

Definition at line 666 of file BackwardMapping.cpp.

References BIAS::ImageBase::GetROICorners().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<>
void BIAS::BackwardMapping< float, float >::ClipValue_ | ( | const double & | value,
 |  | float & | newvalue
 | ) | [inherited]

Definition at line 719 of file BackwardMapping.cpp.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_ | ( | const double & | value,
 |  | OutputStorageType & | newvalue
 | ) | [protected, virtual, inherited]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 690 of file BackwardMapping.cpp.

References max, min, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected, inherited]

use jacobian of mapping function to do anisotropic antialiasing

Definition at line 591 of file BackwardMapping.cpp.

References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Matrix< T >::GetData(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::Matrix2x2< T >::Transpose().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox | ( | unsigned int | ,
 |  | unsigned int | ,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [inline, virtual, inherited]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates can be negative ! The br position is the first pixel outside the region(as for a ROI). Implement this in a derived class for speeding up calculation.

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 149 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< InputStorageType > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 506 of file BackwardMapping.cpp.

References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual, inherited]

numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 55 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int ProjectionMapping::GetSourceCoordinates_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected, virtual]

reimplementation for Pixel transformation, takes sink and computes coords in source

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 66 of file ProjectionMapping.cpp.

References BIAS::Projection::Project(), BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SinkP_, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SourceP_, and BIAS::Projection::UnProjectToPoint().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 532 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected, inherited]

takes jacobian to compute gaussian kernel for anisotropic smoothing

Definition at line 728 of file BackwardMapping.cpp.

References a, BIAS::Matrix< T >::GetData(), BIAS::Matrix2x2< T >::Invert(), and TNT::Matrix< T >::num_cols().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map ( Image< OutputStorageType > & sink ) [inherited]

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

Definition at line 223 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::MapTrilinear.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) | [inherited]

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

Definition at line 170 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_ | ( | const Image< InputStorageType > & | source,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected, inherited]

bilinear, bicubc and nearest neighbor interpolation

Definition at line 238 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_, BIASERR, BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ImageBase::GetSize(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), BIAS::ROI::IsInROI(), BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_, and value.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_ ( Image< OutputStorageType > & sink ) [protected, inherited]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

Definition at line 363 of file BackwardMapping.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::PyramidImage< StorageType >::IsEmpty(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
ProjectionMapping< InputStorageType, OutputStorageType > & ProjectionMapping::operator= ( const ProjectionMapping< InputStorageType, OutputStorageType > & src )

required because of const members

Author:
Jan Woetzel

Definition at line 57 of file ProjectionMapping.cpp.

References BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SinkP_, and BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SourceP_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize ( const int newsize ) [inherited]

sets pyramid size to pyramid and updates if neccessary

Definition at line 135 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, BIAS::PyramidImage< StorageType >::SetPyramidSize(), and BIAS::ImageBase::StealImage().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
void BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SetSinkCam ( const Projection & P ) [inline]

set your sink projection before calling Map()

Definition at line 63 of file ProjectionMapping.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SetSourceCam ( const Projection & P ) [inline]

set your source projection before calling Map()

Definition at line 61 of file ProjectionMapping.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize ( const Image< OutputStorageType > & sink ) [virtual, inherited]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Definition at line 86 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::ImageBase::GetHeight(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_ [protected, inherited]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_().

template<class InputStorageType, class OutputStorageType>
BIAS::Image<float> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_ [protected, inherited]

Definition at line 298 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_ [protected, inherited]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::height_ [protected, inherited]

Definition at line 296 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_ [protected, inherited]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
PyramidImage<InputStorageType> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_ [protected, inherited]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_ [protected, inherited]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_().

template<class InputStorageType, class OutputStorageType>
ROI BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_ [protected, inherited]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
Projection BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SinkP_ [protected]

Definition at line 73 of file ProjectionMapping.hh.

Referenced by BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), and BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::operator=().

template<class InputStorageType, class OutputStorageType>
Projection BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SourceP_ [protected]

the projections for backward mapping: run over sink and compute source

Definition at line 73 of file ProjectionMapping.hh.

Referenced by BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), and BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::operator=().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::width_ [protected, inherited]

Definition at line 295 of file BackwardMapping.hh.

The documentation for this class was generated from the following files:
  • Image/ProjectionMapping.hh
  • Image/ProjectionMapping.cpp
Generated on Wed Jun 21 19:09:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersBase

BIAS::ProjectionParametersBase Class Reference

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

#include <Geometry/ProjectionParametersBase.hh>

Inheritance diagram for BIAS::ProjectionParametersBase:

[legend]
Collaboration diagram for BIAS::ProjectionParametersBase:

[legend]
List of all members.

Public Member Functions

virtual ProjectionParametersBase * | Clone () const =0
covariant virtual copy constructor for use in Projection
bool | DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
virtual bool | DoesPointProjectIntoImageLocal (const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
double | GetAspectratio () const
return aspectratio = cellSizeX_ / cellSizeY_;
virtual Vector3< double > | GetC () const
get projection center
virtual Matrix< POSE_TYPE > | GetCov () const
return pose covariance as 7x7 matrix C,Q
virtual Matrix3x4< double > | GetExternals () const
return cached 3x4 RC representation
int | GetImageSize (unsigned int &Width, unsigned int &Height) const
return image dimensions
virtual const Pose & | GetPose () const
return complete pose object
PoseParametrization | GetPoseParametrization () const
int | GetPrincipal (double &PrincipalX, double &PrincipalY) const
get principal point, x in pixels relative to top left corner
virtual Quaternion< double > | GetQ () const
return Q of rotation
virtual BIAS::RMatrix | GetR () const
return rotation matrix R
virtual ProjectionParametersBase & | operator= (const ProjectionParametersBase &p)
HomgPoint2D | Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before
ProjectionParametersBase ()
virtual HomgPoint2D | ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const =0
calculates the projection of a point in the local camera coordinate system to a pixel in the image plane of the camera
virtual void | Rescale (float ratio)
adapt internal params to resampled image
virtual void | SetAspectratio (const double AspectRatio)
Set CCDaspect ratio = cellSizeX_ / cellSizeY_.
virtual void | SetC (const BIAS::Vector3< double > &C)
virtual void | SetCov (const Matrix< POSE_TYPE > &Cov)
virtual void | SetImageSize (const unsigned int w, const unsigned int h)
virtual void | SetPose (const BIAS::Pose pose)
void | SetPoseParametrization (const PoseParametrization &pp)
virtual void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
virtual void | SetQ (const BIAS::Quaternion< double > &Q)
virtual void | SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
virtual void | SetR (const BIAS::RMatrix &R)
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const
unscented transform worker function
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false)
unprojects the covariance matrices to K=Identity camera
virtual Vector3< double > | UnProjectLocal (const HomgPoint2D &pos, bool IgnoreDistortion=false) const =0
calculates the unit size viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.
virtual Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.
virtual double | ViewDifference (const ProjectionParametersBase *) const
returns difference of two projections like | C1-C2 |
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~ProjectionParametersBase ()

Protected Member Functions

void | AddDebugLevel (long int lv)
void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const

Static Protected Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | aspectratio_
aspectratio of the camera CCD
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
unsigned int | height_
height of image in pixels
double | Kappa_
kappa is a secondary scaling parameter.
Pose Pose_
double | principalX_
Principal Point Pixel Coordinates (one for all zoom settings).
double | principalY_
bool | ustIgnoreDistortion_
bool | ustTransformIntoImage_
unscented transform worker variables
unsigned int | width_
width of image in pixels

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)

Detailed Description

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose

Author:
koeser/evers/streckel

Definition at line 55 of file ProjectionParametersBase.hh.

Constructor & Destructor Documentation

BIAS::ProjectionParametersBase::ProjectionParametersBase ( ) [inline]

Definition at line 63 of file ProjectionParametersBase.hh.

virtual BIAS::ProjectionParametersBase::~ProjectionParametersBase ( ) [inline, virtual]

Definition at line 85 of file ProjectionParametersBase.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

virtual ProjectionParametersBase* BIAS::ProjectionParametersBase::Clone ( ) const [pure virtual]

covariant virtual copy constructor for use in Projection

Implemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by BIAS::Projection::Projection().

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImage | ( | const HomgPoint3D & | X,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 92 of file ProjectionParametersBase.hh.

References BIAS::HomgPoint3D::GetEuclidian().

virtual bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImageLocal | ( | const Vector3< double > & | localX,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, virtual]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 106 of file ProjectionParametersBase.hh.

References BIASERR.

double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline]

return aspectratio = cellSizeX_ / cellSizeY_;

Definition at line 213 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), and BIAS::ProjectionGUI::UpdateGUI().

virtual Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const [inline, virtual]

get projection center

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 179 of file ProjectionParametersBase.hh.

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), BIAS::ProjectionParametersPerspective::ViewDifference(), and XMLOut().

virtual Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual]

return pose covariance as 7x7 matrix C,Q

Definition at line 188 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual]

return cached 3x4 RC representation

Definition at line 202 of file ProjectionParametersBase.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ProjectionParametersBase::GetImageSize | ( | unsigned int & | Width,
 |  | unsigned int & | Height
 | ) | const [inline]

return image dimensions

Definition at line 206 of file ProjectionParametersBase.hh.

Referenced by MainFrame::DrawDistortedLine(), GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

virtual const Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual]

return complete pose object

Definition at line 191 of file ProjectionParametersBase.hh.

PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline]

Definition at line 195 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersBase::GetPrincipal | ( | double & | PrincipalX,
 |  | double & | PrincipalY
 | ) | const [inline]

get principal point, x in pixels relative to top left corner

Definition at line 218 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

virtual Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual]

return Q of rotation

Definition at line 182 of file ProjectionParametersBase.hh.

Referenced by GetR(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), BIAS::ProjectionGUI::UpdateGUI(), and XMLOut().

RMatrix ProjectionParametersBase::GetR ( ) const [virtual]

return rotation matrix R

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 35 of file ProjectionParametersBase.cpp.

References GetQ(), R, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), and BIAS::ProjectionParametersPerspective::ViewDifference().

virtual ProjectionParametersBase& BIAS::ProjectionParametersBase::operator= ( const ProjectionParametersBase & p ) [inline, virtual]

Definition at line 74 of file ProjectionParametersBase.hh.

References aspectratio_, height_, Pose_, principalX_, principalY_, and width_.

Referenced by BIAS::ProjectionParametersSpherical::operator=(), and BIAS::ProjectionParametersPerspective::operator=().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HomgPoint2D BIAS::ProjectionParametersBase::Project | ( | const HomgPoint3D & | X,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before

Author:
woelk 05/2006

Definition at line 120 of file ProjectionParametersBase.hh.

virtual HomgPoint2D BIAS::ProjectionParametersBase::ProjectLocal | ( | const Vector3< double > & | point,
 |  | bool | IgnoreDistortion = false
 | ) | const [pure virtual]

calculates the projection of a point in the local camera coordinate system to a pixel in the image plane of the camera

In the simplest case perspective pinhole projection x = K * point where point is transformed of X using point = (R^T | -R^T C) X

Implemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by Transform_().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

virtual void BIAS::ProjectionParametersBase::Rescale ( float ratio ) [inline, virtual]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample /attention only delivers correct results if ratio is chosen to rescale image size to integral image size in both directions. Image size is rounded!

Reimplemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Definition at line 252 of file ProjectionParametersBase.hh.

References BIASERR, and BIAS::Equal().

Referenced by BIAS::ProjectionParametersSpherical::Rescale(), and BIAS::ProjectionParametersPerspective::Rescale().

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetAspectratio ( const double AspectRatio ) [inline, virtual]

Set CCDaspect ratio = cellSizeX_ / cellSizeY_.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective.

Definition at line 229 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), and BIAS::ProjectionParametersPerspective::SetK().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetC ( const BIAS::Vector3< double > & C ) [inline, virtual]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 271 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > & Cov ) [inline, virtual]

Definition at line 286 of file ProjectionParametersBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetImageSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [inline, virtual]

Definition at line 240 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective(), GenerateProjection(), BiasShowEpiApp::OnInit(), MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose pose ) [inline, virtual]

Definition at line 277 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersBase::SetPoseParametrization ( const PoseParametrization & pp ) [inline]

Definition at line 198 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inline, virtual]

Set principal point in pixels relative to top left corner.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersZoom.

Definition at line 235 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersPerspective::SetK(), BIAS::ProjectionParametersZoom::SetPrincipal(), and BIAS::ProjectionParametersPerspective::SetPrincipal().

virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > & Q ) [inline, virtual]

Definition at line 269 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetQC | ( | const BIAS::Quaternion< double > & | Q,
 |  | const BIAS::Vector3< double > & | C
 | ) | [inline, virtual]

Definition at line 273 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix & R ) [inline, virtual]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 280 of file ProjectionParametersBase.hh.

References BIAS::RMatrixBase::GetQuaternion().

Referenced by SetRotation().

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and UnProjectLocal().

void ProjectionParametersBase::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [virtual]

unscented transform worker function

Author:
koeser

Implements BIAS::UnscentedTransform.

Definition at line 161 of file ProjectionParametersBase.cpp.

References BIASASSERT, ProjectLocal(), TNT::Vector< T >::size(), UnProjectLocal(), ustIgnoreDistortion_, and ustTransformIntoImage_.

Matrix3x3< double > ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | bool | IgnoreDistortion = false
 | ) | [virtual]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Definition at line 179 of file ProjectionParametersBase.cpp.

References BIAS::MatrixZero, BIAS::UnscentedTransform::Transform(), ustIgnoreDistortion_, and ustTransformIntoImage_.

virtual Vector3<double> BIAS::ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [pure virtual]

calculates the unit size viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.

pos=principal point results in (0,0,1)=optical axis

Implemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by Transform_().

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Reimplemented in BIAS::ProjectionParametersSpherical.

Definition at line 149 of file ProjectionParametersBase.cpp.

References BIASERR, and BIAS::Vector3< T >::NormL2().

Vector3<double> BIAS::ProjectionParametersBase::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline]

calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Author:
woelk 05/2006

Definition at line 157 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and R.

double ProjectionParametersBase::ViewDifference ( const ProjectionParametersBase * ) const [virtual]

returns difference of two projections like | C1-C2 |

This function can be used for inter camera distance and ordering purposes

Author:
koeser 03/2006

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 140 of file ProjectionParametersBase.cpp.

References BIASABORT, and BIASERR.

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int ProjectionParametersBase::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Implements BIAS::XMLBase.

Reimplemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Definition at line 48 of file ProjectionParametersBase.cpp.

Referenced by BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::ProjectionParametersPerspective::XMLIn(), BIAS::ProjectionParametersZoom::XMLOut(), BIAS::ProjectionParametersSpherical::XMLOut(), and BIAS::ProjectionParametersPerspective::XMLOut().

int ProjectionParametersBase::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Implements BIAS::XMLBase.

Reimplemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Definition at line 91 of file ProjectionParametersBase.cpp.

References aspectratio_, BIASERR, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getChild(), BIAS::Vector4< QUAT_TYPE >::GetData(), BIAS::XMLIO::getNodeContentString(), height_, Pose_, principalX_, principalY_, BIAS::Pose::Set(), and width_.

Referenced by BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), and BIAS::ProjectionParametersPerspective::XMLIn().

int ProjectionParametersBase::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Implements BIAS::XMLBase.

Reimplemented in BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Definition at line 56 of file ProjectionParametersBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), aspectratio_, GetC(), BIAS::Vector4< QUAT_TYPE >::GetData(), GetQ(), height_, principalX_, principalY_, STREAM_PRECISION, and width_.

Referenced by BIAS::ProjectionParametersZoom::XMLOut(), BIAS::ProjectionParametersSpherical::XMLOut(), and BIAS::ProjectionParametersPerspective::XMLOut().

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [friend]

Definition at line 336 of file ProjectionParametersBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected]

aspectratio of the camera CCD

Definition at line 329 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), operator=(), XMLIn(), and XMLOut().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected]

height of image in pixels

Definition at line 323 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), XMLIn(), and XMLOut().

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

Pose BIAS::ProjectionParametersBase::Pose_ [protected]

Definition at line 318 of file ProjectionParametersBase.hh.

Referenced by operator=(), XMLIn(), and BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::ProjectionParametersBase::principalX_ [protected]

Principal Point Pixel Coordinates (one for all zoom settings).

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::operator<<(), operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), XMLIn(), and XMLOut().

double BIAS::ProjectionParametersBase::principalY_ [protected]

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), XMLIn(), and XMLOut().

bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_ [protected]

Definition at line 333 of file ProjectionParametersBase.hh.

Referenced by Transform_(), and UnProjectLocal().

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_ [protected]

unscented transform worker variables

Definition at line 332 of file ProjectionParametersBase.hh.

Referenced by Transform_(), and UnProjectLocal().

unsigned int BIAS::ProjectionParametersBase::width_ [protected]

width of image in pixels

Definition at line 321 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), XMLIn(), and XMLOut().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersBase.hh
  • Geometry/ProjectionParametersBase.cpp
Generated on Wed Jun 21 19:09:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersIO Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersIO

BIAS::ProjectionParametersIO Class Reference

#include <Geometry/ProjectionParametersIO.hh>

List of all members.

Static Public Member Functions

static int | ReadCameraData (const std::string &Filename, CameraData &cd)
Read a camera data parameter file and store the data in (*this).
static int | ReadFromEXIF (const std::string &filename, CameraData &cd)
read jpeg EXIF header and set camera parameter
static int | ReadRigData (const std::string &filename, std::vector< CameraData > &vcd, std::vector< SensorData > &vsd)
static int | ReadRigData (const std::string &filename, std::vector< CameraData > &vcd)
Read a rig parameter file and store the data in (*this) the Camera-, Center-, RMatrix-, and KMatrix-Vectors are reset from the file.
static void | SetData_DummyRig (std::vector< CameraData > &vcd)
static void | SetData_EVID31_147094 (CameraData &cd)
static void | SetData_OMNITECH_ORIFL_190_3 (CameraData &cd)
static int | SetFromKMatrix (const BIAS::KMatrix &K, const int w, const int h, CameraData &cd)
pass K and image dims to construct a simple parameter file
static int | WriteCameraData (const std::string &Filename, const CameraData &cd)
Write all data to a camera data parameter file ).
static int | WriteRigData (const std::string &filename, const std::vector< CameraData > &vcd, const std::vector< SensorData > &vsd=std::vector< SensorData >(0, SensorData()))
Write all data camera data and camera positions in the rig to a rig parameter file in XML-notation.

Static Protected Member Functions

static int | AddCameraDataToNode (XMLIO &myXML, xmlNodePtr &rootNode, const CameraData &cd)
static int | AddCameraDataToRig (XMLIO &myXML, xmlNodePtr &cameraDataNode, const CameraData &cd)
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.
static void | Initialize (CameraData &cd)
default zero initialization for a single camera
static void | InitializeSensor (SensorData &sd)
default zero initialization for a single sensor
static int | ReadCameraData (XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd)
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.
static int | ReadCameraDataV0_8 (XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd)
static int | ReadCameraDataV1_0 (XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd)
static int | ReadRigDataV0_8 (const std::string &filename, std::vector< CameraData > &vcd)
Reading old file versions.

Detailed Description

Definition at line 128 of file ProjectionParametersIO.hh.

Member Function Documentation

int ProjectionParametersIO::AddCameraDataToNode | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | rootNode,
 |  | const CameraData & | cd
 | ) | [static, protected]

Definition at line 418 of file ProjectionParametersIO.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::aspectratio_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::height_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, and BIAS::CameraData::width_.

Referenced by AddCameraDataToRig().

int ProjectionParametersIO::AddCameraDataToRig | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraDataNode,
 |  | const CameraData & | cd
 | ) | [static, protected]

Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
cameraDataNode | points to a "CameraData"-node to append the "Camera"-node
Author:
streckel 06/2004

Definition at line 404 of file ProjectionParametersIO.cpp.

References BIAS::XMLIO::addAttribute(), AddCameraDataToNode(), and BIAS::XMLIO::addChildNode().

Referenced by WriteRigData().

void ProjectionParametersIO::Initialize ( CameraData & cd ) [static, protected]

default zero initialization for a single camera

Definition at line 34 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::CameraData::focallengthDef_, BIAS::CameraData::height_, BIAS::CameraData::IlluCorrX_, BIAS::CameraData::IlluCorrY_, BIAS::CameraData::kc1Def_, BIAS::CameraData::kc2Def_, BIAS::CameraData::kc3Def_, BIAS::CameraData::kc4Def_, BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::PoseInRigCenter_, BIAS::CameraData::PoseInRigPitch_, BIAS::CameraData::PoseInRigRoll_, BIAS::CameraData::PoseInRigYaw_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, BIAS::CameraData::radius_, BIAS::Vector3< T >::SetZero(), BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

Referenced by ReadCameraData(), ReadCameraDataV0_8(), ReadCameraDataV1_0(), ReadFromEXIF(), SetData_DummyRig(), SetData_EVID31_147094(), SetData_OMNITECH_ORIFL_190_3(), and SetFromKMatrix().

void ProjectionParametersIO::InitializeSensor ( SensorData & sd ) [static, protected]

default zero initialization for a single sensor

Definition at line 60 of file ProjectionParametersIO.cpp.

References BIAS::SensorData::PoseInRigCenter_, BIAS::SensorData::PoseInRigPitch_, BIAS::SensorData::PoseInRigRoll_, BIAS::SensorData::PoseInRigYaw_, and BIAS::Vector3< T >::SetZero().

int ProjectionParametersIO::ReadCameraData | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode,
 |  | CameraData & | cd
 | ) | [static, protected]

Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
cameraNode | points to a "Camera"-node to evaluate
Author:
streckel 06/2004

Definition at line 528 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::aspectratio_, BIASERR, BIASWARN, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::CameraData::height_, Initialize(), BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, ReadCameraDataV0_8(), ReadCameraDataV1_0(), BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

int ProjectionParametersIO::ReadCameraData | ( | const std::string & | Filename,
 |  | CameraData & | cd
 | ) | [static]

Read a camera data parameter file and store the data in (*this).

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Camera"
Author:
streckel 06/2004

Definition at line 506 of file ProjectionParametersIO.cpp.

References BIASERR, BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().

int ProjectionParametersIO::ReadCameraDataV0_8 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode,
 |  | CameraData & | cd
 | ) | [static, protected]

Definition at line 912 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::aspectratio_, BIASERR, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::CameraData::height_, Initialize(), BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

Referenced by ReadCameraData().

int ProjectionParametersIO::ReadCameraDataV1_0 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode,
 |  | CameraData & | cd
 | ) | [static, protected]

Definition at line 717 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::aspectratio_, BIASERR, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentDouble(), BIAS::XMLIO::getNodeContentInt(), BIAS::XMLIO::getNodeName(), BIAS::CameraData::height_, BIAS::CameraData::IlluCorrX_, BIAS::CameraData::IlluCorrY_, Initialize(), BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

Referenced by ReadCameraData().

int ProjectionParametersIO::ReadFromEXIF | ( | const std::string & | filename,
 |  | CameraData & | cd
 | ) | [static]

read jpeg EXIF header and set camera parameter

Returns:
0 on success
Author:
koeser 07/2005

Definition at line 70 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::aspectratio_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::CameraData::focallengthDef_, BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetHardwareName(), BIAS::ImageAttributes::GetImageDimensions(), BIAS::ImageAttributes::GetPixelSizeXMeter(), BIAS::ImageAttributes::GetPixelSizeYMeter(), BIAS::ImageAttributes::GetPrincipalPoint(), BIAS::CameraData::height_, BIAS::ImageAttributes::InitExifTags(), Initialize(), BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, BIAS::ImageAttributes::Read(), BIAS::CameraData::width_, and BIAS::CameraData::zoomCamera_.

int ProjectionParametersIO::ReadRigData | ( | const std::string & | filename,
 |  | std::vector< CameraData > & | vcd,
 |  | std::vector< SensorData > & | vsd
 | ) | [static]

Definition at line 209 of file ProjectionParametersIO.cpp.

References BIASERR, BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().

int ProjectionParametersIO::ReadRigData | ( | const std::string & | filename,
 |  | std::vector< CameraData > & | vcd
 | ) | [static]

Read a rig parameter file and store the data in (*this) the Camera-, Center-, RMatrix-, and KMatrix-Vectors are reset from the file.

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Rig"
Author:
streckel 06/2004

Definition at line 197 of file ProjectionParametersIO.cpp.

References BIASERR.

int ProjectionParametersIO::ReadRigDataV0_8 | ( | const std::string & | filename,
 |  | std::vector< CameraData > & | vcd
 | ) | [static, protected]

Reading old file versions.

Definition at line 328 of file ProjectionParametersIO.cpp.

References BIASERR, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::CameraData::PoseInRigCenter_, BIAS::CameraData::PoseInRigPitch_, BIAS::CameraData::PoseInRigRoll_, BIAS::CameraData::PoseInRigYaw_, and BIAS::XMLIO::read().

void ProjectionParametersIO::SetData_DummyRig ( std::vector< CameraData > & vcd ) [static]

Definition at line 1379 of file ProjectionParametersIO.cpp.

References Initialize(), BIAS::CameraData::PoseInRigCenter_, BIAS::CameraData::PoseInRigPitch_, BIAS::CameraData::PoseInRigRoll_, BIAS::CameraData::PoseInRigYaw_, SetData_EVID31_147094(), SetData_OMNITECH_ORIFL_190_3(), and BIAS::Vector3< T >::SetZero().

void ProjectionParametersIO::SetData_EVID31_147094 ( CameraData & cd ) [static]

Definition at line 1082 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::aspectratio_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::CameraData::height_, Initialize(), BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, and BIAS::CameraData::width_.

Referenced by SetData_DummyRig().

void ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3 ( CameraData & cd ) [static]

Definition at line 1286 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::AngleCorrX_, BIAS::CameraData::AngleCorrY_, BIAS::CameraData::aspectratio_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::CameraData::height_, BIAS::CameraData::IlluCorrX_, BIAS::CameraData::IlluCorrY_, Initialize(), BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, BIAS::CameraData::radius_, and BIAS::CameraData::width_.

Referenced by SetData_DummyRig().

int ProjectionParametersIO::SetFromKMatrix | ( | const BIAS::KMatrix & | K,
 |  | const int | w,
 |  | const int | h,
 |  | CameraData & | cd
 | ) | [static]

pass K and image dims to construct a simple parameter file

Definition at line 115 of file ProjectionParametersIO.cpp.

References BIAS::CameraData::aspectratio_, BIAS::CameraData::CamID_, BIAS::CameraData::CamModel_, BIAS::CameraData::cellSizeX_, BIAS::CameraData::cellSizeY_, BIAS::CameraData::focallengthDef_, BIAS::CameraData::height_, Initialize(), BIAS::CameraData::knownparams_vect_, BIAS::CameraData::LensIsSpherical_, BIAS::CameraData::LensModel_, BIAS::CameraData::principalX_, BIAS::CameraData::principalY_, and BIAS::CameraData::width_.

int ProjectionParametersIO::WriteCameraData | ( | const std::string & | Filename,
 |  | const CameraData & | cd
 | ) | [static]

Write all data to a camera data parameter file ).

Parameters:
Filename Name of the XML-camera-data-file, document tag will be to be "Camera"
Author:
streckel 06/2004

Definition at line 389 of file ProjectionParametersIO.cpp.

References BIAS::XMLIO::addAttribute(), CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::XMLIO::create(), and BIAS::XMLIO::write().

int ProjectionParametersIO::WriteRigData | ( | const std::string & | filename,
 |  | const std::vector< CameraData > & | vcd,
 |  | const std::vector< SensorData > & | vsd = std::vector< SensorData >(0, SensorData())
 | ) | [static]

Write all data camera data and camera positions in the rig to a rig parameter file in XML-notation.

Parameters:
Filename Name of the XML-rig-data-file, document tag will be to be "Rig"
Author:
streckel 06/2004

Definition at line 146 of file ProjectionParametersIO.cpp.

References BIAS::XMLIO::addAttribute(), AddCameraDataToRig(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::XMLIO::addContent(), and BIAS::XMLIO::create().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersIO.hh
  • Geometry/ProjectionParametersIO.cpp
Generated on Wed Jun 21 19:09:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersPerspective Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersPerspective

BIAS::ProjectionParametersPerspective Class Reference

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

#include <Geometry/ProjectionParametersPerspective.hh>

Inheritance diagram for BIAS::ProjectionParametersPerspective:

[legend]
Collaboration diagram for BIAS::ProjectionParametersPerspective:

[legend]
List of all members.

Public Member Functions

virtual ProjectionParametersPerspective * | Clone () const
covariant virtual copy constructor for use in Projection
void | Distort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.
bool | DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
bool | DoesPointProjectIntoImageLocal (const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
double | GetAspectratio () const
return aspectratio = cellSizeX_ / cellSizeY_;
virtual Vector3< double > | GetC () const
get projection center
virtual Matrix< POSE_TYPE > | GetCov () const
return pose covariance as 7x7 matrix C,Q
virtual Matrix3x4< double > | GetExternals () const
return cached 3x4 RC representation
int | GetFocalLength (double &f) const
Get the current camera focal length.
int | GetImageSize (unsigned int &Width, unsigned int &Height) const
return image dimensions
virtual BIAS::KMatrix | GetK () const
virtual BIAS::KMatrix | GetKinv () const
virtual BIAS::PMatrix | GetP () const
virtual const Pose & | GetPose () const
return complete pose object
PoseParametrization | GetPoseParametrization () const
int | GetPrincipal (double &PrincipalX, double &PrincipalY) const
get principal point, x in pixels relative to top left corner
virtual Quaternion< double > | GetQ () const
return Q of rotation
virtual BIAS::RMatrix | GetR () const
return rotation matrix R
void | GetUndistortion (double &kc1, double &kc2, double &kc3, double &kc4) const
ProjectionParametersPerspective & | operator= (const ProjectionParametersPerspective &P)
HomgPoint2D | Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before
ProjectionParametersPerspective (const ProjectionParametersPerspective &P)
ProjectionParametersPerspective ()
virtual HomgPoint2D | ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const
calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera with lens distortion In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X
virtual void | Rescale (float ratio)
adapt internal params to resampled image
virtual void | SetAspectratio (const double AspectRatio)
Set CCD cell-size in meter, virtual overload to recalculate K_.
virtual void | SetC (const BIAS::Vector3< double > &C)
virtual void | SetCov (const Matrix< POSE_TYPE > &Cov)
void | SetFocalLengthAndAspect (double f, double AspectRatio)
Set the current camera focal length in pixel and the a spect ratio.
virtual void | SetImageSize (const unsigned int w, const unsigned int h)
virtual void | SetK (const KMatrix &K)
sets the internal parameters from a given KMatrix and updates the cached K and its inverse
virtual void | SetP (const PMatrix &P)
set from P
virtual void | SetPose (const BIAS::Pose pose)
void | SetPoseParametrization (const PoseParametrization &pp)
virtual void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner, virtual overload to recalculate K_.
virtual void | SetQ (const BIAS::Quaternion< double > &Q)
virtual void | SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
virtual void | SetR (const BIAS::RMatrix &R)
void | SetUndistortion (double kc1, double kc2, double kc3, double kc4)
Set the lens undistortion parameters.
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const
unscented transform worker function
void | Undistort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates.
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false)
unprojects the covariance matrices to K=Identity camera
virtual Vector3< double > | UnProjectLocal (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos with lens distortion e.g.
virtual Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.
virtual double | ViewDifference (const ProjectionParametersBase *pPPB) const
returns difference of two projections like | C1-C2 |
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~ProjectionParametersPerspective ()

Protected Member Functions

void | AddDebugLevel (long int lv)
void ComputeK_ ()
computes the cached KMatrix and its inverse call after every parameter change
void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const

Static Protected Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | aspectratio_
aspectratio of the camera CCD
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
double | focallength_
unsigned int | height_
height of image in pixels
KMatrix invK_
KMatrix K_
double | Kappa_
kappa is a secondary scaling parameter.
double | kc1_
double | kc2_
double | kc3_
double | kc4_
Pose Pose_
double | principalX_
Principal Point Pixel Coordinates (one for all zoom settings).
double | principalY_
bool | ustIgnoreDistortion_
bool | ustTransformIntoImage_
unscented transform worker variables
unsigned int | width_
width of image in pixels

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)
std::ostream & | operator<< (std::ostream &os, ProjectionParametersPerspective &p)

Detailed Description

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose

Author:
koeser/evers/streckel

Definition at line 43 of file ProjectionParametersPerspective.hh.

Constructor & Destructor Documentation

BIAS::ProjectionParametersPerspective::ProjectionParametersPerspective ( ) [inline]

Definition at line 47 of file ProjectionParametersPerspective.hh.

BIAS::ProjectionParametersPerspective::ProjectionParametersPerspective ( const ProjectionParametersPerspective & P ) [inline]

Definition at line 59 of file ProjectionParametersPerspective.hh.

virtual BIAS::ProjectionParametersPerspective::~ProjectionParametersPerspective ( ) [inline, virtual]

Definition at line 76 of file ProjectionParametersPerspective.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

virtual ProjectionParametersPerspective* BIAS::ProjectionParametersPerspective::Clone ( ) const [inline, virtual]

covariant virtual copy constructor for use in Projection

Implements BIAS::ProjectionParametersBase.

Definition at line 115 of file ProjectionParametersPerspective.hh.

void ProjectionParametersPerspective::ComputeK_ ( ) [protected]

computes the cached KMatrix and its inverse call after every parameter change

Definition at line 243 of file ProjectionParametersPerspective.cpp.

References BIAS::ProjectionParametersBase::aspectratio_, focallength_, BIAS::KMatrix::Invert(), invK_, K_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by XMLIn().

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void ProjectionParametersPerspective::Distort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.

Inverse to the undistort function. TODO: faster implementation via Lookup-table

Author:
streckel 06/2004

Definition at line 97 of file ProjectionParametersPerspective.cpp.

References focallength_, BIAS::ProjectionParametersBase::GetAspectratio(), BIAS::HomgPoint2D::Homogenize(), kc1_, kc2_, kc3_, kc4_, BIAS::ProjectionParametersBase::principalX_, and BIAS::ProjectionParametersBase::principalY_.

Referenced by MainFrame::DrawDistortedLine(), and ProjectLocal().

bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImage | ( | const HomgPoint3D & | X,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 92 of file ProjectionParametersBase.hh.

References BIAS::HomgPoint3D::GetEuclidian().

bool ProjectionParametersPerspective::DoesPointProjectIntoImageLocal | ( | const Vector3< double > & | localX,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 33 of file ProjectionParametersPerspective.cpp.

References BIAS::ProjectionParametersBase::height_, BIAS::HomgPoint2D::Homogenize(), ProjectLocal(), and BIAS::ProjectionParametersBase::width_.

double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline, inherited]

return aspectratio = cellSizeX_ / cellSizeY_;

Definition at line 213 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::Distort(), Distort(), BIAS::ProjectionParametersZoom::Undistort(), Undistort(), and BIAS::ProjectionGUI::UpdateGUI().

virtual Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const [inline, virtual, inherited]

get projection center

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 179 of file ProjectionParametersBase.hh.

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), ViewDifference(), and BIAS::ProjectionParametersBase::XMLOut().

virtual Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual, inherited]

return pose covariance as 7x7 matrix C,Q

Definition at line 188 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual, inherited]

return cached 3x4 RC representation

Definition at line 202 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersPerspective::GetFocalLength ( double & f ) const [inline]

Get the current camera focal length.

Author:
buck

Definition at line 121 of file ProjectionParametersPerspective.hh.

Referenced by GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ProjectionParametersBase::GetImageSize | ( | unsigned int & | Width,
 |  | unsigned int & | Height
 | ) | const [inline, inherited]

return image dimensions

Definition at line 206 of file ProjectionParametersBase.hh.

Referenced by MainFrame::DrawDistortedLine(), GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

virtual BIAS::KMatrix BIAS::ProjectionParametersPerspective::GetK ( ) const [inline, virtual]

Definition at line 178 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), and ViewDifference().

virtual BIAS::KMatrix BIAS::ProjectionParametersPerspective::GetKinv ( ) const [inline, virtual]

Definition at line 184 of file ProjectionParametersPerspective.hh.

virtual BIAS::PMatrix BIAS::ProjectionParametersPerspective::GetP ( ) const [inline, virtual]

Definition at line 172 of file ProjectionParametersPerspective.hh.

Referenced by MainFrame::OnLeftDown().

virtual const Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual, inherited]

return complete pose object

Definition at line 191 of file ProjectionParametersBase.hh.

PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline, inherited]

Definition at line 195 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersBase::GetPrincipal | ( | double & | PrincipalX,
 |  | double & | PrincipalY
 | ) | const [inline, inherited]

get principal point, x in pixels relative to top left corner

Definition at line 218 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

virtual Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual, inherited]

return Q of rotation

Definition at line 182 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), BIAS::ProjectionGUI::UpdateGUI(), and BIAS::ProjectionParametersBase::XMLOut().

RMatrix ProjectionParametersBase::GetR ( ) const [virtual, inherited]

return rotation matrix R

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 35 of file ProjectionParametersBase.cpp.

References BIAS::ProjectionParametersBase::GetQ(), R, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), and ViewDifference().

void BIAS::ProjectionParametersPerspective::GetUndistortion | ( | double & | kc1,
 |  | double & | kc2,
 |  | double & | kc3,
 |  | double & | kc4
 | ) | const [inline]

Definition at line 126 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

ProjectionParametersPerspective& BIAS::ProjectionParametersPerspective::operator= ( const ProjectionParametersPerspective & P ) [inline]

Definition at line 64 of file ProjectionParametersPerspective.hh.

References focallength_, invK_, K_, kc1_, kc2_, kc3_, kc4_, and BIAS::ProjectionParametersBase::operator=().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HomgPoint2D BIAS::ProjectionParametersBase::Project | ( | const HomgPoint3D & | X,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before

Author:
woelk 05/2006

Definition at line 120 of file ProjectionParametersBase.hh.

HomgPoint2D ProjectionParametersPerspective::ProjectLocal | ( | const Vector3< double > & | point,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera with lens distortion In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X

Implements BIAS::ProjectionParametersBase.

Definition at line 48 of file ProjectionParametersPerspective.cpp.

References Distort(), K_, and BIAS::Matrix3x3< T >::Mult().

Referenced by DoesPointProjectIntoImageLocal(), and MainFrame::OnLeftDown().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

virtual void BIAS::ProjectionParametersPerspective::Rescale ( float ratio ) [inline, virtual]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 212 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::Rescale().

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersPerspective::SetAspectratio ( const double AspectRatio ) [inline, virtual]

Set CCD cell-size in meter, virtual overload to recalculate K_.

Author:
streckel

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 155 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::SetAspectratio().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetC ( const BIAS::Vector3< double > & C ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 271 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > & Cov ) [inline, virtual, inherited]

Definition at line 286 of file ProjectionParametersBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect | ( | double | f,
 |  | double | AspectRatio
 | ) | [inline]

Set the current camera focal length in pixel and the a spect ratio.

Definition at line 137 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::SetAspectratio().

Referenced by BIAS::Projection::CreatePerspective(), and GenerateProjection().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetImageSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [inline, virtual, inherited]

Definition at line 240 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective(), GenerateProjection(), BiasShowEpiApp::OnInit(), MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersPerspective::SetK ( const KMatrix & K ) [inline, virtual]

sets the internal parameters from a given KMatrix and updates the cached K and its inverse

Definition at line 190 of file ProjectionParametersPerspective.hh.

References BIASASSERT, BIAS::KMatrix::Invert(), BIAS::ProjectionParametersBase::SetAspectratio(), and BIAS::ProjectionParametersBase::SetPrincipal().

Referenced by MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersPerspective::SetP ( const PMatrix & P ) [inline, virtual]

set from P

Definition at line 200 of file ProjectionParametersPerspective.hh.

References BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetR(), and p.

Referenced by BiasShowEpiApp::OnInit().

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose pose ) [inline, virtual, inherited]

Definition at line 277 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersBase::SetPoseParametrization ( const PoseParametrization & pp ) [inline, inherited]

Definition at line 198 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersPerspective::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inline, virtual]

Set principal point in pixels relative to top left corner, virtual overload to recalculate K_.

Author:
streckel

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 147 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::SetPrincipal().

Referenced by BIAS::Projection::CreatePerspective(), and GenerateProjection().

virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > & Q ) [inline, virtual, inherited]

Definition at line 269 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetQC | ( | const BIAS::Quaternion< double > & | Q,
 |  | const BIAS::Vector3< double > & | C
 | ) | [inline, virtual, inherited]

Definition at line 273 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix & R ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 280 of file ProjectionParametersBase.hh.

References BIAS::RMatrixBase::GetQuaternion().

Referenced by SetRotation().

void BIAS::ProjectionParametersPerspective::SetUndistortion | ( | double | kc1,
 |  | double | kc2,
 |  | double | kc3,
 |  | double | kc4
 | ) | [inline]

Set the lens undistortion parameters.

Definition at line 161 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::Projection::CreatePerspective().

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

void ProjectionParametersBase::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [virtual, inherited]

unscented transform worker function

Author:
koeser

Implements BIAS::UnscentedTransform.

Definition at line 161 of file ProjectionParametersBase.cpp.

References BIASASSERT, BIAS::ProjectionParametersBase::ProjectLocal(), TNT::Vector< T >::size(), BIAS::ProjectionParametersBase::UnProjectLocal(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

void ProjectionParametersPerspective::Undistort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates.

TODO: faster implementation via Lookup-table

Author:
streckel 06/2004

Definition at line 137 of file ProjectionParametersPerspective.cpp.

References focallength_, BIAS::ProjectionParametersBase::GetAspectratio(), BIAS::HomgPoint2D::Homogenize(), kc1_, kc2_, kc3_, kc4_, BIAS::ProjectionParametersBase::principalX_, and BIAS::ProjectionParametersBase::principalY_.

Referenced by MainFrame::OnLeftDown(), and UnProjectLocal().

Matrix3x3< double > ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | bool | IgnoreDistortion = false
 | ) | [virtual, inherited]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Definition at line 179 of file ProjectionParametersBase.cpp.

References BIAS::MatrixZero, BIAS::UnscentedTransform::Transform(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Vector3< double > ProjectionParametersPerspective::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos with lens distortion e.g.

(0,0,1) means optical axis

Implements BIAS::ProjectionParametersBase.

Definition at line 58 of file ProjectionParametersPerspective.cpp.

References invK_, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and Undistort().

Referenced by MainFrame::DrawDistortedLine().

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual, inherited]

calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Reimplemented in BIAS::ProjectionParametersSpherical.

Definition at line 149 of file ProjectionParametersBase.cpp.

References BIASERR, and BIAS::Vector3< T >::NormL2().

Vector3<double> BIAS::ProjectionParametersBase::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Author:
woelk 05/2006

Definition at line 157 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and R.

double ProjectionParametersPerspective::ViewDifference ( const ProjectionParametersBase * pPPB ) const [virtual]

returns difference of two projections like | C1-C2 |

This function can be used for inter camera distance and ordering purposes

Author:
koeser 03/2006

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 255 of file ProjectionParametersPerspective.cpp.

References BIASERR, BIAS::ProjectionParametersBase::GetC(), GetK(), BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionParametersBase::height_, BIAS::Matrix< T >::Normalize(), R, and BIAS::ProjectionParametersBase::width_.

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int ProjectionParametersPerspective::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 187 of file ProjectionParametersPerspective.cpp.

int ProjectionParametersPerspective::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 215 of file ProjectionParametersPerspective.cpp.

References BIASERR, ComputeK_(), focallength_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getChild(), kc1_, kc2_, kc3_, kc4_, Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLIn().

int ProjectionParametersPerspective::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 194 of file ProjectionParametersPerspective.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), focallength_, kc1_, kc2_, kc3_, kc4_, Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLOut().

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [friend, inherited]

Definition at line 336 of file ProjectionParametersBase.hh.

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersPerspective & | p
 | ) | [friend]

Definition at line 254 of file ProjectionParametersPerspective.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected, inherited]

aspectratio of the camera CCD

Definition at line 329 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), ComputeK_(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersPerspective::focallength_ [protected]

Definition at line 248 of file ProjectionParametersPerspective.hh.

Referenced by ComputeK_(), Distort(), operator=(), Undistort(), XMLIn(), and XMLOut().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected, inherited]

height of image in pixels

Definition at line 323 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

KMatrix BIAS::ProjectionParametersPerspective::invK_ [protected]

Definition at line 245 of file ProjectionParametersPerspective.hh.

Referenced by ComputeK_(), operator=(), and UnProjectLocal().

KMatrix BIAS::ProjectionParametersPerspective::K_ [protected]

Definition at line 245 of file ProjectionParametersPerspective.hh.

Referenced by ComputeK_(), operator=(), and ProjectLocal().

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersPerspective::kc1_ [protected]

Definition at line 250 of file ProjectionParametersPerspective.hh.

Referenced by Distort(), operator=(), Undistort(), XMLIn(), and XMLOut().

double BIAS::ProjectionParametersPerspective::kc2_ [protected]

Definition at line 250 of file ProjectionParametersPerspective.hh.

Referenced by Distort(), operator=(), Undistort(), XMLIn(), and XMLOut().

double BIAS::ProjectionParametersPerspective::kc3_ [protected]

Definition at line 250 of file ProjectionParametersPerspective.hh.

Referenced by Distort(), operator=(), Undistort(), XMLIn(), and XMLOut().

double BIAS::ProjectionParametersPerspective::kc4_ [protected]

Definition at line 250 of file ProjectionParametersPerspective.hh.

Referenced by Distort(), operator=(), Undistort(), XMLIn(), and XMLOut().

Pose BIAS::ProjectionParametersBase::Pose_ [protected, inherited]

Definition at line 318 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::ProjectionParametersBase::principalX_ [protected, inherited]

Principal Point Pixel Coordinates (one for all zoom settings).

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersBase::principalY_ [protected, inherited]

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_ [protected, inherited]

Definition at line 333 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_ [protected, inherited]

unscented transform worker variables

Definition at line 332 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

unsigned int BIAS::ProjectionParametersBase::width_ [protected, inherited]

width of image in pixels

Definition at line 321 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersPerspective.hh
  • Geometry/ProjectionParametersPerspective.cpp
Generated on Wed Jun 21 19:09:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersProjective Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersProjective

BIAS::ProjectionParametersProjective Class Reference

12 parametric p for completely projective reconstruction scenarios, unknown focal lengths, self calibration, . More...

#include <Geometry/ProjectionParametersProjective.hh>

Inheritance diagram for BIAS::ProjectionParametersProjective:

[legend]
Collaboration diagram for BIAS::ProjectionParametersProjective:

[legend]
List of all members.

Public Member Functions

virtual ProjectionParametersProjective * | Clone () const
covariant virtual copy constructor for use in Projection
bool | DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
virtual bool | DoesPointProjectIntoImageLocal (const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
double | GetAspectratio () const
return aspectratio = cellSizeX_ / cellSizeY_;
virtual Vector3< double > | GetC () const
get projection center
virtual Matrix< POSE_TYPE > | GetCov () const
return pose covariance as 7x7 matrix C,Q
virtual Matrix3x4< double > | GetExternals () const
return cached 3x4 RC representation
int | GetImageSize (unsigned int &Width, unsigned int &Height) const
return image dimensions
virtual PMatrix | GetP () const
return the complete pmatrix (internals+externals / projective) used for projection
virtual const Pose & | GetPose () const
return complete pose object
PoseParametrization | GetPoseParametrization () const
int | GetPrincipal (double &PrincipalX, double &PrincipalY) const
get principal point, x in pixels relative to top left corner
virtual Quaternion< double > | GetQ () const
return Q of rotation
virtual RMatrix | GetR () const
return R (R^T which is in front part of PMatrix )
ProjectionParametersProjective & | operator= (const ProjectionParametersProjective &P)
HomgPoint2D | Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before
ProjectionParametersProjective (const ProjectionParametersProjective &P)
ProjectionParametersProjective ()
virtual HomgPoint2D | ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const
calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera
virtual void | Rescale (float ratio)
adapt internal params to resampled image
virtual void | SetAspectratio (const double AspectRatio)
Set CCDaspect ratio = cellSizeX_ / cellSizeY_.
void | SetC (const Vector3< double > &C)
virtual void | SetCov (const Matrix< POSE_TYPE > &Cov)
virtual void | SetImageSize (const unsigned int w, const unsigned int h)
void | SetP (const Matrix3x4< double > &P)
set 12 entries if projective P using a PMatrix
virtual void | SetPose (const BIAS::Pose pose)
void | SetPoseParametrization (const PoseParametrization &pp)
virtual void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
virtual void | SetQ (const BIAS::Quaternion< double > &Q)
virtual void | SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
void | SetR (const RMatrix &R)
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const
unscented transform worker function
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false)
unprojects the covariance matrices to K=Identity camera
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov, bool IgnoreDistortion=false) const
virtual Vector3< double > | UnProjectLocal (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.
virtual Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.
virtual double | ViewDifference (const ProjectionParametersBase *) const
returns difference of two projections like | C1-C2 |
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~ProjectionParametersProjective ()

Protected Member Functions

void | AddDebugLevel (long int lv)
void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const

Static Protected Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | aspectratio_
aspectratio of the camera CCD
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
unsigned int | height_
height of image in pixels
double | Kappa_
kappa is a secondary scaling parameter.
Pose Pose_
double | principalX_
Principal Point Pixel Coordinates (one for all zoom settings).
double | principalY_
bool | ustIgnoreDistortion_
bool | ustTransformIntoImage_
unscented transform worker variables
unsigned int | width_
width of image in pixels

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)

Detailed Description

12 parametric p for completely projective reconstruction scenarios, unknown focal lengths, self calibration, .

..

The handling of the "pose" in this class is special because we cannot decompose P to get the center and the rotation. We pretend that it has R=id and C=0 and encode the external parameters also within the projection matrix. There may be some cases of infinite points, camera center at infinity and so on, which are not covered here, however this interface is a compromise with respect to the performance of the "normal" calibrated camera case's interface.

Author:
koeser 01/2006

Definition at line 50 of file ProjectionParametersProjective.hh.

Constructor & Destructor Documentation

BIAS::ProjectionParametersProjective::ProjectionParametersProjective ( ) [inline]

Definition at line 54 of file ProjectionParametersProjective.hh.

BIAS::ProjectionParametersProjective::ProjectionParametersProjective ( const ProjectionParametersProjective & P ) [inline]

Definition at line 56 of file ProjectionParametersProjective.hh.

virtual BIAS::ProjectionParametersProjective::~ProjectionParametersProjective ( ) [inline, virtual]

Definition at line 67 of file ProjectionParametersProjective.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

virtual ProjectionParametersProjective* BIAS::ProjectionParametersProjective::Clone ( ) const [inline, virtual]

covariant virtual copy constructor for use in Projection

Implements BIAS::ProjectionParametersBase.

Definition at line 112 of file ProjectionParametersProjective.hh.

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImage | ( | const HomgPoint3D & | X,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 92 of file ProjectionParametersBase.hh.

References BIAS::HomgPoint3D::GetEuclidian().

virtual bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImageLocal | ( | const Vector3< double > & | localX,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, virtual, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 106 of file ProjectionParametersBase.hh.

References BIASERR.

double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline, inherited]

return aspectratio = cellSizeX_ / cellSizeY_;

Definition at line 213 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), and BIAS::ProjectionGUI::UpdateGUI().

virtual Vector3<double> BIAS::ProjectionParametersProjective::GetC ( ) const [inline, virtual]

get projection center

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 105 of file ProjectionParametersProjective.hh.

virtual Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual, inherited]

return pose covariance as 7x7 matrix C,Q

Definition at line 188 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual, inherited]

return cached 3x4 RC representation

Definition at line 202 of file ProjectionParametersBase.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ProjectionParametersBase::GetImageSize | ( | unsigned int & | Width,
 |  | unsigned int & | Height
 | ) | const [inline, inherited]

return image dimensions

Definition at line 206 of file ProjectionParametersBase.hh.

Referenced by MainFrame::DrawDistortedLine(), GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

virtual PMatrix BIAS::ProjectionParametersProjective::GetP ( ) const [inline, virtual]

return the complete pmatrix (internals+externals / projective) used for projection

Definition at line 144 of file ProjectionParametersProjective.hh.

virtual const Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual, inherited]

return complete pose object

Definition at line 191 of file ProjectionParametersBase.hh.

PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline, inherited]

Definition at line 195 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersBase::GetPrincipal | ( | double & | PrincipalX,
 |  | double & | PrincipalY
 | ) | const [inline, inherited]

get principal point, x in pixels relative to top left corner

Definition at line 218 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

virtual Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual, inherited]

return Q of rotation

Definition at line 182 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), BIAS::ProjectionGUI::UpdateGUI(), and BIAS::ProjectionParametersBase::XMLOut().

virtual RMatrix BIAS::ProjectionParametersProjective::GetR ( ) const [inline, virtual]

return R (R^T which is in front part of PMatrix )

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 108 of file ProjectionParametersProjective.hh.

References BIAS::MatrixIdentity.

ProjectionParametersProjective& BIAS::ProjectionParametersProjective::operator= ( const ProjectionParametersProjective & P ) [inline]

Definition at line 61 of file ProjectionParametersProjective.hh.

References BIASABORT, and BIASERR.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HomgPoint2D BIAS::ProjectionParametersBase::Project | ( | const HomgPoint3D & | X,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before

Author:
woelk 05/2006

Definition at line 120 of file ProjectionParametersBase.hh.

virtual HomgPoint2D BIAS::ProjectionParametersProjective::ProjectLocal | ( | const Vector3< double > & | point,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, virtual]

calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera

In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X

Implements BIAS::ProjectionParametersBase.

Definition at line 76 of file ProjectionParametersProjective.hh.

References BIAS::HomgPoint3D::Homogenize().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

virtual void BIAS::ProjectionParametersProjective::Rescale ( float ratio ) [inline, virtual]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 119 of file ProjectionParametersProjective.hh.

References BIASABORT, and BIASERR.

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetAspectratio ( const double AspectRatio ) [inline, virtual, inherited]

Set CCDaspect ratio = cellSizeX_ / cellSizeY_.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective.

Definition at line 229 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), and BIAS::ProjectionParametersPerspective::SetK().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

void BIAS::ProjectionParametersProjective::SetC ( const Vector3< double > & C ) [inline, virtual]

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 139 of file ProjectionParametersProjective.hh.

References BIASERR.

virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > & Cov ) [inline, virtual, inherited]

Definition at line 286 of file ProjectionParametersBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetImageSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [inline, virtual, inherited]

Definition at line 240 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective(), GenerateProjection(), BiasShowEpiApp::OnInit(), MainFrame::OnLeftDown(), and PtoPPP().

void BIAS::ProjectionParametersProjective::SetP ( const Matrix3x4< double > & P ) [inline]

set 12 entries if projective P using a PMatrix

Definition at line 136 of file ProjectionParametersProjective.hh.

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose pose ) [inline, virtual, inherited]

Definition at line 277 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersBase::SetPoseParametrization ( const PoseParametrization & pp ) [inline, inherited]

Definition at line 198 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inline, virtual, inherited]

Set principal point in pixels relative to top left corner.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersZoom.

Definition at line 235 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersPerspective::SetK(), BIAS::ProjectionParametersZoom::SetPrincipal(), and BIAS::ProjectionParametersPerspective::SetPrincipal().

virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > & Q ) [inline, virtual, inherited]

Definition at line 269 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetQC | ( | const BIAS::Quaternion< double > & | Q,
 |  | const BIAS::Vector3< double > & | C
 | ) | [inline, virtual, inherited]

Definition at line 273 of file ProjectionParametersBase.hh.

void BIAS::ProjectionParametersProjective::SetR ( const RMatrix & R ) [inline, virtual]

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 138 of file ProjectionParametersProjective.hh.

References BIASERR.

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

void ProjectionParametersBase::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [virtual, inherited]

unscented transform worker function

Author:
koeser

Implements BIAS::UnscentedTransform.

Definition at line 161 of file ProjectionParametersBase.cpp.

References BIASASSERT, BIAS::ProjectionParametersBase::ProjectLocal(), TNT::Vector< T >::size(), BIAS::ProjectionParametersBase::UnProjectLocal(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Matrix3x3< double > ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | bool | IgnoreDistortion = false
 | ) | [virtual, inherited]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Definition at line 179 of file ProjectionParametersBase.cpp.

References BIAS::MatrixZero, BIAS::UnscentedTransform::Transform(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Matrix3x3< double > ProjectionParametersProjective::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

Definition at line 33 of file ProjectionParametersProjective.cpp.

References BIAS_HAVE_XML2, BIASERR, and BIAS::MatrixZero.

virtual Vector3<double> BIAS::ProjectionParametersProjective::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, virtual]

calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.

(0,0,1) means optical axis

Implements BIAS::ProjectionParametersBase.

Definition at line 89 of file ProjectionParametersProjective.hh.

References BIAS::HomgPoint3D::Homogenize().

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual, inherited]

calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Reimplemented in BIAS::ProjectionParametersSpherical.

Definition at line 149 of file ProjectionParametersBase.cpp.

References BIASERR, and BIAS::Vector3< T >::NormL2().

Vector3<double> BIAS::ProjectionParametersBase::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Author:
woelk 05/2006

Definition at line 157 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and R.

double ProjectionParametersBase::ViewDifference ( const ProjectionParametersBase * ) const [virtual, inherited]

returns difference of two projections like | C1-C2 |

This function can be used for inter camera distance and ordering purposes

Author:
koeser 03/2006

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 140 of file ProjectionParametersBase.cpp.

References BIASABORT, and BIASERR.

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int ProjectionParametersProjective::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 42 of file ProjectionParametersProjective.cpp.

int ProjectionParametersProjective::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 62 of file ProjectionParametersProjective.cpp.

References BIASERR, BIAS::XMLIO::getChild(), BIAS::Matrix< T >::GetData(), and BIAS::XMLIO::getNodeContentString().

int ProjectionParametersProjective::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 49 of file ProjectionParametersProjective.cpp.

References BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), BIAS::Matrix< T >::GetData(), BIAS::CoordinateTransform3D::GetMatrix3x4(), and BIAS::ProjectionParametersBase::Pose_.

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [friend, inherited]

Definition at line 336 of file ProjectionParametersBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected, inherited]

aspectratio of the camera CCD

Definition at line 329 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected, inherited]

height of image in pixels

Definition at line 323 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

Pose BIAS::ProjectionParametersBase::Pose_ [protected, inherited]

Definition at line 318 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and XMLOut().

double BIAS::ProjectionParametersBase::principalX_ [protected, inherited]

Principal Point Pixel Coordinates (one for all zoom settings).

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersBase::principalY_ [protected, inherited]

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_ [protected, inherited]

Definition at line 333 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_ [protected, inherited]

unscented transform worker variables

Definition at line 332 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

unsigned int BIAS::ProjectionParametersBase::width_ [protected, inherited]

width of image in pixels

Definition at line 321 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersProjective.hh
  • Geometry/ProjectionParametersProjective.cpp
Generated on Wed Jun 21 19:09:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersSpherical Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersSpherical

BIAS::ProjectionParametersSpherical Class Reference

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

#include <Geometry/ProjectionParametersSpherical.hh>

Inheritance diagram for BIAS::ProjectionParametersSpherical:

[legend]
Collaboration diagram for BIAS::ProjectionParametersSpherical:

[legend]
List of all members.

Public Member Functions

virtual ProjectionParametersSpherical * | Clone () const
covariant virtual copy constructor for use in Projection
bool | DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
bool | DoesPointProjectIntoImageLocal (const BIAS::Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
double | GetAspectratio () const
return aspectratio = cellSizeX_ / cellSizeY_;
virtual Vector3< double > | GetC () const
get projection center
virtual Matrix< POSE_TYPE > | GetCov () const
return pose covariance as 7x7 matrix C,Q
virtual Matrix3x4< double > | GetExternals () const
return cached 3x4 RC representation
BIAS::KMatrix | GetFakeKMatrix (int resolution=0) const
BIAS::KMatrix | GetFakeKMatrix (double &imgsize, int resolution=0) const
Returns a fake KMatrix for the fisheye camera.
int | GetImageSize (unsigned int &Width, unsigned int &Height) const
return image dimensions
double | GetMaxCamAngle () const
virtual const Pose & | GetPose () const
return complete pose object
PoseParametrization | GetPoseParametrization () const
int | GetPrincipal (double &PrincipalX, double &PrincipalY) const
get principal point, x in pixels relative to top left corner
virtual Quaternion< double > | GetQ () const
return Q of rotation
virtual BIAS::RMatrix | GetR () const
return rotation matrix R
double | GetRadius () const
ProjectionParametersSpherical & | operator= (const ProjectionParametersSpherical &P)
HomgPoint2D | Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before
ProjectionParametersSpherical (const ProjectionParametersSpherical &P)
ProjectionParametersSpherical ()
virtual HomgPoint2D | ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const
calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera
virtual void | Rescale (float ratio)
adapt internal params to resampled image
virtual void | SetAspectratio (const double AspectRatio)
Set CCDaspect ratio = cellSizeX_ / cellSizeY_.
virtual void | SetC (const BIAS::Vector3< double > &C)
virtual void | SetCov (const Matrix< POSE_TYPE > &Cov)
virtual void | SetImageSize (const unsigned int w, const unsigned int h)
virtual void | SetPose (const BIAS::Pose pose)
void | SetPoseParametrization (const PoseParametrization &pp)
virtual void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
virtual void | SetQ (const BIAS::Quaternion< double > &Q)
virtual void | SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
virtual void | SetR (const BIAS::RMatrix &R)
void | SetRadius (double r)
int | SetUndistortion (const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const double radius)
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const
unscented transform worker function
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false)
unprojects the covariance matrices to K=Identity camera
virtual Vector3< double > | UnProjectLocal (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.
virtual Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.
virtual double | ViewDifference (const ProjectionParametersBase *pPPB) const
returns difference of two projections like | C1-C2 |
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~ProjectionParametersSpherical ()

Protected Member Functions

void | AddDebugLevel (long int lv)
void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
bool | DebugLevelIsSet (long int lv) const
int | EnforceNormalRange_ (double &theta, double &phi) const
theta and phi are periodic in 2*M_PI, if they are out of a suitable range, try to find best equivalent angle by adding 2*l*M_PI
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | TransfCoordCalibImage2Sphere_ (const HomgPoint2D &Source, double &theta, double &phi) const
Transforms a coordinate pair of image coordinates x, y in the calibrated spherical image, to a calibrated pair of polar coordinates phi, theta.
int | TransfCoordImage2Sphere_ (const HomgPoint2D &Source, double &theta, double &phi) const
Transforms a coordinate pair of image coordinates x, y in the uncalibrated spherical image, to a calibrated pair of polar coordinates phi, theta.
int | TransfCoordRotateSphere2Image_ (double theta, double phi, double viewCenterX, double viewCenterY, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.
int | TransfCoordSphere2CalibImage_ (double theta, double phi, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in an equidistant spherical image.
int | TransfCoordSphere2Image_ (double theta, double phi, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const

Static Protected Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | aspectratio_
aspectratio of the camera CCD
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
unsigned int | height_
height of image in pixels
Interpolator interpolatorAngle_
Interpolator interpolatorAngleBack_
double | Kappa_
kappa is a secondary scaling parameter.
double | MaxCamAngle_
Pose Pose_
double | principalX_
Principal Point Pixel Coordinates (one for all zoom settings).
double | principalY_
double | radius_
bool | ustIgnoreDistortion_
bool | ustTransformIntoImage_
unscented transform worker variables
unsigned int | width_
width of image in pixels

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)

Detailed Description

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose

Author:
koeser/evers/streckel

Definition at line 41 of file ProjectionParametersSpherical.hh.

Constructor & Destructor Documentation

BIAS::ProjectionParametersSpherical::ProjectionParametersSpherical ( ) [inline]

Definition at line 45 of file ProjectionParametersSpherical.hh.

BIAS::ProjectionParametersSpherical::ProjectionParametersSpherical ( const ProjectionParametersSpherical & P ) [inline]

Definition at line 51 of file ProjectionParametersSpherical.hh.

virtual BIAS::ProjectionParametersSpherical::~ProjectionParametersSpherical ( ) [inline, virtual]

Definition at line 65 of file ProjectionParametersSpherical.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

virtual ProjectionParametersSpherical* BIAS::ProjectionParametersSpherical::Clone ( ) const [inline, virtual]

covariant virtual copy constructor for use in Projection

Implements BIAS::ProjectionParametersBase.

Definition at line 90 of file ProjectionParametersSpherical.hh.

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImage | ( | const HomgPoint3D & | X,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 92 of file ProjectionParametersBase.hh.

References BIAS::HomgPoint3D::GetEuclidian().

bool ProjectionParametersSpherical::DoesPointProjectIntoImageLocal | ( | const BIAS::Vector3< double > & | localX,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 33 of file ProjectionParametersSpherical.cpp.

References BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, ProjectLocal(), radius_, and BIAS::ProjectionParametersBase::width_.

int ProjectionParametersSpherical::EnforceNormalRange_ | ( | double & | theta,
 |  | double & | phi
 | ) | const [protected]

theta and phi are periodic in 2*M_PI, if they are out of a suitable range, try to find best equivalent angle by adding 2*l*M_PI

Returns:
0 on success, <0 indicates that at least one angle is invalid
Author:
koeser 10/2004

Definition at line 286 of file ProjectionParametersSpherical.cpp.

References BIASERR, and MaxCamAngle_.

Referenced by TransfCoordSphere2CalibImage_(), and TransfCoordSphere2Image_().

double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline, inherited]

return aspectratio = cellSizeX_ / cellSizeY_;

Definition at line 213 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), and BIAS::ProjectionGUI::UpdateGUI().

virtual Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const [inline, virtual, inherited]

get projection center

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 179 of file ProjectionParametersBase.hh.

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), ViewDifference(), BIAS::ProjectionParametersPerspective::ViewDifference(), and BIAS::ProjectionParametersBase::XMLOut().

virtual Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual, inherited]

return pose covariance as 7x7 matrix C,Q

Definition at line 188 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual, inherited]

return cached 3x4 RC representation

Definition at line 202 of file ProjectionParametersBase.hh.

KMatrix ProjectionParametersSpherical::GetFakeKMatrix ( int resolution = 0 ) const

Definition at line 359 of file ProjectionParametersSpherical.cpp.

References GetFakeKMatrix().

KMatrix ProjectionParametersSpherical::GetFakeKMatrix | ( | double & | imgsize,
 |  | int | resolution = 0
 | ) | const

Returns a fake KMatrix for the fisheye camera.

The FoV of the KMatrix is 160deg or the max fisheye angle, if this is <160deg.

Parameters:
resolution | The resolution parameter influences the Resolution of the perspective image that is represented by the camera. 0 - The perspective image has the same size as the fisheye image 1 - The perspective image has the same resolution as the maximum fisheye angular resolution up to 160deg. 2 - The perspective image has the minimum resolution of the fisheye image.
imgsize | returns the image size
Author:
streckel 05/2006

Definition at line 364 of file ProjectionParametersSpherical.cpp.

References GetMaxCamAngle(), K, BIAS::ProjectionParametersBase::principalX_, ProjectLocal(), BIAS::Vector3< T >::Set(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by GetFakeKMatrix().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ProjectionParametersBase::GetImageSize | ( | unsigned int & | Width,
 |  | unsigned int & | Height
 | ) | const [inline, inherited]

return image dimensions

Definition at line 206 of file ProjectionParametersBase.hh.

Referenced by MainFrame::DrawDistortedLine(), GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

double BIAS::ProjectionParametersSpherical::GetMaxCamAngle ( ) const [inline]

Definition at line 102 of file ProjectionParametersSpherical.hh.

Referenced by GetFakeKMatrix().

virtual const Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual, inherited]

return complete pose object

Definition at line 191 of file ProjectionParametersBase.hh.

PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline, inherited]

Definition at line 195 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersBase::GetPrincipal | ( | double & | PrincipalX,
 |  | double & | PrincipalY
 | ) | const [inline, inherited]

get principal point, x in pixels relative to top left corner

Definition at line 218 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

virtual Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual, inherited]

return Q of rotation

Definition at line 182 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), BIAS::ProjectionGUI::UpdateGUI(), and BIAS::ProjectionParametersBase::XMLOut().

RMatrix ProjectionParametersBase::GetR ( ) const [virtual, inherited]

return rotation matrix R

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 35 of file ProjectionParametersBase.cpp.

References BIAS::ProjectionParametersBase::GetQ(), R, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), ViewDifference(), and BIAS::ProjectionParametersPerspective::ViewDifference().

double BIAS::ProjectionParametersSpherical::GetRadius ( ) const [inline]

Definition at line 94 of file ProjectionParametersSpherical.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

ProjectionParametersSpherical& BIAS::ProjectionParametersSpherical::operator= ( const ProjectionParametersSpherical & P ) [inline]

Definition at line 56 of file ProjectionParametersSpherical.hh.

References interpolatorAngle_, interpolatorAngleBack_, MaxCamAngle_, BIAS::ProjectionParametersBase::operator=(), and radius_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HomgPoint2D BIAS::ProjectionParametersBase::Project | ( | const HomgPoint3D & | X,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before

Author:
woelk 05/2006

Definition at line 120 of file ProjectionParametersBase.hh.

HomgPoint2D ProjectionParametersSpherical::ProjectLocal | ( | const Vector3< double > & | point,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera

In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X

Implements BIAS::ProjectionParametersBase.

Definition at line 50 of file ProjectionParametersSpherical.cpp.

References BIAS::Vector3< T >::CoordEuclidianToSphere(), BIAS::Vector3< T >::SetZero(), TransfCoordSphere2CalibImage_(), and TransfCoordSphere2Image_().

Referenced by DoesPointProjectIntoImageLocal(), MainFrame::DrawDistortedLine(), and GetFakeKMatrix().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

virtual void BIAS::ProjectionParametersSpherical::Rescale ( float ratio ) [inline, virtual]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 113 of file ProjectionParametersSpherical.hh.

References BIAS::ProjectionParametersBase::Rescale().

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetAspectratio ( const double AspectRatio ) [inline, virtual, inherited]

Set CCDaspect ratio = cellSizeX_ / cellSizeY_.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective.

Definition at line 229 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), and BIAS::ProjectionParametersPerspective::SetK().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetC ( const BIAS::Vector3< double > & C ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 271 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > & Cov ) [inline, virtual, inherited]

Definition at line 286 of file ProjectionParametersBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetImageSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [inline, virtual, inherited]

Definition at line 240 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective(), GenerateProjection(), BiasShowEpiApp::OnInit(), MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose pose ) [inline, virtual, inherited]

Definition at line 277 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersBase::SetPoseParametrization ( const PoseParametrization & pp ) [inline, inherited]

Definition at line 198 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inline, virtual, inherited]

Set principal point in pixels relative to top left corner.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersZoom.

Definition at line 235 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersPerspective::SetK(), BIAS::ProjectionParametersZoom::SetPrincipal(), and BIAS::ProjectionParametersPerspective::SetPrincipal().

virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > & Q ) [inline, virtual, inherited]

Definition at line 269 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetQC | ( | const BIAS::Quaternion< double > & | Q,
 |  | const BIAS::Vector3< double > & | C
 | ) | [inline, virtual, inherited]

Definition at line 273 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix & R ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 280 of file ProjectionParametersBase.hh.

References BIAS::RMatrixBase::GetQuaternion().

Referenced by SetRotation().

void BIAS::ProjectionParametersSpherical::SetRadius ( double r ) [inline]

Definition at line 98 of file ProjectionParametersSpherical.hh.

int ProjectionParametersSpherical::SetUndistortion | ( | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const double | radius
 | ) |

Definition at line 98 of file ProjectionParametersSpherical.cpp.

References BIASERR, BIAS::Interpolator::InitSpline(), interpolatorAngle_, interpolatorAngleBack_, MaxCamAngle_, BIAS::Interpolator::PrepareLuTSpline(), radius_, BIAS::Interpolator::SetControlPoints(), BIAS::Interpolator::SetKnotPoints(), and BIAS::Interpolator::Spline().

Referenced by XMLIn().

int ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_ | ( | const HomgPoint2D & | Source,
 |  | double & | theta,
 |  | double & | phi
 | ) | const [protected]

Transforms a coordinate pair of image coordinates x, y in the calibrated spherical image, to a calibrated pair of polar coordinates phi, theta.

Author:
Birger Streckel

Definition at line 271 of file ProjectionParametersSpherical.cpp.

References BIAS::HomgPoint2D::Homogenize(), MaxCamAngle_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and radius_.

Referenced by UnProjectLocal().

int ProjectionParametersSpherical::TransfCoordImage2Sphere_ | ( | const HomgPoint2D & | Source,
 |  | double & | theta,
 |  | double & | phi
 | ) | const [protected]

Transforms a coordinate pair of image coordinates x, y in the uncalibrated spherical image, to a calibrated pair of polar coordinates phi, theta.

Author:
Birger Streckel

Definition at line 135 of file ProjectionParametersSpherical.cpp.

References BIAS::HomgPoint2D::Homogenize(), interpolatorAngle_, interpolatorAngleBack_, MaxCamAngle_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, radius_, and BIAS::Interpolator::SplineFromLuT().

Referenced by TransfCoordRotateSphere2Image_(), and UnProjectLocal().

int ProjectionParametersSpherical::TransfCoordRotateSphere2Image_ | ( | double | theta,
 |  | double | phi,
 |  | double | viewCenterX,
 |  | double | viewCenterY,
 |  | HomgPoint2D & | Source
 | ) | const [protected]

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.

Author:
Birger Streckel

Definition at line 166 of file ProjectionParametersSpherical.cpp.

References BIAS::Vector3< T >::CoordEuclidianToSphere(), BIAS::Vector3< T >::CoordSphereToEuclidian(), interpolatorAngle_, MaxCamAngle_, BIAS::Quaternion< QUAT_TYPE >::MultVec(), BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, radius_, BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad(), BIAS::Interpolator::SplineFromLuT(), and TransfCoordImage2Sphere_().

int ProjectionParametersSpherical::TransfCoordSphere2CalibImage_ | ( | double | theta,
 |  | double | phi,
 |  | HomgPoint2D & | Source
 | ) | const [protected]

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in an equidistant spherical image.

Author:
Birger Streckel

Definition at line 254 of file ProjectionParametersSpherical.cpp.

References EnforceNormalRange_(), MaxCamAngle_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and radius_.

Referenced by ProjectLocal().

int ProjectionParametersSpherical::TransfCoordSphere2Image_ | ( | double | theta,
 |  | double | phi,
 |  | HomgPoint2D & | Source
 | ) | const [protected]

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.

Author:
Birger Streckel

Definition at line 233 of file ProjectionParametersSpherical.cpp.

References EnforceNormalRange_(), interpolatorAngle_, MaxCamAngle_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, radius_, and BIAS::Interpolator::SplineFromLuT().

Referenced by ProjectLocal().

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

void ProjectionParametersBase::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [virtual, inherited]

unscented transform worker function

Author:
koeser

Implements BIAS::UnscentedTransform.

Definition at line 161 of file ProjectionParametersBase.cpp.

References BIASASSERT, BIAS::ProjectionParametersBase::ProjectLocal(), TNT::Vector< T >::size(), BIAS::ProjectionParametersBase::UnProjectLocal(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Matrix3x3< double > ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | bool | IgnoreDistortion = false
 | ) | [virtual, inherited]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Definition at line 179 of file ProjectionParametersBase.cpp.

References BIAS::MatrixZero, BIAS::UnscentedTransform::Transform(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Vector3< double > ProjectionParametersSpherical::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.

(0,0,1) means optical axis

Implements BIAS::ProjectionParametersBase.

Definition at line 68 of file ProjectionParametersSpherical.cpp.

References BIAS::Vector3< T >::CoordSphereToEuclidian(), BIAS::Vector3< T >::SetZero(), TransfCoordCalibImage2Sphere_(), and TransfCoordImage2Sphere_().

Referenced by UnProjectToPointLocal().

Vector3< double > ProjectionParametersSpherical::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam.

Overload to habe return value (0,0,0) for undefined or out of image radius pixels.

Author:
streckel

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 89 of file ProjectionParametersSpherical.cpp.

References UnProjectLocal().

Vector3<double> BIAS::ProjectionParametersBase::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Author:
woelk 05/2006

Definition at line 157 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and R.

double ProjectionParametersSpherical::ViewDifference ( const ProjectionParametersBase * pPPB ) const [virtual]

returns difference of two projections like | C1-C2 |

This function can be used for inter camera distance and ordering purposes

Author:
koeser 03/2006

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 330 of file ProjectionParametersSpherical.cpp.

References BIASERR, BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersBase::GetR(), MaxCamAngle_, BIAS::Vector3< T >::Normalize(), R, and BIAS::Vector3< T >::ScalarProduct().

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int ProjectionParametersSpherical::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 422 of file ProjectionParametersSpherical.cpp.

int ProjectionParametersSpherical::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 455 of file ProjectionParametersSpherical.cpp.

References BIASERR, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), SetUndistortion(), Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLIn().

int ProjectionParametersSpherical::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 430 of file ProjectionParametersSpherical.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::Interpolator::GetControlPoints(), BIAS::Interpolator::GetKnotPoints(), interpolatorAngle_, radius_, Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLOut().

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [friend, inherited]

Definition at line 336 of file ProjectionParametersBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected, inherited]

aspectratio of the camera CCD

Definition at line 329 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected, inherited]

height of image in pixels

Definition at line 323 of file ProjectionParametersBase.hh.

Referenced by DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

Interpolator BIAS::ProjectionParametersSpherical::interpolatorAngle_ [protected]

Definition at line 218 of file ProjectionParametersSpherical.hh.

Referenced by operator=(), SetUndistortion(), TransfCoordImage2Sphere_(), TransfCoordRotateSphere2Image_(), TransfCoordSphere2Image_(), and XMLOut().

Interpolator BIAS::ProjectionParametersSpherical::interpolatorAngleBack_ [protected]

Definition at line 220 of file ProjectionParametersSpherical.hh.

Referenced by operator=(), SetUndistortion(), and TransfCoordImage2Sphere_().

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersSpherical::MaxCamAngle_ [protected]

Definition at line 211 of file ProjectionParametersSpherical.hh.

Referenced by EnforceNormalRange_(), operator=(), SetUndistortion(), TransfCoordCalibImage2Sphere_(), TransfCoordImage2Sphere_(), TransfCoordRotateSphere2Image_(), TransfCoordSphere2CalibImage_(), TransfCoordSphere2Image_(), and ViewDifference().

Pose BIAS::ProjectionParametersBase::Pose_ [protected, inherited]

Definition at line 318 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::ProjectionParametersBase::principalX_ [protected, inherited]

Principal Point Pixel Coordinates (one for all zoom settings).

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), DoesPointProjectIntoImageLocal(), GetFakeKMatrix(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), TransfCoordCalibImage2Sphere_(), TransfCoordImage2Sphere_(), TransfCoordRotateSphere2Image_(), TransfCoordSphere2CalibImage_(), TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersBase::principalY_ [protected, inherited]

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersZoom::ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersZoom::Distort(), BIAS::ProjectionParametersPerspective::Distort(), DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), TransfCoordCalibImage2Sphere_(), TransfCoordImage2Sphere_(), TransfCoordRotateSphere2Image_(), TransfCoordSphere2CalibImage_(), TransfCoordSphere2Image_(), BIAS::ProjectionParametersZoom::Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersSpherical::radius_ [protected]

Definition at line 208 of file ProjectionParametersSpherical.hh.

Referenced by DoesPointProjectIntoImageLocal(), operator=(), SetUndistortion(), TransfCoordCalibImage2Sphere_(), TransfCoordImage2Sphere_(), TransfCoordRotateSphere2Image_(), TransfCoordSphere2CalibImage_(), TransfCoordSphere2Image_(), and XMLOut().

bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_ [protected, inherited]

Definition at line 333 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_ [protected, inherited]

unscented transform worker variables

Definition at line 332 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

unsigned int BIAS::ProjectionParametersBase::width_ [protected, inherited]

width of image in pixels

Definition at line 321 of file ProjectionParametersBase.hh.

Referenced by DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersSpherical.hh
  • Geometry/ProjectionParametersSpherical.cpp
Generated on Wed Jun 21 19:10:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ProjectionParametersZoom Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ProjectionParametersZoom

BIAS::ProjectionParametersZoom Class Reference

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...

#include <Geometry/ProjectionParametersZoom.hh>

Inheritance diagram for BIAS::ProjectionParametersZoom:

[legend]
Collaboration diagram for BIAS::ProjectionParametersZoom:

[legend]
List of all members.

Public Member Functions

int | AddZoomStep (double zoom, double focallength, double kc1, double kc2, double kc3, double kc4)
void Clear ()
virtual ProjectionParametersZoom * | Clone () const
covariant virtual copy constructor for use in Projection
void | Distort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.
bool | DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
virtual bool | DoesPointProjectIntoImageLocal (const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
double | GetAspectratio () const
return aspectratio = cellSizeX_ / cellSizeY_;
virtual Vector3< double > | GetC () const
get projection center
virtual Matrix< POSE_TYPE > | GetCov () const
return pose covariance as 7x7 matrix C,Q
virtual Matrix3x4< double > | GetExternals () const
return cached 3x4 RC representation
int | GetFocalLength (double &f) const
Get the current camera focal length.
int | GetImageSize (unsigned int &Width, unsigned int &Height) const
return image dimensions
void | GetK (KMatrix &K) const
void | GetKinv (KMatrix &invK) const
virtual BIAS::PMatrix | GetP () const
virtual const Pose & | GetPose () const
return complete pose object
PoseParametrization | GetPoseParametrization () const
int | GetPrincipal (double &PrincipalX, double &PrincipalY) const
get principal point, x in pixels relative to top left corner
virtual Quaternion< double > | GetQ () const
return Q of rotation
virtual BIAS::RMatrix | GetR () const
return rotation matrix R
void | GetUndistortion (double &kc1, double &kc2, double &kc3, double &kc4) const
Get the current camera focal length.
int | GetZoom (double &zoom) const
Get the current camera zoom.
ProjectionParametersZoom & | operator= (const ProjectionParametersZoom &P)
HomgPoint2D | Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before
ProjectionParametersZoom (const ProjectionParametersZoom &P)
ProjectionParametersZoom ()
virtual HomgPoint2D | ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const
calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera
virtual void | Rescale (float ratio)
adapt internal params to resampled image
virtual void | SetAspectratio (const double AspectRatio)
Set CCDaspect ratio = cellSizeX_ / cellSizeY_.
virtual void | SetAspectratio (const double CellSizeX, const double AspectRatio)
Set CCD cell-size in meter, virtual overload to recalculate K_.
virtual void | SetC (const BIAS::Vector3< double > &C)
virtual void | SetCov (const Matrix< POSE_TYPE > &Cov)
int | SetFocalLength (const double f)
Set the current camera focal length, the zoom will be calculated.
virtual void | SetImageSize (const unsigned int w, const unsigned int h)
virtual void | SetPose (const BIAS::Pose pose)
void | SetPoseParametrization (const PoseParametrization &pp)
virtual void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner, virtual overload to recalculate K_.
virtual void | SetQ (const BIAS::Quaternion< double > &Q)
virtual void | SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
virtual void | SetR (const BIAS::RMatrix &R)
void SetUnzoomed ()
Set the zoom and focal length of a zoom camera to the default settings.
int | SetZoom (const double abszoom)
Set the current camera zoom, the focal length will be calculated.
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const
unscented transform worker function
void | Undistort (BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates.
virtual Matrix3x3< double > | UnProjectLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false)
unprojects the covariance matrices to K=Identity camera
virtual Vector3< double > | UnProjectLocal (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.
virtual Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.
Vector3< double > | UnProjectToRay (const HomgPoint2D &pos, bool IgnoreDistortion=false) const
calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.
virtual double | ViewDifference (const ProjectionParametersBase *) const
returns difference of two projections like | C1-C2 |
int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const
specialization of XML block name function
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~ProjectionParametersZoom ()

Protected Member Functions

void | AddDebugLevel (long int lv)
void ComputeK_ ()
computes the cached KMatrix and its inverse call after every parameter change
void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | InterpolateAbsZoom_ ()
void | InterpolateDistortionFromIndex_ (unsigned int i, double relnorm)
double | InterpolateFocalLength_ ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const

Static Protected Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | aspectratio_
aspectratio of the camera CCD
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
double | focallengthZoom_
unsigned int | height_
height of image in pixels
KMatrix invK_
KMatrix K_
double | Kappa_
kappa is a secondary scaling parameter.
double | kc1Zoom_
double | kc2Zoom_
double | kc3Zoom_
double | kc4Zoom_
std::vector< CPDiscreteParam > | knownparams_vect_
Pose Pose_
double | principalX_
Principal Point Pixel Coordinates (one for all zoom settings).
double | principalY_
bool | ustIgnoreDistortion_
bool | ustTransformIntoImage_
unscented transform worker variables
unsigned int | width_
width of image in pixels
double | zoom_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)

Detailed Description

camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose

Author:
streckel

Definition at line 55 of file ProjectionParametersZoom.hh.

Constructor & Destructor Documentation

BIAS::ProjectionParametersZoom::ProjectionParametersZoom ( ) [inline]

Definition at line 59 of file ProjectionParametersZoom.hh.

BIAS::ProjectionParametersZoom::ProjectionParametersZoom ( const ProjectionParametersZoom & P ) [inline]

Definition at line 68 of file ProjectionParametersZoom.hh.

virtual BIAS::ProjectionParametersZoom::~ProjectionParametersZoom ( ) [inline, virtual]

Definition at line 79 of file ProjectionParametersZoom.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int ProjectionParametersZoom::AddZoomStep | ( | double | zoom,
 |  | double | focallength,
 |  | double | kc1,
 |  | double | kc2,
 |  | double | kc3,
 |  | double | kc4
 | ) |

Definition at line 55 of file ProjectionParametersZoom.cpp.

References BIASERR, and knownparams_vect_.

void BIAS::ProjectionParametersZoom::Clear ( ) [inline]

Definition at line 116 of file ProjectionParametersZoom.hh.

virtual ProjectionParametersZoom* BIAS::ProjectionParametersZoom::Clone ( ) const [inline, virtual]

covariant virtual copy constructor for use in Projection

Implements BIAS::ProjectionParametersBase.

Definition at line 112 of file ProjectionParametersZoom.hh.

void ProjectionParametersZoom::ComputeK_ ( ) [protected]

computes the cached KMatrix and its inverse call after every parameter change

Definition at line 79 of file ProjectionParametersZoom.cpp.

References BIAS::ProjectionParametersBase::aspectratio_, focallengthZoom_, BIAS::KMatrix::Invert(), invK_, K_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and BIAS::Matrix3x3< T >::SetIdentity().

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected, inherited]

Definition at line 95 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::UnscentedTransform::Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void ProjectionParametersZoom::Distort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.

Inverse to the undistort function. TODO: faster implementation via Lookup-table

Author:
streckel 06/2004

Definition at line 224 of file ProjectionParametersZoom.cpp.

References focallengthZoom_, BIAS::ProjectionParametersBase::GetAspectratio(), BIAS::HomgPoint2D::Homogenize(), kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_, BIAS::ProjectionParametersBase::principalX_, and BIAS::ProjectionParametersBase::principalY_.

Referenced by ProjectLocal().

bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImage | ( | const HomgPoint3D & | X,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Definition at line 92 of file ProjectionParametersBase.hh.

References BIAS::HomgPoint3D::GetEuclidian().

virtual bool BIAS::ProjectionParametersBase::DoesPointProjectIntoImageLocal | ( | const Vector3< double > & | localX,
 |  | HomgPoint2D & | x,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, virtual, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
X assumes homogenized point!
Author:
bartczak

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 106 of file ProjectionParametersBase.hh.

References BIASERR.

double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline, inherited]

return aspectratio = cellSizeX_ / cellSizeY_;

Definition at line 213 of file ProjectionParametersBase.hh.

Referenced by Distort(), BIAS::ProjectionParametersPerspective::Distort(), Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), and BIAS::ProjectionGUI::UpdateGUI().

virtual Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const [inline, virtual, inherited]

get projection center

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 179 of file ProjectionParametersBase.hh.

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), BIAS::ProjectionParametersPerspective::ViewDifference(), and BIAS::ProjectionParametersBase::XMLOut().

virtual Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual, inherited]

return pose covariance as 7x7 matrix C,Q

Definition at line 188 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

virtual Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual, inherited]

return cached 3x4 RC representation

Definition at line 202 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersZoom::GetFocalLength ( double & f ) const [inline]

Get the current camera focal length.

Author:
buck

Definition at line 150 of file ProjectionParametersZoom.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::ProjectionParametersBase::GetImageSize | ( | unsigned int & | Width,
 |  | unsigned int & | Height
 | ) | const [inline, inherited]

return image dimensions

Definition at line 206 of file ProjectionParametersBase.hh.

Referenced by MainFrame::DrawDistortedLine(), GetSequenceAngle(), and BIAS::ProjectionGUI::UpdateGUI().

void BIAS::ProjectionParametersZoom::GetK ( KMatrix & K ) const [inline]

Definition at line 125 of file ProjectionParametersZoom.hh.

void BIAS::ProjectionParametersZoom::GetKinv ( KMatrix & invK ) const [inline]

Definition at line 131 of file ProjectionParametersZoom.hh.

virtual BIAS::PMatrix BIAS::ProjectionParametersZoom::GetP ( ) const [inline, virtual]

Definition at line 137 of file ProjectionParametersZoom.hh.

virtual const Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual, inherited]

return complete pose object

Definition at line 191 of file ProjectionParametersBase.hh.

PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline, inherited]

Definition at line 195 of file ProjectionParametersBase.hh.

int BIAS::ProjectionParametersBase::GetPrincipal | ( | double & | PrincipalX,
 |  | double & | PrincipalY
 | ) | const [inline, inherited]

get principal point, x in pixels relative to top left corner

Definition at line 218 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionGUI::UpdateGUI().

virtual Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual, inherited]

return Q of rotation

Definition at line 182 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), BIAS::ProjectionGUI::UpdateGUI(), and BIAS::ProjectionParametersBase::XMLOut().

RMatrix ProjectionParametersBase::GetR ( ) const [virtual, inherited]

return rotation matrix R

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 35 of file ProjectionParametersBase.cpp.

References BIAS::ProjectionParametersBase::GetQ(), R, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by BIAS::operator<<(), BIAS::ProjectionGUI::UpdateGUI(), BIAS::ProjectionParametersSpherical::ViewDifference(), and BIAS::ProjectionParametersPerspective::ViewDifference().

void BIAS::ProjectionParametersZoom::GetUndistortion | ( | double & | kc1,
 |  | double & | kc2,
 |  | double & | kc3,
 |  | double & | kc4
 | ) | const [inline]

Get the current camera focal length.

Author:
buck

Definition at line 157 of file ProjectionParametersZoom.hh.

int BIAS::ProjectionParametersZoom::GetZoom ( double & zoom ) const [inline]

Get the current camera zoom.

Author:
buck

Definition at line 143 of file ProjectionParametersZoom.hh.

double ProjectionParametersZoom::InterpolateAbsZoom_ ( ) [protected]

Definition at line 314 of file ProjectionParametersZoom.cpp.

References focallengthZoom_, and knownparams_vect_.

void ProjectionParametersZoom::InterpolateDistortionFromIndex_ | ( | unsigned int | i,
 |  | double | relnorm
 | ) | [protected]

Definition at line 161 of file ProjectionParametersZoom.cpp.

References kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_, and knownparams_vect_.

double ProjectionParametersZoom::InterpolateFocalLength_ ( ) [protected]

Definition at line 181 of file ProjectionParametersZoom.cpp.

References knownparams_vect_, and zoom_.

ProjectionParametersZoom& BIAS::ProjectionParametersZoom::operator= ( const ProjectionParametersZoom & P ) [inline]

Definition at line 73 of file ProjectionParametersZoom.hh.

References BIASABORT, and BIASERR.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

HomgPoint2D BIAS::ProjectionParametersBase::Project | ( | const HomgPoint3D & | X,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera Was in old calss Projection before

Author:
woelk 05/2006

Definition at line 120 of file ProjectionParametersBase.hh.

HomgPoint2D ProjectionParametersZoom::ProjectLocal | ( | const Vector3< double > & | point,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera

In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X

Implements BIAS::ProjectionParametersBase.

Definition at line 33 of file ProjectionParametersZoom.cpp.

References Distort(), K_, and BIAS::Matrix3x3< T >::Mult().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

virtual void BIAS::ProjectionParametersZoom::Rescale ( float ratio ) [inline, virtual]

adapt internal params to resampled image

Parameters:
ratio 2.0 = downsample, 0.5 = upsample

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 217 of file ProjectionParametersZoom.hh.

References BIASABORT, and BIASERR.

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline, inherited]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetAspectratio ( const double AspectRatio ) [inline, virtual, inherited]

Set CCDaspect ratio = cellSizeX_ / cellSizeY_.

Author:
streckel

Reimplemented in BIAS::ProjectionParametersPerspective.

Definition at line 229 of file ProjectionParametersBase.hh.

Referenced by SetAspectratio(), BIAS::ProjectionParametersPerspective::SetAspectratio(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), and BIAS::ProjectionParametersPerspective::SetK().

virtual void BIAS::ProjectionParametersZoom::SetAspectratio | ( | const double | CellSizeX,
 |  | const double | AspectRatio
 | ) | [inline, virtual]

Set CCD cell-size in meter, virtual overload to recalculate K_.

Author:
streckel

Definition at line 170 of file ProjectionParametersZoom.hh.

References BIAS::ProjectionParametersBase::SetAspectratio().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline, inherited]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetC ( const BIAS::Vector3< double > & C ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 271 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > & Cov ) [inline, virtual, inherited]

Definition at line 286 of file ProjectionParametersBase.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int BIAS::ProjectionParametersZoom::SetFocalLength ( const double f ) [inline]

Set the current camera focal length, the zoom will be calculated.

Author:
buck

Definition at line 197 of file ProjectionParametersZoom.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

virtual void BIAS::ProjectionParametersBase::SetImageSize | ( | const unsigned int | w,
 |  | const unsigned int | h
 | ) | [inline, virtual, inherited]

Definition at line 240 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective(), GenerateProjection(), BiasShowEpiApp::OnInit(), MainFrame::OnLeftDown(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose pose ) [inline, virtual, inherited]

Definition at line 277 of file ProjectionParametersBase.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersBase::SetPoseParametrization ( const PoseParametrization & pp ) [inline, inherited]

Definition at line 198 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersZoom::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inline, virtual]

Set principal point in pixels relative to top left corner, virtual overload to recalculate K_.

Author:
streckel

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 179 of file ProjectionParametersZoom.hh.

References BIAS::ProjectionParametersBase::SetPrincipal().

virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > & Q ) [inline, virtual, inherited]

Definition at line 269 of file ProjectionParametersBase.hh.

Referenced by MainFrame::OnLeftDown(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and PtoPPP().

virtual void BIAS::ProjectionParametersBase::SetQC | ( | const BIAS::Quaternion< double > & | Q,
 |  | const BIAS::Vector3< double > & | C
 | ) | [inline, virtual, inherited]

Definition at line 273 of file ProjectionParametersBase.hh.

virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix & R ) [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersProjective.

Definition at line 280 of file ProjectionParametersBase.hh.

References BIAS::RMatrixBase::GetQuaternion().

Referenced by SetRotation().

void BIAS::ProjectionParametersZoom::SetUnzoomed ( ) [inline]

Set the zoom and focal length of a zoom camera to the default settings.

Author:
streckel 06/2004

Definition at line 207 of file ProjectionParametersZoom.hh.

int BIAS::ProjectionParametersZoom::SetZoom ( const double abszoom ) [inline]

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Definition at line 187 of file ProjectionParametersZoom.hh.

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const [inherited]

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

void ProjectionParametersBase::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [virtual, inherited]

unscented transform worker function

Author:
koeser

Implements BIAS::UnscentedTransform.

Definition at line 161 of file ProjectionParametersBase.cpp.

References BIASASSERT, BIAS::ProjectionParametersBase::ProjectLocal(), TNT::Vector< T >::size(), BIAS::ProjectionParametersBase::UnProjectLocal(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

void ProjectionParametersZoom::Undistort ( BIAS::HomgPoint2D & point2d ) const

Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates.

TODO: faster implementation via Lookup-table

Author:
streckel 06/2004

Definition at line 264 of file ProjectionParametersZoom.cpp.

References focallengthZoom_, BIAS::ProjectionParametersBase::GetAspectratio(), BIAS::HomgPoint2D::Homogenize(), kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_, BIAS::ProjectionParametersBase::principalX_, and BIAS::ProjectionParametersBase::principalY_.

Referenced by UnProjectLocal().

Matrix3x3< double > ProjectionParametersBase::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | const Matrix3x3< double > & | cov2D,
 |  | bool | IgnoreDistortion = false
 | ) | [virtual, inherited]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Definition at line 179 of file ProjectionParametersBase.cpp.

References BIAS::MatrixZero, BIAS::UnscentedTransform::Transform(), BIAS::ProjectionParametersBase::ustIgnoreDistortion_, and BIAS::ProjectionParametersBase::ustTransformIntoImage_.

Vector3< double > ProjectionParametersZoom::UnProjectLocal | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual]

calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos e.g.

(0,0,1) means optical axis

Implements BIAS::ProjectionParametersBase.

Definition at line 43 of file ProjectionParametersZoom.cpp.

References invK_, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and Undistort().

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal | ( | const HomgPoint2D & | pos,
 |  | const double & | depth,
 |  | bool | IgnoreDistortion = false
 | ) | const [virtual, inherited]

calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Reimplemented in BIAS::ProjectionParametersSpherical.

Definition at line 149 of file ProjectionParametersBase.cpp.

References BIASERR, and BIAS::Vector3< T >::NormL2().

Vector3<double> BIAS::ProjectionParametersBase::UnProjectToRay | ( | const HomgPoint2D & | pos,
 |  | bool | IgnoreDistortion = false
 | ) | const [inline, inherited]

calculates the viewing ray in the global coordinate frame from the camera center which belongs to the given image position.

The resulting vector3 may have any length.

Author:
woelk 05/2006

Definition at line 157 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and R.

double ProjectionParametersBase::ViewDifference ( const ProjectionParametersBase * ) const [virtual, inherited]

returns difference of two projections like | C1-C2 |

This function can be used for inter camera distance and ordering purposes

Author:
koeser 03/2006

Reimplemented in BIAS::ProjectionParametersPerspective, and BIAS::ProjectionParametersSpherical.

Definition at line 140 of file ProjectionParametersBase.cpp.

References BIASABORT, and BIASERR.

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [inherited]

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

int ProjectionParametersZoom::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [virtual]

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 93 of file ProjectionParametersZoom.cpp.

int ProjectionParametersZoom::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [virtual]

specialization of XML read function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 125 of file ProjectionParametersZoom.cpp.

References BIASERR, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), knownparams_vect_, Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLIn().

int ProjectionParametersZoom::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [virtual]

specialization of XML write function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 101 of file ProjectionParametersZoom.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), knownparams_vect_, Version, BIAS::ProjectionParametersBase::XMLGetClassName(), and BIAS::ProjectionParametersBase::XMLOut().

int XMLBase::XMLRead ( const std::string & Filename ) [inherited]

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str ) [inherited]

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const [inherited]

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), BIAS::XMLBase::XMLGetClassName(), and BIAS::XMLBase::XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const [inherited]

serialize xml tree to string

Author:
evers

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [friend, inherited]

Definition at line 336 of file ProjectionParametersBase.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected, inherited]

aspectratio of the camera CCD

Definition at line 329 of file ProjectionParametersBase.hh.

Referenced by ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersZoom::focallengthZoom_ [protected]

Definition at line 246 of file ProjectionParametersZoom.hh.

Referenced by ComputeK_(), Distort(), InterpolateAbsZoom_(), and Undistort().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected, inherited]

height of image in pixels

Definition at line 323 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

KMatrix BIAS::ProjectionParametersZoom::invK_ [protected]

Definition at line 236 of file ProjectionParametersZoom.hh.

Referenced by ComputeK_(), and UnProjectLocal().

KMatrix BIAS::ProjectionParametersZoom::K_ [protected]

Definition at line 236 of file ProjectionParametersZoom.hh.

Referenced by ComputeK_(), and ProjectLocal().

double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersZoom::kc1Zoom_ [protected]

Definition at line 247 of file ProjectionParametersZoom.hh.

Referenced by Distort(), InterpolateDistortionFromIndex_(), and Undistort().

double BIAS::ProjectionParametersZoom::kc2Zoom_ [protected]

Definition at line 247 of file ProjectionParametersZoom.hh.

Referenced by Distort(), InterpolateDistortionFromIndex_(), and Undistort().

double BIAS::ProjectionParametersZoom::kc3Zoom_ [protected]

Definition at line 247 of file ProjectionParametersZoom.hh.

Referenced by Distort(), InterpolateDistortionFromIndex_(), and Undistort().

double BIAS::ProjectionParametersZoom::kc4Zoom_ [protected]

Definition at line 247 of file ProjectionParametersZoom.hh.

Referenced by Distort(), InterpolateDistortionFromIndex_(), and Undistort().

std::vector<CPDiscreteParam> BIAS::ProjectionParametersZoom::knownparams_vect_ [protected]

Definition at line 239 of file ProjectionParametersZoom.hh.

Referenced by AddZoomStep(), InterpolateAbsZoom_(), InterpolateDistortionFromIndex_(), InterpolateFocalLength_(), XMLIn(), and XMLOut().

Pose BIAS::ProjectionParametersBase::Pose_ [protected, inherited]

Definition at line 318 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersProjective::XMLOut().

double BIAS::ProjectionParametersBase::principalX_ [protected, inherited]

Principal Point Pixel Coordinates (one for all zoom settings).

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersBase::principalY_ [protected, inherited]

Definition at line 326 of file ProjectionParametersBase.hh.

Referenced by ComputeK_(), BIAS::ProjectionParametersPerspective::ComputeK_(), Distort(), BIAS::ProjectionParametersPerspective::Distort(), BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersSpherical::TransfCoordCalibImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordImage2Sphere_(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2CalibImage_(), BIAS::ProjectionParametersSpherical::TransfCoordSphere2Image_(), Undistort(), BIAS::ProjectionParametersPerspective::Undistort(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_ [protected, inherited]

Definition at line 333 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_ [protected, inherited]

unscented transform worker variables

Definition at line 332 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBase::Transform_(), and BIAS::ProjectionParametersBase::UnProjectLocal().

unsigned int BIAS::ProjectionParametersBase::width_ [protected, inherited]

width of image in pixels

Definition at line 321 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersSpherical::DoesPointProjectIntoImageLocal(), BIAS::ProjectionParametersPerspective::DoesPointProjectIntoImageLocal(), BIAS::operator<<(), BIAS::ProjectionParametersBase::operator=(), BIAS::ProjectionParametersPerspective::ViewDifference(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

double BIAS::ProjectionParametersZoom::zoom_ [protected]

Definition at line 245 of file ProjectionParametersZoom.hh.

Referenced by InterpolateFocalLength_().

The documentation for this class was generated from the following files:
  • Geometry/ProjectionParametersZoom.hh
  • Geometry/ProjectionParametersZoom.cpp
Generated on Wed Jun 21 19:10:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::PyramidImage< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::PyramidImage

BIAS::PyramidImage< StorageType > Class Template Reference
[PyramidImage, Camera, Histogram]

class for holding downsampled images More...

#include <Image/PyramidImage.hh>

Inheritance diagram for BIAS::PyramidImage< StorageType >:

[legend]
Collaboration diagram for BIAS::PyramidImage< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void clear ()
also deletes images
bool | DebugLevelIsSet (long int lv) const
int | Downsample ()
downsamples from (*this)[0] assumes that all pointers e.g.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
std::vector< double > & | GetFactors ()
std::vector< double > | GetFactors () const
int | GetLowPassType () const
double | GetPositionOffset () const
int | GetPyramidSize () const
double | GetRescaleFactor () const
void | GetSingleImage (Image< StorageType > &im) const
returns a single image containing all pyramid images
void | Init (unsigned int width, unsigned int height, unsigned int channelcount)
void | Init (const Image< StorageType > &image)
bool | IsEmpty ()
PyramidImage< StorageType > & | operator= (const PyramidImage< StorageType > &pim)
void | PrintDebugLevel (std::ostream &os=std::cout) const
PyramidImage (const PyramidImage< StorageType > &pim)
PyramidImage (Param &para, const int grp, const std::string &postfix)
PyramidImage (Param &para, const std::string &postfix="")
PyramidImage ()
void Release ()
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetLowPassType (const int lptype)
void | SetPyramidSize (const int size)
void | SetRescaleFactor (const double factor)
int | SetROI (unsigned minx, unsigned miny, unsigned maxx, unsigned maxy)
set the ROI for all images
void | SetUID (BIAS::UUID uid)
void SetZero ()
sets all pixels in all images to zero
int | WriteImages (const std::string &prefix)
writes a file in mip format per pyramid level using prefix
~PyramidImage ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void _CreateLevels ()
creates the levels by downsampling from (*this)[0]

Protected Attributes

long int | _liDebugLevel
bool | _ParamsAllocated
double | _PositionOffset
Offset which needs to be used when transferring point locations between pyramid levels:.
int * | _PyramidSize
Rescale< StorageType, StorageType > | _rescale
double * | _RescaleFactor
std::vector< double > | _vFactor

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::PyramidImage< StorageType >

class for holding downsampled images

pointer to the images are held in this class

Author:
woelk 09/2004

Definition at line 55 of file PyramidImage.hh.

Constructor & Destructor Documentation

template<class StorageType>
PyramidImage::PyramidImage ( )

Definition at line 39 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_ParamsAllocated, BIAS::PyramidImage< StorageType >::_PositionOffset, BIAS::PyramidImage< StorageType >::_PyramidSize, BIAS::PyramidImage< StorageType >::_rescale, BIAS::PyramidImage< StorageType >::_RescaleFactor, and BIAS::Rescale< InputStorageType, OutputStorageType >::SetFactor().

template<class StorageType>
PyramidImage::PyramidImage | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 55 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::PyramidImage< StorageType >::_ParamsAllocated, BIAS::PyramidImage< StorageType >::_PositionOffset, BIAS::PyramidImage< StorageType >::_PyramidSize, BIAS::PyramidImage< StorageType >::_RescaleFactor, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class StorageType>
PyramidImage::PyramidImage | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 70 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_AddParam(), BIAS::PyramidImage< StorageType >::_ParamsAllocated, BIAS::PyramidImage< StorageType >::_PositionOffset, BIAS::PyramidImage< StorageType >::_PyramidSize, and BIAS::PyramidImage< StorageType >::_RescaleFactor.

template<class StorageType>
PyramidImage::PyramidImage ( const PyramidImage< StorageType > & pim )

Definition at line 83 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_PyramidSize, and BIAS::PyramidImage< StorageType >::_RescaleFactor.

template<class StorageType>
PyramidImage::~PyramidImage ( )

Definition at line 91 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_ParamsAllocated, BIAS::PyramidImage< StorageType >::_PyramidSize, BIAS::PyramidImage< StorageType >::_RescaleFactor, and BIAS::PyramidImage< StorageType >::clear().

Member Function Documentation

template<class StorageType>
void PyramidImage::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Definition at line 370 of file PyramidImage.cpp.

References BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::PyramidImage< StorageType >::PyramidImage().

template<class StorageType>
void PyramidImage::_CreateLevels ( ) [protected]

creates the levels by downsampling from (*this)[0]

Definition at line 346 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_rescale, BIAS::PyramidImage< StorageType >::_RescaleFactor, BIAS::PyramidImage< StorageType >::_vFactor, BIASABORT, BIASERR, BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), it, and res.

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void PyramidImage::clear ( )

also deletes images

Author:
woelk 09/2004

Definition at line 153 of file PyramidImage.cpp.

References it.

Referenced by BIAS::PyramidImage< StorageType >::~PyramidImage().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int PyramidImage::Downsample ( )

downsamples from (*this)[0] assumes that all pointers e.g.

(*this)[1] are valid and point to an image of correct size returns 0 on success, anything else on failure

Author:
woelk

Definition at line 217 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_PositionOffset, BIAS::PyramidImage< StorageType >::_rescale, BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::GetPositionOffset(), it, and res.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class StorageType>
std::vector<double>& BIAS::PyramidImage< StorageType >::GetFactors ( ) [inline]

Definition at line 135 of file PyramidImage.hh.

template<class StorageType>
std::vector<double> BIAS::PyramidImage< StorageType >::GetFactors ( ) const [inline]

Definition at line 133 of file PyramidImage.hh.

Referenced by WritePyImage().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::PyramidImage< StorageType >::GetLowPassType ( ) const [inline]

Definition at line 131 of file PyramidImage.hh.

template<class StorageType>
double BIAS::PyramidImage< StorageType >::GetPositionOffset ( ) const [inline]

Author:
woelk, see _PostionOffset for details

Definition at line 138 of file PyramidImage.hh.

template<class StorageType>
int BIAS::PyramidImage< StorageType >::GetPyramidSize ( ) const [inline]

Definition at line 126 of file PyramidImage.hh.

template<class StorageType>
double BIAS::PyramidImage< StorageType >::GetRescaleFactor ( ) const [inline]

Definition at line 122 of file PyramidImage.hh.

template<class StorageType>
void PyramidImage::GetSingleImage ( Image< StorageType > & im ) const

returns a single image containing all pyramid images

Author:
woelk 09/2004

Definition at line 268 of file PyramidImage.cpp.

References BIASCDOUT, D_PYRAMID_SINGLE_IM, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), PYRAMID_BACKGROUND, PYRAMID_BORDER, BIAS::Image< StorageType >::Release(), and StorageType.

Referenced by BIAS::GuiBase::ShowImage(), and WritePyImage().

template<class StorageType>
void BIAS::PyramidImage< StorageType >::Init | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channelcount
 | ) |

Author:
woelk 09/2004

template<class StorageType>
void PyramidImage::Init ( const Image< StorageType > & image )

Author:
woelk 09/2004

Definition at line 102 of file PyramidImage.cpp.

References BIASABORT, and BIASERR.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), main(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), and BIAS::GuiBase::ShowImage().

template<class StorageType>
bool BIAS::PyramidImage< StorageType >::IsEmpty ( ) [inline]

Definition at line 105 of file PyramidImage.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::Tracker< StorageType, CalculationType >::PreparePyramide().

template<class StorageType>
PyramidImage< StorageType > & PyramidImage::operator= ( const PyramidImage< StorageType > & pim )

Author:
woelk 09/2004

Definition at line 175 of file PyramidImage.cpp.

References BIASERR.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
void BIAS::PyramidImage< StorageType >::Release ( ) [inline]

Definition at line 82 of file PyramidImage.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), and BIAS::Tracker< StorageType, CalculationType >::PreparePyramide().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::PyramidImage< StorageType >::SetLowPassType ( const int lptype ) [inline]

Definition at line 128 of file PyramidImage.hh.

template<class StorageType>
void BIAS::PyramidImage< StorageType >::SetPyramidSize ( const int size ) [inline]

Definition at line 124 of file PyramidImage.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class StorageType>
void BIAS::PyramidImage< StorageType >::SetRescaleFactor ( const double factor ) [inline]

Definition at line 119 of file PyramidImage.hh.

template<class StorageType>
int PyramidImage::SetROI | ( | unsigned | minx,
 |  | unsigned | miny,
 |  | unsigned | maxx,
 |  | unsigned | maxy
 | ) |

set the ROI for all images

Definition at line 241 of file PyramidImage.cpp.

References BIAS::PyramidImage< StorageType >::_RescaleFactor, and it.

template<class StorageType>
void PyramidImage::SetUID ( BIAS::UUID uid )

Definition at line 231 of file PyramidImage.cpp.

References it.

template<class StorageType>
void PyramidImage::SetZero ( )

sets all pixels in all images to zero

Author:
woelk 10/2004

Definition at line 258 of file PyramidImage.cpp.

References it.

Referenced by BIAS::Tracker< StorageType, CalculationType >::PreparePyramide().

template<class StorageType>
int PyramidImage::WriteImages ( const std::string & prefix )

writes a file in mip format per pyramid level using prefix

Author:
woelk 10/2004

Definition at line 389 of file PyramidImage.cpp.

References BIASERR, BUILD_IMAGE_CHAR, BUILD_IMAGE_INT, res, and BIAS::ImageIO::Write().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
bool BIAS::PyramidImage< StorageType >::_ParamsAllocated [protected]

Definition at line 144 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::PyramidImage(), and BIAS::PyramidImage< StorageType >::~PyramidImage().

template<class StorageType>
double BIAS::PyramidImage< StorageType >::_PositionOffset [protected]

Offset which needs to be used when transferring point locations between pyramid levels:.

(2*xs+offset, 2*ys+offset) = (xb, yb) or (xs, ys) = ((xb-offset)/2.0, (yb-offset)/2.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image.

see Rescale::DowsampleBy2 for details

Author:
woelk 05/2005

Definition at line 165 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::Downsample(), and BIAS::PyramidImage< StorageType >::PyramidImage().

template<class StorageType>
int* BIAS::PyramidImage< StorageType >::_PyramidSize [protected]

Definition at line 146 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::PyramidImage(), and BIAS::PyramidImage< StorageType >::~PyramidImage().

template<class StorageType>
Rescale<StorageType, StorageType> BIAS::PyramidImage< StorageType >::_rescale [protected]

Definition at line 138 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::PyramidImage< StorageType >::Downsample(), and BIAS::PyramidImage< StorageType >::PyramidImage().

template<class StorageType>
double* BIAS::PyramidImage< StorageType >::_RescaleFactor [protected]

Definition at line 148 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::_CreateLevels(), BIAS::PyramidImage< StorageType >::PyramidImage(), BIAS::PyramidImage< StorageType >::SetROI(), and BIAS::PyramidImage< StorageType >::~PyramidImage().

template<class StorageType>
std::vector<double> BIAS::PyramidImage< StorageType >::_vFactor [protected]

Definition at line 151 of file PyramidImage.hh.

Referenced by BIAS::PyramidImage< StorageType >::_CreateLevels().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Image/PyramidImage.hh
  • Image/PyramidImage.cpp
Generated on Wed Jun 21 19:10:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Quadric3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Quadric3D

BIAS::Quadric3D Class Reference
[Geometry and Transformations]

A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g. More...

#include <Geometry/Quadric3D.hh>

Inheritance diagram for BIAS::Quadric3D:

[legend]
Collaboration diagram for BIAS::Quadric3D:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< QUADRIC3D_TYPE > &arg)
Adds arg to this.
void | AddIP (const QUADRIC3D_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
QUADRIC3D_TYPE | det () const
calculate the determinant recursively using sub matrices of size 3x3
Subscript | dim (Subscript d) const
void | Divide (const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const QUADRIC3D_TYPE &scalar)
in place division function
void | Fill (const QUADRIC3D_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< QUADRIC3D_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
QUADRIC3D_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
QUADRIC3D_TYPE ** | GetDataArray () const
returns zero based arry for data access
QUADRIC3D_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
QUADRIC3D_TYPE * | GetDataLast () const
Get a pointer to the last data element.
Quadric3D | GetDualQuadric (bool UseSVD=false) const
computes the dual quadric (points <-> planes)
QUADRIC3D_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (QUADRIC3D_TYPE &max, QUADRIC3D_TYPE &min) const
return biggest and smallest entry
QUADRIC3D_TYPE | GetMean () const
Returns the mean value of the matrix elements.
QUADRIC3D_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
Vector< QUADRIC3D_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
unsigned int | GetRows () const
unsigned int | GetSignature ()
computes signature of matrix, (no.
void | GetSystemMatrix (Matrix< QUADRIC3D_TYPE > &dest) const
compute square system matrix dest = A^T * A
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
double | LocatePoint (const HomgPoint3D &point3D) const
determines if point3D is inside/on/outside the surface
Matrix (const TNT::Matrix< QUADRIC3D_TYPE > &A)
Matrix (const Matrix< QUADRIC3D_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const QUADRIC3D_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix4x4 (const Matrix3x3< QUADRIC3D_TYPE > &R, const Vector3< QUADRIC3D_TYPE > &trans)
Set as Rotation and Translation for similarity transforms.
Matrix4x4 (const TNT::Matrix< QUADRIC3D_TYPE > &A)
cast constructor from TNT::Matrix
Matrix4x4 (const Matrix< QUADRIC3D_TYPE > &arg)
Matrix4x4 (const Matrix4x4< QUADRIC3D_TYPE > &A)
Matrix4x4 (const MatrixInitType &i)
init matrix with identity or zero
Matrix4x4 (const QUADRIC3D_TYPEa0, const QUADRIC3D_TYPEa1, const QUADRIC3D_TYPEa2, const QUADRIC3D_TYPEa3, const QUADRIC3D_TYPEa4, const QUADRIC3D_TYPEa5, const QUADRIC3D_TYPEa6, const QUADRIC3D_TYPEa7, const QUADRIC3D_TYPEa8, const QUADRIC3D_TYPEa9, const QUADRIC3D_TYPEa10, const QUADRIC3D_TYPEa11, const QUADRIC3D_TYPEa12, const QUADRIC3D_TYPEa13, const QUADRIC3D_TYPEa14, const QUADRIC3D_TYPEa15)
Set the matrix values JW.
Matrix4x4 (const std::string &s)
JW.
Matrix4x4 ()
default constructor
void | Mult (const Vector< QUADRIC3D_TYPE > &arg, Vector< QUADRIC3D_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< QUADRIC3D_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< QUADRIC3D_TYPE > &arg, Matrix< QUADRIC3D_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix4x4< QUADRIC3D_TYPE > &argmat, Matrix4x4< QUADRIC3D_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'
void | Mult (const Vector4< QUADRIC3D_TYPE > &argvec, Vector4< QUADRIC3D_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
void | Multiply (const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const QUADRIC3D_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< QUADRIC3D_TYPE > &arg, Vector< QUADRIC3D_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< QUADRIC3D_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix4x4 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.
bool | Normalize ()
sets trace of upperleft submatrix3x3 to unity
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
QUADRIC3D_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
QUADRIC3D_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
QUADRIC3D_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Quadric3D & | operator= (const Matrix< QUADRIC3D_TYPE > &M)
assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
Quadric3D (const HomgPoint3D &C, const CovMatrix3x3 &cov, const double &dScale=GAUSS3D_CONFIDENCE_20_PERCENT)
constructs an ellipsoid around the center C
Quadric3D (const Matrix< QUADRIC3D_TYPE > &M)
Quadric3D (const MatrixInitType &i)
set default matrix values
Quadric3D ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScaleCol (int NoCol, QUADRIC3D_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, QUADRIC3D_TYPEscale)
Scales row NoRow with scale.
void | SetCol (const int row, const Vector< QUADRIC3D_TYPE > &data)
set a col of matrix from vector
void SetIdentity ()
set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< QUADRIC3D_TYPE > &data)
set a row of matrix from vector
void SetZero ()
Sets all values to zero.
Subscript | size () const
void | Sub (const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const QUADRIC3D_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< QUADRIC3D_TYPE > &arg)
Subtracts arg from this
this -= arg.
QUADRIC3D_TYPE | Trace () const
Matrix< QUADRIC3D_TYPE > | Transpose () const
transpose function, storing data destination matrix
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g.

a sphere)

Quadric3D is a 4x4 matrix Q, which describes a surface in 3d. All points x that lie on this surface, fulfill x^T Q x = 0, which is a quadratic equation in the components of x. For quadrics such as spheres or ellipsoids you can check if a point is inside or outside the quadric using LocatePoint(), for others you can also get the "side" the point lies relative to the Quadric. If the Quadric is a _normalized_ ellipsoid, points inside yield negative values while LocatePoint computes positive ones for points ouside.

Projective cameras map quadrics to conics (see Conic2D) in the image plane.

Construction of Quadrics (i.e. ellipsoids) from covariance matrices: You can construct a Quadric3D from a CovMatrix3x3, the 3d surface will then represent all points of some constant probability of the 3d-normal distribution. The decision which probability to choose as a threshold, and thus how large the ellipsoid should become, depends on the desired probability for a new measurement to lie inside the quadric.

The standard confidence region is the set of points which lie inside the ellipsoid defined by main axes' length = sigma_i The probability that a measurement falls into this region is only 20%. If you want to increase the confidence that a point falls into your ellipsoid, you may enlarge the main axes by multiplication with a constant factor (see 3D column in subsequent table). For comparison purposes, the coresponding factors for 1D/2D are also given in the table:

  • 1-D 2-D 3-D Conf(%)
  • 0.01 0.14 0.33 .. 01
  • 0.06 0.32 0.59 .. 05
  • 0.14 0.46 0.76 .. 10
  • 0.25 0.66 1.00 .. 20
  • 0.52 1.00 1.36 .. 39
  • 0.68 1.18 1.54 .. 50
  • 1.00 1.52 1.88 .. 68
  • 1.64 2.15 2.50 .. 90
  • 1.96 2.45 2.79 .. 95
  • 2.58 3.04 3.37 .. 99
  • 2.81 3.26 3.58 .. 99.5

Suppose you have a covariance matrix and want to create an ellipsoid, where 99% of new measurements will fall in. In that case you have to use main axes of length (sigma_i*3.37)

Author:
koeser 10/2003

Definition at line 105 of file Quadric3D.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::Quadric3D::Quadric3D ( ) [inline]

Definition at line 109 of file Quadric3D.hh.

BIAS::Quadric3D::Quadric3D ( const MatrixInitType & i ) [inline, explicit]

set default matrix values

Definition at line 112 of file Quadric3D.hh.

BIAS::Quadric3D::Quadric3D ( const Matrix< QUADRIC3D_TYPE > & M ) [inline]

Definition at line 115 of file Quadric3D.hh.

Quadric3D::Quadric3D | ( | const HomgPoint3D & | C,
 |  | const CovMatrix3x3 & | cov,
 |  | const double & | dScale = GAUSS3D_CONFIDENCE_20_PERCENT
 | ) |

constructs an ellipsoid around the center C

The covariance matrix's stddevs along the main axes (multiplied by dSize) are used as the ellipsoid's radii for dsize==1 this is the standard confidence region (SCR) see Kanatani: "Statistical optimization ...", p.122 The probability that the point is in the SCR is about 20% See doc above for values for other probabilities

Definition at line 36 of file Quadric3D.cpp.

References BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetV(), BIAS::Matrix3x3< T >::Invert(), Normalize(), BIAS::Matrix4x4< T >::SetIdentity(), BIAS::Matrix< T >::SetZero(), SINGULAR_THRESH_INVERSION, and BIAS::Matrix< T >::Transpose().

Member Function Documentation

void BIAS::Matrix< QUADRIC3D_TYPE >::Add | ( | const QUADRIC3D_TYPE & | scalar,
 |  | Matrix< QUADRIC3D_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< QUADRIC3D_TYPE >::AddIP ( const Matrix< QUADRIC3D_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< QUADRIC3D_TYPE >::AddIP ( const QUADRIC3D_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< QUADRIC3D_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< QUADRIC3D_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

QUADRIC3D_TYPE BIAS::Matrix4x4< QUADRIC3D_TYPE >::det ( ) const [inline, inherited]

calculate the determinant recursively using sub matrices of size 3x3

Author:
koeser 10/2003 experimental, slow implementation, not yet heavily tested

Definition at line 165 of file Matrix4x4.hh.

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< QUADRIC3D_TYPE >::Divide | ( | const QUADRIC3D_TYPE & | scalar,
 |  | Matrix< QUADRIC3D_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< QUADRIC3D_TYPE >::DivideIP ( const QUADRIC3D_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< QUADRIC3D_TYPE >::Fill ( const QUADRIC3D_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<QUADRIC3D_TYPE > BIAS::Matrix< QUADRIC3D_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< QUADRIC3D_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

QUADRIC3D_TYPE * BIAS::Matrix< QUADRIC3D_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

QUADRIC3D_TYPE ** BIAS::Matrix< QUADRIC3D_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

QUADRIC3D_TYPE ** BIAS::Matrix< QUADRIC3D_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

QUADRIC3D_TYPE * BIAS::Matrix< QUADRIC3D_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

Quadric3D Quadric3D::GetDualQuadric ( bool UseSVD = false ) const

computes the dual quadric (points <-> planes)

Parameters:
UseSVD use numerically robust svd or fast analytic inverse
Author:
koeser 03/2005

Definition at line 121 of file Quadric3D.cpp.

References a, BIAS::SVD::Invert(), QUADRIC3D_TYPE, and SVD_ZERO_THRESH.

Referenced by BIAS::Conic2D::SetQuadricProjection().

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< QUADRIC3D_TYPE >::GetMaxMin | ( | QUADRIC3D_TYPE & | max,
 |  | QUADRIC3D_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< QUADRIC3D_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

Vector<QUADRIC3D_TYPE > BIAS::Matrix< QUADRIC3D_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< QUADRIC3D_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

unsigned int Quadric3D::GetSignature ( )

computes signature of matrix, (no.

of neg. eigenvalues) - (no. of pos. eigenvalues) or vice versa if there are more pos. eigenvalues

Definition at line 91 of file Quadric3D.cpp.

References BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetS(), BIAS::SVD::GetVT(), and SVD_ZERO_THRESH.

void BIAS::Matrix< QUADRIC3D_TYPE >::GetSystemMatrix ( Matrix< QUADRIC3D_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

bool BIAS::Matrix< QUADRIC3D_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< QUADRIC3D_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< QUADRIC3D_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

double BIAS::Quadric3D::LocatePoint ( const HomgPoint3D & point3D ) const [inline]

determines if point3D is inside/on/outside the surface

For a normalized ellipsoid, a negative return value means the point is inside, a positive value means outside and 0 means exactly on the surface (you have to use epsilon environments for all tests) LocatePoint internally computes the difference of Mahalanobis distances of point3D from the center and a surface point from the center

Definition at line 136 of file Quadric3D.hh.

Referenced by main().

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix ( const TNT::Matrix< QUADRIC3D_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix ( const Matrix< QUADRIC3D_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const QUADRIC3D_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< QUADRIC3D_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 | ( | const Matrix3x3< QUADRIC3D_TYPE > & | R,
 |  | const Vector3< QUADRIC3D_TYPE > & | trans
 | ) | [inherited]

Set as Rotation and Translation for similarity transforms.

Author:
grest, Dec. 2004

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( const TNT::Matrix< QUADRIC3D_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( const Matrix< QUADRIC3D_TYPE > & arg ) [inherited]

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( const Matrix4x4< QUADRIC3D_TYPE > & A ) [inline, inherited]

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 | ( | const QUADRIC3D_TYPE | a0,
 |  | const QUADRIC3D_TYPE | a1,
 |  | const QUADRIC3D_TYPE | a2,
 |  | const QUADRIC3D_TYPE | a3,
 |  | const QUADRIC3D_TYPE | a4,
 |  | const QUADRIC3D_TYPE | a5,
 |  | const QUADRIC3D_TYPE | a6,
 |  | const QUADRIC3D_TYPE | a7,
 |  | const QUADRIC3D_TYPE | a8,
 |  | const QUADRIC3D_TYPE | a9,
 |  | const QUADRIC3D_TYPE | a10,
 |  | const QUADRIC3D_TYPE | a11,
 |  | const QUADRIC3D_TYPE | a12,
 |  | const QUADRIC3D_TYPE | a13,
 |  | const QUADRIC3D_TYPE | a14,
 |  | const QUADRIC3D_TYPE | a15
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix4x4< QUADRIC3D_TYPE >::Matrix4x4 ( ) [inline, inherited]

default constructor

void BIAS::Matrix< QUADRIC3D_TYPE >::Mult | ( | const Vector< QUADRIC3D_TYPE > & | arg,
 |  | Vector< QUADRIC3D_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< QUADRIC3D_TYPE >::Mult ( const Matrix< QUADRIC3D_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< QUADRIC3D_TYPE >::Mult | ( | const Matrix< QUADRIC3D_TYPE > & | arg,
 |  | Matrix< QUADRIC3D_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix4x4< QUADRIC3D_TYPE >::Mult | ( | const Matrix4x4< QUADRIC3D_TYPE > & | argmat,
 |  | Matrix4x4< QUADRIC3D_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix4x4, storing the result in destmat using 'manual inlining'

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 191 of file Matrix4x4.hh.

void BIAS::Matrix4x4< QUADRIC3D_TYPE >::Mult | ( | const Vector4< QUADRIC3D_TYPE > & | argvec,
 |  | Vector4< QUADRIC3D_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec

Author:
Jan Woetzel untested (04/17/2002)

Definition at line 122 of file Matrix4x4.hh.

void BIAS::Matrix< QUADRIC3D_TYPE >::Multiply | ( | const QUADRIC3D_TYPE & | scalar,
 |  | Matrix< QUADRIC3D_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< QUADRIC3D_TYPE >::MultiplyIP ( const QUADRIC3D_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< QUADRIC3D_TYPE >::MultLeft | ( | const Vector< QUADRIC3D_TYPE > & | arg,
 |  | Vector< QUADRIC3D_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< QUADRIC3D_TYPE >::MultLeft ( const Matrix< QUADRIC3D_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix4x4& BIAS::Matrix4x4< QUADRIC3D_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix Should be removed if Matrix4x4 becomes a base class.

(04/17/2002) Jan Woetzel

bool BIAS::Quadric3D::Normalize ( ) [inline]

sets trace of upperleft submatrix3x3 to unity

Reimplemented from BIAS::Matrix< QUADRIC3D_TYPE >.

Definition at line 140 of file Quadric3D.hh.

Referenced by Quadric3D().

void BIAS::Matrix< QUADRIC3D_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< QUADRIC3D_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< QUADRIC3D_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< QUADRIC3D_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

Quadric3D& BIAS::Quadric3D::operator= ( const Matrix< QUADRIC3D_TYPE > & M ) [inline]

assignment operators calling corresponding operator from base class "TNT::Matrix" if appropriate

Author:
Jan Woetzel untested (02/25/2002)

Reimplemented from BIAS::Matrix4x4< QUADRIC3D_TYPE >.

Definition at line 145 of file Quadric3D.hh.

References BIAS::Matrix4x4< QUADRIC3D_TYPE >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< QUADRIC3D_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix< QUADRIC3D_TYPE >::ScaleCol | ( | int | NoCol,
 |  | QUADRIC3D_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< QUADRIC3D_TYPE >::ScaleRow | ( | int | NoRow,
 |  | QUADRIC3D_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

void BIAS::Matrix< QUADRIC3D_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< QUADRIC3D_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix4x4< QUADRIC3D_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to the identity matrix (posisbly overriding the inherited method)

Author:
, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< QUADRIC3D_TYPE >.

Definition at line 261 of file Matrix4x4.hh.

void BIAS::Matrix< QUADRIC3D_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< QUADRIC3D_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::Matrix< QUADRIC3D_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< QUADRIC3D_TYPE >::Sub | ( | const QUADRIC3D_TYPE & | scalar,
 |  | Matrix< QUADRIC3D_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< QUADRIC3D_TYPE >::SubIP ( const QUADRIC3D_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< QUADRIC3D_TYPE >::SubIP ( const Matrix< QUADRIC3D_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

QUADRIC3D_TYPE BIAS::Matrix< QUADRIC3D_TYPE >::Trace ( ) const [inline, inherited]

Author:
koeser

Matrix<QUADRIC3D_TYPE > BIAS::Matrix< QUADRIC3D_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF

void BIAS::Matrix4x4< QUADRIC3D_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 3 --> 0 4 8 12 4 5 6 7 --> 1 5 9 13 8 9 10 11 --> 2 6 10 14 12 13 14 15 --> 3 7 11 15

Author:
Jan-Friso Evers-Senne untested (07/08/2002)

Definition at line 297 of file Matrix4x4.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/Quadric3D.hh
  • Geometry/Quadric3D.cpp
Generated on Wed Jun 21 19:10:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Quaternion< QUAT_TYPE > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Quaternion

BIAS::Quaternion< QUAT_TYPE > Class Template Reference
[Geometry and Transformations]

class for rotation with axis and angle More...

#include <Base/Geometry/Quaternion.hh>

Inheritance diagram for BIAS::Quaternion< QUAT_TYPE >:

[legend]
Collaboration diagram for BIAS::Quaternion< QUAT_TYPE >:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector4< QUAT_TYPE > &argvec)
in place adding
void | AddIP (const QUAT_TYPE &scalar)
Addition (in place) of an scalar.
void | Copy (const QUAT_TYPE *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector4< QUAT_TYPE > &vec) const
Return the euclidian distance of 2 vectors.
void | Divide (const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const
Division with a scalar, storing results in destionation vector.
void | DivideIP (const QUAT_TYPE &scalar)
Division (in place) of an scalar.
void | ElementwiseProduct (const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const
multiply two vectors elementwise, storing the result in destvec
int | GetAxisAngle (Vector3< QUAT_TYPE > &axis, QUAT_TYPE &angle) const
returns rotation in axis and angle notation, angle in rad
QUAT_TYPE * | GetData ()
const QUAT_TYPE * | GetData () const
get the data pointer the member function itself is const (before {.
int | GetRotationMatrix (RMatrixBase &R) const
returns a corresponding (quaternion) rotation matrix
Quaternion< QUAT_TYPE > | Inverse () const
returns the Inverse rotation Quaternion
void Invert ()
inverts this, by changing the rotation axis by *=-1
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Mult (const Quaternion< QUAT_TYPE > &arg, Quaternion< QUAT_TYPE > &res)
quaternion multiplication: res = this * arg
void | Mult (const Quaternion< QUAT_TYPE > &quat)
quaternion multiplication: this= this * quat
void | Multiply (const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const QUAT_TYPE &scalar)
Multiplication (in place) of an scalar.
void | MultLeft (const Quaternion< QUAT_TYPE > &quat)
quaternion multiplication: this = quat * this
Vector3< QUAT_TYPE > | MultVec (const Vector3< QUAT_TYPE > &vec) const
int | MultVec (const Vector3< QUAT_TYPE > &vec, Vector3< QUAT_TYPE > &res) const
rotates the given Vector qith the quaternion ( q v q* ) the resulting vector is given in res
void Normalize ()
scale vector4 so that norm = 1 The use of this is questionable.
QUAT_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c|+ |d|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).
Vector4< QUAT_TYPE > & | operator *= (const QUAT_TYPE &scalar)
Multiplication operator with scalar argument.
bool | operator!= (const Vector4< QUAT_TYPE > &arg) const
Comparison operator 'not equal'.
Vector4< QUAT_TYPE > & | operator+= (const Vector4< QUAT_TYPE > &argvec)
add operator for two Vectors
Vector4< QUAT_TYPE > & | operator+= (const QUAT_TYPE &scalar)
Addition operator with scalar argument.
Vector4< QUAT_TYPE > & | operator-= (const Vector4< QUAT_TYPE > &argvec)
sub operator for two Vectors
Vector4< QUAT_TYPE > & | operator-= (const QUAT_TYPE &scalar)
Substraction operator with scalar argument.
Vector4< QUAT_TYPE > & | operator/= (const QUAT_TYPE &scalar)
Division operator with scalar argument.
Quaternion< QUAT_TYPE > & | operator= (const Quaternion< QUAT_TYPE > &vec)
assignment operator
bool | operator== (const Vector4< QUAT_TYPE > &arg) const
Comparison operator 'equal'.
QUAT_TYPE & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const QUAT_TYPE & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix4x4< QUAT_TYPE > | OuterProduct (const Vector4< QUAT_TYPE > &v) const
outer product, constructs a matrix.
Quaternion (QUAT_TYPE i, QUAT_TYPE j, QUAT_TYPE k, QUAT_TYPE r)
Quaternion (const Quaternion< QUAT_TYPE > &q)
copy constructor
Quaternion ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScalarProduct (const Vector4< QUAT_TYPE > &argvec, QUAT_TYPE &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const QUAT_TYPE &x, const QUAT_TYPE &y, const QUAT_TYPE &z, const QUAT_TYPE &w)
set elementwise with given scalr values
void | Set (const QUAT_TYPE &scalar)
set all elements to a scalat value
void SetIdentity ()
void | SetValueAsAxisRad (QUAT_TYPE axisX, QUAT_TYPE axisY, QUAT_TYPE axisZ, QUAT_TYPE angle)
sets the quaternion with given rotation axis and angle (in rad)
void | SetValueAsAxisRad (const Vector3< QUAT_TYPE > &axis, QUAT_TYPE angle)
sets the quaternion with given rotation axis and angle (in rad)
int | SetXYZ (QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ)
sets quaternion as concatenated rotations around x,y,z-axis in order x,y,z (OpenSG conform)
void SetZero ()
set all values to 0
int | SetZYX (QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ)
sets quaternion as concatenated rotations around x,y,z-axis in order z,x,y (OpenSG conform)
const int | Size () const
void | Sub (const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector4< QUAT_TYPE > &argvec)
in place substraction
void | SubIP (const QUAT_TYPE &scalar)
Substraction (in place) of an scalar.
Matrix< QUAT_TYPE > | transposed () const
return a new Matrix with 1 row and 4 columns representing a transposed vector
Vector4 (const Vector< QUAT_TYPE > &v)
cast constructor
Vector4 (const QUAT_TYPEv0, const QUAT_TYPEv1, const QUAT_TYPEv2, const QUAT_TYPEv3)
constructor with element assigment using explicit values
Vector4 (char *s)
constructor with element assignment
Vector4 (const QUAT_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Vector4 (const QUAT_TYPE &scalar)
assignment with a constant value for all elements
Vector4 (const Vector4< QUAT_TYPE > &vec)
copy constructor
Vector4 ()
~Quaternion ()

Protected Attributes

QUAT_TYPE | data_ [VECTOR4SIZE]

Related Functions

(Note that these are not member functions.)

Quaternion< T > | operator * (const Quaternion< T > &a, const Quaternion< T > &b)
Quaternion< T > & | operator *= (Quaternion< T > &l, const Quaternion< T > &r)
Quaternion< T > | operator/ (const Quaternion< T > &a, const Quaternion< T > &b)
Quaternion< T > & | operator/= (Quaternion< T > &l, const Quaternion< T > &r)

Detailed Description

template<class QUAT_TYPE>
class BIAS::Quaternion< QUAT_TYPE >

class for rotation with axis and angle

Quaternions can be used for rotation around an axis through the origin by spcecifing the normal direction vector of the axis and an angle.

The rotation for positive angles is clockwise, when looking in direction of the axis.

Contains qx=[0], qy=[1], qz=[2], qw=[3].

Not every quaternion describes a rotation. Only quaternions of the form:

qx = x * sin(phi/2) , which is the imaginary part i

qy = y * sin(phi/2) , which is the imaginary part j

qz = z * sin(phi/2) , which is the imaginary part k

qw = cos(phi/2), , which is the real part

where (x, y, z) is the normalized direction vector of the axis and phi is the angle of rtoation.

Some usefull quaternions: x y z w Description 0 0 0 1 Identity quaternion, no rotation 1 0 0 0 180' turn around X axis 0 1 0 0 180' turn around Y axis 0 0 1 0 180' turn around Z axis sqrt(0.5) 0 0 sqrt(0.5) 90' rotation around X axis 0 sqrt(0.5) 0 sqrt(0.5) 90' rotation around Y axis 0 0 sqrt(0.5) sqrt(0.5) 90' rotation around Z axis -sqrt(0.5) 0 0 sqrt(0.5) -90' rotation around X axis 0 -sqrt(0.5) 0 sqrt(0.5) -90' rotation around Y axis 0 0 -sqrt(0.5) sqrt(0.5) -90' rotation around Z axis

Author:
grest 06 2003

Definition at line 88 of file Quaternion.hh.

Constructor & Destructor Documentation

template<class QUAT_TYPE>
Quaternion::~Quaternion ( )

Definition at line 34 of file Quaternion.cpp.

template<class QUAT_TYPE>
Quaternion::Quaternion ( )

Definition at line 38 of file Quaternion.cpp.

template<class QUAT_TYPE>
BIAS::Quaternion< QUAT_TYPE >::Quaternion ( const Quaternion< QUAT_TYPE > & q ) [inline]

copy constructor

Author:
Daniel Grest (06/2003)

Definition at line 99 of file Quaternion.hh.

template<class QUAT_TYPE>
Quaternion::Quaternion | ( | QUAT_TYPE | i,
 |  | QUAT_TYPE | j,
 |  | QUAT_TYPE | k,
 |  | QUAT_TYPE | r
 | ) |

Definition at line 44 of file Quaternion.cpp.

Member Function Documentation

void BIAS::Vector4< QUAT_TYPE >::Add | ( | const Vector4< QUAT_TYPE > & | argvec,
 |  | Vector4< QUAT_TYPE > & | destvec
 | ) | const [inline, inherited]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< QUAT_TYPE >::Add | ( | const QUAT_TYPE & | scalar,
 |  | Vector4< QUAT_TYPE > & | dest
 | ) | const [inline, inherited]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::AddIP ( const Vector4< QUAT_TYPE > & argvec ) [inline, inherited]

in place adding

Author:
Ingo Thomsen tested

void BIAS::Vector4< QUAT_TYPE >::AddIP ( const QUAT_TYPE & scalar ) [inline, inherited]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::Copy ( const QUAT_TYPE * pv ) [inline, inherited]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

double BIAS::Vector4< QUAT_TYPE >::Dist ( const Vector4< QUAT_TYPE > & vec ) const [inline, inherited]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

void BIAS::Vector4< QUAT_TYPE >::Divide | ( | const QUAT_TYPE & | scalar,
 |  | Vector4< QUAT_TYPE > & | dest
 | ) | const [inline, inherited]

Division with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::DivideIP ( const QUAT_TYPE & scalar ) [inline, inherited]

Division (in place) of an scalar.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::ElementwiseProduct | ( | const Vector4< QUAT_TYPE > & | argvec,
 |  | Vector4< QUAT_TYPE > & | destvec
 | ) | const [inline, inherited]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel untested (03/06/2002)

template<class QUAT_TYPE>
int Quaternion::GetAxisAngle | ( | Vector3< QUAT_TYPE > & | axis,
 |  | QUAT_TYPE & | angle
 | ) | const

returns rotation in axis and angle notation, angle in rad

Author:
woelk 12 2002

Definition at line 50 of file Quaternion.cpp.

References BIAS::Vector3< T >::NormL2(), QUATERNION_EPSILON, and res.

Referenced by BIAS::RMatrixBase::GetRotationAxisAngle().

QUAT_TYPE * BIAS::Vector4< QUAT_TYPE >::GetData ( ) [inline, inherited]

Definition at line 134 of file Vector4.hh.

const QUAT_TYPE * BIAS::Vector4< QUAT_TYPE >::GetData ( ) const [inline, inherited]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 130 of file Vector4.hh.

Referenced by BIAS::Quaternion< QUAT_TYPE >::operator=(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::ProjectionParametersBase::XMLOut().

template<class QUAT_TYPE>
int Quaternion::GetRotationMatrix ( RMatrixBase & R ) const

returns a corresponding (quaternion) rotation matrix

Deprecated:
Transpose problem !!! This function is going to be removed Use RMatrixBase::SetFromQuaternion instead.
Author:
grest

Definition at line 74 of file Quaternion.cpp.

References BIASABORT, and BIASERR.

Referenced by main().

template<class QUAT_TYPE>
Quaternion<QUAT_TYPE> BIAS::Quaternion< QUAT_TYPE >::Inverse ( ) const [inline]

returns the Inverse rotation Quaternion

Referenced by BIAS::Quaternion< QUAT_TYPE >::operator/(), and BIAS::Quaternion< QUAT_TYPE >::operator/=().

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::Invert ( ) [inline]

inverts this, by changing the rotation axis by *=-1

bool BIAS::Vector4< QUAT_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::Mult | ( | const Quaternion< QUAT_TYPE > & | arg,
 |  | Quaternion< QUAT_TYPE > & | res
 | ) | [inline]

quaternion multiplication: res = this * arg

Definition at line 122 of file Quaternion.hh.

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::Mult ( const Quaternion< QUAT_TYPE > & quat ) [inline]

quaternion multiplication: this= this * quat

Referenced by BIAS::Quaternion< double >::Mult(), BIAS::Quaternion< QUAT_TYPE >::operator *(), BIAS::Quaternion< QUAT_TYPE >::operator *=(), BIAS::Quaternion< QUAT_TYPE >::operator/(), BIAS::Quaternion< QUAT_TYPE >::operator/=(), BIAS::Quaternion< QUAT_TYPE >::SetXYZ(), and BIAS::Quaternion< QUAT_TYPE >::SetZYX().

void BIAS::Vector4< QUAT_TYPE >::Multiply | ( | const QUAT_TYPE & | scalar,
 |  | Vector4< QUAT_TYPE > & | dest
 | ) | const [inline, inherited]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::MultiplyIP ( const QUAT_TYPE & scalar ) [inline, inherited]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::MultLeft ( const Quaternion< QUAT_TYPE > & quat ) [inline]

quaternion multiplication: this = quat * this

template<class QUAT_TYPE>
Vector3<QUAT_TYPE> BIAS::Quaternion< QUAT_TYPE >::MultVec ( const Vector3< QUAT_TYPE > & vec ) const [inline]

Definition at line 143 of file Quaternion.hh.

template<class QUAT_TYPE>
int BIAS::Quaternion< QUAT_TYPE >::MultVec | ( | const Vector3< QUAT_TYPE > & | vec,
 |  | Vector3< QUAT_TYPE > & | res
 | ) | const [inline]

rotates the given Vector qith the quaternion ( q v q* ) the resulting vector is given in res

Returns:
0 in case of no error
Author:
Daniel Grest, June 2003

Referenced by BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), and BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_().

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::Normalize ( ) [inline]

scale vector4 so that norm = 1 The use of this is questionable.

.. who wrote this? (grest)

Definition at line 188 of file Quaternion.hh.

Referenced by ErrorFunction(), BIAS::ProjectionGUI::OnNormalizeQuaternion(), and BIAS::RMatrixBase::SetFromQuaternion().

QUAT_TYPE BIAS::Vector4< QUAT_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c|+ |d|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

double BIAS::Vector4< QUAT_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator *= ( const QUAT_TYPE & scalar ) [inline, inherited]

Multiplication operator with scalar argument.

Author:
Ingo Thomsen tested

bool BIAS::Vector4< QUAT_TYPE >::operator!= ( const Vector4< QUAT_TYPE > & arg ) const [inline, inherited]

Comparison operator 'not equal'.

Author:
Ingo Thomsen

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator+= ( const Vector4< QUAT_TYPE > & argvec ) [inline, inherited]

add operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator+= ( const QUAT_TYPE & scalar ) [inline, inherited]

Addition operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator-= ( const Vector4< QUAT_TYPE > & argvec ) [inline, inherited]

sub operator for two Vectors

Author:
Ingo Thomsen tested

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator-= ( const QUAT_TYPE & scalar ) [inline, inherited]

Substraction operator with scalar argument.

Author:
Ingo Thomsen tested

Vector4<QUAT_TYPE >& BIAS::Vector4< QUAT_TYPE >::operator/= ( const QUAT_TYPE & scalar ) [inline, inherited]

Division operator with scalar argument.

Author:
Ingo Thomsen tested

template<class QUAT_TYPE>
Quaternion< QUAT_TYPE > & Quaternion::operator= ( const Quaternion< QUAT_TYPE > & vec )

assignment operator

Author:
grest 06 2003

Definition at line 126 of file Quaternion.cpp.

References BIAS::Vector4< QUAT_TYPE >::GetData(), and VECTOR4SIZE.

bool BIAS::Vector4< QUAT_TYPE >::operator== ( const Vector4< QUAT_TYPE > & arg ) const [inline, inherited]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

QUAT_TYPE & BIAS::Vector4< QUAT_TYPE >::operator[] ( const int i ) [inline, inherited]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel alpha (03/01/2002)

const QUAT_TYPE & BIAS::Vector4< QUAT_TYPE >::operator[] ( const int i ) const [inline, inherited]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel alpha (03/01/2002)

Matrix4x4<QUAT_TYPE > BIAS::Vector4< QUAT_TYPE >::OuterProduct ( const Vector4< QUAT_TYPE > & v ) const [inherited]

outer product, constructs a matrix.

Often written as v * v^T for col vectors

Author:
frick

bool BIAS::Vector4< QUAT_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

void BIAS::Vector4< QUAT_TYPE >::ScalarProduct | ( | const Vector4< QUAT_TYPE > & | argvec,
 |  | QUAT_TYPE & | result
 | ) | const [inline, inherited]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel untested

void BIAS::Vector4< QUAT_TYPE >::Set | ( | const QUAT_TYPE & | x,
 |  | const QUAT_TYPE & | y,
 |  | const QUAT_TYPE & | z,
 |  | const QUAT_TYPE & | w
 | ) | [inline, inherited]

set elementwise with given scalr values

Author:
Jan Woetzel, Ingo Thomsen tested (02/28/2002)

void BIAS::Vector4< QUAT_TYPE >::Set ( const QUAT_TYPE & scalar ) [inline, inherited]

set all elements to a scalat value

Author:
Jan Woetzel untested (02/28/2002)

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::SetIdentity ( ) [inline]

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad | ( | QUAT_TYPE | axisX,
 |  | QUAT_TYPE | axisY,
 |  | QUAT_TYPE | axisZ,
 |  | QUAT_TYPE | angle
 | ) | [inline]

sets the quaternion with given rotation axis and angle (in rad)

Returns:
0 in case of no error
Author:
Daniel Grest, June 2003

template<class QUAT_TYPE>
void BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad | ( | const Vector3< QUAT_TYPE > & | axis,
 |  | QUAT_TYPE | angle
 | ) | [inline]

sets the quaternion with given rotation axis and angle (in rad)

Returns:
0 in case of no error
Author:
Daniel Grest, June 2003

Referenced by main(), BIAS::Quaternion< QUAT_TYPE >::SetXYZ(), BIAS::Quaternion< QUAT_TYPE >::SetZYX(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), and BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_().

template<class QUAT_TYPE>
int Quaternion::SetXYZ | ( | QUAT_TYPE | radX,
 |  | QUAT_TYPE | radY,
 |  | QUAT_TYPE | radZ
 | ) |

sets quaternion as concatenated rotations around x,y,z-axis in order x,y,z (OpenSG conform)

Author:
herzog 2005-07-19

Definition at line 86 of file Quaternion.cpp.

References BIAS::Quaternion< QUAT_TYPE >::Mult(), and BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad().

void BIAS::Vector4< QUAT_TYPE >::SetZero ( ) [inline, inherited]

set all values to 0

Author:
Jan Woetzel

template<class QUAT_TYPE>
int Quaternion::SetZYX | ( | QUAT_TYPE | radX,
 |  | QUAT_TYPE | radY,
 |  | QUAT_TYPE | radZ
 | ) |

sets quaternion as concatenated rotations around x,y,z-axis in order z,x,y (OpenSG conform)

Author:
herzog 2005-07-19

Definition at line 106 of file Quaternion.cpp.

References BIAS::Quaternion< QUAT_TYPE >::Mult(), and BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad().

const int BIAS::Vector4< QUAT_TYPE >::Size ( ) const [inline, inherited]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

void BIAS::Vector4< QUAT_TYPE >::Sub | ( | const Vector4< QUAT_TYPE > & | argvec,
 |  | Vector4< QUAT_TYPE > & | destvec
 | ) | const [inline, inherited]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

void BIAS::Vector4< QUAT_TYPE >::Sub | ( | const QUAT_TYPE & | scalar,
 |  | Vector4< QUAT_TYPE > & | dest
 | ) | const [inline, inherited]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

void BIAS::Vector4< QUAT_TYPE >::SubIP ( const Vector4< QUAT_TYPE > & argvec ) [inline, inherited]

in place substraction

Author:
Ingo Thomsen tested

void BIAS::Vector4< QUAT_TYPE >::SubIP ( const QUAT_TYPE & scalar ) [inline, inherited]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Matrix<QUAT_TYPE > BIAS::Vector4< QUAT_TYPE >::transposed ( ) const [inline, inherited]

return a new Matrix with 1 row and 4 columns representing a transposed vector

BIAS::Vector4< QUAT_TYPE >::Vector4 ( const Vector< QUAT_TYPE > & v ) [inherited]

cast constructor

Author:
Jan Woetzel untested (03/22/2002)

BIAS::Vector4< QUAT_TYPE >::Vector4 | ( | const QUAT_TYPE | v0,
 |  | const QUAT_TYPE | v1,
 |  | const QUAT_TYPE | v2,
 |  | const QUAT_TYPE | v3
 | ) | [inline, inherited]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

BIAS::Vector4< QUAT_TYPE >::Vector4 ( char * s ) [inline, explicit, inherited]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< QUAT_TYPE >::Vector4 ( const QUAT_TYPE * pv ) [inline, explicit, inherited]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

BIAS::Vector4< QUAT_TYPE >::Vector4 ( const QUAT_TYPE & scalar ) [inline, explicit, inherited]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

BIAS::Vector4< QUAT_TYPE >::Vector4 ( const Vector4< QUAT_TYPE > & vec ) [inline, inherited]

copy constructor

Author:
Daniel Grest (06/2003)

Definition at line 70 of file Vector4.hh.

BIAS::Vector4< QUAT_TYPE >::Vector4 ( ) [inline, inherited]

Definition at line 65 of file Vector4.hh.

Friends And Related Function Documentation

template<class QUAT_TYPE>
Quaternion< T > operator * | ( | const Quaternion< T > & | a,
 |  | const Quaternion< T > & | b
 | ) | [related]

what it stands for (wraps Mult())

Author:
herzog 2005-07-15

Definition at line 43 of file QuaternionOperators.hh.

References BIAS::Quaternion< QUAT_TYPE >::Mult(), and r.

template<class QUAT_TYPE>
Quaternion< T > & operator *= | ( | Quaternion< T > & | l,
 |  | const Quaternion< T > & | r
 | ) | [related]

what it stands for (wraps Mult())

Author:
herzog 2005-07-15

Definition at line 55 of file QuaternionOperators.hh.

References BIAS::Quaternion< QUAT_TYPE >::Mult().

template<class QUAT_TYPE>
Quaternion< T > operator/ | ( | const Quaternion< T > & | a,
 |  | const Quaternion< T > & | b
 | ) | [related]

what it stands for (wraps Mult() and Inverse())

Author:
herzog 2005-07-15

Definition at line 66 of file QuaternionOperators.hh.

References BIAS::Quaternion< QUAT_TYPE >::Inverse(), BIAS::Quaternion< QUAT_TYPE >::Mult(), and r.

template<class QUAT_TYPE>
Quaternion< T > & operator/= | ( | Quaternion< T > & | l,
 |  | const Quaternion< T > & | r
 | ) | [related]

what it stands for (wraps Mult() and Inverse())

Author:
herzog 2005-07-15

Definition at line 78 of file QuaternionOperators.hh.

References BIAS::Quaternion< QUAT_TYPE >::Inverse(), and BIAS::Quaternion< QUAT_TYPE >::Mult().

Member Data Documentation

QUAT_TYPE BIAS::Vector4< QUAT_TYPE >::data_[VECTOR4SIZE] [protected, inherited]

Definition at line 326 of file Vector4.hh.

The documentation for this class was generated from the following files:
  • Base/Geometry/Quaternion.hh
  • Base/Geometry/Quaternion.cpp
  • Base/Geometry/QuaternionOperators.hh
Generated on Wed Jun 21 19:10:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Random Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Random

BIAS::Random Class Reference
[Algorithms]

class for producing random numbers from different distributions More...

#include <Base/Math/Random.hh>

Inheritance diagram for BIAS::Random:

[legend]
Collaboration diagram for BIAS::Random:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetNormalDistributed (const Vector2< double > &mean, const Matrix2x2< double > &cov, int num, std::vector< Vector2< double > > &ran)
Generates a vector of length num containing 2D (dependent) normal distributed random variables.
int | GetNormalDistributed (const Vector2< double > &mean, const Matrix2x2< double > &cov, Vector2< double > &ran)
See GetNormalDistributed().
void | GetNormalDistributed (double mean, double sigma, int num, double *res)
calculates num normal ditributed random variables and stores them in res
double | GetNormalDistributed (double mean, double sigma)
on succesive calls return normal distributed random variable with mean and standard deviation sigma
void | GetUniformDistributed (double min, double max, int num, double *res)
calculates num uniform ditributed random variables and stores them in res
double | GetUniformDistributed (double min, double max)
on succesive calls return uniform distributed random variable between min and max
unsigned int | GetUniformDistributedInt (unsigned int min, unsigned int max)
get uniform distributed random variable including min/max
int | GetUniformDistributedInt (int min, int max)
get uniform distributed random variable including min/max
void | PrintDebugLevel (std::ostream &os=std::cout) const
Random (long int seed)
calls Reset(seed) and therefore srand()
Random ()
initializes vars/seed with deterministic values, NOT calling reset
void | RemoveDebugLevel (long int lv)
void | Reset (long int seed)
calls srand with seed, also initializes some other variables
void Reset ()
calls srand() with a seed generated from system call time, also initializes some other variables
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
~Random ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

double | gasdev3_ (int *idum)
double | gasdev_ (int *idum)
produces normal distributed random variable with unit variance and zero mean
double | gasdevf_ (long *idum)
double | ran1_ (int *idum)
produces uniform random variable between 0 and 1 exclusive
double | ran1c_ (int *idum)
double | ran2_ (long *idum)

Protected Attributes

long int | _liDebugLevel
int | Idum_
long | LongIdum_
unsigned int | Seed_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

class for producing random numbers from different distributions

IMPORTANT: Problems arise when multiple of these instances are used since every call to Reset() results in a call to srand() (from stdlib) with a specific seed. Calling srand() is a global action that will affect all other instances as well

Author:
woelk 2002

Definition at line 51 of file Random.hh.

Constructor & Destructor Documentation

Random::Random ( )

initializes vars/seed with deterministic values, NOT calling reset

Definition at line 63 of file Random.cpp.

References Reset().

Random::Random ( long int seed )

calls Reset(seed) and therefore srand()

Definition at line 75 of file Random.cpp.

References Reset().

Random::~Random ( )

Definition at line 59 of file Random.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

double Random::gasdev3_ ( int * idum ) [protected]

Definition at line 433 of file Random.cpp.

References ran1_().

double Random::gasdev_ ( int * idum ) [protected]

produces normal distributed random variable with unit variance and zero mean

Definition at line 388 of file Random.cpp.

References ran1_().

double Random::gasdevf_ ( long * idum ) [protected]

Definition at line 410 of file Random.cpp.

References ran2_().

Referenced by GetNormalDistributed().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::Random::GetNormalDistributed | ( | const Vector2< double > & | mean,
 |  | const Matrix2x2< double > & | cov,
 |  | int | num,
 |  | std::vector< Vector2< double > > & | ran
 | ) |

Generates a vector of length num containing 2D (dependent) normal distributed random variables.

The 2D distribution is described by the covariance matrix cov.

Returns:
0 on success , negative on error
Author:
woelk 07/2005

int Random::GetNormalDistributed | ( | const Vector2< double > & | mean,
 |  | const Matrix2x2< double > & | cov,
 |  | Vector2< double > & | ran
 | ) |

See GetNormalDistributed().

Author:
woelk 07/2005

Definition at line 167 of file Random.cpp.

References GetNormalDistributed(), and res.

void Random::GetNormalDistributed | ( | double | mean,
 |  | double | sigma,
 |  | int | num,
 |  | double * | res
 | ) |

calculates num normal ditributed random variables and stores them in res

Definition at line 158 of file Random.cpp.

References gasdevf_(), and LongIdum_.

double BIAS::Random::GetNormalDistributed | ( | double | mean,
 |  | double | sigma
 | ) | [inline]

on succesive calls return normal distributed random variable with mean and standard deviation sigma

Definition at line 71 of file Random.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::Condensation::AddDiffusions_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), CreateMatches(), GenerateData(), GenerateNoisyMeasurements(), BIAS::Triangulation::GetCovariance(), GetNormalDistributed(), GetSystem(), main(), and Process().

void Random::GetUniformDistributed | ( | double | min,
 |  | double | max,
 |  | int | num,
 |  | double * | res
 | ) |

calculates num uniform ditributed random variables and stores them in res

Definition at line 150 of file Random.cpp.

References LongIdum_, and ran2_().

double BIAS::Random::GetUniformDistributed | ( | double | min,
 |  | double | max
 | ) | [inline]

on succesive calls return uniform distributed random variable between min and max

Definition at line 81 of file Random.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateMoving3DPoints(), BIAS::GenSynthMatches::_CreateStatic3DPoints(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), CreateMatches(), GenerateData(), GenerateNoisyMeasurements(), GetSystem(), GetUniformDistributedInt(), BIAS::CondensImg::InitPriorPositions(), BIAS::CondensHisto::InitPriorPositions(), main(), MatrixSqrt(), and BIAS::Condensation::PickImportanceSample_().

unsigned int Random::GetUniformDistributedInt | ( | unsigned int | min,
 |  | unsigned int | max
 | ) |

get uniform distributed random variable including min/max

Definition at line 141 of file Random.cpp.

References GetUniformDistributed(), and res.

int Random::GetUniformDistributedInt | ( | int | min,
 |  | int | max
 | ) |

get uniform distributed random variable including min/max

Definition at line 129 of file Random.cpp.

Referenced by BIAS::MSAC< SolutionType >::_GenerateSamplesRandom(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), and main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

double Random::ran1_ ( int * idum ) [protected]

produces uniform random variable between 0 and 1 exclusive

Definition at line 259 of file Random.cpp.

References AM, IA, IM, IQ, IR, NDIV, NTAB, and RNMX.

Referenced by gasdev3_(), and gasdev_().

double Random::ran1c_ ( int * idum ) [protected]

Definition at line 309 of file Random.cpp.

References BIASERR, IA1, IA2, IA3, IC1, IC2, IC3, M1, M2, M3, r, RM1, and RM2.

double Random::ran2_ ( long * idum ) [protected]

Definition at line 357 of file Random.cpp.

References BIASASSERT, BIASERR, IA, IC, and M.

Referenced by gasdevf_(), and GetUniformDistributed().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void Random::Reset ( long int seed )

calls srand with seed, also initializes some other variables

Definition at line 83 of file Random.cpp.

References first, Idum_, LongIdum_, and Seed_.

void Random::Reset ( )

calls srand() with a seed generated from system call time, also initializes some other variables

Definition at line 104 of file Random.cpp.

References first, Idum_, and LongIdum_.

Referenced by BIAS::Condensation::Init(), main(), Random(), and BIAS::GenSynthMatches::Reset().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int BIAS::Random::Idum_ [protected]

Definition at line 115 of file Random.hh.

Referenced by Reset().

long BIAS::Random::LongIdum_ [protected]

Definition at line 116 of file Random.hh.

Referenced by GetNormalDistributed(), GetUniformDistributed(), and Reset().

unsigned int BIAS::Random::Seed_ [protected]

Definition at line 114 of file Random.hh.

Referenced by Reset().

The documentation for this class was generated from the following files:
  • Base/Math/Random.hh
  • Base/Math/Random.cpp
Generated on Wed Jun 21 19:10:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RANSAC< SolutionType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RANSAC

BIAS::RANSAC< SolutionType > Class Template Reference
[Algorithms]

do not DLL export this class because it is headeer only. More...

#include <MathAlgo/RANSAC.hh>

Inheritance diagram for BIAS::RANSAC< SolutionType >:

[legend]
Collaboration diagram for BIAS::RANSAC< SolutionType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
virtual bool | EvaluateSolution (const SolutionType &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag)
evaluate the goodness of a solution
virtual bool | GenerateSamples (int sample_index, std::vector< unsigned int > &which_samples)
pick a set of samples
bool | GenerateSamplesEvenspace (int sample_index, std::vector< unsigned int > &sample_table)
bool | GenerateSamplesRandom (int sample_index, std::vector< unsigned int > &sampletable)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFinalScore () const
virtual int | GetSampleSolutions (std::vector< unsigned int > &which_samples, std::vector< SolutionType > &solutions)
Compute solution(s) for the given set of samples.
void | Init (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
void | PrintDebugLevel (std::ostream &os=std::cout) const
RANSAC (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.
RANSAC ()
virtual bool | RefineSolution (std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers)
refine previously computed solution based on its inliers
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxSamples (unsigned int max_samples)
Explicitly set max number of samples.
void | SetSampleCount (unsigned int uiSamples)
Explicitly set number of samples.
virtual int | SolveMaster (double inlying_data_fraction, SolutionType &solution, std::vector< bool > &inliers)
MAIN function called by user.
virtual | ~RANSAC ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Static Protected Member Functions

static int | ComputeSampleCount (double inlying_data_fraction, double desired_prob_good, unsigned int sample_size)

Protected Attributes

bool | _bRefineSolution
do we want to refine a good sample
double | _dBestInlierEvaluateScore
double | _dBestSampleEvaluateScore
double | _dProbabilityOfGoodSolution
prob. for computing number of samples, set close to 1
double | _dSoSmallSolutionChange
If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.
bool | _got_solution_flag
if we already have a solution for which EvaluateSolution returned true
bool | _greedy
if true, the first acceptable solution is returned
int | _iBestInlierAcceptCount
refined best values
int | _iBestSampleAcceptCount
sampled best values
long int | _liDebugLevel
unsigned | _uiDataSize
number of data elements needed to compute a solution
unsigned int | _uiExplicitSampleNo
use this number of samples
unsigned int | _uiMaxSamples
absolute max number of samples
unsigned | _uiMaxSolutionsPerSample
max number of solutions that are to be computed for one sample set
unsigned | _uiSampleSize
number of samples available

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class SolutionType>
class BIAS::RANSAC< SolutionType >

do not DLL export this class because it is headeer only.

thus no object file is compileed (which could be use in a DLL( cmenk, jw

Definition at line 77 of file RANSAC.hh.

Constructor & Destructor Documentation

template<class SolutionType>
BIAS::RANSAC< SolutionType >::RANSAC ( )

Definition at line 289 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_bRefineSolution, BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore, BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore, BIAS::RANSAC< SolutionType >::_dProbabilityOfGoodSolution, BIAS::RANSAC< SolutionType >::_dSoSmallSolutionChange, BIAS::RANSAC< SolutionType >::_got_solution_flag, BIAS::RANSAC< SolutionType >::_greedy, BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount, BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount, BIAS::RANSAC< SolutionType >::_uiDataSize, BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo, BIAS::RANSAC< SolutionType >::_uiMaxSamples, BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample, BIAS::RANSAC< SolutionType >::_uiSampleSize, RANSAC_DEFAULT_PROBOFGOODSOLUTION, and RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE.

template<class SolutionType>
BIAS::RANSAC< SolutionType >::RANSAC | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) |

Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.

If the refine_solution flag is true, a routine has been supplied to refine the initial fits before evaluation.

Definition at line 303 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore, BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore, BIAS::RANSAC< SolutionType >::_dProbabilityOfGoodSolution, BIAS::RANSAC< SolutionType >::_dSoSmallSolutionChange, BIAS::RANSAC< SolutionType >::_got_solution_flag, BIAS::RANSAC< SolutionType >::_greedy, BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount, BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount, BIAS::RANSAC< SolutionType >::_uiDataSize, BIAS::RANSAC< SolutionType >::Init(), RANSAC_DEFAULT_PROBOFGOODSOLUTION, and RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE.

template<class SolutionType>
BIAS::RANSAC< SolutionType >::~RANSAC ( ) [virtual]

Definition at line 330 of file RANSAC.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::ComputeSampleCount | ( | double | inlying_data_fraction,
 |  | double | desired_prob_good,
 |  | unsigned int | sample_size
 | ) | [static, protected]

Definition at line 729 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::EvaluateSolution | ( | const SolutionType & | solution,
 |  | bool | existing_solution_flag,
 |  | std::vector< bool > & | inlier,
 |  | int & | accept_count,
 |  | double & | evaluate_score,
 |  | bool & | ok_to_terminate_flag
 | ) | [virtual]

evaluate the goodness of a solution

For the specified solution, set

  • an accept count indicating the number of data which are inliers to the given solution,
  • the inlier flag for each datum to true if the datum is inlying
  • an evaluate score (typically the average residual) indicating the goodness of fit of the inliers - the solver code requires a positive number where zero is a perfect solution, larger positive scores mean a worse solution.
  • an ok_to_terminate flag which is set TRUE if the solution is good enough that the robust solver can discontinue search for a better solution.

If existing_solution_flag is true, then the best accept count so far is in accept_count. The function can terminate early if it is not going to beat this.

A skeleton implementation of this function would be written as follows:

     *  int my_accept_count = 0;
     *  for (unsigned int i=0; i<_uiDataSize; i++) {
     *    inlier[i] = Consistent(corner_matches[i], solution);
     *    if (inlier[i]) {
     *      my_accept_count++;
     *      evaluate_score += Residual(corner_matches[i], solution);
     *      if (existing_solution_flag && my_accept_count>accept_count)
     *        break;
     *    }
     *  }
     *  accept_count=my_accept_count;
     *  evaluate_score=(accept_count!=0)?(evaluate_score/accept_count):
     *    (DBL_MAX);
     *  if (evaluate_score < solution_error_threshold &&
     *      (double)accept_count/(double)_uiDataSize > min_inlier_fraction)
     *    ok_to_terminate_flag=true;
     *  else
     *    ok_to_terminate_flag=false;
     *  return (accept_count!=0) // maybe even (accept_count>inl_frac)
     *

Parameters:
solution | (in) solution to be evaluated
existing_solution_flag | (in) if true the best accept_cout so far is given in accept_count
accept_count | (in/out) input: best accept_cout so far if existing_solution_flag==true, output: number of inliers to the current solution
inlier | (out) inlier[i] ==> datum i is inlying
evaluate_score | (out) a score for the solution, 0 means ideal solution, larger score means worse solution
ok_to_termiate_flag | (out) if true, RANSACing will stop

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 617 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamples | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [virtual]

pick a set of samples

Override this to specialize the technique used to generate samples. By default, random sampling is assumed but implementations may wish to use the latin-square sampling provided by generate_sample_evenspace (below), or some other problem-specific sampling strategy.

Definition at line 637 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::GenerateSamplesRandom().

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamplesEvenspace | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sample_table
 | ) |

Definition at line 644 of file RANSAC.hh.

References BIASERR, and res.

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamplesRandom | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sampletable
 | ) |

Definition at line 682 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_uiDataSize, BIAS::RANSAC< SolutionType >::_uiSampleSize, BIASABORT, BIASERR, BIAS::Random::GetUniformDistributedInt(), and res.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamples().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::GetFinalScore ( ) const [inline]

Definition at line 233 of file RANSAC.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::GetSampleSolutions | ( | std::vector< unsigned int > & | which_samples,
 |  | std::vector< SolutionType > & | solutions
 | ) | [virtual]

Compute solution(s) for the given set of samples.

Returns:
the number of solutions found.
The which_samples array will be of length sample_size, selecting the indices to be fit to from the subclass's data array.

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 607 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::Init | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) |

Definition at line 318 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_bRefineSolution, BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo, BIAS::RANSAC< SolutionType >::_uiMaxSamples, BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample, and BIAS::RANSAC< SolutionType >::_uiSampleSize.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::RefineSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | SolutionType & | solution,
 |  | std::vector< bool > & | new_inliers
 | ) | [virtual]

refine previously computed solution based on its inliers

If implemented, this function should compute a more accurate solution, e.g. a least squares on all inliers, possibly using as an initial estimate the solution in solution. The output array new_inliers should be set to reflect the inliers to the new solution.

Returns:
false if no better solution than the initial could be found

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 627 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::SetMaxSamples ( unsigned int max_samples ) [inline]

Explicitly set max number of samples.

Ransacing will stop after max_samples samples, regardless of solution quality. Normally, more than a few thousand samples signifies a problem.

Definition at line 100 of file RANSAC.hh.

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::SetSampleCount ( unsigned int uiSamples ) [inline]

Explicitly set number of samples.

Explicitly set number of samples to make in SolveMaster, i.e. Value of ComputeSampleCount() is ignored if this function is called with a strictly positive value uiSamples. Note: SolveMaster performs at most min(_uiMaxSamples, uiSamples) iterations

Author:
koeser

Definition at line 112 of file RANSAC.hh.

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::SolveMaster | ( | double | inlying_data_fraction,
 |  | SolutionType & | solution,
 |  | std::vector< bool > & | inliers
 | ) | [virtual]

MAIN function called by user.

This function is called to run the computation. On output, solution is set to the best solution found and inliers indicate which data were inliers to that solution. The inlying_data_fraction is responsible for the maximal number of sample sets taken from the data. The smaller the inlying_data_fraction, the more sample sets are taken

Attention:
Do NOT override this function in derived classes, unless you want to do modifications in the RANSAC _algorithm_ itself (and usually you dont want to do this ...) input : inlying_data_fraction expected inlier fraction output: solution solution inliers inlier flags
Returns:
<0 indicates an error, otherwise number of chosen sample
Author:
frahm, woelk

Reimplemented in BIAS::RANSACPreKnowledge< SolutionType >.

Definition at line 335 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_bRefineSolution, BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore, BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore, BIAS::RANSAC< SolutionType >::_dProbabilityOfGoodSolution, BIAS::RANSAC< SolutionType >::_dSoSmallSolutionChange, BIAS::RANSAC< SolutionType >::_got_solution_flag, BIAS::RANSAC< SolutionType >::_greedy, BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount, BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount, BIAS::RANSAC< SolutionType >::_uiDataSize, BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo, BIAS::RANSAC< SolutionType >::_uiMaxSamples, BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample, BIAS::RANSAC< SolutionType >::_uiSampleSize, BIASABORT, BIASDOUT, BIASERR, BIAS::RANSAC< SolutionType >::ComputeSampleCount(), D_RANSAC_SOLVE_MASTER, BIAS::RANSAC< SolutionType >::EvaluateSolution(), BIAS::RANSAC< SolutionType >::GenerateSamples(), BIAS::RANSAC< SolutionType >::GetSampleSolutions(), and BIAS::RANSAC< SolutionType >::RefineSolution().

Referenced by main().

Member Data Documentation

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_bRefineSolution [protected]

do we want to refine a good sample

Definition at line 246 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore [protected]

Definition at line 254 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore [protected]

Definition at line 250 of file RANSAC.hh.

Referenced by BIAS::RANSAC< double >::GetFinalScore(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dProbabilityOfGoodSolution [protected]

prob. for computing number of samples, set close to 1

Definition at line 263 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dSoSmallSolutionChange [protected]

If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.

Definition at line 267 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_got_solution_flag [protected]

if we already have a solution for which EvaluateSolution returned true

Definition at line 270 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_greedy [protected]

if true, the first acceptable solution is returned

Definition at line 273 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount [protected]

refined best values

Definition at line 253 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount [protected]

sampled best values

Definition at line 249 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiDataSize [protected]

number of data elements needed to compute a solution

Definition at line 243 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned int BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo [protected]

use this number of samples

Definition at line 260 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSAC< double >::SetSampleCount(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned int BIAS::RANSAC< SolutionType >::_uiMaxSamples [protected]

absolute max number of samples

Definition at line 257 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSAC< double >::SetMaxSamples(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample [protected]

max number of solutions that are to be computed for one sample set

Definition at line 240 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiSampleSize [protected]

number of samples available

Definition at line 237 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following file:
  • MathAlgo/RANSAC.hh
Generated on Wed Jun 21 19:10:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RANSACPreKnowledge< SolutionType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RANSACPreKnowledge

BIAS::RANSACPreKnowledge< SolutionType > Class Template Reference
[Algorithms]

Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm. More...

#include <MathAlgo/RANSACPreKnowledge.hh>

Inheritance diagram for BIAS::RANSACPreKnowledge< SolutionType >:

[legend]
Collaboration diagram for BIAS::RANSACPreKnowledge< SolutionType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual void | AddGoodGuesses (const std::vector< SolutionType > &Guesses)
add some guessed solutions which are tested by RANSAC later
virtual void | ClearGuesses ()
clear all guesses
bool | DebugLevelIsSet (long int lv) const
virtual bool | EvaluateSolution (const SolutionType &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag)
evaluate the goodness of a solution
virtual bool | GenerateSamples (int sample_index, std::vector< unsigned int > &which_samples)
pick a set of samples
bool | GenerateSamplesEvenspace (int sample_index, std::vector< unsigned int > &sample_table)
bool | GenerateSamplesRandom (int sample_index, std::vector< unsigned int > &sampletable)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFinalScore () const
virtual int | GetSampleSolutions (std::vector< unsigned int > &which_samples, std::vector< SolutionType > &solutions)
Compute solution(s) for the given set of samples.
void | Init (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false)
void | PrintDebugLevel (std::ostream &os=std::cout) const
RANSACPreKnowledge (unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false, bool ClearBeforeRANSAC=false)
Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.
RANSACPreKnowledge ()
virtual bool | RefineSolution (std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers)
refine previously computed solution based on its inliers
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetMaxSamples (unsigned int max_samples)
Explicitly set max number of samples.
void | SetSampleCount (unsigned int uiSamples)
Explicitly set number of samples.
virtual int | SolveMaster (double inlying_data_fraction, SolutionType &solution, std::vector< bool > &inliers)
checks UserGuesses and calls RANSAC::SolveMaster
virtual | ~RANSACPreKnowledge ()
default destructor does nothing

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Static Protected Member Functions

static int | ComputeSampleCount (double inlying_data_fraction, double desired_prob_good, unsigned int sample_size)

Protected Attributes

bool | _bRefineSolution
do we want to refine a good sample
bool | _ClearBeforeRANSAC
if we found no absolutely good solution, clear all values before RANSAC
double | _dBestInlierEvaluateScore
double | _dBestSampleEvaluateScore
double | _dProbabilityOfGoodSolution
prob. for computing number of samples, set close to 1
double | _dSoSmallSolutionChange
If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.
bool | _got_solution_flag
if we already have a solution for which EvaluateSolution returned true
bool | _greedy
if true, the first acceptable solution is returned
int | _iBestInlierAcceptCount
refined best values
int | _iBestSampleAcceptCount
sampled best values
long int | _liDebugLevel
unsigned | _uiDataSize
number of data elements needed to compute a solution
unsigned int | _uiExplicitSampleNo
use this number of samples
unsigned int | _uiMaxSamples
absolute max number of samples
unsigned | _uiMaxSolutionsPerSample
max number of solutions that are to be computed for one sample set
unsigned | _uiSampleSize
number of samples available
std::vector< SolutionType > | UserGuesses_
vector of guesses to be checked, which were manually supplied by user

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class SolutionType>
class BIAS::RANSACPreKnowledge< SolutionType >

Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm.

Author:
koeser 11/2003

Definition at line 41 of file RANSACPreKnowledge.hh.

Constructor & Destructor Documentation

template<class SolutionType>
BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge ( ) [inline]

Definition at line 59 of file RANSACPreKnowledge.hh.

template<class SolutionType>
BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false,
 |  | bool | ClearBeforeRANSAC = false
 | ) | [inline]

Construct a RANSAC object that takes samples of size sample_size, returning at most max_solutions_per_sample solutions each time.

If the refine_solution flag is true, a routine has been supplied to refine the initial fits before evaluation.

Definition at line 66 of file RANSACPreKnowledge.hh.

template<class SolutionType>
virtual BIAS::RANSACPreKnowledge< SolutionType >::~RANSACPreKnowledge ( ) [inline, virtual]

default destructor does nothing

Definition at line 75 of file RANSACPreKnowledge.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class SolutionType>
virtual void BIAS::RANSACPreKnowledge< SolutionType >::AddGoodGuesses ( const std::vector< SolutionType > & Guesses ) [inline, virtual]

add some guessed solutions which are tested by RANSAC later

Definition at line 78 of file RANSACPreKnowledge.hh.

References it.

template<class SolutionType>
virtual void BIAS::RANSACPreKnowledge< SolutionType >::ClearGuesses ( ) [inline, virtual]

clear all guesses

Definition at line 86 of file RANSACPreKnowledge.hh.

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::ComputeSampleCount | ( | double | inlying_data_fraction,
 |  | double | desired_prob_good,
 |  | unsigned int | sample_size
 | ) | [static, protected, inherited]

Definition at line 729 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::EvaluateSolution | ( | const SolutionType & | solution,
 |  | bool | existing_solution_flag,
 |  | std::vector< bool > & | inlier,
 |  | int & | accept_count,
 |  | double & | evaluate_score,
 |  | bool & | ok_to_terminate_flag
 | ) | [virtual, inherited]

evaluate the goodness of a solution

For the specified solution, set

  • an accept count indicating the number of data which are inliers to the given solution,
  • the inlier flag for each datum to true if the datum is inlying
  • an evaluate score (typically the average residual) indicating the goodness of fit of the inliers - the solver code requires a positive number where zero is a perfect solution, larger positive scores mean a worse solution.
  • an ok_to_terminate flag which is set TRUE if the solution is good enough that the robust solver can discontinue search for a better solution.

If existing_solution_flag is true, then the best accept count so far is in accept_count. The function can terminate early if it is not going to beat this.

A skeleton implementation of this function would be written as follows:

     *  int my_accept_count = 0;
     *  for (unsigned int i=0; i<_uiDataSize; i++) {
     *    inlier[i] = Consistent(corner_matches[i], solution);
     *    if (inlier[i]) {
     *      my_accept_count++;
     *      evaluate_score += Residual(corner_matches[i], solution);
     *      if (existing_solution_flag && my_accept_count>accept_count)
     *        break;
     *    }
     *  }
     *  accept_count=my_accept_count;
     *  evaluate_score=(accept_count!=0)?(evaluate_score/accept_count):
     *    (DBL_MAX);
     *  if (evaluate_score < solution_error_threshold &&
     *      (double)accept_count/(double)_uiDataSize > min_inlier_fraction)
     *    ok_to_terminate_flag=true;
     *  else
     *    ok_to_terminate_flag=false;
     *  return (accept_count!=0) // maybe even (accept_count>inl_frac)
     *

Parameters:
solution | (in) solution to be evaluated
existing_solution_flag | (in) if true the best accept_cout so far is given in accept_count
accept_count | (in/out) input: best accept_cout so far if existing_solution_flag==true, output: number of inliers to the current solution
inlier | (out) inlier[i] ==> datum i is inlying
evaluate_score | (out) a score for the solution, 0 means ideal solution, larger score means worse solution
ok_to_termiate_flag | (out) if true, RANSACing will stop

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 617 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamples | ( | int | sample_index,
 |  | std::vector< unsigned int > & | which_samples
 | ) | [virtual, inherited]

pick a set of samples

Override this to specialize the technique used to generate samples. By default, random sampling is assumed but implementations may wish to use the latin-square sampling provided by generate_sample_evenspace (below), or some other problem-specific sampling strategy.

Definition at line 637 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::GenerateSamplesRandom().

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamplesEvenspace | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sample_table
 | ) | [inherited]

Definition at line 644 of file RANSAC.hh.

References BIASERR, and res.

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::GenerateSamplesRandom | ( | int | sample_index,
 |  | std::vector< unsigned int > & | sampletable
 | ) | [inherited]

Definition at line 682 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_uiDataSize, BIAS::RANSAC< SolutionType >::_uiSampleSize, BIASABORT, BIASERR, BIAS::Random::GetUniformDistributedInt(), and res.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamples().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::GetFinalScore ( ) const [inline, inherited]

Definition at line 233 of file RANSAC.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::GetSampleSolutions | ( | std::vector< unsigned int > & | which_samples,
 |  | std::vector< SolutionType > & | solutions
 | ) | [virtual, inherited]

Compute solution(s) for the given set of samples.

Returns:
the number of solutions found.
The which_samples array will be of length sample_size, selecting the indices to be fit to from the subclass's data array.

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 607 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::Init | ( | unsigned int | sample_size,
 |  | unsigned int | max_solutions_per_sample = 1,
 |  | bool | refine_solution = false
 | ) | [inherited]

Definition at line 318 of file RANSAC.hh.

References BIAS::RANSAC< SolutionType >::_bRefineSolution, BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo, BIAS::RANSAC< SolutionType >::_uiMaxSamples, BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample, and BIAS::RANSAC< SolutionType >::_uiSampleSize.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::RefineSolution | ( | std::vector< unsigned int > & | which_samples,
 |  | SolutionType & | solution,
 |  | std::vector< bool > & | new_inliers
 | ) | [virtual, inherited]

refine previously computed solution based on its inliers

If implemented, this function should compute a more accurate solution, e.g. a least squares on all inliers, possibly using as an initial estimate the solution in solution. The output array new_inliers should be set to reflect the inliers to the new solution.

Returns:
false if no better solution than the initial could be found

Reimplemented in BIAS::doubleRANSAC, and BIAS::PlaneRANSAC.

Definition at line 627 of file RANSAC.hh.

References BIASERR.

Referenced by BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::SetMaxSamples ( unsigned int max_samples ) [inline, inherited]

Explicitly set max number of samples.

Ransacing will stop after max_samples samples, regardless of solution quality. Normally, more than a few thousand samples signifies a problem.

Definition at line 100 of file RANSAC.hh.

template<class SolutionType>
void BIAS::RANSAC< SolutionType >::SetSampleCount ( unsigned int uiSamples ) [inline, inherited]

Explicitly set number of samples.

Explicitly set number of samples to make in SolveMaster, i.e. Value of ComputeSampleCount() is ignored if this function is called with a strictly positive value uiSamples. Note: SolveMaster performs at most min(_uiMaxSamples, uiSamples) iterations

Author:
koeser

Definition at line 112 of file RANSAC.hh.

template<class SolutionType>
int BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster | ( | double | inlying_data_fraction,
 |  | SolutionType & | solution,
 |  | std::vector< bool > & | inliers
 | ) | [virtual]

checks UserGuesses and calls RANSAC::SolveMaster

Author:
koeser

Reimplemented from BIAS::RANSAC< SolutionType >.

Definition at line 106 of file RANSACPreKnowledge.hh.

References BIAS::RANSAC< SolutionType >::_bRefineSolution, BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore, BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore, BIAS::RANSAC< SolutionType >::_got_solution_flag, BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount, BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount, BIAS::RANSAC< SolutionType >::_uiDataSize, BIASDOUT, D_RANSAC_SOLVE_MASTER, BIAS::RANSAC< SolutionType >::EvaluateSolution(), it, BIAS::RANSAC< SolutionType >::RefineSolution(), and BIAS::RANSACPreKnowledge< SolutionType >::UserGuesses_.

Member Data Documentation

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_bRefineSolution [protected, inherited]

do we want to refine a good sample

Definition at line 246 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSACPreKnowledge< SolutionType >::_ClearBeforeRANSAC [protected]

if we found no absolutely good solution, clear all values before RANSAC

Definition at line 101 of file RANSACPreKnowledge.hh.

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dBestInlierEvaluateScore [protected, inherited]

Definition at line 254 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dBestSampleEvaluateScore [protected, inherited]

Definition at line 250 of file RANSAC.hh.

Referenced by BIAS::RANSAC< double >::GetFinalScore(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dProbabilityOfGoodSolution [protected, inherited]

prob. for computing number of samples, set close to 1

Definition at line 263 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
double BIAS::RANSAC< SolutionType >::_dSoSmallSolutionChange [protected, inherited]

If all other conditions are right, and the fractional change in the solution statistics is less than this, stop sampling.

Definition at line 267 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_got_solution_flag [protected, inherited]

if we already have a solution for which EvaluateSolution returned true

Definition at line 270 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
bool BIAS::RANSAC< SolutionType >::_greedy [protected, inherited]

if true, the first acceptable solution is returned

Definition at line 273 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::_iBestInlierAcceptCount [protected, inherited]

refined best values

Definition at line 253 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
int BIAS::RANSAC< SolutionType >::_iBestSampleAcceptCount [protected, inherited]

sampled best values

Definition at line 249 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiDataSize [protected, inherited]

number of data elements needed to compute a solution

Definition at line 243 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned int BIAS::RANSAC< SolutionType >::_uiExplicitSampleNo [protected, inherited]

use this number of samples

Definition at line 260 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSAC< double >::SetSampleCount(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned int BIAS::RANSAC< SolutionType >::_uiMaxSamples [protected, inherited]

absolute max number of samples

Definition at line 257 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), BIAS::RANSAC< double >::SetMaxSamples(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiMaxSolutionsPerSample [protected, inherited]

max number of solutions that are to be computed for one sample set

Definition at line 240 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

template<class SolutionType>
unsigned BIAS::RANSAC< SolutionType >::_uiSampleSize [protected, inherited]

number of samples available

Definition at line 237 of file RANSAC.hh.

Referenced by BIAS::RANSAC< SolutionType >::GenerateSamplesRandom(), BIAS::RANSAC< SolutionType >::Init(), BIAS::RANSAC< SolutionType >::RANSAC(), and BIAS::RANSAC< SolutionType >::SolveMaster().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class SolutionType>
std::vector<SolutionType> BIAS::RANSACPreKnowledge< SolutionType >::UserGuesses_ [protected]

vector of guesses to be checked, which were manually supplied by user

Definition at line 98 of file RANSACPreKnowledge.hh.

Referenced by BIAS::RANSACPreKnowledge< SolutionType >::SolveMaster().

The documentation for this class was generated from the following file:
  • MathAlgo/RANSACPreKnowledge.hh
Generated on Wed Jun 21 19:10:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RedirectStreams Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RedirectStreams

BIAS::RedirectStreams Class Reference

used to redirect stdout and stderr into files or to silence them More...

#include <Base/Debug/RedirectStreams.hh>

List of all members.

Public Member Functions

void Cerr2Null ()
call this to silence cerr
void Cout2Null ()
call this to silence cout
RedirectStreams & | operator= (const RedirectStreams &src)
void | RedirectCerr (const std::string &file)
void | RedirectCerr (char *file)
direct all stderr output into a file
void | RedirectCout (const std::string &file)
void | RedirectCout (char *file)
direct all stdout output into a file
RedirectStreams (const RedirectStreams &src)
RedirectStreams ()
empty useless constructor, does nothing
void ResetCerr ()
re-enables backupped standard output for cerr
void ResetCout ()
re-enables backupped standard output for cout
virtual | ~RedirectStreams ()

Protected Attributes

std::streambuf * | ErrBuf_
std::ofstream | ErrStr_
std::streambuf * | OutBuf_
std::ofstream | OutStr_
std::streambuf * | RedirErr_
std::streambuf * | RedirOut_

Detailed Description

used to redirect stdout and stderr into files or to silence them

Definition at line 38 of file RedirectStreams.hh.

Constructor & Destructor Documentation

virtual BIAS::RedirectStreams::~RedirectStreams ( ) [inline, virtual]

Definition at line 41 of file RedirectStreams.hh.

BIAS::RedirectStreams::RedirectStreams ( ) [inline]

empty useless constructor, does nothing

Definition at line 44 of file RedirectStreams.hh.

BIAS::RedirectStreams::RedirectStreams ( const RedirectStreams & src ) [inline]

Definition at line 47 of file RedirectStreams.hh.

Member Function Documentation

void BIAS::RedirectStreams::Cerr2Null ( ) [inline]

call this to silence cerr

Definition at line 81 of file RedirectStreams.hh.

void BIAS::RedirectStreams::Cout2Null ( ) [inline]

call this to silence cout

Definition at line 76 of file RedirectStreams.hh.

RedirectStreams& BIAS::RedirectStreams::operator= ( const RedirectStreams & src ) [inline]

Definition at line 54 of file RedirectStreams.hh.

References BIASERR.

void BIAS::RedirectStreams::RedirectCerr ( const std::string & file ) [inline]

Definition at line 70 of file RedirectStreams.hh.

void BIAS::RedirectStreams::RedirectCerr ( char * file ) [inline]

direct all stderr output into a file

Definition at line 108 of file RedirectStreams.hh.

References ErrBuf_, ErrStr_, and RedirErr_.

void BIAS::RedirectStreams::RedirectCout ( const std::string & file ) [inline]

Definition at line 67 of file RedirectStreams.hh.

void BIAS::RedirectStreams::RedirectCout ( char * file ) [inline]

direct all stdout output into a file

Definition at line 100 of file RedirectStreams.hh.

References OutBuf_, OutStr_, and RedirOut_.

void BIAS::RedirectStreams::ResetCerr ( ) [inline]

re-enables backupped standard output for cerr

Definition at line 122 of file RedirectStreams.hh.

References ErrBuf_, and ErrStr_.

void BIAS::RedirectStreams::ResetCout ( ) [inline]

re-enables backupped standard output for cout

Definition at line 116 of file RedirectStreams.hh.

References OutBuf_, and OutStr_.

Member Data Documentation

std::streambuf * BIAS::RedirectStreams::ErrBuf_ [protected]

Definition at line 93 of file RedirectStreams.hh.

Referenced by RedirectCerr(), and ResetCerr().

std::ofstream BIAS::RedirectStreams::ErrStr_ [protected]

Definition at line 96 of file RedirectStreams.hh.

Referenced by RedirectCerr(), and ResetCerr().

std::streambuf* BIAS::RedirectStreams::OutBuf_ [protected]

Definition at line 93 of file RedirectStreams.hh.

Referenced by RedirectCout(), and ResetCout().

std::ofstream BIAS::RedirectStreams::OutStr_ [protected]

Definition at line 96 of file RedirectStreams.hh.

Referenced by RedirectCout(), and ResetCout().

std::streambuf * BIAS::RedirectStreams::RedirErr_ [protected]

Definition at line 93 of file RedirectStreams.hh.

Referenced by RedirectCerr().

std::streambuf * BIAS::RedirectStreams::RedirOut_ [protected]

Definition at line 93 of file RedirectStreams.hh.

Referenced by RedirectCout().

The documentation for this class was generated from the following file:
  • Base/Debug/RedirectStreams.hh
Generated on Wed Jun 21 19:10:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Region1D< Array1D > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Region1D

TNT::Region1D< Array1D > Class Template Reference

#include <Base/Math/tnt/region1d.h>

Collaboration diagram for TNT::Region1D< Array1D >:

[legend]
List of all members.

Public Member Functions

const Array1D & | array () const
Subscript | dim (Subscript i) const
Subscript | dim () const
Subscript | offset (Subscript i) const
Subscript | offset () const
const T & | operator() (Subscript i) const
T & | operator() (Subscript i)
Region1D< Array1D > | operator() (const Index1D &I)
Region1D< Array1D > | operator() (Subscript i1, Subscript i2)
Region1D< Array1D > & | operator= (const Array1D &R)
Region1D< Array1D > & | operator= (const T &t)
Region1D< Array1D > & | operator= (const const_Region1D< Array1D > &R)
Region1D< Array1D > & | operator= (const Region1D< Array1D > &R)
Region1D (Region1D< Array1D > &A, Subscript i1, Subscript i2)
Region1D (Array1D &A, const Index1D &I)
Region1D (Array1D &A, Subscript i1, Subscript i2)

Protected Types

typedef Array1D::element_type | T

Protected Attributes

Array1D & | A_
Subscript dim_
Subscript offset_

Detailed Description

template<class Array1D>
class TNT::Region1D< Array1D >

Definition at line 51 of file region1d.h.

Member Typedef Documentation

template<class Array1D>
typedef Array1D::element_type TNT::Region1D< Array1D >::T [protected]

Definition at line 59 of file region1d.h.

Constructor & Destructor Documentation

template<class Array1D>
TNT::Region1D< Array1D >::Region1D | ( | Array1D & | A,
 |  | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 84 of file region1d.h.

References TNT::Region1D< Array1D >::dim_, TNT::Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

template<class Array1D>
TNT::Region1D< Array1D >::Region1D | ( | Array1D & | A,
 |  | const Index1D & | I
 | ) | [inline]

Definition at line 95 of file region1d.h.

References TNT::Region1D< Array1D >::dim_, TNT::Index1D::lbound(), TNT::Region1D< Array1D >::offset_, TNT_BASE_OFFSET, and TNT::Index1D::ubound().

template<class Array1D>
TNT::Region1D< Array1D >::Region1D | ( | Region1D< Array1D > & | A,
 |  | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 106 of file region1d.h.

References TNT::Region1D< Array1D >::dim(), TNT::Region1D< Array1D >::dim_, TNT::Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

Member Function Documentation

template<class Array1D>
const Array1D& TNT::Region1D< Array1D >::array ( ) const [inline]

Definition at line 62 of file region1d.h.

References TNT::Region1D< Array1D >::A_.

template<class Array1D>
Subscript TNT::Region1D< Array1D >::dim ( Subscript i ) const [inline]

Definition at line 75 of file region1d.h.

References TNT::Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

template<class Array1D>
Subscript TNT::Region1D< Array1D >::dim ( ) const [inline]

Definition at line 65 of file region1d.h.

References TNT::Region1D< Array1D >::dim_.

Referenced by TNT::Region1D< Array1D >::operator()(), TNT::Region1D< Array1D >::operator=(), and TNT::Region1D< Array1D >::Region1D().

template<class Array1D>
Subscript TNT::Region1D< Array1D >::offset ( Subscript i ) const [inline]

Definition at line 67 of file region1d.h.

References TNT::Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

template<class Array1D>
Subscript TNT::Region1D< Array1D >::offset ( ) const [inline]

Definition at line 64 of file region1d.h.

References TNT::Region1D< Array1D >::offset_.

template<class Array1D>
const T& TNT::Region1D< Array1D >::operator() ( Subscript i ) const [inline]

Definition at line 158 of file region1d.h.

References TNT::Region1D< Array1D >::A_, TNT::Region1D< Array1D >::dim(), and TNT_BASE_OFFSET.

template<class Array1D>
T& TNT::Region1D< Array1D >::operator() ( Subscript i ) [inline]

Definition at line 149 of file region1d.h.

template<class Array1D>
Region1D<Array1D> TNT::Region1D< Array1D >::operator() ( const Index1D & I ) [inline]

Definition at line 135 of file region1d.h.

template<class Array1D>
Region1D<Array1D> TNT::Region1D< Array1D >::operator() | ( | Subscript | i1,
 |  | Subscript | i2
 | ) | [inline]

Definition at line 120 of file region1d.h.

References TNT::Region1D< Array1D >::A_, TNT::Region1D< Array1D >::dim(), TNT::Region1D< Array1D >::offset_, and TNT_BASE_OFFSET.

template<class Array1D>
Region1D<Array1D>& TNT::Region1D< Array1D >::operator= ( const Array1D & R ) [inline]

Definition at line 219 of file region1d.h.

References TNT::Region1D< Array1D >::dim(), R, and TNT_BASE_OFFSET.

template<class Array1D>
Region1D<Array1D>& TNT::Region1D< Array1D >::operator= ( const T & t ) [inline]

Definition at line 204 of file region1d.h.

References TNT::Region1D< Array1D >::dim(), and TNT_BASE_OFFSET.

template<class Array1D>
Region1D<Array1D>& TNT::Region1D< Array1D >::operator= ( const const_Region1D< Array1D > & R ) [inline]

Definition at line 186 of file region1d.h.

References TNT::const_Region1D< Array1D >::dim(), TNT::Region1D< Array1D >::dim(), R, and TNT_BASE_OFFSET.

template<class Array1D>
Region1D<Array1D>& TNT::Region1D< Array1D >::operator= ( const Region1D< Array1D > & R ) [inline]

Definition at line 168 of file region1d.h.

References TNT::Region1D< Array1D >::dim(), R, and TNT_BASE_OFFSET.

Member Data Documentation

template<class Array1D>
Array1D& TNT::Region1D< Array1D >::A_ [protected]

Definition at line 55 of file region1d.h.

Referenced by TNT::Region1D< Array1D >::array(), and TNT::Region1D< Array1D >::operator()().

template<class Array1D>
Subscript TNT::Region1D< Array1D >::dim_ [protected]

Definition at line 57 of file region1d.h.

Referenced by TNT::Region1D< Array1D >::dim(), and TNT::Region1D< Array1D >::Region1D().

template<class Array1D>
Subscript TNT::Region1D< Array1D >::offset_ [protected]

Definition at line 56 of file region1d.h.

Referenced by TNT::Region1D< Array1D >::dim(), TNT::Region1D< Array1D >::offset(), TNT::Region1D< Array1D >::operator()(), and TNT::Region1D< Array1D >::Region1D().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/region1d.h
Generated on Wed Jun 21 19:13:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Region2D< Array2D > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Region2D

TNT::Region2D< Array2D > Class Template Reference

#include <Base/Math/tnt/region2d.h>

Collaboration diagram for TNT::Region2D< Array2D >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef Array2D::value_type | T
typedef T | value_type

Public Member Functions

const Array2D & | array () const
Array2D & | array ()
Subscript | dim (Subscript i) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
Subscript | offset (Subscript i) const
const T & | operator() (Subscript i, Subscript j) const
T & | operator() (Subscript i, Subscript j)
Region2D< Array2D > | operator() (const Index1D &I, const Index1D &J)
Region2D< Array2D > | operator() (Subscript i1, Subscript i2, Subscript j1, Subscript j2)
Region2D< Array2D > & | operator= (const T &scalar)
Region2D< Array2D > & | operator= (const Array2D &R)
Region2D< Array2D > & | operator= (const const_Region2D< Array2D > &R)
Region2D< Array2D > & | operator= (const Region2D< Array2D > &R)
Region2D (Region2D< Array2D > &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2)
Region2D (Array2D &A, const Index1D &I, const Index1D &J)
Region2D (Array2D &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2)

Protected Attributes

Array2D & | A_
Subscript | dim_ [2]
Subscript | offset_ [2]

Detailed Description

template<class Array2D>
class TNT::Region2D< Array2D >

Definition at line 49 of file region2d.h.

Member Typedef Documentation

template<class Array2D>
typedef const T* TNT::Region2D< Array2D >::const_iterator

Definition at line 65 of file region2d.h.

template<class Array2D>
typedef const T& TNT::Region2D< Array2D >::const_reference

Definition at line 66 of file region2d.h.

template<class Array2D>
typedef T TNT::Region2D< Array2D >::element_type

Definition at line 61 of file region2d.h.

template<class Array2D>
typedef T* TNT::Region2D< Array2D >::iterator

Definition at line 63 of file region2d.h.

template<class Array2D>
typedef T* TNT::Region2D< Array2D >::pointer

Definition at line 62 of file region2d.h.

template<class Array2D>
typedef T& TNT::Region2D< Array2D >::reference

Definition at line 64 of file region2d.h.

template<class Array2D>
typedef Subscript TNT::Region2D< Array2D >::size_type

Definition at line 59 of file region2d.h.

template<class Array2D>
typedef Array2D::value_type TNT::Region2D< Array2D >::T

Definition at line 58 of file region2d.h.

template<class Array2D>
typedef T TNT::Region2D< Array2D >::value_type

Definition at line 60 of file region2d.h.

Constructor & Destructor Documentation

template<class Array2D>
TNT::Region2D< Array2D >::Region2D | ( | Array2D & | A,
 |  | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 93 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, and TNT::Region2D< Array2D >::offset_.

template<class Array2D>
TNT::Region2D< Array2D >::Region2D | ( | Array2D & | A,
 |  | const Index1D & | I,
 |  | const Index1D & | J
 | ) | [inline]

Definition at line 112 of file region2d.h.

References TNT::Region2D< Array2D >::dim_, TNT::Index1D::lbound(), TNT::Region2D< Array2D >::offset_, and TNT::Index1D::ubound().

template<class Array2D>
TNT::Region2D< Array2D >::Region2D | ( | Region2D< Array2D > & | A,
 |  | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 129 of file region2d.h.

References TNT::Region2D< Array2D >::dim(), TNT::Region2D< Array2D >::dim_, TNT::Region2D< Array2D >::lbound(), and TNT::Region2D< Array2D >::offset_.

Member Function Documentation

template<class Array2D>
const Array2D& TNT::Region2D< Array2D >::array ( ) const [inline]

Definition at line 69 of file region2d.h.

References TNT::Region2D< Array2D >::A_.

template<class Array2D>
Array2D& TNT::Region2D< Array2D >::array ( ) [inline]

Definition at line 68 of file region2d.h.

References TNT::Region2D< Array2D >::A_.

template<class Array2D>
Subscript TNT::Region2D< Array2D >::dim ( Subscript i ) const [inline]

Definition at line 82 of file region2d.h.

References TNT::Region2D< Array2D >::A_, and TNT::Region2D< Array2D >::dim_.

Referenced by TNT::Region2D< Array2D >::Region2D().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::lbound ( ) const [inline]

Definition at line 70 of file region2d.h.

References TNT::Region2D< Array2D >::A_.

Referenced by TNT::Region2D< Array2D >::operator=(), and TNT::Region2D< Array2D >::Region2D().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::num_cols ( ) const [inline]

Definition at line 72 of file region2d.h.

References TNT::Region2D< Array2D >::dim_.

Referenced by TNT::Region2D< Array2D >::operator=().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::num_rows ( ) const [inline]

Definition at line 71 of file region2d.h.

References TNT::Region2D< Array2D >::dim_.

Referenced by TNT::Region2D< Array2D >::operator=().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::offset ( Subscript i ) const [inline]

Definition at line 73 of file region2d.h.

References TNT::Region2D< Array2D >::A_, TNT::Region2D< Array2D >::dim_, and TNT::Region2D< Array2D >::offset_.

template<class Array2D>
const T& TNT::Region2D< Array2D >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 191 of file region2d.h.

References TNT::Region2D< Array2D >::A_, TNT::Region2D< Array2D >::dim_, and TNT::Region2D< Array2D >::offset_.

template<class Array2D>
T& TNT::Region2D< Array2D >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline]

Definition at line 180 of file region2d.h.

template<class Array2D>
Region2D<Array2D> TNT::Region2D< Array2D >::operator() | ( | const Index1D & | I,
 |  | const Index1D & | J
 | ) | [inline]

Definition at line 163 of file region2d.h.

References TNT::Region2D< Array2D >::A_, TNT::Region2D< Array2D >::dim_, TNT::Index1D::lbound(), TNT::Region2D< Array2D >::offset_, and TNT::Index1D::ubound().

template<class Array2D>
Region2D<Array2D> TNT::Region2D< Array2D >::operator() | ( | Subscript | i1,
 |  | Subscript | i2,
 |  | Subscript | j1,
 |  | Subscript | j2
 | ) | [inline]

Definition at line 146 of file region2d.h.

References TNT::Region2D< Array2D >::A_, TNT::Region2D< Array2D >::dim_, and TNT::Region2D< Array2D >::offset_.

template<class Array2D>
Region2D<Array2D>& TNT::Region2D< Array2D >::operator= ( const T & scalar ) [inline]

Definition at line 263 of file region2d.h.

References TNT::Region2D< Array2D >::lbound(), TNT::Region2D< Array2D >::num_cols(), and TNT::Region2D< Array2D >::num_rows().

template<class Array2D>
Region2D<Array2D>& TNT::Region2D< Array2D >::operator= ( const Array2D & R ) [inline]

Definition at line 243 of file region2d.h.

References M, TNT::Region2D< Array2D >::num_cols(), TNT::Region2D< Array2D >::num_rows(), and R.

template<class Array2D>
Region2D<Array2D>& TNT::Region2D< Array2D >::operator= ( const const_Region2D< Array2D > & R ) [inline]

Definition at line 223 of file region2d.h.

References TNT::const_Region2D< Array2D >::lbound(), M, TNT::const_Region2D< Array2D >::num_cols(), TNT::Region2D< Array2D >::num_cols(), TNT::const_Region2D< Array2D >::num_rows(), TNT::Region2D< Array2D >::num_rows(), and R.

template<class Array2D>
Region2D<Array2D>& TNT::Region2D< Array2D >::operator= ( const Region2D< Array2D > & R ) [inline]

Definition at line 203 of file region2d.h.

References TNT::Region2D< Array2D >::lbound(), M, TNT::Region2D< Array2D >::num_cols(), TNT::Region2D< Array2D >::num_rows(), and R.

Member Data Documentation

template<class Array2D>
Array2D& TNT::Region2D< Array2D >::A_ [protected]

Definition at line 53 of file region2d.h.

Referenced by TNT::Region2D< Array2D >::array(), TNT::Region2D< Array2D >::dim(), TNT::Region2D< Array2D >::lbound(), TNT::Region2D< Array2D >::offset(), and TNT::Region2D< Array2D >::operator()().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::dim_[2] [protected]

Definition at line 55 of file region2d.h.

Referenced by TNT::const_Region2D< Array2D >::const_Region2D(), TNT::const_Region2D< Array2D >::dim(), TNT::Region2D< Array2D >::dim(), TNT::const_Region2D< Array2D >::num_cols(), TNT::Region2D< Array2D >::num_cols(), TNT::const_Region2D< Array2D >::num_rows(), TNT::Region2D< Array2D >::num_rows(), TNT::const_Region2D< Array2D >::offset(), TNT::Region2D< Array2D >::offset(), TNT::const_Region2D< Array2D >::operator()(), TNT::Region2D< Array2D >::operator()(), and TNT::Region2D< Array2D >::Region2D().

template<class Array2D>
Subscript TNT::Region2D< Array2D >::offset_[2] [protected]

Definition at line 54 of file region2d.h.

Referenced by TNT::const_Region2D< Array2D >::const_Region2D(), TNT::const_Region2D< Array2D >::offset(), TNT::Region2D< Array2D >::offset(), TNT::const_Region2D< Array2D >::operator()(), TNT::Region2D< Array2D >::operator()(), and TNT::Region2D< Array2D >::Region2D().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/region2d.h
Generated on Wed Jun 21 19:13:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RegionMatcher Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RegionMatcher

BIAS::RegionMatcher Class Reference

basic functions for CornerMatcher More...

#include <Matcher2D/RegionMatcher.hh>

Inheritance diagram for BIAS::RegionMatcher:

[legend]
Collaboration diagram for BIAS::RegionMatcher:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
template<class StorageType>
void | CNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
ColorNCC for interleaved hsL images.
template<class StorageType>
void | ColorCCV (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation
template<class StorageType>
void | ColorNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
ColorNCC for interleaved HSV images.
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
template<class StorageType>
int | LineMatcherNCC (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation)
template<class StorageType>
int | LineMatcherNCC (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation)
searches along line from start2 to end2 within +/- epsilon pixels away from the line in ida2 for a match to p1 using ncc with halfwinsize boundary checking is not done, i.e.
template<class StorageType>
int | LineMatcherSAD (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad)
template<class StorageType>
int | LineMatcherSAD (unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad)
as above but uses SAD
template<>
void | NCC (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | NCC (unsigned p1[2], unsigned p2[2], StorageType **ida1, StorageType **roi1, StorageType **ida2, StorageType **roi2, unsigned hww, unsigned hwh, double &result)
fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero
template<class StorageType>
void | NCC (double p1[2], double p2[2], StorageType **ida1, StorageType **ida2, unsigned halfwinsize, double &result)
fast interpolated ncc
template<class StorageType>
void | NCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4
template<class StorageType>
int | NCCSearchEven (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result)
As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize).
template<class StorageType>
int | NCCSearchOdd (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result)
Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation.
template<class StorageType>
int | ParabolaNCC (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2])
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
template<class StorageType>
int | ParabolaNCC5 (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2])
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
void | PrintDebugLevel (std::ostream &os=std::cout) const
RegionMatcher ()
void | RemoveDebugLevel (long int lv)
template<>
void | SAD (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SAD (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast sum of absolut differences (SAD) sim.
template<>
void | SADN (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SADN (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
template<>
void | SSD (unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result)
template<class StorageType>
void | SSD (unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result)
fast sum of square differences (SSD) sim.
~RegionMatcher ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

KLT_TYPE | _Bilinear (unsigned char **ida, KLT_TYPE x, KLT_TYPE y)
template<class StorageType>
KLT_TYPE | _Bilinear (StorageType **ida, KLT_TYPE x, KLT_TYPE y)
void | _BilinearRegion (unsigned char **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res)
template<class StorageType>
void | _BilinearRegion (StorageType **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res)
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating
KLT_TYPE | _ParabolaApprox (KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3, KLT_TYPE x4, KLT_TYPE x5)
KLT_TYPE | _ParabolaApprox (KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3)
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Protected Attributes

Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl1_5
Matrix< KLT_TYPE > | _bl2
Matrix< KLT_TYPE > | _bl2_5
Vector2< KLT_TYPE > | _d
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
Matrix2x2< KLT_TYPE > | _Ginv
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsx_5
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gsy_5
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx1_5
Matrix< KLT_TYPE > | _gx2
Matrix< KLT_TYPE > | _gx2_5
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy1_5
Matrix< KLT_TYPE > | _gy2
Matrix< KLT_TYPE > | _gy2_5
Matrix< KLT_TYPE > | _iim1
Matrix< KLT_TYPE > | _iim2
unsigned | _klthws
long int | _liDebugLevel
unsigned | _ncchws
unsigned | _nccwinsize
unsigned | _winsize

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

basic functions for CornerMatcher

class that holds sum of square diffeences (ssd), normalized cross correlation (ncc) and KLT and parabola interpolation for a convenient interface working with HomgPoint2D doing boundary checks use CornerMatcher

Todo:
check if all klt code has been moved to new filter2 structure
Author:
fw

Definition at line 143 of file RegionMatcher.hh.

Constructor & Destructor Documentation

RegionMatcher::RegionMatcher ( )

Definition at line 111 of file RegionMatcher.cpp.

References _bl1_5, _bl2_5, _gsx_5, _gsy_5, _gx1_5, _gx2_5, _gy1_5, _gy2_5, _klthws, _ncchws, _nccwinsize, _winsize, and TNT::Matrix< T >::newsize().

RegionMatcher::~RegionMatcher ( )

Definition at line 125 of file RegionMatcher.cpp.

Member Function Documentation

KLT_TYPE RegionMatcher::_Bilinear | ( | unsigned char ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y
 | ) | [protected]

Definition at line 351 of file RegionMatcher.cpp.

template<class StorageType>
KLT_TYPE RegionMatcher::_Bilinear | ( | StorageType ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y
 | ) | [protected]

Definition at line 335 of file RegionMatcher.cpp.

References KLT_TYPE, and StorageType.

void RegionMatcher::_BilinearRegion | ( | unsigned char ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | unsigned | hws,
 |  | Matrix< KLT_TYPE > & | res
 | ) | [protected]

Definition at line 408 of file RegionMatcher.cpp.

References r.

template<class StorageType>
void RegionMatcher::_BilinearRegion | ( | StorageType ** | ida,
 |  | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | unsigned | hws,
 |  | Matrix< KLT_TYPE > & | res
 | ) | [protected]

bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Definition at line 382 of file RegionMatcher.cpp.

References KLT_TYPE, r, and StorageType.

Referenced by NCC().

KLT_TYPE BIAS::RegionMatcher::_ParabolaApprox | ( | KLT_TYPE | x1,
 |  | KLT_TYPE | x2,
 |  | KLT_TYPE | x3,
 |  | KLT_TYPE | x4,
 |  | KLT_TYPE | x5
 | ) | [inline, protected]

Definition at line 487 of file RegionMatcher.hh.

References KLT_TYPE, and TNT::Lapack_LLS_QR_linear_solve().

KLT_TYPE BIAS::RegionMatcher::_ParabolaApprox | ( | KLT_TYPE | x1,
 |  | KLT_TYPE | x2,
 |  | KLT_TYPE | x3
 | ) | [inline, protected]

bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] befor interpolating

Definition at line 480 of file RegionMatcher.hh.

References a, KLT_TYPE, and p.

Referenced by ParabolaNCC(), and ParabolaNCC5().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::RegionMatcher::CNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

ColorNCC for interleaved hsL images.

Author:
Daniel Grest, June 2003

Definition at line 372 of file SimilarityMeasure.cpp.

References BIASDOUT, CNCC_EPSILON, D_REGION_MATCHER_COLORNCC, r, and StorageType.

Referenced by demo().

template<class StorageType>
void BIAS::RegionMatcher::ColorCCV | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation

Author:
Daniel Grest, April 2003

Definition at line 258 of file SimilarityMeasure.cpp.

References BIASDOUT, D_REGION_MATCHER_COLORCCV, r, and StorageType.

template<class StorageType>
void BIAS::RegionMatcher::ColorNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

ColorNCC for interleaved HSV images.

Author:
Daniel Grest, March 2003

Definition at line 304 of file SimilarityMeasure.cpp.

References BIASDOUT, CNCC_EPSILON, D_REGION_MATCHER_COLORNCC, r, and StorageType.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherNCC | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | correlation
 | ) |

Definition at line 29 of file LineMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_LINE, BIAS::ScanLine::GetNext(), NCC(), res, and StorageType.

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherNCC | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | correlation
 | ) |

searches along line from start2 to end2 within +/- epsilon pixels away from the line in ida2 for a match to p1 using ncc with halfwinsize boundary checking is not done, i.e.

start2 and end2 must lie more than halfwindowsize+epsilon away from the image border p1 must lie more than halfwinsize away from image border only for those points in im2 a correlation is calculated for which the gradient is > grad1[p1[1]][p1[0]]*gradientscale input: ida1 - pointer to the image data array of im1, row mayor

output: result - image coo of point with greatest corelation correlation - the correlation betwen p1 and result returns: 0 on success -1 no matching point found <-1 error

Referenced by main().

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherSAD | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | sad
 | ) |

Definition at line 74 of file LineMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_LINE, BIAS::ScanLine::GetNext(), res, SAD(), and StorageType.

template<class StorageType>
int BIAS::RegionMatcher::LineMatcherSAD | ( | unsigned int | p1[2],
 |  | unsigned int | start2[2],
 |  | unsigned int | end2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | grad1,
 |  | StorageType ** | grad2,
 |  | unsigned int | halfwinsize,
 |  | unsigned int | epsilon,
 |  | double | gradientscale,
 |  | unsigned int | result[2],
 |  | double & | sad
 | ) |

as above but uses SAD

Referenced by main().

template<>
void BIAS::RegionMatcher::NCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | unsigned | p1[2],
 |  | unsigned | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | roi1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | roi2,
 |  | unsigned | hww,
 |  | unsigned | hwh,
 |  | double & | result
 | ) |

fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero

Author:
woelk 09 2003 , tested

Definition at line 233 of file SimilarityMeasure.cpp.

References r.

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | double | p1[2],
 |  | double | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | halfwinsize,
 |  | double & | result
 | ) |

fast interpolated ncc

Author:
woelk

Definition at line 207 of file SimilarityMeasure.cpp.

References _BilinearRegion(), _iim1, _iim2, _ncchws, _nccwinsize, TNT::Matrix< T >::newsize(), and r.

template<class StorageType>
void BIAS::RegionMatcher::NCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4

Author:
woelk

Definition at line 154 of file SimilarityMeasure.cpp.

References BIASASSERT, and r.

Referenced by demo(), LineMatcherNCC(), BIAS::CornerMatcher::NCC(), NCCSearchEven(), NCCSearchOdd(), ParabolaNCC(), and ParabolaNCC5().

template<class StorageType>
int RegionMatcher::NCCSearchEven | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfnccwinsize,
 |  | unsigned int | halfsearchwinsize,
 |  | unsigned int | resultpoint[2],
 |  | double | mincorrelation,
 |  | double & | result
 | ) |

As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize).

Definition at line 232 of file RegionMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_SEARCH_EVEN, D_REGION_MATCHER_SEARCHNCC, NCC(), and res.

Referenced by BIAS::CornerMatcher::RefinePyramideNCC().

template<class StorageType>
int RegionMatcher::NCCSearchOdd | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfnccwinsize,
 |  | unsigned int | halfsearchwinsize,
 |  | unsigned int | resultpoint[2],
 |  | double | mincorrelation,
 |  | double & | result
 | ) |

Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation.

If point with correlation > mincorrelation is found, the search is aborted and resultpoint is set. If no point with correlation > mincorrelation is found, a negative value is returned. resultpoint is set to the point with biggest correlation within search window, result is set tot this correlation. Searching follows an outbound spiral around p2, either until searchwinsize is completly searched or until a point with correlation greater than mincorrelation is found If whole search area should be used, use mincorrelation>=1.0 Searchwindow is always odd-sized (p2+/-halfsearchwinsize) returns 0 on success, negative value if no point found with correlation > mincorrelation !!! warning, no boundary checking is performed, i.e. p1[i]/p2[i] +-(halfnccwinsize+halfsearchwinsize) must lie within StorageType-array input: p1, p2, ida1, ida2, halfnccwinsize, halfsearchwinsize, mincorrelation output: resultpoint, result

Definition at line 131 of file RegionMatcher.cpp.

References BIASDOUT, D_REGION_MATCHER_SEARCH_ODD, D_REGION_MATCHER_SEARCHNCC, NCC(), and res.

Referenced by BIAS::CornerMatcher::NCCSearch().

template<class StorageType>
int RegionMatcher::ParabolaNCC | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | KLT_TYPE | result[2]
 | ) |

function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e.

NCC(p1, {p2[0]+/-1, p2[1]+/-1})<NCC(p1, p2)

Author:
woelk 03 2003

Definition at line 500 of file RegionMatcher.cpp.

References _ParabolaApprox(), BIASDOUT, BIASERR, D_REGION_MATCHER_PARABOLA, NCC(), and res.

Referenced by BIAS::CornerMatcher::ParabolaNCC().

template<class StorageType>
int RegionMatcher::ParabolaNCC5 | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | KLT_TYPE | result[2]
 | ) |

function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e.

NCC(p1, {p2[0]+/-2, p2[1]+/-2})<NCC(p1, p2)

Author:
woelk 04 2003

Definition at line 551 of file RegionMatcher.cpp.

References _ParabolaApprox(), BIASDOUT, BIASERR, D_REGION_MATCHER_PARABOLA, NCC(), and res.

Referenced by BIAS::CornerMatcher::ParabolaNCC5().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<>
void BIAS::RegionMatcher::SAD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

template<class StorageType>
void BIAS::RegionMatcher::SAD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

fast sum of absolut differences (SAD) sim.

measurement between p1 and p2 without boundary checking specialized version for unsigned char exist only for halfwindowsizes < 2050

Author:
woelk 02 2003 untested

Definition at line 34 of file SimilarityMeasure.cpp.

References r, and StorageType.

Referenced by LineMatcherSAD().

template<>
void BIAS::RegionMatcher::SADN | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

template<class StorageType>
void BIAS::RegionMatcher::SADN | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050

Author:
woelk 05 2003 untested

Definition at line 71 of file SimilarityMeasure.cpp.

References r, res, StorageType, and STORAGETYPE_MAX.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<>
void BIAS::RegionMatcher::SSD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | unsigned char ** | ida1,
 |  | unsigned char ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

template<class StorageType>
void BIAS::RegionMatcher::SSD | ( | unsigned int | p1[2],
 |  | unsigned int | p2[2],
 |  | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned int | halfwinsize,
 |  | double & | result
 | ) |

fast sum of square differences (SSD) sim.

measurment between p1 and p2 without boundary checking specialized version for unsigned char exist for halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4

Author:
woelk ? untested

Definition at line 120 of file SimilarityMeasure.cpp.

References r.

Referenced by BIAS::CornerMatcher::SSD().

Member Data Documentation

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl1 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl1_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl2 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_bl2_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Vector2<KLT_TYPE> BIAS::RegionMatcher::_d [protected]

Definition at line 507 of file RegionMatcher.hh.

Vector2<KLT_TYPE> BIAS::RegionMatcher::_disp [protected]

Definition at line 507 of file RegionMatcher.hh.

Vector2<KLT_TYPE> BIAS::RegionMatcher::_e [protected]

Definition at line 507 of file RegionMatcher.hh.

Matrix2x2<KLT_TYPE> BIAS::RegionMatcher::_G [protected]

Definition at line 506 of file RegionMatcher.hh.

Matrix2x2<KLT_TYPE> BIAS::RegionMatcher::_Ginv [protected]

Definition at line 506 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsx [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsx_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsy [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gsy_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx1 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx1_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx2 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gx2_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy1 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy1_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy2 [protected]

Definition at line 508 of file RegionMatcher.hh.

Matrix<KLT_TYPE> BIAS::RegionMatcher::_gy2_5 [protected]

Definition at line 509 of file RegionMatcher.hh.

Referenced by RegionMatcher().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_iim1 [protected]

Definition at line 513 of file RegionMatcher.hh.

Referenced by NCC().

Matrix<KLT_TYPE> BIAS::RegionMatcher::_iim2 [protected]

Definition at line 513 of file RegionMatcher.hh.

Referenced by NCC().

unsigned BIAS::RegionMatcher::_klthws [protected]

Definition at line 511 of file RegionMatcher.hh.

Referenced by RegionMatcher().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

unsigned BIAS::RegionMatcher::_ncchws [protected]

Definition at line 514 of file RegionMatcher.hh.

Referenced by NCC(), and RegionMatcher().

unsigned BIAS::RegionMatcher::_nccwinsize [protected]

Definition at line 514 of file RegionMatcher.hh.

Referenced by NCC(), and RegionMatcher().

unsigned BIAS::RegionMatcher::_winsize [protected]

Definition at line 511 of file RegionMatcher.hh.

Referenced by RegionMatcher().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Matcher2D/RegionMatcher.hh
  • Matcher2D/LineMatcher.cpp
  • Matcher2D/RegionMatcher.cpp
  • Matcher2D/SimilarityMeasure.cpp
Generated on Wed Jun 21 19:10:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RenderModeGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RenderModeGL

BIAS::RenderModeGL Class Reference

#include <Gui/RenderModeGL.hh>

List of all members.

Public Member Functions

bool | IsMono () const
no 3D streo enabled, single viewpoint only?
bool | IsStereoQuadbuffered () const
page flipping quad buffered stereo? E.g.
RenderModeGL ()

Public Attributes

GLenum | cullface
glCullFace: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK
BIAS::DrawbufferMode drawbuffermode
bool | enable_cullface
float | linewidth
float | pointsize
GLenum | polygonmodeBACK
glPoygonMode(GL_BACK...
GLenum | polygonmodeFRONT
glPoygonMode(GL_FRONT...
GLenum | shademodel
glShadeModel(...
bool | vsync

Detailed Description

Definition at line 40 of file RenderModeGL.hh.

Constructor & Destructor Documentation

BIAS::RenderModeGL::RenderModeGL ( ) [inline]

Definition at line 42 of file RenderModeGL.hh.

References cullface, drawbuffermode, enable_cullface, linewidth, pointsize, polygonmodeBACK, polygonmodeFRONT, shademodel, BIAS::STEREO_UNTOUCHED, and vsync.

Member Function Documentation

bool BIAS::RenderModeGL::IsMono ( ) const [inline]

no 3D streo enabled, single viewpoint only?

Definition at line 62 of file RenderModeGL.hh.

References drawbuffermode, and BIAS::MONO.

bool BIAS::RenderModeGL::IsStereoQuadbuffered ( ) const [inline]

page flipping quad buffered stereo? E.g.

with consumer shutter glasses like Elsa Revelator

Definition at line 66 of file RenderModeGL.hh.

Member Data Documentation

GLenum BIAS::RenderModeGL::cullface

glCullFace: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK

Definition at line 78 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

BIAS::DrawbufferMode BIAS::RenderModeGL::drawbuffermode

Definition at line 84 of file RenderModeGL.hh.

Referenced by BIAS::OpenGLCanvasBase::DisplaySelectBuffer(), IsMono(), RenderModeGL(), and BIAS::OpenGLCanvasBase::ToggleFullScreen().

bool BIAS::RenderModeGL::enable_cullface

Definition at line 77 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

float BIAS::RenderModeGL::linewidth

Definition at line 81 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), and RenderModeGL().

float BIAS::RenderModeGL::pointsize

Definition at line 80 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

GLenum BIAS::RenderModeGL::polygonmodeBACK

glPoygonMode(GL_BACK...

Definition at line 72 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

GLenum BIAS::RenderModeGL::polygonmodeFRONT

glPoygonMode(GL_FRONT...

Definition at line 66 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

GLenum BIAS::RenderModeGL::shademodel

glShadeModel(...

Definition at line 75 of file RenderModeGL.hh.

Referenced by BIAS::GeometryGL::DisplayRenderMode(), BIAS::OpenGLCanvasBase::OnChar(), and RenderModeGL().

bool BIAS::RenderModeGL::vsync

Definition at line 86 of file RenderModeGL.hh.

Referenced by BIAS::OpenGLCanvasBase::InitWithContext(), and RenderModeGL().

The documentation for this class was generated from the following file:
  • Gui/RenderModeGL.hh
Generated on Wed Jun 21 19:10:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Rescale< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Rescale

BIAS::Rescale< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Down-, Upsampling routines and Resize. More...

#include <Filter/Rescale.hh>

Inheritance diagram for BIAS::Rescale< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::Rescale< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | Downsample (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight)
downsamples src to dst of size newwidth x newheight
int | Downsample (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
generic downsample function.
int | DownsampleBPoT (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination)
The mean low pass filter is used implicitly, resulting in the coordinate conversion equation:.
int | DownsampleBy2 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Calls the appropriate function for the color model.
int | DownsampleBy2Color (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
assumes that destination is initialized.
int | DownsampleBy2Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
assumes that destination is initialized.
int | DownsampleBy4 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
calls the appropriate function for the color model mean low pass filter is usedimplicitly, resulting in the coordinate conversion equation:
int | DownsampleBy4Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Assumes that destination is initialized.
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0
prototyp for filter computation function
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
scales the src to dst using the downsampling factor from SetFactor()
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFactor () const
FilterNToN< InputStorageType,
OutputStorageType > * 		GetLowpass ()
int | GetLowPassType () const
double | GetPositionOffset () const
see DownsampleBy2 for explanation
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
Rescale (Param &para, const int grp, const std::string &postfix)
Rescale (Param &para, const std::string &postfix="")
Rescale ()
uses internal param object
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetFactor (double factor)
the downsampling factor
void | SetLowPassType (int lptype)
void | UpdateLowpass (double factor)
updates _lowpass using _RescaleMeanType
int | Upsample (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight)
Upsamples src to dst of size width by height.
int | Upsample (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
generic upsample function
int | UpsampleBy2 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight() only for interleaved images for images with arbitrary channel count
int | UpsampleBy2Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, InterpolationType i=NearestNeighbour, const double &valmin=0.0, const double &valmax=255.0)
assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight()
int | UpsampleBy2RGBInterleaved (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, InterpolationType i=NearestNeighbour, const double &valmin=0.0, const double &valmax=255.0)
assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight()
int | UpsampleGrey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight)
Upsamples src to dst of size width by height.
virtual | ~Rescale ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
fills the parameter
int | _ApplyMeanFilter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const double factor)
updates _mean using _RescaleMeanType and calls _mean->Filter(src, dst)
int | _FillInterpolatedColor (const Image< OutputStorageType > &src, Image< OutputStorageType > &dst)
Same as _FillInterpolatedGrey but for multi channel interleaved images.
int | _FillInterpolatedGrey (const Image< OutputStorageType > &src, Image< OutputStorageType > &dst)
Assumes dst is initialized and ROI is set.
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

Binomial< InputStorageType,
OutputStorageType > 		_binomial
int * | _BinomialHWS
int * | _FilterBorderHandling
Gauss< InputStorageType, OutputStorageType > | _gauss
double * | _GaussRatio
double * | _GaussSigma
double | _LastPositionOffset
see DownsampleBy2 for explanation
long int | _liDebugLevel
FilterNToN< InputStorageType,
OutputStorageType > * 		_lowpass
Mean< InputStorageType, OutputStorageType > | _mean
int * | _MeanSize
bool | _ParamsAllocated
double * | _RescaleFactor
double * | _RescaleMeanSigmaFactor
int * | _RescaleMeanType

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::Rescale< InputStorageType, OutputStorageType >

Down-, Upsampling routines and Resize.

Author:
woelk 09/2004

Definition at line 49 of file Rescale.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputImageType, class OutputImageType>
BIAS::Rescale< InputImageType, OutputImageType >::Rescale ( )

uses internal param object

Definition at line 45 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanSigmaFactor, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanType, and BIAS::LPT_Mean.

template<class InputImageType, class OutputImageType>
BIAS::Rescale< InputImageType, OutputImageType >::Rescale | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 60 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputImageType, class OutputImageType>
BIAS::Rescale< InputImageType, OutputImageType >::Rescale | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 75 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), and BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset.

template<class InputImageType, class OutputImageType>
BIAS::Rescale< InputImageType, OutputImageType >::~Rescale ( ) [virtual]

Definition at line 87 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanSigmaFactor, and BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanType.

Member Function Documentation

template<class InputImageType, class OutputImageType>
void BIAS::Rescale< InputImageType, OutputImageType >::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

fills the parameter

Author:
woelk 09/2004

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 1992 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanType, BIAS::Param::CheckParam(), and BIAS::Param::GetParamEnum().

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::_ApplyMeanFilter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const double | factor
 | ) | [protected]

updates _mean using _RescaleMeanType and calls _mean->Filter(src, dst)

Author:
woelk 09/2004

Definition at line 2089 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_lowpass, BIASDOUT, D_FILTERBASE_CALLSTACK, D_RESCALE_WRITE_IMG, BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass(), and BIAS::ImageIO::Write().

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample().

template<class InputStorageType, class OutputStorageType>
int BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedColor | ( | const Image< OutputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

Same as _FillInterpolatedGrey but for multi channel interleaved images.

Author:
woelk 09/2004

template<class InputStorageType, class OutputStorageType>
int BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedGrey | ( | const Image< OutputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [protected]

Assumes dst is initialized and ROI is set.

For every pixel (x, y) in ROI of dst, a bilinear lookup at the coordinates (x*src.Width/dst.Width, y*src.Height/dst.GetHeight) is performed. Only for one channel grey images

Author:
woelk 09/2004

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::Downsample | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const unsigned | newwidth,
 |  | const unsigned | newheight
 | ) |

downsamples src to dst of size newwidth x newheight

Attention:
, results in coo system offset, when downsampling by 2^n !! see DownsampleBy2() for details
Author:
woelk 09/2004

Definition at line 163 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedGrey(), BIASDOUT, BIASERR, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), res, and BIAS::ROI::SetCorners().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::Downsample | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

generic downsample function.

Attention:
, results in coo system offset, when downsampling by 2^n !! see DownsampleBy2() for details
Author:
woelk 09/2004

Definition at line 121 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanType, BIASDOUT, D_FILTERBASE_CALLSTACK, BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), BIAS::LPT_Mean, and BIAS::Image< StorageType >::Release().

Referenced by BIAS::PyramidImage< StorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), and main().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBPoT | ( | const Image< InputStorageType > & | Source,
 |  | Image< OutputStorageType > & | Destination
 | ) |

The mean low pass filter is used implicitly, resulting in the coordinate conversion equation:.

(2^n*xs+2^(n-1)-0.5, 2^n*ys+2^(n-1)-0.5) = (xb, yb) or (xs, ys) = ((xb-2^(n-1)+0.5)/2^n, (yb-2^(n-1)+0.5)/2^n)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image and the image is downsample by a facteo 2^n in width and in height. E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (2^(n-1)-0.5, 2^(n-1)-0.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Author:
evers

Definition at line 1008 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIASDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), InputImageType, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), OutputImageType, BIAS::ImageBase::RedirectImageDataPointer(), BIAS::Image< StorageType >::Release(), BIAS::ImageBase::ReleaseImageDataPointer(), and res.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBy2 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Calls the appropriate function for the color model.

Mean low pass filter of size 2x2 is used implicitly, resulting in the coordinate conversion equation:

(2*xs+0.5, 2*ys+0.5) = (xb, yb) or (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (0.5, 0.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Author:
woelk 09/2004

Definition at line 287 of file Rescale.cpp.

References BIASDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), and res.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBy2Color | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

assumes that destination is initialized.

mean low pass filter is used implicitly, resulting in the coordinate conversion equation:

(2*xs+0.5, 2*ys+0.5) = (xb, yb) or (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (0.5, 0.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Destination width = floor(source.GetWidth()/2) Destination height = floor(source.GetHeight()/2) only for three channel interleaved images not tested with odd size images

Author:
woelk 01/2003

Definition at line 501 of file Rescale.cpp.

References BIAS_DEBUG, BIASASSERT, BIASDOUT, D_FILTERBASE_CALLSTACK, D_RESCALE_WRITE_IMG, BIAS::ImageBase::IsPlanar(), and BIAS::ImageIO::Write().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBy2Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

assumes that destination is initialized.

mean low pass filter is used implicitly, resulting in the coordinate conversion equation:

(2*xs+0.5, 2*ys+0.5) = (xb, yb) or (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (0.5, 0.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Destination width = floor(source.GetWidth()/2) Destination height = floor(source.GetHeight()/2) Only for one channel images. Also make use of ROI in Source image (fast :-)) ).

Not tested with odd size images.

Author:
woelk 01/2003

Definition at line 317 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIASDOUT, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), InputImageType, OutputImageType, and BIAS::ROI::SetCorners().

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2(), and main().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBy4 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

calls the appropriate function for the color model mean low pass filter is usedimplicitly, resulting in the coordinate conversion equation:

(4*xs+1.5, 4*ys+1.5) = (xb, yb) or (xs, ys) = ((xb-1.5)/4.0, (yb-1.5)/4.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (1.5, 1.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Author:
woelk 09/2004

Definition at line 699 of file Rescale.cpp.

References BIASDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), BIAS::Image< StorageType >::Release(), and res.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::DownsampleBy4Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Assumes that destination is initialized.

The mean low pass filter is used implicitly, resulting in the coordinate conversion equation:

(4*xs+1.5, 4*ys+1.5) = (xb, yb) or (xs, ys) = ((xb-1.5)/4.0, (yb-1.5)/4.0)

where (xs, ys) is the pixel position in pixel coo. the smaller destination image and (xb, yb) is the position in pixel coo. in the bigger source image E.g. the ray through position (0,0) in the small image intercepts the bigger image at position (1.5, 1.5).

This must be taken into account when calculating the corrsponding K matrix of the smaller image. I.e. the principal point in the smaller image cannot be calculated by simply dividing by 2, but instead using the formula above.

Destination width = floor(source.GetWidth()/4) Destination height = floor(source.GetHeight()/4) only for one channel grey images also make use of ROI in Source image (fast :-)) )

Author:
woelk 09/2004

Definition at line 729 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIASASSERT, BIASDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), InputImageType, OutputImageType, and BIAS::ROI::SetCorners().

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::FilterBase< InputStorageType, OutputStorageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [pure virtual, inherited]

prototyp for filter computation function

Implemented in BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, InputStorageType >, BIAS::Binomial< StorageType, CalculationType >, BIAS::Binomial< CalculationType, CalculationType >, BIAS::Binomial< StorageType, StorageType >, BIAS::Binomial< unsigned char, unsigned char >, BIAS::Convolution< InputStorageType, InputStorageType >, BIAS::Convolution< StorageType, CalculationType >, BIAS::Convolution< CalculationType, CalculationType >, BIAS::Convolution< StorageType, StorageType >, BIAS::Convolution< unsigned char, unsigned char >, BIAS::FilterNTo2N< CalculationType, CalculationType >, BIAS::FilterNTo3N< CalculationType, CalculationType >, BIAS::FilterNToN< InputStorageType, InputStorageType >, BIAS::FilterNToN< StorageType, CalculationType >, BIAS::FilterNToN< CalculationType, CalculationType >, BIAS::FilterNToN< StorageType, StorageType >, BIAS::FilterNToN< unsigned char, unsigned char >, BIAS::Gauss< InputStorageType, InputStorageType >, BIAS::Gauss< StorageType, CalculationType >, BIAS::Gauss< CalculationType, CalculationType >, BIAS::Gauss< StorageType, StorageType >, BIAS::Gauss< unsigned char, unsigned char >, BIAS::GradientGauss< CalculationType, CalculationType >, BIAS::GradientGaussAsymmetric< CalculationType, CalculationType >, BIAS::GradientSobel3x3< CalculationType, CalculationType >, BIAS::Mean< InputStorageType, InputStorageType >, BIAS::Mean< StorageType, CalculationType >, BIAS::Mean< CalculationType, CalculationType >, BIAS::Mean< StorageType, StorageType >, BIAS::Mean< unsigned char, unsigned char >, BIAS::Rescale< InputStorageType, InputStorageType >, BIAS::Rescale< CalculationType, CalculationType >, BIAS::Rescale< StorageType, StorageType >, BIAS::Rescale< unsigned char, unsigned char >, and BIAS::StructureTensor< CalculationType, CalculationType >.

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

scales the src to dst using the downsampling factor from SetFactor()

Definition at line 99 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIASDOUT, D_FILTERBASE_CALLSTACK, BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), res, and BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample().

Referenced by BIAS::PyramidImage< StorageType >::_CreateLevels(), main(), and BIAS::VideoServer::ProcessOneImage().

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputImageType, class OutputImageType>
void BIAS::Rescale< InputImageType, OutputImageType >::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 2315 of file Rescale.cpp.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class InputStorageType, class OutputStorageType>
double BIAS::Rescale< InputStorageType, OutputStorageType >::GetFactor ( ) const [inline]

Definition at line 330 of file Rescale.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
FilterNToN<InputStorageType, OutputStorageType>* BIAS::Rescale< InputStorageType, OutputStorageType >::GetLowpass ( ) [inline]

Definition at line 340 of file Rescale.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::Rescale< InputStorageType, OutputStorageType >::GetLowPassType ( ) const [inline]

Definition at line 335 of file Rescale.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::Rescale< InputStorageType, OutputStorageType >::GetPositionOffset ( ) const [inline]

see DownsampleBy2 for explanation

Definition at line 338 of file Rescale.hh.

Referenced by BIAS::PyramidImage< StorageType >::Downsample().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Rescale< InputStorageType, OutputStorageType >::SetFactor ( double factor ) [inline]

the downsampling factor

Definition at line 328 of file Rescale.hh.

Referenced by main(), BIAS::VideoServer::ProcessOneImage(), and BIAS::PyramidImage< StorageType >::PyramidImage().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::Rescale< InputStorageType, OutputStorageType >::SetLowPassType ( int lptype ) [inline]

Definition at line 332 of file Rescale.hh.

template<class InputImageType, class OutputImageType>
void BIAS::Rescale< InputImageType, OutputImageType >::UpdateLowpass ( double factor )

updates _lowpass using _RescaleMeanType

Author:
woelk 09/2004

Definition at line 2043 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_binomial, BIAS::Rescale< InputStorageType, OutputStorageType >::_BinomialHWS, BIAS::Rescale< InputStorageType, OutputStorageType >::_gauss, BIAS::Rescale< InputStorageType, OutputStorageType >::_GaussSigma, BIAS::Rescale< InputStorageType, OutputStorageType >::_lowpass, BIAS::Rescale< InputStorageType, OutputStorageType >::_mean, BIAS::Rescale< InputStorageType, OutputStorageType >::_MeanSize, BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanSigmaFactor, BIASABORT, BIASCDOUT, BIASERR, D_RESCALE_INIT, BIAS::LPT_Binomial, BIAS::LPT_Gauss, and BIAS::LPT_Mean.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::Upsample | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const unsigned | newwidth,
 |  | const unsigned | newheight
 | ) |

Upsamples src to dst of size width by height.

width > src.GetWidth() && height > src.GetHeight() is asserted. ROI not supported.

Author:
?

Definition at line 1142 of file Rescale.cpp.

References BIASABORT, BIASDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::Upsample | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

generic upsample function

Author:
woelk 09/2004

Definition at line 1129 of file Rescale.cpp.

References BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor, BIASDOUT, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Filter().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::UpsampleBy2 | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight() only for interleaved images for images with arbitrary channel count

Author:
woelk 04/2004

Definition at line 1947 of file Rescale.cpp.

References BIASABORT, BIASDOUT, BIASERR, D_FILTERBASE_CALLSTACK, and BIAS::ImageBase::IsInterleaved().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::UpsampleBy2Grey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | InterpolationType | i = NearestNeighbour,
 |  | const double & | valmin = 0.0,
 |  | const double & | valmax = 255.0
 | ) |

assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight()

Parameters:
InterpolationType | which interpolation to use for off-grid pixel
valmin/valmax | if bicubic, limit range to these values only for one channel images
Author:
woelk/koeser

Definition at line 1293 of file Rescale.cpp.

References BIASABORT, BIASDOUT, BIASERR, BIAS::Bicubic, BIAS::Bilinear, D_FILTERBASE_CALLSTACK, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetWidth(), InputImageType, BIAS::NearestNeighbour, OutputImageType, WX0, WX1, WY0, and WY1.

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::UpsampleBy2RGBInterleaved | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | InterpolationType | i = NearestNeighbour,
 |  | const double & | valmin = 0.0,
 |  | const double & | valmax = 255.0
 | ) |

assumes that destination is initialized dst width = 2*src.GetWidth() dst height = 2*src.GetHeight()

Parameters:
InterpolationType | which interpolation to use for off-grid pixel
valmin/valmax | if bicubic, limit range to these values only for three channel images
Author:
koeser 06/2005

Definition at line 1517 of file Rescale.cpp.

References BIASABORT, BIASDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetWidth(), InputImageType, and OutputImageType.

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >::UpsampleGrey | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const unsigned | newwidth,
 |  | const unsigned | newheight
 | ) |

Upsamples src to dst of size width by height.

Only for one channel grey images. ROI not supported. width > src.GetWidth() && height > src.GetHeight() is asserted.

Author:
?

Definition at line 1211 of file Rescale.cpp.

References BIASABORT, BIASDOUT, BIASERR, D_FILTERBASE_CALLSTACK, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Binomial<InputStorageType, OutputStorageType> BIAS::Rescale< InputStorageType, OutputStorageType >::_binomial [protected]

Definition at line 347 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Rescale< InputStorageType, OutputStorageType >::_BinomialHWS [protected]

Definition at line 358 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
Gauss<InputStorageType, OutputStorageType> BIAS::Rescale< InputStorageType, OutputStorageType >::_gauss [protected]

Definition at line 346 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
double* BIAS::Rescale< InputStorageType, OutputStorageType >::_GaussRatio [protected]

Definition at line 360 of file Rescale.hh.

template<class InputStorageType, class OutputStorageType>
double* BIAS::Rescale< InputStorageType, OutputStorageType >::_GaussSigma [protected]

Definition at line 359 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
double BIAS::Rescale< InputStorageType, OutputStorageType >::_LastPositionOffset [protected]

see DownsampleBy2 for explanation

Definition at line 364 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), and BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
FilterNToN<InputStorageType, OutputStorageType>* BIAS::Rescale< InputStorageType, OutputStorageType >::_lowpass [protected]

Definition at line 345 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_ApplyMeanFilter(), and BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
Mean<InputStorageType, OutputStorageType> BIAS::Rescale< InputStorageType, OutputStorageType >::_mean [protected]

Definition at line 348 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Rescale< InputStorageType, OutputStorageType >::_MeanSize [protected]

Definition at line 357 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
double* BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleFactor [protected]

Definition at line 353 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBPoT(), BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), and BIAS::Rescale< InputStorageType, OutputStorageType >::~Rescale().

template<class InputStorageType, class OutputStorageType>
double* BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanSigmaFactor [protected]

Definition at line 355 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpdateLowpass(), and BIAS::Rescale< InputStorageType, OutputStorageType >::~Rescale().

template<class InputStorageType, class OutputStorageType>
int* BIAS::Rescale< InputStorageType, OutputStorageType >::_RescaleMeanType [protected]

Definition at line 354 of file Rescale.hh.

Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::_AddParam(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), and BIAS::Rescale< InputStorageType, OutputStorageType >::~Rescale().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/Rescale.hh
  • Filter/Rescale.cpp
Generated on Wed Jun 21 19:10:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBAd Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBAd Class Reference
[Matrix and Vector Classes]

class RGBAd is asynonym for a Vector4 of correct type More...

#include <Base/Math/RGBA.hh>

Detailed Description

class RGBAd is asynonym for a Vector4 of correct type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGBA.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBAf Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBAf Class Reference
[Matrix and Vector Classes]

class RGBAf is asynonym for a Vector4 of correct type More...

#include <Base/Math/RGBA.hh>

Detailed Description

class RGBAf is asynonym for a Vector4 of correct type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGBA.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBAuc Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBAuc Class Reference
[Matrix and Vector Classes]

class RGBAuc is asynonym for a Vector4 of corerct type More...

#include <Base/Math/RGBA.hh>

Detailed Description

class RGBAuc is asynonym for a Vector4 of corerct type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGBA.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBd Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBd Class Reference
[Matrix and Vector Classes]

class RGBAd is asynonym for a Vector of coorect type More...

#include <Base/Math/RGB.hh>

Detailed Description

class RGBAd is asynonym for a Vector of coorect type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGB.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBf Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBf Class Reference
[Matrix and Vector Classes]

class RGBAf is asynonym for a Vector3 of correct type More...

#include <Base/Math/RGB.hh>

Detailed Description

class RGBAf is asynonym for a Vector3 of correct type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGB.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: RGBuc Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

RGBuc Class Reference
[Matrix and Vector Classes]

class RGBuc is asynonym for a Vector3 of correct type More...

#include <Base/Math/RGB.hh>

Detailed Description

class RGBuc is asynonym for a Vector3 of correct type

Author:
Jan Woetzel

The documentation for this class was generated from the following file:
  • Base/Math/RGB.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RigParameter Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RigParameter

BIAS::RigParameter Class Reference

#include <Image/RigParameter.hh>

List of all members.

Public Member Functions

void | AddCalibration (BIAS::KMatrix &kMatrix)
void AddCamera (CameraParam &Camera)
void | AddCameraCenter (BIAS::Vector3< double > &center)
void AddCameraOnly (CameraParam &Camera)
This sets a Camera and sets everything else to identity.
void | AddRotation (BIAS::RMatrix &rMatrix)
void | AddSensorCenter (BIAS::Vector3< double > &sCenter)
void | AddSensorRotation (BIAS::RMatrix &sRotation)
bool | Compute (std::vector< BIAS::PMatrix > &Pvec, const unsigned int &Rigsize, const double &WeightOfCurrentParams=0.0)
compute mean rigid transformations of virtual camera into rigcameras given a number of rigs
void DeleteCalibrations ()
void DeleteCameraCenters ()
void DeleteCameraParams ()
void DeleteRotations ()
void DeleteSensorCenters ()
void DeleteSensorRotations ()
void | GetCalibrations (std::vector< BIAS::KMatrix > &Calibration) const
bool | GetCameraCenter (BIAS::Vector3< double > &CCenter, unsigned int index) const
void | GetCameraCenters (std::vector< BIAS::Vector3< double > > &CameraCenters) const
bool | GetCameraParam (CameraParam &CParam, unsigned int index) const
void | GetCameraParams (std::vector< CameraParam > &CameraParam) const
void | GetDownSamplingFactor (double &Down) const
void | GetKMatrices (std::vector< BIAS::KMatrix > &vKmatrix)
returns the K-Matrices in the vector the downsampling factor is applied to the matrices caution: the vector is erased befor refilled @ author schiller 07/05
bool | GetKMatrix (BIAS::KMatrix &matrix, int index) const
unsigned int | getNumberOfCameras () const
unsigned int | getRigSize () const
bool | GetRotation (BIAS::RMatrix &Rotation, unsigned int index) const
void | GetRotations (std::vector< BIAS::RMatrix > &Rotations) const
bool | GetSensorCenter (BIAS::Vector3< double > &SensorCenter, unsigned int index) const
void | GetSensorCenters (std::vector< BIAS::Vector3< double > > &SensorCenters) const
bool | GetSensorRotation (BIAS::RMatrix &SRotation, unsigned int index) const
void | GetSensorRotations (std::vector< BIAS::RMatrix > &SRotation) const
bool | ReadFromCMP (const std::string &filename)
int | ReadRigData (const std::string &filename)
Read a rig parameter file and store the data in (*this) the Camera-, Center-, RMatrix-, and KMatrix-Vectors are reset from the file.
RigParameter (const RigParameter &RigParam)
RigParameter ()
bool | SetCalibration (BIAS::KMatrix kMat, unsigned int index)
bool | SetCameraCenter (BIAS::Vector3< double > center, unsigned int index)
void | SetCameraCenters (std::vector< BIAS::Vector3< double > > center)
bool | SetCameraParam (CameraParam param, unsigned int index)
void SetData_DummyRig ()
void | SetDownsampling (const double factor)
Set the downsampling factor 1 means no downsampling, 2 means downsampling by 2 .
void | SetLadybugCenters (double value=1.0)
bool | SetRotation (BIAS::RMatrix rMat, unsigned int index)
bool | SetSensorCenter (BIAS::Vector3< double > vSC, unsigned int index)
bool | SetSensorRotation (BIAS::RMatrix rSMat, unsigned int index)
int | WriteRigData (const std::string &filename)
Write all data camera data and camera positions in the rig to a rig parameter file in XML-notation.
~RigParameter ()

Protected Member Functions

void | AdaptAxisAngleRepresentation (BIAS::Vector3< double > &Axis, double &Angle, const BIAS::Vector3< double > &RefAxis, const double &RefAngle)
adapts rotation representation in Axis/Angle such that averaging against RefAxis and RefAngle is possible without wrap-around problems
int | ParseView (const std::string &block)
int | ReadRigDataV0_8 (const std::string &filename)

Protected Attributes

std::vector< BIAS::KMatrix > | Calibration_
std::vector< BIAS::CameraParam > | Camera_
std::vector< BIAS::Vector3<
double > > 		Center_
double | DownSamplingFactor_
std::vector< BIAS::RMatrix > | Rotation_
std::vector< BIAS::Vector3<
double > > 		SensorCenter_
std::vector< BIAS::RMatrix > | SensorRotation_

Detailed Description

Definition at line 28 of file RigParameter.hh.

Constructor & Destructor Documentation

BIAS::RigParameter::RigParameter ( ) [inline]

Definition at line 30 of file RigParameter.hh.

BIAS::RigParameter::RigParameter ( const RigParameter & RigParam ) [inline]

Definition at line 32 of file RigParameter.hh.

References Calibration_, Camera_, Center_, DownSamplingFactor_, Rotation_, SensorCenter_, and SensorRotation_.

BIAS::RigParameter::~RigParameter ( ) [inline]

Definition at line 140 of file RigParameter.hh.

Member Function Documentation

void RigParameter::AdaptAxisAngleRepresentation | ( | BIAS::Vector3< double > & | Axis,
 |  | double & | Angle,
 |  | const BIAS::Vector3< double > & | RefAxis,
 |  | const double & | RefAngle
 | ) | [protected]

adapts rotation representation in Axis/Angle such that averaging against RefAxis and RefAngle is possible without wrap-around problems

Author:
koeser 03/2004

Definition at line 140 of file RigParameter.cpp.

References BIAS::Vector3< T >::ScalarProduct().

void BIAS::RigParameter::AddCalibration ( BIAS::KMatrix & kMatrix ) [inline]

Definition at line 233 of file RigParameter.hh.

Referenced by main().

void BIAS::RigParameter::AddCamera ( CameraParam & Camera ) [inline]

Definition at line 230 of file RigParameter.hh.

Referenced by main().

void BIAS::RigParameter::AddCameraCenter ( BIAS::Vector3< double > & center ) [inline]

Definition at line 239 of file RigParameter.hh.

void BIAS::RigParameter::AddCameraOnly ( CameraParam & Camera ) [inline]

This sets a Camera and sets everything else to identity.

Definition at line 206 of file RigParameter.hh.

References BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), and BIAS::Matrix3x3< T >::SetIdentity().

void BIAS::RigParameter::AddRotation ( BIAS::RMatrix & rMatrix ) [inline]

Definition at line 236 of file RigParameter.hh.

void BIAS::RigParameter::AddSensorCenter ( BIAS::Vector3< double > & sCenter ) [inline]

Definition at line 245 of file RigParameter.hh.

void BIAS::RigParameter::AddSensorRotation ( BIAS::RMatrix & sRotation ) [inline]

Definition at line 242 of file RigParameter.hh.

bool RigParameter::Compute | ( | std::vector< BIAS::PMatrix > & | Pvec,
 |  | const unsigned int & | Rigsize,
 |  | const double & | WeightOfCurrentParams = 0.0
 | ) |

compute mean rigid transformations of virtual camera into rigcameras given a number of rigs

Parameters:
Pvec | contains n rigs of size Rigsize, first all cameras of rig1 cameras must be in world coordinate system
Rigsize | size of each rig
WeightOfCurrentParams | if not zero, the current parameters are averaged with the new ones (weight 1.0)
Author:
koeser 03/2004

Definition at line 159 of file RigParameter.cpp.

References BIASABORT, and BIASERR.

void BIAS::RigParameter::DeleteCalibrations ( ) [inline]

Definition at line 102 of file RigParameter.hh.

void BIAS::RigParameter::DeleteCameraCenters ( ) [inline]

Definition at line 75 of file RigParameter.hh.

void BIAS::RigParameter::DeleteCameraParams ( ) [inline]

Definition at line 57 of file RigParameter.hh.

void BIAS::RigParameter::DeleteRotations ( ) [inline]

Definition at line 91 of file RigParameter.hh.

void BIAS::RigParameter::DeleteSensorCenters ( ) [inline]

Definition at line 134 of file RigParameter.hh.

void BIAS::RigParameter::DeleteSensorRotations ( ) [inline]

Definition at line 117 of file RigParameter.hh.

void BIAS::RigParameter::GetCalibrations ( std::vector< BIAS::KMatrix > & Calibration ) const [inline]

Definition at line 99 of file RigParameter.hh.

Referenced by BIAS::operator<<().

bool BIAS::RigParameter::GetCameraCenter | ( | BIAS::Vector3< double > & | CCenter,
 |  | unsigned int | index
 | ) | const [inline]

Definition at line 71 of file RigParameter.hh.

void BIAS::RigParameter::GetCameraCenters ( std::vector< BIAS::Vector3< double > > & CameraCenters ) const [inline]

Definition at line 68 of file RigParameter.hh.

Referenced by BIAS::operator<<().

bool BIAS::RigParameter::GetCameraParam | ( | CameraParam & | CParam,
 |  | unsigned int | index
 | ) | const [inline]

Definition at line 53 of file RigParameter.hh.

void BIAS::RigParameter::GetCameraParams ( std::vector< CameraParam > & CameraParam ) const [inline]

Definition at line 50 of file RigParameter.hh.

Referenced by BIAS::operator<<().

void BIAS::RigParameter::GetDownSamplingFactor ( double & Down ) const [inline]

Definition at line 42 of file RigParameter.hh.

void RigParameter::GetKMatrices ( std::vector< BIAS::KMatrix > & vKmatrix )

returns the K-Matrices in the vector the downsampling factor is applied to the matrices caution: the vector is erased befor refilled @ author schiller 07/05

Definition at line 656 of file RigParameter.cpp.

References Calibration_, Camera_, and DownSamplingFactor_.

bool RigParameter::GetKMatrix | ( | BIAS::KMatrix & | matrix,
 |  | int | index
 | ) | const

Definition at line 677 of file RigParameter.cpp.

References Calibration_, DownSamplingFactor_, and BIAS::Matrix< T >::SetZero().

unsigned int BIAS::RigParameter::getNumberOfCameras ( ) const [inline]

Definition at line 142 of file RigParameter.hh.

unsigned int BIAS::RigParameter::getRigSize ( ) const [inline]

Definition at line 147 of file RigParameter.hh.

bool BIAS::RigParameter::GetRotation | ( | BIAS::RMatrix & | Rotation,
 |  | unsigned int | index
 | ) | const [inline]

Definition at line 87 of file RigParameter.hh.

void BIAS::RigParameter::GetRotations ( std::vector< BIAS::RMatrix > & Rotations ) const [inline]

Definition at line 84 of file RigParameter.hh.

Referenced by BIAS::operator<<().

bool BIAS::RigParameter::GetSensorCenter | ( | BIAS::Vector3< double > & | SensorCenter,
 |  | unsigned int | index
 | ) | const [inline]

Definition at line 130 of file RigParameter.hh.

void BIAS::RigParameter::GetSensorCenters ( std::vector< BIAS::Vector3< double > > & SensorCenters ) const [inline]

Definition at line 126 of file RigParameter.hh.

bool BIAS::RigParameter::GetSensorRotation | ( | BIAS::RMatrix & | SRotation,
 |  | unsigned int | index
 | ) | const [inline]

Definition at line 113 of file RigParameter.hh.

void BIAS::RigParameter::GetSensorRotations ( std::vector< BIAS::RMatrix > & SRotation ) const [inline]

Definition at line 110 of file RigParameter.hh.

int BIAS::RigParameter::ParseView ( const std::string & block ) [protected]

bool BIAS::RigParameter::ReadFromCMP ( const std::string & filename )

int RigParameter::ReadRigData ( const std::string & filename )

Read a rig parameter file and store the data in (*this) the Camera-, Center-, RMatrix-, and KMatrix-Vectors are reset from the file.

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Rig"
Author:
streckel 06/2004

Definition at line 354 of file RigParameter.cpp.

References BIASERR, Calibration_, Camera_, Center_, cp, BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), Rotation_, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by main().

int RigParameter::ReadRigDataV0_8 ( const std::string & filename ) [protected]

Definition at line 508 of file RigParameter.cpp.

References BIASERR, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::CameraParam::GetKMatrix(), BIAS::XMLIO::getNodeName(), BIAS::CameraParam::Init(), BIAS::CameraParam::IsSpherical(), BIAS::XMLIO::read(), BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::RMatrixBase::SetXYZ().

bool BIAS::RigParameter::SetCalibration | ( | BIAS::KMatrix | kMat,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 95 of file RigParameter.hh.

bool BIAS::RigParameter::SetCameraCenter | ( | BIAS::Vector3< double > | center,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 61 of file RigParameter.hh.

void BIAS::RigParameter::SetCameraCenters ( std::vector< BIAS::Vector3< double > > center ) [inline]

Definition at line 65 of file RigParameter.hh.

bool BIAS::RigParameter::SetCameraParam | ( | CameraParam | param,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 46 of file RigParameter.hh.

void RigParameter::SetData_DummyRig ( )

Definition at line 587 of file RigParameter.cpp.

References BIAS::SphericalUndistortion::GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::Vector3< T >::Set(), BIAS::CameraParam::SetData_EVID31_147094(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::RMatrixBase::SetXYZ().

Referenced by main().

void RigParameter::SetDownsampling ( const double factor )

Set the downsampling factor 1 means no downsampling, 2 means downsampling by 2 .

.. 0.5 means upsample!

Author:
schiller

Definition at line 692 of file RigParameter.cpp.

References Camera_, and DownSamplingFactor_.

void RigParameter::SetLadybugCenters ( double value = 1.0 )

Definition at line 129 of file RigParameter.cpp.

References Calibration_, Center_, and Rotation_.

bool BIAS::RigParameter::SetRotation | ( | BIAS::RMatrix | rMat,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 79 of file RigParameter.hh.

bool BIAS::RigParameter::SetSensorCenter | ( | BIAS::Vector3< double > | vSC,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 121 of file RigParameter.hh.

bool BIAS::RigParameter::SetSensorRotation | ( | BIAS::RMatrix | rSMat,
 |  | unsigned int | index
 | ) | [inline]

Definition at line 106 of file RigParameter.hh.

int RigParameter::WriteRigData ( const std::string & filename )

Write all data camera data and camera positions in the rig to a rig parameter file in XML-notation.

Parameters:
Filename Name of the XML-rig-data-file, document tag will be to be "Rig"
Author:
streckel 06/2004

Definition at line 300 of file RigParameter.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::XMLIO::addContent(), Camera_, Center_, BIAS::XMLIO::create(), and Rotation_.

Referenced by main().

Member Data Documentation

std::vector< BIAS::KMatrix > BIAS::RigParameter::Calibration_ [protected]

Definition at line 261 of file RigParameter.hh.

Referenced by GetKMatrices(), GetKMatrix(), ReadRigData(), RigParameter(), and SetLadybugCenters().

std::vector< BIAS::CameraParam > BIAS::RigParameter::Camera_ [protected]

Definition at line 247 of file RigParameter.hh.

Referenced by GetKMatrices(), ReadRigData(), RigParameter(), SetDownsampling(), and WriteRigData().

std::vector< BIAS::Vector3<double> > BIAS::RigParameter::Center_ [protected]

Definition at line 259 of file RigParameter.hh.

Referenced by ReadRigData(), RigParameter(), SetLadybugCenters(), and WriteRigData().

double BIAS::RigParameter::DownSamplingFactor_ [protected]

Definition at line 265 of file RigParameter.hh.

Referenced by GetKMatrices(), GetKMatrix(), RigParameter(), and SetDownsampling().

std::vector< BIAS::RMatrix > BIAS::RigParameter::Rotation_ [protected]

Definition at line 260 of file RigParameter.hh.

Referenced by ReadRigData(), RigParameter(), SetLadybugCenters(), and WriteRigData().

std::vector< BIAS::Vector3<double > > BIAS::RigParameter::SensorCenter_ [protected]

Definition at line 263 of file RigParameter.hh.

Referenced by RigParameter().

std::vector< BIAS::RMatrix > BIAS::RigParameter::SensorRotation_ [protected]

Definition at line 262 of file RigParameter.hh.

Referenced by RigParameter().

The documentation for this class was generated from the following files:
  • Image/RigParameter.hh
  • Image/RigParameter.cpp
Generated on Wed Jun 21 19:10:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RMatrix Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RMatrix

BIAS::RMatrix Class Reference
[Geometry and Transformations]

3D rotation matrix More...

#include <Geometry/RMatrix.hh>

Inheritance diagram for BIAS::RMatrix:

[legend]
Collaboration diagram for BIAS::RMatrix:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< ROTATION_MATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const ROTATION_MATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
ROTATION_MATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const ROTATION_MATRIX_TYPE &scalar)
in place division function
int | EnforceRConstraints ()
Enforces scale ==1.0 and right-handed rotation.
void | Fill (const ROTATION_MATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
RMatrix | GetAverageRMatrix (const std::vector< RMatrix > &vecR, bool RefineRotation=true) const
compute average rotation by pairwise weighted averaging of matrices in vector
Vector< ROTATION_MATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< ROTATION_MATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
ROTATION_MATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
ROTATION_MATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
ROTATION_MATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
ROTATION_MATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
ROTATION_MATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
ROTATION_MATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const
return biggest and smallest entry
ROTATION_MATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
ROTATION_MATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
int | GetQuaternion (Quaternion< ROTATION_MATRIX_TYPE > &quat) const
calculates the quaternion from a rotation matrix
int | GetRotationAnglesXYZ (Vector3< ROTATION_MATRIX_TYPE > &r)
int | GetRotationAnglesXYZ (double &PhiX, double &PhiY, double &PhiZ)
not unique, has singularities at +- pi/2 assumes (*this) = Rx * Ry * Rz, i.e.
int | GetRotationAnglesZYX (Vector3< ROTATION_MATRIX_TYPE > &r)
int | GetRotationAnglesZYX (double &PhiX, double &PhiY, double &PhiZ)
not unique, has singularities at +- pi/2 assumes (*this) = Rz * Ry * Rx, i.e.
int | GetRotationAxisAngle (Vector3< ROTATION_MATRIX_TYPE > &w) const
calculates a angle * axis for the given rotation
int | GetRotationAxisAngle (Vector3< ROTATION_MATRIX_TYPE > &Axis, ROTATION_MATRIX_TYPE &Angle) const
calculates an angle and a axis for the given rotation angle is returned in rad
Vector< ROTATION_MATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< ROTATION_MATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< ROTATION_MATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< ROTATION_MATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< ROTATION_MATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< ROTATION_MATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< ROTATION_MATRIX_TYPE > &A)
Matrix (const Matrix< ROTATION_MATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const ROTATION_MATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< ROTATION_MATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< ROTATION_MATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< ROTATION_MATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const ROTATION_MATRIX_TYPEa0, const ROTATION_MATRIX_TYPEa1, const ROTATION_MATRIX_TYPEa2, const ROTATION_MATRIX_TYPEa3, const ROTATION_MATRIX_TYPEa4, const ROTATION_MATRIX_TYPEa5, const ROTATION_MATRIX_TYPEa6, const ROTATION_MATRIX_TYPEa7, const ROTATION_MATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< ROTATION_MATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< ROTATION_MATRIX_TYPE > &arg, Matrix< ROTATION_MATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< ROTATION_MATRIX_TYPE > &argmat, Matrix3x4< ROTATION_MATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< ROTATION_MATRIX_TYPE > &argmat, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const ROTATION_MATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< ROTATION_MATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
ROTATION_MATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
ROTATION_MATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
ROTATION_MATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
ROTATION_MATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
RMatrix (const TNT::Matrix< ROTATION_MATRIX_TYPE > &mat)
RMatrix (Matrix3x3< ROTATION_MATRIX_TYPE > mat)
RMatrix (Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi)
initialization from rotation axis w and angle phi (Rodriguez)
RMatrix (const MatrixInitType &i)
RMatrix ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const ROTATION_MATRIX_TYPE &scalar, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, ROTATION_MATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, ROTATION_MATRIX_TYPEscale)
Scales row NoRow with scale.
int | Set (Quaternion< ROTATION_MATRIX_TYPE > &q)
old Set(Quat) function, which now reports an error ( to find all places calling it and remove deprecated Transpose() )
void | Set (Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi)
initialize from vector and angle remark: Axis vector w must be an unit vector (||w||==1, within epsilon environment of magnitude 1e-6).
void | SetAsCrossProductMatrix (const ROTATION_MATRIX_TYPE &x, const ROTATION_MATRIX_TYPE &y, const ROTATION_MATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< ROTATION_MATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< ROTATION_MATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromAxisAngle (Vector3< ROTATION_MATRIX_TYPE > w)
initialize from vector * angle (axis _times_ angle !)
void | SetFromColumnVectors (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromHV (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xh, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &vy)
set rotation matrix from two vectors.
int | SetFromOriUpGL (BIAS::Vector3< ROTATION_MATRIX_TYPE > ori, BIAS::Vector3< ROTATION_MATRIX_TYPE > up)
Set Rotation matrix from orientation and up vector openGL conform, similar to gluLookAt().
void | SetFromOrthogonalBasis (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xxx, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &yyy, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &zzz)
int | SetFromQuaternion (const Quaternion< ROTATION_MATRIX_TYPE > &q)
Set RMatrix from a quternion.
void | SetFromRowVectors (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< ROTATION_MATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< ROTATION_MATRIX_TYPE > &data)
set a row of matrix from vector
void | SetXYZ (Vector3< ROTATION_MATRIX_TYPE > &r)
void | SetXYZ (ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
angles in rad, either: order 1.
void SetZero ()
Sets all values to zero.
void | SetZYX (Vector3< ROTATION_MATRIX_TYPE > &r)
void | SetZYX (ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
angles in rad, either: order 1.
Subscript | size () const
void | Sub (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const ROTATION_MATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< ROTATION_MATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
ROTATION_MATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< ROTATION_MATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< ROTATION_MATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
virtual | ~RMatrix ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Friends

bool BIASGeometryBase_EXPORT | operator== (const RMatrixBase &left, const RMatrixBase &right)

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

3D rotation matrix

Author:
JMF finished (07/05/2002)

Definition at line 47 of file RMatrix.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::RMatrix::RMatrix ( ) [inline]

Definition at line 51 of file RMatrix.hh.

BIAS::RMatrix::RMatrix ( const MatrixInitType & i ) [inline, explicit]

Definition at line 54 of file RMatrix.hh.

BIAS::RMatrix::RMatrix | ( | Vector3< ROTATION_MATRIX_TYPE > | w,
 |  | ROTATION_MATRIX_TYPE | phi
 | ) | [inline]

initialization from rotation axis w and angle phi (Rodriguez)

Definition at line 58 of file RMatrix.hh.

RMatrix::~RMatrix ( ) [virtual]

Definition at line 36 of file RMatrix.cpp.

BIAS::RMatrix::RMatrix ( Matrix3x3< ROTATION_MATRIX_TYPE > mat ) [inline]

Definition at line 63 of file RMatrix.hh.

RMatrix::RMatrix ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & mat )

Definition at line 39 of file RMatrix.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Function Documentation

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Add | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::AddIP ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::AddIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Divide | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::DivideIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

int RMatrix::EnforceRConstraints ( )

Enforces scale ==1.0 and right-handed rotation.

Author:
koeser

Definition at line 48 of file RMatrix.cpp.

References BIAS::SVD::GetU(), and BIAS::SVD::GetVT().

Referenced by GetAverageRMatrix().

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Fill ( const ROTATION_MATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

RMatrix RMatrix::GetAverageRMatrix | ( | const std::vector< RMatrix > & | vecR,
 |  | bool | RefineRotation = true
 | ) | const

compute average rotation by pairwise weighted averaging of matrices in vector

Attention:
unfinished code
Author:
koeser

Definition at line 107 of file RMatrix.cpp.

References BIASASSERT, BIASWARN, EnforceRConstraints(), BIAS::RMatrixBase::GetRotationAxisAngle(), BIAS::RMatrixBase::Set(), and BIAS::Matrix3x3< T >::Transpose().

Vector<ROTATION_MATRIX_TYPE > BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

ROTATION_MATRIX_TYPE * BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

ROTATION_MATRIX_TYPE ** BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

ROTATION_MATRIX_TYPE ** BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

ROTATION_MATRIX_TYPE * BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMaxMin | ( | ROTATION_MATRIX_TYPE & | max,
 |  | ROTATION_MATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

int RMatrixBase::GetQuaternion ( Quaternion< ROTATION_MATRIX_TYPE > & quat ) const [inherited]

calculates the quaternion from a rotation matrix

Author:
woelk 12 2003

Definition at line 185 of file RMatrixBase.cpp.

References BIASERR, MAX_QUATERNION_COS_ERROR, res, and tr.

Referenced by BIAS::RMatrixBase::GetRotationAxisAngle(), BIAS::PMDImageProc::PoseFromMeta(), BIAS::SimilarityTransform::SetR(), BIAS::ProjectionParametersBase::SetR(), and BIAS::CoordinateTransform3D::SetR().

int BIAS::RMatrixBase::GetRotationAnglesXYZ ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline, inherited]

Definition at line 206 of file RMatrixBase.hh.

int RMatrixBase::GetRotationAnglesXYZ | ( | double & | PhiX,
 |  | double & | PhiY,
 |  | double & | PhiZ
 | ) | [inherited]

not unique, has singularities at +- pi/2 assumes (*this) = Rx * Ry * Rz, i.e.

either: order 1. x, 2. y, 3. z and moving axes or: order 1. z, 2. y, 3. x and fixed axes

Author:
woelk 01 2003

Definition at line 280 of file RMatrixBase.cpp.

Referenced by main().

int BIAS::RMatrixBase::GetRotationAnglesZYX ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline, inherited]

Definition at line 216 of file RMatrixBase.hh.

int RMatrixBase::GetRotationAnglesZYX | ( | double & | PhiX,
 |  | double & | PhiY,
 |  | double & | PhiZ
 | ) | [inherited]

not unique, has singularities at +- pi/2 assumes (*this) = Rz * Ry * Rx, i.e.

either: order 1. x, 2. y, 3. z and fixed axes or: order 1. z, 2. y, 3. x and moving axes

Author:
woelk 01 2003

Definition at line 299 of file RMatrixBase.cpp.

Referenced by main().

int RMatrixBase::GetRotationAxisAngle ( Vector3< ROTATION_MATRIX_TYPE > & w ) const [inherited]

calculates a angle * axis for the given rotation

Author:
evers

Definition at line 265 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), BIAS::RMatrixBase::GetQuaternion(), and BIAS::Vector3< T >::Normalize().

int RMatrixBase::GetRotationAxisAngle | ( | Vector3< ROTATION_MATRIX_TYPE > & | Axis,
 |  | ROTATION_MATRIX_TYPE & | Angle
 | ) | const [inherited]

calculates an angle and a axis for the given rotation angle is returned in rad

Author:
woelk 12 2003

Definition at line 255 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), and BIAS::RMatrixBase::GetQuaternion().

Referenced by BIAS::ThreeDOut::AddEllipsoid(), BIAS::SimilarityTransform::Dump(), GetAverageRMatrix(), main(), BIAS::Projection3DData::Set(), BIAS::CoordinateTransform3D::Talk(), and BIAS::ThreeDOut::UpdateEllipsoid().

Vector<ROTATION_MATRIX_TYPE > BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetSystemMatrix ( Matrix< ROTATION_MATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Invert ( Matrix3x3< ROTATION_MATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW
Examples:
ExampleLoadBOG.cpp.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( const Matrix< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const ROTATION_MATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const Matrix< ROTATION_MATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 | ( | const ROTATION_MATRIX_TYPE | a0,
 |  | const ROTATION_MATRIX_TYPE | a1,
 |  | const ROTATION_MATRIX_TYPE | a2,
 |  | const ROTATION_MATRIX_TYPE | a3,
 |  | const ROTATION_MATRIX_TYPE | a4,
 |  | const ROTATION_MATRIX_TYPE | a5,
 |  | const ROTATION_MATRIX_TYPE | a6,
 |  | const ROTATION_MATRIX_TYPE | a7,
 |  | const ROTATION_MATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::MaxMin | ( | ROTATION_MATRIX_TYPE & | max,
 |  | ROTATION_MATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult | ( | const Vector< ROTATION_MATRIX_TYPE > & | arg,
 |  | Vector< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix< ROTATION_MATRIX_TYPE > & | arg,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix3x4< ROTATION_MATRIX_TYPE > & | argmat,
 |  | Matrix3x4< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix3x3< ROTATION_MATRIX_TYPE > & | argmat,
 |  | Matrix3x3< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Vector3< ROTATION_MATRIX_TYPE > & | argvec,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Multiply | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultiplyIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultLeft | ( | const Vector< ROTATION_MATRIX_TYPE > & | arg,
 |  | Vector< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultLeft ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Scale | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix3x3< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | ROTATION_MATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | ROTATION_MATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int RMatrixBase::Set ( Quaternion< ROTATION_MATRIX_TYPE > & q ) [inherited]

old Set(Quat) function, which now reports an error ( to find all places calling it and remove deprecated Transpose() )

Author:
evers

Definition at line 365 of file RMatrixBase.cpp.

References BIASABORT, and BIASERR.

void RMatrixBase::Set | ( | Vector3< ROTATION_MATRIX_TYPE > | w,
 |  | ROTATION_MATRIX_TYPE | phi
 | ) | [inherited]

initialize from vector and angle remark: Axis vector w must be an unit vector (||w||==1, within epsilon environment of magnitude 1e-6).

If compiled with BIAS_DEBUG, this condition will be checked and BIASABORT is called on failure. - cbuck

Author:
evers

Definition at line 137 of file RMatrixBase.cpp.

References BIASABORT, BIASERR, BIAS::Vector3< T >::NormL2(), BIAS::RMatrixBase::RMatrixBase(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by GetAverageRMatrix(), main(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::RMatrixBase::RMatrixBase(), and BIAS::RMatrixBase::SetFromAxisAngle().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetAsCrossProductMatrix | ( | const ROTATION_MATRIX_TYPE & | x,
 |  | const ROTATION_MATRIX_TYPE & | y,
 |  | const ROTATION_MATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< ROTATION_MATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< ROTATION_MATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void RMatrixBase::SetFromAxisAngle ( Vector3< ROTATION_MATRIX_TYPE > w ) [inherited]

initialize from vector * angle (axis _times_ angle !)

Author:
evers

Definition at line 173 of file RMatrixBase.cpp.

References MINIMUM_ROTATION, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::RMatrixBase::Set().

Referenced by BIAS::PMDImageProc::HFromMeta_(), BIAS::PMatrixBase::Parametrization2R_(), and BIAS::PMDImageProc::PoseFromMeta().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

Referenced by BIAS::RMatrixBase::SetFromOriUpGL().

void RMatrixBase::SetFromHV | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | xh,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | vy
 | ) | [inherited]

set rotation matrix from two vectors.

form an orthonormalbasis. xh represent the first base vector and is left unchanged. You can think of this routine as compute R from an image plane given by two (usually orthogonal) base vectors. if the given base vecctors are not orthogonal xh is kept and yv is orthogonalized appropriately.

Author:
Jan Woetzel

Definition at line 387 of file RMatrixBase.cpp.

int RMatrixBase::SetFromOriUpGL | ( | BIAS::Vector3< ROTATION_MATRIX_TYPE > | ori,
 |  | BIAS::Vector3< ROTATION_MATRIX_TYPE > | up
 | ) | [inherited]

Set Rotation matrix from orientation and up vector openGL conform, similar to gluLookAt().

openGL like means: if ori is (0,0,-1) and up:(0,1,0) the resulting matrix is the identity

Author:
grest, Dec. 2005

Definition at line 407 of file RMatrixBase.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromColumnVectors().

void RMatrixBase::SetFromOrthogonalBasis | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | xxx,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | yyy,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | zzz
 | ) | [inherited]

Definition at line 375 of file RMatrixBase.cpp.

References BIAS::Vector3< T >::GetNormalized(), and BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromRowVectors().

int RMatrixBase::SetFromQuaternion ( const Quaternion< ROTATION_MATRIX_TYPE > & q ) [inherited]

Set RMatrix from a quternion.

Author:
Daniel Grest, June2003

Definition at line 336 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::Normalize().

Referenced by BIAS::SimilarityTransform::Dump(), ErrorFunction(), BIAS::SimilarityTransform::GetMatrix(), BIAS::SimilarityTransform::GetR(), BIAS::ProjectionParametersBase::GetR(), BIAS::CoordinateTransform3D::GetR(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::Projection3DData::Set(), BIAS::CoordinateTransform3D::Talk(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

Referenced by BIAS::RMatrixBase::SetFromOrthogonalBasis().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromVector ( const TNT::Vector< ROTATION_MATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< ROTATION_MATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::RMatrixBase::SetXYZ ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline, inherited]

Definition at line 92 of file RMatrixBase.hh.

void RMatrixBase::SetXYZ | ( | ROTATION_MATRIX_TYPE | PhiX,
 |  | ROTATION_MATRIX_TYPE | PhiY,
 |  | ROTATION_MATRIX_TYPE | PhiZ
 | ) | [inherited]

angles in rad, either: order 1.

z, 2. y, 3. x and fixed axes or: order 1. x, 2. y, 3. z and moving axes angles are measured in mathematical sense (anticlockwise), i.e. Set(x, 0, 0) results in the following matrix | 1 0 0 | | 0 cos(x) -sin(x) | | 0 sin(x) cos(x) |

(*this) = Rx*Ry*Rz =

| c(y)c(z) -c(y)s(z) s(y) | | c(z)s(x)s(y)+c(x)s(z) c(x)c(z)-s(x)s(y)s(z) -c(y)s(x) | | -c(x)c(z)s(y)+s(x)s(z) c(z)s(x)+c(x)s(y)s(z) c(x)x(y) |

with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ

Author:
frahm ,woelk

Definition at line 67 of file RMatrixBase.cpp.

References BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), CreateMatches2(), BIAS::GenSynthMatches::GetGTNormalizedF(), main(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::FMatrixBase::Set(), BIAS::EMatrixBase::Set(), BIAS::RigParameter::SetData_DummyRig(), and BIAS::EuclideanTransf3D::SetXYZ().

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::RMatrixBase::SetZYX ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline, inherited]

Definition at line 115 of file RMatrixBase.hh.

void RMatrixBase::SetZYX | ( | ROTATION_MATRIX_TYPE | PhiX,
 |  | ROTATION_MATRIX_TYPE | PhiY,
 |  | ROTATION_MATRIX_TYPE | PhiZ
 | ) | [inherited]

angles in rad, either: order 1.

z, 2. y, 3. x and moving axes or: order 1. x, 2. y, 3. z and fixed axes angles are measured in mathematical sense (anticlockwise), i.e. Set(x, 0, 0) results in the following matrix | 1 0 0 | | 0 cos(x) -sin(x) | | 0 sin(x) cos(x) |

(*this) = Rz*Ry*Rx =

| c(y)c(z) s(x)s(y)c(z)-c(x)s(z) c(x)s(y)c(z)+s(x)s(z) | | c(y)s(z) s(x)s(y)s(z)+c(x)c(z) c(x)s(y)s(z)-s(x)s(z) | | -s(y) s(x)c(y) c(x)c(y) |

with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ

Author:
frahm ,woelk

Definition at line 100 of file RMatrixBase.cpp.

References BIAS::Matrix3x3< T >::SetIdentity().

Referenced by main().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Sub | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SubIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SubIP ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Transpose ( const Matrix3x3< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::TransposedMult | ( | const Vector3< ROTATION_MATRIX_TYPE > & | argvec,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

bool BIASGeometryBase_EXPORT operator== | ( | const RMatrixBase & | left,
 |  | const RMatrixBase & | right
 | ) | [friend, inherited]

Definition at line 322 of file RMatrixBase.cpp.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Geometry/RMatrix.hh
  • Geometry/RMatrix.cpp
Generated on Wed Jun 21 19:10:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::RMatrixBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::RMatrixBase

BIAS::RMatrixBase Class Reference
[Geometry and Transformations]

3D rotation matrix More...

#include <Base/Geometry/RMatrixBase.hh>

Inheritance diagram for BIAS::RMatrixBase:

[legend]
Collaboration diagram for BIAS::RMatrixBase:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

void | Add (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
addition function, storing data destination matrix
void | AddIP (const Matrix< ROTATION_MATRIX_TYPE > &arg)
Adds arg to this.
void | AddIP (const ROTATION_MATRIX_TYPE &scalar)
in place addition function
bool | BinRead (const char *filename) const
This method reads a matrix from a given file in binary format.
bool | BinWrite (const char *filename) const
This method writes a matrix to a given file in binary format.
ROTATION_MATRIX_TYPE | det () const
calculate the determinante
Subscript | dim (Subscript d) const
void | Divide (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
division function, storing data destination matrix
void | DivideIP (const ROTATION_MATRIX_TYPE &scalar)
in place division function
void | Fill (const ROTATION_MATRIX_TYPE &scalar)
Takes the elements of a Vector and put them as diagonal elements into a matrix.
Vector< ROTATION_MATRIX_TYPE > | GetCol (const int &col) const
return a copy of column "col", zero based counting
unsigned int | GetCols () const
BIAS::Vector3< ROTATION_MATRIX_TYPE > | GetColumn (const unsigned int col) const
extract one column ('Spalte') from this matrix (for convenience) JW
ROTATION_MATRIX_TYPE * | GetData () const
get the pointer to the data array of the matrix (for faster direct memeory access)
ROTATION_MATRIX_TYPE ** | GetDataArray () const
returns zero based arry for data access
ROTATION_MATRIX_TYPE ** | GetDataArray1 () const
returns 1 based array to data access
ROTATION_MATRIX_TYPE * | GetDataLast () const
Get a pointer to the last data element.
ROTATION_MATRIX_TYPE | GetDeterminant () const
returns the Determinant |A| of this
ROTATION_MATRIX_TYPE | GetMax () const
Returns the maximum value of the matrix elements.
void | GetMaxMin (ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const
return biggest and smallest entry
ROTATION_MATRIX_TYPE | GetMean () const
Returns the mean value of the matrix elements.
ROTATION_MATRIX_TYPE | GetMin () const
Returns the minimum value of the matrix elements.
int | GetNumElements () const
Returns the total number of elements.
int | GetQuaternion (Quaternion< ROTATION_MATRIX_TYPE > &quat) const
calculates the quaternion from a rotation matrix
int | GetRotationAnglesXYZ (Vector3< ROTATION_MATRIX_TYPE > &r)
int | GetRotationAnglesXYZ (double &PhiX, double &PhiY, double &PhiZ)
not unique, has singularities at +- pi/2 assumes (*this) = Rx * Ry * Rz, i.e.
int | GetRotationAnglesZYX (Vector3< ROTATION_MATRIX_TYPE > &r)
int | GetRotationAnglesZYX (double &PhiX, double &PhiY, double &PhiZ)
not unique, has singularities at +- pi/2 assumes (*this) = Rz * Ry * Rx, i.e.
int | GetRotationAxisAngle (Vector3< ROTATION_MATRIX_TYPE > &w) const
calculates a angle * axis for the given rotation
int | GetRotationAxisAngle (Vector3< ROTATION_MATRIX_TYPE > &Axis, ROTATION_MATRIX_TYPE &Angle) const
calculates an angle and a axis for the given rotation angle is returned in rad
Vector< ROTATION_MATRIX_TYPE > | GetRow (const int &row) const
return a copy of row "row" of this matrix, zero based counting
Vector3< ROTATION_MATRIX_TYPE > | GetRow (const unsigned int row) const
void | GetRow (const unsigned int row, Vector3< ROTATION_MATRIX_TYPE > &r) const
extract one row ('Zeile') from ths matrix (for convenience) JW
unsigned int | GetRows () const
void | GetSystemMatrix (Matrix< ROTATION_MATRIX_TYPE > &dest) const
compute square system matrix dest = A^T * A
int | Invert (Matrix3x3< ROTATION_MATRIX_TYPE > &inv) const
Matrix inversion: inverts this and stores resulty in argument inv.
Matrix3x3< ROTATION_MATRIX_TYPE > | Invert () const
Complete inversion.
int | InvertIP ()
In place matrix conversion.
bool | IsIdentity (double eps=0.0) const
Checks if the matrix a an identity.
bool | IsZero (double eps=0.0) const
Checks if the matrix is a null matrix.
Subscript | lbound () const
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogK (const std::string &filename)
reads the internal KMatrix part of a BOG file
int | LoadBogRC (const std::string &filename)
reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.
Matrix (const TNT::Matrix< ROTATION_MATRIX_TYPE > &A)
Matrix (const Matrix< ROTATION_MATRIX_TYPE > &A)
Matrix (const int rows, const int cols, const std::string &s)
replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")
Matrix (int rows, int cols, const MatrixInitType &i)
init with standard form
Matrix (int rows, int cols, const ROTATION_MATRIX_TYPEvalue)
assignment with a constant values for all elements (=set)
Matrix (int rows, int cols)
Matrix ()
Matrix3x3 (const TNT::Matrix< ROTATION_MATRIX_TYPE > &A)
cast constructor from TNT::Matrix
Matrix3x3 (const Matrix< ROTATION_MATRIX_TYPE > &A)
cast constructor from Matrix
Matrix3x3 (const Matrix3x3< ROTATION_MATRIX_TYPE > &A)
Matrix3x3 (const MatrixInitType &i)
init matrix with identity or zero
Matrix3x3 (const ROTATION_MATRIX_TYPEa0, const ROTATION_MATRIX_TYPEa1, const ROTATION_MATRIX_TYPEa2, const ROTATION_MATRIX_TYPEa3, const ROTATION_MATRIX_TYPEa4, const ROTATION_MATRIX_TYPEa5, const ROTATION_MATRIX_TYPEa6, const ROTATION_MATRIX_TYPEa7, const ROTATION_MATRIX_TYPEa8)
Set the matrix values JW.
Matrix3x3 (const std::string &s)
JW.
Matrix3x3 ()
default constructor untested
void | MaxMin (ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const
return biggest and smallest entry
void | Mult (const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const
matrix vector multiplication, result is not allocated
void | Mult (const Matrix< ROTATION_MATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = M * arg, but faster
void | Mult (const Matrix< ROTATION_MATRIX_TYPE > &arg, Matrix< ROTATION_MATRIX_TYPE > &result) const
matrix multiplication, result is not allocated
void | Mult (const Matrix3x4< ROTATION_MATRIX_TYPE > &argmat, Matrix3x4< ROTATION_MATRIX_TYPE > &destmat) const
void | Mult (const Matrix3x3< ROTATION_MATRIX_TYPE > &argmat, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const
matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat
void | Mult (const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec
void | Multiply (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
multiplication function, storing data destination matrix
void | MultiplyIP (const ROTATION_MATRIX_TYPE &scalar)
in place multiplication function
void | MultLeft (const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const
vector matrix multiplication result=arg*this.
void | MultLeft (const Matrix< ROTATION_MATRIX_TYPE > &arg)
in Place matrix multiplication this is equal to M = arg*M, but faster
Matrix< T > & | newsize (Subscript M, Subscript N)
Matrix3x3 & | newsize (int rows, int cols)
just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.
ROTATION_MATRIX_TYPE | Normalize ()
Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void NormalizeCols ()
Normalizes each coloumn to L_2 norm one.
void | NormalizeColsToOne (const int norm_row_index)
divides each column of the matrix through the element norm_row_index.
void NormalizeRows ()
Normalizes each row to L2 norm one.
void | NormalizeRowsToOne (const int norm_col_index)
divides each row of the matrix through the element norm_col_index.
ROTATION_MATRIX_TYPE | NormFrobenius () const
Return Frobenius norm = sqrt(trace(A^t * A)).
ROTATION_MATRIX_TYPE | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
ROTATION_MATRIX_TYPE | NormL2 () const
Return the L2 norm: a^2 + b^2 + c^2 + .
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
reference | operator() (Subscript i, Subscript j)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
RMatrixBase & | operator= (const RMatrixBase &mat)
const T * | operator[] (Subscript i) const
T * | operator[] (Subscript i)
RMatrixBase (const Matrix3x3< ROTATION_MATRIX_TYPE > &mat)
RMatrixBase (const TNT::Matrix< ROTATION_MATRIX_TYPE > &r)
RMatrixBase (Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi)
initialization from rotation axis w and angle phi (Rodriguez)
RMatrixBase (const RMatrixBase &r)
copy constructor
RMatrixBase (const MatrixInitType &i)
constructor setting identity or zero author koeser
RMatrixBase ()
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | Scale (const ROTATION_MATRIX_TYPE &scalar, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const
scalar-matrix multiplication
void | ScaleCol (int NoCol, ROTATION_MATRIX_TYPEscale)
Scales column NoCol with scale.
void | ScaleRow (int NoRow, ROTATION_MATRIX_TYPEscale)
Scales row NoRow with scale.
int | Set (Quaternion< ROTATION_MATRIX_TYPE > &q)
old Set(Quat) function, which now reports an error ( to find all places calling it and remove deprecated Transpose() )
void | Set (Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi)
initialize from vector and angle remark: Axis vector w must be an unit vector (||w||==1, within epsilon environment of magnitude 1e-6).
void | SetAsCrossProductMatrix (const ROTATION_MATRIX_TYPE &x, const ROTATION_MATRIX_TYPE &y, const ROTATION_MATRIX_TYPE &z)
Sets matrix from vector as cross product matrix of a vector.
void | SetAsCrossProductMatrix (const Vector3< ROTATION_MATRIX_TYPE > &vec)
Sets matrix from vector as cross product matrix of this vector.
void | SetCol (const int row, const Vector< ROTATION_MATRIX_TYPE > &data)
set a col of matrix from vector
void | SetFromAxisAngle (Vector3< ROTATION_MATRIX_TYPE > w)
initialize from vector * angle (axis _times_ angle !)
void | SetFromColumnVectors (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2)
set this matrix from 3 vectors each representating a column JW 07/2003
void | SetFromHV (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xh, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &vy)
set rotation matrix from two vectors.
int | SetFromOriUpGL (BIAS::Vector3< ROTATION_MATRIX_TYPE > ori, BIAS::Vector3< ROTATION_MATRIX_TYPE > up)
Set Rotation matrix from orientation and up vector openGL conform, similar to gluLookAt().
void | SetFromOrthogonalBasis (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xxx, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &yyy, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &zzz)
int | SetFromQuaternion (const Quaternion< ROTATION_MATRIX_TYPE > &q)
Set RMatrix from a quternion.
void | SetFromRowVectors (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2)
set this matrix from 3 vectors, each representating a row JW 07/2003
void | SetFromVector (const TNT::Vector< ROTATION_MATRIX_TYPE > &vec)
sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector
void SetIdentity ()
set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)
void | SetRow (const int row, const Vector< ROTATION_MATRIX_TYPE > &data)
set a row of matrix from vector
void | SetXYZ (Vector3< ROTATION_MATRIX_TYPE > &r)
void | SetXYZ (ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
angles in rad, either: order 1.
void SetZero ()
Sets all values to zero.
void | SetZYX (Vector3< ROTATION_MATRIX_TYPE > &r)
void | SetZYX (ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
angles in rad, either: order 1.
Subscript | size () const
void | Sub (const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const
substraction function, storing data destination matrix
void | SubIP (const ROTATION_MATRIX_TYPE &scalar)
in place subtraction function
void | SubIP (const Matrix< ROTATION_MATRIX_TYPE > &arg)
Subtracts arg from this
this -= arg.
ROTATION_MATRIX_TYPE | Trace () const
return the trace of the matrix
void | Transpose (const Matrix3x3< ROTATION_MATRIX_TYPE > &arg)
sets this as transposed arg, fw
Matrix3x3< ROTATION_MATRIX_TYPE > | Transpose () const
returns transposed matrix tested 12.06.2002
void | TransposedMult (const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const
multiplies matrix from left with transposed argvec, resulting in transposed destvec
void TransposeIP ()
tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8
virtual | ~RMatrixBase ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript M, Subscript N)
void | set (const T &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
T ** row_
T ** rowm1_
T * v_
T * vm1_

Friends

bool BIASGeometryBase_EXPORT | operator== (const RMatrixBase &left, const RMatrixBase &right)

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &A, const Vector< T > &x)
Matrix< T > | operator * (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B)
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream & | operator>> (std::istream &s, Matrix< T > &A)

Detailed Description

3D rotation matrix

Author:
frahm, woelk

Definition at line 48 of file RMatrixBase.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Matrix< T >::const_iterator [inherited]

Definition at line 68 of file cmat.h.

template<class T>
typedef const T& TNT::Matrix< T >::const_reference [inherited]

Definition at line 69 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::element_type [inherited]

Definition at line 64 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::iterator [inherited]

Definition at line 66 of file cmat.h.

template<class T>
typedef T* TNT::Matrix< T >::pointer [inherited]

Definition at line 65 of file cmat.h.

template<class T>
typedef T& TNT::Matrix< T >::reference [inherited]

Definition at line 67 of file cmat.h.

template<class T>
typedef Subscript TNT::Matrix< T >::size_type [inherited]

Definition at line 62 of file cmat.h.

template<class T>
typedef T TNT::Matrix< T >::value_type [inherited]

Definition at line 63 of file cmat.h.

Constructor & Destructor Documentation

BIAS::RMatrixBase::RMatrixBase ( ) [inline]

Definition at line 51 of file RMatrixBase.hh.

Referenced by Set().

BIAS::RMatrixBase::RMatrixBase ( const MatrixInitType & i ) [inline, explicit]

constructor setting identity or zero author koeser

Definition at line 56 of file RMatrixBase.hh.

RMatrixBase::RMatrixBase ( const RMatrixBase & r )

copy constructor

Definition at line 50 of file RMatrixBase.cpp.

RMatrixBase::RMatrixBase | ( | Vector3< ROTATION_MATRIX_TYPE > | w,
 |  | ROTATION_MATRIX_TYPE | phi
 | ) |

initialization from rotation axis w and angle phi (Rodriguez)

Definition at line 130 of file RMatrixBase.cpp.

References Set().

RMatrixBase::RMatrixBase ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & r ) [explicit]

Definition at line 54 of file RMatrixBase.cpp.

References BIASERR, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

RMatrixBase::~RMatrixBase ( ) [virtual]

Definition at line 63 of file RMatrixBase.cpp.

BIAS::RMatrixBase::RMatrixBase ( const Matrix3x3< ROTATION_MATRIX_TYPE > & mat ) [inline]

Definition at line 69 of file RMatrixBase.hh.

Member Function Documentation

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Add | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

implementation

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::AddIP ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

Adds arg to this.

Author:
grest,2004

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::AddIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 248 of file Matrix.hh.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::BinRead ( const char * filename ) const [inherited]

This method reads a matrix from a given file in binary format.

The file is not human read-/editable but provides full precision. A dimension check is performed.

Returns:
true on success
Author:
mdunda 04 2004

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::BinWrite ( const char * filename ) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004

template<class T>
void TNT::Matrix< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 112 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

template<class T>
void TNT::Matrix< T >::destroy ( ) [inline, protected, inherited]

Definition at line 169 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::newsize(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::~Matrix().

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::det ( ) const [inline, inherited]

calculate the determinante

Author:
Ingo Thomsen alpha (04/17/2002)

template<class T>
Subscript TNT::Matrix< T >::dim ( Subscript d ) const [inline, inherited]

Definition at line 291 of file cmat.h.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Divide | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::DivideIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 314 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Fill ( const ROTATION_MATRIX_TYPE & scalar ) [inherited]

Takes the elements of a Vector and put them as diagonal elements into a matrix.

The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero

Author:
Ingo Thomsen
Parameters:
zero_others Must be true, if all non-diagonal elements shall be set to zero

Vector<ROTATION_MATRIX_TYPE > BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetCol ( const int & col ) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel

unsigned int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 163 of file Matrix.hh.

BIAS::Vector3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetColumn ( const unsigned int col ) const [inherited]

extract one column ('Spalte') from this matrix (for convenience) JW

ROTATION_MATRIX_TYPE * BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetData ( ) const [inline, inherited]

get the pointer to the data array of the matrix (for faster direct memeory access)

the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 150 of file Matrix.hh.

ROTATION_MATRIX_TYPE ** BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 154 of file Matrix.hh.

ROTATION_MATRIX_TYPE ** BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 158 of file Matrix.hh.

ROTATION_MATRIX_TYPE * BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetDataLast ( ) const [inline, inherited]

Get a pointer to the last data element.

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 168 of file Matrix.hh.

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetDeterminant ( ) const [inherited]

returns the Determinant |A| of this

Author:
grest

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMaxMin | ( | ROTATION_MATRIX_TYPE & | max,
 |  | ROTATION_MATRIX_TYPE & | min
 | ) | const [inherited]

return biggest and smallest entry

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMean ( ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 191 of file Matrix.hh.

int RMatrixBase::GetQuaternion ( Quaternion< ROTATION_MATRIX_TYPE > & quat ) const

calculates the quaternion from a rotation matrix

Author:
woelk 12 2003

Definition at line 185 of file RMatrixBase.cpp.

References BIASERR, MAX_QUATERNION_COS_ERROR, res, and tr.

Referenced by GetRotationAxisAngle(), BIAS::PMDImageProc::PoseFromMeta(), BIAS::SimilarityTransform::SetR(), BIAS::ProjectionParametersBase::SetR(), and BIAS::CoordinateTransform3D::SetR().

int BIAS::RMatrixBase::GetRotationAnglesXYZ ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline]

Definition at line 206 of file RMatrixBase.hh.

int RMatrixBase::GetRotationAnglesXYZ | ( | double & | PhiX,
 |  | double & | PhiY,
 |  | double & | PhiZ
 | ) |

not unique, has singularities at +- pi/2 assumes (*this) = Rx * Ry * Rz, i.e.

either: order 1. x, 2. y, 3. z and moving axes or: order 1. z, 2. y, 3. x and fixed axes

Author:
woelk 01 2003

Definition at line 280 of file RMatrixBase.cpp.

Referenced by main().

int BIAS::RMatrixBase::GetRotationAnglesZYX ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline]

Definition at line 216 of file RMatrixBase.hh.

int RMatrixBase::GetRotationAnglesZYX | ( | double & | PhiX,
 |  | double & | PhiY,
 |  | double & | PhiZ
 | ) |

not unique, has singularities at +- pi/2 assumes (*this) = Rz * Ry * Rx, i.e.

either: order 1. x, 2. y, 3. z and fixed axes or: order 1. z, 2. y, 3. x and moving axes

Author:
woelk 01 2003

Definition at line 299 of file RMatrixBase.cpp.

Referenced by main().

int RMatrixBase::GetRotationAxisAngle ( Vector3< ROTATION_MATRIX_TYPE > & w ) const

calculates a angle * axis for the given rotation

Author:
evers

Definition at line 265 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), GetQuaternion(), and BIAS::Vector3< T >::Normalize().

int RMatrixBase::GetRotationAxisAngle | ( | Vector3< ROTATION_MATRIX_TYPE > & | Axis,
 |  | ROTATION_MATRIX_TYPE & | Angle
 | ) | const

calculates an angle and a axis for the given rotation angle is returned in rad

Author:
woelk 12 2003

Definition at line 255 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), and GetQuaternion().

Referenced by BIAS::ThreeDOut::AddEllipsoid(), BIAS::SimilarityTransform::Dump(), BIAS::RMatrix::GetAverageRMatrix(), main(), BIAS::Projection3DData::Set(), BIAS::CoordinateTransform3D::Talk(), and BIAS::ThreeDOut::UpdateEllipsoid().

Vector<ROTATION_MATRIX_TYPE > BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRow ( const int & row ) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel

Vector3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetRow ( const unsigned int row ) const [inline, inherited]

Definition at line 186 of file Matrix3x3.hh.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::GetRow | ( | const unsigned int | row,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | r
 | ) | const [inherited]

extract one row ('Zeile') from ths matrix (for convenience) JW

unsigned int BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 161 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetSystemMatrix ( Matrix< ROTATION_MATRIX_TYPE > & dest ) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
dest holds result of this->Transpose * this
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
Author:
grest/koeser

template<class T>
void TNT::Matrix< T >::initialize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, protected, inherited]

Definition at line 85 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::newsize(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Invert ( Matrix3x3< ROTATION_MATRIX_TYPE > & inv ) const [inherited]

Matrix inversion: inverts this and stores resulty in argument inv.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

Matrix3x3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Invert ( ) const [inherited]

Complete inversion.

Author:
Jan-Friso Evers-Senne 2002-08-27

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::InvertIP ( ) [inherited]

In place matrix conversion.

Returns -1 if determinant is zero, 0 on success.

Author:
woelk 07/2005

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::IsIdentity ( double eps = 0.0 ) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::IsZero ( double eps = 0.0 ) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero

template<class T>
Subscript TNT::Matrix< T >::lbound ( ) const [inline, inherited]

Definition at line 71 of file cmat.h.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::Load ( const std::string & filename ) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::LoadBogK ( const std::string & filename ) [inherited]

reads the internal KMatrix part of a BOG file

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

int BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::LoadBogRC ( const std::string & filename ) [inherited]

reads the RC part of a BOG file which is used by Daimler Chrysler for storing camera orientation/rotation.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005
Todo:
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW
Examples:
ExampleLoadBOG.cpp.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 126 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( const Matrix< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel

Definition at line 123 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | const int | rows,
 |  | const int | cols,
 |  | const std::string & | s
 | ) | [explicit, inherited]

replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6")

Author:
Jan Woetzel

Jan Woetzel

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const MatrixInitType & | i
 | ) | [inline, inherited]

init with standard form

Author:
koeser

Definition at line 99 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols,
 |  | const ROTATION_MATRIX_TYPE | value
 | ) | [inline, inherited]

assignment with a constant values for all elements (=set)

Author:
Jan Woetzel

Definition at line 94 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix | ( | int | rows,
 |  | int | cols
 | ) | [inline, inherited]

Author:
Jan Woetzel

Definition at line 90 of file Matrix.hh.

BIAS::Matrix< ROTATION_MATRIX_TYPE >::Matrix ( ) [inline, inherited]

Reimplemented from TNT::Matrix< T >.

Definition at line 84 of file Matrix.hh.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const TNT::Matrix< ROTATION_MATRIX_TYPE > & A ) [inherited]

cast constructor from TNT::Matrix

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const Matrix< ROTATION_MATRIX_TYPE > & A ) [inherited]

cast constructor from Matrix

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const Matrix3x3< ROTATION_MATRIX_TYPE > & A ) [inline, inherited]

Author:
Jan Woetzel untested (04/17/2002)

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const MatrixInitType & i ) [inline, explicit, inherited]

init matrix with identity or zero

Author:
koeser

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 | ( | const ROTATION_MATRIX_TYPE | a0,
 |  | const ROTATION_MATRIX_TYPE | a1,
 |  | const ROTATION_MATRIX_TYPE | a2,
 |  | const ROTATION_MATRIX_TYPE | a3,
 |  | const ROTATION_MATRIX_TYPE | a4,
 |  | const ROTATION_MATRIX_TYPE | a5,
 |  | const ROTATION_MATRIX_TYPE | a6,
 |  | const ROTATION_MATRIX_TYPE | a7,
 |  | const ROTATION_MATRIX_TYPE | a8
 | ) | [inherited]

Set the matrix values JW.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( const std::string & s ) [explicit, inherited]

JW.

BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Matrix3x3 ( ) [inline, inherited]

default constructor untested

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::MaxMin | ( | ROTATION_MATRIX_TYPE & | max,
 |  | ROTATION_MATRIX_TYPE & | min
 | ) | const [inline, inherited]

return biggest and smallest entry

Author:
woelk 08/2004

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult | ( | const Vector< ROTATION_MATRIX_TYPE > & | arg,
 |  | Vector< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix< ROTATION_MATRIX_TYPE > & | arg,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix3x4< ROTATION_MATRIX_TYPE > & | argmat,
 |  | Matrix3x4< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

Author:
woelk 06 2003

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Matrix3x3< ROTATION_MATRIX_TYPE > & | argmat,
 |  | Matrix3x3< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

matrix-matrix multiplication with other Matrix3x3, storing the result in destmat calculates: destmat = (this mat) * argmat

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Mult | ( | const Vector3< ROTATION_MATRIX_TYPE > & | argvec,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: destvec = (this Matrix) * argvec

Author:
Ingo Thomsen, Jan Woetzel untested (04/17/2002)

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Multiply | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultiplyIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 281 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultLeft | ( | const Vector< ROTATION_MATRIX_TYPE > & | arg,
 |  | Vector< ROTATION_MATRIX_TYPE > & | result
 | ) | const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::MultLeft ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest

template<class T>
Matrix<T>& TNT::Matrix< T >::newsize | ( | Subscript | M,
 |  | Subscript | N
 | ) | [inline, inherited]

Definition at line 250 of file cmat.h.

Referenced by BIAS::Matrix< T >::Add(), BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Fortran_Matrix_to_Matrix(), GetSystem(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Interpolator::Interpolator(), main(), TNT::matmult(), BIAS::Matrix< T >::Multiply(), MyConstTransform(), MyLinTransform(), BIAS::RegionMatcher::NCC(), TNT::Matrix< T >::operator>>(), BIAS::PlaneRANSAC::RefineSolution(), BIAS::RegionMatcher::RegionMatcher(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::TrackerBaseInterface< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::Resize_(), set_example_designmatrix(), BIAS::Matrix< T >::Sub(), BIAS::SVD3x3::SVD3x3(), BIAS::TrackerBase< StorageType >::Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::UnscentedTransform::Transform(), and BIAS::LeastSquaresLapack::WeightedSolve().

Matrix3x3& BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::newsize | ( | int | rows,
 |  | int | cols
 | ) | [inherited]

just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from the resizable Matrix should be removed when Matrix3x3 becomes a base class.

(04/17/2002) Jan Woetzel

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeColsToOne ( const int norm_row_index ) [inherited]

divides each column of the matrix through the element norm_row_index.

index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormalizeRowsToOne ( const int norm_col_index ) [inherited]

divides each row of the matrix through the element norm_col_index.

index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormFrobenius ( ) const [inline, inherited]

Return Frobenius norm = sqrt(trace(A^t * A)).

Author:
koeser 02/2004

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002 untested

ROTATION_MATRIX_TYPE BIAS::Matrix< ROTATION_MATRIX_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + .

..

Author:
woelk 07/2004

template<class T>
Subscript TNT::Matrix< T >::num_cols ( ) const [inline, inherited]

Definition at line 301 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeColsToOne(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormalizeRowsToOne(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), RMatrixBase(), BIAS::Matrix< T >::ScaleRow(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), TNT::transpose(), BIAS::Kalman::Update(), and Upper_symmetric_eigenvalue_solve().

template<class T>
Subscript TNT::Matrix< T >::num_rows ( ) const [inline, inherited]

Definition at line 300 of file cmat.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::SVD3x3::Compute(), BIAS::FilterMask::CreateFloatFilter(), BIAS::FilterMask::CreateIntFilter(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), Fortran_Matrix_to_Matrix(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), General_singular_value_decomposition(), BIAS::Matrix< T >::GetCol(), BIAS::SVD::GetLeftNullvector(), BIAS::Matrix< T >::GetRow(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Matrix< T >::IsIdentity(), BIAS::Matrix< double >::IsIdentity(), BIAS::Matrix< T >::IsZero(), BIAS::Matrix< double >::IsZero(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< PMATRIX_TYPE >::newsize(), BIAS::Matrix< T >::Normalize(), BIAS::Matrix< T >::NormalizeCols(), BIAS::Matrix< T >::NormalizeRows(), BIAS::Matrix< T >::NormFrobenius(), BIAS::Vector4< T >::operator *(), BIAS::Vector3< T >::operator *(), BIAS::Vector< T >::operator *(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix4x4< T >::operator=(), BIAS::Matrix3x4< T >::operator=(), TNT::Matrix< T >::operator>>(), BIAS::operator>>(), BIAS::PMatrix::PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Kalman::Predict(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::RMatrix::RMatrix(), RMatrixBase(), BIAS::Matrix< T >::ScaleCol(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::PoseParametrizationCovariance::SetFromEulerAngles(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::Matrix< T >::Trace(), TNT::transpose(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

template<class T>
const_reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline, inherited]

Definition at line 357 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | [inline, inherited]

Definition at line 344 of file cmat.h.

template<class T>
const_reference TNT::Matrix< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 333 of file cmat.h.

template<class T>
reference TNT::Matrix< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 324 of file cmat.h.

RMatrixBase & RMatrixBase::operator= ( const RMatrixBase & mat )

Definition at line 316 of file RMatrixBase.cpp.

References BIAS::Matrix< ROTATION_MATRIX_TYPE >::operator=().

template<class T>
const T* TNT::Matrix< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 315 of file cmat.h.

template<class T>
T* TNT::Matrix< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 306 of file cmat.h.

bool BIAS::Matrix< ROTATION_MATRIX_TYPE >::Save ( const std::string & filename ) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Scale | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix3x3< ROTATION_MATRIX_TYPE > & | destmat
 | ) | const [inline, inherited]

scalar-matrix multiplication

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::ScaleCol | ( | int | NoCol,
 |  | ROTATION_MATRIX_TYPE | scale
 | ) | [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::ScaleRow | ( | int | NoRow,
 |  | ROTATION_MATRIX_TYPE | scale
 | ) | [inherited]

Scales row NoRow with scale.

template<class T>
void TNT::Matrix< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 140 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::Matrix(), and TNT::Matrix< PMATRIX_TYPE >::operator=().

int RMatrixBase::Set ( Quaternion< ROTATION_MATRIX_TYPE > & q )

old Set(Quat) function, which now reports an error ( to find all places calling it and remove deprecated Transpose() )

Author:
evers

Definition at line 365 of file RMatrixBase.cpp.

References BIASABORT, and BIASERR.

void RMatrixBase::Set | ( | Vector3< ROTATION_MATRIX_TYPE > | w,
 |  | ROTATION_MATRIX_TYPE | phi
 | ) |

initialize from vector and angle remark: Axis vector w must be an unit vector (||w||==1, within epsilon environment of magnitude 1e-6).

If compiled with BIAS_DEBUG, this condition will be checked and BIASABORT is called on failure. - cbuck

Author:
evers

Definition at line 137 of file RMatrixBase.cpp.

References BIASABORT, BIASERR, BIAS::Vector3< T >::NormL2(), RMatrixBase(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::RMatrix::GetAverageRMatrix(), main(), BIAS::PMatrixBase::Parametrization2R_(), RMatrixBase(), and SetFromAxisAngle().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetAsCrossProductMatrix | ( | const ROTATION_MATRIX_TYPE & | x,
 |  | const ROTATION_MATRIX_TYPE & | y,
 |  | const ROTATION_MATRIX_TYPE & | z
 | ) | [inline, inherited]

Sets matrix from vector as cross product matrix of a vector.

with components (x, y, z)

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetAsCrossProductMatrix ( const Vector3< ROTATION_MATRIX_TYPE > & vec ) [inline, inherited]

Sets matrix from vector as cross product matrix of this vector.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetCol | ( | const int | row,
 |  | const Vector< ROTATION_MATRIX_TYPE > & | data
 | ) | [inherited]

set a col of matrix from vector

Author:
woelk 08/2004

void RMatrixBase::SetFromAxisAngle ( Vector3< ROTATION_MATRIX_TYPE > w )

initialize from vector * angle (axis _times_ angle !)

Author:
evers

Definition at line 173 of file RMatrixBase.cpp.

References MINIMUM_ROTATION, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and Set().

Referenced by BIAS::PMDImageProc::HFromMeta_(), BIAS::PMatrixBase::Parametrization2R_(), and BIAS::PMDImageProc::PoseFromMeta().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromColumnVectors | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors each representating a column JW 07/2003

Referenced by SetFromOriUpGL().

void RMatrixBase::SetFromHV | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | xh,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | vy
 | ) |

set rotation matrix from two vectors.

form an orthonormalbasis. xh represent the first base vector and is left unchanged. You can think of this routine as compute R from an image plane given by two (usually orthogonal) base vectors. if the given base vecctors are not orthogonal xh is kept and yv is orthogonalized appropriately.

Author:
Jan Woetzel

Definition at line 387 of file RMatrixBase.cpp.

int RMatrixBase::SetFromOriUpGL | ( | BIAS::Vector3< ROTATION_MATRIX_TYPE > | ori,
 |  | BIAS::Vector3< ROTATION_MATRIX_TYPE > | up
 | ) |

Set Rotation matrix from orientation and up vector openGL conform, similar to gluLookAt().

openGL like means: if ori is (0,0,-1) and up:(0,1,0) the resulting matrix is the identity

Author:
grest, Dec. 2005

Definition at line 407 of file RMatrixBase.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromColumnVectors().

void RMatrixBase::SetFromOrthogonalBasis | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | xxx,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | yyy,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | zzz
 | ) |

Definition at line 375 of file RMatrixBase.cpp.

References BIAS::Vector3< T >::GetNormalized(), and BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromRowVectors().

int RMatrixBase::SetFromQuaternion ( const Quaternion< ROTATION_MATRIX_TYPE > & q )

Set RMatrix from a quternion.

Author:
Daniel Grest, June2003

Definition at line 336 of file RMatrixBase.cpp.

References BIAS::Quaternion< QUAT_TYPE >::Normalize().

Referenced by BIAS::SimilarityTransform::Dump(), ErrorFunction(), BIAS::SimilarityTransform::GetMatrix(), BIAS::SimilarityTransform::GetR(), BIAS::ProjectionParametersBase::GetR(), BIAS::CoordinateTransform3D::GetR(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::Projection3DData::Set(), BIAS::CoordinateTransform3D::Talk(), and BIAS::CoordinateTransform3D::UpdateMatrix_().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromRowVectors | ( | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v0,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v1,
 |  | const BIAS::Vector3< ROTATION_MATRIX_TYPE > & | v2
 | ) | [inherited]

set this matrix from 3 vectors, each representating a row JW 07/2003

Referenced by SetFromOrthogonalBasis().

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetFromVector ( const TNT::Vector< ROTATION_MATRIX_TYPE > & vec ) [inherited]

sets the diagonalelements of this 3x3 Matrix rowwise with the values of the 9 (x1) vector

Author:
Ingo Thomsen, Jan Woetzel

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::SetIdentity ( ) [inline, inherited]

set the elements of this matrix to teh identity matrix (posisbly overriding the inherited method)

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/17/2002 untested

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetRow | ( | const int | row,
 |  | const Vector< ROTATION_MATRIX_TYPE > & | data
 | ) | [inherited]

set a row of matrix from vector

Author:
woelk 08/2004

void BIAS::RMatrixBase::SetXYZ ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline]

Definition at line 92 of file RMatrixBase.hh.

void RMatrixBase::SetXYZ | ( | ROTATION_MATRIX_TYPE | PhiX,
 |  | ROTATION_MATRIX_TYPE | PhiY,
 |  | ROTATION_MATRIX_TYPE | PhiZ
 | ) |

angles in rad, either: order 1.

z, 2. y, 3. x and fixed axes or: order 1. x, 2. y, 3. z and moving axes angles are measured in mathematical sense (anticlockwise), i.e. Set(x, 0, 0) results in the following matrix | 1 0 0 | | 0 cos(x) -sin(x) | | 0 sin(x) cos(x) |

(*this) = Rx*Ry*Rz =

| c(y)c(z) -c(y)s(z) s(y) | | c(z)s(x)s(y)+c(x)s(z) c(x)c(z)-s(x)s(y)s(z) -c(y)s(x) | | -c(x)c(z)s(y)+s(x)s(z) c(z)s(x)+c(x)s(y)s(z) c(x)x(y) |

with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ

Author:
frahm ,woelk

Definition at line 67 of file RMatrixBase.cpp.

References BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), CreateMatches2(), BIAS::GenSynthMatches::GetGTNormalizedF(), main(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey(), BIAS::FMatrixBase::Set(), BIAS::EMatrixBase::Set(), BIAS::RigParameter::SetData_DummyRig(), and BIAS::EuclideanTransf3D::SetXYZ().

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

void BIAS::RMatrixBase::SetZYX ( Vector3< ROTATION_MATRIX_TYPE > & r ) [inline]

Definition at line 115 of file RMatrixBase.hh.

void RMatrixBase::SetZYX | ( | ROTATION_MATRIX_TYPE | PhiX,
 |  | ROTATION_MATRIX_TYPE | PhiY,
 |  | ROTATION_MATRIX_TYPE | PhiZ
 | ) |

angles in rad, either: order 1.

z, 2. y, 3. x and moving axes or: order 1. x, 2. y, 3. z and fixed axes angles are measured in mathematical sense (anticlockwise), i.e. Set(x, 0, 0) results in the following matrix | 1 0 0 | | 0 cos(x) -sin(x) | | 0 sin(x) cos(x) |

(*this) = Rz*Ry*Rx =

| c(y)c(z) s(x)s(y)c(z)-c(x)s(z) c(x)s(y)c(z)+s(x)s(z) | | c(y)s(z) s(x)s(y)s(z)+c(x)c(z) c(x)s(y)s(z)-s(x)s(z) | | -s(y) s(x)c(y) c(x)c(y) |

with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ

Author:
frahm ,woelk

Definition at line 100 of file RMatrixBase.cpp.

References BIAS::Matrix3x3< T >::SetIdentity().

Referenced by main().

template<class T>
Subscript TNT::Matrix< T >::size ( ) const [inline, inherited]

Definition at line 193 of file cmat.h.

Referenced by Eigenproblem_quadratic_matrix(), ErrorFunction(), BIAS::Matrix< T >::operator==(), and BIAS::TrackerBase< StorageType >::Track().

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::Sub | ( | const ROTATION_MATRIX_TYPE & | scalar,
 |  | Matrix< ROTATION_MATRIX_TYPE > & | dest
 | ) | const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SubIP ( const ROTATION_MATRIX_TYPE & scalar ) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 270 of file Matrix.hh.

void BIAS::Matrix< ROTATION_MATRIX_TYPE >::SubIP ( const Matrix< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004

ROTATION_MATRIX_TYPE BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Trace ( ) const [inline, inherited]

return the trace of the matrix

Author:
woelk 04/2006

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

Definition at line 233 of file Matrix3x3.hh.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Transpose ( const Matrix3x3< ROTATION_MATRIX_TYPE > & arg ) [inline, inherited]

sets this as transposed arg, fw

Matrix3x3<ROTATION_MATRIX_TYPE > BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::Transpose ( ) const [inherited]

returns transposed matrix tested 12.06.2002

Author:
Felix Woelk

Reimplemented from BIAS::Matrix< ROTATION_MATRIX_TYPE >.

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::TransposedMult | ( | const Vector3< ROTATION_MATRIX_TYPE > & | argvec,
 |  | Vector3< ROTATION_MATRIX_TYPE > & | destvec
 | ) | const [inline, inherited]

multiplies matrix from left with transposed argvec, resulting in transposed destvec

Author:
woelk 05/2003

void BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::TransposeIP ( ) [inline, inherited]

tranpose this matrix "in place" example: 0 1 2 --> 0 3 6 3 4 5 --> 1 4 7 6 7 8 --> 2 5 8

Author:
Jan Woetzel untested (04/17/2002)

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [related, inherited]

Definition at line 636 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator * | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 563 of file cmat.h.

References TNT::matmult().

template<class T>
Matrix< T > operator+ | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 451 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Matrix< T > operator- | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [related, inherited]

Definition at line 473 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
std::ostream & operator<< | ( | std::ostream & | s,
 |  | const Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 398 of file cmat.h.

bool BIASGeometryBase_EXPORT operator== | ( | const RMatrixBase & | left,
 |  | const RMatrixBase & | right
 | ) | [friend]

Definition at line 322 of file RMatrixBase.cpp.

template<class T>
std::istream & operator>> | ( | std::istream & | s,
 |  | Matrix< T > & | A
 | ) | [related, inherited]

Definition at line 420 of file cmat.h.

References M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Member Data Documentation

template<class T>
Subscript TNT::Matrix< T >::m_ [protected, inherited]

Definition at line 74 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_rows(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), TNT::Matrix< PMATRIX_TYPE >::operator[](), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
Subscript TNT::Matrix< T >::mn_ [protected, inherited]

Definition at line 76 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::operator()(), and TNT::Matrix< PMATRIX_TYPE >::size().

template<class T>
Subscript TNT::Matrix< T >::n_ [protected, inherited]

Definition at line 75 of file cmat.h.

Referenced by BIAS::Matrix< T >::BinRead(), BIAS::Matrix< T >::BinWrite(), TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::dim(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), TNT::Matrix< PMATRIX_TYPE >::num_cols(), TNT::Matrix< PMATRIX_TYPE >::operator()(), TNT::Matrix< PMATRIX_TYPE >::operator=(), and TNT::Matrix< PMATRIX_TYPE >::set().

template<class T>
T** TNT::Matrix< T >::row_ [protected, inherited]

Definition at line 78 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::PMatrix::Normalize(), and TNT::Matrix< PMATRIX_TYPE >::operator[]().

template<class T>
T** TNT::Matrix< T >::rowm1_ [protected, inherited]

Definition at line 80 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

template<class T>
T* TNT::Matrix< T >::v_ [protected, inherited]

Definition at line 77 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::copy(), TNT::Matrix< PMATRIX_TYPE >::destroy(), TNT::Matrix< PMATRIX_TYPE >::initialize(), TNT::Matrix< PMATRIX_TYPE >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::Matrix2x2< T >::MultIP(), TNT::Matrix< PMATRIX_TYPE >::operator=(), BIAS::AffineTransf::operator=(), TNT::Matrix< PMATRIX_TYPE >::set(), BIAS::AffineTransf::SetAsRotationMatrix(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix2x2< T >::TransposeIP().

template<class T>
T* TNT::Matrix< T >::vm1_ [protected, inherited]

Definition at line 79 of file cmat.h.

Referenced by TNT::Matrix< PMATRIX_TYPE >::initialize(), and TNT::Matrix< PMATRIX_TYPE >::operator()().

The documentation for this class was generated from the following files:
  • Base/Geometry/RMatrixBase.hh
  • Base/Geometry/RMatrixBase.cpp
Generated on Wed Jun 21 19:10:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ROI Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ROI

BIAS::ROI Class Reference
[Image and Image Base]

class for handling different region of interest (ROI) representations. More...

#include <Base/Image/ROI.hh>

Inheritance diagram for BIAS::ROI:

[legend]
Collaboration diagram for BIAS::ROI:

[legend]
List of all members.

io functions

int | ReadBinary (std::istream &is)
binary input from stream
int | WriteBinary (std::ostream &os) const
binary output to stream
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ROI &roi)
human readable output operator for ROI, mainly for debugging

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
conversion functions
void Corners2Mask ()
Fills mask representation of ROI from corner representation.
void Corners2Vector ()
Fills vector representation of ROI from corner representation.
int | Mask2Corners ()
Fills corner/bounding box representation of ROI from mask representation.
int | Mask2Vector ()
Fills vector representation of ROI from mask representation.
int | Vector2Corners ()
Fills corner/bounding box representation of ROI from vector representation.
int | Vector2Mask ()
Fills vector representation of ROI from mask representation.
access function
void | GetCorners (int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const
Return the region of interest, by saving the coordinates within the variables defined by the parameters.
void | GetCorners (unsigned &UpperLeftX, unsigned &UpperLeftY, unsigned &LowerRightX, unsigned &LowerRightY) const
Return the region of interest, by saving the coordinates within the variables defined by the parameters.
const MASK_TYPE * | GetMaskData () const
Direct pointer to the mask data, const version.
MASK_TYPE * | GetMaskData ()
Direct pointer to the mask data.
const MASK_TYPE ** | GetMaskDataArray () const
Direct pointer to the mask data array, const version.
MASK_TYPE ** | GetMaskDataArray ()
Direct pointer to the mask data array.
unsigned | GetMaskHeight () const
height of mask image
int | GetMaskImage (ImageBase &im) const
returns an image of StorageType unsigned char, where every pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0
unsigned | GetMaskWidth () const
width of mask image
bool | GetVector (std::vector< Position > &vec) const
get a copy of mask vector.
std::vector< Position > * | GetVector ()
returns a pointer to the vector representation of the ROI
bool | IsInROI (const double &x, const double &y) const
ROI check if pixel position is inside the ROI moved here from image base, does only check bounding box roi by now.
int | SetCorners (unsigned UpperLeftX, unsigned UpperLeftY, unsigned LowerRightX, unsigned LowerRightY)
Sets a rectangular region of interest.
int | SetMaskImage (const ImageBase &im)
every pixel with value!=0.0 is in the ROI, every pixel with value==0.0 is not in the ROI
void | SetVector (std::vector< Position > &pos)
Sets MaskValid_=false and VectorValid_=true.
checking
bool | MaskValid () const
is the mask image valid?
bool | SameSize (const ROI &roi) const
Returns true if both ROIs have the same size.
void | SetMaskValidFlag (bool flag)
void | SetVectorValidFlag (bool flag)
bool | VectorValid () const
is the position vector valid?
construction and destruction
ROI & | operator= (const ROI &roi)
assignment operator
void Release ()
Deletes internal memory, sets mask and vector invalid.
void | Resize (unsigned width, unsigned height)
Reallocates Mask_ and MaskArray_, if necessary.
ROI (const ROI &roi)
calls operator=
ROI ()
str. constructor
void UnsetROI ()
Delete region of interest.
~ROI ()
destructor

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
unsigned | LowerRightX_
unsigned | LowerRightY_
MASK_TYPE * | MaskData_
the mask image data
MASK_TYPE ** | MaskDataArray_
row major representation of the mask roi
unsigned | MaskHeight_
bool | MaskValid_
unsigned | MaskWidth_
dimensions of maks image data
unsigned | UpperLeftX_
rectangular region of interest defined by upper left and lower right corners.
unsigned | UpperLeftY_
std::vector< Position > | Vector_
Vector instance of ROI, always sorted from top left to bottom right.
bool | VectorValid_
validity indicator for mask image

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0
static const int | Version_ = ROI_VERSION_NUMBER
version number of ROI class

Detailed Description

class for handling different region of interest (ROI) representations.

..

The ROI class usually is member of an ImageBase and is stored together with the ImageBase. If an ImageBase is written to disk in the binary mip format, the ROI member is also automatically written in the same file.

Flags indication the validity of the single representations exist within the ROI class.

Right now, three different representations are possible:

  • Corner representation: The corner representation represents a rectangular ROI. The corner representation holds upper left and lower right corners defining a rectangular roi region. The upper left corner is included in the roi while the lower right corner is excluded from the roi. When ROI belongs to image and no roi is set, upper left corner is (0, 0) and lower right corner is given by (width, height). The corner representation is always valid.
  • Map representations: If the ROI belongs to an ImageBase, the MapData() and MapDataArray() must be of the same size as the Image. This is usually nesured by the ImageBase.Init() functions. The MapData() is of Type unsigned char. A value of 0 mneans not belonging to ROI, while any other value means belonging to ROI.
  • Vector representation: Every position in the vector belongs to roi, while every position not in the vector does not belong to the ROI. The VectorValid() flag indicates the validity of the vector entries.

The ROI class can later on be expanded in a way, that the vector does not only hold positions, but maybe somthing like more complex mask patches...

Todo:
TODO change ROI memebr in ImageBase to pointer to: -share a ROI between multiple images, in particular "mask type" region of interest, -save memory for mask -avoid operator calls if ROI unused -drop MaskWidth_ and MaskHeight_ and replace it by src image access functions to src imaeg size -ideally drop mask array in ROI and replace it ba a one channel Image<bool>/Image<unsigned char>=""> -... (JW 09/2005, started majo chaneg but rolle dback due to problems in automatically initializing Mask size without a pointer t reference image.
Author:
woelk 07/2005

Definition at line 118 of file ROI.hh.

Constructor & Destructor Documentation

ROI::~ROI ( )

destructor

Definition at line 71 of file ROI.cpp.

ROI::ROI ( )

str. constructor

Definition at line 77 of file ROI.cpp.

References MaskHeight_, MaskWidth_, UnsetROI(), and VectorValid_.

ROI::ROI ( const ROI & roi )

calls operator=

Definition at line 86 of file ROI.cpp.

References MaskHeight_, MaskWidth_, and operator=().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void ROI::Corners2Mask ( )

Fills mask representation of ROI from corner representation.

Definition at line 455 of file ROI.cpp.

References BIASERR, and SetMaskValidFlag().

void ROI::Corners2Vector ( )

Fills vector representation of ROI from corner representation.

Definition at line 461 of file ROI.cpp.

References BIASERR, and SetVectorValidFlag().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void BIAS::ROI::GetCorners | ( | int & | UpperLeftX,
 |  | int & | UpperLeftY,
 |  | int & | LowerRightX,
 |  | int & | LowerRightY
 | ) | const [inline]

Return the region of interest, by saving the coordinates within the variables defined by the parameters.

Author:
woelk 07/2005

Definition at line 347 of file ROI.hh.

References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.

void BIAS::ROI::GetCorners | ( | unsigned & | UpperLeftX,
 |  | unsigned & | UpperLeftY,
 |  | unsigned & | LowerRightX,
 |  | unsigned & | LowerRightY
 | ) | const [inline]

Return the region of interest, by saving the coordinates within the variables defined by the parameters.

Author:
woelk 07/2005

Definition at line 337 of file ROI.hh.

References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.

Referenced by BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::ImageBase::Cut2ROI(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::DetectFromCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetCopyOfROI(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::Image< StorageType >::GetMinMaxPixelValueIgnoreRange(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBase< StorageType >::Init(), BIAS::Label::LabelInit_(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::ImageBase::Paste2ROI(), BIAS::Image< StorageType >::Reciprocal(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

const MASK_TYPE* BIAS::ROI::GetMaskData ( ) const [inline]

Direct pointer to the mask data, const version.

Author:
woelk 07/2005

Definition at line 196 of file ROI.hh.

MASK_TYPE* BIAS::ROI::GetMaskData ( ) [inline]

Direct pointer to the mask data.

Author:
woelk 07/2005

Definition at line 191 of file ROI.hh.

Referenced by Vector2Mask().

const MASK_TYPE** BIAS::ROI::GetMaskDataArray ( ) const [inline]

Direct pointer to the mask data array, const version.

Author:
woelk 07/2005

Definition at line 206 of file ROI.hh.

MASK_TYPE** BIAS::ROI::GetMaskDataArray ( ) [inline]

Direct pointer to the mask data array.

Author:
woelk 07/2005

Definition at line 201 of file ROI.hh.

Referenced by main(), Mask2Vector(), and Vector2Mask().

unsigned BIAS::ROI::GetMaskHeight ( ) const [inline]

height of mask image

Definition at line 228 of file ROI.hh.

Referenced by operator=(), and Vector2Mask().

int ROI::GetMaskImage ( ImageBase & im ) const

returns an image of StorageType unsigned char, where every pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0

Author:
woelk 07/2005

Definition at line 199 of file ROI.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), MASK_TYPE, MaskData_, MaskHeight_, MaskValid_, MaskWidth_, BIAS::ImageBase::Release(), BIAS::ImageBase::ST_invalid, and BIAS::ImageBase::ST_unsignedchar.

unsigned BIAS::ROI::GetMaskWidth ( ) const [inline]

width of mask image

Definition at line 224 of file ROI.hh.

Referenced by operator=(), and Vector2Mask().

bool ROI::GetVector ( std::vector< Position > & vec ) const

get a copy of mask vector.

Returns true if vector is valid

Author:
woelk 07/2005

Definition at line 257 of file ROI.cpp.

std::vector<Position>* BIAS::ROI::GetVector ( ) [inline]

returns a pointer to the vector representation of the ROI

Definition at line 216 of file ROI.hh.

bool BIAS::ROI::IsInROI | ( | const double & | x,
 |  | const double & | y
 | ) | const [inline]

ROI check if pixel position is inside the ROI moved here from image base, does only check bounding box roi by now.

Definition at line 171 of file ROI.hh.

References BIASERR.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

int ROI::Mask2Corners ( )

Fills corner/bounding box representation of ROI from mask representation.

Returns 0 if mask is valid.

Definition at line 449 of file ROI.cpp.

References BIASERR, and MaskValid_.

int ROI::Mask2Vector ( )

Fills vector representation of ROI from mask representation.

Returns 0 if mask is valid. Sets VectorValid flag if maks is valid.

Author:
woelk 07/2005

Definition at line 402 of file ROI.cpp.

References GetMaskDataArray(), MaskHeight_, MaskValid(), MaskValid_, MaskWidth_, SetVectorValidFlag(), and Vector_.

Referenced by main().

bool BIAS::ROI::MaskValid ( ) const [inline]

is the mask image valid?

Definition at line 237 of file ROI.hh.

Referenced by Mask2Vector().

ROI & ROI::operator= ( const ROI & roi )

assignment operator

Definition at line 263 of file ROI.cpp.

References GetMaskHeight(), GetMaskWidth(), LowerRightX_, LowerRightY_, MASK_TYPE, MaskData_, MaskHeight_, MaskValid_, MaskWidth_, Resize(), UpperLeftX_, UpperLeftY_, Vector_, and VectorValid_.

Referenced by ROI().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int ROI::ReadBinary ( std::istream & is )

binary input from stream

Author:
woelk 07/2005

Definition at line 340 of file ROI.cpp.

References BIASCDOUT, BIASERR, D_ROI_IO, LowerRightX_, LowerRightY_, MASK_TYPE, MaskData_, MaskHeight_, MaskValid_, MaskWidth_, res, Resize(), ROI_IDENTIFIER, ROI_IDENTIFIER_LENGTH, UpperLeftX_, UpperLeftY_, Vector_, VectorValid_, and Version.

Referenced by BIAS::operator>>().

void ROI::Release ( )

Deletes internal memory, sets mask and vector invalid.

Author:
woelk 07/2005

Definition at line 91 of file ROI.cpp.

References LowerRightX_, LowerRightY_, MaskData_, MaskDataArray_, MaskHeight_, MaskValid_, MaskWidth_, UpperLeftX_, UpperLeftY_, Vector_, and VectorValid_.

Referenced by BIAS::ImageBase::Release(), BIAS::Image< StorageType >::Release(), and Resize().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void ROI::Resize | ( | unsigned | width,
 |  | unsigned | height
 | ) |

Reallocates Mask_ and MaskArray_, if necessary.

Author:
woelk 07/2005

Definition at line 119 of file ROI.cpp.

References BIASASSERT, MASK_TYPE, MaskData_, MaskDataArray_, MaskHeight_, MaskWidth_, and Release().

Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), operator=(), and ReadBinary().

bool ROI::SameSize ( const ROI & roi ) const

Returns true if both ROIs have the same size.

Only the rectangular ROI as defined by the corners is validated.

Author:
woelk 07/2005

Definition at line 281 of file ROI.cpp.

References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.

int ROI::SetCorners | ( | unsigned | UpperLeftX,
 |  | unsigned | UpperLeftY,
 |  | unsigned | LowerRightX,
 |  | unsigned | LowerRightY
 | ) |

Sets a rectangular region of interest.

Author:
woelk 07/2005

Definition at line 138 of file ROI.cpp.

References BIASABORT, BIASERR, LowerRightX_, LowerRightY_, MaskHeight_, MaskWidth_, res, UpperLeftX_, and UpperLeftY_.

Referenced by BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< unsigned char, unsigned char >::DownsampleBy4Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGauss< InputStorageType, OutputStorageType >::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), and Vector2Corners().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int ROI::SetMaskImage ( const ImageBase & im )

every pixel with value!=0.0 is in the ROI, every pixel with value==0.0 is not in the ROI

Author:
woelk 07/2005

Definition at line 227 of file ROI.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), MASK_TYPE, MaskData_, MaskHeight_, MaskValid_, MaskWidth_, res, BIAS::ImageBase::ST_unsignedchar, and VectorValid_.

void BIAS::ROI::SetMaskValidFlag ( bool flag ) [inline]

Definition at line 244 of file ROI.hh.

Referenced by Corners2Mask(), and main().

void ROI::SetVector ( std::vector< Position > & pos )

Sets MaskValid_=false and VectorValid_=true.

Copies pos -> Vector_. Sorts Vector_.

Author:
woelk 07/2005

Definition at line 249 of file ROI.cpp.

Referenced by main().

void BIAS::ROI::SetVectorValidFlag ( bool flag ) [inline]

Definition at line 247 of file ROI.hh.

Referenced by Corners2Vector(), and Mask2Vector().

void ROI::UnsetROI ( )

Delete region of interest.

Author:
woelk 07/2005

Definition at line 111 of file ROI.cpp.

References LowerRightX_, LowerRightY_, MaskHeight_, MaskValid_, MaskWidth_, UpperLeftX_, UpperLeftY_, and VectorValid_.

Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), ROI(), and BIAS::ImageBase::UnsetROI().

int ROI::Vector2Corners ( )

Fills corner/bounding box representation of ROI from vector representation.

Returns 0 if vector is valid.

Author:
woelk 07/2005

Definition at line 441 of file ROI.cpp.

References SetCorners(), Vector_, and VectorValid_.

int ROI::Vector2Mask ( )

Fills vector representation of ROI from mask representation.

Returns 0 if vector is valid. Sets MaskValid flag if vector is valid.

Author:
woelk 07/2005

Definition at line 419 of file ROI.cpp.

References BIAS_DEBUG, BIASASSERT, BIASERR, GetMaskData(), GetMaskDataArray(), GetMaskHeight(), GetMaskWidth(), MASK_TYPE, MaskHeight_, MaskWidth_, and Vector_.

Referenced by main().

bool BIAS::ROI::VectorValid ( ) const [inline]

is the position vector valid?

Definition at line 241 of file ROI.hh.

int ROI::WriteBinary ( std::ostream & os ) const

binary output to stream

Author:
woelk 07/2005

Definition at line 287 of file ROI.cpp.

References BIASASSERT, BIASCDOUT, D_ROI_IO, LowerRightX_, LowerRightY_, MASK_TYPE, MaskData_, MaskDataArray_, MaskHeight_, MaskValid_, MaskWidth_, ROI_IDENTIFIER, ROI_IDENTIFIER_LENGTH, UpperLeftX_, UpperLeftY_, Vector_, VectorValid_, and Version_.

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< | ( | std::ostream & | os,
 |  | const ROI & | roi
 | ) | [friend]

human readable output operator for ROI, mainly for debugging

Author:
woelk 07/2005

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned BIAS::ROI::LowerRightX_ [protected]

Definition at line 311 of file ROI.hh.

Referenced by GetCorners(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().

unsigned BIAS::ROI::LowerRightY_ [protected]

Definition at line 311 of file ROI.hh.

Referenced by GetCorners(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().

MASK_TYPE* BIAS::ROI::MaskData_ [protected]

the mask image data

Definition at line 316 of file ROI.hh.

Referenced by GetMaskImage(), operator=(), ReadBinary(), Release(), Resize(), SetMaskImage(), and WriteBinary().

MASK_TYPE** BIAS::ROI::MaskDataArray_ [protected]

row major representation of the mask roi

Definition at line 318 of file ROI.hh.

Referenced by Release(), Resize(), and WriteBinary().

unsigned BIAS::ROI::MaskHeight_ [protected]

Definition at line 314 of file ROI.hh.

Referenced by GetMaskImage(), Mask2Vector(), operator=(), ReadBinary(), Release(), Resize(), ROI(), SetCorners(), SetMaskImage(), UnsetROI(), Vector2Mask(), and WriteBinary().

bool BIAS::ROI::MaskValid_ [protected]

Definition at line 304 of file ROI.hh.

Referenced by GetMaskImage(), Mask2Corners(), Mask2Vector(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), SetMaskImage(), UnsetROI(), and WriteBinary().

unsigned BIAS::ROI::MaskWidth_ [protected]

dimensions of maks image data

Definition at line 314 of file ROI.hh.

Referenced by GetMaskImage(), Mask2Vector(), operator=(), ReadBinary(), Release(), Resize(), ROI(), SetCorners(), SetMaskImage(), UnsetROI(), Vector2Mask(), and WriteBinary().

unsigned BIAS::ROI::UpperLeftX_ [protected]

rectangular region of interest defined by upper left and lower right corners.

The upperleft corner is part of the rectangle, while the lower

Definition at line 310 of file ROI.hh.

Referenced by GetCorners(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().

unsigned BIAS::ROI::UpperLeftY_ [protected]

Definition at line 310 of file ROI.hh.

Referenced by GetCorners(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().

std::vector<Position> BIAS::ROI::Vector_ [protected]

Vector instance of ROI, always sorted from top left to bottom right.

Definition at line 321 of file ROI.hh.

Referenced by Mask2Vector(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), Vector2Corners(), Vector2Mask(), and WriteBinary().

bool BIAS::ROI::VectorValid_ [protected]

validity indicator for mask image

Definition at line 305 of file ROI.hh.

Referenced by BIAS::operator<<(), operator=(), ReadBinary(), Release(), ROI(), SetMaskImage(), UnsetROI(), Vector2Corners(), and WriteBinary().

const int ROI::Version_ = ROI_VERSION_NUMBER [static, protected]

version number of ROI class

Definition at line 324 of file ROI.hh.

Referenced by BIAS::operator<<(), and WriteBinary().

The documentation for this class was generated from the following files:
  • Base/Image/ROI.hh
  • Base/Image/ROI.cpp
Generated on Wed Jun 21 19:10:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ScaledImageCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ScaledImageCanvas

BIAS::ScaledImageCanvas Class Reference
[Graphical User Interfaces]

display float images in wx application, provides zoom, scale, shift and investigation functionality More...

#include <Gui/ImageCanvas.hh>

Collaboration diagram for BIAS::ScaledImageCanvas:

[legend]
List of all members.

Public Member Functions

ImageCanvas * GetImageCanvas ()
BIAS::ImageBase & GetOrigimg ()
ScaledImageCanvas (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("ScaledScrolledWindow"))
void | SetAutoadaptScale (const bool b)
recalculate scale and shift for each new frame or not ?
void | SetDefaultZoom (unsigned z)
int | SetOffset (double offset)
void | SetOffsetRange (double min, double max)
int | SetScale (double scale)
void | SetScaleRange (double min, double max)
void | SetStatusBarPtr (wxStatusBar *p_sbar)
pointer to sbar to be used JW
void | SetStatusText (const std::string &s)
display text to sbar if one is assigned
virtual bool | Show (bool show=true)
void | Show (BIAS::PyramidImage< float > &pim, std::string name)
void | Show (BIAS::ImageBase &im, std::string name)
~ScaledImageCanvas ()

Protected Member Functions

void | OnScaleOffset (wxScrollEvent &event)
void UpdateScaleOffset ()

Protected Attributes

bool | AutoadaptScale_
std::string | ImageName_
double | MaxOffSet_
double | MaxScale_
ImageCanvas * MiaScWi_
double | MinOffSet_
double | MinScale_
wxSlider * | OffsSL_
BIAS::ImageBase origim_
wxStatusBar * | p_StatBar
BIAS::Image< unsigned char > | rgbim_
BIAS::Image< float > | scaledf_
wxSlider * | ScaleSL_
BIAS::Image< unsigned char > | ucim_

Detailed Description

display float images in wx application, provides zoom, scale, shift and investigation functionality

Author:
woelk

Definition at line 210 of file ImageCanvas.hh.

Constructor & Destructor Documentation

ScaledImageCanvas::ScaledImageCanvas | ( | wxWindow * | parent,
 |  | wxStatusBar * | sbar = NULL,
 |  | int | sbarid = 0,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxDefaultSize,
 |  | long | style = wxTAB_TRAVERSAL,
 |  | const wxString & | name = wxT("ScaledScrolledWindow")
 | ) |

Definition at line 722 of file ImageCanvas.cpp.

References AutoadaptScale_, BIAS::ID_Offset, BIAS::ID_Scale, MaxOffSet_, MaxScale_, MiaScWi_, MinOffSet_, MinScale_, OffsSL_, p_StatBar, ScaleSL_, and SLIDER_DIGITS.

ScaledImageCanvas::~ScaledImageCanvas ( )

Definition at line 755 of file ImageCanvas.cpp.

References MiaScWi_, OffsSL_, and ScaleSL_.

Member Function Documentation

ImageCanvas * ScaledImageCanvas::GetImageCanvas ( )

Returns:
(pointer) to class member ImageCanvas used for display JW

Definition at line 901 of file ImageCanvas.cpp.

References MiaScWi_.

BIAS::ImageBase & ScaledImageCanvas::GetOrigimg ( )

Returns:
datat image origim_ class member JW

Definition at line 905 of file ImageCanvas.cpp.

Referenced by MainFrame::FitSizetIfTooSmall(), and MainFrame::OnInfo().

void ScaledImageCanvas::OnScaleOffset ( wxScrollEvent & event ) [protected]

Definition at line 916 of file ImageCanvas.cpp.

void BIAS::ScaledImageCanvas::SetAutoadaptScale ( const bool b ) [inline]

recalculate scale and shift for each new frame or not ?

Definition at line 253 of file ImageCanvas.hh.

void BIAS::ScaledImageCanvas::SetDefaultZoom ( unsigned z ) [inline]

Definition at line 237 of file ImageCanvas.hh.

int ScaledImageCanvas::SetOffset ( double offset )

Definition at line 828 of file ImageCanvas.cpp.

References BIASASSERT, BIASERR, MaxOffSet_, MinOffSet_, OffsSL_, SLIDER_DIGITS, UpdateScaleOffset(), and value.

void BIAS::ScaledImageCanvas::SetOffsetRange | ( | double | min,
 |  | double | max
 | ) | [inline]

Definition at line 231 of file ImageCanvas.hh.

References BIASASSERT.

int ScaledImageCanvas::SetScale ( double scale )

Definition at line 807 of file ImageCanvas.cpp.

References BIASASSERT, BIASERR, MaxScale_, MinScale_, ScaleSL_, SLIDER_DIGITS, UpdateScaleOffset(), and value.

void BIAS::ScaledImageCanvas::SetScaleRange | ( | double | min,
 |  | double | max
 | ) | [inline]

Definition at line 228 of file ImageCanvas.hh.

References BIASASSERT.

void ScaledImageCanvas::SetStatusBarPtr ( wxStatusBar * p_sbar )

pointer to sbar to be used JW

Definition at line 763 of file ImageCanvas.cpp.

References p_StatBar.

void ScaledImageCanvas::SetStatusText ( const std::string & s )

display text to sbar if one is assigned

Definition at line 767 of file ImageCanvas.cpp.

References BIAS::AsciiToWx(), and p_StatBar.

virtual bool BIAS::ScaledImageCanvas::Show ( bool show = true ) [inline, virtual]

Definition at line 226 of file ImageCanvas.hh.

void BIAS::ScaledImageCanvas::Show | ( | BIAS::PyramidImage< float > & | pim,
 |  | std::string | name
 | ) |

void BIAS::ScaledImageCanvas::Show | ( | BIAS::ImageBase & | im,
 |  | std::string | name
 | ) |

void ScaledImageCanvas::UpdateScaleOffset ( ) [protected]

Todo:
: write ofsfet and scale to StatusText instead of cout (JW)

Definition at line 843 of file ImageCanvas.cpp.

References BIAS::Image< StorageType >::AboveThresholdToValue(), BIAS::Image< StorageType >::BelowThresholdToValue(), BIASERR, BIAS::ImageBase::CM_RGB, BIAS::ImageConvert::Convert(), BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetColorModel(), BIAS::Image< StorageType >::GetImageDataArray(), MaxOffSet_, MaxScale_, MinOffSet_, MinScale_, OffsSL_, rgbim_, scaledf_, BIAS::Image< StorageType >::ScaleShift(), ScaleSL_, SLIDER_DIGITS, BIAS::ImageBase::ST_unsignedchar, and ucim_.

Referenced by SetOffset(), and SetScale().

Member Data Documentation

bool BIAS::ScaledImageCanvas::AutoadaptScale_ [protected]

Definition at line 270 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas().

std::string BIAS::ScaledImageCanvas::ImageName_ [protected]

Definition at line 265 of file ImageCanvas.hh.

double BIAS::ScaledImageCanvas::MaxOffSet_ [protected]

Definition at line 266 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetOffset(), and UpdateScaleOffset().

double BIAS::ScaledImageCanvas::MaxScale_ [protected]

Definition at line 266 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetScale(), and UpdateScaleOffset().

ImageCanvas* BIAS::ScaledImageCanvas::MiaScWi_ [protected]

Definition at line 260 of file ImageCanvas.hh.

Referenced by GetImageCanvas(), ScaledImageCanvas(), and ~ScaledImageCanvas().

double BIAS::ScaledImageCanvas::MinOffSet_ [protected]

Definition at line 266 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetOffset(), and UpdateScaleOffset().

double BIAS::ScaledImageCanvas::MinScale_ [protected]

Definition at line 266 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetScale(), and UpdateScaleOffset().

wxSlider * BIAS::ScaledImageCanvas::OffsSL_ [protected]

Definition at line 261 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetOffset(), UpdateScaleOffset(), and ~ScaledImageCanvas().

BIAS::ImageBase BIAS::ScaledImageCanvas::origim_ [protected]

Definition at line 262 of file ImageCanvas.hh.

wxStatusBar* BIAS::ScaledImageCanvas::p_StatBar [protected]

Definition at line 269 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetStatusBarPtr(), and SetStatusText().

BIAS::Image<unsigned char> BIAS::ScaledImageCanvas::rgbim_ [protected]

Definition at line 264 of file ImageCanvas.hh.

Referenced by UpdateScaleOffset().

BIAS::Image<float> BIAS::ScaledImageCanvas::scaledf_ [protected]

Definition at line 263 of file ImageCanvas.hh.

Referenced by UpdateScaleOffset().

wxSlider* BIAS::ScaledImageCanvas::ScaleSL_ [protected]

Definition at line 261 of file ImageCanvas.hh.

Referenced by ScaledImageCanvas(), SetScale(), UpdateScaleOffset(), and ~ScaledImageCanvas().

BIAS::Image<unsigned char> BIAS::ScaledImageCanvas::ucim_ [protected]

Definition at line 264 of file ImageCanvas.hh.

Referenced by UpdateScaleOffset().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvas.hh
  • Gui/ImageCanvas.cpp
Generated on Wed Jun 21 19:10:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ScanLine Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ScanLine

BIAS::ScanLine Class Reference
[Drawing]

class for scanning a image region given by a line and a distance from the line More...

#include <Base/Image/ScanLine.hh>

Inheritance diagram for BIAS::ScanLine:

[legend]
Collaboration diagram for BIAS::ScanLine:

[legend]
List of all members.

Public Member Functions

bool | GetNext (double next[2])
bool | GetNext (unsigned int next[2])
bool | GetNext (int next[2])
void | Init (const double start[2], const double end[2])
void | Init (const unsigned int start[2], const unsigned int end[2])
void | Init (const int start[2], const int end[2])
void | Init (const double start[2], const double end[2], double epsilon)
void | Init (const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon)
void | Init (const int start[2], const int end[2], const int epsilon)
ScanLine (const double start[2], const double end[2], const double epsilon)
ScanLine (const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon)
ScanLine (const int start[2], const int end[2], const int epsilon)
ScanLine ()
~ScanLine ()

Protected Attributes

bool | _bInitialized
double | _dDEpsilon
double | _dDx
double | _dDy
enum TLineType | _eLineType
int | _iDx
int | _iDy
int | _iEnd [2]
long int | _iEps
int | _iEpsCount
int | _iEpsilon
int | _iStart [2]
EightWaySymmetry< int > | _iSym
int | _iTransformedCurrent [2]
int | _iTransformedEnd [2]
int | _iTransformedStart [2]
int | _iTransformedUpDown [2]

Detailed Description

class for scanning a image region given by a line and a distance from the line

GetNext() return on successive calls all image coo within +-epsilon from line given by start and end Fast implementation based on Bresenhams algorithm.

Author:
woelk 01 2003

Definition at line 47 of file ScanLine.hh.

Constructor & Destructor Documentation

BIAS::ScanLine::ScanLine ( ) [inline]

Definition at line 86 of file ScanLine.hh.

BIAS::ScanLine::~ScanLine ( ) [inline]

Definition at line 88 of file ScanLine.hh.

BIAS::ScanLine::ScanLine | ( | const int | start[2],
 |  | const int | end[2],
 |  | const int | epsilon
 | ) | [inline]

Definition at line 90 of file ScanLine.hh.

References Init().

BIAS::ScanLine::ScanLine | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const unsigned int | epsilon
 | ) | [inline]

Definition at line 93 of file ScanLine.hh.

References Init().

BIAS::ScanLine::ScanLine | ( | const double | start[2],
 |  | const double | end[2],
 |  | const double | epsilon
 | ) | [inline]

Definition at line 97 of file ScanLine.hh.

References Init().

Member Function Documentation

bool BIAS::ScanLine::GetNext ( double next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 181 of file ScanLine.hh.

References BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, and GetNext().

bool BIAS::ScanLine::GetNext ( unsigned int next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 73 of file ScanLine.hh.

bool BIAS::ScanLine::GetNext ( int next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 148 of file ScanLine.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEps, _iEpsCount, _iEpsilon, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, _iTransformedUpDown, BIASERR, and BIAS::EightWaySymmetry< T >::InverseTransform().

Referenced by GetNext(), BIAS::RegionMatcher::LineMatcherNCC(), and BIAS::RegionMatcher::LineMatcherSAD().

void BIAS::Bresenham::Init | ( | const double | start[2],
 |  | const double | end[2]
 | ) | [inline, inherited]

Definition at line 145 of file Bresenham.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEnd, BIAS::Bresenham::_iEps, BIAS::Bresenham::_iStart, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, BIAS::Bresenham::_iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

void BIAS::Bresenham::Init | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [inline, inherited]

Definition at line 55 of file Bresenham.hh.

void BIAS::Bresenham::Init | ( | const int | start[2],
 |  | const int | end[2]
 | ) | [inline, inherited]

Definition at line 124 of file Bresenham.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEnd, BIAS::Bresenham::_iEps, BIAS::Bresenham::_iStart, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, BIAS::Bresenham::_iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

Referenced by BIAS::ImageDraw< StorageType >::Arrow(), BIAS::Bresenham::Bresenham(), BIAS::ScanLine2::Init(), and Init().

void BIAS::ScanLine::Init | ( | const double | start[2],
 |  | const double | end[2],
 |  | double | epsilon
 | ) | [inline]

Definition at line 131 of file ScanLine.hh.

References _dDEpsilon, _iEpsCount, _iEpsilon, BIAS::Bresenham::_iTransformedStart, _iTransformedUpDown, BIASERR, and BIAS::Bresenham::Init().

void BIAS::ScanLine::Init | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const unsigned int | epsilon
 | ) | [inline]

Definition at line 64 of file ScanLine.hh.

void BIAS::ScanLine::Init | ( | const int | start[2],
 |  | const int | end[2],
 |  | const int | epsilon
 | ) | [inline]

Definition at line 101 of file ScanLine.hh.

References BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEps, _iEpsCount, _iEpsilon, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, BIAS::Bresenham::_iTransformedStart, _iTransformedUpDown, BIASERR, and BIAS::Bresenham::Init().

Referenced by ScanLine().

Member Data Documentation

bool BIAS::Bresenham::_bInitialized [protected, inherited]

Definition at line 83 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Bresenham(), BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

double BIAS::ScanLine::_dDEpsilon [protected]

Definition at line 80 of file ScanLine.hh.

Referenced by Init().

double BIAS::Bresenham::_dDx [protected, inherited]

Definition at line 79 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

double BIAS::Bresenham::_dDy [protected, inherited]

Definition at line 80 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

enum TLineType BIAS::Bresenham::_eLineType [protected, inherited]

Definition at line 70 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iDx [protected, inherited]

Definition at line 77 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iDy [protected, inherited]

Definition at line 78 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iEnd[2] [protected, inherited]

Definition at line 73 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Init().

long int BIAS::Bresenham::_iEps [protected, inherited]

Definition at line 81 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), Init(), and BIAS::Bresenham::Init().

int BIAS::ScanLine::_iEpsCount [protected]

Definition at line 81 of file ScanLine.hh.

Referenced by GetNext(), and Init().

int BIAS::ScanLine::_iEpsilon [protected]

Definition at line 79 of file ScanLine.hh.

Referenced by GetNext(), and Init().

int BIAS::Bresenham::_iStart[2] [protected, inherited]

Definition at line 72 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Init().

EightWaySymmetry<int> BIAS::Bresenham::_iSym [protected, inherited]

Definition at line 68 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedCurrent[2] [protected, inherited]

Definition at line 74 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), BIAS::ScanLine2::Init(), Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedEnd[2] [protected, inherited]

Definition at line 76 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::GetNext(), GetNext(), BIAS::Bresenham::GetNext(), Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedStart[2] [protected, inherited]

Definition at line 75 of file Bresenham.hh.

Referenced by BIAS::ScanLine2::Init(), Init(), and BIAS::Bresenham::Init().

int BIAS::ScanLine::_iTransformedUpDown[2] [protected]

Definition at line 82 of file ScanLine.hh.

Referenced by GetNext(), and Init().

The documentation for this class was generated from the following file:
  • Base/Image/ScanLine.hh
Generated on Wed Jun 21 19:10:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ScanLine2 Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ScanLine2

BIAS::ScanLine2 Class Reference

#include <Base/Image/ScanLine2.hh>

Inheritance diagram for BIAS::ScanLine2:

[legend]
Collaboration diagram for BIAS::ScanLine2:

[legend]
List of all members.

Public Member Functions

bool | GetNext (double next[2])
bool | GetNext (unsigned int next[2])
bool | GetNext (int next[2])
void | Init (const double start[2], const double end[2])
void | Init (const unsigned int start[2], const unsigned int end[2])
void | Init (const int start[2], const int end[2])
void | Init (const double start[2], const double end[2], double epsilon)
void | Init (const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon)
void | Init (const int start[2], const int end[2], const int epsilon)
ScanLine2 (const double start[2], const double end[2], const double epsilon)
ScanLine2 (const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon)
ScanLine2 (const int start[2], const int end[2], const int epsilon)
ScanLine2 ()
class for scanning a region given by a line and a distance ca.
~ScanLine2 ()

Protected Attributes

bool | _bInitialized
double | _dDEpsilon
double | _dDx
double | _dDy
enum TLineType | _eLineType
int | _iDx
int | _iDy
int | _iEnd [2]
long int | _iEps
int | _iEpsCount
int | _iEpsilon
int | _iStart [2]
EightWaySymmetry< int > | _iSym
int | _iTransformedCurrent [2]
int | _iTransformedEnd [2]
int | _iTransformedStart [2]
int | _iTransformedUpDown [2]

Detailed Description

Definition at line 34 of file ScanLine2.hh.

Constructor & Destructor Documentation

BIAS::ScanLine2::ScanLine2 ( ) [inline]

class for scanning a region given by a line and a distance ca.

perpendicular to the line GetNext() return on successive calls all image coo within +-epsilon from line given by start and end Fast implementation based on Bresenhams algorith

Author:
woelk 01 2003

Definition at line 79 of file ScanLine2.hh.

BIAS::ScanLine2::~ScanLine2 ( ) [inline]

Definition at line 81 of file ScanLine2.hh.

BIAS::ScanLine2::ScanLine2 | ( | const int | start[2],
 |  | const int | end[2],
 |  | const int | epsilon
 | ) | [inline]

Definition at line 83 of file ScanLine2.hh.

References Init().

BIAS::ScanLine2::ScanLine2 | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const unsigned int | epsilon
 | ) | [inline]

Definition at line 86 of file ScanLine2.hh.

References Init().

BIAS::ScanLine2::ScanLine2 | ( | const double | start[2],
 |  | const double | end[2],
 |  | const double | epsilon
 | ) | [inline]

Definition at line 90 of file ScanLine2.hh.

References Init().

Member Function Documentation

bool BIAS::ScanLine2::GetNext ( double next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 163 of file ScanLine2.hh.

References BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, and GetNext().

bool BIAS::ScanLine2::GetNext ( unsigned int next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 66 of file ScanLine2.hh.

References GetNext().

bool BIAS::ScanLine2::GetNext ( int next[2] ) [inline]

Reimplemented from BIAS::Bresenham.

Definition at line 130 of file ScanLine2.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEps, _iEpsCount, _iEpsilon, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, _iTransformedUpDown, BIASERR, and BIAS::EightWaySymmetry< T >::InverseTransform().

Referenced by GetNext().

void BIAS::Bresenham::Init | ( | const double | start[2],
 |  | const double | end[2]
 | ) | [inline, inherited]

Definition at line 145 of file Bresenham.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEnd, BIAS::Bresenham::_iEps, BIAS::Bresenham::_iStart, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, BIAS::Bresenham::_iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

void BIAS::Bresenham::Init | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2]
 | ) | [inline, inherited]

Definition at line 55 of file Bresenham.hh.

void BIAS::Bresenham::Init | ( | const int | start[2],
 |  | const int | end[2]
 | ) | [inline, inherited]

Definition at line 124 of file Bresenham.hh.

References BIAS::Bresenham::_bInitialized, BIAS::Bresenham::_dDx, BIAS::Bresenham::_dDy, BIAS::Bresenham::_eLineType, BIAS::Bresenham::_iDx, BIAS::Bresenham::_iDy, BIAS::Bresenham::_iEnd, BIAS::Bresenham::_iEps, BIAS::Bresenham::_iStart, BIAS::Bresenham::_iSym, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedEnd, BIAS::Bresenham::_iTransformedStart, BIAS::EightWaySymmetry< T >::DetermineLineType(), and BIAS::EightWaySymmetry< T >::Transform().

Referenced by BIAS::ImageDraw< StorageType >::Arrow(), BIAS::Bresenham::Bresenham(), Init(), and BIAS::ScanLine::Init().

void BIAS::ScanLine2::Init | ( | const double | start[2],
 |  | const double | end[2],
 |  | double | epsilon
 | ) | [inline]

Definition at line 113 of file ScanLine2.hh.

References _dDEpsilon, _iEpsCount, _iEpsilon, BIAS::Bresenham::_iTransformedStart, _iTransformedUpDown, BIASERR, and BIAS::Bresenham::Init().

void BIAS::ScanLine2::Init | ( | const unsigned int | start[2],
 |  | const unsigned int | end[2],
 |  | const unsigned int | epsilon
 | ) | [inline]

Definition at line 57 of file ScanLine2.hh.

References Init().

void BIAS::ScanLine2::Init | ( | const int | start[2],
 |  | const int | end[2],
 |  | const int | epsilon
 | ) | [inline]

Definition at line 94 of file ScanLine2.hh.

References _iEpsCount, _iEpsilon, BIAS::Bresenham::_iTransformedCurrent, BIAS::Bresenham::_iTransformedStart, _iTransformedUpDown, BIASERR, and BIAS::Bresenham::Init().

Referenced by Init(), and ScanLine2().

Member Data Documentation

bool BIAS::Bresenham::_bInitialized [protected, inherited]

Definition at line 83 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Bresenham(), GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

double BIAS::ScanLine2::_dDEpsilon [protected]

Definition at line 73 of file ScanLine2.hh.

Referenced by Init().

double BIAS::Bresenham::_dDx [protected, inherited]

Definition at line 79 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

double BIAS::Bresenham::_dDy [protected, inherited]

Definition at line 80 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

enum TLineType BIAS::Bresenham::_eLineType [protected, inherited]

Definition at line 70 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iDx [protected, inherited]

Definition at line 77 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iDy [protected, inherited]

Definition at line 78 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iEnd[2] [protected, inherited]

Definition at line 73 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Init().

long int BIAS::Bresenham::_iEps [protected, inherited]

Definition at line 81 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::ScanLine2::_iEpsCount [protected]

Definition at line 74 of file ScanLine2.hh.

Referenced by GetNext(), and Init().

int BIAS::ScanLine2::_iEpsilon [protected]

Definition at line 72 of file ScanLine2.hh.

Referenced by GetNext(), and Init().

int BIAS::Bresenham::_iStart[2] [protected, inherited]

Definition at line 72 of file Bresenham.hh.

Referenced by BIAS::Bresenham::Init().

EightWaySymmetry<int> BIAS::Bresenham::_iSym [protected, inherited]

Definition at line 68 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedCurrent[2] [protected, inherited]

Definition at line 74 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), Init(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedEnd[2] [protected, inherited]

Definition at line 76 of file Bresenham.hh.

Referenced by GetNext(), BIAS::ScanLine::GetNext(), BIAS::Bresenham::GetNext(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::Bresenham::_iTransformedStart[2] [protected, inherited]

Definition at line 75 of file Bresenham.hh.

Referenced by Init(), BIAS::ScanLine::Init(), and BIAS::Bresenham::Init().

int BIAS::ScanLine2::_iTransformedUpDown[2] [protected]

Definition at line 75 of file ScanLine2.hh.

Referenced by GetNext(), and Init().

The documentation for this class was generated from the following file:
  • Base/Image/ScanLine2.hh
Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: SegmentationData Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

SegmentationData Struct Reference

List of all members.

Public Attributes

int | br [2]
int | hue
int | hueIntervall
const unsigned char ** | imgHSV
unsigned char ** | imRes
int | minSaturation
int | tl [2]

Detailed Description

Definition at line 126 of file ColorSegmentation.cpp.

Member Data Documentation

int SegmentationData::br[2]

Definition at line 127 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

int SegmentationData::hue

Definition at line 130 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

int SegmentationData::hueIntervall

Definition at line 130 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

const unsigned char** SegmentationData::imgHSV

Definition at line 128 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

unsigned char** SegmentationData::imRes

Definition at line 129 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

int SegmentationData::minSaturation

Definition at line 130 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

int SegmentationData::tl[2]

Definition at line 127 of file ColorSegmentation.cpp.

Referenced by BIAS::ColorSegmentationThreaded::Segment_().

The documentation for this struct was generated from the following file:
  • Image/ColorSegmentation.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SensorData Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SensorData

BIAS::SensorData Struct Reference

#include <Geometry/ProjectionParametersIO.hh>

Collaboration diagram for BIAS::SensorData:

[legend]
List of all members.

Public Attributes

BIAS::Vector3< double > | PoseInRigCenter_
double | PoseInRigPitch_
double | PoseInRigRoll_
double | PoseInRigYaw_

Detailed Description

Definition at line 58 of file ProjectionParametersIO.hh.

Member Data Documentation

BIAS::Vector3<double> BIAS::SensorData::PoseInRigCenter_

Definition at line 61 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::InitializeSensor(), and operator<<().

double BIAS::SensorData::PoseInRigPitch_

Definition at line 63 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::InitializeSensor(), and operator<<().

double BIAS::SensorData::PoseInRigRoll_

Definition at line 64 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::InitializeSensor(), and operator<<().

double BIAS::SensorData::PoseInRigYaw_

Definition at line 62 of file ProjectionParametersIO.hh.

Referenced by BIAS::ProjectionParametersIO::InitializeSensor(), and operator<<().

The documentation for this struct was generated from the following file:
  • Geometry/ProjectionParametersIO.hh
Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SettingsGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SettingsGL

BIAS::SettingsGL Class Reference
[Graphical User Interfaces]

Application controlled OpenGl renderingsettings. More...

#include <Gui/SettingsGL.hh>

List of all members.

Static Public Member Functions

static int | GetVSyncInterval ()
query status of vsync/swap control interval=VSYNC JW
static void | SetVSyncInterval (const int &interval)
set the vsync/swap control interval JW

Detailed Description

Application controlled OpenGl renderingsettings.

E.g. Vsync and Multisampling/Antialiasing (planned),

Author:
Jan Woetzel

Definition at line 28 of file SettingsGL.hh.

Member Function Documentation

int SettingsGL::GetVSyncInterval ( ) [static]

query status of vsync/swap control interval=VSYNC JW

Definition at line 60 of file SettingsGL.cpp.

References CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::GetVSync().

void SettingsGL::SetVSyncInterval ( const int & interval ) [static]

set the vsync/swap control interval JW

Definition at line 27 of file SettingsGL.cpp.

References BIASERR, and CHECK_GL_ERROR.

Referenced by BIAS::OpenGLCanvasBase::SetVSync().

The documentation for this class was generated from the following files:
  • Gui/SettingsGL.hh
  • Gui/SettingsGL.cpp
Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SimilarityTransform Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SimilarityTransform

BIAS::SimilarityTransform Class Reference

#include <Geometry/SimilarityTransform.hh>

Inheritance diagram for BIAS::SimilarityTransform:

[legend]
Collaboration diagram for BIAS::SimilarityTransform:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void Dump ()
Prints Transformation together with more intuitive rotation representations.
const Vector3< double > & | GetC () const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Matrix4x4< double > | GetMatrix () const
returns the corresponding 4x4 matrix
const Quaternion< double > & | GetQ () const
BIAS::RMatrixBase | GetR () const
void InvertIP ()
Inverts the transform.
bool | Load (const std::string &inputFile)
void | Mult (const SimilarityTransform &arg, SimilarityTransform &result)
result = this * arg
void | MultVec (const Vector3< double > &vec, Vector3< double > &result) const
const SimilarityTransform & | operator= (const SimilarityTransform &c)
copy all elements
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
bool | Save (const std::string &outputFile)
void | Set (const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0)
void | SetC (const Vector3< double > &C)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetQ (const Quaternion< double > &Q)
void | SetR (const BIAS::RMatrixBase &R)
Sets the quaternion.
SimilarityTransform (const SimilarityTransform &c)
calls operator=
SimilarityTransform ()
sets identity transform with zero covariance

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
Vector3< double > | C_
the translation
Quaternion< double > | Q_
this is the rotation
double | scale_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Friends

std::ostream & | operator<< (std::ostream &os, const SimilarityTransform &p)
std::istream & | operator>> (std::istream &is, SimilarityTransform &p)

Detailed Description

Definition at line 58 of file SimilarityTransform.hh.

Constructor & Destructor Documentation

BIAS::SimilarityTransform::SimilarityTransform ( ) [inline]

sets identity transform with zero covariance

Definition at line 62 of file SimilarityTransform.hh.

BIAS::SimilarityTransform::SimilarityTransform ( const SimilarityTransform & c ) [inline]

calls operator=

Definition at line 67 of file SimilarityTransform.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void SimilarityTransform::Dump ( )

Prints Transformation together with more intuitive rotation representations.

Definition at line 67 of file SimilarityTransform.cpp.

References C_, GetMatrix(), BIAS::RMatrixBase::GetRotationAxisAngle(), Q_, R, and BIAS::RMatrixBase::SetFromQuaternion().

const Vector3<double>& BIAS::SimilarityTransform::GetC ( ) const [inline]

Definition at line 98 of file SimilarityTransform.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Matrix4x4< double > SimilarityTransform::GetMatrix ( ) const

returns the corresponding 4x4 matrix

Definition at line 84 of file SimilarityTransform.cpp.

References C_, Q_, r, R, scale_, and BIAS::RMatrixBase::SetFromQuaternion().

Referenced by Dump().

const Quaternion<double>& BIAS::SimilarityTransform::GetQ ( ) const [inline]

Definition at line 96 of file SimilarityTransform.hh.

BIAS::RMatrixBase BIAS::SimilarityTransform::GetR ( ) const [inline]

Definition at line 104 of file SimilarityTransform.hh.

References R, and BIAS::RMatrixBase::SetFromQuaternion().

void BIAS::SimilarityTransform::InvertIP ( ) [inline]

Inverts the transform.

Definition at line 120 of file SimilarityTransform.hh.

bool SimilarityTransform::Load ( const std::string & inputFile )

Definition at line 37 of file SimilarityTransform.cpp.

void BIAS::SimilarityTransform::Mult | ( | const SimilarityTransform & | arg,
 |  | SimilarityTransform & | result
 | ) | [inline]

result = this * arg

Definition at line 126 of file SimilarityTransform.hh.

References C_, Q_, and scale_.

Referenced by BIAS::operator *().

void BIAS::SimilarityTransform::MultVec | ( | const Vector3< double > & | vec,
 |  | Vector3< double > & | result
 | ) | const [inline]

Definition at line 136 of file SimilarityTransform.hh.

Referenced by BIAS::operator *().

const SimilarityTransform& BIAS::SimilarityTransform::operator= ( const SimilarityTransform & c ) [inline]

copy all elements

Definition at line 74 of file SimilarityTransform.hh.

References C_, Q_, and scale_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

bool SimilarityTransform::Save ( const std::string & outputFile )

Definition at line 52 of file SimilarityTransform.cpp.

void BIAS::SimilarityTransform::Set | ( | const Quaternion< double > & | Q,
 |  | const Vector3< double > & | C,
 |  | const double & | scale = 1.0
 | ) | [inline]

Definition at line 91 of file SimilarityTransform.hh.

void BIAS::SimilarityTransform::SetC ( const Vector3< double > & C ) [inline]

Definition at line 88 of file SimilarityTransform.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::SimilarityTransform::SetQ ( const Quaternion< double > & Q ) [inline]

Definition at line 81 of file SimilarityTransform.hh.

void BIAS::SimilarityTransform::SetR ( const BIAS::RMatrixBase & R ) [inline]

Sets the quaternion.

Definition at line 85 of file SimilarityTransform.hh.

References BIAS::RMatrixBase::GetQuaternion().

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const SimilarityTransform & | p
 | ) | [friend]

Definition at line 157 of file SimilarityTransform.hh.

std::istream& operator>> | ( | std::istream & | is,
 |  | SimilarityTransform & | p
 | ) | [friend]

Definition at line 163 of file SimilarityTransform.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

Vector3<double> BIAS::SimilarityTransform::C_ [protected]

the translation

Definition at line 152 of file SimilarityTransform.hh.

Referenced by Dump(), GetMatrix(), Mult(), BIAS::operator<<(), operator=(), and BIAS::operator>>().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

Quaternion<double> BIAS::SimilarityTransform::Q_ [protected]

this is the rotation

Definition at line 149 of file SimilarityTransform.hh.

Referenced by Dump(), GetMatrix(), Mult(), BIAS::operator<<(), operator=(), and BIAS::operator>>().

double BIAS::SimilarityTransform::scale_ [protected]

Definition at line 154 of file SimilarityTransform.hh.

Referenced by GetMatrix(), Mult(), BIAS::operator<<(), operator=(), and BIAS::operator>>().

The documentation for this class was generated from the following files:
  • Geometry/SimilarityTransform.hh
  • Geometry/SimilarityTransform.cpp
Generated on Wed Jun 21 19:10:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: SimilarityTransformation3D Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

SimilarityTransformation3D Class Reference

transforms 3d points between two different coodinate systems, e.g. More...

#include <Geometry/CoordinateTransform3D.hh>

Detailed Description

transforms 3d points between two different coodinate systems, e.g.

from camera to world coordinates using the camera pose

We define a local coordinate system LCS(imagine camera coordinate system) and a global coordinate system GCS (imagine world coordinate system). Imagine a 4x4 matrix

[ C_[0] ] [ scale_*R C_[1] ] T = [ C_[2] ] [ 0 0 0 1 ]

This matrix converts a point X_L in LCS to its representation in GCS like

X_G = T * X_L

R is the matrix equivalent of Q_.

Obviously, X_L = T.Invert() * X_G

T.invert() = [ R^T/scale_ -R^T*C_/scale_ ] [ 0 0 0 1 ]

C is the origin of the local coordinate system in global coordinates Q (or R) tranforms a direction in local coordinates into a direction in global coordinates. The terms global and local are only used here to distinguish between two arbitrary coordinate systems, neither of them has to be local/global.

Apply for: hand-eye transformation, global-local coordinates, camera to world coordinates, ...

Author:
koeser 03/2006

The documentation for this class was generated from the following file:
  • Geometry/CoordinateTransform3D.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SphericalUndistortion Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SphericalUndistortion

BIAS::SphericalUndistortion Class Reference
[Image Filters and Image Transformations]

transforms sphere images coming from a fisheye-lens according to different projection models. More...

#include <Image/SphericalUndistortion.hh>

Inheritance diagram for BIAS::SphericalUndistortion:

[legend]
Collaboration diagram for BIAS::SphericalUndistortion:

[legend]
List of all members.

Public Types

enum {
PERSPECTIVE, STEREOGRAPHIC, EQUIDISTANT, SINE_LAW,
EQUI_SOLID_ANGLE
}
Projection-type constants. More...

Public Member Functions

int | AddCameraDataToRig (XMLIO &myXML, xmlNodePtr &cameraDataNode) const
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.
void | AddDebugLevel (long int lv)
template<class StorageType>
int | CorrectVignette (Image< StorageType > &src)
Corrects the illumination vignette of an uncalibrated (source-)image.
bool | DebugLevelIsSet (long int lv) const
void | DebugOut () const
template<class StorageType>
int | DrawCircles (Image< StorageType > &src, const double &DegreeStep)
Draw circles of constant angle steps into the uncalibrated spherical image using the angle calibration.
int | EnforceNormalRange (double &theta, double &phi) const
theta and phi are periodic in 2*M_PI, if they are out of a suitable range, try to find best equivalent angle by adding 2*l*M_PI
std::vector< double > | GetAngleCorrX () const
std::vector< double > | GetAngleCorrY () const
double | GetAspectRatio () const
double | GetAspectratio () const
int | GetCamID () const
double | GetCellSizeX ()
double | GetCellSizeY ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | GetDefaultUndistortion (double &f, double &kc1, double &kc2, double &kc3, double &kc4) const
double | GetDownsamplingFactor ()
double | GetFocalLength () const
Get the current camera focal length.
unsigned int | GetHeight () const
get camera image height.
std::vector< double > | GetIlluCorrX () const
std::vector< double > | GetIlluCorrY () const
BIAS::KMatrix | GetKMatrix () const
KMatrix GetKMatrix ()
Get the Cameras KMatrix corresponding.
double | GetMaxCamAngle () const
Returns the maximum fov-angle of the fisheye optics.
double | GetPrincipalX () const
get principal point, x in pixels relative to top left corner
double | GetPrincipalY () const
get principal point, y in pixels relative to top left corner
double | GetRadius () const
int | GetSphereCenter (double &centerX, double &centerY, double &radius) const
int | GetSphereCenter (double &centerX, double &centerY) const
Returns the principal point of the camera image.
double | GetSphereRadius () const
Returns the radius in pixels of the camera image circle.
unsigned int | GetWidth () const
get camera image width.
double | GetZoom () const
Set the current camera zoom, the focal length will be calculated.
void | GetZoomUndistortion (std::vector< CPDiscreteParam > &vp) const
void Init ()
int | Init (XMLIO &myXML, xmlNodePtr &cameraNode)
int | Init (const std::string &filename)
int | Init (const CameraParam &cp)
Initialization with CameraParam-object!
int | Init (const double &centerX, const double &centerY, const double &radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
Initialization by setting all necessary parameters (center, radius, Vectors of Angle and Vignette correction measurement points) from the outside.
void | InitPerspective (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
void | InitSpherical (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
bool | IsInitialized () const
bool | IsPerspective () const
bool | IsSpherical () const
bool | IsZoomCamera () const
True, if camera has a zoom lens.
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | ProjectCoord (const int projectionType, const KMatrix &kMatrix, const HomgPoint2D &Source, HomgPoint2D &Dest) const
Performs a projection of a spherical image coordinate to a projected and calibrated coordinate given a projection-type and a K-matrix.
int | ProjectCoordBack (const int projectionType, const KMatrix &kMatrix, const HomgPoint2D &Source, HomgPoint2D &Dest) const
Performs a projection of a projected and calibrated coordinate to a spherical image coordinate given a projection-type and a K-matrix.
int | ProjectCutOut (const Image< unsigned char > &src, Image< unsigned char > &dst)
Applies the LookUpTable from SetupProjectionLUT to the src-image.
template<class StorageType>
int | ProjectCutOut (const Image< StorageType > &src, Image< StorageType > &dst)
int | ProjectCutOut1 (const Image< unsigned char > &src, Image< unsigned char > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll)
template<class StorageType>
int | ProjectCutOut1 (const Image< StorageType > &src, Image< StorageType > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll)
Applies the LookUpTables from SetupLutPxPySphere and SetupLutPerspPxPy to the src-image.
int | ProjectCutOut2 (const Image< unsigned char > &src, Image< unsigned char > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll)
template<class StorageType>
int | ProjectCutOut2 (const Image< StorageType > &src, Image< StorageType > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll)
template<class StorageType>
int | ProjectImageCylindric (const Image< StorageType > &src, Image< StorageType > &dst, double viewCenterX, double viewCenterY, double zoomFactor)
Performs a cylingric projection of a spherical image given a projection-type and a zoom factor.
int | ReadCameraData (XMLIO &myXML, xmlNodePtr &cameraNode)
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.
int | ReadCameraData (const std::string &Filename)
Read a camera data parameter file and store the data in (*this).
int | ReadFromEXIF (const std::string &filename)
read jpeg EXIF header and set camera parameter
void | RemoveDebugLevel (long int lv)
void | SetCellSize (const double CellSizeX, const double AspectRatio)
Set CCD cell-size in meter.
void SetData_EVID31_147094 ()
void SetData_OMNITECH_ORIFL_190_3 ()
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetDownsampling (const double factor)
Set downsampling factor - all get functions will return transformed values.
void | SetFocalLength (const double f)
Set the current camera focal length, the zoom will be calculated.
void | SetPrincipal (const double x, const double y)
Set principal point in pixels relative to top left corner.
double | SetRadius (double r)
void | SetSize (unsigned int w, unsigned int h)
set size of image seperatly
void SetUnzoomed ()
Set the zoom and focal length of a zoom camera to the default settings.
int | SetupLutPerspPxPy1 (const unsigned int SizeX, const unsigned int SizeY, const int projectionType, KMatrix &KMatDst)
Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera center, to sphere image coordinates.
int | SetupLutPerspPxPy2 (const unsigned int SizeX, const unsigned int SizeY, const int projectionType, KMatrix &KMatDst)
int | SetupLutPxPySphere1 (const unsigned int srcwidth, const unsigned int srcheight, const unsigned int ChanCnt, const double stepwidth)
Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera center, to sphere image coordinates.
int | SetupLutPxPySphere2 (const unsigned int srcwidth, const unsigned int srcheight, const unsigned int ChanCnt, const double stepwidth)
int | SetupProjectionLUT (const unsigned int &srcwidth, const unsigned int &srcheight, const unsigned int &ChanCnt, const unsigned int &SizeX, const unsigned int &SizeY, const double &CenterX, const double &CenterY, const int projectionType, KMatrix &KMatDst)
Fast spehrical undistortion via LookUpTable.
void | SetZoom (const double abszoom)
Set the current camera zoom, the focal length will be calculated.
void | SetZoomCamera (const bool zoomCam)
Set to 'true', if camera has a zoom lens.
SphericalUndistortion (const double &centerX, const double &centerY, const double &radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY)
filter initialization with calibration curve measurements
SphericalUndistortion (const CameraParam &cp)
common constructor - initialization with CameraParam-object!
SphericalUndistortion (const SphericalUndistortion &sp)
copy constructor
SphericalUndistortion ()
default constructor
int | TransfCoordImage2Sphere (const double &SourceX, const double &SourceY, double &theta, double &phi) const
int | TransfCoordImage2Sphere (const HomgPoint2D &Source, double &theta, double &phi) const
Transforms a coordinate pair of image coordinates x, y in the uncalibrated spherical image, to a calibrated pair of polar coordinates phi, theta.
int | TransfCoordRotateSphere2Image (double theta, double phi, const double &viewCenterX, const double &viewCenterY, double &SourceX, double &SourceY) const
int | TransfCoordRotateSphere2Image (double theta, double phi, const double &viewCenterX, const double &viewCenterY, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.
int | TransfCoordSphere2CalibImage (const double &theta, const double &phi, double &SourceX, double &SourceY) const
int | TransfCoordSphere2CalibImage (const double &theta, const double &phi, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in an equidistant spherical image.
int | TransfCoordSphere2Image (const double &theta, const double &phi, double &SourceX, double &SourceY) const
int | TransfCoordSphere2Image (const double &theta, const double &phi, HomgPoint2D &Source) const
Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.
int | WriteCameraData (const std::string &Filename) const
Write all data to a camera data parameter file ).
~SphericalUndistortion ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | AddCameraDataToXMLTree (XMLIO &myXML, xmlNodePtr &rootNode) const
double | InterpolateAbsZoom_ ()
double | InterpolateFocalLength_ ()
int | ReadCameraDataV0_8 (XMLIO &myXML, xmlNodePtr &cameraNode)
int | ReadCameraDataV1_0 (XMLIO &myXML, xmlNodePtr &cameraNode)

Protected Attributes

long int | _liDebugLevel
std::vector< double > | AngleCorrX_
std::vector< double > | AngleCorrY_
double | aspectratio_
int | CamID_
std::string | CamModel_
double | cellSizeX_
double | cellSizeY_
unsigned int | CutOutHeight_
unsigned int | CutOutWidth_
double | downsamplingFactor_
double | focallengthDef_
double | focallengthZoom_
unsigned int | height_
std::vector< double > | IlluCorrX_
std::vector< double > | IlluCorrY_
Interpolator interpolatorAngle_
Interpolator interpolatorAngleBack_
Interpolator interpolatorIllu_
bool | IsInitialized_
double | kc1Def_
double | kc2Def_
double | kc3Def_
double | kc4Def_
std::vector< CPDiscreteParam > | knownparams_vect_
bool | LensIsSpherical_
std::string | LensModel_
LuTEntry * LuT_
LuTpxpyEntry * LuTPerspPxPy_
LuTEntry * LuTPxPySphere_
double | MaxCamAngle_
double | principalX_
double | principalY_
double | radius_
unsigned int | width_
double | zoom_
bool | zoomCamera_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Classes

struct | LuTEntry
struct | LuTpxpyEntry

Detailed Description

transforms sphere images coming from a fisheye-lens according to different projection models.

Author:
streckel
Input is an image from a fisheye lens looking circular with a black border. 5 types of projection are supported (see: M.M.Fleck "Perspective Projection: The wrong imaging model")

The algorithm expects a 3rd order calibration polynomial to get a linear relation between viewing angle and distance to circle center.

The supported projections are: PERSPECTIVE : Perspective projection - p=k*tan(theta) STEREOGRAPHIC : Stereographic projection - p=k*tan(theta/2) EQUIDISTANT : Equidistant projection - p=k*theta SINE_LAW : sine-law projection - p=k*sin(theta) EQUI_SOLID_ANGLE : equi-solid-angle projection - p=k*sin(theta/2) p : projected distance from circle center theta : angle between projected point and optical axis

Definition at line 70 of file SphericalUndistortion.hh.

Member Enumeration Documentation

anonymous enum

Projection-type constants.

Author:
Birger Streckel
Enumerator:
PERSPECTIVE
STEREOGRAPHIC
EQUIDISTANT
SINE_LAW
EQUI_SOLID_ANGLE

Definition at line 77 of file SphericalUndistortion.hh.

Constructor & Destructor Documentation

SphericalUndistortion::SphericalUndistortion ( )

default constructor

Author:
Birger Streckel

Definition at line 78 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, LuT_, LuTPerspPxPy_, and LuTPxPySphere_.

SphericalUndistortion::SphericalUndistortion ( const SphericalUndistortion & sp )

copy constructor

Author:
Birger Streckel

Definition at line 86 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, interpolatorAngle_, interpolatorAngleBack_, interpolatorIllu_, BIAS::CameraParam::IsInitialized_, LuT_, LuTPerspPxPy_, LuTPxPySphere_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::CameraParam::radius_.

SphericalUndistortion::SphericalUndistortion ( const CameraParam & cp )

common constructor - initialization with CameraParam-object!

Author:
Birger Streckel

Definition at line 120 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::Init(), LuT_, LuTPerspPxPy_, and LuTPxPySphere_.

BIAS::SphericalUndistortion::SphericalUndistortion | ( | const double & | centerX,
 |  | const double & | centerY,
 |  | const double & | radius,
 |  | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) |

filter initialization with calibration curve measurements

Author:
Birger Streckel

SphericalUndistortion::~SphericalUndistortion ( )

Definition at line 127 of file SphericalUndistortion.cpp.

References LuT_, LuTPerspPxPy_, and LuTPxPySphere_.

Member Function Documentation

int CameraParam::AddCameraDataToRig | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraDataNode
 | ) | const [inherited]

Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
cameraDataNode | points to a "CameraData"-node to append the "Camera"-node
Author:
streckel 06/2004

Definition at line 377 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::XMLIO::addChildNode(), BIASERR, and BIAS::CameraParam::IsInitialized_.

int CameraParam::AddCameraDataToXMLTree | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | rootNode
 | ) | const [protected, inherited]

Definition at line 397 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeX_, BIAS::CameraParam::height_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, and BIAS::CameraParam::width_.

Referenced by BIAS::CameraParam::AddCameraDataToRig(), and BIAS::CameraParam::WriteCameraData().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
int SphericalUndistortion::CorrectVignette ( Image< StorageType > & src )

Corrects the illumination vignette of an uncalibrated (source-)image.

Author:
Birger Streckel

Definition at line 871 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, interpolatorIllu_, BIAS::CameraParam::IsInitialized_, max, BIAS::Interpolator::Spline(), StorageType, and TransfCoordImage2Sphere().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void CameraParam::DebugOut ( ) const [inherited]

Definition at line 1275 of file CameraParam.cpp.

References BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::height_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

Referenced by main().

template<class StorageType>
int SphericalUndistortion::DrawCircles | ( | Image< StorageType > & | src,
 |  | const double & | DegreeStep
 | ) |

Draw circles of constant angle steps into the uncalibrated spherical image using the angle calibration.

Author:
Birger Streckel

Definition at line 523 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::ImageBase::GetChannelCount(), interpolatorAngle_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::Interpolator::SplineFromLuT(), and StorageType.

int SphericalUndistortion::EnforceNormalRange | ( | double & | theta,
 |  | double & | phi
 | ) | const

theta and phi are periodic in 2*M_PI, if they are out of a suitable range, try to find best equivalent angle by adding 2*l*M_PI

Returns:
0 on success, <0 indicates that at least one angle is invalid
Author:
koeser 10/2004

Definition at line 783 of file SphericalUndistortion.cpp.

References BIASERR, and BIAS::CameraParam::MaxCamAngle_.

std::vector<double> BIAS::CameraParam::GetAngleCorrX ( ) const [inline, inherited]

Definition at line 244 of file CameraParam.hh.

std::vector<double> BIAS::CameraParam::GetAngleCorrY ( ) const [inline, inherited]

Definition at line 247 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectRatio ( ) const [inline, inherited]

Definition at line 236 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectratio ( ) const [inline, inherited]

Definition at line 167 of file CameraParam.hh.

References BIASERR.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

int BIAS::CameraParam::GetCamID ( ) const [inline, inherited]

Definition at line 191 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeX ( ) [inline, inherited]

Definition at line 142 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeY ( ) [inline, inherited]

Definition at line 143 of file CameraParam.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

void BIAS::CameraParam::GetDefaultUndistortion | ( | double & | f,
 |  | double & | kc1,
 |  | double & | kc2,
 |  | double & | kc3,
 |  | double & | kc4
 | ) | const [inline, inherited]

Definition at line 214 of file CameraParam.hh.

double CameraParam::GetDownsamplingFactor ( ) [inherited]

Definition at line 292 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, and BIAS::CameraParam::IsInitialized_.

double CameraParam::GetFocalLength ( ) const [inherited]

Get the current camera focal length.

Author:
buck

Definition at line 275 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::CameraParam::GetKMatrix().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int CameraParam::GetHeight ( ) const [inherited]

get camera image height.

Author:
buck

Definition at line 218 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::height_, and BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrX ( ) const [inline, inherited]

Definition at line 250 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrY ( ) const [inline, inherited]

Definition at line 253 of file CameraParam.hh.

Referenced by BIAS::UnVignette::UnVignette().

KMatrix CameraParam::GetKMatrix ( ) const [inherited]

Definition at line 179 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::IsPerspective(), K, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::RigParameter::ReadRigDataV0_8(), and BIAS::RigParameter::SetData_DummyRig().

KMatrix SphericalUndistortion::GetKMatrix ( )

Get the Cameras KMatrix corresponding.

Author:
streckel

Definition at line 299 of file SphericalUndistortion.cpp.

References BIASERR, GetSphereCenter(), BIAS::CameraParam::IsInitialized_, K, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::Matrix3x3< T >::SetIdentity(), and TransfCoordSphere2Image().

Referenced by BIAS::RigParameter::SetData_DummyRig().

double SphericalUndistortion::GetMaxCamAngle ( ) const

Returns the maximum fov-angle of the fisheye optics.

Author:
Birger Streckel

Definition at line 290 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::MaxCamAngle_.

double CameraParam::GetPrincipalX ( ) const [inherited]

get principal point, x in pixels relative to top left corner

Author:
buck

Definition at line 200 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::principalX_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double CameraParam::GetPrincipalY ( ) const [inherited]

get principal point, y in pixels relative to top left corner

Author:
buck

Definition at line 209 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::principalY_.

Referenced by BIAS::RigParameter::AddCameraOnly(), and BIAS::UnVignette::UnVignette().

double BIAS::CameraParam::GetRadius ( ) const [inline, inherited]

Definition at line 195 of file CameraParam.hh.

int SphericalUndistortion::GetSphereCenter | ( | double & | centerX,
 |  | double & | centerY,
 |  | double & | radius
 | ) | const

Definition at line 268 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::CameraParam::radius_.

int SphericalUndistortion::GetSphereCenter | ( | double & | centerX,
 |  | double & | centerY
 | ) | const

Returns the principal point of the camera image.

Author:
Birger Streckel

Definition at line 257 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::principalX_, and BIAS::CameraParam::principalY_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_(), and GetKMatrix().

double SphericalUndistortion::GetSphereRadius ( ) const

Returns the radius in pixels of the camera image circle.

Author:
Birger Streckel

Definition at line 280 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::radius_.

unsigned int CameraParam::GetWidth ( ) const [inherited]

get camera image width.

Author:
buck

Definition at line 226 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::width_.

Referenced by BIAS::UnVignette::UnVignette().

double CameraParam::GetZoom ( ) const [inherited]

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Definition at line 259 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

void BIAS::CameraParam::GetZoomUndistortion ( std::vector< CPDiscreteParam > & vp ) const [inline, inherited]

Definition at line 225 of file CameraParam.hh.

References it.

void CameraParam::Init ( ) [inherited]

Definition at line 87 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeX_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::kc1Def_, BIAS::CameraParam::kc2Def_, BIAS::CameraParam::kc3Def_, BIAS::CameraParam::kc4Def_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::CameraParam::width_, BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::CameraParam::CameraParam(), Init(), BIAS::MatlabTBUndistortion::Init(), BIAS::MatlabTBUndistortion::MatlabTBUndistortion(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and SphericalUndistortion().

int SphericalUndistortion::Init | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) |

Reimplemented from BIAS::CameraParam.

Definition at line 168 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIASERR, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::CameraParam::ReadCameraData(), and res.

int SphericalUndistortion::Init ( const std::string & filename )

Reimplemented from BIAS::CameraParam.

Definition at line 149 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIASERR, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::CameraParam::ReadCameraData(), and res.

int SphericalUndistortion::Init ( const CameraParam & cp )

Initialization with CameraParam-object!

Author:
Birger Streckel

Reimplemented from BIAS::CameraParam.

Definition at line 133 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::IsSpherical(), BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, and res.

int SphericalUndistortion::Init | ( | const double & | centerX,
 |  | const double & | centerY,
 |  | const double & | radius,
 |  | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) |

Initialization by setting all necessary parameters (center, radius, Vectors of Angle and Vignette correction measurement points) from the outside.

Definition at line 187 of file SphericalUndistortion.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIASERR, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::Interpolator::InitSpline(), interpolatorAngle_, interpolatorAngleBack_, interpolatorIllu_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::Interpolator::PrepareLuTSpline(), BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::Interpolator::SetControlPoints(), BIAS::Interpolator::SetKnotPoints(), and BIAS::Interpolator::Spline().

Referenced by main().

void BIAS::CameraParam::InitPerspective | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | focallength,
 |  | const double | aspectratio,
 |  | const double | k1,
 |  | const double | k2,
 |  | const double | k3,
 |  | const double | k4,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) | [inherited]

void BIAS::CameraParam::InitSpherical | ( | const std::string | CamModel,
 |  | const int | CamID,
 |  | const std::string | LensModel,
 |  | const int | imgWidth,
 |  | const int | imgHeight,
 |  | const double | principalX,
 |  | const double | principalY,
 |  | const double | radius,
 |  | const std::vector< double > & | AngleCorrX,
 |  | const std::vector< double > & | AngleCorrY,
 |  | const std::vector< double > & | IlluCorrX,
 |  | const std::vector< double > & | IlluCorrY
 | ) | [inherited]

double CameraParam::InterpolateAbsZoom_ ( ) [protected, inherited]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 1744 of file CameraParam.cpp.

References BIAS::CameraParam::focallengthZoom_, and BIAS::CameraParam::knownparams_vect_.

Referenced by BIAS::CameraParam::SetFocalLength().

double CameraParam::InterpolateFocalLength_ ( ) [protected, inherited]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 1701 of file CameraParam.cpp.

References BIAS::CameraParam::knownparams_vect_, and BIAS::CameraParam::zoom_.

Referenced by BIAS::CameraParam::SetZoom().

bool CameraParam::IsInitialized ( ) const [inherited]

Definition at line 175 of file CameraParam.cpp.

References BIAS::CameraParam::IsInitialized_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), main(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage(), and BIAS::UnVignette::UnVignette().

bool BIAS::CameraParam::IsPerspective ( ) const [inline, inherited]

Definition at line 242 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetZoom(), BIAS::MatlabTBUndistortion::Init(), main(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), and BIAS::CameraParam::SetZoom().

bool BIAS::CameraParam::IsSpherical ( ) const [inline, inherited]

Definition at line 240 of file CameraParam.hh.

Referenced by Init(), main(), and BIAS::RigParameter::ReadRigDataV0_8().

bool CameraParam::IsZoomCamera ( ) const [inherited]

True, if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 251 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, and BIAS::CameraParam::zoomCamera_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int SphericalUndistortion::ProjectCoord | ( | const int | projectionType,
 |  | const KMatrix & | kMatrix,
 |  | const HomgPoint2D & | Source,
 |  | HomgPoint2D & | Dest
 | ) | const

Performs a projection of a spherical image coordinate to a projected and calibrated coordinate given a projection-type and a K-matrix.

Author:
Birger Streckel

Definition at line 392 of file SphericalUndistortion.cpp.

References BIASERR, EQUI_SOLID_ANGLE, EQUIDISTANT, BIAS::CameraParam::IsInitialized_, PERSPECTIVE, BIAS::HomgPoint2D::Set(), SINE_LAW, STEREOGRAPHIC, and TransfCoordImage2Sphere().

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_().

int SphericalUndistortion::ProjectCoordBack | ( | const int | projectionType,
 |  | const KMatrix & | kMatrix,
 |  | const HomgPoint2D & | Source,
 |  | HomgPoint2D & | Dest
 | ) | const

Performs a projection of a projected and calibrated coordinate to a spherical image coordinate given a projection-type and a K-matrix.

Author:
Birger Streckel

Definition at line 445 of file SphericalUndistortion.cpp.

References BIASERR, EQUI_SOLID_ANGLE, EQUIDISTANT, BIAS::KMatrix::Invert(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, PERSPECTIVE, SINE_LAW, STEREOGRAPHIC, and TransfCoordSphere2Image().

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), SetupLutPerspPxPy1(), and SetupLutPerspPxPy2().

int SphericalUndistortion::ProjectCutOut | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst
 | ) |

Applies the LookUpTable from SetupProjectionLUT to the src-image.

If dst is not set, this is done internally.

Author:
evers 2004

Definition at line 1005 of file SphericalUndistortion.cpp.

References BIASASSERT, BIAS::ImageBase::GetChannelCount(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::IsEmpty(), LuT_, and BIAS::SphericalUndistortion::LuTEntry::offset.

template<class StorageType>
int BIAS::SphericalUndistortion::ProjectCutOut | ( | const Image< StorageType > & | src,
 |  | Image< StorageType > & | dst
 | ) |

int SphericalUndistortion::ProjectCutOut1 | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst,
 |  | const double | stepwidth,
 |  | const double & | yaw,
 |  | const double & | pitch,
 |  | const double & | roll
 | ) |

Definition at line 1210 of file SphericalUndistortion.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::IsEmpty(), LuTPerspPxPy_, LuTPxPySphere_, and BIAS::SphericalUndistortion::LuTEntry::offset.

template<class StorageType>
int BIAS::SphericalUndistortion::ProjectCutOut1 | ( | const Image< StorageType > & | src,
 |  | Image< StorageType > & | dst,
 |  | const double | stepwidth,
 |  | const double & | yaw,
 |  | const double & | pitch,
 |  | const double & | roll
 | ) |

Applies the LookUpTables from SetupLutPxPySphere and SetupLutPerspPxPy to the src-image.

Using 2 LUTs allows an active rotation of the perspective camera in the fisheye image. If dst is not set, this is done internally.

Author:
streckel 01/2005

int SphericalUndistortion::ProjectCutOut2 | ( | const Image< unsigned char > & | src,
 |  | Image< unsigned char > & | dst,
 |  | const double | stepwidth,
 |  | const double & | yaw,
 |  | const double & | pitch,
 |  | const double & | roll
 | ) |

Definition at line 1394 of file SphericalUndistortion.cpp.

References BIASASSERT, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::IsEmpty(), LuTPerspPxPy_, LuTPxPySphere_, BIAS::SphericalUndistortion::LuTEntry::offset, and BIAS::SphericalUndistortion::LuTEntry::weight.

template<class StorageType>
int BIAS::SphericalUndistortion::ProjectCutOut2 | ( | const Image< StorageType > & | src,
 |  | Image< StorageType > & | dst,
 |  | const double | stepwidth,
 |  | const double & | yaw,
 |  | const double & | pitch,
 |  | const double & | roll
 | ) |

template<class StorageType>
int SphericalUndistortion::ProjectImageCylindric | ( | const Image< StorageType > & | src,
 |  | Image< StorageType > & | dst,
 |  | double | viewCenterX,
 |  | double | viewCenterY,
 |  | double | zoomFactor
 | ) |

Performs a cylingric projection of a spherical image given a projection-type and a zoom factor.

Parameters:
src | source image
dst | (output) uninitialized destination image

Definition at line 325 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::Image< StorageType >::FastBilinearInterpolationGrey(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, StorageType, and TransfCoordRotateSphere2Image().

int CameraParam::ReadCameraData | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [inherited]

Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.

Parameters:
myXML | points to the XML-Tree
rigNode | points to a "Camera"-node to evaluate
Author:
streckel 06/2004

Definition at line 628 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIASWARN, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeName(), BIAS::CameraParam::height_, BIAS::CameraParam::Init(), BIAS::CameraParam::LensIsSpherical_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

int CameraParam::ReadCameraData ( const std::string & Filename ) [inherited]

Read a camera data parameter file and store the data in (*this).

Parameters:
Filename Name of the XML-camera-data-file, document tag has to be "Camera"
Author:
streckel 06/2004

Definition at line 604 of file CameraParam.cpp.

References BIASERR, BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().

Referenced by Init(), BIAS::CameraParam::Init(), and main().

int CameraParam::ReadCameraDataV0_8 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected, inherited]

Definition at line 1026 of file CameraParam.cpp.

References BIASERR.

Referenced by BIAS::CameraParam::ReadCameraData().

int CameraParam::ReadCameraDataV1_0 | ( | XMLIO & | myXML,
 |  | xmlNodePtr & | cameraNode
 | ) | [protected, inherited]

Definition at line 820 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIASERR, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentDouble(), BIAS::XMLIO::getNodeContentInt(), BIAS::XMLIO::getNodeName(), BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::LensModel_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::CameraParam::ReadCameraData().

int CameraParam::ReadFromEXIF ( const std::string & filename ) [inherited]

read jpeg EXIF header and set camera parameter

Returns:
0 on success
Author:
koeser 07/2005

Definition at line 1531 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::downsamplingFactor_, BIAS::CameraParam::focallengthDef_, BIAS::ImageAttributes::GetFocalLengthXPixel(), BIAS::ImageAttributes::GetHardwareName(), BIAS::ImageAttributes::GetImageDimensions(), BIAS::ImageAttributes::GetPixelSizeXMeter(), BIAS::ImageAttributes::GetPixelSizeYMeter(), BIAS::ImageAttributes::GetPrincipalPoint(), BIAS::CameraParam::height_, BIAS::CameraParam::Init(), BIAS::ImageAttributes::InitExifTags(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::ImageAttributes::Read(), BIAS::CameraParam::width_, and BIAS::CameraParam::zoomCamera_.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void CameraParam::SetCellSize | ( | const double | CellSizeX,
 |  | const double | AspectRatio
 | ) | [inherited]

Set CCD cell-size in meter.

AspectRatio is CS_Y/CS_X

Author:
streckel

Definition at line 234 of file CameraParam.cpp.

References BIAS::CameraParam::aspectratio_, BIAS::CameraParam::cellSizeX_, and BIAS::CameraParam::cellSizeY_.

void CameraParam::SetData_EVID31_147094 ( ) [inherited]

Definition at line 1324 of file CameraParam.cpp.

Referenced by BIAS::RigParameter::SetData_DummyRig().

void CameraParam::SetData_OMNITECH_ORIFL_190_3 ( ) [inherited]

Definition at line 1605 of file CameraParam.cpp.

References BIAS::CameraParam::AngleCorrX_, BIAS::CameraParam::AngleCorrY_, BIAS::CameraParam::aspectratio_, BIAS::CameraParam::CamID_, BIAS::CameraParam::CamModel_, BIAS::CameraParam::cellSizeY_, BIAS::CameraParam::height_, BIAS::CameraParam::IlluCorrX_, BIAS::CameraParam::IlluCorrY_, BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::LensModel_, BIAS::CameraParam::radius_, and BIAS::CameraParam::width_.

Referenced by main(), and BIAS::RigParameter::SetData_DummyRig().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

void CameraParam::SetDownsampling ( const double factor ) [inherited]

Set downsampling factor - all get functions will return transformed values.

E.g. if your image size(width and height) is half the original and the field of view did stay the same, then set factor to 2.
CAUTION: The Set-functions still require the original values

Author:
streckel

Definition at line 333 of file CameraParam.cpp.

References BIAS::CameraParam::downsamplingFactor_.

void CameraParam::SetFocalLength ( const double f ) [inherited]

Set the current camera focal length, the zoom will be calculated.

Author:
buck

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 317 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::InterpolateAbsZoom_(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void CameraParam::SetPrincipal | ( | const double | x,
 |  | const double | y
 | ) | [inherited]

Set principal point in pixels relative to top left corner.

Author:
streckel

Definition at line 195 of file CameraParam.cpp.

References BIAS::CameraParam::principalX_, and BIAS::CameraParam::principalY_.

double BIAS::CameraParam::SetRadius ( double r ) [inline, inherited]

Definition at line 203 of file CameraParam.hh.

References BIASERR.

void BIAS::CameraParam::SetSize | ( | unsigned int | w,
 |  | unsigned int | h
 | ) | [inline, inherited]

set size of image seperatly

Definition at line 176 of file CameraParam.hh.

void CameraParam::SetUnzoomed ( ) [inherited]

Set the zoom and focal length of a zoom camera to the default settings.

Author:
streckel 06/2004

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 337 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::focallengthDef_, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::knownparams_vect_, BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

Referenced by BIAS::MatlabTBUndistortion::SetUnzoomed().

int SphericalUndistortion::SetupLutPerspPxPy1 | ( | const unsigned int | SizeX,
 |  | const unsigned int | SizeY,
 |  | const int | projectionType,
 |  | KMatrix & | KMatDst
 | ) |

Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera center, to sphere image coordinates.

Parameters:
ChanCnt | channel count.
SizeX,SizeY | Is the size of the resulting perspective image. Since there should be no zoom this determines also the perspective cutouts field of view.
projectionType | normally PERSPECTIVE.
KMatDst | Returns the KMatrix of the perspective image.
stepwidth | of PhiX, PhiY in rad
Author:
streckel 01/2005

Definition at line 1130 of file SphericalUndistortion.cpp.

References BIASABORT, BIASERR, CutOutHeight_, CutOutWidth_, BIAS::CameraParam::IsInitialized_, LuTPerspPxPy_, BIAS::SphericalUndistortion::LuTpxpyEntry::PhiX, BIAS::SphericalUndistortion::LuTpxpyEntry::PhiY, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, ProjectCoordBack(), BIAS::Matrix3x3< T >::SetIdentity(), and TransfCoordImage2Sphere().

int SphericalUndistortion::SetupLutPerspPxPy2 | ( | const unsigned int | SizeX,
 |  | const unsigned int | SizeY,
 |  | const int | projectionType,
 |  | KMatrix & | KMatDst
 | ) |

Definition at line 1327 of file SphericalUndistortion.cpp.

References BIASABORT, BIASERR, CutOutHeight_, CutOutWidth_, BIAS::CameraParam::IsInitialized_, LuTPerspPxPy_, BIAS::SphericalUndistortion::LuTpxpyEntry::PhiX, BIAS::SphericalUndistortion::LuTpxpyEntry::PhiY, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, ProjectCoordBack(), BIAS::Matrix3x3< T >::SetIdentity(), and TransfCoordImage2Sphere().

int SphericalUndistortion::SetupLutPxPySphere1 | ( | const unsigned int | srcwidth,
 |  | const unsigned int | srcheight,
 |  | const unsigned int | ChanCnt,
 |  | const double | stepwidth
 | ) |

Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera center, to sphere image coordinates.

Parameters:
srcwidth,srcheight | size of the sperical source image.
ChanCnt | channel count.
stepwidth | of PhiX, PhiY in rad
Author:
streckel 01/2005

Definition at line 1054 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, LuTPxPySphere_, BIAS::SphericalUndistortion::LuTEntry::offset, TransfCoordSphere2Image(), and BIAS::SphericalUndistortion::LuTEntry::weight.

int SphericalUndistortion::SetupLutPxPySphere2 | ( | const unsigned int | srcwidth,
 |  | const unsigned int | srcheight,
 |  | const unsigned int | ChanCnt,
 |  | const double | stepwidth
 | ) |

Definition at line 1270 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, LuTPxPySphere_, BIAS::SphericalUndistortion::LuTEntry::offset, TransfCoordSphere2Image(), and BIAS::SphericalUndistortion::LuTEntry::weight.

int SphericalUndistortion::SetupProjectionLUT | ( | const unsigned int & | srcwidth,
 |  | const unsigned int & | srcheight,
 |  | const unsigned int & | ChanCnt,
 |  | const unsigned int & | SizeX,
 |  | const unsigned int & | SizeY,
 |  | const double & | CenterX,
 |  | const double & | CenterY,
 |  | const int | projectionType,
 |  | KMatrix & | KMatDst
 | ) |

Fast spehrical undistortion via LookUpTable.

This function creates a table, use ProjectCutOut to apply it.

Parameters:
srcwidth,srcheight | size of the sperical source image.
ChanCnt | channel count.
SizeX,SizeY | Is the size of the resulting perspective image. Since there should be no zoom this determines also the perspective cutouts field of view.
CenterX,CenterY | point in sphere image to which the tangential mapping plane is attached. This point is mapped to the center of the resulting image.
projectionType | normally PERSPECTIVE.
KMatDst | Returns the KMatrix of the perspective image.
Author:
evers 2004

Definition at line 908 of file SphericalUndistortion.cpp.

References BIASABORT, BIASERR, BIAS::SphericalUndistortion::LuTEntry::offset, p, BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::SphericalUndistortion::LuTEntry::weight.

void CameraParam::SetZoom ( const double abszoom ) [inherited]

Set the current camera zoom, the focal length will be calculated.

Author:
buck

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 300 of file CameraParam.cpp.

References BIASERR, BIAS::CameraParam::focallengthZoom_, BIAS::CameraParam::InterpolateFocalLength_(), BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::IsPerspective(), BIAS::CameraParam::zoom_, and BIAS::CameraParam::zoomCamera_.

void CameraParam::SetZoomCamera ( const bool zoomCam ) [inherited]

Set to 'true', if camera has a zoom lens.

Author:
streckel 06/2004

Definition at line 246 of file CameraParam.cpp.

References BIAS::CameraParam::zoomCamera_.

int SphericalUndistortion::TransfCoordImage2Sphere | ( | const double & | SourceX,
 |  | const double & | SourceY,
 |  | double & | theta,
 |  | double & | phi
 | ) | const

Definition at line 571 of file SphericalUndistortion.cpp.

References BIASERR, interpolatorAngle_, interpolatorAngleBack_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, and BIAS::Interpolator::SplineFromLuT().

int SphericalUndistortion::TransfCoordImage2Sphere | ( | const HomgPoint2D & | Source,
 |  | double & | theta,
 |  | double & | phi
 | ) | const

Transforms a coordinate pair of image coordinates x, y in the uncalibrated spherical image, to a calibrated pair of polar coordinates phi, theta.

Author:
Birger Streckel

Definition at line 558 of file SphericalUndistortion.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_(), CorrectVignette(), ProjectCoord(), SetupLutPerspPxPy1(), SetupLutPerspPxPy2(), and TransfCoordRotateSphere2Image().

int SphericalUndistortion::TransfCoordRotateSphere2Image | ( | double | theta,
 |  | double | phi,
 |  | const double & | viewCenterX,
 |  | const double & | viewCenterY,
 |  | double & | SourceX,
 |  | double & | SourceY
 | ) | const

Definition at line 632 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::Vector3< T >::CoordEuclidianToSphere(), BIAS::Vector3< T >::CoordSphereToEuclidian(), interpolatorAngle_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::Quaternion< QUAT_TYPE >::MultVec(), BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, BIAS::Quaternion< QUAT_TYPE >::SetValueAsAxisRad(), BIAS::Interpolator::SplineFromLuT(), and TransfCoordImage2Sphere().

int SphericalUndistortion::TransfCoordRotateSphere2Image | ( | double | theta,
 |  | double | phi,
 |  | const double & | viewCenterX,
 |  | const double & | viewCenterY,
 |  | HomgPoint2D & | Source
 | ) | const

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.

Author:
Birger Streckel

Definition at line 611 of file SphericalUndistortion.cpp.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_(), and ProjectImageCylindric().

int SphericalUndistortion::TransfCoordSphere2CalibImage | ( | const double & | theta,
 |  | const double & | phi,
 |  | double & | SourceX,
 |  | double & | SourceY
 | ) | const

Definition at line 823 of file SphericalUndistortion.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, and BIAS::CameraParam::radius_.

int SphericalUndistortion::TransfCoordSphere2CalibImage | ( | const double & | theta,
 |  | const double & | phi,
 |  | HomgPoint2D & | Source
 | ) | const

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in an equidistant spherical image.

Author:
Birger Streckel

Definition at line 767 of file SphericalUndistortion.cpp.

int SphericalUndistortion::TransfCoordSphere2Image | ( | const double & | theta,
 |  | const double & | phi,
 |  | double & | SourceX,
 |  | double & | SourceY
 | ) | const

Definition at line 725 of file SphericalUndistortion.cpp.

References BIASERR, interpolatorAngle_, BIAS::CameraParam::IsInitialized_, BIAS::CameraParam::MaxCamAngle_, BIAS::CameraParam::principalX_, BIAS::CameraParam::principalY_, BIAS::CameraParam::radius_, and BIAS::Interpolator::SplineFromLuT().

int SphericalUndistortion::TransfCoordSphere2Image | ( | const double & | theta,
 |  | const double & | phi,
 |  | HomgPoint2D & | Source
 | ) | const

Transforms a calibrated pair of polar coordinates phi, theta to a coordinate pair of image coordinates x, y in the uncalibrated spherical image.

Author:
Birger Streckel

Definition at line 708 of file SphericalUndistortion.cpp.

Referenced by GetKMatrix(), ProjectCoordBack(), SetupLutPxPySphere1(), and SetupLutPxPySphere2().

int CameraParam::WriteCameraData ( const std::string & Filename ) const [inherited]

Write all data to a camera data parameter file ).

Parameters:
Filename Name of the XML-camera-data-file, document tag will be to be "Camera"
Author:
streckel 06/2004

Definition at line 355 of file CameraParam.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIASERR, CAMERA_PARAMETER_CURRENT_XML_VERSION, BIAS::XMLIO::create(), BIAS::CameraParam::IsInitialized_, and BIAS::XMLIO::write().

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

std::vector<double> BIAS::CameraParam::AngleCorrX_ [protected, inherited]

Definition at line 356 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and SphericalUndistortion().

std::vector<double> BIAS::CameraParam::AngleCorrY_ [protected, inherited]

Definition at line 357 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and SphericalUndistortion().

double BIAS::CameraParam::aspectratio_ [protected, inherited]

Definition at line 317 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetCellSize(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::MatlabTBUndistortion::Undistort().

int BIAS::CameraParam::CamID_ [protected, inherited]

Definition at line 301 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

std::string BIAS::CameraParam::CamModel_ [protected, inherited]

Definition at line 300 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::cellSizeX_ [protected, inherited]

Definition at line 320 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::Init(), and BIAS::CameraParam::SetCellSize().

double BIAS::CameraParam::cellSizeY_ [protected, inherited]

Definition at line 320 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetCellSize(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

unsigned int BIAS::SphericalUndistortion::CutOutHeight_ [protected]

Definition at line 338 of file SphericalUndistortion.hh.

Referenced by SetupLutPerspPxPy1(), and SetupLutPerspPxPy2().

unsigned int BIAS::SphericalUndistortion::CutOutWidth_ [protected]

Definition at line 338 of file SphericalUndistortion.hh.

Referenced by SetupLutPerspPxPy1(), and SetupLutPerspPxPy2().

double BIAS::CameraParam::downsamplingFactor_ [protected, inherited]

Definition at line 332 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetDownsamplingFactor(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetHeight(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetDownsampling().

double BIAS::CameraParam::focallengthDef_ [protected, inherited]

Definition at line 338 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetFocalLength(), BIAS::MatlabTBUndistortion::SetUnzoomed(), BIAS::CameraParam::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::focallengthZoom_ [protected, inherited]

Definition at line 346 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::InterpolateAbsZoom_(), BIAS::CameraParam::InterpolateAbsZoom_(), BIAS::MatlabTBUndistortion::SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), BIAS::CameraParam::SetZoom(), and BIAS::MatlabTBUndistortion::Undistort().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

unsigned int BIAS::CameraParam::height_ [protected, inherited]

Definition at line 311 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::GetHeight(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

std::vector<double> BIAS::CameraParam::IlluCorrX_ [protected, inherited]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 351 of file CameraParam.hh.

Referenced by CorrectVignette(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and SphericalUndistortion().

std::vector<double> BIAS::CameraParam::IlluCorrY_ [protected, inherited]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 352 of file CameraParam.hh.

Referenced by CorrectVignette(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and SphericalUndistortion().

Interpolator BIAS::SphericalUndistortion::interpolatorAngle_ [protected]

Definition at line 327 of file SphericalUndistortion.hh.

Referenced by DrawCircles(), Init(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), and TransfCoordSphere2Image().

Interpolator BIAS::SphericalUndistortion::interpolatorAngleBack_ [protected]

Definition at line 328 of file SphericalUndistortion.hh.

Referenced by Init(), SphericalUndistortion(), and TransfCoordImage2Sphere().

Interpolator BIAS::SphericalUndistortion::interpolatorIllu_ [protected]

Definition at line 329 of file SphericalUndistortion.hh.

Referenced by CorrectVignette(), Init(), and SphericalUndistortion().

bool BIAS::CameraParam::IsInitialized_ [protected, inherited]

Definition at line 297 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToRig(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), CorrectVignette(), BIAS::CameraParam::DebugOut(), BIAS::MatlabTBUndistortion::Distort(), DrawCircles(), BIAS::CameraParam::GetDownsamplingFactor(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetHeight(), GetKMatrix(), GetMaxCamAngle(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), GetSphereCenter(), GetSphereRadius(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::GetZoom(), Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::IsInitialized(), BIAS::CameraParam::IsZoomCamera(), BIAS::MatlabTBUndistortion::MatlabTBUndistortion(), ProjectCoord(), ProjectCoordBack(), ProjectImageCylindric(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), BIAS::MatlabTBUndistortion::SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::MatlabTBUndistortion::SetUnzoomed(), BIAS::CameraParam::SetUnzoomed(), SetupLutPerspPxPy1(), SetupLutPerspPxPy2(), SetupLutPxPySphere1(), SetupLutPxPySphere2(), BIAS::MatlabTBUndistortion::SetupProjectionLUT(), BIAS::MatlabTBUndistortion::SetZoom(), BIAS::CameraParam::SetZoom(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), TransfCoordSphere2CalibImage(), TransfCoordSphere2Image(), BIAS::MatlabTBUndistortion::Undistort(), and BIAS::CameraParam::WriteCameraData().

double BIAS::CameraParam::kc1Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc2Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc3Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::kc4Def_ [protected, inherited]

Definition at line 339 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::SetUnzoomed(), and BIAS::MatlabTBUndistortion::Undistort().

std::vector<CPDiscreteParam> BIAS::CameraParam::knownparams_vect_ [protected, inherited]

Reimplemented in BIAS::MatlabTBUndistortion.

Definition at line 314 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::InterpolateAbsZoom_(), BIAS::CameraParam::InterpolateFocalLength_(), BIAS::CameraParam::ReadFromEXIF(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), and BIAS::CameraParam::SetUnzoomed().

bool BIAS::CameraParam::LensIsSpherical_ [protected, inherited]

Definition at line 308 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), Init(), BIAS::CameraParam::Init(), and BIAS::CameraParam::ReadCameraData().

std::string BIAS::CameraParam::LensModel_ [protected, inherited]

Definition at line 302 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

LuTEntry* BIAS::SphericalUndistortion::LuT_ [protected]

Definition at line 337 of file SphericalUndistortion.hh.

Referenced by ProjectCutOut(), SphericalUndistortion(), and ~SphericalUndistortion().

LuTpxpyEntry* BIAS::SphericalUndistortion::LuTPerspPxPy_ [protected]

Definition at line 346 of file SphericalUndistortion.hh.

Referenced by ProjectCutOut1(), ProjectCutOut2(), SetupLutPerspPxPy1(), SetupLutPerspPxPy2(), SphericalUndistortion(), and ~SphericalUndistortion().

LuTEntry* BIAS::SphericalUndistortion::LuTPxPySphere_ [protected]

Definition at line 341 of file SphericalUndistortion.hh.

Referenced by ProjectCutOut1(), ProjectCutOut2(), SetupLutPxPySphere1(), SetupLutPxPySphere2(), SphericalUndistortion(), and ~SphericalUndistortion().

double BIAS::CameraParam::MaxCamAngle_ [protected, inherited]

Definition at line 329 of file CameraParam.hh.

Referenced by DrawCircles(), EnforceNormalRange(), GetMaxCamAngle(), Init(), BIAS::CameraParam::Init(), ProjectCoordBack(), ProjectImageCylindric(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), TransfCoordSphere2CalibImage(), and TransfCoordSphere2Image().

double BIAS::CameraParam::principalX_ [protected, inherited]

Definition at line 323 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), DrawCircles(), GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetPrincipalX(), GetSphereCenter(), Init(), BIAS::CameraParam::Init(), ProjectImageCylindric(), BIAS::CameraParam::SetPrincipal(), SetupLutPerspPxPy1(), SetupLutPerspPxPy2(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), TransfCoordSphere2CalibImage(), TransfCoordSphere2Image(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::principalY_ [protected, inherited]

Definition at line 323 of file CameraParam.hh.

Referenced by BIAS::MatlabTBUndistortion::Distort(), DrawCircles(), GetKMatrix(), BIAS::CameraParam::GetKMatrix(), BIAS::CameraParam::GetPrincipalY(), GetSphereCenter(), Init(), BIAS::CameraParam::Init(), ProjectImageCylindric(), BIAS::CameraParam::SetPrincipal(), SetupLutPerspPxPy1(), SetupLutPerspPxPy2(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), TransfCoordSphere2CalibImage(), TransfCoordSphere2Image(), and BIAS::MatlabTBUndistortion::Undistort().

double BIAS::CameraParam::radius_ [protected, inherited]

Definition at line 326 of file CameraParam.hh.

Referenced by DrawCircles(), GetSphereCenter(), GetSphereRadius(), Init(), BIAS::CameraParam::Init(), ProjectImageCylindric(), BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3(), SphericalUndistortion(), TransfCoordImage2Sphere(), TransfCoordRotateSphere2Image(), TransfCoordSphere2CalibImage(), and TransfCoordSphere2Image().

unsigned int BIAS::CameraParam::width_ [protected, inherited]

Definition at line 311 of file CameraParam.hh.

Referenced by BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::CameraParam::GetWidth(), BIAS::CameraParam::Init(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), and BIAS::CameraParam::SetData_OMNITECH_ORIFL_190_3().

double BIAS::CameraParam::zoom_ [protected, inherited]

Definition at line 345 of file CameraParam.hh.

Referenced by BIAS::CameraParam::GetZoom(), BIAS::CameraParam::Init(), BIAS::MatlabTBUndistortion::InterpolateFocalLength_(), BIAS::CameraParam::InterpolateFocalLength_(), BIAS::MatlabTBUndistortion::SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), and BIAS::CameraParam::SetZoom().

bool BIAS::CameraParam::zoomCamera_ [protected, inherited]

Definition at line 305 of file CameraParam.hh.

Referenced by BIAS::CameraParam::CameraParam(), BIAS::CameraParam::DebugOut(), BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::GetFocalLength(), BIAS::CameraParam::GetZoom(), BIAS::MatlabTBUndistortion::Init(), BIAS::CameraParam::Init(), BIAS::CameraParam::IsZoomCamera(), BIAS::CameraParam::ReadCameraData(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::CameraParam::ReadFromEXIF(), BIAS::MatlabTBUndistortion::SetFocalLength(), BIAS::CameraParam::SetFocalLength(), BIAS::CameraParam::SetUnzoomed(), BIAS::MatlabTBUndistortion::SetZoom(), BIAS::CameraParam::SetZoom(), BIAS::CameraParam::SetZoomCamera(), and BIAS::MatlabTBUndistortion::Undistort().

The documentation for this class was generated from the following files:
  • Image/SphericalUndistortion.hh
  • Image/SphericalUndistortion.cpp
Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SphericalUndistortion::LuTEntry Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SphericalUndistortion::LuTEntry

BIAS::SphericalUndistortion::LuTEntry Struct Reference

#include <Image/SphericalUndistortion.hh>

List of all members.

Public Attributes

unsigned int | offset [4]
unsigned int | weight [2]

Detailed Description

Definition at line 333 of file SphericalUndistortion.hh.

Member Data Documentation

unsigned int BIAS::SphericalUndistortion::LuTEntry::offset[4]

Definition at line 334 of file SphericalUndistortion.hh.

Referenced by BIAS::SphericalUndistortion::ProjectCutOut(), BIAS::SphericalUndistortion::ProjectCutOut1(), BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::SetupLutPxPySphere1(), BIAS::SphericalUndistortion::SetupLutPxPySphere2(), and BIAS::SphericalUndistortion::SetupProjectionLUT().

unsigned int BIAS::SphericalUndistortion::LuTEntry::weight[2]

Definition at line 335 of file SphericalUndistortion.hh.

Referenced by BIAS::SphericalUndistortion::ProjectCutOut2(), BIAS::SphericalUndistortion::SetupLutPxPySphere1(), BIAS::SphericalUndistortion::SetupLutPxPySphere2(), and BIAS::SphericalUndistortion::SetupProjectionLUT().

The documentation for this struct was generated from the following file:
  • Image/SphericalUndistortion.hh
Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SphericalUndistortion::LuTpxpyEntry Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SphericalUndistortion::LuTpxpyEntry

BIAS::SphericalUndistortion::LuTpxpyEntry Struct Reference

#include <Image/SphericalUndistortion.hh>

List of all members.

Public Attributes

float | PhiX
float | PhiY

Detailed Description

Definition at line 342 of file SphericalUndistortion.hh.

Member Data Documentation

float BIAS::SphericalUndistortion::LuTpxpyEntry::PhiX

Definition at line 343 of file SphericalUndistortion.hh.

Referenced by BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), and BIAS::SphericalUndistortion::SetupLutPerspPxPy2().

float BIAS::SphericalUndistortion::LuTpxpyEntry::PhiY

Definition at line 344 of file SphericalUndistortion.hh.

Referenced by BIAS::SphericalUndistortion::SetupLutPerspPxPy1(), and BIAS::SphericalUndistortion::SetupLutPerspPxPy2().

The documentation for this struct was generated from the following file:
  • Image/SphericalUndistortion.hh
Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::StatekeeperGL Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::StatekeeperGL

BIAS::StatekeeperGL Class Reference

push and pop GL states on constructor/destructor Helper class pop(save) OpenGL states on construction and push them on destruction automatically. More...

#include <Utils/StatekeeperGL.hh>

List of all members.

Public Member Functions

StatekeeperGL (const GLbitfield &mask)
constructor, pushes OpenGL state as given by mask GLbitfield mask
StatekeeperGL ()
constructor, pushes major OpenGL states
~StatekeeperGL ()
destructor, pops OpenGL state

Detailed Description

push and pop GL states on constructor/destructor Helper class pop(save) OpenGL states on construction and push them on destruction automatically.

Using matchiung push/pop pairs is easy with this class. Sample usage:

  // begin var. scop
  {
  // save state by push
  StatekeeperGL myTmp;
  // change the state, fire GL calls
  ...
  // reload state by destructors pop call automatically
  }
  // end var. scope
There should not be a performance impact if you use display lists.
Author:
Jan Woetzel

Definition at line 33 of file StatekeeperGL.hh.

Constructor & Destructor Documentation

BIAS::StatekeeperGL::StatekeeperGL ( ) [inline]

constructor, pushes major OpenGL states

Definition at line 36 of file StatekeeperGL.hh.

BIAS::StatekeeperGL::StatekeeperGL ( const GLbitfield & mask ) [inline]

constructor, pushes OpenGL state as given by mask GLbitfield mask

Definition at line 51 of file StatekeeperGL.hh.

BIAS::StatekeeperGL::~StatekeeperGL ( ) [inline]

destructor, pops OpenGL state

Definition at line 56 of file StatekeeperGL.hh.

The documentation for this class was generated from the following file:
  • Utils/StatekeeperGL.hh
Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::StereoRedGreen Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::StereoRedGreen

BIAS::StereoRedGreen Class Reference

combine two separate images into one stereo image for red-green glasses More...

#include <Image/StereoRedGreen.hh>

List of all members.

Public Member Functions

template<class StorageType>
void Combine (const Image< StorageType > &left, const Image< StorageType > &right, Image< StorageType > &result)
StereoRedGreen ()
~StereoRedGreen ()

Detailed Description

combine two separate images into one stereo image for red-green glasses

Author:
woelk 03/2006

Definition at line 37 of file StereoRedGreen.hh.

Constructor & Destructor Documentation

StereoRedGreen::StereoRedGreen ( )

Definition at line 13 of file StereoRedGreen.cpp.

StereoRedGreen::~StereoRedGreen ( )

Definition at line 17 of file StereoRedGreen.cpp.

Member Function Documentation

template<class StorageType>
void StereoRedGreen::Combine | ( | const Image< StorageType > & | left,
 |  | const Image< StorageType > & | right,
 |  | Image< StorageType > & | result
 | ) |

Definition at line 22 of file StereoRedGreen.cpp.

References BEXCEPTION, BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by MyFrame::OnTimer().

The documentation for this class was generated from the following files:
  • Image/StereoRedGreen.hh
  • Image/StereoRedGreen.cpp
Generated on Wed Jun 21 19:10:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::stopwatch Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::stopwatch

TNT::stopwatch Class Reference

#include <Base/Math/tnt/stopwatch.h>

List of all members.

Public Member Functions

double | read ()
void reset ()
void start ()
double | stop ()
stopwatch ()

Protected Attributes

double | last_time
int | running
double | total

Detailed Description

Definition at line 59 of file stopwatch.h.

Constructor & Destructor Documentation

TNT::stopwatch::stopwatch ( ) [inline]

Definition at line 66 of file stopwatch.h.

Member Function Documentation

double TNT::stopwatch::read ( ) [inline]

Definition at line 76 of file stopwatch.h.

References last_time, running, TNT::seconds(), and total.

void TNT::stopwatch::reset ( ) [inline]

Definition at line 67 of file stopwatch.h.

References last_time, running, and total.

void TNT::stopwatch::start ( ) [inline]

Definition at line 68 of file stopwatch.h.

References last_time, running, and TNT::seconds().

double TNT::stopwatch::stop ( ) [inline]

Definition at line 69 of file stopwatch.h.

References last_time, running, TNT::seconds(), and total.

Member Data Documentation

double TNT::stopwatch::last_time [protected]

Definition at line 62 of file stopwatch.h.

Referenced by read(), reset(), start(), and stop().

int TNT::stopwatch::running [protected]

Definition at line 61 of file stopwatch.h.

Referenced by read(), reset(), start(), and stop().

double TNT::stopwatch::total [protected]

Definition at line 63 of file stopwatch.h.

Referenced by read(), reset(), and stop().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/stopwatch.h
Generated on Wed Jun 21 19:13:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::StructureTensor< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::StructureTensor

BIAS::StructureTensor< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

basic class for structure tensor calculation More...

#include <Filter/StructureTensor.hh>

Inheritance diagram for BIAS::StructureTensor< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::StructureTensor< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Types

enum | TBorderHandling { TBH_full, TBH_same, TBH_valid }
enum for border calculation, same meanings as in matlab:
  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.
More...

Public Member Functions

void | AddDebugLevel (long int lv)
int | CalcStructureTensor (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
For any _HalfWinSize.
int | CalcStructureTensor (const Image< InputStorageType > &src, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
Calculates the gradients uses internal gradient class and calls CalcStructureTensor with these gradients.
int | CalcStructureTensor3x3 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
Uses _HalfWinSize=1 Destination images must be initialized.
int | CalcStructureTensor5x5 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
Uses _HalfWinSize=2 Destination images must be initialized.
int | CalcStructureTensor7x7 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
Uses _HalfWinSize=3 Destination images must be initialized.
int | CalcStructureTensorValid (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
For any _HalfWinSize.
bool | DebugLevelIsSet (long int lv) const
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy)
dstX.GetChannelCount()==src.GetCHannelCount()
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
calls the apropriate non virtual member function returns an 3 channel image where
  • channel 0 contains gxx
  • channel 1 contains gxy
  • channel 2 contains gyy

virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy)
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy)
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
int | GetBorderHandling () const
void | GetBorders (int &border_x, int &border_y) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int | GetGradientType () const
int | GetHalfWinSize () const
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBorderHandling (const int bh)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetGradientType (const int gt)
void | SetHalfWinSize (const int hws)
StructureTensor (Param &para, const int grp, const std::string &postfix)
Adds the parameter to the param object using the postfix.
StructureTensor (Param &para, const std::string &postfix="")
Adds the parameter to the param object using the postfix.
StructureTensor ()
~StructureTensor ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _AddParam (Param &para, const int grp, const std::string &postfix)
void | _AllocInternalMem (const int width, const int height)
allocates _gxx, _gyy, _gxy, _tsgxx, _tsgxy, _tsgyy and sets InternalMemWidth and _InternalMemHeight
void | _GradientProducts (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy)
fills up _gxx, _gxy, _gyy from gx and gy
void _UpdateGrad ()
sets _grad according to *_GradientType
void | _WriteDebugImage (Image< OutputStorageType > &im, std::string name)
for debugging only
virtual void | GetBordersValid_ (int &border_x, int &border_y) const

Protected Attributes

int * | _FilterBorderHandling
GradientGauss< InputStorageType,
OutputStorageType > 		_ggauss
GradientGaussAsymmetric< InputStorageType,
OutputStorageType > 		_ggaussasymmetric
FilterNTo2N< InputStorageType,
OutputStorageType > * 		_grad
pointer to gradient filter actually used:
int * | _GradientType
GradientSobel3x3< InputStorageType,
OutputStorageType > 		_gsobel3x3
Image< OutputStorageType > | _gx
Image< OutputStorageType > | _gxx
Image< OutputStorageType > | _gxy
Image< OutputStorageType > | _gy
Image< OutputStorageType > | _gyy
int * | _HalfWinSize
int | _InternalMemHeight
int | _InternalMemWidth
long int | _liDebugLevel
bool | _ParamsAllocated
Image< OutputStorageType > | _tsgxx
Image< OutputStorageType > | _tsgxy
Image< OutputStorageType > | _tsgyy

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::StructureTensor< InputStorageType, OutputStorageType >

basic class for structure tensor calculation

Author:
woelk 09/2004

Definition at line 48 of file StructureTensor.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::FilterBase::TBorderHandling [inherited]

enum for border calculation, same meanings as in matlab:

  • TBH_valid: returns only the pixels whose values can be computed without using zero padding of the input image.

The resulting output image is smaller than the input image. The ROI of the output image is set accordingly.

  • TBH_same: returns the set of pixels that can be computed by applying the filter to all pixels that are actually part of the input image. Border pixels are computed using zero padding, but the center pixel of the computational kernel is applied only to pixels in the image. This results in an output image that is the same size as the input image.
  • TBH_full: returns the full convolution. This means conv2 returns all pixels for which any of the pixels in the computational molecule overlap pixels in the image, even when the center pixel is outside the input image. The resulting output image is larger than the input image. This is not implemented at the moment.
Enumerator:
TBH_full
TBH_same
TBH_valid

Definition at line 105 of file FilterBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
StructureTensor::StructureTensor ( )

Definition at line 49 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, and BIAS::GT_Gauss.

template<class InputStorageType, class OutputStorageType>
StructureTensor::StructureTensor | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Adds the parameter to the param object using the postfix.

Author:
woelk 09/2004

Definition at line 65 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::Param::GetFreeGroupID(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class InputStorageType, class OutputStorageType>
StructureTensor::StructureTensor | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Adds the parameter to the param object using the postfix.

The parameter are added to the param group grp.

Author:
woelk 09/2004

Definition at line 81 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, and BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth.

template<class InputStorageType, class OutputStorageType>
StructureTensor::~StructureTensor ( )

Definition at line 94 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, and BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void StructureTensor::_AddParam | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Reimplemented from BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 874 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::Param::CheckParam(), and BIAS::Param::GetParamEnum().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().

template<class InputStorageType, class OutputStorageType>
void StructureTensor::_AllocInternalMem | ( | const int | width,
 |  | const int | height
 | ) | [protected]

allocates _gxx, _gyy, _gxy, _tsgxx, _tsgxy, _tsgyy and sets InternalMemWidth and _InternalMemHeight

Definition at line 908 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgyy, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

template<class InputStorageType, class OutputStorageType>
void StructureTensor::_GradientProducts | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy
 | ) | [protected]

fills up _gxx, _gxy, _gyy from gx and gy

Author:
woelk 09/2004

Definition at line 968 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIASASSERT, BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::SamePixelAndChannelCount(), and step().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

template<class InputStorageType, class OutputStorageType>
void StructureTensor::_UpdateGrad ( ) [protected]

sets _grad according to *_GradientType

Definition at line 929 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_ggauss, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_ggaussasymmetric, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gsobel3x3, BIASABORT, BIASCDOUT, BIASERR, D_ST_INIT, BIAS::GT_Gauss, BIAS::GT_GaussAsymmetric, and BIAS::GT_Sobel3x3.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
void StructureTensor::_WriteDebugImage | ( | Image< OutputStorageType > & | im,
 |  | std::string | name
 | ) | [protected]

for debugging only

Definition at line 956 of file StructureTensor.cpp.

References BIASERR, and BIAS::ImageIO::Write().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensor | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

For any _HalfWinSize.

For any border handling.

Todo:
implement CalcStructureTensor for other border handling than valid
Author:
woelk 09/2004

Definition at line 227 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensor | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

Calculates the gradients uses internal gradient class and calls CalcStructureTensor with these gradients.

Author:
woelk 09/2004

Definition at line 195 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIASASSERT, BIASERR, D_ST_WRITE_DEBUG_IM, BIAS::Debug::DebugLevelIsSet(), and BIAS::ImageIO::Write().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensor3x3 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

Uses _HalfWinSize=1 Destination images must be initialized.

Author:
woelk 09/2004

Definition at line 339 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIASASSERT, BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), D_ST_WRITE_DEBUG_IM, BIAS::Debug::DebugLevelIsSet(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensor5x5 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

Uses _HalfWinSize=2 Destination images must be initialized.

Author:
woelk 09/2004

Definition at line 416 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIASASSERT, BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), D_ST_WRITE_DEBUG_IM, BIAS::Debug::DebugLevelIsSet(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::TimeMeasure::GetRealTime(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::TimeMeasure::Reset(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensor7x7 | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

Uses _HalfWinSize=3 Destination images must be initialized.

Todo:
make it really fast
Author:
woelk 09/2004

Definition at line 539 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_WriteDebugImage(), BIASASSERT, BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), D_ST_WRITE_DEBUG_IM, BIAS::Debug::DebugLevelIsSet(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::TimeMeasure::GetRealTime(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::TimeMeasure::Reset(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::CalcStructureTensorValid | ( | const Image< OutputStorageType > & | gx,
 |  | const Image< OutputStorageType > & | gy,
 |  | Image< OutputStorageType > & | sgxx,
 |  | Image< OutputStorageType > & | sgxy,
 |  | Image< OutputStorageType > & | sgyy
 | ) |

For any _HalfWinSize.

Uses valid border handling. Destination images must be initialized.

Todo:
implement separated summation.
Author:
woelk 09/2004

Definition at line 270 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth, BIASASSERT, D_ST_FEATURES, BIAS::Debug::DebugLevelIsSet(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class InputStorageType, class OutputStorageType>
int StructureTensor::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gxx,
 |  | Image< OutputStorageType > & | gxy,
 |  | Image< OutputStorageType > & | gyy
 | ) | [virtual]

dstX.GetChannelCount()==src.GetCHannelCount()

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 134 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int StructureTensor::Filter | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

calls the apropriate non virtual member function returns an 3 channel image where

  • channel 0 contains gxx
  • channel 1 contains gxy
  • channel 2 contains gyy

Todo:
implement StructureTensor
Author:
woelk 09/2004

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 104 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int StructureTensor::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gxx,
 |  | Image< OutputStorageType > & | gxy,
 |  | Image< OutputStorageType > & | gyy
 | ) | [virtual]

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 160 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int StructureTensor::FilterFloat | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 124 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int StructureTensor::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | gxx,
 |  | Image< OutputStorageType > & | gxy,
 |  | Image< OutputStorageType > & | gyy
 | ) | [virtual]

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 147 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int StructureTensor::FilterInt | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) | [virtual]

Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.

Definition at line 114 of file StructureTensor.cpp.

References BIASABORT, BIASCDOUT, BIASERR, and D_FILTERBASE_CALLSTACK.

template<class InputStorageType, class OutputStorageType>
int BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorderHandling ( ) const [inline, inherited]

Definition at line 126 of file FilterBase.hh.

template<class InputStorageType, class OutputStorageType>
void FilterBase::GetBorders | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [inherited]

Definition at line 112 of file FilterBase.cpp.

References BIASABORT, BIASASSERT, BIASERR, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_full, BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_same, and BIAS::FilterBase< InputStorageType, OutputStorageType >::TBH_valid.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class InputStorageType, class OutputStorageType>
void StructureTensor::GetBordersValid_ | ( | int & | border_x,
 |  | int & | border_y
 | ) | const [protected, virtual]

Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.

Definition at line 1047 of file StructureTensor.cpp.

References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, and BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class InputStorageType, class OutputStorageType>
int BIAS::StructureTensor< InputStorageType, OutputStorageType >::GetGradientType ( ) const [inline]

Definition at line 164 of file StructureTensor.hh.

template<class InputStorageType, class OutputStorageType>
int BIAS::StructureTensor< InputStorageType, OutputStorageType >::GetHalfWinSize ( ) const [inline]

Definition at line 159 of file StructureTensor.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::FilterBase< InputStorageType, OutputStorageType >::SetBorderHandling ( const int bh ) [inline, inherited]

Definition at line 124 of file FilterBase.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::StructureTensor< InputStorageType, OutputStorageType >::SetGradientType ( const int gt ) [inline]

Definition at line 161 of file StructureTensor.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::StructureTensor< InputStorageType, OutputStorageType >::SetHalfWinSize ( const int hws ) [inline]

Definition at line 157 of file StructureTensor.hh.

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
int* BIAS::FilterBase< InputStorageType, OutputStorageType >::_FilterBorderHandling [protected, inherited]

Definition at line 132 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase().

template<class InputStorageType, class OutputStorageType>
GradientGauss<InputStorageType, OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_ggauss [protected]

Definition at line 171 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad().

template<class InputStorageType, class OutputStorageType>
GradientGaussAsymmetric<InputStorageType, OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_ggaussasymmetric [protected]

Definition at line 173 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad().

template<class InputStorageType, class OutputStorageType>
FilterNTo2N<InputStorageType, OutputStorageType>* BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad [protected]

pointer to gradient filter actually used:

Definition at line 168 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::GetBordersValid_(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().

template<class InputStorageType, class OutputStorageType>
int* BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientType [protected]

Definition at line 178 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AddParam(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
GradientSobel3x3<InputStorageType, OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gsobel3x3 [protected]

Definition at line 170 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_UpdateGrad().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gx [protected]

Definition at line 182 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxx [protected]

Definition at line 184 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gxy [protected]

Definition at line 184 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gy [protected]

Definition at line 182 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_gyy [protected]

Definition at line 184 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid().

template<class InputStorageType, class OutputStorageType>
int* BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize [protected]

Definition at line 176 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::GetBordersValid_(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
int BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight [protected]

Definition at line 188 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().

template<class InputStorageType, class OutputStorageType>
int BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth [protected]

Definition at line 188 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class InputStorageType, class OutputStorageType>
bool BIAS::FilterBase< InputStorageType, OutputStorageType >::_ParamsAllocated [protected, inherited]

Definition at line 129 of file FilterBase.hh.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::Binomial(), BIAS::DeInterlace< InputStorageType, OutputStorageType >::DeInterlace(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::Gauss< InputStorageType, OutputStorageType >::Gauss(), BIAS::Mean< InputStorageType, OutputStorageType >::Mean(), BIAS::Median< InputStorageType, OutputStorageType >::Median(), BIAS::Morphology< InputStorageType, OutputStorageType >::Morphology(), BIAS::Rescale< InputStorageType, OutputStorageType >::Rescale(), BIAS::FilterBase< InputStorageType, OutputStorageType >::~FilterBase(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::~FilterNTo2N(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::~StructureTensor().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxx [protected]

Definition at line 186 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgxy [protected]

Definition at line 186 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::StructureTensor< InputStorageType, OutputStorageType >::_tsgyy [protected]

Definition at line 186 of file StructureTensor.hh.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::_AllocInternalMem(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), and BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Filter/StructureTensor.hh
  • Filter/StructureTensor.cpp
Generated on Wed Jun 21 19:10:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SVD Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SVD

BIAS::SVD Class Reference
[Algorithms]

computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A More...

#include <MathAlgo/SVD.hh>

Inheritance diagram for BIAS::SVD:

[legend]
Collaboration diagram for BIAS::SVD:

[legend]
List of all members.

Public Member Functions

const int | AbsLeftNullspaceDim () const
returns the dim of the matrix's left nullspace, using absolute threshold criterion
const int | AbsNullspaceDim () const
returns dim of nullspace using the absolute threshold criterion
const int | AbsRightNullspaceDim () const
returns the dim of the matrix's right nullspace, using absolute threshold criterion
int | compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
use our naming convention
int | Compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
set a new matrix and compute its decomposition.
int | General_Eigenproblem_GeneralMatrix_Lapack (const Matrix< double > &M)
solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd .
Vector< double > | GetLeftNullvector (const int last_offset=0)
same as above but returning vector
bool | GetLeftNullvector (Vector< double > &nv, const int last_offset=0)
Return one of the left nullvectors.
bool | GetNullvector (Vector< double > &NullVec, const int last_offset=0)
Returns one of the nullvectors in argument and true if Nullvector exists.
Vector< double > | GetNullvector (const int last_offset=0)
return one of the nullvectors.
const Vector< double > & | GetS () const
return S which is a vector of teh singular values of A in descending order.
const double | GetSingularValue (int index) const
inline implementations
const Matrix< double > & | GetU () const
return U U is a m x m orthogonal matrix
Matrix< double > | GetV () const
return V
const Matrix< double > & | GetVT () const
return VT (=transposed(V))
double | GetZeroThreshold () const
return zerothresh currently used
Matrix< double > | Invert (Matrix< double > A)
as above, but compute new svd for a
Matrix< double > | Invert ()
returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T
const int | LeftNullspaceDim () const
returns the dim of the matrix's left nullspace
const int | NullspaceDim () const
return the dim of the nullspace.
unsigned int | Rank ()
returns the rank of A_
const int | RelLeftNullspaceDim () const
const int | RelNullspaceDim () const
compare singular values against greatest, not absolute
const int | RelRightNullspaceDim () const
const int | RightNullspaceDim () const
returns the dim of the matrix's right nullspace
int | size () const
return the length of the singular value vector inline const int size() const
int | Solve (Matrix< double > &A, Vector< double > &B, Vector< double > &X)
solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$.
Vector< double > | solve (const Vector< double > &y) const
use our naming convention
Vector< double > | Solve (const Vector< double > &y) const
Matrix< double > | Sqrt (const Matrix< double > &A)
as above, but compute new svd for a
Matrix< double > | Sqrt ()
returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M.
Matrix< double > | SqrtT (const Matrix< double > &A)
as above, but compute new svd for a
Matrix< double > | SqrtT ()
returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M.
SVD (bool AbsoluteZeroThreshold=true)
creates an empty svd without automatically decomposing any matrix
SVD (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD, bool AbsoluteZeroThreshold=true)
solve the general eigenproblem of the rectangular matrix M or with other words, make the U*S*V^T decomposition
virtual | ~SVD ()

Protected Attributes

Matrix< double > | A_
data members: original matrix (to be decomposed)
bool | AbsoluteZeroThreshold_
determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative)
bool | Decomposed_
flag for holding decomposed matrix
Vector< double > | S_
contains the singular values of A_ corresponding to the i'th column in descending order.
Matrix< double > | U_
contains columnwise the left singular vectors of A_ corresponding to the i'th singular value
Matrix< double > | VT_
contains the right singular vectors of A- in rows [beause VT is transpose(V) ]
double | ZeroThreshold_
values below this threshold are treated as zero

Private Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)

Static Private Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Private Attributes

long int | _liDebugLevel

Static Private Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A

M = U S V't.

The singular vectors vi and (right) singular values sigma_i satisfy the equation: A vi = sigma_i vi

The Vector S_ stores the singular values of A in decreasing order (smallest is last)

The columns of U are the left singular vectors of A and form an orthonormal basis of A which corresponds to the nonzero singular values. while the columns of U corresponding to (nearly) zero values are the nullspace.

This function is a base class and not a member in Matrix because:

  • holding the U,S,V matrices allows repeated queries of the same SVD results. -avoid namespace clutter in the Matrix class. There are many other decompositions that might be of interest, and adding them all would make for a very large Matrix class with extra members which are irrelevant for the Matrix itself.

You can create the svd object either in relative or in absolute mode: if AbsoluteZeroThreshold is true, a singular value is compared to the threshold "absolutely", otherwise the ratio of the largest and the current singular value is compared against the threshold. This affects the nullspace dimemsion. Usually you want AbsoluteZeroThreshold = false, but for the sake of interface stability/downwards compatibility, the default is true

Author:
Jan Woetzel

Definition at line 91 of file SVD.hh.

Constructor & Destructor Documentation

SVD::SVD | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD,
 |  | bool | AbsoluteZeroThreshold = true
 | ) |

solve the general eigenproblem of the rectangular matrix M or with other words, make the U*S*V^T decomposition

Parameters:
M | matrix to decompose
ZeroThreshold | for nullspace determination, if a singular value is lower than ZeroThreshold, define the corresponding vector in V^T to be a null-vector
AbsoluteZeroThreshold | if true, a singular value is compared to the threshold "absoultely", otherwise the ratio of the largest and the current singular value is compared against the threshold. Usually you want AbsoluteZeroThreshold = false, but for the sake of interface stability/downwards compatibility, the default is true
Author:
Jan Woetzel

Definition at line 40 of file SVD.cpp.

References AbsoluteZeroThreshold_, and Compute().

BIAS::SVD::SVD ( bool AbsoluteZeroThreshold = true ) [inline]

creates an empty svd without automatically decomposing any matrix

Parameters:
AbsoluteZeroThreshold if true, a singular value is compared to the threshold "absolutely", otherwise the ratio of the largest and the current singular value is compared against the threshold. Usually you want AbsoluteZeroThreshold = false, but for the sake of interface stability/downwards compatibility, the default is true

Definition at line 116 of file SVD.hh.

virtual BIAS::SVD::~SVD ( ) [inline, virtual]

Definition at line 121 of file SVD.hh.

Member Function Documentation

const int SVD::AbsLeftNullspaceDim ( ) const

returns the dim of the matrix's left nullspace, using absolute threshold criterion

Author:
woelk 04 2003

Definition at line 314 of file SVD.cpp.

References A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, TNT::Vector< T >::size(), and ZeroThreshold_.

const int SVD::AbsNullspaceDim ( ) const

returns dim of nullspace using the absolute threshold criterion

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace

Author:
Jan Woetzel 04/04/2002

Definition at line 262 of file SVD.cpp.

References A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, TNT::Vector< T >::size(), and ZeroThreshold_.

Referenced by AbsRightNullspaceDim().

const int SVD::AbsRightNullspaceDim ( ) const

returns the dim of the matrix's right nullspace, using absolute threshold criterion

Author:
woelk 04 2003

Definition at line 306 of file SVD.cpp.

References AbsNullspaceDim().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int BIAS::SVD::compute | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD
 | ) | [inline]

use our naming convention

Definition at line 129 of file SVD.hh.

Referenced by BIAS::PMatrix::MakeSVD_().

int SVD::Compute | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD
 | ) |

set a new matrix and compute its decomposition.

solves the general eigenproblem of the rectangular matrix M

Author:
Jan Woetzel 05/142002)

Reimplemented in BIAS::SVD3x3.

Definition at line 47 of file SVD.cpp.

References Decomposed_, General_Eigenproblem_GeneralMatrix_Lapack(), and ZeroThreshold_.

Referenced by BIAS::CovMatrix3x3::_Decompose(), Invert(), main(), Solve(), BIAS::LeastSquaresSVD::Solve(), Sqrt(), SqrtT(), and SVD().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int SVD::General_Eigenproblem_GeneralMatrix_Lapack ( const Matrix< double > & M )

solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd .

computes the genral singular value decomposition with M = U * Sigma(S) * VT with Sigma(S) is the qudratic, symmetric matrix which contains the singular vales in the diagonal and zero and zero else. U, VT as described in the data mambers.

Author:
Jan Woetzel (04/04/2002)

Definition at line 55 of file SVD.cpp.

References A_, Decomposed_, General_singular_value_decomposition(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), res, S_, TNT::Vector< T >::size(), U_, and VT_.

Referenced by Compute().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Vector< double > BIAS::SVD::GetLeftNullvector ( const int last_offset = 0 ) [inline]

same as above but returning vector

Definition at line 404 of file SVD.hh.

References BIASERR, GetLeftNullvector(), TNT::Matrix< T >::num_rows(), and VT_.

bool BIAS::SVD::GetLeftNullvector | ( | Vector< double > & | nv,
 |  | const int | last_offset = 0
 | ) | [inline]

Return one of the left nullvectors.

If last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1] otherwise 0 is returned

Author:
JMF/koeser

Definition at line 413 of file SVD.hh.

References BIASERR, TNT::Vector< T >::newsize(), NullspaceDim(), TNT::Matrix< T >::num_rows(), S_, U_, and VT_.

Referenced by BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::TrifocalTensor::GetEpipolarLines(), and GetLeftNullvector().

bool BIAS::SVD::GetNullvector | ( | Vector< double > & | NullVec,
 |  | const int | last_offset = 0
 | ) | [inline]

Returns one of the nullvectors in argument and true if Nullvector exists.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author:
Jan Woetzel (08/08/2002), JMF

Definition at line 383 of file SVD.hh.

References TNT::Vector< T >::newsize(), NullspaceDim(), TNT::Matrix< T >::num_cols(), and VT_.

Vector< double > BIAS::SVD::GetNullvector ( const int last_offset = 0 ) [inline]

return one of the nullvectors.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author:
Jan Woetzel(08/08/2002), JMF

Definition at line 374 of file SVD.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and VT_.

Referenced by calc_Regressionsebene(), BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::TrifocalTensor::GetEpipolarLines(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetNullVector(), BIAS::PlaneRANSAC::RefineSolution(), and BIAS::FMatrixEstimation::SevenPoint().

const Vector<double>& BIAS::SVD::GetS ( ) const [inline]

return S which is a vector of teh singular values of A in descending order.

The diagonalelements of Sigma are the singular values of A.

Author:
Jan Woetzel 04/04/2002

Definition at line 154 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetPseudoInverse(), BIAS::Quadric3D::GetSignature(), BIAS::Conic2D::GetSignature(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), Lapack_LLS_QR_linear_solve(), main(), Print(), BIAS::Quadric3D::Quadric3D(), Solve(), and BIAS::LeastSquaresSVD::Solve().

const double BIAS::SVD::GetSingularValue ( int index ) const [inline]

inline implementations

the index runs from 0.. (size-1)

Author:
Jan Woetzel 04/04/2002

Definition at line 356 of file SVD.hh.

References BIASASSERT, S_, TNT::Vector< T >::size(), and size().

Referenced by RelLeftNullspaceDim().

const Matrix<double>& BIAS::SVD::GetU ( ) const [inline]

return U U is a m x m orthogonal matrix

Author:
Jan Woetzel (04/04/2002)

Definition at line 174 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::RMatrix::EnforceRConstraints(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetPseudoInverse(), BIAS::EMatrix::GetRotationTranslation(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), main(), Print(), BIAS::Quadric3D::Quadric3D(), and BIAS::LeastSquaresSVD::Solve().

Matrix< double > BIAS::SVD::GetV ( ) const [inline]

return V

Author:
Jan Woetzel (04/04/2002)

Definition at line 366 of file SVD.hh.

References BIAS::Matrix< T >::Transpose(), and VT_.

Referenced by BIAS::PMatrix::GetPseudoInverse(), Print(), and BIAS::Quadric3D::Quadric3D().

const Matrix<double>& BIAS::SVD::GetVT ( ) const [inline]

return VT (=transposed(V))

Author:
Jan Woetzel (04/04/2002)

Definition at line 164 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::RMatrix::EnforceRConstraints(), BIAS::FMatrix::GetEpipoles(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Quadric3D::GetSignature(), BIAS::Conic2D::GetSignature(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), main(), Solve(), BIAS::LeastSquaresSVD::Solve(), and BIAS::Triangulation::TriangulateLinear().

double BIAS::SVD::GetZeroThreshold ( ) const [inline]

return zerothresh currently used

Author:
koeser

Definition at line 147 of file SVD.hh.

Matrix< double > SVD::Invert ( Matrix< double > A )

as above, but compute new svd for a

Definition at line 138 of file SVD.cpp.

References Compute(), and Invert().

Matrix< double > SVD::Invert ( )

returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T

Author:
F Woelk

Definition at line 118 of file SVD.cpp.

References Decomposed_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), res, S_, BIAS::Matrix< T >::SetZero(), TNT::Vector< T >::size(), BIAS::Matrix< T >::Transpose(), U_, VT_, and ZeroThreshold_.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::GetCanonicalH(), BIAS::Conic2D::GetDualConic(), BIAS::Quadric3D::GetDualQuadric(), Invert(), main(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), BIAS::GaussHelmert::Solve(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::Kalman::Update().

const int BIAS::SVD::LeftNullspaceDim ( ) const [inline]

returns the dim of the matrix's left nullspace

Author:
woelk 04 2003

Definition at line 210 of file SVD.hh.

const int BIAS::SVD::NullspaceDim ( ) const [inline]

return the dim of the nullspace.

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace koeser 01/2005: rel/abs handled by flag: AbsoluteZeroThreshold_ determines whther we compare absolute or relative singular values against the threshold

Author:
Jan Woetzel 04/04/2002

Definition at line 196 of file SVD.hh.

Referenced by BIAS::FMatrix::GetEpipoles(), GetLeftNullvector(), GetNullvector(), BIAS::FMatrix::IsValid(), main(), Rank(), and RelLeftNullspaceDim().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

unsigned int SVD::Rank ( )

returns the rank of A_

Definition at line 353 of file SVD.cpp.

References A_, BIASDOUT, D_SVD_RANK, NullspaceDim(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, and BIAS::Vector< T >::Size().

Referenced by Lapack_LLS_QR_linear_solve(), and BIAS::PlaneRANSAC::RefineSolution().

const int SVD::RelLeftNullspaceDim ( ) const

Definition at line 332 of file SVD.cpp.

References A_, GetSingularValue(), NullspaceDim(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, TNT::Vector< T >::size(), and ZeroThreshold_.

const int SVD::RelNullspaceDim ( ) const

compare singular values against greatest, not absolute

Author:
Christian Buck changed criterion for insignificant singular values according to hartley/zisserman from s_i<ZeroThreshold to s_i/s_0<ZeroThreshold. fallback to old criterion iff s_0=0.

Definition at line 280 of file SVD.cpp.

References A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, TNT::Vector< T >::size(), and ZeroThreshold_.

Referenced by RelRightNullspaceDim().

const int SVD::RelRightNullspaceDim ( ) const

Definition at line 310 of file SVD.cpp.

References RelNullspaceDim().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

const int BIAS::SVD::RightNullspaceDim ( ) const [inline]

returns the dim of the matrix's right nullspace

Author:
woelk 04 2003

Definition at line 203 of file SVD.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int BIAS::SVD::size ( ) const [inline]

return the length of the singular value vector inline const int size() const

Definition at line 179 of file SVD.hh.

Referenced by GetSingularValue().

int SVD::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | B,
 |  | Vector< double > & | X
 | ) |

solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$.

Author:
woelk 07/2004

Definition at line 363 of file SVD.cpp.

References BIASCDOUT, Compute(), D_SVD_SOLVE, DEFAULT_DOUBLE_ZERO_THRESHOLD, GetS(), BIAS::Matrix< T >::GetSystemMatrix(), GetVT(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and BIAS::Matrix< T >::Transpose().

Vector<double> BIAS::SVD::solve ( const Vector< double > & y ) const [inline]

use our naming convention

Definition at line 280 of file SVD.hh.

Referenced by BIAS::PMatrix::GetCanonicalH().

Vector< double > SVD::Solve ( const Vector< double > & y ) const

Bug:
bug in this function (woelk)

Definition at line 76 of file SVD.cpp.

References BIASERR, Decomposed_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), S_, TNT::Vector< T >::size(), BIAS::Matrix< T >::Transpose(), U_, VT_, and ZeroThreshold_.

Referenced by BIAS::GaussHelmert::Solve().

Matrix< double > SVD::Sqrt ( const Matrix< double > & A )

as above, but compute new svd for a

Definition at line 196 of file SVD.cpp.

References Compute(), and Sqrt().

Matrix< double > SVD::Sqrt ( )

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M.

The result is only valid when the M *is* symmetric positive definite.

Author:
woelk 01/2006

Definition at line 146 of file SVD.cpp.

References A_, BEXCEPTION, BIAS::Equal(), BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), BIAS::GreaterEqual(), num, r, TNT::Vector< T >::size(), and TNT::Upper_symmetric_eigenvalue_solve().

Referenced by MatrixSqrt(), and Sqrt().

Matrix< double > SVD::SqrtT ( const Matrix< double > & A )

as above, but compute new svd for a

Definition at line 254 of file SVD.cpp.

References Compute(), and SqrtT().

Matrix< double > SVD::SqrtT ( )

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M.

The result is only valid when the M *is* symmetric positive definite.

Author:
woelk 01/2006

Definition at line 204 of file SVD.cpp.

References A_, BEXCEPTION, BIAS::Equal(), BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), BIAS::GreaterEqual(), num, r, TNT::Vector< T >::size(), and TNT::Upper_symmetric_eigenvalue_solve().

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_(), and SqrtT().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

Matrix<double> BIAS::SVD::A_ [protected]

data members: original matrix (to be decomposed)

Definition at line 325 of file SVD.hh.

Referenced by AbsLeftNullspaceDim(), AbsNullspaceDim(), BIAS::SVD3x3::Compute(), General_Eigenproblem_GeneralMatrix_Lapack(), Rank(), RelLeftNullspaceDim(), RelNullspaceDim(), Sqrt(), SqrtT(), and BIAS::SVD3x3::SVD3x3().

bool BIAS::SVD::AbsoluteZeroThreshold_ [protected]

determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative)

Definition at line 342 of file SVD.hh.

Referenced by SVD().

bool BIAS::SVD::Decomposed_ [protected]

flag for holding decomposed matrix

Definition at line 348 of file SVD.hh.

Referenced by BIAS::SVD3x3::Compute(), Compute(), General_Eigenproblem_GeneralMatrix_Lapack(), Invert(), Solve(), and BIAS::SVD3x3::SVD3x3().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

Vector<double> BIAS::SVD::S_ [protected]

contains the singular values of A_ corresponding to the i'th column in descending order.

Definition at line 329 of file SVD.hh.

Referenced by AbsLeftNullspaceDim(), AbsNullspaceDim(), BIAS::SVD3x3::Compute(), General_Eigenproblem_GeneralMatrix_Lapack(), GetLeftNullvector(), GetSingularValue(), Invert(), Rank(), RelLeftNullspaceDim(), RelNullspaceDim(), Solve(), and BIAS::SVD3x3::SVD3x3().

Matrix<double> BIAS::SVD::U_ [protected]

contains columnwise the left singular vectors of A_ corresponding to the i'th singular value

Definition at line 333 of file SVD.hh.

Referenced by BIAS::SVD3x3::Compute(), General_Eigenproblem_GeneralMatrix_Lapack(), GetLeftNullvector(), Invert(), Solve(), and BIAS::SVD3x3::SVD3x3().

Matrix<double> BIAS::SVD::VT_ [protected]

contains the right singular vectors of A- in rows [beause VT is transpose(V) ]

Definition at line 337 of file SVD.hh.

Referenced by BIAS::SVD3x3::Compute(), General_Eigenproblem_GeneralMatrix_Lapack(), GetLeftNullvector(), GetNullvector(), GetV(), Invert(), Solve(), and BIAS::SVD3x3::SVD3x3().

double BIAS::SVD::ZeroThreshold_ [protected]

values below this threshold are treated as zero

Definition at line 345 of file SVD.hh.

Referenced by AbsLeftNullspaceDim(), AbsNullspaceDim(), BIAS::SVD3x3::Compute(), Compute(), Invert(), RelLeftNullspaceDim(), RelNullspaceDim(), Solve(), and BIAS::SVD3x3::SVD3x3().

The documentation for this class was generated from the following files:
  • MathAlgo/SVD.hh
  • MathAlgo/SVD.cpp
Generated on Wed Jun 21 19:10:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::SVD3x3 Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::SVD3x3

BIAS::SVD3x3 Class Reference
[Algorithms]

singular value decomposition for 3x3 matrices More...

#include <MathAlgo/SVD3x3.hh>

Inheritance diagram for BIAS::SVD3x3:

[legend]
Collaboration diagram for BIAS::SVD3x3:

[legend]
List of all members.

Public Member Functions

const int | AbsLeftNullspaceDim () const
returns the dim of the matrix's left nullspace, using absolute threshold criterion
const int | AbsNullspaceDim () const
returns dim of nullspace using the absolute threshold criterion
const int | AbsRightNullspaceDim () const
returns the dim of the matrix's right nullspace, using absolute threshold criterion
int | compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
use our naming convention
int | Compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
set a new matrix and compute its decomposition.
int | General_Eigenproblem_GeneralMatrix_Lapack (const Matrix< double > &M)
solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd .
Vector< double > | GetLeftNullvector (const int last_offset=0)
same as above but returning vector
bool | GetLeftNullvector (Vector< double > &nv, const int last_offset=0)
Return one of the left nullvectors.
bool | GetNullvector (Vector< double > &NullVec, const int last_offset=0)
Returns one of the nullvectors in argument and true if Nullvector exists.
Vector< double > | GetNullvector (const int last_offset=0)
return one of the nullvectors.
const Vector< double > & | GetS () const
return S which is a vector of teh singular values of A in descending order.
const double | GetSingularValue (int index) const
inline implementations
const Matrix< double > & | GetU () const
return U U is a m x m orthogonal matrix
Matrix< double > | GetV () const
return V
const Matrix< double > & | GetVT () const
return VT (=transposed(V))
double | GetZeroThreshold () const
return zerothresh currently used
Matrix< double > | Invert (Matrix< double > A)
as above, but compute new svd for a
Matrix< double > | Invert ()
returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T
const int | LeftNullspaceDim () const
returns the dim of the matrix's left nullspace
const int | NullspaceDim () const
return the dim of the nullspace.
unsigned int | Rank ()
returns the rank of A_
const int | RelLeftNullspaceDim () const
const int | RelNullspaceDim () const
compare singular values against greatest, not absolute
const int | RelRightNullspaceDim () const
const int | RightNullspaceDim () const
returns the dim of the matrix's right nullspace
int | size () const
return the length of the singular value vector inline const int size() const
Vector< double > | solve (const Vector< double > &y) const
use our naming convention
int | Solve (Matrix< double > &A, Vector< double > &B, Vector< double > &X)
solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$.
Vector< double > | Solve (const Vector< double > &y) const
Matrix< double > | Sqrt (const Matrix< double > &A)
as above, but compute new svd for a
Matrix< double > | Sqrt ()
returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M.
Matrix< double > | SqrtT (const Matrix< double > &A)
as above, but compute new svd for a
Matrix< double > | SqrtT ()
returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M.
SVD3x3 (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
constructor solve the general eigenproblem of the rectangular matrix M
SVD3x3 ()
virtual | ~SVD3x3 ()

Protected Member Functions

void | _Swap (int a, int b)

Protected Attributes

Matrix< double > | A_
data members: original matrix (to be decomposed)
bool | AbsoluteZeroThreshold_
determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative)
bool | Decomposed_
flag for holding decomposed matrix
Vector< double > | S_
contains the singular values of A_ corresponding to the i'th column in descending order.
Matrix< double > | U_
contains columnwise the left singular vectors of A_ corresponding to the i'th singular value
Matrix< double > | VT_
contains the right singular vectors of A- in rows [beause VT is transpose(V) ]
double | ZeroThreshold_
values below this threshold are treated as zero

Detailed Description

singular value decomposition for 3x3 matrices

koeser: There is an example matrix F[0][0] =0.00075284066373225704; F[0][1] =-0.099906426438442303; F[0][2] =0.16267766990357244; F[1][0] =0.10333163045064053; F[1][1] =0.0014727467665194025; F[1][2] =0.6803859609102173; F[2][0] =-0.16234020366691171; F[2][1] =-0.68087420277635458; F[2][2] =0.0021896762792443826; where the svd fails (at least) on p4 systems with gcc 3.3.1 and 3.3.3 with -O3 (independent of march-flag), but where it does not fail with O2. SVD3x3 is implemented as an algorithm, which computes each singular value and corresponding vector by iterating until some error measure e becomes small compared to a reference value ref: if (ref+e==ref) then converged=true; With O3 this condition never becomes true for the second singular value, because the difference of lhs and rhs stays at 1e-18, while in O2 this converges after two iterations to zero. We have problems here in the order of machine precision, the question is now whether this different behaviour of O2 and O3 is due to a compiler error or an algorithmic weakness. When tracing back the two execution branches of ExampleSVD3x3 (O2 and O3), which uses the above matrix one finds that in the very beginning, s and a[k][i] are absolutely the same before the line: s += a[k][i]*a[k][i]; and after this line s differs by the last digit. Such effects sum up and result in the failing of the convergence of the SVD. Debugging in O3 is complicated because every cout causes a side-effect and changes execution order and results, so I found that even adding one simple cout at some line made the algorithm converge for that example.

In my opinion this means that the svd algorihtm makes some convergence assumptions about values in the order of machine precision which are not always fulfilled, therefore it does not converge. This is just one example which happens with O3 but there may also be one for O2, which we have not found ? It may however also be an optimization "error" of gcc.

Author:
woelk 08/2004

Definition at line 74 of file SVD3x3.hh.

Constructor & Destructor Documentation

SVD3x3::SVD3x3 ( )

Definition at line 40 of file SVD3x3.cpp.

References BIAS::SVD::A_, BIAS::SVD::Decomposed_, DEFAULT_DOUBLE_ZERO_THRESHOLD, TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), BIAS::SVD::S_, BIAS::SVD::U_, BIAS::SVD::VT_, and BIAS::SVD::ZeroThreshold_.

SVD3x3::SVD3x3 | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD
 | ) |

constructor solve the general eigenproblem of the rectangular matrix M

Author:
woelk 07/2004
Bug:
does not always converge when general svd does

Definition at line 50 of file SVD3x3.cpp.

References BIAS::SVD::A_, Compute(), TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), BIAS::SVD::S_, BIAS::SVD::U_, and BIAS::SVD::VT_.

virtual BIAS::SVD3x3::~SVD3x3 ( ) [inline, virtual]

Definition at line 86 of file SVD3x3.hh.

Member Function Documentation

void BIAS::SVD3x3::_Swap | ( | int | a,
 |  | int | b
 | ) | [inline, protected]

Definition at line 97 of file SVD3x3.hh.

Referenced by Compute().

const int SVD::AbsLeftNullspaceDim ( ) const [inherited]

returns the dim of the matrix's left nullspace, using absolute threshold criterion

Author:
woelk 04 2003

Definition at line 314 of file SVD.cpp.

References BIAS::SVD::A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, TNT::Vector< T >::size(), and BIAS::SVD::ZeroThreshold_.

const int SVD::AbsNullspaceDim ( ) const [inherited]

returns dim of nullspace using the absolute threshold criterion

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace

Author:
Jan Woetzel 04/04/2002

Definition at line 262 of file SVD.cpp.

References BIAS::SVD::A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, TNT::Vector< T >::size(), and BIAS::SVD::ZeroThreshold_.

Referenced by BIAS::SVD::AbsRightNullspaceDim().

const int SVD::AbsRightNullspaceDim ( ) const [inherited]

returns the dim of the matrix's right nullspace, using absolute threshold criterion

Author:
woelk 04 2003

Definition at line 306 of file SVD.cpp.

References BIAS::SVD::AbsNullspaceDim().

int BIAS::SVD::compute | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD
 | ) | [inline, inherited]

use our naming convention

Definition at line 129 of file SVD.hh.

Referenced by BIAS::PMatrix::MakeSVD_().

int SVD3x3::Compute | ( | const Matrix< double > & | M,
 |  | double | ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD
 | ) |

set a new matrix and compute its decomposition.

solves the general eigenproblem of the rectangular matrix M

Bug:
does not always converge when general svd does
Author:
woelk 07/2004

Reimplemented from BIAS::SVD.

Definition at line 69 of file SVD3x3.cpp.

References _Swap(), a, BIAS::SVD::A_, BIASASSERT, BIASERR, BIAS::SVD::Decomposed_, BIAS::Vector< T >::GetData(), BIAS::Matrix< T >::GetDataArray1(), MAX, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), PYTHAG, res, BIAS::SVD::S_, SIGN, SVD_MAX_ITERATIONS, BIAS::SVD::U_, BIAS::SVD::VT_, and BIAS::SVD::ZeroThreshold_.

Referenced by main(), and SVD3x3().

int SVD::General_Eigenproblem_GeneralMatrix_Lapack ( const Matrix< double > & M ) [inherited]

solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd .

computes the genral singular value decomposition with M = U * Sigma(S) * VT with Sigma(S) is the qudratic, symmetric matrix which contains the singular vales in the diagonal and zero and zero else. U, VT as described in the data mambers.

Author:
Jan Woetzel (04/04/2002)

Definition at line 55 of file SVD.cpp.

References BIAS::SVD::A_, BIAS::SVD::Decomposed_, General_singular_value_decomposition(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), res, BIAS::SVD::S_, TNT::Vector< T >::size(), BIAS::SVD::U_, and BIAS::SVD::VT_.

Referenced by BIAS::SVD::Compute().

Vector< double > BIAS::SVD::GetLeftNullvector ( const int last_offset = 0 ) [inline, inherited]

same as above but returning vector

Definition at line 404 of file SVD.hh.

References BIASERR, BIAS::SVD::GetLeftNullvector(), TNT::Matrix< T >::num_rows(), and BIAS::SVD::VT_.

bool BIAS::SVD::GetLeftNullvector | ( | Vector< double > & | nv,
 |  | const int | last_offset = 0
 | ) | [inline, inherited]

Return one of the left nullvectors.

If last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1] otherwise 0 is returned

Author:
JMF/koeser

Definition at line 413 of file SVD.hh.

References BIASERR, TNT::Vector< T >::newsize(), BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, BIAS::SVD::U_, and BIAS::SVD::VT_.

Referenced by BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::TrifocalTensor::GetEpipolarLines(), and BIAS::SVD::GetLeftNullvector().

bool BIAS::SVD::GetNullvector | ( | Vector< double > & | NullVec,
 |  | const int | last_offset = 0
 | ) | [inline, inherited]

Returns one of the nullvectors in argument and true if Nullvector exists.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author:
Jan Woetzel (08/08/2002), JMF

Definition at line 383 of file SVD.hh.

References TNT::Vector< T >::newsize(), BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_cols(), and BIAS::SVD::VT_.

Vector< double > BIAS::SVD::GetNullvector ( const int last_offset = 0 ) [inline, inherited]

return one of the nullvectors.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author:
Jan Woetzel(08/08/2002), JMF

Definition at line 374 of file SVD.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), and BIAS::SVD::VT_.

Referenced by calc_Regressionsebene(), BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::TrifocalTensor::GetEpipolarLines(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetNullVector(), BIAS::PlaneRANSAC::RefineSolution(), and BIAS::FMatrixEstimation::SevenPoint().

const Vector<double>& BIAS::SVD::GetS ( ) const [inline, inherited]

return S which is a vector of teh singular values of A in descending order.

The diagonalelements of Sigma are the singular values of A.

Author:
Jan Woetzel 04/04/2002

Definition at line 154 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetPseudoInverse(), BIAS::Quadric3D::GetSignature(), BIAS::Conic2D::GetSignature(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), Lapack_LLS_QR_linear_solve(), main(), Print(), BIAS::Quadric3D::Quadric3D(), BIAS::SVD::Solve(), and BIAS::LeastSquaresSVD::Solve().

const double BIAS::SVD::GetSingularValue ( int index ) const [inline, inherited]

inline implementations

the index runs from 0.. (size-1)

Author:
Jan Woetzel 04/04/2002

Definition at line 356 of file SVD.hh.

References BIASASSERT, BIAS::SVD::S_, TNT::Vector< T >::size(), and BIAS::SVD::size().

Referenced by BIAS::SVD::RelLeftNullspaceDim().

const Matrix<double>& BIAS::SVD::GetU ( ) const [inline, inherited]

return U U is a m x m orthogonal matrix

Author:
Jan Woetzel (04/04/2002)

Definition at line 174 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::RMatrix::EnforceRConstraints(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetPseudoInverse(), BIAS::EMatrix::GetRotationTranslation(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), main(), Print(), BIAS::Quadric3D::Quadric3D(), and BIAS::LeastSquaresSVD::Solve().

Matrix< double > BIAS::SVD::GetV ( ) const [inline, inherited]

return V

Author:
Jan Woetzel (04/04/2002)

Definition at line 366 of file SVD.hh.

References BIAS::Matrix< T >::Transpose(), and BIAS::SVD::VT_.

Referenced by BIAS::PMatrix::GetPseudoInverse(), Print(), and BIAS::Quadric3D::Quadric3D().

const Matrix<double>& BIAS::SVD::GetVT ( ) const [inline, inherited]

return VT (=transposed(V))

Author:
Jan Woetzel (04/04/2002)

Definition at line 164 of file SVD.hh.

Referenced by BIAS::CovMatrix3x3::_Decompose(), BIAS::FMatrixEstimation::EnforceMaxRank2(), BIAS::RMatrix::EnforceRConstraints(), BIAS::FMatrix::GetEpipoles(), BIAS::EMatrix::GetRotationTranslation(), BIAS::Quadric3D::GetSignature(), BIAS::Conic2D::GetSignature(), BIAS::PMatrix::GetSVD(), BIAS::EMatrix::InitFromF(), main(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), and BIAS::Triangulation::TriangulateLinear().

double BIAS::SVD::GetZeroThreshold ( ) const [inline, inherited]

return zerothresh currently used

Author:
koeser

Definition at line 147 of file SVD.hh.

Matrix< double > SVD::Invert ( Matrix< double > A ) [inherited]

as above, but compute new svd for a

Definition at line 138 of file SVD.cpp.

References BIAS::SVD::Compute(), and BIAS::SVD::Invert().

Matrix< double > SVD::Invert ( ) [inherited]

returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T

Author:
F Woelk

Definition at line 118 of file SVD.cpp.

References BIAS::SVD::Decomposed_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), res, BIAS::SVD::S_, BIAS::Matrix< T >::SetZero(), TNT::Vector< T >::size(), BIAS::Matrix< T >::Transpose(), BIAS::SVD::U_, BIAS::SVD::VT_, and BIAS::SVD::ZeroThreshold_.

Referenced by BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::PMatrix::GetCanonicalH(), BIAS::Conic2D::GetDualConic(), BIAS::Quadric3D::GetDualQuadric(), BIAS::SVD::Invert(), main(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), BIAS::GaussHelmert::Solve(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::Kalman::Update().

const int BIAS::SVD::LeftNullspaceDim ( ) const [inline, inherited]

returns the dim of the matrix's left nullspace

Author:
woelk 04 2003

Definition at line 210 of file SVD.hh.

const int BIAS::SVD::NullspaceDim ( ) const [inline, inherited]

return the dim of the nullspace.

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace koeser 01/2005: rel/abs handled by flag: AbsoluteZeroThreshold_ determines whther we compare absolute or relative singular values against the threshold

Author:
Jan Woetzel 04/04/2002

Definition at line 196 of file SVD.hh.

Referenced by BIAS::FMatrix::GetEpipoles(), BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetNullvector(), BIAS::FMatrix::IsValid(), main(), BIAS::SVD::Rank(), and BIAS::SVD::RelLeftNullspaceDim().

unsigned int SVD::Rank ( ) [inherited]

returns the rank of A_

Definition at line 353 of file SVD.cpp.

References BIAS::SVD::A_, BIASDOUT, D_SVD_RANK, BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, and BIAS::Vector< T >::Size().

Referenced by Lapack_LLS_QR_linear_solve(), and BIAS::PlaneRANSAC::RefineSolution().

const int SVD::RelLeftNullspaceDim ( ) const [inherited]

Definition at line 332 of file SVD.cpp.

References BIAS::SVD::A_, BIAS::SVD::GetSingularValue(), BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, TNT::Vector< T >::size(), and BIAS::SVD::ZeroThreshold_.

const int SVD::RelNullspaceDim ( ) const [inherited]

compare singular values against greatest, not absolute

Author:
Christian Buck changed criterion for insignificant singular values according to hartley/zisserman from s_i<ZeroThreshold to s_i/s_0<ZeroThreshold. fallback to old criterion iff s_0=0.

Definition at line 280 of file SVD.cpp.

References BIAS::SVD::A_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, TNT::Vector< T >::size(), and BIAS::SVD::ZeroThreshold_.

Referenced by BIAS::SVD::RelRightNullspaceDim().

const int SVD::RelRightNullspaceDim ( ) const [inherited]

Definition at line 310 of file SVD.cpp.

References BIAS::SVD::RelNullspaceDim().

const int BIAS::SVD::RightNullspaceDim ( ) const [inline, inherited]

returns the dim of the matrix's right nullspace

Author:
woelk 04 2003

Definition at line 203 of file SVD.hh.

int BIAS::SVD::size ( ) const [inline, inherited]

return the length of the singular value vector inline const int size() const

Definition at line 179 of file SVD.hh.

Referenced by BIAS::SVD::GetSingularValue().

Vector<double> BIAS::SVD::solve ( const Vector< double > & y ) const [inline, inherited]

use our naming convention

Definition at line 280 of file SVD.hh.

Referenced by BIAS::PMatrix::GetCanonicalH().

int SVD::Solve | ( | Matrix< double > & | A,
 |  | Vector< double > & | B,
 |  | Vector< double > & | X
 | ) | [inherited]

solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$.

Author:
woelk 07/2004

Definition at line 363 of file SVD.cpp.

References BIASCDOUT, BIAS::SVD::Compute(), D_SVD_SOLVE, DEFAULT_DOUBLE_ZERO_THRESHOLD, BIAS::SVD::GetS(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::SVD::GetVT(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and BIAS::Matrix< T >::Transpose().

Vector< double > SVD::Solve ( const Vector< double > & y ) const [inherited]

Bug:
bug in this function (woelk)

Definition at line 76 of file SVD.cpp.

References BIASERR, BIAS::SVD::Decomposed_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, TNT::Vector< T >::size(), BIAS::Matrix< T >::Transpose(), BIAS::SVD::U_, BIAS::SVD::VT_, and BIAS::SVD::ZeroThreshold_.

Referenced by BIAS::GaussHelmert::Solve().

Matrix< double > SVD::Sqrt ( const Matrix< double > & A ) [inherited]

as above, but compute new svd for a

Definition at line 196 of file SVD.cpp.

References BIAS::SVD::Compute(), and BIAS::SVD::Sqrt().

Matrix< double > SVD::Sqrt ( ) [inherited]

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M.

The result is only valid when the M *is* symmetric positive definite.

Author:
woelk 01/2006

Definition at line 146 of file SVD.cpp.

References BIAS::SVD::A_, BEXCEPTION, BIAS::Equal(), BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), BIAS::GreaterEqual(), num, r, TNT::Vector< T >::size(), and TNT::Upper_symmetric_eigenvalue_solve().

Referenced by MatrixSqrt(), and BIAS::SVD::Sqrt().

Matrix< double > SVD::SqrtT ( const Matrix< double > & A ) [inherited]

as above, but compute new svd for a

Definition at line 254 of file SVD.cpp.

References BIAS::SVD::Compute(), and BIAS::SVD::SqrtT().

Matrix< double > SVD::SqrtT ( ) [inherited]

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M.

The result is only valid when the M *is* symmetric positive definite.

Author:
woelk 01/2006

Definition at line 204 of file SVD.cpp.

References BIAS::SVD::A_, BEXCEPTION, BIAS::Equal(), BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), BIAS::GreaterEqual(), num, r, TNT::Vector< T >::size(), and TNT::Upper_symmetric_eigenvalue_solve().

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_(), and BIAS::SVD::SqrtT().

Member Data Documentation

Matrix<double> BIAS::SVD::A_ [protected, inherited]

data members: original matrix (to be decomposed)

Definition at line 325 of file SVD.hh.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), Compute(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), and SVD3x3().

bool BIAS::SVD::AbsoluteZeroThreshold_ [protected, inherited]

determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative)

Definition at line 342 of file SVD.hh.

Referenced by BIAS::SVD::SVD().

bool BIAS::SVD::Decomposed_ [protected, inherited]

flag for holding decomposed matrix

Definition at line 348 of file SVD.hh.

Referenced by Compute(), BIAS::SVD::Compute(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::SVD::Invert(), BIAS::SVD::Solve(), and SVD3x3().

Vector<double> BIAS::SVD::S_ [protected, inherited]

contains the singular values of A_ corresponding to the i'th column in descending order.

Definition at line 329 of file SVD.hh.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), Compute(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetSingularValue(), BIAS::SVD::Invert(), BIAS::SVD::Rank(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::SVD::Solve(), and SVD3x3().

Matrix<double> BIAS::SVD::U_ [protected, inherited]

contains columnwise the left singular vectors of A_ corresponding to the i'th singular value

Definition at line 333 of file SVD.hh.

Referenced by Compute(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::SVD::GetLeftNullvector(), BIAS::SVD::Invert(), BIAS::SVD::Solve(), and SVD3x3().

Matrix<double> BIAS::SVD::VT_ [protected, inherited]

contains the right singular vectors of A- in rows [beause VT is transpose(V) ]

Definition at line 337 of file SVD.hh.

Referenced by Compute(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetNullvector(), BIAS::SVD::GetV(), BIAS::SVD::Invert(), BIAS::SVD::Solve(), and SVD3x3().

double BIAS::SVD::ZeroThreshold_ [protected, inherited]

values below this threshold are treated as zero

Definition at line 345 of file SVD.hh.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), Compute(), BIAS::SVD::Compute(), BIAS::SVD::Invert(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::SVD::Solve(), and SVD3x3().

The documentation for this class was generated from the following files:
  • MathAlgo/SVD3x3.hh
  • MathAlgo/SVD3x3.cpp
Generated on Wed Jun 21 19:10:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TagInfo Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TagInfo Class Reference

compatibility class for ImageMagick/magick/attribute.c: More...

List of all members.

Public Attributes

char * | description
unsigned short | tag

Detailed Description

compatibility class for ImageMagick/magick/attribute.c:

Author:
jan Woetzel

Definition at line 29 of file ImageAttributes.cpp.

Member Data Documentation

char* TagInfo::description

Definition at line 32 of file ImageAttributes.cpp.

unsigned short TagInfo::tag

Definition at line 31 of file ImageAttributes.cpp.

The documentation for this class was generated from the following file:
  • Base/Image/ImageAttributes.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: tagTHREADNAME_INFO Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

tagTHREADNAME_INFO Struct Reference

List of all members.

Public Attributes

DWORD | dwFlags
DWORD | dwThreadID
DWORD | dwType
LPCSTR | szName

Detailed Description

Definition at line 16 of file ThreadNaming.cpp.

Member Data Documentation

DWORD tagTHREADNAME_INFO::dwFlags

Definition at line 21 of file ThreadNaming.cpp.

DWORD tagTHREADNAME_INFO::dwThreadID

Definition at line 20 of file ThreadNaming.cpp.

DWORD tagTHREADNAME_INFO::dwType

Definition at line 18 of file ThreadNaming.cpp.

LPCSTR tagTHREADNAME_INFO::szName

Definition at line 19 of file ThreadNaming.cpp.

The documentation for this struct was generated from the following file:
  • Base/Debug/ThreadNaming.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Tensor3D< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Tensor3D

BIAS::Tensor3D< T > Class Template Reference

#include <Base/Math/Tensor3D.hh>

Inheritance diagram for BIAS::Tensor3D< T >:

[legend]
Collaboration diagram for BIAS::Tensor3D< T >:

[legend]
List of all members.

Public Member Functions

void Destroy ()
frees internal data
const T * | GetData () const
T * GetData ()
T *** GetDataArray ()
int | GetDim1 () const
int | GetDim2 () const
int | GetDim3 () const
T | GetLength () const
void | NewSize (const int i, const int j, const int k, const T &def=(T) 0.0)
allocates internal data
T & | operator() (unsigned int i, unsigned int j, unsigned int k)
direct data access through () operator: T_i^{jk}
Tensor3D< T > & | operator= (const Tensor3D< T > &t)
bool | operator== (const Tensor3D< T > &t)
checks if all tensor entries are equal (up-to-scale-equality is not checked)
void | Scale (T factor)
void | SetFromVector (const BIAS::Vector< T > &v)
set the tensor by the rows of the vector.
void SetZero ()
set all elements to zero
Tensor3D (const Tensor3D< T > &t)
Tensor3D (const int i, const int j, const int k, const T &def=(T) 0.0)
Tensor3D ()
BIAS::Vector< T > ToVector ()
~Tensor3D ()

Protected Attributes

T * _Data
T *** _DataArray
int | _Dim1
int | _Dim2
int | _Dim3
int | _Size

Detailed Description

template<class T = double>
class BIAS::Tensor3D< T >

Definition at line 35 of file Tensor3D.hh.

Constructor & Destructor Documentation

template<class T>
Tensor3D::Tensor3D ( )

Definition at line 32 of file Tensor3D.cpp.

template<class T>
Tensor3D::Tensor3D | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const T & | def = (T) 0.0
 | ) |

Definition at line 37 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::NewSize().

template<class T>
Tensor3D::Tensor3D ( const Tensor3D< T > & t )

Definition at line 45 of file Tensor3D.cpp.

template<class T>
Tensor3D::~Tensor3D ( )

Definition at line 51 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::Destroy().

Member Function Documentation

template<class T>
void Tensor3D::Destroy ( )

frees internal data

Definition at line 89 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::_Dim1, BIAS::Tensor3D< T >::_Dim2, BIAS::Tensor3D< T >::_Dim3, and BIAS::Tensor3D< T >::_Size.

Referenced by BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::~Tensor3D(), and BIAS::Tensor3D3x3x3< T >::~Tensor3D3x3x3().

template<class T = double>
const T* BIAS::Tensor3D< T >::GetData ( ) const [inline]

Definition at line 73 of file Tensor3D.hh.

template<class T = double>
T* BIAS::Tensor3D< T >::GetData ( ) [inline]

Definition at line 67 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::operator=(), and BIAS::Tensor3D< T >::operator==().

template<class T = double>
T*** BIAS::Tensor3D< T >::GetDataArray ( ) [inline]

Definition at line 70 of file Tensor3D.hh.

template<class T>
int Tensor3D::GetDim1 ( ) const

Definition at line 105 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim1.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
int Tensor3D::GetDim2 ( ) const

Definition at line 111 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim2.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
int Tensor3D::GetDim3 ( ) const

Definition at line 117 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim3.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
T Tensor3D::GetLength ( ) const

Definition at line 184 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, and T.

template<class T>
void Tensor3D::NewSize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const T & | def = (T) 0.0
 | ) |

allocates internal data

Reimplemented in BIAS::Tensor3D3x3x3< T >, and BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >.

Definition at line 57 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::_Dim1, BIAS::Tensor3D< T >::_Dim2, BIAS::Tensor3D< T >::_Dim3, BIAS::Tensor3D< T >::_Size, BIASASSERT, BIAS::Tensor3D< T >::Destroy(), and T.

Referenced by BIAS::Tensor3D< T >::operator=(), and BIAS::Tensor3D< T >::Tensor3D().

template<class T = double>
T& BIAS::Tensor3D< T >::operator() | ( | unsigned int | i,
 |  | unsigned int | j,
 |  | unsigned int | k
 | ) | [inline]

direct data access through () operator: T_i^{jk}

Author:
mdunda 07 2004

Definition at line 91 of file Tensor3D.hh.

template<class T>
Tensor3D< T > & Tensor3D::operator= ( const Tensor3D< T > & t )

Definition at line 129 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_Size, BIAS::Tensor3D< T >::GetData(), BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), BIAS::Tensor3D< T >::GetDim3(), BIAS::Tensor3D< T >::NewSize(), and T.

template<class T>
bool Tensor3D::operator== ( const Tensor3D< T > & t )

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author:
mdunda 07 2004

Definition at line 137 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::GetData(), BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::GetDim3().

template<class T>
void Tensor3D::Scale ( T factor )

Definition at line 176 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, and BIAS::Tensor3D< T >::_Size.

template<class T>
void Tensor3D::SetFromVector ( const BIAS::Vector< T > & v )

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author:
mdunda

Definition at line 164 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), BIAS::Tensor3D< T >::GetDim3(), and BIAS::Vector< T >::Size().

template<class T>
void Tensor3D::SetZero ( )

set all elements to zero

Definition at line 123 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_Size, and T.

template<class T>
Vector< T > Tensor3D::ToVector ( )

Returns:
all tensor elements in a vector
Author:
mdunda

Definition at line 149 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::GetDim3().

Member Data Documentation

template<class T = double>
T* BIAS::Tensor3D< T >::_Data [protected]

Definition at line 102 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetLength(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::Scale(), and BIAS::Tensor3D< T >::SetZero().

template<class T = double>
T*** BIAS::Tensor3D< T >::_DataArray [protected]

Definition at line 106 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D3x3x3< T >::postmultiply1(), BIAS::Tensor3D3x3x3< T >::postmultiply2(), BIAS::Tensor3D3x3x3< T >::postmultiply3(), BIAS::Tensor3D3x3x3< T >::premultiply1(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim1 [protected]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim1(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim2 [protected]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim3 [protected]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim3(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Size [protected]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::Scale(), and BIAS::Tensor3D< T >::SetZero().

The documentation for this class was generated from the following files:
  • Base/Math/Tensor3D.hh
  • Base/Math/Tensor3D.cpp
Generated on Wed Jun 21 19:10:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Tensor3D3x3x3< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Tensor3D3x3x3

BIAS::Tensor3D3x3x3< T > Class Template Reference

#include <Base/Math/Tensor3D3x3x3.hh>

Inheritance diagram for BIAS::Tensor3D3x3x3< T >:

[legend]
Collaboration diagram for BIAS::Tensor3D3x3x3< T >:

[legend]
List of all members.

Public Member Functions

void Destroy ()
frees internal data
const T * | GetData () const
T * GetData ()
T *** GetDataArray ()
int | GetDim1 () const
int | GetDim2 () const
int | GetDim3 () const
T | GetLength () const
void | GetMatrices (Matrix3x3< T > &T1, Matrix3x3< T > &T2, Matrix3x3< T > &T3) const
Matrix3x3< T > | LeftContravariantContraction1 (Vector3< T > &v)
void | LeftContravariantContraction1 (Vector3< T > &v, Matrix3x3< T > &res)
computes the contraction of index 1 from left with contravariant vector , i.e.
Matrix3x3< T > | LeftContravariantContraction2 (Vector3< T > &v)
void | LeftContravariantContraction2 (Vector3< T > &v, Matrix3x3< T > &res)
Matrix3x3< T > | LeftContravariantContraction3 (Vector3< T > &v)
void | LeftContravariantContraction3 (Vector3< T > &v, Matrix3x3< T > &res)
void | newsize (const int i, const int j, const int k, const T &def=(T) 0.0)
void | NewSize (const int i, const int j, const int k, const T &def=(T) 0.0)
allocates internal data
T & | operator() (unsigned int i, unsigned int j, unsigned int k)
direct data access through () operator: T_i^{jk}
Tensor3D3x3x3< T > & | operator= (const Tensor3D3x3x3< T > &t)
bool | operator== (const Tensor3D< T > &t)
checks if all tensor entries are equal (up-to-scale-equality is not checked)
void | postmultiply1 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
Compute S_{ijk} = T_{pjk} M_{pi}.
void | postmultiply2 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
Compute S_{ijk} = T_{ipk} M_{pj}.
void | postmultiply3 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
Compute S_{ijk} = T_{ijp} M_{pk}.
void | premultiply1 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
compute S_{ijk} = M_{ip} T_{pjk}
void | premultiply2 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
compute S_{ijk} = M_{jp} T_{ipk}
void | premultiply3 (const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const
compute S_{ijk} = M_{kp} T_{ijp}
void | Scale (T factor)
void | SetFromMatrices (const Matrix3x3< T > &T1, const Matrix3x3< T > &T2, const Matrix3x3< T > &T3)
implementation
void | SetFromVector (const BIAS::Vector< T > &v)
set the tensor by the rows of the vector.
void SetZero ()
set all elements to zero
Tensor3D3x3x3 ()
BIAS::Vector< T > ToVector ()
virtual | ~Tensor3D3x3x3 ()

Protected Attributes

T * _Data
T *** _DataArray
int | _Dim1
int | _Dim2
int | _Dim3
int | _Size

Detailed Description

template<class T = double>
class BIAS::Tensor3D3x3x3< T >

Definition at line 36 of file Tensor3D3x3x3.hh.

Constructor & Destructor Documentation

template<class T>
Tensor3D3x3x3::Tensor3D3x3x3 ( )

Definition at line 35 of file Tensor3D3x3x3.cpp.

template<class T>
Tensor3D3x3x3::~Tensor3D3x3x3 ( ) [virtual]

Definition at line 40 of file Tensor3D3x3x3.cpp.

References BIAS::Tensor3D< T >::Destroy().

Member Function Documentation

template<class T>
void Tensor3D::Destroy ( ) [inherited]

frees internal data

Definition at line 89 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::_Dim1, BIAS::Tensor3D< T >::_Dim2, BIAS::Tensor3D< T >::_Dim3, and BIAS::Tensor3D< T >::_Size.

Referenced by BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::~Tensor3D(), and BIAS::Tensor3D3x3x3< T >::~Tensor3D3x3x3().

template<class T = double>
const T* BIAS::Tensor3D< T >::GetData ( ) const [inline, inherited]

Definition at line 73 of file Tensor3D.hh.

template<class T = double>
T* BIAS::Tensor3D< T >::GetData ( ) [inline, inherited]

Definition at line 67 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::operator=(), and BIAS::Tensor3D< T >::operator==().

template<class T = double>
T*** BIAS::Tensor3D< T >::GetDataArray ( ) [inline, inherited]

Definition at line 70 of file Tensor3D.hh.

template<class T>
int Tensor3D::GetDim1 ( ) const [inherited]

Definition at line 105 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim1.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
int Tensor3D::GetDim2 ( ) const [inherited]

Definition at line 111 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim2.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
int Tensor3D::GetDim3 ( ) const [inherited]

Definition at line 117 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Dim3.

Referenced by BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T>
T Tensor3D::GetLength ( ) const [inherited]

Definition at line 184 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, and T.

template<class T>
void BIAS::Tensor3D3x3x3< T >::GetMatrices | ( | Matrix3x3< T > & | T1,
 |  | Matrix3x3< T > & | T2,
 |  | Matrix3x3< T > & | T3
 | ) | const [inline]

Definition at line 136 of file Tensor3D3x3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

Referenced by BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction1().

template<class T = double>
Matrix3x3<T> BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction1 ( Vector3< T > & v ) [inline]

Definition at line 56 of file Tensor3D3x3x3.hh.

template<class T>
void BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction1 | ( | Vector3< T > & | v,
 |  | Matrix3x3< T > & | res
 | ) | [inline]

computes the contraction of index 1 from left with contravariant vector , i.e.

res[k][j] = sum_i v[i] * (*this)[k][j]

Author:
woelk 07/2004

Definition at line 146 of file Tensor3D3x3x3.hh.

References BIAS::Tensor3D3x3x3< T >::GetMatrices().

template<class T = double>
Matrix3x3<T> BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2 ( Vector3< T > & v ) [inline]

Definition at line 63 of file Tensor3D3x3x3.hh.

template<class T>
void BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction2 | ( | Vector3< T > & | v,
 |  | Matrix3x3< T > & | res
 | ) | [inline]

Definition at line 164 of file Tensor3D3x3x3.hh.

References BIAS::Matrix< T >::SetZero().

template<class T = double>
Matrix3x3<T> BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3 ( Vector3< T > & v ) [inline]

Definition at line 70 of file Tensor3D3x3x3.hh.

template<class T>
void BIAS::Tensor3D3x3x3< T >::LeftContravariantContraction3 | ( | Vector3< T > & | v,
 |  | Matrix3x3< T > & | res
 | ) | [inline]

Definition at line 175 of file Tensor3D3x3x3.hh.

References BIAS::Matrix< T >::SetZero().

template<class T>
void Tensor3D3x3x3::newsize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const T & | def = (T) 0.0
 | ) |

Definition at line 55 of file Tensor3D3x3x3.cpp.

References BIASERR.

template<class T>
void Tensor3D3x3x3::NewSize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const T & | def = (T) 0.0
 | ) |

allocates internal data

Reimplemented from BIAS::Tensor3D< T >.

Definition at line 46 of file Tensor3D3x3x3.cpp.

References BIASERR.

template<class T = double>
T& BIAS::Tensor3D< T >::operator() | ( | unsigned int | i,
 |  | unsigned int | j,
 |  | unsigned int | k
 | ) | [inline, inherited]

direct data access through () operator: T_i^{jk}

Author:
mdunda 07 2004

Definition at line 91 of file Tensor3D.hh.

template<class T = double>
Tensor3D3x3x3<T>& BIAS::Tensor3D3x3x3< T >::operator= ( const Tensor3D3x3x3< T > & t ) [inline]

Definition at line 113 of file Tensor3D3x3x3.hh.

template<class T>
bool Tensor3D::operator== ( const Tensor3D< T > & t ) [inherited]

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author:
mdunda 07 2004

Definition at line 137 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::GetData(), BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::GetDim3().

template<class T>
void Tensor3D3x3x3::postmultiply1 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

Compute S_{ijk} = T_{pjk} M_{pi}.

Author:
mdunda

Definition at line 65 of file Tensor3D3x3x3.cpp.

References BIAS::Tensor3D< T >::_DataArray, p, and T.

template<class T>
void Tensor3D3x3x3::postmultiply2 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

Compute S_{ijk} = T_{ipk} M_{pj}.

Author:
mdunda

Definition at line 81 of file Tensor3D3x3x3.cpp.

References BIAS::Tensor3D< T >::_DataArray, p, and T.

template<class T>
void Tensor3D3x3x3::postmultiply3 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

Compute S_{ijk} = T_{ijp} M_{pk}.

Author:
mdunda

Definition at line 97 of file Tensor3D3x3x3.cpp.

References BIAS::Tensor3D< T >::_DataArray, p, and T.

template<class T>
void Tensor3D3x3x3::premultiply1 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

compute S_{ijk} = M_{ip} T_{pjk}

Author:
mdunda

Definition at line 113 of file Tensor3D3x3x3.cpp.

References BIAS::Tensor3D< T >::_DataArray, p, and T.

template<class T>
void Tensor3D3x3x3::premultiply2 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

compute S_{ijk} = M_{jp} T_{ipk}

Author:
mdunda

Definition at line 129 of file Tensor3D3x3x3.cpp.

References p, and T.

template<class T>
void Tensor3D3x3x3::premultiply3 | ( | const BIAS::Matrix3x3< T > & | M,
 |  | Tensor3D3x3x3< T > & | result
 | ) | const

compute S_{ijk} = M_{kp} T_{ijp}

Author:
mdunda

Definition at line 145 of file Tensor3D3x3x3.cpp.

References p, and T.

template<class T>
void Tensor3D::Scale ( T factor ) [inherited]

Definition at line 176 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, and BIAS::Tensor3D< T >::_Size.

template<class T>
void BIAS::Tensor3D3x3x3< T >::SetFromMatrices | ( | const Matrix3x3< T > & | T1,
 |  | const Matrix3x3< T > & | T2,
 |  | const Matrix3x3< T > & | T3
 | ) | [inline]

implementation

Definition at line 125 of file Tensor3D3x3x3.hh.

References BIAS::Matrix< T >::GetData(), and T.

template<class T>
void Tensor3D::SetFromVector ( const BIAS::Vector< T > & v ) [inherited]

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author:
mdunda

Definition at line 164 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), BIAS::Tensor3D< T >::GetDim3(), and BIAS::Vector< T >::Size().

template<class T>
void Tensor3D::SetZero ( ) [inherited]

set all elements to zero

Definition at line 123 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_Data, BIAS::Tensor3D< T >::_Size, and T.

template<class T>
Vector< T > Tensor3D::ToVector ( ) [inherited]

Returns:
all tensor elements in a vector
Author:
mdunda

Definition at line 149 of file Tensor3D.cpp.

References BIAS::Tensor3D< T >::_DataArray, BIAS::Tensor3D< T >::GetDim1(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::GetDim3().

Member Data Documentation

template<class T = double>
T* BIAS::Tensor3D< T >::_Data [protected, inherited]

Definition at line 102 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetLength(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::operator==(), BIAS::Tensor3D< T >::Scale(), and BIAS::Tensor3D< T >::SetZero().

template<class T = double>
T*** BIAS::Tensor3D< T >::_DataArray [protected, inherited]

Definition at line 106 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D3x3x3< T >::postmultiply1(), BIAS::Tensor3D3x3x3< T >::postmultiply2(), BIAS::Tensor3D3x3x3< T >::postmultiply3(), BIAS::Tensor3D3x3x3< T >::premultiply1(), BIAS::Tensor3D< T >::SetFromVector(), and BIAS::Tensor3D< T >::ToVector().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim1 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim1(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim2 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim2(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Dim3 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::GetDim3(), and BIAS::Tensor3D< T >::NewSize().

template<class T = double>
int BIAS::Tensor3D< T >::_Size [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

Referenced by BIAS::Tensor3D< T >::Destroy(), BIAS::Tensor3D< T >::NewSize(), BIAS::Tensor3D< T >::operator=(), BIAS::Tensor3D< T >::Scale(), and BIAS::Tensor3D< T >::SetZero().

The documentation for this class was generated from the following files:
  • Base/Math/Tensor3D3x3x3.hh
  • Base/Math/Tensor3D3x3x3.cpp
Generated on Wed Jun 21 19:11:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TFTensorEstimation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TFTensorEstimation

BIAS::TFTensorEstimation Class Reference
[Estimation]

class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers More...

#include <Geometry/TFTensorEstimation.hh>

Collaboration diagram for BIAS::TFTensorEstimation:

[legend]
List of all members.

Public Member Functions

int | Compute (BIAS::TrifocalTensor &T, const std::vector< BIAS::HomgPoint2D > &x1, const std::vector< BIAS::HomgPoint2D > &x2, const std::vector< BIAS::HomgPoint2D > &x3, bool HartleyNormalization=true)
Estimate a trifocal tensor given correnspondences over three images.
TFTensorEstimation ()
~TFTensorEstimation ()

Protected Member Functions

int | AlgebraicMinimization (BIAS::TrifocalTensor &Initial, BIAS::TrifocalTensor &Result)

Protected Attributes

BIAS::Normalization Norm_

Detailed Description

class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers

Author:
Matthias Dunda

Definition at line 19 of file TFTensorEstimation.hh.

Constructor & Destructor Documentation

TFTensorEstimation::TFTensorEstimation ( )

Definition at line 16 of file TFTensorEstimation.cpp.

TFTensorEstimation::~TFTensorEstimation ( )

Definition at line 21 of file TFTensorEstimation.cpp.

Member Function Documentation

int TFTensorEstimation::AlgebraicMinimization | ( | BIAS::TrifocalTensor & | Initial,
 |  | BIAS::TrifocalTensor & | Result
 | ) | [protected]

Definition at line 390 of file TFTensorEstimation.cpp.

int BIAS::TFTensorEstimation::Compute | ( | BIAS::TrifocalTensor & | T,
 |  | const std::vector< BIAS::HomgPoint2D > & | x1,
 |  | const std::vector< BIAS::HomgPoint2D > & | x2,
 |  | const std::vector< BIAS::HomgPoint2D > & | x3,
 |  | bool | HartleyNormalization = true
 | ) |

Estimate a trifocal tensor given correnspondences over three images.

Parameters:
HartleyNormalization normalizes correspondences for each view according to Hartley
Returns:
!=0 on error
Author:
Matthias Dunda 01/2004

Member Data Documentation

BIAS::Normalization BIAS::TFTensorEstimation::Norm_ [protected]

Definition at line 37 of file TFTensorEstimation.hh.

The documentation for this class was generated from the following files:
  • Geometry/TFTensorEstimation.hh
  • Geometry/TFTensorEstimation.cpp
Generated on Wed Jun 21 19:11:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ThreadArg__ Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ThreadArg__ Struct Reference

Collaboration diagram for ThreadArg__:

[legend]
List of all members.

Public Attributes

ImageBase::EColorModel colormodel
ImageBase * dst
bool planar
ImageBase * src

Detailed Description

Definition at line 27 of file ImageConvertThreaded.cpp.

Member Data Documentation

ImageBase::EColorModel ThreadArg__::colormodel

Definition at line 29 of file ImageConvertThreaded.cpp.

Referenced by BIAS::ImageConvertThreaded::ConvertThread_().

ImageBase * ThreadArg__::dst

Definition at line 28 of file ImageConvertThreaded.cpp.

Referenced by BIAS::ImageConvertThreaded::ConvertThread_().

bool ThreadArg__::planar

Definition at line 30 of file ImageConvertThreaded.cpp.

Referenced by BIAS::ImageConvertThreaded::ConvertThread_().

ImageBase* ThreadArg__::src

Definition at line 28 of file ImageConvertThreaded.cpp.

Referenced by BIAS::ImageConvertThreaded::ConvertThread_().

The documentation for this struct was generated from the following file:
  • Base/Image/ImageConvertThreaded.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ThreeDOut Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ThreeDOut

BIAS::ThreeDOut Class Reference

unified output of 3D entities via OpenGL or VRML More...

#include <Utils/ThreeDOut.hh>

Inheritance diagram for BIAS::ThreeDOut:

[legend]
Collaboration diagram for BIAS::ThreeDOut:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
std::map< unsigned int, PMatrix3DData > & | GetMapPMatrices ()
call by reference accessor for data member mapPMatrices_ JW
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetParams (const ThreeDOutParameters &params)
void | SetParamsCameraScale (double cameraScale)
void | SetParamsCameraStyle (CameraDrawingStyle cameraStyle)
void | SetParamsDrawEllipse (bool drawEllipse)
void | SetParamsPointSize (double pointSize)
void | SetWriteViewpoints (const bool &val)
write VRML viewpoint nodes for some P matrices ?
ThreeDOut (const BIAS::ThreeDOutParameters &params=BIAS::ThreeDOutParameters())
ctor
~ThreeDOut ()
destructor
Functions to add geometric objects for output
save the return value to update or delete the objects later

unsigned int | AddEllipsoid (BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
unsigned int | AddEllipsoid (BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
unsigned int | AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, const Vector3< double > &LR, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="")
add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data
unsigned int | AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="")
add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data
unsigned int | AddLine (const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
unsigned int | AddLine (const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
unsigned int | AddPMatrix (BIAS::Matrix3x4< double > &M, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
interface for the above
unsigned int | AddPMatrix (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
decompose P and add to internal data structures.
unsigned int | AddPoint (const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
unsigned int | AddPoint (const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
unsigned int | AddPose (const PoseParametrization &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0)
unsigned int | AddProjection (const Projection &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0)
Add a projection object to ThreeDOut mem.
unsigned int | AddTriangleMesh (const TriangleMesh &mesh, const std::string &name="", const std::string &textureOutputName="", bool writeOutTexture=true)
Adds triangle mesh as IndexedFaceSet to ThreeDOut mem.
Debug functions
void Dump ()
list all internal 3d objects on cout
Functions for openGL output (if BIAS_HAVE_OPENGL)
void | GetBoundingBox (Vector3< double > &min, Vector3< double > &max)
Get the min and max vector of the smallest bounding box, which is drawn around the added points.
Vector3< double > | GetCenterOfPoints ()
get center of gravity (mean of structure)
void OpenGLOut ()
render all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.
void | OpenGLOut (const BIAS::RGBAuc &Color)
draw all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.
void OpenGLOutEllipsoids ()
draw all ellipsoids with their own color:
void | OpenGLOutEllipsoids (const BIAS::RGBAuc &Color)
draw all ellipsoids with the same color:
void | OpenGLOutImages (const bool &disableBlending=true)
draw all image patches using OpenGL
void OpenGLOutLines ()
draw all pmatrices with their own color
void | OpenGLOutLines (const BIAS::RGBAuc &Color)
draw all lines with the same color:
void OpenGLOutPMatrices ()
draw all pmatrices with their own color:
void | OpenGLOutPMatrices (const BIAS::RGBAuc &Color)
draw all pmatrices with the same color:
void OpenGLOutPoints ()
draw all points with their own color:
void | OpenGLOutPoints (const BIAS::RGBAuc &Color)
draw all points with the same color:
Functions to remove previously added objects for output
void RemoveAll ()
removes all entites Essentially a clear on each entityt container.
void RemoveAllEllipsoids ()
completely removes all ellipsoids from the internal structures, there is no way to get it back
void RemoveAllImages ()
completely removes all images from the internal structures, there is no way to get it back
void RemoveAllLines ()
completely removes all lines from the internal structures JW
void RemoveAllPMatrices ()
completely removes all images from the internal structures, there is no way to get it back
void RemoveAllPoints ()
completely removes all points from the internal structures, there is no way to get them back
void | RemoveEllipsoid (const unsigned int &EIndex)
completely removes the ellipsoid from the internal structures, there is no way to get it back
void | RemoveImage (const unsigned int &EIndex)
completely removes the image from the internal structures, there is no way to get it back
void | RemoveLine (const unsigned int &LineIndex)
completely removes the line from the internal structures, there is no way to get it back
void | RemovePMatrix (int index)
removes the P-matrix index, there is no way to get it back
void | RemovePoint (const unsigned int &PointIndex)
completely removes the point from the internal structures, there is no way to get it back
Functions to update previously added objects for output
void | UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
void | UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
void | UpdateLine (const unsigned int &LineIndex, const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
void | UpdateLine (const unsigned int &LineIndex, const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
void | UpdatePMatrix (const unsigned int &PIndex, BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE)
void | UpdatePMatrixColor (const unsigned int &PIndex, const BIAS::RGBAuc &Color)
void | UpdatePoint (const unsigned int &PointIndex, const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
void | UpdatePoint (const unsigned int &PointIndex, const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
Functions for VRML output
int | VRMLOut (const std::string &sFilename, const BIAS::RGBAuc &Color)
flush all 3d objects to a vrml file with name sFilename, use Color as the color for all elements
int | VRMLOut (const std::string &sFilename)
flush all 3d objects to a vrml file with name sFilename, this is the function most users would call
int | VRMLOutEllipsoids (std::ostream &vrml)
only write (previously stored) ellipsoids into an open vrml file
int | VRMLOutEllipsoids (std::ostream &vrml, const BIAS::RGBAuc &Color)
only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color
int | VRMLOutImages (std::ostream &VRMLFile)
only write (previously stored) images into an open vrml file
int | VRMLOutIndexedFaceSets (std::ostream &VRMLFile)
only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node.
int | VRMLOutLines (std::ostream &vrml)
only write (previously stored) points into an open vrml file
int | VRMLOutLines (std::ostream &vrml, const BIAS::RGBAuc &Color)
only write (previously stored) lines into an open vrml file, override their individual colors with Color
int | VRMLOutPMatrices (std::ostream &vrml)
only write (previously stored) cameras into an open vrml file
int | VRMLOutPMatrices (std::ostream &vrml, const BIAS::RGBAuc &Color)
only write (previously stored) cameras into an open vrml file, override their individual colors with Color
int | VRMLOutPoints (std::ostream &vrml)
only write (previously stored) points into an open vrml file
int | VRMLOutPoints (std::ostream &vrml, const BIAS::RGBAuc &Color)
only write (previously stored) points into an open vrml file, override their individual colors with Color
int | VRMLOutProjection (std::ostream &VRMLFile)
only write previously stored projection objects into opened vrml file.
int | VRMLOutWriteHeader (std::ostream &vrml)
write the VRML 2.0 header into an open file
void | VRMLOutWriteNavigationInfo (std::ostream &vrml)
write VRML 2.0 navigation info node
void | VRMLOutWriteViewpoint (std::ostream &vrml)
write VRMl 2.0 viewpoint that can selecetd in vrml viewer

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)
static double | VRMLtransparency (const BIAS::Vector4< unsigned char > &vRgba)
get alpha opacity component as VRML transparency
static double | VRMLtransparency (const unsigned char alpha)
get alpha opacity value as VRML transparency helper mapping, usually transparency = (1-alpha)

Protected Member Functions

std::string | CorrectDefString_ (const std::string &defstring)
replace invalid characters in def string and return corrected
void | OpenGLOutPMatrices_ (const BIAS::RGBAuc &Color, bool UseOneColor)
int | VRMLOutPMatricesAsArrows_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
this is an optimized strategy to avoid hundred of shape nodes
int | VRMLOutPMatricesAsMesh_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
int | VRMLOutPointsAsBoxes_ (std::ostream &VRMLFile)
int | VRMLOutPointsAsPointSet_ (std::ostream &VRMLFile)
int | VRMLOutPointsAsSpheres_ (std::ostream &VRMLFile)

Protected Attributes

long int | _liDebugLevel
unsigned int | NextEllipsoidIndex_
counter for the next ellipsoid index, gaps are not reused by now
unsigned int | NextImageIndex_
counter for the next index, gaps (due to delete) are not reused by now
unsigned int | NextIndexedFaceSetIndex_
unsigned int | NextLineIndex_
counter for the next line index, gaps (due to delete) arent reused
unsigned int | NextPIndex_
counter for the next index, gaps (due to delete) are not reused by now
unsigned int | NextPointIndex_
counter for the next index, gaps (due to delete) are not reused by now
unsigned int | NextProjection3DIndex_
ThreeDOutParameters Params_
holds the params set by constructor or SetParams
bool | WriteViewpoints_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Attributes

std::map< unsigned int, Ellipsoid3DData > | mapEllipsoids_
map of all ellipsoid structures
std::map< unsigned int, Image3DData > | mapImages_
map of all image structures
std::map< unsigned int, IndexedFaceSet > | mapIndexedFaceSet_
std::map< unsigned int, Line3DData > | mapLines_
map of all line structures
std::map< unsigned int, PMatrix3DData > | mapPMatrices_
the cameras are saved in a vector for efficiency reasons
std::map< unsigned int, Point3DData > | mapPoints_
map of all point structures
std::map< unsigned int, Projection3DData > | mapProjection3D_

Detailed Description

unified output of 3D entities via OpenGL or VRML

Alpha blending policy (like OpenGL defaults):

  • Alpha blending value means opacity (not transparency), e.g. 0 = full transparent (invisible glass), see ALPHA_TRANSPARENT 255 (1.0f) = opaque (not transparent), see ALPHA_OPAQUE
  • Thus set OpenGL state of calling application accordingly e.g.
          glEnable   (GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  • Remember to render in correct order:
  • opaque primitives first,
  • back to front order. Details: http://www.opengl.org/resources/faq/technical/transparency.htm

However, VRML has inverse interpretation (!), thus a conversion is required, see http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html

Definition at line 240 of file ThreeDOut.hh.

Constructor & Destructor Documentation

ThreeDOut::~ThreeDOut ( )

destructor

Definition at line 75 of file ThreeDOut.cpp.

ThreeDOut::ThreeDOut ( const BIAS::ThreeDOutParameters & params = BIAS::ThreeDOutParameters() )

ctor

Definition at line 64 of file ThreeDOut.cpp.

References NextEllipsoidIndex_, NextImageIndex_, NextIndexedFaceSetIndex_, NextLineIndex_, NextPIndex_, NextPointIndex_, SetParams(), and WriteViewpoints_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

unsigned int ThreeDOut::AddEllipsoid | ( | BIAS::CovMatrix3x3 & | cov,
 |  | BIAS::HomgPoint3D & | C,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_SEMI,
 |  | const double & | dConfidenceRegionScale = DEF_P_SCALE
 | ) |

Parameters:
dConfidenceRegionScale see Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 186 of file ThreeDOut.cpp.

References AddEllipsoid(), BIASERR, and BIAS::HomgPoint3D::IsHomogenized().

unsigned int ThreeDOut::AddEllipsoid | ( | BIAS::CovMatrix3x3 & | cov,
 |  | BIAS::Vector3< double > & | C,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_SEMI,
 |  | const double & | dConfidenceRegionScale = DEF_P_SCALE
 | ) |

Parameters:
dConfidenceRegionScale see Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 163 of file ThreeDOut.cpp.

References BIAS::Ellipsoid3DData::C, BIAS::Ellipsoid3DData::Color, BIAS::Ellipsoid3DData::dAngle, BIAS::CovMatrix3x3::GetPCA(), BIAS::RMatrixBase::GetRotationAxisAngle(), mapEllipsoids_, NextEllipsoidIndex_, BIAS::Ellipsoid3DData::RotAxis, BIAS::Ellipsoid3DData::s0, BIAS::Ellipsoid3DData::s1, BIAS::Ellipsoid3DData::s2, and BIAS::Matrix3x3< T >::Transpose().

Referenced by AddEllipsoid().

unsigned int ThreeDOut::AddImage | ( | const Vector3< double > & | UL,
 |  | const Vector3< double > & | UR,
 |  | const Vector3< double > & | LL,
 |  | const Vector3< double > & | LR,
 |  | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned char * | pData,
 |  | unsigned int | channels = 1,
 |  | const std::string & | name = ""
 | ) |

add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters:
channels number of channels: 1=grey, 3=rgb
Author:
koeser 09/2005

Definition at line 198 of file ThreeDOut.cpp.

References BIASABORT, BIASERR, CorrectDefString_(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Image3DData::ImageData, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image3DData::LL, BIAS::Image3DData::LR, mapImages_, BIAS::Image3DData::name, NextImageIndex_, BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetROI(), BIAS::Image3DData::UL, and BIAS::Image3DData::UR.

unsigned int BIAS::ThreeDOut::AddImage | ( | const Vector3< double > & | UL,
 |  | const Vector3< double > & | UR,
 |  | const Vector3< double > & | LL,
 |  | unsigned int | Width,
 |  | unsigned int | Height,
 |  | unsigned char * | pData,
 |  | unsigned int | channels = 1,
 |  | const std::string & | name = ""
 | ) | [inline]

add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters:
channels number of channels: 1=grey, 3=rgb
Author:
koeser 09/2004

Definition at line 328 of file ThreeDOut.hh.

Referenced by main().

unsigned int ThreeDOut::AddLine | ( | const BIAS::HomgPoint3D & | Start,
 |  | const BIAS::HomgPoint3D & | End,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Returns:
index value to change the line later
Parameters:
Start | Start point of line
End | End point of line

Definition at line 150 of file ThreeDOut.cpp.

References AddLine(), BIASERR, and BIAS::HomgPoint3D::IsHomogenized().

unsigned int ThreeDOut::AddLine | ( | const BIAS::Vector3< double > & | Start,
 |  | const BIAS::Vector3< double > & | End,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Returns:
index value to change the line later
Parameters:
Start | Start point of line
End | End point of line

Definition at line 137 of file ThreeDOut.cpp.

References BIAS::Line3DData::Color, BIAS::Line3DData::End, mapLines_, NextLineIndex_, and BIAS::Line3DData::Start.

Referenced by AddLine().

unsigned int BIAS::ThreeDOut::AddPMatrix | ( | BIAS::Matrix3x4< double > & | M,
 |  | const unsigned int & | width,
 |  | const unsigned int & | height,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE,
 |  | const double & | dScale = DEF_P_SCALE,
 |  | const std::string & | name = ""
 | ) |

interface for the above

Author:
Jan Woetzel

unsigned int BIAS::ThreeDOut::AddPMatrix | ( | BIAS::PMatrix & | P,
 |  | const unsigned int & | width,
 |  | const unsigned int & | height,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE,
 |  | const double & | dScale = DEF_P_SCALE,
 |  | const std::string & | name = ""
 | ) |

decompose P and add to internal data structures.

name defines node name in vrml - does not like dots ('.')!

Todo:
the scale of the camera should be a (dynamic) visualization option, not a parameter of the add function
Author:
woelk 01/2004

Referenced by main(), and UpdatePMatrix().

unsigned int ThreeDOut::AddPoint | ( | const BIAS::HomgPoint3D & | v,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Returns:
index value to change the point later
Parameters:
v point coordinates

Definition at line 127 of file ThreeDOut.cpp.

References AddPoint(), BIASERR, and BIAS::HomgPoint3D::IsHomogenized().

unsigned int ThreeDOut::AddPoint | ( | const BIAS::Vector3< double > & | v,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Returns:
index value to change the point later
Parameters:
v point coordinates

Definition at line 117 of file ThreeDOut.cpp.

References BIAS::Point3DData::Color, mapPoints_, NextPointIndex_, and BIAS::Point3DData::Point.

Referenced by AddPoint().

unsigned int ThreeDOut::AddPose | ( | const PoseParametrization & | p,
 |  | const RGBAuc & | colorSelection = RGBAuc_WHITE_OPAQUE,
 |  | const double | radius = 0.1,
 |  | const double | scale = 1.0
 | ) |

Definition at line 380 of file ThreeDOut.cpp.

References BIAS::Projection3DData::ColorOfSelection, mapProjection3D_, NextProjection3DIndex_, BIAS::Projection3DData::radiusSelection, and BIAS::Projection3DData::Set().

unsigned int ThreeDOut::AddProjection | ( | const Projection & | p,
 |  | const RGBAuc & | colorSelection = RGBAuc_WHITE_OPAQUE,
 |  | const double | radius = 0.1,
 |  | const double | scale = 1.0
 | ) |

Add a projection object to ThreeDOut mem.

Parameters:
colorSelection color of the small sphere around the center Draws the four cam coordinate axes (A in red, H in Green, V in blue) and a small sphere around the center which is usefull for selection.

Definition at line 365 of file ThreeDOut.cpp.

References BIAS::Projection3DData::ColorOfSelection, mapProjection3D_, NextProjection3DIndex_, BIAS::Projection3DData::radiusSelection, and BIAS::Projection3DData::Set().

unsigned int ThreeDOut::AddTriangleMesh | ( | const TriangleMesh & | mesh,
 |  | const std::string & | name = "",
 |  | const std::string & | textureOutputName = "",
 |  | bool | writeOutTexture = true
 | ) |

Adds triangle mesh as IndexedFaceSet to ThreeDOut mem.

name defines node name in vrml - must not contain dots ('.')! textureOutputName is telling which name the texture shall have when writing the vrml. If this param is empty (default), the texture is integrated into the vrml as PixelMap. writeOutTexture if true and thetextureOutputName is not "" then the texture is written into textureOutputName, otherwise only the texture name or a PixelMap is integrated into vrml.

Definition at line 337 of file ThreeDOut.cpp.

References CorrectDefString_(), BIAS::IndexedFaceSet::faceIndices, BIAS::ImageBase::Flip(), BIAS::TriangleMesh::GetTexCoords(), BIAS::TriangleMesh::GetTexture(), BIAS::TriangleMesh::GetTriangleIndices(), BIAS::TriangleMesh::GetVertices(), mapIndexedFaceSet_, BIAS::IndexedFaceSet::name, NextIndexedFaceSetIndex_, BIAS::IndexedFaceSet::texCoordSet, BIAS::IndexedFaceSet::texture, BIAS::IndexedFaceSet::textureName, BIAS::IndexedFaceSet::vertexSet, and BIAS::IndexedFaceSet::writeOutTexture.

std::string BIAS::ThreeDOut::CorrectDefString_ ( const std::string & defstring ) [protected]

replace invalid characters in def string and return corrected

Author:
koeser

Referenced by AddImage(), and AddTriangleMesh().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void ThreeDOut::Dump ( )

list all internal 3d objects on cout

Definition at line 2088 of file ThreeDOut.cpp.

Referenced by main().

void ThreeDOut::GetBoundingBox | ( | Vector3< double > & | min,
 |  | Vector3< double > & | max
 | ) |

Get the min and max vector of the smallest bounding box, which is drawn around the added points.

Definition at line 2132 of file ThreeDOut.cpp.

References mapPoints_.

Vector3< double > ThreeDOut::GetCenterOfPoints ( )

get center of gravity (mean of structure)

Definition at line 2119 of file ThreeDOut.cpp.

References center, and mapPoints_.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

std::map< unsigned int, PMatrix3DData >& BIAS::ThreeDOut::GetMapPMatrices ( ) [inline]

call by reference accessor for data member mapPMatrices_ JW

Definition at line 618 of file ThreeDOut.hh.

void ThreeDOut::OpenGLOut ( )

render all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.

(everything)

Definition at line 963 of file ThreeDOut.cpp.

References OpenGLOutEllipsoids(), OpenGLOutImages(), OpenGLOutLines(), OpenGLOutPMatrices(), and OpenGLOutPoints().

void ThreeDOut::OpenGLOut ( const BIAS::RGBAuc & Color )

draw all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.

(everything)

Definition at line 952 of file ThreeDOut.cpp.

References OpenGLOutEllipsoids(), OpenGLOutImages(), OpenGLOutLines(), OpenGLOutPMatrices(), and OpenGLOutPoints().

void ThreeDOut::OpenGLOutEllipsoids ( )

draw all ellipsoids with their own color:

Definition at line 931 of file ThreeDOut.cpp.

References DEGREE_PER_RAD, it, and mapEllipsoids_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutEllipsoids ( const BIAS::RGBAuc & Color )

draw all ellipsoids with the same color:

Definition at line 926 of file ThreeDOut.cpp.

References BIASERR.

void ThreeDOut::OpenGLOutImages ( const bool & disableBlending = true )

draw all image patches using OpenGL

Parameters:
disableBlending true to glDisbale(GL_BLEND) temporarily
Todo:
: This implementation is very inefficient because it recreates the textures for each rendering pass! JW

Definition at line 819 of file ThreeDOut.cpp.

References it, and mapImages_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutLines ( )

draw all pmatrices with their own color

Todo:
linedrawingstyle=dashed not implmented

Definition at line 908 of file ThreeDOut.cpp.

References it, and mapLines_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutLines ( const BIAS::RGBAuc & Color )

draw all lines with the same color:

Definition at line 893 of file ThreeDOut.cpp.

References BIAS::Vector4< T >::GetData(), it, and mapLines_.

void ThreeDOut::OpenGLOutPMatrices ( )

draw all pmatrices with their own color:

Definition at line 813 of file ThreeDOut.cpp.

References OpenGLOutPMatrices_().

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutPMatrices ( const BIAS::RGBAuc & Color )

draw all pmatrices with the same color:

Definition at line 809 of file ThreeDOut.cpp.

References OpenGLOutPMatrices_().

void ThreeDOut::OpenGLOutPMatrices_ | ( | const BIAS::RGBAuc & | Color,
 |  | bool | UseOneColor
 | ) | [protected]

Definition at line 620 of file ThreeDOut.cpp.

References BIAS_SELECTION_OFFSET_PMATRIX, BIAS::ThreeDOutParameters::CameraScale, BIAS::ThreeDOutParameters::CameraStyle, BIAS::Vector4< T >::GetData(), it, mapPMatrices_, Params_, BIAS::PyramidMesh, and BIAS::PyramidSolid.

Referenced by OpenGLOutPMatrices().

void ThreeDOut::OpenGLOutPoints ( )

draw all points with their own color:

Definition at line 596 of file ThreeDOut.cpp.

References BIASERR, BIAS::Box, it, mapPoints_, Params_, BIAS::Point, BIAS::ThreeDOutParameters::PointSize, BIAS::PointSprite, BIAS::ThreeDOutParameters::PointStyle, and BIAS::Sphere.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutPoints ( const BIAS::RGBAuc & Color )

draw all points with the same color:

Definition at line 571 of file ThreeDOut.cpp.

References BIASERR, BIAS::Box, BIAS::Vector4< T >::GetData(), it, mapPoints_, Params_, BIAS::Point, BIAS::ThreeDOutParameters::PointSize, BIAS::PointSprite, BIAS::ThreeDOutParameters::PointStyle, and BIAS::Sphere.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void ThreeDOut::RemoveAll ( )

removes all entites Essentially a clear on each entityt container.

Author:
Jan Woetzel

Definition at line 2149 of file ThreeDOut.cpp.

References RemoveAllEllipsoids(), RemoveAllImages(), RemoveAllLines(), RemoveAllPMatrices(), and RemoveAllPoints().

void ThreeDOut::RemoveAllEllipsoids ( )

completely removes all ellipsoids from the internal structures, there is no way to get it back

Definition at line 537 of file ThreeDOut.cpp.

References mapEllipsoids_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllImages ( )

completely removes all images from the internal structures, there is no way to get it back

Definition at line 548 of file ThreeDOut.cpp.

References mapImages_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllLines ( )

completely removes all lines from the internal structures JW

Definition at line 525 of file ThreeDOut.cpp.

References mapLines_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllPMatrices ( )

completely removes all images from the internal structures, there is no way to get it back

Definition at line 553 of file ThreeDOut.cpp.

References mapPMatrices_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllPoints ( )

completely removes all points from the internal structures, there is no way to get them back

Definition at line 513 of file ThreeDOut.cpp.

References mapPoints_.

Referenced by RemoveAll().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void ThreeDOut::RemoveEllipsoid ( const unsigned int & EIndex )

completely removes the ellipsoid from the internal structures, there is no way to get it back

Definition at line 530 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, and mapEllipsoids_.

void ThreeDOut::RemoveImage ( const unsigned int & EIndex )

completely removes the image from the internal structures, there is no way to get it back

Definition at line 541 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, and mapImages_.

void ThreeDOut::RemoveLine ( const unsigned int & LineIndex )

completely removes the line from the internal structures, there is no way to get it back

Definition at line 518 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, and mapLines_.

void ThreeDOut::RemovePMatrix ( int index )

removes the P-matrix index, there is no way to get it back

Definition at line 558 of file ThreeDOut.cpp.

References it, and mapPMatrices_.

void ThreeDOut::RemovePoint ( const unsigned int & PointIndex )

completely removes the point from the internal structures, there is no way to get it back

Definition at line 506 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, and mapPoints_.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void ThreeDOut::SetParams ( const ThreeDOutParameters & params )

Definition at line 77 of file ThreeDOut.cpp.

References Params_.

Referenced by ThreeDOut().

void ThreeDOut::SetParamsCameraScale ( double cameraScale )

Definition at line 86 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraScale, and Params_.

void ThreeDOut::SetParamsCameraStyle ( CameraDrawingStyle cameraStyle )

Definition at line 91 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraStyle, and Params_.

void ThreeDOut::SetParamsDrawEllipse ( bool drawEllipse )

Definition at line 96 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids, and Params_.

void ThreeDOut::SetParamsPointSize ( double pointSize )

Definition at line 81 of file ThreeDOut.cpp.

References Params_, and BIAS::ThreeDOutParameters::PointSize.

void ThreeDOut::SetWriteViewpoints ( const bool & val )

write VRML viewpoint nodes for some P matrices ?

Author:
Jan Woetzel

Definition at line 2170 of file ThreeDOut.cpp.

References WriteViewpoints_.

void ThreeDOut::UpdateEllipsoid | ( | const unsigned int & | EIndex,
 |  | BIAS::CovMatrix3x3 & | cov,
 |  | BIAS::HomgPoint3D & | C,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_SEMI,
 |  | const double & | dConfidenceRegionScale = DEF_P_SCALE
 | ) |

Parameters:
dConfidenceRegionScale see Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 493 of file ThreeDOut.cpp.

References BIASERR, BIAS::HomgPoint3D::IsHomogenized(), and UpdateEllipsoid().

void ThreeDOut::UpdateEllipsoid | ( | const unsigned int & | EIndex,
 |  | BIAS::CovMatrix3x3 & | cov,
 |  | BIAS::Vector3< double > & | C,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_SEMI,
 |  | const double & | dConfidenceRegionScale = DEF_P_SCALE
 | ) |

Parameters:
dConfidenceRegionScale see Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 469 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, BIAS::Ellipsoid3DData::C, BIAS::Ellipsoid3DData::Color, BIAS::Ellipsoid3DData::dAngle, BIAS::CovMatrix3x3::GetPCA(), BIAS::RMatrixBase::GetRotationAxisAngle(), mapEllipsoids_, BIAS::Ellipsoid3DData::RotAxis, BIAS::Ellipsoid3DData::s0, BIAS::Ellipsoid3DData::s1, BIAS::Ellipsoid3DData::s2, and BIAS::Matrix3x3< T >::Transpose().

Referenced by UpdateEllipsoid().

void ThreeDOut::UpdateLine | ( | const unsigned int & | LineIndex,
 |  | const BIAS::HomgPoint3D & | Start,
 |  | const BIAS::HomgPoint3D & | End,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Parameters:
LineIndex | value previously returned by AddLine
Start | Start point of line
End | End point of line

Definition at line 454 of file ThreeDOut.cpp.

References BIASERR, BIAS::HomgPoint3D::IsHomogenized(), and UpdateLine().

void ThreeDOut::UpdateLine | ( | const unsigned int & | LineIndex,
 |  | const BIAS::Vector3< double > & | Start,
 |  | const BIAS::Vector3< double > & | End,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Parameters:
LineIndex | value previously returned by AddLine
Start | Start point of line
End | End point of line

Definition at line 440 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, BIAS::Line3DData::Color, BIAS::Line3DData::End, mapLines_, and BIAS::Line3DData::Start.

Referenced by UpdateLine().

void ThreeDOut::UpdatePMatrix | ( | const unsigned int & | PIndex,
 |  | BIAS::PMatrix & | P,
 |  | const unsigned int & | width,
 |  | const unsigned int & | height,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE,
 |  | const double & | dScale = DEF_P_SCALE
 | ) |

Parameters:
PIndex value previously returned by AddPMatrix

Definition at line 421 of file ThreeDOut.cpp.

References AddPMatrix(), and NextPIndex_.

void ThreeDOut::UpdatePMatrixColor | ( | const unsigned int & | PIndex,
 |  | const BIAS::RGBAuc & | Color
 | ) |

Parameters:
PIndex value previously returned by AddPMatrix

Definition at line 434 of file ThreeDOut.cpp.

References mapPMatrices_.

void ThreeDOut::UpdatePoint | ( | const unsigned int & | PointIndex,
 |  | const BIAS::HomgPoint3D & | v,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Parameters:
PointIndex value previously returned by AddPoint

Definition at line 410 of file ThreeDOut.cpp.

References BIASERR, BIAS::HomgPoint3D::IsHomogenized(), and UpdatePoint().

void ThreeDOut::UpdatePoint | ( | const unsigned int & | PointIndex,
 |  | const BIAS::Vector3< double > & | v,
 |  | const BIAS::RGBAuc & | Color = RGBAuc_WHITE_OPAQUE
 | ) |

Parameters:
PointIndex value previously returned by AddPoint

Definition at line 398 of file ThreeDOut.cpp.

References ASSERT_MAP_ELEMENT, BIAS::Point3DData::Color, mapPoints_, and BIAS::Point3DData::Point.

Referenced by UpdatePoint().

int BIAS::ThreeDOut::VRMLOut | ( | const std::string & | sFilename,
 |  | const BIAS::RGBAuc & | Color
 | ) |

flush all 3d objects to a vrml file with name sFilename, use Color as the color for all elements

int BIAS::ThreeDOut::VRMLOut ( const std::string & sFilename )

flush all 3d objects to a vrml file with name sFilename, this is the function most users would call

Referenced by main().

int BIAS::ThreeDOut::VRMLOutEllipsoids ( std::ostream & vrml )

only write (previously stored) ellipsoids into an open vrml file

int BIAS::ThreeDOut::VRMLOutEllipsoids | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) |

only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color

int BIAS::ThreeDOut::VRMLOutImages ( std::ostream & VRMLFile )

only write (previously stored) images into an open vrml file

int BIAS::ThreeDOut::VRMLOutIndexedFaceSets ( std::ostream & VRMLFile )

only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node.

int BIAS::ThreeDOut::VRMLOutLines ( std::ostream & vrml )

only write (previously stored) points into an open vrml file

int BIAS::ThreeDOut::VRMLOutLines | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) |

only write (previously stored) lines into an open vrml file, override their individual colors with Color

int BIAS::ThreeDOut::VRMLOutPMatrices ( std::ostream & vrml )

only write (previously stored) cameras into an open vrml file

int BIAS::ThreeDOut::VRMLOutPMatrices | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) |

only write (previously stored) cameras into an open vrml file, override their individual colors with Color

int BIAS::ThreeDOut::VRMLOutPMatricesAsArrows_ | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) | [protected]

this is an optimized strategy to avoid hundred of shape nodes

int BIAS::ThreeDOut::VRMLOutPMatricesAsMesh_ | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) | [protected]

int BIAS::ThreeDOut::VRMLOutPoints ( std::ostream & vrml )

only write (previously stored) points into an open vrml file

int BIAS::ThreeDOut::VRMLOutPoints | ( | std::ostream & | vrml,
 |  | const BIAS::RGBAuc & | Color
 | ) |

only write (previously stored) points into an open vrml file, override their individual colors with Color

int BIAS::ThreeDOut::VRMLOutPointsAsBoxes_ ( std::ostream & VRMLFile ) [protected]

int BIAS::ThreeDOut::VRMLOutPointsAsPointSet_ ( std::ostream & VRMLFile ) [protected]

int ThreeDOut::VRMLOutPointsAsSpheres_ ( std::ostream & VRMLFile ) [protected]

Definition at line 1981 of file ThreeDOut.cpp.

References BIAS::Sphere.

int BIAS::ThreeDOut::VRMLOutProjection ( std::ostream & VRMLFile )

only write previously stored projection objects into opened vrml file.

int ThreeDOut::VRMLOutWriteHeader ( std::ostream & vrml )

write the VRML 2.0 header into an open file

Definition at line 2078 of file ThreeDOut.cpp.

void ThreeDOut::VRMLOutWriteNavigationInfo ( std::ostream & vrml )

write VRML 2.0 navigation info node

Author:
Jan Woetzel

Definition at line 2175 of file ThreeDOut.cpp.

Referenced by VRMLOutWriteViewpoint().

void ThreeDOut::VRMLOutWriteViewpoint ( std::ostream & vrml )

write VRMl 2.0 viewpoint that can selecetd in vrml viewer

Author:
Jan Woetzel

Definition at line 2186 of file ThreeDOut.cpp.

References BIASASSERT, BIAS::Vector3< T >::Length(), mapPMatrices_, p, BIAS::Vector3< T >::ScalarProduct(), and VRMLOutWriteNavigationInfo().

double ThreeDOut::VRMLtransparency ( const BIAS::Vector4< unsigned char > & vRgba ) [static]

get alpha opacity component as VRML transparency

Definition at line 2165 of file ThreeDOut.cpp.

References VRMLtransparency().

double ThreeDOut::VRMLtransparency ( const unsigned char alpha ) [static]

get alpha opacity value as VRML transparency helper mapping, usually transparency = (1-alpha)

Definition at line 2159 of file ThreeDOut.cpp.

Referenced by VRMLtransparency().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

std::map<unsigned int, Ellipsoid3DData> BIAS::ThreeDOut::mapEllipsoids_ [private]

map of all ellipsoid structures

Definition at line 687 of file ThreeDOut.hh.

Referenced by AddEllipsoid(), OpenGLOutEllipsoids(), RemoveAllEllipsoids(), RemoveEllipsoid(), and UpdateEllipsoid().

std::map<unsigned int, Image3DData> BIAS::ThreeDOut::mapImages_ [private]

map of all image structures

Definition at line 666 of file ThreeDOut.hh.

Referenced by AddImage(), OpenGLOutImages(), RemoveAllImages(), and RemoveImage().

std::map<unsigned int, IndexedFaceSet> BIAS::ThreeDOut::mapIndexedFaceSet_ [private]

Definition at line 693 of file ThreeDOut.hh.

Referenced by AddTriangleMesh().

std::map<unsigned int, Line3DData> BIAS::ThreeDOut::mapLines_ [private]

map of all line structures

Definition at line 680 of file ThreeDOut.hh.

Referenced by AddLine(), OpenGLOutLines(), RemoveAllLines(), RemoveLine(), and UpdateLine().

std::map<unsigned int, PMatrix3DData > BIAS::ThreeDOut::mapPMatrices_ [private]

the cameras are saved in a vector for efficiency reasons

Definition at line 659 of file ThreeDOut.hh.

Referenced by OpenGLOutPMatrices_(), RemoveAllPMatrices(), RemovePMatrix(), UpdatePMatrixColor(), and VRMLOutWriteViewpoint().

std::map<unsigned int, Point3DData> BIAS::ThreeDOut::mapPoints_ [private]

map of all point structures

Definition at line 673 of file ThreeDOut.hh.

Referenced by AddPoint(), GetBoundingBox(), GetCenterOfPoints(), OpenGLOutPoints(), RemoveAllPoints(), RemovePoint(), and UpdatePoint().

std::map<unsigned int, Projection3DData> BIAS::ThreeDOut::mapProjection3D_ [private]

Definition at line 699 of file ThreeDOut.hh.

Referenced by AddPose(), and AddProjection().

unsigned int BIAS::ThreeDOut::NextEllipsoidIndex_ [protected]

counter for the next ellipsoid index, gaps are not reused by now

Definition at line 690 of file ThreeDOut.hh.

Referenced by AddEllipsoid(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextImageIndex_ [protected]

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 669 of file ThreeDOut.hh.

Referenced by AddImage(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextIndexedFaceSetIndex_ [protected]

Definition at line 695 of file ThreeDOut.hh.

Referenced by AddTriangleMesh(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextLineIndex_ [protected]

counter for the next line index, gaps (due to delete) arent reused

Definition at line 683 of file ThreeDOut.hh.

Referenced by AddLine(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextPIndex_ [protected]

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 662 of file ThreeDOut.hh.

Referenced by ThreeDOut(), and UpdatePMatrix().

unsigned int BIAS::ThreeDOut::NextPointIndex_ [protected]

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 676 of file ThreeDOut.hh.

Referenced by AddPoint(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextProjection3DIndex_ [protected]

Definition at line 701 of file ThreeDOut.hh.

Referenced by AddPose(), and AddProjection().

ThreeDOutParameters BIAS::ThreeDOut::Params_ [protected]

holds the params set by constructor or SetParams

Definition at line 655 of file ThreeDOut.hh.

Referenced by OpenGLOutPMatrices_(), OpenGLOutPoints(), SetParams(), SetParamsCameraScale(), SetParamsCameraStyle(), SetParamsDrawEllipse(), and SetParamsPointSize().

bool BIAS::ThreeDOut::WriteViewpoints_ [protected]

Definition at line 703 of file ThreeDOut.hh.

Referenced by SetWriteViewpoints(), and ThreeDOut().

The documentation for this class was generated from the following files:
  • Utils/ThreeDOut.hh
  • Utils/ThreeDOut.cpp
Generated on Wed Jun 21 19:11:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ThreeDOutParameters Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ThreeDOutParameters

BIAS::ThreeDOutParameters Struct Reference

configuration struct for drawing styles of various 3d objects More...

#include <Utils/ThreeDOut.hh>

List of all members.

Public Member Functions

ThreeDOutParameters ()

Public Attributes

double | CameraScale
CameraDrawingStyle CameraStyle
bool | DrawUncertaintyEllipsoids
LineDrawingStyle LineStyle
unsigned char | LineWidth
double | PointSize
PointDrawingStyle PointStyle

Detailed Description

configuration struct for drawing styles of various 3d objects

Definition at line 207 of file ThreeDOut.hh.

Constructor & Destructor Documentation

ThreeDOutParameters::ThreeDOutParameters ( )

Definition at line 53 of file ThreeDOut.cpp.

References CameraScale, CameraStyle, DrawUncertaintyEllipsoids, LineStyle, LineWidth, BIAS::Point, PointSize, PointStyle, BIAS::PyramidMesh, and BIAS::Solid.

Member Data Documentation

double BIAS::ThreeDOutParameters::CameraScale

Definition at line 215 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::OpenGLOutPMatrices_(), BIAS::ThreeDOut::SetParamsCameraScale(), and ThreeDOutParameters().

CameraDrawingStyle BIAS::ThreeDOutParameters::CameraStyle

Definition at line 211 of file ThreeDOut.hh.

Referenced by main(), BIAS::ThreeDOut::OpenGLOutPMatrices_(), BIAS::ThreeDOut::SetParamsCameraStyle(), and ThreeDOutParameters().

bool BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids

Definition at line 213 of file ThreeDOut.hh.

Referenced by main(), BIAS::ThreeDOut::SetParamsDrawEllipse(), and ThreeDOutParameters().

LineDrawingStyle BIAS::ThreeDOutParameters::LineStyle

Definition at line 212 of file ThreeDOut.hh.

Referenced by main(), and ThreeDOutParameters().

unsigned char BIAS::ThreeDOutParameters::LineWidth

Definition at line 216 of file ThreeDOut.hh.

Referenced by ThreeDOutParameters().

double BIAS::ThreeDOutParameters::PointSize

Definition at line 214 of file ThreeDOut.hh.

Referenced by main(), BIAS::ThreeDOut::OpenGLOutPoints(), BIAS::ThreeDOut::SetParamsPointSize(), and ThreeDOutParameters().

PointDrawingStyle BIAS::ThreeDOutParameters::PointStyle

Definition at line 210 of file ThreeDOut.hh.

Referenced by main(), BIAS::ThreeDOut::OpenGLOutPoints(), and ThreeDOutParameters().

The documentation for this struct was generated from the following files:
  • Utils/ThreeDOut.hh
  • Utils/ThreeDOut.cpp
Generated on Wed Jun 21 19:11:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TimeMeasure Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TimeMeasure

BIAS::TimeMeasure Class Reference
[Utilities]

class TimeMeasure contains functions for timing real time and cpu (kernel) time. More...

#include <Base/Debug/TimeMeasure.hh>

List of all members.

Public Member Functions

void CloseTimerFile ()
double | GetCycleCount () const
return number of cycles between all subsequent calls to Start() and Stop() since last call to Reset()
double | GetFreq () const
returns the frequency in Hz based on real time (= fps)
double | GetIdleTime () const
WIN32: return time that system spended in idle mode in msec cmenk.
double | GetKernelTime () const
WIN32: return time that system spended in kernel mode in msec cmenk.
double | GetRealTime () const
return real time (=wall time clock) in usec JW
double | GetUserFreq () const
returns the frequency in Hz based on user time (= fps)
double | GetUserTime () const
return user time (=system usage time) in msec JW
bool | IsRunning () const
void | LogToFileAndReset (const std::string &comment)
double | MeasureOverhead ()
returns the number of cycles between subsequent Start() and Stop() calls !! implies a Reset(); !!!
double | MeasureProcessorFrequency ()
measures the ProcessorFrequency in MHz
void | Print (std::ostream &os=std::cout) const
void | PrintCycleCount (std::ostream &os=std::cout) const
prints the number of cycles between subsequent calls to Start() and Stop() since last call to Reset() to os
void | PrintIdleTime (std::ostream &os=std::cout, const bool &verbose=true) const
print the time that the system spended in idle mode
void | PrintKernelTime (std::ostream &os=std::cout, const bool &verbose=true) const
print the time that the system spended in kernel mode (WIN32)
void | PrintRealTime (std::ostream &os=std::cout, const bool &verbose=true) const
print the real time (=wall time clok)
void | PrintUserTime (std::ostream &os=std::cout, const bool &verbose=true) const
print the user time (=system usage time)
void | ReadCycleCounter (unsigned int *hi, unsigned int *lo)
void Reset ()
void | SetTimerFile (const std::string &file)
void Start ()
void Stop ()
TimeMeasure ()
default constructor:
~TimeMeasure ()
print the output when the desctructor is called ?

Static Public Member Functions

static void | MSecondsToHumanReadable (const unsigned long &msIN, int &msecOUT, int &seconds, int &minutes, int &hours, int &days, int &weeks)
converts a given amount of millisecs to human redabel format
static std::ostream & | PrintMsecHumanReadable (const unsigned long msecIN, std::ostream &os=std::cout)
display nr of msecs in format weeks,days,hours,minutes,seconds

Protected Attributes

double | _dSum
timeval | rtActual
timeval | rtKernelSum
timeval | rtLast
timeval | rtRealSum
bool | running
tms startstruct | stopstruct
clock_t | user

Static Protected Attributes

static std::ofstream | TimerStream_

Detailed Description

class TimeMeasure contains functions for timing real time and cpu (kernel) time.

added Win32 rdtsc assembler cycle count with int64 jw 12/2004 added Linux cycle count functions for i386-processors woelk 07/2003

Author:
Jan Woetzel (03/04/2002 - 11/2005)
Examples:

timeit.cpp.

Definition at line 109 of file TimeMeasure.hh.

Constructor & Destructor Documentation

TimeMeasure::TimeMeasure ( )

default constructor:

Definition at line 11 of file TimeMeasure.cpp.

References _dSum, kernel, rtActual, rtKernelSum, rtLast, rtRealSum, running, and user.

BIAS::TimeMeasure::~TimeMeasure ( ) [inline]

print the output when the desctructor is called ?

Definition at line 117 of file TimeMeasure.hh.

Member Function Documentation

void TimeMeasure::CloseTimerFile ( )

Definition at line 213 of file TimeMeasure.cpp.

References TimerStream_.

double TimeMeasure::GetCycleCount ( ) const

return number of cycles between all subsequent calls to Start() and Stop() since last call to Reset()

Author:
woelk

Definition at line 292 of file TimeMeasure.cpp.

References BIASERR, and running.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), main(), MeasureOverhead(), MeasureProcessorFrequency(), PrintCycleCount(), BIAS::TrackerBase< StorageType >::RejectX86_(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

double TimeMeasure::GetFreq ( ) const

returns the frequency in Hz based on real time (= fps)

Definition at line 276 of file TimeMeasure.cpp.

References GetRealTime().

double TimeMeasure::GetIdleTime ( ) const

WIN32: return time that system spended in idle mode in msec cmenk.

Definition at line 267 of file TimeMeasure.cpp.

Referenced by PrintIdleTime().

double TimeMeasure::GetKernelTime ( ) const

WIN32: return time that system spended in kernel mode in msec cmenk.

Definition at line 258 of file TimeMeasure.cpp.

References kernel.

Referenced by PrintKernelTime().

double TimeMeasure::GetRealTime ( ) const

return real time (=wall time clock) in usec JW

Definition at line 242 of file TimeMeasure.cpp.

References rtRealSum.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), GetFreq(), BIAS::Condensation::InitPrior(), LogToFileAndReset(), main(), BIAS::Condensation::PredictNewSamplePositions(), PrintRealTime(), BIAS::Condensation::Process(), BIAS::TrackerBase< StorageType >::RejectX86_(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

double TimeMeasure::GetUserFreq ( ) const

returns the frequency in Hz based on user time (= fps)

Definition at line 281 of file TimeMeasure.cpp.

References GetUserTime().

double TimeMeasure::GetUserTime ( ) const

return user time (=system usage time) in msec JW

Definition at line 247 of file TimeMeasure.cpp.

References user.

Referenced by GetUserFreq(), LogToFileAndReset(), main(), and PrintUserTime().

bool TimeMeasure::IsRunning ( ) const

Definition at line 286 of file TimeMeasure.cpp.

References running.

void TimeMeasure::LogToFileAndReset ( const std::string & comment )

Definition at line 231 of file TimeMeasure.cpp.

References BIASERR, GetRealTime(), GetUserTime(), Reset(), Stop(), and TimerStream_.

double TimeMeasure::MeasureOverhead ( )

returns the number of cycles between subsequent Start() and Stop() calls !! implies a Reset(); !!!

Author:
woelk

Definition at line 121 of file TimeMeasure.cpp.

References GetCycleCount(), Reset(), Start(), and Stop().

double TimeMeasure::MeasureProcessorFrequency ( )

measures the ProcessorFrequency in MHz

Author:
woelk

Definition at line 136 of file TimeMeasure.cpp.

References GetCycleCount(), Start(), and Stop().

void TimeMeasure::MSecondsToHumanReadable | ( | const unsigned long & | msIN,
 |  | int & | msecOUT,
 |  | int & | seconds,
 |  | int & | minutes,
 |  | int & | hours,
 |  | int & | days,
 |  | int & | weeks
 | ) | [static]

converts a given amount of millisecs to human redabel format

extracts hours, minutes, seconds, msecs from amout of msecs (1/1000 sec).

Parameters:
msecIN input parameter
Author:
Jan Woetzel

Definition at line 48 of file TimeMeasure.cpp.

Referenced by PrintMsecHumanReadable().

void TimeMeasure::Print ( std::ostream & os = std::cout ) const

Examples:
timeit.cpp.

Definition at line 324 of file TimeMeasure.cpp.

References PrintCycleCount(), PrintIdleTime(), PrintKernelTime(), PrintRealTime(), and PrintUserTime().

Referenced by main(), and BIAS::TimeMeasurement::~TimeMeasurement().

void TimeMeasure::PrintCycleCount ( std::ostream & os = std::cout ) const

prints the number of cycles between subsequent calls to Start() and Stop() since last call to Reset() to os

Author:
woelk

Definition at line 206 of file TimeMeasure.cpp.

References GetCycleCount().

Referenced by main(), and Print().

void TimeMeasure::PrintIdleTime | ( | std::ostream & | os = std::cout,
 |  | const bool & | verbose = true
 | ) | const

print the time that the system spended in idle mode

Parameters:
verbose true for additionoutput in days hour sminutes seconds cmenk

Definition at line 193 of file TimeMeasure.cpp.

References GetIdleTime(), and PrintMsecHumanReadable().

Referenced by Print().

void TimeMeasure::PrintKernelTime | ( | std::ostream & | os = std::cout,
 |  | const bool & | verbose = true
 | ) | const

print the time that the system spended in kernel mode (WIN32)

Parameters:
verbose true for additionoutput in days hour sminutes seconds cmenk

Definition at line 179 of file TimeMeasure.cpp.

References GetKernelTime(), and PrintMsecHumanReadable().

Referenced by Print().

std::ostream & TimeMeasure::PrintMsecHumanReadable | ( | const unsigned long | msecIN,
 |  | std::ostream & | os = std::cout
 | ) | [static]

display nr of msecs in format weeks,days,hours,minutes,seconds

Definition at line 87 of file TimeMeasure.cpp.

References MSecondsToHumanReadable().

Referenced by PrintIdleTime(), PrintKernelTime(), PrintRealTime(), and PrintUserTime().

void TimeMeasure::PrintRealTime | ( | std::ostream & | os = std::cout,
 |  | const bool & | verbose = true
 | ) | const

print the real time (=wall time clok)

Parameters:
verbose true for additionoutput in days hour sminutes seconds Jan Woetzel

Definition at line 150 of file TimeMeasure.cpp.

References GetRealTime(), and PrintMsecHumanReadable().

Referenced by Print().

void TimeMeasure::PrintUserTime | ( | std::ostream & | os = std::cout,
 |  | const bool & | verbose = true
 | ) | const

print the user time (=system usage time)

Parameters:
verbose true for additionoutput in days hour sminutes seconds Jan Woetzel

Definition at line 164 of file TimeMeasure.cpp.

References GetUserTime(), and PrintMsecHumanReadable().

Referenced by Print().

void BIAS::TimeMeasure::ReadCycleCounter | ( | unsigned int * | hi,
 |  | unsigned int * | lo
 | ) | [inline]

Referenced by Start(), and Stop().

void TimeMeasure::Reset ( )

Examples:
timeit.cpp.

Definition at line 303 of file TimeMeasure.cpp.

References _dSum, BIASERR, rtKernelSum, rtRealSum, running, and user.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::Condensation::CalculateBaseWeights_(), LogToFileAndReset(), main(), MeasureOverhead(), BIAS::Condensation::PredictNewSamplePositions(), BIAS::Condensation::Process(), BIAS::TimeMeasurement::Start(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

void TimeMeasure::SetTimerFile ( const std::string & file )

Definition at line 219 of file TimeMeasure.cpp.

References BIASABORT, BIASERR, and TimerStream_.

void BIAS::TimeMeasure::Start ( ) [inline]

Examples:
timeit.cpp.

Definition at line 269 of file TimeMeasure.hh.

References BIASERR, ReadCycleCounter(), rtLast, and running.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::CornerDetectorGradient< StorageType, CalculationType >::Detect(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::Condensation::InitPrior(), main(), MeasureOverhead(), MeasureProcessorFrequency(), BIAS::Condensation::PredictNewSamplePositions(), BIAS::VideoSource_Disk::PreGrab(), BIAS::Tracker< StorageType, CalculationType >::PreparePyramide(), BIAS::Condensation::Process(), BIAS::TrackerBase< StorageType >::RejectX86_(), BIAS::TimeMeasurement::Start(), BIAS::TrackerBase< StorageType >::Track(), Track(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

void BIAS::TimeMeasure::Stop ( ) [inline]

Examples:
timeit.cpp.

Definition at line 305 of file TimeMeasure.hh.

References _dSum, BIASASSERT, BIASERR, kernel, ReadCycleCounter(), rtActual, rtLast, rtRealSum, running, stopstruct, and user.

Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::Condensation::CalculateBaseWeights_(), BIAS::Condensation::CalculateMean_(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::Condensation::InitPrior(), LogToFileAndReset(), main(), MeasureOverhead(), MeasureProcessorFrequency(), BIAS::Condensation::PredictNewSamplePositions(), BIAS::Condensation::Process(), BIAS::TrackerBase< StorageType >::RejectX86_(), Track(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TimeMeasurement::~TimeMeasurement().

Member Data Documentation

double BIAS::TimeMeasure::_dSum [protected]

Definition at line 246 of file TimeMeasure.hh.

Referenced by Reset(), Stop(), and TimeMeasure().

timeval BIAS::TimeMeasure::rtActual [protected]

Definition at line 232 of file TimeMeasure.hh.

Referenced by Stop(), and TimeMeasure().

timeval BIAS::TimeMeasure::rtKernelSum [protected]

Definition at line 233 of file TimeMeasure.hh.

Referenced by Reset(), and TimeMeasure().

timeval BIAS::TimeMeasure::rtLast [protected]

Definition at line 231 of file TimeMeasure.hh.

Referenced by Start(), Stop(), and TimeMeasure().

timeval BIAS::TimeMeasure::rtRealSum [protected]

Definition at line 230 of file TimeMeasure.hh.

Referenced by GetRealTime(), Reset(), Stop(), and TimeMeasure().

bool BIAS::TimeMeasure::running [protected]

Definition at line 236 of file TimeMeasure.hh.

Referenced by GetCycleCount(), IsRunning(), Reset(), Start(), Stop(), and TimeMeasure().

struct tms startstruct BIAS::TimeMeasure::stopstruct [protected]

Definition at line 235 of file TimeMeasure.hh.

Referenced by Stop().

std::ofstream BIAS::TimeMeasure::TimerStream_ [static, protected]

Definition at line 258 of file TimeMeasure.hh.

Referenced by CloseTimerFile(), LogToFileAndReset(), and SetTimerFile().

clock_t BIAS::TimeMeasure::user [protected]

Definition at line 234 of file TimeMeasure.hh.

Referenced by GetUserTime(), Reset(), Stop(), and TimeMeasure().

The documentation for this class was generated from the following files:
  • Base/Debug/TimeMeasure.hh
  • Base/Debug/TimeMeasure.cpp
Generated on Wed Jun 21 19:11:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TimeMeasurement Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TimeMeasurement

BIAS::TimeMeasurement Class Reference

#include <Base/Debug/TimeMeasurement.hh>

Collaboration diagram for BIAS::TimeMeasurement:

[legend]
List of all members.

Public Member Functions

void Start ()
Reset and Start the timer.
TimeMeasurement (const std::string &str)
constructor with additional description
TimeMeasurement ()
constructor working as START function
~TimeMeasurement ()
destructor working as STOP function

Protected Attributes

std::string description_
BIAS::TimeMeasure timer_
local timer used by ctor and detor

Detailed Description

Definition at line 54 of file TimeMeasurement.hh.

Constructor & Destructor Documentation

BIAS::TimeMeasurement::~TimeMeasurement ( ) [inline]

destructor working as STOP function

Definition at line 58 of file TimeMeasurement.hh.

References BIAS::TimeMeasure::Print(), BIAS::TimeMeasure::Stop(), and timer_.

BIAS::TimeMeasurement::TimeMeasurement ( ) [inline]

constructor working as START function

Definition at line 66 of file TimeMeasurement.hh.

References Start().

BIAS::TimeMeasurement::TimeMeasurement ( const std::string & str ) [inline]

constructor with additional description

Definition at line 72 of file TimeMeasurement.hh.

References description_, and Start().

Member Function Documentation

void BIAS::TimeMeasurement::Start ( ) [inline]

Reset and Start the timer.

Useful for earlier construction

Author:
Jan Woetzel

Definition at line 81 of file TimeMeasurement.hh.

References BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), and timer_.

Referenced by TimeMeasurement().

Member Data Documentation

std::string BIAS::TimeMeasurement::description_ [protected]

Definition at line 89 of file TimeMeasurement.hh.

Referenced by TimeMeasurement().

BIAS::TimeMeasure BIAS::TimeMeasurement::timer_ [protected]

local timer used by ctor and detor

Definition at line 88 of file TimeMeasurement.hh.

Referenced by Start(), and ~TimeMeasurement().

The documentation for this class was generated from the following file:
  • Base/Debug/TimeMeasurement.hh
Generated on Wed Jun 21 19:11:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TIntersect Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TIntersect Struct Reference

#include <Geometry/EpipolarLine.hh>

Collaboration diagram for TIntersect:

[legend]
List of all members.

Public Attributes

enum TEdge | Edge
double | EpipoleDistance
bool | IntersectsInImage
BIAS::HomgPoint2D Point

Detailed Description

Definition at line 273 of file EpipolarLine.hh.

Member Data Documentation

enum TEdge TIntersect::Edge

Definition at line 274 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

double TIntersect::EpipoleDistance

Definition at line 277 of file EpipolarLine.hh.

Referenced by CompIntersect(), and BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

bool TIntersect::IntersectsInImage

Definition at line 276 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

BIAS::HomgPoint2D TIntersect::Point

Definition at line 275 of file EpipolarLine.hh.

Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_().

The documentation for this struct was generated from the following file:
  • Geometry/EpipolarLine.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TopFrame Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TopFrame

BIAS::TopFrame Class Reference

This is the fundamental frame in which the canvas (displaying the image) is positioned. More...

#include <Gui/GuiWX.hh>

Collaboration diagram for BIAS::TopFrame:

[legend]
List of all members.

Public Member Functions

void | OnChar (wxKeyEvent &event)
void | OnClose (wxCloseEvent &event)
TopFrame (GuiWX *gui, Image< unsigned char > &image)
~TopFrame ()

Public Attributes

ImageCanvas * Canvas_

Protected Attributes

GuiWX * MyGui_

Detailed Description

This is the fundamental frame in which the canvas (displaying the image) is positioned.

We also define the status bar here.

Definition at line 87 of file GuiWX.hh.

Constructor & Destructor Documentation

TopFrame::TopFrame | ( | GuiWX * | gui,
 |  | Image< unsigned char > & | image
 | ) |

Definition at line 242 of file GuiWX.cpp.

TopFrame::~TopFrame ( )

Definition at line 253 of file GuiWX.cpp.

References Canvas_.

Member Function Documentation

void TopFrame::OnChar ( wxKeyEvent & event )

Definition at line 259 of file GuiWX.cpp.

void TopFrame::OnClose ( wxCloseEvent & event )

Definition at line 264 of file GuiWX.cpp.

References BIAS::GuiWX::DestroyWindow(), and MyGui_.

Member Data Documentation

ImageCanvas* BIAS::TopFrame::Canvas_

Definition at line 97 of file GuiWX.hh.

Referenced by BIAS::GuiWX::ShowConvertedImage_(), and ~TopFrame().

GuiWX* BIAS::TopFrame::MyGui_ [protected]

Definition at line 101 of file GuiWX.hh.

Referenced by OnClose().

The documentation for this class was generated from the following files:
  • Gui/GuiWX.hh
  • Gui/GuiWX.cpp
Generated on Wed Jun 21 19:11:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Tracker< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Tracker

BIAS::Tracker< StorageType, CalculationType > Class Template Reference
[Feature Tracker]

High level tracking class. More...

#include <Matcher2D/Tracker.hh>

Inheritance diagram for BIAS::Tracker< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::Tracker< StorageType, CalculationType >:

[legend]
List of all members.

Initialization functions

void ClearPoints ()
Clears the internal data structures, i.e.
void ParameterChanged ()
Adopt to changes in parameter, i.e.
void Reset ()
Calls ClearPoints and sets pointer to last image and gradients to zero.
Tracker (Param &para, const int grp, const std::string &postfix)
Tracker (Param &para, const std::string &postfix="")
Tracker ()
Default constructor without param object.
virtual | ~Tracker ()

Tracking and image preparation functions

These functions need to be called for every new image.

int | PreparePyramide (const Image< StorageType > &im, PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gx, PyramidImage< CalculationType > &gy)
Prepares the pyramid images: Filters im to pim[0], downsamples pim[0] and calculates the gradients gx and gy of pim in every pyramid level.
virtual int | Track (PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady, const std::vector< HomgPoint2D > &prediction, const std::vector< Matrix2x2< KLT_TYPE > > &affineprediction=std::vector< Matrix2x2< KLT_TYPE > >())
tracks all points in Points_ using prediction as previous knowledge
virtual int | Track (PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady)
Tracks all points from the internal data structure Points_.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | DumpResults (std::ostream &os=std::cout)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | ReplaceLastImages (PyramidImage< CalculationType > *pim, PyramidImage< CalculationType > *gradx, PyramidImage< CalculationType > *grady)
This function allows the replacement of the last images.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | WriteTrackFile (std::deque< std::vector< HomgPoint2D > > &p, std::deque< std::vector< int > > &results, const std::string &name)
write a track file in Birchfeld-style.

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | AddParameter_ (Param &para, const int grp, const std::string &postfix)
void | DetermineROI_ (int &tlx, int &tly, int &brx, int &bry) const
void | PadPoints_ (const int start)
sets all points with index>=start in the internal data structures to infinity
void | ReserveInternals_ (const int pysize, const int pointsize)
void | ResizeInternals_ (const int pysize, const int num_points)
adapts the internal memory to new pyramid size and new point count if necessary.
void | ResizeInternals_ (const int pysize)
void | WriteTrackLog_ (int num)
logs reasons for lost tracks into tracker.log

Protected Attributes

double * | _GaussRatio
double * | _GaussSigma
parameter from mean filters
int * | _HalfWinSize
parameter from TrackerBase
long int | _liDebugLevel
KLT_TYPE * | _MaxError
int * | _MaxIterations
int * | _MeanSize
bool | _ParamsAllocated
std::vector< Matrix2x2< double > > | AffinePrediction_
prediction for affine warping, same for all pyramid levels
std::vector< std::vector<
Matrix2x2< double > > > 		AffineResults_
results of affine tracking
Binomial< StorageType, CalculationType > | binomial_
std::vector< std::vector<
Matrix< double > > > 		Cov_
covariance matrices
std::vector< std::vector<
double > > 		DisplInLastIter_
displacement inlast iteration
Gauss< StorageType, CalculationType > | gauss_
GradientGauss< CalculationType,
CalculationType > 		ggauss_
GradientGaussAsymmetric< CalculationType,
CalculationType > 		ggaussasymmetric_
FilterNTo2N< CalculationType,
CalculationType > * 		grad_
the different gradient classes
int * | GradientType_
GradientSobel3x3< CalculationType,
CalculationType > 		gsobel3x3_
Vector< int > * | HalfWinSize_
PyramidImage< CalculationType > * | LastGradX_
PyramidImage< CalculationType > * | LastGradY_
PyramidImage< CalculationType > * | LastImage_
Convolution< StorageType,
CalculationType > * 		lowpass_
the different mean filter classes
Vector< KLT_TYPE > * | MaxError_
Vector< int > * | MaxIter_
the parameter
Mean< StorageType, CalculationType > | mean_
int * | MeanType_
int | MinBorderDist_
minimal distance of every point from image border in biggest pyramid im
std::vector< std::vector<
int > > 		NumIter_
number of iterations used
std::vector< HomgPoint2D > | p2tracked_
temporary data
std::vector< std::vector<
HomgPoint2D > > 		Points_
the point position in the actual image
std::vector< std::vector<
HomgPoint2D > > 		PredictedPoints_
the prediction for every pyramid image
int * | PyIndex_
std::vector< std::vector<
int > > 		res_
result code for every point
std::vector< std::vector<
double > > 		ResiduiMAD_
mean absolute grey level difference (MAD) in tracking window
std::vector< std::vector<
double > > 		ResiduiMSD_
mean squared grey level difference (MSD) in tracking window
TrackerBase< CalculationType > | tb_
the base tracker
bool * | UseCoarserPointIfLost_
set if you want to keep track of points regardless of trackability in highest resolution

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::Tracker< StorageType, CalculationType >

High level tracking class.

Provides a convenient interface for tracking tasks using pyramid images.

See ExampleTracker3 for brief exemplary usage.

Author:
woelk

Definition at line 66 of file Tracker.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
Tracker::Tracker ( )

Default constructor without param object.

Definition at line 88 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::_GaussRatio, BIAS::Tracker< StorageType, CalculationType >::_GaussSigma, BIAS::Tracker< StorageType, CalculationType >::_HalfWinSize, BIAS::Tracker< StorageType, CalculationType >::_MaxError, BIAS::Tracker< StorageType, CalculationType >::_MaxIterations, BIAS::Tracker< StorageType, CalculationType >::_MeanSize, BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated, DFLT_PYSIZE, BIAS::Tracker< StorageType, CalculationType >::gauss_, BIAS::TrackerBase< StorageType >::GetHalfWinSizePointer(), BIAS::TrackerBase< StorageType >::GetMaxErrorPointer(), BIAS::TrackerBase< StorageType >::GetMaxIterationsPointer(), BIAS::Gauss< InputStorageType, OutputStorageType >::GetRatioPointer(), BIAS::Gauss< InputStorageType, OutputStorageType >::GetSigmaPointer(), BIAS::Mean< InputStorageType, OutputStorageType >::GetSizePointer(), BIAS::Tracker< StorageType, CalculationType >::grad_, BIAS::Tracker< StorageType, CalculationType >::GradientType_, BIAS::GT_Sobel3x3, BIAS::Tracker< StorageType, CalculationType >::HalfWinSize_, BIAS::Tracker< StorageType, CalculationType >::lowpass_, BIAS::LPT_Mean, BIAS::Tracker< StorageType, CalculationType >::MaxError_, BIAS::Tracker< StorageType, CalculationType >::MaxIter_, BIAS::Tracker< StorageType, CalculationType >::mean_, BIAS::Tracker< StorageType, CalculationType >::MeanType_, TNT::Vector< T >::newsize(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::PyIndex_, BIAS::Tracker< StorageType, CalculationType >::tb_, and BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_.

template<class StorageType, class CalculationType>
Tracker::Tracker | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 50 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated, BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Param::GetFreeGroupID(), BIAS::Tracker< StorageType, CalculationType >::grad_, BIAS::Param::IsUsedGroupID(), BIAS::Tracker< StorageType, CalculationType >::lowpass_, BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Param::SetGroupName(), and BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_.

template<class StorageType, class CalculationType>
Tracker::Tracker | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 69 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated, BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Tracker< StorageType, CalculationType >::grad_, BIAS::Tracker< StorageType, CalculationType >::lowpass_, BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_.

template<class StorageType, class CalculationType>
Tracker::~Tracker ( ) [virtual]

Definition at line 142 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated, BIAS::Tracker< StorageType, CalculationType >::GradientType_, BIAS::Tracker< StorageType, CalculationType >::HalfWinSize_, BIAS::Tracker< StorageType, CalculationType >::MaxError_, BIAS::Tracker< StorageType, CalculationType >::MaxIter_, BIAS::Tracker< StorageType, CalculationType >::MeanType_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, and BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::AddNumPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | quality,
 |  | const int | max_num_feat
 | ) |

Adds first max_num_feat points further away than *MinBorderDist_ from roi border to the list of points to be tracked.

Track must have been called before this function. returns -1 if not enough input points were available

Author:
woelk 09/2004

Referenced by Track().

template<class StorageType, class CalculationType>
void Tracker::AddParameter_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Definition at line 1214 of file Tracker.cpp.

References BIAS::AddGradientType(), BIAS::AddLowPassType(), BIASCDOUT, BIAS::Param::CheckParam(), D_TRACKER_PARAM, BIAS::Param::GetParamInt(), BIAS::Tracker< StorageType, CalculationType >::GradientType_, and BIAS::Tracker< StorageType, CalculationType >::MeanType_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::AddPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | quality
 | ) |

Adds all points to the list of points to be tracked.

If a point lies too close to the roi/image border it's w-component in the internal data structure is set to zero and it is hence not tracked Track must have been called before this function.

Author:
woelk 09/2004

template<class StorageType, class CalculationType>
void Tracker::ClearPoints ( )

Clears the internal data structures, i.e.

POints_, POints2_, NumIter_, DisplInLastIter_, ResiduiMAD_, ResiduiMSD_, res_ and Cov_.

Author:
woelk 09/2004

Definition at line 244 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType, class CalculationType>
void Tracker::DetermineROI_ | ( | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected]

Definition at line 328 of file Tracker.cpp.

References BIASASSERT, BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, BIAS::Tracker< StorageType, CalculationType >::LastImage_, max, min, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::DumpResults ( std::ostream & os = std::cout ) [inline]

Definition at line 319 of file Tracker.hh.

References p, pyind, and TNT::Vector< T >::size().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::FillUpPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) |

Replaces points to which no correspondence could be established in the internal data structures.

These "lost" points are marked in the internal data structure by setting the last component (w) to zero (0.0). Traverses the argument list subsequently and makes use of as many points as necessary. Only points further away than *MinBorderDist_ from roi border are added to internal data structures.

If "ghost tracks" appear, try to make the corner detector aware of points which are already tracked :

        CornerDetector cd;
        Tracker tr;
        vector<HomgPoint2D> pt
        tr.GetPoints(pt);
        cd.Detect(image, pt, qual);
        tr.FillUpPoints(pt, qual);
See also documentation of CornerDetectorGradient::Detect().

The argument "qual" refers to the quality from the corner detector.

Returns:
number of used points, negative on error.
Author:
woelk 09/2004

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetCovariances ( std::vector< Matrix< double > > & cov ) const [inline]

returns covariance matrices for biggest pyramid level.

Author:
woelk 06/2005

Definition at line 254 of file Tracker.hh.

References cov.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetError ( std::vector< double > & error ) const [inline]

returns the displacement in the last iteration on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 223 of file Tracker.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::GetHalfWinSize ( ) [inline]

Definition at line 297 of file Tracker.hh.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::GetMinBorderDistance ( ) [inline]

returns the minimum distance to image border which is used in AddPoints and FillUpPoints

Definition at line 286 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetNumIter ( std::vector< int > & numiter ) const [inline]

returns the number of iterations used in the biggest pyramid level

Author:
woelk 09/2004

Definition at line 217 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetPoints ( std::vector< HomgPoint2D > & p ) const [inline]

returns the point positions in the actual image points at infinity (w=0.0) are returned, if tracking failed

Author:
woelk

Definition at line 211 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
enum ERejectionType BIAS::Tracker< StorageType, CalculationType >::GetRejectionType ( ) [inline]

Definition at line 290 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResiduiMAD ( std::vector< double > & residui ) const [inline]

returns the mean grey level difference in the tracking window on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 229 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResiduiMSD ( std::vector< double > & residui ) const [inline]

returns the squared mean grey level difference in the tracking window on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 235 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResults ( std::vector< int > & results ) const [inline]

returns the results from the base tracker class on the biggest pyramid level.

0 on success (error< maxerror) - the point was tracked -1 when no spatial structure is present -2 when point slid out of image -3 when maxiter is reached an error is above maxerror -4 when a point lies outside of valid region in images -5 when the mean absolute difference between the two poinst -6 when input point is at infinity 1 when error increased from last iteration

Author:
woelk 09/2004

Definition at line 249 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::GetTrackerType ( ) [inline]

return trackerbase type currently active

Definition at line 277 of file Tracker.hh.

template<class StorageType, class CalculationType>
void Tracker::PadPoints_ ( const int start ) [protected]

sets all points with index>=start in the internal data structures to infinity

Definition at line 1330 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::Points_.

template<class StorageType, class CalculationType>
void Tracker::ParameterChanged ( )

Adopt to changes in parameter, i.e.

sets grad_, lowpass_ and tb_ according to *GradientType_, *MeanType_ and *TrackerType_.

Author:
woelk 09/2004

Definition at line 170 of file Tracker.cpp.

References BIASCDOUT, BIASERR, BIAS::Tracker< StorageType, CalculationType >::binomial_, BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), D_TRACKER_PARAM, BIAS::Tracker< StorageType, CalculationType >::gauss_, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders(), BIAS::Tracker< StorageType, CalculationType >::ggauss_, BIAS::Tracker< StorageType, CalculationType >::ggaussasymmetric_, BIAS::Tracker< StorageType, CalculationType >::grad_, BIAS::Tracker< StorageType, CalculationType >::GradientType_, BIAS::Tracker< StorageType, CalculationType >::gsobel3x3_, BIAS::GT_Gauss, BIAS::GT_GaussAsymmetric, BIAS::GT_Sobel3x3, gx, gy, BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, BIAS::Tracker< StorageType, CalculationType >::LastImage_, BIAS::Tracker< StorageType, CalculationType >::lowpass_, BIAS::LPT_Binomial, BIAS::LPT_Gauss, BIAS::LPT_Mean, max, BIAS::Tracker< StorageType, CalculationType >::mean_, BIAS::Tracker< StorageType, CalculationType >::MeanType_, BIAS::Tracker< StorageType, CalculationType >::MinBorderDist_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

Referenced by main(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int Tracker::PreparePyramide | ( | const Image< StorageType > & | im,
 |  | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gx,
 |  | PyramidImage< CalculationType > & | gy
 | ) |

Prepares the pyramid images: Filters im to pim[0], downsamples pim[0] and calculates the gradients gx and gy of pim in every pyramid level.

Author:
woelk 09/2004

Definition at line 713 of file Tracker.cpp.

References BIASASSERT, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::PyramidImage< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::PyramidImage< StorageType >::SetZero(), and BIAS::TimeMeasure::Start().

Referenced by main(), and Track().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::ReplaceAllPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) |

Place every point from points even those at infinity, in the internal data structure Points_.

Author:
woelk 09/2004

Referenced by main().

template<class StorageType, class CalculationType>
void Tracker::ReplaceLastImages | ( | PyramidImage< CalculationType > * | pim,
 |  | PyramidImage< CalculationType > * | gradx,
 |  | PyramidImage< CalculationType > * | grady
 | ) |

This function allows the replacement of the last images.

It is intended to be used when all points in the current image should be mapped against different reference image for every point. A set of "last images" is constructed from patches

Author:
woelk 02/2006

Definition at line 158 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, and BIAS::Tracker< StorageType, CalculationType >::LastImage_.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::ReplacePoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) |

Place every point from points which is not at infinity, in the internal data structure Points_.

Author:
woelk 09/2004

template<class StorageType, class CalculationType>
void Tracker::ReserveInternals_ | ( | const int | pysize,
 |  | const int | pointsize
 | ) | [protected]

Definition at line 300 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, p, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

template<class StorageType, class CalculationType>
void Tracker::Reset ( )

Calls ClearPoints and sets pointer to last image and gradients to zero.

Author:
streckel 11/2004

Definition at line 319 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, and BIAS::Tracker< StorageType, CalculationType >::LastImage_.

template<class StorageType, class CalculationType>
void Tracker::ResizeInternals_ | ( | const int | pysize,
 |  | const int | num_points
 | ) | [protected]

adapts the internal memory to new pyramid size and new point count if necessary.

Author:
woelk 02/2006

Definition at line 275 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffinePrediction_, BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, p, BIAS::Tracker< StorageType, CalculationType >::p2tracked_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_, and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
void Tracker::ResizeInternals_ ( const int pysize ) [protected]

Definition at line 258 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetCoarsePointUsage ( const bool & UseCoarse ) [inline]

Definition at line 311 of file Tracker.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetHalfWinSize ( const Vector< int > & hws ) [inline]

Definition at line 300 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetMaxError ( const Vector< double > & max_error ) [inline]

Definition at line 304 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetMaxIterations ( const Vector< int > & max_iter ) [inline]

Definition at line 308 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetRejectionType ( int rejection_type ) [inline]

Definition at line 293 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetTrackerType ( int tracker_type ) [inline]

Definition at line 280 of file Tracker.hh.

template<class StorageType, class CalculationType>
virtual int BIAS::Tracker< StorageType, CalculationType >::Track | ( | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gradx,
 |  | PyramidImage< CalculationType > & | grady,
 |  | const std::vector< HomgPoint2D > & | prediction,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | affineprediction = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) | [virtual]

tracks all points in Points_ using prediction as previous knowledge

Author:
woelk 09/2004

Reimplemented in BIAS::TrackerSynth< StorageType, CalculationType >.

template<class StorageType, class CalculationType>
int Tracker::Track | ( | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gradx,
 |  | PyramidImage< CalculationType > & | grady
 | ) | [virtual]

Tracks all points from the internal data structure Points_.

Author:
woelk 09/2004

Reimplemented in BIAS::TrackerSynth< StorageType, CalculationType >.

Definition at line 843 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::Points_.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::WriteTrackFile | ( | std::deque< std::vector< HomgPoint2D > > & | p,
 |  | std::deque< std::vector< int > > & | results,
 |  | const std::string & | name
 | ) |

write a track file in Birchfeld-style.

The file is independent of internal data structures. p[i][k] is point number k in image i and results[i][k] is result for point number k in image i.

Author:
woelk 09/2004

Referenced by main().

template<class StorageType, class CalculationType>
void Tracker::WriteTrackLog_ ( int num ) [protected]

logs reasons for lost tracks into tracker.log

Definition at line 1092 of file Tracker.cpp.

References BIASABORT, BIASERR, first, and r.

Member Data Documentation

template<class StorageType, class CalculationType>
double * BIAS::Tracker< StorageType, CalculationType >::_GaussRatio [protected]

Definition at line 363 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
double* BIAS::Tracker< StorageType, CalculationType >::_GaussSigma [protected]

parameter from mean filters

Definition at line 363 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::_HalfWinSize [protected]

parameter from TrackerBase

Definition at line 360 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType, class CalculationType>
KLT_TYPE* BIAS::Tracker< StorageType, CalculationType >::_MaxError [protected]

Definition at line 361 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int * BIAS::Tracker< StorageType, CalculationType >::_MaxIterations [protected]

Definition at line 360 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::_MeanSize [protected]

Definition at line 364 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
bool BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated [protected]

Definition at line 349 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType, class CalculationType>
std::vector<Matrix2x2<double> > BIAS::Tracker< StorageType, CalculationType >::AffinePrediction_ [protected]

prediction for affine warping, same for all pyramid levels

Definition at line 390 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<Matrix2x2<double> > > BIAS::Tracker< StorageType, CalculationType >::AffineResults_ [protected]

results of affine tracking

Definition at line 388 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
Binomial<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::binomial_ [protected]

Definition at line 347 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
std::vector<std::vector<Matrix<double> > > BIAS::Tracker< StorageType, CalculationType >::Cov_ [protected]

covariance matrices

Definition at line 386 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_ [protected]

displacement inlast iteration

Definition at line 380 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
Gauss<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::gauss_ [protected]

Definition at line 346 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
GradientGauss<CalculationType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::ggauss_ [protected]

Definition at line 341 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
GradientGaussAsymmetric<CalculationType,CalculationType> BIAS::Tracker< StorageType, CalculationType >::ggaussasymmetric_ [protected]

Definition at line 342 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType, class CalculationType>
FilterNTo2N<CalculationType, CalculationType>* BIAS::Tracker< StorageType, CalculationType >::grad_ [protected]

the different gradient classes

Definition at line 339 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::GradientType_ [protected]

Definition at line 355 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
GradientSobel3x3<CalculationType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::gsobel3x3_ [protected]

Definition at line 340 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::HalfWinSize_ [protected]

Definition at line 353 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType>* BIAS::Tracker< StorageType, CalculationType >::LastGradX_ [protected]

Definition at line 394 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType> * BIAS::Tracker< StorageType, CalculationType >::LastGradY_ [protected]

Definition at line 394 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType>* BIAS::Tracker< StorageType, CalculationType >::LastImage_ [protected]

Definition at line 393 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
Convolution<StorageType, CalculationType>* BIAS::Tracker< StorageType, CalculationType >::lowpass_ [protected]

the different mean filter classes

Definition at line 345 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
Vector<KLT_TYPE>* BIAS::Tracker< StorageType, CalculationType >::MaxError_ [protected]

Definition at line 352 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::MaxIter_ [protected]

the parameter

Definition at line 351 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
Mean<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::mean_ [protected]

Definition at line 348 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::MeanType_ [protected]

Definition at line 356 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::MinBorderDist_ [protected]

minimal distance of every point from image border in biggest pyramid im

Definition at line 358 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
std::vector<std::vector<int> > BIAS::Tracker< StorageType, CalculationType >::NumIter_ [protected]

number of iterations used

Definition at line 378 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<HomgPoint2D> BIAS::Tracker< StorageType, CalculationType >::p2tracked_ [protected]

temporary data

Definition at line 370 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<HomgPoint2D> > BIAS::Tracker< StorageType, CalculationType >::Points_ [protected]

the point position in the actual image

Definition at line 376 of file Tracker.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::PadPoints_(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_(), BIAS::TrackerSynth< StorageType, CalculationType >::Track(), BIAS::Tracker< StorageType, CalculationType >::Track(), and BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

template<class StorageType, class CalculationType>
std::vector<std::vector<HomgPoint2D> > BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_ [protected]

the prediction for every pyramid image

Definition at line 374 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::PyIndex_ [protected]

Definition at line 354 of file Tracker.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_(), BIAS::TrackerSynth< StorageType, CalculationType >::Track(), BIAS::TrackerSynth< StorageType, CalculationType >::Track_(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
std::vector<std::vector<int> > BIAS::Tracker< StorageType, CalculationType >::res_ [protected]

result code for every point

Definition at line 372 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_ [protected]

mean absolute grey level difference (MAD) in tracking window

Definition at line 382 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_ [protected]

mean squared grey level difference (MSD) in tracking window

Definition at line 384 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
TrackerBase<CalculationType> BIAS::Tracker< StorageType, CalculationType >::tb_ [protected]

the base tracker

Definition at line 336 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
bool* BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_ [protected]

set if you want to keep track of points regardless of trackability in highest resolution

Definition at line 367 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

The documentation for this class was generated from the following files:
  • Matcher2D/Tracker.hh
  • Matcher2D/Tracker.cpp
Generated on Wed Jun 21 19:11:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerBase< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerBase

BIAS::TrackerBase< StorageType > Class Template Reference
[Feature Tracker, Feature Tracker, Feature Tracker, Feature Tracker]

Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

#include <Matcher2D/TrackerBase.hh>

Inheritance diagram for BIAS::TrackerBase< StorageType >:

[legend]
Collaboration diagram for BIAS::TrackerBase< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | GetAffineResult (Matrix2x2< KLT_TYPE > &Result)
get result of affine tracking
void | GetAffineResults (std::vector< Matrix2x2< KLT_TYPE > > &Results)
get results of affine tracking
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int * | GetHalfWinSizePointer ()
KLT_TYPE * | GetMaxErrorPointer ()
int * | GetMaxIterationsPointer ()
these are needed in the highlevel Tracker class
int * | GetRejectionType ()
int * | GetTrackerType ()
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws)
void | SetMaxAffineChange (const KLT_TYPE maxerr)
void | SetMaxError (const KLT_TYPE maxerr)
void | SetMaxIterations (const int maxiter)
void | SetMaxResiduumMAD (const KLT_TYPE maxres)
void | SetRejectionType (const int rejection_type)
void | SetTrackerType (const int tracker_type)
void | Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >())
Same as Track(), but a correspondence is searched for every point in the vector p1.
int | Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >())
Calculates correspondence from image1 to image2.
TrackerBase (Param &para, const int grp, const std::string &postfix)
TrackerBase (Param &para, const std::string &postfix="")
TrackerBase ()
~TrackerBase ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _am_computeIntensityDifferenceAffine (Image< StorageType > &img1, Image< StorageType > &img2, const KLT_TYPE &x1, const KLT_TYPE &y1, const KLT_TYPE &x2, const KLT_TYPE &y2, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *imgdiff)
void | _am_getGradientWinAffine (const KLT_TYPE &x, const KLT_TYPE &y, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *out_gradx, KLT_TYPE *out_grady)
void | AddParam_ (Param &para, const int grp, const std::string &postfix)
void CalcGaussianWeightMatrix_ ()
Constructs the weight matrix _weight with size _WinSize, _WinSize and fills it with gaussian weights.
int | EvaluateResult_ (int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4])
Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covarainec matrix and must hence be called immediatly after the Track*_() function call!!
void | Init_ (StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
minx/y maxx/y defines a ROI
void InitMembers_ ()
set member pointers to NULL
void | MyBilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void | MyBilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).
int | RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
int | RejectX86_ (std::vector< KLT_TYPE > &ssd, std::vector< int > &res)
void | Resize_ (const int halfwinsize)
resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
int | TrackAffine_ (KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true)
track using affine warp
int | TrackSimple_ (KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter)
The correspondence calculation is computed using an iterative gradient descent algorithm.
int | TrackWeighted_ (KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter)
Same as TrackSimple_ but also uses the weighting matrix _weight.

Protected Attributes

std::vector< Matrix2x2< KLT_TYPE > > | _AffineResults
results after affine tracking
std::vector< KLT_TYPE > | _all_diff_from_median
same as _diff_from_median but also for points where tracking was not sucessfull
std::vector< KLT_TYPE > | _all_ssd_residui
Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl2
Vector2< KLT_TYPE > | _d
std::vector< KLT_TYPE > | _diff_from_median
_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
used in iteration
Matrix2x2< KLT_TYPE > | _Ginv
Image< StorageType > * | _gradim1x
Image< StorageType > * | _gradim1y
Image< StorageType > * | _gradim2x
Image< StorageType > * | _gradim2y
StorageType ** | _gradx1
gradients image data arrays
StorageType ** | _gradx2
StorageType ** | _grady1
StorageType ** | _grady2
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx2
KLT_TYPE | _gxx
KLT_TYPE | _gxy
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy2
KLT_TYPE | _gyy
int * | _HalfWinSize
iteration stops after _MaxIterations
StorageType ** | _ida1
the image data arrays
StorageType ** | _ida2
KLT_TYPE | _idet
Image< StorageType > * | _im1
pointers to images
Image< StorageType > * | _im2
int | _LastHalfWinSize
remember last support window size (for recalculation of gaussian weight)
long int | _liDebugLevel
KLT_TYPE * | _MaxAffineChange
iteration stops if position refinement is less than *_Maxerror
KLT_TYPE * | _MaxError
iteration stops if position refinement is less than *_Maxerror
int * | _MaxIterations
KLT_TYPE * | _MaxResiduumMAD
outlier rejection via MAD
int | _maxx1
the image borders modulo filter and support windows or ROI for image 1 and image 2
int | _maxx2
int | _maxy1
int | _maxy2
Median1D< KLT_TYPE > | _Median
used in RejectX86_
KLT_TYPE | _median_ssd_residui
int | _minx1
int | _minx2
int | _miny1
int | _miny2
bool | _ParamsAllocated
int * | _RejectionType
The rejection type: valid RT_MAD and RT_X86.
std::vector< KLT_TYPE > | _ssd_residui
sum of sq. grey value diff only for points where tracking succeeded
KLT_TYPE | _threshold
the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)
int * | _TrackerType
the tracker type TT_Simple and TT_Weighted
Matrix< KLT_TYPE > | _weight
int | _WinSize
KLT_TYPE | brdx
KLT_TYPE | brdxy
KLT_TYPE | brdy
unsigned | c
unsigned | cc
unsigned | cf
KLT_TYPE | ll
KLT_TYPE | lr
unsigned | r
unsigned | rc
unsigned | rf
variables needed in MyBilienarRegion?_
KLT_TYPE | ul
variables needed in MyBilienarRegion?_
KLT_TYPE | ur
unsigned | x_floor
unsigned | x_floor_end
unsigned | y_floor
unsigned | y_floor_end

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::TrackerBase< StorageType >

Base class for the different tracking algorithms, defining the interfaces for the tracking functions.

Also stores some basic options and datas, i.e. the pointer to the image datas. See ExampleTrackerBase for brief exemplary usage.

Todo:
Implement DLL - add lost of missing explicit instantiations (JW)
Author:
woelk 09/2004

Definition at line 88 of file TrackerBase.hh.

Constructor & Destructor Documentation

template<class StorageType>
TrackerBase::TrackerBase ( )

Definition at line 103 of file TrackerBase.cpp.

References DEFAULT_MAX_AFFINECHANGE, BIAS::RT_MAD, and BIAS::TT_Simple.

template<class StorageType>
TrackerBase::TrackerBase | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

Definition at line 130 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_LastHalfWinSize, BIAS::TrackerBase< StorageType >::_ParamsAllocated, BIAS::TrackerBase< StorageType >::_WinSize, BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::Param::GetFreeGroupID(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::Param::IsUsedGroupID(), and BIAS::Param::SetGroupName().

template<class StorageType>
TrackerBase::TrackerBase | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

Definition at line 144 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_LastHalfWinSize, BIAS::TrackerBase< StorageType >::_ParamsAllocated, BIAS::TrackerBase< StorageType >::_WinSize, BIAS::TrackerBase< StorageType >::AddParam_(), and BIAS::TrackerBase< StorageType >::InitMembers_().

template<class StorageType>
TrackerBase::~TrackerBase ( )

Definition at line 155 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_HalfWinSize, BIAS::TrackerBase< StorageType >::_MaxAffineChange, BIAS::TrackerBase< StorageType >::_MaxError, BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::TrackerBase< StorageType >::_MaxResiduumMAD, BIAS::TrackerBase< StorageType >::_ParamsAllocated, BIAS::TrackerBase< StorageType >::_RejectionType, and BIAS::TrackerBase< StorageType >::_TrackerType.

Member Function Documentation

template<class StorageType>
void TrackerBase::_am_computeIntensityDifferenceAffine | ( | Image< StorageType > & | img1,
 |  | Image< StorageType > & | img2,
 |  | const KLT_TYPE & | x1,
 |  | const KLT_TYPE & | y1,
 |  | const KLT_TYPE & | x2,
 |  | const KLT_TYPE & | y2,
 |  | const KLT_TYPE & | Axx,
 |  | const KLT_TYPE & | Ayx,
 |  | const KLT_TYPE & | Axy,
 |  | const KLT_TYPE & | Ayy,
 |  | const int | halfwidth,
 |  | const int | halfheight,
 |  | KLT_TYPE * | imgdiff
 | ) | [protected]

Definition at line 1399 of file TrackerBase.cpp.

References BIAS::Image< StorageType >::BilinearInterpolation(), and KLT_TYPE.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

template<class StorageType>
void TrackerBase::_am_getGradientWinAffine | ( | const KLT_TYPE & | x,
 |  | const KLT_TYPE & | y,
 |  | const KLT_TYPE & | Axx,
 |  | const KLT_TYPE & | Ayx,
 |  | const KLT_TYPE & | Axy,
 |  | const KLT_TYPE & | Ayy,
 |  | const int | halfwidth,
 |  | const int | halfheight,
 |  | KLT_TYPE * | out_gradx,
 |  | KLT_TYPE * | out_grady
 | ) | [protected]

Definition at line 1379 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_gradim2x, BIAS::TrackerBase< StorageType >::_gradim2y, and KLT_TYPE.

Referenced by BIAS::TrackerBase< StorageType >::TrackAffine_().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void TrackerBase::AddParam_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Author:
woelk

Definition at line 1006 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::Param::CheckParam(), and BIAS::Param::GetParamInt().

Referenced by BIAS::TrackerBase< StorageType >::TrackerBase().

template<class StorageType>
void TrackerBase::CalcGaussianWeightMatrix_ ( ) [protected]

Constructs the weight matrix _weight with size _WinSize, _WinSize and fills it with gaussian weights.

Author:
woelk

Definition at line 949 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_weight, BIAS::TrackerBase< StorageType >::_WinSize, BIASCDOUT, D_TRACKERB_INIT, KLT_TYPE, TNT::Matrix< T >::newsize(), and sigma.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int TrackerBase::EvaluateResult_ | ( | int & | res,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | KLT_TYPE | cov[4]
 | ) | [protected]

Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covarainec matrix and must hence be called immediatly after the Track*_() function call!!

Author:
woelk

Definition at line 773 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_bl1, BIAS::TrackerBase< StorageType >::_bl2, BIAS::TrackerBase< StorageType >::_gxx, BIAS::TrackerBase< StorageType >::_gxy, BIAS::TrackerBase< StorageType >::_gyy, BIAS::TrackerBase< StorageType >::_idet, BIAS::TrackerBase< StorageType >::_WinSize, BIASASSERT, BIAS::TimeMeasure::GetCycleCount(), BIAS::Matrix< T >::GetData(), BIAS::TimeMeasure::GetRealTime(), KLT_TYPE, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

Referenced by BIAS::TrackerBase< StorageType >::Track().

template<class StorageType>
void BIAS::TrackerBase< StorageType >::GetAffineResult ( Matrix2x2< KLT_TYPE > & Result ) [inline]

get result of affine tracking

Definition at line 173 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::GetAffineResults ( std::vector< Matrix2x2< KLT_TYPE > > & Results ) [inline]

get results of affine tracking

Definition at line 168 of file TrackerBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::GetHalfWinSizePointer ( ) [inline]

Definition at line 194 of file TrackerBase.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType>
KLT_TYPE* BIAS::TrackerBase< StorageType >::GetMaxErrorPointer ( ) [inline]

Definition at line 195 of file TrackerBase.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::GetMaxIterationsPointer ( ) [inline]

these are needed in the highlevel Tracker class

Definition at line 193 of file TrackerBase.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::GetRejectionType ( ) [inline]

Definition at line 201 of file TrackerBase.hh.

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::GetTrackerType ( ) [inline]

Definition at line 197 of file TrackerBase.hh.

template<class StorageType>
void TrackerBase::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | Image< StorageType > & | gradx1,
 |  | Image< StorageType > & | grady1,
 |  | Image< StorageType > & | gradx2,
 |  | Image< StorageType > & | grady2
 | ) |

Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).

Definition at line 230 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_gradim1x, BIAS::TrackerBase< StorageType >::_gradim1y, BIAS::TrackerBase< StorageType >::_gradim2x, BIAS::TrackerBase< StorageType >::_gradim2y, BIAS::TrackerBase< StorageType >::_im1, BIAS::TrackerBase< StorageType >::_im2, BIASASSERT, BIAS::ROI::GetCorners(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::TrackerBase< StorageType >::Init_(), and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by main().

template<class StorageType>
void TrackerBase::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | gradx1,
 |  | StorageType ** | grady1,
 |  | StorageType ** | gradx2,
 |  | StorageType ** | grady2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected]

minx/y maxx/y defines a ROI

Definition at line 189 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_gradx1, BIAS::TrackerBase< StorageType >::_gradx2, BIAS::TrackerBase< StorageType >::_grady1, BIAS::TrackerBase< StorageType >::_grady2, BIAS::TrackerBase< StorageType >::_HalfWinSize, BIAS::TrackerBase< StorageType >::_ida1, BIAS::TrackerBase< StorageType >::_ida2, BIAS::TrackerBase< StorageType >::_LastHalfWinSize, BIAS::TrackerBase< StorageType >::_maxx1, BIAS::TrackerBase< StorageType >::_maxx2, BIAS::TrackerBase< StorageType >::_maxy1, BIAS::TrackerBase< StorageType >::_maxy2, BIAS::TrackerBase< StorageType >::_minx1, BIAS::TrackerBase< StorageType >::_minx2, BIAS::TrackerBase< StorageType >::_miny1, BIAS::TrackerBase< StorageType >::_miny2, BIAS::TrackerBase< StorageType >::_TrackerType, BIASASSERT, BIASCDOUT, BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), D_TRACKERB_INIT, BIAS::TrackerBase< StorageType >::Resize_(), and BIAS::TT_Weighted.

Referenced by BIAS::TrackerBase< StorageType >::Init().

template<class StorageType>
void TrackerBase::InitMembers_ ( ) [protected]

set member pointers to NULL

Definition at line 170 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_AffineResults, BIAS::TrackerBase< StorageType >::_gradim1x, BIAS::TrackerBase< StorageType >::_gradim1y, BIAS::TrackerBase< StorageType >::_gradim2x, BIAS::TrackerBase< StorageType >::_gradim2y, BIAS::TrackerBase< StorageType >::_HalfWinSize, BIAS::TrackerBase< StorageType >::_im1, BIAS::TrackerBase< StorageType >::_im2, BIAS::TrackerBase< StorageType >::_MaxAffineChange, BIAS::TrackerBase< StorageType >::_MaxError, BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::TrackerBase< StorageType >::_MaxResiduumMAD, BIAS::TrackerBase< StorageType >::_maxx1, BIAS::TrackerBase< StorageType >::_maxx2, BIAS::TrackerBase< StorageType >::_maxy1, BIAS::TrackerBase< StorageType >::_maxy2, BIAS::TrackerBase< StorageType >::_minx1, BIAS::TrackerBase< StorageType >::_minx2, BIAS::TrackerBase< StorageType >::_miny1, BIAS::TrackerBase< StorageType >::_miny2, BIAS::TrackerBase< StorageType >::_RejectionType, and BIAS::TrackerBase< StorageType >::_TrackerType.

Referenced by BIAS::TrackerBase< StorageType >::TrackerBase().

template<class StorageType>
void BIAS::TrackerBase< StorageType >::MyBilinearRegion1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 434 of file TrackerBase.hh.

References BIAS::TrackerBase< StorageType >::_bl1, BIAS::TrackerBase< StorageType >::_gx1, BIAS::TrackerBase< StorageType >::_gy1, BIAS::TrackerBase< StorageType >::_ida1, BIAS::TrackerBase< StorageType >::brdx, BIAS::TrackerBase< StorageType >::brdxy, BIAS::TrackerBase< StorageType >::brdy, BIAS::TrackerBase< StorageType >::c, BIAS::TrackerBase< StorageType >::cc, BIAS::TrackerBase< StorageType >::cf, KLT_TYPE, BIAS::TrackerBase< StorageType >::ll, BIAS::TrackerBase< StorageType >::lr, BIAS::TrackerBase< StorageType >::r, BIAS::TrackerBase< StorageType >::rc, BIAS::TrackerBase< StorageType >::rf, BIAS::TrackerBase< StorageType >::ul, BIAS::TrackerBase< StorageType >::ur, BIAS::TrackerBase< StorageType >::x_floor, BIAS::TrackerBase< StorageType >::x_floor_end, BIAS::TrackerBase< StorageType >::y_floor, and BIAS::TrackerBase< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
void BIAS::TrackerBase< StorageType >::MyBilinearRegion2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 469 of file TrackerBase.hh.

References BIAS::TrackerBase< StorageType >::_bl2, BIAS::TrackerBase< StorageType >::_gx2, BIAS::TrackerBase< StorageType >::_gy2, BIAS::TrackerBase< StorageType >::_ida2, BIAS::TrackerBase< StorageType >::brdx, BIAS::TrackerBase< StorageType >::brdxy, BIAS::TrackerBase< StorageType >::brdy, BIAS::TrackerBase< StorageType >::c, BIAS::TrackerBase< StorageType >::cc, BIAS::TrackerBase< StorageType >::cf, KLT_TYPE, BIAS::TrackerBase< StorageType >::ll, BIAS::TrackerBase< StorageType >::lr, BIAS::TrackerBase< StorageType >::r, BIAS::TrackerBase< StorageType >::rc, BIAS::TrackerBase< StorageType >::rf, BIAS::TrackerBase< StorageType >::ul, BIAS::TrackerBase< StorageType >::ur, BIAS::TrackerBase< StorageType >::x_floor, BIAS::TrackerBase< StorageType >::x_floor_end, BIAS::TrackerBase< StorageType >::y_floor, and BIAS::TrackerBase< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int TrackerBase::RejectMAD_ | ( | std::vector< KLT_TYPE > & | sad,
 |  | std::vector< int > & | res
 | ) | [protected]

Author:
woelk

Definition at line 838 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_MaxResiduumMAD, KLT_TYPE, num, TRACKER_MEANABSDIF, and TRACKER_SUCCESS.

template<class StorageType>
int TrackerBase::RejectX86_ | ( | std::vector< KLT_TYPE > & | ssd,
 |  | std::vector< int > & | res
 | ) | [protected]

Author:
woelk

Definition at line 853 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_all_diff_from_median, BIAS::TrackerBase< StorageType >::_all_ssd_residui, BIAS::TrackerBase< StorageType >::_diff_from_median, BIAS::TrackerBase< StorageType >::_Median, BIAS::TrackerBase< StorageType >::_median_ssd_residui, BIAS::TrackerBase< StorageType >::_ssd_residui, BIAS::TrackerBase< StorageType >::_threshold, BIASABORT, BIASCDOUT, BIAS::Median1D< DataType >::Compute(), D_TRACKERB_REJECT, BIAS::TimeMeasure::GetCycleCount(), BIAS::Median1D< DataType >::GetMedian(), BIAS::TimeMeasure::GetRealTime(), num, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), TRACKER_MEANABSDIF, TRACKER_SUCCESS, and TRACKER_X84.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::Resize_ ( const int halfwinsize ) [inline, protected]

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author:
woelk

Definition at line 504 of file TrackerBase.hh.

References BIAS::TrackerBase< StorageType >::_bl1, BIAS::TrackerBase< StorageType >::_bl2, BIAS::TrackerBase< StorageType >::_gsx, BIAS::TrackerBase< StorageType >::_gsy, BIAS::TrackerBase< StorageType >::_gx1, BIAS::TrackerBase< StorageType >::_gx2, BIAS::TrackerBase< StorageType >::_gy1, BIAS::TrackerBase< StorageType >::_gy2, BIAS::TrackerBase< StorageType >::_LastHalfWinSize, BIAS::TrackerBase< StorageType >::_WinSize, and TNT::Matrix< T >::newsize().

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetHalfWinSize ( const int hws ) [inline]

Definition at line 190 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetMaxAffineChange ( const KLT_TYPE maxerr ) [inline]

Definition at line 182 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetMaxError ( const KLT_TYPE maxerr ) [inline]

Definition at line 180 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetMaxIterations ( const int maxiter ) [inline]

Definition at line 188 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE maxres ) [inline]

Definition at line 185 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetRejectionType ( const int rejection_type ) [inline]

Definition at line 202 of file TrackerBase.hh.

template<class StorageType>
void BIAS::TrackerBase< StorageType >::SetTrackerType ( const int tracker_type ) [inline]

Definition at line 198 of file TrackerBase.hh.

template<class StorageType>
void TrackerBase::Track | ( | std::vector< HomgPoint2D > & | p1,
 |  | std::vector< HomgPoint2D > & | p2,
 |  | std::vector< HomgPoint2D > & | p2tracked,
 |  | std::vector< KLT_TYPE > & | error,
 |  | std::vector< int > & | numiter,
 |  | std::vector< KLT_TYPE > & | residuiMAD,
 |  | std::vector< KLT_TYPE > & | residuiMSD,
 |  | std::vector< int > & | res,
 |  | std::vector< Matrix< KLT_TYPE > > & | cov,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | AffinePred = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) |

Same as Track(), but a correspondence is searched for every point in the vector p1.

Definition at line 338 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_AffineResults, BIAS::TrackerBase< StorageType >::_TrackerType, BIASASSERT, BIASCDOUT, BIASERR, D_TRACKERB_INPUT, BIAS::TrackerBase< StorageType >::EvaluateResult_(), TNT::Matrix< T >::newsize(), num, TNT::Matrix< T >::size(), BIAS::TimeMeasure::Start(), BIAS::TrackerBase< StorageType >::TrackAffine_(), TRACKER_IGNOREPOINT, TRACKER_SUCCESS, BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), BIAS::TT_Affine4, BIAS::TT_Affine6, BIAS::TT_Simple, BIAS::TT_SimpleAffine4, BIAS::TT_SimpleAffine6, and BIAS::TT_Weighted.

template<class StorageType>
int TrackerBase::Track | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p2tracked,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | KLT_TYPE & | residuumMAD,
 |  | KLT_TYPE & | residuumMSD,
 |  | Matrix< KLT_TYPE > & | cov,
 |  | const Matrix2x2< KLT_TYPE > & | AffinePred = Matrix2x2< KLT_TYPE >()
 | ) |

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2. Upon completition

  • result : contains the best match,
  • error : contains the change in displacement calculated in the last iteration,
  • iter : contains then number of iterations used,
  • residuumMAD : contains the mean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window,
  • residuumMSD : contains the squared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window,
  • cov : contains an approximation to the covarinace matrix image1 and result in image2 over the tracking window ( = sum of absolute difference divided by number of pixels in tracking value ).

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Returns:
see defines
  • 0 on success (error< maxerror)
  • -1 when no spatial structure is present
  • -2 when point slid out of image
  • -3 when maxiter is reached and error is above maxerror
  • -4 when a point lies outside of valid region in images
  • -5 when point was rejected by MAD criterion
  • -6 when input point was at infinity
  • -7 when point is rejected by X86
  • 1 when error increased from last iteration
Author:
woelk

Definition at line 276 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_AffineResults, BIAS::TrackerBase< StorageType >::_TrackerType, BIASERR, BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::Matrix< T >::GetData(), BIAS::Vector3< T >::GetData(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::NormFrobenius(), res, Track(), BIAS::TrackerBase< StorageType >::TrackAffine_(), TRACKER_IGNOREPOINT, TRACKER_SUCCESS, BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), BIAS::TT_Affine4, BIAS::TT_Affine6, BIAS::TT_SimpleAffine4, BIAS::TT_SimpleAffine6, and BIAS::TT_Weighted.

Referenced by main().

template<class StorageType>
int TrackerBase::TrackAffine_ | ( | KLT_TYPE | p1[2],
 |  | KLT_TYPE | p2[2],
 |  | const Matrix2x2< KLT_TYPE > & | p2A,
 |  | KLT_TYPE | result[2],
 |  | Matrix2x2< KLT_TYPE > & | resultA,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | Matrix< KLT_TYPE > & | Cov,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | bool | Only4 = false,
 |  | bool | ComputeCovariance = true
 | ) | [protected]

track using affine warp

Parameters:
p1 | point in image 1
p2 | prediction for point in image 2
p2A | prediction for affine warp
result | result after tracking
resultA | affine warp after tracking
error | maxnorm of last iteration step
iter | number of iterations done
Cov | resulting covariance
sad | sum of absolute differences
ssd | sum of squared differences
Only4 | only estimate A, not dx,dy
ComputeCovariance,if | true Cov is computed using svd
This implementation is based on Thorsten Thormaelen's version, see cpp file.

Todo:
really compute cov with svd ???, conceptual problem: where to compute residui, where covariance ???
Not evaluated, tested or optimized by now !
Author:
koeser 06/2005

Definition at line 1096 of file TrackerBase.cpp.

References _am_compute4by1ErrorVector(), _am_compute4by4GradientMatrix(), _am_compute6by1ErrorVector(), _am_compute6by6GradientMatrix(), BIAS::TrackerBase< StorageType >::_am_computeIntensityDifferenceAffine(), _am_gauss_jordan_elimination(), BIAS::TrackerBase< StorageType >::_am_getGradientWinAffine(), BIAS::TrackerBase< StorageType >::_im1, BIAS::TrackerBase< StorageType >::_im2, BIAS::TrackerBase< StorageType >::_MaxAffineChange, BIAS::TrackerBase< StorageType >::_MaxError, BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::TrackerBase< StorageType >::_minx2, BIAS::TrackerBase< StorageType >::_miny2, BIAS::TrackerBase< StorageType >::_WinSize, a, BIASDOUT, D_TRACKERB_AFFINE, D_TRACKERB_KLT, BIAS::SVD::Invert(), KLT_TYPE, maxerr, TNT::Matrix< T >::newsize(), BIAS::Debug::SetDebugLevel(), BIAS::Matrix< T >::SetZero(), sigma, T, TRACKER_NOSTRUCTURE, TRACKER_OUTOFIMAGE, TRACKER_SUCCESS, and TRACKER_TOOMANYITER.

Referenced by BIAS::TrackerBase< StorageType >::Track().

template<class StorageType>
int TrackerBase::TrackSimple_ | ( | KLT_TYPE | p1[2],
 |  | KLT_TYPE | p2[2],
 |  | KLT_TYPE | result[2],
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected]

The correspondence calculation is computed using an iterative gradient descent algorithm.

See Lukas and Kanade: "An iterative image registration technique with an application to stereo vision", 1986 for details. The symmetric approach as described by Stan Birchfield is implemented.

Author:
woelk

Definition at line 464 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_bl1, BIAS::TrackerBase< StorageType >::_bl2, BIAS::TrackerBase< StorageType >::_gsx, BIAS::TrackerBase< StorageType >::_gsy, BIAS::TrackerBase< StorageType >::_gx1, BIAS::TrackerBase< StorageType >::_gx2, BIAS::TrackerBase< StorageType >::_gxx, BIAS::TrackerBase< StorageType >::_gxy, BIAS::TrackerBase< StorageType >::_gy1, BIAS::TrackerBase< StorageType >::_gy2, BIAS::TrackerBase< StorageType >::_gyy, BIAS::TrackerBase< StorageType >::_HalfWinSize, BIAS::TrackerBase< StorageType >::_idet, BIAS::TrackerBase< StorageType >::_LastHalfWinSize, BIAS::TrackerBase< StorageType >::_MaxError, BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::TrackerBase< StorageType >::_maxx1, BIAS::TrackerBase< StorageType >::_maxx2, BIAS::TrackerBase< StorageType >::_maxy1, BIAS::TrackerBase< StorageType >::_maxy2, BIAS::TrackerBase< StorageType >::_minx1, BIAS::TrackerBase< StorageType >::_minx2, BIAS::TrackerBase< StorageType >::_miny1, BIAS::TrackerBase< StorageType >::_miny2, BIAS::TrackerBase< StorageType >::_WinSize, BIASASSERT, BIASCDOUT, BIASDOUT, D_TRACKERB_BILINEAR, D_TRACKERB_INIT, D_TRACKERB_KLT, BIAS::TimeMeasure::GetCycleCount(), BIAS::TimeMeasure::GetRealTime(), KLT_TYPE, maxerr, BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::TimeMeasure::Reset(), BIAS::TrackerBase< StorageType >::Resize_(), SMALL_DET, BIAS::TimeMeasure::Start(), BIAS::TimeMeasure::Stop(), TRACKER_NOSTRUCTURE, TRACKER_OUTOFIMAGE, TRACKER_OUTOFROI, and TRACKER_TOOMANYITER.

Referenced by BIAS::TrackerBase< StorageType >::Track().

template<class StorageType>
int TrackerBase::TrackWeighted_ | ( | KLT_TYPE | p1[2],
 |  | KLT_TYPE | p2[2],
 |  | KLT_TYPE | result[2],
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected]

Same as TrackSimple_ but also uses the weighting matrix _weight.

Author:
woelk

Definition at line 636 of file TrackerBase.cpp.

References BIAS::TrackerBase< StorageType >::_bl1, BIAS::TrackerBase< StorageType >::_bl2, BIAS::TrackerBase< StorageType >::_gsx, BIAS::TrackerBase< StorageType >::_gsy, BIAS::TrackerBase< StorageType >::_gx1, BIAS::TrackerBase< StorageType >::_gx2, BIAS::TrackerBase< StorageType >::_gxx, BIAS::TrackerBase< StorageType >::_gxy, BIAS::TrackerBase< StorageType >::_gyy, BIAS::TrackerBase< StorageType >::_HalfWinSize, BIAS::TrackerBase< StorageType >::_idet, BIAS::TrackerBase< StorageType >::_MaxError, BIAS::TrackerBase< StorageType >::_MaxIterations, BIAS::TrackerBase< StorageType >::_maxx1, BIAS::TrackerBase< StorageType >::_maxx2, BIAS::TrackerBase< StorageType >::_maxy1, BIAS::TrackerBase< StorageType >::_maxy2, BIAS::TrackerBase< StorageType >::_minx1, BIAS::TrackerBase< StorageType >::_minx2, BIAS::TrackerBase< StorageType >::_miny1, BIAS::TrackerBase< StorageType >::_miny2, BIAS::TrackerBase< StorageType >::_weight, BIAS::TrackerBase< StorageType >::_WinSize, BIASCDOUT, BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), D_TRACKERB_KLT, KLT_TYPE, maxerr, BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::TrackerBase< StorageType >::Resize_(), SMALL_DET, TRACKER_NOSTRUCTURE, TRACKER_OUTOFIMAGE, TRACKER_OUTOFROI, TRACKER_SUCCESS, and TRACKER_TOOMANYITER.

Referenced by BIAS::TrackerBase< StorageType >::Track().

Member Data Documentation

template<class StorageType>
std::vector<Matrix2x2<KLT_TYPE> > BIAS::TrackerBase< StorageType >::_AffineResults [protected]

results after affine tracking

Definition at line 259 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::InitMembers_(), and BIAS::TrackerBase< StorageType >::Track().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBase< StorageType >::_all_diff_from_median [protected]

same as _diff_from_median but also for points where tracking was not sucessfull

Definition at line 253 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBase< StorageType >::_all_ssd_residui [protected]

Definition at line 245 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_bl1 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_bl2 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBase< StorageType >::_d [protected]

Definition at line 238 of file TrackerBase.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBase< StorageType >::_diff_from_median [protected]

_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)

Definition at line 250 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBase< StorageType >::_disp [protected]

Definition at line 238 of file TrackerBase.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBase< StorageType >::_e [protected]

Definition at line 238 of file TrackerBase.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBase< StorageType >::_G [protected]

used in iteration

Definition at line 237 of file TrackerBase.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBase< StorageType >::_Ginv [protected]

Definition at line 237 of file TrackerBase.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBase< StorageType >::_gradim1x [protected]

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init(), and BIAS::TrackerBase< StorageType >::InitMembers_().

template<class StorageType>
Image<StorageType> * BIAS::TrackerBase< StorageType >::_gradim1y [protected]

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init(), and BIAS::TrackerBase< StorageType >::InitMembers_().

template<class StorageType>
Image<StorageType> * BIAS::TrackerBase< StorageType >::_gradim2x [protected]

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::_am_getGradientWinAffine(), BIAS::TrackerBase< StorageType >::Init(), and BIAS::TrackerBase< StorageType >::InitMembers_().

template<class StorageType>
Image<StorageType> * BIAS::TrackerBase< StorageType >::_gradim2y [protected]

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::_am_getGradientWinAffine(), BIAS::TrackerBase< StorageType >::Init(), and BIAS::TrackerBase< StorageType >::InitMembers_().

template<class StorageType>
StorageType** BIAS::TrackerBase< StorageType >::_gradx1 [protected]

gradients image data arrays

Definition at line 229 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_().

template<class StorageType>
StorageType ** BIAS::TrackerBase< StorageType >::_gradx2 [protected]

Definition at line 229 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_().

template<class StorageType>
StorageType ** BIAS::TrackerBase< StorageType >::_grady1 [protected]

Definition at line 229 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_().

template<class StorageType>
StorageType ** BIAS::TrackerBase< StorageType >::_grady2 [protected]

Definition at line 229 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gsx [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gsy [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gx [protected]

Definition at line 239 of file TrackerBase.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gx1 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gx2 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_gxx [protected]

Definition at line 240 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_gxy [protected]

Definition at line 240 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gy [protected]

Definition at line 239 of file TrackerBase.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gy1 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), BIAS::TrackerBase< StorageType >::Resize_(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_gy2 [protected]

Definition at line 239 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion2_(), BIAS::TrackerBase< StorageType >::Resize_(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_gyy [protected]

Definition at line 240 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::_HalfWinSize [protected]

iteration stops after _MaxIterations

Definition at line 208 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
StorageType** BIAS::TrackerBase< StorageType >::_ida1 [protected]

the image data arrays

Definition at line 223 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion1_().

template<class StorageType>
StorageType ** BIAS::TrackerBase< StorageType >::_ida2 [protected]

Definition at line 223 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_idet [protected]

Definition at line 240 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Image<StorageType>* BIAS::TrackerBase< StorageType >::_im1 [protected]

pointers to images

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init(), BIAS::TrackerBase< StorageType >::InitMembers_(), and BIAS::TrackerBase< StorageType >::TrackAffine_().

template<class StorageType>
Image<StorageType> * BIAS::TrackerBase< StorageType >::_im2 [protected]

Definition at line 225 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init(), BIAS::TrackerBase< StorageType >::InitMembers_(), and BIAS::TrackerBase< StorageType >::TrackAffine_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_LastHalfWinSize [protected]

remember last support window size (for recalculation of gaussian weight)

Definition at line 235 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackerBase(), and BIAS::TrackerBase< StorageType >::TrackSimple_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE* BIAS::TrackerBase< StorageType >::_MaxAffineChange [protected]

iteration stops if position refinement is less than *_Maxerror

Definition at line 212 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
KLT_TYPE* BIAS::TrackerBase< StorageType >::_MaxError [protected]

iteration stops if position refinement is less than *_Maxerror

Definition at line 210 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::_MaxIterations [protected]

Definition at line 207 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::AddParam_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), BIAS::TrackerBase< StorageType >::TrackWeighted_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
KLT_TYPE* BIAS::TrackerBase< StorageType >::_MaxResiduumMAD [protected]

outlier rejection via MAD

Definition at line 215 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::RejectMAD_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_maxx1 [protected]

the image borders modulo filter and support windows or ROI for image 1 and image 2

Definition at line 232 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_maxx2 [protected]

Definition at line 233 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_maxy1 [protected]

Definition at line 232 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_maxy2 [protected]

Definition at line 233 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
Median1D<KLT_TYPE> BIAS::TrackerBase< StorageType >::_Median [protected]

used in RejectX86_

Definition at line 244 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_median_ssd_residui [protected]

Definition at line 248 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_minx1 [protected]

Definition at line 232 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_minx2 [protected]

Definition at line 233 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_miny1 [protected]

Definition at line 232 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_miny2 [protected]

Definition at line 233 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
bool BIAS::TrackerBase< StorageType >::_ParamsAllocated [protected]

Definition at line 203 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::TrackerBase(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::_RejectionType [protected]

The rejection type: valid RT_MAD and RT_X86.

Definition at line 219 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::InitMembers_(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBase< StorageType >::_ssd_residui [protected]

sum of sq. grey value diff only for points where tracking succeeded

Definition at line 247 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::_threshold [protected]

the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)

Definition at line 256 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::RejectX86_().

template<class StorageType>
int* BIAS::TrackerBase< StorageType >::_TrackerType [protected]

the tracker type TT_Simple and TT_Weighted

Definition at line 217 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::Init_(), BIAS::TrackerBase< StorageType >::InitMembers_(), BIAS::TrackerBase< StorageType >::Track(), and BIAS::TrackerBase< StorageType >::~TrackerBase().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBase< StorageType >::_weight [protected]

Definition at line 241 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

template<class StorageType>
int BIAS::TrackerBase< StorageType >::_WinSize [protected]

Definition at line 235 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::CalcGaussianWeightMatrix_(), BIAS::TrackerBase< StorageType >::EvaluateResult_(), BIAS::TrackerBase< StorageType >::Resize_(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::TrackerBase< StorageType >::TrackerBase(), BIAS::TrackerBase< StorageType >::TrackSimple_(), and BIAS::TrackerBase< StorageType >::TrackWeighted_().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::brdx [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::brdxy [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::brdy [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::c [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::cc [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::cf [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::ll [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::lr [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::r [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::rc [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::rf [protected]

variables needed in MyBilienarRegion?_

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::ul [protected]

variables needed in MyBilienarRegion?_

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBase< StorageType >::ur [protected]

Definition at line 406 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::x_floor [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::x_floor_end [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::y_floor [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

template<class StorageType>
unsigned BIAS::TrackerBase< StorageType >::y_floor_end [protected]

Definition at line 404 of file TrackerBase.hh.

Referenced by BIAS::TrackerBase< StorageType >::MyBilinearRegion1_(), and BIAS::TrackerBase< StorageType >::MyBilinearRegion2_().

The documentation for this class was generated from the following files:
  • Matcher2D/TrackerBase.hh
  • Matcher2D/TrackerBase.cpp
Generated on Wed Jun 21 19:11:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerBaseAffine< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerBaseAffine

BIAS::TrackerBaseAffine< StorageType > Class Template Reference

#include <Matcher2D/TrackerBaseAffine.hh>

Inheritance diagram for BIAS::TrackerBaseAffine< StorageType >:

[legend]
Collaboration diagram for BIAS::TrackerBaseAffine< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | GetAffineResult (Matrix2x2< KLT_TYPE > &Result)
get result of affine tracking
void | GetAffineResults (std::vector< Matrix2x2< KLT_TYPE > > &Results)
get results of affine tracking
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int * | GetHalfWinSizePointer ()
KLT_TYPE * | GetMaxErrorPointer ()
int * | GetMaxIterationsPointer ()
these are needed in the highlevel Tracker class
int * | GetRejectionType ()
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask)
Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws)
void | SetMaxAffineChange (const KLT_TYPE maxerr)
void | SetMaxError (const KLT_TYPE maxerr)
void | SetMaxIterations (const int maxiter)
void | SetMaxResiduumMAD (const KLT_TYPE maxres)
void | SetRejectionType (const int rejection_type)
void | Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >())
Same as Track(), but a correspondence is searched for every point in the vector p1.
int | Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >())
Calculates correspondence from image1 to image2.
TrackerBaseAffine ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _am_computeIntensityDifferenceAffine (Image< StorageType > &img1, Image< StorageType > &img2, const KLT_TYPE &x1, const KLT_TYPE &y1, const KLT_TYPE &x2, const KLT_TYPE &y2, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *imgdiff)
void | _am_getGradientWinAffine (const KLT_TYPE &x, const KLT_TYPE &y, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *out_gradx, KLT_TYPE *out_grady)
void | AddParam_ (Param &para, const int grp, const std::string &postfix)
void | BilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*1_() functions
void | BilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*2_() functions
void | BilinearRegionFilterBinomial3Sobel3x3_1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterBinomial3Sobel3x3_2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionPrefiltered1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void | BilinearRegionPrefiltered2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).
int | EvaluateResult_ (int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4])
Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!
void | Init_ (StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
brief kollmann 06/2006
void | Init_ (StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
minx/y maxx/y defines a ROI
void InitMembers_ ()
set member pointers to NULL
int | RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
int | RejectX86_ (std::vector< KLT_TYPE > &ssd, std::vector< int > &res)
void | Resize_ (const int halfwinsize)
resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
virtual int | Track_ (Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0
p1 has length 2, 2d coo p2 has length 2 or 6, 2d coo and affine parameters result has length 6, 2d coo and affine parameters
int | TrackAffine_ (KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true)
track using affine warp

Protected Attributes

std::vector< Matrix2x2< KLT_TYPE > > | _AffineResults
results after affine tracking
std::vector< KLT_TYPE > | _all_diff_from_median
same as _diff_from_median but also for points where tracking was not sucessfull
std::vector< KLT_TYPE > | _all_ssd_residui
Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl2
bool | _ComputeFilteredImages
filtered images are computed when set to true
Vector2< KLT_TYPE > | _d
std::vector< KLT_TYPE > | _diff_from_median
_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
used in iteration
Matrix2x2< KLT_TYPE > | _Ginv
Image< StorageType > * | _gradim1x
Image< StorageType > * | _gradim1y
Image< StorageType > * | _gradim2x
Image< StorageType > * | _gradim2y
StorageType ** | _gradx1
gradients image data arrays
StorageType ** | _gradx2
FilterMask _GradXMask
StorageType ** | _grady1
StorageType ** | _grady2
FilterMask _GradYMask
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx2
KLT_TYPE | _gxx
KLT_TYPE | _gxy
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy2
KLT_TYPE | _gyy
int * | _HalfWinSize
iteration stops after _MaxIterations
StorageType ** | _ida1
the image data arrays
StorageType ** | _ida2
KLT_TYPE | _idet
Image< StorageType > * | _im1
pointers to images
Image< StorageType > * | _im2
int | _LastHalfWinSize
remember last support window size (for recalculation of gaussian weight)
long int | _liDebugLevel
FilterMask _LowpassMask
bool | _MasksSeparable
filter masks can be applied in separated manner when set to true
KLT_TYPE * | _MaxAffineChange
iteration stops if position refinement is less than *_Maxerror
KLT_TYPE * | _MaxError
iteration stops if position refinement is less than *_MaxError
int * | _MaxIterations
KLT_TYPE * | _MaxResiduumMAD
outlier rejection via MAD
int | _maxx1
the image borders modulo filter and support windows or ROI for image 1 and image 2
int | _maxx2
int | _maxy1
int | _maxy2
Median1D< KLT_TYPE > | _Median
used in RejectX86_
KLT_TYPE | _median_ssd_residui
int | _minx1
int | _minx2
int | _miny1
int | _miny2
bool | _ParamsAllocated
int * | _RejectionType
The rejection type: valid RT_MAD and RT_X86.
bool | _SobelBinomial
uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask
std::vector< KLT_TYPE > | _ssd_residui
sum of sq. grey value diff only for points where tracking succeeded
KLT_TYPE | _threshold
the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)
Matrix< KLT_TYPE > | _weight
int | _WinSize
KLT_TYPE | brdx
KLT_TYPE | brdxy
KLT_TYPE | brdy
unsigned | c
unsigned | cc
unsigned | cf
KLT_TYPE | ll
KLT_TYPE | lr
unsigned | r
unsigned | rc
unsigned | rf
variables needed in MyBilienarRegion?_
KLT_TYPE | ul
variables needed in MyBilienarRegion?_
KLT_TYPE | ur
unsigned | x_floor
unsigned | x_floor_end
unsigned | y_floor
unsigned | y_floor_end

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::TrackerBaseAffine< StorageType >

Definition at line 34 of file TrackerBaseAffine.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::TrackerBaseAffine< StorageType >::TrackerBaseAffine ( )

Member Function Documentation

template<class StorageType>
void BIAS::TrackerBaseAffine< StorageType >::_am_computeIntensityDifferenceAffine | ( | Image< StorageType > & | img1,
 |  | Image< StorageType > & | img2,
 |  | const KLT_TYPE & | x1,
 |  | const KLT_TYPE & | y1,
 |  | const KLT_TYPE & | x2,
 |  | const KLT_TYPE & | y2,
 |  | const KLT_TYPE & | Axx,
 |  | const KLT_TYPE & | Ayx,
 |  | const KLT_TYPE & | Axy,
 |  | const KLT_TYPE & | Ayy,
 |  | const int | halfwidth,
 |  | const int | halfheight,
 |  | KLT_TYPE * | imgdiff
 | ) | [protected]

template<class StorageType>
void BIAS::TrackerBaseAffine< StorageType >::_am_getGradientWinAffine | ( | const KLT_TYPE & | x,
 |  | const KLT_TYPE & | y,
 |  | const KLT_TYPE & | Axx,
 |  | const KLT_TYPE & | Ayx,
 |  | const KLT_TYPE & | Axy,
 |  | const KLT_TYPE & | Ayy,
 |  | const int | halfwidth,
 |  | const int | halfheight,
 |  | KLT_TYPE * | out_gradx,
 |  | KLT_TYPE * | out_grady
 | ) | [protected]

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::AddParam_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*1_() functions

Author:
woelk 06/2006

Definition at line 391 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*2_() functions

Author:
woelk 06/2006

Definition at line 410 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 429 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_ida1, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 464 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_ida2, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::EvaluateResult_ | ( | int & | res,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | KLT_TYPE | cov[4]
 | ) | [protected, inherited]

Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!

Author:
woelk

template<class StorageType>
void BIAS::TrackerBaseAffine< StorageType >::GetAffineResult ( Matrix2x2< KLT_TYPE > & Result ) [inline]

get result of affine tracking

Definition at line 47 of file TrackerBaseAffine.hh.

References BIASASSERT.

template<class StorageType>
void BIAS::TrackerBaseAffine< StorageType >::GetAffineResults ( std::vector< Matrix2x2< KLT_TYPE > > & Results ) [inline]

get results of affine tracking

Definition at line 42 of file TrackerBaseAffine.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetHalfWinSizePointer ( ) [inline, inherited]

Definition at line 178 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::GetMaxErrorPointer ( ) [inline, inherited]

Definition at line 179 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetMaxIterationsPointer ( ) [inline, inherited]

these are needed in the highlevel Tracker class

Definition at line 177 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetRejectionType ( ) [inline, inherited]

Definition at line 181 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | FilterMask & | lowpass_mask,
 |  | FilterMask & | gradx_mask,
 |  | FilterMask & | grady_mask
 | ) | [inherited]

Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | Image< StorageType > & | gradx1,
 |  | Image< StorageType > & | grady1,
 |  | Image< StorageType > & | gradx2,
 |  | Image< StorageType > & | grady2
 | ) | [inherited]

Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).

For good results im1 and im2 should be lowpass filtered images.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

brief kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | gradx1,
 |  | StorageType ** | grady1,
 |  | StorageType ** | gradx2,
 |  | StorageType ** | grady2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

minx/y maxx/y defines a ROI

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::InitMembers_ ( ) [protected, inherited]

set member pointers to NULL

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectMAD_ | ( | std::vector< KLT_TYPE > & | sad,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectX86_ | ( | std::vector< KLT_TYPE > & | ssd,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Resize_ ( const int halfwinsize ) [inline, protected, inherited]

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author:
woelk

Definition at line 499 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gsx, BIAS::TrackerBaseInterface< StorageType >::_gsy, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize, BIAS::TrackerBaseInterface< StorageType >::_WinSize, and TNT::Matrix< T >::newsize().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize ( const int hws ) [inline, inherited]

Definition at line 174 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseAffine< StorageType >::SetMaxAffineChange ( const KLT_TYPE maxerr ) [inline]

Definition at line 52 of file TrackerBaseAffine.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxError ( const KLT_TYPE maxerr ) [inline, inherited]

Definition at line 167 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations ( const int maxiter ) [inline, inherited]

Definition at line 172 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE maxres ) [inline, inherited]

Definition at line 169 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetRejectionType ( const int rejection_type ) [inline, inherited]

Definition at line 182 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Track | ( | std::vector< HomgPoint2D > & | p1,
 |  | std::vector< HomgPoint2D > & | p2,
 |  | std::vector< HomgPoint2D > & | p2tracked,
 |  | std::vector< KLT_TYPE > & | error,
 |  | std::vector< int > & | numiter,
 |  | std::vector< KLT_TYPE > & | residuiMAD,
 |  | std::vector< KLT_TYPE > & | residuiMSD,
 |  | std::vector< int > & | res,
 |  | std::vector< Matrix< KLT_TYPE > > & | cov,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | AffinePred = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) | [inherited]

Same as Track(), but a correspondence is searched for every point in the vector p1.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::Track | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p2tracked,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | KLT_TYPE & | residuumMAD,
 |  | KLT_TYPE & | residuumMSD,
 |  | Matrix< KLT_TYPE > & | cov,
 |  | const Matrix2x2< KLT_TYPE > & | AffinePred = Matrix2x2< KLT_TYPE >()
 | ) | [inherited]

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2. Upon completition

  • result : contains the best match,
  • error : contains the change in displacement calculated in the last iteration,
  • iter : contains then number of iterations used,
  • residuumMAD : contains the mean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window,
  • residuumMSD : contains the squared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window,
  • cov : contains an approximation to the covarinace matrix image1 and result in image2 over the tracking window ( = sum of absolute difference divided by number of pixels in tracking value ).

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Returns:
see defines
  • 0 on success (error< maxerror)
  • -1 when no spatial structure is present
  • -2 when point slid out of image
  • -3 when maxiter is reached and error is above maxerror
  • -4 when a point lies outside of valid region in images
  • -5 when point was rejected by MAD criterion
  • -6 when input point was at infinity
  • -7 when point is rejected by X86
  • 1 when error increased from last iteration
Author:
woelk

template<class StorageType>
virtual int BIAS::TrackerBaseAffine< StorageType >::Track_ | ( | Vector< KLT_TYPE > & | p1,
 |  | Vector< KLT_TYPE > & | p2,
 |  | Vector< KLT_TYPE > & | result,
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected, pure virtual]

p1 has length 2, 2d coo p2 has length 2 or 6, 2d coo and affine parameters result has length 6, 2d coo and affine parameters

Author:
woelk/koeser/kollmann 06/2006

Implements BIAS::TrackerBaseInterface< StorageType >.

template<class StorageType>
int BIAS::TrackerBaseAffine< StorageType >::TrackAffine_ | ( | KLT_TYPE | p1[2],
 |  | KLT_TYPE | p2[2],
 |  | const Matrix2x2< KLT_TYPE > & | p2A,
 |  | KLT_TYPE | result[2],
 |  | Matrix2x2< KLT_TYPE > & | resultA,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | Matrix< KLT_TYPE > & | Cov,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | bool | Only4 = false,
 |  | bool | ComputeCovariance = true
 | ) | [protected]

track using affine warp

Parameters:
p1 | point in image 1
p2 | prediction for point in image 2
p2A | prediction for affine warp
result | result after tracking
resultA | affine warp after tracking
error | maxnorm of last iteration step
iter | number of iterations done
Cov | resulting covariance
sad | sum of absolute differences
ssd | sum of squared differences
Only4 | only estimate A, not dx,dy
ComputeCovariance,if | true Cov is computed using svd
This implementation is based on Thorsten Thormaelen's version, see cpp file.

Todo:
really compute cov with svd ???, conceptual problem: where to compute residui, where covariance ???
Not evaluated, tested or optimized by now !
Author:
koeser 06/2005

Member Data Documentation

template<class StorageType>
std::vector<Matrix2x2<KLT_TYPE> > BIAS::TrackerBaseAffine< StorageType >::_AffineResults [protected]

results after affine tracking

Definition at line 58 of file TrackerBaseAffine.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_diff_from_median [protected, inherited]

same as _diff_from_median but also for points where tracking was not sucessfull

Definition at line 225 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_ssd_residui [protected, inherited]

Definition at line 217 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages [protected, inherited]

filtered images are computed when set to true

Definition at line 235 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_d [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_diff_from_median [protected, inherited]

_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)

Definition at line 222 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_disp [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_e [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_G [protected, inherited]

used in iteration

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Ginv [protected, inherited]

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_gradx1 [protected, inherited]

gradients image data arrays

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_gradx2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradXMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady1 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradYMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxx [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gyy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_HalfWinSize [protected, inherited]

iteration stops after _MaxIterations

Definition at line 188 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_ida1 [protected, inherited]

the image data arrays

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_ida2 [protected, inherited]

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_idet [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im1 [protected, inherited]

pointers to images

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_im2 [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize [protected, inherited]

remember last support window size (for recalculation of gaussian weight)

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_LowpassMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_MasksSeparable [protected, inherited]

filter masks can be applied in separated manner when set to true

Definition at line 240 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseAffine< StorageType >::_MaxAffineChange [protected]

iteration stops if position refinement is less than *_Maxerror

Definition at line 56 of file TrackerBaseAffine.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxError [protected, inherited]

iteration stops if position refinement is less than *_MaxError

Definition at line 190 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_MaxIterations [protected, inherited]

Definition at line 187 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxResiduumMAD [protected, inherited]

outlier rejection via MAD

Definition at line 193 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx1 [protected, inherited]

the image borders modulo filter and support windows or ROI for image 1 and image 2

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
Median1D<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Median [protected, inherited]

used in RejectX86_

Definition at line 216 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_median_ssd_residui [protected, inherited]

Definition at line 220 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ParamsAllocated [protected, inherited]

Definition at line 183 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_RejectionType [protected, inherited]

The rejection type: valid RT_MAD and RT_X86.

Definition at line 195 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial [protected, inherited]

uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask

Definition at line 238 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_ssd_residui [protected, inherited]

sum of sq. grey value diff only for points where tracking succeeded

Definition at line 219 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_threshold [protected, inherited]

the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)

Definition at line 228 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_weight [protected, inherited]

Reimplemented in BIAS::TrackerBaseWeighted< StorageType >.

Definition at line 213 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_WinSize [protected, inherited]

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdx [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdxy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::c [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cf [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ll [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::lr [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::r [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rf [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ul [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ur [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

The documentation for this class was generated from the following file:
  • Matcher2D/TrackerBaseAffine.hh
Generated on Wed Jun 21 19:11:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerBaseInterface< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerBaseInterface

BIAS::TrackerBaseInterface< StorageType > Class Template Reference
[Feature Tracker]

Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

#include <Matcher2D/TrackerBaseInterface.hh>

Inheritance diagram for BIAS::TrackerBaseInterface< StorageType >:

[legend]
Collaboration diagram for BIAS::TrackerBaseInterface< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int * | GetHalfWinSizePointer ()
KLT_TYPE * | GetMaxErrorPointer ()
int * | GetMaxIterationsPointer ()
these are needed in the highlevel Tracker class
int * | GetRejectionType ()
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask)
Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws)
void | SetMaxError (const KLT_TYPE maxerr)
void | SetMaxIterations (const int maxiter)
void | SetMaxResiduumMAD (const KLT_TYPE maxres)
void | SetRejectionType (const int rejection_type)
void | Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >())
Same as Track(), but a correspondence is searched for every point in the vector p1.
int | Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >())
Calculates correspondence from image1 to image2.
TrackerBaseInterface (Param &para, const int grp, const std::string &postfix)
TrackerBaseInterface (Param &para, const std::string &postfix="")
TrackerBaseInterface ()
~TrackerBaseInterface ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | AddParam_ (Param &para, const int grp, const std::string &postfix)
void | BilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*1_() functions
void | BilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*2_() functions
void | BilinearRegionFilterBinomial3Sobel3x3_1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterBinomial3Sobel3x3_2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionPrefiltered1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void | BilinearRegionPrefiltered2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).
int | EvaluateResult_ (int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4])
Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!
void | Init_ (StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
brief kollmann 06/2006
void | Init_ (StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
minx/y maxx/y defines a ROI
void InitMembers_ ()
set member pointers to NULL
int | RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
int | RejectX86_ (std::vector< KLT_TYPE > &ssd, std::vector< int > &res)
void | Resize_ (const int halfwinsize)
resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
virtual int | Track_ (Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0
p1 has length 2, 2d coo p2 has length 2 or 6, 2d coo and affine parameters result has length 2 or 6, 2d coo and affine parameters

Protected Attributes

std::vector< KLT_TYPE > | _all_diff_from_median
same as _diff_from_median but also for points where tracking was not sucessfull
std::vector< KLT_TYPE > | _all_ssd_residui
Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl2
bool | _ComputeFilteredImages
filtered images are computed when set to true
Vector2< KLT_TYPE > | _d
std::vector< KLT_TYPE > | _diff_from_median
_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
used in iteration
Matrix2x2< KLT_TYPE > | _Ginv
Image< StorageType > * | _gradim1x
Image< StorageType > * | _gradim1y
Image< StorageType > * | _gradim2x
Image< StorageType > * | _gradim2y
StorageType ** | _gradx1
gradients image data arrays
StorageType ** | _gradx2
FilterMask _GradXMask
StorageType ** | _grady1
StorageType ** | _grady2
FilterMask _GradYMask
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx2
KLT_TYPE | _gxx
KLT_TYPE | _gxy
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy2
KLT_TYPE | _gyy
int * | _HalfWinSize
iteration stops after _MaxIterations
StorageType ** | _ida1
the image data arrays
StorageType ** | _ida2
KLT_TYPE | _idet
Image< StorageType > * | _im1
pointers to images
Image< StorageType > * | _im2
int | _LastHalfWinSize
remember last support window size (for recalculation of gaussian weight)
long int | _liDebugLevel
FilterMask _LowpassMask
bool | _MasksSeparable
filter masks can be applied in separated manner when set to true
KLT_TYPE * | _MaxError
iteration stops if position refinement is less than *_MaxError
int * | _MaxIterations
KLT_TYPE * | _MaxResiduumMAD
outlier rejection via MAD
int | _maxx1
the image borders modulo filter and support windows or ROI for image 1 and image 2
int | _maxx2
int | _maxy1
int | _maxy2
Median1D< KLT_TYPE > | _Median
used in RejectX86_
KLT_TYPE | _median_ssd_residui
int | _minx1
int | _minx2
int | _miny1
int | _miny2
bool | _ParamsAllocated
int * | _RejectionType
The rejection type: valid RT_MAD and RT_X86.
bool | _SobelBinomial
uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask
std::vector< KLT_TYPE > | _ssd_residui
sum of sq. grey value diff only for points where tracking succeeded
KLT_TYPE | _threshold
the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)
Matrix< KLT_TYPE > | _weight
int | _WinSize
KLT_TYPE | brdx
KLT_TYPE | brdxy
KLT_TYPE | brdy
unsigned | c
unsigned | cc
unsigned | cf
KLT_TYPE | ll
KLT_TYPE | lr
unsigned | r
unsigned | rc
unsigned | rf
variables needed in MyBilienarRegion?_
KLT_TYPE | ul
variables needed in MyBilienarRegion?_
KLT_TYPE | ur
unsigned | x_floor
unsigned | x_floor_end
unsigned | y_floor
unsigned | y_floor_end

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::TrackerBaseInterface< StorageType >

Base class for the different tracking algorithms, defining the interfaces for the tracking functions.

Also stores some basic options and datas, i.e. the pointer to the image datas. See ExampleTrackerBaseInterface for brief exemplary usage.

Todo:
Implement DLL - add lost of missing explicit instantiations (JW)
Author:
woelk 09/2004

Definition at line 79 of file TrackerBaseInterface.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface ( )

template<class StorageType>
BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface | ( | Param & | para,
 |  | const std::string & | postfix = ""
 | ) |

template<class StorageType>
BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) |

template<class StorageType>
BIAS::TrackerBaseInterface< StorageType >::~TrackerBaseInterface ( )

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::AddParam_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected]

Author:
woelk

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

dispatcher function for BilinearRegion*1_() functions

Author:
woelk 06/2006

Definition at line 391 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

dispatcher function for BilinearRegion*2_() functions

Author:
woelk 06/2006

Definition at line 410 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 429 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_ida1, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected]

Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 464 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_ida2, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::EvaluateResult_ | ( | int & | res,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | KLT_TYPE | cov[4]
 | ) | [protected]

Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!

Author:
woelk

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetHalfWinSizePointer ( ) [inline]

Definition at line 178 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::GetMaxErrorPointer ( ) [inline]

Definition at line 179 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetMaxIterationsPointer ( ) [inline]

these are needed in the highlevel Tracker class

Definition at line 177 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetRejectionType ( ) [inline]

Definition at line 181 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | FilterMask & | lowpass_mask,
 |  | FilterMask & | gradx_mask,
 |  | FilterMask & | grady_mask
 | ) |

Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | Image< StorageType > & | gradx1,
 |  | Image< StorageType > & | grady1,
 |  | Image< StorageType > & | gradx2,
 |  | Image< StorageType > & | grady2
 | ) |

Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).

For good results im1 and im2 should be lowpass filtered images.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected]

brief kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | gradx1,
 |  | StorageType ** | grady1,
 |  | StorageType ** | gradx2,
 |  | StorageType ** | grady2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected]

minx/y maxx/y defines a ROI

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::InitMembers_ ( ) [protected]

set member pointers to NULL

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectMAD_ | ( | std::vector< KLT_TYPE > & | sad,
 |  | std::vector< int > & | res
 | ) | [protected]

Author:
woelk

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectX86_ | ( | std::vector< KLT_TYPE > & | ssd,
 |  | std::vector< int > & | res
 | ) | [protected]

Author:
woelk

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Resize_ ( const int halfwinsize ) [inline, protected]

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author:
woelk

Definition at line 499 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gsx, BIAS::TrackerBaseInterface< StorageType >::_gsy, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize, BIAS::TrackerBaseInterface< StorageType >::_WinSize, and TNT::Matrix< T >::newsize().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize ( const int hws ) [inline]

Definition at line 174 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxError ( const KLT_TYPE maxerr ) [inline]

Definition at line 167 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations ( const int maxiter ) [inline]

Definition at line 172 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE maxres ) [inline]

Definition at line 169 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetRejectionType ( const int rejection_type ) [inline]

Definition at line 182 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Track | ( | std::vector< HomgPoint2D > & | p1,
 |  | std::vector< HomgPoint2D > & | p2,
 |  | std::vector< HomgPoint2D > & | p2tracked,
 |  | std::vector< KLT_TYPE > & | error,
 |  | std::vector< int > & | numiter,
 |  | std::vector< KLT_TYPE > & | residuiMAD,
 |  | std::vector< KLT_TYPE > & | residuiMSD,
 |  | std::vector< int > & | res,
 |  | std::vector< Matrix< KLT_TYPE > > & | cov,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | AffinePred = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) |

Same as Track(), but a correspondence is searched for every point in the vector p1.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::Track | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p2tracked,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | KLT_TYPE & | residuumMAD,
 |  | KLT_TYPE & | residuumMSD,
 |  | Matrix< KLT_TYPE > & | cov,
 |  | const Matrix2x2< KLT_TYPE > & | AffinePred = Matrix2x2< KLT_TYPE >()
 | ) |

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2. Upon completition

  • result : contains the best match,
  • error : contains the change in displacement calculated in the last iteration,
  • iter : contains then number of iterations used,
  • residuumMAD : contains the mean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window,
  • residuumMSD : contains the squared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window,
  • cov : contains an approximation to the covarinace matrix image1 and result in image2 over the tracking window ( = sum of absolute difference divided by number of pixels in tracking value ).

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Returns:
see defines
  • 0 on success (error< maxerror)
  • -1 when no spatial structure is present
  • -2 when point slid out of image
  • -3 when maxiter is reached and error is above maxerror
  • -4 when a point lies outside of valid region in images
  • -5 when point was rejected by MAD criterion
  • -6 when input point was at infinity
  • -7 when point is rejected by X86
  • 1 when error increased from last iteration
Author:
woelk

template<class StorageType>
virtual int BIAS::TrackerBaseInterface< StorageType >::Track_ | ( | Vector< KLT_TYPE > & | p1,
 |  | Vector< KLT_TYPE > & | p2,
 |  | Vector< KLT_TYPE > & | result,
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected, pure virtual]

p1 has length 2, 2d coo p2 has length 2 or 6, 2d coo and affine parameters result has length 2 or 6, 2d coo and affine parameters

Author:
woelk / kollmann 06/2006

Implemented in BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBaseSimple< StorageType >, and BIAS::TrackerBaseWeighted< StorageType >.

Member Data Documentation

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_diff_from_median [protected]

same as _diff_from_median but also for points where tracking was not sucessfull

Definition at line 225 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_ssd_residui [protected]

Definition at line 217 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl1 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl2 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages [protected]

filtered images are computed when set to true

Definition at line 235 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_d [protected]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_diff_from_median [protected]

_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)

Definition at line 222 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_disp [protected]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_e [protected]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_G [protected]

used in iteration

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Ginv [protected]

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1x [protected]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1y [protected]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2x [protected]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2y [protected]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_gradx1 [protected]

gradients image data arrays

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_gradx2 [protected]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradXMask [protected]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady1 [protected]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady2 [protected]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradYMask [protected]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsx [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsy [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx1 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx2 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxx [protected]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxy [protected]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy1 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy2 [protected]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gyy [protected]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_HalfWinSize [protected]

iteration stops after _MaxIterations

Definition at line 188 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_ida1 [protected]

the image data arrays

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_ida2 [protected]

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_idet [protected]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im1 [protected]

pointers to images

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_im2 [protected]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize [protected]

remember last support window size (for recalculation of gaussian weight)

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_LowpassMask [protected]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_MasksSeparable [protected]

filter masks can be applied in separated manner when set to true

Definition at line 240 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxError [protected]

iteration stops if position refinement is less than *_MaxError

Definition at line 190 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_MaxIterations [protected]

Definition at line 187 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxResiduumMAD [protected]

outlier rejection via MAD

Definition at line 193 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx1 [protected]

the image borders modulo filter and support windows or ROI for image 1 and image 2

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx2 [protected]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy1 [protected]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy2 [protected]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
Median1D<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Median [protected]

used in RejectX86_

Definition at line 216 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_median_ssd_residui [protected]

Definition at line 220 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx1 [protected]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx2 [protected]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny1 [protected]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny2 [protected]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ParamsAllocated [protected]

Definition at line 183 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_RejectionType [protected]

The rejection type: valid RT_MAD and RT_X86.

Definition at line 195 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial [protected]

uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask

Definition at line 238 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_ssd_residui [protected]

sum of sq. grey value diff only for points where tracking succeeded

Definition at line 219 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_threshold [protected]

the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)

Definition at line 228 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_weight [protected]

Reimplemented in BIAS::TrackerBaseWeighted< StorageType >.

Definition at line 213 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_WinSize [protected]

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdx [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdxy [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdy [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::c [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cc [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cf [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ll [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::lr [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::r [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rc [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rf [protected]

variables needed in MyBilienarRegion?_

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ul [protected]

variables needed in MyBilienarRegion?_

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ur [protected]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor_end [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor_end [protected]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

The documentation for this class was generated from the following file:
  • Matcher2D/TrackerBaseInterface.hh
Generated on Wed Jun 21 19:11:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerBaseSimple< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerBaseSimple

BIAS::TrackerBaseSimple< StorageType > Class Template Reference

#include <Matcher2D/TrackerBaseSimple.hh>

Inheritance diagram for BIAS::TrackerBaseSimple< StorageType >:

[legend]
Collaboration diagram for BIAS::TrackerBaseSimple< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int * | GetHalfWinSizePointer ()
KLT_TYPE * | GetMaxErrorPointer ()
int * | GetMaxIterationsPointer ()
these are needed in the highlevel Tracker class
int * | GetRejectionType ()
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask)
Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws)
void | SetMaxError (const KLT_TYPE maxerr)
void | SetMaxIterations (const int maxiter)
void | SetMaxResiduumMAD (const KLT_TYPE maxres)
void | SetRejectionType (const int rejection_type)
void | Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >())
Same as Track(), but a correspondence is searched for every point in the vector p1.
int | Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >())
Calculates correspondence from image1 to image2.
TrackerBaseSimple ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | AddParam_ (Param &para, const int grp, const std::string &postfix)
void | BilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*1_() functions
void | BilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*2_() functions
void | BilinearRegionFilterBinomial3Sobel3x3_1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterBinomial3Sobel3x3_2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionPrefiltered1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void | BilinearRegionPrefiltered2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).
int | EvaluateResult_ (int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4])
Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!
void | Init_ (StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
brief kollmann 06/2006
void | Init_ (StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
minx/y maxx/y defines a ROI
void InitMembers_ ()
set member pointers to NULL
int | RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
int | RejectX86_ (std::vector< KLT_TYPE > &ssd, std::vector< int > &res)
void | Resize_ (const int halfwinsize)
resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
virtual int | Track_ (Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0
p1 has length 2, 2d coo p2 has length 2, 2d coo result has length 2, 2d coo

Protected Attributes

std::vector< KLT_TYPE > | _all_diff_from_median
same as _diff_from_median but also for points where tracking was not sucessfull
std::vector< KLT_TYPE > | _all_ssd_residui
Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl2
bool | _ComputeFilteredImages
filtered images are computed when set to true
Vector2< KLT_TYPE > | _d
std::vector< KLT_TYPE > | _diff_from_median
_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
used in iteration
Matrix2x2< KLT_TYPE > | _Ginv
Image< StorageType > * | _gradim1x
Image< StorageType > * | _gradim1y
Image< StorageType > * | _gradim2x
Image< StorageType > * | _gradim2y
StorageType ** | _gradx1
gradients image data arrays
StorageType ** | _gradx2
FilterMask _GradXMask
StorageType ** | _grady1
StorageType ** | _grady2
FilterMask _GradYMask
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx2
KLT_TYPE | _gxx
KLT_TYPE | _gxy
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy2
KLT_TYPE | _gyy
int * | _HalfWinSize
iteration stops after _MaxIterations
StorageType ** | _ida1
the image data arrays
StorageType ** | _ida2
KLT_TYPE | _idet
Image< StorageType > * | _im1
pointers to images
Image< StorageType > * | _im2
int | _LastHalfWinSize
remember last support window size (for recalculation of gaussian weight)
long int | _liDebugLevel
FilterMask _LowpassMask
bool | _MasksSeparable
filter masks can be applied in separated manner when set to true
KLT_TYPE * | _MaxError
iteration stops if position refinement is less than *_MaxError
int * | _MaxIterations
KLT_TYPE * | _MaxResiduumMAD
outlier rejection via MAD
int | _maxx1
the image borders modulo filter and support windows or ROI for image 1 and image 2
int | _maxx2
int | _maxy1
int | _maxy2
Median1D< KLT_TYPE > | _Median
used in RejectX86_
KLT_TYPE | _median_ssd_residui
int | _minx1
int | _minx2
int | _miny1
int | _miny2
bool | _ParamsAllocated
int * | _RejectionType
The rejection type: valid RT_MAD and RT_X86.
bool | _SobelBinomial
uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask
std::vector< KLT_TYPE > | _ssd_residui
sum of sq. grey value diff only for points where tracking succeeded
KLT_TYPE | _threshold
the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)
Matrix< KLT_TYPE > | _weight
int | _WinSize
KLT_TYPE | brdx
KLT_TYPE | brdxy
KLT_TYPE | brdy
unsigned | c
unsigned | cc
unsigned | cf
KLT_TYPE | ll
KLT_TYPE | lr
unsigned | r
unsigned | rc
unsigned | rf
variables needed in MyBilienarRegion?_
KLT_TYPE | ul
variables needed in MyBilienarRegion?_
KLT_TYPE | ur
unsigned | x_floor
unsigned | x_floor_end
unsigned | y_floor
unsigned | y_floor_end

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::TrackerBaseSimple< StorageType >

Definition at line 34 of file TrackerBaseSimple.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::TrackerBaseSimple< StorageType >::TrackerBaseSimple ( )

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::AddParam_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*1_() functions

Author:
woelk 06/2006

Definition at line 391 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*2_() functions

Author:
woelk 06/2006

Definition at line 410 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 429 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_ida1, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 464 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_ida2, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::EvaluateResult_ | ( | int & | res,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | KLT_TYPE | cov[4]
 | ) | [protected, inherited]

Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!

Author:
woelk

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetHalfWinSizePointer ( ) [inline, inherited]

Definition at line 178 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::GetMaxErrorPointer ( ) [inline, inherited]

Definition at line 179 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetMaxIterationsPointer ( ) [inline, inherited]

these are needed in the highlevel Tracker class

Definition at line 177 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetRejectionType ( ) [inline, inherited]

Definition at line 181 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | FilterMask & | lowpass_mask,
 |  | FilterMask & | gradx_mask,
 |  | FilterMask & | grady_mask
 | ) | [inherited]

Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | Image< StorageType > & | gradx1,
 |  | Image< StorageType > & | grady1,
 |  | Image< StorageType > & | gradx2,
 |  | Image< StorageType > & | grady2
 | ) | [inherited]

Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).

For good results im1 and im2 should be lowpass filtered images.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

brief kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | gradx1,
 |  | StorageType ** | grady1,
 |  | StorageType ** | gradx2,
 |  | StorageType ** | grady2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

minx/y maxx/y defines a ROI

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::InitMembers_ ( ) [protected, inherited]

set member pointers to NULL

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectMAD_ | ( | std::vector< KLT_TYPE > & | sad,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectX86_ | ( | std::vector< KLT_TYPE > & | ssd,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Resize_ ( const int halfwinsize ) [inline, protected, inherited]

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author:
woelk

Definition at line 499 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gsx, BIAS::TrackerBaseInterface< StorageType >::_gsy, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize, BIAS::TrackerBaseInterface< StorageType >::_WinSize, and TNT::Matrix< T >::newsize().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize ( const int hws ) [inline, inherited]

Definition at line 174 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxError ( const KLT_TYPE maxerr ) [inline, inherited]

Definition at line 167 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations ( const int maxiter ) [inline, inherited]

Definition at line 172 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE maxres ) [inline, inherited]

Definition at line 169 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetRejectionType ( const int rejection_type ) [inline, inherited]

Definition at line 182 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Track | ( | std::vector< HomgPoint2D > & | p1,
 |  | std::vector< HomgPoint2D > & | p2,
 |  | std::vector< HomgPoint2D > & | p2tracked,
 |  | std::vector< KLT_TYPE > & | error,
 |  | std::vector< int > & | numiter,
 |  | std::vector< KLT_TYPE > & | residuiMAD,
 |  | std::vector< KLT_TYPE > & | residuiMSD,
 |  | std::vector< int > & | res,
 |  | std::vector< Matrix< KLT_TYPE > > & | cov,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | AffinePred = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) | [inherited]

Same as Track(), but a correspondence is searched for every point in the vector p1.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::Track | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p2tracked,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | KLT_TYPE & | residuumMAD,
 |  | KLT_TYPE & | residuumMSD,
 |  | Matrix< KLT_TYPE > & | cov,
 |  | const Matrix2x2< KLT_TYPE > & | AffinePred = Matrix2x2< KLT_TYPE >()
 | ) | [inherited]

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2. Upon completition

  • result : contains the best match,
  • error : contains the change in displacement calculated in the last iteration,
  • iter : contains then number of iterations used,
  • residuumMAD : contains the mean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window,
  • residuumMSD : contains the squared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window,
  • cov : contains an approximation to the covarinace matrix image1 and result in image2 over the tracking window ( = sum of absolute difference divided by number of pixels in tracking value ).

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Returns:
see defines
  • 0 on success (error< maxerror)
  • -1 when no spatial structure is present
  • -2 when point slid out of image
  • -3 when maxiter is reached and error is above maxerror
  • -4 when a point lies outside of valid region in images
  • -5 when point was rejected by MAD criterion
  • -6 when input point was at infinity
  • -7 when point is rejected by X86
  • 1 when error increased from last iteration
Author:
woelk

template<class StorageType>
virtual int BIAS::TrackerBaseSimple< StorageType >::Track_ | ( | Vector< KLT_TYPE > & | p1,
 |  | Vector< KLT_TYPE > & | p2,
 |  | Vector< KLT_TYPE > & | result,
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected, pure virtual]

p1 has length 2, 2d coo p2 has length 2, 2d coo result has length 2, 2d coo

Author:
woelk/kollmann 06/2006

Implements BIAS::TrackerBaseInterface< StorageType >.

Member Data Documentation

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_diff_from_median [protected, inherited]

same as _diff_from_median but also for points where tracking was not sucessfull

Definition at line 225 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_ssd_residui [protected, inherited]

Definition at line 217 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages [protected, inherited]

filtered images are computed when set to true

Definition at line 235 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_d [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_diff_from_median [protected, inherited]

_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)

Definition at line 222 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_disp [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_e [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_G [protected, inherited]

used in iteration

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Ginv [protected, inherited]

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_gradx1 [protected, inherited]

gradients image data arrays

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_gradx2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradXMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady1 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradYMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxx [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gyy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_HalfWinSize [protected, inherited]

iteration stops after _MaxIterations

Definition at line 188 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_ida1 [protected, inherited]

the image data arrays

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_ida2 [protected, inherited]

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_idet [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im1 [protected, inherited]

pointers to images

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_im2 [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize [protected, inherited]

remember last support window size (for recalculation of gaussian weight)

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_LowpassMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_MasksSeparable [protected, inherited]

filter masks can be applied in separated manner when set to true

Definition at line 240 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxError [protected, inherited]

iteration stops if position refinement is less than *_MaxError

Definition at line 190 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_MaxIterations [protected, inherited]

Definition at line 187 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxResiduumMAD [protected, inherited]

outlier rejection via MAD

Definition at line 193 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx1 [protected, inherited]

the image borders modulo filter and support windows or ROI for image 1 and image 2

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
Median1D<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Median [protected, inherited]

used in RejectX86_

Definition at line 216 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_median_ssd_residui [protected, inherited]

Definition at line 220 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ParamsAllocated [protected, inherited]

Definition at line 183 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_RejectionType [protected, inherited]

The rejection type: valid RT_MAD and RT_X86.

Definition at line 195 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial [protected, inherited]

uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask

Definition at line 238 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_ssd_residui [protected, inherited]

sum of sq. grey value diff only for points where tracking succeeded

Definition at line 219 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_threshold [protected, inherited]

the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)

Definition at line 228 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_weight [protected, inherited]

Reimplemented in BIAS::TrackerBaseWeighted< StorageType >.

Definition at line 213 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_WinSize [protected, inherited]

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdx [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdxy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::c [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cf [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ll [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::lr [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::r [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rf [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ul [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ur [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

The documentation for this class was generated from the following file:
  • Matcher2D/TrackerBaseSimple.hh
Generated on Wed Jun 21 19:11:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerBaseWeighted< StorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerBaseWeighted

BIAS::TrackerBaseWeighted< StorageType > Class Template Reference

#include <Matcher2D/TrackerBaseWeighted.hh>

Inheritance diagram for BIAS::TrackerBaseWeighted< StorageType >:

[legend]
Collaboration diagram for BIAS::TrackerBaseWeighted< StorageType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
int * | GetHalfWinSizePointer ()
KLT_TYPE * | GetMaxErrorPointer ()
int * | GetMaxIterationsPointer ()
these are needed in the highlevel Tracker class
int * | GetRejectionType ()
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask)
Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.
void | Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | SetHalfWinSize (const int hws)
void | SetMaxError (const KLT_TYPE maxerr)
void | SetMaxIterations (const int maxiter)
void | SetMaxResiduumMAD (const KLT_TYPE maxres)
void | SetRejectionType (const int rejection_type)
void | Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >())
Same as Track(), but a correspondence is searched for every point in the vector p1.
int | Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >())
Calculates correspondence from image1 to image2.
TrackerBaseWeighted ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | AddParam_ (Param &para, const int grp, const std::string &postfix)
void | BilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*1_() functions
void | BilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
dispatcher function for BilinearRegion*2_() functions
void | BilinearRegionFilterBinomial3Sobel3x3_1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterBinomial3Sobel3x3_2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterMask2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionFilterVec2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .
void | BilinearRegionPrefiltered1_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void | BilinearRegionPrefiltered2_ (KLT_TYPE x, KLT_TYPE y, int hws)
Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).
void CalcGaussianWeightMatrix_ ()
Constructs the weight matrix _weight with size _WinSize, _WinSize and fills it with gaussian weights.
int | EvaluateResult_ (int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4])
Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!
void | Init_ (StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
brief kollmann 06/2006
void | Init_ (StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
minx/y maxx/y defines a ROI
void InitMembers_ ()
set member pointers to NULL
int | RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
int | RejectX86_ (std::vector< KLT_TYPE > &ssd, std::vector< int > &res)
void | Resize_ (const int halfwinsize)
resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
virtual int | Track_ (Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)
p1 has length 2, 2d coo p2 has length 2, 2d coo result has length 2, 2d coo
int | TrackWeighted_ (KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter)
Same as TrackSimple_ but also uses the weighting matrix _weight.

Protected Attributes

std::vector< KLT_TYPE > | _all_diff_from_median
same as _diff_from_median but also for points where tracking was not sucessfull
std::vector< KLT_TYPE > | _all_ssd_residui
Matrix< KLT_TYPE > | _bl1
Matrix< KLT_TYPE > | _bl2
bool | _ComputeFilteredImages
filtered images are computed when set to true
Vector2< KLT_TYPE > | _d
std::vector< KLT_TYPE > | _diff_from_median
_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
Vector2< KLT_TYPE > | _disp
Vector2< KLT_TYPE > | _e
Matrix2x2< KLT_TYPE > | _G
used in iteration
Matrix2x2< KLT_TYPE > | _Ginv
Image< StorageType > * | _gradim1x
Image< StorageType > * | _gradim1y
Image< StorageType > * | _gradim2x
Image< StorageType > * | _gradim2y
StorageType ** | _gradx1
gradients image data arrays
StorageType ** | _gradx2
FilterMask _GradXMask
StorageType ** | _grady1
StorageType ** | _grady2
FilterMask _GradYMask
Matrix< KLT_TYPE > | _gsx
Matrix< KLT_TYPE > | _gsy
Matrix< KLT_TYPE > | _gx
Matrix< KLT_TYPE > | _gx1
Matrix< KLT_TYPE > | _gx2
KLT_TYPE | _gxx
KLT_TYPE | _gxy
Matrix< KLT_TYPE > | _gy
Matrix< KLT_TYPE > | _gy1
Matrix< KLT_TYPE > | _gy2
KLT_TYPE | _gyy
int * | _HalfWinSize
iteration stops after _MaxIterations
StorageType ** | _ida1
the image data arrays
StorageType ** | _ida2
KLT_TYPE | _idet
Image< StorageType > * | _im1
pointers to images
Image< StorageType > * | _im2
int | _LastHalfWinSize
remember last support window size (for recalculation of gaussian weight)
long int | _liDebugLevel
FilterMask _LowpassMask
bool | _MasksSeparable
filter masks can be applied in separated manner when set to true
KLT_TYPE * | _MaxError
iteration stops if position refinement is less than *_MaxError
int * | _MaxIterations
KLT_TYPE * | _MaxResiduumMAD
outlier rejection via MAD
int | _maxx1
the image borders modulo filter and support windows or ROI for image 1 and image 2
int | _maxx2
int | _maxy1
int | _maxy2
Median1D< KLT_TYPE > | _Median
used in RejectX86_
KLT_TYPE | _median_ssd_residui
int | _minx1
int | _minx2
int | _miny1
int | _miny2
bool | _ParamsAllocated
int * | _RejectionType
The rejection type: valid RT_MAD and RT_X86.
bool | _SobelBinomial
uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask
std::vector< KLT_TYPE > | _ssd_residui
sum of sq. grey value diff only for points where tracking succeeded
KLT_TYPE | _threshold
the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)
Matrix< KLT_TYPE > | _weight
int | _WinSize
KLT_TYPE | brdx
KLT_TYPE | brdxy
KLT_TYPE | brdy
unsigned | c
unsigned | cc
unsigned | cf
KLT_TYPE | ll
KLT_TYPE | lr
unsigned | r
unsigned | rc
unsigned | rf
variables needed in MyBilienarRegion?_
KLT_TYPE | ul
variables needed in MyBilienarRegion?_
KLT_TYPE | ur
unsigned | x_floor
unsigned | x_floor_end
unsigned | y_floor
unsigned | y_floor_end

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType>
class BIAS::TrackerBaseWeighted< StorageType >

Definition at line 34 of file TrackerBaseWeighted.hh.

Constructor & Destructor Documentation

template<class StorageType>
BIAS::TrackerBaseWeighted< StorageType >::TrackerBaseWeighted ( )

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::AddParam_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*1_() functions

Author:
woelk 06/2006

Definition at line 391 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

dispatcher function for BilinearRegion*2_() functions

Author:
woelk 06/2006

Definition at line 410 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages, BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial, BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_(), BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterBinomial3Sobel3x3_2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and grady: [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterMask2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:
kollmann 06/2006

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFilterVec2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by applying _LowpassMask.GetSep??(), _GradXMask.GetSep??() and _GradXMask.GetSep??() at positions between (x-hws, y-hws) and (x+hws, y+hws) and interpolating afterwards .

Author:

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx1, _gy1 and _bl1 by interpolating _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 429 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_ida1, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_ | ( | KLT_TYPE | x,
 |  | KLT_TYPE | y,
 |  | int | hws
 | ) | [inline, protected, inherited]

Fills the matrices _gx2, _gy2 and _bl2 by interpolating _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and (x+hws, y+hws).

Author:
woelk

Definition at line 464 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_ida2, BIAS::TrackerBaseInterface< StorageType >::brdx, BIAS::TrackerBaseInterface< StorageType >::brdxy, BIAS::TrackerBaseInterface< StorageType >::brdy, BIAS::TrackerBaseInterface< StorageType >::c, BIAS::TrackerBaseInterface< StorageType >::cc, BIAS::TrackerBaseInterface< StorageType >::cf, KLT_TYPE, BIAS::TrackerBaseInterface< StorageType >::ll, BIAS::TrackerBaseInterface< StorageType >::lr, BIAS::TrackerBaseInterface< StorageType >::r, BIAS::TrackerBaseInterface< StorageType >::rc, BIAS::TrackerBaseInterface< StorageType >::rf, BIAS::TrackerBaseInterface< StorageType >::ul, BIAS::TrackerBaseInterface< StorageType >::ur, BIAS::TrackerBaseInterface< StorageType >::x_floor, BIAS::TrackerBaseInterface< StorageType >::x_floor_end, BIAS::TrackerBaseInterface< StorageType >::y_floor, and BIAS::TrackerBaseInterface< StorageType >::y_floor_end.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
void BIAS::TrackerBaseWeighted< StorageType >::CalcGaussianWeightMatrix_ ( ) [protected]

Constructs the weight matrix _weight with size _WinSize, _WinSize and fills it with gaussian weights.

Author:
woelk

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::EvaluateResult_ | ( | int & | res,
 |  | KLT_TYPE & | mad,
 |  | KLT_TYPE & | msd,
 |  | KLT_TYPE | cov[4]
 | ) | [protected, inherited]

Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track_() function call!!

Author:
woelk

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetHalfWinSizePointer ( ) [inline, inherited]

Definition at line 178 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::GetMaxErrorPointer ( ) [inline, inherited]

Definition at line 179 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetMaxIterationsPointer ( ) [inline, inherited]

these are needed in the highlevel Tracker class

Definition at line 177 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::GetRejectionType ( ) [inline, inherited]

Definition at line 181 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | FilterMask & | lowpass_mask,
 |  | FilterMask & | gradx_mask,
 |  | FilterMask & | grady_mask
 | ) | [inherited]

Sets _ComputeFilteredImages to true as well as _SobelBinomial and _MasksSeparable accordingly.

Author:
kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init | ( | Image< StorageType > & | im1,
 |  | Image< StorageType > & | im2,
 |  | Image< StorageType > & | gradx1,
 |  | Image< StorageType > & | grady1,
 |  | Image< StorageType > & | gradx2,
 |  | Image< StorageType > & | grady2
 | ) | [inherited]

Track from im1 to im2, gradx1/2: horizontal gradient imgs grady1/2: vertical gradient imgs The ROI must be set correctly in gradient images (representing the gradient filter mask size).

For good results im1 and im2 should be lowpass filtered images.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

brief kollmann 06/2006

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Init_ | ( | StorageType ** | ida1,
 |  | StorageType ** | ida2,
 |  | StorageType ** | gradx1,
 |  | StorageType ** | grady1,
 |  | StorageType ** | gradx2,
 |  | StorageType ** | grady2,
 |  | unsigned | minx1,
 |  | unsigned | miny1,
 |  | unsigned | maxx1,
 |  | unsigned | maxy1,
 |  | unsigned | minx2,
 |  | unsigned | miny2,
 |  | unsigned | maxx2,
 |  | unsigned | maxy2
 | ) | [protected, inherited]

minx/y maxx/y defines a ROI

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::InitMembers_ ( ) [protected, inherited]

set member pointers to NULL

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectMAD_ | ( | std::vector< KLT_TYPE > & | sad,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::RejectX86_ | ( | std::vector< KLT_TYPE > & | ssd,
 |  | std::vector< int > & | res
 | ) | [protected, inherited]

Author:
woelk

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Resize_ ( const int halfwinsize ) [inline, protected, inherited]

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author:
woelk

Definition at line 499 of file TrackerBaseInterface.hh.

References BIAS::TrackerBaseInterface< StorageType >::_bl1, BIAS::TrackerBaseInterface< StorageType >::_bl2, BIAS::TrackerBaseInterface< StorageType >::_gsx, BIAS::TrackerBaseInterface< StorageType >::_gsy, BIAS::TrackerBaseInterface< StorageType >::_gx1, BIAS::TrackerBaseInterface< StorageType >::_gx2, BIAS::TrackerBaseInterface< StorageType >::_gy1, BIAS::TrackerBaseInterface< StorageType >::_gy2, BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize, BIAS::TrackerBaseInterface< StorageType >::_WinSize, and TNT::Matrix< T >::newsize().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize ( const int hws ) [inline, inherited]

Definition at line 174 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxError ( const KLT_TYPE maxerr ) [inline, inherited]

Definition at line 167 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations ( const int maxiter ) [inline, inherited]

Definition at line 172 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE maxres ) [inline, inherited]

Definition at line 169 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetRejectionType ( const int rejection_type ) [inline, inherited]

Definition at line 182 of file TrackerBaseInterface.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::Track | ( | std::vector< HomgPoint2D > & | p1,
 |  | std::vector< HomgPoint2D > & | p2,
 |  | std::vector< HomgPoint2D > & | p2tracked,
 |  | std::vector< KLT_TYPE > & | error,
 |  | std::vector< int > & | numiter,
 |  | std::vector< KLT_TYPE > & | residuiMAD,
 |  | std::vector< KLT_TYPE > & | residuiMSD,
 |  | std::vector< int > & | res,
 |  | std::vector< Matrix< KLT_TYPE > > & | cov,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | AffinePred = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) | [inherited]

Same as Track(), but a correspondence is searched for every point in the vector p1.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::Track | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p2tracked,
 |  | KLT_TYPE & | error,
 |  | int & | iter,
 |  | KLT_TYPE & | residuumMAD,
 |  | KLT_TYPE & | residuumMSD,
 |  | Matrix< KLT_TYPE > & | cov,
 |  | const Matrix2x2< KLT_TYPE > & | AffinePred = Matrix2x2< KLT_TYPE >()
 | ) | [inherited]

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2. Upon completition

  • result : contains the best match,
  • error : contains the change in displacement calculated in the last iteration,
  • iter : contains then number of iterations used,
  • residuumMAD : contains the mean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window,
  • residuumMSD : contains the squared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window,
  • cov : contains an approximation to the covarinace matrix image1 and result in image2 over the tracking window ( = sum of absolute difference divided by number of pixels in tracking value ).

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Returns:
see defines
  • 0 on success (error< maxerror)
  • -1 when no spatial structure is present
  • -2 when point slid out of image
  • -3 when maxiter is reached and error is above maxerror
  • -4 when a point lies outside of valid region in images
  • -5 when point was rejected by MAD criterion
  • -6 when input point was at infinity
  • -7 when point is rejected by X86
  • 1 when error increased from last iteration
Author:
woelk

template<class StorageType>
virtual int BIAS::TrackerBaseWeighted< StorageType >::Track_ | ( | Vector< KLT_TYPE > & | p1,
 |  | Vector< KLT_TYPE > & | p2,
 |  | Vector< KLT_TYPE > & | result,
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected, virtual]

p1 has length 2, 2d coo p2 has length 2, 2d coo result has length 2, 2d coo

Author:
woelk/kollmann 06/2006

Implements BIAS::TrackerBaseInterface< StorageType >.

template<class StorageType>
int BIAS::TrackerBaseWeighted< StorageType >::TrackWeighted_ | ( | KLT_TYPE | p1[2],
 |  | KLT_TYPE | p2[2],
 |  | KLT_TYPE | result[2],
 |  | KLT_TYPE & | error,
 |  | int & | iter
 | ) | [protected]

Same as TrackSimple_ but also uses the weighting matrix _weight.

Author:
woelk

Member Data Documentation

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_diff_from_median [protected, inherited]

same as _diff_from_median but also for points where tracking was not sucessfull

Definition at line 225 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_all_ssd_residui [protected, inherited]

Definition at line 217 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages [protected, inherited]

filtered images are computed when set to true

Definition at line 235 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_d [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_diff_from_median [protected, inherited]

_diff_from_median = fabs(_ssd_residui - _median_ssd_residui)

Definition at line 222 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_disp [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_e [protected, inherited]

Definition at line 210 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_G [protected, inherited]

used in iteration

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Ginv [protected, inherited]

Definition at line 209 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2x [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2y [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_gradx1 [protected, inherited]

gradients image data arrays

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_gradx2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradXMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady1 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_grady2 [protected, inherited]

Definition at line 201 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradYMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxx [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy1 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy2 [protected, inherited]

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_(), and BIAS::TrackerBaseInterface< StorageType >::Resize_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gyy [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_HalfWinSize [protected, inherited]

iteration stops after _MaxIterations

Definition at line 188 of file TrackerBaseInterface.hh.

template<class StorageType>
StorageType** BIAS::TrackerBaseInterface< StorageType >::_ida1 [protected, inherited]

the image data arrays

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_().

template<class StorageType>
StorageType ** BIAS::TrackerBaseInterface< StorageType >::_ida2 [protected, inherited]

Definition at line 199 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_idet [protected, inherited]

Definition at line 212 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im1 [protected, inherited]

pointers to images

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_im2 [protected, inherited]

Definition at line 231 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize [protected, inherited]

remember last support window size (for recalculation of gaussian weight)

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_LowpassMask [protected, inherited]

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_MasksSeparable [protected, inherited]

filter masks can be applied in separated manner when set to true

Definition at line 240 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxError [protected, inherited]

iteration stops if position refinement is less than *_MaxError

Definition at line 190 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_MaxIterations [protected, inherited]

Definition at line 187 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE* BIAS::TrackerBaseInterface< StorageType >::_MaxResiduumMAD [protected, inherited]

outlier rejection via MAD

Definition at line 193 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx1 [protected, inherited]

the image borders modulo filter and support windows or ROI for image 1 and image 2

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
Median1D<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Median [protected, inherited]

used in RejectX86_

Definition at line 216 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_median_ssd_residui [protected, inherited]

Definition at line 220 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny1 [protected, inherited]

Definition at line 204 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny2 [protected, inherited]

Definition at line 205 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ParamsAllocated [protected, inherited]

Definition at line 183 of file TrackerBaseInterface.hh.

template<class StorageType>
int* BIAS::TrackerBaseInterface< StorageType >::_RejectionType [protected, inherited]

The rejection type: valid RT_MAD and RT_X86.

Definition at line 195 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_SobelBinomial [protected, inherited]

uses specialized filter implementation with soebel 3x3 and 5x5 binomial filter mask

Definition at line 238 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_().

template<class StorageType>
std::vector<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_ssd_residui [protected, inherited]

sum of sq. grey value diff only for points where tracking succeeded

Definition at line 219 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_threshold [protected, inherited]

the rejection threshold calculated by X86 _threshold = 5.2 * median(_diff_from_median)

Definition at line 228 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseWeighted< StorageType >::_weight [protected]

Reimplemented from BIAS::TrackerBaseInterface< StorageType >.

Definition at line 41 of file TrackerBaseWeighted.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_WinSize [protected, inherited]

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::Resize_().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdx [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdxy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::brdy [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::c [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::cf [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ll [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::lr [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::r [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rc [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::rf [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ul [protected, inherited]

variables needed in MyBilienarRegion?_

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::ur [protected, inherited]

Definition at line 317 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::x_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

template<class StorageType>
unsigned BIAS::TrackerBaseInterface< StorageType >::y_floor_end [protected, inherited]

Definition at line 315 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered1_(), and BIAS::TrackerBaseInterface< StorageType >::BilinearRegionPrefiltered2_().

The documentation for this class was generated from the following file:
  • Matcher2D/TrackerBaseWeighted.hh
Generated on Wed Jun 21 19:11:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrackerSynth< StorageType, CalculationType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrackerSynth

BIAS::TrackerSynth< StorageType, CalculationType > Class Template Reference

returns ground truth tracks read from file, for debugging More...

#include <Matcher2D/TrackerSynth.hh>

Inheritance diagram for BIAS::TrackerSynth< StorageType, CalculationType >:

[legend]
Collaboration diagram for BIAS::TrackerSynth< StorageType, CalculationType >:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
void | DumpResults (std::ostream &os=std::cout)
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | ReplaceLastImages (PyramidImage< CalculationType > *pim, PyramidImage< CalculationType > *gradx, PyramidImage< CalculationType > *grady)
This function allows the replacement of the last images.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
virtual int | Track (PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady, const std::vector< HomgPoint2D > &prediction, const std::vector< Matrix2x2< KLT_TYPE > > &affineprediction=std::vector< Matrix2x2< KLT_TYPE > >())
Tracks all points in Points_ using prediction as previous knowledge and afterwards replaces them by the nearest track read from file.
virtual int | Track (PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady)
Tracks all points from the internal data structure Points_ and afterwards replaces them by the nearest track read from file.
TrackerSynth (Param &para, const int grp, const std::string &postfix, const std::string &filename="tracks.txt")
TrackerSynth (Param &para, const std::string &postfix="", const std::string &filename="tracks.txt")
int | WriteTrackFile (std::deque< std::vector< HomgPoint2D > > &p, std::deque< std::vector< int > > &results, const std::string &name)
write a track file in Birchfeld-style.
virtual | ~TrackerSynth ()
Point manipulation functions
int | AddNumPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &quality, const int max_num_feat)
Adds first max_num_feat points further away than *MinBorderDist_ from roi border to the list of points to be tracked.
void | AddPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &quality)
Adds all points to the list of points to be tracked.
int | FillUpPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Replaces points to which no correspondence could be established in the internal data structures.
int | ReplaceAllPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Place every point from points even those at infinity, in the internal data structure Points_.
int | ReplacePoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Place every point from points which is not at infinity, in the internal data structure Points_.
Result access functions
Functions for accessing results like point position, number of iterations, ...

void | GetCovariances (std::vector< Matrix< double > > &cov) const
returns covariance matrices for biggest pyramid level.
void | GetError (std::vector< double > &error) const
returns the displacement in the last iteration on the biggest pyramid level.
void | GetNumIter (std::vector< int > &numiter) const
returns the number of iterations used in the biggest pyramid level
void | GetPoints (std::vector< HomgPoint2D > &p) const
returns the point positions in the actual image points at infinity (w=0.0) are returned, if tracking failed
void | GetResiduiMAD (std::vector< double > &residui) const
returns the mean grey level difference in the tracking window on the biggest pyramid level.
void | GetResiduiMSD (std::vector< double > &residui) const
returns the squared mean grey level difference in the tracking window on the biggest pyramid level.
void | GetResults (std::vector< int > &results) const
returns the results from the base tracker class on the biggest pyramid level.
Parameter access
Functions for accessing the parameter

Vector< int > * | GetHalfWinSize ()
int | GetMinBorderDistance ()
returns the minimum distance to image border which is used in AddPoints and FillUpPoints
enum ERejectionType | GetRejectionType ()
int | GetTrackerType ()
return trackerbase type currently active
void | SetCoarsePointUsage (const bool &UseCoarse)
void | SetHalfWinSize (const Vector< int > &hws)
void | SetMaxError (const Vector< double > &max_error)
void | SetMaxIterations (const Vector< int > &max_iter)
void | SetRejectionType (int rejection_type)
void | SetTrackerType (int tracker_type)
Point manipulation functions
int | AddNumPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &quality, const int max_num_feat)
Adds first max_num_feat points further away than *MinBorderDist_ from roi border to the list of points to be tracked.
void | AddPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &quality)
Adds all points to the list of points to be tracked.
int | FillUpPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Replaces points to which no correspondence could be established in the internal data structures.
int | ReplaceAllPoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Place every point from points even those at infinity, in the internal data structure Points_.
int | ReplacePoints (const std::vector< HomgPoint2D > &points, const std::vector< float > &qual)
Place every point from points which is not at infinity, in the internal data structure Points_.
Initialization functions
void ClearPoints ()
Clears the internal data structures, i.e.
void ParameterChanged ()
Adopt to changes in parameter, i.e.
void Reset ()
Calls ClearPoints and sets pointer to last image and gradients to zero.
Result access functions
Functions for accessing results like point position, number of iterations, ...

void | GetCovariances (std::vector< Matrix< double > > &cov) const
returns covariance matrices for biggest pyramid level.
void | GetError (std::vector< double > &error) const
returns the displacement in the last iteration on the biggest pyramid level.
void | GetNumIter (std::vector< int > &numiter) const
returns the number of iterations used in the biggest pyramid level
void | GetPoints (std::vector< HomgPoint2D > &p) const
returns the point positions in the actual image points at infinity (w=0.0) are returned, if tracking failed
void | GetResiduiMAD (std::vector< double > &residui) const
returns the mean grey level difference in the tracking window on the biggest pyramid level.
void | GetResiduiMSD (std::vector< double > &residui) const
returns the squared mean grey level difference in the tracking window on the biggest pyramid level.
void | GetResults (std::vector< int > &results) const
returns the results from the base tracker class on the biggest pyramid level.
Parameter access
Functions for accessing the parameter

Vector< int > * | GetHalfWinSize ()
int | GetMinBorderDistance ()
returns the minimum distance to image border which is used in AddPoints and FillUpPoints
enum ERejectionType | GetRejectionType ()
int | GetTrackerType ()
return trackerbase type currently active
void | SetCoarsePointUsage (const bool &UseCoarse)
void | SetHalfWinSize (const Vector< int > &hws)
void | SetMaxError (const Vector< double > &max_error)
void | SetMaxIterations (const Vector< int > &max_iter)
void | SetRejectionType (int rejection_type)
void | SetTrackerType (int tracker_type)
Tracking and image preparation functions
These functions need to be called for every new image.

int | PreparePyramide (const Image< StorageType > &im, PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gx, PyramidImage< CalculationType > &gy)
Prepares the pyramid images: Filters im to pim[0], downsamples pim[0] and calculates the gradients gx and gy of pim in every pyramid level.

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void AddGaussianNoise_ ()
adds spatial gaussian noise to Points_[*PyIndex_]
void AddOutlier_ ()
adds outliers to Points_[*PyIndex_]
void | AddParameter_ (Param &para, const int grp, const std::string &postfix)
void | DetermineROI_ (int &tlx, int &tly, int &brx, int &bry) const
int | FindNearest_ (HomgPoint2D &p, const int frame)
Finds the nearest point to p in Tracks_[frame].
void | FindNearest_ (HomgPoint2D &p, int &nearest_frame_index, int &nearest_track_index)
finds the nearest point to p in all frames in Tracks_.
void | PadPoints_ (const int start)
sets all points with index>=start in the internal data structures to infinity
void | ReadTracks_ (const std::string &filename)
reads tracks from file and stores them in Tracks_
void | ReserveInternals_ (const int pysize, const int pointsize)
void | ResizeInternals_ (const int pysize, const int num_points)
adapts the internal memory to new pyramid size and new point count if necessary.
void | ResizeInternals_ (const int pysize)
void Track_ ()
for all succesfully tracked points p in Points_[*PyIndex] it calls FindNearest_(p, Frame_) and replaces Points_[*PyIndex] by the so found track.
void | WriteTrackLog_ (int num)
logs reasons for lost tracks into tracker.log

Protected Attributes

double * | _GaussRatio
double * | _GaussSigma
parameter from mean filters
int * | _HalfWinSize
parameter from TrackerBase
long int | _liDebugLevel
KLT_TYPE * | _MaxError
int * | _MaxIterations
int * | _MeanSize
bool | _ParamsAllocated
std::vector< Matrix2x2< double > > | AffinePrediction_
prediction for affine warping, same for all pyramid levels
std::vector< std::vector<
Matrix2x2< double > > > 		AffineResults_
results of affine tracking
Binomial< StorageType, CalculationType > | binomial_
std::vector< std::vector<
Matrix< double > > > 		Cov_
covariance matrices
std::vector< std::vector<
double > > 		DisplInLastIter_
displacement inlast iteration
int | Frame_
current frame number
Gauss< StorageType, CalculationType > | gauss_
GradientGauss< CalculationType,
CalculationType > 		ggauss_
GradientGaussAsymmetric< CalculationType,
CalculationType > 		ggaussasymmetric_
FilterNTo2N< CalculationType,
CalculationType > * 		grad_
the different gradient classes
int * | GradientType_
GradientSobel3x3< CalculationType,
CalculationType > 		gsobel3x3_
Vector< int > * | HalfWinSize_
PyramidImage< CalculationType > * | LastGradX_
PyramidImage< CalculationType > * | LastGradY_
PyramidImage< CalculationType > * | LastImage_
Convolution< StorageType,
CalculationType > * 		lowpass_
the different mean filter classes
Vector< KLT_TYPE > * | MaxError_
Vector< int > * | MaxIter_
the parameter
Mean< StorageType, CalculationType > | mean_
int * | MeanType_
int | MinBorderDist_
minimal distance of every point from image border in biggest pyramid im
std::vector< std::vector<
int > > 		NumIter_
number of iterations used
std::vector< HomgPoint2D > | p2tracked_
temporary data
std::vector< std::vector<
HomgPoint2D > > 		Points_
the point position in the actual image
std::vector< std::vector<
HomgPoint2D > > 		PredictedPoints_
the prediction for every pyramid image
int * | PyIndex_
std::vector< std::vector<
int > > 		res_
result code for every point
std::vector< std::vector<
double > > 		ResiduiMAD_
mean absolute grey level difference (MAD) in tracking window
std::vector< std::vector<
double > > 		ResiduiMSD_
mean squared grey level difference (MSD) in tracking window
TrackerBase< CalculationType > | tb_
the base tracker
std::vector< std::vector<
HomgPoint2D > > 		Tracks_
tracks read from file by ReadTracks_
bool * | UseCoarserPointIfLost_
set if you want to keep track of points regardless of trackability in highest resolution

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

template<class StorageType, class CalculationType>
class BIAS::TrackerSynth< StorageType, CalculationType >

returns ground truth tracks read from file, for debugging

Author:
woelk 01/2006

Definition at line 43 of file TrackerSynth.hh.

Constructor & Destructor Documentation

template<class StorageType, class CalculationType>
TrackerSynth::TrackerSynth | ( | Param & | para,
 |  | const std::string & | postfix = "",
 |  | const std::string & | filename = "tracks.txt"
 | ) |

Definition at line 41 of file TrackerSynth.cpp.

References BIAS::TrackerSynth< StorageType, CalculationType >::Frame_, and BIAS::TrackerSynth< StorageType, CalculationType >::ReadTracks_().

template<class StorageType, class CalculationType>
TrackerSynth::TrackerSynth | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix,
 |  | const std::string & | filename = "tracks.txt"
 | ) |

Definition at line 52 of file TrackerSynth.cpp.

References BIAS::TrackerSynth< StorageType, CalculationType >::Frame_, and BIAS::TrackerSynth< StorageType, CalculationType >::ReadTracks_().

template<class StorageType, class CalculationType>
TrackerSynth::~TrackerSynth ( ) [virtual]

Definition at line 63 of file TrackerSynth.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

template<class StorageType, class CalculationType>
void TrackerSynth::AddGaussianNoise_ ( ) [protected]

adds spatial gaussian noise to Points_[*PyIndex_]

Definition at line 145 of file TrackerSynth.cpp.

References BIAS::Random::GetNormalDistributed(), num, BIAS::Tracker< StorageType, CalculationType >::Points_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::AddNumPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | quality,
 |  | const int | max_num_feat
 | ) | [inherited]

Adds first max_num_feat points further away than *MinBorderDist_ from roi border to the list of points to be tracked.

Track must have been called before this function. returns -1 if not enough input points were available

Author:
woelk 09/2004

Referenced by Track().

template<class StorageType, class CalculationType>
void TrackerSynth::AddOutlier_ ( ) [protected]

adds outliers to Points_[*PyIndex_]

Definition at line 166 of file TrackerSynth.cpp.

References BIAS::Random::GetUniformDistributed(), BIAS::Random::GetUniformDistributedInt(), num, BIAS::Tracker< StorageType, CalculationType >::Points_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
void Tracker::AddParameter_ | ( | Param & | para,
 |  | const int | grp,
 |  | const std::string & | postfix
 | ) | [protected, inherited]

Definition at line 1214 of file Tracker.cpp.

References BIAS::AddGradientType(), BIAS::AddLowPassType(), BIASCDOUT, BIAS::Param::CheckParam(), D_TRACKER_PARAM, BIAS::Param::GetParamInt(), BIAS::Tracker< StorageType, CalculationType >::GradientType_, and BIAS::Tracker< StorageType, CalculationType >::MeanType_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::AddPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | quality
 | ) | [inherited]

Adds all points to the list of points to be tracked.

If a point lies too close to the roi/image border it's w-component in the internal data structure is set to zero and it is hence not tracked Track must have been called before this function.

Author:
woelk 09/2004

template<class StorageType, class CalculationType>
void Tracker::ClearPoints ( ) [inherited]

Clears the internal data structures, i.e.

POints_, POints2_, NumIter_, DisplInLastIter_, ResiduiMAD_, ResiduiMSD_, res_ and Cov_.

Author:
woelk 09/2004

Definition at line 244 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

template<class StorageType, class CalculationType>
void Tracker::DetermineROI_ | ( | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

Definition at line 328 of file Tracker.cpp.

References BIASASSERT, BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, BIAS::Tracker< StorageType, CalculationType >::LastImage_, max, min, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::DumpResults ( std::ostream & os = std::cout ) [inline, inherited]

Definition at line 319 of file Tracker.hh.

References p, pyind, and TNT::Vector< T >::size().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::FillUpPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) | [inherited]

Replaces points to which no correspondence could be established in the internal data structures.

These "lost" points are marked in the internal data structure by setting the last component (w) to zero (0.0). Traverses the argument list subsequently and makes use of as many points as necessary. Only points further away than *MinBorderDist_ from roi border are added to internal data structures.

If "ghost tracks" appear, try to make the corner detector aware of points which are already tracked :

        CornerDetector cd;
        Tracker tr;
        vector<HomgPoint2D> pt
        tr.GetPoints(pt);
        cd.Detect(image, pt, qual);
        tr.FillUpPoints(pt, qual);
See also documentation of CornerDetectorGradient::Detect().

The argument "qual" refers to the quality from the corner detector.

Returns:
number of used points, negative on error.
Author:
woelk 09/2004

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int TrackerSynth::FindNearest_ | ( | HomgPoint2D & | p,
 |  | const int | frame
 | ) | [protected]

Finds the nearest point to p in Tracks_[frame].

Returns the track index, i.e. the nearest point to p i Tracks_[frame][track index]

Definition at line 277 of file TrackerSynth.cpp.

References BIASASSERT, BIAS::HomgPoint2D::Distance(), and max.

template<class StorageType, class CalculationType>
void TrackerSynth::FindNearest_ | ( | HomgPoint2D & | p,
 |  | int & | nearest_frame_index,
 |  | int & | nearest_track_index
 | ) | [protected]

finds the nearest point to p in all frames in Tracks_.

Returns nearest_frame_index and nearest_track_index

Definition at line 252 of file TrackerSynth.cpp.

References BIASASSERT, BIAS::HomgPoint2D::Distance(), and max.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetCovariances ( std::vector< Matrix< double > > & cov ) const [inline, inherited]

returns covariance matrices for biggest pyramid level.

Author:
woelk 06/2005

Definition at line 254 of file Tracker.hh.

References cov.

Referenced by main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetError ( std::vector< double > & error ) const [inline, inherited]

returns the displacement in the last iteration on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 223 of file Tracker.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::GetHalfWinSize ( ) [inline, inherited]

Definition at line 297 of file Tracker.hh.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::GetMinBorderDistance ( ) [inline, inherited]

returns the minimum distance to image border which is used in AddPoints and FillUpPoints

Definition at line 286 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetNumIter ( std::vector< int > & numiter ) const [inline, inherited]

returns the number of iterations used in the biggest pyramid level

Author:
woelk 09/2004

Definition at line 217 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetPoints ( std::vector< HomgPoint2D > & p ) const [inline, inherited]

returns the point positions in the actual image points at infinity (w=0.0) are returned, if tracking failed

Author:
woelk

Definition at line 211 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
enum ERejectionType BIAS::Tracker< StorageType, CalculationType >::GetRejectionType ( ) [inline, inherited]

Definition at line 290 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResiduiMAD ( std::vector< double > & residui ) const [inline, inherited]

returns the mean grey level difference in the tracking window on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 229 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResiduiMSD ( std::vector< double > & residui ) const [inline, inherited]

returns the squared mean grey level difference in the tracking window on the biggest pyramid level.

Author:
woelk 09/2004

Definition at line 235 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::GetResults ( std::vector< int > & results ) const [inline, inherited]

returns the results from the base tracker class on the biggest pyramid level.

0 on success (error< maxerror) - the point was tracked -1 when no spatial structure is present -2 when point slid out of image -3 when maxiter is reached an error is above maxerror -4 when a point lies outside of valid region in images -5 when the mean absolute difference between the two poinst -6 when input point is at infinity 1 when error increased from last iteration

Author:
woelk 09/2004

Definition at line 249 of file Tracker.hh.

Referenced by main(), and Track().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::GetTrackerType ( ) [inline, inherited]

return trackerbase type currently active

Definition at line 277 of file Tracker.hh.

template<class StorageType, class CalculationType>
void Tracker::PadPoints_ ( const int start ) [protected, inherited]

sets all points with index>=start in the internal data structures to infinity

Definition at line 1330 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::Points_.

template<class StorageType, class CalculationType>
void Tracker::ParameterChanged ( ) [inherited]

Adopt to changes in parameter, i.e.

sets grad_, lowpass_ and tb_ according to *GradientType_, *MeanType_ and *TrackerType_.

Author:
woelk 09/2004

Definition at line 170 of file Tracker.cpp.

References BIASCDOUT, BIASERR, BIAS::Tracker< StorageType, CalculationType >::binomial_, BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), D_TRACKER_PARAM, BIAS::Tracker< StorageType, CalculationType >::gauss_, BIAS::FilterBase< InputStorageType, OutputStorageType >::GetBorders(), BIAS::Tracker< StorageType, CalculationType >::ggauss_, BIAS::Tracker< StorageType, CalculationType >::ggaussasymmetric_, BIAS::Tracker< StorageType, CalculationType >::grad_, BIAS::Tracker< StorageType, CalculationType >::GradientType_, BIAS::Tracker< StorageType, CalculationType >::gsobel3x3_, BIAS::GT_Gauss, BIAS::GT_GaussAsymmetric, BIAS::GT_Sobel3x3, gx, gy, BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, BIAS::Tracker< StorageType, CalculationType >::LastImage_, BIAS::Tracker< StorageType, CalculationType >::lowpass_, BIAS::LPT_Binomial, BIAS::LPT_Gauss, BIAS::LPT_Mean, max, BIAS::Tracker< StorageType, CalculationType >::mean_, BIAS::Tracker< StorageType, CalculationType >::MeanType_, BIAS::Tracker< StorageType, CalculationType >::MinBorderDist_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

Referenced by main(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int Tracker::PreparePyramide | ( | const Image< StorageType > & | im,
 |  | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gx,
 |  | PyramidImage< CalculationType > & | gy
 | ) | [inherited]

Prepares the pyramid images: Filters im to pim[0], downsamples pim[0] and calculates the gradients gx and gy of pim in every pyramid level.

Author:
woelk 09/2004

Definition at line 713 of file Tracker.cpp.

References BIASASSERT, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::PyramidImage< StorageType >::Release(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::PyramidImage< StorageType >::SetZero(), and BIAS::TimeMeasure::Start().

Referenced by main(), and Track().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

template<class StorageType, class CalculationType>
void BIAS::TrackerSynth< StorageType, CalculationType >::ReadTracks_ ( const std::string & filename ) [protected]

reads tracks from file and stores them in Tracks_

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::TrackerSynth().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::ReplaceAllPoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) | [inherited]

Place every point from points even those at infinity, in the internal data structure Points_.

Author:
woelk 09/2004

Referenced by main().

template<class StorageType, class CalculationType>
void Tracker::ReplaceLastImages | ( | PyramidImage< CalculationType > * | pim,
 |  | PyramidImage< CalculationType > * | gradx,
 |  | PyramidImage< CalculationType > * | grady
 | ) | [inherited]

This function allows the replacement of the last images.

It is intended to be used when all points in the current image should be mapped against different reference image for every point. A set of "last images" is constructed from patches

Author:
woelk 02/2006

Definition at line 158 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, and BIAS::Tracker< StorageType, CalculationType >::LastImage_.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::ReplacePoints | ( | const std::vector< HomgPoint2D > & | points,
 |  | const std::vector< float > & | qual
 | ) | [inherited]

Place every point from points which is not at infinity, in the internal data structure Points_.

Author:
woelk 09/2004

template<class StorageType, class CalculationType>
void Tracker::ReserveInternals_ | ( | const int | pysize,
 |  | const int | pointsize
 | ) | [protected, inherited]

Definition at line 300 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, p, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

template<class StorageType, class CalculationType>
void Tracker::Reset ( ) [inherited]

Calls ClearPoints and sets pointer to last image and gradients to zero.

Author:
streckel 11/2004

Definition at line 319 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::LastGradX_, BIAS::Tracker< StorageType, CalculationType >::LastGradY_, and BIAS::Tracker< StorageType, CalculationType >::LastImage_.

template<class StorageType, class CalculationType>
void Tracker::ResizeInternals_ | ( | const int | pysize,
 |  | const int | num_points
 | ) | [protected, inherited]

adapts the internal memory to new pyramid size and new point count if necessary.

Author:
woelk 02/2006

Definition at line 275 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffinePrediction_, BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, p, BIAS::Tracker< StorageType, CalculationType >::p2tracked_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_, and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
void Tracker::ResizeInternals_ ( const int pysize ) [protected, inherited]

Definition at line 258 of file Tracker.cpp.

References BIAS::Tracker< StorageType, CalculationType >::AffineResults_, BIAS::Tracker< StorageType, CalculationType >::Cov_, BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_, BIAS::Tracker< StorageType, CalculationType >::NumIter_, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_, BIAS::Tracker< StorageType, CalculationType >::res_, BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_, and BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetCoarsePointUsage ( const bool & UseCoarse ) [inline, inherited]

Definition at line 311 of file Tracker.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetHalfWinSize ( const Vector< int > & hws ) [inline, inherited]

Definition at line 300 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetMaxError ( const Vector< double > & max_error ) [inline, inherited]

Definition at line 304 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetMaxIterations ( const Vector< int > & max_iter ) [inline, inherited]

Definition at line 308 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetRejectionType ( int rejection_type ) [inline, inherited]

Definition at line 293 of file Tracker.hh.

template<class StorageType, class CalculationType>
void BIAS::Tracker< StorageType, CalculationType >::SetTrackerType ( int tracker_type ) [inline, inherited]

Definition at line 280 of file Tracker.hh.

template<class StorageType, class CalculationType>
int TrackerSynth::Track | ( | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gradx,
 |  | PyramidImage< CalculationType > & | grady,
 |  | const std::vector< HomgPoint2D > & | prediction,
 |  | const std::vector< Matrix2x2< KLT_TYPE > > & | affineprediction = std::vector< Matrix2x2< KLT_TYPE > >()
 | ) | [virtual]

Tracks all points in Points_ using prediction as previous knowledge and afterwards replaces them by the nearest track read from file.

Author:
woelk 01/2006

Reimplemented from BIAS::Tracker< StorageType, CalculationType >.

Definition at line 91 of file TrackerSynth.cpp.

References BIASCDOUT, D_TS_REPLACE, BIAS::Tracker< StorageType, CalculationType >::Points_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
int TrackerSynth::Track | ( | PyramidImage< CalculationType > & | pim,
 |  | PyramidImage< CalculationType > & | gradx,
 |  | PyramidImage< CalculationType > & | grady
 | ) | [virtual]

Tracks all points from the internal data structure Points_ and afterwards replaces them by the nearest track read from file.

Author:
woelk 01/2006

Reimplemented from BIAS::Tracker< StorageType, CalculationType >.

Definition at line 69 of file TrackerSynth.cpp.

References BIASCDOUT, D_TS_REPLACE, BIAS::Tracker< StorageType, CalculationType >::Points_, and BIAS::Tracker< StorageType, CalculationType >::PyIndex_.

template<class StorageType, class CalculationType>
void TrackerSynth::Track_ ( ) [protected]

for all succesfully tracked points p in Points_[*PyIndex] it calls FindNearest_(p, Frame_) and replaces Points_[*PyIndex] by the so found track.

Adds Gaussian Noise and outlier to the replaced points.

Definition at line 114 of file TrackerSynth.cpp.

References BIASCDOUT, D_TS_REPLACE, BIAS::TrackerSynth< StorageType, CalculationType >::FindNearest_(), BIAS::TrackerSynth< StorageType, CalculationType >::Frame_, num, BIAS::Tracker< StorageType, CalculationType >::Points_, BIAS::Tracker< StorageType, CalculationType >::PyIndex_, and BIAS::TrackerSynth< StorageType, CalculationType >::Tracks_.

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::WriteTrackFile | ( | std::deque< std::vector< HomgPoint2D > > & | p,
 |  | std::deque< std::vector< int > > & | results,
 |  | const std::string & | name
 | ) | [inherited]

write a track file in Birchfeld-style.

The file is independent of internal data structures. p[i][k] is point number k in image i and results[i][k] is result for point number k in image i.

Author:
woelk 09/2004

Referenced by main().

template<class StorageType, class CalculationType>
void Tracker::WriteTrackLog_ ( int num ) [protected, inherited]

logs reasons for lost tracks into tracker.log

Definition at line 1092 of file Tracker.cpp.

References BIASABORT, BIASERR, first, and r.

Member Data Documentation

template<class StorageType, class CalculationType>
double * BIAS::Tracker< StorageType, CalculationType >::_GaussRatio [protected, inherited]

Definition at line 363 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
double* BIAS::Tracker< StorageType, CalculationType >::_GaussSigma [protected, inherited]

parameter from mean filters

Definition at line 363 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::_HalfWinSize [protected, inherited]

parameter from TrackerBase

Definition at line 360 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

template<class StorageType, class CalculationType>
KLT_TYPE* BIAS::Tracker< StorageType, CalculationType >::_MaxError [protected, inherited]

Definition at line 361 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int * BIAS::Tracker< StorageType, CalculationType >::_MaxIterations [protected, inherited]

Definition at line 360 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::_MeanSize [protected, inherited]

Definition at line 364 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
bool BIAS::Tracker< StorageType, CalculationType >::_ParamsAllocated [protected, inherited]

Definition at line 349 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

template<class StorageType, class CalculationType>
std::vector<Matrix2x2<double> > BIAS::Tracker< StorageType, CalculationType >::AffinePrediction_ [protected, inherited]

prediction for affine warping, same for all pyramid levels

Definition at line 390 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<Matrix2x2<double> > > BIAS::Tracker< StorageType, CalculationType >::AffineResults_ [protected, inherited]

results of affine tracking

Definition at line 388 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
Binomial<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::binomial_ [protected, inherited]

Definition at line 347 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
std::vector<std::vector<Matrix<double> > > BIAS::Tracker< StorageType, CalculationType >::Cov_ [protected, inherited]

covariance matrices

Definition at line 386 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::DisplInLastIter_ [protected, inherited]

displacement inlast iteration

Definition at line 380 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
int BIAS::TrackerSynth< StorageType, CalculationType >::Frame_ [protected]

current frame number

Definition at line 79 of file TrackerSynth.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::Track_(), and BIAS::TrackerSynth< StorageType, CalculationType >::TrackerSynth().

template<class StorageType, class CalculationType>
Gauss<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::gauss_ [protected, inherited]

Definition at line 346 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
GradientGauss<CalculationType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::ggauss_ [protected, inherited]

Definition at line 341 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
GradientGaussAsymmetric<CalculationType,CalculationType> BIAS::Tracker< StorageType, CalculationType >::ggaussasymmetric_ [protected, inherited]

Definition at line 342 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

template<class StorageType, class CalculationType>
FilterNTo2N<CalculationType, CalculationType>* BIAS::Tracker< StorageType, CalculationType >::grad_ [protected, inherited]

the different gradient classes

Definition at line 339 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::GradientType_ [protected, inherited]

Definition at line 355 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
GradientSobel3x3<CalculationType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::gsobel3x3_ [protected, inherited]

Definition at line 340 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::HalfWinSize_ [protected, inherited]

Definition at line 353 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType>* BIAS::Tracker< StorageType, CalculationType >::LastGradX_ [protected, inherited]

Definition at line 394 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType> * BIAS::Tracker< StorageType, CalculationType >::LastGradY_ [protected, inherited]

Definition at line 394 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
PyramidImage<CalculationType>* BIAS::Tracker< StorageType, CalculationType >::LastImage_ [protected, inherited]

Definition at line 393 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReplaceLastImages(), and BIAS::Tracker< StorageType, CalculationType >::Reset().

template<class StorageType, class CalculationType>
Convolution<StorageType, CalculationType>* BIAS::Tracker< StorageType, CalculationType >::lowpass_ [protected, inherited]

the different mean filter classes

Definition at line 345 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
Vector<KLT_TYPE>* BIAS::Tracker< StorageType, CalculationType >::MaxError_ [protected, inherited]

Definition at line 352 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
Vector<int>* BIAS::Tracker< StorageType, CalculationType >::MaxIter_ [protected, inherited]

the parameter

Definition at line 351 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
Mean<StorageType, CalculationType> BIAS::Tracker< StorageType, CalculationType >::mean_ [protected, inherited]

Definition at line 348 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), and BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::MeanType_ [protected, inherited]

Definition at line 356 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
int BIAS::Tracker< StorageType, CalculationType >::MinBorderDist_ [protected, inherited]

minimal distance of every point from image border in biggest pyramid im

Definition at line 358 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ParameterChanged().

template<class StorageType, class CalculationType>
std::vector<std::vector<int> > BIAS::Tracker< StorageType, CalculationType >::NumIter_ [protected, inherited]

number of iterations used

Definition at line 378 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<HomgPoint2D> BIAS::Tracker< StorageType, CalculationType >::p2tracked_ [protected, inherited]

temporary data

Definition at line 370 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<HomgPoint2D> > BIAS::Tracker< StorageType, CalculationType >::Points_ [protected, inherited]

the point position in the actual image

Definition at line 376 of file Tracker.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::PadPoints_(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_(), BIAS::TrackerSynth< StorageType, CalculationType >::Track(), BIAS::Tracker< StorageType, CalculationType >::Track(), and BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

template<class StorageType, class CalculationType>
std::vector<std::vector<HomgPoint2D> > BIAS::Tracker< StorageType, CalculationType >::PredictedPoints_ [protected, inherited]

the prediction for every pyramid image

Definition at line 374 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
int* BIAS::Tracker< StorageType, CalculationType >::PyIndex_ [protected, inherited]

Definition at line 354 of file Tracker.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::AddGaussianNoise_(), BIAS::TrackerSynth< StorageType, CalculationType >::AddOutlier_(), BIAS::Tracker< StorageType, CalculationType >::DetermineROI_(), BIAS::Tracker< StorageType, CalculationType >::ParameterChanged(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_(), BIAS::TrackerSynth< StorageType, CalculationType >::Track(), BIAS::TrackerSynth< StorageType, CalculationType >::Track_(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

template<class StorageType, class CalculationType>
std::vector<std::vector<int> > BIAS::Tracker< StorageType, CalculationType >::res_ [protected, inherited]

result code for every point

Definition at line 372 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::ResiduiMAD_ [protected, inherited]

mean absolute grey level difference (MAD) in tracking window

Definition at line 382 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
std::vector<std::vector<double> > BIAS::Tracker< StorageType, CalculationType >::ResiduiMSD_ [protected, inherited]

mean squared grey level difference (MSD) in tracking window

Definition at line 384 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::ClearPoints(), BIAS::Tracker< StorageType, CalculationType >::ReserveInternals_(), and BIAS::Tracker< StorageType, CalculationType >::ResizeInternals_().

template<class StorageType, class CalculationType>
TrackerBase<CalculationType> BIAS::Tracker< StorageType, CalculationType >::tb_ [protected, inherited]

the base tracker

Definition at line 336 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker().

template<class StorageType, class CalculationType>
std::vector<std::vector<HomgPoint2D> > BIAS::TrackerSynth< StorageType, CalculationType >::Tracks_ [protected]

tracks read from file by ReadTracks_

Definition at line 77 of file TrackerSynth.hh.

Referenced by BIAS::TrackerSynth< StorageType, CalculationType >::Track_().

template<class StorageType, class CalculationType>
bool* BIAS::Tracker< StorageType, CalculationType >::UseCoarserPointIfLost_ [protected, inherited]

set if you want to keep track of points regardless of trackability in highest resolution

Definition at line 367 of file Tracker.hh.

Referenced by BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::Tracker< StorageType, CalculationType >::~Tracker().

The documentation for this class was generated from the following files:
  • Matcher2D/TrackerSynth.hh
  • Matcher2D/TrackerSynth.cpp
Generated on Wed Jun 21 19:11:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Transpose_View< Array2D > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Transpose_View

TNT::Transpose_View< Array2D > Class Template Reference

#include <Base/Math/tnt/transv.h>

Collaboration diagram for TNT::Transpose_View< Array2D >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Array2D::element_type | T
typedef T | value_type

Public Member Functions

const Array2D & | array () const
Subscript | dim (Subscript i) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
const Array2D::element_type & | operator() (Subscript i, Subscript j) const
Transpose_View (const Array2D &A)
Transpose_View (const Transpose_View< Array2D > &A)

Protected Attributes

const Array2D & | A_

Detailed Description

template<class Array2D>
class TNT::Transpose_View< Array2D >

Definition at line 47 of file transv.h.

Member Typedef Documentation

template<class Array2D>
typedef const T* TNT::Transpose_View< Array2D >::const_iterator

Definition at line 61 of file transv.h.

template<class Array2D>
typedef const T& TNT::Transpose_View< Array2D >::const_reference

Definition at line 62 of file transv.h.

template<class Array2D>
typedef T TNT::Transpose_View< Array2D >::element_type

Definition at line 57 of file transv.h.

template<class Array2D>
typedef T* TNT::Transpose_View< Array2D >::iterator

Definition at line 59 of file transv.h.

template<class Array2D>
typedef T* TNT::Transpose_View< Array2D >::pointer

Definition at line 58 of file transv.h.

template<class Array2D>
typedef T& TNT::Transpose_View< Array2D >::reference

Definition at line 60 of file transv.h.

template<class Array2D>
typedef Array2D::element_type TNT::Transpose_View< Array2D >::T

Definition at line 55 of file transv.h.

template<class Array2D>
typedef T TNT::Transpose_View< Array2D >::value_type

Definition at line 56 of file transv.h.

Constructor & Destructor Documentation

template<class Array2D>
TNT::Transpose_View< Array2D >::Transpose_View ( const Transpose_View< Array2D > & A ) [inline]

Definition at line 82 of file transv.h.

template<class Array2D>
TNT::Transpose_View< Array2D >::Transpose_View ( const Array2D & A ) [inline]

Definition at line 83 of file transv.h.

Member Function Documentation

template<class Array2D>
const Array2D& TNT::Transpose_View< Array2D >::array ( ) const [inline]

Definition at line 65 of file transv.h.

References TNT::Transpose_View< Array2D >::A_.

template<class Array2D>
Subscript TNT::Transpose_View< Array2D >::dim ( Subscript i ) const [inline]

Definition at line 69 of file transv.h.

References TNT::Transpose_View< Array2D >::A_, TNT::Transpose_View< Array2D >::num_cols(), and TNT::Transpose_View< Array2D >::num_rows().

template<class Array2D>
Subscript TNT::Transpose_View< Array2D >::lbound ( ) const [inline]

Definition at line 68 of file transv.h.

References TNT::Transpose_View< Array2D >::A_.

Referenced by TNT::Transpose_View< Array2D >::operator()().

template<class Array2D>
Subscript TNT::Transpose_View< Array2D >::num_cols ( ) const [inline]

Definition at line 67 of file transv.h.

References TNT::Transpose_View< Array2D >::A_.

Referenced by TNT::Transpose_View< Array2D >::dim().

template<class Array2D>
Subscript TNT::Transpose_View< Array2D >::num_rows ( ) const [inline]

Definition at line 66 of file transv.h.

References TNT::Transpose_View< Array2D >::A_.

Referenced by TNT::Transpose_View< Array2D >::dim().

template<class Array2D>
const Array2D::element_type& TNT::Transpose_View< Array2D >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 86 of file transv.h.

References TNT::Transpose_View< Array2D >::A_, and TNT::Transpose_View< Array2D >::lbound().

Member Data Documentation

template<class Array2D>
const Array2D& TNT::Transpose_View< Array2D >::A_ [protected]

Definition at line 51 of file transv.h.

Referenced by TNT::Transpose_View< Array2D >::array(), TNT::Transpose_View< Array2D >::dim(), TNT::Transpose_View< Array2D >::lbound(), TNT::Transpose_View< Array2D >::num_cols(), TNT::Transpose_View< Array2D >::num_rows(), and TNT::Transpose_View< Array2D >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/transv.h
Generated on Wed Jun 21 19:13:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TriangleMesh Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TriangleMesh

BIAS::TriangleMesh Class Reference

create and represent a 3D triangle mesh More...

#include <Utils/TriangleMesh.hh>

Collaboration diagram for BIAS::TriangleMesh:

[legend]
List of all members.

Public Member Functions

void | GenerateDenseMesh (const BIAS::Image< float > &DenseDepthMap, BIAS::PMatrix &P, const BIAS::Image< unsigned char > &Texture, const ROI &cutout)
Calculate a triangle mesh only using the given cutout.
void | GenerateDenseMesh (const BIAS::Image< float > &DenseDepthMap, BIAS::PMatrix &P, const BIAS::Image< unsigned char > &Texture)
Calculate a triangle mesh from dense depth map.
void | GetNormals (std::vector< BIAS::Vector3< double > > &normals) const
void | GetTexCoords (std::vector< BIAS::Vector2< float > > &texCoo) const
void | GetTexture (Image< unsigned char > &img) const
void | GetTriangleIndices (std::vector< BIAS::Vector< int > > &triangleIndices) const
void | GetVertices (std::vector< BIAS::Vector3< double > > &vertices) const
~TriangleMesh ()

Protected Attributes

std::vector< BIAS::Vector3<
double > > 		meshVertices_
BIAS::Image< unsigned char > | texture_
std::vector< BIAS::Vector2<
float > > 		textureCoords_
std::vector< BIAS::Vector<
int > > 		triangleIndices_
std::vector< BIAS::Vector3<
double > > 		vertexNormals_

Detailed Description

create and represent a 3D triangle mesh

Author:
bartczak

Definition at line 40 of file TriangleMesh.hh.

Constructor & Destructor Documentation

BIAS::TriangleMesh::~TriangleMesh ( ) [inline]

Definition at line 42 of file TriangleMesh.hh.

Member Function Documentation

void TriangleMesh::GenerateDenseMesh | ( | const BIAS::Image< float > & | DenseDepthMap,
 |  | BIAS::PMatrix & | P,
 |  | const BIAS::Image< unsigned char > & | Texture,
 |  | const ROI & | cutout
 | ) |

Calculate a triangle mesh only using the given cutout.

recalculates depthmap, image and p and calls generic interface

Author:
koeser

Definition at line 140 of file TriangleMesh.cpp.

References BIAS::PMatrix::Compose(), BIAS::PMatrix::GetC(), BIAS::ROI::GetCorners(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetR(), BIAS::PMatrix::IsMetric(), K, and R.

void TriangleMesh::GenerateDenseMesh | ( | const BIAS::Image< float > & | DenseDepthMap,
 |  | BIAS::PMatrix & | P,
 |  | const BIAS::Image< unsigned char > & | Texture
 | ) |

Calculate a triangle mesh from dense depth map.

No triangles are discarded, hence no smoothing.

Definition at line 35 of file TriangleMesh.cpp.

References BIAS::PMatrix::BackprojectWorldCoo(), BIASERR, BIAS::HomgPoint3D::GetEuclidian(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), meshVertices_, BIAS::Vector2< T >::Set(), texture_, textureCoords_, triangleIndices_, and vertexNormals_.

void BIAS::TriangleMesh::GetNormals ( std::vector< BIAS::Vector3< double > > & normals ) const [inline]

Definition at line 77 of file TriangleMesh.hh.

void BIAS::TriangleMesh::GetTexCoords ( std::vector< BIAS::Vector2< float > > & texCoo ) const [inline]

Definition at line 69 of file TriangleMesh.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

void BIAS::TriangleMesh::GetTexture ( Image< unsigned char > & img ) const [inline]

Definition at line 61 of file TriangleMesh.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

void BIAS::TriangleMesh::GetTriangleIndices ( std::vector< BIAS::Vector< int > > & triangleIndices ) const [inline]

Definition at line 73 of file TriangleMesh.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

void BIAS::TriangleMesh::GetVertices ( std::vector< BIAS::Vector3< double > > & vertices ) const [inline]

Definition at line 65 of file TriangleMesh.hh.

Referenced by BIAS::ThreeDOut::AddTriangleMesh().

Member Data Documentation

std::vector<BIAS::Vector3<double> > BIAS::TriangleMesh::meshVertices_ [protected]

Definition at line 90 of file TriangleMesh.hh.

Referenced by GenerateDenseMesh().

BIAS::Image<unsigned char> BIAS::TriangleMesh::texture_ [protected]

Definition at line 89 of file TriangleMesh.hh.

Referenced by GenerateDenseMesh().

std::vector<BIAS::Vector2<float> > BIAS::TriangleMesh::textureCoords_ [protected]

Definition at line 92 of file TriangleMesh.hh.

Referenced by GenerateDenseMesh().

std::vector<BIAS::Vector<int> > BIAS::TriangleMesh::triangleIndices_ [protected]

Definition at line 93 of file TriangleMesh.hh.

Referenced by GenerateDenseMesh().

std::vector<BIAS::Vector3<double> > BIAS::TriangleMesh::vertexNormals_ [protected]

Definition at line 91 of file TriangleMesh.hh.

Referenced by GenerateDenseMesh().

The documentation for this class was generated from the following files:
  • Utils/TriangleMesh.hh
  • Utils/TriangleMesh.cpp
Generated on Wed Jun 21 19:11:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Triangulation Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Triangulation

BIAS::Triangulation Class Reference
[Estimation]

Class for triangulation of 3Dpoints from 2D matches. More...

#include <Geometry/Triangulation.hh>

Inheritance diagram for BIAS::Triangulation:

[legend]
Collaboration diagram for BIAS::Triangulation:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
int | CorrectCorrespondences (const FMatrix &F, HomgPoint2D &p1, HomgPoint2D &p2, bool refine=false)
optimize 2d correspondences regarding F for triangulation
bool | DebugLevelIsSet (long int lv) const
int | GetCovariance (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const Matrix2x2< double > &cov1, const HomgPoint2D &p2, const Matrix2x2< double > &cov2, HomgPoint3D &p, Matrix3x3< double > &cov, const int num)
returns an approximation to the 3D point p with uncertainty cov as derived from the 2D points p1 and p2 with uncertainties cov1 and cov2
int | GetCovariance2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL)
Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.
int | GetCovarianceAnalytic (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA)
Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
Vector3< double > | Intersect (Vector3< double > &a1, Vector3< double > &a2, Vector3< double > &b1, Vector3< double > &b2)
analytic correct intersection of two lines, point returned has minimum distance to both lines.
int | Intersect (Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res, double &dist)
analytic correct intersection of two lines, point returned has minimum distance to both lines, distance between lines is returned in dist.
int | Intersect (Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res)
analytic correct intersection of two lines, point returned has minimum distance to both lines.
int | Optimal (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d)
method from Hartley Zisserman chapter 12.5 pp 315 first uses CorrectCorrespondences() and then calls TriangulateLinear()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | Triangulate (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
Triangulation for metric PMatrices (using C and Hinf).
int | Triangulate2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, Matrix3x3< double > &CovMatrix, double &dist, double &angle, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL)
as above, but also determines the covariance matrix
int | Triangulate2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, double &dist, double &angle)
does not use BackprojectPseudoInverse but get NormRayWorldCoo
int | TriangulateLinear (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d)
Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios.
Triangulation ()
~Triangulation ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | _UpdateCovWeights (const double &TriangDeltaPixels=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA)
called by constructor to set up neighbourhood weights for covariance computation

Protected Attributes

double | _dTriangDeltaPixels
value to go up/down/left/right for "manual" covariance computation
double | _dTriangSigmaPixels
long int | _liDebugLevel
Matrix3x3< double > | cov_weights_
neighbourhood weights for covariance computation

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Class for triangulation of 3Dpoints from 2D matches.

Covariance matrix (refering to an uncertainty ellipsoid) is computed also

all functions so far only for 2 images (no trifocal).

Author:
: Felix Woelk and Jan Frahm

Definition at line 69 of file Triangulation.hh.

Constructor & Destructor Documentation

Triangulation::Triangulation ( )

Definition at line 37 of file Triangulation.cpp.

References _UpdateCovWeights().

Triangulation::~Triangulation ( )

Definition at line 42 of file Triangulation.cpp.

Member Function Documentation

void Triangulation::_UpdateCovWeights | ( | const double & | TriangDeltaPixels = TRIANGULATION_DEFAULT_DELTAPIXEL,
 |  | const double & | sigma = TRIANGULATION_DEFAULT_SIGMA
 | ) | [protected]

called by constructor to set up neighbourhood weights for covariance computation

Definition at line 458 of file Triangulation.cpp.

References _dTriangDeltaPixels, _dTriangSigmaPixels, BIASCDOUT, cov_weights_, and D_TRIANG_COVWEIGHT.

Referenced by GetCovariance2D(), and Triangulation().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int Triangulation::CorrectCorrespondences | ( | const FMatrix & | F,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | bool | refine = false
 | ) |

optimize 2d correspondences regarding F for triangulation

In projective reconstruction you have to optimize the correspondences regarding epipolar geometry for the 3d point to be projectively optimal before you use TriangulateLinear() See section Hartley/Zisserman "Multiple View Geometry", section "optimal triangulation", section 12.5, pp.315

if refine==true, a non linear optimization for the real roots of the 6 degree polynomial is done using the powell algorithm from minpack

Hereby F maps point from image 1 into lines in image 2, i.e. F_{12}.

Author:
woelk 08/2004 heavily tested (ExampleTriangulateOptimal)

Definition at line 100 of file Triangulation.cpp.

References a, BIAS::Debug::AddDebugLevel(), BIASABORT, BIASCDOUT, BIASERR, cd, BIAS::PolynomialSolve::CheckCoefficients(), D_PS_GSL, D_TR_OPT, D_TR_OPT_F, D_TR_OPT_TRANSF, BIAS::Debug::DebugLevelIsSet(), BIAS::FMatrix::GetEpipoles(), BIAS::HomgPoint2D::Homogenize(), BIAS::PolynomialSolve::NonLinearRefine(), BIAS::PolynomialSolve::Numeric(), R, r, BIAS::Matrix3x3< T >::SetIdentity(), T, BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix3x3< T >::TransposedMult().

Referenced by Optimal().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int Triangulation::GetCovariance | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | const HomgPoint2D & | p1,
 |  | const Matrix2x2< double > & | cov1,
 |  | const HomgPoint2D & | p2,
 |  | const Matrix2x2< double > & | cov2,
 |  | HomgPoint3D & | p,
 |  | Matrix3x3< double > & | cov,
 |  | const int | num
 | ) |

returns an approximation to the 3D point p with uncertainty cov as derived from the 2D points p1 and p2 with uncertainties cov1 and cov2

Generates randomly num 2D coordinates distributed according to cov1 centered around p1 and num 2D coordinates distributed according to cov2 centered around p2. For every possible combination of these two 2D point clouds a 3D point is triangulated resulting in a 3D point cloud of maximum num*num points. The mean and the covariance of this 3D point cloud is calculated and returned in p (mean) and cov. The 3D point p, which is the mean of the point cloud, is generally not* aequivalent to the 3D point resulting from simple triangulation using p1 and p2.

The 2D points p1 and p2 must be homogenized and are not allowed to be at infinity.

!! untested !!

Returns:
the number of points in 3D cloud. The covariance of the 3D approximation cov is only valid if *more* than 1 point was triangulated
Author:
woelk 07/2005

Definition at line 738 of file Triangulation.cpp.

References BIASASSERT, BIASERR, BIAS::Random::GetNormalDistributed(), BIAS::HomgPoint2D::IsAtInfinity(), BIAS::HomgPoint2D::IsHomogenized(), and res.

int Triangulation::GetCovariance2D | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3D,
 |  | Matrix3x3< double > & | covariance,
 |  | const double & | triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL
 | ) |

Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.

It is calculated by triangulation of all neighboring pixels within +- triangdeltapixel of p1 and p2 and taking the variance with 'point'. Uses Triangulate2D. returns 0 in case of success returns -4 in case of error (too little triangulations succeeded)

Author:
Daniel Grest, Oct 2002 tested

Definition at line 496 of file Triangulation.cpp.

References _dTriangDeltaPixels, _UpdateCovWeights(), BIASCDOUT, BIASFLUSHDOUT, cov_weights_, D_TR_INF, BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint2D::Homogenize(), res, BIAS::HomgPoint2D::Set(), BIAS::Matrix< T >::SetZero(), and Triangulate2D().

Referenced by Triangulate2D().

int Triangulation::GetCovarianceAnalytic | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3D,
 |  | Matrix3x3< double > & | covariance,
 |  | const double & | triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL,
 |  | const double & | sigma = TRIANGULATION_DEFAULT_SIGMA
 | ) |

Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.

It is calculated by triangulation of all neighboring pixels within +- triangdeltapixel of p1 and p2 and taking the variance with 'point'. Uses Triangulate.

Author:
Daniel Grest, Oct 2002
Parameters:
P1 | PMatrix for image one
P1 | PMatrix for image two
p1 | Homogenized(!) point in image one
p2 | Homogenized(!) point in image two
triangdeltapixel | offset in all directions and both images tested
Returns:
0 in case of success, <0 otherwise

Definition at line 598 of file Triangulation.cpp.

References BIASABORT, BIASERR, and BIAS::HomgPoint2D::IsHomogenized().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

Vector3< double > Triangulation::Intersect | ( | Vector3< double > & | a1,
 |  | Vector3< double > & | a2,
 |  | Vector3< double > & | b1,
 |  | Vector3< double > & | b2
 | ) |

analytic correct intersection of two lines, point returned has minimum distance to both lines.

Line A is described by points a1,a2 and line B by b1,b2 Refer to Kanatani Statistical Opt. for Geometric Comp. ,page108

Author:
grest, Sept. 2003

Definition at line 722 of file Triangulation.cpp.

References BIASERR, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and res.

int Triangulation::Intersect | ( | Vector3< double > & | pA,
 |  | Vector3< double > & | dirA,
 |  | Vector3< double > & | pB,
 |  | Vector3< double > & | dirB,
 |  | Vector3< double > & | res,
 |  | double & | dist
 | ) |

analytic correct intersection of two lines, point returned has minimum distance to both lines, distance between lines is returned in dist.

Lines have parametric description by point and direction. IMPORTANT: directions MUST BE normalized!!

Returns:
0 in case of no errror, <0 if errors, 1 if intersection point lies not in direction of dirB
Attention:
sanity check regarding dirA is not done !
Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108
Author:
grest, Sept. 2003

Definition at line 931 of file Triangulation.cpp.

References BIASERR, BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::ScalarProduct().

int Triangulation::Intersect | ( | Vector3< double > & | pA,
 |  | Vector3< double > & | dirA,
 |  | Vector3< double > & | pB,
 |  | Vector3< double > & | dirB,
 |  | Vector3< double > & | res
 | ) |

analytic correct intersection of two lines, point returned has minimum distance to both lines.

Lines have parametric description by point and direction. IMPORTANT: directions MUST BE normalized!!

Returns:
0 in case of no errror, <0 if errors, 1 if intersection point lies not in direction of dirB, 2 if intersection point lies not in direction of dirA
Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108
Author:
grest, Sept. 2003

Definition at line 870 of file Triangulation.cpp.

References BIASERR, BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::ScalarProduct().

Referenced by main(), and Triangulate().

int Triangulation::Optimal | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3d
 | ) |

method from Hartley Zisserman chapter 12.5 pp 315 first uses CorrectCorrespondences() and then calls TriangulateLinear()

Author:
woelk 08/2004

Definition at line 45 of file Triangulation.cpp.

References BIASCDOUT, BIASERR, CorrectCorrespondences(), D_TR_OPT, r, res, BIAS::Vector3< T >::ScalarProduct(), and TriangulateLinear().

Referenced by main().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int Triangulation::Triangulate | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | const HomgPoint2D & | p1,
 |  | const HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3d
 | ) |

Triangulation for metric PMatrices (using C and Hinf).

Attention:
Decomposition of PMatrix is used !
Parameters:
point3d (output) guaranteed to be homogenized, inf causes error
Returns:
0 on success
<0 on error
>0 if point is behind a camera tested, Daniel Grest

Definition at line 332 of file Triangulation.cpp.

References BIAS::PMatrix::GetHinf(), BIAS::PMatrix::GetNullVector(), BIAS::HomgPoint3D::Homogenize(), Intersect(), BIAS::Vector3< T >::NormL2(), res, and BIAS::Vector3< T >::Set().

Referenced by BIAS::EMatrix::GetRotationTranslation(), and main().

int Triangulation::Triangulate2D | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3d,
 |  | Matrix3x3< double > & | CovMatrix,
 |  | double & | dist,
 |  | double & | angle,
 |  | const double & | triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL
 | ) |

as above, but also determines the covariance matrix

Returns:
-4 if GetCovariance2D failed
Author:
Woelk 11 2002

Definition at line 444 of file Triangulation.cpp.

References GetCovariance2D(), res, and Triangulate2D().

int Triangulation::Triangulate2D | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3d,
 |  | double & | dist,
 |  | double & | angle
 | ) |

does not use BackprojectPseudoInverse but get NormRayWorldCoo

Also calculates the minimal distance between the two rays (dist) and the cos of the angle between the two rays (angle) (scalarproduct) input: P1, P2, p1, p2 output: point3d, dist

Returns:
0 on success -1 if interpolated point lies behind the cameras -2 if lines do not intersect -3 if camera center not extractable from P (faster)
Author:
Woelk 11 2002

Definition at line 370 of file Triangulation.cpp.

References BIASCDOUT, BIASDOUT, BIASERR, BIASFLUSHDOUT, D_TR_ARG, D_TR_INF, D_TR_POS, D_TR_TR, BIAS::PMatrix::GetC(), BIAS::PMatrix::GetNormRayWorldCoo(), PARALLEL_THRESHOLD, res, BIAS::Vector3< T >::ScalarProduct(), BIAS::HomgPoint3D::Set(), and T.

Referenced by GetCovariance2D(), main(), and Triangulate2D().

int Triangulation::TriangulateLinear | ( | PMatrix & | P1,
 |  | PMatrix & | P2,
 |  | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint3D & | point3d
 | ) |

Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios.

Homogeneous DLT algorithm using SVD, see Hartley/Zisserman: "Multiple View Geometry", p.297 For projective reconstructions first optimize 2d points using CorrectCorrespondences() regarding epipolar geometry

Attention:
NOT YET TESTED AT ALL, since CorrectCorrespondences missing
Author:
koeser, 10/2003

Definition at line 63 of file Triangulation.cpp.

References BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetVT(), BIAS::HomgPoint3D::Homogenize(), and BIAS::Matrix< T >::NormalizeRows().

Referenced by Optimal().

Member Data Documentation

double BIAS::Triangulation::_dTriangDeltaPixels [protected]

value to go up/down/left/right for "manual" covariance computation

Definition at line 278 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), and GetCovariance2D().

double BIAS::Triangulation::_dTriangSigmaPixels [protected]

Definition at line 279 of file Triangulation.hh.

Referenced by _UpdateCovWeights().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

Matrix3x3<double> BIAS::Triangulation::cov_weights_ [protected]

neighbourhood weights for covariance computation

Definition at line 276 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), and GetCovariance2D().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

The documentation for this class was generated from the following files:
  • Geometry/Triangulation.hh
  • Geometry/Triangulation.cpp
Generated on Wed Jun 21 19:11:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrifocalTensor Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrifocalTensor

BIAS::TrifocalTensor Class Reference

#include <Geometry/TrifocalTensor.hh>

Inheritance diagram for BIAS::TrifocalTensor:

[legend]
Collaboration diagram for BIAS::TrifocalTensor:

[legend]
List of all members.

Public Member Functions

void | CheckPointCorr (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p3, Matrix3x3< double > &res)
void | Compose (RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C2, HomgPoint3D &C3)
void | Compose (RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C2, Vector3< double > &C3)
composition for R1=I and C1=0
void | Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C1, HomgPoint3D &C2, HomgPoint3D &C3)
void | Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C1, Vector3< double > &C2, Vector3< double > &C3)
composition for "normalized" (with K^-1) image points
void | Compose (BIAS::PMatrix &P2, BIAS::PMatrix &P3)
Composes the trifocal tensor from two 3x4 camera matrices, assuming that P1=[I | 0].
void | Compose (BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3)
Composes the trifocal tensor from three 3x4 camera matrices.
void Destroy ()
frees internal data
void Dump ()
BIAS::Matrix4x4< PMATRIX_TYPE > | GetCanonicalH () const
const TRIFOCALTENSOR_TYPE * | GetData () const
TRIFOCALTENSOR_TYPE * | GetData ()
TRIFOCALTENSOR_TYPE *** | GetDataArray ()
int | GetDim1 () const
int | GetDim2 () const
int | GetDim3 () const
void | GetEpipolarLines (Vector3< TRIFOCALTENSOR_TYPE > &Point1, HomgLine2D &Line2, HomgLine2D &Line3)
BIAS::HomgPoint2D | GetEpipole21 (bool ForceReCalc=false)
BIAS::HomgPoint2D | GetEpipole31 (bool ForceReCalc=false)
BIAS::FMatrix | GetFMatrix21 (bool ForceReCalc=false)
BIAS::FMatrix | GetFMatrix31 (bool ForceReCalc=false)
TRIFOCALTENSOR_TYPE | GetLength () const
void | GetMatrices (Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) const
BIAS::PMatrix | GetPMatrix2 (bool ForceReCalc=false)
BIAS::PMatrix | GetPMatrix3 (bool ForceReCalc=false)
void Init ()
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
computes the contraction of index 1 from left with contravariant vector , i.e.
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
void | newsize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
void | NewSize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
allocates internal data
TRIFOCALTENSOR_TYPE & | operator() (unsigned int i, unsigned int j, unsigned int k)
direct data access through () operator: T_i^{jk}
TrifocalTensor & | operator= (const TrifocalTensor &t)
bool | operator== (const Tensor3D< TRIFOCALTENSOR_TYPE > &t)
checks if all tensor entries are equal (up-to-scale-equality is not checked)
void | postmultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{pjk} M_{pi}.
void | postmultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{ipk} M_{pj}.
void | postmultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{ijp} M_{pk}.
void | premultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{ip} T_{pjk}
void | premultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{jp} T_{ipk}
void | premultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{kp} T_{ijp}
void | Scale (TRIFOCALTENSOR_TYPEfactor)
void | SetFromMatrices (const Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T3)
void | SetFromVector (const BIAS::Vector< TRIFOCALTENSOR_TYPE > &v)
set the tensor by the rows of the vector.
void SetZero ()
set all elements to zero
Tensor3D (const Tensor3D< TRIFOCALTENSOR_TYPE > &t)
Tensor3D (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
Tensor3D ()
Tensor3D3x3x3 ()
BIAS::Vector< TRIFOCALTENSOR_TYPE > | ToVector ()
HomgPoint2D | TransferView3 (Vector3< TRIFOCALTENSOR_TYPE > &x1, Vector3< TRIFOCALTENSOR_TYPE > &x2)
TrifocalTensor (BIAS::PMatrix &P2, BIAS::PMatrix &P3)
TrifocalTensor (BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3)
TrifocalTensor ()
~TrifocalTensor ()

Protected Member Functions

void ComputeEpipoles ()

Protected Attributes

TRIFOCALTENSOR_TYPE * | _Data
TRIFOCALTENSOR_TYPE *** | _DataArray
int | _Dim1
int | _Dim2
int | _Dim3
int | _Size
BIAS::Matrix4x4< PMATRIX_TYPE > | CanH_
BIAS::HomgPoint2D * Epipole21_
BIAS::HomgPoint2D * Epipole31_

Detailed Description

Definition at line 37 of file TrifocalTensor.hh.

Constructor & Destructor Documentation

TrifocalTensor::TrifocalTensor ( )

Definition at line 9 of file TrifocalTensor.cpp.

References Init().

TrifocalTensor::~TrifocalTensor ( )

Definition at line 15 of file TrifocalTensor.cpp.

TrifocalTensor::TrifocalTensor | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2,
 |  | BIAS::PMatrix & | P3
 | ) |

Definition at line 20 of file TrifocalTensor.cpp.

References Compose(), and Init().

TrifocalTensor::TrifocalTensor | ( | BIAS::PMatrix & | P2,
 |  | BIAS::PMatrix & | P3
 | ) |

Definition at line 28 of file TrifocalTensor.cpp.

References Compose(), and Init().

Member Function Documentation

void TrifocalTensorBase::CheckPointCorr | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p3,
 |  | Matrix3x3< double > & | res
 | ) | [inherited]

Definition at line 122 of file TrifocalTensorBase.cpp.

References BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1(), BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | HomgPoint3D & | C2,
 |  | HomgPoint3D & | C3
 | ) | [inherited]

Definition at line 112 of file TrifocalTensorBase.cpp.

References BIAS::TrifocalTensorBase::Compose(), and BIAS::HomgPoint3D::GetEuclidian().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | Vector3< double > & | C2,
 |  | Vector3< double > & | C3
 | ) | [inherited]

composition for R1=I and C1=0

Definition at line 80 of file TrifocalTensorBase.cpp.

References BIAS::Matrix3x3< T >::GetRow(), M, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::OuterProduct(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::SetFromMatrices(), and BIAS::Matrix3x3< T >::Transpose().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R1,
 |  | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | HomgPoint3D & | C1,
 |  | HomgPoint3D & | C2,
 |  | HomgPoint3D & | C3
 | ) | [inherited]

Definition at line 70 of file TrifocalTensorBase.cpp.

References BIAS::TrifocalTensorBase::Compose(), and BIAS::HomgPoint3D::GetEuclidian().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R1,
 |  | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | Vector3< double > & | C1,
 |  | Vector3< double > & | C2,
 |  | Vector3< double > & | C3
 | ) | [inherited]

composition for "normalized" (with K^-1) image points

Definition at line 54 of file TrifocalTensorBase.cpp.

References BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::Transpose().

Referenced by BIAS::TrifocalTensorBase::Compose().

void TrifocalTensor::Compose | ( | BIAS::PMatrix & | P2,
 |  | BIAS::PMatrix & | P3
 | ) |

Composes the trifocal tensor from two 3x4 camera matrices, assuming that P1=[I | 0].

Author:
Matthias Dunda

Definition at line 54 of file TrifocalTensor.cpp.

References a, BIAS::Matrix< T >::GetCol(), BIAS::Vector3< T >::OuterProduct(), and T.

void TrifocalTensor::Compose | ( | BIAS::PMatrix & | P1,
 |  | BIAS::PMatrix & | P2,
 |  | BIAS::PMatrix & | P3
 | ) |

Composes the trifocal tensor from three 3x4 camera matrices.

Author:
Matthias Dunda

Definition at line 42 of file TrifocalTensor.cpp.

References CanH_, BIAS::PMatrix::GetCanonicalH(), and BIAS::Matrix< T >::IsIdentity().

Referenced by TrifocalTensor().

void TrifocalTensor::ComputeEpipoles ( ) [protected]

Definition at line 70 of file TrifocalTensor.cpp.

References Epipole21_, Epipole31_, BIAS::SVD::GetLeftNullvector(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices(), and BIAS::SVD::GetNullvector().

Referenced by GetEpipole21(), and GetEpipole31().

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Destroy ( ) [inherited]

frees internal data

void TrifocalTensorBase::Dump ( ) [inherited]

Definition at line 43 of file TrifocalTensorBase.cpp.

References BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices().

BIAS::Matrix4x4<PMATRIX_TYPE> BIAS::TrifocalTensor::GetCanonicalH ( ) const [inline]

Returns:
the canonical H matrix that is computed when composing from three camera-matrices with P1 != [I|0]
Author:
mdunda 01 2004

Definition at line 58 of file TrifocalTensor.hh.

const TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( ) const [inline, inherited]

Definition at line 73 of file Tensor3D.hh.

References T.

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( ) [inline, inherited]

Definition at line 67 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDataArray ( ) [inline, inherited]

Definition at line 70 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim1 ( ) const [inherited]

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim2 ( ) const [inherited]

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim3 ( ) const [inherited]

void TrifocalTensor::GetEpipolarLines | ( | Vector3< TRIFOCALTENSOR_TYPE > & | Point1,
 |  | HomgLine2D & | Line2,
 |  | HomgLine2D & | Line3
 | ) |

Definition at line 245 of file TrifocalTensor.cpp.

References BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetNullvector(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1(), and M.

HomgPoint2D TrifocalTensor::GetEpipole21 ( bool ForceReCalc = false )

Returns:
epipole in the second view according to the first
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 115 of file TrifocalTensor.cpp.

References ComputeEpipoles(), and Epipole21_.

Referenced by GetFMatrix21(), GetFMatrix31(), GetPMatrix2(), and GetPMatrix3().

HomgPoint2D TrifocalTensor::GetEpipole31 ( bool ForceReCalc = false )

Returns:
epipole in the third view according to the first
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 122 of file TrifocalTensor.cpp.

References ComputeEpipoles(), and Epipole31_.

Referenced by GetFMatrix21(), GetFMatrix31(), GetPMatrix2(), and GetPMatrix3().

FMatrix TrifocalTensor::GetFMatrix21 ( bool ForceReCalc = false )

Returns:
the F-matrix between the first and the second view
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 128 of file TrifocalTensor.cpp.

References BIAS::Vector3< T >::CrossProduct(), GetEpipole21(), GetEpipole31(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices(), and BIAS::Matrix3x3< T >::Mult().

Referenced by TransferView3().

FMatrix TrifocalTensor::GetFMatrix31 ( bool ForceReCalc = false )

Returns:
the F-matrix between the first and the third view
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 155 of file TrifocalTensor.cpp.

References BIAS::Vector3< T >::CrossProduct(), GetEpipole21(), GetEpipole31(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices(), and BIAS::Matrix3x3< T >::Mult().

TRIFOCALTENSOR_TYPE BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetLength ( ) const [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices | ( | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T1,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T2,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T3
 | ) | const [inline, inherited]

Referenced by ComputeEpipoles(), BIAS::TrifocalTensorBase::Dump(), GetFMatrix21(), GetFMatrix31(), GetPMatrix2(), and GetPMatrix3().

PMatrix TrifocalTensor::GetPMatrix2 ( bool ForceReCalc = false )

Returns:
the P-matrix for the second view (assuming P1=[I|0])
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 182 of file TrifocalTensor.cpp.

References GetEpipole21(), GetEpipole31(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices(), BIAS::Matrix3x3< T >::Mult(), and BIAS::Vector3< T >::Normalize().

PMatrix TrifocalTensor::GetPMatrix3 ( bool ForceReCalc = false )

Returns:
the P-matrix for the third view (assuming P1=[I|0])
Parameters:
ForceReCalc forces a recalculation although a value is cached
Author:
Matthias Dunda

Definition at line 207 of file TrifocalTensor.cpp.

References GetEpipole21(), GetEpipole31(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices(), M, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< T >::Transpose().

void TrifocalTensor::Init ( )

Definition at line 35 of file TrifocalTensor.cpp.

References Epipole21_, and Epipole31_.

Referenced by TrifocalTensor().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 56 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

computes the contraction of index 1 from left with contravariant vector , i.e.

res[k][j] = sum_i v[i] * (*this)[k][j]

Author:
woelk 07/2004

Referenced by BIAS::TrifocalTensorBase::CheckPointCorr(), and GetEpipolarLines().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 63 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

Referenced by TransferView3().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 70 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::newsize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::NewSize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

allocates internal data

Reimplemented from BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >.

TRIFOCALTENSOR_TYPE & BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator() | ( | unsigned int | i,
 |  | unsigned int | j,
 |  | unsigned int | k
 | ) | [inline, inherited]

direct data access through () operator: T_i^{jk}

Author:
mdunda 07 2004

Definition at line 91 of file Tensor3D.hh.

References BIASASSERT.

TrifocalTensor & TrifocalTensor::operator= ( const TrifocalTensor & t )

Definition at line 285 of file TrifocalTensor.cpp.

References BIAS::TrifocalTensorBase::operator=().

bool BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator== ( const Tensor3D< TRIFOCALTENSOR_TYPE > & t ) [inherited]

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author:
mdunda 07 2004

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply1 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{pjk} M_{pi}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply2 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{ipk} M_{pj}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply3 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{ijp} M_{pk}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply1 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{ip} T_{pjk}

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply2 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{jp} T_{ipk}

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply3 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{kp} T_{ijp}

Author:
mdunda

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Scale ( TRIFOCALTENSOR_TYPE factor ) [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::SetFromMatrices | ( | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T1,
 |  | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T2,
 |  | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T3
 | ) | [inline, inherited]

implementation

Referenced by BIAS::TrifocalTensorBase::Compose().

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetFromVector ( const BIAS::Vector< TRIFOCALTENSOR_TYPE > & v ) [inherited]

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author:
mdunda

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetZero ( ) [inherited]

set all elements to zero

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D ( const Tensor3D< TRIFOCALTENSOR_TYPE > & t ) [inherited]

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D ( ) [inherited]

BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::Tensor3D3x3x3 ( ) [inherited]

BIAS::Vector<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::ToVector ( ) [inherited]

Returns:
all tensor elements in a vector
Author:
mdunda

HomgPoint2D TrifocalTensor::TransferView3 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | x1,
 |  | Vector3< TRIFOCALTENSOR_TYPE > & | x2
 | ) |

Returns:
the transferred point in the third view given points in the first and second view
Author:
mdunda

Definition at line 258 of file TrifocalTensor.cpp.

References GetFMatrix21(), BIAS::HomgLine2D::GetPerpendicularLine(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2(), and BIAS::Vector3< T >::Normalize().

Member Data Documentation

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Data [protected, inherited]

Definition at line 102 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_DataArray [protected, inherited]

Definition at line 106 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim1 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim2 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim3 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Size [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

BIAS::Matrix4x4<PMATRIX_TYPE> BIAS::TrifocalTensor::CanH_ [protected]

Definition at line 105 of file TrifocalTensor.hh.

Referenced by Compose().

BIAS::HomgPoint2D* BIAS::TrifocalTensor::Epipole21_ [protected]

Definition at line 106 of file TrifocalTensor.hh.

Referenced by ComputeEpipoles(), GetEpipole21(), and Init().

BIAS::HomgPoint2D* BIAS::TrifocalTensor::Epipole31_ [protected]

Definition at line 107 of file TrifocalTensor.hh.

Referenced by ComputeEpipoles(), GetEpipole31(), and Init().

The documentation for this class was generated from the following files:
  • Geometry/TrifocalTensor.hh
  • Geometry/TrifocalTensor.cpp
Generated on Wed Jun 21 19:11:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::TrifocalTensorBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::TrifocalTensorBase

BIAS::TrifocalTensorBase Class Reference

#include <Base/Geometry/TrifocalTensorBase.hh>

Inheritance diagram for BIAS::TrifocalTensorBase:

[legend]
Collaboration diagram for BIAS::TrifocalTensorBase:

[legend]
List of all members.

Public Member Functions

void | CheckPointCorr (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p3, Matrix3x3< double > &res)
void | Compose (RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C2, HomgPoint3D &C3)
void | Compose (RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C2, Vector3< double > &C3)
composition for R1=I and C1=0
void | Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C1, HomgPoint3D &C2, HomgPoint3D &C3)
void | Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C1, Vector3< double > &C2, Vector3< double > &C3)
composition for "normalized" (with K^-1) image points
void Destroy ()
frees internal data
void Dump ()
const TRIFOCALTENSOR_TYPE * | GetData () const
TRIFOCALTENSOR_TYPE * | GetData ()
TRIFOCALTENSOR_TYPE *** | GetDataArray ()
int | GetDim1 () const
int | GetDim2 () const
int | GetDim3 () const
TRIFOCALTENSOR_TYPE | GetLength () const
void | GetMatrices (Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) const
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
computes the contraction of index 1 from left with contravariant vector , i.e.
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
Matrix3x3< TRIFOCALTENSOR_TYPE > | LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v)
void | LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
void | newsize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
void | NewSize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
allocates internal data
TRIFOCALTENSOR_TYPE & | operator() (unsigned int i, unsigned int j, unsigned int k)
direct data access through () operator: T_i^{jk}
TrifocalTensorBase & | operator= (const TrifocalTensorBase &t)
bool | operator== (const Tensor3D< TRIFOCALTENSOR_TYPE > &t)
checks if all tensor entries are equal (up-to-scale-equality is not checked)
void | postmultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{pjk} M_{pi}.
void | postmultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{ipk} M_{pj}.
void | postmultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
Compute S_{ijk} = T_{ijp} M_{pk}.
void | premultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{ip} T_{pjk}
void | premultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{jp} T_{ipk}
void | premultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
compute S_{ijk} = M_{kp} T_{ijp}
void | Scale (TRIFOCALTENSOR_TYPEfactor)
void | SetFromMatrices (const Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T3)
void | SetFromVector (const BIAS::Vector< TRIFOCALTENSOR_TYPE > &v)
set the tensor by the rows of the vector.
void SetZero ()
set all elements to zero
Tensor3D (const Tensor3D< TRIFOCALTENSOR_TYPE > &t)
Tensor3D (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
Tensor3D ()
Tensor3D3x3x3 ()
BIAS::Vector< TRIFOCALTENSOR_TYPE > | ToVector ()
TrifocalTensorBase (const TrifocalTensorBase &t)
TrifocalTensorBase ()
~TrifocalTensorBase ()

Protected Attributes

TRIFOCALTENSOR_TYPE * | _Data
TRIFOCALTENSOR_TYPE *** | _DataArray
int | _Dim1
int | _Dim2
int | _Dim3
int | _Size

Detailed Description

Definition at line 42 of file TrifocalTensorBase.hh.

Constructor & Destructor Documentation

TrifocalTensorBase::TrifocalTensorBase ( )

Definition at line 31 of file TrifocalTensorBase.cpp.

TrifocalTensorBase::TrifocalTensorBase ( const TrifocalTensorBase & t )

Definition at line 35 of file TrifocalTensorBase.cpp.

TrifocalTensorBase::~TrifocalTensorBase ( )

Definition at line 39 of file TrifocalTensorBase.cpp.

Member Function Documentation

void TrifocalTensorBase::CheckPointCorr | ( | HomgPoint2D & | p1,
 |  | HomgPoint2D & | p2,
 |  | HomgPoint2D & | p3,
 |  | Matrix3x3< double > & | res
 | ) |

Definition at line 122 of file TrifocalTensorBase.cpp.

References BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1(), BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< T >::SetAsCrossProductMatrix().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | HomgPoint3D & | C2,
 |  | HomgPoint3D & | C3
 | ) |

Definition at line 112 of file TrifocalTensorBase.cpp.

References Compose(), and BIAS::HomgPoint3D::GetEuclidian().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | Vector3< double > & | C2,
 |  | Vector3< double > & | C3
 | ) |

composition for R1=I and C1=0

Definition at line 80 of file TrifocalTensorBase.cpp.

References BIAS::Matrix3x3< T >::GetRow(), M, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::OuterProduct(), BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::SetFromMatrices(), and BIAS::Matrix3x3< T >::Transpose().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R1,
 |  | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | HomgPoint3D & | C1,
 |  | HomgPoint3D & | C2,
 |  | HomgPoint3D & | C3
 | ) |

Definition at line 70 of file TrifocalTensorBase.cpp.

References Compose(), and BIAS::HomgPoint3D::GetEuclidian().

void TrifocalTensorBase::Compose | ( | RMatrixBase & | R1,
 |  | RMatrixBase & | R2,
 |  | RMatrixBase & | R3,
 |  | Vector3< double > & | C1,
 |  | Vector3< double > & | C2,
 |  | Vector3< double > & | C3
 | ) |

composition for "normalized" (with K^-1) image points

Definition at line 54 of file TrifocalTensorBase.cpp.

References BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::Transpose().

Referenced by Compose().

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Destroy ( ) [inherited]

frees internal data

void TrifocalTensorBase::Dump ( )

Definition at line 43 of file TrifocalTensorBase.cpp.

References BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices().

const TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( ) const [inline, inherited]

Definition at line 73 of file Tensor3D.hh.

References T.

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( ) [inline, inherited]

Definition at line 67 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDataArray ( ) [inline, inherited]

Definition at line 70 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim1 ( ) const [inherited]

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim2 ( ) const [inherited]

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim3 ( ) const [inherited]

TRIFOCALTENSOR_TYPE BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetLength ( ) const [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices | ( | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T1,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T2,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | T3
 | ) | const [inline, inherited]

Referenced by BIAS::TrifocalTensor::ComputeEpipoles(), Dump(), BIAS::TrifocalTensor::GetFMatrix21(), BIAS::TrifocalTensor::GetFMatrix31(), BIAS::TrifocalTensor::GetPMatrix2(), and BIAS::TrifocalTensor::GetPMatrix3().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 56 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

computes the contraction of index 1 from left with contravariant vector , i.e.

res[k][j] = sum_i v[i] * (*this)[k][j]

Author:
woelk 07/2004

Referenced by CheckPointCorr(), and BIAS::TrifocalTensor::GetEpipolarLines().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 63 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

Referenced by BIAS::TrifocalTensor::TransferView3().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 ( Vector3< TRIFOCALTENSOR_TYPE > & v ) [inline, inherited]

Definition at line 70 of file Tensor3D3x3x3.hh.

References M.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 | ( | Vector3< TRIFOCALTENSOR_TYPE > & | v,
 |  | Matrix3x3< TRIFOCALTENSOR_TYPE > & | res
 | ) | [inline, inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::newsize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::NewSize | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

allocates internal data

Reimplemented from BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >.

TRIFOCALTENSOR_TYPE & BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator() | ( | unsigned int | i,
 |  | unsigned int | j,
 |  | unsigned int | k
 | ) | [inline, inherited]

direct data access through () operator: T_i^{jk}

Author:
mdunda 07 2004

Definition at line 91 of file Tensor3D.hh.

References BIASASSERT.

TrifocalTensorBase & TrifocalTensorBase::operator= ( const TrifocalTensorBase & t )

Definition at line 148 of file TrifocalTensorBase.cpp.

Referenced by BIAS::TrifocalTensor::operator=().

bool BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator== ( const Tensor3D< TRIFOCALTENSOR_TYPE > & t ) [inherited]

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author:
mdunda 07 2004

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply1 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{pjk} M_{pi}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply2 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{ipk} M_{pj}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply3 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

Compute S_{ijk} = T_{ijp} M_{pk}.

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply1 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{ip} T_{pjk}

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply2 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{jp} T_{ipk}

Author:
mdunda

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply3 | ( | const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > & | M,
 |  | Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > & | result
 | ) | const [inherited]

compute S_{ijk} = M_{kp} T_{ijp}

Author:
mdunda

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Scale ( TRIFOCALTENSOR_TYPE factor ) [inherited]

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::SetFromMatrices | ( | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T1,
 |  | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T2,
 |  | const Matrix3x3< TRIFOCALTENSOR_TYPE > & | T3
 | ) | [inline, inherited]

implementation

Referenced by Compose().

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetFromVector ( const BIAS::Vector< TRIFOCALTENSOR_TYPE > & v ) [inherited]

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author:
mdunda

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetZero ( ) [inherited]

set all elements to zero

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D ( const Tensor3D< TRIFOCALTENSOR_TYPE > & t ) [inherited]

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D | ( | const int | i,
 |  | const int | j,
 |  | const int | k,
 |  | const TRIFOCALTENSOR_TYPE & | def = (T)0.0
 | ) | [inherited]

BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Tensor3D ( ) [inherited]

BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::Tensor3D3x3x3 ( ) [inherited]

BIAS::Vector<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::ToVector ( ) [inherited]

Returns:
all tensor elements in a vector
Author:
mdunda

Member Data Documentation

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Data [protected, inherited]

Definition at line 102 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_DataArray [protected, inherited]

Definition at line 106 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim1 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim2 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim3 [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Size [protected, inherited]

Definition at line 107 of file Tensor3D.hh.

The documentation for this class was generated from the following files:
  • Base/Geometry/TrifocalTensorBase.hh
  • Base/Geometry/TrifocalTensorBase.cpp
Generated on Wed Jun 21 19:11:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::UndistortionMapping< InputStorageType, OutputStorageType > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::UndistortionMapping

BIAS::UndistortionMapping< InputStorageType, OutputStorageType > Class Template Reference
[Image Filters and Image Transformations]

Maps image src to image sink with spherical or lens distortion. More...

#include <Image/UndistortionMapping.hh>

Inheritance diagram for BIAS::UndistortionMapping< InputStorageType, OutputStorageType >:

[legend]
Collaboration diagram for BIAS::UndistortionMapping< InputStorageType, OutputStorageType >:

[legend]
List of all members.

Public Member Functions

template<>
void | ClipValue_ (const double &value, float &newvalue)
int | DistortPerspImage (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, KMatrix &K)
int | DistortPerspImage (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Using the Matlab camera calibration toolbox parameters for an undistortion of a distorted camera image.
virtual int | GetBoundingBox (unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry)
calculates the bounding box in sink image, where to do the backward mapping.
int | MapPerspToSphere (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const KMatrix Ksrc, const double &CenterX, const double &CenterY, const int projectionType)
Performs a projection of a perspective or other projection type image to a sphere.
int | ProjectSphereImage (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const int &SizeX, const int &SizeY, const double &FovX, const double &FovY, const double &CenterX, const double &CenterY, const int projectionType, const double &zoomFactor, KMatrix &KMatDst)
Performs a projection of a spherical image given a projection-type and a zoom factor.
void | SetCameraParam (const CameraParam &cp)
set your CameraParams for mapping
void | SetPyramidSize (const int newsize)
sets pyramid size to pyramid and updates if neccessary
UndistortionMapping ()
int | UndistortPerspImage (const Image< InputStorageType > &src, Image< OutputStorageType > &dst, KMatrix &K)
int | UndistortPerspImage (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Using the Matlab camera calibration toolbox parameters for a distortion of an already undistorted image.
virtual void | UpdatePyramidSize (const Image< OutputStorageType > &sink)
use coordinates from sink to estimate maximum pyramid level needed, update pyramid size
virtual | ~UndistortionMapping ()
User interfaces
int | Map (Image< OutputStorageType > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations
User interfaces
int | Map (Image< OutputStorageType > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations
User interfaces
int | Map (Image< OutputStorageType > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations
User interfaces
int | Map (Image< OutputStorageType > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations
User interfaces
int | Map (Image< OutputStorageType > &sink)
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false)
backward mapping with various interpolations

Protected Types

enum MapType {
UNDEF, PERSPECTIVE_DIST, PERSPECTIVE_UNDIST, SPHERICAL,
TO_SPHERE
}

Protected Member Functions

virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true)
compute maximum number of pyramid levels needed
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source)
void | CalculatePerspDistorion_ (const HomgPoint2D &sink, HomgPoint2D &source) const
void | CalculatePerspUndistorion_ (const HomgPoint2D &sink, HomgPoint2D &source) const
int | CalculateSphericalCoord_ (const HomgPoint2D &sink, HomgPoint2D &source) const
int | CalculateToSphereMapping_ (const HomgPoint2D &sink, HomgPoint2D &source) const
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &)
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const
clip computed region in dest image to roi
virtual void | ClipValue_ (const double &value, OutputStorageType &newvalue)
clip interpolated value to outputstoragetype and merge old and new value according to alpha
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const
overload of virtual function in BackwardMapping.
void | JacobianToMask_ (const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const
takes jacobian to compute gaussian kernel for anisotropic smoothing
pixel-value-mapping worker functions
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< OutputStorageType > &sink)
map image avoiding aliasing
pixel-value-mapping worker functions
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< OutputStorageType > &sink)
map image avoiding aliasing
pixel-value-mapping worker functions
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< OutputStorageType > &sink)
map image avoiding aliasing
geometrical coordinate mapping functions
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian
pixel-value-mapping worker functions
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< OutputStorageType > &sink)
map image avoiding aliasing
geometrical coordinate mapping functions
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian
pixel-value-mapping worker functions
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue)
use jacobian of mapping function to do anisotropic antialiasing
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result)
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality)
bilinear, bicubc and nearest neighbor interpolation
int | MapTri_ (Image< OutputStorageType > &sink)
map image avoiding aliasing
geometrical coordinate mapping functions
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const
numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

Protected Attributes

bool | aliasing_
set to true if possibility of aliasing is detected during mapping
BIAS::Image< float > | alphaImg_
bool | autoPyramidSize_
pyramid size set by user or computed automatically ?
CameraParam cp_
The camera parameters for the undistortion.
double | destCenterX_
Parameters that influence the spherical mapping i.e.
double | destCenterY_
BIAS::KMatrix destK_
int | destProjType_
double | height_
InterpolationMethod interpolationType_
which interpolation method are we using
const double | log2inv_
holds 1.0/log(2.0)
MapType mapping_
spherical or perspective mapping
int | offsetX_
int | offsetY_
MatlabTBUndistortion pu_
PyramidImage< InputStorageType > | pyramid_
this contains a pyramid of the last source image for anti-aliasing
bool | rangeChecked_
the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.
ROI ROI_
the roi of the last source image
SphericalUndistortion su_
Spherical or perspective undistortion, depending on cp_.
double | width_

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::UndistortionMapping< InputStorageType, OutputStorageType >

Maps image src to image sink with spherical or lens distortion.

Author:
streckel, Dez. 2005

Definition at line 44 of file UndistortionMapping.hh.

Member Enumeration Documentation

template<class InputStorageType, class OutputStorageType>
enum BIAS::UndistortionMapping::MapType [protected]

Enumerator:
UNDEF
PERSPECTIVE_DIST
PERSPECTIVE_UNDIST
SPHERICAL
TO_SPHERE

Definition at line 152 of file UndistortionMapping.hh.

Constructor & Destructor Documentation

template<class InputStorageType, class OutputStorageType>
UndistortionMapping::~UndistortionMapping ( ) [virtual]

Definition at line 37 of file UndistortionMapping.cpp.

template<class InputStorageType, class OutputStorageType>
UndistortionMapping::UndistortionMapping ( )

Definition at line 43 of file UndistortionMapping.cpp.

References BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UNDEF.

Member Function Documentation

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_ | ( | const Image< InputStorageType > & | source,
 |  | bool | forceInit = true
 | ) | [protected, virtual, inherited]

compute maximum number of pyramid levels needed

Definition at line 154 of file BackwardMapping.cpp.

References BIAS::PyramidImage< StorageType >::Init(), BIAS::PyramidImage< StorageType >::IsEmpty(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, and BIAS::PyramidImage< StorageType >::Release().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_ | ( | const Image< OutputStorageType > & | sink,
 |  | const Image< InputStorageType > & | source
 | ) | [protected, virtual, inherited]

Definition at line 753 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

template<class InputStorageType, class OutputStorageType>
void UndistortionMapping::CalculatePerspDistorion_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected]

Definition at line 126 of file UndistortionMapping.cpp.

References BIAS::MatlabTBUndistortion::Distort(), BIAS::CameraParam::GetAspectratio(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_, and UNDIST_EPS.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

template<class InputStorageType, class OutputStorageType>
void UndistortionMapping::CalculatePerspUndistorion_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected]

Definition at line 141 of file UndistortionMapping.cpp.

References BIAS::CameraParam::GetAspectratio(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_, UNDIST_EPS, and BIAS::MatlabTBUndistortion::Undistort().

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::CalculateSphericalCoord_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected]

Definition at line 62 of file UndistortionMapping.cpp.

References BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterX_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterY_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destK_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destProjType_, BIAS::SphericalUndistortion::GetSphereCenter(), p, BIAS::SphericalUndistortion::ProjectCoordBack(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::su_, BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), and BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image().

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::CalculateToSphereMapping_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected]

Definition at line 96 of file UndistortionMapping.cpp.

References BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterX_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterY_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destK_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destProjType_, BIAS::SphericalUndistortion::GetSphereCenter(), BIAS::SphericalUndistortion::ProjectCoord(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::su_, BIAS::SphericalUndistortion::TransfCoordImage2Sphere(), and BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image().

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_ | ( | Image< OutputStorageType > & | ,
 |  | const Image< InputStorageType > & |
 | ) | [protected, virtual, inherited]

Definition at line 780 of file BackwardMapping.cpp.

References abs, BUILD_IMAGE_CHAR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_ | ( | const BIAS::Image< OutputStorageType > & | sink,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | const [protected, inherited]

clip computed region in dest image to roi

Definition at line 666 of file BackwardMapping.cpp.

References BIAS::ImageBase::GetROICorners().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<>
void BIAS::BackwardMapping< float, float >::ClipValue_ | ( | const double & | value,
 |  | float & | newvalue
 | ) | [inherited]

Definition at line 719 of file BackwardMapping.cpp.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_ | ( | const double & | value,
 |  | OutputStorageType & | newvalue
 | ) | [protected, virtual, inherited]

clip interpolated value to outputstoragetype and merge old and new value according to alpha

Definition at line 690 of file BackwardMapping.cpp.

References max, min, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::DistortPerspImage | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | KMatrix & | K
 | ) |

Definition at line 336 of file UndistortionMapping.cpp.

References BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), BIAS::CameraParam::GetAspectratio(), BIAS::KMatrix::GetFx(), BIAS::KMatrix::GetFy(), BIAS::KMatrix::GetHx(), BIAS::KMatrix::GetHy(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_, BIAS::KMatrix::SetFx(), BIAS::KMatrix::SetFy(), BIAS::KMatrix::SetHx(), BIAS::KMatrix::SetHy(), and UNDIST_EPS.

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::DistortPerspImage | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Using the Matlab camera calibration toolbox parameters for an undistortion of a distorted camera image.

Reintroduces also aspect ratios !=1. If a KMatrix is given it is corrected for the aspect ratio correction.

Author:
streckel 06/2004

Definition at line 354 of file UndistortionMapping.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::PERSPECTIVE_DIST, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetAnisotropicImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | Matrix2x2< double > & | Jacobian,
 |  | unsigned int | channel,
 |  | double & | thereturnvalue
 | ) | [protected, inherited]

use jacobian of mapping function to do anisotropic antialiasing

Definition at line 591 of file BackwardMapping.cpp.

References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), BIAS::Matrix< T >::GetData(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::Matrix2x2< T >::Transpose().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox | ( | unsigned int | ,
 |  | unsigned int | ,
 |  | unsigned int | sinkwidth,
 |  | unsigned int | sinkheight,
 |  | int & | tlx,
 |  | int & | tly,
 |  | int & | brx,
 |  | int & | bry
 | ) | [inline, virtual, inherited]

calculates the bounding box in sink image, where to do the backward mapping.

The resulting coordinates can be negative ! The br position is the first pixel outside the region(as for a ROI). Implement this in a derived class for speeding up calculation.

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 149 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::CalcCoordOffset_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ChangeImgSize_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const Image< InputStorageType > & | im,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 506 of file BackwardMapping.cpp.

References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_ | ( | const HomgPoint2D & | sink,
 |  | Matrix2x2< double > & | Jacobian
 | ) | const [protected, virtual, inherited]

numeric approximation of jacobian, reimplement in derived class to make an analytic jacobian

Reimplemented in BIAS::HomographyMapping< InputStorageType, OutputStorageType >.

Definition at line 55 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::GetSourceCoordinates_ | ( | const HomgPoint2D & | sink,
 |  | HomgPoint2D & | source
 | ) | const [protected, virtual]

overload of virtual function in BackwardMapping.

Implements the coordinate mapping

Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.

Definition at line 157 of file UndistortionMapping.cpp.

References BIASASSERT, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::PERSPECTIVE_DIST, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::PERSPECTIVE_UNDIST, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SPHERICAL, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::TO_SPHERE, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UNDEF.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_ | ( | const double & | xsource,
 |  | const double & | ysource,
 |  | const double & | scale,
 |  | unsigned int | channel,
 |  | double & | result
 | ) | [protected, inherited]

worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights

Definition at line 532 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::JacobianToMask_ | ( | const Matrix2x2< double > & | Jacobian,
 |  | Matrix< double > & | theMask
 | ) | const [protected, inherited]

takes jacobian to compute gaussian kernel for anisotropic smoothing

Definition at line 728 of file BackwardMapping.cpp.

References a, BIAS::Matrix< T >::GetData(), BIAS::Matrix2x2< T >::Invert(), and TNT::Matrix< T >::num_cols().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map ( Image< OutputStorageType > & sink ) [inherited]

use this for subsequent calls to avoid pyramid recalculation when using tri-filtering

Definition at line 223 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::MapTrilinear.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | = MapTrilinear,
 |  | bool | newSink = false
 | ) | [inherited]

backward mapping with various interpolations

Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.

Parameters:
newSink,if true a new sink image is created that is large enough to hold the old sink and the new mapped src img.

Definition at line 170 of file BackwardMapping.cpp.

References BIASABORT, BIASERR, and BIAS::ImageBase::IsEmpty().

Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), main(), and BIAS::HomographyMapping< InputStorageType, OutputStorageType >::RotateToGrey().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_ | ( | const Image< InputStorageType > & | source,
 |  | Image< OutputStorageType > & | sink,
 |  | InterpolationMethod | interpolationQuality
 | ) | [protected, inherited]

bilinear, bicubc and nearest neighbor interpolation

Definition at line 238 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_, BIASERR, BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipBoundingBoxToROICorners_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetBoundingBox(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_(), BIAS::ImageBase::GetSize(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), BIAS::ROI::IsInROI(), BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_, and value.

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::MapPerspToSphere | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const KMatrix | Ksrc,
 |  | const double & | CenterX,
 |  | const double & | CenterY,
 |  | const int | projectionType
 | ) |

Performs a projection of a perspective or other projection type image to a sphere.

Parameters:
src | source (perspective)image
dst | (output) uninitialized (spherical) destination image
Ksrc | is the KMatrix of the perspecive source image
CenterX,Centery | is the pixel in the spherical uncalibrated camera image, that lies in viewing direction. The principal point in the perspective image will be mapped to this point on the sphere
projectionType | use the projection-type constants
Author:
Birger Streckel

Definition at line 246 of file UndistortionMapping.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::su_, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::TO_SPHERE.

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_ ( Image< OutputStorageType > & sink ) [protected, inherited]

map image avoiding aliasing

This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked

Author:
koeser 04/2005

Definition at line 363 of file BackwardMapping.cpp.

References BIASERR, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::PyramidImage< StorageType >::IsEmpty(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::ProjectSphereImage | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | const int & | SizeX,
 |  | const int & | SizeY,
 |  | const double & | FovX,
 |  | const double & | FovY,
 |  | const double & | CenterX,
 |  | const double & | CenterY,
 |  | const int | projectionType,
 |  | const double & | zoomFactor,
 |  | KMatrix & | KMatDst
 | ) |

Performs a projection of a spherical image given a projection-type and a zoom factor.

Parameters:
src | source image
dst | (output) uninitialized destination image
SizeX,SizeY | define the size of the output image
FovX,FovY | define the Field Of View angle (in deg) in x and y direction that is used for the creation of the K-Matrix for the projected image. If one of these is =0 then the resulting image will be undistorted.
CenterX,Centery | is the pixel in the spherical uncalibrated camera image, that lies in viewing direction. This point will be mapped to the principal point in the projected image.
zoomFactor | expands the image by a given factor
projectionType | use the projection-type constants
Author:
Birger Streckel

Definition at line 180 of file UndistortionMapping.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SPHERICAL, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::su_.

template<class InputStorageType, class OutputStorageType>
void BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::SetCameraParam ( const CameraParam & cp ) [inline]

set your CameraParams for mapping

Definition at line 55 of file UndistortionMapping.hh.

References BIAS::CameraParam::Init().

Referenced by main().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize ( const int newsize ) [inherited]

sets pyramid size to pyramid and updates if neccessary

Definition at line 135 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_, BIAS::PyramidImage< StorageType >::SetPyramidSize(), and BIAS::ImageBase::StealImage().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::UndistortPerspImage | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst,
 |  | KMatrix & | K
 | ) |

Definition at line 286 of file UndistortionMapping.cpp.

References BIAS::CameraParam::GetAspectratio(), BIAS::KMatrix::GetFx(), BIAS::KMatrix::GetFy(), BIAS::KMatrix::GetHx(), BIAS::KMatrix::GetHy(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_, BIAS::KMatrix::SetFx(), BIAS::KMatrix::SetFy(), BIAS::KMatrix::SetHx(), BIAS::KMatrix::SetHy(), UNDIST_EPS, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

template<class InputStorageType, class OutputStorageType>
int UndistortionMapping::UndistortPerspImage | ( | const Image< InputStorageType > & | src,
 |  | Image< OutputStorageType > & | dst
 | ) |

Using the Matlab camera calibration toolbox parameters for a distortion of an already undistorted image.

Corrects also aspect ratios !=1. Inverse to the UndistortImage function. If a KMatrix is given it is corrected for the aspect ratio correction.

Author:
streckel 06/2004

Definition at line 305 of file UndistortionMapping.cpp.

References BIASERR, BIAS::CameraParam::IsInitialized(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_, BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::PERSPECTIVE_UNDIST, and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

template<class InputStorageType, class OutputStorageType>
void BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize ( const Image< OutputStorageType > & sink ) [virtual, inherited]

use coordinates from sink to estimate maximum pyramid level needed, update pyramid size

Definition at line 86 of file BackwardMapping.cpp.

References BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_, BIAS::ImageBase::GetHeight(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetJacobian_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::ImageBase::GetWidth(), JACOBI_THRESH, ONE_OVER_LOG2, and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::aliasing_ [protected, inherited]

set to true if possibility of aliasing is detected during mapping

Definition at line 291 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_().

template<class InputStorageType, class OutputStorageType>
BIAS::Image<float> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::alphaImg_ [protected, inherited]

Definition at line 298 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::autoPyramidSize_ [protected, inherited]

pyramid size set by user or computed automatically ?

Definition at line 277 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize().

template<class InputStorageType, class OutputStorageType>
CameraParam BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::cp_ [protected]

The camera parameters for the undistortion.

Definition at line 159 of file UndistortionMapping.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterX_ [protected]

Parameters that influence the spherical mapping i.e.

direction, type, image part, ...

Definition at line 167 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_().

template<class InputStorageType, class OutputStorageType>
double BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destCenterY_ [protected]

Definition at line 167 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_().

template<class InputStorageType, class OutputStorageType>
BIAS::KMatrix BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destK_ [protected]

Definition at line 169 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_().

template<class InputStorageType, class OutputStorageType>
int BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::destProjType_ [protected]

Definition at line 168 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::height_ [protected, inherited]

Definition at line 296 of file BackwardMapping.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::BackwardMapping< InputStorageType, OutputStorageType >::interpolationType_ [protected, inherited]

which interpolation method are we using

Definition at line 280 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().

template<class InputStorageType, class OutputStorageType>
const double BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::log2inv_ [protected]

holds 1.0/log(2.0)

Definition at line 156 of file UndistortionMapping.hh.

template<class InputStorageType, class OutputStorageType>
MapType BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::mapping_ [protected]

spherical or perspective mapping

Definition at line 175 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortionMapping(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetX_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
int BIAS::BackwardMapping< InputStorageType, OutputStorageType >::offsetY_ [protected, inherited]

Definition at line 294 of file BackwardMapping.hh.

Referenced by BIAS::HomographyMapping< InputStorageType, OutputStorageType >::GetChangedHomography(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
MatlabTBUndistortion BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::pu_ [protected]

Definition at line 163 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspDistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculatePerspUndistorion_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::DistortPerspImage(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::UndistortPerspImage().

template<class InputStorageType, class OutputStorageType>
PyramidImage<InputStorageType> BIAS::BackwardMapping< InputStorageType, OutputStorageType >::pyramid_ [protected, inherited]

this contains a pyramid of the last source image for anti-aliasing

Definition at line 272 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::BuildPyramid_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetTrilinearImageValue_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::SetPyramidSize().

template<class InputStorageType, class OutputStorageType>
bool BIAS::BackwardMapping< InputStorageType, OutputStorageType >::rangeChecked_ [protected, inherited]

the interpolated value is computed in double, if clipvalue is not specialized for your outputstoragetype(e.g.

ushort) this bool indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1)

Definition at line 287 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ClipValue_().

template<class InputStorageType, class OutputStorageType>
ROI BIAS::BackwardMapping< InputStorageType, OutputStorageType >::ROI_ [protected, inherited]

the roi of the last source image

Definition at line 274 of file BackwardMapping.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapBi_().

template<class InputStorageType, class OutputStorageType>
SphericalUndistortion BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::su_ [protected]

Spherical or perspective undistortion, depending on cp_.

Definition at line 162 of file UndistortionMapping.hh.

Referenced by BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateSphericalCoord_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::CalculateToSphereMapping_(), BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::MapPerspToSphere(), and BIAS::UndistortionMapping< InputStorageType, OutputStorageType >::ProjectSphereImage().

template<class InputStorageType, class OutputStorageType>
double BIAS::BackwardMapping< InputStorageType, OutputStorageType >::width_ [protected, inherited]

Definition at line 295 of file BackwardMapping.hh.

The documentation for this class was generated from the following files:
  • Image/UndistortionMapping.hh
  • Image/UndistortionMapping.cpp
Generated on Wed Jun 21 19:11:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::UnitLowerTriangularView< MaTRiX > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::UnitLowerTriangularView

TNT::UnitLowerTriangularView< MaTRiX > Class Template Reference

#include <Base/Math/tnt/triang.h>

Collaboration diagram for TNT::UnitLowerTriangularView< MaTRiX >:

[legend]
List of all members.

Public Types

typedef MaTRiX::const_reference | const_reference
typedef MaTRiX::element_type | element_type
typedef element_type | T
typedef MaTRiX::element_type | value_type

Public Member Functions

Subscript | dim (Subscript d) const
const_reference | get (Subscript i, Subscript j) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
UnitLowerTriangularView (MaTRiX &A)

Protected Attributes

const MaTRiX & | A_
const MaTRiX::element_type | one
const MaTRiX::element_type | zero

Detailed Description

template<class MaTRiX>
class TNT::UnitLowerTriangularView< MaTRiX >

Definition at line 162 of file triang.h.

Member Typedef Documentation

template<class MaTRiX>
typedef MaTRiX::const_reference TNT::UnitLowerTriangularView< MaTRiX >::const_reference

Definition at line 172 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UnitLowerTriangularView< MaTRiX >::element_type

Definition at line 173 of file triang.h.

template<class MaTRiX>
typedef element_type TNT::UnitLowerTriangularView< MaTRiX >::T

Definition at line 175 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UnitLowerTriangularView< MaTRiX >::value_type

Definition at line 174 of file triang.h.

Constructor & Destructor Documentation

template<class MaTRiX>
TNT::UnitLowerTriangularView< MaTRiX >::UnitLowerTriangularView ( MaTRiX & A ) [inline]

Definition at line 185 of file triang.h.

Member Function Documentation

template<class MaTRiX>
Subscript TNT::UnitLowerTriangularView< MaTRiX >::dim ( Subscript d ) const [inline]

Definition at line 178 of file triang.h.

References TNT::UnitLowerTriangularView< MaTRiX >::A_.

template<class MaTRiX>
const_reference TNT::UnitLowerTriangularView< MaTRiX >::get | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 188 of file triang.h.

References TNT::UnitLowerTriangularView< MaTRiX >::A_, TNT::UnitLowerTriangularView< MaTRiX >::one, and TNT::UnitLowerTriangularView< MaTRiX >::zero.

template<class MaTRiX>
Subscript TNT::UnitLowerTriangularView< MaTRiX >::lbound ( ) const [inline]

Definition at line 177 of file triang.h.

template<class MaTRiX>
Subscript TNT::UnitLowerTriangularView< MaTRiX >::num_cols ( ) const [inline]

Definition at line 180 of file triang.h.

References TNT::UnitLowerTriangularView< MaTRiX >::A_.

Referenced by TNT::operator<<().

template<class MaTRiX>
Subscript TNT::UnitLowerTriangularView< MaTRiX >::num_rows ( ) const [inline]

Definition at line 179 of file triang.h.

References TNT::UnitLowerTriangularView< MaTRiX >::A_.

Referenced by TNT::operator<<().

template<class MaTRiX>
const_reference TNT::UnitLowerTriangularView< MaTRiX >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 206 of file triang.h.

References TNT::UnitLowerTriangularView< MaTRiX >::A_, TNT::UnitLowerTriangularView< MaTRiX >::one, and TNT::UnitLowerTriangularView< MaTRiX >::zero.

Member Data Documentation

template<class MaTRiX>
const MaTRiX& TNT::UnitLowerTriangularView< MaTRiX >::A_ [protected]

Definition at line 166 of file triang.h.

Referenced by TNT::UnitLowerTriangularView< MaTRiX >::dim(), TNT::UnitLowerTriangularView< MaTRiX >::get(), TNT::UnitLowerTriangularView< MaTRiX >::num_cols(), TNT::UnitLowerTriangularView< MaTRiX >::num_rows(), and TNT::UnitLowerTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
const MaTRiX::element_type TNT::UnitLowerTriangularView< MaTRiX >::one [protected]

Definition at line 168 of file triang.h.

Referenced by TNT::UnitLowerTriangularView< MaTRiX >::get(), and TNT::UnitLowerTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
const MaTRiX::element_type TNT::UnitLowerTriangularView< MaTRiX >::zero [protected]

Definition at line 167 of file triang.h.

Referenced by TNT::UnitLowerTriangularView< MaTRiX >::get(), and TNT::UnitLowerTriangularView< MaTRiX >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/triang.h
Generated on Wed Jun 21 19:13:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::UnitUpperTriangularView< MaTRiX > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::UnitUpperTriangularView

TNT::UnitUpperTriangularView< MaTRiX > Class Template Reference

#include <Base/Math/tnt/triang.h>

Collaboration diagram for TNT::UnitUpperTriangularView< MaTRiX >:

[legend]
List of all members.

Public Types

typedef MaTRiX::const_reference | const_reference
typedef MaTRiX::element_type | element_type
typedef element_type | T
typedef MaTRiX::element_type | value_type

Public Member Functions

Subscript | dim (Subscript d) const
const_reference | get (Subscript i, Subscript j) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
UnitUpperTriangularView (MaTRiX &A)

Protected Attributes

const MaTRiX & | A_
const MaTRiX::element_type | one
const MaTRiX::element_type | zero

Detailed Description

template<class MaTRiX>
class TNT::UnitUpperTriangularView< MaTRiX >

Definition at line 460 of file triang.h.

Member Typedef Documentation

template<class MaTRiX>
typedef MaTRiX::const_reference TNT::UnitUpperTriangularView< MaTRiX >::const_reference

Definition at line 470 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UnitUpperTriangularView< MaTRiX >::element_type

Definition at line 471 of file triang.h.

template<class MaTRiX>
typedef element_type TNT::UnitUpperTriangularView< MaTRiX >::T

Definition at line 473 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UnitUpperTriangularView< MaTRiX >::value_type

Definition at line 472 of file triang.h.

Constructor & Destructor Documentation

template<class MaTRiX>
TNT::UnitUpperTriangularView< MaTRiX >::UnitUpperTriangularView ( MaTRiX & A ) [inline]

Definition at line 483 of file triang.h.

Member Function Documentation

template<class MaTRiX>
Subscript TNT::UnitUpperTriangularView< MaTRiX >::dim ( Subscript d ) const [inline]

Definition at line 476 of file triang.h.

References TNT::UnitUpperTriangularView< MaTRiX >::A_.

template<class MaTRiX>
const_reference TNT::UnitUpperTriangularView< MaTRiX >::get | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 486 of file triang.h.

References TNT::UnitUpperTriangularView< MaTRiX >::A_, TNT::UnitUpperTriangularView< MaTRiX >::one, and TNT::UnitUpperTriangularView< MaTRiX >::zero.

template<class MaTRiX>
Subscript TNT::UnitUpperTriangularView< MaTRiX >::lbound ( ) const [inline]

Definition at line 475 of file triang.h.

template<class MaTRiX>
Subscript TNT::UnitUpperTriangularView< MaTRiX >::num_cols ( ) const [inline]

Definition at line 478 of file triang.h.

References TNT::UnitUpperTriangularView< MaTRiX >::A_.

Referenced by TNT::operator<<().

template<class MaTRiX>
Subscript TNT::UnitUpperTriangularView< MaTRiX >::num_rows ( ) const [inline]

Definition at line 477 of file triang.h.

References TNT::UnitUpperTriangularView< MaTRiX >::A_.

Referenced by TNT::operator<<().

template<class MaTRiX>
const_reference TNT::UnitUpperTriangularView< MaTRiX >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 504 of file triang.h.

References TNT::UnitUpperTriangularView< MaTRiX >::A_, TNT::UnitUpperTriangularView< MaTRiX >::one, and TNT::UnitUpperTriangularView< MaTRiX >::zero.

Member Data Documentation

template<class MaTRiX>
const MaTRiX& TNT::UnitUpperTriangularView< MaTRiX >::A_ [protected]

Definition at line 464 of file triang.h.

Referenced by TNT::UnitUpperTriangularView< MaTRiX >::dim(), TNT::UnitUpperTriangularView< MaTRiX >::get(), TNT::UnitUpperTriangularView< MaTRiX >::num_cols(), TNT::UnitUpperTriangularView< MaTRiX >::num_rows(), and TNT::UnitUpperTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
const MaTRiX::element_type TNT::UnitUpperTriangularView< MaTRiX >::one [protected]

Definition at line 466 of file triang.h.

Referenced by TNT::UnitUpperTriangularView< MaTRiX >::get(), and TNT::UnitUpperTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
const MaTRiX::element_type TNT::UnitUpperTriangularView< MaTRiX >::zero [protected]

Definition at line 465 of file triang.h.

Referenced by TNT::UnitUpperTriangularView< MaTRiX >::get(), and TNT::UnitUpperTriangularView< MaTRiX >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/triang.h
Generated on Wed Jun 21 19:13:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::UnscentedTransform Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::UnscentedTransform

BIAS::UnscentedTransform Class Reference

uses the unscented transformation to map a normal distribututed random variable using a nonlinear transformation More...

#include <MathAlgo/UnscentedTransform.hh>

Inheritance diagram for BIAS::UnscentedTransform:

[legend]
Collaboration diagram for BIAS::UnscentedTransform:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetAlpha (const double alpha)
sets the alpha parameter
void | SetBeta (const double beta)
sets the alpha parameter
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
void | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const
UnscentedTransform ()
virtual | ~UnscentedTransform ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
virtual void | Transform_ (const Vector< double > &src, Vector< double > &dst) const =0

Protected Attributes

long int | _liDebugLevel
double | Alpha_
the alpha parameter determines the spread of the sigma points
double | Beta_
beta is used to incorporate prior knowledge of the distribution of x.
double | Kappa_
kappa is a secondary scaling parameter.

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

uses the unscented transformation to map a normal distribututed random variable using a nonlinear transformation

See S.J.Julier and J.K.Uhlmann "A New Extension of the Kalman Filter to Nonlinear Systems" for a detailed description of the unscented transform. The unscented transform approximates the transformation of the covariance matrix up to second order of the according Taylor series.

To use this class derive from it and implement the non linear transformation function Transform_().

Author:
woelk 01/2006 (tested)

Definition at line 66 of file UnscentedTransform.hh.

Constructor & Destructor Documentation

UnscentedTransform::UnscentedTransform ( )

Definition at line 35 of file UnscentedTransform.cpp.

UnscentedTransform::~UnscentedTransform ( ) [virtual]

Definition at line 41 of file UnscentedTransform.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void UnscentedTransform::ComputeSigmaPoints_ | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | std::vector< WeightedSigmaPoint > & | sigma_points
 | ) | const [protected]

Definition at line 95 of file UnscentedTransform.cpp.

References Alpha_, Beta_, BEXCEPTION, BIAS_DEBUG, BIASCDOUT, D_UT_PARAM, D_UT_SIGMA_POINTS, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), Kappa_, BIAS::Less(), BIAS::Vector< T >::Size(), and BIAS::SVD::SqrtT().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::UnscentedTransform::SetAlpha ( const double alpha ) [inline]

sets the alpha parameter

Definition at line 79 of file UnscentedTransform.hh.

Referenced by main().

void BIAS::UnscentedTransform::SetBeta ( const double beta ) [inline]

sets the alpha parameter

Definition at line 83 of file UnscentedTransform.hh.

Referenced by main().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void UnscentedTransform::Transform | ( | const Vector< double > & | src_mean,
 |  | const Matrix< double > & | src_cov,
 |  | Vector< double > & | dst_mean,
 |  | Matrix< double > & | dst_cov
 | ) | const

Definition at line 46 of file UnscentedTransform.cpp.

References BIAS::Matrix< T >::IsZero(), TNT::Matrix< T >::newsize(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and Transform_().

Referenced by main(), and BIAS::ProjectionParametersBase::UnProjectLocal().

virtual void BIAS::UnscentedTransform::Transform_ | ( | const Vector< double > & | src,
 |  | Vector< double > & | dst
 | ) | const [protected, pure virtual]

Implemented in BIAS::ProjectionParametersBase, and MyUnscentedTransform.

Referenced by Transform().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected]

the alpha parameter determines the spread of the sigma points

Definition at line 88 of file UnscentedTransform.hh.

Referenced by ComputeSigmaPoints_().

double BIAS::UnscentedTransform::Beta_ [protected]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions betya = 2.0 is optiomal

Definition at line 91 of file UnscentedTransform.hh.

Referenced by ComputeSigmaPoints_().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

double BIAS::UnscentedTransform::Kappa_ [protected]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 94 of file UnscentedTransform.hh.

Referenced by ComputeSigmaPoints_().

The documentation for this class was generated from the following files:
  • MathAlgo/UnscentedTransform.hh
  • MathAlgo/UnscentedTransform.cpp
Generated on Wed Jun 21 19:11:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::UnVignette Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::UnVignette

BIAS::UnVignette Class Reference

#include <Image/UnVignette.hh>

Collaboration diagram for BIAS::UnVignette:

[legend]
List of all members.

Public Member Functions

void | Compute (BIAS::Image< unsigned char > &Image)
int | Init (BIAS::CameraParam cParam, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true)
Init the Unvignette algorithm with CameraParam object CameraParameter objcect has to contain ControlPoints and PercentageValues vectors have to be of same size.
int | Init (const std::vector< double > ControlPoints, std::vector< double > PercentageValues, unsigned int dImageWidth, unsigned int dImageHeight, int dPPX, int dPPY, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true)
Init the Unvignette algorithm give ControlPoints in image as offset from Principal Point in pixel give percentage values in second vector vectors have to be of same size.
bool | IsInitialized ()
UnVignette (CameraParam &cParam, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true)
UnVignette ()
~UnVignette ()

Private Member Functions

double | CalcRadius_ (double x, double y)
int | LeastSquares_ (double &res, double radius)
int | PrepareLeastSquaresMin_ ()
int | PrepareLuImage_ ()

Private Attributes

BIAS::Matrix< double > | A_
bool | bIsInitialized_
bool | bLeastSquaresPrepared_
bool | bUseLuT_
std::vector< double > | ControlPoints_
unsigned int | dChannelCount_
unsigned int | dHeight_
double | dHeightHalfMPPY_
INTERPOLATION_METHOD | dInterPolationMethod_
unsigned int | dWidth_
double | dWidthHalfMPPX_
std::vector< int > | IlluCorrX_
std::vector< double > | IlluCorrY_
BIAS::Interpolator InterpolatorIllu_
BIAS::Image< float > | LuImage_
std::vector< double > | PercentageValues_
double | PrinciplePointX_
double | PrinciplePointY_
BIAS::Vector< double > | X_
BIAS::Vector< double > | Y_

Detailed Description

Definition at line 52 of file UnVignette.hh.

Constructor & Destructor Documentation

UnVignette::UnVignette ( )

Definition at line 37 of file UnVignette.cpp.

References bIsInitialized_, bLeastSquaresPrepared_, bUseLuT_, dInterPolationMethod_, LEAST_SQUARES, PrinciplePointX_, and PrinciplePointY_.

UnVignette::UnVignette | ( | CameraParam & | cParam,
 |  | INTERPOLATION_METHOD | method = LEAST_SQUARES,
 |  | bool | bUseLuT = true
 | ) |

Definition at line 48 of file UnVignette.cpp.

References bIsInitialized_, bLeastSquaresPrepared_, bUseLuT_, ControlPoints_, dHeight_, dHeightHalfMPPY_, dInterPolationMethod_, dWidth_, dWidthHalfMPPX_, BIAS::CameraParam::GetHeight(), BIAS::CameraParam::GetIlluCorrX(), BIAS::CameraParam::GetIlluCorrY(), BIAS::CameraParam::GetPrincipalX(), BIAS::CameraParam::GetPrincipalY(), BIAS::CameraParam::GetWidth(), Init(), BIAS::CameraParam::IsInitialized(), LEAST_SQUARES, PercentageValues_, PrinciplePointX_, and PrinciplePointY_.

UnVignette::~UnVignette ( )

Definition at line 78 of file UnVignette.cpp.

Member Function Documentation

double UnVignette::CalcRadius_ | ( | double | x,
 |  | double | y
 | ) | [private]

Definition at line 237 of file UnVignette.cpp.

References dHeightHalfMPPY_, and dWidthHalfMPPX_.

Referenced by PrepareLuImage_().

void UnVignette::Compute ( BIAS::Image< unsigned char > & Image )

Definition at line 84 of file UnVignette.cpp.

References BIASERR, bIsInitialized_, dChannelCount_, dHeight_, dWidth_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and LuImage_.

Referenced by MainFrame::UnVignette().

int UnVignette::Init | ( | BIAS::CameraParam | cParam,
 |  | INTERPOLATION_METHOD | method = LEAST_SQUARES,
 |  | bool | bUseLuT = true
 | ) |

Init the Unvignette algorithm with CameraParam object CameraParameter objcect has to contain ControlPoints and PercentageValues vectors have to be of same size.

Author:
ischiller
Date:
02/06

Definition at line 190 of file UnVignette.cpp.

References bIsInitialized_, bUseLuT_, ControlPoints_, dHeightHalfMPPY_, dInterPolationMethod_, dWidth_, dWidthHalfMPPX_, BIAS::Interpolator::InitSpline(), InterpolatorIllu_, PercentageValues_, PrepareLeastSquaresMin_(), PrepareLuImage_(), BIAS::Interpolator::PrepareLuTSpline(), PrinciplePointX_, PrinciplePointY_, BIAS::Interpolator::SetControlPoints(), BIAS::Interpolator::SetKnotPoints(), and SPLINE_WITH_LUT.

int UnVignette::Init | ( | const std::vector< double > | ControlPoints,
 |  | std::vector< double > | PercentageValues,
 |  | unsigned int | dImageWidth,
 |  | unsigned int | dImageHeight,
 |  | int | dPPX,
 |  | int | dPPY,
 |  | INTERPOLATION_METHOD | method = LEAST_SQUARES,
 |  | bool | bUseLuT = true
 | ) |

Init the Unvignette algorithm give ControlPoints in image as offset from Principal Point in pixel give percentage values in second vector vectors have to be of same size.

Author:
ischiller
Date:
02/06

Definition at line 145 of file UnVignette.cpp.

References bUseLuT_, ControlPoints_, dHeightHalfMPPY_, dInterPolationMethod_, dWidth_, dWidthHalfMPPX_, BIAS::Interpolator::InitSpline(), InterpolatorIllu_, PercentageValues_, PrepareLeastSquaresMin_(), BIAS::Interpolator::PrepareLuTSpline(), PrinciplePointX_, PrinciplePointY_, BIAS::Interpolator::SetControlPoints(), and BIAS::Interpolator::SetKnotPoints().

Referenced by MainFrame::UnVignette(), and UnVignette().

bool BIAS::UnVignette::IsInitialized ( ) [inline]

Definition at line 60 of file UnVignette.hh.

int UnVignette::LeastSquares_ | ( | double & | res,
 |  | double | radius
 | ) | [private]

Definition at line 316 of file UnVignette.cpp.

References BIASERR.

Referenced by PrepareLuImage_().

int UnVignette::PrepareLeastSquaresMin_ ( ) [private]

Definition at line 285 of file UnVignette.cpp.

References res.

Referenced by Init().

int UnVignette::PrepareLuImage_ ( ) [private]

Definition at line 245 of file UnVignette.cpp.

References bUseLuT_, CalcRadius_(), dHeightHalfMPPY_, dWidth_, dWidthHalfMPPX_, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), InterpolatorIllu_, LEAST_SQUARES, LeastSquares_(), LuImage_, PrinciplePointX_, PrinciplePointY_, BIAS::Interpolator::Spline(), and BIAS::Interpolator::SplineFromLuT().

Referenced by Init().

Member Data Documentation

BIAS::Matrix<double> BIAS::UnVignette::A_ [private]

Definition at line 96 of file UnVignette.hh.

bool BIAS::UnVignette::bIsInitialized_ [private]

Definition at line 115 of file UnVignette.hh.

Referenced by Compute(), Init(), and UnVignette().

bool BIAS::UnVignette::bLeastSquaresPrepared_ [private]

Definition at line 100 of file UnVignette.hh.

Referenced by UnVignette().

bool BIAS::UnVignette::bUseLuT_ [private]

Definition at line 107 of file UnVignette.hh.

Referenced by Init(), PrepareLuImage_(), and UnVignette().

std::vector<double> BIAS::UnVignette::ControlPoints_ [private]

Definition at line 93 of file UnVignette.hh.

Referenced by Init(), and UnVignette().

unsigned int BIAS::UnVignette::dChannelCount_ [private]

Definition at line 113 of file UnVignette.hh.

Referenced by Compute().

unsigned int BIAS::UnVignette::dHeight_ [private]

Definition at line 112 of file UnVignette.hh.

Referenced by Compute(), and UnVignette().

double BIAS::UnVignette::dHeightHalfMPPY_ [private]

Definition at line 104 of file UnVignette.hh.

Referenced by CalcRadius_(), Init(), PrepareLuImage_(), and UnVignette().

INTERPOLATION_METHOD BIAS::UnVignette::dInterPolationMethod_ [private]

Definition at line 86 of file UnVignette.hh.

Referenced by Init(), and UnVignette().

unsigned int BIAS::UnVignette::dWidth_ [private]

Definition at line 111 of file UnVignette.hh.

Referenced by Compute(), Init(), PrepareLuImage_(), and UnVignette().

double BIAS::UnVignette::dWidthHalfMPPX_ [private]

Definition at line 103 of file UnVignette.hh.

Referenced by CalcRadius_(), Init(), PrepareLuImage_(), and UnVignette().

std::vector<int> BIAS::UnVignette::IlluCorrX_ [private]

Definition at line 121 of file UnVignette.hh.

std::vector<double> BIAS::UnVignette::IlluCorrY_ [private]

Definition at line 122 of file UnVignette.hh.

BIAS::Interpolator BIAS::UnVignette::InterpolatorIllu_ [private]

Definition at line 116 of file UnVignette.hh.

Referenced by Init(), and PrepareLuImage_().

BIAS::Image<float> BIAS::UnVignette::LuImage_ [private]

Definition at line 105 of file UnVignette.hh.

Referenced by Compute(), and PrepareLuImage_().

std::vector<double> BIAS::UnVignette::PercentageValues_ [private]

Definition at line 94 of file UnVignette.hh.

Referenced by Init(), and UnVignette().

double BIAS::UnVignette::PrinciplePointX_ [private]

Definition at line 109 of file UnVignette.hh.

Referenced by Init(), PrepareLuImage_(), and UnVignette().

double BIAS::UnVignette::PrinciplePointY_ [private]

Definition at line 110 of file UnVignette.hh.

Referenced by Init(), PrepareLuImage_(), and UnVignette().

BIAS::Vector<double> BIAS::UnVignette::X_ [private]

Definition at line 98 of file UnVignette.hh.

BIAS::Vector<double> BIAS::UnVignette::Y_ [private]

Definition at line 97 of file UnVignette.hh.

The documentation for this class was generated from the following files:
  • Image/UnVignette.hh
  • Image/UnVignette.cpp
Generated on Wed Jun 21 19:11:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::UpperTriangularView< MaTRiX > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::UpperTriangularView

TNT::UpperTriangularView< MaTRiX > Class Template Reference

#include <Base/Math/tnt/triang.h>

Collaboration diagram for TNT::UpperTriangularView< MaTRiX >:

[legend]
List of all members.

Public Types

typedef MaTRiX::const_reference | const_reference
typedef MaTRiX::element_type | element_type
typedef element_type | T
typedef MaTRiX::element_type | value_type

Public Member Functions

Subscript | dim (Subscript d) const
const_reference | get (Subscript i, Subscript j) const
Subscript | lbound () const
Subscript | num_cols () const
Subscript | num_rows () const
const_reference | operator() (Subscript i, Subscript j) const
UpperTriangularView (MaTRiX &A)

Protected Attributes

MaTRiX & | A_
MaTRiX::element_type | zero_

Detailed Description

template<class MaTRiX>
class TNT::UpperTriangularView< MaTRiX >

Definition at line 344 of file triang.h.

Member Typedef Documentation

template<class MaTRiX>
typedef MaTRiX::const_reference TNT::UpperTriangularView< MaTRiX >::const_reference

Definition at line 355 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UpperTriangularView< MaTRiX >::element_type

Definition at line 356 of file triang.h.

template<class MaTRiX>
typedef element_type TNT::UpperTriangularView< MaTRiX >::T

Definition at line 358 of file triang.h.

template<class MaTRiX>
typedef MaTRiX::element_type TNT::UpperTriangularView< MaTRiX >::value_type

Definition at line 357 of file triang.h.

Constructor & Destructor Documentation

template<class MaTRiX>
TNT::UpperTriangularView< MaTRiX >::UpperTriangularView ( MaTRiX & A ) [inline]

Definition at line 368 of file triang.h.

Member Function Documentation

template<class MaTRiX>
Subscript TNT::UpperTriangularView< MaTRiX >::dim ( Subscript d ) const [inline]

Definition at line 360 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_.

template<class MaTRiX>
const_reference TNT::UpperTriangularView< MaTRiX >::get | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 371 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_, TNT::UpperTriangularView< MaTRiX >::lbound(), and TNT::UpperTriangularView< MaTRiX >::zero_.

template<class MaTRiX>
Subscript TNT::UpperTriangularView< MaTRiX >::lbound ( ) const [inline]

Definition at line 361 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_.

Referenced by TNT::UpperTriangularView< MaTRiX >::get(), TNT::matmult(), and TNT::UpperTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
Subscript TNT::UpperTriangularView< MaTRiX >::num_cols ( ) const [inline]

Definition at line 363 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_.

Referenced by TNT::matmult(), and TNT::operator<<().

template<class MaTRiX>
Subscript TNT::UpperTriangularView< MaTRiX >::num_rows ( ) const [inline]

Definition at line 362 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_.

Referenced by TNT::matmult(), and TNT::operator<<().

template<class MaTRiX>
const_reference TNT::UpperTriangularView< MaTRiX >::operator() | ( | Subscript | i,
 |  | Subscript | j
 | ) | const [inline]

Definition at line 386 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::A_, TNT::UpperTriangularView< MaTRiX >::lbound(), and TNT::UpperTriangularView< MaTRiX >::zero_.

Member Data Documentation

template<class MaTRiX>
MaTRiX& TNT::UpperTriangularView< MaTRiX >::A_ [protected]

Definition at line 349 of file triang.h.

Referenced by TNT::UpperTriangularView< MaTRiX >::dim(), TNT::UpperTriangularView< MaTRiX >::get(), TNT::UpperTriangularView< MaTRiX >::lbound(), TNT::UpperTriangularView< MaTRiX >::num_cols(), TNT::UpperTriangularView< MaTRiX >::num_rows(), and TNT::UpperTriangularView< MaTRiX >::operator()().

template<class MaTRiX>
MaTRiX::element_type TNT::UpperTriangularView< MaTRiX >::zero_ [protected]

Definition at line 350 of file triang.h.

Referenced by TNT::UpperTriangularView< MaTRiX >::get(), and TNT::UpperTriangularView< MaTRiX >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/triang.h
Generated on Wed Jun 21 19:13:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::UUID Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::UUID

BIAS::UUID Class Reference
[Utilities]

interface class for producing/storing Universally Unique IDentifiers More...

#include <Base/Image/UUID.hh>

Inheritance diagram for BIAS::UUID:

[legend]
Collaboration diagram for BIAS::UUID:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void | AssignUUID (const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY)
function to assign a fresh, unique ID.
void AssignUUID_Consecutive ()
jw
void AssignUUID_Global ()
jw
void clear ()
NULLS the class members, invalidates this UID ( not unique anymore).
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
unsigned long | GetLong () const
get least significant value of UID as long value.
std::string | GetString () const
void | GetString (std::string &sUUID) const
writes the UUID into a string object
time_t | GetUUIDCreationTime () const
returns the time used to create the uuid
const unsigned char * | GetUUIDRaw () const
get the pointer to the Uc[16] array with the raw uuid
void Invalidate ()
sets the valid flag to false and clears data JW 09/2005: added clear in addition to just setting bool flag invalid.
bool | IsNil () const
bool | IsValid () const
checks whether this uuid is valid(true) or unitialized(false)
bool | operator!= (const UUID &id) const
"not equal"-operator, uses result of operator==
bool | operator< (const UUID &id) const
the operator< does not express temporal ordering, it does only compare the data areas of the two ids, e.g.
bool | operator<= (const UUID &id) const
operator<= does not express temporal ordering, it does only compare the data areas of the two ids !!!
UUID & | operator= (const UUID &id)
standard assignment operator
bool | operator== (const UUID &id) const
comparison operator only compares ids, no check of validities
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
bool | SetFromLong (const unsigned long &n)
construct from a unique long.
bool | SetFromString (const std::string &sID)
construct from string containing ascii uuid.
void | SetUUIDRaw (const unsigned char *rawid)
UUID (const unsigned long &n)
construct from string containing a unique long.
UUID (const std::string &sID)
construct from string containing ascii uuid
UUID (const BIAS::UUID &id)
copy constructor, calls operator= internally.
UUID (const uuid_t &id)
use this if you want to create a UUID "manually"
UUID ()
default constructor does NOT create a valid UUID to avoid performance decrease in case someone wants to create many UIDS that are not really used.
virtual | ~UUID ()

Static Public Member Functions

static UUID | GenerateUUID (const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY)
static function which simply produces a uuid and returns
static UUID | GenerateUUID_Consecutive ()
jw
static UUID | GenerateUUID_Global ()
jw
static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
bool | IsValid_
flag indicating whether this uuid has been assigned a value yet
uuid_t | theID_
the data fields of the uuid

Static Protected Attributes

static std::ostream | _zDebugStream
static long | g_uniqueCounter = 0
global counter to create next unique consecutive program run-unique ID. (JW)
static long int | GlobalDebugLevel = 0
static timeval | LastGenerationTime_ = {0,0}
when creating a uuid, current time is compared against the time saved during the last uuid generation

Related Functions

(Note that these are not member functions.)

std::ostream & | operator<< (std::ostream &os, const UUID &id)
write a UUID to a stream
std::istream & | operator>> (std::istream &is, UUID &id)
reads a UUID from a stream

Detailed Description

interface class for producing/storing Universally Unique IDentifiers

A UUID is a u unique structure. It is usually a 128 bit value computed from the MAC address of the network adapter (which means "spatial uniqueness") and a high resolution timestamp providing "temporal uniqueness". In addition you

Attention:
temporal uniqueness is only obtained if time is monotonic, i.e. you MUST NOT turn back the clock (-> NTP ?)
For information: generating 1.000.000 UIDS on WIN32 taked approx. 180 msec. (jw)

Todo:
The UUID representation is *not* platform independant, in particular generating a consecutive ID on Windows and reading it on Linux will not work! (JW)
Author:
koeser 09/2003, W32: Jan Woetzel 08/2005

Definition at line 83 of file UUID.hh.

Constructor & Destructor Documentation

BIAS::UUID::~UUID ( ) [virtual]

Definition at line 40 of file UUID.cpp.

BIAS::UUID::UUID ( )

default constructor does NOT create a valid UUID to avoid performance decrease in case someone wants to create many UIDS that are not really used.

(Jan Woetzel 08/2005)

Definition at line 44 of file UUID.cpp.

References clear().

BIAS::UUID::UUID ( const uuid_t & id ) [explicit]

use this if you want to create a UUID "manually"

Definition at line 57 of file UUID.cpp.

References IsValid_, and theID_.

BIAS::UUID::UUID ( const BIAS::UUID & id )

copy constructor, calls operator= internally.

Definition at line 51 of file UUID.cpp.

BIAS::UUID::UUID ( const std::string & sID ) [explicit]

construct from string containing ascii uuid

Definition at line 69 of file UUID.cpp.

References SetFromString().

BIAS::UUID::UUID ( const unsigned long & n ) [explicit]

construct from string containing a unique long.

User has to assert uniqueness himself, e.g. by a global counter.

Author:
Jan Woetzel 2005

Definition at line 74 of file UUID.cpp.

References SetFromLong().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::UUID::AssignUUID ( const bool & consecutively = DEFAULT_UUID_CONSECUTIVELY )

function to assign a fresh, unique ID.

Parameters:
consecutively,: true to use a sequential, dense counter instead of 16 Byte MAC like UID. The ID will be unique for each program run. Please mind the differnec to a sequential (local unique only) UUID which is unique for teh machine, not only the run. False to generate universally valid one.
Author:
Jan Woetzel 08/2005

Definition at line 240 of file UUID.cpp.

References AssignUUID_Consecutive(), and AssignUUID_Global().

Referenced by GenerateUUID().

void BIAS::UUID::AssignUUID_Consecutive ( )

jw

Definition at line 253 of file UUID.cpp.

References g_uniqueCounter, IsValid_, and SetFromLong().

Referenced by AssignUUID(), and GenerateUUID_Consecutive().

void BIAS::UUID::AssignUUID_Global ( )

jw

Definition at line 265 of file UUID.cpp.

References BIASERR, IsValid_, and LastGenerationTime_.

Referenced by AssignUUID(), and GenerateUUID_Global().

void BIAS::UUID::clear ( )

NULLS the class members, invalidates this UID ( not unique anymore).

Jan Woetzel 08/2005

Definition at line 81 of file UUID.cpp.

References IsValid_.

Referenced by BIAS::operator<<(), SetFromLong(), and UUID().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

BIAS::UUID BIAS::UUID::GenerateUUID ( const bool & consecutively = DEFAULT_UUID_CONSECUTIVELY ) [static]

static function which simply produces a uuid and returns

Attention:
calling this function on an uninitialized UUID object does not initialize it. It is _really_ a static function.
Returns:
a new uuid which can be assigned to a UUID object
Author:
Jan Woetzel (rewrite 2005/08)

Definition at line 211 of file UUID.cpp.

References AssignUUID().

Referenced by BIAS::VideoSource_Shm::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), main(), BIAS::VideoServer::ProcessOneImage(), and BIAS::ImageIO::WriteUnbuffered().

BIAS::UUID BIAS::UUID::GenerateUUID_Consecutive ( ) [static]

jw

Definition at line 221 of file UUID.cpp.

References AssignUUID_Consecutive().

BIAS::UUID BIAS::UUID::GenerateUUID_Global ( ) [static]

jw

Definition at line 230 of file UUID.cpp.

References AssignUUID_Global().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned long BIAS::UUID::GetLong ( ) const

get least significant value of UID as long value.

Useful in conjunction with SetFromLong if you want to us eunique counetrs instead of real UIDs.

Returns:
least significant UID value
Author:
Jan Woetzel 2005

Definition at line 169 of file UUID.cpp.

References BIASERR, and GetString().

std::string BIAS::UUID::GetString ( ) const

Definition at line 322 of file UUID.cpp.

Referenced by GetLong().

void BIAS::UUID::GetString ( std::string & sUUID ) const

writes the UUID into a string object

Definition at line 309 of file UUID.cpp.

Referenced by BIAS::VideoSource::WriteDirect_().

time_t BIAS::UUID::GetUUIDCreationTime ( ) const

returns the time used to create the uuid

Definition at line 329 of file UUID.cpp.

References BIASERR.

const unsigned char* BIAS::UUID::GetUUIDRaw ( ) const [inline]

get the pointer to the Uc[16] array with the raw uuid

Definition at line 232 of file UUID.hh.

void BIAS::UUID::Invalidate ( ) [inline]

sets the valid flag to false and clears data JW 09/2005: added clear in addition to just setting bool flag invalid.

Definition at line 228 of file UUID.hh.

Referenced by BIAS::ImageBase::InvalidateUID().

bool BIAS::UUID::IsNil ( ) const

Definition at line 96 of file UUID.cpp.

References BIASASSERT, and theID_.

bool BIAS::UUID::IsValid ( ) const [inline]

checks whether this uuid is valid(true) or unitialized(false)

Examples:
ExampleImageLoad.cpp.

Definition at line 224 of file UUID.hh.

Referenced by main(), BIAS::operator<<(), and BIAS::ImageIO::WriteUnbuffered().

bool BIAS::UUID::operator!= ( const UUID & id ) const [inline]

"not equal"-operator, uses result of operator==

Definition at line 182 of file UUID.hh.

bool BIAS::UUID::operator< ( const UUID & id ) const [inline]

the operator< does not express temporal ordering, it does only compare the data areas of the two ids, e.g.

for sorting, map-storage

Definition at line 189 of file UUID.hh.

bool BIAS::UUID::operator<= ( const UUID & id ) const [inline]

operator<= does not express temporal ordering, it does only compare the data areas of the two ids !!!

Definition at line 201 of file UUID.hh.

UUID& BIAS::UUID::operator= ( const UUID & id ) [inline]

standard assignment operator

Definition at line 212 of file UUID.hh.

bool BIAS::UUID::operator== ( const UUID & id ) const [inline]

comparison operator only compares ids, no check of validities

Definition at line 166 of file UUID.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

bool BIAS::UUID::SetFromLong ( const unsigned long & n )

construct from a unique long.

User has to assert uniqueness himslef, e.g. by a global counter.

Returns:
true if succesful
Author:
Jan Woetzel 2005

Definition at line 142 of file UUID.cpp.

References clear(), IsValid_, and SetFromString().

Referenced by AssignUUID_Consecutive(), and UUID().

bool BIAS::UUID::SetFromString ( const std::string & sID )

construct from string containing ascii uuid.

Thsiu routine is slow! (1.000.000 times take approx 16 seconds, JW)

Returns:
true if succesful

Definition at line 114 of file UUID.cpp.

References BIASERR, and IsValid_.

Referenced by BIAS::operator>>(), SetFromLong(), and UUID().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::UUID::SetUUIDRaw ( const unsigned char * rawid ) [inline]

Definition at line 239 of file UUID.hh.

References BIASASSERT.

Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
 |  | const UUID & | id
 | ) | [friend]

write a UUID to a stream

Definition at line 252 of file UUID.hh.

std::istream& operator>> | ( | std::istream & | is,
 |  | UUID & | id
 | ) | [friend]

reads a UUID from a stream

Definition at line 261 of file UUID.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

long BIAS::UUID::g_uniqueCounter = 0 [static, protected]

global counter to create next unique consecutive program run-unique ID. (JW)

Definition at line 305 of file UUID.hh.

Referenced by AssignUUID_Consecutive().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::UUID::IsValid_ [protected]

flag indicating whether this uuid has been assigned a value yet

Definition at line 290 of file UUID.hh.

Referenced by AssignUUID_Consecutive(), AssignUUID_Global(), clear(), SetFromLong(), SetFromString(), and UUID().

timeval BIAS::UUID::LastGenerationTime_ = {0,0} [static, protected]

when creating a uuid, current time is compared against the time saved during the last uuid generation

Hint: If you have WIN32 compilation problems look for WIN32_LEAN_AND_MEAN and windows.h (JW)

Definition at line 301 of file UUID.hh.

Referenced by AssignUUID_Global().

uuid_t BIAS::UUID::theID_ [protected]

the data fields of the uuid

Definition at line 287 of file UUID.hh.

Referenced by IsNil(), and UUID().

The documentation for this class was generated from the following files:
  • Base/Image/UUID.hh
  • Base/Image/UUID.cpp
Generated on Wed Jun 21 19:12:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::UUIDsortAscending Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::UUIDsortAscending

BIAS::UUIDsortAscending Class Reference

Helper class for ascending sort of sequential BIAS::UUIDs Sample usage:. More...

#include <Base/Image/UUID.hh>

List of all members.

Public Member Functions

bool operator() (BIAS::UUID &a, BIAS::UUID &b)

Detailed Description

Helper class for ascending sort of sequential BIAS::UUIDs Sample usage:.

    #include <algorithm>
    std::vector<BIAS::UUID> v;
    std::sort(v.begin(), v.end(), BIAS::UUIDsortAscending() );
Todo:
operator< of UUD may be inverse, TOOD: compare uuid_compare on Linux and WIN32.
Author:
Jan Woetzel

Definition at line 319 of file UUID.hh.

Member Function Documentation

bool BIAS::UUIDsortAscending::operator() | ( | BIAS::UUID & | a,
 |  | BIAS::UUID & | b
 | ) | [inline]

Definition at line 321 of file UUID.hh.

The documentation for this class was generated from the following file:
  • Base/Image/UUID.hh
Generated on Wed Jun 21 19:12:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Vardesc Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Vardesc Struct Reference

#include <MathAlgo/minpack/f2c_gnu011.h>

List of all members.

Public Types

typedef char * | addr
typedef char * | addr
typedef ftnlen * | dims
typedef ftnlen * | dims
typedef char * | name
typedef char * | name
typedef int | type
typedef int | type

Detailed Description

Definition at line 142 of file f2c_gnu011.h.

Member Typedef Documentation

typedef char* Vardesc::addr

Definition at line 140 of file win32_f2c.h.

typedef char* Vardesc::addr

Definition at line 144 of file f2c_gnu011.h.

typedef ftnlen* Vardesc::dims

Definition at line 141 of file win32_f2c.h.

typedef ftnlen* Vardesc::dims

Definition at line 145 of file f2c_gnu011.h.

typedef char* Vardesc::name

Definition at line 139 of file win32_f2c.h.

typedef char* Vardesc::name

Definition at line 143 of file f2c_gnu011.h.

typedef int Vardesc::type

Definition at line 142 of file win32_f2c.h.

typedef int Vardesc::type

Definition at line 146 of file f2c_gnu011.h.

The documentation for this struct was generated from the following files:
  • MathAlgo/minpack/f2c_gnu011.h
  • MathAlgo/minpack/win32_f2c.h
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: vector Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

vector Class Reference

Inheritance diagram for vector:

[legend]
The documentation for this class was generated from the following file:
  • Image/PyramidImage.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Vector< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Vector

BIAS::Vector< T > Class Template Reference
[Matrix and Vector Classes]

class for column vectors with arbitrary size More...

#include <Base/Math/Vector.hh>

Inheritance diagram for BIAS::Vector< T >:

[legend]
Collaboration diagram for BIAS::Vector< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

const iterator | begin () const
iterator begin ()
Subscript | dim () const
double | Dist (const Vector< T > &vec) const
Return the euclidian distance of 2 vectors.
Vector< T > | ElementwiseProduct (const Vector< T > &arg) const
multiply this with arg elementwise and return the result
void | ElementwiseProduct (const Vector< T > &arg, Vector< T > &dest) const
multiply this with arg elementwise and store the result in dest
const iterator | end () const
iterator end ()
void | Fill (const T &scalar)
fills complete Vector with scalar value
T * | GetData () const
get the pointer to the data array of the vector (for faster direct memory access)
T * | GetDataLast () const
Get the pointer to last element of the data array.
bool | IsZero () const
void | KroneckerProduct (const Vector< T > &arg, Vector< T > &dst) const
kronecker product
Subscript | lbound () const
double | Length () const
returns the Euclidean Length of the Vector
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const T &scalar, Vector< T > &res) const
multiply components with scalar storing result in res
void | MultiplyIP (const T &scalar)
in place multiplication with scalar
Vector< T > & | newsize (Subscript N)
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c| + .
double | NormL2 () const
Return the L2 norm: sqrt(a^1 + a^2 + .
void | operator *= (T scalar)
bool | operator!= (const Vector< T > &vec) const
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
void | operator+= (const Vector< T > &vec)
void | operator-= (const Vector< T > &vec)
void | operator/= (T scalar)
Vector< T > & | operator= (const Vector< T > &vec)
assignment operator calling corresponding operator from base class "TNT::Vector" if appropriate
Vector< T > & | operator= (const TNT::Vector< T > &vec)
assignment operators calling corresponding operator from base class "TNT::Vector" if appropriate
bool | operator== (const Vector< T > &vec) const
const_reference | operator[] (Subscript i) const
reference | operator[] (Subscript i)
Matrix< T > | OuterProduct (const Vector< T > &v) const
outer product, constructs a matrix.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScalarProduct (const Vector< T > &argvec, T &result) const
scalar product (inner product) of two vectors returning a scalar, storing the result in result
T | ScalarProduct (const Vector< T > &argvec) const
scalar product (inner product) of two vectors returning a scalr
void | Set (const T &scalar)
void SetZero ()
aequivalent to matrix call
Subscript | size () const
unsigned int | Size () const
length of the vector
void | SubIP (const Vector< T > &argmat)
in place subtracting
Vector< T > | SubVec (int length, int offset=0) const
returns the subvector with elements between offset and offset+length-1
Vector (const Vector4< T > &v)
Vector (const Vector3< T > &v)
Vector (const Vector2< T > &v)
Vector (const TNT::Vector< T > &v)
Vector (const Vector< T > &v)
Vector (int rows, const T *v)
Vector (int rows, const T &value)
assignment with a constant value for all elements (=set)
Vector (const int rows, const std::string &s)
JW.
Vector (const int rows)
Vector ()
virtual | ~Vector ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript N)
void | set (const T &val)

Protected Attributes

Subscript n_
T * v_
T * vm1_

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const Matrix< T > &mat, const Vector2< T > &vec)
T | operator * (const Vector< T > &v, const Vector< T > &argvec)
Vector< T > | operator * (const T &scalar, const Vector< T > &v)
Vector< T > | operator * (const Vector< T > &v, const T &scalar)
std::ostream & | operator<< (std::ostream &os, const BIAS::Vector< T > &vec)

Detailed Description

template<class T = double>
class BIAS::Vector< T >

class for column vectors with arbitrary size

class Vector is the vector class that should be used by common BIAS algorithms and data structures. It is derived from TNT::Vector to inherit the basic operations and algorithm. Special implementations should be done here and NOT in TNT:Vector because the true 'base' Matrix class "TNT::Vector" should be interchangeable and aside from this maintained by NIST.

changed from BIAS to BIAS 11/05/2002 (jw)

The Vector is in row-major order (=n rows, 1 column)

Author:
Jan Woetzel

Definition at line 65 of file Vector.hh.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Vector< T >::const_iterator [inherited]

Definition at line 62 of file vec.h.

template<class T>
typedef const T& TNT::Vector< T >::const_reference [inherited]

Definition at line 63 of file vec.h.

template<class T>
typedef T TNT::Vector< T >::element_type [inherited]

Definition at line 58 of file vec.h.

template<class T>
typedef T* TNT::Vector< T >::iterator [inherited]

Definition at line 60 of file vec.h.

template<class T>
typedef T* TNT::Vector< T >::pointer [inherited]

Definition at line 59 of file vec.h.

template<class T>
typedef T& TNT::Vector< T >::reference [inherited]

Definition at line 61 of file vec.h.

template<class T>
typedef Subscript TNT::Vector< T >::size_type [inherited]

Definition at line 56 of file vec.h.

template<class T>
typedef T TNT::Vector< T >::value_type [inherited]

Definition at line 57 of file vec.h.

Constructor & Destructor Documentation

template<class T>
Vector::~Vector ( ) [virtual]

Reimplemented from TNT::Vector< T >.

Definition at line 40 of file Vector.cpp.

template<class T = double>
BIAS::Vector< T >::Vector ( ) [inline]

Reimplemented from TNT::Vector< T >.

Definition at line 71 of file Vector.hh.

template<class T = double>
BIAS::Vector< T >::Vector ( const int rows ) [inline, explicit]

Definition at line 73 of file Vector.hh.

template<class T>
Vector::Vector | ( | const int | rows,
 |  | const std::string & | s
 | ) | [explicit]

JW.

Definition at line 44 of file Vector.cpp.

template<class T = double>
BIAS::Vector< T >::Vector | ( | int | rows,
 |  | const T & | value
 | ) | [inline]

assignment with a constant value for all elements (=set)

Author:
Jan Woetzel

Definition at line 83 of file Vector.hh.

template<class T = double>
BIAS::Vector< T >::Vector | ( | int | rows,
 |  | const T * | v
 | ) | [inline]

Definition at line 85 of file Vector.hh.

template<class T = double>
BIAS::Vector< T >::Vector ( const Vector< T > & v ) [inline]

Definition at line 87 of file Vector.hh.

template<class T = double>
BIAS::Vector< T >::Vector ( const TNT::Vector< T > & v ) [inline]

Author:
JMF

Reimplemented from TNT::Vector< T >.

Definition at line 91 of file Vector.hh.

template<class T>
Vector::Vector ( const Vector2< T > & v )

Author:
fw

Definition at line 50 of file Vector.cpp.

template<class T>
Vector::Vector ( const Vector3< T > & v )

Author:
fw

Definition at line 55 of file Vector.cpp.

template<class T>
Vector::Vector ( const Vector4< T > & v )

Author:
fw

Definition at line 60 of file Vector.cpp.

Member Function Documentation

template<class T>
const iterator TNT::Vector< T >::begin ( ) const [inline, inherited]

Definition at line 159 of file vec.h.

template<class T>
iterator TNT::Vector< T >::begin ( ) [inline, inherited]

Definition at line 157 of file vec.h.

Referenced by Upper_symmetric_eigenvalue_solve(), and TNT::Upper_symmetric_eigenvalue_solve().

template<class T>
void TNT::Vector< T >::copy ( const T * v ) [inline, protected, inherited]

Definition at line 87 of file vec.h.

Referenced by TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T>
void TNT::Vector< T >::destroy ( ) [inline, protected, inherited]

Definition at line 142 of file vec.h.

Referenced by TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::~Vector().

template<class T>
Subscript TNT::Vector< T >::dim ( ) const [inline, inherited]

Definition at line 250 of file vec.h.

Referenced by TNT::dot_prod(), TNT::matmult(), TNT::operator *(), TNT::operator+(), TNT::operator-(), TNT::QR_solve(), and TNT::R_solve().

template<class T>
double BIAS::Vector< T >::Dist ( const Vector< T > & vec ) const [inline]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

Definition at line 379 of file Vector.hh.

References BIASASSERT, BIAS::Vector< T >::GetData(), BIAS::Vector< T >::GetDataLast(), TNT::Vector< T >::size(), and T.

template<class T>
Vector< T > BIAS::Vector< T >::ElementwiseProduct ( const Vector< T > & arg ) const [inline]

multiply this with arg elementwise and return the result

Author:
woelk 12/2004

Definition at line 406 of file Vector.hh.

References BIAS::Vector< T >::ElementwiseProduct().

template<class T>
void BIAS::Vector< T >::ElementwiseProduct | ( | const Vector< T > & | arg,
 |  | Vector< T > & | dest
 | ) | const [inline]

multiply this with arg elementwise and store the result in dest

Author:
woelk 12/2004

Definition at line 395 of file Vector.hh.

References BIASASSERT, TNT::Vector< T >::newsize(), BIAS::Vector< T >::Size(), and TNT::Vector< T >::size().

Referenced by BIAS::Vector< T >::ElementwiseProduct(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMeanVariance(), BIAS::Condensation::GetVariance(), and BIAS::Condensation::GetWeightedVariance().

template<class T>
const iterator TNT::Vector< T >::end ( ) const [inline, inherited]

Definition at line 160 of file vec.h.

template<class T>
iterator TNT::Vector< T >::end ( ) [inline, inherited]

Definition at line 158 of file vec.h.

template<class T>
void Vector::Fill ( const T & scalar )

fills complete Vector with scalar value

Definition at line 103 of file Vector.cpp.

References TNT::Vector< T >::operator=().

template<class T = double>
T* BIAS::Vector< T >::GetData ( ) const [inline]

get the pointer to the data array of the vector (for faster direct memory access)

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) -added const (jw. 03/12/2002)

Definition at line 190 of file Vector.hh.

Referenced by BIAS::SVD3x3::Compute(), BIAS::FFT::Compute(), BIAS::IntegralHistogram::CopyNoCheck(), BIAS::Vector< T >::Dist(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), BIAS::LevenbergMarquardt(), BIAS::LevenbergMarquardtExtended(), BIAS::Vector< T >::NormL1(), BIAS::Vector< T >::NormL2(), BIAS::Vector< T >::operator *=(), BIAS::Vector< T >::operator+=(), BIAS::Vector< T >::operator-=(), BIAS::Vector< T >::operator/=(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::Vector< T >::operator==(), BIAS::Powell(), BIAS::PowellExtended(), and BIAS::PMatrixBase::SetFromVector().

template<class T = double>
T* BIAS::Vector< T >::GetDataLast ( ) const [inline]

Get the pointer to last element of the data array.

Author:
Ingo Thomsen
Date:
04/11/2002
Returns:
pointer to last element

Definition at line 197 of file Vector.hh.

Referenced by BIAS::Vector< T >::Dist(), BIAS::Vector< T >::NormL1(), and BIAS::Vector< T >::NormL2().

template<class T>
void TNT::Vector< T >::initialize ( Subscript N ) [inline, protected, inherited]

Definition at line 75 of file vec.h.

Referenced by TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T>
bool Vector::IsZero ( ) const

Returns:
true if all elements are equal zero JW

Definition at line 138 of file Vector.cpp.

References TNT::Vector< T >::size(), and T.

template<class T>
void Vector::KroneckerProduct | ( | const Vector< T > & | arg,
 |  | Vector< T > & | dst
 | ) | const

kronecker product

Author:
woelk 08/2004

Definition at line 122 of file Vector.cpp.

References TNT::Vector< T >::newsize(), and TNT::Vector< T >::size().

template<class T>
Subscript TNT::Vector< T >::lbound ( ) const [inline, inherited]

Definition at line 65 of file vec.h.

Referenced by TNT::QR_factor(), TNT::QR_solve(), and TNT::R_solve().

template<class T = double>
double BIAS::Vector< T >::Length ( ) const [inline]

returns the Euclidean Length of the Vector

Definition at line 130 of file Vector.hh.

template<class T>
bool Vector::Load ( const std::string & filename )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

Definition at line 162 of file Vector.cpp.

template<class T>
void BIAS::Vector< T >::Multiply | ( | const T & | scalar,
 |  | Vector< T > & | res
 | ) | const [inline]

multiply components with scalar storing result in res

Author:
Ingo Thomsen tested(03/11/2002)

Definition at line 340 of file Vector.hh.

References TNT::Vector< T >::size(), and TNT::Vector< T >::v_.

Referenced by BIAS::Vector< T >::operator *().

template<class T = double>
void BIAS::Vector< T >::MultiplyIP ( const T & scalar ) [inline]

in place multiplication with scalar

Author:
Ingo Thomsen untested

Definition at line 177 of file Vector.hh.

Referenced by BIAS::Condensation::CalculateMean_(), and BIAS::PMatrixEstimation::ComputeRotationCenter().

template<class T>
Vector<T>& TNT::Vector< T >::newsize ( Subscript N ) [inline, inherited]

Definition at line 213 of file vec.h.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::FilterMask::CreateFloatFilter(), TNT::eigenproblem_special_quadratic_matrix_solve(), TNT::eigenvalue_solve(), BIAS::Vector< T >::ElementwiseProduct(), General_singular_value_decomposition(), BIAS::SVD::GetLeftNullvector(), BIAS::FFT::GetMagnitude(), BIAS::CondensHisto::GetMaxValue(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMeanVariance(), BIAS::SVD::GetNullvector(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::FFT::GetPhase(), GetSystem(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Vector< T >::KroneckerProduct(), main(), MySqTransform(), TNT::Fortran_Sparse_Vector< T >::newsize(), TNT::Fortran_Sparse_Col_Matrix< T >::newsize(), TNT::operator>>(), TNT::QR_factor(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::LeastSquaresSVD::Solve(), BIAS::SVD3x3::SVD3x3(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::LeastSquaresSVD::WeightedSolve().

template<class T>
T BIAS::Vector< T >::NormL1 ( ) const [inline]

Return the L1 norm: |a| + |b| + |c| + .

..

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 358 of file Vector.hh.

References BIAS::Vector< T >::GetData(), BIAS::Vector< T >::GetDataLast(), and T.

Referenced by BIAS::FilterMask::ComputeIntPrecisionBits().

template<class T>
double BIAS::Vector< T >::NormL2 ( ) const [inline]

Return the L2 norm: sqrt(a^1 + a^2 + .

..)

Author:
Ingo Thomsen
Date:
04/11/2002

Definition at line 368 of file Vector.hh.

References BIAS::Vector< T >::GetData(), BIAS::Vector< T >::GetDataLast(), and T.

Referenced by BIAS::PMatrixEstimation::ComputeRotationCenter().

template<class T>
void BIAS::Vector< T >::operator *= ( T scalar ) [inline]

Definition at line 285 of file Vector.hh.

References BIAS::Vector< T >::GetData(), TNT::Vector< T >::size(), and T.

template<class T = double>
bool BIAS::Vector< T >::operator!= ( const Vector< T > & vec ) const [inline]

Definition at line 125 of file Vector.hh.

template<class T>
const_reference TNT::Vector< T >::operator() ( Subscript i ) const [inline, inherited]

Definition at line 270 of file vec.h.

template<class T>
reference TNT::Vector< T >::operator() ( Subscript i ) [inline, inherited]

Definition at line 261 of file vec.h.

template<class T>
void BIAS::Vector< T >::operator+= ( const Vector< T > & vec ) [inline]

Definition at line 261 of file Vector.hh.

References BIASASSERT, BIAS::Vector< T >::GetData(), TNT::Vector< T >::size(), and T.

template<class T>
void BIAS::Vector< T >::operator-= ( const Vector< T > & vec ) [inline]

Definition at line 273 of file Vector.hh.

References BIASASSERT, BIAS::Vector< T >::GetData(), TNT::Vector< T >::size(), and T.

template<class T>
void BIAS::Vector< T >::operator/= ( T scalar ) [inline]

Author:
woelk 12/2004

Definition at line 296 of file Vector.hh.

References BIAS::Vector< T >::GetData(), BIAS::Vector< T >::Size(), TNT::Vector< T >::size(), and T.

template<class T = double>
Vector<T>& BIAS::Vector< T >::operator= ( const Vector< T > & vec ) [inline]

assignment operator calling corresponding operator from base class "TNT::Vector" if appropriate

Author:
grest

Definition at line 111 of file Vector.hh.

template<class T>
Vector< T > & Vector::operator= ( const TNT::Vector< T > & vec )

assignment operators calling corresponding operator from base class "TNT::Vector" if appropriate

Author:
Jan Woetzel (02/25/2002)

Reimplemented from TNT::Vector< T >.

Definition at line 96 of file Vector.cpp.

References TNT::Vector< T >::operator=().

template<class T>
bool BIAS::Vector< T >::operator== ( const Vector< T > & vec ) const [inline]

Definition at line 307 of file Vector.hh.

References BIAS::Vector< T >::GetData(), res, TNT::Vector< T >::size(), and T.

template<class T>
const_reference TNT::Vector< T >::operator[] ( Subscript i ) const [inline, inherited]

Definition at line 288 of file vec.h.

template<class T>
reference TNT::Vector< T >::operator[] ( Subscript i ) [inline, inherited]

Definition at line 279 of file vec.h.

template<class T>
Matrix< T > Vector::OuterProduct ( const Vector< T > & v ) const

outer product, constructs a matrix.

Often written as v * v^T for col vectors

Author:
Daniel Grest, Oct 2002 tested

Definition at line 110 of file Vector.cpp.

References TNT::Vector< T >::size(), and T.

template<class T>
bool Vector::Save ( const std::string & filename ) const

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

Definition at line 177 of file Vector.cpp.

template<class T>
void BIAS::Vector< T >::ScalarProduct | ( | const Vector< T > & | argvec,
 |  | T & | result
 | ) | const [inline]

scalar product (inner product) of two vectors returning a scalar, storing the result in result

Author:
Ingo Thomsen tested(03/11/2002)

Definition at line 326 of file Vector.hh.

References BIASASSERT, TNT::Vector< T >::size(), and TNT::Vector< T >::v_.

template<class T>
T BIAS::Vector< T >::ScalarProduct ( const Vector< T > & argvec ) const [inline]

scalar product (inner product) of two vectors returning a scalr

Author:
Ingo Thomsen tested(03/11/2002)

Definition at line 318 of file Vector.hh.

References T.

Referenced by BIAS::CondensImg::DrawMean(), BIAS::Vector< T >::operator *(), and BIAS::GaussHelmert::Solve().

template<class T>
void TNT::Vector< T >::set ( const T & val ) [inline, protected, inherited]

Definition at line 113 of file vec.h.

Referenced by TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T = double>
void BIAS::Vector< T >::Set ( const T & scalar ) [inline]

Definition at line 139 of file Vector.hh.

Referenced by BIAS::Condensation::CalculateMean_(), BIAS::Condensation::Init(), BIAS::CondensImg::InitModelDefaults(), and BIAS::CondensHisto::InitModelDefaults().

template<class T = double>
void BIAS::Vector< T >::SetZero ( ) [inline]

aequivalent to matrix call

Definition at line 142 of file Vector.hh.

Referenced by BIAS::CondensHisto::GetMeanVariance(), BIAS::Condensation::GetWeightedVariance(), main(), BIAS::PoseParametrization::PoseParametrization(), and BIAS::GaussHelmert::Solve().

template<class T>
Subscript TNT::Vector< T >::size ( ) const [inline, inherited]

Definition at line 255 of file vec.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::XMLIO::addAttribute(), BIAS::Condensation::AddOffsets_(), BIAS::IntegralHistogram::CalcSimilarity(), BIAS::FilterMask::ComputeIntPrecisionBits(), BIAS::IntegralHistogram::CopyNoCheck(), BIAS::FilterMask::CreateFloatFilter(), BIAS::Vector< T >::Dist(), BIAS::Tracker< StorageType, CalculationType >::DumpResults(), BIAS::Vector< T >::ElementwiseProduct(), BIAS::Parametrization::EMatrixToParams(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::FMatrixEstimation::GetDetPolynomial(), BIAS::SVD::GetSingularValue(), BIAS::HomgPoint3D::HomgPoint3D(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Vector< T >::IsZero(), BIAS::Vector< T >::KroneckerProduct(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), BIAS::Matrix< T >::Mult(), BIAS::Vector< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), BIAS::Vector< T >::operator *(), BIAS::Vector< T >::operator *=(), BIAS::Vector3< T >::operator+(), BIAS::Vector< T >::operator+=(), BIAS::Vector< T >::operator-=(), BIAS::Vector< T >::operator/=(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::Vector< T >::operator==(), TNT::operator>>(), BIAS::Vector< T >::OuterProduct(), BIAS::Parametrization::ParamsToEMatrix(), TNT::QR_factor(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::Vector< T >::ScalarProduct(), BIAS::Vector3< T >::Set(), BIAS::HomgPoint2D::Set(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCQ(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::HomgPlane3D::SetFromVector(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), BIAS::Vector< T >::SubIP(), BIAS::ProjectionParametersBase::Transform_(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), BIAS::Vector2< T >::Vector2(), BIAS::Vector3< T >::Vector3(), BIAS::Vector4< T >::Vector4(), and BIAS::LeastSquaresSVD::WeightedSolve().

template<class T = double>
unsigned int BIAS::Vector< T >::Size ( ) const [inline]

length of the vector

Definition at line 134 of file Vector.hh.

Referenced by BIAS::FFT::Compute(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvFloatVert_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntHori_(), BIAS::Convolution< InputStorageType, OutputStorageType >::ConvIntVert_(), BIAS::FilterMask::CreateFloatFilter(), BIAS::Vector< T >::ElementwiseProduct(), GenerateNoisyMeasurements(), BIAS::FFT::GetMagnitude(), BIAS::FFT::GetPhase(), MyConstTransform(), MyLinTransform(), MySqTransform(), BIAS::Vector< T >::operator/=(), BIAS::PMatrixBase::Parametrization2R_(), BIAS::Powell(), BIAS::PowellExtended(), Process(), BIAS::SVD::Rank(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::Tensor3D< T >::SetFromVector(), BIAS::VectorPanel::SetVector(), BIAS::Vector< T >::SubVec(), and BIAS::UnscentedTransform::Transform().

template<class T>
void BIAS::Vector< T >::SubIP ( const Vector< T > & argmat ) [inline]

in place subtracting

Author:
Ingo Thomsen untested

Definition at line 348 of file Vector.hh.

References BIASASSERT, TNT::Vector< T >::size(), and TNT::Vector< T >::v_.

template<class T>
Vector< T > Vector::SubVec | ( | int | length,
 |  | int | offset = 0
 | ) | const

returns the subvector with elements between offset and offset+length-1

Author:
Dennis Herzog
Date:
2005-07-29

Definition at line 149 of file Vector.cpp.

References BIASASSERT, res, and BIAS::Vector< T >::Size().

Friends And Related Function Documentation

template<class T = double>
Vector< T > operator * | ( | const Matrix< T > & | mat,
 |  | const Vector2< T > & | vec
 | ) | [related]

Definition at line 559 of file Operators.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and res.

template<class T = double>
T operator * | ( | const Vector< T > & | v,
 |  | const Vector< T > & | argvec
 | ) | [related]

Definition at line 238 of file Operators.hh.

References BIAS::Vector< T >::ScalarProduct(), and T.

template<class T = double>
Vector< T > operator * | ( | const T & | scalar,
 |  | const Vector< T > & | v
 | ) | [related]

Definition at line 80 of file Operators.hh.

References BIAS::Vector< T >::Multiply(), res, and TNT::Vector< T >::size().

template<class T = double>
Vector< T > operator * | ( | const Vector< T > & | v,
 |  | const T & | scalar
 | ) | [related]

Definition at line 71 of file Operators.hh.

References res.

template<class T = double>
std::ostream & operator<< | ( | std::ostream & | os,
 |  | const BIAS::Vector< T > & | vec
 | ) | [related]

Output with streams

Author:
woelk 10/2004 major corrections by Jan Woetzel/Sun Min 11/2004

Definition at line 414 of file Vector.hh.

Member Data Documentation

template<class T>
Subscript TNT::Vector< T >::n_ [protected, inherited]

Definition at line 70 of file vec.h.

Referenced by TNT::Vector< FM_INT >::copy(), TNT::Vector< FM_INT >::dim(), TNT::Vector< FM_INT >::end(), TNT::Vector< FM_INT >::initialize(), TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator()(), TNT::Vector< FM_INT >::operator=(), TNT::Vector< FM_INT >::operator[](), TNT::Vector< FM_INT >::set(), TNT::Vector< FM_INT >::size(), and TNT::Vector< FM_INT >::Vector().

template<class T>
T* TNT::Vector< T >::v_ [protected, inherited]

Definition at line 68 of file vec.h.

Referenced by TNT::Vector< FM_INT >::begin(), TNT::Vector< FM_INT >::copy(), TNT::Vector< FM_INT >::destroy(), TNT::Vector< FM_INT >::end(), TNT::Vector< FM_INT >::initialize(), BIAS::Vector< T >::Multiply(), TNT::Vector< FM_INT >::operator=(), TNT::Vector< FM_INT >::operator[](), BIAS::Vector< T >::ScalarProduct(), TNT::Vector< FM_INT >::set(), BIAS::Vector< T >::SubIP(), and TNT::Vector< FM_INT >::Vector().

template<class T>
T* TNT::Vector< T >::vm1_ [protected, inherited]

Definition at line 69 of file vec.h.

Referenced by TNT::Vector< FM_INT >::destroy(), TNT::Vector< FM_INT >::initialize(), and TNT::Vector< FM_INT >::operator()().

The documentation for this class was generated from the following files:
  • Base/Math/Vector.hh
  • Base/Math/Operators.hh
  • Base/Math/Vector.cpp
Generated on Wed Jun 21 19:12:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Vector< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Vector

TNT::Vector< T > Class Template Reference

#include <Base/Math/tnt/vec.h>

Inheritance diagram for TNT::Vector< T >:

[legend]
Collaboration diagram for TNT::Vector< T >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef Subscript | size_type
typedef T | value_type

Public Member Functions

const iterator | begin () const
iterator begin ()
Subscript | dim () const
const iterator | end () const
iterator end ()
Subscript | lbound () const
Vector< T > & | newsize (Subscript N)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Vector< T > & | operator= (const T &scalar)
Vector< T > & | operator= (const Vector< T > &A)
const_reference | operator[] (Subscript i) const
reference | operator[] (Subscript i)
Subscript | size () const
Vector (const Subscript N, const std::string &s)
Vector (Subscript N, const T *v)
Vector (Subscript N, const T &value=T())
Vector (const Vector< T > &A)
Vector ()
~Vector ()

Protected Member Functions

void | copy (const T *v)
void destroy ()
void | initialize (Subscript N)
void | set (const T &val)

Protected Attributes

Subscript n_
T * v_
T * vm1_

Detailed Description

template<class T>
class TNT::Vector< T >

Definition at line 50 of file vec.h.

Member Typedef Documentation

template<class T>
typedef const T* TNT::Vector< T >::const_iterator

Definition at line 62 of file vec.h.

template<class T>
typedef const T& TNT::Vector< T >::const_reference

Definition at line 63 of file vec.h.

template<class T>
typedef T TNT::Vector< T >::element_type

Definition at line 58 of file vec.h.

template<class T>
typedef T* TNT::Vector< T >::iterator

Definition at line 60 of file vec.h.

template<class T>
typedef T* TNT::Vector< T >::pointer

Definition at line 59 of file vec.h.

template<class T>
typedef T& TNT::Vector< T >::reference

Definition at line 61 of file vec.h.

template<class T>
typedef Subscript TNT::Vector< T >::size_type

Definition at line 56 of file vec.h.

template<class T>
typedef T TNT::Vector< T >::value_type

Definition at line 57 of file vec.h.

Constructor & Destructor Documentation

template<class T>
TNT::Vector< T >::~Vector ( ) [inline]

Reimplemented in BIAS::Vector< T >, BIAS::Vector< KLT_TYPE >, BIAS::Vector< double >, BIAS::Vector< PP_TYPE >, BIAS::Vector< int >, BIAS::Vector< FM_FLOAT >, and BIAS::Vector< FM_INT >.

Definition at line 164 of file vec.h.

template<class T>
TNT::Vector< T >::Vector ( ) [inline]

Reimplemented in BIAS::Vector< T >, BIAS::Vector< KLT_TYPE >, BIAS::Vector< double >, BIAS::Vector< PP_TYPE >, BIAS::Vector< int >, BIAS::Vector< FM_FLOAT >, and BIAS::Vector< FM_INT >.

Definition at line 171 of file vec.h.

template<class T>
TNT::Vector< T >::Vector ( const Vector< T > & A ) [inline]

Reimplemented in BIAS::Vector< T >.

Definition at line 173 of file vec.h.

template<class T>
TNT::Vector< T >::Vector | ( | Subscript | N,
 |  | const T & | value = T()
 | ) | [inline]

Definition at line 179 of file vec.h.

template<class T>
TNT::Vector< T >::Vector | ( | Subscript | N,
 |  | const T * | v
 | ) | [inline]

Definition at line 185 of file vec.h.

template<class T>
TNT::Vector< T >::Vector | ( | const Subscript | N,
 |  | const std::string & | s
 | ) | [inline]

Definition at line 200 of file vec.h.

Member Function Documentation

template<class T>
const iterator TNT::Vector< T >::begin ( ) const [inline]

Definition at line 159 of file vec.h.

template<class T>
iterator TNT::Vector< T >::begin ( ) [inline]

Definition at line 157 of file vec.h.

Referenced by Upper_symmetric_eigenvalue_solve(), and TNT::Upper_symmetric_eigenvalue_solve().

template<class T>
void TNT::Vector< T >::copy ( const T * v ) [inline, protected]

Definition at line 87 of file vec.h.

Referenced by TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T>
void TNT::Vector< T >::destroy ( ) [inline, protected]

Definition at line 142 of file vec.h.

Referenced by TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::~Vector().

template<class T>
Subscript TNT::Vector< T >::dim ( ) const [inline]

Definition at line 250 of file vec.h.

Referenced by TNT::dot_prod(), TNT::matmult(), TNT::operator *(), TNT::operator+(), TNT::operator-(), TNT::QR_solve(), and TNT::R_solve().

template<class T>
const iterator TNT::Vector< T >::end ( ) const [inline]

Definition at line 160 of file vec.h.

template<class T>
iterator TNT::Vector< T >::end ( ) [inline]

Definition at line 158 of file vec.h.

template<class T>
void TNT::Vector< T >::initialize ( Subscript N ) [inline, protected]

Definition at line 75 of file vec.h.

Referenced by TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T>
Subscript TNT::Vector< T >::lbound ( ) const [inline]

Definition at line 65 of file vec.h.

Referenced by TNT::QR_factor(), TNT::QR_solve(), and TNT::R_solve().

template<class T>
Vector<T>& TNT::Vector< T >::newsize ( Subscript N ) [inline]

Definition at line 213 of file vec.h.

Referenced by BIAS::Binomial< InputStorageType, OutputStorageType >::_CalculateKernel(), BIAS::FilterMask::CreateFloatFilter(), TNT::eigenproblem_special_quadratic_matrix_solve(), TNT::eigenvalue_solve(), BIAS::Vector< T >::ElementwiseProduct(), General_singular_value_decomposition(), BIAS::SVD::GetLeftNullvector(), BIAS::FFT::GetMagnitude(), BIAS::CondensHisto::GetMaxValue(), BIAS::CondensHisto::GetMaxVariance(), BIAS::CondensHisto::GetMeanVariance(), BIAS::SVD::GetNullvector(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::FFT::GetPhase(), GetSystem(), BIAS::Condensation::GetWeightedVariance(), BIAS::Condensation::Init(), BIAS::LeastSquaresBase::Init(), BIAS::Vector< T >::KroneckerProduct(), main(), MySqTransform(), TNT::Fortran_Sparse_Vector< T >::newsize(), TNT::Fortran_Sparse_Col_Matrix< T >::newsize(), TNT::operator>>(), TNT::QR_factor(), BIAS::FilterMask::ResetFloatFilter(), BIAS::FilterMask::ResetIntFilter(), BIAS::LeastSquaresSVD::Solve(), BIAS::SVD3x3::SVD3x3(), BIAS::Tracker< StorageType, CalculationType >::Tracker(), and BIAS::LeastSquaresSVD::WeightedSolve().

template<class T>
const_reference TNT::Vector< T >::operator() ( Subscript i ) const [inline]

Definition at line 270 of file vec.h.

template<class T>
reference TNT::Vector< T >::operator() ( Subscript i ) [inline]

Definition at line 261 of file vec.h.

template<class T>
Vector<T>& TNT::Vector< T >::operator= ( const T & scalar ) [inline]

Definition at line 244 of file vec.h.

template<class T>
Vector<T>& TNT::Vector< T >::operator= ( const Vector< T > & A ) [inline]

Reimplemented in BIAS::Vector< T >.

Definition at line 226 of file vec.h.

Referenced by BIAS::Vector< T >::Fill(), BIAS::Vector< FM_INT >::operator=(), and BIAS::Vector< T >::operator=().

template<class T>
const_reference TNT::Vector< T >::operator[] ( Subscript i ) const [inline]

Definition at line 288 of file vec.h.

template<class T>
reference TNT::Vector< T >::operator[] ( Subscript i ) [inline]

Definition at line 279 of file vec.h.

template<class T>
void TNT::Vector< T >::set ( const T & val ) [inline, protected]

Definition at line 113 of file vec.h.

Referenced by TNT::Vector< FM_INT >::operator=(), and TNT::Vector< FM_INT >::Vector().

template<class T>
Subscript TNT::Vector< T >::size ( ) const [inline]

Definition at line 255 of file vec.h.

Referenced by BIAS::SVD::AbsLeftNullspaceDim(), BIAS::SVD::AbsNullspaceDim(), BIAS::XMLIO::addAttribute(), BIAS::Condensation::AddOffsets_(), BIAS::IntegralHistogram::CalcSimilarity(), BIAS::FilterMask::ComputeIntPrecisionBits(), BIAS::IntegralHistogram::CopyNoCheck(), BIAS::FilterMask::CreateFloatFilter(), BIAS::Vector< T >::Dist(), BIAS::Tracker< StorageType, CalculationType >::DumpResults(), BIAS::Vector< T >::ElementwiseProduct(), BIAS::Parametrization::EMatrixToParams(), BIAS::SVD::General_Eigenproblem_GeneralMatrix_Lapack(), BIAS::FMatrixEstimation::GetDetPolynomial(), BIAS::SVD::GetSingularValue(), BIAS::HomgPoint3D::HomgPoint3D(), BIAS::Kalman::Init(), BIAS::SVD::Invert(), BIAS::Vector< T >::IsZero(), BIAS::Vector< T >::KroneckerProduct(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), BIAS::Matrix< T >::Mult(), BIAS::Vector< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), BIAS::Vector< T >::operator *(), BIAS::Vector< T >::operator *=(), BIAS::Vector3< T >::operator+(), BIAS::Vector< T >::operator+=(), BIAS::Vector< T >::operator-=(), BIAS::Vector< T >::operator/=(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::Vector< T >::operator==(), TNT::operator>>(), BIAS::Vector< T >::OuterProduct(), BIAS::Parametrization::ParamsToEMatrix(), TNT::QR_factor(), BIAS::SVD::RelLeftNullspaceDim(), BIAS::SVD::RelNullspaceDim(), BIAS::FilterMask::ResetFloatFilter(), BIAS::Vector< T >::ScalarProduct(), BIAS::Vector3< T >::Set(), BIAS::HomgPoint2D::Set(), BIAS::Matrix< T >::SetCol(), BIAS::PoseParametrization::SetCQ(), BIAS::Matrix3x3< T >::SetFromVector(), BIAS::HomgPlane3D::SetFromVector(), BIAS::Matrix< T >::SetRow(), BIAS::SVD::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::GaussHelmert::Solve(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), BIAS::Vector< T >::SubIP(), BIAS::ProjectionParametersBase::Transform_(), BIAS::Kalman::Update(), Upper_symmetric_eigenvalue_solve(), BIAS::Vector2< T >::Vector2(), BIAS::Vector3< T >::Vector3(), BIAS::Vector4< T >::Vector4(), and BIAS::LeastSquaresSVD::WeightedSolve().

Member Data Documentation

template<class T>
Subscript TNT::Vector< T >::n_ [protected]

Definition at line 70 of file vec.h.

Referenced by TNT::Vector< FM_INT >::copy(), TNT::Vector< FM_INT >::dim(), TNT::Vector< FM_INT >::end(), TNT::Vector< FM_INT >::initialize(), TNT::Vector< FM_INT >::newsize(), TNT::Vector< FM_INT >::operator()(), TNT::Vector< FM_INT >::operator=(), TNT::Vector< FM_INT >::operator[](), TNT::Vector< FM_INT >::set(), TNT::Vector< FM_INT >::size(), and TNT::Vector< FM_INT >::Vector().

template<class T>
T* TNT::Vector< T >::v_ [protected]

Definition at line 68 of file vec.h.

Referenced by TNT::Vector< FM_INT >::begin(), TNT::Vector< FM_INT >::copy(), TNT::Vector< FM_INT >::destroy(), TNT::Vector< FM_INT >::end(), TNT::Vector< FM_INT >::initialize(), BIAS::Vector< T >::Multiply(), TNT::Vector< FM_INT >::operator=(), TNT::Vector< FM_INT >::operator[](), BIAS::Vector< T >::ScalarProduct(), TNT::Vector< FM_INT >::set(), BIAS::Vector< T >::SubIP(), and TNT::Vector< FM_INT >::Vector().

template<class T>
T* TNT::Vector< T >::vm1_ [protected]

Definition at line 69 of file vec.h.

Referenced by TNT::Vector< FM_INT >::destroy(), TNT::Vector< FM_INT >::initialize(), and TNT::Vector< FM_INT >::operator()().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/vec.h
Generated on Wed Jun 21 19:13:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Vector2< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Vector2

BIAS::Vector2< T > Class Template Reference
[Matrix and Vector Classes]

class Vector2 contains a Vector of dim. More...

#include <Base/Math/Vector2.hh>

Inheritance diagram for BIAS::Vector2< T >:

[legend]
Collaboration diagram for BIAS::Vector2< T >:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector2< T > &argvec, Vector2< T > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const T &scalar, Vector2< T > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector2< T > &argvec)
in place adding
void | AddIP (const T &scalar)
Addition (in place) of an scalar.
BIAS::Vector2< T > | CoordEuclidianToPolar () const
coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y).
BIAS::Vector2< T > | CoordPolarToEuclidian () const
coordinate transform compute the euclidian coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.
void | Copy (const T *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector2< T > &vec) const
Return the euclidian distance of 2 vectors.
void | Divide (const Vector2< T > &vec, Vector2< T > &dest) const
void | Divide (const T &scalar, Vector2< T > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const Vector2< T > &vec)
elementwise Division (in place) by a vector
void | DivideIP (const T &scalar)
Division (in place) of an scalar.
Vector2< T > | ElementwiseDivision (const Vector2< T > &argvec) const
void | ElementwiseDivision (const Vector2< T > &argvec, Vector2< T > &destvec) const
Vector2< T > | ElementwiseProduct (const Vector2< T > &argvec) const
void | ElementwiseProduct (const Vector2< T > &argvec, Vector2< T > &destvec) const
multiply two vectors elementwise, storing the result in destvec
void Fill (T value)
T * GetData ()
const T * | GetData () const
get the data pointer the member function itself is const (before {.
T | GetW () const
T & GetW ()
T | GetX () const
T & GetX ()
read only access functions to use names instead of indizes
T | GetY () const
T & GetY ()
bool | IsZero () const
double | Length () const
return euclidian length
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const T &scalar, Vector2< T > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const T &scalar)
Multiplication (in place) of an scalar.
T | NormL1 () const
Return the L1 norm: |a| + |b|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2).
bool | operator!= (const Vector2< T > &arg) const
Comparison operator 'not equal'.
Vector2< T > & | operator= (const Vector2< T > &vec)
assignment operator
Vector2< T > & | operator= (const T &scalar)
assignment operator set the vector elementwise to scalar value
bool | operator== (const Vector2< T > &arg) const
Comparison operator 'equal'.
T & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const T & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix2x2< T > | OuterProduct (const BIAS::Vector2< T > &v) const
void | OuterProduct (const BIAS::Vector2< T > &v, BIAS::Matrix2x2< T > &mat) const
outer product, constructs a matrix (e.g.
T | Phi () const
T & Phi ()
polar form JW
T | Radius () const
T & Radius ()
polar form JW
bool | Save (const std::string &filename) const
method to save directly to a given filename.
T | ScalarProduct (const Vector2< T > &argvec) const
void | ScalarProduct (const Vector2< T > &argvec, T &result) const
scalar product of two vectors, storing the result in result
void | Set (const T &x, const T &y)
set elementwise with given scalar values
void | Set (const T &scalar)
set all elements to a scalar value
void | SetW (const T w)
void | SetX (const T x)
set (write) access functions to use names instead of indizes
void | SetY (const T y)
void SetZero ()
const int | Size () const
void | Sub (const Vector2< T > &argvec, Vector2< T > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const T &scalar, Vector2< T > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector2< T > &argvec)
in place subtraction
void | SubIP (const T &scalar)
Substraction (in place) of an scalar.
Vector2 (const Vector< T > &v)
cast constructor
Vector2 (char *s)
constructor with element assignment
Vector2 (const T *pv)
assignment with an array of values which is copied into this ones class members
Vector2 (const T v0, const T v1)
constructor with element assigment using explicit values
Vector2 (const T &scalar)
assignment with a constant value for all elements
Vector2 (const Vector2< T > &vec)
copy constructor
Vector2 ()
default constructor
~Vector2 ()
destructor

Protected Attributes

T | data_ [VECTOR2SIZE]

Related Functions

(Note that these are not member functions.)

Vector2< T > | operator * (const Matrix2x2< T > &mat, const Vector2< T > &vec)
T | operator * (const Vector2< T > &vec, const Vector2< T > &argvec)
Vector2< T > | operator * (const Vector2< T > &vec, const T &scalar)
Vector2< T > | operator+ (const Vector2< T > &vec, const Vector2< T > &argvec)
Vector2< T > | operator- (const Vector2< T > &vec, const Vector2< T > &argvec)
Vector2< T > | operator- (const Vector2< T > &vec, const T &scalar)
T | operator- (const Vector2< T > &v)
Vector2< T > | operator/ (const Vector2< T > &vec, const T &scalar)
bool | operator< (const Vector2< T > &a, const Vector2< T > &b)
bool | operator<= (const Vector2< T > &a, const Vector2< T > &b)
bool | operator> (const Vector2< T > &a, const Vector2< T > &b)
bool | operator>= (const Vector2< T > &a, const Vector2< T > &b)

Detailed Description

template<class T>
class BIAS::Vector2< T >

class Vector2 contains a Vector of dim.

2 and fixed dimension

It's elment type is templated. manual loop unrolling is used if possible. The Vector is in row-major order (2 rows, 1 column) the indizes begin with zero (to size-1)

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 72 of file Vector2.hh.

Constructor & Destructor Documentation

template<class T>
BIAS::Vector2< T >::~Vector2 ( ) [inline]

destructor

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 80 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( ) [inline]

default constructor

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 86 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const Vector2< T > & vec ) [inline]

copy constructor

Author:
Jan Woetzel alpha (03/05/2002)

Definition at line 91 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const T & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 98 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 | ( | const T | v0,
 |  | const T | v1
 | ) | [inline]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

Definition at line 106 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const T * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 116 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 123 of file Vector2.hh.

template<class T>
BIAS::Vector2< T >::Vector2 ( const Vector< T > & v )

cast constructor

Author:
Jan Woetzel alpha (03/22/2002)

Definition at line 43 of file Vector2.cpp.

References BIASASSERT, BIAS::Vector2< T >::data_, TNT::Vector< T >::size(), and VECTOR2SIZE.

Member Function Documentation

template<class T>
void BIAS::Vector2< T >::Add | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 498 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Add | ( | const T & | scalar,
 |  | Vector2< T > & | dest
 | ) | const [inline]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 418 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator+(), BIAS::operator+(), and BIAS::operator+=().

template<class T>
void BIAS::Vector2< T >::AddIP ( const Vector2< T > & argvec ) [inline]

in place adding

Author:
Ingo Thomsen tested

Definition at line 490 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::AddIP ( const T & scalar ) [inline]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 412 of file Vector2.hh.

Referenced by BIAS::operator+=().

template<class T>
BIAS::Vector2< T > BIAS::Vector2< T >::CoordEuclidianToPolar ( ) const

coordinate transform compute the polar coordinates (radius, phi) for (this) given eucldian point (x,y).

with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Definition at line 86 of file Vector2.cpp.

References BIASERR.

template<class T>
BIAS::Vector2< T > BIAS::Vector2< T >::CoordPolarToEuclidian ( ) const

coordinate transform compute the euclidian coord p=(x,y) for (this) given polarcoord (radius, phi) with radius : distance to center, phi : radian angle between positive x-axis and p=(x,y) assume (x,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Definition at line 56 of file Vector2.cpp.

References BIASERR.

template<class T>
void BIAS::Vector2< T >::Copy ( const T * pv ) [inline]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 139 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::Dist ( const Vector2< T > & vec ) const [inline]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

Definition at line 379 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Divide | ( | const Vector2< T > & | vec,
 |  | Vector2< T > & | dest
 | ) | const [inline]

Definition at line 474 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Divide | ( | const T & | scalar,
 |  | Vector2< T > & | dest
 | ) | const [inline]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

Definition at line 464 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator/().

template<class T>
void BIAS::Vector2< T >::DivideIP ( const Vector2< T > & vec ) [inline]

elementwise Division (in place) by a vector

Author:
JW

Definition at line 457 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::DivideIP ( const T & scalar ) [inline]

Division (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 451 of file Vector2.hh.

Referenced by BIAS::CameraViewController::MotionTranslation(), and BIAS::operator/=().

template<class T>
Vector2<T> BIAS::Vector2< T >::ElementwiseDivision ( const Vector2< T > & argvec ) const [inline]

Definition at line 330 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::ElementwiseDivision | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

Definition at line 323 of file Vector2.hh.

template<class T>
Vector2<T> BIAS::Vector2< T >::ElementwiseProduct ( const Vector2< T > & argvec ) const [inline]

Definition at line 314 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::ElementwiseProduct | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel (03/06/2002)

Definition at line 307 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Fill ( T value ) [inline]

Definition at line 519 of file Vector2.hh.

template<class T>
T* BIAS::Vector2< T >::GetData ( ) [inline]

Definition at line 195 of file Vector2.hh.

template<class T>
const T* BIAS::Vector2< T >::GetData ( ) const [inline]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 191 of file Vector2.hh.

Referenced by BIAS::HomgPoint2D::GetEuclidian(), BIAS::operator<<(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator=(), BIAS::operator>>(), and BIAS::Vector2< HOMGPOINT1D_TYPE >::Vector2().

template<class T>
T BIAS::Vector2< T >::GetW ( ) const [inline]

Definition at line 261 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetW ( ) [inline]

Definition at line 250 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::GetX ( ) const [inline]

Definition at line 255 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetX ( ) [inline]

read only access functions to use names instead of indizes

Returns:
the projective coordinate of the vector (they are usually not euclidian!)
Author:
Jan Woetzel untested (03/04/2002)

Definition at line 244 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::GetY ( ) const [inline]

Definition at line 258 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::GetY ( ) [inline]

Definition at line 247 of file Vector2.hh.

Referenced by BIAS::CameraViewController::MotionTranslationForward().

template<class T>
bool BIAS::Vector2< T >::IsZero ( ) const [inline]

Author:
Jan Woetzel

Definition at line 161 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::Length ( ) const [inline]

return euclidian length

Author:
JW

Definition at line 372 of file Vector2.hh.

template<class T>
bool BIAS::Vector2< T >::Load ( const std::string & filename )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

Definition at line 134 of file Vector2.cpp.

template<class T>
void BIAS::Vector2< T >::Multiply | ( | const T & | scalar,
 |  | Vector2< T > & | dest
 | ) | const [inline]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 444 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator *().

template<class T>
void BIAS::Vector2< T >::MultiplyIP ( const T & scalar ) [inline]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 438 of file Vector2.hh.

Referenced by BIAS::operator *=().

template<class T>
T BIAS::Vector2< T >::NormL1 ( ) const [inline]

Return the L1 norm: |a| + |b|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 358 of file Vector2.hh.

template<class T>
double BIAS::Vector2< T >::NormL2 ( ) const [inline]

Return the L2 norm: sqrt(a^2 + b^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 367 of file Vector2.hh.

Referenced by BIAS::Vector2< double >::CoordEuclidianToPolar(), and BIAS::ImageDraw< StorageType >::Line().

template<class T>
bool BIAS::Vector2< T >::operator!= ( const Vector2< T > & arg ) const [inline]

Comparison operator 'not equal'.

Author:
Ingo Thomsen tested

Definition at line 399 of file Vector2.hh.

template<class T>
Vector2<T>& BIAS::Vector2< T >::operator= ( const Vector2< T > & vec ) [inline]

assignment operator

Author:
grest

Reimplemented in BIAS::HomgPoint1D.

Definition at line 212 of file Vector2.hh.

template<class T>
Vector2<T>& BIAS::Vector2< T >::operator= ( const T & scalar ) [inline]

assignment operator set the vector elementwise to scalar value

Author:
Jan Woetzel alpha (02/28/2002)

Reimplemented in BIAS::HomgPoint1D.

Definition at line 204 of file Vector2.hh.

template<class T>
bool BIAS::Vector2< T >::operator== ( const Vector2< T > & arg ) const [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 392 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::operator[] ( const int i ) [inline]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 232 of file Vector2.hh.

template<class T>
const T& BIAS::Vector2< T >::operator[] ( const int i ) const [inline]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 222 of file Vector2.hh.

template<class T>
Matrix2x2<T> BIAS::Vector2< T >::OuterProduct ( const BIAS::Vector2< T > & v ) const [inline]

Definition at line 350 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::OuterProduct | ( | const BIAS::Vector2< T > & | v,
 |  | BIAS::Matrix2x2< T > & | mat
 | ) | const [inline]

outer product, constructs a matrix (e.g.

for covariance).

Author:
koeser 08/2005 (cloned from vector3)

Definition at line 341 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::Phi ( ) const [inline]

Definition at line 289 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::Phi ( ) [inline]

polar form JW

Definition at line 287 of file Vector2.hh.

template<class T>
T BIAS::Vector2< T >::Radius ( ) const [inline]

Definition at line 283 of file Vector2.hh.

template<class T>
T& BIAS::Vector2< T >::Radius ( ) [inline]

polar form JW

Definition at line 281 of file Vector2.hh.

template<class T>
bool BIAS::Vector2< T >::Save ( const std::string & filename ) const

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

Definition at line 149 of file Vector2.cpp.

template<class T>
T BIAS::Vector2< T >::ScalarProduct ( const Vector2< T > & argvec ) const [inline]

Definition at line 300 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::ScalarProduct | ( | const Vector2< T > & | argvec,
 |  | T & | result
 | ) | const [inline]

scalar product of two vectors, storing the result in result

Author:
Jan Woetzel untested

Definition at line 296 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Set | ( | const T & | x,
 |  | const T & | y
 | ) | [inline]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

Definition at line 171 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Set ( const T & scalar ) [inline]

set all elements to a scalar value

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 149 of file Vector2.hh.

Referenced by BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::ImageCanvasGLBase::InitMembers(), BIAS::CameraViewController::InitMembers(), BIAS::ImageDraw< StorageType >::Line(), and BIAS::Interpolator::Spline().

template<class T>
void BIAS::Vector2< T >::SetW ( const T w ) [inline]

Definition at line 276 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetX ( const T x ) [inline]

set (write) access functions to use names instead of indizes

Author:
Jan Woetzel untested (03/04/2002)

Definition at line 270 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetY ( const T y ) [inline]

Definition at line 273 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SetZero ( ) [inline]

Author:
Jan Woetzel

Definition at line 155 of file Vector2.hh.

Referenced by BIAS::CameraViewController::InitMembers().

template<class T>
const int BIAS::Vector2< T >::Size ( ) const [inline]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 180 of file Vector2.hh.

Referenced by BIAS::operator>>().

template<class T>
void BIAS::Vector2< T >::Sub | ( | const Vector2< T > & | argvec,
 |  | Vector2< T > & | destvec
 | ) | const [inline]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 514 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::Sub | ( | const T & | scalar,
 |  | Vector2< T > & | dest
 | ) | const [inline]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 431 of file Vector2.hh.

Referenced by BIAS::Vector2< T >::operator-(), and BIAS::operator-=().

template<class T>
void BIAS::Vector2< T >::SubIP ( const Vector2< T > & argvec ) [inline]

in place subtraction

Author:
Ingo Thomsen tested

Definition at line 506 of file Vector2.hh.

template<class T>
void BIAS::Vector2< T >::SubIP ( const T & scalar ) [inline]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 425 of file Vector2.hh.

Referenced by BIAS::operator-=().

Friends And Related Function Documentation

template<class T>
Vector2< T > operator * | ( | const Matrix2x2< T > & | mat,
 |  | const Vector2< T > & | vec
 | ) | [related]

Definition at line 574 of file Operators.hh.

References res.

template<class T>
T operator * | ( | const Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [related]

Definition at line 301 of file Operators.hh.

template<class T>
Vector2< T > operator * | ( | const Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Multiplication operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 110 of file Operators.hh.

References BIAS::Vector2< T >::Multiply().

template<class T>
Vector2< T > operator+ | ( | const Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [related]

add operator for two Vectors, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 283 of file Operators.hh.

References BIAS::Vector2< T >::Add().

template<class T>
Vector2< T > operator- | ( | const Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [related]

sub operator for two Vectors, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 293 of file Operators.hh.

References BIAS::Vector2< T >::Sub().

template<class T>
Vector2< T > operator- | ( | const Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Substraction operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 100 of file Operators.hh.

References BIAS::Vector2< T >::Sub().

template<class T>
T operator- ( const Vector2< T > & v ) [related]

Author:
herzog 2005-07-19

Definition at line 52 of file Operators.hh.

template<class T>
Vector2< T > operator/ | ( | const Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Division operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 120 of file Operators.hh.

References BIASASSERT, BIAS::Vector2< T >::Divide(), and T.

template<class T>
bool operator< | ( | const Vector2< T > & | a,
 |  | const Vector2< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 264 of file Operators.hh.

template<class T>
bool operator<= | ( | const Vector2< T > & | a,
 |  | const Vector2< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 258 of file Operators.hh.

template<class T>
bool operator> | ( | const Vector2< T > & | a,
 |  | const Vector2< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 276 of file Operators.hh.

template<class T>
bool operator>= | ( | const Vector2< T > & | a,
 |  | const Vector2< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 270 of file Operators.hh.

Member Data Documentation

template<class T>
T BIAS::Vector2< T >::data_[VECTOR2SIZE] [protected]

Definition at line 560 of file Vector2.hh.

Referenced by BIAS::Vector2< HOMGPOINT1D_TYPE >::Add(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Divide(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Multiply(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator!=(), BIAS::Vector2< HOMGPOINT1D_TYPE >::operator==(), BIAS::HomgPoint1D::operator==(), BIAS::Vector2< HOMGPOINT1D_TYPE >::Sub(), and BIAS::Vector2< T >::Vector2().

The documentation for this class was generated from the following files:
  • Base/Math/Vector2.hh
  • Base/Math/Operators.hh
  • Base/Math/Vector2.cpp
Generated on Wed Jun 21 19:12:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Vector3< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Vector3

BIAS::Vector3< T > Class Template Reference
[Matrix and Vector Classes]

class Vector3 contains a Vector of fixed dim. More...

#include <Base/Math/Vector3.hh>

Inheritance diagram for BIAS::Vector3< T >:

[legend]
Collaboration diagram for BIAS::Vector3< T >:

[legend]
List of all members.

Public Member Functions

template<>
Matrix< unsigned int > | GetSkewSymmetricMatrix () const
Vector3 (const Vector< T > &v)
cast constructor
Vector3 (const T &x, const T &y, const T &z)
constructor with element assigment using explicit values
Vector3 (char *s)
constructor with element assignment
Vector3 (const T *pv)
assignment with an array of values which is copied into this ones class members
Vector3 (const T &scalar)
assignment with a constant value for all elements
Vector3 (const Vector3< T > &vec)
copy constructor
Vector3 ()
~Vector3 ()
Arithmetic
void | Add (const Vector3< T > &argvec, Vector3< T > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const T &scalar, Vector3< T > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector3< T > &argvec)
in place adding
void | AddIP (const T &scalar)
Addition (in place) of an scalar.
Vector3< T > | CrossProduct (const Vector3< T > &argvec) const
void | CrossProduct (const Vector3< T > &argvec, Vector3< T > &destvec) const
cross product of two vectors destvec = this x argvec
void | Div (const T &scalar, Vector3< T > &dest) const
void | Divide (const T &scalar, Vector3< T > &dest) const
Division with a scalar, storing results in destination vector.
void | DivideIP (const T &scalar)
Division (in place) of an scalar.
void | DivIP (const T &scalar)
Vector3< T > | ElementwiseDivision (const Vector3< T > &argvec) const
divide elementwise
void | ElementwiseDivision (const Vector3< T > &argvec, Vector3< T > &destvec) const
Vector3< T > | ElementwiseProduct (const Vector3< T > &argvec) const
multiply two vectors elementwise and return the result vector
void | ElementwiseProduct (const Vector3< T > &argvec, Vector3< T > &destvec) const
multiply two vectors elementwise and store the result vector to destvec
void | Mult (const T &scalar, Vector3< T > &dest) const
void | MultIP (const T &scalar)
void | Multiply (const T &scalar, Vector3< T > &dest) const
Multiplication with a scalar, storing results in destination vector.
void | MultiplyIP (const T &scalar)
Multiplication (in place) of an scalar.
T | ScalarProduct (const Vector3< T > &argvec) const
scalar product (=inner product) of two vectors returns a scalar
void | ScalarProduct (const Vector3< T > &argvec, T &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Sub (const Vector3< T > &argvec, Vector3< T > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const T &scalar, Vector3< T > &dest) const
Substraction with a scalar, storing results in destination vector.
void | SubIP (const Vector3< T > &argvec)
in place substraction
void | SubIP (const T &scalar)
Substraction (in place) of an scalar.
Misc
BIAS::Vector3< T > | CartesianToPolar () const
BIAS::Vector3< T > | CoordEuclidianToSphere () const
coordinate transform.
BIAS::Vector3< T > | CoordSphereToEuclidian () const
coordinate transfrom.
Matrix< T > | GetSkewSymmetricMatrix () const
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product
bool | Load (const std::string &filename)
method to load directly from a given filename.
int | LoadBogTC (const std::string &filename)
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.
Matrix3x3< T > | OuterProduct (const Vector3< T > &v) const
void | OuterProduct (const Vector3< T > &v, Matrix3x3< T > &res) const
outer product, constructs a matrix.
T | Phi () const
T & Phi ()
BIAS::Vector3< T > | PolarToCartesian () const
T | Radius () const
T & Radius ()
r for polar/sphere content JW
bool | Save (const std::string &filename) const
method to save directly to a given filename.
T | Theta () const
T & Theta ()
Get Functions
double | Dist (const Vector3< T > &vec) const
Return the euclidian distance of 2 vectors.
T * GetData ()
const T * | GetData () const
get the data pointer the member function itself is const (before {.
bool | IsZero () const
double | Length () const
returns the Euclidean Length of the Vector
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c|.
double | NormL2 () const
the L2 norm sqrt(a^2 + b^2 + c^2)
const int | Size () const
Normalization
BIAS::Vector3< T > | GetNormalized () const
return a normalized vector of this
Vector3< T > & Normalize (Matrix3x3< T > &cov)
normalizes the vector to 1 and transfroms the associated covaqriance matrix
Vector3< T > & Normalize ()
normalize this vector to length 1
Operators
bool | operator!= (const Vector3< T > &arg) const
Comparison operator 'not equal'.
Vector3< T > & | operator= (const Vector< T > &vec)
assignment operator
Vector3< T > & | operator= (const Vector3< T > &vec)
assignment operator
bool | operator== (const Vector3< T > &arg) const
Comparison operator 'equal'.
T & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const T & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Set Functions
void | Set (const Vector< T > &vec)
Sets this form elements of Vector<T>.
void | Set (const T &x, const T &y, const T &z)
set elementwise with given scalar values
void | Set (const T &scalar)
set all elements to a scalar value
void | Set (const T *pv)
copy the array of vectorsize beginning at *T to this->data_
void SetZero ()
set all values to 0

Protected Attributes

T | data_ [VECTOR3_SIZE]

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const BIAS::Matrix< T > &mat, const Vector3< T > &vec)
Vector3< T > | operator * (const Matrix3x3< T > &mat, const Vector3< T > &argvec)
T | operator * (const Vector3< T > &vec, const Vector3< T > &arg)
Vector3< T > | operator * (const T &scalar, const Vector3< T > &vec)
Vector3< T > | operator * (const Vector3< T > &vec, const T &scalar)
Vector3< T > & | operator *= (Vector3< T > &vec, const T &scalar)
Vector3< T > | operator+ (const Vector3< T > &vec, const Vector< T > &argvec)
Vector3< T > | operator+ (const Vector3< T > &vec, const Vector3< T > &argvec)
Vector3< T > | operator+ (const T &scalar, const Vector3< T > &vec)
Vector3< T > | operator+ (const Vector3< T > &vec, const T &scalar)
Vector3< T > & | operator+= (Vector3< T > &vec, const Vector3< T > &argvec)
Vector3< T > & | operator+= (Vector3< T > &vec, const T &scalar)
Vector3< T > | operator- (const Vector3< T > &vec, const Vector3< T > &argvec)
Vector3< T > | operator- (const T &scalar, const Vector3< T > &vec)
Vector3< T > | operator- (const Vector3< T > &vec, const T &scalar)
T | operator- (const Vector3< T > &v)
Vector3< T > & | operator-= (Vector3< T > &vec, const Vector3< T > &argvec)
Vector3< T > & | operator-= (Vector3< T > &vec, const T &scalar)
Vector3< T > | operator/ (const Vector3< T > &vec, const T &scalar)
Vector3< T > & | operator/= (Vector3< T > &vec, const T &scalar)
bool | operator< (const Vector3< T > &a, const Vector3< T > &b)
std::ostream & | operator<< (std::ostream &os, const Vector3< T > &vec)
bool | operator<= (const Vector3< T > &a, const Vector3< T > &b)
bool | operator> (const Vector3< T > &a, const Vector3< T > &b)
bool | operator>= (const Vector3< T > &a, const Vector3< T > &b)
std::istream & | operator>> (std::istream &is, Vector3< T > &vec)

Detailed Description

template<class T>
class BIAS::Vector3< T >

class Vector3 contains a Vector of fixed dim.

3

It's elment type is templated. manual loop unrolling is used if possible. The Vector is in row-major order (3 rows, 1 column) the indizes begin with zero (to size-1)

operators are no longer class members removed memory leak by returning reference in operators removed inline code from class definition, woelk 01 2003

Author:
Jan Woetzel, woelk

Definition at line 68 of file Vector3.hh.

Constructor & Destructor Documentation

template<class T>
BIAS::Vector3< T >::Vector3 ( ) [inline]

Definition at line 70 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::~Vector3 ( ) [inline]

Definition at line 72 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::Vector3 ( const Vector3< T > & vec ) [inline]

copy constructor

Author:
Jan Woetzel (03/05/2002)

Definition at line 76 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::Vector3 ( const T & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel (03/01/2002)

Definition at line 80 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::Vector3 ( const T * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel (02/28/2002)

Definition at line 85 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::Vector3 ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 454 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
BIAS::Vector3< T >::Vector3 | ( | const T & | x,
 |  | const T & | y,
 |  | const T & | z
 | ) | [inline]

constructor with element assigment using explicit values

Author:
Ingo Thomsen, tested (03/04/2002)

Definition at line 94 of file Vector3.hh.

template<class T>
BIAS::Vector3< T >::Vector3 ( const Vector< T > & v )

cast constructor

Author:
Jan Woetzel, untested (03/22/2002)

Definition at line 276 of file Vector3.cpp.

References BIASASSERT, BIAS::Vector3< T >::data_, TNT::Vector< T >::size(), and VECTOR3_SIZE.

Member Function Documentation

template<class T>
void BIAS::Vector3< T >::Add | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 607 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
void BIAS::Vector3< T >::Add | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 600 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::Vector3< T >::operator+().

template<class T>
void BIAS::Vector3< T >::AddIP ( const Vector3< T > & argvec ) [inline]

in place adding

Author:
Ingo Thomsen tested

Definition at line 287 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::AddIP ( const T & scalar ) [inline]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 248 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::operator+=().

template<class T>
BIAS::Vector3<T> BIAS::Vector3< T >::CartesianToPolar ( ) const [inline]

Definition at line 357 of file Vector3.hh.

Referenced by BIAS::CameraViewController::MoveOrbit().

template<class T>
BIAS::Vector3< T > BIAS::Vector3< T >::CoordEuclidianToSphere ( ) const

coordinate transform.

compute the sphere coordinates(r, phi, theta) for (this) given euclidian point p=(x,y,z) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Definition at line 117 of file Vector3.cpp.

References BIASERR.

Referenced by BIAS::ProjectionParametersSpherical::ProjectLocal(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), and BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_().

template<class T>
Vector3< T > BIAS::Vector3< T >::CoordSphereToEuclidian ( ) const

coordinate transfrom.

compute the euclidian coord p=(x,y,z) for (this) given sphere coord sph=(radius, phi, theta) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. assume (x,y,z) is in orthogonal right-hand-system.

Author:
Jan Woetzel 09/2003

Definition at line 82 of file Vector3.cpp.

References BIASERR, and BIASEXIT.

Referenced by BIAS::Parametrization::ParamsToEMatrix(), BIAS::SphericalUndistortion::TransfCoordRotateSphere2Image(), BIAS::ProjectionParametersSpherical::TransfCoordRotateSphere2Image_(), and BIAS::ProjectionParametersSpherical::UnProjectLocal().

template<class T>
Vector3<T> BIAS::Vector3< T >::CrossProduct ( const Vector3< T > & argvec ) const [inline]

Returns:
cross product = this x argvec
Author:
Jan Woetzel alpha

Definition at line 205 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::CrossProduct | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

cross product of two vectors destvec = this x argvec

Author:
Ingo Thomsen, Jan Woetzel alpha

Definition at line 526 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::TrifocalTensor::GetFMatrix21(), BIAS::TrifocalTensor::GetFMatrix31(), BIAS::EpipolarLine::Init(), BIAS::Triangulation::Intersect(), BIAS::CameraViewController::MoveOrbit(), MainFrame::OnLeftDown(), BIAS::HomgLine2D::Set(), and BIAS::RMatrixBase::SetFromOriUpGL().

template<class T>
double BIAS::Vector3< T >::Dist ( const Vector3< T > & vec ) const [inline]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

Definition at line 571 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
void BIAS::Vector3< T >::Div | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Definition at line 281 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::Divide | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Division with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

Definition at line 640 of file Vector3.hh.

References BIASASSERT, BIASERR, and BIAS::Vector3< T >::data_.

Referenced by BIAS::Vector3< T >::DivideIP(), and BIAS::Vector3< T >::operator/().

template<class T>
void BIAS::Vector3< T >::DivideIP ( const T & scalar ) [inline]

Division (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 635 of file Vector3.hh.

References BIAS::Vector3< T >::Divide().

Referenced by BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::operator/=().

template<class T>
void BIAS::Vector3< T >::DivIP ( const T & scalar ) [inline]

Definition at line 276 of file Vector3.hh.

template<class T>
Vector3<T> BIAS::Vector3< T >::ElementwiseDivision ( const Vector3< T > & argvec ) const [inline]

divide elementwise

Author:
Jan Woetzel

Definition at line 238 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::ElementwiseDivision | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

Definition at line 557 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
Vector3<T> BIAS::Vector3< T >::ElementwiseProduct ( const Vector3< T > & argvec ) const [inline]

multiply two vectors elementwise and return the result vector

Author:
Jan Woetzel (03/06/2002)

Definition at line 226 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::ElementwiseProduct | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

multiply two vectors elementwise and store the result vector to destvec

Author:
Jan Woetzel alpha (03/06/2002)

Definition at line 549 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
T* BIAS::Vector3< T >::GetData ( ) [inline]

Definition at line 147 of file Vector3.hh.

template<class T>
const T* BIAS::Vector3< T >::GetData ( ) const [inline]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 146 of file Vector3.hh.

Referenced by main(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(), BIAS::HomgPoint2D::operator=(), BIAS::Vector3< T >::operator>>(), BIAS::EuclideanTransf3D::Set(), and BIAS::TrackerBase< StorageType >::Track().

template<class T>
Vector3< T > BIAS::Vector3< T >::GetNormalized ( ) const

return a normalized vector of this

norm. to length 1

Author:
Jan Woetzel
Date:
06/2003

Definition at line 51 of file Vector3.cpp.

References BIAS::Vector3< T >::Normalize().

Referenced by BIAS::RMatrixBase::SetFromOrthogonalBasis().

template<>
Matrix< unsigned int > BIAS::Vector3< unsigned int >::GetSkewSymmetricMatrix ( ) const

Definition at line 247 of file Vector3.cpp.

References BIASBREAK, BIASERR, and BIAS::Matrix< T >::SetZero().

template<class T>
Matrix< T > BIAS::Vector3< T >::GetSkewSymmetricMatrix ( ) const

constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product

Author:
koeser 09/2003

Definition at line 259 of file Vector3.cpp.

References BIAS::Vector3< T >::data_, BIAS::Matrix< T >::GetData(), BIAS::Matrix< T >::SetZero(), and T.

Referenced by BIAS::FMatrix::ComputeFromPMatrices().

template<class T>
bool BIAS::Vector3< T >::IsZero ( ) const [inline]

Returns:
true iff all elements are equal zero JW

Definition at line 502 of file Vector3.hh.

References BIAS::Vector3< T >::data_, and T.

template<class T>
double BIAS::Vector3< T >::Length ( ) const [inline]

returns the Euclidean Length of the Vector

Author:
Jan Woetzel

Definition at line 137 of file Vector3.hh.

Referenced by BIAS::ThreeDOut::VRMLOutWriteViewpoint().

template<class T>
bool BIAS::Vector3< T >::Load ( const std::string & filename )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

Definition at line 217 of file Vector3.cpp.

template<class T>
int BIAS::Vector3< T >::LoadBogTC ( const std::string & filename )

reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.

Returns:
0 for success, negative for errror
Author:
Jan Woetzel 03/2005

Definition at line 164 of file Vector3.cpp.

References BIASASSERT, BIASERR, and BIAS::Vector3< T >::SetZero().

Referenced by BIAS::PMatrixBase::LoadBOG(), and main().

template<class T>
void BIAS::Vector3< T >::Mult | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Definition at line 270 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::operator-().

template<class T>
void BIAS::Vector3< T >::MultIP ( const T & scalar ) [inline]

Definition at line 265 of file Vector3.hh.

Referenced by BIAS::PMatrixBase::Compose().

template<class T>
void BIAS::Vector3< T >::Multiply | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Multiplication with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

Definition at line 614 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::Triangulation::Intersect(), and BIAS::Vector3< T >::operator *().

template<class T>
void BIAS::Vector3< T >::MultiplyIP ( const T & scalar ) [inline]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 264 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::operator *=().

template<class T>
Vector3< T > & BIAS::Vector3< T >::Normalize ( Matrix3x3< T > & cov )

normalizes the vector to 1 and transfroms the associated covaqriance matrix

Author:
woelk 03/2006

Definition at line 60 of file Vector3.cpp.

References BIAS::MatrixIdentity, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::OuterProduct(), T, and BIAS::Matrix3x3< T >::Transpose().

template<class T>
Vector3< T > & BIAS::Vector3< T >::Normalize ( ) [inline]

normalize this vector to length 1

Author:
Jan Woetzel / koeser
Returns:
reference to updated (*this)
Date:
04/25/2002

Definition at line 578 of file Vector3.hh.

References BIASABORT, BIASERR, BIAS::Vector3< T >::DivideIP(), BIAS::Vector3< T >::NormL2(), and T.

Referenced by calc_Regressionsebene(), BIAS::TrifocalTensorBase::CheckPointCorr(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), BIAS::PMatrix::GetFieldOfViewY(), BIAS::GeometryGL::GetImgCorner3d(), BIAS::Vector3< T >::GetNormalized(), BIAS::TrifocalTensor::GetPMatrix2(), BIAS::TrifocalTensor::GetPMatrix3(), BIAS::RMatrixBase::GetRotationAxisAngle(), BIAS::Triangulation::Intersect(), main(), BIAS::CameraViewController::MoveOrbit(), BIAS::Vector3< T >::Normalize(), BIAS::RMatrixBase::SetFromAxisAngle(), BIAS::RMatrixBase::SetFromOriUpGL(), BIAS::TrifocalTensor::TransferView3(), BIAS::ProjectionParametersZoom::UnProjectLocal(), BIAS::ProjectionParametersPerspective::UnProjectLocal(), BIAS::Projection::UnProjectToPoint(), and BIAS::ProjectionParametersSpherical::ViewDifference().

template<class T>
T BIAS::Vector3< T >::NormL1 ( ) const [inline]

Return the L1 norm: |a| + |b| + |c|.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 593 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
double BIAS::Vector3< T >::NormL2 ( ) const [inline]

the L2 norm sqrt(a^2 + b^2 + c^2)

Author:
woelk 01 2003

Definition at line 565 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by calc_Regressionsebene(), BIAS::Vector3< double >::CoordEuclidianToSphere(), BIAS::PMatrix::Decompose_(), BIAS::Parametrization::EMatrixToParams(), BIAS::PMatrixEstimation::FindClosestP2(), BIAS::Quaternion< QUAT_TYPE >::GetAxisAngle(), BIAS::PMatrix::GetImagePlane(), BIAS::PMatrix::GetNormRayWorldCoo(), BIAS::Triangulation::Intersect(), BIAS::Vector3< T >::Normalize(), BIAS::Parametrization::ParamsToEMatrix(), BIAS::RMatrixBase::Set(), BIAS::RMatrixBase::SetFromAxisAngle(), BIAS::Triangulation::Triangulate(), BIAS::Projection::UnProjectToPoint(), and BIAS::ProjectionParametersBase::UnProjectToPointLocal().

template<class T>
bool BIAS::Vector3< T >::operator!= ( const Vector3< T > & arg ) const [inline]

Comparison operator 'not equal'.

Author:
woelk 01 2003

Definition at line 436 of file Vector3.hh.

template<class T>
Vector3<T>& BIAS::Vector3< T >::operator= ( const Vector< T > & vec ) [inline]

assignment operator

Author:
frahm 03 2004

Definition at line 410 of file Vector3.hh.

template<class T>
Vector3<T>& BIAS::Vector3< T >::operator= ( const Vector3< T > & vec ) [inline]

assignment operator

Author:
woelk 01 2003

Reimplemented in BIAS::HomgPoint2D.

Definition at line 404 of file Vector3.hh.

template<class T>
bool BIAS::Vector3< T >::operator== ( const Vector3< T > & arg ) const [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 431 of file Vector3.hh.

template<class T>
T & BIAS::Vector3< T >::operator[] ( const int i ) [inline]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 519 of file Vector3.hh.

References BIASASSERT, BIAS::Vector3< T >::data_, and VECTOR3_SIZE.

template<class T>
const T & BIAS::Vector3< T >::operator[] ( const int i ) const [inline]

access an element of the vector with 0-based indizes.

read only (no write) member function const because it doesn't change this object

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 512 of file Vector3.hh.

References BIASASSERT, BIAS::Vector3< T >::data_, and VECTOR3_SIZE.

template<class T>
Matrix3x3<T> BIAS::Vector3< T >::OuterProduct ( const Vector3< T > & v ) const [inline]

Definition at line 317 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::OuterProduct | ( | const Vector3< T > & | v,
 |  | Matrix3x3< T > & | res
 | ) | const

outer product, constructs a matrix.

Often written as (*this) * v^T for col vectors made it fast

Author:
Daniel Grest, Sept 2003, woelk 07/2004 tested

Definition at line 155 of file Vector3.cpp.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::TrifocalTensor::Compose(), BIAS::TrifocalTensorBase::Compose(), BIAS::PMatrixEstimation::ComputeRotation(), BIAS::PMatrixLinear::GetPEstSystemInHom(), and BIAS::Vector3< T >::Normalize().

template<class T>
T BIAS::Vector3< T >::Phi ( ) const [inline]

Definition at line 369 of file Vector3.hh.

template<class T>
T& BIAS::Vector3< T >::Phi ( ) [inline]

Definition at line 367 of file Vector3.hh.

template<class T>
BIAS::Vector3<T> BIAS::Vector3< T >::PolarToCartesian ( ) const [inline]

Definition at line 341 of file Vector3.hh.

template<class T>
T BIAS::Vector3< T >::Radius ( ) const [inline]

Definition at line 364 of file Vector3.hh.

template<class T>
T& BIAS::Vector3< T >::Radius ( ) [inline]

r for polar/sphere content JW

Definition at line 362 of file Vector3.hh.

template<class T>
bool BIAS::Vector3< T >::Save ( const std::string & filename ) const

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

Definition at line 232 of file Vector3.cpp.

template<class T>
T BIAS::Vector3< T >::ScalarProduct ( const Vector3< T > & argvec ) const [inline]

scalar product (=inner product) of two vectors returns a scalar

Author:
Jan Woetzel, Ingo Thomsen alpha

Definition at line 542 of file Vector3.hh.

References BIAS::Vector3< T >::ScalarProduct(), and T.

template<class T>
void BIAS::Vector3< T >::ScalarProduct | ( | const Vector3< T > & | argvec,
 |  | T & | result
 | ) | const [inline]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel

Definition at line 535 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::RigParameter::AdaptAxisAngleRepresentation(), BIAS::HomgLine3D::CalculateFootpoint(), BIAS::PMatrix::Decompose_(), BIAS::FMatrixBase::epipolarconstraintRemainder(), BIAS::PMatrix::GetFieldOfView(), BIAS::PMatrix::GetFieldOfViewY(), BIAS::HomgLine3D::Homogenize(), BIAS::Triangulation::Intersect(), BIAS::Vector3< T >::operator *(), BIAS::Triangulation::Optimal(), BIAS::Vector3< T >::ScalarProduct(), BIAS::HomgPlane3D::Set(), BIAS::Triangulation::Triangulate2D(), BIAS::ProjectionParametersSpherical::ViewDifference(), and BIAS::ThreeDOut::VRMLOutWriteViewpoint().

template<class T>
void BIAS::Vector3< T >::Set ( const Vector< T > & vec ) [inline]

Sets this form elements of Vector<T>.

Reimplemented in BIAS::HomgPoint2D.

Definition at line 480 of file Vector3.hh.

References BIASERR, TNT::Vector< T >::size(), and VECTOR3_SIZE.

template<class T>
void BIAS::Vector3< T >::Set | ( | const T & | x,
 |  | const T & | y,
 |  | const T & | z
 | ) | [inline]

set elementwise with given scalar values

Author:
Jan Woetzel alpha (02/28/2002)

Reimplemented in BIAS::HomgPoint2D.

Definition at line 472 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
void BIAS::Vector3< T >::Set ( const T & scalar ) [inline]

set all elements to a scalar value

Author:
Jan Woetzel, untested (02/28/2002)

Definition at line 110 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::Set ( const T * pv ) [inline]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel, untested (02/28/2002)

Definition at line 463 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::PMatrix::Compose(), BIAS::PMatrixBase::Compose(), BIAS::Parametrization::EMatrixToParams(), BIAS::ProjectionParametersSpherical::GetFakeKMatrix(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::OpenGLCanvasBase::GetPixelValueRGB(), BIAS::CovMatrix3x3::GetSearchArea(), BIAS::Camera< StorageType >::Init_(), main(), rotateY(), BIAS::RigParameter::SetData_DummyRig(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), BIAS::Vector3< T >::SetZero(), BIAS::Interpolator::Spline(), and BIAS::Triangulation::Triangulate().

template<class T>
void BIAS::Vector3< T >::SetZero ( ) [inline]

set all values to 0

Author:
Jan Woetzel 01/2003

Definition at line 493 of file Vector3.hh.

References BIAS::Vector3< T >::Set(), and T.

Referenced by BIAS::CovMatrix3x3::GetSearchArea(), BIAS::ProjectionParametersIO::Initialize(), BIAS::ProjectionParametersIO::InitializeSensor(), BIAS::Vector3< T >::LoadBogTC(), BIAS::ProjectionParametersSpherical::ProjectLocal(), BIAS::ProjectionParametersIO::SetData_DummyRig(), and BIAS::ProjectionParametersSpherical::UnProjectLocal().

template<class T>
const int BIAS::Vector3< T >::Size ( ) const [inline]

Returns:
the size of this vector
Author:
Jan Woetzel (02/28/2002)

Definition at line 131 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::operator *().

template<class T>
void BIAS::Vector3< T >::Sub | ( | const Vector3< T > & | argvec,
 |  | Vector3< T > & | destvec
 | ) | const [inline]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 628 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

template<class T>
void BIAS::Vector3< T >::Sub | ( | const T & | scalar,
 |  | Vector3< T > & | dest
 | ) | const [inline]

Substraction with a scalar, storing results in destination vector.

Author:
Ingo Thomsen

Definition at line 621 of file Vector3.hh.

References BIAS::Vector3< T >::data_.

Referenced by BIAS::Vector3< T >::operator-().

template<class T>
void BIAS::Vector3< T >::SubIP ( const Vector3< T > & argvec ) [inline]

in place substraction

Author:
Ingo Thomsen tested

Definition at line 297 of file Vector3.hh.

template<class T>
void BIAS::Vector3< T >::SubIP ( const T & scalar ) [inline]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 256 of file Vector3.hh.

Referenced by BIAS::HomgLine3D::CalculateFootpoint(), and BIAS::Vector3< T >::operator-=().

template<class T>
T BIAS::Vector3< T >::Theta ( ) const [inline]

Definition at line 374 of file Vector3.hh.

template<class T>
T& BIAS::Vector3< T >::Theta ( ) [inline]

Definition at line 372 of file Vector3.hh.

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const BIAS::Matrix< T > & | mat,
 |  | const Vector3< T > & | vec
 | ) | [related]

Definition at line 586 of file Operators.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Vector3< T >::Size(), and T.

template<class T>
Vector3< T > operator * | ( | const Matrix3x3< T > & | mat,
 |  | const Vector3< T > & | argvec
 | ) | [related]

matrix-vector multiplication using 'Mult'

Author:
Ingo Thomsen, Jan Woetzel, fw moved out of class, untested (04/17/2002)

Definition at line 535 of file Operators.hh.

References BIAS::Matrix3x3< T >::Mult().

template<class T>
T operator * | ( | const Vector3< T > & | vec,
 |  | const Vector3< T > & | arg
 | ) | [related]

Definition at line 343 of file Operators.hh.

References res, BIAS::Vector3< T >::ScalarProduct(), and T.

template<class T>
Vector3< T > operator * | ( | const T & | scalar,
 |  | const Vector3< T > & | vec
 | ) | [related]

Definition at line 137 of file Operators.hh.

References BIAS::Vector3< T >::Multiply(), and res.

template<class T>
Vector3< T > operator * | ( | const Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Definition at line 129 of file Operators.hh.

References BIAS::Vector3< T >::Multiply(), and res.

template<class T>
Vector3< T > & operator *= | ( | Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Definition at line 660 of file Vector3.hh.

References BIAS::Vector3< T >::MultiplyIP().

template<class T>
Vector3< T > operator+ | ( | const Vector3< T > & | vec,
 |  | const Vector< T > & | argvec
 | ) | [related]

add operator for Vector3, and Vector, so u dont have to cast...

Author:
D. Grest, tested

Definition at line 368 of file Operators.hh.

References BIASERR, and TNT::Vector< T >::size().

template<class T>
Vector3< T > operator+ | ( | const Vector3< T > & | vec,
 |  | const Vector3< T > & | argvec
 | ) | [related]

add operator for two Vectors, returning new vector

Author:
Ingo Thomsen, woelk, tested

Definition at line 358 of file Operators.hh.

References BIAS::Vector3< T >::Add().

template<class T>
Vector3< T > operator+ | ( | const T & | scalar,
 |  | const Vector3< T > & | vec
 | ) | [related]

Definition at line 348 of file Operators.hh.

References BIAS::Vector3< T >::Add().

template<class T>
Vector3< T > operator+ | ( | const Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Addition operator with scalar argument, returning new vector

Author:
Ingo Thomsen, woelk, tested

Definition at line 147 of file Operators.hh.

References BIAS::Vector3< T >::Add().

template<class T>
Vector3< T > & operator+= | ( | Vector3< T > & | vec,
 |  | const Vector3< T > & | argvec
 | ) | [related]

add operator for two Vectors

Author:
Ingo Thomsen, woelk tested

Definition at line 680 of file Vector3.hh.

References BIAS::Vector3< T >::AddIP().

template<class T>
Vector3< T > & operator+= | ( | Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Addition operator with scalar argument

Author:
Ingo Thomsen, woelk tested

Definition at line 670 of file Vector3.hh.

References BIAS::Vector3< T >::AddIP().

template<class T>
Vector3< T > operator- | ( | const Vector3< T > & | vec,
 |  | const Vector3< T > & | argvec
 | ) | [related]

sub operator for two Vectors, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 385 of file Operators.hh.

References BIAS::Vector3< T >::Sub().

template<class T>
Vector3< T > operator- | ( | const T & | scalar,
 |  | const Vector3< T > & | vec
 | ) | [related]

Substraction operator with scalar argument, returning new vector

Author:
woelk, tested

Definition at line 165 of file Operators.hh.

References BIAS::Vector3< T >::Mult().

template<class T>
Vector3< T > operator- | ( | const Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Substraction operator with scalar argument, returning new vector

Author:
Ingo Thomsen, woelk, tested

Definition at line 157 of file Operators.hh.

References BIAS::Vector3< T >::Sub().

template<class T>
T operator- ( const Vector3< T > & v ) [related]

Author:
herzog 2005-07-19

Definition at line 57 of file Operators.hh.

template<class T>
Vector3< T > & operator-= | ( | Vector3< T > & | vec,
 |  | const Vector3< T > & | argvec
 | ) | [related]

sub operator for two Vectors

Author:
Ingo Thomsen, tested

Definition at line 700 of file Vector3.hh.

References BIAS::Vector3< T >::SubIP().

template<class T>
Vector3< T > & operator-= | ( | Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Substraction operator with scalar argument

Author:
Ingo Thomsen tested

Definition at line 691 of file Vector3.hh.

References BIAS::Vector3< T >::SubIP().

template<class T>
Vector3< T > operator/ | ( | const Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Division operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 176 of file Operators.hh.

References BIAS::Vector3< T >::Divide().

template<class T>
Vector3< T > & operator/= | ( | Vector3< T > & | vec,
 |  | const T & | scalar
 | ) | [related]

Division operator with scalar argument

Author:
Ingo Thomsen tested

Definition at line 711 of file Vector3.hh.

References BIAS::Vector3< T >::DivideIP().

template<class T>
bool operator< | ( | const Vector3< T > & | a,
 |  | const Vector3< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 326 of file Operators.hh.

template<class T>
std::ostream & operator<< | ( | std::ostream & | os,
 |  | const Vector3< T > & | vec
 | ) | [related]

Output with streams

Author:
Jan Woetzel, JMF, status alpha (08/08/2002)

Definition at line 724 of file Vector3.hh.

References VECTOR3_SIZE.

template<class T>
bool operator<= | ( | const Vector3< T > & | a,
 |  | const Vector3< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 320 of file Operators.hh.

template<class T>
bool operator> | ( | const Vector3< T > & | a,
 |  | const Vector3< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 338 of file Operators.hh.

template<class T>
bool operator>= | ( | const Vector3< T > & | a,
 |  | const Vector3< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 332 of file Operators.hh.

template<class T>
std::istream & operator>> | ( | std::istream & | is,
 |  | Vector3< T > & | vec
 | ) | [related]

Input with streams

Author:
Jan Woetzel, status untested (03/01/2002)

Definition at line 753 of file Vector3.hh.

References BIASERR, BIAS::Vector3< T >::GetData(), and VECTOR3_SIZE.

Member Data Documentation

template<class T>
T BIAS::Vector3< T >::data_[VECTOR3_SIZE] [protected]

Definition at line 445 of file Vector3.hh.

Referenced by BIAS::Vector3< T >::Add(), BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Dist(), BIAS::Vector3< T >::Divide(), BIAS::Vector3< T >::ElementwiseDivision(), BIAS::Vector3< T >::ElementwiseProduct(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::Vector3< T >::IsZero(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::NormL1(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< HOMGPOINT2D_TYPE >::operator==(), BIAS::HomgPoint2D::operator==(), BIAS::Vector3< T >::operator[](), BIAS::Vector3< T >::OuterProduct(), BIAS::Vector3< T >::ScalarProduct(), BIAS::Vector3< T >::Set(), BIAS::Vector3< T >::Sub(), and BIAS::Vector3< T >::Vector3().

The documentation for this class was generated from the following files:
  • Base/Math/Vector3.hh
  • Base/Math/Operators.hh
  • Base/Math/Vector3.cpp
Generated on Wed Jun 21 19:12:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::Vector4< T > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::Vector4

BIAS::Vector4< T > Class Template Reference
[Matrix and Vector Classes]

class Vector4 contains a Vector of dim. More...

#include <Base/Math/Vector4.hh>

Inheritance diagram for BIAS::Vector4< T >:

[legend]
Collaboration diagram for BIAS::Vector4< T >:

[legend]
List of all members.

Public Member Functions

void | Add (const Vector4< T > &argvec, Vector4< T > &destvec) const
adding of two vectors, storing the result in destvec
void | Add (const T &scalar, Vector4< T > &dest) const
Addition with a scalar, storing results in destionation vector.
void | AddIP (const Vector4< T > &argvec)
in place adding
void | AddIP (const T &scalar)
Addition (in place) of an scalar.
void | Copy (const T *pv)
copy the array of vectorsize beginning at *T to this->data_
double | Dist (const Vector4< T > &vec) const
Return the euclidian distance of 2 vectors.
void | Divide (const T &scalar, Vector4< T > &dest) const
Division with a scalar, storing results in destionation vector.
void | DivideIP (const T &scalar)
Division (in place) of an scalar.
void | ElementwiseProduct (const Vector4< T > &argvec, Vector4< T > &destvec) const
multiply two vectors elementwise, storing the result in destvec
T * GetData ()
const T * | GetData () const
get the data pointer the member function itself is const (before {.
bool | Load (const std::string &filename)
method to load directly from a given filename.
void | Multiply (const T &scalar, Vector4< T > &dest) const
Multiplication with a scalar, storing results in destionation vector.
void | MultiplyIP (const T &scalar)
Multiplication (in place) of an scalar.
T | NormL1 () const
Return the L1 norm: |a| + |b| + |c|+ |d|.
double | NormL2 () const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).
Vector4< T > & | operator *= (const T &scalar)
Multiplication operator with scalar argument.
bool | operator!= (const Vector4< T > &arg) const
Comparison operator 'not equal'.
Vector4< T > & | operator+= (const Vector4< T > &argvec)
add operator for two Vectors
Vector4< T > & | operator+= (const T &scalar)
Addition operator with scalar argument.
Vector4< T > & | operator-= (const Vector4< T > &argvec)
sub operator for two Vectors
Vector4< T > & | operator-= (const T &scalar)
Substraction operator with scalar argument.
Vector4< T > & | operator/= (const T &scalar)
Division operator with scalar argument.
Vector4< T > & | operator= (const Vector4< T > &vec)
assignment operator
Vector4< T > & | operator= (const T &scalar)
assignment operator set the vector elementwise to scalar value
bool | operator== (const Vector4< T > &arg) const
Comparison operator 'equal'.
T & | operator[] (const int i)
access an element of the vector with 0-based indizes.
const T & | operator[] (const int i) const
access an element of the vector with 0-based indizes.
Matrix4x4< T > | OuterProduct (const Vector4< T > &v) const
outer product, constructs a matrix.
bool | Save (const std::string &filename) const
method to save directly to a given filename.
void | ScalarProduct (const Vector4< T > &argvec, T &result) const
scalar product (=inner product) of two vectors, storing the result in result
void | Set (const T &x, const T &y, const T &z, const T &w)
set elementwise with given scalr values
void | Set (const T &scalar)
set all elements to a scalat value
void SetZero ()
set all values to 0
const int | Size () const
void | Sub (const Vector4< T > &argvec, Vector4< T > &destvec) const
subtracting of two Vectors, storing the result in destvec
void | Sub (const T &scalar, Vector4< T > &dest) const
Substraction with a scalar, storing results in destionation vector.
void | SubIP (const Vector4< T > &argvec)
in place substraction
void | SubIP (const T &scalar)
Substraction (in place) of an scalar.
Matrix< T > | transposed () const
return a new Matrix with 1 row and 4 columns representing a transposed vector
Vector4 (const Vector< T > &v)
cast constructor
Vector4 (const T v0, const T v1, const T v2, const T v3)
constructor with element assigment using explicit values
Vector4 (char *s)
constructor with element assignment
Vector4 (const T *pv)
assignment with an array of values which is copied into this ones class members
Vector4 (const T &scalar)
assignment with a constant value for all elements
Vector4 (const Vector4< T > &vec)
copy constructor
Vector4 ()
~Vector4 ()

Protected Attributes

T | data_ [VECTOR4SIZE]

Related Functions

(Note that these are not member functions.)

Vector< T > | operator * (const BIAS::Matrix< T > &mat, const Vector4< T > &vec)
Vector3< T > | operator * (const Matrix3x4< T > &mat, const Vector4< T > &argvec)
Vector4< T > | operator * (const Matrix4x4< T > &mat, const Vector4< T > &argvec)
T | operator * (const Vector4< T > &v, const Vector4< T > &argvec)
Vector4< T > | operator * (const Vector4< T > &v, const T &scalar)
Vector4< T > | operator+ (const Vector4< T > &v, const Vector4< T > &argvec)
Vector4< T > | operator+ (const Vector4< T > &v, const T &scalar)
Vector4< T > | operator- (const Vector4< T > &v, const Vector4< T > &argvec)
Vector4< T > | operator- (const Vector4< T > &v, const T &scalar)
T | operator- (const Vector4< T > &v)
Vector4< T > | operator/ (const Vector4< T > &v, const T &scalar)
bool | operator< (const Vector4< T > &a, const Vector4< T > &b)
bool | operator<= (const Vector4< T > &a, const Vector4< T > &b)
bool | operator> (const Vector4< T > &a, const Vector4< T > &b)
bool | operator>= (const Vector4< T > &a, const Vector4< T > &b)

Detailed Description

template<class T>
class BIAS::Vector4< T >

class Vector4 contains a Vector of dim.

4 and fixed dimension

It's elment type is templated. manual loop unrolling is used if possible. The Vector is in row-major order (4 rows, 1 column) teh indizes begin with zero (to size-1)

Author:
Jan Woetzel tested in part (02/28/2002)

Definition at line 62 of file Vector4.hh.

Constructor & Destructor Documentation

template<class T>
BIAS::Vector4< T >::Vector4 ( ) [inline]

Definition at line 65 of file Vector4.hh.

template<class T>
BIAS::Vector4< T >::Vector4 ( const Vector4< T > & vec ) [inline]

copy constructor

Author:
Daniel Grest (06/2003)

Definition at line 70 of file Vector4.hh.

template<class T>
BIAS::Vector4< T >::Vector4 ( const T & scalar ) [inline, explicit]

assignment with a constant value for all elements

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 334 of file Vector4.hh.

References BIAS::Vector4< T >::Set().

template<class T>
BIAS::Vector4< T >::Vector4 ( const T * pv ) [inline, explicit]

assignment with an array of values which is copied into this ones class members

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 356 of file Vector4.hh.

References BIAS::Vector4< T >::Copy().

template<class T>
BIAS::Vector4< T >::Vector4 ( char * s ) [inline, explicit]

constructor with element assignment

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 340 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
BIAS::Vector4< T >::Vector4 | ( | const T | v0,
 |  | const T | v1,
 |  | const T | v2,
 |  | const T | v3
 | ) | [inline]

constructor with element assigment using explicit values

Author:
Ingo Thomsen tested (03/04/2002)

Definition at line 350 of file Vector4.hh.

References BIAS::Vector4< T >::Set().

template<class T>
Vector4::Vector4 ( const Vector< T > & v )

cast constructor

Author:
Jan Woetzel untested (03/22/2002)

Definition at line 36 of file Vector4.cpp.

References BIASASSERT, BIAS::Vector4< T >::data_, TNT::Vector< T >::size(), and VECTOR4SIZE.

template<class T>
BIAS::Vector4< T >::~Vector4 ( ) [inline]

Definition at line 98 of file Vector4.hh.

Member Function Documentation

template<class T>
void BIAS::Vector4< T >::Add | ( | const Vector4< T > & | argvec,
 |  | Vector4< T > & | destvec
 | ) | const [inline]

adding of two vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 612 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
void BIAS::Vector4< T >::Add | ( | const T & | scalar,
 |  | Vector4< T > & | dest
 | ) | const [inline]

Addition with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 503 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::AddIP(), BIAS::Vector4< T >::operator+(), and BIAS::Vector4< T >::operator+=().

template<class T>
void BIAS::Vector4< T >::AddIP ( const Vector4< T > & argvec ) [inline]

in place adding

Author:
Ingo Thomsen tested

Definition at line 606 of file Vector4.hh.

References BIAS::Vector4< T >::Add().

template<class T>
void BIAS::Vector4< T >::AddIP ( const T & scalar ) [inline]

Addition (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 497 of file Vector4.hh.

References BIAS::Vector4< T >::Add().

Referenced by BIAS::Vector4< T >::operator+=().

template<class T>
void BIAS::Vector4< T >::Copy ( const T * pv ) [inline]

copy the array of vectorsize beginning at *T to this->data_

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 362 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::Vector4().

template<class T>
double BIAS::Vector4< T >::Dist ( const Vector4< T > & vec ) const [inline]

Return the euclidian distance of 2 vectors.

Author:
Birger Streckel
Date:
08/2002

Definition at line 455 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
void BIAS::Vector4< T >::Divide | ( | const T & | scalar,
 |  | Vector4< T > & | dest
 | ) | const [inline]

Division with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 584 of file Vector4.hh.

References BIASERR, and BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::DivideIP(), and BIAS::Vector4< T >::operator/().

template<class T>
void BIAS::Vector4< T >::DivideIP ( const T & scalar ) [inline]

Division (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 575 of file Vector4.hh.

References BIASERR, and BIAS::Vector4< T >::Divide().

Referenced by BIAS::Vector4< T >::operator/=().

template<class T>
void BIAS::Vector4< T >::ElementwiseProduct | ( | const Vector4< T > & | argvec,
 |  | Vector4< T > & | destvec
 | ) | const [inline]

multiply two vectors elementwise, storing the result in destvec

Author:
Jan Woetzel untested (03/06/2002)

Definition at line 427 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
T* BIAS::Vector4< T >::GetData ( ) [inline]

Definition at line 134 of file Vector4.hh.

template<class T>
const T* BIAS::Vector4< T >::GetData ( ) const [inline]

get the data pointer the member function itself is const (before {.

.}) because it doesn't change the this object.

Returns:
the const pointer to the data array for reading
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 130 of file Vector4.hh.

Referenced by BIAS::ThreeDOut::OpenGLOutLines(), BIAS::ThreeDOut::OpenGLOutPMatrices_(), BIAS::ThreeDOut::OpenGLOutPoints(), BIAS::Vector4< HOMGPOINT3D_TYPE >::operator=(), BIAS::HomgPoint3D::operator=(), and BIAS::operator>>().

template<class T>
bool Vector4::Load ( const std::string & filename )

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2005
Returns:
false in case of error, true in case of success

Definition at line 50 of file Vector4.cpp.

template<class T>
void BIAS::Vector4< T >::Multiply | ( | const T & | scalar,
 |  | Vector4< T > & | dest
 | ) | const [inline]

Multiplication with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 551 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::MultiplyIP(), and BIAS::Vector4< T >::operator *().

template<class T>
void BIAS::Vector4< T >::MultiplyIP ( const T & scalar ) [inline]

Multiplication (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 545 of file Vector4.hh.

References BIAS::Vector4< T >::Multiply().

Referenced by BIAS::Vector4< T >::operator *=().

template<class T>
T BIAS::Vector4< T >::NormL1 ( ) const [inline]

Return the L1 norm: |a| + |b| + |c|+ |d|.

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 437 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
double BIAS::Vector4< T >::NormL2 ( ) const [inline]

Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2).

Author:
Ingo Thomsen
Date:
04/11/2002 untested

Definition at line 446 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::HomgLine3D::Distance(), and BIAS::HomgLine3D::Homogenize().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator *= ( const T & scalar ) [inline]

Multiplication operator with scalar argument.

Author:
Ingo Thomsen tested

Definition at line 538 of file Vector4.hh.

References BIAS::Vector4< T >::MultiplyIP().

template<class T>
bool BIAS::Vector4< T >::operator!= ( const Vector4< T > & arg ) const [inline]

Comparison operator 'not equal'.

Author:
Ingo Thomsen

Definition at line 482 of file Vector4.hh.

References BIAS::Vector4< T >::operator==().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator+= ( const Vector4< T > & argvec ) [inline]

add operator for two Vectors

Author:
Ingo Thomsen tested

Definition at line 599 of file Vector4.hh.

References BIAS::Vector4< T >::Add().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator+= ( const T & scalar ) [inline]

Addition operator with scalar argument.

Author:
Ingo Thomsen tested

Definition at line 490 of file Vector4.hh.

References BIAS::Vector4< T >::AddIP().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator-= ( const Vector4< T > & argvec ) [inline]

sub operator for two Vectors

Author:
Ingo Thomsen tested

Definition at line 623 of file Vector4.hh.

References BIAS::Vector4< T >::SubIP().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator-= ( const T & scalar ) [inline]

Substraction operator with scalar argument.

Author:
Ingo Thomsen tested

Definition at line 514 of file Vector4.hh.

References BIAS::Vector4< T >::SubIP().

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator/= ( const T & scalar ) [inline]

Division operator with scalar argument.

Author:
Ingo Thomsen tested

Definition at line 562 of file Vector4.hh.

References BIASERR, and BIAS::Vector4< T >::DivideIP().

template<class T>
Vector4<T>& BIAS::Vector4< T >::operator= ( const Vector4< T > & vec ) [inline]

assignment operator

Author:
grest 06 2003

Reimplemented in BIAS::HomgPoint3D.

Definition at line 147 of file Vector4.hh.

template<class T>
Vector4< T > & BIAS::Vector4< T >::operator= ( const T & scalar ) [inline]

assignment operator set the vector elementwise to scalar value

Author:
Jan Woetzel alpha (02/28/2002)

Reimplemented in BIAS::HomgPoint3D.

Definition at line 392 of file Vector4.hh.

References BIAS::Vector4< T >::Set().

template<class T>
bool BIAS::Vector4< T >::operator== ( const Vector4< T > & arg ) const [inline]

Comparison operator 'equal'.

Author:
Ingo Thomsen tested

Definition at line 475 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::operator!=().

template<class T>
T & BIAS::Vector4< T >::operator[] ( const int i ) [inline]

access an element of the vector with 0-based indizes.

write allowed

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 407 of file Vector4.hh.

References BIASASSERT, BIAS::Vector4< T >::data_, and VECTOR4SIZE.

template<class T>
const T & BIAS::Vector4< T >::operator[] ( const int i ) const [inline]

access an element of the vector with 0-based indizes.

read only (no write) member funciton const because it doesn't change this object

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 399 of file Vector4.hh.

References BIASASSERT, BIAS::Vector4< T >::data_, and VECTOR4SIZE.

template<class T>
Matrix4x4< T > Vector4::OuterProduct ( const Vector4< T > & v ) const

outer product, constructs a matrix.

Often written as v * v^T for col vectors

Author:
frick

Definition at line 79 of file Vector4.cpp.

References BIAS::Vector4< T >::Size(), and T.

Referenced by BIAS::PlueckerMatrix::Set().

template<class T>
bool Vector4::Save ( const std::string & filename ) const

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 09/2009
Returns:
false in case of error, true in case of success

Definition at line 65 of file Vector4.cpp.

template<class T>
void BIAS::Vector4< T >::ScalarProduct | ( | const Vector4< T > & | argvec,
 |  | T & | result
 | ) | const [inline]

scalar product (=inner product) of two vectors, storing the result in result

Author:
Jan Woetzel untested

Definition at line 418 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::PMatrix::GetIntersectionOfImagePlanes(), and BIAS::Vector4< T >::operator *().

template<class T>
void BIAS::Vector4< T >::Set | ( | const T & | x,
 |  | const T & | y,
 |  | const T & | z,
 |  | const T & | w
 | ) | [inline]

set elementwise with given scalr values

Author:
Jan Woetzel, Ingo Thomsen tested (02/28/2002)

Reimplemented in BIAS::HomgPoint3D.

Definition at line 377 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
void BIAS::Vector4< T >::Set ( const T & scalar ) [inline]

set all elements to a scalat value

Author:
Jan Woetzel untested (02/28/2002)

Definition at line 371 of file Vector4.hh.

Referenced by BIAS::OpenGLCanvasBase::GetPixelValueRGBA(), BIAS::Vector4< T >::operator=(), BIAS::CoordinateTransform3D::SetFromMatrix3x4(), BIAS::Vector4< T >::SetZero(), and BIAS::Vector4< T >::Vector4().

template<class T>
void BIAS::Vector4< T >::SetZero ( ) [inline]

set all values to 0

Author:
Jan Woetzel

Definition at line 647 of file Vector4.hh.

References BIAS::Vector4< T >::Set(), and T.

template<class T>
const int BIAS::Vector4< T >::Size ( ) const [inline]

Returns:
the size of this vector
Author:
Jan Woetzel untested (02/28/2002)

Definition at line 386 of file Vector4.hh.

References VECTOR4SIZE.

Referenced by BIAS::operator>>(), and BIAS::Vector4< T >::OuterProduct().

template<class T>
void BIAS::Vector4< T >::Sub | ( | const Vector4< T > & | argvec,
 |  | Vector4< T > & | destvec
 | ) | const [inline]

subtracting of two Vectors, storing the result in destvec

Author:
Ingo Thomsen tested

Definition at line 636 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

template<class T>
void BIAS::Vector4< T >::Sub | ( | const T & | scalar,
 |  | Vector4< T > & | dest
 | ) | const [inline]

Substraction with a scalar, storing results in destionation vector.

Author:
Ingo Thomsen

Definition at line 527 of file Vector4.hh.

References BIAS::Vector4< T >::data_.

Referenced by BIAS::Vector4< T >::operator-(), and BIAS::Vector4< T >::SubIP().

template<class T>
void BIAS::Vector4< T >::SubIP ( const Vector4< T > & argvec ) [inline]

in place substraction

Author:
Ingo Thomsen tested

Definition at line 630 of file Vector4.hh.

References BIAS::Vector4< T >::Sub().

template<class T>
void BIAS::Vector4< T >::SubIP ( const T & scalar ) [inline]

Substraction (in place) of an scalar.

Author:
Ingo Thomsen

Definition at line 521 of file Vector4.hh.

References BIAS::Vector4< T >::Sub().

Referenced by BIAS::Vector4< T >::operator-=().

template<class T>
Matrix< T > BIAS::Vector4< T >::transposed ( ) const [inline]

return a new Matrix with 1 row and 4 columns representing a transposed vector

Definition at line 464 of file Vector4.hh.

References BIAS::Vector4< T >::data_, and BIAS::Matrix< T >::GetData().

Friends And Related Function Documentation

template<class T>
Vector< T > operator * | ( | const BIAS::Matrix< T > & | mat,
 |  | const Vector4< T > & | vec
 | ) | [related]

Definition at line 615 of file Operators.hh.

References BIASERR, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
Vector3< T > operator * | ( | const Matrix3x4< T > & | mat,
 |  | const Vector4< T > & | argvec
 | ) | [related]

Definition at line 605 of file Operators.hh.

References BIAS::Matrix3x4< T >::Mult().

template<class T>
Vector4< T > operator * | ( | const Matrix4x4< T > & | mat,
 |  | const Vector4< T > & | argvec
 | ) | [related]

matrix-vector multiplication using 'Mult'

Author:
Jan Woetzel, untested (04/17/2002)

Definition at line 548 of file Operators.hh.

References BIAS::Matrix4x4< T >::Mult().

template<class T>
T operator * | ( | const Vector4< T > & | v,
 |  | const Vector4< T > & | argvec
 | ) | [related]

op* to multiply two vectors by their dotproduct

Author:
Jan Woetzel, untested (03/06/2002)

Definition at line 431 of file Operators.hh.

References BIAS::Vector4< T >::ScalarProduct(), and T.

template<class T>
Vector4< T > operator * | ( | const Vector4< T > & | v,
 |  | const T & | scalar
 | ) | [related]

Multiplication operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 186 of file Operators.hh.

References BIAS::Vector4< T >::Multiply().

template<class T>
Vector4< T > operator+ | ( | const Vector4< T > & | v,
 |  | const Vector4< T > & | argvec
 | ) | [related]

add operator for two Vectors, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 453 of file Operators.hh.

References BIAS::Vector4< T >::Add().

template<class T>
Vector4< T > operator+ | ( | const Vector4< T > & | v,
 |  | const T & | scalar
 | ) | [related]

Addition operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 214 of file Operators.hh.

References BIAS::Vector4< T >::Add().

template<class T>
Vector4< T > operator- | ( | const Vector4< T > & | v,
 |  | const Vector4< T > & | argvec
 | ) | [related]

sub operator for two Vectors, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 442 of file Operators.hh.

References BIAS::Vector4< T >::Sub().

template<class T>
Vector4< T > operator- | ( | const Vector4< T > & | v,
 |  | const T & | scalar
 | ) | [related]

Subtraction operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 225 of file Operators.hh.

References BIAS::Vector4< T >::Sub().

template<class T>
T operator- ( const Vector4< T > & v ) [related]

Author:
herzog 2005-07-19

Definition at line 62 of file Operators.hh.

template<class T>
Vector4< T > operator/ | ( | const Vector4< T > & | v,
 |  | const T & | scalar
 | ) | [related]

Division operator with scalar argument, returning new vector

Author:
Ingo Thomsen, tested

Definition at line 197 of file Operators.hh.

References BIASERR, BIAS::Vector4< T >::Divide(), and T.

template<class T>
bool operator< | ( | const Vector4< T > & | a,
 |  | const Vector4< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 412 of file Operators.hh.

template<class T>
bool operator<= | ( | const Vector4< T > & | a,
 |  | const Vector4< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 406 of file Operators.hh.

template<class T>
bool operator> | ( | const Vector4< T > & | a,
 |  | const Vector4< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 424 of file Operators.hh.

template<class T>
bool operator>= | ( | const Vector4< T > & | a,
 |  | const Vector4< T > & | b
 | ) | [related]

Author:
Dennis Herzog, 2005-07-27

Definition at line 418 of file Operators.hh.

Member Data Documentation

template<class T>
T BIAS::Vector4< T >::data_[VECTOR4SIZE] [protected]

Definition at line 326 of file Vector4.hh.

Referenced by BIAS::Vector4< T >::Add(), BIAS::Vector4< T >::Copy(), BIAS::Vector4< T >::Dist(), BIAS::Vector4< T >::Divide(), BIAS::Vector4< T >::ElementwiseProduct(), BIAS::Vector4< T >::Multiply(), BIAS::Vector4< T >::NormL1(), BIAS::Vector4< T >::NormL2(), BIAS::Vector4< T >::operator==(), BIAS::HomgPoint3D::operator==(), BIAS::Vector4< T >::operator[](), BIAS::Vector4< T >::ScalarProduct(), BIAS::Vector4< T >::Set(), BIAS::Vector4< T >::Sub(), BIAS::Vector4< T >::transposed(), and BIAS::Vector4< T >::Vector4().

The documentation for this class was generated from the following files:
  • Base/Math/Vector4.hh
  • Base/Math/Operators.hh
  • Base/Math/Vector4.cpp
Generated on Wed Jun 21 19:12:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT::Vector_Adaptor< BBVec > Class Template Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
TNT::Vector_Adaptor

TNT::Vector_Adaptor< BBVec > Class Template Reference

#include <Base/Math/tnt/vecadaptor.h>

Collaboration diagram for TNT::Vector_Adaptor< BBVec >:

[legend]
List of all members.

Public Types

typedef const T * | const_iterator
typedef const T & | const_reference
typedef T | element_type
typedef T * | iterator
typedef T * | pointer
typedef T & | reference
typedef BBVec::value_type | T
typedef T | value_type

Public Member Functions

Subscript | dim (Subscript i)
Subscript | dim () const
Vector_Adaptor< BBVec > & | free ()
BBVec & | getVector ()
Subscript | lbound () const
Vector_Adaptor< BBVec > & | newsize (Subscript N)
const_reference | operator() (Subscript i) const
reference | operator() (Subscript i)
Vector_Adaptor< BBVec > & | operator= (const T &a)
Vector_Adaptor< BBVec > & | operator= (const Vector_Adaptor< BBVec > &A)
const_reference | operator[] (Subscript i) const
reference | operator[] (Subscript i)
Vector_Adaptor< BBVec > & | resize (Subscript N)
Subscript | size () const
Vector_Adaptor (const BBVec &A)
Vector_Adaptor (Subscript N, const T *values)
Vector_Adaptor (Subscript N, const T &value=T())
Vector_Adaptor (Subscript N, char *s)
Vector_Adaptor (const Vector_Adaptor< BBVec > &A)
Vector_Adaptor ()

Protected Attributes

BBVec | v_
T * vm1_

Detailed Description

template<class BBVec>
class TNT::Vector_Adaptor< BBVec >

Definition at line 68 of file vecadaptor.h.

Member Typedef Documentation

template<class BBVec>
typedef const T* TNT::Vector_Adaptor< BBVec >::const_iterator

Definition at line 78 of file vecadaptor.h.

template<class BBVec>
typedef const T& TNT::Vector_Adaptor< BBVec >::const_reference

Definition at line 79 of file vecadaptor.h.

template<class BBVec>
typedef T TNT::Vector_Adaptor< BBVec >::element_type

Definition at line 74 of file vecadaptor.h.

template<class BBVec>
typedef T* TNT::Vector_Adaptor< BBVec >::iterator

Definition at line 76 of file vecadaptor.h.

template<class BBVec>
typedef T* TNT::Vector_Adaptor< BBVec >::pointer

Definition at line 75 of file vecadaptor.h.

template<class BBVec>
typedef T& TNT::Vector_Adaptor< BBVec >::reference

Definition at line 77 of file vecadaptor.h.

template<class BBVec>
typedef BBVec::value_type TNT::Vector_Adaptor< BBVec >::T

Definition at line 72 of file vecadaptor.h.

template<class BBVec>
typedef T TNT::Vector_Adaptor< BBVec >::value_type

Definition at line 73 of file vecadaptor.h.

Constructor & Destructor Documentation

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor ( ) [inline]

Definition at line 116 of file vecadaptor.h.

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor ( const Vector_Adaptor< BBVec > & A ) [inline]

Definition at line 117 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor | ( | Subscript | N,
 |  | char * | s
 | ) | [inline]

Definition at line 123 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor | ( | Subscript | N,
 |  | const T & | value = T()
 | ) | [inline]

Definition at line 132 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, value, and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor | ( | Subscript | N,
 |  | const T * | values
 | ) | [inline]

Definition at line 140 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
TNT::Vector_Adaptor< BBVec >::Vector_Adaptor ( const BBVec & A ) [inline]

Definition at line 146 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, and TNT::Vector_Adaptor< BBVec >::vm1_.

Member Function Documentation

template<class BBVec>
Subscript TNT::Vector_Adaptor< BBVec >::dim ( Subscript i ) [inline]

Definition at line 109 of file vecadaptor.h.

References TNT_BASE_OFFSET, and TNT::Vector_Adaptor< BBVec >::v_.

template<class BBVec>
Subscript TNT::Vector_Adaptor< BBVec >::dim ( ) const [inline]

Definition at line 108 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_.

Referenced by TNT::Vector_Adaptor< BBVec >::operator()(), and TNT::Vector_Adaptor< BBVec >::operator[]().

template<class BBVec>
Vector_Adaptor<BBVec>& TNT::Vector_Adaptor< BBVec >::free ( ) [inline]

Definition at line 156 of file vecadaptor.h.

template<class BBVec>
BBVec& TNT::Vector_Adaptor< BBVec >::getVector ( ) [inline]

Definition at line 107 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_.

template<class BBVec>
Subscript TNT::Vector_Adaptor< BBVec >::lbound ( ) const [inline]

Definition at line 81 of file vecadaptor.h.

template<class BBVec>
Vector_Adaptor<BBVec>& TNT::Vector_Adaptor< BBVec >::newsize ( Subscript N ) [inline]

Definition at line 168 of file vecadaptor.h.

template<class BBVec>
const_reference TNT::Vector_Adaptor< BBVec >::operator() ( Subscript i ) const [inline]

Definition at line 215 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::dim(), and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
reference TNT::Vector_Adaptor< BBVec >::operator() ( Subscript i ) [inline]

Definition at line 206 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::dim(), and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
Vector_Adaptor<BBVec>& TNT::Vector_Adaptor< BBVec >::operator= ( const T & a ) [inline]

Definition at line 179 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_.

template<class BBVec>
Vector_Adaptor<BBVec>& TNT::Vector_Adaptor< BBVec >::operator= ( const Vector_Adaptor< BBVec > & A ) [inline]

Definition at line 161 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_, and TNT::Vector_Adaptor< BBVec >::vm1_.

template<class BBVec>
const_reference TNT::Vector_Adaptor< BBVec >::operator[] ( Subscript i ) const [inline]

Definition at line 233 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::dim(), and TNT::Vector_Adaptor< BBVec >::v_.

template<class BBVec>
reference TNT::Vector_Adaptor< BBVec >::operator[] ( Subscript i ) [inline]

Definition at line 224 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::dim(), and TNT::Vector_Adaptor< BBVec >::v_.

template<class BBVec>
Vector_Adaptor<BBVec>& TNT::Vector_Adaptor< BBVec >::resize ( Subscript N ) [inline]

Definition at line 189 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::size(), and TNT::Vector_Adaptor< BBVec >::v_.

Referenced by TNT::operator>>().

template<class BBVec>
Subscript TNT::Vector_Adaptor< BBVec >::size ( ) const [inline]

Definition at line 89 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::v_.

Referenced by TNT::Vector_Adaptor< BBVec >::resize().

Member Data Documentation

template<class BBVec>
BBVec TNT::Vector_Adaptor< BBVec >::v_ [protected]

Definition at line 84 of file vecadaptor.h.

Referenced by TNT::Vector_Adaptor< BBVec >::dim(), TNT::Vector_Adaptor< BBVec >::getVector(), TNT::Vector_Adaptor< BBVec >::operator=(), TNT::Vector_Adaptor< BBVec >::operator[](), TNT::Vector_Adaptor< BBVec >::resize(), TNT::Vector_Adaptor< BBVec >::size(), and TNT::Vector_Adaptor< BBVec >::Vector_Adaptor().

template<class BBVec>
T* TNT::Vector_Adaptor< BBVec >::vm1_ [protected]

Definition at line 85 of file vecadaptor.h.

Referenced by TNT::Vector_Adaptor< BBVec >::operator()(), TNT::Vector_Adaptor< BBVec >::operator=(), and TNT::Vector_Adaptor< BBVec >::Vector_Adaptor().

The documentation for this class was generated from the following file:
  • Base/Math/tnt/vecadaptor.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VectorPanel Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VectorPanel

BIAS::VectorPanel Class Reference

Panel for displaying and editing vectors. More...

#include <Gui/ProjectionGUI.hh>

List of all members.

Public Member Functions

BIAS::Vector< double > | GetVector () const
void | SetVector (const BIAS::Vector< double > &vector)
VectorPanel (wxWindow *parent, wxWindowID id, bool editable)

Private Attributes

std::vector< wxTextCtrl * > | controls_
bool | editable_

Detailed Description

Panel for displaying and editing vectors.

Author:
jkollmann

Definition at line 21 of file ProjectionGUI.hh.

Constructor & Destructor Documentation

VectorPanel::VectorPanel | ( | wxWindow * | parent,
 |  | wxWindowID | id,
 |  | bool | editable
 | ) |

Definition at line 15 of file ProjectionGUI.cpp.

References editable_.

Member Function Documentation

Vector< double > VectorPanel::GetVector ( ) const

Definition at line 50 of file ProjectionGUI.cpp.

References controls_, and WxToAscii.

Referenced by BIAS::ProjectionGUI::OnModified().

void VectorPanel::SetVector ( const BIAS::Vector< double > & vector )

Definition at line 21 of file ProjectionGUI.cpp.

References controls_, editable_, and BIAS::Vector< T >::Size().

Referenced by BIAS::ProjectionGUI::UpdateGUI().

Member Data Documentation

std::vector<wxTextCtrl*> BIAS::VectorPanel::controls_ [private]

Definition at line 30 of file ProjectionGUI.hh.

Referenced by GetVector(), and SetVector().

bool BIAS::VectorPanel::editable_ [private]

Definition at line 29 of file ProjectionGUI.hh.

Referenced by SetVector(), and VectorPanel().

The documentation for this class was generated from the following files:
  • Gui/ProjectionGUI.hh
  • Gui/ProjectionGUI.cpp
Generated on Wed Jun 21 19:12:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoServer Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoServer

BIAS::VideoServer Class Reference

class to send images from a camera or disk to a client More...

#include <VideoSource/VideoServer.hh>

Inheritance diagram for BIAS::VideoServer:

[legend]
Collaboration diagram for BIAS::VideoServer:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
VideoSource * GetCamera ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
double | GetFPS ()
unsigned int | GetMessageSize ()
BIAS::Camera< unsigned char > * | GetSendImage ()
int | Init (int port=D_CS_DEFAULT_PORT)
void | PrintDebugLevel (std::ostream &os=std::cout) const
int | ProcessOneImage ()
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
VideoServer ()
VideoServer (BIAS::Param &p)
~VideoServer ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void AddParams_ (BIAS::Param &p)

Protected Attributes

long int | _liDebugLevel
VideoSource * camera_
BIAS::Camera< unsigned char > | CamImage_
BIAS::Vector< double > * | camParam_
int * | camType_
bool * | compressionColor_
JpegHandler Compressor_
int * | imgHeight_
int * | imgWidth_
bool | Initialized_
int * | jpeg_
unsigned int | msgSize_
bool | ParamsAllocated_
int * | port_
BIAS::Rescale< unsigned char,
unsigned char > 		RescaleFilter_
double * | resizeFactor_
std::ostringstream | SendBuffer_
BIAS::Camera< unsigned char > | SendImage_
CScommServer server_
std::string * | targetAddress_
int * | UDPServerThrottle_
bool * | useUDP_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Private Member Functions

VideoServer & | operator= (const VideoServer &)
VideoServer (const VideoServer &)

Detailed Description

class to send images from a camera or disk to a client

uses TCP or UDPServer, so far only for D_CAM input. Catch images with the VideoSourve_Net class.
VideoSourceDisk takes the all images in the current dir. grest Nov. 2005

Definition at line 35 of file VideoServer.hh.

Constructor & Destructor Documentation

VideoServer::VideoServer ( BIAS::Param & p )

Definition at line 20 of file VideoServer.cpp.

References AddParams_(), Initialized_, msgSize_, and ParamsAllocated_.

VideoServer::VideoServer ( )

Definition at line 27 of file VideoServer.cpp.

References camParam_, camType_, compressionColor_, D_CS_DEFAULT_PORT, imgHeight_, imgWidth_, Initialized_, jpeg_, msgSize_, ParamsAllocated_, port_, resizeFactor_, targetAddress_, UDPServerThrottle_, and useUDP_.

VideoServer::~VideoServer ( )

Definition at line 63 of file VideoServer.cpp.

References camera_, camParam_, camType_, BIAS::VideoSource::CloseDevice(), compressionColor_, imgHeight_, imgWidth_, jpeg_, ParamsAllocated_, port_, resizeFactor_, targetAddress_, UDPServerThrottle_, and useUDP_.

BIAS::VideoServer::VideoServer ( const VideoServer & ) [inline, private]

Definition at line 87 of file VideoServer.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void VideoServer::AddParams_ ( BIAS::Param & p ) [protected]

Definition at line 232 of file VideoServer.cpp.

References BIAS::Param::AddParamBool(), BIAS::Param::AddParamDouble(), BIAS::Param::AddParamInt(), BIAS::Param::AddParamString(), BIAS::Param::AddParamVecDbl(), camParam_, camType_, compressionColor_, D_CS_DEFAULT_PORT, BIAS::Param::GetFreeGroupID(), imgHeight_, imgWidth_, jpeg_, port_, resizeFactor_, BIAS::Param::SetGroupName(), targetAddress_, UDPServerThrottle_, and useUDP_.

Referenced by VideoServer().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

VideoSource* BIAS::VideoServer::GetCamera ( ) [inline]

Definition at line 45 of file VideoServer.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

double BIAS::VideoServer::GetFPS ( ) [inline]

Definition at line 47 of file VideoServer.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

unsigned int BIAS::VideoServer::GetMessageSize ( ) [inline]

Definition at line 51 of file VideoServer.hh.

Referenced by main().

BIAS::Camera<unsigned char>* BIAS::VideoServer::GetSendImage ( ) [inline]

Definition at line 49 of file VideoServer.hh.

int VideoServer::Init ( int port = D_CS_DEFAULT_PORT )

Definition at line 87 of file VideoServer.cpp.

References BIAS::VideoSource::AutoMode(), BIASERR, camera_, camParam_, camType_, Compressor_, BIAS::VideoSource::GetGain(), BIAS::VideoSource::GetHeight(), BIAS::VideoSource::GetShutter(), BIAS::VideoSource::GetWidth(), imgHeight_, imgWidth_, BIAS::JpegHandler::Init(), jpeg_, BIAS::VideoSource::OpenDevice(), port_, BIAS::VideoSource::PreGrab(), res, BIAS::VideoSource::SetFPS(), BIAS::VideoSource::SetShutter(), and BIAS::VideoSource::SetSize().

Referenced by main().

VideoServer& BIAS::VideoServer::operator= ( const VideoServer & ) [inline, private]

Definition at line 88 of file VideoServer.hh.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

int VideoServer::ProcessOneImage ( )

Definition at line 164 of file VideoServer.cpp.

References BIASERR, camera_, CamImage_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::JpegHandler::Compress(), compressionColor_, Compressor_, BIAS::Rescale< InputStorageType, OutputStorageType >::Filter(), BIAS::UUID::GenerateUUID(), BIAS::ImageBase::GetColorModel(), BIAS::CScommBase::GetConnections(), BIAS::VideoSource::GrabSingle(), Initialized_, jpeg_, RescaleFilter_, resizeFactor_, SendImage_, server_, BIAS::Rescale< InputStorageType, OutputStorageType >::SetFactor(), BIAS::ImageBase::SetUID(), BIAS::ImageConvert::ToGrey(), and BIAS::ImageConvert::ToRGB().

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

VideoSource* BIAS::VideoServer::camera_ [protected]

Definition at line 67 of file VideoServer.hh.

Referenced by Init(), ProcessOneImage(), and ~VideoServer().

BIAS::Camera<unsigned char> BIAS::VideoServer::CamImage_ [protected]

Definition at line 68 of file VideoServer.hh.

Referenced by ProcessOneImage().

BIAS::Vector<double>* BIAS::VideoServer::camParam_ [protected]

Definition at line 60 of file VideoServer.hh.

Referenced by AddParams_(), Init(), VideoServer(), and ~VideoServer().

int* BIAS::VideoServer::camType_ [protected]

Definition at line 61 of file VideoServer.hh.

Referenced by AddParams_(), Init(), VideoServer(), and ~VideoServer().

bool* BIAS::VideoServer::compressionColor_ [protected]

Definition at line 76 of file VideoServer.hh.

Referenced by AddParams_(), ProcessOneImage(), VideoServer(), and ~VideoServer().

JpegHandler BIAS::VideoServer::Compressor_ [protected]

Definition at line 82 of file VideoServer.hh.

Referenced by Init(), and ProcessOneImage().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

int * BIAS::VideoServer::imgHeight_ [protected]

Definition at line 61 of file VideoServer.hh.

Referenced by AddParams_(), Init(), VideoServer(), and ~VideoServer().

int * BIAS::VideoServer::imgWidth_ [protected]

Definition at line 61 of file VideoServer.hh.

Referenced by AddParams_(), Init(), VideoServer(), and ~VideoServer().

bool BIAS::VideoServer::Initialized_ [protected]

Definition at line 70 of file VideoServer.hh.

Referenced by ProcessOneImage(), and VideoServer().

int * BIAS::VideoServer::jpeg_ [protected]

Definition at line 61 of file VideoServer.hh.

Referenced by AddParams_(), Init(), ProcessOneImage(), VideoServer(), and ~VideoServer().

unsigned int BIAS::VideoServer::msgSize_ [protected]

Definition at line 74 of file VideoServer.hh.

Referenced by VideoServer().

bool BIAS::VideoServer::ParamsAllocated_ [protected]

Definition at line 57 of file VideoServer.hh.

Referenced by VideoServer(), and ~VideoServer().

int* BIAS::VideoServer::port_ [protected]

Definition at line 58 of file VideoServer.hh.

Referenced by AddParams_(), Init(), VideoServer(), and ~VideoServer().

BIAS::Rescale<unsigned char,unsigned char> BIAS::VideoServer::RescaleFilter_ [protected]

Definition at line 72 of file VideoServer.hh.

Referenced by ProcessOneImage().

double* BIAS::VideoServer::resizeFactor_ [protected]

Definition at line 62 of file VideoServer.hh.

Referenced by AddParams_(), ProcessOneImage(), VideoServer(), and ~VideoServer().

std::ostringstream BIAS::VideoServer::SendBuffer_ [protected]

Definition at line 71 of file VideoServer.hh.

BIAS::Camera<unsigned char> BIAS::VideoServer::SendImage_ [protected]

Definition at line 69 of file VideoServer.hh.

Referenced by ProcessOneImage().

CScommServer BIAS::VideoServer::server_ [protected]

Definition at line 79 of file VideoServer.hh.

Referenced by ProcessOneImage().

std::string* BIAS::VideoServer::targetAddress_ [protected]

Definition at line 59 of file VideoServer.hh.

Referenced by AddParams_(), VideoServer(), and ~VideoServer().

int* BIAS::VideoServer::UDPServerThrottle_ [protected]

Definition at line 63 of file VideoServer.hh.

Referenced by AddParams_(), VideoServer(), and ~VideoServer().

bool* BIAS::VideoServer::useUDP_ [protected]

Definition at line 64 of file VideoServer.hh.

Referenced by AddParams_(), VideoServer(), and ~VideoServer().

The documentation for this class was generated from the following files:
  • VideoSource/VideoServer.hh
  • VideoSource/VideoServer.cpp
Generated on Wed Jun 21 19:12:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoShMFeeder Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoShMFeeder

BIAS::VideoShMFeeder Class Reference

class to save Images to a Sharerd memory More...

#include <VideoSource/VideoShMFeeder.hh>

Inheritance diagram for BIAS::VideoShMFeeder:

[legend]
Collaboration diagram for BIAS::VideoShMFeeder:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
bool | DebugLevelIsSet (long int lv) const
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
void | PrintDebugLevel (std::ostream &os=std::cout) const
bool | ProcessImage (BIAS::Camera< unsigned char > *Image)
void | RemoveDebugLevel (long int lv)
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
VideoShMFeeder (const std::string &filename)
VideoShMFeeder ()
~VideoShMFeeder ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

bool | Init_ ()
VideoShMFeeder & | operator= (const VideoShMFeeder &source)
prohibit default function (move to 'public' if needed)
VideoShMFeeder (const VideoShMFeeder &source)
prohibit default function (move to 'public' if needed)

Protected Attributes

long int | _liDebugLevel
bool | bIsInitialized_
unsigned char * | Data_
int | DataLength_
std::string | FileName_
VideoSource_Shm::ShmImageHeader * Header_
std::stringstream | ImgBuffer_
int | MemoryLengthTotal_
void * Shm_
int | ShmContext_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

class to save Images to a Sharerd memory

ischiller 2006

Definition at line 60 of file VideoShMFeeder.hh.

Constructor & Destructor Documentation

VideoShMFeeder::VideoShMFeeder ( )

Definition at line 31 of file VideoShMFeeder.cpp.

References bIsInitialized_, Data_, DataLength_, FileName_, Header_, MemoryLengthTotal_, Shm_, and ShmContext_.

BIAS::VideoShMFeeder::VideoShMFeeder ( const std::string & filename )

VideoShMFeeder::~VideoShMFeeder ( )

Definition at line 68 of file VideoShMFeeder.cpp.

References bIsInitialized_, FileName_, and Shm_.

BIAS::VideoShMFeeder::VideoShMFeeder ( const VideoShMFeeder & source ) [protected]

prohibit default function (move to 'public' if needed)

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

bool VideoShMFeeder::Init_ ( ) [protected]

Definition at line 80 of file VideoShMFeeder.cpp.

References DataLength_, and MemoryLengthTotal_.

Referenced by ProcessImage().

VideoShMFeeder& BIAS::VideoShMFeeder::operator= ( const VideoShMFeeder & source ) [protected]

prohibit default function (move to 'public' if needed)

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

bool VideoShMFeeder::ProcessImage ( BIAS::Camera< unsigned char > * Image )

Definition at line 162 of file VideoShMFeeder.cpp.

References BIASASSERT, bIsInitialized_, Data_, DataLength_, Header_, ImgBuffer_, Init_(), BIAS::VideoSource_Shm::ShmImageHeader::Size_, and BIAS::VideoSource_Shm::ShmImageHeader::Time_.

Referenced by main().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoShMFeeder::bIsInitialized_ [protected]

Definition at line 85 of file VideoShMFeeder.hh.

Referenced by ProcessImage(), VideoShMFeeder(), and ~VideoShMFeeder().

unsigned char* BIAS::VideoShMFeeder::Data_ [protected]

Definition at line 84 of file VideoShMFeeder.hh.

Referenced by ProcessImage(), and VideoShMFeeder().

int BIAS::VideoShMFeeder::DataLength_ [protected]

Definition at line 80 of file VideoShMFeeder.hh.

Referenced by Init_(), ProcessImage(), and VideoShMFeeder().

std::string BIAS::VideoShMFeeder::FileName_ [protected]

Definition at line 86 of file VideoShMFeeder.hh.

Referenced by VideoShMFeeder(), and ~VideoShMFeeder().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

VideoSource_Shm::ShmImageHeader* BIAS::VideoShMFeeder::Header_ [protected]

Definition at line 82 of file VideoShMFeeder.hh.

Referenced by ProcessImage(), and VideoShMFeeder().

std::stringstream BIAS::VideoShMFeeder::ImgBuffer_ [protected]

Definition at line 83 of file VideoShMFeeder.hh.

Referenced by ProcessImage().

int BIAS::VideoShMFeeder::MemoryLengthTotal_ [protected]

Definition at line 79 of file VideoShMFeeder.hh.

Referenced by Init_(), and VideoShMFeeder().

void* BIAS::VideoShMFeeder::Shm_ [protected]

Definition at line 81 of file VideoShMFeeder.hh.

Referenced by VideoShMFeeder(), and ~VideoShMFeeder().

int BIAS::VideoShMFeeder::ShmContext_ [protected]

Definition at line 76 of file VideoShMFeeder.hh.

Referenced by VideoShMFeeder().

The documentation for this class was generated from the following files:
  • VideoSource/VideoShMFeeder.hh
  • VideoSource/VideoShMFeeder.cpp
Generated on Wed Jun 21 19:12:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource

BIAS::VideoSource Class Reference

Defines a common interface to different devices. More...

#include <VideoSource/VideoSource_Base.hh>

Inheritance diagram for BIAS::VideoSource:

[legend]
Collaboration diagram for BIAS::VideoSource:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
virtual int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
virtual int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
virtual int | PostGrab ()
Stop anythig started in PreGrab().
virtual int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource (int card)
VideoSource ()
virtual | ~VideoSource ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Defines a common interface to different devices.

Author:
evers
Specialized classes for each deviceclass should be derived and most methods have to be reimplemented.

Usage:

VideoSource *foo;

Image bar;

/ assume to have a class for DCAM cams foo = new VideoSource_DCAM;

/ select a colormode with SetColorMode() if required the default colormode depends on the used Camera(kind of VideoSource)

set a image size for grabbing foo->SetSize(width,height) foo->SetSize(768,576);

/ Want to take the second channel (what ever this means) foo->SetChannel(2);

/ take the first appropriate device foo->OpenDevice();

foo->InitImage(bar);

do last preparations foo->PreGrab();

get one frame foo->GrabSingle(bar);

stop enetually running things (isochronous transfers for example) foo->PostGrab();

clean up foo->CloseDevice();

Definition at line 99 of file VideoSource_Base.hh.

Constructor & Destructor Documentation

VideoSource::VideoSource ( )

Definition at line 43 of file VideoSource_Base.cpp.

References Active_, BytesPerPixel_, ColorChannels_, CompleteInitialized_, DefaultDevice_, DeviceChannel_, DirectToDisk_, DtDBuffer_, DtDBufferSize_, DtDFd_, Grabbing_, GrabbingContinous_, Height_, and Width_.

Referenced by BIAS::VideoSource_Shm::VideoSource_Shm().

VideoSource::VideoSource ( int card )

Definition at line 62 of file VideoSource_Base.cpp.

References Active_, BytesPerPixel_, ColorChannels_, CompleteInitialized_, DefaultDevice_, DeviceChannel_, DirectToDisk_, DtDBuffer_, DtDBufferSize_, DtDFd_, Grabbing_, GrabbingContinous_, Height_, and Width_.

VideoSource::~VideoSource ( ) [virtual]

Definition at line 80 of file VideoSource_Base.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource::CloseDevice ( ) [virtual]

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 224 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoSource_Stereo::CloseDevice(), and BIAS::VideoServer::~VideoServer().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource::GetShutter ( ) [virtual]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 233 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource_Stereo::GrabSingle(), main(), mainloop(), BIAS::VideoServer::ProcessOneImage(), and SoftwareWhiteBalance().

int VideoSource::InitImage ( BIAS::ImageBase & Image )

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const char * device ) [virtual]

a device name like "/dev/video1" can be specified here

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_V4L.

Definition at line 190 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 178 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoServer::Init(), main(), BIAS::VideoSource_Stereo::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), and SoftwareWhiteBalance().

int VideoSource::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 154 of file VideoSource_Base.cpp.

References Active_.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), main(), and BIAS::VideoSource_Stereo::PostGrab().

int VideoSource::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 135 of file VideoSource_Base.cpp.

References Active_, BIASERR, and CompleteInitialized_.

Referenced by BIAS::VideoServer::Init(), main(), BIAS::VideoSource_Stereo::PreGrab(), and BIAS::VideoSource_Disk::PreGrab().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, ColorChannels_, and ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename )

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BytesPerPixel_, ColorChannels_, ColorMode_, D_DTD, DirectToDisk_, DtDBuffer_, DtDBufferSize_, DtDFd_, DtDImageHeader_, DtDStartOfImage_, Height_, ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BytesPerPixel_, Height_, and Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), GrabSingle(), img, InitImage(), mean, OpenDevice(), BIAS::ROI::SetCorners(), SetGain(), BIAS::ImageBase::SetROI(), SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, DtDBuffer_, DtDBufferSize_, DtDFd_, DtDImageHeader_, DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), PreGrab(), and VideoSource().

float BIAS::VideoSource::BytesPerPixel_ [protected]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), SetColorModel(), SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), SetColorModel(), SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), PreGrab(), SoftwareWhiteBalance(), and VideoSource().

char* BIAS::VideoSource::DefaultDevice_ [protected]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), VideoSource(), and WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), VideoSource(), and WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), VideoSource(), and WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk(), and WriteDirect_().

float BIAS::VideoSource::FramesPerSecond_ [protected]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by VideoSource().

int BIAS::VideoSource::Height_ [protected]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by SetDirectToDisk().

int BIAS::VideoSource::Width_ [protected]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_Base.hh
  • VideoSource/VideoSource_Base.cpp
Generated on Wed Jun 21 19:12:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_DCAM Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_DCAM

BIAS::VideoSource_DCAM Class Reference

This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll. More...

#include <VideoSource/VideoSource_DCAM.hh>

Inheritance diagram for BIAS::VideoSource_DCAM:

[legend]
Collaboration diagram for BIAS::VideoSource_DCAM:

[legend]
List of all members.

Public Member Functions

void ActivateScorpionTimestamp ()
void | AddDebugLevel (long int lv)
int | AutoMode (int feature, bool on)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
int | ExternalTrigger (bool on)
void | ForceFormat7 (bool forcef7)
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
unsigned int | GetFeature (int feature)
normaly, feature is an enum
float | GetGain ()
unsigned char | GetGammaMode ()
int | GetHeight ()
int | GetID ()
unsigned int | GetLeft ()
float | GetShutter ()
unsigned int | GetTop ()
int | GetTransmissionTime ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
int | OnePushAuto (int feature)
bool | OnePushRunning (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
int | OpenDevice (int camid)
a device number can be specified here (DCAM) or port number (Net)
int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBinning (bool b)
void | SetBytesPerPacket (const int b)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
int | SetCamera (CameraParameterSet camparam)
set camera to parameters specified in complete set
virtual void | SetCameraID (int)
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
int | SetFormat7 (int mode, int bpp, int colorchannels)
this a special function to by-pass all automatic initializations and Use only in conjuction with SertSize() and SetLeftTop() !
void | SetFPS (float fps)
Must be used before OpenDevice() !
int | SetGain (float g)
Set gain to g with g[dB].
int | SetGammaMode (unsigned char g)
int | SetLeftTop (unsigned int left, unsigned int top)
set the topleft corner for partitial scan
int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
int | UseChannel (int channel)
VideoSource_DCAM (int Card=0)
~VideoSource_DCAM ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Public Attributes

bool | ScorpionTimestampActive_

Protected Member Functions

int | ApplyBytesPerPacket ()
Set this value and read back what really happend.
unsigned int | CalcBytesPerPacket ()
Evaluate Min and Max BpP, framesize and fps, then calc BpP.
CameraModel | GetModelForEuid (const u_int64_t euid)
int | InitCam ()
void PrintFormatAndMode_ ()
int | QueryCam ()
int | SelectDefault ()
int | StartIso ()
int | StopIso ()
int | UserSizeToFormat7_ ()
int | UserSizeToMode ()
int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
int | BytesPerPacket_
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
CameraModel CamModel_
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
dc1394_cameracapture | DcamCapture_
int | DcamDMABuffers_
dc1394_feature_set | DcamFeatures_
int | DcamFormat_
int | DcamFps_
dc1394_camerainfo | DcamInfo_
int | DcamIsoChannel_
int | DcamMode_
nodeid_t * | DcamNodes_
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectF7_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
bool | ForceF7_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
int | IEEE1394Card_
unsigned int | ImageSize_
unsigned int | Left_
LensModel Lens_
unsigned int | MaxBpP_
unsigned int | MaxHeight_
unsigned int | MaxWidth_
unsigned int | MinBpP_
int | NumCams_
int | SelectedCam_
unsigned char | Shift16_
bool | SupportedFeature_ [NUM_FEATURES]
bool | SupportedFormats_ [NUM_FORMATS]
int | SupportedFramerates_ [NUM_FORMATS][NUM_FORMAT1_MODES]
bool | SupportedModes_ [NUM_FORMATS][NUM_FORMAT1_MODES]
unsigned int | Top_
int | TransmissionTime_
int | Trigger_
unsigned int | UnitHeight_
unsigned int | UnitWidth_
bool | UseBinning_
bool | UseDMA_
bool | UserTopLeft_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static int | BytesPerCyle_ [MAX_1394_CARDS]
static long int | GlobalDebugLevel = 0
static raw1394handle_t | IEEE1394Handle_ [MAX_1394_CARDS]
use some magic to determine vendor and model
static int | Instances_ [MAX_1394_CARDS]
static int | InstancesTotal_ = 0

Detailed Description

This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll.

Author:
evers
Todo:
does not work with libdc1394_control version 9.0.0 (on ana3, Suse 8.2) but works on 9.0.3 (saale, Suse 9.1) aposor, jw 10.2004

double check Bayer Scorpion ToRGB (JW)

Win32 port by common parent class (JW)

implement a generic SetBestVideoFormat function, trying avalable format/mode/rate combinations (JW) like on WIN32.

Definition at line 186 of file VideoSource_DCAM.hh.

Constructor & Destructor Documentation

VideoSource_DCAM::VideoSource_DCAM ( int Card = 0 )

Definition at line 72 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, BytesPerCyle_, BytesPerPacket_, BIAS::ImageBase::CM_UYVY422, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DCAM, DcamFormat_, DcamFps_, DcamMode_, BIAS::VideoSource::DefaultDevice_, DirectF7_, ForceF7_, BIAS::VideoSource::FramesPerSecond_, BIAS::VideoSource::Height_, IEEE1394Card_, IEEE1394Handle_, Instances_, InstancesTotal_, MAX_1394_CARDS, SelectedCam_, BIAS::Debug::SetDebugLevel(), Shift16_, TransmissionTime_, UseBinning_, UseDMA_, UserTopLeft_, and BIAS::VideoSource::Width_.

VideoSource_DCAM::~VideoSource_DCAM ( )

Definition at line 160 of file VideoSource_DCAM.cpp.

References BIASDOUT, D_DCAM, IEEE1394Card_, IEEE1394Handle_, Instances_, and InstancesTotal_.

Member Function Documentation

void VideoSource_DCAM::ActivateScorpionTimestamp ( )

Activates the timestamp for PointGrey Scorpion SCOR-20SO

Definition at line 365 of file VideoSource_DCAM.cpp.

References DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by BIAS::MDcam::ActivateScorpionTimestamp().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource_DCAM::ApplyBytesPerPacket ( ) [protected]

Set this value and read back what really happend.

Definition at line 955 of file VideoSource_DCAM.cpp.

References BIASDOUT, BytesPerPacket_, BIAS::VideoSource::ColorChannels_, D_DCAM_F7, DcamMode_, DcamNodes_, BIAS::VideoSource::Height_, IEEE1394Card_, IEEE1394Handle_, SelectedCam_, TransmissionTime_, and BIAS::VideoSource::Width_.

Referenced by InitCam().

int VideoSource_DCAM::AutoMode | ( | int | feature,
 |  | bool | on
 | ) | [virtual]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented from BIAS::VideoSource.

Definition at line 1144 of file VideoSource_DCAM.cpp.

References BIASERR, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by BIAS::MDcam::AutoMode(), mainloop(), and SetCamera().

unsigned int VideoSource_DCAM::CalcBytesPerPacket ( ) [protected]

Evaluate Min and Max BpP, framesize and fps, then calc BpP.

Definition at line 891 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, BytesPerPacket_, BIAS::VideoSource::ColorChannels_, D_DCAM_F7, DcamNodes_, BIAS::VideoSource::FramesPerSecond_, BIAS::VideoSource::Height_, IEEE1394Card_, IEEE1394Handle_, MaxBpP_, MinBpP_, SelectedCam_, and BIAS::VideoSource::Width_.

Referenced by InitCam().

int VideoSource_DCAM::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 256 of file VideoSource_DCAM.cpp.

References DcamCapture_, IEEE1394Card_, IEEE1394Handle_, and UseDMA_.

Referenced by main(), BIAS::MDcam::ReleaseCameras(), and BIAS::MDcam::ScanBus().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

int VideoSource_DCAM::ExternalTrigger ( bool on )

Definition at line 1199 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, DcamNodes_, BIAS::VideoSource::ID_, IEEE1394Card_, IEEE1394Handle_, SelectedCam_, and Trigger_.

Referenced by BIAS::MDcam::ExternalTrigger().

void BIAS::VideoSource_DCAM::ForceFormat7 ( bool forcef7 ) [inline]

Definition at line 259 of file VideoSource_DCAM.hh.

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource_DCAM::GetFeature ( int feature ) [virtual]

normaly, feature is an enum

Reimplemented from BIAS::VideoSource.

Definition at line 1233 of file VideoSource_DCAM.cpp.

References BIASERR, DcamNodes_, BIAS::VideoSource::ID_, IEEE1394Card_, IEEE1394Handle_, SelectedCam_, SupportedFeature_, and value.

Referenced by BIAS::MDcam::EqualizeFeature(), GetGain(), GetGammaMode(), and GetShutter().

float VideoSource_DCAM::GetGain ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 1456 of file VideoSource_DCAM.cpp.

References BIAS::CAMERA_PTGREY_DRAGONFLY_BW, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_SONY_DFW_X700, CamModel_, DcamNodes_, gain, GetFeature(), IEEE1394Card_, IEEE1394Handle_, max, min, SelectedCam_, and value.

Referenced by BIAS::MDcam::GetGain().

unsigned char VideoSource_DCAM::GetGammaMode ( )

Definition at line 1507 of file VideoSource_DCAM.cpp.

References GetFeature(), and value.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

unsigned int BIAS::VideoSource_DCAM::GetLeft ( ) [inline]

Definition at line 245 of file VideoSource_DCAM.hh.

CameraModel VideoSource_DCAM::GetModelForEuid ( const u_int64_t euid ) [protected]

Definition at line 1605 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIAS::VideoSource::BytesPerPixel_, BIAS::CAMERA_PTGREY_DRAGONFLY_BW, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_SONY_DFW_X700, BIAS::CAMERA_UNKNOWN, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_UYVY422, BIAS::VideoSource::ColorMode_, D_DCAM, and Shift16_.

Referenced by OpenDevice().

float VideoSource_DCAM::GetShutter ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 1357 of file VideoSource_DCAM.cpp.

References BIAS::CAMERA_SONY_DFW_X700, CamModel_, DcamNodes_, GetFeature(), IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by BIAS::MDcam::GetShutter(), and mainloop().

unsigned int BIAS::VideoSource_DCAM::GetTop ( ) [inline]

Definition at line 244 of file VideoSource_DCAM.hh.

int BIAS::VideoSource_DCAM::GetTransmissionTime ( ) [inline]

Definition at line 251 of file VideoSource_DCAM.hh.

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_DCAM::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 275 of file VideoSource_DCAM.cpp.

References BIAS::VideoSource::Active_, BIASDOUT, BIASERR, BIAS::ImageBase::CopyIn_NoInit(), D_DCAM, DcamCapture_, BIAS::UUID::GenerateUUID(), BIAS::VideoSource::Grabbing_, IEEE1394Card_, IEEE1394Handle_, BIAS::ImageBase::InvalidateUID(), BIAS::ImageBase::IsEmpty(), res, SelectedCam_, BIAS::Camera< StorageType >::SetTime(), BIAS::ImageBase::SetUID(), and UseDMA_.

Referenced by BIAS::MDcam::GrabSingle(), and main().

int VideoSource_DCAM::InitCam ( ) [protected]

Definition at line 984 of file VideoSource_DCAM.cpp.

References ApplyBytesPerPacket(), BIASDOUT, BIASERR, BytesPerPacket_, CalcBytesPerPacket(), BIAS::VideoSource::CompleteInitialized_, DcamCapture_, DcamDMABuffers_, DcamFormat_, DcamFps_, DcamIsoChannel_, DcamMode_, DcamNodes_, BIAS::VideoSource::DefaultDevice_, BIAS::VideoSource::FramesPerSecond_, BIAS::VideoSource::Height_, IEEE1394Card_, IEEE1394Handle_, Left_, MAX_DMABUFFERS, SelectedCam_, StopIso(), Top_, and BIAS::VideoSource::Width_.

Referenced by OpenDevice(), and PreGrab().

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource_DCAM::OnePushAuto ( int feature ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 1161 of file VideoSource_DCAM.cpp.

References BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, CamModel_, and BIAS::VideoSource::SoftwareWhiteBalance().

Referenced by mainloop(), BIAS::MDcam::OnePushAuto(), and SetCamera().

bool VideoSource_DCAM::OnePushRunning ( int feature )

Definition at line 1183 of file VideoSource_DCAM.cpp.

References DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( const char * device ) [virtual, inherited]

a device name like "/dev/video1" can be specified here

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_V4L.

Definition at line 190 of file VideoSource_Base.cpp.

int VideoSource_DCAM::OpenDevice ( int camid ) [virtual]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented from BIAS::VideoSource.

Definition at line 172 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, CamModel_, D_DCAM, DcamInfo_, DcamMode_, DcamNodes_, DirectF7_, BIAS::VideoSource::GetHeight(), GetModelForEuid(), BIAS::VideoSource::GetWidth(), BIAS::VideoSource::ID_, IEEE1394Card_, IEEE1394Handle_, InitCam(), NumCams_, QueryCam(), res, SelectDefault(), SelectedCam_, UseBinning_, and UserSizeToMode().

int VideoSource_DCAM::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented from BIAS::VideoSource.

Definition at line 237 of file VideoSource_DCAM.cpp.

Referenced by main(), and BIAS::MDcam::ScanBus().

int VideoSource_DCAM::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 416 of file VideoSource_DCAM.cpp.

References BIAS::VideoSource::Active_, BIASDOUT, BytesPerCyle_, BytesPerPacket_, D_DCAM, IEEE1394Card_, SelectedCam_, and StopIso().

Referenced by main(), and BIAS::MDcam::PostGrab().

int VideoSource_DCAM::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 374 of file VideoSource_DCAM.cpp.

References BIAS::VideoSource::Active_, BIASDOUT, BIASERR, BytesPerCyle_, BytesPerPacket_, BIAS::VideoSource::CompleteInitialized_, D_DCAM, IEEE1394Card_, InitCam(), SelectedCam_, and StartIso().

Referenced by main(), and BIAS::MDcam::PreGrab().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void VideoSource_DCAM::PrintFormatAndMode_ ( ) [protected]

Definition at line 1671 of file VideoSource_DCAM.cpp.

References DcamFormat_, and DcamMode_.

int VideoSource_DCAM::QueryCam ( ) [protected]

Definition at line 431 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, CamModel_, D_DCAM, D_DCAM_F7, DcamFeatures_, DcamNodes_, BIAS::Debug::GetDebugLevel(), IEEE1394Card_, IEEE1394Handle_, MaxBpP_, MaxHeight_, MaxWidth_, MinBpP_, SelectedCam_, ShowCapabilities(), SupportedFeature_, SupportedFormats_, SupportedFramerates_, SupportedModes_, UnitHeight_, and UnitWidth_.

Referenced by OpenDevice().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int VideoSource_DCAM::SelectDefault ( ) [protected]

Definition at line 594 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV411, BIAS::ImageBase::CM_YUV444, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DCAM, DcamFormat_, DcamMode_, BIAS::VideoSource::FramesPerSecond_, BIAS::VideoSource::Height_, SelectedCam_, SupportedFramerates_, SupportedModes_, and BIAS::VideoSource::Width_.

Referenced by OpenDevice().

void BIAS::VideoSource_DCAM::SetBinning ( bool b ) [inline]

Definition at line 207 of file VideoSource_DCAM.hh.

void BIAS::VideoSource_DCAM::SetBytesPerPacket ( const int b ) [inline]

Definition at line 261 of file VideoSource_DCAM.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

int VideoSource_DCAM::SetCamera ( CameraParameterSet camparam )

set camera to parameters specified in complete set

Definition at line 1549 of file VideoSource_DCAM.cpp.

References CameraParameter_s::AutoGain, CameraParameter_s::AutoGainChanged, AutoMode(), CameraParameter_s::AutoShutter, CameraParameter_s::AutoShutterChanged, CameraParameter_s::AutoWhiteBalance, CameraParameter_s::AutoWhiteBalanceChanged, BIASDOUT, D_DCAM, CameraParameter_s::Gain, CameraParameter_s::GainChanged, CameraParameter_s::GammaMode, CameraParameter_s::GammaModeChanged, OnePushAuto(), CameraParameter_s::OpticalFilter, CameraParameter_s::OpticalFilterChanged, SetFeature(), SetGain(), SetGammaMode(), SetShutter(), CameraParameter_s::Sharpen, CameraParameter_s::SharpenChanged, CameraParameter_s::Shutter, CameraParameter_s::ShutterChanged, CameraParameter_s::WhiteBalance, CameraParameter_s::WhiteBalanceChanged, and CameraParameter_s::WhiteBalanceOnePush.

Referenced by BIAS::MDcam::SetCamera().

virtual void BIAS::VideoSource_DCAM::SetCameraID ( int ) [inline, virtual]

Definition at line 256 of file VideoSource_DCAM.hh.

References BIASERR.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource_DCAM::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual]

normaly, feature is an enum

Reimplemented from BIAS::VideoSource.

Definition at line 1249 of file VideoSource_DCAM.cpp.

References BIASERR, DcamNodes_, BIAS::VideoSource::ID_, IEEE1394Card_, IEEE1394Handle_, SelectedCam_, and SupportedFeature_.

Referenced by BIAS::MDcam::EqualizeFeature(), SetCamera(), BIAS::MDcam::SetFeature(), SetGain(), SetGammaMode(), and SetShutter().

int VideoSource_DCAM::SetFormat7 | ( | int | mode,
 |  | int | bpp,
 |  | int | colorchannels
 | ) |

this a special function to by-pass all automatic initializations and Use only in conjuction with SertSize() and SetLeftTop() !

Definition at line 244 of file VideoSource_DCAM.cpp.

References BytesPerPacket_, BIAS::VideoSource::ColorChannels_, DcamFormat_, DcamMode_, and DirectF7_.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource_DCAM::SetGain ( float g ) [virtual]

Set gain to g with g[dB].

Reimplemented from BIAS::VideoSource.

Definition at line 1414 of file VideoSource_DCAM.cpp.

References BIAS::CAMERA_PTGREY_DRAGONFLY_BW, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_SONY_DFW_X700, CamModel_, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, max, min, SelectedCam_, SetFeature(), and value.

Referenced by SetCamera(), and BIAS::MDcam::SetGain().

int VideoSource_DCAM::SetGammaMode ( unsigned char g )

Definition at line 1499 of file VideoSource_DCAM.cpp.

References SetFeature().

Referenced by SetCamera().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource_DCAM::SetLeftTop | ( | unsigned int | left,
 |  | unsigned int | top
 | ) |

set the topleft corner for partitial scan

Definition at line 1266 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, D_DCAM_F7, DcamMode_, DcamNodes_, BIAS::VideoSource::Height_, IEEE1394Card_, IEEE1394Handle_, Left_, MaxHeight_, MaxWidth_, SelectedCam_, Top_, UserTopLeft_, and BIAS::VideoSource::Width_.

int VideoSource_DCAM::SetShutter ( float exptime ) [virtual]

Set shutter (exposure time) to exptime in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 1292 of file VideoSource_DCAM.cpp.

References BIASERR, BIAS::CAMERA_PTGREY_DRAGONFLY_BW, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES, BIAS::CAMERA_PTGREY_SCORPION_COLOR_1600, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_SONY_DFW_X700, CamModel_, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, SelectedCam_, SetFeature(), and value.

Referenced by main(), SetCamera(), and BIAS::MDcam::SetShutter().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

int VideoSource_DCAM::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual]

range is [-1.0 , 1.0)

Reimplemented from BIAS::VideoSource.

Definition at line 1516 of file VideoSource_DCAM.cpp.

References BIASERR, BIAS::CAMERA_PTGREY_DRAGONFLY_COLOR, BIAS::CAMERA_SONY_DFW_V500, BIAS::CAMERA_SONY_DFW_X700, CamModel_, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by mainloop().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource_DCAM::ShowCapabilities ( ) [virtual]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented from BIAS::VideoSource.

Definition at line 542 of file VideoSource_DCAM.cpp.

References DcamInfo_, SelectedCam_, SupportedFormats_, SupportedFramerates_, and SupportedModes_.

Referenced by QueryCam().

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource_DCAM::StartIso ( ) [protected]

Definition at line 1121 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by PreGrab().

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource_DCAM::StopIso ( ) [protected]

Definition at line 1095 of file VideoSource_DCAM.cpp.

References BIASERR, DcamNodes_, IEEE1394Card_, IEEE1394Handle_, and SelectedCam_.

Referenced by InitCam(), and PostGrab().

int VideoSource_DCAM::UseChannel ( int channel )

Definition at line 268 of file VideoSource_DCAM.cpp.

References IEEE1394Card_.

int VideoSource_DCAM::UserSizeToFormat7_ ( ) [protected]

Definition at line 1685 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::ColorChannels_, D_DCAM_F7, DcamFormat_, DcamMode_, BIAS::VideoSource::Height_, Left_, MaxHeight_, MaxWidth_, Top_, UnitHeight_, UnitWidth_, UseBinning_, UserTopLeft_, and BIAS::VideoSource::Width_.

Referenced by UserSizeToMode().

int VideoSource_DCAM::UserSizeToMode ( ) [protected]

Definition at line 763 of file VideoSource_DCAM.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::CAMERA_PTGREY_DRAGONFLY_HIRES, CamModel_, BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_UYVY422, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, DcamFormat_, DcamMode_, ForceF7_, BIAS::VideoSource::Height_, SelectedCam_, UserSizeToFormat7_(), and BIAS::VideoSource::Width_.

Referenced by OpenDevice().

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), GrabSingle(), PostGrab(), BIAS::VideoSource::PostGrab(), PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

int VideoSource_DCAM::BytesPerCyle_ [static, protected]

Definition at line 292 of file VideoSource_DCAM.hh.

Referenced by PostGrab(), PreGrab(), and VideoSource_DCAM().

int BIAS::VideoSource_DCAM::BytesPerPacket_ [protected]

Definition at line 333 of file VideoSource_DCAM.hh.

Referenced by ApplyBytesPerPacket(), CalcBytesPerPacket(), InitCam(), PostGrab(), PreGrab(), SetFormat7(), and VideoSource_DCAM().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), UserSizeToMode(), and BIAS::VideoSource::VideoSource().

CameraModel BIAS::VideoSource_DCAM::CamModel_ [protected]

Definition at line 341 of file VideoSource_DCAM.hh.

Referenced by GetGain(), GetShutter(), OnePushAuto(), OpenDevice(), QueryCam(), SetGain(), SetShutter(), SetWhiteBalance(), and UserSizeToMode().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by ApplyBytesPerPacket(), CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), SetFormat7(), BIAS::VideoSource_Shm::SetSize(), UserSizeToFormat7_(), UserSizeToMode(), BIAS::VideoSource::VideoSource(), VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), UserSizeToMode(), VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), InitCam(), BIAS::VideoSource_V4L::OpenDevice(), PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

dc1394_cameracapture BIAS::VideoSource_DCAM::DcamCapture_ [protected]

Definition at line 299 of file VideoSource_DCAM.hh.

Referenced by CloseDevice(), GrabSingle(), and InitCam().

int BIAS::VideoSource_DCAM::DcamDMABuffers_ [protected]

Definition at line 327 of file VideoSource_DCAM.hh.

Referenced by InitCam().

dc1394_feature_set BIAS::VideoSource_DCAM::DcamFeatures_ [protected]

Definition at line 301 of file VideoSource_DCAM.hh.

Referenced by QueryCam().

int BIAS::VideoSource_DCAM::DcamFormat_ [protected]

Definition at line 319 of file VideoSource_DCAM.hh.

Referenced by InitCam(), PrintFormatAndMode_(), SelectDefault(), SetFormat7(), UserSizeToFormat7_(), UserSizeToMode(), and VideoSource_DCAM().

int BIAS::VideoSource_DCAM::DcamFps_ [protected]

Definition at line 320 of file VideoSource_DCAM.hh.

Referenced by InitCam(), and VideoSource_DCAM().

dc1394_camerainfo BIAS::VideoSource_DCAM::DcamInfo_ [protected]

Definition at line 300 of file VideoSource_DCAM.hh.

Referenced by OpenDevice(), and ShowCapabilities().

int BIAS::VideoSource_DCAM::DcamIsoChannel_ [protected]

Definition at line 321 of file VideoSource_DCAM.hh.

Referenced by InitCam().

int BIAS::VideoSource_DCAM::DcamMode_ [protected]

Definition at line 318 of file VideoSource_DCAM.hh.

Referenced by ApplyBytesPerPacket(), InitCam(), OpenDevice(), PrintFormatAndMode_(), SelectDefault(), SetFormat7(), SetLeftTop(), UserSizeToFormat7_(), UserSizeToMode(), and VideoSource_DCAM().

nodeid_t* BIAS::VideoSource_DCAM::DcamNodes_ [protected]

Definition at line 303 of file VideoSource_DCAM.hh.

Referenced by ActivateScorpionTimestamp(), ApplyBytesPerPacket(), AutoMode(), CalcBytesPerPacket(), ExternalTrigger(), GetFeature(), GetGain(), GetShutter(), InitCam(), OnePushRunning(), OpenDevice(), QueryCam(), SetFeature(), SetGain(), SetLeftTop(), SetShutter(), SetWhiteBalance(), StartIso(), and StopIso().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource_DCAM::DirectF7_ [protected]

Definition at line 325 of file VideoSource_DCAM.hh.

Referenced by OpenDevice(), SetFormat7(), and VideoSource_DCAM().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

bool BIAS::VideoSource_DCAM::ForceF7_ [protected]

Definition at line 324 of file VideoSource_DCAM.hh.

Referenced by UserSizeToMode(), and VideoSource_DCAM().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by CalcBytesPerPacket(), InitCam(), SelectDefault(), VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by ApplyBytesPerPacket(), CalcBytesPerPacket(), InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), UserSizeToFormat7_(), UserSizeToMode(), BIAS::VideoSource::VideoSource(), VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by ExternalTrigger(), GetFeature(), OpenDevice(), and SetFeature().

int BIAS::VideoSource_DCAM::IEEE1394Card_ [protected]

Definition at line 297 of file VideoSource_DCAM.hh.

Referenced by ActivateScorpionTimestamp(), ApplyBytesPerPacket(), AutoMode(), CalcBytesPerPacket(), CloseDevice(), ExternalTrigger(), GetFeature(), GetGain(), GetShutter(), GrabSingle(), InitCam(), OnePushRunning(), OpenDevice(), PostGrab(), PreGrab(), QueryCam(), SetFeature(), SetGain(), SetLeftTop(), SetShutter(), SetWhiteBalance(), StartIso(), StopIso(), UseChannel(), VideoSource_DCAM(), and ~VideoSource_DCAM().

raw1394handle_t VideoSource_DCAM::IEEE1394Handle_ [static, protected]

use some magic to determine vendor and model

Definition at line 289 of file VideoSource_DCAM.hh.

Referenced by ActivateScorpionTimestamp(), ApplyBytesPerPacket(), AutoMode(), CalcBytesPerPacket(), CloseDevice(), ExternalTrigger(), GetFeature(), GetGain(), GetShutter(), GrabSingle(), InitCam(), OnePushRunning(), OpenDevice(), QueryCam(), SetFeature(), SetGain(), SetLeftTop(), SetShutter(), SetWhiteBalance(), StartIso(), StopIso(), VideoSource_DCAM(), and ~VideoSource_DCAM().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

int VideoSource_DCAM::Instances_ [static, protected]

Definition at line 290 of file VideoSource_DCAM.hh.

Referenced by VideoSource_DCAM(), and ~VideoSource_DCAM().

int VideoSource_DCAM::InstancesTotal_ = 0 [static, protected]

Definition at line 291 of file VideoSource_DCAM.hh.

Referenced by VideoSource_DCAM(), and ~VideoSource_DCAM().

unsigned int BIAS::VideoSource_DCAM::Left_ [protected]

Definition at line 330 of file VideoSource_DCAM.hh.

Referenced by InitCam(), SetLeftTop(), and UserSizeToFormat7_().

LensModel BIAS::VideoSource_DCAM::Lens_ [protected]

Definition at line 342 of file VideoSource_DCAM.hh.

unsigned int BIAS::VideoSource_DCAM::MaxBpP_ [protected]

Definition at line 334 of file VideoSource_DCAM.hh.

Referenced by CalcBytesPerPacket(), and QueryCam().

unsigned int BIAS::VideoSource_DCAM::MaxHeight_ [protected]

Definition at line 330 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), SetLeftTop(), and UserSizeToFormat7_().

unsigned int BIAS::VideoSource_DCAM::MaxWidth_ [protected]

Definition at line 330 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), SetLeftTop(), and UserSizeToFormat7_().

unsigned int BIAS::VideoSource_DCAM::MinBpP_ [protected]

Definition at line 334 of file VideoSource_DCAM.hh.

Referenced by CalcBytesPerPacket(), and QueryCam().

int BIAS::VideoSource_DCAM::NumCams_ [protected]

Definition at line 316 of file VideoSource_DCAM.hh.

Referenced by OpenDevice().

bool BIAS::VideoSource_DCAM::ScorpionTimestampActive_

Definition at line 192 of file VideoSource_DCAM.hh.

int BIAS::VideoSource_DCAM::SelectedCam_ [protected]

Definition at line 317 of file VideoSource_DCAM.hh.

Referenced by ActivateScorpionTimestamp(), ApplyBytesPerPacket(), AutoMode(), CalcBytesPerPacket(), ExternalTrigger(), GetFeature(), GetGain(), GetShutter(), GrabSingle(), InitCam(), OnePushRunning(), OpenDevice(), PostGrab(), PreGrab(), QueryCam(), SelectDefault(), SetFeature(), SetGain(), SetLeftTop(), SetShutter(), SetWhiteBalance(), ShowCapabilities(), StartIso(), StopIso(), UserSizeToMode(), and VideoSource_DCAM().

unsigned char BIAS::VideoSource_DCAM::Shift16_ [protected]

Definition at line 340 of file VideoSource_DCAM.hh.

Referenced by GetModelForEuid(), and VideoSource_DCAM().

bool BIAS::VideoSource_DCAM::SupportedFeature_[NUM_FEATURES] [protected]

Definition at line 312 of file VideoSource_DCAM.hh.

Referenced by GetFeature(), QueryCam(), and SetFeature().

bool BIAS::VideoSource_DCAM::SupportedFormats_[NUM_FORMATS] [protected]

Definition at line 306 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), and ShowCapabilities().

int BIAS::VideoSource_DCAM::SupportedFramerates_[NUM_FORMATS][NUM_FORMAT1_MODES] [protected]

Definition at line 311 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), SelectDefault(), and ShowCapabilities().

bool BIAS::VideoSource_DCAM::SupportedModes_[NUM_FORMATS][NUM_FORMAT1_MODES] [protected]

Definition at line 309 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), SelectDefault(), and ShowCapabilities().

unsigned int BIAS::VideoSource_DCAM::Top_ [protected]

Definition at line 330 of file VideoSource_DCAM.hh.

Referenced by InitCam(), SetLeftTop(), and UserSizeToFormat7_().

int BIAS::VideoSource_DCAM::TransmissionTime_ [protected]

Definition at line 337 of file VideoSource_DCAM.hh.

Referenced by ApplyBytesPerPacket(), and VideoSource_DCAM().

int BIAS::VideoSource_DCAM::Trigger_ [protected]

Definition at line 322 of file VideoSource_DCAM.hh.

Referenced by ExternalTrigger().

unsigned int BIAS::VideoSource_DCAM::UnitHeight_ [protected]

Definition at line 331 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), and UserSizeToFormat7_().

unsigned int BIAS::VideoSource_DCAM::UnitWidth_ [protected]

Definition at line 331 of file VideoSource_DCAM.hh.

Referenced by QueryCam(), and UserSizeToFormat7_().

bool BIAS::VideoSource_DCAM::UseBinning_ [protected]

Definition at line 343 of file VideoSource_DCAM.hh.

Referenced by OpenDevice(), UserSizeToFormat7_(), and VideoSource_DCAM().

bool BIAS::VideoSource_DCAM::UseDMA_ [protected]

Definition at line 326 of file VideoSource_DCAM.hh.

Referenced by CloseDevice(), GrabSingle(), and VideoSource_DCAM().

bool BIAS::VideoSource_DCAM::UserTopLeft_ [protected]

Definition at line 332 of file VideoSource_DCAM.hh.

Referenced by SetLeftTop(), UserSizeToFormat7_(), and VideoSource_DCAM().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by ApplyBytesPerPacket(), CalcBytesPerPacket(), InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), UserSizeToFormat7_(), UserSizeToMode(), BIAS::VideoSource::VideoSource(), VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DCAM.hh
  • VideoSource/VideoSource_DCAM.cpp
  • VideoSource/VideoSource_DCAM_CMU.cpp
Generated on Wed Jun 21 19:12:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_Disk Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_Disk

BIAS::VideoSource_Disk Class Reference

This class simulates a video device by loading images from disk. More...

#include <VideoSource/VideoSource_Disk.hh>

Inheritance diagram for BIAS::VideoSource_Disk:

[legend]
Collaboration diagram for BIAS::VideoSource_Disk:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void | AddFilenames (const std::vector< std::string > &FileNames)
pushback new filenames on internal filename vector
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
unsigned int | GetActiveFrameNumber () const
zero based counting, returns next frame
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
std::string | GetLastFilename () const
std::string | GetNextFilename () const
unsigned int | GetNumFramesRemaining () const
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (BIAS::ImageBase &image)
Disk has also a imagebase grabber for e.g.g float images.
virtual int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice ()
this opens all mip images in the current dir
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void Rewind ()
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
int | SetColorMode (BIAS::ImageBase::EColorModel mode)
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
void | SetFrameCounterAsTimeStamp (const bool b)
virtual int | SetGain (float g)
Set gain to g with g[dB].
void | SetGenerateNewUIDs (bool s)
void | SetKeepFPS (bool s)
void | SetLoopMode (bool l)
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_Disk ()
virtual | ~VideoSource_Disk ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
unsigned int | ActiveFrame_
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
std::vector< std::string > | FileNames_
bool | FrameCounterAsTimeStamp_
float | FramesPerSecond_
bool | GenerateNewUIDs_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
bool | KeepFPS_
bool | Loop_
BIAS::TimeMeasure timer_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

This class simulates a video device by loading images from disk.

Author:
evers

Definition at line 46 of file VideoSource_Disk.hh.

Constructor & Destructor Documentation

VideoSource_Disk::VideoSource_Disk ( )

Definition at line 42 of file VideoSource_Disk.cpp.

References ActiveFrame_, FrameCounterAsTimeStamp_, BIAS::VideoSource::FramesPerSecond_, GenerateNewUIDs_, KeepFPS_, Loop_, and BIAS::Debug::SetDebugLevel().

VideoSource_Disk::~VideoSource_Disk ( ) [virtual]

Definition at line 54 of file VideoSource_Disk.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::VideoSource_Disk::AddFilenames ( const std::vector< std::string > & FileNames ) [inline]

pushback new filenames on internal filename vector

Author:
koeser 12/2005

Definition at line 90 of file VideoSource_Disk.hh.

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_Disk::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 156 of file VideoSource_Disk.cpp.

References BIASERR, BIAS::VideoSource::CompleteInitialized_, FileNames_, BIAS::VideoSource::Grabbing_, and PostGrab().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

unsigned int BIAS::VideoSource_Disk::GetActiveFrameNumber ( ) const [inline]

zero based counting, returns next frame

Definition at line 86 of file VideoSource_Disk.hh.

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

std::string BIAS::VideoSource_Disk::GetLastFilename ( ) const [inline]

Definition at line 79 of file VideoSource_Disk.hh.

std::string BIAS::VideoSource_Disk::GetNextFilename ( ) const [inline]

Definition at line 76 of file VideoSource_Disk.hh.

unsigned int BIAS::VideoSource_Disk::GetNumFramesRemaining ( ) const [inline]

Definition at line 82 of file VideoSource_Disk.hh.

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_Disk::GrabSingle ( BIAS::ImageBase & image ) [virtual]

Disk has also a imagebase grabber for e.g.g float images.

Definition at line 331 of file VideoSource_Disk.cpp.

References BIASDOUT, BIASERR, D_VSO_DISK, and FileNames_.

int VideoSource_Disk::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Reimplemented in BIAS::VideoSource_DiskPMD.

Definition at line 177 of file VideoSource_Disk.cpp.

References ActiveFrame_, BIASDOUT, BIASERR, D_VSO_DISK, and FileNames_.

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const char * device ) [virtual, inherited]

a device name like "/dev/video1" can be specified here

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_V4L.

Definition at line 190 of file VideoSource_Base.cpp.

virtual int BIAS::VideoSource_Disk::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual]

used in child class VideoSource_Disk

Reimplemented from BIAS::VideoSource.

Reimplemented in BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource_Disk::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual]

used in child class VideoSource_Disk

Reimplemented from BIAS::VideoSource.

int VideoSource_Disk::OpenDevice ( ) [virtual]

this opens all mip images in the current dir

Reimplemented from BIAS::VideoSource.

Reimplemented in BIAS::VideoSource_DiskPMD.

Definition at line 74 of file VideoSource_Disk.cpp.

References FindFilesInPath::c_FileList.

int BIAS::VideoSource_Disk::PostGrab ( ) [inline, virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 100 of file VideoSource_Disk.hh.

Referenced by CloseDevice().

int VideoSource_Disk::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 146 of file VideoSource_Disk.cpp.

References BIAS::VideoSource::PreGrab(), BIAS::TimeMeasure::Start(), and timer_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource_Disk::Rewind ( ) [inline]

Definition at line 65 of file VideoSource_Disk.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource_Disk::SetColorMode ( BIAS::ImageBase::EColorModel mode )

Definition at line 170 of file VideoSource_Disk.cpp.

References BIASERR.

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

void BIAS::VideoSource_Disk::SetFrameCounterAsTimeStamp ( const bool b ) [inline]

Definition at line 101 of file VideoSource_Disk.hh.

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

void BIAS::VideoSource_Disk::SetGenerateNewUIDs ( bool s ) [inline]

Reimplemented in BIAS::VideoSource_DiskPMD.

Definition at line 97 of file VideoSource_Disk.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::VideoSource_Disk::SetKeepFPS ( bool s ) [inline]

Definition at line 98 of file VideoSource_Disk.hh.

void BIAS::VideoSource_Disk::SetLoopMode ( bool l ) [inline]

Definition at line 63 of file VideoSource_Disk.hh.

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

unsigned int BIAS::VideoSource_Disk::ActiveFrame_ [protected]

Definition at line 111 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_DiskPMD::GrabSingle(), GrabSingle(), and VideoSource_Disk().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

std::vector<std::string> BIAS::VideoSource_Disk::FileNames_ [protected]

Definition at line 113 of file VideoSource_Disk.hh.

Referenced by CloseDevice(), BIAS::VideoSource_DiskPMD::GrabSingle(), and GrabSingle().

bool BIAS::VideoSource_Disk::FrameCounterAsTimeStamp_ [protected]

Definition at line 116 of file VideoSource_Disk.hh.

Referenced by VideoSource_Disk().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and VideoSource_Disk().

bool BIAS::VideoSource_Disk::GenerateNewUIDs_ [protected]

Definition at line 115 of file VideoSource_Disk.hh.

Referenced by VideoSource_Disk(), and BIAS::VideoSource_DiskPMD::VideoSource_DiskPMD().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

bool BIAS::VideoSource_Disk::KeepFPS_ [protected]

Definition at line 114 of file VideoSource_Disk.hh.

Referenced by VideoSource_Disk().

bool BIAS::VideoSource_Disk::Loop_ [protected]

Definition at line 112 of file VideoSource_Disk.hh.

Referenced by VideoSource_Disk().

BIAS::TimeMeasure BIAS::VideoSource_Disk::timer_ [protected]

Definition at line 107 of file VideoSource_Disk.hh.

Referenced by PreGrab().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_Disk.hh
  • VideoSource/VideoSource_Disk.cpp
Generated on Wed Jun 21 19:12:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_DiskPMD Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_DiskPMD

BIAS::VideoSource_DiskPMD Class Reference

#include <VideoSource/VideoSource_DiskPMD.hh>

Inheritance diagram for BIAS::VideoSource_DiskPMD:

[legend]
Collaboration diagram for BIAS::VideoSource_DiskPMD:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
void | AddFilenames (const std::vector< std::string > &FileNames)
pushback new filenames on internal filename vector
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
unsigned int | GetActiveFrameNumber () const
zero based counting, returns next frame
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
std::string | GetLastFilename () const
std::string | GetNextFilename () const
unsigned int | GetNumFramesRemaining () const
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (BIAS::ImageBase &image)
Disk has also a imagebase grabber for e.g.g float images.
virtual int | GrabSingle (Camera< unsigned char > &image)
Returns the 2D image, and reads depth and modulation coefficients.
int | GrabSingleDepth (Camera< float > &image)
Returns the depth image.
int | GrabSingleModCoeff (Camera< float > &image)
Returns the depth image.
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice ()
this opens all mip images in the current dir
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void Rewind ()
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
int | SetColorMode (BIAS::ImageBase::EColorModel mode)
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
void | SetFrameCounterAsTimeStamp (const bool b)
virtual int | SetGain (float g)
Set gain to g with g[dB].
void | SetGenerateNewUIDs (bool s)
void | SetKeepFPS (bool s)
void | SetLoopMode (bool l)
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_DiskPMD ()
virtual | ~VideoSource_DiskPMD ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
unsigned int | ActiveFrame_
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
char * | DefaultDevice_
BIAS::Camera< float > | DepthImg_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
std::vector< std::string > | FileNames_
bool | FrameCounterAsTimeStamp_
float | FramesPerSecond_
bool | GenerateNewUIDs_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
bool | KeepFPS_
bool | Loop_
BIAS::Camera< float > | ModCoeffImg_
BIAS::TimeMeasure timer_
VideoSource_Disk * vsd_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 41 of file VideoSource_DiskPMD.hh.

Constructor & Destructor Documentation

BIAS::VideoSource_DiskPMD::VideoSource_DiskPMD ( )

Definition at line 44 of file VideoSource_DiskPMD.cpp.

References BIAS::VideoSource_Disk::GenerateNewUIDs_.

BIAS::VideoSource_DiskPMD::~VideoSource_DiskPMD ( ) [virtual]

Definition at line 50 of file VideoSource_DiskPMD.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void BIAS::VideoSource_Disk::AddFilenames ( const std::vector< std::string > & FileNames ) [inline, inherited]

pushback new filenames on internal filename vector

Author:
koeser 12/2005

Definition at line 90 of file VideoSource_Disk.hh.

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_Disk::CloseDevice ( ) [virtual, inherited]

Reimplemented from BIAS::VideoSource.

Definition at line 156 of file VideoSource_Disk.cpp.

References BIASERR, BIAS::VideoSource::CompleteInitialized_, BIAS::VideoSource_Disk::FileNames_, BIAS::VideoSource::Grabbing_, and BIAS::VideoSource_Disk::PostGrab().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

unsigned int BIAS::VideoSource_Disk::GetActiveFrameNumber ( ) const [inline, inherited]

zero based counting, returns next frame

Definition at line 86 of file VideoSource_Disk.hh.

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

std::string BIAS::VideoSource_Disk::GetLastFilename ( ) const [inline, inherited]

Definition at line 79 of file VideoSource_Disk.hh.

std::string BIAS::VideoSource_Disk::GetNextFilename ( ) const [inline, inherited]

Definition at line 76 of file VideoSource_Disk.hh.

unsigned int BIAS::VideoSource_Disk::GetNumFramesRemaining ( ) const [inline, inherited]

Definition at line 82 of file VideoSource_Disk.hh.

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_Disk::GrabSingle ( BIAS::ImageBase & image ) [virtual, inherited]

Disk has also a imagebase grabber for e.g.g float images.

Definition at line 331 of file VideoSource_Disk.cpp.

References BIASDOUT, BIASERR, D_VSO_DISK, and BIAS::VideoSource_Disk::FileNames_.

int VideoSource_DiskPMD::GrabSingle ( Camera< unsigned char > & image ) [virtual]

Returns the 2D image, and reads depth and modulation coefficients.

Reimplemented from BIAS::VideoSource_Disk.

Definition at line 100 of file VideoSource_DiskPMD.cpp.

References BIAS::VideoSource_Disk::ActiveFrame_, BIASDOUT, BIASERR, D_VSO_DISK, and BIAS::VideoSource_Disk::FileNames_.

int BIAS::VideoSource_DiskPMD::GrabSingleDepth ( Camera< float > & image ) [inline]

Returns the depth image.

Must be called after GrabSingle()

Definition at line 56 of file VideoSource_DiskPMD.hh.

int BIAS::VideoSource_DiskPMD::GrabSingleModCoeff ( Camera< float > & image ) [inline]

Returns the depth image.

Must be called after GrabSingle()

Definition at line 66 of file VideoSource_DiskPMD.hh.

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const char * device ) [virtual, inherited]

a device name like "/dev/video1" can be specified here

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_V4L.

Definition at line 190 of file VideoSource_Base.cpp.

virtual int BIAS::VideoSource_Disk::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented from BIAS::VideoSource.

int BIAS::VideoSource_DiskPMD::OpenDevice ( ) [virtual]

this opens all mip images in the current dir

Reimplemented from BIAS::VideoSource_Disk.

Definition at line 55 of file VideoSource_DiskPMD.cpp.

References BIASABORT, and BIASERR.

virtual int BIAS::VideoSource_DiskPMD::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual]

used in child class VideoSource_Disk

Reimplemented from BIAS::VideoSource_Disk.

int BIAS::VideoSource_Disk::PostGrab ( ) [inline, virtual, inherited]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 100 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::CloseDevice().

int VideoSource_Disk::PreGrab ( ) [virtual, inherited]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 146 of file VideoSource_Disk.cpp.

References BIAS::VideoSource::PreGrab(), BIAS::TimeMeasure::Start(), and BIAS::VideoSource_Disk::timer_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource_Disk::Rewind ( ) [inline, inherited]

Definition at line 65 of file VideoSource_Disk.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource_Disk::SetColorMode ( BIAS::ImageBase::EColorModel mode ) [inherited]

Definition at line 170 of file VideoSource_Disk.cpp.

References BIASERR.

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

void BIAS::VideoSource_Disk::SetFrameCounterAsTimeStamp ( const bool b ) [inline, inherited]

Definition at line 101 of file VideoSource_Disk.hh.

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

void BIAS::VideoSource_DiskPMD::SetGenerateNewUIDs ( bool s ) [inline]

Reimplemented from BIAS::VideoSource_Disk.

Definition at line 75 of file VideoSource_DiskPMD.hh.

References BIASABORT, and BIASERR.

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

void BIAS::VideoSource_Disk::SetKeepFPS ( bool s ) [inline, inherited]

Definition at line 98 of file VideoSource_Disk.hh.

void BIAS::VideoSource_Disk::SetLoopMode ( bool l ) [inline, inherited]

Definition at line 63 of file VideoSource_Disk.hh.

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

unsigned int BIAS::VideoSource_Disk::ActiveFrame_ [protected, inherited]

Definition at line 111 of file VideoSource_Disk.hh.

Referenced by GrabSingle(), BIAS::VideoSource_Disk::GrabSingle(), and BIAS::VideoSource_Disk::VideoSource_Disk().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::Camera<float> BIAS::VideoSource_DiskPMD::DepthImg_ [protected]

Definition at line 84 of file VideoSource_DiskPMD.hh.

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

std::vector<std::string> BIAS::VideoSource_Disk::FileNames_ [protected, inherited]

Definition at line 113 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::CloseDevice(), GrabSingle(), and BIAS::VideoSource_Disk::GrabSingle().

bool BIAS::VideoSource_Disk::FrameCounterAsTimeStamp_ [protected, inherited]

Definition at line 116 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::VideoSource_Disk().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

bool BIAS::VideoSource_Disk::GenerateNewUIDs_ [protected, inherited]

Definition at line 115 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::VideoSource_Disk(), and VideoSource_DiskPMD().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

bool BIAS::VideoSource_Disk::KeepFPS_ [protected, inherited]

Definition at line 114 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::VideoSource_Disk().

bool BIAS::VideoSource_Disk::Loop_ [protected, inherited]

Definition at line 112 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::VideoSource_Disk().

BIAS::Camera<float> BIAS::VideoSource_DiskPMD::ModCoeffImg_ [protected]

Definition at line 84 of file VideoSource_DiskPMD.hh.

BIAS::TimeMeasure BIAS::VideoSource_Disk::timer_ [protected, inherited]

Definition at line 107 of file VideoSource_Disk.hh.

Referenced by BIAS::VideoSource_Disk::PreGrab().

VideoSource_Disk* BIAS::VideoSource_DiskPMD::vsd_ [protected]

Definition at line 81 of file VideoSource_DiskPMD.hh.

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DiskPMD.hh
  • VideoSource/VideoSource_DiskPMD.cpp
Generated on Wed Jun 21 19:12:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_DSHOW Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_DSHOW

BIAS::VideoSource_DSHOW Class Reference

This class extends VideoSource for the use of DirectShow devices. More...

#include <VideoSource/VideoSource_DSHOW.hh>

Inheritance diagram for BIAS::VideoSource_DSHOW:

[legend]
Collaboration diagram for BIAS::VideoSource_DSHOW:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
bool | DisplayCameraProperties ()
bool | DisplayFilterProperties (CComPtr< IBaseFilter > pFilter)
void DisplaySourcePinProperties ()
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
int | OpenDevice (unsigned int width, unsigned int height, unsigned int channels, const char *device, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_RGB)
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetCaptureDeviceName (std::string sName)
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
void | SetSizeAndColorModel (int width, int height, int bytesperpixel=1, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_invalid)
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_DSHOW (int width, int height, int depth, bool bShowDialogs=false)
VideoSource_DSHOW (bool bShowDialogs=false)
~VideoSource_DSHOW ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

void | DeleteMediaType_ (AM_MEDIA_TYPE *pmt)
void DetermineBIASColorModel_ ()
void DetermineColorModel_ ()
bool | DisplayPinProperties_ (CComPtr< IPin > pSrcPin)
HRESULT | EnumFilters_ (IFilterGraph *pGraph)
HRESULT | FindCaptureDevice_ (IBaseFilter **ppSrcFilter)
HRESULT | GetInterfaces_ (void)
HRESULT | InitVideoCapture_ ()
HRESULT | SaveGraphFile_ (IGraphBuilder *pGraph, WCHAR *wszPath)
int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
BIAS::ImageBase::EColorModel BIASColorModel_
bool | bShowDialogs_
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
BIAS::Camera< unsigned char > | camera_
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
int | dDepth_
long | dDsBufferSize_
char * | DefaultDevice_
int | DeviceChannel_
int | dHeight_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
int | dWidth_
MySampleGrabberCB * FGCB
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
GUID | MediaSubTypeColorModel_
CComPtr< ICaptureGraphBuilder2 > | pCaptureGraphBuilder2_
long * | pDsBuffer_
CComPtr< ISampleGrabber > | pGrabber_
CComPtr< IGraphBuilder > | pGraphBuilder_
unsigned char * | pImageBuffer_
CComPtr< IPin > | pInPin_
CComPtr< IMediaControl > | pMediaControl_
CComPtr< IMediaEventEx > | pMediaEvent_
CComPtr< IBaseFilter > | pNullRenderer_
CComPtr< IPin > | pOutPin_
CComPtr< IPin > | pSampleOutPin_
CComPtr< IBaseFilter > | pSrcFilter_
std::string | sCaptureDeviceName_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

This class extends VideoSource for the use of DirectShow devices.

Author:
ischiller

Definition at line 60 of file VideoSource_DSHOW.hh.

Constructor & Destructor Documentation

VideoSource_DSHOW::VideoSource_DSHOW ( bool bShowDialogs = false )

Definition at line 13 of file VideoSource_DSHOW.cpp.

References BIASColorModel_, bShowDialogs_, BIAS::ImageBase::CM_BGR, dDepth_, dDsBufferSize_, dHeight_, dWidth_, FGCB, MediaSubTypeColorModel_, pCaptureGraphBuilder2_, pDsBuffer_, pGrabber_, pGraphBuilder_, pImageBuffer_, pMediaControl_, pMediaEvent_, pNullRenderer_, sCaptureDeviceName_, and SetSizeAndColorModel().

VideoSource_DSHOW::VideoSource_DSHOW | ( | int | width,
 |  | int | height,
 |  | int | depth,
 |  | bool | bShowDialogs = false
 | ) |

Definition at line 35 of file VideoSource_DSHOW.cpp.

References BIASColorModel_, bShowDialogs_, BIAS::ImageBase::CM_BGR, dDepth_, dDsBufferSize_, dHeight_, dWidth_, FGCB, MediaSubTypeColorModel_, pCaptureGraphBuilder2_, pDsBuffer_, pGrabber_, pGraphBuilder_, pImageBuffer_, pMediaControl_, pMediaEvent_, pNullRenderer_, sCaptureDeviceName_, and SetSizeAndColorModel().

VideoSource_DSHOW::~VideoSource_DSHOW ( )

Definition at line 58 of file VideoSource_DSHOW.cpp.

References FGCB, pDsBuffer_, and pImageBuffer_.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_DSHOW::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 96 of file VideoSource_DSHOW.cpp.

References pCaptureGraphBuilder2_, pGrabber_, pGraphBuilder_, pMediaControl_, pMediaEvent_, pNullRenderer_, and pSrcFilter_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

void VideoSource_DSHOW::DeleteMediaType_ ( AM_MEDIA_TYPE * pmt ) [protected]

Definition at line 117 of file VideoSource_DSHOW.cpp.

void VideoSource_DSHOW::DetermineBIASColorModel_ ( ) [protected]

Definition at line 281 of file VideoSource_DSHOW.cpp.

References BIASColorModel_, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV411, BIAS::ImageBase::CM_YUV420P, and MediaSubTypeColorModel_.

void VideoSource_DSHOW::DetermineColorModel_ ( ) [protected]

Definition at line 262 of file VideoSource_DSHOW.cpp.

References BIASColorModel_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, and MediaSubTypeColorModel_.

bool VideoSource_DSHOW::DisplayCameraProperties ( )

Definition at line 226 of file VideoSource_DSHOW.cpp.

References pSrcFilter_.

bool VideoSource_DSHOW::DisplayFilterProperties ( CComPtr< IBaseFilter > pFilter )

Definition at line 183 of file VideoSource_DSHOW.cpp.

Referenced by EnumFilters_().

bool VideoSource_DSHOW::DisplayPinProperties_ ( CComPtr< IPin > pSrcPin ) [protected]

Definition at line 151 of file VideoSource_DSHOW.cpp.

Referenced by DisplaySourcePinProperties(), and InitVideoCapture_().

void VideoSource_DSHOW::DisplaySourcePinProperties ( )

Definition at line 217 of file VideoSource_DSHOW.cpp.

References DisplayPinProperties_(), and pOutPin_.

HRESULT VideoSource_DSHOW::EnumFilters_ ( IFilterGraph * pGraph ) [protected]

Definition at line 641 of file VideoSource_DSHOW.cpp.

References bShowDialogs_, and DisplayFilterProperties().

HRESULT VideoSource_DSHOW::FindCaptureDevice_ ( IBaseFilter ** ppSrcFilter ) [protected]

Definition at line 567 of file VideoSource_DSHOW.cpp.

References BIASERR, and sCaptureDeviceName_.

Referenced by InitVideoCapture_().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

HRESULT VideoSource_DSHOW::GetInterfaces_ ( void ) [protected]

Definition at line 518 of file VideoSource_DSHOW.cpp.

References BIASERR, pCaptureGraphBuilder2_, pGrabber_, pGraphBuilder_, pMediaControl_, pMediaEvent_, and pNullRenderer_.

Referenced by InitVideoCapture_().

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_DSHOW::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 110 of file VideoSource_DSHOW.cpp.

References BIAS::MySampleGrabberCB::camera_, BIAS::ImageBase::CopyIn_NoInit(), FGCB, and BIAS::Image< StorageType >::GetImageData().

int VideoSource_DSHOW::InitImage ( BIAS::ImageBase & Image )

Call this only after opening the device successfully.

Reimplemented from BIAS::VideoSource.

Definition at line 68 of file VideoSource_DSHOW.cpp.

References BIASColorModel_, BIASERR, BIAS::VideoSource::GetColorChannels(), BIAS::VideoSource::GetHeight(), and BIAS::VideoSource::GetWidth().

HRESULT VideoSource_DSHOW::InitVideoCapture_ ( ) [protected]

Definition at line 306 of file VideoSource_DSHOW.cpp.

References BIASERR, bShowDialogs_, DisplayPinProperties_(), exception, FindCaptureDevice_(), GetInterfaces_(), pGraphBuilder_, pOutPin_, and pSrcFilter_.

Referenced by OpenDevice().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( ) [virtual, inherited]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 178 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoServer::Init(), main(), BIAS::VideoSource_Stereo::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), and BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource_DSHOW::OpenDevice ( const char * device ) [virtual]

a device name like "/dev/video1" can be specified here

Reimplemented from BIAS::VideoSource.

Definition at line 79 of file VideoSource_DSHOW.cpp.

References InitVideoCapture_(), and sCaptureDeviceName_.

int VideoSource_DSHOW::OpenDevice | ( | unsigned int | width,
 |  | unsigned int | height,
 |  | unsigned int | channels,
 |  | const char * | device,
 |  | BIAS::ImageBase::EColorModel | model = BIAS::ImageBase::CM_RGB
 | ) |

Definition at line 86 of file VideoSource_DSHOW.cpp.

References InitVideoCapture_(), sCaptureDeviceName_, BIAS::VideoSource::SetColorModel(), and BIAS::VideoSource::SetSize().

int VideoSource_DSHOW::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 146 of file VideoSource_DSHOW.cpp.

int VideoSource_DSHOW::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 141 of file VideoSource_DSHOW.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

HRESULT VideoSource_DSHOW::SaveGraphFile_ | ( | IGraphBuilder * | pGraph,
 |  | WCHAR * | wszPath
 | ) | [protected]

Definition at line 682 of file VideoSource_DSHOW.cpp.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource_DSHOW::SetCaptureDeviceName ( std::string sName ) [inline]

Definition at line 81 of file VideoSource_DSHOW.hh.

References sCaptureDeviceName_.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), OpenDevice(), SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::VideoSource_DSHOW::SetSizeAndColorModel | ( | int | width,
 |  | int | height,
 |  | int | bytesperpixel = 1,
 |  | BIAS::ImageBase::EColorModel | model = BIAS::ImageBase::CM_invalid
 | ) | [inline]

Definition at line 85 of file VideoSource_DSHOW.hh.

References BIASColorModel_, BIAS::VideoSource::SetColorModel(), and BIAS::VideoSource::SetSize().

Referenced by VideoSource_DSHOW().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

BIAS::ImageBase::EColorModel BIAS::VideoSource_DSHOW::BIASColorModel_ [protected]

Definition at line 126 of file VideoSource_DSHOW.hh.

Referenced by DetermineBIASColorModel_(), DetermineColorModel_(), InitImage(), SetSizeAndColorModel(), and VideoSource_DSHOW().

bool BIAS::VideoSource_DSHOW::bShowDialogs_ [protected]

Definition at line 106 of file VideoSource_DSHOW.hh.

Referenced by EnumFilters_(), InitVideoCapture_(), and VideoSource_DSHOW().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

BIAS::Camera<unsigned char> BIAS::VideoSource_DSHOW::camera_ [protected]

Definition at line 108 of file VideoSource_DSHOW.hh.

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource_DSHOW::dDepth_ [protected]

Definition at line 105 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

long BIAS::VideoSource_DSHOW::dDsBufferSize_ [protected]

Definition at line 100 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource_DSHOW::dHeight_ [protected]

Definition at line 104 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource_DSHOW::dWidth_ [protected]

Definition at line 103 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW().

MySampleGrabberCB* BIAS::VideoSource_DSHOW::FGCB [protected]

Definition at line 99 of file VideoSource_DSHOW.hh.

Referenced by GrabSingle(), VideoSource_DSHOW(), and ~VideoSource_DSHOW().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

GUID BIAS::VideoSource_DSHOW::MediaSubTypeColorModel_ [protected]

Definition at line 127 of file VideoSource_DSHOW.hh.

Referenced by DetermineBIASColorModel_(), DetermineColorModel_(), and VideoSource_DSHOW().

CComPtr< ICaptureGraphBuilder2 > BIAS::VideoSource_DSHOW::pCaptureGraphBuilder2_ [protected]

Definition at line 138 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), and VideoSource_DSHOW().

long* BIAS::VideoSource_DSHOW::pDsBuffer_ [protected]

Definition at line 101 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW(), and ~VideoSource_DSHOW().

CComPtr< ISampleGrabber > BIAS::VideoSource_DSHOW::pGrabber_ [protected]

Definition at line 135 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), and VideoSource_DSHOW().

CComPtr< IGraphBuilder > BIAS::VideoSource_DSHOW::pGraphBuilder_ [protected]

Definition at line 137 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), InitVideoCapture_(), and VideoSource_DSHOW().

unsigned char* BIAS::VideoSource_DSHOW::pImageBuffer_ [protected]

Definition at line 102 of file VideoSource_DSHOW.hh.

Referenced by VideoSource_DSHOW(), and ~VideoSource_DSHOW().

CComPtr< IPin > BIAS::VideoSource_DSHOW::pInPin_ [protected]

Definition at line 134 of file VideoSource_DSHOW.hh.

CComPtr< IMediaControl > BIAS::VideoSource_DSHOW::pMediaControl_ [protected]

Definition at line 129 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), and VideoSource_DSHOW().

CComPtr< IMediaEventEx > BIAS::VideoSource_DSHOW::pMediaEvent_ [protected]

Definition at line 130 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), and VideoSource_DSHOW().

CComPtr< IBaseFilter > BIAS::VideoSource_DSHOW::pNullRenderer_ [protected]

Definition at line 136 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), GetInterfaces_(), and VideoSource_DSHOW().

CComPtr< IPin > BIAS::VideoSource_DSHOW::pOutPin_ [protected]

Definition at line 132 of file VideoSource_DSHOW.hh.

Referenced by DisplaySourcePinProperties(), and InitVideoCapture_().

CComPtr< IPin > BIAS::VideoSource_DSHOW::pSampleOutPin_ [protected]

Definition at line 133 of file VideoSource_DSHOW.hh.

CComPtr< IBaseFilter > BIAS::VideoSource_DSHOW::pSrcFilter_ [protected]

Definition at line 139 of file VideoSource_DSHOW.hh.

Referenced by CloseDevice(), DisplayCameraProperties(), and InitVideoCapture_().

std::string BIAS::VideoSource_DSHOW::sCaptureDeviceName_ [protected]

Definition at line 110 of file VideoSource_DSHOW.hh.

Referenced by FindCaptureDevice_(), OpenDevice(), SetCaptureDeviceName(), and VideoSource_DSHOW().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DSHOW.hh
  • VideoSource/VideoSource_DSHOW.cpp
Generated on Wed Jun 21 19:12:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MIP::VideoSource_DV Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
MIP::VideoSource_DV

MIP::VideoSource_DV Class Reference

This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...

#include <VideoSource/VideoSource_DV.hh>

List of all members.

Public Member Functions

int | CloseDevice ()
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | OpenDevice (const char *device)
int | OpenDevice ()
int | PostGrab ()
int | PreGrab ()
int | UseChannel (int channel)
VideoSource_DV ()
VideoSource_DV (int Card)
~VideoSource_DV ()

Protected Member Functions

void | VideoSource_DV_Internal_Init_ (int card)

Protected Attributes

int | Channel_
bool | DroppedFrame_
bool | FrameFinished_
bool | FrameStarted_
unsigned char * | GrabBuffer_
int | IEEE1394Card_
int | MaxTrials_

Static Protected Attributes

static raw1394handle_t | IEEE1394Handle_ [MAX_1394_CARDS]
static int | Instances_ [MAX_1394_CARDS]
static int | InstancesTotal_ = 0

Friends

int | raw_dv_handler (raw1394handle_t handle, int channel, size_t length, quadlet_t *data)

Detailed Description

This class extends VideoSource for the use of IEEE1394-connected DV-camcorders.

Author:
evers
It uses the old raw1394 interface to transfer packets without DMA.

Definition at line 39 of file VideoSource_DV.hh.

Constructor & Destructor Documentation

VideoSource_DV::VideoSource_DV ( int Card )

Definition at line 16 of file VideoSource_DV.cpp.

References VideoSource_DV_Internal_Init_().

VideoSource_DV::VideoSource_DV ( )

Definition at line 22 of file VideoSource_DV.cpp.

References VideoSource_DV_Internal_Init_().

VideoSource_DV::~VideoSource_DV ( )

Definition at line 82 of file VideoSource_DV.cpp.

References BIASDOUT, Channel_, D_DV, IEEE1394Card_, IEEE1394Handle_, Instances_, and InstancesTotal_.

Member Function Documentation

int VideoSource_DV::CloseDevice ( )

Definition at line 113 of file VideoSource_DV.cpp.

int VideoSource_DV::GrabSingle ( BIAS::Camera< unsigned char > & image )

Definition at line 127 of file VideoSource_DV.cpp.

References done, DroppedFrame_, FrameFinished_, FrameStarted_, BIAS::Image< StorageType >::GetImageData(), GrabBuffer_, IEEE1394Card_, IEEE1394Handle_, BIAS::ImageBase::InvalidateUID(), MaxTrials_, and BIAS::Camera< StorageType >::SetTime().

int VideoSource_DV::OpenDevice ( const char * device )

Definition at line 105 of file VideoSource_DV.cpp.

int VideoSource_DV::OpenDevice ( )

Definition at line 98 of file VideoSource_DV.cpp.

int VideoSource_DV::PostGrab ( )

Definition at line 182 of file VideoSource_DV.cpp.

References BIASDOUT, Channel_, D_DV, IEEE1394Card_, and IEEE1394Handle_.

int VideoSource_DV::PreGrab ( )

Definition at line 163 of file VideoSource_DV.cpp.

References BIASDOUT, BIASERR, Channel_, D_DV, IEEE1394Card_, IEEE1394Handle_, and raw_dv_handler.

int VideoSource_DV::UseChannel ( int channel )

Definition at line 120 of file VideoSource_DV.cpp.

References Channel_.

void VideoSource_DV::VideoSource_DV_Internal_Init_ ( int card ) [protected]

Definition at line 29 of file VideoSource_DV.cpp.

References BIASDOUT, BIASERR, Channel_, D_DV, IEEE1394Card_, IEEE1394Handle_, Instances_, InstancesTotal_, MAX_1394_CARDS, MAX_1394_CHANNELS, MaxTrials_, MIP_DV_HEIGHT, and MIP_DV_WIDTH.

Referenced by VideoSource_DV().

Friends And Related Function Documentation

int raw_dv_handler | ( | raw1394handle_t | handle,
 |  | int | channel,
 |  | size_t | length,
 |  | quadlet_t * | data
 | ) | [friend]

Definition at line 193 of file VideoSource_DV.cpp.

Referenced by PreGrab().

Member Data Documentation

int MIP::VideoSource_DV::Channel_ [protected]

Definition at line 71 of file VideoSource_DV.hh.

Referenced by PostGrab(), PreGrab(), UseChannel(), VideoSource_DV_Internal_Init_(), and ~VideoSource_DV().

bool MIP::VideoSource_DV::DroppedFrame_ [protected]

Definition at line 75 of file VideoSource_DV.hh.

Referenced by GrabSingle(), and MIP::raw_dv_handler().

bool MIP::VideoSource_DV::FrameFinished_ [protected]

Definition at line 73 of file VideoSource_DV.hh.

Referenced by GrabSingle(), and MIP::raw_dv_handler().

bool MIP::VideoSource_DV::FrameStarted_ [protected]

Definition at line 74 of file VideoSource_DV.hh.

Referenced by GrabSingle(), and MIP::raw_dv_handler().

unsigned char* MIP::VideoSource_DV::GrabBuffer_ [protected]

Definition at line 78 of file VideoSource_DV.hh.

Referenced by GrabSingle().

int MIP::VideoSource_DV::IEEE1394Card_ [protected]

Definition at line 70 of file VideoSource_DV.hh.

Referenced by GrabSingle(), PostGrab(), PreGrab(), VideoSource_DV_Internal_Init_(), and ~VideoSource_DV().

raw1394handle_t VideoSource_DV::IEEE1394Handle_ [static, protected]

Definition at line 64 of file VideoSource_DV.hh.

Referenced by GrabSingle(), PostGrab(), PreGrab(), VideoSource_DV_Internal_Init_(), and ~VideoSource_DV().

int VideoSource_DV::Instances_ [static, protected]

Definition at line 65 of file VideoSource_DV.hh.

Referenced by VideoSource_DV_Internal_Init_(), and ~VideoSource_DV().

int VideoSource_DV::InstancesTotal_ = 0 [static, protected]

Definition at line 66 of file VideoSource_DV.hh.

Referenced by VideoSource_DV_Internal_Init_(), and ~VideoSource_DV().

int MIP::VideoSource_DV::MaxTrials_ [protected]

Definition at line 72 of file VideoSource_DV.hh.

Referenced by GrabSingle(), and VideoSource_DV_Internal_Init_().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DV.hh
  • VideoSource/VideoSource_DV.cpp
Generated on Wed Jun 21 19:13:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MIP::VideoSource_DV2 Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
MIP::VideoSource_DV2

MIP::VideoSource_DV2 Class Reference

This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...

#include <VideoSource/VideoSource_DV2.hh>

List of all members.

Public Member Functions

int | CloseDevice ()
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | OpenDevice (const std::string &device)
int | OpenDevice ()
int | PostGrab ()
int | PreGrab ()
int | UseChannel (int channel)
VideoSource_DV2 ()
~VideoSource_DV2 ()

Protected Attributes

unsigned char * | Buffer_
unsigned int | BufferSize_
int | DV1394FD_
enum pal_or_ntsc | Format_
unsigned int | FrameSize_
dv1394_init | InitData_
dv1394_status | Status_

Detailed Description

This class extends VideoSource for the use of IEEE1394-connected DV-camcorders.

Author:
evers
The low-level driver in DV2 is dv1394.o using DMA transfers. Create device: /dev/dv1394 171 32+i

Definition at line 23 of file VideoSource_DV2.hh.

Constructor & Destructor Documentation

VideoSource_DV2::VideoSource_DV2 ( )

Definition at line 12 of file VideoSource_DV2.cpp.

References Buffer_, D_DV2, DV1394FD_, Format_, FrameSize_, MIP_DV_HEIGHT, and MIP_DV_WIDTH.

VideoSource_DV2::~VideoSource_DV2 ( )

Definition at line 31 of file VideoSource_DV2.cpp.

Member Function Documentation

int VideoSource_DV2::CloseDevice ( )

Definition at line 92 of file VideoSource_DV2.cpp.

References Buffer_, BufferSize_, and DV1394FD_.

int VideoSource_DV2::GrabSingle ( BIAS::Camera< unsigned char > & image )

Definition at line 111 of file VideoSource_DV2.cpp.

References BIASDOUT_CLEAN, D_DV2, DV1394FD_, FrameSize_, BIAS::Image< StorageType >::GetImageData(), InitData_, BIAS::ImageBase::InvalidateUID(), BIAS::Camera< StorageType >::SetTime(), and Status_.

int MIP::VideoSource_DV2::OpenDevice ( const std::string & device )

int VideoSource_DV2::OpenDevice ( )

Definition at line 39 of file VideoSource_DV2.cpp.

int VideoSource_DV2::PostGrab ( )

Definition at line 153 of file VideoSource_DV2.cpp.

References DV1394FD_.

int VideoSource_DV2::PreGrab ( )

Definition at line 141 of file VideoSource_DV2.cpp.

References DV1394FD_.

int VideoSource_DV2::UseChannel ( int channel )

Definition at line 104 of file VideoSource_DV2.cpp.

Member Data Documentation

unsigned char* MIP::VideoSource_DV2::Buffer_ [protected]

Definition at line 54 of file VideoSource_DV2.hh.

Referenced by CloseDevice(), and VideoSource_DV2().

unsigned int MIP::VideoSource_DV2::BufferSize_ [protected]

Definition at line 55 of file VideoSource_DV2.hh.

Referenced by CloseDevice().

int MIP::VideoSource_DV2::DV1394FD_ [protected]

Definition at line 46 of file VideoSource_DV2.hh.

Referenced by CloseDevice(), GrabSingle(), PostGrab(), PreGrab(), and VideoSource_DV2().

enum pal_or_ntsc MIP::VideoSource_DV2::Format_ [protected]

Definition at line 51 of file VideoSource_DV2.hh.

Referenced by VideoSource_DV2().

unsigned int MIP::VideoSource_DV2::FrameSize_ [protected]

Definition at line 52 of file VideoSource_DV2.hh.

Referenced by GrabSingle(), and VideoSource_DV2().

struct dv1394_init MIP::VideoSource_DV2::InitData_ [protected]

Definition at line 48 of file VideoSource_DV2.hh.

Referenced by GrabSingle().

struct dv1394_status MIP::VideoSource_DV2::Status_ [protected]

Definition at line 49 of file VideoSource_DV2.hh.

Referenced by GrabSingle().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_DV2.hh
  • VideoSource/VideoSource_DV2.cpp
Generated on Wed Jun 21 19:13:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_Net Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_Net

BIAS::VideoSource_Net Class Reference

This class implements a video streaming client using TCP. More...

#include <VideoSource/VideoSource_Net.hh>

Inheritance diagram for BIAS::VideoSource_Net:

[legend]
Collaboration diagram for BIAS::VideoSource_Net:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (BIAS::ImageBase &image)
virtual int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
virtual int | OpenDevice (int port=D_CS_DEFAULT_PORT)
for UDP commm, listen on this port for data
virtual int | OpenDevice (const std::string &serverName, int port=D_CS_DEFAULT_PORT)
use given port and ip address to connect to videoserver
virtual int | OpenDevice (const char *serverName)
use given port and ip address to connect to videoserver
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_Net (bool threaded=true)
Standard Constructor use threaded param for dis-/enabling threaded receiving! If threaded receiving is disabled, keepAll-param will be enabled for client_! (you'll get every image that was sent).
virtual | ~VideoSource_Net ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
CScommClient client_
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
int | count_
JpegHandler Decompressor_
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
BIAS::Image< unsigned char > | jpegImg_
std::stringstream * | pImgBuffer_
int | port_
bool | UseTCP_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

This class implements a video streaming client using TCP.

Use VideoServer to feed this beast.

Author:
grest, Nov. 2005

Definition at line 26 of file VideoSource_Net.hh.

Constructor & Destructor Documentation

VideoSource_Net::VideoSource_Net ( bool threaded = true )

Standard Constructor use threaded param for dis-/enabling threaded receiving! If threaded receiving is disabled, keepAll-param will be enabled for client_! (you'll get every image that was sent).

Definition at line 12 of file VideoSource_Net.cpp.

References client_, BIAS::ImageBase::CM_RGB, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, count_, Decompressor_, BIAS::JpegHandler::Init(), pImgBuffer_, BIAS::CScommBase::SetKeepAll(), and UseTCP_.

virtual BIAS::VideoSource_Net::~VideoSource_Net ( ) [inline, virtual]

Definition at line 37 of file VideoSource_Net.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_Net::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 142 of file VideoSource_Net.cpp.

References Decompressor_, and BIAS::JpegHandler::Release().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_Net::GrabSingle ( BIAS::ImageBase & image ) [virtual]

Definition at line 80 of file VideoSource_Net.cpp.

References BIASERR, client_, BIAS::ImageBase::CopyIn_NoInit(), count_, BIAS::JpegHandler::Decompress(), Decompressor_, BIAS::CScommBase::GetData(), BIAS::Image< StorageType >::GetImageData(), jpegImg_, pImgBuffer_, res, BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::JpegHandler::SetCompressedData(), and UseTCP_.

int VideoSource_Net::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 66 of file VideoSource_Net.cpp.

References BIASERR, BIAS::ImageBase::GetStorageType(), BIAS::Camera< StorageType >::ParseMetaData(), res, and BIAS::ImageBase::ST_unsignedchar.

Referenced by OpenDevice().

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( ) [virtual, inherited]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 178 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoServer::Init(), main(), BIAS::VideoSource_Stereo::OpenDevice(), OpenDevice(), and BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource_Net::OpenDevice ( int port = D_CS_DEFAULT_PORT ) [virtual]

for UDP commm, listen on this port for data

Reimplemented from BIAS::VideoSource.

Definition at line 27 of file VideoSource_Net.cpp.

References BIASERR.

int VideoSource_Net::OpenDevice | ( | const std::string & | serverName,
 |  | int | port = D_CS_DEFAULT_PORT
 | ) | [virtual]

use given port and ip address to connect to videoserver

Definition at line 38 of file VideoSource_Net.cpp.

References BIAS::VideoSource::BytesPerPixel_, client_, BIAS::VideoSource::ColorChannels_, BIAS::CScommClient::ConnectServer(), BIAS::CS_BINARY, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetDepth(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), GrabSingle(), BIAS::VideoSource::Height_, img, BIAS::CScommBase::RegisterMsg(), BIAS::CScommBase::SetVerbose(), and BIAS::VideoSource::Width_.

int VideoSource_Net::OpenDevice ( const char * serverName ) [virtual]

use given port and ip address to connect to videoserver

Reimplemented from BIAS::VideoSource.

Definition at line 33 of file VideoSource_Net.cpp.

References D_CS_DEFAULT_PORT, and BIAS::VideoSource::OpenDevice().

int VideoSource_Net::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 136 of file VideoSource_Net.cpp.

int VideoSource_Net::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 59 of file VideoSource_Net.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

CScommClient BIAS::VideoSource_Net::client_ [protected]

Definition at line 63 of file VideoSource_Net.hh.

Referenced by GrabSingle(), OpenDevice(), and VideoSource_Net().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource_Net::count_ [protected]

Definition at line 59 of file VideoSource_Net.hh.

Referenced by GrabSingle(), and VideoSource_Net().

JpegHandler BIAS::VideoSource_Net::Decompressor_ [protected]

Definition at line 68 of file VideoSource_Net.hh.

Referenced by CloseDevice(), GrabSingle(), and VideoSource_Net().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

BIAS::Image<unsigned char> BIAS::VideoSource_Net::jpegImg_ [protected]

Definition at line 67 of file VideoSource_Net.hh.

Referenced by GrabSingle().

std::stringstream* BIAS::VideoSource_Net::pImgBuffer_ [protected]

Definition at line 58 of file VideoSource_Net.hh.

Referenced by GrabSingle(), and VideoSource_Net().

int BIAS::VideoSource_Net::port_ [protected]

Definition at line 62 of file VideoSource_Net.hh.

bool BIAS::VideoSource_Net::UseTCP_ [protected]

Definition at line 60 of file VideoSource_Net.hh.

Referenced by GrabSingle(), and VideoSource_Net().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_Net.hh
  • VideoSource/VideoSource_Net.cpp
Generated on Wed Jun 21 19:12:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_Shm Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_Shm

BIAS::VideoSource_Shm Class Reference

This class implements a video streaming client using shared memory to receive images from another application. More...

#include <VideoSource/VideoSource_Shm.hh>

Inheritance diagram for BIAS::VideoSource_Shm:

[legend]
Collaboration diagram for BIAS::VideoSource_Shm:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
int | OpenDevice (const char *name)
a device name like "/dev/video1" can be specified here
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
void | SetSize (int w, int h, int bytesperpixel)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_Shm ()
~VideoSource_Shm ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

VideoSource_Shm & | operator= (const VideoSource_Shm &source)
prohibit default function (move to 'public' if needed)
int | Resize_ (int newsize)
VideoSource_Shm (const VideoSource_Shm &source)
prohibit default function (move to 'public' if needed)
int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
int | Context_
char * | Data_
unsigned int | DataLength_
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
std::string | FileName_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
ShmImageHeader * Header_
int | Height_
int | ID_
unsigned int | ImageSize_
bool | IsCreator_
double | LastTime_
std::stringstream * | pImgBuffer_
void * Shm_
unsigned int | TotalLength_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Classes

struct | ShmImageHeader

Detailed Description

This class implements a video streaming client using shared memory to receive images from another application.

Author:
evers

Definition at line 49 of file VideoSource_Shm.hh.

Constructor & Destructor Documentation

VideoSource_Shm::VideoSource_Shm ( )

Author:
Jan-Friso Evers

Definition at line 48 of file VideoSource_Shm.cpp.

References BIAS::ImageBase::CM_RGB, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, Context_, IsCreator_, LastTime_, pImgBuffer_, and BIAS::VideoSource::VideoSource().

BIAS::VideoSource_Shm::~VideoSource_Shm ( ) [inline]

Definition at line 61 of file VideoSource_Shm.hh.

BIAS::VideoSource_Shm::VideoSource_Shm ( const VideoSource_Shm & source ) [protected]

prohibit default function (move to 'public' if needed)

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_Shm::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 187 of file VideoSource_Shm.cpp.

References Shm_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_Shm::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 149 of file VideoSource_Shm.cpp.

References Data_, DataLength_, BIAS::UUID::GenerateUUID(), Header_, LastTime_, pImgBuffer_, Resize_(), BIAS::VideoSource_Shm::ShmImageHeader::Size_, and BIAS::VideoSource_Shm::ShmImageHeader::Time_.

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource_Shm::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented from BIAS::VideoSource.

Definition at line 73 of file VideoSource_Shm.cpp.

int VideoSource_Shm::OpenDevice ( const char * name ) [virtual]

a device name like "/dev/video1" can be specified here

Reimplemented from BIAS::VideoSource.

Definition at line 78 of file VideoSource_Shm.cpp.

References BIASERR, BIAS::VideoSource::ColorChannels_, Context_, DataLength_, FileName_, BIAS::VideoSource::Height_, IsCreator_, res, Shm_, TotalLength_, and BIAS::VideoSource::Width_.

VideoSource_Shm& BIAS::VideoSource_Shm::operator= ( const VideoSource_Shm & source ) [protected]

prohibit default function (move to 'public' if needed)

int VideoSource_Shm::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 177 of file VideoSource_Shm.cpp.

References Shm_, and TotalLength_.

Referenced by Resize_().

int VideoSource_Shm::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 136 of file VideoSource_Shm.cpp.

References Context_, Data_, Header_, Shm_, and TotalLength_.

Referenced by Resize_().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int VideoSource_Shm::Resize_ ( int newsize ) [protected]

Definition at line 201 of file VideoSource_Shm.cpp.

References DataLength_, PostGrab(), PreGrab(), and TotalLength_.

Referenced by GrabSingle().

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource_Shm::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel
 | ) | [virtual]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented from BIAS::VideoSource.

Definition at line 64 of file VideoSource_Shm.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource_Shm::Context_ [protected]

Definition at line 81 of file VideoSource_Shm.hh.

Referenced by OpenDevice(), PreGrab(), and VideoSource_Shm().

char* BIAS::VideoSource_Shm::Data_ [protected]

Definition at line 91 of file VideoSource_Shm.hh.

Referenced by GrabSingle(), and PreGrab().

unsigned int BIAS::VideoSource_Shm::DataLength_ [protected]

Definition at line 87 of file VideoSource_Shm.hh.

Referenced by GrabSingle(), OpenDevice(), and Resize_().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

std::string BIAS::VideoSource_Shm::FileName_ [protected]

Definition at line 85 of file VideoSource_Shm.hh.

Referenced by OpenDevice().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

ShmImageHeader* BIAS::VideoSource_Shm::Header_ [protected]

Definition at line 90 of file VideoSource_Shm.hh.

Referenced by GrabSingle(), and PreGrab().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

bool BIAS::VideoSource_Shm::IsCreator_ [protected]

Definition at line 84 of file VideoSource_Shm.hh.

Referenced by OpenDevice(), and VideoSource_Shm().

double BIAS::VideoSource_Shm::LastTime_ [protected]

Definition at line 92 of file VideoSource_Shm.hh.

Referenced by GrabSingle(), and VideoSource_Shm().

std::stringstream* BIAS::VideoSource_Shm::pImgBuffer_ [protected]

Definition at line 89 of file VideoSource_Shm.hh.

Referenced by GrabSingle(), and VideoSource_Shm().

void* BIAS::VideoSource_Shm::Shm_ [protected]

Definition at line 86 of file VideoSource_Shm.hh.

Referenced by CloseDevice(), OpenDevice(), PostGrab(), and PreGrab().

unsigned int BIAS::VideoSource_Shm::TotalLength_ [protected]

Definition at line 88 of file VideoSource_Shm.hh.

Referenced by OpenDevice(), PostGrab(), PreGrab(), and Resize_().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_Shm.hh
  • VideoSource/VideoSource_Shm.cpp
Generated on Wed Jun 21 19:12:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_Shm::ShmImageHeader Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_Shm::ShmImageHeader

BIAS::VideoSource_Shm::ShmImageHeader Struct Reference

#include <VideoSource/VideoSource_Shm.hh>

List of all members.

Public Attributes

unsigned int | Size_
double | Time_

Detailed Description

Definition at line 52 of file VideoSource_Shm.hh.

Member Data Documentation

unsigned int BIAS::VideoSource_Shm::ShmImageHeader::Size_

Definition at line 53 of file VideoSource_Shm.hh.

Referenced by BIAS::VideoSource_Shm::GrabSingle(), and BIAS::VideoShMFeeder::ProcessImage().

double BIAS::VideoSource_Shm::ShmImageHeader::Time_

Definition at line 54 of file VideoSource_Shm.hh.

Referenced by BIAS::VideoSource_Shm::GrabSingle(), and BIAS::VideoShMFeeder::ProcessImage().

The documentation for this struct was generated from the following file:
  • VideoSource/VideoSource_Shm.hh
Generated on Wed Jun 21 19:12:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_Stereo Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_Stereo

BIAS::VideoSource_Stereo Class Reference

#include <VideoSource/VideoSource_Stereo.hh>

Inheritance diagram for BIAS::VideoSource_Stereo:

[legend]
Collaboration diagram for BIAS::VideoSource_Stereo:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
virtual int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (Camera< unsigned char > &image)
Returns the left image and captures the right image from the camera.
int | GrabSingleRight (Camera< unsigned char > &image)
Returns the right image.
virtual int | InitImage (ImageBase &img)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
virtual int | OpenDevice (const char *name)
a device name like "/dev/video1" can be specified here
virtual int | PostGrab ()
Stop anythig started in PreGrab().
virtual int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_Stereo (VideoSource *left, VideoSource *right)
virtual | ~VideoSource_Stereo ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

VideoSource_Stereo & | operator= (const VideoSource_Stereo &source)
prohibit default function (move to 'public' if needed)
VideoSource_Stereo (const VideoSource_Stereo &source)
prohibit default function (move to 'public' if needed)
VideoSource_Stereo ()
prohibit default function (move to 'public' if needed)
int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
VideoSource * Left_
BIAS::Camera< unsigned char > | LeftIm_
VideoSource * Right_
BIAS::Camera< unsigned char > | RightIm_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 14 of file VideoSource_Stereo.hh.

Constructor & Destructor Documentation

BIAS::VideoSource_Stereo::VideoSource_Stereo | ( | VideoSource * | left,
 |  | VideoSource * | right
 | ) |

Definition at line 14 of file VideoSource_Stereo.cpp.

BIAS::VideoSource_Stereo::~VideoSource_Stereo ( ) [virtual]

Definition at line 19 of file VideoSource_Stereo.cpp.

References Left_, and Right_.

BIAS::VideoSource_Stereo::VideoSource_Stereo ( ) [protected]

prohibit default function (move to 'public' if needed)

Definition at line 108 of file VideoSource_Stereo.cpp.

References BIASABORT.

BIAS::VideoSource_Stereo::VideoSource_Stereo ( const VideoSource_Stereo & source ) [protected]

prohibit default function (move to 'public' if needed)

Definition at line 114 of file VideoSource_Stereo.cpp.

References BIASABORT.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource_Stereo::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 91 of file VideoSource_Stereo.cpp.

References BIAS::VideoSource::CloseDevice(), Left_, and Right_.

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int BIAS::VideoSource_Stereo::GrabSingle ( Camera< unsigned char > & image ) [virtual]

Returns the left image and captures the right image from the camera.

Reimplemented from BIAS::VideoSource.

Definition at line 67 of file VideoSource_Stereo.cpp.

References BIAS::VideoSource::GrabSingle(), Left_, LeftIm_, Right_, and RightIm_.

int BIAS::VideoSource_Stereo::GrabSingleRight ( Camera< unsigned char > & image ) [inline]

Returns the right image.

Must be called after GrabSingle()

Definition at line 31 of file VideoSource_Stereo.hh.

int BIAS::VideoSource_Stereo::InitImage ( ImageBase & img ) [virtual]

Call this only after opening the device successfully.

Reimplemented from BIAS::VideoSource.

Definition at line 100 of file VideoSource_Stereo.cpp.

References BIAS::VideoSource::InitImage(), Left_, LeftIm_, Right_, and RightIm_.

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int BIAS::VideoSource_Stereo::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented from BIAS::VideoSource.

Definition at line 51 of file VideoSource_Stereo.cpp.

References BIASABORT, and BIASERR.

int BIAS::VideoSource_Stereo::OpenDevice ( const char * name ) [virtual]

a device name like "/dev/video1" can be specified here

Reimplemented from BIAS::VideoSource.

Definition at line 32 of file VideoSource_Stereo.cpp.

References BIASERR, Left_, BIAS::VideoSource::OpenDevice(), and Right_.

VideoSource_Stereo & BIAS::VideoSource_Stereo::operator= ( const VideoSource_Stereo & source ) [protected]

prohibit default function (move to 'public' if needed)

Definition at line 121 of file VideoSource_Stereo.cpp.

References BIASABORT.

int BIAS::VideoSource_Stereo::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 76 of file VideoSource_Stereo.cpp.

References Left_, BIAS::VideoSource::PostGrab(), and Right_.

int BIAS::VideoSource_Stereo::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 59 of file VideoSource_Stereo.cpp.

References Left_, BIAS::VideoSource::PreGrab(), and Right_.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void BIAS::VideoSource_Stereo::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel
 | ) | [virtual]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented from BIAS::VideoSource.

Definition at line 84 of file VideoSource_Stereo.cpp.

References Left_, Right_, and BIAS::VideoSource::SetSize().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

VideoSource* BIAS::VideoSource_Stereo::Left_ [protected]

Definition at line 43 of file VideoSource_Stereo.hh.

Referenced by CloseDevice(), GrabSingle(), InitImage(), OpenDevice(), PostGrab(), PreGrab(), SetSize(), and ~VideoSource_Stereo().

BIAS::Camera<unsigned char> BIAS::VideoSource_Stereo::LeftIm_ [protected]

Definition at line 46 of file VideoSource_Stereo.hh.

Referenced by GrabSingle(), and InitImage().

VideoSource* BIAS::VideoSource_Stereo::Right_ [protected]

Definition at line 44 of file VideoSource_Stereo.hh.

Referenced by CloseDevice(), GrabSingle(), InitImage(), OpenDevice(), PostGrab(), PreGrab(), SetSize(), and ~VideoSource_Stereo().

BIAS::Camera<unsigned char> BIAS::VideoSource_Stereo::RightIm_ [protected]

Definition at line 46 of file VideoSource_Stereo.hh.

Referenced by GrabSingle(), and InitImage().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_Stereo.hh
  • VideoSource/VideoSource_Stereo.cpp
Generated on Wed Jun 21 19:12:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource_UEYE Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

VideoSource_UEYE Class Reference

This class extends VideoSource for the use of IDS UEYE devices. More...

#include <VideoSource/VideoSource_uEye.hh>

Detailed Description

This class extends VideoSource for the use of IDS UEYE devices.

Author:
ischiller

The documentation for this class was generated from the following file:
  • VideoSource/VideoSource_uEye.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_uEye Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_uEye

BIAS::VideoSource_uEye Class Reference

#include <VideoSource/VideoSource_uEye.hh>

Inheritance diagram for BIAS::VideoSource_uEye:

[legend]
Collaboration diagram for BIAS::VideoSource_uEye:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
float | GetGain ()
int | GetHeight ()
int | GetID ()
float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
int | GrabSingle (BIAS::Camera< unsigned char > &image)
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
int | PostGrab ()
Stop anythig started in PreGrab().
int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
int | SetGain (float g)
Set gain to g with g[dB].
int | SetLeftTop (unsigned int left, unsigned int top)
int | SetPixelClock (int dClock)
int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
virtual int | ShowCapabilities (const char *device)
virtual int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_uEye ()
~VideoSource_uEye ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

bool | OpenCamera_ ()
int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
int | Height_
int | ID_
unsigned int | ImageSize_
bool | m_bIsInited
HIDS | m_CameraHandle
int | m_dBitsPerPixel
int | m_dColorMode
unsigned int | m_dDepth
unsigned int | m_dHeight
int | m_dLeftPos
int | m_dMemID
int | m_dPixelClock
unsigned int | m_dSrcDepth
unsigned int | m_dSrcHeight
unsigned int | m_dSrcWidth
int | m_dTopPos
unsigned int | m_dWidth
char * | m_pImageBuffer
unsigned char * | m_pSwapBuffer
CuEye m_ueye
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Definition at line 25 of file VideoSource_uEye.hh.

Constructor & Destructor Documentation

VideoSource_uEye::VideoSource_uEye ( )

Definition at line 12 of file VideoSource_uEye.cpp.

References BIAS::ImageBase::CM_Grey, m_bIsInited, m_CameraHandle, m_dBitsPerPixel, m_dColorMode, m_dDepth, m_dHeight, m_dLeftPos, m_dMemID, m_dPixelClock, m_dSrcDepth, m_dSrcHeight, m_dSrcWidth, m_dTopPos, m_dWidth, m_pImageBuffer, m_pSwapBuffer, BIAS::VideoSource::SetColorModel(), and BIAS::VideoSource::SetSize().

VideoSource_uEye::~VideoSource_uEye ( )

Definition at line 45 of file VideoSource_uEye.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_uEye::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 80 of file VideoSource_uEye.cpp.

References CuEye::EnableMessage(), CuEye::ExitCamera(), CuEye::FreeImageMem(), m_dMemID, m_pImageBuffer, m_pSwapBuffer, m_ueye, and CuEye::StopLiveVideo().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource_uEye::GetGain ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 122 of file VideoSource_uEye.cpp.

References gain, CuEye::GetGain(), m_bIsInited, and m_ueye.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource_uEye::GetShutter ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 104 of file VideoSource_uEye.cpp.

References CuEye::GetExposureTime(), m_bIsInited, and m_ueye.

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_uEye::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 138 of file VideoSource_uEye.cpp.

References BIAS::ImageBase::CopyIn_NoInit(), CuEye::GetActiveImageMem(), m_dMemID, m_pSwapBuffer, and m_ueye.

int VideoSource_uEye::InitImage ( BIAS::ImageBase & Image )

Call this only after opening the device successfully.

Reimplemented from BIAS::VideoSource.

Definition at line 50 of file VideoSource_uEye.cpp.

References BIAS::VideoSource::GetColorChannels(), BIAS::VideoSource::GetHeight(), BIAS::VideoSource::GetWidth(), and BIAS::ImageBase::Init().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

bool VideoSource_uEye::OpenCamera_ ( ) [protected]

Definition at line 182 of file VideoSource_uEye.cpp.

References BIASERR, CuEye::EnableMessage(), CuEye::ExitCamera(), CuEye::GetSensorInfo(), CuEye::InitCamera(), m_bIsInited, and m_ueye.

Referenced by OpenDevice().

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const char * device ) [virtual, inherited]

a device name like "/dev/video1" can be specified here

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_V4L.

Definition at line 190 of file VideoSource_Base.cpp.

int VideoSource_uEye::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented from BIAS::VideoSource.

Definition at line 64 of file VideoSource_uEye.cpp.

References CuEye::GetNumberOfCameras(), m_ueye, and OpenCamera_().

int VideoSource_uEye::PostGrab ( ) [virtual]

Stop anythig started in PreGrab().

Reimplemented from BIAS::VideoSource.

Definition at line 156 of file VideoSource_uEye.cpp.

int VideoSource_uEye::PreGrab ( ) [virtual]

E.g.

: start isochronous transfer

Reimplemented from BIAS::VideoSource.

Definition at line 150 of file VideoSource_uEye.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void VideoSource_uEye::SetFPS ( float fps )

Must be used before OpenDevice() !

Reimplemented from BIAS::VideoSource.

Definition at line 132 of file VideoSource_uEye.cpp.

References m_ueye, and CuEye::SetFrameRate().

int VideoSource_uEye::SetGain ( float g ) [virtual]

Set gain to g with g[dB].

Reimplemented from BIAS::VideoSource.

Definition at line 114 of file VideoSource_uEye.cpp.

References m_bIsInited, m_ueye, and CuEye::SetGain().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource_uEye::SetLeftTop | ( | unsigned int | left,
 |  | unsigned int | top
 | ) |

Definition at line 161 of file VideoSource_uEye.cpp.

References m_dLeftPos, m_dTopPos, m_ueye, and CuEye::SetImagePos().

int VideoSource_uEye::SetPixelClock ( int dClock )

Definition at line 175 of file VideoSource_uEye.cpp.

References m_dPixelClock, m_ueye, and CuEye::SetPixelClock().

int VideoSource_uEye::SetShutter ( float exptime ) [virtual]

Set shutter (exposure time) to exptime in seconds.

Reimplemented from BIAS::VideoSource.

Definition at line 94 of file VideoSource_uEye.cpp.

References m_bIsInited, m_ueye, and CuEye::SetExposureTime().

void VideoSource_uEye::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented from BIAS::VideoSource.

Definition at line 56 of file VideoSource_uEye.cpp.

References BIAS::VideoSource::SetSize().

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource::ShowCapabilities ( const char * device ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 215 of file VideoSource_Base.cpp.

int VideoSource::ShowCapabilities ( ) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 209 of file VideoSource_Base.cpp.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource::StartGrabContinous ( ) [virtual, inherited]

for V4L

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 160 of file VideoSource_Base.cpp.

int VideoSource::StopGrabContinous ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 167 of file VideoSource_Base.cpp.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_V4L::ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource_V4L::VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_V4L::CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_V4L::GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource::GrabbingContinous_ [protected, inherited]

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 283 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::VideoSource().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

bool BIAS::VideoSource_uEye::m_bIsInited [protected]

Definition at line 56 of file VideoSource_uEye.hh.

Referenced by GetGain(), GetShutter(), OpenCamera_(), SetGain(), SetShutter(), and VideoSource_uEye().

HIDS BIAS::VideoSource_uEye::m_CameraHandle [protected]

Definition at line 62 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dBitsPerPixel [protected]

Definition at line 59 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dColorMode [protected]

Definition at line 58 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dDepth [protected]

Definition at line 78 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dHeight [protected]

Definition at line 77 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dLeftPos [protected]

Definition at line 69 of file VideoSource_uEye.hh.

Referenced by SetLeftTop(), and VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dMemID [protected]

Definition at line 60 of file VideoSource_uEye.hh.

Referenced by CloseDevice(), GrabSingle(), and VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dPixelClock [protected]

Definition at line 72 of file VideoSource_uEye.hh.

Referenced by SetPixelClock(), and VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dSrcDepth [protected]

Definition at line 67 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dSrcHeight [protected]

Definition at line 66 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dSrcWidth [protected]

Definition at line 65 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

int BIAS::VideoSource_uEye::m_dTopPos [protected]

Definition at line 70 of file VideoSource_uEye.hh.

Referenced by SetLeftTop(), and VideoSource_uEye().

unsigned int BIAS::VideoSource_uEye::m_dWidth [protected]

Definition at line 76 of file VideoSource_uEye.hh.

Referenced by VideoSource_uEye().

char* BIAS::VideoSource_uEye::m_pImageBuffer [protected]

Definition at line 74 of file VideoSource_uEye.hh.

Referenced by CloseDevice(), and VideoSource_uEye().

unsigned char* BIAS::VideoSource_uEye::m_pSwapBuffer [protected]

Definition at line 75 of file VideoSource_uEye.hh.

Referenced by CloseDevice(), GrabSingle(), and VideoSource_uEye().

CuEye BIAS::VideoSource_uEye::m_ueye [protected]

Definition at line 63 of file VideoSource_uEye.hh.

Referenced by CloseDevice(), GetGain(), GetShutter(), GrabSingle(), OpenCamera_(), OpenDevice(), SetFPS(), SetGain(), SetLeftTop(), SetPixelClock(), and SetShutter().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_V4L::OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_V4L::VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_uEye.hh
  • VideoSource/VideoSource_uEye.cpp
Generated on Wed Jun 21 19:13:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoSource_V4L Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoSource_V4L

BIAS::VideoSource_V4L Class Reference

This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras. More...

#include <VideoSource/VideoSource_V4L.hh>

Inheritance diagram for BIAS::VideoSource_V4L:

[legend]
Collaboration diagram for BIAS::VideoSource_V4L:

[legend]
List of all members.

Public Member Functions

void | AddDebugLevel (long int lv)
virtual int | AutoMode (int, bool)
Use this to enable/disable any automatic modes addressed via enums.
virtual int | CloseDevice ()
bool | DebugLevelIsSet (long int lv) const
float | GetBytesPerPixel () const
int | GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
virtual unsigned int | GetFeature (int feature)
normaly, feature is an enum
virtual float | GetGain ()
int | GetHeight ()
int | GetID ()
virtual float | GetShutter ()
int | GetWidth ()
virtual int | GrabSingle (BIAS::Camera< int > &image)
virtual int | GrabSingle (BIAS::Camera< char > &image)
virtual int | GrabSingle (BIAS::Camera< float > &image)
virtual int | GrabSingle (BIAS::Camera< unsigned char > &image)
blocks until a new frame arrives from the cam, if dont want blocking set waitForNew() to false
int | InitImage (BIAS::ImageBase &Image)
Call this only after opening the device successfully.
bool | IsGrabbingContinous ()
virtual int | OnePushAuto (int feature)
virtual int | OpenDevice (const std::vector< std::string > &FileNames)
used in child class VideoSource_Disk
virtual int | OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount)
used in child class VideoSource_Disk
virtual int | OpenDevice (int device)
a device number can be specified here (DCAM) or port number (Net)
virtual int | OpenDevice (const char *device)
a device name like "/dev/video1" can be specified here
virtual int | OpenDevice ()
this simplest method to open a device selects the first available device E.g.
virtual int | PostGrab ()
Stop anythig started in PreGrab().
virtual int | PreGrab ()
E.g.
void | PrintDebugLevel (std::ostream &os=std::cout) const
void | RemoveDebugLevel (long int lv)
void | SetBytesPerPixel (unsigned char bpp)
Must be used before OpenDevice() !
void | SetChannel (int channel)
Use channel to select one of many cameras on the same Must be used before OpenDevice() !
virtual int | SetColorModel (BIAS::ImageBase::EColorModel mode)
Select colormodel to use Not all sources support all colormodels.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | SetDirectToDisk (const std::string &filename)
this enables the very fast direct-to-disk mode.
virtual int | SetFeature (int feature, unsigned int value)
normaly, feature is an enum
void | SetFPS (float fps)
Must be used before OpenDevice() !
virtual int | SetGain (float g)
Set gain to g with g[dB].
virtual int | SetShutter (float exptime)
Set shutter (exposure time) to exptime in seconds.
virtual void | SetSize (int w, int h, int bytesperpixel=1)
These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
void | SetWaitForNew (bool waitForNew)
If you want as many images as possbile, and dont care about equal ones call this with "false".
virtual int | SetWhiteBalance (float rvalue, float bvalue)
range is [-1.0 , 1.0)
int | ShowCapabilities (const char *device)
int | ShowCapabilities ()
Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int | SoftwareWhiteBalance ()
virtual int | StartGrabContinous ()
for V4L
virtual int | StopGrabContinous ()
VideoSource_V4L ()
virtual | ~VideoSource_V4L ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Member Functions

int | WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Static Protected Member Functions

static void * | GrabContThread_ (void *arg)

Protected Attributes

long int | _liDebugLevel
bool | Active_
active_ is set in PreGrab() und unset in PostGrab()
int | ActiveFrame
pthread_mutex_t | ActiveFrameMutex_
v4l2_buffer | buffer_
int | bufferLastCaptured_
std::vector< int > | bufLengths
std::vector< char * > | bufStarts
float | BytesPerPixel_
BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
v4l2_capability | capability2
int | ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool | CompleteInitialized_
Complete_initialized_ is set when OpenDevice(),.
pthread_t | ContinousThread_
char * | DefaultDevice_
int | DeviceChannel_
bool | DirectToDisk_
char * | DtDBuffer_
unsigned int | DtDBufferSize_
int | DtDFd_
BIAS::VideoStream::VSImageHeader * DtDImageHeader_
char * | DtDStartOfImage_
int | fd
v4l2_format | format2_
float | FramesPerSecond_
bool | Grabbing_
grabbing_ is set and unset in Grab*()
bool | GrabbingContinous_
timeval | GrabTime_
int | Height_
int | ID_
unsigned int | ImageSize_
bool | newFrame_
unsigned int | numBuffers_
v4l2_requestbuffers | reqBuf
pthread_cond_t | ThreadCondition_
int | waitForNew_
int | Width_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras.

Author:
evers, v4l2 by grest

Definition at line 53 of file VideoSource_V4L.hh.

Constructor & Destructor Documentation

VideoSource_V4L::VideoSource_V4L ( )

Definition at line 41 of file VideoSource_V4L.cpp.

References ActiveFrame, ActiveFrameMutex_, bufferLastCaptured_, BIAS::ImageBase::CM_BGR, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, BIAS::VideoSource::DefaultDevice_, BIAS::VideoSource::DeviceChannel_, GrabbingContinous_, BIAS::VideoSource::Height_, newFrame_, numBuffers_, BIAS::Debug::SetDebugLevel(), waitForNew_, and BIAS::VideoSource::Width_.

VideoSource_V4L::~VideoSource_V4L ( ) [virtual]

Definition at line 60 of file VideoSource_V4L.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

int VideoSource::AutoMode | ( | int | ,
 |  | bool |
 | ) | [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 294 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int VideoSource_V4L::CloseDevice ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 363 of file VideoSource_V4L.cpp.

References BIASERR, bufLengths, bufStarts, BIAS::VideoSource::CompleteInitialized_, fd, BIAS::VideoSource::Grabbing_, BIAS::VideoSource::PostGrab(), and reqBuf.

Referenced by main().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 189 of file VideoSource_Base.hh.

int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]

Definition at line 185 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_uEye::InitImage(), and BIAS::VideoSource_DSHOW::InitImage().

BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 187 of file VideoSource_Base.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

unsigned int VideoSource::GetFeature ( int feature ) [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 301 of file VideoSource_Base.cpp.

References BIASERR.

float VideoSource::GetGain ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 326 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]

Definition at line 183 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

int BIAS::VideoSource::GetID ( ) [inline, inherited]

Definition at line 206 of file VideoSource_Base.hh.

Referenced by BIAS::MDcam::GetID(), and main().

float VideoSource::GetShutter ( ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 332 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_uEye::InitImage(), BIAS::VideoSource_DSHOW::InitImage(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::MDcam::ScanBus().

void * VideoSource_V4L::GrabContThread_ ( void * arg ) [static, protected]

Definition at line 482 of file VideoSource_V4L.cpp.

References ActiveFrameMutex_, buffer_, bufferLastCaptured_, fd, GrabbingContinous_, newFrame_, and numBuffers_.

Referenced by StartGrabContinous().

int VideoSource::GrabSingle ( BIAS::Camera< int > & image ) [virtual, inherited]

Definition at line 279 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< char > & image ) [virtual, inherited]

Definition at line 263 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource::GrabSingle ( BIAS::Camera< float > & image ) [virtual, inherited]

Definition at line 240 of file VideoSource_Base.cpp.

References BIASERR.

int VideoSource_V4L::GrabSingle ( BIAS::Camera< unsigned char > & image ) [virtual]

blocks until a new frame arrives from the cam, if dont want blocking set waitForNew() to false

Reimplemented from BIAS::VideoSource.

Definition at line 388 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::Active_, BIASDOUT, BIASERR, buffer_, bufferLastCaptured_, bufStarts, BIAS::ImageBase::CopyIn_NoInit(), D_V4L, fd, BIAS::VideoSource::Grabbing_, GrabbingContinous_, GrabTime_, BIAS::ImageBase::InvalidateUID(), BIAS::ImageBase::IsEmpty(), newFrame_, BIAS::Camera< StorageType >::SetTime(), and waitForNew_.

int VideoSource::InitImage ( BIAS::ImageBase & Image ) [inherited]

Call this only after opening the device successfully.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 112 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

Referenced by BIAS::VideoSource_Stereo::InitImage(), main(), mainloop(), and BIAS::VideoSource::SoftwareWhiteBalance().

bool BIAS::VideoSource::IsGrabbingContinous ( ) [inline, inherited]

Definition at line 214 of file VideoSource_Base.hh.

int VideoSource::OnePushAuto ( int feature ) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 337 of file VideoSource_Base.cpp.

References BIASERR.

virtual int BIAS::VideoSource::OpenDevice ( const std::vector< std::string > & FileNames ) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_DiskPMD.

virtual int BIAS::VideoSource::OpenDevice | ( | std::string | Prefix,
 |  | std::string | Postfix,
 |  | int | DigitCount,
 |  | int | PictureCount
 | ) | [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

int VideoSource::OpenDevice ( int device ) [virtual, inherited]

a device number can be specified here (DCAM) or port number (Net)

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_Net.

Definition at line 184 of file VideoSource_Base.cpp.

int VideoSource_V4L::OpenDevice ( const char * device ) [virtual]

a device name like "/dev/video1" can be specified here

Reimplemented from BIAS::VideoSource.

Definition at line 200 of file VideoSource_V4L.cpp.

References BIASDOUT, BIASERR, BIASWARN, buffer_, bufLengths, bufStarts, BIAS::VideoSource::BytesPerPixel_, capability2, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, BIAS::VideoSource::CompleteInitialized_, D_V4L, BIAS::VideoSource::DeviceChannel_, fd, format2_, BIAS::VideoSource::Height_, numBuffers_, printFormatInfo_(), reqBuf, res, and BIAS::VideoSource::Width_.

int VideoSource_V4L::OpenDevice ( ) [virtual]

this simplest method to open a device selects the first available device E.g.

: V4L: /dev/video0 DCAM/DV : Card 0, first camera

Reimplemented from BIAS::VideoSource.

Definition at line 194 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::DefaultDevice_.

Referenced by main().

int VideoSource::PostGrab ( ) [virtual, inherited]

Stop anythig started in PreGrab().

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 154 of file VideoSource_Base.cpp.

References BIAS::VideoSource::Active_.

Referenced by CloseDevice(), main(), and BIAS::VideoSource_Stereo::PostGrab().

int VideoSource::PreGrab ( ) [virtual, inherited]

E.g.

: start isochronous transfer

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_Disk, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Net, BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 135 of file VideoSource_Base.cpp.

References BIAS::VideoSource::Active_, BIASERR, and BIAS::VideoSource::CompleteInitialized_.

Referenced by BIAS::VideoServer::Init(), main(), BIAS::VideoSource_Stereo::PreGrab(), and BIAS::VideoSource_Disk::PreGrab().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

void BIAS::VideoSource::SetBytesPerPixel ( unsigned char bpp ) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 179 of file VideoSource_Base.hh.

void BIAS::VideoSource::SetChannel ( int channel ) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 172 of file VideoSource_Base.hh.

Referenced by main().

int VideoSource::SetColorModel ( BIAS::ImageBase::EColorModel mode ) [virtual, inherited]

Select colormodel to use Not all sources support all colormodels.

Must be used before OpenDevice() !

Definition at line 93 of file VideoSource_Base.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUYV422, BIAS::VideoSource::ColorChannels_, and BIAS::VideoSource::ColorMode_.

Referenced by main(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

int VideoSource::SetDirectToDisk ( const std::string & filename ) [inherited]

this enables the very fast direct-to-disk mode.

Use this _after_ OpenDevice() because the image size must be known.

Author:
evers

Definition at line 395 of file VideoSource_Base.cpp.

References BIASDOUT, BIASERR, BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::ColorChannels_, BIAS::VideoSource::ColorMode_, D_DTD, BIAS::VideoSource::DirectToDisk_, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::VideoSource::Height_, BIAS::VideoSource::ImageSize_, res, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, and BIAS::VideoSource::Width_.

Referenced by main().

int VideoSource::SetFeature | ( | int | feature,
 |  | unsigned int | value
 | ) | [virtual, inherited]

normaly, feature is an enum

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 307 of file VideoSource_Base.cpp.

References BIASERR.

void BIAS::VideoSource::SetFPS ( float fps ) [inline, inherited]

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Definition at line 176 of file VideoSource_Base.hh.

Referenced by BIAS::VideoServer::Init(), and main().

int VideoSource::SetGain ( float g ) [virtual, inherited]

Set gain to g with g[dB].

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 320 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int VideoSource::SetShutter ( float exptime ) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_uEye.

Definition at line 314 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoServer::Init().

void VideoSource::SetSize | ( | int | w,
 |  | int | h,
 |  | int | bytesperpixel = 1
 | ) | [virtual, inherited]

These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_Shm, BIAS::VideoSource_Stereo, and BIAS::VideoSource_uEye.

Definition at line 86 of file VideoSource_Base.cpp.

References BIAS::VideoSource::BytesPerPixel_, BIAS::VideoSource::Height_, and BIAS::VideoSource::Width_.

Referenced by BIAS::VideoServer::Init(), BIAS::VideoSource_DSHOW::OpenDevice(), BIAS::MDcam::ScanBus(), BIAS::VideoSource_uEye::SetSize(), BIAS::VideoSource_Stereo::SetSize(), BIAS::VideoSource_DSHOW::SetSizeAndColorModel(), and BIAS::VideoSource_uEye::VideoSource_uEye().

void BIAS::VideoSource_V4L::SetWaitForNew ( bool waitForNew ) [inline]

If you want as many images as possbile, and dont care about equal ones call this with "false".

Default is that GrabSingle blocks until a new frame arrives from the camera.

Author:
grest, Oct. 2005

Definition at line 78 of file VideoSource_V4L.hh.

References waitForNew_.

int VideoSource::SetWhiteBalance | ( | float | rvalue,
 |  | float | bvalue
 | ) | [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 341 of file VideoSource_Base.cpp.

References BIASERR.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

int VideoSource_V4L::ShowCapabilities ( const char * device ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 91 of file VideoSource_V4L.cpp.

References BIASERR, capability2, fd, format2_, and printFormatInfo_().

int VideoSource_V4L::ShowCapabilities ( ) [virtual]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented from BIAS::VideoSource.

Definition at line 66 of file VideoSource_V4L.cpp.

References BIAS::VideoSource::DefaultDevice_.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]

Definition at line 347 of file VideoSource_Base.cpp.

References BIASASSERT, BIASCDOUT, BIAS::VideoSource::CompleteInitialized_, D_VS_WHITEB, BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetMeanPixelValue(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::VideoSource::GrabSingle(), img, BIAS::VideoSource::InitImage(), mean, BIAS::VideoSource::OpenDevice(), BIAS::ROI::SetCorners(), BIAS::VideoSource::SetGain(), BIAS::ImageBase::SetROI(), BIAS::VideoSource::SetWhiteBalance(), and BIAS::ImageConvert::ToRGB().

Referenced by BIAS::VideoSource_DCAM::OnePushAuto().

int VideoSource_V4L::StartGrabContinous ( ) [virtual]

for V4L

Reimplemented from BIAS::VideoSource.

Definition at line 445 of file VideoSource_V4L.cpp.

References ActiveFrameMutex_, ContinousThread_, GrabbingContinous_, GrabContThread_(), and ThreadCondition_.

int VideoSource_V4L::StopGrabContinous ( ) [virtual]

Reimplemented from BIAS::VideoSource.

Definition at line 453 of file VideoSource_V4L.cpp.

References ActiveFrameMutex_, BIASERR, ContinousThread_, GrabbingContinous_, res, and ThreadCondition_.

int VideoSource::WriteDirect_ | ( | const unsigned char * | data,
 |  | const BIAS::UUID & | uuid,
 |  | const long int & | sec,
 |  | const long int & | usec
 | ) | [protected, inherited]

Definition at line 464 of file VideoSource_Base.cpp.

References BIASERR, BIAS::VideoSource::DtDBuffer_, BIAS::VideoSource::DtDBufferSize_, BIAS::VideoSource::DtDFd_, BIAS::VideoSource::DtDImageHeader_, BIAS::VideoSource::DtDStartOfImage_, BIAS::UUID::GetString(), BIAS::VideoStream::VSImageHeader::tsec, BIAS::VideoStream::VSImageHeader::tusec, and BIAS::VideoStream::VSImageHeader::uuid.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]

active_ is set in PreGrab() und unset in PostGrab()

Definition at line 275 of file VideoSource_Base.hh.

Referenced by GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), BIAS::VideoSource_DCAM::PostGrab(), BIAS::VideoSource::PostGrab(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), and BIAS::VideoSource::VideoSource().

int BIAS::VideoSource_V4L::ActiveFrame [protected]

Definition at line 112 of file VideoSource_V4L.hh.

Referenced by VideoSource_V4L().

pthread_mutex_t BIAS::VideoSource_V4L::ActiveFrameMutex_ [protected]

Definition at line 102 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), StartGrabContinous(), StopGrabContinous(), and VideoSource_V4L().

struct v4l2_buffer BIAS::VideoSource_V4L::buffer_ [protected]

Definition at line 90 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), GrabSingle(), and OpenDevice().

int BIAS::VideoSource_V4L::bufferLastCaptured_ [protected]

Definition at line 92 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), GrabSingle(), and VideoSource_V4L().

std::vector<int> BIAS::VideoSource_V4L::bufLengths [protected]

Definition at line 95 of file VideoSource_V4L.hh.

Referenced by CloseDevice(), and OpenDevice().

std::vector<char*> BIAS::VideoSource_V4L::bufStarts [protected]

Definition at line 96 of file VideoSource_V4L.hh.

Referenced by CloseDevice(), GrabSingle(), and OpenDevice().

float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]

BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.

Definition at line 261 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), BIAS::VideoSource::InitImage(), OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToMode(), and BIAS::VideoSource::VideoSource().

struct v4l2_capability BIAS::VideoSource_V4L::capability2 [protected]

Definition at line 88 of file VideoSource_V4L.hh.

Referenced by OpenDevice(), and ShowCapabilities().

int BIAS::VideoSource::ColorChannels_ [protected, inherited]

Definition at line 257 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetFormat7(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and VideoSource_V4L().

BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_ [protected, inherited]

Definition at line 266 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::GetModelForEuid(), OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetColorModel(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Net::VideoSource_Net(), BIAS::VideoSource_Shm::VideoSource_Shm(), and VideoSource_V4L().

bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

Complete_initialized_ is set when OpenDevice(),.

Definition at line 272 of file VideoSource_Base.hh.

Referenced by CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), BIAS::VideoSource_DCAM::InitCam(), OpenDevice(), BIAS::VideoSource_DCAM::PreGrab(), BIAS::VideoSource::PreGrab(), BIAS::VideoSource::SoftwareWhiteBalance(), and BIAS::VideoSource::VideoSource().

pthread_t BIAS::VideoSource_V4L::ContinousThread_ [protected]

Definition at line 100 of file VideoSource_V4L.hh.

Referenced by StartGrabContinous(), and StopGrabContinous().

char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]

Definition at line 263 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::InitCam(), OpenDevice(), ShowCapabilities(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and VideoSource_V4L().

int BIAS::VideoSource::DeviceChannel_ [protected, inherited]

Definition at line 265 of file VideoSource_Base.hh.

Referenced by OpenDevice(), BIAS::VideoSource::VideoSource(), and VideoSource_V4L().

bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]

Definition at line 285 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::VideoSource().

char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]

Definition at line 288 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]

Definition at line 290 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource::DtDFd_ [protected, inherited]

Definition at line 286 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource::VideoSource(), and BIAS::VideoSource::WriteDirect_().

BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_ [protected, inherited]

Definition at line 293 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Definition at line 294 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk(), and BIAS::VideoSource::WriteDirect_().

int BIAS::VideoSource_V4L::fd [protected]

Definition at line 85 of file VideoSource_V4L.hh.

Referenced by CloseDevice(), GrabContThread_(), GrabSingle(), OpenDevice(), and ShowCapabilities().

struct v4l2_format BIAS::VideoSource_V4L::format2_ [protected]

Definition at line 89 of file VideoSource_V4L.hh.

Referenced by OpenDevice(), and ShowCapabilities().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]

Definition at line 258 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and BIAS::VideoSource_Disk::VideoSource_Disk().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]

grabbing_ is set and unset in Grab*()

Definition at line 278 of file VideoSource_Base.hh.

Referenced by CloseDevice(), BIAS::VideoSource_Disk::CloseDevice(), GrabSingle(), BIAS::VideoSource_DCAM::GrabSingle(), and BIAS::VideoSource::VideoSource().

bool BIAS::VideoSource_V4L::GrabbingContinous_ [protected]

Reimplemented from BIAS::VideoSource.

Definition at line 99 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), GrabSingle(), StartGrabContinous(), StopGrabContinous(), and VideoSource_V4L().

struct timeval BIAS::VideoSource_V4L::GrabTime_ [protected]

Definition at line 104 of file VideoSource_V4L.hh.

Referenced by GrabSingle().

int BIAS::VideoSource::Height_ [protected, inherited]

Definition at line 256 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and VideoSource_V4L().

int BIAS::VideoSource::ID_ [protected, inherited]

Definition at line 281 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ExternalTrigger(), BIAS::VideoSource_DCAM::GetFeature(), BIAS::VideoSource_DCAM::OpenDevice(), and BIAS::VideoSource_DCAM::SetFeature().

unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]

Definition at line 291 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource::SetDirectToDisk().

bool BIAS::VideoSource_V4L::newFrame_ [protected]

Definition at line 108 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), GrabSingle(), and VideoSource_V4L().

unsigned int BIAS::VideoSource_V4L::numBuffers_ [protected]

Definition at line 91 of file VideoSource_V4L.hh.

Referenced by GrabContThread_(), OpenDevice(), and VideoSource_V4L().

struct v4l2_requestbuffers BIAS::VideoSource_V4L::reqBuf [protected]

Definition at line 87 of file VideoSource_V4L.hh.

Referenced by CloseDevice(), and OpenDevice().

pthread_cond_t BIAS::VideoSource_V4L::ThreadCondition_ [protected]

Definition at line 101 of file VideoSource_V4L.hh.

Referenced by StartGrabContinous(), and StopGrabContinous().

int BIAS::VideoSource_V4L::waitForNew_ [protected]

Definition at line 94 of file VideoSource_V4L.hh.

Referenced by GrabSingle(), SetWaitForNew(), and VideoSource_V4L().

int BIAS::VideoSource::Width_ [protected, inherited]

Definition at line 255 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::ApplyBytesPerPacket(), BIAS::VideoSource_DCAM::CalcBytesPerPacket(), BIAS::VideoSource_DCAM::InitCam(), OpenDevice(), BIAS::VideoSource_Shm::OpenDevice(), BIAS::VideoSource_Net::OpenDevice(), BIAS::VideoSource_DCAM::SelectDefault(), BIAS::VideoSource::SetDirectToDisk(), BIAS::VideoSource_DCAM::SetLeftTop(), BIAS::VideoSource_Shm::SetSize(), BIAS::VideoSource::SetSize(), BIAS::VideoSource_DCAM::UserSizeToFormat7_(), BIAS::VideoSource_DCAM::UserSizeToMode(), BIAS::VideoSource::VideoSource(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), and VideoSource_V4L().

The documentation for this class was generated from the following files:
  • VideoSource/VideoSource_V4L.hh
  • VideoSource/VideoSource_V4L.cpp
Generated on Wed Jun 21 19:13:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoStream Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoStream

BIAS::VideoStream Class Reference

To allow capturing of camera image to disk efficiently, (avoid multiple memcopy operations), this class defines an interface to file containing one header and multiple images. More...

#include <Image/VideoStream.hh>

Collaboration diagram for BIAS::VideoStream:

[legend]
List of all members.

Public Member Functions

int | Close ()
int | Open (const std::string &file)
BIAS::VideoStream & | operator= (const BIAS::VideoStream &src)
assignment operator is mandatory because copy constructor is.
void PrintHeader ()
int | SplitIntoFiles (const std::string &prefix, unsigned int start=0, unsigned int count=0)
VideoStream (const VideoStream &src)
copy constructor mandatory because of ifstrseam member
VideoStream (const std::string &file)
VideoStream ()
virtual | ~VideoStream ()
destructor mandatory because copy constructor is.

Protected Attributes

unsigned long int | FileSize_
VSHeader Header_
std::ifstream | Ifs_
unsigned int | ImageSize_
unsigned int | NumImages_

Classes

class | VSHeader
class | VSImageHeader

Detailed Description

To allow capturing of camera image to disk efficiently, (avoid multiple memcopy operations), this class defines an interface to file containing one header and multiple images.

All data for write() must be aligned to 512-byte boundaries to allow unbuffered operations with open(,O_DIRECT). This can only guaranteed by circumventing all C++ stuff like new() and operator<<(). These video stream file are written by MIP::VideoSource_() and can be split into multiple images with this class.

Author:
Jan-Friso Evers-Senne

Definition at line 35 of file VideoStream.hh.

Constructor & Destructor Documentation

VideoStream::~VideoStream ( ) [virtual]

destructor mandatory because copy constructor is.

Author:
Jan Woetzel 08/2005

Definition at line 13 of file VideoStream.cpp.

VideoStream::VideoStream ( )

Definition at line 16 of file VideoStream.cpp.

References ImageSize_, and NumImages_.

VideoStream::VideoStream ( const std::string & file )

Definition at line 22 of file VideoStream.cpp.

References ImageSize_, NumImages_, and Open().

VideoStream::VideoStream ( const VideoStream & src )

copy constructor mandatory because of ifstrseam member

Author:
Jan Woetzel 08/2005

Definition at line 30 of file VideoStream.cpp.

Member Function Documentation

int VideoStream::Close ( )

Definition at line 80 of file VideoStream.cpp.

References Ifs_.

int VideoStream::Open ( const std::string & file )

Definition at line 53 of file VideoStream.cpp.

References BIASERR, FileSize_, Header_, Ifs_, ImageSize_, and NumImages_.

Referenced by main(), and VideoStream().

BIAS::VideoStream & VideoStream::operator= ( const BIAS::VideoStream & src )

assignment operator is mandatory because copy constructor is.

Author:
Jan Woetzel 08/2005

Definition at line 35 of file VideoStream.cpp.

References BIASERR, FileSize_, Header_, ImageSize_, and NumImages_.

void VideoStream::PrintHeader ( )

Definition at line 128 of file VideoStream.cpp.

References FileSize_, ImageSize_, and NumImages_.

Referenced by main().

int VideoStream::SplitIntoFiles | ( | const std::string & | prefix,
 |  | unsigned int | start = 0,
 |  | unsigned int | count = 0
 | ) |

Definition at line 87 of file VideoStream.cpp.

References BIASERR, BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetUID(), Ifs_, ImageSize_, img, BIAS::Image< StorageType >::Init(), NumImages_, BIAS::ImageBase::SetUID(), and BIAS::ImageIO::Write().

Referenced by main().

Member Data Documentation

unsigned long int BIAS::VideoStream::FileSize_ [protected]

Definition at line 100 of file VideoStream.hh.

Referenced by Open(), operator=(), and PrintHeader().

VSHeader BIAS::VideoStream::Header_ [protected]

Definition at line 95 of file VideoStream.hh.

Referenced by Open(), and operator=().

std::ifstream BIAS::VideoStream::Ifs_ [protected]

Definition at line 96 of file VideoStream.hh.

Referenced by Close(), Open(), and SplitIntoFiles().

unsigned int BIAS::VideoStream::ImageSize_ [protected]

Definition at line 98 of file VideoStream.hh.

Referenced by Open(), operator=(), PrintHeader(), SplitIntoFiles(), and VideoStream().

unsigned int BIAS::VideoStream::NumImages_ [protected]

Definition at line 99 of file VideoStream.hh.

Referenced by Open(), operator=(), PrintHeader(), SplitIntoFiles(), and VideoStream().

The documentation for this class was generated from the following files:
  • Image/VideoStream.hh
  • Image/VideoStream.cpp
Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoStream::VSHeader Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoStream::VSHeader

BIAS::VideoStream::VSHeader Class Reference

#include <Image/VideoStream.hh>

List of all members.

Public Attributes

unsigned int | AlignedSize
unsigned char | BytesPerPixel
unsigned char | ChannelCount
ImageBase::EColorModel ColorModel
unsigned int | Height
unsigned char | Padding [488]
ImageBase::EStorageType StorageType
unsigned int | Width

Detailed Description

Definition at line 40 of file VideoStream.hh.

Member Data Documentation

unsigned int BIAS::VideoStream::VSHeader::AlignedSize

Definition at line 48 of file VideoStream.hh.

unsigned char BIAS::VideoStream::VSHeader::BytesPerPixel

Definition at line 43 of file VideoStream.hh.

unsigned char BIAS::VideoStream::VSHeader::ChannelCount

Definition at line 43 of file VideoStream.hh.

ImageBase::EColorModel BIAS::VideoStream::VSHeader::ColorModel

Definition at line 45 of file VideoStream.hh.

unsigned int BIAS::VideoStream::VSHeader::Height

Definition at line 42 of file VideoStream.hh.

unsigned char BIAS::VideoStream::VSHeader::Padding[488]

Definition at line 52 of file VideoStream.hh.

ImageBase::EStorageType BIAS::VideoStream::VSHeader::StorageType

Definition at line 44 of file VideoStream.hh.

unsigned int BIAS::VideoStream::VSHeader::Width

Definition at line 42 of file VideoStream.hh.

The documentation for this class was generated from the following file:
  • Image/VideoStream.hh
Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::VideoStream::VSImageHeader Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::VideoStream::VSImageHeader

BIAS::VideoStream::VSImageHeader Class Reference

#include <Image/VideoStream.hh>

List of all members.

Public Attributes

long int | tsec
long int | tusec
char | uuid [40]

Detailed Description

Definition at line 55 of file VideoStream.hh.

Member Data Documentation

long int BIAS::VideoStream::VSImageHeader::tsec

Definition at line 57 of file VideoStream.hh.

Referenced by BIAS::VideoSource::WriteDirect_().

long int BIAS::VideoStream::VSImageHeader::tusec

Definition at line 57 of file VideoStream.hh.

Referenced by BIAS::VideoSource::WriteDirect_().

char BIAS::VideoStream::VSImageHeader::uuid[40]

Definition at line 60 of file VideoStream.hh.

Referenced by BIAS::VideoSource::WriteDirect_().

The documentation for this class was generated from the following file:
  • Image/VideoStream.hh
Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideSource_DiskPMD Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

VideSource_DiskPMD Class Reference

reads PMD-tiffs with depth images and modulation coefficients More...

#include <VideoSource/VideoSource_DiskPMD.hh>

Detailed Description

reads PMD-tiffs with depth images and modulation coefficients

Author:
streckel 05/2006

The documentation for this class was generated from the following file:
  • VideoSource/VideoSource_DiskPMD.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideSource_Stereo Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

VideSource_Stereo Class Reference

bundles two video sources for stereo More...

#include <VideoSource/VideoSource_Stereo.hh>

Detailed Description

bundles two video sources for stereo

Author:
woelk 04/2006

Definition at line 9 of file VideoSource_Stereo.hh.

The documentation for this class was generated from the following file:
  • VideoSource/VideoSource_Stereo.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::WeightedSigmaPoint Struct Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::WeightedSigmaPoint

BIAS::WeightedSigmaPoint Struct Reference

#include <MathAlgo/UnscentedTransform.hh>

Collaboration diagram for BIAS::WeightedSigmaPoint:

[legend]
List of all members.

Public Attributes

Vector< double > | point
double | weight_cov
double | weight_mean

Detailed Description

Definition at line 46 of file UnscentedTransform.hh.

Member Data Documentation

Vector<double> BIAS::WeightedSigmaPoint::point

Definition at line 48 of file UnscentedTransform.hh.

double BIAS::WeightedSigmaPoint::weight_cov

Definition at line 50 of file UnscentedTransform.hh.

double BIAS::WeightedSigmaPoint::weight_mean

Definition at line 49 of file UnscentedTransform.hh.

The documentation for this struct was generated from the following file:
  • MathAlgo/UnscentedTransform.hh
Generated on Wed Jun 21 19:13:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::WrapBias2Ipl Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::WrapBias2Ipl

BIAS::WrapBias2Ipl Class Reference

wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area. More...

#include <Base/Image/WrapBias2Ipl.hh>

Collaboration diagram for BIAS::WrapBias2Ipl:

[legend]
List of all members.

Public Member Functions

int | Bind (BIAS::ImageBase *p_src)
create the internal IPL image which shares the data area with the src Bias image.
bool | Consistent () const
int | Display (const std::string &DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const
Display img as simple popup HighGUI window.
int | Display (const char *DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const
int | Display (const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const
Display img as simple popup window.
WrapBias2Ipl (BIAS::ImageBase *PtrImgBias)
WrapBias2Ipl ()
~WrapBias2Ipl ()

Static Public Member Functions

static void | ConvertIPL32to8 (const IplImage *src32, IplImage *dest8, const float &scale=DEFAULT_32to8_scale)
32 bit float to displayable 8 bit conversion Both images should be pre-initilaized to equal size and correct storage type.
static int | CreateBiasImageShared (const IplImage *&p_src, BIAS::ImageBase *p_dest)
helper function to create a BIAS image from a master Ipl image BIAS image is slave of Ipl image.
static int | CreateIplImageShared (const BIAS::ImageBase *p_src, IplImage *&p_dest)
helper function to create a slave ipl image which shares the data area with the master ref.
static void | DestroyAllWindows ()
wrapper for CV destroiing all HighGUI windows JW
static void | DestroyWindow (const std::string &name)
static void | DestroyWindow (const char *name)
static int | Display (const IplImage *img, const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale)
Display img as simple popup window.
static void | MoveWindow (const std::string &name, const int newX, const int newY)
static void | MoveWindow (const char *name, const int newX, const int newY)
static void | ResizeWindow (const std::string &name, const unsigned int width, const unsigned int height)
static void | ResizeWindow (const char *name, const unsigned int width, const unsigned int height)
static int | WaitKey (const unsigned int &delay=0)
wrapper for cvWaitKey JW

Public Attributes

BIAS::ImageBase * p_imgBias
IplImage * p_imgIpl
bool | p_imgIplDestroyable

Detailed Description

wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area.

Author:
Jan Woetzel 07/2005
Examples:

ExampleIplWrapOpenCV.cpp.

Definition at line 25 of file WrapBias2Ipl.hh.

Constructor & Destructor Documentation

WrapBias2Ipl::~WrapBias2Ipl ( )

Definition at line 20 of file WrapBias2Ipl.cpp.

References p_imgIpl.

WrapBias2Ipl::WrapBias2Ipl ( )

Definition at line 32 of file WrapBias2Ipl.cpp.

WrapBias2Ipl::WrapBias2Ipl ( BIAS::ImageBase * PtrImgBias )

Definition at line 42 of file WrapBias2Ipl.cpp.

References BIASERR, Bind(), and p_imgIplDestroyable.

Member Function Documentation

int WrapBias2Ipl::Bind ( BIAS::ImageBase * p_src )

create the internal IPL image which shares the data area with the src Bias image.

And save the pointer to this source BIAS img.

Returns:
0 for succes, other=error
Author:
Jan Woetzel 07/2005

Definition at line 61 of file WrapBias2Ipl.cpp.

References CreateIplImageShared(), and p_imgBias.

Referenced by WrapBias2Ipl().

bool WrapBias2Ipl::Consistent ( ) const

Returns:
false if the wrapped images are inconsistent JW

Definition at line 296 of file WrapBias2Ipl.cpp.

References BIASERR, BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetWidth(), p_imgBias, and p_imgIpl.

void WrapBias2Ipl::ConvertIPL32to8 | ( | const IplImage * | src32,
 |  | IplImage * | dest8,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [static]

32 bit float to displayable 8 bit conversion Both images should be pre-initilaized to equal size and correct storage type.

Parameters:
scale mapping function, e.g. 255 for 0..1 --> 0..255
Author:
Jan Woetzel

Definition at line 360 of file WrapBias2Ipl.cpp.

References BIASASSERT, max, and min.

Referenced by Display().

int WrapBias2Ipl::CreateBiasImageShared | ( | const IplImage *& | p_src,
 |  | BIAS::ImageBase * | p_dest
 | ) | [static]

helper function to create a BIAS image from a master Ipl image BIAS image is slave of Ipl image.

JW

Definition at line 181 of file WrapBias2Ipl.cpp.

References BIASASSERT, BIASERR, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_BGRA, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::GetImageData(), BIAS::ImageBase::ImageData_, BIAS::ImageBase::IsInterleaved(), BIAS::ImageBase::ReleaseImageDataPointer(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedshortint, BIAS::ImageBase::StorageType_, and BIAS::ImageBase::UpdateImageDataArrayFromImageData_().

int WrapBias2Ipl::CreateIplImageShared | ( | const BIAS::ImageBase * | p_src,
 |  | IplImage *& | p_dest
 | ) | [static]

helper function to create a slave ipl image which shares the data area with the master ref.

BIAS image Ipl image is slave of BIAS image.

Returns:
0 for succes, other=error
Author:
Jan Woetzel 07/2005

Definition at line 69 of file WrapBias2Ipl.cpp.

References BIASASSERT, BIASBREAK, BIASERR, BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::IsInterleaved().

Referenced by Bind().

void WrapBias2Ipl::DestroyAllWindows ( ) [static]

wrapper for CV destroiing all HighGUI windows JW

Definition at line 497 of file WrapBias2Ipl.cpp.

void WrapBias2Ipl::DestroyWindow ( const std::string & name ) [static]

Definition at line 507 of file WrapBias2Ipl.cpp.

References DestroyWindow().

void WrapBias2Ipl::DestroyWindow ( const char * name ) [static]

Definition at line 502 of file WrapBias2Ipl.cpp.

Referenced by DestroyWindow().

int WrapBias2Ipl::Display | ( | const std::string & | DestWin,
 |  | const bool & | autoresize = true,
 |  | const bool & | moveToTopLeft = true,
 |  | const bool & | waitForKey = false,
 |  | const unsigned int & | delayMsec = 0,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | const

Display img as simple popup HighGUI window.

Parameters:
actually scale is used only for float to 8 Byte range conversion
Returns:
pressed key (if any)
Author:
Jan Woetzel 2005

Definition at line 347 of file WrapBias2Ipl.cpp.

References Display().

int WrapBias2Ipl::Display | ( | const char * | DestWin,
 |  | const bool & | autoresize = true,
 |  | const bool & | moveToTopLeft = true,
 |  | const bool & | waitForKey = false,
 |  | const unsigned int & | delayMsec = 0,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | const

Definition at line 327 of file WrapBias2Ipl.cpp.

References Display().

int WrapBias2Ipl::Display | ( | const bool & | waitForKey = false,
 |  | const unsigned int & | delayMsec = 0,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | const

Display img as simple popup window.

If you experience color channel Seq. problems, use highgui with by RGB/BGR fix(jw)

Parameters:
delayMsec,:
Returns:
pressed key (if any)
Author:
JW

Definition at line 320 of file WrapBias2Ipl.cpp.

References DEFAULT_WrapBias2Ipl_WINNAME, and Display().

int WrapBias2Ipl::Display | ( | const IplImage * | img,
 |  | const std::string & | DestWin,
 |  | const bool & | autoresize,
 |  | const bool & | moveToTopLeft,
 |  | const bool & | waitForKey,
 |  | const unsigned int & | delayMsec,
 |  | const float & | scale = DEFAULT_32to8_scale
 | ) | [static]

Display img as simple popup window.

Parameters:
waitForKey | if true delaMsec is waited for keypres. 0=forever.
delayMsec | if waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns:
pressed key (if any)
Author:
JW 2005 TODO: move this function to BIAS/Gui as GuiCV with static functions. (jw)
Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 397 of file WrapBias2Ipl.cpp.

References BIASERR, and ConvertIPL32to8().

Referenced by Display(), BIAS::ImageBase::Display(), and main().

void WrapBias2Ipl::MoveWindow | ( | const std::string & | name,
 |  | const int | newX,
 |  | const int | newY
 | ) | [static]

Definition at line 533 of file WrapBias2Ipl.cpp.

References MoveWindow().

void WrapBias2Ipl::MoveWindow | ( | const char * | name,
 |  | const int | newX,
 |  | const int | newY
 | ) | [static]

Definition at line 528 of file WrapBias2Ipl.cpp.

Referenced by MoveWindow().

void WrapBias2Ipl::ResizeWindow | ( | const std::string & | name,
 |  | const unsigned int | width,
 |  | const unsigned int | height
 | ) | [static]

Definition at line 520 of file WrapBias2Ipl.cpp.

References ResizeWindow().

void WrapBias2Ipl::ResizeWindow | ( | const char * | name,
 |  | const unsigned int | width,
 |  | const unsigned int | height
 | ) | [static]

Definition at line 513 of file WrapBias2Ipl.cpp.

Referenced by ResizeWindow().

int WrapBias2Ipl::WaitKey ( const unsigned int & delay = 0 ) [static]

wrapper for cvWaitKey JW

Returns:
pressed key (if any) JW 2005

Definition at line 315 of file WrapBias2Ipl.cpp.

Member Data Documentation

BIAS::ImageBase* BIAS::WrapBias2Ipl::p_imgBias

Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 134 of file WrapBias2Ipl.hh.

Referenced by Bind(), Consistent(), and main().

IplImage* BIAS::WrapBias2Ipl::p_imgIpl

Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 137 of file WrapBias2Ipl.hh.

Referenced by BIAS::ImageDraw< StorageType >::Circle(), Consistent(), BIAS::ImageDraw< StorageType >::Ellipse(), BIAS::ImageDraw< StorageType >::Line(), main(), BIAS::ImageDraw< StorageType >::Rectangle(), BIAS::ImageDraw< StorageType >::Text(), and ~WrapBias2Ipl().

bool BIAS::WrapBias2Ipl::p_imgIplDestroyable

Definition at line 138 of file WrapBias2Ipl.hh.

Referenced by WrapBias2Ipl().

The documentation for this class was generated from the following files:
  • Base/Image/WrapBias2Ipl.hh
  • Base/Image/WrapBias2Ipl.cpp
Generated on Wed Jun 21 19:13:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::WxMainThread Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::WxMainThread

BIAS::WxMainThread Class Reference

To use threads in wxWindows we must create our own class, which is derived from wxThread. More...

#include <Gui/GuiWX.hh>

Collaboration diagram for BIAS::WxMainThread:

[legend]
List of all members.

Public Member Functions

virtual void * | Entry ()
Each from wxThread derived class needs the method Entry() which is called when a thread is run.
virtual void | OnExit ()
Just like Entry, every wxThread needs the method OnExit() which is called when a thread terminates or is terminated.
WxMainThread (GuiWX *gui)
default constructor
WxMainThread ()
default constructor
~WxMainThread ()
default destructor

Protected Attributes

GuiWX * MyGui_

Detailed Description

To use threads in wxWindows we must create our own class, which is derived from wxThread.

In this case this is our main thread class in which the main loop will be run

Definition at line 67 of file GuiWX.hh.

Constructor & Destructor Documentation

WxMainThread::WxMainThread ( )

default constructor

Definition at line 56 of file GuiWX.cpp.

WxMainThread::~WxMainThread ( )

default destructor

Definition at line 67 of file GuiWX.cpp.

WxMainThread::WxMainThread ( GuiWX * gui )

default constructor

Definition at line 60 of file GuiWX.cpp.

References MyGui_.

Member Function Documentation

void * WxMainThread::Entry ( ) [virtual]

Each from wxThread derived class needs the method Entry() which is called when a thread is run.

Definition at line 75 of file GuiWX.cpp.

References BIAS::GuiWX::AppApp_, and MyGui_.

void WxMainThread::OnExit ( ) [virtual]

Just like Entry, every wxThread needs the method OnExit() which is called when a thread terminates or is terminated.

It won't be executed, when a thread is killed.

Definition at line 92 of file GuiWX.cpp.

References BIAS::GuiWX::MainThreadRunning_, and MyGui_.

Member Data Documentation

GuiWX* BIAS::WxMainThread::MyGui_ [protected]

Definition at line 78 of file GuiWX.hh.

Referenced by Entry(), OnExit(), and WxMainThread().

The documentation for this class was generated from the following files:
  • Gui/GuiWX.hh
  • Gui/GuiWX.cpp
Generated on Wed Jun 21 19:13:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: wxScrolledWindow Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

wxScrolledWindow Class Reference

#include <Gui/_wx_intellisense.h>

Inheritance diagram for wxScrolledWindow:

[legend]

Detailed Description

Definition at line 142 of file _wx_intellisense.h.

The documentation for this class was generated from the following file:
  • Gui/_wx_intellisense.h
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::WxToAsciiArray Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::WxToAsciiArray

BIAS::WxToAsciiArray Class Reference

Class for converting an array of wxStrings to an array of non-const ASCII strings. More...

#include <Gui/StringConv.hh>

List of all members.

Public Member Functions

operator char ** ()
WxToAsciiArray (wxChar **strings, int size)
~WxToAsciiArray ()

Private Attributes

char ** | _AsciiStrings
int | _Size

Detailed Description

Class for converting an array of wxStrings to an array of non-const ASCII strings.

Required for using getopt in UNICODE wx tools.

Definition at line 35 of file StringConv.hh.

Constructor & Destructor Documentation

BIAS::WxToAsciiArray::WxToAsciiArray | ( | wxChar ** | strings,
 |  | int | size
 | ) | [inline]

Definition at line 38 of file StringConv.hh.

References WxToAscii.

BIAS::WxToAsciiArray::~WxToAsciiArray ( ) [inline]

Definition at line 48 of file StringConv.hh.

Member Function Documentation

BIAS::WxToAsciiArray::operator char ** ( ) [inline]

Definition at line 57 of file StringConv.hh.

Member Data Documentation

char** BIAS::WxToAsciiArray::_AsciiStrings [private]

Definition at line 63 of file StringConv.hh.

int BIAS::WxToAsciiArray::_Size [private]

Definition at line 64 of file StringConv.hh.

The documentation for this class was generated from the following file:
  • Gui/StringConv.hh
Generated on Wed Jun 21 19:13:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: wxTopLevelWindow Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

wxTopLevelWindow Class Reference

#include <Gui/_wx_intellisense.h>

Detailed Description

Definition at line 75 of file _wx_intellisense.h.

The documentation for this class was generated from the following file:
  • Gui/_wx_intellisense.h
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: wxTopLevelWindowNative Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

wxTopLevelWindowNative Class Reference

#include <Gui/_wx_intellisense.h>

Detailed Description

Definition at line 74 of file _wx_intellisense.h.

The documentation for this class was generated from the following file:
  • Gui/_wx_intellisense.h
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: wxWindow Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

wxWindow Class Reference

#include <Gui/_wx_intellisense.h>

Detailed Description

Definition at line 17 of file _wx_intellisense.h.

The documentation for this class was generated from the following file:
  • Gui/_wx_intellisense.h
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::XMLBase Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::XMLBase

BIAS::XMLBase Class Reference
[Utilities]

Base class with interface for xml output. More...

#include <Base/Common/XMLBase.hh>

Inheritance diagram for BIAS::XMLBase:

[legend]
List of all members.

Public Member Functions

int | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
call this to add the class to a node of a given xml tree
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const =0
derived classes must implement this, so that it returns the name of the class for the top level tag in the XML file
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)=0
derived classes must implement this to read everything in Node into (*this).
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const =0
derived classes must implement this to write the code of (*this) into the XML tree
int | XMLRead (const std::string &Filename)
derived classes must implement this to read everything in the file with name Filename into (*this).
int | XMLReadFromString (const std::string &str)
reconstruvt xml tree from string
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const
call this to add the class to a new xml tree and write it to the file Filename
int | XMLWriteToString (std::string &str) const
serialize xml tree to string
virtual | ~XMLBase ()

Detailed Description

Base class with interface for xml output.

All classes with xml i/o support should be derived from this class. You can then call XMLWrite to write the object to an XML file or XMLAdd(n) to attach the object to a node n of a given xml structure. For this to work you must:

  • Override XMLGetTopLevelName such that it returns something identifying the class, e.g. "FeaturePoint". XMLAdd and XMLWrite use this function to generate the toplevel node of you object.
  • Override XMLFill, such that it fills the XML code of (*this) into a tree, where the top level node is already created Given a valid xml file, you can call XMLRead to read the xml file into the current object, this calls your specialization of XMLReadObject

This class is empty if no XML2 support is available.

Author:
koeser 08/2004

Definition at line 63 of file XMLBase.hh.

Constructor & Destructor Documentation

virtual BIAS::XMLBase::~XMLBase ( ) [inline, virtual]

Definition at line 66 of file XMLBase.hh.

Member Function Documentation

int XMLBase::XMLAdd | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const

call this to add the class to a node of a given xml tree

Definition at line 32 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), Version, XMLGetClassName(), and XMLOut().

virtual int BIAS::XMLBase::XMLGetClassName | ( | std::string & | TopLevelTag,
 |  | double & | Version
 | ) | const [pure virtual]

derived classes must implement this, so that it returns the name of the class for the top level tag in the XML file

Implemented in BIAS::PMatrix, BIAS::Projection, BIAS::ProjectionParametersBase, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by XMLAdd(), XMLRead(), XMLReadFromString(), and XMLWrite().

virtual int BIAS::XMLBase::XMLIn | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | [pure virtual]

derived classes must implement this to read everything in Node into (*this).

Returns:
0 on success, <0 on error

Implemented in myTestClass, BIAS::PMatrix, BIAS::Projection, BIAS::ProjectionParametersBase, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by XMLRead(), and XMLReadFromString().

virtual int BIAS::XMLBase::XMLOut | ( | const xmlNodePtr | Node,
 |  | XMLIO & | XMLObject
 | ) | const [pure virtual]

derived classes must implement this to write the code of (*this) into the XML tree

Parameters:
node always points to a node with a name given by the function XMLGetTopLevelName

Implemented in myTestClass, BIAS::PMatrix, BIAS::Projection, BIAS::ProjectionParametersBase, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersZoom.

Referenced by XMLAdd(), and XMLWrite().

int XMLBase::XMLRead ( const std::string & Filename )

derived classes must implement this to read everything in the file with name Filename into (*this).

Returns:
0 on success, <0 on error

Definition at line 76 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::read(), XMLGetClassName(), and XMLIn().

Referenced by main(), and BiasShowEpiApp::OnInit().

int XMLBase::XMLReadFromString ( const std::string & str )

reconstruvt xml tree from string

Author:
evers

Definition at line 98 of file XMLBase.cpp.

References BIASERR, BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), BIAS::XMLIO::ReadFromString(), XMLGetClassName(), and XMLIn().

int XMLBase::XMLWrite | ( | const std::string & | Filename,
 |  | int | CompressionLevel = 0,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const

call this to add the class to a new xml tree and write it to the file Filename

Parameters:
CompressionLevel 0..9 (0=off, 9=highest compression)

Definition at line 43 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), Version, BIAS::XMLIO::write(), XMLGetClassName(), and XMLOut().

Referenced by main(), and PtoPPP().

int BIAS::XMLBase::XMLWriteToString ( std::string & str ) const

serialize xml tree to string

Author:
evers

The documentation for this class was generated from the following files:
  • Base/Common/XMLBase.hh
  • Base/Common/XMLBase.cpp
Generated on Wed Jun 21 19:13:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::XMLIO Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::XMLIO

BIAS::XMLIO Class Reference
[Utilities]

Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'. More...

#include <Base/Common/XMLIO.hh>

Inheritance diagram for BIAS::XMLIO:

[legend]
Collaboration diagram for BIAS::XMLIO:

[legend]
List of all members.

Public Member Functions

void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, const BIAS::Vector< int > &AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, const BIAS::Vector< double > &AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, double AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, int AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, const char *AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, const std::string &AttributeValue)
Add an attribute to a node.
void | addAttribute (const xmlNodePtr Node, const std::string &AttributeName, bool AttributeValue)
Add an attribute to a node.
xmlNodePtr | addChildNode (const xmlNodePtr ParentNode, const std::string &NewNodeName)
Add a child node to an incoming node with the given name.
void | addComment (const xmlNodePtr Node, const std::string &Comment)
Add comment to a node.
void | addContent (const xmlNodePtr Node, const double Content)
void | addContent (const xmlNodePtr Node, const int Content)
void | addContent (const xmlNodePtr Node, const std::string &Content)
Add content to a node.
void | AddDebugLevel (long int lv)
void clear ()
xmlNodePtr | create (const std::string &RootNodeName)
Create the base of a new XML-Tree in memory, already with a one and only root node.
bool | DebugLevelIsSet (long int lv) const
xmlAttrPtr | getAttributeByName (const xmlNodePtr Node, const std::string &attribute_name)
search for a specific attribute
std::string | getAttributeName (const xmlAttrPtr Attribute) const
Get the name of a given Attribute.
void | GetAttributes (const xmlNodePtr Node, std::vector< xmlAttrPtr > &attributes)
accesor functions for recursive usage
bool | getAttributeValueBool (const xmlNodePtr Node, const std::string &AttributeName) const
Get the value of an Attribute stecified by the attributes name, with type-cast overloads for different attribute types.
bool | getAttributeValueBool (const xmlAttrPtr Attribute) const
Get the value of a given Attribute, with type-cast overloads for different attribute types.
double | getAttributeValueDouble (const xmlNodePtr Node, const std::string &AttributeName) const
double | getAttributeValueDouble (const xmlAttrPtr Attribute) const
int | getAttributeValueInt (const xmlNodePtr Node, const std::string &AttributeName) const
int | getAttributeValueInt (const xmlAttrPtr Attribute) const
std::string | getAttributeValueString (const xmlNodePtr Node, const std::string &AttributeName) const
std::string | getAttributeValueString (const xmlAttrPtr Attribute) const
BIAS::Vector< double > | getAttributeValueVecDbl (const xmlNodePtr Node, const std::string &AttributeName) const
BIAS::Vector< double > | getAttributeValueVecDbl (const xmlAttrPtr Attribute) const
BIAS::Vector< int > | getAttributeValueVecInt (const xmlNodePtr Node, const std::string &AttributeName) const
BIAS::Vector< int > | getAttributeValueVecInt (const xmlAttrPtr Attribute) const
xmlNodePtr | getChild (const xmlNodePtr ParentNode, const std::string &ChildName)
Get a child of a Parent node by specifying the childs name, NULL is returned if the ParentNode has no child of the given name.
void | GetChildren (const xmlNodePtr ParentNode, std::vector< xmlNodePtr > &children)
accesor functions for recursive usage
int | GetDebugLevel () const
void | GetDebugStream (std::ostream &os) const
std::ostream & | GetDebugStream ()
xmlAttrPtr | getFirstAttribute (const xmlNodePtr Node)
Get the first attribute of a given parent, or NULL for no attributes.
xmlNodePtr | getFirstChild (const xmlNodePtr ParentNode)
Get the first child of a given parent, or NULL for no childs.
xmlAttrPtr getNextAttribute ()
Get the next attribute of the parent specified in the last getFirstAttribute() call, the class remembers the last returned attribute.
xmlNodePtr | getNextChild (const xmlNodePtr SiblingNode)
Get the next sibling of the given node.
xmlNodePtr getNextChild ()
Get the next child of the parent specified in the last getFirstChild() call, the class remembers the last returned child.
double | getNodeContentDouble (const xmlNodePtr Node) const
int | getNodeContentInt (const xmlNodePtr Node) const
std::string | getNodeContentString (const xmlNodePtr Node) const
Get the content of a given Node.
std::string | getNodeName (const xmlNodePtr Node) const
Get the name of a given Node.
void | PrintDebugLevel (std::ostream &os=std::cout) const
xmlNodePtr | read (const std::string &Filename)
Read and parse an XML-File from disk, DtD-Validation is not yet implemented.
xmlNodePtr | ReadFromString (const std::string &str)
construct tree from string
void | RemoveDebugLevel (long int lv)
int | SetCompression (int level=9)
set level of compression, needs zlib
void | setContent (const xmlNodePtr Node, const double Content)
void | setContent (const xmlNodePtr Node, const int Content)
void | setContent (const xmlNodePtr Node, const std::string &Content)
Set content of a node.
void | SetDebugLevel (long int lv)
void | SetDebugStream (std::ostream &os)
int | write (const std::string &Filename, bool AutoAddCompressionSuffix=true) const
Write the whole tree that was constructed in memory to disk.
int | WriteToString (std::string &str)
serialize tree to string
XMLIO ()
~XMLIO ()

Static Public Member Functions

static long int | GetGlobalDebugLevel ()
static void | SetGlobalDebugLevel (long int lev)

Protected Attributes

long int | _liDebugLevel
xmlAttrPtr CurrAttr_
xmlNodePtr CurrNode_
bool | isInitialized_
xmlNodePtr RootNode_
xmlDocPtr xmlDoc_

Static Protected Attributes

static std::ostream | _zDebugStream
static long int | GlobalDebugLevel = 0

Detailed Description

Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'.

Todo:
CMake TRYCOMPILE() for XML2 version under WIN32 (evers 2004-10-14)

Definition at line 83 of file XMLIO.hh.

Constructor & Destructor Documentation

XMLIO::XMLIO ( )

Definition at line 46 of file XMLIO.cpp.

References CurrNode_, isInitialized_, and RootNode_.

XMLIO::~XMLIO ( )

Definition at line 56 of file XMLIO.cpp.

References isInitialized_, and xmlDoc_.

Member Function Documentation

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | const BIAS::Vector< int > & | AttributeValue
 | ) |

Add an attribute to a node.

Author:
apetersen 07/2005

Definition at line 191 of file XMLIO.cpp.

References addAttribute(), and TNT::Vector< T >::size().

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | const BIAS::Vector< double > & | AttributeValue
 | ) |

Add an attribute to a node.

Author:
apetersen 07/2005

Definition at line 177 of file XMLIO.cpp.

References addAttribute(), and TNT::Vector< T >::size().

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | double | AttributeValue
 | ) |

Add an attribute to a node.

Author:
streckel 05/2004

Definition at line 167 of file XMLIO.cpp.

References addAttribute().

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | int | AttributeValue
 | ) |

Add an attribute to a node.

Author:
streckel 05/2004

Definition at line 158 of file XMLIO.cpp.

References addAttribute().

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | const char * | AttributeValue
 | ) |

Add an attribute to a node.

Definition at line 230 of file XMLIO.cpp.

References addAttribute().

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | const std::string & | AttributeValue
 | ) |

Add an attribute to a node.

Author:
streckel 05/2004

Definition at line 205 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void XMLIO::addAttribute | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName,
 |  | bool | AttributeValue
 | ) |

Add an attribute to a node.

Author:
apetersen 07/2005

Definition at line 145 of file XMLIO.cpp.

Referenced by addAttribute(), BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::CameraParam::AddCameraDataToRig(), BIAS::ProjectionParametersIO::AddCameraDataToRig(), BIAS::CameraParam::AddCameraDataToXMLTree(), main(), BIAS::CameraParam::WriteCameraData(), BIAS::ProjectionParametersIO::WriteCameraData(), BIAS::RigParameter::WriteRigData(), BIAS::ProjectionParametersIO::WriteRigData(), BIAS::XMLBase::XMLAdd(), BIAS::ProjectionParametersZoom::XMLOut(), BIAS::ProjectionParametersSpherical::XMLOut(), BIAS::ProjectionParametersPerspective::XMLOut(), BIAS::ProjectionParametersBase::XMLOut(), BIAS::PMatrix::XMLOut(), myTestClass::XMLOut(), and BIAS::XMLBase::XMLWrite().

xmlNodePtr XMLIO::addChildNode | ( | const xmlNodePtr | ParentNode,
 |  | const std::string & | NewNodeName
 | ) |

Add a child node to an incoming node with the given name.

Author:
streckel 05/2004

Definition at line 120 of file XMLIO.cpp.

References BIASERR, CurrNode_, and isInitialized_.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::CameraParam::AddCameraDataToRig(), BIAS::ProjectionParametersIO::AddCameraDataToRig(), BIAS::CameraParam::AddCameraDataToXMLTree(), main(), BIAS::RigParameter::WriteRigData(), BIAS::ProjectionParametersIO::WriteRigData(), BIAS::XMLBase::XMLAdd(), BIAS::ProjectionParametersZoom::XMLOut(), BIAS::ProjectionParametersSpherical::XMLOut(), BIAS::ProjectionParametersProjective::XMLOut(), BIAS::ProjectionParametersPerspective::XMLOut(), BIAS::ProjectionParametersBase::XMLOut(), BIAS::Projection::XMLOut(), and BIAS::PMatrix::XMLOut().

void XMLIO::addComment | ( | const xmlNodePtr | Node,
 |  | const std::string & | Comment
 | ) |

Add comment to a node.

Author:
streckel 05/2004

Definition at line 277 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

Referenced by BIAS::ProjectionParametersIO::AddCameraDataToNode(), BIAS::CameraParam::AddCameraDataToXMLTree(), BIAS::RigParameter::WriteRigData(), and BIAS::ProjectionParametersIO::WriteRigData().

void XMLIO::addContent | ( | const xmlNodePtr | Node,
 |  | const double | Content
 | ) |

Definition at line 250 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void XMLIO::addContent | ( | const xmlNodePtr | Node,
 |  | const int | Content
 | ) |

Definition at line 264 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void XMLIO::addContent | ( | const xmlNodePtr | Node,
 |  | const std::string & | Content
 | ) |

Add content to a node.

Author:
streckel 05/2004

Definition at line 239 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

Referenced by main(), BIAS::RigParameter::WriteRigData(), BIAS::ProjectionParametersIO::WriteRigData(), BIAS::ProjectionParametersProjective::XMLOut(), BIAS::ProjectionParametersBase::XMLOut(), BIAS::Projection::XMLOut(), and BIAS::PMatrix::XMLOut().

void BIAS::Debug::AddDebugLevel ( long int lv ) [inline, inherited]

Definition at line 249 of file Debug.hh.

Referenced by BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), and main().

void XMLIO::clear ( )

Definition at line 66 of file XMLIO.cpp.

References CurrNode_, isInitialized_, RootNode_, and xmlDoc_.

Referenced by main(), BIAS::XMLBase::XMLRead(), BIAS::XMLBase::XMLReadFromString(), and BIAS::XMLBase::XMLWrite().

xmlNodePtr XMLIO::create ( const std::string & RootNodeName )

Create the base of a new XML-Tree in memory, already with a one and only root node.

Author:
streckel 05/2004

Definition at line 79 of file XMLIO.cpp.

References BIASERR, CurrNode_, isInitialized_, RootNode_, and xmlDoc_.

Referenced by main(), BIAS::CameraParam::WriteCameraData(), BIAS::ProjectionParametersIO::WriteCameraData(), BIAS::RigParameter::WriteRigData(), BIAS::ProjectionParametersIO::WriteRigData(), and BIAS::XMLBase::XMLWrite().

bool BIAS::Debug::DebugLevelIsSet ( long int lv ) const [inline, inherited]

Definition at line 240 of file Debug.hh.

Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), and main().

xmlAttrPtr XMLIO::getAttributeByName | ( | const xmlNodePtr | Node,
 |  | const std::string & | attribute_name
 | ) |

search for a specific attribute

Returns:
NULL if not found
Author:
woelk 02/2006

Definition at line 506 of file XMLIO.cpp.

References getAttributeName(), getFirstAttribute(), and getNextAttribute().

std::string XMLIO::getAttributeName ( const xmlAttrPtr Attribute ) const

Get the name of a given Attribute.

Author:
streckel 05/2004

Definition at line 544 of file XMLIO.cpp.

Referenced by getAttributeByName(), and main().

void XMLIO::GetAttributes | ( | const xmlNodePtr | Node,
 |  | std::vector< xmlAttrPtr > & | attributes
 | ) |

accesor functions for recursive usage

Author:
woelk 02/2006

Definition at line 533 of file XMLIO.cpp.

References getFirstAttribute(), and getNextAttribute().

bool XMLIO::getAttributeValueBool | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Get the value of an Attribute stecified by the attributes name, with type-cast overloads for different attribute types.

Use getAttributeValueString() for unknown attribute types.

Author:
streckel 05/2004 & apetersen 07/2005

Definition at line 648 of file XMLIO.cpp.

References BIASERR.

bool XMLIO::getAttributeValueBool ( const xmlAttrPtr Attribute ) const

Get the value of a given Attribute, with type-cast overloads for different attribute types.

Use getAttributeValueString() for unknown attribute types.

Author:
streckel 05/2004 & apetersen 07/2005

Definition at line 555 of file XMLIO.cpp.

References BIASERR, and getAttributeValueString().

double XMLIO::getAttributeValueDouble | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Definition at line 680 of file XMLIO.cpp.

double XMLIO::getAttributeValueDouble ( const xmlAttrPtr Attribute ) const

Definition at line 593 of file XMLIO.cpp.

References getAttributeValueString().

Referenced by main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::ProjectionParametersPerspective::XMLIn(), BIAS::ProjectionParametersBase::XMLIn(), BIAS::XMLBase::XMLRead(), and BIAS::XMLBase::XMLReadFromString().

int XMLIO::getAttributeValueInt | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Definition at line 667 of file XMLIO.cpp.

int XMLIO::getAttributeValueInt ( const xmlAttrPtr Attribute ) const

Definition at line 584 of file XMLIO.cpp.

References getAttributeValueString().

Referenced by main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::ProjectionParametersBase::XMLIn(), and myTestClass::XMLIn().

std::string XMLIO::getAttributeValueString | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Definition at line 635 of file XMLIO.cpp.

std::string XMLIO::getAttributeValueString ( const xmlAttrPtr Attribute ) const

Definition at line 571 of file XMLIO.cpp.

Referenced by getAttributeValueBool(), getAttributeValueDouble(), getAttributeValueInt(), getAttributeValueVecDbl(), getAttributeValueVecInt(), main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), and BIAS::PMatrix::XMLIn().

BIAS::Vector< double > XMLIO::getAttributeValueVecDbl | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Definition at line 693 of file XMLIO.cpp.

BIAS::Vector< double > XMLIO::getAttributeValueVecDbl ( const xmlAttrPtr Attribute ) const

Definition at line 601 of file XMLIO.cpp.

References getAttributeValueString().

BIAS::Vector< int > XMLIO::getAttributeValueVecInt | ( | const xmlNodePtr | Node,
 |  | const std::string & | AttributeName
 | ) | const

Definition at line 714 of file XMLIO.cpp.

BIAS::Vector< int > XMLIO::getAttributeValueVecInt ( const xmlAttrPtr Attribute ) const

Definition at line 618 of file XMLIO.cpp.

References getAttributeValueString().

xmlNodePtr XMLIO::getChild | ( | const xmlNodePtr | ParentNode,
 |  | const std::string & | ChildName
 | ) |

Get a child of a Parent node by specifying the childs name, NULL is returned if the ParentNode has no child of the given name.

Author:
streckel 05/2004

Definition at line 413 of file XMLIO.cpp.

References getFirstChild(), getNextChild(), and getNodeName().

Referenced by main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::ProjectionParametersPerspective::XMLIn(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::PMatrix::XMLIn().

void XMLIO::GetChildren | ( | const xmlNodePtr | ParentNode,
 |  | std::vector< xmlNodePtr > & | children
 | ) |

accesor functions for recursive usage

Author:
woelk 02/2006

Definition at line 521 of file XMLIO.cpp.

References getFirstChild(), and getNextChild().

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]

Definition at line 231 of file Debug.hh.

Referenced by BIAS::Debug::Debug(), BIAS::ExampleDebug::func(), BIAS::FMatrix::GetEpipoles(), BIAS::listenthread(), main(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), BIAS::VideoSource_DCAM::QueryCam(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

void BIAS::Debug::GetDebugStream ( std::ostream & os ) const [inline, inherited]

Definition at line 294 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) [inline, inherited]

Definition at line 285 of file Debug.hh.

Referenced by BIAS::GuiGTK::MouseMotionCallback_().

xmlAttrPtr XMLIO::getFirstAttribute ( const xmlNodePtr Node )

Get the first attribute of a given parent, or NULL for no attributes.

Author:
streckel 05/2004

Definition at line 480 of file XMLIO.cpp.

References CurrAttr_.

Referenced by getAttributeByName(), GetAttributes(), and main().

xmlNodePtr XMLIO::getFirstChild ( const xmlNodePtr ParentNode )

Get the first child of a given parent, or NULL for no childs.

Author:
streckel 05/2004

Definition at line 376 of file XMLIO.cpp.

References CurrNode_.

Referenced by getChild(), GetChildren(), main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), and BIAS::Projection::XMLIn().

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 311 of file Debug.hh.

Referenced by BIAS::ExampleDebug::func(), and BIAS::ExampleDebug::ResetDebugLevelFromGlobal().

xmlAttrPtr XMLIO::getNextAttribute ( )

Get the next attribute of the parent specified in the last getFirstAttribute() call, the class remembers the last returned attribute.

NULL iis returned if the last attribute was reached.

Author:
streckel 05/2004

Definition at line 494 of file XMLIO.cpp.

References CurrAttr_.

Referenced by getAttributeByName(), GetAttributes(), and main().

xmlNodePtr XMLIO::getNextChild ( const xmlNodePtr SiblingNode )

Get the next sibling of the given node.

Do not give the parent node but the previous sibling node.

Author:
streckel 05/2004

Definition at line 395 of file XMLIO.cpp.

References CurrNode_.

xmlNodePtr XMLIO::getNextChild ( )

Get the next child of the parent specified in the last getFirstChild() call, the class remembers the last returned child.

NULL is returned the last child was reached.

Author:
streckel 05/2004

Definition at line 390 of file XMLIO.cpp.

Referenced by getChild(), GetChildren(), main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::ProjectionParametersZoom::XMLIn(), and BIAS::ProjectionParametersSpherical::XMLIn().

double XMLIO::getNodeContentDouble ( const xmlNodePtr Node ) const

Definition at line 472 of file XMLIO.cpp.

References getNodeContentString().

Referenced by BIAS::CameraParam::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::ReadCameraDataV1_0().

int XMLIO::getNodeContentInt ( const xmlNodePtr Node ) const

Definition at line 464 of file XMLIO.cpp.

References getNodeContentString().

Referenced by BIAS::CameraParam::ReadCameraDataV1_0(), and BIAS::ProjectionParametersIO::ReadCameraDataV1_0().

std::string XMLIO::getNodeContentString ( const xmlNodePtr Node ) const

Get the content of a given Node.

Author:
streckel 05/2004

Definition at line 441 of file XMLIO.cpp.

Referenced by getNodeContentDouble(), getNodeContentInt(), main(), BIAS::ProjectionParametersProjective::XMLIn(), BIAS::ProjectionParametersBase::XMLIn(), and BIAS::PMatrix::XMLIn().

std::string XMLIO::getNodeName ( const xmlNodePtr Node ) const

Get the name of a given Node.

Author:
streckel 05/2004

Definition at line 430 of file XMLIO.cpp.

Referenced by getChild(), main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraDataV0_8(), BIAS::CameraParam::ReadCameraDataV1_0(), BIAS::ProjectionParametersIO::ReadCameraDataV1_0(), BIAS::RigParameter::ReadRigData(), BIAS::ProjectionParametersIO::ReadRigData(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), BIAS::ProjectionParametersZoom::XMLIn(), BIAS::ProjectionParametersSpherical::XMLIn(), BIAS::Projection::XMLIn(), BIAS::XMLBase::XMLRead(), and BIAS::XMLBase::XMLReadFromString().

void BIAS::Debug::PrintDebugLevel ( std::ostream & os = std::cout ) const [inline, inherited]

Definition at line 263 of file Debug.hh.

References WS.

xmlNodePtr XMLIO::read ( const std::string & Filename )

Read and parse an XML-File from disk, DtD-Validation is not yet implemented.

Returns pointer to the RootNode or NULL if parse errors occurred.

Author:
streckel 05/2004

Definition at line 352 of file XMLIO.cpp.

References BIASERR, CurrNode_, isInitialized_, RootNode_, and xmlDoc_.

Referenced by main(), BIAS::CameraParam::ReadCameraData(), BIAS::ProjectionParametersIO::ReadCameraData(), BIAS::RigParameter::ReadRigData(), BIAS::ProjectionParametersIO::ReadRigData(), BIAS::RigParameter::ReadRigDataV0_8(), BIAS::ProjectionParametersIO::ReadRigDataV0_8(), and BIAS::XMLBase::XMLRead().

xmlNodePtr BIAS::XMLIO::ReadFromString ( const std::string & str )

construct tree from string

Author:
evers

Referenced by BIAS::XMLBase::XMLReadFromString().

void BIAS::Debug::RemoveDebugLevel ( long int lv ) [inline, inherited]

Definition at line 256 of file Debug.hh.

int XMLIO::SetCompression ( int level = 9 )

set level of compression, needs zlib

Parameters:
level 0=compression off, ... , 9 means highest
Returns:
previous compression level
Author:
koeser 01/2005

Definition at line 735 of file XMLIO.cpp.

References BIASERR, isInitialized_, and xmlDoc_.

Referenced by BIAS::XMLBase::XMLWrite().

void XMLIO::setContent | ( | const xmlNodePtr | Node,
 |  | const double | Content
 | ) |

Definition at line 301 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void XMLIO::setContent | ( | const xmlNodePtr | Node,
 |  | const int | Content
 | ) |

Definition at line 316 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void XMLIO::setContent | ( | const xmlNodePtr | Node,
 |  | const std::string & | Content
 | ) |

Set content of a node.

Method will replace existent content.

Author:
bartczak 08/2004

Definition at line 289 of file XMLIO.cpp.

References BIASERR, and isInitialized_.

void BIAS::Debug::SetDebugLevel ( long int lv ) [inline, inherited]

Definition at line 224 of file Debug.hh.

Referenced by main(), BIAS::ExampleDebug::ResetDebugLevelFromGlobal(), BIAS::MDcam::ScanBus(), BIAS::MDcam::SetDebugLevelDcam(), BIAS::TrackerBase< StorageType >::TrackAffine_(), BIAS::VideoSource_DCAM::VideoSource_DCAM(), BIAS::VideoSource_Disk::VideoSource_Disk(), and BIAS::VideoSource_V4L::VideoSource_V4L().

void BIAS::Debug::SetDebugStream ( std::ostream & os ) [inline, inherited]

Definition at line 278 of file Debug.hh.

Referenced by main().

static void BIAS::Debug::SetGlobalDebugLevel ( long int lev ) [inline, static, inherited]

Definition at line 304 of file Debug.hh.

Referenced by main().

int XMLIO::write | ( | const std::string & | Filename,
 |  | bool | AutoAddCompressionSuffix = true
 | ) | const

Write the whole tree that was constructed in memory to disk.

Parameters:
AutoAddCompressionSuffix relevant only if compression is active true means .z is attached, false means filename is used as is
Author:
streckel 05/2004

Definition at line 330 of file XMLIO.cpp.

References BIASERR, isInitialized_, XML_STD_ENCODING, and xmlDoc_.

Referenced by main(), BIAS::CameraParam::WriteCameraData(), BIAS::ProjectionParametersIO::WriteCameraData(), and BIAS::XMLBase::XMLWrite().

int BIAS::XMLIO::WriteToString ( std::string & str )

serialize tree to string

Author:
evers

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 329 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), BIAS::Image< StorageType >::operator=(), BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 330 of file Debug.hh.

Referenced by BIAS::GuiGTK::DeleteEvent_(), BIAS::GuiGTK::Destroy_(), BIAS::GuiGTK::DrawingAreaExposeCallback_(), BIAS::GuiGTK::GtkMain(), BIAS::GuiGTK::KeyPressEventCallback_(), BIAS::GuiGTK::LabelExposeCallback_(), BIAS::GuiGTK::MouseButtonPressCallback_(), BIAS::GuiGTK::MouseButtonReleaseCallback_(), BIAS::GuiGTK::MouseMotionCallback_(), and BIAS::Debug::operator=().

xmlAttrPtr BIAS::XMLIO::CurrAttr_ [protected]

Definition at line 290 of file XMLIO.hh.

Referenced by getFirstAttribute(), and getNextAttribute().

xmlNodePtr BIAS::XMLIO::CurrNode_ [protected]

Definition at line 288 of file XMLIO.hh.

Referenced by addChildNode(), clear(), create(), getFirstChild(), getNextChild(), read(), and XMLIO().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 332 of file Debug.hh.

bool BIAS::XMLIO::isInitialized_ [protected]

Definition at line 292 of file XMLIO.hh.

Referenced by addAttribute(), addChildNode(), addComment(), addContent(), clear(), create(), read(), SetCompression(), setContent(), write(), XMLIO(), and ~XMLIO().

xmlNodePtr BIAS::XMLIO::RootNode_ [protected]

Definition at line 287 of file XMLIO.hh.

Referenced by clear(), create(), read(), and XMLIO().

xmlDocPtr BIAS::XMLIO::xmlDoc_ [protected]

Definition at line 285 of file XMLIO.hh.

Referenced by clear(), create(), read(), SetCompression(), write(), and ~XMLIO().

The documentation for this class was generated from the following files:
  • Base/Common/XMLIO.hh
  • Base/Common/XMLIO.cpp
Generated on Wed Jun 21 19:13:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: xvimage Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

xvimage Class Reference

#include <Base/Image/ViffHeader.hh>

List of all members.

Public Attributes

unsigned long | col_size
unsigned long | color_space_model
char | comment [512]
unsigned long | data_encode_scheme
unsigned long | data_storage_type
char | file_type
float | fspare1
float | fspare2
char | identifier
char * | imagedata
unsigned long | ispare1
unsigned long | ispare2
float * | location
unsigned long | location_dim
unsigned long | location_type
char | machine_dep
unsigned long | map_col_size
unsigned long | map_enable
unsigned long | map_row_size
unsigned long | map_scheme
unsigned long | map_storage_type
unsigned long | map_subrow_size
char * | maps
unsigned long | maps_per_cycle
unsigned long | num_data_bands
unsigned long | num_of_images
float | pixsizx
float | pixsizy
char | release
char | reserve [VIFF_HEADERSIZE-(21 *sizeof(long))-(520 *sizeof(char))-(2 *sizeof(char *))-(4 *sizeof(float))-(sizeof(float *))]
unsigned long | row_size
long | startx
long | starty
unsigned long | subrow_size
char | trash [3]
char | version

Detailed Description

Definition at line 71 of file ViffHeader.hh.

Member Data Documentation

unsigned long xvimage::col_size

Definition at line 100 of file ViffHeader.hh.

unsigned long xvimage::color_space_model

Definition at line 181 of file ViffHeader.hh.

char xvimage::comment[512]

Definition at line 92 of file ViffHeader.hh.

unsigned long xvimage::data_encode_scheme

Definition at line 145 of file ViffHeader.hh.

unsigned long xvimage::data_storage_type

Definition at line 143 of file ViffHeader.hh.

char xvimage::file_type

Definition at line 80 of file ViffHeader.hh.

float xvimage::fspare1

Definition at line 189 of file ViffHeader.hh.

float xvimage::fspare2

Definition at line 189 of file ViffHeader.hh.

char xvimage::identifier

Definition at line 76 of file ViffHeader.hh.

char* xvimage::imagedata

Definition at line 210 of file ViffHeader.hh.

unsigned long xvimage::ispare1

Definition at line 187 of file ViffHeader.hh.

unsigned long xvimage::ispare2

Definition at line 187 of file ViffHeader.hh.

float* xvimage::location

Definition at line 204 of file ViffHeader.hh.

unsigned long xvimage::location_dim

Definition at line 130 of file ViffHeader.hh.

unsigned long xvimage::location_type

Definition at line 125 of file ViffHeader.hh.

char xvimage::machine_dep

Definition at line 86 of file ViffHeader.hh.

unsigned long xvimage::map_col_size

Definition at line 156 of file ViffHeader.hh.

unsigned long xvimage::map_enable

Definition at line 169 of file ViffHeader.hh.

unsigned long xvimage::map_row_size

Definition at line 154 of file ViffHeader.hh.

unsigned long xvimage::map_scheme

Definition at line 150 of file ViffHeader.hh.

unsigned long xvimage::map_storage_type

Definition at line 152 of file ViffHeader.hh.

unsigned long xvimage::map_subrow_size

Definition at line 158 of file ViffHeader.hh.

char* xvimage::maps

Definition at line 201 of file ViffHeader.hh.

unsigned long xvimage::maps_per_cycle

Definition at line 174 of file ViffHeader.hh.

unsigned long xvimage::num_data_bands

Definition at line 138 of file ViffHeader.hh.

unsigned long xvimage::num_of_images

Definition at line 133 of file ViffHeader.hh.

float xvimage::pixsizx

Definition at line 122 of file ViffHeader.hh.

float xvimage::pixsizy

Definition at line 122 of file ViffHeader.hh.

char xvimage::release

Definition at line 82 of file ViffHeader.hh.

char xvimage::reserve[VIFF_HEADERSIZE-(21 *sizeof(long))-(520 *sizeof(char))-(2 *sizeof(char *))-(4 *sizeof(float))-(sizeof(float *))]

Definition at line 196 of file ViffHeader.hh.

unsigned long xvimage::row_size

Definition at line 97 of file ViffHeader.hh.

long xvimage::startx

Definition at line 118 of file ViffHeader.hh.

long xvimage::starty

Definition at line 118 of file ViffHeader.hh.

unsigned long xvimage::subrow_size

Definition at line 103 of file ViffHeader.hh.

char xvimage::trash[3]

Definition at line 89 of file ViffHeader.hh.

char xvimage::version

Definition at line 84 of file ViffHeader.hh.

The documentation for this class was generated from the following file:
  • Base/Image/ViffHeader.hh
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ZoomFrame Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ZoomFrame

BIAS::ZoomFrame Class Reference

used by ImageCanvas and ScaledImageCanvas, should not be used directly More...

#include <Gui/ImageCanvas.hh>

Collaboration diagram for BIAS::ZoomFrame:

[legend]
List of all members.

Public Member Functions

void | NewCoo (unsigned x, unsigned y)
void | NewImage (BIAS::ImageBase &im, BIAS::Image< unsigned char > &ucim, const wxString &name)
void | SetZoom (unsigned z)
ZoomFrame (wxWindow *parent, const wxString &title)
~ZoomFrame ()

Protected Member Functions

void | OnClose (wxCloseEvent &event)
void | OnQuit (wxCommandEvent &event)
void | OnZoomFactor (wxScrollEvent &event)
void Setup ()

Protected Attributes

wxString | ImageName_
wxButton * | QuitButton_
wxSlider * | SLScale_
wxString | Title_
ZoomImageCanvas * Window_

Private Types

enum | { MIA_ZoomQuitButton }

Detailed Description

used by ImageCanvas and ScaledImageCanvas, should not be used directly

Author:
woelk

Definition at line 82 of file ImageCanvas.hh.

Member Enumeration Documentation

anonymous enum [private]

Enumerator:
MIA_ZoomQuitButton

Definition at line 84 of file ImageCanvas.hh.

Constructor & Destructor Documentation

ZoomFrame::ZoomFrame | ( | wxWindow * | parent,
 |  | const wxString & | title
 | ) |

Definition at line 22 of file ImageCanvas.cpp.

References Setup().

ZoomFrame::~ZoomFrame ( )

Definition at line 19 of file ImageCanvas.cpp.

Member Function Documentation

void ZoomFrame::NewCoo | ( | unsigned | x,
 |  | unsigned | y
 | ) |

Definition at line 63 of file ImageCanvas.cpp.

References BIAS::ZoomImageCanvas::NewCoo(), and Window_.

void ZoomFrame::NewImage | ( | BIAS::ImageBase & | im,
 |  | BIAS::Image< unsigned char > & | ucim,
 |  | const wxString & | name
 | ) |

Definition at line 55 of file ImageCanvas.cpp.

References BIAS::ZoomImageCanvas::NewImage(), and Window_.

void ZoomFrame::OnClose ( wxCloseEvent & event ) [protected]

Definition at line 82 of file ImageCanvas.cpp.

void ZoomFrame::OnQuit ( wxCommandEvent & event ) [protected]

Definition at line 76 of file ImageCanvas.cpp.

void ZoomFrame::OnZoomFactor ( wxScrollEvent & event ) [protected]

Definition at line 97 of file ImageCanvas.cpp.

References BIAS::ZoomImageCanvas::NewZoom(), SLScale_, and Window_.

void ZoomFrame::Setup ( ) [protected]

Definition at line 29 of file ImageCanvas.cpp.

References MIA_ZoomQuitButton, QuitButton_, SLScale_, and Window_.

Referenced by ZoomFrame().

void ZoomFrame::SetZoom ( unsigned z )

Definition at line 88 of file ImageCanvas.cpp.

References BIASASSERT, BIAS::ZoomImageCanvas::NewZoom(), SLScale_, and Window_.

Member Data Documentation

wxString BIAS::ZoomFrame::ImageName_ [protected]

Definition at line 103 of file ImageCanvas.hh.

wxButton* BIAS::ZoomFrame::QuitButton_ [protected]

Definition at line 105 of file ImageCanvas.hh.

Referenced by Setup().

wxSlider* BIAS::ZoomFrame::SLScale_ [protected]

Definition at line 107 of file ImageCanvas.hh.

Referenced by OnZoomFactor(), Setup(), and SetZoom().

wxString BIAS::ZoomFrame::Title_ [protected]

Definition at line 104 of file ImageCanvas.hh.

ZoomImageCanvas* BIAS::ZoomFrame::Window_ [protected]

Definition at line 106 of file ImageCanvas.hh.

Referenced by NewCoo(), NewImage(), OnZoomFactor(), Setup(), and SetZoom().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvas.hh
  • Gui/ImageCanvas.cpp
Generated on Wed Jun 21 19:13:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS::ZoomImageCanvas Class Reference

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
BIAS::ZoomImageCanvas

BIAS::ZoomImageCanvas Class Reference

used by ImageCanvas and ScaledImageCanvas, should not be used directly More...

#include <Gui/ImageCanvas.hh>

Collaboration diagram for BIAS::ZoomImageCanvas:

[legend]
List of all members.

Public Member Functions

void | NewCoo (unsigned x, unsigned y)
void | NewImage (BIAS::ImageBase &im, BIAS::Image< unsigned char > &ucim)
void | NewZoom (int zoom)
void | SetClearDrawingContext (bool clear)
ZoomImageCanvas (wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxTAB_TRAVERSAL, const wxString &name=wxT("ZoomImageCanvas"))
~ZoomImageCanvas ()

Protected Member Functions

void GetZoomImage ()
void | OnKey (wxKeyEvent &event)
void | OnLeftMouse (wxMouseEvent &event)
void | OnMouseLeave (wxMouseEvent &event)
void | OnMouseMove (wxMouseEvent &event)
void | OnPaint (wxPaintEvent &event)
void | OnResize (wxSizeEvent &event)
void | OnRightMouse (wxMouseEvent &event)
void | UpdateStatusBar (unsigned x, unsigned y)

Protected Attributes

wxBitmap * | Bitmap_
bool | ClearDrawingContext_
int | mousex_
int | mousey_
BIAS::ImageBase origim_
pthread_mutex_t * | origim_mutex_
wxStatusBar * | SBar_
int | SBarID_
BIAS::Image< unsigned char > | ucim_
int | wheight_
int | wwidth_
pthread_mutex_t * | wxbitmap_mutex_
wxImage * | wximage_
BIAS::Image< unsigned char > | zim_
unsigned | ZoomFactor_
unsigned | ZoomX_
unsigned | ZoomXPos_
unsigned | ZoomY_
unsigned | ZoomYPos_

Detailed Description

used by ImageCanvas and ScaledImageCanvas, should not be used directly

Todo:
Create a common base class for ImageCnvas and ImageCanvasGL and derive both classes from it (JW)
Author:
woelk

Definition at line 29 of file ImageCanvas.hh.

Constructor & Destructor Documentation

ZoomImageCanvas::ZoomImageCanvas | ( | wxWindow * | parent,
 |  | wxStatusBar * | sbar = NULL,
 |  | int | sbarid = 0,
 |  | wxWindowID | id = -1,
 |  | const wxPoint & | pos = wxDefaultPosition,
 |  | const wxSize & | size = wxSize(320, 240),
 |  | long | style = wxTAB_TRAVERSAL,
 |  | const wxString & | name = wxT("ZoomImageCanvas")
 | ) |

Definition at line 108 of file ImageCanvas.cpp.

ZoomImageCanvas::~ZoomImageCanvas ( )

Definition at line 129 of file ImageCanvas.cpp.

References origim_mutex_, and wxbitmap_mutex_.

Member Function Documentation

void ZoomImageCanvas::GetZoomImage ( ) [protected]

Definition at line 135 of file ImageCanvas.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), res, ucim_, wheight_, wwidth_, zim_, ZoomFactor_, ZoomX_, ZoomXPos_, ZoomY_, and ZoomYPos_.

Referenced by NewCoo(), NewImage(), NewZoom(), and OnResize().

void ZoomImageCanvas::NewCoo | ( | unsigned | x,
 |  | unsigned | y
 | ) |

Definition at line 268 of file ImageCanvas.cpp.

References GetZoomImage(), wheight_, wwidth_, ZoomFactor_, ZoomX_, ZoomXPos_, ZoomY_, and ZoomYPos_.

Referenced by BIAS::ZoomFrame::NewCoo(), and OnRightMouse().

void ZoomImageCanvas::NewImage | ( | BIAS::ImageBase & | im,
 |  | BIAS::Image< unsigned char > & | ucim
 | ) |

Definition at line 253 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, GetZoomImage(), origim_, origim_mutex_, and ucim_.

Referenced by BIAS::ZoomFrame::NewImage().

void ZoomImageCanvas::NewZoom ( int zoom )

Definition at line 285 of file ImageCanvas.cpp.

References GetZoomImage(), OnKey(), OnLeftMouse(), OnMouseLeave(), OnMouseMove(), OnPaint(), OnResize(), OnRightMouse(), and ZoomFactor_.

Referenced by BIAS::ZoomFrame::OnZoomFactor(), and BIAS::ZoomFrame::SetZoom().

void ZoomImageCanvas::OnKey ( wxKeyEvent & event ) [protected]

Definition at line 404 of file ImageCanvas.cpp.

References BIASERR, ZoomFactor_, ZoomX_, ZoomXPos_, ZoomY_, and ZoomYPos_.

Referenced by NewZoom().

void ZoomImageCanvas::OnLeftMouse ( wxMouseEvent & event ) [protected]

Definition at line 375 of file ImageCanvas.cpp.

References BIASERR, ZoomFactor_, ZoomX_, ZoomXPos_, ZoomY_, and ZoomYPos_.

Referenced by NewZoom().

void ZoomImageCanvas::OnMouseLeave ( wxMouseEvent & event ) [protected]

Definition at line 324 of file ImageCanvas.cpp.

References mousex_, mousey_, SBar_, and SBarID_.

Referenced by NewZoom().

void ZoomImageCanvas::OnMouseMove ( wxMouseEvent & event ) [protected]

Definition at line 364 of file ImageCanvas.cpp.

References mousex_, mousey_, and UpdateStatusBar().

Referenced by NewZoom().

void ZoomImageCanvas::OnPaint ( wxPaintEvent & event ) [protected]

Definition at line 346 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, Bitmap_, wxbitmap_mutex_, and wximage_.

Referenced by NewZoom().

void ZoomImageCanvas::OnResize ( wxSizeEvent & event ) [protected]

Definition at line 330 of file ImageCanvas.cpp.

References GetZoomImage(), wheight_, wwidth_, ZoomFactor_, ZoomXPos_, and ZoomYPos_.

Referenced by NewZoom().

void ZoomImageCanvas::OnRightMouse ( wxMouseEvent & event ) [protected]

Definition at line 309 of file ImageCanvas.cpp.

References NewCoo(), wheight_, wwidth_, ZoomFactor_, ZoomX_, and ZoomY_.

Referenced by NewZoom().

void BIAS::ZoomImageCanvas::SetClearDrawingContext ( bool clear ) [inline]

Definition at line 43 of file ImageCanvas.hh.

void ZoomImageCanvas::UpdateStatusBar | ( | unsigned | x,
 |  | unsigned | y
 | ) | [protected]

Definition at line 196 of file ImageCanvas.cpp.

References BIAS_MUTEX_LOCK, BIAS_MUTEX_UNLOCK, Bitmap_, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), origim_, origim_mutex_, SBar_, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, wxbitmap_mutex_, ZoomFactor_, ZoomX_, ZoomXPos_, ZoomY_, and ZoomYPos_.

Referenced by OnMouseMove().

Member Data Documentation

wxBitmap* BIAS::ZoomImageCanvas::Bitmap_ [protected]

Definition at line 58 of file ImageCanvas.hh.

Referenced by OnPaint(), and UpdateStatusBar().

bool BIAS::ZoomImageCanvas::ClearDrawingContext_ [protected]

Definition at line 66 of file ImageCanvas.hh.

int BIAS::ZoomImageCanvas::mousex_ [protected]

Definition at line 72 of file ImageCanvas.hh.

Referenced by OnMouseLeave(), and OnMouseMove().

int BIAS::ZoomImageCanvas::mousey_ [protected]

Definition at line 72 of file ImageCanvas.hh.

Referenced by OnMouseLeave(), and OnMouseMove().

BIAS::ImageBase BIAS::ZoomImageCanvas::origim_ [protected]

Definition at line 61 of file ImageCanvas.hh.

Referenced by NewImage(), and UpdateStatusBar().

pthread_mutex_t * BIAS::ZoomImageCanvas::origim_mutex_ [protected]

Definition at line 74 of file ImageCanvas.hh.

Referenced by NewImage(), UpdateStatusBar(), and ~ZoomImageCanvas().

wxStatusBar* BIAS::ZoomImageCanvas::SBar_ [protected]

Definition at line 62 of file ImageCanvas.hh.

Referenced by OnMouseLeave(), and UpdateStatusBar().

int BIAS::ZoomImageCanvas::SBarID_ [protected]

Definition at line 63 of file ImageCanvas.hh.

Referenced by OnMouseLeave().

BIAS::Image<unsigned char> BIAS::ZoomImageCanvas::ucim_ [protected]

Definition at line 60 of file ImageCanvas.hh.

Referenced by GetZoomImage(), and NewImage().

int BIAS::ZoomImageCanvas::wheight_ [protected]

Definition at line 71 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnResize(), and OnRightMouse().

int BIAS::ZoomImageCanvas::wwidth_ [protected]

Definition at line 71 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnResize(), and OnRightMouse().

pthread_mutex_t* BIAS::ZoomImageCanvas::wxbitmap_mutex_ [protected]

Definition at line 74 of file ImageCanvas.hh.

Referenced by OnPaint(), UpdateStatusBar(), and ~ZoomImageCanvas().

wxImage* BIAS::ZoomImageCanvas::wximage_ [protected]

Definition at line 59 of file ImageCanvas.hh.

Referenced by OnPaint().

BIAS::Image<unsigned char> BIAS::ZoomImageCanvas::zim_ [protected]

Definition at line 60 of file ImageCanvas.hh.

Referenced by GetZoomImage().

unsigned BIAS::ZoomImageCanvas::ZoomFactor_ [protected]

Definition at line 68 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), NewZoom(), OnKey(), OnLeftMouse(), OnResize(), OnRightMouse(), and UpdateStatusBar().

unsigned BIAS::ZoomImageCanvas::ZoomX_ [protected]

Definition at line 68 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnKey(), OnLeftMouse(), OnRightMouse(), and UpdateStatusBar().

unsigned BIAS::ZoomImageCanvas::ZoomXPos_ [protected]

Definition at line 70 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnKey(), OnLeftMouse(), OnResize(), and UpdateStatusBar().

unsigned BIAS::ZoomImageCanvas::ZoomY_ [protected]

Definition at line 68 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnKey(), OnLeftMouse(), OnRightMouse(), and UpdateStatusBar().

unsigned BIAS::ZoomImageCanvas::ZoomYPos_ [protected]

Definition at line 70 of file ImageCanvas.hh.

Referenced by GetZoomImage(), NewCoo(), OnKey(), OnLeftMouse(), OnResize(), and UpdateStatusBar().

The documentation for this class was generated from the following files:
  • Gui/ImageCanvas.hh
  • Gui/ImageCanvas.cpp
Generated on Wed Jun 21 19:13:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Hierarchical Index

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Basic Image AlgorithmS Library Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

  • _FilterBorders
  • alist
  • BIAS::AppData
  • BIAS::BackwardMapping< InputStorageType, OutputStorageType >
    • BIAS::HomographyMapping< InputStorageType, OutputStorageType >
    • BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
    • BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
    • BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • BIAS::BackwardMapping< unsigned char, unsigned char >
    • BIAS::CylinderMapping
  • Base
    • A
    • B
    • C
    • FromBase
  • BIAS::BaseException
  • BIAS::BaseFactory< BaseClassType >::MapEntry
  • biasadd
  • biasconvert
  • BiasDetectUnvignetteApp
  • biasdiff
  • biasextract
  • biasfilter
  • biasinsert
  • biasmerge
  • biasprojection
  • biassetprojection
  • biassetuid
  • biasshowepi
  • BiasShowEpiApp
  • biasshowsm
  • biasview
  • BiasViewApp
  • biasviewwx
  • Binomial
  • BIAS::Bresenham
    • BIAS::ScanLine
    • BIAS::ScanLine2
  • BIAS::BresenhamCircle
  • BIAS::BresenhamCircleEighth
  • BIAS::BresenhamCircleSlow
  • BIAS::CameraData
  • BIAS::CameraParam
    • BIAS::MatlabTBUndistortion
    • BIAS::SphericalUndistortion
  • CameraParameter_s
  • BIAS::CameraViewController
  • BIAS::CameraViewExternals
  • BIAS::CameraViewFrustum
  • BIAS::CameraViewInternals
  • BIAS::CameraViewport
  • BIAS::CanCompare< T1, T2 >
  • BIAS::CanCopy< T1, T2 >
  • BIAS::CanMultiply< T1, T2, T3 >
  • BIAS::CCAStruct
  • BIAS::Cholesky
  • cilist
  • cllist
  • BIAS::ColorHistogram< StorageType >
  • BIAS::ColorMultiHistogram< StorageType >
  • BIAS::ColorSegmentationThreaded
  • complex
  • COmpressJpeg
  • TNT::const_Region1D< Array1D >
  • TNT::const_Region2D< Array2D >
  • BIAS::Contour
  • BIAS::cornerstruct
  • BIAS::CPDiscreteParam
  • BIAS::CPDiscreteParam
  • BIAS::CPDiscreteParam
  • BIAS::CScommData
  • BIAS::CScommMsg
  • BIAS::CSCommWithClientNr
  • CuEye
  • CutoutFrame
  • /home/jw/source/BIAS/Base/Debug/Debug.hh
  • BIAS::Debug
    • BIAS::BaseFactory< BaseClassType >
    • BIAS::BaseFactory< Base >
      • MyFactory
    • BIAS::BSplineCurve
    • BIAS::ColorHarris
    • BIAS::ColorSegmentation
    • BIAS::Condensation
      • BIAS::CondensHisto
      • BIAS::CondensImg
    • BIAS::Conic2D
    • BIAS::CornerDetectorBase< StorageType >
      • BIAS::CornerDetectorGradient< StorageType, CalculationType >
        • BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
        • BIAS::CornerDetectorHarris< StorageType, CalculationType >
        • BIAS::CornerDetectorKLT< StorageType, CalculationType >
        • BIAS::LinearRegionDetector< StorageType, CalculationType >
      • BIAS::CornerDetectorSusan< StorageType >
    • BIAS::CScommBase
      • BIAS::CScommClient
      • BIAS::CScommServer
    • BIAS::DC_GPS
    • BIAS::DC_inertial
    • BIAS::DC_ptu
    • BIAS::EpipolarLine
    • BIAS::ExampleDebug
    • BIAS::FFT
    • BIAS::FilterBase< InputStorageType, OutputStorageType >
      • BIAS::DistTransform< InputStorageType, OutputStorageType >
      • BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
        • BIAS::GradientGauss< InputStorageType, OutputStorageType >
          • BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
        • BIAS::GradientSimple< InputStorageType, OutputStorageType >
        • BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
      • BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
        • BIAS::StructureTensor< InputStorageType, OutputStorageType >
      • BIAS::FilterNToN< InputStorageType, OutputStorageType >
        • BIAS::Convolution< InputStorageType, OutputStorageType >
          • BIAS::Binomial< InputStorageType, OutputStorageType >
          • BIAS::DeInterlace< InputStorageType, OutputStorageType >
          • BIAS::Gauss< InputStorageType, OutputStorageType >
          • BIAS::Mean< InputStorageType, OutputStorageType >
        • BIAS::Median< InputStorageType, OutputStorageType >
      • BIAS::Morphology< InputStorageType, OutputStorageType >
        • BIAS::Dilation< InputStorageType, OutputStorageType >
        • BIAS::Erosion< InputStorageType, OutputStorageType >
      • BIAS::Rescale< InputStorageType, OutputStorageType >
    • BIAS::FilterBase< unsigned char, unsigned char >
      • BIAS::FilterNToN< unsigned char, unsigned char >
        • BIAS::Convolution< unsigned char, unsigned char >
          • BIAS::Binomial< unsigned char, unsigned char >
          • BIAS::Gauss< unsigned char, unsigned char >
          • BIAS::Mean< unsigned char, unsigned char >
      • BIAS::Label
      • BIAS::Rescale< unsigned char, unsigned char >
    • BIAS::FilterMask
    • BIAS::FMatrix
      • BIAS::EMatrix
    • BIAS::FMatrixEstimation
    • BIAS::GaussHelmert
    • BIAS::GuiBase
      • BIAS::GuiGTK
        • BIAS::GuiEnhanced
      • BIAS::GuiWX
    • BIAS::ImageAttributes
    • BIAS::ImageBase
      • BIAS::Image< StorageType >
        • BIAS::Camera< StorageType >
      • BIAS::Image< CONV_FLOAT >
      • BIAS::Image< CONV_INT >
      • BIAS::Image< float >
      • BIAS::Image< unsigned char >
        • BIAS::Histogram
        • BIAS::Histogram2D
    • BIAS::ImageCanvas
      • BIAS::ImageCanvasEnhanced
      • PlainImageCanvas
    • BIAS::ImageConvert
      • BIAS::ImageConvertThreaded
    • BIAS::Interpolator
    • BIAS::Kalman
    • BIAS::LeastSquaresBase
      • BIAS::LeastSquaresLapack
      • BIAS::LeastSquaresSVD
    • BIAS::MatchDataBase
      • BIAS::GenSynthMatches
    • BIAS::MDcam
    • BIAS::Median1D< DataType >
    • BIAS::MSAC< SolutionType >
    • BIAS::Param
      • BIAS::ParamGUI
    • BIAS::PMatrixEstimation
    • BIAS::PMatrixLinear
    • BIAS::Polynom
    • BIAS::PolynomialSolve
    • BIAS::PyramidImage< StorageType >
    • BIAS::PyramidImage< unsigned char >
    • BIAS::Random
    • BIAS::RANSAC< SolutionType >
      • BIAS::RANSACPreKnowledge< SolutionType >
    • BIAS::RANSAC< double >
      • BIAS::doubleRANSAC
    • BIAS::RANSAC< HomgPlane3D >
      • BIAS::PlaneRANSAC
    • BIAS::RegionMatcher
      • BIAS::CornerMatcher
    • BIAS::ROI
    • BIAS::SimilarityTransform
    • BIAS::SphericalUndistortion
    • BIAS::SVD
      • BIAS::SVD3x3
    • BIAS::ThreeDOut
    • BIAS::Tracker< StorageType, CalculationType >
      • BIAS::TrackerSynth< StorageType, CalculationType >
    • BIAS::TrackerBase< StorageType >
    • BIAS::TrackerBaseInterface< StorageType >
      • BIAS::TrackerBaseAffine< StorageType >
      • BIAS::TrackerBaseSimple< StorageType >
      • BIAS::TrackerBaseWeighted< StorageType >
    • BIAS::Triangulation
    • BIAS::UnscentedTransform
      • BIAS::ProjectionParametersBase
        • BIAS::ProjectionParametersPerspective
        • BIAS::ProjectionParametersProjective
        • BIAS::ProjectionParametersSpherical
        • BIAS::ProjectionParametersZoom
      • MyUnscentedTransform
    • BIAS::UUID
    • BIAS::VideoServer
    • BIAS::VideoShMFeeder
    • BIAS::VideoSource
      • BIAS::VideoSource_DCAM
      • BIAS::VideoSource_Disk
        • BIAS::VideoSource_DiskPMD
      • BIAS::VideoSource_DSHOW
      • BIAS::VideoSource_Net
      • BIAS::VideoSource_Shm
      • BIAS::VideoSource_Stereo
      • BIAS::VideoSource_uEye
      • BIAS::VideoSource_V4L
    • BIAS::XMLIO
    • myTestClass
  • BIAS::DerivedFrom< T, B >
  • BIAS::DerivedFrom< T, Base >
    • MyTemplate< T >
  • BIAS::Distribution
  • BIAS::dndFileTarget
  • doublecomplex
  • DragAndDropTarget
  • BIAS::DrawTextGL
  • BIAS::EightWaySymmetry< T >
  • BIAS::EightWaySymmetry< double >
    • BIAS::EightWaySymmetryHomg
  • BIAS::Ellipsoid3DData
  • ExampleGLSharedApp
  • ExampleImageCanvasGLBaseApp
  • ExampleOpenGLCanvasApp
  • BIAS::ExifTag
  • BIAS::Feat
  • BIAS::FFT2D< InputStorageType, OutputStorageType >
    • BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • FindFilesInPath
  • TNT::Fortran_Matrix< T >
  • TNT::Fortran_Sparse_Col_Matrix< T >
  • TNT::Fortran_Sparse_Vector< T >
  • BIAS::GenGroundTruth
  • BIAS::GeometryGL
  • BIAS::HMatrixEstimation
  • HomgLine2D
  • BIAS::HomgLine3D
  • ICECallBackInterface
  • BIAS::ICECallbackInterface
    • MyFrame
  • icilist
  • BIAS::Image3DData
  • ImageCanvasGLBase
  • BIAS::ImageDraw< StorageType >
  • BIAS::ImageIO
  • BIAS::ImgObjGL
  • TNT::Index1D
  • BIAS::IndexedFaceSet
  • inlist
  • BIAS::IntegralHistogram
  • BIAS::ItemAndWidget
  • BIAS::JpegHandler
  • BIAS::Line3DData
  • BIAS::LogFacility
  • TNT::LowerTriangularView< MaTRiX >
  • MainFrame
  • mainpage
  • BIAS::MatlabTBUndistortion::LuTEntry
  • TNT::Matrix< T >
    • BIAS::Matrix< T >
      • BIAS::Matrix2x2< T >
      • BIAS::Matrix3x3< T >
      • BIAS::Matrix3x4< T >
      • BIAS::Matrix4x4< T >
    • BIAS::Matrix< CONIC2D_TYPE >
      • BIAS::Matrix3x3< CONIC2D_TYPE >
        • BIAS::Conic2D
    • BIAS::Matrix< COVMATRIX3X3_TYPE >
      • BIAS::Matrix3x3< COVMATRIX3X3_TYPE >
        • BIAS::CovMatrix3x3
    • BIAS::Matrix< double >
      • BIAS::Matrix3x3< double >
        • BIAS::HomgPoint2DCov
      • BIAS::Matrix3x4< double >
        • BIAS::AffineTransf
      • BIAS::Matrix4x4< double >
        • BIAS::CoordinateTransform3D
          • BIAS::Pose
        • BIAS::EuclideanTransf3D
        • BIAS::HomgPoint3DCov
    • BIAS::Matrix< EMATRIX_TYPE >
      • BIAS::Matrix3x3< EMATRIX_TYPE >
        • BIAS::EMatrixBase
    • BIAS::Matrix< FMATRIX_TYPE >
      • BIAS::Matrix3x3< FMATRIX_TYPE >
        • BIAS::FMatrixBase
          • BIAS::FMatrix
    • BIAS::Matrix< HMATRIX_TYPE >
      • BIAS::Matrix3x3< HMATRIX_TYPE >
        • BIAS::HMatrixBase
          • BIAS::HMatrix
    • BIAS::Matrix< KMATRIX_TYPE >
      • BIAS::Matrix3x3< KMATRIX_TYPE >
        • BIAS::KMatrix
    • BIAS::Matrix< PLUECKERMATRIX_TYPE >
      • BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >
        • BIAS::PlueckerMatrix
    • BIAS::Matrix< PMATRIX_TYPE >
      • BIAS::Matrix3x4< PMATRIX_TYPE >
        • BIAS::PMatrixBase
          • BIAS::PMatrix
    • BIAS::Matrix< POSECOVARIANCE_TYPE >
      • BIAS::PoseParametrizationCovariance
    • BIAS::Matrix< QUADRIC3D_TYPE >
      • BIAS::Matrix4x4< QUADRIC3D_TYPE >
        • BIAS::Quadric3D
    • BIAS::Matrix< ROTATION_MATRIX_TYPE >
      • BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >
        • BIAS::RMatrixBase
          • BIAS::RMatrix
  • TNT::Matrix< CONIC2D_TYPE >
  • TNT::Matrix< COVMATRIX3X3_TYPE >
  • TNT::Matrix< double >
  • TNT::Matrix< EMATRIX_TYPE >
  • TNT::Matrix< FMATRIX_TYPE >
  • TNT::Matrix< HMATRIX_TYPE >
  • TNT::Matrix< KMATRIX_TYPE >
  • TNT::Matrix< PLUECKERMATRIX_TYPE >
  • TNT::Matrix< PMATRIX_TYPE >
  • TNT::Matrix< POSECOVARIANCE_TYPE >
  • TNT::Matrix< QUADRIC3D_TYPE >
  • TNT::Matrix< ROTATION_MATRIX_TYPE >
  • BIAS::MatrixPanel
  • BIAS::MetaData
  • Multitype
  • my_error_mgr
  • MyApp
  • BIAS::MySampleGrabberCB
  • MyTestClass
  • Namelist
  • NonBase
  • BIAS::Normalization
  • olist
  • BIAS::OpenGLCanvasBase
    • BIAS::OpenGLCanvas
      • BIAS::ImageCanvasGLBase
      • MyGLCanvas
      • MyGLCanvas
      • MyGLCanvas2
  • option
  • BIAS::ParamCallbackInterface
    • BIAS::CornerDetectorBase< StorageType >
    • MyAlgorithm
    • MyAlgorithm
  • BIAS::Parametrization
  • BIAS::ParamGUIDialog
  • BIAS::ParamGUIPanel
  • BIAS::ParamTypeBase
    • BIAS::ParamTypeBool
    • BIAS::ParamTypeDouble
    • BIAS::ParamTypeEnum
    • BIAS::ParamTypeInt
    • BIAS::ParamTypeString
    • BIAS::ParamTypeVecDbl
    • BIAS::ParamTypeVecInt
  • BIAS::PMatrix3DData
  • BIAS::PMDImageIO
  • BIAS::PMDImageMetaData
  • BIAS::PMDImageProc
  • BIAS::Point3DData
  • BIAS::PoseParametrization
  • BIAS::Position
  • BIAS::Projection3DData
  • BIAS::ProjectionDialog
  • BIAS::ProjectionGUI
  • BIAS::ProjectionParametersIO
  • BIAS::RedirectStreams
  • TNT::Region1D< Array1D >
  • TNT::Region2D< Array2D >
  • BIAS::RenderModeGL
  • RGBAd
  • RGBAf
  • RGBAuc
  • RGBd
  • RGBf
  • RGBuc
  • BIAS::RigParameter
  • BIAS::ScaledImageCanvas
  • SegmentationData
  • BIAS::SensorData
  • BIAS::SettingsGL
  • SimilarityTransformation3D
  • SimilarityTransformation3D
  • BIAS::SphericalUndistortion::LuTEntry
  • BIAS::SphericalUndistortion::LuTpxpyEntry
  • BIAS::StatekeeperGL
  • BIAS::StereoRedGreen
  • TNT::stopwatch
  • TagInfo
  • tagTHREADNAME_INFO
  • BIAS::Tensor3D< T >
    • BIAS::Tensor3D3x3x3< T >
  • BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >
    • BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >
      • BIAS::TrifocalTensorBase
        • BIAS::TrifocalTensor
  • BIAS::TFTensorEstimation
  • ThreadArg__
  • BIAS::ThreeDOutParameters
  • BIAS::TimeMeasure
  • BIAS::TimeMeasurement
  • TIntersect
  • BIAS::TopFrame
  • TNT::Transpose_View< Array2D >
  • BIAS::TriangleMesh
  • TNT::UnitLowerTriangularView< MaTRiX >
  • TNT::UnitUpperTriangularView< MaTRiX >
  • BIAS::UnVignette
  • TNT::UpperTriangularView< MaTRiX >
  • BIAS::UUIDsortAscending
  • Vardesc
  • vector
    • BIAS::PyramidImage< unsigned char >
  • TNT::Vector< T >
    • BIAS::Vector< T >
  • BIAS::Vector2< T >
  • BIAS::Vector2< HOMGPOINT1D_TYPE >
    • BIAS::HomgPoint1D
  • BIAS::Vector3< T >
  • BIAS::Vector3< HOMGLINE2D_TYPE >
    • BIAS::HomgLine2D
      • BIAS::EpipolarLine
  • BIAS::Vector3< HOMGPOINT2D_TYPE >
    • BIAS::HomgPoint2D
  • BIAS::Vector4< T >
  • BIAS::Vector4< HOMGPLANE3D_TYPE >
    • BIAS::HomgPlane3D
  • BIAS::Vector4< HOMGPOINT3D_TYPE >
    • BIAS::HomgPoint3D
  • BIAS::Vector4< QUAT_TYPE >
    • BIAS::Quaternion< QUAT_TYPE >
  • TNT::Vector_Adaptor< BBVec >
  • BIAS::VectorPanel
  • MIP::VideoSource_DV
  • MIP::VideoSource_DV2
  • BIAS::VideoSource_Shm::ShmImageHeader
  • VideoSource_UEYE
  • BIAS::VideoStream
  • BIAS::VideoStream::VSHeader
  • BIAS::VideoStream::VSImageHeader
  • VideSource_DiskPMD
  • VideSource_Stereo
  • BIAS::WeightedSigmaPoint
  • BIAS::WrapBias2Ipl
  • BIAS::WxMainThread
  • wxScrolledWindow
    • BIAS::ImageCanvas
  • BIAS::WxToAsciiArray
  • wxTopLevelWindow
  • wxTopLevelWindowNative
  • wxWindow
  • BIAS::XMLBase
    • BIAS::PMatrix
    • BIAS::Projection
    • BIAS::ProjectionParametersBase
    • myTestClass
  • xvimage
  • BIAS::ZoomFrame
  • BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- _ -

  • _AddParam() : BIAS::PyramidImage< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::CornerDetectorHarris< StorageType, CalculationType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _AddParameter() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::MSAC< SolutionType >, BIAS::CornerDetectorSusan< StorageType >, BIAS::CornerDetectorBase< StorageType >
  • _AddUniformDistributedOutliers() : BIAS::GenSynthMatches
  • _AffineResults : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _all_diff_from_median : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _all_ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _AllocInternalMem() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _am_computeIntensityDifferenceAffine() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _am_getGradientWinAffine() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _ApplyMeanFilter() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _AreMovingObjectsVisible() : BIAS::GenSynthMatches
  • _AsciiStrings : BIAS::WxToAsciiArray
  • _AT : BIAS::LeastSquaresBase
  • _ATA : BIAS::LeastSquaresBase
  • _ATb : BIAS::LeastSquaresBase
  • _Bilinear() : BIAS::RegionMatcher
  • _BilinearRegion() : BIAS::RegionMatcher
  • _bInitialized : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • _binomial : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _BinomialHWS : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _bl1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _bl1_5 : BIAS::RegionMatcher
  • _bl2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _bl2_5 : BIAS::RegionMatcher
  • _BlockAnimation : MainFrame
  • _bp : BIAS::CornerDetectorSusan< StorageType >
  • _bRefineSolution : BIAS::RANSAC< SolutionType >
  • _BresCirc : BIAS::BresenhamCircleSlow
  • _C : BIAS::MatchDataBase, BIAS::Camera< StorageType >
  • _CalcCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _CalculateKernel() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • _CalculateKernels() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _CalculateSampleCount() : BIAS::MSAC< SolutionType >
  • _CalculateTerminateScore() : BIAS::MSAC< SolutionType >
  • _cgx : BIAS::CornerDetectorSusan< StorageType >
  • _cgy : BIAS::CornerDetectorSusan< StorageType >
  • _CheckParams() : BIAS::GenSynthMatches
  • _ClearBeforeRANSAC : BIAS::RANSACPreKnowledge< SolutionType >
  • _ComputeCornerness() : BIAS::LinearRegionDetector< StorageType, CalculationType >, BIAS::CornerDetectorKLT< StorageType, CalculationType >, BIAS::CornerDetectorHarris< StorageType, CalculationType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >, BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • _ComputeFilteredImages : BIAS::TrackerBaseInterface< StorageType >
  • _Conv : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _Cornerness : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _CreateCamMovement() : BIAS::GenSynthMatches
  • _CreateLevels() : BIAS::PyramidImage< StorageType >
  • _CreateMoving2DPoints() : BIAS::GenSynthMatches
  • _CreateMoving3DPoints() : BIAS::GenSynthMatches
  • _CreateMovingGT2DPoints() : BIAS::GenSynthMatches
  • _CreateMovingTransforms() : BIAS::GenSynthMatches
  • _CreateStatic2DPoints() : BIAS::GenSynthMatches
  • _CreateStatic3DPoints() : BIAS::GenSynthMatches
  • _CreateStaticGT2DPoints() : BIAS::GenSynthMatches
  • _CurrentImage : MainFrame
  • _CutoutFrame1 : MainFrame
  • _CutoutFrame2 : MainFrame
  • _d : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _Data : BIAS::Tensor3D< T >
  • _DataArray : BIAS::Tensor3D< T >
  • _dBestInlierEvaluateScore : BIAS::RANSAC< SolutionType >
  • _dBestSampleEvaluateScore : BIAS::RANSAC< SolutionType >
  • _dDEpsilon : BIAS::ScanLine2, BIAS::ScanLine
  • _dDx : BIAS::Bresenham
  • _dDy : BIAS::Bresenham
  • _Decompose() : BIAS::CovMatrix3x3
  • _DefaultDir : MainFrame
  • _DefaultFile : MainFrame
  • _DelaySpin : MainFrame
  • _DeleteInternalMem() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _dExpectedInlierFraction : BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _dExpectedSigma : BIAS::MSAC< SolutionType >
  • _diff_from_median : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Dim1 : BIAS::Tensor3D< T >
  • _Dim2 : BIAS::Tensor3D< T >
  • _Dim3 : BIAS::Tensor3D< T >
  • _dInlierDistanceThreshold : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _disp : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _DoRefinement : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _doSecondOrderARP : BIAS::Condensation
  • _dProbabilityOfGoodSolution : BIAS::RANSAC< SolutionType >
  • _Draw() : BIAS::GenSynthMatches
  • _dSolutionErrorThreshold : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _dSoSmallSolutionChange : BIAS::RANSAC< SolutionType >
  • _dSum : BIAS::TimeMeasure
  • _dTerminateScore : BIAS::MSAC< SolutionType >
  • _dTriangDeltaPixels : BIAS::Triangulation
  • _dTriangSigmaPixels : BIAS::Triangulation
  • _e : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _eLineType : BIAS::Bresenham
  • _EnforceMinimumDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _epipole : BIAS::FMatrixBase, BIAS::EMatrixBase
  • _f : BIAS::Camera< StorageType >
  • _FeatList : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _FeatureMap : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _fHoriz : BIAS::FilterMask
  • _FileNames : MainFrame
  • _FillFeatureMap() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _FillInterpolatedColor() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _FillInterpolatedGrey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _FilterBorderHandling : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • _FitCheckBox : MainFrame
  • _fKernel : BIAS::FilterMask
  • _fm : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _FocalLength : BIAS::GenSynthMatches
  • _Frame : DragAndDropTarget
  • _fVert : BIAS::FilterMask
  • _fwork : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _fwork2 : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _G : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gauss : BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _GaussIO : BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussOO : BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussRatio : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussSigma : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GenerateSamplesRandom() : BIAS::MSAC< SolutionType >
  • _GetCoeff() : BIAS::PolynomialSolve
  • _ggauss : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _ggaussasymmetric : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _Ginv : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _got_solution_flag : BIAS::RANSAC< SolutionType >
  • _grad : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _GradGaussRatio : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _GradGaussSigma : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _GradientProducts() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _GradientType : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gradim1x : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim1y : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim2x : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim2y : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _GradXMask : BIAS::TrackerBaseInterface< StorageType >
  • _grady1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _grady2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _GradYMask : BIAS::TrackerBaseInterface< StorageType >
  • _greedy : BIAS::RANSAC< SolutionType >
  • _gsobel3x3 : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gsx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gsx_5 : BIAS::RegionMatcher
  • _gsy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gsy_5 : BIAS::RegionMatcher
  • _GT_C : BIAS::GenSynthMatches
  • _GT_NormalizedPoints : BIAS::GenSynthMatches
  • _GT_P : BIAS::GenSynthMatches
  • _GT_Points : BIAS::GenSynthMatches
  • _GT_R : BIAS::GenSynthMatches
  • _gx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gx1_5 : BIAS::RegionMatcher
  • _gx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gx2_5 : BIAS::RegionMatcher
  • _gxx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gxy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gy1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gy1_5 : BIAS::RegionMatcher
  • _gy2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gy2_5 : BIAS::RegionMatcher
  • _gyy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _HalfWinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • _HorizRightShift : BIAS::FilterMask
  • _iBestInlierAcceptCount : BIAS::RANSAC< SolutionType >
  • _iBestSampleAcceptCount : BIAS::RANSAC< SolutionType >
  • _ic : MyFrame
  • _iCenter : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iCount : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircle
  • _iCurrent : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iD : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _ida1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _ida2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _iDataSize : BIAS::MSAC< SolutionType >
  • _iDeltaE : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iDeltaSE : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _idet : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _iDx : BIAS::Bresenham
  • _iDy : BIAS::Bresenham
  • _iEnd : BIAS::Bresenham
  • _iEps : BIAS::Bresenham
  • _iEpsCount : BIAS::ScanLine2, BIAS::ScanLine
  • _iEpsilon : BIAS::ScanLine2, BIAS::ScanLine
  • _iim1 : BIAS::RegionMatcher
  • _iim2 : BIAS::RegionMatcher
  • _im1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _im2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Image1 : MainFrame
  • _Image2 : MainFrame
  • _ImageCanvas : CutoutFrame
  • _ImageCanvas1 : MainFrame
  • _ImageCanvas2 : MainFrame
  • _ImageCanvasFloat : MainFrame
  • _ImageCanvasUC : MainFrame
  • _ImageName1 : MainFrame
  • _ImageName2 : MainFrame
  • _ImHeight : BIAS::GenSynthMatches
  • _ImWidth : BIAS::GenSynthMatches
  • _iMyInt : BIAS::ExampleDebug
  • _in : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _iNext : BIAS::BresenhamCircleSlow
  • _InputSize : BIAS::FFT
  • _int_to_uchar() : BIAS::CornerDetectorSusan< StorageType >
  • _InternalMemHeight : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _InternalMemWidth : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iRadius : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iSampleSize : BIAS::MSAC< SolutionType >
  • _isDecomposed : BIAS::FMatrixBase, BIAS::EMatrixBase
  • _IsDecomposed : BIAS::CovMatrix3x3
  • _iSolutionCount : BIAS::MSAC< SolutionType >
  • _IsSeen() : BIAS::GenSynthMatches
  • _iStart : BIAS::Bresenham
  • _iSym : BIAS::Bresenham
  • _iTransformedCurrent : BIAS::Bresenham
  • _iTransformedEnd : BIAS::Bresenham
  • _iTransformedStart : BIAS::Bresenham
  • _iTransformedUpDown : BIAS::ScanLine2, BIAS::ScanLine
  • _iwork : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iwork2 : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iZeroCenter : BIAS::BresenhamCircleSlow
  • _K : BIAS::MatchDataBase, BIAS::Camera< StorageType >
  • _KernelRightShift : BIAS::FilterMask
  • _Ki : BIAS::MatchDataBase
  • _klthws : BIAS::RegionMatcher
  • _LastHalfWinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • _LastPositionOffset : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _LastRatio : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _LastSigma : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _liDebugLevel : BIAS::Debug
  • _lowpass : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _LowpassMask : BIAS::TrackerBaseInterface< StorageType >
  • _MasksSeparable : BIAS::TrackerBaseInterface< StorageType >
  • _MaxAffineChange : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _MaxCamDistance : BIAS::GenSynthMatches
  • _MaxDispOutliers : BIAS::GenSynthMatches
  • _MaxError : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • _MaxIterations : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • _MaxNum : BIAS::CornerDetectorBase< StorageType >
  • _MaxResiduumMAD : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxy1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxy2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _mean : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _MeanSize : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >
  • _Median : BIAS::Median1D< DataType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _median_ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _MedianSize : BIAS::Median< InputStorageType, OutputStorageType >
  • _MetaData : MainFrame, BIAS::ImageBase
  • _MinCamDistance : BIAS::GenSynthMatches
  • _MinCornerness : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _MinDistance : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _minx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _minx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _miny1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _miny2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _MotionVecX : BIAS::GenSynthMatches
  • _MotionVecY : BIAS::GenSynthMatches
  • _MotionVecZ : BIAS::GenSynthMatches
  • _MovingObjMotionVecX : BIAS::GenSynthMatches
  • _MovingObjMotionVecY : BIAS::GenSynthMatches
  • _MovingObjMotionVecZ : BIAS::GenSynthMatches
  • _MovingObjRotVecX : BIAS::GenSynthMatches
  • _MovingObjRotVecY : BIAS::GenSynthMatches
  • _MovingObjRotVecZ : BIAS::GenSynthMatches
  • _MovingPoints : BIAS::GenSynthMatches
  • _MovingTransform : BIAS::GenSynthMatches
  • _MSACConfidenceThresh : BIAS::MSAC< SolutionType >
  • _MSACRefineSolution : BIAS::MSAC< SolutionType >
  • _MSACSigmaFac : BIAS::MSAC< SolutionType >
  • _ncchws : BIAS::RegionMatcher
  • _nccwinsize : BIAS::RegionMatcher
  • _NeedReload : MainFrame
  • _NormalizedPoints : BIAS::MatchDataBase
  • _num : BIAS::CornerDetectorSusan< StorageType >
  • _NumberFeaturesSoFar : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _NumImages : BIAS::MatchDataBase
  • _NumMovingObjects : BIAS::GenSynthMatches
  • _NumMovingPoints : BIAS::GenSynthMatches
  • _NumOutliers : BIAS::GenSynthMatches
  • _NumPoints : BIAS::MatchDataBase
  • _NumStaticPoints : BIAS::GenSynthMatches
  • _NumTilesX : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::CornerDetectorBase< StorageType >
  • _NumTilesY : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::CornerDetectorBase< StorageType >
  • _OffsetX : CutoutFrame
  • _OffsetY : CutoutFrame
  • _out : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OutlDirChange : BIAS::GenSynthMatches
  • _OutlLengthChange : BIAS::GenSynthMatches
  • _OutNum : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OutSizeY : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OverallMotionX : BIAS::GenSynthMatches
  • _OverallMotionY : BIAS::GenSynthMatches
  • _OverallMotionZ : BIAS::GenSynthMatches
  • _OverallRotX : BIAS::GenSynthMatches
  • _OverallRotY : BIAS::GenSynthMatches
  • _OverallRotZ : BIAS::GenSynthMatches
  • _p : BIAS::FFT
  • _P : BIAS::MatchDataBase
  • _p_forward : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _p_reverse : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _para : BIAS::GenSynthMatches
  • _ParabolaApprox() : BIAS::RegionMatcher
  • _ParamsAllocated : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::PyramidImage< StorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >
  • _Point : BIAS::Camera< StorageType >
  • _Points : BIAS::MatchDataBase
  • _polygonmodeGL : BIAS::OpenGLCanvas
  • _PositionOffset : BIAS::PyramidImage< StorageType >
  • _PrinciplePointX : BIAS::GenSynthMatches
  • _PrinciplePointY : BIAS::GenSynthMatches
  • _Projection1 : MainFrame
  • _Projection2 : MainFrame
  • _PyramidSize : BIAS::PyramidImage< StorageType >
  • _Quick : BIAS::CornerDetectorSusan< StorageType >
  • _r : BIAS::CornerDetectorSusan< StorageType >
  • _R : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::FMatrixBase, BIAS::EMatrixBase
  • _rand : BIAS::GenSynthMatches
  • _randomArray : BIAS::Condensation
  • _ReduceToATA : BIAS::LeastSquaresBase
  • _RefineCornerPosition() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _RefineCorners() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _RejectionType : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _ReleaseHist() : BIAS::Histogram2D
  • _rescale : BIAS::PyramidImage< StorageType >
  • _RescaleFactor : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • _RescaleMeanSigmaFactor : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _RescaleMeanType : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _ReverseCheckBox : MainFrame
  • _RotVecX : BIAS::GenSynthMatches
  • _RotVecY : BIAS::GenSynthMatches
  • _RotVecZ : BIAS::GenSynthMatches
  • _RunStopButton : MainFrame
  • _S : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _Scale : CutoutFrame, BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • _SelectedPoint1 : MainFrame
  • _SelectedPoint2 : MainFrame
  • _Separable : BIAS::FilterMask
  • _SetCamData() : BIAS::MatchDataBase
  • _SetKernel() : BIAS::Mean< InputStorageType, OutputStorageType >
  • _setup_brightness_lut() : BIAS::CornerDetectorSusan< StorageType >
  • _sgxx : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sgxy : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sgyy : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sHoriz : BIAS::FilterMask
  • _SigmaCamCenterX : BIAS::GenSynthMatches
  • _SigmaCamCenterY : BIAS::GenSynthMatches
  • _SigmaCamCenterZ : BIAS::GenSynthMatches
  • _SigmaCamRotX : BIAS::GenSynthMatches
  • _SigmaCamRotY : BIAS::GenSynthMatches
  • _SigmaCamRotZ : BIAS::GenSynthMatches
  • _SigmaImagePoints : BIAS::GenSynthMatches
  • _Size : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::WxToAsciiArray, BIAS::Tensor3D< T >
  • _SizeMovingObjX : BIAS::GenSynthMatches
  • _SizeMovingObjY : BIAS::GenSynthMatches
  • _SizeMovingObjZ : BIAS::GenSynthMatches
  • _SizeX : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _SizeY : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _sKernel : BIAS::FilterMask
  • _SobelBinomial : BIAS::TrackerBaseInterface< StorageType >
  • _SolutionSize : BIAS::LeastSquaresBase
  • _ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _st : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _StaticPoints : BIAS::GenSynthMatches
  • _susan_corners() : BIAS::CornerDetectorSusan< StorageType >
  • _susan_corners_quick() : BIAS::CornerDetectorSusan< StorageType >
  • _SusanReAllocMem() : BIAS::CornerDetectorSusan< StorageType >
  • _susansize : BIAS::CornerDetectorSusan< StorageType >
  • _susanthresh : BIAS::CornerDetectorSusan< StorageType >
  • _svd : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _sVert : BIAS::FilterMask
  • _Swap() : BIAS::SVD3x3
  • _threshold : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Threshold : BIAS::CornerDetectorSusan< StorageType >
  • _TileSizeX : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • _TileSizeY : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • _Timer : MainFrame
  • _tmpFloat : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _tmpInt : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _TrackerType : BIAS::TrackerBase< StorageType >
  • _Transpose() : BIAS::MatchDataBase
  • _tsgxx : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _tsgxy : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _tsgyy : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _U : BIAS::CovMatrix3x3
  • _ucBorderColor : BIAS::Histogram2D, BIAS::Histogram
  • _uiBorder : BIAS::Histogram2D, BIAS::Histogram
  • _UID : BIAS::ImageBase
  • _uiDataSize : BIAS::RANSAC< SolutionType >
  • _uiExplicitSampleNo : BIAS::RANSAC< SolutionType >
  • _uiMaxSamples : BIAS::RANSAC< SolutionType >
  • _uiMaxSolutionsPerSample : BIAS::RANSAC< SolutionType >
  • _uiSampleSize : BIAS::RANSAC< SolutionType >
  • _UpdateCovWeights() : BIAS::Triangulation
  • _UpdateGrad() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _UserGivenP : BIAS::GenSynthMatches
  • _vData : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _VecLengthType : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • _VertRightShift : BIAS::FilterMask
  • _vFactor : BIAS::PyramidImage< StorageType >
  • _VT : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _weight : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Weight : BIAS::LeastSquaresBase
  • _WinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _winsize : BIAS::RegionMatcher
  • _WriteDebugImage() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _XYMap : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • _zDebugStream : BIAS::Debug
  • _ZeroFeatureMap() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Namespace Index

  • Namespace List
  • Namespace Members

Basic Image AlgorithmS Library Namespace List

Here is a list of all namespaces with brief descriptions:
BIAS | This class is used for parametrizing F- and H-matrices, generally for optimization purposes
Imath |
Imf |
MIP |
std |
TNT |
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS Namespace Reference

  • Namespace List
  • Namespace Members

BIAS Namespace Reference
[Graphical User Interfaces]

This class is used for parametrizing F- and H-matrices, generally for optimization purposes. More...

Classes

class | AffineTransf
last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g. More...
class | AppData
this is a chunk of metadata, also see MetaData More...
class | BackwardMapping
abstract base class to maps image src to image sink with arbitrary continuous function More...
class | BaseException
generic exception More...
class | BaseFactory
basic factory class More...
class | Binomial
class | Bresenham
scans a line using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext exists in Base/Image and Base/Geometry
More...
class | BresenhamCircle
scans a circle using Bresenhams integer arithmetic algorithm
  • either Init or the according constructor have to be called befor GetNext
  • points on circle are not given in continous manner, i.e.
More...
class | BresenhamCircleEighth
just like bresenham circle but only return 1/8th of the circle More...
class | BresenhamCircleSlow
makes 8 subsequent calls BresenhamCircleEighth slow does not work so far More...
class | BSplineCurve
this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. More...
class | Camera
extends the Image by MetaData support (e.g. More...
struct | CameraData
class | CameraParam
class | CameraViewController
base for (interactively) manipulating a (virtual) camera view. More...
class | CameraViewExternals
describes external params of a camera view, e.g. More...
class | CameraViewFrustum
describes internal parameter Frustum of an (OpenGL) camera view More...
class | CameraViewInternals
describes internal params of an (OpenGL) camera view More...
class | CameraViewport
describes internal parameter viewport of an (OpenGL) camera view More...
class | CanCompare
compile time check for comparabilty of T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | CanCopy
compile time check for copy compatibilty between T1 and T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | CanMultiply
compile time check if T1 can be multiplied by T2 Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html More...
class | CCAStruct
class | Cholesky
class | ColorHarris
class | ColorHistogram
This Class handels Histogram matters on Images. More...
class | ColorMultiHistogram
This Class handels MultiHistogram matters on Images. More...
class | ColorSegmentation
class | ColorSegmentationThreaded
class | Condensation
CONDENSATION (CONditional DENSity EstimATION) is a state estimator very similiar to the Kalman Filter, not only for Gaussian-, but also for any multi-modal distribution. More...
class | CondensHisto
class for tracking an object in an image More...
class | CondensImg
example class for condensation with a 2-dim state vector. More...
class | Conic2D
A 3x3 matrix representing a conic (cone/plane intersection). More...
class | Contour
a class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code More...
class | Convolution
generic convolution class. More...
class | CoordinateTransform3D
class | CornerDetectorBase
purly virtual interface defining class for corner detectors More...
class | CornerDetectorFoerstner
foerstner corner detector, detects grey value corners in images More...
class | CornerDetectorGradient
base class for all gradient based corner detectors More...
class | CornerDetectorHarris
harris corner detector, detects grey value corners in images More...
class | CornerDetectorKLT
computes the cornerness as the smaller eigenvalue of the structure tensor matrix More...
class | CornerDetectorSusan
The Susan corner detector (oxford implementation, see license). More...
class | CornerMatcher
class with various functions to detect corresponding image points More...
class | cornerstruct
used only by Susan corner detector More...
class | CovMatrix3x3
class for 3x3 covariance matrices More...
struct | CPDiscreteParam
class | CScommBase
this class CScomm (ClientServer communciation) handles data comunication via TCP/IP for one server and multiple clients. More...
class | CScommClient
class for sending/receiving data between clients and servers More...
class | CScommData
class | CScommMsg
helper classes for CScommBase More...
class | CScommServer
class for sending/receiving data between clients and servers More...
class | CSCommWithClientNr
needed for the creation of receivethreads More...
class | CylinderMapping
functions for spherical undistortion of given images, needs image dimensions, principal point and focal length as input additional to the image data. More...
class | DC_GPS
class | DC_inertial
class | DC_ptu
class | Debug
class | DeInterlace
class | DerivedFrom
compile time check if B is (grand)father of T Found it in Bjarne Stroustrup's FAQ: http://public.research.att.com/~bs/bs_faq2.html "Actually, Derived_from doesn't check derivation, but conversion, but that's often a better constaint. More...
class | Dilation
Dilation operator for binary images (black and white). More...
class | Distribution
class for calculating mean, variance and possibly other parameters More...
class | DistTransform
a class for calculating the distance transform More...
class | dndFileTarget
drag and drop files onto application. More...
class | doubleRANSAC
class | DrawTextGL
Draw text to OpenGL as 2D bitmap font. More...
class | EightWaySymmetry
class | EightWaySymmetryHomg
direction of line if start is in coordinate origin as given by compass More...
class | Ellipsoid3DData
stores important data for drawing an ellipsoid More...
class | EMatrix
class representing an Essential matrix More...
class | EMatrixBase
describes the epipolar relationship between two images whith known internal camera calibration. More...
class | EpipolarLine
a class for representing epipolar lines with useful functions like ScanLine() More...
class | Erosion
Erosion operator for binary images (black and white). More...
class | EuclideanTransf3D
Euclidean transformation for 3D points. More...
class | ExampleDebug
class | ExifTag
helper class containing EXIF Tag info and its's value 8wriiten e.g. More...
class | Feat
internal class for feature passing only More...
class | FFT
class | FFT2D
wrapper to the fftw3 library use fast as follows:
  • call Init() with appropriate size
  • call Filter()
More...
class | FFT2D_Tiles
class | FilterBase
virtual parent class for API definition of all (future) filters More...
class | FilterMask
A filter mask (or a kernel) used for convolution. More...
class | FilterNTo2N
base class for simple n->2n filter implementations More...
class | FilterNTo3N
base class for simple n->3n filter implementations More...
class | FilterNToN
base class for simple n->n filter implementations More...
class | FMatrix
class representing a Fundamental matrix More...
class | FMatrixBase
describes the epipolar relationship between a point and his mapping on a corresponding epipolar line. More...
class | FMatrixEstimation
functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views More...
class | Gauss
smoothing with gaussian kernel More...
class | GaussHelmert
see Foerstner, 2004, "Uncertainty And Projective Geometry" ! untested ! More...
class | GenGroundTruth
class | GenSynthMatches
class for generating synthetic matches More...
class | GeometryGL
Reusable Geometry an drawing functions for OpenGL. More...
class | GradientGauss
gradient calculation with separated gauss masks More...
class | GradientGaussAsymmetric
gradient calculation with separated gauss masks More...
class | GradientSimple
simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1) More...
class | GradientSobel3x3
gradient calculation with sobel 3 by 3 masks More...
class | GuiBase
Gui is a simple windowing environment. More...
class | GuiEnhanced
extended GuiGTK with zoom and marking options More...
class | GuiGTK
Gui based on gtk is a simple windowing environment. More...
class | GuiWX
a sophisticated more complex windowing environment More...
class | Histogram
class for easy histogram generation More...
class | Histogram2D
class | HMatrix
a 3x3 Matrix describing projective transformations between planes More...
class | HMatrixBase
describes a homography More...
class | HMatrixEstimation
estimate 3x3 Matrix (homography, affine transformation, . More...
class | HomgLine2D
class | HomgLine3D
a homogenous homogenized line is described by a direction vector PointInf_ (a point at infinity) and a starting point PointFin_ (which is the closest vector from the coordinate origin to the line if the line is not homogenized, it can bve described by any two points More...
class | HomgPlane3D
A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0. More...
class | HomgPoint1D
class HomgPoint1D describes a point with 2 degrees of freedom in projective coordinates. More...
class | HomgPoint2D
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates. More...
class | HomgPoint2DCov
class representing the covariance matrix of a homogenous point 2D More...
class | HomgPoint3D
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates. More...
class | HomgPoint3DCov
class representing the covariance matrix of a homogenous point 3D More...
class | HomographyMapping
Maps image src to image sink with homography H (software implementation). More...
class | ICECallbackInterface
class | Image
The image template class for specific storage types. More...
class | Image3DData
stores datas for a textured plane More...
class | ImageAttributes
contains all atribute info and values of e.g. a file. More...
class | ImageBase
This is the base class for images in BIAS. More...
class | ImageCanvas
display image in wx application, provides zoom and investigation functionality More...
class | ImageCanvasEnhanced
provides functionality for selection of rectangle, point, . More...
class | ImageCanvasGLBase
class | ImageConvert
class with static functions for converting all kinds of color formats and storage types More...
class | ImageConvertThreaded
class | ImageDraw
drawing simple entities into the image like rectangles or lines More...
class | ImageIO
routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g.
More...
class | ImgObjGL
class | IndexedFaceSet
stores data for drawing a indexed face set. More...
class | IntegralHistogram
This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms. More...
class | Interpolator
this class interpolates a function y=f(t) between given control points (the y-values) More...
struct | ItemAndWidget
class | JpegHandler
class | Kalman
Classical Kalman filter. More...
class | KMatrix
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs). More...
class | Label
does a connected component analysis and labels all connected regions More...
class | LeastSquaresBase
class | LeastSquaresLapack
class | LeastSquaresSVD
class | Line3DData
stores data for drawing a line More...
class | LinearRegionDetector
try to detect linear regions (const gradient) in images, experimental code for testing More...
class | LogFacility
class | LogPolarMapping
Maps cartesian source coordinates to log-polar sink coordinates. More...
class | MatchDataBase
class for representing matches, used in GenSynthMatches and biasshowsm More...
class | MatlabTBUndistortion
class | Matrix
matrix class with arbitrary size, indexing is row major. More...
class | Matrix2x2
is a 'fixed size' quadratic matrix of dim. More...
class | Matrix3x3
is a 'fixed size' quadratic matrix of dim. More...
class | Matrix3x4
is a 'fixed size' rectangular matrix of dim. More...
class | Matrix4x4
is a 'fixed size' quadratic matrix of dim. More...
class | MatrixPanel
Panel for displaying and editing matrices. More...
class | MDcam
VideoG MDcam simplifies acces to more then one DCam. It suports multiple IEEE1394-adapters, extern synchronization via parallel port and networked capture cluster. More...
class | Mean
deinterlacer filter More...
class | Median
2D median filter More...
class | Median1D
computes the median of a vector More...
class | MetaData
this class collects all additional data chunks of type AppData to be written into/read from an image file More...
class | Morphology
base class for Erosion, Dilation, and single Deletion More...
class | MSAC
class | MySampleGrabberCB
class | Normalization
class Normalization Functions, e.g. More...
class | OpenGLCanvas
OpenGL canvases with additinal event handling (JW). More...
class | OpenGLCanvasBase
class | Param
This class Param provides generic support for parameters. More...
class | ParamCallbackInterface
This class provides an interface to be called if parameter changes occured. More...
class | Parametrization
class | ParamGUI
?? More...
class | ParamGUIDialog
class | ParamGUIPanel
?? More...
class | ParamTypeBase
class | ParamTypeBool
class | ParamTypeDouble
class | ParamTypeEnum
class | ParamTypeInt
class | ParamTypeString
class | ParamTypeVecDbl
class | ParamTypeVecInt
class | PlaneRANSAC
class | PlueckerMatrix
represente a 3d line using a 4x4 Pluecker matrix More...
class | PMatrix
describes a projective 3D -> 2D mapping in homogenous coordinates More...
class | PMatrix3DData
stores important data for drawing a camera More...
class | PMatrixBase
describes a projective 3D -> 2D mapping in homogenous coordinates More...
class | PMatrixEstimation
compute standard P1/P2 from F. More...
class | PMatrixLinear
This class computes a PMatrix from 2D/3D correspondences with linear methods. More...
class | PMDImageIO
Save 2D/3D-image-data together with some metadata in a single tiff-datafile. More...
struct | PMDImageMetaData
Store extrinsic and intrinsic camera parameters for Rotation is in axis * angle representation image padding and Metadata. More...
class | PMDImageProc
class | Point3DData
stores data for drawing a point More...
class | Polynom
class for Polynoms of arbitary order More...
class | PolynomialSolve
base class for solving polynomial equations More...
class | Pose
Container for 3D pose, parametrized as euclidean center and quaternion orientation. More...
class | PoseParametrization
Slim class bundeling pose parametrization and associated covariance matrix. More...
class | PoseParametrizationCovariance
class encapsulating the transfromations between different pose parametrizations More...
class | Position
store positions in image More...
class | Projection
This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion, . More...
class | Projection3DData
class Projection3DData stores data for drawing a the extrinisc paramters of a projection. More...
class | ProjectionDialog
Dialog containing a ProjectionGUI. More...
class | ProjectionGUI
Panel for displaying and editing projections. More...
class | ProjectionMapping
Maps source pixel to sink pixel of given projections. More...
class | ProjectionParametersBase
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...
class | ProjectionParametersIO
class | ProjectionParametersPerspective
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...
class | ProjectionParametersProjective
12 parametric p for completely projective reconstruction scenarios, unknown focal lengths, self calibration, . More...
class | ProjectionParametersSpherical
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...
class | ProjectionParametersZoom
camera parameters which define the mapping between rays in the camera coordinate system and pixels in the image as well as external pose More...
class | PyramidImage
class for holding downsampled images More...
class | Quadric3D
A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g. More...
class | Quaternion
class for rotation with axis and angle More...
class | Random
class for producing random numbers from different distributions More...
class | RANSAC
do not DLL export this class because it is headeer only. More...
class | RANSACPreKnowledge
Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm. More...
class | RedirectStreams
used to redirect stdout and stderr into files or to silence them More...
class | RegionMatcher
basic functions for CornerMatcher More...
class | RenderModeGL
class | Rescale
Down-, Upsampling routines and Resize. More...
class | RigParameter
class | RMatrix
3D rotation matrix More...
class | RMatrixBase
3D rotation matrix More...
class | ROI
class for handling different region of interest (ROI) representations. More...
class | ScaledImageCanvas
display float images in wx application, provides zoom, scale, shift and investigation functionality More...
class | ScanLine
class for scanning a image region given by a line and a distance from the line More...
class | ScanLine2
struct | SensorData
class | SettingsGL
Application controlled OpenGl renderingsettings. More...
class | SimilarityTransform
class | SphericalUndistortion
transforms sphere images coming from a fisheye-lens according to different projection models. More...
class | StatekeeperGL
push and pop GL states on constructor/destructor Helper class pop(save) OpenGL states on construction and push them on destruction automatically. More...
class | StereoRedGreen
combine two separate images into one stereo image for red-green glasses More...
class | StructureTensor
basic class for structure tensor calculation More...
class | SVD
computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A More...
class | SVD3x3
singular value decomposition for 3x3 matrices More...
class | Tensor3D
class | Tensor3D3x3x3
class | TFTensorEstimation
class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers More...
class | ThreeDOut
unified output of 3D entities via OpenGL or VRML More...
struct | ThreeDOutParameters
configuration struct for drawing styles of various 3d objects More...
class | TimeMeasure
class TimeMeasure contains functions for timing real time and cpu (kernel) time. More...
class | TimeMeasurement
class | TopFrame
This is the fundamental frame in which the canvas (displaying the image) is positioned. More...
class | Tracker
High level tracking class. More...
class | TrackerBase
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | TrackerBaseAffine
class | TrackerBaseInterface
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | TrackerBaseSimple
class | TrackerBaseWeighted
class | TrackerSynth
returns ground truth tracks read from file, for debugging More...
class | TriangleMesh
create and represent a 3D triangle mesh More...
class | Triangulation
Class for triangulation of 3Dpoints from 2D matches. More...
class | TrifocalTensor
class | TrifocalTensorBase
class | UndistortionMapping
Maps image src to image sink with spherical or lens distortion. More...
class | UnscentedTransform
uses the unscented transformation to map a normal distribututed random variable using a nonlinear transformation More...
class | UnVignette
class | UUID
interface class for producing/storing Universally Unique IDentifiers More...
class | UUIDsortAscending
Helper class for ascending sort of sequential BIAS::UUIDs Sample usage:. More...
class | Vector
class for column vectors with arbitrary size More...
class | Vector2
class Vector2 contains a Vector of dim. More...
class | Vector3
class Vector3 contains a Vector of fixed dim. More...
class | Vector4
class Vector4 contains a Vector of dim. More...
class | VectorPanel
Panel for displaying and editing vectors. More...
class | VideoServer
class to send images from a camera or disk to a client More...
class | VideoShMFeeder
class to save Images to a Sharerd memory More...
class | VideoSource
Defines a common interface to different devices. More...
class | VideoSource_DCAM
This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll. More...
class | VideoSource_Disk
This class simulates a video device by loading images from disk. More...
class | VideoSource_DiskPMD
class | VideoSource_DSHOW
This class extends VideoSource for the use of DirectShow devices. More...
class | VideoSource_Net
This class implements a video streaming client using TCP. More...
class | VideoSource_Shm
This class implements a video streaming client using shared memory to receive images from another application. More...
class | VideoSource_Stereo
class | VideoSource_uEye
class | VideoSource_V4L
This class extends VideoSource for the use of Video4Linux supported devices like framegrabber, USB cameras. More...
class | VideoStream
To allow capturing of camera image to disk efficiently, (avoid multiple memcopy operations), this class defines an interface to file containing one header and multiple images. More...
struct | WeightedSigmaPoint
class | WrapBias2Ipl
wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area. More...
class | WxMainThread
To use threads in wxWindows we must create our own class, which is derived from wxThread. More...
class | WxToAsciiArray
Class for converting an array of wxStrings to an array of non-const ASCII strings. More...
class | XMLBase
Base class with interface for xml output. More...
class | XMLIO
Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'. More...
class | ZoomFrame
used by ImageCanvas and ScaledImageCanvas, should not be used directly More...
class | ZoomImageCanvas
used by ImageCanvas and ScaledImageCanvas, should not be used directly More...

Typedefs

typedef cornerstruct | CORNER_LIST [MAX_CORNERS]
typedef BIAS::Vector4< double > | RGBAd
typedef BIAS::Vector4< float > | RGBAf
typedef BIAS::Vector4< unsigned
char > 		RGBAuc
typedef BIAS::Vector3< double > | RGBd
typedef BIAS::Vector3< float > | RGBf
typedef BIAS::Vector3< unsigned
char > 		RGBuc
typedef std::string | TagType

Enumerations

enum | BIAS_DEINTERLACE_TYPE { BIAS_DI_121, BIAS_DI_22 }
enum BIAS_LOG_LEVEL {
BIAS_LOG_NONE = 0, BIAS_LOG_FATAL, BIAS_LOG_WARNING, BIAS_LOG_INFO,
BIAS_LOG_DEBUG
}
enum | CameraDrawingStyle { PyramidMesh, PyramidSolid, Arrow, PyramidMeshWithArrow }
different styles when drawing cameras, e.g. More...
enum CameraModel {
CAMERA_SONY_DFW_X700 = 0, CAMERA_SONY_DFW_V500, CAMERA_PTGREY_DRAGONFLY_COLOR, CAMERA_PTGREY_DRAGONFLY_HIRES,
CAMERA_PTGREY_DRAGONFLY_BW, CAMERA_PTGREY_SCORPION_COLOR_1600, CAMERA_SONY_EVID31, CAMERA_SONY_DV,
CAMERA_UNKNOWN
}
enum CornerIndices {
LOWER_LEFT = 0, LOWER_RIGHT, UPPER_RIGHT, UPPER_LEFT,
OPTICAL_CENTER
}
enum DrawbufferMode {
MONO = 0, STEREO_UNTOUCHED, STEREO_CONSUMER_NV, STEREO_QUADBUFFERED,
STEREO_LEFT_RIGHT, STEREO_TWOSCREENS
}
enum EdataType {
CS_NONE, CS_STRING, CS_FLOAT, CS_INT,
CS_BINARY
}
enum | EGradType { GT_Simple, GT_Sobel3x3, GT_Gauss, GT_GaussAsymmetric }
different gradients to be used by hiogher level classes
  • GT_Sobel3x3 gradient using 3x3 sobelx and sobely filters
  • GT_Gauss gradient using derivatives of gauss with square kernel
  • GT_GaussAsymmetric gradient using derivatives of gauss
More...
enum | ERejectionType { RT_Invalid = -1, RT_MAD, RT_X86 }
enum | ERejectionType { RT_Invalid = -1, RT_MAD, RT_X86 }
enum ETrackerType {
TT_Invalid = -1, TT_Simple, TT_Weighted, TT_Affine4,
TT_Affine6, TT_SimpleAffine4, TT_SimpleAffine6
}
defines type or combination of tracker(s) used: simple/weighted estimate a dx,dy, Affine4/Affine6 estimate an affine transformation with 4 resp. More...
enum | HistMode { HIST_POINTS, HIST_BARS, HIST_LINES }
enum InterpolationMethod {
MapNearestNeighbor = 1, MapBilinear, MapBicubic, MapTrilinear,
MapAnisotropic
}
accuracy for resampling More...
enum | InterpolationType { NearestNeighbour, Bilinear, Bicubic }
enum LensModel {
LENS_SONY_EVID31_BUILTIN, LENS_SONY_DV_BUILTIN, LENS_PENTAX_CMOUNT_4_8, LENS_PENTAX_CMOUNT_8_0,
LENS_PENTAX_CMOUNT_4_2, LENS_UNKNOWN
}
enum | LineDrawingStyle { Solid, Dashed }
enum | LowPassType { LPT_Mean = 0, LPT_Gauss, LPT_Binomial }
determines which lowpass filter is used before subsampling
  • LPT_Mean use non-weighted mean across a window
  • LPT_Gauss weight (in a window) with gaussian function
More...
enum | MatrixInitType { MatrixZero, MatrixIdentity }
can be passed to matrix constructors to init the matrix with the most often used values More...
enum | Navigationmode { modeAxis1 = 1<<0, modeAxis2 = 1<<1, modeAxis3 = 1<<2 }
enum | PointDrawingStyle { Point, PointSprite, Sphere, Box }
different styles when drawing lines, e.g. More...
enum | ScaledImageCanvas_IDs { ID_Scale = 1, ID_Offset }
enum TLineType {
LT_Invalid, E_NE, NE_N, N_NW,
NW_W, W_SW, SW_S, S_SE,
SE_E
}
direction of line if start is in coordinate origin as given by compass More...

Functions

int * | AddGradientType (Param &para, const std::string &name="GradientType", const int group_id=GRP_ALL)
Helper functio to register parameters.
int * | AddGradientType (Param &para, const string &name, const int group_id)
int * | AddLowPassType (Param &para, const std::string &name="LowPassType", const int group_id=GRP_ALL)
Helper functio to register parameters.
int * | AddLowPassType (Param &para, const string &name, const int group_id)
wxString | AsciiToWx (const std::string &string)
Converts a std::string to a wxString.
wxString | AsciiToWx (const char *string)
Converts a C string to a wxString.
std::string | Basename (const std::string &fullname)
get Basename of file, no suffix, no direcory.
double | BetaDistribution (double a, double b, double x)
void biasabort ()
wrapper for abort() Disables unreachable warnings.
void | biasexit (const int status=1)
wrapper for exit() Disables unreachable warnings.
double | ChiSquareCulmProbFun (double x, int deg_freedom)
void ConsoleRedirectIO ()
Extra Console for WIN32 WinMain gui applications.
std::string | CurrentDateTimeString ()
create a string containing date and time like 20060329_173054
std::string | Directory (const std::string &fullname)
get Directory from fullname path JW
template<class T>
bool | Equal (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_tools/floating_point_comparison.html and for discussion
std::string | Extension (const std::string &fullname)
get Extension of file without the "dot" No basename, no direcory.
int | ExtractNumberFromRight (const std::string &inStr, int &number, int &posL, int &posR)
extract numeric value fromstring beginnign from right, e.g.
int | FilenameSequence (const std::string &refFileName, std::string &resultFilename, const int &offsetFromRef, const unsigned int &stepsize=1)
construct i,g .seq filename from a given filename by manipulating the number within base part of RefFilename.
bool | FileReadable (const std::string &s)
double | Gamma (double x)
template<class T>
bool | Greater (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<class T>
bool | GreaterEqual (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<class StorageType>
bool | HaveImagesMatchingROI (const Image< StorageType > &i1, const Image< StorageType > &i2)
Test the the dimensions of the ROI of two images.
double | InvChiSquareCulmProbFun (double x, int deg_freedom)
double | InvGamma (double x)
std::string | LeadingZeroString (const int &n, const unsigned int &digits=DEFAULT_LEADING_ZEROS)
Creates a string with leading zeroes from number JW.
template<typename T>
bool | Less (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
template<typename T>
bool | LessEqual (const T left, const T right, const T eps=std::numeric_limits< T >::epsilon())
comparison function for floating point values
int | LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER, double *ResultingJacobian=NULL, int *ipvt=NULL, double *SumOfSquaredErrors=NULL)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
void * | listenthread (void *data)
these are wrapper to comply to the pthread_create() interface
void | LogCommandLine (int argc, char **argv, const std::string &filename)
void | LogCommandLine (int argc, char **argv, std::ostream &os)
write compilation time/date and all command line arguments to a log file/stream JW
std::string | LowerCase (const std::string &input)
BIAS::Vector3< double > | operator * (const SimilarityTransform &arg1, const BIAS::Vector3< double > &vec)
SimilarityTransform | operator * (SimilarityTransform &arg1, SimilarityTransform &arg2)
Polynom | operator * (const Polynom &a, const double &d)
Polynom | operator * (const double &d, const Polynom &a)
Polynom | operator * (const Polynom &a, const Polynom &b)
template<class T>
Vector2< T > & | operator *= (Vector2< T > &vec, const T &scalar)
Multiplication operator with scalar argument.
Polynom | operator+ (const Polynom &a, const Polynom &b)
template<class T>
Vector2< T > | operator+ (const Vector2< T > &vec, const T &scalar)
Addition operator with scalar argument, returning new vector.
template<class T>
Vector2< T > & | operator+= (Vector2< T > &vec, const T &scalar)
Addition operator with scalar argument.
template<class T>
BIASMathBase_EXPORT Vector2<
T > & 		operator+= (Vector2< T > &vec, const Vector2< T > &argvec)
add operator for two Vectors
Polynom | operator- (const Polynom &a, const Polynom &b)
template<class T>
Vector2< T > & | operator-= (Vector2< T > &vec, const T &scalar)
Substraction operator with scalar argument.
template<class T>
Vector2< T > & | operator-= (Vector2< T > &vec, const Vector2< T > &argvec)
sub operator for two Vectors
template<class T>
Vector2< T > & | operator/= (Vector2< T > &vec, const T &scalar)
Division operator with scalar argument.
template<class T>
BIASMathBase_EXPORT Vector2<
T > & 		operator/= (Vector2< T > &vec, const Vector2< T > &argvec)
elementwise division
BIASUtils_EXPORT std::ostream & | operator<< (std::ostream &os, const MatchDataBase &m)
ostream & | operator<< (ostream &os, const MatchDataBase &m)
BIASUtils_EXPORT std::ostream & | operator<< (std::ostream &os, const GenSynthMatches &m)
ostream & | operator<< (ostream &os, const GenSynthMatches &m)
std::ostream & | operator<< (std::ostream &os, const enum ERejectionType &rt)
ostream & | operator<< (ostream &os, const enum ERejectionType &rt)
ostream & | operator<< (std::ostream &os, const enum ETrackerType &tt)
std::ostream & | operator<< (std::ostream &os, RigParameter &r)
ostream & | operator<< (ostream &os, const DC_GPS &gps)
ostream & | operator<< (ostream &os, const DC_inertial &inert)
ostream & | operator<< (ostream &os, const DC_ptu &ptu)
std::ostream & | operator<< (std::ostream &os, const SimilarityTransform &p)
std::ostream & | operator<< (std::ostream &os, ProjectionParametersPerspective &p)
std::ostream & | operator<< (std::ostream &os, ProjectionParametersBase &p)
std::ostream & | operator<< (std::ostream &os, const Projection &p)
std::ostream & | operator<< (std::ostream &os, const CoordinateTransform3D &p)
std::ostream & | operator<< (std::ostream &os, Conic2D::ConicType &t)
ostream & | operator<< (ostream &os, const FilterMask &fm)
std::ostream & | operator<< (std::ostream &os, const Feat &f)
template<class T>
std::ostream & | operator<< (std::ostream &os, const Vector4< T > &vec)
template<class T>
std::ostream & | operator<< (std::ostream &os, const Vector2< T > &vec)
Output with streams.
template<class T>
std::ostream & | operator<< (std::ostream &os, const BIAS::Vector< T > &vec)
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ROI &roi)
human readable output operator for ROI, mainly for debugging
ostream & | operator<< (ostream &os, const ROI &roi)
ostream & | operator<< (ostream &os, const Position &pos)
ostream & | operator<< (ostream &os, const MetaData &md)
ostream & | operator<< (ostream &os, const AppData &ad)
ostream & | operator<< (ostream &os, const AppData::TAppData &ta)
std::ostream & | operator<< (std::ostream &os, const ImageBase::EColorModel &st)
std::ostream & | operator<< (std::ostream &os, const ImageBase::EStorageType &st)
std::ostream & | operator<< (std::ostream &os, const ImageBase &img2)
std::ostream & | operator<< (std::ostream &os, const PoseParametrization &p)
std::ostream & | operator<< (std::ostream &os, const enum HomgPoint2D::EPosition pos)
template<class BaseClassType>
std::ostream & | operator<< (std::ostream &os, const BaseFactory< BaseClassType > &bf)
bool | operator== (const RMatrixBase &left, const RMatrixBase &right)
BIASUtils_EXPORT std::istream & | operator>> (std::istream &is, MatchDataBase &m)
istream & | operator>> (istream &is, MatchDataBase &m)
istream & | operator>> (istream &is, DC_GPS &gps)
istream & | operator>> (istream &is, DC_inertial &inert)
istream & | operator>> (istream &is, DC_ptu &ptu)
std::istream & | operator>> (std::istream &is, SimilarityTransform &p)
std::istream & | operator>> (std::istream &is, Pose &p)
std::istream & | operator>> (std::istream &is, CoordinateTransform3D &p)
template<class T>
std::istream & | operator>> (std::istream &is, Vector4< T > &vec)
template<class T>
std::istream & | operator>> (std::istream &is, Vector2< T > &vec)
Input with streams.
template<class T>
std::istream & | operator>> (std::istream &s, Matrix3x3< T > &A)
istream & | operator>> (istream &is, MetaData &md)
istream & | operator>> (istream &is, AppData &ad)
std::istream & | operator>> (std::istream &is, BIAS::ImageBase &img)
std::istream & | operator>> (std::istream &is, PoseParametrization &p)
int | Powell (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solve a system of n non-linear equations with n unkowns using the powell hybrid method.
int | PowellExtended (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE)
solve a system of n non-linear equations with n unkowns using the powell hybrid method.
void * | receivethread (void *data)
these are wrapper to comply to the pthread_create() interface
template<class InputImageType, class OutputImageType>
int | Rescale< InputImageType, OutputImageType >_FillInterpolatedColor (const Image< OutputImageType > &src, Image< OutputImageType > &dst)
template<class InputImageType, class OutputImageType>
int | Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey (const Image< OutputImageType > &src, Image< OutputImageType > &dst)
void | SetThreadName (const unsigned long dwThreadID, const char *szThreadName)
void BIASCommon_EXPORT | SplitName (const std::string &fullname, std::string &dir, std::string &base, std::string &suffix)
split full path into:
  • directory
  • basename
  • .suffix (inlcluding dot)

void | SplitName (const std::string &fullname, string &dir, string &base, string &suffix)
std::string | Suffix (const std::string &fullname)
get .suffix of file including the ".dot" No basename, no direcory.
char | ToLower_c (char c)
type correct helper wrapper for tolower required for stl transformations JW
char | ToUpper_c (char c)
type correct helper wrapper for toupper required for stl transformations JW
std::string | UpperCase (const std::string &input)

Variables

const int | attribsRGBAD []
helper to simplify setting up format "red,green,blue,alpha,depth" JW to be used as (int*)&attribsRGBAD JW
const int | attribsRGBASD []
helper to simplify setting up format "red,green,blue,alpha,stencil,depth" JW to be used as (int*)&attribsRGBASD JW
template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< float, float >
template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< unsigned char, float >
template class BIASFilter_EXPORT | FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char >
BIASImageBase_EXPORT | Image
BIASImageBase_EXPORT | ImageConvert
BIASMathBase_EXPORT | Matrix
const float | maxGain = 29.0f
const float | maxShutter = 0.034f
const float | minGain = 0.1f
const float | minShutter = 0.01f
BIASUtils_EXPORT | ParamCallbackInterface
BIASGui_EXPORT | ParamGUI
BIASMathBase_EXPORT | Vector2
BIASMathBase_EXPORT | Vector3
BIASMathBase_EXPORT | Vector4

Detailed Description

This class is used for parametrizing F- and H-matrices, generally for optimization purposes.

Todo:
Avoid inclusion of Magick++ header and use forward declaration here to be able to output runtime error on usage (JW).

Typedef Documentation

typedef struct cornerstruct BIAS::CORNER_LIST[MAX_CORNERS]

Definition at line 211 of file CornerDetectorSusan.hh.

typedef BIAS::Vector4<double> BIAS::RGBAd

Definition at line 37 of file RGBA.hh.

typedef BIAS::Vector4<float> BIAS::RGBAf

Definition at line 31 of file RGBA.hh.

typedef BIAS::Vector4<unsigned char> BIAS::RGBAuc

Definition at line 25 of file RGBA.hh.

typedef BIAS::Vector3<double> BIAS::RGBd

Definition at line 28 of file RGB.hh.

typedef BIAS::Vector3<float> BIAS::RGBf

Definition at line 22 of file RGB.hh.

typedef BIAS::Vector3<unsigned char> BIAS::RGBuc

Definition at line 16 of file RGB.hh.

typedef std::string BIAS::TagType

Definition at line 62 of file BaseFactory.hh.

Enumeration Type Documentation

enum BIAS::BIAS_DEINTERLACE_TYPE

Enumerator:
BIAS_DI_121
BIAS_DI_22

Definition at line 41 of file DeInterlace.hh.

enum BIAS::BIAS_LOG_LEVEL

Enumerator:
BIAS_LOG_NONE
BIAS_LOG_FATAL
BIAS_LOG_WARNING
BIAS_LOG_INFO
BIAS_LOG_DEBUG

Definition at line 110 of file LogFacility.hh.

enum BIAS::CameraDrawingStyle

different styles when drawing cameras, e.g.

in GL or VRML

Enumerator:
PyramidMesh
PyramidSolid
Arrow
PyramidMeshWithArrow

Definition at line 194 of file ThreeDOut.hh.

enum BIAS::CameraModel

Enumerator:
CAMERA_SONY_DFW_X700
CAMERA_SONY_DFW_V500
CAMERA_PTGREY_DRAGONFLY_COLOR
CAMERA_PTGREY_DRAGONFLY_HIRES
CAMERA_PTGREY_DRAGONFLY_BW
CAMERA_PTGREY_SCORPION_COLOR_1600
CAMERA_SONY_EVID31
CAMERA_SONY_DV
CAMERA_UNKNOWN

Definition at line 134 of file VideoSource_DCAM.hh.

enum BIAS::CornerIndices

Enumerator:
LOWER_LEFT
LOWER_RIGHT
UPPER_RIGHT
UPPER_LEFT
OPTICAL_CENTER

Definition at line 41 of file GeometryGL.hh.

enum BIAS::DrawbufferMode

Enumerator:
MONO
STEREO_UNTOUCHED
STEREO_CONSUMER_NV
STEREO_QUADBUFFERED
STEREO_LEFT_RIGHT
STEREO_TWOSCREENS

Definition at line 27 of file RenderModeGL.hh.

enum BIAS::EdataType

Enumerator:
CS_NONE
CS_STRING
CS_FLOAT
CS_INT
CS_BINARY

Definition at line 36 of file CScommClasses.hh.

enum BIAS::EGradType

different gradients to be used by hiogher level classes

  • GT_Sobel3x3 gradient using 3x3 sobelx and sobely filters
  • GT_Gauss gradient using derivatives of gauss with square kernel
  • GT_GaussAsymmetric gradient using derivatives of gauss

Enumerator:
GT_Simple
GT_Sobel3x3
GT_Gauss
GT_GaussAsymmetric

Definition at line 45 of file FilterBase.hh.

enum BIAS::ERejectionType

Enumerator:
RT_Invalid
RT_MAD
RT_X86

Definition at line 62 of file TrackerBaseInterface.hh.

enum BIAS::ERejectionType

Enumerator:
RT_Invalid
RT_MAD
RT_X86

Definition at line 69 of file TrackerBase.hh.

enum BIAS::ETrackerType

defines type or combination of tracker(s) used: simple/weighted estimate a dx,dy, Affine4/Affine6 estimate an affine transformation with 4 resp.

6 parameters and the SimpleAffine start estimating dx,dy and afterwards refine with affine

Enumerator:
TT_Invalid
TT_Simple
TT_Weighted
TT_Affine4
TT_Affine6
TT_SimpleAffine4
TT_SimpleAffine6

Definition at line 66 of file TrackerBase.hh.

enum BIAS::HistMode

Enumerator:
HIST_POINTS
HIST_BARS
HIST_LINES

Definition at line 42 of file Histogram.hh.

enum BIAS::InterpolationMethod

accuracy for resampling

Trilinear averages different pyramid levels based on a local isotropic sampling frequency Anisotropic is the most expensive and uses the local jacobian for anti-aliasing, while preserving texture direction which need no smoothing

Enumerator:
MapNearestNeighbor
MapBilinear
MapBicubic
MapTrilinear
MapAnisotropic

Definition at line 48 of file BackwardMapping.hh.

enum BIAS::InterpolationType

Enumerator:
NearestNeighbour
Bilinear
Bicubic

Definition at line 40 of file Rescale.hh.

enum BIAS::LensModel

Enumerator:
LENS_SONY_EVID31_BUILTIN
LENS_SONY_DV_BUILTIN
LENS_PENTAX_CMOUNT_4_8
LENS_PENTAX_CMOUNT_8_0
LENS_PENTAX_CMOUNT_4_2
LENS_UNKNOWN

Definition at line 146 of file VideoSource_DCAM.hh.

enum BIAS::LineDrawingStyle

Enumerator:
Solid
Dashed

Definition at line 203 of file ThreeDOut.hh.

enum BIAS::LowPassType

determines which lowpass filter is used before subsampling

  • LPT_Mean use non-weighted mean across a window
  • LPT_Gauss weight (in a window) with gaussian function

Enumerator:
LPT_Mean
LPT_Gauss
LPT_Binomial

Definition at line 51 of file FilterBase.hh.

enum BIAS::MatrixInitType

can be passed to matrix constructors to init the matrix with the most often used values

Enumerator:
MatrixZero
MatrixIdentity

Definition at line 54 of file Matrix.hh.

enum BIAS::Navigationmode

Enumerator:
modeAxis1
modeAxis2
modeAxis3

Definition at line 41 of file CameraViewController.hh.

enum BIAS::PointDrawingStyle

different styles when drawing lines, e.g.

in GL or VRML

Enumerator:
Point
PointSprite
Sphere
Box

Definition at line 199 of file ThreeDOut.hh.

enum BIAS::ScaledImageCanvas_IDs

Enumerator:
ID_Scale
ID_Offset

Definition at line 716 of file ImageCanvas.cpp.

enum BIAS::TLineType

direction of line if start is in coordinate origin as given by compass

Enumerator:
LT_Invalid
E_NE
NE_N
N_NW
NW_W
W_SW
SW_S
S_SE
SE_E

Definition at line 48 of file EightWaySymmetry.hh.

Function Documentation

int* BIAS::AddGradientType | ( | Param & | para,
 |  | const std::string & | name = "GradientType",
 |  | const int | group_id = GRP_ALL
 | ) |

Helper functio to register parameters.

int* BIAS::AddGradientType | ( | Param & | para,
 |  | const string & | name,
 |  | const int | group_id
 | ) |

Definition at line 135 of file FilterBase.cpp.

References BIAS::Param::CheckParam(), BIAS::Param::GetParamEnum(), GT_Gauss, GT_GaussAsymmetric, GT_Sobel3x3, and res.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_(), and main().

int* BIAS::AddLowPassType | ( | Param & | para,
 |  | const std::string & | name = "LowPassType",
 |  | const int | group_id = GRP_ALL
 | ) |

Helper functio to register parameters.

int* BIAS::AddLowPassType | ( | Param & | para,
 |  | const string & | name,
 |  | const int | group_id
 | ) |

Definition at line 158 of file FilterBase.cpp.

References BIAS::Param::CheckParam(), BIAS::Param::GetParamEnum(), LPT_Binomial, LPT_Gauss, LPT_Mean, and res.

Referenced by BIAS::Tracker< StorageType, CalculationType >::AddParameter_().

wxString BIAS::AsciiToWx ( const std::string & string ) [inline]

Converts a std::string to a wxString.

Definition at line 26 of file StringConv.hh.

wxString BIAS::AsciiToWx ( const char * string ) [inline]

Converts a C string to a wxString.

Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 20 of file StringConv.hh.

Referenced by BIAS::ParamGUIPanel::AddBoolWidgets(), BIAS::ParamGUIPanel::AddDoubleWidgets(), BIAS::ParamGUIPanel::AddEnumWidgets(), BIAS::ParamGUIPanel::AddIntWidgets(), BIAS::ParamGUIPanel::AddStringWidgets(), BIAS::ParamGUIPanel::AddVecDblWidgets(), BIAS::ParamGUIPanel::AddVecIntWidgets(), BIAS::ParamGUI::GetNotebook(), MainFrame::LoadImageFromList(), MainFrame::LoadImages(), MainFrame::LoadImagesAndCalculate(), MainFrame::OnAbout(), MyFrame::OnAbout(), BIAS::OpenGLCanvasBase::OnChar(), BIAS::dndFileTarget::OnDropFiles(), MainFrame::OnInfo(), MainFrame::OnMetaData(), CutoutFrame::OnMotion(), BIAS::ScaledImageCanvas::SetStatusText(), BIAS::OpenGLCanvasBase::ShowFPS(), BIAS::OpenGLCanvasBase::ShowValue(), and BIAS::ImageCanvas::Zoom().

std::string BIASCommon_EXPORT BIAS::Basename ( const std::string & fullname )

get Basename of file, no suffix, no direcory.

Definition at line 129 of file FileHandling.cpp.

References SplitName().

BIASMathAlgo_EXPORT double BIAS::BetaDistribution | ( | double | a,
 |  | double | b,
 |  | double | x
 | ) |

Definition at line 58 of file GSL.cpp.

void BIASDebug_EXPORT BIAS::biasabort ( )

wrapper for abort() Disables unreachable warnings.

Cannot be header implemented beause to avoid multiply defined symbols.

Author:
Jan Woetzel

Definition at line 16 of file biasabort.cpp.

void BIASDebug_EXPORT BIAS::biasexit ( const int status = 1 )

wrapper for exit() Disables unreachable warnings.

Cannot be header implemented beause to avoid multiply defined symbols.

Author:
Jan Woetzel

Definition at line 16 of file biasexit.cpp.

BIASMathAlgo_EXPORT double BIAS::ChiSquareCulmProbFun | ( | double | x,
 |  | int | deg_freedom
 | ) |

Definition at line 34 of file GSL.cpp.

std::string BIASCommon_EXPORT BIAS::CurrentDateTimeString ( )

create a string containing date and time like 20060329_173054

Author:
koeser

Definition at line 294 of file FileHandling.cpp.

std::string BIASCommon_EXPORT BIAS::Directory ( const std::string & fullname )

get Directory from fullname path JW

Definition at line 120 of file FileHandling.cpp.

References SplitName().

template<class T>
bool BIAS::Equal | ( | const T | left,
 |  | const T | right,
 |  | const T | eps = std::numeric_limits<T>::epsilon()
 | ) | [inline]

comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_tools/floating_point_comparison.html and for discussion

Author:
woelk 02/2006

Definition at line 65 of file CompareFloatingPoint.hh.

Referenced by BIAS::PlueckerMatrix::CheckConstraint_(), BIAS::HomgPoint3DCov::CheckSymmetry_(), BIAS::HomgPoint2DCov::CheckSymmetry_(), GreaterEqual(), BIAS::PMDImageProc::HFromMeta_(), BIAS::HomgPoint3DCov::IsHomogenized(), BIAS::HomgPoint2DCov::IsHomogenized(), BIAS::HomgPoint3DCov::IsZero(), BIAS::HomgPoint2DCov::IsZero(), LessEqual(), main(), BIAS::ProjectionParametersBase::Rescale(), BIAS::SVD::Sqrt(), BIAS::SVD::SqrtT(), and BIAS::PoseParametrizationCovariance::Transform().

std::string BIASCommon_EXPORT BIAS::Extension ( const std::string & fullname )

get Extension of file without the "dot" No basename, no direcory.

Definition at line 147 of file FileHandling.cpp.

References Suffix().

Referenced by BIAS::ImageIO::ExtensionName(), and BIAS::ImageIO::GetFileFormat().

int BIASCommon_EXPORT BIAS::ExtractNumberFromRight | ( | const std::string & | inStr,
 |  | int & | number,
 |  | int & | posL,
 |  | int & | posR
 | ) |

extract numeric value fromstring beginnign from right, e.g.

"blah042foo.txt" --> 42 and the pos. of the 0 and 2. Useful helper for FilenameSequence JW

Definition at line 313 of file FileHandling.cpp.

References act, and done.

Referenced by FilenameSequence().

int BIASCommon_EXPORT BIAS::FilenameSequence | ( | const std::string & | refFileName,
 |  | std::string & | resultFilename,
 |  | const int & | offsetFromRef,
 |  | const unsigned int & | stepsize = 1
 | ) |

construct i,g .seq filename from a given filename by manipulating the number within base part of RefFilename.

of an image sequence given a ref. filename and an offset. offset is the number of frames forward or backward from ref. image. stepsize is teh number of increment/decrement per offset. e.g ref=100, offset=2, stepsize=7 --> 114

Returns:
0 for success, other for failure.
Author:
Jan Woetzel

Definition at line 374 of file FileHandling.cpp.

References BIASASSERT, BIASERR, ExtractNumberFromRight(), LeadingZeroString(), and SplitName().

bool BIASCommon_EXPORT BIAS::FileReadable ( const std::string & s )

Definition at line 66 of file FileHandling.cpp.

BIASMathAlgo_EXPORT double BIAS::Gamma ( double x )

Definition at line 46 of file GSL.cpp.

template<class T>
bool BIAS::Greater | ( | const T | left,
 |  | const T | right,
 |  | const T | eps = std::numeric_limits<T>::epsilon()
 | ) | [inline]

comparison function for floating point values

Author:
woelk 02/2006

Definition at line 49 of file CompareFloatingPoint.hh.

Referenced by GreaterEqual().

template<class T>
bool BIAS::GreaterEqual | ( | const T | left,
 |  | const T | right,
 |  | const T | eps = std::numeric_limits<T>::epsilon()
 | ) | [inline]

comparison function for floating point values

Author:
woelk 02/2006

Definition at line 56 of file CompareFloatingPoint.hh.

References Equal(), and Greater().

Referenced by BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class StorageType>
bool BIAS::HaveImagesMatchingROI | ( | const Image< StorageType > & | i1,
 |  | const Image< StorageType > & | i2
 | ) | [inline]

Test the the dimensions of the ROI of two images.

If both have none test the dimensions of the whole image Abort in any case of error.

Definition at line 98 of file Operators.cpp.

References BIASERR, BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), and BIAS::ImageBase::PrintROI().

Referenced by BIAS::Image< StorageType >::AbsDiff(), BIAS::Image< StorageType >::operator *(), BIAS::Image< StorageType >::operator+(), BIAS::Image< StorageType >::operator-(), BIAS::Image< StorageType >::operator/(), BIAS::Image< unsigned char >::operator|(), and BIAS::Image< StorageType >::operator|().

BIASMathAlgo_EXPORT double BIAS::InvChiSquareCulmProbFun | ( | double | x,
 |  | int | deg_freedom
 | ) |

Definition at line 40 of file GSL.cpp.

Referenced by main().

BIASMathAlgo_EXPORT double BIAS::InvGamma ( double x )

Definition at line 52 of file GSL.cpp.

std::string BIASCommon_EXPORT BIAS::LeadingZeroString | ( | const int & | n,
 |  | const unsigned int & | digits = DEFAULT_LEADING_ZEROS
 | ) |

Creates a string with leading zeroes from number JW.

Definition at line 197 of file FileHandling.cpp.

References BIASERR.

Referenced by FilenameSequence(), and BIAS::OpenGLCanvasBase::ScreenShot().

template<typename T>
bool BIAS::Less | ( | const T | left,
 |  | const T | right,
 |  | const T | eps = std::numeric_limits<T>::epsilon()
 | ) | [inline]

comparison function for floating point values

Author:
woelk 02/2006

Definition at line 35 of file CompareFloatingPoint.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_(), and LessEqual().

template<typename T>
bool BIAS::LessEqual | ( | const T | left,
 |  | const T | right,
 |  | const T | eps = std::numeric_limits<T>::epsilon()
 | ) | [inline]

comparison function for floating point values

Author:
woelk 02/2006

Definition at line 42 of file CompareFloatingPoint.hh.

References Equal(), and Less().

void * BIAS::listenthread ( void * data )

these are wrapper to comply to the pthread_create() interface

Definition at line 86 of file CScommServer.cpp.

References BIAS::CScommBase::AcceptConn_(), BIASERR, BIAS::CScommBase::connectPort_, D_CS_DEFAULT_PORT, D_CS_LISTENER, BIAS::Debug::GetDebugLevel(), mygetpid, BIAS::CScommBase::portChange_, res, BIAS::CScommServer::terminateListener_, BIAS::CScommBase::verbose_, and BIAS::CScommBase::verboseOut_.

void BIASCommon_EXPORT BIAS::LogCommandLine | ( | int | argc,
 |  | char ** | argv,
 |  | const std::string & | filename
 | ) |

Definition at line 178 of file FileHandling.cpp.

References BIASERR, and LogCommandLine().

void BIASCommon_EXPORT BIAS::LogCommandLine | ( | int | argc,
 |  | char ** | argv,
 |  | std::ostream & | os
 | ) |

write compilation time/date and all command line arguments to a log file/stream JW

Definition at line 165 of file FileHandling.cpp.

Referenced by LogCommandLine().

std::string BIASCommon_EXPORT BIAS::LowerCase ( const std::string & input )

Returns:
lower case string of input JW

Definition at line 274 of file FileHandling.cpp.

References ToLower_c().

Referenced by BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ExtensionName(), and BIAS::ImageIO::GetFileFormat().

BIAS::Vector3<double> BIAS::operator * | ( | const SimilarityTransform & | arg1,
 |  | const BIAS::Vector3< double > & | vec
 | ) |

Definition at line 178 of file SimilarityTransform.hh.

References BIAS::SimilarityTransform::MultVec().

SimilarityTransform BIAS::operator * | ( | SimilarityTransform & | arg1,
 |  | SimilarityTransform & | arg2
 | ) |

Definition at line 170 of file SimilarityTransform.hh.

References BIAS::SimilarityTransform::Mult().

Polynom BIAS::operator * | ( | const Polynom & | a,
 |  | const double & | d
 | ) | [inline]

Definition at line 262 of file Polynom.hh.

Polynom BIAS::operator * | ( | const double & | d,
 |  | const Polynom & | a
 | ) | [inline]

Definition at line 252 of file Polynom.hh.

References BIAS::Polynom::GetOrder().

Polynom BIAS::operator * | ( | const Polynom & | a,
 |  | const Polynom & | b
 | ) | [inline]

Definition at line 240 of file Polynom.hh.

References BIAS::Polynom::GetOrder().

template<class T>
Vector2<T>& BIAS::operator *= | ( | Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [inline]

Multiplication operator with scalar argument.

Author:
Ingo Thomsen, tested

Definition at line 677 of file Vector2.hh.

References BIAS::Vector2< T >::MultiplyIP().

Polynom BIAS::operator+ | ( | const Polynom & | a,
 |  | const Polynom & | b
 | ) | [inline]

Definition at line 218 of file Polynom.hh.

References BIAS::Polynom::GetOrder(), and BIAS::Polynom::SetOrder().

template<class T>
Vector2<T> BIAS::operator+ | ( | const Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [inline]

Addition operator with scalar argument, returning new vector.

Author:
Ingo Thomsen, tested

Definition at line 90 of file Operators.hh.

References BIAS::Vector2< T >::Add().

template<class T>
Vector2<T>& BIAS::operator+= | ( | Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [inline]

Addition operator with scalar argument.

Author:
Ingo Thomsen, tested

Definition at line 661 of file Vector2.hh.

References BIAS::Vector2< T >::AddIP().

template<class T>
BIASMathBase_EXPORT Vector2<T>& BIAS::operator+= | ( | Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [inline]

add operator for two Vectors

Author:
Ingo Thomsen, tested

Definition at line 634 of file Vector2.hh.

References BIAS::Vector2< T >::Add().

Polynom BIAS::operator- | ( | const Polynom & | a,
 |  | const Polynom & | b
 | ) | [inline]

Definition at line 229 of file Polynom.hh.

References BIAS::Polynom::GetOrder(), and BIAS::Polynom::SetOrder().

template<class T>
Vector2<T>& BIAS::operator-= | ( | Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [inline]

Substraction operator with scalar argument.

Author:
Ingo Thomsen, tested

Definition at line 669 of file Vector2.hh.

References BIAS::Vector2< T >::SubIP().

template<class T>
Vector2<T>& BIAS::operator-= | ( | Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [inline]

sub operator for two Vectors

Author:
Ingo Thomsen tested

Definition at line 643 of file Vector2.hh.

References BIAS::Vector2< T >::Sub().

template<class T>
Vector2<T>& BIAS::operator/= | ( | Vector2< T > & | vec,
 |  | const T & | scalar
 | ) | [inline]

Division operator with scalar argument.

Author:
Ingo Thomsen, tested

Definition at line 685 of file Vector2.hh.

References BIAS::Vector2< T >::DivideIP().

template<class T>
BIASMathBase_EXPORT Vector2<T>& BIAS::operator/= | ( | Vector2< T > & | vec,
 |  | const Vector2< T > & | argvec
 | ) | [inline]

elementwise division

Author:
JW

Definition at line 650 of file Vector2.hh.

References BIAS::Vector2< T >::DivideIP().

BIASUtils_EXPORT std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const MatchDataBase & | m
 | ) |

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const MatchDataBase & | m
 | ) |

Definition at line 306 of file MatchDataBase.cpp.

References BIAS::MatchDataBase::_K, BIAS::MatchDataBase::_NormalizedPoints, BIAS::MatchDataBase::_NumImages, BIAS::MatchDataBase::_NumPoints, BIAS::MatchDataBase::_P, and BIAS::MatchDataBase::_Points.

BIASUtils_EXPORT std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const GenSynthMatches & | m
 | ) |

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const GenSynthMatches & | m
 | ) |

Definition at line 35 of file GenSynthMatches.cpp.

References BIAS::GenSynthMatches::_GT_Points, BIAS::GenSynthMatches::_MovingPoints, BIAS::MatchDataBase::_NumImages, BIAS::GenSynthMatches::_NumMovingObjects, BIAS::GenSynthMatches::_NumMovingPoints, BIAS::GenSynthMatches::_NumOutliers, BIAS::GenSynthMatches::_NumStaticPoints, BIAS::MatchDataBase::_Points, and BIAS::GenSynthMatches::_StaticPoints.

std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const enum ERejectionType & | rt
 | ) |

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const enum ERejectionType & | rt
 | ) |

Definition at line 74 of file TrackerBase.cpp.

References RT_Invalid, RT_MAD, and RT_X86.

std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const enum ETrackerType & | tt
 | ) |

Definition at line 42 of file TrackerBase.cpp.

std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | BIAS::RigParameter & | r
 | ) |

Definition at line 624 of file RigParameter.cpp.

References BIAS::RigParameter::GetCalibrations(), BIAS::RigParameter::GetCameraCenters(), BIAS::RigParameter::GetCameraParams(), and BIAS::RigParameter::GetRotations().

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const DC_GPS & | gps
 | ) |

Definition at line 475 of file DCData.cpp.

References BIAS::DC_GPS::azimuth, BIAS::DC_GPS::clothoidParameter, BIAS::DC_GPS::curvature, BIAS::DC_GPS::distanceToMap, BIAS::DC_GPS::framenum, BIAS::DC_GPS::gpsTime, BIAS::DC_GPS::latPos, BIAS::DC_GPS::longPos, BIAS::DC_GPS::mapIndex, BIAS::DC_GPS::offset, BIAS::DC_GPS::scaleFactorSpeed, BIAS::DC_GPS::speed, and BIAS::DC_GPS::yawRateOffset.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const DC_inertial & | inert
 | ) |

Definition at line 257 of file DCData.cpp.

References BIAS::DC_inertial::AcceleratorPedal, BIAS::DC_inertial::ArtFlags, BIAS::DC_inertial::ArtLeadVehicleDistance, BIAS::DC_inertial::ArtLeadVehicleVelocity, BIAS::DC_inertial::ArtSollVelocity, BIAS::DC_inertial::BlinkLever, BIAS::DC_inertial::EngineSpeed, BIAS::DC_inertial::Gear, BIAS::DC_inertial::LatAcceleration, BIAS::DC_inertial::LongAcceleration, BIAS::DC_inertial::Pitch, BIAS::DC_inertial::Speed, BIAS::DC_inertial::SteeringAngle, BIAS::DC_inertial::SteeringWheelLever, BIAS::DC_inertial::TempomatLever, BIAS::DC_inertial::VehicleFlags, BIAS::DC_inertial::Yaw, BIAS::DC_inertial::YawRateOffset, and BIAS::DC_inertial::YawRateRaw.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const DC_ptu & | ptu
 | ) |

Definition at line 139 of file DCData.cpp.

References BIAS::DC_ptu::PanPos, BIAS::DC_ptu::StartReadTimeStamp, BIAS::DC_ptu::StopReadTimeStamp, BIAS::DC_ptu::TiltPos, and BIAS::DC_ptu::TimeStamp.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const SimilarityTransform & | p
 | ) | [inline]

Definition at line 157 of file SimilarityTransform.hh.

References BIAS::SimilarityTransform::C_, BIAS::SimilarityTransform::Q_, and BIAS::SimilarityTransform::scale_.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersPerspective & | p
 | ) | [inline]

Definition at line 254 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersPerspective::GetK(), BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and BIAS::ProjectionParametersBase::width_.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | ProjectionParametersBase & | p
 | ) | [inline]

Definition at line 336 of file ProjectionParametersBase.hh.

References BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersBase::GetR(), BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersBase::principalX_, BIAS::ProjectionParametersBase::principalY_, and BIAS::ProjectionParametersBase::width_.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const Projection & | p
 | ) | [inline]

Definition at line 333 of file Projection.hh.

References it.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const CoordinateTransform3D & | p
 | ) | [inline]

Definition at line 251 of file CoordinateTransform3D.hh.

References BIAS::CoordinateTransform3D::C_, BIAS::CoordinateTransform3D::Q_, and BIAS::CoordinateTransform3D::scale_.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | Conic2D::ConicType & | t
 | ) | [inline]

Definition at line 237 of file Conic2D.hh.

References BIASABORT, BIASERR, BIAS::Conic2D::DoubleLine, BIAS::Conic2D::Ellipse, BIAS::Conic2D::Empty, BIAS::Conic2D::Hyperbola, BIAS::Conic2D::Parabola, BIAS::Conic2D::Point, BIAS::Conic2D::SingleLine, BIAS::Conic2D::Unknown, and BIAS::Conic2D::WholePlane.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const FilterMask & | fm
 | ) |

Definition at line 268 of file FilterMask.cpp.

References BIAS::FilterMask::_fHoriz, BIAS::FilterMask::_fKernel, BIAS::FilterMask::_fVert, BIAS::FilterMask::_HorizRightShift, BIAS::FilterMask::_KernelRightShift, BIAS::FilterMask::_Separable, BIAS::FilterMask::_sHoriz, BIAS::FilterMask::_sKernel, BIAS::FilterMask::_sVert, and BIAS::FilterMask::_VertRightShift.

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const Feat & | f
 | ) | [inline]

Definition at line 52 of file CornerDetectorGradient.hh.

References BIAS::Feat::val, BIAS::Feat::x, and BIAS::Feat::y.

template<class T>
std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const Vector4< T > & | vec
 | ) |

Definition at line 659 of file Vector4.hh.

References VECTOR4SIZE.

template<class T>
std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const Vector2< T > & | vec
 | ) |

Output with streams.

Author:
Jan Woetzel alpha (03/01/2002)

Definition at line 576 of file Vector2.hh.

References BIAS::Vector2< T >::GetData(), and VECTOR2SIZE.

template<class T>
std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const BIAS::Vector< T > & | vec
 | ) | [related]

Definition at line 414 of file Vector.hh.

BIASImageBase_EXPORT std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const ROI & | roi
 | ) |

human readable output operator for ROI, mainly for debugging

Author:
woelk 07/2005

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const ROI & | roi
 | ) |

Definition at line 49 of file ROI.cpp.

References it, BIAS::ROI::LowerRightX_, BIAS::ROI::LowerRightY_, BIAS::ROI::MaskValid_, ROI_VERSION_NUMBER, BIAS::ROI::UpperLeftX_, BIAS::ROI::UpperLeftY_, BIAS::ROI::Vector_, BIAS::ROI::VectorValid_, and BIAS::ROI::Version_.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const Position & | pos
 | ) |

Definition at line 43 of file ROI.cpp.

References BIAS::Position::x, and BIAS::Position::y.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const MetaData & | md
 | ) |

Definition at line 588 of file MetaData.cpp.

References BIASERR.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const AppData & | ad
 | ) |

Definition at line 181 of file MetaData.cpp.

References BIAS::AppData::data, BIAS::AppData::length, BIAS::AppData::MD_USE_ASCII, BIAS::AppData::sdata, BIAS::AppData::stag, and BIAS::AppData::tag.

ostream& BIAS::operator<< | ( | ostream & | os,
 |  | const AppData::TAppData & | ta
 | ) |

Definition at line 145 of file MetaData.cpp.

References BIAS::AppData::MD_ASCII_DATA, BIAS::AppData::MD_CVector, BIAS::AppData::MD_Focal_Length, BIAS::AppData::MD_HomgPoint2D, BIAS::AppData::MD_Inertial_Sensor, BIAS::AppData::MD_Invalid, BIAS::AppData::MD_KMatrix, BIAS::AppData::MD_Orientation, BIAS::AppData::MD_PMatrix, BIAS::AppData::MD_PTU_Data, BIAS::AppData::MD_RMatrix, BIAS::AppData::MD_TimeStamp, BIAS::AppData::MD_USE_ASCII, and BIAS::AppData::MD_UUID.

BIASImageBase_EXPORT std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const ImageBase::EColorModel & | st
 | ) |

Definition at line 1309 of file ImageBase.cpp.

References BIAS::ImageBase::CM_Bayer_BGGR, BIAS::ImageBase::CM_Bayer_GBRG, BIAS::ImageBase::CM_Bayer_GRBG, BIAS::ImageBase::CM_Bayer_RGGB, BIAS::ImageBase::CM_BGR, BIAS::ImageBase::CM_DV, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_HSI_OBS, BIAS::ImageBase::CM_hsL, BIAS::ImageBase::CM_HSL, BIAS::ImageBase::CM_HSV, BIAS::ImageBase::CM_invalid, BIAS::ImageBase::CM_RGB, BIAS::ImageBase::CM_RGBA, BIAS::ImageBase::CM_UYVY422, BIAS::ImageBase::CM_YUV411, BIAS::ImageBase::CM_YUV420P, BIAS::ImageBase::CM_YUV444, and BIAS::ImageBase::CM_YUYV422.

BIASImageBase_EXPORT std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const ImageBase::EStorageType & | st
 | ) |

Definition at line 1289 of file ImageBase.cpp.

References BIAS::ImageBase::ST_char, BIAS::ImageBase::ST_double, BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_int, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_shortint, BIAS::ImageBase::ST_unsignedchar, BIAS::ImageBase::ST_unsignedint, and BIAS::ImageBase::ST_unsignedshortint.

BIASImageBase_EXPORT std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const ImageBase & | img2
 | ) |

Definition at line 1234 of file ImageBase.cpp.

References BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::UUID::clear(), BIAS::ImageBase::ColorModel_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetUID(), BIAS::ImageBase::GetVersionNumber(), BIAS::ImageBase::Height_, IDENTIFIER, IDENTIFIER_LENGTH, img, BIAS::ImageBase::InterleavedDataOrder_, BIAS::UUID::IsValid(), BIAS::ImageBase::StorageType_, Version, BIAS::ImageBase::Width_, and BIAS::ImageBase::WidthStep_.

std::ostream & BIAS::operator<< | ( | std::ostream & | os,
 |  | const PoseParametrization & | p
 | ) |

Definition at line 188 of file PoseParametrization.cpp.

References BIAS::PoseParametrization::GetCovarianceMatrix(), BIAS::PoseParametrization::GetOrientation(), and BIAS::PoseParametrization::GetPosition().

std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const enum HomgPoint2D::EPosition | pos
 | ) |

template<class BaseClassType>
std::ostream& BIAS::operator<< | ( | std::ostream & | os,
 |  | const BaseFactory< BaseClassType > & | bf
 | ) |

Definition at line 284 of file BaseFactory.hh.

References it, and BIAS::BaseFactory< BaseClassType >::Map_.

bool BIAS::operator== | ( | const RMatrixBase & | left,
 |  | const RMatrixBase & | right
 | ) |

Definition at line 322 of file RMatrixBase.cpp.

References BIAS::Matrix< T >::GetData().

Referenced by BIAS::Vector3< HOMGPOINT2D_TYPE >::operator!=(), BIAS::Vector< FM_INT >::operator!=(), and BIAS::Polynom::operator!=().

BIASUtils_EXPORT std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | MatchDataBase & | m
 | ) |

istream& BIAS::operator>> | ( | istream & | is,
 |  | MatchDataBase & | m
 | ) |

Definition at line 332 of file MatchDataBase.cpp.

References BIASERR.

istream& BIAS::operator>> | ( | istream & | is,
 |  | DC_GPS & | gps
 | ) |

Definition at line 450 of file DCData.cpp.

References BIAS::DC_GPS::azimuth, BIASERR, BIAS::DC_GPS::clothoidParameter, BIAS::DC_GPS::curvature, BIAS::DC_GPS::distanceToMap, BIAS::DC_GPS::framenum, BIAS::DC_GPS::gpsTime, BIAS::DC_GPS::latPos, BIAS::DC_GPS::longPos, BIAS::DC_GPS::mapIndex, BIAS::DC_GPS::offset, BIAS::DC_GPS::scaleFactorSpeed, BIAS::DC_GPS::speed, and BIAS::DC_GPS::yawRateOffset.

istream& BIAS::operator>> | ( | istream & | is,
 |  | DC_inertial & | inert
 | ) |

Definition at line 218 of file DCData.cpp.

References BIAS::DC_inertial::AcceleratorPedal, BIAS::DC_inertial::ArtFlags, BIAS::DC_inertial::ArtLeadVehicleDistance, BIAS::DC_inertial::ArtLeadVehicleVelocity, BIAS::DC_inertial::ArtSollVelocity, BIASERR, BIAS::DC_inertial::BlinkLever, BIAS::DC_inertial::EngineSpeed, BIAS::DC_inertial::Gear, BIAS::DC_inertial::LatAcceleration, BIAS::DC_inertial::LongAcceleration, BIAS::DC_inertial::Pitch, BIAS::DC_inertial::Speed, BIAS::DC_inertial::SteeringAngle, BIAS::DC_inertial::SteeringWheelLever, BIAS::DC_inertial::TempomatLever, BIAS::DC_inertial::VehicleFlags, BIAS::DC_inertial::Yaw, BIAS::DC_inertial::YawRateOffset, and BIAS::DC_inertial::YawRateRaw.

istream& BIAS::operator>> | ( | istream & | is,
 |  | DC_ptu & | ptu
 | ) |

Definition at line 110 of file DCData.cpp.

References BIASERR, BIAS::DC_ptu::PanPos, BIAS::DC_ptu::StartReadTimeStamp, BIAS::DC_ptu::StopReadTimeStamp, BIAS::DC_ptu::TiltPos, and BIAS::DC_ptu::TimeStamp.

std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | SimilarityTransform & | p
 | ) | [inline]

Definition at line 163 of file SimilarityTransform.hh.

References BIAS::SimilarityTransform::C_, BIAS::SimilarityTransform::Q_, and BIAS::SimilarityTransform::scale_.

std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | Pose & | p
 | ) | [inline]

Definition at line 155 of file Pose.hh.

References BIASERR, BIAS::CoordinateTransform3D::C_, BIAS::CoordinateTransform3D::Q_, and BIAS::CoordinateTransform3D::scale_.

std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | CoordinateTransform3D & | p
 | ) | [inline]

Definition at line 257 of file CoordinateTransform3D.hh.

References BIAS::CoordinateTransform3D::C_, BIAS::CoordinateTransform3D::Q_, and BIAS::CoordinateTransform3D::scale_.

template<class T>
std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | Vector4< T > & | vec
 | ) |

Definition at line 687 of file Vector4.hh.

References BIASBREAK, BIASERR, BIAS::Vector4< T >::GetData(), and BIAS::Vector4< T >::Size().

template<class T>
std::istream& BIAS::operator>> | ( | std::istream & | is,
 |  | Vector2< T > & | vec
 | ) |

Input with streams.

Author:
Jan Woetzel untested (03/01/2002)

Definition at line 611 of file Vector2.hh.

References BIASERR, BIAS::Vector2< T >::GetData(), and BIAS::Vector2< T >::Size().

template<class T>
std::istream& BIAS::operator>> | ( | std::istream & | s,
 |  | Matrix3x3< T > & | A
 | ) | [inline]

Definition at line 501 of file Matrix3x3.hh.

References M, BIAS::Matrix3x3< T >::newsize(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

istream& BIAS::operator>> | ( | istream & | is,
 |  | MetaData & | md
 | ) |

Definition at line 538 of file MetaData.cpp.

References BIAS::AppData::Clear().

istream& BIAS::operator>> | ( | istream & | is,
 |  | AppData & | ad
 | ) |

Definition at line 215 of file MetaData.cpp.

References BIASERR, BIAS::AppData::data, BIAS::AppData::length, MD_LINE_LENGTH, BIAS::AppData::MD_USE_ASCII, BIAS::AppData::sdata, BIAS::AppData::stag, and BIAS::AppData::tag.

BIASImageBase_EXPORT std::istream & BIAS::operator>> | ( | std::istream & | is,
 |  | BIAS::ImageBase & | img
 | ) |

Bug:
fake reading of uuid because of bug, id is DISABLED !

Definition at line 1339 of file ImageBase.cpp.

References BIAS::ImageBase::_UID, BIASERR, BIAS::ImageBase::BitDepth_, BIAS::ImageBase::ChannelCount_, BIAS::ImageBase::ColorModel_, BIAS::ImageBase::Depth_, BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), IDENTIFIER_LENGTH, BIAS::ImageBase::ImageData_, BIAS::ImageBase::Init(), BIAS::ImageBase::InterleavedDataOrder_, BIAS::ImageBase::IsEmpty(), BIAS::ROI::ReadBinary(), BIAS::ImageBase::Release(), BIAS::ROI::SetCorners(), BIAS::UUID::SetFromString(), Version, and BIAS::ImageBase::WidthStep_.

std::istream & BIAS::operator>> | ( | std::istream & | is,
 |  | PoseParametrization & | p
 | ) |

Definition at line 197 of file PoseParametrization.cpp.

References BIAS::PoseParametrization::Set().

void * BIAS::receivethread ( void * data )

these are wrapper to comply to the pthread_create() interface

Definition at line 1007 of file CScommBase.cpp.

References BIAS::CSCommWithClientNr::comm, BIAS::CSCommWithClientNr::commNr, and BIAS::CScommBase::receiveThread_().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedColor | ( | const Image< OutputImageType > & | src,
 |  | Image< OutputImageType > & | dst
 | ) |

Definition at line 2207 of file Rescale.cpp.

References BIASASSERT, BIASDOUT, D_FILTERBASE_CALLSTACK, D_RESCALE_WRITE_IMG, BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsInterleaved(), and BIAS::ImageIO::Write().

template<class InputImageType, class OutputImageType>
int BIAS::Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey | ( | const Image< OutputImageType > & | src,
 |  | Image< OutputImageType > & | dst
 | ) |

Definition at line 2108 of file Rescale.cpp.

References BIASASSERT, BIASDOUT, BIAS::ImageBase::CM_Grey, D_FILTERBASE_CALLSTACK, D_RESCALE_WRITE_IMG, BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::IsEmpty(), and BIAS::ImageIO::Write().

void BIAS::SetThreadName | ( | const unsigned long | dwThreadID,
 |  | const char * | szThreadName
 | ) |

Definition at line 25 of file ThreadNaming.cpp.

References BIASWARN.

void BIASCommon_EXPORT BIAS::SplitName | ( | const std::string & | fullname,
 |  | std::string & | dir,
 |  | std::string & | base,
 |  | std::string & | suffix
 | ) |

split full path into:

  • directory
  • basename
  • .suffix (inlcluding dot)

Todo:
: Extract machine name or IP for SMB network shares for WIN32, e.g. \machine and fix backslashes on Win32.
Author:
Jan Woetzel 03/2005

void BIAS::SplitName | ( | const std::string & | fullname,
 |  | string & | dir,
 |  | string & | base,
 |  | string & | suffix
 | ) |

Examples:
ExampleFileNames.cpp.

Definition at line 77 of file FileHandling.cpp.

Referenced by Basename(), Directory(), FilenameSequence(), main(), and Suffix().

std::string BIASCommon_EXPORT BIAS::Suffix ( const std::string & fullname )

get .suffix of file including the ".dot" No basename, no direcory.

Definition at line 138 of file FileHandling.cpp.

References SplitName().

Referenced by BIAS::ImageIO::ExportMagickPP(), and Extension().

char BIAS::ToLower_c ( char c )

type correct helper wrapper for tolower required for stl transformations JW

Definition at line 264 of file FileHandling.cpp.

Referenced by LowerCase().

char BIAS::ToUpper_c ( char c )

type correct helper wrapper for toupper required for stl transformations JW

Definition at line 268 of file FileHandling.cpp.

Referenced by UpperCase().

std::string BIASCommon_EXPORT BIAS::UpperCase ( const std::string & input )

Returns:
lower case string of input JW

Definition at line 284 of file FileHandling.cpp.

References ToUpper_c().

Variable Documentation

const int BIAS::attribsRGBAD[]

Initial value:

 {  WX_GL_RGBA,
    WX_GL_MIN_RED, 1,
    WX_GL_MIN_GREEN, 1,
    WX_GL_MIN_BLUE, 1,
    WX_GL_MIN_ALPHA, 1,
    WX_GL_STENCIL_SIZE, 0,
    WX_GL_DEPTH_SIZE, 1,
    WX_GL_DOUBLEBUFFER,
    0
  }
helper to simplify setting up format "red,green,blue,alpha,depth" JW to be used as (int*)&attribsRGBAD JW

Definition at line 76 of file OpenGLCanvasBase.hh.

const int BIAS::attribsRGBASD[]

Initial value:

 {  WX_GL_RGBA,
    WX_GL_MIN_RED, 1,
    WX_GL_MIN_GREEN, 1,
    WX_GL_MIN_BLUE, 1,
    WX_GL_MIN_ALPHA, 1,
    WX_GL_STENCIL_SIZE, 1,
    WX_GL_DEPTH_SIZE, 1,
    WX_GL_DOUBLEBUFFER,
    0
  }
helper to simplify setting up format "red,green,blue,alpha,stencil,depth" JW to be used as (int*)&attribsRGBASD JW

Examples:
ExampleOpenGLCanvas.cpp.

Definition at line 89 of file OpenGLCanvasBase.hh.

template class BIASFilter_EXPORT BIAS::FILTER_INSTANTIATION_CLASS< float, float >

Definition at line 571 of file GradientSimple.cpp.

template class BIASFilter_EXPORT BIAS::FILTER_INSTANTIATION_CLASS< unsigned char, float >

Definition at line 572 of file GradientSimple.cpp.

template class BIASFilter_EXPORT BIAS::FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char >

Definition at line 2381 of file Rescale.cpp.

class BIASImage_EXPORT BIAS::Image

Definition at line 80 of file ImageBase.hh.

Referenced by BIAS::ImageIO::ExportMagickPP(), BIAS::ImageIO::ImportMagickPP(), BIAS::ImageIO::ImportMagickPPAutoconvert(), and BIAS::ImageAttributes::ReadMagickPP().

class BIASImageBase_EXPORT BIAS::ImageConvert

Definition at line 79 of file ImageBase.hh.

class BIASMathBase_EXPORT BIAS::Matrix

Definition at line 45 of file Vector.hh.

const float BIAS::maxGain = 29.0f

Definition at line 39 of file ColorHistogram.cpp.

Referenced by BIAS::ColorHistogram< StorageType >::CheckImageQualityRef().

const float BIAS::maxShutter = 0.034f

Definition at line 37 of file ColorHistogram.cpp.

Referenced by BIAS::ColorHistogram< StorageType >::CheckImageQualityRef().

const float BIAS::minGain = 0.1f

Definition at line 40 of file ColorHistogram.cpp.

const float BIAS::minShutter = 0.01f

Definition at line 38 of file ColorHistogram.cpp.

class BIASUtils_EXPORT BIAS::ParamCallbackInterface

Definition at line 45 of file ParamTypes.hh.

class BIASGui_EXPORT BIAS::ParamGUI

Definition at line 62 of file ParamGUI.hh.

class BIASMathBase_EXPORT BIAS::Vector2

Definition at line 42 of file Vector.hh.

class BIASMathBase_EXPORT BIAS::Vector3

Definition at line 43 of file Vector.hh.

class BIASMathBase_EXPORT BIAS::Vector4

Definition at line 44 of file Vector.hh.

Generated on Wed Jun 21 19:06:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Imath Namespace Reference

  • Namespace List
  • Namespace Members

Imath Namespace Reference

Generated on Wed Jun 21 19:13:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Imf Namespace Reference

  • Namespace List
  • Namespace Members

Imf Namespace Reference

Generated on Wed Jun 21 19:13:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MIP Namespace Reference

  • Namespace List
  • Namespace Members

MIP Namespace Reference

Classes

class | VideoSource_DV
This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...
class | VideoSource_DV2
This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. More...

Functions

int | raw_dv_handler (raw1394handle_t handle, int channel, size_t length, quadlet_t *data)

Function Documentation

int MIP::raw_dv_handler | ( | raw1394handle_t | handle,
 |  | int | channel,
 |  | size_t | length,
 |  | quadlet_t * | data
 | ) |

Definition at line 193 of file VideoSource_DV.cpp.

References MIP::VideoSource_DV::DroppedFrame_, MIP::VideoSource_DV::FrameFinished_, MIP::VideoSource_DV::FrameStarted_, and p.

Generated on Wed Jun 21 19:13:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: std Namespace Reference

  • Namespace List
  • Namespace Members

std Namespace Reference

Functions

bool | operator< (const complex< double > &left, const complex< double > &right)
bool | operator< (complex< double > &left, complex< double > &right)

Function Documentation

bool std::operator< | ( | const complex< double > & | left,
 |  | const complex< double > & | right
 | ) |

Definition at line 42 of file ExamplePolynomialSolve.cpp.

bool std::operator< | ( | complex< double > & | left,
 |  | complex< double > & | right
 | ) |

Definition at line 38 of file ExamplePolynomialSolve.cpp.

Generated on Wed Jun 21 19:13:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: TNT Namespace Reference

  • Namespace List
  • Namespace Members

TNT Namespace Reference

Classes

class | const_Region1D
class | const_Region2D
class | Fortran_Matrix
class | Fortran_Sparse_Col_Matrix
class | Fortran_Sparse_Vector
class | Index1D
class | LowerTriangularView
class | Matrix
class | Region1D
class | Region2D
class | stopwatch
class | Transpose_View
class | UnitLowerTriangularView
class | UnitUpperTriangularView
class | UpperTriangularView
class | Vector
class | Vector_Adaptor

Typedefs

typedef TNT_SUBSCRIPT_TYPE | Subscript

Functions

float | abs (float t)
double | abs (double t)
template<class SPDMatrix, class SymmMatrix>
int | Cholesky_upper_factorization (SPDMatrix &A, SymmMatrix &L)
template<class T>
T | dot_prod (const Vector< T > &A, const Vector< T > &B)
int | eigenproblem_special_quadratic_matrix_solve (const Fortran_Matrix< double > &A, Vector< double > &ret_EigenValuesRealPart, Vector< double > &ret_EigenValuesImagPart, Fortran_Matrix< double > &eigenVecMatrixR)
solve general eigenproblem for a general quadratix (n x n) matrix.
int | eigenvalue_solve (const Fortran_Matrix< double > &A, Vector< double > &wr, Vector< double > &wi)
Vector< double > | Lapack_LLS_QR_linear_solve (const Fortran_Matrix< double > &A, const Vector< double > &b)
Vector< double > | Lapack_LU_linear_solve (const Fortran_Matrix< double > &A, const Vector< double > &b)
template<class MaTriX, class VecToR>
VecToR | linear_solve (UnitUpperTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | linear_solve (UpperTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | linear_solve (UnitLowerTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | linear_solve (LowerTriangularView< MaTriX > &A, VecToR &b)
template<class MaTriX, class VecToR>
VecToR | Lower_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTRiX>
LowerTriangularView< MaTRiX > | Lower_triangular_view (MaTRiX &A)
template<class MaTRiX, class VecToRSubscript>
int | LU_factor (MaTRiX &A, VecToRSubscript &indx)
template<class MaTRiX, class VecToR, class VecToRSubscripts>
int | LU_solve (const MaTRiX &A, const VecToRSubscripts &indx, VecToR &b)
template<class MaTRiX, class VecToR>
VecToR | matmult (UnitUpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | matmult (UpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | matmult (UnitLowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | matmult (LowerTriangularView< MaTRiX > &A, VecToR &x)
template<class Matrix, class T>
Vector< T > | matmult (const Transpose_View< Matrix > &A, const Vector< T > &B)
template<class T>
Vector< T > | matmult (const Fortran_Matrix< T > &A, const Vector< T > &x)
template<class T>
int | matmult (Fortran_Matrix< T > &C, const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Fortran_Matrix< T > | matmult (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Vector< T > | matmult (const Matrix< T > &A, const Vector< T > &x)
template<class T>
int | matmult (Matrix< T > &C, const Matrix< T > &A, const Matrix< T > &B)
template<class T>
Matrix< T > | matmult (const Matrix< T > &A, const Matrix< T > &B)
float | max (float a, float b)
double | max (int a, int b)
double | max (double a, double b)
float | min (float a, float b)
double | min (int a, int b)
double | min (double a, double b)
template<class T>
Fortran_Matrix< T > | mult_element (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Matrix< T > | mult_element (const Matrix< T > &A, const Matrix< T > &B)
template<class T>
Vector< T > | operator * (const Vector< T > &A, const Vector< T > &B)
template<class MaTRiX, class VecToR>
VecToR | operator * (UnitUpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | operator * (UpperTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | operator * (UnitLowerTriangularView< MaTRiX > &A, VecToR &x)
template<class MaTRiX, class VecToR>
VecToR | operator * (LowerTriangularView< MaTRiX > &A, VecToR &x)
template<class Matrix, class T>
Vector< T > | operator * (const Transpose_View< Matrix > &A, const Vector< T > &B)
template<class T>
Fortran_Matrix< T > | operator * (const Fortran_Matrix< T > &A, const T &x)
template<class T>
Vector< T > | operator * (const Fortran_Matrix< T > &A, const Vector< T > &x)
template<class T>
Fortran_Matrix< T > | operator * (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Vector< T > | operator+ (const Vector< T > &A, const Vector< T > &B)
Index1D | operator+ (Subscript i, const Index1D &D)
Index1D | operator+ (const Index1D &D, Subscript i)
template<class T>
Fortran_Matrix< T > | operator+ (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class T>
Vector< T > | operator- (const Vector< T > &A, const Vector< T > &B)
Index1D | operator- (Subscript i, Index1D &D)
Index1D | operator- (Index1D &D, Subscript i)
template<class T>
Fortran_Matrix< T > | operator- (const Fortran_Matrix< T > &A, const Fortran_Matrix< T > &B)
template<class BBVec>
std::ostream & | operator<< (std::ostream &s, const Vector_Adaptor< BBVec > &A)
template<class T>
std::ostream & | operator<< (std::ostream &s, const Vector< T > &A)
template<class MaTRiX>
std::ostream & | operator<< (std::ostream &s, UnitUpperTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | operator<< (std::ostream &s, UpperTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | operator<< (std::ostream &s, const UnitLowerTriangularView< MaTRiX > &A)
template<class MaTRiX>
std::ostream & | operator<< (std::ostream &s, const LowerTriangularView< MaTRiX > &A)
template<class Matrix>
std::ostream & | operator<< (std::ostream &s, const Transpose_View< Matrix > &A)
template<class Array2D>
std::ostream & | operator<< (std::ostream &s, const Region2D< Array2D > &A)
template<class Array2D>
std::ostream & | operator<< (std::ostream &s, const const_Region2D< Array2D > &A)
template<class Array1D>
std::ostream & | operator<< (std::ostream &s, const_Region1D< Array1D > &A)
template<class Array1D>
std::ostream & | operator<< (std::ostream &s, Region1D< Array1D > &A)
template<class T>
ostream & | operator<< (ostream &s, const Fortran_Sparse_Vector< T > &A)
template<class T>
std::ostream & | operator<< (std::ostream &s, const Fortran_Matrix< T > &A)
template<class T>
ostream & | operator<< (ostream &s, const Fortran_Sparse_Col_Matrix< T > &A)
template<class BBVec>
std::istream & | operator>> (std::istream &s, Vector_Adaptor< BBVec > &A)
template<class T>
std::istream & | operator>> (std::istream &s, Vector< T > &A)
template<class T>
istream & | operator>> (istream &s, Fortran_Sparse_Vector< T > &A)
template<class T>
std::istream & | operator>> (std::istream &s, Fortran_Matrix< T > &A)
template<class MaTRiX, class Vector>
int | QR_factor (MaTRiX &A, Vector &C, Vector &D)
template<class MaTRiX, class Vector>
int | QR_solve (const MaTRiX &A, const Vector &c, Vector &d, Vector &b)
template<class MaTRiX, class Vector>
int | R_solve (const MaTRiX &A, Vector &D, Vector &b)
double | seconds (void)
float | sign (float a)
double | sign (double a)
int | singular_value_decomposition_general_rectangular_matrix_solve (const Fortran_Matrix< double > &A, Vector< double > &ret_S, Fortran_Matrix< double > &ret_U, Fortran_Matrix< double > &ret_VT)
solve general eigenproblem.
template<class T>
Fortran_Matrix< T > | transpose (const Fortran_Matrix< T > &A)
template<class T>
Matrix< T > | transpose (const Matrix< T > &A)
template<class Matrix>
Transpose_View< Matrix > | Transpose_view (const Matrix &A)
template<class MaTriX, class VecToR>
VecToR | Unit_lower_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTRiX>
UnitLowerTriangularView< MaTRiX > | Unit_lower_triangular_view (MaTRiX &A)
template<class MaTriX, class VecToR>
VecToR | Unit_upper_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTRiX>
UnitUpperTriangularView< MaTRiX > | Unit_upper_triangular_view (MaTRiX &A)
Vector< double > | Upper_symmetric_eigenvalue_solve (const Fortran_Matrix< double > &A)
template<class MaTriX, class VecToR>
VecToR | Upper_triangular_solve (MaTriX &A, VecToR &b)
template<class MaTRiX>
UpperTriangularView< MaTRiX > | Upper_triangular_view (MaTRiX &A)

Typedef Documentation

typedef TNT_SUBSCRIPT_TYPE TNT::Subscript

Definition at line 55 of file subscript.h.

Function Documentation

float TNT::abs ( float t ) [inline]

Definition at line 77 of file tntmath.h.

double TNT::abs ( double t ) [inline]

Definition at line 50 of file tntmath.h.

template<class SPDMatrix, class SymmMatrix>
int TNT::Cholesky_upper_factorization | ( | SPDMatrix & | A,
 |  | SymmMatrix & | L
 | ) |

Definition at line 50 of file cholesky.h.

References M.

Referenced by BIAS::Cholesky::Cholesky().

template<class T>
T TNT::dot_prod | ( | const Vector< T > & | A,
 |  | const Vector< T > & | B
 | ) |

Definition at line 409 of file vec.h.

References TNT::Vector< T >::dim(), and T.

int TNT::eigenproblem_special_quadratic_matrix_solve | ( | const Fortran_Matrix< double > & | A,
 |  | Vector< double > & | ret_EigenValuesRealPart,
 |  | Vector< double > & | ret_EigenValuesImagPart,
 |  | Fortran_Matrix< double > & | eigenVecMatrixR
 | ) |

solve general eigenproblem for a general quadratix (n x n) matrix.

computes eigenvalues and eigenvectors of A. (Jan Woetzel), 03/2002

Definition at line 250 of file lapack.h.

References F77_DGEEV, TNT::Vector< T >::newsize(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and work.

int TNT::eigenvalue_solve | ( | const Fortran_Matrix< double > & | A,
 |  | Vector< double > & | wr,
 |  | Vector< double > & | wi
 | ) |

Definition at line 207 of file lapack.h.

References F77_DGEEV, TNT::Vector< T >::newsize(), and work.

Vector<double> TNT::Lapack_LLS_QR_linear_solve | ( | const Fortran_Matrix< double > & | A,
 |  | const Vector< double > & | b
 | ) |

Definition at line 155 of file lapack.h.

References F77_DGELS, and work.

Referenced by BIAS::RegionMatcher::_ParabolaApprox(), Lapack_LLS_QR_linear_solve(), BIAS::LeastSquaresLapack::Solve(), and BIAS::LeastSquaresLapack::WeightedSolve().

Vector<double> TNT::Lapack_LU_linear_solve | ( | const Fortran_Matrix< double > & | A,
 |  | const Vector< double > & | b
 | ) |

Definition at line 134 of file lapack.h.

References F77_DGESV, M, TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and one.

Referenced by BIAS::Interpolator::fakima(), BIAS::PMatrixEstimation::FindClosestP2(), and BIAS::Interpolator::InitSpline3().

template<class MaTriX, class VecToR>
VecToR TNT::linear_solve | ( | UnitUpperTriangularView< MaTriX > & | A,
 |  | VecToR & | b
 | ) |

Definition at line 182 of file trisolve.h.

References Unit_upper_triangular_solve().

template<class MaTriX, class VecToR>
VecToR TNT::linear_solve | ( | UpperTriangularView< MaTriX > & | A,
 |  | VecToR & | b
 | ) |

Definition at line 175 of file trisolve.h.

References Upper_triangular_solve().

template<class MaTriX, class VecToR>
VecToR TNT::linear_solve | ( | UnitLowerTriangularView< MaTriX > & | A,
 |  | VecToR & | b
 | ) |

Definition at line 108 of file trisolve.h.

References Unit_lower_triangular_solve().

template<class MaTriX, class VecToR>
VecToR TNT::linear_solve | ( | LowerTriangularView< MaTriX > & | A,
 |  | VecToR & | b
 | ) |

Definition at line 101 of file trisolve.h.

References Lower_triangular_solve().

template<class MaTriX, class VecToR>
VecToR TNT::Lower_triangular_solve | ( | MaTriX & | A,
 |  | VecToR & | b
 | ) |

Definition at line 46 of file trisolve.h.

Referenced by linear_solve().

template<class MaTRiX>
LowerTriangularView<MaTRiX> TNT::Lower_triangular_view ( MaTRiX & A )

Definition at line 245 of file triang.h.

template<class MaTRiX, class VecToRSubscript>
int TNT::LU_factor | ( | MaTRiX & | A,
 |  | VecToRSubscript & | indx
 | ) |

Definition at line 92 of file lu.h.

References M.

template<class MaTRiX, class VecToR, class VecToRSubscripts>
int TNT::LU_solve | ( | const MaTRiX & | A,
 |  | const VecToRSubscripts & | indx,
 |  | VecToR & | b
 | ) |

Definition at line 177 of file lu.h.

template<class MaTRiX, class VecToR>
VecToR TNT::matmult | ( | UnitUpperTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) |

Definition at line 558 of file triang.h.

References M.

template<class MaTRiX, class VecToR>
VecToR TNT::matmult | ( | UpperTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) |

Definition at line 428 of file triang.h.

References TNT::UpperTriangularView< MaTRiX >::lbound(), M, TNT::UpperTriangularView< MaTRiX >::num_cols(), and TNT::UpperTriangularView< MaTRiX >::num_rows().

template<class MaTRiX, class VecToR>
VecToR TNT::matmult | ( | UnitLowerTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) |

Definition at line 260 of file triang.h.

References M.

template<class MaTRiX, class VecToR>
VecToR TNT::matmult | ( | LowerTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) |

Definition at line 130 of file triang.h.

References TNT::LowerTriangularView< MaTRiX >::lbound(), M, TNT::LowerTriangularView< MaTRiX >::num_cols(), and TNT::LowerTriangularView< MaTRiX >::num_rows().

template<class Matrix, class T>
Vector<T> TNT::matmult | ( | const Transpose_View< Matrix > & | A,
 |  | const Vector< T > & | B
 | ) |

Definition at line 109 of file transv.h.

References TNT::Vector< T >::dim(), M, and T.

template<class T>
Vector<T> TNT::matmult | ( | const Fortran_Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) |

Definition at line 533 of file fmat.h.

References TNT::Vector< T >::dim(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and T.

template<class T>
int TNT::matmult | ( | Fortran_Matrix< T > & | C,
 |  | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) | [inline]

Definition at line 491 of file fmat.h.

References K, TNT::Fortran_Matrix< T >::newsize(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and T.

template<class T>
Fortran_Matrix<T> TNT::matmult | ( | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) | [inline]

Definition at line 455 of file fmat.h.

References K, TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and T.

template<class T>
Vector<T> TNT::matmult | ( | const Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) |

Definition at line 607 of file cmat.h.

References TNT::Vector< T >::dim(), M, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
int TNT::matmult | ( | Matrix< T > & | C,
 |  | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [inline]

Definition at line 570 of file cmat.h.

References K, M, TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

template<class T>
Matrix<T> TNT::matmult | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) | [inline]

Definition at line 532 of file cmat.h.

References K, M, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and T.

Referenced by operator *(), TNT::Matrix< T >::operator *(), and BIAS::Matrix< T >::operator *().

float TNT::max | ( | float | a,
 |  | float | b
 | ) | [inline]

Definition at line 87 of file tntmath.h.

double TNT::max | ( | int | a,
 |  | int | b
 | ) | [inline]

Definition at line 66 of file tntmath.h.

double TNT::max | ( | double | a,
 |  | double | b
 | ) | [inline]

Definition at line 60 of file tntmath.h.

Referenced by singular_value_decomposition_general_rectangular_matrix_solve().

float TNT::min | ( | float | a,
 |  | float | b
 | ) | [inline]

Definition at line 82 of file tntmath.h.

double TNT::min | ( | int | a,
 |  | int | b
 | ) | [inline]

Definition at line 72 of file tntmath.h.

double TNT::min | ( | double | a,
 |  | double | b
 | ) | [inline]

Definition at line 55 of file tntmath.h.

template<class T>
Fortran_Matrix<T> TNT::mult_element | ( | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) |

Definition at line 416 of file fmat.h.

References TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

template<class T>
Matrix<T> TNT::mult_element | ( | const Matrix< T > & | A,
 |  | const Matrix< T > & | B
 | ) |

Definition at line 493 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

template<class T>
Vector<T> TNT::operator * | ( | const Vector< T > & | A,
 |  | const Vector< T > & | B
 | ) |

Definition at line 391 of file vec.h.

References TNT::Vector< T >::dim().

template<class MaTRiX, class VecToR>
VecToR TNT::operator * | ( | UnitUpperTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) | [inline]

Definition at line 584 of file triang.h.

References matmult().

template<class MaTRiX, class VecToR>
VecToR TNT::operator * | ( | UpperTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) | [inline]

Definition at line 454 of file triang.h.

References matmult().

template<class MaTRiX, class VecToR>
VecToR TNT::operator * | ( | UnitLowerTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) | [inline]

Definition at line 286 of file triang.h.

References matmult().

template<class MaTRiX, class VecToR>
VecToR TNT::operator * | ( | LowerTriangularView< MaTRiX > & | A,
 |  | VecToR & | x
 | ) | [inline]

Definition at line 156 of file triang.h.

References matmult().

template<class Matrix, class T>
Vector<T> TNT::operator * | ( | const Transpose_View< Matrix > & | A,
 |  | const Vector< T > & | B
 | ) | [inline]

Definition at line 135 of file transv.h.

References matmult().

template<class T>
Fortran_Matrix<T> TNT::operator * | ( | const Fortran_Matrix< T > & | A,
 |  | const T & | x
 | ) | [inline]

Definition at line 565 of file fmat.h.

References a, TNT::Fortran_Matrix< T >::begin(), TNT::Fortran_Matrix< T >::end(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), res, and T.

template<class T>
Vector<T> TNT::operator * | ( | const Fortran_Matrix< T > & | A,
 |  | const Vector< T > & | x
 | ) | [inline]

Definition at line 559 of file fmat.h.

References matmult().

template<class T>
Fortran_Matrix<T> TNT::operator * | ( | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) | [inline]

Definition at line 484 of file fmat.h.

References matmult().

template<class T>
Vector<T> TNT::operator+ | ( | const Vector< T > & | A,
 |  | const Vector< T > & | B
 | ) |

Definition at line 357 of file vec.h.

References TNT::Vector< T >::dim().

Index1D TNT::operator+ | ( | Subscript | i,
 |  | const Index1D & | D
 | ) | [inline]

Definition at line 71 of file index.h.

References TNT::Index1D::lbound(), and TNT::Index1D::ubound().

Index1D TNT::operator+ | ( | const Index1D & | D,
 |  | Subscript | i
 | ) | [inline]

Definition at line 66 of file index.h.

References TNT::Index1D::lbound(), and TNT::Index1D::ubound().

template<class T>
Fortran_Matrix<T> TNT::operator+ | ( | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) |

Definition at line 372 of file fmat.h.

References TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

template<class T>
Vector<T> TNT::operator- | ( | const Vector< T > & | A,
 |  | const Vector< T > & | B
 | ) |

Definition at line 374 of file vec.h.

References TNT::Vector< T >::dim().

Index1D TNT::operator- | ( | Subscript | i,
 |  | Index1D & | D
 | ) | [inline]

Definition at line 83 of file index.h.

References TNT::Index1D::lbound(), and TNT::Index1D::ubound().

Index1D TNT::operator- | ( | Index1D & | D,
 |  | Subscript | i
 | ) | [inline]

Definition at line 78 of file index.h.

References TNT::Index1D::lbound(), and TNT::Index1D::ubound().

template<class T>
Fortran_Matrix<T> TNT::operator- | ( | const Fortran_Matrix< T > & | A,
 |  | const Fortran_Matrix< T > & | B
 | ) |

Definition at line 392 of file fmat.h.

References TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

template<class BBVec>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const Vector_Adaptor< BBVec > & | A
 | ) |

Definition at line 270 of file vecadaptor.h.

template<class T>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const Vector< T > & | A
 | ) |

Definition at line 311 of file vec.h.

template<class MaTRiX>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | UnitUpperTriangularView< MaTRiX > & | A
 | ) |

Definition at line 617 of file triang.h.

References M, TNT::UnitUpperTriangularView< MaTRiX >::num_cols(), and TNT::UnitUpperTriangularView< MaTRiX >::num_rows().

template<class MaTRiX>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | UpperTriangularView< MaTRiX > & | A
 | ) |

Definition at line 595 of file triang.h.

References M, TNT::UpperTriangularView< MaTRiX >::num_cols(), and TNT::UpperTriangularView< MaTRiX >::num_rows().

template<class MaTRiX>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const UnitLowerTriangularView< MaTRiX > & | A
 | ) |

Definition at line 318 of file triang.h.

References M, TNT::UnitLowerTriangularView< MaTRiX >::num_cols(), and TNT::UnitLowerTriangularView< MaTRiX >::num_rows().

template<class MaTRiX>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const LowerTriangularView< MaTRiX > & | A
 | ) |

Definition at line 297 of file triang.h.

template<class Matrix>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const Transpose_View< Matrix > & | A
 | ) |

Definition at line 142 of file transv.h.

template<class Array2D>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const Region2D< Array2D > & | A
 | ) |

Definition at line 449 of file region2d.h.

template<class Array2D>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const const_Region2D< Array2D > & | A
 | ) |

Definition at line 427 of file region2d.h.

template<class Array1D>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const_Region1D< Array1D > & | A
 | ) |

Definition at line 365 of file region1d.h.

template<class Array1D>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | Region1D< Array1D > & | A
 | ) |

Definition at line 239 of file region1d.h.

template<class T>
ostream& TNT::operator<< | ( | ostream & | s,
 |  | const Fortran_Sparse_Vector< T > & | A
 | ) |

Definition at line 138 of file fspvec.h.

template<class T>
std::ostream& TNT::operator<< | ( | std::ostream & | s,
 |  | const Fortran_Matrix< T > & | A
 | ) |

Definition at line 324 of file fmat.h.

template<class T>
ostream& TNT::operator<< | ( | ostream & | s,
 |  | const Fortran_Sparse_Col_Matrix< T > & | A
 | ) |

Definition at line 144 of file fcscmat.h.

template<class BBVec>
std::istream& TNT::operator>> | ( | std::istream & | s,
 |  | Vector_Adaptor< BBVec > & | A
 | ) |

Definition at line 281 of file vecadaptor.h.

References TNT::Vector_Adaptor< BBVec >::resize().

template<class T>
std::istream& TNT::operator>> | ( | std::istream & | s,
 |  | Vector< T > & | A
 | ) |

Definition at line 333 of file vec.h.

References TNT::Vector< T >::newsize(), and TNT::Vector< T >::size().

template<class T>
istream& TNT::operator>> | ( | istream & | s,
 |  | Fortran_Sparse_Vector< T > & | A
 | ) |

Definition at line 154 of file fspvec.h.

References TNT::Fortran_Sparse_Vector< T >::index(), TNT::Fortran_Sparse_Vector< T >::newsize(), and TNT::Fortran_Sparse_Vector< T >::val().

template<class T>
std::istream& TNT::operator>> | ( | std::istream & | s,
 |  | Fortran_Matrix< T > & | A
 | ) |

Definition at line 345 of file fmat.h.

References TNT::Fortran_Matrix< T >::newsize(), TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

template<class MaTRiX, class Vector>
int TNT::QR_factor | ( | MaTRiX & | A,
 |  | Vector & | C,
 |  | Vector & | D
 | ) |

Definition at line 93 of file qr.h.

References TNT::Vector< T >::lbound(), M, TNT::Vector< T >::newsize(), sigma, sign(), and TNT::Vector< T >::size().

template<class MaTRiX, class Vector>
int TNT::QR_solve | ( | const MaTRiX & | A,
 |  | const Vector & | c,
 |  | Vector & | d,
 |  | Vector & | b
 | ) |

Definition at line 202 of file qr.h.

References TNT::Vector< T >::dim(), TNT::Vector< T >::lbound(), and R_solve().

template<class MaTRiX, class Vector>
int TNT::R_solve | ( | const MaTRiX & | A,
 |  | Vector & | D,
 |  | Vector & | b
 | ) |

Definition at line 165 of file qr.h.

References TNT::Vector< T >::dim(), and TNT::Vector< T >::lbound().

Referenced by QR_solve().

double TNT::seconds ( void ) [inline]

Definition at line 52 of file stopwatch.h.

Referenced by TNT::stopwatch::read(), TNT::stopwatch::start(), and TNT::stopwatch::stop().

float TNT::sign ( float a ) [inline]

Definition at line 99 of file tntmath.h.

double TNT::sign ( double a ) [inline]

Definition at line 92 of file tntmath.h.

Referenced by QR_factor().

int TNT::singular_value_decomposition_general_rectangular_matrix_solve | ( | const Fortran_Matrix< double > & | A,
 |  | Vector< double > & | ret_S,
 |  | Fortran_Matrix< double > & | ret_U,
 |  | Fortran_Matrix< double > & | ret_VT
 | ) |

solve general eigenproblem.

computes singular value decomposition of a rectangular m x n matrix A calls extern liblapack routine. Jan Woetzel 03/2002

Definition at line 300 of file lapack.h.

References F77_DGESVD, max(), TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and work.

template<class T>
Fortran_Matrix<T> TNT::transpose ( const Fortran_Matrix< T > & A )

Definition at line 437 of file fmat.h.

References TNT::Fortran_Matrix< T >::num_cols(), and TNT::Fortran_Matrix< T >::num_rows().

template<class T>
Matrix<T> TNT::transpose ( const Matrix< T > & A )

Definition at line 514 of file cmat.h.

References M, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

Referenced by Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), General_singular_value_decomposition(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), and Upper_symmetric_eigenvalue_solve().

template<class Matrix>
Transpose_View<Matrix> TNT::Transpose_view ( const Matrix & A )

Definition at line 103 of file transv.h.

template<class MaTriX, class VecToR>
VecToR TNT::Unit_lower_triangular_solve | ( | MaTriX & | A,
 |  | VecToR & | b
 | ) |

Definition at line 73 of file trisolve.h.

Referenced by linear_solve().

template<class MaTRiX>
UnitLowerTriangularView<MaTRiX> TNT::Unit_lower_triangular_view ( MaTRiX & A )

Definition at line 253 of file triang.h.

template<class MaTriX, class VecToR>
VecToR TNT::Unit_upper_triangular_solve | ( | MaTriX & | A,
 |  | VecToR & | b
 | ) |

Definition at line 147 of file trisolve.h.

Referenced by linear_solve().

template<class MaTRiX>
UnitUpperTriangularView<MaTRiX> TNT::Unit_upper_triangular_view ( MaTRiX & A )

Definition at line 551 of file triang.h.

Vector<double> TNT::Upper_symmetric_eigenvalue_solve ( const Fortran_Matrix< double > & A )

Definition at line 182 of file lapack.h.

References TNT::Vector< T >::begin(), F77_DSYEV, and work.

Referenced by BIAS::SVD::Sqrt(), and BIAS::SVD::SqrtT().

template<class MaTriX, class VecToR>
VecToR TNT::Upper_triangular_solve | ( | MaTriX & | A,
 |  | VecToR & | b
 | ) |

Definition at line 119 of file trisolve.h.

Referenced by linear_solve().

template<class MaTRiX>
UpperTriangularView<MaTRiX> TNT::Upper_triangular_view ( MaTRiX & A )

Definition at line 543 of file triang.h.

Generated on Wed Jun 21 19:13:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Module Index

Basic Image AlgorithmS Library Modules

Here is a list of all modules:
  • Image
    • Image and Image Base
    • ImageIO and Conversions
    • Drawing
    • PyramidImage, Camera, Histogram
  • Mathematics
    • Matrix and Vector Classes
    • Algorithms
    • Geometry and Transformations
    • Estimation
  • Utilities
  • Image Algorithms
    • Image Filters and Image Transformations
    • Algorithms for Correspondence Problems
    • Feature Detectors
    • Feature Tracker
  • Graphical User Interfaces
  • Tools
  • Mathalgo
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image

Image

Collaboration diagram for Image:

Everything BIAS lets you do with images. More...

Modules

Image and Image Base
ImageBase and Image provide the data structure for all functions dealing with images.
ImageIO and Conversions
Image input and output and color space conversions.
Drawing
Classes for drawing simple entities into the image like rectangles or lines and other simple utility routines.
PyramidImage, Camera, Histogram
Specialized class derived from image or with similar semantics.

Detailed Description

Everything BIAS lets you do with images.

Go to the detailed description for more info.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image and Image Base

Image and Image Base
[Image]

Collaboration diagram for Image and Image Base:

ImageBase and Image provide the data structure for all functions dealing with images. More...

Classes

class | BIAS::Image< StorageType >
The image template class for specific storage types. More...
class | BIAS::ImageBase
This is the base class for images in BIAS. More...
class | BIAS::PMDImageIO
Save 2D/3D-image-data together with some metadata in a single tiff-datafile. More...
class | BIAS::Position
store positions in image More...
class | BIAS::ROI
class for handling different region of interest (ROI) representations. More...

Detailed Description

ImageBase and Image provide the data structure for all functions dealing with images.

Usually Image<unsigned char> is what u need...

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ImageIO and Conversions

ImageIO and Conversions
[Image]

Collaboration diagram for ImageIO and Conversions:

Image input and output and color space conversions. More...

Classes

class | BIAS::ImageConvert
class with static functions for converting all kinds of color formats and storage types More...
class | BIAS::ImageIO
routines for loading and writing all kinds of image formats
  • use Load/Save and Import/ExportImage for foreign+internal file formats
  • Optionally use handlers directly,E.g.
More...

Detailed Description

Image input and output and color space conversions.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Drawing

Drawing
[Image]

Collaboration diagram for Drawing:

Classes for drawing simple entities into the image like rectangles or lines and other simple utility routines. More...

Classes

class | BIAS::ImageDraw< StorageType >
drawing simple entities into the image like rectangles or lines More...
class | BIAS::ScanLine
class for scanning a image region given by a line and a distance from the line More...

Detailed Description

Classes for drawing simple entities into the image like rectangles or lines and other simple utility routines.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: PyramidImage, Camera, Histogram

PyramidImage, Camera, Histogram
[Image]

Collaboration diagram for PyramidImage, Camera, Histogram:

Specialized class derived from image or with similar semantics. More...

Classes

class | BIAS::Camera< StorageType >
extends the Image by MetaData support (e.g. More...
class | BIAS::ColorHistogram< StorageType >
This Class handels Histogram matters on Images. More...
class | BIAS::Contour
a class for calculating the contour(boundary) of a region, the contour is available as a point set or by freeman code More...
class | BIAS::Histogram
class for easy histogram generation More...
class | BIAS::IntegralHistogram
This Class handels Integral Histograms on HSL Images It represents an integral image histogram and offers basic methods on histograms. More...
class | BIAS::PyramidImage< StorageType >
class for holding downsampled images More...

Detailed Description

Specialized class derived from image or with similar semantics.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Mathematics

Mathematics

Collaboration diagram for Mathematics:

Basic Mathematical classes. More...

Modules

Matrix and Vector Classes
matrix and vector types
Algorithms
Algorithms that solve Equation Systems or compute Singular values.
Geometry and Transformations
Classes related to geometric Transformations and Projective Geometry.
Estimation
Classes for estimating projective entities from points or correspondences.

Detailed Description

Basic Mathematical classes.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matrix and Vector Classes

Matrix and Vector Classes
[Mathematics]

Collaboration diagram for Matrix and Vector Classes:

matrix and vector types More...

Classes

class | BIAS::CovMatrix3x3
class for 3x3 covariance matrices More...
class | BIAS::Matrix< T >
matrix class with arbitrary size, indexing is row major. More...
class | BIAS::Matrix2x2< T >
is a 'fixed size' quadratic matrix of dim. More...
class | BIAS::Matrix3x3< T >
is a 'fixed size' quadratic matrix of dim. More...
class | BIAS::Matrix3x4< T >
is a 'fixed size' rectangular matrix of dim. More...
class | BIAS::Matrix4x4< T >
is a 'fixed size' quadratic matrix of dim. More...
class | BIAS::Polynom
class for Polynoms of arbitary order More...
class | BIAS::PoseParametrizationCovariance
class encapsulating the transfromations between different pose parametrizations More...
class | RGBAd
class RGBAd is asynonym for a Vector4 of correct type More...
class | RGBAf
class RGBAf is asynonym for a Vector4 of correct type More...
class | RGBAuc
class RGBAuc is asynonym for a Vector4 of corerct type More...
class | RGBd
class RGBAd is asynonym for a Vector of coorect type More...
class | RGBf
class RGBAf is asynonym for a Vector3 of correct type More...
class | RGBuc
class RGBuc is asynonym for a Vector3 of correct type More...
class | BIAS::Vector< T >
class for column vectors with arbitrary size More...
class | BIAS::Vector2< T >
class Vector2 contains a Vector of dim. More...
class | BIAS::Vector3< T >
class Vector3 contains a Vector of fixed dim. More...
class | BIAS::Vector4< T >
class Vector4 contains a Vector of dim. More...

Detailed Description

matrix and vector types

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Algorithms

Algorithms
[Mathematics]

Collaboration diagram for Algorithms:

Algorithms that solve Equation Systems or compute Singular values. More...

Classes

class | BIAS::BSplineCurve
this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. More...
class | BIAS::Interpolator
this class interpolates a function y=f(t) between given control points (the y-values) More...
class | BIAS::Median1D< DataType >
computes the median of a vector More...
class | BIAS::PolynomialSolve
base class for solving polynomial equations More...
class | BIAS::Random
class for producing random numbers from different distributions More...
class | BIAS::RANSAC< SolutionType >
do not DLL export this class because it is headeer only. More...
class | BIAS::RANSACPreKnowledge< SolutionType >
Extension of RANSAC algorithm: user-supplied guesses are evaluated and refined using RANSAC criterions before actually starting the RANSAC algorithm. More...
class | BIAS::SVD
computes and holds the singular value decomposition of a rectangular (not necessarily quadratic) Matrix A More...
class | BIAS::SVD3x3
singular value decomposition for 3x3 matrices More...

Detailed Description

Algorithms that solve Equation Systems or compute Singular values.

Wrapper to Lapack and Minpack Functions.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry and Transformations

Geometry and Transformations
[Mathematics]

Collaboration diagram for Geometry and Transformations:

Classes related to geometric Transformations and Projective Geometry. More...

Classes

class | BIAS::AffineTransf
last line of an affine transformation in 3d space is always 0 0 0 1 and can therefor be droped from this class for this reason it is necessairy to overload certain operators and functions e.g. More...
class | BIAS::Conic2D
A 3x3 matrix representing a conic (cone/plane intersection). More...
class | BIAS::CovMatrix3x3
class for 3x3 covariance matrices More...
class | BIAS::EMatrix
class representing an Essential matrix More...
class | BIAS::EMatrixBase
describes the epipolar relationship between two images whith known internal camera calibration. More...
class | BIAS::EuclideanTransf3D
Euclidean transformation for 3D points. More...
class | BIAS::FMatrix
class representing a Fundamental matrix More...
class | BIAS::FMatrixBase
describes the epipolar relationship between a point and his mapping on a corresponding epipolar line. More...
class | BIAS::HMatrix
a 3x3 Matrix describing projective transformations between planes More...
class | BIAS::HMatrixBase
describes a homography More...
class | BIAS::HMatrixEstimation
estimate 3x3 Matrix (homography, affine transformation, . More...
class | HomgLine2D
a line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy More...
class | BIAS::HomgPlane3D
A homogeneous plane (in P^3) All points X on the plane p fulfill pX = 0. More...
class | BIAS::HomgPoint2D
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates. More...
class | BIAS::HomgPoint3D
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates. More...
class | BIAS::KMatrix
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs). More...
class | BIAS::Normalization
class Normalization Functions, e.g. More...
class | BIAS::PMatrix
describes a projective 3D -> 2D mapping in homogenous coordinates More...
class | BIAS::PMatrixBase
describes a projective 3D -> 2D mapping in homogenous coordinates More...
class | BIAS::PoseParametrizationCovariance
class encapsulating the transfromations between different pose parametrizations More...
class | BIAS::Quadric3D
A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic equation, e.g. More...
class | BIAS::Quaternion< QUAT_TYPE >
class for rotation with axis and angle More...
class | BIAS::RMatrix
3D rotation matrix More...
class | BIAS::RMatrixBase
3D rotation matrix More...

Detailed Description

Classes related to geometric Transformations and Projective Geometry.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Estimation

Estimation
[Mathematics]

Collaboration diagram for Estimation:

Classes for estimating projective entities from points or correspondences. More...

Classes

class | BIAS::FMatrixEstimation
functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outlier checks, not robust !) in two views More...
class | BIAS::PMatrixEstimation
compute standard P1/P2 from F. More...
class | BIAS::PMatrixLinear
This class computes a PMatrix from 2D/3D correspondences with linear methods. More...
class | BIAS::TFTensorEstimation
class TFTensorEstimation compute a trifocal tensor from image correspondences, not robust against outliers More...
class | BIAS::Triangulation
Class for triangulation of 3Dpoints from 2D matches. More...

Detailed Description

Classes for estimating projective entities from points or correspondences.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utilities

Utilities

useful clases for debugging, profiling or comand line parameters etc. More...

Files

file | Debug.hh
some macros, classes and varaibles for debugging purposes:
file | ThreadNaming.hh
utility function to assign "names" to threads, actually WIN32 only.
file | TimeMeasurement.hh
Time measurement based on instance construction and destruction.

Classes

class | /home/jw/source/BIAS/Base/Debug/Debug.hh
class | BIAS::GenSynthMatches
class for generating synthetic matches More...
class | BIAS::MatchDataBase
class for representing matches, used in GenSynthMatches and biasshowsm More...
class | BIAS::Param
This class Param provides generic support for parameters. More...
class | BIAS::ParamCallbackInterface
This class provides an interface to be called if parameter changes occured. More...
class | BIAS::TimeMeasure
class TimeMeasure contains functions for timing real time and cpu (kernel) time. More...
class | BIAS::UUID
interface class for producing/storing Universally Unique IDentifiers More...
class | BIAS::XMLBase
Base class with interface for xml output. More...
class | BIAS::XMLIO
Wrapper class for reading and writing XML-Files, based on the XML-library 'libxml2'. More...

Detailed Description

useful clases for debugging, profiling or comand line parameters etc.

see Utils

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image Algorithms

Image Algorithms

Collaboration diagram for Image Algorithms:

All kind of algorithms working on image data. More...

Modules

Image Filters and Image Transformations
Image filters, which produce an output image given an input image based on local operations, and image transformations, e.g.
Algorithms for Correspondence Problems
NCC, KLT, SAD, etc.
Feature Detectors
Corner Detectors, Edge Detectors, .
Feature Tracker
Image correspondence calculation.

Detailed Description

All kind of algorithms working on image data.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image Filters and Image Transformations

Image Filters and Image Transformations
[Image Algorithms]

Collaboration diagram for Image Filters and Image Transformations:

Image filters, which produce an output image given an input image based on local operations, and image transformations, e.g. More...

Classes

class | BIAS::BackwardMapping< InputStorageType, OutputStorageType >
abstract base class to maps image src to image sink with arbitrary continuous function More...
class | Binomial
binomial low pass filter class More...
class | BIAS::Convolution< InputStorageType, OutputStorageType >
generic convolution class. More...
class | BIAS::Dilation< InputStorageType, OutputStorageType >
Dilation operator for binary images (black and white). More...
class | BIAS::Erosion< InputStorageType, OutputStorageType >
Erosion operator for binary images (black and white). More...
class | BIAS::FilterBase< InputStorageType, OutputStorageType >
virtual parent class for API definition of all (future) filters More...
class | BIAS::FilterMask
A filter mask (or a kernel) used for convolution. More...
class | BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
base class for simple n->2n filter implementations More...
class | BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
base class for simple n->3n filter implementations More...
class | BIAS::FilterNToN< InputStorageType, OutputStorageType >
base class for simple n->n filter implementations More...
class | BIAS::Gauss< InputStorageType, OutputStorageType >
smoothing with gaussian kernel More...
class | BIAS::GradientGauss< InputStorageType, OutputStorageType >
gradient calculation with separated gauss masks More...
class | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
gradient calculation with separated gauss masks More...
class | BIAS::GradientSimple< InputStorageType, OutputStorageType >
simple gradient calculation gx(x,y) = I(x+1,y) - I(x-1,y) gy(x,y) = I(x,y+1) - I(x,y-1) More...
class | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
gradient calculation with sobel 3 by 3 masks More...
class | BIAS::HomographyMapping< InputStorageType, OutputStorageType >
Maps image src to image sink with homography H (software implementation). More...
class | BIAS::Label
does a connected component analysis and labels all connected regions More...
class | BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
Maps cartesian source coordinates to log-polar sink coordinates. More...
class | BIAS::Mean< InputStorageType, OutputStorageType >
deinterlacer filter More...
class | BIAS::Mean< InputStorageType, OutputStorageType >
deinterlacer filter More...
class | BIAS::Median< InputStorageType, OutputStorageType >
2D median filter More...
class | BIAS::Morphology< InputStorageType, OutputStorageType >
base class for Erosion, Dilation, and single Deletion More...
class | BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
Maps source pixel to sink pixel of given projections. More...
class | BIAS::Rescale< InputStorageType, OutputStorageType >
Down-, Upsampling routines and Resize. More...
class | BIAS::SphericalUndistortion
transforms sphere images coming from a fisheye-lens according to different projection models. More...
class | BIAS::StructureTensor< InputStorageType, OutputStorageType >
basic class for structure tensor calculation More...
class | BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
Maps image src to image sink with spherical or lens distortion. More...

Detailed Description

Image filters, which produce an output image given an input image based on local operations, and image transformations, e.g.

spherical undistortion or homography mapping.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Algorithms for Correspondence Problems

Algorithms for Correspondence Problems
[Image Algorithms]

Collaboration diagram for Algorithms for Correspondence Problems:

NCC, KLT, SAD, etc. More...
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Feature Detectors

Feature Detectors
[Image Algorithms]

Collaboration diagram for Feature Detectors:

Corner Detectors, Edge Detectors, . More...

Classes

class | BIAS::CornerDetectorBase< StorageType >
purly virtual interface defining class for corner detectors More...
class | BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
foerstner corner detector, detects grey value corners in images More...
class | BIAS::CornerDetectorGradient< StorageType, CalculationType >
base class for all gradient based corner detectors More...
class | BIAS::CornerDetectorHarris< StorageType, CalculationType >
harris corner detector, detects grey value corners in images More...
class | BIAS::CornerDetectorKLT< StorageType, CalculationType >
computes the cornerness as the smaller eigenvalue of the structure tensor matrix More...
class | BIAS::CornerDetectorSusan< StorageType >
The Susan corner detector (oxford implementation, see license). More...
class | BIAS::cornerstruct
used only by Susan corner detector More...
class | BIAS::LinearRegionDetector< StorageType, CalculationType >
try to detect linear regions (const gradient) in images, experimental code for testing More...

Detailed Description

Corner Detectors, Edge Detectors, .

..

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Feature Tracker

Feature Tracker
[Image Algorithms]

Collaboration diagram for Feature Tracker:

Image correspondence calculation. More...

Classes

class | BIAS::Tracker< StorageType, CalculationType >
High level tracking class. More...
class | BIAS::TrackerBase< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | BIAS::TrackerBase< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | BIAS::TrackerBase< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | BIAS::TrackerBase< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...
class | BIAS::TrackerBaseInterface< StorageType >
Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

Detailed Description

Image correspondence calculation.

Klick on ( mainpage -> Feature Tracker ) for details.

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Graphical User Interfaces

Graphical User Interfaces

Various classes which provide visualization with windows and mouse or keyboard callbacks see Utils. More...

Namespaces

namespace | BIAS
This class is used for parametrizing F- and H-matrices, generally for optimization purposes.

Classes

class | BIAS::GuiEnhanced
extended GuiGTK with zoom and marking options More...
class | BIAS::GuiGTK
Gui based on gtk is a simple windowing environment. More...
class | BIAS::GuiWX
a sophisticated more complex windowing environment More...
class | ICECallBackInterface
callback interface for ImageCanvasExtended More...
class | BIAS::ImageCanvas
display image in wx application, provides zoom and investigation functionality More...
class | BIAS::ImageCanvasEnhanced
provides functionality for selection of rectangle, point, . More...
class | ImageCanvasGLBase
2D image display canvas using OpenGL rendering internally. More...
class | mainpage
base class for OpenGL canvases you could derive from to get base functionality (JW) More...
class | BIAS::OpenGLCanvas
OpenGL canvases with additinal event handling (JW). More...
class | BIAS::ParamGUI
?? More...
class | BIAS::ParamGUIPanel
?? More...
class | BIAS::ScaledImageCanvas
display float images in wx application, provides zoom, scale, shift and investigation functionality More...
class | BIAS::SettingsGL
Application controlled OpenGl renderingsettings. More...

Functions

void BIAS::ConsoleRedirectIO ()
Extra Console for WIN32 WinMain gui applications.

Detailed Description

Various classes which provide visualization with windows and mouse or keyboard callbacks see Utils.

Function Documentation

void BIASGui_EXPORT BIAS::ConsoleRedirectIO ( )

Extra Console for WIN32 WinMain gui applications.

Redirects STDIN, STDERR, cout, cerrm wcout, cin, wcin, wcerr, cerr, wclog, clog.

Displays output to cout, cerrm printf etc. based on "Covington, Michael. "Adding Graphics to Console Applications," Visual Developer, June/July 1997. Jan Woetzel 2005

Examples:
ExampleGLShared.cpp, ExampleOpenGLCanvas.cpp, and ExampleOpenGLCanvasBase.cpp.

Definition at line 19 of file ConsoleRedirectIO.cpp.

Referenced by BiasViewApp::OnInit(), BiasShowEpiApp::OnInit(), ExampleOpenGLCanvasApp::OnInit(), ExampleImageCanvasGLBaseApp::OnInit(), and ExampleGLSharedApp::OnInit().

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools

Tools

Standalone tools for filtering, converting, displaying, . More...

Classes

class | biasadd
tool for adding two images pixelwise More...
class | biasconvert
convert different image types More...
class | biasdiff
tool for computing intensity difference of images More...
class | biasextract
extract header data from image files: uid, time stamp orientation, KMatrix from EXIF data, . More...
class | biasfilter
tool to filter an image with Mean or Median,. More...
class | biasinsert
program for inserting an image into another More...
class | biasmerge
merge a projection matrix and an image, write header data to image More...
class | biasprojection
read images and pmatrices, projects 3d points ant cut out region More...
class | biassetprojection
load image and projection given by the command line, set projection in image and save image to disk. More...
class | biassetuid
load image given by the command line, assign a uuid and write back to disk More...
class | biasshowepi
show epipolar lines for image pair More...
class | biasshowsm
tool for showing binary written GensSynthMatches More...
class | biasview
tool for displaying images based on GTK More...
class | biasviewwx
tool for displaying images using wxWidgets GUI. More...

Detailed Description

Standalone tools for filtering, converting, displaying, .

..

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Mathalgo

Mathalgo

C++ Wrappers for gnu scientific library (GSL). More...

Functions

BIASMathAlgo_EXPORT int | Eigenproblem_quadratic_matrix (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_EigenValuesReal, BIAS::Vector< double > &ret_EigenValuesImag, BIAS::Matrix< double > &eigenVectors)
solve general eigenproblem for a general quadratix (n x n) matrix.
BIASMathAlgo_EXPORT int | Eigenvalue_solve (const BIAS::Matrix< double > &A, BIAS::Vector< double > &wr, BIAS::Vector< double > &wi)
solve unsymmetric eigenvalue problems (for a rectangular matrix) untested, grest
BIASMathAlgo_EXPORT void | Fortran_Matrix_to_Matrix (const TNT::Fortran_Matrix< double > &FMat, BIAS::Matrix< double > &res)
converts the argument Fortran_Matrix to a Matrix and returns it.
BIASMathAlgo_EXPORT BIAS::Matrix<
double > 		Fortran_Matrix_to_Matrix (const TNT::Fortran_Matrix< double > &FMat)
converts the argument Fortran_Matrix to a Matrix and returns it.
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_VT)
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_U, BIAS::Matrix< double > &ret_VT)
BIASMathAlgo_EXPORT int | General_singular_value_decomposition (char jobu, char jobvt, const BIAS::Matrix< double > &A, BIAS::Vector< double > &ret_S, BIAS::Matrix< double > &ret_U, BIAS::Matrix< double > &ret_VT)
solve general eigenproblem.
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LLS_QR_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b)
as above but ignores success info (res)
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LLS_QR_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, int &res)
linear least squares solves |Ax-b|=min res=0 on success, anything else rudimentary tested (woelk)
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_LU_linear_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b)
solve linear equations using LU factorization
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Lapack_WLLS_solve (const BIAS::Matrix< double > &A, const BIAS::Vector< double > &b, const BIAS::Matrix< double > &B, int &res)
weighted linear least squares solves |B^-1(b-Ax)|=min res=0 on success, anything else rudimentary tested
int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardt (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, int *iflag), int M, int N, Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE, int MaxIter=LM_DEF_MAX_ITER, double *ResultingJacobian=NULL, int *ipvt=NULL, double *SumOfSquaredErrors=NULL)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::LevenbergMarquardtExtended (void(*fcn)(int *m, int *n, double *x,double *fvec, double *fjac,int *ldfjac, int *iflag), int m, int n, Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.
int | BIAS::Powell (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double Tolerance=MINPACK_DEF_TOLERANCE)
Solve a system of n non-linear equations with n unkowns using the powell hybrid method.
int | BIAS::PowellExtended (void(*fcn)(int *n, double *x, double *fvec, int *iflag), Vector< double > &InitialGuess, Vector< double > &Result, double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE)
solve a system of n non-linear equations with n unkowns using the powell hybrid method.
BIASMathAlgo_EXPORT BIAS::Vector<
double > 		Upper_symmetric_eigenvalue_solve (const BIAS::Matrix< double > &A)
solve symmetric eigenvalue problem (eigenvalues only) untested, grest

Detailed Description

C++ Wrappers for gnu scientific library (GSL).

Author:
woelk 02/2006

woelk 02/2006

woelk 02/2006

woelk 02/2006

woelk 02/2006

Functions from Lapack, e.g. solving systems of linear equations or computing eigenvalues For further information have a look here http://www.netlib.org/lapack/lug/.

Function Documentation

BIASMathAlgo_EXPORT int Eigenproblem_quadratic_matrix | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_EigenValuesReal,
 |  | BIAS::Vector< double > & | ret_EigenValuesImag,
 |  | BIAS::Matrix< double > & | eigenVectors
 | ) |

solve general eigenproblem for a general quadratix (n x n) matrix.

computes eigenvalues and eigenvectors of A. (Jan Woetzel), 03/2002

BIASMathAlgo_EXPORT int Eigenvalue_solve | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | wr,
 |  | BIAS::Vector< double > & | wi
 | ) |

solve unsymmetric eigenvalue problems (for a rectangular matrix) untested, grest

BIASMathAlgo_EXPORT void Fortran_Matrix_to_Matrix | ( | const TNT::Fortran_Matrix< double > & | FMat,
 |  | BIAS::Matrix< double > & | res
 | ) |

converts the argument Fortran_Matrix to a Matrix and returns it.

it mainly tranposes the data array because Fortran-Matrices different row/col-order, same as above but now copying necessary

Author:
Daniel Grest beta April 2003

BIASMathAlgo_EXPORT BIAS::Matrix<double> Fortran_Matrix_to_Matrix ( const TNT::Fortran_Matrix< double > & FMat )

converts the argument Fortran_Matrix to a Matrix and returns it.

it mainly tranposes the data array because Fortran-Matrices different row/col-order

Author:
Jan Woetzel bug fixed by Daniel Grest (04/2003)

Definition at line 134 of file Lapack.cpp.

References TNT::Fortran_Matrix< T >::num_cols(), TNT::Fortran_Matrix< T >::num_rows(), and res.

BIASMathAlgo_EXPORT int General_singular_value_decomposition | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_S,
 |  | BIAS::Matrix< double > & | ret_VT
 | ) | [inline]

Definition at line 148 of file Lapack.hh.

References General_singular_value_decomposition().

BIASMathAlgo_EXPORT int General_singular_value_decomposition | ( | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_S,
 |  | BIAS::Matrix< double > & | ret_U,
 |  | BIAS::Matrix< double > & | ret_VT
 | ) | [inline]

Definition at line 139 of file Lapack.hh.

References General_singular_value_decomposition().

BIASMathAlgo_EXPORT int General_singular_value_decomposition | ( | char | jobu,
 |  | char | jobvt,
 |  | const BIAS::Matrix< double > & | A,
 |  | BIAS::Vector< double > & | ret_S,
 |  | BIAS::Matrix< double > & | ret_U,
 |  | BIAS::Matrix< double > & | ret_VT
 | ) |

solve general eigenproblem.

computes singular value decomposition of a rectangular m x n matrix A calls extern liblapack routine. better use SVD.hh ret_S vector with singular values of A with s(i) >= s(i+1) ret_U m x m orthogonal/unitary matrix U ret_VT n x n orthogonal/unitary matrx transpose(V) Jan Woetzel 03/2002, changed for Matrix by Daniel Grest, July 2002 woelk: added jobu and jobvt jobu: 'A' - calculate U 'N' - do not calculate U (much faster) not tested see man dgesvd

BIASMathAlgo_EXPORT BIAS::Vector<double> Lapack_LLS_QR_linear_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b
 | ) | [inline]

as above but ignores success info (res)

Definition at line 71 of file Lapack.hh.

References TNT::Lapack_LLS_QR_linear_solve(), and res.

BIASMathAlgo_EXPORT BIAS::Vector<double> Lapack_LLS_QR_linear_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b,
 |  | int & | res
 | ) |

linear least squares solves |Ax-b|=min res=0 on success, anything else rudimentary tested (woelk)

Author:
woetzel

BIASMathAlgo_EXPORT BIAS::Vector<double> Lapack_LU_linear_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b
 | ) |

solve linear equations using LU factorization

BIASMathAlgo_EXPORT BIAS::Vector<double> Lapack_WLLS_solve | ( | const BIAS::Matrix< double > & | A,
 |  | const BIAS::Vector< double > & | b,
 |  | const BIAS::Matrix< double > & | B,
 |  | int & | res
 | ) |

weighted linear least squares solves |B^-1(b-Ax)|=min res=0 on success, anything else rudimentary tested

Author:
woelk 04 2003

BIASMathAlgo_EXPORT int BIAS::LevenbergMarquardt | ( | void(*)(int *m, int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | int | M,
 |  | int | N,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE,
 |  | int | MaxIter = LM_DEF_MAX_ITER
 | ) |

Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.

A least squares solution is used. Jacobian is calculated numericaly by forward-difference approximation. See minpack/lmdif1.f

Parameters:
MaxIter max number of error-function evaluations. Note that the complete numerical approximation of the jacobian is always done as a whole before this value is checked. Set to -1 if you want to use the default number of the fortran code
Author:
woelk

Definition at line 214 of file Minpack.cpp.

References BIASERR, BIAS::Vector< T >::GetData(), and lmdif1_().

BIASMathAlgo_EXPORT int BIAS::LevenbergMarquardt | ( | void(*)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag) | fcn,
 |  | int | m,
 |  | int | n,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE
 | ) |

Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.

A least squares solution is used. Jacobian is given analytically.

Parameters:
fcn | minimization function, where m(=sizeof fvec) and n(=sizeof x) are the numbers of residuals/vars passed via fvec/x
m | number of residuals, m>=n
n | number of variables, m>=n
InitialGuess | start point, size must be n
Result | solution after optimization (output), size must be n
Returns:
0 means success in optimization
return values in detail:
  • return = -1: Improper input parameters.
  • return = 0: a termination condition became true
  • return = 5: Number of calls to fcn has reached or exceeded maxfev.
  • return = 6: ftol is too small. No further reduction in sum of squares possible.
  • return = 7: xtol is too small. No further improvement in approximate solution x is possible.
  • return = 8: gtol is too small. fvec is orthogonal to the columns of the jacobian to machine precision.

See minpack/lmder1.f

Author:
woelk

Definition at line 139 of file Minpack.cpp.

References BIASERR, BIAS::Vector< T >::GetData(), and lmder1_().

BIASMathAlgo_EXPORT int BIAS::LevenbergMarquardtExtended | ( | void(*)(int *m, int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | int | M,
 |  | int | N,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | EpsFcn,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE,
 |  | int | MaxIter = LM_DEF_MAX_ITER,
 |  | double * | ResultingJacobian = NULL,
 |  | int * | ipvt = NULL,
 |  | double * | SumOfSquaredErrors = NULL
 | ) |

Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.

A least squares solution is used. Jacobian is calculated numericaly by forward-difference approximation. See minpack/lmdif.f

Parameters:
ResultingJacobian | pass NULL if you are not interested in the jacobian at the minimum, otherwise pass a pointer to double [n*m]
ipvt | pass NULL if you are not interested in the jacobian at the minimum otherwise pass a pointer to int [n]
Author:
woelk

Definition at line 242 of file Minpack.cpp.

References BIASERR, BIAS::Vector< T >::GetData(), LM_DEF_MAX_ITER, and lmdif_().

BIASMathAlgo_EXPORT int BIAS::LevenbergMarquardtExtended | ( | void(*)(int *m, int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag) | fcn,
 |  | int | m,
 |  | int | n,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE
 | ) |

Solves an overdetermined system of n non-linear equations with m parameters using the Levenberg-Marquardt algorithm.

A least squares solution is used. Jacobian is given analytically. See minpack/lmder.f

Author:
woelk

Definition at line 170 of file Minpack.cpp.

References BIASASSERT, BIASERR, BIAS::Vector< T >::GetData(), and lmder_().

BIASMathAlgo_EXPORT int BIAS::Powell | ( | void(*)(int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE
 | ) |

Solve a system of n non-linear equations with n unkowns using the powell hybrid method.

Jacobian is calculated numerical by forward-difference approximation. The error is assumed to be in the range of machine precision. See minpack/hybrd1.f

Author:
woelk
Parameters:
fcn | is the name of the user-supplied subroutine which calculates the functions at x and returns the values in fvec. fcn must be declared e.g. in the user calling program
iflag | should not be changed by fcn unless the user wants to terminate execution, in this case set iflag to a negative integer.
n | is a positive integer input variable set to the number of functions and variables.
x | is an array of length n. on input x must contain an initial estimate of the solution vector. on output x contains the final estimate of the solution vector.
fvec | is an output array of length n which contains the functions evaluated at the output x.
Tolerance | is a nonnegative input variable. termination occurs when the algorithm estimates that the relative error between x and the solution is at most Tolerance.
Returns:
0 if everything worked fine
if the user has terminated execution, return is the value of iflag, see description of fcn. Otherwise, return means
  • return=-1 improper input parameters.
  • return=0 algorithm estimates that the relative error between x and the solution is at most tol.
  • return=2 number of calls to fcn has reached or exceeded 200*(n+1)
  • return=3 Tolerance is too small. no further improvement in the approximate solution x is possible.
  • return=4 iteration is not making good progress.

Definition at line 83 of file Minpack.cpp.

References BIAS::Vector< T >::GetData(), hybrd1_(), and BIAS::Vector< T >::Size().

Referenced by BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid(), and main().

BIASMathAlgo_EXPORT int BIAS::PowellExtended | ( | void(*)(int *n, double *x, double *fvec, int *iflag) | fcn,
 |  | Vector< double > & | InitialGuess,
 |  | Vector< double > & | Result,
 |  | double | EpsFcn,
 |  | double | Tolerance = MINPACK_DEF_TOLERANCE
 | ) |

solve a system of n non-linear equations with n unkowns using the powell hybrid method.

Jacobian is aproximated numericaly by forward-difference approximation. See Powell for further parameter documentation See minpack/hybrd.f

Author:
woelk

Definition at line 101 of file Minpack.cpp.

References BIAS::Vector< T >::GetData(), hybrd_(), r, and BIAS::Vector< T >::Size().

BIASMathAlgo_EXPORT BIAS::Vector<double> Upper_symmetric_eigenvalue_solve ( const BIAS::Matrix< double > & A )

solve symmetric eigenvalue problem (eigenvalues only) untested, grest

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Directory Hierarchy

Basic Image AlgorithmS Library Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • Base
    • Common
      • Examples
    • Debug
      • Examples
    • Geometry
      • Examples
    • Image
      • Examples
    • Math
      • Examples
      • tnt
  • build
    • BIAS
  • FeatureDetector
    • Examples
  • Filter
    • Examples
  • Geometry
    • Examples
  • Gui
    • Examples
  • Image
    • Examples
  • Matcher2D
    • Examples
  • MathAlgo
    • Examples
    • minpack
  • NetworkComm
    • Examples
  • StateEstimator
    • Examples
  • Tests
  • Tools
  • Utils
    • Examples
  • VideoSource
    • Examples
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/ Directory Reference

Base

Base Directory Reference

Directories

directory | Common
directory | Debug
directory | Geometry
directory | Image
directory | Math
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/ Directory Reference

Base » Common

Common Directory Reference

Directories

directory | Examples

Files

file | BaseFactory.hh [code]
file | BIASpragma.hh [code]
file | BIASpragmaEnd.hh [code]
file | BIASpragmaStart.hh [code]
file | CompareFloatingPoint.hh [code]
file | FileHandling.cpp [code]
file | FileHandling.hh [code]
file | getopt_long_W32.cpp [code]
file | getopt_W32.cpp [code]
file | getopt_W32.h [code]
file | LeakChecking.h [code]
file | W32Compat.cpp [code]
file | W32Compat.hh [code]
file | XMLBase.cpp [code]
file | XMLBase.hh [code]
file | XMLIO.cpp [code]
file | XMLIO.hh [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ Directory Reference

Base » Common » Examples

Examples Directory Reference

Files

file | ExampleCompare.cpp [code]
file | ExampleFactory.cpp [code]
file | ExampleFileNames.cpp [code]
file | ExampleXMLBase.cpp [code]
file | ExampleXMLIO.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ Directory Reference

Base » Debug

Debug Directory Reference

Directories

directory | Examples

Files

file | biasabort.cpp [code]
file | biasabort.hh [code]
file | biasexit.cpp [code]
file | biasexit.hh [code]
file | Constraints.hh [code]
file | Debug.cpp [code]
file | Debug.hh [code]
some macros, classes and varaibles for debugging purposes:
file | DebugSimple.hh [code]
file | Error.hh [code]
file | Exception.hh [code]
file | LogFacility.cpp [code]
file | LogFacility.hh [code]
file | RedirectStreams.hh [code]
file | ThreadNaming.cpp [code]
file | ThreadNaming.hh [code]
utility function to assign "names" to threads, actually WIN32 only.
file | TimeMeasure.cpp [code]
file | TimeMeasure.hh [code]
file | TimeMeasurement.hh [code]
Time measurement based on instance construction and destruction.
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ Directory Reference

Base » Debug » Examples

Examples Directory Reference

Files

file | DebugMyMain.cpp [code]
file | ExampleConstraints.cpp [code]
file | ExampleCopy.cpp [code]
file | ExampleLogFacility.cpp [code]
file | ExampleTimeMeasureCycle.cpp [code]
file | MyDebug.cpp [code]
file | MyDebug.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/ Directory Reference

Base » Geometry

Geometry Directory Reference

Directories

directory | Examples

Files

file | AffineTransf.cpp [code]
file | AffineTransf.hh [code]
file | EMatrixBase.cpp [code]
file | EMatrixBase.hh [code]
file | EuclideanTransf3D.cpp [code]
file | EuclideanTransf3D.hh [code]
file | FMatrixBase.cpp [code]
file | FMatrixBase.hh [code]
file | HMatrixBase.cpp [code]
file | HMatrixBase.hh [code]
file | HomgLine2D.cpp [code]
file | HomgLine2D.hh [code]
file | HomgLine3D.hh [code]
file | HomgPlane3D.cpp [code]
file | HomgPlane3D.hh [code]
file | HomgPoint1D.cpp [code]
file | HomgPoint1D.hh [code]
file | HomgPoint2D.cpp [code]
file | HomgPoint2D.hh [code]
file | HomgPoint2DCov.cpp [code]
file | HomgPoint2DCov.hh [code]
file | HomgPoint3D.cpp [code]
file | HomgPoint3D.hh [code]
file | HomgPoint3DCov.cpp [code]
file | HomgPoint3DCov.hh [code]
file | KMatrix.cpp [code]
file | KMatrix.hh [code]
file | Normalization.cpp [code]
file | Normalization.hh [code]
file | PlueckerMatrix.cpp [code]
file | PlueckerMatrix.hh [code]
file | PMatrixBase.cpp [code]
file | PMatrixBase.hh [code]
file | PoseParametrization.cpp [code]
file | PoseParametrization.hh [code]
file | PoseParametrizationCovariance.cpp [code]
file | PoseParametrizationCovariance.hh [code]
file | Quaternion.cpp [code]
file | Quaternion.hh [code]
file | QuaternionInl.hh [code]
file | QuaternionOperators.hh [code]
file | RMatrixBase.cpp [code]
file | RMatrixBase.hh [code]
file | TrifocalTensorBase.cpp [code]
file | TrifocalTensorBase.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ Directory Reference

Base » Geometry » Examples

Examples Directory Reference

Files

file | ExamplePMatrixBase.cpp [code]
file | ExampleQuaternion.cpp [code]
file | ExampleRMatrix.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ Directory Reference

Base » Image

Image Directory Reference

Directories

directory | Examples

Files

file | Bresenham.hh [code]
file | BresenhamCircle.hh [code]
file | EightWaySymmetry.hh [code]
file | ExifTag.cpp [code]
file | ExifTag.hh [code]
file | Image.cpp [code]
file | Image.hh [code]
file | ImageAttributes.cpp [code]
file | ImageAttributes.hh [code]
file | ImageBase.cpp [code]
file | ImageBase.hh [code]
file | ImageBaseInline.hh [code]
file | ImageConvert.cpp [code]
file | ImageConvert.hh [code]
file | ImageConvertInstantiation.cpp [code]
file | ImageConvertThreaded.cpp [code]
file | ImageConvertThreaded.hh [code]
file | ImageDraw.cpp [code]
file | ImageDraw.hh [code]
file | ImageInline.hh [code]
file | ImageIO.cpp [code]
file | ImageIO.hh [code]
file | MetaData.cpp [code]
file | MetaData.hh [code]
file | Operators.cpp [code]
file | PMDImageIO.cpp [code]
file | PMDImageIO.hh [code]
file | ROI.cpp [code]
file | ROI.hh [code]
file | ScanLine.hh [code]
file | ScanLine2.hh [code]
file | ToHSL.cpp [code]
file | ToHSV.cpp [code]
file | ToInterleaved.cpp [code]
file | ToPlanar.cpp [code]
file | UUID.cpp [code]
file | UUID.hh [code]
file | ViffHeader.hh [code]
file | WrapBias2Ipl.cpp [code]
file | WrapBias2Ipl.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ Directory Reference

Base » Image » Examples

Examples Directory Reference

Files

file | convertRAW.cpp [code]
file | ExampleBresenham.cpp [code]
file | ExampleChessboard.cpp [code]
file | ExampleConvert.cpp [code]
file | ExampleDraw.cpp [code]
file | ExampleEmpty.cpp [code]
file | ExampleForeignData.cpp [code]
file | ExampleHSVConversion.cpp [code]
file | ExampleImageAttributes.cpp [code]
file | ExampleImageLoad.cpp [code]
file | ExampleImageMagickIO.cpp [code]
file | ExampleImageOperator.cpp [code]
file | ExampleInterpolation.cpp [code]
file | ExampleIpl.cpp [code]
file | ExampleIplImageDisplay.cpp [code]
file | ExampleIplImageDraw.cpp [code]
file | ExampleIplWrapOpenCV.cpp [code]
file | ExampleMetaData.cpp [code]
file | ExampleMinMax.cpp [code]
file | ExampleROI.cpp [code]
file | ExampleTile.cpp [code]
file | ExampleUUID.cpp [code]
file | mip2viff.cpp [code]
file | viff2mip.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/ Directory Reference

Base » Math

Math Directory Reference

Directories

directory | Examples
directory | tnt

Files

file | Cholesky.cpp [code]
file | Cholesky.hh [code]
file | Distribution.cpp [code]
file | Distribution.hh [code]
file | Math.hh [code]
file | Matrix.cpp [code]
file | Matrix.hh [code]
file | Matrix2x2.cpp [code]
file | Matrix2x2.hh [code]
file | Matrix3x3.cpp [code]
file | Matrix3x3.hh [code]
file | Matrix3x4.cpp [code]
file | Matrix3x4.hh [code]
file | Matrix4x4.cpp [code]
file | Matrix4x4.hh [code]
file | Operators.hh [code]
file | Polynom.hh [code]
file | Random.cpp [code]
file | Random.hh [code]
file | RGB.hh [code]
file | RGBA.hh [code]
file | Tensor3D.cpp [code]
file | Tensor3D.hh [code]
file | Tensor3D3x3x3.cpp [code]
file | Tensor3D3x3x3.hh [code]
file | Vector.cpp [code]
file | Vector.hh [code]
file | Vector2.cpp [code]
file | Vector2.hh [code]
file | Vector3.cpp [code]
file | Vector3.hh [code]
file | Vector4.cpp [code]
file | Vector4.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ Directory Reference

Base » Math » Examples

Examples Directory Reference

Files

file | ExampleLoadBan.cpp [code]
file | ExampleLoadBOG.cpp [code]
file | ExampleOperators.cpp [code]
file | ExamplePolynom.cpp [code]
file | ExampleRandom.cpp [code]
file | ExampleRandom2.cpp [code]
file | ExampleRandom2D.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/ Directory Reference

Base » Math » tnt

tnt Directory Reference

Files

file | cholesky.h [code]
file | cmat.h [code]
file | fcscmat.h [code]
file | fmat.h [code]
file | fortran.h [code]
file | fspvec.h [code]
file | index.h [code]
file | lapack.h [code]
file | lu.h [code]
file | qr.h [code]
file | region1d.h [code]
file | region2d.h [code]
file | stopwatch.h [code]
file | subscript.h [code]
file | tnt.h [code]
file | tntmath.h [code]
file | tntreqs.h [code]
file | transv.h [code]
file | triang.h [code]
file | trisolve.h [code]
file | vec.h [code]
file | vecadaptor.h [code]
file | version.h [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: D:/home/jw/build/ Directory Reference

build

build Directory Reference

Directories

directory BIAS
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: D:/home/jw/build/BIAS/ Directory Reference

build » BIAS

BIAS Directory Reference

Files

file bias_config.h [code]
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ Directory Reference

FeatureDetector

FeatureDetector Directory Reference

Directories

directory | Examples

Files

file | ColorHarris.cpp [code]
file | ColorHarris.hh [code]
file | CornerDetectorBase.cpp [code]
file | CornerDetectorBase.hh [code]
file | CornerDetectorFoerstner.cpp [code]
file | CornerDetectorFoerstner.hh [code]
file | CornerDetectorGradient.cpp [code]
file | CornerDetectorGradient.hh [code]
file | CornerDetectorHarris.cpp [code]
file | CornerDetectorHarris.hh [code]
file | CornerDetectorKLT.cpp [code]
file | CornerDetectorKLT.hh [code]
file | CornerDetectorSusan.cpp [code]
file | CornerDetectorSusan.hh [code]
file | LinearRegionDetector.cpp [code]
file | LinearRegionDetector.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/Examples/ Directory Reference

FeatureDetector » Examples

Examples Directory Reference

Files

file ExampleCornerDetector.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/ Directory Reference

Filter

Filter Directory Reference

Directories

directory | Examples

Files

file | Binomial.cpp [code]
file | Binomial.hh [code]
file | Convolution.cpp [code]
file | Convolution.hh [code]
file | DeInterlace.cpp [code]
file | DeInterlace.hh [code]
file | Dilation.cpp [code]
file | Dilation.hh [code]
file | DistTransform.cpp [code]
file | DistTransform.hh [code]
file | Erosion.cpp [code]
file | Erosion.hh [code]
file | FilterBase.cpp [code]
file | FilterBase.hh [code]
file | Filterinst.hh [code]
inline code for instantiation of filter classes
file | FilterMask.cpp [code]
file | FilterMask.hh [code]
file | FilterNTo2N.cpp [code]
file | FilterNTo2N.hh [code]
file | FilterNTo3N.cpp [code]
file | FilterNTo3N.hh [code]
file | FilterNToN.cpp [code]
file | FilterNToN.hh [code]
file | Gauss.cpp [code]
file | Gauss.hh [code]
file | GradientGauss.cpp [code]
file | GradientGauss.hh [code]
file | GradientGaussAsymmetric.cpp [code]
file | GradientGaussAsymmetric.hh [code]
file | GradientSimple.cpp [code]
file | GradientSimple.hh [code]
file | GradientSobel3x3.cpp [code]
file | GradientSobel3x3.hh [code]
file | Label.cpp [code]
file | Label.hh [code]
file | Mean.cpp [code]
file | Mean.hh [code]
file | Median.cpp [code]
file | Median.hh [code]
file | Morphology.cpp [code]
file | Morphology.hh [code]
file | Rescale.cpp [code]
file | Rescale.hh [code]
file | StructureTensor.cpp [code]
file | StructureTensor.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ Directory Reference

Filter » Examples

Examples Directory Reference

Files

file | ExampleBinomial.cpp [code]
file | ExampleConvolution.cpp [code]
file | ExampleDeInterlace.cpp [code]
file | ExampleDilation.cpp [code]
file | ExampleDistTransform.cpp [code]
file | ExampleErosion.cpp [code]
file | ExampleGauss.cpp [code]
file | ExampleGradient.cpp [code]
file | ExampleHarrisColor.cpp [code]
file | ExampleMedian.cpp [code]
file | ExampleRescale.cpp [code]
file | ExampleStructureTensor.cpp [code]
file | ExampleUpsampleBy2Grey.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ Directory Reference

Geometry

Geometry Directory Reference

Directories

directory | Examples

Files

file | Conic2D.cpp [code]
file | Conic2D.hh [code]
file | CoordinateTransform3D.cpp [code]
file | CoordinateTransform3D.hh [code]
file | CovMatrix3x3.cpp [code]
file | CovMatrix3x3.hh [code]
file | EightWaySymmetryHomg.hh [code]
file | EMatrix.cpp [code]
file | EMatrix.hh [code]
file | EpipolarLine.cpp [code]
file | EpipolarLine.hh [code]
file | FMatrix.cpp [code]
file | FMatrix.hh [code]
file | FMatrixEstimation.cpp [code]
file | FMatrixEstimation.hh [code]
file | HMatrix.cpp [code]
file | HMatrix.hh [code]
file | HMatrixEstimation.cpp [code]
file | HMatrixEstimation.hh [code]
file | Parametrization.cpp [code]
file | Parametrization.hh [code]
file | PMatrix.cpp [code]
file | PMatrix.hh [code]
file | PMatrixEstimation.cpp [code]
file | PMatrixEstimation.hh [code]
file | PMatrixLinear.cpp [code]
file | PMatrixLinear.hh [code]
file | Pose.cpp [code]
file | Pose.hh [code]
file | Projection.cpp [code]
file | Projection.hh [code]
file | ProjectionParametersBase.cpp [code]
file | ProjectionParametersBase.hh [code]
file | ProjectionParametersIO.cpp [code]
file | ProjectionParametersIO.hh [code]
file | ProjectionParametersPerspective.cpp [code]
file | ProjectionParametersPerspective.hh [code]
file | ProjectionParametersProjective.cpp [code]
file | ProjectionParametersProjective.hh [code]
file | ProjectionParametersSpherical.cpp [code]
file | ProjectionParametersSpherical.hh [code]
file | ProjectionParametersZoom.cpp [code]
file | ProjectionParametersZoom.hh [code]
file | Quadric3D.cpp [code]
file | Quadric3D.hh [code]
file | RMatrix.cpp [code]
file | RMatrix.hh [code]
file | SimilarityTransform.cpp [code]
file | SimilarityTransform.hh [code]
file | TFTensorEstimation.cpp [code]
file | TFTensorEstimation.hh [code]
file | Triangulation.cpp [code]
file | Triangulation.hh [code]
file | TrifocalTensor.cpp [code]
file | TrifocalTensor.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ Directory Reference

Geometry » Examples

Examples Directory Reference

Files

file | Example7Point.cpp [code]
file | ExampleConic.cpp [code]
file | ExampleLoadBBC.cpp [code]
file | ExampleLoadBOG_P.cpp [code]
file | ExamplePMatrix.cpp [code]
file | ExampleProjection.cpp [code]
file | ExampleProjectionParametersIO.cpp [code]
file | ExampleTriangulate.cpp [code]
file | ExampleTriangulate2.cpp [code]
file | ExampleTriangulateOptimal.cpp [code]
file | FMatrixTest.cpp [code]
file | HMatrixTest.cpp [code]
file | InvestigateEpipoleEstimation.cpp [code]
file | PMatrixTest.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ Directory Reference

Gui

Gui Directory Reference

Directories

directory | Examples

Files

file | _wx_intellisense.h [code]
file | bias_wx_glcanvas.h [code]
file | biasgl.h [code]
file | CameraViewController.cpp [code]
file | CameraViewController.hh [code]
file | CameraViewExternals.cpp [code]
file | CameraViewExternals.hh [code]
file | CameraViewFrustum.cpp [code]
file | CameraViewFrustum.hh [code]
file | CameraViewInternals.cpp [code]
file | CameraViewInternals.hh [code]
file | CameraViewport.cpp [code]
file | CameraViewport.hh [code]
file | ConsoleRedirectIO.cpp [code]
file | ConsoleRedirectIO.hh [code]
file | dndFileTarget.cpp [code]
file | dndFileTarget.hh [code]
file | DrawTextGL.cpp [code]
file | DrawTextGL.hh [code]
file | GeometryGL.cpp [code]
file | GeometryGL.hh [code]
file | glcheck.h [code]
file | glstuff.h [code]
file | GuiBase.cpp [code]
file | GuiBase.hh [code]
file | GuiEnhanced.cpp [code]
file | GuiEnhanced.hh [code]
file | GuiGTK.cpp [code]
file | GuiGTK.hh [code]
file | GuiWX.cpp [code]
file | GuiWX.hh [code]
file | ImageCanvas.cpp [code]
file | ImageCanvas.hh [code]
file | ImageCanvasEnhanced.cpp [code]
file | ImageCanvasEnhanced.hh [code]
file | ImageCanvasGLBase.cpp [code]
file | ImageCanvasGLBase.hh [code]
file | ImgObjGL.cpp [code]
file | ImgObjGL.hh [code]
file | OpenGLCanvas.cpp [code]
file | OpenGLCanvas.hh [code]
file | OpenGLCanvasBase.cpp [code]
file | OpenGLCanvasBase.hh [code]
file | ParamGUI.cpp [code]
file | ParamGUI.hh [code]
file | ProjectionGUI.cpp [code]
file | ProjectionGUI.hh [code]
file | RenderModeGL.hh [code]
file | SettingsGL.cpp [code]
file | SettingsGL.hh [code]
file | StringConv.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ Directory Reference

Gui » Examples

Examples Directory Reference

Files

file | ExampleGLShared.cpp [code]
file | ExampleGLShared.hh [code]
file | ExampleImageCanvas.cpp [code]
file | ExampleImageCanvasEnhanced.cpp [code]
file | ExampleImageCanvasFloat.cpp [code]
file | ExampleImageCanvasGLBase.cpp [code]
file | ExampleImageCanvasGLBase.hh [code]
file | ExampleMultipleGui.cpp [code]
file | ExampleOpenGLCanvas.cpp [code]
file | ExampleOpenGLCanvas.hh [code]
file | ExampleOpenGLCanvasBase.cpp [code]
file | ExampleOpenGLCanvasBase.hh [code]
file | ParamGUISample1.cpp [code]
file | ParamGUISample2.cpp [code]
file | ParamGUISample3.cpp [code]
file | TestGui.cpp [code]
file | TestGuiEnhanced.cpp [code]
file | TestGuiPyramid.cpp [code]
file | TestMouse.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ Directory Reference

Image

Image Directory Reference

Directories

directory | Examples

Files

file | BackwardMapping.cpp [code]
file | BackwardMapping.hh [code]
file | Camera.cpp [code]
file | Camera.hh [code]
file | CameraParam.cpp [code]
file | CameraParam.hh [code]
file | ColorHistogram.cpp [code]
file | ColorHistogram.hh [code]
file | ColorMultiHistogram.cpp [code]
file | ColorMultiHistogram.hh [code]
file | ColorSegmentation.cpp [code]
file | ColorSegmentation.hh [code]
file | CompressJpeg.cpp [code]
file | CompressJpeg.hh [code]
file | Contour.cpp [code]
file | Contour.hh [code]
file | CylinderMapping.cpp [code]
file | CylinderMapping.hh [code]
file | DCData.cpp [code]
file | DCData.hh [code]
file | FFT2D.cpp [code]
file | FFT2D.hh [code]
file | FFT2D_Tiles.cpp [code]
file | FFT2D_Tiles.hh [code]
file | Histogram.cpp [code]
file | Histogram.hh [code]
file | HomographyMapping.cpp [code]
file | HomographyMapping.hh [code]
file | IntegralHistogram.cpp [code]
file | IntegralHistogram.hh [code]
file | LogPolarMapping.cpp [code]
file | LogPolarMapping.hh [code]
file | MatlabTBUndistortion.cpp [code]
file | MatlabTBUndistortion.hh [code]
file | PMDImageProc.cpp [code]
file | PMDImageProc.hh [code]
file | ProjectionMapping.cpp [code]
file | ProjectionMapping.hh [code]
file | PyramidImage.cpp [code]
file | PyramidImage.hh [code]
file | RigParameter.cpp [code]
file | RigParameter.hh [code]
file | SphericalUndistortion.cpp [code]
file | SphericalUndistortion.hh [code]
file | StereoRedGreen.cpp [code]
file | StereoRedGreen.hh [code]
file | UndistortionMapping.cpp [code]
file | UndistortionMapping.hh [code]
file | UnVignette.cpp [code]
file | UnVignette.hh [code]
file | VideoStream.cpp [code]
file | VideoStream.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ Directory Reference

Image » Examples

Examples Directory Reference

Files

file | ExampleCamera.cpp [code]
file | ExampleCameraParam.cpp [code]
file | ExampleContour.cpp [code]
file | ExampleCylinderMapping.cpp [code]
file | ExampleFFT2D.cpp [code]
file | ExampleFFT2D_Tiles.cpp [code]
file | ExampleFMT2D.cpp [code]
file | ExampleHistogram.cpp [code]
file | ExampleHomographyMapping.cpp [code]
file | ExampleLogPolarMapping.cpp [code]
file | ExampleMapPerspImages.cpp [code]
file | ExamplePMDImageIO.cpp [code]
file | ExampleProjectionMapping.cpp [code]
file | ExamplePyramidImage.cpp [code]
file | ExampleRigParameter.cpp [code]
file | ExampleSphereProjections.cpp [code]
file | ExampleUndistort.cpp [code]
file | ExampleUnVignette.cpp [code]
file | ExampleVideoStream.cpp [code]
file | PMatrix2RigParameter.cpp [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/ Directory Reference

Matcher2D

Matcher2D Directory Reference

Directories

directory | Examples

Files

file | CornerMatcher.cpp [code]
file | CornerMatcher.hh [code]
file | LineMatcher.cpp [code]
file | RegionMatcher.cpp [code]
file | RegionMatcher.hh [code]
file | SimilarityMeasure.cpp [code]
file | Tracker.cpp [code]
file | Tracker.hh [code]
file | TrackerBase.cpp [code]
file | TrackerBase.hh [code]
file | TrackerBaseAffine.hh [code]
file | TrackerBaseInterface.hh [code]
file | TrackerBaseSimple.hh [code]
file | TrackerBaseWeighted.hh [code]
file | TrackerSynth.cpp [code]
file | TrackerSynth.hh [code]
Generated on Wed Jun 21 19:06:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ Directory Reference

Matcher2D » Examples

Examples Directory Reference

Files

file | ExampleColorNCC.cpp [code]
file | ExampleKLTEdge.cpp [code]
file | ExampleLineMatcher.cpp [code]
file | ExampleParabola.cpp [code]
file | ExampleTracker.cpp [code]
file | ExampleTracker2.cpp [code]
file | ExampleTracker3.cpp [code]
file | ExampleTrackerBase.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/ Directory Reference

MathAlgo

MathAlgo Directory Reference

Directories

directory | Examples
directory | minpack

Files

file | BSplineCurve.cpp [code]
file | BSplineCurve.hh [code]
file | FFT.cpp [code]
file | FFT.hh [code]
file | GaussHelmert.cpp [code]
file | GaussHelmert.hh [code]
file | GSL.cpp [code]
file | GSL.hh [code]
file | Interpolator.cpp [code]
file | Interpolator.hh [code]
file | Lapack.cpp [code]
file | Lapack.hh [code]
BIAS c++ wrapper class for lapack fortran77 functions.
file | LeastSquares.cpp [code]
file | LeastSquares.hh [code]
file | Median1D.cpp [code]
file | Median1D.hh [code]
file | Minpack.cpp [code]
file | Minpack.hh [code]
file | MSAC.hh [code]
file | PolynomialSolve.cpp [code]
file | PolynomialSolve.hh [code]
file | RANSAC.hh [code]
file | RANSACPreKnowledge.hh [code]
file | SVD.cpp [code]
file | SVD.hh [code]
file | SVD3x3.cpp [code]
file | SVD3x3.hh [code]
file | UnscentedTransform.cpp [code]
file | UnscentedTransform.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ Directory Reference

MathAlgo » Examples

Examples Directory Reference

Files

file | ExampleBSplineCurve.cpp [code]
file | ExampleFFT.cpp [code]
file | ExampleGSL.cpp [code]
file | ExampleInterpolateLuT.cpp [code]
file | ExampleLeastSquares.cpp [code]
file | ExamplePolynomialSolve.cpp [code]
file | ExamplePowell.cpp [code]
file | ExampleRANSAC.cpp [code]
file | ExampleRANSAC_double.hh [code]
file | ExampleRANSACPlane.cpp [code]
file | ExampleRANSACPlane.hh [code]
file | ExampleRegressionPlane.cpp [code]
file | ExampleSVD.cpp [code]
file | ExampleSVD3x3.cpp [code]
file | ExampleUnscentedTransform.cpp [code]
file | ExampleWeightedLinearLeastSquares.cpp [code]
file | interpolate.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/ Directory Reference

MathAlgo » minpack

minpack Directory Reference

Files

file | f2c_gnu011.h [code]
file | win32_f2c.h [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/ Directory Reference

NetworkComm

NetworkComm Directory Reference

Directories

directory | Examples

Files

file | CScommBase.cpp [code]
file | CScommBase.hh [code]
file | CScommClasses.hh [code]
file | CScommClient.cpp [code]
file | CScommClient.hh [code]
file | CScommServer.cpp [code]
file | CScommServer.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/ Directory Reference

NetworkComm » Examples

Examples Directory Reference

Files

file | clientExample.cpp [code]
file | ExampleNetsync.cpp [code]
file | serverExample.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/ Directory Reference

StateEstimator

StateEstimator Directory Reference

Directories

directory | Examples

Files

file | Condensation.cpp [code]
file | Condensation.hh [code]
file | CondensHisto.cpp [code]
file | CondensHisto.hh [code]
file | CondensImg.cpp [code]
file | CondensImg.hh [code]
file | Kalman.cpp [code]
file | Kalman.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ Directory Reference

StateEstimator » Examples

Examples Directory Reference

Files

file | CondensHistoExample.cpp [code]
file | condensImgExample.cpp [code]
file | ExampleKalman.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/ Directory Reference

Tests

Tests Directory Reference

Files

file | helloconfig.cpp [code]
file | MathBaseOperators.cpp [code]
file | testDefines.cpp [code]
file | testEnv.cpp [code]
file | testError.cpp [code]
file | testLeak.cpp [code]
file | testWarn.cpp [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ Directory Reference

Tools

Tools Directory Reference

Files

file | biasadd.cpp [code]
file | biasconvert.cpp [code]
file | biasdetectunvignettewx.cpp [code]
file | biasdiff.cpp [code]
file | biasextract.cpp [code]
file | biasfilter.cpp [code]
file | biasinsert.cpp [code]
file | biasmerge.cpp [code]
file | biasprojection.cpp [code]
file | biassetprojection.cpp [code]
file | biassetuid.cpp [code]
file | biasshowepi.cpp [code]
file | biasshowepiwx.cpp [code]
file | biasshowsm.cpp [code]
file | biasview.cpp [code]
file | biasviewwx.cpp [code]
file | pmatrix2projection.cpp [code]
file | ShowCamWx.cpp [code]
file | timeit.cpp [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ Directory Reference

Utils

Utils Directory Reference

Directories

directory | Examples

Files

file | GenGroundTruth.cpp [code]
file | GenGroundTruth.hh [code]
file | GenSynthMatches.cpp [code]
file | GenSynthMatches.hh [code]
file | MatchDataBase.cpp [code]
file | MatchDataBase.hh [code]
file | Param.cpp [code]
file | Param.hh [code]
file | ParamTypes.cpp [code]
file | ParamTypes.hh [code]
file | PMatrix3DData.cpp [code]
file | PMatrix3DData.hh [code]
file | StatekeeperGL.hh [code]
file | ThreeDOut.cpp [code]
file | ThreeDOut.hh [code]
file | TriangleMesh.cpp [code]
file | TriangleMesh.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ Directory Reference

Utils » Examples

Examples Directory Reference

Files

file | ExampleGenSynthMatches.cpp [code]
file | ExampleGGTCube.cpp [code]
file | ExampleGGTPlane.cpp [code]
file | ExampleMatchDataBase.cpp [code]
file | ExampleShowFreeD.cpp [code]
file | ExampleTFT.cpp [code]
file | ExampleThreeDOutVRML.cpp [code]
file | ExampleTriangleMesh.cpp [code]
file | ExampleVRMLOutProjection.cpp [code]
file | ParamExample.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ Directory Reference

VideoSource

VideoSource Directory Reference

Directories

directory | Examples

Files

file | MDcam.cpp [code]
file | MDcam.hh [code]
file | ueyeclass.cpp [code]
file | ueyeclass.hh [code]
file | VideoServer.cpp [code]
file | VideoServer.hh [code]
file | VideoShMFeeder.cpp [code]
file | VideoShMFeeder.hh [code]
file | VideoSource_Base.cpp [code]
file | VideoSource_Base.hh [code]
file | VideoSource_DCAM.cpp [code]
file | VideoSource_DCAM.hh [code]
file | VideoSource_DCAM_CMU.cpp [code]
file | VideoSource_Disk.cpp [code]
file | VideoSource_Disk.hh [code]
file | VideoSource_Disk_FindFiles.h [code]
file | VideoSource_DiskPMD.cpp [code]
file | VideoSource_DiskPMD.hh [code]
file | VideoSource_DSHOW.cpp [code]
file | VideoSource_DSHOW.hh [code]
file | VideoSource_DV.cpp [code]
file | VideoSource_DV.hh [code]
file | VideoSource_DV2.cpp [code]
file | VideoSource_DV2.hh [code]
file | VideoSource_Net.cpp [code]
file | VideoSource_Net.hh [code]
file | VideoSource_Shm.cpp [code]
file | VideoSource_Shm.hh [code]
file | VideoSource_Stereo.cpp [code]
file | VideoSource_Stereo.hh [code]
file | VideoSource_uEye.cpp [code]
file | VideoSource_uEye.hh [code]
file | VideoSource_V4L.cpp [code]
file | VideoSource_V4L.hh [code]
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ Directory Reference

VideoSource » Examples

Examples Directory Reference

Files

file | ExampleCameraParameter.cpp [code]
file | ExampleDirectToDisk.cpp [code]
file | ExampleMDCamToShm.cpp [code]
file | ExampleMDCamToShmWx.cpp [code]
file | ExampleVideofeedShm.cpp [code]
file | ExampleVideoServer.cpp [code]
file | ExampleVideoSource_Net.cpp [code]
file | ExampleVideoSource_Shm.cpp [code]
file | Scan1394Bus.cpp [code]
file | showdcam.cpp [code]
file | showdcam16.cpp [code]
file | showdv2cam.cpp [code]
file | showdvcam.cpp [code]
file | showmdcam.cpp [code]
file | showv4lcam.cpp [code]
file | TestMIPVideoSource_Disk.cpp [code]
Generated on Wed Jun 21 19:06:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Examples

Basic Image AlgorithmS Library Examples

Here is a list of all examples:
  • convertRAW.cpp
  • ExampleFileNames.cpp
  • ExampleGLShared.cpp
  • ExampleImageAttributes.cpp
  • ExampleImageLoad.cpp
  • ExampleImageMagickIO.cpp
  • ExampleIpl.cpp
  • ExampleIplImageDisplay.cpp
  • ExampleIplImageDraw.cpp
  • ExampleIplWrapOpenCV.cpp
  • ExampleLoadBan.cpp
  • ExampleLoadBOG.cpp
  • ExampleOpenGLCanvas.cpp
  • ExampleOpenGLCanvasBase.cpp
  • ExampleTracker2
  • ExampleTracker3
  • ExampleTrackerBase
  • mip2viff.cpp
  • timeit.cpp
  • viff2mip.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: convertRAW.cpp

convertRAW.cpp

demonstrates reading of RAW4096 image format

Reads a .raw RAW4096 image which contains a scorpion 1600x1200 Bayer raw pattern with 8 bpp and writes it as a jpeg. Thsi format us used by Mediendom project by Jan Woetzel and Juergen Rienow 2005.

Author:
Jan Woetzel 05/2005
00001 /**
00002 \example convertRAW.cpp demonstrates reading of RAW4096 image format
00003
00004 Reads a .raw RAW4096 image which contains a scorpion 1600x1200 Bayer raw pattern with 8 bpp
00005 and writes it as a jpeg.
00006 Thsi format us used by Mediendom project by Jan Woetzel and Juergen Rienow 2005.
00007 @author Jan Woetzel 05/2005 */
00008
00009 #include <Base/Image/ImageIO.hh>
00010 #include <Base/Image/ImageConvert.hh>
00011
00012 #include <Base/Debug/Error.hh>
00013 #include <Base/Debug/DebugSimple.hh>
00014
00015 // ----------------------
00016
00017 using namespace std;
00018 using namespace BIAS;
00019
00020
00021 void usage(int /*argc*/, char** /*argv*/)
00022 {
00023   cout<<"usage:  readRAW <img.raw> <out.jpg> <jpgQuality>"<<endl
00024     <<"author: Jan Woetzel"<<endl;
00025 }
00026
00027 // main entry for console application
00028 int main(int argc, char** argv){
00029   if (argc==1) usage(argc, argv);
00030
00031   cout<<"started ";
00032   if (argc>0) cout<<argv[0];
00033   cout<<endl;
00034
00035   BIAS::Image<unsigned char> img;
00036
00037   string in("img.raw");
00038   string out("img_out.jpg");
00039   unsigned int quality=100;
00040
00041   if (argc>1) in =argv[1];
00042   if (argc>2) out=argv[2];
00043   if (argc>3) quality=atoi(argv[3]);
00044
00045   // work:
00046   int result = 0;
00047   result = BIAS::ImageIO::ImportRAWwithHeader(in, img);
00048   if (result!=0) {
00049     cout<<"could not load image "<<in<<endl;
00050     return -2;
00051   };
00052
00053   /// to RGB  convert 1 ch Bayer --> 3 channel RGB
00054   BIAS::Image<unsigned char> imgRGB;
00055   BIAS::ImageConvert::ToRGB(img, imgRGB);
00056
00057   // write result:
00058   result = ImageIO::ExportImage(out, imgRGB, BIAS::ImageIO::FF_jpg, false, quality,false,false);
00059   if (result!=0)
00060     cout<<"could not write image."<<endl;
00061
00062 #ifdef BIAS_HAVE_OPENCV
00063   imgRGB.Display(true, 6000);
00064 #endif // BIAS_HAVE_OPENCV
00065
00066   cout<<"done."<<endl;
00067 }
00068
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleFileNames.cpp

ExampleFileNames.cpp

How to split a full path into its components directory, base of filename and extension of the filename.
Todo:
Windows may need some more work regarding the drive, in particular for network drives \machine and forwad vs. backward slashes.
Author:
Jan Woetzel
00001
00002 #include <iostream>
00003
00004 // BIAS
00005 #include "Base/Common/FileHandling.hh"
00006
00007 using namespace std;
00008
00009 /**
00010 @example ExampleFileNames.cpp
00011 How to split a full path into its components directory, base of filename and extension of the filename.
00012 \todo Windows may need some more work regarding the drive, in particular for network drives \\machine\share
00013 and forwad vs. backward slashes.
00014 @author Jan Woetzel
00015 */
00016
00017 int main(int argc,char** argv){
00018   string full("/this/is/a/directory/ThisIsABase.ext");
00019   string dir, base, ext;
00020
00021   // command line arg given?
00022   if (argc>1) full=argv[1];
00023
00024   cout<<"Splitting  "<<full<<" into: "<<endl;
00025
00026   // run the function:
00027   BIAS::SplitName(full, dir, base, ext);
00028
00029   cout<<"\tdir  '"<<dir <<"'"<<endl
00030       <<"\tbase '"<<base<<"'"<<endl
00031       <<"\text  '"<<ext <<"'"<<endl;
00032
00033   return 0;
00034 }
00035
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleGLShared.cpp

ExampleGLShared.cpp

Demonstrates
  • usage of wx OpenGL canvas,
  • setting up a shared context,
  • using fonts with OpenGL in absolute and relative mode. Resize teh window to see the effect. JW

00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003 #include <bias_config.h>
00004
00005 #include <Base/Common/LeakChecking.h>
00006
00007 #include "ExampleGLShared.hh"
00008
00009 // BIAS
00010 #include <Gui/ConsoleRedirectIO.hh>
00011 #include <Gui/GeometryGL.hh>
00012
00013 using namespace std;
00014
00015 // required for wx RTTI dynamic construction:
00016 IMPLEMENT_APP(ExampleGLSharedApp)
00017
00018 // --------------------------------------------------------
00019 #ifdef BIAS_HAVE_GLUT
00020 #  define GLUT_BUILDING_LIB
00021 #  include <GL/glut.h>
00022 #endif // BIAS_HAVE_GLUT
00023
00024
00025 ///
00026 /// your own implementation of the scenes GL calls:
00027 ///
00028
00029 MyGLCanvas::MyGLCanvas(wxFrame* parent)
00030 :
00031 BIAS::OpenGLCanvas( parent, -1)
00032 ,dplist(0)
00033 {}
00034
00035
00036 void MyGLCanvas::InitGeometry()
00037 {
00038     // init once:
00039     static bool initDone=false;
00040     if(!initDone)
00041     {
00042         // do init
00043         CHECK_GL_ERROR;
00044         // example for an OpenGL display list
00045         dplist = glGenLists(1); // identifier
00046         glNewList(dplist, GL_COMPILE ); // or: GL_COMPILE_AND_EXECUTE
00047         {
00048             // light source proeprties for enabled lighting:
00049             // specified pos by w=1, direction by w=0:
00050             GLfloat light_position0[]     = {10.0f, 10.0, 10.0f, 0.0f}; // w=0: direction
00051             GLfloat light_maincolor0[]    = {1.0f, 1.0, 1.0f, 1.0f};
00052             GLfloat light_ambientcolor0[] = {0.4f, 0.2f, 0.2f, 1.0f};
00053
00054             // GL create light 0
00055             glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
00056             glLightfv(GL_LIGHT0, GL_DIFFUSE,  light_maincolor0);
00057             glLightfv(GL_LIGHT0, GL_SPECULAR, light_maincolor0);
00058             glLightfv(GL_LIGHT0, GL_AMBIENT,  light_ambientcolor0);
00059
00060             glEnable(GL_LIGHT0);
00061             glEnable(GL_LIGHTING); // may be switched on/off for every object
00062             glEnable(GL_DEPTH_TEST); // depth buffer occlusions of objects
00063
00064             // material properties for enabled lighting:
00065             GLfloat paintcolor0[]    = { 0.9f, 0.2f, 0.5f, 1.0f};
00066             GLfloat specularcolor0[] = { 1.0f, 1.0f, 1.0f, 1.0f};
00067             GLfloat shininess0[]     = { 70.0f }; // 1..128, large values make smaller specular highlights
00068
00069             GLfloat paintcolor1[]    = { 0.3f, 0.9f, 0.4f, 1.0f};
00070             GLfloat paintcolor2[]    = { 0.1f, 0.2f, 0.9f, 1.0f};
00071
00072             glMatrixMode(GL_MODELVIEW);
00073             glPushMatrix();
00074
00075             //// activate material properties:
00076             glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specularcolor0);
00077             glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess0);
00078             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
00079                 paintcolor0);
00080             glColor3f(
00081                 paintcolor0[0],
00082                 paintcolor0[1],
00083                 paintcolor0[2] );
00084
00085             // draw geometry
00086             BIAS::Vector3<float> dtea(-0.5f, -0.2f, 0.0f);
00087             // position of the scene "modeling" matrix
00088             glTranslatef( dtea[0], dtea[1], dtea[2] );
00089             // glutteapot has strange vertex ordering for historical reasons
00090             glFrontFace(GL_CW);
00091 #ifdef BIAS_HAVE_GLUT
00092             glutSolidTeapot(0.6);
00093 #endif //BIAS_HAVE_GLUT
00094             glFrontFace(GL_CCW);
00095
00096             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
00097                 paintcolor1 );
00098             glColor3f(
00099                 paintcolor1[0],
00100                 paintcolor1[1],
00101                 paintcolor1[2] );
00102
00103             glTranslatef( -2*dtea[0], -2*dtea[1], -2*dtea[2] );
00104             glFrontFace(GL_CW);
00105 #ifdef BIAS_HAVE_GLUT
00106             glutSolidTeapot(0.3);
00107 #endif // BIAS_HAVE_GLUT
00108             glFrontFace(GL_CCW);
00109             glTranslatef( dtea[0], dtea[1], dtea[2] );
00110             // back on origin
00111
00112             // activate material properties:
00113             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, paintcolor2);
00114             glColor3f(paintcolor2[0], paintcolor2[1], paintcolor2[2]);
00115
00116 #ifdef BIAS_HAVE_GLUT
00117             glTranslatef(0,0,-2);
00118             glutSolidSphere(0.8, 30, 60);
00119             glTranslatef(0,0, 2); // back to origin
00120
00121             glTranslatef( 1,0,-3);
00122             glutSolidSphere(0.5, 50, 100);
00123             glTranslatef(-1,0, 3);// back to origin
00124
00125             glTranslatef(0,2,0);
00126             glutSolidCube(0.7);
00127             glTranslatef(0,-2,0);
00128
00129             glTranslatef(0,-1,0);
00130             glutSolidIcosahedron();
00131             glTranslatef(0, 1,0);
00132
00133             glTranslatef(0,-2.2,0);
00134             glutSolidTetrahedron();
00135             glTranslatef(0, 2.2,0);
00136 #endif // BIAS_HAVE_GLUT
00137
00138             glPopMatrix();
00139         }
00140         glEndList();
00141
00142         #ifdef BIAS_HAVE_FONTGL
00143         // font:
00144 #ifdef WIN32
00145         font.InitFont( GetDC(HWND(GetHandle())), "Arial" );
00146 #else // WIN32
00147         font.InitFont( GetHandle(), "Arial" );
00148 #endif // WIN32
00149
00150         #endif // BIAS_HAVE_FONTGL
00151
00152         CHECK_GL_ERROR;
00153         initDone=true;
00154     };
00155 }
00156
00157
00158 void MyGLCanvas::DisplayCalls()
00159 {
00160     //CALLINFO;
00161     CHECK_GL_ERROR;
00162     InitGeometry();
00163
00164     DisplayClear();
00165     DisplayRenderMode();
00166
00167     glMatrixMode(GL_PROJECTION);
00168     gluPerspective(67.5 /*fovy*/,
00169         GetAspectRatio(),
00170         0.1 /*zNear*/ ,
00171         100.0 /*zFar*/
00172         );
00173
00174     glMatrixMode(GL_MODELVIEW);
00175     glLoadIdentity();
00176     gluLookAt(1,1,3, /*eye position*/
00177         1,0.5,0.5, /* centered view on */
00178         0,1,0 /*up*/ );
00179
00180     CHECK_GL_ERROR;
00181
00182     {
00183         //glPushAttrib(GL_CULL_FACE|GL_LIGHT0|GL_LIGHTING|GL_DEPTH_TEST );
00184         //glPopAttrib();
00185
00186         glColor3d(1.0, 0.5, 0.2);
00187
00188         // animation: rotate the scene (not the camera) by using global time as angle:
00189         // thus light and camera stay in the same place
00190         {
00191             const float cycletime=10.0; // approx. sec for a full cycle
00192             const float angleM = fmodf( float(2.0*360.0/cycletime*OpenGLCanvasBase::time), 2.0*360.0);
00193             if (angleM<=360.0){
00194                 glRotatef( angleM,       0.0, 1.0, 0.0 );
00195             } else {
00196                 glRotatef( angleM-360.0, 1.0, 0.0, 0.0 );
00197             }
00198         }
00199
00200 #if 1
00201         if(glIsList(dplist) == GL_TRUE)
00202         {
00203             glCallList(dplist);
00204         } else {
00205             BIASERR("invalid display list dplist="<<dplist);
00206         }
00207 #endif // 0/1
00208
00209         DisplayCoordCross();
00210
00211 #ifdef BIAS_HAVE_FONTGL
00212         if (font.IsInitialized())
00213         {
00214             glColor3f(1.0f, 1.0f, 0.5f);
00215             font.PrintWinCoords("a0",  0, 0 );
00216             font.PrintWinCoords("a100x0y",  100, 0 );
00217             font.PrintWinCoords("a100x50y",  100, 50 ); // OK.
00218
00219             glColor3f(1.0f, 0.5f, 1.0f);
00220             font.DrawTextGL::PrintNormCoords("n0", 0.0, 0.0);
00221             font.DrawTextGL::PrintNormCoords("n0.5x0y", 0.5, 0.0);
00222             font.DrawTextGL::PrintNormCoords("n0.5x0.25y", 0.5, 0.25);
00223
00224             GeometryGL::DisplayCoordCrossAxesLabel(1.0, font);
00225         }
00226 #endif // BIAS_HAVE_FONTGL
00227     }
00228 }
00229
00230
00231 // --------------------------------------------------------
00232
00233 // 2nd sharing with 1st:
00234 MyGLCanvas2::MyGLCanvas2(wxFrame* parent)
00235 :
00236 BIAS::OpenGLCanvas( parent, -1)
00237 ,dplist(0)
00238 {}
00239
00240
00241 // ctor with shared context
00242 MyGLCanvas2::MyGLCanvas2(wxFrame* parent
00243                          ,wxGLContext* sharedContext
00244                          ,wxWindowID id
00245                          ,const wxPoint& pos
00246                          ,const wxSize& size
00247                          ,long style
00248                          ,const wxString& name
00249                          ,int* attribList
00250                          ,const wxPalette& palette )
00251                          :
00252 BIAS::OpenGLCanvas(parent,sharedContext, id,pos,size,style,name,attribList,palette)
00253 ,dplist(0)
00254 {}
00255
00256 void MyGLCanvas2::DisplayCalls()
00257 {
00258     CHECK_GL_ERROR;
00259     DisplayClear();
00260     DisplayRenderMode();
00261     OpenGLCanvas::DisplayCalls();
00262
00263     glMatrixMode(GL_PROJECTION);
00264     gluPerspective(67.5 /*fovy*/,
00265         GetAspectRatio(),
00266         0.1 /*zNear*/ ,
00267         100.0 /*zFar*/
00268         );
00269
00270     glMatrixMode(GL_MODELVIEW);
00271     glLoadIdentity();
00272     gluLookAt(1,1,3, /*eye position*/
00273         0,0,0, /* centered view on */
00274         0,1,0 /*up*/ );
00275
00276     if(glIsList(dplist) == GL_TRUE)
00277     {
00278         {
00279             const float cycletime=3.0; // approx. sec for a full cycle
00280             const float angleM = fmodf( float(2.0*360.0/cycletime*OpenGLCanvasBase::time), 2.0*360.0);
00281             if (angleM<=360.0){
00282                 glRotatef( -angleM,       0.0, 1.0, 0.0 );
00283             } else {
00284                 glRotatef( -(angleM-360.0), 1.0, 0.0, 0.0 );
00285             }
00286         }
00287
00288         glCallList(dplist);
00289     } else {
00290         BIASERR("dplist invalid");
00291     }
00292
00293     GeometryGL::DisplayCoordCross(1.5,3.0);
00294
00295     CHECK_GL_ERROR;
00296 }
00297
00298
00299 // --------------------------------------------------------
00300
00301 bool ExampleGLSharedApp::OnInit()
00302 {
00303     // utility: create a Redirection console for cout, cerr etc.
00304     ConsoleRedirectIO();
00305     // testing output:
00306     cout<<"Hello cout"<<endl;
00307     cout<<"Hello cerr"<<endl;
00308
00309     MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvas"), wxPoint(0,0), wxSize(640,480) );
00310     frame->Show(TRUE);
00311     SetTopWindow(frame);
00312
00313     return TRUE;
00314 }
00315
00316
00317 // --------------------------------------------------------
00318 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00319 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00320 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00321 END_EVENT_TABLE()
00322 // --------------------------------------------------------
00323
00324
00325 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00326 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00327 ,p_canvas(NULL)
00328 ,p_2nd_canvas(NULL)
00329 {
00330     // Create a simple top Menu
00331     wxMenu *menuFile = new wxMenu;
00332     menuFile->Append( ID_ABOUT, wxT("&About...") );
00333     menuFile->AppendSeparator();
00334     menuFile->Append( ID_QUIT, wxT("E&xit") );
00335     wxMenuBar *menuBar = new wxMenuBar;
00336     menuBar->Append(menuFile, wxT("&File"));
00337     SetMenuBar(menuBar);
00338
00339     // Create a simple bottom status bar
00340     CreateStatusBar(1);
00341
00342     // Canvas to test:
00343     p_canvas=new MyGLCanvas(this);
00344
00345     // share the context:
00346     if ( p_canvas->GetContext() == NULL)
00347     {
00348         BIASERR(wxT("context of p_canvas is NULL.")<<endl
00349             <<wxT("This means sharing OpenGL contexts may not be supported.")<<endl
00350             <<wxT("Could not share context. aborting"));
00351         exit(-1);
00352     }
00353     p_2nd_canvas = new MyGLCanvas2(this, p_canvas->GetContext(), -1);
00354     // distribuet the id of the dplist:
00355     p_2nd_canvas->dplist = 1; // HACK there is oly one dplist
00356
00357
00358     // put them into sizers:
00359     wxBoxSizer * sizer = new wxBoxSizer(wxHORIZONTAL);
00360     sizer->Add( p_canvas ,1,wxEXPAND|wxALL);
00361 #if wxCHECK_VERSION(2, 6, 2)
00362     sizer->AddSpacer(4); // available in 2.6.2 but not 2.4.2 (JW)
00363 #endif
00364     sizer->Add( p_2nd_canvas ,1,wxEXPAND|wxALL);
00365
00366     // limit min. size:
00367     sizer->SetItemMinSize(p_canvas, 500,400);
00368     sizer->SetItemMinSize(p_2nd_canvas, 300,200);
00369     sizer->SetSizeHints(this);
00370
00371     // set sizer and triggers Layout()
00372     SetSizerAndFit(sizer);
00373 }
00374
00375
00376 void MyFrame::OnQuit(wxCommandEvent& ){
00377     Close(TRUE);
00378 }
00379
00380
00381 void MyFrame::OnAbout(wxCommandEvent& )
00382 {
00383     wxString title(wxT("About"));
00384     wxString msg; // message
00385     msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00386     msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00387     msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00388     msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00389     msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00390     msg<<wxT("\n");
00391     COUT(msg);
00392     wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00393 }
00394
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleImageAttributes.cpp

ExampleImageAttributes.cpp

Access Image attrobute susing ImageMagick, e.g. timestamp, focal length, shutter times automatically written to Jpeg header by digital cameras.
Author:
Jan Woetzel
00001 #include <iostream>
00002 #include <string>
00003
00004 #include <Base/Image/ImageAttributes.hh>
00005
00006 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
00007 #  error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
00008 #endif
00009
00010 /**
00011  @example ExampleImageAttributes.cpp
00012  Access Image attrobute susing ImageMagick,
00013  e.g. timestamp, focal length, shutter times automatically written to Jpeg header by digital cameras.
00014  @author Jan Woetzel
00015 */
00016
00017
00018 using namespace std;
00019 using namespace BIAS;
00020
00021
00022 void usage(int argc, char** argv) {
00023     cerr<<"started ";
00024     if (argc>0) cerr<<argv[0]<<endl;
00025     cerr<<"usage: "<<endl
00026         <<argv[0]<<" <image-filename.jpg>"<<endl;
00027 }
00028
00029
00030 int main(int argc, char** argv)
00031 {
00032   if (argc!=2) {
00033     usage(argc, argv);
00034     return 0;
00035   };
00036
00037   string filename("");
00038   BIASASSERT(argc>1);
00039   filename=argv[1];
00040
00041   ImageAttributes attr;
00042   attr.InitExifTags();
00043   attr.Read(filename);
00044   cout<<attr;
00045 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleImageLoad.cpp

ExampleImageLoad.cpp

Load an arbitrar yfomrat from disk trying all availbale libraries.
Author:
Jan Woetzel
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example ExampleImageLoad.cpp
00027  Load an arbitrar yfomrat from disk trying all availbale libraries.
00028  @author Jan Woetzel
00029 */
00030
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Image/ImageIO.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036 int main(int argc, char *argv[])
00037 {
00038
00039   if (argc!=2){
00040       BIASERR("usage: "<<argv[0]<<" <image-file>");
00041     return 0;// for Dart testing
00042   }
00043   ImageBase im;
00044   if (ImageIO::Load(argv[1], im)!=0){
00045     BIASERR("error loading "<<argv[1]);
00046     return 0; // for Dart testing
00047   }
00048   cout <<"UID of loaded image is "<<im.GetUID()<<endl;
00049   if (ImageIO::Write("image.mip", im, false, !im.GetUID().IsValid())!=0){
00050     BIASERR("error writing image.mip");
00051     return 0; // for Dart testing
00052   }
00053   return 0;
00054 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleImageMagickIO.cpp

ExampleImageMagickIO.cpp

How to use the ImageMagick IO routines directly instead of all vailable routines from BIAS::ImageIO::Load
Author:
Jan Woetzel
00001 #include <iostream>
00002
00003 #include <Base/Image/ImageBase.hh>
00004 #include <Base/Image/Image.hh>
00005 #include <Base/Image/ImageIO.hh>
00006
00007 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
00008 #  error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
00009 #endif
00010
00011
00012 using namespace std;
00013 using namespace BIAS;
00014
00015 /**
00016  @example ExampleImageMagickIO.cpp
00017  How to use the ImageMagick IO routines directly
00018  instead of all vailable routines from BIAS::ImageIO::Load
00019  @author Jan Woetzel
00020 */
00021
00022
00023 void usage(int argc, char** argv)
00024 {
00025   cerr<<"usage: ";
00026   if (argc>0) cerr<<argv[0]<<" <image-filename>"<<endl;
00027 }
00028
00029 int main(int argc, char** argv)
00030 {
00031   if (argc!=2) {
00032     usage(argc, argv);
00033     return 0;
00034   };
00035
00036   BIAS::Image<unsigned char> img;
00037   BIASASSERT(argc>1);
00038   string filename=argv[1];
00039
00040   // BIAS::ImageIO::ImportImage(filename, img);
00041   BIAS::ImageIO::ImportMagickPPAutoconvert(filename, img);
00042
00043   BIAS::ImageIO::ExportMagickPP("out_Magick.png", img);
00044   BIAS::ImageIO::ExportMagickPP("out_Magick_default.jpg", img);
00045   // BIAS::ImageIO::WriteMagickPP("out_Magick005.jpg", img, 5);
00046   // BIAS::ImageIO::WriteMagickPP("out_Magick100.jpg", img, 100);
00047
00048   if (BIAS::ImageIO::ExportImage("out_Magick_ExportImage_FF_png.png", img, BIAS::ImageIO::FF_png ) !=BIAS_IO_SUCCESS){
00049     BIASERR("an error occurred using ExportImage");
00050   };
00051
00052   if (BIAS::ImageIO::Write("out_Magick_Write.mip", img ) !=BIAS_IO_SUCCESS){
00053     BIASERR("an error occurred writing mip");
00054   };
00055
00056   cout<<"done"<<endl;
00057   return 0;
00058 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleIpl.cpp

ExampleIpl.cpp

OpenCV/IPL image format acces.
Author:
Ingo Thomsen and Jan Woetzel
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 /**
00028  @example ExampleIpl.cpp
00029  OpenCV/IPL image format acces.
00030  @author Ingo Thomsen and Jan Woetzel
00031 */
00032
00033
00034 #include <iostream>
00035
00036 #include <Base/Image/Image.hh>
00037 #include <Base/Image/ImageIO.hh>
00038 #include <Base/Image/ImageConvert.hh>
00039
00040 #ifdef BIAS_HAVE_OPENCV
00041 #  include <highgui.h>
00042 #endif
00043
00044 using namespace BIAS;
00045 using namespace std;
00046
00047 int main(int argc, char *argv[])
00048 {
00049 #ifdef BIAS_HAVE_OPENCV
00050   Image<unsigned char> im, im2;
00051   IplImage *dst=NULL;
00052
00053   if (argc!=2){
00054     BIASERR(argv[0]<<" <image-file>");
00055     return -1;
00056   }
00057
00058   if (ImageIO::Load(argv[1], im)!=0){
00059     BIASERR("error loading "<<argv[1]<<" (Load)");
00060     return -2;
00061   }
00062
00063   if (ImageConvert::BIAS2ipl(im, dst)!=0){
00064     BIASERR("error converting bias -> ipl");
00065     return -2;
00066   }
00067
00068   cvNamedWindow( "window", 1 );
00069   cvShowImage( "window", dst );
00070   const int delay=3000;
00071   //cvWaitKey(0);
00072   std::cout<<"will close gui window after "<<delay<<" msecs."<<endl;
00073   cvWaitKey(4000); // msec
00074   std::cout<<"closed window."<<endl;
00075
00076   if (ImageConvert::Ipl2BIAS(dst, im2)!=0){
00077     BIASERR("error converting ipl -> bias");
00078     return -2;
00079   }
00080
00081   if (ImageIO::Write("out_bias-ipl-bias.mip", im2)!=0){
00082     BIASERR("error writing bias-ipl-bias.mip");
00083     return -1;
00084   }
00085 #else
00086     std::cout<<"you compiled without OpenCV."<<endl;
00087 #endif
00088   return 0;
00089 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleIplImageDisplay.cpp

ExampleIplImageDisplay.cpp

howto display a BIAS image using OpenCV.
Author:
Jan Woetzel 2005
00001 /** @example ExampleIplImageDisplay.cpp
00002     howto display a BIAS image using OpenCV.
00003     @author Jan Woetzel 2005
00004 */
00005
00006 #include <iostream>
00007 #include <string>
00008
00009 // BIAS
00010 #include <Base/Image/Image.hh>
00011 #include <Base/Image/ImageIO.hh>
00012
00013 using namespace std;
00014 using namespace BIAS;
00015
00016
00017 int main( int argc, char** argv )
00018 {
00019     //
00020     // load image (prerquisit):
00021     //
00022     bool darttestNoGui=false;
00023     bool darttestGui=false;
00024     int  delay=2000;
00025     string filename( BIAS_TESTS_DATA "r4.jpg" );
00026     if (argc>=2) {
00027         if ((strcmp(argv[1],"-darttest")==0)
00028             || (strcmp(argv[1],"-darttestnogui")==0) )
00029         {
00030             darttestNoGui=true;
00031             std::cout<<"started dart test (no gui): "<<argv[0]<<std::endl;
00032         } else if (strcmp(argv[1],"-darttestgui")==0) {
00033             darttestGui=true;
00034             delay=500; // msec is enough for test
00035             std::cout<<"started dart test (with gui): "<<argv[0]<<std::endl;
00036         }
00037     };
00038     // user specified an image to work with:
00039     if (!darttestNoGui && !darttestGui && (argc>1)) filename=argv[1];
00040     // laod an image to work with
00041     BIAS::Image<unsigned char> img;
00042     if (BIAS::ImageIO::Load(filename, img) !=0){
00043         cout<<"error loading image "<<filename<<endl;
00044         return -1;
00045     };
00046     cout<<"loaded image with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00047
00048
00049     //
00050     // major test: the Display routine:
00051     //
00052     if (!darttestNoGui) {
00053         img.Display("Display", true, true, true, delay );
00054     }
00055
00056     return 0;
00057 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleIplImageDraw.cpp

ExampleIplImageDraw.cpp

howto use OpenCV draw routines with BIAS.
Author:
Jan Woetzel 2005
00001 /** @example ExampleIplImageDraw.cpp
00002     howto use OpenCV draw routines with BIAS.
00003     @author Jan Woetzel 2005
00004 */
00005
00006 #include <iostream>
00007 #include <string>
00008
00009 // BIAS
00010 #include <Base/Image/Image.hh>
00011 #include <Base/Image/ImageIO.hh>
00012 #include <Base/Image/ImageDraw.hh>
00013
00014
00015 using namespace std;
00016 using namespace BIAS;
00017
00018
00019
00020 int main( int argc, char** argv ){
00021     int result=0;
00022     bool darttest=false;
00023     if (argc>=2) if (strcmp(argv[1],"-darttest")==0) {
00024         darttest=true;
00025         std::cout<<"started dart test: "<<argv[0]<<std::endl;
00026     }
00027     //
00028     // load a BIAS image to work with:
00029     //
00030     string filename( BIAS_TESTS_DATA "r4.jpg" );
00031     if (!darttest && (argc>1)) filename=argv[1];
00032     BIAS::Image<unsigned char> img;
00033     if (BIAS::ImageIO::Load(filename, img) !=0){
00034         cout<<"error loading image "<<filename<<endl;
00035         return -1;
00036     };
00037     cout<<"loaded image "<<filename<<" with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00038
00039     //
00040     // OK, work:
00041     //
00042     {
00043         ImageDraw<unsigned char>::Circle(img, 100,100, 90 );
00044         ImageDraw<unsigned char>::Circle(img, 100,150, 40,
00045             COLOR_RED,
00046             5, CV_AA, 0 );
00047         ImageDraw<unsigned char>::Line(img, 10,10, 100,100,
00048             Vector3<unsigned char>(42,12,255),
00049             25, // thickness
00050             CV_AA
00051             );
00052
00053         ImageDraw<unsigned char>::Ellipse(img
00054             ,200,300 // center
00055             ,150, 50 // axes
00056             ,45 // orientation
00057             ,0, 270 // paint angle from..to
00058             ,COLOR_WHITE
00059             ,20
00060             );
00061
00062         ImageDraw<unsigned char>::Rectangle(img,
00063             100,100,
00064             150,200,
00065             COLOR_BLACK,
00066             8
00067             );
00068
00069
00070
00071         ImageDraw<unsigned char>::Text(img, "Hello BIAS! 1234567890 äöüÄÖÜ @+-*~°!", 10,50 );
00072         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp RED",  10, 100, COLOR_RED );
00073         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp GREEN",10, 150, COLOR_GREEN );
00074         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp BLUE", 10, 200, COLOR_BLUE );
00075         ImageDraw<unsigned char>::Text(img, "Renault 4TL rocks ;-)", 10, 250, COLOR_BLUE,
00076             CV_FONT_HERSHEY_SIMPLEX, 1.5, 1.5, 0, 2, CV_AA);
00077         ImageDraw<unsigned char>::Text(img, argv[0] , 0, 300, COLOR_WHITE,
00078             CV_FONT_HERSHEY_PLAIN, 0.8, 1.2, 0, 1, CV_AA);
00079     }
00080
00081     //
00082     // output result:
00083     //
00084     string outFn("out_ExampleIplImageDraw.jpg");
00085     result=BIAS::ImageIO::ExportImage(outFn, img, BIAS::ImageIO::FF_jpg);
00086     //string outFn("out_ExampleIplImageDraw.png");
00087     //result=BIAS::ImageIO::ExportImage(outFn, img, BIAS::ImageIO::FF_png);
00088     if (result==0) cout<<"wrote "<<outFn<<endl;
00089
00090
00091     // ---- Example for Dart attachment adta submission (Jan Woetzel) ----
00092     //
00093     // attach Dart client xml data for submission to dart server (JW):
00094     // jpeg is much smaller.
00095     cout<<endl
00096       //<<"<DartMeasurementFile name=\"outputImage1\" type=\"image/png\">"<<outFn<<"</DartMeasurementFile>"
00097     <<"<DartMeasurementFile name=\"outputImage1\" type=\"image/jpeg\">"<<outFn<<"</DartMeasurementFile>"
00098     <<endl;
00099
00100     return result;
00101 }
00102
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleIplWrapOpenCV.cpp

ExampleIplWrapOpenCV.cpp

howto use the wrapper to use a BIAS imaeg with OpenCV image algorithms.
Author:
Jan Woetzel 2005
00001 /** @example ExampleIplWrapOpenCV.cpp
00002     howto use the wrapper to use a BIAS imaeg with OpenCV image algorithms.
00003     @author Jan Woetzel 2005
00004 */
00005 #include <Base/Common/LeakChecking.h>
00006
00007 #include <iostream>
00008 #include <string>
00009
00010 // BIAS
00011 #include <Base/Image/Image.hh>
00012 #include <Base/Image/ImageIO.hh>
00013 //#include <Base/Image/ImageConvert.hh>
00014 //#include <Base/Image/ImageDraw.hh>
00015 #include <Base/Image/WrapBias2Ipl.hh>
00016
00017
00018 #include "cv.h"
00019 //#include "highgui.h"
00020
00021 using namespace std;
00022 using namespace BIAS;
00023
00024
00025
00026 int main( int argc, char** argv ){
00027     bool darttest=false;
00028     if (argc>=2) if (strcmp(argv[1],"-darttest")==0) {
00029         darttest=true;
00030         std::cout<<"started dart test: "<<argv[0]<<std::endl;
00031     }
00032
00033     // load a BIAS image to work with:
00034     string filename( BIAS_TESTS_DATA "r4.jpg" );
00035     if (!darttest && (argc>1)) filename=argv[1];
00036     BIAS::Image<unsigned char> img;
00037     if (BIAS::ImageIO::Load(filename, img) !=0){
00038         cout<<"error loading image "<<filename<<endl;
00039         return -1;
00040     };
00041     cout<<"loaded image with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00042
00043     // wrapper to use BIAS image in OpenCV:
00044     WrapBias2Ipl wrap(&img);
00045
00046     // work:  draw something:
00047     {
00048         cvLine( wrap.p_imgIpl,
00049             cvPoint(-20,0),
00050             cvPoint(200,200),
00051             cvScalar(255, 0, 0),
00052             1, 8, 0 );
00053         cvEllipse( wrap.p_imgIpl,
00054             cvPoint(50,100),
00055             cvSize(20,40),
00056             20,
00057             0, 270,
00058             cvScalar(0,255,0) );
00059
00060         string msg("Hello BIAS world! 1234567890");
00061         int linetype=CV_AA; // antialiased
00062         CvFont font1, font2, font3;
00063         cvInitFont( &font1, CV_FONT_HERSHEY_SIMPLEX,
00064             1.0, 1.0,
00065             0, 1, linetype);
00066         cvInitFont( &font2, CV_FONT_HERSHEY_PLAIN,
00067             1.0, 1.0,
00068             0, 1, 0);
00069         cvInitFont( &font3,
00070             CV_FONT_HERSHEY_COMPLEX, // font name
00071             1.0, // hscale
00072             1.0, // vscale
00073             0,   // shear
00074             2,   // thickness
00075             linetype
00076             );
00077         cvPutText( wrap.p_imgIpl, msg.c_str(),
00078             cvPoint(100,50), &font1, cvScalar(255,0,0) );
00079         cvPutText( wrap.p_imgIpl, msg.c_str(),
00080             cvPoint(100,100), &font2, cvScalar(0,255,0) );
00081         cvPutText( wrap.p_imgIpl, msg.c_str(),
00082             cvPoint(100,150), &font3, cvScalar(0,0,255) );
00083     }
00084
00085     // display using CV routines
00086     // color channel order may be wrong! (use fixed highgui)
00087     // avoid gui display on darttest because it doesn't work on Linux without login.
00088     if (!darttest) wrap.Display(true, 2000);
00089
00090     // output to disk:
00091     //cvSaveImage("out_wrapIPL.jpg", wrap.p_imgIpl);
00092     BIAS::ImageIO::ExportImage("out_ExampleIplWrapOpenCV.jpg", *wrap.p_imgBias, BIAS::ImageIO::FF_jpg);
00093
00094     return 0;
00095 }
Generated on Wed Jun 21 19:00:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleLoadBan.cpp

ExampleLoadBan.cpp

And this example demonstrates Dart usage:

how to generate a runtime test by comparing against reference values and submit results to Dart server dashboard.

Author:
Jan Woetzel
00001 ///
00002 /// @example ExampleLoadBan.cpp
00003 /// @brief load 3x4 matrix from Boujou .ban file
00004 ///
00005 /// And this example demonstrates Dart usage:
00006 ///
00007 /// how to generate a runtime test by comparing against reference values and submit results to Dart server dashboard.
00008 ///
00009 /// @author Jan Woetzel
00010 ///
00011
00012
00013 #include <Base/Common/LeakChecking.h>
00014
00015
00016 // STD
00017 #include <iostream>
00018 #include <fstream>
00019 #include <sstream>
00020 #include <string>
00021
00022 // BIAS
00023 #include <bias_config.h>
00024 #include <Base/Math/Matrix3x4.hh>
00025 #include <Base/Math/Vector.hh>
00026
00027 using namespace std;
00028 using namespace BIAS;
00029
00030 #include <Base/Common/BIASpragma.hh>
00031
00032
00033
00034 int main(int argc, char* argv[] )
00035 {
00036     int result=0;
00037     BIASASSERT(argc>0);
00038     cout<<"Starting "<<argv[0]<<endl;
00039 #ifdef BIAS_TESTS_DATA
00040     //string filename="calib01.ban";
00041     //string filename(BIAS_TESTS_DATA "calib01.ban");
00042     string filename;
00043     filename  = string(BIAS_TESTS_DATA);
00044     filename += "calib01.ban";
00045 #else
00046     string filename;
00047     cout<<"BIAS_TESTS_DATA not defined."<<endl;
00048     return -1;
00049 #endif
00050
00051     BIAS::Matrix3x4<double> A;
00052
00053     //
00054     // first test: load Time=2 Matrix from ban file:
00055     //
00056     // load one 3x4 matrix from .ban file containing multiple P's
00057     cout<<"trying to load "<<filename<<endl;
00058     result = A .LoadBan(filename, 2);
00059     if (result==0){
00060         cout<<"successfully loaded "<<filename<<endl
00061             <<"A: "<<A<<endl;
00062     } else {
00063         cout<<"Error. couls not load "<<filename<<endl;
00064         result = -2000;
00065         return result;
00066     };
00067
00068     //
00069     // second test: are the values correct?
00070     //
00071     const double v[12] = {
00072         405.1, -0.0678595, -96.8174, 3800.26,
00073             -2.10686, -202.721, -68.4048, 3483.67,
00074             -0.00379941, 0.00217521, -0.171449, 7.94237 };
00075
00076         cout<<"DBG reference v is: "<<endl;
00077         for (unsigned int i=0; i<12;i++) cout<<v[i]<<" ";
00078         cout<<endl;
00079         const double eps=1E-10; // desired precision
00080         for (unsigned int i=0; i<12; i++) {
00081             if (fabs(v[i] - A.GetData()[i]) >eps){
00082                 cout<<"Error: mismatch for element "<<i<<" : "<<endl
00083                     <<"should be: "<<v[i]
00084                     <<"but read : "<<A.GetData()[i]
00085                     <<endl;
00086                     result += -1*i;
00087             }
00088         }
00089
00090         //
00091         // third test: this should fail because only 0,1,2 are inside the file
00092         //
00093         int errCode = A.LoadBan(filename, 3);
00094         if (errCode == 0){
00095             cout<<"Error: acces to Time 3 should return error but didn't."<<endl;
00096             result += -100;
00097         };
00098
00099         cout<<"done with result = "<<result<<endl;
00100         return result;
00101 }
00102
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleLoadBOG.cpp

ExampleLoadBOG.cpp

Shows how to read the BOG format which is used by DaimlerChrysler.
Author:
Jan Woetzel
00001
00002 /// @example ExampleLoadBOG.cpp
00003 /// Shows how to read the BOG format which is used by DaimlerChrysler.
00004 /// @author Jan Woetzel
00005 ///
00006
00007
00008 // STD
00009 #include <Base/Common/BIASpragma.hh>
00010
00011 #include <iostream>
00012 #include <fstream>
00013 #include <string>
00014 #include <vector>
00015
00016
00017 // BIAS
00018 #include <Base/Math/Vector3.hh>
00019 #include <Base/Math/Matrix3x3.hh>
00020
00021
00022 using namespace std;
00023 using namespace BIAS;
00024
00025 // entry JW
00026 int main(int argc, char** argv){
00027     cout<<"started "<<argv[0]<<endl;
00028 #ifdef BIAS_TESTS_DATA
00029     string filename(BIAS_TESTS_DATA "calib01.bog");
00030 #else
00031     string filename("calib01.bog");
00032     cout<<"BIAS_TESTS_DATA  not defined."<<endl;
00033     return -1;
00034 #endif
00035     if (argc>1) filename=argv[1];
00036     cout<<"using filename "<<filename<<endl;
00037
00038     //bool ok=true;
00039
00040     Vector3<double> C;
00041     if (0!=C.LoadBogTC(filename)) return -2;
00042     cout<<"C: "<<C<<endl;
00043
00044     Matrix3x3<double> R;
00045     if (0!=R.LoadBogRC(filename)) return -3;
00046     cout<<"R: "<<R<<endl;
00047
00048     Matrix3x3<double> K;
00049     if (0!=K.LoadBogK(filename)) return -3;
00050     cout<<"K: "<<K<<endl;
00051
00052     // check values for correctness:
00053     int result=0;
00054     const double v[3] = { -317.4137573 , 0.4055223 , -3.9081306 };
00055     const double eps=1E-10; // desired precision
00056     for (unsigned int i=0; i<3; i++) {
00057         if (fabs(v[i] - C.GetData()[i]) >eps){
00058            cout<<"Error: mismatch for element "<<i<<" : "<<endl
00059                     <<" should be: "<<v[i]
00060                     <<" but read : "<<C.GetData()[i]
00061                     <<endl;
00062                     result += -1*i;
00063             }
00064         }
00065     cout<<"done with result="<<result<<endl;
00066     return result; // OK.
00067 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleOpenGLCanvas.cpp

ExampleOpenGLCanvas.cpp

Implement your own OpenGLCanvas derived class and override one of the Display functions to plug in your own GL calls / scene
Author:
Jan Woetzel
00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003
00004 #include <bias_config.h>
00005
00006 #include <Base/Common/LeakChecking.h>
00007
00008 #include "ExampleOpenGLCanvas.hh"
00009
00010 // BIAS
00011 #include <Gui/ConsoleRedirectIO.hh>
00012 #include <Gui/GeometryGL.hh>
00013
00014 using namespace std;
00015
00016 // required for wx RTTI dynamic construction:
00017 IMPLEMENT_APP(ExampleOpenGLCanvasApp)
00018
00019 // --------------------------------------------------------
00020 #ifndef BIAS_HAVE_GLUT
00021 #  define GLUT_BUILDING_LIB
00022 #  include <GL/glut.h>
00023 #endif // BIAS_HAVE_GLUT
00024
00025
00026 ///
00027 /// your own implemnetation of the scenes GL calls:
00028 ///
00029
00030 MyGLCanvas::MyGLCanvas(wxFrame* parent)
00031 :
00032 BIAS::OpenGLCanvas( parent, -1,wxDefaultPosition, wxDefaultSize,0,wxT("GL"),(int*)(&attribsRGBASD) )
00033 {}
00034
00035
00036
00037
00038 void MyGLCanvas::DisplayCalls()
00039 {
00040   //CALLINFO;
00041   CHECK_GL_ERROR;
00042
00043   DisplayClear();
00044   DisplayCameraView();
00045   CHECK_GL_ERROR;
00046   glClearColor(0.3,0.1,0.1,0);
00047   glClear(GL_COLOR_BUFFER_BIT);
00048
00049   ////this->GetViewController().GetInternals().frustum.DisplayGL();
00050   //glMatrixMode(GL_PROJECTION);
00051   //glLoadIdentity();
00052   //gluPerspective( 67.5, 1.0, 0.1, 1000);
00053
00054   //this->GetViewController().GetInternals().viewport.DisplayGL();
00055   //this->GetViewController().GetExternals().DisplayGL();
00056
00057   // frustum
00058   //glMatrixMode(GL_PROJECTION);
00059   //glLoadIdentity();
00060   //glFrustum( );
00061   //glMatrixMode(GL_MODELVIEW);
00062
00063   ////// viewport
00064   //glViewport(0,0, 512,512);
00065
00066   ////// all internal
00067   //glMatrixMode(GL_PROJECTION);
00068   //glLoadIdentity();
00069   //gluPerspective(67.5
00070   //  ,1.0
00071   //  //,this->GetViewController().GetInternals().viewport.GetAspect()
00072   //  ,this->GetViewController().GetInternals().frustum.zNear
00073   //  ,this->GetViewController().GetInternals().frustum.zFar
00074   //  );
00075
00076   //glMatrixMode(GL_MODELVIEW);
00077   //glLoadIdentity();
00078   //gluLookAt(
00079   //  GetViewController().GetExternals().C[0],
00080   //  GetViewController().GetExternals().C[1],
00081   //  GetViewController().GetExternals().C[2],
00082   //  0,0,0,
00083   //  0,1,0 );
00084
00085   glMatrixMode(GL_MODELVIEW);
00086 #ifdef BIAS_HAVE_GLUT
00087   glutWireTeapot(0.5);
00088 #endif // BIAS_HAVE_GLUT
00089   this->DisplayCoordCross();
00090
00091   //// animated scene
00092   //BIAS::GeometryGL::DisplayCallsSampleDisplayListScene(this->time);
00093   //CHECK_GL_ERROR;
00094
00095   /*
00096   glColor3f(0.5, 0.5, 0.5);
00097   //glutSolidCube(0.1);
00098   //glutSolidCube(1.0);
00099
00100   glColor3f(0.5, 0, 0);
00101   glPushAttrib(GL_POINT_BIT);
00102   glPointSize(31);
00103   glBegin(GL_POINTS);
00104   glVertex3f(0,0,0);
00105   glEnd();
00106   glPopAttrib();
00107
00108   glColor3f(0, 0.5, 0);
00109   glPushAttrib(GL_POINT_BIT);
00110   glPointSize(7);
00111   glBegin(GL_POINTS);
00112   glVertex3f(0,0,0);
00113   glEnd();
00114   glPopAttrib();
00115   */
00116
00117 }
00118
00119
00120 // --------------------------------------------------------
00121
00122 bool ExampleOpenGLCanvasApp::OnInit()
00123 {
00124   // utility: create a Redirection console for cout, cerr etc.
00125   ConsoleRedirectIO();
00126   // testing output:
00127   cout<<"Hello cout"<<endl;
00128   cout<<"Hello cerr"<<endl;
00129
00130   MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvas"), wxPoint(0,0), wxSize(640,480) );
00131   frame->Show(TRUE);
00132   SetTopWindow(frame);
00133
00134   return TRUE;
00135 }
00136
00137
00138 // --------------------------------------------------------
00139 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00140 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00141 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00142 EVT_MENU(ID_TESTSHOT, MyFrame::OnTestShot)
00143 END_EVENT_TABLE()
00144 // --------------------------------------------------------
00145
00146
00147 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00148 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00149 ,p_canvas(NULL)
00150 {
00151   // Create a simple top Menu
00152   wxMenu *menuFile = new wxMenu;
00153   menuFile->Append( ID_ABOUT, wxT("&About...") );
00154   menuFile->AppendSeparator();
00155   menuFile->Append( ID_TESTSHOT, wxT("&Shot...\tCtrl-S") );
00156   menuFile->AppendSeparator();
00157   menuFile->Append( ID_QUIT, wxT("E&xit") );
00158
00159   wxMenuBar *menuBar = new wxMenuBar;
00160   menuBar->Append(menuFile, wxT("&File"));
00161   SetMenuBar(menuBar);
00162
00163   // Create a simple bottom status bar
00164   CreateStatusBar(3);
00165
00166   // Canvas to test:
00167   //p_canvas=new BIAS::OpenGLCanvas(this, -1);
00168   p_canvas=new MyGLCanvas(this);
00169
00170   //p_2nd_canvas = new MyGLCanvas(this);
00171 }
00172
00173
00174 void MyFrame::OnTestShot(wxCommandEvent& /*event*/)
00175 {
00176   p_canvas->ScreenShot("out_RGB.jpg", true, GL_RGB);
00177
00178   p_canvas->ScreenShot("out_RGB.mip", true, GL_RGB);
00179   p_canvas->ScreenShot("out_RGBA.mip", true, GL_RGBA);
00180   p_canvas->ScreenShot("out_DEPTH.mip", true, GL_DEPTH_COMPONENT);
00181   p_canvas->ScreenShot("out_DEPTH.jpg", true, GL_DEPTH_COMPONENT);
00182   p_canvas->ScreenShot("out_ALPHA.mip", true, GL_ALPHA);
00183   p_canvas->ScreenShot("out_ALPHA.jpg", true, GL_ALPHA);
00184   p_canvas->ScreenShot("out_LUMINANCE.mip", true, GL_LUMINANCE);
00185   p_canvas->ScreenShot("out_STENCIL.mip", true, GL_STENCIL_INDEX);
00186 }
00187
00188
00189 void MyFrame::OnQuit(wxCommandEvent& ){
00190   Close(TRUE);
00191 }
00192
00193
00194 void MyFrame::OnAbout(wxCommandEvent& )
00195 {
00196   wxString title(wxT("About"));
00197   wxString msg; // message
00198   msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00199   msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00200   msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00201   msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00202   msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00203   msg<<wxT("\n");
00204   COUT(msg);
00205   wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00206 }
00207
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleOpenGLCanvasBase.cpp

ExampleOpenGLCanvasBase.cpp

Todo:
plases Splel Cechek me !
Implement a simple example for teh OpenGLCanvasBase canvas. Please note the specialized canvases liek teh OpenGLCanvas (without Base) or teh ImageCanvasGL which may be a betetr choice for you.
Author:
Jan Woetzel
00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003
00004 #include <Base/Common/LeakChecking.h>
00005
00006 #include "ExampleOpenGLCanvasBase.hh"
00007
00008 // BIAS
00009 #include <Gui/ConsoleRedirectIO.hh>
00010
00011 using namespace std;
00012
00013 // required for wx RTTI dynamic construction:
00014 IMPLEMENT_APP(ExampleOpenGLCanvasApp)
00015
00016
00017 // --------------------------------------------------------
00018 bool ExampleOpenGLCanvasApp::OnInit()
00019 {
00020     // utility: create a Redirection console for cout, cerr etc.
00021     ConsoleRedirectIO();
00022     // testing output:
00023     cout<<"Hallo cout"<<endl;
00024     cout<<"Hallo cerr"<<endl;
00025
00026     MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvasBase"), wxPoint(0,0), wxSize(640,480) );
00027     frame->Show(TRUE);
00028     wxLogGui log;
00029     SetTopWindow(frame);
00030
00031     return TRUE;
00032 }
00033
00034
00035 // --------------------------------------------------------
00036 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00037 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00038 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00039 END_EVENT_TABLE()
00040 // --------------------------------------------------------
00041
00042
00043 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00044 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00045 ,p_canvas(NULL)
00046 {
00047     // Create a simple top Menu
00048     wxMenu *menuFile = new wxMenu;
00049     menuFile->Append( ID_ABOUT, wxT("&About...") );
00050     menuFile->AppendSeparator();
00051     menuFile->Append( ID_QUIT, wxT("E&xit") );
00052     wxMenuBar *menuBar = new wxMenuBar;
00053     menuBar->Append(menuFile, wxT("&File"));
00054     SetMenuBar(menuBar);
00055
00056     // Create a simple bottom status bar
00057     CreateStatusBar(3);
00058
00059     // Canvas to test:
00060     p_canvas=new BIAS::OpenGLCanvasBase(this, -1);
00061
00062 }
00063
00064
00065 void MyFrame::OnQuit(wxCommandEvent& ){
00066     Close(TRUE);
00067 }
00068
00069
00070 void MyFrame::OnAbout(wxCommandEvent& )
00071 {
00072     wxString title(wxT("About"));
00073     wxString msg; // message
00074     msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00075     msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00076     msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00077     msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00078     msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00079     msg<<wxT("\n");
00080     COUT(msg);
00081     wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00082 }
00083
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: ExampleTracker2

ExampleTracker2

This little example demonstrates the

Author:
woelk

Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by

  doxygen  1.4.5


Basic Image AlgorithmS Library: ExampleTracker3

ExampleTracker3

This little example demonstrates the most simple case of usage of the Tracker class. It also demonstrates that it is neccessary to extract the tracking information and store them externally.

Author:
woelk

Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by

  doxygen  1.4.5


Basic Image AlgorithmS Library: ExampleTrackerBase

ExampleTrackerBase

This little example evaluates a TrackerBase class against synthetically generated ground truth data. Synthetically generated ground truth data can be found in the TestData repository in our cvs.

ExampleTrackerBase 157 157 ~/cvs/TestData/tracker_noise/image*.pgm

Author:
woelk

Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by

  doxygen  1.4.5


Basic Image AlgorithmS Library: mip2viff.cpp

mip2viff.cpp

convert our proprietary .mip format to very old Choros .viff format (depreacted!)
Author:
Jan Woetzel
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example mip2viff.cpp
00027  convert our proprietary .mip format to very old Choros .viff format (depreacted!)
00028  @author Jan Woetzel
00029 */
00030
00031
00032
00033 #include <iostream>
00034
00035 #include <Base/Debug/Error.hh>
00036 //#include <Base/Image/ImageBase.hh>
00037 //#include <Base/Image/ImageConvert.hh>
00038 //#include <Base/Image/ImageIO.hh>
00039
00040 //using namespace BIAS;
00041 using namespace std;
00042
00043 //int main(int argc, char *argv[])
00044 int main()
00045 {
00046     // DEPRECATED!
00047     BIASERR("VIFF export is unsupported (DEPRECATED)");
00048     return -1;
00049
00050     //ImageBase source, dest;
00051     //if (argc!=3)
00052     //{
00053     //    BIASERR(argv[0] << " image.mip image.viff ");
00054     //    return -1;
00055     //}
00056     //if (ImageIO::Load(argv[1], source)!=0)
00057     //{
00058     //    BIASERR("error loading image "<<argv[1]);
00059     //    return -2;
00060     //}
00061
00062     //std::string outFileName;
00063     //outFileName=argv[2];
00064     //if (ImageIO::Write(argv[2], source)!=0)
00065     //{
00066     //    BIASERR("error writing MIP image "<<outFileName<<std::endl);
00067     //    return -4;
00068     //}
00069     //if (ImageIO::ExportImageViff_( outFileName, source)!=0)
00070     //{
00071     //    BIASERR("error writing VIFF image "<<outFileName<<std::endl);
00072     //    return -4;
00073     //}
00074     //return 0;
00075 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: timeit.cpp

timeit.cpp

Author:
Jan Woetzel 2005
00001 /** @example timeit.cpp
00002     @brief Helper to emulate the Unix "time" command on WIN32 platforms.
00003     Measure the duration of the execution of a command=timean application run.
00004     @author Jan Woetzel 2005
00005 */
00006
00007 #include <stdlib.h>
00008 #include <iostream>
00009 #include <string>
00010
00011 #include <Base/Debug/TimeMeasure.hh>
00012
00013 using namespace std;
00014 using namespace BIAS;
00015
00016 // JW
00017 int main(int argc, char** argv)
00018 {
00019     // usage:
00020     if (argc<=1){
00021         cout<<"usage: "<<endl;
00022         if (argc>0) cout<<argv[0]<<" ";
00023         cout<<"<application.exe> [<paramters>] "<<endl;
00024         cout<<"example: timeit mapp.exe -myarg1"<<endl;
00025         return -1;
00026     }
00027     // variables:
00028     int result = 0;
00029     string command="";
00030     TimeMeasure timer1;
00031
00032     // create command:
00033     for (int i=1; i<argc; i++)
00034     {
00035         command+=argv[i];
00036         command+= " "; // delim.
00037     }
00038     cout<<endl;
00039
00040     cout<<"timing: "<<command<<endl;
00041
00042     // run timed application as system call:
00043     timer1.Reset();
00044     timer1.Start();
00045     result = system( command.c_str() );
00046     timer1.Stop();
00047
00048     if (result!=0){
00049         cout<<"could not run, result="<<result<<endl;
00050         return -2;
00051     } else {
00052         cout<<"timing successful. "<<endl;
00053         // display final timing result:
00054         timer1.Print(cout);
00055     }
00056     return 0;
00057 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: viff2mip.cpp

viff2mip.cpp

convert very old Choros .viff format to our internal proprietary .mip image format (depreacted!)
Author:
Jan Woetzel
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example viff2mip.cpp
00027  convert very old Choros .viff format to our internal proprietary .mip image format (depreacted!)
00028  @author Jan Woetzel
00029 */
00030
00031
00032 #include <iostream>
00033
00034 #include <Base/Image/ImageBase.hh>
00035 #include <Base/Image/ImageConvert.hh>
00036 #include <Base/Image/ImageIO.hh>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 int main(int argc, char *argv[]){
00042   ImageBase source, dest;
00043
00044   if (argc!=3)
00045   {
00046     BIASERR(argv[0] << " viff.image image.mip ");
00047     //return -1;
00048     return 0; // for Dart testing
00049   }
00050
00051   if (ImageIO::Load(argv[1], source)!=0){
00052     BIASERR("error loading image "<<argv[1]);
00053     //return -2;
00054     return 0; // for Dart testing
00055   }
00056
00057
00058
00059   if (ImageIO::Write(argv[2], source)!=0){
00060     BIASERR("error writing image ");
00061     //return -4;
00062     return 0; // for Dart testing
00063   }
00064   return 0;
00065 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- _ -

  • __BIAS_CylinderMappibg_hh__ : CylinderMapping.hh
  • __glx_h__ : bias_wx_glcanvas.h
  • __JPEGHANDLER_HH__ : CompressJpeg.hh
  • __P : getopt_W32.h
  • __USE_BIAS__ : PMDImageProc.hh
  • __WXMSW__ : _wx_intellisense.h
  • _am_compute4by1ErrorVector() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute4by4GradientMatrix() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute6by1ErrorVector() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute6by6GradientMatrix() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_gauss_jordan_elimination() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _CRT_SECURE_NO_DEPRECATE : Camera.cpp, ImageIO.cpp, getopt_long_W32.cpp, FileHandling.cpp
  • _DIAGASSERT : getopt_long_W32.cpp
  • _ExampleGLSharedMyFrameIDs_ : ExampleGLShared.hh
  • _ExampleImageCanvasGLBaseMyFrameIDs_ : ExampleImageCanvasGLBase.hh
  • _ExampleOpenGLCanvasMyFrameIDs_ : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh
  • _USE_MATH_DEFINES : Vector2.hh, Vector.hh, Matrix.hh, Image.hh, EightWaySymmetry.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- a -

  • abs() : TNT
  • AddGradientType() : BIAS
  • AddLowPassType() : BIAS
  • Arrow : BIAS
  • AsciiToWx() : BIAS
  • attribsRGBAD : BIAS
  • attribsRGBASD : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Page Index

Basic Image AlgorithmS Library Related Pages

Here is a list of all related documentation pages:
  • Building BIAS, required/optional packages
  • History / CHANGELOG
  • Concepts
  • Conventions
  • Filter, Transformations and 2D-2D operations
  • Geometry / Transformations
  • Image Components
  • Introduction and Overview to BIAS
  • License for BIAS
  • Math Components
  • modules
  • Tools
  • Tracker
  • Utils
  • Deprecated List
  • Todo List
  • Bug List
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Building BIAS, required/optional packages

Building BIAS, required/optional packages

This library can be built with different compiler and under different operating systems, in particular with gcc 3.3/4.1 on Linux and Microsoft Visual Studio .NET 2003 on Windows.

You need to install a recent version of cmake from www.cmake.org. CMakeLists.txt files are used as input by cmake to generate Makefiles on Linux and Visual Studio project files on Windows (or nmake files).

BIAS requires some packages to be properly installed and can use some others to extend its own functions. Optional and mandatory packages are (as in BIAS/DEPENDENCIES):

Common
======
Because the build-system of BIAS is based on CMake (www.kitware.com) you must
have properly installed these tools:

    * cmake (newest version, at least 2.0.3, see www.cmake.org)

Most of the subdir MathAlgo is based on Blas/Lapack, so BIAS depends on:
    * lapack/blas (see below for Win32 hints)

UNIX
====
There are some packages which have to be installed in order for BIAS
to be built and to work correctly. Currently BIAS depends on:

    * libuuid (belongs to ext2 file system tools)
    * g2c/f2c (fortran-to-c)
    * make (GNU-make prefered, other untested)
    * a compiler (gcc/g++ 4.1 prefered)

BIAS has interfaces for or supports the following packages (optional):

    * libdv
    * fftw3
    * GSL (GNU Scientific Library)
    * gtk 1.2.10 or gtk2 (both deprecated)
    * ImageMagick  (e.g. ImageMagick-6.2.0-Q16)
    * imlib (e.g. 1.9.10)
    * OpenCV (e.g beta5a)
    * OpenGL
    * Pthreads
    * wxWidgets (formerly known as WxWindows, e.g. 2.6)
    * libxml2 (e.g. 2.5.10-25)

Note: Problems with wxWidgets/GTK
Since wxWidgets may itself have dependencies on GTK, you may run into trouble
when activating both. wxWidgets 2.6 and above usually use GTK2. It is
recommended that you do not install GTK1 (GDK1, GLIB1) devel packages if you
 are using a GTK2 based wxWidgets installation, because files like glibconfig.h
found in different conflicting versions may be confused in that case.

WINDOWS
======
We ported most of BIAS to Win32 system using Windows XP and Visual Studio .NET
2003. Older Version of VS are not supported because of their broken template
compilation engine.

Under MS Windows there are the following dependencies:

    * lapack/blas     (can be found at
                       http://www.cs.unc.edu/~kim/lapack/VCLapack.zip
                       set Path variable to both .dll files and ENV variables
                       (LAPACK_HOME and BLAS_HOME) to the directory
                       which containes lapack, blas and f2c.h (def's needed))

optional:

    * libXML2 2.5.10  (which depends on zlib and iconv. All this can be
             - 2.6.11  found at http://www.zlatkovic.com/libxml.en.html.
                       For configuration with CMake, set environment variables
                       XML2_HOME, ICONV_HOME and ZLIB_HOME.
                       For runtime set PATH to the directories
                       that containes all three DLL's or copy DLL's into
                       systemdir)
    * ImageMagick  (e.g. ImageMagick-6.2.0-Q16)
    * OpenCV (e.g beta5a)
    * OpenGL
    * Pthreads
    * wxWidgets (formerly known as WxWindows, e.g. 2.42)
    * libxml2 (e.g. 2.5.10-25)

Not yet integrated dependencies: GSL, imlib (or other imageloader), gtk (will never be integrated),  FFTW3

WIN32 Note: BIAS is frequently tested with "multithreaded shared debug" runtime libs ("/MDd") and *NOT* using UNICODE. However, other configurations such as release or static (e.g. "/MT") should work, too - but these are less frequently tested.

Installation of BIAS as described in BIAS/INSTALL is as following:

INSTALL howto for the BIAS library

QUICKINSTALL:
> get BIAS source
> get CMakeModules
> setenv CMAKE_MODULE_PATH to directory of CMakeModules
> cmake .
> make

Building BIAS with CMake
------------------------

Prerequsits:
(1) Install newest cmake version (minimum 2.0.3) from www.cmake.org
(2) If you have a tar.gz BIAS version, all necessary CMake scripts will be
inside that archive and you can proceed with step (3). When using the BIAS
cvs access, you need to fetch build system scripts(2.1) and tell where
they are(2.2):
(2.1)
Checkout our CMakeModules directory (same CVS settings as BIAS) containing
additional find package macros for BIAS:
> cvs co CMakeModules
(2.2) Let environment variable CMAKE_MODULE_PATH
point to the CMakeModules directory, e.g.
on bash:
> export CMAKE_MODULE_PATH=/home/jw/CMakeModules
or on tcsh:
> setenv CMAKE_MODULE_PATH /home/jw/CMakeModules

(3) checkout/install BIAS source code.

(4) configure
run cmake to change options and to generate makefiles.

example for an in-place build on Linux:
cd to source directory of BIAS
> cd BIAS
configure and generate makefiles:

On Linux:
> ccmake . (mind the 'dot')
See the bottom line for usage insatructions, in particular:
- press 'c', then modify options as required and press 'c' again to configure
- finally press 'g' to generate Makefiles

On Win32:
> CMakeSetup.exe
The GUI is self-explaining.

Note:
You can also use
 > cmake .
directly if you prefer commad line instead of graphical interface.

(4.2) configure examples:
With the option BUILD_EXAMPLES at the you may switch the building of example binaries.
> make

(5) compile:
> make

(6) install: (optional, not required)
> make install

See ReadmeCMake.txt for further information.

Jan Woetzel
12/2003 - 11/2004

Todo:
prefix all *HAVE* and *USE* flags with BIAS_ to be unique with the benefit that "GenerateConfigheader" will not be required anymore. (JW 11/2005)
Feel free to ask Jan Woetzel for details.
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Concepts

Concepts

Concepts and Ideas

  • Directory- and Library-Hierarchy
  • Templates
  • C-Style Functions / Static Functions
  • Debuglevel
  • Efficiency
  • Operators
  • Tools and Utils
  • XML
  • TODO
  • BUGS

Directory- and Library-Hierarchy

The bias library is currently divided into a number of sublibraries. Each is compiled from the files in separate subdirectories. These sublibraries can be clustered into two main categories, the
  • base libraries, which should have minimal dependencies to other BIAS libraries and other third party librares and the
  • remaining libraries, where a little more relaxed approach regarding dependencies is choosen.

Building one big "libbias.so" is deprecated. Please add dependencies to teh individual libraries you really need, instead. You can emulate the behavior of LIBBIAS adding dependencies to all BIAS libraries. They are stored in BIAS_LIBRARIES if you use CMake and BIAS' find script.

Base Libraries

All base libraries reside in the common subdirectory Base. Currently 5 diferent base libraries exist, namely

  • libBIASImageBase: It provides basic operations on images for e.g. storing, drawing and the most simple operations (i.e. operations that do only need to access one pixel at a time, f.e. thresholding). The more complex operations on images can be found in the libBIASFilter library, which does not belong to the base libraries. Very few external dependencies exists, which can all be excluded using appropriate build options.

  • libBIASMathBase: It provides basic matrix, vector and tensor operations as well as a class for generating random numbers with different distribution functions. Most important is, that no semantic is implemented in the libBIASMathBase library. Furthert on there is no dependency to external libraries although some of our classes are derived from the matrix and vector classes from the TNT library. The code from the TNT library is however included in BIAS. There are no dependencies to this libary.

  • libBIASGeometryBase: In this library the matrices, vectors and tensors from the libBIASMathBase are filled with semantic, providing classes for fundamental matrices, trifocal tensors, homgenous points, etc. These classes do not know much mathematic algorithm (f.e. SVD), since libBIASGeometryBase does not depend on any other library but libBIASMathBase.so.

  • libBIASDebug: This is a a library for basic debugging functions. It contains header files with helper classes, macros and functions for debugging and profiling/timing. Most of this functionality vanishes, if the BIAS_DEBUG preprocessor flag is undefined (normaly, it is defined in bias_config.h).

  • libBIASCommon.so: Contains XML I/O handling, Win32 compatibility fucntions, some Utility functins including Filename string handling and the getopt command line parser.

Other Libraries:

All libaries not belonging to the base libraries are located in directory directly in the toplevel directory. Currently

  • libBIASCornerDetector: Should be combined with libBIASEdgeDetector into libBIASFeatureDetector in future versions. Currently different implementations of the harris, foerster and susan corner detctor exist.
  • libBIASEdgeDetector: Currently empty, should be combined with libBIASCornerDetector into libBIASFeatureDetector in future versions.
  • libBIASGeometry: Most of the classes in this libraries are derived from base classes in the libBIASGeometryBase librarie and provide some enhances functionality (e.g. decomposition using SVD).
  • libBIASGui: Consists of two parts: The first provides a simple mechanism to display an image without building a real gui application using callback functions (Gui* classes). The second provides some helper classes for building propper gui applications using wxwidgets/wxwindows (ImageCanvas and ParamGUI).
  • libBIASImage: Contains convenient functions for working with images, f.e. 2 pyramid image classes, histogram classes and a convenient class for the usage of meta data with images.
  • libBIASMatcher2D: Contains classe for solving the image correspondence problem (e.g. SSD, NCC, KLT).

  • libBIASMathAlgo: Conatains wrapper classes for more complex mathematical algorithms like SVD, Levenberg-Marquard, ... MOst of theses algorithms are only provided when BIAS is used together with third party classes like LAPACK or GSL.
  • libBIASStateEstimator: Contains classes for the state estimation problem, like Kalman filter, particle filter and condensation.
  • libBIASUtils: Contains usefull helper classes for handling parameters, for generation of ground truth image matches with additional noise, ...
  • Tools: Contains nice little standalone tools like an image viewer biasview(wx), a conversion tool, and so on

The separation into math and geometry seems somewhat strange at first glance, but has some important advantages:

  • The sematic is first introduced in the geometry libraries. This allows for extremly lean matrix and vector classes.
  • Constraints to certain entities (i.e. orthogonality in RMatrix) do not inhibit the general use of the more generic entity (i.e. matrix).

Templates

Templates are used to minimize the implementation overhead while at the same time providing a wider range of available specializations.

  • We decided to use explicit template instantiation (also called Cfront model). See info gcc for detailed description of the different instantiation models. The main advantage is the reduced compile time for applications.

  • When using explicit template instantiation, the programmer of the library decides for what classes the template is instantiated. At the moment the explicit instantiation takes place either in the *.cpp files of each class or in a special file called *Instantiation*.cpp.

  • Because we tried to optimized our library with respect to speed, we only accept basic data types as specialization for the image and math related classes. Performance measurments revealed that the constructor of Image<class RGB> is approximate 100 times slower than Image<unsigned char>, when the class RGB consists of three unsigned char members and has an empty inline constructor. This is mainly a result of the fact, that the constructor is called for every pixel in the first case, while a single call to malloc/new is sufficient in the latter case.

  • In order to reduce compile time of the BIAS libraries the instantiation of image classes exists trough options for each basic type .

  • At the moment an instance of Image<std::complex<double> > exists. This is contradictory to the above stated basic ideas. It most probably will be removed in the future. A good way confirming to our instantiation policy to allow images with complex content would be to take an Image<double> with channel count 2 and introduce a new color model CM_Complex.

C-Style Functions / Static Functions

  • Generally BIAS is an c++ library and hence no (i.e. very little) c-style functions exist. Some functionality does not necessairily need to be implemented as a c++ class, e.g. when no class memeber variables are needed. In such cases we use wrapper classes to group this functions (e.g. BIAS::ImageConvert). There is a single exception from this rule: The wrappers implemented for old fortran code in Lapack.hh and Minpack.hh (lapack/minpack). This may also change in the future.

  • Static functions are only used, when absolutly necessairy, i.e. when a function pointer is needed. Again there are some exceptions to this rule: All members of the classes BIAS::ImageIO, BIAS::ImageDraw and BIAS::ImageConvert are static since in this case the classes are only used to group c-style functionality.

Debuglevel

  • Debuglevel abstrakt (Detail in Konventionen) (Friso) Vater aller Klassen, verschwdet wenn BIAS_DEBUG -> Aus, BIAS_DEBUG - Flag, Fehlermeldungen (BIASERROR) relevant fuer Programmierer, Setzen - Hierarchie von Debug-Levels (lokal-global, Bitfeld?), BIAS_DEBUG: Tests(Boundaries - BIASASSERT) - Ausgaben, Benutzerausgaben und Statusmeldungen nicht durch Debug sondern durch ???

Efficiency

Efficiency is the first priority on which the design of the BIAS libraries is based:
  • Virtual functions are somewhat slow, because it is decided at runtime which function gets called. Hence the use of virtual functions is avoided whenever possible. This applies mainly to functions which are called very frequently.
  • Some computations are cached within certain classes. Since we often compute some object (e.g. a PMatrix) once and use it several times afterwards without modification, it is efficient to cache computations needed in that object, such as a decomposition or pseudo-inverse of a matrix. However, an explicit notification becomes necessary, when the data fields have changed and the cache becomes invalid. The concept here is that validity is only checked in BIAS_DEBUG mode (if data is corrupt program aborts) and assumed otherwise.

  • Only basic data types are allowed as template instantiations for images and matrices. See Templates for details.
  • Generally our matrix classes have no Invert() function. This results from two facts.
    1. The matrix classes reside in the Base/Math directory and hence have no dependency to mathematical algorithms, like e.g. SVD.
    2. The presents of an (most probably inefficient) function invert in every matrix class tempts the programmer to write inefficient code.

Operators

Operators do not belong to classes, because
  • it is not allways clear to which class an operator should belong (e.g. Matrix Vector multiplication).
  • it causes problems when using inheritance and overwriting operators. It can happen, that some operators from the father class are no longer available if a single operator is overwritten.

Tools and Utils

What is the difference between tools and utils?
  • Tools are small standalone applications like image viewers, converters, filters, and so on.
  • Utils are helper classes dealing with a variety of problems, f.e. a class dealing with the management of paramters to complex applications.

XML

The aim for the future is that all basic data containing classes are able to write and read their data from and to a file. The data file format is set to XML.

  • All classes with xml i/o support should be derived from the class "Base/Common/XMLBase". Override XMLGetTopLevelName that it returns a tag identifying the class, e.g. "FeaturePoint". XMLAdd and XMLWrite use this function to generate the toplevel node of you object. Override XMLFill, to fill the data of (*this) into a XML-tree, where the top level node is already created. Then call XMLWrite to write the object to an XML file or XMLAdd(n) to attach the object to a node n of an existing xml structure. Given a valid xml file, you can call XMLRead to read the xml file into the current object, this calls your specialization of XMLReadObject.

  • The class XMLIO is a wrapper of the libXML2 which is needed at least in version 2.5.10. It supports building and accessing an XML-tree in an easy way and should be used when overwriting XMLFill.
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Conventions

Conventions

Conventions

The programming conventions that all BIAS-programmers should follow are:

Names for Files, Classes, Functions, Variables

  • File names should be the class name that is implemented in the file, suffixes for all files are: .cpp .hh (.c for pure c)
  • Class and function names start with a capital letter and use upper case letters as word separator, e.g. CornerDetector().
  • Variables start with a lower case letter
  • All protected class member variables and functions must end with underscore, e.g. int depth_; void InternalComputation_();
  • Pointer variables should start with a "p", e.g. int *pCounter = NULL;
  • Namespace: All classes and functions should belong to the namespace BIAS to avoid conflicts.

Function calls: Parameters and Returns

  • Use call by reference for almost all function parameters to speed up execution (except basic types like int, char or double).
  • Avoid pointers whenever possible, use call by reference, e.g. void ToGrey(Image<PixelType>& Source);
  • Use const to distinguish between input and output parameters.
  • Use function parameters to return function results, the exception are Yes/No-functions like Is.. which may return a bool.
  • Return values should only indicate function success: negative=error, zero=OK, positive=non-critical message.

Code Formatting

  • All indention with 2 spaces, no tabs.
  • recommended: limit line width to 80 chars (but NOT mandatory)
  • Thus please set Edit options as:

Example for MS Visual Studio settings:

  • Tools -> Options -> Text Editor -> C/C++ -> Tabs:
  • Indenting : Smart
  • Tab size : 2
  • Indent size: 2
  • Insert space: x (enable)
  • Tools -> Options -> Text Editor -> C/C++ -> Formatting:
  • Indent braces: No!

Example for XEmacs settings:

  • add (e.g. to ~/.xemacs/custom.el):
    (custom-set-variables
;; indention: 2 spaces, no tabs:
 '(setq-default indent-tabs-mode nil)
 '(setq-default tab-width 2)
 '(setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24)) )

Example for proper code formatting: In Declaration (in header):

/** @brief formatting example
@author Jan Woetzel */
#include <iostream>
class foo
{
  /// @author JW
  void bar();
};
Definition (in .cpp file):
void foo::bar()
{
  std::cout<<"hello";
}

Portability between Linux and Windows

We support MS Windows with Visual Studio .NEt 2003 compiler and Linux with gcc (3.3.4) compiler actually (as of 2005/11/01).

  • Since BIAS is set up as a Multi-Platform library, make sure that your code compiles in Linux and Windows. Use if(n)def _WIN32 to mark platform propriatary code.
  • If you have to include any external dependencies, i.e. libraries, the dependant could should be ifdefed depending on an approriate flag in bias_config.h which is automatically generated by teh build system.

Static and shared libraries (.so/.dll)

  • Windows needs explicit exports to mark each interface that should be exported into a DLL because of different linking. This dllexport/dllimport is handled through macros (see BIAS_DeclSpec.hh ), one for each library. Thus each library, function, class and (global) variable (including extern/extern "C" stuff) should be prefixed with the libname_EXPORT macro. See existing code for examples. If you create a new BIAS library you have to add the appropriate macro to BIAS_DeclSpec.hh. Feel free to ask Jan Woetzel for details.

Further programming rules

  • Always use absolute includes starting below BIAS base dir, e.g. include <Base/Image/ImageDraw.hh>
  • Use includes only where they are necessary to reduce depndencies and compile time.
  • Thus headers contain only includes for interfaces (or use forward declarations if appropriate),
  • source file should contain all includes that ar enot required as an interface,
  • All files should contain exactly one class (definition or declaration),
  • do not spread classes over multiple files,
  • do not implement multiple classes in one file.
  • Avoid "pointer" arrays, please prefer use std::vector.
  • Avoid char*, use std::string.

Const

  • Use const wherever possible for all constant functions and parameters. This results in cleaner and faster code because of better compiler optimization and increases readability. In addition these interafce are less error prone because side effect are avoided.
  • Use const for all functions like Get.. or Is.. and assure that they are constant.
  • Use const for all parameters for functions like Set.. orInit.. and assure that these parameters remain unchanged.

API - check build configuration in header

The BIAS API varies with the number of aviable (third party) libraries (and possibly which subdirectories were compiled). To avoid compilation and linking problems and given the user an early hint for a problem you must ifdef code taht relies on special features. bias_config.h exists for this purpose. The procedure to catch these problems should be like this:
#include <bias_config>
#ifdndef BIAS_HAVE_<MYSPECIALLIB>
#  error BIAS was build without MYSPECIALLIB, please enable USE_MYSPECIALLIB and recompile BIAS.
#endif
...
// or to ifdef only certain functions:
/** minimal docu:  @author JW */
calss MyClass {
public:
#ifdef BIAS_HAVE_<MYSPECIALLIB>
  void function_that_uses_myspeciallib();
#endif
...
  void otherfuntion();

Documentation

  • Use the Doxygen documenting syntax for all code including classes, methods, variables, macros, defines etc.
  • Give a short description of every member variable.
  • When committing to the CVS repository, write what you have done, be more specific than "update", "changes" "fixed bug" or "-".
  • Give a detailed summary of every class and point out which functions are the important ones. A sample Doxygen documentation block for classes:

/** @class TestDoxy
    @ingroup g_test
    @brief example to show Doxygen-syntax
    @author Birger Streckel
    @date 09/2004
    A detailed description for every class is necessary!
**/

  • Give a brief summary for every function and every parameter/return value. Make sure which parameters are input and which are output. A sample Doxygen documentation block for member functions:

/** @brief example to show Doxygen-syntax
    @param par1 (input)
    @param par2 (output)
    @returns -1=error, 0=OK
    @author Birger Streckel
    @date 09/2004
**/

  • Give meaningful names to variables.
  • Describe all loops and algorithms in your words.

  • The build system supports a "doc" target to build the documentation if doxygen and dot/graphviz are installed E.g. Linux:
    make doc
    Windows:
    nmake doc
    or build
    doc.vcproj (within BIAS.sln)

Debug (detailed)

  • cerr, cout and printf should not be used for debugging. Please use COUT, BIASWARN, BIASERR, BIASDOUT, BIASDOUT_CLEAN instead whcih supports different kinds of debuglevel based output.
  • in Addition deriving from BIAS__Debug allows more sophicticated flags based debugging.

We know that these rules were not followed in all parts of BIAS but we want to be more strict in the future, so please stick to these rules for all new commits.

Supervisors of students which program for BIAS and MIP are strongly urged to enforce a proper programming style by not accepting any work that does not conform.

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter, Transformations and 2D-2D operations

Filter, Transformations and 2D-2D operations

A filter or an image transformation takes an input image and computes an output image.

When organizing the classes in BIAS, we make a distinction between a filter (located in the Filter directory), which does a filtering based on local regions and a more global image transformation, e.g. a homography mapping. Transformations are no filters in the strict BIAS sense. Therefore such more global transformations are located in the Image directory.

Filters

Filters are double-templated in BIAS, depending on the InputImageType and the OutputImageType and must be derived from FilterBase. That means that you can do a storage type conversion while filtering with nearly no extra cost. Since all filters are derived from FilterBase, all filters have a common function, called Filter(inimage, outimage), so their usage is quite obvious. Filters can be steered either using set-functions or using the parameter object BIAS::Param. The (param object) parameters are always held in the most abstract class.

Hierarchy

Filters in BIAS are divided into groups, depending on how much separate information they generate. The more general filters are directly derived from FilterBase, while filters generating k output values for each input value are derived from special base classes called something like FilterNtokN. For instance, the Gauss filter computes for each grey pixel (or N color channels) one value in the output image (respective N color pixels), it is therefore a FilterNToN-based filter. The gradients are FilterNTo2N-based classes because they generate 2 values (the gradient) at each pixel position. The structure tensor even computes three values for each pixel (a symmetric 2 by 2 matrix). The FilterNTokN classes provide common functionality to query multiple output images for an input image, extending the simple FilterBase interface.

Convolution

There is a generic class Convolution in Filter which uses a FilterMask to convolve an InputImage and produces an OutputImage. Convolution has a function for convolving using integer arithmetics and one for doing the computation in float. FilterMask encapsulates both kernels and normalizations and also stores coefficients (vectors) for a possible separable filtering. Convolution is a FilterNToN-based class.

The normalization of filter masks is left to the user. Usually, for low pass filters like gauss, you want the filter mask to sum up to unity. However, for the sobel operator you have to be concerned about the filter mask width, because you may want to interpret the result as a gradient referring to dx=1 and not dx=2, which you compute when you use a <-1 0 1> kernel. Also you may wish to take care of overflows of your output data type (e.g. signed char). There is no automatism here. However, the class FilterMask provides functionality to compute an approximate int filter mask given the float mask, see BIAS::FilterMask. See this example on Convolution:

/*
This file is part of the BIAS library (Basic ImageAlgorithmS).

Copyright (C) 2004
  Johan Skoglund
  skoglund@isy.liu.se
  CVL/isy
  university of Linköping
  sweden

BIAS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

BIAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with BIAS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

// must be first:
#include <Base/Common/LeakChecking.h>

#include "Filter/Convolution.hh"
#include <iostream>

#include <Base/Common/BIASpragma.hh>

using namespace BIAS;
using namespace std;

int main(int argc, char *argv[])
{
  Image<unsigned char> src,dst;
  src.Init(10,10);
  dst.Init(10,10);

  Convolution<unsigned char,unsigned char> conv;
  FilterMask fm;

  unsigned char *srcdata=src.GetImageData();
  unsigned char *dstdata=dst.GetImageData();

  for(int x=0;x<100;x++)
    {
      srcdata[x]=0;
      dstdata[x]=0;
    }
  srcdata[10*5+5]=100;
  srcdata[0]=100;

  Matrix<short> kern;
  Vector<short> khor;
  Vector<short> kver;
  kern.newsize(3,3);
  kern[0][0]=1;
  kern[0][1]=2;
  kern[0][2]=1;
  kern[1][0]=2;
  kern[1][1]=4;
  kern[1][2]=2;
  kern[2][0]=1;
  kern[2][1]=2;
  kern[2][2]=1;

  khor.newsize(3);
  kver.newsize(3);
  khor[0]=1;
  khor[1]=2;
  khor[2]=1;
  kver[0]=1;
  kver[1]=2;
  kver[2]=1;

  fm.Init(kern,1);
  fm.CreateFloatFilter();

  conv.SetKernel(fm);
  conv.FilterInt(src,dst);
  cout <<"dst matrix:\n";
  for(int y=0;y<10;y++)
  {
      for(int x=0;x<10;x++)
          cout <<(int)dstdata[y*10+x]<<" ";
      cout <<endl;
  }

  fm.Init(khor,kver,1,0);
  conv.SetKernel(fm);
  conv.FilterInt(src,dst);
  cout <<"dst sep:\n";
  for(int y=0;y<10;y++)
    {
      for(int x=0;x<10;x++)
    cout <<(int)dstdata[y*10+x]<<" ";
      cout <<endl;
    }

  conv.SetKernel(fm);
  conv.FilterFloat(src,dst);
  cout <<"dst matrix float:\n";
  for(int y=0;y<10;y++)
    {
      for(int x=0;x<10;x++)
    cout <<(int)dstdata[y*10+x]<<" ";
      cout <<endl;
    }

  conv.SetKernel(fm);
  conv.FilterFloat(src,dst);
  cout <<"dst sep float:\n";
  for(int y=0;y<10;y++)
    {
      for(int x=0;x<10;x++)
    cout <<(int)dstdata[y*10+x]<<" ";
      cout <<endl;
    }

  return 0;
}

Consistent Instantiation of Filters

Sometimes one filter refers to another, and always the user wants to have an overview of what instances are there in the lib and what are not there. Template instances should be consistent and understandable. It is very complicated to control that manually. For the instantiation of filters we have a file Filterinst.hh which takes care about the cmake BUILD_IMAGE_SHORT and similar variables, read the doc of that file to understand how filters are to be instantiated.

Transformations

In the Image directory of BIAS there are some more global transformations, like the sphere and plane mapping or simply a homography mapping.

Mapping

For many applications, we need to resample an image, may it be rectification, warping, undistortion or something else. For this purpose we have the base class BIAS::BackwardMapping which handles the interpolation method, border handling and anti-aliasing in a unified way. There are several clases derived from it, e.g. BIAS::HomographyMapping, which themselves only have to implement the geometric mapping function.

Sphere Projections

This class transforms images or coordinates coming from a fisheye-lens according to different projection models. For this it needs to be initialized with a radial distortion and a radial illumination correction (vignette) curve. The class assumes circular identical distortion and illumination correction functions for all directions starting at the image focal point. With a correct calibration perspective, steriographic and equidistant transformations are possible.
/*
This file is part of the BIAS library (Basic ImageAlgorithmS).

Copyright (C) 2003, 2004    (see file CONTACTS for details)
  Multimediale Systeme der Informationsverarbeitung
  Institut fuer Informatik
  Christian-Albrechts-Universitaet Kiel

BIAS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

BIAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with BIAS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#include <Image/CameraParam.hh>
#include <Base/Image/ImageIO.hh>
#include <Image/CameraParam.hh>
#include <Image/SphericalUndistortion.hh>
#include <Image/UndistortionMapping.hh>
#include <sstream>
#include <iomanip>

#ifdef   WIN32
#include <Base/Common/getopt_W32.h>
#else  //not WIN32
#include <getopt.h>
#endif //WIN32

using namespace BIAS;
using namespace std;

void usage()
{
  cerr << " [-s XX] [-f XX] [-p XX] [-p XX] [-z XX] [-c XX] [-x XX] [-y XX] <image>\n";
  cerr << "-s XX Filename of the XML-camera calibration file "
       << "(default is PtGrey-Omnitech)\n";
  cerr << "-f XX Field Of View in X-Direction in degree, default=100\n";
  cerr << "-z XX Zoom Factor for image size, default=1\n";
  cerr << "-x XX Set view center X, default=PrincipalX\n";
  cerr << "-y XX Set view center Y, default=PrincipalY\n";
  cerr << "-c XX draw circles XX is  const angle in deg, default=off\n";
  cerr << "-p XX Projection Type, default=0\n";
  cerr << "      Projection Types:\n";
  cerr << "        0: All Projections\n";
  cerr << "        1: Perspective projection      - p=k*tan(alpha)\n";
  cerr << "        2: Stereographic projection    - p=k*tan(alpha/2)\n";
  cerr << "        3: Equidistant projection      - p=k*alpha\n";
  cerr << "        4: sine-law projection         - p=k*sin(alpha)\n";
  cerr << "        5: equi-solid-angle projection - p=k*sin(alpha/2)\n";
  cerr << "        6: cylindrical projection\n";
}

int main (int argc, char *argv[])
{
  Image<unsigned char> source, sink;

  int projectionType = 0;
  float zoomFactor = 1;
  int circleAngle = 0;
  int viewCenterX = 0;
  int viewCenterY = 0;
  int FOVx = 100;
  string XMLFile="";

  SphericalUndistortion undist;
  UndistortionMapping<unsigned char, unsigned char> undistMap;

  ostringstream os;

  //  char **images=NULL;

  //  ifstream is;
  //char name[1024];

  if (argc <1) {
    usage();
    return 1;
  }

  //  images = argv;
  char c;
  while ((c = char(getopt(argc, argv, "s:f:z:c:p:x:y:"))) != EOF)
    {
      switch (c){
      case 's':
        if (optarg) {
          XMLFile = optarg;
        } else {
          usage();
          return 1;
        }
        break;
      case 'f':
        if (optarg) {
          FOVx = atoi(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      case 'z':
        if (optarg) {
          zoomFactor = (float)atof(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      case 'p':
        if (optarg) {
          projectionType = atoi(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      case 'c':
        if (optarg) {
          circleAngle = atoi(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      case 'x':
        if (optarg) {
          viewCenterX = atoi(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      case 'y':
        if (optarg) {
          viewCenterY = atoi(optarg);
        } else {
          usage();
          return 1;
        }
        break;
      default:
        usage();
        return 1;
      }
    }

  if (argc<=optind) {
    BIASERR("no image file given!!");
    return -1;

  }
  if (ImageIO::Load(argv[optind], source)!=0){
    BIASERR("error loading image "<< argv[optind]);
    return -1;
  }
#ifdef BIAS_HAVE_XML2
  if (XMLFile=="") {
    undist.SetData_OMNITECH_ORIFL_190_3();
  } else {
    undist.Init(XMLFile);
  }
#else // BIAS_HAVE_XML2
    undist.SetData_OMNITECH_ORIFL_190_3();
#endif // BIAS_HAVE_XML2
  if (undist.IsInitialized() && undist.IsSpherical()) {
    cout << XMLFile << " used for initialization." << endl;
    undistMap.SetCameraParam(undist);
  } else {
    cout << "Error: could not read camera data file or no sphere lens!"
         << endl;
    BIASABORT;
  }

  bool testProjection=false;
  if (testProjection) {
    double centerX, centerY, radius;
    undist.GetSphereCenter(centerX, centerY, radius);
    cout <<"centerx="<<centerX<<";centery="<<centerY<<";radius="<<radius<<endl;
    double theta, phi;
    HomgPoint2D hp(298,388);
    undist.TransfCoordImage2Sphere (hp, theta, phi);
    cout << "CoordImage2Sphere" << endl;
    cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";theta="<<theta<<";phi="<<phi<<endl;
    undist.TransfCoordSphere2Image (theta, phi, hp[0], hp[1]);
    cout << "CoordSphere2Image" << endl;
    cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";theta="<<theta<<";phi="<<phi<<endl;
    HomgPoint2D hpp;
    KMatrix k;
    k.SetIdentity();
    undist.ProjectCoord(SphericalUndistortion::EQUIDISTANT, k, hp, hpp);
    cout << "ProjectCoord" << endl;
    cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";projX="<<hpp[0]<<";projY="<<hpp[1]<<endl;

    return 0;
  }

  if (circleAngle) {
    undist.DrawCircles(source, circleAngle);
    ImageIO::ExportImage("circled.ppm", source, ImageIO::FF_ppm);
    cout << " created: "<<"circled.ppm"<<endl;
  }

  undist.CorrectVignette(source);

  os.str("");
  KMatrix K;
  if (projectionType==6) {
    undist.ProjectImageCylindric(source, sink, viewCenterX,
                                 viewCenterY, zoomFactor);
    os << "projection"<< (projectionType-1) <<".ppm";
    if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
      BIASERR("error writing image "<<os.str());
      return -2;
    }
    cout << " created: "<<os.str()<<endl;
  } else {
    if (!projectionType) {
      int projType;
      for (projType=0; projType<5; projType++){
        undistMap.ProjectSphereImage(source, sink,
                                     source.GetWidth(), source.GetHeight(),
                                     FOVx, 0, viewCenterX, viewCenterY,
                                     projType, zoomFactor, K);
        os.str("");
        os << "projection" << projType << ".ppm";
        if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
          BIASERR("error writing image "<<os.str());
          return -2;
        }
        cout << " created: "<<os.str()<<endl;
      }
    } else {
      undistMap.ProjectSphereImage(source, sink,
                                   source.GetWidth(), source.GetHeight(),
                                   FOVx, 0, viewCenterX, viewCenterY,
                                   projectionType-1, zoomFactor, K);
      os.str("");
      os << "projection" << (projectionType-1) << "UM.ppm";
      if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
        BIASERR("error writing image "<<os.str());
        return -2;
      }
        cout << " created: "<<os.str()<<endl;
    }
  }

  return 0;
}
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry / Transformations

Geometry / Transformations

A central concept in BIAS is the projection matrix, which represents the image creation process in the pinhole camera model.

The pinhole camera projection is a linear mapping of 3D world points to 2D image points. For this to be linear, world points and image points need to be represented in homogeneous space, i.e. the BIAS::PMatrix is a 3x4 matrix mapping 4-vectors of IP3 (BIAS::HomgPoint3D) to 3-vectors of IP2 (BIAS::HomgPoint2D). Usually a PMatrix is made up from a Rotation, a Center and a Calibration. The concept of constructing the 3D points from 2D measurements is called Triangulation. The generated 3D points (as well as 2D points) usually have some uncertainty regions, which can be modelled using quadrics and conics and covariance matrices.

  • Projection Matrix
  • Epipolar Geometry, Fundamental Matrix and Trifocal Tensor
  • Rotation (RMatrix / Quaternion)
  • Calibration (KMatrix)
  • Quadrics, Conics and Uncertainty
  • Triangulation

PMatrix

Each real world pinhole camera is modeled by several external (location C, orientation R) and internal parameters (focal length, aspect ratio, ..., held in the KMatrix, which is also called the calibration) parameters, which alltogether encode the PMatrix like:

P = K [ R^T | -R^T * C ]

If we know K, R, C of a camera we can compute the PMatrix used for projection. The other way around, if we have such a P we can decompose it into K, R and C. Such matrices are called metric. However, our PMatrix may also be an estimate made up from noisy measurements maybe in a projectively skewed space. Then this matrix cannot be decomposed into BIAS::KMatrix K, BIAS::RMatrix R, and BIAS::Vector3 C. The IsMetric flag of BIAS::PMatrix determines if we have a "real" (or metric) or "projective" PMatrix (when writing as XML, this leads to different output) . Once a PMatrix is decomposed, the decomposition (K, R, C) is stored in the object and returned at the next call of decompose without re-computation. This is the main difference to the base class BIAS::PMatrixBase, which does not know anything about decomposition. The caching saves cpu time but the user is now responsible for indicating that the matrix has changed and that cached decomposition is invalid. If BIAS_DEBUG is defined, it is checked whether the PMatrix has been corrupted since the last decomposition and if so the program aborts with a warning message. In "Release" mode a corruption is not detrrected any more and you will simply get wrong results if you change the matrix without notification.

There are several ways to represent the internal and external parameters, instead of decomposing to K,R,C one may also decompose to K and A,H,V,C, where A (optical axis), H(vector parallel to image line) and V(up-vector of the camera) are actually the columns of R or the rows of R^T. Furthermore we can now encode the internal parameters like focal length, aspect ratio, skew and principle point into these unit vectors and end up with another decomposition of P, which is A0, H0, V0 and C.

PMatrices can easily be visualized using ThreeDOut. The class BIAS::PMatrixEstimation can compute two PMatrices consistent with a fundamental matrix (BIAS::FMatrix) or an essential matrix (BIAS::EMatrix), while BIAS::PMatrixLinear will compute a PMatrix given enough 2D/3D correspondences.

Epipolar Geometry, Fundamental and Essential Matrix, Trifocal Tensor

The relationship of two views with different camera centers (two projections matrices) is represented by the fundamental matrix F, a 3x3 matrix with rank 2. Perfect correspondences x1 in image 1 and x2 in image2 fulfill the contraint x1 * F * x2 = 0. F * x2 gives the homogeneous representation of the epipolar line of x2 in image 1, where F is an object of class BIAS::FMatrix. If the calibration of the cameras is removed from the fundamental matrix, we get an essential matrix, represented by BIAS::EMatrix, which does only hold the relative poses of the two cameras. Parametrizations of these classes (sometimes needed for optimization) can be found in BIAS::Parametrization. The same concept as the fundamental matrix, but between three views is encoded in the class BIAS::TFTensor, the trifocal tensor representation.

The directory Geometry hold several classes for linear/least squares (non-robust) estimation of all these objects, see for instance BIAS::FMatrixEstimation.

Quaternion and Rotation Matrix (Daniel)

Rotations in IR^3 around the origin can be done using a 3 by 3 rotation matrix (BIAS::RMatrix). ...

Calibration (KMatrix)

The BIAS::KMatrix as a 3x3 matrix describes a transformation in/of the image plane. In the context of the projection matrix it encodes the internal camera parameters such as focal length, aspect ratio, skew and principle point. In this context it is an upper right triangular matrix.

Triangulation

Given two cameras (and their PMatrices P1, P2) and an image point x1,x2 in each of these cameras, which refer to the same (unknown) point X in 3D space, we can compute this point X by backprojecting the image points and intersecting the two projection rays. This is performed by BIAS::Triangulation. For noisy measurements x1,x2 and/or P1,P2 the rays wont intersect exactly, but there are several techniques to determine a good (regarding some measure) 3D point in that case. Additional to the triangulation we can compute an uncertainty measure of the estimated 3D point, which depends on the intersection angle of the rays. This measure is modelled as a gaussian probability distribution with a 3 by 3 covariance matrix (BIAS::CovMatrix3x3). See also ExampleTriangulate.cpp

Quadrics, Conics and Uncertainty

A quadric Q is a surface in 3D (e.g. an ellipsoid) described by an implicit quadratic equation in IP^3 (x^T * Q * x = 0), while a conic C is a contour line in 2D (actually a cone/plane intersection, like an ellipse) described by an implicit quadratic equation in IP^2 (x^T * C * x = 0). BIAS::Quadric3D is a 4x4 matrix, while BIAS::Conic2D C is a 3x3 matrix. Both entities are the same concept in different dimensions. Evaluating the above implicit equations, it is simple to check if the BIAS::HomgPoint2D (resp. 3D) x lies inside/on/outside the conic(resp. quadric) by evaluating the result's sign. Conics and quadrics are closely related to gaussian normal distributions (they actually encode iso-probability levels), e.g. BIAS::Quadric3D can easily be constructed from CovMatrix3x3, which represents a covariance matrix of a normal distribution. It is worth to know that pinhole cameras map quadrics to conics. See also ExampleConic.cpp
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image Components

Image Components

Image Components

The image class is divided in a Base class (BIAS::ImageBase) and a derived templated specialization BIAS::Image<>. In most cases you will instantiate objects of Image<PixelType>, as you know which kind of PixelType you will need, e.g. Image<unsigned char>.

The reasons for the division:

  • code division into seperate files

  • Functions which are independent of the actual pixel value should be implemented in ImageBase, that are functions which don't need to interpret a PixelValue, a good example is Flip().

  • Sometimes you don't know which kind of PixelType you have, e.g. when loading a image from disk, or if you want to change the pixeltype dynamically (very unusal), in those cases ImageBase comes in handy.

  • a templated class Iamge<> is easier to deal with in most cases, as a common Image class, which provides different pixel types via a class variable, as it would be with ImageBase only.

Dealing with image data:

A very important issue of the image class is to have fastest possible access to the image data and the possibility to modify the data as fast as possible. Therefore the image data is stored in a single 1D array, one row behind the other starting with the top row (most left pixel first). The fastest way to modify the data is to get the data pointer with GetImageData(), modify the pixel and increase the pointer until the end.

If random access to the pixel data is needed image.GetImageDataArray() should be used, as image.GetImageDataArray()[y] is the pointer to y-th row. image.GetImageDataArray()[y][x*ChannelCount+c] will result in the c-th channel of the pixel at image position (x,y), which is very fast for random access.

There are several functions which must only be applied to some part of the image, a so called ROI (region of interest). You can set such a ROI in an image object to tell filters and other functions only to work on that rectangular area. The upper left corner of the roi is (0,0) by default, it is also the upperleftmost pixel within the ROI, while the lower right corner is (Width, Height) by default. The lower right corner of the ROI does not lie within the ROI ! This seems unintuitive at first sight but simplifies work when dealing with expressions like SetROI(FilterMaskSize, GetWidth()-FilterMaskSize).

UID Concept

In order to identify an image within a sequence or when loading it several times from a disk we can assign a unique signature to each BIAS::Image, a so called UUID (universally unique identifier). We can then refer to the image itself or features of that image using the BIAS::UUID concept. In a somewhat human readable notation (string) this looks like
  • c6ba63b2-d4c8-11d8-94e5-000d610fdf38

while internally a BIAS::UUID is stored as a 128 bit value.

The BIAS::UUID is computed from the MAC address of the network adapter (which means "spatial uniqueness") and a high resolution timestamp providing "temporal uniqueness", it is NOT related to the image content in any way. When an image does not yet have a valid ID when writing it to disk, a UUID is generated and assign to that image. However, since the generation of a unique id is an operating system call, at first each UUID object is empty by default. Only when a new id is really needed, one must manually call the GenerateUUID function to create a new valid UUID. This typically needed once for each image, while the resulting id may be assigned to thousands of objects and entities referring to that image, for which we only need the copy constructor, not the OS call.

If an image is manipulated, e.g. scaled, drawn in, ..., you should assign a new id to it, so that the manipulated image wont be confused with the original one. For that reason BIAS::ImageConvert does NOT copy the id into the converted image. Of course the concept of a UUID is not restricted to an image, you can use it to identify anything you like.

MetaData

Additional information stored with each image is called a MetaDatum in the BIAS library. The mechanism provided by the BIAS::MetaData class and BIAS::Camera class should be used to handle these additional data. Meta datas are a basic component of the ImageBase class. In order to keep the dependencies of the ImageBase library small, it is not possible for the MetaData class to know about all the classes which might be stored in it. One might f.e. want to store a PMatrix as a meta datum with the image. Since the PMarix however is a memeber of the BIASGeomery library and the ImageBase library is not awary of the Geomery library, this is not possible in a straight forward way. In order to resolve this problem, only a pointer to the data (AppData::data) and the length of the expected data (AppData::length) are stored together with an identifier (AppData::tag) from the enumerator AppData::TAppData are stored in a class called AppData. This allows the storage of arbitrary data or classes while the structure of the data itself remains hidden to the Appdataclass and therfore also to the ImageBase library. Another advantage to this approach is the simplicity with which new meta data types can be introduced. All that needs to be done, is to amplify the identifier enumerator AppData::TAppData. The MetaData class itself now is derived from a vector of AppData and every ImageBase holds a pointer to a MetaData class. A number of convenient functions, like MetaData::Find, MetaData::Add and MetaData::Delete are made available by the MetaData class.

With the described aproach it is very simple to store data in a binary fassion. For simplicity, when handling AppData stored in strings, like in f.e. pgm images, the special identifier AppData::MD_USE_ASCXII exist. If this id is connected with a AppData, not the pointer to the data, but a string (AppData::sdata) and a special tag (AppData::stag) are used for storage. The tag AppData::MD_ASCII_DATA is deprecated and should not be used any longer. It will be removed in future versions of the library.

For a simple example on how to use the MetaData class in a very abstract way together with the ImageBase class see ExampleMetaData. For a more convenient way to use meta datas use our Camera class. See ?? and ExampleCamera for details.

Camera

The BIAS::Camera class is a convenient class for the work with additional information stored with each image in the BIAS::MetaData class.

In contrast to the ImageBase class, where the internal structure of the data stored in the MetaData class is not known, it is fully know in the Camera class. The Camera class now provides a convenient way of working with additional data belonging to images (f.e. PMatrix, TimeStamps, ...). Camera is derived from ImageBase (via Image<StorageType>) and all these additional classes, that can be stored in the MetaData class ar also members of the camera class. They can be easily accesed via Get and Set functions.

The two most important functions are: 1. Camera::ParseMetaData(): It extracts the information from the MetaData class and stores them into the member variables. It needs to be called after reading an image from disk. 2. Camera::UpdateMetaData(): It stores the information from the member variables into the MetaData class. It needs to be called before writing an image to disk.

See class documentation and ExampleCamera for details and example code.

Pyramid Image

gibt es 2x: Spezialisierung

Image Convert

(Friso)

ImageIO

(Felix) Load / Read / Import->Fremdformat, Dateiformat<->Endung <-> magic cookie

ImageDraw

(Felix)

BackwardMapping

For image undistortion, rectification, resampling and interpolation we have BIAS::BackwardMapping as a base class. It provides functions to run over the pixel coordinates of a target image, look at the relevant (subpixel) position in the source image and compute the (interpolated) color (software implementation). Backward mapping avoids unfilled areas which occur in forward mapping, where you would run over the source image. The idea is that BIAS::BackwardMapping should handle common tasks like interpolation, border handling, anti-aliasing and all general mapping problems, so you dont have to care about that or even reinvent it for every mapping class. Simply derive your special mapping class and fill the coordinate-map function (see BIAS::HomographyMapping).
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Introduction and Overview to BIAS

Introduction and Overview to BIAS

The Basic Image AlgorithmS C++ Library is the base for research at the Multimedia Information Processing Group at Kiel University, Germany.

This software is provided for free (LGPL), for details refer to the license conditions. BIAS is a set of C++ classes useful for real-time image processing and filtering, estimation of image- and camera-related quantities and geometric entities. Just to give you some keywords:

  • Image Operations, e.g. Filtering
  • Projection Matrix and Pose Estimation
  • 2D Feature Extraction and Tracking
  • Linear Estimation and Interpolation
  • Projective Geometry and Objects, e.g. Quadrics
  • ...

In Kiel BIAS is used as a base library for pose estimation, augmented reality, scene reconstruction, multi-view stereo, image-based rendering, camera-based car driver assistance and much more. A good way to start and to get an overview of what kind of classes BIAS provides is to have a look at the Modules section. You should also read the chapters from the main page.

Mailing List and Nightlybuild

There is a mailing list (DUMMY@mip.informatik.uni-kiel.de), where you can make suggestions, comments, ask questions or indicate new features of BIAS. Write to "bias" (instead of "DUMMY" in the above) if you want to publish something on the list. To subscribe, send a mail containing "subscribe" (without quotation marks) to "bias-request" (instead of "DUMMY"). To keep the library working, a nightlybuild is performed every night and any errors are reported to the BIAS mailing list. The nightly snapshots can be downloaded from our webserver.

Installation

CMake is used to build the library under linux or windows. As a quick start under linux, download and extract a tar.gz version of BIAS, then type in the BIAS main directory:
    cmake .
    make

Please read the installation/build section for further information, where you can also find a list of several (optional/mandatory) external packages.

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Math Components

Math Components

Math Components

Data Types

  • Matrix / Vector (LA) Generisch und fixed size, geklaut von TNT, Operatoren keine Klassen-members

Algorithms

In the MathAlgo directory there are several more generic mathematical algorithms like interpolation, matrix/equation system solver or robust estimation classes.
  • BIAS::SVD (Lapack) The singular value decomposition is a numerically robust way to handle noisy linear/least squares problems or to determine the rank of a matrix or an equation system. Since for numerical reasons there is no general Matrix.Invert, you should use SVD.Invert for large matrices.

  • Levenberg-Marquardt Minimization (wrapper to minpack, see Minpack.hh ) This is an implementation of the popular iterative minimization algorithm, which can basically be imagined as an extension of the Newton method for finding the zeros. There are several interfaces which all require you to provide an error function which is called by the main routine. This function must provide at least as many error measures as the number of variables you want to optimize.

  • BIAS::RANSAC (RAndom SAmple Consensus) This is an abstract implementation of the robust solver algorithm, which iteratively uses a non-robust base method (e.g. least squares or linear solution) to compute hypotheses on large data sets containing outliers. The best hypothesis in a probability-theoretic manner is chosen as the most probable solution and the data set is partitioned into inliers ans outliers. When deriving a specialized class from RANSAC, you have to implement the functions to compute a hypothesis from the samples, to evaluate the hypothesis and optionally to refine your solution based on the inliers to it.
  • BIAS::PolynomialSolve finds the (complex) zeros of a univariate polynomial
  • BIAS::Interpolation (Daniel ?)
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools

Tools

  • biasconvert: convert different color models and storage types of images
  • biasview(wx): view images
  • biasfilter: apply filters to images
  • biassetuid: write BIAS::UUID into image file(s)
  • biasextract: load image, parse meta data and output P, ID, orientation, .

..

  • biasdiff: calculates the absolute difference between two images
  • biasmerge: add meta data (PMatrix, ...) to image files
  • biasshowepi: show epipolar geometry for calibrated images
Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tracker

Tracker

Guide for the Impatient

If you just want to use the tracker you still need to know two important facts:
  • The tracker has an internal state, i.e. it holds pointers to the last images. So do not remove or overwrite images or gradient images before tracking is finished! It also holds an internal list of tracked points. It is hence not necessary to call a point manipulation function in every cycle.
  • The function Tracker::Track() is always called before any point manipulation functions.

Here is some pseudo code:

Param para;
Tracker<StorageType, CalculationType> tr(para, grp, "");
// two sets of images are needed for the tracker
PyramidImage<CalculationType> pim[2], gx[2], gy[2];
int act=0; // index into the actual image set
para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
tr.ParameterChanged(); // adapt tracker class to parameter

for every image do:
1. tr.PreparePyramide(im, pyim[act], gx[act], gy[act]);
2. tr.Track(pyim[act], gx[act], gy[act]);
3. If first image then tr.AddNumPoints(p, qual);
   If points need to be filled up then  tr.FillUpPoints(p, qual);
4. tr.GetPoints(p); // retrieve the point positions in actual image
5. act=!act; // toggle the set of used images

Point Manipulation Functions

A number of functions for manipulation of the internal data structures exist. The most commenly used beeing
  • AddPoints() to make the tracker initialy aware of points to track, and
  • FillUpPoints() to replace thge points for which tracking was not successfull.

Tracker Output

A number of results can be accesed which can be used to asses the correspondences:

  • GetNumIter() : Number of iterations used in the biggest pyramid level.
  • GetError() : Displacement from the last iteration in the biggest pyramid level.
  • GetResiduiMAD() : Mean absolute grey value difference (per pixel) between the image point and the newly found correspondence.
  • GetResiduiMSD() : Mean squared grey value difference (per pixel) between the image point and the newly found correspondence.
  • GetResults() : Integer indication success (=0) or reason of failure (<0) of the tracking process.
    • 0 : Success
    • -1 : Structure tensor could not be inverted, usually resulting from an attempt to track an homogenous image patch.
    • -2 : Point slid out of image.
    • -3 : Maximum number of iterations has been reached and the displacement calculated in any iteration step never dropped below MaxError
    • -4 : An input point lies outside of ROI.
    • -5 : The mean absolute grey value difference between the point and the newly found correspondence is above MaxResiduumMAD.
    • -6 : An input point lies at infinity.
    • -7 : The X86 outlier rejection rule classified this point as an outlier.

Tracker Parameter

  • TrackerType : The tracking algorithm used. Currently only TT_Simple and TT_Weighted are supported. TT_Simple is better tested.
  • RejectionType : The outlier rejection which is used after the tracking. Currently only RT_MAD and RT_X86 are supported.
  • GradientType : The gradient class which is used to calculate the image gradients in PreparePyramide(). See AddGradientType() in FilterBase.hh for details.
  • LowPassType : The low pass class which is used to filter the images in PreparePyramide(). See AddLowPassType() in FilterBase.hh for details.
  • PyIndex : Tracking is done starting with the smallest image in pyramid succesive using bigger images up to PyIndex. If PyIndex==0 then all images in the pyramid are used. Not very well tested.
  • HalfWinSize : Vector determining the tracking window size for every pyramid level. The first entry corresponds to the biggest image. If the length of the vector is bigger than the size of the pyramid, than only the first entries are used.
  • MaxError : Vector containing the error boundary at which the iteration is aborted for each pyramid level. The iteration is aborted when the displacement resulting from the linearizartion at the current iteration step falls below MaxError.
  • MaxIter : Vector containing the maximum number of allowed iterations for each pyramid level. The iteration is aborted if MaxIter iterations are reached.
  • MinBorderDist : The minimum distance of points from the image border in the biggest pyramid level. It is only used in feature manipulation functions. If set smartly, it can save uneccesary computations of image points which cannot be tracked due to the border problems in the smaller pyramid images.
  • MaxFeatures : Maximum number of features which are tracked. This parameter detrmines the size of the internal memory.

Class Hirarchy

Two niveaus of tracking classes exist:
  • The base classes just compute correspondences between two images without internal state and pyramid image usage.
  • The higher level class Tracker uses an instance of a base class to compute correspondences. It has an internal state and makes use of pyramid images.

TrackerBase TrackerBase

The TrackerBase class computes image point correspondences between two images. They do not have an internal state and do not use pyramid images. It can handle different tracking and outlier rejection algorithms based on parametrization:
  • Tracking:
    • TT_Simple: The most simple implementation of the symmetric gradient descent approach after Stan Birchfeld "Derivation of Kanade-Lucas-Tomasi Tracking Equation". This is the algorithm which is tested best.
    • TT_Weighted: A weighting function is additionaly implemented when solving the linearized equation during the tracking process. All points in the tracking window are weighted with their exponential distance from the tracking window center. This algorithm hasn't been used much and is hence not very thoroughly tested.
  • Rejection:
    • RT_MAD: A simple outlier rejection algorithm based on the mean absolute grey value difference between the two images in the tracking window. A point correspondence is rejected if the MAD residuum is above a user given (parameter) threshold.
    • RT_X86: The X86 outlier rejection rule as suggested by Tommansini, Fusiello and Roberto "Robust Feature Tracking", CVPR 1998. It basically calculates the median $ m $ of the mean squared grey value differences (MSD) (this is similar to calculating the mean residuum) and the median difference $ m_d $ of the MSD value from $ m $ (this is similar to calculating the variance or the standard deviation). Point correspondences are rejected if their MSD value is above $ 5.2 * m_d$ . In contrast to the implementation of Tommasini, the measn squared residui are used instead of the sum of squared grey value differences.

Tracker Class

This is a convenient class for the tracking functionality. It can be used very easily, even though two footangles exist:
  1. The tracker has an internal state, i.e. it holds pointers to the last images. So do not remove or overwrite images or gradient images before tracking is finished! It also holds an internal list of tracked points. It is hence not necessary to call a point manipulation function in every cycle.
  2. The function Tracker::Track() is always called before any point manipulation functions.

TOBEDOBEDONE

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils

Utils

Parameter, Ground Truth Data, GUI, 3D-Out

  • Parameter
  • Ground Truth Data
  • GUI
  • 3D-Out

Parameter Handling

Typical applications often use lots of paramteres to control the algorithms. The class BIAS::Param can unify parameter handling accross classes, libraries and applications. The basic idea is to have one instance of class BIAS::Param per application to store all parameters and let all libraries and algorithmic classes uses this instance. Class BIAS::Param can read and write parameters from and to files and can parse command line parameters. The application and the algorithms can access parameters by their name or can keep pointers to the parameter data. There are the following seven parameter types: Integer, Boolean, String, Double, Vector of Double, Vector of Integer, Enumeration. A parameter can be added with BIAS::Param::AddParam*(), it needs at least the parameter name and accepts additional arguments: A Help-String to describe the parameter, a default-value and depending on the type things like Min-Max values.

The methods BIAS::Param::AddParam*() always return the pointer where the data of the parameter is stored, such that the application can acces it without any latency. An alternative way of getting a parameter value is to ask with BIAS::Param::GetParam*(name). but the name-lookup always takes some time.

If a class "A" deep into a library has some parameters to be handled, the best way is to implement a method A::RegisterParameters(BIAS::Param &p) for this class, so that it does not need an own instance of Param but can use a foreign instance. When writing an application using this class "A", the application should create an instance of Param, call A::RegisterParameters(). Then it should call BIAS::Param::ParseCommandLine().

BIAS::Param::ParseCommandLine() starts by parsing argc and argv, if it reads a commandline argument "--readconfig <file>" it reads the configuration file and parses argv again, to ensure that commandline arguments override arguments from files. The array argv is permutated such that all optinal (with "--" or "-" and associated data) arguments preceed al non-optionsl arguments. The return value of ParseCommandLine() is the index into argv pointing to the first non-optional argument (see "man 3 getopt_log" for details). If an options "--writeconfig <file>" is found, after parsing and reading the curent content of the object is written in the file.

The class BAIS::ParamGUI is derived from BIAS::Param and adds GUI elements to let the user change parameters interactively. To help layout the controls automatically , parameters can be sorted in groups. BAIS::ParamGUI is based on wxWidgets and support mainly three different levels of integration. With BIAS::ParamGUI::GetPanel(), one wxPanel containing the controls of one group is returned to let the programmer integrate the panel on its own. BIAS::ParamGUI::GetNoteBook() returns a wxNoteBook containing pages or panels for each group of parameters. The method BIAS::ParamGUI::GetFrame() opens up a window containing the notebook.

When the user changes a parameter, the application has to be informed immediatly to react properly. This can be realized with callbacks. Each class which expects callback must be derived from BIAS::ParamCallbackInterface and implement a method called: BIAS::ParamCallbackInterface::ParameterChanged(name, void *value). The instance of BIAS::Param or BIAS::ParamGUI then has to be informed to used it for a given parameter with BIAS::Param::RegisterCallbackObject(name, class *MyAlgorithm).

Synthetic Data / Ground Truth

Felix ?

  • GenSynthMatches, GenGroundTruth (deprecated)

Image Windows

For the ease of use, BIAS has some simple GUI components to display images. Two different widget set have been used for this purpose: GTK and wxWidgets. Due ot its portability, wxWindows is prefered will be supported in future. The GTK support may be dropped some day. Assuming that a programmer writes a console application dealing with images and want to display one image for debugging purpose. Then he can use one of the classes BIAS::GuiGTK or BIAS::GuiWX. They are both derived from BIAS::GuiBase and have the same API. After instantiation, one can call BIAS::GuiBase::ShowImage() and a simple window will appear showing the image. For images not in RGB color mode proper color conversion is performed automatically. Some more methods exist to modify the title bar or close the window.

For programming wxWidget applications, three other classes are provided: BIAS::ImageCanvas, BIAS::ScrolledImageCanvas and BIAS::ImageCanvasEnhanced. They only provide a canvas which has to be embedded into a frame. Both canvases can dispplay images eventually using scrollbars, can generate extra-windows with magnifications (right-click), display some status information in the statusbar and can also display images from storagetype float with changeable scale. BIAS::ImageCanvasEnhanced has support to select regions in the image.

3D-out (ThreeDOut)

The class BIAS::ThreeDOut provides unified output interfaces for 3D visualization of geometric objects, such as points, lines, ellipsoids,... and also cameras with different drawing styles and colors. Simply create a ThreeDOut object T in your application and call the relevant Add-function, e.g. T.AddPoint(X) to add the point X to your 3D world. After having added everything, you can call T.VRMLOut(filename) or T.GLOut() (other interfaces may follow) to write to a file or a GL context. It is also possible to update/remove previously added entities. However, we want to keep everything simple here for fast visualization. If you want to do more sophisticated things (e.g. comlex scene rendering)), you should try out OpenSG or something like that.
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Deprecated List

Deprecated List

Class biasview
biasview was replaced by biasviewwx This tool is DEPRECATED. Pleas eus ebiasviewwx instead.
Author:
woelk/evers 2001-2004

Member BIAS::ImageIO::ExportImlib (const std::string &c_filename, BIAS::ImageBase &img, enum TFileFormat FileFormat, bool sync=BIAS_DEFAULT_SYNC, int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Deprecated, ExportMagickPP is succesor. (jw) !!!

Member BIAS::ImageIO::ImportImlib (const std::string &filename, ImageBase &result, bool assumeGrey=false)
Deprecated, ImportMagickPP is succesor. (jw) !!!

Member BIAS::Quaternion::GetRotationMatrix (RMatrixBase &R) const
Transpose problem !!! This function is going to be removed Use RMatrixBase::SetFromQuaternion instead.
Author:
grest
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Todo List

Todo List

Member BIAS::ImageBase::Cut2ROI ()
Make it work on colored Images

Member BIAS::ImageBase::PadToPowerOfTwoAndFlip (const int &padVal=0)
more efficient in place with memmove
Author:
Jan Woetzel

Member BIAS::ImageBase::PadToPowerOfTwoAndFlip (const int &padVal=0)
replace with linewise memmov

Member BIAS::CornerDetectorBase::_NumTilesX
implement tiling mechanism

Member BIAS::CornerDetectorFoerstner::_ComputeCornerness (Image< CalculationType > &im)
optimize for ROI usage

Member BIAS::CornerDetectorFoerstner::_ComputeCornerness (Image< CalculationType > &im)
use ROI instead of border=2

Member BIAS::CornerDetectorHarris::_ComputeCornerness (Image< CalculationType > &Cornerness)
optimize for ROI usage

Member BIAS::CornerDetectorHarris::_ComputeCornerness (Image< CalculationType > &Cornerness)
use ROI instead of border=2

Class BIAS::EMatrix
create connection to Base/Geometry/EMatrix

Member BIAS::FMatrixBase::GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
optimze

Member BIAS::EMatrixBase::GetCosAngleErrorHomogenized (const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2)
optimze

Class BIAS::FFT2D< InputStorageType, OutputStorageType >
FFT2D needs a complete rewrite because the interface concept is wrong. (JW)

Member BIAS::FFT2D::Normalize (Image< OutputStorageType > &dst)
fix the cast by explicit template JW

Member BIAS::FFT2D_Tiles::FFT2D_Tiles ()
remove FFT2D_Tiles or really implement it. (JW)

Class BIAS::FMatrixBase
-better inherit from a virtual base class Matrix3x3FixedSize

Member BIAS::GradientGaussAsymmetric::_CalculateKernels (double Sigma, double Ratio)
check if this is a proper filter mask in the sense of convolution -> reflection at center. We might have introduced an inconsistency here when switching to generic convolution.

Member BIAS::Histogram::SetFactor (unsigned short Factor)
factor also scales the y axis, this is most probably not desired

Class BIAS::ImageAttributes
Add Image Attributes write functionality to write meta data directly to images EXIF Tags, comments etc.

Member BIAS::ImageConvert::BIAS2ipl (const Image< StorageType > &source, IplImage *&dest)
ROIs are not yet kept, when converted to IplImages
Author:
Ingo Thomsen 04.05.2002, Jan Woetzel 2005

Member BIAS::ImageConvert::Ipl2BIAS (IplImage *source, Image< StorageType > &dest)
Make it work for colored images

Make it work for ROIs

Member BIAS::ImageConvert::ToInterleaved (Image< StorageType > &source, Image< StorageType > &dest)
make it work for yuv

Member BIAS::ImageIO::ExportMagickPP (const std::string &FileName, const ImageBase &img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false)
Implement 16bit short write with Magick++ using BLOB.

Implement quality directive for jpg saving with Magick++.

Member BIAS::ImageIO::ImportMagickPP (const std::string &FileName, ImageBase &result, const bool &dummy=false, const bool &readMetaData=true)
fix the error on reading reference streaming in Metadata operator>> e.g. on loading ibak "M34/Front/image00000000.jpg" (jw)
Author:
jw and woelk 12/2004

Member BIAS::ImageIO::ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
Implement assumeGrey for MagickPP like for Imlib (JW).

Member BIAS::ImageIO::ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
rewrite by making more use of type Image<..> instead of ImageBase because lossless conversions and warnings for unwanted lossy conversions are easier, then (JW).
Author:
Jan Woetzel 10/2004
add more knowledge about conversion and the option of errors if requested and read type don't match (JW). check if at least StorageType and bit depth match:

Member BIAS::ImageIO::ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
TODO HACK add dynamic cast test for templated Image<> to convert loaded float imaeg automatically to uc etc.. (JW)

Member BIAS::ImageIO::ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
handle conversion in extra routine with extra warnings in case of scaling or lossy conversion. -Add a 'normalized scale' per conversion for each Storagetype. -Add a flag to return errors instead of run-time warning. (discussion 26.Oct.2004) (JW)

Member BIAS::ImageIO::ImportMagickPPAutoconvert (const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
float and double pixel are 0..1 normalized range in ImageMagick++. Min, max meta data required (JW)

Member BIAS::ImageIO::ImportRADIANCE (const std::string &FileName, ImageBase &result)
: decode the runlength encode line, map the RGBE to float or do it in ColorConverion?

Member BIAS::LinearRegionDetector::_ComputeCornerness (Image< CalculationType > &im)
optimize for ROI usage

Member BIAS::Matrix3x3::LoadBogRC (const std::string &filename)
what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW

Member BIAS::Mean::FilterMean2x2 (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
support for ROI is still missing.
Author:
woelk 01/2003

Class BIAS::Median< InputStorageType, OutputStorageType >
reanimate this class using filter interface

Member BIAS::Param::ParseCommandLine (int &argc, char *argv[])
document concept of return value of ParseCommandLine Reads parameter from file if argument --readconfig is given.
Author:
evers

Member BIAS::PMatrix::GetFieldOfViewY (const unsigned int dimX, const unsigned int dimY, const bool &compY=true)
not in general correct impl. !!! the principal may converge the view -> what is the field of view? (JW 09/2003)

Member BIAS::PMatrix::GetPseudoInverse (BIAS::Matrix< double > &Pinv)
5 different Back-Project-Funktions, "Please cleanup" (evers 2004-11-29)

Member BIAS::PMatrixEstimation::ComputeFromFQuasiEuklid (BIAS::FMatrix &F, double BaselineMagnitude, BIAS::PMatrix &P1, BIAS::PMatrix &P2)
dirty hack: set global variables, which are accessible in error function called from fortran-powell this is not thread-safe ! ***

Class BIAS::RegionMatcher
check if all klt code has been moved to new filter2 structure
Author:
fw

Member BIAS::Rescale::DownsampleBPoT (const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination)
warning kerneltype here

Member BIAS::Rescale::DownsampleBy4Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
warning kerneltype sum needed here

Member BIAS::Rescale::DownsampleBy4Grey (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
warning kerneltype div needed here

Member BIAS::RMatrixBase::SetFromHV (const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xh, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &vy)
check, wether xxx, yyy are linear independant.

Class BIAS::ROI
TODO change ROI memebr in ImageBase to pointer to: -share a ROI between multiple images, in particular "mask type" region of interest, -save memory for mask -avoid operator calls if ROI unused -drop MaskWidth_ and MaskHeight_ and replace it by src image access functions to src imaeg size -ideally drop mask array in ROI and replace it ba a one channel Image<bool>/Image<unsigned char>=""> -... (JW 09/2005, started majo chaneg but rolle dback due to problems in automatically initializing Mask size without a pointer t reference image.

Member BIAS::ScaledImageCanvas::UpdateScaleOffset ()
: write ofsfet and scale to StatusText instead of cout (JW)

Member BIAS::StructureTensor::CalcStructureTensor (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
implement CalcStructureTensor for other border handling than valid
Author:
woelk 09/2004

Member BIAS::StructureTensor::CalcStructureTensor7x7 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
make it really fast
Author:
woelk 09/2004

Member BIAS::StructureTensor::CalcStructureTensorValid (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy)
implement separated summation.
Author:
woelk 09/2004

Member BIAS::StructureTensor::Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
implement StructureTensor
Author:
woelk 09/2004

Member BIAS::ThreeDOut::AddPMatrix (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
the scale of the camera should be a (dynamic) visualization option, not a parameter of the add function
Author:
woelk 01/2004

Member BIAS::ThreeDOut::OpenGLOutImages (const bool &disableBlending=true)
: This implementation is very inefficient because it recreates the textures for each rendering pass! JW

Member BIAS::ThreeDOut::OpenGLOutImages (const bool &disableBlending=true)
image interface (rgb<=>grey)

Member BIAS::ThreeDOut::OpenGLOutImages (const bool &disableBlending=true)
It is very inefficient to recreate image on each call (jw)

Member BIAS::ThreeDOut::OpenGLOutLines ()
linedrawingstyle=dashed not implmented

Class BIAS::TrackerBase< StorageType >
Implement DLL - add lost of missing explicit instantiations (JW)

Member BIAS::TrackerBase::TrackAffine_ (KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true)
really compute cov with svd ???, conceptual problem: where to compute residui, where covariance ???

Member BIAS::TrackerBaseAffine::TrackAffine_ (KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true)
really compute cov with svd ???, conceptual problem: where to compute residui, where covariance ???

Class BIAS::TrackerBaseInterface< StorageType >
Implement DLL - add lost of missing explicit instantiations (JW)

Class BIAS::UUID
The UUID representation is *not* platform independant, in particular generating a consecutive ID on Windows and reading it on Linux will not work! (JW)

Class BIAS::UUIDsortAscending
operator< of UUD may be inverse, TOOD: compare uuid_compare on Linux and WIN32.
Author:
Jan Woetzel

Class BIAS::VideoSource_DCAM
does not work with libdc1394_control version 9.0.0 (on ana3, Suse 8.2) but works on 9.0.3 (saale, Suse 9.1) aposor, jw 10.2004

double check Bayer Scorpion ToRGB (JW)

Win32 port by common parent class (JW)

implement a generic SetBestVideoFormat function, trying avalable format/mode/rate combinations (JW) like on WIN32.

Class BIAS::XMLIO
CMake TRYCOMPILE() for XML2 version under WIN32 (evers 2004-10-14)

Class BIAS::ZoomImageCanvas
Create a common base class for ImageCnvas and ImageCanvasGL and derive both classes from it (JW)
Author:
woelk

Member DEFAULT_LEADING_ZEROS
: correct handling of Win32 SAMBA paths including \machine\....
Author:
Jan Woetzel 02/2005

Member BIAS::SplitName (const std::string &fullname, std::string &dir, std::string &base, std::string &suffix)
: Extract machine name or IP for SMB network shares for WIN32, e.g. \machine and fix backslashes on Win32.
Author:
Jan Woetzel 03/2005

Member BIASABORT
: call MIP::biasabort instead of abort - but this introduces one library dependency.
Author:
Jan Woetzel

Member BIASLOG
it is bad style to disable a warning in a header because of the side effects- but it is hard to avoid in a macro... implement BIAS_LOG_FATALwith one parameter in addition to BIAS_LOG(msg, BIAS_LOG_FATAL) (jw)

Member FRAME_DEFAULT_SIZE
implement command line switch to terminate biasviewwx automatically with useful return code for dart ADD_TEST to be able to test biasvviewwx run in nightly cmake Dart dashboard (JW)

Namespace BIAS
Avoid inclusion of Magick++ header and use forward declaration here to be able to output runtime error on usage (JW).

Page Building BIAS, required/optional packages
prefix all *HAVE* and *USE* flags with BIAS_ to be unique with the benefit that "GenerateConfigheader" will not be required anymore. (JW 11/2005)

Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Bug List

Bug List

Member BIAS::Image::GetMinMaxPixelValue (StorageType &min, StorageType &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const
NULL pointer exception occurs, here (e.g. in fuse) JW

Class BIAS::CornerDetectorHarris< StorageType, CalculationType >
CalculationType int does not work, use float
Author:
koeser 09/2004

Member BIAS::ImageDraw::Line (Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType color[], const float thickness)
This routine is a HACK and incorrect. A generela "solid fill by 4 given corners" algorithm has to be used or a Bresenham with eps=thckness/2.
Parameters:
Value | the line color.
thickness | of the line in pixel (perpendicualr to the direction).
Author:
Jan Woetzel 01/2005 DEPRECATED by JW 2005/08/09, replaced by OpenCV routine call.

Member BIAS::ImageIO::ExportMagickPP (const std::string &FileName, const ImageBase &img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false)
IMageMagick PPM files are alwyas written as ASCII instaed of binary (JW)
Returns:
0 in case of succes, negative value in case of error.
Parameters:
FileName | the input filename to read from.
img | contains the image to be written to disk.
quality | for saving, e.g.1-100 for jpeg, tested for jpeg. Is overridden by losslessMode parameter
writeMetaData | try to write ASCII MetaData as comment to file.
forceBinaryPNMformat | true to write BINARY pnm/pbm/pgmp/ppm instead of human readable ASCII.
losslesMode | true to write in jpeg loslles mode. overrides quality setting
writeGZipped | true for additional gzip compression (e.g. .pgm.gz) which may be useful for human readable ASCII pgm output but save disk space.

Member BIAS::ImageIO::ImportRAWwithHeader (const std::string &filename, BIAS::ImageBase &img)
Reading teh data on Linux is broken because fopen ignores teh binary flag, see "man fopen".

Member BIAS::ParamGUIPanel::OnTextEnter (wxCommandEvent &event)
here a bit SetFromStrng()!!

Member BIAS::ParamGUIPanel::OnTextEnter (wxCommandEvent &event)
here a bit SetFromStrng()!!

Member BIAS::SVD::Solve (const Vector< double > &y) const
bug in this function (woelk)

Member BIAS::SVD3x3::SVD3x3 (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
does not always converge when general svd does

Member BIAS::SVD3x3::Compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
does not always converge when general svd does
Author:
woelk 07/2004

Member BIAS::operator>> (std::istream &is, BIAS::ImageBase &img)
fake reading of uuid because of bug, id is DISABLED !
Generated on Wed Jun 21 19:06:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Graphical Class Hierarchy

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Basic Image AlgorithmS Library Graphical Class Hierarchy

Go to the textual class hierarchy

Generated on Wed Jun 21 19:13:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/_wx_intellisense.h Source File

Gui

_wx_intellisense.h

Go to the documentation of this file.
00001 //This file is required to make intellisnes command completion work
00002 //on WIN32 with Visual Studio and WX.
00003 //It shouldl *NOT* be included in source or header files,
00004 //it just needs to be parsed by Visual studio to create a more sophisticated .ncb file.
00005 //Jan Woetzel
00006
00007 #error You should not include _wx_intellisense anywhere in your code!
00008
00009
00010 #define WXDLLEXPORT
00011 #define WXEXPORT
00012 #define wxUSE_GUI 1
00013 #define wxUSE_MSGDLG 1
00014 #define __WXMSW__ 1
00015
00016 #undef wxWindow
00017 class wxWindow:public wxWindowMSW{};
00018
00019 #include "wx/confbase.h"
00020 #include "wx/config.h"
00021
00022 #include "wx/gdicmn.h"
00023 #include "wx/datetime.h"
00024
00025 //#include "wx/msw/accel.h"
00026 #include "wx/app.h"
00027 #include "wx/msw/app.h"
00028 #include "wx/msw/bitmap.h"
00029 //#include "wx/msw/bmpbuttn.h"
00030 //#include "wx/msw/brush.h"
00031 #include "wx/button.h"
00032 #include "wx/msw/button.h"
00033 #include "wx/msw/caret.h"
00034 #include "wx/ctrlsub.h"
00035 #include "wx/checkbox.h"
00036 #include "wx/msw/checkbox.h"
00037 #include "wx/msw/checklst.h"
00038 #include "wx/choice.h"
00039 #include "wx/msw/choice.h"
00040 //#include "wx/msw/clipbrd.h"
00041 //#include "wx/msw/colordlg.h"
00042 #include "wx/msw/colour.h"
00043 #include "wx/combobox.h"
00044 #include "wx/msw/combobox.h"
00045 #include "wx/control.h"
00046 #include "wx/msw/control.h"
00047 //#include "wx/msw/ctl3d.h"
00048 //#include "wx/msw/cursor.h"
00049 #include "wx/dc.h"
00050 #include "wx/msw/dc.h"
00051 #include "wx/dcclient.h"
00052 #include "wx/msw/dcclient.h"
00053 #include "wx/dcmemory.h"
00054 #include "wx/msw/dcmemory.h"
00055 //#include "wx/msw/dcprint.h"
00056 //#include "wx/msw/dcscreen.h"
00057 #include "wx/msw/dde.h"
00058 #include "wx/msw/dialog.h"
00059 #include "wx/msw/dib.h"
00060 #include "wx/msw/dirdlg.h"
00061 //#include "wx/msw/display.h"
00062 #include "wx/msw/dragimag.h"
00063 #include "wx/msw/enhmeta.h"
00064 //#include "wx/msw/fdrepdlg.h"
00065 #include "wx/msw/filedlg.h"
00066 #include "wx/confbase.h"
00067 #include "wx/fileconf.h"
00068 //#include "wx/msw/font.h"
00069 //#include "wx/msw/fontdlg.h"
00070 //#include "wx/msw/fontenum.h"
00071 #include "wx/toplevel.h"
00072 #include "wx/msw/toplevel.h"
00073
00074 class wxTopLevelWindowNative:public wxTopLevelWindowMSW{};
00075 class wxTopLevelWindow:public wxTopLevelWindowMSW{};
00076
00077 #include "wx/frame.h"
00078 #include "wx/msw/frame.h"
00079
00080 //#include "wx/msw/gauge95.h"
00081 //#include "wx/msw/gccpriv.h"
00082 //#include "wx/msw/gdiimage.h"
00083 //#include "wx/msw/gdiobj.h"
00084 //#include "wx/msw/glcanvas.h"
00085 //#include "wx/msw/extra.h"
00086 //#include "wx/msw/gl.h"
00087 //#include "wx/msw/glaux.h"
00088 //#include "wx/msw/glu.h"
00089 //#include "wx/msw/sql.h"
00090 //#include "wx/msw/sqlext.h"
00091 //#include "wx/msw/sqltypes.h"
00092 //#include "wx/msw/winresrc.h"
00093 //#include "wx/msw/gsockmsw.h"
00094 //#include "wx/msw/helpbest.h"
00095 //#include "wx/msw/helpchm.h"
00096 //#include "wx/msw/helpwin.h"
00097 #include "wx/msw/icon.h"
00098 #include "wx/msw/imaglist.h"
00099 #include "wx/msw/iniconf.h"
00100 #include "wx/msw/joystick.h"
00101 #include "wx/msw/listbox.h"
00102 #include "wx/msw/listctrl.h"
00103 #include "wx/msw/mdi.h"
00104 #include "wx/menu.h"
00105 #include "wx/msw/menu.h"
00106 #include "wx/msw/menuitem.h"
00107 #include "wx/msw/metafile.h"
00108 #include "wx/msw/microwin.h"
00109 #include "wx/msw/mimetype.h"
00110 #include "wx/minifram.h"
00111 #include "wx/msw/minifram.h"
00112 #include "wx/msw/missing.h"
00113
00114 #include "wx/msgdlg.h"
00115 #include "wx/msw/msgdlg.h"
00116
00117 #include "wx/msw/mslu.h"
00118 #include "wx/msw/msvcrt.h"
00119 #include "wx/msw/notebook.h"
00120 #include "wx/msw/access.h"
00121 #include "wx/msw/automtn.h"
00122 #include "wx/msw/dataform.h"
00123 #include "wx/msw/dataobj.h"
00124 #include "wx/msw/dataobj2.h"
00125 #include "wx/msw/dropsrc.h"
00126 #include "wx/msw/droptgt.h"
00127 #include "wx/msw/oleutils.h"
00128 #include "wx/msw/uuid.h"
00129 #include "wx/msw/palette.h"
00130 #include "wx/msw/pen.h"
00131 #include "wx/msw/popupwin.h"
00132 //#include "wx/msw/printdlg.h"
00133 //#include "wx/msw/printwin.h"
00134 #include "wx/msw/private.h"
00135 #include "wx/msw/radiobox.h"
00136 #include "wx/msw/radiobut.h"
00137 #include "wx/msw/regconf.h"
00138 #include "wx/msw/region.h"
00139 #include "wx/msw/registry.h"
00140 #include "wx/generic/scrolwin.h"
00141 #include "wx/scrolwin.h"
00142 class wxScrolledWindow:public wxGenericScrolledWindow{};
00143
00144 #include "wx/msw/scrolbar.h"
00145 #include "wx/msw/setup.h"
00146 //#include "wx/msw/setup0.h"
00147 //#include "wx/msw/setup_microwin.h"
00148 #include "wx/msw/slider95.h"
00149 #include "wx/msw/slidrmsw.h"
00150 #include "wx/msw/spinbutt.h"
00151 #include "wx/msw/spinctrl.h"
00152 #include "wx/msw/statbmp.h"
00153 #include "wx/msw/statbox.h"
00154 #include "wx/msw/statbr95.h"
00155 #include "wx/msw/statline.h"
00156 #include "wx/stattext.h"
00157 #include "wx/msw/stattext.h"
00158 #include "wx/msw/tabctrl.h"
00159 #include "wx/msw/taskbar.h"
00160 #include "wx/msw/tbar95.h"
00161 #include "wx/msw/tbarmsw.h"
00162 #include "wx/msw/textctrl.h"
00163 #include "wx/msw/tglbtn.h"
00164 #include "wx/timer.h"
00165 #include "wx/msw/timer.h"
00166 #include "wx/msw/tooltip.h"
00167 #include "wx/msw/treectrl.h"
00168 #include "wx/msw/wave.h"
00169 #include "wx/msw/gdiobj.h"
00170 #include "wx/msw/missing.h"
00171 #include "wx/msw/setup.h"
00172 #include "wx/window.h"
00173 #include "wx/msw/window.h"
00174 #include "wx/msw/winundef.h"
00175 #include "wx/sizer.h"
00176
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/AffineTransf.cpp Source File

Base » Geometry

AffineTransf.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "AffineTransf.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 AffineTransf::AffineTransf() :
00032   Matrix3x4<double>(), R_(), C_()
00033 {}
00034
00035 AffineTransf::~AffineTransf()
00036 {}
00037
00038 HomgPoint3D AffineTransf::operator*(HomgPoint3D& argv)
00039 {
00040   HomgPoint3D res;
00041   Mult(argv, res);
00042   return res;
00043 }
00044
00045 void
00046 AffineTransf::Mult(Vector4<double>& argv, Vector4<double>& destv)
00047 {
00048   destv[0] =
00049     v_[0] * argv[0]
00050     +v_[1] * argv[1]
00051     +v_[2] * argv[2]
00052     +v_[3] * argv[3];
00053   destv[1] =
00054     v_[4] * argv[0]
00055     +v_[5] * argv[1]
00056     +v_[6] * argv[2]
00057     +v_[7] * argv[3];
00058   destv[2] =
00059     v_[8]  * argv[0]
00060     +v_[9]  * argv[1]
00061     +v_[10] * argv[2]
00062     +v_[11] * argv[3];
00063   // fake last row, affine transf has normaly size 4x4
00064   destv[3] = argv[3];
00065 }
00066
00067 AffineTransf&
00068 AffineTransf::operator=(const AffineTransf& arg)
00069 {
00070   double *p = arg.GetData();
00071   memcpy(v_, p, 12*sizeof(double));
00072   R_ = arg.GetR();
00073   C_ = arg.GetC();
00074   return *this;
00075 }
00076
00077
00078 void
00079 AffineTransf::SetAsRotationMatrix(Matrix3x3<double>& R)
00080 {
00081   double *p = R.GetData();
00082   v_[0] = p[0]; v_[1] = p[1]; v_[2] = p[2];
00083   v_[4] = p[3]; v_[5] = p[4]; v_[6] = p[5];
00084   v_[8] = p[6]; v_[9] = p[7]; v_[10] = p[8];
00085   v_[3] = v_[7] = v_[11] = 0.0;
00086 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/AffineTransf.hh Source File

Base » Geometry

AffineTransf.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __AFFINETRANSFORMATION_HH__
00027 #define __AFFINETRANSFORMATION_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Math/Matrix3x4.hh>
00031 #include <Base/Math/Matrix3x3.hh>
00032 #include "HomgPoint3D.hh"
00033 #include "RMatrixBase.hh"
00034
00035 namespace BIAS{
00036   /** @class AffineTransf
00037       @ingroup g_geometry
00038       last line of an affine transformation in 3d space is always 0 0 0 1
00039       and can therefor be droped from this class
00040       for this reason it is necessairy to overload certain operators
00041       and functions e.g. *, Mult, ...
00042   */
00043   class BIASGeometryBase_EXPORT AffineTransf : public Matrix3x4<double>
00044   {
00045   public:
00046     AffineTransf();
00047
00048     ~AffineTransf();
00049
00050     inline RMatrixBase GetR() const
00051     { return R_; };
00052
00053     inline Vector3<double> GetC() const
00054     { return C_; };
00055
00056     HomgPoint3D operator*(HomgPoint3D& argv);
00057
00058     /** args must be of type Vector4<double> because this should work
00059         not only for HomgPoint3D but  also for HomPLane3D, ... */
00060     void Mult(Vector4<double>& argv, Vector4<double>& destv);
00061
00062     AffineTransf& operator=(const AffineTransf& arg);
00063
00064     void SetAsRotationMatrix(Matrix3x3<double>& R);
00065
00066   protected:
00067     RMatrixBase R_;
00068     Vector3<double> C_;
00069   };
00070
00071 } // namespace BIAS
00072 #endif // __AFFINETRANSFORMATION_HH__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/BackwardMapping.cpp Source File

Image

BackwardMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "BackwardMapping.hh"
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Geometry/HomgPoint2D.hh>
00030 #include <limits>
00031 #include <Base/Common/BIASpragma.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 namespace BIAS {
00037
00038 // (1.0/log(2.0));
00039 #define ONE_OVER_LOG2 1.442695
00040
00041 template <class InputStorageType, class OutputStorageType>
00042 int BackwardMapping<InputStorageType, OutputStorageType>::
00043 GetSourceCoordinates_(const HomgPoint2D& sink,
00044                       HomgPoint2D& source) const
00045 {
00046   BIASERR("you have to implement derived class function !");
00047   // for instance, if you simply want to magnify your source image by 2 do a:
00048   source = sink * 0.5;
00049   BIASABORT;
00050   return -1;
00051 }
00052
00053 template <class InputStorageType, class OutputStorageType>
00054 int BackwardMapping<InputStorageType, OutputStorageType>::
00055 GetJacobian_(const HomgPoint2D& sink, Matrix2x2<double>& Jacobian) const
00056 {
00057   // numerical approximatioin of jacobian
00058   // compute mapped points for 4-neighborhood
00059   // this is actually a very good way for the jacobian approximation
00060   // since we use is exactly for the step size which we assumed for
00061   // computation
00062
00063   HomgPoint2D source_left, source_right, source_up, source_down;
00064   HomgPoint2D locsink = sink;
00065   locsink[0] -= 0.5;
00066   if (GetSourceCoordinates_(locsink, source_left)) return -1;
00067   locsink[0] += 1.0;
00068   if (GetSourceCoordinates_(locsink, source_right)) return -1;
00069   locsink[0] -= 0.5;
00070   locsink[1] -= 0.5;
00071   if (GetSourceCoordinates_(locsink, source_up)) return -1;
00072   locsink[1] += 1.0;
00073   if (GetSourceCoordinates_(locsink, source_down)) return -1;
00074
00075   // difference vectors are rows of jacobian
00076   Jacobian[0][0] = source_right[0] - source_left[0];
00077   Jacobian[1][0] = source_right[1] - source_left[1];
00078   Jacobian[0][1] = source_down[0]  - source_up[0];
00079   Jacobian[1][1] = source_down[1]  - source_up[1];
00080   return 0;
00081 }
00082
00083
00084 template <class InputStorageType, class OutputStorageType>
00085 void BackwardMapping<InputStorageType, OutputStorageType>::
00086 UpdatePyramidSize(const Image<OutputStorageType>& sink) {
00087
00088   // compute maximum size of pyramid
00089   HomgPoint2D testpoint,tmp;
00090   double maxscale = 0.0, scale = 0.0;
00091
00092   // map 4 corners and find maximum local scaling
00093   // ATTENTION: all points that are mapped to (x,y,0) in the source image
00094   // cause a warping of infinity. It might be incorrect assume that the corners
00095   // define the scale range !
00096   for (unsigned int c=0; c<4; c++) {
00097     switch (c) {
00098     case 0:testpoint = HomgPoint2D(0,0); break;
00099     case 1:testpoint = HomgPoint2D(0,sink.GetHeight()-1); break;
00100     case 2:testpoint = HomgPoint2D(sink.GetWidth()-1,
00101              sink.GetHeight()-1); break;
00102     case 3:testpoint = HomgPoint2D(sink.GetWidth()-1, 0); break;
00103     }
00104     GetSourceCoordinates_(testpoint, tmp);
00105     // compute local sampling frequency for antialiasing
00106     Matrix2x2<double> Jacobian;
00107     GetJacobian_(testpoint, Jacobian);
00108
00109     // this is actually dx = NormL2( Jac * (1;0) )
00110     //              and dy = NormL2( Jac * (0;1) )
00111     // It tells how far we move in src if we move by one in sink.
00112     // This is important for complying with the sampling theorem.
00113     double
00114       dx = sqrt(Jacobian[0][0]*Jacobian[0][0]+
00115       Jacobian[1][0]*Jacobian[1][0]),
00116       dy = sqrt(Jacobian[0][1]*Jacobian[0][1]+
00117       Jacobian[1][1]*Jacobian[1][1]);
00118     if (dx<JACOBI_THRESH) dx = JACOBI_THRESH;
00119     if (dy<JACOBI_THRESH) dy = JACOBI_THRESH;
00120
00121     // use larger step to select pyramid level
00122     scale = (dx > dy)? log(dx)*ONE_OVER_LOG2 : log(dy)*ONE_OVER_LOG2;
00123
00124     if (scale>maxscale) maxscale = scale;
00125   }
00126   SetPyramidSize(int(maxscale+2.0));
00127
00128   // restore automatic mode when this function is invoked
00129   autoPyramidSize_ = true;
00130
00131 }
00132
00133 template <class InputStorageType, class OutputStorageType>
00134 void BackwardMapping<InputStorageType, OutputStorageType>::
00135 SetPyramidSize(const int newsize)
00136 {
00137   int oldsize = pyramid_.size();
00138   pyramid_.SetPyramidSize(newsize);
00139   if (oldsize>0 && oldsize<newsize) {
00140     // have to build a bigger pyramid, simply adding levels would be sufficient
00141     // however this is not supported, so we build a completely new one
00142     // this should be fixed in PyramidImage somewhen !
00143     Image<InputStorageType> tmp;
00144     tmp.StealImage(*pyramid_[0]);
00145     BuildPyramid_(tmp, true);
00146   }
00147   // user is responsible now
00148   autoPyramidSize_ = false;
00149 }
00150
00151
00152 template <class InputStorageType, class OutputStorageType>
00153 void BackwardMapping<InputStorageType, OutputStorageType>::
00154 BuildPyramid_(const Image<InputStorageType>& source,
00155               bool forceInit)
00156 {
00157   // if forceinit we use source to build the pyramid, otherwise
00158   // we check if there is already a pyramid
00159   if (forceInit) {
00160     if (!pyramid_.IsEmpty()) pyramid_.Release();
00161     pyramid_.Init(source);
00162   } else {
00163     if (pyramid_.IsEmpty()) pyramid_.Init(source);
00164   }
00165 }
00166
00167 // #####################  dispatcher functions #########################
00168 template <class InputStorageType, class OutputStorageType>
00169 int BackwardMapping<InputStorageType, OutputStorageType>::
00170 Map(const Image<InputStorageType>& source,
00171     Image<OutputStorageType>& sink,
00172     InterpolationMethod interpolationQuality, bool newSink)
00173 {
00174
00175 #ifdef BIAS_DEBUG
00176
00177   // sanity checks
00178   if (sink.IsEmpty()){
00179     BIASERR("sink is empty !");
00180     BIASABORT;
00181   }
00182   if (sink.GetChannelCount()!=source.GetChannelCount() ||
00183     sink.GetColorModel()!=source.GetColorModel() ||
00184     sink.GetStorageType()!=source.GetStorageType()) {
00185       BIASERR("different image types !");
00186       BIASABORT;
00187     }
00188     if (source.IsPlanar() && source.GetChannelCount()>1 ||
00189       sink.IsPlanar() && sink.GetChannelCount()>1) {
00190         BIASERR("not implemented for planar images !");
00191         BIASABORT;
00192       }
00193 #endif
00194     width_=source.GetWidth();
00195     height_=source.GetHeight();
00196     if (newSink) {
00197       CalcCoordOffset_(sink, source);
00198       ChangeImgSize_(sink, source);
00199     } else {
00200       offsetX_=0; offsetY_=0;
00201     }
00202     // record interpolation mode since the simple map interface doesnt
00203       interpolationType_ = interpolationQuality;
00204       if (interpolationQuality>=MapTrilinear) {
00205         // here we work with a pyramid
00206         // to avoid computational overhead, we save the pyramid and thus the
00207         // source image. We dont need to calculate it every time
00208
00209         // check if pyramid is large enough for current mapper
00210         if (autoPyramidSize_) UpdatePyramidSize(sink);
00211         BuildPyramid_(source);
00212         ROI_ = *source.GetROI();
00213         return MapTri_(sink);
00214       } else {
00215         ROI_ = *source.GetROI();
00216         return MapBi_(source, sink, interpolationQuality);
00217       }
00218 }
00219
00220
00221 template <class InputStorageType, class OutputStorageType>
00222 int BackwardMapping<InputStorageType, OutputStorageType>::
00223 Map(Image<OutputStorageType>& sink) {
00224   if (interpolationType_ < MapTrilinear) {
00225     BIASERR("Call complete map function, no image caching necessary for"
00226       " simple mapper, dont have your input image any more !");
00227     BIASABORT;
00228
00229   }
00230   MapTri_(sink);
00231   return 0;
00232 }
00233
00234 // #################### bi-Interpolation ################################
00235
00236 template <class InputStorageType, class OutputStorageType>
00237 int BackwardMapping<InputStorageType, OutputStorageType>::
00238 MapBi_(const Image<InputStorageType>& source,
00239        Image<OutputStorageType>& sink,
00240        InterpolationMethod interpolationQuality)
00241 {
00242   HomgPoint2D p_sink(0,0), p_source(0,0);
00243   p_sink[2] = 1;
00244
00245   OutputStorageType** Data = sink.GetImageDataArray();
00246   double tmp = 0;
00247   const unsigned int ccs = sink.GetChannelCount();
00248   // calculate interesting region in sink
00249   int tlx,tly, brx1,bry1;
00250   GetBoundingBox(source.GetWidth(), source.GetHeight(),
00251                  sink.GetWidth(), sink.GetHeight(),
00252                  tlx, tly, brx1, bry1);
00253   tlx-=offsetX_;  brx1-=offsetX_; tly-=offsetY_; bry1-=offsetY_;
00254   // clip interesting region with sink roi
00255   ClipBoundingBoxToROICorners_(sink, tlx, tly, brx1, bry1);
00256
00257   const int brx = brx1, bry = bry1;
00258
00259   if (alphaImg_.GetSize()>0) {
00260     if ( (bry-tly)>(int)alphaImg_.GetHeight() ||
00261          (brx-tlx)>(int)alphaImg_.GetWidth() )
00262       BIASERR("alphaImg too small:"<<alphaImg_.GetWidth()<<"x"<<
00263               alphaImg_.GetHeight()<<"  minimum size:"<<
00264               (brx-tlx)<<"x"<<(bry-tly));
00265   }
00266   const bool alphaMap = (alphaImg_.GetSize()>0);
00267   //cout<<"offsetX_:"<<offsetX_<<" offsetY_:"<<offsetY_<<endl;
00268   //cout<<"tl:"<<tlx<<","<<tly<<" br:"<<brx<<","<<bry<<endl;
00269   OutputStorageType value;
00270   // iterate over sink and calculate the corresponding pix in source
00271   // check interpolation modes in speed order
00272   if (interpolationQuality==MapNearestNeighbor) { // nearest neighbor
00273     const InputStorageType** ppImageData
00274       = (const InputStorageType**)source.GetImageDataArray();
00275     for (int y=tly; y<bry; y++) {
00276       for (int x=tlx; x<brx; x++) {
00277         // image point in homogenous coords
00278         p_sink[0] = x + offsetX_;
00279         p_sink[1] = y + offsetY_;
00280         GetSourceCoordinates_(p_sink, p_source);
00281         // skip if pixel not in roi
00282         if (!ROI_.IsInROI(int(rint(p_source[0])),
00283                           int(rint(p_source[1])))) continue;
00284         // run over color channels
00285         for (unsigned int j=0; j<ccs; j++) {
00286           value= Data[y][x*ccs+j];
00287           ClipValue_(ppImageData[(int)rint(p_source[1])]
00288                      [(int)rint(p_source[0])*ccs+j], value);
00289           if (alphaMap) {
00290             Data[y][x*ccs+j]=
00291               OutputStorageType(alphaImg_.GetImageDataArray()[y-tly][x-tlx] *
00292                                 float(Data[y][x*ccs+j]) +
00293                                 (1.0-alphaImg_.GetImageDataArray()[y-tly][x-tlx]) *
00294                                 float(value)
00295                                 );
00296           } else
00297             Data[y][x*ccs+j]=value;
00298         }
00299       }
00300     }
00301   } else if (interpolationQuality==MapBilinear) { // bilinear
00302     for (int y=tly; y<bry; y++) {
00303       for (int x=tlx; x<brx; x++) {
00304         // image point in homogenous coords
00305         p_sink[0] = x + offsetX_;
00306         p_sink[1] = y + offsetY_;
00307         GetSourceCoordinates_(p_sink, p_source);
00308         // skip if pixel not in roi
00309         if (!ROI_.IsInROI(p_source[0], p_source[1])) continue;
00310         for (unsigned int j=0; j<ccs; j++) {
00311            value= Data[y][x*ccs+j];
00312           ClipValue_(source.BilinearInterpolationRGBInterleaved(p_source[0],
00313                                                                 p_source[1],j),
00314                      value);
00315           if (alphaMap) {
00316             Data[y][x*ccs+j]=
00317               OutputStorageType(alphaImg_.GetImageDataArray()[y-tly][x-tlx] *
00318                                 float(Data[y][x*ccs+j]) +
00319                                 (1.0-alphaImg_.GetImageDataArray()[y-tly][x-tlx]) *
00320                                 float(value)
00321                                 );
00322           } else
00323             Data[y][x*ccs+j]=value;
00324         }
00325       }
00326     }
00327   } else if (interpolationQuality==MapBicubic) { // bicubic
00328     for (int y=tly; y<bry; y++) {
00329       for (int x=tlx; x<brx; x++) {
00330         // image point in homogenous coords
00331         p_sink[0] = x + offsetX_;
00332         p_sink[1] = y + offsetY_;;
00333         GetSourceCoordinates_(p_sink, p_source);
00334         // skip if pixel not in roi
00335         if (!ROI_.IsInROI(p_source[0], p_source[1])) continue;
00336         // run over color channels
00337         for (unsigned int j=0; j<ccs; j++) {
00338           if (GetImageValue_(p_source[0], p_source[1], source, j, tmp)==0) {
00339              value= Data[y][x*ccs+j];
00340             ClipValue_(tmp, value);
00341             if (alphaMap) {
00342               Data[y][x*ccs+j]=
00343                 OutputStorageType(alphaImg_.GetImageDataArray()[y-tly][x-tlx] *
00344                                   float(Data[y][x*ccs+j]) +
00345                                   (1.0-alphaImg_.GetImageDataArray()[y-tly][x-tlx]) *
00346                                   float(value)
00347                                   );
00348             } else
00349               Data[y][x*ccs+j]=value;
00350           }
00351         }
00352       }
00353     }
00354   }
00355
00356   return 0;
00357 }
00358
00359 // ########################## tri-Interpolatioon #########################
00360
00361 template <class InputStorageType, class OutputStorageType>
00362 int BackwardMapping<InputStorageType, OutputStorageType>::
00363 MapTri_(Image<OutputStorageType>& sink) {
00364   // sanity check (who knows ;-) )
00365   if (pyramid_.IsEmpty()) {
00366     BIASERR("Called function on uninitialized image !");
00367     sink.FillImageWithConstValue( (OutputStorageType)(255) );
00368     return -1;
00369   }
00370   // check if pyramid is still large enough, mapping might have changed,
00371   // e.g. other homography on same image !
00372   if (autoPyramidSize_) UpdatePyramidSize(sink);
00373   HomgPoint2D p_sink(0,0), p_source(0,0);
00374
00375   OutputStorageType** Data = sink.GetImageDataArray();
00376   double tmp = 0, localscale = 0;
00377   const unsigned int ccs = sink.GetChannelCount();
00378
00379   // calculate interesting region in sink by forward mapping of corners
00380   int tlx,tly, brx1, bry1;
00381   GetBoundingBox(pyramid_[0]->GetWidth(), pyramid_[0]->GetHeight(),
00382                  sink.GetWidth(), sink.GetHeight(),
00383                  tlx,tly,brx1,bry1);
00384   tlx-=offsetX_;  brx1-=offsetX_; tly-=offsetY_; bry1-=offsetY_;
00385   // clip interesint region with sink roi
00386   ClipBoundingBoxToROICorners_(sink, tlx, tly, brx1, bry1);
00387   const  int brx = brx1, bry = bry1;
00388
00389   if (alphaImg_.GetSize()>0) {
00390     if ( (bry-tly)>(int)alphaImg_.GetHeight() ||
00391          (brx-tlx)>(int)alphaImg_.GetWidth() )
00392       BIASERR("alphaImg too small:"<<alphaImg_.GetWidth()<<"x"<<
00393               alphaImg_.GetHeight()<<"  minimum size:"<<
00394               (brx-tlx)<<"x"<<(bry-tly));
00395   }
00396   const bool alphaMap = (alphaImg_.GetSize()>0);
00397
00398   OutputStorageType value;
00399   // iterate over sink and calculate the corresponding pix in source
00400   for ( int y=tly; y<bry; y++) {
00401     for ( int x=tlx; x<brx; x++) {
00402       // image point in homogenous coords
00403       p_sink[0] = x + offsetX_;
00404       p_sink[1] = y + offsetY_;
00405       // this is so slow we can make the decision in the innerst loop:
00406       if (interpolationType_ == MapTrilinear) {
00407         GetSourceCoordinates_(p_sink, p_source);
00408         // skip if pixel not in roi
00409         if (!ROI_.IsInROI(p_source[0], p_source[1])) continue;
00410
00411         // compute local sampling frequency for antialiasing
00412         // this is only an approximation, more exact would be SVD:
00413         // sqrt(s[0]) from J^T * J = U * s * V^T
00414         Matrix2x2<double> Jacobian;
00415         GetJacobian_(p_sink, Jacobian);
00416
00417         double
00418           dx = sqrt(Jacobian[0][0]*Jacobian[0][0]+
00419                     Jacobian[1][0]*Jacobian[1][0]),
00420           dy = sqrt(Jacobian[0][1]*Jacobian[0][1]+
00421                     Jacobian[1][1]*Jacobian[1][1]);
00422         if (dx<JACOBI_THRESH) dx = JACOBI_THRESH;
00423         if (dy<JACOBI_THRESH) dy = JACOBI_THRESH;
00424
00425         // use larger step to select pyramid level
00426         localscale = (dx > dy)? log(dx)*ONE_OVER_LOG2 : log(dy)*ONE_OVER_LOG2;
00427
00428         // clip scale to zero since we have no better resolution image than 0
00429         if (localscale<0.0) localscale = 0.0;
00430
00431         // compute color channels
00432         // this can be speeded up, all the weights are the same for all
00433         // channels, dont recompute them every time !
00434         // However for now this code does it ..
00435         for (unsigned int j=0; j<sink.GetChannelCount(); j++) {
00436           if (GetTrilinearImageValue_(p_source[0], p_source[1],
00437                                       localscale, j, tmp) == 0) {
00438              value= Data[y][x*ccs+j];
00439             ClipValue_(tmp, value);
00440             if (alphaMap) {
00441               Data[y][x*ccs+j]=
00442                 OutputStorageType(alphaImg_.GetImageDataArray()[y-tly][x-tlx] *
00443                                   float(Data[y][x*ccs+j]) +
00444                                   (1.0-alphaImg_.GetImageDataArray()[y-tly][x-tlx]) *
00445                                   float(value)
00446                                   );
00447             } else
00448               Data[y][x*ccs+j]=value;
00449           }
00450         }
00451       } else {
00452         // anisotropic filtering !
00453         GetSourceCoordinates_(p_sink, p_source);
00454
00455         // skip if pixel not in roi
00456         if (!ROI_.IsInROI(p_source[0], p_source[1])) continue;
00457
00458         // compute local sampling frequency matrix
00459         Matrix2x2<double> Jacobian;
00460         GetJacobian_(p_sink, Jacobian);
00461
00462         // compute color channels
00463         // this can be speeded up, all the weights are the same for all
00464         // channels, dont recompute them every time !
00465         // However for now this code does it ..
00466         for (unsigned int j=0; j<sink.GetChannelCount(); j++) {
00467           if (GetAnisotropicImageValue_(p_source[0], p_source[1],
00468                                         Jacobian, j, tmp) == 0) {
00469              value= Data[y][x*ccs+j];
00470             ClipValue_(tmp, value);
00471             if (alphaMap) {
00472               Data[y][x*ccs+j]=
00473                 OutputStorageType(alphaImg_.GetImageDataArray()[y-tly][x-tlx] *
00474                                   float(Data[y][x*ccs+j]) +
00475                                   (1.0-alphaImg_.GetImageDataArray()[y-tly][x-tlx]) *
00476                                   float(value)
00477                                   );
00478             } else
00479               Data[y][x*ccs+j]=value;
00480           }
00481         }
00482       }
00483     }
00484   }
00485 #ifdef BIAS_DEBUG
00486   if (!rangeChecked_) {
00487     rangeChecked_ = true;
00488     BIASERR("You may have got artefacts in your image because overflow "
00489             <<"checking of your data types combination "
00490             <<typeid(InputStorageType).name()<<" -> "
00491             <<typeid(InputStorageType).name()<<" is not yet implemented."
00492             <<" Please do it in CheckValueRange_().");
00493   }
00494   if (aliasing_) {
00495     aliasing_ = false;
00496     BIASERR("You probably got aliasing, because your pyramid was too small.");
00497   }
00498 #endif
00499
00500   return 0;
00501 }
00502
00503
00504 template <class InputStorageType, class OutputStorageType>
00505 int BackwardMapping<InputStorageType, OutputStorageType>::
00506 GetImageValue_(const double& x,
00507                const double& y,
00508                const Image<InputStorageType>& im,
00509                unsigned int channel,
00510                double& result)
00511 {
00512   // compute value only in image (no pyramid), first try bicubic
00513   if (x < (double)im.GetWidth()-2.0 && y < (double)im.GetHeight()-2.0 &&
00514     x >= 1.0 && y >= 1.0 ) {
00515       result = im.BicubicInterpolation(x, y, channel);
00516
00517     } else if (x < (double)im.GetWidth()-1.0 &&
00518       y < (double)im.GetHeight()-1.0 &&
00519       x > 0.0 && y > 0.0 ) {
00520         // we are near the border, bilinear
00521         result = im.BilinearInterpolation(x, y, channel);
00522       } else {
00523         // we are AT the border, we could do nearest neighbor here or something
00524         // else, but for now, skip this pixel
00525         return -1;
00526       }
00527       return 0;
00528 }
00529
00530 template <class InputStorageType, class OutputStorageType>
00531 int BackwardMapping<InputStorageType, OutputStorageType>::
00532 GetTrilinearImageValue_(const double& xsource,
00533                         const double& ysource,
00534                         const double& scale,
00535                         unsigned int channel,
00536                         double& thereturnvalue)
00537 {
00538   // compute a weight for the smaller and a weight for the larger pyramid level
00539   // then compute the colors at these levels and average them according
00540   // to their weights
00541   double value1 =  0, value2 = 0;
00542   double scale_error = scale - int(scale);
00543   int scale1 = int(scale);
00544   if (scale1>=(int)pyramid_.size()-1) {
00545     // we might get aliasing, pyramid is too small !!!
00546     scale1 = pyramid_.size()-1;
00547     scale_error = 0.0;
00548     aliasing_ = true;
00549   } else if (scale1<0) {
00550     // use max resolution image, dont need to upsample in pyramid
00551     scale1 = 0;
00552     scale_error = 0.0;
00553   }
00554
00555   // compute coordinates in smaller image
00556   double x1 = xsource, y1 = ysource;
00557   const double offset = pyramid_.GetPositionOffset();
00558   for (int s=0; s<scale1; s++) {
00559     // -0.5 necessary because of offset in 2^n downsampling
00560     x1 = (x1 - offset) * 0.5;
00561     y1 = (y1 - offset) * 0.5;
00562   }
00563   // if scale 1 fits perfectly (at lowest highest pyramid layer)
00564   // we dont need scale2, set it to the same value to avoid access violations
00565   const int scale2 = (scale_error==0.0)? scale1           : scale1 + 1;
00566   const double x2  = (scale_error==0.0)? x1               : (x1 - offset)*0.5;
00567   const double y2  = (scale_error==0.0)? y1               : (y1 - offset)*0.5;
00568
00569
00570   double weight1 = 1.0 - scale_error, weight2 = scale_error;
00571
00572   if (GetImageValue_(x1, y1, *pyramid_[scale1], channel, value1)!=0) weight1=0;
00573
00574   // compute second scale only if necessary
00575   if (weight2>0.0) {
00576     if (GetImageValue_(x2, y2, *pyramid_[scale2], channel, value2)!=0)
00577       weight2=0;
00578   }
00579   // check if we computed any value at all
00580   const double weightsum = weight1 + weight2;
00581   if ((weightsum)<=DBL_EPSILON) return  -1;
00582
00583   // this is the tri in trilinear:
00584   thereturnvalue = (weight1 * value1 + weight2 * value2) / weightsum;
00585
00586   return 0;
00587 }
00588
00589 template <class InputStorageType, class OutputStorageType>
00590 int BackwardMapping<InputStorageType, OutputStorageType>::
00591 GetAnisotropicImageValue_(const double& xsource,
00592                           const double& ysource,
00593                           Matrix2x2<double>& Jacobian,
00594                           unsigned int channel,
00595                           double& thereturnvalue)
00596 {
00597   // compute eigenvalues of jacobian, which determine the largest step sizes
00598   Vector2<double> ev1, ev2;
00599
00600   // make postive definite jTj for gauss distribution
00601   Jacobian = Jacobian.Transpose() * Jacobian;
00602
00603   // compute eigenvalues = squared step sizes in source
00604   double d1, d2;
00605   Jacobian.EigenvalueDecomposition(d1, ev1, d2, ev2);
00606
00607   // remove square, require min eigenvalue, avoid pathological 0 case
00608   // (should rarely happen for meaningful mappings)
00609   if (d1<JACOBI_THRESH) d1 = JACOBI_THRESH; else  d1 = sqrt(d1);
00610   if (d2<JACOBI_THRESH) d2 = JACOBI_THRESH; else  d2 = sqrt(d2);
00611
00612   // compute pyramid levels
00613   const double smallscale = (d1 < d2)? log(d1)*ONE_OVER_LOG2
00614     :log(d2)*ONE_OVER_LOG2;
00615   const double largescale = (d2 < d1)? log(d1)*ONE_OVER_LOG2
00616     :log(d2)*ONE_OVER_LOG2;
00617
00618   // use trilinear if nearly isotropic
00619   if (largescale-smallscale<0.1) {
00620     return GetTrilinearImageValue_(xsource, ysource, smallscale,
00621                                    channel, thereturnvalue);
00622   }
00623
00624   if (largescale<=0.1) {
00625     // bicubic is sufficient since we are only enlarging
00626     return GetImageValue_(xsource, ysource,
00627                           *pyramid_[0], channel, thereturnvalue);
00628   }
00629
00630   // make small offset to account for ground gauss smoothing
00631   const double scale1 = (smallscale>0.3)? smallscale - 0.1 : 0.2;
00632
00633   // now remove the chosen pyramid level from the jacobian
00634   // at that level, the jacobian is smaller
00635   Jacobian *=  1.0 / exp(8.0 * ONE_OVER_LOG2 * scale1);
00636
00637   // select kernel size
00638   const int MaskHalfSize = (int)(floor(2*fabs(d2-d1)));
00639
00640   Matrix<double> theMask(MaskHalfSize*2+1, MaskHalfSize*2+1);
00641   JacobianToMask_(Jacobian, theMask);
00642   double* pMaskData = theMask.GetData();
00643   double weightsum = 0, thevalue = 0;
00644   thereturnvalue = 0;
00645   for (int y=-MaskHalfSize; y<=MaskHalfSize; y++) {
00646     for (int x=-MaskHalfSize; x<=MaskHalfSize; x++) {
00647       if (GetTrilinearImageValue_(xsource+double(x), ysource+double(y),
00648                                   scale1, channel, thevalue)==0) {
00649         thereturnvalue += thevalue * *pMaskData;
00650         weightsum += *pMaskData++;
00651       }
00652     }
00653   }
00654   // check if more than half of the pixels needed for interpolation were there
00655   if (weightsum > 0.5) thereturnvalue /= weightsum;
00656   else return -1;
00657
00658   return 0;
00659 }
00660
00661
00662 // ################## data type clipping: double -> char, ... ############
00663
00664 template <class InputStorageType, class OutputStorageType>
00665 void BackwardMapping<InputStorageType, OutputStorageType>::
00666 ClipBoundingBoxToROICorners_(const Image<OutputStorageType>& sink,
00667                              int& tlx,
00668                              int& tly,
00669                              int& brx,
00670                              int& bry) const
00671 {
00672   unsigned int minx, miny, maxx, maxy;
00673   sink.GetROICorners(minx, miny, maxx, maxy);
00674   if (tlx<(int)minx) tlx = minx;
00675   if (tly<(int)miny) tly = miny;
00676   if (brx>(int)maxx) brx = maxx;
00677   if (bry>(int)maxy) bry = maxy;
00678 //   if (tlx<0) tlx=0;
00679 //   if (tly<0) tlx=0;
00680 //   if (brx<0) brx=0;
00681 //   if (bry<0) bry=0;
00682 }
00683
00684
00685
00686
00687 // generic implementation tries to use limits
00688 template <class InputStorageType, class OutputStorageType>
00689 void BackwardMapping<InputStorageType, OutputStorageType>::
00690 ClipValue_(const double& value, OutputStorageType& newvalue)
00691 {
00692 #ifdef BIAS_DEBUG
00693   rangeChecked_ = false;
00694 #endif
00695
00696   if (value>=double(numeric_limits<OutputStorageType>::max()))
00697     newvalue = numeric_limits<OutputStorageType>::max();
00698   else if (value<=double(numeric_limits<OutputStorageType>::min()))
00699     newvalue = numeric_limits<OutputStorageType>::min();
00700   else newvalue = OutputStorageType(value);
00701
00702 }
00703
00704
00705 // if this does not compile on windows, please enable this:
00706 //#ifndef WIN32
00707
00708 template <>
00709 void BackwardMapping<unsigned char, unsigned char>::
00710 ClipValue_(const double& value, unsigned char& newvalue)
00711 {
00712   if (value<0.0) newvalue = 0;
00713   else if (value>255.0) newvalue = 255;
00714   else newvalue =  ((unsigned char)rint(value));
00715 }
00716
00717 template <>
00718 void BackwardMapping<float, float>::
00719 ClipValue_(const double& value, float& newvalue)
00720 {
00721   newvalue = float(value);
00722 }
00723
00724 //#endif // ! WIN32
00725
00726 template <class InputStorageType, class OutputStorageType>
00727 void BackwardMapping<InputStorageType, OutputStorageType>::
00728 JacobianToMask_(const Matrix2x2<double>& Jacobian,
00729                 Matrix<double>& theMask) const
00730 {
00731   double theSum = 0;
00732   Matrix2x2<double> invJac;
00733   Jacobian.Invert(invJac);
00734   const double& a = invJac[0][0];
00735   const double& b = invJac[0][1];
00736   const double& c = invJac[1][0];
00737   const double& d = invJac[1][1];
00738
00739   const int halfsize = theMask.num_cols()/2;
00740   double* pMaskData = theMask.GetData();
00741   for (int y=-halfsize; y<=halfsize; y++) {
00742     for (int x=-halfsize; x<=halfsize; x++) {
00743       // e^(- x^T  * invJac * x^T) is a gauss, unrolled:
00744       theSum += *pMaskData++ = exp(-(a*x*x+(b+c)*x*y+d*y*y));
00745     }
00746   }
00747   // Normalize to unity
00748   theMask *= 1.0 / theSum;
00749 }
00750
00751 template <class InputStorageType, class OutputStorageType>
00752 int BackwardMapping<InputStorageType, OutputStorageType>::
00753 CalcCoordOffset_(const  Image<OutputStorageType> &sink,
00754                  const Image<InputStorageType> &source) {
00755   //sink bounding box
00756   int xl=0;  int xr=0; int  yl=0; int yr=0;
00757   GetBoundingBox(sink.GetWidth(), sink.GetHeight(),
00758                  source.GetWidth(), source.GetHeight(), xl, yl, xr, yr);
00759
00760   // sink corner coordinates
00761   double xls=0;  double xrs=sink.GetWidth();
00762   double  yls=0; double yrs=sink.GetHeight();
00763
00764
00765   // result bounding box
00766   double xlr=0;  double xrr=0; double  ylr=0; double yrr=0;
00767   if (xl<xls) xlr=xl; else xlr=xls;
00768   if (yl<yls) ylr=yl; else ylr=yls;
00769   if (xr>xrs) xrr=xr; else xrr=xrs;
00770   if (yr>yrs) yrr=yr; else yrr=yrs;
00771
00772   offsetX_= (int)ceil(xlr);
00773   offsetY_= (int)ceil(ylr);
00774
00775   return 0;
00776 }
00777
00778 template <class InputStorageType, class OutputStorageType>
00779 int BackwardMapping<InputStorageType, OutputStorageType>::
00780 ChangeImgSize_ (Image<OutputStorageType> &sink,
00781                 const Image<InputStorageType> &source) {
00782   BIAS::Image<OutputStorageType> temp;
00783   int xl=0;  int xr=0; int  yl=0; int yr=0;
00784
00785   GetBoundingBox(source.GetWidth(), source.GetHeight(),
00786                  sink.GetWidth(), sink.GetHeight(), xl, yl, xr, yr);
00787
00788   // sink corner coordinates
00789   double xls=0;  double xrs=sink.GetWidth();
00790   double  yls=0; double yrs=sink.GetHeight();
00791
00792   // result bounding box
00793   double xlr=0;  double xrr=0; double  ylr=0; double yrr=0;
00794   if (xl<xls) xlr=xl; else xlr=xls;
00795   if (yl<yls) ylr=yl; else ylr=yls;
00796   if (xr>xrs) xrr=xr; else xrr=xrs;
00797   if (yr>yrs) yrr=yr; else yrr=yrs;
00798
00799   int x_abs = (int)ceil(abs(xlr-xrr));
00800   int y_abs = (int)ceil(abs(ylr-yrr));
00801
00802
00803
00804   temp.Init(x_abs,y_abs,3);
00805
00806
00807   int w = sink.GetWidth();
00808   int h = sink.GetHeight();
00809
00810
00811   OutputStorageType** data = sink.GetImageDataArray();
00812   OutputStorageType** datac = temp.GetImageDataArray();
00813   int xt = (int)abs(offsetX_);
00814   int yt = (int)abs(offsetY_);
00815   cout << "translation at tnc " << xt << " " << yt << "\n";
00816   for (int hi =0; hi<h; hi++) {
00817     for (int wi=0; wi<w; wi++) {
00818       for (int c=0; c<3; c++) {
00819         datac[hi+yt][(wi+xt)*3+c]=data[hi][wi*3+c];
00820         //cout << hi << " " << wi << "\n";
00821         // cout <<  hi + 3*c +yt << " " << wi +xt << "\n";
00822       }
00823     }
00824   }
00825   sink=temp;
00826
00827   return 0;
00828 }
00829
00830 template class BackwardMapping<unsigned char, unsigned char>;
00831 template class BackwardMapping<float, float>;
00832 template class BackwardMapping<unsigned char, float>;
00833
00834 #if defined(BUILD_IMAGE_CHAR)
00835 template class BackwardMapping<unsigned char, char>;
00836 template class BackwardMapping<char, char>;
00837 #endif
00838
00839 #if defined(BUILD_IMAGE_USHORT)
00840 template class BackwardMapping<unsigned short,unsigned short>;
00841 #endif
00842
00843 #if defined(BUILD_IMAGE_SHORT)
00844 template class BackwardMapping<short, short>;
00845 #endif
00846
00847 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00848 template class BackwardMapping<unsigned short, short>;
00849 #endif
00850
00851 #if defined(BUILD_IMAGE_INT)
00852 template class BackwardMapping<int,int>;
00853 #endif
00854
00855 #if defined(BUILD_IMAGE_USHORT)
00856 template class BackwardMapping<unsigned short,float>;
00857 #endif
00858
00859 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00860 template class BackwardMapping<unsigned short,int>;
00861 #endif
00862
00863 #if defined(BUILD_IMAGE_DOUBLE)
00864 template class BackwardMapping<double,double>;
00865 #endif
00866
00867 } // namespace BIAS
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/BackwardMapping.hh Source File

Image

BackwardMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BackwardMapping_hh__
00027 #define __BackwardMapping_hh__
00028
00029 #include <Base/Image/Image.hh>
00030 #include <Image/PyramidImage.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Math/Matrix2x2.hh>
00033
00034 /// if jacobian gets smaller than this, clip to this value to avoid singularity
00035 /// when computing smoothing kernel
00036 #define JACOBI_THRESH 1e-100
00037
00038 namespace BIAS {
00039
00040   /** @enum InterpolationMethod
00041       @brief accuracy for resampling
00042
00043       Trilinear averages different pyramid levels based on a local isotropic
00044       sampling frequency
00045       Anisotropic is the most expensive and uses the local jacobian for
00046       anti-aliasing, while preserving texture direction which need
00047       no smoothing */
00048   typedef enum InterpolationMethod { MapNearestNeighbor=1, MapBilinear,
00049                                      MapBicubic, MapTrilinear,
00050                                      MapAnisotropic };
00051
00052   /** @class BackwardMapping
00053       @ingroup g_filter
00054       @brief  abstract base class to maps image src to image sink with
00055       arbitrary continuous function
00056
00057       This class implements a backward mapping and runs over all pixels
00058       of some output image. For each pixel it calls GetSourceCoordinates
00059       (which you have to implement in your derived class) to compute
00060       the coordinates in the source image. The local sampling frequency
00061       can be computed to avoid aliasing. Either you make an anlytic
00062       implementation or simply use the good (but maybe slow) numerical
00063       approximation from BackwardMapping.
00064
00065       For instance if you scale an image by factor 2, you would implement
00066       GetSourceCoordinates as source_coord = 0.5 * sink_coord and the local
00067       sampling frequency would be 0.5. Sampling frequencies below 1 wont
00068       introduce aliasing, while those larger than 1 can.
00069       Therefore local low pass filtering is simulated by using a pyramid
00070       of the input image.
00071
00072       The local sampling frequency of your mapping function can be approximated
00073       analyzing the jacobian of the function as a R^2->R^2 mapping, see
00074       HomographyMapping for an example or simply use the numerical solution in
00075       this class if you are not interested in speed.
00076       However, using an image pyramid isotropic scaling is assumed, if you
00077       resample by 0.3 in x-direction and 5.0 in y direction, both dirs are
00078       smoothed with the same sigma and you will lose image information. If
00079       you want to remove such effects, use anisotropic filtering. This
00080       is the slowest but best technique.
00081
00082       To make a pyramid of correct size, Backwardmapping::UpdatePyramidSize
00083       maps the corners of your sink image and computes the local scale
00084       at these corners assuming maximum scale at one corner. If your
00085       derived mapping function has a maximum scale somewhere else,
00086       you must override UpdatePyramidSize.
00087
00088       If possible,bicubic interpolation is done in the image, at borders
00089       (high pyramid levels) only bilinear. For efficiency, you can disable
00090       the usage of pyramids, speeding up the computation (bicubic, bilinear,
00091       nearest neighbor).
00092
00093       @author koeser, 2005
00094
00095   */
00096   template <class InputStorageType, class OutputStorageType>
00097   class BIASImage_EXPORT BackwardMapping  {
00098   public:
00099
00100     BackwardMapping()
00101     {
00102 #ifdef BIAS_DEBUG
00103       rangeChecked_ = true;
00104 #endif
00105       aliasing_ = false;
00106       autoPyramidSize_ = true;
00107       interpolationType_ = MapTrilinear;
00108       offsetX_=0;      offsetY_=0;
00109     }
00110
00111     virtual ~BackwardMapping() {};
00112
00113     /** @name User interfaces
00114         @{
00115     */
00116
00117     /** @brief backward mapping with various interpolations
00118
00119     Sink must be initialized with correct size and background color for invalid
00120     pixels. This way you can call it several times to create a panorama from
00121     several source images. For each pixel in sink, GetSourceCoordinates is
00122     called and the value in source interpolated.
00123     @param newSink, if true a new sink image is created that is large enough
00124     to hold the old sink and the new mapped src img.
00125     */
00126     int Map(const Image<InputStorageType>& src,
00127             Image<OutputStorageType>& sink, InterpolationMethod=MapTrilinear,
00128             bool newSink=false);
00129
00130     /** @brief use this for subsequent calls to avoid pyramid recalculation
00131         when using tri-filtering */
00132     int Map(Image<OutputStorageType>& sink);
00133
00134     /**
00135         @}
00136     */
00137
00138     /** @brief sets pyramid size to pyramid and updates if neccessary */
00139     void SetPyramidSize(const int newsize);
00140
00141
00142     /** @brief calculates the bounding box in sink image,
00143         where to do the backward mapping.
00144
00145         The resulting coordinates can be negative !
00146         The br position is the first pixel outside the region(as for a ROI).
00147         Implement this in a derived class for speeding up calculation.
00148     */
00149     virtual inline int GetBoundingBox(unsigned int /*srcwidth*/,
00150                                       unsigned int /*srcheight*/,
00151                                       unsigned int sinkwidth,
00152                                       unsigned int sinkheight,
00153                                       int &tlx, int &tly,
00154                                       int &brx, int &bry)
00155     {
00156       tlx=0; tly=0;
00157       brx=sinkwidth; bry=sinkheight;
00158       return 0;
00159     }
00160
00161
00162     /** @brief use coordinates from sink to estimate maximum pyramid level
00163         needed, update pyramid size */
00164     virtual void UpdatePyramidSize(const Image<OutputStorageType>& sink);
00165
00166   protected:
00167
00168     /** @name geometrical coordinate mapping functions
00169         @{
00170     */
00171
00172     /** @brief actual mapping function which takes a point from sink
00173         and computes a point in source and a local sampling frequency */
00174     virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
00175                                       HomgPoint2D& source) const;
00176
00177     /** @brief numeric approximation of jacobian, reimplement in derived class
00178         to make an analytic jacobian */
00179     virtual int GetJacobian_(const HomgPoint2D& sink,
00180                              Matrix2x2<double>& Jacobian) const;
00181
00182     /**
00183         @}
00184     */
00185
00186     /** @name pixel-value-mapping worker functions
00187         @{
00188     */
00189
00190     /** @brief map image avoiding aliasing
00191
00192     This is almost correct regarding the sampling theorem, because it uses
00193     trilinear or anisotropic filtering over a pyramid. The local
00194     sampling frequency
00195     is estimated by analyzing the jacobian of the homography as a R^2->R^2
00196     mapping. This is very slow. If possible, bicubic interpolation is done
00197     in the image, at borders (high pyramid levels) only bilinear.<br>
00198     In auto mode pyramid size is checked
00199     @author koeser 04/2005   */
00200     int MapTri_(Image<OutputStorageType>& sink);
00201
00202     /** @brief bilinear, bicubc and nearest neighbor interpolation     */
00203     int MapBi_(const Image<InputStorageType>& source,
00204                Image<OutputStorageType>& sink,
00205                InterpolationMethod interpolationQuality);
00206
00207
00208
00209
00210     /** @brief worker function, which handles bilinear/bicubic interpolation,
00211         pyramid levels, borders and weights */
00212     int GetImageValue_(const double& xsource,
00213                        const double& ysource,
00214                        const Image<InputStorageType>& im,
00215                        unsigned int channel,
00216                        double& result);
00217
00218
00219     /** @brief worker function, which handles bilinear/bicubic interpolation,
00220         pyramid levels, borders and weights */
00221     int GetTrilinearImageValue_(const double& xsource,
00222                                 const double& ysource,
00223                                 const double& scale,
00224                                 unsigned int channel,
00225                                 double& result);
00226
00227
00228     /** @brief use jacobian of mapping function to do anisotropic
00229         antialiasing */
00230     int GetAnisotropicImageValue_(const double& xsource,
00231                                   const double& ysource,
00232                                   Matrix2x2<double>& Jacobian,
00233                                   unsigned int channel,
00234                                   double& thereturnvalue);
00235
00236     /**
00237         @}
00238     */
00239
00240     /** @brief clip interpolated value to outputstoragetype
00241         and merge old and new value according to alpha
00242      */
00243     virtual void
00244     ClipValue_(const double& value, OutputStorageType& newvalue);
00245
00246     /** @brief clip computed region in dest image to roi
00247      */
00248     void ClipBoundingBoxToROICorners_(const BIAS::Image<OutputStorageType>& sink,
00249                                        int& tlx,  int& tly,
00250                                        int& brx,  int& bry) const;
00251
00252     /** @brief compute maximum number of pyramid levels needed */
00253     virtual void BuildPyramid_(const Image<InputStorageType>& source,
00254                                bool forceInit = true);
00255
00256     /** @brief takes jacobian to compute gaussian kernel for
00257         anisotropic smoothing */
00258     void JacobianToMask_(const Matrix2x2<double>& Jacobian,
00259                          Matrix<double>& theMask) const;
00260
00261
00262     // result in offsetX_,offsetY_
00263     virtual int CalcCoordOffset_(const Image<OutputStorageType>& sink,
00264                                  const Image<InputStorageType>& source);
00265
00266     virtual int ChangeImgSize_(Image<OutputStorageType>& /*sink*/,
00267                                const Image<InputStorageType>& /*source*/);
00268
00269
00270
00271     /// this contains a pyramid of the last source image for anti-aliasing
00272     PyramidImage<InputStorageType> pyramid_;
00273     /// the roi of the last source image
00274     ROI ROI_;
00275
00276     /// pyramid size set by user or computed automatically ?
00277     bool autoPyramidSize_;
00278
00279     /// which interpolation method are we using
00280     InterpolationMethod interpolationType_;
00281
00282 #ifdef BIAS_DEBUG
00283     /// the interpolated value is computed in double,
00284     /// if clipvalue is not specialized for your outputstoragetype(e.g. ushort)
00285     /// this bool indicates that the generic conversion (e.g. double->ushort)
00286     /// could have introduced artefacts (65536.0 -> 1)
00287     bool rangeChecked_;
00288 #endif
00289
00290     /// set to true if possibility of aliasing is detected during mapping
00291     bool aliasing_;
00292
00293
00294     int offsetX_,offsetY_; // needed for newDist
00295     double width_;              // source image width
00296     double height_;              // source image height
00297     // has same size as overlap region used for blending
00298     BIAS::Image<float> alphaImg_;
00299   };
00300
00301
00302 #ifdef WIN32
00303
00304   template <>
00305   void BackwardMapping<float, float>::ClipValue_(const double& value,
00306                                                  float& newvalue);
00307
00308   template <>
00309   void BackwardMapping<unsigned char,
00310                        unsigned char>::ClipValue_(const double& value,
00311                                                   unsigned char& newvalue);
00312
00313 #endif // WIN32
00314
00315 } // namespace
00316
00317
00318 #endif
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BaseFactory.hh Source File

Base » Common

BaseFactory.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __BaseFactory_hh__
00025 #define __BaseFactory_hh__
00026
00027 #include <bias_config.h>
00028
00029
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Debug/Error.hh>
00032 #include <Base/Debug/Exception.hh>
00033
00034 #include <map>
00035 #include <vector>
00036 #include <list>
00037 #include <algorithm>
00038 #include <string>
00039 #include <iostream>
00040
00041
00042 #define ALLOCATOR_IMPL(BASE_NAME, CLASS_NAME)\
00043 inline static BASE_NAME *Allocator()\
00044 { return dynamic_cast<BASE_NAME *>(new CLASS_NAME); }
00045
00046 namespace BIAS {
00047
00048 #define FACTORY_INVALID_TAG ""
00049
00050 #define D_BF_ADD  0x00000001
00051 #define D_BF_GEN  0x00000002
00052
00053   template<class BaseClassType> class BaseFactory;
00054
00055   /** @brief prints Map_ to stream
00056       @relates BaseFactory()
00057       @author woelk */
00058   template<class BaseClassType>
00059   std::ostream &operator<<(std::ostream& os,
00060                            const BaseFactory<BaseClassType>& bf);
00061
00062   typedef std::string TagType;
00063
00064   ///////////////////////////////////////////////////////////////////////////
00065   // BaseFactory
00066   ///////////////////////////////////////////////////////////////////////////
00067
00068   /** @class BaseFactory
00069       @brief basic factory class
00070
00071       Instantiate this class with the desired base class as template argument.
00072       The base class must provide the functions
00073         - std::string BaseClassType::GetTag() const
00074       The instantiation will fail otherwise.
00075
00076       /code
00077       class Base : public BaseFactoryClass
00078       {
00079       public:
00080         Base(const string& name)
00081           : Name_(name) {}
00082         void Who() { cout << "I am "<<Name_<<endl; }
00083         inline std::string GetTag() const { return Name_; }
00084         std::string Name_;
00085       };
00086
00087       class A : public Base
00088       {
00089       public:
00090         A() : Base("a") {};
00091         ALLOCATOR_IMPL(Base, A);
00092       };
00093
00094
00095       class B : public Base
00096       {
00097       public:
00098         B() : Base("b") {};
00099         ALLOCATOR_IMPL(Base, B);
00100       };
00101
00102       class MyFactory
00103       : public Factory<Base>
00104       {
00105       public:
00106         MyFactory(): Factory<Base>()
00107         {
00108           AddType((&A::Allocator));
00109           AddType((&B::Allocator));
00110         }
00111       };
00112
00113       MyFactory fac;
00114       Base *p = fac.Generate("a");
00115
00116       /endcode
00117
00118       @author woelk 02/2006 */
00119   template<class BaseClassType>
00120   class BaseFactory
00121     : public Debug
00122   {
00123   public:
00124     /// typedef for function pointer to class allocator function
00125     typedef BaseClassType* (*AllocatorFunctionPointer)();
00126
00127     /// struct for storing class details in memeber map Map_
00128     struct MapEntry {
00129       /// pointer to the static allocator function of this class
00130       AllocatorFunctionPointer AllocatorFunction_;
00131     };
00132
00133     /// constructor
00134     BaseFactory();
00135
00136     /// destructor
00137     virtual ~BaseFactory();
00138
00139     /** @brief function for generic class generation from
00140         @returns pointer to class on success, NULL on error */
00141     BaseClassType *Generate(const TagType& tag) const;
00142
00143     void GetNearTag(const TagType& tag, TagType& t1, TagType& t2);
00144
00145     /** @returns number of tags on success, negative value on error */
00146     int GetKnownTags(std::vector<TagType>& tags) const;
00147
00148     /** @brief add a new class entry to map
00149         @returns 0 on success, negative value on error */
00150     virtual void AddType(AllocatorFunctionPointer allocFunc);
00151
00152     /** @brief empties the map */
00153     inline void Clear()
00154     { Map_.clear(); }
00155
00156     friend std::ostream &operator<<<>(std::ostream& os,
00157                                       const BaseFactory<BaseClassType>& bf);
00158
00159   protected:
00160
00161     /// @brief checks if tag is already in map
00162     inline bool IsInMap_(const TagType& tag) const
00163     { return (Map_.find(tag) != Map_.end()); }
00164
00165   protected:
00166     //private: // private to avoid DLL export
00167     /// tag - class correspondences are stored in this map
00168     std::map<TagType, MapEntry> Map_;
00169
00170   }; // class BaseFactory
00171
00172   ///////////////////////////////////////////////////////////////////////////
00173   // implementation
00174   ///////////////////////////////////////////////////////////////////////////
00175
00176   template<class BaseClassType>
00177   BaseFactory<BaseClassType>::BaseFactory()
00178     : Debug()
00179   {
00180     //AddDebugLevel(D_BF_GEN);
00181     //AddDebugLevel(D_BF_ADD);
00182   }
00183
00184   template<class BaseClassType>
00185   BaseFactory<BaseClassType>::~BaseFactory()
00186   {
00187     Map_.clear();
00188   }
00189
00190   template<class BaseClassType>
00191   BaseClassType *BaseFactory<BaseClassType>::Generate(const TagType& tag) const
00192   {
00193     BaseClassType *pointer=NULL;
00194     if (tag == ""){
00195       BIASERR("class has invaltag tag "<<tag);
00196     } else {
00197       typename std::map<TagType, MapEntry>::const_iterator el = Map_.find(tag);
00198       if (el != Map_.end()){
00199         // call the allocator function
00200         pointer = (*(el->second.AllocatorFunction_))();
00201       } else {
00202         BIASCDOUT(D_BF_GEN, *this << std::endl <<" cannot generate "<<tag<<std::endl);
00203         //BEXCEPTION("unknown class tag "<<tag);
00204       }
00205     }
00206     return pointer;
00207   }
00208
00209   template<class BaseClassType>
00210   void BaseFactory<BaseClassType>::GetNearTag(const TagType& tag,
00211                                               TagType& tagupper,
00212                                               TagType& taglower) {
00213     tagupper = taglower = tag;
00214     // safety check if there is anything in the map
00215     if (Map_.empty()) return;
00216     typename std::map<TagType, MapEntry>::const_iterator el = Map_.find(tag);
00217     if (el != Map_.end()){
00218       // exact match !
00219       tagupper = taglower = tag;
00220     } else {
00221       // init with first
00222       tagupper =  Map_.begin()->first;
00223       taglower =  Map_.rbegin()->first;
00224       // generate element
00225       Map_[tag];
00226       // find neighbors
00227       typename std::map<TagType, MapEntry>::iterator it = Map_.find(tag);
00228       it++;
00229       if (it != Map_.end()) taglower = it->first;
00230       it--;
00231       if (it != Map_.begin()) {
00232         it--;
00233         tagupper = it->first;
00234         it++;
00235       }
00236       // cleanup synthetic element
00237       Map_.erase(it);
00238     }
00239   }
00240
00241
00242   template<class BaseClassType>
00243   int BaseFactory<BaseClassType>::
00244   GetKnownTags(std::vector<TagType>& tags) const
00245   {
00246     tags.clear();
00247
00248     typename std::map<TagType, MapEntry>::const_iterator it;
00249     for (it=Map_.begin(); it!=Map_.end(); it++){
00250       tags.push_back(it->first);
00251     }
00252
00253     return (int)tags.size();
00254   }
00255
00256
00257   template<class BaseClassType>
00258   void BaseFactory<BaseClassType>::
00259   AddType(AllocatorFunctionPointer allocFunc)
00260   {
00261     BaseClassType *cl = (*allocFunc)();
00262     if (!cl){
00263       BEXCEPTION("allocator function is not working!");
00264     }
00265     if (cl->GetTag()==FACTORY_INVALID_TAG){
00266       BIASERR("tag corresponds to FACTORY_INVALID_TAG, class type not added "
00267               <<cl->GetTag());
00268       BEXCEPTION("cannot add FACTORY_INVALID_TAG");
00269     }
00270     if (IsInMap_(cl->GetTag())){
00271       BIASERR("factory: \n"<< *this <<std::endl);
00272       BIASERR("tag already in factory class "<<cl->GetTag());
00273       BEXCEPTION("tag already in factory class "<<cl->GetTag());
00274     }
00275     BIASCDOUT(D_BF_ADD, "BaseFactory: adding "<<cl->GetTag());
00276     struct MapEntry me = { allocFunc };
00277     Map_.insert(make_pair(cl->GetTag(), me));
00278
00279     delete cl;
00280   }
00281
00282
00283   template<class BaseClassType>
00284   std::ostream &operator<<(std::ostream& os,
00285                            const BaseFactory<BaseClassType>& bf)
00286   {
00287     typename std::map<TagType, typename BaseFactory<BaseClassType>::MapEntry>::
00288       const_iterator it;
00289     for (it=bf.Map_.begin(); it!=bf.Map_.end(); it++){
00290       os <<"tag :"<<std::setw(4)<<(it->first)<<std::endl;
00291     }
00292     return os;
00293   }
00294
00295 }
00296
00297 #endif // __BaseFactory_hh__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: D:/home/jw/build/BIAS/bias_config.h Source File

build » BIAS

bias_config.h

Go to the documentation of this file.
00001 // bias_config.h is automatically generated from bias_config.h.in by CMake build system
00002 // DO NOT EDIT the .h file
00003 // Jan Woetzel
00004 //
00005 //
00006 // export the build configuration
00007 // of this library
00008 //
00009 // cmakedefine lines are substituted by values of
00010 // matching cmake variables.
00011 //
00012 // do NOT include .h files, here (jw) !!!
00013 //
00014
00015 #ifndef __BIAS_CONFIG_H___6294562947_
00016 #define __BIAS_CONFIG_H___6294562947_
00017
00018
00019 // compiled with BLAS library available?
00020 #define BIAS_HAVE_BLAS
00021
00022 // compiled with LAPACK lib available?
00023 #define BIAS_HAVE_LAPACK
00024
00025 // compiled with using Daimler-Chrysler interface?
00026 /* #undef BIAS_DAIMLERCHRYSLER */
00027
00028 // compiled with DevIL/OpenIL available?
00029 #define BIAS_HAVE_DEVIL
00030
00031 // compiled with dc1394 firewire available?
00032 /* #undef BIAS_HAVE_DC1394 */
00033
00034 // compiled with CMU firewire available?
00035 /* #undef BIAS_HAVE_1394CAMERACMU */
00036
00037 // DirectShow Support
00038 /* #undef BIAS_HAVE_DSHOW */
00039
00040 // compiled with internal DV decoder
00041 /* #undef BIAS_HAVE_DV */
00042
00043 // compiled with fftw3 available?
00044 #define BIAS_HAVE_FFTW3
00045
00046 // compiled with gsl available?
00047 /* #undef BIAS_HAVE_GSL */
00048
00049 // compiled with GL extension handler GLEW available?
00050 #define BIAS_HAVE_GLEW
00051
00052 // compiled with glut (GL utils) usage?
00053 #define BIAS_HAVE_GLUT
00054
00055 // compiled with GTK available?
00056 /* #undef BIAS_HAVE_GTK */
00057
00058 // compiled with GTK2 available?
00059 /* #undef BIAS_HAVE_GTK2 */
00060
00061 // compiled with IMLIB available?
00062 /* #undef BIAS_HAVE_IMLIB */
00063
00064 // compiled with ImageMagick++ available?
00065 #define BIAS_HAVE_IMAGEMAGICKLIB
00066
00067 // compiled with libJpeg usage
00068 /* #undef BIAS_HAVE_LIBJPEG */
00069
00070 // compiled with OpenCV usage ?
00071 #define BIAS_HAVE_OPENCV
00072
00073 // compiled with OpenEXR usage ?
00074 #define BIAS_HAVE_OPENEXR
00075
00076 // compiled with OpenGL usage?
00077 #define BIAS_HAVE_OPENGL
00078
00079 // compiled with Pthread usage?
00080 #define BIAS_HAVE_PTHREADS
00081
00082 // compiled with StereoI API usage (NVidia stereo rendering)
00083 /* #undef BIAS_HAVE_STEREOI */
00084
00085 // compiled with TIFF usage (image io library)?
00086 /* #undef BIAS_HAVE_TIFF */
00087
00088 // IDS uEye Camera support
00089 /* #undef BIAS_HAVE_UEYE */
00090
00091 // Video4Linux Support
00092 /* #undef BIAS_HAVE_V4L */
00093
00094 // compiled with Visual Leak Debugger usage?
00095 #define BIAS_HAVE_VLD
00096
00097 // compiled with wxWindows available?
00098 /* #undef BIAS_HAVE_WXWINDOWS */
00099
00100 // compiled with XML2 usage?
00101 #define BIAS_HAVE_XML2
00102
00103
00104 //
00105 // defines that represent a "build" setting that does not correspond 1:1 to lib
00106 //
00107
00108 // compiled with fonts fot GL drawing available (not a lib!) ?
00109 #define BIAS_HAVE_FONTGL
00110
00111 // VideoSource_DCAM was compiled (typically if one of dc1394 and 1394CAMERACMU is available)
00112 /* #undef BIAS_HAVE_DCAM */
00113
00114 // BIAS/Gui was compiled (typically if either gtk or wx available)
00115 #define BIAS_HAVE_GUI
00116
00117
00118
00119 // enable extra warnings, e.g. missing uuids in image?
00120 /* #undef BIAS_EXTRA_WARN  */
00121
00122 // disable warning when UUID in image is invalid
00123 /* #undef NO_EXTRA_WARN */
00124
00125 /// define the path to the source dir to be able to load test files from source (for dart and Examples)
00126 #define BIAS_TESTS_DATA "D:/home/jw/source/BIAS/Tests/data/"
00127
00128 // if defined an instance of BIAS::Image<T> (and dependant classed) ist explicitly created
00129 // uchar und float instances are always available
00130 #define BUILD_IMAGE_UCHAR
00131 #define BUILD_IMAGE_FLOAT
00132 // additonally instances are optionally compiled
00133 #define BUILD_IMAGE_INT
00134 #define BUILD_IMAGE_CHAR
00135 /* #undef BUILD_IMAGE_SHORT */
00136 /* #undef BUILD_IMAGE_USHORT */
00137 /* #undef BUILD_IMAGE_UINT  */
00138 /* #undef BUILD_IMAGE_DOUBLE  */
00139
00140
00141 //
00142 // build/link specific options
00143 //
00144
00145 // compiled in debug mode?
00146 #define BIAS_DEBUG
00147
00148 // compiled libraries static or shared ?
00149 // used to set declspec(import) in headers if required
00150 /* #undef BIAS_BUILD_SHARED_LIBS */
00151
00152 // use precompiled headers?
00153 /* #undef BIAS_USE_PRECOMPILED_HEADERS */
00154
00155
00156 // required for building DLL on Win32 and using the header files after build
00157 // This is an exception from the rule of not including anything here. (jw)
00158 // Jan Friso Evers, Jan Woetzel 08/2005
00159 #include <BIAS_DeclSpec.hh>
00160
00161
00162 #endif //__BIAS_CONFIG_H___6294562947_
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: BIAS_DeclSpec.hh Source File

BIAS_DeclSpec.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /*
00026 /// defines the BIAS API
00027 /// required for building/using a WIN32 DLL
00028 ///
00029 /// Is edited by hand.
00030 /// Add one unique define for each additinal lib.
00031 ///
00032 /// case 1: Linux. expand to nothing, no difference betwen static (.a) and shared (.so) build
00033 ///
00034 /// case 2: Windows:
00035 /// case 2.1: On compilation:
00036 /// case 2.1.1: static : expand to nothing
00037 /// case 2.1.2: shared : expand to ...export (on compilation)
00038 ///
00039 /// case 2.2: On using the headers/linking against this by third party lib:
00040 /// case 2.2.1: was static build : expand to nothing
00041 /// case 2.2.2: was shared build : expand to ...import (because it *was* compiled as a dll with export)
00042 ///
00043 /// Thus on *usage* of this file we need to know if we are using BIAS as shared or static build.
00044 /// This file is typically globally included through <bias_config.h>
00045 ///
00046 /// @author Jan Woetzel 2005/11/01-2006
00047 ///
00048 */
00049
00050 #ifndef _BIAS_DeclSpec__hh__
00051 #define _BIAS_DeclSpec__hh__
00052
00053
00054 #include <bias_config.h>
00055
00056
00057
00058 #if defined (WIN32) && defined(BIAS_BUILD_SHARED_LIBS)
00059
00060 /*
00061  we need to define export on compilation  or import on use.
00062  We exploit that cmakes auto setting xxx_EXPORTS (with S) on compliation
00063
00064  We need to write one switches for each built lib explicitly
00065  because nested macros dont work with preprocessor.
00066  Jan Woetzel, 2005
00067  */
00068
00069
00070 #  ifdef BIASCommon_EXPORTS
00071 #    define BIASCommon_EXPORT __declspec(dllexport)
00072 #  else
00073 #    define BIASCommon_EXPORT __declspec(dllimport)
00074 #  endif
00075
00076 #  ifdef BIASDebug_EXPORTS
00077 #    define BIASDebug_EXPORT __declspec(dllexport)
00078 #  else
00079 #    define BIASDebug_EXPORT __declspec(dllimport)
00080 #  endif
00081
00082 #  ifdef BIASFeatureDetector_EXPORTS
00083 #    define BIASFeatureDetector_EXPORT __declspec(dllexport)
00084 #  else
00085 #    define BIASFeatureDetector_EXPORT __declspec(dllimport)
00086 #  endif
00087
00088 #  ifdef BIASFilter_EXPORTS
00089 #    define BIASFilter_EXPORT __declspec(dllexport)
00090 #  else
00091 #    define BIASFilter_EXPORT __declspec(dllimport)
00092 #  endif
00093
00094 #  ifdef BIASGeometry_EXPORTS
00095 #    define BIASGeometry_EXPORT __declspec(dllexport)
00096 #  else
00097 #    define BIASGeometry_EXPORT __declspec(dllimport)
00098 #  endif
00099
00100 #  ifdef BIASGeometryBase_EXPORTS
00101 #    define BIASGeometryBase_EXPORT __declspec(dllexport)
00102 #  else
00103 #    define BIASGeometryBase_EXPORT __declspec(dllimport)
00104 #  endif
00105
00106 #  ifdef BIASGui_EXPORTS
00107 #    define BIASGui_EXPORT __declspec(dllexport)
00108 #  else
00109 #    define BIASGui_EXPORT __declspec(dllimport)
00110 #  endif
00111
00112 #  ifdef BIASImage_EXPORTS
00113 #    define BIASImage_EXPORT __declspec(dllexport)
00114 #  else
00115 #    define BIASImage_EXPORT __declspec(dllimport)
00116 #  endif
00117
00118 #  ifdef BIASImageBase_EXPORTS
00119 #    define BIASImageBase_EXPORT __declspec(dllexport)
00120 #  else
00121 #    define BIASImageBase_EXPORT __declspec(dllimport)
00122 #  endif
00123
00124 #  ifdef BIASMatcher2D_EXPORTS
00125 #    define BIASMatcher2D_EXPORT __declspec(dllexport)
00126 #  else
00127 #    define BIASMatcher2D_EXPORT __declspec(dllimport)
00128 #  endif
00129
00130 #  ifdef BIASMathAlgo_EXPORTS
00131 #    define BIASMathAlgo_EXPORT __declspec(dllexport)
00132 #  else
00133 #    define BIASMathAlgo_EXPORT __declspec(dllimport)
00134 #  endif
00135
00136 #  ifdef BIASMathBase_EXPORTS
00137 #    define BIASMathBase_EXPORT __declspec(dllexport)
00138 #  else
00139 #    define BIASMathBase_EXPORT __declspec(dllimport)
00140 #  endif
00141
00142 #  ifdef BIASStateEstimator_EXPORTS
00143 #    define BIASStateEstimator_EXPORT __declspec(dllexport)
00144 #  else
00145 #    define BIASStateEstimator_EXPORT __declspec(dllimport)
00146 #  endif
00147
00148 #  ifdef BIASNetworkComm_EXPORTS
00149 #    define BIASNetworkComm_EXPORT __declspec(dllexport)
00150 #  else
00151 #    define BIASNetworkComm_EXPORT __declspec(dllimport)
00152 #  endif
00153
00154 #  ifdef BIASVideoSource_EXPORTS
00155 #    define BIASVideoSource_EXPORT __declspec(dllexport)
00156 #  else
00157 #    define BIASVideoSource_EXPORT __declspec(dllimport)
00158 #  endif
00159
00160 #  ifdef BIASUtils_EXPORTS
00161 #    define BIASUtils_EXPORT __declspec(dllexport)
00162 #  else
00163 #    define BIASUtils_EXPORT __declspec(dllimport)
00164 #  endif
00165
00166
00167
00168 /*
00169  getting the export for STL/DTL into DLLs is quite tricky on MS Windows.
00170  We use "manual" explicit instantiation to reach interfaced class variable
00171
00172  See http://support.microsoft.com/kb/q168958/
00173  and
00174  http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html
00175
00176
00177  See BIAS/Filter/Label.hh for usage example.
00178
00179  @author Jan Woetzel 2005/11/02
00180 */
00181 #define BIAS_EXPORT_STL_VECTOR( dllmacro, vectype ) \
00182   template class dllmacro std::allocator< vectype >; \
00183   template class dllmacro std::vector<vectype, std::allocator< vectype > >;
00184
00185
00186 #define BIAS_EXPORT_STL_SET( dllmacro, settype ) \
00187   template class dllmacro std::allocator< settype >; \
00188   template struct dllmacro std::less< settype >; \
00189   template class dllmacro std::allocator< \
00190     std::_Tree_nod<std::_Tset_traits<settype,std::less<settype>, \
00191     std::allocator<settype>,false> > >; \
00192   template class dllmacro std::allocator<  \
00193     std::_Tree_ptr<std::_Tset_traits<settype,std::less<settype>, \
00194     std::allocator<settype>,false> > >; \
00195   template class dllmacro std::_Tree_ptr< \
00196     std::_Tset_traits<settype,std::less<settype>, \
00197     std::allocator<settype>,false> >; \
00198   template class dllmacro std::_Tree_nod< \
00199     std::_Tset_traits<settype,std::less<settype>, \
00200     std::allocator<settype>,false> >; \
00201   template class dllmacro std::_Tree_val< \
00202     std::_Tset_traits<settype,std::less<settype>, \
00203     std::allocator<settype>,false> >; \
00204   template class dllmacro std::set< settype, std::less< settype >, \
00205     std::allocator< settype > >;
00206
00207 /* exporting stl map to DLL does NOT work as expected
00208  Jan Woetzel
00209 */
00210 /*
00211 #define BIAS_EXPORT_STL_MAP( dllmacro, mapkey, mapvalue ) \
00212   template struct dllmacro std::pair< mapkey,mapvalue >; \
00213   template class dllmacro std::allocator< \
00214     std::pair<const mapkey,mapvalue> >; \
00215   template struct dllmacro std::less< mapkey >; \
00216   template class dllmacro std::allocator< \
00217     std::_Tree_ptr<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, \
00218     std::allocator<std::pair<const mapkey,mapvalue> >,false> > >; \
00219   template class dllmacro std::allocator< \
00220     std::_Tree_nod<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, \
00221     std::allocator<std::pair<const mapkey,mapvalue> >,false> > >; \
00222   template class dllmacro std::_Tree_nod< \
00223     std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, \
00224     std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
00225   template class dllmacro std::_Tree_ptr< \
00226     std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, \
00227     std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
00228   template class dllmacro std::_Tree_val< \
00229     std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, \
00230     std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
00231   template class dllmacro std::map< \
00232     mapkey, mapvalue, std::less< mapkey >, \
00233     std::allocator<std::pair<const mapkey,mapvalue> > >;
00234 */
00235
00236 #  else // (WIN32) && defined(BIAS_BUILD_SHARED_LIBS) ---------------------
00237
00238 /* we are either running Linux or building static,
00239    thus expand to nothing
00240    Jan Woetzel
00241 */
00242
00243 #    define BIASCommon_EXPORT
00244 #    define BIASDebug_EXPORT
00245 #    define BIASFeatureDetector_EXPORT
00246 #    define BIASFilter_EXPORT
00247 #    define BIASGeometry_EXPORT
00248 #    define BIASGeometryBase_EXPORT
00249 #    define BIASGui_EXPORT
00250 #    define BIASImage_EXPORT
00251 #    define BIASImageBase_EXPORT
00252 #    define BIASMatcher2D_EXPORT
00253 #    define BIASMathAlgo_EXPORT
00254 #    define BIASMathBase_EXPORT
00255 #    define BIASStateEstimator_EXPORT
00256 #    define BIASUtils_EXPORT
00257 #    define BIASNetworkComm_EXPORT
00258 #    define BIASVideoSource_EXPORT
00259
00260
00261
00262
00263 /* DLL: nothing to export (Jan Woetzel) */
00264 #define BIAS_EXPORT_STL_VECTOR( dllmacro, vectype )
00265 #define BIAS_EXPORT_STL_SET( dllmacro, settype )
00266 /* #define BIAS_EXPORT_STL_MAP( dllmacro, mapkey, mapvalue )  */
00267
00268
00269 #endif /* (WIN32) && defined(BIAS_BUILD_SHARED_LIBS)  --------------------- */
00270
00271 #endif /*  _BIAS_DeclSpec__hh__ */
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/bias_wx_glcanvas.h Source File

Gui

bias_wx_glcanvas.h

Go to the documentation of this file.
00001 #ifndef _bias_wx_glcanvas_h_
00002 #define _bias_wx_glcanvas_h_
00003
00004
00005
00006 /**
00007 \brief wrapper for <wx/glcanvas.h> to include glxew soon enough
00008 \author: Jan Woetzel
00009 */
00010
00011 #include <bias_config.h>
00012 #include <Gui/biasgl.h>
00013
00014 #if !defined(BIAS_HAVE_WXWINDOWS) && !defined(MIP_HAVE_WXWINDOWS)
00015 #error You need WX to compile. Please recompile BIAS and/or MIP with USE_WXWINDOWS.
00016 #else // WX
00017
00018
00019 // order is mandatory: include glew first to avoid redefinitions ! (JW)
00020 // wxglcanvas includes glx.h,
00021 // thus we must include glxew first to avoid conflict in glew case
00022 #if defined(BIAS_HAVE_GLEW) || defined(MIP_HAVE_GLEW)
00023 #  if !defined(WIN32)
00024 #    include <GL/glxew.h>
00025 #    define __glx_h__
00026 #  endif // GLEW
00027 #endif // Linux
00028 #include <wx/glcanvas.h>
00029
00030 #endif //WX
00031
00032
00033
00034 #endif // _bias_wx_glcanvas_h_
00035 // DO NOT ADD CODE AFTER THIS LINE
00036
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasabort.cpp Source File

Base » Debug

biasabort.cpp

Go to the documentation of this file.
00001
00002 // Jan Woetzel
00003
00004 #include "biasabort.hh"
00005
00006 // for abort:
00007 #include <stdlib.h>
00008
00009 // disable "unreachable" warning(s):
00010 //#ifdef WIN32
00011 //#  pragma warning (push, 2)
00012 //#  pragma warning (push)
00013 //#  pragma warning (disable: 4702)
00014 //#endif //WIN32
00015
00016 void BIAS::biasabort()
00017 {
00018 //#if defined(WIN32) && defined(_MSC_VER) && defined(BIAS_DEBUG)
00019 //  __debugbreak();
00020 //#endif
00021   abort();
00022 }
00023
00024 //#ifdef WIN32
00025 //#  pragma warning (pop)
00026 //#endif //WIN32
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasabort.hh Source File

Base » Debug

biasabort.hh

Go to the documentation of this file.
00001 #ifndef __biasabort_hh__
00002 #define __biasabort_hh__
00003
00004 #include <bias_config.h>
00005
00006 namespace BIAS {
00007
00008   /// wrapper for abort()
00009   /// Disables unreachable warnings.
00010   /// Cannot be header implemented beause to avoid multiply defined symbols.
00011   /// @author Jan Woetzel
00012   void BIASDebug_EXPORT biasabort();
00013
00014 } // end namescape
00015
00016 #endif // __biasabort_hh__
00017
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasadd.cpp Source File

Tools

biasadd.cpp

Go to the documentation of this file.
00001 // must be first:
00002 #include <Base/Common/LeakChecking.h>
00003 #include <Base/Debug/Error.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <Base/Image/ImageConvert.hh>
00006 #include <iostream>
00007
00008 using namespace BIAS;
00009 using namespace std;
00010
00011 /** @class biasadd
00012 @ingroup g_tools
00013 @brief tool for adding two images pixelwise
00014 @author unknown */
00015
00016 int main(int argc, char ** argv)
00017 {
00018   //system("pwd");
00019   if (argc<4){
00020     if (argc>0) cerr << argv[0] <<" <image 1> <image 2> <outfile> \n";
00021     cerr << "   adds image 1 to image 2 and writes the result to outfile"
00022       <<" scaling and shifting is done for unsigned char"<<
00023       endl;
00024     return 0; // for Dart testing
00025   }
00026
00027   ImageBase im1, im2, result;
00028   if (ImageIO::Load(argv[1], im1)!=0){
00029     BIASERR("error loading "<<argv[1]);
00030     return -1;
00031   }
00032   if (ImageIO::Load(argv[2], im2)!=0){
00033     BIASERR("error loading "<<argv[2]);
00034     return -1;
00035   }
00036   if (!im1.SamePixelAndChannelCount(im2)) {
00037     BIASERR("image size,depth,or ST does not match");
00038     exit(-2);
00039   }
00040   BIASASSERT(im1.GetWidth()==im2.GetWidth());
00041   BIASASSERT(im1.GetHeight()==im2.GetHeight());
00042
00043   Image<float> sumImg;
00044   Image<unsigned char> ucim1, ucim2,ucSum;
00045   sumImg.Init(im1.GetWidth(),im1.GetHeight(),im1.GetChannelCount());
00046   switch (im1.GetStorageType()){
00047   case ImageBase::ST_unsignedchar:
00048     {
00049       ucim1=im1;
00050       ucim2=im2;
00051       unsigned char *p1, *p2, *end;
00052       float *pSum;
00053       p1=ucim1.GetImageData();
00054       p2=ucim2.GetImageData();
00055       pSum=sumImg.GetImageData();
00056       end=p1+im1.GetSize();
00057       //add
00058       float max=0;
00059       while (p1!=end) {
00060         *pSum= (float)(*p1) + (float)(*p2);
00061         if (*pSum>max)
00062           max=*pSum;
00063         p1++; p2++; pSum++;
00064       }
00065
00066       // scale
00067       //      if (max>255.0)
00068       //        sumImg*= (255.0/max);
00069
00070       ImageConvert::ConvertST(sumImg,ucSum,ImageBase::ST_unsignedchar);
00071       if (ImageIO::Save(string(argv[3]), ucSum)!=0){
00072         BIASERR("error writing "<<argv[3]);
00073       }
00074       //     ucdiff.GetMinMaxPixelValue(ucmin, ucmax);
00075       //     cerr << "differences between "<<(int)ucmin<<" and "<<(int)ucmax<<endl;
00076       //     if (ucdiff.ScaleShiftBetween(0, 255)!=0){
00077       //       BIASERR("error scaling image");
00078       //     }
00079       //     if (ImageIO::Write("diff-scaled.mip", ucdiff)!=0){
00080       //       cerr << "error writing diff-scaled.mip "<<endl;
00081       //     }
00082
00083     }
00084     break;
00085   case ImageBase::ST_float:
00086
00087   default:
00088     cerr << "storage type not supported \n";
00089     break;
00090   }
00091   return 0;
00092 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasconvert.cpp Source File

Tools

biasconvert.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/Camera.hh>
00027 #include <Base/Image/ImageBase.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030 #include <Base/Image/ImageAttributes.hh>
00031 #include <Geometry/PMatrix.hh>
00032 #include <bias_config.h>
00033 #include <stdio.h>
00034
00035 #ifdef   WIN32
00036 #  include "Base/Common/getopt_W32.h"
00037 #else  //not WIN32
00038 #  include <getopt.h>
00039 #endif //WIN32
00040
00041 #include <Base/Common/BIASpragma.hh>
00042
00043 using namespace BIAS;
00044 using namespace std;
00045
00046 void usage()
00047 {
00048   cout << "Usage: biasconvert [options] infile outfile"<<endl;
00049   cout <<" Options: "<<endl
00050     <<" -g         : convert to grey values"<<endl
00051     //        <<" -d <int>   : downsample by power of 2"<<endl
00052     <<" -h         : show this help"<<endl
00053     <<" -p <file>  : add P-matrix"<<endl
00054     <<" -e Mode    : Mode=1 : compute K from EXIF data"<<endl
00055     <<" -v         : be verbose"<<endl
00056     <<" -c         : clip values to [0,255], only effective if -m or -o"
00057     << endl
00058     <<" -q quality : quality for lossy formats  [0;1] best=1"<<endl
00059     <<" -m <float> : modulate (scale) all pixel values with <float> (def:1)"
00060     <<endl
00061     <<" -z <float> : new value for zero (useful for inverting depth maps)"
00062     <<endl
00063     <<" -o <float> : offset (shift) all pixel values with <float> (def: 0)"
00064     <<endl
00065     <<" -M : use max dynamics after scaling, shifting and setting zero"
00066        <<endl
00067     <<" if neither -m nor -o is given float images are scaled "
00068     <<"and shifted automatically"<<endl
00069     <<endl;
00070 }
00071
00072
00073
00074
00075 int DetermineFiletype(const string &fn)
00076 {
00077   return BIAS::ImageIO::GetFileFormat(fn);
00078 }
00079
00080
00081
00082 void AdoptPMatrix(PMatrix &P,float scalex,float scaley)
00083 {
00084   PMatrix *newP=NULL;
00085   Vector3<double> C;
00086   KMatrix K;
00087   Matrix3x3<double> R;
00088
00089   if (P[0][0] != 0) {
00090     P.GetC(C);
00091     P.GetK(K);
00092     P.GetR(R);
00093
00094     K[0][0] *= scalex;
00095     K[1][1] *= scaley;
00096     K[0][2] *= scalex;
00097     K[1][2] *= scaley;
00098     // the skew
00099     K[0][1] *= scaley;
00100     newP = new PMatrix(K,R,C);
00101     P = *newP;
00102   }
00103 }
00104
00105
00106
00107 int ReadPMatrix(PMatrixBase &pmat,const string &filename)
00108 {
00109   int row,col;
00110   ifstream pmatfile(filename.c_str());
00111   if (!pmatfile){
00112     cerr << "unable to open " << filename<< endl;
00113     perror("");
00114     return -1;
00115   }
00116   pmatfile >> row >> col;
00117   if (!pmatfile){
00118     cerr << "error reading " << filename << endl;
00119     return -1;
00120   }
00121   if (row!=3 || col!=4){
00122     cerr << "P Matrix should have size 3x4, not: " <<row<<"x"<<col << endl;
00123     return -1;
00124   }
00125
00126
00127   for (int r=0; r < row; r++)
00128     for (int c=0; c< col; c++)
00129       pmatfile >> pmat[r][c];
00130   return 0;
00131
00132 }
00133
00134
00135
00136 /** @class biasconvert
00137 @ingroup g_tools
00138 @brief convert different image types
00139 @author evers */
00140 int main (int argc, char *argv[])
00141 {
00142   //    pic.SetDebugLevel(D_CAM_IO);
00143   bool togrey = false;
00144   bool verbose = false;
00145   int EXIFMode = 0;
00146   string pmatfile="";
00147   string ifile,ofile;
00148   //long int sec,usec;
00149   //int downbypoweroftwo =0;
00150   //float scalex=1.0;
00151   //float scaley=1.0;
00152   float scale = 1.0;
00153   float shift = 0.0;
00154   float newzero = 0.0;
00155   bool replacezero = false;
00156   bool scaleshift = false;
00157   bool clip = false;
00158   bool maxDynamics = false;
00159   int imagequality = BIAS_DEFAULT_IMAGE_QUALITY;
00160
00161   ImageBase ipic;
00162   Camera<unsigned char> ucocam;
00163   Camera<float> focam;
00164 #ifdef BUILD_IMAGE_USHORT
00165   Camera<unsigned short> usocam;
00166 #endif
00167   ImageBase::EStorageType OutST=ImageBase::ST_invalid;
00168
00169   ImageIO::TFileFormat ofiletype;
00170
00171   Camera<unsigned char> opic;
00172   PMatrix P_;
00173
00174
00175   if (argc <3) {
00176     usage();
00177     //exit(1);
00178     return 0; // for Dart testing
00179   }
00180
00181   // scan options
00182   char c=0;
00183   double quality=0;
00184   while (c>=0) {
00185     c = getopt(argc,argv,"Me:ghd:p:q:vm:o:cz:");
00186     switch (c) {
00187     case 'h':
00188     case ':':
00189     case '?':
00190       usage();
00191       exit(1);
00192       break;
00193     case 'e':// try to read exif data and make a K from it
00194       EXIFMode = atoi(optarg);
00195       if (EXIFMode>2) EXIFMode=2;
00196       if (EXIFMode<0) EXIFMode=0;
00197       break;
00198     case 'g':
00199       togrey = true;
00200       break;
00201       //     case 'd':
00202       //       downbypoweroftwo = atoi(optarg);
00203       //       scalex = 1.0/(float)(1<< downbypoweroftwo);
00204       //       scaley = 1.0/(float)(1<< downbypoweroftwo);
00205       //      break;
00206     case 'p':
00207       pmatfile=optarg;
00208       break;
00209     case 'q':
00210       quality = 100.0*float(atof(optarg));
00211       if (quality<0.0) quality=0.0;
00212       if (quality>100.0) quality=100.0;
00213       imagequality = (int)quality;
00214       break;
00215     case 'v':
00216       verbose = true;
00217       break;
00218     case 'c':
00219       clip = true;
00220       break;
00221     case 'o':
00222       shift = float(atof(optarg));
00223       scaleshift = true;
00224       break;
00225     case 'm':
00226       scale = float(atof(optarg));
00227       scaleshift = true;
00228       break;
00229     case 'z':
00230       replacezero = true;
00231       newzero =  float(atof(optarg));
00232       break;
00233     case 'M':
00234       maxDynamics = true;
00235       break;
00236     }
00237   }
00238
00239   // after getopt() all recognized options are before non-options
00240   ifile = argv[argc-2];
00241   ofile = argv[argc-1];
00242
00243   ofiletype = (ImageIO::TFileFormat)DetermineFiletype(ofile);
00244   if ((ofiletype ==-1) || (ofiletype==ImageIO::FF_unknown))
00245   {
00246     BIASERR("unknown FileFormat"<<ofile);
00247     exit(1);
00248   }
00249
00250   if (ofiletype == ImageIO::FF_pgm)
00251     togrey = true;
00252
00253   if (verbose) {
00254     cout <<"load "<<ifile<<", "<<flush;
00255   }
00256
00257   if (ImageIO::Load(ifile,ipic)<0)
00258   {
00259     BIASERR("could not load"<<ofile);
00260     exit(1);
00261   }
00262
00263   KMatrix KExif;
00264   if (EXIFMode>0) {
00265     //cout<<"reading exif tags"<<endl;
00266     ImageAttributes Att;
00267     Att.InitExifTags();
00268     if (Att.Read(ifile)!=BIAS_IMAGEATTRIBUTES_SUCCESS) {
00269       cerr<<"error reading exif tags ..."<<endl;
00270       EXIFMode = 0;
00271     } else {
00272       //Att.Print();
00273       KExif.SetIdentity();
00274       bool success = true;
00275       success = success && (Att.GetFocalLengthXPixel(KExif[0][0])>=0);
00276       success = success && (Att.GetFocalLengthYPixel(KExif[1][1])>=0);
00277       success = success && (Att.GetPrincipalPoint(KExif[0][2],
00278         KExif[1][2] )>=0);
00279       if (success) {
00280         cout<<"Found a K="<<KExif<<endl;
00281       } else {
00282         cout<<"Error, not enough EXIF data to get K:"<<KExif<<endl;
00283         EXIFMode = 0;
00284       }
00285     }
00286   }
00287
00288   if (ipic.GetStorageType() == ImageBase::ST_float) {
00289     if (verbose) cout <<"storagetype is float"<<endl;
00290     Camera<float> fcam(ipic);
00291     fcam.ParseMetaData();
00292     P_ = fcam.GetP();
00293
00294     if (ofiletype != ImageIO::FF_mip) {
00295       if (scaleshift){
00296
00297         if (verbose) {
00298           float min,max;
00299           fcam.GetMinMaxPixelValue(min,max);
00300           cout << "min = " << min << ", max = " << max << endl;
00301         }
00302
00303         float mean =0.0;
00304         float *fcamptr=fcam.GetImageData();
00305         float num_elem=0;
00306         //float max=(255-shift)/scale;
00307         //float min=-shift/scale;
00308         for (unsigned int i = 0; i < fcam.GetWidth()*fcam.GetHeight(); i++){
00309           if (*fcamptr != -1.0){
00310             mean += *fcamptr;
00311             num_elem++;
00312           }
00313           fcamptr++;
00314         }
00315
00316         mean /= num_elem;
00317         fcamptr=fcam.GetImageData();
00318         float variance=0.0;
00319         float scaledmean=0.0;
00320         for (unsigned int i = 0; i < fcam.GetWidth()*fcam.GetHeight();i++){
00321           if (*fcamptr != -1.0)
00322             variance += (*fcamptr-mean)*(*fcamptr-mean);
00323         }
00324
00325         fcam.ScaleShift(scale,shift);
00326         fcamptr=fcam.GetImageData();
00327         if (clip)
00328           for (unsigned int i = 0; i < fcam.GetWidth()*fcam.GetHeight();i++){
00329             *fcamptr = (*fcamptr < 255) ? *fcamptr : 255 ;
00330             *fcamptr = (*fcamptr > 0) ? *fcamptr : 0 ;
00331             scaledmean += *fcamptr;
00332             fcamptr++;
00333           }
00334
00335           if (verbose){
00336             variance/= num_elem;
00337             cout << "mean = " << mean  << ", scaledmean="
00338               << scaledmean/num_elem
00339               << ", variance = "
00340               << variance <<  ", fill rate = "
00341               <<  num_elem/fcam.GetWidth()/fcam.GetHeight() << endl;
00342           }
00343       } else {
00344         if (verbose) {
00345           float min,max;
00346           fcam.GetMinMaxPixelValue(min,max);
00347           cout << "min = " << min << ", max = " << max << endl;
00348         }
00349         fcam.ScaleShiftBetween(0,255);
00350       }
00351       //ucocam = fcam;
00352       //OutST = ImageBase::ST_float;
00353       OutST = ImageBase::ST_unsignedchar;
00354       ImageConvert::ConvertST(fcam, ucocam, OutST );
00355       // copy meta data to ucocam
00356       *ucocam.GetMetaData()=*fcam.GetMetaData();
00357       ucocam.ParseMetaData();
00358     } else {
00359       focam = fcam;
00360       if (scaleshift) {
00361         focam.ScaleShift(scale,shift);
00362         if (replacezero) {/*
00363           if (newzero==0.0) {
00364             float min, max;
00365             // automatic value range detection
00366             focam.GetMinMaxPixelValue(min,max);
00367             newzero = min - (max-min / 20.0);
00368         }*/
00369       float *focamptr = focam.GetImageData(),
00370             *fcamptr = fcam.GetImageData();
00371           for (unsigned int i = 0; i < focam.GetWidth()*focam.GetHeight();i++){
00372             if (*fcamptr++ == 255) {
00373               *focamptr = newzero;
00374               //cout<<"0";
00375             }
00376             focamptr++;
00377           }
00378         }
00379       }
00380       OutST = ImageBase::ST_float;
00381     }
00382
00383   } else if (ipic.GetStorageType() == ImageBase::ST_unsignedchar)  {
00384 #ifdef BIAS_DEBUG
00385     if (verbose) {
00386       if (Debug::GetGlobalDebugLevel()<D_CONVERT)
00387         Debug::SetGlobalDebugLevel(D_CONVERT);
00388     }
00389 #endif
00390     if (verbose) cout <<"storagetype is unsigned char"<<endl;
00391     Camera<unsigned char> uccam(ipic);
00392     OutST = ImageBase::ST_unsignedchar;
00393     uccam.ParseMetaData();
00394     P_ = uccam.GetP();
00395
00396     // all meta datas are preserved now (felix)
00397     if (verbose) cout <<"P: "<<P_<<endl;
00398
00399     // meta datas are lost here
00400     if (togrey) ImageConvert::ToGrey(uccam, ucocam);
00401     else ImageConvert::ToRGB(uccam, ucocam);
00402
00403     // copy meta data to ucocam
00404     *ucocam.GetMetaData()=*uccam.GetMetaData();
00405     ucocam.ParseMetaData();
00406   }
00407 #ifdef BUILD_IMAGE_USHORT
00408   else if (ipic.GetStorageType() == ImageBase::ST_unsignedshortint)  {
00409 #  ifdef BIAS_DEBUG
00410     if (verbose) {
00411       if (Debug::GetGlobalDebugLevel()<D_CONVERT)
00412         Debug::SetGlobalDebugLevel(D_CONVERT);
00413     }
00414 #  endif
00415     if (verbose) cout <<"storagetype is unsigned int"<<endl;
00416     Camera<unsigned short> uscam(ipic);
00417     Camera<unsigned char> tmpcam;
00418     OutST = ImageBase::ST_unsignedchar;
00419     uscam.ParseMetaData();
00420     P_ = uscam.GetP();
00421     // uccam.GetTime(sec,usec);
00422     // all meta datas are preserved now (felix)
00423     if (verbose) cout <<"P: "<<P_<<endl;
00424
00425     // now scale and shift if necessary
00426     if (scaleshift){
00427       Image<float> foim;
00428       ImageConvert::ConvertST(uscam, foim, ImageBase::ST_float);
00429       foim.ScaleShift(scale, shift);
00430       if (clip){
00431         foim.BelowThresholdToValue(0.0, 0.0);
00432         foim.AboveThresholdToValue(255.0, 255.0);
00433       }
00434       ImageConvert::ConvertST(foim, tmpcam, OutST);
00435     } else {
00436       ImageConvert::ConvertST(uscam, tmpcam, OutST);
00437     }
00438
00439     // meta datas are lost here
00440     if (togrey) ImageConvert::ToGrey(tmpcam, ucocam);
00441     else ImageConvert::ToRGB(tmpcam, ucocam);
00442
00443     // copy meta data to ucocam
00444     *ucocam.GetMetaData()=*uscam.GetMetaData();
00445     ucocam.ParseMetaData();
00446   }
00447 #endif
00448
00449   if (pmatfile != "") {
00450     if (verbose) cout <<"read "<<pmatfile<<", ";
00451     if (ReadPMatrix(P_,pmatfile) < 0)
00452       exit(1);
00453     ucocam.SetP(P_);
00454     focam.SetP(P_);
00455   }
00456
00457   //   if (downbypoweroftwo >0) {
00458   //     if (verbose) cout <<"rescale, "<<flush;
00459   //     Filter f;
00460   //     Camera<unsigned char> tmppic;
00461   //     f.DownsampleByPowerOfTwo(opic,tmppic,downbypoweroftwo);
00462   //     opic = tmppic;
00463   //     AdoptPMatrix(P_, scalex,scaley);
00464   //   }
00465
00466
00467   if (OutST == ImageBase::ST_unsignedchar) {
00468     if (EXIFMode>0) ucocam.SetK(KExif);
00469     ucocam.UpdateMetaData();
00470     if (verbose) cout <<"write unsigned char "<<ofile<<", "<<flush;
00471     if (ofiletype == ImageIO::FF_mip) {
00472     if(maxDynamics)
00473       ucocam.ScaleShiftBetween(0,255);
00474       ImageIO::Write(ofile, ucocam);
00475     } else {
00476       //     if (ofiletype !=ImageIO::FF_ppm && ofiletype !=ImageIO::FF_pgm) {
00477       int endofprefix = ofile.rfind('.');
00478       ofile = ofile.substr(0,endofprefix);
00479       ImageIO::ExportImage(ofile,ucocam,ofiletype,false,imagequality);
00480     }
00481   } else if (OutST == ImageBase::ST_float) {
00482     // all meta datas are preserved now (felix)
00483     if (EXIFMode>0) focam.SetK(KExif);
00484     focam.UpdateMetaData();
00485     if(maxDynamics)
00486       focam.ScaleShiftBetween(0,255);
00487     ImageIO::Write(ofile, focam);
00488     if (verbose) cout <<"write float "<<ofile<<", "<<flush;
00489   }
00490 #ifdef BUILD_IMAGE_USHORT
00491   else if (OutST == ImageBase::ST_unsignedshortint) {
00492     if (EXIFMode>0) usocam.SetK(KExif);
00493     usocam.UpdateMetaData();
00494     if(maxDynamics)
00495       ucocam.ScaleShiftBetween(0,255);
00496     ImageIO::Write(ofile, usocam);
00497     if (verbose) cout <<"write unsigned short "<<ofile<<", "<<flush;
00498   }
00499 #endif
00500
00501   if (verbose) cout <<"done"<<endl;
00502
00503
00504   return 0;
00505
00506 }
00507
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasdetectunvignettewx.cpp Source File

Tools

biasdetectunvignettewx.cpp

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002 #include <wx/spinctrl.h>
00003 #include <wx/dnd.h>
00004 #include <wx/filename.h>
00005 #include <wx/arrstr.h>
00006
00007
00008 #include <string>
00009 #include <sstream>
00010 #include <Gui/StringConv.hh>
00011 #include <Gui/ImageCanvas.hh>
00012 #include <Base/Image/ImageIO.hh>
00013 #include <Base/Image/ImageDraw.hh>
00014 #include <Image/Camera.hh>
00015 #include <Image/UnVignette.hh>
00016
00017
00018 #define FRAME_DEFAULT_SIZE  wxSize(700,580)
00019
00020 using namespace std;
00021 using namespace BIAS;
00022
00023 #undef WXWIN_COMPATIBILITY
00024
00025 #if !wxUSE_DRAG_AND_DROP
00026 #  error The dndFileTarget class requires drag and drop support in the WX library. Please recompile wxWidgets. __FILE__: __LINE__
00027 #endif
00028 /*
00029 ===============================================================================
00030 MainFrame
00031 ===============================================================================
00032 */
00033
00034 enum
00035 {
00036   // menu item IDs
00037   ID_Load,
00038   ID_Exit,
00039   ID_About,
00040   ID_Timer,
00041   ID_Steps,
00042   ID_UnVig,
00043   ID_WriteCameraData,
00044   ID_PPX,
00045   ID_PPY
00046 };
00047
00048 class MainFrame : public wxFrame
00049 {
00050 public:
00051   friend class DragAndDropTarget;
00052
00053   MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00054
00055   bool LoadImagesAndCalculate(const wxArrayString &fileNames);
00056
00057   /// fits the frame size if it is too small for curent image
00058   void FitSizetIfTooSmall();
00059
00060   double CalcImageMean3x3(BIAS::Image<unsigned char> img, int x,int y);
00061
00062 public:
00063  wxArrayString       ImageFileNames_;
00064
00065  //members /////////////////////////////
00066 protected:
00067
00068   BIAS::UnVignette    UnVignette_;
00069
00070   ImageCanvas*        ImageCanvasUC_;
00071
00072   wxTimer             Timer_;
00073   wxStaticText*       StaticLabel_;
00074   wxTextCtrl*         StepsTextCtrl_;
00075   wxTextCtrl*         PPXTextCtrl_;
00076   wxTextCtrl*         PPYTextCtrl_;
00077
00078   bool                bUnVignetteParamsReady_;
00079   bool                bImageLoaded_;
00080   int                 dNumberOfSteps_;
00081   // for file open dialog
00082   wxString            DefaultFile_;
00083   wxString            DefaultDir_;
00084   wxString            fileName_;
00085
00086   // the unsigned char image for display
00087   Image<unsigned char> unVigImage_;
00088   Image<unsigned char> ucImage_;
00089   ImageBase            origImage_;
00090
00091   std::vector<double>  controlPoints_;
00092   std::vector<double>  VignettePercentage_;
00093
00094   int dGroundThruthWhite_;
00095
00096   int ImageWidth_;
00097   int ImageHeight_;
00098
00099   //offsets from image center (pixel)
00100   int PrinciplePointX_;
00101   int PrinciplePointY_;
00102
00103   //member functions ///////////////////////
00104 protected:
00105   // event handlers
00106   void OnLoad(wxCommandEvent& event);
00107   void OnExit(wxCommandEvent& event);
00108   void OnAbout(wxCommandEvent& event);
00109
00110   void OnTimer(wxTimerEvent& event);
00111   void OnIdle(wxIdleEvent& event);
00112   void OnSize(wxSizeEvent& event);
00113
00114   void OnStepsEnter(wxCommandEvent& event);
00115
00116   void CalculateSteps(int dImageNumber);
00117   void UnVignette();
00118   void SaveUnVignetted(wxCommandEvent& event);
00119   void WriteCameraData(wxCommandEvent& event);
00120
00121   void RefitClients();
00122   DECLARE_EVENT_TABLE()
00123 };
00124
00125 BEGIN_EVENT_TABLE(MainFrame, wxFrame)
00126 EVT_MENU    (ID_Load,     MainFrame::OnLoad)
00127 EVT_MENU    (ID_Exit,     MainFrame::OnExit)
00128 EVT_MENU    (ID_About,    MainFrame::OnAbout)
00129 EVT_MENU    (ID_WriteCameraData,    MainFrame::WriteCameraData)
00130 EVT_TEXT_ENTER (ID_Steps, MainFrame::OnStepsEnter)
00131 EVT_TEXT_ENTER (ID_PPX, MainFrame::OnStepsEnter)
00132 EVT_TEXT_ENTER (ID_PPY, MainFrame::OnStepsEnter)
00133
00134 EVT_BUTTON  (ID_UnVig,    MainFrame::SaveUnVignetted)
00135 EVT_BUTTON  (ID_WriteCameraData, MainFrame::WriteCameraData)
00136
00137 EVT_TIMER   (ID_Timer, MainFrame::OnTimer)
00138 EVT_IDLE    (MainFrame::OnIdle)
00139 EVT_SIZE    (MainFrame::OnSize)
00140 END_EVENT_TABLE()
00141
00142
00143 // ctor
00144 MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00145 : wxFrame((wxFrame*)NULL, -1, title, pos, size)
00146 ,ImageCanvasUC_(NULL)
00147 {
00148   DefaultFile_      = wxT("test.pgm");
00149   DefaultDir_       = wxT("");
00150   dNumberOfSteps_   = 10;
00151   PrinciplePointX_  = 0;
00152   PrinciplePointY_  = 0;
00153   dGroundThruthWhite_ = 0;
00154   bUnVignetteParamsReady_ = false;
00155   bImageLoaded_ = false;
00156   // init timer
00157   Timer_.SetOwner(this, ID_Timer);
00158
00159   // create file menu
00160   wxMenu* fileMenu = new wxMenu;
00161   fileMenu->Append(ID_Load, wxT("&Open/Load...\tCtrl-O"), wxT("Open a file from disk for loading"));
00162   fileMenu->Append(ID_WriteCameraData, wxT("&Write Camera Data...\tCtrl-W"), wxT("Save camera vignette parameters"));
00163   fileMenu->AppendSeparator();
00164
00165   // create help menu
00166   wxMenu* helpMenu = new wxMenu;
00167   helpMenu->Append(ID_About, wxT("&About...\tF1"));
00168
00169   // create menu bar
00170   wxMenuBar* menuBar = new wxMenuBar;
00171   menuBar->Append(fileMenu, wxT("&File"));
00172   menuBar->Append(helpMenu, wxT("&Help"));
00173   SetMenuBar(menuBar);
00174
00175   wxToolBar* toolBar = CreateToolBar();
00176   toolBar->SetSize(1200,200);
00177   StepsTextCtrl_ = new wxTextCtrl(toolBar, ID_Steps, wxT("10"));
00178   toolBar->AddControl(new wxStaticText(toolBar, -1, wxT("  Nr. of Steps: ")));
00179   toolBar->AddControl(StepsTextCtrl_);
00180
00181   toolBar->AddSeparator();
00182   toolBar->AddControl(new wxButton(toolBar, ID_UnVig, wxT("Save Unvignetted")));
00183   toolBar->AddControl(new wxButton(toolBar, ID_WriteCameraData, wxT("Write Cameradata")));
00184   toolBar->AddSeparator();
00185   PPXTextCtrl_ = new wxTextCtrl(toolBar, ID_PPX, wxT("0"), wxDefaultPosition);
00186   PPYTextCtrl_ = new wxTextCtrl(toolBar, ID_PPY, wxT("0"), wxDefaultPosition);
00187
00188   toolBar->AddControl(new wxStaticText(toolBar, -1, wxT(" PPX: ")));
00189   toolBar->AddControl(PPXTextCtrl_);
00190   toolBar->AddControl(new wxStaticText(toolBar, -1, wxT(" PPY: ")));
00191   toolBar->AddControl(PPYTextCtrl_);
00192
00193   toolBar->Realize();
00194
00195
00196   // create status bar
00197   const int numFields = 2;
00198   CreateStatusBar(numFields);
00199   int widths[] = { -3, -1 };
00200   SetStatusWidths(numFields, widths);
00201   SetStatusText(wxT("Welcome to Unvignette detection"), 0);
00202
00203 }
00204
00205 void MainFrame::WriteCameraData(wxCommandEvent& /*event*/)
00206 {
00207   if(!bUnVignetteParamsReady_)
00208   {
00209     wxMessageDialog mDlg(this,wxT("Camera unvignette parameters are not ready, compute first!"),
00210       wxT("Not ready!"),wxOK);
00211     mDlg.ShowModal();
00212     return;
00213   }
00214   std::ofstream OutStream;
00215   wxArrayString paths;
00216   wxFileDialog fileDialog(
00217     this,                            // parent
00218     wxT("Choose xml file to save Camera Data."), // message
00219     DefaultDir_,                     // default directory
00220     wxT("UnVignetteParams.xml"),     // default file
00221     wxT("*.xml"),                    // wildcard
00222     wxSAVE|wxOVERWRITE_PROMPT); // style
00223
00224   if (fileDialog.ShowModal() == wxID_OK)
00225   {
00226     // get file names
00227     fileDialog.GetPaths(paths);
00228   } else {
00229     SetStatusText(wxT("Writing Camera Data cancelled"));
00230     return;
00231   }
00232
00233   DefaultDir_= fileDialog.GetDirectory();
00234
00235   OutStream.open(WxToAscii(paths.Last()),ios_base::out | ios_base::trunc);
00236   OutStream << setprecision(10);
00237   OutStream<<"<VignetteCalib>\n";
00238   for(unsigned int i = 0;i<controlPoints_.size();i++)
00239     OutStream<<"<MeasPt Dist=\""<<controlPoints_[i]<<"\" Fac=\""<<VignettePercentage_[i]<<"\"/>"<<endl;
00240   OutStream<<"</VignetteCalib>"<<endl;
00241   OutStream.flush();
00242   OutStream.close();
00243 }
00244
00245 void MainFrame::SaveUnVignetted(wxCommandEvent& /*event*/)
00246 {
00247   if(unVigImage_.IsEmpty())
00248   {
00249    wxMessageDialog mDlg(this,wxT("No image loaded, load first!"),
00250       wxT("Not ready!"),wxOK);
00251     mDlg.ShowModal();
00252     return;
00253   }
00254   wxArrayString paths;
00255   wxFileDialog fileDialog(
00256     this,                            // parent
00257     wxT("Choose image file to save unvignetted image."), // message
00258     DefaultDir_,                     // default directory
00259     wxT("TestUnVignette.mip"),       // default file
00260     wxT("*.mip"),                    // wildcard
00261     wxSAVE|wxOVERWRITE_PROMPT);      // style
00262
00263   if (fileDialog.ShowModal() == wxID_OK)
00264   {
00265     // get file names
00266     fileDialog.GetPaths(paths);
00267   } else {
00268     SetStatusText(wxT("Writing unvignetted image cancelled"));
00269     return;
00270   }
00271
00272   DefaultDir_= fileDialog.GetDirectory();
00273   BIAS::ImageIO::Write(WxToAscii(paths.Last()),unVigImage_);
00274 }
00275
00276 void MainFrame::OnStepsEnter(wxCommandEvent& /*event*/)
00277 {
00278   LoadImagesAndCalculate(ImageFileNames_);
00279   StepsTextCtrl_->SetFocus();
00280 }
00281
00282 void MainFrame::CalculateSteps(int dImageNumber)
00283 {
00284   ucImage_ = origImage_;
00285
00286   ImageWidth_ = ucImage_.GetWidth();
00287   ImageHeight_ = ucImage_.GetHeight();
00288
00289   if(dImageNumber == 0){
00290     controlPoints_.clear();
00291     VignettePercentage_.clear();
00292   }
00293   //this is diagonal distance of image rectangle
00294   double diagonal = sqrt(pow((double)ImageWidth_,2)+pow((double)ImageHeight_,2));
00295   //calculate stepswidth
00296   int step =  int ( diagonal / (dNumberOfSteps_*2) );
00297   int currentRadius=0;
00298   int valueX=0, valueY=0;
00299   double mean=0.0, mean1=0.0, mean2=0.0, mean3=0.0, mean4=0.0;
00300
00301   double alpha = atan((double)ImageHeight_/(double)ImageWidth_);
00302 //  unsigned char ** ida = ucImage_.GetImageDataArray();
00303   //go over steps and draw lines and calculate values
00304   for(int currentstep =0;currentstep <=dNumberOfSteps_;currentstep++)
00305   {
00306     // go into all 4 corners and build mean of 4 measurements
00307     for(int corner=0;corner<4;corner++)
00308     {
00309         // calculate ControlPoints on diagonal of image and on circle around PrinciplePoint with radius
00310       if(corner==0) // left top corner
00311       {
00312         valueX = ImageWidth_/2 + PrinciplePointX_ - int(currentRadius * cos(alpha));
00313         valueY= ImageHeight_/2 + PrinciplePointY_ - int(currentRadius * sin(alpha));
00314
00315         //only save control points if first image and first corner
00316         if(valueX<(ImageWidth_-1)&&valueY <(ImageHeight_-1)&& valueY >= 0  && valueX >= 0)
00317         {
00318           mean1 = CalcImageMean3x3(ucImage_,valueX,valueY);
00319           if(mean1 >= 0 && dImageNumber == 0)
00320             controlPoints_.push_back((double)currentRadius/((double)ImageWidth_/2));
00321           else if(mean1 < 0.0){
00322             corner =5;
00323             break;
00324           }
00325         }
00326       }
00327       else if(corner==1) //right top corner
00328       {
00329         valueX = int(currentRadius * cos(alpha) + ImageWidth_/2 + PrinciplePointX_);
00330         valueY= ImageHeight_/2 + PrinciplePointY_ - int(currentRadius * sin(alpha));
00331         mean2 = CalcImageMean3x3(ucImage_,valueX,valueY);
00332         if(mean2 <0.0){
00333           corner =5;
00334           break;
00335         }
00336
00337       }
00338       else if(corner==2) //left bottom corner
00339       {
00340         valueX = ImageWidth_/2 + PrinciplePointX_ - int(currentRadius * cos(alpha));
00341         valueY= int(currentRadius * sin(alpha) + ImageHeight_/2 + PrinciplePointY_);
00342         mean3 = CalcImageMean3x3(ucImage_,valueX,valueY);
00343         if(mean3 <0.0){
00344           corner =5;
00345           break;
00346         }
00347       }
00348       else if(corner==3) // right bottom corner
00349       {
00350         valueX = int(currentRadius * cos(alpha) + ImageWidth_/2 + PrinciplePointX_);
00351         valueY= int(currentRadius * sin(alpha) + ImageHeight_/2 + PrinciplePointY_);
00352         mean4 = CalcImageMean3x3(ucImage_,valueX,valueY);
00353         if(mean4 <0.0){
00354           corner =5;
00355           break;
00356         }
00357       }
00358     }// end go over corners
00359
00360     //check if all positions were in the image and valid else break;
00361     if(! (mean1>=0.0 && mean2>=0.0 && mean3>=0.0 && mean4>=0.0))
00362       break;
00363     // this is mean of all 4 corners
00364     mean =(mean1+mean2+mean3+mean4)/4;
00365     //this is the center, save the value as fixpoint
00366     double percentage = 0.0;
00367     if(currentstep==0){
00368       dGroundThruthWhite_ = int(mean);
00369       percentage = 1.0;
00370     }
00371     else
00372       percentage = ((double)dGroundThruthWhite_/mean);
00373     //only push_back if first image else make mean
00374     if(dImageNumber==0)
00375     {
00376       if(percentage>=0.0)
00377         VignettePercentage_.push_back(percentage);
00378       else
00379         VignettePercentage_.push_back(0.0);
00380       }
00381     else
00382     {
00383       if(percentage >=0.0)
00384       {
00385         VignettePercentage_[currentstep] *= dImageNumber;
00386         VignettePercentage_[currentstep] += percentage;
00387         VignettePercentage_[currentstep] /=(dImageNumber+1);
00388       }
00389     }//end else
00390
00391     //Draw circels in image
00392     BIAS::ImageDraw<unsigned char>::CircleCenter(ucImage_,ImageWidth_/2+ PrinciplePointX_,
00393       ImageHeight_/2+ PrinciplePointY_,currentRadius);
00394
00395     currentRadius += step;
00396   }
00397
00398   ImageCanvasUC_->Show(ucImage_, WxToAscii(fileName_));
00399   if (ImageCanvasUC_) ImageCanvasUC_->SetFocus();
00400
00401 }
00402
00403 void MainFrame::UnVignette()
00404 {
00405   if(!bImageLoaded_)
00406   {
00407     /*wxMessageDialog mDlg(this,"No image loaded, load first!",
00408       "Not ready!",wxOK);
00409     mDlg.ShowModal();*/
00410     return;
00411   }
00412   unVigImage_ = origImage_;
00413   UnVignette_.Init(controlPoints_,VignettePercentage_,unVigImage_.GetWidth(),
00414     unVigImage_.GetHeight(),PrinciplePointX_+unVigImage_.GetWidth()/2,
00415     PrinciplePointY_+unVigImage_.GetHeight()/2,LEAST_SQUARES);
00416   UnVignette_.Compute(unVigImage_);
00417
00418   bUnVignetteParamsReady_ = true;
00419 }
00420
00421 void MainFrame::RefitClients()
00422 {
00423   // canvas needs to be refitted on windows after loading (not sure why)
00424 #ifdef WIN32
00425   int w, h;
00426   GetClientSize(&w, &h);
00427   if (ImageCanvasUC_!=NULL)
00428     ImageCanvasUC_->SetSize(0, 0, w, h);
00429 #endif
00430 }
00431
00432 bool MainFrame::LoadImagesAndCalculate(const wxArrayString &fileNames)
00433 {
00434   dNumberOfSteps_ = atoi(WxToAscii(StepsTextCtrl_->GetValue()));
00435   PrinciplePointX_ = atoi(WxToAscii(PPXTextCtrl_->GetValue()));
00436   PrinciplePointY_ = atoi(WxToAscii(PPYTextCtrl_->GetValue()));
00437   for(unsigned int k=0;k<fileNames.Count();k++)
00438   {
00439     // load image
00440     fileName_ = fileNames[k];
00441
00442     if (ImageIO::Load(WxToAscii(fileName_), origImage_)!=0)
00443     {
00444       stringstream msg;
00445       msg << "Error loading " << fileName_;
00446       BIASERR(msg.str());
00447       SetStatusText(AsciiToWx(msg.str()));
00448     }
00449     else
00450     {
00451
00452       // create uc image canvas
00453       if(ImageCanvasUC_ == NULL)
00454       {
00455         ImageCanvasUC_ = new ImageCanvas(this, GetStatusBar(), 1);
00456       }
00457       bImageLoaded_ = true;
00458
00459       //calculate steps and show image
00460       this->CalculateSteps(k);
00461
00462       this->RefitClients();
00463
00464     }//end else (means loading succeeded
00465
00466   }//end for
00467
00468   //after collection of all data, finally unvignette
00469   this->UnVignette();
00470
00471   return true;
00472 }
00473
00474 void MainFrame::OnLoad(wxCommandEvent& /*event*/)
00475 {
00476   bool bLoadOk = true;
00477
00478   wxFileDialog fileDialog(
00479     this,                              // parent
00480     wxT("Choose file(s) to load"),     // message
00481     DefaultDir_,                       // default directory
00482     DefaultFile_,                      // default file
00483     wxT("*.*"),                        // wildcard
00484     wxOPEN | wxMULTIPLE);              // style
00485
00486   if (fileDialog.ShowModal() == wxID_OK)
00487   {
00488     // get file names
00489
00490     fileDialog.GetPaths(ImageFileNames_);
00491     // load last item
00492     bLoadOk = LoadImagesAndCalculate(ImageFileNames_);
00493   } else {
00494     SetStatusText(wxT("Loading canceled"));
00495     cout << "Canceled loading image" << endl;
00496   }
00497
00498   DefaultDir_= fileDialog.GetDirectory();
00499
00500 }
00501
00502 double MainFrame::
00503 CalcImageMean3x3(BIAS::Image<unsigned char> img, int x,int y)
00504 {
00505   int width, height;
00506   width = img.GetWidth();
00507   height = img.GetHeight();
00508   if( (x>1) && (y>1) && (x<width-1) &&  (y<height-1))
00509   {
00510     double mean = ((double)img.PixelValue(x-1,y-1) +
00511       (double)img.PixelValue(x,y-1)+(double)img.PixelValue(x+1,y-1)+
00512       (double)img.PixelValue(x-1,y)+ (double)img.PixelValue(x,y)+
00513       (double)img.PixelValue(x+1,y)+ (double)img.PixelValue(x-1,y+1) +
00514       (double)img.PixelValue(x,y+1) + (double)img.PixelValue(x+1,y+1))/9;
00515     return mean;
00516   }
00517   else
00518     return -1.0;
00519 }
00520
00521 void MainFrame::OnExit(wxCommandEvent& /*event*/){}
00522 void MainFrame::OnAbout(wxCommandEvent& /*event*/)
00523 {
00524 stringstream msg;
00525
00526   msg << "The BIAS Vignette Detection Program\n\n"
00527     << "http://www.mip.informatik.uni-kiel.de\n\n"
00528     << "build on " << __DATE__ << " " << __TIME__ << "\n"
00529     << "from file " << __FILE__ << "\n"
00530     << "GUI using: " << wxVERSION_STRING << "\n"
00531     << "Author : Ingo Schiller "<< "\n"
00532     << "\n";
00533
00534   wxMessageBox(AsciiToWx(msg.str()), wxT("About biasdetectunvignettewx"),
00535     wxOK | wxICON_INFORMATION, this);
00536 }
00537
00538 void MainFrame::OnTimer(wxTimerEvent& /*event*/){}
00539 void MainFrame::OnIdle(wxIdleEvent& /*event*/){}
00540 void MainFrame::OnSize(wxSizeEvent& /*event*/){ this->RefitClients();}
00541
00542 /*
00543 ===============================================================================
00544 DragAndDropTarget
00545 ===============================================================================
00546 */
00547
00548 /** @brief drag and drop files onto application.
00549 drag a file from MS explorer or kde file manager directly onto an application
00550 (instaed of using a load from filename function.)
00551 */
00552 class DragAndDropTarget : public wxFileDropTarget
00553 {
00554 public:
00555   DragAndDropTarget(MainFrame* frame);
00556
00557   virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
00558 protected:
00559   MainFrame* Frame_;
00560 };
00561
00562 DragAndDropTarget::DragAndDropTarget(MainFrame* frame)
00563 {
00564   Frame_ = frame;
00565 }
00566
00567 bool DragAndDropTarget::OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& filenames)
00568 {
00569   BIASASSERT( Frame_ != NULL);
00570   Frame_->ImageFileNames_ = filenames;
00571   Frame_->LoadImagesAndCalculate(filenames);
00572
00573   return true;
00574 }
00575
00576
00577 /*
00578 ===============================================================================
00579 BiasDetectUnvignetteApp
00580 ===============================================================================
00581 */
00582
00583 class BiasDetectUnvignetteApp : public wxApp
00584 {
00585 public:
00586   virtual bool OnInit();
00587 };
00588
00589 bool BiasDetectUnvignetteApp::OnInit()
00590 {
00591
00592   MainFrame* frame = new MainFrame(wxT("BiasDetectUnvignetteApp"), wxPoint(50,50), FRAME_DEFAULT_SIZE );
00593
00594
00595   // create drag and drop target
00596   DragAndDropTarget* dndTarget = new DragAndDropTarget(frame);
00597   frame->SetDropTarget(dndTarget);
00598
00599   // show frame
00600   frame->Show(TRUE);
00601   SetTopWindow(frame);
00602
00603   return TRUE;
00604 }
00605
00606
00607 IMPLEMENT_APP(BiasDetectUnvignetteApp)
00608
00609
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasdiff.cpp Source File

Tools

biasdiff.cpp

Go to the documentation of this file.
00001 // must be first:
00002 #include <Base/Common/LeakChecking.h>
00003
00004 #include <Base/Image/ImageIO.hh>
00005 #include "Base/Image/ImageConvert.hh"
00006 #include "Utils/Param.hh"
00007 #include <stdio.h>
00008 #include <iostream>
00009
00010 using namespace BIAS;
00011 using namespace std;
00012
00013
00014
00015 /** @class biasdiff
00016     @ingroup g_tools
00017     @brief tool for computing intensity difference of images
00018     @author woelk */
00019
00020 int main(int argc, char *argv[]){
00021   // Dart Testing (JW)
00022   if (argc>=2) if (strcmp(argv[1],"-darttest")==0){
00023     std::cout<<"started dart test: "<<argv[0]<<std::endl;
00024     return 0;
00025   }
00026
00027
00028   Param param;
00029   param.AddParamInt("border", "sets ROI", 0, 0,INT_MAX,'b');
00030   param.AddParamBool("absdiff","if set calculates abs difference else im1-im2",false, 'a');
00031   param.AddParamBool("help","",false, 'h');
00032   int next = param.ParseCommandLine(argc, argv);
00033
00034   param.DisableDestructorWarning();
00035
00036   if (argc<3 || *param.GetParamBool("help")){
00037     param.Usage();
00038     return -1;
00039   }
00040
00041   ImageBase im1, im2, diff;
00042   if (ImageIO::Load(argv[next], im1)!=0){
00043     BIASERR("error loading "<<argv[next]);
00044     return -1;
00045   }
00046   if (ImageIO::Load(argv[next+1], im2)!=0){
00047     BIASERR("error loading "<<argv[next+1]);
00048     return -1;
00049   }
00050
00051
00052   int border = *param.GetParamInt("border");
00053
00054   string newfilename;
00055   string fn1,fn2;
00056   fn1 = argv[next];
00057   fn2 = argv[next+1];
00058   fn1 = fn1.substr(0,fn1.rfind('.'));
00059   fn2 = fn2.substr(0,fn2.rfind('.'));
00060   newfilename = fn1+'_'+fn2+"_diff";
00061
00062   im1.SetROI(border, border, im1.GetWidth()-border, im1.GetHeight()-border);
00063   im2.SetROI(border, border, im2.GetWidth()-border, im2.GetHeight()-border);
00064   BIASASSERT(im1.GetWidth()==im2.GetWidth());
00065   BIASASSERT(im1.GetHeight()==im2.GetHeight());
00066
00067   Image<float> fim1, fim2, fdiff;
00068   Image<unsigned char> ucim1, ucim2, ucdiff;
00069   float fmin, fmax;
00070   unsigned char ucmin, ucmax;
00071
00072   switch (im1.GetStorageType()){
00073   case ImageBase::ST_unsignedchar:
00074     ucim1=im1;
00075     ucim2=im2;
00076     if(*param.GetParamBool("absdiff"))
00077       ucdiff.AbsDiff(ucim1, ucim2);
00078     else
00079       {
00080     ImageConvert::ConvertST(ucim1,fim1, ImageBase::ST_float);
00081     ImageConvert::ConvertST(ucim2,fim2, ImageBase::ST_float);
00082     fim1 -= fim2;
00083     fim1.ScaleShiftBetween(0.0,255.0);
00084     ImageConvert::ConvertST(fim1,ucdiff, ImageBase::ST_unsignedchar);
00085       }
00086
00087     if (ImageIO::Write(newfilename, ucdiff)!=0){
00088       cerr << "error writing diff.mip "<<endl;
00089     }
00090     ucdiff.GetMinMaxPixelValue(ucmin, ucmax);
00091     cerr << "differences between "<<(int)ucmin<<" and "<<(int)ucmax<<endl;
00092     if (ucdiff.ScaleShiftBetween(0, 255)!=0){
00093       BIASERR("error scaling image");
00094     }
00095     if (ImageIO::Write(newfilename+"-scaled", ucdiff)!=0){
00096       cerr << "error writing diff-scaled.mip "<<endl;
00097     }
00098     break;
00099   case ImageBase::ST_float:
00100     fim1=im1;
00101     fim2=im2;
00102     if(*param.GetParamBool("absdiff"))
00103       fdiff.AbsDiff(fim1, fim2);
00104     else
00105       {
00106     fdiff = fim1 - fim2;
00107       }
00108
00109     if (ImageIO::Write(newfilename, fdiff)!=0){
00110       cerr << "error writing diff.mip "<<endl;
00111     }
00112     fdiff.GetMinMaxPixelValue(fmin, fmax);
00113     cerr << "differences between "<<fmin<<" and "<<fmax<<endl;
00114     break;
00115   default:
00116     cerr << "unknown storage type\n";
00117     break;
00118   }
00119
00120   return 0;
00121 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasexit.cpp Source File

Base » Debug

biasexit.cpp

Go to the documentation of this file.
00001
00002 // Jan Woetzel
00003
00004 #include "biasexit.hh"
00005
00006 // for exit:
00007 #include <stdlib.h>
00008
00009 // disable "unreachable" warning(s):
00010 //#ifdef WIN32
00011 //#  pragma warning (push, 2)
00012 //#  pragma warning (push)
00013 //#  pragma warning (disable: 4702)
00014 //#endif //WIN32
00015
00016 void BIAS::biasexit(const int status)
00017 {
00018 //#if defined(WIN32) && defined(_MSC_VER) && defined(BIAS_DEBUG)
00019 //  __debugbreak();
00020 //#endif
00021   exit(status);
00022 }
00023
00024 //#ifdef WIN32
00025 //#  pragma warning (pop)
00026 //#endif //WIN32
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/biasexit.hh Source File

Base » Debug

biasexit.hh

Go to the documentation of this file.
00001 #ifndef __biasexit_hh__
00002 #define __biasexit_hh__
00003
00004 #include <bias_config.h>
00005
00006 namespace BIAS {
00007
00008   /// wrapper for exit()
00009   /// Disables unreachable warnings.
00010   /// Cannot be header implemented beause to avoid multiply defined symbols.
00011   /// @author Jan Woetzel
00012   void BIASDebug_EXPORT biasexit(const int status = 1);
00013
00014 } // end namescape
00015
00016 #endif // __biasexit_hh__
00017
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasextract.cpp Source File

Tools

biasextract.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/Camera.hh>
00027 #include <Image/CameraParam.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageAttributes.hh>
00030 #include <iostream>
00031 #include <fstream>
00032
00033 #ifdef   WIN32
00034 #include "Base/Common/getopt_W32.h"
00035 #else  //not WIN32
00036 #include <unistd.h>
00037 #endif //WIN32
00038
00039 using namespace std;
00040 using namespace BIAS;
00041
00042
00043 void usage()
00044 {
00045   cout <<"Usage: biasextract [options] Image ..."<<endl
00046     <<" Options: "<<endl
00047     <<"-a      : extract ascii string"<<endl
00048     <<"-t      : extract timestamp as [sec usec]"<<endl
00049     <<"-T      : extract timestamp as [msec]"<<endl
00050     <<"-s      : suppress current filename in output"<<endl
00051     <<"-P      : extract P-Matrix"<<endl
00052     <<"-p      : Decompose P-Matrix and extract axis-angle orientation"
00053     <<endl
00054     <<"-x      : extract pmatrix as xml data"<<endl
00055     <<"-K      : extract internal parameter matrix"<<endl
00056     <<"-R      : extract rotation matrix"<<endl
00057     <<"-r      : extract axis-angle orientation"<<endl
00058     <<"-C      : extract camera center position"<<endl
00059     <<"-A      : extract viewing direction"<<endl
00060     <<"-V      : extract 'down' vector"<<endl
00061     <<"-H      : extract 'right' vector"<<endl
00062     <<"-e      : compute K from EXIF data"<<endl
00063     <<"-c      : compute CameraParam from KMatrix in header"<<endl
00064     <<"-E      : compute CameraParam from EXIF data"<<endl
00065     <<"-u      : extract UID"<<endl
00066     <<"-O      : extract orientation"<<endl
00067     <<"-o file : write output to file"<<endl;
00068 }
00069
00070
00071 /** @class biasextract
00072 @ingroup g_tools
00073 @brief extract header data from image files: uid, time stamp orientation,
00074 KMatrix from EXIF data, ..
00075 @author evers */
00076 int main(int argc,char *argv[])
00077 {
00078   bool GetASCIIString = false;
00079   bool GetTimeStamp = false;
00080   bool GetTimeMsec = false;
00081   bool GetPMatrix = false;
00082   bool GetR = false;
00083   bool GetC = false;
00084   bool GetK = false;
00085   bool GetAxisAngle = false;
00086   bool GetKFromEXIF = false;
00087   bool GetCameraParamFromEXIF = false;
00088   bool GetCameraParamFromK = false;
00089   bool GetPXML = false;
00090   bool GetUID = false;
00091   bool GetOri = false;
00092   bool GetA = false;
00093   bool GetH = false;
00094   bool GetV = false;
00095   string Outfile;
00096   string PXMLName;
00097   ofstream ofs;
00098
00099   bool SuppressFilename = false;
00100   //int c;
00101   int c=1;
00102   while(c >0) {
00103     c = getopt(argc,argv,"aceo:ptrsux:ETPKRCAHVO");
00104     if (c>0){
00105       switch(c) {
00106       case 'a': GetASCIIString =true;
00107         break;
00108       case 't': GetTimeStamp = true;
00109         break;
00110       case 'e': GetKFromEXIF = true;
00111         break;
00112       case 'E': GetCameraParamFromEXIF = true;
00113         break;
00114       case 'c': GetCameraParamFromK = true;
00115         break;
00116       case 'T':
00117         GetTimeStamp = true;
00118         GetTimeMsec = true;
00119         break;
00120       case 'P': GetPMatrix = true;
00121         break;
00122       case 'p':
00123         GetPMatrix = true;
00124         GetK = true;
00125         GetR = true;
00126         GetAxisAngle = true;
00127         GetC = true;
00128         break;
00129       case 'R': GetR = true;
00130         break;
00131       case 'r': GetAxisAngle = true;
00132         break;
00133       case 'C': GetC = true;
00134         break;
00135       case 'A': GetA = true;
00136         break;
00137       case 'H': GetH = true;
00138         break;
00139       case 'V': GetV = true;
00140         break;
00141       case 'K': GetK = true;
00142         break;
00143       case 'u': GetUID = true;
00144         break;
00145       case 'O': GetOri = true;
00146         break;
00147       case 'o': Outfile = optarg;
00148         break;
00149       case 's': SuppressFilename = true;
00150         break;
00151       case 'x':  GetPXML = true;
00152         PXMLName = optarg;
00153         break;
00154       default:
00155         usage();
00156         //exit(1);
00157         return 0; // for Dart testing
00158       }
00159     }
00160   }
00161
00162
00163   if (argc-optind < 1) {
00164     cout <<"==> To few arguments."<<endl;
00165     usage();
00166     exit(1);
00167   }
00168   if (Outfile != "") {
00169     ofs.open(Outfile.c_str());
00170     if (!ofs) {
00171       perror(Outfile.c_str());
00172       exit(1);
00173     }
00174     cout <<"Writing to file: "<<Outfile<<endl;
00175     cout.rdbuf(ofs.rdbuf());
00176   } else {
00177     //     ofs = cout;
00178     if (!SuppressFilename)
00179       cout <<"Writing to stdout "<<endl;
00180   }
00181
00182   //  Image<unsigned char> tmp;
00183   ImageBase tmp;
00184
00185   for ( int i=optind; i<argc;i++){
00186     //     ImageIO::Read(argv[i],pic);
00187     //    ImageIO::Load(argv[i],pic);
00188     ImageIO::Load(argv[i],tmp);
00189     Camera<unsigned char> pic(tmp);
00190     pic.ParseMetaData();
00191     if(GetASCIIString) {
00192       cerr<<"ASCII: "<<pic.GetASCIIString()<<endl;
00193     }
00194
00195     if (GetKFromEXIF) {
00196       ImageAttributes Att;
00197       Att.InitExifTags();
00198       if (Att.Read(argv[i])!=BIAS_IMAGEATTRIBUTES_SUCCESS) {
00199         cerr<<"error reading exif tags ..."<<endl;
00200       } else {
00201         KMatrix KExif;
00202         KExif.SetIdentity();
00203         bool success = true;
00204         success = success && (Att.GetFocalLengthXPixel(KExif[0][0])>=0);
00205         success = success && (Att.GetFocalLengthYPixel(KExif[1][1])>=0);
00206         success = success && (Att.GetPrincipalPoint(KExif[0][2],
00207           KExif[1][2] )>=0);
00208         if (success) {
00209           cerr<<"K: ";
00210           cout<<KExif<<endl;
00211         } else {
00212           cerr<<"Error, not enough EXIF data to get K:"<<KExif<<endl;
00213         }
00214       }
00215     }
00216     if (GetCameraParamFromEXIF) {
00217 #ifdef BIAS_HAVE_XML2
00218       CameraParam cp;
00219       if (cp.ReadFromEXIF(argv[i])==0) {
00220         stringstream cpfilename;
00221         cpfilename <<argv[i]<<".cameraparam.xml";
00222         cp.WriteCameraData(cpfilename.str());
00223       } else {
00224         cerr<<"Error, not enough EXIF data to construct cameraparam"<<endl;
00225       }
00226 #else
00227       cerr<<"Missing XML2 support led to missing class BIAS::CameraParam, "
00228         <<"cant extract EXIF."<<endl;
00229 #endif
00230     }
00231     pic.ParseMetaData();
00232     if (!SuppressFilename) cout <<argv[i]<<"\t"<<endl;
00233     if (GetUID)   cout<<pic.GetUID()<<"  ";
00234     if (GetTimeStamp) {
00235       long sec,usec;
00236       pic.GetTime(sec,usec);
00237       // cout <<"true msec: "<<pic.GetTime()<<endl;
00238       if (GetTimeMsec) cout<< (sec % 1000) * 1000 + (usec / 1000);
00239       else cout<<sec<<"  "<<usec;
00240     }
00241     if (GetOri) {
00242       float y,p,r;
00243       pic.GetOrientation(y,p,r);
00244       cout<<y<<"   "<<p<<"   "<<r;
00245     }
00246     if (GetPMatrix || GetPXML) {
00247       //pic.PrintAppData(std::cout);
00248       PMatrix P;
00249       P.SetZero();
00250       if (pic.IsPValid()) {
00251         // read composed P directly, ignore possibel decomposition
00252         P=pic.GetP();
00253       };
00254       // otherwise copose form K,R,C
00255       // compose, if P is zero, too
00256       if (!pic.IsPValid() || P.IsZero() ){
00257         KMatrix K;
00258         RMatrix R;
00259         K.SetIdentity();
00260         R.SetIdentity();
00261         BIAS::Vector3<double> C(0,0,0);
00262
00263         // check if valid Pose in meta data
00264         if (pic.IsRValid())
00265           R=pic.GetR();
00266         else
00267           BIASERR("could not read R, assuming identity");
00268
00269         if (pic.IsCValid())
00270           C=pic.GetC();
00271         else
00272           BIASERR("could not read C, assuming zero");
00273
00274         if (pic.IsKValid())
00275           K=pic.GetK();
00276         else
00277           BIASERR("could not read K, assuming identity");
00278
00279         // compose from separation:
00280         P.Compose(K, R, C);
00281       }
00282       if (GetPMatrix)
00283         cout<< P<<endl;
00284       if (GetPXML) {
00285 #ifdef BIAS_HAVE_XML2
00286         P.XMLWrite(PXMLName);
00287 #else
00288         cerr<<"No XML support found, so no writing of P as xml !"<<endl;
00289 #endif
00290       }
00291     }
00292     if (GetK) {
00293       KMatrix K;
00294       if (pic.IsKValid()) {
00295         K = pic.GetK();
00296       } else {
00297         pic.GetP().GetK();
00298       }
00299       cout<<"K: "<<K<<endl;
00300     }
00301     if (GetR){
00302       PMatrix P = pic.GetP();
00303       cout<<"R: "<<P.GetR()<<endl;
00304     }
00305     if (GetAxisAngle){
00306       PMatrix P = pic.GetP();
00307       Vector3<double> axis;
00308       double angle;
00309       RMatrix R;
00310       R = P.GetR();
00311       R.GetRotationAxisAngle(axis, angle);
00312       cout<<"r[axis, angle]: "<<axis[0]<<" "<<axis[1]
00313       <<" "<<axis[2]<<" "<<angle<<endl;
00314       cout<<"|axis|= "<<axis.NormL2()<<endl;
00315       cout<<"R: "<<R<<endl;
00316       RMatrix temp;
00317       temp.Set(axis, angle);
00318       cout<<"R-axisAngle:\n "<<R-temp<<endl;
00319
00320     }
00321     if (GetC){
00322       PMatrix P = pic.GetP();
00323       cout<<"C: "<<P.GetC()<<endl;
00324     }
00325     if (GetA){
00326       PMatrix P = pic.GetP();
00327       cout<<"A: "<<P.GetA()<<endl;
00328     }
00329     if (GetH){
00330       PMatrix P = pic.GetP();
00331       cout<<"H: "<<P.GetH()<<endl;
00332     }
00333     if (GetV){
00334       PMatrix P = pic.GetP();
00335       cout<<"V: "<<P.GetV()<<endl;
00336     }
00337
00338     if (GetCameraParamFromK) {
00339 #ifdef BIAS_HAVE_XML2
00340       KMatrix K;
00341       bool HaveK = true;
00342       if (pic.IsKValid()) {
00343         K = pic.GetK();
00344       } else if (pic.IsPValid()) {
00345         K = pic.GetP().GetK();
00346       } else {
00347         HaveK = false;
00348       }
00349       if (HaveK) {
00350         CameraParam cp(K, pic.GetWidth(), pic.GetHeight());
00351         stringstream cpfilename;
00352         cpfilename <<argv[i]<<".cameraparam.xml";
00353         cp.WriteCameraData(cpfilename.str());
00354       } else {
00355         cerr<<"Error, no K to construct cameraparam"<<endl;
00356       }
00357 #else
00358       cerr<<"Missing XML2 support led to missing class BIAS::CameraParam, "
00359         <<"cant extract EXIF."<<endl;
00360 #endif
00361     }
00362     cout<<endl;
00363   }
00364
00365   if (Outfile != "")
00366     ofs.close();
00367
00368   return 0;
00369 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasfilter.cpp Source File

Tools

biasfilter.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Filter/Mean.hh>
00028 #include <Filter/Median.hh>
00029 #include <Base/Image/ImageIO.hh>
00030
00031 #ifndef  WIN32
00032 #include <unistd.h>
00033 #else  //WIN32
00034 #include "Base/Common/getopt_W32.h"
00035 #endif //WIN32
00036
00037 using namespace std;
00038 using namespace BIAS;
00039
00040
00041 enum filtertype {none, mean, median};
00042
00043
00044 void usage()
00045 {
00046   cout <<"Usage: biasfilter [options] infile outfile"<<endl
00047        <<" Options: "<<endl
00048        <<"-r radius  : size of the filter kernel: size = 2 * radius + 1"<<endl
00049        <<"-a         : use mean filter"<<endl
00050        <<"-b         : use median filter"<<endl
00051        <<"-v         : verbose"<<endl
00052        <<"-t thresh  : median: ignore x<=thresh"<<endl;
00053 }
00054
00055 /** @class biasfilter
00056     @ingroup g_tools
00057     @brief tool to filter an image with Mean or Median,...
00058     @author evers */
00059 int main(int argc, char *argv[])
00060 {
00061   Median<unsigned char , unsigned char> MedianFilterUC;
00062   Median<float, float> MedianFilterFLT;
00063   Mean<unsigned char, unsigned char> meanfilterUC;
00064   Mean<float, float> meanfilterFLT;
00065   //  RankValue rankvaluefilter;
00066   filtertype UseFilter = none;
00067   int rad = -1;
00068   //int c;
00069   int c=1;
00070   float threshold = -FLT_MAX;
00071   bool verbose = false;
00072
00073   while(c >0) {
00074     c = getopt(argc,argv,"r:abt:v");
00075     if (c>0){
00076       switch(c){
00077       case 'a': UseFilter = mean;
00078     break;
00079       case 'b': UseFilter = median;
00080     break;
00081       case 'r': rad = atoi(optarg);
00082     break;
00083       case 't': threshold = float(atof(optarg));
00084     break;
00085       case 'v': verbose = true;
00086     break;
00087     //     case 'h' :
00088       default:
00089     usage();
00090     exit(1);
00091       }
00092     }
00093   }
00094
00095   if (argc-optind <2 ) {
00096     cout <<"==> To few arguments."<<endl;
00097     usage();
00098     exit(1);
00099   }
00100
00101   if (UseFilter == none ) {
00102     cout <<"==> No filtertype specified."<<endl;
00103     usage();
00104     exit(1);
00105   }
00106
00107   if (verbose){
00108     switch (UseFilter) {
00109     case median: cout<<"Median filter on zero values";
00110       break;
00111     case mean: cout<<"Mean filter";
00112       break;
00113     default: ;
00114     }
00115     cout <<" size "<<2*rad+1<<"x"<<2*rad+1;
00116     if (threshold > -FLT_MAX)
00117       cout <<" threshold "<<threshold;
00118     cout <<" : "<<argv[optind]<<" -> "<<argv[optind+1]<<endl;
00119   }
00120
00121   ImageBase inimage,outimage;
00122   if (ImageIO::Read(argv[optind],inimage)<0) exit(1);
00123
00124   if (inimage.GetStorageType() == ImageBase::ST_unsignedchar) {
00125     Image<unsigned char> img1(inimage),img2;
00126     switch (UseFilter){
00127     case median:
00128       MedianFilterUC.FilterOnlyZeroIgnoreZero3x3(img1, img2);
00129       break;
00130     case mean:
00131       //      meanfilterUC.Set(rad);
00132       meanfilterUC.Filter(img1,img2);
00133       break;
00134     default:
00135       cout <<"==> No filtertype specified."<<endl;
00136       usage();
00137       exit(1);
00138       break;
00139     }
00140     ImageIO::Write(argv[optind+1],img2);
00141   }
00142
00143   if (inimage.GetStorageType() == ImageBase::ST_float) {
00144     Image<float> img1(inimage),img2;
00145     switch (UseFilter){
00146     case median:
00147       MedianFilterFLT.FilterOnlyZeroIgnoreZero3x3(img1, img2);
00148       break;
00149     case mean:
00150        //      meanfilterUC.Set(rad);
00151       meanfilterFLT.Filter(img1,img2);
00152       break;
00153     default:
00154       cout <<"==> No filtertype specified."<<endl;
00155       usage();
00156       exit(1);
00157       break;
00158     }
00159     ImageIO::Write(argv[optind+1],img2);
00160   }
00161
00162
00163
00164   return 0;
00165 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/biasgl.h Source File

Gui

biasgl.h

Go to the documentation of this file.
00001 #ifndef _biasgl_h_
00002 #define _biasgl_h_
00003
00004 /**
00005 \brief wrapper to include all gl, glut, glew headers that corresponds to current HAVE_.. configurations settings.
00006
00007 Requires OpenGL (BIAS_HAVE_OPENGL).
00008 Switches glew usage optionally based on B
00009 \attention Does NOT include glu.h.
00010
00011 - keep choice of using glew/gl/glut/...  flexible in client apps
00012   while asserting glew is included first!
00013 - disable GL warnings in a central place.
00014 - allows precompiled headers
00015 - Please note that the app. has to call glewinit like this
00016 iff glew is used:
00017 \verbatim
00018   if (!(GLEW_VERSION_1_1)) {
00019     // init and try again:
00020     GLenum result = glewInit();
00021     if (result != GLEW_OK){
00022       BIASERR("glewInit failed.");
00023     };
00024   }
00025 \endverbatim
00026 \author: Jan Woetzel, Bogumil Bartczak
00027 */
00028
00029 #include <bias_config.h>
00030
00031 #ifndef BIAS_HAVE_OPENGL
00032 #  error Please recompile BIAS with USE_OPENGL to use OpenGL.
00033 #endif // BIAS_HAVE_OPENGL
00034
00035
00036 #ifdef WIN32
00037 // NO lean and mean here because too many BIAS files
00038 // rely on global windows.h instead of direct includes
00039 // for the specialized headers like Winsock2.h JW
00040 //#  define WIN32_LEAN_AND_MEAN
00041 #  include <windows.h>
00042 #endif
00043
00044
00045 #if defined(BIAS_HAVE_GLEW) || defined(MIP_HAVE_GLEW)
00046
00047 // USE glew:
00048 // must define kind of lib/src for glew extension handler lib
00049 // (linker errors otherwise) !
00050 // decide weterh we want to link against static or dll glew
00051 //#if defined(WIN32) && defined(_DLL)
00052
00053 // Windows DLL build linking against glew DLL
00054 //#  ifndef GLEW_BUILD
00055 //#    define GLEW_BUILD
00056 //#  endif // GLEW_BUILD
00057
00058 // checks, only one of both!
00059 //#  ifdef GLEW_STATIC
00060 //#    error GLEW_STATIC and GLEW_BUILD cannot be defined at once
00061 //#  endif
00062
00063 //#  else // WIN32 _DLL
00064
00065 // Win32 static build or Linux
00066 #  ifndef GLEW_STATIC
00067 #    define GLEW_STATIC
00068 #  endif // GLEW_STATIC
00069
00070 //// checks, only one of both!
00071 //#  ifdef GLEW_BUILD
00072 //#    error GLEW_BUILD is defined but shouldnt be, GLEW_STATIC is too.
00073 //#  endif
00074
00075
00076 //#endif // WIN32 _DLL
00077
00078
00079
00080 #  include <GL/glew.h> // includes gl.h and glu.h
00081 #  ifdef WIN32
00082 #    include <GL/wglew.h>
00083 #  else // WIN32
00084 // workaround for glx
00085 // do NOT use glxew for now because glxChooseFBConfig crashes, then.
00086 //#    include <GL/glxew.h>
00087
00088 #  endif //WIN32
00089
00090 #else //BIAS_HAVE_GLEW or MIP_HAVE_GLEW
00091
00092 #  include <GL/gl.h>
00093
00094 #endif // BIAS_HAVE_GLEW or MIP_HAVE_GLEW
00095
00096
00097
00098 //
00099 // Do not include wxglcanvas here
00100 // because then we are bound to glew if compiling with wx
00101 // because wx/glcanvas.h includes glx.h (JW)
00102 // Thus, include glxew.h *before* the few
00103 //
00104 //#if defined(BIAS_HAVE_WXWINDOWS) || defined(MIP_HAVE_WXWINDOWS)
00105 // order is mandatory: include glew first to avoid redefinitions !!! (JW)
00106 // there *must not* be a gl.h inclusion before glew !
00107 // wxglcanvas includes glx.h,
00108 // thus we must include glxew first to avoid conflict in glew case
00109 //#  if defined(BIAS_HAVE_GLEW) || defined(MIP_HAVE_GLEW)
00110 //#    if !defined(WIN32)
00111 //#      include <GL/glxew.h>
00112 //#    endif // GLEW
00113 //#  endif // Linux
00114 //#  include <wx/glcanvas.h>
00115 //#endif // HAVE_WXWINDOWS
00116
00117
00118 #if defined (BIAS_HAVE_GLUT) || defined(MIP_HAVE_GLUT)
00119 // avoid some entry calls /4505 warnings with this define on WIN32:
00120 #  define GLUT_BUILDING_LIB
00121 #  include <GL/glut.h>
00122 #endif // BIAS_HAVE_GLUT
00123
00124
00125 // macros, e.g. CHECK_GL_ERROR
00126 #include <Gui/glcheck.h>
00127
00128
00129 // --- define special token extension values for "hidden" features (jw) ---
00130 //#ifndef GL_CRYCBY_422_NVX
00131 //#  define GL_CRYCBY_422_NVX   0x600A
00132 //#endif
00133 //#ifndef GL_YCRYCB_422_NVX
00134 //#  define GL_YCRYCB_422_NVX   0x600B
00135 //#endif
00136
00137 //#if defined WIN32 && !defined(EXT_timer_query)
00138 // -- Nvidia OpenGL rendering timing
00139 // -- without stalling the render pipeline (in contrast to glFinish)
00140 //#  ifndef GLint64EXT
00141 //    typedef          __int64 GLint64EXT;
00142 //#  endif // GLint64EXT
00143 //#  ifndef GLuint64EXT
00144 //    typedef unsigned __int64 GLuint64EXT;
00145 //#  endif // GLuint64EXT
00146 //#  ifndef GL_TIME_ELAPSED_EXT
00147 //#    define GL_TIME_ELAPSED_EXT 0x88BF
00148 //#  endif // GL_TIME_ELAPSED_EXT
00149 //  void glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT  *params);
00150 //  void glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
00151 //#endif // WIN32 & !EXT_timer_query
00152
00153
00154 #endif // _biasgl_h_
00155 // DO NOT ADD CODE AFTER THIS LINE
00156
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasinsert.cpp Source File

Tools

biasinsert.cpp

Go to the documentation of this file.
00001 // jw
00002 #include <Base/Common/LeakChecking.h>
00003
00004 #include "Base/Image/ImageIO.hh"
00005 #include "Base/Image/ImageConvert.hh"
00006 #include "Filter/Rescale.hh"
00007 #include "Utils/Param.hh"
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012
00013 /** @class biasinsert
00014 @ingroup g_tools
00015 @brief program for inserting an image into another
00016 @author grest 04/05 */
00017 int main(int argc, char  *argv[])
00018 {
00019     Param params;
00020     params.DisableDestructorWarning();
00021     params.AddParamInt("tlx","top left insert x-position",-1,-1,10000,'x');
00022     params.AddParamInt("tly","top left insert y-position",-1,-1,10000,'y');
00023
00024     params.AddParamInt("xsize","pixel size of insertion in x-direction"
00025         " defaults to same",-1,-1,10000,'X');
00026
00027     if (argc<3) {
00028         cout<<"usage:"<<argv[0]<<" <img> <imgToInsert> [resultimage]"<<endl;
00029         cout<<endl<<
00030             "       inserts the <imgToinsert> into <img> at the specified"<<
00031             " position, the position can be anyone! "<<endl<<
00032             "       default is right next to <img>"<<endl<<
00033             "       [resultImg] optional mip or ppm image"
00034             " , default: result is written to result.mip"<<
00035             endl<<endl;
00036         params.Usage();
00037         return 0;
00038     }
00039     int nextParam = params.ParseCommandLine(argc,argv);
00040
00041     BIAS::ImageBase img, imgToIns,imgRescaled;
00042     if (ImageIO::Load(argv[nextParam],img)!=0) {
00043         cerr<<"error loading:"<<argv[nextParam]<<endl;
00044     }
00045     nextParam++;
00046     if (ImageIO::Load(argv[nextParam],imgToIns)!=0) {
00047         cerr<<"error loading:"<<argv[nextParam]<<endl;
00048     }
00049
00050     if ( (img.GetStorageType()!=ImageBase::ST_unsignedchar) ||
00051         (imgToIns.GetStorageType()!=ImageBase::ST_unsignedchar) ) {
00052             cerr<<"only implemented for unsigned char images yet"<<endl;
00053             exit(-1);
00054         }
00055         if ( (img.GetColorModel()!=imgToIns.GetColorModel() ) ) {
00056             cerr<<"WARNING: colormodels do not match"<<endl<<
00057                 "         converting <imgToinsert> to:"<<int(img.GetColorModel()) <<endl;
00058             BIAS::ImageBase dummy;
00059             if (ImageConvert::Convert(imgToIns,dummy,img.GetColorModel()) !=0 ) {
00060                 cerr<<"couldn't convert, exiting"<<endl;
00061                 exit(-1);
00062             }
00063             imgToIns=dummy;
00064         }
00065
00066         nextParam++;
00067         std::string resultFile;
00068         if (nextParam<argc) {
00069             resultFile=argv[nextParam];
00070         } else resultFile="result.mip";
00071
00072         double insertionSize= *params.GetParamInt("xsize");
00073         Image<unsigned char> scaledImg(imgToIns), resultImg(imgToIns);
00074         if (insertionSize!=-1) {
00075             Rescale<unsigned char, unsigned char>  scaler;
00076             scaler.SetFactor((double)imgToIns.GetWidth()/ insertionSize);
00077             scaler.Filter(resultImg,scaledImg);
00078         }
00079         int insertionX= *params.GetParamInt("tlx");
00080         if (insertionX==-1) insertionX=img.GetWidth();
00081         int insertionY= *params.GetParamInt("tly");
00082         if (insertionY==-1) insertionY=0;
00083
00084         int resultXSize= insertionX + scaledImg.GetWidth();
00085         if ( resultXSize<(int)img.GetWidth() )
00086             resultXSize=img.GetWidth();
00087         int resultYSize= insertionY + scaledImg.GetHeight();
00088         if ( resultYSize<(int)img.GetHeight() )
00089             resultYSize=img.GetHeight();
00090
00091         resultImg.Release();
00092         resultImg.Init(resultXSize,resultYSize,img.GetChannelCount());
00093         resultImg.SetColorModel(img.GetColorModel());
00094         resultImg.SetROI(0,0, img.GetWidth(), img.GetHeight());
00095         resultImg.Paste2ROI(img);
00096         resultImg.SetROI(insertionX,insertionY,
00097             insertionX+scaledImg.GetWidth(),
00098             insertionY+scaledImg.GetHeight());
00099         resultImg.Paste2ROI(scaledImg);
00100
00101         if (resultFile.find(".ppm")>0) {
00102             ImageIO::ExportImage(resultFile,resultImg,ImageIO::FF_ppm);
00103             cout<<"resulting ppm-image written to "<<resultFile<<endl;
00104         } else {
00105             ImageIO::Write(resultFile,resultImg);
00106             cout<<"resulting mip-image written to "<<resultFile<<endl;
00107         }
00108     return 0;
00109 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasmerge.cpp Source File

Tools

biasmerge.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <Base/Image/ImageBase.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <stdio.h>
00030 #include <map>
00031 #include <string>
00032 #include "Geometry/PMatrix.hh"
00033 #include "Image/HomographyMapping.hh"
00034 #include "Image/Camera.hh"
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 void usage()
00040 {
00041     cout << "Usage: biasmerge [options] files"<<endl;
00042     cout <<" Options: "<< endl
00043         <<" -s         : search next smaller(string compare) PMatrix file"<<endl
00044         <<" -b         : assume bbc camera file format"<<endl
00045         <<" -a         : enforce aspect ratio 1, adapt P and image"<<endl
00046         <<" -p         : force principal point=image center, adapt P and image"
00047         << endl
00048         << endl;
00049     cout <<"This program opens the image files given by the command line, "
00050         <<"e.g. image037.pgm, looks at the command line for a file "
00051         <<"image037.pgm.mat and attaches the pmatrix to the pgm header."<<endl
00052         <<"With special options, you can enforce constraints on the KMatrix."
00053         <<endl
00054         <<"Returns: 0 on success, 1 if errors occured."<<endl<<endl
00055         <<"e.g. biasmerge *.ppm *.ppm.mat"<<endl<<endl;
00056 }
00057
00058 int DetermineFiletype(const string &fn, ImageIO::TFileFormat &thetype)
00059 {
00060     int EndOfPrefix;
00061     string suffix;
00062
00063     EndOfPrefix = fn.rfind('.');
00064
00065     suffix = fn.substr(EndOfPrefix+1,fn.length());
00066     if (suffix == "pnm") thetype =  ImageIO::FF_ppm;
00067     else if (suffix == "ppm") thetype =  ImageIO::FF_ppm;
00068     else if (suffix == "pgm") thetype =  ImageIO::FF_pgm;
00069     else if (suffix == "mip") thetype =  ImageIO::FF_mip;
00070     else return -1;
00071
00072     return 0;
00073 }
00074
00075
00076 /** @class biasmerge
00077 @ingroup g_tools
00078 @brief merge a projection matrix and an image, write header data to image
00079 @author koeser */
00080 int main (int argc, char *argv[])
00081 {
00082     bool Nearest = false, BBC = false, EnforceAspect = false,
00083         EnforcePP = false;
00084     double ShrinkFactor = 1.0;
00085     int i = 1;
00086     bool param = true;
00087     while ((i<argc) && (param)) {
00088         param = false;
00089         if (!strcmp("-s",argv[i])) {
00090             std::cout << "Using nearest P from command line also."<<endl;
00091             Nearest = true;
00092             i++;
00093             param = true;
00094             continue;
00095         }
00096         if (!strcmp("-b",argv[i])) {
00097             std::cout << "Trying to load BBC camera data."<<endl;
00098             BBC = true;
00099             i++;
00100             param = true;
00101             continue;
00102         }
00103         if (!strcmp("-a",argv[i])) {
00104             std::cout << "Enforcing aspect ratio 1."<<endl;
00105             EnforceAspect = true;
00106             i++;
00107             param = true;
00108             continue;
00109         }
00110         if (!strcmp("-p",argv[i])) {
00111             std::cout << "Enforcing principal point to image center."<<endl;
00112             EnforcePP = true;
00113             i++;
00114             param = true;
00115             continue;
00116         }
00117         if (!strcmp("-h",argv[i])) {
00118             std::cout << "Half image width and height."<<endl;
00119             ShrinkFactor = 0.5;
00120             i++;
00121             param = true;
00122             continue;
00123         }
00124     }
00125
00126     if (i>=argc) {
00127         usage();
00128         return -1;
00129     }
00130
00131     ImageIO::TFileFormat FileType;
00132     bool ErrorFlag = false;
00133     int IOResult = 0;
00134     BIAS::ImageBase CurImage;
00135
00136     PMatrix P;
00137     BIAS::UUID CurrUID;
00138     map<string, PMatrix> mapP;
00139     map<string, BIAS::UUID> mapPUIDs;
00140
00141     for (int j=i; j<argc; j++) {
00142         if (strstr(argv[j], ".mat")!=NULL) {
00143             cout<<"arg "<<j<<" is .mat";
00144             PMatrix P;
00145             BIAS::UUID Puid;
00146             char ctmp;
00147             P.SetZero();
00148             if (!BBC) {
00149                 // check for UID in PMatrix
00150                 std::ifstream fs( argv[j] );
00151                 fs>>P;
00152                 do {
00153                     fs.get(ctmp);
00154                 } while (!fs.eof() && ctmp!='#');
00155                 if (!fs.eof()){
00156                     fs.get(ctmp);
00157                     fs >> Puid;
00158                     fs.close();
00159                     mapPUIDs[argv[j]] =Puid;
00160                 };
00161             } else {
00162                 P.LoadBBC(argv[j]);
00163             }
00164             cout << "P is "<<P<<endl;
00165             mapP[argv[j]] = P;
00166         }
00167     }
00168     if (mapP.size()==0) {
00169         BIASERR("No matrices found !");
00170         return -1;
00171     }
00172
00173
00174
00175
00176     for (;i<argc;i++) {
00177         if (strstr(argv[i], ".mat")!=NULL) continue;
00178         cout<< "Trying "<<argv[i]<<endl;
00179         if (DetermineFiletype(argv[i], FileType)!=0) {
00180             BIASERR("Skipping current file because of unknown/unsuported format: "
00181                 <<argv[i]<<endl<<"PMatrix can be written to mip,pgm,ppm,pnm");
00182             ErrorFlag = true;
00183             continue;
00184         }
00185
00186         IOResult = ImageIO::Load(argv[i], CurImage);
00187         if (IOResult!=0) {
00188             ErrorFlag = true;
00189             BIASERR("Error "<<IOResult <<" reading "<< argv[i]);
00190             continue;
00191         }
00192
00193         stringstream ss, filename;
00194         filename << argv[i];
00195         ss << argv[i] <<".mat";
00196         if (mapP.find(ss.str())!=mapP.end()) {
00197             cout<<"Found a mat file for "<< filename.str() <<endl;
00198             P = mapP[ss.str()];
00199             if (mapPUIDs.find(ss.str())!=mapPUIDs.end()) {
00200                 cout<<"Found a UID in P-mat file "<< filename.str() << " UID "
00201                     << mapPUIDs[ss.str()] << endl;
00202                 CurrUID = mapPUIDs[ss.str()];
00203             }
00204         } else {
00205             if (!Nearest) {
00206                 cout <<"Found NO mat file for "<< filename.str()
00207                     <<" !!!!! SKIPPING"<<endl;
00208                 continue;
00209             }
00210             map<string,PMatrix>::iterator it = mapP.lower_bound(ss.str());
00211             if (it != mapP.begin()) it--;
00212             else cout<<"First element, cant use smaller, must use larger !";
00213             P = it->second;
00214             cout <<"Found next mat file for "<< filename.str()
00215                 <<": "<<it->first<<endl;
00216         }
00217
00218         if (EnforceAspect || EnforcePP || (ShrinkFactor!=1.0)) {
00219             bool SkipWarping = true;
00220             // check KMatrix, which components to adapt ?
00221             KMatrix K = P.GetK();
00222             int newimsizex = CurImage.GetWidth(),
00223                 newimsizey = CurImage.GetHeight();
00224
00225             // check if aspect ratio is one and adapt if desired
00226             if (EnforceAspect) {
00227                 if (K[0][0]>K[1][1]) {
00228                     newimsizey = (int)rint(double(newimsizey) * double(K[0][0]/K[1][1]));
00229                     K[1][2] *= double(K[0][0]/K[1][1]);
00230                     K[1][1] = K[0][0];
00231                     SkipWarping = false;
00232                 } else if (K[0][0]<K[1][1]) {
00233                     newimsizex = (int)rint(double(newimsizex) * double(K[1][1]/K[0][0]));
00234                     K[0][2] *= double(K[1][1]/K[0][0]);
00235                     K[0][0] = K[1][1];
00236                     SkipWarping = false;
00237                 }
00238             }
00239             // check if principal point is in image center and adapt if desired
00240             if (EnforcePP) {
00241                 if (rint(K[0][2]*2.0)!=(newimsizex-1)) {
00242                     cout<<"changing ppx from "<<K[0][2];
00243                     SkipWarping = false;
00244                     K[0][2] = double(newimsizex-1) / 2.0;
00245                     cout<<" to "<<K[0][2]<<endl;
00246                 }
00247                 if (rint(K[1][2]*2.0)!=(newimsizey-1)) {
00248                     cout<<"changing ppy from "<<K[1][2];
00249                     SkipWarping = false;
00250                     K[1][2] = double(newimsizey-1) / 2.0;
00251                     cout<<" to "<<K[1][2]<<endl;
00252                 }
00253             }
00254             if (ShrinkFactor != 1.0) {
00255                 K[0][0] *= ShrinkFactor;
00256                 K[1][1] *= ShrinkFactor;
00257                 K[0][2] *= ShrinkFactor;
00258                 K[1][2] *= ShrinkFactor;
00259                 newimsizex = int(rint(double(newimsizex)*ShrinkFactor));
00260                 newimsizey = int(rint(double(newimsizey)*ShrinkFactor));
00261                 SkipWarping = false;
00262             }
00263
00264             // do we have any changes for the image data ?
00265             if (!SkipWarping) {
00266                 // compose new P
00267                 RMatrix R;
00268                 Vector3<double> C;
00269                 P.GetR(R);
00270                 P.GetC(C);
00271                 PMatrix PCorrected(K, R, C);
00272
00273                 // compute homography for backward mapping and transform image
00274                 HMatrix H = P.GetK() * K.Invert();
00275
00276                 cout<<"Warping image from "<<CurImage.GetWidth()<<"x"
00277                     <<CurImage.GetHeight()<<" pixels to "<<newimsizex<<"x"
00278                     <<newimsizey<<" pixels."<<endl;
00279                 cout<<" K was "<<P.GetK()<<endl;
00280                 cout<<" K new "<<K<<endl;
00281                 cout<<"Warping homography is "<<H<<endl;
00282                 switch (CurImage.GetStorageType()) {
00283         case ImageBase::ST_unsignedchar: {
00284             HomographyMapping<unsigned char, unsigned char> Mapper;
00285             Image<unsigned char> origtemplated,
00286                 aspect1(newimsizex, newimsizey, CurImage.GetChannelCount());
00287             aspect1.SetColorModel(CurImage.GetColorModel());
00288             origtemplated.StealImage(CurImage);
00289             Mapper.SetHomography(H);
00290             Mapper.Map(origtemplated, aspect1);
00291             CurImage.StealImage(aspect1);
00292             P = PCorrected;
00293             break;
00294                                          }
00295         default:BIASERR("storagetype "<<int(CurImage.GetStorageType())
00296                     <<" not implemented, please add the bit of code here");
00297
00298                 }
00299                 filename << "_warped";
00300             }
00301         }
00302
00303         // just a dummy class to do the metadata job for us
00304         BIAS::Camera<unsigned char> c;
00305         c.SetP(P);
00306         if (P.IsMetric()) {
00307             c.SetK(P.GetK());
00308             c.SetR(RMatrix(P.GetR()));
00309             c.SetC(P.GetC());
00310         }
00311         c.UpdateMetaData();
00312         CurImage.SetMetaData(*c.GetMetaData());
00313         // if the image does not have a valid UID check for a UID in the PMatrix
00314         if (!(CurImage.GetUID().IsValid()) && CurrUID.IsValid()){
00315             CurImage.SetUID(CurrUID);
00316             cout << "set UID from P matrix because image doesn't have a valid UID"
00317                 << endl;
00318         }
00319
00320         if (FileType==ImageIO::FF_mip) {
00321             IOResult = ImageIO::Write(filename.str(), CurImage, false, false );
00322         } else {
00323             IOResult = ImageIO::ExportImage(filename.str(), CurImage,
00324                 FileType, false,
00325                 0, false);
00326         }
00327         if (IOResult!=0) {
00328             ErrorFlag = true;
00329             BIASERR("Error writing "<< filename.str());
00330             continue;
00331         } else cout<<filename.str()<<endl;
00332
00333     }
00334     if (ErrorFlag) cout << "There were errors." <<endl;
00335     if (ErrorFlag) return 1;
00336     return 0;
00337 }
00338
00339
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragma.hh Source File

Base » Common

BIASpragma.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026     This file defines pragmas for BIAS WIN32 compilation.
00027
00028     It is used as a central place to disable some warnings for pedantic W4 compilation
00029     instead of spreading pragmas over all source files directly
00030     (e.g. minpack and other dirty code)
00031     Please include it *only* in CPP files directy to avoid side effects as
00032     #include <Base/Common/BIASpragma.hh>
00033
00034     If you need it in *header* files, use:
00035     \verbatim
00036       #include <Base/Common/BIASpragmaStart.hh>
00037       //... the bad code, bad foreign headers etc...
00038       #include <Base/Common/BIASpragmaEnd.hh>
00039     \endverbatim
00040     to avoid sie effects with client code.
00041
00042     You can switch on/off each individual warning messages globally, here
00043     while "dirty code" exists in BIAS/MIP.
00044     This way you can compile your own project with W4
00045     without taking care of possible internal problems of BIAS or third party libraries including warning noise from STL.
00046
00047     And if you want to improve BIAS, just enable warning one by one and fix them in the code.
00048
00049     The idea is to enable warnings one by one until all BIAS/MIP are finally fixed.
00050
00051     @author Jan Woetzel 08/2005
00052 */
00053
00054 #if defined(WIN32) && defined(_MSC_VER)
00055
00056 /* suppress STL warning noise (Jan Woetzel 2005)
00057  see:  http://www.codeproject.com/vcpp/stl/stl_without_warnings.asp?df=100&forumid=2917&exp=0&select=114698&tid=80903
00058  warning numbers get enabled in yvals.h: */
00059 /* #include <yvals.h>  */
00060
00061 #define _CRT_SECURE_NO_DEPRECATE
00062
00063 #pragma warning (disable: 4005)
00064 /* #pragma warning (disable: 4018) */ /* signed/unsigned mismatch */
00065 #pragma warning (disable: 4099) /* .pdb not found, no debugging information (not catchable in source) */
00066 #pragma warning (disable: 4100) /* unreferenced formal parameter */
00067 #pragma warning (disable: 4127) /* conditional expression is constant */
00068 #pragma warning (disable: 4131)
00069 #pragma warning (disable: 4204)
00070 #pragma warning (disable: 4210)
00071 #pragma warning (disable: 4217)
00072 #pragma warning (disable: 4221) /* Linker warning: no public symbols found, members will be inaccessible */
00073 #pragma warning (disable: 4231)
00074 #pragma warning (disable: 4238)
00075 #pragma warning (disable: 4244)
00076 /* #pragma warning (disable: 4245) */ /* conversion from 'type1' to 'type2', signed/unsigned mismatch */
00077 #pragma warning (disable: 4251)
00078 #pragma warning (disable: 4275)
00079 #pragma warning (disable: 4290)
00080 #pragma warning (disable: 4305)
00081 #pragma warning (disable: 4310)
00082 #pragma warning (disable: 4389)
00083 #pragma warning (disable: 4505)
00084 #pragma warning (disable: 4511)
00085 #pragma warning (disable: 4512) /* 'class' : assignment operator could not be generated */
00086 #pragma warning (disable: 4530)
00087 /* #pragma warning (disable: 4663) */  /* C++ language change: to explicitly specialize class template 'vector' */
00088 #pragma warning (disable: 4701)
00089 #pragma warning (disable: 4702) /* unreachable code */
00090 #pragma warning (disable: 4706)
00091 /* #pragma warning (disable: 4710) */ /* function not inlined */
00092 /* #pragma warning (disable: 4786) */ /* identifier was truncated to 'number' characters in the debug information */
00093
00094 /* #pragma warning (disable: 4798) */ /* linker tool confict (debug/release, threadde/single etc) (not catchable in source) */
00095 /* #pragma warning (disable: 4799) */ /* .pdb not found, no debugging information (not catchable in source) */
00096 #pragma warning (disable: 4996) /* deprecated warning (for VS2005) */
00097
00098 #endif /* WIN32 & MSC */
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragmaEnd.hh Source File

Base » Common

BIASpragmaEnd.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 /**
00025     This file defines compiler pragmas for BIAS to disable some warning on WIN32 /W4 pedantic compilation mode.
00026     You MUST use the Start/End files only in pairs !
00027     Use it like this in .cpp file:
00028     \verbatim
00029     #include <BIASpragmaStart.hh>
00030     ... code ...
00031     #include <BIASpragmaStop.hh>
00032     \endverbatim
00033     @author Jan Woetzel 08/2005
00034 */
00035
00036 #if defined(WIN32) && defined(_MSC_VER)
00037 #  pragma warning( pop )
00038 #endif  /* WIN32 & MSC */
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/BIASpragmaStart.hh Source File

Base » Common

BIASpragmaStart.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 /**
00025     This file defines programs for BIAS to disable some warning on WIN32 /W4 pedantic compilation mode.
00026     You MUST use the Start/End files only in pairs !
00027     Use it like this in .cpp file:
00028     \verbatim
00029     #include <BIASpragmaStart.hh>
00030     ... code ...
00031     #include <BIASpragmaStop.hh>
00032     \endverbatim
00033     @author Jan Woetzel 08/2005
00034 */
00035
00036 #if defined(WIN32) && defined(_MSC_VER)
00037 /* #  pragma warning( push ,3 ) */
00038 #  pragma warning( push )
00039 #  include <Base/Common/BIASpragma.hh>
00040 #endif /* WIN32 & MSC */
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasprojection.cpp Source File

Tools

biasprojection.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Image/ImageDraw.hh>
00031 #include <stdio.h>
00032 #include <map>
00033 #include <string>
00034 #include "Geometry/PMatrix.hh"
00035 #include "Image/Camera.hh"
00036
00037 #include <Base/Common/BIASpragma.hh>
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042 void usage()
00043 {
00044     cout << "Usage: biasprojection -p file [options] files"<<endl;
00045     cout <<" Options: "<< endl
00046         <<" -s         : search next smaller(string compare) PMatrix file"<<endl
00047         <<" -b         : assume bbc camera file format"<<endl
00048         <<" -p file    : file containing 3d points"<<endl
00049         << endl;
00050     cout <<"This program opens the image files given by the command line"
00051         <<", e.g. image037.pgm, looks at the command line for a file "
00052         <<" image037.pgm.mat and projects 3d points into the images."<<endl
00053         <<" using the pmatrices."<<endl
00054         <<" cutouts are written around the projection."<<endl
00055         <<"Returns: 0 on success, 1 if errors occured."<<endl<<endl;
00056 }
00057
00058 int DetermineFiletype(const string &fn, ImageIO::TFileFormat &thetype)
00059 {
00060     int EndOfPrefix;
00061     string suffix;
00062
00063     EndOfPrefix = fn.rfind('.');
00064
00065     suffix = fn.substr(EndOfPrefix+1,fn.length());
00066     if (suffix == "pnm") thetype =  ImageIO::FF_ppm;
00067     else if (suffix == "ppm") thetype =  ImageIO::FF_ppm;
00068     else if (suffix == "pgm") thetype =  ImageIO::FF_pgm;
00069     else if (suffix == "mip") thetype =  ImageIO::FF_mip;
00070     else return -1;
00071
00072     return 0;
00073 }
00074
00075
00076 /** @class biasprojection
00077 @ingroup g_tools
00078 @brief read images and pmatrices, projects 3d points ant cut out region
00079 @author koeser */
00080 int main (int argc, char *argv[])
00081 {
00082     bool Nearest = false, BBC = false;
00083     vector<HomgPoint3D> Points;
00084     int i = 1;
00085     bool param = true;
00086     while ((i<argc) && (param)) {
00087         param = false;
00088         if (!strcmp("-s",argv[i])) {
00089             std::cout << "Using nearest P from command line also."<<endl;
00090             Nearest = true;
00091             i++;
00092             param = true;
00093         }
00094         if (!strcmp("-b",argv[i])) {
00095             std::cout << "Trying to load BBC camera data."<<endl;
00096             BBC = true;
00097             i++;
00098             param = true;
00099         }
00100         if (!strcmp("-p",argv[i])) {
00101             i++;
00102             if (argc<=i) {
00103                 cerr<<"error, no point file given after -p"<<endl;
00104                 exit(-1);
00105             }
00106             std::cout << "loading points from "<< argv[i]<<endl;
00107             ifstream infile(argv[i++], ios::in);
00108             if (infile.eof() || !infile.good()){
00109                 cerr<<"error opening point file"<<endl;
00110                 exit(-1);
00111             }
00112             // reading points
00113             HomgPoint3D thepoint(0,0,0);
00114             while (!infile.eof()) {
00115                 infile >> thepoint[0];
00116                 infile >> thepoint[1];
00117                 infile >> thepoint[2];
00118                 if (infile.eof() || !infile.good()) break;
00119                 Points.push_back(thepoint);
00120                 cout<<"Read 3D point "<<thepoint<<endl;
00121             }
00122             param = true;
00123         }
00124
00125     }
00126
00127     if (i>=argc || Points.size()==0) {
00128         usage();
00129         return -1;
00130     }
00131
00132     ImageIO::TFileFormat FileType;
00133     bool ErrorFlag = false;
00134     int IOResult = 0;
00135     BIAS::Image<unsigned char> CurImage;
00136
00137     PMatrix P;
00138     map<string, PMatrix> mapP;
00139     for (int j=i; j<argc; j++) {
00140         if (strstr(argv[j], ".mat")!=NULL) {
00141             cout<<"arg "<<j<<" is .mat";
00142             PMatrix P;
00143             P.SetZero();
00144             if (!BBC) {
00145                 P.Load(argv[j]);
00146             } else {
00147                 P.LoadBBC(argv[j]);
00148             }
00149             cout << "P is "<<P<<endl;
00150             mapP[argv[j]] = P;
00151         }
00152     }
00153     if (mapP.size()==0) {
00154         BIASERR("No matrices found !");
00155         return -1;
00156     }
00157
00158     const int cosize = 40;
00159
00160
00161
00162     for (;i<argc;i++) {
00163         if (strstr(argv[i], ".mat")!=NULL) continue;
00164         cout<< "Trying "<<argv[i]<<endl;
00165         if (DetermineFiletype(argv[i], FileType)!=0) {
00166             BIASERR("Skipping current file because of unknown/unsuported format: "
00167                 <<argv[i]<<endl<<"PMatrix can be written to mip,pgm,ppm,pnm");
00168             ErrorFlag = true;
00169             continue;
00170         }
00171
00172         IOResult = ImageIO::Load(argv[i], CurImage);
00173         if (IOResult!=0) {
00174             ErrorFlag = true;
00175             BIASERR("Error reading "<< argv[i]);
00176             continue;
00177         }
00178
00179         stringstream ss;
00180         ss << argv[i] <<".mat";
00181         if (mapP.find(ss.str())!=mapP.end()) {
00182             cout<<"Found a mat file for "<<argv[i]<<endl;
00183             P = mapP[ss.str()];
00184         } else {
00185             if (!Nearest) {
00186                 cout <<"Found NO mat file for "<<argv[i]<<" !!!!! SKIPPING"<<endl;
00187                 continue;
00188             }
00189             map<string,PMatrix>::iterator it = mapP.lower_bound(ss.str());
00190             if (it != mapP.begin()) it--;
00191             else cout<<"First element, cant use smaller, must use larger !";
00192             P = it->second;
00193             cout <<"Found next mat file for "<<argv[i]<<": "<<it->first<<endl;
00194         }
00195         // just a dummy class to do the metadata job for us
00196         BIAS::Camera<unsigned char> c;
00197         c.SetP(P);
00198         if (P.IsMetric()) {
00199             c.SetK(P.GetK());
00200             c.SetR(RMatrix(P.GetR()));
00201             c.SetC(P.GetC());
00202         }
00203         c.UpdateMetaData();
00204         CurImage.SetMetaData(*c.GetMetaData());
00205         Camera<unsigned char> cutout;
00206         cutout.Init(cosize*2+1, cosize*2+1, CurImage.GetChannelCount());
00207         bool simplecopy = false;
00208         for (unsigned int p=0; p<Points.size(); p++) {
00209             KMatrix K = P.GetK();
00210             HomgPoint2D x = P*Points[p];
00211             x.Homogenize();
00212             // find closest grid position
00213             x[0] = rint(x[0]);
00214             x[1] = rint(x[1]);
00215
00216             if (x[0]<cosize || x[0]>= CurImage.GetWidth()-cosize ||
00217                 x[1]<cosize || x[1]>= CurImage.GetWidth()-cosize) continue;
00218             if (simplecopy) {
00219                 CurImage.SetROI(int(x[0]-cosize), int(x[1]-cosize),
00220                     int(x[0]+cosize+1), int(x[1]+cosize+1));
00221                 CurImage.GetCopyOfROI(cutout);
00222                 K[0][2] += x[0]-cosize;
00223                 K[1][2] += x[1]-cosize;
00224             } else {
00225
00226                 float dx = 0, dy = 0;
00227                 unsigned char** pData = cutout.GetImageDataArray();
00228                 for (int xx=-cosize; xx<=cosize; xx++) {
00229                     for (int yy=-cosize; yy<=cosize; yy++) {
00230                         dx = float(xx)/2.0;
00231                         dy = float(yy)/2.0;
00232                         for (unsigned int c=0; c<CurImage.GetChannelCount(); c++) {
00233                             double value = CurImage.BilinearInterpolation(x[0]+dx,x[1]+dy,c);
00234                             value = rint(value);
00235                             if (value<0.0) value   = 0.0;
00236                             if (value>255.0) value = 255.0;
00237                             pData[yy+cosize][(xx+cosize)*CurImage.GetChannelCount()+c] =
00238                                 (unsigned char) value;
00239                         }
00240                     }
00241                 }
00242             }
00243
00244             ImageDraw<unsigned char>::RectangleCorners(cutout, cosize-5, cosize-5,
00245                 cosize+5, cosize+5);
00246             ImageDraw<unsigned char>::RectangleCorners(cutout, cosize-4, cosize-4,
00247                 cosize+4, cosize+4);
00248
00249             string filename = argv[i];
00250             unsigned int pos = filename.rfind("/");
00251             if (pos!=string::npos) filename = filename.substr(pos+1);
00252             stringstream filenamess;
00253             filenamess<<filename<<"_"<<p;
00254
00255             // set kmatrix to camera
00256             PMatrix PNew(K, P.GetR(), P.GetC());
00257             cutout.SetP(PNew);
00258
00259             if (FileType==ImageIO::FF_mip) {
00260                 IOResult = ImageIO::Write(filenamess.str(), cutout, false, false );
00261             } else {
00262                 IOResult = ImageIO::ExportImage(filenamess.str(), cutout, FileType,
00263                     false, 0, false);
00264             }
00265             if (IOResult!=0) {
00266                 ErrorFlag = true;
00267                 BIASERR("Error writing "<< filenamess.str());
00268                 continue;
00269             }
00270         }
00271
00272
00273     }
00274     if (ErrorFlag) cout << "There were errors." <<endl;
00275     if (ErrorFlag) return 1;
00276     return 0;
00277 }
00278
00279
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biassetprojection.cpp Source File

Tools

biassetprojection.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Image/Camera.hh>
00028 #include <stdio.h>
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 void usage()
00035 {
00036   cout << "Usage: biassetprojection imagefile projectionfile [destfile]" << endl;
00037   cout << "This program opens the image file and the projection file" << endl
00038        << "given by the command line, copies the projection into the image" << endl
00039        << "and saves the image to destfile. If no destfile is given," << endl
00040        << "the source image file is overwritten." << endl;
00041 }
00042
00043 /** @class biassetprojection
00044     @ingroup g_tools
00045     @brief load image and projection given by the command line,
00046     set projection in image and save image to disk.
00047     @author jkollmann */
00048 int main (int argc, char* argv[])
00049 {
00050   if (argc < 3)
00051   {
00052     usage();
00053     return 0;
00054   }
00055
00056   // load image
00057   Camera<unsigned char> image;
00058   if (ImageIO::Load(argv[1], image) != 0)
00059   {
00060     BIASERR("Failed to load image: " << argv[1]);
00061     return 1;
00062   }
00063
00064   // load projection
00065   Projection projection;
00066 #ifdef BIAS_HAVE_XML2
00067   if (projection.XMLRead(argv[2]) != 0)
00068   {
00069     BIASERR("Failed to load projection: " << argv[2]);
00070     return 1;
00071   }
00072 #endif //BIAS_HAVE_XML2
00073
00074   // set projection in image
00075   image.SetProj(projection);
00076   image.UpdateMetaData();
00077
00078   // choose destination file
00079   string destfile = argv[1];
00080   if (argc >= 4)
00081   {
00082     destfile = argv[3];
00083   }
00084
00085   // save file
00086   if (ImageIO::Save(destfile, image, ImageIO::FF_auto, BIAS_DEFAULT_SYNC,
00087                     BIAS_DEFAULT_IMAGE_QUALITY, false, true) != 0)
00088   {
00089     BIASERR("Failed to save image: " << destfile);
00090     return 1;
00091   }
00092
00093   return 0;
00094 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biassetuid.cpp Source File

Tools

biassetuid.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/ImageBase.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <stdio.h>
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 void usage()
00035 {
00036   cout << "Usage: biassetuid [options] files"<<endl;
00037   cout <<" Options: "<< endl
00038        <<" -f         : force setting of a new uid"<<endl
00039        << endl;
00040   cout <<"This program opens the image files given by the command line"
00041        <<", checks for a valid id and assigns a new one if there is no."<<endl
00042        <<"Returns: 0 on success, 1 if errors occured."<<endl<<endl;
00043 }
00044
00045 int DetermineFiletype(const string &fn, ImageIO::TFileFormat &thetype)
00046 {
00047   int EndOfPrefix;
00048   string suffix;
00049
00050   EndOfPrefix = fn.rfind('.');
00051
00052   suffix = fn.substr(EndOfPrefix+1,fn.length());
00053   if (suffix == "pnm") thetype =  ImageIO::FF_ppm;
00054   else if (suffix == "ppm") thetype =  ImageIO::FF_ppm;
00055   else if (suffix == "pgm") thetype =  ImageIO::FF_pgm;
00056   else if (suffix == "mip") thetype =  ImageIO::FF_mip;
00057   else return -1;
00058
00059   return 0;
00060 }
00061
00062
00063 /** @class biassetuid
00064     @ingroup g_tools
00065     @brief load image given by the command line, assign a uuid and write back
00066     to disk
00067     @author koeser */
00068 int main (int argc, char *argv[])
00069 {
00070   bool ForceNewUUID = false;
00071   int i = 1;
00072   if (argc>1) if (!strcmp("-f",argv[1])) {
00073     std::cout << "Existing UIDs are replaced."<<endl;
00074     ForceNewUUID = true;
00075     i = 2;
00076   }
00077   if (i>=argc) {
00078     usage();
00079     return 0; // for Dart testing
00080   }
00081
00082   ImageIO::TFileFormat FileType;
00083   bool ErrorFlag = false;
00084   int IOResult = 0;
00085   BIAS::ImageBase CurImage;
00086
00087   for (;i<argc;i++) {
00088     if (DetermineFiletype(argv[i], FileType)!=0) {
00089       BIASERR("Skipping current file because of unknown/unsuported format: "
00090               <<argv[i]<<endl<<" UIDs can only be written to mip,pgm,ppm,pnm");
00091       ErrorFlag = true;
00092       continue;
00093     }
00094
00095     IOResult = ImageIO::Load(argv[i], CurImage);
00096     if (IOResult!=0) {
00097       ErrorFlag = true;
00098       BIASERR("Error reading "<< argv[i]);
00099       continue;
00100     }
00101     // flag indicating the previous/new id status of the file
00102     int idstatus = 0;
00103     if (CurImage.GetUID().IsValid()) {
00104       idstatus = 1;
00105       if (ForceNewUUID) idstatus = 2;
00106     }
00107
00108     if (FileType==ImageIO::FF_mip) {
00109       IOResult = ImageIO::Write(argv[i], CurImage, false, ForceNewUUID );
00110     } else {
00111       IOResult = ImageIO::ExportImage(argv[i], CurImage, FileType, false,
00112                                       0, ForceNewUUID);
00113     }
00114     if (IOResult!=0) {
00115       ErrorFlag = true;
00116       BIASERR("Error writing "<< argv[i]);
00117       continue;
00118     }
00119     cout << "File " << argv[i] << " has UID "<<CurImage.GetUID();
00120     switch (idstatus) {
00121     case 1: cout<<" (kept existing)"; break;
00122     case 2: cout<<" (replaced old)"; break;
00123     default:cout<<" (new)";
00124     }
00125     cout << endl;
00126   }
00127   if (ErrorFlag) cout << "There were errors." <<endl;
00128   if (ErrorFlag) return 1;
00129   return 0;
00130
00131 }
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowepi.cpp Source File

Tools

biasshowepi.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/ImageBase.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <stdio.h>
00029 #include <string>
00030 #include "Geometry/PMatrix.hh"
00031 #include <Geometry/FMatrix.hh>
00032 #include <Geometry/EpipolarLine.hh>
00033 #include <Image/Camera.hh>
00034 #include <Base/Image/ImageIO.hh>
00035 #include <Base/Image/ImageConvert.hh>
00036 #include <Base/Image/ImageDraw.hh>
00037 #include <FeatureDetector/CornerDetectorHarris.hh>
00038 #include <Utils/ThreeDOut.hh>
00039 #include <Gui/GuiEnhanced.hh>
00040
00041 #define BIASOUT(theArg) cout<<theArg<<endl<<flush
00042
00043 using namespace BIAS;
00044 using namespace std;
00045
00046 void usage() {
00047   cout << "Usage: biasshowepi [--fmatrix f.mat]"
00048     " [--vrml] [--onlyonewindow]  image1 image2"
00049        <<endl;
00050   cout <<"This program opens the image files given by the command line"
00051        <<" and extracts PMatrices from the headers, computes FMatrices "
00052        <<"(Alternatively pass FMatrix file on the command line)."<<endl
00053        <<"Then runs corner detector in image1 and shows epipolar lines"<<endl
00054        <<" in image2 "<<endl<<endl
00055        <<"You can also left-click in the left image to define a point which is"
00056        <<" enlarged and right-click in the right image to enlarge the region"
00057        <<" there. If you pass  --onlyonewindow  the large regions are"
00058        <<" displayed in the same window, this avoids async replies."<<endl;
00059
00060 }
00061
00062 /** @class biasshowepi
00063     @ingroup g_tools
00064     @brief show epipolar lines for image pair
00065     @author koeser */
00066 int main (int argc, char *argv[])
00067 {
00068
00069   if (argc<3) {
00070     usage();
00071     return -1;
00072   }
00073   FMatrix F;
00074
00075   Param theParams(true);
00076   theParams.AddParamString("fmatrix","const fmatrix file","");
00077   theParams.AddParamBool("vrml","want vrml model",false);
00078   bool* OnlyOneWindow =
00079     theParams.AddParamBool("onlyonewindow","draw everything in one window, "
00080                            "avoiding async replies",false);
00081   BIAS::CornerDetectorHarris<unsigned char, float> Harris(theParams);
00082   ThreeDOutParameters param3D;
00083   param3D.CameraStyle = PyramidMesh;
00084   ThreeDOut Scene(param3D);
00085
00086   vector<HomgPoint2D> Features;
00087   unsigned int numfeatures = 0;
00088
00089   // image filenames to be filled in from somewhere
00090   vector<string> filenames;
00091   int iFirstImgArg = theParams.ParseCommandLine(argc,argv);
00092   for (int argnr=iFirstImgArg; argnr<argc; argnr++) {
00093     cout <<"using file "<<argv[argnr]<<endl;
00094     filenames.push_back(argv[argnr]);
00095   }
00096
00097
00098   bool  FFromCommandLine = false;
00099   string* FFileName = NULL;
00100   if ((FFileName = theParams.GetParamString("fmatrix"))!=NULL) {
00101     if (*FFileName!="") {
00102       if (!F.Load(*FFileName)) {
00103         cout <<"error reading fmatrix from file "<< (*FFileName)<<endl;
00104         exit(-1);
00105       }
00106       FFromCommandLine = true;
00107       cout<<"Using const FMAtrix for all image pairs !"<<endl;
00108     }
00109   }
00110
00111   const unsigned int numimages = filenames.size();
00112
00113   // the depth map for the currrent image
00114   Image<float> DepthMap;
00115
00116   // the image under inspection and the previous image
00117   Camera<unsigned char> CurImage[2];
00118   PMatrix CurP[2];
00119   int CurIndex = 1;
00120
00121
00122   Image<unsigned char> gim1, gim2, gim;
00123   GuiEnhanced gui;
00124   GuiEnhanced *zoom1, *zoom2;
00125   if (! *OnlyOneWindow) {
00126     zoom1 = new GuiEnhanced;
00127     zoom2 = new GuiEnhanced;
00128   }
00129
00130   for (unsigned int i=0; i<numimages; i++) {
00131     bool ShowEpiLines = true;
00132     // swap the current and last index
00133     if (CurIndex==0) CurIndex = 1; else CurIndex = 0;
00134     if (ImageIO::Load(filenames[i], CurImage[CurIndex])!=0) {
00135       BIASERR("Error loading image "<<filenames[i]<<" SKIP this image.");
00136       continue;
00137     }
00138     if (CurImage[CurIndex].GetColorModel()!=ImageBase::CM_Grey) {
00139       BIASERR("No grey image, converting ...");
00140       ImageConvert::IP_ToGrey(CurImage[CurIndex]);
00141     }
00142     CurImage[CurIndex].ParseMetaData();
00143     BIASOUT("Cur image is "<<i<<" with name "<<filenames[i]);
00144
00145     CurP[CurIndex] = CurImage[CurIndex].GetP();
00146     // #### debugging code for evaluating bbc principal point (koeser) #####
00147     bool SwapYCoordinateOfPrincipalPoint = false;
00148     if (SwapYCoordinateOfPrincipalPoint) {
00149       BIASWARN("Not using principal point as in image header, but inverting"
00150                " y coordinate ! !!!");
00151       KMatrix K = CurP[CurIndex].GetK();
00152       RMatrix R = CurP[CurIndex].GetR();
00153       Vector3<double> Center =  CurP[CurIndex].GetC();
00154       K[1][2] = CurImage[CurIndex].GetHeight()-1-K[1][2];
00155       CurP[CurIndex].Compose(K,R,Center);
00156     }
00157     // ###############################################################
00158     if (CurP[CurIndex].NormFrobenius()<0.1) {
00159       BIASERR("No PMatrix in header, trying to compose.");
00160       KMatrix K;
00161       RMatrix R;
00162       Vector3<double> C;
00163       R = CurImage[CurIndex].GetR();
00164       if (R.NormFrobenius()<0.1){
00165         BIASERR("No R found. Giving up.");
00166         continue;
00167       }
00168       K = CurImage[CurIndex].GetK();
00169       if (K.NormFrobenius()<0.1){
00170         BIASERR("No K found. Giving up.");
00171         continue;
00172       }
00173       C = CurImage[CurIndex].GetC();
00174       CurP[CurIndex].Compose(K,R,C);
00175       cout<<"Composed P is "<<CurP[CurIndex]<<", composed from K="<<K
00176           <<" R="<<R<<" C="<<C<<endl;
00177     }
00178
00179
00180
00181     BIASOUT("P is "<<CurP[CurIndex]);
00182     RGBAuc CamColor((i==0)?255:0,0,(i!=0)?255:0,0);
00183     Scene.AddPMatrix(CurP[CurIndex], CurImage[CurIndex].GetWidth(),
00184                      CurImage[CurIndex].GetHeight(), CamColor);
00185
00186     if (i==0) continue;
00187
00188     Image<unsigned char> GreyImage;
00189     ImageConvert::ToGrey(CurImage[CurIndex], GreyImage);
00190     Image<float> FloatImage;
00191     ImageConvert::ConvertST(GreyImage, FloatImage, ImageBase::ST_float);
00192     vector<float> Qualities;
00193     Features.clear();
00194     Harris.Detect(GreyImage, Features, Qualities);
00195
00196     numfeatures = Features.size();
00197     BIASOUT("Have "<<numfeatures<<" 2D features.");
00198     Vector3<double> C(CurP[CurIndex].GetC());
00199
00200     stringstream ssname;
00201     ssname<<"cams"<<i<<".wrl";
00202     if (theParams.GetParamBool("vrml")!=NULL) {
00203       if (*theParams.GetParamBool("vrml")) Scene.VRMLOut(ssname.str());
00204     } else cout <<"no vrml"<<endl;
00205     Image<unsigned char> &im1=CurImage[CurIndex];
00206     Image<unsigned char> &im2=CurImage[1-CurIndex];
00207     bool  KeyEvent = true, Pressed = false;
00208     char key;
00209     int Button, Xpos,  Ypos;
00210     unsigned int f = 0;
00211     Image<unsigned char> z1,z2;
00212     HomgPoint2D x(im1.GetWidth()/2,im1.GetHeight()/2);
00213     bool UpdateImages = true;
00214     while (ShowEpiLines) {
00215       if (UpdateImages) {
00216         gim2 = im2;
00217         gim1 = im1;
00218         UpdateImages = false;
00219       }
00220       if (KeyEvent && key == ' ') {
00221         x = Features[f++];
00222         if (f==numfeatures) f = 0;
00223         cout <<"Feature "<<f<<" of "<<numfeatures<<endl;
00224       }
00225       if (KeyEvent && key == 8) {
00226         if (f==0) f = numfeatures-1;
00227         x = Features[f--];
00228         cout <<"Feature "<<f<<" of "<<numfeatures<<endl;
00229       }
00230       else if (Pressed) {
00231         if (Button==1 || Button==3)
00232           gim2 = im2;
00233
00234         if (Button==1) {
00235           // update main window for cutout
00236           gim1 = im1;
00237
00238         }
00239         gim.SetROI(0,0, im1.GetWidth(), im1.GetHeight());
00240         gim.Paste2ROI(gim1);
00241         gim.SetROI(im1.GetWidth(),0, im1.GetWidth()*2, im1.GetHeight());
00242         gim.Paste2ROI(gim2);
00243         gui.ShowImage(gim);
00244         const int scale = 5;
00245         const int cutoutsize = 21;
00246         const int imagesize = (2*cutoutsize)*scale;
00247         switch (Button) {
00248         case 1:
00249           x[0] = Xpos;
00250           x[1] = Ypos;
00251           x[2] = 1.0;
00252           gui.GetZoomImage(Xpos,Ypos,scale,cutoutsize,z1);
00253           ImageDraw<unsigned char>::RectangleCenter(z1,104 ,104, 25);
00254
00255           if (! *OnlyOneWindow) zoom1->ShowImage(z1);
00256           else {
00257             for (unsigned int xx=0; xx<z1.GetWidth(); xx++) {
00258               for (unsigned int yy=0; yy<z1.GetHeight(); yy++) {
00259                 gim1.GetImageDataArray()[yy][xx] =
00260                   z1.GetImageDataArray()[yy][z2.GetChannelCount()*xx];
00261               }
00262             }
00263           }
00264           break;
00265         case 3: {
00266           gui.GetZoomImage(Xpos,Ypos,scale,cutoutsize,z2);
00267           HomgPoint2D epipole1, epipole2;
00268           Matrix3x3<double> CutoutTransform;
00269           CutoutTransform.SetIdentity();
00270           CutoutTransform[0][0] = CutoutTransform[1][1] = 1.0 / scale;
00271           CutoutTransform[0][2] = double(Xpos-cutoutsize-im1.GetWidth());
00272           CutoutTransform[1][2] = double(Ypos-cutoutsize);
00273
00274           FMatrix FCutout(CurP[CurIndex], CurP[1-CurIndex]);
00275           FCutout = CutoutTransform.Transpose()* FCutout;
00276           FCutout.GetEpipolesHomogenized(epipole1, epipole2);
00277           HomgPoint2D::EPosition epos2 =
00278             epipole2.DeterminePosition(imagesize, imagesize);
00279           EpipolarLine eline;
00280
00281           // draw epipolar line
00282           eline = FCutout * x;
00283           if (eline.Recalc(imagesize, imagesize, epipole2, epos2)==0)
00284             eline.DrawWhole(z2);
00285           if (! *OnlyOneWindow) zoom2->ShowImage(z2);
00286           else {
00287             for (unsigned int xx=0; xx<z2.GetWidth(); xx++) {
00288               for (unsigned int yy=0; yy<z2.GetHeight(); yy++) {
00289                 gim2.GetImageDataArray()[yy][xx] =
00290                   z2.GetImageDataArray()[yy][z2.GetChannelCount()*xx];
00291               }
00292             }
00293           }
00294           break;
00295         }
00296         }
00297       }
00298       FMatrix F12(CurP[CurIndex], CurP[1-CurIndex]);
00299       // compute epipoles in big image
00300       HomgPoint2D epipole1, epipole2;
00301       F12.GetEpipolesHomogenized(epipole1, epipole2);
00302
00303
00304
00305       // draw the source point in gim1
00306       ImageDraw<unsigned char>::
00307         RectangleCenter(gim1, (int)x[0], (int)x[1], 5);
00308       ImageDraw<unsigned char>::
00309         RectangleCenter(gim1, (int)x[0], (int)x[1], 7);
00310       ImageDraw<unsigned char>::
00311         RectangleCenter(gim1, (int)x[0], (int)x[1], 9);
00312       ImageDraw<unsigned char>::
00313         RectangleCenter(gim1, (int)x[0], (int)x[1], 11);
00314
00315       // compute the projection of the epipolar plane for that point
00316       EpipolarLine eline1;
00317       eline1 = epipole1.CrossProduct(x);
00318       HomgPoint2D::EPosition epos1 =
00319         epipole1.DeterminePosition(im1.GetWidth(), im1.GetHeight());
00320       if (eline1.Recalc(im1.GetWidth(), im1.GetHeight(), epipole1, epos1)==0)
00321         eline1.DrawWhole(gim1);
00322
00323
00324       HomgPoint2D::EPosition epos2 =
00325         epipole2.DeterminePosition(im2.GetWidth(), im2.GetHeight());
00326
00327       EpipolarLine eline;
00328
00329       // draw epipolar line
00330       eline = F12 * x;
00331       if (eline.Recalc(im2.GetWidth(), im2.GetHeight(), epipole2, epos2)==0)
00332         eline.DrawWhole(gim2);
00333
00334
00335       if (gim.IsEmpty())
00336         gim.Init(im1.GetWidth()*2, im1.GetHeight(), im1.GetChannelCount());
00337       gim.SetROI(0,0, im1.GetWidth(), im1.GetHeight());
00338       gim.Paste2ROI(gim1);
00339       gim.SetROI(im1.GetWidth(),0, im1.GetWidth()*2, im1.GetHeight());
00340       gim.Paste2ROI(gim2);
00341       gui.ShowImage(gim);
00342
00343       gui.WaitForEvent(KeyEvent,key,Pressed,Button,Xpos,Ypos);
00344       if (KeyEvent && key=='q') ShowEpiLines = false;
00345     }
00346   }
00347
00348   if (! *OnlyOneWindow) {
00349     delete zoom1;
00350     delete zoom2;
00351   }
00352   return 0;
00353
00354 }
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowepiwx.cpp Source File

Tools

biasshowepiwx.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/W32Compat.hh>
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Base/Image/ImageDraw.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Image/Bresenham.hh>
00030 #include <Gui/ConsoleRedirectIO.hh>
00031 #include <Gui/ImageCanvas.hh>
00032 #include <Gui/StringConv.hh>
00033 #include <Gui/ProjectionGUI.hh>
00034 #include <Image/Camera.hh>
00035 #include <Geometry/PMatrix.hh>
00036 #include <Geometry/FMatrix.hh>
00037 #include <Geometry/EpipolarLine.hh>
00038 #include <Geometry/ProjectionParametersSpherical.hh>
00039
00040 #include <wx/wx.h>
00041 #include <wx/splitter.h>
00042
00043 #include <iostream>
00044
00045 using namespace std;
00046 using namespace BIAS;
00047
00048 /*
00049 ===============================================================================
00050 Constants
00051 ===============================================================================
00052 */
00053
00054 const int HALF_CUTOUT_SIZE = 30;
00055 const int CUTOUT_SIZE =  2 * HALF_CUTOUT_SIZE;
00056 const int SCALE = 4;
00057
00058 /*
00059 ===============================================================================
00060 ComputeCutoutImage
00061 ===============================================================================
00062 */
00063
00064 void ComputeCutoutImage(Image<unsigned char>& src, Image<unsigned char>& dst,
00065                         int srcX, int srcY, int srcWidth, int srcHeight, int scale)
00066 {
00067   int dstWidth  = srcWidth  * scale;
00068   int dstHeight = srcHeight * scale;
00069
00070   if ((int)dst.GetWidth() != dstWidth || (int)dst.GetHeight() != dstHeight)
00071     dst.Release();
00072
00073   if (dst.IsEmpty())
00074     dst.Init(dstWidth, dstHeight, 3);
00075
00076   unsigned char** srcIda = src.GetImageDataArray();
00077   unsigned char** dstIda = dst.GetImageDataArray();
00078
00079   for (int x = srcX; x < srcX + srcWidth; x++)
00080   {
00081     for (int y = srcY; y < srcY + srcHeight; y++)
00082     {
00083       unsigned char pixel[3];
00084       if (x < 0 || y < 0 || x >= (int)src.GetWidth() || y >= (int)src.GetHeight())
00085       {
00086         pixel[0] = 0;
00087         pixel[1] = 0;
00088         pixel[2] = 0;
00089       }
00090       else
00091       {
00092         if (src.GetColorModel() == ImageBase::CM_Grey)
00093         {
00094           pixel[0] = srcIda[y][x];
00095           pixel[1] = srcIda[y][x];
00096           pixel[2] = srcIda[y][x];
00097         }
00098         else
00099         {
00100           // assuming CM_RGB
00101           pixel[0] = srcIda[y][3*x+0];
00102           pixel[1] = srcIda[y][3*x+1];
00103           pixel[2] = srcIda[y][3*x+2];
00104         }
00105       }
00106
00107       int startX = (x - srcX) * scale;
00108       int startY = (y - srcY) * scale;
00109
00110       for (int i = startX; i < startX + scale; i++)
00111       {
00112         for (int j = startY; j < startY + scale; j++)
00113         {
00114           if (i >= 0 && j >= 0 && i < (int)dst.GetWidth() && j < (int)dst.GetHeight())
00115           {
00116             dstIda[j][3*i+0] = pixel[0];
00117             dstIda[j][3*i+1] = pixel[1];
00118             dstIda[j][3*i+2] = pixel[2];
00119           }
00120         }
00121       }
00122     }
00123   }
00124 }
00125
00126 /*
00127 ===============================================================================
00128 PlainImageCanvas - Image canvas that does not show zoom frames and redirects
00129 mouse click events to its parent.
00130 ===============================================================================
00131 */
00132
00133 class PlainImageCanvas : public ImageCanvas
00134 {
00135 public:
00136   PlainImageCanvas(wxWindow* parent, wxStatusBar* sbar = NULL, int sbarid = 0);
00137
00138 private:
00139   void OnLeftDown(wxMouseEvent& event);
00140   void OnRightDown(wxMouseEvent& event);
00141   void OnMotion(wxMouseEvent& event);
00142
00143   DECLARE_EVENT_TABLE()
00144 };
00145
00146 BEGIN_EVENT_TABLE(PlainImageCanvas, ImageCanvas)
00147 EVT_LEFT_DOWN(PlainImageCanvas::OnLeftDown)
00148 EVT_RIGHT_DOWN(PlainImageCanvas::OnRightDown)
00149 EVT_MOTION(PlainImageCanvas::OnMotion)
00150 END_EVENT_TABLE()
00151
00152 PlainImageCanvas::PlainImageCanvas(wxWindow* parent, wxStatusBar* sbar, int sbarid)
00153   : ImageCanvas(parent, sbar, sbarid)
00154 {
00155 }
00156
00157 void PlainImageCanvas::OnLeftDown(wxMouseEvent& event)
00158 {
00159   if (GetParent() != NULL)
00160   {
00161     GetParent()->ProcessEvent(event);
00162   }
00163 }
00164
00165 void PlainImageCanvas::OnRightDown(wxMouseEvent& event)
00166 {
00167   if (GetParent() != NULL)
00168   {
00169     GetParent()->ProcessEvent(event);
00170   }
00171 }
00172
00173 void PlainImageCanvas::OnMotion(wxMouseEvent& event)
00174 {
00175   if (GetParent() != NULL)
00176   {
00177     GetParent()->ProcessEvent(event);
00178   }
00179   event.Skip();
00180 }
00181
00182 /*
00183 ===============================================================================
00184 CutoutFrame - Frame showing a cutout of a larger image
00185 ===============================================================================
00186 */
00187
00188 class CutoutFrame : public wxFrame
00189 {
00190 public:
00191   CutoutFrame(wxWindow* parent, const wxString& title);
00192
00193   void ShowImage(Image<unsigned char>& image, const string& name);
00194   void SetTransform(int offsetX, int offsetY, int scale);
00195
00196 private:
00197   int               _OffsetX, _OffsetY, _Scale;
00198   PlainImageCanvas* _ImageCanvas;
00199
00200   void OnMotion(wxMouseEvent& event);
00201   void OnLeaveWindow(wxMouseEvent& event);
00202   void OnClose(wxCloseEvent& event);
00203
00204   DECLARE_EVENT_TABLE()
00205 };
00206
00207 BEGIN_EVENT_TABLE(CutoutFrame, wxFrame)
00208 EVT_MOTION(CutoutFrame::OnMotion)
00209 EVT_LEAVE_WINDOW(CutoutFrame::OnLeaveWindow)
00210 EVT_CLOSE(CutoutFrame::OnClose)
00211 END_EVENT_TABLE()
00212
00213 CutoutFrame::CutoutFrame(wxWindow* parent, const wxString& title)
00214   : wxFrame(parent, -1, title,
00215             wxDefaultPosition, wxDefaultSize,
00216             wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)
00217 {
00218   _OffsetX = 0;
00219   _OffsetY = 0;
00220   _Scale   = 1;
00221
00222   _ImageCanvas = new PlainImageCanvas(this);
00223
00224   CreateStatusBar(1);
00225
00226   wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
00227   sizer->Add(_ImageCanvas);
00228   SetSizer(sizer);
00229 }
00230
00231 void CutoutFrame::ShowImage(Image<unsigned char>& image, const string& name)
00232 {
00233   _ImageCanvas->Show(image, name);
00234   _ImageCanvas->SetScrollbars(0, 0, 0, 0);
00235   GetSizer()->SetItemMinSize(_ImageCanvas, image.GetWidth(), image.GetHeight());
00236   Fit();
00237 }
00238
00239 void CutoutFrame::SetTransform(int offsetX, int offsetY, int scale)
00240 {
00241   _OffsetX = offsetX;
00242   _OffsetY = offsetY;
00243   _Scale   = scale;
00244 }
00245
00246 void CutoutFrame::OnMotion(wxMouseEvent& event)
00247 {
00248   wxClientDC dc(this);
00249   PrepareDC(dc);
00250   wxPoint pos = event.GetPosition();
00251   int x = dc.DeviceToLogicalX(pos.x) / _Scale + _OffsetX;
00252   int y = dc.DeviceToLogicalY(pos.y) / _Scale + _OffsetY;
00253   stringstream text;
00254   text << "(x, y) = (" << x << ", " << y << ")";
00255   GetStatusBar()->SetStatusText(AsciiToWx(text.str()));
00256 }
00257
00258 void CutoutFrame::OnLeaveWindow(wxMouseEvent&)
00259 {
00260   GetStatusBar()->SetStatusText(wxT(""));
00261 }
00262
00263 void CutoutFrame::OnClose(wxCloseEvent& event)
00264 {
00265   if (event.CanVeto())
00266   {
00267     Hide();
00268     event.Veto();
00269   }
00270   else
00271   {
00272     Destroy();
00273   }
00274 }
00275
00276 /*
00277 ===============================================================================
00278 MainFrame
00279 ===============================================================================
00280 */
00281
00282 class MainFrame : public wxFrame
00283 {
00284 public:
00285   MainFrame();
00286
00287   void SetImages(Image<unsigned char>& image1, const Projection& proj1, const string& name1,
00288                  Image<unsigned char>& image2, const Projection& proj2, const string& name2);
00289
00290 private:
00291   PlainImageCanvas*     _ImageCanvas1;
00292   PlainImageCanvas*     _ImageCanvas2;
00293   Image<unsigned char>  _Image1, _Image2;
00294   Projection            _Projection1, _Projection2;
00295   std::string           _ImageName1, _ImageName2;
00296   CutoutFrame*          _CutoutFrame1;
00297   CutoutFrame*          _CutoutFrame2;
00298   wxPoint               _SelectedPoint1; // selected point in left image
00299   wxPoint               _SelectedPoint2; // selected point in right image
00300
00301   void DrawDistortedLine(EpipolarLine& line, Image<unsigned char>& image,
00302                          const ProjectionParametersPerspective* paramsPersp,
00303                          const ProjectionParametersSpherical* paramsSpherical);
00304
00305   void OnLeftDown(wxMouseEvent& event);
00306
00307   DECLARE_EVENT_TABLE()
00308 };
00309
00310 BEGIN_EVENT_TABLE(MainFrame, wxFrame)
00311 EVT_LEFT_DOWN(MainFrame::OnLeftDown)
00312 END_EVENT_TABLE()
00313
00314 MainFrame::MainFrame()
00315   : wxFrame(NULL, -1, wxT("BiasShowEpiWX"))
00316 {
00317   _CutoutFrame1 = new CutoutFrame(this, wxT("Cutout 1"));
00318   _CutoutFrame2 = new CutoutFrame(this, wxT("Cutout 2"));
00319
00320   CreateStatusBar();
00321
00322   _ImageCanvas1 = new PlainImageCanvas(this, GetStatusBar(), 0);
00323   _ImageCanvas2 = new PlainImageCanvas(this, GetStatusBar(), 0);
00324 }
00325
00326 void MainFrame::SetImages(Image<unsigned char>& image1, const Projection& proj1, const string& name1,
00327                           Image<unsigned char>& image2, const Projection& proj2, const string& name2)
00328 {
00329   _Image1 = image1;
00330   _Image2 = image2;
00331   _Projection1 = proj1;
00332   _Projection2 = proj2;
00333   _ImageName1 = name1;
00334   _ImageName2 = name2;
00335
00336   _ImageCanvas1->Show(_Image1, _ImageName1);
00337   _ImageCanvas2->Show(_Image2, _ImageName2);
00338   _ImageCanvas1->SetClearDrawingContext(false);
00339   _ImageCanvas2->SetClearDrawingContext(false);
00340
00341   wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
00342   sizer->Add(_ImageCanvas1, 1, wxEXPAND);
00343   sizer->AddSpacer(3);
00344   sizer->Add(_ImageCanvas2, 1, wxEXPAND);
00345
00346   sizer->SetItemMinSize(_ImageCanvas1, 100, 100);
00347   sizer->SetItemMinSize(_ImageCanvas2, 100, 100);
00348
00349   SetSizer(sizer);
00350   sizer->SetSizeHints(this);
00351
00352   SetSize(900, 600); // default main frame size
00353 }
00354
00355 void MainFrame::DrawDistortedLine(EpipolarLine& line, Image<unsigned char>& image,
00356                                   const ProjectionParametersPerspective* paramsPersp,
00357                                   const ProjectionParametersSpherical* paramsSpherical)
00358 {
00359   unsigned int start[2], end[2];
00360   start[0] = (unsigned int)rint(line.GetCloseIntersectionWithImageBorder()[0]);
00361   start[1] = (unsigned int)rint(line.GetCloseIntersectionWithImageBorder()[1]);
00362   end[0]   = (unsigned int)rint(line.GetFarIntersectionWithImageBorder()[0]);
00363   end[1]   = (unsigned int)rint(line.GetFarIntersectionWithImageBorder()[1]);
00364   unsigned int width, height;
00365   paramsPersp->GetImageSize(width, height);
00366   if (start[0]<0 || start[0]>width || end[0]<0 || end[0]>width ||
00367       start[1]<0 || start[1]>height || end[1]<0 || end[1]>height) return;
00368
00369   unsigned int next[2]={0,0};
00370   Bresenham bres(start, end);
00371   do {
00372     HomgPoint2D point(next[0], next[1], 1.0);
00373
00374     if (paramsSpherical != NULL)
00375     {
00376       Vector3<double> ray = paramsPersp->UnProjectLocal(point);
00377       point = paramsSpherical->ProjectLocal(ray);
00378     }
00379     else
00380     {
00381       paramsPersp->Distort(point);
00382     }
00383
00384     point.Homogenize();
00385
00386     int x = (int)(rint(point[0]));
00387     int y = (int)(rint(point[1]));
00388
00389     if (x >= 0 && y >= 0 && x < int(image.GetWidth()) && y < int(image.GetHeight()))
00390     {
00391       image.SetPixel(0, 255, 0, x, y);
00392     }
00393   } while (bres.GetNext(next));
00394 }
00395
00396 void MainFrame::OnLeftDown(wxMouseEvent& event)
00397 {
00398   ProjectionParametersPerspective* paramsPersp1 =
00399       dynamic_cast<ProjectionParametersPerspective*>(_Projection1.GetParameters());
00400   ProjectionParametersSpherical* paramsSpherical1 =
00401       dynamic_cast<ProjectionParametersSpherical*>(_Projection1.GetParameters());
00402
00403   int image1Width = _Image1.GetWidth();
00404   int image1Height = _Image1.GetHeight();
00405
00406   ProjectionParametersPerspective fakeParamsPersp1;
00407   if (paramsSpherical1 != NULL)
00408   {
00409     double imageSize;
00410     KMatrix K = paramsSpherical1->GetFakeKMatrix(imageSize, 3);
00411
00412     fakeParamsPersp1.SetC(paramsSpherical1->GetC());
00413     fakeParamsPersp1.SetQ(paramsSpherical1->GetQ());
00414     fakeParamsPersp1.SetK(K);
00415     fakeParamsPersp1.SetImageSize((int)imageSize, (int)imageSize);
00416
00417     paramsPersp1 = &fakeParamsPersp1;
00418     image1Width = (int)imageSize;
00419     image1Height = (int)imageSize;
00420   }
00421
00422
00423   ProjectionParametersPerspective* paramsPersp2 =
00424       dynamic_cast<ProjectionParametersPerspective*>(_Projection2.GetParameters());
00425   ProjectionParametersSpherical* paramsSpherical2 =
00426       dynamic_cast<ProjectionParametersSpherical*>(_Projection2.GetParameters());
00427
00428   int image2Width = _Image2.GetWidth();
00429   int image2Height = _Image2.GetHeight();
00430
00431   ProjectionParametersPerspective fakeParamsPersp2;
00432   if (paramsSpherical2 != NULL)
00433   {
00434     double imageSize;
00435     KMatrix K = paramsSpherical2->GetFakeKMatrix(imageSize, 3);
00436
00437     fakeParamsPersp2.SetC(paramsSpherical2->GetC());
00438     fakeParamsPersp2.SetQ(paramsSpherical2->GetQ());
00439     fakeParamsPersp2.SetK(K);
00440     fakeParamsPersp2.SetImageSize((int)imageSize, (int)imageSize);
00441
00442     paramsPersp2 = &fakeParamsPersp2;
00443     image2Width = (int)imageSize;
00444     image2Height = (int)imageSize;
00445   }
00446
00447
00448   PMatrix P1 = paramsPersp1->GetP();
00449   PMatrix P2 = paramsPersp2->GetP();
00450
00451   if (event.GetEventObject() == _ImageCanvas1)
00452   {
00453     wxClientDC dc(this);
00454     _ImageCanvas1->PrepareDC(dc);
00455     wxPoint pos = event.GetPosition();
00456     _SelectedPoint1.x = dc.DeviceToLogicalX(event.GetX());
00457     _SelectedPoint1.y = dc.DeviceToLogicalY(event.GetY());
00458
00459     HomgPoint2D point(_SelectedPoint1.x, _SelectedPoint1.y, 1.0);
00460
00461     // undistort the clicked point
00462     if (paramsSpherical1 != NULL)
00463     {
00464       Vector3<double> ray = paramsSpherical1->UnProjectLocal(point);
00465       point = paramsPersp1->ProjectLocal(ray);
00466     }
00467     else
00468     {
00469       paramsPersp1->Undistort(point);
00470     }
00471     point.Homogenize();
00472
00473     // images including selected point and epipolar lines
00474     Image<unsigned char> PaintedImage1 = _Image1;
00475     Image<unsigned char> PaintedImage2 = _Image2;
00476
00477     // --- LEFT IMAGE ---
00478
00479     // draw the selected point in PaintedImage1
00480     ImageDraw<unsigned char>::RectangleCenter(
00481       PaintedImage1, _SelectedPoint1.x, _SelectedPoint1.y, CUTOUT_SIZE);
00482
00483     // compute epipoles in big image
00484     FMatrix F12(P1, P2);
00485     HomgPoint2D epipole1, epipole2;
00486     F12.GetEpipolesHomogenized(epipole1, epipole2);
00487
00488     // compute the projection of the epipolar plane for that point
00489     EpipolarLine eline1 = epipole1.CrossProduct(point);
00490     HomgPoint2D::EPosition epos1 =
00491         epipole1.DeterminePosition(image1Width, image1Height);
00492     eline1.Recalc(image1Width, image1Height, epipole1, epos1);
00493     DrawDistortedLine(eline1, PaintedImage1, paramsPersp1, paramsSpherical1);
00494
00495     // --- RIGHT IMAGE ---
00496
00497     HomgPoint2D::EPosition epos2 =
00498       epipole2.DeterminePosition(image2Width, image2Height);
00499
00500     // draw epipolar line
00501     EpipolarLine eline = F12 * point;
00502     eline.Recalc(image2Width, image2Height, epipole2, epos2);
00503     DrawDistortedLine(eline, PaintedImage2, paramsPersp2, paramsSpherical2);
00504
00505     // show images (and restore scrollbar positions after that)
00506     int x1, y1, x2, y2;
00507     _ImageCanvas1->GetViewStart(&x1, &y1);
00508     _ImageCanvas1->GetViewStart(&x2, &y2);
00509     _ImageCanvas1->Show(PaintedImage1, _ImageName1);
00510     _ImageCanvas2->Show(PaintedImage2, _ImageName2);
00511     _ImageCanvas1->Scroll(x1, y1);
00512     _ImageCanvas1->Scroll(x2, y2);
00513
00514     // --- CUTOUT FOR LEFT IMAGE ---
00515     Image<unsigned char> CutoutImage;
00516     ComputeCutoutImage(_Image1, CutoutImage,
00517                        _SelectedPoint1.x - HALF_CUTOUT_SIZE,
00518                        _SelectedPoint1.y - HALF_CUTOUT_SIZE,
00519                        CUTOUT_SIZE, CUTOUT_SIZE, SCALE);
00520     ImageDraw<unsigned char>::RectangleCenter(CutoutImage,
00521       2 + (_SelectedPoint1.x - (_SelectedPoint1.x - HALF_CUTOUT_SIZE)) * SCALE,
00522       2 + (_SelectedPoint1.y - (_SelectedPoint1.y - HALF_CUTOUT_SIZE)) * SCALE, SCALE);
00523     ImageDraw<unsigned char>::RectangleCenter(CutoutImage,
00524       2 + (_SelectedPoint1.x - (_SelectedPoint1.x - HALF_CUTOUT_SIZE)) * SCALE,
00525       2 + (_SelectedPoint1.y - (_SelectedPoint1.y - HALF_CUTOUT_SIZE)) * SCALE, SCALE * 4);
00526
00527     _CutoutFrame1->ShowImage(CutoutImage, _ImageName1);
00528     _CutoutFrame1->SetTransform(_SelectedPoint1.x - HALF_CUTOUT_SIZE,
00529                                 _SelectedPoint1.y - HALF_CUTOUT_SIZE, SCALE);
00530     _CutoutFrame1->Show(TRUE);
00531     _CutoutFrame1->Fit();
00532   }
00533
00534   // store selected point when clicked in image 2
00535   if (event.GetEventObject() == _ImageCanvas2)
00536   {
00537     wxClientDC dc(this);
00538     _ImageCanvas2->PrepareDC(dc);
00539     wxPoint pos = event.GetPosition();
00540     _SelectedPoint2.x = dc.DeviceToLogicalX(event.GetX());
00541     _SelectedPoint2.y = dc.DeviceToLogicalY(event.GetY());
00542   }
00543
00544   // update cutout of second image on click or when epipolar line was changed
00545   if ((event.GetEventObject() == _ImageCanvas1 && _CutoutFrame2->IsShown()) ||
00546       event.GetEventObject() == _ImageCanvas2)
00547   {
00548     Image<unsigned char> CutoutImage;
00549     ComputeCutoutImage(_Image2, CutoutImage,
00550                        _SelectedPoint2.x - HALF_CUTOUT_SIZE,
00551                        _SelectedPoint2.y - HALF_CUTOUT_SIZE,
00552                        CUTOUT_SIZE, CUTOUT_SIZE, SCALE);
00553
00554     HomgPoint2D point(_SelectedPoint1.x, _SelectedPoint1.y, 1.0);
00555
00556     HomgPoint2D epipole1, epipole2;
00557     Matrix3x3<double> CutoutTransform;
00558     CutoutTransform.SetIdentity();
00559     CutoutTransform[0][0] = CutoutTransform[1][1] = 1.0 / (double)SCALE;
00560     CutoutTransform[0][2] = (double)(_SelectedPoint2.x - HALF_CUTOUT_SIZE);
00561     CutoutTransform[1][2] = (double)(_SelectedPoint2.y - HALF_CUTOUT_SIZE);
00562
00563     FMatrix FCutout(P1, P2);
00564     FCutout = CutoutTransform.Transpose() * FCutout;
00565     FCutout.GetEpipolesHomogenized(epipole1, epipole2);
00566     HomgPoint2D::EPosition epos2 = epipole2.DeterminePosition(CUTOUT_SIZE*SCALE, CUTOUT_SIZE*SCALE);
00567
00568     // draw epipolar line
00569     EpipolarLine eline;
00570     eline = FCutout * point;
00571     eline.Recalc(CUTOUT_SIZE*SCALE, CUTOUT_SIZE*SCALE, epipole2, epos2);
00572
00573     DrawDistortedLine(eline, CutoutImage, paramsPersp2, paramsSpherical2);
00574
00575     _CutoutFrame2->ShowImage(CutoutImage, _ImageName2);
00576     _CutoutFrame2->SetTransform(_SelectedPoint2.x - HALF_CUTOUT_SIZE,
00577                                 _SelectedPoint2.y - HALF_CUTOUT_SIZE, SCALE);
00578     _CutoutFrame2->Show(TRUE);
00579     _CutoutFrame2->Fit();
00580   }
00581 }
00582
00583 /*
00584 ===============================================================================
00585 BiasShowEpiApp
00586 ===============================================================================
00587 */
00588
00589 class BiasShowEpiApp : public wxApp
00590 {
00591 public:
00592   virtual bool OnInit();
00593 };
00594
00595 bool BiasShowEpiApp::OnInit()
00596 {
00597   // utility: create a Redirection console for cout, cerr etc.
00598   ConsoleRedirectIO();
00599
00600   // parse command line
00601   if (argc < 3)
00602   {
00603     cout << "No images given" << endl;
00604     return false;
00605   }
00606   string fileName[2];
00607   fileName[0] = WxToAscii(argv[1]);
00608   fileName[1] = WxToAscii(argv[2]);
00609
00610   // load images
00611   Camera<unsigned char> image[2];
00612   for (int i = 0; i < 2; i++)
00613   {
00614     if (ImageIO::Load(fileName[i], image[i]) != 0)
00615     {
00616       cout << "Failed to load image: " << fileName[i] << endl;
00617       return false;
00618     }
00619     image[i].ParseMetaData();
00620   }
00621
00622   // use loaded projections, if given
00623   if (argc >= 5)
00624   {
00625     for (int i = 0; i < 2; i++)
00626     {
00627       string projFileName = WxToAscii(argv[i+3]);
00628
00629       Projection projection;
00630       if (projection.XMLRead(projFileName) != 0)
00631       {
00632         cout << "Failed to load projection:" << fileName << endl;
00633         return false;
00634       }
00635
00636       image[i].SetProj(projection);
00637     }
00638   }
00639
00640   // take projections from images or create them from P matrices
00641   Projection proj[2];
00642   for (int i = 0; i < 2; i++)
00643   {
00644     if (image[i].IsProjValid())
00645     {
00646       proj[i] = image[i].GetProj();
00647     }
00648     else if (image[i].IsPValid())
00649     {
00650       ProjectionParametersPerspective params;
00651       params.SetP(image[i].GetP());
00652       params.SetImageSize(image[i].GetWidth(), image[i].GetHeight());
00653       proj[i] = Projection(params);
00654     }
00655     else
00656     {
00657       cout << "No projection and no P matrix for image: " << fileName[i] << endl;
00658       return false;
00659     }
00660   }
00661
00662   // convert images to RGB
00663   Image<unsigned char> rgbImage[2];
00664   if (ImageConvert::ToRGB(image[0], rgbImage[0]) != 0 ||
00665       ImageConvert::ToRGB(image[1], rgbImage[1]) != 0)
00666   {
00667     cout << "Failed to convert images to RGB" << endl;
00668     return false;
00669   }
00670
00671   // show frame
00672   MainFrame* frame = new MainFrame;
00673   frame->Show(TRUE);
00674   frame->SetImages(rgbImage[0], proj[0], fileName[0],
00675                    rgbImage[1], proj[1], fileName[1]);
00676   SetTopWindow(frame);
00677
00678   return TRUE;
00679 }
00680
00681 IMPLEMENT_APP(BiasShowEpiApp)
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasshowsm.cpp Source File

Tools

biasshowsm.cpp

Go to the documentation of this file.
00001 #include <Utils/GenSynthMatches.hh>
00002 #include <Gui/GuiEnhanced.hh>
00003 #include <Base/Image/ImageIO.hh>
00004
00005 #define SPEED_STEP 10000
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010 void usage(char *name)
00011 {
00012   cout << name << " <binary match data> \n"
00013        << "   visualize matches from binary files\n";
00014 }
00015
00016 void help(char *name)
00017 {
00018   usage(name);
00019   cout << ",/.         decrease/increase speed of automatic slideshow\n"
00020        << "s           toggle automatic slideshow on/off\n"
00021        << "q/esc       quit\n"
00022        << "space       visualize next match data\n"
00023        << "backspace   visualize previous match data\n"
00024        << "w           write visualization image to disk (\"true.mip\", "
00025        <<           "\"noisy.mip\")\n"
00026        << "i           print match data to stdout\n"
00027        << "t           toggle display of ground truth/noisy matches\n"
00028        << "h           show this help\n";
00029 }
00030
00031 /** @class biasshowsm
00032     @ingroup g_tools
00033     @brief tool for showing binary written GensSynthMatches
00034     @author wopelk 08/2004 */
00035 int main(int argc, char *argv[])
00036 {
00037   Image<unsigned char> noisyim, trueim, zoomimage;
00038   Param para;
00039   GenSynthMatches gsm(para);
00040   MatchDataBase mdb(para);
00041   bool gt=false, showtrue=true;
00042   GuiEnhanced gui;
00043   GuiGTK zoomgui;
00044   int numimages, index=1, lastindex=0;
00045   string title;
00046   string::size_type pos;
00047   const unsigned zoomfactor=5;
00048   const unsigned zoomsize=25;
00049   bool finished=false, zoomed=false, KeyEvent=false, Pressed=false,
00050     slideshow=false;
00051   char key=0;
00052   int Xpos=0, Ypos=0, Button=0;
00053   long int speed = 10001;
00054
00055   if (argc<2){
00056     usage(argv[0]);
00057     return -1;
00058   }
00059   while (!finished){
00060     if (index!=lastindex){
00061       if (zoomed){
00062         zoomgui.DestroyWindow();
00063         zoomed=false;
00064       }
00065       if (gsm.Read(argv[index])!=0){
00066         if (mdb.Read(argv[index])==0){
00067           cout << "without ground truth information\n";
00068           gt=false;
00069           gsm=mdb;
00070         } else {
00071           cerr << "error reading match data "<<argv[index]<<endl;
00072           usage(argv[0]);
00073           return -2;
00074         }
00075       } else { // gsm
00076         cout << "with ground truth information\n";
00077         gt=true;
00078       }
00079
00080       numimages=gsm.GetNumImages();
00081       gsm.DrawNoisy(noisyim, 0, numimages-1);
00082       if (gt)
00083         gsm.DrawTrue(trueim, 0, numimages-1);
00084       lastindex=index;
00085     }
00086     title=argv[index];
00087     pos = title.rfind('/');
00088     if (pos!=std::string::npos) title = title.substr(pos+1, title.size()-1 );
00089
00090     if (gt && showtrue) {
00091       gui.ShowImage(trueim);
00092       title ="ground truth: "+title;
00093     } else {
00094       gui.ShowImage(noisyim);
00095       title ="noisy: "+title;
00096     }
00097     gui.SetTitle(title);
00098
00099     if (slideshow){
00100       key=-1;
00101       key=gui.CheckForKeyEvent();
00102       if (key==-1){
00103         key=' ';
00104         usleep(speed);
00105       }
00106       KeyEvent=true;
00107     } else {
00108       gui.WaitForEvent(KeyEvent, key, Pressed, Button, Xpos, Ypos);
00109     }
00110     if (KeyEvent){
00111       switch (key){
00112       case ',':
00113         if (speed - SPEED_STEP > 0)
00114           speed -= SPEED_STEP;
00115         cerr << "speed = "<<speed<<endl;
00116         break;
00117       case '.':
00118         speed += SPEED_STEP;
00119         cerr << "speed = "<<speed<<endl;
00120         break;
00121       case 's':
00122         slideshow=!slideshow;
00123         cerr << "slideshow "<<boolalpha << slideshow<<endl;
00124         break;
00125       case 'q':
00126       case 27 : // esc
00127         finished=true;
00128         break;
00129       case ' ':
00130         index++;
00131         if (index==argc) index=1;
00132         break;
00133       case '8': // backspace
00134         index--;
00135         if (index<=1) index=argc-1;
00136         break;
00137       case 'i':
00138         cout << argv[index] << ":"<<endl;
00139         cout << gsm << endl;
00140         break;
00141       case  'w':
00142         if (gt && showtrue){
00143           ImageIO::Write("true.mip", trueim);
00144           cout << "wrote \"true.mip\"\n";
00145         } else {
00146           ImageIO::Write("noisy.mip", trueim);
00147           cout << "wrote \"noisy.mip\"\n";
00148         }
00149         break;
00150       case 't':
00151         showtrue=!showtrue;
00152         if (showtrue)
00153           cout << "showing ground truth matches\n";
00154         else
00155           cout << "showing noisy matches\n";
00156         break;
00157       case 'h':
00158         help(argv[0]);
00159         break;
00160       default:
00161         cerr << "key "<<(int)key<<endl;
00162         break;
00163       }
00164     } else { // mouse event
00165       if (Button==3 && Pressed){ // right mouse button pressed
00166         gui.GetZoomImage(Xpos, Ypos, zoomfactor, zoomsize, zoomimage);
00167         zoomed=true;
00168         zoomgui.SetFactorOffset(Xpos-zoomsize, Ypos-zoomsize, zoomfactor);
00169         zoomgui.ShowImage(zoomimage);
00170       }
00171     }
00172   }
00173   return 0;
00174 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasview.cpp Source File

Tools

biasview.cpp

Go to the documentation of this file.
00001 /*
00002    This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004    Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005    Multimediale Systeme der Informationsverarbeitung
00006    Institut fuer Informatik
00007    Christian-Albrechts-Universitaet Kiel
00008
00009
00010    BIAS is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU Lesser General Public License as published by
00012    the Free Software Foundation; either version 2.1 of the License, or
00013    (at your option) any later version.
00014
00015    BIAS is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU Lesser General Public License for more details.
00019
00020    You should have received a copy of the GNU Lesser General Public License
00021    along with BIAS; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Gui/GuiEnhanced.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030 #include <Image/Camera.hh>
00031 #include <Image/Histogram.hh>
00032 #include <stdio.h>
00033 #include <unistd.h>
00034 #include <getopt.h>
00035 #include <Base/Debug/TimeMeasure.hh>
00036 #include <bias_config.h>
00037
00038 #ifdef BIAS_DAIMLERCHRYSLER
00039 #include <sys/types.h>
00040 #include <sys/stat.h>
00041 #include <unistd.h>
00042 #include <fcntl.h>
00043 #include <Base/Image/ImageDraw.hh>
00044 #endif
00045
00046 using namespace BIAS;
00047 using namespace std;
00048
00049 #define SPEED_STEP 10000
00050
00051
00052 // JW
00053 #define  DEFAULT_FIXED_SCALE true
00054 #define  FIXED_MIN 0.0
00055 #define  FIXED_MAX 25.0
00056
00057
00058 void usage(char * name)
00059 {
00060   cerr << endl << endl << name << " [options] filename ..."<<endl
00061        << " [-h]      help"<< endl
00062        << " [-v]      verbose"<<endl
00063        << " [-t n]    sleep n * 10-6s (n us) between frames" << endl
00064        << " [-f name] read images from file name"<<endl
00065        << " [-s]      start in movie mode"<<endl
00066        << " [-o]      quit after showing each image once"<<endl
00067        << " right mouse button to zoom"<<endl
00068        << endl << endl;
00069 }
00070
00071
00072
00073 void showhistogram(ImageBase &img, GuiGTK & histgui)
00074 {
00075   Histogram hist(2);
00076   Image<unsigned char> HistImg;
00077   if (ImageConvert::Convert(img, HistImg, ImageBase::CM_Grey)!=0){
00078     BIASERR("error converting");
00079   }
00080   hist.InitHist();
00081   hist.SetColor(0, 0, 0, 0);
00082   hist.SetDrawMode(HIST_BARS);
00083   hist.AddHist(HistImg);
00084   hist.Draw();
00085   histgui.ShowImage(hist);
00086 }
00087
00088
00089
00090 //#include <stdio.h>  // for strcmp JW
00091 void Scale(ImageBase& src, Image<unsigned char>& dst)
00092 {
00093   switch(src.GetStorageType()){
00094   case ImageBase::ST_unsignedchar:
00095     {
00096       dst=src;
00097       unsigned char min, max;
00098       dst.GetMinMaxPixelValue(min, max);
00099       if (min!=max)
00100         dst.ScaleShiftBetween(dst.MinSTValue(), dst.MaxSTValue());
00101     }
00102     break;
00103 #ifdef BUILD_IMAGE_USHORT
00104   case ImageBase::ST_unsignedshortint:
00105     {
00106       Image<unsigned short> src2(src);
00107       unsigned short min, max;
00108       src2.GetMinMaxPixelValue(min, max);
00109       if (min!=max)
00110         src2.ScaleShiftBetween(dst.MinSTValue(), dst.MaxSTValue());
00111       ImageConvert::ConvertST(src2, dst, ImageBase::ST_unsignedchar);
00112     }
00113     break;
00114 #endif
00115   case ImageBase::ST_float:
00116     {
00117       Image<float> src2(src);
00118       float min, max;
00119       bool fixed = DEFAULT_FIXED_SCALE; // HACK scaleshift or fixed scale
00120       src2.GetMinMaxPixelValue(min, max);
00121       //if (argc>=2) if (strcmp(argv[1],"-fixed")==0) fixed=true;
00122       if (min!=max){
00123         if (fixed){
00124           //cout<<"DBG using FIXED scale "<<FIXED_MIN<<" .. "
00125           //   <<FIXED_MAX<<" scale."<<endl;
00126           src2.ScaleShiftBetween(FIXED_MIN, FIXED_MAX);
00127         } else {
00128           //cout<<"DBG using ScaleShiftbetween Min Max "<<endl;
00129           src2.ScaleShiftBetween(dst.MinSTValue(), dst.MaxSTValue());
00130         };
00131       }
00132       ImageConvert::ConvertST(src2, dst, ImageBase::ST_unsignedchar);
00133     }
00134     break;
00135   default:
00136     BIASERR("Support for storage type "<<src.GetStorageType()
00137             <<" not compiled in.");
00138     break;
00139   }
00140 }
00141
00142 void PrintKeyCommands()
00143 {
00144     cout <<"Key commands:"<<endl;
00145     cout <<" q/ESC : Quit"<<endl;
00146     cout <<" s     : slide show/film"<<endl;
00147     cout <<"SPC    : next image"<<endl;
00148     cout <<"BkSPC  : previous image"<<endl;
00149     cout <<" c     : color/grey"<<endl;
00150     cout <<" v     : print pixel value"<<endl;
00151     cout <<" ,/.   : decrease/increase film speed"<<endl;
00152     cout <<" h     : histogram"<<endl;
00153     cout <<" S     : toggle scaling of image values between 0 and 255 "<<endl;
00154     cout <<" p     : print header of image" << endl;
00155 #ifdef BIAS_DAIMLERCHRYSLER
00156     cout <<" m     : create a file <file_name>.mo"<<endl;
00157     cout <<" n     : remove file <file_name>.mo"<<endl;
00158     cout <<" [     : decrease shift"<<endl;
00159     cout <<" ]     : increase shift"<<endl;
00160 #endif
00161     //    cout <<"<     : downsample by 2"<<endl
00162     cout <<endl;
00163 }
00164
00165 void ShiftAndMark(ImageBase& pic, int& shift, char **images, int nextfile)
00166 {
00167 #ifdef BIAS_DAIMLERCHRYSLER
00168 #  ifdef BUILD_IMAGE_USHORT
00169       if (pic.GetStorageType()==ImageBase::ST_unsignedshortint){
00170         Image<unsigned short> dc_pic;
00171         dc_pic.StealImage(pic);
00172         // shift the images
00173         if (shift!=-1){
00174           //           cout << "shifting about "<<shift<<endl;
00175           unsigned short int *p, *e;
00176           p = dc_pic.GetImageData();
00177           e = p + dc_pic.GetPixelCount()*dc_pic.GetChannelCount();
00178           while (p<e) {
00179             *p = ((*p) >>shift);
00180             if ((*p) > 255) (*p) = 255;
00181             p++;
00182           }
00183         }
00184
00185         string dc_name=images[nextfile];
00186         dc_name+=".mo";
00187         struct stat buf;
00188         if (stat(dc_name.c_str(), &buf)==0){
00189           // now mark all 4 corners white/black or red
00190           unsigned short mbval=(shift==-1)?(4095):(255);
00191           unsigned short bval[]={mbval, mbval, mbval};
00192           unsigned short sval[]={0, 0, 0};
00193           if (dc_pic.GetChannelCount()==3){
00194             sval[0]=mbval;
00195             bval[1]=bval[2]=0;
00196           }
00197
00198           int dc_size=20;
00199           int w=pic.GetWidth(), h=pic.GetHeight();
00200
00201           dc_pic.SetROI(0, 0, dc_size, dc_size);
00202           dc_pic.FillImageWithConstValue(bval);
00203           ImageDraw<unsigned short>::
00204             RectangleCorners(dc_pic, 0, 0, dc_size, dc_size, sval);
00205           ImageDraw<unsigned short>::
00206             RectangleCorners(dc_pic, 1, 1, dc_size-1, dc_size-1, sval);
00207           dc_pic.SetROI(w-dc_size, 0 , w, dc_size);
00208           dc_pic.FillImageWithConstValue(sval);
00209           ImageDraw<unsigned short>::
00210             RectangleCorners(dc_pic, 0, h-dc_size-1, dc_size, h-1, bval);
00211           ImageDraw<unsigned short>::
00212             RectangleCorners(dc_pic, 1, h-dc_size-2, dc_size-1, h-2, bval);
00213           dc_pic.SetROI(0, h-dc_size, dc_size, h);
00214           dc_pic.FillImageWithConstValue(sval);
00215           ImageDraw<unsigned short>::
00216             RectangleCorners(dc_pic, 0, h-dc_size-1, dc_size, h-1, bval);
00217           ImageDraw<unsigned short>::
00218             RectangleCorners(dc_pic, 1, h-dc_size-2, dc_size-1, h-2, bval);
00219           dc_pic.SetROI(w-dc_size, h-dc_size, w, h);
00220           dc_pic.FillImageWithConstValue(bval);
00221           ImageDraw<unsigned short>::
00222             RectangleCorners(dc_pic, w-dc_size-1, h-dc_size-1, w-1, h-1, sval);
00223           ImageDraw<unsigned short>::
00224             RectangleCorners(dc_pic, w-dc_size-2, h-dc_size-2, w-2, h-2, sval);
00225         }
00226
00227         pic.StealImage(dc_pic);
00228       }
00229 #  endif
00230 #endif
00231 }
00232
00233 /** @class biasview
00234     @ingroup g_tools
00235     @brief tool for displaying images based on GTK
00236     \deprecated biasview was replaced by biasviewwx
00237     This tool is DEPRECATED. Pleas eus ebiasviewwx instead.
00238     @author woelk/evers 2001-2004 */
00239 int main (int argc, char *argv[])
00240 {
00241   int shift=2;
00242   //   TimeMeasure T1;
00243   GuiEnhanced win;
00244   win.InitGtk(&argc,&argv);
00245
00246   //win.SetDebugLevel(D_GUI_MAIN | D_GUI_MUTEX |D_GUI_DESTRUCT|D_GUI_SIGNAL );
00247
00248   bool keyevent=true, pressed=false, zpressed=false;
00249   int button=-1, x=-1, y=-1, zx, zy, zbutton, xoffset, yoffset;
00250   char title[200];
00251   char c, zc;
00252   int files;
00253   int nextfile;
00254   int offset, count=0;
00255   long int speed = 10001;
00256   bool done = false;
00257   bool loadnewimage = true;
00258   bool slideshow = false;
00259   bool color = true;
00260   bool quiet = true;
00261   bool showscaled = false;
00262   //  unsigned char min, max; // minimal and maximal pixel values in displayImg
00263
00264   ImageBase pic; // the original image
00265   //Image<unsigned char> zoomimage; // the zoomimage
00266   ImageBase zoomimage;
00267   // image values are scaled to a maximal contrast
00268   Image<unsigned char> scaledimage;
00269   ImageBase displayImg;
00270
00271   GuiGTK zoomgui;
00272   char zoomtitle[1024];
00273   int zoomfactor =10;
00274   int zoomsize = 20;
00275   bool zoom=false;
00276   bool zoomevent, winevent, zkeyevent;
00277
00278   GuiGTK histgui;
00279   bool showhist  = false;
00280   bool once=false; // only cycle onec through the images and exit
00281
00282
00283   struct ::option opts[] = {
00284     {"geometry", required_argument, 0, 'g'},
00285     {0, 0, 0, 0}
00286   };
00287   char **images=NULL;
00288
00289   ifstream is;
00290   char name[1024];
00291
00292   if (argc <2) {
00293     usage(argv[0]);
00294     //exit(1);
00295     return 0; // for Dart testing
00296   }
00297
00298   images = argv;
00299
00300   while ((c = getopt_long_only(argc, argv, "vhg:st:f:o", opts, 0)) != EOF)
00301     {
00302       switch (c){
00303       case 'f':
00304         //      cerr << optarg << endl;
00305         is.open(optarg);
00306         count = 0;
00307         while (!is.eof()){
00308           is >> name;
00309           //      cerr << "countig... " << name << endl;
00310           count++;
00311         }
00312         //      cerr << count << endl;
00313         is.clear();
00314         is.seekg(ios::beg);
00315         images = new char*[argc+count+1];
00316         count=0;
00317         while (!is.eof()){
00318           is >> name;
00319           //      cerr << "reading.. " << name << endl;
00320           images[argc+count] = new char[strlen(name)+1];
00321           strcpy(images[argc+count], name);
00322           count++;
00323         };
00324         is.close();
00325         break;
00326       case 'v':
00327         quiet = false;
00328         break;
00329       case 'h':
00330         usage(argv[0]);
00331         return 0;
00332         break;
00333       case 't':
00334         speed = atol(optarg);
00335         //  cerr << "speed " << speed << endl;
00336         break;
00337       case 's':
00338         slideshow = true;
00339         //        cerr << "slideshow found" << endl;
00340         break;
00341       case 'o':
00342         once=true;
00343         break;
00344       default:
00345         break;
00346       }
00347     }
00348
00349
00350   offset = optind;
00351   files = argc + count - offset;
00352   nextfile = optind;
00353
00354   //cerr << argc << " " << offset << " " << files << endl;
00355   //    for (int i=0; i<argc; i++){
00356   //      cerr << images[i] << endl;
00357   //    }
00358
00359   if (!quiet) PrintKeyCommands();
00360
00361   while (!done){
00362
00363     if (loadnewimage) {
00364       showscaled = false;
00365       if (ImageIO::Load(images[nextfile], pic)!=0){
00366         BIASERR("Error loading "<<images[nextfile]<<endl
00367                 <<"Displaying black image.");
00368         Image<unsigned char> tmppic(640,480,1);
00369         tmppic.FillImageWithConstValue((unsigned char)0);
00370         pic = tmppic;
00371       }
00372
00373       sprintf(title,"%s",images[nextfile]);
00374       win.SetTitle(title);
00375       if (!quiet) {
00376         cout <<"=== "<<title<<" === "<<pic.GetStorageType()<<" : "<<
00377           pic.GetColorModel()<< endl;
00378         cout << "found " << pic.GetMetaData()->size()
00379              << " different meta datas." << endl;
00380         if (pic.GetMetaData()->size() >0){
00381           Camera<unsigned char> cam(pic);
00382           //cout << "found " << cam.GetMetaData()->size()
00383           //     << " different meta datas in camera." << endl;
00384           //cam.SetDebugLevel(cam.GetDebugLevel() | D_CAMERA_METADATA);
00385           cam.ParseMetaData();
00386           //cam.GetMetaData()->Dump();
00387           cam.PrintAppData(cout);
00388         }
00389       }
00390
00391       ShiftAndMark(pic, shift, images, nextfile);
00392
00393       if (!displayImg.IsEmpty()) displayImg.Release();
00394       if (! color || (pic.GetChannelCount()==1
00395                       && pic.GetColorModel()!=ImageBase::CM_DV
00396                       && pic.GetColorModel()!=ImageBase::CM_Bayer_RGGB
00397                       && pic.GetColorModel()!=ImageBase::CM_Bayer_GBRG
00398                       && pic.GetColorModel()!=ImageBase::CM_Bayer_GRBG
00399                       && pic.GetColorModel()!=ImageBase::CM_Bayer_BGGR)){
00400         if (ImageConvert::Convert(pic, displayImg, ImageBase::CM_Grey)!=0){
00401           BIASERR("error converting");
00402         }
00403       } else {
00404         if (ImageConvert::Convert(pic, displayImg, ImageBase::CM_RGB)!=0){
00405           BIASERR("error converting");
00406         }
00407       }
00408
00409       Scale(pic, scaledimage);
00410
00411       if (showscaled){
00412         //cerr << "showing scaled image" <<endl;
00413         win.ShowImage(scaledimage);
00414       } else {
00415         //cerr << "showing displayImg "<<displayImg.GetStorageType() <<endl;
00416         win.ShowImage(displayImg);
00417       }
00418       loadnewimage = false;
00419       zoomgui.DestroyWindow();
00420       zoom=false;
00421       if (showhist)
00422         showhistogram(displayImg,histgui);
00423
00424     }
00425
00426     if (!slideshow) {
00427       if (zoom) {
00428         zoomevent=winevent=false;
00429         while (!winevent){
00430           winevent =
00431             win.CheckForEvent(keyevent, c, pressed, button, x, y);
00432           if (zoomgui.CheckForEvent(zkeyevent, zc, zpressed, zbutton, zx, zy)){
00433             if (zkeyevent){
00434               switch(zc){
00435               case 'v':{
00436                 int x, y;
00437                 int xoff, yoff, fac;
00438                 zoomgui.GetFactorOffset(xoff, yoff, fac);
00439                 x = zoomgui.GetMouseX()/fac+xoff;
00440                 y = zoomgui.GetMouseY()/fac+yoff;
00441                 if (x<(int)pic.GetWidth() && y<(int)pic.GetHeight()){
00442                   cout <<"Value at: ("<<x<<","<<y<<") : ";
00443                   switch (pic.GetStorageType()){
00444                   case ImageBase::ST_unsignedchar:
00445                     for (unsigned int c=0; c<pic.GetChannelCount(); c++)
00446                       cout << (int)(((unsigned char **)pic.GetImageDataArray())
00447                                     [y][x*pic.GetChannelCount()+c])<<" ";
00448                     break;
00449                   case ImageBase::ST_float:
00450                     cout << ((float **)pic.GetImageDataArray())[y][x];
00451                     break;
00452 #ifdef BUILD_IMAGE_UINT
00453                   case ImageBase::ST_unsignedint:
00454                     cout << ((unsigned int **)pic.GetImageDataArray())[y][x];
00455                     break;
00456 #endif
00457                   default:
00458                     break;
00459                   }
00460                   cout <<endl;
00461                 }
00462               }
00463                 break;
00464               default:
00465                 cout << zc << endl;
00466                 break;
00467               }
00468             }
00469           } else {
00470             usleep(10001);
00471           }
00472         }
00473
00474
00475       } else {
00476         win.WaitForEvent(keyevent, c, pressed, button, x, y);
00477       }
00478     } else {
00479       c = win.CheckForKeyEvent();
00480       usleep(speed);
00481     }
00482
00483     if (keyevent){
00484       //cerr << "keyevent: "<<c<<endl;
00485       switch (c) {
00486       case ',':
00487         if (speed - SPEED_STEP > 0)
00488           speed -= SPEED_STEP;
00489         break;
00490       case '.':
00491         speed += SPEED_STEP;
00492         break;
00493       case 'q':
00494       case 27:
00495         done = true;
00496         break;
00497       case ' ':
00498         nextfile ++;
00499         if (nextfile >= files+offset) nextfile = offset;
00500         loadnewimage = true;
00501         break;
00502       case 8:
00503         nextfile --;
00504         if (nextfile < offset ) nextfile = files + offset-1;
00505         loadnewimage = true;
00506         break;
00507       case 's':
00508         slideshow = !slideshow;
00509         break;
00510       case 'c':
00511         color = !color;
00512         loadnewimage = true;
00513         break;
00514       case 'h':
00515         showhist = !showhist;
00516         if (showhist)
00517           showhistogram(displayImg,histgui);
00518         else
00519           histgui.DestroyWindow();
00520         break;
00521       case 'p':
00522         cout << "image header: "<< endl;
00523         pic.PrintHeader(std::cout);
00524         cout << endl;
00525         break;
00526       case 'v':
00527         int x,y;
00528         x = win.GetMouseX();
00529         y = win.GetMouseY();
00530         cout <<"Value at: ("<<x<<","<<y<<") : ";
00531         switch (pic.GetStorageType()){
00532         case ImageBase::ST_unsignedchar:
00533           for (unsigned int c=0; c<pic.GetChannelCount(); c++)
00534             cout << (int)(((unsigned char **)pic.GetImageDataArray())
00535                           [y][x*pic.GetChannelCount()+c])<<" ";
00536           break;
00537         case ImageBase::ST_float:
00538           cout << ((float **)pic.GetImageDataArray())[y][x];
00539           break;
00540 #ifdef BUILD_IMAGE_UINT
00541         case ImageBase::ST_unsignedint:
00542           cout << ((unsigned int **)pic.GetImageDataArray())[y][x];
00543           break;
00544 #endif
00545         default:
00546           break;
00547         }
00548         cout <<endl;
00549         break;
00550       case 'S':
00551         if (pic.GetStorageType() != ImageBase::ST_unsignedchar){
00552           cerr << "'S' scale image only reasonable with unsigned char image"
00553                <<endl;
00554         }
00555         if (showscaled){
00556           showscaled=false;
00557           win.ShowImage(displayImg);
00558         } else {
00559           showscaled=true;
00560           win.ShowImage(scaledimage);
00561         }
00562         break;
00563       case 'k':
00564         PrintKeyCommands();
00565         break;
00566 #ifdef BIAS_DAIMLERCHRYSLER
00567       case 'm':
00568         {
00569           string dc_name=images[nextfile];
00570           dc_name+=".mo";
00571           int mres=open(dc_name.c_str(), O_RDWR | O_CREAT, 644);
00572           if (mres==-1){
00573             BIASERR("error creating "<<dc_name);
00574             perror("");
00575           } else {
00576             cout << "wrote "<<dc_name<<endl;
00577           }
00578           nextfile ++;
00579           if (nextfile >= files+offset) nextfile = offset;
00580           loadnewimage = true;
00581         }
00582         break;
00583       case 'n':
00584         {
00585           string dc_name=images[nextfile];
00586           dc_name+=".mo";
00587           int mres=unlink(dc_name.c_str());
00588           if (mres!=0){
00589             BIASERR("error removing "<<dc_name);
00590             perror("");
00591           } else {
00592             cout << "removed "<<dc_name<<endl;
00593           }
00594           nextfile ++;
00595           if (nextfile >= files+offset) nextfile = offset;
00596           loadnewimage = true;
00597         }
00598         break;
00599       case '[':
00600         shift-=1;
00601         if (shift<-1) shift=-1;
00602         cout << "shift = "<<shift<<endl;
00603         loadnewimage = true;
00604         break;
00605       case ']':
00606         shift+=1;
00607         if (shift>4) shift=4;
00608         cout << "shift = "<<shift<<endl;
00609         loadnewimage = true;
00610         break;
00611 #endif
00612       default:
00613         if (!quiet)
00614           cout <<"Taste: "<<(int)c<<endl;
00615         break;
00616       }
00617     } else { // button event
00618       //cerr << "buttonevent: "<<button<<"   at ("<<x<<", "<<y<<")"<<endl;
00619       if (pressed && button == 3){
00620         win.GetZoomImage(x, y, zoomfactor, zoomsize, zoomimage,
00621                          xoffset, yoffset);
00622         sprintf(zoomtitle,"%s: zoomfactor (%i, %i)", images[nextfile], x, y);
00623         zoomgui.SetTitle(zoomtitle);
00624         zoomgui.SetFactorOffset(xoffset, yoffset, zoomfactor);
00625         zoomgui.ShowImage(zoomimage);
00626         zoom=true;
00627       }
00628       keyevent = true;
00629       c = -1;
00630       pressed = false;
00631       button = -1;
00632       x = y = -1;
00633     }
00634
00635     if (slideshow) {
00636       nextfile ++;
00637       if (nextfile >= files+offset) {
00638         if (once){
00639           done=true;
00640         } else {
00641           nextfile = offset;
00642         }
00643       }
00644       loadnewimage = true;
00645     }
00646     if (win.Closed()) {
00647       //cerr <<"closed"<<endl;
00648       done=true;
00649     } else {
00650       //cerr <<"not closed"<<endl;
00651     }
00652   } //  while (!done)
00653   return 0;
00654 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/biasviewwx.cpp Source File

Tools

biasviewwx.cpp

Go to the documentation of this file.
00001 /**
00002 \todo implement command line switch to terminate biasviewwx automatically
00003 with useful return code for dart ADD_TEST to be able to test biasvviewwx
00004 run in nightly cmake Dart dashboard (JW)
00005 */
00006
00007 #include <wx/wx.h>
00008 #include <wx/spinctrl.h>
00009 #include <wx/dnd.h>
00010 #include <wx/filename.h>
00011 #include <wx/arrstr.h>
00012
00013
00014 #include <string>
00015 #include <sstream>
00016 #include <limits>
00017
00018 #include <Gui/ImageCanvas.hh>
00019 #include <Gui/ConsoleRedirectIO.hh>
00020 #include <Gui/StringConv.hh>
00021 #include <Base/Image/ImageIO.hh>
00022 #include <Base/Common/FileHandling.hh>
00023 #include <Image/Camera.hh>
00024
00025
00026 #define FRAME_DEFAULT_SIZE  wxSize(700,500)
00027
00028 using namespace std;
00029 using namespace BIAS;
00030
00031 #undef WXWIN_COMPATIBILITY
00032
00033
00034 #if !wxUSE_DRAG_AND_DROP
00035 #  error The dndFileTarget class requires drag and drop support in the WX library. Please recompile wxWidgets. __FILE__: __LINE__
00036 #endif
00037
00038 /*
00039 ===============================================================================
00040 MainFrame
00041 ===============================================================================
00042 */
00043
00044 enum
00045 {
00046   // menu item IDs
00047   ID_Load,
00048   ID_Info,
00049   ID_MetaData,
00050   ID_Exit,
00051   ID_KeyInfo,
00052   ID_About,
00053
00054   // toolbar item IDs
00055   ID_Next,
00056   ID_Prev,
00057   ID_RunStop,
00058   ID_Delay,
00059   ID_Fit,
00060
00061   // timer ID
00062   ID_Timer
00063 };
00064
00065 class MainFrame : public wxFrame
00066 {
00067
00068 public:
00069   friend class DragAndDropTarget;
00070
00071   MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00072
00073   void SetFileList(const vector<string>& fileNames);
00074   void LoadImages(const wxArrayString &paths);
00075
00076   /// fits the frame size if it is too small for curent image
00077   void FitSizetIfTooSmall();
00078
00079   /// workaround adapting client canvases size
00080   void RefitClients();
00081
00082 protected:
00083   void LoadImageFromList(int index);
00084
00085   ImageCanvas*        _ImageCanvasUC;
00086   ScaledImageCanvas*  _ImageCanvasFloat;
00087   vector<string>      _FileNames;
00088   int                 _CurrentImage;
00089   string              _MetaData;
00090   wxTimer             _Timer;
00091   bool                _BlockAnimation;
00092   wxSpinCtrl*         _DelaySpin;
00093   wxCheckBox*         _FitCheckBox;
00094   wxCheckBox*         _ReverseCheckBox;
00095   wxButton*           _RunStopButton;
00096   bool                _NeedReload;
00097
00098   // for file open dialog
00099   wxString            _DefaultFile;
00100   wxString            _DefaultDir;
00101
00102   // event handlers
00103   void OnLoad(wxCommandEvent& event);
00104   void OnInfo(wxCommandEvent& event);
00105   void OnMetaData(wxCommandEvent& event);
00106   void OnExit(wxCommandEvent& event);
00107   void OnKeyInfo(wxCommandEvent& event);
00108   void OnAbout(wxCommandEvent& event);
00109
00110   void OnNext(wxCommandEvent& event);
00111   void OnPrev(wxCommandEvent& event);
00112   void OnRunStop(wxCommandEvent& event);
00113   void OnDelay(wxSpinEvent& event);
00114   void OnFit(wxCommandEvent& event);
00115
00116   void OnTimer(wxTimerEvent& event);
00117   void OnIdle(wxIdleEvent& event);
00118   void OnSize(wxSizeEvent& event);
00119
00120   DECLARE_EVENT_TABLE()
00121 };
00122
00123 BEGIN_EVENT_TABLE(MainFrame, wxFrame)
00124 EVT_MENU    (ID_Load,     MainFrame::OnLoad)
00125 EVT_MENU    (ID_Info,     MainFrame::OnInfo)
00126 EVT_MENU    (ID_MetaData, MainFrame::OnMetaData)
00127 EVT_MENU    (ID_Exit,     MainFrame::OnExit)
00128
00129 EVT_MENU    (ID_KeyInfo,  MainFrame::OnKeyInfo)
00130 EVT_MENU    (ID_About,    MainFrame::OnAbout)
00131
00132 EVT_BUTTON  (ID_Next,     MainFrame::OnNext)
00133 EVT_BUTTON  (ID_Prev,     MainFrame::OnPrev)
00134 EVT_BUTTON  (ID_RunStop,  MainFrame::OnRunStop)
00135 EVT_SPINCTRL(ID_Delay,    MainFrame::OnDelay)
00136 EVT_CHECKBOX(ID_Fit,      MainFrame::OnFit)
00137
00138 EVT_MENU    (ID_Next,     MainFrame::OnNext)
00139 EVT_MENU    (ID_Prev,     MainFrame::OnPrev)
00140 EVT_MENU    (ID_RunStop,  MainFrame::OnRunStop)
00141
00142 EVT_TIMER   (ID_Timer, MainFrame::OnTimer)
00143 EVT_IDLE    (MainFrame::OnIdle)
00144 EVT_SIZE    (MainFrame::OnSize)
00145 END_EVENT_TABLE()
00146
00147
00148 // ctor
00149 MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00150 : wxFrame((wxFrame*)NULL, -1, title, pos, size)
00151 ,_ImageCanvasUC(NULL)
00152 ,_ImageCanvasFloat(NULL)
00153 ,_FitCheckBox(NULL)
00154 {
00155   _CurrentImage     = 0;
00156   _DefaultFile      = wxT("ucim.pgm");
00157   _DefaultDir       = wxT("");
00158   _BlockAnimation   = true;
00159
00160   // init timer
00161   _Timer.SetOwner(this, ID_Timer);
00162
00163   // create file menu
00164   wxMenu* fileMenu = new wxMenu;
00165   fileMenu->Append(ID_Load, wxT("&Open/Load...\tCtrl-O"), wxT("Open a file from disk for loading"));
00166   fileMenu->Append(ID_Info, wxT("Image Info...\tCtrl-I"));
00167   fileMenu->Append(ID_MetaData, wxT("Meta Data...\tCtrl-M"));
00168   fileMenu->AppendSeparator();
00169   fileMenu->Append(ID_Exit, wxT("E&xit"), wxT("Exit this application"));
00170
00171   // create help menu
00172   wxMenu* helpMenu = new wxMenu;
00173   helpMenu->Append(ID_KeyInfo, wxT("&Keys...\tF1"));
00174   helpMenu->Append(ID_About, wxT("&About...\tCtrl-F1"));
00175
00176   // create menu bar
00177   wxMenuBar* menuBar = new wxMenuBar;
00178   menuBar->Append(fileMenu, wxT("&File"));
00179   menuBar->Append(helpMenu, wxT("&Help"));
00180   SetMenuBar(menuBar);
00181
00182   // create status bar
00183   const int numFields = 2;
00184   CreateStatusBar(numFields);
00185   int widths[] = { -3, -1 }; // sizes of fields in array, negative means relative *variable* size JW
00186   SetStatusWidths(numFields, widths);
00187   SetStatusText(wxT("Welcome to BiasViewWX"), 0);
00188
00189   // create tool bar
00190   wxToolBar* toolBar = CreateToolBar();
00191   toolBar->AddControl(new wxButton(toolBar, ID_Next, wxT("Next")));
00192   toolBar->AddControl(new wxButton(toolBar, ID_Prev, wxT("Previous")));
00193   _RunStopButton = new wxButton(toolBar, ID_RunStop, wxT("Run"));
00194   toolBar->AddControl(_RunStopButton);
00195   _ReverseCheckBox = new wxCheckBox(toolBar, -1, wxT("Reverse"));
00196   toolBar->AddControl(_ReverseCheckBox);
00197   toolBar->AddSeparator();
00198
00199   _DelaySpin = new wxSpinCtrl(toolBar, ID_Delay, wxT("100"),
00200                               wxDefaultPosition, wxDefaultSize,
00201                               wxSP_ARROW_KEYS, 1, 200);
00202   toolBar->AddControl(_DelaySpin);
00203
00204   toolBar->AddSeparator();
00205   _FitCheckBox = new wxCheckBox(toolBar, ID_Fit, wxT("Fit to window"));
00206   toolBar->AddControl(_FitCheckBox);
00207   toolBar->Realize();
00208
00209   // set the shortcuts
00210   wxAcceleratorEntry entries[3];
00211   entries[0].Set(wxACCEL_NORMAL, WXK_RETURN, ID_Next);
00212   entries[1].Set(wxACCEL_NORMAL, WXK_BACK,   ID_Prev);
00213   entries[2].Set(wxACCEL_CTRL,   WXK_SPACE,  ID_RunStop);
00214   wxAcceleratorTable accel(3, entries);
00215   SetAcceleratorTable(accel);
00216 }
00217
00218 void MainFrame::SetFileList(const vector<string>& fileNames)
00219 {
00220   _FileNames = fileNames;
00221   if (_FileNames.size() > 0)
00222   {
00223     LoadImageFromList(0);
00224   }
00225 }
00226
00227 void MainFrame::LoadImageFromList(int index)
00228 {
00229   if (_FileNames.size() == 0)
00230   {
00231     return;
00232   }
00233
00234   _CurrentImage = index;
00235   const string& fileName = _FileNames[index];
00236
00237   // load image
00238   ImageBase image;
00239   if (ImageIO::Load(fileName.c_str(), image)!=0)
00240   {
00241     stringstream msg;
00242     msg << "Error loading " << fileName;
00243     BIASERR(msg.str());
00244     SetStatusText(AsciiToWx(msg.str()));
00245     return;
00246   }
00247
00248   // save meta data for image info dialog
00249   stringstream info;
00250   switch (image.GetStorageType())
00251   {
00252   case ImageBase::ST_unsignedchar:
00253     {
00254       Camera<unsigned char> camera(image);
00255       camera.ParseMetaData();
00256       camera.PrintAppData(info);
00257     } break;
00258
00259   case ImageBase::ST_float:
00260     {
00261       Camera<float> camera(image);
00262       camera.ParseMetaData();
00263       camera.PrintAppData(info);
00264     } break;
00265
00266   default:
00267     break;
00268   }
00269   _MetaData = info.str();
00270
00271   // create appropriate image canvas based on storage type
00272   if (image.GetStorageType() == ImageBase::ST_unsignedchar)
00273   {
00274     // delete float image canvas
00275     if (_ImageCanvasFloat != NULL)
00276     {
00277       _ImageCanvasFloat->Destroy();
00278       _ImageCanvasFloat = NULL;
00279     }
00280
00281     // create uc image canvas
00282     if (_ImageCanvasUC == NULL)
00283     {
00284       _ImageCanvasUC = new ImageCanvas(this, GetStatusBar(), 1);
00285     }
00286
00287     // convert image
00288     Image<unsigned char> ucImage;
00289     ucImage.StealImage(image);
00290     ucImage.SetUID(image.GetUID());
00291
00292     if (_FitCheckBox->IsChecked())
00293     {
00294       // get size available for image canvas
00295       int width, height;
00296       GetClientSize(&width, &height);
00297
00298       // compute scale that keeps the aspect ratio and the image is fully visible
00299       float xscale = (float)width / image.GetWidth();
00300       float yscale = (float)height / image.GetHeight();
00301       float scale = xscale < yscale ? xscale : yscale;
00302
00303       _ImageCanvasUC->SetScaledImageSize((int)(image.GetWidth() * scale), (int)(image.GetHeight() * scale));
00304       _ImageCanvasUC->SetShowScaled(true);
00305     }
00306     else
00307     {
00308       _ImageCanvasUC->SetShowScaled(false);
00309     }
00310
00311     // show image in canvas
00312     _ImageCanvasUC->Show(ucImage, fileName);
00313
00314     // don't show scrollbars if image is maximized
00315     if (_FitCheckBox->IsChecked())
00316     {
00317       _ImageCanvasUC->SetScrollbars(0, 0, 0, 0);
00318     }
00319   }
00320   else
00321   {
00322     // delete uc image canvas
00323     if (_ImageCanvasUC != NULL)
00324     {
00325       _ImageCanvasUC->Destroy();
00326       _ImageCanvasUC = NULL;
00327     }
00328
00329     // create float image canvas
00330     if (_ImageCanvasFloat == NULL)
00331     {
00332       _ImageCanvasFloat = new ScaledImageCanvas(this, GetStatusBar(), 1);
00333     }
00334
00335     // set appropriate scale and offset range
00336     switch (image.GetStorageType())
00337     {
00338     case ImageBase::ST_unsignedshortint:
00339       _ImageCanvasFloat->SetScaleRange(1.0/16.0, 1.0);
00340       _ImageCanvasFloat->SetOffsetRange(-4095.0, 0.0);
00341       break;
00342
00343     case ImageBase::ST_char:
00344       _ImageCanvasFloat->SetScaleRange(0.5, 5.0);
00345       _ImageCanvasFloat->SetOffsetRange(-128.0, 128.0);
00346       break;
00347
00348     case ImageBase::ST_float:
00349       _ImageCanvasFloat->SetScaleRange(0.5, 50.0);
00350       _ImageCanvasFloat->SetOffsetRange(-100.0, 100.0);
00351       break;
00352
00353     default:
00354       cout << "Warning: Unknown storage type" << endl;
00355       // TODO: set default ranges? don't show image at all?
00356       break;
00357     }
00358
00359     if (_FitCheckBox->IsChecked())
00360     {
00361       // get size available for image canvas
00362       int width, height;
00363       GetClientSize(&width, &height);
00364       width = max(1, width - 10); // little fix so the image is really fully visible
00365       height = max(1, height - 40); // larger fix because of sliders in float canvas
00366
00367       // compute scale that keeps the aspect ratio and the image is fully visible
00368       float xscale = (float)width / image.GetWidth();
00369       float yscale = (float)height / image.GetHeight();
00370       float scale = xscale < yscale ? xscale : yscale;
00371
00372       _ImageCanvasFloat->GetImageCanvas()->SetScaledImageSize((int)(image.GetWidth() * scale), (int)(image.GetHeight() * scale));
00373       _ImageCanvasFloat->GetImageCanvas()->SetShowScaled(true);
00374     }
00375     else
00376     {
00377       _ImageCanvasFloat->GetImageCanvas()->SetShowScaled(false);
00378     }
00379
00380     // show image in canvas
00381     _ImageCanvasFloat->Show(image, fileName);
00382
00383     // don't show scrollbars if image is maximized
00384     if (_FitCheckBox->IsChecked())
00385     {
00386       _ImageCanvasFloat->GetImageCanvas()->SetScrollbars(0, 0, 0, 0);
00387     }
00388   }
00389
00390   stringstream msg;
00391   msg << "File '" << fileName << "' (" << image.GetWidth() << "x" << image.GetHeight() << ") loaded";
00392   SetStatusText(AsciiToWx(msg.str()));
00393
00394   // make the shortcuts work without the need to click the canvas manually (on linux)
00395   if (_ImageCanvasUC) _ImageCanvasUC->SetFocus();
00396   if (_ImageCanvasFloat) _ImageCanvasFloat->SetFocus();
00397
00398   this->RefitClients();
00399 }
00400
00401
00402 void MainFrame::LoadImages(const wxArrayString &paths)
00403 {
00404   // add file names to internal std::string list
00405   bool ok=true;
00406   for (int i = 0; i < (int)paths.GetCount(); i++) {
00407     wxString extUP=wxFileName(paths[i]).GetExt().Upper();
00408     if (wxFileName(paths[i]).IsDir()) {
00409       ok=false;
00410     } else if ((extUP==AsciiToWx("LST")) || (extUP==AsciiToWx("TXT"))) {
00411       // special handling for .lst and .txt files.
00412       // they are no images but contain a list of line separated image
00413       //filenames
00414       vector<string> lstFilenames;
00415       int result=BIAS::Param::ParseListFile(WxToAscii(paths[i]),
00416                                             lstFilenames);
00417       if (result!=0){
00418         BIASERR("could not load image list file "<<paths[i].c_str()
00419                 <<" result="<<result<<endl);
00420       } else {
00421         // append filenames
00422         _FileNames.insert(_FileNames.end(), lstFilenames.begin(),
00423                           lstFilenames.end() );
00424       }
00425     } else {
00426       _FileNames.push_back( string(WxToAscii(paths[i])) );
00427     }
00428   }
00429
00430   // load first file and remember file name and directory
00431   if (!_FileNames.empty()) {
00432     //LoadImageFromList(_FileNames.size() - 1);
00433     //_DefaultFile = AsciiToWx(_FileNames[_FileNames.size() - 1]);
00434     LoadImageFromList(0);
00435     _DefaultFile = AsciiToWx(_FileNames[0]);
00436   }
00437
00438   if (!ok) {
00439     wxMessageBox(wxT("Dropping directories is unsupported. Please drop only "
00440                      "filenames!"),
00441                  wxT("Drag&Drop Error"), wxOK | wxICON_EXCLAMATION);
00442   }
00443 }
00444
00445 void MainFrame::FitSizetIfTooSmall()
00446 {
00447
00448   int w=0, h=0;
00449   int imgW=0, imgH=0;
00450   if (_ImageCanvasUC!=NULL){
00451     if (_ImageCanvasUC->GetOrigImage()==NULL)
00452       return;
00453     imgW = _ImageCanvasUC->GetOrigImage()->GetWidth();
00454     imgH = _ImageCanvasUC->GetOrigImage()->GetHeight();
00455   } else if (_ImageCanvasFloat!=NULL){
00456     imgW = _ImageCanvasFloat->GetOrigimg().GetWidth();
00457     imgH = _ImageCanvasFloat->GetOrigimg().GetHeight();
00458   } else {
00459     // no valid canvas, nothing to do.
00460     return;
00461   }
00462   // get current frame size, TODO: query client area of canvas instead.
00463   this->GetClientSize(&w, &h);
00464
00465   // query display screen dim
00466   int screenW=0, screenH=0;
00467   ::wxDisplaySize(&screenW, &screenH);
00468   if ( (w<imgW) || (h<imgH)) {
00469     // expand limited by screen size
00470     // TODO: adpat Client size, to avoid the FitInside...
00471     // problem: ImageCanves do not handle sizers correctly...
00472     // this is an approximation working for now:
00473     this->SetSize(
00474       0,0,
00475       // -1, -1, /* keep old pos. */
00476       min(imgW+40, screenW), min(imgH+100, screenH) );
00477   }
00478   this->RefitClients();
00479 }
00480
00481
00482 void MainFrame::RefitClients()
00483 {
00484   // canvas needs to be refitted on windows after loading (not sure why)
00485 #ifdef WIN32
00486   int w, h;
00487   GetClientSize(&w, &h);
00488   if (_ImageCanvasUC!=NULL)
00489     _ImageCanvasUC->SetSize(0, 0, w, h);
00490   if (_ImageCanvasFloat!=NULL)
00491     _ImageCanvasFloat->SetSize(0, 0, w, h);
00492 #endif
00493 }
00494
00495
00496 void MainFrame::OnLoad(wxCommandEvent& /*event*/)
00497 {
00498   wxFileDialog fileDialog(
00499     this,                          // parent
00500     wxT("Choose file(s) to load"), // message
00501     _DefaultDir,                   // default directory
00502     _DefaultFile,                  // default file
00503     wxT("*.*"),                    // wildcard
00504     wxOPEN | wxMULTIPLE);          // style
00505
00506   if (fileDialog.ShowModal() == wxID_OK)
00507   {
00508     // get file names
00509     wxArrayString paths;
00510     fileDialog.GetPaths(paths);
00511     // load them
00512     LoadImages(paths);
00513   } else {
00514     SetStatusText(wxT("Loading canceled"));
00515     cout << "Canceled loading image" << endl;
00516   }
00517
00518   _DefaultDir = fileDialog.GetDirectory();
00519 }
00520
00521 void MainFrame::OnInfo(wxCommandEvent& /*event*/)
00522 {
00523   // get currently displayed image
00524   ImageBase* image = NULL;
00525   if (_ImageCanvasUC != NULL)
00526   {
00527     image = _ImageCanvasUC->GetOrigImage();
00528   }
00529   else if (_ImageCanvasFloat != NULL)
00530   {
00531     image = &_ImageCanvasFloat->GetOrigimg();
00532   }
00533   if (image == NULL)
00534   {
00535     wxMessageBox(wxT("No image loaded"), wxT("Image Info"), wxOK | wxICON_ERROR, this);
00536     return;
00537   }
00538
00539   // collect information
00540   stringstream info;
00541   info << "Width: " << image->GetWidth() << endl;
00542   info << "Height: " <<  image->GetHeight() << endl;
00543   info << "Depth: " << image->GetDepth() << endl;
00544   info << "BitDepth: " << image->GetBitDepth() << endl;
00545   info << "Size: " << image->GetSize() << " bytes" << endl;
00546   info << "Pixel Count: " << image->GetPixelCount() << endl;
00547   info << "Channels: " << image->GetChannelCount() << endl;
00548   info << "ColorModel: "  << image->GetColorModel()  << endl;
00549   info << "StorageType: " << image->GetStorageType() << endl;
00550   info << "IsPlanar: " << image->IsPlanar() << endl;
00551   info << "IsInterleaved: " << image->IsInterleaved() << endl;
00552   info << "UUID: " << image->GetUID() << endl;
00553   info << "Version: " << image->GetVersionNumber() << endl;
00554
00555   // show information in message box
00556   wxMessageBox(AsciiToWx(info.str()), wxT("Image Info"), wxOK, this);
00557 }
00558
00559 void MainFrame::OnMetaData(wxCommandEvent& /*event*/)
00560 {
00561   wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL, false, wxT("Courier"));
00562   wxDialog* dlg = new wxDialog(this, -1, wxT("Meta Data"), wxDefaultPosition, wxDefaultSize,
00563     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
00564   wxTextCtrl* text = new wxTextCtrl(dlg, -1, wxT(""),
00565     wxDefaultPosition, wxSize(650, 400),
00566     wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
00567 #ifdef WIN32
00568   text->SetFont(font);
00569 #endif
00570   text->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, font));
00571   text->AppendText(AsciiToWx(_MetaData));
00572   text->SetInsertionPoint(0);
00573   dlg->Fit();
00574   dlg->ShowModal();
00575   dlg->Destroy();
00576 }
00577
00578 void MainFrame::OnExit(wxCommandEvent& /*event*/)
00579 {
00580   Destroy();
00581 }
00582
00583 void MainFrame::OnKeyInfo(wxCommandEvent& /*event*/)
00584 {
00585   wxString text =
00586     wxT("Next Image\tReturn\n")
00587     wxT("Prev Image\tBackspace\n")
00588     wxT("Run/Stop\tCtrl-Space");
00589
00590   wxMessageBox(text, wxT("Keys"),
00591     wxOK | wxICON_INFORMATION, this);
00592 }
00593
00594 void MainFrame::OnAbout(wxCommandEvent& /*event*/)
00595 {
00596   stringstream msg;
00597   string version = "$Revision: 2.80 $";
00598   version = version.substr(9, version.length()-10);
00599
00600   msg << "The BiasViewWX Image Viewer\n\n"
00601     << "http://www.mip.informatik.uni-kiel.de\n\n"
00602     << "build on " << __DATE__ << " " << __TIME__ << "\n"
00603     << "from file " << __FILE__ << "\n"
00604     << "with cvs file version " << version << "\n\n"
00605     << "GUI using: " << wxVERSION_STRING << "\n"
00606     << "\n";
00607
00608   wxMessageBox(AsciiToWx(msg.str()), wxT("About biasviewwx"),
00609     wxOK | wxICON_INFORMATION, this);
00610 }
00611
00612
00613 void MainFrame::OnNext(wxCommandEvent& /*event*/)
00614 {
00615   _CurrentImage++;
00616   if (_CurrentImage >= (int)_FileNames.size())
00617   {
00618     _CurrentImage = 0;
00619   }
00620   LoadImageFromList(_CurrentImage);
00621 }
00622
00623 void MainFrame::OnPrev(wxCommandEvent& /*event*/)
00624 {
00625   _CurrentImage--;
00626   if (_CurrentImage < 0)
00627   {
00628     _CurrentImage = _FileNames.size() - 1;
00629   }
00630   LoadImageFromList(_CurrentImage);
00631 }
00632
00633 void MainFrame::OnRunStop(wxCommandEvent& /*event*/)
00634 {
00635   if (_Timer.IsRunning())
00636   {
00637     _Timer.Stop();
00638     _RunStopButton->SetLabel(wxT("Run"));
00639   }
00640   else
00641   {
00642     _Timer.Start(_DelaySpin->GetValue());
00643     _RunStopButton->SetLabel(wxT("Stop"));
00644   }
00645 }
00646
00647 void MainFrame::OnDelay(wxSpinEvent& /*event*/)
00648 {
00649   if (_Timer.IsRunning())
00650   {
00651     _Timer.Start(_DelaySpin->GetValue());
00652   }
00653 }
00654
00655 void MainFrame::OnFit(wxCommandEvent& /*event*/)
00656 {
00657   LoadImageFromList(_CurrentImage);
00658 }
00659
00660 void MainFrame::OnTimer(wxTimerEvent& /*event*/)
00661 {
00662   if (!_BlockAnimation)
00663   {
00664     // block animation until at least one idle event occurs,
00665     // so the viewer doesn't get stuck if delay is too low.
00666     _BlockAnimation = true;
00667     wxCommandEvent dummyEvent;
00668
00669     if (_ReverseCheckBox->GetValue())
00670       OnPrev(dummyEvent);
00671     else
00672       OnNext(dummyEvent);
00673   }
00674 }
00675
00676 void MainFrame::OnIdle(wxIdleEvent& /*event*/)
00677 {
00678   _BlockAnimation = false;
00679 }
00680
00681 void MainFrame::OnSize(wxSizeEvent& event)
00682 {
00683   if (_FitCheckBox != NULL)
00684   {
00685     if (_FitCheckBox->IsChecked())
00686     {
00687       LoadImageFromList(_CurrentImage);
00688     }
00689   }
00690   event.Skip();
00691 }
00692
00693 /*
00694 ===============================================================================
00695 DragAndDropTarget
00696 ===============================================================================
00697 */
00698
00699 /** @brief drag and drop files onto application.
00700 drag a file from MS explorer or kde file manager directly onto an application
00701 (instaed of using a load from filename function.)
00702 @author Jan Woetzel 03/2005 */
00703 class DragAndDropTarget : public wxFileDropTarget
00704 {
00705 public:
00706   DragAndDropTarget(MainFrame* frame);
00707
00708   virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
00709 protected:
00710   MainFrame* _Frame;
00711 };
00712
00713 DragAndDropTarget::DragAndDropTarget(MainFrame* frame)
00714 {
00715   _Frame = frame;
00716 }
00717
00718 bool DragAndDropTarget::OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& filenames)
00719 {
00720   BIASASSERT( _Frame != NULL);
00721   wxArrayString sortedFilenames(filenames);
00722   // sort alphabetically because file seq is not preserved "as expected"
00723   // (at least on Windows XP Explorer)
00724   sortedFilenames.Sort();
00725   _Frame->LoadImages(sortedFilenames);
00726   _Frame->FitSizetIfTooSmall();
00727
00728   return true;
00729 }
00730
00731 /*
00732 ===============================================================================
00733 BiasViewApp
00734 ===============================================================================
00735 */
00736
00737 /** @class biasviewwx
00738     @ingroup g_tools
00739     @brief tool for displaying images using wxWidgets GUI.
00740     @author many - including woelk,evers,jw,... */
00741 class BiasViewApp : public wxApp
00742 {
00743 public:
00744   virtual bool OnInit();
00745 };
00746
00747 bool BiasViewApp::OnInit()
00748 {
00749   // utility: create a Redirection console for cout, cerr etc.
00750   ConsoleRedirectIO();
00751
00752   MainFrame* frame =
00753     new MainFrame(wxT("BiasViewWX"), wxPoint(50, 50), FRAME_DEFAULT_SIZE);
00754
00755   // append file list given on command line
00756   {
00757     wxArrayString cmdFiles;
00758     for (int i = 1; i < argc; i++){
00759       cmdFiles.Add(wxString(argv[i]));
00760     }
00761     frame->LoadImages(cmdFiles);
00762   }
00763
00764   // adapt Frame size on first loaded image
00765   frame->FitSizetIfTooSmall();
00766
00767   // create drag and drop target
00768   DragAndDropTarget* dndTarget = new DragAndDropTarget(frame);
00769   frame->SetDropTarget(dndTarget);
00770
00771   // show frame
00772   frame->Show(TRUE);
00773   SetTopWindow(frame);
00774
00775   return TRUE;
00776 }
00777
00778 IMPLEMENT_APP(BiasViewApp)
00779
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Binomial.cpp Source File

Filter

Binomial.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Binomial.hh"
00026
00027 #ifdef BIAS_DEBUG
00028 #include <Base/Image/ImageIO.hh>
00029 #endif
00030
00031 #include <Base/Common/BIASpragma.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 //////////////////////////////////////////////////////////////////////////
00037 //                 implementation
00038 //////////////////////////////////////////////////////////////////////////
00039
00040 template <class InputStorageType, class OutputStorageType>
00041 Binomial<InputStorageType, OutputStorageType>::
00042 Binomial()
00043   : Convolution<InputStorageType, OutputStorageType>()
00044 {
00045   // no param object !
00046   this->_ParamsAllocated = true;
00047   _HalfWinSize = new int;
00048   *_HalfWinSize = 1;
00049   //AddDebugLevel(D_BINOMIAL_KERNEL);
00050   _CalculateKernel(*_HalfWinSize);
00051 }
00052
00053 template <class InputStorageType, class OutputStorageType>
00054 Binomial<InputStorageType, OutputStorageType>::
00055 Binomial(Param& para, const std::string& postfix)
00056   : Convolution<InputStorageType, OutputStorageType>(para, "-Binomial"+postfix)
00057 {
00058   int grp = para.GetFreeGroupID();
00059   _AddParam(para, grp, "-Binomial"+postfix);
00060   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Binomial");
00061   //AddDebugLevel(D_BINOMIAL_KERNEL);
00062   _CalculateKernel(*_HalfWinSize);
00063 }
00064
00065 template <class InputStorageType, class OutputStorageType>
00066 Binomial<InputStorageType, OutputStorageType>::
00067 Binomial(Param& para, const int grp, const std::string& postfix)
00068   : Convolution<InputStorageType,OutputStorageType>(para,grp, "-Binomial"+postfix)
00069 {
00070   _AddParam(para, grp, "-Binomial"+postfix);
00071   //AddDebugLevel(D_BINOMIAL_KERNEL);
00072   _CalculateKernel(*_HalfWinSize);
00073 }
00074
00075 template <class StorageType, class KernelType>
00076 Binomial<StorageType, KernelType>::~Binomial()
00077 {
00078   if (this->_ParamsAllocated) {
00079     delete _HalfWinSize; _HalfWinSize = NULL;
00080   }
00081 }
00082
00083 ////////////////////////////////////////////////////////////////////////////
00084
00085 template <class InputStorageType, class OutputStorageType>
00086 int Binomial<InputStorageType, OutputStorageType>::
00087 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00088 {
00089   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter\n");
00090
00091   int res=0;
00092
00093   switch (*_HalfWinSize){
00094   case 1:
00095     res = Filter3x3(src, dst);
00096     break;
00097   case 2:
00098     res = Filter5x5(src, dst);
00099     break;
00100   default:
00101     if ((*_HalfWinSize != _LastHalfWinSize))
00102       _CalculateKernel(*_HalfWinSize);
00103     res = Convolution<InputStorageType, OutputStorageType>::Filter(src,dst);
00104     break;
00105   }
00106
00107   return res;
00108 }
00109
00110 template <class InputStorageType, class OutputStorageType>
00111 int Binomial<InputStorageType, OutputStorageType>::
00112 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst){
00113   BIASERR("Unsupported interface, use Filter");
00114   return Filter(src, dst);
00115 }
00116
00117 template <class InputStorageType, class OutputStorageType>
00118 int Binomial<InputStorageType, OutputStorageType>::
00119 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst){
00120   BIASERR("Unsupported interface, use Filter");
00121   return Filter(src, dst);
00122 }
00123
00124
00125 template <class InputStorageType, class OutputStorageType>
00126 int Binomial<InputStorageType, OutputStorageType>::
00127 Filter3x3(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00128 {
00129   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter3x3\n");
00130   int res=0;
00131   if (src.GetChannelCount()==1){
00132     if (!src.SamePixelAndChannelCount(dst))
00133       if (!dst.IsEmpty()) dst.Release();
00134     if (dst.IsEmpty()) dst.Init(src.GetWidth(), src.GetHeight(),
00135                                 src.GetChannelCount());
00136     if (this->CalculationInFloat()){
00137       switch (*_FilterBorderHandling){
00138       case TBH_valid:
00139         res = Filter3x3ValidGreyFloat(src, dst);
00140         break;
00141       case TBH_same:
00142         res = Filter3x3SameGreyFloat(src, dst);
00143         break;
00144       default:
00145         BIASERR("unfinished");
00146         res = -1;
00147         break;
00148       }
00149     } else {
00150       *_HalfWinSize=1;
00151       res = Filter(src, dst);
00152     }
00153   } else {
00154     *_HalfWinSize=1;
00155     res = Filter(src, dst);
00156   }
00157   return res;
00158 }
00159
00160 template <class InputStorageType, class OutputStorageType>
00161 int Binomial<InputStorageType, OutputStorageType>::
00162 Filter5x5(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00163 {
00164   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter5x5\n");
00165   int res=0;
00166   if (src.GetChannelCount()==1){
00167     if (!src.SamePixelAndChannelCount(dst))
00168       if (!dst.IsEmpty()) dst.Release();
00169     if (dst.IsEmpty()) dst.Init(src.GetWidth(), src.GetHeight(),
00170                                 src.GetChannelCount());
00171     if (this->CalculationInFloat()){
00172       switch (*_FilterBorderHandling){
00173       case TBH_valid:
00174         res = Filter5x5ValidGreyFloat(src, dst);
00175         break;
00176       default:
00177         BIASERR("Binomial::Filter5x5: border handling unfinished, "
00178                 <<"using valid");
00179         res = Filter5x5ValidGreyFloat(src, dst);
00180         break;
00181       }
00182     } else {
00183       BIASASSERT("unfinished");
00184       *_HalfWinSize=2;
00185       res = Convolution<InputStorageType, OutputStorageType>::Filter(src,dst);
00186     }
00187   } else {
00188     *_HalfWinSize=2;
00189     res = Convolution<InputStorageType, OutputStorageType>::Filter(src, dst);
00190   }
00191   return res;
00192 }
00193
00194 template <class InputStorageType, class OutputStorageType>
00195 int Binomial<InputStorageType, OutputStorageType>::
00196 Filter3x3ValidGreyFloat(const Image<InputStorageType>& src,
00197                         Image<OutputStorageType>& dst)
00198 {
00199   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter3x3ValidGreyFloat\n");
00200 #ifdef BIAS_DEBUG
00201   BIASASSERT(src.GetChannelCount() == 1);
00202   BIASASSERT(dst.SamePixelAndChannelCount(src));
00203 #endif
00204   //  AddDebugLevel(D_BINOMIAL_WRITE_IM);
00205   const unsigned width=src.GetWidth();
00206   int nwidth = - int(width);
00207   const unsigned height=src.GetHeight();
00208
00209   unsigned minx, miny, maxx, maxy;
00210   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00211   dst.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00212
00213   if (width>_tmpFloat.GetWidth() ||
00214       height>_tmpFloat.GetHeight()){
00215     if (!_tmpFloat.IsEmpty()) _tmpFloat.Release();
00216     _tmpFloat.Init(width, height, src.GetChannelCount());
00217   }
00218
00219   InputStorageType *im=src.GetImageData();
00220   InputStorageType *p, *end, *lend;
00221   OutputStorageType *pg, *oend, *olend;
00222   CONV_FLOAT *ph, tmp;
00223   int offset, step;
00224
00225   // separated binomial 3x3 mask = 1 2 1
00226   offset=(int)minx+(int)miny*(int)width+1;
00227   p=im+offset;
00228   ph=_tmpFloat.GetImageData()+offset;
00229   step=width-(int)maxx+(int)minx+2;
00230   end=im+(int)maxx+((int)maxy-1)*(int)width-1;
00231   lend=im+(int)maxx+((int)miny*(int)width)-1;
00232   // vertical part
00233   while (p<end){
00234     while (p<lend){
00235       *ph++ = (CONV_FLOAT)(p[-1]) +(CONV_FLOAT)(*p) * 2.0f + (CONV_FLOAT)(p[1]);
00236       p++;
00237     }
00238     ph+=step;
00239     p+=step;
00240     lend+=width;
00241   }
00242
00243 #ifdef BIAS_DEBUG
00244   if (this->DebugLevelIsSet(D_BINOMIAL_WRITE_IM)){
00245     Image<InputStorageType> im=src;
00246     ImageIO::Write("binomial3x3-input.mip", im);
00247     ImageIO::Write("binomial3x3-horiz.mip", _tmpFloat);
00248   }
00249 #endif
00250
00251   offset=(int)minx+((int)miny+1)*(int)width+1;
00252   ph=_tmpFloat.GetImageData()+offset;
00253   OutputStorageType *s=dst.GetImageData();
00254   pg=s+offset;
00255   oend=s+(int)maxx+((int)maxy-2)*(int)width-1;
00256   olend=s+(int)maxx+((int)miny+1)*(int)width-1;
00257   CONV_FLOAT div = 1.0 / 16.0;
00258   // horizontal part
00259   while (pg<oend){
00260     while (pg<olend){
00261       tmp = ph[nwidth] + *ph * 2.0f + ph[width];
00262       *pg++ = (OutputStorageType)(tmp * div);
00263       ph++;
00264     }
00265     pg+=step;
00266     ph+=step;
00267     olend+=width;
00268   }
00269 #ifdef BIAS_DEBUG
00270   if (this->DebugLevelIsSet(D_BINOMIAL_WRITE_IM)){
00271     ImageIO::Write("binomial3x3-result.mip", dst);
00272   }
00273 #endif
00274
00275   return 0;
00276 }
00277
00278 template <class InputStorageType, class OutputStorageType>
00279 int Binomial<InputStorageType, OutputStorageType>::
00280 Filter3x3SameGreyFloat(const Image<InputStorageType>& src,
00281                        Image<OutputStorageType>& dst)
00282 {
00283   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter3x3SameGreyFloat\n");
00284   int res =0;
00285
00286   res = Filter3x3ValidGreyFloat(src, dst);
00287
00288   // filter mask is
00289   // | 1 2 1 |
00290   // | 2 4 2 |
00291   // | 1 2 1 |
00292   int minx, miny, maxx, maxy;
00293   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00294   register int x, y, xp, xm, yp, ym;
00295
00296   InputStorageType **srcida=src.GetImageDataArray();
00297   OutputStorageType **dstida=dst.GetImageDataArray();
00298
00299   // upper left pixel
00300   x = minx;
00301   y = miny;
00302   xp = x+1;
00303   yp = y+1;
00304   dstida[y][x] =
00305     OutputStorageType((4.0*float(srcida[y][x])+
00306                        2.0*(float(srcida[y][xp])+float(srcida[yp][x]))+
00307                        float(srcida[yp][xp]))/9.0);
00308
00309   // upper right pixel
00310   x = maxx-1;
00311   //y = miny;
00312   xm = x-1;
00313   //yp = y+1;
00314   dstida[y][x] =
00315     OutputStorageType((4.0*float(srcida[y][x])+
00316                        2.0*(float(srcida[y][xm])+float(srcida[yp][x]))+
00317                        float(srcida[yp][xm]))/9.0);
00318
00319   // lower right pixel
00320   //x = maxx-1;
00321   y = maxy-1;
00322   //xm = x-1;
00323   ym = y-1;
00324   dstida[y][x] =
00325     OutputStorageType((4.0*float(srcida[y][x])+
00326                        2.0*(float(srcida[y][xm])+float(srcida[ym][x]))+
00327                        float(srcida[ym][xm]))/9.0);
00328
00329   // lower left pixel
00330   x = minx;
00331   //y = maxy-1;
00332   xp = x+1;
00333   //ym = y-1;
00334   dstida[y][x] =
00335     OutputStorageType((4.0*float(srcida[y][x])+
00336                        2.0*(float(srcida[y][xp])+float(srcida[ym][x]))+
00337                        float(srcida[ym][xp]))/9.0);
00338
00339
00340
00341   // upper row
00342   y = miny;
00343   yp = y+1;
00344   for (x=minx+1; x<maxx-1; x++){
00345     xp = x+1;
00346     xm = x-1;
00347     dstida[y][x] =
00348       OutputStorageType((4.0*float(srcida[y][x])+
00349                          2.0*(float(srcida[y][xm])+float(srcida[y][xp])+
00350                               float(srcida[yp][x]))+
00351                          float(srcida[yp][xp])+float(srcida[yp][xm]))/12.0);
00352   }
00353   // lower row
00354   y = maxy-1;
00355   ym = y-1;
00356   for (x=minx+1; x<maxx-1; x++){
00357     xp = x+1;
00358     xm = x-1;
00359     dstida[y][x] =
00360       OutputStorageType((4.0*float(srcida[y][x])+
00361                          2.0*(float(srcida[y][xm])+float(srcida[y][xp])+
00362                               float(srcida[ym][x]))+
00363                          float(srcida[ym][xp])+float(srcida[ym][xm]))/12.0);
00364   }
00365   // left column
00366   x = minx;
00367   xp = x+1;
00368   for (y=miny+1; y<maxy-1; y++){
00369     yp = y+1;
00370     ym = y-1;
00371     dstida[y][x] =
00372       OutputStorageType((4.0*float(srcida[y][x])+
00373                          2.0*(float(srcida[ym][x])+float(srcida[yp][x])+
00374                               float(srcida[y][xp]))+
00375                          float(srcida[ym][xp])+float(srcida[yp][xp]))/12.0);
00376   }
00377
00378   // right column
00379   x = maxx-1;
00380   xm = x-1;
00381   for (y=miny+1; y<maxy-1; y++){
00382     yp = y+1;
00383     ym = y-1;
00384     dstida[y][x] =
00385       OutputStorageType((4.0*float(srcida[y][x])+
00386                          2.0*(float(srcida[ym][x])+float(srcida[yp][x])+
00387                               float(srcida[y][xm]))+
00388                          float(srcida[ym][xm])+float(srcida[yp][xm]))/12.0);
00389   }
00390
00391   dst.GetROI()->SetCorners(minx, miny, maxx, maxy);
00392
00393   return res;
00394 }
00395
00396 template <class InputStorageType, class OutputStorageType>
00397 int Binomial<InputStorageType, OutputStorageType>::
00398 Filter5x5ValidGreyFloat(const Image<InputStorageType>& src,
00399                         Image<OutputStorageType>& dst)
00400 {
00401   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Binomial::Filter5x5ValidGrey\n");
00402 #ifdef BIAS_DEBUG
00403   BIASASSERT(src.GetChannelCount() == 1);
00404   BIASASSERT(dst.SamePixelAndChannelCount(src));
00405 #endif
00406   //AddDebugLevel(D_BINOMIAL_WRITE_IM);
00407   const unsigned width=src.GetWidth();
00408   int nwidth = - int(width);
00409   const unsigned height=src.GetHeight();
00410
00411   unsigned minx, miny, maxx, maxy;
00412   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00413   dst.GetROI()->SetCorners(minx+2, miny+2, maxx-2, maxy-2);
00414
00415   // init internal memory if necessairy
00416   if (width>_tmpFloat.GetWidth() ||
00417       height>_tmpFloat.GetHeight()){
00418     if (!_tmpFloat.IsEmpty()) _tmpFloat.Release();
00419     _tmpFloat.Init(width, height, src.GetChannelCount());
00420   }
00421
00422   InputStorageType *im=src.GetImageData();
00423   InputStorageType *p, *end, *lend;
00424   OutputStorageType *pg, *oend, *olend;
00425   CONV_FLOAT *ph, tmp;
00426   int offset, step;
00427   // separated binomial 5x5 mask = 1 4 6 4 1
00428   offset=(int)minx+(int)miny*(int)width+2;
00429   p=im+offset;
00430   ph=_tmpFloat.GetImageData()+offset;
00431   step=width-(int)maxx+(int)minx+4;
00432   end=im+(int)maxx+((int)maxy-1)*(int)width-2;
00433   lend=im+(int)maxx+((int)miny*(int)width)-2;
00434   // vertical part
00435   while (p<end){
00436     while (p<lend){
00437       *ph++ = (CONV_FLOAT)(p[-2]) + (CONV_FLOAT)(p[-1])*4.0f + (CONV_FLOAT)(*p)
00438         * 6.0f + (CONV_FLOAT)(p[+1])*4.0f + (CONV_FLOAT)(p[2]);
00439       p++;
00440     }
00441     ph+=step;
00442     p+=step;
00443     lend+=width;
00444   }
00445
00446 #ifdef BIAS_DEBUG
00447   if (this->DebugLevelIsSet(D_BINOMIAL_WRITE_IM)){
00448     Image<InputStorageType> im=src;
00449     ImageIO::Write("binomial5x5-input.mip", im);
00450     ImageIO::Write("binomial5x5-horiz.mip", _tmpFloat);
00451   }
00452 #endif
00453
00454   offset=(int)minx+((int)miny+2)*(int)width+2;
00455   ph=_tmpFloat.GetImageData()+offset;
00456   OutputStorageType *s=dst.GetImageData();
00457   pg=s+offset;
00458   oend=s+(int)maxx+((int)maxy-3)*(int)width-2;
00459   olend=s+(int)maxx+((int)miny+2)*(int)width-2;
00460   int dw=width<<1;
00461   CONV_FLOAT div = 1.0 / 256.0;
00462   // horizontal part
00463   while (pg<oend){
00464     while (pg<olend){
00465       tmp = ph[-dw] + ph[dw] + ph[nwidth]*4.0f + ph[width]*4.0f + (*ph)*6.0f;
00466       *pg++ = (OutputStorageType)(tmp * div);
00467       ph++;
00468     }
00469     pg+=step;
00470     ph+=step;
00471     olend+=width;
00472   }
00473
00474 #ifdef BIAS_DEBUG
00475   if (this->DebugLevelIsSet(D_BINOMIAL_WRITE_IM)){
00476     ImageIO::Write("binomial5x5-result.mip", dst);
00477   }
00478 #endif
00479
00480   return 0;
00481 }
00482
00483 ////////////////////////////////////////////////////////////////////////////
00484
00485 template <class StorageType, class KernelType>
00486 void Binomial<StorageType, KernelType>::
00487 _CalculateKernel(int HalfWinSize)
00488 {
00489   Vector<FM_INT> vec;
00490   int shift;
00491   const int size=(HalfWinSize<<1)+1;
00492   vec.newsize(size);
00493   vec[0]=vec[size-1]=1;
00494
00495   int numerator=size-1, denominator=1;
00496   for (int i=1; i<=HalfWinSize; i++){
00497     vec[i]=vec[size-i-1]=(numerator/denominator);
00498     BIASCDOUT(D_BINOMIAL_KERNEL, "num "<<numerator<<" denom "<<denominator
00499               <<"  =  "<<vec[i]<<endl);
00500     denominator*=(i+1);
00501     numerator*=(size-i-1);
00502   }
00503   shift=(HalfWinSize<<1);
00504
00505   BIASCDOUT(D_BINOMIAL_KERNEL, "size "<<size<<" : "<< vec << "  shift "
00506             <<shift<<endl<< "-------------\n");
00507
00508   _fm.Init(vec, vec, 0, shift*shift, true);
00509   Vector<FM_FLOAT> fvec;
00510   fvec.newsize(size);
00511   FM_FLOAT div=(FM_FLOAT)(1<<shift);
00512   for (int i=0; i<size; i++)
00513     fvec[i]=(FM_FLOAT)(vec[i]/div);
00514   _fm.Init(fvec, fvec, false);
00515
00516   _LastHalfWinSize = HalfWinSize;
00517 }
00518
00519 template <class StorageType, class KernelType>
00520 void Binomial<StorageType, KernelType>::
00521 _AddParam(Param& para, const int grp, const std::string& postfix)
00522 {
00523
00524   if (para.CheckParam("HalfWinSize"+postfix)){
00525     _HalfWinSize=para.GetParamInt("HalfWinSize"+postfix);
00526   } else {
00527     _HalfWinSize=para.AddParamInt("HalfWinSize"+postfix,
00528                                   "half size of convolution kernel",
00529                                   2, 0, INT_MAX, 0, grp);
00530   }
00531
00532 }
00533
00534 template <class StorageType, class KernelType>
00535 void Binomial<StorageType, KernelType>::
00536 GetBordersValid_(int &border_x, int &border_y) const
00537 {
00538   border_x = border_y = *_HalfWinSize;
00539 }
00540
00541 //////////////////////////////////////////////////////////////////////////
00542 //                 instantiation
00543 //////////////////////////////////////////////////////////////////////////
00544
00545 #define FILTER_INSTANTIATION_CLASS Binomial
00546 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Binomial.hh Source File

Filter

Binomial.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __Binomial_hh__
00026 #define __Binomial_hh__
00027
00028 #include "Convolution.hh"
00029
00030 #define D_BINOMIAL_KERNEL   0x00010000
00031 #define D_BINOMIAL_WRITE_IM 0x00020000
00032
00033 namespace BIAS {
00034
00035   template <class InputStorageType, class OutputStorageType>
00036   class BIASFilter_EXPORT Binomial
00037    : public Convolution<InputStorageType, OutputStorageType>
00038   {
00039     /** @class Binomial
00040         @ingroup g_filter
00041         @brief binomial low pass filter class
00042         @author woelk 12/2004 */
00043   public:
00044     Binomial();
00045
00046     Binomial(Param& para, const std::string& postfix="");
00047
00048     Binomial(Param& para, const int grp, const std::string& postfix);
00049
00050     ~Binomial();
00051
00052     /** @brief sets kernel if params changed and calls convolution */
00053     virtual int Filter(const Image<InputStorageType>& src,
00054                        Image<OutputStorageType>& dst);
00055
00056     /** @brief no implementation, calls Filter */
00057     virtual int FilterFloat(const Image<InputStorageType>& src,
00058                             Image<OutputStorageType>& dst);
00059
00060     /** @brief no implementation, calls Filter */
00061     virtual int FilterInt(const Image<InputStorageType>& src,
00062                           Image<OutputStorageType>& dst);
00063
00064     /** @author woelk 12/2004 */
00065     int Filter3x3(const Image<InputStorageType>& src,
00066                           Image<OutputStorageType>& dst);
00067
00068     /** @author woelk 12/2004 */
00069     int Filter5x5(const Image<InputStorageType>& src,
00070                   Image<OutputStorageType>& dst);
00071
00072     /** @brief specialized function for convolution with 3x3 binomial filter.
00073         dst must be initialized with the right image size. Internal calculation
00074         is done using floating point numbers.
00075         @author woelk 12/2004 */
00076     int Filter3x3ValidGreyFloat(const Image<InputStorageType>& src,
00077                                 Image<OutputStorageType>& dst);
00078
00079     /** @brief specialized function for convolution with 5x5 binomial filter.
00080         dst must be initialized with the right image size. Internal calculation
00081         is done using floating point numbers.
00082         @author woelk 12/2004 */
00083     int Filter5x5ValidGreyFloat(const Image<InputStorageType>& src,
00084                                 Image<OutputStorageType>& dst);
00085
00086     /** @brief specialized function for convolution with 3x3 binomial filter.
00087         dst must be initialized with the right image size. Internal calculation
00088         is done using floating point numbers.
00089         Uses "zero padding" of the image to achieve destination image ROIs
00090         of same size as source image ROIs. Untested !!
00091         @author woelk 07/2005 */
00092     int Filter3x3SameGreyFloat(const Image<InputStorageType>& src,
00093                                Image<OutputStorageType>& dst);
00094
00095
00096     //////////////////////////////////////////////////////////////////////
00097
00098     inline int GetHalfWinSize() const
00099     { return *_HalfWinSize; }
00100
00101     inline void SetHalfWinSize(int hws)
00102     { *_HalfWinSize = hws; }
00103
00104   protected:
00105     /// the parameter
00106     int *_HalfWinSize;
00107     int _LastHalfWinSize;
00108
00109     /// calculates the kernel
00110     void _CalculateKernel(int HalfWinSize);
00111
00112     void _AddParam(Param& para, const int grp, const std::string& postfix);
00113
00114     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00115
00116     using Convolution<InputStorageType, OutputStorageType>::_FilterBorderHandling;
00117     using Convolution<InputStorageType, OutputStorageType>::TBH_valid;
00118     using Convolution<InputStorageType, OutputStorageType>::TBH_same;
00119     using Convolution<InputStorageType, OutputStorageType>::TBH_full;
00120     using Convolution<InputStorageType, OutputStorageType>::_tmpFloat;
00121     using Convolution<InputStorageType, OutputStorageType>::_fm;
00122
00123
00124   }; // class
00125
00126 } // namespace
00127
00128
00129 #endif // __Binomial_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Bresenham.hh Source File

Base » Image

Bresenham.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Bresenham_hh__
00027 #define __Bresenham_hh__
00028
00029 #include <bias_config.h>
00030
00031
00032 #include <Base/Image/EightWaySymmetry.hh>
00033 #include <Base/Common/W32Compat.hh>
00034
00035 namespace BIAS{
00036   /** @brief scans a line using Bresenhams integer arithmetic algorithm
00037       - either Init or the according constructor have to be called befor
00038       GetNext
00039       exists in Base/Image and Base/Geometry
00040       @author fw */
00041   class BIASImageBase_EXPORT Bresenham {
00042   public:
00043     inline Bresenham();
00044
00045     inline Bresenham(const int start[2], const int end[2]);
00046
00047     inline Bresenham(const unsigned int start[2], const unsigned int end[2]);
00048
00049     inline Bresenham(const double start[2], const double end[2]);
00050
00051     inline ~Bresenham();
00052
00053     inline void Init(const int start[2], const int end[2]);
00054
00055     inline void Init(const unsigned int start[2], const unsigned int end[2])
00056     { Init((int *)start, (int *)end); };
00057
00058     inline void Init(const double start[2], const double end[2]);
00059
00060     inline bool GetNext(int next[2]);
00061
00062     inline bool GetNext(unsigned int next[2])
00063     { return GetNext((int *)next); };
00064
00065     inline bool GetNext(double next[2]);
00066
00067   protected:
00068     EightWaySymmetry<int> _iSym;
00069
00070     enum TLineType _eLineType;
00071
00072     int _iStart[2];
00073     int _iEnd[2];
00074     int _iTransformedCurrent[2];
00075     int _iTransformedStart[2];
00076     int _iTransformedEnd[2];
00077     int _iDx;
00078     int _iDy;
00079     double _dDx;
00080     double _dDy;
00081     long int _iEps;
00082 #ifdef BIAS_DEBUG
00083     bool _bInitialized;
00084 #endif
00085   };
00086
00087
00088
00089
00090   Bresenham::Bresenham()
00091   {
00092 #ifdef BIAS_DEBUG
00093     _bInitialized=false;
00094 #endif
00095   }
00096
00097   Bresenham::~Bresenham()
00098   {}
00099
00100   Bresenham::Bresenham(const int start[2], const int end[2])
00101   {
00102     Init(start, end);
00103 #ifdef BIAS_DEBUG
00104     _bInitialized=true;
00105 #endif
00106   }
00107
00108   Bresenham::Bresenham(const unsigned int start[2], const unsigned int end[2])
00109   {
00110     Init(start, end);
00111 #ifdef BIAS_DEBUG
00112     _bInitialized=true;
00113 #endif
00114   }
00115
00116   Bresenham::Bresenham(const double start[2], const double end[2])
00117   {
00118     Init(start, end);
00119 #ifdef BIAS_DEBUG
00120     _bInitialized=true;
00121 #endif
00122   }
00123
00124   void Bresenham::Init(const int start[2], const int end[2])
00125   {
00126     _iStart[0]=start[0];
00127     _iStart[1]=start[1];
00128     _iEnd[0]=end[0];
00129     _iEnd[1]=end[1];
00130     _eLineType=_iSym.DetermineLineType(start[0], start[1], end[0], end[1]);
00131     _iSym.Transform(_eLineType, _iStart, _iTransformedStart);
00132     _iSym.Transform(_eLineType, _iEnd, _iTransformedEnd);
00133     _iSym.Transform(_eLineType, _iStart, _iTransformedCurrent);
00134     _iDx = _iTransformedEnd[0] - _iTransformedStart[0];
00135     _iDy = _iTransformedEnd[1] - _iTransformedStart[1];
00136     // let GetNext return the starting point first
00137     _iEps = -_iDy;
00138     _iTransformedCurrent[0]--;
00139     _dDx = _dDy = 0.0;
00140 #ifdef BIAS_DEBUG
00141     _bInitialized=true;
00142 #endif
00143   }
00144
00145   void Bresenham::Init(const double start[2], const double end[2])
00146   {
00147     double transfstart[2];
00148     EightWaySymmetry<double> dSym;
00149
00150     _iStart[0]=(int)rint(start[0]);
00151     _iStart[1]=(int)rint(start[1]);
00152     _iEnd[0]=(int)rint(end[0]);
00153     _iEnd[1]=(int)rint(end[1]);
00154
00155     _eLineType=_iSym.DetermineLineType(_iStart[0], _iStart[1], _iEnd[0],
00156                                        _iEnd[1]);
00157     std::cerr <<"start: ("<<start[0]<<", "<<start[1]<<")  end :("
00158               <<end[0]<<", "<<end[1]<<")  line type: "<<_eLineType<<std::endl;
00159     _iSym.Transform(_eLineType, _iStart, _iTransformedStart);
00160     _iSym.Transform(_eLineType, _iEnd, _iTransformedEnd);
00161     _iSym.Transform(_eLineType, _iStart, _iTransformedCurrent);
00162     _iDx = _iTransformedEnd[0] - _iTransformedStart[0];
00163     _iDy = _iTransformedEnd[1] - _iTransformedStart[1];
00164     dSym.Transform(_eLineType, start, transfstart);
00165
00166     _dDx=(double)_iTransformedStart[0]-transfstart[0];
00167     _dDy=(double)_iTransformedStart[1]-transfstart[1];
00168     _iEps = (int)rint(((double)(_iDy)*_dDx)+((double)(_iDy)*_dDy));
00169     // let GetNext return the starting point first
00170     _iEps -= _iDy;
00171     _iTransformedCurrent[0]--;
00172     std::cerr <<"_iStart: (" <<_iStart[0]<<", "<<_iStart[1]
00173               <<")  transfstart: ("<<transfstart[0]<<", "<<transfstart[1]
00174               <<")  _iDx: "<<_iDx<<"  _iDy: "<<_iDy
00175               <<"  _dDx: "<<_dDx<<"  _dDy: "<<_dDy<<"   _iEps: "<<_iEps<<std::endl;
00176
00177 #ifdef BIAS_DEBUG
00178     _bInitialized=true;
00179 #endif
00180   }
00181
00182   bool Bresenham::GetNext(int next[2])
00183   {
00184 #ifdef BIAS_DEBUG
00185     if (!_bInitialized)
00186       BIASERR("call Init befor GetNext");
00187 #endif
00188     bool result=true;
00189     _iTransformedCurrent[0]++;
00190     _iEps += _iDy;
00191     if ((_iEps << 1) >= _iDx){
00192       _iTransformedCurrent[1]++;
00193       _iEps -= _iDx;
00194     }
00195     if (_iTransformedCurrent[0]>_iTransformedEnd[0] ||
00196         _iTransformedCurrent[1]>_iTransformedEnd[1]){
00197 #ifdef BIAS_DEBUG
00198       _bInitialized=false;
00199 #endif
00200       result=false;
00201     } else {
00202       _iSym.InverseTransform(_eLineType, _iTransformedCurrent, next);
00203       result=true;
00204     }
00205     return result;
00206   }
00207
00208   bool Bresenham::GetNext(double next[2])
00209   {
00210     bool result;
00211     int inext[2];
00212     result = GetNext(inext);
00213     next[0]=(double)inext[0] + _dDx;
00214     next[1]=(double)inext[1] + _dDy;
00215
00216     return result;
00217   }
00218
00219 } // namespace
00220
00221
00222 #endif // __Bresenham_hh__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/BresenhamCircle.hh Source File

Base » Image

BresenhamCircle.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BresenhamCircle_hh__
00027 #define __BresenhamCircle_hh__
00028 #include "bias_config.h"
00029
00030 namespace BIAS{
00031   /** @brief scans a circle using Bresenhams integer arithmetic algorithm
00032       - either Init or the according constructor have to be called befor
00033       GetNext
00034       - points on circle are not given in continous manner, i.e. subsequent
00035       calls to GetNext() return (x,y), (y,x), (x,-y), (y,-x),
00036       (-x,-y), (-y,-x), (-x,y), (-y,x)
00037       - fast
00038       @author fw */
00039   class BIASImageBase_EXPORT BresenhamCircle {
00040   public:
00041     inline BresenhamCircle();
00042
00043     inline BresenhamCircle(int center[2], int radius);
00044
00045     inline ~BresenhamCircle();
00046
00047     inline void Init(int center[2], int radius);
00048
00049     inline bool GetNext(int next[2]);
00050   protected:
00051     int _iCenter[2]; // center coo
00052     int _iRadius;
00053     int _iCurrent[2];
00054     int _iD;
00055     int _iDeltaE;
00056     int _iDeltaSE;
00057     int _iCount;
00058
00059 #ifdef BIAS_DEBUG
00060     bool _bInitialized;
00061 #endif
00062   };
00063
00064   /** just like bresenham circle but only return 1/8th of the circle
00065       @author woelk */
00066   class BIASImageBase_EXPORT BresenhamCircleEighth{
00067   public:
00068     inline BresenhamCircleEighth();
00069
00070     inline BresenhamCircleEighth(int center[2], int radius);
00071
00072     inline ~BresenhamCircleEighth();
00073
00074     inline void Init(int center[2], int radius);
00075
00076     inline bool GetNext(int next[2]);
00077   protected:
00078     int _iCenter[2]; // center coo
00079     int _iRadius;
00080     int _iCurrent[2];
00081     int _iD;
00082     int _iDeltaE;
00083     int _iDeltaSE;
00084
00085 #ifdef BIAS_DEBUG
00086     bool _bInitialized;
00087 #endif
00088   };
00089
00090   /** makes 8 subsequent calls BresenhamCircleEighth
00091       slow does not work so far
00092       @author woelk */
00093   class BIASImageBase_EXPORT BresenhamCircleSlow{
00094   public:
00095     inline BresenhamCircleSlow();
00096
00097     inline BresenhamCircleSlow(int center[2], int radius);
00098
00099     inline ~BresenhamCircleSlow();
00100
00101     inline void Init(int center[2], int radius);
00102
00103     inline bool GetNext(int next[2]);
00104   protected:
00105     int _iZeroCenter[2];
00106     int _iCenter[2]; // center coo
00107     int _iRadius;
00108     int _iCount;
00109     int _iNext[2];
00110     BresenhamCircleEighth _BresCirc;
00111 #ifdef BIAS_DEBUG
00112     bool _bInitialized;
00113 #endif
00114   };
00115
00116   BresenhamCircle::BresenhamCircle()
00117   {}
00118
00119   BresenhamCircle::BresenhamCircle(int center[2], int radius)
00120   { Init(center, radius); }
00121
00122   BresenhamCircle::~BresenhamCircle()
00123   {}
00124
00125   void BresenhamCircle::Init(int center[2], int radius)
00126   {
00127     _iCenter[0]=center[0];
00128     _iCenter[1]=center[1];
00129     _iRadius=radius;
00130     _iCurrent[0]=0;
00131     _iCurrent[1]=_iRadius;
00132     _iD=1-_iRadius;
00133     _iDeltaE=3;
00134     _iDeltaSE=-2*_iRadius+5;
00135     // let GetNext return the starting point first
00136     _iCurrent[0]--;
00137     if (_iD>=0) _iCurrent[1]++;
00138     _iCount=0;
00139 #ifdef BIAS_DEBUG
00140     _bInitialized=true;
00141 #endif
00142   }
00143
00144   bool BresenhamCircle::GetNext(int next[2])
00145   {
00146 #ifdef BIAS_DEBUG
00147     if (!_bInitialized)
00148       BIASERR("call Init befor GetNext");
00149 #endif
00150     bool result=true;
00151     if (_iCount==0){
00152       if (_iCurrent[1]>_iCurrent[0]){
00153         if (_iD<0){
00154           _iD+=_iDeltaE;
00155           _iDeltaE+=2;
00156           _iDeltaSE+=2;
00157         } else {
00158           _iD+=_iDeltaSE;
00159           _iDeltaE+=2;
00160           _iDeltaSE+=4;
00161           _iCurrent[1]--;
00162         }
00163         _iCurrent[0]++;
00164         next[0]=_iCurrent[0]+_iCenter[0];
00165         next[1]=_iCurrent[1]+_iCenter[1];
00166         _iCount=1;
00167       }
00168     } else {
00169       next[0]=_iCenter[0];
00170       next[1]=_iCenter[1];
00171       switch (_iCount){
00172       case 1:
00173         next[0]+=_iCurrent[1];
00174         next[1]+=_iCurrent[0]; break;
00175       case 2:
00176         next[0]+=_iCurrent[0];
00177         next[1]-=_iCurrent[1]; break;
00178       case 3:
00179         next[0]+=_iCurrent[1];
00180         next[1]-=_iCurrent[0]; break;
00181       case 4:
00182         next[0]-=_iCurrent[0];
00183         next[1]-=_iCurrent[1]; break;
00184       case 5:
00185         next[0]-=_iCurrent[1];
00186         next[1]-=_iCurrent[0]; break;
00187       case 6:
00188         next[0]-=_iCurrent[0];
00189         next[1]+=_iCurrent[1]; break;
00190       case 7:
00191         next[0]-=_iCurrent[1];
00192         next[1]+=_iCurrent[0]; break;
00193       }
00194       _iCount++;
00195       if (_iCount==8) _iCount=0;
00196       if (_iCount==0 && _iCurrent[1]<=_iCurrent[0]){
00197 #ifdef BIAS_DEBUG
00198         _bInitialized=false;
00199 #endif
00200         result = false;
00201       }
00202     }
00203     return result;
00204   }
00205
00206   BresenhamCircleEighth::BresenhamCircleEighth()
00207   {}
00208
00209   BresenhamCircleEighth::BresenhamCircleEighth(int center[2], int radius)
00210   { Init(center, radius); }
00211
00212   BresenhamCircleEighth::~BresenhamCircleEighth()
00213   {}
00214
00215   void BresenhamCircleEighth::Init(int center[2], int radius)
00216   {
00217     _iCenter[0]=center[0];
00218     _iCenter[1]=center[1];
00219     _iRadius=radius;
00220     _iCurrent[0]=0;
00221     _iCurrent[1]=_iRadius;
00222     _iD=1-_iRadius;
00223     _iDeltaE=3;
00224     _iDeltaSE=-2*_iRadius+5;
00225     // let GetNext return the starting point first
00226     _iCurrent[0]--;
00227     if (_iD>=0) _iCurrent[1]++;
00228 #ifdef BIAS_DEBUG
00229     _bInitialized=true;
00230 #endif
00231   }
00232
00233   bool BresenhamCircleEighth::GetNext(int next[2])
00234   {
00235 #ifdef BIAS_DEBUG
00236     if (!_bInitialized)
00237       BIASERR("call Init befor GetNext");
00238 #endif
00239     bool result=true;
00240     if (_iCurrent[1]>_iCurrent[0]){
00241       if (_iD<0){
00242         _iD+=_iDeltaE;
00243         _iDeltaE+=2;
00244         _iDeltaSE+=2;
00245       } else {
00246         _iD+=_iDeltaSE;
00247         _iDeltaE+=2;
00248         _iDeltaSE+=4;
00249         _iCurrent[1]--;
00250       }
00251       _iCurrent[0]++;
00252       next[0]=_iCurrent[0]+_iCenter[0];
00253       next[1]=_iCurrent[1]+_iCenter[1];
00254     }  else {
00255 #ifdef BIAS_DEBUG
00256       _bInitialized=false;
00257 #endif
00258       result = false;
00259     }
00260     return result;
00261   }
00262
00263   BresenhamCircleSlow::BresenhamCircleSlow()
00264   {}
00265
00266   BresenhamCircleSlow::BresenhamCircleSlow(int center[2], int radius)
00267   { Init(center, radius); }
00268
00269   BresenhamCircleSlow::~BresenhamCircleSlow()
00270   {}
00271
00272   void BresenhamCircleSlow::Init(int center[2], int radius)
00273   {
00274     _iZeroCenter[0]=_iZeroCenter[1]=0;
00275     _iCenter[0]=center[0];
00276     _iCenter[1]=center[1];
00277     _iRadius=radius;
00278     _iCount=0;
00279     _BresCirc.Init(_iZeroCenter, _iRadius);
00280 #ifdef BIAS_DEBUG
00281     _bInitialized=true;
00282 #endif
00283  }
00284
00285   bool BresenhamCircleSlow::GetNext(int next[2])
00286   {
00287 #ifdef BIAS_DEBUG
00288     if (!_bInitialized)
00289       BIASERR("call Init befor GetNext");
00290 #endif
00291     bool res=true;
00292     switch (_iCount){
00293     case 0:
00294       if (_BresCirc.GetNext(_iNext)){
00295         next[0]=_iCenter[0]+_iNext[0];
00296         next[1]=_iCenter[1]+_iNext[1];
00297       } else {
00298         _BresCirc.Init(_iZeroCenter, _iRadius);
00299         _iCount++;
00300       }
00301       break;
00302     case 1:
00303       if (_BresCirc.GetNext(_iNext)){
00304         next[0]=_iCenter[0]+_iNext[1];
00305         next[1]=_iCenter[1]+_iNext[0];
00306       } else {
00307         _BresCirc.Init(_iZeroCenter, _iRadius);
00308         _iCount++;
00309       }
00310       break;
00311     case 2:
00312       if (_BresCirc.GetNext(_iNext)){
00313         next[0]=_iCenter[0]+_iNext[1];
00314         next[1]=_iCenter[1]-_iNext[0];
00315       } else {
00316         _BresCirc.Init(_iZeroCenter, _iRadius);
00317         _iCount++;
00318       }
00319       break;
00320     case 3:
00321       if (_BresCirc.GetNext(_iNext)){
00322         next[0]=_iCenter[0]+_iNext[0];
00323         next[1]=_iCenter[1]-_iNext[1];
00324       } else {
00325         _BresCirc.Init(_iZeroCenter, _iRadius);
00326         _iCount++;
00327       }
00328       break;
00329     case 4:
00330       if (_BresCirc.GetNext(_iNext)){
00331         next[0]=_iCenter[0]-_iNext[0];
00332         next[1]=_iCenter[1]-_iNext[1];
00333       } else {
00334         _BresCirc.Init(_iZeroCenter, _iRadius);
00335         _iCount++;
00336       }
00337       break;
00338     case 5:
00339       if (_BresCirc.GetNext(_iNext)){
00340         next[0]=_iCenter[0]-_iNext[1];
00341         next[1]=_iCenter[1]-_iNext[0];
00342       } else {
00343         _BresCirc.Init(_iZeroCenter, _iRadius);
00344         _iCount++;
00345       }
00346       break;
00347     case 6:
00348       if (_BresCirc.GetNext(_iNext)){
00349         next[0]=_iCenter[0]-_iNext[1];
00350         next[1]=_iCenter[1]+_iNext[0];
00351       } else {
00352         _BresCirc.Init(_iZeroCenter, _iRadius);
00353         _iCount++;
00354       }
00355       break;
00356     case 7:
00357       if (_BresCirc.GetNext(_iNext)){
00358         next[0]=_iCenter[0]-_iNext[0];
00359         next[1]=_iCenter[1]+_iNext[1];
00360       } else {
00361         _BresCirc.Init(_iZeroCenter, _iRadius);
00362         _iCount++;
00363       }
00364       break;
00365     case 8:
00366 #ifdef BIAS_DEBUG
00367       _bInitialized=false;
00368 #endif
00369       res=false;
00370       break;
00371     }
00372
00373     return res;
00374   }
00375
00376
00377 } // namespace
00378
00379 #endif // __BresenhamCircle_hh__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/BSplineCurve.cpp Source File

MathAlgo

BSplineCurve.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004, 2005    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "BSplineCurve.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 BSplineCurve::BSplineCurve(){
00032 #ifdef BIAS_DEBUG
00033   initializedQuadratic_=false;
00034   initializedCubic_=false;
00035 #endif
00036 }
00037
00038 void BSplineCurve::InitQuadraticUniformBSpline(){
00039 #ifdef BIAS_DEBUG
00040   if(cPnts_.size()<3){
00041     if(cPnts_.size()==0){
00042       BIASERR("BSpline: no control points given - call ");
00043       BIASERR("SetControlPoints(cPnts)!\r\n");
00044       exit(-1);
00045     }
00046     else{
00047       BIASERR("BSpline: less then 3 control points given - call ");
00048       BIASERR("SetControlPoints(cPnts) with 3 or more control points!\r\n");
00049       exit(-1);
00050     }
00051   }
00052 #endif
00053   Matrix<double> coeffM(3,3);
00054   Vector<double> xItem(3);
00055   Vector<double> yItem(3);
00056   Vector<double> xTmp(3);
00057   Vector<double> yTmp(3);
00058
00059
00060   coeffM[0][0]=1;
00061   coeffM[0][1]=-2;
00062   coeffM[0][2]=1;
00063   coeffM[1][0]=-2;
00064   coeffM[1][1]=2;
00065   coeffM[1][2]=0;
00066   coeffM[2][0]=1;
00067   coeffM[2][1]=1;
00068   coeffM[2][2]=0;
00069
00070   xCoeff_.clear();
00071   yCoeff_.clear();
00072
00073   //compute coeff matrix for all segments
00074   for(unsigned int i=0; i<cPnts_.size()-2; i++){
00075     for(unsigned int j=0; j<3;j++){
00076       xTmp[j]=cPnts_[i+j][0];
00077       yTmp[j]=cPnts_[i+j][1];
00078     }
00079
00080     coeffM.Mult(xTmp, xItem);
00081     coeffM.Mult(yTmp, yItem);
00082     xCoeff_.push_back(xItem);
00083     yCoeff_.push_back(yItem);
00084   }
00085 #ifdef BIAS_DEBUG
00086   initializedQuadratic_=true;
00087   initializedCubic_=false;
00088 #endif
00089
00090 }
00091
00092 void BSplineCurve::InitCubicUniformBSpline(){
00093 #ifdef BIAS_DEBUG
00094   if(cPnts_.size()<4){
00095     if(cPnts_.size()==0){
00096       BIASERR("BSpline: no control points given - call ");
00097       BIASERR("SetControlPoints(cPnts)!\r\n");
00098       exit(-1);
00099     }
00100     else{
00101       BIASERR("BSpline: less then 4 control points given - call ")
00102       BIASERR("SetControlPoints(cPnts) with 4 or more control points!\r\n");
00103       exit(-1);
00104     }
00105   }
00106 #endif
00107   Matrix<double> coeffM(4,4);
00108   Vector<double> xItem(4);
00109   Vector<double> yItem(4);
00110   Vector<double> xTmp(4);
00111   Vector<double> yTmp(4);
00112
00113   coeffM[0][0]=-1;
00114   coeffM[0][1]=3;
00115   coeffM[0][2]=-3;
00116   coeffM[0][3]=1;
00117   coeffM[1][0]=3;
00118   coeffM[1][1]=-6;
00119   coeffM[1][2]=3;
00120   coeffM[1][3]=0;
00121   coeffM[2][0]=-3;
00122   coeffM[2][1]=0;
00123   coeffM[2][2]=3;
00124   coeffM[2][3]=0;
00125   coeffM[3][0]=1;
00126   coeffM[3][1]=4;
00127   coeffM[3][2]=1;
00128   coeffM[3][3]=0;
00129
00130   xCoeff_.clear();
00131   yCoeff_.clear();
00132
00133   //compute coeffmatrix for all segments
00134   for(unsigned int i=0; i<cPnts_.size()-3;i++){
00135     for(unsigned int j=0; j<4; j++){
00136       xTmp[j]=cPnts_[i+j][0];
00137       yTmp[j]=cPnts_[i+j][1];
00138     }
00139     coeffM.Mult(xTmp,xItem);
00140     coeffM.Mult(yTmp,yItem);
00141     xCoeff_.push_back(xItem);
00142     yCoeff_.push_back(yItem);
00143   }
00144 #ifdef BIAS_DEBUG
00145   initializedCubic_=true;
00146   initializedQuadratic_=false;
00147 #endif
00148 }
00149
00150
00151 void BSplineCurve::QuadraticUniformBSpline(Vector2<double> &res, double t){
00152 #ifdef BIAS_DEBUG
00153   if(!initializedQuadratic_){
00154     BIASERR("BSpline: call InitQuadraticUniformBSpline() at first!\r\n");
00155     exit(-1);
00156   }
00157 #endif
00158   unsigned int actSegment;
00159
00160   //compute spline segment and new t for the result segment
00161   if(t<=0.){
00162     actSegment=0;
00163     t=0.;
00164   } else if(t>=1.){
00165     actSegment=cPnts_.size()-3;
00166     t=1.;
00167   } else {
00168     actSegment= (unsigned int)(t * (double)(cPnts_.size()-2));
00169     t= t* (double)(cPnts_.size()-2) - (double) actSegment;
00170   }
00171
00172   Vector<double> tVec(3);
00173   tVec[0]=t*t;
00174   tVec[1]=t;
00175   tVec[2]=1;
00176
00177   res[0]=0.5 * tVec.ScalarProduct(xCoeff_[actSegment]);
00178   res[1]=0.5 * tVec.ScalarProduct(yCoeff_[actSegment]);
00179 }
00180
00181 void BSplineCurve::CubicUniformBSpline(Vector2<double>  &res, double t){
00182 #ifdef BIAS_DEBUG
00183   if(!initializedCubic_){
00184     BIASERR("BSpline: call InitCubicUniformBSpline() at first!\r\n");
00185       exit(-1);
00186   }
00187 #endif
00188   unsigned int actSegment;
00189
00190   //compute spline segment and new t for the result segment
00191   if(t<=0.){
00192     actSegment=0;
00193     t=0.;
00194   } else if(t>=1.){
00195     actSegment=cPnts_.size()-4;
00196     t=1.;
00197   } else {
00198     actSegment= (unsigned int) (t * (double)(cPnts_.size()-3));
00199     t= t * (double)(cPnts_.size()-3) - (double) actSegment;
00200   }
00201
00202   Vector<double> tVec(4);
00203   tVec[0]=t*t*t;
00204   tVec[1]=t*t;
00205   tVec[2]=t;
00206   tVec[3]=1;
00207
00208   res[0]=(1./6.) * tVec.ScalarProduct(xCoeff_[actSegment]);
00209   res[1]=(1./6.) * tVec.ScalarProduct(yCoeff_[actSegment]);
00210 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/BSplineCurve.hh Source File

MathAlgo

BSplineCurve.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004, 2005    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_BSPLINECURVE_
00027 #define _BIAS_BSPLINECURVE_
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <cmath>
00031 #include <vector>
00032 #include "Base/Debug/Debug.hh"
00033 #include "Base/Image/Image.hh"
00034 #include "Base/Image/ImageDraw.hh"
00035 #include "Base/Math/Matrix.hh"
00036 #include "Base/Math/Vector.hh"
00037 #include "Base/Math/Vector2.hh"
00038
00039
00040
00041 namespace BIAS {
00042     /** @class BSplineCurve
00043     @ingroup g_mathalgo
00044     @brief this class is intended for drawing  of quadratic and cubic
00045     regular B-Splines from given control points.
00046
00047     this class is intended for drawing of quadratic and cubic regular
00048     B-Splines from given control points. The Spline doesnt interpolate through
00049     the control points!!!
00050
00051     The Implementation of BSplineCurve is faster then BSpline. If you only want
00052     to draw a BSpline you should use this implementation.
00053
00054     usage:
00055     -# void SetControlPoints(&cPnts)
00056     for quadratic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0]
00057     for cubic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0],cPnt[1]
00058     -# void InitXXXUniformBSpline() - computes coefficientvectors for all knots
00059     -# void XXXUniformSpline(Vector2<double> &res, double t ) - computes
00060     point on the curve (0<=t<=1)
00061     t=0 returns the first computed knot of the first segment
00062     t=1 returns the last computed knot of the last segment
00063
00064     see also 'Computer Graphics & Geometric Modeling' from David Salomon
00065     chapter 4.16
00066
00067     @author Marcel Lilienthal, Mai 2005
00068     */
00069
00070     class BIASMathAlgo_EXPORT BSplineCurve : public Debug
00071     {
00072
00073     public:
00074         BSplineCurve();
00075         ~BSplineCurve() {};
00076
00077         /**
00078         set the control points, which control the interpolating curve
00079         */
00080         inline void SetControlPoints(std::vector<BIAS::Vector2<double> > &cPnt){
00081             cPnts_=cPnt;
00082 #ifdef BIAS_DEBUG
00083             initializedCubic_=false;
00084             initializedQuadratic_=false;
00085 #endif
00086         };
00087
00088         /**
00089         @brief computes coefficients for all segments of a quadratic uniform
00090         B-spline
00091
00092         this function computes the coefficients for all sements of a quadratic
00093         uniform B-spline and saves these coefficients in protected vectors
00094         xCoeff_, yCoeff_
00095         method is discribed in David Salomons "Computer Graphic & Geometric
00096         Modelling" chapter 4.16.2
00097
00098         @author Marcel Lilienthal, Mai 2005
00099         */
00100         void InitQuadraticUniformBSpline();
00101
00102         /**
00103         @brief computes coefficients for all segments of a cubic uniform B-spline
00104
00105         this function computes the coefficients for all sements of a cubic
00106         uniform B-spline and saves these coefficients in protected vectors
00107         xCoeff_, yCoeff_.
00108         method is discribed in David Salomons "Computer Graphic & Geometric
00109         Modelling" chapter 4.16.4
00110
00111         @author Marcel Lilienthal, Mai 2005
00112         */
00113         void InitCubicUniformBSpline();
00114
00115         /**
00116         @brief computes the point on a quadratic uniform B-spline curve at time t
00117
00118         this function computes the point on a quadratic uniform B-spline curve at
00119         time t. method is discribed in David Salomons "Computer Graphic &
00120         Geometric Modelling" chapter 4.16.2.
00121         the value of t must be between 0 and 1.
00122         t is used to compute the corresponding segment and the t_ for the result
00123         segment.
00124
00125         @param  res - reference to the result (return value)
00126         @param  t - time value of which point is to be calculated
00127         @author Marcel Lilienthal, Mai 2005
00128         */
00129         void QuadraticUniformBSpline(Vector2<double> &res, double t);
00130
00131         /**
00132         @brief computes the point on a cubic uniform B-spline curve at time t
00133
00134         this function computes the point on a cubic uniform B-spline curve at time
00135         t. method is discribed in David Salomons "Computer Graphic & Geometric
00136         Modelling" chapter 4.16.2.
00137         the value of t must be between 0 and 1.
00138         t is used to compute the corresponding segment and the t_ for the result
00139         segment.
00140
00141         @param  res - reference to the result (return value)
00142         @param  t - time value of which point is to be calculated
00143         @author Marcel Lilienthal, Mai 2005
00144         */
00145         void CubicUniformBSpline(Vector2<double> &res, double t);
00146
00147
00148     protected:
00149
00150 #ifdef BIAS_DEBUG
00151         bool initializedQuadratic_;
00152         bool initializedCubic_;
00153 #endif
00154         std::vector<BIAS::Vector2<double> > cPnts_;//control Points
00155         std::vector<BIAS::Vector<double> > xCoeff_;//coefficient x Vec
00156         std::vector<BIAS::Vector<double> > yCoeff_;//coefficient y Vec
00157
00158     };//class
00159
00160 }//namespace
00161
00162
00163 #include <Base/Common/BIASpragmaEnd.hh>
00164 #endif
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/buildsystem.dox File Reference

Doc/buildsystem.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Camera.cpp Source File

Image

Camera.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #define _CRT_SECURE_NO_DEPRECATE
00028 #include <stdio.h>
00029
00030 #include <Base/Image/Image.hh>
00031 #include "Camera.hh"
00032 #define MAXHEADERLINES 1024
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 template <class StorageType>
00038 void Camera<StorageType>::Init_(){
00039   TimeSec_ = 0;
00040   TimeUSec_ = 0;
00041   Orientation_[0] = 0.0;
00042   Orientation_[1] = 0.0;
00043   Orientation_[2] = 0.0;
00044   _f=0.0;
00045   _C.Set(0.0, 0.0, 0.0);
00046   _K.SetZero();
00047   P_.SetZero();
00048   _R.SetZero();
00049   _Point.Set(0.0,0.0,0.0);
00050   // set all valid falgs to false
00051   TimeValid_        = false;
00052   ASCIIValid_       = false;
00053   OrientationValid_ = false;
00054   PValid_           = false;
00055   KValid_           = false;
00056   RValid_           = false;
00057   CValid_           = false;
00058   PointValid_       = false;
00059   fValid_           = false;
00060   ProjValid_        = false;
00061 #ifdef BIAS_DAIMLERCHRYSLER
00062   ptuValid_         = false;
00063   inertialValid_    = false;
00064   gpsValid_         = false;
00065 #endif
00066
00067 }
00068
00069 template <class StorageType>
00070 Camera<StorageType>::Camera() : Image<StorageType>()
00071 {
00072   Init_();
00073 }
00074
00075 template <class StorageType>
00076 Camera<StorageType>::~Camera()
00077 {}
00078
00079 template <class StorageType>
00080 Camera<StorageType>::Camera(const ImageBase& img)
00081   : Image<StorageType>(img)
00082 {
00083   Init_();
00084 }
00085
00086 template <class StorageType>
00087 void Camera<StorageType>::PrintAppData(ostream &os)
00088 {
00089   if (ASCIIValid_) os << "ASCII  : "<<ASCIIString_<<endl;
00090   if (IsTimeValid()) os << "Timestamp   : "<<TimeSec_<<":"<<TimeUSec_<<endl;
00091   if (IsOrientationValid())
00092     os << "Orientation : "<<Orientation_[0]<<" "<<Orientation_[1]<<" "
00093        <<Orientation_[2]<<endl;
00094   if (IsPValid()) os << "P-Matrix: " << endl << P_;
00095
00096   bool isPDecomposable = IsPValid() && (P_.NormFrobenius() > 1E-50);
00097
00098   // axis/angle representation of R-Matrix
00099   bool hasRMatrix = false;
00100   Vector3<ROTATION_MATRIX_TYPE> RAxis;
00101   ROTATION_MATRIX_TYPE RAngle=0;
00102
00103   if (IsRValid()) {
00104     os << "R-Matrix: " << endl << _R;
00105     _R.GetRotationAxisAngle(RAxis, RAngle);
00106     hasRMatrix = true;
00107   } else {
00108     if (isPDecomposable) {
00109       os << "R-Matrix is empty - decomposed from P: " << endl << P_.GetR();
00110       RMatrix(P_.GetR()).GetRotationAxisAngle(RAxis, RAngle);
00111       hasRMatrix = true;
00112     }
00113   }
00114   if (hasRMatrix) {
00115     RAngle = (RAngle / M_PI) * 180.0; // convert angle to degrees
00116     os << "[Axis, Angle] = [("
00117        << RAxis[0] << ", "
00118        << RAxis[1] << ", "
00119        << RAxis[2] << "), "
00120        << RAngle << " deg]" << endl;
00121   }
00122   if (IsKValid()) {
00123     os << "K-Matrix: " << endl << _K;
00124   } else {
00125     if (isPDecomposable)
00126       os << "K-Matrix is empty - decomposed from P: " << endl << P_.GetK();
00127   }
00128   if (IsCValid()) {
00129     os << "C-Vector: " << _C << endl;
00130   } else {
00131     if (isPDecomposable)
00132       os << "C-Vector is empty - decomposed from P: " << P_.GetC() << endl;
00133   }
00134   if (IsPointValid()) os << "HomgPoint2D: " << _Point << endl;
00135   if (IsfValid()) os << "Focal length: "<< _f << endl;
00136   if (IsProjValid()) os<<"Projection: "<<Proj_<<endl;
00137 #ifdef BIAS_DAIMLERCHRYSLER
00138   if (IsptuValid()) os << ptu << endl;
00139   if (IsinertialValid()) os << inertial << endl;
00140   if (IsgpsValid()) os << gps << endl;
00141 #endif
00142 }
00143
00144
00145 template <class StorageType>
00146 int Camera<StorageType>::ParseMetaData()
00147 {
00148   setlocale(LC_ALL, "C");//enforce C locales
00149   AppData ad;
00150   //SetDebugLevel(GetDebugLevel() | D_CAMERA_METADATA);
00151
00152   BIASDOUT(D_CAMERA_METADATA, "_MetaData has " << this->_MetaData.size()
00153            << " entries");
00154
00155   if (this->_MetaData.Find(AppData::MD_ASCII_DATA, "#[ASCII]", ad)>=0){
00156       BIASDOUT(D_CAMERA_METADATA, "found ASCII String");
00157       if (ad.tag==AppData::MD_USE_ASCII){
00158     ASCIIString_ = ad.sdata;
00159       }
00160       else{
00161     ASCIIString_="";
00162     for(int i=0; i<ad.length; i++){
00163       ASCIIString_+=ad.data[i];
00164     }
00165       }
00166       ASCIIValid_=true;
00167   }
00168
00169
00170   if (this->_MetaData.Find(AppData::MD_PMatrix, "#[PMatrix]", ad)>=0){
00171     PMatrix P;
00172     BIASDOUT(D_CAMERA_METADATA, "found PMatrix");
00173     if (ad.tag==AppData::MD_USE_ASCII){
00174       sscanf(ad.sdata.c_str(),
00175              "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf",
00176              &P[0][0], &P[0][1], &P[0][2], &P[0][3],
00177              &P[1][0], &P[1][1], &P[1][2], &P[1][3],
00178              &P[2][0], &P[2][1], &P[2][2], &P[2][3]);
00179     } else {
00180       memcpy(P.GetData(), ad.data, ad.length);
00181     }
00182     P_ = P;
00183     PValid_=true;
00184   }
00185   if (this->_MetaData.Find(AppData::MD_Projection, "#[Projection]", ad)>=0){
00186     BIASDOUT(D_CAMERA_METADATA, "found Projection");
00187     string flatproj;
00188     if (ad.tag==AppData::MD_USE_ASCII) flatproj = ad.sdata;
00189
00190     else {
00191       flatproj = ad.data;
00192       flatproj = flatproj.substr(0,ad.length);
00193     }
00194 #ifdef BIAS_HAVE_XML2
00195     int res = Proj_.XMLReadFromString(flatproj);
00196     if (res<0)
00197       BIASERR("Failed to parse string with length: "<<ad.length<<" string: "
00198           <<flatproj);
00199     ProjValid_=true;
00200 #endif //BIAS_HAVE_XML2
00201   }
00202
00203
00204   if (this->_MetaData.Find(AppData::MD_TimeStamp, "#[TimeStamp]", ad)>=0){
00205     BIASDOUT(D_CAMERA_METADATA, "found TimeStamp");
00206     if (ad.tag==AppData::MD_USE_ASCII){
00207       sscanf(ad.sdata.c_str(), "%ld %ld " , &TimeSec_, &TimeUSec_);
00208     } else {
00209       TimeSec_ = ((long int*)ad.data)[0];
00210       TimeUSec_ = ((long int*)ad.data)[1];
00211     }
00212     TimeValid_=true;
00213   }
00214   if (this->_MetaData.Find(AppData::MD_Orientation, "#[Orientation]", ad)>=0){
00215     BIASDOUT(D_CAMERA_METADATA, "found Orientation");
00216     if (ad.tag==AppData::MD_USE_ASCII){
00217       sscanf(ad.sdata.c_str(), "%f %f %f" ,&Orientation_[0], &Orientation_[1],
00218              &Orientation_[2]);
00219     } else {
00220       memcpy(&Orientation_, ad.data, ad.length);
00221     }
00222     OrientationValid_=true;
00223   }
00224   if (this->_MetaData.Find(AppData::MD_CVector, "#[CVector]", ad)>=0){
00225     BIASDOUT(D_CAMERA_METADATA, "found CVector");
00226     if (ad.tag==AppData::MD_USE_ASCII){
00227       sscanf(ad.sdata.c_str(), "%lf %lf %lf ", &_C[0], &_C[1], &_C[2]);
00228     } else {
00229       memcpy(_C.GetData(), ad.data, ad.length);
00230     }
00231     CValid_=true;
00232   }
00233   if (this->_MetaData.Find(AppData::MD_RMatrix, "#[RMatrix]", ad)>=0){
00234     BIASDOUT(D_CAMERA_METADATA, "found RMatrix");
00235     if (ad.tag==AppData::MD_USE_ASCII){
00236       sscanf(ad.sdata.c_str(), "%lf %lf %lf %lf %lf %lf %lf %lf %lf",
00237              &_R[0][0], &_R[0][1], &_R[0][2],
00238              &_R[1][0], &_R[1][1], &_R[1][2],
00239              &_R[2][0], &_R[2][1], &_R[2][2]);
00240     } else {
00241       memcpy(_R.GetData(), ad.data, ad.length);
00242     }
00243     RValid_=true;
00244   }
00245   if (this->_MetaData.Find(AppData::MD_KMatrix, "#[KMatrix]", ad)>=0){
00246     BIASDOUT(D_CAMERA_METADATA, "found KMatrix");
00247     if (ad.tag==AppData::MD_USE_ASCII){
00248       sscanf(ad.sdata.c_str(), "%lf %lf %lf %lf %lf %lf %lf %lf %lf",
00249         &_K[0][0], &_K[0][1], &_K[0][2],
00250         &_K[1][0], &_K[1][1], &_K[1][2],
00251         &_K[2][0], &_K[2][1], &_K[2][2]);
00252     } else {
00253       memcpy(_K.GetData(), ad.data, ad.length);
00254     }
00255     KValid_=true;
00256   }
00257   if (this->_MetaData.Find(AppData::MD_HomgPoint2D, "#[HomgPoint2D]", ad)>=0){
00258     BIASDOUT(D_CAMERA_METADATA, "found HomgPoint2D");
00259     if (ad.tag==AppData::MD_USE_ASCII){
00260       sscanf(ad.sdata.c_str(), "[ %lf %lf %lf ]",
00261              &_Point[0], &_Point[1], &_Point[2]);
00262     } else {
00263       memcpy(_Point.GetData(), ad.data, ad.length);
00264     }
00265     PointValid_=true;
00266   }
00267   if (this->_MetaData.Find(AppData::MD_Focal_Length, "#[Focal Length]", ad)>=0){
00268     BIASDOUT(D_CAMERA_METADATA, "found Focal Length");
00269     if (ad.tag==AppData::MD_USE_ASCII){
00270       sscanf(ad.sdata.c_str(), "%lf", &_f);
00271     } else {
00272       memcpy(&_f, ad.data, ad.length);
00273     }
00274     fValid_=true;
00275   }
00276 #ifdef BIAS_DAIMLERCHRYSLER
00277   if (this->_MetaData.Find(AppData::MD_PTU_Data, "#[PTU Data]", ad)>=0){
00278     BIASDOUT(D_CAMERA_METADATA, "found PTU_Data");
00279     if (ad.tag==AppData::MD_USE_ASCII){
00280       stringstream ss;
00281       ss << ad.sdata;
00282       ss >> ptu;
00283     } else {
00284       //memcpy(&ptu, ad.data, ad.length);
00285       ptu.ReadBinary(ad.data);
00286     }
00287     BIASDOUT(D_CAMERA_METADATA, "cam.ptu: "<<ptu<<endl);
00288     ptuValid_=true;
00289   }
00290   if (this->_MetaData.Find(AppData::MD_Inertial_Sensor,"#[Inertial Sensor]",
00291                            ad)>=0){
00292     BIASDOUT(D_CAMERA_METADATA, "found Inertial_Sensor");
00293     if (ad.tag==AppData::MD_USE_ASCII){
00294       stringstream ss;
00295       ss << ad.sdata;
00296       ss >> inertial;
00297     } else {
00298       //memcpy(&inertial, ad.data, ad.length);
00299       inertial.ReadBinary(ad.data);
00300     }
00301     BIASDOUT(D_CAMERA_METADATA, "cam.inertiual: "<<inertial<<endl);
00302     inertialValid_=true;
00303   }
00304   if (this->_MetaData.Find(AppData::MD_Inertial_Sensor,"#[GPS Data]", ad)>=0){
00305     BIASDOUT(D_CAMERA_METADATA, "found GPS Data");
00306     if (ad.tag==AppData::MD_USE_ASCII){
00307       stringstream ss;
00308       ss << ad.sdata;
00309       ss >> gps;
00310     } else {
00311       gps.ReadBinary(ad.data);
00312     }
00313     BIASDOUT(D_CAMERA_METADATA, "cam.gps: "<<gps<<endl);
00314     gpsValid_=true;
00315   }
00316 #endif
00317 /*
00318   if (this->_MetaData.Find(AppData::MD_, "#[]", ad)>=0){
00319     BIASDOUT(D_CAMERA_METADATA, "found ");
00320     if (ad.tag==AppData::MD_USE_ASCII){
00321       sscanf(ad.sdata.c_str(), );
00322     } else {
00323
00324     }
00325   }
00326 */
00327   return 0;
00328 }
00329
00330
00331 template <class StorageType>
00332 Camera<StorageType>
00333 Camera<StorageType>::operator=(const Camera<StorageType> &src)
00334 {
00335   this->Image<StorageType>::operator=(src);
00336   TimeSec_=src.TimeSec_;
00337   TimeUSec_=src.TimeUSec_;
00338   Orientation_[0] = src.Orientation_[0];
00339   Orientation_[1] = src.Orientation_[1];
00340   Orientation_[2] = src.Orientation_[2];
00341   P_=src.P_;
00342   _K=src._K;
00343   _R=src._R; // rotation of camera
00344   _C=src._C; // camera center in world coo
00345   _Point=src._Point;
00346   _f=src._f;
00347   Proj_=src.Proj_;
00348
00349 #ifdef BIAS_DAIMLERCHRYSLER
00350   ptu=src.ptu;
00351   inertial=src.inertial;
00352   gps=src.gps;
00353 #endif
00354
00355   // copy all the valid flags
00356   TimeValid_        = src.TimeValid_ ;
00357   OrientationValid_ = src.OrientationValid_;
00358   PValid_           = src.PValid_ ;
00359   KValid_           = src.KValid_ ;
00360   RValid_           = src.RValid_;
00361   CValid_           = src.CValid_;
00362   PointValid_       = src.PointValid_;
00363   fValid_           = src.fValid_;
00364   ProjValid_=src.ProjValid_;
00365
00366 #ifdef BIAS_DAIMLERCHRYSLER
00367   ptuValid_         = src.ptuValid_;
00368   inertialValid_    = src.inertialValid_;
00369   gpsValid_         = src.gpsValid_;
00370 #endif
00371
00372   return (*this);
00373 }
00374
00375
00376 template <class StorageType>
00377 int Camera<StorageType>::UpdateMetaData()
00378 {
00379   setlocale(LC_ALL, "C");//enforce C locales
00380   //AddDebugLevel(D_CAMERA_METADATA);
00381   char tmpline[256];
00382   ostringstream os;
00383   BIASDOUT(D_CAMERA_METADATA,"UpdateMetaData()");
00384   if(ASCIIValid_)
00385     {
00386       this->_MetaData.Add(AppData::MD_ASCII_DATA, ASCIIString_.size(),
00387               (char*)ASCIIString_.c_str());
00388       this->_MetaData.Add("#[ASCII]", ASCIIString_);
00389       BIASDOUT(D_CAMERA_METADATA,"Added ASCII String");
00390     }
00391   if (PValid_) {
00392     this->_MetaData.Add(AppData::MD_PMatrix, 12*sizeof(double),
00393                         (char*)P_.GetData());
00394     sprintf(tmpline, "%f %f %f %f %f %f %f %f %f %f %f %f",
00395             P_[0][0], P_[0][1], P_[0][2], P_[0][3],
00396             P_[1][0], P_[1][1], P_[1][2], P_[1][3],
00397             P_[2][0], P_[2][1], P_[2][2], P_[2][3]);
00398     this->_MetaData.Add("#[PMatrix]", tmpline);
00399     BIASDOUT(D_CAMERA_METADATA,"Added PMatrix");
00400   }
00401   if (TimeValid_) {
00402     long int time[2];
00403     time[0] = TimeSec_;
00404     time[1] = TimeUSec_;
00405     this->_MetaData.Add(AppData::MD_TimeStamp,sizeof(time),(char*)time);
00406     sprintf(tmpline, "%ld %ld" , TimeSec_, TimeUSec_);
00407     this->_MetaData.Add("#[TimeStamp]", tmpline);
00408     BIASDOUT(D_CAMERA_METADATA,"Added Time");
00409   }
00410   if (OrientationValid_) {
00411     this->_MetaData.Add(AppData::MD_Orientation, sizeof(Orientation_),
00412                         (char*)Orientation_);
00413     sprintf(tmpline, "%f %f %f" , Orientation_[0], Orientation_[1],
00414             Orientation_[2]);
00415     this->_MetaData.Add("#[Orientation]", tmpline);
00416     BIASDOUT(D_CAMERA_METADATA,"Added Orientation");
00417   }
00418   if (CValid_){
00419     this->_MetaData.Add(AppData::MD_CVector, 3*sizeof(double),
00420                         (char*)_C.GetData());
00421     sprintf(tmpline, "%f %f %f ", _C[0], _C[1], _C[2]);
00422     this->_MetaData.Add("#[CVector]", tmpline);
00423     BIASDOUT(D_CAMERA_METADATA,"Added CVector");
00424   }
00425   if (RValid_) {
00426     this->_MetaData.Add(AppData::MD_RMatrix, 9*sizeof(double),
00427                         (char*)_R.GetData());
00428     sprintf(tmpline, "%f %f %f %f %f %f %f %f %f",
00429             _R[0][0], _R[0][1], _R[0][2],
00430             _R[1][0], _R[1][1], _R[1][2],
00431             _R[2][0], _R[2][1], _R[2][2]);
00432     this->_MetaData.Add("#[RMatrix]", tmpline);
00433     BIASDOUT(D_CAMERA_METADATA,"Added RMatrix");
00434   }
00435   if (KValid_) {
00436     this->_MetaData.Add(AppData::MD_KMatrix, 9*sizeof(double),
00437                         (char*)_K.GetData());
00438     sprintf(tmpline, "%f %f %f %f %f %f %f %f %f",
00439             _K[0][0], _K[0][1], _K[0][2],
00440             _K[1][0], _K[1][1], _K[1][2],
00441             _K[2][0], _K[2][1], _K[2][2]);
00442     this->_MetaData.Add("#[KMatrix]", tmpline);
00443     BIASDOUT(D_CAMERA_METADATA,"Added KMatrix");
00444   }
00445   if (fValid_){
00446     this->_MetaData.Add(AppData::MD_Focal_Length, sizeof(double),
00447                         (char*)&_f);
00448     sprintf(tmpline, "%f", _f);
00449     this->_MetaData.Add("#[Focal Length]", tmpline);
00450     BIASDOUT(D_CAMERA_METADATA,"Added Focal Length");
00451   }
00452   if (ProjValid_) {
00453     string flatproj ;
00454 #ifdef BIAS_HAVE_XML2
00455     Proj_.XMLWriteToString(flatproj);
00456 #endif //BIAS_HAVE_XML2
00457     for (unsigned int i=0;i<flatproj.length(); i++) {
00458       if (flatproj[i] == 10) flatproj[i] = 32;
00459       if (flatproj[i] == 13) flatproj[i] = 32;
00460     }
00461     this->_MetaData.Add(AppData::MD_Projection, flatproj.length(),
00462                         (char*)flatproj.c_str());
00463
00464     this->_MetaData.Add("#[Projection]", flatproj.c_str());
00465     BIASDOUT(D_CAMERA_METADATA,"Added Projection");
00466
00467   } //Proj_
00468
00469 #ifdef BIAS_DAIMLERCHRYSLER
00470   //SetDebugLevel(GetDebugLevel() | D_CAMERA_METADATA);
00471   char *tmpdata = NULL;
00472   int length=0;
00473   if (ptuValid_) {
00474     length=ptu.GetBinaryLength();
00475     tmpdata=new char[length];
00476     ptu.WriteBinary(tmpdata);
00477     BIASCDOUT(D_CAMERA_METADATA, *(double*)tmpdata<<endl);
00478     this->_MetaData.Add(AppData::MD_PTU_Data, length, tmpdata);
00479     BIASDOUT(D_CAMERA_METADATA,"Added PTU Data");
00480     os.str("");
00481     os << ptu;
00482     BIASDOUT(D_CAMERA_METADATA,"ptu "<<os.str());
00483     this->_MetaData.Add("#[PTU Data]", os.str());
00484     BIASDOUT(D_CAMERA_METADATA,"Added string PTU Data");
00485     delete[] tmpdata; tmpdata=NULL;
00486   }
00487   if (inertialValid_){
00488     length=inertial.GetBinaryLength();
00489     tmpdata=new char[length];
00490     inertial.WriteBinary(tmpdata);
00491     this->_MetaData.Add(AppData::MD_Inertial_Sensor, length, tmpdata);
00492     os.str("");
00493     os << inertial;
00494     this->_MetaData.Add("#[Inertial Sensor]", os.str());
00495     BIASDOUT(D_CAMERA_METADATA,"Added Inertial Sensor");
00496     delete[] tmpdata; tmpdata=NULL;
00497   }
00498   if (gpsValid_){
00499     length=gps.GetBinaryLength();
00500     tmpdata=new char[length];
00501     gps.WriteBinary(tmpdata);
00502     this->_MetaData.Add(AppData::MD_GPS_Data, length, tmpdata);
00503     os.str("");
00504     os << gps;
00505     this->_MetaData.Add("#[GPS Data]", os.str());
00506     BIASDOUT(D_CAMERA_METADATA,"Added GPS Data");
00507     delete[] tmpdata; tmpdata=NULL;
00508   }
00509 #endif
00510
00511   BIASDOUT(D_CAMERA_METADATA,"Finished adding meta data");
00512   return 0;
00513 }
00514
00515
00516 // template instantiation
00517
00518 #define INST(type)\
00519 template class BIASImage_EXPORT Camera<type>
00520 //  template ostream& operator<<<type>(ostream & , Image<type> const & );
00521 //  template istream& operator>><type>(istream& , Image<type>& );
00522
00523 INST(unsigned char);
00524 INST(float);
00525
00526 #ifdef BUILD_IMAGE_INT
00527 INST(int);
00528 #endif
00529 #ifdef BUILD_IMAGE_CHAR
00530 INST(char);
00531 #endif
00532 #ifdef BUILD_IMAGE_SHORT
00533 INST(short);
00534 #endif
00535 #ifdef BUILD_IMAGE_USHORT
00536 INST(unsigned short);
00537 #endif
00538 #ifdef BUILD_IMAGE_UINT
00539 INST(unsigned int);
00540 #endif
00541 #ifdef BUILD_IMAGE_DOUBLE
00542 INST(double);
00543 #endif
00544
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Camera.hh Source File

Image

Camera.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIASCAMERA_HH__
00027 #define __BIASCAMERA_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Image/Image.hh>
00031 #include <Geometry/PMatrix.hh>
00032 #include <Geometry/Projection.hh>
00033 #include <Base/Geometry/KMatrix.hh>
00034 #include <Geometry/RMatrix.hh>
00035 #include <Base/Math/Vector3.hh>
00036 #include <Base/Image/MetaData.hh>
00037
00038 #ifdef BIAS_DAIMLERCHRYSLER
00039 #include "DCData.hh"
00040 #endif
00041
00042 #define D_CAM_DCPTU       0x0001
00043 #define D_CAM_DCINERT     0x0002
00044 #define D_CAMERA_METADATA 0x0004
00045 #define D_CAM_IO          0x0008
00046
00047 namespace BIAS {
00048   /** @class Camera
00049       @ingroup g_image
00050       @brief extends the Image by MetaData support (e.g. PMatrix,
00051       sensor data, etc.)
00052
00053       This class Camera extends Image with
00054       - accurate timestamps
00055       - P-matrix support
00056       - C, R, K matrix support (camera center, -rotation, -calibration)
00057       - anything usefull representing a camera
00058
00059       After reading a file with such meta data (call it MYDATA) you can call
00060       Camera::IsMYDATAValid() to find out if there is MYDATA in your camera
00061       object. If so, call Camera::GetMYDATA().
00062       Remark: In old image files written by BIAS, invalid meta data has been
00063       attached as zero entries, e.g. PMatrix=0,0,0,0,0,0,0,0,0,0,0,0 means
00064       that there was no PMatrix available.
00065
00066       To add/update meta information data to your camera, call
00067       Camera::AddMYDATA(mydataobject) to attach it to the camera object.
00068       Before writing the camera, you must call
00069       Camera::UpdateMetaData() to tell the Camera to convert the current
00070       data into the BIAS::MetaData format, which is then written.
00071
00072       See ImageIO for the file types where such meta data information can be
00073       stored and read, maybe mip or pgm/ppm.
00074   */
00075   template <class StorageType>
00076   class BIASImage_EXPORT Camera : public Image<StorageType>
00077   {
00078   public:
00079     Camera();
00080     explicit Camera(const ImageBase& img);
00081     //    Camera(const Camera<StorageType> &src) { operator=(src);};
00082     ~Camera();
00083
00084     /** After ImageIO::Load() operated on AppData_, this method fills
00085         P_, Timestamp, DC_*, ... */
00086     int ParseMetaData();
00087
00088     /** \brief copy P_ and co. back to MetaData before
00089         useful before ImageIO::Write() or ImageIO::ExportImage */
00090     int UpdateMetaData();
00091
00092     inline int SetP(const PMatrix& matP) { PValid_=true; P_=matP; return 0;};
00093
00094     inline BIAS::PMatrix& GetP() { return P_; } ;
00095
00096    inline int SetProj(const Projection& Proj) { ProjValid_=true;
00097     Proj_=Proj; return 0;};
00098
00099     inline BIAS::Projection& GetProj() { return Proj_; } ;
00100
00101
00102     inline void SetASCIIString(const std::string& ASCIIString)
00103     {
00104       ASCIIString_=ASCIIString; ASCIIValid_=true;
00105     }
00106
00107     inline std::string GetASCIIString()
00108     {
00109       return ASCIIString_;
00110     }
00111
00112
00113     inline void SetTime(long int sec, long int usec)
00114     { TimeSec_ = sec; TimeUSec_ = usec; TimeValid_=true;}
00115
00116     /// @brief set time from double (in seconds)
00117     inline void SetTime(double sec)
00118     { TimeValid_=true; TimeSec_ = (long int)sec;
00119     TimeUSec_ = (long int)rint((sec-(double)TimeSec_)*1000000.0);}
00120
00121     inline void GetTime(long int &sec, long int &usec)
00122     { sec = TimeSec_;usec = TimeUSec_;}
00123
00124     inline double GetTime()
00125     { return TimeSec_ + ((double)TimeUSec_/1000000.0);}
00126
00127
00128     inline void SetOrientation(const float ori[3])
00129     { Orientation_[0] = ori[0]; Orientation_[1] = ori[1];
00130     Orientation_[2] = ori[2]; OrientationValid_=true;};
00131
00132     inline void SetOrientation(const BIAS::Vector3<double> &ori) {
00133       Orientation_[0] = float(ori[0]); Orientation_[1] = float(ori[1]);
00134       Orientation_[2] = float(ori[2]); OrientationValid_=true;
00135     }
00136
00137     inline void GetOrientation(float &o0,float &o1,float &o2) const {
00138       o0 = Orientation_[0]; o1 = Orientation_[1]; o2 = Orientation_[2];}
00139
00140     inline void GetOrientation(BIAS::Vector3<double> &ori) const {
00141       ori[0] = Orientation_[0]; ori[1] = Orientation_[1];
00142       ori[2] = Orientation_[2];}
00143
00144     inline void SetC(const Vector3<double>& C) { _C = C; CValid_ = true;};
00145     inline Vector3<double>& GetC() { return _C; };
00146
00147     inline void SetR(const RMatrix& R) { _R = R; RValid_ =true; };
00148     inline RMatrix& GetR() { return _R; };
00149
00150     inline void SetK(const KMatrix& K) { _K = K; KValid_=true;};
00151     inline KMatrix& GetK() { return _K; };
00152
00153     inline void Setf(const double& focal) {_f = focal; fValid_=true;};
00154     inline double Getf() { return _f; };
00155
00156 #ifdef BIAS_DAIMLERCHRYSLER
00157     inline void SetPTU(DC_ptu& p) { ptu = p; ptuValid_ = true;};
00158     inline DC_ptu& GetPTU() { return ptu; };
00159
00160     inline void SetInertial(DC_inertial& i) {
00161       inertial = i; inertialValid_=true; };
00162     inline DC_inertial& GetInertial() { return inertial; };
00163
00164     inline void SetGPS(DC_GPS& g) {gps = g; gpsValid_=true;};
00165     inline DC_GPS& GetGPS() { return gps; };
00166 #endif
00167
00168     Camera<StorageType> operator=(const Camera<StorageType> &src);
00169
00170     /// @brief see whats in the camera, for debug
00171     void PrintAppData(std::ostream &os) ;
00172
00173     /** @brief Is field of data valid or unknown ? if false,
00174         the return value of the Get...()-function is undefined */
00175     inline bool IsTimeValid() const { return TimeValid_;}
00176     /** @brief Is field of data valid or unknown ? if false,
00177         the return value of the Get...()-function is undefined */
00178     inline bool IsOrientationValid() const { return OrientationValid_;}
00179     /** @brief Is field of data valid or unknown ? if false,
00180         the return value of the Get...()-function is undefined */
00181     inline bool IsPValid() const { return PValid_;}
00182     /** @brief Is field of data valid or unknown ? if false,
00183         the return value of the Get...()-function is undefined */
00184     inline bool IsKValid() const { return KValid_;}
00185     /** @brief Is field of data valid or unknown ? if false,
00186         the return value of the Get...()-function is undefined */
00187     inline bool IsRValid() const { return RValid_;}
00188     /** @brief Is field of data valid or unknown ? if false,
00189         the return value of the Get...()-function is undefined */
00190     inline bool IsCValid() const { return CValid_;}
00191     /** @brief Is field of data valid or unknown ? if false,
00192         the return value of the Get...()-function is undefined */
00193     inline bool IsPointValid() const { return PointValid_;}
00194     /** @brief Is field of data valid or unknown ? if false,
00195         the return value of the Get...()-function is undefined */
00196     inline bool IsfValid() const { return fValid_;}
00197
00198     inline bool IsProjValid() const { return ProjValid_;}
00199
00200 #ifdef BIAS_DAIMLERCHRYSLER
00201     inline bool IsptuValid() { return ptuValid_;}
00202     inline bool IsinertialValid() { return inertialValid_;}
00203     inline bool IsgpsValid() { return gpsValid_;}
00204 #endif
00205
00206   protected:
00207     /// @brief called by constructors to init all fields
00208     void Init_();
00209
00210     /// ASCII multifunctional string
00211     std::string ASCIIString_;
00212     /// is correspondig field of data valid or unknown ?
00213     bool ASCIIValid_;
00214
00215     /// time stamp in seconds
00216     long int TimeSec_;
00217     /// time stamp in microseconds
00218     long int TimeUSec_;
00219     /// is correspondig field of data valid or unknown ?
00220     bool TimeValid_;
00221
00222     /// orientation data from sensor ?
00223     float Orientation_[3];
00224     /// is correspondig field of data valid or unknown ?
00225     bool OrientationValid_;
00226
00227     /// pmatrix, maybe non-metric
00228     PMatrix P_;
00229     /// is correspondig field of data valid or unknown ?
00230     bool PValid_;
00231
00232     // new projection, will replace P_ soon
00233     Projection Proj_;
00234     bool ProjValid_;
00235
00236     /// camera calibration with internals
00237     KMatrix _K;
00238     /// is correspondig field of data valid or unknown ?
00239     bool KValid_;
00240
00241     /// camera orientation
00242     RMatrix _R;
00243     /// is correspondig field of data valid or unknown ?
00244     bool RValid_;
00245
00246     /// camera center in wcs
00247     Vector3<double> _C;
00248     /// is correspondig field of data valid or unknown ?
00249     bool CValid_;
00250
00251     /// a point, it is up to you what you put in
00252     HomgPoint2D _Point;
00253     /// is correspondig field of data valid or unknown ?
00254     bool PointValid_;
00255
00256     /// focal length in m
00257     double _f;
00258     /// is correspondig field of data valid or unknown ?
00259     bool fValid_;
00260
00261 #ifdef BIAS_DAIMLERCHRYSLER
00262     // car sensor data from DC
00263     DC_ptu ptu;
00264     /// is correspondig field of data valid or unknown ?
00265     bool ptuValid_;
00266
00267     DC_inertial inertial;
00268     /// is correspondig field of data valid or unknown ?
00269     bool inertialValid_;
00270
00271     DC_GPS gps;
00272     /// is correspondig field of data valid or unknown ?
00273     bool gpsValid_;
00274 #endif
00275
00276   };
00277 }
00278 #endif
00279
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CameraParam.cpp Source File

Image

CameraParam.cpp

Go to the documentation of this file.
00001 /*
00002 $Id: CameraParam.cpp,v 2.29 2006/05/05 11:45:50 streckel Exp $
00003 */
00004 /*
00005 This file is part of the BIAS library (Basic ImageAlgorithmS).
00006
00007 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00008   Multimediale Systeme der Informationsverarbeitung
00009   Institut fuer Informatik
00010   Christian-Albrechts-Universitaet Kiel
00011
00012
00013 BIAS is free software; you can redistribute it and/or modify
00014 it under the terms of the GNU Lesser General Public License as published by
00015 the Free Software Foundation; either version 2.1 of the License, or
00016 (at your option) any later version.
00017
00018 BIAS is distributed in the hope that it will be useful,
00019 but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 GNU Lesser General Public License for more details.
00022
00023 You should have received a copy of the GNU Lesser General Public License
00024 along with BIAS; if not, write to the Free Software
00025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 */
00027 #include "CameraParam.hh"
00028 #include <iostream>
00029 #include <math.h>
00030 #include <Base/Image/ImageAttributes.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035
00036 /*
00037 std::string CameraParam::CameraModelName[]={
00038   "SONY DFW-X700",
00039   "SONY DFW-V500",
00040   "PTGREY DRAGONFLY COLOR",
00041   "SONY EVI-D31",
00042   "CAMERA_SONY_DV",
00043   "UNKNOWN",
00044 };
00045
00046 std::string CameraParam::LensModelName[]={
00047   "SONY EVID31 BUILTIN",
00048   "SONY DV BUILTIN",
00049   "PENTAX CMOUNT 4.8",
00050   "PENTAX CMOUNT 8.0",
00051   "PENTAX CMOUNT 4.2",
00052 };
00053 */
00054
00055
00056 CameraParam::CameraParam() {
00057   Init();
00058 }
00059
00060
00061 CameraParam::CameraParam(const CameraParam &cp) {
00062   Init(cp);
00063 }
00064
00065
00066 #ifdef BIAS_HAVE_XML2
00067 CameraParam::CameraParam(const std::string &filename)
00068 {
00069   IsInitialized_=false;
00070   Init(filename);
00071 }
00072 #endif //BIAS_HAVE_XML2
00073
00074
00075 #ifdef BIAS_HAVE_XML2
00076 CameraParam::CameraParam(XMLIO &myXML, xmlNodePtr &cameraNode){
00077   IsInitialized_=false;
00078   Init(myXML, cameraNode);
00079 }
00080 #endif //BIAS_HAVE_XML2
00081
00082
00083 CameraParam::~CameraParam(){
00084 }
00085
00086
00087 void CameraParam::Init()
00088 {
00089   MaxCamAngle_=0;
00090   CamModel_ = "Default Initialization";
00091   CamID_ = 1;
00092   LensModel_ = "Default Initialization";
00093   LensIsSpherical_ = false;
00094
00095   width_=height_=0;
00096   aspectratio_ = 1;
00097   focallengthDef_ = 0;
00098   kc1Def_ = kc2Def_ = kc3Def_ = kc4Def_ = 0;
00099   cellSizeX_ = cellSizeY_ = 0;
00100   principalX_ = principalY_ =0;
00101   IlluCorrX_.clear();
00102   IlluCorrY_.clear();
00103   knownparams_vect_.clear();
00104   cellSizeX_ = cellSizeY_ = 1;
00105   zoomCamera_=false;
00106   AngleCorrX_.clear();
00107   AngleCorrY_.clear();
00108   IlluCorrX_.clear();
00109   IlluCorrY_.clear();
00110   radius_ = 0;
00111   IsInitialized_=false;
00112   zoom_ = 0;
00113   focallengthZoom_ = 0;
00114   downsamplingFactor_ = 1.0;
00115 }
00116
00117 void CameraParam::Init(const CameraParam &cp) {
00118   LensIsSpherical_ = cp.LensIsSpherical_;
00119   IsInitialized_ = cp.IsInitialized_;
00120   CamModel_ = cp.CamModel_;
00121   CamID_ = cp.CamID_;
00122   LensModel_ = cp.LensModel_;
00123   LensIsSpherical_ = cp.LensIsSpherical_;
00124   zoomCamera_ = cp.zoomCamera_;
00125   width_ = cp.width_;
00126   height_ = cp.height_;
00127   knownparams_vect_ = cp.knownparams_vect_;
00128   aspectratio_ = cp.aspectratio_;
00129   cellSizeX_ = cp.cellSizeX_;
00130   cellSizeY_ = cp.cellSizeY_;
00131   principalX_ = cp.principalX_;
00132   principalY_ = cp.principalY_;
00133   focallengthDef_ = cp.focallengthDef_;
00134   kc1Def_ = cp.kc1Def_;
00135   kc2Def_ = cp.kc2Def_;
00136   kc3Def_ = cp.kc3Def_;
00137   kc4Def_ = cp.kc4Def_;
00138   IlluCorrX_ = cp.IlluCorrX_;
00139   IlluCorrY_ = cp.IlluCorrY_;
00140   AngleCorrX_ = cp.AngleCorrX_;
00141   AngleCorrY_ = cp.AngleCorrY_;
00142   if (AngleCorrX_.size()>0)
00143     MaxCamAngle_ = AngleCorrX_[AngleCorrX_.size()-1];
00144   else
00145     MaxCamAngle_ = 0;
00146   radius_ = cp.radius_;
00147   downsamplingFactor_ = cp.downsamplingFactor_;
00148   if (zoomCamera_) {
00149     zoom_ =  knownparams_vect_[0].zoom;
00150     focallengthZoom_ = knownparams_vect_[0].focallength;
00151   }
00152 }
00153
00154 #ifdef BIAS_HAVE_XML2
00155 int CameraParam::Init(const std::string &filename) {
00156   int res = ReadCameraData(filename);
00157   if (res <0) return res;
00158   IsInitialized_=true;
00159   return 0;
00160 }
00161 #endif //BIAS_HAVE_XML2
00162
00163
00164 #ifdef BIAS_HAVE_XML2
00165 int CameraParam::Init(XMLIO &myXML, xmlNodePtr &cameraNode)
00166 {
00167   int res = ReadCameraData(myXML, cameraNode);
00168   if (res <0) return res;
00169   IsInitialized_=true;
00170   return 0;
00171 }
00172 #endif //BIAS_HAVE_XML2
00173
00174
00175 bool CameraParam::IsInitialized() const{
00176     return IsInitialized_;
00177 }
00178
00179 KMatrix CameraParam::GetKMatrix() const {
00180   KMatrix K;
00181   K.SetIdentity();
00182   if (IsPerspective()) {
00183     K[0][0] = GetFocalLength();
00184     K[1][1] = aspectratio_ * GetFocalLength();
00185     K[0][1] = 0; //skew_;
00186     K[0][2] = principalX_;
00187     K[1][2] = principalY_;
00188   } else {
00189     BIASERR("No perspective camera-> No K-Matrix!");
00190   }
00191   return K;
00192 }
00193
00194
00195 void CameraParam::SetPrincipal(double x, double y) {
00196   principalX_ = x;
00197   principalY_ = y;
00198 }
00199
00200 double CameraParam::GetPrincipalX() const {
00201   if (!IsInitialized_){
00202     BIASERR("Not inited!");
00203     return 0;
00204   }
00205   //  cout<<"Get PrincipalX returns: "<<principalX_/downsamplingFactor_+0.000000001<<endl;
00206   return principalX_/downsamplingFactor_+0.000000001;
00207 }
00208
00209 double CameraParam::GetPrincipalY() const {
00210   if (!IsInitialized_){
00211     BIASERR("Not inited!");
00212     return 0;
00213   }
00214   //  cout<<"Get PrincipalY returns: "<<principalY_/downsamplingFactor_+0.000000001<<endl;
00215   return principalY_/downsamplingFactor_+0.000000001;
00216 }
00217
00218 unsigned int CameraParam::GetHeight() const {
00219   if (!IsInitialized_){
00220     BIASERR("Not inited!");
00221     return 0;
00222   }
00223   return (int)(height_/downsamplingFactor_+0.000000001);
00224 }
00225
00226 unsigned int CameraParam::GetWidth() const {
00227   if (!IsInitialized_){
00228     BIASERR("Not inited!");
00229     return 0;
00230   }
00231   return (int)(width_/downsamplingFactor_+0.000000001);
00232 }
00233
00234 void CameraParam::SetCellSize(const double CellSizeX,
00235                               const double AspectRatio) {
00236   cellSizeX_ = CellSizeX;
00237   if (AspectRatio!=0) {
00238     cellSizeY_ = CellSizeX / AspectRatio;
00239     aspectratio_ = AspectRatio;
00240   } else {
00241     cellSizeY_ = CellSizeX;
00242     aspectratio_ = 1;
00243   }
00244 }
00245
00246 void CameraParam::SetZoomCamera(const bool zoomCam) {
00247   zoomCamera_=zoomCam;
00248 }
00249
00250
00251 bool CameraParam::IsZoomCamera() const  {
00252   if (!IsInitialized_){
00253     BIASERR("Not inited!");
00254     return false;
00255   }
00256   return zoomCamera_;
00257 }
00258
00259 double CameraParam::GetZoom() const {
00260   if (!IsInitialized_){
00261     BIASERR("Not inited!");
00262     return -1;
00263   }
00264   if (IsPerspective()) {
00265     if (zoomCamera_) {
00266       return zoom_;
00267     }
00268     return 0;
00269   } else {
00270     BIASERR("No perspective camera!");
00271     return -1;
00272   }
00273 }
00274
00275 double CameraParam::GetFocalLength() const {
00276   if (!IsInitialized_){
00277     BIASERR("Not inited!");
00278     return -1;
00279   }
00280   if (IsPerspective()) {
00281     if (zoomCamera_) {
00282       return focallengthZoom_/downsamplingFactor_+0.000000001;
00283     }
00284     return focallengthDef_/downsamplingFactor_+0.000000001;
00285   } else {
00286     BIASERR("No perspective camera!");
00287     return -1;
00288   }
00289 }
00290
00291
00292 double CameraParam::GetDownsamplingFactor(){
00293   if (!IsInitialized_){
00294     BIASERR("Not inited!");
00295     return -1.0;
00296   }
00297   return downsamplingFactor_;
00298 }
00299
00300 void CameraParam::SetZoom(const double abszoom){
00301   if (!IsInitialized_){
00302     BIASERR("Not inited!");
00303     return;
00304   }
00305   if (zoomCamera_ && IsPerspective()) {
00306     zoom_=abszoom;
00307     focallengthZoom_ = InterpolateFocalLength_();
00308     cout << "interpolating zoom:" << abszoom << " to: " <<
00309       focallengthZoom_ << endl;
00310   } else {
00311     BIASERR("No perspective/zoom camera!");
00312     return;
00313   }
00314 }
00315
00316
00317 void CameraParam::SetFocalLength(const double focallength){
00318   if (!IsInitialized_){
00319     BIASERR("Not inited!");
00320     return;
00321   }
00322   if (IsPerspective())
00323       if (zoomCamera_){
00324           focallengthZoom_=focallength;
00325           zoom_=InterpolateAbsZoom_();
00326       }
00327       else
00328           focallengthDef_ = focallength;
00329   else
00330     BIASERR("No perspective camera!");
00331 }
00332
00333 void CameraParam::SetDownsampling(const double factor) {
00334   downsamplingFactor_ = factor;
00335 }
00336
00337 void CameraParam::SetUnzoomed(){
00338   if (!IsInitialized_){
00339     BIASERR("Not inited!");
00340     return;
00341   }
00342   if (zoomCamera_ && IsPerspective()) {
00343     if (focallengthDef_==0) {
00344       zoom_=knownparams_vect_[0].zoom;
00345       focallengthZoom_=knownparams_vect_[0].focallength;
00346     } else {
00347       zoom_=0;
00348       focallengthZoom_=focallengthDef_;
00349     }
00350   }
00351 }
00352
00353
00354 #ifdef BIAS_HAVE_XML2
00355 int CameraParam::WriteCameraData(const std::string& Filename) const {
00356
00357   if (!IsInitialized_){
00358     BIASERR("Not inited!");
00359     return -1;
00360   }
00361
00362   XMLIO myXML;
00363   xmlNodePtr rootNode;
00364   rootNode = myXML.create("camera");
00365   myXML.addAttribute(rootNode, "version",
00366                      CAMERA_PARAMETER_CURRENT_XML_VERSION);
00367   //  myXML.addAttribute(rootNode, "name", CamModel_);
00368   AddCameraDataToXMLTree(myXML, rootNode);
00369   myXML.write(Filename);
00370   return 0;
00371
00372 }
00373 #endif //BIAS_HAVE_XML2
00374
00375
00376 #ifdef BIAS_HAVE_XML2
00377 int CameraParam::AddCameraDataToRig(XMLIO &myXML,
00378                                     xmlNodePtr &cameraDataNode) const {
00379
00380   if (!IsInitialized_){
00381     BIASERR("Not inited!");
00382     return -1;
00383   }
00384   xmlNodePtr childNode;
00385   childNode = myXML.addChildNode(cameraDataNode, "camera");
00386   myXML.addAttribute(childNode, "version",
00387       std::string("2.0") );
00388   //  myXML.addAttribute(childNode, "name", CamModel_);
00389   AddCameraDataToXMLTree(myXML, childNode);
00390   return 0;
00391
00392 }
00393 #endif //BIAS_HAVE_XML2
00394
00395
00396 #ifdef BIAS_HAVE_XML2
00397 int CameraParam::AddCameraDataToXMLTree(XMLIO &myXML,
00398                                        xmlNodePtr &rootNode) const {
00399
00400
00401   if (!IsInitialized_){
00402     BIASERR("Not inited!");
00403     return -1;
00404   }
00405
00406   unsigned int i;
00407   xmlNodePtr  childNode2, childNode3, childNode4;
00408   myXML.addComment(rootNode, "\"Model\" is an arbitrary camera name.\n \"SerialID\" is i.e. the camera firewire-bus ID.\n \"ImageWidth\" and \"ImageHeight\" are in pixel.\n \"CellSizeX\" is the size of one CCD-cell in meter.\n \"AspectRatio\" is CellsizeX/CellSizeY (same as FocalLengthY/FocalLengthX).");
00409   childNode2 = myXML.addChildNode(rootNode, "Sensor");
00410   myXML.addAttribute(childNode2, "Model", CamModel_ );
00411   myXML.addAttribute(childNode2, "SerialID", CamID_);
00412   myXML.addAttribute(childNode2, "ImageWidth", (int) width_);
00413   myXML.addAttribute(childNode2, "ImageHeight", (int) height_);
00414   myXML.addAttribute(childNode2, "CellSizeX", cellSizeX_);
00415   myXML.addAttribute(childNode2, "AspectRatio", aspectratio_);
00416   myXML.addComment(rootNode, "\"Model\" is an arbitrary name.\n \"Type\" can be either \"Spherical\" or \"Perspective\"");
00417   childNode2 = myXML.addChildNode(rootNode, "Lens");
00418   myXML.addAttribute(childNode2, "Model", LensModel_ );
00419   string LensType="";
00420   if (LensIsSpherical_) {
00421     LensType="Spherical";
00422   } else {
00423     LensType="Perspective";
00424   }
00425   myXML.addAttribute(childNode2, "Type", LensType);
00426   if (LensIsSpherical_) {
00427     childNode3 = myXML.addChildNode(childNode2, "AngleCalib");
00428     myXML.addComment(childNode3, "Measurement points of angle calibration curve.\n \"AngRay\" is the angle of the viewing ray, \"AngDeformed\" is the Angle deformed by the camera.\n The maximium \"AngRay\" is the cameras FoV.");
00429     for (i=0; i<AngleCorrX_.size(); i++) {
00430       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00431       myXML.addAttribute(childNode4, "AngRay", AngleCorrX_[i]);
00432       myXML.addAttribute(childNode4, "AngDeformed", AngleCorrY_[i]);
00433     }
00434   } else {
00435     childNode3 = myXML.addChildNode(childNode2, "PerspectiveCalib");
00436     myXML.addComment(childNode3, "\"FocalLength\" is FocalLengthX in meters, if you want to give it in pixel set \"CellSizeX\"=1.\n\"k1\" and \"k2\" are radial distortion; \"p1\", \"p2\" are tangential distortion.\n Camera calibration constants coming from the matlab toolbox 'http://www.vision.caltech.edu/bouguetj/calib_doc/'.\n Distortion is calculated as x'=x*(1+k1*r^2+k2*r^4)+2*p1*x*y+p2*(r^2+2*x^2) and y'=y*(1+k1*r^2+k2*r^4)+2*p1*(r^2+2*y^2)+2*p2*x*y with r^2=(x^2+y^2).");
00437     if (focallengthDef_!=0) {
00438       childNode4 = myXML.addChildNode(childNode3, "Default");
00439       //convert to mm
00440       double fl = focallengthDef_ * cellSizeX_;
00441       myXML.addAttribute(childNode4, "FocalLength", fl);
00442       myXML.addAttribute(childNode4, "k1", kc1Def_);
00443       myXML.addAttribute(childNode4, "k2", kc2Def_);
00444       myXML.addAttribute(childNode4, "p1", kc3Def_);
00445       myXML.addAttribute(childNode4, "p2", kc4Def_);
00446     }
00447     for (i=0; i<knownparams_vect_.size(); i++) {
00448       childNode4 = myXML.addChildNode(childNode3, "ZoomStep");
00449       myXML.addAttribute(childNode4, "Zoom", knownparams_vect_[i].zoom);
00450       //convert to mm
00451       double fl = knownparams_vect_[i].focallength * cellSizeX_;
00452       myXML.addAttribute(childNode4, "FocalLength", fl);
00453   //       myXML.addComment(childNode2,"Focal length in meter, if you want to use the pixel value set pixelSpacing to 1.");
00454     myXML.addAttribute(childNode4, "k1", knownparams_vect_[i].kc1);
00455       myXML.addAttribute(childNode4, "k2", knownparams_vect_[i].kc2);
00456       myXML.addAttribute(childNode4, "p1", knownparams_vect_[i].kc3);
00457       myXML.addAttribute(childNode4, "p2", knownparams_vect_[i].kc4);
00458     }
00459   }
00460   childNode3 = myXML.addChildNode(childNode2, "VignetteCalib");
00461   if (LensIsSpherical_) {
00462     myXML.addComment(childNode3, "The measurements for vignette calibration relate the angle of the viewing ray to an absorbtion factor for the corresponding image pixels.");
00463     for (i=0; i<IlluCorrX_.size(); i++) {
00464       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00465       myXML.addAttribute(childNode4, "AngRay", IlluCorrX_[i]);
00466       myXML.addAttribute(childNode4, "Fac", IlluCorrY_[i]);
00467     }
00468   } else {
00469     myXML.addComment(childNode3, "The measurements for vignette calibration relate the distance of a pixel from the image principal point to an absorbtion factor for the corresponding image pixels.");
00470     for (i=0; i<IlluCorrX_.size(); i++) {
00471       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00472       myXML.addAttribute(childNode4, "Dist", IlluCorrX_[i]);
00473       myXML.addAttribute(childNode4, "Fac", IlluCorrY_[i]);
00474     }
00475   }
00476
00477   myXML.addComment(rootNode, "The \"PrincipalPoint\" is given as a fraction of \"ImageWidth\"/\"ImageHeight\" with (0.5,0.5) is the image center.");
00478   childNode2 = myXML.addChildNode(rootNode, "PrincipalPoint");
00479   myXML.addAttribute(childNode2, "X", principalX_/width_);
00480   myXML.addAttribute(childNode2, "Y", principalY_/height_);
00481   if (LensIsSpherical_) {
00482     myXML.addComment(childNode2, "The \"SphereRadius\" is given as a fraction of \"ImageWidth\".");
00483     myXML.addAttribute(childNode2, "SphereRadius", radius_/width_);
00484   }
00485
00486   return 0;
00487
00488
00489  //   unsigned int i;
00490 //   xmlNodePtr  childNode2, childNode3, childNode4, childNode5, childNode6;
00491 //   myXML.addComment(rootNode,"e.g. ID from the firewire-bus");
00492 //   childNode2 = myXML.addChildNode(rootNode, "id");
00493 //   myXML.addContent(childNode2, CamID_);
00494
00495 //   childNode2 = myXML.addChildNode(rootNode, "sensor");
00496
00497 //   childNode3 = myXML.addChildNode(childNode2, "numberOfPixels");
00498 //   childNode4 = myXML.addChildNode(childNode3, "x");
00499 //   myXML.addContent(childNode4, (int)width_);
00500 //   childNode4 = myXML.addChildNode(childNode3, "y");
00501 //   myXML.addContent(childNode4, (int)height_);
00502 //   childNode3 = myXML.addChildNode(childNode2, "pixelSpacing");
00503 //   myXML.addComment(childNode3,"Size of the CCD-pixels in meter, if x and y differ, the aspect ratio is set to x/y.");
00504 //   childNode4 = myXML.addChildNode(childNode3, "x");
00505 //   myXML.addContent(childNode4, cellSizeX_);
00506 //   childNode4 = myXML.addChildNode(childNode3, "y");
00507 //   myXML.addContent(childNode4, cellSizeY_);
00508 //   childNode3 = myXML.addChildNode(childNode2, "principalPoint");
00509 //   myXML.addComment(childNode3,"Principal point relative to image center in meter.");
00510 //   // convert to meter
00511 //   double px = (principalX_-width_/2.0) * cellSizeX_;
00512 //   double py = (principalY_-height_/2.0) * cellSizeY_;
00513 //   childNode4 = myXML.addChildNode(childNode3, "x");
00514 //   myXML.addContent(childNode4, px);
00515 //   childNode4 = myXML.addChildNode(childNode3, "y");
00516 //   myXML.addContent(childNode4, py);
00517
00518 //   if (LensIsSpherical_) {
00519 //     childNode2 = myXML.addChildNode(rootNode, "sphericalLens");
00520 //     myXML.addAttribute(childNode2, "name", LensModel_);
00521 //     childNode3 = myXML.addChildNode(childNode2, "angleCalibration");
00522 //     for (i=0; i<AngleCorrX_.size(); i++) {
00523 //       childNode4 = myXML.addChildNode(childNode3, "measPoint");
00524 //       childNode5 = myXML.addChildNode(childNode4, "angleRay");
00525 //       myXML.addContent(childNode5, AngleCorrX_[i]);
00526 //       childNode5 = myXML.addChildNode(childNode4, "angleDeformed");
00527 //       myXML.addContent(childNode5, AngleCorrY_[i]);
00528 //     }
00529 //     childNode3 = myXML.addChildNode(childNode2, "vignetteCalibration");
00530 //     for (i=0; i<IlluCorrX_.size(); i++) {
00531 //       childNode4 = myXML.addChildNode(childNode3, "measPoint");
00532 //       childNode5 = myXML.addChildNode(childNode4, "angleRay");
00533 //       myXML.addContent(childNode5, IlluCorrX_[i]);
00534 //       childNode5 = myXML.addChildNode(childNode4, "factor");
00535 //       myXML.addContent(childNode5, IlluCorrY_[i]);
00536 //     }
00537 //     childNode3 = myXML.addChildNode(childNode2, "sphereRadius");
00538 //     myXML.addContent(childNode3, radius_);
00539 //   } else {
00540 //     if (knownparams_vect_.size()==0) {
00541 //       childNode2 = myXML.addChildNode(rootNode, "lens");
00542 //       myXML.addAttribute(childNode2, "name", LensModel_);
00543 //       myXML.addComment(childNode2,"Focal length in meter, if you want to use the pixel value set pixelSpacing to 1.");
00544 //       childNode3 = myXML.addChildNode(childNode2, "focalLength");
00545
00546 //       //convert to Pixel
00547 //       double fl = focallengthDef_ * cellSizeX_;
00548 //       myXML.addContent(childNode3, fl);
00549 //       childNode3 = myXML.addChildNode(childNode2, "distortion");
00550 //       myXML.addComment(childNode3,"Distortion is calculated as x'=x*(1+k1*r^2+k2*r^4)+2*p1*x*y+p2*(r^2+2*x^2) and y'=y*(1+k1*r^2+k2*r^4)+2*p1*(r^2+2*y^2)+2*p2*x*y with r^2=(x^2+y^2)");
00551 //       childNode4 = myXML.addChildNode(childNode3, "radial");
00552 //       childNode5 = myXML.addChildNode(childNode4, "k1");
00553 //       myXML.addContent(childNode5, kc1Def_);
00554 //       childNode5 = myXML.addChildNode(childNode4, "k2");
00555 //       myXML.addContent(childNode5, kc2Def_);
00556 //       childNode4 = myXML.addChildNode(childNode3, "tangential");
00557 //       childNode5 = myXML.addChildNode(childNode4, "p1");
00558 //       myXML.addContent(childNode5, kc3Def_);
00559 //       childNode5 = myXML.addChildNode(childNode4, "p2");
00560 //       myXML.addContent(childNode5, kc4Def_);
00561 //     } else {
00562 //       childNode2 = myXML.addChildNode(rootNode, "zoomLens");
00563 //       myXML.addAttribute(childNode2, "name", LensModel_);
00564 //       for (i=0; i<knownparams_vect_.size(); i++) {
00565 //         childNode3 = myXML.addChildNode(childNode2, "zoomStep");
00566 //         childNode4 = myXML.addChildNode(childNode3, "zoom");
00567 //         myXML.addContent(childNode4, knownparams_vect_[i].zoom);
00568 //         childNode4 = myXML.addChildNode(childNode3, "focalLength");
00569 //         //convert to Pixel
00570 //         double fl = knownparams_vect_[i].focallength * cellSizeX_;
00571 //         myXML.addContent(childNode4, fl);
00572 //         childNode4 = myXML.addChildNode(childNode3, "distortion");
00573 //         if (i==0) {
00574 //           myXML.addComment(childNode4,"Distortion is calculated as x'=x*(1+k1*r^2+k2*r^4)+2*p1*x*y+p2*(r^2+2*x^2) and y'=y*(1+k1*r^2+k2*r^4)+2*p1*(r^2+2*y^2)+2*p2*x*y with r^2=(x^2+y^2)");
00575 //         }
00576 //         childNode5 = myXML.addChildNode(childNode4, "radial");
00577 //         childNode6 = myXML.addChildNode(childNode5, "k1");
00578 //         myXML.addContent(childNode6, knownparams_vect_[i].kc1);
00579 //         childNode6 = myXML.addChildNode(childNode5, "k2");
00580 //         myXML.addContent(childNode6, knownparams_vect_[i].kc2);
00581 //         childNode5 = myXML.addChildNode(childNode4, "tangential");
00582 //         childNode6 = myXML.addChildNode(childNode5, "p1");
00583 //         myXML.addContent(childNode6, knownparams_vect_[i].kc3);
00584 //         childNode6 = myXML.addChildNode(childNode5, "p2");
00585 //         myXML.addContent(childNode6, knownparams_vect_[i].kc4);
00586 //       }
00587 //     }
00588  //    myXML.addComment(childNode2,"Used only for BBC software.");
00589 //     childNode3 = myXML.addChildNode(childNode2, "iris");
00590 //     myXML.addContent(childNode3, iris_);
00591 //     myXML.addComment(childNode2,"Used only for BBC software.");
00592 //     childNode3 = myXML.addChildNode(childNode2, "reciprocalFocus");
00593 //     myXML.addContent(childNode3, reciprocalFocus_);
00594 //  }
00595 //   myXML.addComment(rootNode,"Used only for BBC software.");
00596 //   childNode2 = myXML.addChildNode(rootNode, "exposureTime");
00597 //   myXML.addContent(childNode2, exposureTime_);
00598 //  return 0;
00599 }
00600 #endif //BIAS_HAVE_XML2
00601
00602
00603 #ifdef BIAS_HAVE_XML2
00604 int CameraParam::ReadCameraData(const std::string& Filename) {
00605
00606   XMLIO myXML;
00607   xmlNodePtr rootNode;
00608   rootNode = myXML.read(Filename);
00609   if (rootNode==NULL) {
00610     BIASERR("Camera-Parameter-File not found or parse error: " << Filename);
00611     return -1;
00612   }
00613
00614   if (myXML.getNodeName(rootNode)!="camera" &&
00615       myXML.getNodeName(rootNode)!="Camera") {
00616     BIASERR("Root node has to be \"camera\"");
00617     return -1;
00618   }
00619   ReadCameraData (myXML, rootNode);
00620
00621   return 0;
00622 }
00623 #endif //BIAS_HAVE_XML2
00624
00625
00626 #ifdef BIAS_HAVE_XML2
00627
00628 int CameraParam::ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode) {
00629
00630   //reset this
00631   Init();
00632   double vers = 0;
00633
00634   vers = myXML.getAttributeValueDouble(cameraNode, "Version");
00635   if (vers==0) {
00636     vers = myXML.getAttributeValueDouble(cameraNode, "version");
00637   }
00638   if (vers!=CAMERA_PARAMETER_CURRENT_XML_VERSION) {
00639     BIASWARN("Camera-Parameter Version (" << vers << ") is Deprecated, "
00640              << "current version is " << CAMERA_PARAMETER_CURRENT_XML_VERSION);
00641     if (vers==0.8) {
00642       ReadCameraDataV0_8(myXML, cameraNode);
00643       return 0;
00644     } else {
00645       if (vers==1.0) {
00646         ReadCameraDataV1_0(myXML, cameraNode);
00647         return 0;
00648       } else {
00649         return -1;
00650       }
00651     }
00652   }
00653
00654   xmlNodePtr  childNode2, childNode3, childNode4;
00655
00656   childNode2 = myXML.getChild(cameraNode, "Sensor");
00657   if (childNode2!=NULL) {
00658     CamModel_ = myXML.getAttributeValueString(childNode2, "Model");
00659     CamID_ = myXML.getAttributeValueInt(childNode2, "SerialID");
00660     width_ = myXML.getAttributeValueInt(childNode2, "ImageWidth");
00661     height_ = myXML.getAttributeValueInt(childNode2, "ImageHeight");
00662     if (CamModel_=="" || CamID_==0 || width_==0 || height_==0) {
00663       BIASERR("Sensor-data incomplete. Camera Model=" << CamModel_
00664               << ", Camera Serial=" << CamID_
00665               << ", Image Width=" << width_
00666               << ", Image Height" << height_);
00667       return -1;
00668     }
00669     cellSizeX_ = myXML.getAttributeValueDouble(childNode2, "CellSizeX");
00670     aspectratio_ = myXML.getAttributeValueDouble(childNode2, "AspectRatio");
00671     if (cellSizeX_==0 || aspectratio_==0) {
00672       aspectratio_=1;
00673       cellSizeX_=1;
00674       cellSizeY_=1;
00675     } else {
00676      cellSizeY_ = cellSizeX_ / aspectratio_;
00677     }
00678   } else {
00679     BIASERR("Node \"Sensor\" missing.");
00680     return -1;
00681   }
00682
00683   childNode2 = myXML.getChild(cameraNode, "Lens");
00684   if (childNode2==NULL) {
00685     BIASERR("Node \"Lens\" missing.");
00686     return -1;
00687   }
00688
00689   LensModel_ = myXML.getAttributeValueString(childNode2, "Model");
00690   string LensType = myXML.getAttributeValueString(childNode2, "Type");
00691
00692   if (LensType!="Spherical" && LensType!="Perspective") {
00693     BIASERR("Unknown Lens-Type, has to be \"Spherical\" or \"Perspective\".");
00694     return -1;
00695   }
00696   if (LensType=="Spherical") {
00697     LensIsSpherical_ = true;
00698     zoomCamera_=false;
00699     childNode3 = myXML.getChild(childNode2, "AngleCalib");
00700     if (childNode3==NULL) {
00701       BIASERR("Node \"AngleCalib\" missing.");
00702       return -1;
00703     }
00704     childNode4 = myXML.getFirstChild(childNode3);
00705     if (childNode4 == NULL) {
00706       BIASERR("No angle calibration measurement points.");
00707       return -1;
00708     }  else {
00709       do {
00710         if (myXML.getNodeName(childNode4)=="MeasPt") {
00711           // TODO: Write these into SphereParameters class
00712           double x,y;
00713           x = myXML.getAttributeValueDouble(childNode4, "AngRay");
00714           y = myXML.getAttributeValueDouble(childNode4, "AngDeformed");
00715           AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
00716         }
00717         childNode4 = myXML.getNextChild();
00718       } while (childNode4!=NULL);
00719       if (AngleCorrX_.size()>0)
00720         MaxCamAngle_ = AngleCorrX_[AngleCorrX_.size()-1];
00721       else
00722         MaxCamAngle_ = 0;
00723     }
00724   }
00725   if (LensType=="Perspective") {
00726     LensIsSpherical_ = false;
00727     zoomCamera_=false;
00728     childNode3 = myXML.getChild(childNode2, "PerspectiveCalib");
00729     if (childNode3 != NULL) {
00730       childNode4 = myXML.getFirstChild(childNode3);
00731       if (childNode4 != NULL) {
00732         do {
00733           if (myXML.getNodeName(childNode4)=="Default") {
00734             focallengthDef_ =
00735               myXML.getAttributeValueDouble(childNode4, "FocalLength");
00736             //convert to Pixel
00737             if (cellSizeX_!=1) {
00738               focallengthDef_ = focallengthDef_ / cellSizeX_;
00739             }
00740             kc1Def_ = myXML.getAttributeValueDouble(childNode4, "k1");
00741             kc2Def_ = myXML.getAttributeValueDouble(childNode4, "k2");
00742             kc3Def_ = myXML.getAttributeValueDouble(childNode4, "p1");
00743             kc4Def_ = myXML.getAttributeValueDouble(childNode4, "p2");
00744           }
00745           if (myXML.getNodeName(childNode4)=="ZoomStep") {
00746             CPDiscreteParam dp;
00747             dp.zoom=myXML.getAttributeValueDouble(childNode4, "Zoom");
00748             dp.focallength=myXML.getAttributeValueDouble(childNode4,
00749                                                          "FocalLength");
00750              //convert to Pixel
00751             if (cellSizeX_!=1) {
00752               dp.focallength = dp.focallength / cellSizeX_;
00753             }
00754             dp.kc1=myXML.getAttributeValueDouble(childNode4, "k1");
00755             dp.kc2=myXML.getAttributeValueDouble(childNode4, "k2");
00756             dp.kc3=myXML.getAttributeValueDouble(childNode4, "p1");
00757             dp.kc4=myXML.getAttributeValueDouble(childNode4, "p2");
00758             knownparams_vect_.push_back(dp);
00759             zoomCamera_=true;
00760           }
00761           childNode4 = myXML.getNextChild();
00762         } while (childNode4!=NULL);
00763         if (knownparams_vect_.size()>0 &&
00764             focallengthDef_==0) {
00765             focallengthDef_ = knownparams_vect_[0].focallength;
00766             kc1Def_ = knownparams_vect_[0].kc1;
00767             kc2Def_ = knownparams_vect_[0].kc2;
00768             kc3Def_ = knownparams_vect_[0].kc3;
00769             kc4Def_ = knownparams_vect_[0].kc4;
00770         }
00771       }
00772     }
00773   }
00774
00775   childNode3 = myXML.getChild(childNode2, "VignetteCalib");
00776   if (childNode3 != NULL) {
00777     childNode4 = myXML.getFirstChild(childNode3);
00778     if (childNode4 != NULL) {
00779       do {
00780         if (myXML.getNodeName(childNode4)=="MeasPt") {
00781           // TODO: Write these into SphereParameters & cameradata class
00782           double x,y;
00783           if (LensIsSpherical_) {
00784             x = myXML.getAttributeValueDouble(childNode4, "AngRay");
00785           } else {
00786             x = myXML.getAttributeValueDouble(childNode4, "Dist");
00787           }
00788           y = myXML.getAttributeValueDouble(childNode4, "Fac");
00789           IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
00790         }
00791         childNode4 = myXML.getNextChild();
00792       } while (childNode4!=NULL);
00793     }
00794   }
00795
00796   childNode2 = myXML.getChild(cameraNode, "PrincipalPoint");
00797   if (childNode2 != NULL) {
00798     principalX_ = myXML.getAttributeValueDouble(childNode2, "X");
00799     principalX_ = width_ * principalX_;
00800     principalY_ = myXML.getAttributeValueDouble(childNode2, "Y");
00801     principalY_ = height_ * principalY_;
00802     if (LensIsSpherical_) {
00803       radius_ = myXML.getAttributeValueDouble(childNode2, "SphereRadius");
00804       radius_ = width_ * radius_;
00805     }
00806   } else {
00807     principalX_ = width_/2.0;
00808     principalY_ = height_/2.0;
00809     if (LensIsSpherical_) {
00810       radius_ = height_/2.0;
00811     }
00812   }
00813
00814   IsInitialized_=true;
00815   return 0;
00816
00817 }
00818
00819
00820 int CameraParam::ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode) {
00821
00822   //reset this
00823   Init();
00824   CamModel_ = myXML.getAttributeValueString(cameraNode, "name");
00825
00826   xmlNodePtr  childNode2, childNode3, childNode4, childNode5, childNode6;
00827
00828   childNode2 = myXML.getChild(cameraNode, "id");
00829   CamID_ = myXML.getNodeContentInt(childNode2);
00830   if ( CamID_==0 ) {
00831        BIASERR("Sensor-data incomplete. Camera ID must not be 0:" << CamID_);
00832       return -1;
00833     }
00834
00835   childNode2 = myXML.getChild(cameraNode, "sensor");
00836   if (childNode2!=NULL) {
00837     childNode3 = myXML.getChild(childNode2, "numberOfPixels");
00838     childNode4 = myXML.getChild(childNode3, "x");
00839     width_ = myXML.getNodeContentInt(childNode4);
00840     childNode4 = myXML.getChild(childNode3, "y");
00841     height_ = myXML.getNodeContentInt(childNode4);
00842     if ( width_==0 || height_==0) {
00843       BIASERR("Sensor-data incomplete. Camera ID=" << CamID_
00844               << ", Image Width= " << width_
00845               << ", Image Height= " << height_);
00846       return -1;
00847     }
00848
00849     childNode3 = myXML.getChild(childNode2, "pixelSpacing");
00850     childNode4 = myXML.getChild(childNode3, "x");
00851     cellSizeX_ = myXML.getNodeContentDouble(childNode4);
00852     childNode4 = myXML.getChild(childNode3, "y");
00853     cellSizeY_ = myXML.getNodeContentDouble(childNode4);
00854     if (cellSizeX_==0 || cellSizeY_==0) {
00855       aspectratio_=1;
00856       cellSizeX_=1;
00857       cellSizeY_=1;
00858     } else {
00859       aspectratio_ = cellSizeX_/cellSizeY_;
00860       cout <<"========== aspectratio: "<<aspectratio_<<endl;
00861     }
00862
00863     childNode3 = myXML.getChild(childNode2, "principalPoint");
00864     if (childNode3 != NULL) {
00865       childNode4 = myXML.getChild(childNode3, "x");
00866       principalX_ = myXML.getNodeContentDouble(childNode4);
00867       childNode4 = myXML.getChild(childNode3, "y");
00868       principalY_ = myXML.getNodeContentDouble(childNode4);
00869       //convert to Pixel
00870       principalX_ = width_/2.0  + principalX_/cellSizeX_;
00871       principalY_ = height_/2.0 + principalY_/cellSizeY_;
00872       //      cout<<"Principal point is: "<<principalX_<<","<<principalY_<<"in ReadDatav1.0"<<endl;
00873     } else {
00874       principalX_ = width_/2.0;
00875       principalY_ = height_/2.0;
00876       //  cout<<"Principal point is: "<<principalX_<<","<<principalY_<<"in ReadDatav1.0"<<endl;
00877     }
00878
00879   } else {
00880     BIASERR("Node \"sensor\" missing.");
00881     return -1;
00882   }
00883
00884   childNode2 = myXML.getChild(cameraNode, "lens");
00885   if (childNode2!=NULL) {
00886     LensIsSpherical_=false;
00887     zoomCamera_=false;
00888   } else {
00889     childNode2 = myXML.getChild(cameraNode, "zoomLens");
00890     if (childNode2!=NULL) {
00891       LensIsSpherical_=false;
00892       zoomCamera_=true;
00893     } else {
00894       childNode2 = myXML.getChild(cameraNode, "sphericalLens");
00895       if (childNode2!=NULL) {
00896         LensIsSpherical_=true;
00897         zoomCamera_=false;
00898       } else {
00899         BIASERR("Camera has no lens-, zoomLens- or sphericalLens-Tag");
00900         return -1;
00901       }
00902     }
00903   }
00904
00905   LensModel_ = myXML.getAttributeValueString(childNode2, "name");
00906
00907   if (LensIsSpherical_) {
00908
00909     zoomCamera_=false;
00910     childNode3 = myXML.getChild(childNode2, "angleCalibration");
00911     if (childNode3==NULL) {
00912       BIASERR("Node \"angleCalibration\" missing.");
00913       return -1;
00914     }
00915     childNode4 = myXML.getFirstChild(childNode3);
00916     if (childNode4 == NULL) {
00917       BIASERR("No angle calibration measurement points.");
00918       return -1;
00919     }  else {
00920       do {
00921         if (myXML.getNodeName(childNode4)=="measPoint") {
00922           double x,y;
00923           childNode5 = myXML.getChild(childNode4, "angleRay");
00924           x = myXML.getNodeContentDouble(childNode5);
00925           childNode5 = myXML.getChild(childNode4, "angleDeformed");
00926           y = myXML.getNodeContentDouble(childNode5);
00927           AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
00928         }
00929         childNode4 = myXML.getNextChild(childNode4);
00930       } while (childNode4!=NULL);
00931       if (AngleCorrX_.size()>0)
00932         MaxCamAngle_ = AngleCorrX_[AngleCorrX_.size()-1];
00933       else
00934         MaxCamAngle_ = 0;
00935     }
00936
00937     childNode3 = myXML.getChild(childNode2, "vignetteCalibration");
00938     if (childNode3 != NULL) {
00939       childNode4 = myXML.getFirstChild(childNode3);
00940       if (childNode4 != NULL) {
00941         do {
00942           if (myXML.getNodeName(childNode4)=="measPoint") {
00943             double x,y;
00944             childNode5 = myXML.getChild(childNode4, "angleRay");
00945             x = myXML.getNodeContentDouble(childNode5);
00946             childNode5 = myXML.getChild(childNode4, "factor");
00947             y = myXML.getNodeContentDouble(childNode5);
00948             IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
00949           }
00950           childNode4 = myXML.getNextChild(childNode4);
00951         } while (childNode4!=NULL);
00952       }
00953     }
00954
00955     childNode3 = myXML.getChild(childNode2, "sphereRadius");
00956     radius_ = myXML.getNodeContentDouble(childNode3);
00957     if (childNode3==NULL) {
00958       BIASERR("Sphere radius missing!");
00959       return -1;
00960     }
00961
00962   } else {  //  if (!LensIsSpherical_)
00963     if (!zoomCamera_) {
00964       childNode3 = myXML.getChild(childNode2, "focalLength");
00965       focallengthDef_ = myXML.getNodeContentDouble(childNode3);
00966       //convert to Pixel
00967       focallengthDef_ = focallengthDef_/cellSizeX_;
00968       childNode3 = myXML.getChild(childNode2, "distortion");
00969       childNode4 = myXML.getChild(childNode3, "radial");
00970       childNode5 = myXML.getChild(childNode4, "k1");
00971       kc1Def_ = myXML.getNodeContentDouble(childNode5);
00972       childNode5 = myXML.getChild(childNode4, "k2");
00973       kc2Def_ = myXML.getNodeContentDouble(childNode5);
00974       childNode4 = myXML.getChild(childNode3, "tangential");
00975       childNode5 = myXML.getChild(childNode4, "p1");
00976       kc3Def_ = myXML.getNodeContentDouble(childNode5);
00977       childNode5 = myXML.getChild(childNode4, "p2");
00978       kc4Def_ = myXML.getNodeContentDouble(childNode5);
00979     } else { // if (zoomCamera)
00980       childNode3 = myXML.getFirstChild(childNode2);
00981       if (childNode3 != NULL) {
00982         do {
00983           if (myXML.getNodeName(childNode3)=="zoomStep") {
00984             CPDiscreteParam dp;
00985             childNode4 = myXML.getChild(childNode3, "zoom");
00986             dp.zoom = myXML.getNodeContentDouble(childNode4);
00987             childNode4=myXML.getChild(childNode3, "focalLength");
00988             dp.focallength = myXML.getNodeContentDouble(childNode4);
00989              //convert to Pixel
00990             dp.focallength = dp.focallength/cellSizeX_;
00991             childNode4=myXML.getChild(childNode3, "distortion");
00992             childNode5=myXML.getChild(childNode4, "radial");
00993             childNode6=myXML.getChild(childNode5, "k1");
00994             dp.kc1 = myXML.getNodeContentDouble(childNode6);
00995             childNode6=myXML.getChild(childNode5, "k2");
00996             dp.kc2 = myXML.getNodeContentDouble(childNode6);
00997             childNode5=myXML.getChild(childNode4, "tangential");
00998             childNode6=myXML.getChild(childNode5, "p1");
00999             dp.kc3 = myXML.getNodeContentDouble(childNode6);
01000             childNode6=myXML.getChild(childNode5, "p2");
01001             dp.kc4 = myXML.getNodeContentDouble(childNode6);
01002             knownparams_vect_.push_back(dp);
01003           }
01004           if (myXML.getNodeName(childNode3)=="defaultZoom") {
01005             BIASERR("defaultZoom is deprecated and has no effect, use different param-file version");
01006           }
01007           childNode3 = myXML.getNextChild(childNode3);
01008         } while (childNode3!=NULL);
01009         if (knownparams_vect_.size()>0) {
01010           focallengthDef_ = knownparams_vect_[0].focallength;
01011           kc1Def_ = knownparams_vect_[0].kc1;
01012           kc2Def_ = knownparams_vect_[0].kc2;
01013           kc3Def_ = knownparams_vect_[0].kc3;
01014           kc4Def_ = knownparams_vect_[0].kc4;
01015         }
01016       }
01017     }
01018   }
01019   IsInitialized_=true;
01020   return 0;
01021 }
01022 #endif //BIAS_HAVE_XML2
01023
01024
01025 #ifdef BIAS_HAVE_XML2
01026 int CameraParam::ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode) {
01027
01028   //reset this
01029   Init();
01030
01031   xmlNodePtr  childNode2, childNode3, childNode4;
01032
01033   childNode2 = myXML.getChild(cameraNode, "Sensor");
01034   if (childNode2!=NULL) {
01035     CamModel_ = myXML.getAttributeValueString(childNode2, "Model");
01036     CamID_ = myXML.getAttributeValueInt(childNode2, "SerialID");
01037     width_ = myXML.getAttributeValueInt(childNode2, "ImageWidth");
01038     height_ = myXML.getAttributeValueInt(childNode2, "ImageHeight");
01039     if (CamModel_=="" || CamID_==0 || width_==0 || height_==0) {
01040       BIASERR("Sensor-data incomplete. Camera Model=" << CamModel_
01041               << ", Camera Serial=" << CamID_
01042               << ", Image Width=" << width_
01043               << ", Image Height" << height_);
01044       return -1;
01045     }
01046     cellSizeX_ = myXML.getAttributeValueDouble(childNode2, "CellSizeInMicrX");
01047     cellSizeY_ = myXML.getAttributeValueDouble(childNode2, "CellSizeInMicrY");
01048     if (cellSizeX_>100 ||cellSizeY_>100) {
01049       cellSizeX_ /= 1000.0;
01050       cellSizeY_ /= 1000.0;
01051     } else {
01052       cellSizeX_ /= 1000000.0;
01053       cellSizeY_ /= 1000000.0;
01054     }
01055     if (cellSizeX_==0 || cellSizeY_==0) {
01056       aspectratio_=1;
01057       cellSizeX_=1;
01058       cellSizeY_=1;
01059     } else {
01060       aspectratio_ = cellSizeX_/cellSizeY_;
01061     }
01062   } else {
01063     BIASERR("Node \"Sensor\" missing.");
01064     return -1;
01065   }
01066
01067   childNode2 = myXML.getChild(cameraNode, "Lens");
01068   if (childNode2==NULL) {
01069     BIASERR("Node \"Lens\" missing.");
01070     return -1;
01071   }
01072
01073   LensModel_ = myXML.getAttributeValueString(childNode2, "Model");
01074   string LensType = myXML.getAttributeValueString(childNode2, "Type");
01075
01076   if (LensType!="Spherical" && LensType!="Perspective") {
01077     BIASERR("Unknown Lens-Type, has to be \"Spherical\" or \"Perspective\".");
01078     return -1;
01079   }
01080   if (LensType=="Spherical") {
01081     LensIsSpherical_ = true;
01082     zoomCamera_=false;
01083     childNode3 = myXML.getChild(childNode2, "AngleCalib");
01084     if (childNode3==NULL) {
01085       BIASERR("Node \"AngleCalib\" missing.");
01086       return -1;
01087     }
01088     childNode4 = myXML.getFirstChild(childNode3);
01089     if (childNode4 == NULL) {
01090       BIASERR("No angle calibration measurement points.");
01091       return -1;
01092     }  else {
01093       do {
01094         if (myXML.getNodeName(childNode4)=="MeasPt") {
01095           // TODO: Write these into SphereParameters class
01096           double x,y;
01097           x = myXML.getAttributeValueDouble(childNode4, "AngRay");
01098           y = myXML.getAttributeValueDouble(childNode4, "AngDeformed");
01099           AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01100         }
01101         childNode4 = myXML.getNextChild();
01102       } while (childNode4!=NULL);
01103       if (AngleCorrX_.size()>0)
01104         MaxCamAngle_ = AngleCorrX_[AngleCorrX_.size()-1];
01105       else
01106         MaxCamAngle_ = 0;
01107     }
01108   }
01109   if (LensType=="Perspective") {
01110     LensIsSpherical_ = false;
01111     zoomCamera_=false;
01112     childNode3 = myXML.getChild(childNode2, "PerspectiveCalib");
01113     if (childNode3 != NULL) {
01114       childNode4 = myXML.getFirstChild(childNode3);
01115       if (childNode4 != NULL) {
01116         do {
01117           if (myXML.getNodeName(childNode4)=="Default") {
01118             focallengthDef_ =
01119               myXML.getAttributeValueDouble(childNode4, "FocalLengthInMM");
01120             //convert to Pixel
01121             if (cellSizeX_!=1) {
01122               focallengthDef_ = focallengthDef_/1000.0 / cellSizeX_;
01123             }
01124             kc1Def_ = myXML.getAttributeValueDouble(childNode4, "KC1");
01125             kc2Def_ = myXML.getAttributeValueDouble(childNode4, "KC2");
01126             kc3Def_ = myXML.getAttributeValueDouble(childNode4, "KC3");
01127             kc4Def_ = myXML.getAttributeValueDouble(childNode4, "KC4");
01128           }
01129           if (myXML.getNodeName(childNode4)=="ZoomStep") {
01130             CPDiscreteParam dp;
01131             dp.zoom=myXML.getAttributeValueDouble(childNode4, "Zoom");
01132             dp.focallength=myXML.getAttributeValueDouble(childNode4,
01133                                                          "FocalLengthInMM");
01134              //convert to Pixel
01135             if (cellSizeX_!=1) {
01136               dp.focallength = dp.focallength/1000.0 / cellSizeX_;
01137             }
01138             dp.kc1=myXML.getAttributeValueDouble(childNode4, "KC1");
01139             dp.kc2=myXML.getAttributeValueDouble(childNode4, "KC2");
01140             dp.kc3=myXML.getAttributeValueDouble(childNode4, "KC3");
01141             dp.kc4=myXML.getAttributeValueDouble(childNode4, "KC4");
01142             knownparams_vect_.push_back(dp);
01143             zoomCamera_=true;
01144           }
01145           childNode4 = myXML.getNextChild();
01146         } while (childNode4!=NULL);
01147         if (knownparams_vect_.size()>0 &&
01148             focallengthDef_==0) {
01149             focallengthDef_ = knownparams_vect_[0].focallength;
01150             kc1Def_ = knownparams_vect_[0].kc1;
01151             kc2Def_ = knownparams_vect_[0].kc2;
01152             kc3Def_ = knownparams_vect_[0].kc3;
01153             kc4Def_ = knownparams_vect_[0].kc4;
01154         }
01155       }
01156     }
01157   }
01158
01159   childNode3 = myXML.getChild(childNode2, "VignetteCalib");
01160   if (childNode3 != NULL) {
01161     childNode4 = myXML.getFirstChild(childNode3);
01162     if (childNode4 != NULL) {
01163       do {
01164         if (myXML.getNodeName(childNode4)=="MeasPt") {
01165           // TODO: Write these into SphereParameters & cameradata class
01166           double x,y;
01167           if (LensIsSpherical_) {
01168             x = myXML.getAttributeValueDouble(childNode4, "AngRay");
01169           } else {
01170             x = myXML.getAttributeValueDouble(childNode4, "Dist");
01171           }
01172           y = myXML.getAttributeValueDouble(childNode4, "Fac");
01173           IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01174         }
01175         childNode4 = myXML.getNextChild();
01176       } while (childNode4!=NULL);
01177     }
01178   }
01179
01180   childNode2 = myXML.getChild(cameraNode, "PrincipalPoint");
01181   if (childNode2 != NULL) {
01182     principalX_ = myXML.getAttributeValueDouble(childNode2, "X");
01183     principalY_ = myXML.getAttributeValueDouble(childNode2, "Y");
01184     if (LensIsSpherical_) {
01185       radius_ = myXML.getAttributeValueDouble(childNode2, "SphereRadius");
01186     }
01187   } else {
01188     principalX_ = width_/2.0;
01189     principalY_ = height_/2.0;
01190     if (LensIsSpherical_) {
01191       radius_ = height_/2.0;
01192     }
01193   }
01194
01195   IsInitialized_=true;
01196   return 0;
01197 }
01198 #endif //BIAS_HAVE_XML2
01199
01200 void CameraParam::InitSpherical(const string CamModel, const int CamID,
01201                                 const string LensModel,
01202                                 const int imgWidth, const int imgHeight,
01203                                 const double principalX,
01204                                 const double principalY,
01205                                 const double radius,
01206                                 const vector<double> &AngleCorrX,
01207                                 const vector<double> &AngleCorrY,
01208                                 const vector<double> &IlluCorrX,
01209                                 const vector<double> &IlluCorrY) {
01210
01211   //reset this
01212   Init();
01213   downsamplingFactor_=1;
01214
01215   CamModel_ = CamModel;
01216   CamID_ = CamID;
01217   LensModel_=LensModel;
01218
01219   width_  = imgWidth;
01220   height_ = imgHeight;
01221   principalX_ = principalX;
01222   principalY_ = principalY;
01223   radius_ = radius;
01224
01225   aspectratio_=1;
01226   cellSizeX_=1;
01227   cellSizeY_=1;
01228   LensIsSpherical_ = true;
01229   zoomCamera_=false;
01230
01231   AngleCorrX_ = AngleCorrX;
01232   AngleCorrY_ = AngleCorrY;
01233   IlluCorrX_  = IlluCorrX;
01234   IlluCorrY_  = IlluCorrY;
01235
01236   IsInitialized_=true;
01237
01238 }
01239
01240
01241 void CameraParam::InitPerspective(const string CamModel, const int CamID,
01242                                 const string LensModel,
01243                                 const int imgWidth, const int imgHeight,
01244                                 const double principalX,
01245                                 const double principalY,
01246                                 const double focallength,
01247                                 const double aspectratio,
01248                                 const double k1, const double k2, const double k3, const double k4,
01249                                 const vector<double> &IlluCorrX,
01250                                 const vector<double> &IlluCorrY) {
01251
01252   //reset this
01253   Init();
01254   downsamplingFactor_=1;
01255   CamModel_ = CamModel;
01256   CamID_ = CamID;
01257   LensModel_=LensModel;
01258   width_  = imgWidth;
01259   height_ = imgHeight;
01260   principalX_ = principalX;
01261   principalY_ = principalY;
01262   radius_ = 0.0;
01263   focallengthDef_ = focallength;
01264   aspectratio_=aspectratio;
01265   cellSizeX_=1;
01266   cellSizeY_=1/aspectratio;
01267   LensIsSpherical_ = false;
01268   zoomCamera_=false;
01269   kc1Def_ = k1; kc2Def_ = k2; kc3Def_ = k3; kc4Def_ = k4;
01270   IlluCorrX_  = IlluCorrX;
01271   IlluCorrY_  = IlluCorrY;
01272   IsInitialized_=true;
01273 }
01274
01275 void CameraParam::DebugOut() const {
01276   cout << "Camera Parameters:" << endl;
01277   cout << "IsInitialized_ = " << IsInitialized_ << endl;
01278   cout << "CamModel_ = " << CamModel_ << endl;
01279   cout << "CamID_ = " << CamID_ << endl;
01280   cout << "LensModel_ = " << LensModel_ << endl;
01281   cout << "LensIsSpherical_ = " << LensIsSpherical_ << endl;
01282   cout << "zoomCamera_ = " << zoomCamera_ << endl;
01283   cout << "width_ = " << width_ << endl;
01284   cout << "height_ = " << height_ << endl;
01285   for (int i=0; i<(int)knownparams_vect_.size();i++) {
01286     cout << "knownparams_vect_[" << i << "] = " << endl;
01287     CPDiscreteParam dp;
01288     dp=knownparams_vect_[i];
01289     cout << "  zoom = " << dp.zoom << endl;
01290     cout << "  focallength = " << dp.focallength << endl;
01291     cout << "  kc1 = " << dp.kc1 << endl;
01292     cout << "  kc2 = " << dp.kc2 << endl;
01293     cout << "  kc3 = " << dp.kc3 << endl;
01294     cout << "  kc4 = " << dp.kc4 << endl;
01295   };
01296   for (int i=0; i<(int) AngleCorrX_.size();i++) {
01297     cout << "AngleCorrX_[" << i << "] = " << AngleCorrX_[i] << endl;
01298   }
01299   for (int i=0; i<(int) AngleCorrY_.size();i++) {
01300     cout << "AngleCorrY_[" << i << "] = " << AngleCorrY_[i] << endl;
01301   }
01302   for (int i=0; i<(int) IlluCorrX_.size();i++) {
01303     cout << "IlluCorrX_[" << i << "] = " << IlluCorrX_[i] << endl;
01304   }
01305   for (int i=0; i<(int) IlluCorrY_.size();i++) {
01306     cout << "IlluCorrY_[" << i << "] = " << IlluCorrY_[i] << endl;
01307   }
01308
01309   cout << "aspectratio_ = " << aspectratio_ << endl;
01310   cout << "cellSizeX_ = " << cellSizeX_ << endl;
01311   cout << "cellSizeY_ = " << cellSizeY_ << endl;
01312   cout << "principalX_ = " << principalX_ << endl;
01313   cout << "principalY_ = " << principalY_ << endl;
01314   cout << "focallengthDef_ = " << focallengthDef_ << endl;
01315   cout << "kc1Def_ = " << kc1Def_ << endl;
01316   cout << "kc2Def_ = " << kc2Def_ << endl;
01317   cout << "kc3Def_ = " << kc3Def_ << endl;
01318   cout << "kc4Def_ = " << kc4Def_ << endl;
01319   cout << "downsamplingFactor_ = " << downsamplingFactor_ << endl;
01320   cout << endl << endl;
01321 }
01322
01323
01324 void CameraParam::SetData_EVID31_147094(){
01325
01326   //reset this
01327   Init();
01328
01329   CPDiscreteParam dp;
01330   CamModel_ = "SONY EVI-D31";
01331   CamID_ = 147094;
01332   LensModel_ = "LENS_SONY_EVID31_BUILTIN";
01333   LensIsSpherical_ = false;
01334
01335   cellSizeX_=1;
01336   cellSizeY_=1;
01337
01338   width_=768;
01339   height_=576;
01340
01341   aspectratio_=1;
01342
01343   principalX_=384;
01344   principalY_=288;
01345
01346 //   exposureTime_ = 0.08;
01347 //   iris_ = 1;
01348 //   reciprocalFocus_ = 1.234;
01349
01350   knownparams_vect_.clear();
01351
01352   // must be in descending order regarding the zoom!
01353
01354   dp.zoom=47;
01355   dp.focallength=910.781402852481733;
01356   dp.kc1=-0.268280770809586;
01357   dp.kc2=0.487451704517498;
01358   dp.kc3=-0.000762042258562;
01359   dp.kc4=-0.001130194838780;
01360   knownparams_vect_.push_back(dp);
01361
01362   dp.zoom=45;
01363   dp.focallength=942.276371802197332;
01364   dp.kc1=-0.222325918868402;
01365   dp.kc2=0.303803084817878;
01366   dp.kc3=-0.000220828107747;
01367   dp.kc4=-0.002379174938453;
01368   knownparams_vect_.push_back(dp);
01369
01370   dp.zoom=43;
01371   dp.focallength=989.223042668483913;
01372   dp.kc1=-0.230499856719837;
01373   dp.kc2=0.632569092436950;
01374   dp.kc3=0.000645301367934;
01375   dp.kc4=-0.002245120579513;
01376   knownparams_vect_.push_back(dp);
01377
01378   dp.zoom=41;
01379   dp.focallength=1046.743156411611380;
01380   dp.kc1=-0.175147739150835;
01381   dp.kc2=0.399855896767651;
01382   dp.kc3=0.001819727735452;
01383   dp.kc4=-0.004642715440390;
01384   knownparams_vect_.push_back(dp);
01385
01386   dp.zoom=39;
01387   dp.focallength=1113.877613258150632;
01388   dp.kc1=-0.199908717507440;
01389   dp.kc2=0.735328948045900;
01390   dp.kc3=0.001857139856879;
01391   dp.kc4=-0.001726332328807;
01392   knownparams_vect_.push_back(dp);
01393
01394   dp.zoom=37;
01395   dp.focallength=1195.129672009601336;
01396   dp.kc1=-0.194029932886528;
01397   dp.kc2=1.052137931539009;
01398   dp.kc3=0.002556010034664;
01399   dp.kc4=-0.002664280436511;
01400   knownparams_vect_.push_back(dp);
01401
01402   dp.zoom=35;
01403   dp.focallength=1284.915674699713918;
01404   dp.kc1=-0.222381373429422;
01405   dp.kc2=1.627430874083972;
01406   dp.kc3=0.001072744905158;
01407   dp.kc4=-0.001628105221342;
01408   knownparams_vect_.push_back(dp);
01409
01410   dp.zoom=33;
01411   dp.focallength=1381.682287410254276;
01412   dp.kc1=-0.221923278642680;
01413   dp.kc2=1.734685282276320;
01414   dp.kc3=0.002486050695331;
01415   dp.kc4=-0.001291711925732;
01416   knownparams_vect_.push_back(dp);
01417
01418   dp.zoom=31;
01419   dp.focallength=1493.437763776483052;
01420   dp.kc1=-0.224447467694984;
01421   dp.kc2=1.863840161034580;
01422   dp.kc3=0.003709677616807;
01423   dp.kc4=-0.001150445035362;
01424   knownparams_vect_.push_back(dp);
01425
01426   dp.zoom=29;
01427   dp.focallength=1616.993704040472039;
01428   dp.kc1=-0.202923793671622;
01429   dp.kc2=1.473981778670278;
01430   dp.kc3=0.003684677768293;
01431   dp.kc4=-0.002550288087126;
01432   knownparams_vect_.push_back(dp);
01433
01434   dp.zoom=27;
01435   dp.focallength=1757.081611652665060;
01436   dp.kc1=-0.217240281709651;
01437   dp.kc2=2.140024501420107;
01438   dp.kc3=0.001114854630183;
01439   dp.kc4=-0.001295578479362;
01440   knownparams_vect_.push_back(dp);
01441
01442   dp.zoom=25;
01443   dp.focallength=1902.05452;
01444   dp.kc1=-0.23863;
01445   dp.kc2=1.61900;
01446   dp.kc3=0.00195;
01447   dp.kc4=-0.00185;
01448   knownparams_vect_.push_back(dp);
01449
01450   dp.zoom=23;
01451   dp.focallength=2074.378333106370974;
01452   dp.kc1=-0.255567875389573;
01453   dp.kc2=1.732924024277849;
01454   dp.kc3=0.001245946585972;
01455   dp.kc4=-0.000594821663798;
01456   knownparams_vect_.push_back(dp);
01457
01458   dp.zoom=21;
01459   dp.focallength=2282.63949;
01460   dp.kc1=-0.26368;
01461   dp.kc2=0.44519;
01462   dp.kc3=0.00174;
01463   dp.kc4=-0.00076;
01464   knownparams_vect_.push_back(dp);
01465
01466   dp.zoom=19;
01467   dp.focallength=2519.628084135987592;
01468   dp.kc1=-0.332071279316112;
01469   dp.kc2=0.944781789471998;
01470   dp.kc3=0.000746973436601;
01471   dp.kc4=-0.001772703465946;
01472   knownparams_vect_.push_back(dp);
01473
01474   dp.zoom=17;
01475   dp.focallength=2824.507670379169667;
01476   dp.kc1=-0.404343435901478;
01477   dp.kc2=0.453162060457514;
01478   dp.kc3=-0.000861720421368;
01479   dp.kc4=-0.001149130726447;
01480   knownparams_vect_.push_back(dp);
01481
01482   dp.zoom=15;
01483   dp.focallength=3226.589266051306367;
01484   dp.kc1=-0.594320179301222;
01485   dp.kc2=12.959736505367889;
01486   dp.kc3=-0.001868658432064;
01487   dp.kc4=-0.000676806079268;
01488   knownparams_vect_.push_back(dp);
01489
01490   dp.zoom=13;
01491   dp.focallength=3788.529115119004928;
01492   dp.kc1=-0.823072669196453;
01493   dp.kc2=27.510513372014003;
01494   dp.kc3=-0.006928032867432;
01495   dp.kc4=0.002134868203333;
01496   knownparams_vect_.push_back(dp);
01497
01498   dp.zoom=11;
01499   dp.focallength=4592.039263971351829;
01500   dp.kc1=-1.121702159939672;
01501   dp.kc2=36.994236469912934;
01502   dp.kc3=-0.014620822228192;
01503   dp.kc4=0.004860766468908;
01504   knownparams_vect_.push_back(dp);
01505
01506   dp.zoom=9;
01507   dp.focallength=5834.063334730769384;
01508   dp.kc1=-1.473018481165970;
01509   dp.kc2=41.598117903225528;
01510   dp.kc3=-0.028692464501407;
01511   dp.kc4=0.007739406251353;
01512   knownparams_vect_.push_back(dp);
01513
01514   dp.zoom=7;
01515   dp.focallength=5877.390940425404551;
01516   dp.kc1=-1.786184809649660;
01517   dp.kc2=109.639598242766894;
01518   dp.kc3=-0.011555140535335;
01519   dp.kc4=-0.002211119391028;
01520   knownparams_vect_.push_back(dp);
01521
01522   // this is a safety-buffer
01523   dp.zoom=1000;
01524   knownparams_vect_.push_back(dp);
01525   IsInitialized_=true;
01526
01527 }
01528
01529
01530
01531 int CameraParam::ReadFromEXIF(const std::string& filename) {
01532   //reset this
01533   Init();
01534
01535   downsamplingFactor_=1;
01536   ImageAttributes exifdata;
01537   exifdata.InitExifTags();
01538   int result = exifdata.Read(filename);
01539   if (result!=0) return result;
01540
01541
01542   string make, model;
01543   exifdata.GetHardwareName(make, model);
01544   CamModel_ = make + "___"+model;
01545
01546   CamID_ = 0;
01547   LensModel_ = "unknown";
01548   LensIsSpherical_ = false;
01549
01550   result = exifdata.GetPixelSizeXMeter(cellSizeX_);
01551   if (result<0) return result;
01552   result = exifdata.GetPixelSizeYMeter(cellSizeY_);
01553   if (result<0) return result;
01554
01555   int width=0, height=0;
01556   result = exifdata.GetImageDimensions(width, height);
01557   if (result<0) return result;
01558   width_ = width;
01559   height_ = height;
01560
01561   aspectratio_ = cellSizeX_ / cellSizeY_;
01562
01563   result = exifdata.GetPrincipalPoint(principalX_, principalY_);
01564   if (result<0) return result;
01565
01566   result = exifdata.GetFocalLengthXPixel(focallengthDef_);
01567   if (result<0) return result;
01568
01569   zoomCamera_ = false;
01570   knownparams_vect_.clear();
01571   IsInitialized_=true;
01572
01573   return 0;
01574 }
01575
01576 CameraParam::CameraParam(const KMatrix& K, const int w, const int h) {
01577   //reset this
01578   Init();
01579
01580   width_    = w;
01581   height_   = h;
01582   CamModel_ = "fromkmatrix";
01583
01584   // you can set any value here but not zero !
01585   CamID_ = 42;
01586   LensModel_ = "unknown";
01587   LensIsSpherical_ = false;
01588
01589   cellSizeX_  = 1;
01590   cellSizeY_  = K[0][0] / K[1][1];
01591   principalX_ = K[0][2];
01592   principalY_ = K[1][2];
01593
01594   focallengthDef_ = K[0][0];
01595
01596   aspectratio_ = cellSizeX_/cellSizeY_;
01597
01598   zoomCamera_ = false;
01599   knownparams_vect_.clear();
01600   IsInitialized_=true;
01601
01602 }
01603
01604
01605 void CameraParam::SetData_OMNITECH_ORIFL_190_3 () {
01606
01607   //reset this
01608   Init();
01609
01610   AngleCorrX_.clear();
01611   AngleCorrY_.clear();
01612   IlluCorrX_.clear();
01613   IlluCorrY_.clear();
01614
01615   CamModel_ = "Fisheye Camera";
01616   CamID_ = 0440;
01617   LensModel_ = "OMNITECH_ORIFL_190_3";
01618   LensIsSpherical_ = true;
01619
01620   width_=640;
01621   height_=480;
01622
01623   principalX_ = 364;
01624   principalY_ = 245;
01625
01626   aspectratio_=1;
01627
01628   knownparams_vect_.clear();
01629
01630   cellSizeX_=1;
01631   cellSizeY_=1;
01632
01633   double x,y;
01634   x=0.000; y=1.000*x;
01635   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01636   x=0.138; y=1.000*x;
01637   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01638   x=0.424; y=0.993*x;
01639   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01640   x=0.757; y=0.974*x;
01641   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01642   x=1.045; y=0.941*x;
01643   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01644   x=1.342; y=0.899*x;
01645   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01646   x=1.436; y=0.881*x;
01647   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01648   x=1.652; y=0.828*x;
01649   AngleCorrX_.push_back(x); AngleCorrY_.push_back(y);
01650
01651   // Vignette correction x=angle, y=darkening factor
01652   x=0.005; y=1.000;
01653   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01654   x=0.092; y=1.000;
01655   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01656   x=0.179; y=1.000;
01657   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01658   x=0.266; y=1.003;
01659   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01660   x=0.354; y=1.003;
01661   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01662   x=0.439; y=1.003;
01663   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01664   x=0.527; y=1.003;
01665   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01666   x=0.615; y=1.005;
01667   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01668   x=0.701; y=1.005;
01669   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01670   x=0.788; y=1.005;
01671   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01672   x=0.875; y=1.005;
01673   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01674   x=0.962; y=1.003;
01675   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01676   x=1.049; y=0.998;
01677   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01678   x=1.135; y=0.993;
01679   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01680   x=1.223; y=0.983;
01681   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01682   x=1.310; y=0.966;
01683   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01684   x=1.398; y=0.941;
01685   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01686   x=1.485; y=0.897;
01687   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01688   x=1.572; y=0.828;
01689   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01690   x=1.660; y=0.716;
01691   IlluCorrX_.push_back(x); IlluCorrY_.push_back(y);
01692
01693   // TODO: Implement Max Angle
01694   //double MaxCamAngle = 1.6581; // 95 deg
01695
01696   radius_ = 226;
01697   IsInitialized_=true;
01698 }
01699
01700
01701 double CameraParam::InterpolateFocalLength_(){
01702
01703   double relnorm;
01704   double absdist;
01705
01706   bool found;
01707   unsigned int i;
01708   found=false;
01709
01710   if (knownparams_vect_[0].zoom<zoom_){ // zoom is higher than the
01711     // known values:
01712     zoom_=knownparams_vect_[0].zoom;  // set to highest available
01713   }
01714
01715   for (i=0;i<knownparams_vect_.size();i++){
01716     if (knownparams_vect_[i].zoom<=zoom_){
01717         found=true;
01718         break;
01719     }
01720   }
01721
01722   if (!found){ // zoom is lower than the known values
01723     focallengthZoom_=knownparams_vect_[i-1].focallength;
01724     return knownparams_vect_[i-1].focallength;
01725   }
01726
01727
01728   if (knownparams_vect_[i].zoom==zoom_){
01729     return knownparams_vect_[i].focallength;
01730   }
01731
01732   relnorm=(zoom_ - knownparams_vect_[i].zoom) /
01733     (knownparams_vect_[i-1].zoom - knownparams_vect_[i].zoom);
01734
01735   relnorm=1.0-relnorm;
01736
01737   absdist=relnorm*(knownparams_vect_[i].focallength-
01738                    knownparams_vect_[i-1].focallength);
01739
01740   return (absdist+knownparams_vect_[i-1].focallength);
01741 }
01742
01743
01744 double CameraParam::InterpolateAbsZoom_(){
01745
01746   double relnorm;
01747   double absdist;
01748
01749   bool found;
01750   unsigned int i;
01751   found=false;
01752
01753   if (knownparams_vect_[0].focallength<focallengthZoom_){
01754     focallengthZoom_=knownparams_vect_[0].focallength;
01755   }
01756
01757   for (i=0;i<knownparams_vect_.size();i++){
01758     if (knownparams_vect_[i].focallength<=focallengthZoom_){
01759         found=true;
01760         break;
01761     }
01762   }
01763   if (!found){
01764     return -1;
01765   }
01766
01767   if (knownparams_vect_[i].focallength==focallengthZoom_){
01768     // interpolate distortion parameters
01769     return knownparams_vect_[i].zoom;
01770   }
01771
01772   relnorm=(focallengthZoom_ - knownparams_vect_[i].focallength) /
01773     (knownparams_vect_[i-1].focallength - knownparams_vect_[i].focallength);
01774
01775   relnorm=1.0-relnorm;
01776
01777   absdist=relnorm*(knownparams_vect_[i].zoom-
01778                    knownparams_vect_[i-1].zoom);
01779
01780   return (absdist+knownparams_vect_[i-1].zoom);
01781 }
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CameraParam.hh Source File

Image

CameraParam.hh

Go to the documentation of this file.
00001 /*
00002 $Id: CameraParam.hh,v 2.19 2006/05/05 11:45:50 streckel Exp $
00003 */
00004 /*
00005 This file is part of the BIAS library (Basic ImageAlgorithmS).
00006
00007 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00008   Multimediale Systeme der Informationsverarbeitung
00009   Institut fuer Informatik
00010   Christian-Albrechts-Universitaet Kiel
00011
00012
00013 BIAS is free software; you can redistribute it and/or modify
00014 it under the terms of the GNU Lesser General Public License as published by
00015 the Free Software Foundation; either version 2.1 of the License, or
00016 (at your option) any later version.
00017
00018 BIAS is distributed in the hope that it will be useful,
00019 but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 GNU Lesser General Public License for more details.
00022
00023 You should have received a copy of the GNU Lesser General Public License
00024 along with BIAS; if not, write to the Free Software
00025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 */
00027 #ifndef __CameraParameter_inc__
00028 #define __CameraParameter_inc__
00029 #include <bias_config.h>
00030 #include <Base/Common/BIASpragmaStart.hh>
00031
00032 #include <vector>
00033 #include <string>
00034 #include <Base/Debug/Error.hh>
00035 #ifdef BIAS_HAVE_XML2
00036 #  include <Base/Common/XMLIO.hh>
00037 #endif
00038
00039 #include <Base/Math/Vector2.hh>
00040 #include <Base/Geometry/KMatrix.hh>
00041
00042 #define CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0
00043
00044 namespace BIAS{
00045
00046   struct BIASImage_EXPORT CPDiscreteParam{
00047     double zoom;
00048     double focallength;
00049     // radial/tangential distortion parameters.
00050     // 4th order model of brown.
00051     double kc1,kc2,kc3,kc4;
00052   };
00053
00054
00055   class BIASImage_EXPORT CameraParam{
00056
00057     //    static std::string CameraModelName[];
00058     // static std::string LensModelName[];
00059
00060   public:
00061     CameraParam();
00062     CameraParam(const CameraParam &cp);
00063     /** @brief pass K and image dims to construct a simple parameter file */
00064     CameraParam(const KMatrix& K, const int w, const int h);
00065 #ifdef BIAS_HAVE_XML2
00066     CameraParam(const std::string &filename);
00067     CameraParam(XMLIO &myXML, xmlNodePtr &cameraNode);
00068 #endif //BIAS_HAVE_XML2
00069
00070     ~CameraParam();
00071
00072     // @brief default initialization, ends up with _INVALID_ object
00073     void Init();
00074     void Init(const CameraParam &cp);
00075
00076     void InitPerspective(const std::string CamModel, const int CamID,
00077                          const std::string LensModel,
00078                          const int imgWidth, const int imgHeight,
00079                          const double principalX, const double principalY,
00080                          const double focallength,
00081                          const double aspectratio,
00082                          const double k1, const double k2,
00083                          const double k3, const double k4,
00084                          const std::vector<double> &IlluCorrX,
00085                          const std::vector<double> &IlluCorrY);
00086     void InitSpherical(const std::string CamModel, const int CamID,
00087                        const std::string LensModel,
00088                        const int imgWidth, const int imgHeight,
00089                        const double principalX, const double principalY,
00090                        const double radius,
00091                        const std::vector<double> &AngleCorrX,
00092                        const std::vector<double> &AngleCorrY,
00093                        const std::vector<double> &IlluCorrX,
00094                        const std::vector<double> &IlluCorrY);
00095
00096 #ifdef BIAS_HAVE_XML2
00097     // @brief initialization with camera data file
00098     int Init(const std::string &filename);
00099     // @brief initialization with camera node from pre-parsed data file
00100     int Init(XMLIO &myXML, xmlNodePtr &cameraNode);
00101 #endif //BIAS_HAVE_XML2
00102
00103     bool IsInitialized() const;
00104
00105     /** @brief Set to 'true', if camera has a zoom lens.
00106         @author streckel 06/2004*/
00107     void SetZoomCamera(const bool zoomCam);
00108
00109     /** @brief True, if camera has a zoom lens.
00110         @author streckel 06/2004*/
00111     bool IsZoomCamera() const;
00112
00113     /** @brief Set the current camera zoom, the focal length will be
00114         calculated.
00115         @author buck */
00116     void SetZoom(const double abszoom);
00117
00118     /** @brief Set the current camera focal length, the zoom will be
00119         calculated.
00120         @author buck */
00121     void SetFocalLength(const double f);
00122
00123     /** @brief Set the zoom and focal length of a zoom camera to the
00124         default settings.
00125         @author streckel 06/2004*/
00126     void SetUnzoomed();
00127
00128     /** @brief Set the current camera zoom, the focal length will be
00129         calculated.
00130         @author buck */
00131     double GetZoom() const;
00132
00133     /** @brief Get the current camera focal length.
00134         @author buck */
00135     double GetFocalLength() const;
00136
00137     /** @brief Set CCD cell-size in meter.
00138         AspectRatio is CS_Y/CS_X
00139         @author streckel */
00140     void SetCellSize(const double CellSizeX, const double AspectRatio);
00141
00142     double GetCellSizeX() {return cellSizeX_;}
00143     double GetCellSizeY() {return cellSizeY_;}
00144
00145     /** @brief Set principal point in pixels relative to top left corner
00146         @author streckel */
00147     void SetPrincipal(const double x, const double y);
00148
00149     /** @brief Set downsampling factor  -
00150         all get functions will return transformed values
00151
00152         E.g. if your image size(width and height) is half the original
00153         and the field of view did stay the same, then set factor to 2. <br>
00154         CAUTION: The Set-functions still require the original values
00155         @author streckel */
00156     void SetDownsampling(const double factor);
00157
00158         double GetDownsamplingFactor();
00159
00160     /** @brief get camera image width.
00161         @author buck */
00162     unsigned int GetWidth() const;
00163     /** @brief get camera image height.
00164         @author buck */
00165     unsigned int GetHeight() const;
00166
00167     inline double GetAspectratio() const {
00168       if (!IsInitialized_){
00169         BIASERR("Not inited!");
00170         return 0;
00171       }
00172       return aspectratio_;
00173     }
00174
00175     /** set size of image seperatly */
00176     void SetSize(unsigned int w,unsigned int h) {
00177       width_ =w; height_ = h; }
00178
00179     /** @brief get principal point, x  in pixels relative to top left corner
00180         @author buck */
00181     double GetPrincipalX() const;
00182     /** @brief get principal point, y  in pixels relative to top left corner
00183         @author buck */
00184     double GetPrincipalY() const;
00185
00186     /* @brief Get the Cameras KMatrix corresponding to the current
00187        zoom setting
00188        @author streckel */
00189     BIAS::KMatrix GetKMatrix() const;
00190
00191     inline int GetCamID() const {
00192       return CamID_;
00193     }
00194
00195     inline double GetRadius() const{
00196       if (IsSpherical()) {
00197         return radius_/downsamplingFactor_+0.000000001;
00198       } else {
00199         return -1;
00200       }
00201     }
00202
00203     inline double SetRadius(double r) {
00204       if (!IsSpherical()) {
00205         BIASERR("Can notset radius for perspective camera");
00206         return -1;
00207       }
00208       radius_ = r;
00209       // should reinit now
00210       return 0;
00211     }
00212
00213
00214     inline void GetDefaultUndistortion(double& f,
00215                                        double& kc1, double& kc2,
00216                                        double& kc3, double& kc4) const
00217     {
00218       f   = focallengthDef_/downsamplingFactor_+0.000000001;
00219       kc1 = kc1Def_;
00220       kc2 = kc2Def_;
00221       kc3 = kc3Def_;
00222       kc4 = kc4Def_;
00223     }
00224
00225     inline void GetZoomUndistortion(std::vector<CPDiscreteParam>& vp) const {
00226       std::vector<CPDiscreteParam>::const_iterator it;
00227       vp.clear();
00228       vp.reserve(knownparams_vect_.size());
00229       for (it=knownparams_vect_.begin();it!=knownparams_vect_.end();it++) {
00230         CPDiscreteParam cpp=*it;
00231         cpp.focallength = cpp.focallength/downsamplingFactor_+0.000000001;
00232         vp.push_back(cpp);
00233       }
00234     }
00235
00236     inline double GetAspectRatio() const {
00237       return aspectratio_;
00238     }
00239
00240     inline  bool IsSpherical() const { return LensIsSpherical_;}
00241
00242     inline  bool IsPerspective() const {return !LensIsSpherical_;}
00243
00244     inline std::vector<double> GetAngleCorrX() const {
00245       return AngleCorrX_;
00246     }
00247     inline std::vector<double> GetAngleCorrY() const {
00248       return AngleCorrY_;
00249     }
00250     inline std::vector<double> GetIlluCorrX() const {
00251       return IlluCorrX_;
00252     }
00253     inline std::vector<double> GetIlluCorrY() const {
00254       return IlluCorrY_;
00255     }
00256
00257 #ifdef BIAS_HAVE_XML2
00258     /** @brief Write all data to a camera data parameter file )
00259         @param Filename Name of the XML-camera-data-file,
00260         document tag will be to be "Camera"
00261         @author streckel 06/2004 */
00262     int WriteCameraData(const std::string& Filename) const;
00263     /** @brief Add a camera sub-tree-structure to an allready created
00264         XML-tree and write the data from (*this) into the tree -
00265         called from the rig parameter class.
00266         @param myXML points to the XML-Tree
00267         @param cameraDataNode points to a "CameraData"-node to append the
00268         "Camera"-node
00269         @author streckel 06/2004 */
00270     int AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode) const;
00271
00272     /** @brief Read a camera data parameter file and store the data in (*this)
00273         @param Filename Name of the XML-camera-data-file,
00274         document tag has to be "Camera"
00275         @author streckel 06/2004 */
00276     int ReadCameraData(const std::string& Filename);
00277     /** @brief Read a camera data form a precreated XML-tree and store
00278         the data in (*this)  - called from the rig parameter class.
00279         @param myXML points to the XML-Tree
00280         @param rigNode points to a "Camera"-node to evaluate
00281         @author streckel 06/2004 */
00282     int ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode);
00283 #endif //BIAS_HAVE_XML2
00284
00285     // Settings for specific cameras
00286     void SetData_EVID31_147094();
00287     void SetData_OMNITECH_ORIFL_190_3();
00288
00289     /** @brief read jpeg EXIF header and set camera parameter
00290         @return 0 on success
00291         @author koeser 07/2005 */
00292     int ReadFromEXIF(const std::string& filename);
00293
00294     void DebugOut() const;
00295
00296   protected:
00297     bool IsInitialized_;
00298
00299     // Which camera if used?
00300     std::string CamModel_;
00301     int CamID_;
00302     std::string LensModel_;
00303
00304     // do we have zoom or fixed optics?
00305     bool zoomCamera_;
00306
00307     // Lens can be Spherical or Perspective
00308     bool LensIsSpherical_;
00309
00310     // width and height of the camera image
00311     unsigned int width_, height_;
00312
00313     // array of camera calibration constants for zoom cameras
00314     std::vector<CPDiscreteParam> knownparams_vect_;
00315
00316     // filled by inheriting camera model
00317     double aspectratio_;
00318
00319     // size of the single CCD-sensor-cells in meter
00320     double cellSizeX_, cellSizeY_;
00321
00322     // Principal Point Pixel Coordinates (one for all zoom settings)
00323     double principalX_, principalY_;
00324
00325     // image radius if image is spherical
00326     double radius_;
00327
00328     // Maximum image angle of the fisheye camera
00329     double MaxCamAngle_;
00330
00331     //0.5 means upsample, 2 means half size, 4 one forth ....
00332     double downsamplingFactor_;
00333
00334     // only for perspective lenses
00335     // standard settings for non zoom lenses or
00336     // for zoom default state
00337     // focal length is stored in pixel for cellSizeX
00338     double focallengthDef_;
00339     double kc1Def_,kc2Def_,kc3Def_,kc4Def_;
00340
00341     // calibration settings for the current zoom setting of a zoom camera
00342     // zoom and focallengthZoom are dependend:
00343     // if zoom is set, focallengthZoom will be calculated and vice versa
00344     // focal length is stored in pixel
00345     double zoom_;
00346     double focallengthZoom_;
00347
00348     // illumination vignette correction
00349     // x is distance in pixel from principal point
00350     // y is illumination correction factor
00351     std::vector<double> IlluCorrX_;
00352     std::vector<double> IlluCorrY_;
00353
00354     // Only for sphere images:
00355     // Calibration measurements for angle correction
00356     std::vector<double> AngleCorrX_;
00357     std::vector<double> AngleCorrY_;
00358
00359     double InterpolateFocalLength_(); // w/ given abszoom
00360     double InterpolateAbsZoom_(); // w/ given focal length
00361
00362 #ifdef BIAS_HAVE_XML2
00363     int ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode);
00364     int ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode);
00365     int AddCameraDataToXMLTree(XMLIO &myXML, xmlNodePtr &rootNode) const;
00366 #endif //BIAS_HAVE_XML2
00367
00368   };
00369
00370 }
00371
00372 #include <Base/Common/BIASpragmaEnd.hh>
00373 #endif
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewController.cpp Source File

Gui

CameraViewController.cpp

Go to the documentation of this file.
00001 #include "CameraViewController.hh"
00002 #include "biasgl.h"
00003 #include <iostream>
00004
00005 using namespace std;
00006 using namespace BIAS;
00007
00008
00009 // JW
00010 CameraViewController::~CameraViewController(){
00011   delete p_externals;  p_externals=NULL;
00012   delete p_internals; p_internals=NULL;
00013 }
00014
00015
00016 CameraViewController::CameraViewController()
00017 : p_externals(NULL), p_internals(NULL)
00018 {
00019   InitMembers();
00020 }
00021
00022
00023 void CameraViewController::InitMembers(){
00024   //mode_ = ExamineTrackballmode ; //InspectionMoveCAbsolute
00025
00026   if (p_externals==NULL){
00027     p_externals = new CameraViewExternals();
00028   } else
00029     GetExternals().InitMembers();
00030
00031   if (p_internals==NULL)
00032     p_internals = new CameraViewInternals();
00033   else
00034     GetInternals().InitMembers();
00035
00036   size.Set(100,100);
00037   startpos.SetZero();
00038   startposExt.InitMembers();
00039   startposInt.InitMembers();
00040 }
00041
00042
00043 void CameraViewController::DisplayGL(){
00044   DisplayGLInternal();
00045   DisplayGLExternal();
00046 }
00047
00048 void CameraViewController::DisplayGLInternal(){
00049   GetInternals().DisplayGL();
00050 }
00051
00052 void CameraViewController::DisplayGLExternal(){
00053   GetExternals().DisplayGL();
00054 }
00055
00056
00057 std::ostream &
00058 CameraViewController::Print(std::ostream & os ){
00059   os<<"CameraViewController : "<<endl;
00060   GetInternals().Print(os);
00061   GetExternals().Print(os);
00062   return os;
00063 }
00064
00065 void CameraViewController::SetStartPos(const BIAS::Vector2<double> & pos){
00066   startpos=pos;
00067   BIASASSERT(p_externals!=NULL);
00068   BIASASSERT(p_internals!=NULL);
00069   startposExt = *p_externals;
00070   startposInt = *p_internals;
00071 }
00072
00073
00074 void CameraViewController::MoveOrbit(const BIAS::Vector2<double> & deltaN)
00075 {
00076   BIASASSERT(p_externals!=NULL);
00077
00078   Vector2<double> middle = size /2.0;
00079   cout<<"size:   "<<size<<" middle: "<<middle<<endl;
00080
00081   // tangential directions mapping to motion delta
00082   Vector3<double> v0(1,0,0);
00083   Vector3<double> v1(0,1,0);
00084   Vector3<double> offset(0,0,0);
00085
00086   //cout<<deltaN<<endl;
00087
00088   Vector3<double> displaceCart = GetExternals().C - GetExternals().viewAt;
00089   Vector3<double> displacePolar = displaceCart.CartesianToPolar();
00090   cout<<displaceCart<<" is polar "<<displacePolar<<endl;
00091
00092   v1 = GetExternals().up;
00093   v1.Normalize();
00094   v0 = v1.CrossProduct(displaceCart);
00095   v0.Normalize();
00096   cout<<v0<<" v1 "<<v1<<endl;
00097
00098
00099   //offset = 0.01 * Vector3<double>(deltaN[0], deltaN[1], 0.0);
00100   const double scale=0.1;
00101   offset += scale * deltaN[0] * v0;
00102   offset += scale * deltaN[1] * v1;
00103
00104   GetExternals().C += offset;
00105 }
00106
00107
00108 void CameraViewController::MoveToCenter(const double & fraction)
00109 {
00110   if (abs(fraction)>10.0)
00111   {
00112     BIASERR("fraction should be a normalized value, usually between -1.0 and +1.0. skipping motion");
00113     BIASBREAK;
00114     return;
00115   }
00116   BIASASSERT(p_externals!=NULL);
00117   Vector3<double> direction = p_externals->C - p_externals->viewAt;
00118   direction *= fraction;
00119   p_externals->C += direction;
00120 }
00121
00122 void CameraViewController::MotionTranslationForward(const BIAS::Vector2<double> & pos)
00123 {
00124   const Vector2<double> delta =  pos - this->startpos;
00125   const double fraction = delta.GetY() / size.GetY();
00126   MoveToCenter(fraction);
00127   this->startpos = pos;
00128 }
00129
00130
00131 void CameraViewController::MotionTranslation(const BIAS::Vector2<double> & pos)
00132 {
00133   Vector2<double> delta =  pos - this->startpos;
00134   delta.DivideIP(size);
00135   delta *= 20.0;
00136   MoveOrbit(delta);
00137
00138   this->startpos = pos; // new center
00139 }
00140
00141 // helper
00142 //#define square(arg) ((arg) * (arg))
00143
00144 void CameraViewController::MotionTrackballRotation(const BIAS::Vector2<double> & pos){
00145   // Trackball rotation
00146   BIASERR("incorrectly implemented");
00147   // TODO
00148
00149   // offset from start of dragging
00150   Vector2<double> middle=size/2.;
00151   //cout<<"DBG  size="<<size<<" middle="<<middle<<endl;
00152
00153   /*
00154   // current pos. on unit 1 sphere, determine z from x,y
00155   Vector2<double> deltaPosAct = ((pos -middle) / size);
00156   Vector3<double> vAct(deltaPosAct[0],  -deltaPosAct[1], 0 ); // projection to XY plane
00157   vAct[2] = sqrt(1 - square(vAct[0]) - square(vAct[1]) ); // minus y for lower left origin
00158   cout<<" vAct="<<vAct<<" length: "<<vAct.Length()<<endl;
00159
00160   // startpos on unit 1 sphere
00161   Vector2<double> deltaPosStart = (startpos -middle) / size;
00162   Vector3<double> vStart(deltaPosStart[0], -deltaPosStart[1],  0);
00163   vStart[2] = sqrt(1 - square(vStart[0]) - square(vStart[1]) );
00164   cout<<" vStart="<<vStart<<" length: "<<vStart.Length()<<endl;
00165   */
00166
00167
00168   // normalize length
00169
00170
00171   // offset from viewcenter in polar form:
00172   //static BIAS::Vector3<double> PolarCoords = (startC -viewAt_).CoordEuclidianToSphere();
00173
00174   /*
00175   float dtheta = (float)(mouseX - x)*TWOPI/(float)screenWidth;
00176   float dphi   = (float)(y - mouseY)*TWOPI/(float)screenHeight;
00177   if (p == &Eye.from) {
00178   p->theta -= dtheta;
00179   p->phi   -= dphi;
00180   } else {
00181   p->theta += dtheta;
00182   p->phi   += dphi;
00183   }
00184   if (p->theta < -TWOPI) p->theta += TWOPI;
00185   else if (p->theta >  TWOPI) p->theta -= TWOPI;
00186   if (p->phi > M_PI) p->phi = M_PI;
00187   else if (p->phi < 0.) p->phi = 0.;
00188   */
00189
00190   //// set new "rotated" eye center
00191   //C_ = viewAt_ +p->CoordSphereToEuclidian();
00192   //// adapt up vector
00193   //cout<<"DBG C_="<<C_<<" "<<C_.NormL2()<<endl;
00194
00195
00196   //  polarToCartesian(Eye.from, eyeCoords);
00197   //gluLookAt(eyeCoords[0], eyeCoords[1], eyeCoords[2],
00198   //  Eye.target[0], Eye.target[1], Eye.target[2],
00199   //  -cos(Eye.from.phi)*sin(Eye.from.theta),
00200   //  -cos(Eye.from.phi)*cos(Eye.from.theta),
00201   //  sin(Eye.from.phi));
00202 }
00203
00204
00205 //void CameraViewController::OnMotion( wxMouseEvent &event ){
00206 //
00207 //  //CALLINFO;
00208 //  if (event.LeftIsDown()){
00209 //    wxPoint pt= event.GetPosition();
00210 //    Vector2<double> diff= Vector2<double>(pt.x, pt.y) -startpos;
00211 //    //cout<<"diff: "<<diff<<endl;
00212 //    Motion(diff[0], diff[1]);
00213 //  }
00214 //}
00215
00216
00217 //void CameraViewController::OnLeftDown( wxMouseEvent &event ){
00218 //  //CALLINFO;
00219 //  wxPoint pos= event.GetPosition();
00220 //  this->startpos.Set(pos.x, pos.y);
00221 //  this->startC=C_;
00222 //}
00223
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewController.hh Source File

Gui

CameraViewController.hh

Go to the documentation of this file.
00001 #ifndef __CameraViewController_h__
00002 #define __CameraViewController_h__
00003
00004 // ----------------------------------------------------------
00005 // @author Jan Woetzel   09/2003
00006 #include <bias_config.h>
00007 #ifndef BIAS_HAVE_OPENGL
00008 #  error Please recompile BIAS with USE_OPENGL to use this lib.
00009 #endif // BIAS_HAVE_OPENGL
00010
00011 //#ifndef BIAS_HAVE_GLUT
00012 //#  error Please recompile BIAS with USE_GLUT to use this lib.
00013 //#endif // BIAS_HAVE_GLUT
00014
00015 #ifndef BIAS_HAVE_WXWINDOWS
00016 #  error Please recompile BIAS with USE_WXWINDOWS to use this lib.
00017 #endif // BIAS_HAVE_WXWINDOWS
00018
00019
00020 // must be first
00021 #include <Gui/biasgl.h>
00022
00023 // STD
00024 #include <iostream>
00025
00026 // BIAS
00027 #include <Base/Debug/Error.hh>
00028 #include <Base/Debug/DebugSimple.hh>
00029 #include <Base/Math/Vector2.hh>
00030 #include <Base/Math/Vector3.hh>
00031 #include <Geometry/PMatrix.hh>
00032
00033 #include <Gui/CameraViewExternals.hh>
00034 #include <Gui/CameraViewInternals.hh>
00035
00036 #include <wx/wx.h>
00037
00038
00039 namespace BIAS {
00040
00041   enum Navigationmode {
00042     modeAxis1=1<<0
00043     ,modeAxis2=1<<1
00044     ,modeAxis3=1<<2
00045     //Mouse_Left
00046     //,Mouse_Right
00047     //ExamineTrackballmode
00048     //InspectionMoveCAbsolute=0
00049     //,InspectionMoveViewAtAbsolute
00050     //,InspectionModeRelative
00051     //,FlyMode
00052     //,PMatrixMode
00053   };
00054
00055
00056   /** \brief base for (interactively) manipulating a (virtual) camera view.
00057   Typically used by OpenGL as a glulookat Update.
00058   Navigator would be a good name, too.
00059   \author Jan Woetzel */
00060   class CameraViewController {
00061   public:
00062     virtual ~CameraViewController(); ///< destructor
00063
00064     // ctors
00065     CameraViewController();
00066
00067     /// any constructor should call this function
00068     /// to initialize all data members (e.g. pointers to NULL)
00069     virtual void InitMembers();
00070
00071     virtual void DisplayGL();
00072     virtual void DisplayGLInternal();
00073     virtual void DisplayGLExternal();
00074
00075     /** map update of one axis (mouse wheel, delta, key...)
00076     maps delta (e.g. mouse dragging motion or wheel) to pose update
00077     depending on current mode JW */
00078     //virtual void Update(const unsigned int axisNo
00079     //  ,const double & delta
00080     //  ,const bool useCurrentMode=true
00081     //  ,const int alternativeMode = -1
00082     //  );
00083
00084     //virtual void DisplayViewAt(const float & size=1.0f);
00085
00086     //virtual void Set(BIAS::PMatrix & P,
00087     //  const unsigned int w,
00088     //  const unsigned int h,
00089     //  const float & zNear,
00090     //  const float & zFar );
00091
00092     //void SetAspect();
00093
00094     std::ostream & Print(std::ostream & os=std::cout );
00095
00096     /** interaction area size */
00097     void SetSize(const BIAS::Vector2<double> & sz){
00098       this->size = sz; // dim
00099     };
00100
00101     ///** toplevel entry for all motion controllers */
00102     //void Motion(const BIAS::Vector2<double> & pos,
00103     //  const bool & isStart=false);
00104
00105     /** mouse start position, usually on leftclick */
00106     void SetStartPos(const BIAS::Vector2<double> & pos);
00107
00108
00109     inline CameraViewExternals GetExternals() const {
00110       BIASASSERT(p_externals!=NULL);
00111       return *p_externals;
00112     }
00113     inline CameraViewExternals & GetExternals(){
00114       BIASASSERT(p_externals!=NULL);
00115       return *p_externals;
00116     }
00117
00118     inline CameraViewInternals GetInternals() const {
00119       BIASASSERT(p_internals!=NULL);
00120       return *p_internals;
00121     }
00122     inline CameraViewInternals & GetInternals(){
00123       BIASASSERT(p_internals!=NULL);
00124       return *p_internals;
00125     }
00126
00127     //
00128     // different controller implementations:
00129     //
00130
00131     /// simple translation
00132     void MotionTranslation(const BIAS::Vector2<double> & pos);
00133
00134     void MotionTranslationForward(const BIAS::Vector2<double> & pos);
00135
00136     void MotionTrackballRotation(const BIAS::Vector2<double> & pos);
00137
00138     void MoveToCenter(const double & fraction);
00139
00140     // deltaN is normalized 2D coord
00141     void MoveOrbit(const BIAS::Vector2<double> & deltaN);
00142
00143   protected:
00144     BIAS::CameraViewExternals * p_externals;
00145     BIAS::CameraViewInternals * p_internals;
00146
00147     // Navigationmode mode_;
00148
00149     BIAS::Vector2<double>  size; // of interaction area, usually viewport
00150
00151     BIAS::Vector2<double>  startpos; // origin   on click/start of motion
00152     CameraViewExternals startposExt; // internal on click/start of motion
00153     CameraViewInternals startposInt;
00154
00155   }; // CameraViewController
00156 } // namespace BIAS
00157 #endif // __CameraViewController_h__
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewExternals.cpp Source File

Gui

CameraViewExternals.cpp

Go to the documentation of this file.
00001 #include "CameraViewExternals.hh"
00002 #include <iostream>
00003 #include <Base/Debug/Error.hh>
00004 #include <Base/Debug/DebugSimple.hh>
00005
00006 #ifdef BIAS_HAVE_OPENGL
00007 #  include <Gui/biasgl.h>
00008 #endif //BIAS_HAVE_OPENGL
00009
00010
00011 using namespace std;
00012 using namespace BIAS;
00013
00014
00015 CameraViewExternals::CameraViewExternals()
00016 {
00017   InitMembers();
00018 }
00019
00020 CameraViewExternals::CameraViewExternals(const BIAS::Vector3<double> & vC,
00021                                          const BIAS::Vector3<double> & vup,
00022                                          const BIAS::Vector3<double> & vviewAt)
00023                                          : C(vC), up(vup), viewAt(vviewAt)
00024 {}
00025
00026
00027 std::ostream & BIAS::CameraViewExternals::Print(std::ostream & os)
00028 {
00029   os<<"CameraViewExternals : "<<endl
00030     <<"C      "<<C<<endl
00031     <<"viewAt "<<viewAt<<endl
00032     <<"up     "<<up<<endl
00033     <<endl;
00034   return os;
00035 }
00036
00037 #ifdef BIAS_HAVE_OPENGL
00038 void BIAS::CameraViewExternals::DisplayGL() const
00039 {
00040   glMatrixMode(GL_MODELVIEW);
00041   glLoadIdentity();
00042   gluLookAt(
00043     (GLdouble)C[0],
00044     (GLdouble)C[1],
00045     (GLdouble)C[2],
00046     (GLdouble)viewAt[0],
00047     (GLdouble)viewAt[1],
00048     (GLdouble)viewAt[2],
00049     (GLdouble)up[0],
00050     (GLdouble)up[1],
00051     (GLdouble)up[2]
00052     );
00053 }
00054
00055 void BIAS::CameraViewExternals::DisplayViewAt(const double & size) const
00056 {
00057   glMatrixMode(GL_MODELVIEW);
00058   glPushMatrix();
00059   glPushAttrib(GL_POINT_BIT);
00060   glPointSize(7);
00061   glColor3f(1.0, 0.0, 1.0);
00062   glBegin(GL_POINTS);
00063   glVertex3dv(&viewAt[0]);
00064   glEnd();
00065   glPopAttrib();
00066   glPopMatrix();
00067 }
00068 #endif // BIAS_HAVE_OPENGL
00069
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewExternals.hh Source File

Gui

CameraViewExternals.hh

Go to the documentation of this file.
00001 #ifndef __CameraViewExternals_h__
00002 #define __CameraViewExternals_h__
00003
00004 // ----------------------------------------------------------
00005 // @author Jan Woetzel 09/2003
00006 #include <bias_config.h>
00007 #include <iostream>
00008 // BIAS
00009 #include <Base/Math/Vector3.hh>
00010
00011
00012 namespace BIAS {
00013
00014   /** \brief describes external params of a camera view, e.g. OpenGL
00015   It is manipulated by controller classe, e.g. trackball.
00016   \author Jan Woetzel */
00017   class BIASGui_EXPORT CameraViewExternals {
00018   public:
00019     virtual ~CameraViewExternals(){}; ///< destructor
00020
00021     // ctors
00022     CameraViewExternals();
00023
00024     CameraViewExternals(const BIAS::Vector3<double> & C,
00025       const BIAS::Vector3<double> & up,
00026       const BIAS::Vector3<double> & viewAt);
00027
00028
00029     std::ostream & Print(std::ostream & os=std::cout );
00030
00031 #ifdef BIAS_HAVE_OPENGL
00032     void DisplayGL() const;
00033     void DisplayViewAt(const double & size=1.0) const;
00034 #endif // BIAS_HAVE_OPENGL
00035
00036     void InitMembers()
00037     {
00038       C.Set(0,0,1);
00039       up.Set(0,1,0);
00040       viewAt.SetZero();
00041     }
00042
00043   public:
00044     // external params : pose
00045     BIAS::Vector3<double> C;
00046     BIAS::Vector3<double> up;
00047     BIAS::Vector3<double> viewAt;
00048
00049   }; // CameraViewExternals
00050
00051
00052
00053 } // namespace BIAS
00054 #endif
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewFrustum.cpp Source File

Gui

CameraViewFrustum.cpp

Go to the documentation of this file.
00001 #include "CameraViewFrustum.hh"
00002 #include <Base/Common/W32Compat.hh>
00003 #include <Base/Debug/Error.hh>
00004
00005
00006 #include <iostream>
00007 #include <math.h>
00008
00009 #ifdef BIAS_HAVE_OPENGL
00010 #  include <Gui/biasgl.h>
00011 #endif
00012
00013
00014 using namespace std;
00015 using namespace BIAS;
00016
00017
00018 BIAS::CameraViewFrustum::CameraViewFrustum()
00019 {
00020   InitMembers();
00021 }
00022
00023
00024 double BIAS::CameraViewFrustum::GetFovY() const {
00025   // unsymmetric frustum calculated separately
00026   double fovY = fabs(atan2(top, zNear)); // y,x ; y/x
00027   fovY += fabs(atan2(bottom, zNear));
00028   // convert from rad to degree
00029   fovY *= 180. / M_PI;
00030   return fovY;
00031 }
00032
00033 double BIAS::CameraViewFrustum::GetFovX() const {
00034   double fovX = fabs(atan2(left,zNear)); // y,x
00035   fovX += fabs(atan2(right,zNear));
00036   fovX *= 180. / M_PI;
00037   return fovX;
00038 }
00039
00040 double BIAS::CameraViewFrustum::GetAspect() const {
00041   const double w = right - left;
00042   const double h = top - bottom;
00043   BIASASSERT(h!=0);
00044   return w/h;
00045 }
00046
00047 void BIAS::CameraViewFrustum::SetPerspective(const double & fovYdeg,
00048                                              const double & fovAspect,
00049                                              const double & zNearX,
00050                                              const double & zFarX)
00051 {
00052   // set symmetric frustum like glulookat does
00053   this->zNear= zNearX;
00054   this->zFar = zFarX;
00055   top    = this->zNear * tan(fovYdeg/2. *M_PI/180.);
00056   bottom = -top;
00057   right  = fovAspect * top;
00058   left   = - right;
00059 }
00060
00061
00062 std::ostream & BIAS::CameraViewFrustum::Print(std::ostream & os) const
00063 {
00064   os<<"CameraViewFrustum: "<<endl
00065     <<"left   "<<left<<endl
00066     <<"right  "<<right<<endl
00067     <<"bottom "<<bottom<<endl
00068     <<"top    "<<top<<endl
00069     <<"near   "<<zNear<<endl
00070     <<"far    "<<zFar<<endl
00071     ;
00072   return os;
00073 }
00074
00075
00076 #ifdef BIAS_HAVE_OPENGL
00077 void BIAS::CameraViewFrustum::DisplayGL() const
00078 {
00079   glMatrixMode(GL_PROJECTION);
00080   glLoadIdentity();
00081   //gluPerspective( (GLdouble)GetFovY(), (GLdouble)GetAspect(), (GLdouble)zNear, (GLdouble)zFar);
00082   glFrustum(
00083     (GLdouble) left,
00084     (GLdouble) right,
00085     (GLdouble) bottom,
00086     (GLdouble) top,
00087     (GLdouble) zNear,
00088     (GLdouble) zFar
00089     );
00090   glMatrixMode(GL_MODELVIEW);
00091 }
00092 #endif // BIAS_HAVE_OPENGL
00093
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewFrustum.hh Source File

Gui

CameraViewFrustum.hh

Go to the documentation of this file.
00001 #ifndef __CameraViewFrustum_h__
00002 #define __CameraViewFrustum_h__
00003
00004 #include <bias_config.h>
00005 #include <iostream>
00006
00007
00008 namespace BIAS {
00009
00010   /** \brief describes internal parameter Frustum of an (OpenGL) camera view
00011
00012   \author Jan Woetzel 09/2003 */
00013   class BIASGui_EXPORT CameraViewFrustum {
00014   public:
00015     virtual ~CameraViewFrustum(){}; ///< destructor
00016
00017     /// ctors
00018     CameraViewFrustum();
00019
00020     /// sets a symmetric, centered frustum like gluPerspective does
00021     /// fovYdeg is the y field of view in degree.
00022     void SetPerspective(const double & fovYdeg,
00023       const double & fovAspect,
00024       const double & zNear=1.,
00025       const double & zFar=1000.);
00026
00027
00028     /// @return the approximate field of view in degree
00029     double GetFovY() const;
00030     double GetFovX() const;
00031
00032     /// @return aspect ratio x/y of field of image size (NOT field of view)
00033     double GetAspect() const;
00034
00035
00036     std::ostream & Print(std::ostream & os=std::cout ) const;
00037
00038 #ifdef BIAS_HAVE_OPENGL
00039     void DisplayGL() const;
00040 #endif // BIAS_HAVE_OPENGL
00041
00042     void InitMembers(){
00043       this->zNear = 0.1;
00044       this->zFar  = 1000.;
00045
00046       this->left   = -1. *zNear;
00047       this->right  = -left;
00048       this->bottom = -1. *zNear;
00049       this->top    = -bottom;
00050     }
00051
00052   public:
00053     double left;
00054     double right;
00055     double bottom;
00056     double top;
00057
00058     double zNear;
00059     double zFar;
00060
00061   }; // CameraViewFrustum
00062 } // namespace BIAS
00063 #endif
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewInternals.cpp Source File

Gui

CameraViewInternals.cpp

Go to the documentation of this file.
00001 #include "CameraViewInternals.hh"
00002 #include <iostream>
00003 #include <Base/Debug/Error.hh>
00004 #include <Base/Debug/DebugSimple.hh>
00005
00006 using namespace std;
00007 using namespace BIAS;
00008
00009 std::ostream & BIAS::CameraViewInternals::Print(std::ostream & os ) const
00010 {
00011   os<<"CameraViewInternals : "<<endl;
00012   frustum.Print(os);  os<<endl;
00013   viewport.Print(os); os<<endl;
00014   return os;
00015 }
00016
00017 void BIAS::CameraViewInternals::InitMembers()
00018 {
00019   frustum.InitMembers();
00020   viewport.InitMembers();
00021 }
00022
00023 #ifdef BIAS_HAVE_OPENGL
00024 #include <Gui/biasgl.h>
00025 void BIAS::CameraViewInternals::DisplayGL() const
00026 {
00027   frustum.DisplayGL();
00028   viewport.DisplayGL();
00029 }
00030 #endif // BIAS_HAVE_OPENGL
00031
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewInternals.hh Source File

Gui

CameraViewInternals.hh

Go to the documentation of this file.
00001 #ifndef __CameraViewInternals_h__
00002 #define __CameraViewInternals_h__
00003
00004 #include <bias_config.h>
00005 #include <iostream>
00006 #include <Gui/CameraViewFrustum.hh>
00007 #include <Gui/CameraViewport.hh>
00008
00009
00010 namespace BIAS {
00011
00012   /** \brief describes internal params of an (OpenGL) camera view
00013
00014   It is manipulated by controller classes.
00015   \author Jan Woetzel 09/2003 */
00016   class BIASGui_EXPORT CameraViewInternals {
00017   public:
00018     virtual ~CameraViewInternals(){}; ///< destructor
00019
00020     // ctors
00021     CameraViewInternals(){}
00022
00023     void InitMembers();
00024
00025     std::ostream & Print(std::ostream & os=std::cout ) const;
00026
00027 #ifdef BIAS_HAVE_OPENGL
00028     void DisplayGL() const;
00029 #endif //BIAS_HAVE_OPENGL
00030
00031   public:
00032     CameraViewFrustum frustum;
00033     CameraViewport    viewport;
00034
00035   }; // CameraViewInternals
00036 } // namespace BIAS
00037 #endif
00038
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewport.cpp Source File

Gui

CameraViewport.cpp

Go to the documentation of this file.
00001 #include "CameraViewport.hh"
00002 #include <Base/Common/W32Compat.hh>
00003 #include <Base/Debug/Error.hh>
00004
00005 #include <iostream>
00006
00007 #ifdef BIAS_HAVE_OPENGL
00008 #  include <Gui/biasgl.h>
00009 #endif // BIAS_HAVE_OPENGL
00010
00011
00012 using namespace std;
00013 using namespace BIAS;
00014
00015
00016 CameraViewport::CameraViewport()
00017 {
00018   InitMembers();
00019 }
00020
00021 CameraViewport::CameraViewport(const int vx0, const int vy0, const unsigned int vwidth, const unsigned int vheight )
00022 : x0(vx0), y0(vy0), width(vwidth), height(vheight)
00023 {}
00024
00025 void CameraViewport::InitMembers()
00026 {
00027   x0=y0=0;
00028   width=height=256;
00029 }
00030
00031 double BIAS::CameraViewport::GetAspect() const
00032 {
00033   BIASASSERT(height!=0);
00034   return width / height;
00035 }
00036
00037
00038 std::ostream & BIAS::CameraViewport::Print(std::ostream & os) const
00039 {
00040   os<<"CameraViewport: "<<endl
00041     <<"x0     "<<x0<<endl
00042     <<"y0     "<<y0<<endl
00043     <<"width  "<<width<<endl
00044     <<"height "<<height<<endl
00045     ;
00046   return os;
00047 }
00048
00049
00050 #ifdef BIAS_HAVE_OPENGL
00051 void BIAS::CameraViewport::DisplayGL() const
00052 {
00053   glViewport(
00054     (GLint)x0
00055     ,(GLint)y0
00056     ,(GLsizei)width
00057     ,(GLsizei)height
00058     );
00059 }
00060 #endif // BIAS_HAVE_OPENGL
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/CameraViewport.hh Source File

Gui

CameraViewport.hh

Go to the documentation of this file.
00001 #ifndef __CameraViewport_h__
00002 #define __CameraViewport_h__
00003
00004 #include <bias_config.h>
00005 #include <iostream>
00006
00007
00008 namespace BIAS {
00009
00010   /** \brief describes internal parameter viewport of an (OpenGL) camera view
00011
00012   \author Jan Woetzel 09/2003 */
00013   class BIASGui_EXPORT CameraViewport {
00014   public:
00015     virtual ~CameraViewport(){}; ///< destructor
00016
00017     // ctors
00018     CameraViewport();
00019
00020     CameraViewport(const int vx0, int vy0, unsigned int vwidth, unsigned int height );
00021
00022
00023     double GetAspect() const;
00024
00025     std::ostream & Print(std::ostream & os=std::cout ) const;
00026
00027     void InitMembers();
00028
00029 #ifdef BIAS_HAVE_OPENGL
00030     void DisplayGL() const;
00031 #endif // BIAS_HAVE_OPENGL
00032
00033   public:
00034     int x0; //< origin in scroen coords
00035     int y0;
00036     unsigned int width; //< dim in screen coords
00037     unsigned int height;
00038
00039   }; // CameraViewFrustum
00040
00041
00042
00043
00044 } // namespace BIAS
00045 #endif
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: CHANGELOG Source File

CHANGELOG

Go to the documentation of this file.
00001 Changelog for BIAS
00002
00003 BIAS 2.4 (2006-06-21)
00004 fixed error in copy constructor of ROI
00005 Added loading of Mathematica Real32 images (32 bit float)
00006 Added projection concept as a generalisatiion of PMatrix:
00007   support for fisheye camera and radial distortion
00008 Added vector transformation classes and pose, pose parametrisation
00009 Added Unscented Transform for covariance propagation
00010 Added generic VideoSource (dcam, disc, shared memory, ...)
00011 Compile as Windows DLL, tested with MSVS .net 2003 (7.1)
00012 Compile with MSVS 2005 (8.0)
00013 Configure with cmake 2.4.2
00014 Compiles with gcc 4.1
00015
00016
00017 BIAS 2.3
00018 added biasshowepiwx to evaluate epipolar geometry
00019 OpenCV support added:
00020   -Bias2Ipl:  wrapper to use BIAS images with OpenCV algorithms.
00021   -draw Text into images
00022 ImageIO
00023   -added support to read+write many more file formats, e.g.
00024   -OpenEXR .exr including load+save of 8,16,32 bit per pixel.
00025   -PNM with 16 bit support using ImageMagick (PBM,PGM,PNM 1/8/16 bit)
00026   -DevIL support including load+save of DDS formats (DirectDraw surface)
00027   -ExportImage can determine FileType by filename (on FF_auto), now
00028 OpenGLCanvas and ImageCanvasGL implementations new in Gui
00029  -Nvidia consumer stereo interface StereoI added
00030 ImageIO: FF_auto added, the ideal format is determined by filename extension
00031 BackwardMapping and derived rectification/warping/transformation classes
00032  handle image resampling in unified way (supports software anti-aliasing)
00033 ImageBase::StealImage bug fixed which deleted metadata
00034 separated HMatrix/HMatrixEstimation and added affine estimation
00035
00036
00037 BIAS 2.2 (2005-07-15)
00038
00039 removed fortran minpack (now only c version)
00040 added biasprojection, enhanced biasshowepi and biasmerge
00041 added Filters: Median and GradientSimple, fixed: Label(CCA)
00042 Covariance added to PMatrix
00043 clean-up of "using namespace" in headers
00044 added KLT affine
00045
00046
00047 BIAS 2.1 (2005-03-16)
00048
00049 can read BBC free-d data
00050 fixed color model bug in ImageBase::operator=(ImageBase)
00051 cleanup of camera meta data
00052 bicubic interpolation in images
00053 planar patches in 3D scenes (VRML/GL)
00054 extended HomgPlane3D
00055 added 2D fft
00056
00057
00058 BIAS 2.0 (2004-12-30)
00059
00060 KLT tracker working
00061
00062
00063
00064 BIAS 2.0 RC1 (2004-12-22)
00065
00066 After many changes this version indicates an API/feature freeze. May
00067 be not all bugs are fixed, but until version 2.0 no new features are
00068 added. Major changes:
00069  - changed build system to CMake
00070  - New supported platform: Win32
00071  - reimplementation of Filter (after intermediate Filter2 phase)
00072  - added documentation
00073 Note:
00074 The KLT tracker implementation is still (partially) untested and may not be
00075 correct.
00076
00077
00078 BIAS 1.5 (2004-x-y)
00079
00080 First "official release"
00081
00082
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/changelog.dox File Reference

Doc/changelog.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Cholesky.cpp Source File

Base » Math

Cholesky.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Cholesky.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 Cholesky::Cholesky(Matrix<double> &A)
00032 {
00033   if ( TNT::Cholesky_upper_factorization(A, L) == 0 )
00034     exists = true;
00035   else
00036     exists = false;
00037 }
00038
00039 bool Cholesky::decompositionExists()
00040 {
00041   return exists;
00042 }
00043
00044 Matrix<double> Cholesky::upperTriangle()
00045 {
00046   return L;
00047 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/cholesky.h Source File

Base » Math » tnt

cholesky.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 #ifndef CHOLESKY_H
00035 #define CHOLESKY_H
00036
00037 #include <cmath>
00038
00039 // index method
00040
00041 namespace TNT
00042 {
00043
00044
00045 //
00046 // Only upper part of A is used.  Cholesky factor is returned in
00047 // lower part of L.  Returns 0 if successful, 1 otherwise.
00048 //
00049 template <class SPDMatrix, class SymmMatrix>
00050 int Cholesky_upper_factorization(SPDMatrix &A, SymmMatrix &L)
00051 {
00052     Subscript M = A.dim(1);
00053     Subscript N = A.dim(2);
00054
00055     assert(M == N);                 // make sure A is square
00056
00057     // readjust size of L, if necessary
00058
00059     if (M != L.dim(1) || N != L.dim(2))
00060         L = SymmMatrix(N,N);
00061
00062     Subscript i,j,k;
00063
00064
00065     typename SPDMatrix::element_type dot=0;
00066
00067
00068     for (j=1; j<=N; j++)                // form column j of L
00069     {
00070         dot= 0;
00071
00072         for (i=1; i<j; i++)             // for k= 1 TO j-1
00073             dot = dot +  L(j,i)*L(j,i);
00074
00075         L(j,j) = A(j,j) - dot;
00076
00077         for (i=j+1; i<=N; i++)
00078         {
00079             dot = 0;
00080             for (k=1; k<j; k++)
00081                 dot = dot +  L(i,k)*L(j,k);
00082             L(i,j) = A(j,i) - dot;
00083         }
00084
00085         if (L(j,j) <= 0.0) return 1;
00086
00087         L(j,j) = sqrt( L(j,j) );
00088
00089         for (i=j+1; i<=N; i++)
00090             L(i,j) = L(i,j) / L(j,j);
00091
00092     }
00093
00094     return 0;
00095 }
00096
00097
00098
00099
00100 }
00101 // namespace TNT
00102
00103 #endif
00104 // CHOLESKY_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Cholesky.hh Source File

Base » Math

Cholesky.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Cholesky_hh_
00027 #define _Cholesky_hh_
00028
00029 #include "bias_config.h"
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Math/Matrix.hh>
00032 #include "tnt/cholesky.h"
00033
00034 namespace BIAS {
00035
00036   class BIASMathBase_EXPORT Cholesky
00037   {
00038   public:
00039     explicit Cholesky(Matrix<double> &A);
00040     ~Cholesky() {};
00041
00042     bool decompositionExists();
00043     Matrix<double> upperTriangle();
00044
00045   protected:
00046     Matrix<double> L;
00047     bool exists;
00048   };
00049 };
00050
00051 #endif /* _Cholesky_hh_ */
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

A Member List

This is the complete list of members for A, including all inherited members.

A() | A | [inline]
ALLOCATOR_IMPL(Base, A) | A |
Base(const string &name) | Base | [inline]
Base() | Base | [inline]
GetTag() const | Base | [inline]
Name_ | Base |
Who() | Base | [inline]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

B Member List

This is the complete list of members for B, including all inherited members.

ALLOCATOR_IMPL(Base, B) | B |
B() | B | [inline]
Base(const string &name) | Base | [inline]
Base() | Base | [inline]
GetTag() const | Base | [inline]
Name_ | Base |
Who() | Base | [inline]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Base Member List

This is the complete list of members for Base, including all inherited members.

Base(const string &name) | Base | [inline]
Base() | Base | [inline]
GetTag() const | Base | [inline]
Name_ | Base |
Who() | Base | [inline]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::AffineTransf Member List

This is the complete list of members for BIAS::AffineTransf, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
AffineTransf() | BIAS::AffineTransf |
BinRead(const char *filename) const | BIAS::Matrix< double > |
BinWrite(const char *filename) const | BIAS::Matrix< double > |
C_ | BIAS::AffineTransf | [protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const double &scalar) | BIAS::Matrix< double > |
GetC() const | BIAS::AffineTransf | [inline]
GetCol(const int &col) const | BIAS::Matrix< double > |
GetCols() const | BIAS::Matrix< double > | [inline]
GetData() const | BIAS::Matrix< double > | [inline]
GetDataArray() const | BIAS::Matrix< double > | [inline]
GetDataArray1() const | BIAS::Matrix< double > | [inline]
GetDataLast() const | BIAS::Matrix< double > | [inline]
GetMax() const | BIAS::Matrix< double > |
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > |
GetMean() const | BIAS::Matrix< double > |
GetMin() const | BIAS::Matrix< double > |
GetNumElements() const | BIAS::Matrix< double > | [inline]
GetR() const | BIAS::AffineTransf | [inline]
GetRow(const int &row) const | BIAS::Matrix< double > |
GetRows() const | BIAS::Matrix< double > | [inline]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > |
IsZero(double eps=0.0) const | BIAS::Matrix< double > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< double > |
LoadBan(const std::string &filename, const unsigned int &Time=0) | BIAS::Matrix3x4< double > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x4() | BIAS::Matrix3x4< double > | [inline]
Matrix3x4(const std::string &s) | BIAS::Matrix3x4< double > | [explicit]
Matrix3x4(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11) | BIAS::Matrix3x4< double > |
Matrix3x4(const MatrixInitType &i) | BIAS::Matrix3x4< double > | [inline, explicit]
Matrix3x4(const Matrix3x4< double > &A) | BIAS::Matrix3x4< double > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(Vector4< double > &argv, Vector4< double > &destv) | BIAS::AffineTransf |
BIAS::Matrix3x4< double >::Mult(const Vector4< double > &argvec, Vector3< double > &destvec) const | BIAS::Matrix3x4< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x4< double > |
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< double > |
NormalizeCols() | BIAS::Matrix< double > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > |
NormalizeRows() | BIAS::Matrix< double > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > |
NormFrobenius() const | BIAS::Matrix< double > | [inline]
NormL1() const | BIAS::Matrix< double > | [inline]
NormL2() const | BIAS::Matrix< double > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(HomgPoint3D &argv) | BIAS::AffineTransf |
BIAS::Matrix3x4< double >::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
BIAS::Matrix3x4< double >::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const AffineTransf &arg) | BIAS::AffineTransf |
BIAS::Matrix3x4< double >::operator=(const Matrix< double > &mat) | BIAS::Matrix3x4< double > |
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
R_ | BIAS::AffineTransf | [protected]
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< double > |
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > |
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsRotationMatrix(Matrix3x3< double > &R) | BIAS::AffineTransf |
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetIdentity() | BIAS::Matrix3x4< double > | [inline]
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetZero() | BIAS::Matrix< double > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline]
Trace() const | BIAS::Matrix< double > | [inline]
Transpose() const | BIAS::Matrix< double > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~AffineTransf() | BIAS::AffineTransf |
~Matrix() | BIAS::Matrix< double > | [virtual]
~Matrix3x4() | BIAS::Matrix3x4< double > | [virtual]

Generated on Wed Jun 21 19:06:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::AppData Member List

This is the complete list of members for BIAS::AppData, including all inherited members.

AppData() | BIAS::AppData |
AppData(const AppData &app) | BIAS::AppData |
CheckFormat() | BIAS::AppData |
Clear() | BIAS::AppData |
data | BIAS::AppData |
length | BIAS::AppData |
MD_ASCII_DATA enum value | BIAS::AppData |
MD_CVector enum value | BIAS::AppData |
MD_Focal_Length enum value | BIAS::AppData |
MD_GPS_Data enum value | BIAS::AppData |
MD_HomgPoint2D enum value | BIAS::AppData |
MD_Inertial_Sensor enum value | BIAS::AppData |
MD_Invalid enum value | BIAS::AppData |
MD_KMatrix enum value | BIAS::AppData |
MD_Orientation enum value | BIAS::AppData |
MD_PMatrix enum value | BIAS::AppData |
MD_Projection enum value | BIAS::AppData |
MD_PTU_Data enum value | BIAS::AppData |
MD_RMatrix enum value | BIAS::AppData |
MD_TimeStamp enum value | BIAS::AppData |
MD_USE_ASCII enum value | BIAS::AppData |
MD_UUID enum value | BIAS::AppData |
operator<<(std::ostream &os, const AppData &ad) | BIAS::AppData | [related]
operator=(const AppData &app) | BIAS::AppData |
operator>>(std::istream &is, AppData &ta) | BIAS::AppData | [related]
sdata | BIAS::AppData |
stag | BIAS::AppData |
tag | BIAS::AppData |
TAppData enum name | BIAS::AppData |
~AppData() | BIAS::AppData |

Generated on Wed Jun 21 19:06:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BackwardMapping< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::BackwardMapping< InputStorageType, OutputStorageType >, including all inherited members.

aliasing_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
alphaImg_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline]
BuildPyramid_(const Image< InputStorageType > &source, bool forceInit=true) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalcCoordOffset_(const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ChangeImgSize_(Image< OutputStorageType > &, const Image< InputStorageType > &) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ClipValue_(const double &value, OutputStorageType &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipValue_(const double &value, float &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetBoundingBox(unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
GetImageValue_(const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
height_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
interpolationType_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
Map(const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
Map(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
MapBi_(const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapTri_(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetX_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetY_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
pyramid_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
rangeChecked_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ROI_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
UpdatePyramidSize(const Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [virtual]
width_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]

Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BaseException Member List

This is the complete list of members for BIAS::BaseException, including all inherited members.

BaseException(const char *error_message) | BIAS::BaseException | [inline]
Message_ | BIAS::BaseException | [protected]
What() const | BIAS::BaseException | [inline, virtual]
~BaseException() | BIAS::BaseException | [inline]

Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BaseFactory< BaseClassType > Member List

This is the complete list of members for BIAS::BaseFactory< BaseClassType >, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddType(AllocatorFunctionPointer allocFunc) | BIAS::BaseFactory< BaseClassType > | [virtual]
AllocatorFunctionPointer typedef | BIAS::BaseFactory< BaseClassType > |
BaseFactory() | BIAS::BaseFactory< BaseClassType > |
Clear() | BIAS::BaseFactory< BaseClassType > | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Generate(const TagType &tag) const | BIAS::BaseFactory< BaseClassType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKnownTags(std::vector< TagType > &tags) const | BIAS::BaseFactory< BaseClassType > |
GetNearTag(const TagType &tag, TagType &t1, TagType &t2) | BIAS::BaseFactory< BaseClassType > |
GlobalDebugLevel | BIAS::Debug | [protected, static]
IsInMap_(const TagType &tag) const | BIAS::BaseFactory< BaseClassType > | [inline, protected]
Map_ | BIAS::BaseFactory< BaseClassType > | [protected]
operator<<(std::ostream &os, const BaseFactory< BaseClassType > &bf) | BIAS::BaseFactory< BaseClassType > | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~BaseFactory() | BIAS::BaseFactory< BaseClassType > | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Binomial< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Binomial< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::Binomial< InputStorageType, OutputStorageType > | [protected]
_CalculateKernel(int HalfWinSize) | BIAS::Binomial< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fm | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_HalfWinSize | BIAS::Binomial< InputStorageType, OutputStorageType > | [protected]
_LastHalfWinSize | BIAS::Binomial< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_tmpFloat | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_tmpInt | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Binomial() | BIAS::Binomial< InputStorageType, OutputStorageType > |
Binomial(Param &para, const std::string &postfix="") | BIAS::Binomial< InputStorageType, OutputStorageType > |
Binomial(Param &para, const int grp, const std::string &postfix) | BIAS::Binomial< InputStorageType, OutputStorageType > |
CalculationInFloat() const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
ConvFloatHori_(const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatVert_(const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntHori_(const Image< InputStorageType > &src, Image< CONV_INT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntVert_(const Image< CONV_INT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const std::string &postfix="") | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const int group_id, const std::string &postfix) | BIAS::Convolution< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > | [virtual]
Filter3x3(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > |
Filter3x3SameGreyFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > |
Filter3x3ValidGreyFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > |
Filter5x5(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > |
Filter5x5ValidGreyFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > |
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Binomial< InputStorageType, OutputStorageType > | [virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Binomial< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSize() const | BIAS::Binomial< InputStorageType, OutputStorageType > | [inline]
GetKernel(FilterMask &fm) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::Convolution< InputStorageType, OutputStorageType > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(int hws) | BIAS::Binomial< InputStorageType, OutputStorageType > | [inline]
SetKernel(FilterMask &fm) | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Binomial() | BIAS::Binomial< InputStorageType, OutputStorageType > |
~Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Bresenham Member List

This is the complete list of members for BIAS::Bresenham, including all inherited members.

_bInitialized | BIAS::Bresenham | [protected]
_dDx | BIAS::Bresenham | [protected]
_dDy | BIAS::Bresenham | [protected]
_eLineType | BIAS::Bresenham | [protected]
_iDx | BIAS::Bresenham | [protected]
_iDy | BIAS::Bresenham | [protected]
_iEnd | BIAS::Bresenham | [protected]
_iEps | BIAS::Bresenham | [protected]
_iStart | BIAS::Bresenham | [protected]
_iSym | BIAS::Bresenham | [protected]
_iTransformedCurrent | BIAS::Bresenham | [protected]
_iTransformedEnd | BIAS::Bresenham | [protected]
_iTransformedStart | BIAS::Bresenham | [protected]
Bresenham() | BIAS::Bresenham | [inline]
Bresenham(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
GetNext(int next[2]) | BIAS::Bresenham | [inline]
GetNext(unsigned int next[2]) | BIAS::Bresenham | [inline]
GetNext(double next[2]) | BIAS::Bresenham | [inline]
Init(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
Init(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
Init(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
~Bresenham() | BIAS::Bresenham | [inline]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BresenhamCircle Member List

This is the complete list of members for BIAS::BresenhamCircle, including all inherited members.

_bInitialized | BIAS::BresenhamCircle | [protected]
_iCenter | BIAS::BresenhamCircle | [protected]
_iCount | BIAS::BresenhamCircle | [protected]
_iCurrent | BIAS::BresenhamCircle | [protected]
_iD | BIAS::BresenhamCircle | [protected]
_iDeltaE | BIAS::BresenhamCircle | [protected]
_iDeltaSE | BIAS::BresenhamCircle | [protected]
_iRadius | BIAS::BresenhamCircle | [protected]
BresenhamCircle() | BIAS::BresenhamCircle | [inline]
BresenhamCircle(int center[2], int radius) | BIAS::BresenhamCircle | [inline]
GetNext(int next[2]) | BIAS::BresenhamCircle | [inline]
Init(int center[2], int radius) | BIAS::BresenhamCircle | [inline]
~BresenhamCircle() | BIAS::BresenhamCircle | [inline]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BresenhamCircleEighth Member List

This is the complete list of members for BIAS::BresenhamCircleEighth, including all inherited members.

_bInitialized | BIAS::BresenhamCircleEighth | [protected]
_iCenter | BIAS::BresenhamCircleEighth | [protected]
_iCurrent | BIAS::BresenhamCircleEighth | [protected]
_iD | BIAS::BresenhamCircleEighth | [protected]
_iDeltaE | BIAS::BresenhamCircleEighth | [protected]
_iDeltaSE | BIAS::BresenhamCircleEighth | [protected]
_iRadius | BIAS::BresenhamCircleEighth | [protected]
BresenhamCircleEighth() | BIAS::BresenhamCircleEighth | [inline]
BresenhamCircleEighth(int center[2], int radius) | BIAS::BresenhamCircleEighth | [inline]
GetNext(int next[2]) | BIAS::BresenhamCircleEighth | [inline]
Init(int center[2], int radius) | BIAS::BresenhamCircleEighth | [inline]
~BresenhamCircleEighth() | BIAS::BresenhamCircleEighth | [inline]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BresenhamCircleSlow Member List

This is the complete list of members for BIAS::BresenhamCircleSlow, including all inherited members.

_bInitialized | BIAS::BresenhamCircleSlow | [protected]
_BresCirc | BIAS::BresenhamCircleSlow | [protected]
_iCenter | BIAS::BresenhamCircleSlow | [protected]
_iCount | BIAS::BresenhamCircleSlow | [protected]
_iNext | BIAS::BresenhamCircleSlow | [protected]
_iRadius | BIAS::BresenhamCircleSlow | [protected]
_iZeroCenter | BIAS::BresenhamCircleSlow | [protected]
BresenhamCircleSlow() | BIAS::BresenhamCircleSlow | [inline]
BresenhamCircleSlow(int center[2], int radius) | BIAS::BresenhamCircleSlow | [inline]
GetNext(int next[2]) | BIAS::BresenhamCircleSlow | [inline]
Init(int center[2], int radius) | BIAS::BresenhamCircleSlow | [inline]
~BresenhamCircleSlow() | BIAS::BresenhamCircleSlow | [inline]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BSplineCurve Member List

This is the complete list of members for BIAS::BSplineCurve, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
BSplineCurve() | BIAS::BSplineCurve |
cPnts_ | BIAS::BSplineCurve | [protected]
CubicUniformBSpline(Vector2< double > &res, double t) | BIAS::BSplineCurve |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InitCubicUniformBSpline() | BIAS::BSplineCurve |
initializedCubic_ | BIAS::BSplineCurve | [protected]
initializedQuadratic_ | BIAS::BSplineCurve | [protected]
InitQuadraticUniformBSpline() | BIAS::BSplineCurve |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
QuadraticUniformBSpline(Vector2< double > &res, double t) | BIAS::BSplineCurve |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetControlPoints(std::vector< BIAS::Vector2< double > > &cPnt) | BIAS::BSplineCurve | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
xCoeff_ | BIAS::BSplineCurve | [protected]
yCoeff_ | BIAS::BSplineCurve | [protected]
~BSplineCurve() | BIAS::BSplineCurve | [inline]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Camera< StorageType > Member List

This is the complete list of members for BIAS::Camera< StorageType >, including all inherited members.

_C | BIAS::Camera< StorageType > | [protected]
_f | BIAS::Camera< StorageType > | [protected]
_K | BIAS::Camera< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MetaData | BIAS::ImageBase | [protected]
_Point | BIAS::Camera< StorageType > | [protected]
_R | BIAS::Camera< StorageType > | [protected]
_UID | BIAS::ImageBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AboveThresholdToValue(StorageType Threshold, StorageType Value) | BIAS::Image< StorageType > |
AbsDiff(const Image< StorageType > &im1, const Image< StorageType > &im2) | BIAS::Image< StorageType > |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AppendChannel(Image< StorageType > &img) | BIAS::Image< StorageType > |
ASCIIString_ | BIAS::Camera< StorageType > | [protected]
ASCIIValid_ | BIAS::Camera< StorageType > | [protected]
BelowThresholdToValue(StorageType Threshold, StorageType Value) | BIAS::Image< StorageType > |
BicubicInterpolation(const double &x, const double &y, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
BilinearInterpolation(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
BilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationGreyMinVal(const double x, const double y, const StorageType &minVal) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationRGBInterleaved(const double x, const double y, unsigned int channel) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationRGBPlanar(const double x, const double y, unsigned int channel) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationShiftRegion(const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer) | BIAS::Image< StorageType > | [inline]
Binarize(StorageType Threshold) | BIAS::Image< StorageType > |
BinaryThreshold(StorageType Threshold, StorageType MinValue, StorageType MaxValue) | BIAS::Image< StorageType > |
BitDepth_ | BIAS::ImageBase | [protected]
CalcScaleShift(double Min, double Max, double &Scale, double &Shift) const | BIAS::Image< StorageType > |
Camera() | BIAS::Camera< StorageType > |
Camera(const ImageBase &img) | BIAS::Camera< StorageType > | [explicit]
ChannelCount_ | BIAS::ImageBase | [protected]
Clear(const StorageType value=0) | BIAS::Image< StorageType > | [inline]
ClearDataPointer() | BIAS::ImageBase | [inline]
CM_Bayer_BGGR enum value | BIAS::ImageBase |
CM_Bayer_GBRG enum value | BIAS::ImageBase |
CM_Bayer_GRBG enum value | BIAS::ImageBase |
CM_Bayer_RGGB enum value | BIAS::ImageBase |
CM_BGR enum value | BIAS::ImageBase |
CM_BGRA enum value | BIAS::ImageBase |
CM_DV enum value | BIAS::ImageBase |
CM_Grey enum value | BIAS::ImageBase |
CM_GreyA enum value | BIAS::ImageBase |
CM_HSI_OBS enum value | BIAS::ImageBase |
CM_HSL enum value | BIAS::ImageBase |
CM_hsL enum value | BIAS::ImageBase |
CM_HSV enum value | BIAS::ImageBase |
CM_invalid enum value | BIAS::ImageBase |
CM_RGB enum value | BIAS::ImageBase |
CM_RGBA enum value | BIAS::ImageBase |
CM_RGBE enum value | BIAS::ImageBase |
CM_SymTensor2x2 enum value | BIAS::ImageBase |
CM_UYVY422 enum value | BIAS::ImageBase |
CM_YUV411 enum value | BIAS::ImageBase |
CM_YUV420P enum value | BIAS::ImageBase |
CM_YUV444 enum value | BIAS::ImageBase |
CM_YUYV422 enum value | BIAS::ImageBase |
ColorModel_ | BIAS::ImageBase | [protected]
CopyIn_NoInit(void *data) | BIAS::ImageBase |
Cut2ROI() | BIAS::ImageBase |
CValid_ | BIAS::Camera< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Depth_ | BIAS::ImageBase | [protected]
DimensionMatch(const BIAS::ImageBase &other) const | BIAS::ImageBase |
Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display(const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display() | BIAS::ImageBase |
EColorModel enum name | BIAS::ImageBase |
EStorageType enum name | BIAS::ImageBase |
FastBilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
FillImageWithConstValue(StorageType Value) | BIAS::Image< StorageType > |
FillImageWithConstValue(StorageType Value[]) | BIAS::Image< StorageType > |
FillImageWithXValue() | BIAS::Image< StorageType > |
Flip() | BIAS::ImageBase |
FlipHorizontal() | BIAS::ImageBase |
fValid_ | BIAS::Camera< StorageType > | [protected]
GetASCIIString() | BIAS::Camera< StorageType > | [inline]
GetBitDepth() const | BIAS::ImageBase | [inline]
GetC() | BIAS::Camera< StorageType > | [inline]
GetChannel(ImageBase &source, unsigned int channel) | BIAS::ImageBase |
GetChannelCount() const | BIAS::ImageBase | [inline]
GetChannelcount(const enum BIAS::ImageBase::EColorModel &colormodel) | BIAS::ImageBase | [static]
GetColorModel() const | BIAS::ImageBase | [inline]
GetCopyOfROI(ImageBase &copy) const | BIAS::ImageBase |
GetCopyOfROI2(ImageBase &copy) const | BIAS::ImageBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDepth() const | BIAS::ImageBase | [inline]
Getf() | BIAS::Camera< StorageType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::ImageBase | [inline]
GetImageData() const | BIAS::Image< StorageType > | [inline]
BIAS::ImageBase::GetImageData() | BIAS::ImageBase | [inline]
GetImageDataArray() const | BIAS::Image< StorageType > | [inline]
GetK() | BIAS::Camera< StorageType > | [inline]
GetMaxPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetMeanPixelValue(StorageType mean[]) | BIAS::Image< StorageType > |
GetMetaData() | BIAS::ImageBase | [inline]
GetMinMaxPixelValue(StorageType &min, StorageType &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetMinMaxPixelValueIgnoreRange(StorageType &min, StorageType &max, const StorageType ignoreStart=0, const StorageType ignoreEnd=0, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
GetMinPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetOrientation(float &o0, float &o1, float &o2) const | BIAS::Camera< StorageType > | [inline]
GetOrientation(BIAS::Vector3< double > &ori) const | BIAS::Camera< StorageType > | [inline]
GetP() | BIAS::Camera< StorageType > | [inline]
GetPixelCount() const | BIAS::ImageBase | [inline]
GetPixelNearestNeighbor(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
GetPixelNearestNeighbor(const float x, const float y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
GetPixelPosition(unsigned int x, unsigned int y, unsigned short int channel=0) const | BIAS::ImageBase | [inline]
GetProj() | BIAS::Camera< StorageType > | [inline]
GetR() | BIAS::Camera< StorageType > | [inline]
GetROI() | BIAS::ImageBase | [inline]
GetROI() const | BIAS::ImageBase | [inline]
GetROI(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROI(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROILowerRightX() const | BIAS::ImageBase |
GetROILowerRightY() const | BIAS::ImageBase |
GetROIUpperLeftX() const | BIAS::ImageBase |
GetROIUpperLeftY() const | BIAS::ImageBase |
GetSize() const | BIAS::ImageBase | [inline]
GetSize(const enum BIAS::ImageBase::EStorageType &storagetype) | BIAS::ImageBase | [static]
GetStorageType() const | BIAS::ImageBase | [inline]
GetTime(long int &sec, long int &usec) | BIAS::Camera< StorageType > | [inline]
GetTime() | BIAS::Camera< StorageType > | [inline]
GetUID() const | BIAS::ImageBase | [inline]
GetVersionNumber() const | BIAS::ImageBase | [inline]
GetWidth() const | BIAS::ImageBase | [inline]
GetWidthStep() const | BIAS::ImageBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::ImageBase | [protected]
Image() | BIAS::Image< StorageType > |
Image(unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true) | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > | [explicit]
Image() | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > |
Image(unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved) | BIAS::Image< StorageType > |
Image() | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > |
Image(unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved) | BIAS::Image< StorageType > |
ImageBase() | BIAS::ImageBase |
ImageBase(const ImageBase &im) | BIAS::ImageBase |
ImageBase(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
ImageData_ | BIAS::ImageBase | [protected]
ImageDataArray_ | BIAS::ImageBase | [protected]
Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::Image< StorageType > |
BIAS::ImageBase::Init(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
Init_() | BIAS::Camera< StorageType > | [protected]
InitWithForeignData(unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true) | BIAS::Image< StorageType > |
InterleavedDataOrder_ | BIAS::ImageBase | [protected]
InterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
InvalidateUID() | BIAS::ImageBase | [inline]
IsCValid() const | BIAS::Camera< StorageType > | [inline]
IsEmpty() const | BIAS::ImageBase | [inline]
IsfValid() const | BIAS::Camera< StorageType > | [inline]
IsInROI(double &x, double &y) const | BIAS::ImageBase | [inline]
IsInterleaved() const | BIAS::ImageBase | [inline]
IsKValid() const | BIAS::Camera< StorageType > | [inline]
IsOrientationValid() const | BIAS::Camera< StorageType > | [inline]
IsPlanar() const | BIAS::ImageBase | [inline]
IsPointValid() const | BIAS::Camera< StorageType > | [inline]
IsPositionInImage(const int &x, const int &y) const | BIAS::ImageBase | [inline]
IsPowerOfTwoSize() const | BIAS::ImageBase |
IsPowerOfTwoSize(const unsigned int w, const unsigned int h) | BIAS::ImageBase | [static]
IsProjValid() const | BIAS::Camera< StorageType > | [inline]
IsPValid() const | BIAS::Camera< StorageType > | [inline]
IsRValid() const | BIAS::Camera< StorageType > | [inline]
IsTimeValid() const | BIAS::Camera< StorageType > | [inline]
KValid_ | BIAS::Camera< StorageType > | [protected]
LinearInterpolation(const unsigned int x, const double y) const | BIAS::Image< StorageType > | [inline]
LinearInterpolation(const double x, const unsigned int y) const | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MoveToClosestPositionInImage(int &x, int &y) const | BIAS::ImageBase | [inline]
operator *(const StorageType &argimage) | BIAS::Image< StorageType > |
operator *(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator *=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator *=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator+(const StorageType &argimage) | BIAS::Image< StorageType > |
operator+(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator+=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator+=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator-(const StorageType &argimage) | BIAS::Image< StorageType > |
operator-(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator-=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator-=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator/(const StorageType &argimage) | BIAS::Image< StorageType > |
operator/(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator/=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator/=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator<<(std::ostream &os, const ImageBase &img) | BIAS::ImageBase | [friend]
operator=(const Camera< StorageType > &src) | BIAS::Camera< StorageType > |
BIAS::Image::operator=(const ImageBase &Source) | BIAS::Image< StorageType > |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const ImageBase &img) | BIAS::ImageBase | [inline]
operator>>(std::istream &is, ImageBase &img) | BIAS::ImageBase | [friend]
operator|(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator|(const Image< short int > &argimage) | BIAS::Image< StorageType > |
Orientation_ | BIAS::Camera< StorageType > | [protected]
OrientationValid_ | BIAS::Camera< StorageType > | [protected]
P_ | BIAS::Camera< StorageType > | [protected]
Pad(BIAS::ImageBase &dest, const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) const | BIAS::ImageBase |
Pad(const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwo(BIAS::ImageBase &dest, const int &padVal=0) const | BIAS::ImageBase |
PadToPowerOfTwo(const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwoAndFlip(const int &padVal=0) | BIAS::ImageBase |
ParseMetaData() | BIAS::Camera< StorageType > |
Paste2ROI(const ImageBase &Image) | BIAS::ImageBase |
PixelValue(const unsigned int x, const unsigned int y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
PixelValueBase(unsigned x, unsigned y, unsigned channel=0) | BIAS::ImageBase |
PixelValueInterleaved(const int x, const int y, const int channel=0) const | BIAS::Image< StorageType > | [inline]
PointValid_ | BIAS::Camera< StorageType > | [protected]
PowerOfTwoSize(const unsigned int &val) | BIAS::ImageBase | [static]
PowerOfTwoSize(unsigned int &width2, unsigned int &height2) const | BIAS::ImageBase |
PrintAppData(std::ostream &os) | BIAS::Camera< StorageType > |
PrintData(std::ostream &os) const | BIAS::Image< StorageType > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintHeader(std::ostream &os=std::cout) const | BIAS::ImageBase |
PrintPointer(std::ostream &os) const | BIAS::Image< StorageType > |
PrintROI(std::ostream &os=std::cout) const | BIAS::ImageBase |
Proj_ | BIAS::Camera< StorageType > | [protected]
ProjValid_ | BIAS::Camera< StorageType > | [protected]
PValid_ | BIAS::Camera< StorageType > | [protected]
Reciprocal(const float factor=1.0, const unsigned short int channel=0) | BIAS::Image< StorageType > |
RedirectImageDataPointer(void *data) | BIAS::ImageBase | [inline]
Release() | BIAS::Image< StorageType > |
ReleaseImageDataPointer() | BIAS::ImageBase | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Roi_ | BIAS::ImageBase | [protected]
RValid_ | BIAS::Camera< StorageType > | [protected]
SamePixelAndChannelCount(const ImageBase &Image) const | BIAS::ImageBase | [inline]
ScaleShift(double Scale, double Shift) | BIAS::Image< StorageType > |
ScaleShiftBetween(double Min, double Max) | BIAS::Image< StorageType > |
SetASCIIString(const std::string &ASCIIString) | BIAS::Camera< StorageType > | [inline]
SetBitDepth(unsigned bitdepth) | BIAS::ImageBase | [inline]
SetC(const Vector3< double > &C) | BIAS::Camera< StorageType > | [inline]
SetColorModel(EColorModel Model) | BIAS::ImageBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
Setf(const double &focal) | BIAS::Camera< StorageType > | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetInterleaved(bool interleaved) | BIAS::ImageBase | [inline]
SetK(const KMatrix &K) | BIAS::Camera< StorageType > | [inline]
SetMetaData(const MetaData &m) | BIAS::ImageBase | [inline]
SetOrientation(const float ori[3]) | BIAS::Camera< StorageType > | [inline]
SetOrientation(const BIAS::Vector3< double > &ori) | BIAS::Camera< StorageType > | [inline]
SetOutsideROIZero() | BIAS::ImageBase |
SetP(const PMatrix &matP) | BIAS::Camera< StorageType > | [inline]
SetPixel(const StorageType &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0) | BIAS::Image< StorageType > | [inline]
SetPixel(const StorageType &value0, const StorageType &value1, const StorageType &value2, const unsigned int &x, const unsigned int &y) | BIAS::Image< StorageType > | [inline]
SetProj(const Projection &Proj) | BIAS::Camera< StorageType > | [inline]
SetR(const RMatrix &R) | BIAS::Camera< StorageType > | [inline]
SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetTime(long int sec, long int usec) | BIAS::Camera< StorageType > | [inline]
SetTime(double sec) | BIAS::Camera< StorageType > | [inline]
SetUID(const BIAS::UUID &id) | BIAS::ImageBase | [inline]
SetZero() | BIAS::ImageBase | [inline]
ST_char enum value | BIAS::ImageBase |
ST_double enum value | BIAS::ImageBase |
ST_float enum value | BIAS::ImageBase |
ST_int enum value | BIAS::ImageBase |
ST_invalid enum value | BIAS::ImageBase |
ST_shortint enum value | BIAS::ImageBase |
ST_unsignedchar enum value | BIAS::ImageBase |
ST_unsignedint enum value | BIAS::ImageBase |
ST_unsignedshortint enum value | BIAS::ImageBase |
StealImage(ImageBase &source) | BIAS::ImageBase |
StorageType_ | BIAS::ImageBase | [protected]
TimeSec_ | BIAS::Camera< StorageType > | [protected]
TimeUSec_ | BIAS::Camera< StorageType > | [protected]
TimeValid_ | BIAS::Camera< StorageType > | [protected]
UnsetROI() | BIAS::ImageBase |
UpdateImageDataArrayFromImageData_() | BIAS::ImageBase | [protected]
UpdateMetaData() | BIAS::Camera< StorageType > |
Version_ | BIAS::ImageBase | [protected, static]
Width_ | BIAS::ImageBase | [protected]
WidthStep_ | BIAS::ImageBase | [protected]
ZeroPad(const unsigned int newwidth, const unsigned int newheight, unsigned char bgcolor=0) | BIAS::ImageBase |
~Camera() | BIAS::Camera< StorageType > |
~Debug() | BIAS::Debug | [inline]
~Image() | BIAS::Image< StorageType > | [virtual]
~ImageBase() | BIAS::ImageBase | [virtual]

Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraParam Member List

This is the complete list of members for BIAS::CameraParam, including all inherited members.

AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode) const | BIAS::CameraParam |
AddCameraDataToXMLTree(XMLIO &myXML, xmlNodePtr &rootNode) const | BIAS::CameraParam | [protected]
AngleCorrX_ | BIAS::CameraParam | [protected]
AngleCorrY_ | BIAS::CameraParam | [protected]
aspectratio_ | BIAS::CameraParam | [protected]
CameraParam() | BIAS::CameraParam |
CameraParam(const CameraParam &cp) | BIAS::CameraParam |
CameraParam(const KMatrix &K, const int w, const int h) | BIAS::CameraParam |
CameraParam(const std::string &filename) | BIAS::CameraParam |
CameraParam(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
CamID_ | BIAS::CameraParam | [protected]
CamModel_ | BIAS::CameraParam | [protected]
cellSizeX_ | BIAS::CameraParam | [protected]
cellSizeY_ | BIAS::CameraParam | [protected]
DebugOut() const | BIAS::CameraParam |
downsamplingFactor_ | BIAS::CameraParam | [protected]
focallengthDef_ | BIAS::CameraParam | [protected]
focallengthZoom_ | BIAS::CameraParam | [protected]
GetAngleCorrX() const | BIAS::CameraParam | [inline]
GetAngleCorrY() const | BIAS::CameraParam | [inline]
GetAspectratio() const | BIAS::CameraParam | [inline]
GetAspectRatio() const | BIAS::CameraParam | [inline]
GetCamID() const | BIAS::CameraParam | [inline]
GetCellSizeX() | BIAS::CameraParam | [inline]
GetCellSizeY() | BIAS::CameraParam | [inline]
GetDefaultUndistortion(double &f, double &kc1, double &kc2, double &kc3, double &kc4) const | BIAS::CameraParam | [inline]
GetDownsamplingFactor() | BIAS::CameraParam |
GetFocalLength() const | BIAS::CameraParam |
GetHeight() const | BIAS::CameraParam |
GetIlluCorrX() const | BIAS::CameraParam | [inline]
GetIlluCorrY() const | BIAS::CameraParam | [inline]
GetKMatrix() const | BIAS::CameraParam |
GetPrincipalX() const | BIAS::CameraParam |
GetPrincipalY() const | BIAS::CameraParam |
GetRadius() const | BIAS::CameraParam | [inline]
GetWidth() const | BIAS::CameraParam |
GetZoom() const | BIAS::CameraParam |
GetZoomUndistortion(std::vector< CPDiscreteParam > &vp) const | BIAS::CameraParam | [inline]
height_ | BIAS::CameraParam | [protected]
IlluCorrX_ | BIAS::CameraParam | [protected]
IlluCorrY_ | BIAS::CameraParam | [protected]
Init() | BIAS::CameraParam |
Init(const CameraParam &cp) | BIAS::CameraParam |
Init(const std::string &filename) | BIAS::CameraParam |
Init(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
InitPerspective(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InitSpherical(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InterpolateAbsZoom_() | BIAS::CameraParam | [protected]
InterpolateFocalLength_() | BIAS::CameraParam | [protected]
IsInitialized() const | BIAS::CameraParam |
IsInitialized_ | BIAS::CameraParam | [protected]
IsPerspective() const | BIAS::CameraParam | [inline]
IsSpherical() const | BIAS::CameraParam | [inline]
IsZoomCamera() const | BIAS::CameraParam |
kc1Def_ | BIAS::CameraParam | [protected]
kc2Def_ | BIAS::CameraParam | [protected]
kc3Def_ | BIAS::CameraParam | [protected]
kc4Def_ | BIAS::CameraParam | [protected]
knownparams_vect_ | BIAS::CameraParam | [protected]
LensIsSpherical_ | BIAS::CameraParam | [protected]
LensModel_ | BIAS::CameraParam | [protected]
MaxCamAngle_ | BIAS::CameraParam | [protected]
principalX_ | BIAS::CameraParam | [protected]
principalY_ | BIAS::CameraParam | [protected]
radius_ | BIAS::CameraParam | [protected]
ReadCameraData(const std::string &Filename) | BIAS::CameraParam |
ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadFromEXIF(const std::string &filename) | BIAS::CameraParam |
SetCellSize(const double CellSizeX, const double AspectRatio) | BIAS::CameraParam |
SetData_EVID31_147094() | BIAS::CameraParam |
SetData_OMNITECH_ORIFL_190_3() | BIAS::CameraParam |
SetDownsampling(const double factor) | BIAS::CameraParam |
SetFocalLength(const double f) | BIAS::CameraParam |
SetPrincipal(const double x, const double y) | BIAS::CameraParam |
SetRadius(double r) | BIAS::CameraParam | [inline]
SetSize(unsigned int w, unsigned int h) | BIAS::CameraParam | [inline]
SetUnzoomed() | BIAS::CameraParam |
SetZoom(const double abszoom) | BIAS::CameraParam |
SetZoomCamera(const bool zoomCam) | BIAS::CameraParam |
width_ | BIAS::CameraParam | [protected]
WriteCameraData(const std::string &Filename) const | BIAS::CameraParam |
zoom_ | BIAS::CameraParam | [protected]
zoomCamera_ | BIAS::CameraParam | [protected]
~CameraParam() | BIAS::CameraParam |

Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraViewController Member List

This is the complete list of members for BIAS::CameraViewController, including all inherited members.

CameraViewController() | BIAS::CameraViewController |
DisplayGL() | BIAS::CameraViewController | [virtual]
DisplayGLExternal() | BIAS::CameraViewController | [virtual]
DisplayGLInternal() | BIAS::CameraViewController | [virtual]
GetExternals() const | BIAS::CameraViewController | [inline]
GetExternals() | BIAS::CameraViewController | [inline]
GetInternals() const | BIAS::CameraViewController | [inline]
GetInternals() | BIAS::CameraViewController | [inline]
InitMembers() | BIAS::CameraViewController | [virtual]
MotionTrackballRotation(const BIAS::Vector2< double > &pos) | BIAS::CameraViewController |
MotionTranslation(const BIAS::Vector2< double > &pos) | BIAS::CameraViewController |
MotionTranslationForward(const BIAS::Vector2< double > &pos) | BIAS::CameraViewController |
MoveOrbit(const BIAS::Vector2< double > &deltaN) | BIAS::CameraViewController |
MoveToCenter(const double &fraction) | BIAS::CameraViewController |
p_externals | BIAS::CameraViewController | [protected]
p_internals | BIAS::CameraViewController | [protected]
Print(std::ostream &os=std::cout) | BIAS::CameraViewController |
SetSize(const BIAS::Vector2< double > &sz) | BIAS::CameraViewController | [inline]
SetStartPos(const BIAS::Vector2< double > &pos) | BIAS::CameraViewController |
size | BIAS::CameraViewController | [protected]
startpos | BIAS::CameraViewController | [protected]
startposExt | BIAS::CameraViewController | [protected]
startposInt | BIAS::CameraViewController | [protected]
~CameraViewController() | BIAS::CameraViewController | [virtual]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraViewExternals Member List

This is the complete list of members for BIAS::CameraViewExternals, including all inherited members.

C | BIAS::CameraViewExternals |
CameraViewExternals() | BIAS::CameraViewExternals |
CameraViewExternals(const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &up, const BIAS::Vector3< double > &viewAt) | BIAS::CameraViewExternals |
DisplayGL() const | BIAS::CameraViewExternals |
DisplayViewAt(const double &size=1.0) const | BIAS::CameraViewExternals |
InitMembers() | BIAS::CameraViewExternals | [inline]
Print(std::ostream &os=std::cout) | BIAS::CameraViewExternals |
up | BIAS::CameraViewExternals |
viewAt | BIAS::CameraViewExternals |
~CameraViewExternals() | BIAS::CameraViewExternals | [inline, virtual]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraViewFrustum Member List

This is the complete list of members for BIAS::CameraViewFrustum, including all inherited members.

bottom | BIAS::CameraViewFrustum |
CameraViewFrustum() | BIAS::CameraViewFrustum |
DisplayGL() const | BIAS::CameraViewFrustum |
GetAspect() const | BIAS::CameraViewFrustum |
GetFovX() const | BIAS::CameraViewFrustum |
GetFovY() const | BIAS::CameraViewFrustum |
InitMembers() | BIAS::CameraViewFrustum | [inline]
left | BIAS::CameraViewFrustum |
Print(std::ostream &os=std::cout) const | BIAS::CameraViewFrustum |
right | BIAS::CameraViewFrustum |
SetPerspective(const double &fovYdeg, const double &fovAspect, const double &zNear=1., const double &zFar=1000.) | BIAS::CameraViewFrustum |
top | BIAS::CameraViewFrustum |
zFar | BIAS::CameraViewFrustum |
zNear | BIAS::CameraViewFrustum |
~CameraViewFrustum() | BIAS::CameraViewFrustum | [inline, virtual]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraViewInternals Member List

This is the complete list of members for BIAS::CameraViewInternals, including all inherited members.

CameraViewInternals() | BIAS::CameraViewInternals | [inline]
DisplayGL() const | BIAS::CameraViewInternals |
frustum | BIAS::CameraViewInternals |
InitMembers() | BIAS::CameraViewInternals |
Print(std::ostream &os=std::cout) const | BIAS::CameraViewInternals |
viewport | BIAS::CameraViewInternals |
~CameraViewInternals() | BIAS::CameraViewInternals | [inline, virtual]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraViewport Member List

This is the complete list of members for BIAS::CameraViewport, including all inherited members.

CameraViewport() | BIAS::CameraViewport |
CameraViewport(const int vx0, int vy0, unsigned int vwidth, unsigned int height) | BIAS::CameraViewport |
DisplayGL() const | BIAS::CameraViewport |
GetAspect() const | BIAS::CameraViewport |
height | BIAS::CameraViewport |
InitMembers() | BIAS::CameraViewport |
Print(std::ostream &os=std::cout) const | BIAS::CameraViewport |
width | BIAS::CameraViewport |
x0 | BIAS::CameraViewport |
y0 | BIAS::CameraViewport |
~CameraViewport() | BIAS::CameraViewport | [inline, virtual]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CanCompare< T1, T2 > Member List

This is the complete list of members for BIAS::CanCompare< T1, T2 >, including all inherited members.

CanCompare() | BIAS::CanCompare< T1, T2 > | [inline]
Constraints(T1 a, T2 b) | BIAS::CanCompare< T1, T2 > | [inline, static]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CanCopy< T1, T2 > Member List

This is the complete list of members for BIAS::CanCopy< T1, T2 >, including all inherited members.

CanCopy() | BIAS::CanCopy< T1, T2 > | [inline]
Constraints(T1 a, T2 b) | BIAS::CanCopy< T1, T2 > | [inline, static]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CanMultiply< T1, T2, T3 > Member List

This is the complete list of members for BIAS::CanMultiply< T1, T2, T3 >, including all inherited members.

CanMultiply() | BIAS::CanMultiply< T1, T2, T3 > | [inline]
Constraints(T1 a, T2 b, T3 c) | BIAS::CanMultiply< T1, T2, T3 > | [inline, static]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CCAStruct Member List

This is the complete list of members for BIAS::CCAStruct, including all inherited members.

bc | BIAS::CCAStruct |
br | BIAS::CCAStruct |
CCAStruct() | BIAS::CCAStruct | [inline]
CCAStruct(const CCAStruct &s) | BIAS::CCAStruct | [inline]
center | BIAS::CCAStruct |
operator<(const CCAStruct &right) const | BIAS::CCAStruct | [inline]
operator=(const CCAStruct &s) | BIAS::CCAStruct | [inline]
operator==(const CCAStruct &right) const | BIAS::CCAStruct | [inline]
tl | BIAS::CCAStruct |
x | BIAS::CCAStruct |
y | BIAS::CCAStruct |

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Cholesky Member List

This is the complete list of members for BIAS::Cholesky, including all inherited members.

Cholesky(Matrix< double > &A) | BIAS::Cholesky | [explicit]
decompositionExists() | BIAS::Cholesky |
exists | BIAS::Cholesky | [protected]
L | BIAS::Cholesky | [protected]
upperTriangle() | BIAS::Cholesky |
~Cholesky() | BIAS::Cholesky | [inline]

Generated on Wed Jun 21 19:06:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ColorHarris Member List

This is the complete list of members for BIAS::ColorHarris, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CreateSTColor(Image< unsigned char > &im, Image< short > &st, const float sigma1, const float sigma2) | BIAS::ColorHarris |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
HarrisValue(Image< short > &st, Image< int > &res) | BIAS::ColorHarris |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ColorHistogram< StorageType > Member List

This is the complete list of members for BIAS::ColorHistogram< StorageType >, including all inherited members.

binCount_ | BIAS::ColorHistogram< StorageType > | [protected]
binSize_ | BIAS::ColorHistogram< StorageType > | [protected]
binSizeSat_ | BIAS::ColorHistogram< StorageType > | [protected]
CalcSimilarity(const BIAS::ColorHistogram< StorageType > chist) const | BIAS::ColorHistogram< StorageType > |
CalcSimilarity(const BIAS::ColorHistogram< StorageType > chist, double &weight) const | BIAS::ColorHistogram< StorageType > |
CheckImageQuality(float percent, float &shutter, float &gain) | BIAS::ColorHistogram< StorageType > |
CheckImageQualityComplete(float percent, float &shutter, float &gain) | BIAS::ColorHistogram< StorageType > |
CheckImageQualityRef(ColorHistogram< StorageType > &cHist, float percent, float &shutter, float &gain) | BIAS::ColorHistogram< StorageType > |
Clear() | BIAS::ColorHistogram< StorageType > |
ColorHistogram() | BIAS::ColorHistogram< StorageType > |
DeleteHist_() | BIAS::ColorHistogram< StorageType > | [protected]
Dump(std::ostream &os=std::cout) | BIAS::ColorHistogram< StorageType > |
DumpCSV(std::ostream &os=std::cout) | BIAS::ColorHistogram< StorageType > |
expDist_ | BIAS::ColorHistogram< StorageType > | [protected]
GenerateHist(BIAS::Image< StorageType > &image, int ux, int uy, int lx, int ly) | BIAS::ColorHistogram< StorageType > |
GenerateHist(BIAS::Image< StorageType > &image) | BIAS::ColorHistogram< StorageType > |
GetBinaryData(int &length) | BIAS::ColorHistogram< StorageType > |
GetBinSize() const | BIAS::ColorHistogram< StorageType > | [inline]
GetBinSizeSat() const | BIAS::ColorHistogram< StorageType > | [inline]
GetHeightROI() const | BIAS::ColorHistogram< StorageType > |
GetHist() const | BIAS::ColorHistogram< StorageType > |
GetHistL() const | BIAS::ColorHistogram< StorageType > |
GetNumberOfEntries() | BIAS::ColorHistogram< StorageType > |
GetROI(std::vector< int > &roi) const | BIAS::ColorHistogram< StorageType > |
GetSaturatedBins() const | BIAS::ColorHistogram< StorageType > |
GetWidthROI() const | BIAS::ColorHistogram< StorageType > |
hist_ | BIAS::ColorHistogram< StorageType > | [protected]
histCount_ | BIAS::ColorHistogram< StorageType > | [protected]
histl_ | BIAS::ColorHistogram< StorageType > | [protected]
image_ | BIAS::ColorHistogram< StorageType > | [protected]
lambda_ | BIAS::ColorHistogram< StorageType > | [protected]
luminance_ | BIAS::ColorHistogram< StorageType > |
lx_ | BIAS::ColorHistogram< StorageType > | [protected]
ly_ | BIAS::ColorHistogram< StorageType > | [protected]
maxBinVal_ | BIAS::ColorHistogram< StorageType > | [protected]
minBinVal_ | BIAS::ColorHistogram< StorageType > | [protected]
minSat_ | BIAS::ColorHistogram< StorageType > | [protected]
Normalise_() | BIAS::ColorHistogram< StorageType > | [protected]
normalised_ | BIAS::ColorHistogram< StorageType > | [protected]
Read(char *filename) | BIAS::ColorHistogram< StorageType > |
ReadBinaryData(char *data) | BIAS::ColorHistogram< StorageType > |
SetBinSize(int binsize) | BIAS::ColorHistogram< StorageType > |
SetBinSize(int binSizeHue, int binSizeSat) | BIAS::ColorHistogram< StorageType > |
SetExpDist(bool expdist) | BIAS::ColorHistogram< StorageType > | [inline]
SetLambda(int lambda) | BIAS::ColorHistogram< StorageType > | [inline]
SetMinSat(int minsat) | BIAS::ColorHistogram< StorageType > | [inline]
SetROI(int ux, int uy, int lx, int ly) | BIAS::ColorHistogram< StorageType > |
shift_ | BIAS::ColorHistogram< StorageType > | [protected]
shiftLum_ | BIAS::ColorHistogram< StorageType > | [protected]
shiftSat_ | BIAS::ColorHistogram< StorageType > | [protected]
Update(const BIAS::ColorHistogram< StorageType > &hist, double factor=0.5) | BIAS::ColorHistogram< StorageType > |
ux_ | BIAS::ColorHistogram< StorageType > | [protected]
uy_ | BIAS::ColorHistogram< StorageType > | [protected]
~ColorHistogram() | BIAS::ColorHistogram< StorageType > |

Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ColorMultiHistogram< StorageType > Member List

This is the complete list of members for BIAS::ColorMultiHistogram< StorageType >, including all inherited members.

binSize_ | BIAS::ColorMultiHistogram< StorageType > | [protected]
CalcSimilarity(const ColorMultiHistogram< StorageType > &chist) const | BIAS::ColorMultiHistogram< StorageType > |
CalcSimilarityColorWeighted(const BIAS::ColorMultiHistogram< StorageType > &chist) const | BIAS::ColorMultiHistogram< StorageType > |
Clear() | BIAS::ColorMultiHistogram< StorageType > |
ColorMultiHistogram() | BIAS::ColorMultiHistogram< StorageType > |
Dump(std::ostream &os=std::cout, std::ostream &os2=std::cout) | BIAS::ColorMultiHistogram< StorageType > |
GenerateHist(BIAS::Image< StorageType > &image) | BIAS::ColorMultiHistogram< StorageType > |
GenerateHist(BIAS::Image< unsigned char > &img) | BIAS::ColorMultiHistogram< StorageType > |
GetBinSize() const | BIAS::ColorMultiHistogram< StorageType > | [inline]
GetDistROIs(std::vector< double > &dist) const | BIAS::ColorMultiHistogram< StorageType > |
GetHist1() const | BIAS::ColorMultiHistogram< StorageType > |
GetHist2() const | BIAS::ColorMultiHistogram< StorageType > |
hist1_ | BIAS::ColorMultiHistogram< StorageType > | [protected]
hist2_ | BIAS::ColorMultiHistogram< StorageType > | [protected]
lambda_ | BIAS::ColorMultiHistogram< StorageType > | [protected]
minSat_ | BIAS::ColorMultiHistogram< StorageType > | [protected]
Read(char *filename1, char *filename2) | BIAS::ColorMultiHistogram< StorageType > |
SetBinSize(int binsize) | BIAS::ColorMultiHistogram< StorageType > |
SetLambda(int lambda) | BIAS::ColorMultiHistogram< StorageType > | [inline]
SetMinSat(int minsat) | BIAS::ColorMultiHistogram< StorageType > | [inline]
SetROI1(int ux, int uy, int lx, int ly) | BIAS::ColorMultiHistogram< StorageType > |
SetROI2(int ux, int uy, int lx, int ly) | BIAS::ColorMultiHistogram< StorageType > |
Update(const BIAS::ColorMultiHistogram< StorageType > &hist, double factor=0.5) | BIAS::ColorMultiHistogram< StorageType > |
~ColorMultiHistogram() | BIAS::ColorMultiHistogram< StorageType > |

Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ColorSegmentation Member List

This is the complete list of members for BIAS::ColorSegmentation, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ColorSegmentation() | BIAS::ColorSegmentation |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGreyImage(BIAS::Image< unsigned char > &imgGrey) | BIAS::ColorSegmentation |
GetHueImage(BIAS::Image< unsigned char > &imgHue) | BIAS::ColorSegmentation |
GetSatImage(BIAS::Image< unsigned char > &imgSat) | BIAS::ColorSegmentation |
GlobalDebugLevel | BIAS::Debug | [protected, static]
image | BIAS::ColorSegmentation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Segment(BIAS::Image< unsigned char > &src, BIAS::Image< unsigned char > &res, int hue, int hueIntervall, int minSaturation) | BIAS::ColorSegmentation |
Segment(const unsigned char **src, unsigned char **dst, const int tl[2], const int br[2], const int hue, const int hueIntervall, const int minSaturation) | BIAS::ColorSegmentation | [inline]
SetColorSpace(BIAS::ImageBase::EColorModel farbraum) | BIAS::ColorSegmentation |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
stdFarbRaum | BIAS::ColorSegmentation | [protected]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ColorSegmentationThreaded Member List

This is the complete list of members for BIAS::ColorSegmentationThreaded, including all inherited members.

Segment(BIAS::Image< unsigned char > &src, BIAS::Image< unsigned char > &res, int hue, int hueIntervall, int minSaturation) | BIAS::ColorSegmentationThreaded |
Segment_(void *data) | BIAS::ColorSegmentationThreaded | [protected, static]

Generated on Wed Jun 21 19:06:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Condensation Member List

This is the complete list of members for BIAS::Condensation, including all inherited members.

_doSecondOrderARP | BIAS::Condensation | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_randomArray | BIAS::Condensation | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddDiffusions_() | BIAS::Condensation | [protected, virtual]
AddOffsets_() | BIAS::Condensation | [protected, virtual]
CalculateBaseWeights_() | BIAS::Condensation | [protected, virtual]
CalculateMean_() | BIAS::Condensation | [inline, protected]
compdouble(const void *l, const void *r) | BIAS::Condensation | [inline, protected, static]
Condensation() | BIAS::Condensation |
correctionOfImportanceWeights_ | BIAS::Condensation | [protected]
cumulProbArray_ | BIAS::Condensation | [protected]
cumulProbArrayImportance_ | BIAS::Condensation | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
defaultInitFraction_ | BIAS::Condensation | [protected]
diffusionSigma_ | BIAS::Condensation | [protected]
EvaluateImportanceWeights() | BIAS::Condensation | [inline, virtual]
EvaluateObservationDensities()=0 | BIAS::Condensation | [pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMean() | BIAS::Condensation | [inline]
GetMeanWeight() const | BIAS::Condensation |
GetSamplePositions() | BIAS::Condensation | [inline]
GetVariance() const | BIAS::Condensation |
GetVariance(Vector< double > &var) const | BIAS::Condensation |
GetWeightedVariance(Vector< double > &var) const | BIAS::Condensation |
GlobalDebugLevel | BIAS::Debug | [protected, static]
importanceFraction_ | BIAS::Condensation | [protected]
indexTminus2_ | BIAS::Condensation | [protected]
Init(unsigned int nrSmaples) | BIAS::Condensation |
initial_ | BIAS::Condensation | [protected]
InitModelDefaults()=0 | BIAS::Condensation | [pure virtual]
InitPrior() | BIAS::Condensation |
InitPriorPositions(unsigned int nrOfInitSamples)=0 | BIAS::Condensation | [pure virtual]
mean_ | BIAS::Condensation | [protected]
meanTminus1_ | BIAS::Condensation | [protected]
Nsamples_ | BIAS::Condensation | [protected]
offSet_ | BIAS::Condensation | [protected]
oldIndices_ | BIAS::Condensation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PickImportanceSample_() | BIAS::Condensation | [inline, protected]
PickOneSample_() | BIAS::Condensation | [inline, protected]
PredictNewSamplePositions() | BIAS::Condensation |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Process() | BIAS::Condensation |
processFirstOrderScale_ | BIAS::Condensation | [protected]
processMean_ | BIAS::Condensation | [protected]
processSecondOrderScale_ | BIAS::Condensation | [protected]
random_ | BIAS::Condensation | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
sampleImportanceWeights_ | BIAS::Condensation | [protected]
samplePosNew_ | BIAS::Condensation | [protected]
samplePosOld_ | BIAS::Condensation | [protected]
samplePosTminus2_ | BIAS::Condensation | [protected]
sampleWeights_ | BIAS::Condensation | [protected]
SecondOrderARP_(unsigned int indexOldSample, Vector< double > &newSample) | BIAS::Condensation | [inline, protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultInitFraction(double fraction) | BIAS::Condensation |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetImportanceSampleFraction(double fraction) | BIAS::Condensation |
SetPredictionOffset(const BIAS::Vector< double > &offSet) | BIAS::Condensation | [inline]
SetProcessMean(const BIAS::Vector< double > &newProcessMean) | BIAS::Condensation | [inline]
stateDim_ | BIAS::Condensation | [protected]
sumOfImportanceWeights_ | BIAS::Condensation | [protected]
sumOfWeights_ | BIAS::Condensation | [protected]
~Condensation() | BIAS::Condensation | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CondensHisto Member List

This is the complete list of members for BIAS::CondensHisto, including all inherited members.

_doSecondOrderARP | BIAS::Condensation | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_randomArray | BIAS::Condensation | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddDiffusions_() | BIAS::Condensation | [protected, virtual]
AddOffsets_() | BIAS::Condensation | [protected, virtual]
areaMax_ | BIAS::CondensHisto | [protected]
areaMin_ | BIAS::CondensHisto | [protected]
bIntegralHisto_ | BIAS::CondensHisto | [protected]
CalculateBaseWeights_() | BIAS::Condensation | [protected, virtual]
CalculateMean_() | BIAS::Condensation | [inline, protected]
CheckImageQuality(double percent, int &shutter, int &gain) | BIAS::CondensHisto |
chist_ | BIAS::CondensHisto | [protected]
compdouble(const void *l, const void *r) | BIAS::Condensation | [inline, protected, static]
Condensation() | BIAS::Condensation |
CondensHisto() | BIAS::CondensHisto |
correctionOfImportanceWeights_ | BIAS::Condensation | [protected]
cumulProbArray_ | BIAS::Condensation | [protected]
cumulProbArrayImportance_ | BIAS::Condensation | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
defaultInitFraction_ | BIAS::Condensation | [protected]
diffScale_ | BIAS::CondensHisto | [protected]
diffScaleSize_ | BIAS::CondensHisto | [protected]
diffusionSigma_ | BIAS::Condensation | [protected]
DrawHistoSizes(Image< unsigned char > &img) | BIAS::CondensHisto |
DrawMean(BIAS::Image< unsigned char > &img) | BIAS::CondensHisto | [virtual]
DrawPosteriorDistribution(BIAS::Image< unsigned char > &img) | BIAS::CondensHisto |
DrawPosteriorDistribution(BIAS::Image< float > &img) | BIAS::CondensHisto |
DrawSamples(Image< unsigned char > &img) | BIAS::CondensHisto | [virtual]
DrawSamplesExt(Image< unsigned char > &img) | BIAS::CondensHisto |
DrawSamplesWhite(Image< unsigned char > &img) | BIAS::CondensHisto | [virtual]
DrawWeightedSamples(Image< float > &img) | BIAS::CondensHisto |
EvaluateFromIntegralHistoImage_() | BIAS::CondensHisto | [protected]
EvaluateImportanceWeights() | BIAS::Condensation | [inline, virtual]
EvaluateObservationDensities() | BIAS::CondensHisto | [virtual]
fImg_ | BIAS::CondensHisto | [protected]
firstOrderScale_ | BIAS::CondensHisto | [protected]
GetAktImage() | BIAS::CondensHisto |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxValue(Vector< double > &max) | BIAS::CondensHisto |
GetMaxVariance(Vector< double > &maxVar) | BIAS::CondensHisto |
GetMaxWeight(int &index) | BIAS::CondensHisto |
GetMean() | BIAS::Condensation | [inline]
GetMeanValue(Vector< double > &mean) | BIAS::CondensHisto |
GetMeanVariance(Vector< double > &meanVar) | BIAS::CondensHisto |
GetMeanWeight() const | BIAS::Condensation |
GetSamplePositions(Image< float > &sampleImg) | BIAS::CondensHisto |
BIAS::Condensation::GetSamplePositions() | BIAS::Condensation | [inline]
GetVariance() const | BIAS::Condensation |
GetVariance(Vector< double > &var) const | BIAS::Condensation |
GetWeightedVariance(Vector< double > &var) const | BIAS::Condensation |
GlobalDebugLevel | BIAS::Debug | [protected, static]
img_ | BIAS::CondensHisto | [protected]
importanceFraction_ | BIAS::Condensation | [protected]
indexTminus2_ | BIAS::Condensation | [protected]
Init(unsigned int nrSmaples) | BIAS::Condensation |
initial_ | BIAS::Condensation | [protected]
InitModelDefaults() | BIAS::CondensHisto | [virtual]
InitPrior() | BIAS::Condensation |
InitPriorPositions(unsigned int nrOfInitSamples) | BIAS::CondensHisto | [virtual]
intHisto_ | BIAS::CondensHisto | [protected]
m_dMaxRefHistoSize | BIAS::CondensHisto | [protected]
mean_ | BIAS::Condensation | [protected]
meanTminus1_ | BIAS::Condensation | [protected]
minWeight_ | BIAS::CondensHisto | [protected]
Nsamples_ | BIAS::Condensation | [protected]
offSet_ | BIAS::Condensation | [protected]
oldIndices_ | BIAS::Condensation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PickImportanceSample_() | BIAS::Condensation | [inline, protected]
PickOneSample_() | BIAS::Condensation | [inline, protected]
PredictNewSamplePositions() | BIAS::Condensation |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Process() | BIAS::Condensation |
processFirstOrderScale_ | BIAS::Condensation | [protected]
processMean_ | BIAS::Condensation | [protected]
processSecondOrderScale_ | BIAS::Condensation | [protected]
random_ | BIAS::Condensation | [protected]
refHisto2_ | BIAS::CondensHisto | [protected]
refHisto_ | BIAS::CondensHisto | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
sampleImportanceWeights_ | BIAS::Condensation | [protected]
samplePosNew_ | BIAS::Condensation | [protected]
samplePosOld_ | BIAS::Condensation | [protected]
samplePosTminus2_ | BIAS::Condensation | [protected]
sampleWeights_ | BIAS::Condensation | [protected]
secondHistPos_ | BIAS::CondensHisto | [protected]
SecondOrderARP_(unsigned int indexOldSample, Vector< double > &newSample) | BIAS::Condensation | [inline, protected]
secondOrderScale_ | BIAS::CondensHisto | [protected]
SetActiveImage(Image< unsigned char > &img) | BIAS::CondensHisto | [inline]
SetArea(Vector3< double > min, Vector3< double > max) | BIAS::CondensHisto |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultInitFraction(double fraction) | BIAS::Condensation |
SetDiffScale(double diff) | BIAS::CondensHisto | [inline]
SetDiffScaleSize(double diff) | BIAS::CondensHisto | [inline]
SetFirstOrderScale(double scale) | BIAS::CondensHisto | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetImportanceSampleFraction(double fraction) | BIAS::Condensation |
SetMinWeight(double min) | BIAS::CondensHisto | [inline]
SetMultiHistogram(bool multi) | BIAS::CondensHisto | [inline]
SetPredictionOffset(const BIAS::Vector< double > &offSet) | BIAS::Condensation | [inline]
SetProcessMean(const BIAS::Vector< double > &newProcessMean) | BIAS::Condensation | [inline]
SetReferenceHistogram(ColorHistogram< unsigned char > &refHisto) | BIAS::CondensHisto | [inline]
SetSecondOrderScale(double scale) | BIAS::CondensHisto | [inline]
stateDim_ | BIAS::Condensation | [protected]
sumOfImportanceWeights_ | BIAS::Condensation | [protected]
sumOfWeights_ | BIAS::Condensation | [protected]
UseIntegralHistogram(bool bIntHisto) | BIAS::CondensHisto |
useMultiHistogram_ | BIAS::CondensHisto | [protected]
~Condensation() | BIAS::Condensation | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CondensImg Member List

This is the complete list of members for BIAS::CondensImg, including all inherited members.

_doSecondOrderARP | BIAS::Condensation | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_randomArray | BIAS::Condensation | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddDiffusions_() | BIAS::Condensation | [protected, virtual]
AddOffsets_() | BIAS::Condensation | [protected, virtual]
areaMax_ | BIAS::CondensImg | [protected]
areaMin_ | BIAS::CondensImg | [protected]
CalculateBaseWeights_() | BIAS::Condensation | [protected, virtual]
CalculateMean_() | BIAS::Condensation | [inline, protected]
compdouble(const void *l, const void *r) | BIAS::Condensation | [inline, protected, static]
Condensation() | BIAS::Condensation |
CondensImg() | BIAS::CondensImg | [inline]
correctionOfImportanceWeights_ | BIAS::Condensation | [protected]
cumulProbArray_ | BIAS::Condensation | [protected]
cumulProbArrayImportance_ | BIAS::Condensation | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
defaultInitFraction_ | BIAS::Condensation | [protected]
diffusionSigma_ | BIAS::Condensation | [protected]
DrawMean(BIAS::Image< unsigned char > &img) | BIAS::CondensImg |
DrawPosteriorDistribution(BIAS::Image< unsigned char > &img) | BIAS::CondensImg |
DrawPosteriorDistribution(BIAS::Image< float > &img) | BIAS::CondensImg |
DrawSamples(Image< unsigned char > &img, unsigned char value=255) | BIAS::CondensImg |
EvaluateImportanceWeights() | BIAS::CondensImg | [virtual]
EvaluateObservationDensities() | BIAS::CondensImg | [virtual]
fImg_ | BIAS::CondensImg | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMean() | BIAS::Condensation | [inline]
GetMeanWeight() const | BIAS::Condensation |
GetSamplePositions(Image< unsigned char > &sampleImg) | BIAS::CondensImg |
BIAS::Condensation::GetSamplePositions() | BIAS::Condensation | [inline]
GetVariance() const | BIAS::Condensation |
GetVariance(Vector< double > &var) const | BIAS::Condensation |
GetWeightedVariance(Vector< double > &var) const | BIAS::Condensation |
GlobalDebugLevel | BIAS::Debug | [protected, static]
importanceFraction_ | BIAS::Condensation | [protected]
indexTminus2_ | BIAS::Condensation | [protected]
Init(unsigned int nrSmaples) | BIAS::Condensation |
initial_ | BIAS::Condensation | [protected]
InitModelDefaults() | BIAS::CondensImg | [virtual]
InitPrior() | BIAS::Condensation |
InitPriorPositions(unsigned int nrOfInitSamples) | BIAS::CondensImg | [virtual]
mean_ | BIAS::Condensation | [protected]
meanTminus1_ | BIAS::Condensation | [protected]
Nsamples_ | BIAS::Condensation | [protected]
obsImg_ | BIAS::CondensImg | [protected]
offSet_ | BIAS::Condensation | [protected]
oldIndices_ | BIAS::Condensation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PickImportanceSample_() | BIAS::Condensation | [inline, protected]
PickOneSample_() | BIAS::Condensation | [inline, protected]
PredictNewSamplePositions() | BIAS::Condensation |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Process() | BIAS::Condensation |
processFirstOrderScale_ | BIAS::Condensation | [protected]
processMean_ | BIAS::Condensation | [protected]
processSecondOrderScale_ | BIAS::Condensation | [protected]
random_ | BIAS::Condensation | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
sampleImportanceWeights_ | BIAS::Condensation | [protected]
samplePosNew_ | BIAS::Condensation | [protected]
samplePosOld_ | BIAS::Condensation | [protected]
samplePosTminus2_ | BIAS::Condensation | [protected]
sampleWeights_ | BIAS::Condensation | [protected]
SecondOrderARP_(unsigned int indexOldSample, Vector< double > &newSample) | BIAS::Condensation | [inline, protected]
SetArea(Vector2< double > min, Vector2< double > max) | BIAS::CondensImg |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultInitFraction(double fraction) | BIAS::Condensation |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetImportanceSampleFraction(double fraction) | BIAS::Condensation |
SetObservation(Image< unsigned char > &osbImg) | BIAS::CondensImg |
SetPredictionOffset(const BIAS::Vector< double > &offSet) | BIAS::Condensation | [inline]
SetProcessMean(const BIAS::Vector< double > &newProcessMean) | BIAS::Condensation | [inline]
stateDim_ | BIAS::Condensation | [protected]
sumOfImportanceWeights_ | BIAS::Condensation | [protected]
sumOfWeights_ | BIAS::Condensation | [protected]
~Condensation() | BIAS::Condensation | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Conic2D Member List

This is the complete list of members for BIAS::Conic2D, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Add(const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddIP(const CONIC2D_TYPE &scalar) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
AddIP(const Matrix< CONIC2D_TYPE > &arg) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< CONIC2D_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< CONIC2D_TYPE > |
Conic2D() | BIAS::Conic2D | [inline]
Conic2D(const MatrixInitType &i) | BIAS::Conic2D | [inline, explicit]
Conic2D(const Matrix< CONIC2D_TYPE > &m) | BIAS::Conic2D | [inline]
ConicType enum name | BIAS::Conic2D |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
DivideIP(const CONIC2D_TYPE &scalar) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
DoubleLine enum value | BIAS::Conic2D |
Draw(Image< unsigned char > &img) const | BIAS::Conic2D |
element_type typedef | TNT::Matrix< T > |
Ellipse enum value | BIAS::Conic2D |
EllipsoidSilhouetteToGauss(const double &ProbBorder, HomgPoint2D &Center, double &NormalizationFactor) | BIAS::Conic2D |
Empty enum value | BIAS::Conic2D |
Fill(const CONIC2D_TYPE &scalar) | BIAS::Matrix< CONIC2D_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< CONIC2D_TYPE > |
GetCols() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< CONIC2D_TYPE > |
GetConicType() const | BIAS::Conic2D |
GetData() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDeterminant() const | BIAS::Matrix3x3< CONIC2D_TYPE > |
GetDiscriminant() const | BIAS::Conic2D | [protected]
GetDualConic(bool UseSVD=false) const | BIAS::Conic2D |
GetEllipseParameters(HomgPoint2D &Center, double &dAngle, double &radius_a, double &radius_b) const | BIAS::Conic2D |
GetEllipseParameters(double center[2], double a[2], double b[2]) const | BIAS::Conic2D |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMax() const | BIAS::Matrix< CONIC2D_TYPE > |
GetMaxMin(CONIC2D_TYPE &max, CONIC2D_TYPE &min) const | BIAS::Matrix< CONIC2D_TYPE > |
GetMean() const | BIAS::Matrix< CONIC2D_TYPE > |
GetMin() const | BIAS::Matrix< CONIC2D_TYPE > |
GetNumElements() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetPointAndCovariance(HomgPoint2D &center, Matrix2x2< CONIC2D_TYPE > &cov) const | BIAS::Conic2D |
GetRow(const unsigned int row, Vector3< CONIC2D_TYPE > &r) const | BIAS::Matrix3x3< CONIC2D_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
BIAS::Matrix< CONIC2D_TYPE >::GetRow(const int &row) const | BIAS::Matrix< CONIC2D_TYPE > |
GetRows() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetSignature() const | BIAS::Conic2D |
GetSystemMatrix(Matrix< CONIC2D_TYPE > &dest) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
GetTangentPoints(const HomgPoint2D &x, HomgPoint2D &p1, HomgPoint2D &p2) const | BIAS::Conic2D |
GlobalDebugLevel | BIAS::Debug | [protected, static]
Hyperbola enum value | BIAS::Conic2D |
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IntersectsCircle(const HomgPoint2D &C, double Radius) const | BIAS::Conic2D |
Invert() const | BIAS::Matrix3x3< CONIC2D_TYPE > |
Invert(Matrix3x3< CONIC2D_TYPE > &inv) const | BIAS::Matrix3x3< CONIC2D_TYPE > |
InvertIP() | BIAS::Matrix3x3< CONIC2D_TYPE > |
IsDoubleLine() const | BIAS::Conic2D |
IsEllipse() const | BIAS::Conic2D |
IsEmpty() const | BIAS::Conic2D |
IsHyperbola() const | BIAS::Conic2D |
IsIdentity(double eps=0.0) const | BIAS::Matrix< CONIC2D_TYPE > |
IsParabola() const | BIAS::Conic2D |
IsPoint() const | BIAS::Conic2D |
IsSingleLine() const | BIAS::Conic2D |
IsZero(double eps=0.0) const | BIAS::Matrix< CONIC2D_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< CONIC2D_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< CONIC2D_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< CONIC2D_TYPE > |
LocatePoint(const HomgPoint2D &point2D) const | BIAS::Conic2D | [inline]
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Matrix(int rows, int cols, const CONIC2D_TYPEvalue) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< CONIC2D_TYPE > | [explicit]
Matrix(const Matrix< CONIC2D_TYPE > &A) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Matrix(const TNT::Matrix< CONIC2D_TYPE > &A) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< CONIC2D_TYPE > | [explicit]
Matrix3x3(const CONIC2D_TYPEa0, const CONIC2D_TYPEa1, const CONIC2D_TYPEa2, const CONIC2D_TYPEa3, const CONIC2D_TYPEa4, const CONIC2D_TYPEa5, const CONIC2D_TYPEa6, const CONIC2D_TYPEa7, const CONIC2D_TYPEa8) | BIAS::Matrix3x3< CONIC2D_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< CONIC2D_TYPE > &A) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Matrix3x3(const Matrix< CONIC2D_TYPE > &A) | BIAS::Matrix3x3< CONIC2D_TYPE > |
Matrix3x3(const TNT::Matrix< CONIC2D_TYPE > &A) | BIAS::Matrix3x3< CONIC2D_TYPE > |
MaxMin(CONIC2D_TYPE &max, CONIC2D_TYPE &min) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< CONIC2D_TYPE > &argvec, Vector3< CONIC2D_TYPE > &destvec) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Mult(const Matrix3x3< CONIC2D_TYPE > &argmat, Matrix3x3< CONIC2D_TYPE > &destmat) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Mult(const Matrix3x4< CONIC2D_TYPE > &argmat, Matrix3x4< CONIC2D_TYPE > &destmat) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
BIAS::Matrix< CONIC2D_TYPE >::Mult(const Matrix< CONIC2D_TYPE > &arg, Matrix< CONIC2D_TYPE > &result) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
BIAS::Matrix< CONIC2D_TYPE >::Mult(const Matrix< CONIC2D_TYPE > &arg) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
BIAS::Matrix< CONIC2D_TYPE >::Mult(const Vector< CONIC2D_TYPE > &arg, Vector< CONIC2D_TYPE > &result) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Multiply(const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
MultiplyIP(const CONIC2D_TYPE &scalar) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
MultLeft(const Matrix< CONIC2D_TYPE > &arg) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
MultLeft(const Vector< CONIC2D_TYPE > &arg, Vector< CONIC2D_TYPE > &result) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< CONIC2D_TYPE > |
BIAS::Matrix< CONIC2D_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Conic2D | [inline]
NormalizeCols() | BIAS::Matrix< CONIC2D_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< CONIC2D_TYPE > |
NormalizeRows() | BIAS::Matrix< CONIC2D_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< CONIC2D_TYPE > |
NormFrobenius() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
NormL1() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
NormL2() const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< CONIC2D_TYPE > &m) | BIAS::Conic2D | [inline]
BIAS::Matrix3x3< CONIC2D_TYPE >::operator=(const Matrix3x3< CONIC2D_TYPE > &mat) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
BIAS::Matrix< CONIC2D_TYPE >::operator=(const TNT::Matrix< CONIC2D_TYPE > &mat) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
BIAS::TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
BIAS::TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
Parabola enum value | BIAS::Conic2D |
Point enum value | BIAS::Conic2D |
pointer typedef | TNT::Matrix< T > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
reference typedef | TNT::Matrix< T > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< CONIC2D_TYPE > |
Scale(const CONIC2D_TYPE &scalar, Matrix3x3< CONIC2D_TYPE > &destmat) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
ScaleCol(int NoCol, CONIC2D_TYPEscale) | BIAS::Matrix< CONIC2D_TYPE > |
ScaleRow(int NoRow, CONIC2D_TYPEscale) | BIAS::Matrix< CONIC2D_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< CONIC2D_TYPE > &vec) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
SetAsCrossProductMatrix(const CONIC2D_TYPE &x, const CONIC2D_TYPE &y, const CONIC2D_TYPE &z) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
SetCol(const int row, const Vector< CONIC2D_TYPE > &data) | BIAS::Matrix< CONIC2D_TYPE > |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetEllipse(const HomgPoint2D &Center, const double &dAngle, const double &radius_a, const double &radius_b) | BIAS::Conic2D |
SetFromColumnVectors(const BIAS::Vector3< CONIC2D_TYPE > &v0, const BIAS::Vector3< CONIC2D_TYPE > &v1, const BIAS::Vector3< CONIC2D_TYPE > &v2) | BIAS::Matrix3x3< CONIC2D_TYPE > |
SetFromRowVectors(const BIAS::Vector3< CONIC2D_TYPE > &v0, const BIAS::Vector3< CONIC2D_TYPE > &v1, const BIAS::Vector3< CONIC2D_TYPE > &v2) | BIAS::Matrix3x3< CONIC2D_TYPE > |
SetFromVector(const TNT::Vector< CONIC2D_TYPE > &vec) | BIAS::Matrix3x3< CONIC2D_TYPE > |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetIdentity() | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
SetPointAndCovariance(const HomgPoint2D &center, const Matrix2x2< CONIC2D_TYPE > &cov, const double &dScale=GAUSS2D_CONFIDENCE_39_PERCENT) | BIAS::Conic2D |
SetQuadricProjection(const Quadric3D &Q, const PMatrix &P, bool UseSVD=false) | BIAS::Conic2D |
SetRow(const int row, const Vector< CONIC2D_TYPE > &data) | BIAS::Matrix< CONIC2D_TYPE > |
SetZero() | BIAS::Matrix< CONIC2D_TYPE > | [inline]
SingleLine enum value | BIAS::Conic2D |
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const CONIC2D_TYPE &scalar, Matrix< CONIC2D_TYPE > &dest) const | BIAS::Matrix< CONIC2D_TYPE > | [inline]
SubIP(const Matrix< CONIC2D_TYPE > &arg) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
SubIP(const CONIC2D_TYPE &scalar) | BIAS::Matrix< CONIC2D_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< CONIC2D_TYPE > |
Transpose(const Matrix3x3< CONIC2D_TYPE > &arg) | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
TransposedMult(const Vector3< CONIC2D_TYPE > &argvec, Vector3< CONIC2D_TYPE > &destvec) const | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< CONIC2D_TYPE > | [inline]
Unknown enum value | BIAS::Conic2D |
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
WholePlane enum value | BIAS::Conic2D |
~Debug() | BIAS::Debug | [inline]
~Matrix() | BIAS::Matrix< CONIC2D_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< CONIC2D_TYPE > | [virtual]

Generated on Wed Jun 21 19:06:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Contour Member List

This is the complete list of members for BIAS::Contour, including all inherited members.

background_ | BIAS::Contour | [protected]
Contour() | BIAS::Contour | [inline]
contPixels_ | BIAS::Contour | [protected]
data_ | BIAS::Contour | [protected]
directionList_ | BIAS::Contour | [protected]
Draw(BIAS::Image< unsigned char > &img, unsigned char greyValue=255) | BIAS::Contour |
FindFirst_(int &pos_x, int &pos_y) | BIAS::Contour | [protected]
GetFreemanCode() | BIAS::Contour | [inline]
GetPointSet() | BIAS::Contour | [inline]
img_h | BIAS::Contour | [protected]
img_w | BIAS::Contour | [protected]
Init_(BIAS::Image< unsigned char > &img) | BIAS::Contour | [protected]
IsFg(int x, int y) | BIAS::Contour | [inline, protected]
IsFg(int x, int y, int direction) | BIAS::Contour | [inline, protected]
Process(BIAS::Image< unsigned char > &img) | BIAS::Contour |
SetBackGround(unsigned char backGroundColor) | BIAS::Contour | [inline]

Generated on Wed Jun 21 19:06:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Convolution< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Convolution< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fm | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_tmpFloat | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_tmpInt | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CalculationInFloat() const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
ConvFloatHori_(const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatVert_(const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntHori_(const Image< InputStorageType > &src, Image< CONV_INT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntVert_(const Image< CONV_INT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const std::string &postfix="") | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const int group_id, const std::string &postfix) | BIAS::Convolution< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline, protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKernel(FilterMask &fm) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::Convolution< InputStorageType, OutputStorageType > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernel(FilterMask &fm) | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]

Generated on Wed Jun 21 19:06:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CoordinateTransform3D Member List

This is the complete list of members for BIAS::CoordinateTransform3D, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
BinRead(const char *filename) const | BIAS::Matrix< double > | [protected]
BinWrite(const char *filename) const | BIAS::Matrix< double > | [protected]
C_ | BIAS::CoordinateTransform3D | [protected]
ConcatenateLocalTransform(const CoordinateTransform3D &localT, CoordinateTransform3D &res) const | BIAS::CoordinateTransform3D |
const_iterator typedef | TNT::Matrix< T > | [protected]
const_reference typedef | TNT::Matrix< T > | [protected]
CoordinateTransform3D() | BIAS::CoordinateTransform3D | [inline]
CoordinateTransform3D(const CoordinateTransform3D &c) | BIAS::CoordinateTransform3D | [inline]
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< double > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline, protected]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
element_type typedef | TNT::Matrix< T > | [protected]
Fill(const double &scalar) | BIAS::Matrix< double > | [protected]
GetC() const | BIAS::CoordinateTransform3D | [inline]
GetCol(const int &col) const | BIAS::Matrix< double > | [protected]
GetCols() const | BIAS::Matrix< double > | [inline, protected]
GetCQ() const | BIAS::CoordinateTransform3D | [inline]
GetData() const | BIAS::Matrix< double > | [inline, protected]
GetDataArray() const | BIAS::Matrix< double > | [inline, protected]
GetDataArray1() const | BIAS::Matrix< double > | [inline, protected]
GetDataLast() const | BIAS::Matrix< double > | [inline, protected]
GetGlobalToLocalTransform() const | BIAS::CoordinateTransform3D | [inline]
GetLocalToGlobalTransform() const | BIAS::CoordinateTransform3D | [inline]
GetMatrix3x4() const | BIAS::CoordinateTransform3D |
GetMax() const | BIAS::Matrix< double > | [protected]
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > | [protected]
GetMean() const | BIAS::Matrix< double > | [protected]
GetMin() const | BIAS::Matrix< double > | [protected]
GetNumElements() const | BIAS::Matrix< double > | [inline, protected]
GetQ() const | BIAS::CoordinateTransform3D | [inline]
GetR() const | BIAS::CoordinateTransform3D | [inline]
GetRow(const int &row) const | BIAS::Matrix< double > | [protected]
GetRows() const | BIAS::Matrix< double > | [inline, protected]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
GlobalToLocal(const HomgPoint3D &X_G) const | BIAS::CoordinateTransform3D | [inline]
GlobalToLocal(HomgPoint3D &X_G, HomgPoint3DCov &Cov_G) const | BIAS::CoordinateTransform3D | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
InvertIP() | BIAS::CoordinateTransform3D | [inline]
invTransform_ | BIAS::CoordinateTransform3D | [protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > | [protected]
IsZero(double eps=0.0) const | BIAS::Matrix< double > | [protected]
iterator typedef | TNT::Matrix< T > | [protected]
lbound() const | TNT::Matrix< T > | [inline, protected]
Load(const std::string &inputFile) | BIAS::CoordinateTransform3D |
LocalToGlobal(const HomgPoint3D &X_L) const | BIAS::CoordinateTransform3D | [inline]
LocalToGlobal(HomgPoint3D &X_L, HomgPoint3DCov &Cov_L) const | BIAS::CoordinateTransform3D | [inline]
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline, protected]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit, protected]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline, protected]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline, protected]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline, protected]
Matrix4x4() | BIAS::Matrix4x4< double > | [inline, protected]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< double > | [explicit, protected]
Matrix4x4(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< double > | [inline, explicit, protected]
Matrix4x4(const Matrix4x4< double > &A) | BIAS::Matrix4x4< double > | [inline, protected]
Matrix4x4(const Matrix< double > &arg) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const TNT::Matrix< double > &A) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const Matrix3x3< double > &R, const Vector3< double > &trans) | BIAS::Matrix4x4< double > | [protected]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< double > &argvec, Vector4< double > &destvec) const | BIAS::Matrix4x4< double > | [inline, protected]
Mult(const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const | BIAS::Matrix4x4< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline, protected]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline, protected]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< double > | [protected]
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Normalize() | BIAS::Matrix< double > | [protected]
NormalizeCols() | BIAS::Matrix< double > | [protected]
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > | [protected]
NormalizeRows() | BIAS::Matrix< double > | [protected]
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > | [protected]
NormFrobenius() const | BIAS::Matrix< double > | [inline, protected]
NormL1() const | BIAS::Matrix< double > | [inline, protected]
NormL2() const | BIAS::Matrix< double > | [inline, protected]
num_cols() const | TNT::Matrix< T > | [inline, protected]
num_rows() const | TNT::Matrix< T > | [inline, protected]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i) const | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline, protected]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &os, const CoordinateTransform3D &p) | BIAS::CoordinateTransform3D | [friend]
BIAS::Matrix4x4< double >::operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const CoordinateTransform3D &c) | BIAS::CoordinateTransform3D | [inline]
BIAS::Matrix4x4< double >::operator=(const Matrix< double > &mat) | BIAS::Matrix4x4< double > | [protected]
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline, protected]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline, protected]
operator>>(std::istream &is, CoordinateTransform3D &p) | BIAS::CoordinateTransform3D | [friend]
BIAS::Matrix4x4< double >::operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline, protected]
operator[](Subscript i) const | TNT::Matrix< T > | [inline, protected]
pointer typedef | TNT::Matrix< T > | [protected]
Q_ | BIAS::CoordinateTransform3D | [protected]
reference typedef | TNT::Matrix< T > | [protected]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &outputFile) | BIAS::CoordinateTransform3D |
BIAS::Matrix4x4< double >::Save(const std::string &filename) const | BIAS::Matrix< double > | [protected]
scale_ | BIAS::CoordinateTransform3D | [protected]
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > | [protected]
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > | [protected]
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0) | BIAS::CoordinateTransform3D | [inline]
SetC(const Vector3< double > &C) | BIAS::CoordinateTransform3D | [inline]
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > | [protected]
SetFromMatrix3x4(const Matrix3x4< double > &M) | BIAS::CoordinateTransform3D |
SetIdentity() | BIAS::Matrix4x4< double > | [inline, protected]
SetQ(const Quaternion< double > &Q) | BIAS::CoordinateTransform3D | [inline]
SetR(const BIAS::RMatrixBase &R) | BIAS::CoordinateTransform3D |
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > | [protected]
SetZero() | BIAS::Matrix< double > | [inline, protected]
size() const | TNT::Matrix< T > | [inline, protected]
size_type typedef | TNT::Matrix< T > | [protected]
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
Talk() | BIAS::CoordinateTransform3D |
Trace() const | BIAS::Matrix< double > | [inline, protected]
Transpose() const | BIAS::Matrix< double > | [inline, protected]
TransposeIP() | BIAS::Matrix4x4< double > | [inline, protected]
UpdateMatrix_() | BIAS::CoordinateTransform3D | [protected]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > | [protected]
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< double > | [protected, virtual]
~Matrix4x4() | BIAS::Matrix4x4< double > | [protected, virtual]

Generated on Wed Jun 21 19:06:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorBase< StorageType > Member List

This is the complete list of members for BIAS::CornerDetectorBase< StorageType >, including all inherited members.

_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorFoerstner< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::CornerDetectorFoerstner< StorageType, CalculationType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< StorageType > &src, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_ComputeCornerness(Image< CalculationType > &im) | BIAS::CornerDetectorFoerstner< StorageType, CalculationType > | [protected, virtual]
_Cornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DeleteInternalMem() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DoRefinement | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_EnforceMinimumDistance(std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatList | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatureMap | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FillFeatureMap(std::vector< HomgPoint2D > &p) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_gauss | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_MinCornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_MinDistance | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumberFeaturesSoFar | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_RefineCornerPosition(int col, int row, double &x, double &y, QUAL &SubPixelCornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_RefineCorners(std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
_sgxx | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgxy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgyy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_st | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
_ZeroFeatureMap() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorFoerstner() | BIAS::CornerDetectorFoerstner< StorageType, CalculationType > |
CornerDetectorFoerstner(Param &para, const std::string &postfix="") | BIAS::CornerDetectorFoerstner< StorageType, CalculationType > |
CornerDetectorFoerstner(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorFoerstner< StorageType, CalculationType > |
CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const std::string &postfix="") | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Cornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
Detect(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
BIAS::CornerDetectorBase::Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetCov_(const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GetMinCornerness() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GetMinDistance() const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
SetMinCornerness(double min_cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetMinDistance(int mindist) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetStructureTensorHalfWinSize(int halfwinsize) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetSubpixelAccuracy(bool subpixel_accuracy) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorFoerstner() | BIAS::CornerDetectorFoerstner< StorageType, CalculationType > |
~CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorGradient< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::CornerDetectorGradient< StorageType, CalculationType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< StorageType > &src, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_ComputeCornerness(Image< CalculationType > &Cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected, virtual]
_Cornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DeleteInternalMem() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DoRefinement | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_EnforceMinimumDistance(std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatList | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatureMap | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FillFeatureMap(std::vector< HomgPoint2D > &p) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_gauss | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_MinCornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_MinDistance | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumberFeaturesSoFar | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_RefineCornerPosition(int col, int row, double &x, double &y, QUAL &SubPixelCornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_RefineCorners(std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
_sgxx | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgxy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgyy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_st | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
_ZeroFeatureMap() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const std::string &postfix="") | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Cornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
Detect(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
BIAS::CornerDetectorBase::Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetCov_(const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GetMinCornerness() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GetMinDistance() const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
SetMinCornerness(double min_cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetMinDistance(int mindist) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetStructureTensorHalfWinSize(int halfwinsize) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetSubpixelAccuracy(bool subpixel_accuracy) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorHarris< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::CornerDetectorHarris< StorageType, CalculationType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorHarris< StorageType, CalculationType > | [protected]
_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< StorageType > &src, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_ComputeCornerness(Image< CalculationType > &Cornerness) | BIAS::CornerDetectorHarris< StorageType, CalculationType > | [protected, virtual]
_Cornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DeleteInternalMem() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DoRefinement | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_EnforceMinimumDistance(std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatList | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatureMap | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FillFeatureMap(std::vector< HomgPoint2D > &p) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_gauss | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_MinCornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_MinDistance | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumberFeaturesSoFar | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_RefineCornerPosition(int col, int row, double &x, double &y, QUAL &SubPixelCornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_RefineCorners(std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
_Scale | BIAS::CornerDetectorHarris< StorageType, CalculationType > | [protected]
_sgxx | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgxy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgyy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_st | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
_ZeroFeatureMap() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const std::string &postfix="") | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorHarris() | BIAS::CornerDetectorHarris< StorageType, CalculationType > |
CornerDetectorHarris(Param &para, const std::string &postfix="") | BIAS::CornerDetectorHarris< StorageType, CalculationType > |
CornerDetectorHarris(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorHarris< StorageType, CalculationType > |
Cornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
Detect(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
BIAS::CornerDetectorBase::Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetCov_(const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GetMinCornerness() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GetMinDistance() const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
SetMinCornerness(double min_cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetMinDistance(int mindist) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetStructureTensorHalfWinSize(int halfwinsize) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetSubpixelAccuracy(bool subpixel_accuracy) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
~CornerDetectorHarris() | BIAS::CornerDetectorHarris< StorageType, CalculationType > |
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorKLT< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::CornerDetectorKLT< StorageType, CalculationType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< StorageType > &src, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_ComputeCornerness(Image< CalculationType > &mineig) | BIAS::CornerDetectorKLT< StorageType, CalculationType > | [protected, virtual]
_Cornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DeleteInternalMem() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DoRefinement | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_EnforceMinimumDistance(std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatList | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatureMap | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FillFeatureMap(std::vector< HomgPoint2D > &p) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_gauss | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_MinCornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_MinDistance | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumberFeaturesSoFar | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_RefineCornerPosition(int col, int row, double &x, double &y, QUAL &SubPixelCornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_RefineCorners(std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
_sgxx | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgxy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgyy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_st | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
_ZeroFeatureMap() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const std::string &postfix="") | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorKLT() | BIAS::CornerDetectorKLT< StorageType, CalculationType > |
CornerDetectorKLT(Param &para, const std::string &postfix="") | BIAS::CornerDetectorKLT< StorageType, CalculationType > |
CornerDetectorKLT(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorKLT< StorageType, CalculationType > |
Cornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
Detect(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
BIAS::CornerDetectorBase::Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetCov_(const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GetMinCornerness() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GetMinDistance() const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
SetMinCornerness(double min_cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetMinDistance(int mindist) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetStructureTensorHalfWinSize(int halfwinsize) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetSubpixelAccuracy(bool subpixel_accuracy) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
~CornerDetectorKLT() | BIAS::CornerDetectorKLT< StorageType, CalculationType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerDetectorSusan< StorageType > Member List

This is the complete list of members for BIAS::CornerDetectorSusan< StorageType >, including all inherited members.

_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_bp | BIAS::CornerDetectorSusan< StorageType > | [protected]
_cgx | BIAS::CornerDetectorSusan< StorageType > | [protected]
_cgy | BIAS::CornerDetectorSusan< StorageType > | [protected]
_int_to_uchar(int *r, StorageType *in, int size) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_num | BIAS::CornerDetectorSusan< StorageType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_Quick | BIAS::CornerDetectorSusan< StorageType > | [protected]
_r | BIAS::CornerDetectorSusan< StorageType > | [protected]
_setup_brightness_lut(int thresh, int form) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_susan_corners(StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_susan_corners(StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size, StorageType *roi) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_susan_corners_quick(StorageType *in, int *r, StorageType *bp, CORNER_LIST corner_list, int x_size, int y_size) | BIAS::CornerDetectorSusan< StorageType > | [protected]
_SusanReAllocMem(int x_size, int y_size) | BIAS::CornerDetectorSusan< StorageType > | [inline, protected]
_susansize | BIAS::CornerDetectorSusan< StorageType > | [protected]
_susanthresh | BIAS::CornerDetectorSusan< StorageType > | [protected]
_Threshold | BIAS::CornerDetectorSusan< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorSusan() | BIAS::CornerDetectorSusan< StorageType > |
CornerDetectorSusan(Param &para, const std::string &postfix="") | BIAS::CornerDetectorSusan< StorageType > |
CornerDetectorSusan(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorSusan< StorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &pvec, std::vector< QUAL > &quality) | BIAS::CornerDetectorSusan< StorageType > | [virtual]
Detect(const Image< StorageType > &image, CORNER_LIST corner_list, int &num) | BIAS::CornerDetectorSusan< StorageType > |
Detect(const Image< StorageType > &image, const Image< StorageType > &roi, CORNER_LIST corner_list, int &num) | BIAS::CornerDetectorSusan< StorageType > |
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorSusan() | BIAS::CornerDetectorSusan< StorageType > |
~Debug() | BIAS::Debug | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CornerMatcher Member List

This is the complete list of members for BIAS::CornerMatcher, including all inherited members.

_Bilinear(StorageType **ida, KLT_TYPE x, KLT_TYPE y) | BIAS::RegionMatcher | [protected]
_Bilinear(unsigned char **ida, KLT_TYPE x, KLT_TYPE y) | BIAS::RegionMatcher | [protected]
_BilinearRegion(StorageType **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res) | BIAS::RegionMatcher | [protected]
_BilinearRegion(unsigned char **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res) | BIAS::RegionMatcher | [protected]
_bl1 | BIAS::RegionMatcher | [protected]
_bl1_5 | BIAS::RegionMatcher | [protected]
_bl2 | BIAS::RegionMatcher | [protected]
_bl2_5 | BIAS::RegionMatcher | [protected]
_d | BIAS::RegionMatcher | [protected]
_disp | BIAS::RegionMatcher | [protected]
_e | BIAS::RegionMatcher | [protected]
_G | BIAS::RegionMatcher | [protected]
_Ginv | BIAS::RegionMatcher | [protected]
_gsx | BIAS::RegionMatcher | [protected]
_gsx_5 | BIAS::RegionMatcher | [protected]
_gsy | BIAS::RegionMatcher | [protected]
_gsy_5 | BIAS::RegionMatcher | [protected]
_gx | BIAS::RegionMatcher | [protected]
_gx1 | BIAS::RegionMatcher | [protected]
_gx1_5 | BIAS::RegionMatcher | [protected]
_gx2 | BIAS::RegionMatcher | [protected]
_gx2_5 | BIAS::RegionMatcher | [protected]
_gy | BIAS::RegionMatcher | [protected]
_gy1 | BIAS::RegionMatcher | [protected]
_gy1_5 | BIAS::RegionMatcher | [protected]
_gy2 | BIAS::RegionMatcher | [protected]
_gy2_5 | BIAS::RegionMatcher | [protected]
_iim1 | BIAS::RegionMatcher | [protected]
_iim2 | BIAS::RegionMatcher | [protected]
_klthws | BIAS::RegionMatcher | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ncchws | BIAS::RegionMatcher | [protected]
_nccwinsize | BIAS::RegionMatcher | [protected]
_ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3) | BIAS::RegionMatcher | [inline, protected]
_ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3, KLT_TYPE x4, KLT_TYPE x5) | BIAS::RegionMatcher | [inline, protected]
_winsize | BIAS::RegionMatcher | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
ColorCCV(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
ColorNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
CornerMatcher() | BIAS::CornerMatcher |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
LineMatcherNCC(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation) | BIAS::RegionMatcher |
LineMatcherNCC(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation) | BIAS::RegionMatcher |
LineMatcherSAD(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad) | BIAS::RegionMatcher |
LineMatcherSAD(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad) | BIAS::RegionMatcher |
NCC(HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, double &result) | BIAS::CornerMatcher |
BIAS::RegionMatcher::NCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
BIAS::RegionMatcher::NCC(double p1[2], double p2[2], StorageType **ida1, StorageType **ida2, unsigned halfwinsize, double &result) | BIAS::RegionMatcher |
BIAS::RegionMatcher::NCC(unsigned p1[2], unsigned p2[2], StorageType **ida1, StorageType **roi1, StorageType **ida2, StorageType **roi2, unsigned hww, unsigned hwh, double &result) | BIAS::RegionMatcher |
BIAS::RegionMatcher::NCC(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
NCCSearch(HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, HomgPoint2D &resultpoint, double mincorrelation, double &result) | BIAS::CornerMatcher |
NCCSearchEven(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result) | BIAS::RegionMatcher |
NCCSearchOdd(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result) | BIAS::RegionMatcher |
operator=(const Debug &d) | BIAS::Debug | [inline]
ParabolaNCC(HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, HomgPoint2D &result) | BIAS::CornerMatcher |
BIAS::RegionMatcher::ParabolaNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2]) | BIAS::RegionMatcher |
ParabolaNCC5(HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, HomgPoint2D &result) | BIAS::CornerMatcher |
BIAS::RegionMatcher::ParabolaNCC5(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2]) | BIAS::RegionMatcher |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RefinePyramideNCC(std::vector< std::vector< HomgPoint2D > > &ps1, PyramidImage< StorageType > &im1, PyramidImage< StorageType > &im2, unsigned int halfnccwinsize, std::vector< std::vector< HomgPoint2D > > &matches, std::vector< std::vector< double > > &matchquality) | BIAS::CornerMatcher |
RefinePyramideNCC(vector< vector< HomgPoint2D > > &ps1, PyramidImage< StorageType > &im1, PyramidImage< StorageType > &im2, unsigned int halfnccwinsize, vector< vector< HomgPoint2D > > &matches, vector< vector< double > > &matchquality) | BIAS::CornerMatcher |
RegionMatcher() | BIAS::RegionMatcher |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SAD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SAD(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SADN(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SADN(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SSD(HomgPoint2D &p1, HomgPoint2D &p2, Image< StorageType > &im1, Image< StorageType > &im2, unsigned int halfwinsize, double &result) | BIAS::CornerMatcher |
BIAS::RegionMatcher::SSD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
BIAS::RegionMatcher::SSD(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
~CornerMatcher() | BIAS::CornerMatcher |
~Debug() | BIAS::Debug | [inline]
~RegionMatcher() | BIAS::RegionMatcher |

Generated on Wed Jun 21 19:06:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CovMatrix3x3 Member List

This is the complete list of members for BIAS::CovMatrix3x3, including all inherited members.

_Decompose() | BIAS::CovMatrix3x3 | [protected]
_IsDecomposed | BIAS::CovMatrix3x3 | [protected]
_S | BIAS::CovMatrix3x3 | [protected]
_svd | BIAS::CovMatrix3x3 | [protected]
_U | BIAS::CovMatrix3x3 | [protected]
_VT | BIAS::CovMatrix3x3 | [protected]
Add(const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
AddIP(const COVMATRIX3X3_TYPE &scalar) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
AddIP(const Matrix< COVMATRIX3X3_TYPE > &arg) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
ConsistencyBackup_ | BIAS::CovMatrix3x3 | [protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
CovMatrix3x3() | BIAS::CovMatrix3x3 |
CovMatrix3x3(const CovMatrix3x3 &mat) | BIAS::CovMatrix3x3 |
CovMatrix3x3(const MatrixInitType &i) | BIAS::CovMatrix3x3 | [inline, explicit]
CovMatrix3x3(const Matrix3x3< COVMATRIX3X3_TYPE > &mat) | BIAS::CovMatrix3x3 | [inline]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
DivideIP(const COVMATRIX3X3_TYPE &scalar) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const COVMATRIX3X3_TYPE &scalar) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetCols() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
GetData() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
GetHomogenized() const | BIAS::CovMatrix3x3 | [inline]
GetMax() const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetMaxMin(COVMATRIX3X3_TYPE &max, COVMATRIX3X3_TYPE &min) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetMean() const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetMin() const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetNumElements() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetPCA(Vector3< COVMATRIX3X3_TYPE > &S, Matrix3x3< COVMATRIX3X3_TYPE > &VT) | BIAS::CovMatrix3x3 |
GetRow(const unsigned int row, Vector3< COVMATRIX3X3_TYPE > &r) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::GetRow(const int &row) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
GetRows() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
GetS(Vector3< COVMATRIX3X3_TYPE > &S) | BIAS::CovMatrix3x3 |
GetSearchArea(PMatrixBase &P, HomgPoint3D &point3D, Vector2< double > &x, Vector2< double > &y, double scale) | BIAS::CovMatrix3x3 |
GetSearchArea(PMatrixBase &P, HomgPoint3D &point3D, Vector2< double > &x, Vector2< double > &y, double scale, double minSearchArea) | BIAS::CovMatrix3x3 |
GetSystemMatrix(Matrix< COVMATRIX3X3_TYPE > &dest) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
InvalidatePCA() | BIAS::CovMatrix3x3 | [inline]
Invert() const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
Invert(Matrix3x3< COVMATRIX3X3_TYPE > &inv) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
InvertIP() | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Matrix(int rows, int cols, const COVMATRIX3X3_TYPEvalue) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [explicit]
Matrix(const Matrix< COVMATRIX3X3_TYPE > &A) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Matrix(const TNT::Matrix< COVMATRIX3X3_TYPE > &A) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [explicit]
Matrix3x3(const COVMATRIX3X3_TYPEa0, const COVMATRIX3X3_TYPEa1, const COVMATRIX3X3_TYPEa2, const COVMATRIX3X3_TYPEa3, const COVMATRIX3X3_TYPEa4, const COVMATRIX3X3_TYPEa5, const COVMATRIX3X3_TYPEa6, const COVMATRIX3X3_TYPEa7, const COVMATRIX3X3_TYPEa8) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< COVMATRIX3X3_TYPE > &A) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
Matrix3x3(const Matrix< COVMATRIX3X3_TYPE > &A) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
Matrix3x3(const TNT::Matrix< COVMATRIX3X3_TYPE > &A) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
MaxMin(COVMATRIX3X3_TYPE &max, COVMATRIX3X3_TYPE &min) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< COVMATRIX3X3_TYPE > &argvec, Vector3< COVMATRIX3X3_TYPE > &destvec) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
Mult(const Matrix3x3< COVMATRIX3X3_TYPE > &argmat, Matrix3x3< COVMATRIX3X3_TYPE > &destmat) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
Mult(const Matrix3x4< COVMATRIX3X3_TYPE > &argmat, Matrix3x4< COVMATRIX3X3_TYPE > &destmat) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult(const Matrix< COVMATRIX3X3_TYPE > &arg, Matrix< COVMATRIX3X3_TYPE > &result) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult(const Matrix< COVMATRIX3X3_TYPE > &arg) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::Mult(const Vector< COVMATRIX3X3_TYPE > &arg, Vector< COVMATRIX3X3_TYPE > &result) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Multiply(const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
MultiplyIP(const COVMATRIX3X3_TYPE &scalar) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
MultLeft(const Matrix< COVMATRIX3X3_TYPE > &arg) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
MultLeft(const Vector< COVMATRIX3X3_TYPE > &arg, Vector< COVMATRIX3X3_TYPE > &result) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
BIAS::Matrix< COVMATRIX3X3_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< COVMATRIX3X3_TYPE > |
NormalizeCols() | BIAS::Matrix< COVMATRIX3X3_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
NormalizeRows() | BIAS::Matrix< COVMATRIX3X3_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
NormFrobenius() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
NormL1() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
NormL2() const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const CovMatrix3x3 &mat) | BIAS::CovMatrix3x3 |
operator=(const BIAS::Matrix3x3< COVMATRIX3X3_TYPE > &mat) | BIAS::CovMatrix3x3 | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::operator=(const TNT::Matrix< COVMATRIX3X3_TYPE > &mat) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
BIAS::Matrix< COVMATRIX3X3_TYPE >::operator=(const Matrix< COVMATRIX3X3_TYPE > &mat) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< COVMATRIX3X3_TYPE > |
Scale(const COVMATRIX3X3_TYPE &scalar, Matrix3x3< COVMATRIX3X3_TYPE > &destmat) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
ScaleCol(int NoCol, COVMATRIX3X3_TYPEscale) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
ScaleRow(int NoRow, COVMATRIX3X3_TYPEscale) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< COVMATRIX3X3_TYPE > &vec) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
SetAsCrossProductMatrix(const COVMATRIX3X3_TYPE &x, const COVMATRIX3X3_TYPE &y, const COVMATRIX3X3_TYPE &z) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
SetCol(const int row, const Vector< COVMATRIX3X3_TYPE > &data) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< COVMATRIX3X3_TYPE > &v0, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v1, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v2) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
SetFromHomogenized(const HomgPoint3DCov &ch, const HomgPoint3D &ph) | BIAS::CovMatrix3x3 | [inline]
SetFromRowVectors(const BIAS::Vector3< COVMATRIX3X3_TYPE > &v0, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v1, const BIAS::Vector3< COVMATRIX3X3_TYPE > &v2) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
SetFromVector(const TNT::Vector< COVMATRIX3X3_TYPE > &vec) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
SetIdentity() | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
SetRow(const int row, const Vector< COVMATRIX3X3_TYPE > &data) | BIAS::Matrix< COVMATRIX3X3_TYPE > |
SetZero() | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const COVMATRIX3X3_TYPE &scalar, Matrix< COVMATRIX3X3_TYPE > &dest) const | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
SubIP(const Matrix< COVMATRIX3X3_TYPE > &arg) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
SubIP(const COVMATRIX3X3_TYPE &scalar) | BIAS::Matrix< COVMATRIX3X3_TYPE > | [inline]
Trace() const | BIAS::CovMatrix3x3 | [inline]
Transpose() const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > |
Transpose(const Matrix3x3< COVMATRIX3X3_TYPE > &arg) | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
TransposedMult(const Vector3< COVMATRIX3X3_TYPE > &argvec, Vector3< COVMATRIX3X3_TYPE > &destvec) const | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~CovMatrix3x3() | BIAS::CovMatrix3x3 |
~Matrix() | BIAS::Matrix< COVMATRIX3X3_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< COVMATRIX3X3_TYPE > | [virtual]

Generated on Wed Jun 21 19:06:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CScommBase Member List

This is the complete list of members for BIAS::CScommBase, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AcceptConn_(int fd) | BIAS::CScommBase | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AnalyzeData_(int clientNr) | BIAS::CScommBase | [protected]
AnalyzeFirstMsg_(int commNr) | BIAS::CScommBase | [protected]
CheckRegisteredMsgs_(std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead) | BIAS::CScommBase | [protected]
commPartners_ | BIAS::CScommBase | [protected]
commPartnersConnected_ | BIAS::CScommBase | [protected]
connectPort_ | BIAS::CScommBase | [protected]
CScommBase(bool threaded=true) | BIAS::CScommBase |
CScommBase(const CScommBase &arg) | BIAS::CScommBase |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCommPartnerName(int commPartnerNr) | BIAS::CScommBase |
GetConnections() | BIAS::CScommBase | [inline]
GetData(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< char > &binaryData) | BIAS::CScommBase |
GetData_(const std::string &msgName) | BIAS::CScommBase | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetThreadedReceive() | BIAS::CScommBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
indexRegMsgs_ | BIAS::CScommBase | [private]
isServer_ | BIAS::CScommBase | [protected]
keepAll_ | BIAS::CScommBase | [protected]
log_ | BIAS::CScommBase | [protected]
logOut_ | BIAS::CScommBase | [protected]
logOutPut_(const char *data, unsigned int size) | BIAS::CScommBase | [protected]
msgBuffer_ | BIAS::CScommBase | [protected]
name_ | BIAS::CScommBase | [protected]
onlyNewMsgs_ | BIAS::CScommBase | [protected]
operator=(const CScommBase &arg) | BIAS::CScommBase |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
portChange_ | BIAS::CScommBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
receivethread(void *data) | BIAS::CScommBase | [friend]
receiveThread_(int clientNr) | BIAS::CScommBase | [protected]
registeredMsgs_ | BIAS::CScommBase | [protected]
registerLock_ | BIAS::CScommBase | [protected]
RegisterMsg(std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RegisterMsg(std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SendMsg(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg_(const std::string &data) | BIAS::CScommBase | [protected]
SetAutomaticPortChange(bool on) | BIAS::CScommBase | [inline]
SetConnectionTimeOut(unsigned int time) | BIAS::CScommBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKeepAll(bool on) | BIAS::CScommBase | [inline]
SetLog(bool on) | BIAS::CScommBase |
SetLogOut(std::ostream &outputStream) | BIAS::CScommBase |
SetVerbose(bool on) | BIAS::CScommBase |
SetVerboseOut(std::ostream &outputStream) | BIAS::CScommBase |
syncReceive_() | BIAS::CScommBase | [protected]
terminateReceiver_ | BIAS::CScommBase | [protected]
threaded_ | BIAS::CScommBase | [protected]
timeOut_ | BIAS::CScommBase | [protected]
timeOutFlag_ | BIAS::CScommBase | [protected]
verbose_ | BIAS::CScommBase | [protected]
verboseOut_ | BIAS::CScommBase | [protected]
WaitForNewMessage(std::string &msgName) | BIAS::CScommBase |
~CScommBase() | BIAS::CScommBase | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CScommClient Member List

This is the complete list of members for BIAS::CScommClient, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AcceptConn_(int fd) | BIAS::CScommBase | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AnalyzeData_(int clientNr) | BIAS::CScommBase | [protected]
AnalyzeFirstMsg_(int commNr) | BIAS::CScommBase | [protected]
CheckRegisteredMsgs_(std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead) | BIAS::CScommBase | [protected]
commPartners_ | BIAS::CScommBase | [protected]
commPartnersConnected_ | BIAS::CScommBase | [protected]
connectPort_ | BIAS::CScommBase | [protected]
ConnectServer(std::string serverName, unsigned int port=D_CS_DEFAULT_PORT, unsigned int timeOut=20000) | BIAS::CScommClient |
CScommBase(bool threaded=true) | BIAS::CScommBase |
CScommBase(const CScommBase &arg) | BIAS::CScommBase |
CScommClient(bool threaded=true) | BIAS::CScommClient |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCommPartnerName(int commPartnerNr) | BIAS::CScommBase |
GetConnections() | BIAS::CScommBase | [inline]
GetData(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< char > &binaryData) | BIAS::CScommBase |
GetData_(const std::string &msgName) | BIAS::CScommBase | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetThreadedReceive() | BIAS::CScommBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
isServer_ | BIAS::CScommBase | [protected]
keepAll_ | BIAS::CScommBase | [protected]
log_ | BIAS::CScommBase | [protected]
logOut_ | BIAS::CScommBase | [protected]
logOutPut_(const char *data, unsigned int size) | BIAS::CScommBase | [protected]
msgBuffer_ | BIAS::CScommBase | [protected]
name_ | BIAS::CScommBase | [protected]
onlyNewMsgs_ | BIAS::CScommBase | [protected]
operator=(const CScommBase &arg) | BIAS::CScommBase |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
portChange_ | BIAS::CScommBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
receivethread(void *data) | BIAS::CScommBase | [friend]
receiveThread_(int clientNr) | BIAS::CScommBase | [protected]
registeredMsgs_ | BIAS::CScommBase | [protected]
registerLock_ | BIAS::CScommBase | [protected]
RegisterMsg(std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RegisterMsg(std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SendMsg(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg_(const std::string &data) | BIAS::CScommBase | [protected]
SetAutomaticPortChange(bool on) | BIAS::CScommBase | [inline]
SetConnectionTimeOut(unsigned int time) | BIAS::CScommBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKeepAll(bool on) | BIAS::CScommBase | [inline]
SetLog(bool on) | BIAS::CScommBase |
SetLogOut(std::ostream &outputStream) | BIAS::CScommBase |
SetName(std::string clientName) | BIAS::CScommClient | [inline]
SetVerbose(bool on) | BIAS::CScommBase |
SetVerboseOut(std::ostream &outputStream) | BIAS::CScommBase |
syncReceive_() | BIAS::CScommBase | [protected]
terminateReceiver_ | BIAS::CScommBase | [protected]
threaded_ | BIAS::CScommBase | [protected]
timeOut_ | BIAS::CScommBase | [protected]
timeOutFlag_ | BIAS::CScommBase | [protected]
verbose_ | BIAS::CScommBase | [protected]
verboseOut_ | BIAS::CScommBase | [protected]
WaitForNewMessage(std::string &msgName) | BIAS::CScommBase |
~CScommBase() | BIAS::CScommBase | [virtual]
~CScommClient() | BIAS::CScommClient | [inline]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CScommData Member List

This is the complete list of members for BIAS::CScommData, including all inherited members.

connected | BIAS::CScommData |
CScommData() | BIAS::CScommData | [inline]
fd | BIAS::CScommData |
firstcontact | BIAS::CScommData |
lastProcessed | BIAS::CScommData |
msgBuffer | BIAS::CScommData |
name | BIAS::CScommData |
threadid | BIAS::CScommData |
~CScommData() | BIAS::CScommData | [inline]

Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CScommMsg Member List

This is the complete list of members for BIAS::CScommMsg, including all inherited members.

binaryData | BIAS::CScommMsg |
binaryDataSize | BIAS::CScommMsg |
commName | BIAS::CScommMsg |
CScommMsg() | BIAS::CScommMsg | [inline]
dataLock | BIAS::CScommMsg |
dataSize | BIAS::CScommMsg |
dataType | BIAS::CScommMsg |
floatData | BIAS::CScommMsg |
intData | BIAS::CScommMsg |
msgName | BIAS::CScommMsg |
newData | BIAS::CScommMsg |
server | BIAS::CScommMsg |
stringData | BIAS::CScommMsg |

Generated on Wed Jun 21 19:06:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CScommServer Member List

This is the complete list of members for BIAS::CScommServer, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AcceptConn_(int fd) | BIAS::CScommBase | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AnalyzeData_(int clientNr) | BIAS::CScommBase | [protected]
AnalyzeFirstMsg_(int commNr) | BIAS::CScommBase | [protected]
CheckRegisteredMsgs_(std::string &msgName, const CScommData &cPartner, EdataType &dataTypeToRead, unsigned int &dataSizeToRead) | BIAS::CScommBase | [protected]
commPartners_ | BIAS::CScommBase | [protected]
commPartnersConnected_ | BIAS::CScommBase | [protected]
connectPort_ | BIAS::CScommBase | [protected]
CreateListenThread_() | BIAS::CScommServer | [protected]
CScommBase(bool threaded=true) | BIAS::CScommBase |
CScommBase(const CScommBase &arg) | BIAS::CScommBase |
CScommServer(bool threaded=true) | BIAS::CScommServer |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCommPartnerName(int commPartnerNr) | BIAS::CScommBase |
GetConnections() | BIAS::CScommBase | [inline]
GetData(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
GetData(const std::string &msgName, std::vector< char > &binaryData) | BIAS::CScommBase |
GetData_(const std::string &msgName) | BIAS::CScommBase | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetThreadedReceive() | BIAS::CScommBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
isServer_ | BIAS::CScommBase | [protected]
keepAll_ | BIAS::CScommBase | [protected]
listenthread(void *data) | BIAS::CScommServer | [friend]
listenThreadActive_ | BIAS::CScommServer | [protected]
log_ | BIAS::CScommBase | [protected]
logOut_ | BIAS::CScommBase | [protected]
logOutPut_(const char *data, unsigned int size) | BIAS::CScommBase | [protected]
msgBuffer_ | BIAS::CScommBase | [protected]
name_ | BIAS::CScommBase | [protected]
onlyNewMsgs_ | BIAS::CScommBase | [protected]
operator=(const CScommBase &arg) | BIAS::CScommBase |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
portChange_ | BIAS::CScommBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
pthreadListener_ | BIAS::CScommServer | [protected]
receivethread(void *data) | BIAS::CScommBase | [friend]
receiveThread_(int clientNr) | BIAS::CScommBase | [protected]
registeredMsgs_ | BIAS::CScommBase | [protected]
registerLock_ | BIAS::CScommBase | [protected]
RegisterMsg(std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RegisterMsg(std::string commPartnerName, std::string msgName, EdataType dataType, int amount=1) | BIAS::CScommBase |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SendMsg(const std::string &msgName, std::vector< float > &floatData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< int > &intData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, std::vector< std::string > &stringData) | BIAS::CScommBase |
SendMsg(const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(const std::string commPartnerName, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg(int commPartnerNr, const std::string &msgName, char *binaryData, unsigned int size) | BIAS::CScommBase |
SendMsg_(const std::string &data) | BIAS::CScommBase | [protected]
SetAutomaticPortChange(bool on) | BIAS::CScommBase | [inline]
SetConnectionTimeOut(unsigned int time) | BIAS::CScommBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKeepAll(bool on) | BIAS::CScommBase | [inline]
SetLog(bool on) | BIAS::CScommBase |
SetLogOut(std::ostream &outputStream) | BIAS::CScommBase |
SetVerbose(bool on) | BIAS::CScommBase |
SetVerboseOut(std::ostream &outputStream) | BIAS::CScommBase |
syncReceive_() | BIAS::CScommBase | [protected]
terminateListener_ | BIAS::CScommServer | [protected]
terminateReceiver_ | BIAS::CScommBase | [protected]
threaded_ | BIAS::CScommBase | [protected]
timeOut_ | BIAS::CScommBase | [protected]
timeOutFlag_ | BIAS::CScommBase | [protected]
verbose_ | BIAS::CScommBase | [protected]
verboseOut_ | BIAS::CScommBase | [protected]
WaitForConnections(unsigned int port=D_CS_DEFAULT_PORT) | BIAS::CScommServer |
WaitForNewMessage(std::string &msgName) | BIAS::CScommBase |
~CScommBase() | BIAS::CScommBase | [virtual]
~CScommServer() | BIAS::CScommServer |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CSCommWithClientNr Member List

This is the complete list of members for BIAS::CSCommWithClientNr, including all inherited members.

comm | BIAS::CSCommWithClientNr
commNr | BIAS::CSCommWithClientNr

Generated on Wed Jun 21 19:06:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CylinderMapping Member List

This is the complete list of members for BIAS::CylinderMapping, including all inherited members.

aliasing_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
alphaImg_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
BackwardMapping() | BIAS::BackwardMapping< unsigned char, unsigned char > | [inline]
BuildPyramid_(const Image< unsigned char > &source, bool forceInit=true) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected, virtual]
CalcCoordOffset_(const Image< unsigned char > &sink, const Image< unsigned char > &source) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected, virtual]
camAngleX_ | BIAS::CylinderMapping | [protected]
camAngleY_ | BIAS::CylinderMapping | [protected]
ChangeImgSize_(Image< unsigned char > &, const Image< unsigned char > &) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< unsigned char > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
ClipValue_(const double &value, unsigned char &newvalue) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected, virtual]
CylinderMapping() | BIAS::CylinderMapping |
focalX_ | BIAS::CylinderMapping | [protected]
focalY_ | BIAS::CylinderMapping | [protected]
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
GetBoundingBox(unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::BackwardMapping< unsigned char, unsigned char > | [inline, virtual]
GetImageValue_(const double &xsource, const double &ysource, const Image< unsigned char > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected, virtual]
GetSourceCoordinates_(const BIAS::HomgPoint2D &sink, BIAS::HomgPoint2D &source) const | BIAS::CylinderMapping | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
height_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
interpolationType_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
Map(const Image< unsigned char > &src, Image< unsigned char > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< unsigned char, unsigned char > |
Map(Image< unsigned char > &sink) | BIAS::BackwardMapping< unsigned char, unsigned char > |
MapBi_(const Image< unsigned char > &source, Image< unsigned char > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
MapTri_(Image< unsigned char > &sink) | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
offsetX_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
offsetY_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
px_ | BIAS::CylinderMapping | [protected]
py_ | BIAS::CylinderMapping | [protected]
pyramid_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
rangeChecked_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
Reset() | BIAS::CylinderMapping |
ROI_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
setFocalLength(const double fx, const double fy) | BIAS::CylinderMapping |
setPrincipalPoint(const double px, const double py) | BIAS::CylinderMapping |
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< unsigned char, unsigned char > |
UpdatePyramidSize(const Image< unsigned char > &sink) | BIAS::BackwardMapping< unsigned char, unsigned char > | [virtual]
width_ | BIAS::BackwardMapping< unsigned char, unsigned char > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< unsigned char, unsigned char > | [inline, virtual]

Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DC_GPS Member List

This is the complete list of members for BIAS::DC_GPS, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
azimuth | BIAS::DC_GPS |
clothoidParameter | BIAS::DC_GPS |
curvature | BIAS::DC_GPS |
DC_GPS() | BIAS::DC_GPS |
DC_GPS(const DC_GPS &gps) | BIAS::DC_GPS |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
distanceToMap | BIAS::DC_GPS |
framenum | BIAS::DC_GPS |
GetBinaryLength() | BIAS::DC_GPS | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
gpsTime | BIAS::DC_GPS |
latPos | BIAS::DC_GPS |
longPos | BIAS::DC_GPS |
mapIndex | BIAS::DC_GPS |
offset | BIAS::DC_GPS |
operator<<(std::ostream &os, const DC_GPS &gps) | BIAS::DC_GPS | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &is, DC_GPS &gsp) | BIAS::DC_GPS | [friend]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadBinary(char *data) | BIAS::DC_GPS |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
scaleFactorSpeed | BIAS::DC_GPS |
Set(int framenum, double latPos, double longPos, double azimuth, double speed, double distanceToMap) | BIAS::DC_GPS |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
speed | BIAS::DC_GPS |
WriteBinary(char *data) | BIAS::DC_GPS |
yawRateOffset | BIAS::DC_GPS |
~DC_GPS() | BIAS::DC_GPS |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DC_inertial Member List

This is the complete list of members for BIAS::DC_inertial, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AcceleratorPedal | BIAS::DC_inertial |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ArtFlags | BIAS::DC_inertial |
ArtLeadVehicleDistance | BIAS::DC_inertial |
ArtLeadVehicleVelocity | BIAS::DC_inertial |
ArtSollVelocity | BIAS::DC_inertial |
BlinkLever | BIAS::DC_inertial |
DC_inertial() | BIAS::DC_inertial |
DC_inertial(const DC_inertial &in) | BIAS::DC_inertial |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EngineSpeed | BIAS::DC_inertial |
Gear | BIAS::DC_inertial |
GetBinaryLength() | BIAS::DC_inertial | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
LatAcceleration | BIAS::DC_inertial |
LongAcceleration | BIAS::DC_inertial |
operator<<(std::ostream &os, const DC_inertial &inert) | BIAS::DC_inertial | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &is, DC_inertial &inert) | BIAS::DC_inertial | [friend]
Pitch | BIAS::DC_inertial |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadBinary(char *data) | BIAS::DC_inertial |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Set(double yaw, double yawrateraw, double yawrateoffset, double speed, double steeringangle) | BIAS::DC_inertial |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Speed | BIAS::DC_inertial |
SteeringAngle | BIAS::DC_inertial |
SteeringWheelLever | BIAS::DC_inertial |
TempomatLever | BIAS::DC_inertial |
VehicleFlags | BIAS::DC_inertial |
WriteBinary(char *data) | BIAS::DC_inertial |
Yaw | BIAS::DC_inertial |
YawRateOffset | BIAS::DC_inertial |
YawRateRaw | BIAS::DC_inertial |
~DC_inertial() | BIAS::DC_inertial |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DC_ptu Member List

This is the complete list of members for BIAS::DC_ptu, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
DC_ptu() | BIAS::DC_ptu |
DC_ptu(const DC_ptu &ptu) | BIAS::DC_ptu |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetBinaryLength() | BIAS::DC_ptu | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator<<(std::ostream &os, const DC_ptu &ptu) | BIAS::DC_ptu | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &is, DC_ptu &ptu) | BIAS::DC_ptu | [friend]
PanPos | BIAS::DC_ptu |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadBinary(char *data) | BIAS::DC_ptu |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Set(double PanPos, double TiltPos, unsigned long int TimeStamp, unsigned long StartReadTimeStamp, unsigned long StopReadTimeStamp) | BIAS::DC_ptu |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
StartReadTimeStamp | BIAS::DC_ptu |
StopReadTimeStamp | BIAS::DC_ptu |
TiltPos | BIAS::DC_ptu |
TimeStamp | BIAS::DC_ptu |
WriteBinary(char *data) | BIAS::DC_ptu |
~DC_ptu() | BIAS::DC_ptu |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Debug Member List

This is the complete list of members for BIAS::Debug, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DeInterlace< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::DeInterlace< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int group_id, const std::string &postfix) | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fm | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_tmpFloat | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_tmpInt | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
bDoDownSamplingByTwo_ | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [protected]
bUseEvenLines_ | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [protected]
CalculationInFloat() const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
ConvFloatHori_(const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatVert_(const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntHori_(const Image< InputStorageType > &src, Image< CONV_INT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntVert_(const Image< CONV_INT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const std::string &postfix="") | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const int group_id, const std::string &postfix) | BIAS::Convolution< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DeInterlace() | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
DeInterlace(Param &para, const std::string &postfix="") | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
DeInterlace(Param &para, const int group_id, const std::string &postfix) | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
DeInterlace(const DeInterlace< InputStorageType, OutputStorageType > &m) | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [inline]
eDeInterlaceType_ | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [protected]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::DeInterlace< InputStorageType, OutputStorageType > | [virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline, protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKernel(FilterMask &fm) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::Convolution< InputStorageType, OutputStorageType > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDeInterlaceType(BIAS_DEINTERLACE_TYPE type) | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
SetDownSamplingByTwo(bool bDoDownSamplingByTwo=true) | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernel(FilterMask &fm) | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
SetUseEvenLines(bool bEvenLines=true) | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~DeInterlace() | BIAS::DeInterlace< InputStorageType, OutputStorageType > |
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]

Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DerivedFrom< T, B > Member List

This is the complete list of members for BIAS::DerivedFrom< T, B >, including all inherited members.

Constraints(T *p) | BIAS::DerivedFrom< T, B > | [inline, static]
DerivedFrom() | BIAS::DerivedFrom< T, B > | [inline]

Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Dilation< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Dilation< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Dilate(const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3) | BIAS::Dilation< InputStorageType, OutputStorageType > |
Dilate3Fast(const Image< InputStorageType > &src, const Image< InputStorageType > &orig, Image< OutputStorageType > &dest, bool Neighbor4=false) | BIAS::Dilation< InputStorageType, OutputStorageType > |
Dilate3Fast(const Image< InputStorageType > &src, Image< OutputStorageType > &dest, bool Neighbor4=false) | BIAS::Dilation< InputStorageType, OutputStorageType > |
Dilation() | BIAS::Dilation< InputStorageType, OutputStorageType > | [inline]
FillBorderConst(Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value) | BIAS::Morphology< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Dilation< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Dilation< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
kernelSize_ | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const int group_id, const std::string &postfix) | BIAS::Morphology< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernelSize(int size) | BIAS::Morphology< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~Dilation() | BIAS::Dilation< InputStorageType, OutputStorageType > | [inline, virtual]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Distribution Member List

This is the complete list of members for BIAS::Distribution, including all inherited members.

AddData(const std::vector< double > &data) | BIAS::Distribution |
Count_ | BIAS::Distribution | [protected]
Distribution() | BIAS::Distribution |
GetCount() | BIAS::Distribution | [inline]
GetMean() | BIAS::Distribution | [inline]
GetSigma() | BIAS::Distribution | [inline]
GetVariance() | BIAS::Distribution | [inline]
Reset() | BIAS::Distribution |
SquaredSum_ | BIAS::Distribution | [protected]
Sum_ | BIAS::Distribution | [protected]
~Distribution() | BIAS::Distribution |

Generated on Wed Jun 21 19:06:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DistTransform< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::DistTransform< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DistTransform() | BIAS::DistTransform< InputStorageType, OutputStorageType > | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::DistTransform< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::DistTransform< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InitDistanceImage_(BIAS::Image< OutputStorageType > &img) | BIAS::DistTransform< InputStorageType, OutputStorageType > | [protected]
MakeDistanceImage_(BIAS::Image< OutputStorageType > &img) | BIAS::DistTransform< InputStorageType, OutputStorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetZeroLevel(InputStorageType value) | BIAS::DistTransform< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
zeroLevel_ | BIAS::DistTransform< InputStorageType, OutputStorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~DistTransform() | BIAS::DistTransform< InputStorageType, OutputStorageType > | [inline, virtual]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::dndFileTarget Member List

This is the complete list of members for BIAS::dndFileTarget, including all inherited members.

dndFileTarget(wxFrame *frame) | BIAS::dndFileTarget |
m_frame | BIAS::dndFileTarget | [protected]
OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames) | BIAS::dndFileTarget |

Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::doubleRANSAC Member List

This is the complete list of members for BIAS::doubleRANSAC, including all inherited members.

_bRefineSolution | BIAS::RANSAC< double > | [protected]
_dBestInlierEvaluateScore | BIAS::RANSAC< double > | [protected]
_dBestSampleEvaluateScore | BIAS::RANSAC< double > | [protected]
_dExpectedInlierFraction | BIAS::doubleRANSAC | [protected]
_dInlierDistanceThreshold | BIAS::doubleRANSAC | [protected]
_dProbabilityOfGoodSolution | BIAS::RANSAC< double > | [protected]
_dSolutionErrorThreshold | BIAS::doubleRANSAC | [protected]
_dSoSmallSolutionChange | BIAS::RANSAC< double > | [protected]
_got_solution_flag | BIAS::RANSAC< double > | [protected]
_greedy | BIAS::RANSAC< double > | [protected]
_iBestInlierAcceptCount | BIAS::RANSAC< double > | [protected]
_iBestSampleAcceptCount | BIAS::RANSAC< double > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_uiDataSize | BIAS::RANSAC< double > | [protected]
_uiExplicitSampleNo | BIAS::RANSAC< double > | [protected]
_uiMaxSamples | BIAS::RANSAC< double > | [protected]
_uiMaxSolutionsPerSample | BIAS::RANSAC< double > | [protected]
_uiSampleSize | BIAS::RANSAC< double > | [protected]
_vData | BIAS::doubleRANSAC | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeSampleCount(double inlying_data_fraction, double desired_prob_good, unsigned int sample_size) | BIAS::RANSAC< double > | [protected, static]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
doubleRANSAC() | BIAS::doubleRANSAC | [inline]
EvaluateSolution(const double &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag) | BIAS::doubleRANSAC | [inline, virtual]
GenerateSamples(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::RANSAC< double > | [virtual]
GenerateSamplesEvenspace(int sample_index, std::vector< unsigned int > &sample_table) | BIAS::RANSAC< double > |
GenerateSamplesRandom(int sample_index, std::vector< unsigned int > &sampletable) | BIAS::RANSAC< double > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFinalScore() const | BIAS::RANSAC< double > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetSampleSolutions(std::vector< unsigned int > &which_samples, std::vector< double > &solutions) | BIAS::doubleRANSAC | [inline, virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(std::vector< double > &data, unsigned int data_length, double inlier_distance_threshold, bool refine_solution, unsigned int sample_size, double expected_inlier_fraction, double solution_error_threshold) | BIAS::doubleRANSAC | [inline]
BIAS::RANSAC< double >::Init(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< double > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RANSAC() | BIAS::RANSAC< double > |
RANSAC(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< double > |
RefineSolution(std::vector< unsigned int > &which_samples, double &solution, std::vector< bool > &new_inliers) | BIAS::doubleRANSAC | [inline, virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxSamples(unsigned int max_samples) | BIAS::RANSAC< double > | [inline]
SetSampleCount(unsigned int uiSamples) | BIAS::RANSAC< double > | [inline]
SolveMaster(double inlying_data_fraction, double &solution, std::vector< bool > &inliers) | BIAS::RANSAC< double > | [virtual]
~Debug() | BIAS::Debug | [inline]
~doubleRANSAC() | BIAS::doubleRANSAC | [inline]
~RANSAC() | BIAS::RANSAC< double > | [virtual]

Generated on Wed Jun 21 19:06:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::DrawTextGL Member List

This is the complete list of members for BIAS::DrawTextGL, including all inherited members.

base | BIAS::DrawTextGL | [protected]
DeleteFont() | BIAS::DrawTextGL |
DrawTextGL() | BIAS::DrawTextGL |
fontname | BIAS::DrawTextGL | [protected]
InitFont(void *handleDC, const std::string &theFontname=std::string(DrawTextGL_DEFAULT_FONTNAME), const int &fontHeight=DrawTextGL_DEFAULT_FONTSIZE) | BIAS::DrawTextGL |
initialized | BIAS::DrawTextGL | [protected]
IsInitialized() const | BIAS::DrawTextGL | [inline]
Print(const std::string &text) const | BIAS::DrawTextGL |
Print3D(const std::string &text, const float &xpos, const float &ypos, const float &zpos) const | BIAS::DrawTextGL |
Print3DAbsolute(const std::string &text, const float &xpos, const float &ypos, const float &zpos) const | BIAS::DrawTextGL |
PrintNormCoords(const std::string &text, const float &xpos, const float &ypos) const | BIAS::DrawTextGL |
PrintWinCoords(const std::string &text, const int &xpos, const int &ypos, const int &winWidthFallback=640, const int &winHeightFallback=480) const | BIAS::DrawTextGL |
~DrawTextGL() | BIAS::DrawTextGL | [virtual]

Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EightWaySymmetry< T > Member List

This is the complete list of members for BIAS::EightWaySymmetry< T >, including all inherited members.

DetermineLineType(double &angle) | BIAS::EightWaySymmetry< T > | [inline]
DetermineLineType(const T &startx, const T &starty, const T &endx, const T &endy) | BIAS::EightWaySymmetry< T > | [inline]
InverseTransform(enum TLineType &type, const T &Transformedx, const T &Transformedy, T &Originalx, T &Originaly) | BIAS::EightWaySymmetry< T > | [inline]
InverseTransform(enum TLineType &type, const T transf[2], T orig[2]) | BIAS::EightWaySymmetry< T > | [inline]
Transform(enum TLineType &type, const T &Originalx, const T &Originaly, T &Transformedx, T &Transformedy) | BIAS::EightWaySymmetry< T > | [inline]
Transform(enum TLineType &type, const T orig[2], T transf[2]) | BIAS::EightWaySymmetry< T > | [inline]

Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EightWaySymmetryHomg Member List

This is the complete list of members for BIAS::EightWaySymmetryHomg, including all inherited members.

DetermineLineType(double &angle) | BIAS::EightWaySymmetryHomg | [inline]
DetermineLineType(HomgPoint2D &start, HomgPoint2D &end) | BIAS::EightWaySymmetryHomg | [inline]
BIAS::EightWaySymmetry< double >::DetermineLineType(const double &startx, const double &starty, const double &endx, const double &endy) | BIAS::EightWaySymmetry< double > | [inline]
InverseTransform(enum TLineType &type, HomgPoint2D &Transformed, HomgPoint2D &Original) | BIAS::EightWaySymmetryHomg | [inline]
InverseTransform(enum TLineType &type, Vector2< T > &Transformed, Vector2< T > &Original) | BIAS::EightWaySymmetryHomg | [inline]
BIAS::EightWaySymmetry< double >::InverseTransform(enum TLineType &type, const double &Transformedx, const double &Transformedy, double &Originalx, double &Originaly) | BIAS::EightWaySymmetry< double > | [inline]
BIAS::EightWaySymmetry< double >::InverseTransform(enum TLineType &type, const doubletransf[2], doubleorig[2]) | BIAS::EightWaySymmetry< double > | [inline]
Transform(enum TLineType &type, HomgPoint2D &Original, HomgPoint2D &Transformed) | BIAS::EightWaySymmetryHomg | [inline]
Transform(enum TLineType &type, Vector2< T > &Original, Vector2< T > &Transformed) | BIAS::EightWaySymmetryHomg | [inline]
BIAS::EightWaySymmetry< double >::Transform(enum TLineType &type, const double &Originalx, const double &Originaly, double &Transformedx, double &Transformedy) | BIAS::EightWaySymmetry< double > | [inline]
BIAS::EightWaySymmetry< double >::Transform(enum TLineType &type, const doubleorig[2], doubletransf[2]) | BIAS::EightWaySymmetry< double > | [inline]

Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Ellipsoid3DData Member List

This is the complete list of members for BIAS::Ellipsoid3DData, including all inherited members.

C | BIAS::Ellipsoid3DData
Color | BIAS::Ellipsoid3DData
dAngle | BIAS::Ellipsoid3DData
RotAxis | BIAS::Ellipsoid3DData
s0 | BIAS::Ellipsoid3DData
s1 | BIAS::Ellipsoid3DData
s2 | BIAS::Ellipsoid3DData

Generated on Wed Jun 21 19:06:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EMatrix Member List

This is the complete list of members for BIAS::EMatrix, including all inherited members.

_epipole | BIAS::FMatrixBase | [protected]
_isDecomposed | BIAS::FMatrixBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_R | BIAS::FMatrixBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Add(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Compose(const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
Compose(const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
ComputeFromPMatrices(BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::FMatrix |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DecomposetoSR(BIAS::Matrix3x3< double > &skew_matrix, BIAS::Matrix3x3< double > &rank3_matrix) | BIAS::FMatrix |
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
DivideIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
EMatrix() | BIAS::EMatrix | [inline]
EMatrix(const MatrixInitType &i) | BIAS::EMatrix | [inline, explicit]
EMatrix(const FMatrixBase &F, KMatrix &K1, KMatrix &K2) | BIAS::EMatrix | [inline]
epipolarconstraintRemainder(const HomgPoint2D &pointSource, const HomgPoint2D &pointDest) | BIAS::FMatrixBase |
Fill(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > |
FMatrix() | BIAS::FMatrix | [inline]
FMatrix(const MatrixInitType &i) | BIAS::FMatrix | [inline, explicit]
FMatrix(const FMatrix &f) | BIAS::FMatrix | [inline]
FMatrix(const FMatrixBase &f) | BIAS::FMatrix | [inline]
FMatrix(const Matrix3x3< FMATRIX_TYPE > &f) | BIAS::FMatrix | [inline]
FMatrix(BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::FMatrix | [inline]
FMatrixBase() | BIAS::FMatrixBase | [inline]
FMatrixBase(const MatrixInitType &i) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::FMatrixBase | [inline]
FMatrixBase(const FMATRIX_TYPE *d) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
GetCol(const int &col) const | BIAS::Matrix< FMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2) | BIAS::FMatrixBase | [inline]
GetData() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDeterminant() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetEpipolarError(BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2) | BIAS::FMatrixBase | [inline]
GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const | BIAS::FMatrixBase | [inline]
GetEpipolarLineImage1(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage1(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetEpipoles(HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const | BIAS::FMatrix |
GetEpipolesHomogenized(HomgPoint2D &E1, HomgPoint2D &E2) const | BIAS::FMatrix | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMax() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix< FMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< FMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetRotationTranslation(RMatrix &R, Vector3< double > &C, std::vector< HomgPoint2D > &inlier1, std::vector< HomgPoint2D > &inlier2) | BIAS::EMatrix |
GetRow(const unsigned int row, Vector3< FMATRIX_TYPE > &r) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< FMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InitFromF(const FMatrixBase &F, KMatrix &K1, KMatrix &K2) | BIAS::EMatrix |
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Invert(Matrix3x3< FMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< FMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
IsValid() | BIAS::FMatrix |
IsZero(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< FMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const FMATRIX_TYPEvalue) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< FMATRIX_TYPE > | [explicit]
Matrix(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< FMATRIX_TYPE > | [explicit]
Matrix3x3(const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
MaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Multiply(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultiplyIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< FMATRIX_TYPE > |
BIAS::Matrix< FMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< FMATRIX_TYPE > &f) | BIAS::EMatrix | [inline]
BIAS::FMatrix::operator=(const FMatrix &f) | BIAS::FMatrix |
BIAS::Matrix< FMATRIX_TYPE >::operator=(const TNT::Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::operator=(const Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
BIAS::TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
reference typedef | TNT::Matrix< T > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Scale(const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
ScaleRow(int NoRow, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
Set(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
Set(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
Set(RMatrixBase &R, Vector3< FMATRIX_TYPE > &C) | BIAS::FMatrixBase | [inline]
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFromColumnVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromVector(const TNT::Vector< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetIdentity() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetZero() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Transpose(const Matrix3x3< FMATRIX_TYPE > &arg) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Debug() | BIAS::Debug | [inline]
~FMatrix() | BIAS::FMatrix | [inline]
~FMatrixBase() | BIAS::FMatrixBase |
~Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:06:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EMatrixBase Member List

This is the complete list of members for BIAS::EMatrixBase, including all inherited members.

_epipole | BIAS::EMatrixBase | [protected]
_isDecomposed | BIAS::EMatrixBase | [protected]
_R | BIAS::EMatrixBase | [protected]
Add(const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
AddIP(const EMATRIX_TYPE &scalar) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
AddIP(const Matrix< EMATRIX_TYPE > &arg) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< EMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< EMATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
DivideIP(const EMATRIX_TYPE &scalar) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
EMatrixBase() | BIAS::EMatrixBase | [inline]
EMatrixBase(const Vector3< EMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::EMatrixBase | [inline]
EMatrixBase(const Vector3< EMATRIX_TYPE > &epipole, const Vector3< EMATRIX_TYPE > &EulerAngXYZ) | BIAS::EMatrixBase | [inline]
Fill(const EMATRIX_TYPE &scalar) | BIAS::Matrix< EMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< EMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< EMATRIX_TYPE > |
GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2) | BIAS::EMatrixBase | [inline]
GetData() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< EMATRIX_TYPE > |
GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) | BIAS::EMatrixBase | [inline]
GetMax() const | BIAS::Matrix< EMATRIX_TYPE > |
GetMaxMin(EMATRIX_TYPE &max, EMATRIX_TYPE &min) const | BIAS::Matrix< EMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< EMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< EMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< EMATRIX_TYPE > &r) const | BIAS::Matrix3x3< EMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< EMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< EMATRIX_TYPE > &dest) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< EMATRIX_TYPE > |
Invert(Matrix3x3< EMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< EMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< EMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< EMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< EMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< EMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< EMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< EMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const EMATRIX_TYPEvalue) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< EMATRIX_TYPE > | [explicit]
Matrix(const Matrix< EMATRIX_TYPE > &A) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< EMATRIX_TYPE > &A) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< EMATRIX_TYPE > | [explicit]
Matrix3x3(const EMATRIX_TYPEa0, const EMATRIX_TYPEa1, const EMATRIX_TYPEa2, const EMATRIX_TYPEa3, const EMATRIX_TYPEa4, const EMATRIX_TYPEa5, const EMATRIX_TYPEa6, const EMATRIX_TYPEa7, const EMATRIX_TYPEa8) | BIAS::Matrix3x3< EMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< EMATRIX_TYPE > &A) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< EMATRIX_TYPE > &A) | BIAS::Matrix3x3< EMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< EMATRIX_TYPE > &A) | BIAS::Matrix3x3< EMATRIX_TYPE > |
MaxMin(EMATRIX_TYPE &max, EMATRIX_TYPE &min) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< EMATRIX_TYPE > &argvec, Vector3< EMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< EMATRIX_TYPE > &argmat, Matrix3x3< EMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< EMATRIX_TYPE > &argmat, Matrix3x4< EMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::Mult(const Matrix< EMATRIX_TYPE > &arg, Matrix< EMATRIX_TYPE > &result) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::Mult(const Matrix< EMATRIX_TYPE > &arg) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::Mult(const Vector< EMATRIX_TYPE > &arg, Vector< EMATRIX_TYPE > &result) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Multiply(const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
MultiplyIP(const EMATRIX_TYPE &scalar) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
MultLeft(const Matrix< EMATRIX_TYPE > &arg) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
MultLeft(const Vector< EMATRIX_TYPE > &arg, Vector< EMATRIX_TYPE > &result) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< EMATRIX_TYPE > |
BIAS::Matrix< EMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< EMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< EMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< EMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< EMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< EMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< EMATRIX_TYPE > &mat) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::operator=(const TNT::Matrix< EMATRIX_TYPE > &mat) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
BIAS::Matrix< EMATRIX_TYPE >::operator=(const Matrix< EMATRIX_TYPE > &mat) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< EMATRIX_TYPE > |
Scale(const EMATRIX_TYPE &scalar, Matrix3x3< EMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, EMATRIX_TYPEscale) | BIAS::Matrix< EMATRIX_TYPE > |
ScaleRow(int NoRow, EMATRIX_TYPEscale) | BIAS::Matrix< EMATRIX_TYPE > |
Set(const Vector3< EMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::EMatrixBase | [inline]
Set(const Vector3< EMATRIX_TYPE > &epipole, const Vector3< EMATRIX_TYPE > &EulerAngXYZ) | BIAS::EMatrixBase | [inline]
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< EMATRIX_TYPE > &vec) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const EMATRIX_TYPE &x, const EMATRIX_TYPE &y, const EMATRIX_TYPE &z) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< EMATRIX_TYPE > &data) | BIAS::Matrix< EMATRIX_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< EMATRIX_TYPE > &v0, const BIAS::Vector3< EMATRIX_TYPE > &v1, const BIAS::Vector3< EMATRIX_TYPE > &v2) | BIAS::Matrix3x3< EMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< EMATRIX_TYPE > &v0, const BIAS::Vector3< EMATRIX_TYPE > &v1, const BIAS::Vector3< EMATRIX_TYPE > &v2) | BIAS::Matrix3x3< EMATRIX_TYPE > |
SetFromVector(const TNT::Vector< EMATRIX_TYPE > &vec) | BIAS::Matrix3x3< EMATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< EMATRIX_TYPE > &data) | BIAS::Matrix< EMATRIX_TYPE > |
SetZero() | BIAS::Matrix< EMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const EMATRIX_TYPE &scalar, Matrix< EMATRIX_TYPE > &dest) const | BIAS::Matrix< EMATRIX_TYPE > | [inline]
SubIP(const Matrix< EMATRIX_TYPE > &arg) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
SubIP(const EMATRIX_TYPE &scalar) | BIAS::Matrix< EMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< EMATRIX_TYPE > |
Transpose(const Matrix3x3< EMATRIX_TYPE > &arg) | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< EMATRIX_TYPE > &argvec, Vector3< EMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< EMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~EMatrixBase() | BIAS::EMatrixBase | [inline]
~Matrix() | BIAS::Matrix< EMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< EMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:06:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EpipolarLine Member List

This is the complete list of members for BIAS::EpipolarLine, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Add(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Add(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
AddIP(const Vector3< HOMGLINE2D_TYPE > &argvec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Angle_ | BIAS::EpipolarLine | [protected]
CalcTransformed_() | BIAS::EpipolarLine | [protected, virtual]
CartesianToPolar() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
CloseEdge_ | BIAS::EpipolarLine | [protected]
CloseIntersection_ | BIAS::EpipolarLine | [protected]
CoordEuclidianToSphere() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
CoordSphereToEuclidian() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
CrossProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
CrossProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Current_ | BIAS::EpipolarLine | [protected]
data_ | BIAS::Vector3< HOMGLINE2D_TYPE > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DeltaR_ | BIAS::EpipolarLine | [protected]
DetermineIntersectionsAndEpipoleDistances_(HomgPoint2D &point) | BIAS::EpipolarLine | [protected]
Dist(const Vector3< HOMGLINE2D_TYPE > &vec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Distance(HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
Distance(const HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
DistanceSquared(const HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
Div(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Divide(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
DivideIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
DivIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Draw(Image< PixelType > &im) | BIAS::EpipolarLine |
DrawWhole(Image< PixelType > &im) | BIAS::EpipolarLine |
dx_ | BIAS::EpipolarLine | [protected]
dy_ | BIAS::EpipolarLine | [protected]
ElementwiseDivision(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseDivision(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
End_ | BIAS::EpipolarLine | [protected]
EpipolarLine() | BIAS::EpipolarLine |
EpipolarLine(const EpipolarLine &line) | BIAS::EpipolarLine |
EpipolarLine(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::EpipolarLine |
Epipole_ | BIAS::EpipolarLine | [protected]
EpipolePosition_ | BIAS::EpipolarLine | [protected]
FarIntersection_ | BIAS::EpipolarLine | [protected]
GetAngle() const | BIAS::EpipolarLine | [inline]
GetCloseEdge() const | BIAS::EpipolarLine | [inline, virtual]
GetCloseIntersectionWithImageBorder() | BIAS::EpipolarLine | [inline, virtual]
GetCopyOfCloseIntersectionWithImageBorder() const | BIAS::EpipolarLine | [inline, virtual]
GetCopyOfEpipole() const | BIAS::EpipolarLine | [inline, virtual]
GetCopyOfFarIntersectionWithImageBorder() const | BIAS::EpipolarLine | [inline, virtual]
GetData() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
GetData() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDeltaR() const | BIAS::EpipolarLine | [inline, virtual]
GetDx() const | BIAS::EpipolarLine | [inline]
GetDy() const | BIAS::EpipolarLine | [inline]
GetEpipole() | BIAS::EpipolarLine | [inline, virtual]
GetEpipolePosition() const | BIAS::EpipolarLine | [inline, virtual]
GetFarEdge() const | BIAS::EpipolarLine | [inline, virtual]
GetFarIntersectionWithImageBorder() | BIAS::EpipolarLine | [inline, virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetImageHeight() const | BIAS::EpipolarLine | [inline, virtual]
GetImageWidth() const | BIAS::EpipolarLine | [inline, virtual]
GetIntersectionsWithImage(unsigned int width, unsigned int height, unsigned int coo[4]) | BIAS::HomgLine2D |
GetLineType() const | BIAS::EpipolarLine | [inline]
GetNextLine(bool clockwise, EpipolarLine &next, double dist=1.0) | BIAS::EpipolarLine | [virtual]
GetNormalized() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
GetPerpendicularLine(HomgPoint2D &point, HomgLine2D &perpline) | BIAS::HomgLine2D | [inline]
GetRMax() const | BIAS::EpipolarLine | [inline, virtual]
GetRMin() const | BIAS::EpipolarLine | [inline, virtual]
GetROffset() const | BIAS::EpipolarLine | [inline]
GetSkewSymmetricMatrix() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
GetTransformedEnd() | BIAS::EpipolarLine | [inline]
GetTransformedEnd() const | BIAS::EpipolarLine | [inline]
GetTransformedStart() | BIAS::EpipolarLine | [inline]
GetTransformedStart() const | BIAS::EpipolarLine | [inline]
GetW() | BIAS::HomgLine2D | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::EpipolarLine | [protected]
HomgLine2D() | BIAS::HomgLine2D | [inline]
HomgLine2D(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::HomgLine2D | [inline, explicit]
HomgLine2D(HOMGLINE2D_TYPE a, HOMGLINE2D_TYPE b, HOMGLINE2D_TYPE c) | BIAS::HomgLine2D | [inline]
HomgLine2D(const HomgLine2D &line) | BIAS::HomgLine2D | [inline]
HomgLine2D(const HomgPoint2D &p1, const HomgPoint2D &p2) | BIAS::HomgLine2D | [inline]
Homogenize() | BIAS::HomgLine2D | [inline]
Init(unsigned int width, unsigned int height, HomgPoint2D &epipole, HomgPoint2D &otherpoint, enum HomgPoint2D::EPosition epos) | BIAS::EpipolarLine | [virtual]
Init(unsigned int width, unsigned int height, HomgPoint2D &epipole, HomgPoint2D &otherpoint) | BIAS::EpipolarLine | [virtual]
Interpolate_(enum TLineType &type, unsigned char **ida, int &x, int &y, double &g, unsigned char &result) | BIAS::EpipolarLine | [protected, virtual]
Intersection(HomgLine2D &line, HomgPoint2D &intersect) const | BIAS::HomgLine2D | [inline]
Intersection(HomgLine2D &line) const | BIAS::HomgLine2D | [inline]
IsZero() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Length() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Length_ | BIAS::EpipolarLine | [protected]
Load(const std::string &filename) | BIAS::Vector3< HOMGLINE2D_TYPE > |
LoadBogTC(const std::string &filename) | BIAS::Vector3< HOMGLINE2D_TYPE > |
Mult(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
MultIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Multiply(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
MultiplyIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Normalize() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Normalize(Matrix3x3< HOMGLINE2D_TYPE > &cov) | BIAS::Vector3< HOMGLINE2D_TYPE > |
NormL1() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
NormL2() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator!=(const Vector3< HOMGLINE2D_TYPE > &arg) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator=(const EpipolarLine &line) | BIAS::EpipolarLine | [virtual]
BIAS::HomgLine2D::operator=(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::HomgLine2D::operator=(const Vector< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const Vector3< HOMGLINE2D_TYPE > &arg) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
OuterProduct(const Vector3< HOMGLINE2D_TYPE > &v, Matrix3x3< HOMGLINE2D_TYPE > &res) const | BIAS::Vector3< HOMGLINE2D_TYPE > |
OuterProduct(const Vector3< HOMGLINE2D_TYPE > &v) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Phi() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Phi() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
PInfinity_ | BIAS::EpipolarLine | [protected]
PInfinityPosition_ | BIAS::EpipolarLine | [protected]
PolarToCartesian() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Radius() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Radius() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Recalc(unsigned int width, unsigned int height, HomgPoint2D &epipole, enum HomgPoint2D::EPosition epos) | BIAS::EpipolarLine |
Recalc() | BIAS::EpipolarLine |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
RMaxLine_ | BIAS::EpipolarLine | [protected]
RMinLine_ | BIAS::EpipolarLine | [protected]
ROffset_ | BIAS::EpipolarLine | [protected]
Save(const std::string &filename) const | BIAS::Vector3< HOMGLINE2D_TYPE > |
ScalarProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, HOMGLINE2D_TYPE &result) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ScalarProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ScanLine(Image< unsigned char > &source, HomgPoint2D &epipole, enum HomgPoint2D::EPosition epos, double RMin, double RMax, bool forward, unsigned int &length, unsigned char *Destination) | BIAS::EpipolarLine | [virtual]
ScanLine_(Image< unsigned char > &source, unsigned int ROffset, unsigned int &length, unsigned char *Destination, bool forward) | BIAS::EpipolarLine | [protected, virtual]
SearchOverInf_ | BIAS::EpipolarLine | [protected]
Set(const HomgPoint2D &p1, const HomgPoint2D &p2) | BIAS::HomgLine2D | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE *pv) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const Vector< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetEpipole(HomgPoint2D &ep) | BIAS::EpipolarLine | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetZero() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Size() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Start_ | BIAS::EpipolarLine | [protected]
Sub(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Sub(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SubIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SubIP(const Vector3< HOMGLINE2D_TYPE > &argvec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Sym_ | BIAS::EpipolarLine | [protected]
Theta() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Theta() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
TransformedCurrent_ | BIAS::EpipolarLine | [protected]
TransformedEnd_ | BIAS::EpipolarLine | [protected]
TransformedStart_ | BIAS::EpipolarLine | [protected]
Type_ | BIAS::EpipolarLine | [protected]
Vector3() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(const HOMGLINE2D_TYPE *pv) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(char *s) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const Vector< HOMGLINE2D_TYPE > &v) | BIAS::Vector3< HOMGLINE2D_TYPE > |
Width_ | BIAS::EpipolarLine | [protected]
~Debug() | BIAS::Debug | [inline]
~EpipolarLine() | BIAS::EpipolarLine | [virtual]
~HomgLine2D() | BIAS::HomgLine2D | [inline]
~Vector3() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]

Generated on Wed Jun 21 19:06:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Erosion< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Erosion< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Erode(const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination, int KernelSize=3) | BIAS::Erosion< InputStorageType, OutputStorageType > |
Erode3Fast(const Image< InputStorageType > &src, Image< OutputStorageType > &dest, bool Neighbor4=false) | BIAS::Erosion< InputStorageType, OutputStorageType > |
Erosion() | BIAS::Erosion< InputStorageType, OutputStorageType > | [inline]
FillBorderConst(Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value) | BIAS::Morphology< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Erosion< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Erosion< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
kernelSize_ | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const int group_id, const std::string &postfix) | BIAS::Morphology< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernelSize(int size) | BIAS::Morphology< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~Erosion() | BIAS::Erosion< InputStorageType, OutputStorageType > | [inline, virtual]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:06:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::EuclideanTransf3D Member List

This is the complete list of members for BIAS::EuclideanTransf3D, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< double > |
BinWrite(const char *filename) const | BIAS::Matrix< double > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< double > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline]
element_type typedef | TNT::Matrix< T > |
EuclideanTransf3D() | BIAS::EuclideanTransf3D |
Fill(const double &scalar) | BIAS::Matrix< double > |
GetCol(const int &col) const | BIAS::Matrix< double > |
GetCols() const | BIAS::Matrix< double > | [inline]
GetData() const | BIAS::Matrix< double > | [inline]
GetDataArray() const | BIAS::Matrix< double > | [inline]
GetDataArray1() const | BIAS::Matrix< double > | [inline]
GetDataLast() const | BIAS::Matrix< double > | [inline]
GetMax() const | BIAS::Matrix< double > |
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > |
GetMean() const | BIAS::Matrix< double > |
GetMin() const | BIAS::Matrix< double > |
GetNumElements() const | BIAS::Matrix< double > | [inline]
GetRow(const int &row) const | BIAS::Matrix< double > |
GetRows() const | BIAS::Matrix< double > | [inline]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > |
IsZero(double eps=0.0) const | BIAS::Matrix< double > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< double > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix4x4() | BIAS::Matrix4x4< double > | [inline]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< double > | [explicit]
Matrix4x4(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15) | BIAS::Matrix4x4< double > |
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< double > | [inline, explicit]
Matrix4x4(const Matrix4x4< double > &A) | BIAS::Matrix4x4< double > | [inline]
Matrix4x4(const Matrix< double > &arg) | BIAS::Matrix4x4< double > |
Matrix4x4(const TNT::Matrix< double > &A) | BIAS::Matrix4x4< double > |
Matrix4x4(const Matrix3x3< double > &R, const Vector3< double > &trans) | BIAS::Matrix4x4< double > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< double > &argvec, Vector4< double > &destvec) const | BIAS::Matrix4x4< double > | [inline]
Mult(const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const | BIAS::Matrix4x4< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< double > |
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< double > |
NormalizeCols() | BIAS::Matrix< double > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > |
NormalizeRows() | BIAS::Matrix< double > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > |
NormFrobenius() const | BIAS::Matrix< double > | [inline]
NormL1() const | BIAS::Matrix< double > | [inline]
NormL2() const | BIAS::Matrix< double > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< double > &mat) | BIAS::Matrix4x4< double > |
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< double > |
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > |
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(RMatrixBase &R, Vector3< double > &t) | BIAS::EuclideanTransf3D |
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetIdentity() | BIAS::Matrix4x4< double > | [inline]
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetXYZ(Vector3< double > &EulerAng, Vector3< double > &t) | BIAS::EuclideanTransf3D |
SetZero() | BIAS::Matrix< double > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline]
Trace() const | BIAS::Matrix< double > | [inline]
Transpose() const | BIAS::Matrix< double > | [inline]
TransposeIP() | BIAS::Matrix4x4< double > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~EuclideanTransf3D() | BIAS::EuclideanTransf3D |
~Matrix() | BIAS::Matrix< double > | [virtual]
~Matrix4x4() | BIAS::Matrix4x4< double > | [virtual]

Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ExampleDebug Member List

This is the complete list of members for BIAS::ExampleDebug, including all inherited members.

_iMyInt | BIAS::ExampleDebug | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
ExampleDebug() | BIAS::ExampleDebug |
func() | BIAS::ExampleDebug |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ResetDebugLevelFromGlobal() | BIAS::ExampleDebug |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~ExampleDebug() | BIAS::ExampleDebug |

Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ExifTag Member List

This is the complete list of members for BIAS::ExifTag, including all inherited members.

ExifTag() | BIAS::ExifTag | [inline]
ExifTag(const unsigned short _id, const std::string _name, const std::string _value) | BIAS::ExifTag | [inline]
ExifTag(const unsigned short _id, const std::string _name) | BIAS::ExifTag | [inline]
GoodValue(const std::string &val) const | BIAS::ExifTag |
id | BIAS::ExifTag |
name | BIAS::ExifTag |
Print(std::ostream &os=std::cout) const | BIAS::ExifTag |
value | BIAS::ExifTag |
~ExifTag() | BIAS::ExifTag | [inline]

Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Feat Member List

This is the complete list of members for BIAS::Feat, including all inherited members.

operator<(const Feat &r) const | BIAS::Feat | [inline]
operator=(const Feat &f) | BIAS::Feat | [inline]
val | BIAS::Feat |
x | BIAS::Feat |
y | BIAS::Feat |

Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FFT2D< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FFT2D< InputStorageType, OutputStorageType >, including all inherited members.

_in | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_out | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_OutNum | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_OutSizeY | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_p_forward | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_p_reverse | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_Size | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_SizeX | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_SizeY | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
CrossPowerSpectrum(const Image< InputStorageType > &src1, const Image< InputStorageType > &src2, Image< OutputStorageType > &dst1) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
FFT2D() | BIAS::FFT2D< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
Forward_(const Image< InputStorageType > &src) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected, virtual]
GetBordersValid_(int &border_x, int &border_y) const | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected, virtual]
Init(int width, int height) | BIAS::FFT2D< InputStorageType, OutputStorageType > |
Normalize(Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
Release() | BIAS::FFT2D< InputStorageType, OutputStorageType > |
Reverse_(const Image< OutputStorageType > &src) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected, virtual]
TransformAbs(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
TransformLogAbs(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
TransformPhase(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
TransformReverse(const Image< OutputStorageType > &src, Image< InputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
~FFT2D() | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, including all inherited members.

_in | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_NumTilesX | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected]
_NumTilesY | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected]
_out | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_OutNum | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_OutSizeY | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_p_forward | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_p_reverse | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_Size | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_SizeX | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_SizeY | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected]
_TileSizeX | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected]
_TileSizeY | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected]
CrossPowerSpectrum(const Image< InputStorageType > &src1, const Image< InputStorageType > &src2, Image< OutputStorageType > &dst1) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
FFT2D() | BIAS::FFT2D< InputStorageType, OutputStorageType > |
FFT2D_Tiles() | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [virtual]
Forward_(const Image< InputStorageType > &src) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected, virtual]
GetBordersValid_(int &border_x, int &border_y) const | BIAS::FFT2D< InputStorageType, OutputStorageType > | [protected, virtual]
Init(int, int) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [inline, virtual]
Init(int width, int height, int tilewidth, int tileheight) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [virtual]
Normalize(Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
Release() | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > |
Reverse_(const Image< OutputStorageType > &src) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [protected, virtual]
TransformAbs(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [virtual]
TransformLogAbs(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
TransformPhase(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
TransformReverse(const Image< OutputStorageType > &src, Image< InputStorageType > &dst) | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > | [virtual]
~FFT2D() | BIAS::FFT2D< InputStorageType, OutputStorageType > | [virtual]
~FFT2D_Tiles() | BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType > |

Generated on Wed Jun 21 19:07:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FFT Member List

This is the complete list of members for BIAS::FFT, including all inherited members.

_in | BIAS::FFT | [protected]
_InputSize | BIAS::FFT | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_out | BIAS::FFT | [protected]
_OutNum | BIAS::FFT | [protected]
_p | BIAS::FFT | [protected]
_Size | BIAS::FFT | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Compute(double *in) | BIAS::FFT |
Compute(Vector< double > &in) | BIAS::FFT |
Compute() | BIAS::FFT | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DumpResult(std::ostream &os=std::cout) | BIAS::FFT |
FFT() | BIAS::FFT |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetInput() | BIAS::FFT | [inline]
GetMagnitude(double *mag) | BIAS::FFT |
GetMagnitude(Vector< double > &mag) | BIAS::FFT |
GetPhase(double *phase) | BIAS::FFT |
GetPhase(Vector< double > &phase) | BIAS::FFT |
GetResult(std::complex< double > *res) | BIAS::FFT | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(int size) | BIAS::FFT |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Release() | BIAS::FFT |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~FFT() | BIAS::FFT |

Generated on Wed Jun 21 19:06:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FilterBase< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FilterBase< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [pure virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const =0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FilterMask Member List

This is the complete list of members for BIAS::FilterMask, including all inherited members.

_fHoriz | BIAS::FilterMask | [protected]
_fKernel | BIAS::FilterMask | [protected]
_fVert | BIAS::FilterMask | [protected]
_HorizRightShift | BIAS::FilterMask | [protected]
_KernelRightShift | BIAS::FilterMask | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_Separable | BIAS::FilterMask | [protected]
_sHoriz | BIAS::FilterMask | [protected]
_sKernel | BIAS::FilterMask | [protected]
_sVert | BIAS::FilterMask | [protected]
_VertRightShift | BIAS::FilterMask | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeIntPrecisionBits(int NumberOfBitsInInputData, int NumberOfBitsInTempData) | BIAS::FilterMask |
CreateFloatFilter() | BIAS::FilterMask |
CreateIntFilter(int rshift, int rshifth, int rshiftv) | BIAS::FilterMask |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
FilterMask() | BIAS::FilterMask |
FilterMask(const FilterMask &mask) | BIAS::FilterMask | [inline]
FilterMask(const Matrix< FM_INT > &kernel, int rs, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask | [inline]
FilterMask(const Matrix< FM_FLOAT > &kernel, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask | [inline]
FilterMask(const Vector< FM_INT > &horz, const Vector< FM_INT > &vert, int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask | [inline]
FilterMask(const Vector< FM_FLOAT > &horz, const Vector< FM_FLOAT > &vert, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHorizRightShift() const | BIAS::FilterMask | [inline]
GetKernelf() const | BIAS::FilterMask | [inline]
GetKerneli() const | BIAS::FilterMask | [inline]
GetKernelRightShift() const | BIAS::FilterMask | [inline]
GetSepfh() const | BIAS::FilterMask | [inline]
GetSepfv() const | BIAS::FilterMask | [inline]
GetSepih() const | BIAS::FilterMask | [inline]
GetSepiv() const | BIAS::FilterMask | [inline]
GetSize(int &hor, int &vert) const | BIAS::FilterMask | [inline]
GetVertRightShift() const | BIAS::FilterMask | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(const Matrix< FM_INT > &kernel, int rs, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask |
Init(const Matrix< FM_FLOAT > &kernel, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask |
Init(const Vector< FM_INT > &horz, const Vector< FM_INT > &vert, int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask |
Init(const Vector< FM_FLOAT > &horz, const Vector< FM_FLOAT > &vert, bool ResetOtherType=FM_RESET_OTHER) | BIAS::FilterMask |
IsSeparable() const | BIAS::FilterMask | [inline]
IsSize1x1() | BIAS::FilterMask | [inline]
operator<<(std::ostream &os, const FilterMask &fm) | BIAS::FilterMask | [friend]
operator=(const FilterMask &src) | BIAS::FilterMask |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ResetFloatFilter() | BIAS::FilterMask |
ResetIntFilter() | BIAS::FilterMask |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetZero() | BIAS::FilterMask | [inline]
Transpose() | BIAS::FilterMask |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:07:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FilterNTo2N< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_VecLengthType | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EVecLengthType enum name | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const std::string &postfix="") | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const =0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
VecLen(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL1(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL2(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenMax(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L1 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L2 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_max enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FilterNTo3N< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2, Image< OutputStorageType > &dst3) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo3N() | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
FilterNTo3N(Param &para, const std::string &postfix="") | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
FilterNTo3N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const =0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo3N() | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FilterNToN< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::FilterNToN< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [pure virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [pure virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [pure virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const =0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]

Generated on Wed Jun 21 19:07:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FMatrix Member List

This is the complete list of members for BIAS::FMatrix, including all inherited members.

_epipole | BIAS::FMatrixBase | [protected]
_isDecomposed | BIAS::FMatrixBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_R | BIAS::FMatrixBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Add(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Compose(const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
Compose(const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
ComputeFromPMatrices(BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::FMatrix |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DecomposetoSR(BIAS::Matrix3x3< double > &skew_matrix, BIAS::Matrix3x3< double > &rank3_matrix) | BIAS::FMatrix |
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
DivideIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
epipolarconstraintRemainder(const HomgPoint2D &pointSource, const HomgPoint2D &pointDest) | BIAS::FMatrixBase |
Fill(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > |
FMatrix() | BIAS::FMatrix | [inline]
FMatrix(const MatrixInitType &i) | BIAS::FMatrix | [inline, explicit]
FMatrix(const FMatrix &f) | BIAS::FMatrix | [inline]
FMatrix(const FMatrixBase &f) | BIAS::FMatrix | [inline]
FMatrix(const Matrix3x3< FMATRIX_TYPE > &f) | BIAS::FMatrix | [inline]
FMatrix(BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::FMatrix | [inline]
FMatrixBase() | BIAS::FMatrixBase | [inline]
FMatrixBase(const MatrixInitType &i) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::FMatrixBase | [inline]
FMatrixBase(const FMATRIX_TYPE *d) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
GetCol(const int &col) const | BIAS::Matrix< FMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2) | BIAS::FMatrixBase | [inline]
GetData() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDeterminant() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetEpipolarError(BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2) | BIAS::FMatrixBase | [inline]
GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const | BIAS::FMatrixBase | [inline]
GetEpipolarLineImage1(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage1(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetEpipoles(HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const | BIAS::FMatrix |
GetEpipolesHomogenized(HomgPoint2D &E1, HomgPoint2D &E2) const | BIAS::FMatrix | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMax() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix< FMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< FMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< FMATRIX_TYPE > &r) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< FMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Invert(Matrix3x3< FMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< FMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
IsValid() | BIAS::FMatrix |
IsZero(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< FMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const FMATRIX_TYPEvalue) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< FMATRIX_TYPE > | [explicit]
Matrix(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< FMATRIX_TYPE > | [explicit]
Matrix3x3(const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
MaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Multiply(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultiplyIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< FMATRIX_TYPE > |
BIAS::Matrix< FMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const FMatrix &f) | BIAS::FMatrix |
operator=(const Matrix3x3< FMATRIX_TYPE > &f) | BIAS::FMatrix | [inline]
BIAS::Matrix< FMATRIX_TYPE >::operator=(const TNT::Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::operator=(const Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
BIAS::TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
reference typedef | TNT::Matrix< T > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Scale(const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
ScaleRow(int NoRow, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
Set(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
Set(RMatrixBase &R, Vector3< FMATRIX_TYPE > &C) | BIAS::FMatrixBase | [inline]
SetAsCrossProductMatrix(const Vector3< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFromColumnVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromVector(const TNT::Vector< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetIdentity() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetZero() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Transpose(const Matrix3x3< FMATRIX_TYPE > &arg) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Debug() | BIAS::Debug | [inline]
~FMatrix() | BIAS::FMatrix | [inline]
~FMatrixBase() | BIAS::FMatrixBase |
~Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:07:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FMatrixBase Member List

This is the complete list of members for BIAS::FMatrixBase, including all inherited members.

_epipole | BIAS::FMatrixBase | [protected]
_isDecomposed | BIAS::FMatrixBase | [protected]
_R | BIAS::FMatrixBase | [protected]
Add(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
AddIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Compose(const KMatrix &K1, const RMatrixBase &R1, const Vector3< double > &C1, const KMatrix &K2, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
Compose(const RMatrixBase &R1, const Vector3< double > &C1, const RMatrixBase &R2, const Vector3< double > &C2) | BIAS::FMatrixBase |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
DivideIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
epipolarconstraintRemainder(const HomgPoint2D &pointSource, const HomgPoint2D &pointDest) | BIAS::FMatrixBase |
Fill(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > |
FMatrixBase() | BIAS::FMatrixBase | [inline]
FMatrixBase(const MatrixInitType &i) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::FMatrixBase | [inline]
FMatrixBase(const FMATRIX_TYPE *d) | BIAS::FMatrixBase | [inline, explicit]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
FMatrixBase(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
GetCol(const int &col) const | BIAS::Matrix< FMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D &p1, const BIAS::HomgPoint2D &p2) | BIAS::FMatrixBase | [inline]
GetData() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetEpipolarError(BIAS::HomgPoint2D &P1, BIAS::HomgPoint2D &P2) | BIAS::FMatrixBase | [inline]
GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D &P1, const BIAS::HomgPoint2D &P2) const | BIAS::FMatrixBase | [inline]
GetEpipolarLineImage1(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage1(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point) const | BIAS::FMatrixBase |
GetEpipolarLineImage2(const HomgPoint2D &point, HomgLine2D &homline) const | BIAS::FMatrixBase |
GetMax() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix< FMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< FMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< FMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< FMATRIX_TYPE > &r) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< FMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Invert(Matrix3x3< FMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< FMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< FMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< FMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< FMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< FMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const FMATRIX_TYPEvalue) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< FMATRIX_TYPE > | [explicit]
Matrix(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< FMATRIX_TYPE > | [explicit]
Matrix3x3(const FMATRIX_TYPEa0, const FMATRIX_TYPEa1, const FMATRIX_TYPEa2, const FMATRIX_TYPEa3, const FMATRIX_TYPEa4, const FMATRIX_TYPEa5, const FMATRIX_TYPEa6, const FMATRIX_TYPEa7, const FMATRIX_TYPEa8) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< FMATRIX_TYPE > &A) | BIAS::Matrix3x3< FMATRIX_TYPE > |
MaxMin(FMATRIX_TYPE &max, FMATRIX_TYPE &min) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< FMATRIX_TYPE > &argmat, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< FMATRIX_TYPE > &argmat, Matrix3x4< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg, Matrix< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::Mult(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Multiply(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultiplyIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
MultLeft(const Vector< FMATRIX_TYPE > &arg, Vector< FMATRIX_TYPE > &result) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< FMATRIX_TYPE > |
BIAS::Matrix< FMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< FMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< FMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< FMATRIX_TYPE > &mat) | BIAS::FMatrixBase | [inline]
BIAS::Matrix< FMATRIX_TYPE >::operator=(const TNT::Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
BIAS::Matrix< FMATRIX_TYPE >::operator=(const Matrix< FMATRIX_TYPE > &mat) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< FMATRIX_TYPE > |
Scale(const FMATRIX_TYPE &scalar, Matrix3x3< FMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
ScaleRow(int NoRow, FMATRIX_TYPEscale) | BIAS::Matrix< FMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(const Vector3< FMATRIX_TYPE > &epipole, const RMatrixBase &R) | BIAS::FMatrixBase | [inline]
Set(const Vector3< FMATRIX_TYPE > &epipole, const Vector3< FMATRIX_TYPE > &EulerAngXYZ) | BIAS::FMatrixBase | [inline]
Set(RMatrixBase &R, Vector3< FMATRIX_TYPE > &C) | BIAS::FMatrixBase | [inline]
SetAsCrossProductMatrix(const Vector3< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const FMATRIX_TYPE &x, const FMATRIX_TYPE &y, const FMATRIX_TYPE &z) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< FMATRIX_TYPE > &v0, const BIAS::Vector3< FMATRIX_TYPE > &v1, const BIAS::Vector3< FMATRIX_TYPE > &v2) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetFromVector(const TNT::Vector< FMATRIX_TYPE > &vec) | BIAS::Matrix3x3< FMATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< FMATRIX_TYPE > &data) | BIAS::Matrix< FMATRIX_TYPE > |
SetZero() | BIAS::Matrix< FMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const FMATRIX_TYPE &scalar, Matrix< FMATRIX_TYPE > &dest) const | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const Matrix< FMATRIX_TYPE > &arg) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
SubIP(const FMATRIX_TYPE &scalar) | BIAS::Matrix< FMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< FMATRIX_TYPE > |
Transpose(const Matrix3x3< FMATRIX_TYPE > &arg) | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< FMATRIX_TYPE > &argvec, Vector3< FMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< FMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~FMatrixBase() | BIAS::FMatrixBase |
~Matrix() | BIAS::Matrix< FMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< FMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:07:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::FMatrixEstimation Member List

This is the complete list of members for BIAS::FMatrixEstimation, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EightPoint(BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2) | BIAS::FMatrixEstimation | [inline]
EnforceMaxRank2(BIAS::FMatrix &F) | BIAS::FMatrixEstimation |
FMatrixEstimation(bool NormalizeHartley=true) | BIAS::FMatrixEstimation | [inline, explicit]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDetPolynomial(const BIAS::Vector< double > &f1, const BIAS::Vector< double > &f2, std::vector< POLYNOMIALSOLVE_TYPE > &v) | BIAS::FMatrixEstimation | [protected]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Linear(BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2) | BIAS::FMatrixEstimation |
N_ | BIAS::FMatrixEstimation | [protected]
NormalizeHartley_ | BIAS::FMatrixEstimation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
Optimize(BIAS::FMatrix &F, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2) | BIAS::FMatrixEstimation |
p1_ | BIAS::FMatrixEstimation |
p2_ | BIAS::FMatrixEstimation |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SevenPoint(std::vector< BIAS::FMatrix > &Fvec, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2) | BIAS::FMatrixEstimation |
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:07:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Gauss< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Gauss< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_CalculateKernels(double Sigma, double Ratio) | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fm | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_GaussIO | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_GaussOO | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_GaussRatio | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_GaussSigma | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_LastRatio | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_LastSigma | BIAS::Gauss< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_tmpFloat | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_tmpInt | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CalculationInFloat() const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
ConvFloatHori_(const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatVert_(const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntHori_(const Image< InputStorageType > &src, Image< CONV_INT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntVert_(const Image< CONV_INT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const std::string &postfix="") | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const int group_id, const std::string &postfix) | BIAS::Convolution< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter11x11Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter13x13Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter3x3Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter3x3GreyThreshold(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, float threshold=0.0) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter5x5Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter5x5GreyThreshold(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, float threshold=0.0) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter7x7Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
Filter9x9Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
FilterGrey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, bool ResetROI=false) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Gauss< InputStorageType, OutputStorageType > | [virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
Gauss() | BIAS::Gauss< InputStorageType, OutputStorageType > |
Gauss(Param &para, const std::string &postfix="") | BIAS::Gauss< InputStorageType, OutputStorageType > |
Gauss(Param &para, const int grp, const std::string &postfix) | BIAS::Gauss< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline, protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKernel(FilterMask &fm) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
GetRatio() const | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
GetRatioPointer() | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
GetSigma() const | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
GetSigmaPointer() | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::Convolution< InputStorageType, OutputStorageType > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws, bool AdjustSigma=true) | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
SetKernel(FilterMask &fm) | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
SetRatio(const double ratio) | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
SetSigma(const double si) | BIAS::Gauss< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]
~Gauss() | BIAS::Gauss< InputStorageType, OutputStorageType > |

Generated on Wed Jun 21 19:07:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GaussHelmert Member List

This is the complete list of members for BIAS::GaussHelmert, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeNormalSystem_(const Matrix< double > &A, const Matrix< double > &B, const Matrix< double > &H, const Matrix< double > &Sigma_ll, const Vector< double > &x_hat, const Vector< double > &l_hat, const Vector< double > &v_hat, Matrix< double > &normal_matrix, Vector< double > &normal_vector) | BIAS::GaussHelmert | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
g_(const Vector< double > &l, const Vector< double > &x)=0 | BIAS::GaussHelmert | [protected, pure virtual]
GaussHelmert() | BIAS::GaussHelmert | [protected]
GetA_(const Vector< double > &l, const Vector< double > &x)=0 | BIAS::GaussHelmert | [protected, pure virtual]
GetB_(const Vector< double > &l, const Vector< double > &x)=0 | BIAS::GaussHelmert | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetH_(const Vector< double > &x)=0 | BIAS::GaussHelmert | [protected, pure virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
h_(const Vector< double > &x)=0 | BIAS::GaussHelmert | [protected, pure virtual]
MaxNumIter_ | BIAS::GaussHelmert | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
Precision_ | BIAS::GaussHelmert | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Solve(BIAS::Vector< double > &observations, const BIAS::Matrix< double > &obs_cov, BIAS::Vector< double > &x, BIAS::Matrix< double > &cov) | BIAS::GaussHelmert |
~Debug() | BIAS::Debug | [inline]
~GaussHelmert() | BIAS::GaussHelmert | [virtual]

Generated on Wed Jun 21 19:07:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GenGroundTruth Member List

This is the complete list of members for BIAS::GenGroundTruth, including all inherited members.

CreateIdealMatches(std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, std::vector< std::vector< BIAS::HomgPoint2D > > &matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0) | BIAS::GenGroundTruth | [static]
CreateMatches(std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0) | BIAS::GenGroundTruth | [static]
CreateMatches(std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false) | BIAS::GenGroundTruth | [static]
CreateMatchesOutlier(std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, double outlier_fraction, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false) | BIAS::GenGroundTruth | [static]
DeNormalizeMatches(std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K) | BIAS::GenGroundTruth | [static]
DrawMatches(BIAS::Image< unsigned char > &im, std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, unsigned char lcolor, unsigned char mcolor) | BIAS::GenGroundTruth | [static]
GenerateRandomCube(std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=-50.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double gammaX=0.0, double gammaY=0.0, double gammaZ=1.0, double alphamax=100.0, double betamax=100.0, double gammamax=100.0) | BIAS::GenGroundTruth | [static]
GenerateRandomPlane(std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=0.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double alphamax=100.0, double betamax=100.0) | BIAS::GenGroundTruth | [static]
NormalizeMatches(std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K) | BIAS::GenGroundTruth | [static]
ReadCorrespondences(const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2) | BIAS::GenGroundTruth | [static]
ReadWorldPoints(const char *Filename, std::vector< BIAS::HomgPoint3D > &Points) | BIAS::GenGroundTruth | [static]
WriteCorrespondences(const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2) | BIAS::GenGroundTruth | [static]
WriteWorldPoints(const char *Filename, std::vector< BIAS::HomgPoint3D > &Points) | BIAS::GenGroundTruth | [static]

Generated on Wed Jun 21 19:07:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GenSynthMatches Member List

This is the complete list of members for BIAS::GenSynthMatches, including all inherited members.

_AddParameter(Param &para) | BIAS::GenSynthMatches | [protected, virtual]
_AddUniformDistributedOutliers() | BIAS::GenSynthMatches | [protected]
_AreMovingObjectsVisible() | BIAS::GenSynthMatches | [protected]
_C | BIAS::MatchDataBase | [protected]
_CheckParams() const | BIAS::GenSynthMatches | [protected]
_CreateCamMovement() | BIAS::GenSynthMatches | [protected]
_CreateMoving2DPoints() | BIAS::GenSynthMatches | [protected]
_CreateMoving3DPoints() | BIAS::GenSynthMatches | [protected]
_CreateMovingGT2DPoints() | BIAS::GenSynthMatches | [protected]
_CreateMovingTransforms() | BIAS::GenSynthMatches | [protected]
_CreateStatic2DPoints() | BIAS::GenSynthMatches | [protected]
_CreateStatic3DPoints() | BIAS::GenSynthMatches | [protected]
_CreateStaticGT2DPoints() | BIAS::GenSynthMatches | [protected]
_Draw(Image< unsigned char > &im, int minindex, int maxindex, const std::vector< std::vector< HomgPoint2D > > *p) const | BIAS::GenSynthMatches | [protected]
_FocalLength | BIAS::GenSynthMatches | [protected]
_GT_C | BIAS::GenSynthMatches | [protected]
_GT_NormalizedPoints | BIAS::GenSynthMatches | [protected]
_GT_P | BIAS::GenSynthMatches | [protected]
_GT_Points | BIAS::GenSynthMatches | [protected]
_GT_R | BIAS::GenSynthMatches | [protected]
_ImHeight | BIAS::GenSynthMatches | [protected]
_ImWidth | BIAS::GenSynthMatches | [protected]
_IsSeen(HomgPoint2D &p, double border=0.0) | BIAS::GenSynthMatches | [inline, protected]
_K | BIAS::MatchDataBase | [protected]
_Ki | BIAS::MatchDataBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxCamDistance | BIAS::GenSynthMatches | [protected]
_MaxDispOutliers | BIAS::GenSynthMatches | [protected]
_MinCamDistance | BIAS::GenSynthMatches | [protected]
_MotionVecX | BIAS::GenSynthMatches | [protected]
_MotionVecY | BIAS::GenSynthMatches | [protected]
_MotionVecZ | BIAS::GenSynthMatches | [protected]
_MovingObjMotionVecX | BIAS::GenSynthMatches | [protected]
_MovingObjMotionVecY | BIAS::GenSynthMatches | [protected]
_MovingObjMotionVecZ | BIAS::GenSynthMatches | [protected]
_MovingObjRotVecX | BIAS::GenSynthMatches | [protected]
_MovingObjRotVecY | BIAS::GenSynthMatches | [protected]
_MovingObjRotVecZ | BIAS::GenSynthMatches | [protected]
_MovingPoints | BIAS::GenSynthMatches | [protected]
_MovingTransform | BIAS::GenSynthMatches | [protected]
_NormalizedPoints | BIAS::MatchDataBase | [protected]
_NumImages | BIAS::MatchDataBase | [protected]
_NumMovingObjects | BIAS::GenSynthMatches | [protected]
_NumMovingPoints | BIAS::GenSynthMatches | [protected]
_NumOutliers | BIAS::GenSynthMatches | [protected]
_NumPoints | BIAS::MatchDataBase | [protected]
_NumStaticPoints | BIAS::GenSynthMatches | [protected]
_OutlDirChange | BIAS::GenSynthMatches | [protected]
_OutlLengthChange | BIAS::GenSynthMatches | [protected]
_OverallMotionX | BIAS::GenSynthMatches | [protected]
_OverallMotionY | BIAS::GenSynthMatches | [protected]
_OverallMotionZ | BIAS::GenSynthMatches | [protected]
_OverallRotX | BIAS::GenSynthMatches | [protected]
_OverallRotY | BIAS::GenSynthMatches | [protected]
_OverallRotZ | BIAS::GenSynthMatches | [protected]
_P | BIAS::MatchDataBase | [protected]
_para | BIAS::GenSynthMatches | [protected]
_Points | BIAS::MatchDataBase | [protected]
_PrinciplePointX | BIAS::GenSynthMatches | [protected]
_PrinciplePointY | BIAS::GenSynthMatches | [protected]
_R | BIAS::MatchDataBase | [protected]
_rand | BIAS::GenSynthMatches | [protected]
_RotVecX | BIAS::GenSynthMatches | [protected]
_RotVecY | BIAS::GenSynthMatches | [protected]
_RotVecZ | BIAS::GenSynthMatches | [protected]
_SetCamData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C) | BIAS::MatchDataBase | [protected]
_SigmaCamCenterX | BIAS::GenSynthMatches | [protected]
_SigmaCamCenterY | BIAS::GenSynthMatches | [protected]
_SigmaCamCenterZ | BIAS::GenSynthMatches | [protected]
_SigmaCamRotX | BIAS::GenSynthMatches | [protected]
_SigmaCamRotY | BIAS::GenSynthMatches | [protected]
_SigmaCamRotZ | BIAS::GenSynthMatches | [protected]
_SigmaImagePoints | BIAS::GenSynthMatches | [protected]
_SizeMovingObjX | BIAS::GenSynthMatches | [protected]
_SizeMovingObjY | BIAS::GenSynthMatches | [protected]
_SizeMovingObjZ | BIAS::GenSynthMatches | [protected]
_StaticPoints | BIAS::GenSynthMatches | [protected]
_Transpose(const std::vector< std::vector< HomgPoint2D > > &src, std::vector< std::vector< HomgPoint2D > > &dst) const | BIAS::MatchDataBase | [inline, protected]
_UserGivenP | BIAS::GenSynthMatches | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CreateMatches() | BIAS::GenSynthMatches |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DrawNoisy(Image< unsigned char > &im, int minindex=0, int maxindex=1) const | BIAS::GenSynthMatches |
DrawTrue(Image< unsigned char > &im, int minindex=0, int maxindex=1) const | BIAS::GenSynthMatches |
GenSynthMatches(Param &para) | BIAS::GenSynthMatches |
Get3DPoints(std::vector< HomgPoint3D > &p) const | BIAS::GenSynthMatches |
GetC(int imNo, HomgPoint3D &C) const | BIAS::MatchDataBase |
GetC(std::vector< HomgPoint3D > &C) const | BIAS::MatchDataBase |
GetCorrespondences(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGTC(int imNo, HomgPoint3D &C) const | BIAS::GenSynthMatches |
GetGTC(std::vector< HomgPoint3D > &C) const | BIAS::GenSynthMatches |
GetGTNormalizedF(std::vector< std::vector< FMatrixBase > > &F) const | BIAS::GenSynthMatches |
GetGTNormalizedPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::GenSynthMatches |
GetGTNormalizedPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::GenSynthMatches |
GetGTP(int imNo, PMatrixBase &P) const | BIAS::GenSynthMatches |
GetGTP(std::vector< PMatrixBase > &P) const | BIAS::GenSynthMatches |
GetGTPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::GenSynthMatches |
GetGTPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::GenSynthMatches |
GetGTR(int imNo, RMatrixBase &R) const | BIAS::GenSynthMatches |
GetGTR(std::vector< RMatrixBase > &R) const | BIAS::GenSynthMatches |
GetInliers(std::vector< bool > &inl) const | BIAS::GenSynthMatches |
GetK(KMatrix &K) const | BIAS::MatchDataBase |
GetNormalizedCorrespondences(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetNormalizedPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::MatchDataBase |
GetNormalizedPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetNumImages() const | BIAS::MatchDataBase | [inline]
GetP(int imNo, PMatrixBase &P) const | BIAS::MatchDataBase |
GetP(std::vector< PMatrixBase > &P) const | BIAS::MatchDataBase |
GetPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::MatchDataBase |
GetPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetR(int imNo, RMatrixBase &R) const | BIAS::MatchDataBase |
GetR(std::vector< RMatrixBase > &R) const | BIAS::MatchDataBase |
GlobalDebugLevel | BIAS::Debug | [protected, static]
MatchDataBase(Param &para) | BIAS::MatchDataBase |
operator<<(std::ostream &os, const GenSynthMatches &m) | BIAS::GenSynthMatches | [friend]
BIAS::MatchDataBase::operator<<(std::ostream &os, const MatchDataBase &m) | BIAS::MatchDataBase | [friend]
operator=(const MatchDataBase &mdb) | BIAS::GenSynthMatches |
BIAS::MatchDataBase::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(MatchDataBase &l) | BIAS::MatchDataBase |
operator>>(std::istream &os, GenSynthMatches &m) | BIAS::GenSynthMatches | [friend]
BIAS::MatchDataBase::operator>>(std::istream &is, MatchDataBase &m) | BIAS::MatchDataBase | [friend]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Read(const std::string &fname) | BIAS::GenSynthMatches |
Read(std::istream &is) | BIAS::GenSynthMatches | [virtual]
ReadData(std::string file) | BIAS::GenSynthMatches |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Reset() | BIAS::GenSynthMatches |
SetData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m) | BIAS::MatchDataBase |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetNormalizedData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m) | BIAS::MatchDataBase |
Write(const std::string &fname) const | BIAS::GenSynthMatches |
Write(std::ostream &os) const | BIAS::GenSynthMatches | [virtual]
WriteData(std::string file) const | BIAS::GenSynthMatches |
~Debug() | BIAS::Debug | [inline]
~GenSynthMatches() | BIAS::GenSynthMatches | [virtual]
~MatchDataBase() | BIAS::MatchDataBase | [virtual]

Generated on Wed Jun 21 19:07:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GeometryGL Member List

This is the complete list of members for BIAS::GeometryGL, including all inherited members.

CreateSampleDisplayListScene(int &dplistID) | BIAS::GeometryGL | [static]
CreateTextureMatrix(BIAS::PMatrix &P, const unsigned int w, const unsigned int h, const bool &useRECTcoord=false) | BIAS::GeometryGL | [static]
DisplayCallsSampleDisplayListScene(const double &curTime) | BIAS::GeometryGL | [static]
DisplayCameraExternalParams(BIAS::PMatrix &P) | BIAS::GeometryGL | [static]
DisplayCameraExternalParams(const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &up, const BIAS::Vector3< double > &a) | BIAS::GeometryGL | [static]
DisplayCameraInternalParams(const int &x0, const int &y0, const unsigned int &width, const unsigned int &height, const float &fovY, const float &zNear, const float &zFar) | BIAS::GeometryGL | [static]
DisplayClear() | BIAS::GeometryGL | [static]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::GeometryGL | [static]
DisplayCoordCross(const float &size, const float &linewidth, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z")) | BIAS::GeometryGL | [static]
DisplayCoordCrossAxesLabel(const float &size, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z")) | BIAS::GeometryGL | [static]
DisplayImgPlaneTextured(BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const int &texID, const int &texTarget, const double &scale, const bool &flipY, const BIAS::Vector4< float > &vertexColor=BIAS::Vector4< float >(1.0, 0.0, 1.0, 0.0)) | BIAS::GeometryGL | [static]
DisplayP(BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const double &scale, const float &linewidth=1.0f) | BIAS::GeometryGL | [static]
DisplayQuadTexCoord2D(const BIAS::ImgObjGL &texobj, const bool &additionalFlipY) | BIAS::GeometryGL | [static]
DisplayQuadTexCoord2DFull(const BIAS::ImgObjGL &texobj, const bool &additionalFlipY) | BIAS::GeometryGL | [static]
DisplayRenderMode(const BIAS::RenderModeGL &m) | BIAS::GeometryGL | [static]
DisplaySceneExampleSimple() | BIAS::GeometryGL | [static]
DisplaySimpleAnimation(const double &time) | BIAS::GeometryGL | [static]
GeometryGL() | BIAS::GeometryGL |
GetImgCorner2d(const unsigned int &w, const unsigned int &h, const unsigned int &corner, const int texMode, const bool flipY) | BIAS::GeometryGL | [static]
GetImgCorner3d(BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const unsigned int &corner, const double &scale) | BIAS::GeometryGL | [static]
GetInfoGL(std::ostream &os) | BIAS::GeometryGL | [static]
~GeometryGL() | BIAS::GeometryGL | [virtual]

Generated on Wed Jun 21 19:07:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GradientGauss< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::GradientGauss< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_CalculateKernels(double Sigma, double Ratio) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_Conv | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_GradGaussRatio | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_GradGaussSigma | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_LastRatio | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_LastSigma | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_VecLengthType | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EVecLengthType enum name | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &grad) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const std::string &postfix="") | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGradGaussRatio() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
GetGradGaussSigma() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GradientGauss() | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
GradientGauss(Param &para, const std::string &postfix="") | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
GradientGauss(Param &para, const int grp, const std::string &postfix) | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetGradGaussRatio(const double ratio) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
SetGradGaussSigma(const double sigma) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
VecLen(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL1(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL2(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenMax(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L1 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L2 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_max enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
~GradientGauss() | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_CalculateKernels(double Sigma, double Ratio) | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | [protected]
_Conv | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_GradGaussRatio | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_GradGaussSigma | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_LastRatio | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_LastSigma | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_VecLengthType | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EVecLengthType enum name | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &grad) | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy) | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg) | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const std::string &postfix="") | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGradGaussRatio() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
GetGradGaussSigma() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GradientGauss() | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
GradientGauss(Param &para, const std::string &postfix="") | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
GradientGauss(Param &para, const int grp, const std::string &postfix) | BIAS::GradientGauss< InputStorageType, OutputStorageType > |
GradientGaussAsymmetric() | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > |
GradientGaussAsymmetric(Param &para, const std::string &postfix="") | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > |
GradientGaussAsymmetric(Param &para, const int grp, const std::string &postfix) | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetGradGaussRatio(const double ratio) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
SetGradGaussSigma(const double sigma) | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
VecLen(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL1(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL2(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenMax(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L1 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L2 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_max enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
~GradientGauss() | BIAS::GradientGauss< InputStorageType, OutputStorageType > | [virtual]
~GradientGaussAsymmetric() | BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GradientSimple< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::GradientSimple< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_Conv | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_VecLengthType | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
BuildPolarCoordinateMap_() | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DirectNeighborsGreyValidFloat_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
DirectNeighborsGreyValidInt_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
EVecLengthType enum name | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &grad) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const std::string &postfix="") | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GradientSimple(bool BuildPCM=false) | BIAS::GradientSimple< InputStorageType, OutputStorageType > |
GradientSimple(Param &para, const std::string &postfix="", bool BuildPCM=false) | BIAS::GradientSimple< InputStorageType, OutputStorageType > |
GradientSimple(Param &para, const int grp, const std::string &postfix, bool BuildPCM=false) | BIAS::GradientSimple< InputStorageType, OutputStorageType > |
InitKernel_() | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
pAngle_ | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
PolarTransform(Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< float > &magnitude, Image< float > &phase) | BIAS::GradientSimple< InputStorageType, OutputStorageType > |
PolarTransform(Image< char > &gx, Image< char > &gy, Image< float > &magnitude, Image< float > &phase) | BIAS::GradientSimple< InputStorageType, OutputStorageType > |
pRadius_ | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SimpleGreyValidFloat_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
SimpleGreyValidInt_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
UseDirectNeighbors(bool UseDirectNeighbors) | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [inline]
useDirectNeighbors_ | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [protected]
VecLen(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL1(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL2(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenMax(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L1 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L2 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_max enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
~GradientSimple() | BIAS::GradientSimple< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_Conv | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_DeleteInternalMem() | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fwork | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_fwork2 | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_InternalMemHeight | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_InternalMemWidth | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_iwork | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_iwork2 | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_VecLengthType | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EVecLengthType enum name | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &grad) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gx, Image< OutputStorageType > &gy, Image< OutputStorageType > &absg) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst1, Image< OutputStorageType > &dst2) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const std::string &postfix="") | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
FilterNTo2N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GradientSobel3x3() | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > |
GradientSobel3x3(Param &para, const std::string &postfix="") | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > |
GradientSobel3x3(Param &para, const int grp, const std::string &postfix) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > |
InitKernel_() | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Sobel3x3GreySameFloat_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
Sobel3x3GreyValidFloat_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
Sobel3x3GreyValidInt_(const Image< InputStorageType > &src, Image< OutputStorageType > &gWE, Image< OutputStorageType > &gNS) | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [protected]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
VecLen(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL1(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenL2(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VecLenMax(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &length) | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L1 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_L2 enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
VLT_max enum value | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo2N() | BIAS::FilterNTo2N< InputStorageType, OutputStorageType > | [virtual]
~GradientSobel3x3() | BIAS::GradientSobel3x3< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GuiBase Member List

This is the complete list of members for BIAS::GuiBase, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
BaseInitialized_ | BIAS::GuiBase | [protected, static]
CheckForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForEvent(char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForKeyEvent() | BIAS::GuiBase | [virtual]
CheckForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Closed() | BIAS::GuiBase | [inline]
ConvertToUC_(Image< PixelType > &image, float min, float max) | BIAS::GuiBase | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DestroyWindow() | BIAS::GuiBase | [virtual]
Factor_ | BIAS::GuiBase | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactorOffset(int &xoffset, int &yoffset, int &factor) | BIAS::GuiBase | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMouseX() | BIAS::GuiBase | [inline]
GetMouseY() | BIAS::GuiBase | [inline]
GetTitle() | BIAS::GuiBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GuiBase(bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(const GuiBase &gui) | BIAS::GuiBase |
Height_ | BIAS::GuiBase | [protected]
Init_(bool ShowMousePos) | BIAS::GuiBase | [protected, virtual]
IsPyramid_ | BIAS::GuiBase | [protected]
KeyBuffer_ | BIAS::GuiBase | [protected]
MouseButtonMutex_ | BIAS::GuiBase | [protected, static]
MouseButtonPressed_ | BIAS::GuiBase | [protected]
MouseButtonPressX_ | BIAS::GuiBase | [protected]
MouseButtonPressY_ | BIAS::GuiBase | [protected]
MouseButtonReleased_ | BIAS::GuiBase | [protected]
MouseButtonReleaseX_ | BIAS::GuiBase | [protected]
MouseButtonReleaseY_ | BIAS::GuiBase | [protected]
MousePosX_ | BIAS::GuiBase | [protected]
MousePosY_ | BIAS::GuiBase | [protected]
nChannels_ | BIAS::GuiBase | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
OrigPicture_ | BIAS::GuiBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Pyramid0Height_ | BIAS::GuiBase | [protected]
Pyramid0Width_ | BIAS::GuiBase | [protected]
PyramidLevels_ | BIAS::GuiBase | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactorOffset(int xoffset, int yoffset, int factor) | BIAS::GuiBase | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetTitle(std::string const &Title) | BIAS::GuiBase | [virtual]
ShowConvertedImage_(Image< unsigned char > &image) | BIAS::GuiBase | [protected, virtual]
ShowImage(ImageBase &image, float min=0.0, float max=255.0) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< unsigned char > &pim) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< float > &pim) | BIAS::GuiBase | [virtual]
ShowMouse_ | BIAS::GuiBase | [protected]
TestImage_(Image< unsigned char > &image) | BIAS::GuiBase | [inline, protected]
Title_ | BIAS::GuiBase | [protected]
WaitForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
WaitForKeyEvent() | BIAS::GuiBase | [virtual]
WaitForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Width_ | BIAS::GuiBase | [protected]
WindowCreated_ | BIAS::GuiBase | [protected]
XOffset_ | BIAS::GuiBase | [protected]
YOffset_ | BIAS::GuiBase | [protected]
~Debug() | BIAS::Debug | [inline]
~GuiBase() | BIAS::GuiBase | [virtual]

Generated on Wed Jun 21 19:07:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GuiEnhanced Member List

This is the complete list of members for BIAS::GuiEnhanced, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AllocateBuffer_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
BaseInitialized_ | BIAS::GuiBase | [protected, static]
Buffer_ | BIAS::GuiGTK | [protected]
BufferMutex_ | BIAS::GuiGTK | [protected, static]
CheckForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForEvent(char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForKeyEvent() | BIAS::GuiBase | [virtual]
CheckForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Closed() | BIAS::GuiBase | [inline]
ConvertToUC_(Image< PixelType > &image, float min, float max) | BIAS::GuiBase | [protected]
CreateWindow_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DeleteEvent_(GtkWidget *widget, GdkEvent *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
Destroy_(GtkWidget *widget, gpointer user_data) | BIAS::GuiGTK | [protected, static]
DestroyWindow() | BIAS::GuiGTK | [virtual]
DrawingArea_ | BIAS::GuiGTK | [protected]
DrawingAreaExposeCallback_(GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
DrawLine(int start[2], int end[2]) | BIAS::GuiEnhanced |
DrawRectangle(unsigned int tl[2], unsigned int br[2]) | BIAS::GuiEnhanced |
Factor_ | BIAS::GuiBase | [protected]
FreeBuffer_() | BIAS::GuiGTK | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactorOffset(int &xoffset, int &yoffset, int &factor) | BIAS::GuiBase | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMouseX() | BIAS::GuiBase | [inline]
GetMouseY() | BIAS::GuiBase | [inline]
GetTitle() | BIAS::GuiBase | [inline]
GetZoomImage(unsigned int x, unsigned int y, unsigned int factor, unsigned int size, Image< unsigned char > &zoomimage) | BIAS::GuiEnhanced |
GetZoomImage(unsigned int x, unsigned int y, unsigned int factor, unsigned int size, Image< unsigned char > &zoomimage, int &xoffset, int &yoffset) | BIAS::GuiEnhanced |
GetZoomImage(unsigned int x, unsigned int y, unsigned int factor, unsigned int size, ImageBase &zoomimage) | BIAS::GuiEnhanced |
GetZoomImage(unsigned int x, unsigned int y, unsigned int factor, unsigned int size, ImageBase &zoomimage, int &xoffset, int &yoffset) | BIAS::GuiEnhanced |
GlobalDebugLevel | BIAS::Debug | [protected, static]
GtkInitialized_ | BIAS::GuiGTK | [protected, static]
GtkInitializedMutex_ | BIAS::GuiGTK | [protected, static]
GtkMain(void *arg) | BIAS::GuiGTK | [protected, static]
GuiBase(bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(const GuiBase &gui) | BIAS::GuiBase |
GuiEnhanced() | BIAS::GuiEnhanced |
GuiGTK(bool ShowMousePos=true) | BIAS::GuiGTK |
GuiGTK(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiGTK |
GuiGTK(const GuiGTK &gui) | BIAS::GuiGTK |
Height_ | BIAS::GuiBase | [protected]
Init_(bool ShowMousePos) | BIAS::GuiGTK | [protected, virtual]
InitGtk(int *argc, char **argv[]) | BIAS::GuiGTK |
InitGtk_() | BIAS::GuiGTK | [protected]
IsAllocated_() | BIAS::GuiGTK | [inline, protected]
IsPyramid_ | BIAS::GuiBase | [protected]
KeyBuffer_ | BIAS::GuiBase | [protected]
KeyPressEventCallback_(GtkWidget *Widget, GdkEventKey *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
Label_ | BIAS::GuiGTK | [protected]
LabelExposeCallback_(GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MainThread_ | BIAS::GuiGTK | [protected, static]
MainThreadRunning_ | BIAS::GuiGTK | [protected, static]
MainThreadRunningMutex_ | BIAS::GuiGTK | [protected, static]
MouseButtonMutex_ | BIAS::GuiBase | [protected, static]
MouseButtonPressCallback_(GtkWidget *widget, GdkEventButton *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MouseButtonPressed_ | BIAS::GuiBase | [protected]
MouseButtonPressX_ | BIAS::GuiBase | [protected]
MouseButtonPressY_ | BIAS::GuiBase | [protected]
MouseButtonReleaseCallback_(GtkWidget *widget, GdkEventButton *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MouseButtonReleased_ | BIAS::GuiBase | [protected]
MouseButtonReleaseX_ | BIAS::GuiBase | [protected]
MouseButtonReleaseY_ | BIAS::GuiBase | [protected]
MouseMotionCallback_(GtkWidget *Widget, GdkEventMotion *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MousePosX_ | BIAS::GuiBase | [protected]
MousePosY_ | BIAS::GuiBase | [protected]
nChannels_ | BIAS::GuiBase | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
OrigPicture_ | BIAS::GuiBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Pyramid0Height_ | BIAS::GuiBase | [protected]
Pyramid0Width_ | BIAS::GuiBase | [protected]
PyramidLevels_ | BIAS::GuiBase | [protected]
Redraw_() | BIAS::GuiGTK | [protected]
ReInitWindow_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SelectLine(int start[2], int end[2]) | BIAS::GuiEnhanced |
SelectLineZoom(int start[2], int end[2]) | BIAS::GuiEnhanced |
SelectPoint(int point[2]) | BIAS::GuiEnhanced |
SelectQuadrate(int upperleft[2], int lowerright[2]) | BIAS::GuiEnhanced |
SelectRectangle(int upperleft[2], int lowerright[2]) | BIAS::GuiEnhanced |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactorOffset(int xoffset, int yoffset, int factor) | BIAS::GuiBase | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetTitle(std::string const &Title) | BIAS::GuiGTK | [virtual]
ShowConvertedImage_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected, virtual]
ShowImage(ImageBase &image, float min=0.0, float max=255.0) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< unsigned char > &pim) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< float > &pim) | BIAS::GuiBase | [virtual]
ShowMouse_ | BIAS::GuiBase | [protected]
TestImage_(Image< unsigned char > &image) | BIAS::GuiGTK | [inline, protected]
ThreadsInitialized_ | BIAS::GuiGTK | [protected, static]
Title_ | BIAS::GuiBase | [protected]
Vbox_ | BIAS::GuiGTK | [protected]
WaitForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
WaitForKeyEvent() | BIAS::GuiBase | [virtual]
WaitForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Width_ | BIAS::GuiBase | [protected]
Window_ | BIAS::GuiGTK | [protected]
WindowCount_ | BIAS::GuiGTK | [protected, static]
WindowCountMutex_ | BIAS::GuiGTK | [protected, static]
WindowCreated_ | BIAS::GuiBase | [protected]
XOffset_ | BIAS::GuiBase | [protected]
YOffset_ | BIAS::GuiBase | [protected]
~Debug() | BIAS::Debug | [inline]
~GuiBase() | BIAS::GuiBase | [virtual]
~GuiEnhanced() | BIAS::GuiEnhanced | [virtual]
~GuiGTK() | BIAS::GuiGTK | [virtual]

Generated on Wed Jun 21 19:07:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GuiGTK Member List

This is the complete list of members for BIAS::GuiGTK, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AllocateBuffer_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
BaseInitialized_ | BIAS::GuiBase | [protected, static]
Buffer_ | BIAS::GuiGTK | [protected]
BufferMutex_ | BIAS::GuiGTK | [protected, static]
CheckForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForEvent(char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForKeyEvent() | BIAS::GuiBase | [virtual]
CheckForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Closed() | BIAS::GuiBase | [inline]
ConvertToUC_(Image< PixelType > &image, float min, float max) | BIAS::GuiBase | [protected]
CreateWindow_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DeleteEvent_(GtkWidget *widget, GdkEvent *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
Destroy_(GtkWidget *widget, gpointer user_data) | BIAS::GuiGTK | [protected, static]
DestroyWindow() | BIAS::GuiGTK | [virtual]
DrawingArea_ | BIAS::GuiGTK | [protected]
DrawingAreaExposeCallback_(GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
Factor_ | BIAS::GuiBase | [protected]
FreeBuffer_() | BIAS::GuiGTK | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactorOffset(int &xoffset, int &yoffset, int &factor) | BIAS::GuiBase | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMouseX() | BIAS::GuiBase | [inline]
GetMouseY() | BIAS::GuiBase | [inline]
GetTitle() | BIAS::GuiBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GtkInitialized_ | BIAS::GuiGTK | [protected, static]
GtkInitializedMutex_ | BIAS::GuiGTK | [protected, static]
GtkMain(void *arg) | BIAS::GuiGTK | [protected, static]
GuiBase(bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(const GuiBase &gui) | BIAS::GuiBase |
GuiGTK(bool ShowMousePos=true) | BIAS::GuiGTK |
GuiGTK(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiGTK |
GuiGTK(const GuiGTK &gui) | BIAS::GuiGTK |
Height_ | BIAS::GuiBase | [protected]
Init_(bool ShowMousePos) | BIAS::GuiGTK | [protected, virtual]
InitGtk(int *argc, char **argv[]) | BIAS::GuiGTK |
InitGtk_() | BIAS::GuiGTK | [protected]
IsAllocated_() | BIAS::GuiGTK | [inline, protected]
IsPyramid_ | BIAS::GuiBase | [protected]
KeyBuffer_ | BIAS::GuiBase | [protected]
KeyPressEventCallback_(GtkWidget *Widget, GdkEventKey *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
Label_ | BIAS::GuiGTK | [protected]
LabelExposeCallback_(GtkWidget *Widget, GdkEventExpose *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MainThread_ | BIAS::GuiGTK | [protected, static]
MainThreadRunning_ | BIAS::GuiGTK | [protected, static]
MainThreadRunningMutex_ | BIAS::GuiGTK | [protected, static]
MouseButtonMutex_ | BIAS::GuiBase | [protected, static]
MouseButtonPressCallback_(GtkWidget *widget, GdkEventButton *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MouseButtonPressed_ | BIAS::GuiBase | [protected]
MouseButtonPressX_ | BIAS::GuiBase | [protected]
MouseButtonPressY_ | BIAS::GuiBase | [protected]
MouseButtonReleaseCallback_(GtkWidget *widget, GdkEventButton *event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MouseButtonReleased_ | BIAS::GuiBase | [protected]
MouseButtonReleaseX_ | BIAS::GuiBase | [protected]
MouseButtonReleaseY_ | BIAS::GuiBase | [protected]
MouseMotionCallback_(GtkWidget *Widget, GdkEventMotion *Event, gpointer user_data) | BIAS::GuiGTK | [protected, static]
MousePosX_ | BIAS::GuiBase | [protected]
MousePosY_ | BIAS::GuiBase | [protected]
nChannels_ | BIAS::GuiBase | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
OrigPicture_ | BIAS::GuiBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Pyramid0Height_ | BIAS::GuiBase | [protected]
Pyramid0Width_ | BIAS::GuiBase | [protected]
PyramidLevels_ | BIAS::GuiBase | [protected]
Redraw_() | BIAS::GuiGTK | [protected]
ReInitWindow_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactorOffset(int xoffset, int yoffset, int factor) | BIAS::GuiBase | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetTitle(std::string const &Title) | BIAS::GuiGTK | [virtual]
ShowConvertedImage_(Image< unsigned char > &image) | BIAS::GuiGTK | [protected, virtual]
ShowImage(ImageBase &image, float min=0.0, float max=255.0) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< unsigned char > &pim) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< float > &pim) | BIAS::GuiBase | [virtual]
ShowMouse_ | BIAS::GuiBase | [protected]
TestImage_(Image< unsigned char > &image) | BIAS::GuiGTK | [inline, protected]
ThreadsInitialized_ | BIAS::GuiGTK | [protected, static]
Title_ | BIAS::GuiBase | [protected]
Vbox_ | BIAS::GuiGTK | [protected]
WaitForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
WaitForKeyEvent() | BIAS::GuiBase | [virtual]
WaitForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Width_ | BIAS::GuiBase | [protected]
Window_ | BIAS::GuiGTK | [protected]
WindowCount_ | BIAS::GuiGTK | [protected, static]
WindowCountMutex_ | BIAS::GuiGTK | [protected, static]
WindowCreated_ | BIAS::GuiBase | [protected]
XOffset_ | BIAS::GuiBase | [protected]
YOffset_ | BIAS::GuiBase | [protected]
~Debug() | BIAS::Debug | [inline]
~GuiBase() | BIAS::GuiBase | [virtual]
~GuiGTK() | BIAS::GuiGTK | [virtual]

Generated on Wed Jun 21 19:07:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::GuiWX Member List

This is the complete list of members for BIAS::GuiWX, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AppApp_ | BIAS::GuiWX | [protected, static]
BaseInitialized_ | BIAS::GuiBase | [protected, static]
Buffer_ | BIAS::GuiWX | [protected]
CheckForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForEvent(char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
CheckForKeyEvent() | BIAS::GuiBase | [virtual]
CheckForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Closed() | BIAS::GuiBase | [inline]
ConvertToUC_(Image< PixelType > &image, float min, float max) | BIAS::GuiBase | [protected]
CreateWindow_(Image< unsigned char > &image) | BIAS::GuiWX | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DestroyWindow() | BIAS::GuiWX | [virtual]
Factor_ | BIAS::GuiBase | [protected]
Frame_ | BIAS::GuiWX | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactorOffset(int &xoffset, int &yoffset, int &factor) | BIAS::GuiBase | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMouseX() | BIAS::GuiBase | [inline]
GetMouseY() | BIAS::GuiBase | [inline]
GetTitle() | BIAS::GuiBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GuiBase(bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(std::string const &Title, bool ShowMousePos=true) | BIAS::GuiBase |
GuiBase(const GuiBase &gui) | BIAS::GuiBase |
GuiWX(bool ShowMousePos=true) | BIAS::GuiWX |
GuiWX(std::string const &Title, bool ShowMousePos) | BIAS::GuiWX |
GuiWX(std::string const &Title) | BIAS::GuiWX |
GuiWxMutex_ | BIAS::GuiWX | [protected, static]
Height_ | BIAS::GuiBase | [protected]
ImgCanvas class | BIAS::GuiWX | [friend]
Init_(bool ShowMousePos) | BIAS::GuiWX | [protected, virtual]
IsPyramid_ | BIAS::GuiBase | [protected]
KeyBuffer_ | BIAS::GuiBase | [protected]
MainThreadRunning_ | BIAS::GuiWX | [protected, static]
MouseButtonMutex_ | BIAS::GuiBase | [protected, static]
MouseButtonPressed_ | BIAS::GuiBase | [protected]
MouseButtonPressX_ | BIAS::GuiBase | [protected]
MouseButtonPressY_ | BIAS::GuiBase | [protected]
MouseButtonReleased_ | BIAS::GuiBase | [protected]
MouseButtonReleaseX_ | BIAS::GuiBase | [protected]
MouseButtonReleaseY_ | BIAS::GuiBase | [protected]
MousePosX_ | BIAS::GuiBase | [protected]
MousePosY_ | BIAS::GuiBase | [protected]
nChannels_ | BIAS::GuiBase | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
OrigPicture_ | BIAS::GuiBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Pyramid0Height_ | BIAS::GuiBase | [protected]
Pyramid0Width_ | BIAS::GuiBase | [protected]
PyramidLevels_ | BIAS::GuiBase | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactorOffset(int xoffset, int yoffset, int factor) | BIAS::GuiBase | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetTitle(std::string const &Title) | BIAS::GuiWX | [virtual]
ShowConvertedImage_(Image< unsigned char > &image) | BIAS::GuiWX | [protected, virtual]
ShowImage(ImageBase &image, float min=0.0, float max=255.0) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< unsigned char > &pim) | BIAS::GuiBase | [virtual]
ShowImage(PyramidImage< float > &pim) | BIAS::GuiBase | [virtual]
ShowMouse_ | BIAS::GuiBase | [protected]
TestImage_(Image< unsigned char > &image) | BIAS::GuiBase | [inline, protected]
ThreadInitialized_ | BIAS::GuiWX | [protected, static]
Title_ | BIAS::GuiBase | [protected]
TmpWxImg_ | BIAS::GuiWX | [protected]
TopFrame class | BIAS::GuiWX | [friend]
WaitForEvent(bool &KeyEvent, char &key, bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
WaitForKeyEvent() | BIAS::GuiBase | [virtual]
WaitForMouseButtonEvent(bool &Pressed, int &Button, int &Xpos, int &Ypos) | BIAS::GuiBase | [virtual]
Width_ | BIAS::GuiBase | [protected]
WindowCounter_ | BIAS::GuiWX | [protected, static]
WindowCreated_ | BIAS::GuiBase | [protected]
WxInitialized | BIAS::GuiWX | [protected, static]
WxMainLoop_ | BIAS::GuiWX | [protected]
WxMainThread class | BIAS::GuiWX | [friend]
XOffset_ | BIAS::GuiBase | [protected]
YOffset_ | BIAS::GuiBase | [protected]
~Debug() | BIAS::Debug | [inline]
~GuiBase() | BIAS::GuiBase | [virtual]
~GuiWX() | BIAS::GuiWX | [virtual]

Generated on Wed Jun 21 19:07:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Histogram2D Member List

This is the complete list of members for BIAS::Histogram2D, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_MetaData | BIAS::ImageBase | [protected]
_ReleaseHist() | BIAS::Histogram2D | [protected]
_ucBorderColor | BIAS::Histogram2D | [protected]
_uiBorder | BIAS::Histogram2D | [protected]
_UID | BIAS::ImageBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AboveThresholdToValue(unsigned charThreshold, unsigned charValue) | BIAS::Image< unsigned char > |
AbsDiff(const Image< unsigned char > &im1, const Image< unsigned char > &im2) | BIAS::Image< unsigned char > |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddHist(std::vector< DataType > &xdata, std::vector< DataType > &ydata) | BIAS::Histogram2D |
AddHist(vector< DataType > &xdata, vector< DataType > &ydata) | BIAS::Histogram2D |
AppendChannel(Image< unsigned char > &img) | BIAS::Image< unsigned char > |
BelowThresholdToValue(unsigned charThreshold, unsigned charValue) | BIAS::Image< unsigned char > |
BicubicInterpolation(const double &x, const double &y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
BilinearInterpolation(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
BilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationGreyMinVal(const double x, const double y, const unsigned char &minVal) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationRGBInterleaved(const double x, const double y, unsigned int channel) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationRGBPlanar(const double x, const double y, unsigned int channel) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationShiftRegion(const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer) | BIAS::Image< unsigned char > | [inline]
Binarize(unsigned charThreshold) | BIAS::Image< unsigned char > |
BinaryThreshold(unsigned charThreshold, unsigned charMinValue, unsigned charMaxValue) | BIAS::Image< unsigned char > |
BitDepth_ | BIAS::ImageBase | [protected]
CalcScaleShift(double Min, double Max, double &Scale, double &Shift) const | BIAS::Image< unsigned char > |
ChannelCount_ | BIAS::ImageBase | [protected]
Clear(const unsigned charvalue=0) | BIAS::Image< unsigned char > | [inline]
ClearDataPointer() | BIAS::ImageBase | [inline]
CM_Bayer_BGGR enum value | BIAS::ImageBase |
CM_Bayer_GBRG enum value | BIAS::ImageBase |
CM_Bayer_GRBG enum value | BIAS::ImageBase |
CM_Bayer_RGGB enum value | BIAS::ImageBase |
CM_BGR enum value | BIAS::ImageBase |
CM_BGRA enum value | BIAS::ImageBase |
CM_DV enum value | BIAS::ImageBase |
CM_Grey enum value | BIAS::ImageBase |
CM_GreyA enum value | BIAS::ImageBase |
CM_HSI_OBS enum value | BIAS::ImageBase |
CM_HSL enum value | BIAS::ImageBase |
CM_hsL enum value | BIAS::ImageBase |
CM_HSV enum value | BIAS::ImageBase |
CM_invalid enum value | BIAS::ImageBase |
CM_RGB enum value | BIAS::ImageBase |
CM_RGBA enum value | BIAS::ImageBase |
CM_RGBE enum value | BIAS::ImageBase |
CM_SymTensor2x2 enum value | BIAS::ImageBase |
CM_UYVY422 enum value | BIAS::ImageBase |
CM_YUV411 enum value | BIAS::ImageBase |
CM_YUV420P enum value | BIAS::ImageBase |
CM_YUV444 enum value | BIAS::ImageBase |
CM_YUYV422 enum value | BIAS::ImageBase |
ColorModel_ | BIAS::ImageBase | [protected]
CooTransf(double datacoo[2], double imcoo[2]) | BIAS::Histogram2D |
CooTransf(double datacoo[2], unsigned imcoo[2]) | BIAS::Histogram2D |
CopyIn_NoInit(void *data) | BIAS::ImageBase |
Cut2ROI() | BIAS::ImageBase |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Depth_ | BIAS::ImageBase | [protected]
DimensionMatch(const BIAS::ImageBase &other) const | BIAS::ImageBase |
Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display(const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display() | BIAS::ImageBase |
Draw() | BIAS::Histogram2D |
DrawLog() | BIAS::Histogram2D |
Dump(std::ostream &os=std::cout) | BIAS::Histogram2D |
EColorModel enum name | BIAS::ImageBase |
EStorageType enum name | BIAS::ImageBase |
Factor_ | BIAS::Histogram2D | [protected]
FastBilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
FillImageWithConstValue(unsigned charValue) | BIAS::Image< unsigned char > |
FillImageWithConstValue(unsigned charValue[]) | BIAS::Image< unsigned char > |
FillImageWithXValue() | BIAS::Image< unsigned char > |
Flip() | BIAS::ImageBase |
FlipHorizontal() | BIAS::ImageBase |
GetBitDepth() const | BIAS::ImageBase | [inline]
GetChannel(ImageBase &source, unsigned int channel) | BIAS::ImageBase |
GetChannelCount() const | BIAS::ImageBase | [inline]
GetChannelcount(const enum BIAS::ImageBase::EColorModel &colormodel) | BIAS::ImageBase | [static]
GetColorModel() const | BIAS::ImageBase | [inline]
GetCopyOfROI(ImageBase &copy) const | BIAS::ImageBase |
GetCopyOfROI2(ImageBase &copy) const | BIAS::ImageBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDepth() const | BIAS::ImageBase | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::ImageBase | [inline]
GetImageData() const | BIAS::Image< unsigned char > | [inline]
BIAS::ImageBase::GetImageData() | BIAS::ImageBase | [inline]
GetImageDataArray() const | BIAS::Image< unsigned char > | [inline]
GetMaxPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetMeanPixelValue(unsigned charmean[]) | BIAS::Image< unsigned char > |
GetMetaData() | BIAS::ImageBase | [inline]
GetMinMaxPixelValue(unsigned char &min, unsigned char &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetMinMaxPixelValueIgnoreRange(unsigned char &min, unsigned char &max, const unsigned charignoreStart=0, const unsigned charignoreEnd=0, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
GetMinPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetPixelCount() const | BIAS::ImageBase | [inline]
GetPixelNearestNeighbor(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
GetPixelNearestNeighbor(const float x, const float y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
GetPixelPosition(unsigned int x, unsigned int y, unsigned short int channel=0) const | BIAS::ImageBase | [inline]
GetROI() | BIAS::ImageBase | [inline]
GetROI() const | BIAS::ImageBase | [inline]
GetROI(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROI(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROILowerRightX() const | BIAS::ImageBase |
GetROILowerRightY() const | BIAS::ImageBase |
GetROIUpperLeftX() const | BIAS::ImageBase |
GetROIUpperLeftY() const | BIAS::ImageBase |
GetSize() const | BIAS::ImageBase | [inline]
GetSize(const enum BIAS::ImageBase::EStorageType &storagetype) | BIAS::ImageBase | [static]
GetStorageType() const | BIAS::ImageBase | [inline]
GetUID() const | BIAS::ImageBase | [inline]
GetVersionNumber() const | BIAS::ImageBase | [inline]
GetWidth() const | BIAS::ImageBase | [inline]
GetWidthStep() const | BIAS::ImageBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::ImageBase | [protected]
Hist_ | BIAS::Histogram2D | [protected]
Histogram2D(unsigned short zoomfactor=2) | BIAS::Histogram2D |
Image() | BIAS::Image< unsigned char > |
Image(unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true) | BIAS::Image< unsigned char > |
Image(const ImageBase &im) | BIAS::Image< unsigned char > | [explicit]
ImageBase() | BIAS::ImageBase |
ImageBase(const ImageBase &im) | BIAS::ImageBase |
ImageBase(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
ImageData_ | BIAS::ImageBase | [protected]
ImageDataArray_ | BIAS::ImageBase | [protected]
Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::Image< unsigned char > |
BIAS::ImageBase::Init(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
InitHist(unsigned xbincount=256, unsigned ybincount=256) | BIAS::Histogram2D |
InitWithForeignData(unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true) | BIAS::Image< unsigned char > |
InterleavedDataOrder_ | BIAS::ImageBase | [protected]
InterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
InvalidateUID() | BIAS::ImageBase | [inline]
IsEmpty() const | BIAS::ImageBase | [inline]
IsInROI(double &x, double &y) const | BIAS::ImageBase | [inline]
IsInterleaved() const | BIAS::ImageBase | [inline]
IsPlanar() const | BIAS::ImageBase | [inline]
IsPositionInImage(const int &x, const int &y) const | BIAS::ImageBase | [inline]
IsPowerOfTwoSize() const | BIAS::ImageBase |
IsPowerOfTwoSize(const unsigned int w, const unsigned int h) | BIAS::ImageBase | [static]
LinearInterpolation(const unsigned int x, const double y) const | BIAS::Image< unsigned char > | [inline]
LinearInterpolation(const double x, const unsigned int y) const | BIAS::Image< unsigned char > | [inline]
MaxHistEntry_ | BIAS::Histogram2D | [protected]
MaxSTValue() | BIAS::Image< unsigned char > | [inline]
MinSTValue() | BIAS::Image< unsigned char > | [inline]
MoveToClosestPositionInImage(int &x, int &y) const | BIAS::ImageBase | [inline]
operator *(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator *(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator *=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator *=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator+(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator+(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator+=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator+=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator-(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator-(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator-=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator-=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator/(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator/(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator/=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator/=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator<<(std::ostream &os, const ImageBase &img) | BIAS::ImageBase | [friend]
operator=(const ImageBase &Source) | BIAS::Image< unsigned char > |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const ImageBase &img) | BIAS::ImageBase | [inline]
operator>>(std::istream &is, ImageBase &img) | BIAS::ImageBase | [friend]
operator|(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
Pad(BIAS::ImageBase &dest, const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) const | BIAS::ImageBase |
Pad(const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwo(BIAS::ImageBase &dest, const int &padVal=0) const | BIAS::ImageBase |
PadToPowerOfTwo(const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwoAndFlip(const int &padVal=0) | BIAS::ImageBase |
Paste2ROI(const ImageBase &Image) | BIAS::ImageBase |
PixelValue(const unsigned int x, const unsigned int y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
PixelValueBase(unsigned x, unsigned y, unsigned channel=0) | BIAS::ImageBase |
PixelValueInterleaved(const int x, const int y, const int channel=0) const | BIAS::Image< unsigned char > | [inline]
PowerOfTwoSize(const unsigned int &val) | BIAS::ImageBase | [static]
PowerOfTwoSize(unsigned int &width2, unsigned int &height2) const | BIAS::ImageBase |
PrintData(std::ostream &os) const | BIAS::Image< unsigned char > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintHeader(std::ostream &os=std::cout) const | BIAS::ImageBase |
PrintPointer(std::ostream &os) const | BIAS::Image< unsigned char > |
PrintROI(std::ostream &os=std::cout) const | BIAS::ImageBase |
Reciprocal(const float factor=1.0, const unsigned short int channel=0) | BIAS::Image< unsigned char > |
RedirectImageDataPointer(void *data) | BIAS::ImageBase | [inline]
Release() | BIAS::Image< unsigned char > |
ReleaseImageDataPointer() | BIAS::ImageBase | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Roi_ | BIAS::ImageBase | [protected]
SamePixelAndChannelCount(const ImageBase &Image) const | BIAS::ImageBase | [inline]
ScaleShift(double Scale, double Shift) | BIAS::Image< unsigned char > |
ScaleShiftBetween(double Min, double Max) | BIAS::Image< unsigned char > |
SetBitDepth(unsigned bitdepth) | BIAS::ImageBase | [inline]
SetColorModel() | BIAS::Histogram2D |
BIAS::Image< unsigned char >::SetColorModel(EColorModel Model) | BIAS::ImageBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactor(unsigned short Factor) | BIAS::Histogram2D |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetInterleaved(bool interleaved) | BIAS::ImageBase | [inline]
SetMetaData(const MetaData &m) | BIAS::ImageBase | [inline]
SetOutsideROIZero() | BIAS::ImageBase |
SetPixel(const unsigned char &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0) | BIAS::Image< unsigned char > | [inline]
SetPixel(const unsigned char &value0, const unsigned char &value1, const unsigned char &value2, const unsigned int &x, const unsigned int &y) | BIAS::Image< unsigned char > | [inline]
SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetUID(const BIAS::UUID &id) | BIAS::ImageBase | [inline]
SetZero() | BIAS::ImageBase | [inline]
ST_char enum value | BIAS::ImageBase |
ST_double enum value | BIAS::ImageBase |
ST_float enum value | BIAS::ImageBase |
ST_int enum value | BIAS::ImageBase |
ST_invalid enum value | BIAS::ImageBase |
ST_shortint enum value | BIAS::ImageBase |
ST_unsignedchar enum value | BIAS::ImageBase |
ST_unsignedint enum value | BIAS::ImageBase |
ST_unsignedshortint enum value | BIAS::ImageBase |
StealImage(ImageBase &source) | BIAS::ImageBase |
StorageType_ | BIAS::ImageBase | [protected]
UnsetROI() | BIAS::ImageBase |
UpdateImageDataArrayFromImageData_() | BIAS::ImageBase | [protected]
Version_ | BIAS::ImageBase | [protected, static]
Width_ | BIAS::ImageBase | [protected]
WidthStep_ | BIAS::ImageBase | [protected]
WriteASCII(std::ostream &os=std::cout) | BIAS::Histogram2D |
XBinCount_ | BIAS::Histogram2D | [protected]
XBinSize_ | BIAS::Histogram2D | [protected]
XMaxBinVal_ | BIAS::Histogram2D | [protected]
XMinBinVal_ | BIAS::Histogram2D | [protected]
YBinCount_ | BIAS::Histogram2D | [protected]
YBinSize_ | BIAS::Histogram2D | [protected]
YMaxBinVal_ | BIAS::Histogram2D | [protected]
YMinBinVal_ | BIAS::Histogram2D | [protected]
ZeroHist() | BIAS::Histogram2D |
ZeroPad(const unsigned int newwidth, const unsigned int newheight, unsigned char bgcolor=0) | BIAS::ImageBase |
~Debug() | BIAS::Debug | [inline]
~Histogram2D() | BIAS::Histogram2D |
~Image() | BIAS::Image< unsigned char > | [virtual]
~ImageBase() | BIAS::ImageBase | [virtual]

Generated on Wed Jun 21 19:07:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Histogram Member List

This is the complete list of members for BIAS::Histogram, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_MetaData | BIAS::ImageBase | [protected]
_ucBorderColor | BIAS::Histogram | [protected]
_uiBorder | BIAS::Histogram | [protected]
_UID | BIAS::ImageBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AboveThresholdToValue(unsigned charThreshold, unsigned charValue) | BIAS::Image< unsigned char > |
AbsDiff(const Image< unsigned char > &im1, const Image< unsigned char > &im2) | BIAS::Image< unsigned char > |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddHist(Image< StorageType > &Image, unsigned int hist=0) | BIAS::Histogram |
AddHist(std::vector< DataType > &data, unsigned int hist=0) | BIAS::Histogram |
AddHist(std::vector< DataType > &data, DataType min, DataType max, unsigned int hist=0) | BIAS::Histogram |
AddHist(Image< unsigned char > &Image, unsigned int hist) | BIAS::Histogram |
AddHist(vector< DataType > &data, unsigned int hist) | BIAS::Histogram |
AddHist(vector< DataType > &data, DataType min, DataType max, unsigned int hist) | BIAS::Histogram |
AddWeightedHist(std::vector< DataType > &data, std::vector< double > &weight, unsigned int hist=0) | BIAS::Histogram |
AddWeightedHist(vector< DataType > &data, vector< double > &weight, unsigned int hist) | BIAS::Histogram |
AppendChannel(Image< unsigned char > &img) | BIAS::Image< unsigned char > |
Average_ | BIAS::Histogram | [protected]
BelowThresholdToValue(unsigned charThreshold, unsigned charValue) | BIAS::Image< unsigned char > |
BicubicInterpolation(const double &x, const double &y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
BilinearInterpolation(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
BilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationGreyMinVal(const double x, const double y, const unsigned char &minVal) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationRGBInterleaved(const double x, const double y, unsigned int channel) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationRGBPlanar(const double x, const double y, unsigned int channel) const | BIAS::Image< unsigned char > | [inline]
BilinearInterpolationShiftRegion(const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer) | BIAS::Image< unsigned char > | [inline]
Binarize(unsigned charThreshold) | BIAS::Image< unsigned char > |
BinaryThreshold(unsigned charThreshold, unsigned charMinValue, unsigned charMaxValue) | BIAS::Image< unsigned char > |
BinCount_ | BIAS::Histogram | [protected]
BinSize_ | BIAS::Histogram | [protected]
BitDepth_ | BIAS::ImageBase | [protected]
CalcAverage_(unsigned int hist) | BIAS::Histogram | [protected]
CalcScaleShift(double Min, double Max, double &Scale, double &Shift) const | BIAS::Image< unsigned char > |
ChannelCount_ | BIAS::ImageBase | [protected]
Clear(const unsigned charvalue=0) | BIAS::Image< unsigned char > | [inline]
ClearDataPointer() | BIAS::ImageBase | [inline]
CM_Bayer_BGGR enum value | BIAS::ImageBase |
CM_Bayer_GBRG enum value | BIAS::ImageBase |
CM_Bayer_GRBG enum value | BIAS::ImageBase |
CM_Bayer_RGGB enum value | BIAS::ImageBase |
CM_BGR enum value | BIAS::ImageBase |
CM_BGRA enum value | BIAS::ImageBase |
CM_DV enum value | BIAS::ImageBase |
CM_Grey enum value | BIAS::ImageBase |
CM_GreyA enum value | BIAS::ImageBase |
CM_HSI_OBS enum value | BIAS::ImageBase |
CM_HSL enum value | BIAS::ImageBase |
CM_hsL enum value | BIAS::ImageBase |
CM_HSV enum value | BIAS::ImageBase |
CM_invalid enum value | BIAS::ImageBase |
CM_RGB enum value | BIAS::ImageBase |
CM_RGBA enum value | BIAS::ImageBase |
CM_RGBE enum value | BIAS::ImageBase |
CM_SymTensor2x2 enum value | BIAS::ImageBase |
CM_UYVY422 enum value | BIAS::ImageBase |
CM_YUV411 enum value | BIAS::ImageBase |
CM_YUV420P enum value | BIAS::ImageBase |
CM_YUV444 enum value | BIAS::ImageBase |
CM_YUYV422 enum value | BIAS::ImageBase |
Color_ | BIAS::Histogram | [protected]
ColorModel_ | BIAS::ImageBase | [protected]
CooTransf(double datacoo[2], double imcoo[2], unsigned hist=0) | BIAS::Histogram |
CooTransf(double datacoo[2], unsigned imcoo[2], unsigned hist=0) | BIAS::Histogram |
CopyIn_NoInit(void *data) | BIAS::ImageBase |
Cut2ROI() | BIAS::ImageBase |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DeleteHist_(unsigned int hist) | BIAS::Histogram | [protected]
Depth_ | BIAS::ImageBase | [protected]
DimensionMatch(const BIAS::ImageBase &other) const | BIAS::ImageBase |
Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display(const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display() | BIAS::ImageBase |
Draw() | BIAS::Histogram |
DrawHist_(unsigned int hist) | BIAS::Histogram | [protected]
DrawHistLog_(unsigned int hist) | BIAS::Histogram | [protected]
DrawLog() | BIAS::Histogram |
Dump(std::ostream &os=std::cout) | BIAS::Histogram |
EColorModel enum name | BIAS::ImageBase |
EStorageType enum name | BIAS::ImageBase |
Factor_ | BIAS::Histogram | [protected]
FastBilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
FillImageWithConstValue(unsigned charValue) | BIAS::Image< unsigned char > |
FillImageWithConstValue(unsigned charValue[]) | BIAS::Image< unsigned char > |
FillImageWithXValue() | BIAS::Image< unsigned char > |
Flip() | BIAS::ImageBase |
FlipHorizontal() | BIAS::ImageBase |
GetBin(unsigned int bin, unsigned int hist=0) | BIAS::Histogram |
GetBinCount() | BIAS::Histogram | [inline]
GetBitDepth() const | BIAS::ImageBase | [inline]
GetChannel(ImageBase &source, unsigned int channel) | BIAS::ImageBase |
GetChannelCount() const | BIAS::ImageBase | [inline]
GetChannelcount(const enum BIAS::ImageBase::EColorModel &colormodel) | BIAS::ImageBase | [static]
GetColorModel() const | BIAS::ImageBase | [inline]
GetCopyOfROI(ImageBase &copy) const | BIAS::ImageBase |
GetCopyOfROI2(ImageBase &copy) const | BIAS::ImageBase |
GetDataRange(double &min, double &max, unsigned int hist=0) | BIAS::Histogram | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDepth() const | BIAS::ImageBase | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::ImageBase | [inline]
GetHistCount() | BIAS::Histogram | [inline]
GetImageData() const | BIAS::Image< unsigned char > | [inline]
BIAS::ImageBase::GetImageData() | BIAS::ImageBase | [inline]
GetImageDataArray() const | BIAS::Image< unsigned char > | [inline]
GetMaxHistEntry(double &maxentry, unsigned int hist=0) | BIAS::Histogram | [inline]
GetMaxPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetMeanPixelValue(unsigned charmean[]) | BIAS::Image< unsigned char > |
GetMetaData() | BIAS::ImageBase | [inline]
GetMinMaxPixelValue(unsigned char &min, unsigned char &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetMinMaxPixelValueIgnoreRange(unsigned char &min, unsigned char &max, const unsigned charignoreStart=0, const unsigned charignoreEnd=0, const unsigned short int channel=0) const | BIAS::Image< unsigned char > |
GetMinPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< unsigned char > |
GetPixelCount() const | BIAS::ImageBase | [inline]
GetPixelNearestNeighbor(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
GetPixelNearestNeighbor(const float x, const float y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
GetPixelPosition(unsigned int x, unsigned int y, unsigned short int channel=0) const | BIAS::ImageBase | [inline]
GetROI() | BIAS::ImageBase | [inline]
GetROI() const | BIAS::ImageBase | [inline]
GetROI(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROI(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROILowerRightX() const | BIAS::ImageBase |
GetROILowerRightY() const | BIAS::ImageBase |
GetROIUpperLeftX() const | BIAS::ImageBase |
GetROIUpperLeftY() const | BIAS::ImageBase |
GetSize() const | BIAS::ImageBase | [inline]
GetSize(const enum BIAS::ImageBase::EStorageType &storagetype) | BIAS::ImageBase | [static]
GetStorageType() const | BIAS::ImageBase | [inline]
GetUID() const | BIAS::ImageBase | [inline]
GetVersionNumber() const | BIAS::ImageBase | [inline]
GetWidth() const | BIAS::ImageBase | [inline]
GetWidthStep() const | BIAS::ImageBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::ImageBase | [protected]
Hist_ | BIAS::Histogram | [protected]
HistCount_ | BIAS::Histogram | [protected]
Histogram(unsigned short int zoomfactor=2) | BIAS::Histogram |
HistSize_ | BIAS::Histogram | [protected]
Image() | BIAS::Image< unsigned char > |
Image(unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true) | BIAS::Image< unsigned char > |
Image(const ImageBase &im) | BIAS::Image< unsigned char > | [explicit]
ImageBase() | BIAS::ImageBase |
ImageBase(const ImageBase &im) | BIAS::ImageBase |
ImageBase(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
ImageData_ | BIAS::ImageBase | [protected]
ImageDataArray_ | BIAS::ImageBase | [protected]
Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::Image< unsigned char > |
BIAS::ImageBase::Init(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
InitHist(unsigned int bincount=256, unsigned int histcount=1) | BIAS::Histogram |
InitWithForeignData(unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true) | BIAS::Image< unsigned char > |
InterleavedDataOrder_ | BIAS::ImageBase | [protected]
InterpolationGrey(const double x, const double y) const | BIAS::Image< unsigned char > | [inline]
InvalidateUID() | BIAS::ImageBase | [inline]
IsEmpty() | BIAS::Histogram |
BIAS::Image< unsigned char >::IsEmpty() const | BIAS::ImageBase | [inline]
IsInROI(double &x, double &y) const | BIAS::ImageBase | [inline]
IsInterleaved() const | BIAS::ImageBase | [inline]
IsPlanar() const | BIAS::ImageBase | [inline]
IsPositionInImage(const int &x, const int &y) const | BIAS::ImageBase | [inline]
IsPowerOfTwoSize() const | BIAS::ImageBase |
IsPowerOfTwoSize(const unsigned int w, const unsigned int h) | BIAS::ImageBase | [static]
LinearInterpolation(const unsigned int x, const double y) const | BIAS::Image< unsigned char > | [inline]
LinearInterpolation(const double x, const unsigned int y) const | BIAS::Image< unsigned char > | [inline]
MaxBinVal_ | BIAS::Histogram | [protected]
MaxHistEntry_ | BIAS::Histogram | [protected]
MaxSTValue() | BIAS::Image< unsigned char > | [inline]
MinBinVal_ | BIAS::Histogram | [protected]
MinSTValue() | BIAS::Image< unsigned char > | [inline]
Mode_ | BIAS::Histogram | [protected]
MoveToClosestPositionInImage(int &x, int &y) const | BIAS::ImageBase | [inline]
NumData_ | BIAS::Histogram | [protected]
operator *(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator *(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator *=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator *=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator+(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator+(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator+=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator+=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator-(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator-(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator-=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator-=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator/(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator/(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator/=(const unsigned char &argimage) | BIAS::Image< unsigned char > |
operator/=(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
operator<<(std::ostream &os, const ImageBase &img) | BIAS::ImageBase | [friend]
operator=(const ImageBase &Source) | BIAS::Image< unsigned char > |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const ImageBase &img) | BIAS::ImageBase | [inline]
operator>>(std::istream &is, ImageBase &img) | BIAS::ImageBase | [friend]
operator|(const Image< unsigned char > &argimage) | BIAS::Image< unsigned char > |
Pad(BIAS::ImageBase &dest, const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) const | BIAS::ImageBase |
Pad(const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwo(BIAS::ImageBase &dest, const int &padVal=0) const | BIAS::ImageBase |
PadToPowerOfTwo(const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwoAndFlip(const int &padVal=0) | BIAS::ImageBase |
Paste2ROI(const ImageBase &Image) | BIAS::ImageBase |
PixelValue(const unsigned int x, const unsigned int y, const unsigned short int channel=0) const | BIAS::Image< unsigned char > | [inline]
PixelValueBase(unsigned x, unsigned y, unsigned channel=0) | BIAS::ImageBase |
PixelValueInterleaved(const int x, const int y, const int channel=0) const | BIAS::Image< unsigned char > | [inline]
PowerOfTwoSize(const unsigned int &val) | BIAS::ImageBase | [static]
PowerOfTwoSize(unsigned int &width2, unsigned int &height2) const | BIAS::ImageBase |
PrintData(std::ostream &os) const | BIAS::Image< unsigned char > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintHeader(std::ostream &os=std::cout) const | BIAS::ImageBase |
PrintPointer(std::ostream &os) const | BIAS::Image< unsigned char > |
PrintROI(std::ostream &os=std::cout) const | BIAS::ImageBase |
Reciprocal(const float factor=1.0, const unsigned short int channel=0) | BIAS::Image< unsigned char > |
RedirectImageDataPointer(void *data) | BIAS::ImageBase | [inline]
RedrawHist_(unsigned int hist) | BIAS::Histogram | [protected]
Release() | BIAS::Image< unsigned char > |
ReleaseHist() | BIAS::Histogram |
ReleaseImageDataPointer() | BIAS::ImageBase | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Roi_ | BIAS::ImageBase | [protected]
SamePixelAndChannelCount(const ImageBase &Image) const | BIAS::ImageBase | [inline]
ScaleShift(double Scale, double Shift) | BIAS::Image< unsigned char > |
ScaleShiftBetween(double Min, double Max) | BIAS::Image< unsigned char > |
ScaleYToMaxEntry_ | BIAS::Histogram | [protected]
SetBin(unsigned int bin, double value, unsigned int hist=0) | BIAS::Histogram |
SetBinCount(unsigned int bincount) | BIAS::Histogram |
SetBitDepth(unsigned bitdepth) | BIAS::ImageBase | [inline]
SetColor(unsigned char R, unsigned char G, unsigned char B, unsigned int hist=0) | BIAS::Histogram |
SetColorModel() | BIAS::Histogram |
BIAS::Image< unsigned char >::SetColorModel(EColorModel Model) | BIAS::ImageBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDrawMode(HistMode m) | BIAS::Histogram | [inline]
SetFactor(unsigned short Factor) | BIAS::Histogram |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHistCount(unsigned int histcount) | BIAS::Histogram |
SetInterleaved(bool interleaved) | BIAS::ImageBase | [inline]
SetMetaData(const MetaData &m) | BIAS::ImageBase | [inline]
SetOutsideROIZero() | BIAS::ImageBase |
SetPixel(const unsigned char &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0) | BIAS::Image< unsigned char > | [inline]
SetPixel(const unsigned char &value0, const unsigned char &value1, const unsigned char &value2, const unsigned int &x, const unsigned int &y) | BIAS::Image< unsigned char > | [inline]
SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetScaleYToMaxEntry(bool s) | BIAS::Histogram | [inline]
SetUID(const BIAS::UUID &id) | BIAS::ImageBase | [inline]
SetZero() | BIAS::ImageBase | [inline]
ST_char enum value | BIAS::ImageBase |
ST_double enum value | BIAS::ImageBase |
ST_float enum value | BIAS::ImageBase |
ST_int enum value | BIAS::ImageBase |
ST_invalid enum value | BIAS::ImageBase |
ST_shortint enum value | BIAS::ImageBase |
ST_unsignedchar enum value | BIAS::ImageBase |
ST_unsignedint enum value | BIAS::ImageBase |
ST_unsignedshortint enum value | BIAS::ImageBase |
StealImage(ImageBase &source) | BIAS::ImageBase |
StorageType_ | BIAS::ImageBase | [protected]
UnsetROI() | BIAS::ImageBase |
UpdateImageDataArrayFromImageData_() | BIAS::ImageBase | [protected]
Version_ | BIAS::ImageBase | [protected, static]
Width_ | BIAS::ImageBase | [protected]
WidthStep_ | BIAS::ImageBase | [protected]
WriteASCII(std::ostream &os=std::cout) | BIAS::Histogram |
WriteASCII(const std::string &filename) | BIAS::Histogram |
ZeroHist(unsigned int hist=0) | BIAS::Histogram |
ZeroPad(const unsigned int newwidth, const unsigned int newheight, unsigned char bgcolor=0) | BIAS::ImageBase |
~Debug() | BIAS::Debug | [inline]
~Histogram() | BIAS::Histogram |
~Image() | BIAS::Image< unsigned char > | [virtual]
~ImageBase() | BIAS::ImageBase | [virtual]

Generated on Wed Jun 21 19:07:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HMatrix Member List

This is the complete list of members for BIAS::HMatrix, including all inherited members.

Add(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
AddIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
AddIP(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< HMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< HMATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
DivideIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< HMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetData() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetJacobian(const HomgPoint2D &x, Matrix< double > &Jac) const | BIAS::HMatrix |
GetMappedError(const BIAS::HomgPoint2D &PointPicOne, const BIAS::HomgPoint2D &PointPicTwo) const | BIAS::HMatrix |
GetMappedRange(const unsigned int OrigWidth, const unsigned int OrigHeight, BIAS::Vector2< double > &corner, double &sizeWidth, double &sizeHeight) const | BIAS::HMatrix |
GetMax() const | BIAS::Matrix< HMATRIX_TYPE > |
GetMaxMin(HMATRIX_TYPE &max, HMATRIX_TYPE &min) const | BIAS::Matrix< HMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< HMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< HMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< HMATRIX_TYPE > &r) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< HMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
HMatrix() | BIAS::HMatrix |
HMatrix(const MatrixInitType &i) | BIAS::HMatrix | [inline, explicit]
HMatrix(Matrix3x3< double > Mat) | BIAS::HMatrix |
HMatrixBase() | BIAS::HMatrixBase | [inline]
HMatrixBase(const MatrixInitType &i) | BIAS::HMatrixBase | [inline, explicit]
HMatrixBase(const HMatrixBase &A) | BIAS::HMatrixBase | [inline]
HMatrixBase(const Matrix3x3< HMATRIX_TYPE > &A) | BIAS::HMatrixBase | [inline]
HMatrixBase(const Matrix< HMATRIX_TYPE > &A) | BIAS::HMatrixBase | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
Invert(Matrix3x3< HMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< HMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< HMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< HMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< HMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< HMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< HMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const HMATRIX_TYPEvalue) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< HMATRIX_TYPE > | [explicit]
Matrix(const Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< HMATRIX_TYPE > | [explicit]
Matrix3x3(const HMATRIX_TYPEa0, const HMATRIX_TYPEa1, const HMATRIX_TYPEa2, const HMATRIX_TYPEa3, const HMATRIX_TYPEa4, const HMATRIX_TYPEa5, const HMATRIX_TYPEa6, const HMATRIX_TYPEa7, const HMATRIX_TYPEa8) | BIAS::Matrix3x3< HMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > |
MaxMin(HMATRIX_TYPE &max, HMATRIX_TYPE &min) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< HMATRIX_TYPE > &argmat, Matrix3x3< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< HMATRIX_TYPE > &argmat, Matrix3x4< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Matrix< HMATRIX_TYPE > &arg, Matrix< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Multiply(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultiplyIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultLeft(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultLeft(const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< HMATRIX_TYPE > |
BIAS::Matrix< HMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< HMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const HMatrix &mat) | BIAS::HMatrix |
BIAS::HMatrixBase::operator=(const HMatrixBase &mat) | BIAS::HMatrixBase | [inline]
BIAS::Matrix3x3< HMATRIX_TYPE >::operator=(const Matrix3x3< HMATRIX_TYPE > &mat) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::operator=(const TNT::Matrix< HMATRIX_TYPE > &mat) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::operator=(const Matrix< HMATRIX_TYPE > &mat) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< HMATRIX_TYPE > |
Scale(const HMATRIX_TYPE &scalar, Matrix3x3< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, HMATRIX_TYPEscale) | BIAS::Matrix< HMATRIX_TYPE > |
ScaleRow(int NoRow, HMATRIX_TYPEscale) | BIAS::Matrix< HMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< HMATRIX_TYPE > &vec) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const HMATRIX_TYPE &x, const HMATRIX_TYPE &y, const HMATRIX_TYPE &z) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< HMATRIX_TYPE > &data) | BIAS::Matrix< HMATRIX_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetFromVector(const TNT::Vector< HMATRIX_TYPE > &vec) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< HMATRIX_TYPE > &data) | BIAS::Matrix< HMATRIX_TYPE > |
SetZero() | BIAS::Matrix< HMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
SubIP(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
SubIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
Transpose(const Matrix3x3< HMATRIX_TYPE > &arg) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~HMatrix() | BIAS::HMatrix |
~HMatrixBase() | BIAS::HMatrixBase |
~Matrix() | BIAS::Matrix< HMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< HMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:07:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HMatrixBase Member List

This is the complete list of members for BIAS::HMatrixBase, including all inherited members.

Add(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
AddIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
AddIP(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< HMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< HMATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
DivideIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< HMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetData() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetMax() const | BIAS::Matrix< HMATRIX_TYPE > |
GetMaxMin(HMATRIX_TYPE &max, HMATRIX_TYPE &min) const | BIAS::Matrix< HMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< HMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< HMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< HMATRIX_TYPE > &r) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< HMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
HMatrixBase() | BIAS::HMatrixBase | [inline]
HMatrixBase(const MatrixInitType &i) | BIAS::HMatrixBase | [inline, explicit]
HMatrixBase(const HMatrixBase &A) | BIAS::HMatrixBase | [inline]
HMatrixBase(const Matrix3x3< HMATRIX_TYPE > &A) | BIAS::HMatrixBase | [inline]
HMatrixBase(const Matrix< HMATRIX_TYPE > &A) | BIAS::HMatrixBase | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
Invert(Matrix3x3< HMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< HMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< HMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< HMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< HMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< HMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< HMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< HMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const HMATRIX_TYPEvalue) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< HMATRIX_TYPE > | [explicit]
Matrix(const Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< HMATRIX_TYPE > | [explicit]
Matrix3x3(const HMATRIX_TYPEa0, const HMATRIX_TYPEa1, const HMATRIX_TYPEa2, const HMATRIX_TYPEa3, const HMATRIX_TYPEa4, const HMATRIX_TYPEa5, const HMATRIX_TYPEa6, const HMATRIX_TYPEa7, const HMATRIX_TYPEa8) | BIAS::Matrix3x3< HMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< HMATRIX_TYPE > &A) | BIAS::Matrix3x3< HMATRIX_TYPE > |
MaxMin(HMATRIX_TYPE &max, HMATRIX_TYPE &min) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< HMATRIX_TYPE > &argmat, Matrix3x3< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< HMATRIX_TYPE > &argmat, Matrix3x4< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Matrix< HMATRIX_TYPE > &arg, Matrix< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::Mult(const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Multiply(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultiplyIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultLeft(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
MultLeft(const Vector< HMATRIX_TYPE > &arg, Vector< HMATRIX_TYPE > &result) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< HMATRIX_TYPE > |
BIAS::Matrix< HMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< HMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< HMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const HMatrixBase &mat) | BIAS::HMatrixBase | [inline]
BIAS::Matrix3x3< HMATRIX_TYPE >::operator=(const Matrix3x3< HMATRIX_TYPE > &mat) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::operator=(const TNT::Matrix< HMATRIX_TYPE > &mat) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
BIAS::Matrix< HMATRIX_TYPE >::operator=(const Matrix< HMATRIX_TYPE > &mat) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< HMATRIX_TYPE > |
Scale(const HMATRIX_TYPE &scalar, Matrix3x3< HMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, HMATRIX_TYPEscale) | BIAS::Matrix< HMATRIX_TYPE > |
ScaleRow(int NoRow, HMATRIX_TYPEscale) | BIAS::Matrix< HMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< HMATRIX_TYPE > &vec) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const HMATRIX_TYPE &x, const HMATRIX_TYPE &y, const HMATRIX_TYPE &z) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< HMATRIX_TYPE > &data) | BIAS::Matrix< HMATRIX_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< HMATRIX_TYPE > &v0, const BIAS::Vector3< HMATRIX_TYPE > &v1, const BIAS::Vector3< HMATRIX_TYPE > &v2) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetFromVector(const TNT::Vector< HMATRIX_TYPE > &vec) | BIAS::Matrix3x3< HMATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< HMATRIX_TYPE > &data) | BIAS::Matrix< HMATRIX_TYPE > |
SetZero() | BIAS::Matrix< HMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const HMATRIX_TYPE &scalar, Matrix< HMATRIX_TYPE > &dest) const | BIAS::Matrix< HMATRIX_TYPE > | [inline]
SubIP(const Matrix< HMATRIX_TYPE > &arg) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
SubIP(const HMATRIX_TYPE &scalar) | BIAS::Matrix< HMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< HMATRIX_TYPE > |
Transpose(const Matrix3x3< HMATRIX_TYPE > &arg) | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< HMATRIX_TYPE > &argvec, Vector3< HMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< HMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~HMatrixBase() | BIAS::HMatrixBase |
~Matrix() | BIAS::Matrix< HMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< HMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:07:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HMatrixEstimation Member List

This is the complete list of members for BIAS::HMatrixEstimation, including all inherited members.

Compute(const std::vector< BIAS::HomgPoint2D > &frompoints, const std::vector< BIAS::HomgPoint2D > &topoints, HMatrix &H) | BIAS::HMatrixEstimation |
Compute(const std::vector< BIAS::Vector2< double > > &frompoints, const std::vector< BIAS::Vector2< double > > &topoints, HMatrix &H) | BIAS::HMatrixEstimation |
ComputeAffine(const std::vector< BIAS::HomgPoint2D > &frompoints, const std::vector< BIAS::HomgPoint2D > &topoints, HMatrix &H) | BIAS::HMatrixEstimation |
GetError() | BIAS::HMatrixEstimation |
H_ | BIAS::HMatrixEstimation | [protected]
HMatrixEstimation(bool normalizehartley=true) | BIAS::HMatrixEstimation | [inline, explicit]
normalization_ | BIAS::HMatrixEstimation | [protected]
normalizeHartley_ | BIAS::HMatrixEstimation | [protected]
Optimize(BIAS::HMatrix &H, const std::vector< BIAS::HomgPoint2D > &p1, const std::vector< BIAS::HomgPoint2D > &p2) | BIAS::HMatrixEstimation |
p1_ | BIAS::HMatrixEstimation |
p2_ | BIAS::HMatrixEstimation |
pointsFrom_ | BIAS::HMatrixEstimation | [protected]
pointsTo_ | BIAS::HMatrixEstimation | [protected]

Generated on Wed Jun 21 19:07:38 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgLine2D Member List

This is the complete list of members for BIAS::HomgLine2D, including all inherited members.

Add(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Add(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
AddIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
AddIP(const Vector3< HOMGLINE2D_TYPE > &argvec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
CartesianToPolar() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
CoordEuclidianToSphere() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
CoordSphereToEuclidian() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
CrossProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
CrossProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
data_ | BIAS::Vector3< HOMGLINE2D_TYPE > | [protected]
Dist(const Vector3< HOMGLINE2D_TYPE > &vec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Distance(HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
Distance(const HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
DistanceSquared(const HomgPoint2D &point) | BIAS::HomgLine2D | [inline]
Div(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Divide(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
DivideIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
DivIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseDivision(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseDivision(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
GetData() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
GetData() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
GetIntersectionsWithImage(unsigned int width, unsigned int height, unsigned int coo[4]) | BIAS::HomgLine2D |
GetNormalized() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
GetPerpendicularLine(HomgPoint2D &point, HomgLine2D &perpline) | BIAS::HomgLine2D | [inline]
GetSkewSymmetricMatrix() const | BIAS::Vector3< HOMGLINE2D_TYPE > |
GetW() | BIAS::HomgLine2D | [inline]
HomgLine2D() | BIAS::HomgLine2D | [inline]
HomgLine2D(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::HomgLine2D | [inline, explicit]
HomgLine2D(HOMGLINE2D_TYPE a, HOMGLINE2D_TYPE b, HOMGLINE2D_TYPE c) | BIAS::HomgLine2D | [inline]
HomgLine2D(const HomgLine2D &line) | BIAS::HomgLine2D | [inline]
HomgLine2D(const HomgPoint2D &p1, const HomgPoint2D &p2) | BIAS::HomgLine2D | [inline]
Homogenize() | BIAS::HomgLine2D | [inline]
Intersection(HomgLine2D &line, HomgPoint2D &intersect) const | BIAS::HomgLine2D | [inline]
Intersection(HomgLine2D &line) const | BIAS::HomgLine2D | [inline]
IsZero() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Length() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Load(const std::string &filename) | BIAS::Vector3< HOMGLINE2D_TYPE > |
LoadBogTC(const std::string &filename) | BIAS::Vector3< HOMGLINE2D_TYPE > |
Mult(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
MultIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Multiply(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
MultiplyIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Normalize() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Normalize(Matrix3x3< HOMGLINE2D_TYPE > &cov) | BIAS::Vector3< HOMGLINE2D_TYPE > |
NormL1() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
NormL2() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator!=(const Vector3< HOMGLINE2D_TYPE > &arg) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator=(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator=(const Vector< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator==(const Vector3< HOMGLINE2D_TYPE > &arg) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
OuterProduct(const Vector3< HOMGLINE2D_TYPE > &v, Matrix3x3< HOMGLINE2D_TYPE > &res) const | BIAS::Vector3< HOMGLINE2D_TYPE > |
OuterProduct(const Vector3< HOMGLINE2D_TYPE > &v) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Phi() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Phi() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
PolarToCartesian() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Radius() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Radius() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Save(const std::string &filename) const | BIAS::Vector3< HOMGLINE2D_TYPE > |
ScalarProduct(const Vector3< HOMGLINE2D_TYPE > &argvec, HOMGLINE2D_TYPE &result) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
ScalarProduct(const Vector3< HOMGLINE2D_TYPE > &argvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Set(const HomgPoint2D &p1, const HomgPoint2D &p2) | BIAS::HomgLine2D | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE *pv) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
BIAS::Vector3< HOMGLINE2D_TYPE >::Set(const Vector< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SetZero() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Size() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Sub(const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Sub(const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SubIP(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
SubIP(const Vector3< HOMGLINE2D_TYPE > &argvec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Theta() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Theta() const | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const Vector3< HOMGLINE2D_TYPE > &vec) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const HOMGLINE2D_TYPE &scalar) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(const HOMGLINE2D_TYPE *pv) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(char *s) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline, explicit]
Vector3(const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z) | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]
Vector3(const Vector< HOMGLINE2D_TYPE > &v) | BIAS::Vector3< HOMGLINE2D_TYPE > |
~HomgLine2D() | BIAS::HomgLine2D | [inline]
~Vector3() | BIAS::Vector3< HOMGLINE2D_TYPE > | [inline]

Generated on Wed Jun 21 19:07:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgLine3D Member List

This is the complete list of members for BIAS::HomgLine3D, including all inherited members.

CalculateFootpoint(HomgPoint3D &p, HomgPoint3D &footp) | BIAS::HomgLine3D | [inline]
Distance(HomgPoint3D &p, HOMGLINE3D_TYPE &dist) | BIAS::HomgLine3D | [inline]
GetPointFin() const | BIAS::HomgLine3D | [inline]
GetPointInf() const | BIAS::HomgLine3D | [inline]
HomgLine3D() | BIAS::HomgLine3D | [inline]
HomgLine3D(const HomgPoint3D &p1, const HomgPoint3D &p2) | BIAS::HomgLine3D | [inline]
Homogenize() | BIAS::HomgLine3D | [inline]
PointFin_ | BIAS::HomgLine3D | [protected]
PointInf_ | BIAS::HomgLine3D | [protected]
Set(const HomgPoint3D &p1, const HomgPoint3D &p2) | BIAS::HomgLine3D | [inline]
~HomgLine3D() | BIAS::HomgLine3D | [inline]

Generated on Wed Jun 21 19:07:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPlane3D Member List

This is the complete list of members for BIAS::HomgPlane3D, including all inherited members.

Add(const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Add(const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
AddIP(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
AddIP(const Vector4< HOMGPLANE3D_TYPE > &argvec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Copy(const HOMGPLANE3D_TYPE *pv) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
data_ | BIAS::Vector4< HOMGPLANE3D_TYPE > | [protected]
Dist(const Vector4< HOMGPLANE3D_TYPE > &vec) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
DistanceSquared(const HomgPoint3D &point) const | BIAS::HomgPlane3D | [inline]
Divide(const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
DivideIP(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
ElementwiseProduct(const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
GetData() const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
GetData() | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
GetLineIntersection(const HomgPoint3D &PointOnLine, const HomgPoint3D &LineDir, HomgPoint3D &Intersection) const | BIAS::HomgPlane3D | [inline]
GetNormalVector(Vector3< HOMGPLANE3D_TYPE > &normalv) const | BIAS::HomgPlane3D | [inline]
GetNormalVector() const | BIAS::HomgPlane3D | [inline]
HomgPlane3D() | BIAS::HomgPlane3D | [inline]
HomgPlane3D(HOMGPLANE3D_TYPE a, HOMGPLANE3D_TYPE b, HOMGPLANE3D_TYPE c, HOMGPLANE3D_TYPE d) | BIAS::HomgPlane3D | [inline]
HomgPlane3D(const HomgPoint3D &p1, const HomgPoint3D &p2, const HomgPoint3D &p3) | BIAS::HomgPlane3D | [inline]
HomgPlane3D(const Vector3< double > &PointOnPlane, const Vector3< double > &NormalVector) | BIAS::HomgPlane3D | [inline, explicit]
HomgPlane3D(const Vector4< HOMGPLANE3D_TYPE > &theplane) | BIAS::HomgPlane3D | [inline, explicit]
HomgPlane3D(const Vector< HOMGPLANE3D_TYPE > &theplane) | BIAS::HomgPlane3D | [inline, explicit]
Load(const std::string &filename) | BIAS::Vector4< HOMGPLANE3D_TYPE > |
Multiply(const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
MultiplyIP(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Normalize() | BIAS::HomgPlane3D | [inline]
NormL1() const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
NormL2() const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator *=(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator!=(const Vector4< HOMGPLANE3D_TYPE > &arg) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator+=(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator+=(const Vector4< HOMGPLANE3D_TYPE > &argvec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator-=(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator-=(const Vector4< HOMGPLANE3D_TYPE > &argvec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator/=(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator=(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator=(const Vector4< HOMGPLANE3D_TYPE > &vec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator==(const Vector4< HOMGPLANE3D_TYPE > &arg) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
OuterProduct(const Vector4< HOMGPLANE3D_TYPE > &v) const | BIAS::Vector4< HOMGPLANE3D_TYPE > |
Save(const std::string &filename) const | BIAS::Vector4< HOMGPLANE3D_TYPE > |
ScalarProduct(const Vector4< HOMGPLANE3D_TYPE > &argvec, HOMGPLANE3D_TYPE &result) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Set(const Vector3< double > &PointOnPlane, const Vector3< double > &NormalVector) | BIAS::HomgPlane3D | [inline]
BIAS::Vector4< HOMGPLANE3D_TYPE >::Set(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
BIAS::Vector4< HOMGPLANE3D_TYPE >::Set(const HOMGPLANE3D_TYPE &x, const HOMGPLANE3D_TYPE &y, const HOMGPLANE3D_TYPE &z, const HOMGPLANE3D_TYPE &w) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
SetFromVector(const Vector< HOMGPLANE3D_TYPE > &theplane) | BIAS::HomgPlane3D | [inline]
SetZero() | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Size() const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Sub(const HOMGPLANE3D_TYPE &scalar, Vector4< HOMGPLANE3D_TYPE > &dest) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Sub(const Vector4< HOMGPLANE3D_TYPE > &argvec, Vector4< HOMGPLANE3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
SubIP(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
SubIP(const Vector4< HOMGPLANE3D_TYPE > &argvec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
transposed() const | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Vector4() | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Vector4(const Vector4< HOMGPLANE3D_TYPE > &vec) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Vector4(const HOMGPLANE3D_TYPE &scalar) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline, explicit]
Vector4(const HOMGPLANE3D_TYPE *pv) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline, explicit]
Vector4(char *s) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline, explicit]
Vector4(const HOMGPLANE3D_TYPEv0, const HOMGPLANE3D_TYPEv1, const HOMGPLANE3D_TYPEv2, const HOMGPLANE3D_TYPEv3) | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]
Vector4(const Vector< HOMGPLANE3D_TYPE > &v) | BIAS::Vector4< HOMGPLANE3D_TYPE > |
~HomgPlane3D() | BIAS::HomgPlane3D | [inline]
~Vector4() | BIAS::Vector4< HOMGPLANE3D_TYPE > | [inline]

Generated on Wed Jun 21 19:07:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPoint1D Member List

This is the complete list of members for BIAS::HomgPoint1D, including all inherited members.

Add(const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Add(const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
AddIP(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
AddIP(const Vector2< HOMGPOINT1D_TYPE > &argvec) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
CoordEuclidianToPolar() const | BIAS::Vector2< HOMGPOINT1D_TYPE > |
CoordPolarToEuclidian() const | BIAS::Vector2< HOMGPOINT1D_TYPE > |
Copy(const HOMGPOINT1D_TYPE *pv) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
data_ | BIAS::Vector2< HOMGPOINT1D_TYPE > | [protected]
Dist(const Vector2< HOMGPOINT1D_TYPE > &vec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Divide(const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Divide(const Vector2< HOMGPOINT1D_TYPE > &vec, Vector2< HOMGPOINT1D_TYPE > &dest) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
DivideIP(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
DivideIP(const Vector2< HOMGPOINT1D_TYPE > &vec) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
ElementwiseDivision(const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
ElementwiseDivision(const Vector2< HOMGPOINT1D_TYPE > &argvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
ElementwiseProduct(const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
ElementwiseProduct(const Vector2< HOMGPOINT1D_TYPE > &argvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Fill(HOMGPOINT1D_TYPEvalue) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetData() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetData() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetEuclidian() | BIAS::HomgPoint1D | [inline]
GetW() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetW() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetX() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetX() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetY() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
GetY() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
HomgPoint1D() | BIAS::HomgPoint1D | [inline]
HomgPoint1D(const HomgPoint1D &p) | BIAS::HomgPoint1D | [inline]
HomgPoint1D(const HOMGPOINT1D_TYPE &scalar) | BIAS::HomgPoint1D | [inline, explicit]
HomgPoint1D(const HOMGPOINT1D_TYPE *pv) | BIAS::HomgPoint1D | [inline, explicit]
HomgPoint1D(char *s) | BIAS::HomgPoint1D | [inline, explicit]
Homogenize() | BIAS::HomgPoint1D | [inline]
IsZero() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Length() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Load(const std::string &filename) | BIAS::Vector2< HOMGPOINT1D_TYPE > |
Multiply(const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
MultiplyIP(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
NormL1() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
NormL2() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
operator!=(HomgPoint1D &arg) | BIAS::HomgPoint1D | [inline]
BIAS::Vector2< HOMGPOINT1D_TYPE >::operator!=(const Vector2< HOMGPOINT1D_TYPE > &arg) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
operator=(const Vector2< HOMGPOINT1D_TYPE > &vec) | BIAS::HomgPoint1D | [inline]
operator=(const HOMGPOINT1D_TYPE &scalar) | BIAS::HomgPoint1D | [inline]
operator==(HomgPoint1D &arg) | BIAS::HomgPoint1D | [inline]
BIAS::Vector2< HOMGPOINT1D_TYPE >::operator==(const Vector2< HOMGPOINT1D_TYPE > &arg) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
OuterProduct(const BIAS::Vector2< HOMGPOINT1D_TYPE > &v, BIAS::Matrix2x2< HOMGPOINT1D_TYPE > &mat) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
OuterProduct(const BIAS::Vector2< HOMGPOINT1D_TYPE > &v) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Phi() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Phi() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Radius() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Radius() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Save(const std::string &filename) const | BIAS::Vector2< HOMGPOINT1D_TYPE > |
ScalarProduct(const Vector2< HOMGPOINT1D_TYPE > &argvec, HOMGPOINT1D_TYPE &result) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
ScalarProduct(const Vector2< HOMGPOINT1D_TYPE > &argvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Set(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Set(const HOMGPOINT1D_TYPE &x, const HOMGPOINT1D_TYPE &y) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SetW(const HOMGPOINT1D_TYPEw) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SetX(const HOMGPOINT1D_TYPEx) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SetY(const HOMGPOINT1D_TYPEy) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SetZero() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Size() const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Sub(const HOMGPOINT1D_TYPE &scalar, Vector2< HOMGPOINT1D_TYPE > &dest) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Sub(const Vector2< HOMGPOINT1D_TYPE > &argvec, Vector2< HOMGPOINT1D_TYPE > &destvec) const | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SubIP(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
SubIP(const Vector2< HOMGPOINT1D_TYPE > &argvec) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Vector2() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Vector2(const Vector2< HOMGPOINT1D_TYPE > &vec) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Vector2(const HOMGPOINT1D_TYPE &scalar) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline, explicit]
Vector2(const HOMGPOINT1D_TYPEv0, const HOMGPOINT1D_TYPEv1) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]
Vector2(const HOMGPOINT1D_TYPE *pv) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline, explicit]
Vector2(char *s) | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline, explicit]
Vector2(const Vector< HOMGPOINT1D_TYPE > &v) | BIAS::Vector2< HOMGPOINT1D_TYPE > |
~HomgPoint1D() | BIAS::HomgPoint1D | [inline]
~Vector2() | BIAS::Vector2< HOMGPOINT1D_TYPE > | [inline]

Generated on Wed Jun 21 19:07:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPoint2D Member List

This is the complete list of members for BIAS::HomgPoint2D, including all inherited members.

Add(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Add(const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
AddIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
AddIP(const Vector3< HOMGPOINT2D_TYPE > &argvec) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Bottom enum value | BIAS::HomgPoint2D |
BottomLeft enum value | BIAS::HomgPoint2D |
BottomRight enum value | BIAS::HomgPoint2D |
CartesianToPolar() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Center enum value | BIAS::HomgPoint2D |
CoordEuclidianToSphere() const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
CoordSphereToEuclidian() const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
CrossProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
CrossProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
data_ | BIAS::Vector3< HOMGPOINT2D_TYPE > | [protected]
DeterminePosition(unsigned int width, unsigned int height) | BIAS::HomgPoint2D | [inline]
Dist(const Vector3< HOMGPOINT2D_TYPE > &vec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Distance(HomgPoint2D &point) | BIAS::HomgPoint2D | [inline]
DistanceSquared(HomgPoint2D &point) | BIAS::HomgPoint2D | [inline]
Div(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Divide(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
DivideIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
DivIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ElementwiseDivision(const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ElementwiseDivision(const Vector3< HOMGPOINT2D_TYPE > &argvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ElementwiseProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ELocation enum name | BIAS::HomgPoint2D |
EPosition enum name | BIAS::HomgPoint2D |
GetData() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
GetData() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
GetEuclidian(Vector2< HOMGPOINT2D_TYPE > &dest) const | BIAS::HomgPoint2D | [inline]
GetEuclidian() const | BIAS::HomgPoint2D | [inline]
GetEuclidianX() const | BIAS::HomgPoint2D | [inline]
GetEuclidianY() const | BIAS::HomgPoint2D | [inline]
GetImageCoo(unsigned int width, unsigned int height, unsigned int coo[2]) | BIAS::HomgPoint2D | [inline]
GetNormalized() const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
GetSkewSymmetricMatrix() const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
GetW() const | BIAS::HomgPoint2D | [inline]
HomgPoint2D() | BIAS::HomgPoint2D | [inline]
HomgPoint2D(const HomgPoint2D &p) | BIAS::HomgPoint2D | [inline]
HomgPoint2D(const HOMGPOINT2D_TYPE &scalar) | BIAS::HomgPoint2D | [inline, explicit]
HomgPoint2D(const HOMGPOINT2D_TYPE *pv) | BIAS::HomgPoint2D | [inline, explicit]
HomgPoint2D(char *s) | BIAS::HomgPoint2D | [inline, explicit]
HomgPoint2D(const Vector3< double > &vec) | BIAS::HomgPoint2D | [inline]
HomgPoint2D(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y) | BIAS::HomgPoint2D | [inline]
HomgPoint2D(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &w) | BIAS::HomgPoint2D | [inline]
Homogenize() | BIAS::HomgPoint2D | [inline]
Homogenize(Matrix3x3< double > &cov) | BIAS::HomgPoint2D |
Infinity enum value | BIAS::HomgPoint2D |
InvalidPosition enum value | BIAS::HomgPoint2D |
IsAtInfinity() const | BIAS::HomgPoint2D | [inline]
IsHomogenized() const | BIAS::HomgPoint2D | [inline]
IsInROI(const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const | BIAS::HomgPoint2D | [inline]
IsInROIHomogenized(const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const | BIAS::HomgPoint2D | [inline]
IsZero() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Left enum value | BIAS::HomgPoint2D |
Length() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Load(const std::string &filename) | BIAS::Vector3< HOMGPOINT2D_TYPE > |
LoadBogTC(const std::string &filename) | BIAS::Vector3< HOMGPOINT2D_TYPE > |
LOC_LEFT enum value | BIAS::HomgPoint2D |
LOC_LOWER enum value | BIAS::HomgPoint2D |
LOC_MIDDLE enum value | BIAS::HomgPoint2D |
LOC_RIGHT enum value | BIAS::HomgPoint2D |
LOC_undef enum value | BIAS::HomgPoint2D |
LOC_UPPER enum value | BIAS::HomgPoint2D |
Mult(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
MultIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Multiply(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
MultiplyIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Normalize() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Normalize(Matrix3x3< HOMGPOINT2D_TYPE > &cov) | BIAS::Vector3< HOMGPOINT2D_TYPE > |
NormL1() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
NormL2() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
operator!=(HomgPoint2D &arg) | BIAS::HomgPoint2D | [inline]
BIAS::Vector3< HOMGPOINT2D_TYPE >::operator!=(const Vector3< HOMGPOINT2D_TYPE > &arg) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
operator=(const Vector3< HOMGPOINT2D_TYPE > &vec) | BIAS::HomgPoint2D | [inline]
operator=(const HOMGPOINT2D_TYPE &scalar) | BIAS::HomgPoint2D | [inline]
BIAS::Vector3< HOMGPOINT2D_TYPE >::operator=(const Vector< HOMGPOINT2D_TYPE > &vec) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
operator==(HomgPoint2D &arg) | BIAS::HomgPoint2D | [inline]
BIAS::Vector3< HOMGPOINT2D_TYPE >::operator==(const Vector3< HOMGPOINT2D_TYPE > &arg) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
OuterProduct(const Vector3< HOMGPOINT2D_TYPE > &v, Matrix3x3< HOMGPOINT2D_TYPE > &res) const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
OuterProduct(const Vector3< HOMGPOINT2D_TYPE > &v) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Phi() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Phi() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
PolarToCartesian() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Radius() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Radius() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Right enum value | BIAS::HomgPoint2D |
Save(const std::string &filename) const | BIAS::Vector3< HOMGPOINT2D_TYPE > |
ScalarProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec, HOMGPOINT2D_TYPE &result) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
ScalarProduct(const Vector3< HOMGPOINT2D_TYPE > &argvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Set(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y) | BIAS::HomgPoint2D | [inline]
Set(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &z) | BIAS::HomgPoint2D | [inline]
Set(const Vector< HOMGPOINT2D_TYPE > &vec) | BIAS::HomgPoint2D | [inline]
BIAS::Vector3< HOMGPOINT2D_TYPE >::Set(const HOMGPOINT2D_TYPE *pv) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
BIAS::Vector3< HOMGPOINT2D_TYPE >::Set(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
SetZero() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Size() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Sub(const HOMGPOINT2D_TYPE &scalar, Vector3< HOMGPOINT2D_TYPE > &dest) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Sub(const Vector3< HOMGPOINT2D_TYPE > &argvec, Vector3< HOMGPOINT2D_TYPE > &destvec) const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
SubIP(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
SubIP(const Vector3< HOMGPOINT2D_TYPE > &argvec) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Theta() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Theta() const | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Top enum value | BIAS::HomgPoint2D |
TopLeft enum value | BIAS::HomgPoint2D |
TopRight enum value | BIAS::HomgPoint2D |
Vector3() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Vector3(const Vector3< HOMGPOINT2D_TYPE > &vec) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Vector3(const HOMGPOINT2D_TYPE &scalar) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline, explicit]
Vector3(const HOMGPOINT2D_TYPE *pv) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline, explicit]
Vector3(char *s) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline, explicit]
Vector3(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &z) | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]
Vector3(const Vector< HOMGPOINT2D_TYPE > &v) | BIAS::Vector3< HOMGPOINT2D_TYPE > |
~HomgPoint2D() | BIAS::HomgPoint2D | [inline]
~Vector3() | BIAS::Vector3< HOMGPOINT2D_TYPE > | [inline]

Generated on Wed Jun 21 19:07:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPoint2DCov Member List

This is the complete list of members for BIAS::HomgPoint2DCov, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< double > |
BinWrite(const char *filename) const | BIAS::Matrix< double > |
CheckSymmetry_() const | BIAS::HomgPoint2DCov | [protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< double > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const double &scalar) | BIAS::Matrix< double > |
GetCol(const int &col) const | BIAS::Matrix< double > |
GetCols() const | BIAS::Matrix< double > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< double > |
GetData() const | BIAS::Matrix< double > | [inline]
GetDataArray() const | BIAS::Matrix< double > | [inline]
GetDataArray1() const | BIAS::Matrix< double > | [inline]
GetDataLast() const | BIAS::Matrix< double > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< double > |
GetEuclidean() const | BIAS::HomgPoint2DCov |
GetMax() const | BIAS::Matrix< double > |
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > |
GetMean() const | BIAS::Matrix< double > |
GetMin() const | BIAS::Matrix< double > |
GetNumElements() const | BIAS::Matrix< double > | [inline]
GetRow(const unsigned int row, Vector3< double > &r) const | BIAS::Matrix3x3< double > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< double > | [inline]
BIAS::Matrix< double >::GetRow(const int &row) const | BIAS::Matrix< double > |
GetRows() const | BIAS::Matrix< double > | [inline]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
HomgPoint2DCov() | BIAS::HomgPoint2DCov |
HomgPoint2DCov(const MatrixInitType &i) | BIAS::HomgPoint2DCov |
HomgPoint2DCov(const Matrix3x3< double > &m) | BIAS::HomgPoint2DCov |
HomgPoint2DCov(const Matrix< double > &m) | BIAS::HomgPoint2DCov |
HomgPoint2DCov(const TNT::Matrix< double > &m) | BIAS::HomgPoint2DCov |
Homogenize(HomgPoint2D &p) | BIAS::HomgPoint2DCov |
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< double > |
Invert(Matrix3x3< double > &inv) const | BIAS::Matrix3x3< double > |
InvertIP() | BIAS::Matrix3x3< double > |
IsHomogenized() const | BIAS::HomgPoint2DCov | [inline]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > |
IsZero() const | BIAS::HomgPoint2DCov | [inline]
BIAS::Matrix3x3< double >::IsZero(double eps=0.0) const | BIAS::Matrix< double > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< double > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< double > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< double > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< double > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< double > | [explicit]
Matrix3x3(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8) | BIAS::Matrix3x3< double > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< double > | [inline, explicit]
Matrix3x3(const Matrix3x3< double > &A) | BIAS::Matrix3x3< double > | [inline]
Matrix3x3(const Matrix< double > &A) | BIAS::Matrix3x3< double > |
Matrix3x3(const TNT::Matrix< double > &A) | BIAS::Matrix3x3< double > |
MaxMin(double &max, double &min) const | BIAS::Matrix3x3< double > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< double > &argvec, Vector3< double > &destvec) const | BIAS::Matrix3x3< double > | [inline]
Mult(const Matrix3x3< double > &argmat, Matrix3x3< double > &destmat) const | BIAS::Matrix3x3< double > | [inline]
Mult(const Matrix3x4< double > &argmat, Matrix3x4< double > &destmat) const | BIAS::Matrix3x3< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< double > |
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< double > |
NormalizeCols() | BIAS::Matrix< double > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > |
NormalizeRows() | BIAS::Matrix< double > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > |
NormFrobenius() const | BIAS::Matrix< double > | [inline]
NormL1() const | BIAS::Matrix< double > | [inline]
NormL2() const | BIAS::Matrix< double > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< double > &mat) | BIAS::Matrix3x3< double > | [inline]
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::operator=(const Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< double > |
Scale(const double &scalar, Matrix3x3< double > &destmat) const | BIAS::Matrix3x3< double > | [inline]
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > |
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< double > &vec) | BIAS::Matrix3x3< double > | [inline]
SetAsCrossProductMatrix(const double &x, const double &y, const double &z) | BIAS::Matrix3x3< double > | [inline]
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetEuclidean(const Matrix2x2< double > &m) | BIAS::HomgPoint2DCov |
SetFromColumnVectors(const BIAS::Vector3< double > &v0, const BIAS::Vector3< double > &v1, const BIAS::Vector3< double > &v2) | BIAS::Matrix3x3< double > |
SetFromRowVectors(const BIAS::Vector3< double > &v0, const BIAS::Vector3< double > &v1, const BIAS::Vector3< double > &v2) | BIAS::Matrix3x3< double > |
SetFromVector(const TNT::Vector< double > &vec) | BIAS::Matrix3x3< double > |
SetIdentity() | BIAS::Matrix3x3< double > | [inline]
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetZero() | BIAS::Matrix< double > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline]
Trace() const | BIAS::Matrix3x3< double > | [inline]
Transpose() const | BIAS::Matrix3x3< double > |
Transpose(const Matrix3x3< double > &arg) | BIAS::Matrix3x3< double > | [inline]
TransposedMult(const Vector3< double > &argvec, Vector3< double > &destvec) const | BIAS::Matrix3x3< double > | [inline]
TransposeIP() | BIAS::Matrix3x3< double > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~HomgPoint2DCov() | BIAS::HomgPoint2DCov | [virtual]
~Matrix() | BIAS::Matrix< double > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< double > | [virtual]

Generated on Wed Jun 21 19:07:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPoint3D Member List

This is the complete list of members for BIAS::HomgPoint3D, including all inherited members.

Add(const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Add(const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
AddIP(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
AddIP(const Vector4< HOMGPOINT3D_TYPE > &argvec) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Copy(const HOMGPOINT3D_TYPE *pv) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
data_ | BIAS::Vector4< HOMGPOINT3D_TYPE > | [protected]
Dist(const Vector4< HOMGPOINT3D_TYPE > &vec) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Distance(HomgPoint3D &point) | BIAS::HomgPoint3D | [inline]
Divide(const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
DivideIP(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
ElementwiseProduct(const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
GetData() const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
GetData() | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
GetEuclidian(Vector3< HOMGPOINT3D_TYPE > &dest) | BIAS::HomgPoint3D | [inline]
GetEuclidian(Vector3< HOMGPOINT3D_TYPE > &dest) const | BIAS::HomgPoint3D | [inline]
GetEuclidianX() | BIAS::HomgPoint3D | [inline]
GetEuclidianY() | BIAS::HomgPoint3D | [inline]
GetEuclidianZ() | BIAS::HomgPoint3D | [inline]
GetW() | BIAS::HomgPoint3D | [inline]
GetX() | BIAS::HomgPoint3D | [inline]
GetY() | BIAS::HomgPoint3D | [inline]
GetZ() | BIAS::HomgPoint3D | [inline]
HomgPoint3D() | BIAS::HomgPoint3D | [inline]
HomgPoint3D(const HomgPoint3D &p) | BIAS::HomgPoint3D | [inline]
HomgPoint3D(const Vector4< HOMGPOINT3D_TYPE > &p) | BIAS::HomgPoint3D | [inline]
HomgPoint3D(const Vector3< HOMGPOINT3D_TYPE > &vec) | BIAS::HomgPoint3D | [inline, explicit]
HomgPoint3D(const HOMGPOINT3D_TYPE &scalar) | BIAS::HomgPoint3D | [inline, explicit]
HomgPoint3D(const HOMGPOINT3D_TYPE *pv) | BIAS::HomgPoint3D | [inline, explicit]
HomgPoint3D(char *s) | BIAS::HomgPoint3D | [inline, explicit]
HomgPoint3D(const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z) | BIAS::HomgPoint3D | [inline]
HomgPoint3D(const Vector< double > &vec) | BIAS::HomgPoint3D | [inline]
HomgPoint3D(const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z, const HOMGPOINT3D_TYPE &w) | BIAS::HomgPoint3D | [inline]
Homogenize() | BIAS::HomgPoint3D | [inline]
IsAtInfinity() const | BIAS::HomgPoint3D | [inline]
IsHomogenized() const | BIAS::HomgPoint3D | [inline]
Load(const std::string &filename) | BIAS::Vector4< HOMGPOINT3D_TYPE > |
Multiply(const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
MultiplyIP(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
NormL1() const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
NormL2() const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator *=(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator!=(HomgPoint3D &arg) | BIAS::HomgPoint3D | [inline]
BIAS::Vector4< HOMGPOINT3D_TYPE >::operator!=(const Vector4< HOMGPOINT3D_TYPE > &arg) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator+=(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator+=(const Vector4< HOMGPOINT3D_TYPE > &argvec) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator-=(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator-=(const Vector4< HOMGPOINT3D_TYPE > &argvec) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator/=(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator=(const Vector4< HOMGPOINT3D_TYPE > &vec) | BIAS::HomgPoint3D | [inline]
operator=(const HOMGPOINT3D_TYPE &scalar) | BIAS::HomgPoint3D | [inline]
operator=(const Vector3< HOMGPOINT3D_TYPE > &vec) | BIAS::HomgPoint3D | [inline]
operator==(HomgPoint3D &arg) | BIAS::HomgPoint3D | [inline]
BIAS::Vector4< HOMGPOINT3D_TYPE >::operator==(const Vector4< HOMGPOINT3D_TYPE > &arg) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
operator[](const int i) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
OuterProduct(const Vector4< HOMGPOINT3D_TYPE > &v) const | BIAS::Vector4< HOMGPOINT3D_TYPE > |
Save(const std::string &filename) const | BIAS::Vector4< HOMGPOINT3D_TYPE > |
ScalarProduct(const Vector4< HOMGPOINT3D_TYPE > &argvec, HOMGPOINT3D_TYPE &result) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Set(const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z) | BIAS::HomgPoint3D | [inline]
Set(const HOMGPOINT3D_TYPE &x, const HOMGPOINT3D_TYPE &y, const HOMGPOINT3D_TYPE &z, const HOMGPOINT3D_TYPE &w) | BIAS::HomgPoint3D | [inline]
Set(const Vector3< HOMGPOINT3D_TYPE > &vec) | BIAS::HomgPoint3D | [inline]
BIAS::Vector4< HOMGPOINT3D_TYPE >::Set(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
SetZero() | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Size() const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Sub(const HOMGPOINT3D_TYPE &scalar, Vector4< HOMGPOINT3D_TYPE > &dest) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Sub(const Vector4< HOMGPOINT3D_TYPE > &argvec, Vector4< HOMGPOINT3D_TYPE > &destvec) const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
SubIP(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
SubIP(const Vector4< HOMGPOINT3D_TYPE > &argvec) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
transposed() const | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Vector4() | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Vector4(const Vector4< HOMGPOINT3D_TYPE > &vec) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Vector4(const HOMGPOINT3D_TYPE &scalar) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline, explicit]
Vector4(const HOMGPOINT3D_TYPE *pv) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline, explicit]
Vector4(char *s) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline, explicit]
Vector4(const HOMGPOINT3D_TYPEv0, const HOMGPOINT3D_TYPEv1, const HOMGPOINT3D_TYPEv2, const HOMGPOINT3D_TYPEv3) | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]
Vector4(const Vector< HOMGPOINT3D_TYPE > &v) | BIAS::Vector4< HOMGPOINT3D_TYPE > |
~HomgPoint3D() | BIAS::HomgPoint3D | [inline]
~Vector4() | BIAS::Vector4< HOMGPOINT3D_TYPE > | [inline]

Generated on Wed Jun 21 19:07:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomgPoint3DCov Member List

This is the complete list of members for BIAS::HomgPoint3DCov, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< double > |
BinWrite(const char *filename) const | BIAS::Matrix< double > |
CheckSymmetry_() const | BIAS::HomgPoint3DCov | [inline, protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< double > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const double &scalar) | BIAS::Matrix< double > |
GetCol(const int &col) const | BIAS::Matrix< double > |
GetCols() const | BIAS::Matrix< double > | [inline]
GetData() const | BIAS::Matrix< double > | [inline]
GetDataArray() const | BIAS::Matrix< double > | [inline]
GetDataArray1() const | BIAS::Matrix< double > | [inline]
GetDataLast() const | BIAS::Matrix< double > | [inline]
GetEuclidean() const | BIAS::HomgPoint3DCov |
GetMax() const | BIAS::Matrix< double > |
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > |
GetMean() const | BIAS::Matrix< double > |
GetMin() const | BIAS::Matrix< double > |
GetNumElements() const | BIAS::Matrix< double > | [inline]
GetRow(const int &row) const | BIAS::Matrix< double > |
GetRows() const | BIAS::Matrix< double > | [inline]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
HomgPoint3DCov() | BIAS::HomgPoint3DCov |
HomgPoint3DCov(const MatrixInitType &i) | BIAS::HomgPoint3DCov |
HomgPoint3DCov(const Matrix4x4< double > &m) | BIAS::HomgPoint3DCov |
HomgPoint3DCov(const Matrix< double > &m) | BIAS::HomgPoint3DCov |
HomgPoint3DCov(const TNT::Matrix< double > &m) | BIAS::HomgPoint3DCov |
Homogenize(HomgPoint3D &p) | BIAS::HomgPoint3DCov |
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsHomogenized() const | BIAS::HomgPoint3DCov | [inline]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > |
IsZero() const | BIAS::HomgPoint3DCov | [inline]
BIAS::Matrix4x4< double >::IsZero(double eps=0.0) const | BIAS::Matrix< double > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< double > |
m_ | TNT::Matrix< T > | [protected]
MakeSymmetric_() | BIAS::HomgPoint3DCov | [inline, protected]
Matrix() | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix4x4() | BIAS::Matrix4x4< double > | [inline]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< double > | [explicit]
Matrix4x4(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15) | BIAS::Matrix4x4< double > |
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< double > | [inline, explicit]
Matrix4x4(const Matrix4x4< double > &A) | BIAS::Matrix4x4< double > | [inline]
Matrix4x4(const Matrix< double > &arg) | BIAS::Matrix4x4< double > |
Matrix4x4(const TNT::Matrix< double > &A) | BIAS::Matrix4x4< double > |
Matrix4x4(const Matrix3x3< double > &R, const Vector3< double > &trans) | BIAS::Matrix4x4< double > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< double > &argvec, Vector4< double > &destvec) const | BIAS::Matrix4x4< double > | [inline]
Mult(const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const | BIAS::Matrix4x4< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< double > |
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< double > |
NormalizeCols() | BIAS::Matrix< double > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > |
NormalizeRows() | BIAS::Matrix< double > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > |
NormFrobenius() const | BIAS::Matrix< double > | [inline]
NormL1() const | BIAS::Matrix< double > | [inline]
NormL2() const | BIAS::Matrix< double > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< double > &mat) | BIAS::Matrix4x4< double > |
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< double > |
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > |
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetEuclidean(const Matrix3x3< double > &m) | BIAS::HomgPoint3DCov |
SetIdentity() | BIAS::Matrix4x4< double > | [inline]
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > |
SetZero() | BIAS::Matrix< double > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline]
Trace() const | BIAS::Matrix< double > | [inline]
Transpose() const | BIAS::Matrix< double > | [inline]
TransposeIP() | BIAS::Matrix4x4< double > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~HomgPoint3DCov() | BIAS::HomgPoint3DCov | [virtual]
~Matrix() | BIAS::Matrix< double > | [virtual]
~Matrix4x4() | BIAS::Matrix4x4< double > | [virtual]

Generated on Wed Jun 21 19:07:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::HomographyMapping< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::HomographyMapping< InputStorageType, OutputStorageType >, including all inherited members.

aliasing_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
alphaImg_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline]
BuildPyramid_(const Image< InputStorageType > &source, bool forceInit=true) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalcCoordOffset_(const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ChangeImgSize_(Image< OutputStorageType > &, const Image< InputStorageType > &) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ClipValue_(const double &value, OutputStorageType &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipValue_(const double &value, float &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetBoundingBox(unsigned int srcwidth, unsigned int srcheight, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [virtual]
GetChangedHomography() const | BIAS::HomographyMapping< InputStorageType, OutputStorageType > |
GetImageValue_(const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
H_ | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [protected]
height_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
HomographyMapping() | BIAS::HomographyMapping< InputStorageType, OutputStorageType > |
HomographyMapping(const HomographyMapping &src) | BIAS::HomographyMapping< InputStorageType, OutputStorageType > |
interpolationType_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
Map(const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
Map(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
MapBi_(const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapTri_(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetX_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetY_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
operator=(const HomographyMapping &src) | BIAS::HomographyMapping< InputStorageType, OutputStorageType > |
pyramid_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
rangeChecked_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ROI_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
RotateToGrey(Image< InputStorageType > &src, Image< OutputStorageType > &sink, float PhiX, float PhiY, float PhiZ, const Matrix3x3< double > &K) | BIAS::HomographyMapping< InputStorageType, OutputStorageType > |
SetHomography(const HMatrix &H) | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [inline]
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
UpdatePyramidSize(const Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [virtual]
width_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
~HomographyMapping() | BIAS::HomographyMapping< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:07:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ICECallbackInterface Member List

This is the complete list of members for BIAS::ICECallbackInterface, including all inherited members.

ICECallbackInterface() | BIAS::ICECallbackInterface |
RectangleSelected(int tl[2], int br[2]) | BIAS::ICECallbackInterface | [virtual]
~ICECallbackInterface() | BIAS::ICECallbackInterface | [virtual]

Generated on Wed Jun 21 19:07:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Image3DData Member List

This is the complete list of members for BIAS::Image3DData, including all inherited members.

Image3DData() | BIAS::Image3DData | [inline]
Image3DData(const Image3DData &d) | BIAS::Image3DData | [inline]
ImageData | BIAS::Image3DData |
LL | BIAS::Image3DData |
LR | BIAS::Image3DData |
name | BIAS::Image3DData |
UL | BIAS::Image3DData |
UR | BIAS::Image3DData |

Generated on Wed Jun 21 19:07:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Image< StorageType > Member List

This is the complete list of members for BIAS::Image< StorageType >, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_MetaData | BIAS::ImageBase | [protected]
_UID | BIAS::ImageBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AboveThresholdToValue(StorageType Threshold, StorageType Value) | BIAS::Image< StorageType > |
AbsDiff(const Image< StorageType > &im1, const Image< StorageType > &im2) | BIAS::Image< StorageType > |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AppendChannel(Image< StorageType > &img) | BIAS::Image< StorageType > |
BelowThresholdToValue(StorageType Threshold, StorageType Value) | BIAS::Image< StorageType > |
BicubicInterpolation(const double &x, const double &y, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
BilinearInterpolation(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
BilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationGreyMinVal(const double x, const double y, const StorageType &minVal) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationRGBInterleaved(const double x, const double y, unsigned int channel) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationRGBPlanar(const double x, const double y, unsigned int channel) const | BIAS::Image< StorageType > | [inline]
BilinearInterpolationShiftRegion(const double &x, const double &y, unsigned int hws_x, unsigned int hws_y, unsigned char *Buffer) | BIAS::Image< StorageType > | [inline]
Binarize(StorageType Threshold) | BIAS::Image< StorageType > |
BinaryThreshold(StorageType Threshold, StorageType MinValue, StorageType MaxValue) | BIAS::Image< StorageType > |
BitDepth_ | BIAS::ImageBase | [protected]
CalcScaleShift(double Min, double Max, double &Scale, double &Shift) const | BIAS::Image< StorageType > |
ChannelCount_ | BIAS::ImageBase | [protected]
Clear(const StorageType value=0) | BIAS::Image< StorageType > | [inline]
ClearDataPointer() | BIAS::ImageBase | [inline]
CM_Bayer_BGGR enum value | BIAS::ImageBase |
CM_Bayer_GBRG enum value | BIAS::ImageBase |
CM_Bayer_GRBG enum value | BIAS::ImageBase |
CM_Bayer_RGGB enum value | BIAS::ImageBase |
CM_BGR enum value | BIAS::ImageBase |
CM_BGRA enum value | BIAS::ImageBase |
CM_DV enum value | BIAS::ImageBase |
CM_Grey enum value | BIAS::ImageBase |
CM_GreyA enum value | BIAS::ImageBase |
CM_HSI_OBS enum value | BIAS::ImageBase |
CM_HSL enum value | BIAS::ImageBase |
CM_hsL enum value | BIAS::ImageBase |
CM_HSV enum value | BIAS::ImageBase |
CM_invalid enum value | BIAS::ImageBase |
CM_RGB enum value | BIAS::ImageBase |
CM_RGBA enum value | BIAS::ImageBase |
CM_RGBE enum value | BIAS::ImageBase |
CM_SymTensor2x2 enum value | BIAS::ImageBase |
CM_UYVY422 enum value | BIAS::ImageBase |
CM_YUV411 enum value | BIAS::ImageBase |
CM_YUV420P enum value | BIAS::ImageBase |
CM_YUV444 enum value | BIAS::ImageBase |
CM_YUYV422 enum value | BIAS::ImageBase |
ColorModel_ | BIAS::ImageBase | [protected]
CopyIn_NoInit(void *data) | BIAS::ImageBase |
Cut2ROI() | BIAS::ImageBase |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Depth_ | BIAS::ImageBase | [protected]
DimensionMatch(const BIAS::ImageBase &other) const | BIAS::ImageBase |
Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display(const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display() | BIAS::ImageBase |
EColorModel enum name | BIAS::ImageBase |
EStorageType enum name | BIAS::ImageBase |
FastBilinearInterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
FillImageWithConstValue(StorageType Value) | BIAS::Image< StorageType > |
FillImageWithConstValue(StorageType Value[]) | BIAS::Image< StorageType > |
FillImageWithXValue() | BIAS::Image< StorageType > |
Flip() | BIAS::ImageBase |
FlipHorizontal() | BIAS::ImageBase |
GetBitDepth() const | BIAS::ImageBase | [inline]
GetChannel(ImageBase &source, unsigned int channel) | BIAS::ImageBase |
GetChannelcount(const enum BIAS::ImageBase::EColorModel &colormodel) | BIAS::ImageBase | [static]
GetChannelCount() const | BIAS::ImageBase | [inline]
GetColorModel() const | BIAS::ImageBase | [inline]
GetCopyOfROI(ImageBase &copy) const | BIAS::ImageBase |
GetCopyOfROI2(ImageBase &copy) const | BIAS::ImageBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDepth() const | BIAS::ImageBase | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::ImageBase | [inline]
GetImageData() const | BIAS::Image< StorageType > | [inline]
BIAS::ImageBase::GetImageData() | BIAS::ImageBase | [inline]
GetImageDataArray() const | BIAS::Image< StorageType > | [inline]
GetMaxPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetMeanPixelValue(StorageType mean[]) | BIAS::Image< StorageType > |
GetMetaData() | BIAS::ImageBase | [inline]
GetMinMaxPixelValue(StorageType &min, StorageType &max, unsigned short int channel=0, unsigned int *mincoo=NULL, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetMinMaxPixelValueIgnoreRange(StorageType &min, StorageType &max, const StorageType ignoreStart=0, const StorageType ignoreEnd=0, const unsigned short int channel=0) const | BIAS::Image< StorageType > |
GetMinPixelValue(unsigned short int channel=0, unsigned int *coo=NULL) const | BIAS::Image< StorageType > |
GetPixelCount() const | BIAS::ImageBase | [inline]
GetPixelNearestNeighbor(const double x, const double y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
GetPixelNearestNeighbor(const float x, const float y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
GetPixelPosition(unsigned int x, unsigned int y, unsigned short int channel=0) const | BIAS::ImageBase | [inline]
GetROI() | BIAS::ImageBase | [inline]
GetROI() const | BIAS::ImageBase | [inline]
GetROI(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROI(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROILowerRightX() const | BIAS::ImageBase |
GetROILowerRightY() const | BIAS::ImageBase |
GetROIUpperLeftX() const | BIAS::ImageBase |
GetROIUpperLeftY() const | BIAS::ImageBase |
GetSize() const | BIAS::ImageBase | [inline]
GetSize(const enum BIAS::ImageBase::EStorageType &storagetype) | BIAS::ImageBase | [static]
GetStorageType() const | BIAS::ImageBase | [inline]
GetUID() const | BIAS::ImageBase | [inline]
GetVersionNumber() const | BIAS::ImageBase | [inline]
GetWidth() const | BIAS::ImageBase | [inline]
GetWidthStep() const | BIAS::ImageBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::ImageBase | [protected]
Image() | BIAS::Image< StorageType > |
Image(unsigned int width, unsigned int height, unsigned int channels=1, const bool interleaved=true) | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > | [explicit]
Image() | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > |
Image(unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved) | BIAS::Image< StorageType > |
Image() | BIAS::Image< StorageType > |
Image(const ImageBase &im) | BIAS::Image< StorageType > |
Image(unsigned int Width, unsigned int Height, unsigned int Channels, bool interleaved) | BIAS::Image< StorageType > |
ImageBase() | BIAS::ImageBase |
ImageBase(const ImageBase &im) | BIAS::ImageBase |
ImageBase(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
ImageData_ | BIAS::ImageBase | [protected]
ImageDataArray_ | BIAS::ImageBase | [protected]
Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::Image< StorageType > |
BIAS::ImageBase::Init(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
InitWithForeignData(unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true) | BIAS::Image< StorageType > |
InterleavedDataOrder_ | BIAS::ImageBase | [protected]
InterpolationGrey(const double x, const double y) const | BIAS::Image< StorageType > | [inline]
InvalidateUID() | BIAS::ImageBase | [inline]
IsEmpty() const | BIAS::ImageBase | [inline]
IsInROI(double &x, double &y) const | BIAS::ImageBase | [inline]
IsInterleaved() const | BIAS::ImageBase | [inline]
IsPlanar() const | BIAS::ImageBase | [inline]
IsPositionInImage(const int &x, const int &y) const | BIAS::ImageBase | [inline]
IsPowerOfTwoSize() const | BIAS::ImageBase |
IsPowerOfTwoSize(const unsigned int w, const unsigned int h) | BIAS::ImageBase | [static]
LinearInterpolation(const unsigned int x, const double y) const | BIAS::Image< StorageType > | [inline]
LinearInterpolation(const double x, const unsigned int y) const | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MaxSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MinSTValue() | BIAS::Image< StorageType > | [inline]
MoveToClosestPositionInImage(int &x, int &y) const | BIAS::ImageBase | [inline]
operator *(const StorageType &argimage) | BIAS::Image< StorageType > |
operator *(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator *=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator *=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator+(const StorageType &argimage) | BIAS::Image< StorageType > |
operator+(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator+=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator+=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator-(const StorageType &argimage) | BIAS::Image< StorageType > |
operator-(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator-=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator-=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator/(const StorageType &argimage) | BIAS::Image< StorageType > |
operator/(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator/=(const StorageType &argimage) | BIAS::Image< StorageType > |
operator/=(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator<<(std::ostream &os, const ImageBase &img) | BIAS::ImageBase | [friend]
operator=(const ImageBase &Source) | BIAS::Image< StorageType > |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const ImageBase &img) | BIAS::ImageBase | [inline]
operator>>(std::istream &is, ImageBase &img) | BIAS::ImageBase | [friend]
operator|(const Image< StorageType > &argimage) | BIAS::Image< StorageType > |
operator|(const Image< short int > &argimage) | BIAS::Image< StorageType > |
Pad(BIAS::ImageBase &dest, const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) const | BIAS::ImageBase |
Pad(const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwo(BIAS::ImageBase &dest, const int &padVal=0) const | BIAS::ImageBase |
PadToPowerOfTwo(const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwoAndFlip(const int &padVal=0) | BIAS::ImageBase |
Paste2ROI(const ImageBase &Image) | BIAS::ImageBase |
PixelValue(const unsigned int x, const unsigned int y, const unsigned short int channel=0) const | BIAS::Image< StorageType > | [inline]
PixelValueBase(unsigned x, unsigned y, unsigned channel=0) | BIAS::ImageBase |
PixelValueInterleaved(const int x, const int y, const int channel=0) const | BIAS::Image< StorageType > | [inline]
PowerOfTwoSize(const unsigned int &val) | BIAS::ImageBase | [static]
PowerOfTwoSize(unsigned int &width2, unsigned int &height2) const | BIAS::ImageBase |
PrintData(std::ostream &os) const | BIAS::Image< StorageType > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintHeader(std::ostream &os=std::cout) const | BIAS::ImageBase |
PrintPointer(std::ostream &os) const | BIAS::Image< StorageType > |
PrintROI(std::ostream &os=std::cout) const | BIAS::ImageBase |
Reciprocal(const float factor=1.0, const unsigned short int channel=0) | BIAS::Image< StorageType > |
RedirectImageDataPointer(void *data) | BIAS::ImageBase | [inline]
Release() | BIAS::Image< StorageType > |
ReleaseImageDataPointer() | BIAS::ImageBase | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Roi_ | BIAS::ImageBase | [protected]
SamePixelAndChannelCount(const ImageBase &Image) const | BIAS::ImageBase | [inline]
ScaleShift(double Scale, double Shift) | BIAS::Image< StorageType > |
ScaleShiftBetween(double Min, double Max) | BIAS::Image< StorageType > |
SetBitDepth(unsigned bitdepth) | BIAS::ImageBase | [inline]
SetColorModel(EColorModel Model) | BIAS::ImageBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetInterleaved(bool interleaved) | BIAS::ImageBase | [inline]
SetMetaData(const MetaData &m) | BIAS::ImageBase | [inline]
SetOutsideROIZero() | BIAS::ImageBase |
SetPixel(const StorageType &value, const unsigned int &x, const unsigned int &y, const unsigned short int channel=0) | BIAS::Image< StorageType > | [inline]
SetPixel(const StorageType &value0, const StorageType &value1, const StorageType &value2, const unsigned int &x, const unsigned int &y) | BIAS::Image< StorageType > | [inline]
SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetUID(const BIAS::UUID &id) | BIAS::ImageBase | [inline]
SetZero() | BIAS::ImageBase | [inline]
ST_char enum value | BIAS::ImageBase |
ST_double enum value | BIAS::ImageBase |
ST_float enum value | BIAS::ImageBase |
ST_int enum value | BIAS::ImageBase |
ST_invalid enum value | BIAS::ImageBase |
ST_shortint enum value | BIAS::ImageBase |
ST_unsignedchar enum value | BIAS::ImageBase |
ST_unsignedint enum value | BIAS::ImageBase |
ST_unsignedshortint enum value | BIAS::ImageBase |
StealImage(ImageBase &source) | BIAS::ImageBase |
StorageType_ | BIAS::ImageBase | [protected]
UnsetROI() | BIAS::ImageBase |
UpdateImageDataArrayFromImageData_() | BIAS::ImageBase | [protected]
Version_ | BIAS::ImageBase | [protected, static]
Width_ | BIAS::ImageBase | [protected]
WidthStep_ | BIAS::ImageBase | [protected]
ZeroPad(const unsigned int newwidth, const unsigned int newheight, unsigned char bgcolor=0) | BIAS::ImageBase |
~Debug() | BIAS::Debug | [inline]
~Image() | BIAS::Image< StorageType > | [virtual]
~ImageBase() | BIAS::ImageBase | [virtual]

Generated on Wed Jun 21 19:07:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageAttributes Member List

This is the complete list of members for BIAS::ImageAttributes, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFieldOfViewDegree(double &x, double &y) | BIAS::ImageAttributes |
GetFocalLengthMeter(double &fm) | BIAS::ImageAttributes |
GetFocalLengthXPixel(double &fp) | BIAS::ImageAttributes |
GetFocalLengthYPixel(double &fp) | BIAS::ImageAttributes |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHardwareName(std::string &Make, std::string &Model) | BIAS::ImageAttributes |
GetImageDimensions(int &width, int &height) | BIAS::ImageAttributes |
GetPixelSizeXMeter(double &p) | BIAS::ImageAttributes |
GetPixelSizeYMeter(double &p) | BIAS::ImageAttributes |
GetPrincipalPoint(double &x, double &y) | BIAS::ImageAttributes |
GetRational_(const std::string &key, double &value) | BIAS::ImageAttributes | [protected]
GetShort_(const std::string &key, int &value) | BIAS::ImageAttributes | [protected]
GetString_(const std::string &key, std::string &value) | BIAS::ImageAttributes | [protected]
GlobalDebugLevel | BIAS::Debug | [protected, static]
ImageAttributes() | BIAS::ImageAttributes | [inline]
InitExifTags() | BIAS::ImageAttributes |
mapValidTags_ | BIAS::ImageAttributes | [private]
operator=(const Debug &d) | BIAS::Debug | [inline]
Print(std::ostream &os=std::cout, const bool printAll=false) const | BIAS::ImageAttributes |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Read(const std::string &filename) | BIAS::ImageAttributes |
ReadMagickPP(const std::string &filename) | BIAS::ImageAttributes |
ReadMagickPP(Magick::Image &img) | BIAS::ImageAttributes |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~ImageAttributes() | BIAS::ImageAttributes | [inline]

Generated on Wed Jun 21 19:07:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageBase Member List

This is the complete list of members for BIAS::ImageBase, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_MetaData | BIAS::ImageBase | [protected]
_UID | BIAS::ImageBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
BitDepth_ | BIAS::ImageBase | [protected]
ChannelCount_ | BIAS::ImageBase | [protected]
ClearDataPointer() | BIAS::ImageBase | [inline]
CM_Bayer_BGGR enum value | BIAS::ImageBase |
CM_Bayer_GBRG enum value | BIAS::ImageBase |
CM_Bayer_GRBG enum value | BIAS::ImageBase |
CM_Bayer_RGGB enum value | BIAS::ImageBase |
CM_BGR enum value | BIAS::ImageBase |
CM_BGRA enum value | BIAS::ImageBase |
CM_DV enum value | BIAS::ImageBase |
CM_Grey enum value | BIAS::ImageBase |
CM_GreyA enum value | BIAS::ImageBase |
CM_HSI_OBS enum value | BIAS::ImageBase |
CM_HSL enum value | BIAS::ImageBase |
CM_hsL enum value | BIAS::ImageBase |
CM_HSV enum value | BIAS::ImageBase |
CM_invalid enum value | BIAS::ImageBase |
CM_RGB enum value | BIAS::ImageBase |
CM_RGBA enum value | BIAS::ImageBase |
CM_RGBE enum value | BIAS::ImageBase |
CM_SymTensor2x2 enum value | BIAS::ImageBase |
CM_UYVY422 enum value | BIAS::ImageBase |
CM_YUV411 enum value | BIAS::ImageBase |
CM_YUV420P enum value | BIAS::ImageBase |
CM_YUV444 enum value | BIAS::ImageBase |
CM_YUYV422 enum value | BIAS::ImageBase |
ColorModel_ | BIAS::ImageBase | [protected]
CopyIn_NoInit(void *data) | BIAS::ImageBase |
Cut2ROI() | BIAS::ImageBase |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Depth_ | BIAS::ImageBase | [protected]
DimensionMatch(const BIAS::ImageBase &other) const | BIAS::ImageBase |
Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display(const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale) | BIAS::ImageBase |
Display() | BIAS::ImageBase |
EColorModel enum name | BIAS::ImageBase |
EStorageType enum name | BIAS::ImageBase |
Flip() | BIAS::ImageBase |
FlipHorizontal() | BIAS::ImageBase |
GetBitDepth() const | BIAS::ImageBase | [inline]
GetChannel(ImageBase &source, unsigned int channel) | BIAS::ImageBase |
GetChannelCount() const | BIAS::ImageBase | [inline]
GetChannelcount(const enum BIAS::ImageBase::EColorModel &colormodel) | BIAS::ImageBase | [static]
GetColorModel() const | BIAS::ImageBase | [inline]
GetCopyOfROI(ImageBase &copy) const | BIAS::ImageBase |
GetCopyOfROI2(ImageBase &copy) const | BIAS::ImageBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDepth() const | BIAS::ImageBase | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::ImageBase | [inline]
GetImageData() const | BIAS::ImageBase | [inline]
GetImageData() | BIAS::ImageBase | [inline]
GetImageDataArray() const | BIAS::ImageBase | [inline]
GetMetaData() | BIAS::ImageBase | [inline]
GetPixelCount() const | BIAS::ImageBase | [inline]
GetPixelPosition(unsigned int x, unsigned int y, unsigned short int channel=0) const | BIAS::ImageBase | [inline]
GetROI() | BIAS::ImageBase | [inline]
GetROI() const | BIAS::ImageBase | [inline]
GetROI(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROI(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(unsigned int &UpperLeftX, unsigned int &UpperLeftY, unsigned int &LowerRightX, unsigned int &LowerRightY) const | BIAS::ImageBase |
GetROICorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ImageBase |
GetROILowerRightX() const | BIAS::ImageBase |
GetROILowerRightY() const | BIAS::ImageBase |
GetROIUpperLeftX() const | BIAS::ImageBase |
GetROIUpperLeftY() const | BIAS::ImageBase |
GetSize() const | BIAS::ImageBase | [inline]
GetSize(const enum BIAS::ImageBase::EStorageType &storagetype) | BIAS::ImageBase | [static]
GetStorageType() const | BIAS::ImageBase | [inline]
GetUID() const | BIAS::ImageBase | [inline]
GetVersionNumber() const | BIAS::ImageBase | [inline]
GetWidth() const | BIAS::ImageBase | [inline]
GetWidthStep() const | BIAS::ImageBase | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Height_ | BIAS::ImageBase | [protected]
ImageBase() | BIAS::ImageBase |
ImageBase(const ImageBase &im) | BIAS::ImageBase |
ImageBase(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
ImageConvert class | BIAS::ImageBase | [friend]
ImageData_ | BIAS::ImageBase | [protected]
ImageDataArray_ | BIAS::ImageBase | [protected]
ImageIO class | BIAS::ImageBase | [friend]
Init(unsigned int width, unsigned int height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true) | BIAS::ImageBase |
InterleavedDataOrder_ | BIAS::ImageBase | [protected]
InvalidateUID() | BIAS::ImageBase | [inline]
IsEmpty() const | BIAS::ImageBase | [inline]
IsInROI(double &x, double &y) const | BIAS::ImageBase | [inline]
IsInterleaved() const | BIAS::ImageBase | [inline]
IsPlanar() const | BIAS::ImageBase | [inline]
IsPositionInImage(const int &x, const int &y) const | BIAS::ImageBase | [inline]
IsPowerOfTwoSize() const | BIAS::ImageBase |
IsPowerOfTwoSize(const unsigned int w, const unsigned int h) | BIAS::ImageBase | [static]
MoveToClosestPositionInImage(int &x, int &y) const | BIAS::ImageBase | [inline]
operator<<(std::ostream &os, const ImageBase &img) | BIAS::ImageBase | [friend]
operator=(const ImageBase &Source) | BIAS::ImageBase |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const ImageBase &img) | BIAS::ImageBase | [inline]
operator>>(std::istream &is, ImageBase &img) | BIAS::ImageBase | [friend]
Pad(BIAS::ImageBase &dest, const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) const | BIAS::ImageBase |
Pad(const unsigned int &newwidth, const unsigned int &newheight, const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwo(BIAS::ImageBase &dest, const int &padVal=0) const | BIAS::ImageBase |
PadToPowerOfTwo(const int &padVal=0) | BIAS::ImageBase |
PadToPowerOfTwoAndFlip(const int &padVal=0) | BIAS::ImageBase |
Paste2ROI(const ImageBase &Image) | BIAS::ImageBase |
PixelValueBase(unsigned x, unsigned y, unsigned channel=0) | BIAS::ImageBase |
PowerOfTwoSize(const unsigned int &val) | BIAS::ImageBase | [static]
PowerOfTwoSize(unsigned int &width2, unsigned int &height2) const | BIAS::ImageBase |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintHeader(std::ostream &os=std::cout) const | BIAS::ImageBase |
PrintROI(std::ostream &os=std::cout) const | BIAS::ImageBase |
RedirectImageDataPointer(void *data) | BIAS::ImageBase | [inline]
Release() | BIAS::ImageBase |
ReleaseImageDataPointer() | BIAS::ImageBase | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Roi_ | BIAS::ImageBase | [protected]
SamePixelAndChannelCount(const ImageBase &Image) const | BIAS::ImageBase | [inline]
SetBitDepth(unsigned bitdepth) | BIAS::ImageBase | [inline]
SetColorModel(EColorModel Model) | BIAS::ImageBase | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetInterleaved(bool interleaved) | BIAS::ImageBase | [inline]
SetMetaData(const MetaData &m) | BIAS::ImageBase | [inline]
SetOutsideROIZero() | BIAS::ImageBase |
SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY, unsigned int LowerRightX, unsigned int LowerRightY) | BIAS::ImageBase |
SetUID(const BIAS::UUID &id) | BIAS::ImageBase | [inline]
SetZero() | BIAS::ImageBase | [inline]
ST_char enum value | BIAS::ImageBase |
ST_double enum value | BIAS::ImageBase |
ST_float enum value | BIAS::ImageBase |
ST_int enum value | BIAS::ImageBase |
ST_invalid enum value | BIAS::ImageBase |
ST_shortint enum value | BIAS::ImageBase |
ST_unsignedchar enum value | BIAS::ImageBase |
ST_unsignedint enum value | BIAS::ImageBase |
ST_unsignedshortint enum value | BIAS::ImageBase |
StealImage(ImageBase &source) | BIAS::ImageBase |
StorageType_ | BIAS::ImageBase | [protected]
UnsetROI() | BIAS::ImageBase |
UpdateImageDataArrayFromImageData_() | BIAS::ImageBase | [protected]
Version_ | BIAS::ImageBase | [protected, static]
Width_ | BIAS::ImageBase | [protected]
WidthStep_ | BIAS::ImageBase | [protected]
WrapBias2Ipl class | BIAS::ImageBase | [friend]
ZeroPad(const unsigned int newwidth, const unsigned int newheight, unsigned char bgcolor=0) | BIAS::ImageBase |
~Debug() | BIAS::Debug | [inline]
~ImageBase() | BIAS::ImageBase | [virtual]

Generated on Wed Jun 21 19:08:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageCanvas Member List

This is the complete list of members for BIAS::ImageCanvas, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Bitmap_ | BIAS::ImageCanvas | [protected]
ClearDrawingContext_ | BIAS::ImageCanvas | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultZoom_ | BIAS::ImageCanvas | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMousePos(int &x, int &y) | BIAS::ImageCanvas |
GetOrigImage() | BIAS::ImageCanvas | [inline]
GetShowScaled() | BIAS::ImageCanvas | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ImageCanvas | [protected]
ImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL &wxTRANSPARENT, const wxString &name=wxT("ScrolledWindow")) | BIAS::ImageCanvas |
ImageName_ | BIAS::ImageCanvas | [protected]
mousex_ | BIAS::ImageCanvas | [protected]
mousey_ | BIAS::ImageCanvas | [protected]
MyZoomWin_ | BIAS::ImageCanvas | [protected]
OnErase(wxEraseEvent &event) | BIAS::ImageCanvas | [protected]
OnMouseLeave(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnMouseMove(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnPaint(wxPaintEvent &event) | BIAS::ImageCanvas | [protected]
OnRightMouseButton(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnSize(wxSizeEvent &event) | BIAS::ImageCanvas | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
origim_ | BIAS::ImageCanvas | [protected]
origim_mutex_ | BIAS::ImageCanvas | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
rgbim_ | BIAS::ImageCanvas | [protected]
SBar_ | BIAS::ImageCanvas | [protected]
SBarID_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeX_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeY_ | BIAS::ImageCanvas | [protected]
SetClearDrawingContext(bool clear) | BIAS::ImageCanvas | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultZoom(unsigned z) | BIAS::ImageCanvas | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetScaledImageSize(int width, int height) | BIAS::ImageCanvas | [inline]
SetShowScaled(bool on) | BIAS::ImageCanvas | [inline]
SetZoomed(bool s) | BIAS::ImageCanvas | [inline]
Show(BIAS::Image< unsigned char > &im, std::string name) | BIAS::ImageCanvas |
Show(BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name) | BIAS::ImageCanvas |
Show(BIAS::PyramidImage< unsigned char > &pim, std::string name) | BIAS::ImageCanvas |
Show(bool show=true) | BIAS::ImageCanvas | [inline, virtual]
ShowScaled_ | BIAS::ImageCanvas | [protected]
Title_ | BIAS::ImageCanvas | [protected]
UpdateStatusBar(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
width_ | BIAS::ImageCanvas | [protected]
wxbitmap_mutex_ | BIAS::ImageCanvas | [protected]
wximage_ | BIAS::ImageCanvas | [protected]
Zoom(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
Zoomed_ | BIAS::ImageCanvas | [protected]
~Debug() | BIAS::Debug | [inline]
~ImageCanvas() | BIAS::ImageCanvas |

Generated on Wed Jun 21 19:08:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageCanvasEnhanced Member List

This is the complete list of members for BIAS::ImageCanvasEnhanced, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Bitmap_ | BIAS::ImageCanvas | [protected]
BottomRight_ | BIAS::ImageCanvasEnhanced | [protected]
CallbackObj_ | BIAS::ImageCanvasEnhanced | [protected]
ClearDrawingContext_ | BIAS::ImageCanvas | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultZoom_ | BIAS::ImageCanvas | [protected]
DrawRectangle_(int tl[2], int br[2]) | BIAS::ImageCanvasEnhanced | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMousePos(int &x, int &y) | BIAS::ImageCanvas |
GetOrigImage() | BIAS::ImageCanvas | [inline]
GetShowScaled() | BIAS::ImageCanvas | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ImageCanvas | [protected]
ImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL &wxTRANSPARENT, const wxString &name=wxT("ScrolledWindow")) | BIAS::ImageCanvas |
ImageCanvasEnhanced(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL, const wxString &name=AsciiToWx("ScrolledWindow")) | BIAS::ImageCanvasEnhanced |
ImageName_ | BIAS::ImageCanvas | [protected]
mousex_ | BIAS::ImageCanvas | [protected]
mousey_ | BIAS::ImageCanvas | [protected]
MyZoomWin_ | BIAS::ImageCanvas | [protected]
NumLeftClicks_ | BIAS::ImageCanvasEnhanced | [protected]
OnErase(wxEraseEvent &event) | BIAS::ImageCanvas | [protected]
OnLeftMouseButton(wxMouseEvent &event) | BIAS::ImageCanvasEnhanced |
OnMouseLeave(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnMouseMove(wxMouseEvent &event) | BIAS::ImageCanvasEnhanced |
OnPaint(wxPaintEvent &event) | BIAS::ImageCanvasEnhanced |
OnRightMouseButton(wxMouseEvent &event) | BIAS::ImageCanvasEnhanced |
OnSize(wxSizeEvent &event) | BIAS::ImageCanvas | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
origim_ | BIAS::ImageCanvas | [protected]
origim_mutex_ | BIAS::ImageCanvas | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RefreshDrawIm_() | BIAS::ImageCanvasEnhanced | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
rgbim_ | BIAS::ImageCanvas | [protected]
SBar_ | BIAS::ImageCanvas | [protected]
SBarID_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeX_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeY_ | BIAS::ImageCanvas | [protected]
SelectRectangle(ICECallbackInterface &obj) | BIAS::ImageCanvasEnhanced |
SelectRectangle_ | BIAS::ImageCanvasEnhanced | [protected]
SetClearDrawingContext(bool clear) | BIAS::ImageCanvas | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultZoom(unsigned z) | BIAS::ImageCanvas | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetScaledImageSize(int width, int height) | BIAS::ImageCanvas | [inline]
SetShowScaled(bool on) | BIAS::ImageCanvas | [inline]
SetZoomed(bool s) | BIAS::ImageCanvas | [inline]
Show(BIAS::Image< unsigned char > &im, std::string name) | BIAS::ImageCanvas |
Show(BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name) | BIAS::ImageCanvas |
Show(BIAS::PyramidImage< unsigned char > &pim, std::string name) | BIAS::ImageCanvas |
Show(bool show=true) | BIAS::ImageCanvas | [inline, virtual]
ShowScaled_ | BIAS::ImageCanvas | [protected]
Title_ | BIAS::ImageCanvas | [protected]
TopLeft_ | BIAS::ImageCanvasEnhanced | [protected]
UpdateStatusBar(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
width_ | BIAS::ImageCanvas | [protected]
wxbitmap_mutex_ | BIAS::ImageCanvas | [protected]
wximage_ | BIAS::ImageCanvas | [protected]
Zoom(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
Zoomed_ | BIAS::ImageCanvas | [protected]
~Debug() | BIAS::Debug | [inline]
~ImageCanvas() | BIAS::ImageCanvas |
~ImageCanvasEnhanced() | BIAS::ImageCanvasEnhanced |

Generated on Wed Jun 21 19:08:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageCanvasGLBase Member List

This is the complete list of members for BIAS::ImageCanvasGLBase, including all inherited members.

_polygonmodeGL | BIAS::OpenGLCanvas | [protected]
animationUpdateEnabled | BIAS::OpenGLCanvasBase | [static]
Display() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCalls() | BIAS::ImageCanvasGLBase | [virtual]
DisplayCameraView() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewExternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewInternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayClear() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::OpenGLCanvasBase |
DisplayRenderMode() | BIAS::OpenGLCanvasBase | [virtual]
DisplaySampleScene() | BIAS::OpenGLCanvasBase | [static]
DisplaySelectBuffer() | BIAS::OpenGLCanvasBase |
EnableMipMapping(const bool &avoidAliasingByMipmapping=true) | BIAS::ImageCanvasGLBase |
framecount_ | BIAS::OpenGLCanvasBase | [protected]
GetAspectRatio() const | BIAS::OpenGLCanvasBase |
GetFrameCount() const | BIAS::OpenGLCanvasBase | [inline]
GetHeight() const | BIAS::OpenGLCanvasBase |
GetInfoGL(std::ostream &os=std::cout) | BIAS::OpenGLCanvas | [virtual]
GetOwnerframe() | BIAS::OpenGLCanvasBase |
GetPixelValueDepth(const wxPoint &pos2d) const | BIAS::OpenGLCanvasBase |
GetPixelValueRGB(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetPixelValueRGBA(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetTexId() const | BIAS::ImageCanvasGLBase |
GetTexobj() const | BIAS::ImageCanvasGLBase | [inline]
GetTexobj() | BIAS::ImageCanvasGLBase | [inline]
GetTexTarget() const | BIAS::ImageCanvasGLBase |
GetViewController() const | BIAS::OpenGLCanvas |
GetViewController() | BIAS::OpenGLCanvas |
GetVSync() | BIAS::OpenGLCanvasBase | [static]
GetWidth() const | BIAS::OpenGLCanvasBase |
idleRepaintEnabled | BIAS::OpenGLCanvas | [static]
ImageCanvasGLBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("ImageCanvasGLBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::ImageCanvasGLBase |
ImageCanvasGLBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("ImageCanvasGLBase"), int *attribList=0, const wxPalette &palette=wxNullPalette) | BIAS::ImageCanvasGLBase |
InitMembers() | BIAS::ImageCanvasGLBase | [virtual]
InitWithContext() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContextDone_ | BIAS::OpenGLCanvasBase | [protected]
instance_ | BIAS::OpenGLCanvasBase | [protected]
instancesTotalNo_ | BIAS::OpenGLCanvasBase | [protected, static]
InterestPoint | BIAS::ImageCanvasGLBase | [protected]
IsContextAvailable() | BIAS::OpenGLCanvasBase |
name | BIAS::ImageCanvasGLBase | [protected]
OnChar(wxKeyEvent &event) | BIAS::OpenGLCanvasBase | [virtual]
OnEraseBackground(wxEraseEvent &event) | BIAS::OpenGLCanvasBase |
OnIdle(wxIdleEvent &event) | BIAS::OpenGLCanvas |
OnMotion(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseDown(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseWheel(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnPaint(wxPaintEvent &event) | BIAS::OpenGLCanvasBase |
OnSize(wxSizeEvent &event) | BIAS::OpenGLCanvasBase |
OpenGLCanvas(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvas(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=0, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvasBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
p_font | BIAS::OpenGLCanvasBase | [protected]
p_ownerframe | BIAS::OpenGLCanvasBase | [protected]
p_viewCtrl_ | BIAS::OpenGLCanvas | [protected]
PrintHelp(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
realtimeAnimation | BIAS::OpenGLCanvas | [static]
rendermode | BIAS::OpenGLCanvasBase | [protected]
Reshape() | BIAS::OpenGLCanvas | [virtual]
scalefactor | BIAS::ImageCanvasGLBase | [protected]
ScreenShot(BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot(const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot() | BIAS::OpenGLCanvasBase |
Set(const ImgObjGL &NewTexobj, const std::string &name=std::string("ImgObjGL")) | BIAS::ImageCanvasGLBase |
Set(BIAS::ImageBase &img, const std::string &name=std::string("Image<unsigned char>"), const bool &forcePow2tex=true, const bool &flipY=true) | BIAS::ImageCanvasGLBase |
SetFrameCount(const unsigned long &newVal) | BIAS::OpenGLCanvasBase | [inline]
SetOwnerframe(wxFrame *ptr) | BIAS::OpenGLCanvasBase |
SetRECT(BIAS::ImageBase &img, const std::string &name=std::string("RECT Image<unsigned char>"), const bool &flipY=true) | BIAS::ImageCanvasGLBase |
SetStatusText(const wxString &text, const int c_field=0) | BIAS::OpenGLCanvasBase |
SetVSync(const bool &trueForOn) | BIAS::OpenGLCanvasBase | [static]
ShowFPS(const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField) | BIAS::OpenGLCanvasBase |
ShowFPS() | BIAS::OpenGLCanvasBase |
ShowValue(const wxPoint &pos) | BIAS::OpenGLCanvasBase |
StereoI_CaptureStereoImage(const int &format, const int &quality) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetConvergence() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetInfo(std::ostream &os=std::cout) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetSeparation() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetStereoState() | BIAS::OpenGLCanvasBase | [static]
StereoI_Init() | BIAS::OpenGLCanvasBase | [static]
StereoI_SetConvergence(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetSeparation(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetStereoState(const int &val) | BIAS::OpenGLCanvasBase | [static]
SwapBuffers() | BIAS::OpenGLCanvasBase |
texobj | BIAS::ImageCanvasGLBase | [protected]
time | BIAS::OpenGLCanvasBase | [static]
ToggleFullScreen() | BIAS::OpenGLCanvasBase |
ToggleIP(bool &value) | BIAS::OpenGLCanvasBase | [static]
ToggleVSync() | BIAS::OpenGLCanvasBase | [static]
Unproject(const wxPoint &pos2d, double &d) | BIAS::OpenGLCanvasBase |
UpdateTime() | BIAS::OpenGLCanvas | [virtual]
ValidTexobj(const ImgObjGL &t) const | BIAS::ImageCanvasGLBase |
~ImageCanvasGLBase() | BIAS::ImageCanvasGLBase | [virtual]
~OpenGLCanvas() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvasBase() | BIAS::OpenGLCanvasBase | [virtual]

Generated on Wed Jun 21 19:08:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageConvert Member List

This is the complete list of members for BIAS::ImageConvert, including all inherited members.

_liDebugLevel | BIAS::Debug | [private]
_zDebugStream | BIAS::Debug | [private, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, private]
BayerToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BayerToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
BayerToRGBSlow_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRAToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRAToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
BGRAToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
BGRToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BIAS2ipl(const Image< StorageType > &source, IplImage *&dest) | BIAS::ImageConvert | [static]
Convert(BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false) | BIAS::ImageConvert | [static]
ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST) | BIAS::ImageConvert | [static]
Debug() | BIAS::Debug | [inline, private]
Debug(Debug &deb) | BIAS::Debug | [inline, private]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, private]
DVDecoder_ | BIAS::ImageConvert | [protected, static]
DVToRGB_(const Image< StorageType > &source, Image< StorageType > &dest, unsigned char quality=4) | BIAS::ImageConvert | [static]
DVToRGB_(const Image< unsigned char > &source, Image< unsigned char > &dest, unsigned char quality) | BIAS::ImageConvert |
FloatToUC_(const ImageBase &source, ImageBase &dest) | BIAS::ImageConvert | [protected, static]
FromInterleaved(Image< StorageType > &source, Image< StorageType > &Image1, Image< StorageType > &Image2, Image< StorageType > &Image3) | BIAS::ImageConvert | [static]
FromInterleavedRGB_(Image< StorageType > &source, Image< StorageType > &R, Image< StorageType > &G, Image< StorageType > &B) | BIAS::ImageConvert | [protected, static]
FromInterleavedYUYV422_(Image< StorageType > &source, Image< StorageType > &Y, Image< StorageType > &U, Image< StorageType > &V) | BIAS::ImageConvert | [protected, static]
GetDebugLevel() const | BIAS::Debug | [inline, private]
GetDebugStream() | BIAS::Debug | [inline, private]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, private]
GetGlobalDebugLevel() | BIAS::Debug | [inline, private, static]
GlobalDebugLevel | BIAS::Debug | [private, static]
GreyToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
HSLToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ImageBase class | BIAS::ImageConvert | [friend]
IP_RGBToGrey_(Image< StorageType > &img) | BIAS::ImageConvert | [protected, static]
IP_ToGrey(Image< StorageType > &img) | BIAS::ImageConvert | [static]
IP_YUV422ToGrey_(Image< StorageType > &img) | BIAS::ImageConvert | [protected, static]
Ipl2BIAS(IplImage *source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
operator=(const Debug &d) | BIAS::Debug | [inline, private]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, private]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, private]
RGBAToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBTohsL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBTohsL_(Image< int > &source, Image< int > &dest) | BIAS::ImageConvert |
RGBTohsL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
RGBToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToHSL_(Image< float > &source, Image< float > &dest) | BIAS::ImageConvert |
RGBToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
RGBToHSV_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToHSV_(Image< float > &source, Image< float > &dest) | BIAS::ImageConvert |
RGBToHSV_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
SetDebugLevel(long int lv) | BIAS::Debug | [inline, private]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, private]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, private, static]
ToGrey(const ImageBase &source, ImageBase &dest) | BIAS::ImageConvert | [static]
ToGrey(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToHSL(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
TohsL(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToHSV(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleaved(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleavedRGB(Image< StorageType > &red, Image< StorageType > &green, Image< StorageType > &blue, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleavedRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToInterleavedYUYV422_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToPlanar(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToPlanarRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToPlanarYUYV422_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToRGB(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
YUV420PToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV420PToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV422ToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV422ToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
~Debug() | BIAS::Debug | [inline, private]

Generated on Wed Jun 21 19:08:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageConvertThreaded Member List

This is the complete list of members for BIAS::ImageConvertThreaded, including all inherited members.

BayerToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BayerToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
BayerToRGBSlow_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRAToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRAToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
BGRAToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BGRToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
BGRToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
BIAS2ipl(const Image< StorageType > &source, IplImage *&dest) | BIAS::ImageConvert | [static]
Convert(BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false) | BIAS::ImageConvert | [static]
ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST) | BIAS::ImageConvert | [static]
ConvertThread_(void *arg) | BIAS::ImageConvertThreaded | [protected, static]
ConvertThreaded(BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false, const int num_threads=2) | BIAS::ImageConvertThreaded | [static]
DVDecoder_ | BIAS::ImageConvert | [protected, static]
DVToRGB_(const Image< StorageType > &source, Image< StorageType > &dest, unsigned char quality=4) | BIAS::ImageConvert | [static]
DVToRGB_(const Image< unsigned char > &source, Image< unsigned char > &dest, unsigned char quality) | BIAS::ImageConvert |
FloatToUC_(const ImageBase &source, ImageBase &dest) | BIAS::ImageConvert | [protected, static]
FromInterleaved(Image< StorageType > &source, Image< StorageType > &Image1, Image< StorageType > &Image2, Image< StorageType > &Image3) | BIAS::ImageConvert | [static]
FromInterleavedRGB_(Image< StorageType > &source, Image< StorageType > &R, Image< StorageType > &G, Image< StorageType > &B) | BIAS::ImageConvert | [protected, static]
FromInterleavedYUYV422_(Image< StorageType > &source, Image< StorageType > &Y, Image< StorageType > &U, Image< StorageType > &V) | BIAS::ImageConvert | [protected, static]
GreyToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
HSLToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ImageConvertThreaded() | BIAS::ImageConvertThreaded |
IP_RGBToGrey_(Image< StorageType > &img) | BIAS::ImageConvert | [protected, static]
IP_ToGrey(Image< StorageType > &img) | BIAS::ImageConvert | [static]
IP_YUV422ToGrey_(Image< StorageType > &img) | BIAS::ImageConvert | [protected, static]
Ipl2BIAS(IplImage *source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
MergeImage_(const std::vector< ImageBase > &parts, ImageBase &dest) | BIAS::ImageConvertThreaded | [protected, static]
RGBAToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBTohsL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBTohsL_(Image< int > &source, Image< int > &dest) | BIAS::ImageConvert |
RGBTohsL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
RGBToHSL_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToHSL_(Image< float > &source, Image< float > &dest) | BIAS::ImageConvert |
RGBToHSL_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
RGBToHSV_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
RGBToHSV_(Image< float > &source, Image< float > &dest) | BIAS::ImageConvert |
RGBToHSV_(Image< unsigned char > &source, Image< unsigned char > &dest) | BIAS::ImageConvert |
SplitImage_(const ImageBase &source, const int num, std::vector< ImageBase > &parts) | BIAS::ImageConvertThreaded | [protected, static]
ToGrey(const ImageBase &source, ImageBase &dest) | BIAS::ImageConvert | [static]
ToGrey(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToHSL(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
TohsL(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToHSV(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleaved(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleavedRGB(Image< StorageType > &red, Image< StorageType > &green, Image< StorageType > &blue, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToInterleavedRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToInterleavedYUYV422_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToPlanar(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
ToPlanarRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToPlanarYUYV422_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
ToRGB(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [static]
YUV420PToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV420PToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV422ToGrey_(const Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
YUV422ToRGB_(Image< StorageType > &source, Image< StorageType > &dest) | BIAS::ImageConvert | [protected, static]
~ImageConvertThreaded() | BIAS::ImageConvertThreaded |

Generated on Wed Jun 21 19:08:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageDraw< StorageType > Member List

This is the complete list of members for BIAS::ImageDraw< StorageType >, including all inherited members.

Arrow(Image< StorageType > &im, const unsigned start[2], const unsigned end[2], const unsigned length, const unsigned width, const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
Circle(BIAS::Image< StorageType > &dstImg, const int &centerX, const int &centerY, const int &radius=3, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int &thickness=1, const int &linetype=8, const int &shift=0) | BIAS::ImageDraw< StorageType > | [static]
CircleCenter(Image< StorageType > &im, unsigned int CenterX, unsigned int CenterY, unsigned int Radius, const StorageType Value[]=NULL) | BIAS::ImageDraw< StorageType > | [static]
CircleCenterFilled(Image< StorageType > &im, unsigned int CenterX, unsigned int CenterY, unsigned int Radius, const StorageType Value[]) | BIAS::ImageDraw< StorageType > | [static]
Ellipse(Image< StorageType > &im, double center[2], double a[2], double b[2], const StorageType Value[]) | BIAS::ImageDraw< StorageType > | [static]
Ellipse(BIAS::Image< StorageType > &dstImg, const int &centerX, const int &centerY, const int &axesX, const int &axesY, const double &angle, const double &start_angle=0, const double &end_angle=360, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int &thickness=1, const int &linetype=8, const int &shift=0) | BIAS::ImageDraw< StorageType > | [static]
GetContrastValue(StorageType t) | BIAS::ImageDraw< StorageType > | [static]
GetContrastValue(unsigned char t) | BIAS::ImageDraw< StorageType > |
GetContrastValue(float t) | BIAS::ImageDraw< StorageType > |
InterpolatedLine(Image< StorageType > &im, const int StartX, const int StartY, const int EndX, const int EndY, const StorageType Value[]) | BIAS::ImageDraw< StorageType > | [static]
InterpolatedLineGrey(Image< StorageType > &im, const int StartX, const int StartY, const int EndX, const int EndY, const StorageType Value) | BIAS::ImageDraw< StorageType > | [static]
InterpolatedLineGrey(Image< StorageType > &im, unsigned int coo[4], const StorageType Value) | BIAS::ImageDraw< StorageType > | [inline, static]
Line(Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const int start[2], const int end[2], const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2]) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType color[], const float thickness) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value[]) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY) | BIAS::ImageDraw< StorageType > | [static]
Line(Image< StorageType > &im, unsigned int coo[4], const StorageType value[]) | BIAS::ImageDraw< StorageType > | [inline, static]
Line(Image< StorageType > &im, const double start[2], const double end[2], const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
Line(BIAS::Image< StorageType > &dstImg, const int &pt1X, const int &pt1Y, const int &pt2X, const int &pt2Y, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int thickness=1, const int linetype=8, const int shift=0) | BIAS::ImageDraw< StorageType > | [static]
LineGrey(Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2], const StorageType value) | BIAS::ImageDraw< StorageType > | [static]
LineGrey(Image< StorageType > &im, const unsigned int start[2], const unsigned int end[2]) | BIAS::ImageDraw< StorageType > | [static]
LineGrey(Image< StorageType > &im, const unsigned int StartX, const unsigned int StartY, const unsigned int EndX, const unsigned int EndY, const StorageType Value) | BIAS::ImageDraw< StorageType > | [static]
Rectangle(BIAS::Image< StorageType > &dstImg, const int &pt1X, const int &pt1Y, const int &pt2X, const int &pt2Y, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int thickness=1, const int linetype=8, const int shift=0) | BIAS::ImageDraw< StorageType > | [static]
RectangleCenter(Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
RectangleCenter(Image< StorageType > &im, unsigned int coo[2], unsigned int size, const StorageType value[]) | BIAS::ImageDraw< StorageType > | [inline, static]
RectangleCenter(Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size) | BIAS::ImageDraw< StorageType > | [static]
RectangleCenter(Image< StorageType > &im, unsigned int coo[2], unsigned int size) | BIAS::ImageDraw< StorageType > | [static]
RectangleCenterGrey(Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value) | BIAS::ImageDraw< StorageType > | [static]
RectangleCenterGreyFill(Image< StorageType > &im, unsigned int x, unsigned int y, unsigned int size, const StorageType value) | BIAS::ImageDraw< StorageType > | [static]
RectangleCorners(Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType value[]) | BIAS::ImageDraw< StorageType > | [static]
RectangleCorners(Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType value) | BIAS::ImageDraw< StorageType > | [static]
RectangleCorners(Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy) | BIAS::ImageDraw< StorageType > | [static]
RectangleCornersGrey(Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType GreyValue) | BIAS::ImageDraw< StorageType > | [static]
RectangleCornersGreyFill(Image< StorageType > &im, unsigned int minx, unsigned int miny, unsigned int maxx, unsigned int maxy, const StorageType GreyValue) | BIAS::ImageDraw< StorageType > | [static]
Text(BIAS::Image< StorageType > &dstImg, const std::string &message, const int &posX=0, const int &posY=20, const BIAS::Vector3< StorageType > &colorRGB=Vector3< StorageType >(255, 255, 255), const int fontface=CV_FONT_HERSHEY_PLAIN, const double hscale=1.0, const double vscale=1.0, const double shear=0, const int thickness=1, const int linetype=8) | BIAS::ImageDraw< StorageType > | [static]

Generated on Wed Jun 21 19:08:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImageIO Member List

This is the complete list of members for BIAS::ImageIO, including all inherited members.

ExportDevIL(const std::string &FileName, const ImageBase &img, const bool &fileOverwrite=true, const bool &allowPadding=true) | BIAS::ImageIO | [static]
ExportImage(const std::string &filename, ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true) | BIAS::ImageIO | [static]
ExportImagePnm_(const std::string &FileName, ImageBase &img, bool sync=false, const bool &writeMetaData=true) | BIAS::ImageIO | [protected, static]
ExportImlib(const std::string &c_filename, BIAS::ImageBase &img, enum TFileFormat FileFormat, bool sync=BIAS_DEFAULT_SYNC, int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true) | BIAS::ImageIO | [static]
ExportMagickPP(const std::string &FileName, const ImageBase &img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false) | BIAS::ImageIO | [static]
ExportOpenEXR(const std::string &FileName, const ImageBase &result) | BIAS::ImageIO | [static]
ExtensionName(const std::string &oldName, const std::string &newExtension) | BIAS::ImageIO | [static]
FF_auto enum value | BIAS::ImageIO |
FF_bmp enum value | BIAS::ImageIO |
FF_dds enum value | BIAS::ImageIO |
FF_exr enum value | BIAS::ImageIO |
FF_jpg enum value | BIAS::ImageIO |
FF_mip enum value | BIAS::ImageIO |
FF_pbm enum value | BIAS::ImageIO |
FF_pgm enum value | BIAS::ImageIO |
FF_png enum value | BIAS::ImageIO |
FF_ppm enum value | BIAS::ImageIO |
FF_raw4096 enum value | BIAS::ImageIO |
FF_Real32 enum value | BIAS::ImageIO |
FF_tif enum value | BIAS::ImageIO |
FF_unknown enum value | BIAS::ImageIO |
FF_viff enum value | BIAS::ImageIO |
GetExtension(const BIAS::ImageIO::TFileFormat &fmt) | BIAS::ImageIO | [static]
GetFileFormat(const std::string &str) | BIAS::ImageIO | [static]
ImportDevIL(const std::string &FileName, ImageBase &result) | BIAS::ImageIO | [static]
ImportImage(const std::string &filename, ImageBase &result) | BIAS::ImageIO | [static]
ImportImagePnm_(std::ifstream &ifs, ImageBase &result, int depth) | BIAS::ImageIO | [protected, static]
ImportImageViff_(std::ifstream &ifs, ImageBase &result) | BIAS::ImageIO | [protected, static]
ImportImlib(const std::string &filename, ImageBase &result, bool assumeGrey=false) | BIAS::ImageIO | [static]
ImportMagickPP(const std::string &FileName, ImageBase &result, const bool &dummy=false, const bool &readMetaData=true) | BIAS::ImageIO | [static]
ImportMagickPPAutoconvert(const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false) | BIAS::ImageIO | [static]
ImportOpenEXR(const std::string &FileName, ImageBase &result) | BIAS::ImageIO | [static]
ImportRADIANCE(const std::string &FileName, ImageBase &result) | BIAS::ImageIO | [static]
ImportRAWwithHeader(const std::string &filename, BIAS::ImageBase &img) | BIAS::ImageIO | [static]
ImportReal32(const std::string &FileName, ImageBase &result) | BIAS::ImageIO | [static]
InitDevIL() | BIAS::ImageIO | [static]
Load(const std::string &FileName, ImageBase &img) | BIAS::ImageIO | [static]
MemAlignedBuffer_ | BIAS::ImageIO | [protected, static]
MemAlignedBufferSize_ | BIAS::ImageIO | [protected, static]
ParseRAWwithHeader(const std::string &buf, const std::string &tag, unsigned int &retVal) | BIAS::ImageIO | [static]
PrintInfoDevIL(std::ostream &os=std::cout) | BIAS::ImageIO | [static]
Read(const std::string &FileName, ImageBase &img) | BIAS::ImageIO | [static]
Save(const std::string &FileName, ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=false, const bool &writeMetaData=false) | BIAS::ImageIO | [static]
TFileFormat enum name | BIAS::ImageIO |
Write(const std::string &FileName, ImageBase &img, bool sync=false, bool forceNewID=true) | BIAS::ImageIO | [static]
WriteUnbuffered(const std::string &FileName, ImageBase &img) | BIAS::ImageIO | [static]

Generated on Wed Jun 21 19:08:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ImgObjGL Member List

This is the complete list of members for BIAS::ImgObjGL, including all inherited members.

CreateGLTexture(const BIAS::ImageBase &c_img, const bool &forcePow2tex=true, const bool &flipY=true, const bool ImmediateCopyData=true) | BIAS::ImgObjGL |
DeleteGLTexture() | BIAS::ImgObjGL |
GetGLInternalFormat(const BIAS::ImageBase::EStorageType &biasST, const BIAS::ImageBase::EColorModel &biasCM, const unsigned int &channelcount, const unsigned int &ByteDepth, const unsigned int &BitDepth) | BIAS::ImgObjGL | [static]
GetGLInternalFormat(const BIAS::ImageBase &img) | BIAS::ImgObjGL | [static]
GetGLPixelFormat(const BIAS::ImageBase::EColorModel &biasCM, const unsigned int &channelcount) | BIAS::ImgObjGL | [static]
GetGLStorageType(const BIAS::ImageBase::EStorageType &biasST, const unsigned int &ByteDepth) | BIAS::ImgObjGL | [static]
heightBrutto | BIAS::ImgObjGL |
heightOrig | BIAS::ImgObjGL |
id | BIAS::ImgObjGL |
ImgObjGL() | BIAS::ImgObjGL |
ImgObjGL(const GLuint &id, const unsigned int &widthBrutto, const unsigned int &heightBrutto, const GLenum &target=GL_TEXTURE_2D) | BIAS::ImgObjGL |
InitMembers() | BIAS::ImgObjGL |
IsRectangleTexture() const | BIAS::ImgObjGL |
magnificationMode | BIAS::ImgObjGL |
minificationMode | BIAS::ImgObjGL |
p_id_SelfAllocated | BIAS::ImgObjGL |
p_valueImage | BIAS::ImgObjGL |
p_valueImage_SelfAllocated | BIAS::ImgObjGL |
Release() | BIAS::ImgObjGL |
SetTarget2D() | BIAS::ImgObjGL | [inline]
SetTargetPOW2() | BIAS::ImgObjGL | [inline]
SetTargetRECT() | BIAS::ImgObjGL | [inline]
target | BIAS::ImgObjGL |
widthBrutto | BIAS::ImgObjGL |
widthOrig | BIAS::ImgObjGL |
~ImgObjGL() | BIAS::ImgObjGL |

Generated on Wed Jun 21 19:08:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::IndexedFaceSet Member List

This is the complete list of members for BIAS::IndexedFaceSet, including all inherited members.

faceIndices | BIAS::IndexedFaceSet
name | BIAS::IndexedFaceSet
texCoordSet | BIAS::IndexedFaceSet
texture | BIAS::IndexedFaceSet
textureName | BIAS::IndexedFaceSet
vertexSet | BIAS::IndexedFaceSet
writeOutTexture | BIAS::IndexedFaceSet

Generated on Wed Jun 21 19:08:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::IntegralHistogram Member List

This is the complete list of members for BIAS::IntegralHistogram, including all inherited members.

bExpDist_ | BIAS::IntegralHistogram | [protected]
CalcSimilarity(ColorHistogram< unsigned char > &chist, int ux, int uy, int lx, int ly) | BIAS::IntegralHistogram |
CalcSimilarity(ColorHistogram< unsigned char > &chist1, int ux1, int uy1, int lx1, int ly1, ColorHistogram< unsigned char > &chist2, int ux2, int uy2, int lx2, int ly2, double weightSecond=0.5) | BIAS::IntegralHistogram |
Clear() | BIAS::IntegralHistogram |
CopyNoCheck(const BIAS::Vector< int > &src, BIAS::Vector< int > &dst) | BIAS::IntegralHistogram | [inline, protected]
Dump(std::ostream &os, int y, int x) | BIAS::IntegralHistogram |
GenerateIntegralHist(BIAS::Image< unsigned char > &image, int nBinsize) | BIAS::IntegralHistogram |
GenerateIntegralHistDiffBin(BIAS::Image< unsigned char > &image, int nBinsizeHue, int nBinsizeSat) | BIAS::IntegralHistogram |
GetBinSize() const | BIAS::IntegralHistogram | [inline]
GetBinSizeSat() const | BIAS::IntegralHistogram | [inline]
GetHistogram(int ux, int uy, int lx, int ly) | BIAS::IntegralHistogram |
IntegralHistogram() | BIAS::IntegralHistogram |
m_cHSData | BIAS::IntegralHistogram | [protected]
m_cLData | BIAS::IntegralHistogram | [protected]
mHists_ | BIAS::IntegralHistogram | [protected]
nBinsize_ | BIAS::IntegralHistogram | [protected]
nBinsizeSat_ | BIAS::IntegralHistogram | [protected]
nLambda_ | BIAS::IntegralHistogram | [protected]
nMinSat_ | BIAS::IntegralHistogram | [protected]
nOldBinsize_ | BIAS::IntegralHistogram | [protected]
nOldBinsizeSat_ | BIAS::IntegralHistogram | [protected]
nShift_ | BIAS::IntegralHistogram | [protected]
nShiftSat_ | BIAS::IntegralHistogram | [protected]
SetBinSize(int binsize) | BIAS::IntegralHistogram |
SetExpDist(bool expdist) | BIAS::IntegralHistogram |
SetLambda(int lambda) | BIAS::IntegralHistogram |
SetMinSat(int minsat) | BIAS::IntegralHistogram |
~IntegralHistogram() | BIAS::IntegralHistogram |

Generated on Wed Jun 21 19:08:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Interpolator Member List

This is the complete list of members for BIAS::Interpolator, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
actIndex_ | BIAS::Interpolator | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Bezier3(double &res, double t) | BIAS::Interpolator |
Bezier3(BIAS::Vector2< double > &res, double t) | BIAS::Interpolator |
Bezier3(BIAS::Vector3< double > &res, double t) | BIAS::Interpolator |
bezierInitialized_ | BIAS::Interpolator | [protected]
bXK_1_ | BIAS::Interpolator | [protected]
bXK_2_ | BIAS::Interpolator | [protected]
bXK_3_ | BIAS::Interpolator | [protected]
bYK_1_ | BIAS::Interpolator | [protected]
bYK_2_ | BIAS::Interpolator | [protected]
bYK_3_ | BIAS::Interpolator | [protected]
Clear() | BIAS::Interpolator |
ClearEndTangent() | BIAS::Interpolator | [inline]
ClearStartTangent() | BIAS::Interpolator | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DrawBezierCoords2(Image< unsigned char > &img) | BIAS::Interpolator |
endTangentX_ | BIAS::Interpolator | [protected]
endTangentY_ | BIAS::Interpolator | [protected]
endTangentZ_ | BIAS::Interpolator | [protected]
fakima(BIAS::Vector< double > &a, BIAS::Vector< double > Px, BIAS::Vector< double > Py, int from, int to, int intervall) | BIAS::Interpolator | [protected]
GetControlPoints(std::vector< double > &cPnt) const | BIAS::Interpolator | [inline]
GetControlPoints(std::vector< BIAS::Vector2< double > > &cPnt) const | BIAS::Interpolator |
GetControlPoints(std::vector< BIAS::Vector3< double > > &cPnt) const | BIAS::Interpolator |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKnotPoints(std::vector< double > &kPnt) const | BIAS::Interpolator | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InitBezier(int dim_of_CP) | BIAS::Interpolator |
initializedPoly_ | BIAS::Interpolator | [protected]
InitLinear(std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt) | BIAS::Interpolator | [protected]
InitSpline() | BIAS::Interpolator |
InitSpline(unsigned int k, unsigned int dim) | BIAS::Interpolator | [protected]
InitSpline2(std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent=0) | BIAS::Interpolator | [protected]
InitSpline3(std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent=0, double endTangent=0) | BIAS::Interpolator | [protected]
InitSplineAkima(std::vector< BIAS::Vector< double > > &listP, std::vector< double > listPnt, double startTangent, double endTangent) | BIAS::Interpolator | [protected]
Interpolator() | BIAS::Interpolator |
Interpolator(const Interpolator &ip) | BIAS::Interpolator | [inline]
KPts_ | BIAS::Interpolator | [protected]
listPntDim1_ | BIAS::Interpolator | [protected]
listPntDim2_ | BIAS::Interpolator | [protected]
listPntDim3_ | BIAS::Interpolator | [protected]
listPolynoms1_ | BIAS::Interpolator | [protected]
listPolynoms2_ | BIAS::Interpolator | [protected]
listPolynoms3_ | BIAS::Interpolator | [protected]
LuTMax1_ | BIAS::Interpolator | [protected]
LuTMin1_ | BIAS::Interpolator | [protected]
LuTSampleDist1_ | BIAS::Interpolator | [protected]
nmatrix_ | BIAS::Interpolator | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrepareLuTSpline(double min, double max, unsigned int N, unsigned int k=3) | BIAS::Interpolator |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetControlPoints(const std::vector< double > &cPnt1) | BIAS::Interpolator | [inline]
SetControlPoints(const std::vector< BIAS::Vector2< double > > &cPnt) | BIAS::Interpolator |
SetControlPoints(const std::vector< BIAS::Vector3< double > > &cPnt) | BIAS::Interpolator |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetEndTangent(double endTangent) | BIAS::Interpolator | [inline]
SetEndTangent(BIAS::Vector2< double > endTangent) | BIAS::Interpolator | [inline]
SetEndTangent(BIAS::Vector3< double > endTangent) | BIAS::Interpolator | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKnotPoints(const std::vector< double > &kPnt) | BIAS::Interpolator |
SetStartTangent(double startTangent) | BIAS::Interpolator | [inline]
SetStartTangent(BIAS::Vector2< double > startTangent) | BIAS::Interpolator | [inline]
SetStartTangent(BIAS::Vector3< double > startTangent) | BIAS::Interpolator | [inline]
Spline(double &res, double t, unsigned int k=3) | BIAS::Interpolator |
Spline(BIAS::Vector2< double > &res, double t, unsigned int k=3) | BIAS::Interpolator |
Spline(BIAS::Vector3< double > &res, double t, unsigned int k=3) | BIAS::Interpolator |
SplineFromLuT(double &res, double t) const | BIAS::Interpolator |
SplineLuT1_ | BIAS::Interpolator | [protected]
startTangentX_ | BIAS::Interpolator | [protected]
startTangentY_ | BIAS::Interpolator | [protected]
startTangentZ_ | BIAS::Interpolator | [protected]
T_ | BIAS::Interpolator | [protected]
validate(double &t) | BIAS::Interpolator | [protected]
~Debug() | BIAS::Debug | [inline]
~Interpolator() | BIAS::Interpolator | [inline]

Generated on Wed Jun 21 19:08:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::JpegHandler Member List

This is the complete list of members for BIAS::JpegHandler, including all inherited members.

buffsize_ | BIAS::JpegHandler | [protected]
Compress(BIAS::Image< unsigned char > &srcImg, int quality=60) | BIAS::JpegHandler |
Compress(unsigned int width, unsigned int height, unsigned int channels, unsigned char *data, int quality=60) | BIAS::JpegHandler |
data_ | BIAS::JpegHandler | [protected]
dataLength_ | BIAS::JpegHandler | [protected]
Decompress(BIAS::Image< unsigned char > &destImg) | BIAS::JpegHandler |
Decompress(unsigned int &width, unsigned int &height, unsigned int &channels, unsigned char *&data) | BIAS::JpegHandler |
GetCompressedData(void *&data, long &length) | BIAS::JpegHandler | [inline]
Init(long size=1048576) | BIAS::JpegHandler |
JpegHandler() | BIAS::JpegHandler |
ReadJPEG(const string &filename) | BIAS::JpegHandler |
Release() | BIAS::JpegHandler |
SetCompressedData(void *data, long length) | BIAS::JpegHandler | [inline]
setup_ | BIAS::JpegHandler | [protected]
WriteJPEG(const string &filename) | BIAS::JpegHandler |
~JpegHandler() | BIAS::JpegHandler | [virtual]

Generated on Wed Jun 21 19:08:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Kalman Member List

This is the complete list of members for BIAS::Kalman, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
A_ | BIAS::Kalman | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AT_ | BIAS::Kalman | [protected]
Covariance_ | BIAS::Kalman | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCovariance(Matrix< double > &cov) const | BIAS::Kalman | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetState(Vector< double > &state) const | BIAS::Kalman | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
H_ | BIAS::Kalman | [protected]
HT_ | BIAS::Kalman | [protected]
Identity_ | BIAS::Kalman | [protected]
Init(const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance) | BIAS::Kalman |
Kalman() | BIAS::Kalman |
Kalman(const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance) | BIAS::Kalman |
MeasurementDim_ | BIAS::Kalman | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
Predict(const Matrix< double > &ProcessCovariance) | BIAS::Kalman |
Predict(const Matrix< double > &SystemMatrix, const Matrix< double > &ProcessCovariance) | BIAS::Kalman |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
State_ | BIAS::Kalman | [protected]
svd_ | BIAS::Kalman | [protected]
SystemStateDim_ | BIAS::Kalman | [protected]
Update(const Vector< double > &Measurement, const Matrix< double > &MeasurementCovariance) | BIAS::Kalman |
~Debug() | BIAS::Debug | [inline]
~Kalman() | BIAS::Kalman |

Generated on Wed Jun 21 19:08:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::KMatrix Member List

This is the complete list of members for BIAS::KMatrix, including all inherited members.

Add(const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
AddIP(const KMATRIX_TYPE &scalar) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
AddIP(const Matrix< KMATRIX_TYPE > &arg) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< KMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< KMATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
DivideIP(const KMATRIX_TYPE &scalar) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const KMATRIX_TYPE &scalar) | BIAS::Matrix< KMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< KMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< KMATRIX_TYPE > |
GetData() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< KMATRIX_TYPE > |
GetFx() const | BIAS::KMatrix |
GetFy() const | BIAS::KMatrix |
GetHx() const | BIAS::KMatrix |
GetHy() const | BIAS::KMatrix |
GetMax() const | BIAS::Matrix< KMATRIX_TYPE > |
GetMaxMin(KMATRIX_TYPE &max, KMATRIX_TYPE &min) const | BIAS::Matrix< KMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< KMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< KMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetRow(const unsigned int row, Vector3< KMATRIX_TYPE > &r) const | BIAS::Matrix3x3< KMATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< KMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
GetSkew() const | BIAS::KMatrix |
GetSystemMatrix(Matrix< KMATRIX_TYPE > &dest) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::KMatrix |
BIAS::Matrix3x3< KMATRIX_TYPE >::Invert(Matrix3x3< KMATRIX_TYPE > &inv) const | BIAS::Matrix3x3< KMATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< KMATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< KMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< KMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
KMatrix() | BIAS::KMatrix | [inline]
KMatrix(const MatrixInitType &i) | BIAS::KMatrix | [inline, explicit]
KMatrix(const Matrix3x3< KMATRIX_TYPE > &A) | BIAS::KMatrix | [inline]
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< KMATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< KMATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< KMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const KMATRIX_TYPEvalue) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< KMATRIX_TYPE > | [explicit]
Matrix(const Matrix< KMATRIX_TYPE > &A) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< KMATRIX_TYPE > &A) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< KMATRIX_TYPE > | [explicit]
Matrix3x3(const KMATRIX_TYPEa0, const KMATRIX_TYPEa1, const KMATRIX_TYPEa2, const KMATRIX_TYPEa3, const KMATRIX_TYPEa4, const KMATRIX_TYPEa5, const KMATRIX_TYPEa6, const KMATRIX_TYPEa7, const KMATRIX_TYPEa8) | BIAS::Matrix3x3< KMATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< KMATRIX_TYPE > &A) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< KMATRIX_TYPE > &A) | BIAS::Matrix3x3< KMATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< KMATRIX_TYPE > &A) | BIAS::Matrix3x3< KMATRIX_TYPE > |
MaxMin(KMATRIX_TYPE &max, KMATRIX_TYPE &min) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< KMATRIX_TYPE > &argvec, Vector3< KMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
Mult(const Matrix3x3< KMATRIX_TYPE > &argmat, Matrix3x3< KMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
Mult(const Matrix3x4< KMATRIX_TYPE > &argmat, Matrix3x4< KMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::Mult(const Matrix< KMATRIX_TYPE > &arg, Matrix< KMATRIX_TYPE > &result) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::Mult(const Matrix< KMATRIX_TYPE > &arg) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::Mult(const Vector< KMATRIX_TYPE > &arg, Vector< KMATRIX_TYPE > &result) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Multiply(const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
MultiplyIP(const KMATRIX_TYPE &scalar) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
MultLeft(const Matrix< KMATRIX_TYPE > &arg) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
MultLeft(const Vector< KMATRIX_TYPE > &arg, Vector< KMATRIX_TYPE > &result) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< KMATRIX_TYPE > |
BIAS::Matrix< KMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< KMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< KMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< KMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< KMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< KMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< KMATRIX_TYPE > &mat) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::operator=(const TNT::Matrix< KMATRIX_TYPE > &mat) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
BIAS::Matrix< KMATRIX_TYPE >::operator=(const Matrix< KMATRIX_TYPE > &mat) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< KMATRIX_TYPE > |
Scale(const KMATRIX_TYPE &scalar, Matrix3x3< KMATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
ScaleCol(int NoCol, KMATRIX_TYPEscale) | BIAS::Matrix< KMATRIX_TYPE > |
ScaleRow(int NoRow, KMATRIX_TYPEscale) | BIAS::Matrix< KMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(const KMATRIX_TYPE &fx, const KMATRIX_TYPE &fy, const KMATRIX_TYPE &hx, const KMATRIX_TYPE &hy, const KMATRIX_TYPE &skew=KMATRIX_TYPE(0)) | BIAS::KMatrix |
SetAsCrossProductMatrix(const Vector3< KMATRIX_TYPE > &vec) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const KMATRIX_TYPE &x, const KMATRIX_TYPE &y, const KMATRIX_TYPE &z) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< KMATRIX_TYPE > &data) | BIAS::Matrix< KMATRIX_TYPE > |
SetFromColumnVectors(const BIAS::Vector3< KMATRIX_TYPE > &v0, const BIAS::Vector3< KMATRIX_TYPE > &v1, const BIAS::Vector3< KMATRIX_TYPE > &v2) | BIAS::Matrix3x3< KMATRIX_TYPE > |
SetFromRowVectors(const BIAS::Vector3< KMATRIX_TYPE > &v0, const BIAS::Vector3< KMATRIX_TYPE > &v1, const BIAS::Vector3< KMATRIX_TYPE > &v2) | BIAS::Matrix3x3< KMATRIX_TYPE > |
SetFromVector(const TNT::Vector< KMATRIX_TYPE > &vec) | BIAS::Matrix3x3< KMATRIX_TYPE > |
SetFx(const KMATRIX_TYPE &val) | BIAS::KMatrix |
SetFy(const KMATRIX_TYPE &val) | BIAS::KMatrix |
SetHx(const KMATRIX_TYPE &val) | BIAS::KMatrix |
SetHy(const KMATRIX_TYPE &val) | BIAS::KMatrix |
SetIdentity() | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< KMATRIX_TYPE > &data) | BIAS::Matrix< KMATRIX_TYPE > |
SetSkew(const KMATRIX_TYPE &val) | BIAS::KMatrix |
SetZero() | BIAS::Matrix< KMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const KMATRIX_TYPE &scalar, Matrix< KMATRIX_TYPE > &dest) const | BIAS::Matrix< KMATRIX_TYPE > | [inline]
SubIP(const Matrix< KMATRIX_TYPE > &arg) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
SubIP(const KMATRIX_TYPE &scalar) | BIAS::Matrix< KMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< KMATRIX_TYPE > |
Transpose(const Matrix3x3< KMATRIX_TYPE > &arg) | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
TransposedMult(const Vector3< KMATRIX_TYPE > &argvec, Vector3< KMATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< KMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~KMatrix() | BIAS::KMatrix | [inline]
~Matrix() | BIAS::Matrix< KMATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< KMATRIX_TYPE > | [virtual]

Generated on Wed Jun 21 19:08:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Label Member List

This is the complete list of members for BIAS::Label, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< unsigned char, unsigned char > | [protected]
_FilterBorderHandling | BIAS::FilterBase< unsigned char, unsigned char > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< unsigned char, unsigned char > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
BlobCount_ | BIAS::Label | [protected]
BlobMap_ | BIAS::Label | [private]
BotRights_ | BIAS::Label | [protected]
Centers_ | BIAS::Label | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< unsigned char > &src, Image< unsigned char > &dst) | BIAS::Label | [virtual]
FilterBase() | BIAS::FilterBase< unsigned char, unsigned char > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< unsigned char, unsigned char > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< unsigned char, unsigned char > |
GetBlobCounts() | BIAS::Label | [inline]
GetBlobMap() | BIAS::Label | [inline]
GetBlobSizes(std::vector< int > &sizes) const | BIAS::Label | [inline]
GetBorderHandling() const | BIAS::FilterBase< unsigned char, unsigned char > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< unsigned char, unsigned char > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Label | [protected, virtual]
GetBoundingBoxes(std::vector< BIAS::Vector2< int > > &topLefts, std::vector< BIAS::Vector2< int > > &botRights) | BIAS::Label | [inline]
GetCenters(std::vector< BIAS::Vector2< double > > &centers) const | BIAS::Label | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetLabelImage(Image< LABEL_CALC_TYPE > &li) | BIAS::Label | [inline]
GetMedianCenters(std::vector< BIAS::Vector2< double > > &cts) const | BIAS::Label | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Label() | BIAS::Label |
Label4Neighbour(const BIAS::Image< unsigned char > &Image, BIAS::Image< unsigned char > &DestinationImage) | BIAS::Label |
Label4Neighbour(const BIAS::Image< LABEL_CALC_TYPE > &Image, BIAS::Image< LABEL_CALC_TYPE > &DestinationImage) | BIAS::Label |
Label4Neighbour_() | BIAS::Label | [protected]
LabelInit_(const Image< unsigned char > &Image) | BIAS::Label | [protected]
LabelInit_(const Image< LABEL_CALC_TYPE > &Image) | BIAS::Label | [protected]
LabelInitialized_ | BIAS::Label | [protected]
LabelRelease_() | BIAS::Label | [protected]
LabelResultImage_ | BIAS::Label | [protected]
LabelSumImage_ | BIAS::Label | [protected]
MedianCenters_ | BIAS::Label | [protected]
Num_ | BIAS::Label | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Process(const Image< unsigned char > &im) | BIAS::Label |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< unsigned char, unsigned char > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SortVec_ | BIAS::Label | [protected]
TBH_full enum value | BIAS::FilterBase< unsigned char, unsigned char > |
TBH_same enum value | BIAS::FilterBase< unsigned char, unsigned char > |
TBH_valid enum value | BIAS::FilterBase< unsigned char, unsigned char > |
TopLefts_ | BIAS::Label | [protected]
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< unsigned char, unsigned char > | [virtual]
~Label() | BIAS::Label |

Generated on Wed Jun 21 19:08:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LeastSquaresBase Member List

This is the complete list of members for BIAS::LeastSquaresBase, including all inherited members.

_AT | BIAS::LeastSquaresBase | [protected]
_ATA | BIAS::LeastSquaresBase | [protected]
_ATb | BIAS::LeastSquaresBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ReduceToATA | BIAS::LeastSquaresBase | [protected]
_SolutionSize | BIAS::LeastSquaresBase | [protected]
_Weight | BIAS::LeastSquaresBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(unsigned SolutionSize, bool ReduceToATA=true) | BIAS::LeastSquaresBase |
LeastSquaresBase() | BIAS::LeastSquaresBase | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Solve(Matrix< double > &A, Vector< double > &b, Vector< double > &x) | BIAS::LeastSquaresBase | [virtual]
Solve(Matrix< double > &A, Vector< double > &x) | BIAS::LeastSquaresBase | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresBase | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresBase | [virtual]
~Debug() | BIAS::Debug | [inline]
~LeastSquaresBase() | BIAS::LeastSquaresBase | [inline, virtual]

Generated on Wed Jun 21 19:08:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LeastSquaresLapack Member List

This is the complete list of members for BIAS::LeastSquaresLapack, including all inherited members.

_AT | BIAS::LeastSquaresBase | [protected]
_ATA | BIAS::LeastSquaresBase | [protected]
_ATb | BIAS::LeastSquaresBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ReduceToATA | BIAS::LeastSquaresBase | [protected]
_SolutionSize | BIAS::LeastSquaresBase | [protected]
_Weight | BIAS::LeastSquaresBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(unsigned SolutionSize, bool ReduceToATA=true) | BIAS::LeastSquaresBase |
LeastSquaresBase() | BIAS::LeastSquaresBase | [inline]
LeastSquaresLapack() | BIAS::LeastSquaresLapack | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Solve(Matrix< double > &A, Vector< double > &b, Vector< double > &x) | BIAS::LeastSquaresLapack | [virtual]
Solve(Matrix< double > &A, Vector< double > &x) | BIAS::LeastSquaresLapack | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresLapack | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresLapack | [virtual]
~Debug() | BIAS::Debug | [inline]
~LeastSquaresBase() | BIAS::LeastSquaresBase | [inline, virtual]
~LeastSquaresLapack() | BIAS::LeastSquaresLapack | [inline, virtual]

Generated on Wed Jun 21 19:08:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LeastSquaresSVD Member List

This is the complete list of members for BIAS::LeastSquaresSVD, including all inherited members.

_AT | BIAS::LeastSquaresBase | [protected]
_ATA | BIAS::LeastSquaresBase | [protected]
_ATb | BIAS::LeastSquaresBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ReduceToATA | BIAS::LeastSquaresBase | [protected]
_S | BIAS::LeastSquaresSVD | [protected]
_SolutionSize | BIAS::LeastSquaresBase | [protected]
_svd | BIAS::LeastSquaresSVD | [protected]
_VT | BIAS::LeastSquaresSVD | [protected]
_Weight | BIAS::LeastSquaresBase | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(unsigned SolutionSize, bool ReduceToATA=true) | BIAS::LeastSquaresBase |
LeastSquaresBase() | BIAS::LeastSquaresBase | [inline]
LeastSquaresSVD() | BIAS::LeastSquaresSVD | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Solve(Matrix< double > &A, Vector< double > &b, Vector< double > &x) | BIAS::LeastSquaresSVD | [virtual]
Solve(Matrix< double > &A, Vector< double > &x) | BIAS::LeastSquaresSVD | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresSVD | [virtual]
WeightedSolve(Matrix< double > &A, Vector< double > &weights, Vector< double > &x) | BIAS::LeastSquaresSVD | [virtual]
~Debug() | BIAS::Debug | [inline]
~LeastSquaresBase() | BIAS::LeastSquaresBase | [inline, virtual]
~LeastSquaresSVD() | BIAS::LeastSquaresSVD | [inline, virtual]

Generated on Wed Jun 21 19:08:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Line3DData Member List

This is the complete list of members for BIAS::Line3DData, including all inherited members.

Color | BIAS::Line3DData
End | BIAS::Line3DData
Start | BIAS::Line3DData

Generated on Wed Jun 21 19:08:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LinearRegionDetector< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::LinearRegionDetector< StorageType, CalculationType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_AddParameter(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< StorageType > &src, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_CalcCornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_ComputeCornerness(Image< CalculationType > &im) | BIAS::LinearRegionDetector< StorageType, CalculationType > | [protected, virtual]
_Cornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DeleteInternalMem() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_DoRefinement | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_EnforceMinimumDistance(std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatList | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FeatureMap | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_FillFeatureMap(std::vector< HomgPoint2D > &p) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_gauss | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxNum | BIAS::CornerDetectorBase< StorageType > | [protected]
_MinCornerness | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_MinDistance | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumberFeaturesSoFar | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_NumTilesX | BIAS::CornerDetectorBase< StorageType > | [protected]
_NumTilesY | BIAS::CornerDetectorBase< StorageType > | [protected]
_RefineCornerPosition(int col, int row, double &x, double &y, QUAL &SubPixelCornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_RefineCorners(std::vector< HomgPoint2D > &pos, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
_sgxx | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgxy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_sgyy | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_st | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
_ZeroFeatureMap() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline, protected]
AddCornerDetectorType(Param &param, const std::string &name="CornerDetectorType", const int groupid=GRP_ALL) | BIAS::CornerDetectorBase< StorageType > | [static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CDT_Foerstner enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Harris enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Invalid enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_KLT enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Laplace enum value | BIAS::CornerDetectorBase< StorageType > |
CDT_Susan enum value | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const std::string &postfix="") | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorBase(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorBase< StorageType > |
CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const std::string &postfix="") | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
CornerDetectorGradient(Param &para, const int grp, const std::string &postfix) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Cornerness(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, Image< CalculationType > &cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
Detect(const Image< CalculationType > &gradx, const Image< CalculationType > &grady, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality, std::vector< Matrix2x2< double > > *cov=NULL) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
BIAS::CornerDetectorBase::Detect(const Image< StorageType > &image, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorBase< StorageType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
DetectFromCornerness(const Image< CalculationType > &cornerness, const std::vector< Vector2< int > > &region, std::vector< HomgPoint2D > &p, std::vector< QUAL > &quality) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
ECDType enum name | BIAS::CornerDetectorBase< StorageType > |
GetCov_(const std::vector< HomgPoint2D > &p, std::vector< Matrix2x2< double > > &cov, const double noise=5) const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaxNumFeatures() | BIAS::CornerDetectorBase< StorageType > | [inline]
GetMinCornerness() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GetMinDistance() const | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
LinearRegionDetector() | BIAS::LinearRegionDetector< StorageType, CalculationType > |
LinearRegionDetector(Param &para, const std::string &postfix="") | BIAS::LinearRegionDetector< StorageType, CalculationType > |
LinearRegionDetector(Param &para, const int grp, const std::string &postfix) | BIAS::LinearRegionDetector< StorageType, CalculationType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
ParamsAllocated_ | BIAS::CornerDetectorBase< StorageType > | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxNumFeatures(const int maxnum) | BIAS::CornerDetectorBase< StorageType > | [inline]
SetMinCornerness(double min_cornerness) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetMinDistance(int mindist) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetStructureTensorHalfWinSize(int halfwinsize) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
SetSubpixelAccuracy(bool subpixel_accuracy) | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [inline]
~CornerDetectorBase() | BIAS::CornerDetectorBase< StorageType > | [virtual]
~CornerDetectorGradient() | BIAS::CornerDetectorGradient< StorageType, CalculationType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~LinearRegionDetector() | BIAS::LinearRegionDetector< StorageType, CalculationType > |
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:08:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LogFacility Member List

This is the complete list of members for BIAS::LogFacility, including all inherited members.

bAbortOnFatal_ | BIAS::LogFacility | [protected]
bCodeInfo_ | BIAS::LogFacility | [protected]
DeleteInstance() | BIAS::LogFacility | [static]
dLogLevel_ | BIAS::LogFacility | [protected]
GetAbortOnFatal() | BIAS::LogFacility | [inline]
GetLogLevel() | BIAS::LogFacility | [inline]
GetLogStream(std::ostream &zStream) | BIAS::LogFacility | [inline]
GetLogStream() | BIAS::LogFacility | [inline]
GetShowCodeInfo() | BIAS::LogFacility | [inline]
Instance() | BIAS::LogFacility | [inline, static]
LogFacility(void) | BIAS::LogFacility | [protected]
LogFacility(const LogFacility &l) | BIAS::LogFacility | [protected]
OpenLogFile(const std::string &sFileName) | BIAS::LogFacility | [inline]
operator=(const LogFacility &l) | BIAS::LogFacility | [protected]
pInstance_ | BIAS::LogFacility | [protected, static]
PrintLogLevel() | BIAS::LogFacility | [inline]
ResetStream() | BIAS::LogFacility | [inline]
SetAbortOnFatal(bool b) | BIAS::LogFacility | [inline]
SetInstance(LogFacility *other) | BIAS::LogFacility | [static]
SetLogLevel(BIAS_LOG_LEVEL dLogLevel) | BIAS::LogFacility | [inline]
SetLogStream(std::ostream zStream) | BIAS::LogFacility | [inline]
SetShowCodeInfo(bool b) | BIAS::LogFacility | [inline]
zLogFileStream_ | BIAS::LogFacility | [protected]
zLogStream_ | BIAS::LogFacility | [protected]
~LogFacility(void) | BIAS::LogFacility | [inline, protected]

Generated on Wed Jun 21 19:08:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::LogPolarMapping< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, including all inherited members.

_XYMap | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected]
A_ | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected]
aliasing_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
alphaImg_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline]
BuildPyramid_(const Image< InputStorageType > &source, bool forceInit=true) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalcCoordOffset_(const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ChangeImgSize_(Image< OutputStorageType > &, const Image< InputStorageType > &) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ClipValue_(const double &value, OutputStorageType &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipValue_(const double &value, float &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetBoundingBox(unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
GetImageValue_(const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
height_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
interpolationType_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
LogPolarMapping() | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > |
LogPolarMapping(const LogPolarMapping &src) | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > |
Map(const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
Map(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
MapBi_(const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapTri_(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetX_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetY_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
operator=(const LogPolarMapping &src) | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > |
pyramid_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
R_ | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected]
rangeChecked_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ROI_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
SetImageCenter(const int &x, const int &y) | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > |
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
UpdatePyramidSize(const Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [virtual]
width_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
XCenter_ | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected]
YCenter_ | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
~LogPolarMapping() | BIAS::LogPolarMapping< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:08:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MatchDataBase Member List

This is the complete list of members for BIAS::MatchDataBase, including all inherited members.

_AddParameter(Param &para) | BIAS::MatchDataBase | [protected, virtual]
_C | BIAS::MatchDataBase | [protected]
_K | BIAS::MatchDataBase | [protected]
_Ki | BIAS::MatchDataBase | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_NormalizedPoints | BIAS::MatchDataBase | [protected]
_NumImages | BIAS::MatchDataBase | [protected]
_NumPoints | BIAS::MatchDataBase | [protected]
_P | BIAS::MatchDataBase | [protected]
_Points | BIAS::MatchDataBase | [protected]
_R | BIAS::MatchDataBase | [protected]
_SetCamData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C) | BIAS::MatchDataBase | [protected]
_Transpose(const std::vector< std::vector< HomgPoint2D > > &src, std::vector< std::vector< HomgPoint2D > > &dst) const | BIAS::MatchDataBase | [inline, protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetC(int imNo, HomgPoint3D &C) const | BIAS::MatchDataBase |
GetC(std::vector< HomgPoint3D > &C) const | BIAS::MatchDataBase |
GetCorrespondences(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetK(KMatrix &K) const | BIAS::MatchDataBase |
GetNormalizedCorrespondences(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetNormalizedPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::MatchDataBase |
GetNormalizedPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetNumImages() const | BIAS::MatchDataBase | [inline]
GetP(int imNo, PMatrixBase &P) const | BIAS::MatchDataBase |
GetP(std::vector< PMatrixBase > &P) const | BIAS::MatchDataBase |
GetPoints(int imNo, std::vector< HomgPoint2D > &p) const | BIAS::MatchDataBase |
GetPoints(std::vector< std::vector< HomgPoint2D > > &p) const | BIAS::MatchDataBase |
GetR(int imNo, RMatrixBase &R) const | BIAS::MatchDataBase |
GetR(std::vector< RMatrixBase > &R) const | BIAS::MatchDataBase |
GlobalDebugLevel | BIAS::Debug | [protected, static]
MatchDataBase(Param &para) | BIAS::MatchDataBase |
operator<<(std::ostream &os, const MatchDataBase &m) | BIAS::MatchDataBase | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(MatchDataBase &l) | BIAS::MatchDataBase |
operator>>(std::istream &is, MatchDataBase &m) | BIAS::MatchDataBase | [friend]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Read(const std::string &fname) | BIAS::MatchDataBase |
Read(std::istream &is) | BIAS::MatchDataBase | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Reset() | BIAS::MatchDataBase |
SetData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m) | BIAS::MatchDataBase |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetNormalizedData(KMatrix &K, std::vector< RMatrixBase > &R, std::vector< HomgPoint3D > &C, std::vector< std::vector< HomgPoint2D > > &m) | BIAS::MatchDataBase |
Write(const std::string &fname) const | BIAS::MatchDataBase |
Write(std::ostream &os) const | BIAS::MatchDataBase | [virtual]
~Debug() | BIAS::Debug | [inline]
~MatchDataBase() | BIAS::MatchDataBase | [virtual]

Generated on Wed Jun 21 19:08:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MatlabTBUndistortion Member List

This is the complete list of members for BIAS::MatlabTBUndistortion, including all inherited members.

AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode) const | BIAS::CameraParam |
AddCameraDataToXMLTree(XMLIO &myXML, xmlNodePtr &rootNode) const | BIAS::CameraParam | [protected]
AngleCorrX_ | BIAS::CameraParam | [protected]
AngleCorrY_ | BIAS::CameraParam | [protected]
aspectratio_ | BIAS::CameraParam | [protected]
CameraParam() | BIAS::CameraParam |
CameraParam(const CameraParam &cp) | BIAS::CameraParam |
CameraParam(const KMatrix &K, const int w, const int h) | BIAS::CameraParam |
CameraParam(const std::string &filename) | BIAS::CameraParam |
CameraParam(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
CamID_ | BIAS::CameraParam | [protected]
CamModel_ | BIAS::CameraParam | [protected]
cellSizeX_ | BIAS::CameraParam | [protected]
cellSizeY_ | BIAS::CameraParam | [protected]
CutOutHeight_ | BIAS::MatlabTBUndistortion | [protected]
CutOutWidth_ | BIAS::MatlabTBUndistortion | [protected]
DebugOut() const | BIAS::CameraParam |
Distort(BIAS::HomgPoint2D &point2d) const | BIAS::MatlabTBUndistortion |
Distort(double &origx, double &origy) const | BIAS::MatlabTBUndistortion |
downsamplingFactor_ | BIAS::CameraParam | [protected]
focallengthDef_ | BIAS::CameraParam | [protected]
focallengthZoom_ | BIAS::CameraParam | [protected]
GetAngleCorrX() const | BIAS::CameraParam | [inline]
GetAngleCorrY() const | BIAS::CameraParam | [inline]
GetAspectratio() const | BIAS::CameraParam | [inline]
GetAspectRatio() const | BIAS::CameraParam | [inline]
GetCamID() const | BIAS::CameraParam | [inline]
GetCellSizeX() | BIAS::CameraParam | [inline]
GetCellSizeY() | BIAS::CameraParam | [inline]
GetDefaultUndistortion(double &f, double &kc1, double &kc2, double &kc3, double &kc4) const | BIAS::CameraParam | [inline]
GetDownsamplingFactor() | BIAS::CameraParam |
GetFocalLength() const | BIAS::CameraParam |
GetHeight() const | BIAS::CameraParam |
GetIlluCorrX() const | BIAS::CameraParam | [inline]
GetIlluCorrY() const | BIAS::CameraParam | [inline]
GetKMatrix() const | BIAS::CameraParam |
GetPrincipalX() const | BIAS::CameraParam |
GetPrincipalY() const | BIAS::CameraParam |
GetRadius() const | BIAS::CameraParam | [inline]
GetWidth() const | BIAS::CameraParam |
GetZoom() const | BIAS::CameraParam |
GetZoomUndistortion(std::vector< CPDiscreteParam > &vp) const | BIAS::CameraParam | [inline]
height_ | BIAS::CameraParam | [protected]
IlluCorrX_ | BIAS::MatlabTBUndistortion | [protected]
IlluCorrY_ | BIAS::MatlabTBUndistortion | [protected]
Init(const CameraParam &cp) | BIAS::MatlabTBUndistortion |
Init(BIAS::Projection &projection) | BIAS::MatlabTBUndistortion |
BIAS::CameraParam::Init() | BIAS::CameraParam |
BIAS::CameraParam::Init(const std::string &filename) | BIAS::CameraParam |
BIAS::CameraParam::Init(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
InitPerspective(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InitSpherical(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InterpolateAbsZoom_() | BIAS::MatlabTBUndistortion | [protected]
InterpolateDistortionFromIndex_(unsigned int i, double relnorm) | BIAS::MatlabTBUndistortion | [protected]
InterpolateFocalLength_() | BIAS::MatlabTBUndistortion | [protected]
IsInitialized() const | BIAS::CameraParam |
IsInitialized_ | BIAS::CameraParam | [protected]
IsPerspective() const | BIAS::CameraParam | [inline]
IsSpherical() const | BIAS::CameraParam | [inline]
IsZoomCamera() const | BIAS::CameraParam |
kc1Def_ | BIAS::CameraParam | [protected]
kc1Zoom_ | BIAS::MatlabTBUndistortion | [protected]
kc2Def_ | BIAS::CameraParam | [protected]
kc2Zoom_ | BIAS::MatlabTBUndistortion | [protected]
kc3Def_ | BIAS::CameraParam | [protected]
kc3Zoom_ | BIAS::MatlabTBUndistortion | [protected]
kc4Def_ | BIAS::CameraParam | [protected]
kc4Zoom_ | BIAS::MatlabTBUndistortion | [protected]
knownparams_vect_ | BIAS::MatlabTBUndistortion | [protected]
LensIsSpherical_ | BIAS::CameraParam | [protected]
LensModel_ | BIAS::CameraParam | [protected]
LuT_ | BIAS::MatlabTBUndistortion | [protected]
MatlabTBUndistortion() | BIAS::MatlabTBUndistortion |
MatlabTBUndistortion(const CameraParam &cp) | BIAS::MatlabTBUndistortion |
MaxCamAngle_ | BIAS::CameraParam | [protected]
principalX_ | BIAS::CameraParam | [protected]
principalY_ | BIAS::CameraParam | [protected]
radius_ | BIAS::CameraParam | [protected]
ReadCameraData(const std::string &Filename) | BIAS::CameraParam |
ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadFromEXIF(const std::string &filename) | BIAS::CameraParam |
SetCellSize(const double CellSizeX, const double AspectRatio) | BIAS::CameraParam |
SetData_EVID31_147094() | BIAS::CameraParam |
SetData_OMNITECH_ORIFL_190_3() | BIAS::CameraParam |
SetDownsampling(const double factor) | BIAS::CameraParam |
SetFocalLength(const double f) | BIAS::MatlabTBUndistortion |
SetPrincipal(const double x, const double y) | BIAS::CameraParam |
SetRadius(double r) | BIAS::CameraParam | [inline]
SetSize(unsigned int w, unsigned int h) | BIAS::CameraParam | [inline]
SetUnzoomed() | BIAS::MatlabTBUndistortion |
SetupProjectionLUT(const unsigned int &srcwidth, const unsigned int &srcheight, const unsigned int &ChanCnt, const unsigned int &SizeX, const unsigned int &SizeY) | BIAS::MatlabTBUndistortion |
SetZoom(const double abszoom) | BIAS::MatlabTBUndistortion |
SetZoomCamera(const bool zoomCam) | BIAS::CameraParam |
Undistort(BIAS::HomgPoint2D &point2d) const | BIAS::MatlabTBUndistortion |
Undistort(double &origx, double &origy) const | BIAS::MatlabTBUndistortion |
UndistortFast(const Image< unsigned char > &src, Image< unsigned char > &dst) | BIAS::MatlabTBUndistortion |
width_ | BIAS::CameraParam | [protected]
WriteCameraData(const std::string &Filename) const | BIAS::CameraParam |
zoom_ | BIAS::CameraParam | [protected]
zoomCamera_ | BIAS::CameraParam | [protected]
~CameraParam() | BIAS::CameraParam |
~MatlabTBUndistortion() | BIAS::MatlabTBUndistortion |

Generated on Wed Jun 21 19:08:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Matrix2x2< T > Member List

This is the complete list of members for BIAS::Matrix2x2< T >, including all inherited members.

Add(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
AddIP(const T &scalar) | BIAS::Matrix< T > | [inline]
AddIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< T > |
BinWrite(const char *filename) const | BIAS::Matrix< T > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix2x2< T > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
DivideIP(const T &scalar) | BIAS::Matrix< T > | [inline]
EigenvalueDecomposition(T &value1, Vector2< T > &vector1, T &value2, Vector2< T > &vector2) const | BIAS::Matrix2x2< T > |
EigenvalueDecomposition(double &value1, Vector2< double > &vec1, double &value2, Vector2< double > &vec2) const | BIAS::Matrix2x2< T > |
element_type typedef | TNT::Matrix< T > |
Fill(const T &scalar) | BIAS::Matrix< T > |
GetCol(const int &col) const | BIAS::Matrix< T > |
GetCols() const | BIAS::Matrix< T > | [inline]
GetData() const | BIAS::Matrix< T > | [inline]
GetDataArray() const | BIAS::Matrix< T > | [inline]
GetDataArray1() const | BIAS::Matrix< T > | [inline]
GetDataLast() const | BIAS::Matrix< T > | [inline]
GetMax() const | BIAS::Matrix< T > |
GetMaxMin(T &max, T &min) const | BIAS::Matrix< T > |
GetMean() const | BIAS::Matrix< T > |
GetMin() const | BIAS::Matrix< T > |
GetNumElements() const | BIAS::Matrix< T > | [inline]
GetRow(const int &row) const | BIAS::Matrix< T > |
GetRows() const | BIAS::Matrix< T > | [inline]
GetSystemMatrix(Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert(Matrix2x2< T > &result) const | BIAS::Matrix2x2< T > |
Invert() const | BIAS::Matrix2x2< T > | [inline]
Invert(Matrix2x2< unsigned int > &result) const | BIAS::Matrix2x2< T > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< T > |
IsZero(double eps=0.0) const | BIAS::Matrix< T > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< T > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const T value) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< T > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< T > | [explicit]
Matrix(const Matrix< T > &A) | BIAS::Matrix< T > | [inline]
Matrix(const TNT::Matrix< T > &A) | BIAS::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix2x2() | BIAS::Matrix2x2< T > | [inline]
Matrix2x2(const MatrixInitType &i) | BIAS::Matrix2x2< T > | [inline, explicit]
Matrix2x2(const std::string &s) | BIAS::Matrix2x2< T > | [explicit]
Matrix2x2(const Matrix2x2< T > &A) | BIAS::Matrix2x2< T > | [inline]
Matrix2x2(const TNT::Matrix< T > &A) | BIAS::Matrix2x2< T > |
Matrix2x2(const T a0, const T a1, const T a2, const T a3) | BIAS::Matrix2x2< T > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Matrix2x2< T > | [inline]
Mult(const Matrix2x2< T > &argmat, Matrix2x2< T > &destmat) const | BIAS::Matrix2x2< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg, Matrix< T > &result) const | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
MultIP(const Matrix2x2< T > &argmat) | BIAS::Matrix2x2< T > | [inline]
Multiply(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Matrix< T > | [inline]
MultLeft(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Matrix2x2< T > | [inline]
MultLeft(const Vector2< T > &argvec) const | BIAS::Matrix2x2< T > | [inline]
BIAS::Matrix::MultLeft(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::MultLeft(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix2x2< T > |
BIAS::Matrix::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< T > |
NormalizeCols() | BIAS::Matrix< T > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< T > |
NormalizeRows() | BIAS::Matrix< T > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< T > |
NormFrobenius() const | BIAS::Matrix< T > | [inline]
NormL1() const | BIAS::Matrix< T > | [inline]
NormL2() const | BIAS::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix2x2< T > &mat, const Matrix2x2< T > &argMat) | BIAS::Matrix2x2< T > | [related]
BIAS::Matrix::operator *(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const Matrix3x3< T > &argLeft, const Matrix< T > &argMat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator *=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator!=(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator-(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix2x2< T > &mat) | BIAS::Matrix2x2< T > |
BIAS::Matrix::operator=(const TNT::Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::operator=(const Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< T > |
ScaleCol(int NoCol, T scale) | BIAS::Matrix< T > |
ScaleRow(int NoRow, T scale) | BIAS::Matrix< T > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetIdentity() | BIAS::Matrix2x2< T > | [inline]
SetRow(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetZero() | BIAS::Matrix< T > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
SubIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
SubIP(const T &scalar) | BIAS::Matrix< T > | [inline]
Trace() const | BIAS::Matrix< T > | [inline]
Transpose() const | BIAS::Matrix2x2< T > | [inline]
Transpose(const Matrix2x2< T > &arg) | BIAS::Matrix2x2< T > | [inline]
TransposeIP() | BIAS::Matrix2x2< T > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< T > | [virtual]
~Matrix2x2() | BIAS::Matrix2x2< T > | [virtual]

Generated on Wed Jun 21 19:08:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Matrix3x3< T > Member List

This is the complete list of members for BIAS::Matrix3x3< T >, including all inherited members.

Add(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
AddIP(const T &scalar) | BIAS::Matrix< T > | [inline]
AddIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< T > |
BinWrite(const char *filename) const | BIAS::Matrix< T > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< T > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
DivideIP(const T &scalar) | BIAS::Matrix< T > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const T &scalar) | BIAS::Matrix< T > |
GetCol(const int &col) const | BIAS::Matrix< T > |
GetCols() const | BIAS::Matrix< T > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< T > |
GetData() const | BIAS::Matrix< T > | [inline]
GetDataArray() const | BIAS::Matrix< T > | [inline]
GetDataArray1() const | BIAS::Matrix< T > | [inline]
GetDataLast() const | BIAS::Matrix< T > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< T > |
GetMax() const | BIAS::Matrix< T > |
GetMaxMin(T &max, T &min) const | BIAS::Matrix< T > |
GetMean() const | BIAS::Matrix< T > |
GetMin() const | BIAS::Matrix< T > |
GetNumElements() const | BIAS::Matrix< T > | [inline]
GetRow(const unsigned int row, Vector3< T > &r) const | BIAS::Matrix3x3< T > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< T > | [inline]
BIAS::Matrix::GetRow(const int &row) const | BIAS::Matrix< T > |
GetRows() const | BIAS::Matrix< T > | [inline]
GetSystemMatrix(Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< T > |
Invert(Matrix3x3< T > &inv) const | BIAS::Matrix3x3< T > |
Invert(Matrix3x3< unsigned int > &x) const | BIAS::Matrix3x3< T > |
InvertIP() | BIAS::Matrix3x3< T > |
InvertIP() | BIAS::Matrix3x3< T > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< T > |
IsZero(double eps=0.0) const | BIAS::Matrix< T > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< T > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< T > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< T > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const T value) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< T > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< T > | [explicit]
Matrix(const Matrix< T > &A) | BIAS::Matrix< T > | [inline]
Matrix(const TNT::Matrix< T > &A) | BIAS::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< T > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< T > | [explicit]
Matrix3x3(const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8) | BIAS::Matrix3x3< T > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< T > | [inline, explicit]
Matrix3x3(const Matrix3x3< T > &A) | BIAS::Matrix3x3< T > | [inline]
Matrix3x3(const Matrix< T > &A) | BIAS::Matrix3x3< T > |
Matrix3x3(const TNT::Matrix< T > &A) | BIAS::Matrix3x3< T > |
MaxMin(T &max, T &min) const | BIAS::Matrix3x3< T > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Matrix3x3< T > | [inline]
Mult(const Matrix3x3< T > &argmat, Matrix3x3< T > &destmat) const | BIAS::Matrix3x3< T > | [inline]
Mult(const Matrix3x4< T > &argmat, Matrix3x4< T > &destmat) const | BIAS::Matrix3x3< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg, Matrix< T > &result) const | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
Multiply(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Matrix< T > | [inline]
MultLeft(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
MultLeft(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< T > |
BIAS::Matrix::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< T > |
NormalizeCols() | BIAS::Matrix< T > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< T > |
NormalizeRows() | BIAS::Matrix< T > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< T > |
NormFrobenius() const | BIAS::Matrix< T > | [inline]
NormL1() const | BIAS::Matrix< T > | [inline]
NormL2() const | BIAS::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix3x3< T > &mat, const T &scalar) | BIAS::Matrix3x3< T > | [related]
operator *(const Matrix3x3< T > &argL, const Matrix3x3< T > &argR) | BIAS::Matrix3x3< T > | [related]
BIAS::Matrix::operator *(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const Matrix3x3< T > &argLeft, const Matrix< T > &argMat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator *=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator!=(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator-(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix3x3< T > &mat) | BIAS::Matrix3x3< T > | [inline]
BIAS::Matrix::operator=(const TNT::Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::operator=(const Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< T > |
Scale(const T &scalar, Matrix3x3< T > &destmat) const | BIAS::Matrix3x3< T > | [inline]
ScaleCol(int NoCol, T scale) | BIAS::Matrix< T > |
ScaleRow(int NoRow, T scale) | BIAS::Matrix< T > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< T > &vec) | BIAS::Matrix3x3< T > | [inline]
SetAsCrossProductMatrix(const T &x, const T &y, const T &z) | BIAS::Matrix3x3< T > | [inline]
SetAsCrossProductMatrix(const Vector3< unsigned int > &) | BIAS::Matrix3x3< T > | [inline]
SetAsCrossProductMatrix(const unsigned int &, const unsigned int &, const unsigned int &) | BIAS::Matrix3x3< T > | [inline]
SetCol(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetFromColumnVectors(const BIAS::Vector3< T > &v0, const BIAS::Vector3< T > &v1, const BIAS::Vector3< T > &v2) | BIAS::Matrix3x3< T > |
SetFromRowVectors(const BIAS::Vector3< T > &v0, const BIAS::Vector3< T > &v1, const BIAS::Vector3< T > &v2) | BIAS::Matrix3x3< T > |
SetFromVector(const TNT::Vector< T > &vec) | BIAS::Matrix3x3< T > |
SetIdentity() | BIAS::Matrix3x3< T > | [inline]
SetRow(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetZero() | BIAS::Matrix< T > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
SubIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
SubIP(const T &scalar) | BIAS::Matrix< T > | [inline]
Trace() const | BIAS::Matrix3x3< T > | [inline]
Transpose() const | BIAS::Matrix3x3< T > |
Transpose(const Matrix3x3< T > &arg) | BIAS::Matrix3x3< T > | [inline]
TransposedMult(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Matrix3x3< T > | [inline]
TransposeIP() | BIAS::Matrix3x3< T > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< T > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< T > | [virtual]

Generated on Wed Jun 21 19:08:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Matrix3x4< T > Member List

This is the complete list of members for BIAS::Matrix3x4< T >, including all inherited members.

Add(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
AddIP(const T &scalar) | BIAS::Matrix< T > | [inline]
AddIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< T > |
BinWrite(const char *filename) const | BIAS::Matrix< T > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
DivideIP(const T &scalar) | BIAS::Matrix< T > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const T &scalar) | BIAS::Matrix< T > |
GetCol(const int &col) const | BIAS::Matrix< T > |
GetCols() const | BIAS::Matrix< T > | [inline]
GetData() const | BIAS::Matrix< T > | [inline]
GetDataArray() const | BIAS::Matrix< T > | [inline]
GetDataArray1() const | BIAS::Matrix< T > | [inline]
GetDataLast() const | BIAS::Matrix< T > | [inline]
GetMax() const | BIAS::Matrix< T > |
GetMaxMin(T &max, T &min) const | BIAS::Matrix< T > |
GetMean() const | BIAS::Matrix< T > |
GetMin() const | BIAS::Matrix< T > |
GetNumElements() const | BIAS::Matrix< T > | [inline]
GetRow(const int &row) const | BIAS::Matrix< T > |
GetRows() const | BIAS::Matrix< T > | [inline]
GetSystemMatrix(Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< T > |
IsZero(double eps=0.0) const | BIAS::Matrix< T > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< T > |
LoadBan(const std::string &filename, const unsigned int &Time=0) | BIAS::Matrix3x4< T > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const T value) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< T > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< T > | [explicit]
Matrix(const Matrix< T > &A) | BIAS::Matrix< T > | [inline]
Matrix(const TNT::Matrix< T > &A) | BIAS::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x4() | BIAS::Matrix3x4< T > | [inline]
Matrix3x4(const std::string &s) | BIAS::Matrix3x4< T > | [explicit]
Matrix3x4(const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8, const T a9, const T a10, const T a11) | BIAS::Matrix3x4< T > |
Matrix3x4(const MatrixInitType &i) | BIAS::Matrix3x4< T > | [inline, explicit]
Matrix3x4(const Matrix3x4< T > &A) | BIAS::Matrix3x4< T > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< T > &argvec, Vector3< T > &destvec) const | BIAS::Matrix3x4< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg, Matrix< T > &result) const | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
Multiply(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Matrix< T > | [inline]
MultLeft(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
MultLeft(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x4< T > |
BIAS::Matrix::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< T > |
NormalizeCols() | BIAS::Matrix< T > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< T > |
NormalizeRows() | BIAS::Matrix< T > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< T > |
NormFrobenius() const | BIAS::Matrix< T > | [inline]
NormL1() const | BIAS::Matrix< T > | [inline]
NormL2() const | BIAS::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix3x3< T > &mat, const Matrix3x4< T > &arg) | BIAS::Matrix3x4< T > | [related]
BIAS::Matrix::operator *(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const Matrix3x3< T > &argLeft, const Matrix< T > &argMat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator *=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator!=(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator-(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< T > &mat) | BIAS::Matrix3x4< T > |
BIAS::Matrix::operator=(const TNT::Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< T > |
ScaleCol(int NoCol, T scale) | BIAS::Matrix< T > |
ScaleRow(int NoRow, T scale) | BIAS::Matrix< T > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetIdentity() | BIAS::Matrix3x4< T > | [inline]
SetRow(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetZero() | BIAS::Matrix< T > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
SubIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
SubIP(const T &scalar) | BIAS::Matrix< T > | [inline]
Trace() const | BIAS::Matrix< T > | [inline]
Transpose() const | BIAS::Matrix< T > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< T > | [virtual]
~Matrix3x4() | BIAS::Matrix3x4< T > | [virtual]

Generated on Wed Jun 21 19:08:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Matrix4x4< T > Member List

This is the complete list of members for BIAS::Matrix4x4< T >, including all inherited members.

Add(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
AddIP(const T &scalar) | BIAS::Matrix< T > | [inline]
AddIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< T > |
BinWrite(const char *filename) const | BIAS::Matrix< T > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< T > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
DivideIP(const T &scalar) | BIAS::Matrix< T > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const T &scalar) | BIAS::Matrix< T > |
GetCol(const int &col) const | BIAS::Matrix< T > |
GetCols() const | BIAS::Matrix< T > | [inline]
GetData() const | BIAS::Matrix< T > | [inline]
GetDataArray() const | BIAS::Matrix< T > | [inline]
GetDataArray1() const | BIAS::Matrix< T > | [inline]
GetDataLast() const | BIAS::Matrix< T > | [inline]
GetMax() const | BIAS::Matrix< T > |
GetMaxMin(T &max, T &min) const | BIAS::Matrix< T > |
GetMean() const | BIAS::Matrix< T > |
GetMin() const | BIAS::Matrix< T > |
GetNumElements() const | BIAS::Matrix< T > | [inline]
GetRow(const int &row) const | BIAS::Matrix< T > |
GetRows() const | BIAS::Matrix< T > | [inline]
GetSystemMatrix(Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< T > |
IsZero(double eps=0.0) const | BIAS::Matrix< T > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< T > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const T value) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< T > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< T > | [explicit]
Matrix(const Matrix< T > &A) | BIAS::Matrix< T > | [inline]
Matrix(const TNT::Matrix< T > &A) | BIAS::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix4x4() | BIAS::Matrix4x4< T > | [inline]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< T > | [explicit]
Matrix4x4(const T a0, const T a1, const T a2, const T a3, const T a4, const T a5, const T a6, const T a7, const T a8, const T a9, const T a10, const T a11, const T a12, const T a13, const T a14, const T a15) | BIAS::Matrix4x4< T > |
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< T > | [inline, explicit]
Matrix4x4(const Matrix4x4< T > &A) | BIAS::Matrix4x4< T > | [inline]
Matrix4x4(const Matrix< T > &arg) | BIAS::Matrix4x4< T > |
Matrix4x4(const TNT::Matrix< T > &A) | BIAS::Matrix4x4< T > |
Matrix4x4(const Matrix3x3< T > &R, const Vector3< T > &trans) | BIAS::Matrix4x4< T > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< T > &argvec, Vector4< T > &destvec) const | BIAS::Matrix4x4< T > | [inline]
Mult(const Matrix4x4< T > &argmat, Matrix4x4< T > &destmat) const | BIAS::Matrix4x4< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg, Matrix< T > &result) const | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BIAS::Matrix::Mult(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
Multiply(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Matrix< T > | [inline]
MultLeft(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
MultLeft(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< T > |
BIAS::Matrix::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< T > |
NormalizeCols() | BIAS::Matrix< T > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< T > |
NormalizeRows() | BIAS::Matrix< T > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< T > |
NormFrobenius() const | BIAS::Matrix< T > | [inline]
NormL1() const | BIAS::Matrix< T > | [inline]
NormL2() const | BIAS::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix4x4< T > &mat, const Matrix4x4< T > &argMat) | BIAS::Matrix4x4< T > | [related]
BIAS::Matrix::operator *(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
BIAS::Matrix::operator *(const Matrix3x3< T > &argLeft, const Matrix< T > &argMat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator *=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator!=(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator-(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< T > &mat) | BIAS::Matrix4x4< T > |
BIAS::Matrix::operator=(const TNT::Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< T > |
ScaleCol(int NoCol, T scale) | BIAS::Matrix< T > |
ScaleRow(int NoRow, T scale) | BIAS::Matrix< T > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetIdentity() | BIAS::Matrix4x4< T > | [inline]
SetRow(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetZero() | BIAS::Matrix< T > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
SubIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
SubIP(const T &scalar) | BIAS::Matrix< T > | [inline]
Trace() const | BIAS::Matrix< T > | [inline]
Transpose() const | BIAS::Matrix< T > | [inline]
TransposeIP() | BIAS::Matrix4x4< T > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< T > | [virtual]
~Matrix4x4() | BIAS::Matrix4x4< T > | [virtual]

Generated on Wed Jun 21 19:08:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Matrix< T > Member List

This is the complete list of members for BIAS::Matrix< T >, including all inherited members.

Add(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
AddIP(const T &scalar) | BIAS::Matrix< T > | [inline]
AddIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< T > |
BinWrite(const char *filename) const | BIAS::Matrix< T > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
DivideIP(const T &scalar) | BIAS::Matrix< T > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const T &scalar) | BIAS::Matrix< T > |
GetCol(const int &col) const | BIAS::Matrix< T > |
GetCols() const | BIAS::Matrix< T > | [inline]
GetData() const | BIAS::Matrix< T > | [inline]
GetDataArray() const | BIAS::Matrix< T > | [inline]
GetDataArray1() const | BIAS::Matrix< T > | [inline]
GetDataLast() const | BIAS::Matrix< T > | [inline]
GetMax() const | BIAS::Matrix< T > |
GetMaxMin(T &max, T &min) const | BIAS::Matrix< T > |
GetMean() const | BIAS::Matrix< T > |
GetMin() const | BIAS::Matrix< T > |
GetNumElements() const | BIAS::Matrix< T > | [inline]
GetRow(const int &row) const | BIAS::Matrix< T > |
GetRows() const | BIAS::Matrix< T > | [inline]
GetSystemMatrix(Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< T > |
IsZero(double eps=0.0) const | BIAS::Matrix< T > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< T > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const T value) | BIAS::Matrix< T > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< T > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< T > | [explicit]
Matrix(const Matrix< T > &A) | BIAS::Matrix< T > | [inline]
Matrix(const TNT::Matrix< T > &A) | BIAS::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Matrix< T > &arg, Matrix< T > &result) const | BIAS::Matrix< T > | [inline]
Mult(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
Mult(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
Multiply(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Matrix< T > | [inline]
MultLeft(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
MultLeft(const Vector< T > &arg, Vector< T > &result) const | BIAS::Matrix< T > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< T > |
NormalizeCols() | BIAS::Matrix< T > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< T > |
NormalizeRows() | BIAS::Matrix< T > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< T > |
NormFrobenius() const | BIAS::Matrix< T > | [inline]
NormL1() const | BIAS::Matrix< T > | [inline]
NormL2() const | BIAS::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator *(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
operator *(const Matrix3x3< T > &argLeft, const Matrix< T > &argMat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
TNT::Matrix::operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator *=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator!=(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator+=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator-(const T &scalar, const Matrix< T > &mat) | BIAS::Matrix< T > | [related]
TNT::Matrix::operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const Matrix< T > &arg) | BIAS::Matrix< T > | [related]
operator-=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/(const Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator/=(Matrix< T > &mat, const T &scalar) | BIAS::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const TNT::Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
operator=(const Matrix< T > &mat) | BIAS::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const Matrix< T > &argl, const Matrix< T > &argr) | BIAS::Matrix< T > | [related]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< T > |
ScaleCol(int NoCol, T scale) | BIAS::Matrix< T > |
ScaleRow(int NoRow, T scale) | BIAS::Matrix< T > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetIdentity() | BIAS::Matrix< T > |
SetRow(const int row, const Vector< T > &data) | BIAS::Matrix< T > |
SetZero() | BIAS::Matrix< T > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const T &scalar, Matrix< T > &dest) const | BIAS::Matrix< T > | [inline]
SubIP(const Matrix< T > &arg) | BIAS::Matrix< T > | [inline]
SubIP(const T &scalar) | BIAS::Matrix< T > | [inline]
Trace() const | BIAS::Matrix< T > | [inline]
Transpose() const | BIAS::Matrix< T > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< T > | [virtual]

Generated on Wed Jun 21 19:08:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MatrixPanel Member List

This is the complete list of members for BIAS::MatrixPanel, including all inherited members.

cols_ | BIAS::MatrixPanel | [private]
controls_ | BIAS::MatrixPanel | [private]
editable_ | BIAS::MatrixPanel | [private]
GetMatrix() | BIAS::MatrixPanel |
MatrixPanel(wxWindow *parent, wxWindowID id, bool editable) | BIAS::MatrixPanel |
rows_ | BIAS::MatrixPanel | [private]
SetMatrix(const Matrix< double > &matrix) | BIAS::MatrixPanel |

Generated on Wed Jun 21 19:08:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MDcam Member List

This is the complete list of members for BIAS::MDcam, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
ActivateScorpionTimestamp() | BIAS::MDcam |
ActiveTrigger_ | BIAS::MDcam | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int feature, bool on) | BIAS::MDcam |
Camera_ | BIAS::MDcam | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebuglevelDcam_ | BIAS::MDcam | [protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EqualizeFeature(int master, int feature) | BIAS::MDcam |
ExternalTrigger(bool on, bool active) | BIAS::MDcam |
ExternalTrigger_ | BIAS::MDcam | [protected]
Fps_ | BIAS::MDcam | [protected]
GetCamera(int n) | BIAS::MDcam | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGain() | BIAS::MDcam | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetID(int i) | BIAS::MDcam | [inline]
GetNumCams() | BIAS::MDcam | [inline]
GetShutter() | BIAS::MDcam | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
GrabSingle(BIAS::Camera< unsigned char > *Image) | BIAS::MDcam |
InitCameras(const std::string filename) | BIAS::MDcam |
MDcam() | BIAS::MDcam |
NumCams_ | BIAS::MDcam | [protected]
OnePushAuto(int feature) | BIAS::MDcam |
operator=(const Debug &d) | BIAS::Debug | [inline]
ParPort_ | BIAS::MDcam | [protected]
PostGrab() | BIAS::MDcam |
PreGrab() | BIAS::MDcam |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReleaseCameras() | BIAS::MDcam |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ScanBus(int bus, std::ofstream &ofs) | BIAS::MDcam |
SetCamera(CameraParameterSet camparam) | BIAS::MDcam |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevelDcam(int d) | BIAS::MDcam |
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFeature(int feature, unsigned int value) | BIAS::MDcam |
SetFps(float fps) | BIAS::MDcam | [inline]
SetGain(float g) | BIAS::MDcam |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::MDcam |
~Debug() | BIAS::Debug | [inline]
~MDcam() | BIAS::MDcam |

Generated on Wed Jun 21 19:08:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Mean< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Mean< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int group_id, const std::string &postfix) | BIAS::Mean< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_fm | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MeanSize | BIAS::Mean< InputStorageType, OutputStorageType > | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_SetKernel() | BIAS::Mean< InputStorageType, OutputStorageType > | [protected]
_tmpFloat | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_tmpInt | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CalculationInFloat() const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
ConvFloatHori_(const Image< InputStorageType > &src, Image< CONV_FLOAT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvFloatVert_(const Image< CONV_FLOAT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntHori_(const Image< InputStorageType > &src, Image< CONV_INT > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntMat_(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
ConvIntVert_(const Image< CONV_INT > &src, Image< OutputStorageType > &dst) | BIAS::Convolution< InputStorageType, OutputStorageType > | [protected]
Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const std::string &postfix="") | BIAS::Convolution< InputStorageType, OutputStorageType > |
Convolution(Param &para, const int group_id, const std::string &postfix) | BIAS::Convolution< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > | [virtual]
FilterMean(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > |
FilterMean2x2(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > |
FilterMean2x2Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Mean< InputStorageType, OutputStorageType > |
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Mean< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKernel(FilterMask &fm) const | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
GetSize() const | BIAS::Mean< InputStorageType, OutputStorageType > | [inline]
GetSizePointer() | BIAS::Mean< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Mean() | BIAS::Mean< InputStorageType, OutputStorageType > |
Mean(Param &para, const std::string &postfix="") | BIAS::Mean< InputStorageType, OutputStorageType > |
Mean(Param &para, const int group_id, const std::string &postfix) | BIAS::Mean< InputStorageType, OutputStorageType > |
Mean(const Mean< InputStorageType, OutputStorageType > &m) | BIAS::Mean< InputStorageType, OutputStorageType > | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintKernel() const | BIAS::Convolution< InputStorageType, OutputStorageType > |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernel(FilterMask &fm) | BIAS::Convolution< InputStorageType, OutputStorageType > | [inline]
SetSize(const int size) | BIAS::Mean< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Convolution() | BIAS::Convolution< InputStorageType, OutputStorageType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]
~Mean() | BIAS::Mean< InputStorageType, OutputStorageType > |

Generated on Wed Jun 21 19:08:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Median1D< DataType > Member List

This is the complete list of members for BIAS::Median1D< DataType >, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_Median | BIAS::Median1D< DataType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Compute(std::vector< DataType > &vec) | BIAS::Median1D< DataType > |
Compute(const std::vector< DataType > &vec) | BIAS::Median1D< DataType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMedian() | BIAS::Median1D< DataType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Median1D() | BIAS::Median1D< DataType > |
Median1D(std::vector< DataType > &vec) | BIAS::Median1D< DataType > |
Median1D(const std::vector< DataType > &vec) | BIAS::Median1D< DataType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~Median1D() | BIAS::Median1D< DataType > |

Generated on Wed Jun 21 19:08:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Median< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Median< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MedianSize | BIAS::Median< InputStorageType, OutputStorageType > | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Median< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Median< InputStorageType, OutputStorageType > | [virtual]
FilterIgnoreZero5x5(Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Median< InputStorageType, OutputStorageType > |
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Median< InputStorageType, OutputStorageType > | [virtual]
FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const std::string &postfix="") | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterNToN(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNToN< InputStorageType, OutputStorageType > |
FilterOnlyZeroIgnoreZero3x3(Image< InputStorageType > &src, Image< OutputStorageType > &dst, const float &Threshold=0.0f) | BIAS::Median< InputStorageType, OutputStorageType > |
FilterOnlyZeroIgnoreZero5x5(Image< InputStorageType > &src, Image< OutputStorageType > &dst, const float &Threshold=0.0f) | BIAS::Median< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Median< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Median() | BIAS::Median< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetSize(int newsize) | BIAS::Median< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNToN() | BIAS::FilterNToN< InputStorageType, OutputStorageType > | [inline, virtual]
~Median() | BIAS::Median< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:08:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MetaData Member List

This is the complete list of members for BIAS::MetaData, including all inherited members.

Add(enum AppData::TAppData ID, unsigned int length, char *data) | BIAS::MetaData |
Add(AppData &ad) | BIAS::MetaData |
Add(const std::string &tag, const std::string &data) | BIAS::MetaData |
Delete(enum AppData::TAppData tag) | BIAS::MetaData |
Delete(const std::string &tag) | BIAS::MetaData |
Dump(std::ostream &os=std::cout) | BIAS::MetaData |
Find(enum AppData::TAppData tag, AppData &data) | BIAS::MetaData |
Find(std::string tag, AppData &data) | BIAS::MetaData |
Find(enum AppData::TAppData tag, std::string stag, AppData &data) | BIAS::MetaData |
MetaData() | BIAS::MetaData |
MetaData(const MetaData &M) | BIAS::MetaData | [inline]
operator<<(std::ostream &is, const MetaData &md) | BIAS::MetaData | [related]
operator=(const MetaData &M) | BIAS::MetaData | [inline]
operator>>(std::istream &is, MetaData &md) | BIAS::MetaData | [related]
WriteAscii(std::ostream &os) | BIAS::MetaData |
WriteBinary(std::ostream &os) | BIAS::MetaData |
~MetaData() | BIAS::MetaData |

Generated on Wed Jun 21 19:08:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Morphology< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Morphology< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp_id, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
FillBorderConst(Image< OutputStorageType > &Image, unsigned short int XBorderSize, unsigned short int YBorderSize, OutputStorageType Value) | BIAS::Morphology< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [pure virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const =0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected, pure virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
kernelSize_ | BIAS::Morphology< InputStorageType, OutputStorageType > | [protected]
Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const std::string &postfix="") | BIAS::Morphology< InputStorageType, OutputStorageType > |
Morphology(Param &para, const int group_id, const std::string &postfix) | BIAS::Morphology< InputStorageType, OutputStorageType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKernelSize(int size) | BIAS::Morphology< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~Morphology() | BIAS::Morphology< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:08:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MSAC< SolutionType > Member List

This is the complete list of members for BIAS::MSAC< SolutionType >, including all inherited members.

_AddParameter(BIAS::Param &para, int grp, const std::string &postfix) | BIAS::MSAC< SolutionType > | [protected]
_CalculateSampleCount(double expected_inlier_fraction) | BIAS::MSAC< SolutionType > | [protected]
_CalculateTerminateScore(double sigma, double expected_inlier_fraction) | BIAS::MSAC< SolutionType > | [protected]
_dExpectedInlierFraction | BIAS::MSAC< SolutionType > | [protected]
_dExpectedSigma | BIAS::MSAC< SolutionType > | [protected]
_dTerminateScore | BIAS::MSAC< SolutionType > | [protected]
_GenerateSamplesRandom(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::MSAC< SolutionType > | [protected]
_iDataSize | BIAS::MSAC< SolutionType > | [protected]
_iSampleSize | BIAS::MSAC< SolutionType > | [protected]
_iSolutionCount | BIAS::MSAC< SolutionType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MSACConfidenceThresh | BIAS::MSAC< SolutionType > | [protected]
_MSACRefineSolution | BIAS::MSAC< SolutionType > | [protected]
_MSACSigmaFac | BIAS::MSAC< SolutionType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateSolution(const SolutionType &solution, std::vector< bool > &inlier, int &num_inliers, double &evaluate_score) | BIAS::MSAC< SolutionType > | [virtual]
GenerateSamples(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::MSAC< SolutionType > | [virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetSampleSolution(std::vector< unsigned int > &which_samples, SolutionType &solutions) | BIAS::MSAC< SolutionType > | [virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(int data_size) | BIAS::MSAC< SolutionType > |
Init(int data_size, double terminate_score, int solution_count) | BIAS::MSAC< SolutionType > |
MSAC(BIAS::Param &para) | BIAS::MSAC< SolutionType > |
MSAC(BIAS::Param &para, const int grp, const std::string &postfix) | BIAS::MSAC< SolutionType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RefineSolution(std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers) | BIAS::MSAC< SolutionType > | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SolveMaster(SolutionType &solution, std::vector< bool > &inliers) | BIAS::MSAC< SolutionType > |
~Debug() | BIAS::Debug | [inline]
~MSAC() | BIAS::MSAC< SolutionType > | [virtual]

Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MySampleGrabberCB Member List

This is the complete list of members for BIAS::MySampleGrabberCB, including all inherited members.

BufferCB(double SampleTime, BYTE *pBuffer, long BufferLen) | BIAS::MySampleGrabberCB |
camera_ | BIAS::MySampleGrabberCB |
mediaType | BIAS::MySampleGrabberCB | [protected]
MySampleGrabberCB(int width, int height, int depth) | BIAS::MySampleGrabberCB |
QueryInterface(REFIID riid, void **ppv) | BIAS::MySampleGrabberCB |
SampleCB(double SampleTime, IMediaSample *pSample) | BIAS::MySampleGrabberCB |
STDMETHODIMP_(ULONG) AddRef() | BIAS::MySampleGrabberCB | [inline]
STDMETHODIMP_(ULONG) Release() | BIAS::MySampleGrabberCB | [inline]
~MySampleGrabberCB() | BIAS::MySampleGrabberCB |

Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Normalization Member List

This is the complete list of members for BIAS::Normalization, including all inherited members.

Hartley(const std::vector< HomgPoint2D > &Points, std::vector< HomgPoint2D > &NormPoints, KMatrix &Normalization) const | BIAS::Normalization |
Normalization() | BIAS::Normalization | [inline]

Generated on Wed Jun 21 19:08:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::OpenGLCanvas Member List

This is the complete list of members for BIAS::OpenGLCanvas, including all inherited members.

_polygonmodeGL | BIAS::OpenGLCanvas | [protected]
animationUpdateEnabled | BIAS::OpenGLCanvasBase | [static]
Display() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCalls() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCameraView() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewExternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewInternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayClear() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::OpenGLCanvasBase |
DisplayRenderMode() | BIAS::OpenGLCanvasBase | [virtual]
DisplaySampleScene() | BIAS::OpenGLCanvasBase | [static]
DisplaySelectBuffer() | BIAS::OpenGLCanvasBase |
framecount_ | BIAS::OpenGLCanvasBase | [protected]
GetAspectRatio() const | BIAS::OpenGLCanvasBase |
GetFrameCount() const | BIAS::OpenGLCanvasBase | [inline]
GetHeight() const | BIAS::OpenGLCanvasBase |
GetInfoGL(std::ostream &os=std::cout) | BIAS::OpenGLCanvas | [virtual]
GetOwnerframe() | BIAS::OpenGLCanvasBase |
GetPixelValueDepth(const wxPoint &pos2d) const | BIAS::OpenGLCanvasBase |
GetPixelValueRGB(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetPixelValueRGBA(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetViewController() const | BIAS::OpenGLCanvas |
GetViewController() | BIAS::OpenGLCanvas |
GetVSync() | BIAS::OpenGLCanvasBase | [static]
GetWidth() const | BIAS::OpenGLCanvasBase |
idleRepaintEnabled | BIAS::OpenGLCanvas | [static]
InitMembers() | BIAS::OpenGLCanvas | [virtual]
InitWithContext() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContextDone_ | BIAS::OpenGLCanvasBase | [protected]
instance_ | BIAS::OpenGLCanvasBase | [protected]
instancesTotalNo_ | BIAS::OpenGLCanvasBase | [protected, static]
IsContextAvailable() | BIAS::OpenGLCanvasBase |
OnChar(wxKeyEvent &event) | BIAS::OpenGLCanvasBase | [virtual]
OnEraseBackground(wxEraseEvent &event) | BIAS::OpenGLCanvasBase |
OnIdle(wxIdleEvent &event) | BIAS::OpenGLCanvas |
OnMotion(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseDown(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseWheel(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnPaint(wxPaintEvent &event) | BIAS::OpenGLCanvasBase |
OnSize(wxSizeEvent &event) | BIAS::OpenGLCanvasBase |
OpenGLCanvas(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvas(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=0, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvasBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
p_font | BIAS::OpenGLCanvasBase | [protected]
p_ownerframe | BIAS::OpenGLCanvasBase | [protected]
p_viewCtrl_ | BIAS::OpenGLCanvas | [protected]
PrintHelp(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
realtimeAnimation | BIAS::OpenGLCanvas | [static]
rendermode | BIAS::OpenGLCanvasBase | [protected]
Reshape() | BIAS::OpenGLCanvas | [virtual]
ScreenShot(BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot(const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot() | BIAS::OpenGLCanvasBase |
SetFrameCount(const unsigned long &newVal) | BIAS::OpenGLCanvasBase | [inline]
SetOwnerframe(wxFrame *ptr) | BIAS::OpenGLCanvasBase |
SetStatusText(const wxString &text, const int c_field=0) | BIAS::OpenGLCanvasBase |
SetVSync(const bool &trueForOn) | BIAS::OpenGLCanvasBase | [static]
ShowFPS(const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField) | BIAS::OpenGLCanvasBase |
ShowFPS() | BIAS::OpenGLCanvasBase |
ShowValue(const wxPoint &pos) | BIAS::OpenGLCanvasBase |
StereoI_CaptureStereoImage(const int &format, const int &quality) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetConvergence() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetInfo(std::ostream &os=std::cout) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetSeparation() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetStereoState() | BIAS::OpenGLCanvasBase | [static]
StereoI_Init() | BIAS::OpenGLCanvasBase | [static]
StereoI_SetConvergence(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetSeparation(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetStereoState(const int &val) | BIAS::OpenGLCanvasBase | [static]
SwapBuffers() | BIAS::OpenGLCanvasBase |
time | BIAS::OpenGLCanvasBase | [static]
ToggleFullScreen() | BIAS::OpenGLCanvasBase |
ToggleIP(bool &value) | BIAS::OpenGLCanvasBase | [static]
ToggleVSync() | BIAS::OpenGLCanvasBase | [static]
Unproject(const wxPoint &pos2d, double &d) | BIAS::OpenGLCanvasBase |
UpdateTime() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvas() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvasBase() | BIAS::OpenGLCanvasBase | [virtual]

Generated on Wed Jun 21 19:09:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::OpenGLCanvasBase Member List

This is the complete list of members for BIAS::OpenGLCanvasBase, including all inherited members.

animationUpdateEnabled | BIAS::OpenGLCanvasBase | [static]
Display() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCalls() | BIAS::OpenGLCanvasBase | [virtual]
DisplayClear() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::OpenGLCanvasBase |
DisplayRenderMode() | BIAS::OpenGLCanvasBase | [virtual]
DisplaySampleScene() | BIAS::OpenGLCanvasBase | [static]
DisplaySelectBuffer() | BIAS::OpenGLCanvasBase |
framecount_ | BIAS::OpenGLCanvasBase | [protected]
GetAspectRatio() const | BIAS::OpenGLCanvasBase |
GetFrameCount() const | BIAS::OpenGLCanvasBase | [inline]
GetHeight() const | BIAS::OpenGLCanvasBase |
GetInfoGL(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
GetOwnerframe() | BIAS::OpenGLCanvasBase |
GetPixelValueDepth(const wxPoint &pos2d) const | BIAS::OpenGLCanvasBase |
GetPixelValueRGB(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetPixelValueRGBA(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetVSync() | BIAS::OpenGLCanvasBase | [static]
GetWidth() const | BIAS::OpenGLCanvasBase |
InitMembers() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContext() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContextDone_ | BIAS::OpenGLCanvasBase | [protected]
instance_ | BIAS::OpenGLCanvasBase | [protected]
instancesTotalNo_ | BIAS::OpenGLCanvasBase | [protected, static]
IsContextAvailable() | BIAS::OpenGLCanvasBase |
OnChar(wxKeyEvent &event) | BIAS::OpenGLCanvasBase | [virtual]
OnEraseBackground(wxEraseEvent &event) | BIAS::OpenGLCanvasBase |
OnPaint(wxPaintEvent &event) | BIAS::OpenGLCanvasBase |
OnSize(wxSizeEvent &event) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
p_font | BIAS::OpenGLCanvasBase | [protected]
p_ownerframe | BIAS::OpenGLCanvasBase | [protected]
PrintHelp(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
rendermode | BIAS::OpenGLCanvasBase | [protected]
Reshape() | BIAS::OpenGLCanvasBase | [virtual]
ScreenShot(BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot(const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot() | BIAS::OpenGLCanvasBase |
SetFrameCount(const unsigned long &newVal) | BIAS::OpenGLCanvasBase | [inline]
SetOwnerframe(wxFrame *ptr) | BIAS::OpenGLCanvasBase |
SetStatusText(const wxString &text, const int c_field=0) | BIAS::OpenGLCanvasBase |
SetVSync(const bool &trueForOn) | BIAS::OpenGLCanvasBase | [static]
ShowFPS(const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField) | BIAS::OpenGLCanvasBase |
ShowFPS() | BIAS::OpenGLCanvasBase |
ShowValue(const wxPoint &pos) | BIAS::OpenGLCanvasBase |
StereoI_CaptureStereoImage(const int &format, const int &quality) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetConvergence() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetInfo(std::ostream &os=std::cout) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetSeparation() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetStereoState() | BIAS::OpenGLCanvasBase | [static]
StereoI_Init() | BIAS::OpenGLCanvasBase | [static]
StereoI_SetConvergence(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetSeparation(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetStereoState(const int &val) | BIAS::OpenGLCanvasBase | [static]
SwapBuffers() | BIAS::OpenGLCanvasBase |
time | BIAS::OpenGLCanvasBase | [static]
ToggleFullScreen() | BIAS::OpenGLCanvasBase |
ToggleIP(bool &value) | BIAS::OpenGLCanvasBase | [static]
ToggleVSync() | BIAS::OpenGLCanvasBase | [static]
Unproject(const wxPoint &pos2d, double &d) | BIAS::OpenGLCanvasBase |
UpdateTime() | BIAS::OpenGLCanvasBase | [virtual]
~OpenGLCanvasBase() | BIAS::OpenGLCanvasBase | [virtual]

Generated on Wed Jun 21 19:09:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Param Member List

This is the complete list of members for BIAS::Param, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParamBool(const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamDouble(const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamEnum(const std::string &name, const std::string &help, const std::vector< std::string > &enums, const int deflt=0, const std::vector< int > *IDs=NULL, const char cmdshort=0, const int Group=GRP_NOSHOW) | BIAS::Param |
AddParamInt(const std::string &name, const std::string &help, int deflt=0, int min=INT_MIN, int max=INT_MAX, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamString(const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecDbl(const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecDbl(const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecInt(const std::string &name, const std::string &help, const BIAS::Vector< int > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecInt(const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
ArgV_ | BIAS::Param | [protected]
CheckParam(const std::string &name) | BIAS::Param |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DestructorWarning_ | BIAS::Param | [protected]
DisableDestructorWarning() | BIAS::Param | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFreeGroupID() | BIAS::Param |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGroupID(const std::string &name) | BIAS::Param |
GetGroupIDForGroupName(const std::string &name) | BIAS::Param |
GetGroupName(const int group_id) | BIAS::Param |
GetParamBool(const std::string &name) const | BIAS::Param |
GetParamDouble(const std::string &name) const | BIAS::Param |
GetParamEnum(const std::string &name) const | BIAS::Param |
GetParamInt(const std::string &name) const | BIAS::Param |
GetParamMap() | BIAS::Param | [protected]
GetParamMap() const | BIAS::Param | [protected]
GetParamString(const std::string &name) const | BIAS::Param |
GetParamVecDbl(const std::string &name) const | BIAS::Param |
GetParamVecInt(const std::string &name) const | BIAS::Param |
GetSizeOfLongestParamName() | BIAS::Param |
GetSizeOfLongestParamValueString() | BIAS::Param |
GlobalDebugLevel | BIAS::Debug | [protected, static]
GroupNames_ | BIAS::Param | [protected]
IsUsedGroupID(const int group_id) | BIAS::Param |
longopts | BIAS::Param | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
Param(bool DisableDestructorWarning=false) | BIAS::Param | [explicit]
ParamMap_ | BIAS::Param | [private]
ParseCommandLine(int &argc, char *argv[]) | BIAS::Param |
ParseListFile(const std::string &ListFileName, std::vector< std::string > &LinesInFile) | BIAS::Param | [static]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadParameter(const std::string &filename) | BIAS::Param |
ReadParameterXML(const std::string &filename) | BIAS::Param |
RegisterCallbackObject(const std::string &name, ParamCallbackInterface *obj) | BIAS::Param |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaults() | BIAS::Param |
SetEnhancedFlag(const std::string &name, bool enhanced) | BIAS::Param |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetGroupName(const int group_id, const std::string &name) | BIAS::Param |
SetHiddenFlag(const std::string &name, bool hidden) | BIAS::Param |
SetParamBool(const std::string &name, const bool &value) | BIAS::Param |
SetParamDouble(const std::string &name, const double &value) | BIAS::Param |
SetParamEnum(const std::string &name, const int &value) | BIAS::Param |
SetParamEnum(const std::string &name, const std::string &value) | BIAS::Param |
SetParameterWriteToFile(const std::string &name, bool writeToFile) | BIAS::Param |
SetParamInt(const std::string &name, const int &value) | BIAS::Param |
SetParamString(const std::string &name, const std::string &value) | BIAS::Param |
SetParamVecDbl(const std::string &name, const BIAS::Vector< double > &value) | BIAS::Param |
SetParamVecInt(const std::string &name, const BIAS::Vector< int > &value) | BIAS::Param |
SetRangeInt(const std::string &name, const int min, const int max) | BIAS::Param | [virtual]
SetShortCommand(const std::string &name, const char cmd) | BIAS::Param |
SetWriteOptions(bool indent, bool comments, bool enhanced) | BIAS::Param | [inline]
ShowData(std::ostream &os=std::cout, int grp=GRP_ALL, bool showenhanced=true) | BIAS::Param |
UniqueSortedGroups() | BIAS::Param |
UpdateParameter(int &argc, char *argv[], const std::string &default_filename) | BIAS::Param |
Usage(std::ostream &os=std::cout) | BIAS::Param |
WriteComments_ | BIAS::Param | [protected]
WriteEnhanced_ | BIAS::Param | [protected]
WriteIndent_ | BIAS::Param | [protected]
WriteParameter(const std::string &filename) | BIAS::Param |
WriteParameterXML(const std::string &filename) | BIAS::Param |
WriteRunMe(const std::string &filename) | BIAS::Param |
~Debug() | BIAS::Debug | [inline]
~Param() | BIAS::Param | [virtual]

Generated on Wed Jun 21 19:09:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamCallbackInterface Member List

This is the complete list of members for BIAS::ParamCallbackInterface, including all inherited members.

ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &paramname, const void *data) | BIAS::ParamCallbackInterface | [virtual]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:09:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Parametrization Member List

This is the complete list of members for BIAS::Parametrization, including all inherited members.

EMatrixToParams(BIAS::EMatrix &Mat, Vector< double > &Params, std::vector< BIAS::HomgPoint2D > &inlier1, std::vector< BIAS::HomgPoint2D > &inlier2) | BIAS::Parametrization | [static]
F_ | BIAS::Parametrization | [protected]
Fcol_ | BIAS::Parametrization | [protected]
FMatrixToParams(const BIAS::FMatrix &Mat, std::vector< double > &Params) | BIAS::Parametrization |
FParams_ | BIAS::Parametrization | [protected]
Frow_ | BIAS::Parametrization | [protected]
Fscale_ | BIAS::Parametrization | [protected]
GetBiggestAbsEntry() | BIAS::Parametrization | [protected]
GetFScaling() | BIAS::Parametrization | [inline]
GetHScaling() | BIAS::Parametrization | [inline]
H_ | BIAS::Parametrization | [protected]
HMatrixToParams(const BIAS::HMatrix &Mat, std::vector< double > &Params) | BIAS::Parametrization |
HParams_ | BIAS::Parametrization | [protected]
Hscale_ | BIAS::Parametrization | [protected]
Parametrization() | BIAS::Parametrization |
ParamsToEMatrix(BIAS::EMatrix &Mat, const Vector< double > &Params) | BIAS::Parametrization | [static]
ParamsToFMatrix(BIAS::FMatrix &Mat, const std::vector< double > &Params) | BIAS::Parametrization |
ParamsToHMatrix(BIAS::HMatrix &Mat, const std::vector< double > &Params) | BIAS::Parametrization |
~Parametrization() | BIAS::Parametrization |

Generated on Wed Jun 21 19:09:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamGUI Member List

This is the complete list of members for BIAS::ParamGUI, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParamBool(const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamDouble(const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamEnum(const std::string &name, const std::string &help, const std::vector< std::string > &enums, const int deflt=0, const std::vector< int > *IDs=NULL, const char cmdshort=0, const int Group=GRP_NOSHOW) | BIAS::Param |
AddParamInt(const std::string &name, const std::string &help, int deflt=0, int min=INT_MIN, int max=INT_MAX, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamString(const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecDbl(const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecDbl(const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecInt(const std::string &name, const std::string &help, const BIAS::Vector< int > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
AddParamVecInt(const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) | BIAS::Param |
ArgV_ | BIAS::Param | [protected]
CheckParam(const std::string &name) | BIAS::Param |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DestructorWarning_ | BIAS::Param | [protected]
DisableDestructorWarning() | BIAS::Param | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDialog(wxWindow *parent, const wxString &title) | BIAS::ParamGUI |
GetFrame(wxWindow *parent) | BIAS::ParamGUI |
GetFreeGroupID() | BIAS::Param |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGroupID(const std::string &name) | BIAS::Param |
GetGroupIDForGroupName(const std::string &name) | BIAS::Param |
GetGroupName(const int group_id) | BIAS::Param |
GetNotebook(wxWindow *parent) | BIAS::ParamGUI |
GetPanel(wxWindow *parent, int GroupID=GRP_ALL) | BIAS::ParamGUI |
GetParamBool(const std::string &name) const | BIAS::Param |
GetParamDouble(const std::string &name) const | BIAS::Param |
GetParamEnum(const std::string &name) const | BIAS::Param |
GetParamInt(const std::string &name) const | BIAS::Param |
GetParamMap() | BIAS::Param | [protected]
GetParamMap() const | BIAS::Param | [protected]
GetParamString(const std::string &name) const | BIAS::Param |
GetParamVecDbl(const std::string &name) const | BIAS::Param |
GetParamVecInt(const std::string &name) const | BIAS::Param |
GetSizeOfLongestParamName() | BIAS::Param |
GetSizeOfLongestParamValueString() | BIAS::Param |
GlobalDebugLevel | BIAS::Debug | [protected, static]
GroupNames_ | BIAS::Param | [protected]
IsUsedGroupID(const int group_id) | BIAS::Param |
longopts | BIAS::Param | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
Param(bool DisableDestructorWarning=false) | BIAS::Param | [explicit]
ParamGUI() | BIAS::ParamGUI |
ParseCommandLine(int &argc, char *argv[]) | BIAS::Param |
ParseListFile(const std::string &ListFileName, std::vector< std::string > &LinesInFile) | BIAS::Param | [static]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadParameter(const std::string &filename) | BIAS::Param |
ReadParameterXML(const std::string &filename) | BIAS::Param |
RegisterCallbackObject(const std::string &name, ParamCallbackInterface *obj) | BIAS::Param |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaults() | BIAS::Param |
SetEnhancedFlag(const std::string &name, bool enhanced) | BIAS::Param |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetGroupName(const int group_id, const std::string &name) | BIAS::Param |
SetHiddenFlag(const std::string &name, bool hidden) | BIAS::Param |
SetParamBool(const std::string &name, const bool &value) | BIAS::Param |
SetParamDouble(const std::string &name, const double &value) | BIAS::Param |
SetParamEnum(const std::string &name, const int &value) | BIAS::Param |
SetParamEnum(const std::string &name, const std::string &value) | BIAS::Param |
SetParameterWriteToFile(const std::string &name, bool writeToFile) | BIAS::Param |
SetParamInt(const std::string &name, const int &value) | BIAS::Param |
SetParamString(const std::string &name, const std::string &value) | BIAS::Param |
SetParamVecDbl(const std::string &name, const BIAS::Vector< double > &value) | BIAS::Param |
SetParamVecInt(const std::string &name, const BIAS::Vector< int > &value) | BIAS::Param |
SetRangeInt(const std::string &name, const int min, const int max) | BIAS::Param | [virtual]
SetShortCommand(const std::string &name, const char cmd) | BIAS::Param |
SetWriteOptions(bool indent, bool comments, bool enhanced) | BIAS::Param | [inline]
ShowData(std::ostream &os=std::cout, int grp=GRP_ALL, bool showenhanced=true) | BIAS::Param |
UniqueSortedGroups() | BIAS::Param |
UpdateParameter(int &argc, char *argv[], const std::string &default_filename) | BIAS::Param |
Usage(std::ostream &os=std::cout) | BIAS::Param |
WriteComments_ | BIAS::Param | [protected]
WriteEnhanced_ | BIAS::Param | [protected]
WriteIndent_ | BIAS::Param | [protected]
WriteParameter(const std::string &filename) | BIAS::Param |
WriteParameterXML(const std::string &filename) | BIAS::Param |
WriteRunMe(const std::string &filename) | BIAS::Param |
~Debug() | BIAS::Debug | [inline]
~Param() | BIAS::Param | [virtual]
~ParamGUI() | BIAS::ParamGUI |

Generated on Wed Jun 21 19:09:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamGUIDialog Member List

This is the complete list of members for BIAS::ParamGUIDialog, including all inherited members.

ParamGUIDialog(wxWindow *parent, const wxString &title, const wxPoint &p, const wxSize &s, ParamGUI *pg) | BIAS::ParamGUIDialog
~ParamGUIDialog() | BIAS::ParamGUIDialog

Generated on Wed Jun 21 19:09:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamGUIPanel Member List

This is the complete list of members for BIAS::ParamGUIPanel, including all inherited members.

AddBoolWidgets(BIAS::ParamTypeBool *item) | BIAS::ParamGUIPanel |
AddDoubleWidgets(BIAS::ParamTypeDouble *item) | BIAS::ParamGUIPanel |
AddEnumWidgets(BIAS::ParamTypeEnum *item) | BIAS::ParamGUIPanel |
AddIntWidgets(BIAS::ParamTypeInt *item) | BIAS::ParamGUIPanel |
AddStringWidgets(BIAS::ParamTypeString *item) | BIAS::ParamGUIPanel |
AddVecDblWidgets(BIAS::ParamTypeVecDbl *item) | BIAS::ParamGUIPanel |
AddVecIntWidgets(BIAS::ParamTypeVecInt *item) | BIAS::ParamGUIPanel |
Grid_ | BIAS::ParamGUIPanel | [protected]
OnCheckBox(wxCommandEvent &event) | BIAS::ParamGUIPanel | [protected]
OnChoice(wxCommandEvent &event) | BIAS::ParamGUIPanel | [protected]
OnSpinCtrl(wxSpinEvent &event) | BIAS::ParamGUIPanel | [protected]
OnTextEnter(wxCommandEvent &event) | BIAS::ParamGUIPanel | [protected]
ParamGUIPanel(wxWindow *parent) | BIAS::ParamGUIPanel |
Parent_ | BIAS::ParamGUIPanel | [protected]
WidgetIDs_ | BIAS::ParamGUIPanel | [private]
~ParamGUIPanel() | BIAS::ParamGUIPanel |

Generated on Wed Jun 21 19:09:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeBase Member List

This is the complete list of members for BIAS::ParamTypeBase, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeBase | [inline, virtual]
GetTypeName() | BIAS::ParamTypeBase | [inline, virtual]
GetValueString() | BIAS::ParamTypeBase | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
SetDefault() | BIAS::ParamTypeBase | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeBase | [virtual]
ShortCmd_ | BIAS::ParamTypeBase |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]

Generated on Wed Jun 21 19:09:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeBool Member List

This is the complete list of members for BIAS::ParamTypeBool, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeBool |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeBool | [inline, virtual]
GetTypeName() | BIAS::ParamTypeBool | [inline, virtual]
GetValueString() | BIAS::ParamTypeBool | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeBool() | BIAS::ParamTypeBool | [inline]
SetDefault() | BIAS::ParamTypeBool | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeBool | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeBool |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeBool() | BIAS::ParamTypeBool | [inline, virtual]

Generated on Wed Jun 21 19:09:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeDouble Member List

This is the complete list of members for BIAS::ParamTypeDouble, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeDouble |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeDouble | [inline, virtual]
GetTypeName() | BIAS::ParamTypeDouble | [inline, virtual]
GetValueString() | BIAS::ParamTypeDouble | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
max_ | BIAS::ParamTypeDouble |
min_ | BIAS::ParamTypeDouble |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeDouble() | BIAS::ParamTypeDouble | [inline]
SetDefault() | BIAS::ParamTypeDouble | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeDouble | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeDouble |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeDouble() | BIAS::ParamTypeDouble | [inline, virtual]

Generated on Wed Jun 21 19:09:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeEnum Member List

This is the complete list of members for BIAS::ParamTypeEnum, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeEnum |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeEnum | [inline, virtual]
GetTypeName() | BIAS::ParamTypeEnum | [inline, virtual]
GetValueString() | BIAS::ParamTypeEnum | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Map_ | BIAS::ParamTypeEnum |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeEnum() | BIAS::ParamTypeEnum | [inline]
SetDefault() | BIAS::ParamTypeEnum | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeEnum | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeEnum |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeEnum() | BIAS::ParamTypeEnum | [inline, virtual]

Generated on Wed Jun 21 19:09:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeInt Member List

This is the complete list of members for BIAS::ParamTypeInt, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeInt |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeInt | [inline, virtual]
GetTypeName() | BIAS::ParamTypeInt | [inline, virtual]
GetValueString() | BIAS::ParamTypeInt | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
max_ | BIAS::ParamTypeInt |
min_ | BIAS::ParamTypeInt |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeInt() | BIAS::ParamTypeInt | [inline]
SetDefault() | BIAS::ParamTypeInt | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeInt | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeInt |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeInt() | BIAS::ParamTypeInt | [inline, virtual]

Generated on Wed Jun 21 19:09:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeString Member List

This is the complete list of members for BIAS::ParamTypeString, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeString |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeString | [inline, virtual]
GetTypeName() | BIAS::ParamTypeString | [inline, virtual]
GetValueString() | BIAS::ParamTypeString | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeString() | BIAS::ParamTypeString | [inline]
SetDefault() | BIAS::ParamTypeString | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeString | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeString |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeString() | BIAS::ParamTypeString | [inline, virtual]

Generated on Wed Jun 21 19:09:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeVecDbl Member List

This is the complete list of members for BIAS::ParamTypeVecDbl, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeVecDbl |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeBase | [inline, virtual]
GetTypeName() | BIAS::ParamTypeVecDbl | [inline, virtual]
GetValueString() | BIAS::ParamTypeVecDbl | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeVecDbl() | BIAS::ParamTypeVecDbl | [inline]
SetDefault() | BIAS::ParamTypeVecDbl | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeVecDbl | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeVecDbl |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeVecDbl() | BIAS::ParamTypeVecDbl | [inline, virtual]

Generated on Wed Jun 21 19:09:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ParamTypeVecInt Member List

This is the complete list of members for BIAS::ParamTypeVecInt, including all inherited members.

CallbackObject_ | BIAS::ParamTypeBase |
default_ | BIAS::ParamTypeVecInt |
Enhanced_ | BIAS::ParamTypeBase |
GetHint() | BIAS::ParamTypeBase | [inline, virtual]
GetTypeName() | BIAS::ParamTypeVecInt | [inline, virtual]
GetValueString() | BIAS::ParamTypeVecInt | [inline, virtual]
Group_ | BIAS::ParamTypeBase |
Help_ | BIAS::ParamTypeBase |
Hidden_ | BIAS::ParamTypeBase |
Name_ | BIAS::ParamTypeBase |
ParamTypeBase() | BIAS::ParamTypeBase |
ParamTypeVecInt() | BIAS::ParamTypeVecInt | [inline]
SetDefault() | BIAS::ParamTypeVecInt | [inline, virtual]
SetFromString(const std::string &s) | BIAS::ParamTypeVecInt | [inline, virtual]
ShortCmd_ | BIAS::ParamTypeBase |
value_ | BIAS::ParamTypeVecInt |
WriteToFile_ | BIAS::ParamTypeBase |
~ParamTypeBase() | BIAS::ParamTypeBase | [virtual]
~ParamTypeVecInt() | BIAS::ParamTypeVecInt | [inline, virtual]

Generated on Wed Jun 21 19:09:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PlaneRANSAC Member List

This is the complete list of members for BIAS::PlaneRANSAC, including all inherited members.

_bRefineSolution | BIAS::RANSAC< HomgPlane3D > | [protected]
_dBestInlierEvaluateScore | BIAS::RANSAC< HomgPlane3D > | [protected]
_dBestSampleEvaluateScore | BIAS::RANSAC< HomgPlane3D > | [protected]
_dExpectedInlierFraction | BIAS::PlaneRANSAC | [protected]
_dInlierDistanceThreshold | BIAS::PlaneRANSAC | [protected]
_dProbabilityOfGoodSolution | BIAS::RANSAC< HomgPlane3D > | [protected]
_dSolutionErrorThreshold | BIAS::PlaneRANSAC | [protected]
_dSoSmallSolutionChange | BIAS::RANSAC< HomgPlane3D > | [protected]
_got_solution_flag | BIAS::RANSAC< HomgPlane3D > | [protected]
_greedy | BIAS::RANSAC< HomgPlane3D > | [protected]
_iBestInlierAcceptCount | BIAS::RANSAC< HomgPlane3D > | [protected]
_iBestSampleAcceptCount | BIAS::RANSAC< HomgPlane3D > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_uiDataSize | BIAS::RANSAC< HomgPlane3D > | [protected]
_uiExplicitSampleNo | BIAS::RANSAC< HomgPlane3D > | [protected]
_uiMaxSamples | BIAS::RANSAC< HomgPlane3D > | [protected]
_uiMaxSolutionsPerSample | BIAS::RANSAC< HomgPlane3D > | [protected]
_uiSampleSize | BIAS::RANSAC< HomgPlane3D > | [protected]
_vData | BIAS::PlaneRANSAC | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeSampleCount(double inlying_data_fraction, double desired_prob_good, unsigned int sample_size) | BIAS::RANSAC< HomgPlane3D > | [protected, static]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateSolution(const HomgPlane3D &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag) | BIAS::PlaneRANSAC | [inline, virtual]
GenerateSamples(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::RANSAC< HomgPlane3D > | [virtual]
GenerateSamplesEvenspace(int sample_index, std::vector< unsigned int > &sample_table) | BIAS::RANSAC< HomgPlane3D > |
GenerateSamplesRandom(int sample_index, std::vector< unsigned int > &sampletable) | BIAS::RANSAC< HomgPlane3D > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFinalScore() const | BIAS::RANSAC< HomgPlane3D > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetSampleSolutions(std::vector< unsigned int > &which_samples, std::vector< HomgPlane3D > &solutions) | BIAS::PlaneRANSAC | [inline, virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(std::vector< HomgPoint3D > &data, unsigned int data_length, double inlier_distance_threshold, bool refine_solution, unsigned int sample_size, double expected_inlier_fraction, double solution_error_threshold) | BIAS::PlaneRANSAC | [inline]
BIAS::RANSAC< HomgPlane3D >::Init(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< HomgPlane3D > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PlaneRANSAC() | BIAS::PlaneRANSAC | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RANSAC() | BIAS::RANSAC< HomgPlane3D > |
RANSAC(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< HomgPlane3D > |
RefineSolution(std::vector< unsigned int > &which_samples, HomgPlane3D &solution, std::vector< bool > &new_inliers) | BIAS::PlaneRANSAC | [inline, virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxSamples(unsigned int max_samples) | BIAS::RANSAC< HomgPlane3D > | [inline]
SetSampleCount(unsigned int uiSamples) | BIAS::RANSAC< HomgPlane3D > | [inline]
SolveMaster(double inlying_data_fraction, HomgPlane3D &solution, std::vector< bool > &inliers) | BIAS::RANSAC< HomgPlane3D > | [virtual]
~Debug() | BIAS::Debug | [inline]
~PlaneRANSAC() | BIAS::PlaneRANSAC | [inline]
~RANSAC() | BIAS::RANSAC< HomgPlane3D > | [virtual]

Generated on Wed Jun 21 19:09:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PlueckerMatrix Member List

This is the complete list of members for BIAS::PlueckerMatrix, including all inherited members.

Add(const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
AddIP(const PLUECKERMATRIX_TYPE &scalar) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
AddIP(const Matrix< PLUECKERMATRIX_TYPE > &arg) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
CheckConstraint_() const | BIAS::PlueckerMatrix | [protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
DivideIP(const PLUECKERMATRIX_TYPE &scalar) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const PLUECKERMATRIX_TYPE &scalar) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetData() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetDirection() const | BIAS::PlueckerMatrix |
GetMax() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetMaxMin(PLUECKERMATRIX_TYPE &max, PLUECKERMATRIX_TYPE &min) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetNormal() const | BIAS::PlueckerMatrix |
GetNumElements() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetPlueckerLineCoordinates() const | BIAS::PlueckerMatrix |
GetRow(const int &row) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< PLUECKERMATRIX_TYPE > &dest) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const PLUECKERMATRIX_TYPEvalue) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [explicit]
Matrix(const Matrix< PLUECKERMATRIX_TYPE > &A) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< PLUECKERMATRIX_TYPE > &A) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix4x4() | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [explicit]
Matrix4x4(const PLUECKERMATRIX_TYPEa0, const PLUECKERMATRIX_TYPEa1, const PLUECKERMATRIX_TYPEa2, const PLUECKERMATRIX_TYPEa3, const PLUECKERMATRIX_TYPEa4, const PLUECKERMATRIX_TYPEa5, const PLUECKERMATRIX_TYPEa6, const PLUECKERMATRIX_TYPEa7, const PLUECKERMATRIX_TYPEa8, const PLUECKERMATRIX_TYPEa9, const PLUECKERMATRIX_TYPEa10, const PLUECKERMATRIX_TYPEa11, const PLUECKERMATRIX_TYPEa12, const PLUECKERMATRIX_TYPEa13, const PLUECKERMATRIX_TYPEa14, const PLUECKERMATRIX_TYPEa15) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline, explicit]
Matrix4x4(const Matrix4x4< PLUECKERMATRIX_TYPE > &A) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
Matrix4x4(const Matrix< PLUECKERMATRIX_TYPE > &arg) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
Matrix4x4(const TNT::Matrix< PLUECKERMATRIX_TYPE > &A) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
Matrix4x4(const Matrix3x3< PLUECKERMATRIX_TYPE > &R, const Vector3< PLUECKERMATRIX_TYPE > &trans) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< PLUECKERMATRIX_TYPE > &argvec, Vector4< PLUECKERMATRIX_TYPE > &destvec) const | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
Mult(const Matrix4x4< PLUECKERMATRIX_TYPE > &argmat, Matrix4x4< PLUECKERMATRIX_TYPE > &destmat) const | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult(const Matrix< PLUECKERMATRIX_TYPE > &arg, Matrix< PLUECKERMATRIX_TYPE > &result) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult(const Matrix< PLUECKERMATRIX_TYPE > &arg) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
BIAS::Matrix< PLUECKERMATRIX_TYPE >::Mult(const Vector< PLUECKERMATRIX_TYPE > &arg, Vector< PLUECKERMATRIX_TYPE > &result) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Multiply(const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
MultiplyIP(const PLUECKERMATRIX_TYPE &scalar) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
MultLeft(const Matrix< PLUECKERMATRIX_TYPE > &arg) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
MultLeft(const Vector< PLUECKERMATRIX_TYPE > &arg, Vector< PLUECKERMATRIX_TYPE > &result) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
BIAS::Matrix< PLUECKERMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< PLUECKERMATRIX_TYPE > &mat) | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > |
BIAS::Matrix< PLUECKERMATRIX_TYPE >::operator=(const TNT::Matrix< PLUECKERMATRIX_TYPE > &mat) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
PlueckerMatrix() | BIAS::PlueckerMatrix | [inline]
PlueckerMatrix(const BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > &m) | BIAS::PlueckerMatrix |
PlueckerMatrix(const HomgPoint3D &p1, const HomgPoint3D &p2) | BIAS::PlueckerMatrix | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
ScaleCol(int NoCol, PLUECKERMATRIX_TYPEscale) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
ScaleRow(int NoRow, PLUECKERMATRIX_TYPEscale) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
Set(const HomgPoint3D &p1, const HomgPoint3D &p2) | BIAS::PlueckerMatrix |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< PLUECKERMATRIX_TYPE > &data) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
SetIdentity() | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< PLUECKERMATRIX_TYPE > &data) | BIAS::Matrix< PLUECKERMATRIX_TYPE > |
SetZero() | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const PLUECKERMATRIX_TYPE &scalar, Matrix< PLUECKERMATRIX_TYPE > &dest) const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
SubIP(const Matrix< PLUECKERMATRIX_TYPE > &arg) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
SubIP(const PLUECKERMATRIX_TYPE &scalar) | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< PLUECKERMATRIX_TYPE > | [virtual]
~Matrix4x4() | BIAS::Matrix4x4< PLUECKERMATRIX_TYPE > | [virtual]
~PlueckerMatrix() | BIAS::PlueckerMatrix | [inline, virtual]

Generated on Wed Jun 21 19:09:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMatrix3DData Member List

This is the complete list of members for BIAS::PMatrix3DData, including all inherited members.

C | BIAS::PMatrix3DData
Color | BIAS::PMatrix3DData
LL | BIAS::PMatrix3DData
LR | BIAS::PMatrix3DData
name | BIAS::PMatrix3DData
PP | BIAS::PMatrix3DData
UL | BIAS::PMatrix3DData
Up | BIAS::PMatrix3DData
UR | BIAS::PMatrix3DData

Generated on Wed Jun 21 19:09:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMatrix Member List

This is the complete list of members for BIAS::PMatrix, including all inherited members.

A_ | BIAS::PMatrix | [protected]
Add(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AddIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AddIP(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AXIS_AND_ANGLE enum value | BIAS::PMatrixBase |
AXIS_TIMES_ANGLE enum value | BIAS::PMatrixBase |
Backproject(const HomgPoint2D &x, double mu=1) | BIAS::PMatrixBase |
BackprojectByZDepth(const double &x, const double &y, const double &z_depth, HomgPoint3D &res) | BIAS::PMatrix |
BackprojectPseudoinverse(const HomgPoint2D &x) | BIAS::PMatrix |
BackprojectWorldCoo(const HomgPoint2D &point, double depth, HomgPoint3D &res) | BIAS::PMatrix |
BBCIn(std::ifstream &ifs, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0) | BIAS::PMatrix |
BinRead(const char *filename) const | BIAS::Matrix< PMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< PMATRIX_TYPE > |
C_ | BIAS::PMatrix | [protected]
CheckDecomposition_() | BIAS::PMatrix | [inline, protected]
CheckSVD_() | BIAS::PMatrix | [inline, protected]
Compose(const Matrix3x3< double > &K, const Matrix3x3< double > &R, const Vector3< double > &C) | BIAS::PMatrix |
Compose(const Matrix3x3< double > &K, const Matrix3x3< double > &R, const HomgPoint3D &C) | BIAS::PMatrix |
Compose(const Matrix3x3< double > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type) | BIAS::PMatrix |
BIAS::PMatrixBase::Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
BIAS::PMatrixBase::Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) | BIAS::PMatrixBase |
BIAS::PMatrixBase::Compose(const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
BIAS::PMatrixBase::Compose(const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) | BIAS::PMatrixBase |
BIAS::PMatrixBase::Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type) | BIAS::PMatrixBase |
Compose_() | BIAS::PMatrix | [protected]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
Covariance_ | BIAS::PMatrix | [protected]
Decompose_() | BIAS::PMatrix | [protected]
DecomposeAa(BIAS::Matrix3x3< PMATRIX_TYPE > &A, BIAS::Vector3< PMATRIX_TYPE > &a) const | BIAS::PMatrix |
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
DivideIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
E_ParametrizationType enum name | BIAS::PMatrixBase |
element_type typedef | TNT::Matrix< T > |
EULER enum value | BIAS::PMatrixBase |
Fill(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > |
GetA(Vector3< double > &A) | BIAS::PMatrix |
GetA() | BIAS::PMatrix |
GetC(Vector3< double > &C) | BIAS::PMatrix |
GetC() | BIAS::PMatrix |
GetC(HomgPoint3D &C) | BIAS::PMatrix |
GetCanonicalH() const | BIAS::PMatrix |
GetCanonicalH(Matrix4x4< PMATRIX_TYPE > &ProjH) const | BIAS::PMatrix |
GetCol(const int &col) const | BIAS::Matrix< PMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetCovariance(BIAS::Matrix< double > &cov) | BIAS::PMatrix | [inline]
GetData() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetFieldOfView(const unsigned int dimX, const unsigned int dimY, const bool optmin=true) | BIAS::PMatrix |
GetFieldOfViewX(const unsigned int dimX, const unsigned int dimY) | BIAS::PMatrix | [inline]
GetFieldOfViewY(const unsigned int dimX, const unsigned int dimY, const bool &compY=true) | BIAS::PMatrix |
GetH(Vector3< double > &H) | BIAS::PMatrix |
GetH() | BIAS::PMatrix |
GetHinf(BIAS::Matrix3x3< double > &Hinf) | BIAS::PMatrix |
GetImagePlane(HomgPlane3D &plane) | BIAS::PMatrix |
GetImagePlane() | BIAS::PMatrix |
GetIntersectionOfImagePlanes(PMatrix &P, HomgLine2D &intersection) | BIAS::PMatrix |
GetIntersectionOfImagePlanes(PMatrix &P) | BIAS::PMatrix | [inline]
GetK(KMatrix &K) | BIAS::PMatrix |
GetK() | BIAS::PMatrix | [inline]
GetMax() const | BIAS::Matrix< PMATRIX_TYPE > |
GetMaxMin(PMATRIX_TYPE &max, PMATRIX_TYPE &min) const | BIAS::Matrix< PMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< PMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< PMATRIX_TYPE > |
GetNormRayWorldCoo(const HomgPoint2D &point) | BIAS::PMatrix |
GetNullVector(HomgPoint3D &C) | BIAS::PMatrix |
GetNumElements() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetPseudoInverse(BIAS::Matrix< double > &Pinv) | BIAS::PMatrix |
GetR(Matrix3x3< double > &R) | BIAS::PMatrix |
GetR() | BIAS::PMatrix | [inline]
GetRayWorldCoo(const HomgPoint2D &point) | BIAS::PMatrix |
GetRow(const int &row) const | BIAS::Matrix< PMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetSVD(Matrix< double > &U, Vector< double > &S, Matrix< double > &VT) | BIAS::PMatrix |
GetSystemMatrix(Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetUp_gl() | BIAS::PMatrix | [inline]
GetV(Vector3< double > &V) | BIAS::PMatrix |
GetV() | BIAS::PMatrix |
H0_ | BIAS::PMatrix | [protected]
Hinf_ | BIAS::PMatrix | [protected]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
InvalidateDecomposition() | BIAS::PMatrix | [inline]
IsDecomposed_ | BIAS::PMatrix | [protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< PMATRIX_TYPE > |
IsInFrontOfCamera(const Vector3< double > &X) | BIAS::PMatrix | [inline]
IsMetric() | BIAS::PMatrix | [inline]
IsMetric_ | BIAS::PMatrix | [protected]
IsZero(double eps=0.0) const | BIAS::Matrix< PMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
K_ | BIAS::PMatrix | [protected]
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::PMatrix | [inline]
LoadBan(const std::string &filename, const unsigned int &Time=0) | BIAS::Matrix3x4< PMATRIX_TYPE > |
LoadBBC(const std::string &filename, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0) | BIAS::PMatrix |
LoadBOG(const std::string &filename) | BIAS::PMatrixBase |
m_ | TNT::Matrix< T > | [protected]
MakeSVD_() | BIAS::PMatrix | [inline, protected]
Matrix() | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const PMATRIX_TYPEvalue) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< PMATRIX_TYPE > | [explicit]
Matrix(const Matrix< PMATRIX_TYPE > &A) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< PMATRIX_TYPE > &A) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x4() | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
Matrix3x4(const std::string &s) | BIAS::Matrix3x4< PMATRIX_TYPE > | [explicit]
Matrix3x4(const PMATRIX_TYPEa0, const PMATRIX_TYPEa1, const PMATRIX_TYPEa2, const PMATRIX_TYPEa3, const PMATRIX_TYPEa4, const PMATRIX_TYPEa5, const PMATRIX_TYPEa6, const PMATRIX_TYPEa7, const PMATRIX_TYPEa8, const PMATRIX_TYPEa9, const PMATRIX_TYPEa10, const PMATRIX_TYPEa11) | BIAS::Matrix3x4< PMATRIX_TYPE > |
Matrix3x4(const MatrixInitType &i) | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline, explicit]
Matrix3x4(const Matrix3x4< PMATRIX_TYPE > &A) | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< PMATRIX_TYPE > &argvec, Vector3< PMATRIX_TYPE > &destvec) const | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Multiply(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultiplyIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultLeft(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultLeft(const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::PMatrix |
BIAS::Matrix< PMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::PMatrix | [inline]
NormalizeCols() | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< PMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const PMatrix &mat) | BIAS::PMatrix |
BIAS::PMatrixBase::operator=(const PMatrixBase &mat) | BIAS::PMatrixBase | [inline]
BIAS::Matrix3x4< PMATRIX_TYPE >::operator=(const Matrix< PMATRIX_TYPE > &mat) | BIAS::Matrix3x4< PMATRIX_TYPE > |
BIAS::Matrix< PMATRIX_TYPE >::operator=(const TNT::Matrix< PMATRIX_TYPE > &mat) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
Parametrization2R_(const Vector< double > &parametrization, enum E_ParametrizationType param_type) const | BIAS::PMatrixBase | [protected]
PConsistencyBackup_ | BIAS::PMatrix | [protected]
PConsistencyBackupSVD_ | BIAS::PMatrix | [protected]
PMatrix() | BIAS::PMatrix | [inline]
PMatrix(const MatrixInitType &i) | BIAS::PMatrix | [inline, explicit]
PMatrix(const std::string &s) | BIAS::PMatrix | [explicit]
PMatrix(const PMatrix &A) | BIAS::PMatrix | [inline]
PMatrix(const PMatrixBase &Amat_) | BIAS::PMatrix | [inline]
PMatrix(const Matrix< PMATRIX_TYPE > &Amat) | BIAS::PMatrix |
PMatrix(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrix | [inline]
PMatrixBase() | BIAS::PMatrixBase | [inline]
PMatrixBase(const MatrixInitType &i) | BIAS::PMatrixBase | [inline, explicit]
PMatrixBase(const std::string &s) | BIAS::PMatrixBase | [explicit]
PMatrixBase(const PMatrixBase &A) | BIAS::PMatrixBase | [inline]
PMatrixBase(const Matrix3x4< PMATRIX_TYPE > &Amat_) | BIAS::PMatrixBase | [inline]
PMatrixBase(const Matrix< PMATRIX_TYPE > &Amat) | BIAS::PMatrixBase | [inline, explicit]
PMatrixBase(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
PMatrixBase(const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase | [inline]
pointer typedef | TNT::Matrix< T > |
QUATERNION enum value | BIAS::PMatrixBase |
R_ | BIAS::PMatrix | [protected]
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) | BIAS::PMatrix |
BIAS::PMatrixBase::Save(const std::string &filename) const | BIAS::Matrix< PMATRIX_TYPE > |
ScaleCol(int NoCol, PMATRIX_TYPEscale) | BIAS::Matrix< PMATRIX_TYPE > |
ScaleRow(int NoRow, PMATRIX_TYPEscale) | BIAS::Matrix< PMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
set_identity() | BIAS::PMatrixBase | [inline]
SetC(const Vector3< double > &newC) | BIAS::PMatrix |
SetCol(const int row, const Vector< PMATRIX_TYPE > &data) | BIAS::Matrix< PMATRIX_TYPE > |
SetCovariance(const BIAS::Matrix< double > &cov) | BIAS::PMatrix | [inline]
SetFromVector(const Vector< PMATRIX_TYPE > &vals) | BIAS::PMatrixBase |
SetIdentity() | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< PMATRIX_TYPE > &data) | BIAS::Matrix< PMATRIX_TYPE > |
SetZero() | BIAS::Matrix< PMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
SubIP(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
SubIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Svd_ | BIAS::PMatrix | [protected]
Trace() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
V0_ | BIAS::PMatrix | [protected]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
WriteCAHV_10(int cols, int rows, std::ostream &os=std::cout) | BIAS::PMatrix |
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::PMatrix | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::PMatrix | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::PMatrix | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Matrix() | BIAS::Matrix< PMATRIX_TYPE > | [virtual]
~Matrix3x4() | BIAS::Matrix3x4< PMATRIX_TYPE > | [virtual]
~PMatrix() | BIAS::PMatrix | [virtual]
~PMatrixBase() | BIAS::PMatrixBase | [virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:09:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMatrixBase Member List

This is the complete list of members for BIAS::PMatrixBase, including all inherited members.

Add(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AddIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AddIP(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
AXIS_AND_ANGLE enum value | BIAS::PMatrixBase |
AXIS_TIMES_ANGLE enum value | BIAS::PMatrixBase |
Backproject(const HomgPoint2D &x, double mu=1) | BIAS::PMatrixBase |
BinRead(const char *filename) const | BIAS::Matrix< PMATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< PMATRIX_TYPE > |
Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) | BIAS::PMatrixBase |
Compose(const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
Compose(const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) | BIAS::PMatrixBase |
Compose(const Matrix3x3< PMATRIX_TYPE > &K, const Vector< double > &parametrization, enum E_ParametrizationType param_type) | BIAS::PMatrixBase |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
DivideIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
E_ParametrizationType enum name | BIAS::PMatrixBase |
element_type typedef | TNT::Matrix< T > |
EULER enum value | BIAS::PMatrixBase |
Fill(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< PMATRIX_TYPE > |
GetCols() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetData() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetMax() const | BIAS::Matrix< PMATRIX_TYPE > |
GetMaxMin(PMATRIX_TYPE &max, PMATRIX_TYPE &min) const | BIAS::Matrix< PMATRIX_TYPE > |
GetMean() const | BIAS::Matrix< PMATRIX_TYPE > |
GetMin() const | BIAS::Matrix< PMATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetRow(const int &row) const | BIAS::Matrix< PMATRIX_TYPE > |
GetRows() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< PMATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< PMATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< PMATRIX_TYPE > |
LoadBan(const std::string &filename, const unsigned int &Time=0) | BIAS::Matrix3x4< PMATRIX_TYPE > |
LoadBOG(const std::string &filename) | BIAS::PMatrixBase |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const PMATRIX_TYPEvalue) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< PMATRIX_TYPE > | [explicit]
Matrix(const Matrix< PMATRIX_TYPE > &A) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< PMATRIX_TYPE > &A) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x4() | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
Matrix3x4(const std::string &s) | BIAS::Matrix3x4< PMATRIX_TYPE > | [explicit]
Matrix3x4(const PMATRIX_TYPEa0, const PMATRIX_TYPEa1, const PMATRIX_TYPEa2, const PMATRIX_TYPEa3, const PMATRIX_TYPEa4, const PMATRIX_TYPEa5, const PMATRIX_TYPEa6, const PMATRIX_TYPEa7, const PMATRIX_TYPEa8, const PMATRIX_TYPEa9, const PMATRIX_TYPEa10, const PMATRIX_TYPEa11) | BIAS::Matrix3x4< PMATRIX_TYPE > |
Matrix3x4(const MatrixInitType &i) | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline, explicit]
Matrix3x4(const Matrix3x4< PMATRIX_TYPE > &A) | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< PMATRIX_TYPE > &argvec, Vector3< PMATRIX_TYPE > &destvec) const | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
BIAS::Matrix< PMATRIX_TYPE >::Mult(const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Multiply(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultiplyIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultLeft(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
MultLeft(const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::PMatrixBase |
BIAS::Matrix< PMATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< PMATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< PMATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const PMatrixBase &mat) | BIAS::PMatrixBase | [inline]
BIAS::Matrix3x4< PMATRIX_TYPE >::operator=(const Matrix< PMATRIX_TYPE > &mat) | BIAS::Matrix3x4< PMATRIX_TYPE > |
BIAS::Matrix< PMATRIX_TYPE >::operator=(const TNT::Matrix< PMATRIX_TYPE > &mat) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
Parametrization2R_(const Vector< double > &parametrization, enum E_ParametrizationType param_type) const | BIAS::PMatrixBase | [protected]
PMatrixBase() | BIAS::PMatrixBase | [inline]
PMatrixBase(const MatrixInitType &i) | BIAS::PMatrixBase | [inline, explicit]
PMatrixBase(const std::string &s) | BIAS::PMatrixBase | [explicit]
PMatrixBase(const PMatrixBase &A) | BIAS::PMatrixBase | [inline]
PMatrixBase(const Matrix3x4< PMATRIX_TYPE > &Amat_) | BIAS::PMatrixBase | [inline]
PMatrixBase(const Matrix< PMATRIX_TYPE > &Amat) | BIAS::PMatrixBase | [inline, explicit]
PMatrixBase(const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase |
PMatrixBase(const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | BIAS::PMatrixBase | [inline]
pointer typedef | TNT::Matrix< T > |
QUATERNION enum value | BIAS::PMatrixBase |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< PMATRIX_TYPE > |
ScaleCol(int NoCol, PMATRIX_TYPEscale) | BIAS::Matrix< PMATRIX_TYPE > |
ScaleRow(int NoRow, PMATRIX_TYPEscale) | BIAS::Matrix< PMATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
set_identity() | BIAS::PMatrixBase | [inline]
SetCol(const int row, const Vector< PMATRIX_TYPE > &data) | BIAS::Matrix< PMATRIX_TYPE > |
SetFromVector(const Vector< PMATRIX_TYPE > &vals) | BIAS::PMatrixBase |
SetIdentity() | BIAS::Matrix3x4< PMATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< PMATRIX_TYPE > &data) | BIAS::Matrix< PMATRIX_TYPE > |
SetZero() | BIAS::Matrix< PMATRIX_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
SubIP(const Matrix< PMATRIX_TYPE > &arg) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
SubIP(const PMATRIX_TYPE &scalar) | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix< PMATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< PMATRIX_TYPE > | [virtual]
~Matrix3x4() | BIAS::Matrix3x4< PMATRIX_TYPE > | [virtual]
~PMatrixBase() | BIAS::PMatrixBase | [virtual]

Generated on Wed Jun 21 19:09:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMatrixEstimation Member List

This is the complete list of members for BIAS::PMatrixEstimation, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeFromFDirect(BIAS::FMatrix &F, const double &BaselineMagnitude, BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::PMatrixEstimation |
ComputeFromFQuasiEuklid(BIAS::FMatrix &F, double BaselineMagnitude, BIAS::PMatrix &P1, BIAS::PMatrix &P2) | BIAS::PMatrixEstimation |
ComputeRotation(BIAS::FMatrix &F, BIAS::HomgPoint2D &Epipole1, BIAS::HomgPoint2D &Epipole2, BIAS::RMatrix &R) | BIAS::PMatrixEstimation | [static]
ComputeRotationCenter(BIAS::PMatrix P1, BIAS::PMatrix P2, BIAS::RMatrix &R, BIAS::Vector3< double > &C) | BIAS::PMatrixEstimation | [static]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
FindClosestP2(BIAS::FMatrix &F, BIAS::PMatrix &P2, Matrix3x3< double > &M2Matrix, Vector< double > &C, HomgPoint2D &Epipole2) | BIAS::PMatrixEstimation | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InitP1P2Trans(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::HomgPoint2D &Epipole2) | BIAS::PMatrixEstimation | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PMatrixEstimation() | BIAS::PMatrixEstimation | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~PMatrixEstimation() | BIAS::PMatrixEstimation | [inline]

Generated on Wed Jun 21 19:09:30 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMatrixLinear Member List

This is the complete list of members for BIAS::PMatrixLinear, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Compute(std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D, PMatrix &P) | BIAS::PMatrixLinear |
Compute(std::vector< HomgPoint3D > &points3D, std::vector< HomgPoint2D > &points2D, PMatrix &P) | BIAS::PMatrixLinear |
ComputeCalibrated(const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D, PMatrix &Pose) | BIAS::PMatrixLinear |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetPEstSystemHom(Matrix< double > &A, std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D) | BIAS::PMatrixLinear |
GetPEstSystemInHom(Matrix< double > &A, Vector< double > &b, std::vector< HomgPoint3D * > &points3D, std::vector< HomgPoint2D * > &points2D) | BIAS::PMatrixLinear |
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PMatrixLinear() | BIAS::PMatrixLinear | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:09:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMDImageIO Member List

This is the complete list of members for BIAS::PMDImageIO, including all inherited members.

GetBitRep(const std::string &FileName) | BIAS::PMDImageIO | [static]
NewTagsCallback_(TIFF *tif) | BIAS::PMDImageIO | [inline, protected, static]
NewTagsInitialize_() | BIAS::PMDImageIO | [inline, protected, static]
Read(const std::string &FileName, uint8 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageIO | [static]
Read(const std::string &FileName, uint16 *&Img2D, uint16 *&ImgDepth, uint16 *&ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageIO | [static]
Read2DImage16Bit_(TIFF *tiffimage, uint16 *&Img2D, PMDImageMetaData &MetaData2D) | BIAS::PMDImageIO | [protected, static]
Read2DImage8Bit_(TIFF *tiffimage, uint8 *&Img2D, PMDImageMetaData &MetaData2D) | BIAS::PMDImageIO | [protected, static]
ReadDepthImage_(TIFF *tiffimage, uint16 *&ImgDepth, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageIO | [protected, static]
ReadMetaData_(TIFF *tiffimage, PMDImageMetaData &MetaData) | BIAS::PMDImageIO | [protected, static]
ReadModCoeffImage_(TIFF *tiffimage, uint16 *&ImgModCoeff, PMDImageMetaData MetaDataDepth) | BIAS::PMDImageIO | [protected, static]
Write(const std::string &FileName, uint8 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageIO | [static]
Write(const std::string &FileName, uint16 *Img2D, uint16 *ImgDepth, uint16 *ImgModCoeff, const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageIO | [static]
Write2DImage16Bit_(TIFF *tiffimage, uint16 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip) | BIAS::PMDImageIO | [protected, static]
Write2DImage8Bit_(TIFF *tiffimage, uint8 *Img2D, PMDImageMetaData MetaData2D, int LinesPerStrip) | BIAS::PMDImageIO | [protected, static]
WriteDepthImage_(TIFF *tiffimage, uint16 *ImgDepth, PMDImageMetaData MetaDataDepth, int LinesPerStrip) | BIAS::PMDImageIO | [protected, static]
WriteMetaData_(TIFF *tiffimage, const PMDImageMetaData &MetaData) | BIAS::PMDImageIO | [protected, static]
WriteModCoeffImage_(TIFF *tiffimage, uint16 *ImgModCoeff, PMDImageMetaData MetaDataDepth, int LinesPerStrip) | BIAS::PMDImageIO | [protected, static]

Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMDImageProc Member List

This is the complete list of members for BIAS::PMDImageProc, including all inherited members.

CalcSigmaDepth(Image< float > &ImgDepth, unsigned int x, unsigned int y) | BIAS::PMDImageProc | [static]
Convert_(float val, float lower, float upper) | BIAS::PMDImageProc | [protected, static]
Convert_(uint16 val, float lower, float upper) | BIAS::PMDImageProc | [protected, static]
DepthConvert_(float depth) | BIAS::PMDImageProc | [protected, static]
DepthConvert_(uint16 depth) | BIAS::PMDImageProc | [protected, static]
FitDepthTo2DImage(Image< float > &ImgDepth, const PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageProc | [static]
HFromMeta_(const PMDImageMetaData &MetaData2D, const PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageProc | [protected, static]
KFromMeta(const PMDImageMetaData &MetaData) | BIAS::PMDImageProc | [static]
ModCoeffConvert_(float modcoeff) | BIAS::PMDImageProc | [protected, static]
ModCoeffConvert_(uint16 modcoeff) | BIAS::PMDImageProc | [protected, static]
PoseFromMeta(const PMDImageMetaData &MetaData) | BIAS::PMDImageProc | [static]
Read(const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageProc | [static]
Write(const std::string &FileName, Image< unsigned char > &Img2D, Image< float > &ImgDepth, Image< float > &ImgModCoeff, PMDImageMetaData &MetaData2D, PMDImageMetaData &MetaDataDepth) | BIAS::PMDImageProc | [static]

Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Point3DData Member List

This is the complete list of members for BIAS::Point3DData, including all inherited members.

Color | BIAS::Point3DData
Point | BIAS::Point3DData

Generated on Wed Jun 21 19:09:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Polynom Member List

This is the complete list of members for BIAS::Polynom, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetOrder() const | BIAS::Polynom | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator *=(const Polynom &a) | BIAS::Polynom | [inline]
operator *=(const double &d) | BIAS::Polynom | [inline]
operator!=(const Polynom &a) const | BIAS::Polynom | [inline]
operator+=(const Polynom &a) | BIAS::Polynom | [inline]
operator+=(const double &d) | BIAS::Polynom | [inline]
operator-=(const Polynom &a) | BIAS::Polynom | [inline]
operator-=(const double &d) | BIAS::Polynom | [inline]
operator=(const Polynom &a) | BIAS::Polynom | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const Polynom &a) const | BIAS::Polynom | [inline]
operator[](const unsigned int i) const | BIAS::Polynom | [inline]
operator[](const unsigned int i) | BIAS::Polynom | [inline]
order_ | BIAS::Polynom | [protected]
poly_ | BIAS::Polynom | [protected]
Polynom() | BIAS::Polynom | [inline]
Polynom(const Polynom &toCopy) | BIAS::Polynom | [inline]
Polynom(unsigned int i) | BIAS::Polynom | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetOrder(unsigned int i) | BIAS::Polynom | [inline]
~Debug() | BIAS::Debug | [inline]
~Polynom() | BIAS::Polynom | [inline]

Generated on Wed Jun 21 19:09:34 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PolynomialSolve Member List

This is the complete list of members for BIAS::PolynomialSolve, including all inherited members.

_GetCoeff(int order, int b, const std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Analytic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Analytic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
CalCoefficients(const std::vector< POLYNOMIALSOLVE_TYPE > &sol, std::vector< POLYNOMIALSOLVE_TYPE > &coeff) | BIAS::PolynomialSolve |
CheckCoefficients(std::vector< POLYNOMIALSOLVE_TYPE > &coeff, double eps=DBL_EPSILON) | BIAS::PolynomialSolve |
Cubic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Cubic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluatePolynomial(const POLYNOMIALSOLVE_TYPE x, const std::vector< POLYNOMIALSOLVE_TYPE > &coeff) | BIAS::PolynomialSolve | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetNumberOfRealSolutions(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff) | BIAS::PolynomialSolve |
GlobalDebugLevel | BIAS::Debug | [protected, static]
HasRealSolution(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff) | BIAS::PolynomialSolve | [inline]
Linear(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Linear(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
NonLinearRefine(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
Numeric(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Numeric(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
operator=(const Debug &d) | BIAS::Debug | [inline]
PolynomialSolve() | BIAS::PolynomialSolve | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Quadratic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Quadratic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
Quartic(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Solve(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< POLYNOMIALSOLVE_TYPE > &sol) | BIAS::PolynomialSolve |
Solve(const std::vector< POLYNOMIALSOLVE_TYPE > &coeff, std::vector< std::complex< POLYNOMIALSOLVE_TYPE > > &sol) | BIAS::PolynomialSolve |
~Debug() | BIAS::Debug | [inline]
~PolynomialSolve() | BIAS::PolynomialSolve | [inline]

Generated on Wed Jun 21 19:09:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Pose Member List

This is the complete list of members for BIAS::Pose, including all inherited members.

Add(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
AddIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
AddIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
BinRead(const char *filename) const | BIAS::Matrix< double > | [protected]
BinWrite(const char *filename) const | BIAS::Matrix< double > | [protected]
C_ | BIAS::CoordinateTransform3D | [protected]
ConcatenateLocalTransform(const CoordinateTransform3D &localT, CoordinateTransform3D &res) const | BIAS::CoordinateTransform3D |
const_iterator typedef | TNT::Matrix< T > | [protected]
const_reference typedef | TNT::Matrix< T > | [protected]
CoordinateTransform3D() | BIAS::CoordinateTransform3D | [inline]
CoordinateTransform3D(const CoordinateTransform3D &c) | BIAS::CoordinateTransform3D | [inline]
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
Cov_ | BIAS::Pose | [protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< double > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline, protected]
Divide(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
DivideIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
element_type typedef | TNT::Matrix< T > | [protected]
Fill(const double &scalar) | BIAS::Matrix< double > | [protected]
GetC() const | BIAS::CoordinateTransform3D | [inline]
GetCol(const int &col) const | BIAS::Matrix< double > | [protected]
GetCols() const | BIAS::Matrix< double > | [inline, protected]
GetCov() const | BIAS::Pose | [inline]
GetCovariance() const | BIAS::Pose | [inline]
GetCovC() | BIAS::Pose |
GetCovQ() | BIAS::Pose |
GetCQ() const | BIAS::CoordinateTransform3D | [inline]
GetData() const | BIAS::Matrix< double > | [inline, protected]
GetDataArray() const | BIAS::Matrix< double > | [inline, protected]
GetDataArray1() const | BIAS::Matrix< double > | [inline, protected]
GetDataLast() const | BIAS::Matrix< double > | [inline, protected]
GetGlobalToLocalTransform() const | BIAS::CoordinateTransform3D | [inline]
GetLocalToGlobalTransform() const | BIAS::CoordinateTransform3D | [inline]
GetMatrix3x4() const | BIAS::CoordinateTransform3D |
GetMax() const | BIAS::Matrix< double > | [protected]
GetMaxMin(double &max, double &min) const | BIAS::Matrix< double > | [protected]
GetMean() const | BIAS::Matrix< double > | [protected]
GetMin() const | BIAS::Matrix< double > | [protected]
GetNumElements() const | BIAS::Matrix< double > | [inline, protected]
GetPoseParameters() const | BIAS::Pose | [inline]
GetQ() const | BIAS::CoordinateTransform3D | [inline]
GetR() const | BIAS::CoordinateTransform3D | [inline]
GetRow(const int &row) const | BIAS::Matrix< double > | [protected]
GetRows() const | BIAS::Matrix< double > | [inline, protected]
GetSystemMatrix(Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
GlobalToLocal(const HomgPoint3D &X_G) const | BIAS::CoordinateTransform3D | [inline]
GlobalToLocal(HomgPoint3D &X_G, HomgPoint3DCov &Cov_G) const | BIAS::CoordinateTransform3D | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
InvertIP() | BIAS::CoordinateTransform3D | [inline]
invTransform_ | BIAS::CoordinateTransform3D | [protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< double > | [protected]
IsZero(double eps=0.0) const | BIAS::Matrix< double > | [protected]
iterator typedef | TNT::Matrix< T > | [protected]
lbound() const | TNT::Matrix< T > | [inline, protected]
Load(const std::string &inputFile) | BIAS::Pose |
LocalToGlobal(const HomgPoint3D &X_L) const | BIAS::CoordinateTransform3D | [inline]
LocalToGlobal(HomgPoint3D &X_L, HomgPoint3DCov &Cov_L) const | BIAS::CoordinateTransform3D | [inline]
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols) | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols, const doublevalue) | BIAS::Matrix< double > | [inline, protected]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< double > | [inline, protected]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< double > | [explicit, protected]
Matrix(const Matrix< double > &A) | BIAS::Matrix< double > | [inline, protected]
Matrix(const TNT::Matrix< double > &A) | BIAS::Matrix< double > | [inline, protected]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline, protected]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline, protected]
Matrix4x4() | BIAS::Matrix4x4< double > | [inline, protected]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< double > | [explicit, protected]
Matrix4x4(const doublea0, const doublea1, const doublea2, const doublea3, const doublea4, const doublea5, const doublea6, const doublea7, const doublea8, const doublea9, const doublea10, const doublea11, const doublea12, const doublea13, const doublea14, const doublea15) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< double > | [inline, explicit, protected]
Matrix4x4(const Matrix4x4< double > &A) | BIAS::Matrix4x4< double > | [inline, protected]
Matrix4x4(const Matrix< double > &arg) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const TNT::Matrix< double > &A) | BIAS::Matrix4x4< double > | [protected]
Matrix4x4(const Matrix3x3< double > &R, const Vector3< double > &trans) | BIAS::Matrix4x4< double > | [protected]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< double > &argvec, Vector4< double > &destvec) const | BIAS::Matrix4x4< double > | [inline, protected]
Mult(const Matrix4x4< double > &argmat, Matrix4x4< double > &destmat) const | BIAS::Matrix4x4< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg, Matrix< double > &result) const | BIAS::Matrix< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
BIAS::Matrix< double >::Mult(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline, protected]
Multiply(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
MultiplyIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
MultLeft(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
MultLeft(const Vector< double > &arg, Vector< double > &result) const | BIAS::Matrix< double > | [inline, protected]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< double > | [protected]
BIAS::Matrix< double >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Normalize() | BIAS::Matrix< double > | [protected]
NormalizeCols() | BIAS::Matrix< double > | [protected]
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< double > | [protected]
NormalizeRows() | BIAS::Matrix< double > | [protected]
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< double > | [protected]
NormFrobenius() const | BIAS::Matrix< double > | [inline, protected]
NormL1() const | BIAS::Matrix< double > | [inline, protected]
NormL2() const | BIAS::Matrix< double > | [inline, protected]
num_cols() const | TNT::Matrix< T > | [inline, protected]
num_rows() const | TNT::Matrix< T > | [inline, protected]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i) const | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline, protected]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline, protected]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &os, const CoordinateTransform3D &p) | BIAS::CoordinateTransform3D | [friend]
BIAS::Matrix4x4< double >::operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Pose &p) | BIAS::Pose | [inline]
BIAS::CoordinateTransform3D::operator=(const CoordinateTransform3D &c) | BIAS::CoordinateTransform3D | [inline]
BIAS::Matrix4x4< double >::operator=(const Matrix< double > &mat) | BIAS::Matrix4x4< double > |
BIAS::Matrix< double >::operator=(const TNT::Matrix< double > &mat) | BIAS::Matrix< double > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &is, Pose &p) | BIAS::Pose | [friend]
BIAS::CoordinateTransform3D::operator>>(std::istream &is, CoordinateTransform3D &p) | BIAS::CoordinateTransform3D | [friend]
BIAS::Matrix4x4< double >::operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline, protected]
operator[](Subscript i) const | TNT::Matrix< T > | [inline, protected]
pointer typedef | TNT::Matrix< T > | [protected]
Pose() | BIAS::Pose |
Q_ | BIAS::CoordinateTransform3D | [protected]
reference typedef | TNT::Matrix< T > | [protected]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &outputFile) | BIAS::CoordinateTransform3D |
BIAS::Matrix4x4< double >::Save(const std::string &filename) const | BIAS::Matrix< double > | [protected]
scale_ | BIAS::CoordinateTransform3D | [protected]
ScaleCol(int NoCol, doublescale) | BIAS::Matrix< double > | [protected]
ScaleRow(int NoRow, doublescale) | BIAS::Matrix< double > | [protected]
Set(const PoseParametrization &pose) | BIAS::Pose |
Set(const Quaternion< POSE_TYPE > &Q, const Vector3< POSE_TYPE > &C) | BIAS::Pose |
Set(const Quaternion< POSE_TYPE > &Q, const Vector3< POSE_TYPE > &C, const Matrix< POSE_TYPE > &cov) | BIAS::Pose |
BIAS::CoordinateTransform3D::Set(const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0) | BIAS::CoordinateTransform3D | [inline]
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetC(const Vector3< POSE_TYPE > &C, const Matrix3x3< POSE_TYPE > &cov) | BIAS::Pose |
SetC(const HomgPoint3D &C, const HomgPoint3DCov &cov) | BIAS::Pose |
SetC(const Vector3< POSE_TYPE > &C) | BIAS::Pose |
BIAS::CoordinateTransform3D::SetC(const Vector3< double > &C) | BIAS::CoordinateTransform3D | [inline]
SetCol(const int row, const Vector< double > &data) | BIAS::Matrix< double > | [protected]
SetCovariance(const Matrix< POSE_TYPE > &c) | BIAS::Pose | [inline]
SetCovEuclidian(Matrix< POSE_TYPE > Cov) | BIAS::Pose |
SetFromMatrix3x4(const Matrix3x4< double > &M) | BIAS::CoordinateTransform3D |
SetIdentity() | BIAS::Matrix4x4< double > | [inline, protected]
SetQ(const Quaternion< POSE_TYPE > &Q, const Matrix4x4< POSE_TYPE > &cov) | BIAS::Pose |
SetQ(const Quaternion< POSE_TYPE > &Q) | BIAS::Pose |
BIAS::CoordinateTransform3D::SetQ(const Quaternion< double > &Q) | BIAS::CoordinateTransform3D | [inline]
SetR(const BIAS::RMatrixBase &R) | BIAS::CoordinateTransform3D |
SetRow(const int row, const Vector< double > &data) | BIAS::Matrix< double > | [protected]
SetZero() | BIAS::Matrix< double > | [inline, protected]
size() const | TNT::Matrix< T > | [inline, protected]
size_type typedef | TNT::Matrix< T > | [protected]
Sub(const double &scalar, Matrix< double > &dest) const | BIAS::Matrix< double > | [inline, protected]
SubIP(const Matrix< double > &arg) | BIAS::Matrix< double > | [inline, protected]
SubIP(const double &scalar) | BIAS::Matrix< double > | [inline, protected]
Talk() | BIAS::CoordinateTransform3D |
Trace() const | BIAS::Matrix< double > | [inline, protected]
TransformToNewGlobalBy(const CoordinateTransform3D &trsf) | BIAS::Pose |
Transpose() const | BIAS::Matrix< double > | [inline, protected]
TransposeIP() | BIAS::Matrix4x4< double > | [inline, protected]
UpdateMatrix_() | BIAS::CoordinateTransform3D | [protected]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > | [protected]
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< double > | [protected, virtual]
~Matrix4x4() | BIAS::Matrix4x4< double > | [protected, virtual]
~Pose() | BIAS::Pose |

Generated on Wed Jun 21 19:09:39 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PoseParametrization Member List

This is the complete list of members for BIAS::PoseParametrization, including all inherited members.

Cov_ | BIAS::PoseParametrization | [protected]
CQ2Pose_(const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, Vector< PP_TYPE > &pose) const | BIAS::PoseParametrization | [inline, protected]
GetCovarianceMatrix() const | BIAS::PoseParametrization | [inline]
GetCQ() const | BIAS::PoseParametrization | [inline]
GetOrientation() const | BIAS::PoseParametrization |
GetPosition() const | BIAS::PoseParametrization |
Load(const std::string &file) | BIAS::PoseParametrization |
Pose2CQ_(const Vector< PP_TYPE > &pose, Vector3< PP_TYPE > &position, Quaternion< PP_TYPE > &orientation) const | BIAS::PoseParametrization | [inline, protected]
Pose_ | BIAS::PoseParametrization | [protected]
PoseParametrization() | BIAS::PoseParametrization |
PoseParametrization(const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &covariance) | BIAS::PoseParametrization |
PoseParametrization(const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance) | BIAS::PoseParametrization |
Save(const std::string &file) const | BIAS::PoseParametrization |
Set(const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance) | BIAS::PoseParametrization |
Set(const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &Cov) | BIAS::PoseParametrization | [inline]
SetCovarianceMatrix(const Matrix< PP_TYPE > &Cov) | BIAS::PoseParametrization |
SetCQ(const Vector< PP_TYPE > &CQvec) | BIAS::PoseParametrization |
SetOrientation(const Quaternion< PP_TYPE > &q) | BIAS::PoseParametrization |
SetPosition(const Vector3< PP_TYPE > &C) | BIAS::PoseParametrization |
Transform(const Matrix4x4< PP_TYPE > &T) | BIAS::PoseParametrization |
Transform(const Vector3< double > &T, const Quaternion< double > &q) | BIAS::PoseParametrization |

Generated on Wed Jun 21 19:09:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PoseParametrizationCovariance Member List

This is the complete list of members for BIAS::PoseParametrizationCovariance, including all inherited members.

Add(const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
AddIP(const POSECOVARIANCE_TYPE &scalar) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
AddIP(const Matrix< POSECOVARIANCE_TYPE > &arg) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
Clear() | BIAS::PoseParametrizationCovariance | [inline]
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
DivideIP(const POSECOVARIANCE_TYPE &scalar) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const POSECOVARIANCE_TYPE &scalar) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetCols() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetCovC() | BIAS::PoseParametrizationCovariance |
GetCovQ() | BIAS::PoseParametrizationCovariance |
GetData() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetMax() const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetMaxMin(POSECOVARIANCE_TYPE &max, POSECOVARIANCE_TYPE &min) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetMean() const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetMin() const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetNumElements() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetRow(const int &row) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
GetRows() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
GetSystemMatrix(Matrix< POSECOVARIANCE_TYPE > &dest) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Matrix(int rows, int cols, const POSECOVARIANCE_TYPEvalue) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [explicit]
Matrix(const Matrix< POSECOVARIANCE_TYPE > &A) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Matrix(const TNT::Matrix< POSECOVARIANCE_TYPE > &A) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Matrix< POSECOVARIANCE_TYPE > &arg, Matrix< POSECOVARIANCE_TYPE > &result) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Mult(const Matrix< POSECOVARIANCE_TYPE > &arg) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Mult(const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Multiply(const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
MultiplyIP(const POSECOVARIANCE_TYPE &scalar) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
MultLeft(const Matrix< POSECOVARIANCE_TYPE > &arg) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
MultLeft(const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< POSECOVARIANCE_TYPE > |
NormalizeCols() | BIAS::Matrix< POSECOVARIANCE_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
NormalizeRows() | BIAS::Matrix< POSECOVARIANCE_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
NormFrobenius() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
NormL1() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
NormL2() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const TNT::Matrix< POSECOVARIANCE_TYPE > &mat) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
operator=(const Matrix< POSECOVARIANCE_TYPE > &mat) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
PoseParametrizationCovariance(MatrixInitType T) | BIAS::PoseParametrizationCovariance | [inline]
PoseParametrizationCovariance() | BIAS::PoseParametrizationCovariance |
PoseParametrizationCovariance(const Matrix< POSECOVARIANCE_TYPE > &T) | BIAS::PoseParametrizationCovariance | [inline, explicit]
PoseParametrizationCovariance(const TNT::Matrix< POSECOVARIANCE_TYPE > &T) | BIAS::PoseParametrizationCovariance | [inline]
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< POSECOVARIANCE_TYPE > |
ScaleCol(int NoCol, POSECOVARIANCE_TYPEscale) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
ScaleRow(int NoRow, POSECOVARIANCE_TYPEscale) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< POSECOVARIANCE_TYPE > &data) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
SetFromEulerAngles(const Matrix< double > &cov_pose, const Vector< double > &pose) | BIAS::PoseParametrizationCovariance |
SetIdentity() | BIAS::Matrix< POSECOVARIANCE_TYPE > |
SetRow(const int row, const Vector< POSECOVARIANCE_TYPE > &data) | BIAS::Matrix< POSECOVARIANCE_TYPE > |
SetZero() | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
SubIP(const Matrix< POSECOVARIANCE_TYPE > &arg) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
SubIP(const POSECOVARIANCE_TYPE &scalar) | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Trace() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
Transform(const Matrix4x4< double > &transf, const PoseParametrization &pose) | BIAS::PoseParametrizationCovariance |
Transpose() const | BIAS::Matrix< POSECOVARIANCE_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< POSECOVARIANCE_TYPE > | [virtual]
~PoseParametrizationCovariance() | BIAS::PoseParametrizationCovariance |

Generated on Wed Jun 21 19:09:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Position Member List

This is the complete list of members for BIAS::Position, including all inherited members.

operator<(const Position &p) const | BIAS::Position | [inline]
operator<<(std::ostream &os, const Position &pos) | BIAS::Position | [friend]
operator=(const Position &p) | BIAS::Position | [inline]
Position() | BIAS::Position | [inline]
Position(unsigned xx, unsigned yy) | BIAS::Position | [inline]
Position(const Position &pos) | BIAS::Position | [inline]
x | BIAS::Position |
y | BIAS::Position |
~Position() | BIAS::Position | [inline]

Generated on Wed Jun 21 19:09:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Projection3DData Member List

This is the complete list of members for BIAS::Projection3DData, including all inherited members.

A | BIAS::Projection3DData |
angle | BIAS::Projection3DData |
axis | BIAS::Projection3DData |
C | BIAS::Projection3DData |
ColorOfSelection | BIAS::Projection3DData |
H | BIAS::Projection3DData |
identifier | BIAS::Projection3DData |
Projection3DData() | BIAS::Projection3DData | [inline]
radiusSelection | BIAS::Projection3DData |
Set(const BIAS::PoseParametrization &p, const double scale=1.0) | BIAS::Projection3DData | [inline]
Set(const BIAS::Projection &p, const double scale=1.0) | BIAS::Projection3DData | [inline]
Set(const BIAS::Vector3< double > &C, const BIAS::RMatrixBase &R, const double scale=1.0) | BIAS::Projection3DData | [inline]
V | BIAS::Projection3DData |

Generated on Wed Jun 21 19:09:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Projection Member List

This is the complete list of members for BIAS::Projection, including all inherited members.

CreatePerspective(const BIAS::Pose &pose, const BIAS::KMatrix &K, int width, int height, const BIAS::Vector4< double > &UndistortionCoefficients=BIAS::Vector4< double >()) | BIAS::Projection |
DoesPointProjectIntoImage(const BIAS::HomgPoint3D &X, BIAS::HomgPoint2D &x, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
GetC(unsigned int cam=0) const | BIAS::Projection | [inline]
GetCov(unsigned int cam=0) const | BIAS::Projection | [inline, virtual]
GetExternals(unsigned int cam=0) const | BIAS::Projection | [inline]
GetIdentifier() const | BIAS::Projection | [inline]
GetParameters(unsigned int cam=0) const | BIAS::Projection | [inline]
GetParameters(unsigned int cam=0) | BIAS::Projection | [inline]
GetPose(unsigned int cam=0) const | BIAS::Projection | [inline, virtual]
GetQ(unsigned int cam=0) const | BIAS::Projection |
GetR(unsigned int cam=0) const | BIAS::Projection | [inline]
identifier_ | BIAS::Projection | [protected]
IsEmpty() const | BIAS::Projection | [inline]
operator<<(std::ostream &os, const Projection &p) | BIAS::Projection | [friend]
operator=(const Projection &p) | BIAS::Projection | [inline]
Project(const HomgPoint3D &X, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
Projection() | BIAS::Projection | [inline]
Projection(const ProjectionParametersBase &p) | BIAS::Projection | [inline]
Projection(const Projection &p) | BIAS::Projection | [inline]
ReadFromCamParamFile(const std::string &filename) | BIAS::Projection |
Rescale(float ratio, unsigned int cam=0) | BIAS::Projection | [inline]
SetC(const Vector3< double > &C, unsigned int cam=0) | BIAS::Projection | [inline]
SetCov(const Matrix< double > &Cov, unsigned int cam=0) | BIAS::Projection | [inline, virtual]
SetIdentifier(const std::string &identString) | BIAS::Projection | [inline]
SetPose(const BIAS::Pose pose, unsigned int cam=0) | BIAS::Projection | [inline, virtual]
UnProjectToCovLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
UnProjectToPoint(const HomgPoint2D &pos, double depth, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
UnProjectToRay(const HomgPoint2D &pos, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
UnProjectToRayLocal(const HomgPoint2D &pos, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const | BIAS::Projection |
vecParameters_ | BIAS::Projection | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::Projection | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::Projection | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::Projection | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Projection() | BIAS::Projection | [inline, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:09:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionDialog Member List

This is the complete list of members for BIAS::ProjectionDialog, including all inherited members.

GetProjection() const | BIAS::ProjectionDialog |
ProjectionDialog(const Projection &projection, wxWindow *parent=NULL, wxWindowID id=-1, const wxString &title=wxT("Projection")) | BIAS::ProjectionDialog |
projgui_ | BIAS::ProjectionDialog | [private]

Generated on Wed Jun 21 19:09:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionGUI Member List

This is the complete list of members for BIAS::ProjectionGUI, including all inherited members.

AddMatrixPanel(const wxString &name, wxWindowID id, bool editable) | BIAS::ProjectionGUI | [private]
AddVectorPanel(const wxString &name, wxWindowID id, bool editable) | BIAS::ProjectionGUI | [private]
GetProjection() const | BIAS::ProjectionGUI |
OnLoad(wxCommandEvent &event) | BIAS::ProjectionGUI | [private]
OnModified(wxCommandEvent &event) | BIAS::ProjectionGUI | [private]
OnNew(wxCommandEvent &event) | BIAS::ProjectionGUI | [private]
OnNormalizeQuaternion(wxCommandEvent &event) | BIAS::ProjectionGUI | [private]
OnSave(wxCommandEvent &event) | BIAS::ProjectionGUI | [private]
panelAspectRatio_ | BIAS::ProjectionGUI | [private]
panelCenter_ | BIAS::ProjectionGUI | [private]
panelFocalLength_ | BIAS::ProjectionGUI | [private]
panelImageSize_ | BIAS::ProjectionGUI | [private]
panelKMatrix_ | BIAS::ProjectionGUI | [private]
panelPrincipal_ | BIAS::ProjectionGUI | [private]
panelQuaternion_ | BIAS::ProjectionGUI | [private]
panelRadius_ | BIAS::ProjectionGUI | [private]
panelRMatrix_ | BIAS::ProjectionGUI | [private]
panelUndistortion_ | BIAS::ProjectionGUI | [private]
projection_ | BIAS::ProjectionGUI | [private]
ProjectionGUI(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel")) | BIAS::ProjectionGUI |
projectionPanel_ | BIAS::ProjectionGUI | [private]
selfModifying_ | BIAS::ProjectionGUI | [private]
SetProjection(const Projection &projection) | BIAS::ProjectionGUI |
UpdateGUI() | BIAS::ProjectionGUI | [private]

Generated on Wed Jun 21 19:09:47 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionMapping< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, including all inherited members.

aliasing_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
alphaImg_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline]
BuildPyramid_(const Image< InputStorageType > &source, bool forceInit=true) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalcCoordOffset_(const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ChangeImgSize_(Image< OutputStorageType > &, const Image< InputStorageType > &) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ClipValue_(const double &value, OutputStorageType &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipValue_(const double &value, float &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetBoundingBox(unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
GetImageValue_(const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
height_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
interpolationType_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
Map(const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
Map(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
MapBi_(const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapTri_(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetX_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetY_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
operator=(const ProjectionMapping &src) | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > |
ProjectionMapping() | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > |
ProjectionMapping(const ProjectionMapping &src) | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > |
pyramid_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
rangeChecked_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ROI_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
SetSinkCam(const Projection &P) | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [inline]
SetSourceCam(const Projection &P) | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [inline]
SinkP_ | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [protected]
SourceP_ | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [protected]
UpdatePyramidSize(const Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [virtual]
width_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
~ProjectionMapping() | BIAS::ProjectionMapping< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:09:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersBase Member List

This is the complete list of members for BIAS::ProjectionParametersBase, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Alpha_ | BIAS::UnscentedTransform | [protected]
aspectratio_ | BIAS::ProjectionParametersBase | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
Clone() const =0 | BIAS::ProjectionParametersBase | [pure virtual]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline, protected]
Debug(Debug &deb) | BIAS::Debug | [inline, protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, protected]
DoesPointProjectIntoImage(const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
DoesPointProjectIntoImageLocal(const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline, virtual]
GetAspectratio() const | BIAS::ProjectionParametersBase | [inline]
GetC() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetCov() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetDebugLevel() const | BIAS::Debug | [inline, protected]
GetDebugStream() | BIAS::Debug | [inline, protected]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, protected]
GetExternals() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, protected, static]
GetImageSize(unsigned int &Width, unsigned int &Height) const | BIAS::ProjectionParametersBase | [inline]
GetPose() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetPoseParametrization() const | BIAS::ProjectionParametersBase | [inline]
GetPrincipal(double &PrincipalX, double &PrincipalY) const | BIAS::ProjectionParametersBase | [inline]
GetQ() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetR() const | BIAS::ProjectionParametersBase | [virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ProjectionParametersBase | [protected]
Kappa_ | BIAS::UnscentedTransform | [protected]
operator<<(std::ostream &os, ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [friend]
operator=(const ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [inline, virtual]
BIAS::UnscentedTransform::operator=(const Debug &d) | BIAS::Debug | [inline, protected]
Pose_ | BIAS::ProjectionParametersBase | [protected]
principalX_ | BIAS::ProjectionParametersBase | [protected]
principalY_ | BIAS::ProjectionParametersBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, protected]
Project(const HomgPoint3D &X, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline]
ProjectLocal(const Vector3< double > &point, bool IgnoreDistortion=false) const =0 | BIAS::ProjectionParametersBase | [pure virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Rescale(float ratio) | BIAS::ProjectionParametersBase | [inline, virtual]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline, protected]
SetAspectratio(const double AspectRatio) | BIAS::ProjectionParametersBase | [inline, virtual]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline, protected]
SetC(const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetCov(const Matrix< POSE_TYPE > &Cov) | BIAS::ProjectionParametersBase | [inline, virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, protected]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, protected, static]
SetImageSize(const unsigned int w, const unsigned int h) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPose(const BIAS::Pose pose) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPoseParametrization(const PoseParametrization &pp) | BIAS::ProjectionParametersBase | [inline]
SetPrincipal(const double x, const double y) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQ(const BIAS::Quaternion< double > &Q) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQC(const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetR(const BIAS::RMatrix &R) | BIAS::ProjectionParametersBase | [inline, virtual]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform | [protected]
Transform_(const Vector< double > &src, Vector< double > &dst) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectLocal(const HomgPoint2D &pos, bool IgnoreDistortion=false) const =0 | BIAS::ProjectionParametersBase | [pure virtual]
UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false) | BIAS::ProjectionParametersBase | [virtual]
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectToRay(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
UnscentedTransform() | BIAS::UnscentedTransform | [protected]
ustIgnoreDistortion_ | BIAS::ProjectionParametersBase | [protected]
ustTransformIntoImage_ | BIAS::ProjectionParametersBase | [protected]
ViewDifference(const ProjectionParametersBase *) const | BIAS::ProjectionParametersBase | [virtual]
width_ | BIAS::ProjectionParametersBase | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::ProjectionParametersBase | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::ProjectionParametersBase | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::ProjectionParametersBase | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Debug() | BIAS::Debug | [inline, protected]
~ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [protected, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:09:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersIO Member List

This is the complete list of members for BIAS::ProjectionParametersIO, including all inherited members.

AddCameraDataToNode(XMLIO &myXML, xmlNodePtr &rootNode, const CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode, const CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
Initialize(CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
InitializeSensor(SensorData &sd) | BIAS::ProjectionParametersIO | [protected, static]
ReadCameraData(const std::string &Filename, CameraData &cd) | BIAS::ProjectionParametersIO | [static]
ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode, CameraData &cd) | BIAS::ProjectionParametersIO | [protected, static]
ReadFromEXIF(const std::string &filename, CameraData &cd) | BIAS::ProjectionParametersIO | [static]
ReadRigData(const std::string &filename, std::vector< CameraData > &vcd) | BIAS::ProjectionParametersIO | [static]
ReadRigData(const std::string &filename, std::vector< CameraData > &vcd, std::vector< SensorData > &vsd) | BIAS::ProjectionParametersIO | [static]
ReadRigDataV0_8(const std::string &filename, std::vector< CameraData > &vcd) | BIAS::ProjectionParametersIO | [protected, static]
SetData_DummyRig(std::vector< CameraData > &vcd) | BIAS::ProjectionParametersIO | [static]
SetData_EVID31_147094(CameraData &cd) | BIAS::ProjectionParametersIO | [static]
SetData_OMNITECH_ORIFL_190_3(CameraData &cd) | BIAS::ProjectionParametersIO | [static]
SetFromKMatrix(const BIAS::KMatrix &K, const int w, const int h, CameraData &cd) | BIAS::ProjectionParametersIO | [static]
WriteCameraData(const std::string &Filename, const CameraData &cd) | BIAS::ProjectionParametersIO | [static]
WriteRigData(const std::string &filename, const std::vector< CameraData > &vcd, const std::vector< SensorData > &vsd=std::vector< SensorData >(0, SensorData())) | BIAS::ProjectionParametersIO | [static]

Generated on Wed Jun 21 19:09:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersPerspective Member List

This is the complete list of members for BIAS::ProjectionParametersPerspective, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Alpha_ | BIAS::UnscentedTransform | [protected]
aspectratio_ | BIAS::ProjectionParametersBase | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
Clone() const | BIAS::ProjectionParametersPerspective | [inline, virtual]
ComputeK_() | BIAS::ProjectionParametersPerspective | [protected]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline, protected]
Debug(Debug &deb) | BIAS::Debug | [inline, protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, protected]
Distort(BIAS::HomgPoint2D &point2d) const | BIAS::ProjectionParametersPerspective |
DoesPointProjectIntoImage(const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
DoesPointProjectIntoImageLocal(const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersPerspective | [virtual]
focallength_ | BIAS::ProjectionParametersPerspective | [protected]
GetAspectratio() const | BIAS::ProjectionParametersBase | [inline]
GetC() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetCov() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetDebugLevel() const | BIAS::Debug | [inline, protected]
GetDebugStream() | BIAS::Debug | [inline, protected]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, protected]
GetExternals() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetFocalLength(double &f) const | BIAS::ProjectionParametersPerspective | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, protected, static]
GetImageSize(unsigned int &Width, unsigned int &Height) const | BIAS::ProjectionParametersBase | [inline]
GetK() const | BIAS::ProjectionParametersPerspective | [inline, virtual]
GetKinv() const | BIAS::ProjectionParametersPerspective | [inline, virtual]
GetP() const | BIAS::ProjectionParametersPerspective | [inline, virtual]
GetPose() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetPoseParametrization() const | BIAS::ProjectionParametersBase | [inline]
GetPrincipal(double &PrincipalX, double &PrincipalY) const | BIAS::ProjectionParametersBase | [inline]
GetQ() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetR() const | BIAS::ProjectionParametersBase | [virtual]
GetUndistortion(double &kc1, double &kc2, double &kc3, double &kc4) const | BIAS::ProjectionParametersPerspective | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ProjectionParametersBase | [protected]
invK_ | BIAS::ProjectionParametersPerspective | [protected]
K_ | BIAS::ProjectionParametersPerspective | [protected]
Kappa_ | BIAS::UnscentedTransform | [protected]
kc1_ | BIAS::ProjectionParametersPerspective | [protected]
kc2_ | BIAS::ProjectionParametersPerspective | [protected]
kc3_ | BIAS::ProjectionParametersPerspective | [protected]
kc4_ | BIAS::ProjectionParametersPerspective | [protected]
operator<<(std::ostream &os, ProjectionParametersPerspective &p) | BIAS::ProjectionParametersPerspective | [friend]
BIAS::ProjectionParametersBase::operator<<(std::ostream &os, ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [friend]
operator=(const ProjectionParametersPerspective &P) | BIAS::ProjectionParametersPerspective | [inline]
BIAS::ProjectionParametersBase::operator=(const ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [inline, virtual]
BIAS::UnscentedTransform::operator=(const Debug &d) | BIAS::Debug | [inline]
Pose_ | BIAS::ProjectionParametersBase | [protected]
principalX_ | BIAS::ProjectionParametersBase | [protected]
principalY_ | BIAS::ProjectionParametersBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, protected]
Project(const HomgPoint3D &X, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersPerspective() | BIAS::ProjectionParametersPerspective | [inline]
ProjectionParametersPerspective(const ProjectionParametersPerspective &P) | BIAS::ProjectionParametersPerspective | [inline]
ProjectLocal(const Vector3< double > &point, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersPerspective | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Rescale(float ratio) | BIAS::ProjectionParametersPerspective | [inline, virtual]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline, protected]
SetAspectratio(const double AspectRatio) | BIAS::ProjectionParametersPerspective | [inline, virtual]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline, protected]
SetC(const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetCov(const Matrix< POSE_TYPE > &Cov) | BIAS::ProjectionParametersBase | [inline, virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, protected]
SetFocalLengthAndAspect(double f, double AspectRatio) | BIAS::ProjectionParametersPerspective | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, protected, static]
SetImageSize(const unsigned int w, const unsigned int h) | BIAS::ProjectionParametersBase | [inline, virtual]
SetK(const KMatrix &K) | BIAS::ProjectionParametersPerspective | [inline, virtual]
SetP(const PMatrix &P) | BIAS::ProjectionParametersPerspective | [inline, virtual]
SetPose(const BIAS::Pose pose) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPoseParametrization(const PoseParametrization &pp) | BIAS::ProjectionParametersBase | [inline]
SetPrincipal(const double x, const double y) | BIAS::ProjectionParametersPerspective | [inline, virtual]
SetQ(const BIAS::Quaternion< double > &Q) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQC(const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetR(const BIAS::RMatrix &R) | BIAS::ProjectionParametersBase | [inline, virtual]
SetUndistortion(double kc1, double kc2, double kc3, double kc4) | BIAS::ProjectionParametersPerspective | [inline]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform | [protected]
Transform_(const Vector< double > &src, Vector< double > &dst) const | BIAS::ProjectionParametersBase | [virtual]
Undistort(BIAS::HomgPoint2D &point2d) const | BIAS::ProjectionParametersPerspective |
UnProjectLocal(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersPerspective | [virtual]
BIAS::ProjectionParametersBase::UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false) | BIAS::ProjectionParametersBase | [virtual]
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectToRay(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
UnscentedTransform() | BIAS::UnscentedTransform | [protected]
ustIgnoreDistortion_ | BIAS::ProjectionParametersBase | [protected]
ustTransformIntoImage_ | BIAS::ProjectionParametersBase | [protected]
ViewDifference(const ProjectionParametersBase *pPPB) const | BIAS::ProjectionParametersPerspective | [virtual]
width_ | BIAS::ProjectionParametersBase | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::ProjectionParametersPerspective | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::ProjectionParametersPerspective | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::ProjectionParametersPerspective | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Debug() | BIAS::Debug | [inline, protected]
~ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline, virtual]
~ProjectionParametersPerspective() | BIAS::ProjectionParametersPerspective | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [protected, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:09:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersProjective Member List

This is the complete list of members for BIAS::ProjectionParametersProjective, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Alpha_ | BIAS::UnscentedTransform | [protected]
aspectratio_ | BIAS::ProjectionParametersBase | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
Clone() const | BIAS::ProjectionParametersProjective | [inline, virtual]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline, protected]
Debug(Debug &deb) | BIAS::Debug | [inline, protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, protected]
DoesPointProjectIntoImage(const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
DoesPointProjectIntoImageLocal(const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline, virtual]
GetAspectratio() const | BIAS::ProjectionParametersBase | [inline]
GetC() const | BIAS::ProjectionParametersProjective | [inline, virtual]
GetCov() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetDebugLevel() const | BIAS::Debug | [inline, protected]
GetDebugStream() | BIAS::Debug | [inline, protected]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, protected]
GetExternals() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, protected, static]
GetImageSize(unsigned int &Width, unsigned int &Height) const | BIAS::ProjectionParametersBase | [inline]
GetP() const | BIAS::ProjectionParametersProjective | [inline, virtual]
GetPose() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetPoseParametrization() const | BIAS::ProjectionParametersBase | [inline]
GetPrincipal(double &PrincipalX, double &PrincipalY) const | BIAS::ProjectionParametersBase | [inline]
GetQ() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetR() const | BIAS::ProjectionParametersProjective | [inline, virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ProjectionParametersBase | [protected]
Kappa_ | BIAS::UnscentedTransform | [protected]
operator<<(std::ostream &os, ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [friend]
operator=(const ProjectionParametersProjective &P) | BIAS::ProjectionParametersProjective | [inline]
BIAS::ProjectionParametersBase::operator=(const ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [inline, virtual]
BIAS::UnscentedTransform::operator=(const Debug &d) | BIAS::Debug | [inline]
Pose_ | BIAS::ProjectionParametersBase | [protected]
principalX_ | BIAS::ProjectionParametersBase | [protected]
principalY_ | BIAS::ProjectionParametersBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, protected]
Project(const HomgPoint3D &X, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersProjective() | BIAS::ProjectionParametersProjective | [inline]
ProjectionParametersProjective(const ProjectionParametersProjective &P) | BIAS::ProjectionParametersProjective | [inline]
ProjectLocal(const Vector3< double > &point, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersProjective | [inline, virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Rescale(float ratio) | BIAS::ProjectionParametersProjective | [inline, virtual]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline, protected]
SetAspectratio(const double AspectRatio) | BIAS::ProjectionParametersBase | [inline, virtual]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline, protected]
SetC(const Vector3< double > &C) | BIAS::ProjectionParametersProjective | [inline, virtual]
SetCov(const Matrix< POSE_TYPE > &Cov) | BIAS::ProjectionParametersBase | [inline, virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, protected]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, protected, static]
SetImageSize(const unsigned int w, const unsigned int h) | BIAS::ProjectionParametersBase | [inline, virtual]
SetP(const Matrix3x4< double > &P) | BIAS::ProjectionParametersProjective | [inline]
SetPose(const BIAS::Pose pose) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPoseParametrization(const PoseParametrization &pp) | BIAS::ProjectionParametersBase | [inline]
SetPrincipal(const double x, const double y) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQ(const BIAS::Quaternion< double > &Q) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQC(const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetR(const RMatrix &R) | BIAS::ProjectionParametersProjective | [inline, virtual]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform | [protected]
Transform_(const Vector< double > &src, Vector< double > &dst) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectLocal(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersProjective | [inline, virtual]
UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersProjective | [virtual]
BIAS::ProjectionParametersBase::UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false) | BIAS::ProjectionParametersBase | [virtual]
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectToRay(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
UnscentedTransform() | BIAS::UnscentedTransform | [protected]
ustIgnoreDistortion_ | BIAS::ProjectionParametersBase | [protected]
ustTransformIntoImage_ | BIAS::ProjectionParametersBase | [protected]
ViewDifference(const ProjectionParametersBase *) const | BIAS::ProjectionParametersBase | [virtual]
width_ | BIAS::ProjectionParametersBase | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::ProjectionParametersProjective | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::ProjectionParametersProjective | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::ProjectionParametersProjective | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Debug() | BIAS::Debug | [inline, protected]
~ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline, virtual]
~ProjectionParametersProjective() | BIAS::ProjectionParametersProjective | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [protected, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:09:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersSpherical Member List

This is the complete list of members for BIAS::ProjectionParametersSpherical, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Alpha_ | BIAS::UnscentedTransform | [protected]
aspectratio_ | BIAS::ProjectionParametersBase | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
Clone() const | BIAS::ProjectionParametersSpherical | [inline, virtual]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline, protected]
Debug(Debug &deb) | BIAS::Debug | [inline, protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, protected]
DoesPointProjectIntoImage(const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
DoesPointProjectIntoImageLocal(const BIAS::Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersSpherical | [virtual]
EnforceNormalRange_(double &theta, double &phi) const | BIAS::ProjectionParametersSpherical | [protected]
GetAspectratio() const | BIAS::ProjectionParametersBase | [inline]
GetC() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetCov() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetDebugLevel() const | BIAS::Debug | [inline, protected]
GetDebugStream() | BIAS::Debug | [inline, protected]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, protected]
GetExternals() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetFakeKMatrix(double &imgsize, int resolution=0) const | BIAS::ProjectionParametersSpherical |
GetFakeKMatrix(int resolution=0) const | BIAS::ProjectionParametersSpherical |
GetGlobalDebugLevel() | BIAS::Debug | [inline, protected, static]
GetImageSize(unsigned int &Width, unsigned int &Height) const | BIAS::ProjectionParametersBase | [inline]
GetMaxCamAngle() const | BIAS::ProjectionParametersSpherical | [inline]
GetPose() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetPoseParametrization() const | BIAS::ProjectionParametersBase | [inline]
GetPrincipal(double &PrincipalX, double &PrincipalY) const | BIAS::ProjectionParametersBase | [inline]
GetQ() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetR() const | BIAS::ProjectionParametersBase | [virtual]
GetRadius() const | BIAS::ProjectionParametersSpherical | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ProjectionParametersBase | [protected]
interpolatorAngle_ | BIAS::ProjectionParametersSpherical | [protected]
interpolatorAngleBack_ | BIAS::ProjectionParametersSpherical | [protected]
Kappa_ | BIAS::UnscentedTransform | [protected]
MaxCamAngle_ | BIAS::ProjectionParametersSpherical | [protected]
operator<<(std::ostream &os, ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [friend]
operator=(const ProjectionParametersSpherical &P) | BIAS::ProjectionParametersSpherical | [inline]
BIAS::ProjectionParametersBase::operator=(const ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [inline, virtual]
BIAS::UnscentedTransform::operator=(const Debug &d) | BIAS::Debug | [inline]
Pose_ | BIAS::ProjectionParametersBase | [protected]
principalX_ | BIAS::ProjectionParametersBase | [protected]
principalY_ | BIAS::ProjectionParametersBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, protected]
Project(const HomgPoint3D &X, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersSpherical() | BIAS::ProjectionParametersSpherical | [inline]
ProjectionParametersSpherical(const ProjectionParametersSpherical &P) | BIAS::ProjectionParametersSpherical | [inline]
ProjectLocal(const Vector3< double > &point, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersSpherical | [virtual]
radius_ | BIAS::ProjectionParametersSpherical | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Rescale(float ratio) | BIAS::ProjectionParametersSpherical | [inline, virtual]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline, protected]
SetAspectratio(const double AspectRatio) | BIAS::ProjectionParametersBase | [inline, virtual]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline, protected]
SetC(const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetCov(const Matrix< POSE_TYPE > &Cov) | BIAS::ProjectionParametersBase | [inline, virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, protected]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, protected, static]
SetImageSize(const unsigned int w, const unsigned int h) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPose(const BIAS::Pose pose) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPoseParametrization(const PoseParametrization &pp) | BIAS::ProjectionParametersBase | [inline]
SetPrincipal(const double x, const double y) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQ(const BIAS::Quaternion< double > &Q) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQC(const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetR(const BIAS::RMatrix &R) | BIAS::ProjectionParametersBase | [inline, virtual]
SetRadius(double r) | BIAS::ProjectionParametersSpherical | [inline]
SetUndistortion(const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const double radius) | BIAS::ProjectionParametersSpherical |
TransfCoordCalibImage2Sphere_(const HomgPoint2D &Source, double &theta, double &phi) const | BIAS::ProjectionParametersSpherical | [protected]
TransfCoordImage2Sphere_(const HomgPoint2D &Source, double &theta, double &phi) const | BIAS::ProjectionParametersSpherical | [protected]
TransfCoordRotateSphere2Image_(double theta, double phi, double viewCenterX, double viewCenterY, HomgPoint2D &Source) const | BIAS::ProjectionParametersSpherical | [protected]
TransfCoordSphere2CalibImage_(double theta, double phi, HomgPoint2D &Source) const | BIAS::ProjectionParametersSpherical | [protected]
TransfCoordSphere2Image_(double theta, double phi, HomgPoint2D &Source) const | BIAS::ProjectionParametersSpherical | [protected]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform | [protected]
Transform_(const Vector< double > &src, Vector< double > &dst) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectLocal(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersSpherical | [virtual]
BIAS::ProjectionParametersBase::UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false) | BIAS::ProjectionParametersBase | [virtual]
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersSpherical | [virtual]
UnProjectToRay(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
UnscentedTransform() | BIAS::UnscentedTransform | [protected]
ustIgnoreDistortion_ | BIAS::ProjectionParametersBase | [protected]
ustTransformIntoImage_ | BIAS::ProjectionParametersBase | [protected]
ViewDifference(const ProjectionParametersBase *pPPB) const | BIAS::ProjectionParametersSpherical | [virtual]
width_ | BIAS::ProjectionParametersBase | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::ProjectionParametersSpherical | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::ProjectionParametersSpherical | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::ProjectionParametersSpherical | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Debug() | BIAS::Debug | [inline, protected]
~ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline, virtual]
~ProjectionParametersSpherical() | BIAS::ProjectionParametersSpherical | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [protected, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:10:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ProjectionParametersZoom Member List

This is the complete list of members for BIAS::ProjectionParametersZoom, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
AddZoomStep(double zoom, double focallength, double kc1, double kc2, double kc3, double kc4) | BIAS::ProjectionParametersZoom |
Alpha_ | BIAS::UnscentedTransform | [protected]
aspectratio_ | BIAS::ProjectionParametersBase | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
Clear() | BIAS::ProjectionParametersZoom | [inline]
Clone() const | BIAS::ProjectionParametersZoom | [inline, virtual]
ComputeK_() | BIAS::ProjectionParametersZoom | [protected]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline, protected]
Debug(Debug &deb) | BIAS::Debug | [inline, protected]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, protected]
Distort(BIAS::HomgPoint2D &point2d) const | BIAS::ProjectionParametersZoom |
DoesPointProjectIntoImage(const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
DoesPointProjectIntoImageLocal(const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline, virtual]
focallengthZoom_ | BIAS::ProjectionParametersZoom | [protected]
GetAspectratio() const | BIAS::ProjectionParametersBase | [inline]
GetC() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetCov() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetDebugLevel() const | BIAS::Debug | [inline, protected]
GetDebugStream() | BIAS::Debug | [inline, protected]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, protected]
GetExternals() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetFocalLength(double &f) const | BIAS::ProjectionParametersZoom | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, protected, static]
GetImageSize(unsigned int &Width, unsigned int &Height) const | BIAS::ProjectionParametersBase | [inline]
GetK(KMatrix &K) const | BIAS::ProjectionParametersZoom | [inline]
GetKinv(KMatrix &invK) const | BIAS::ProjectionParametersZoom | [inline]
GetP() const | BIAS::ProjectionParametersZoom | [inline, virtual]
GetPose() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetPoseParametrization() const | BIAS::ProjectionParametersBase | [inline]
GetPrincipal(double &PrincipalX, double &PrincipalY) const | BIAS::ProjectionParametersBase | [inline]
GetQ() const | BIAS::ProjectionParametersBase | [inline, virtual]
GetR() const | BIAS::ProjectionParametersBase | [virtual]
GetUndistortion(double &kc1, double &kc2, double &kc3, double &kc4) const | BIAS::ProjectionParametersZoom | [inline]
GetZoom(double &zoom) const | BIAS::ProjectionParametersZoom | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ProjectionParametersBase | [protected]
InterpolateAbsZoom_() | BIAS::ProjectionParametersZoom | [protected]
InterpolateDistortionFromIndex_(unsigned int i, double relnorm) | BIAS::ProjectionParametersZoom | [protected]
InterpolateFocalLength_() | BIAS::ProjectionParametersZoom | [protected]
invK_ | BIAS::ProjectionParametersZoom | [protected]
K_ | BIAS::ProjectionParametersZoom | [protected]
Kappa_ | BIAS::UnscentedTransform | [protected]
kc1Zoom_ | BIAS::ProjectionParametersZoom | [protected]
kc2Zoom_ | BIAS::ProjectionParametersZoom | [protected]
kc3Zoom_ | BIAS::ProjectionParametersZoom | [protected]
kc4Zoom_ | BIAS::ProjectionParametersZoom | [protected]
knownparams_vect_ | BIAS::ProjectionParametersZoom | [protected]
operator<<(std::ostream &os, ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [friend]
operator=(const ProjectionParametersZoom &P) | BIAS::ProjectionParametersZoom | [inline]
BIAS::ProjectionParametersBase::operator=(const ProjectionParametersBase &p) | BIAS::ProjectionParametersBase | [inline, virtual]
BIAS::UnscentedTransform::operator=(const Debug &d) | BIAS::Debug | [inline]
Pose_ | BIAS::ProjectionParametersBase | [protected]
principalX_ | BIAS::ProjectionParametersBase | [protected]
principalY_ | BIAS::ProjectionParametersBase | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, protected]
Project(const HomgPoint3D &X, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline]
ProjectionParametersZoom() | BIAS::ProjectionParametersZoom | [inline]
ProjectionParametersZoom(const ProjectionParametersZoom &P) | BIAS::ProjectionParametersZoom | [inline]
ProjectLocal(const Vector3< double > &point, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersZoom | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
Rescale(float ratio) | BIAS::ProjectionParametersZoom | [inline, virtual]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline, protected]
SetAspectratio(const double CellSizeX, const double AspectRatio) | BIAS::ProjectionParametersZoom | [inline, virtual]
BIAS::ProjectionParametersBase::SetAspectratio(const double AspectRatio) | BIAS::ProjectionParametersBase | [inline, virtual]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline, protected]
SetC(const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetCov(const Matrix< POSE_TYPE > &Cov) | BIAS::ProjectionParametersBase | [inline, virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, protected]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, protected]
SetFocalLength(const double f) | BIAS::ProjectionParametersZoom | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, protected, static]
SetImageSize(const unsigned int w, const unsigned int h) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPose(const BIAS::Pose pose) | BIAS::ProjectionParametersBase | [inline, virtual]
SetPoseParametrization(const PoseParametrization &pp) | BIAS::ProjectionParametersBase | [inline]
SetPrincipal(const double x, const double y) | BIAS::ProjectionParametersZoom | [inline, virtual]
SetQ(const BIAS::Quaternion< double > &Q) | BIAS::ProjectionParametersBase | [inline, virtual]
SetQC(const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C) | BIAS::ProjectionParametersBase | [inline, virtual]
SetR(const BIAS::RMatrix &R) | BIAS::ProjectionParametersBase | [inline, virtual]
SetUnzoomed() | BIAS::ProjectionParametersZoom | [inline]
SetZoom(const double abszoom) | BIAS::ProjectionParametersZoom | [inline]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform | [protected]
Transform_(const Vector< double > &src, Vector< double > &dst) const | BIAS::ProjectionParametersBase | [virtual]
Undistort(BIAS::HomgPoint2D &point2d) const | BIAS::ProjectionParametersZoom |
UnProjectLocal(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersZoom | [virtual]
BIAS::ProjectionParametersBase::UnProjectLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false) | BIAS::ProjectionParametersBase | [virtual]
UnProjectToPointLocal(const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [virtual]
UnProjectToRay(const HomgPoint2D &pos, bool IgnoreDistortion=false) const | BIAS::ProjectionParametersBase | [inline]
UnscentedTransform() | BIAS::UnscentedTransform | [protected]
ustIgnoreDistortion_ | BIAS::ProjectionParametersBase | [protected]
ustTransformIntoImage_ | BIAS::ProjectionParametersBase | [protected]
ViewDifference(const ProjectionParametersBase *) const | BIAS::ProjectionParametersBase | [virtual]
width_ | BIAS::ProjectionParametersBase | [protected]
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const | BIAS::ProjectionParametersZoom | [virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | BIAS::ProjectionParametersZoom | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::ProjectionParametersZoom | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
zoom_ | BIAS::ProjectionParametersZoom | [protected]
~Debug() | BIAS::Debug | [inline, protected]
~ProjectionParametersBase() | BIAS::ProjectionParametersBase | [inline, virtual]
~ProjectionParametersZoom() | BIAS::ProjectionParametersZoom | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [protected, virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:10:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PyramidImage< StorageType > Member List

This is the complete list of members for BIAS::PyramidImage< StorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::PyramidImage< StorageType > | [protected]
_CreateLevels() | BIAS::PyramidImage< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::PyramidImage< StorageType > | [protected]
_PositionOffset | BIAS::PyramidImage< StorageType > | [protected]
_PyramidSize | BIAS::PyramidImage< StorageType > | [protected]
_rescale | BIAS::PyramidImage< StorageType > | [protected]
_RescaleFactor | BIAS::PyramidImage< StorageType > | [protected]
_vFactor | BIAS::PyramidImage< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
clear() | BIAS::PyramidImage< StorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Downsample() | BIAS::PyramidImage< StorageType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactors() const | BIAS::PyramidImage< StorageType > | [inline]
GetFactors() | BIAS::PyramidImage< StorageType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetLowPassType() const | BIAS::PyramidImage< StorageType > | [inline]
GetPositionOffset() const | BIAS::PyramidImage< StorageType > | [inline]
GetPyramidSize() const | BIAS::PyramidImage< StorageType > | [inline]
GetRescaleFactor() const | BIAS::PyramidImage< StorageType > | [inline]
GetSingleImage(Image< StorageType > &im) const | BIAS::PyramidImage< StorageType > |
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(const Image< StorageType > &image) | BIAS::PyramidImage< StorageType > |
Init(unsigned int width, unsigned int height, unsigned int channelcount) | BIAS::PyramidImage< StorageType > |
IsEmpty() | BIAS::PyramidImage< StorageType > | [inline]
operator=(const PyramidImage< StorageType > &pim) | BIAS::PyramidImage< StorageType > |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PyramidImage() | BIAS::PyramidImage< StorageType > |
PyramidImage(Param &para, const std::string &postfix="") | BIAS::PyramidImage< StorageType > |
PyramidImage(Param &para, const int grp, const std::string &postfix) | BIAS::PyramidImage< StorageType > |
PyramidImage(const PyramidImage< StorageType > &pim) | BIAS::PyramidImage< StorageType > |
Release() | BIAS::PyramidImage< StorageType > | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetLowPassType(const int lptype) | BIAS::PyramidImage< StorageType > | [inline]
SetPyramidSize(const int size) | BIAS::PyramidImage< StorageType > | [inline]
SetRescaleFactor(const double factor) | BIAS::PyramidImage< StorageType > | [inline]
SetROI(unsigned minx, unsigned miny, unsigned maxx, unsigned maxy) | BIAS::PyramidImage< StorageType > |
SetUID(BIAS::UUID uid) | BIAS::PyramidImage< StorageType > |
SetZero() | BIAS::PyramidImage< StorageType > |
WriteImages(const std::string &prefix) | BIAS::PyramidImage< StorageType > |
~Debug() | BIAS::Debug | [inline]
~PyramidImage() | BIAS::PyramidImage< StorageType > |

Generated on Wed Jun 21 19:10:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Quadric3D Member List

This is the complete list of members for BIAS::Quadric3D, including all inherited members.

Add(const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
AddIP(const QUADRIC3D_TYPE &scalar) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
AddIP(const Matrix< QUADRIC3D_TYPE > &arg) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< QUADRIC3D_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< QUADRIC3D_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
DivideIP(const QUADRIC3D_TYPE &scalar) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const QUADRIC3D_TYPE &scalar) | BIAS::Matrix< QUADRIC3D_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetCols() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetData() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetDualQuadric(bool UseSVD=false) const | BIAS::Quadric3D |
GetMax() const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetMaxMin(QUADRIC3D_TYPE &max, QUADRIC3D_TYPE &min) const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetMean() const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetMin() const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetNumElements() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetRow(const int &row) const | BIAS::Matrix< QUADRIC3D_TYPE > |
GetRows() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
GetSignature() | BIAS::Quadric3D |
GetSystemMatrix(Matrix< QUADRIC3D_TYPE > &dest) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
IsIdentity(double eps=0.0) const | BIAS::Matrix< QUADRIC3D_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< QUADRIC3D_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< QUADRIC3D_TYPE > |
LocatePoint(const HomgPoint3D &point3D) const | BIAS::Quadric3D | [inline]
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Matrix(int rows, int cols, const QUADRIC3D_TYPEvalue) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< QUADRIC3D_TYPE > | [explicit]
Matrix(const Matrix< QUADRIC3D_TYPE > &A) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Matrix(const TNT::Matrix< QUADRIC3D_TYPE > &A) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix4x4() | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
Matrix4x4(const std::string &s) | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [explicit]
Matrix4x4(const QUADRIC3D_TYPEa0, const QUADRIC3D_TYPEa1, const QUADRIC3D_TYPEa2, const QUADRIC3D_TYPEa3, const QUADRIC3D_TYPEa4, const QUADRIC3D_TYPEa5, const QUADRIC3D_TYPEa6, const QUADRIC3D_TYPEa7, const QUADRIC3D_TYPEa8, const QUADRIC3D_TYPEa9, const QUADRIC3D_TYPEa10, const QUADRIC3D_TYPEa11, const QUADRIC3D_TYPEa12, const QUADRIC3D_TYPEa13, const QUADRIC3D_TYPEa14, const QUADRIC3D_TYPEa15) | BIAS::Matrix4x4< QUADRIC3D_TYPE > |
Matrix4x4(const MatrixInitType &i) | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline, explicit]
Matrix4x4(const Matrix4x4< QUADRIC3D_TYPE > &A) | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
Matrix4x4(const Matrix< QUADRIC3D_TYPE > &arg) | BIAS::Matrix4x4< QUADRIC3D_TYPE > |
Matrix4x4(const TNT::Matrix< QUADRIC3D_TYPE > &A) | BIAS::Matrix4x4< QUADRIC3D_TYPE > |
Matrix4x4(const Matrix3x3< QUADRIC3D_TYPE > &R, const Vector3< QUADRIC3D_TYPE > &trans) | BIAS::Matrix4x4< QUADRIC3D_TYPE > |
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector4< QUADRIC3D_TYPE > &argvec, Vector4< QUADRIC3D_TYPE > &destvec) const | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
Mult(const Matrix4x4< QUADRIC3D_TYPE > &argmat, Matrix4x4< QUADRIC3D_TYPE > &destmat) const | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
BIAS::Matrix< QUADRIC3D_TYPE >::Mult(const Matrix< QUADRIC3D_TYPE > &arg, Matrix< QUADRIC3D_TYPE > &result) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
BIAS::Matrix< QUADRIC3D_TYPE >::Mult(const Matrix< QUADRIC3D_TYPE > &arg) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
BIAS::Matrix< QUADRIC3D_TYPE >::Mult(const Vector< QUADRIC3D_TYPE > &arg, Vector< QUADRIC3D_TYPE > &result) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Multiply(const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
MultiplyIP(const QUADRIC3D_TYPE &scalar) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
MultLeft(const Matrix< QUADRIC3D_TYPE > &arg) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
MultLeft(const Vector< QUADRIC3D_TYPE > &arg, Vector< QUADRIC3D_TYPE > &result) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix4x4< QUADRIC3D_TYPE > |
BIAS::Matrix< QUADRIC3D_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Quadric3D | [inline]
NormalizeCols() | BIAS::Matrix< QUADRIC3D_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< QUADRIC3D_TYPE > |
NormalizeRows() | BIAS::Matrix< QUADRIC3D_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< QUADRIC3D_TYPE > |
NormFrobenius() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
NormL1() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
NormL2() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< QUADRIC3D_TYPE > &M) | BIAS::Quadric3D | [inline]
BIAS::Matrix< QUADRIC3D_TYPE >::operator=(const TNT::Matrix< QUADRIC3D_TYPE > &mat) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
Quadric3D() | BIAS::Quadric3D | [inline]
Quadric3D(const MatrixInitType &i) | BIAS::Quadric3D | [inline, explicit]
Quadric3D(const Matrix< QUADRIC3D_TYPE > &M) | BIAS::Quadric3D | [inline]
Quadric3D(const HomgPoint3D &C, const CovMatrix3x3 &cov, const double &dScale=GAUSS3D_CONFIDENCE_20_PERCENT) | BIAS::Quadric3D |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< QUADRIC3D_TYPE > |
ScaleCol(int NoCol, QUADRIC3D_TYPEscale) | BIAS::Matrix< QUADRIC3D_TYPE > |
ScaleRow(int NoRow, QUADRIC3D_TYPEscale) | BIAS::Matrix< QUADRIC3D_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetCol(const int row, const Vector< QUADRIC3D_TYPE > &data) | BIAS::Matrix< QUADRIC3D_TYPE > |
SetIdentity() | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
SetRow(const int row, const Vector< QUADRIC3D_TYPE > &data) | BIAS::Matrix< QUADRIC3D_TYPE > |
SetZero() | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const QUADRIC3D_TYPE &scalar, Matrix< QUADRIC3D_TYPE > &dest) const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
SubIP(const Matrix< QUADRIC3D_TYPE > &arg) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
SubIP(const QUADRIC3D_TYPE &scalar) | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Trace() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
Transpose() const | BIAS::Matrix< QUADRIC3D_TYPE > | [inline]
TransposeIP() | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< QUADRIC3D_TYPE > | [virtual]
~Matrix4x4() | BIAS::Matrix4x4< QUADRIC3D_TYPE > | [virtual]

Generated on Wed Jun 21 19:10:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Quaternion< QUAT_TYPE > Member List

This is the complete list of members for BIAS::Quaternion< QUAT_TYPE >, including all inherited members.

Add(const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const | BIAS::Vector4< QUAT_TYPE > | [inline]
Add(const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const | BIAS::Vector4< QUAT_TYPE > | [inline]
AddIP(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
AddIP(const Vector4< QUAT_TYPE > &argvec) | BIAS::Vector4< QUAT_TYPE > | [inline]
Copy(const QUAT_TYPE *pv) | BIAS::Vector4< QUAT_TYPE > | [inline]
data_ | BIAS::Vector4< QUAT_TYPE > | [protected]
Dist(const Vector4< QUAT_TYPE > &vec) const | BIAS::Vector4< QUAT_TYPE > | [inline]
Divide(const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const | BIAS::Vector4< QUAT_TYPE > | [inline]
DivideIP(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
ElementwiseProduct(const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const | BIAS::Vector4< QUAT_TYPE > | [inline]
GetAxisAngle(Vector3< QUAT_TYPE > &axis, QUAT_TYPE &angle) const | BIAS::Quaternion< QUAT_TYPE > |
GetData() const | BIAS::Vector4< QUAT_TYPE > | [inline]
GetData() | BIAS::Vector4< QUAT_TYPE > | [inline]
GetRotationMatrix(RMatrixBase &R) const | BIAS::Quaternion< QUAT_TYPE > |
Inverse() const | BIAS::Quaternion< QUAT_TYPE > | [inline]
Invert() | BIAS::Quaternion< QUAT_TYPE > | [inline]
Load(const std::string &filename) | BIAS::Vector4< QUAT_TYPE > |
Mult(const Quaternion< QUAT_TYPE > &quat) | BIAS::Quaternion< QUAT_TYPE > | [inline]
Mult(const Quaternion< QUAT_TYPE > &arg, Quaternion< QUAT_TYPE > &res) | BIAS::Quaternion< QUAT_TYPE > | [inline]
Multiply(const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const | BIAS::Vector4< QUAT_TYPE > | [inline]
MultiplyIP(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
MultLeft(const Quaternion< QUAT_TYPE > &quat) | BIAS::Quaternion< QUAT_TYPE > | [inline]
MultVec(const Vector3< QUAT_TYPE > &vec, Vector3< QUAT_TYPE > &res) const | BIAS::Quaternion< QUAT_TYPE > | [inline]
MultVec(const Vector3< QUAT_TYPE > &vec) const | BIAS::Quaternion< QUAT_TYPE > | [inline]
Normalize() | BIAS::Quaternion< QUAT_TYPE > | [inline]
NormL1() const | BIAS::Vector4< QUAT_TYPE > | [inline]
NormL2() const | BIAS::Vector4< QUAT_TYPE > | [inline]
operator *(const Quaternion< T > &a, const Quaternion< T > &b) | BIAS::Quaternion< QUAT_TYPE > | [related]
operator *=(Quaternion< T > &l, const Quaternion< T > &r) | BIAS::Quaternion< QUAT_TYPE > | [related]
BIAS::Vector4< QUAT_TYPE >::operator *=(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator!=(const Vector4< QUAT_TYPE > &arg) const | BIAS::Vector4< QUAT_TYPE > | [inline]
operator+=(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator+=(const Vector4< QUAT_TYPE > &argvec) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator-=(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator-=(const Vector4< QUAT_TYPE > &argvec) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator/(const Quaternion< T > &a, const Quaternion< T > &b) | BIAS::Quaternion< QUAT_TYPE > | [related]
operator/=(Quaternion< T > &l, const Quaternion< T > &r) | BIAS::Quaternion< QUAT_TYPE > | [related]
BIAS::Vector4< QUAT_TYPE >::operator/=(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator=(const Quaternion< QUAT_TYPE > &vec) | BIAS::Quaternion< QUAT_TYPE > |
BIAS::Vector4< QUAT_TYPE >::operator=(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
BIAS::Vector4< QUAT_TYPE >::operator=(const Vector4< QUAT_TYPE > &vec) | BIAS::Vector4< QUAT_TYPE > | [inline]
operator==(const Vector4< QUAT_TYPE > &arg) const | BIAS::Vector4< QUAT_TYPE > | [inline]
operator[](const int i) const | BIAS::Vector4< QUAT_TYPE > | [inline]
operator[](const int i) | BIAS::Vector4< QUAT_TYPE > | [inline]
OuterProduct(const Vector4< QUAT_TYPE > &v) const | BIAS::Vector4< QUAT_TYPE > |
Quaternion() | BIAS::Quaternion< QUAT_TYPE > |
Quaternion(const Quaternion< QUAT_TYPE > &q) | BIAS::Quaternion< QUAT_TYPE > | [inline]
Quaternion(QUAT_TYPE i, QUAT_TYPE j, QUAT_TYPE k, QUAT_TYPE r) | BIAS::Quaternion< QUAT_TYPE > |
Save(const std::string &filename) const | BIAS::Vector4< QUAT_TYPE > |
ScalarProduct(const Vector4< QUAT_TYPE > &argvec, QUAT_TYPE &result) const | BIAS::Vector4< QUAT_TYPE > | [inline]
Set(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
Set(const QUAT_TYPE &x, const QUAT_TYPE &y, const QUAT_TYPE &z, const QUAT_TYPE &w) | BIAS::Vector4< QUAT_TYPE > | [inline]
SetIdentity() | BIAS::Quaternion< QUAT_TYPE > | [inline]
SetValueAsAxisRad(const Vector3< QUAT_TYPE > &axis, QUAT_TYPE angle) | BIAS::Quaternion< QUAT_TYPE > | [inline]
SetValueAsAxisRad(QUAT_TYPE axisX, QUAT_TYPE axisY, QUAT_TYPE axisZ, QUAT_TYPE angle) | BIAS::Quaternion< QUAT_TYPE > | [inline]
SetXYZ(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ) | BIAS::Quaternion< QUAT_TYPE > |
SetZero() | BIAS::Vector4< QUAT_TYPE > | [inline]
SetZYX(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ) | BIAS::Quaternion< QUAT_TYPE > |
Size() const | BIAS::Vector4< QUAT_TYPE > | [inline]
Sub(const QUAT_TYPE &scalar, Vector4< QUAT_TYPE > &dest) const | BIAS::Vector4< QUAT_TYPE > | [inline]
Sub(const Vector4< QUAT_TYPE > &argvec, Vector4< QUAT_TYPE > &destvec) const | BIAS::Vector4< QUAT_TYPE > | [inline]
SubIP(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline]
SubIP(const Vector4< QUAT_TYPE > &argvec) | BIAS::Vector4< QUAT_TYPE > | [inline]
transposed() const | BIAS::Vector4< QUAT_TYPE > | [inline]
Vector4() | BIAS::Vector4< QUAT_TYPE > | [inline]
Vector4(const Vector4< QUAT_TYPE > &vec) | BIAS::Vector4< QUAT_TYPE > | [inline]
Vector4(const QUAT_TYPE &scalar) | BIAS::Vector4< QUAT_TYPE > | [inline, explicit]
Vector4(const QUAT_TYPE *pv) | BIAS::Vector4< QUAT_TYPE > | [inline, explicit]
Vector4(char *s) | BIAS::Vector4< QUAT_TYPE > | [inline, explicit]
Vector4(const QUAT_TYPEv0, const QUAT_TYPEv1, const QUAT_TYPEv2, const QUAT_TYPEv3) | BIAS::Vector4< QUAT_TYPE > | [inline]
Vector4(const Vector< QUAT_TYPE > &v) | BIAS::Vector4< QUAT_TYPE > |
~Quaternion() | BIAS::Quaternion< QUAT_TYPE > |
~Vector4() | BIAS::Vector4< QUAT_TYPE > | [inline]

Generated on Wed Jun 21 19:10:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Random Member List

This is the complete list of members for BIAS::Random, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
gasdev3_(int *idum) | BIAS::Random | [protected]
gasdev_(int *idum) | BIAS::Random | [protected]
gasdevf_(long *idum) | BIAS::Random | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetNormalDistributed(double mean, double sigma) | BIAS::Random | [inline]
GetNormalDistributed(double mean, double sigma, int num, double *res) | BIAS::Random |
GetNormalDistributed(const Vector2< double > &mean, const Matrix2x2< double > &cov, Vector2< double > &ran) | BIAS::Random |
GetNormalDistributed(const Vector2< double > &mean, const Matrix2x2< double > &cov, int num, std::vector< Vector2< double > > &ran) | BIAS::Random |
GetUniformDistributed(double min, double max) | BIAS::Random | [inline]
GetUniformDistributed(double min, double max, int num, double *res) | BIAS::Random |
GetUniformDistributedInt(int min, int max) | BIAS::Random |
GetUniformDistributedInt(unsigned int min, unsigned int max) | BIAS::Random |
GlobalDebugLevel | BIAS::Debug | [protected, static]
Idum_ | BIAS::Random | [protected]
LongIdum_ | BIAS::Random | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ran1_(int *idum) | BIAS::Random | [protected]
ran1c_(int *idum) | BIAS::Random | [protected]
ran2_(long *idum) | BIAS::Random | [protected]
Random() | BIAS::Random |
Random(long int seed) | BIAS::Random |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Reset() | BIAS::Random |
Reset(long int seed) | BIAS::Random |
Seed_ | BIAS::Random | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~Debug() | BIAS::Debug | [inline]
~Random() | BIAS::Random |

Generated on Wed Jun 21 19:10:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RANSAC< SolutionType > Member List

This is the complete list of members for BIAS::RANSAC< SolutionType >, including all inherited members.

_bRefineSolution | BIAS::RANSAC< SolutionType > | [protected]
_dBestInlierEvaluateScore | BIAS::RANSAC< SolutionType > | [protected]
_dBestSampleEvaluateScore | BIAS::RANSAC< SolutionType > | [protected]
_dProbabilityOfGoodSolution | BIAS::RANSAC< SolutionType > | [protected]
_dSoSmallSolutionChange | BIAS::RANSAC< SolutionType > | [protected]
_got_solution_flag | BIAS::RANSAC< SolutionType > | [protected]
_greedy | BIAS::RANSAC< SolutionType > | [protected]
_iBestInlierAcceptCount | BIAS::RANSAC< SolutionType > | [protected]
_iBestSampleAcceptCount | BIAS::RANSAC< SolutionType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_uiDataSize | BIAS::RANSAC< SolutionType > | [protected]
_uiExplicitSampleNo | BIAS::RANSAC< SolutionType > | [protected]
_uiMaxSamples | BIAS::RANSAC< SolutionType > | [protected]
_uiMaxSolutionsPerSample | BIAS::RANSAC< SolutionType > | [protected]
_uiSampleSize | BIAS::RANSAC< SolutionType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ComputeSampleCount(double inlying_data_fraction, double desired_prob_good, unsigned int sample_size) | BIAS::RANSAC< SolutionType > | [protected, static]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateSolution(const SolutionType &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag) | BIAS::RANSAC< SolutionType > | [virtual]
GenerateSamples(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::RANSAC< SolutionType > | [virtual]
GenerateSamplesEvenspace(int sample_index, std::vector< unsigned int > &sample_table) | BIAS::RANSAC< SolutionType > |
GenerateSamplesRandom(int sample_index, std::vector< unsigned int > &sampletable) | BIAS::RANSAC< SolutionType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFinalScore() const | BIAS::RANSAC< SolutionType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetSampleSolutions(std::vector< unsigned int > &which_samples, std::vector< SolutionType > &solutions) | BIAS::RANSAC< SolutionType > | [virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< SolutionType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RANSAC() | BIAS::RANSAC< SolutionType > |
RANSAC(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< SolutionType > |
RefineSolution(std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers) | BIAS::RANSAC< SolutionType > | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxSamples(unsigned int max_samples) | BIAS::RANSAC< SolutionType > | [inline]
SetSampleCount(unsigned int uiSamples) | BIAS::RANSAC< SolutionType > | [inline]
SolveMaster(double inlying_data_fraction, SolutionType &solution, std::vector< bool > &inliers) | BIAS::RANSAC< SolutionType > | [virtual]
~Debug() | BIAS::Debug | [inline]
~RANSAC() | BIAS::RANSAC< SolutionType > | [virtual]

Generated on Wed Jun 21 19:10:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RANSACPreKnowledge< SolutionType > Member List

This is the complete list of members for BIAS::RANSACPreKnowledge< SolutionType >, including all inherited members.

_bRefineSolution | BIAS::RANSAC< SolutionType > | [protected]
_ClearBeforeRANSAC | BIAS::RANSACPreKnowledge< SolutionType > | [protected]
_dBestInlierEvaluateScore | BIAS::RANSAC< SolutionType > | [protected]
_dBestSampleEvaluateScore | BIAS::RANSAC< SolutionType > | [protected]
_dProbabilityOfGoodSolution | BIAS::RANSAC< SolutionType > | [protected]
_dSoSmallSolutionChange | BIAS::RANSAC< SolutionType > | [protected]
_got_solution_flag | BIAS::RANSAC< SolutionType > | [protected]
_greedy | BIAS::RANSAC< SolutionType > | [protected]
_iBestInlierAcceptCount | BIAS::RANSAC< SolutionType > | [protected]
_iBestSampleAcceptCount | BIAS::RANSAC< SolutionType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_uiDataSize | BIAS::RANSAC< SolutionType > | [protected]
_uiExplicitSampleNo | BIAS::RANSAC< SolutionType > | [protected]
_uiMaxSamples | BIAS::RANSAC< SolutionType > | [protected]
_uiMaxSolutionsPerSample | BIAS::RANSAC< SolutionType > | [protected]
_uiSampleSize | BIAS::RANSAC< SolutionType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddGoodGuesses(const std::vector< SolutionType > &Guesses) | BIAS::RANSACPreKnowledge< SolutionType > | [inline, virtual]
ClearGuesses() | BIAS::RANSACPreKnowledge< SolutionType > | [inline, virtual]
ComputeSampleCount(double inlying_data_fraction, double desired_prob_good, unsigned int sample_size) | BIAS::RANSAC< SolutionType > | [protected, static]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateSolution(const SolutionType &solution, bool existing_solution_flag, std::vector< bool > &inlier, int &accept_count, double &evaluate_score, bool &ok_to_terminate_flag) | BIAS::RANSAC< SolutionType > | [virtual]
GenerateSamples(int sample_index, std::vector< unsigned int > &which_samples) | BIAS::RANSAC< SolutionType > | [virtual]
GenerateSamplesEvenspace(int sample_index, std::vector< unsigned int > &sample_table) | BIAS::RANSAC< SolutionType > |
GenerateSamplesRandom(int sample_index, std::vector< unsigned int > &sampletable) | BIAS::RANSAC< SolutionType > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFinalScore() const | BIAS::RANSAC< SolutionType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetSampleSolutions(std::vector< unsigned int > &which_samples, std::vector< SolutionType > &solutions) | BIAS::RANSAC< SolutionType > | [virtual]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< SolutionType > |
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RANSAC() | BIAS::RANSAC< SolutionType > |
RANSAC(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false) | BIAS::RANSAC< SolutionType > |
RANSACPreKnowledge() | BIAS::RANSACPreKnowledge< SolutionType > | [inline]
RANSACPreKnowledge(unsigned int sample_size, unsigned int max_solutions_per_sample=1, bool refine_solution=false, bool ClearBeforeRANSAC=false) | BIAS::RANSACPreKnowledge< SolutionType > | [inline]
RefineSolution(std::vector< unsigned int > &which_samples, SolutionType &solution, std::vector< bool > &new_inliers) | BIAS::RANSAC< SolutionType > | [virtual]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaxSamples(unsigned int max_samples) | BIAS::RANSAC< SolutionType > | [inline]
SetSampleCount(unsigned int uiSamples) | BIAS::RANSAC< SolutionType > | [inline]
SolveMaster(double inlying_data_fraction, SolutionType &solution, std::vector< bool > &inliers) | BIAS::RANSACPreKnowledge< SolutionType > | [virtual]
UserGuesses_ | BIAS::RANSACPreKnowledge< SolutionType > | [protected]
~Debug() | BIAS::Debug | [inline]
~RANSAC() | BIAS::RANSAC< SolutionType > | [virtual]
~RANSACPreKnowledge() | BIAS::RANSACPreKnowledge< SolutionType > | [inline, virtual]

Generated on Wed Jun 21 19:10:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RedirectStreams Member List

This is the complete list of members for BIAS::RedirectStreams, including all inherited members.

Cerr2Null() | BIAS::RedirectStreams | [inline]
Cout2Null() | BIAS::RedirectStreams | [inline]
ErrBuf_ | BIAS::RedirectStreams | [protected]
ErrStr_ | BIAS::RedirectStreams | [protected]
operator=(const RedirectStreams &src) | BIAS::RedirectStreams | [inline]
OutBuf_ | BIAS::RedirectStreams | [protected]
OutStr_ | BIAS::RedirectStreams | [protected]
RedirectCerr(char *file) | BIAS::RedirectStreams | [inline]
RedirectCerr(const std::string &file) | BIAS::RedirectStreams | [inline]
RedirectCout(char *file) | BIAS::RedirectStreams | [inline]
RedirectCout(const std::string &file) | BIAS::RedirectStreams | [inline]
RedirectStreams() | BIAS::RedirectStreams | [inline]
RedirectStreams(const RedirectStreams &src) | BIAS::RedirectStreams | [inline]
RedirErr_ | BIAS::RedirectStreams | [protected]
RedirOut_ | BIAS::RedirectStreams | [protected]
ResetCerr() | BIAS::RedirectStreams | [inline]
ResetCout() | BIAS::RedirectStreams | [inline]
~RedirectStreams() | BIAS::RedirectStreams | [inline, virtual]

Generated on Wed Jun 21 19:10:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RegionMatcher Member List

This is the complete list of members for BIAS::RegionMatcher, including all inherited members.

_Bilinear(StorageType **ida, KLT_TYPE x, KLT_TYPE y) | BIAS::RegionMatcher | [protected]
_Bilinear(unsigned char **ida, KLT_TYPE x, KLT_TYPE y) | BIAS::RegionMatcher | [protected]
_BilinearRegion(StorageType **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res) | BIAS::RegionMatcher | [protected]
_BilinearRegion(unsigned char **ida, KLT_TYPE x, KLT_TYPE y, unsigned hws, Matrix< KLT_TYPE > &res) | BIAS::RegionMatcher | [protected]
_bl1 | BIAS::RegionMatcher | [protected]
_bl1_5 | BIAS::RegionMatcher | [protected]
_bl2 | BIAS::RegionMatcher | [protected]
_bl2_5 | BIAS::RegionMatcher | [protected]
_d | BIAS::RegionMatcher | [protected]
_disp | BIAS::RegionMatcher | [protected]
_e | BIAS::RegionMatcher | [protected]
_G | BIAS::RegionMatcher | [protected]
_Ginv | BIAS::RegionMatcher | [protected]
_gsx | BIAS::RegionMatcher | [protected]
_gsx_5 | BIAS::RegionMatcher | [protected]
_gsy | BIAS::RegionMatcher | [protected]
_gsy_5 | BIAS::RegionMatcher | [protected]
_gx | BIAS::RegionMatcher | [protected]
_gx1 | BIAS::RegionMatcher | [protected]
_gx1_5 | BIAS::RegionMatcher | [protected]
_gx2 | BIAS::RegionMatcher | [protected]
_gx2_5 | BIAS::RegionMatcher | [protected]
_gy | BIAS::RegionMatcher | [protected]
_gy1 | BIAS::RegionMatcher | [protected]
_gy1_5 | BIAS::RegionMatcher | [protected]
_gy2 | BIAS::RegionMatcher | [protected]
_gy2_5 | BIAS::RegionMatcher | [protected]
_iim1 | BIAS::RegionMatcher | [protected]
_iim2 | BIAS::RegionMatcher | [protected]
_klthws | BIAS::RegionMatcher | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ncchws | BIAS::RegionMatcher | [protected]
_nccwinsize | BIAS::RegionMatcher | [protected]
_ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3) | BIAS::RegionMatcher | [inline, protected]
_ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3, KLT_TYPE x4, KLT_TYPE x5) | BIAS::RegionMatcher | [inline, protected]
_winsize | BIAS::RegionMatcher | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
ColorCCV(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
ColorNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
LineMatcherNCC(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation) | BIAS::RegionMatcher |
LineMatcherNCC(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &correlation) | BIAS::RegionMatcher |
LineMatcherSAD(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad) | BIAS::RegionMatcher |
LineMatcherSAD(unsigned int p1[2], unsigned int start2[2], unsigned int end2[2], StorageType **ida1, StorageType **ida2, StorageType **grad1, StorageType **grad2, unsigned int halfwinsize, unsigned int epsilon, double gradientscale, unsigned int result[2], double &sad) | BIAS::RegionMatcher |
NCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
NCC(double p1[2], double p2[2], StorageType **ida1, StorageType **ida2, unsigned halfwinsize, double &result) | BIAS::RegionMatcher |
NCC(unsigned p1[2], unsigned p2[2], StorageType **ida1, StorageType **roi1, StorageType **ida2, StorageType **roi2, unsigned hww, unsigned hwh, double &result) | BIAS::RegionMatcher |
NCC(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
NCCSearchEven(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result) | BIAS::RegionMatcher |
NCCSearchOdd(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfnccwinsize, unsigned int halfsearchwinsize, unsigned int resultpoint[2], double mincorrelation, double &result) | BIAS::RegionMatcher |
operator=(const Debug &d) | BIAS::Debug | [inline]
ParabolaNCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2]) | BIAS::RegionMatcher |
ParabolaNCC5(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, KLT_TYPE result[2]) | BIAS::RegionMatcher |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RegionMatcher() | BIAS::RegionMatcher |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SAD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SAD(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SADN(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SADN(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SSD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1, StorageType **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
SSD(unsigned int p1[2], unsigned int p2[2], unsigned char **ida1, unsigned char **ida2, unsigned int halfwinsize, double &result) | BIAS::RegionMatcher |
~Debug() | BIAS::Debug | [inline]
~RegionMatcher() | BIAS::RegionMatcher |

Generated on Wed Jun 21 19:10:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RenderModeGL Member List

This is the complete list of members for BIAS::RenderModeGL, including all inherited members.

cullface | BIAS::RenderModeGL |
drawbuffermode | BIAS::RenderModeGL |
enable_cullface | BIAS::RenderModeGL |
IsMono() const | BIAS::RenderModeGL | [inline]
IsStereoQuadbuffered() const | BIAS::RenderModeGL | [inline]
linewidth | BIAS::RenderModeGL |
pointsize | BIAS::RenderModeGL |
polygonmodeBACK | BIAS::RenderModeGL |
polygonmodeFRONT | BIAS::RenderModeGL |
RenderModeGL() | BIAS::RenderModeGL | [inline]
shademodel | BIAS::RenderModeGL |
vsync | BIAS::RenderModeGL |

Generated on Wed Jun 21 19:10:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Rescale< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::Rescale< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_ApplyMeanFilter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const double factor) | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_binomial | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_BinomialHWS | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_FillInterpolatedColor(const Image< OutputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_FillInterpolatedGrey(const Image< OutputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_gauss | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_GaussRatio | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_GaussSigma | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_LastPositionOffset | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_lowpass | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_mean | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_MeanSize | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_RescaleFactor | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_RescaleMeanSigmaFactor | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_RescaleMeanType | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Downsample(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
Downsample(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBPoT(const Image< InputStorageType > &Source, Image< OutputStorageType > &Destination) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBy2(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBy2Color(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBy2Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBy4(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
DownsampleBy4Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > | [virtual]
BIAS::FilterBase::Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)=0 | BIAS::FilterBase< InputStorageType, OutputStorageType > | [pure virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::Rescale< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFactor() const | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetLowpass() | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
GetLowPassType() const | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
GetPositionOffset() const | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Rescale() | BIAS::Rescale< InputStorageType, OutputStorageType > |
Rescale(Param &para, const std::string &postfix="") | BIAS::Rescale< InputStorageType, OutputStorageType > |
Rescale(Param &para, const int grp, const std::string &postfix) | BIAS::Rescale< InputStorageType, OutputStorageType > |
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFactor(double factor) | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetLowPassType(int lptype) | BIAS::Rescale< InputStorageType, OutputStorageType > | [inline]
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
UpdateLowpass(double factor) | BIAS::Rescale< InputStorageType, OutputStorageType > |
Upsample(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
Upsample(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight) | BIAS::Rescale< InputStorageType, OutputStorageType > |
UpsampleBy2(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::Rescale< InputStorageType, OutputStorageType > |
UpsampleBy2Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, InterpolationType i=NearestNeighbour, const double &valmin=0.0, const double &valmax=255.0) | BIAS::Rescale< InputStorageType, OutputStorageType > |
UpsampleBy2RGBInterleaved(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, InterpolationType i=NearestNeighbour, const double &valmin=0.0, const double &valmax=255.0) | BIAS::Rescale< InputStorageType, OutputStorageType > |
UpsampleGrey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const unsigned newwidth, const unsigned newheight) | BIAS::Rescale< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~Rescale() | BIAS::Rescale< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:10:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RigParameter Member List

This is the complete list of members for BIAS::RigParameter, including all inherited members.

AdaptAxisAngleRepresentation(BIAS::Vector3< double > &Axis, double &Angle, const BIAS::Vector3< double > &RefAxis, const double &RefAngle) | BIAS::RigParameter | [protected]
AddCalibration(BIAS::KMatrix &kMatrix) | BIAS::RigParameter | [inline]
AddCamera(CameraParam &Camera) | BIAS::RigParameter | [inline]
AddCameraCenter(BIAS::Vector3< double > &center) | BIAS::RigParameter | [inline]
AddCameraOnly(CameraParam &Camera) | BIAS::RigParameter | [inline]
AddRotation(BIAS::RMatrix &rMatrix) | BIAS::RigParameter | [inline]
AddSensorCenter(BIAS::Vector3< double > &sCenter) | BIAS::RigParameter | [inline]
AddSensorRotation(BIAS::RMatrix &sRotation) | BIAS::RigParameter | [inline]
Calibration_ | BIAS::RigParameter | [protected]
Camera_ | BIAS::RigParameter | [protected]
Center_ | BIAS::RigParameter | [protected]
Compute(std::vector< BIAS::PMatrix > &Pvec, const unsigned int &Rigsize, const double &WeightOfCurrentParams=0.0) | BIAS::RigParameter |
DeleteCalibrations() | BIAS::RigParameter | [inline]
DeleteCameraCenters() | BIAS::RigParameter | [inline]
DeleteCameraParams() | BIAS::RigParameter | [inline]
DeleteRotations() | BIAS::RigParameter | [inline]
DeleteSensorCenters() | BIAS::RigParameter | [inline]
DeleteSensorRotations() | BIAS::RigParameter | [inline]
DownSamplingFactor_ | BIAS::RigParameter | [protected]
GetCalibrations(std::vector< BIAS::KMatrix > &Calibration) const | BIAS::RigParameter | [inline]
GetCameraCenter(BIAS::Vector3< double > &CCenter, unsigned int index) const | BIAS::RigParameter | [inline]
GetCameraCenters(std::vector< BIAS::Vector3< double > > &CameraCenters) const | BIAS::RigParameter | [inline]
GetCameraParam(CameraParam &CParam, unsigned int index) const | BIAS::RigParameter | [inline]
GetCameraParams(std::vector< CameraParam > &CameraParam) const | BIAS::RigParameter | [inline]
GetDownSamplingFactor(double &Down) const | BIAS::RigParameter | [inline]
GetKMatrices(std::vector< BIAS::KMatrix > &vKmatrix) | BIAS::RigParameter |
GetKMatrix(BIAS::KMatrix &matrix, int index) const | BIAS::RigParameter |
getNumberOfCameras() const | BIAS::RigParameter | [inline]
getRigSize() const | BIAS::RigParameter | [inline]
GetRotation(BIAS::RMatrix &Rotation, unsigned int index) const | BIAS::RigParameter | [inline]
GetRotations(std::vector< BIAS::RMatrix > &Rotations) const | BIAS::RigParameter | [inline]
GetSensorCenter(BIAS::Vector3< double > &SensorCenter, unsigned int index) const | BIAS::RigParameter | [inline]
GetSensorCenters(std::vector< BIAS::Vector3< double > > &SensorCenters) const | BIAS::RigParameter | [inline]
GetSensorRotation(BIAS::RMatrix &SRotation, unsigned int index) const | BIAS::RigParameter | [inline]
GetSensorRotations(std::vector< BIAS::RMatrix > &SRotation) const | BIAS::RigParameter | [inline]
ParseView(const std::string &block) | BIAS::RigParameter | [protected]
ReadFromCMP(const std::string &filename) | BIAS::RigParameter |
ReadRigData(const std::string &filename) | BIAS::RigParameter |
ReadRigDataV0_8(const std::string &filename) | BIAS::RigParameter | [protected]
RigParameter() | BIAS::RigParameter | [inline]
RigParameter(const RigParameter &RigParam) | BIAS::RigParameter | [inline]
Rotation_ | BIAS::RigParameter | [protected]
SensorCenter_ | BIAS::RigParameter | [protected]
SensorRotation_ | BIAS::RigParameter | [protected]
SetCalibration(BIAS::KMatrix kMat, unsigned int index) | BIAS::RigParameter | [inline]
SetCameraCenter(BIAS::Vector3< double > center, unsigned int index) | BIAS::RigParameter | [inline]
SetCameraCenters(std::vector< BIAS::Vector3< double > > center) | BIAS::RigParameter | [inline]
SetCameraParam(CameraParam param, unsigned int index) | BIAS::RigParameter | [inline]
SetData_DummyRig() | BIAS::RigParameter |
SetDownsampling(const double factor) | BIAS::RigParameter |
SetLadybugCenters(double value=1.0) | BIAS::RigParameter |
SetRotation(BIAS::RMatrix rMat, unsigned int index) | BIAS::RigParameter | [inline]
SetSensorCenter(BIAS::Vector3< double > vSC, unsigned int index) | BIAS::RigParameter | [inline]
SetSensorRotation(BIAS::RMatrix rSMat, unsigned int index) | BIAS::RigParameter | [inline]
WriteRigData(const std::string &filename) | BIAS::RigParameter |
~RigParameter() | BIAS::RigParameter | [inline]

Generated on Wed Jun 21 19:10:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RMatrix Member List

This is the complete list of members for BIAS::RMatrix, including all inherited members.

Add(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
AddIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
AddIP(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
DivideIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
EnforceRConstraints() | BIAS::RMatrix |
Fill(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetAverageRMatrix(const std::vector< RMatrix > &vecR, bool RefineRotation=true) const | BIAS::RMatrix |
GetCol(const int &col) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetCols() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetData() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetMax() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMaxMin(ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMean() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMin() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetQuaternion(Quaternion< ROTATION_MATRIX_TYPE > &quat) const | BIAS::RMatrixBase |
GetRotationAnglesXYZ(double &PhiX, double &PhiY, double &PhiZ) | BIAS::RMatrixBase |
GetRotationAnglesXYZ(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
GetRotationAnglesZYX(double &PhiX, double &PhiY, double &PhiZ) | BIAS::RMatrixBase |
GetRotationAnglesZYX(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
GetRotationAxisAngle(Vector3< ROTATION_MATRIX_TYPE > &Axis, ROTATION_MATRIX_TYPE &Angle) const | BIAS::RMatrixBase |
GetRotationAxisAngle(Vector3< ROTATION_MATRIX_TYPE > &w) const | BIAS::RMatrixBase |
GetRow(const unsigned int row, Vector3< ROTATION_MATRIX_TYPE > &r) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetRows() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Invert(Matrix3x3< ROTATION_MATRIX_TYPE > &inv) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const ROTATION_MATRIX_TYPEvalue) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [explicit]
Matrix(const Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [explicit]
Matrix3x3(const ROTATION_MATRIX_TYPEa0, const ROTATION_MATRIX_TYPEa1, const ROTATION_MATRIX_TYPEa2, const ROTATION_MATRIX_TYPEa3, const ROTATION_MATRIX_TYPEa4, const ROTATION_MATRIX_TYPEa5, const ROTATION_MATRIX_TYPEa6, const ROTATION_MATRIX_TYPEa7, const ROTATION_MATRIX_TYPEa8) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
MaxMin(ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Mult(const Matrix3x3< ROTATION_MATRIX_TYPE > &argmat, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Mult(const Matrix3x4< ROTATION_MATRIX_TYPE > &argmat, Matrix3x4< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Matrix< ROTATION_MATRIX_TYPE > &arg, Matrix< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Multiply(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultiplyIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultLeft(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultLeft(const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
BIAS::Matrix< ROTATION_MATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const RMatrixBase &mat) | BIAS::RMatrixBase |
BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::operator=(const Matrix3x3< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::operator=(const TNT::Matrix< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::operator=(const Matrix< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const RMatrixBase &left, const RMatrixBase &right) | BIAS::RMatrixBase | [friend]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
RMatrix() | BIAS::RMatrix | [inline]
RMatrix(const MatrixInitType &i) | BIAS::RMatrix | [inline, explicit]
RMatrix(Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi) | BIAS::RMatrix | [inline]
RMatrix(Matrix3x3< ROTATION_MATRIX_TYPE > mat) | BIAS::RMatrix | [inline]
RMatrix(const TNT::Matrix< ROTATION_MATRIX_TYPE > &mat) | BIAS::RMatrix |
RMatrixBase() | BIAS::RMatrixBase | [inline]
RMatrixBase(const MatrixInitType &i) | BIAS::RMatrixBase | [inline, explicit]
RMatrixBase(const RMatrixBase &r) | BIAS::RMatrixBase |
RMatrixBase(Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi) | BIAS::RMatrixBase |
RMatrixBase(const TNT::Matrix< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [explicit]
RMatrixBase(const Matrix3x3< ROTATION_MATRIX_TYPE > &mat) | BIAS::RMatrixBase | [inline]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
Scale(const ROTATION_MATRIX_TYPE &scalar, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
ScaleCol(int NoCol, ROTATION_MATRIX_TYPEscale) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
ScaleRow(int NoRow, ROTATION_MATRIX_TYPEscale) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
Set(Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi) | BIAS::RMatrixBase |
Set(Quaternion< ROTATION_MATRIX_TYPE > &q) | BIAS::RMatrixBase |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
SetAsCrossProductMatrix(const Vector3< ROTATION_MATRIX_TYPE > &vec) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const ROTATION_MATRIX_TYPE &x, const ROTATION_MATRIX_TYPE &y, const ROTATION_MATRIX_TYPE &z) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< ROTATION_MATRIX_TYPE > &data) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
SetFromAxisAngle(Vector3< ROTATION_MATRIX_TYPE > w) | BIAS::RMatrixBase |
SetFromColumnVectors(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetFromHV(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xh, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &vy) | BIAS::RMatrixBase |
SetFromOriUpGL(BIAS::Vector3< ROTATION_MATRIX_TYPE > ori, BIAS::Vector3< ROTATION_MATRIX_TYPE > up) | BIAS::RMatrixBase |
SetFromOrthogonalBasis(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xxx, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &yyy, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &zzz) | BIAS::RMatrixBase |
SetFromQuaternion(const Quaternion< ROTATION_MATRIX_TYPE > &q) | BIAS::RMatrixBase |
SetFromRowVectors(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetFromVector(const TNT::Vector< ROTATION_MATRIX_TYPE > &vec) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< ROTATION_MATRIX_TYPE > &data) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ) | BIAS::RMatrixBase |
SetXYZ(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
SetZero() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SetZYX(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ) | BIAS::RMatrixBase |
SetZYX(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SubIP(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SubIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Transpose(const Matrix3x3< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
TransposedMult(const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [virtual]
~RMatrix() | BIAS::RMatrix | [virtual]
~RMatrixBase() | BIAS::RMatrixBase | [virtual]

Generated on Wed Jun 21 19:10:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::RMatrixBase Member List

This is the complete list of members for BIAS::RMatrixBase, including all inherited members.

Add(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
AddIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
AddIP(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BinRead(const char *filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
BinWrite(const char *filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
det() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
Divide(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
DivideIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
element_type typedef | TNT::Matrix< T > |
Fill(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetCol(const int &col) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetCols() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetColumn(const unsigned int col) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetData() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataArray() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataArray1() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDataLast() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetDeterminant() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetMax() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMaxMin(ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMean() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetMin() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetNumElements() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetQuaternion(Quaternion< ROTATION_MATRIX_TYPE > &quat) const | BIAS::RMatrixBase |
GetRotationAnglesXYZ(double &PhiX, double &PhiY, double &PhiZ) | BIAS::RMatrixBase |
GetRotationAnglesXYZ(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
GetRotationAnglesZYX(double &PhiX, double &PhiY, double &PhiZ) | BIAS::RMatrixBase |
GetRotationAnglesZYX(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
GetRotationAxisAngle(Vector3< ROTATION_MATRIX_TYPE > &Axis, ROTATION_MATRIX_TYPE &Angle) const | BIAS::RMatrixBase |
GetRotationAxisAngle(Vector3< ROTATION_MATRIX_TYPE > &w) const | BIAS::RMatrixBase |
GetRow(const unsigned int row, Vector3< ROTATION_MATRIX_TYPE > &r) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
GetRow(const unsigned int row) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::GetRow(const int &row) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
GetRows() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
GetSystemMatrix(Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
Invert() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Invert(Matrix3x3< ROTATION_MATRIX_TYPE > &inv) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
InvertIP() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
IsIdentity(double eps=0.0) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
IsZero(double eps=0.0) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
Load(const std::string &filename) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
LoadBogK(const std::string &filename) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
LoadBogRC(const std::string &filename) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
m_ | TNT::Matrix< T > | [protected]
Matrix() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const ROTATION_MATRIX_TYPEvalue) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(int rows, int cols, const MatrixInitType &i) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(const int rows, const int cols, const std::string &s) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [explicit]
Matrix(const Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Matrix(const TNT::Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
TNT::Matrix::Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
TNT::Matrix::Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
Matrix3x3() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Matrix3x3(const std::string &s) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [explicit]
Matrix3x3(const ROTATION_MATRIX_TYPEa0, const ROTATION_MATRIX_TYPEa1, const ROTATION_MATRIX_TYPEa2, const ROTATION_MATRIX_TYPEa3, const ROTATION_MATRIX_TYPEa4, const ROTATION_MATRIX_TYPEa5, const ROTATION_MATRIX_TYPEa6, const ROTATION_MATRIX_TYPEa7, const ROTATION_MATRIX_TYPEa8) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Matrix3x3(const MatrixInitType &i) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline, explicit]
Matrix3x3(const Matrix3x3< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Matrix3x3(const Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Matrix3x3(const TNT::Matrix< ROTATION_MATRIX_TYPE > &A) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
MaxMin(ROTATION_MATRIX_TYPE &max, ROTATION_MATRIX_TYPE &min) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
mn_ | TNT::Matrix< T > | [protected]
Mult(const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Mult(const Matrix3x3< ROTATION_MATRIX_TYPE > &argmat, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Mult(const Matrix3x4< ROTATION_MATRIX_TYPE > &argmat, Matrix3x4< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Matrix< ROTATION_MATRIX_TYPE > &arg, Matrix< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::Mult(const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Multiply(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultiplyIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultLeft(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
MultLeft(const Vector< ROTATION_MATRIX_TYPE > &arg, Vector< ROTATION_MATRIX_TYPE > &result) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
n_ | TNT::Matrix< T > | [protected]
newsize(int rows, int cols) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
BIAS::Matrix< ROTATION_MATRIX_TYPE >::newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
Normalize() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeCols() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeColsToOne(const int norm_row_index) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeRows() | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormalizeRowsToOne(const int norm_col_index) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
NormFrobenius() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
NormL1() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
NormL2() const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const RMatrixBase &mat) | BIAS::RMatrixBase |
BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >::operator=(const Matrix3x3< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::operator=(const TNT::Matrix< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
BIAS::Matrix< ROTATION_MATRIX_TYPE >::operator=(const Matrix< ROTATION_MATRIX_TYPE > &mat) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
TNT::Matrix::operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
TNT::Matrix::operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator==(const RMatrixBase &left, const RMatrixBase &right) | BIAS::RMatrixBase | [friend]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
RMatrixBase() | BIAS::RMatrixBase | [inline]
RMatrixBase(const MatrixInitType &i) | BIAS::RMatrixBase | [inline, explicit]
RMatrixBase(const RMatrixBase &r) | BIAS::RMatrixBase |
RMatrixBase(Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi) | BIAS::RMatrixBase |
RMatrixBase(const TNT::Matrix< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [explicit]
RMatrixBase(const Matrix3x3< ROTATION_MATRIX_TYPE > &mat) | BIAS::RMatrixBase | [inline]
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
Save(const std::string &filename) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
Scale(const ROTATION_MATRIX_TYPE &scalar, Matrix3x3< ROTATION_MATRIX_TYPE > &destmat) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
ScaleCol(int NoCol, ROTATION_MATRIX_TYPEscale) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
ScaleRow(int NoRow, ROTATION_MATRIX_TYPEscale) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
set(const T &val) | TNT::Matrix< T > | [inline, protected]
Set(Vector3< ROTATION_MATRIX_TYPE > w, ROTATION_MATRIX_TYPE phi) | BIAS::RMatrixBase |
Set(Quaternion< ROTATION_MATRIX_TYPE > &q) | BIAS::RMatrixBase |
SetAsCrossProductMatrix(const Vector3< ROTATION_MATRIX_TYPE > &vec) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetAsCrossProductMatrix(const ROTATION_MATRIX_TYPE &x, const ROTATION_MATRIX_TYPE &y, const ROTATION_MATRIX_TYPE &z) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetCol(const int row, const Vector< ROTATION_MATRIX_TYPE > &data) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
SetFromAxisAngle(Vector3< ROTATION_MATRIX_TYPE > w) | BIAS::RMatrixBase |
SetFromColumnVectors(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetFromHV(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xh, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &vy) | BIAS::RMatrixBase |
SetFromOriUpGL(BIAS::Vector3< ROTATION_MATRIX_TYPE > ori, BIAS::Vector3< ROTATION_MATRIX_TYPE > up) | BIAS::RMatrixBase |
SetFromOrthogonalBasis(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &xxx, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &yyy, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &zzz) | BIAS::RMatrixBase |
SetFromQuaternion(const Quaternion< ROTATION_MATRIX_TYPE > &q) | BIAS::RMatrixBase |
SetFromRowVectors(const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v0, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v1, const BIAS::Vector3< ROTATION_MATRIX_TYPE > &v2) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetFromVector(const TNT::Vector< ROTATION_MATRIX_TYPE > &vec) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
SetIdentity() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
SetRow(const int row, const Vector< ROTATION_MATRIX_TYPE > &data) | BIAS::Matrix< ROTATION_MATRIX_TYPE > |
SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ) | BIAS::RMatrixBase |
SetXYZ(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
SetZero() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SetZYX(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ) | BIAS::RMatrixBase |
SetZYX(Vector3< ROTATION_MATRIX_TYPE > &r) | BIAS::RMatrixBase | [inline]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
Sub(const ROTATION_MATRIX_TYPE &scalar, Matrix< ROTATION_MATRIX_TYPE > &dest) const | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SubIP(const Matrix< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
SubIP(const ROTATION_MATRIX_TYPE &scalar) | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [inline]
Trace() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
Transpose() const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > |
Transpose(const Matrix3x3< ROTATION_MATRIX_TYPE > &arg) | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
TransposedMult(const Vector3< ROTATION_MATRIX_TYPE > &argvec, Vector3< ROTATION_MATRIX_TYPE > &destvec) const | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
TransposeIP() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [inline]
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | BIAS::Matrix< ROTATION_MATRIX_TYPE > | [virtual]
~Matrix3x3() | BIAS::Matrix3x3< ROTATION_MATRIX_TYPE > | [virtual]
~RMatrixBase() | BIAS::RMatrixBase | [virtual]

Generated on Wed Jun 21 19:10:37 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ROI Member List

This is the complete list of members for BIAS::ROI, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Corners2Mask() | BIAS::ROI |
Corners2Vector() | BIAS::ROI |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY, unsigned &LowerRightX, unsigned &LowerRightY) const | BIAS::ROI | [inline]
GetCorners(int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const | BIAS::ROI | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMaskData() | BIAS::ROI | [inline]
GetMaskData() const | BIAS::ROI | [inline]
GetMaskDataArray() | BIAS::ROI | [inline]
GetMaskDataArray() const | BIAS::ROI | [inline]
GetMaskHeight() const | BIAS::ROI | [inline]
GetMaskImage(ImageBase &im) const | BIAS::ROI |
GetMaskWidth() const | BIAS::ROI | [inline]
GetVector() | BIAS::ROI | [inline]
GetVector(std::vector< Position > &vec) const | BIAS::ROI |
GlobalDebugLevel | BIAS::Debug | [protected, static]
IsInROI(const double &x, const double &y) const | BIAS::ROI | [inline]
LowerRightX_ | BIAS::ROI | [protected]
LowerRightY_ | BIAS::ROI | [protected]
Mask2Corners() | BIAS::ROI |
Mask2Vector() | BIAS::ROI |
MaskData_ | BIAS::ROI | [protected]
MaskDataArray_ | BIAS::ROI | [protected]
MaskHeight_ | BIAS::ROI | [protected]
MaskValid() const | BIAS::ROI | [inline]
MaskValid_ | BIAS::ROI | [protected]
MaskWidth_ | BIAS::ROI | [protected]
operator<<(std::ostream &os, const ROI &roi) | BIAS::ROI | [friend]
operator=(const ROI &roi) | BIAS::ROI |
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ReadBinary(std::istream &is) | BIAS::ROI |
Release() | BIAS::ROI |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize(unsigned width, unsigned height) | BIAS::ROI |
ROI() | BIAS::ROI |
ROI(const ROI &roi) | BIAS::ROI |
SameSize(const ROI &roi) const | BIAS::ROI |
SetCorners(unsigned UpperLeftX, unsigned UpperLeftY, unsigned LowerRightX, unsigned LowerRightY) | BIAS::ROI |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetMaskImage(const ImageBase &im) | BIAS::ROI |
SetMaskValidFlag(bool flag) | BIAS::ROI | [inline]
SetVector(std::vector< Position > &pos) | BIAS::ROI |
SetVectorValidFlag(bool flag) | BIAS::ROI | [inline]
UnsetROI() | BIAS::ROI |
UpperLeftX_ | BIAS::ROI | [protected]
UpperLeftY_ | BIAS::ROI | [protected]
Vector2Corners() | BIAS::ROI |
Vector2Mask() | BIAS::ROI |
Vector_ | BIAS::ROI | [protected]
VectorValid() const | BIAS::ROI | [inline]
VectorValid_ | BIAS::ROI | [protected]
Version_ | BIAS::ROI | [protected, static]
WriteBinary(std::ostream &os) const | BIAS::ROI |
~Debug() | BIAS::Debug | [inline]
~ROI() | BIAS::ROI |

Generated on Wed Jun 21 19:10:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ScaledImageCanvas Member List

This is the complete list of members for BIAS::ScaledImageCanvas, including all inherited members.

AutoadaptScale_ | BIAS::ScaledImageCanvas | [protected]
GetImageCanvas() | BIAS::ScaledImageCanvas |
GetOrigimg() | BIAS::ScaledImageCanvas |
ImageName_ | BIAS::ScaledImageCanvas | [protected]
MaxOffSet_ | BIAS::ScaledImageCanvas | [protected]
MaxScale_ | BIAS::ScaledImageCanvas | [protected]
MiaScWi_ | BIAS::ScaledImageCanvas | [protected]
MinOffSet_ | BIAS::ScaledImageCanvas | [protected]
MinScale_ | BIAS::ScaledImageCanvas | [protected]
OffsSL_ | BIAS::ScaledImageCanvas | [protected]
OnScaleOffset(wxScrollEvent &event) | BIAS::ScaledImageCanvas | [protected]
origim_ | BIAS::ScaledImageCanvas | [protected]
p_StatBar | BIAS::ScaledImageCanvas | [protected]
rgbim_ | BIAS::ScaledImageCanvas | [protected]
scaledf_ | BIAS::ScaledImageCanvas | [protected]
ScaledImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("ScaledScrolledWindow")) | BIAS::ScaledImageCanvas |
ScaleSL_ | BIAS::ScaledImageCanvas | [protected]
SetAutoadaptScale(const bool b) | BIAS::ScaledImageCanvas | [inline]
SetDefaultZoom(unsigned z) | BIAS::ScaledImageCanvas | [inline]
SetOffset(double offset) | BIAS::ScaledImageCanvas |
SetOffsetRange(double min, double max) | BIAS::ScaledImageCanvas | [inline]
SetScale(double scale) | BIAS::ScaledImageCanvas |
SetScaleRange(double min, double max) | BIAS::ScaledImageCanvas | [inline]
SetStatusBarPtr(wxStatusBar *p_sbar) | BIAS::ScaledImageCanvas |
SetStatusText(const std::string &s) | BIAS::ScaledImageCanvas |
Show(BIAS::ImageBase &im, std::string name) | BIAS::ScaledImageCanvas |
Show(BIAS::PyramidImage< float > &pim, std::string name) | BIAS::ScaledImageCanvas |
Show(bool show=true) | BIAS::ScaledImageCanvas | [inline, virtual]
ucim_ | BIAS::ScaledImageCanvas | [protected]
UpdateScaleOffset() | BIAS::ScaledImageCanvas | [protected]
~ScaledImageCanvas() | BIAS::ScaledImageCanvas |

Generated on Wed Jun 21 19:10:42 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ScanLine2 Member List

This is the complete list of members for BIAS::ScanLine2, including all inherited members.

_bInitialized | BIAS::Bresenham | [protected]
_dDEpsilon | BIAS::ScanLine2 | [protected]
_dDx | BIAS::Bresenham | [protected]
_dDy | BIAS::Bresenham | [protected]
_eLineType | BIAS::Bresenham | [protected]
_iDx | BIAS::Bresenham | [protected]
_iDy | BIAS::Bresenham | [protected]
_iEnd | BIAS::Bresenham | [protected]
_iEps | BIAS::Bresenham | [protected]
_iEpsCount | BIAS::ScanLine2 | [protected]
_iEpsilon | BIAS::ScanLine2 | [protected]
_iStart | BIAS::Bresenham | [protected]
_iSym | BIAS::Bresenham | [protected]
_iTransformedCurrent | BIAS::Bresenham | [protected]
_iTransformedEnd | BIAS::Bresenham | [protected]
_iTransformedStart | BIAS::Bresenham | [protected]
_iTransformedUpDown | BIAS::ScanLine2 | [protected]
Bresenham() | BIAS::Bresenham | [inline]
Bresenham(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
GetNext(int next[2]) | BIAS::ScanLine2 | [inline]
GetNext(unsigned int next[2]) | BIAS::ScanLine2 | [inline]
GetNext(double next[2]) | BIAS::ScanLine2 | [inline]
Init(const int start[2], const int end[2], const int epsilon) | BIAS::ScanLine2 | [inline]
Init(const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon) | BIAS::ScanLine2 | [inline]
Init(const double start[2], const double end[2], double epsilon) | BIAS::ScanLine2 | [inline]
BIAS::Bresenham::Init(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
BIAS::Bresenham::Init(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
BIAS::Bresenham::Init(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
ScanLine2() | BIAS::ScanLine2 | [inline]
ScanLine2(const int start[2], const int end[2], const int epsilon) | BIAS::ScanLine2 | [inline]
ScanLine2(const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon) | BIAS::ScanLine2 | [inline]
ScanLine2(const double start[2], const double end[2], const double epsilon) | BIAS::ScanLine2 | [inline]
~Bresenham() | BIAS::Bresenham | [inline]
~ScanLine2() | BIAS::ScanLine2 | [inline]

Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ScanLine Member List

This is the complete list of members for BIAS::ScanLine, including all inherited members.

_bInitialized | BIAS::Bresenham | [protected]
_dDEpsilon | BIAS::ScanLine | [protected]
_dDx | BIAS::Bresenham | [protected]
_dDy | BIAS::Bresenham | [protected]
_eLineType | BIAS::Bresenham | [protected]
_iDx | BIAS::Bresenham | [protected]
_iDy | BIAS::Bresenham | [protected]
_iEnd | BIAS::Bresenham | [protected]
_iEps | BIAS::Bresenham | [protected]
_iEpsCount | BIAS::ScanLine | [protected]
_iEpsilon | BIAS::ScanLine | [protected]
_iStart | BIAS::Bresenham | [protected]
_iSym | BIAS::Bresenham | [protected]
_iTransformedCurrent | BIAS::Bresenham | [protected]
_iTransformedEnd | BIAS::Bresenham | [protected]
_iTransformedStart | BIAS::Bresenham | [protected]
_iTransformedUpDown | BIAS::ScanLine | [protected]
Bresenham() | BIAS::Bresenham | [inline]
Bresenham(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
Bresenham(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
GetNext(int next[2]) | BIAS::ScanLine | [inline]
GetNext(unsigned int next[2]) | BIAS::ScanLine | [inline]
GetNext(double next[2]) | BIAS::ScanLine | [inline]
Init(const int start[2], const int end[2], const int epsilon) | BIAS::ScanLine | [inline]
Init(const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon) | BIAS::ScanLine | [inline]
Init(const double start[2], const double end[2], double epsilon) | BIAS::ScanLine | [inline]
BIAS::Bresenham::Init(const int start[2], const int end[2]) | BIAS::Bresenham | [inline]
BIAS::Bresenham::Init(const unsigned int start[2], const unsigned int end[2]) | BIAS::Bresenham | [inline]
BIAS::Bresenham::Init(const double start[2], const double end[2]) | BIAS::Bresenham | [inline]
ScanLine() | BIAS::ScanLine | [inline]
ScanLine(const int start[2], const int end[2], const int epsilon) | BIAS::ScanLine | [inline]
ScanLine(const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon) | BIAS::ScanLine | [inline]
ScanLine(const double start[2], const double end[2], const double epsilon) | BIAS::ScanLine | [inline]
~Bresenham() | BIAS::Bresenham | [inline]
~ScanLine() | BIAS::ScanLine | [inline]

Generated on Wed Jun 21 19:10:43 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SettingsGL Member List

This is the complete list of members for BIAS::SettingsGL, including all inherited members.

GetVSyncInterval() | BIAS::SettingsGL | [static]
SetVSyncInterval(const int &interval) | BIAS::SettingsGL | [static]

Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SimilarityTransform Member List

This is the complete list of members for BIAS::SimilarityTransform, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
C_ | BIAS::SimilarityTransform | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Dump() | BIAS::SimilarityTransform |
GetC() const | BIAS::SimilarityTransform | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMatrix() const | BIAS::SimilarityTransform |
GetQ() const | BIAS::SimilarityTransform | [inline]
GetR() const | BIAS::SimilarityTransform | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
InvertIP() | BIAS::SimilarityTransform | [inline]
Load(const std::string &inputFile) | BIAS::SimilarityTransform |
Mult(const SimilarityTransform &arg, SimilarityTransform &result) | BIAS::SimilarityTransform | [inline]
MultVec(const Vector3< double > &vec, Vector3< double > &result) const | BIAS::SimilarityTransform | [inline]
operator<<(std::ostream &os, const SimilarityTransform &p) | BIAS::SimilarityTransform | [friend]
operator=(const SimilarityTransform &c) | BIAS::SimilarityTransform | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator>>(std::istream &is, SimilarityTransform &p) | BIAS::SimilarityTransform | [friend]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
Q_ | BIAS::SimilarityTransform | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Save(const std::string &outputFile) | BIAS::SimilarityTransform |
scale_ | BIAS::SimilarityTransform | [protected]
Set(const Quaternion< double > &Q, const Vector3< double > &C, const double &scale=1.0) | BIAS::SimilarityTransform | [inline]
SetC(const Vector3< double > &C) | BIAS::SimilarityTransform | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetQ(const Quaternion< double > &Q) | BIAS::SimilarityTransform | [inline]
SetR(const BIAS::RMatrixBase &R) | BIAS::SimilarityTransform | [inline]
SimilarityTransform() | BIAS::SimilarityTransform | [inline]
SimilarityTransform(const SimilarityTransform &c) | BIAS::SimilarityTransform | [inline]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:10:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SphericalUndistortion Member List

This is the complete list of members for BIAS::SphericalUndistortion, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode) const | BIAS::CameraParam |
AddCameraDataToXMLTree(XMLIO &myXML, xmlNodePtr &rootNode) const | BIAS::CameraParam | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AngleCorrX_ | BIAS::CameraParam | [protected]
AngleCorrY_ | BIAS::CameraParam | [protected]
aspectratio_ | BIAS::CameraParam | [protected]
CameraParam() | BIAS::CameraParam |
CameraParam(const CameraParam &cp) | BIAS::CameraParam |
CameraParam(const KMatrix &K, const int w, const int h) | BIAS::CameraParam |
CameraParam(const std::string &filename) | BIAS::CameraParam |
CameraParam(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
CamID_ | BIAS::CameraParam | [protected]
CamModel_ | BIAS::CameraParam | [protected]
cellSizeX_ | BIAS::CameraParam | [protected]
cellSizeY_ | BIAS::CameraParam | [protected]
CorrectVignette(Image< StorageType > &src) | BIAS::SphericalUndistortion |
CutOutHeight_ | BIAS::SphericalUndistortion | [protected]
CutOutWidth_ | BIAS::SphericalUndistortion | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DebugOut() const | BIAS::CameraParam |
downsamplingFactor_ | BIAS::CameraParam | [protected]
DrawCircles(Image< StorageType > &src, const double &DegreeStep) | BIAS::SphericalUndistortion |
EnforceNormalRange(double &theta, double &phi) const | BIAS::SphericalUndistortion |
EQUI_SOLID_ANGLE enum value | BIAS::SphericalUndistortion |
EQUIDISTANT enum value | BIAS::SphericalUndistortion |
focallengthDef_ | BIAS::CameraParam | [protected]
focallengthZoom_ | BIAS::CameraParam | [protected]
GetAngleCorrX() const | BIAS::CameraParam | [inline]
GetAngleCorrY() const | BIAS::CameraParam | [inline]
GetAspectratio() const | BIAS::CameraParam | [inline]
GetAspectRatio() const | BIAS::CameraParam | [inline]
GetCamID() const | BIAS::CameraParam | [inline]
GetCellSizeX() | BIAS::CameraParam | [inline]
GetCellSizeY() | BIAS::CameraParam | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetDefaultUndistortion(double &f, double &kc1, double &kc2, double &kc3, double &kc4) const | BIAS::CameraParam | [inline]
GetDownsamplingFactor() | BIAS::CameraParam |
GetFocalLength() const | BIAS::CameraParam |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() const | BIAS::CameraParam |
GetIlluCorrX() const | BIAS::CameraParam | [inline]
GetIlluCorrY() const | BIAS::CameraParam | [inline]
GetKMatrix() | BIAS::SphericalUndistortion |
BIAS::CameraParam::GetKMatrix() const | BIAS::CameraParam |
GetMaxCamAngle() const | BIAS::SphericalUndistortion |
GetPrincipalX() const | BIAS::CameraParam |
GetPrincipalY() const | BIAS::CameraParam |
GetRadius() const | BIAS::CameraParam | [inline]
GetSphereCenter(double &centerX, double &centerY) const | BIAS::SphericalUndistortion |
GetSphereCenter(double &centerX, double &centerY, double &radius) const | BIAS::SphericalUndistortion |
GetSphereRadius() const | BIAS::SphericalUndistortion |
GetWidth() const | BIAS::CameraParam |
GetZoom() const | BIAS::CameraParam |
GetZoomUndistortion(std::vector< CPDiscreteParam > &vp) const | BIAS::CameraParam | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::CameraParam | [protected]
IlluCorrX_ | BIAS::CameraParam | [protected]
IlluCorrY_ | BIAS::CameraParam | [protected]
Init(const double &centerX, const double &centerY, const double &radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::SphericalUndistortion |
Init(const CameraParam &cp) | BIAS::SphericalUndistortion |
Init(const std::string &filename) | BIAS::SphericalUndistortion |
Init(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::SphericalUndistortion |
BIAS::CameraParam::Init() | BIAS::CameraParam |
InitPerspective(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InitSpherical(const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::CameraParam |
InterpolateAbsZoom_() | BIAS::CameraParam | [protected]
InterpolateFocalLength_() | BIAS::CameraParam | [protected]
interpolatorAngle_ | BIAS::SphericalUndistortion | [protected]
interpolatorAngleBack_ | BIAS::SphericalUndistortion | [protected]
interpolatorIllu_ | BIAS::SphericalUndistortion | [protected]
IsInitialized() const | BIAS::CameraParam |
IsInitialized_ | BIAS::CameraParam | [protected]
IsPerspective() const | BIAS::CameraParam | [inline]
IsSpherical() const | BIAS::CameraParam | [inline]
IsZoomCamera() const | BIAS::CameraParam |
kc1Def_ | BIAS::CameraParam | [protected]
kc2Def_ | BIAS::CameraParam | [protected]
kc3Def_ | BIAS::CameraParam | [protected]
kc4Def_ | BIAS::CameraParam | [protected]
knownparams_vect_ | BIAS::CameraParam | [protected]
LensIsSpherical_ | BIAS::CameraParam | [protected]
LensModel_ | BIAS::CameraParam | [protected]
LuT_ | BIAS::SphericalUndistortion | [protected]
LuTPerspPxPy_ | BIAS::SphericalUndistortion | [protected]
LuTPxPySphere_ | BIAS::SphericalUndistortion | [protected]
MaxCamAngle_ | BIAS::CameraParam | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PERSPECTIVE enum value | BIAS::SphericalUndistortion |
principalX_ | BIAS::CameraParam | [protected]
principalY_ | BIAS::CameraParam | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ProjectCoord(const int projectionType, const KMatrix &kMatrix, const HomgPoint2D &Source, HomgPoint2D &Dest) const | BIAS::SphericalUndistortion |
ProjectCoordBack(const int projectionType, const KMatrix &kMatrix, const HomgPoint2D &Source, HomgPoint2D &Dest) const | BIAS::SphericalUndistortion |
ProjectCutOut(const Image< StorageType > &src, Image< StorageType > &dst) | BIAS::SphericalUndistortion |
ProjectCutOut(const Image< unsigned char > &src, Image< unsigned char > &dst) | BIAS::SphericalUndistortion |
ProjectCutOut1(const Image< StorageType > &src, Image< StorageType > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll) | BIAS::SphericalUndistortion |
ProjectCutOut1(const Image< unsigned char > &src, Image< unsigned char > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll) | BIAS::SphericalUndistortion |
ProjectCutOut2(const Image< StorageType > &src, Image< StorageType > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll) | BIAS::SphericalUndistortion |
ProjectCutOut2(const Image< unsigned char > &src, Image< unsigned char > &dst, const double stepwidth, const double &yaw, const double &pitch, const double &roll) | BIAS::SphericalUndistortion |
ProjectImageCylindric(const Image< StorageType > &src, Image< StorageType > &dst, double viewCenterX, double viewCenterY, double zoomFactor) | BIAS::SphericalUndistortion |
radius_ | BIAS::CameraParam | [protected]
ReadCameraData(const std::string &Filename) | BIAS::CameraParam |
ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam |
ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode) | BIAS::CameraParam | [protected]
ReadFromEXIF(const std::string &filename) | BIAS::CameraParam |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetCellSize(const double CellSizeX, const double AspectRatio) | BIAS::CameraParam |
SetData_EVID31_147094() | BIAS::CameraParam |
SetData_OMNITECH_ORIFL_190_3() | BIAS::CameraParam |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDownsampling(const double factor) | BIAS::CameraParam |
SetFocalLength(const double f) | BIAS::CameraParam |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetPrincipal(const double x, const double y) | BIAS::CameraParam |
SetRadius(double r) | BIAS::CameraParam | [inline]
SetSize(unsigned int w, unsigned int h) | BIAS::CameraParam | [inline]
SetUnzoomed() | BIAS::CameraParam |
SetupLutPerspPxPy1(const unsigned int SizeX, const unsigned int SizeY, const int projectionType, KMatrix &KMatDst) | BIAS::SphericalUndistortion |
SetupLutPerspPxPy2(const unsigned int SizeX, const unsigned int SizeY, const int projectionType, KMatrix &KMatDst) | BIAS::SphericalUndistortion |
SetupLutPxPySphere1(const unsigned int srcwidth, const unsigned int srcheight, const unsigned int ChanCnt, const double stepwidth) | BIAS::SphericalUndistortion |
SetupLutPxPySphere2(const unsigned int srcwidth, const unsigned int srcheight, const unsigned int ChanCnt, const double stepwidth) | BIAS::SphericalUndistortion |
SetupProjectionLUT(const unsigned int &srcwidth, const unsigned int &srcheight, const unsigned int &ChanCnt, const unsigned int &SizeX, const unsigned int &SizeY, const double &CenterX, const double &CenterY, const int projectionType, KMatrix &KMatDst) | BIAS::SphericalUndistortion |
SetZoom(const double abszoom) | BIAS::CameraParam |
SetZoomCamera(const bool zoomCam) | BIAS::CameraParam |
SINE_LAW enum value | BIAS::SphericalUndistortion |
SphericalUndistortion() | BIAS::SphericalUndistortion |
SphericalUndistortion(const SphericalUndistortion &sp) | BIAS::SphericalUndistortion |
SphericalUndistortion(const CameraParam &cp) | BIAS::SphericalUndistortion |
SphericalUndistortion(const double &centerX, const double &centerY, const double &radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) | BIAS::SphericalUndistortion |
STEREOGRAPHIC enum value | BIAS::SphericalUndistortion |
TransfCoordImage2Sphere(const HomgPoint2D &Source, double &theta, double &phi) const | BIAS::SphericalUndistortion |
TransfCoordImage2Sphere(const double &SourceX, const double &SourceY, double &theta, double &phi) const | BIAS::SphericalUndistortion |
TransfCoordRotateSphere2Image(double theta, double phi, const double &viewCenterX, const double &viewCenterY, HomgPoint2D &Source) const | BIAS::SphericalUndistortion |
TransfCoordRotateSphere2Image(double theta, double phi, const double &viewCenterX, const double &viewCenterY, double &SourceX, double &SourceY) const | BIAS::SphericalUndistortion |
TransfCoordSphere2CalibImage(const double &theta, const double &phi, HomgPoint2D &Source) const | BIAS::SphericalUndistortion |
TransfCoordSphere2CalibImage(const double &theta, const double &phi, double &SourceX, double &SourceY) const | BIAS::SphericalUndistortion |
TransfCoordSphere2Image(const double &theta, const double &phi, HomgPoint2D &Source) const | BIAS::SphericalUndistortion |
TransfCoordSphere2Image(const double &theta, const double &phi, double &SourceX, double &SourceY) const | BIAS::SphericalUndistortion |
width_ | BIAS::CameraParam | [protected]
WriteCameraData(const std::string &Filename) const | BIAS::CameraParam |
zoom_ | BIAS::CameraParam | [protected]
zoomCamera_ | BIAS::CameraParam | [protected]
~CameraParam() | BIAS::CameraParam |
~Debug() | BIAS::Debug | [inline]
~SphericalUndistortion() | BIAS::SphericalUndistortion |

Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::StatekeeperGL Member List

This is the complete list of members for BIAS::StatekeeperGL, including all inherited members.

StatekeeperGL() | BIAS::StatekeeperGL | [inline]
StatekeeperGL(const GLbitfield &mask) | BIAS::StatekeeperGL | [inline]
~StatekeeperGL() | BIAS::StatekeeperGL | [inline]

Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::StereoRedGreen Member List

This is the complete list of members for BIAS::StereoRedGreen, including all inherited members.

Combine(const Image< StorageType > &left, const Image< StorageType > &right, Image< StorageType > &result) | BIAS::StereoRedGreen
StereoRedGreen() | BIAS::StereoRedGreen
~StereoRedGreen() | BIAS::StereoRedGreen

Generated on Wed Jun 21 19:10:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::StructureTensor< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::StructureTensor< InputStorageType, OutputStorageType >, including all inherited members.

_AddParam(Param &para, const int grp, const std::string &postfix) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_AllocInternalMem(const int width, const int height) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_FilterBorderHandling | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_ggauss | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_ggaussasymmetric | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_grad | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_GradientProducts(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_GradientType | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gsobel3x3 | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gx | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gxx | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gxy | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gy | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_gyy | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_HalfWinSize | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_InternalMemHeight | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_InternalMemWidth | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_ParamsAllocated | BIAS::FilterBase< InputStorageType, OutputStorageType > | [protected]
_tsgxx | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_tsgxy | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_tsgyy | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_UpdateGrad() | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_WriteDebugImage(Image< OutputStorageType > &im, std::string name) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CalcStructureTensor(const Image< InputStorageType > &src, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
CalcStructureTensor(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
CalcStructureTensor3x3(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
CalcStructureTensor5x5(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
CalcStructureTensor7x7(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
CalcStructureTensorValid(const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const std::string &postfix="") | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterBase(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterBase< InputStorageType, OutputStorageType > |
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [virtual]
FilterNTo3N() | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
FilterNTo3N(Param &para, const std::string &postfix="") | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
FilterNTo3N(Param &para, const int group_id, const std::string &postfix) | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > |
GetBorderHandling() const | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
GetBorders(int &border_x, int &border_y) const | BIAS::FilterBase< InputStorageType, OutputStorageType > |
GetBordersValid_(int &border_x, int &border_y) const | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [protected, virtual]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetGradientType() const | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [inline]
GetHalfWinSize() const | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBorderHandling(const int bh) | BIAS::FilterBase< InputStorageType, OutputStorageType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetGradientType(const int gt) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [inline]
SetHalfWinSize(const int hws) | BIAS::StructureTensor< InputStorageType, OutputStorageType > | [inline]
StructureTensor() | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
StructureTensor(Param &para, const std::string &postfix="") | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
StructureTensor(Param &para, const int grp, const std::string &postfix) | BIAS::StructureTensor< InputStorageType, OutputStorageType > |
TBH_full enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_same enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBH_valid enum value | BIAS::FilterBase< InputStorageType, OutputStorageType > |
TBorderHandling enum name | BIAS::FilterBase< InputStorageType, OutputStorageType > |
~Debug() | BIAS::Debug | [inline]
~FilterBase() | BIAS::FilterBase< InputStorageType, OutputStorageType > | [virtual]
~FilterNTo3N() | BIAS::FilterNTo3N< InputStorageType, OutputStorageType > | [virtual]
~StructureTensor() | BIAS::StructureTensor< InputStorageType, OutputStorageType > |

Generated on Wed Jun 21 19:10:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SVD3x3 Member List

This is the complete list of members for BIAS::SVD3x3, including all inherited members.

_Swap(int a, int b) | BIAS::SVD3x3 | [inline, protected]
A_ | BIAS::SVD | [protected]
AbsLeftNullspaceDim() const | BIAS::SVD |
AbsNullspaceDim() const | BIAS::SVD |
AbsoluteZeroThreshold_ | BIAS::SVD | [protected]
AbsRightNullspaceDim() const | BIAS::SVD |
Compute(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD) | BIAS::SVD3x3 |
compute(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD) | BIAS::SVD | [inline]
Decomposed_ | BIAS::SVD | [protected]
General_Eigenproblem_GeneralMatrix_Lapack(const Matrix< double > &M) | BIAS::SVD |
GetLeftNullvector(Vector< double > &nv, const int last_offset=0) | BIAS::SVD | [inline]
GetLeftNullvector(const int last_offset=0) | BIAS::SVD | [inline]
GetNullvector(const int last_offset=0) | BIAS::SVD | [inline]
GetNullvector(Vector< double > &NullVec, const int last_offset=0) | BIAS::SVD | [inline]
GetS() const | BIAS::SVD | [inline]
GetSingularValue(int index) const | BIAS::SVD | [inline]
GetU() const | BIAS::SVD | [inline]
GetV() const | BIAS::SVD | [inline]
GetVT() const | BIAS::SVD | [inline]
GetZeroThreshold() const | BIAS::SVD | [inline]
Invert() | BIAS::SVD |
Invert(Matrix< double > A) | BIAS::SVD |
LeftNullspaceDim() const | BIAS::SVD | [inline]
NullspaceDim() const | BIAS::SVD | [inline]
Rank() | BIAS::SVD |
RelLeftNullspaceDim() const | BIAS::SVD |
RelNullspaceDim() const | BIAS::SVD |
RelRightNullspaceDim() const | BIAS::SVD |
RightNullspaceDim() const | BIAS::SVD | [inline]
S_ | BIAS::SVD | [protected]
size() const | BIAS::SVD | [inline]
Solve(const Vector< double > &y) const | BIAS::SVD |
Solve(Matrix< double > &A, Vector< double > &B, Vector< double > &X) | BIAS::SVD |
solve(const Vector< double > &y) const | BIAS::SVD | [inline]
Sqrt() | BIAS::SVD |
Sqrt(const Matrix< double > &A) | BIAS::SVD |
SqrtT() | BIAS::SVD |
SqrtT(const Matrix< double > &A) | BIAS::SVD |
SVD(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD, bool AbsoluteZeroThreshold=true) | BIAS::SVD |
SVD(bool AbsoluteZeroThreshold=true) | BIAS::SVD | [inline]
SVD3x3() | BIAS::SVD3x3 |
SVD3x3(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD) | BIAS::SVD3x3 |
U_ | BIAS::SVD | [protected]
VT_ | BIAS::SVD | [protected]
ZeroThreshold_ | BIAS::SVD | [protected]
~SVD() | BIAS::SVD | [inline, virtual]
~SVD3x3() | BIAS::SVD3x3 | [inline, virtual]

Generated on Wed Jun 21 19:10:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SVD Member List

This is the complete list of members for BIAS::SVD, including all inherited members.

_liDebugLevel | BIAS::Debug | [private]
_zDebugStream | BIAS::Debug | [private, static]
A_ | BIAS::SVD | [protected]
AbsLeftNullspaceDim() const | BIAS::SVD |
AbsNullspaceDim() const | BIAS::SVD |
AbsoluteZeroThreshold_ | BIAS::SVD | [protected]
AbsRightNullspaceDim() const | BIAS::SVD |
AddDebugLevel(long int lv) | BIAS::Debug | [inline, private]
Compute(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD) | BIAS::SVD |
compute(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD) | BIAS::SVD | [inline]
Debug() | BIAS::Debug | [inline, private]
Debug(Debug &deb) | BIAS::Debug | [inline, private]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, private]
Decomposed_ | BIAS::SVD | [protected]
General_Eigenproblem_GeneralMatrix_Lapack(const Matrix< double > &M) | BIAS::SVD |
GetDebugLevel() const | BIAS::Debug | [inline, private]
GetDebugStream() | BIAS::Debug | [inline, private]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, private]
GetGlobalDebugLevel() | BIAS::Debug | [inline, private, static]
GetLeftNullvector(Vector< double > &nv, const int last_offset=0) | BIAS::SVD | [inline]
GetLeftNullvector(const int last_offset=0) | BIAS::SVD | [inline]
GetNullvector(const int last_offset=0) | BIAS::SVD | [inline]
GetNullvector(Vector< double > &NullVec, const int last_offset=0) | BIAS::SVD | [inline]
GetS() const | BIAS::SVD | [inline]
GetSingularValue(int index) const | BIAS::SVD | [inline]
GetU() const | BIAS::SVD | [inline]
GetV() const | BIAS::SVD | [inline]
GetVT() const | BIAS::SVD | [inline]
GetZeroThreshold() const | BIAS::SVD | [inline]
GlobalDebugLevel | BIAS::Debug | [private, static]
Invert() | BIAS::SVD |
Invert(Matrix< double > A) | BIAS::SVD |
LeftNullspaceDim() const | BIAS::SVD | [inline]
NullspaceDim() const | BIAS::SVD | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline, private]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, private]
Rank() | BIAS::SVD |
RelLeftNullspaceDim() const | BIAS::SVD |
RelNullspaceDim() const | BIAS::SVD |
RelRightNullspaceDim() const | BIAS::SVD |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, private]
RightNullspaceDim() const | BIAS::SVD | [inline]
S_ | BIAS::SVD | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, private]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, private]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, private, static]
size() const | BIAS::SVD | [inline]
Solve(const Vector< double > &y) const | BIAS::SVD |
Solve(Matrix< double > &A, Vector< double > &B, Vector< double > &X) | BIAS::SVD |
solve(const Vector< double > &y) const | BIAS::SVD | [inline]
Sqrt() | BIAS::SVD |
Sqrt(const Matrix< double > &A) | BIAS::SVD |
SqrtT() | BIAS::SVD |
SqrtT(const Matrix< double > &A) | BIAS::SVD |
SVD(const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD, bool AbsoluteZeroThreshold=true) | BIAS::SVD |
SVD(bool AbsoluteZeroThreshold=true) | BIAS::SVD | [inline]
U_ | BIAS::SVD | [protected]
VT_ | BIAS::SVD | [protected]
ZeroThreshold_ | BIAS::SVD | [protected]
~Debug() | BIAS::Debug | [inline, private]
~SVD() | BIAS::SVD | [inline, virtual]

Generated on Wed Jun 21 19:10:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Tensor3D3x3x3< T > Member List

This is the complete list of members for BIAS::Tensor3D3x3x3< T >, including all inherited members.

_Data | BIAS::Tensor3D< T > | [protected]
_DataArray | BIAS::Tensor3D< T > | [protected]
_Dim1 | BIAS::Tensor3D< T > | [protected]
_Dim2 | BIAS::Tensor3D< T > | [protected]
_Dim3 | BIAS::Tensor3D< T > | [protected]
_Size | BIAS::Tensor3D< T > | [protected]
Destroy() | BIAS::Tensor3D< T > |
GetData() | BIAS::Tensor3D< T > | [inline]
GetData() const | BIAS::Tensor3D< T > | [inline]
GetDataArray() | BIAS::Tensor3D< T > | [inline]
GetDim1() const | BIAS::Tensor3D< T > |
GetDim2() const | BIAS::Tensor3D< T > |
GetDim3() const | BIAS::Tensor3D< T > |
GetLength() const | BIAS::Tensor3D< T > |
GetMatrices(Matrix3x3< T > &T1, Matrix3x3< T > &T2, Matrix3x3< T > &T3) const | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction1(Vector3< T > &v, Matrix3x3< T > &res) | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction1(Vector3< T > &v) | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction2(Vector3< T > &v, Matrix3x3< T > &res) | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction2(Vector3< T > &v) | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction3(Vector3< T > &v, Matrix3x3< T > &res) | BIAS::Tensor3D3x3x3< T > | [inline]
LeftContravariantContraction3(Vector3< T > &v) | BIAS::Tensor3D3x3x3< T > | [inline]
NewSize(const int i, const int j, const int k, const T &def=(T) 0.0) | BIAS::Tensor3D3x3x3< T > |
newsize(const int i, const int j, const int k, const T &def=(T) 0.0) | BIAS::Tensor3D3x3x3< T > |
operator()(unsigned int i, unsigned int j, unsigned int k) | BIAS::Tensor3D< T > | [inline]
operator=(const Tensor3D3x3x3< T > &t) | BIAS::Tensor3D3x3x3< T > | [inline]
BIAS::Tensor3D::operator=(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
operator==(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
postmultiply1(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
postmultiply2(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
postmultiply3(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
premultiply1(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
premultiply2(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
premultiply3(const BIAS::Matrix3x3< T > &M, Tensor3D3x3x3< T > &result) const | BIAS::Tensor3D3x3x3< T > |
Scale(T factor) | BIAS::Tensor3D< T > |
SetFromMatrices(const Matrix3x3< T > &T1, const Matrix3x3< T > &T2, const Matrix3x3< T > &T3) | BIAS::Tensor3D3x3x3< T > | [inline]
SetFromVector(const BIAS::Vector< T > &v) | BIAS::Tensor3D< T > |
SetZero() | BIAS::Tensor3D< T > |
Tensor3D() | BIAS::Tensor3D< T > |
Tensor3D(const int i, const int j, const int k, const T &def=(T) 0.0) | BIAS::Tensor3D< T > |
Tensor3D(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< T > |
ToVector() | BIAS::Tensor3D< T > |
~Tensor3D() | BIAS::Tensor3D< T > |
~Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< T > | [virtual]

Generated on Wed Jun 21 19:11:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Tensor3D< T > Member List

This is the complete list of members for BIAS::Tensor3D< T >, including all inherited members.

_Data | BIAS::Tensor3D< T > | [protected]
_DataArray | BIAS::Tensor3D< T > | [protected]
_Dim1 | BIAS::Tensor3D< T > | [protected]
_Dim2 | BIAS::Tensor3D< T > | [protected]
_Dim3 | BIAS::Tensor3D< T > | [protected]
_Size | BIAS::Tensor3D< T > | [protected]
Destroy() | BIAS::Tensor3D< T > |
GetData() | BIAS::Tensor3D< T > | [inline]
GetData() const | BIAS::Tensor3D< T > | [inline]
GetDataArray() | BIAS::Tensor3D< T > | [inline]
GetDim1() const | BIAS::Tensor3D< T > |
GetDim2() const | BIAS::Tensor3D< T > |
GetDim3() const | BIAS::Tensor3D< T > |
GetLength() const | BIAS::Tensor3D< T > |
NewSize(const int i, const int j, const int k, const T &def=(T) 0.0) | BIAS::Tensor3D< T > |
operator()(unsigned int i, unsigned int j, unsigned int k) | BIAS::Tensor3D< T > | [inline]
operator=(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
operator==(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
Scale(T factor) | BIAS::Tensor3D< T > |
SetFromVector(const BIAS::Vector< T > &v) | BIAS::Tensor3D< T > |
SetZero() | BIAS::Tensor3D< T > |
Tensor3D() | BIAS::Tensor3D< T > |
Tensor3D(const int i, const int j, const int k, const T &def=(T) 0.0) | BIAS::Tensor3D< T > |
Tensor3D(const Tensor3D< T > &t) | BIAS::Tensor3D< T > |
ToVector() | BIAS::Tensor3D< T > |
~Tensor3D() | BIAS::Tensor3D< T > |

Generated on Wed Jun 21 19:10:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TFTensorEstimation Member List

This is the complete list of members for BIAS::TFTensorEstimation, including all inherited members.

AlgebraicMinimization(BIAS::TrifocalTensor &Initial, BIAS::TrifocalTensor &Result) | BIAS::TFTensorEstimation | [protected]
Compute(BIAS::TrifocalTensor &T, const std::vector< BIAS::HomgPoint2D > &x1, const std::vector< BIAS::HomgPoint2D > &x2, const std::vector< BIAS::HomgPoint2D > &x3, bool HartleyNormalization=true) | BIAS::TFTensorEstimation |
Norm_ | BIAS::TFTensorEstimation | [protected]
TFTensorEstimation() | BIAS::TFTensorEstimation |
~TFTensorEstimation() | BIAS::TFTensorEstimation |

Generated on Wed Jun 21 19:11:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ThreeDOut Member List

This is the complete list of members for BIAS::ThreeDOut, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddEllipsoid(BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE) | BIAS::ThreeDOut |
AddEllipsoid(BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE) | BIAS::ThreeDOut |
AddImage(const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="") | BIAS::ThreeDOut | [inline]
AddImage(const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, const Vector3< double > &LR, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="") | BIAS::ThreeDOut |
AddLine(const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
AddLine(const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
AddPMatrix(BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="") | BIAS::ThreeDOut |
AddPMatrix(BIAS::Matrix3x4< double > &M, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="") | BIAS::ThreeDOut |
AddPoint(const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
AddPoint(const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
AddPose(const PoseParametrization &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0) | BIAS::ThreeDOut |
AddProjection(const Projection &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0) | BIAS::ThreeDOut |
AddTriangleMesh(const TriangleMesh &mesh, const std::string &name="", const std::string &textureOutputName="", bool writeOutTexture=true) | BIAS::ThreeDOut |
CorrectDefString_(const std::string &defstring) | BIAS::ThreeDOut | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Dump() | BIAS::ThreeDOut |
GetBoundingBox(Vector3< double > &min, Vector3< double > &max) | BIAS::ThreeDOut |
GetCenterOfPoints() | BIAS::ThreeDOut |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMapPMatrices() | BIAS::ThreeDOut | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
mapEllipsoids_ | BIAS::ThreeDOut | [private]
mapImages_ | BIAS::ThreeDOut | [private]
mapIndexedFaceSet_ | BIAS::ThreeDOut | [private]
mapLines_ | BIAS::ThreeDOut | [private]
mapPMatrices_ | BIAS::ThreeDOut | [private]
mapPoints_ | BIAS::ThreeDOut | [private]
mapProjection3D_ | BIAS::ThreeDOut | [private]
NextEllipsoidIndex_ | BIAS::ThreeDOut | [protected]
NextImageIndex_ | BIAS::ThreeDOut | [protected]
NextIndexedFaceSetIndex_ | BIAS::ThreeDOut | [protected]
NextLineIndex_ | BIAS::ThreeDOut | [protected]
NextPIndex_ | BIAS::ThreeDOut | [protected]
NextPointIndex_ | BIAS::ThreeDOut | [protected]
NextProjection3DIndex_ | BIAS::ThreeDOut | [protected]
OpenGLOut(const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
OpenGLOut() | BIAS::ThreeDOut |
OpenGLOutEllipsoids(const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
OpenGLOutEllipsoids() | BIAS::ThreeDOut |
OpenGLOutImages(const bool &disableBlending=true) | BIAS::ThreeDOut |
OpenGLOutLines(const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
OpenGLOutLines() | BIAS::ThreeDOut |
OpenGLOutPMatrices(const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
OpenGLOutPMatrices() | BIAS::ThreeDOut |
OpenGLOutPMatrices_(const BIAS::RGBAuc &Color, bool UseOneColor) | BIAS::ThreeDOut | [protected]
OpenGLOutPoints(const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
OpenGLOutPoints() | BIAS::ThreeDOut |
operator=(const Debug &d) | BIAS::Debug | [inline]
Params_ | BIAS::ThreeDOut | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveAll() | BIAS::ThreeDOut |
RemoveAllEllipsoids() | BIAS::ThreeDOut |
RemoveAllImages() | BIAS::ThreeDOut |
RemoveAllLines() | BIAS::ThreeDOut |
RemoveAllPMatrices() | BIAS::ThreeDOut |
RemoveAllPoints() | BIAS::ThreeDOut |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
RemoveEllipsoid(const unsigned int &EIndex) | BIAS::ThreeDOut |
RemoveImage(const unsigned int &EIndex) | BIAS::ThreeDOut |
RemoveLine(const unsigned int &LineIndex) | BIAS::ThreeDOut |
RemovePMatrix(int index) | BIAS::ThreeDOut |
RemovePoint(const unsigned int &PointIndex) | BIAS::ThreeDOut |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetParams(const ThreeDOutParameters &params) | BIAS::ThreeDOut |
SetParamsCameraScale(double cameraScale) | BIAS::ThreeDOut |
SetParamsCameraStyle(CameraDrawingStyle cameraStyle) | BIAS::ThreeDOut |
SetParamsDrawEllipse(bool drawEllipse) | BIAS::ThreeDOut |
SetParamsPointSize(double pointSize) | BIAS::ThreeDOut |
SetWriteViewpoints(const bool &val) | BIAS::ThreeDOut |
ThreeDOut(const BIAS::ThreeDOutParameters &params=BIAS::ThreeDOutParameters()) | BIAS::ThreeDOut |
UpdateEllipsoid(const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE) | BIAS::ThreeDOut |
UpdateEllipsoid(const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE) | BIAS::ThreeDOut |
UpdateLine(const unsigned int &LineIndex, const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
UpdateLine(const unsigned int &LineIndex, const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
UpdatePMatrix(const unsigned int &PIndex, BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE) | BIAS::ThreeDOut |
UpdatePMatrixColor(const unsigned int &PIndex, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
UpdatePoint(const unsigned int &PointIndex, const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
UpdatePoint(const unsigned int &PointIndex, const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE) | BIAS::ThreeDOut |
VRMLOut(const std::string &sFilename) | BIAS::ThreeDOut |
VRMLOut(const std::string &sFilename, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
VRMLOutEllipsoids(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
VRMLOutEllipsoids(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutImages(std::ostream &VRMLFile) | BIAS::ThreeDOut |
VRMLOutIndexedFaceSets(std::ostream &VRMLFile) | BIAS::ThreeDOut |
VRMLOutLines(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
VRMLOutLines(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutPMatrices(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
VRMLOutPMatrices(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutPMatricesAsArrows_(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut | [protected]
VRMLOutPMatricesAsMesh_(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut | [protected]
VRMLOutPoints(std::ostream &vrml, const BIAS::RGBAuc &Color) | BIAS::ThreeDOut |
VRMLOutPoints(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutPointsAsBoxes_(std::ostream &VRMLFile) | BIAS::ThreeDOut | [protected]
VRMLOutPointsAsPointSet_(std::ostream &VRMLFile) | BIAS::ThreeDOut | [protected]
VRMLOutPointsAsSpheres_(std::ostream &VRMLFile) | BIAS::ThreeDOut | [protected]
VRMLOutProjection(std::ostream &VRMLFile) | BIAS::ThreeDOut |
VRMLOutWriteHeader(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutWriteNavigationInfo(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLOutWriteViewpoint(std::ostream &vrml) | BIAS::ThreeDOut |
VRMLtransparency(const unsigned char alpha) | BIAS::ThreeDOut | [static]
VRMLtransparency(const BIAS::Vector4< unsigned char > &vRgba) | BIAS::ThreeDOut | [static]
WriteViewpoints_ | BIAS::ThreeDOut | [protected]
~Debug() | BIAS::Debug | [inline]
~ThreeDOut() | BIAS::ThreeDOut |

Generated on Wed Jun 21 19:11:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ThreeDOutParameters Member List

This is the complete list of members for BIAS::ThreeDOutParameters, including all inherited members.

CameraScale | BIAS::ThreeDOutParameters
CameraStyle | BIAS::ThreeDOutParameters
DrawUncertaintyEllipsoids | BIAS::ThreeDOutParameters
LineStyle | BIAS::ThreeDOutParameters
LineWidth | BIAS::ThreeDOutParameters
PointSize | BIAS::ThreeDOutParameters
PointStyle | BIAS::ThreeDOutParameters
ThreeDOutParameters() | BIAS::ThreeDOutParameters

Generated on Wed Jun 21 19:11:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TimeMeasure Member List

This is the complete list of members for BIAS::TimeMeasure, including all inherited members.

_dSum | BIAS::TimeMeasure | [protected]
CloseTimerFile() | BIAS::TimeMeasure |
GetCycleCount() const | BIAS::TimeMeasure |
GetFreq() const | BIAS::TimeMeasure |
GetIdleTime() const | BIAS::TimeMeasure |
GetKernelTime() const | BIAS::TimeMeasure |
GetRealTime() const | BIAS::TimeMeasure |
GetUserFreq() const | BIAS::TimeMeasure |
GetUserTime() const | BIAS::TimeMeasure |
IsRunning() const | BIAS::TimeMeasure |
LogToFileAndReset(const std::string &comment) | BIAS::TimeMeasure |
MeasureOverhead() | BIAS::TimeMeasure |
MeasureProcessorFrequency() | BIAS::TimeMeasure |
MSecondsToHumanReadable(const unsigned long &msIN, int &msecOUT, int &seconds, int &minutes, int &hours, int &days, int &weeks) | BIAS::TimeMeasure | [static]
Print(std::ostream &os=std::cout) const | BIAS::TimeMeasure |
PrintCycleCount(std::ostream &os=std::cout) const | BIAS::TimeMeasure |
PrintIdleTime(std::ostream &os=std::cout, const bool &verbose=true) const | BIAS::TimeMeasure |
PrintKernelTime(std::ostream &os=std::cout, const bool &verbose=true) const | BIAS::TimeMeasure |
PrintMsecHumanReadable(const unsigned long msecIN, std::ostream &os=std::cout) | BIAS::TimeMeasure | [static]
PrintRealTime(std::ostream &os=std::cout, const bool &verbose=true) const | BIAS::TimeMeasure |
PrintUserTime(std::ostream &os=std::cout, const bool &verbose=true) const | BIAS::TimeMeasure |
ReadCycleCounter(unsigned int *hi, unsigned int *lo) | BIAS::TimeMeasure | [inline]
Reset() | BIAS::TimeMeasure |
rtActual | BIAS::TimeMeasure | [protected]
rtKernelSum | BIAS::TimeMeasure | [protected]
rtLast | BIAS::TimeMeasure | [protected]
rtRealSum | BIAS::TimeMeasure | [protected]
running | BIAS::TimeMeasure | [protected]
SetTimerFile(const std::string &file) | BIAS::TimeMeasure |
Start() | BIAS::TimeMeasure | [inline]
Stop() | BIAS::TimeMeasure | [inline]
stopstruct | BIAS::TimeMeasure | [protected]
TimeMeasure() | BIAS::TimeMeasure |
TimerStream_ | BIAS::TimeMeasure | [protected, static]
user | BIAS::TimeMeasure | [protected]
~TimeMeasure() | BIAS::TimeMeasure | [inline]

Generated on Wed Jun 21 19:11:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TimeMeasurement Member List

This is the complete list of members for BIAS::TimeMeasurement, including all inherited members.

description_ | BIAS::TimeMeasurement | [protected]
Start() | BIAS::TimeMeasurement | [inline]
TimeMeasurement() | BIAS::TimeMeasurement | [inline]
TimeMeasurement(const std::string &str) | BIAS::TimeMeasurement | [inline]
timer_ | BIAS::TimeMeasurement | [protected]
~TimeMeasurement() | BIAS::TimeMeasurement | [inline]

Generated on Wed Jun 21 19:11:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TopFrame Member List

This is the complete list of members for BIAS::TopFrame, including all inherited members.

Canvas_ | BIAS::TopFrame |
MyGui_ | BIAS::TopFrame | [protected]
OnChar(wxKeyEvent &event) | BIAS::TopFrame |
OnClose(wxCloseEvent &event) | BIAS::TopFrame |
TopFrame(GuiWX *gui, Image< unsigned char > &image) | BIAS::TopFrame |
~TopFrame() | BIAS::TopFrame |

Generated on Wed Jun 21 19:11:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Tracker< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::Tracker< StorageType, CalculationType >, including all inherited members.

_GaussRatio | BIAS::Tracker< StorageType, CalculationType > | [protected]
_GaussSigma | BIAS::Tracker< StorageType, CalculationType > | [protected]
_HalfWinSize | BIAS::Tracker< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxError | BIAS::Tracker< StorageType, CalculationType > | [protected]
_MaxIterations | BIAS::Tracker< StorageType, CalculationType > | [protected]
_MeanSize | BIAS::Tracker< StorageType, CalculationType > | [protected]
_ParamsAllocated | BIAS::Tracker< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddNumPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &quality, const int max_num_feat) | BIAS::Tracker< StorageType, CalculationType > |
AddParameter_(Param &para, const int grp, const std::string &postfix) | BIAS::Tracker< StorageType, CalculationType > | [protected]
AddPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &quality) | BIAS::Tracker< StorageType, CalculationType > |
AffinePrediction_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
AffineResults_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
binomial_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ClearPoints() | BIAS::Tracker< StorageType, CalculationType > |
Cov_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DetermineROI_(int &tlx, int &tly, int &brx, int &bry) const | BIAS::Tracker< StorageType, CalculationType > | [protected]
DisplInLastIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
DumpResults(std::ostream &os=std::cout) | BIAS::Tracker< StorageType, CalculationType > | [inline]
FillUpPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
gauss_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GetCovariances(std::vector< Matrix< double > > &cov) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetError(std::vector< double > &error) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSize() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetMinBorderDistance() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetNumIter(std::vector< int > &numiter) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetPoints(std::vector< HomgPoint2D > &p) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetRejectionType() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResiduiMAD(std::vector< double > &residui) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResiduiMSD(std::vector< double > &residui) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResults(std::vector< int > &results) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetTrackerType() | BIAS::Tracker< StorageType, CalculationType > | [inline]
ggauss_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ggaussasymmetric_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GlobalDebugLevel | BIAS::Debug | [protected, static]
grad_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GradientType_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
gsobel3x3_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
HalfWinSize_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastGradX_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastGradY_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastImage_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
lowpass_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MaxError_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MaxIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
mean_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MeanType_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MinBorderDist_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
NumIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
p2tracked_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PadPoints_(const int start) | BIAS::Tracker< StorageType, CalculationType > | [protected]
ParameterChanged() | BIAS::Tracker< StorageType, CalculationType > |
Points_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PredictedPoints_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PreparePyramide(const Image< StorageType > &im, PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gx, PyramidImage< CalculationType > &gy) | BIAS::Tracker< StorageType, CalculationType > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PyIndex_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ReplaceAllPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
ReplaceLastImages(PyramidImage< CalculationType > *pim, PyramidImage< CalculationType > *gradx, PyramidImage< CalculationType > *grady) | BIAS::Tracker< StorageType, CalculationType > |
ReplacePoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
res_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ReserveInternals_(const int pysize, const int pointsize) | BIAS::Tracker< StorageType, CalculationType > | [protected]
Reset() | BIAS::Tracker< StorageType, CalculationType > |
ResiduiMAD_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResiduiMSD_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResizeInternals_(const int pysize) | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResizeInternals_(const int pysize, const int num_points) | BIAS::Tracker< StorageType, CalculationType > | [protected]
SetCoarsePointUsage(const bool &UseCoarse) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const Vector< int > &hws) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetMaxError(const Vector< double > &max_error) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetMaxIterations(const Vector< int > &max_iter) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetRejectionType(int rejection_type) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetTrackerType(int tracker_type) | BIAS::Tracker< StorageType, CalculationType > | [inline]
tb_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
Track(PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady) | BIAS::Tracker< StorageType, CalculationType > | [virtual]
Track(PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady, const std::vector< HomgPoint2D > &prediction, const std::vector< Matrix2x2< KLT_TYPE > > &affineprediction=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::Tracker< StorageType, CalculationType > | [virtual]
Tracker() | BIAS::Tracker< StorageType, CalculationType > |
Tracker(Param &para, const std::string &postfix="") | BIAS::Tracker< StorageType, CalculationType > |
Tracker(Param &para, const int grp, const std::string &postfix) | BIAS::Tracker< StorageType, CalculationType > |
UseCoarserPointIfLost_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
WriteTrackFile(std::deque< std::vector< HomgPoint2D > > &p, std::deque< std::vector< int > > &results, const std::string &name) | BIAS::Tracker< StorageType, CalculationType > |
WriteTrackLog_(int num) | BIAS::Tracker< StorageType, CalculationType > | [protected]
~Debug() | BIAS::Debug | [inline]
~Tracker() | BIAS::Tracker< StorageType, CalculationType > | [virtual]

Generated on Wed Jun 21 19:11:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerBase< StorageType > Member List

This is the complete list of members for BIAS::TrackerBase< StorageType >, including all inherited members.

_AffineResults | BIAS::TrackerBase< StorageType > | [protected]
_all_diff_from_median | BIAS::TrackerBase< StorageType > | [protected]
_all_ssd_residui | BIAS::TrackerBase< StorageType > | [protected]
_am_computeIntensityDifferenceAffine(Image< StorageType > &img1, Image< StorageType > &img2, const KLT_TYPE &x1, const KLT_TYPE &y1, const KLT_TYPE &x2, const KLT_TYPE &y2, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *imgdiff) | BIAS::TrackerBase< StorageType > | [protected]
_am_getGradientWinAffine(const KLT_TYPE &x, const KLT_TYPE &y, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *out_gradx, KLT_TYPE *out_grady) | BIAS::TrackerBase< StorageType > | [protected]
_bl1 | BIAS::TrackerBase< StorageType > | [protected]
_bl2 | BIAS::TrackerBase< StorageType > | [protected]
_d | BIAS::TrackerBase< StorageType > | [protected]
_diff_from_median | BIAS::TrackerBase< StorageType > | [protected]
_disp | BIAS::TrackerBase< StorageType > | [protected]
_e | BIAS::TrackerBase< StorageType > | [protected]
_G | BIAS::TrackerBase< StorageType > | [protected]
_Ginv | BIAS::TrackerBase< StorageType > | [protected]
_gradim1x | BIAS::TrackerBase< StorageType > | [protected]
_gradim1y | BIAS::TrackerBase< StorageType > | [protected]
_gradim2x | BIAS::TrackerBase< StorageType > | [protected]
_gradim2y | BIAS::TrackerBase< StorageType > | [protected]
_gradx1 | BIAS::TrackerBase< StorageType > | [protected]
_gradx2 | BIAS::TrackerBase< StorageType > | [protected]
_grady1 | BIAS::TrackerBase< StorageType > | [protected]
_grady2 | BIAS::TrackerBase< StorageType > | [protected]
_gsx | BIAS::TrackerBase< StorageType > | [protected]
_gsy | BIAS::TrackerBase< StorageType > | [protected]
_gx | BIAS::TrackerBase< StorageType > | [protected]
_gx1 | BIAS::TrackerBase< StorageType > | [protected]
_gx2 | BIAS::TrackerBase< StorageType > | [protected]
_gxx | BIAS::TrackerBase< StorageType > | [protected]
_gxy | BIAS::TrackerBase< StorageType > | [protected]
_gy | BIAS::TrackerBase< StorageType > | [protected]
_gy1 | BIAS::TrackerBase< StorageType > | [protected]
_gy2 | BIAS::TrackerBase< StorageType > | [protected]
_gyy | BIAS::TrackerBase< StorageType > | [protected]
_HalfWinSize | BIAS::TrackerBase< StorageType > | [protected]
_ida1 | BIAS::TrackerBase< StorageType > | [protected]
_ida2 | BIAS::TrackerBase< StorageType > | [protected]
_idet | BIAS::TrackerBase< StorageType > | [protected]
_im1 | BIAS::TrackerBase< StorageType > | [protected]
_im2 | BIAS::TrackerBase< StorageType > | [protected]
_LastHalfWinSize | BIAS::TrackerBase< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxAffineChange | BIAS::TrackerBase< StorageType > | [protected]
_MaxError | BIAS::TrackerBase< StorageType > | [protected]
_MaxIterations | BIAS::TrackerBase< StorageType > | [protected]
_MaxResiduumMAD | BIAS::TrackerBase< StorageType > | [protected]
_maxx1 | BIAS::TrackerBase< StorageType > | [protected]
_maxx2 | BIAS::TrackerBase< StorageType > | [protected]
_maxy1 | BIAS::TrackerBase< StorageType > | [protected]
_maxy2 | BIAS::TrackerBase< StorageType > | [protected]
_Median | BIAS::TrackerBase< StorageType > | [protected]
_median_ssd_residui | BIAS::TrackerBase< StorageType > | [protected]
_minx1 | BIAS::TrackerBase< StorageType > | [protected]
_minx2 | BIAS::TrackerBase< StorageType > | [protected]
_miny1 | BIAS::TrackerBase< StorageType > | [protected]
_miny2 | BIAS::TrackerBase< StorageType > | [protected]
_ParamsAllocated | BIAS::TrackerBase< StorageType > | [protected]
_RejectionType | BIAS::TrackerBase< StorageType > | [protected]
_ssd_residui | BIAS::TrackerBase< StorageType > | [protected]
_threshold | BIAS::TrackerBase< StorageType > | [protected]
_TrackerType | BIAS::TrackerBase< StorageType > | [protected]
_weight | BIAS::TrackerBase< StorageType > | [protected]
_WinSize | BIAS::TrackerBase< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParam_(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBase< StorageType > | [protected]
brdx | BIAS::TrackerBase< StorageType > | [protected]
brdxy | BIAS::TrackerBase< StorageType > | [protected]
brdy | BIAS::TrackerBase< StorageType > | [protected]
c | BIAS::TrackerBase< StorageType > | [protected]
CalcGaussianWeightMatrix_() | BIAS::TrackerBase< StorageType > | [protected]
cc | BIAS::TrackerBase< StorageType > | [protected]
cf | BIAS::TrackerBase< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateResult_(int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4]) | BIAS::TrackerBase< StorageType > | [protected]
GetAffineResult(Matrix2x2< KLT_TYPE > &Result) | BIAS::TrackerBase< StorageType > | [inline]
GetAffineResults(std::vector< Matrix2x2< KLT_TYPE > > &Results) | BIAS::TrackerBase< StorageType > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSizePointer() | BIAS::TrackerBase< StorageType > | [inline]
GetMaxErrorPointer() | BIAS::TrackerBase< StorageType > | [inline]
GetMaxIterationsPointer() | BIAS::TrackerBase< StorageType > | [inline]
GetRejectionType() | BIAS::TrackerBase< StorageType > | [inline]
GetTrackerType() | BIAS::TrackerBase< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2) | BIAS::TrackerBase< StorageType > |
Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBase< StorageType > | [protected]
InitMembers_() | BIAS::TrackerBase< StorageType > | [protected]
ll | BIAS::TrackerBase< StorageType > | [protected]
lr | BIAS::TrackerBase< StorageType > | [protected]
MyBilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBase< StorageType > | [inline, protected]
MyBilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBase< StorageType > | [inline, protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
r | BIAS::TrackerBase< StorageType > | [protected]
rc | BIAS::TrackerBase< StorageType > | [protected]
RejectMAD_(std::vector< KLT_TYPE > &sad, std::vector< int > &res) | BIAS::TrackerBase< StorageType > | [protected]
RejectX86_(std::vector< KLT_TYPE > &ssd, std::vector< int > &res) | BIAS::TrackerBase< StorageType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(const int halfwinsize) | BIAS::TrackerBase< StorageType > | [inline, protected]
rf | BIAS::TrackerBase< StorageType > | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws) | BIAS::TrackerBase< StorageType > | [inline]
SetMaxAffineChange(const KLT_TYPE maxerr) | BIAS::TrackerBase< StorageType > | [inline]
SetMaxError(const KLT_TYPE maxerr) | BIAS::TrackerBase< StorageType > | [inline]
SetMaxIterations(const int maxiter) | BIAS::TrackerBase< StorageType > | [inline]
SetMaxResiduumMAD(const KLT_TYPE maxres) | BIAS::TrackerBase< StorageType > | [inline]
SetRejectionType(const int rejection_type) | BIAS::TrackerBase< StorageType > | [inline]
SetTrackerType(const int tracker_type) | BIAS::TrackerBase< StorageType > | [inline]
Track(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >()) | BIAS::TrackerBase< StorageType > |
Track(std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerBase< StorageType > |
TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true) | BIAS::TrackerBase< StorageType > | [protected]
TrackerBase() | BIAS::TrackerBase< StorageType > |
TrackerBase(Param &para, const std::string &postfix="") | BIAS::TrackerBase< StorageType > |
TrackerBase(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBase< StorageType > |
TrackSimple_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter) | BIAS::TrackerBase< StorageType > | [protected]
TrackWeighted_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter) | BIAS::TrackerBase< StorageType > | [protected]
ul | BIAS::TrackerBase< StorageType > | [protected]
ur | BIAS::TrackerBase< StorageType > | [protected]
x_floor | BIAS::TrackerBase< StorageType > | [protected]
x_floor_end | BIAS::TrackerBase< StorageType > | [protected]
y_floor | BIAS::TrackerBase< StorageType > | [protected]
y_floor_end | BIAS::TrackerBase< StorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~TrackerBase() | BIAS::TrackerBase< StorageType > |

Generated on Wed Jun 21 19:11:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerBaseAffine< StorageType > Member List

This is the complete list of members for BIAS::TrackerBaseAffine< StorageType >, including all inherited members.

_AffineResults | BIAS::TrackerBaseAffine< StorageType > | [protected]
_all_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_all_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_am_computeIntensityDifferenceAffine(Image< StorageType > &img1, Image< StorageType > &img2, const KLT_TYPE &x1, const KLT_TYPE &y1, const KLT_TYPE &x2, const KLT_TYPE &y2, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *imgdiff) | BIAS::TrackerBaseAffine< StorageType > | [protected]
_am_getGradientWinAffine(const KLT_TYPE &x, const KLT_TYPE &y, const KLT_TYPE &Axx, const KLT_TYPE &Ayx, const KLT_TYPE &Axy, const KLT_TYPE &Ayy, const int halfwidth, const int halfheight, KLT_TYPE *out_gradx, KLT_TYPE *out_grady) | BIAS::TrackerBaseAffine< StorageType > | [protected]
_bl1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ComputeFilteredImages | BIAS::TrackerBaseInterface< StorageType > | [protected]
_d | BIAS::TrackerBaseInterface< StorageType > | [protected]
_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_disp | BIAS::TrackerBaseInterface< StorageType > | [protected]
_e | BIAS::TrackerBaseInterface< StorageType > | [protected]
_G | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Ginv | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradXMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradYMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gyy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_HalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_idet | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_LastHalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_LowpassMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MasksSeparable | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxAffineChange | BIAS::TrackerBaseAffine< StorageType > | [protected]
_MaxError | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxIterations | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxResiduumMAD | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_median_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ParamsAllocated | BIAS::TrackerBaseInterface< StorageType > | [protected]
_RejectionType | BIAS::TrackerBaseInterface< StorageType > | [protected]
_SobelBinomial | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_threshold | BIAS::TrackerBaseInterface< StorageType > | [protected]
_weight | BIAS::TrackerBaseInterface< StorageType > | [protected]
_WinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParam_(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > | [protected]
BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
brdx | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdy | BIAS::TrackerBaseInterface< StorageType > | [protected]
c | BIAS::TrackerBaseInterface< StorageType > | [protected]
cc | BIAS::TrackerBaseInterface< StorageType > | [protected]
cf | BIAS::TrackerBaseInterface< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateResult_(int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4]) | BIAS::TrackerBaseInterface< StorageType > | [protected]
GetAffineResult(Matrix2x2< KLT_TYPE > &Result) | BIAS::TrackerBaseAffine< StorageType > | [inline]
GetAffineResults(std::vector< Matrix2x2< KLT_TYPE > > &Results) | BIAS::TrackerBaseAffine< StorageType > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSizePointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxErrorPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxIterationsPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetRejectionType() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2) | BIAS::TrackerBaseInterface< StorageType > |
Init(Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask) | BIAS::TrackerBaseInterface< StorageType > |
Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
Init_(StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
InitMembers_() | BIAS::TrackerBaseInterface< StorageType > | [protected]
ll | BIAS::TrackerBaseInterface< StorageType > | [protected]
lr | BIAS::TrackerBaseInterface< StorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
r | BIAS::TrackerBaseInterface< StorageType > | [protected]
rc | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectMAD_(std::vector< KLT_TYPE > &sad, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectX86_(std::vector< KLT_TYPE > &ssd, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(const int halfwinsize) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
rf | BIAS::TrackerBaseInterface< StorageType > | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxAffineChange(const KLT_TYPE maxerr) | BIAS::TrackerBaseAffine< StorageType > | [inline]
SetMaxError(const KLT_TYPE maxerr) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxIterations(const int maxiter) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxResiduumMAD(const KLT_TYPE maxres) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetRejectionType(const int rejection_type) | BIAS::TrackerBaseInterface< StorageType > | [inline]
Track(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >()) | BIAS::TrackerBaseInterface< StorageType > |
Track(std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerBaseInterface< StorageType > |
Track_(Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0 | BIAS::TrackerBaseAffine< StorageType > | [protected, pure virtual]
TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2], const Matrix2x2< KLT_TYPE > &p2A, KLT_TYPE result[2], Matrix2x2< KLT_TYPE > &resultA, KLT_TYPE &error, int &iter, Matrix< KLT_TYPE > &Cov, KLT_TYPE &mad, KLT_TYPE &msd, bool Only4=false, bool ComputeCovariance=true) | BIAS::TrackerBaseAffine< StorageType > | [protected]
TrackerBaseAffine() | BIAS::TrackerBaseAffine< StorageType > |
TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const std::string &postfix="") | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > |
ul | BIAS::TrackerBaseInterface< StorageType > | [protected]
ur | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |

Generated on Wed Jun 21 19:11:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerBaseInterface< StorageType > Member List

This is the complete list of members for BIAS::TrackerBaseInterface< StorageType >, including all inherited members.

_all_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_all_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ComputeFilteredImages | BIAS::TrackerBaseInterface< StorageType > | [protected]
_d | BIAS::TrackerBaseInterface< StorageType > | [protected]
_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_disp | BIAS::TrackerBaseInterface< StorageType > | [protected]
_e | BIAS::TrackerBaseInterface< StorageType > | [protected]
_G | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Ginv | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradXMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradYMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gyy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_HalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_idet | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_LastHalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_LowpassMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MasksSeparable | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxError | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxIterations | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxResiduumMAD | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_median_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ParamsAllocated | BIAS::TrackerBaseInterface< StorageType > | [protected]
_RejectionType | BIAS::TrackerBaseInterface< StorageType > | [protected]
_SobelBinomial | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_threshold | BIAS::TrackerBaseInterface< StorageType > | [protected]
_weight | BIAS::TrackerBaseInterface< StorageType > | [protected]
_WinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParam_(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > | [protected]
BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
brdx | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdy | BIAS::TrackerBaseInterface< StorageType > | [protected]
c | BIAS::TrackerBaseInterface< StorageType > | [protected]
cc | BIAS::TrackerBaseInterface< StorageType > | [protected]
cf | BIAS::TrackerBaseInterface< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateResult_(int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4]) | BIAS::TrackerBaseInterface< StorageType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSizePointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxErrorPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxIterationsPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetRejectionType() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2) | BIAS::TrackerBaseInterface< StorageType > |
Init(Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask) | BIAS::TrackerBaseInterface< StorageType > |
Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
Init_(StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
InitMembers_() | BIAS::TrackerBaseInterface< StorageType > | [protected]
ll | BIAS::TrackerBaseInterface< StorageType > | [protected]
lr | BIAS::TrackerBaseInterface< StorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
r | BIAS::TrackerBaseInterface< StorageType > | [protected]
rc | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectMAD_(std::vector< KLT_TYPE > &sad, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectX86_(std::vector< KLT_TYPE > &ssd, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(const int halfwinsize) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
rf | BIAS::TrackerBaseInterface< StorageType > | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxError(const KLT_TYPE maxerr) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxIterations(const int maxiter) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxResiduumMAD(const KLT_TYPE maxres) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetRejectionType(const int rejection_type) | BIAS::TrackerBaseInterface< StorageType > | [inline]
Track(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >()) | BIAS::TrackerBaseInterface< StorageType > |
Track(std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerBaseInterface< StorageType > |
Track_(Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0 | BIAS::TrackerBaseInterface< StorageType > | [protected, pure virtual]
TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const std::string &postfix="") | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > |
ul | BIAS::TrackerBaseInterface< StorageType > | [protected]
ur | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |

Generated on Wed Jun 21 19:11:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerBaseSimple< StorageType > Member List

This is the complete list of members for BIAS::TrackerBaseSimple< StorageType >, including all inherited members.

_all_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_all_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ComputeFilteredImages | BIAS::TrackerBaseInterface< StorageType > | [protected]
_d | BIAS::TrackerBaseInterface< StorageType > | [protected]
_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_disp | BIAS::TrackerBaseInterface< StorageType > | [protected]
_e | BIAS::TrackerBaseInterface< StorageType > | [protected]
_G | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Ginv | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradXMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradYMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gyy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_HalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_idet | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_LastHalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_LowpassMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MasksSeparable | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxError | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxIterations | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxResiduumMAD | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_median_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ParamsAllocated | BIAS::TrackerBaseInterface< StorageType > | [protected]
_RejectionType | BIAS::TrackerBaseInterface< StorageType > | [protected]
_SobelBinomial | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_threshold | BIAS::TrackerBaseInterface< StorageType > | [protected]
_weight | BIAS::TrackerBaseInterface< StorageType > | [protected]
_WinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParam_(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > | [protected]
BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
brdx | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdy | BIAS::TrackerBaseInterface< StorageType > | [protected]
c | BIAS::TrackerBaseInterface< StorageType > | [protected]
cc | BIAS::TrackerBaseInterface< StorageType > | [protected]
cf | BIAS::TrackerBaseInterface< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateResult_(int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4]) | BIAS::TrackerBaseInterface< StorageType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSizePointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxErrorPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxIterationsPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetRejectionType() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2) | BIAS::TrackerBaseInterface< StorageType > |
Init(Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask) | BIAS::TrackerBaseInterface< StorageType > |
Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
Init_(StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
InitMembers_() | BIAS::TrackerBaseInterface< StorageType > | [protected]
ll | BIAS::TrackerBaseInterface< StorageType > | [protected]
lr | BIAS::TrackerBaseInterface< StorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
r | BIAS::TrackerBaseInterface< StorageType > | [protected]
rc | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectMAD_(std::vector< KLT_TYPE > &sad, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectX86_(std::vector< KLT_TYPE > &ssd, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(const int halfwinsize) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
rf | BIAS::TrackerBaseInterface< StorageType > | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxError(const KLT_TYPE maxerr) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxIterations(const int maxiter) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxResiduumMAD(const KLT_TYPE maxres) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetRejectionType(const int rejection_type) | BIAS::TrackerBaseInterface< StorageType > | [inline]
Track(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >()) | BIAS::TrackerBaseInterface< StorageType > |
Track(std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerBaseInterface< StorageType > |
Track_(Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter)=0 | BIAS::TrackerBaseSimple< StorageType > | [protected, pure virtual]
TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const std::string &postfix="") | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseSimple() | BIAS::TrackerBaseSimple< StorageType > |
ul | BIAS::TrackerBaseInterface< StorageType > | [protected]
ur | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |

Generated on Wed Jun 21 19:11:35 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerBaseWeighted< StorageType > Member List

This is the complete list of members for BIAS::TrackerBaseWeighted< StorageType >, including all inherited members.

_all_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_all_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_bl2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ComputeFilteredImages | BIAS::TrackerBaseInterface< StorageType > | [protected]
_d | BIAS::TrackerBaseInterface< StorageType > | [protected]
_diff_from_median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_disp | BIAS::TrackerBaseInterface< StorageType > | [protected]
_e | BIAS::TrackerBaseInterface< StorageType > | [protected]
_G | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Ginv | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim1y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2x | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradim2y | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gradx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradXMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_grady2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_GradYMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gsy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxx | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_gyy | BIAS::TrackerBaseInterface< StorageType > | [protected]
_HalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ida2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_idet | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_im2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_LastHalfWinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_LowpassMask | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MasksSeparable | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxError | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxIterations | BIAS::TrackerBaseInterface< StorageType > | [protected]
_MaxResiduumMAD | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_maxy2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_Median | BIAS::TrackerBaseInterface< StorageType > | [protected]
_median_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_minx2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny1 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_miny2 | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ParamsAllocated | BIAS::TrackerBaseInterface< StorageType > | [protected]
_RejectionType | BIAS::TrackerBaseInterface< StorageType > | [protected]
_SobelBinomial | BIAS::TrackerBaseInterface< StorageType > | [protected]
_ssd_residui | BIAS::TrackerBaseInterface< StorageType > | [protected]
_threshold | BIAS::TrackerBaseInterface< StorageType > | [protected]
_weight | BIAS::TrackerBaseWeighted< StorageType > | [protected]
_WinSize | BIAS::TrackerBaseInterface< StorageType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParam_(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > | [protected]
BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterBinomial3Sobel3x3_2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterMask2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionFilterVec2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
brdx | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdxy | BIAS::TrackerBaseInterface< StorageType > | [protected]
brdy | BIAS::TrackerBaseInterface< StorageType > | [protected]
c | BIAS::TrackerBaseInterface< StorageType > | [protected]
CalcGaussianWeightMatrix_() | BIAS::TrackerBaseWeighted< StorageType > | [protected]
cc | BIAS::TrackerBaseInterface< StorageType > | [protected]
cf | BIAS::TrackerBaseInterface< StorageType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
EvaluateResult_(int &res, KLT_TYPE &mad, KLT_TYPE &msd, KLT_TYPE cov[4]) | BIAS::TrackerBaseInterface< StorageType > | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSizePointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxErrorPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetMaxIterationsPointer() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GetRejectionType() | BIAS::TrackerBaseInterface< StorageType > | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Init(Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2) | BIAS::TrackerBaseInterface< StorageType > |
Init(Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask) | BIAS::TrackerBaseInterface< StorageType > |
Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1, StorageType **grady1, StorageType **gradx2, StorageType **grady2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
Init_(StorageType **ida1, StorageType **ida2, unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1, unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2) | BIAS::TrackerBaseInterface< StorageType > | [protected]
InitMembers_() | BIAS::TrackerBaseInterface< StorageType > | [protected]
ll | BIAS::TrackerBaseInterface< StorageType > | [protected]
lr | BIAS::TrackerBaseInterface< StorageType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
r | BIAS::TrackerBaseInterface< StorageType > | [protected]
rc | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectMAD_(std::vector< KLT_TYPE > &sad, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RejectX86_(std::vector< KLT_TYPE > &ssd, std::vector< int > &res) | BIAS::TrackerBaseInterface< StorageType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(const int halfwinsize) | BIAS::TrackerBaseInterface< StorageType > | [inline, protected]
rf | BIAS::TrackerBaseInterface< StorageType > | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const int hws) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxError(const KLT_TYPE maxerr) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxIterations(const int maxiter) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetMaxResiduumMAD(const KLT_TYPE maxres) | BIAS::TrackerBaseInterface< StorageType > | [inline]
SetRejectionType(const int rejection_type) | BIAS::TrackerBaseInterface< StorageType > | [inline]
Track(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >()) | BIAS::TrackerBaseInterface< StorageType > |
Track(std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerBaseInterface< StorageType > |
Track_(Vector< KLT_TYPE > &p1, Vector< KLT_TYPE > &p2, Vector< KLT_TYPE > &result, KLT_TYPE &error, int &iter) | BIAS::TrackerBaseWeighted< StorageType > | [protected, virtual]
TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const std::string &postfix="") | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseInterface(Param &para, const int grp, const std::string &postfix) | BIAS::TrackerBaseInterface< StorageType > |
TrackerBaseWeighted() | BIAS::TrackerBaseWeighted< StorageType > |
TrackWeighted_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2], KLT_TYPE &error, int &iter) | BIAS::TrackerBaseWeighted< StorageType > | [protected]
ul | BIAS::TrackerBaseInterface< StorageType > | [protected]
ur | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
x_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor | BIAS::TrackerBaseInterface< StorageType > | [protected]
y_floor_end | BIAS::TrackerBaseInterface< StorageType > | [protected]
~Debug() | BIAS::Debug | [inline]
~TrackerBaseInterface() | BIAS::TrackerBaseInterface< StorageType > |

Generated on Wed Jun 21 19:11:40 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrackerSynth< StorageType, CalculationType > Member List

This is the complete list of members for BIAS::TrackerSynth< StorageType, CalculationType >, including all inherited members.

_GaussRatio | BIAS::Tracker< StorageType, CalculationType > | [protected]
_GaussSigma | BIAS::Tracker< StorageType, CalculationType > | [protected]
_HalfWinSize | BIAS::Tracker< StorageType, CalculationType > | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_MaxError | BIAS::Tracker< StorageType, CalculationType > | [protected]
_MaxIterations | BIAS::Tracker< StorageType, CalculationType > | [protected]
_MeanSize | BIAS::Tracker< StorageType, CalculationType > | [protected]
_ParamsAllocated | BIAS::Tracker< StorageType, CalculationType > | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddGaussianNoise_() | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
AddNumPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &quality, const int max_num_feat) | BIAS::Tracker< StorageType, CalculationType > |
AddOutlier_() | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
AddParameter_(Param &para, const int grp, const std::string &postfix) | BIAS::Tracker< StorageType, CalculationType > | [protected]
AddPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &quality) | BIAS::Tracker< StorageType, CalculationType > |
AffinePrediction_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
AffineResults_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
binomial_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ClearPoints() | BIAS::Tracker< StorageType, CalculationType > |
Cov_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DetermineROI_(int &tlx, int &tly, int &brx, int &bry) const | BIAS::Tracker< StorageType, CalculationType > | [protected]
DisplInLastIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
DumpResults(std::ostream &os=std::cout) | BIAS::Tracker< StorageType, CalculationType > | [inline]
FillUpPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
FindNearest_(HomgPoint2D &p, int &nearest_frame_index, int &nearest_track_index) | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
FindNearest_(HomgPoint2D &p, const int frame) | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
Frame_ | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
gauss_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GetCovariances(std::vector< Matrix< double > > &cov) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetError(std::vector< double > &error) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHalfWinSize() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetMinBorderDistance() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetNumIter(std::vector< int > &numiter) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetPoints(std::vector< HomgPoint2D > &p) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetRejectionType() | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResiduiMAD(std::vector< double > &residui) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResiduiMSD(std::vector< double > &residui) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetResults(std::vector< int > &results) const | BIAS::Tracker< StorageType, CalculationType > | [inline]
GetTrackerType() | BIAS::Tracker< StorageType, CalculationType > | [inline]
ggauss_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ggaussasymmetric_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GlobalDebugLevel | BIAS::Debug | [protected, static]
grad_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
GradientType_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
gsobel3x3_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
HalfWinSize_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastGradX_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastGradY_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
LastImage_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
lowpass_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MaxError_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MaxIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
mean_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MeanType_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
MinBorderDist_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
NumIter_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
p2tracked_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PadPoints_(const int start) | BIAS::Tracker< StorageType, CalculationType > | [protected]
ParameterChanged() | BIAS::Tracker< StorageType, CalculationType > |
Points_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PredictedPoints_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
PreparePyramide(const Image< StorageType > &im, PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gx, PyramidImage< CalculationType > &gy) | BIAS::Tracker< StorageType, CalculationType > |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PyIndex_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ReadTracks_(const std::string &filename) | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ReplaceAllPoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
ReplaceLastImages(PyramidImage< CalculationType > *pim, PyramidImage< CalculationType > *gradx, PyramidImage< CalculationType > *grady) | BIAS::Tracker< StorageType, CalculationType > |
ReplacePoints(const std::vector< HomgPoint2D > &points, const std::vector< float > &qual) | BIAS::Tracker< StorageType, CalculationType > |
res_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ReserveInternals_(const int pysize, const int pointsize) | BIAS::Tracker< StorageType, CalculationType > | [protected]
Reset() | BIAS::Tracker< StorageType, CalculationType > |
ResiduiMAD_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResiduiMSD_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResizeInternals_(const int pysize) | BIAS::Tracker< StorageType, CalculationType > | [protected]
ResizeInternals_(const int pysize, const int num_points) | BIAS::Tracker< StorageType, CalculationType > | [protected]
SetCoarsePointUsage(const bool &UseCoarse) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetHalfWinSize(const Vector< int > &hws) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetMaxError(const Vector< double > &max_error) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetMaxIterations(const Vector< int > &max_iter) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetRejectionType(int rejection_type) | BIAS::Tracker< StorageType, CalculationType > | [inline]
SetTrackerType(int tracker_type) | BIAS::Tracker< StorageType, CalculationType > | [inline]
tb_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
Track(PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady) | BIAS::TrackerSynth< StorageType, CalculationType > | [virtual]
Track(PyramidImage< CalculationType > &pim, PyramidImage< CalculationType > &gradx, PyramidImage< CalculationType > &grady, const std::vector< HomgPoint2D > &prediction, const std::vector< Matrix2x2< KLT_TYPE > > &affineprediction=std::vector< Matrix2x2< KLT_TYPE > >()) | BIAS::TrackerSynth< StorageType, CalculationType > | [virtual]
Track_() | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
Tracker() | BIAS::Tracker< StorageType, CalculationType > |
Tracker(Param &para, const std::string &postfix="") | BIAS::Tracker< StorageType, CalculationType > |
Tracker(Param &para, const int grp, const std::string &postfix) | BIAS::Tracker< StorageType, CalculationType > |
TrackerSynth(Param &para, const std::string &postfix="", const std::string &filename="tracks.txt") | BIAS::TrackerSynth< StorageType, CalculationType > |
TrackerSynth(Param &para, const int grp, const std::string &postfix, const std::string &filename="tracks.txt") | BIAS::TrackerSynth< StorageType, CalculationType > |
Tracks_ | BIAS::TrackerSynth< StorageType, CalculationType > | [protected]
UseCoarserPointIfLost_ | BIAS::Tracker< StorageType, CalculationType > | [protected]
WriteTrackFile(std::deque< std::vector< HomgPoint2D > > &p, std::deque< std::vector< int > > &results, const std::string &name) | BIAS::Tracker< StorageType, CalculationType > |
WriteTrackLog_(int num) | BIAS::Tracker< StorageType, CalculationType > | [protected]
~Debug() | BIAS::Debug | [inline]
~Tracker() | BIAS::Tracker< StorageType, CalculationType > | [virtual]
~TrackerSynth() | BIAS::TrackerSynth< StorageType, CalculationType > | [virtual]

Generated on Wed Jun 21 19:11:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TriangleMesh Member List

This is the complete list of members for BIAS::TriangleMesh, including all inherited members.

GenerateDenseMesh(const BIAS::Image< float > &DenseDepthMap, BIAS::PMatrix &P, const BIAS::Image< unsigned char > &Texture) | BIAS::TriangleMesh |
GenerateDenseMesh(const BIAS::Image< float > &DenseDepthMap, BIAS::PMatrix &P, const BIAS::Image< unsigned char > &Texture, const ROI &cutout) | BIAS::TriangleMesh |
GetNormals(std::vector< BIAS::Vector3< double > > &normals) const | BIAS::TriangleMesh | [inline]
GetTexCoords(std::vector< BIAS::Vector2< float > > &texCoo) const | BIAS::TriangleMesh | [inline]
GetTexture(Image< unsigned char > &img) const | BIAS::TriangleMesh | [inline]
GetTriangleIndices(std::vector< BIAS::Vector< int > > &triangleIndices) const | BIAS::TriangleMesh | [inline]
GetVertices(std::vector< BIAS::Vector3< double > > &vertices) const | BIAS::TriangleMesh | [inline]
meshVertices_ | BIAS::TriangleMesh | [protected]
texture_ | BIAS::TriangleMesh | [protected]
textureCoords_ | BIAS::TriangleMesh | [protected]
triangleIndices_ | BIAS::TriangleMesh | [protected]
vertexNormals_ | BIAS::TriangleMesh | [protected]
~TriangleMesh() | BIAS::TriangleMesh | [inline]

Generated on Wed Jun 21 19:11:46 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Triangulation Member List

This is the complete list of members for BIAS::Triangulation, including all inherited members.

_dTriangDeltaPixels | BIAS::Triangulation | [protected]
_dTriangSigmaPixels | BIAS::Triangulation | [protected]
_liDebugLevel | BIAS::Debug | [protected]
_UpdateCovWeights(const double &TriangDeltaPixels=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA) | BIAS::Triangulation | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
CorrectCorrespondences(const FMatrix &F, HomgPoint2D &p1, HomgPoint2D &p2, bool refine=false) | BIAS::Triangulation |
cov_weights_ | BIAS::Triangulation | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCovariance(PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const Matrix2x2< double > &cov1, const HomgPoint2D &p2, const Matrix2x2< double > &cov2, HomgPoint3D &p, Matrix3x3< double > &cov, const int num) | BIAS::Triangulation |
GetCovariance2D(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL) | BIAS::Triangulation |
GetCovarianceAnalytic(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA) | BIAS::Triangulation |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Intersect(Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res) | BIAS::Triangulation |
Intersect(Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res, double &dist) | BIAS::Triangulation |
Intersect(Vector3< double > &a1, Vector3< double > &a2, Vector3< double > &b1, Vector3< double > &b2) | BIAS::Triangulation |
operator=(const Debug &d) | BIAS::Debug | [inline]
Optimal(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d) | BIAS::Triangulation |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Triangulate(PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d) | BIAS::Triangulation |
Triangulate2D(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, double &dist, double &angle) | BIAS::Triangulation |
Triangulate2D(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, Matrix3x3< double > &CovMatrix, double &dist, double &angle, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL) | BIAS::Triangulation |
TriangulateLinear(PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d) | BIAS::Triangulation |
Triangulation() | BIAS::Triangulation |
~Debug() | BIAS::Debug | [inline]
~Triangulation() | BIAS::Triangulation |

Generated on Wed Jun 21 19:11:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrifocalTensor Member List

This is the complete list of members for BIAS::TrifocalTensor, including all inherited members.

_Data | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_DataArray | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim1 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim2 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim3 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Size | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
CanH_ | BIAS::TrifocalTensor | [protected]
CheckPointCorr(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p3, Matrix3x3< double > &res) | BIAS::TrifocalTensorBase |
Compose(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3) | BIAS::TrifocalTensor |
Compose(BIAS::PMatrix &P2, BIAS::PMatrix &P3) | BIAS::TrifocalTensor |
BIAS::TrifocalTensorBase::Compose(RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C1, Vector3< double > &C2, Vector3< double > &C3) | BIAS::TrifocalTensorBase |
BIAS::TrifocalTensorBase::Compose(RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C1, HomgPoint3D &C2, HomgPoint3D &C3) | BIAS::TrifocalTensorBase |
BIAS::TrifocalTensorBase::Compose(RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C2, Vector3< double > &C3) | BIAS::TrifocalTensorBase |
BIAS::TrifocalTensorBase::Compose(RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C2, HomgPoint3D &C3) | BIAS::TrifocalTensorBase |
ComputeEpipoles() | BIAS::TrifocalTensor | [protected]
Destroy() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Dump() | BIAS::TrifocalTensorBase |
Epipole21_ | BIAS::TrifocalTensor | [protected]
Epipole31_ | BIAS::TrifocalTensor | [protected]
GetCanonicalH() const | BIAS::TrifocalTensor | [inline]
GetData() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetData() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetDataArray() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetDim1() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetDim2() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetDim3() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetEpipolarLines(Vector3< TRIFOCALTENSOR_TYPE > &Point1, HomgLine2D &Line2, HomgLine2D &Line3) | BIAS::TrifocalTensor |
GetEpipole21(bool ForceReCalc=false) | BIAS::TrifocalTensor |
GetEpipole31(bool ForceReCalc=false) | BIAS::TrifocalTensor |
GetFMatrix21(bool ForceReCalc=false) | BIAS::TrifocalTensor |
GetFMatrix31(bool ForceReCalc=false) | BIAS::TrifocalTensor |
GetLength() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetMatrices(Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
GetPMatrix2(bool ForceReCalc=false) | BIAS::TrifocalTensor |
GetPMatrix3(bool ForceReCalc=false) | BIAS::TrifocalTensor |
Init() | BIAS::TrifocalTensor |
LeftContravariantContraction1(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction1(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction2(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction2(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction3(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction3(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
newsize(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
NewSize(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
operator()(unsigned int i, unsigned int j, unsigned int k) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
operator=(const TrifocalTensor &t) | BIAS::TrifocalTensor |
BIAS::TrifocalTensorBase::operator=(const TrifocalTensorBase &t) | BIAS::TrifocalTensorBase |
BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::operator=(const Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator=(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
operator==(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
postmultiply1(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
postmultiply2(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
postmultiply3(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply1(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply2(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply3(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
Scale(TRIFOCALTENSOR_TYPEfactor) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
SetFromMatrices(const Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
SetFromVector(const BIAS::Vector< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
SetZero() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
ToVector() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
TransferView3(Vector3< TRIFOCALTENSOR_TYPE > &x1, Vector3< TRIFOCALTENSOR_TYPE > &x2) | BIAS::TrifocalTensor |
TrifocalTensor() | BIAS::TrifocalTensor |
TrifocalTensor(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3) | BIAS::TrifocalTensor |
TrifocalTensor(BIAS::PMatrix &P2, BIAS::PMatrix &P3) | BIAS::TrifocalTensor |
TrifocalTensorBase() | BIAS::TrifocalTensorBase |
TrifocalTensorBase(const TrifocalTensorBase &t) | BIAS::TrifocalTensorBase |
~Tensor3D() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
~Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [virtual]
~TrifocalTensor() | BIAS::TrifocalTensor |
~TrifocalTensorBase() | BIAS::TrifocalTensorBase |

Generated on Wed Jun 21 19:11:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::TrifocalTensorBase Member List

This is the complete list of members for BIAS::TrifocalTensorBase, including all inherited members.

_Data | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_DataArray | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim1 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim2 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Dim3 | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
_Size | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [protected]
CheckPointCorr(HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p3, Matrix3x3< double > &res) | BIAS::TrifocalTensorBase |
Compose(RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C1, Vector3< double > &C2, Vector3< double > &C3) | BIAS::TrifocalTensorBase |
Compose(RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C1, HomgPoint3D &C2, HomgPoint3D &C3) | BIAS::TrifocalTensorBase |
Compose(RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C2, Vector3< double > &C3) | BIAS::TrifocalTensorBase |
Compose(RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C2, HomgPoint3D &C3) | BIAS::TrifocalTensorBase |
Destroy() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Dump() | BIAS::TrifocalTensorBase |
GetData() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetData() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetDataArray() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
GetDim1() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetDim2() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetDim3() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetLength() const | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
GetMatrices(Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction1(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction1(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction2(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction2(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction3(Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
LeftContravariantContraction3(Vector3< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
NewSize(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
newsize(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
operator()(unsigned int i, unsigned int j, unsigned int k) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > | [inline]
operator=(const TrifocalTensorBase &t) | BIAS::TrifocalTensorBase |
BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::operator=(const Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator=(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
operator==(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
postmultiply1(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
postmultiply2(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
postmultiply3(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply1(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply2(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
premultiply3(const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
Scale(TRIFOCALTENSOR_TYPEfactor) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
SetFromMatrices(const Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [inline]
SetFromVector(const BIAS::Vector< TRIFOCALTENSOR_TYPE > &v) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
SetZero() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D(const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D(const Tensor3D< TRIFOCALTENSOR_TYPE > &t) | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > |
ToVector() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
TrifocalTensorBase() | BIAS::TrifocalTensorBase |
TrifocalTensorBase(const TrifocalTensorBase &t) | BIAS::TrifocalTensorBase |
~Tensor3D() | BIAS::Tensor3D< TRIFOCALTENSOR_TYPE > |
~Tensor3D3x3x3() | BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > | [virtual]
~TrifocalTensorBase() | BIAS::TrifocalTensorBase |

Generated on Wed Jun 21 19:11:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::UndistortionMapping< InputStorageType, OutputStorageType > Member List

This is the complete list of members for BIAS::UndistortionMapping< InputStorageType, OutputStorageType >, including all inherited members.

aliasing_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
alphaImg_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
autoPyramidSize_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline]
BuildPyramid_(const Image< InputStorageType > &source, bool forceInit=true) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalcCoordOffset_(const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
CalculatePerspDistorion_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
CalculatePerspUndistorion_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
CalculateSphericalCoord_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
CalculateToSphereMapping_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
ChangeImgSize_(Image< OutputStorageType > &, const Image< InputStorageType > &) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipBoundingBoxToROICorners_(const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ClipValue_(const double &value, OutputStorageType &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
ClipValue_(const double &value, float &newvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
cp_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
destCenterX_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
destCenterY_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
destK_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
destProjType_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
DistortPerspImage(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
DistortPerspImage(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, KMatrix &K) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
GetAnisotropicImageValue_(const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetBoundingBox(unsigned int, unsigned int, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
GetImageValue_(const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
GetJacobian_(const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected, virtual]
GetTrilinearImageValue_(const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
height_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
interpolationType_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
JacobianToMask_(const Matrix2x2< double > &Jacobian, Matrix< double > &theMask) const | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
log2inv_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
Map(const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
Map(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
MapBi_(const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapPerspToSphere(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const KMatrix Ksrc, const double &CenterX, const double &CenterY, const int projectionType) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
mapping_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
MapTri_(Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
MapType enum name | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
offsetX_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
offsetY_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
PERSPECTIVE_DIST enum value | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
PERSPECTIVE_UNDIST enum value | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
ProjectSphereImage(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, const int &SizeX, const int &SizeY, const double &FovX, const double &FovY, const double &CenterX, const double &CenterY, const int projectionType, const double &zoomFactor, KMatrix &KMatDst) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
pu_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
pyramid_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
rangeChecked_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
ROI_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
SetCameraParam(const CameraParam &cp) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [inline]
SetPyramidSize(const int newsize) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > |
SPHERICAL enum value | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
su_ | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
TO_SPHERE enum value | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
UNDEF enum value | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [protected]
UndistortionMapping() | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
UndistortPerspImage(const Image< InputStorageType > &src, Image< OutputStorageType > &dst) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
UndistortPerspImage(const Image< InputStorageType > &src, Image< OutputStorageType > &dst, KMatrix &K) | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > |
UpdatePyramidSize(const Image< OutputStorageType > &sink) | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [virtual]
width_ | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [protected]
~BackwardMapping() | BIAS::BackwardMapping< InputStorageType, OutputStorageType > | [inline, virtual]
~UndistortionMapping() | BIAS::UndistortionMapping< InputStorageType, OutputStorageType > | [virtual]

Generated on Wed Jun 21 19:11:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::UnscentedTransform Member List

This is the complete list of members for BIAS::UnscentedTransform, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Alpha_ | BIAS::UnscentedTransform | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Kappa_ | BIAS::UnscentedTransform | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform |
Transform_(const Vector< double > &src, Vector< double > &dst) const =0 | BIAS::UnscentedTransform | [protected, pure virtual]
UnscentedTransform() | BIAS::UnscentedTransform |
~Debug() | BIAS::Debug | [inline]
~UnscentedTransform() | BIAS::UnscentedTransform | [virtual]

Generated on Wed Jun 21 19:11:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::UnVignette Member List

This is the complete list of members for BIAS::UnVignette, including all inherited members.

A_ | BIAS::UnVignette | [private]
bIsInitialized_ | BIAS::UnVignette | [private]
bLeastSquaresPrepared_ | BIAS::UnVignette | [private]
bUseLuT_ | BIAS::UnVignette | [private]
CalcRadius_(double x, double y) | BIAS::UnVignette | [private]
Compute(BIAS::Image< unsigned char > &Image) | BIAS::UnVignette |
ControlPoints_ | BIAS::UnVignette | [private]
dChannelCount_ | BIAS::UnVignette | [private]
dHeight_ | BIAS::UnVignette | [private]
dHeightHalfMPPY_ | BIAS::UnVignette | [private]
dInterPolationMethod_ | BIAS::UnVignette | [private]
dWidth_ | BIAS::UnVignette | [private]
dWidthHalfMPPX_ | BIAS::UnVignette | [private]
IlluCorrX_ | BIAS::UnVignette | [private]
IlluCorrY_ | BIAS::UnVignette | [private]
Init(const std::vector< double > ControlPoints, std::vector< double > PercentageValues, unsigned int dImageWidth, unsigned int dImageHeight, int dPPX, int dPPY, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true) | BIAS::UnVignette |
Init(BIAS::CameraParam cParam, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true) | BIAS::UnVignette |
InterpolatorIllu_ | BIAS::UnVignette | [private]
IsInitialized() | BIAS::UnVignette | [inline]
LeastSquares_(double &res, double radius) | BIAS::UnVignette | [private]
LuImage_ | BIAS::UnVignette | [private]
PercentageValues_ | BIAS::UnVignette | [private]
PrepareLeastSquaresMin_() | BIAS::UnVignette | [private]
PrepareLuImage_() | BIAS::UnVignette | [private]
PrinciplePointX_ | BIAS::UnVignette | [private]
PrinciplePointY_ | BIAS::UnVignette | [private]
UnVignette() | BIAS::UnVignette |
UnVignette(CameraParam &cParam, INTERPOLATION_METHOD method=LEAST_SQUARES, bool bUseLuT=true) | BIAS::UnVignette |
X_ | BIAS::UnVignette | [private]
Y_ | BIAS::UnVignette | [private]
~UnVignette() | BIAS::UnVignette |

Generated on Wed Jun 21 19:11:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::UUID Member List

This is the complete list of members for BIAS::UUID, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AssignUUID(const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY) | BIAS::UUID |
AssignUUID_Consecutive() | BIAS::UUID |
AssignUUID_Global() | BIAS::UUID |
clear() | BIAS::UUID |
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
g_uniqueCounter | BIAS::UUID | [protected, static]
GenerateUUID(const bool &consecutively=DEFAULT_UUID_CONSECUTIVELY) | BIAS::UUID | [static]
GenerateUUID_Consecutive() | BIAS::UUID | [static]
GenerateUUID_Global() | BIAS::UUID | [static]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetLong() const | BIAS::UUID |
GetString(std::string &sUUID) const | BIAS::UUID |
GetString() const | BIAS::UUID |
GetUUIDCreationTime() const | BIAS::UUID |
GetUUIDRaw() const | BIAS::UUID | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Invalidate() | BIAS::UUID | [inline]
IsNil() const | BIAS::UUID |
IsValid() const | BIAS::UUID | [inline]
IsValid_ | BIAS::UUID | [protected]
LastGenerationTime_ | BIAS::UUID | [protected, static]
operator!=(const UUID &id) const | BIAS::UUID | [inline]
operator<(const UUID &id) const | BIAS::UUID | [inline]
operator<<(std::ostream &os, const UUID &id) | BIAS::UUID | [friend]
operator<=(const UUID &id) const | BIAS::UUID | [inline]
operator=(const UUID &id) | BIAS::UUID | [inline]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
operator==(const UUID &id) const | BIAS::UUID | [inline]
operator>>(std::istream &is, UUID &id) | BIAS::UUID | [friend]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetFromLong(const unsigned long &n) | BIAS::UUID |
SetFromString(const std::string &sID) | BIAS::UUID |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetUUIDRaw(const unsigned char *rawid) | BIAS::UUID | [inline]
theID_ | BIAS::UUID | [protected]
UUID() | BIAS::UUID |
UUID(const uuid_t &id) | BIAS::UUID | [explicit]
UUID(const BIAS::UUID &id) | BIAS::UUID |
UUID(const std::string &sID) | BIAS::UUID | [explicit]
UUID(const unsigned long &n) | BIAS::UUID | [explicit]
~Debug() | BIAS::Debug | [inline]
~UUID() | BIAS::UUID | [virtual]

Generated on Wed Jun 21 19:12:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::UUIDsortAscending Member List

This is the complete list of members for BIAS::UUIDsortAscending, including all inherited members.

operator()(BIAS::UUID &a, BIAS::UUID &b) BIAS::UUIDsortAscending [inline]

Generated on Wed Jun 21 19:12:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Vector2< T > Member List

This is the complete list of members for BIAS::Vector2< T >, including all inherited members.

Add(const T &scalar, Vector2< T > &dest) const | BIAS::Vector2< T > | [inline]
Add(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Vector2< T > | [inline]
AddIP(const T &scalar) | BIAS::Vector2< T > | [inline]
AddIP(const Vector2< T > &argvec) | BIAS::Vector2< T > | [inline]
CoordEuclidianToPolar() const | BIAS::Vector2< T > |
CoordPolarToEuclidian() const | BIAS::Vector2< T > |
Copy(const T *pv) | BIAS::Vector2< T > | [inline]
data_ | BIAS::Vector2< T > | [protected]
Dist(const Vector2< T > &vec) const | BIAS::Vector2< T > | [inline]
Divide(const T &scalar, Vector2< T > &dest) const | BIAS::Vector2< T > | [inline]
Divide(const Vector2< T > &vec, Vector2< T > &dest) const | BIAS::Vector2< T > | [inline]
DivideIP(const T &scalar) | BIAS::Vector2< T > | [inline]
DivideIP(const Vector2< T > &vec) | BIAS::Vector2< T > | [inline]
ElementwiseDivision(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Vector2< T > | [inline]
ElementwiseDivision(const Vector2< T > &argvec) const | BIAS::Vector2< T > | [inline]
ElementwiseProduct(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Vector2< T > | [inline]
ElementwiseProduct(const Vector2< T > &argvec) const | BIAS::Vector2< T > | [inline]
Fill(T value) | BIAS::Vector2< T > | [inline]
GetData() const | BIAS::Vector2< T > | [inline]
GetData() | BIAS::Vector2< T > | [inline]
GetW() | BIAS::Vector2< T > | [inline]
GetW() const | BIAS::Vector2< T > | [inline]
GetX() | BIAS::Vector2< T > | [inline]
GetX() const | BIAS::Vector2< T > | [inline]
GetY() | BIAS::Vector2< T > | [inline]
GetY() const | BIAS::Vector2< T > | [inline]
IsZero() const | BIAS::Vector2< T > | [inline]
Length() const | BIAS::Vector2< T > | [inline]
Load(const std::string &filename) | BIAS::Vector2< T > |
Multiply(const T &scalar, Vector2< T > &dest) const | BIAS::Vector2< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Vector2< T > | [inline]
NormL1() const | BIAS::Vector2< T > | [inline]
NormL2() const | BIAS::Vector2< T > | [inline]
operator *(const Vector2< T > &vec, const T &scalar) | BIAS::Vector2< T > | [related]
operator *(const Vector2< T > &vec, const Vector2< T > &argvec) | BIAS::Vector2< T > | [related]
operator *(const Matrix2x2< T > &mat, const Vector2< T > &vec) | BIAS::Vector2< T > | [related]
operator!=(const Vector2< T > &arg) const | BIAS::Vector2< T > | [inline]
operator+(const Vector2< T > &vec, const Vector2< T > &argvec) | BIAS::Vector2< T > | [related]
operator-(const Vector2< T > &v) | BIAS::Vector2< T > | [related]
operator-(const Vector2< T > &vec, const T &scalar) | BIAS::Vector2< T > | [related]
operator-(const Vector2< T > &vec, const Vector2< T > &argvec) | BIAS::Vector2< T > | [related]
operator/(const Vector2< T > &vec, const T &scalar) | BIAS::Vector2< T > | [related]
operator<(const Vector2< T > &a, const Vector2< T > &b) | BIAS::Vector2< T > | [related]
operator<=(const Vector2< T > &a, const Vector2< T > &b) | BIAS::Vector2< T > | [related]
operator=(const T &scalar) | BIAS::Vector2< T > | [inline]
operator=(const Vector2< T > &vec) | BIAS::Vector2< T > | [inline]
operator==(const Vector2< T > &arg) const | BIAS::Vector2< T > | [inline]
operator>(const Vector2< T > &a, const Vector2< T > &b) | BIAS::Vector2< T > | [related]
operator>=(const Vector2< T > &a, const Vector2< T > &b) | BIAS::Vector2< T > | [related]
operator[](const int i) const | BIAS::Vector2< T > | [inline]
operator[](const int i) | BIAS::Vector2< T > | [inline]
OuterProduct(const BIAS::Vector2< T > &v, BIAS::Matrix2x2< T > &mat) const | BIAS::Vector2< T > | [inline]
OuterProduct(const BIAS::Vector2< T > &v) const | BIAS::Vector2< T > | [inline]
Phi() | BIAS::Vector2< T > | [inline]
Phi() const | BIAS::Vector2< T > | [inline]
Radius() | BIAS::Vector2< T > | [inline]
Radius() const | BIAS::Vector2< T > | [inline]
Save(const std::string &filename) const | BIAS::Vector2< T > |
ScalarProduct(const Vector2< T > &argvec, T &result) const | BIAS::Vector2< T > | [inline]
ScalarProduct(const Vector2< T > &argvec) const | BIAS::Vector2< T > | [inline]
Set(const T &scalar) | BIAS::Vector2< T > | [inline]
Set(const T &x, const T &y) | BIAS::Vector2< T > | [inline]
SetW(const T w) | BIAS::Vector2< T > | [inline]
SetX(const T x) | BIAS::Vector2< T > | [inline]
SetY(const T y) | BIAS::Vector2< T > | [inline]
SetZero() | BIAS::Vector2< T > | [inline]
Size() const | BIAS::Vector2< T > | [inline]
Sub(const T &scalar, Vector2< T > &dest) const | BIAS::Vector2< T > | [inline]
Sub(const Vector2< T > &argvec, Vector2< T > &destvec) const | BIAS::Vector2< T > | [inline]
SubIP(const T &scalar) | BIAS::Vector2< T > | [inline]
SubIP(const Vector2< T > &argvec) | BIAS::Vector2< T > | [inline]
Vector2() | BIAS::Vector2< T > | [inline]
Vector2(const Vector2< T > &vec) | BIAS::Vector2< T > | [inline]
Vector2(const T &scalar) | BIAS::Vector2< T > | [inline, explicit]
Vector2(const T v0, const T v1) | BIAS::Vector2< T > | [inline]
Vector2(const T *pv) | BIAS::Vector2< T > | [inline, explicit]
Vector2(char *s) | BIAS::Vector2< T > | [inline, explicit]
Vector2(const Vector< T > &v) | BIAS::Vector2< T > |
~Vector2() | BIAS::Vector2< T > | [inline]

Generated on Wed Jun 21 19:12:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Vector3< T > Member List

This is the complete list of members for BIAS::Vector3< T >, including all inherited members.

Add(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
Add(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Vector3< T > | [inline]
AddIP(const T &scalar) | BIAS::Vector3< T > | [inline]
AddIP(const Vector3< T > &argvec) | BIAS::Vector3< T > | [inline]
CartesianToPolar() const | BIAS::Vector3< T > | [inline]
CoordEuclidianToSphere() const | BIAS::Vector3< T > |
CoordSphereToEuclidian() const | BIAS::Vector3< T > |
CrossProduct(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Vector3< T > | [inline]
CrossProduct(const Vector3< T > &argvec) const | BIAS::Vector3< T > | [inline]
data_ | BIAS::Vector3< T > | [protected]
Dist(const Vector3< T > &vec) const | BIAS::Vector3< T > | [inline]
Div(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
Divide(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
DivideIP(const T &scalar) | BIAS::Vector3< T > | [inline]
DivIP(const T &scalar) | BIAS::Vector3< T > | [inline]
ElementwiseDivision(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Vector3< T > | [inline]
ElementwiseDivision(const Vector3< T > &argvec) const | BIAS::Vector3< T > | [inline]
ElementwiseProduct(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Vector3< T > | [inline]
ElementwiseProduct(const Vector3< T > &argvec) const | BIAS::Vector3< T > | [inline]
GetData() const | BIAS::Vector3< T > | [inline]
GetData() | BIAS::Vector3< T > | [inline]
GetNormalized() const | BIAS::Vector3< T > |
GetSkewSymmetricMatrix() const | BIAS::Vector3< T > |
GetSkewSymmetricMatrix() const | BIAS::Vector3< T > |
IsZero() const | BIAS::Vector3< T > | [inline]
Length() const | BIAS::Vector3< T > | [inline]
Load(const std::string &filename) | BIAS::Vector3< T > |
LoadBogTC(const std::string &filename) | BIAS::Vector3< T > |
Mult(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
MultIP(const T &scalar) | BIAS::Vector3< T > | [inline]
Multiply(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Vector3< T > | [inline]
Normalize() | BIAS::Vector3< T > | [inline]
Normalize(Matrix3x3< T > &cov) | BIAS::Vector3< T > |
NormL1() const | BIAS::Vector3< T > | [inline]
NormL2() const | BIAS::Vector3< T > | [inline]
operator *(const Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator *(const T &scalar, const Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator *(const Vector3< T > &vec, const Vector3< T > &arg) | BIAS::Vector3< T > | [related]
operator *(const Matrix3x3< T > &mat, const Vector3< T > &argvec) | BIAS::Vector3< T > | [related]
operator *(const BIAS::Matrix< T > &mat, const Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator *=(Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator!=(const Vector3< T > &arg) const | BIAS::Vector3< T > | [inline]
operator+(const Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator+(const T &scalar, const Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator+(const Vector3< T > &vec, const Vector3< T > &argvec) | BIAS::Vector3< T > | [related]
operator+(const Vector3< T > &vec, const Vector< T > &argvec) | BIAS::Vector3< T > | [related]
operator+=(Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator+=(Vector3< T > &vec, const Vector3< T > &argvec) | BIAS::Vector3< T > | [related]
operator-(const Vector3< T > &v) | BIAS::Vector3< T > | [related]
operator-(const Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator-(const T &scalar, const Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator-(const Vector3< T > &vec, const Vector3< T > &argvec) | BIAS::Vector3< T > | [related]
operator-=(Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator-=(Vector3< T > &vec, const Vector3< T > &argvec) | BIAS::Vector3< T > | [related]
operator/(const Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator/=(Vector3< T > &vec, const T &scalar) | BIAS::Vector3< T > | [related]
operator<(const Vector3< T > &a, const Vector3< T > &b) | BIAS::Vector3< T > | [related]
operator<<(std::ostream &os, const Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator<=(const Vector3< T > &a, const Vector3< T > &b) | BIAS::Vector3< T > | [related]
operator=(const Vector3< T > &vec) | BIAS::Vector3< T > | [inline]
operator=(const Vector< T > &vec) | BIAS::Vector3< T > | [inline]
operator==(const Vector3< T > &arg) const | BIAS::Vector3< T > | [inline]
operator>(const Vector3< T > &a, const Vector3< T > &b) | BIAS::Vector3< T > | [related]
operator>=(const Vector3< T > &a, const Vector3< T > &b) | BIAS::Vector3< T > | [related]
operator>>(std::istream &is, Vector3< T > &vec) | BIAS::Vector3< T > | [related]
operator[](const int i) const | BIAS::Vector3< T > | [inline]
operator[](const int i) | BIAS::Vector3< T > | [inline]
OuterProduct(const Vector3< T > &v, Matrix3x3< T > &res) const | BIAS::Vector3< T > |
OuterProduct(const Vector3< T > &v) const | BIAS::Vector3< T > | [inline]
Phi() | BIAS::Vector3< T > | [inline]
Phi() const | BIAS::Vector3< T > | [inline]
PolarToCartesian() const | BIAS::Vector3< T > | [inline]
Radius() | BIAS::Vector3< T > | [inline]
Radius() const | BIAS::Vector3< T > | [inline]
Save(const std::string &filename) const | BIAS::Vector3< T > |
ScalarProduct(const Vector3< T > &argvec, T &result) const | BIAS::Vector3< T > | [inline]
ScalarProduct(const Vector3< T > &argvec) const | BIAS::Vector3< T > | [inline]
Set(const T *pv) | BIAS::Vector3< T > | [inline]
Set(const T &scalar) | BIAS::Vector3< T > | [inline]
Set(const T &x, const T &y, const T &z) | BIAS::Vector3< T > | [inline]
Set(const Vector< T > &vec) | BIAS::Vector3< T > | [inline]
SetZero() | BIAS::Vector3< T > | [inline]
Size() const | BIAS::Vector3< T > | [inline]
Sub(const T &scalar, Vector3< T > &dest) const | BIAS::Vector3< T > | [inline]
Sub(const Vector3< T > &argvec, Vector3< T > &destvec) const | BIAS::Vector3< T > | [inline]
SubIP(const T &scalar) | BIAS::Vector3< T > | [inline]
SubIP(const Vector3< T > &argvec) | BIAS::Vector3< T > | [inline]
Theta() | BIAS::Vector3< T > | [inline]
Theta() const | BIAS::Vector3< T > | [inline]
Vector3() | BIAS::Vector3< T > | [inline]
Vector3(const Vector3< T > &vec) | BIAS::Vector3< T > | [inline]
Vector3(const T &scalar) | BIAS::Vector3< T > | [inline, explicit]
Vector3(const T *pv) | BIAS::Vector3< T > | [inline, explicit]
Vector3(char *s) | BIAS::Vector3< T > | [inline, explicit]
Vector3(const T &x, const T &y, const T &z) | BIAS::Vector3< T > | [inline]
Vector3(const Vector< T > &v) | BIAS::Vector3< T > |
~Vector3() | BIAS::Vector3< T > | [inline]

Generated on Wed Jun 21 19:12:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Vector4< T > Member List

This is the complete list of members for BIAS::Vector4< T >, including all inherited members.

Add(const T &scalar, Vector4< T > &dest) const | BIAS::Vector4< T > | [inline]
Add(const Vector4< T > &argvec, Vector4< T > &destvec) const | BIAS::Vector4< T > | [inline]
AddIP(const T &scalar) | BIAS::Vector4< T > | [inline]
AddIP(const Vector4< T > &argvec) | BIAS::Vector4< T > | [inline]
Copy(const T *pv) | BIAS::Vector4< T > | [inline]
data_ | BIAS::Vector4< T > | [protected]
Dist(const Vector4< T > &vec) const | BIAS::Vector4< T > | [inline]
Divide(const T &scalar, Vector4< T > &dest) const | BIAS::Vector4< T > | [inline]
DivideIP(const T &scalar) | BIAS::Vector4< T > | [inline]
ElementwiseProduct(const Vector4< T > &argvec, Vector4< T > &destvec) const | BIAS::Vector4< T > | [inline]
GetData() const | BIAS::Vector4< T > | [inline]
GetData() | BIAS::Vector4< T > | [inline]
Load(const std::string &filename) | BIAS::Vector4< T > |
Multiply(const T &scalar, Vector4< T > &dest) const | BIAS::Vector4< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Vector4< T > | [inline]
NormL1() const | BIAS::Vector4< T > | [inline]
NormL2() const | BIAS::Vector4< T > | [inline]
operator *(const Vector4< T > &v, const T &scalar) | BIAS::Vector4< T > | [related]
operator *(const Vector4< T > &v, const Vector4< T > &argvec) | BIAS::Vector4< T > | [related]
operator *(const Matrix4x4< T > &mat, const Vector4< T > &argvec) | BIAS::Vector4< T > | [related]
operator *(const Matrix3x4< T > &mat, const Vector4< T > &argvec) | BIAS::Vector4< T > | [related]
operator *(const BIAS::Matrix< T > &mat, const Vector4< T > &vec) | BIAS::Vector4< T > | [related]
operator *=(const T &scalar) | BIAS::Vector4< T > | [inline]
operator!=(const Vector4< T > &arg) const | BIAS::Vector4< T > | [inline]
operator+(const Vector4< T > &v, const T &scalar) | BIAS::Vector4< T > | [related]
operator+(const Vector4< T > &v, const Vector4< T > &argvec) | BIAS::Vector4< T > | [related]
operator+=(const T &scalar) | BIAS::Vector4< T > | [inline]
operator+=(const Vector4< T > &argvec) | BIAS::Vector4< T > | [inline]
operator-(const Vector4< T > &v) | BIAS::Vector4< T > | [related]
operator-(const Vector4< T > &v, const T &scalar) | BIAS::Vector4< T > | [related]
operator-(const Vector4< T > &v, const Vector4< T > &argvec) | BIAS::Vector4< T > | [related]
operator-=(const T &scalar) | BIAS::Vector4< T > | [inline]
operator-=(const Vector4< T > &argvec) | BIAS::Vector4< T > | [inline]
operator/(const Vector4< T > &v, const T &scalar) | BIAS::Vector4< T > | [related]
operator/=(const T &scalar) | BIAS::Vector4< T > | [inline]
operator<(const Vector4< T > &a, const Vector4< T > &b) | BIAS::Vector4< T > | [related]
operator<=(const Vector4< T > &a, const Vector4< T > &b) | BIAS::Vector4< T > | [related]
operator=(const T &scalar) | BIAS::Vector4< T > | [inline]
operator=(const Vector4< T > &vec) | BIAS::Vector4< T > | [inline]
operator==(const Vector4< T > &arg) const | BIAS::Vector4< T > | [inline]
operator>(const Vector4< T > &a, const Vector4< T > &b) | BIAS::Vector4< T > | [related]
operator>=(const Vector4< T > &a, const Vector4< T > &b) | BIAS::Vector4< T > | [related]
operator[](const int i) const | BIAS::Vector4< T > | [inline]
operator[](const int i) | BIAS::Vector4< T > | [inline]
OuterProduct(const Vector4< T > &v) const | BIAS::Vector4< T > |
Save(const std::string &filename) const | BIAS::Vector4< T > |
ScalarProduct(const Vector4< T > &argvec, T &result) const | BIAS::Vector4< T > | [inline]
Set(const T &scalar) | BIAS::Vector4< T > | [inline]
Set(const T &x, const T &y, const T &z, const T &w) | BIAS::Vector4< T > | [inline]
SetZero() | BIAS::Vector4< T > | [inline]
Size() const | BIAS::Vector4< T > | [inline]
Sub(const T &scalar, Vector4< T > &dest) const | BIAS::Vector4< T > | [inline]
Sub(const Vector4< T > &argvec, Vector4< T > &destvec) const | BIAS::Vector4< T > | [inline]
SubIP(const T &scalar) | BIAS::Vector4< T > | [inline]
SubIP(const Vector4< T > &argvec) | BIAS::Vector4< T > | [inline]
transposed() const | BIAS::Vector4< T > | [inline]
Vector4() | BIAS::Vector4< T > | [inline]
Vector4(const Vector4< T > &vec) | BIAS::Vector4< T > | [inline]
Vector4(const T &scalar) | BIAS::Vector4< T > | [inline, explicit]
Vector4(const T *pv) | BIAS::Vector4< T > | [inline, explicit]
Vector4(char *s) | BIAS::Vector4< T > | [inline, explicit]
Vector4(const T v0, const T v1, const T v2, const T v3) | BIAS::Vector4< T > | [inline]
Vector4(const Vector< T > &v) | BIAS::Vector4< T > |
~Vector4() | BIAS::Vector4< T > | [inline]

Generated on Wed Jun 21 19:12:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::Vector< T > Member List

This is the complete list of members for BIAS::Vector< T >, including all inherited members.

begin() | TNT::Vector< T > | [inline]
begin() const | TNT::Vector< T > | [inline]
const_iterator typedef | TNT::Vector< T > |
const_reference typedef | TNT::Vector< T > |
copy(const T *v) | TNT::Vector< T > | [inline, protected]
destroy() | TNT::Vector< T > | [inline, protected]
dim() const | TNT::Vector< T > | [inline]
Dist(const Vector< T > &vec) const | BIAS::Vector< T > | [inline]
element_type typedef | TNT::Vector< T > |
ElementwiseProduct(const Vector< T > &arg, Vector< T > &dest) const | BIAS::Vector< T > | [inline]
ElementwiseProduct(const Vector< T > &arg) const | BIAS::Vector< T > | [inline]
end() | TNT::Vector< T > | [inline]
end() const | TNT::Vector< T > | [inline]
Fill(const T &scalar) | BIAS::Vector< T > |
GetData() const | BIAS::Vector< T > | [inline]
GetDataLast() const | BIAS::Vector< T > | [inline]
initialize(Subscript N) | TNT::Vector< T > | [inline, protected]
IsZero() const | BIAS::Vector< T > |
iterator typedef | TNT::Vector< T > |
KroneckerProduct(const Vector< T > &arg, Vector< T > &dst) const | BIAS::Vector< T > |
lbound() const | TNT::Vector< T > | [inline]
Length() const | BIAS::Vector< T > | [inline]
Load(const std::string &filename) | BIAS::Vector< T > |
Multiply(const T &scalar, Vector< T > &res) const | BIAS::Vector< T > | [inline]
MultiplyIP(const T &scalar) | BIAS::Vector< T > | [inline]
n_ | TNT::Vector< T > | [protected]
newsize(Subscript N) | TNT::Vector< T > | [inline]
NormL1() const | BIAS::Vector< T > | [inline]
NormL2() const | BIAS::Vector< T > | [inline]
operator *(const Vector< T > &v, const T &scalar) | BIAS::Vector< T > | [related]
operator *(const T &scalar, const Vector< T > &v) | BIAS::Vector< T > | [related]
operator *(const Vector< T > &v, const Vector< T > &argvec) | BIAS::Vector< T > | [related]
operator *(const Matrix< T > &mat, const Vector2< T > &vec) | BIAS::Vector< T > | [related]
operator *=(T scalar) | BIAS::Vector< T > | [inline]
operator!=(const Vector< T > &vec) const | BIAS::Vector< T > | [inline]
operator()(Subscript i) | TNT::Vector< T > | [inline]
operator()(Subscript i) const | TNT::Vector< T > | [inline]
operator+=(const Vector< T > &vec) | BIAS::Vector< T > | [inline]
operator-=(const Vector< T > &vec) | BIAS::Vector< T > | [inline]
operator/=(T scalar) | BIAS::Vector< T > | [inline]
operator<<(std::ostream &os, const BIAS::Vector< T > &vec) | BIAS::Vector< T > | [related]
operator=(const TNT::Vector< T > &vec) | BIAS::Vector< T > |
operator=(const Vector< T > &vec) | BIAS::Vector< T > | [inline]
TNT::Vector::operator=(const T &scalar) | TNT::Vector< T > | [inline]
operator==(const Vector< T > &vec) const | BIAS::Vector< T > | [inline]
operator[](Subscript i) | TNT::Vector< T > | [inline]
operator[](Subscript i) const | TNT::Vector< T > | [inline]
OuterProduct(const Vector< T > &v) const | BIAS::Vector< T > |
pointer typedef | TNT::Vector< T > |
reference typedef | TNT::Vector< T > |
Save(const std::string &filename) const | BIAS::Vector< T > |
ScalarProduct(const Vector< T > &argvec) const | BIAS::Vector< T > | [inline]
ScalarProduct(const Vector< T > &argvec, T &result) const | BIAS::Vector< T > | [inline]
Set(const T &scalar) | BIAS::Vector< T > | [inline]
set(const T &val) | TNT::Vector< T > | [inline, protected]
SetZero() | BIAS::Vector< T > | [inline]
size() const | TNT::Vector< T > | [inline]
Size() const | BIAS::Vector< T > | [inline]
size_type typedef | TNT::Vector< T > |
SubIP(const Vector< T > &argmat) | BIAS::Vector< T > | [inline]
SubVec(int length, int offset=0) const | BIAS::Vector< T > |
v_ | TNT::Vector< T > | [protected]
value_type typedef | TNT::Vector< T > |
Vector() | BIAS::Vector< T > | [inline]
Vector(const int rows) | BIAS::Vector< T > | [inline, explicit]
Vector(const int rows, const std::string &s) | BIAS::Vector< T > | [explicit]
Vector(int rows, const T &value) | BIAS::Vector< T > | [inline]
Vector(int rows, const T *v) | BIAS::Vector< T > | [inline]
Vector(const Vector< T > &v) | BIAS::Vector< T > | [inline]
Vector(const TNT::Vector< T > &v) | BIAS::Vector< T > | [inline]
Vector(const Vector2< T > &v) | BIAS::Vector< T > |
Vector(const Vector3< T > &v) | BIAS::Vector< T > |
Vector(const Vector4< T > &v) | BIAS::Vector< T > |
TNT::Vector::Vector(Subscript N, const T &value=T()) | TNT::Vector< T > | [inline]
TNT::Vector::Vector(Subscript N, const T *v) | TNT::Vector< T > | [inline]
TNT::Vector::Vector(const Subscript N, const std::string &s) | TNT::Vector< T > | [inline]
vm1_ | TNT::Vector< T > | [protected]
~Vector() | BIAS::Vector< T > | [virtual]

Generated on Wed Jun 21 19:12:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VectorPanel Member List

This is the complete list of members for BIAS::VectorPanel, including all inherited members.

controls_ | BIAS::VectorPanel | [private]
editable_ | BIAS::VectorPanel | [private]
GetVector() const | BIAS::VectorPanel |
SetVector(const BIAS::Vector< double > &vector) | BIAS::VectorPanel |
VectorPanel(wxWindow *parent, wxWindowID id, bool editable) | BIAS::VectorPanel |

Generated on Wed Jun 21 19:12:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoServer Member List

This is the complete list of members for BIAS::VideoServer, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddParams_(BIAS::Param &p) | BIAS::VideoServer | [protected]
camera_ | BIAS::VideoServer | [protected]
CamImage_ | BIAS::VideoServer | [protected]
camParam_ | BIAS::VideoServer | [protected]
camType_ | BIAS::VideoServer | [protected]
compressionColor_ | BIAS::VideoServer | [protected]
Compressor_ | BIAS::VideoServer | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetCamera() | BIAS::VideoServer | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFPS() | BIAS::VideoServer | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMessageSize() | BIAS::VideoServer | [inline]
GetSendImage() | BIAS::VideoServer | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
imgHeight_ | BIAS::VideoServer | [protected]
imgWidth_ | BIAS::VideoServer | [protected]
Init(int port=D_CS_DEFAULT_PORT) | BIAS::VideoServer |
Initialized_ | BIAS::VideoServer | [protected]
jpeg_ | BIAS::VideoServer | [protected]
msgSize_ | BIAS::VideoServer | [protected]
operator=(const VideoServer &) | BIAS::VideoServer | [inline, private]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
ParamsAllocated_ | BIAS::VideoServer | [protected]
port_ | BIAS::VideoServer | [protected]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ProcessOneImage() | BIAS::VideoServer |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
RescaleFilter_ | BIAS::VideoServer | [protected]
resizeFactor_ | BIAS::VideoServer | [protected]
SendBuffer_ | BIAS::VideoServer | [protected]
SendImage_ | BIAS::VideoServer | [protected]
server_ | BIAS::VideoServer | [protected]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
targetAddress_ | BIAS::VideoServer | [protected]
UDPServerThrottle_ | BIAS::VideoServer | [protected]
useUDP_ | BIAS::VideoServer | [protected]
VideoServer(BIAS::Param &p) | BIAS::VideoServer |
VideoServer() | BIAS::VideoServer |
VideoServer(const VideoServer &) | BIAS::VideoServer | [inline, private]
~Debug() | BIAS::Debug | [inline]
~VideoServer() | BIAS::VideoServer |

Generated on Wed Jun 21 19:12:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoShMFeeder Member List

This is the complete list of members for BIAS::VideoShMFeeder, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
bIsInitialized_ | BIAS::VideoShMFeeder | [protected]
Data_ | BIAS::VideoShMFeeder | [protected]
DataLength_ | BIAS::VideoShMFeeder | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
FileName_ | BIAS::VideoShMFeeder | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Header_ | BIAS::VideoShMFeeder | [protected]
ImgBuffer_ | BIAS::VideoShMFeeder | [protected]
Init_() | BIAS::VideoShMFeeder | [protected]
MemoryLengthTotal_ | BIAS::VideoShMFeeder | [protected]
operator=(const VideoShMFeeder &source) | BIAS::VideoShMFeeder | [protected]
BIAS::Debug::operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
ProcessImage(BIAS::Camera< unsigned char > *Image) | BIAS::VideoShMFeeder |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Shm_ | BIAS::VideoShMFeeder | [protected]
ShmContext_ | BIAS::VideoShMFeeder | [protected]
VideoShMFeeder() | BIAS::VideoShMFeeder |
VideoShMFeeder(const std::string &filename) | BIAS::VideoShMFeeder |
VideoShMFeeder(const VideoShMFeeder &source) | BIAS::VideoShMFeeder | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoShMFeeder() | BIAS::VideoShMFeeder |

Generated on Wed Jun 21 19:12:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource Member List

This is the complete list of members for BIAS::VideoSource, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource | [virtual]
GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice() | BIAS::VideoSource | [virtual]
OpenDevice(const char *device) | BIAS::VideoSource | [virtual]
OpenDevice(int device) | BIAS::VideoSource | [virtual]
OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource | [virtual]
PreGrab() | BIAS::VideoSource | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]

Generated on Wed Jun 21 19:12:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_DCAM Member List

This is the complete list of members for BIAS::VideoSource_DCAM, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
ActivateScorpionTimestamp() | BIAS::VideoSource_DCAM |
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
ApplyBytesPerPacket() | BIAS::VideoSource_DCAM | [protected]
AutoMode(int feature, bool on) | BIAS::VideoSource_DCAM | [virtual]
BytesPerCyle_ | BIAS::VideoSource_DCAM | [protected, static]
BytesPerPacket_ | BIAS::VideoSource_DCAM | [protected]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CalcBytesPerPacket() | BIAS::VideoSource_DCAM | [protected]
CamModel_ | BIAS::VideoSource_DCAM | [protected]
CloseDevice() | BIAS::VideoSource_DCAM | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
DcamCapture_ | BIAS::VideoSource_DCAM | [protected]
DcamDMABuffers_ | BIAS::VideoSource_DCAM | [protected]
DcamFeatures_ | BIAS::VideoSource_DCAM | [protected]
DcamFormat_ | BIAS::VideoSource_DCAM | [protected]
DcamFps_ | BIAS::VideoSource_DCAM | [protected]
DcamInfo_ | BIAS::VideoSource_DCAM | [protected]
DcamIsoChannel_ | BIAS::VideoSource_DCAM | [protected]
DcamMode_ | BIAS::VideoSource_DCAM | [protected]
DcamNodes_ | BIAS::VideoSource_DCAM | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectF7_ | BIAS::VideoSource_DCAM | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
ExternalTrigger(bool on) | BIAS::VideoSource_DCAM |
ForceF7_ | BIAS::VideoSource_DCAM | [protected]
ForceFormat7(bool forcef7) | BIAS::VideoSource_DCAM | [inline]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource_DCAM | [virtual]
GetGain() | BIAS::VideoSource_DCAM | [virtual]
GetGammaMode() | BIAS::VideoSource_DCAM |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetLeft() | BIAS::VideoSource_DCAM | [inline]
GetModelForEuid(const u_int64_t euid) | BIAS::VideoSource_DCAM | [protected]
GetShutter() | BIAS::VideoSource_DCAM | [virtual]
GetTop() | BIAS::VideoSource_DCAM | [inline]
GetTransmissionTime() | BIAS::VideoSource_DCAM | [inline]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_DCAM | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
IEEE1394Card_ | BIAS::VideoSource_DCAM | [protected]
IEEE1394Handle_ | BIAS::VideoSource_DCAM | [protected, static]
ImageSize_ | BIAS::VideoSource | [protected]
InitCam() | BIAS::VideoSource_DCAM | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
Instances_ | BIAS::VideoSource_DCAM | [protected, static]
InstancesTotal_ | BIAS::VideoSource_DCAM | [protected, static]
IsGrabbingContinous() | BIAS::VideoSource | [inline]
Left_ | BIAS::VideoSource_DCAM | [protected]
Lens_ | BIAS::VideoSource_DCAM | [protected]
MaxBpP_ | BIAS::VideoSource_DCAM | [protected]
MaxHeight_ | BIAS::VideoSource_DCAM | [protected]
MaxWidth_ | BIAS::VideoSource_DCAM | [protected]
MinBpP_ | BIAS::VideoSource_DCAM | [protected]
NumCams_ | BIAS::VideoSource_DCAM | [protected]
OnePushAuto(int feature) | BIAS::VideoSource_DCAM | [virtual]
OnePushRunning(int feature) | BIAS::VideoSource_DCAM |
OpenDevice() | BIAS::VideoSource_DCAM | [virtual]
OpenDevice(int camid) | BIAS::VideoSource_DCAM | [virtual]
BIAS::VideoSource::OpenDevice(const char *device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource_DCAM | [virtual]
PreGrab() | BIAS::VideoSource_DCAM | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
PrintFormatAndMode_() | BIAS::VideoSource_DCAM | [protected]
QueryCam() | BIAS::VideoSource_DCAM | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
ScorpionTimestampActive_ | BIAS::VideoSource_DCAM |
SelectDefault() | BIAS::VideoSource_DCAM | [protected]
SelectedCam_ | BIAS::VideoSource_DCAM | [protected]
SetBinning(bool b) | BIAS::VideoSource_DCAM | [inline]
SetBytesPerPacket(const int b) | BIAS::VideoSource_DCAM | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetCamera(CameraParameterSet camparam) | BIAS::VideoSource_DCAM |
SetCameraID(int) | BIAS::VideoSource_DCAM | [inline, virtual]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource_DCAM | [virtual]
SetFormat7(int mode, int bpp, int colorchannels) | BIAS::VideoSource_DCAM |
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource_DCAM | [virtual]
SetGammaMode(unsigned char g) | BIAS::VideoSource_DCAM |
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetLeftTop(unsigned int left, unsigned int top) | BIAS::VideoSource_DCAM |
SetShutter(float exptime) | BIAS::VideoSource_DCAM | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource_DCAM | [virtual]
Shift16_ | BIAS::VideoSource_DCAM | [protected]
ShowCapabilities() | BIAS::VideoSource_DCAM | [virtual]
BIAS::VideoSource::ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StartIso() | BIAS::VideoSource_DCAM | [protected]
StopGrabContinous() | BIAS::VideoSource | [virtual]
StopIso() | BIAS::VideoSource_DCAM | [protected]
SupportedFeature_ | BIAS::VideoSource_DCAM | [protected]
SupportedFormats_ | BIAS::VideoSource_DCAM | [protected]
SupportedFramerates_ | BIAS::VideoSource_DCAM | [protected]
SupportedModes_ | BIAS::VideoSource_DCAM | [protected]
Top_ | BIAS::VideoSource_DCAM | [protected]
TransmissionTime_ | BIAS::VideoSource_DCAM | [protected]
Trigger_ | BIAS::VideoSource_DCAM | [protected]
UnitHeight_ | BIAS::VideoSource_DCAM | [protected]
UnitWidth_ | BIAS::VideoSource_DCAM | [protected]
UseBinning_ | BIAS::VideoSource_DCAM | [protected]
UseChannel(int channel) | BIAS::VideoSource_DCAM |
UseDMA_ | BIAS::VideoSource_DCAM | [protected]
UserSizeToFormat7_() | BIAS::VideoSource_DCAM | [protected]
UserSizeToMode() | BIAS::VideoSource_DCAM | [protected]
UserTopLeft_ | BIAS::VideoSource_DCAM | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_DCAM(int Card=0) | BIAS::VideoSource_DCAM |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_DCAM() | BIAS::VideoSource_DCAM |

Generated on Wed Jun 21 19:12:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_Disk Member List

This is the complete list of members for BIAS::VideoSource_Disk, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
ActiveFrame_ | BIAS::VideoSource_Disk | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddFilenames(const std::vector< std::string > &FileNames) | BIAS::VideoSource_Disk | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource_Disk | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FileNames_ | BIAS::VideoSource_Disk | [protected]
FrameCounterAsTimeStamp_ | BIAS::VideoSource_Disk | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GenerateNewUIDs_ | BIAS::VideoSource_Disk | [protected]
GetActiveFrameNumber() const | BIAS::VideoSource_Disk | [inline]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetLastFilename() const | BIAS::VideoSource_Disk | [inline]
GetNextFilename() const | BIAS::VideoSource_Disk | [inline]
GetNumFramesRemaining() const | BIAS::VideoSource_Disk | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_Disk | [virtual]
GrabSingle(BIAS::ImageBase &image) | BIAS::VideoSource_Disk | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
KeepFPS_ | BIAS::VideoSource_Disk | [protected]
Loop_ | BIAS::VideoSource_Disk | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice() | BIAS::VideoSource_Disk | [virtual]
OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource_Disk | [virtual]
OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource_Disk | [virtual]
BIAS::VideoSource::OpenDevice(const char *device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource_Disk | [inline, virtual]
PreGrab() | BIAS::VideoSource_Disk | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Rewind() | BIAS::VideoSource_Disk | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorMode(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource_Disk |
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetFrameCounterAsTimeStamp(const bool b) | BIAS::VideoSource_Disk | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGenerateNewUIDs(bool s) | BIAS::VideoSource_Disk | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKeepFPS(bool s) | BIAS::VideoSource_Disk | [inline]
SetLoopMode(bool l) | BIAS::VideoSource_Disk | [inline]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
timer_ | BIAS::VideoSource_Disk | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_Disk() | BIAS::VideoSource_Disk |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_Disk() | BIAS::VideoSource_Disk | [virtual]

Generated on Wed Jun 21 19:12:31 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_DiskPMD Member List

This is the complete list of members for BIAS::VideoSource_DiskPMD, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
ActiveFrame_ | BIAS::VideoSource_Disk | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddFilenames(const std::vector< std::string > &FileNames) | BIAS::VideoSource_Disk | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource_Disk | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DepthImg_ | BIAS::VideoSource_DiskPMD | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FileNames_ | BIAS::VideoSource_Disk | [protected]
FrameCounterAsTimeStamp_ | BIAS::VideoSource_Disk | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GenerateNewUIDs_ | BIAS::VideoSource_Disk | [protected]
GetActiveFrameNumber() const | BIAS::VideoSource_Disk | [inline]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetLastFilename() const | BIAS::VideoSource_Disk | [inline]
GetNextFilename() const | BIAS::VideoSource_Disk | [inline]
GetNumFramesRemaining() const | BIAS::VideoSource_Disk | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(Camera< unsigned char > &image) | BIAS::VideoSource_DiskPMD | [virtual]
BIAS::VideoSource_Disk::GrabSingle(BIAS::ImageBase &image) | BIAS::VideoSource_Disk | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
GrabSingleDepth(Camera< float > &image) | BIAS::VideoSource_DiskPMD | [inline]
GrabSingleModCoeff(Camera< float > &image) | BIAS::VideoSource_DiskPMD | [inline]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
KeepFPS_ | BIAS::VideoSource_Disk | [protected]
Loop_ | BIAS::VideoSource_Disk | [protected]
ModCoeffImg_ | BIAS::VideoSource_DiskPMD | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource_DiskPMD | [virtual]
OpenDevice() | BIAS::VideoSource_DiskPMD | [virtual]
BIAS::VideoSource_Disk::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource_Disk | [virtual]
BIAS::VideoSource::OpenDevice(const char *device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource_Disk | [inline, virtual]
PreGrab() | BIAS::VideoSource_Disk | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Rewind() | BIAS::VideoSource_Disk | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorMode(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource_Disk |
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetFrameCounterAsTimeStamp(const bool b) | BIAS::VideoSource_Disk | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGenerateNewUIDs(bool s) | BIAS::VideoSource_DiskPMD | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetKeepFPS(bool s) | BIAS::VideoSource_Disk | [inline]
SetLoopMode(bool l) | BIAS::VideoSource_Disk | [inline]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
timer_ | BIAS::VideoSource_Disk | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_Disk() | BIAS::VideoSource_Disk |
VideoSource_DiskPMD() | BIAS::VideoSource_DiskPMD |
vsd_ | BIAS::VideoSource_DiskPMD | [protected]
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_Disk() | BIAS::VideoSource_Disk | [virtual]
~VideoSource_DiskPMD() | BIAS::VideoSource_DiskPMD | [virtual]

Generated on Wed Jun 21 19:12:36 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_DSHOW Member List

This is the complete list of members for BIAS::VideoSource_DSHOW, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BIASColorModel_ | BIAS::VideoSource_DSHOW | [protected]
bShowDialogs_ | BIAS::VideoSource_DSHOW | [protected]
BytesPerPixel_ | BIAS::VideoSource | [protected]
camera_ | BIAS::VideoSource_DSHOW | [protected]
CloseDevice() | BIAS::VideoSource_DSHOW | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
dDepth_ | BIAS::VideoSource_DSHOW | [protected]
dDsBufferSize_ | BIAS::VideoSource_DSHOW | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeleteMediaType_(AM_MEDIA_TYPE *pmt) | BIAS::VideoSource_DSHOW | [protected]
DetermineBIASColorModel_() | BIAS::VideoSource_DSHOW | [protected]
DetermineColorModel_() | BIAS::VideoSource_DSHOW | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
dHeight_ | BIAS::VideoSource_DSHOW | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DisplayCameraProperties() | BIAS::VideoSource_DSHOW |
DisplayFilterProperties(CComPtr< IBaseFilter > pFilter) | BIAS::VideoSource_DSHOW |
DisplayPinProperties_(CComPtr< IPin > pSrcPin) | BIAS::VideoSource_DSHOW | [protected]
DisplaySourcePinProperties() | BIAS::VideoSource_DSHOW |
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
dWidth_ | BIAS::VideoSource_DSHOW | [protected]
EnumFilters_(IFilterGraph *pGraph) | BIAS::VideoSource_DSHOW | [protected]
FGCB | BIAS::VideoSource_DSHOW | [protected]
FindCaptureDevice_(IBaseFilter **ppSrcFilter) | BIAS::VideoSource_DSHOW | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetInterfaces_(void) | BIAS::VideoSource_DSHOW | [protected]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_DSHOW | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource_DSHOW |
InitVideoCapture_() | BIAS::VideoSource_DSHOW | [protected]
IsGrabbingContinous() | BIAS::VideoSource | [inline]
MediaSubTypeColorModel_ | BIAS::VideoSource_DSHOW | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice(unsigned int width, unsigned int height, unsigned int channels, const char *device, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_RGB) | BIAS::VideoSource_DSHOW |
OpenDevice(const char *device) | BIAS::VideoSource_DSHOW | [virtual]
BIAS::VideoSource::OpenDevice() | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
pCaptureGraphBuilder2_ | BIAS::VideoSource_DSHOW | [protected]
pDsBuffer_ | BIAS::VideoSource_DSHOW | [protected]
pGrabber_ | BIAS::VideoSource_DSHOW | [protected]
pGraphBuilder_ | BIAS::VideoSource_DSHOW | [protected]
pImageBuffer_ | BIAS::VideoSource_DSHOW | [protected]
pInPin_ | BIAS::VideoSource_DSHOW | [protected]
pMediaControl_ | BIAS::VideoSource_DSHOW | [protected]
pMediaEvent_ | BIAS::VideoSource_DSHOW | [protected]
pNullRenderer_ | BIAS::VideoSource_DSHOW | [protected]
PostGrab() | BIAS::VideoSource_DSHOW | [virtual]
pOutPin_ | BIAS::VideoSource_DSHOW | [protected]
PreGrab() | BIAS::VideoSource_DSHOW | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
pSampleOutPin_ | BIAS::VideoSource_DSHOW | [protected]
pSrcFilter_ | BIAS::VideoSource_DSHOW | [protected]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SaveGraphFile_(IGraphBuilder *pGraph, WCHAR *wszPath) | BIAS::VideoSource_DSHOW | [protected]
sCaptureDeviceName_ | BIAS::VideoSource_DSHOW | [protected]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetCaptureDeviceName(std::string sName) | BIAS::VideoSource_DSHOW | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetSizeAndColorModel(int width, int height, int bytesperpixel=1, BIAS::ImageBase::EColorModel model=BIAS::ImageBase::CM_invalid) | BIAS::VideoSource_DSHOW | [inline]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_DSHOW(bool bShowDialogs=false) | BIAS::VideoSource_DSHOW |
VideoSource_DSHOW(int width, int height, int depth, bool bShowDialogs=false) | BIAS::VideoSource_DSHOW |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_DSHOW() | BIAS::VideoSource_DSHOW |

Generated on Wed Jun 21 19:12:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_Net Member List

This is the complete list of members for BIAS::VideoSource_Net, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
client_ | BIAS::VideoSource_Net | [protected]
CloseDevice() | BIAS::VideoSource_Net | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
count_ | BIAS::VideoSource_Net | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Decompressor_ | BIAS::VideoSource_Net | [protected]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_Net | [virtual]
GrabSingle(BIAS::ImageBase &image) | BIAS::VideoSource_Net | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
jpegImg_ | BIAS::VideoSource_Net | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice(const char *serverName) | BIAS::VideoSource_Net | [virtual]
OpenDevice(const std::string &serverName, int port=D_CS_DEFAULT_PORT) | BIAS::VideoSource_Net | [virtual]
OpenDevice(int port=D_CS_DEFAULT_PORT) | BIAS::VideoSource_Net | [virtual]
BIAS::VideoSource::OpenDevice() | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
pImgBuffer_ | BIAS::VideoSource_Net | [protected]
port_ | BIAS::VideoSource_Net | [protected]
PostGrab() | BIAS::VideoSource_Net | [virtual]
PreGrab() | BIAS::VideoSource_Net | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
UseTCP_ | BIAS::VideoSource_Net | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_Net(bool threaded=true) | BIAS::VideoSource_Net |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_Net() | BIAS::VideoSource_Net | [inline, virtual]

Generated on Wed Jun 21 19:12:45 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_Shm Member List

This is the complete list of members for BIAS::VideoSource_Shm, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource_Shm | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Context_ | BIAS::VideoSource_Shm | [protected]
Data_ | BIAS::VideoSource_Shm | [protected]
DataLength_ | BIAS::VideoSource_Shm | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FileName_ | BIAS::VideoSource_Shm | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_Shm | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Header_ | BIAS::VideoSource_Shm | [protected]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsCreator_ | BIAS::VideoSource_Shm | [protected]
IsGrabbingContinous() | BIAS::VideoSource | [inline]
LastTime_ | BIAS::VideoSource_Shm | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice(const char *name) | BIAS::VideoSource_Shm | [virtual]
OpenDevice() | BIAS::VideoSource_Shm | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const VideoSource_Shm &source) | BIAS::VideoSource_Shm | [protected]
BIAS::VideoSource::operator=(const Debug &d) | BIAS::Debug | [inline]
pImgBuffer_ | BIAS::VideoSource_Shm | [protected]
PostGrab() | BIAS::VideoSource_Shm | [virtual]
PreGrab() | BIAS::VideoSource_Shm | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Resize_(int newsize) | BIAS::VideoSource_Shm | [protected]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel) | BIAS::VideoSource_Shm | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
Shm_ | BIAS::VideoSource_Shm | [protected]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
TotalLength_ | BIAS::VideoSource_Shm | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_Shm() | BIAS::VideoSource_Shm |
VideoSource_Shm(const VideoSource_Shm &source) | BIAS::VideoSource_Shm | [protected]
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_Shm() | BIAS::VideoSource_Shm | [inline]

Generated on Wed Jun 21 19:12:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_Stereo Member List

This is the complete list of members for BIAS::VideoSource_Stereo, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource_Stereo | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(Camera< unsigned char > &image) | BIAS::VideoSource_Stereo | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
GrabSingleRight(Camera< unsigned char > &image) | BIAS::VideoSource_Stereo | [inline]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(ImageBase &img) | BIAS::VideoSource_Stereo | [virtual]
IsGrabbingContinous() | BIAS::VideoSource | [inline]
Left_ | BIAS::VideoSource_Stereo | [protected]
LeftIm_ | BIAS::VideoSource_Stereo | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice(const char *name) | BIAS::VideoSource_Stereo | [virtual]
OpenDevice() | BIAS::VideoSource_Stereo | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const VideoSource_Stereo &source) | BIAS::VideoSource_Stereo | [protected]
BIAS::VideoSource::operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource_Stereo | [virtual]
PreGrab() | BIAS::VideoSource_Stereo | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
Right_ | BIAS::VideoSource_Stereo | [protected]
RightIm_ | BIAS::VideoSource_Stereo | [protected]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel) | BIAS::VideoSource_Stereo | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_Stereo(VideoSource *left, VideoSource *right) | BIAS::VideoSource_Stereo |
VideoSource_Stereo() | BIAS::VideoSource_Stereo | [protected]
VideoSource_Stereo(const VideoSource_Stereo &source) | BIAS::VideoSource_Stereo | [protected]
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_Stereo() | BIAS::VideoSource_Stereo | [virtual]

Generated on Wed Jun 21 19:12:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_uEye Member List

This is the complete list of members for BIAS::VideoSource_uEye, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
BytesPerPixel_ | BIAS::VideoSource | [protected]
CloseDevice() | BIAS::VideoSource_uEye | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource_uEye | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource_uEye | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_uEye | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource_uEye |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
m_bIsInited | BIAS::VideoSource_uEye | [protected]
m_CameraHandle | BIAS::VideoSource_uEye | [protected]
m_dBitsPerPixel | BIAS::VideoSource_uEye | [protected]
m_dColorMode | BIAS::VideoSource_uEye | [protected]
m_dDepth | BIAS::VideoSource_uEye | [protected]
m_dHeight | BIAS::VideoSource_uEye | [protected]
m_dLeftPos | BIAS::VideoSource_uEye | [protected]
m_dMemID | BIAS::VideoSource_uEye | [protected]
m_dPixelClock | BIAS::VideoSource_uEye | [protected]
m_dSrcDepth | BIAS::VideoSource_uEye | [protected]
m_dSrcHeight | BIAS::VideoSource_uEye | [protected]
m_dSrcWidth | BIAS::VideoSource_uEye | [protected]
m_dTopPos | BIAS::VideoSource_uEye | [protected]
m_dWidth | BIAS::VideoSource_uEye | [protected]
m_pImageBuffer | BIAS::VideoSource_uEye | [protected]
m_pSwapBuffer | BIAS::VideoSource_uEye | [protected]
m_ueye | BIAS::VideoSource_uEye | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenCamera_() | BIAS::VideoSource_uEye | [protected]
OpenDevice() | BIAS::VideoSource_uEye | [virtual]
BIAS::VideoSource::OpenDevice(const char *device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource_uEye | [virtual]
PreGrab() | BIAS::VideoSource_uEye | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource_uEye |
SetGain(float g) | BIAS::VideoSource_uEye | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetLeftTop(unsigned int left, unsigned int top) | BIAS::VideoSource_uEye |
SetPixelClock(int dClock) | BIAS::VideoSource_uEye |
SetShutter(float exptime) | BIAS::VideoSource_uEye | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource_uEye | [virtual]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource | [virtual]
StopGrabContinous() | BIAS::VideoSource | [virtual]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_uEye() | BIAS::VideoSource_uEye |
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_uEye() | BIAS::VideoSource_uEye |

Generated on Wed Jun 21 19:13:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_V4L Member List

This is the complete list of members for BIAS::VideoSource_V4L, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
Active_ | BIAS::VideoSource | [protected]
ActiveFrame | BIAS::VideoSource_V4L | [protected]
ActiveFrameMutex_ | BIAS::VideoSource_V4L | [protected]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AutoMode(int, bool) | BIAS::VideoSource | [virtual]
buffer_ | BIAS::VideoSource_V4L | [protected]
bufferLastCaptured_ | BIAS::VideoSource_V4L | [protected]
bufLengths | BIAS::VideoSource_V4L | [protected]
bufStarts | BIAS::VideoSource_V4L | [protected]
BytesPerPixel_ | BIAS::VideoSource | [protected]
capability2 | BIAS::VideoSource_V4L | [protected]
CloseDevice() | BIAS::VideoSource_V4L | [virtual]
ColorChannels_ | BIAS::VideoSource | [protected]
ColorMode_ | BIAS::VideoSource | [protected]
CompleteInitialized_ | BIAS::VideoSource | [protected]
ContinousThread_ | BIAS::VideoSource_V4L | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultDevice_ | BIAS::VideoSource | [protected]
DeviceChannel_ | BIAS::VideoSource | [protected]
DirectToDisk_ | BIAS::VideoSource | [protected]
DtDBuffer_ | BIAS::VideoSource | [protected]
DtDBufferSize_ | BIAS::VideoSource | [protected]
DtDFd_ | BIAS::VideoSource | [protected]
DtDImageHeader_ | BIAS::VideoSource | [protected]
DtDStartOfImage_ | BIAS::VideoSource | [protected]
fd | BIAS::VideoSource_V4L | [protected]
format2_ | BIAS::VideoSource_V4L | [protected]
FramesPerSecond_ | BIAS::VideoSource | [protected]
GetBytesPerPixel() const | BIAS::VideoSource | [inline]
GetColorChannels() | BIAS::VideoSource | [inline]
GetColorModel() | BIAS::VideoSource | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetFeature(int feature) | BIAS::VideoSource | [virtual]
GetGain() | BIAS::VideoSource | [virtual]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetHeight() | BIAS::VideoSource | [inline]
GetID() | BIAS::VideoSource | [inline]
GetShutter() | BIAS::VideoSource | [virtual]
GetWidth() | BIAS::VideoSource | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Grabbing_ | BIAS::VideoSource | [protected]
GrabbingContinous_ | BIAS::VideoSource_V4L | [protected]
GrabContThread_(void *arg) | BIAS::VideoSource_V4L | [protected, static]
GrabSingle(BIAS::Camera< unsigned char > &image) | BIAS::VideoSource_V4L | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< float > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< char > &image) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::GrabSingle(BIAS::Camera< int > &image) | BIAS::VideoSource | [virtual]
GrabTime_ | BIAS::VideoSource_V4L | [protected]
Height_ | BIAS::VideoSource | [protected]
ID_ | BIAS::VideoSource | [protected]
ImageSize_ | BIAS::VideoSource | [protected]
InitImage(BIAS::ImageBase &Image) | BIAS::VideoSource |
IsGrabbingContinous() | BIAS::VideoSource | [inline]
newFrame_ | BIAS::VideoSource_V4L | [protected]
numBuffers_ | BIAS::VideoSource_V4L | [protected]
OnePushAuto(int feature) | BIAS::VideoSource | [virtual]
OpenDevice() | BIAS::VideoSource_V4L | [virtual]
OpenDevice(const char *device) | BIAS::VideoSource_V4L | [virtual]
BIAS::VideoSource::OpenDevice(int device) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount) | BIAS::VideoSource | [virtual]
BIAS::VideoSource::OpenDevice(const std::vector< std::string > &FileNames) | BIAS::VideoSource | [virtual]
operator=(const Debug &d) | BIAS::Debug | [inline]
PostGrab() | BIAS::VideoSource | [virtual]
PreGrab() | BIAS::VideoSource | [virtual]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
reqBuf | BIAS::VideoSource_V4L | [protected]
SetBytesPerPixel(unsigned char bpp) | BIAS::VideoSource | [inline]
SetChannel(int channel) | BIAS::VideoSource | [inline]
SetColorModel(BIAS::ImageBase::EColorModel mode) | BIAS::VideoSource | [virtual]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDirectToDisk(const std::string &filename) | BIAS::VideoSource |
SetFeature(int feature, unsigned int value) | BIAS::VideoSource | [virtual]
SetFPS(float fps) | BIAS::VideoSource | [inline]
SetGain(float g) | BIAS::VideoSource | [virtual]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetShutter(float exptime) | BIAS::VideoSource | [virtual]
SetSize(int w, int h, int bytesperpixel=1) | BIAS::VideoSource | [virtual]
SetWaitForNew(bool waitForNew) | BIAS::VideoSource_V4L | [inline]
SetWhiteBalance(float rvalue, float bvalue) | BIAS::VideoSource | [virtual]
ShowCapabilities() | BIAS::VideoSource_V4L | [virtual]
ShowCapabilities(const char *device) | BIAS::VideoSource_V4L | [virtual]
SoftwareWhiteBalance() | BIAS::VideoSource | [virtual]
StartGrabContinous() | BIAS::VideoSource_V4L | [virtual]
StopGrabContinous() | BIAS::VideoSource_V4L | [virtual]
ThreadCondition_ | BIAS::VideoSource_V4L | [protected]
VideoSource() | BIAS::VideoSource |
VideoSource(int card) | BIAS::VideoSource |
VideoSource_V4L() | BIAS::VideoSource_V4L |
waitForNew_ | BIAS::VideoSource_V4L | [protected]
Width_ | BIAS::VideoSource | [protected]
WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec) | BIAS::VideoSource | [protected]
~Debug() | BIAS::Debug | [inline]
~VideoSource() | BIAS::VideoSource | [virtual]
~VideoSource_V4L() | BIAS::VideoSource_V4L | [virtual]

Generated on Wed Jun 21 19:13:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoStream Member List

This is the complete list of members for BIAS::VideoStream, including all inherited members.

Close() | BIAS::VideoStream |
FileSize_ | BIAS::VideoStream | [protected]
Header_ | BIAS::VideoStream | [protected]
Ifs_ | BIAS::VideoStream | [protected]
ImageSize_ | BIAS::VideoStream | [protected]
NumImages_ | BIAS::VideoStream | [protected]
Open(const std::string &file) | BIAS::VideoStream |
operator=(const BIAS::VideoStream &src) | BIAS::VideoStream |
PrintHeader() | BIAS::VideoStream |
SplitIntoFiles(const std::string &prefix, unsigned int start=0, unsigned int count=0) | BIAS::VideoStream |
VideoStream() | BIAS::VideoStream |
VideoStream(const std::string &file) | BIAS::VideoStream |
VideoStream(const VideoStream &src) | BIAS::VideoStream |
~VideoStream() | BIAS::VideoStream | [virtual]

Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoStream::VSHeader Member List

This is the complete list of members for BIAS::VideoStream::VSHeader, including all inherited members.

AlignedSize | BIAS::VideoStream::VSHeader
BytesPerPixel | BIAS::VideoStream::VSHeader
ChannelCount | BIAS::VideoStream::VSHeader
ColorModel | BIAS::VideoStream::VSHeader
Height | BIAS::VideoStream::VSHeader
Padding | BIAS::VideoStream::VSHeader
StorageType | BIAS::VideoStream::VSHeader
Width | BIAS::VideoStream::VSHeader

Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoStream::VSImageHeader Member List

This is the complete list of members for BIAS::VideoStream::VSImageHeader, including all inherited members.

tsec | BIAS::VideoStream::VSImageHeader
tusec | BIAS::VideoStream::VSImageHeader
uuid | BIAS::VideoStream::VSImageHeader

Generated on Wed Jun 21 19:13:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::WrapBias2Ipl Member List

This is the complete list of members for BIAS::WrapBias2Ipl, including all inherited members.

Bind(BIAS::ImageBase *p_src) | BIAS::WrapBias2Ipl |
Consistent() const | BIAS::WrapBias2Ipl |
ConvertIPL32to8(const IplImage *src32, IplImage *dest8, const float &scale=DEFAULT_32to8_scale) | BIAS::WrapBias2Ipl | [static]
CreateBiasImageShared(const IplImage *&p_src, BIAS::ImageBase *p_dest) | BIAS::WrapBias2Ipl | [static]
CreateIplImageShared(const BIAS::ImageBase *p_src, IplImage *&p_dest) | BIAS::WrapBias2Ipl | [static]
DestroyAllWindows() | BIAS::WrapBias2Ipl | [static]
DestroyWindow(const char *name) | BIAS::WrapBias2Ipl | [static]
DestroyWindow(const std::string &name) | BIAS::WrapBias2Ipl | [static]
Display(const IplImage *img, const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale) | BIAS::WrapBias2Ipl | [static]
Display(const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const | BIAS::WrapBias2Ipl |
Display(const char *DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const | BIAS::WrapBias2Ipl |
Display(const std::string &DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const | BIAS::WrapBias2Ipl |
MoveWindow(const char *name, const int newX, const int newY) | BIAS::WrapBias2Ipl | [static]
MoveWindow(const std::string &name, const int newX, const int newY) | BIAS::WrapBias2Ipl | [static]
p_imgBias | BIAS::WrapBias2Ipl |
p_imgIpl | BIAS::WrapBias2Ipl |
p_imgIplDestroyable | BIAS::WrapBias2Ipl |
ResizeWindow(const char *name, const unsigned int width, const unsigned int height) | BIAS::WrapBias2Ipl | [static]
ResizeWindow(const std::string &name, const unsigned int width, const unsigned int height) | BIAS::WrapBias2Ipl | [static]
WaitKey(const unsigned int &delay=0) | BIAS::WrapBias2Ipl | [static]
WrapBias2Ipl() | BIAS::WrapBias2Ipl |
WrapBias2Ipl(BIAS::ImageBase *PtrImgBias) | BIAS::WrapBias2Ipl |
~WrapBias2Ipl() | BIAS::WrapBias2Ipl |

Generated on Wed Jun 21 19:13:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::WxMainThread Member List

This is the complete list of members for BIAS::WxMainThread, including all inherited members.

Entry() | BIAS::WxMainThread | [virtual]
MyGui_ | BIAS::WxMainThread | [protected]
OnExit() | BIAS::WxMainThread | [virtual]
WxMainThread() | BIAS::WxMainThread |
WxMainThread(GuiWX *gui) | BIAS::WxMainThread |
~WxMainThread() | BIAS::WxMainThread |

Generated on Wed Jun 21 19:13:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::WxToAsciiArray Member List

This is the complete list of members for BIAS::WxToAsciiArray, including all inherited members.

_AsciiStrings | BIAS::WxToAsciiArray | [private]
_Size | BIAS::WxToAsciiArray | [private]
operator char **() | BIAS::WxToAsciiArray | [inline]
WxToAsciiArray(wxChar **strings, int size) | BIAS::WxToAsciiArray | [inline]
~WxToAsciiArray() | BIAS::WxToAsciiArray | [inline]

Generated on Wed Jun 21 19:13:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::XMLBase Member List

This is the complete list of members for BIAS::XMLBase, including all inherited members.

XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(std::string &TopLevelTag, double &Version) const =0 | BIAS::XMLBase | [pure virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject)=0 | BIAS::XMLBase | [pure virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const =0 | BIAS::XMLBase | [pure virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:13:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::XMLIO Member List

This is the complete list of members for BIAS::XMLIO, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, bool AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, const std::string &AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, const char *AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, int AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, double AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, const BIAS::Vector< double > &AttributeValue) | BIAS::XMLIO |
addAttribute(const xmlNodePtr Node, const std::string &AttributeName, const BIAS::Vector< int > &AttributeValue) | BIAS::XMLIO |
addChildNode(const xmlNodePtr ParentNode, const std::string &NewNodeName) | BIAS::XMLIO |
addComment(const xmlNodePtr Node, const std::string &Comment) | BIAS::XMLIO |
addContent(const xmlNodePtr Node, const std::string &Content) | BIAS::XMLIO |
addContent(const xmlNodePtr Node, const int Content) | BIAS::XMLIO |
addContent(const xmlNodePtr Node, const double Content) | BIAS::XMLIO |
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
clear() | BIAS::XMLIO |
create(const std::string &RootNodeName) | BIAS::XMLIO |
CurrAttr_ | BIAS::XMLIO | [protected]
CurrNode_ | BIAS::XMLIO | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
getAttributeByName(const xmlNodePtr Node, const std::string &attribute_name) | BIAS::XMLIO |
getAttributeName(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
GetAttributes(const xmlNodePtr Node, std::vector< xmlAttrPtr > &attributes) | BIAS::XMLIO |
getAttributeValueBool(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueBool(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getAttributeValueDouble(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueDouble(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getAttributeValueInt(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueInt(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getAttributeValueString(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueString(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getAttributeValueVecDbl(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueVecDbl(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getAttributeValueVecInt(const xmlAttrPtr Attribute) const | BIAS::XMLIO |
getAttributeValueVecInt(const xmlNodePtr Node, const std::string &AttributeName) const | BIAS::XMLIO |
getChild(const xmlNodePtr ParentNode, const std::string &ChildName) | BIAS::XMLIO |
GetChildren(const xmlNodePtr ParentNode, std::vector< xmlNodePtr > &children) | BIAS::XMLIO |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
getFirstAttribute(const xmlNodePtr Node) | BIAS::XMLIO |
getFirstChild(const xmlNodePtr ParentNode) | BIAS::XMLIO |
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
getNextAttribute() | BIAS::XMLIO |
getNextChild() | BIAS::XMLIO |
getNextChild(const xmlNodePtr SiblingNode) | BIAS::XMLIO |
getNodeContentDouble(const xmlNodePtr Node) const | BIAS::XMLIO |
getNodeContentInt(const xmlNodePtr Node) const | BIAS::XMLIO |
getNodeContentString(const xmlNodePtr Node) const | BIAS::XMLIO |
getNodeName(const xmlNodePtr Node) const | BIAS::XMLIO |
GlobalDebugLevel | BIAS::Debug | [protected, static]
isInitialized_ | BIAS::XMLIO | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
read(const std::string &Filename) | BIAS::XMLIO |
ReadFromString(const std::string &str) | BIAS::XMLIO |
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
RootNode_ | BIAS::XMLIO | [protected]
SetCompression(int level=9) | BIAS::XMLIO |
setContent(const xmlNodePtr Node, const std::string &Content) | BIAS::XMLIO |
setContent(const xmlNodePtr Node, const int Content) | BIAS::XMLIO |
setContent(const xmlNodePtr Node, const double Content) | BIAS::XMLIO |
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
write(const std::string &Filename, bool AutoAddCompressionSuffix=true) const | BIAS::XMLIO |
WriteToString(std::string &str) | BIAS::XMLIO |
xmlDoc_ | BIAS::XMLIO | [protected]
XMLIO() | BIAS::XMLIO |
~Debug() | BIAS::Debug | [inline]
~XMLIO() | BIAS::XMLIO |

Generated on Wed Jun 21 19:13:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ZoomFrame Member List

This is the complete list of members for BIAS::ZoomFrame, including all inherited members.

ImageName_ | BIAS::ZoomFrame | [protected]
MIA_ZoomQuitButton enum value | BIAS::ZoomFrame | [private]
NewCoo(unsigned x, unsigned y) | BIAS::ZoomFrame |
NewImage(BIAS::ImageBase &im, BIAS::Image< unsigned char > &ucim, const wxString &name) | BIAS::ZoomFrame |
OnClose(wxCloseEvent &event) | BIAS::ZoomFrame | [protected]
OnQuit(wxCommandEvent &event) | BIAS::ZoomFrame | [protected]
OnZoomFactor(wxScrollEvent &event) | BIAS::ZoomFrame | [protected]
QuitButton_ | BIAS::ZoomFrame | [protected]
Setup() | BIAS::ZoomFrame | [protected]
SetZoom(unsigned z) | BIAS::ZoomFrame |
SLScale_ | BIAS::ZoomFrame | [protected]
Title_ | BIAS::ZoomFrame | [protected]
Window_ | BIAS::ZoomFrame | [protected]
ZoomFrame(wxWindow *parent, const wxString &title) | BIAS::ZoomFrame |
~ZoomFrame() | BIAS::ZoomFrame |

Generated on Wed Jun 21 19:13:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ZoomImageCanvas Member List

This is the complete list of members for BIAS::ZoomImageCanvas, including all inherited members.

Bitmap_ | BIAS::ZoomImageCanvas | [protected]
ClearDrawingContext_ | BIAS::ZoomImageCanvas | [protected]
GetZoomImage() | BIAS::ZoomImageCanvas | [protected]
mousex_ | BIAS::ZoomImageCanvas | [protected]
mousey_ | BIAS::ZoomImageCanvas | [protected]
NewCoo(unsigned x, unsigned y) | BIAS::ZoomImageCanvas |
NewImage(BIAS::ImageBase &im, BIAS::Image< unsigned char > &ucim) | BIAS::ZoomImageCanvas |
NewZoom(int zoom) | BIAS::ZoomImageCanvas |
OnKey(wxKeyEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnLeftMouse(wxMouseEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnMouseLeave(wxMouseEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnMouseMove(wxMouseEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnPaint(wxPaintEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnResize(wxSizeEvent &event) | BIAS::ZoomImageCanvas | [protected]
OnRightMouse(wxMouseEvent &event) | BIAS::ZoomImageCanvas | [protected]
origim_ | BIAS::ZoomImageCanvas | [protected]
origim_mutex_ | BIAS::ZoomImageCanvas | [protected]
SBar_ | BIAS::ZoomImageCanvas | [protected]
SBarID_ | BIAS::ZoomImageCanvas | [protected]
SetClearDrawingContext(bool clear) | BIAS::ZoomImageCanvas | [inline]
ucim_ | BIAS::ZoomImageCanvas | [protected]
UpdateStatusBar(unsigned x, unsigned y) | BIAS::ZoomImageCanvas | [protected]
wheight_ | BIAS::ZoomImageCanvas | [protected]
wwidth_ | BIAS::ZoomImageCanvas | [protected]
wxbitmap_mutex_ | BIAS::ZoomImageCanvas | [protected]
wximage_ | BIAS::ZoomImageCanvas | [protected]
zim_ | BIAS::ZoomImageCanvas | [protected]
ZoomFactor_ | BIAS::ZoomImageCanvas | [protected]
ZoomImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxTAB_TRAVERSAL, const wxString &name=wxT("ZoomImageCanvas")) | BIAS::ZoomImageCanvas |
ZoomX_ | BIAS::ZoomImageCanvas | [protected]
ZoomXPos_ | BIAS::ZoomImageCanvas | [protected]
ZoomY_ | BIAS::ZoomImageCanvas | [protected]
ZoomYPos_ | BIAS::ZoomImageCanvas | [protected]
~ZoomImageCanvas() | BIAS::ZoomImageCanvas |

Generated on Wed Jun 21 19:13:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasDetectUnvignetteApp Member List

This is the complete list of members for BiasDetectUnvignetteApp, including all inherited members.

OnInit() BiasDetectUnvignetteApp [virtual]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasShowEpiApp Member List

This is the complete list of members for BiasShowEpiApp, including all inherited members.

OnInit() BiasShowEpiApp [virtual]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BiasViewApp Member List

This is the complete list of members for BiasViewApp, including all inherited members.

OnInit() BiasViewApp [virtual]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

C Member List

This is the complete list of members for C, including all inherited members.

ALLOCATOR_IMPL(Base, C) | C |
Base(const string &name) | Base | [inline]
Base() | Base | [inline]
C() | C | [inline]
GetTag() const | Base | [inline]
Name_ | Base |
Who() | Base | [inline]

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CuEye Member List

This is the complete list of members for CuEye, including all inherited members.

AllocImageMem(int lWidth, int lHeight, int lBpp, char **ppcImgMem, int *plID) | CuEye |
CameraStatus(int lInfo, long lValue) | CuEye |
CaptureFrame(BITMAPINFOHEADER *pbmih, char *pcImage) | CuEye |
CaptureVideo(int lWait) | CuEye |
CuEye() | CuEye |
DisableEvent(int nWhich) | CuEye |
EnableAutoExit(int nMode) | CuEye |
EnableEvent(int nWhich) | CuEye |
EnableMessage(int nWhich, HWND hwnd) | CuEye |
ExitCamera() | CuEye |
ExitEvent(int nWhich) | CuEye |
FreeImageMem(char *pcMem, int lID) | CuEye |
FreezeVideo(int lWait) | CuEye |
GetActiveImageMem(char **ppcImgMem, int *plID) | CuEye |
GetCameraHandle() | CuEye | [inline]
GetCameraInfo(CAMINFO *pInfo) | CuEye |
GetCameraType() | CuEye |
GetColorDepth(int *plBpp, int *plColFormat) | CuEye |
GetDllVersion(int *plDllVers) | CuEye |
GetErrorText(int lErr, char *pcErrText) | CuEye |
GetExposureTime() | CuEye |
GetGain() | CuEye |
GetIRQ(int *plIRQ) | CuEye |
GetNumberOfCameras(int *plNumCameras) | CuEye |
GetOsVersion(void) | CuEye |
GetPciSlot(int *plSlot) | CuEye |
GetSensorInfo(PSENSORINFO pInfo) | CuEye |
InitCamera(int nId=0) | CuEye |
InitEvent(HANDLE hEv, int nWhich) | CuEye |
InquireImageMem(char *pcMem, int lID, int *plX, int *plY, int *plBpp, int *plPitch) | CuEye |
LoadImage(char *pcFile) | CuEye |
m_hu | CuEye | [protected]
m_hwnd | CuEye | [protected]
m_hwndNotify | CuEye | [protected]
ReadDigitalPort(int *plIn) | CuEye |
ReadEEPROM(int lAdr, char *pcBuf, int lCount) | CuEye |
ReadTriggerPort(int *plIn) | CuEye |
RenderBitmap(int nMemID, HWND hwnd, int nMode) | CuEye |
Renumerate(int reserved) | CuEye |
SaveImage(char *pcFile) | CuEye |
SaveImageMem(char *pcFile, char *pcMem, int lID) | CuEye |
SetBrightness(int lBright) | CuEye |
SetCaptureMode(int lMode) | CuEye |
SetColorMode(int lMode) | CuEye |
SetContrast(int lCont) | CuEye |
SetDisplayHook(int lMode) | CuEye |
SetDisplayKeyColor(int lKeyCol) | CuEye |
SetDisplayMode(int Mode) | CuEye |
SetDisplayOffset(int lOffsetX, int lOffsetY) | CuEye |
SetDisplayWindow(HWND hWnd) | CuEye |
SetErrorReport(int lMode) | CuEye |
SetExposureTime(double EXP, double *newEXP) | CuEye |
SetExternalTrigger(int lMode) | CuEye |
SetFrameRate(double dFr, double *pdFrNew) | CuEye |
SetGain(double gain) | CuEye |
SetGamma(int lGamma) | CuEye |
SetHue(int lHue) | CuEye |
SetImageMem(char *pcMem, int lID) | CuEye |
SetImagePos(int lPosX, int lPosY) | CuEye |
SetImageSize(int lWidth, int lHeight) | CuEye |
SetMainDisplayWindow(HWND hWnd) | CuEye |
SetPixelClock(int nClock) | CuEye |
SetSaturation(int lSatU, int lSatV) | CuEye |
SetScaler(int nMode) | CuEye |
SetScrollPos(int lPosX, int lPosY) | CuEye |
SetWhiteBalance(int nMode) | CuEye |
SetWhiteBalanceMultipliers(double dblRed, double dblGreen, double dblBlue) | CuEye |
StopLiveVideo(int lWait) | CuEye |
UpdateDisplay() | CuEye |
WriteDigitalPort(int lOut) | CuEye |
WriteEEPROM(int lAdr, char *pcBuf, int lCount) | CuEye |
~CuEye() | CuEye | [virtual]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CutoutFrame Member List

This is the complete list of members for CutoutFrame, including all inherited members.

_ImageCanvas | CutoutFrame | [private]
_OffsetX | CutoutFrame | [private]
_OffsetY | CutoutFrame | [private]
_Scale | CutoutFrame | [private]
CutoutFrame(wxWindow *parent, const wxString &title) | CutoutFrame |
OnClose(wxCloseEvent &event) | CutoutFrame | [private]
OnLeaveWindow(wxMouseEvent &event) | CutoutFrame | [private]
OnMotion(wxMouseEvent &event) | CutoutFrame | [private]
SetTransform(int offsetX, int offsetY, int scale) | CutoutFrame |
ShowImage(Image< unsigned char > &image, const string &name) | CutoutFrame |

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

DragAndDropTarget Member List

This is the complete list of members for DragAndDropTarget, including all inherited members.

_Frame | DragAndDropTarget | [protected]
DragAndDropTarget(MainFrame *frame) | DragAndDropTarget |
DragAndDropTarget(MainFrame *frame) | DragAndDropTarget |
Frame_ | DragAndDropTarget | [protected]
OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames) | DragAndDropTarget | [virtual]
OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames) | DragAndDropTarget | [virtual]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Alphabetical List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Basic Image AlgorithmS Library Class Index

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Z | _

A
MatchDataBase (BIAS)
A MatlabTBUndistortion (BIAS)
AffineTransf (BIAS) MatlabTBUndistortion::LuTEntry (BIAS)
alist Matrix (TNT)
AppData (BIAS) Matrix (BIAS)
B
Matrix2x2 (BIAS)
B Matrix3x3 (BIAS)
BackwardMapping (BIAS) Matrix3x4 (BIAS)
Base Matrix4x4 (BIAS)
BaseException (BIAS) MatrixPanel (BIAS)
BaseFactory (BIAS) MDcam (BIAS)
BaseFactory::MapEntry (BIAS) Mean (BIAS)
biasadd Median (BIAS)
biasconvert Median1D (BIAS)
BiasDetectUnvignetteApp MetaData (BIAS)
biasdiff Morphology (BIAS)
biasextract MSAC (BIAS)
biasfilter Multitype
biasinsert my_error_mgr
biasmerge MyAlgorithm
biasprojection MyApp
biassetprojection MyFactory
biassetuid MyFrame
biasshowepi MyGLCanvas
BiasShowEpiApp MyGLCanvas2
biasshowsm MySampleGrabberCB (BIAS)
biasview MyTemplate
BiasViewApp myTestClass
biasviewwx MyTestClass
Binomial (BIAS) MyUnscentedTransform
Binomial
N
Bresenham (BIAS) Namelist
BresenhamCircle (BIAS) NonBase
BresenhamCircleEighth (BIAS) Normalization (BIAS)
BresenhamCircleSlow (BIAS)
O
BSplineCurve (BIAS) olist
C
OpenGLCanvas (BIAS)
C OpenGLCanvasBase (BIAS)
Camera (BIAS) option
CameraData (BIAS)
P
CameraParam (BIAS) Param (BIAS)
CameraParameter_s ParamCallbackInterface (BIAS)
CameraViewController (BIAS) Parametrization (BIAS)
CameraViewExternals (BIAS) ParamGUI (BIAS)
CameraViewFrustum (BIAS) ParamGUIDialog (BIAS)
CameraViewInternals (BIAS) ParamGUIPanel (BIAS)
CameraViewport (BIAS) ParamTypeBase (BIAS)
CanCompare (BIAS) ParamTypeBool (BIAS)
CanCopy (BIAS) ParamTypeDouble (BIAS)
CanMultiply (BIAS) ParamTypeEnum (BIAS)
CCAStruct (BIAS) ParamTypeInt (BIAS)
Cholesky (BIAS) ParamTypeString (BIAS)
cilist ParamTypeVecDbl (BIAS)
cllist ParamTypeVecInt (BIAS)
ColorHarris (BIAS) PlainImageCanvas
ColorHistogram (BIAS) PlaneRANSAC (BIAS)
ColorMultiHistogram (BIAS) PlueckerMatrix (BIAS)
ColorSegmentation (BIAS) PMatrix (BIAS)
ColorSegmentationThreaded (BIAS) PMatrix3DData (BIAS)
complex PMatrixBase (BIAS)
COmpressJpeg PMatrixEstimation (BIAS)
Condensation (BIAS) PMatrixLinear (BIAS)
CondensHisto (BIAS) PMDImageIO (BIAS)
CondensImg (BIAS) PMDImageMetaData (BIAS)
Conic2D (BIAS) PMDImageProc (BIAS)
const_Region1D (TNT) Point3DData (BIAS)
const_Region2D (TNT) Polynom (BIAS)
Contour (BIAS) PolynomialSolve (BIAS)
Convolution (BIAS) Pose (BIAS)
CoordinateTransform3D (BIAS) PoseParametrization (BIAS)
CornerDetectorBase (BIAS) PoseParametrizationCovariance (BIAS)
CornerDetectorFoerstner (BIAS) Position (BIAS)
CornerDetectorGradient (BIAS) Projection (BIAS)
CornerDetectorHarris (BIAS) Projection3DData (BIAS)
CornerDetectorKLT (BIAS) ProjectionDialog (BIAS)
CornerDetectorSusan (BIAS) ProjectionGUI (BIAS)
CornerMatcher (BIAS) ProjectionMapping (BIAS)
cornerstruct (BIAS) ProjectionParametersBase (BIAS)
CovMatrix3x3 (BIAS) ProjectionParametersIO (BIAS)
CPDiscreteParam (BIAS) ProjectionParametersPerspective (BIAS)
CPDiscreteParam (BIAS) ProjectionParametersProjective (BIAS)
CPDiscreteParam (BIAS) ProjectionParametersSpherical (BIAS)
CScommBase (BIAS) ProjectionParametersZoom (BIAS)
CScommClient (BIAS) PyramidImage (BIAS)
CScommData (BIAS)
Q
CScommMsg (BIAS) Quadric3D (BIAS)
CScommServer (BIAS) Quaternion (BIAS)
CSCommWithClientNr (BIAS)
R
CuEye Random (BIAS)
CutoutFrame RANSAC (BIAS)
CylinderMapping (BIAS) RANSACPreKnowledge (BIAS)
D
RedirectStreams (BIAS)
D:/home/jw/source/BIAS/Base/Debug/Debug.hh Region1D (TNT)
DC_GPS (BIAS) Region2D (TNT)
DC_inertial (BIAS) RegionMatcher (BIAS)
DC_ptu (BIAS) RenderModeGL (BIAS)
Debug (BIAS) Rescale (BIAS)
DeInterlace (BIAS) RGBAd
DerivedFrom (BIAS) RGBAf
Dilation (BIAS) RGBAuc
Distribution (BIAS) RGBd
DistTransform (BIAS) RGBf
dndFileTarget (BIAS) RGBuc
doublecomplex RigParameter (BIAS)
doubleRANSAC (BIAS) RMatrix (BIAS)
DragAndDropTarget RMatrixBase (BIAS)
DrawTextGL (BIAS) ROI (BIAS)
E
S
EightWaySymmetry (BIAS) ScaledImageCanvas (BIAS)
EightWaySymmetryHomg (BIAS) ScanLine (BIAS)
Ellipsoid3DData (BIAS) ScanLine2 (BIAS)
EMatrix (BIAS) SegmentationData
EMatrixBase (BIAS) SensorData (BIAS)
EpipolarLine (BIAS) SettingsGL (BIAS)
Erosion (BIAS) SimilarityTransform (BIAS)
EuclideanTransf3D (BIAS) SimilarityTransformation3D
ExampleDebug (BIAS) SimilarityTransformation3D
ExampleGLSharedApp SphericalUndistortion (BIAS)
ExampleImageCanvasGLBaseApp SphericalUndistortion::LuTEntry (BIAS)
ExampleOpenGLCanvasApp SphericalUndistortion::LuTpxpyEntry (BIAS)
ExifTag (BIAS) StatekeeperGL (BIAS)
F
StereoRedGreen (BIAS)
Feat (BIAS) stopwatch (TNT)
FFT (BIAS) StructureTensor (BIAS)
FFT2D (BIAS) SVD (BIAS)
FFT2D_Tiles (BIAS) SVD3x3 (BIAS)
FilterBase (BIAS)
T
FilterMask (BIAS) TagInfo
FilterNTo2N (BIAS) tagTHREADNAME_INFO
FilterNTo3N (BIAS) Tensor3D (BIAS)
FilterNToN (BIAS) Tensor3D3x3x3 (BIAS)
FindFilesInPath TFTensorEstimation (BIAS)
FMatrix (BIAS) ThreadArg__
FMatrixBase (BIAS) ThreeDOut (BIAS)
FMatrixEstimation (BIAS) ThreeDOutParameters (BIAS)
Fortran_Matrix (TNT) TimeMeasure (BIAS)
Fortran_Sparse_Col_Matrix (TNT) TimeMeasurement (BIAS)
Fortran_Sparse_Vector (TNT) TIntersect
FromBase TopFrame (BIAS)
G
Tracker (BIAS)
Gauss (BIAS) TrackerBase (BIAS)
GaussHelmert (BIAS) TrackerBaseAffine (BIAS)
GenGroundTruth (BIAS) TrackerBaseInterface (BIAS)
GenSynthMatches (BIAS) TrackerBaseSimple (BIAS)
GeometryGL (BIAS) TrackerBaseWeighted (BIAS)
GradientGauss (BIAS) TrackerSynth (BIAS)
GradientGaussAsymmetric (BIAS) Transpose_View (TNT)
GradientSimple (BIAS) TriangleMesh (BIAS)
GradientSobel3x3 (BIAS) Triangulation (BIAS)
GuiBase (BIAS) TrifocalTensor (BIAS)
GuiEnhanced (BIAS) TrifocalTensorBase (BIAS)
GuiGTK (BIAS)
U
GuiWX (BIAS) UndistortionMapping (BIAS)
H
UnitLowerTriangularView (TNT)
Histogram (BIAS) UnitUpperTriangularView (TNT)
Histogram2D (BIAS) UnscentedTransform (BIAS)
HMatrix (BIAS) UnVignette (BIAS)
HMatrixBase (BIAS) UpperTriangularView (TNT)
HMatrixEstimation (BIAS) UUID (BIAS)
HomgLine2D UUIDsortAscending (BIAS)
HomgLine2D (BIAS)
V
HomgLine3D (BIAS) Vardesc
HomgPlane3D (BIAS) Vector (TNT)
HomgPoint1D (BIAS) Vector (BIAS)
HomgPoint2D (BIAS) vector (std)
HomgPoint2DCov (BIAS) Vector2 (BIAS)
HomgPoint3D (BIAS) Vector3 (BIAS)
HomgPoint3DCov (BIAS) Vector4 (BIAS)
HomographyMapping (BIAS) Vector_Adaptor (TNT)
I
VectorPanel (BIAS)
ICECallbackInterface (BIAS) VideoServer (BIAS)
ICECallBackInterface VideoShMFeeder (BIAS)
icilist VideoSource (BIAS)
Image (BIAS) VideoSource_DCAM (BIAS)
Image3DData (BIAS) VideoSource_Disk (BIAS)
ImageAttributes (BIAS) VideoSource_DiskPMD (BIAS)
ImageBase (BIAS) VideoSource_DSHOW (BIAS)
ImageCanvas (BIAS) VideoSource_DV (MIP)
ImageCanvasEnhanced (BIAS) VideoSource_DV2 (MIP)
ImageCanvasGLBase (BIAS) VideoSource_Net (BIAS)
ImageCanvasGLBase VideoSource_Shm (BIAS)
ImageConvert (BIAS) VideoSource_Shm::ShmImageHeader (BIAS)
ImageConvertThreaded (BIAS) VideoSource_Stereo (BIAS)
ImageDraw (BIAS) VideoSource_uEye (BIAS)
ImageIO (BIAS) VideoSource_UEYE
ImgObjGL (BIAS) VideoSource_V4L (BIAS)
Index1D (TNT) VideoStream (BIAS)
IndexedFaceSet (BIAS) VideoStream::VSHeader (BIAS)
inlist VideoStream::VSImageHeader (BIAS)
IntegralHistogram (BIAS) VideSource_DiskPMD
Interpolator (BIAS) VideSource_Stereo
ItemAndWidget (BIAS)
W
J
WeightedSigmaPoint (BIAS)
JpegHandler (BIAS) WrapBias2Ipl (BIAS)
K
WxMainThread (BIAS)
Kalman (BIAS) wxScrolledWindow
KMatrix (BIAS) WxToAsciiArray (BIAS)
L
wxTopLevelWindow
Label (BIAS) wxTopLevelWindowNative
LeastSquaresBase (BIAS) wxWindow
LeastSquaresLapack (BIAS)
X
LeastSquaresSVD (BIAS) XMLBase (BIAS)
Line3DData (BIAS) XMLIO (BIAS)
LinearRegionDetector (BIAS) xvimage
LogFacility (BIAS)
Z
LogPolarMapping (BIAS) ZoomFrame (BIAS)
LowerTriangularView (TNT) ZoomImageCanvas (BIAS)
M
_
MainFrame _FilterBorders
mainpage

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Z | _

Generated on Wed Jun 21 19:06:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleGLSharedApp Member List

This is the complete list of members for ExampleGLSharedApp, including all inherited members.

OnInit() ExampleGLSharedApp [private, virtual]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleImageCanvasGLBaseApp Member List

This is the complete list of members for ExampleImageCanvasGLBaseApp, including all inherited members.

OnInit() ExampleImageCanvasGLBaseApp [private, virtual]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ExampleOpenGLCanvasApp Member List

This is the complete list of members for ExampleOpenGLCanvasApp, including all inherited members.

OnInit() | ExampleOpenGLCanvasApp | [private, virtual]
OnInit() | ExampleOpenGLCanvasApp | [private, virtual]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

FindFilesInPath Member List

This is the complete list of members for FindFilesInPath, including all inherited members.

c_FileList | FindFilesInPath |
FindFilesInPath(std::string StartingPath, const std::string &FileTypes, FUNC_PTR_type fptr=NULL, bool SearchSubDir=true) | FindFilesInPath | [inline]
FindInDir(const std::string &StartingPath, bool SearchSubDir=true) | FindFilesInPath | [inline, protected]
FUNC_PTR_type typedef | FindFilesInPath |
m_FileList | FindFilesInPath | [protected]
m_FileTypes | FindFilesInPath |
m_FuncPtr | FindFilesInPath | [protected]
PerformClassFunctionOnListedFiles(T &SrcObj, F func) | FindFilesInPath | [inline]
PerformFunctionOnListedFiles(FUNC_PTR_type fptr) | FindFilesInPath | [inline]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

FromBase Member List

This is the complete list of members for FromBase, including all inherited members.

Base(const string &name) | Base | [inline]
Base() | Base | [inline]
FromBase() | FromBase | [inline]
GetTag() const | Base | [inline]
Name_ | Base |
Who() | Base | [inline]

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MainFrame Member List

This is the complete list of members for MainFrame, including all inherited members.

_BlockAnimation | MainFrame | [protected]
_CurrentImage | MainFrame | [protected]
_CutoutFrame1 | MainFrame | [private]
_CutoutFrame2 | MainFrame | [private]
_DefaultDir | MainFrame | [protected]
_DefaultFile | MainFrame | [protected]
_DelaySpin | MainFrame | [protected]
_FileNames | MainFrame | [protected]
_FitCheckBox | MainFrame | [protected]
_Image1 | MainFrame | [private]
_Image2 | MainFrame | [private]
_ImageCanvas1 | MainFrame | [private]
_ImageCanvas2 | MainFrame | [private]
_ImageCanvasFloat | MainFrame | [protected]
_ImageCanvasUC | MainFrame | [protected]
_ImageName1 | MainFrame | [private]
_ImageName2 | MainFrame | [private]
_MetaData | MainFrame | [protected]
_NeedReload | MainFrame | [protected]
_Projection1 | MainFrame | [private]
_Projection2 | MainFrame | [private]
_ReverseCheckBox | MainFrame | [protected]
_RunStopButton | MainFrame | [protected]
_SelectedPoint1 | MainFrame | [private]
_SelectedPoint2 | MainFrame | [private]
_Timer | MainFrame | [protected]
bImageLoaded_ | MainFrame | [protected]
bUnVignetteParamsReady_ | MainFrame | [protected]
CalcImageMean3x3(BIAS::Image< unsigned char > img, int x, int y) | MainFrame |
CalculateSteps(int dImageNumber) | MainFrame | [protected]
controlPoints_ | MainFrame | [protected]
DefaultDir_ | MainFrame | [protected]
DefaultFile_ | MainFrame | [protected]
dGroundThruthWhite_ | MainFrame | [protected]
dNumberOfSteps_ | MainFrame | [protected]
DragAndDropTarget class | MainFrame | [friend]
DrawDistortedLine(EpipolarLine &line, Image< unsigned char > &image, const ProjectionParametersPerspective *paramsPersp, const ProjectionParametersSpherical *paramsSpherical) | MainFrame | [private]
fileName_ | MainFrame | [protected]
FitSizetIfTooSmall() | MainFrame |
FitSizetIfTooSmall() | MainFrame |
ImageCanvasUC_ | MainFrame | [protected]
ImageFileNames_ | MainFrame |
ImageHeight_ | MainFrame | [protected]
ImageWidth_ | MainFrame | [protected]
LoadImageFromList(int index) | MainFrame | [protected]
LoadImages(const wxArrayString &paths) | MainFrame |
LoadImagesAndCalculate(const wxArrayString &fileNames) | MainFrame |
MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MainFrame |
MainFrame() | MainFrame |
MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MainFrame |
OnAbout(wxCommandEvent &event) | MainFrame | [protected]
OnAbout(wxCommandEvent &event) | MainFrame | [protected]
OnDelay(wxSpinEvent &event) | MainFrame | [protected]
OnExit(wxCommandEvent &event) | MainFrame | [protected]
OnExit(wxCommandEvent &event) | MainFrame | [protected]
OnFit(wxCommandEvent &event) | MainFrame | [protected]
OnIdle(wxIdleEvent &event) | MainFrame | [protected]
OnIdle(wxIdleEvent &event) | MainFrame | [protected]
OnInfo(wxCommandEvent &event) | MainFrame | [protected]
OnKeyInfo(wxCommandEvent &event) | MainFrame | [protected]
OnLeftDown(wxMouseEvent &event) | MainFrame | [private]
OnLoad(wxCommandEvent &event) | MainFrame | [protected]
OnLoad(wxCommandEvent &event) | MainFrame | [protected]
OnMetaData(wxCommandEvent &event) | MainFrame | [protected]
OnNext(wxCommandEvent &event) | MainFrame | [protected]
OnPrev(wxCommandEvent &event) | MainFrame | [protected]
OnRunStop(wxCommandEvent &event) | MainFrame | [protected]
OnSize(wxSizeEvent &event) | MainFrame | [protected]
OnSize(wxSizeEvent &event) | MainFrame | [protected]
OnStepsEnter(wxCommandEvent &event) | MainFrame | [protected]
OnTimer(wxTimerEvent &event) | MainFrame | [protected]
OnTimer(wxTimerEvent &event) | MainFrame | [protected]
origImage_ | MainFrame | [protected]
PPXTextCtrl_ | MainFrame | [protected]
PPYTextCtrl_ | MainFrame | [protected]
PrinciplePointX_ | MainFrame | [protected]
PrinciplePointY_ | MainFrame | [protected]
RefitClients() | MainFrame | [protected]
RefitClients() | MainFrame |
SaveUnVignetted(wxCommandEvent &event) | MainFrame | [protected]
SetFileList(const vector< string > &fileNames) | MainFrame |
SetImages(Image< unsigned char > &image1, const Projection &proj1, const string &name1, Image< unsigned char > &image2, const Projection &proj2, const string &name2) | MainFrame |
StaticLabel_ | MainFrame | [protected]
StepsTextCtrl_ | MainFrame | [protected]
Timer_ | MainFrame | [protected]
ucImage_ | MainFrame | [protected]
unVigImage_ | MainFrame | [protected]
UnVignette() | MainFrame | [protected]
UnVignette_ | MainFrame | [protected]
VignettePercentage_ | MainFrame | [protected]
WriteCameraData(wxCommandEvent &event) | MainFrame | [protected]

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MIP::VideoSource_DV2 Member List

This is the complete list of members for MIP::VideoSource_DV2, including all inherited members.

Buffer_ | MIP::VideoSource_DV2 | [protected]
BufferSize_ | MIP::VideoSource_DV2 | [protected]
CloseDevice() | MIP::VideoSource_DV2 |
DV1394FD_ | MIP::VideoSource_DV2 | [protected]
Format_ | MIP::VideoSource_DV2 | [protected]
FrameSize_ | MIP::VideoSource_DV2 | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | MIP::VideoSource_DV2 |
InitData_ | MIP::VideoSource_DV2 | [protected]
OpenDevice() | MIP::VideoSource_DV2 |
OpenDevice(const std::string &device) | MIP::VideoSource_DV2 |
PostGrab() | MIP::VideoSource_DV2 |
PreGrab() | MIP::VideoSource_DV2 |
Status_ | MIP::VideoSource_DV2 | [protected]
UseChannel(int channel) | MIP::VideoSource_DV2 |
VideoSource_DV2() | MIP::VideoSource_DV2 |
~VideoSource_DV2() | MIP::VideoSource_DV2 |

Generated on Wed Jun 21 19:13:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MIP::VideoSource_DV Member List

This is the complete list of members for MIP::VideoSource_DV, including all inherited members.

Channel_ | MIP::VideoSource_DV | [protected]
CloseDevice() | MIP::VideoSource_DV |
DroppedFrame_ | MIP::VideoSource_DV | [protected]
FrameFinished_ | MIP::VideoSource_DV | [protected]
FrameStarted_ | MIP::VideoSource_DV | [protected]
GrabBuffer_ | MIP::VideoSource_DV | [protected]
GrabSingle(BIAS::Camera< unsigned char > &image) | MIP::VideoSource_DV |
IEEE1394Card_ | MIP::VideoSource_DV | [protected]
IEEE1394Handle_ | MIP::VideoSource_DV | [protected, static]
Instances_ | MIP::VideoSource_DV | [protected, static]
InstancesTotal_ | MIP::VideoSource_DV | [protected, static]
MaxTrials_ | MIP::VideoSource_DV | [protected]
OpenDevice() | MIP::VideoSource_DV |
OpenDevice(const char *device) | MIP::VideoSource_DV |
PostGrab() | MIP::VideoSource_DV |
PreGrab() | MIP::VideoSource_DV |
raw_dv_handler(raw1394handle_t handle, int channel, size_t length, quadlet_t *data) | MIP::VideoSource_DV | [friend]
UseChannel(int channel) | MIP::VideoSource_DV |
VideoSource_DV(int Card) | MIP::VideoSource_DV |
VideoSource_DV() | MIP::VideoSource_DV |
VideoSource_DV_Internal_Init_(int card) | MIP::VideoSource_DV | [protected]
~VideoSource_DV() | MIP::VideoSource_DV |

Generated on Wed Jun 21 19:13:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyAlgorithm Member List

This is the complete list of members for MyAlgorithm, including all inherited members.

cooldbl | MyAlgorithm | [protected]
coollevel | MyAlgorithm | [protected]
coollevel | MyAlgorithm | [protected]
MyAlgorithm() | MyAlgorithm | [inline]
MyAlgorithm() | MyAlgorithm | [inline]
ParamAdd(Param &p) | MyAlgorithm | [inline]
ParamAdd(Param &p) | MyAlgorithm | [inline]
ParamCallbackInterface() | BIAS::ParamCallbackInterface |
ParameterChanged(const std::string &name, const void *data) | MyAlgorithm | [inline, virtual]
ParameterChanged(const std::string &name, const void *data) | MyAlgorithm | [inline, virtual]
~MyAlgorithm() | MyAlgorithm | [inline]
~MyAlgorithm() | MyAlgorithm | [inline]
~ParamCallbackInterface() | BIAS::ParamCallbackInterface | [virtual]

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyApp Member List

This is the complete list of members for MyApp, including all inherited members.

OnInit() | MyApp | [private, virtual]
OnInit() | MyApp | [private, virtual]
OnInit() | MyApp | [private, virtual]
OnInit() | MyApp | [virtual]
OnInit() | MyApp | [virtual]
OnInit() | MyApp | [virtual]
OnInit() | MyApp | [virtual]
OnInit() | MyApp | [private, virtual]
ToplevelWindow_ | MyApp |
~MyApp() | MyApp |

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyFactory Member List

This is the complete list of members for MyFactory, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
AddType(AllocatorFunctionPointer allocFunc) | BIAS::BaseFactory< Base > | [virtual]
AllocatorFunctionPointer typedef | BIAS::BaseFactory< Base > |
BaseFactory() | BIAS::BaseFactory< Base > |
Clear() | BIAS::BaseFactory< Base > | [inline]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
Generate(const TagType &tag) const | BIAS::BaseFactory< Base > |
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetKnownTags(std::vector< TagType > &tags) const | BIAS::BaseFactory< Base > |
GetNearTag(const TagType &tag, TagType &t1, TagType &t2) | BIAS::BaseFactory< Base > |
GlobalDebugLevel | BIAS::Debug | [protected, static]
IsInMap_(const TagType &tag) const | BIAS::BaseFactory< Base > | [inline, protected]
Map_ | BIAS::BaseFactory< Base > | [protected]
MyFactory() | MyFactory | [inline]
operator<<(std::ostream &os, const BaseFactory< Base > &bf) | BIAS::BaseFactory< Base > | [friend]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
~BaseFactory() | BIAS::BaseFactory< Base > | [virtual]
~Debug() | BIAS::Debug | [inline]

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyFrame Member List

This is the complete list of members for MyFrame, including all inherited members.

_ic | MyFrame |
_ic | MyFrame |
_ic | MyFrame |
AutoExposure_ | MyFrame | [protected]
Cam2_ | MyFrame | [protected]
Cam_ | MyFrame | [protected]
camfile | MyFrame | [protected]
CamImg2_ | MyFrame | [protected]
CamImg_ | MyFrame | [protected]
cams | MyFrame | [protected]
framecount | MyFrame | [protected]
FrameCounter_ | MyFrame | [protected]
GrabImage | MyFrame | [protected]
IC_ | MyFrame | [protected]
ICECallbackInterface() | BIAS::ICECallbackInterface |
lastheight | MyFrame | [protected]
lastwidth | MyFrame | [protected]
LoadImages() | MyFrame |
max_gain | MyFrame | [protected]
max_shutter | MyFrame | [protected]
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
MyFrame() | MyFrame |
MyFrame() | MyFrame |
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size, VideoSource *cam, VideoSource *cam2) | MyFrame | [inline]
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) | MyFrame |
numcams | MyFrame | [protected]
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAbout(wxCommandEvent &event) | MyFrame |
OnAutoExposure(wxCommandEvent &event) | MyFrame |
OnConfig(wxCommandEvent &WXUNUSED(event)) | MyFrame | [inline]
OnConfigPin(wxCommandEvent &WXUNUSED(event)) | MyFrame | [inline]
OnGain(wxScrollEvent &event) | MyFrame |
OnGrab(wxCommandEvent &WXUNUSED(event)) | MyFrame | [inline]
OnGrabContinuous(wxCommandEvent &WXUNUSED(event)) | MyFrame | [inline]
OnKey(wxKeyEvent &event) | MyFrame | [inline]
OnLoad(wxCommandEvent &event) | MyFrame |
OnLoad(wxCommandEvent &event) | MyFrame |
OnLoad(wxCommandEvent &event) | MyFrame |
OnLoadImage(wxCommandEvent &) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &event) | MyFrame |
OnQuit(wxCommandEvent &WXUNUSED(event)) | MyFrame | [inline]
OnQuit(wxCommandEvent &event) | MyFrame |
OnRect(wxCommandEvent &event) | MyFrame |
OnShutter(wxScrollEvent &event) | MyFrame |
OnTestShot(wxCommandEvent &event) | MyFrame |
OnTimer(wxTimerEvent &) | MyFrame | [inline]
OnTimer(wxTimerEvent &event) | MyFrame |
OnWhiteBalance(wxCommandEvent &event) | MyFrame |
p_2nd_canvas | MyFrame |
p_canvas | MyFrame |
p_canvas | MyFrame |
p_canvas | MyFrame |
p_canvas1 | MyFrame |
p_canvas2 | MyFrame |
param_ | MyFrame |
QuitButton_ | MyFrame | [protected]
RectangleSelected(int tl[2], int br[2]) | MyFrame | [virtual]
scanbus | MyFrame | [protected]
ShmFeeder | MyFrame | [protected]
ShmNames | MyFrame | [protected]
ShmPrefix | MyFrame | [protected]
ShowImg_ | MyFrame | [protected]
SliderGain_ | MyFrame | [protected]
SliderShutter_ | MyFrame | [protected]
StatusBar_ | MyFrame | [protected]
StopWatch_ | MyFrame | [protected]
Timer_ | MyFrame | [protected]
WhiteBalanceButton_ | MyFrame | [protected]
~ICECallbackInterface() | BIAS::ICECallbackInterface | [virtual]
~MyFrame() | MyFrame |
~MyFrame() | MyFrame |

Generated on Wed Jun 21 19:06:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyGLCanvas2 Member List

This is the complete list of members for MyGLCanvas2, including all inherited members.

_polygonmodeGL | BIAS::OpenGLCanvas | [protected]
animationUpdateEnabled | BIAS::OpenGLCanvasBase | [static]
Display() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCalls() | MyGLCanvas2 | [virtual]
DisplayCameraView() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewExternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewInternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayClear() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::OpenGLCanvasBase |
DisplayRenderMode() | BIAS::OpenGLCanvasBase | [virtual]
DisplaySampleScene() | BIAS::OpenGLCanvasBase | [static]
DisplaySelectBuffer() | BIAS::OpenGLCanvasBase |
dplist | MyGLCanvas2 |
framecount_ | BIAS::OpenGLCanvasBase | [protected]
GetAspectRatio() const | BIAS::OpenGLCanvasBase |
GetFrameCount() const | BIAS::OpenGLCanvasBase | [inline]
GetHeight() const | BIAS::OpenGLCanvasBase |
GetInfoGL(std::ostream &os=std::cout) | BIAS::OpenGLCanvas | [virtual]
GetOwnerframe() | BIAS::OpenGLCanvasBase |
GetPixelValueDepth(const wxPoint &pos2d) const | BIAS::OpenGLCanvasBase |
GetPixelValueRGB(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetPixelValueRGBA(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetViewController() const | BIAS::OpenGLCanvas |
GetViewController() | BIAS::OpenGLCanvas |
GetVSync() | BIAS::OpenGLCanvasBase | [static]
GetWidth() const | BIAS::OpenGLCanvasBase |
idleRepaintEnabled | BIAS::OpenGLCanvas | [static]
InitMembers() | BIAS::OpenGLCanvas | [virtual]
InitWithContext() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContextDone_ | BIAS::OpenGLCanvasBase | [protected]
instance_ | BIAS::OpenGLCanvasBase | [protected]
instancesTotalNo_ | BIAS::OpenGLCanvasBase | [protected, static]
IsContextAvailable() | BIAS::OpenGLCanvasBase |
MyGLCanvas2(wxFrame *parent) | MyGLCanvas2 |
MyGLCanvas2(wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette) | MyGLCanvas2 |
OnChar(wxKeyEvent &event) | BIAS::OpenGLCanvasBase | [virtual]
OnEraseBackground(wxEraseEvent &event) | BIAS::OpenGLCanvasBase |
OnIdle(wxIdleEvent &event) | BIAS::OpenGLCanvas |
OnMotion(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseDown(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseWheel(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnPaint(wxPaintEvent &event) | BIAS::OpenGLCanvasBase |
OnSize(wxSizeEvent &event) | BIAS::OpenGLCanvasBase |
OpenGLCanvas(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvas(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=0, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvasBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
p_font | BIAS::OpenGLCanvasBase | [protected]
p_ownerframe | BIAS::OpenGLCanvasBase | [protected]
p_viewCtrl_ | BIAS::OpenGLCanvas | [protected]
PrintHelp(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
realtimeAnimation | BIAS::OpenGLCanvas | [static]
rendermode | BIAS::OpenGLCanvasBase | [protected]
Reshape() | BIAS::OpenGLCanvas | [virtual]
ScreenShot(BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot(const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot() | BIAS::OpenGLCanvasBase |
SetFrameCount(const unsigned long &newVal) | BIAS::OpenGLCanvasBase | [inline]
SetOwnerframe(wxFrame *ptr) | BIAS::OpenGLCanvasBase |
SetStatusText(const wxString &text, const int c_field=0) | BIAS::OpenGLCanvasBase |
SetVSync(const bool &trueForOn) | BIAS::OpenGLCanvasBase | [static]
ShowFPS(const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField) | BIAS::OpenGLCanvasBase |
ShowFPS() | BIAS::OpenGLCanvasBase |
ShowValue(const wxPoint &pos) | BIAS::OpenGLCanvasBase |
StereoI_CaptureStereoImage(const int &format, const int &quality) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetConvergence() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetInfo(std::ostream &os=std::cout) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetSeparation() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetStereoState() | BIAS::OpenGLCanvasBase | [static]
StereoI_Init() | BIAS::OpenGLCanvasBase | [static]
StereoI_SetConvergence(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetSeparation(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetStereoState(const int &val) | BIAS::OpenGLCanvasBase | [static]
SwapBuffers() | BIAS::OpenGLCanvasBase |
time | BIAS::OpenGLCanvasBase | [static]
ToggleFullScreen() | BIAS::OpenGLCanvasBase |
ToggleIP(bool &value) | BIAS::OpenGLCanvasBase | [static]
ToggleVSync() | BIAS::OpenGLCanvasBase | [static]
Unproject(const wxPoint &pos2d, double &d) | BIAS::OpenGLCanvasBase |
UpdateTime() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvas() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvasBase() | BIAS::OpenGLCanvasBase | [virtual]

Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyGLCanvas Member List

This is the complete list of members for MyGLCanvas, including all inherited members.

_polygonmodeGL | BIAS::OpenGLCanvas | [protected]
animationUpdateEnabled | BIAS::OpenGLCanvasBase | [static]
Display() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCalls() | MyGLCanvas | [virtual]
DisplayCalls() | MyGLCanvas | [virtual]
DisplayCameraView() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewExternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayCameraViewInternalParams() | BIAS::OpenGLCanvas | [virtual]
DisplayClear() | BIAS::OpenGLCanvasBase | [virtual]
DisplayCoordCross(const float &size=1.0f, const float &linewidth=1.0f) | BIAS::OpenGLCanvasBase |
DisplayRenderMode() | BIAS::OpenGLCanvasBase | [virtual]
DisplaySampleScene() | BIAS::OpenGLCanvasBase | [static]
DisplaySelectBuffer() | BIAS::OpenGLCanvasBase |
dplist | MyGLCanvas |
font | MyGLCanvas |
framecount_ | BIAS::OpenGLCanvasBase | [protected]
GetAspectRatio() const | BIAS::OpenGLCanvasBase |
GetFrameCount() const | BIAS::OpenGLCanvasBase | [inline]
GetHeight() const | BIAS::OpenGLCanvasBase |
GetInfoGL(std::ostream &os=std::cout) | BIAS::OpenGLCanvas | [virtual]
GetOwnerframe() | BIAS::OpenGLCanvasBase |
GetPixelValueDepth(const wxPoint &pos2d) const | BIAS::OpenGLCanvasBase |
GetPixelValueRGB(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetPixelValueRGBA(const wxPoint &pos2d) | BIAS::OpenGLCanvasBase |
GetViewController() const | BIAS::OpenGLCanvas |
GetViewController() | BIAS::OpenGLCanvas |
GetVSync() | BIAS::OpenGLCanvasBase | [static]
GetWidth() const | BIAS::OpenGLCanvasBase |
idleRepaintEnabled | BIAS::OpenGLCanvas | [static]
InitGeometry() | MyGLCanvas |
InitMembers() | BIAS::OpenGLCanvas | [virtual]
InitWithContext() | BIAS::OpenGLCanvasBase | [virtual]
InitWithContextDone_ | BIAS::OpenGLCanvasBase | [protected]
instance_ | BIAS::OpenGLCanvasBase | [protected]
instancesTotalNo_ | BIAS::OpenGLCanvasBase | [protected, static]
IsContextAvailable() | BIAS::OpenGLCanvasBase |
MyGLCanvas(wxFrame *parent) | MyGLCanvas |
MyGLCanvas(wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette) | MyGLCanvas |
MyGLCanvas(wxFrame *parent) | MyGLCanvas |
MyGLCanvas(wxFrame *parent, wxGLContext *sharedContext, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxT("MyGLCanvas sharedContext"), int *attribList=0, const wxPalette &palette=wxNullPalette) | MyGLCanvas |
OnChar(wxKeyEvent &event) | BIAS::OpenGLCanvasBase | [virtual]
OnEraseBackground(wxEraseEvent &event) | BIAS::OpenGLCanvasBase |
OnIdle(wxIdleEvent &event) | BIAS::OpenGLCanvas |
OnMotion(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseDown(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnMouseWheel(wxMouseEvent &event) | BIAS::OpenGLCanvas |
OnPaint(wxPaintEvent &event) | BIAS::OpenGLCanvasBase |
OnSize(wxSizeEvent &event) | BIAS::OpenGLCanvasBase |
OpenGLCanvas(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvas(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvas"), int *attribList=0, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvas |
OpenGLCanvasBase(wxFrame *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
OpenGLCanvasBase(wxFrame *parent, wxGLContext *sharedContext=NULL, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=AsciiToWx("OpenGLCanvasBase"), int *attribList=NULL, const wxPalette &palette=wxNullPalette) | BIAS::OpenGLCanvasBase |
p_font | BIAS::OpenGLCanvasBase | [protected]
p_ownerframe | BIAS::OpenGLCanvasBase | [protected]
p_viewCtrl_ | BIAS::OpenGLCanvas | [protected]
PrintHelp(std::ostream &os) | BIAS::OpenGLCanvasBase | [virtual]
realtimeAnimation | BIAS::OpenGLCanvas | [static]
rendermode | BIAS::OpenGLCanvasBase | [protected]
Reshape() | BIAS::OpenGLCanvas | [virtual]
ScreenShot(BIAS::ImageBase &dest, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot(const std::string &filename, const bool &flipY=true, const GLenum &format=GL_RGB, const bool &force8Bit=false) | BIAS::OpenGLCanvasBase |
ScreenShot() | BIAS::OpenGLCanvasBase |
SetFrameCount(const unsigned long &newVal) | BIAS::OpenGLCanvasBase | [inline]
SetOwnerframe(wxFrame *ptr) | BIAS::OpenGLCanvasBase |
SetStatusText(const wxString &text, const int c_field=0) | BIAS::OpenGLCanvasBase |
SetVSync(const bool &trueForOn) | BIAS::OpenGLCanvasBase | [static]
ShowFPS(const int &framecounter, const float &minUpdateIntervalSec, const unsigned int &minNewFrames, const unsigned int nField) | BIAS::OpenGLCanvasBase |
ShowFPS() | BIAS::OpenGLCanvasBase |
ShowValue(const wxPoint &pos) | BIAS::OpenGLCanvasBase |
StereoI_CaptureStereoImage(const int &format, const int &quality) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetConvergence() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetInfo(std::ostream &os=std::cout) | BIAS::OpenGLCanvasBase | [static]
StereoI_GetSeparation() | BIAS::OpenGLCanvasBase | [static]
StereoI_GetStereoState() | BIAS::OpenGLCanvasBase | [static]
StereoI_Init() | BIAS::OpenGLCanvasBase | [static]
StereoI_SetConvergence(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetSeparation(const float &val) | BIAS::OpenGLCanvasBase | [static]
StereoI_SetStereoState(const int &val) | BIAS::OpenGLCanvasBase | [static]
SwapBuffers() | BIAS::OpenGLCanvasBase |
time | BIAS::OpenGLCanvasBase | [static]
ToggleFullScreen() | BIAS::OpenGLCanvasBase |
ToggleIP(bool &value) | BIAS::OpenGLCanvasBase | [static]
ToggleVSync() | BIAS::OpenGLCanvasBase | [static]
Unproject(const wxPoint &pos2d, double &d) | BIAS::OpenGLCanvasBase |
UpdateTime() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvas() | BIAS::OpenGLCanvas | [virtual]
~OpenGLCanvasBase() | BIAS::OpenGLCanvasBase | [virtual]

Generated on Wed Jun 21 19:06:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyTemplate< T > Member List

This is the complete list of members for MyTemplate< T >, including all inherited members.

Constraints(T *p) | BIAS::DerivedFrom< T, Base > | [inline, static]
DerivedFrom() | BIAS::DerivedFrom< T, Base > | [inline]
MyTemplate() | MyTemplate< T > | [inline]

Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

myTestClass Member List

This is the complete list of members for myTestClass, including all inherited members.

_liDebugLevel | BIAS::Debug | [private]
_zDebugStream | BIAS::Debug | [private, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline, private]
Debug() | BIAS::Debug | [inline, private]
Debug(Debug &deb) | BIAS::Debug | [inline, private]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline, private]
GetDebugLevel() const | BIAS::Debug | [inline, private]
GetDebugStream() | BIAS::Debug | [inline, private]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline, private]
GetGlobalDebugLevel() | BIAS::Debug | [inline, private, static]
GlobalDebugLevel | BIAS::Debug | [private, static]
operator=(const Debug &d) | BIAS::Debug | [inline, private]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline, private]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline, private]
SetDebugLevel(long int lv) | BIAS::Debug | [inline, private]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline, private]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, private, static]
thedata | myTestClass |
XMLAdd(const xmlNodePtr Node, XMLIO &XMLObject) const | BIAS::XMLBase |
XMLGetClassName(string &TopLevelTag, double &Version) const | myTestClass | [virtual]
BIAS::XMLBase::XMLGetClassName(std::string &TopLevelTag, double &Version) const =0 | BIAS::XMLBase | [pure virtual]
XMLIn(const xmlNodePtr Node, XMLIO &XMLObject) | myTestClass | [virtual]
XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const | myTestClass | [virtual]
XMLRead(const std::string &Filename) | BIAS::XMLBase |
XMLReadFromString(const std::string &str) | BIAS::XMLBase |
XMLWrite(const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true) const | BIAS::XMLBase |
XMLWriteToString(std::string &str) const | BIAS::XMLBase |
~Debug() | BIAS::Debug | [inline, private]
~myTestClass() | myTestClass | [virtual]
~XMLBase() | BIAS::XMLBase | [inline, virtual]

Generated on Wed Jun 21 19:06:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

MyUnscentedTransform Member List

This is the complete list of members for MyUnscentedTransform, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Alpha_ | BIAS::UnscentedTransform | [protected]
Beta_ | BIAS::UnscentedTransform | [protected]
ComputeSigmaPoints_(const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const | BIAS::UnscentedTransform | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GlobalDebugLevel | BIAS::Debug | [protected, static]
Kappa_ | BIAS::UnscentedTransform | [protected]
MyUnscentedTransform() | MyUnscentedTransform | [inline]
operator=(const Debug &d) | BIAS::Debug | [inline]
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
SetAlpha(const double alpha) | BIAS::UnscentedTransform | [inline]
SetBeta(const double beta) | BIAS::UnscentedTransform | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
Transform(const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const | BIAS::UnscentedTransform |
Transform_(const Vector< double > &src, Vector< double > &dst) const | MyUnscentedTransform | [inline, protected, virtual]
UnscentedTransform() | BIAS::UnscentedTransform |
~Debug() | BIAS::Debug | [inline]
~MyUnscentedTransform() | MyUnscentedTransform | [inline, virtual]
~UnscentedTransform() | BIAS::UnscentedTransform | [virtual]

Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

NonBase Member List

This is the complete list of members for NonBase, including all inherited members.

NonBase() NonBase [inline]

Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

PlainImageCanvas Member List

This is the complete list of members for PlainImageCanvas, including all inherited members.

_liDebugLevel | BIAS::Debug | [protected]
_zDebugStream | BIAS::Debug | [protected, static]
AddDebugLevel(long int lv) | BIAS::Debug | [inline]
Bitmap_ | BIAS::ImageCanvas | [protected]
ClearDrawingContext_ | BIAS::ImageCanvas | [protected]
Debug() | BIAS::Debug | [inline]
Debug(Debug &deb) | BIAS::Debug | [inline]
DebugLevelIsSet(long int lv) const | BIAS::Debug | [inline]
DefaultZoom_ | BIAS::ImageCanvas | [protected]
GetDebugLevel() const | BIAS::Debug | [inline]
GetDebugStream() | BIAS::Debug | [inline]
GetDebugStream(std::ostream &os) const | BIAS::Debug | [inline]
GetGlobalDebugLevel() | BIAS::Debug | [inline, static]
GetMousePos(int &x, int &y) | BIAS::ImageCanvas |
GetOrigImage() | BIAS::ImageCanvas | [inline]
GetShowScaled() | BIAS::ImageCanvas | [inline]
GlobalDebugLevel | BIAS::Debug | [protected, static]
height_ | BIAS::ImageCanvas | [protected]
ImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(320, 240), long style=wxHSCROLL|wxVSCROLL &wxTRANSPARENT, const wxString &name=wxT("ScrolledWindow")) | BIAS::ImageCanvas |
ImageName_ | BIAS::ImageCanvas | [protected]
mousex_ | BIAS::ImageCanvas | [protected]
mousey_ | BIAS::ImageCanvas | [protected]
MyZoomWin_ | BIAS::ImageCanvas | [protected]
OnErase(wxEraseEvent &event) | BIAS::ImageCanvas | [protected]
OnLeftDown(wxMouseEvent &event) | PlainImageCanvas | [private]
OnMotion(wxMouseEvent &event) | PlainImageCanvas | [private]
OnMouseLeave(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnMouseMove(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnPaint(wxPaintEvent &event) | BIAS::ImageCanvas | [protected]
OnRightDown(wxMouseEvent &event) | PlainImageCanvas | [private]
OnRightMouseButton(wxMouseEvent &event) | BIAS::ImageCanvas | [protected]
OnSize(wxSizeEvent &event) | BIAS::ImageCanvas | [protected]
operator=(const Debug &d) | BIAS::Debug | [inline]
origim_ | BIAS::ImageCanvas | [protected]
origim_mutex_ | BIAS::ImageCanvas | [protected]
PlainImageCanvas(wxWindow *parent, wxStatusBar *sbar=NULL, int sbarid=0) | PlainImageCanvas |
PrintDebugLevel(std::ostream &os=std::cout) const | BIAS::Debug | [inline]
RemoveDebugLevel(long int lv) | BIAS::Debug | [inline]
rgbim_ | BIAS::ImageCanvas | [protected]
SBar_ | BIAS::ImageCanvas | [protected]
SBarID_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeX_ | BIAS::ImageCanvas | [protected]
ScaledImageSizeY_ | BIAS::ImageCanvas | [protected]
SetClearDrawingContext(bool clear) | BIAS::ImageCanvas | [inline]
SetDebugLevel(long int lv) | BIAS::Debug | [inline]
SetDebugStream(std::ostream &os) | BIAS::Debug | [inline]
SetDefaultZoom(unsigned z) | BIAS::ImageCanvas | [inline]
SetGlobalDebugLevel(long int lev) | BIAS::Debug | [inline, static]
SetScaledImageSize(int width, int height) | BIAS::ImageCanvas | [inline]
SetShowScaled(bool on) | BIAS::ImageCanvas | [inline]
SetZoomed(bool s) | BIAS::ImageCanvas | [inline]
Show(BIAS::Image< unsigned char > &im, std::string name) | BIAS::ImageCanvas |
Show(BIAS::ImageBase &origim, BIAS::Image< unsigned char > &scaledrgbim, std::string name) | BIAS::ImageCanvas |
Show(BIAS::PyramidImage< unsigned char > &pim, std::string name) | BIAS::ImageCanvas |
Show(bool show=true) | BIAS::ImageCanvas | [inline, virtual]
ShowScaled_ | BIAS::ImageCanvas | [protected]
Title_ | BIAS::ImageCanvas | [protected]
UpdateStatusBar(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
width_ | BIAS::ImageCanvas | [protected]
wxbitmap_mutex_ | BIAS::ImageCanvas | [protected]
wximage_ | BIAS::ImageCanvas | [protected]
Zoom(unsigned x, unsigned y) | BIAS::ImageCanvas | [protected]
Zoomed_ | BIAS::ImageCanvas | [protected]
~Debug() | BIAS::Debug | [inline]
~ImageCanvas() | BIAS::ImageCanvas |

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TagInfo Member List

This is the complete list of members for TagInfo, including all inherited members.

description | TagInfo
tag | TagInfo

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::const_Region1D< Array1D > Member List

This is the complete list of members for TNT::const_Region1D< Array1D >, including all inherited members.

A_ | TNT::const_Region1D< Array1D > | [protected]
array() const | TNT::const_Region1D< Array1D > | [inline]
const_Region1D(const Array1D &A, Subscript i1, Subscript i2) | TNT::const_Region1D< Array1D > | [inline]
const_Region1D(const Array1D &A, const Index1D &I) | TNT::const_Region1D< Array1D > | [inline]
const_Region1D(const_Region1D< Array1D > &A, Subscript i1, Subscript i2) | TNT::const_Region1D< Array1D > | [inline]
dim() const | TNT::const_Region1D< Array1D > | [inline]
dim(Subscript i) const | TNT::const_Region1D< Array1D > | [inline]
dim_ | TNT::const_Region1D< Array1D > | [protected]
offset() const | TNT::const_Region1D< Array1D > | [inline]
offset(Subscript i) const | TNT::const_Region1D< Array1D > | [inline]
offset_ | TNT::const_Region1D< Array1D > | [protected]
operator()(Subscript i1, Subscript i2) | TNT::const_Region1D< Array1D > | [inline]
operator()(const Index1D &I) | TNT::const_Region1D< Array1D > | [inline]
operator()(Subscript i) const | TNT::const_Region1D< Array1D > | [inline]
T typedef | TNT::const_Region1D< Array1D > | [protected]

Generated on Wed Jun 21 19:13:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::const_Region2D< Array2D > Member List

This is the complete list of members for TNT::const_Region2D< Array2D >, including all inherited members.

A_ | TNT::const_Region2D< Array2D > | [protected]
array() const | TNT::const_Region2D< Array2D > | [inline]
const_iterator typedef | TNT::const_Region2D< Array2D > |
const_reference typedef | TNT::const_Region2D< Array2D > |
const_Region2D(const Array2D &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::const_Region2D< Array2D > | [inline]
const_Region2D(const Array2D &A, const Index1D &I, const Index1D &J) | TNT::const_Region2D< Array2D > | [inline]
const_Region2D(const_Region2D< Array2D > &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::const_Region2D< Array2D > | [inline]
dim(Subscript i) const | TNT::const_Region2D< Array2D > | [inline]
dim_ | TNT::const_Region2D< Array2D > | [protected]
element_type typedef | TNT::const_Region2D< Array2D > |
lbound() const | TNT::const_Region2D< Array2D > | [inline]
num_cols() const | TNT::const_Region2D< Array2D > | [inline]
num_rows() const | TNT::const_Region2D< Array2D > | [inline]
offset(Subscript i) const | TNT::const_Region2D< Array2D > | [inline]
offset_ | TNT::const_Region2D< Array2D > | [protected]
operator()(Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::const_Region2D< Array2D > | [inline]
operator()(const Index1D &I, const Index1D &J) | TNT::const_Region2D< Array2D > | [inline]
operator()(Subscript i, Subscript j) const | TNT::const_Region2D< Array2D > | [inline]
T typedef | TNT::const_Region2D< Array2D > |
value_type typedef | TNT::const_Region2D< Array2D > |

Generated on Wed Jun 21 19:13:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Fortran_Matrix< T > Member List

This is the complete list of members for TNT::Fortran_Matrix< T >, including all inherited members.

begin() | TNT::Fortran_Matrix< T > | [inline]
begin() const | TNT::Fortran_Matrix< T > | [inline]
col_ | TNT::Fortran_Matrix< T > | [protected]
const_iterator typedef | TNT::Fortran_Matrix< T > |
const_reference typedef | TNT::Fortran_Matrix< T > |
copy(const T *v) | TNT::Fortran_Matrix< T > | [inline, protected]
destroy() | TNT::Fortran_Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Fortran_Matrix< T > | [inline]
element_type typedef | TNT::Fortran_Matrix< T > |
end() | TNT::Fortran_Matrix< T > | [inline]
end() const | TNT::Fortran_Matrix< T > | [inline]
Fortran_Matrix() | TNT::Fortran_Matrix< T > | [inline]
Fortran_Matrix(const Fortran_Matrix< T > &A) | TNT::Fortran_Matrix< T > | [inline]
Fortran_Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Fortran_Matrix< T > | [inline]
Fortran_Matrix(Subscript M, Subscript N, const T *v) | TNT::Fortran_Matrix< T > | [inline]
Fortran_Matrix(Subscript M, Subscript N, char *s) | TNT::Fortran_Matrix< T > | [inline]
initialize(Subscript M, Subscript N) | TNT::Fortran_Matrix< T > | [inline, protected]
iterator typedef | TNT::Fortran_Matrix< T > |
lbound() const | TNT::Fortran_Matrix< T > | [inline]
m_ | TNT::Fortran_Matrix< T > | [protected]
n_ | TNT::Fortran_Matrix< T > | [protected]
newsize(Subscript M, Subscript N) | TNT::Fortran_Matrix< T > | [inline]
num_cols() const | TNT::Fortran_Matrix< T > | [inline]
num_rows() const | TNT::Fortran_Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Fortran_Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Fortran_Matrix< T > | [inline]
operator=(const Fortran_Matrix< T > &A) | TNT::Fortran_Matrix< T > | [inline]
operator=(const T &scalar) | TNT::Fortran_Matrix< T > | [inline]
pointer typedef | TNT::Fortran_Matrix< T > |
reference typedef | TNT::Fortran_Matrix< T > |
set(const T &val) | TNT::Fortran_Matrix< T > | [inline, protected]
v_ | TNT::Fortran_Matrix< T > | [protected]
value_type typedef | TNT::Fortran_Matrix< T > |
~Fortran_Matrix() | TNT::Fortran_Matrix< T > | [inline]

Generated on Wed Jun 21 19:13:19 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Fortran_Sparse_Col_Matrix< T > Member List

This is the complete list of members for TNT::Fortran_Sparse_Col_Matrix< T >, including all inherited members.

col_ptr(Subscript i) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
col_ptr(Subscript i) const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
colptr_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
dim(Subscript i) const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
Fortran_Sparse_Col_Matrix(void) | TNT::Fortran_Sparse_Col_Matrix< T > |
Fortran_Sparse_Col_Matrix(const Fortran_Sparse_Col_Matrix< T > &S) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
Fortran_Sparse_Col_Matrix(Subscript M, Subscript N, Subscript nz, const T *val, const Subscript *r, const Subscript *c) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
Fortran_Sparse_Col_Matrix(Subscript M, Subscript N, Subscript nz, char *val, char *r, char *c) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
Fortran_Sparse_Col_Matrix(Subscript M, Subscript N, Subscript nz, const T *val, Subscript *r, Subscript *c) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
lbound() const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
m_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
n_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
newsize(Subscript M, Subscript N, Subscript nz) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
num_cols() const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
num_nonzeros() const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
num_rows() const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
nz_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
operator=(const Fortran_Sparse_Col_Matrix &C) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
row_ind(Subscript i) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
row_ind(Subscript i) const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
rowind_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
val(Subscript i) | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
val(Subscript i) const | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]
val_ | TNT::Fortran_Sparse_Col_Matrix< T > | [protected]
~Fortran_Sparse_Col_Matrix() | TNT::Fortran_Sparse_Col_Matrix< T > | [inline]

Generated on Wed Jun 21 19:13:20 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Fortran_Sparse_Vector< T > Member List

This is the complete list of members for TNT::Fortran_Sparse_Vector< T >, including all inherited members.

const_iterator typedef | TNT::Fortran_Sparse_Vector< T > |
const_reference typedef | TNT::Fortran_Sparse_Vector< T > |
dim() const | TNT::Fortran_Sparse_Vector< T > | [inline]
dim_ | TNT::Fortran_Sparse_Vector< T > | [protected]
element_type typedef | TNT::Fortran_Sparse_Vector< T > |
Fortran_Sparse_Vector() | TNT::Fortran_Sparse_Vector< T > | [inline]
Fortran_Sparse_Vector(Subscript N, Subscript nz) | TNT::Fortran_Sparse_Vector< T > | [inline]
Fortran_Sparse_Vector(Subscript N, Subscript nz, const T *values, const Subscript *indices) | TNT::Fortran_Sparse_Vector< T > | [inline]
Fortran_Sparse_Vector(const Fortran_Sparse_Vector< T > &S) | TNT::Fortran_Sparse_Vector< T > | [inline]
Fortran_Sparse_Vector(Subscript N, Subscript nz, char *v, char *ind) | TNT::Fortran_Sparse_Vector< T > | [inline]
index(Subscript i) | TNT::Fortran_Sparse_Vector< T > | [inline]
index(Subscript i) const | TNT::Fortran_Sparse_Vector< T > | [inline]
index_ | TNT::Fortran_Sparse_Vector< T > | [protected]
iterator typedef | TNT::Fortran_Sparse_Vector< T > |
lbound() const | TNT::Fortran_Sparse_Vector< T > | [inline]
newsize(Subscript N, Subscript nz) | TNT::Fortran_Sparse_Vector< T > | [inline]
num_nonzeros() const | TNT::Fortran_Sparse_Vector< T > | [inline]
operator=(const Fortran_Sparse_Vector< T > &A) | TNT::Fortran_Sparse_Vector< T > | [inline]
pointer typedef | TNT::Fortran_Sparse_Vector< T > |
reference typedef | TNT::Fortran_Sparse_Vector< T > |
size_type typedef | TNT::Fortran_Sparse_Vector< T > |
val(Subscript i) | TNT::Fortran_Sparse_Vector< T > | [inline]
val(Subscript i) const | TNT::Fortran_Sparse_Vector< T > | [inline]
val_ | TNT::Fortran_Sparse_Vector< T > | [protected]
value_type typedef | TNT::Fortran_Sparse_Vector< T > |

Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Index1D Member List

This is the complete list of members for TNT::Index1D, including all inherited members.

Index1D(const Index1D &D) | TNT::Index1D | [inline]
Index1D(Subscript i1, Subscript i2) | TNT::Index1D | [inline]
lbound() const | TNT::Index1D | [inline]
lbound_ | TNT::Index1D | [private]
operator=(const Index1D &D) | TNT::Index1D | [inline]
ubound() const | TNT::Index1D | [inline]
ubound_ | TNT::Index1D | [private]

Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::LowerTriangularView< MaTRiX > Member List

This is the complete list of members for TNT::LowerTriangularView< MaTRiX >, including all inherited members.

A_ | TNT::LowerTriangularView< MaTRiX > | [protected]
const_reference typedef | TNT::LowerTriangularView< MaTRiX > |
dim(Subscript d) const | TNT::LowerTriangularView< MaTRiX > | [inline]
element_type typedef | TNT::LowerTriangularView< MaTRiX > |
get(Subscript i, Subscript j) const | TNT::LowerTriangularView< MaTRiX > | [inline]
lbound() const | TNT::LowerTriangularView< MaTRiX > | [inline]
LowerTriangularView(MaTRiX &A) | TNT::LowerTriangularView< MaTRiX > | [inline]
num_cols() const | TNT::LowerTriangularView< MaTRiX > | [inline]
num_rows() const | TNT::LowerTriangularView< MaTRiX > | [inline]
operator()(Subscript i, Subscript j) const | TNT::LowerTriangularView< MaTRiX > | [inline]
T typedef | TNT::LowerTriangularView< MaTRiX > |
value_type typedef | TNT::LowerTriangularView< MaTRiX > |
zero_ | TNT::LowerTriangularView< MaTRiX > | [protected]

Generated on Wed Jun 21 19:13:21 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Matrix< T > Member List

This is the complete list of members for TNT::Matrix< T >, including all inherited members.

const_iterator typedef | TNT::Matrix< T > |
const_reference typedef | TNT::Matrix< T > |
copy(const T *v) | TNT::Matrix< T > | [inline, protected]
destroy() | TNT::Matrix< T > | [inline, protected]
dim(Subscript d) const | TNT::Matrix< T > | [inline]
element_type typedef | TNT::Matrix< T > |
initialize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline, protected]
iterator typedef | TNT::Matrix< T > |
lbound() const | TNT::Matrix< T > | [inline]
m_ | TNT::Matrix< T > | [protected]
Matrix() | TNT::Matrix< T > | [inline]
Matrix(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
Matrix(Subscript M, Subscript N, const T &value=T()) | TNT::Matrix< T > | [inline]
Matrix(Subscript M, Subscript N, const T *v) | TNT::Matrix< T > | [inline]
Matrix(Subscript M, Subscript N, const std::string &s) | TNT::Matrix< T > | [inline]
mn_ | TNT::Matrix< T > | [protected]
n_ | TNT::Matrix< T > | [protected]
newsize(Subscript M, Subscript N) | TNT::Matrix< T > | [inline]
num_cols() const | TNT::Matrix< T > | [inline]
num_rows() const | TNT::Matrix< T > | [inline]
operator *(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator *(const Matrix< T > &A, const Vector< T > &x) | TNT::Matrix< T > | [related]
operator()(Subscript i) | TNT::Matrix< T > | [inline]
operator()(Subscript i) const | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) | TNT::Matrix< T > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Matrix< T > | [inline]
operator+(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator-(const Matrix< T > &A, const Matrix< T > &B) | TNT::Matrix< T > | [related]
operator<<(std::ostream &s, const Matrix< T > &A) | TNT::Matrix< T > | [related]
operator=(const Matrix< T > &A) | TNT::Matrix< T > | [inline]
operator=(const T &scalar) | TNT::Matrix< T > | [inline]
operator>>(std::istream &s, Matrix< T > &A) | TNT::Matrix< T > | [related]
operator[](Subscript i) | TNT::Matrix< T > | [inline]
operator[](Subscript i) const | TNT::Matrix< T > | [inline]
pointer typedef | TNT::Matrix< T > |
reference typedef | TNT::Matrix< T > |
row_ | TNT::Matrix< T > | [protected]
rowm1_ | TNT::Matrix< T > | [protected]
set(const T &val) | TNT::Matrix< T > | [inline, protected]
size() const | TNT::Matrix< T > | [inline]
size_type typedef | TNT::Matrix< T > |
v_ | TNT::Matrix< T > | [protected]
value_type typedef | TNT::Matrix< T > |
vm1_ | TNT::Matrix< T > | [protected]
~Matrix() | TNT::Matrix< T > | [inline, virtual]

Generated on Wed Jun 21 19:13:23 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Region1D< Array1D > Member List

This is the complete list of members for TNT::Region1D< Array1D >, including all inherited members.

A_ | TNT::Region1D< Array1D > | [protected]
array() const | TNT::Region1D< Array1D > | [inline]
dim() const | TNT::Region1D< Array1D > | [inline]
dim(Subscript i) const | TNT::Region1D< Array1D > | [inline]
dim_ | TNT::Region1D< Array1D > | [protected]
offset() const | TNT::Region1D< Array1D > | [inline]
offset(Subscript i) const | TNT::Region1D< Array1D > | [inline]
offset_ | TNT::Region1D< Array1D > | [protected]
operator()(Subscript i1, Subscript i2) | TNT::Region1D< Array1D > | [inline]
operator()(const Index1D &I) | TNT::Region1D< Array1D > | [inline]
operator()(Subscript i) | TNT::Region1D< Array1D > | [inline]
operator()(Subscript i) const | TNT::Region1D< Array1D > | [inline]
operator=(const Region1D< Array1D > &R) | TNT::Region1D< Array1D > | [inline]
operator=(const const_Region1D< Array1D > &R) | TNT::Region1D< Array1D > | [inline]
operator=(const T &t) | TNT::Region1D< Array1D > | [inline]
operator=(const Array1D &R) | TNT::Region1D< Array1D > | [inline]
Region1D(Array1D &A, Subscript i1, Subscript i2) | TNT::Region1D< Array1D > | [inline]
Region1D(Array1D &A, const Index1D &I) | TNT::Region1D< Array1D > | [inline]
Region1D(Region1D< Array1D > &A, Subscript i1, Subscript i2) | TNT::Region1D< Array1D > | [inline]
T typedef | TNT::Region1D< Array1D > | [protected]

Generated on Wed Jun 21 19:13:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Region2D< Array2D > Member List

This is the complete list of members for TNT::Region2D< Array2D >, including all inherited members.

A_ | TNT::Region2D< Array2D > | [protected]
array() | TNT::Region2D< Array2D > | [inline]
array() const | TNT::Region2D< Array2D > | [inline]
const_iterator typedef | TNT::Region2D< Array2D > |
const_reference typedef | TNT::Region2D< Array2D > |
dim(Subscript i) const | TNT::Region2D< Array2D > | [inline]
dim_ | TNT::Region2D< Array2D > | [protected]
element_type typedef | TNT::Region2D< Array2D > |
iterator typedef | TNT::Region2D< Array2D > |
lbound() const | TNT::Region2D< Array2D > | [inline]
num_cols() const | TNT::Region2D< Array2D > | [inline]
num_rows() const | TNT::Region2D< Array2D > | [inline]
offset(Subscript i) const | TNT::Region2D< Array2D > | [inline]
offset_ | TNT::Region2D< Array2D > | [protected]
operator()(Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::Region2D< Array2D > | [inline]
operator()(const Index1D &I, const Index1D &J) | TNT::Region2D< Array2D > | [inline]
operator()(Subscript i, Subscript j) | TNT::Region2D< Array2D > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Region2D< Array2D > | [inline]
operator=(const Region2D< Array2D > &R) | TNT::Region2D< Array2D > | [inline]
operator=(const const_Region2D< Array2D > &R) | TNT::Region2D< Array2D > | [inline]
operator=(const Array2D &R) | TNT::Region2D< Array2D > | [inline]
operator=(const T &scalar) | TNT::Region2D< Array2D > | [inline]
pointer typedef | TNT::Region2D< Array2D > |
reference typedef | TNT::Region2D< Array2D > |
Region2D(Array2D &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::Region2D< Array2D > | [inline]
Region2D(Array2D &A, const Index1D &I, const Index1D &J) | TNT::Region2D< Array2D > | [inline]
Region2D(Region2D< Array2D > &A, Subscript i1, Subscript i2, Subscript j1, Subscript j2) | TNT::Region2D< Array2D > | [inline]
size_type typedef | TNT::Region2D< Array2D > |
T typedef | TNT::Region2D< Array2D > |
value_type typedef | TNT::Region2D< Array2D > |

Generated on Wed Jun 21 19:13:24 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::stopwatch Member List

This is the complete list of members for TNT::stopwatch, including all inherited members.

last_time | TNT::stopwatch | [protected]
read() | TNT::stopwatch | [inline]
reset() | TNT::stopwatch | [inline]
running | TNT::stopwatch | [protected]
start() | TNT::stopwatch | [inline]
stop() | TNT::stopwatch | [inline]
stopwatch() | TNT::stopwatch | [inline]
total | TNT::stopwatch | [protected]

Generated on Wed Jun 21 19:13:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Transpose_View< Array2D > Member List

This is the complete list of members for TNT::Transpose_View< Array2D >, including all inherited members.

A_ | TNT::Transpose_View< Array2D > | [protected]
array() const | TNT::Transpose_View< Array2D > | [inline]
const_iterator typedef | TNT::Transpose_View< Array2D > |
const_reference typedef | TNT::Transpose_View< Array2D > |
dim(Subscript i) const | TNT::Transpose_View< Array2D > | [inline]
element_type typedef | TNT::Transpose_View< Array2D > |
iterator typedef | TNT::Transpose_View< Array2D > |
lbound() const | TNT::Transpose_View< Array2D > | [inline]
num_cols() const | TNT::Transpose_View< Array2D > | [inline]
num_rows() const | TNT::Transpose_View< Array2D > | [inline]
operator()(Subscript i, Subscript j) const | TNT::Transpose_View< Array2D > | [inline]
pointer typedef | TNT::Transpose_View< Array2D > |
reference typedef | TNT::Transpose_View< Array2D > |
T typedef | TNT::Transpose_View< Array2D > |
Transpose_View(const Transpose_View< Array2D > &A) | TNT::Transpose_View< Array2D > | [inline]
Transpose_View(const Array2D &A) | TNT::Transpose_View< Array2D > | [inline]
value_type typedef | TNT::Transpose_View< Array2D > |

Generated on Wed Jun 21 19:13:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::UnitLowerTriangularView< MaTRiX > Member List

This is the complete list of members for TNT::UnitLowerTriangularView< MaTRiX >, including all inherited members.

A_ | TNT::UnitLowerTriangularView< MaTRiX > | [protected]
const_reference typedef | TNT::UnitLowerTriangularView< MaTRiX > |
dim(Subscript d) const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
element_type typedef | TNT::UnitLowerTriangularView< MaTRiX > |
get(Subscript i, Subscript j) const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
lbound() const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
num_cols() const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
num_rows() const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
one | TNT::UnitLowerTriangularView< MaTRiX > | [protected]
operator()(Subscript i, Subscript j) const | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
T typedef | TNT::UnitLowerTriangularView< MaTRiX > |
UnitLowerTriangularView(MaTRiX &A) | TNT::UnitLowerTriangularView< MaTRiX > | [inline]
value_type typedef | TNT::UnitLowerTriangularView< MaTRiX > |
zero | TNT::UnitLowerTriangularView< MaTRiX > | [protected]

Generated on Wed Jun 21 19:13:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::UnitUpperTriangularView< MaTRiX > Member List

This is the complete list of members for TNT::UnitUpperTriangularView< MaTRiX >, including all inherited members.

A_ | TNT::UnitUpperTriangularView< MaTRiX > | [protected]
const_reference typedef | TNT::UnitUpperTriangularView< MaTRiX > |
dim(Subscript d) const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
element_type typedef | TNT::UnitUpperTriangularView< MaTRiX > |
get(Subscript i, Subscript j) const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
lbound() const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
num_cols() const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
num_rows() const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
one | TNT::UnitUpperTriangularView< MaTRiX > | [protected]
operator()(Subscript i, Subscript j) const | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
T typedef | TNT::UnitUpperTriangularView< MaTRiX > |
UnitUpperTriangularView(MaTRiX &A) | TNT::UnitUpperTriangularView< MaTRiX > | [inline]
value_type typedef | TNT::UnitUpperTriangularView< MaTRiX > |
zero | TNT::UnitUpperTriangularView< MaTRiX > | [protected]

Generated on Wed Jun 21 19:13:26 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::UpperTriangularView< MaTRiX > Member List

This is the complete list of members for TNT::UpperTriangularView< MaTRiX >, including all inherited members.

A_ | TNT::UpperTriangularView< MaTRiX > | [protected]
const_reference typedef | TNT::UpperTriangularView< MaTRiX > |
dim(Subscript d) const | TNT::UpperTriangularView< MaTRiX > | [inline]
element_type typedef | TNT::UpperTriangularView< MaTRiX > |
get(Subscript i, Subscript j) const | TNT::UpperTriangularView< MaTRiX > | [inline]
lbound() const | TNT::UpperTriangularView< MaTRiX > | [inline]
num_cols() const | TNT::UpperTriangularView< MaTRiX > | [inline]
num_rows() const | TNT::UpperTriangularView< MaTRiX > | [inline]
operator()(Subscript i, Subscript j) const | TNT::UpperTriangularView< MaTRiX > | [inline]
T typedef | TNT::UpperTriangularView< MaTRiX > |
UpperTriangularView(MaTRiX &A) | TNT::UpperTriangularView< MaTRiX > | [inline]
value_type typedef | TNT::UpperTriangularView< MaTRiX > |
zero_ | TNT::UpperTriangularView< MaTRiX > | [protected]

Generated on Wed Jun 21 19:13:27 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Vector< T > Member List

This is the complete list of members for TNT::Vector< T >, including all inherited members.

begin() | TNT::Vector< T > | [inline]
begin() const | TNT::Vector< T > | [inline]
const_iterator typedef | TNT::Vector< T > |
const_reference typedef | TNT::Vector< T > |
copy(const T *v) | TNT::Vector< T > | [inline, protected]
destroy() | TNT::Vector< T > | [inline, protected]
dim() const | TNT::Vector< T > | [inline]
element_type typedef | TNT::Vector< T > |
end() | TNT::Vector< T > | [inline]
end() const | TNT::Vector< T > | [inline]
initialize(Subscript N) | TNT::Vector< T > | [inline, protected]
iterator typedef | TNT::Vector< T > |
lbound() const | TNT::Vector< T > | [inline]
n_ | TNT::Vector< T > | [protected]
newsize(Subscript N) | TNT::Vector< T > | [inline]
operator()(Subscript i) | TNT::Vector< T > | [inline]
operator()(Subscript i) const | TNT::Vector< T > | [inline]
operator=(const Vector< T > &A) | TNT::Vector< T > | [inline]
operator=(const T &scalar) | TNT::Vector< T > | [inline]
operator[](Subscript i) | TNT::Vector< T > | [inline]
operator[](Subscript i) const | TNT::Vector< T > | [inline]
pointer typedef | TNT::Vector< T > |
reference typedef | TNT::Vector< T > |
set(const T &val) | TNT::Vector< T > | [inline, protected]
size() const | TNT::Vector< T > | [inline]
size_type typedef | TNT::Vector< T > |
v_ | TNT::Vector< T > | [protected]
value_type typedef | TNT::Vector< T > |
Vector() | TNT::Vector< T > | [inline]
Vector(const Vector< T > &A) | TNT::Vector< T > | [inline]
Vector(Subscript N, const T &value=T()) | TNT::Vector< T > | [inline]
Vector(Subscript N, const T *v) | TNT::Vector< T > | [inline]
Vector(const Subscript N, const std::string &s) | TNT::Vector< T > | [inline]
vm1_ | TNT::Vector< T > | [protected]
~Vector() | TNT::Vector< T > | [inline]

Generated on Wed Jun 21 19:13:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TNT::Vector_Adaptor< BBVec > Member List

This is the complete list of members for TNT::Vector_Adaptor< BBVec >, including all inherited members.

const_iterator typedef | TNT::Vector_Adaptor< BBVec > |
const_reference typedef | TNT::Vector_Adaptor< BBVec > |
dim() const | TNT::Vector_Adaptor< BBVec > | [inline]
dim(Subscript i) | TNT::Vector_Adaptor< BBVec > | [inline]
element_type typedef | TNT::Vector_Adaptor< BBVec > |
free() | TNT::Vector_Adaptor< BBVec > | [inline]
getVector() | TNT::Vector_Adaptor< BBVec > | [inline]
iterator typedef | TNT::Vector_Adaptor< BBVec > |
lbound() const | TNT::Vector_Adaptor< BBVec > | [inline]
newsize(Subscript N) | TNT::Vector_Adaptor< BBVec > | [inline]
operator()(Subscript i) | TNT::Vector_Adaptor< BBVec > | [inline]
operator()(Subscript i) const | TNT::Vector_Adaptor< BBVec > | [inline]
operator=(const Vector_Adaptor< BBVec > &A) | TNT::Vector_Adaptor< BBVec > | [inline]
operator=(const T &a) | TNT::Vector_Adaptor< BBVec > | [inline]
operator[](Subscript i) | TNT::Vector_Adaptor< BBVec > | [inline]
operator[](Subscript i) const | TNT::Vector_Adaptor< BBVec > | [inline]
pointer typedef | TNT::Vector_Adaptor< BBVec > |
reference typedef | TNT::Vector_Adaptor< BBVec > |
resize(Subscript N) | TNT::Vector_Adaptor< BBVec > | [inline]
size() const | TNT::Vector_Adaptor< BBVec > | [inline]
T typedef | TNT::Vector_Adaptor< BBVec > |
v_ | TNT::Vector_Adaptor< BBVec > | [protected]
value_type typedef | TNT::Vector_Adaptor< BBVec > |
Vector_Adaptor() | TNT::Vector_Adaptor< BBVec > | [inline]
Vector_Adaptor(const Vector_Adaptor< BBVec > &A) | TNT::Vector_Adaptor< BBVec > | [inline]
Vector_Adaptor(Subscript N, char *s) | TNT::Vector_Adaptor< BBVec > | [inline]
Vector_Adaptor(Subscript N, const T &value=T()) | TNT::Vector_Adaptor< BBVec > | [inline]
Vector_Adaptor(Subscript N, const T *values) | TNT::Vector_Adaptor< BBVec > | [inline]
Vector_Adaptor(const BBVec &A) | TNT::Vector_Adaptor< BBVec > | [inline]
vm1_ | TNT::Vector_Adaptor< BBVec > | [protected]

Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

xvimage Member List

This is the complete list of members for xvimage, including all inherited members.

col_size | xvimage
color_space_model | xvimage
comment | xvimage
data_encode_scheme | xvimage
data_storage_type | xvimage
file_type | xvimage
fspare1 | xvimage
fspare2 | xvimage
identifier | xvimage
imagedata | xvimage
ispare1 | xvimage
ispare2 | xvimage
location | xvimage
location_dim | xvimage
location_type | xvimage
machine_dep | xvimage
map_col_size | xvimage
map_enable | xvimage
map_row_size | xvimage
map_scheme | xvimage
map_storage_type | xvimage
map_subrow_size | xvimage
maps | xvimage
maps_per_cycle | xvimage
num_data_bands | xvimage
num_of_images | xvimage
pixsizx | xvimage
pixsizy | xvimage
release | xvimage
reserve | xvimage
row_size | xvimage
startx | xvimage
starty | xvimage
subrow_size | xvimage
trash | xvimage
version | xvimage

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/clientExample.cpp Source File

NetworkComm » Examples

clientExample.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "../CScommClient.hh"
00026
00027
00028 #  include <Base/Common/W32Compat.hh>
00029 #ifdef WIN32
00030 #  include <windows.h>
00031 #endif
00032
00033 using namespace std;
00034 int main (int argc, char* argv[])
00035 {
00036   if (argc<2) {
00037     cout<<"usage:"<<argv[0]<<" serverName"<<endl;
00038     exit(0);
00039   }
00040
00041   BIAS::CScommClient client(true);
00042
00043   // if u dont give a name the hostname is taken
00044   client.SetName(string("exampleClient"));
00045
00046   client.SetVerbose(true); // to get some msgs
00047   client.SetLog(true); // to get all messages
00048   //  client.SetDebugLevel(D_CS_ANALYZE);
00049
00050   string msg="RPOSHEAD";
00051   // register a msg which will be accepted from the server
00052   client.RegisterMsg(msg, BIAS::CS_FLOAT, 2);
00053   client.RegisterMsg("BINDATA",BIAS::CS_BINARY);
00054
00055   // now connect the server
00056   cout<<"Connection returned:"<<
00057     client.ConnectServer(string(argv[1]))<<endl;
00058
00059   // send a msg, this kind of MSG has to be registered at the server side
00060   vector<float> floats;
00061   floats.push_back(0.1f);
00062   floats.push_back(0.2f);
00063   //  floats.push_back(0.3);
00064
00065   vector<int> ints;
00066   ints.push_back(-123);
00067   client.SendMsg(msg,ints);
00068
00069   floats.push_back(0.4f);
00070   // this is a invalid msg now, because 4 floats are send,
00071   // while only 3 are registered for this msg
00072   //client.SendMsg(msg,floats);
00073   std::vector<char> binData;
00074   floats.resize(1); // and valid again
00075   bool endlessLoop=true;
00076   while (endlessLoop)
00077   {
00078     sleep(1);
00079     client.SendMsg(msg,ints);
00080     if (client.GetData(msg, floats)==0) {
00081       cout<<"New Data from server:"<<endl;
00082       for (unsigned int i=0;i<floats.size();i++)
00083         cout<<floats[i]<<" ";
00084       cout<<endl;
00085     }
00086     if (client.GetData("BINDATA", binData)==0) {
00087       cout<<"New binary Data from server:"<<endl;
00088       for (unsigned int i=0;i<binData.size();i++)
00089         cout<<binData[i];
00090       cout<<endl;
00091     }
00092   }
00093 }
00094
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/cmat.h Source File

Base » Math » tnt

cmat.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // C compatible matrix: row-oriented, 0-based [i][j] and 1-based (i,j) indexing
00035 //
00036
00037 #ifndef CMAT_H
00038 #define CMAT_H
00039
00040 #include "subscript.h"
00041 #include "vec.h"
00042 #include <cstdlib>
00043 #include <cassert>
00044 #include <iostream>
00045 #include <iomanip>
00046 #include <sstream>
00047 #include <string>
00048 #ifdef TNT_USE_REGIONS
00049 #include "region2d.h"
00050 #endif
00051
00052 namespace TNT
00053 {
00054
00055 template <class T>
00056 class Matrix
00057 {
00058
00059
00060   public:
00061
00062     typedef Subscript   size_type;
00063     typedef         T   value_type;
00064     typedef         T   element_type;
00065     typedef         T*  pointer;
00066     typedef         T*  iterator;
00067     typedef         T&  reference;
00068     typedef const   T*  const_iterator;
00069     typedef const   T&  const_reference;
00070
00071     Subscript lbound() const { return 1;}
00072
00073   protected:
00074     Subscript m_;
00075     Subscript n_;
00076     Subscript mn_;      // total size
00077     T* v_;
00078     T** row_;
00079     T* vm1_ ;       // these point to the same data, but are 1-based
00080     T** rowm1_;
00081
00082     // internal helper function to create the array
00083     // of row pointers
00084
00085     void initialize(Subscript M, Subscript N)
00086     {
00087         mn_ = M*N;
00088         m_ = M;
00089         n_ = N;
00090
00091         v_ = new T[mn_];
00092         row_ = new T*[M];
00093         rowm1_ = new T*[M];
00094
00095         assert(v_  != NULL);
00096         assert(row_  != NULL);
00097         assert(rowm1_ != NULL);
00098
00099         T* p = v_;
00100         vm1_ = v_ - 1;
00101         for (Subscript i=0; i<M; i++)
00102         {
00103             row_[i] = p;
00104             rowm1_[i] = p-1;
00105             p += N ;
00106
00107         }
00108
00109         rowm1_ -- ;     // compensate for 1-based offset
00110     }
00111
00112     void copy(const T*  v)
00113     {
00114         Subscript N = m_ * n_;
00115         /* Subscript i;
00116
00117           #ifdef TNT_UNROLL_LOOPS
00118           Subscript Nmod4 = N & 3;
00119           Subscript N4 = N - Nmod4;
00120
00121           for (i=0; i<N4; i+=4)
00122           {
00123           v_[i] = v[i];
00124           v_[i+1] = v[i+1];
00125           v_[i+2] = v[i+2];
00126           v_[i+3] = v[i+3];
00127           }
00128
00129           for (i=N4; i< N; i++)
00130           v_[i] = v[i];
00131           #else
00132
00133           for (i=0; i< N; i++)
00134           v_[i] = v[i];
00135           #endif
00136         */
00137         memcpy((void*) v_, (void*) v, sizeof(T)*N);
00138     }
00139
00140     void set(const T& val)
00141     {
00142         Subscript N = m_ * n_;
00143         Subscript i;
00144
00145 #ifdef TNT_UNROLL_LOOPS
00146         Subscript Nmod4 = N & 3;
00147         Subscript N4 = N - Nmod4;
00148
00149         for (i=0; i<N4; i+=4)
00150         {
00151             v_[i] = val;
00152             v_[i+1] = val;
00153             v_[i+2] = val;
00154             v_[i+3] = val;
00155         }
00156
00157         for (i=N4; i< N; i++)
00158             v_[i] = val;
00159 #else
00160
00161         for (i=0; i< N; i++)
00162             v_[i] = val;
00163
00164 #endif
00165     }
00166
00167
00168
00169     void destroy()
00170     {
00171         /* do nothing, if no memory has been previously allocated */
00172         if (v_ == NULL) return ;
00173
00174         /* if we are here, then matrix was previously allocated */
00175         if (v_ != NULL) { delete [] (v_); v_ = NULL; }
00176         if (row_ != NULL) { delete [] (row_); row_ = NULL; }
00177
00178         /* return rowm1_ back to original value */
00179         rowm1_ ++;
00180         if (rowm1_ != NULL ) { delete [] (rowm1_); rowm1_ = NULL; }
00181     }
00182
00183
00184   public:
00185
00186     // Autocast operator causes collision with [] operator in WIN32,
00187     // because subscription M[] is also possible via cast and
00188     // [] operator on resulting array (streckel)
00189     //operator T**(){ return  row_; }
00190     //operator T**() const { return row_; }
00191
00192
00193     Subscript size() const { return mn_; }
00194
00195     // constructors
00196
00197     Matrix() : m_(0), n_(0), mn_(0), v_(NULL), row_(NULL), vm1_(NULL), rowm1_(NULL) {};
00198
00199
00200     Matrix(const Matrix<T> &A)
00201     {
00202         initialize(A.m_, A.n_);
00203         copy(A.v_);
00204     }
00205
00206     Matrix(Subscript M, Subscript N, const T& value = T())
00207     {
00208         initialize(M,N);
00209         set(value);
00210     }
00211
00212     Matrix(Subscript M, Subscript N, const T* v)
00213     {
00214         initialize(M,N);
00215         copy(v);
00216     }
00217
00218     //Matrix(Subscript M, Subscript N, const char *s)
00219     //{
00220     //    initialize(M,N);
00221     //    std::istringstream ins(s);
00222     //    Subscript i, j;
00223     //    for (i=0; i<M; i++)
00224     //        for (j=0; j<N; j++)
00225     //            ins >> row_[i][j];
00226     //}
00227
00228     /// replacement for above JW
00229     Matrix(Subscript M, Subscript N, const std::string & s)
00230     {
00231         initialize(M,N);
00232         std::istringstream ins(s);
00233         Subscript i, j;
00234         for (i=0; i<M; i++)
00235             for (j=0; j<N; j++)
00236                 ins >> row_[i][j];
00237     }
00238
00239
00240     // destructor
00241     //
00242     virtual ~Matrix()
00243     {
00244         destroy();
00245     }
00246
00247
00248     // reallocating
00249     //
00250     Matrix<T>& newsize(Subscript M, Subscript N)
00251     {
00252         if (num_rows() == M && num_cols() == N)
00253             return *this;
00254
00255         destroy();
00256         initialize(M,N);
00257
00258         return *this;
00259     }
00260
00261
00262
00263
00264     // assignments
00265     //
00266     Matrix<T>& operator=(const Matrix<T> &A)
00267     {
00268         if (v_ == A.v_)
00269             return *this;
00270
00271         if (m_ == A.m_  && n_ == A.n_)      // no need to re-alloc
00272             copy(A.v_);
00273
00274         else
00275         {
00276             destroy();
00277             initialize(A.m_, A.n_);
00278             copy(A.v_);
00279         }
00280
00281         return *this;
00282     }
00283
00284     Matrix<T>& operator=(const T& scalar)
00285     {
00286         set(scalar);
00287         return *this;
00288     }
00289
00290
00291     Subscript dim(Subscript d) const
00292     {
00293 #ifdef TNT_BOUNDS_CHECK
00294        assert( d >= 1);
00295         assert( d <= 2);
00296 #endif
00297         return (d==1) ? m_ : ((d==2) ? n_ : 0);
00298     }
00299
00300     Subscript num_rows() const { return m_; }
00301     Subscript num_cols() const { return n_; }
00302
00303
00304
00305
00306     inline T* operator[](Subscript i)
00307     {
00308 #ifdef TNT_BOUNDS_CHECK
00309         assert(0<=i);
00310         assert(i < m_) ;
00311 #endif
00312         return row_[i];
00313     }
00314
00315     inline const T* operator[](Subscript i) const
00316     {
00317 #ifdef TNT_BOUNDS_CHECK
00318         assert(0<=i);
00319         assert(i < m_) ;
00320 #endif
00321         return row_[i];
00322     }
00323
00324     inline reference operator()(Subscript i)
00325     {
00326 #ifdef TNT_BOUNDS_CHECK
00327         assert(1<=i);
00328         assert(i <= mn_) ;
00329 #endif
00330         return vm1_[i];
00331     }
00332
00333     inline const_reference operator()(Subscript i) const
00334     {
00335 #ifdef TNT_BOUNDS_CHECK
00336         assert(1<=i);
00337         assert(i <= mn_) ;
00338 #endif
00339         return vm1_[i];
00340     }
00341
00342
00343
00344     inline reference operator()(Subscript i, Subscript j)
00345     {
00346 #ifdef TNT_BOUNDS_CHECK
00347         assert(1<=i);
00348         assert(i <= m_) ;
00349         assert(1<=j);
00350         assert(j <= n_);
00351 #endif
00352         return  rowm1_[i][j];
00353     }
00354
00355
00356
00357     inline const_reference operator() (Subscript i, Subscript j) const
00358     {
00359 #ifdef TNT_BOUNDS_CHECK
00360         assert(1<=i);
00361         assert(i <= m_) ;
00362         assert(1<=j);
00363         assert(j <= n_);
00364 #endif
00365         return rowm1_[i][j];
00366     }
00367
00368
00369
00370 #ifdef TNT_USE_REGIONS
00371
00372     typedef Region2D<Matrix<T> > Region;
00373
00374
00375     Region operator()(const Index1D &I, const Index1D &J)
00376     {
00377         return Region(*this, I,J);
00378     }
00379
00380
00381     typedef const_Region2D< Matrix<T> > const_Region;
00382     const_Region operator()(const Index1D &I, const Index1D &J) const
00383     {
00384         return const_Region(*this, I,J);
00385     }
00386
00387 #endif
00388
00389
00390 };
00391
00392
00393 /* ***************************  I/O  ********************************/
00394
00395 /** @relates Matrix
00396  */
00397 template <class T>
00398 std::ostream& operator<<(std::ostream &s, const Matrix<T> &A)
00399 {
00400     Subscript M=A.num_rows();
00401     Subscript N=A.num_cols();
00402
00403     s << M << " " << N << "\n";
00404     //    s.setf(std::ios_base::left,std::ios_base::adjustfield);
00405     for (Subscript i=0; i<M; i++)
00406     {
00407         for (Subscript j=0; j<N; j++)
00408         {
00409             s <<std::setprecision(10) <<std::setw(18)<< A[i][j] << " ";
00410         }
00411         s << "\n";
00412     }
00413
00414     return s;
00415 }
00416
00417 /** @relates Matrix
00418  */
00419 template <class T>
00420 std::istream& operator>>(std::istream &s, Matrix<T> &A)
00421 {
00422     Subscript M, N;
00423
00424     s >> M >> N;
00425
00426     if (M<0 || N<0) {
00427       s.setstate(std::ios::badbit | std::ios::failbit);
00428       return s;
00429     }
00430
00431     if ( !(M == A.num_rows() && N == A.num_cols() ))
00432     {
00433         A.newsize(M,N);
00434     }
00435
00436
00437     for (Subscript i=0; i<M; i++)
00438         for (Subscript j=0; j<N; j++)
00439         {
00440             s >>  A[i][j];
00441         }
00442
00443     return s;
00444 }
00445
00446 // *******************[ basic matrix algorithms ]***************************
00447
00448 /** @relates Matrix
00449  */
00450 template <class T>
00451 Matrix<T> operator+(const Matrix<T> &A,
00452     const Matrix<T> &B)
00453 {
00454     Subscript M = A.num_rows();
00455     Subscript N = A.num_cols();
00456
00457     assert(M==B.num_rows());
00458     assert(N==B.num_cols());
00459
00460     Matrix<T> tmp(M,N);
00461     Subscript i,j;
00462
00463     for (i=0; i<M; i++)
00464         for (j=0; j<N; j++)
00465             tmp[i][j] = A[i][j] + B[i][j];
00466
00467     return tmp;
00468 }
00469
00470 /** @relates Matrix
00471  */
00472 template <class T>
00473 Matrix<T> operator-(const Matrix<T> &A,
00474     const Matrix<T> &B)
00475 {
00476     Subscript M = A.num_rows();
00477     Subscript N = A.num_cols();
00478
00479     assert(M==B.num_rows());
00480     assert(N==B.num_cols());
00481
00482     Matrix<T> tmp(M,N);
00483     Subscript i,j;
00484
00485     for (i=0; i<M; i++)
00486         for (j=0; j<N; j++)
00487             tmp[i][j] = A[i][j] - B[i][j];
00488
00489     return tmp;
00490 }
00491
00492 template <class T>
00493 Matrix<T> mult_element(const Matrix<T> &A,
00494     const Matrix<T> &B)
00495 {
00496     Subscript M = A.num_rows();
00497     Subscript N = A.num_cols();
00498
00499     assert(M==B.num_rows());
00500     assert(N==B.num_cols());
00501
00502     Matrix<T> tmp(M,N);
00503     Subscript i,j;
00504
00505     for (i=0; i<M; i++)
00506         for (j=0; j<N; j++)
00507             tmp[i][j] = A[i][j] * B[i][j];
00508
00509     return tmp;
00510 }
00511
00512
00513 template <class T>
00514 Matrix<T> transpose(const Matrix<T> &A)
00515 {
00516     Subscript M = A.num_rows();
00517     Subscript N = A.num_cols();
00518
00519     Matrix<T> S(N,M);
00520     Subscript i, j;
00521
00522     for (i=0; i<M; i++)
00523         for (j=0; j<N; j++)
00524             S[j][i] = A[i][j];
00525
00526     return S;
00527 }
00528
00529
00530
00531 template <class T>
00532 inline Matrix<T> matmult(const Matrix<T>  &A,
00533     const Matrix<T> &B)
00534 {
00535
00536 #ifdef TNT_BOUNDS_CHECK
00537     assert(A.num_cols() == B.num_rows());
00538 #endif
00539
00540     Subscript M = A.num_rows();
00541     Subscript N = A.num_cols();
00542     Subscript K = B.num_cols();
00543
00544     Matrix<T> tmp(M,K);
00545     T sum;
00546
00547     for (Subscript i=0; i<M; i++)
00548     for (Subscript k=0; k<K; k++)
00549     {
00550         sum = 0;
00551         for (Subscript j=0; j<N; j++)
00552             sum = sum +  A[i][j] * B[j][k];
00553
00554         tmp[i][k] = sum;
00555     }
00556
00557     return tmp;
00558 }
00559
00560 /** @relates Matrix
00561  */
00562 template <class T>
00563 inline Matrix<T> operator*(const Matrix<T>  &A,
00564     const Matrix<T> &B)
00565 {
00566     return matmult(A,B);
00567 }
00568
00569 template <class T>
00570 inline int matmult(Matrix<T>& C, const Matrix<T>  &A,
00571     const Matrix<T> &B)
00572 {
00573
00574     assert(A.num_cols() == B.num_rows());
00575
00576     Subscript M = A.num_rows();
00577     Subscript N = A.num_cols();
00578     Subscript K = B.num_cols();
00579
00580     C.newsize(M,K);
00581
00582     T sum;
00583
00584     const T* row_i;
00585     const T* col_k;
00586
00587     for (Subscript i=0; i<M; i++)
00588     for (Subscript k=0; k<K; k++)
00589     {
00590         row_i  = &(A[i][0]);
00591         col_k  = &(B[0][k]);
00592         sum = 0;
00593         for (Subscript j=0; j<N; j++)
00594         {
00595             sum  += *row_i * *col_k;
00596             row_i++;
00597             col_k += K;
00598         }
00599         C[i][k] = sum;
00600     }
00601
00602     return 0;
00603 }
00604
00605
00606 template <class T>
00607 Vector<T> matmult(const Matrix<T>  &A, const Vector<T> &x)
00608 {
00609
00610 #ifdef TNT_BOUNDS_CHECK
00611     assert(A.num_cols() == x.dim());
00612 #endif
00613
00614     Subscript M = A.num_rows();
00615     Subscript N = A.num_cols();
00616
00617     Vector<T> tmp(M);
00618     T sum;
00619
00620     for (Subscript i=0; i<M; i++)
00621     {
00622         sum = 0;
00623         const T* rowi = A[i];
00624         for (Subscript j=0; j<N; j++)
00625             sum = sum +  rowi[j] * x[j];
00626
00627         tmp[i] = sum;
00628     }
00629
00630     return tmp;
00631 }
00632
00633 /** @relates Matrix
00634  */
00635 template <class T>
00636 inline Vector<T> operator*(const Matrix<T>  &A, const Vector<T> &x)
00637 {
00638     return matmult(A,x);
00639 }
00640
00641 } // namespace TNT
00642
00643 #endif
00644 // CMAT_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ColorHarris.cpp Source File

FeatureDetector

ColorHarris.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Linköping
00009   sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026   //Warning this is a working version of the file not final API
00027
00028   //measure the time for the different steps in the algorithm
00029   //#define use_timers
00030
00031 #ifdef __SSE__
00032 #include <xmmintrin.h>
00033 #endif
00034
00035 #include <Base/Image/ImageIO.hh>
00036 #include "ColorHarris.hh"
00037 #include "Gauss.hh"
00038 #include "GaussDeriv.hh"
00039 #include <Base/Image/ImageConvert.hh>
00040
00041 using namespace BIAS;
00042 using namespace std;
00043
00044 #ifdef __SSE__
00045 //needed because a=_mm_add_epi32(a,b) gives terrible code g++ 3.3.3-7 (redhat)
00046 #define fastsum_epi32(sum,add)  \
00047 asm("paddd %2,%0" \
00048     :"=x" (sum) \
00049     :"0" (sum),"x"(add))
00050
00051 //needed because a=_mm_add_epi16(a,b) gives terrible code g++ 3.3.3-7 (redhat)
00052 #define fastsum_epi16(sum,add)  \
00053 asm("paddw %2,%0" \
00054     :"=x" (sum) \
00055     :"0" (sum),"x"(add))
00056
00057 #endif
00058
00059 static int mytoplanar(const Image<unsigned char> &src,Image<unsigned char> &dst)
00060 {
00061   //from imageconvert::ToPlanarrgb_
00062   BIASASSERT(src.IsInterleaved());
00063   BIASASSERT(src.GetChannelCount()==3);
00064
00065   if(!dst.SamePixelAndChannelCount(src))
00066     {
00067       dst.Release();
00068       dst.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),ImageBase::ST_unsignedchar,false);
00069       dst.SetColorModel(ImageBase::CM_RGB);
00070     }
00071
00072   int pixelcnt=src.GetPixelCount();
00073
00074   unsigned char *red=dst.GetImageData();
00075   unsigned char *green=red+pixelcnt;
00076   unsigned char *blue=green+pixelcnt;
00077   unsigned char *imagedata=src.GetImageData();
00078   unsigned char *imagedatastop=imagedata+3*pixelcnt;
00079
00080   while(imagedata<imagedatastop)
00081     {
00082       *red++=*imagedata++;
00083       *green++=*imagedata++;
00084       *blue++=*imagedata++;
00085     }
00086   return 0;
00087 }
00088
00089 //special functions needed as long the the convolution interface is not fully specified
00090 static int mysobel(const Image<unsigned char> &src,Image<signed char> &gradWE,
00091            Image<signed char> &gradNS)
00092 {
00093   BIASASSERT(src.IsInterleaved());
00094   unsigned char **im=src.GetImageDataArray();
00095   signed char **gx=gradWE.GetImageDataArray();
00096   signed char **gy=gradNS.GetImageDataArray();
00097   const int width=(int)src.GetWidth();
00098   const int height=(int)src.GetHeight();
00099   const int cc=src.GetChannelCount();
00100
00101   unsigned minx, miny, maxx, maxy;
00102   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00103   gradWE.SetROI(minx+1, miny+1, maxx-1, maxy-1);
00104   gradNS.SetROI(minx+1, miny+1, maxx-1, maxy-1);
00105
00106 #ifndef __SSE__
00107   for(int img_y=miny+1;img_y<maxy-1;img_y++)
00108     for(int img_x=minx+1;img_x<maxx-1;img_x++)
00109       {
00110     int sumx=0;
00111     int sumy=0;
00112     for(int cloop=0;cloop<cc;cloop++)
00113       {
00114         //sobelx=[1 0-1;2 0 -2;1 0 -1]
00115         sumx=src.PixelValueInterleaved(img_x+1,img_y-1,cloop)-src.PixelValueInterleaved(img_x-1,img_y-1,cloop);
00116         sumx+=2*(src.PixelValueInterleaved(img_x+1,img_y,cloop)-src.PixelValueInterleaved(img_x-1,img_y,cloop));
00117         sumx+=src.PixelValueInterleaved(img_x+1,img_y+1,cloop)-src.PixelValueInterleaved(img_x-1,img_y+1,cloop);
00118         gx[img_y][img_x*cc+cloop]=(sumx>>3);
00119
00120         //sobely=[1 2 1;0 0 0;-1 -2 -1]
00121
00122         sumy=src.PixelValueInterleaved(img_x-1,img_y+1,cloop)+2*src.PixelValueInterleaved(img_x,img_y+1,cloop)
00123           +src.PixelValueInterleaved(img_x+1,img_y+1,cloop);
00124         sumy-=src.PixelValueInterleaved(img_x-1,img_y-1,cloop)+2*src.PixelValueInterleaved(img_x,img_y-1,cloop)
00125           +src.PixelValueInterleaved(img_x+1,img_y-1,cloop);
00126         gy[img_y][img_x*cc+cloop]=(sumy>>3);
00127       }
00128       }
00129 #endif
00130 //   ImageIO::Write("gradnsold.mip",gradNS);
00131 //   ImageIO::Write("gradweold.mip",gradWE);
00132
00133 #ifdef __SSE__
00134   for(int img_y=miny+1;img_y<maxy-1;img_y++)
00135     for(int img_x=minx+1;img_x<(maxx-1)*cc-16;img_x+=10)
00136 //     for(int img_x=minx+1;img_x<maxx-1;img_x++)
00137       {
00138     //gradx
00139     unsigned char **srcida=src.GetImageDataArray();
00140     signed char **dstida=gradWE.GetImageDataArray();
00141     unsigned char *row1=srcida[img_y-1];
00142     unsigned char *row2=srcida[img_y];
00143     unsigned char *row3=srcida[img_y+1];
00144
00145     __m128i inl1,inl2,inl3,zero;
00146     __m128i suml,sumh;
00147     __m128i up1,up2;
00148
00149     zero=_mm_setzero_si128();
00150     suml=_mm_setzero_si128();
00151     sumh=_mm_setzero_si128();
00152
00153     row1+=img_x-3;
00154     row2+=img_x-3;
00155     row3+=img_x-3;
00156
00157     //load line 1-3
00158     inl1=_mm_loadu_si128((__m128i*)&row1[0]);
00159     inl2=_mm_loadu_si128((__m128i*)&row2[0]);
00160     inl3=_mm_loadu_si128((__m128i*)&row3[0]);
00161
00162     //sub 1,1
00163     up1=_mm_unpacklo_epi8(inl1,zero);
00164     up2=_mm_unpackhi_epi8(inl1,zero);
00165     suml=_mm_sub_epi16(suml,up1);
00166     sumh=_mm_sub_epi16(sumh,up2);
00167
00168     //sub 1,2 *2
00169     up1=_mm_unpacklo_epi8(inl2,zero);
00170     up2=_mm_unpackhi_epi8(inl2,zero);
00171     up1=_mm_slli_epi16(up1,1);
00172     up2=_mm_slli_epi16(up2,1);
00173     suml=_mm_sub_epi16(suml,up1);
00174     sumh=_mm_sub_epi16(sumh,up2);
00175
00176     //sub 1,3
00177     up1=_mm_unpacklo_epi8(inl3,zero);
00178     up2=_mm_unpackhi_epi8(inl3,zero);
00179     suml=_mm_sub_epi16(suml,up1);
00180     sumh=_mm_sub_epi16(sumh,up2);
00181
00182     //rightshift 6 bytes
00183     inl1=_mm_srli_si128(inl1,6);
00184     inl2=_mm_srli_si128(inl2,6);
00185     inl3=_mm_srli_si128(inl3,6);
00186
00187     //add 3,1
00188     up1=_mm_unpacklo_epi8(inl1,zero);
00189     up2=_mm_unpackhi_epi8(inl1,zero);
00190     suml=_mm_add_epi16(suml,up1);
00191     sumh=_mm_add_epi16(sumh,up2);
00192
00193     //add 3,2 *2
00194     up1=_mm_unpacklo_epi8(inl2,zero);
00195     up2=_mm_unpackhi_epi8(inl2,zero);
00196     up1=_mm_slli_epi16(up1,1);
00197     up2=_mm_slli_epi16(up2,1);
00198     suml=_mm_add_epi16(suml,up1);
00199     sumh=_mm_add_epi16(sumh,up2);
00200
00201     //add 3,3
00202     up1=_mm_unpacklo_epi8(inl3,zero);
00203     up2=_mm_unpackhi_epi8(inl3,zero);
00204     suml=_mm_add_epi16(suml,up1);
00205     sumh=_mm_add_epi16(sumh,up2);
00206
00207     //>>3
00208     suml=_mm_srai_epi16(suml,3);
00209     sumh=_mm_srai_epi16(sumh,3);
00210
00211     //store as short
00212     suml=_mm_packs_epi16(suml,sumh);
00213     _mm_storeu_si128((__m128i*)&gx[img_y][img_x],suml);
00214
00215       }
00216
00217
00218   for(int img_y=miny+1;img_y<maxy-1;img_y++)
00219     for(int img_x=minx+1;img_x<(maxx-1)*cc-16;img_x+=10)
00220       {
00221     //grady
00222
00223     unsigned char **srcida=src.GetImageDataArray();
00224     signed char **dstida=gradNS.GetImageDataArray();
00225     unsigned char *row1=srcida[img_y-1];
00226     unsigned char *row3=srcida[img_y+1];
00227     row1+=img_x-3;
00228     row3+=img_x-3;
00229
00230     __m128i inl1,inl2,zero;
00231     __m128i suml,sumh;
00232     __m128i up1,up2;
00233
00234     zero=_mm_setzero_si128();
00235     suml=_mm_setzero_si128();
00236     sumh=_mm_setzero_si128();
00237     inl1=_mm_loadu_si128((__m128i*)&row1[0]);
00238     inl2=_mm_loadu_si128((__m128i*)&row3[0]);
00239
00240     //add 1,3
00241     up1=_mm_unpacklo_epi8(inl2,zero);
00242     up2=_mm_unpackhi_epi8(inl2,zero);
00243     suml=_mm_add_epi16(suml,up1);
00244     sumh=_mm_add_epi16(sumh,up2);
00245
00246     //sub 1,1
00247     up1=_mm_unpacklo_epi8(inl1,zero);
00248     up2=_mm_unpackhi_epi8(inl1,zero);
00249     suml=_mm_sub_epi16(suml,up1);
00250     sumh=_mm_sub_epi16(sumh,up2);
00251
00252     //right shift 3 bytes
00253     inl1=_mm_srli_si128(inl1,3);
00254     inl2=_mm_srli_si128(inl2,3);
00255
00256     //add 2,3 *2
00257     up1=_mm_unpacklo_epi8(inl2,zero);
00258     up2=_mm_unpackhi_epi8(inl2,zero);
00259     up1=_mm_slli_epi16(up1,1);
00260     up2=_mm_slli_epi16(up2,1);
00261     suml=_mm_add_epi16(suml,up1);
00262     sumh=_mm_add_epi16(sumh,up2);
00263
00264     //sub 2,3 *2
00265     up1=_mm_unpacklo_epi8(inl1,zero);
00266     up2=_mm_unpackhi_epi8(inl1,zero);
00267     up1=_mm_slli_epi16(up1,1);
00268     up2=_mm_slli_epi16(up2,1);
00269     suml=_mm_sub_epi16(suml,up1);
00270     sumh=_mm_sub_epi16(sumh,up2);
00271
00272     //right shift 3 bytes
00273     inl1=_mm_srli_si128(inl1,3);
00274     inl2=_mm_srli_si128(inl2,3);
00275
00276     //add 3,3
00277     up1=_mm_unpacklo_epi8(inl2,zero);
00278     up2=_mm_unpackhi_epi8(inl2,zero);
00279     suml=_mm_add_epi16(suml,up1);
00280     sumh=_mm_add_epi16(sumh,up2);
00281
00282     //sub 3,1
00283     up1=_mm_unpacklo_epi8(inl1,zero);
00284     up2=_mm_unpackhi_epi8(inl1,zero);
00285     suml=_mm_sub_epi16(suml,up1);
00286     sumh=_mm_sub_epi16(sumh,up2);
00287
00288     //>>3
00289     suml=_mm_srai_epi16(suml,3);
00290     sumh=_mm_srai_epi16(sumh,3);
00291
00292     //save as short
00293     suml=_mm_packs_epi16(suml,sumh);
00294     _mm_storeu_si128((__m128i*)&gy[img_y][img_x],suml);
00295       }
00296 #endif
00297 //   ImageIO::Write("gradnsold.mip",gradNS);
00298 //   ImageIO::Write("gradweold.mip",gradWE);
00299
00300   return(0);
00301 }
00302
00303 //special functions needed as long the the convolution interface is not fully specified
00304 //this one handles planar images instead of interleaved
00305 static int mysobel2(const Image<unsigned char> &src,Image<signed char> &gradWE,
00306            Image<signed char> &gradNS)
00307 {
00308   BIASASSERT(src.IsPlanar());
00309
00310   unsigned char *im=src.GetImageData();
00311   signed char *gx=gradWE.GetImageData();
00312   signed char *gy=gradNS.GetImageData();
00313   int cc=src.GetChannelCount();
00314   int width=src.GetWidth();
00315   int height=src.GetHeight();
00316
00317   unsigned minx, miny, maxx, maxy;
00318   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00319   gradWE.SetROI(minx+1, miny+1, maxx-1, maxy-1);
00320   gradNS.SetROI(minx+1, miny+1, maxx-1, maxy-1);
00321
00322   unsigned char *row1=im;
00323   unsigned char *row2=im+width;
00324   unsigned char *row3=row2+width;
00325   //first interesting point to calculate is 1,1
00326   gx+=width+1;
00327   gy+=width+1;
00328
00329   //last interesting point width-1,height-1
00330   signed char *gxstop=gx+cc*width*height-2*width-2;
00331 #ifndef __SSE__
00332   while(gx<=gxstop)
00333     {
00334       int sumx=0;
00335       int sumy=0;
00336       //sobelX=[1 0 -1;2 0 -2;1 0 -1]
00337       sumx-=row1[0]+2*row2[0]+row3[0];
00338       sumx+=row1[2]+2*row2[2]+row3[2];
00339       *gx++=sumx>>3;
00340       sumy-=row1[0]+2*row1[1]+row1[2];
00341       sumy+=row3[0]+2*row3[1]+row3[2];
00342       *gy++=sumy>>3;
00343       row1++;
00344       row2++;
00345       row3++;
00346     }
00347 #else
00348   while(gx<=gxstop)
00349     {
00350       __m128i inl,zero;
00351       __m128i sumlx,sumhx,sumly,sumhy;
00352       __m128i up1,up2;
00353
00354       zero=_mm_setzero_si128();
00355       sumlx=_mm_setzero_si128();
00356       sumhx=_mm_setzero_si128();
00357       sumly=_mm_setzero_si128();
00358       sumhy=_mm_setzero_si128();
00359
00360       //row 1
00361       inl=_mm_loadu_si128((__m128i*)&row1[0]);
00362       up1=_mm_unpacklo_epi8(inl,zero);
00363       up2=_mm_unpackhi_epi8(inl,zero);
00364       //sub
00365       sumlx=_mm_sub_epi16(sumlx,up1);
00366       sumhx=_mm_sub_epi16(sumhx,up2);
00367       sumly=_mm_sub_epi16(sumly,up1);
00368       sumhy=_mm_sub_epi16(sumhy,up2);
00369
00370       //row1[1] instead of row1[0]
00371       inl=_mm_srli_si128(inl,1);
00372       up1=_mm_unpacklo_epi8(inl,zero);
00373       up2=_mm_unpackhi_epi8(inl,zero);
00374       //sub *2
00375       up1=_mm_slli_epi16(up1,1);
00376       up2=_mm_slli_epi16(up2,1);
00377       sumly=_mm_sub_epi16(sumly,up1);
00378       sumhy=_mm_sub_epi16(sumhy,up2);
00379
00380       //row1[2] instead of row1[1]
00381       inl=_mm_srli_si128(inl,1);
00382       up1=_mm_unpacklo_epi8(inl,zero);
00383       up2=_mm_unpackhi_epi8(inl,zero);
00384       //dx add dy sub
00385 //       sumlx=_mm_add_epi16(sumlx,up1);
00386 //       sumhx=_mm_add_epi16(sumhx,up2);
00387       fastsum_epi16(sumlx,up1);
00388       fastsum_epi16(sumhx,up2);
00389
00390       sumly=_mm_sub_epi16(sumly,up1);
00391       sumhy=_mm_sub_epi16(sumhy,up2);
00392
00393       //row 2
00394       inl=_mm_loadu_si128((__m128i*)row2);
00395       up1=_mm_unpacklo_epi8(inl,zero);
00396       up2=_mm_unpackhi_epi8(inl,zero);
00397       //sub*2
00398       up1=_mm_slli_epi16(up1,1);
00399       up2=_mm_slli_epi16(up2,1);
00400       sumlx=_mm_sub_epi16(sumlx,up1);
00401       sumhx=_mm_sub_epi16(sumhx,up2);
00402
00403       //row2[2] instead of ror2[0]
00404       inl=_mm_srli_si128(inl,2);
00405       up1=_mm_unpacklo_epi8(inl,zero);
00406       up2=_mm_unpackhi_epi8(inl,zero);
00407       //dx add*2
00408       up1=_mm_slli_epi16(up1,1);
00409       up2=_mm_slli_epi16(up2,1);
00410 //       sumlx=_mm_add_epi16(sumlx,up1);
00411 //       sumhx=_mm_add_epi16(sumhx,up2);
00412       fastsum_epi16(sumlx,up1);
00413       fastsum_epi16(sumhx,up2);
00414
00415       //row 3
00416       inl=_mm_loadu_si128((__m128i*)&row3[0]);
00417       up1=_mm_unpacklo_epi8(inl,zero);
00418       up2=_mm_unpackhi_epi8(inl,zero);
00419       //dx sub dy add
00420       sumlx=_mm_sub_epi16(sumlx,up1);
00421       sumhx=_mm_sub_epi16(sumhx,up2);
00422 //       sumly=_mm_add_epi16(sumly,up1);
00423 //       sumhy=_mm_add_epi16(sumhy,up2);
00424       fastsum_epi16(sumly,up1);
00425       fastsum_epi16(sumhy,up2);
00426
00427       //row3[1] instead of row3[0]
00428       inl=_mm_srli_si128(inl,1);
00429       up1=_mm_unpacklo_epi8(inl,zero);
00430       up2=_mm_unpackhi_epi8(inl,zero);
00431       //dy add*2
00432       up1=_mm_slli_epi16(up1,1);
00433       up2=_mm_slli_epi16(up2,1);
00434 //       sumly=_mm_add_epi16(sumly,up1);
00435 //       sumhy=_mm_add_epi16(sumhy,up2);
00436       fastsum_epi16(sumly,up1);
00437       fastsum_epi16(sumhy,up2);
00438
00439       //row3[2] instead of row3[1]
00440       inl=_mm_srli_si128(inl,1);
00441       up1=_mm_unpacklo_epi8(inl,zero);
00442       up2=_mm_unpackhi_epi8(inl,zero);
00443       //add
00444 //       sumlx=_mm_add_epi16(sumlx,up1);
00445 //       sumhx=_mm_add_epi16(sumhx,up2);
00446 //       sumly=_mm_add_epi16(sumly,up1);
00447 //       sumhy=_mm_add_epi16(sumhy,up2);
00448       fastsum_epi16(sumlx,up1);
00449       fastsum_epi16(sumhx,up2);
00450       fastsum_epi16(sumly,up1);
00451       fastsum_epi16(sumhy,up2);
00452
00453       //divide by 8
00454       sumlx=_mm_srai_epi16(sumlx,3);
00455       sumly=_mm_srai_epi16(sumly,3);
00456       sumhx=_mm_srai_epi16(sumhx,3);
00457       sumhy=_mm_srai_epi16(sumhy,3);
00458
00459       //store as short
00460       sumlx=_mm_packs_epi16(sumlx,sumhx);
00461       sumly=_mm_packs_epi16(sumly,sumhy);
00462
00463       _mm_storeu_si128((__m128i*)gx,sumlx);
00464       _mm_storeu_si128((__m128i*)gy,sumly);
00465
00466       gx+=14;
00467       gy+=14;
00468       row1+=14;
00469       row2+=14;
00470       row3+=14;
00471     }
00472
00473 #endif
00474 //   Image<signed char> foo;
00475 //   ImageConvert::ToInterleaved(gradNS,foo);
00476 //   ImageIO::Write("gradns.mip",foo);
00477 //   ImageConvert::ToInterleaved(gradWE,foo);
00478 //   ImageIO::Write("gradwe.mip",foo);
00479
00480   return 0;
00481 }
00482
00483 static void createst(Image<signed char> &dx,Image<signed char> &dy,Image<short> &st)
00484 {
00485   int width=dx.GetWidth();
00486   int height=dx.GetHeight();
00487
00488   if(!dx.SamePixelAndChannelCount(st))
00489     {
00490       st.Release();
00491       st.Init(width,height,3,ImageBase::ST_invalid,false);
00492       st.SetColorModel(ImageBase::CM_SymTensor2x2);
00493     }
00494
00495   short **dxxp=st.GetImageDataArray();
00496   short **dxyp=dxxp+height;
00497   short **dyyp=dxyp+height;
00498
00499   signed char **dxp=dx.GetImageDataArray();
00500   signed char **dyp=dy.GetImageDataArray();
00501   {
00502     signed char *dx=*dxp;
00503     signed char *dy=*dyp;
00504     short *dxx=*dxxp;
00505     short *dxy=*dxyp;
00506     short *dyy=*dyyp;
00507   for(unsigned int y=0;y<height*width;y++)
00508       {
00509     int txx,txy,tyy;
00510     short tx,ty;
00511
00512 #undef GRAD_UCHAR_ZERO
00513 #define GRAD_UCHAR_ZERO 0
00514     tx=(*dx++)-GRAD_UCHAR_ZERO;
00515     ty=(*dy++)-GRAD_UCHAR_ZERO;
00516
00517     txx=tx*tx;
00518     txy=tx*ty;
00519     tyy=ty*ty;
00520
00521     tx=(*dx++)-GRAD_UCHAR_ZERO;
00522     ty=(*dy++)-GRAD_UCHAR_ZERO;
00523
00524     txx+=tx*tx;
00525     txy+=tx*ty;
00526     tyy+=ty*ty;
00527
00528     tx=(*dx++)-GRAD_UCHAR_ZERO;
00529     ty=(*dy++)-GRAD_UCHAR_ZERO;
00530
00531     txx+=tx*tx;
00532     txy+=tx*ty;
00533     tyy+=ty*ty;
00534
00535     *dxx++=txx/2;
00536     *dxy++=txy/2;
00537     *dyy++=tyy/2;
00538       }
00539   }
00540 }
00541
00542 //from planar images
00543 static void createst2(Image<signed char> &dx_plan,Image<signed char> &dy_plan,Image<short> &st)
00544 {
00545   int width=dx_plan.GetWidth();
00546   int height=dx_plan.GetHeight();
00547   if(!dx_plan.SamePixelAndChannelCount(st))
00548     {
00549       st.Release();
00550       st.Init(width,height,3,ImageBase::ST_invalid,false);
00551       st.SetColorModel(ImageBase::CM_SymTensor2x2);
00552     }
00553
00554   signed char *dxred=dx_plan.GetImageData();
00555   signed char *dxgreen=dxred+width*height;
00556   signed char *dxblue=dxgreen+width*height;
00557   signed char *dyred=dy_plan.GetImageData();
00558   signed char *dygreen=dyred+width*height;
00559   signed char *dyblue=dygreen+width*height;
00560
00561   short *dxx=st.GetImageData();
00562   short *dxy=dxx+width*height;
00563   short *dyy=dxy+width*height;
00564
00565 #ifndef __SSE__
00566   for(int y=0;y<width*height;y++)
00567     {
00568       int txx,txy,tyy;
00569       int tx,ty;
00570
00571       tx=*dxred++;
00572       ty=*dyred++;
00573
00574       txx=tx*tx;
00575       txy=tx*ty;
00576       tyy=ty*ty;
00577
00578       tx=*dxgreen++;
00579       ty=*dygreen++;
00580
00581       txx+=tx*tx;
00582       txy+=tx*ty;
00583       tyy+=ty*ty;
00584
00585       tx=*dxblue++;
00586       ty=*dyblue++;
00587
00588       txx+=tx*tx;
00589       txy+=tx*ty;
00590       tyy+=ty*ty;
00591
00592       //div by 2 because the summation of three colorchannels might give overflow otherwise
00593       *dxx++=txx/2;
00594       *dxy++=txy/2;
00595       *dyy++=tyy/2;
00596     }
00597 #else
00598   for(int y=0;y<width*height;y+=8)
00599     {
00600       __m128i tx,ty,zero;
00601       __m128i sign;
00602       __m128i txshort;
00603       __m128i tyshort;
00604       __m128i txx1,txx2,txy1,txy2,tyy1,tyy2;
00605       __m128i mul1,mul2,mullow,mulhigh;
00606
00607       txx1=_mm_setzero_si128();
00608       txx2=_mm_setzero_si128();
00609       txy1=_mm_setzero_si128();
00610       txy2=_mm_setzero_si128();
00611       tyy1=_mm_setzero_si128();
00612       tyy2=_mm_setzero_si128();
00613       zero=_mm_setzero_si128();
00614
00615 #define add_to_tensor \
00616       /*generate txshort,tyshort,extract tx0..7 ty0..7*/\
00617       sign=_mm_cmpgt_epi8(zero,tx);\
00618       txshort=_mm_unpacklo_epi8(tx,sign);\
00619       sign=_mm_cmpgt_epi8(zero,ty);\
00620       tyshort=_mm_unpacklo_epi8(ty,sign);\
00621       /*txx*/\
00622       mul1=_mm_mullo_epi16(txshort,txshort);\
00623       mul2=_mm_mulhi_epi16(txshort,txshort);\
00624       mullow=_mm_unpacklo_epi16(mul1,mul2);\
00625       mulhigh=_mm_unpackhi_epi16(mul1,mul2);\
00626       /*txx1=_mm_add_epi32(mullow,txx1);*/\
00627       /*txx2=_mm_add_epi32(mulhigh,txx2);*/\
00628       fastsum_epi32(txx1,mullow);fastsum_epi32(txx2,mulhigh);\
00629       /*txy*/\
00630       mul1=_mm_mullo_epi16(txshort,tyshort);\
00631       mul2=_mm_mulhi_epi16(txshort,tyshort);\
00632       mullow=_mm_unpacklo_epi16(mul1,mul2);\
00633       mulhigh=_mm_unpackhi_epi16(mul1,mul2);\
00634       /*txy1=_mm_add_epi32(mullow,txy1);*/\
00635       /*txy2=_mm_add_epi32(mulhigh,txy2);*/\
00636       fastsum_epi32(txy1,mullow);fastsum_epi32(txy2,mulhigh);\
00637       /*tyy*/\
00638       mul1=_mm_mullo_epi16(tyshort,tyshort);\
00639       mul2=_mm_mulhi_epi16(tyshort,tyshort);\
00640       mullow=_mm_unpacklo_epi16(mul1,mul2);\
00641       mulhigh=_mm_unpackhi_epi16(mul1,mul2);\
00642       /*tyy1=_mm_add_epi32(mullow,tyy1);*/\
00643       /*tyy2=_mm_add_epi32(mulhigh,tyy2);*/\
00644       fastsum_epi32(tyy1,mullow);fastsum_epi32(tyy2,mulhigh)
00645
00646       tx=_mm_loadu_si128((__m128i*)dxred);
00647       ty=_mm_loadu_si128((__m128i*)dyred);
00648       add_to_tensor;
00649       tx=_mm_loadu_si128((__m128i*)dxgreen);
00650       ty=_mm_loadu_si128((__m128i*)dygreen);
00651       add_to_tensor;
00652       tx=_mm_loadu_si128((__m128i*)dxblue);
00653       ty=_mm_loadu_si128((__m128i*)dyblue);
00654       add_to_tensor;
00655
00656       //divide by 2
00657       txx1=_mm_srai_epi32(txx1,1);
00658       txx2=_mm_srai_epi32(txx2,1);
00659       txy1=_mm_srai_epi32(txy1,1);
00660       txy2=_mm_srai_epi32(txy2,1);
00661       tyy1=_mm_srai_epi32(tyy1,1);
00662       tyy2=_mm_srai_epi32(tyy2,1);
00663
00664       //store as short
00665       txx1=_mm_packs_epi32(txx1,txx2);
00666       txy1=_mm_packs_epi32(txy1,txy2);
00667       tyy1=_mm_packs_epi32(tyy1,tyy2);
00668
00669       _mm_storeu_si128((__m128i*)dxx,txx1);
00670       _mm_storeu_si128((__m128i*)dxy,txy1);
00671       _mm_storeu_si128((__m128i*)dyy,tyy1);
00672       dxx+=8;
00673       dxy+=8;
00674       dyy+=8;
00675       dxred+=8;
00676       dyred+=8;
00677       dxgreen+=8;
00678       dygreen+=8;
00679       dxblue+=8;
00680       dyblue+=8;
00681     }
00682 #endif
00683 }
00684
00685 int ColorHarris::CreateSTColor(Image<unsigned char> &im,Image<short> &st,const float sigma1,const float sigma2)
00686 {
00687   if(im.GetColorModel()!=ImageBase::CM_RGB) {
00688     BIASERR("create_ST_color only supports colormodel CM_RGB");
00689     return -1;
00690   }
00691 //   Image<unsigned char> dx,dy;
00692 #ifdef use_timers
00693   TimeMeasure time;
00694 #endif
00695 //   Image<signed char> dx,dy;
00696   static Image<signed char> dx_plan,dy_plan;
00697   unsigned int width,height;
00698   width=im.GetWidth();
00699   height=im.GetHeight();
00700
00701 #ifdef use_timers
00702   time.Reset();
00703   time.start();
00704 #endif
00705   static Image<unsigned char> im_planar;
00706   //I was not able to get ImageConvert::Toplanar to compile
00707   mytoplanar(im,im_planar);
00708 #ifdef use_timers
00709   time.stop();
00710     cout <<"\nmytoplanar took:\n";
00711   time.print();
00712   time.Reset();
00713 #endif
00714
00715 //   dx.Init(width,height,3);
00716 //   dy.Init(width,height,3);
00717 //   dx.SetColorModel(ImageBase::CM_RGB);
00718 //   dy.SetColorModel(ImageBase::CM_RGB);
00719
00720   if(!im.SamePixelAndChannelCount(dx_plan))
00721     {
00722       dx_plan.Release();
00723       dy_plan.Release();
00724       dx_plan.Init(width,height,3,ImageBase::ST_char,false);
00725       dy_plan.Init(width,height,3,ImageBase::ST_char,false);
00726       dx_plan.SetColorModel(ImageBase::CM_RGB);
00727       dy_plan.SetColorModel(ImageBase::CM_RGB);
00728     }
00729 #ifdef use_timers
00730   time.start();
00731 #endif
00732
00733   if(sigma1==0)
00734     {
00735 //       mysobel(im,dx,dy);
00736       mysobel2(im_planar,dx_plan,dy_plan);
00737 //       GradientSobel3x3<unsigned char,int> gr;
00738 //       gr.Filter(im,dx,dy);
00739     }
00740   else
00741     {
00742       BIASERR("sigma1!=0 not implemented yet");
00743     }
00744 #ifdef use_timers
00745   time.stop();
00746   cout << "\nsobel took:\n";
00747   time.print();
00748
00749   time.Reset();
00750   time.start();
00751 #endif
00752
00753 //   createst(dx,dy,st);
00754   createst2(dx_plan,dy_plan,st);
00755
00756 #ifdef use_timers
00757   time.stop();
00758   cout << "\nto tensor took:\n";
00759   time.print();
00760
00761   time.Reset();
00762   time.start();
00763 #endif
00764
00765   if(sigma2!=0)
00766     {
00767 //       Gauss<short,int> gauss;
00768
00769 //       BIASERR("sigma2!=0 not implemented yet");
00770       GaussDeriv<short> gauss;
00771       gauss.SetSigma(sigma2);
00772       gauss.SetOrder(0,0);
00773       gauss.Filter(st,st);
00774     }
00775   else
00776     cout <<"\nsigma2==0\n";
00777
00778 #ifdef use_timers
00779   time.stop();
00780   cout << "\ngauss took:\n";
00781   time.print();
00782 #endif
00783
00784   return(0);
00785 }
00786
00787 int ColorHarris::HarrisValue(Image<short> &st,Image<int> &res)
00788 {
00789   unsigned int width,height;
00790   width=st.GetWidth();
00791   height=st.GetHeight();
00792
00793   if (st.GetWidth()!=res.GetWidth()||st.GetHeight()!=res.GetHeight()){
00794     if (!res.IsEmpty()){
00795       res.Release();
00796     }
00797     res.Init(width, height,1);
00798     res.SetColorModel(ImageBase::CM_Grey);
00799   }
00800
00801   short *dxxp=st.GetImageData();
00802   short *dxyp=dxxp+height*width;
00803   short *dyyp=dxyp+height*width;
00804   int *resp=res.GetImageData();
00805   unsigned int x,y;
00806
00807 #ifndef __SSE__
00808   for(y=0;y<height;y++)
00809     for(x=0;x<width;x++)
00810       {
00811     int t11,t12,t22,temp;
00812     t11=*dxxp++;
00813     t12=*dxyp++;
00814     t22=*dyyp++;
00815     //det(t)-0.04*tr(t)^2
00816     //0.04*tr(t)^2~tr(t)^2 >> 5
00817     temp=(t11+t22)*(t11+t22);
00818     *resp++=t11*t22-t12*t12-(temp>>5);
00819       }
00820 #else
00821   for(y=0;y<height*width;y+=8)
00822     {
00823       __m128i t11,t12,t22,t11_t22;
00824       __m128i mull,mulh,templ,temph;
00825       __m128i t11xt22l,t11xt22h;
00826       __m128i t12sql,t12sqh;
00827
00828       t11=_mm_loadu_si128((__m128i*)dxxp);
00829       t12=_mm_loadu_si128((__m128i*)dxyp);
00830       t22=_mm_loadu_si128((__m128i*)dyyp);
00831
00832       //calculate temp
00833       t11_t22=_mm_adds_epi16(t11,t22);
00834       mull=_mm_mullo_epi16(t11_t22,t11_t22);
00835       mulh=_mm_mulhi_epi16(t11_t22,t11_t22);
00836       templ=_mm_unpacklo_epi16(mull,mulh);
00837       temph=_mm_unpackhi_epi16(mull,mulh);
00838
00839       //t11*t22
00840       mull=_mm_mullo_epi16(t11,t22);
00841       mulh=_mm_mulhi_epi16(t11,t22);
00842       t11xt22l=_mm_unpacklo_epi16(mull,mulh);
00843       t11xt22h=_mm_unpackhi_epi16(mull,mulh);
00844
00845       //t12square
00846       mull=_mm_mullo_epi16(t12,t12);
00847       mulh=_mm_mulhi_epi16(t12,t12);
00848       t12sql=_mm_unpacklo_epi16(mull,mulh);
00849       t12sqh=_mm_unpackhi_epi16(mull,mulh);
00850
00851       //temp>>5
00852       templ=_mm_srai_epi32(templ,5);
00853       temph=_mm_srai_epi32(temph,5);
00854
00855       //get the result
00856       t11xt22l=_mm_sub_epi32(t11xt22l,t12sql);
00857       t11xt22h=_mm_sub_epi32(t11xt22h,t12sqh);
00858       t11xt22l=_mm_sub_epi32(t11xt22l,templ);
00859       t11xt22h=_mm_sub_epi32(t11xt22h,temph);
00860
00861       //store result
00862       _mm_storeu_si128((__m128i*)resp    ,t11xt22l);
00863       _mm_storeu_si128((__m128i*)(resp+4),t11xt22h);
00864       resp+=8;
00865       dxxp+=8;
00866       dxyp+=8;
00867       dyyp+=8;
00868     }
00869
00870 #endif
00871
00872   return 0;
00873 }
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ColorHarris.hh Source File

FeatureDetector

ColorHarris.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Linköping
00009   sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026   //Warning this is a working version of the file not final API
00027
00028 #include "bias_config.h"
00029 #include "Base/Debug/Debug.hh"
00030 #include "Base/Image/Image.hh"
00031 #include "Base/Debug/TimeMeasure.hh"
00032 #include "GradientSobel3x3.hh"
00033
00034 #error this code should reside in the class CornerDetectorHarris.hh
00035
00036
00037 namespace BIAS
00038 {
00039   class BIASFeatureDetector_EXPORT ColorHarris : public Debug
00040   {
00041   public:
00042     int CreateSTColor(Image<unsigned char> &im,Image<short> &st,const float sigma1,const float sigma2);
00043     int HarrisValue(Image<short> &st,Image<int> &res);
00044   };
00045
00046 } //end namespace
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorHistogram.cpp Source File

Image

ColorHistogram.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "ColorHistogram.hh"
00027 #include <Base/Image/ImageBase.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029
00030 #include <Base/Common/BIASpragma.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 namespace BIAS {
00036
00037 const float maxShutter = 0.034f;
00038 const float minShutter = 0.01f;
00039 const float maxGain = 29.0f;
00040 const float minGain = 0.1f;
00041
00042
00043
00044 /**
00045    This class creates a Histogram in the HSL color space.
00046    @author ingo schiller
00047    @date feb 2004
00048  */
00049 template<class StorageType>
00050 ColorHistogram<StorageType>::ColorHistogram()
00051 {
00052   image_=NULL;
00053   histCount_ = 0;
00054   binCount_ = 0;
00055   expDist_=true;
00056   minSat_=10;
00057   lambda_=20;
00058   binSize_=32;
00059   binSizeSat_=64;
00060   ux_=uy_=lx_=ly_=0;
00061   SetBinSize(binSize_,binSizeSat_);
00062
00063 }
00064
00065 template<class StorageType>
00066 ColorHistogram<StorageType>::~ColorHistogram()
00067 {
00068
00069 }
00070
00071
00072 //set the region of interest
00073 template<class StorageType>
00074 int ColorHistogram<StorageType>::SetROI(int ux, int uy, int lx, int ly){
00075
00076   ux_=ux;
00077   uy_=uy;
00078   lx_=lx;
00079   ly_=ly;
00080
00081   return 0;
00082 }
00083
00084
00085 template<class StorageType>
00086 int ColorHistogram<StorageType>::SetBinSize(int binsize){
00087   binSize_ = binsize;
00088   binSizeSat_=binsize;
00089   unsigned int nBins = (unsigned int)(256/binSize_);
00090   hist_.resize(nBins);
00091   for(unsigned int k=0;k<nBins;k++){
00092     hist_[k].resize(nBins);
00093   }
00094   histl_.resize(nBins);
00095 #ifdef BIAS_DEBUG
00096   if (binSize_!=4 && binSize_!=8 && binSize_!=16 && binSize_!=32 && binSize_!=64 && binSize_!=128){
00097     BIASERR("slow, not supported");
00098     BIASABORT
00099   }
00100 #endif
00101   int tmp = binSize_;
00102   shift_=-1;
00103   while (tmp!=0) {
00104     tmp=tmp>>1; shift_++;
00105   }
00106
00107   shiftSat_ = shift_;
00108   //cerr << "binSize_: "<<binSize_<<" shift: "<<shift_<<endl;
00109
00110   luminance_.resize(8); // declare fixed binsize for luminace of 32 -> 8 bins
00111   shiftLum_=5;
00112   return 0;
00113 }
00114
00115
00116 template<class StorageType>
00117 int ColorHistogram<StorageType>::SetBinSize(int binSizeHue,
00118                                             int binSizeSat)
00119 {
00120   binSize_ = binSizeHue;
00121   binSizeSat_ = binSizeSat;
00122   unsigned int nBinsHue = (unsigned int)(256/binSize_);
00123   unsigned int nBinsSat = (unsigned int)(256/binSizeSat_);
00124
00125   hist_.resize(nBinsHue);
00126   for(unsigned int k=0;k<nBinsHue;k++){
00127     hist_[k].resize(nBinsSat);
00128   }
00129   histl_.resize(nBinsHue);
00130 #ifdef BIAS_DEBUG
00131   if (binSize_!=4 && binSize_!=8 && binSize_!=16 && binSize_!=32 && binSize_!=64 && binSize_!=128){
00132     BIASERR("slow, not supported");
00133     BIASABORT;
00134   }
00135 #endif
00136   int tmp = binSize_;
00137   shift_=-1;
00138   while (tmp!=0) {
00139     tmp=tmp>>1; shift_++;
00140   }
00141   //set shift for the sat binsize
00142   tmp = binSizeSat_;
00143   shiftSat_ = -1;
00144   while (tmp!=0) {
00145     tmp=tmp>>1; shiftSat_++;
00146   }
00147
00148   //cerr << "binSize_: "<<binSize_<<" binSizeSat: "<<binSizeSat_<<endl;
00149   //cerr << "Shift: "<<shift_<<" shiftSat: "<<shiftSat_<<endl;
00150
00151  luminance_.resize(8); // declare fixed binsize for luminace of 32 -> 8 bins
00152  shiftLum_=5;
00153
00154  return 0;
00155
00156 }
00157
00158
00159 template<class StorageType>
00160 std::vector<std::vector<double> > ColorHistogram<StorageType>::GetHist() const
00161 {
00162   return hist_;
00163 }
00164
00165
00166 template<class StorageType>
00167 std::vector<double> ColorHistogram<StorageType>::GetHistL() const
00168 {
00169   return histl_;
00170 }
00171
00172 template<class StorageType>
00173 int ColorHistogram<StorageType>::GetHeightROI() const {
00174
00175   return ly_-uy_;
00176 }
00177
00178 template<class StorageType>
00179 int ColorHistogram<StorageType>::GetWidthROI() const {
00180
00181   return lx_-ux_;
00182 }
00183
00184
00185 template<class StorageType>
00186 void ColorHistogram<StorageType>::GetROI(std::vector<int>& roi) const
00187 {
00188   roi.clear();
00189   roi.push_back(ux_);
00190   roi.push_back(uy_);
00191   roi.push_back(lx_);
00192   roi.push_back(ly_);
00193 }
00194
00195
00196
00197
00198 template<class StorageType>
00199 int ColorHistogram<StorageType>::Clear()
00200 {
00201   expDist_=true;
00202   normalised_=false;
00203   binCount_=0;
00204   histCount_=0;
00205   ux_=0;
00206   uy_=0;
00207   lx_=0;
00208   ly_=0;
00209
00210   return 0;
00211 }
00212
00213
00214
00215
00216 template<class StorageType>
00217 int
00218 ColorHistogram<StorageType>::GenerateHist(BIAS::Image<StorageType>&image,
00219                                           int ux, int uy, int lx, int ly)
00220 {
00221   ux_=ux;
00222   uy_=uy;
00223   lx_=lx;
00224   ly_=ly;
00225
00226   GenerateHist(image);
00227   return 0;
00228 }
00229
00230
00231
00232 template<class StorageType>
00233 int
00234 ColorHistogram<StorageType>::GenerateHist(BIAS::Image<StorageType>& img)
00235 {
00236
00237   StorageType *data;
00238
00239   if  ( (abs(ux_- lx_)==0) |  (abs(uy_-ly_)==0) )
00240     return 1;
00241
00242   //at first test if image is in HSL
00243   if (img.GetColorModel()==ImageBase::CM_HSL){
00244     image_=&img;
00245   } else {
00246     BIASERR("GenerateHist() needs an image with HSL Colormodel!");
00247     return -1;
00248   }
00249
00250   DeleteHist_();
00251
00252
00253   //go through the picturearray and collect the value and saturation
00254   //and set the l-values that are missing
00255
00256   StorageType hue=0, sat=0, light=0;
00257   StorageType lum=0;
00258   data = image_->GetImageData();
00259
00260   //go through imagedata and collect infos on colors and lightness
00261   int width = image_->GetWidth(); //width of image
00262   int step = 3*width-3*lx_+3*ux_; //right part left of image
00263   StorageType *p = data+3*ux_+3*width*uy_; //pointer to beginning of ROI
00264   StorageType *e = data+3*lx_+3*width*(ly_-1); //pointer to end of ROI
00265   StorageType *le = data+3*lx_+3*width*uy_; //pointer to line end
00266
00267
00268   //go through the picturearray and collect the value and saturation
00269   //and set the l-values that are missing
00270
00271   double invbin=1.0/(double)binSize_;
00272   double invbinSat=1.0/(double)binSizeSat_;
00273   while(p<e){
00274     //cerr<<"ALERT!!! IN WHILE p<e!!"<<endl;
00275     while(p<le){
00276       hue = *p++; //get values and increase pointers
00277       sat = *p++;
00278
00279       lum = *p;//take the lum but don't increase
00280       lum = lum*float(1.0/(double)32);//and then sort into luminacne vector
00281       luminance_[(int)floor(lum)]+=1;
00282
00283       if(sat>minSat_)
00284         {
00285           //if SAT is >minSat_ put value in hist_
00286           sat = sat*float(invbinSat);
00287           hue = hue*float(invbin);
00288           hist_[(int)floor((float)hue)][(int)floor((float)sat)]+=1;
00289           binCount_++;//increase bincount for the normalisation
00290           *p++;//increase pointer because it's not done in else case
00291         }
00292       else {
00293         //build the array for the L-values here
00294         light = *p++; //get value
00295         light = light*float(invbin);
00296         histl_[(int)floor(light)]+=1;
00297         //also increase bincount if in histl_
00298         binCount_++;
00299
00300       }
00301     }
00302     le+=3*width;
00303     p+=step;
00304   }
00305
00306   Normalise_();
00307
00308   return 0;
00309 }
00310
00311 template<>
00312 int
00313 ColorHistogram<unsigned char>::GenerateHist(Image<unsigned char>& img)
00314 {
00315   unsigned char *data;
00316  // cout<<"ColorHistogram GenerateHist binsizeHue :"<<binSize_<<endl;
00317  // cout<<"ColorHistogram GenerateHist binsizeSat :"<<binSizeSat_<<endl;
00318
00319   if ( (abs(ux_- lx_)==0) |  (abs(uy_-ly_)==0) )
00320     return 1;
00321
00322   //at first test if image is in HSL
00323   if (img.GetColorModel()==ImageBase::CM_HSL){
00324     image_=&img;
00325   } else {
00326     BIASERR("GenerateHist() needs an image with HSL Colormodel!");
00327     return -1;
00328   }
00329
00330   DeleteHist_();
00331
00332   data = image_->GetImageData();
00333
00334   //go through imagedata and collect infos on colors and lightness
00335   int width = image_->GetWidth(); //width of image
00336   int step = 3*width-3*lx_+3*ux_; //right part left of image
00337   unsigned char *p = data+3*ux_+3*width*uy_; //pointer to beginning of ROI
00338   unsigned char *e = data+3*lx_+3*width*(ly_-1); //pointer to end of ROI
00339   unsigned char *le = data+3*lx_+3*width*uy_; //pointer to line end
00340
00341
00342   //go through the picturearray and collect the value and saturation
00343   //and set the l-values that are missing
00344
00345   unsigned char hue=0, sat=0, light=0;
00346   unsigned char lum=0;
00347
00348   while(p<e){
00349     //cerr<<"ALERT!!! IN WHILE p<e!!"<<endl;
00350     while(p<le){
00351       hue = *p++; //get values and increase pointers
00352       sat = *p++;
00353       lum = *p;//take the lum but don't increase
00354       lum = lum>>shiftLum_;;//and then sort into luminacne vector
00355       luminance_[lum]+=1;
00356
00357       if(sat>minSat_)
00358         {
00359           //if SAT is >minSat_ put value in hist_
00360           sat = sat>>shiftSat_;
00361           hue = hue>>shift_;
00362           hist_[hue][sat]+=1;
00363           binCount_++;//increase bincount for the normalisation
00364           *p++;//increase pointer because it's not done in else case
00365         }
00366       else {
00367         //build the array for the L-values here
00368         light = *p++; //get value
00369         light = light>>shift_;
00370         histl_[light]+=1;
00371         //also increase bincount if in histl_
00372         binCount_++;
00373
00374       }
00375     }
00376     le+=3*width;
00377     p+=step;
00378   }
00379
00380   Normalise_();
00381
00382   return 0;
00383 }
00384
00385
00386 template<class StorageType>
00387 double ColorHistogram<StorageType>::CalcSimilarity(const BIAS::ColorHistogram<StorageType> chist) const
00388 {
00389   double dist=0; //indicator for similarity
00390   int nBins = 256/binSize_;
00391   int nBinsSat = 256/binSizeSat_;
00392   //sum up the sqrt of the product of q*(n)and q(n;x) over all bins
00393   for(int i=0;i<nBins;i++){
00394     dist += sqrt(histl_[i]*chist.histl_[i]);
00395     for(int j=0;j<nBinsSat;j++){
00396       dist += sqrt(hist_[i][j]*chist.hist_[i][j]);
00397     }
00398   }
00399   //new
00400   if(!expDist_)
00401     dist = sqrt(1-dist);
00402   else
00403     dist = exp(-lambda_*(1-dist));
00404
00405   /* old
00406   if(expDist_)
00407     dist = exp(-lambda_*(1-dist));
00408   */
00409   //  cout<<"CalcSimilarity, dist: "<<dist<<endl;
00410   return dist;
00411 }
00412
00413 template<class StorageType>
00414 double ColorHistogram<StorageType>::CalcSimilarity(const BIAS::ColorHistogram<StorageType> chist, double &weight) const
00415 {
00416   double dist=0; //indicator for similarity
00417   weight=0;
00418   int nBins = 256/binSize_;
00419   int nBinsSat = 256/binSizeSat_;
00420   //sum up the sqrt of the product of q*(n)and q(n;x) over all bins
00421   for(int i=0;i<nBins;i++){
00422     if (histl_[i]!=0) {
00423       weight++;
00424       if (chist.histl_[i]!=0)
00425         dist += sqrt(histl_[i]*chist.histl_[i]);
00426     }
00427     for(int j=0;j<nBinsSat;j++){
00428       if (hist_[i][j]!=0) {
00429         weight++;
00430         if (chist.hist_[i][j]!=0)
00431           dist += sqrt(hist_[i][j]*chist.hist_[i][j]);
00432       }
00433     }
00434   }
00435
00436  //new
00437   if(!expDist_)
00438     dist = sqrt(1-dist);
00439   else
00440     dist = exp(-lambda_*(1-dist));
00441
00442   /* old
00443   if(expDist_)
00444     dist = exp(-lambda_*(1-dist));
00445   */
00446
00447
00448   weight /= (256.0/(double)binSize_) * (256.0/(double)binSize_);
00449   return dist;
00450 }
00451
00452 template<class StorageType>
00453 int
00454 ColorHistogram<StorageType>::Update(const ColorHistogram<StorageType> &hist,
00455                                     double factor)
00456 {
00457 #ifdef BIAS_DEBUG
00458   if (hist.binSize_!=binSize_) {
00459     BIASERR("can't update , beause histogramms have different binSize");
00460     return -1;
00461   }
00462 #endif
00463
00464   //update the size
00465   ux_= int((double)ux_*(1.0-factor)+factor*(double)hist.ux_ + 0.5);
00466   uy_= int((double)uy_*(1.0-factor)+factor*(double)hist.uy_ + 0.5);
00467   lx_= int((double)lx_*(1.0-factor)+factor*(double)hist.lx_ + 0.5);
00468   ly_= int((double)ly_*(1.0-factor)+factor*(double)hist.ly_ + 0.5);
00469
00470   int nBins = 256/binSize_;
00471   int nBinsSat = 256/binSizeSat_;
00472
00473   // update bins
00474   for(int i=0;i<nBins;i++){
00475     histl_[i]= histl_[i]*(1.0-factor) + factor * hist.histl_[i];
00476     for(int j=0;j<nBinsSat;j++){
00477       hist_[i][j] = hist_[i][j]*(1.0-factor) + factor * hist.hist_[i][j];
00478     }
00479   }
00480   return 0;
00481 }
00482
00483
00484 template<class StorageType> int ColorHistogram<StorageType>::
00485 CheckImageQualityRef(ColorHistogram<StorageType>& cHist,
00486              float percent,
00487              float &shutter,
00488              float &gain)
00489 {
00490   int ret =0;
00491   float shutterstep = 0.001f;
00492   float gainstep = 0.1f;
00493   double lowerLum =luminance_[0]+luminance_[1];
00494   double higherLum = luminance_[6]+luminance_[7];
00495
00496   double lowerLumRef = cHist.luminance_[0]+cHist.luminance_[1];
00497   double higherLumRef = cHist.luminance_[6]+cHist.luminance_[7];
00498   //  cout<<"LowerLum :"<<lowerLum<<" LowerLumRef :"<<lowerLumRef<<endl;
00499   // cout<<"HigherLum :"<<higherLum<<" HigherLumRef :"<<higherLumRef<<endl;
00500
00501   if((lowerLum - lowerLumRef) > percent)
00502     {
00503       if(shutter + shutterstep < maxShutter)
00504     {
00505       shutter += shutterstep;
00506       //  cout<<"Increasing shutter, lum too low"<<endl;
00507     }
00508       else
00509     {
00510       if(gain + gainstep < maxGain )
00511         {
00512           gain += gainstep;
00513           //  cout<<"Increasing gain, lum too low and shutter already max"<<endl;
00514         }
00515       else{}
00516         //cout<<"All max it is to dark to play outside"<<endl;
00517     }
00518       ret = 1;
00519     }
00520   else if((higherLum - higherLumRef) > percent)
00521     {
00522       if(gain - gainstep > minGain + gainstep)
00523     {
00524       gain -= gainstep;
00525       //cout<<"Decreasing gain, lum too high and gain not min"<<endl;
00526     }
00527       else if(shutter - shutterstep > minShutter)
00528     {
00529       shutter -= shutterstep;
00530       //  cout<<"Decreasing shutter, lum too high"<<endl;
00531     }
00532       else
00533     {
00534       //cout<<"All min, high risk of sunburn"<<endl;
00535     }
00536       ret = -1;
00537     }
00538   else {
00539     //  cout<<"Light is good, no need to change"<<endl;
00540   }
00541
00542   return ret;
00543 }
00544
00545
00546
00547
00548 template<class StorageType>
00549 int ColorHistogram<StorageType>::CheckImageQualityComplete(float percent,
00550                                float &shutter,
00551                                float &gain)
00552 {
00553   double lowerLum =luminance_[0]+luminance_[1];
00554   double higherLum = luminance_[6]+luminance_[7];
00555   int ret =0;
00556   if(lowerLum > percent)
00557     {
00558       //cout<<"Luminance is low: increase!"<<endl;
00559       shutter = 1;
00560       ret = 1;
00561     }
00562   else if(higherLum > percent)
00563     {
00564       //cout<<"Luminance is high: decrease!"<<endl;
00565       shutter = -1;
00566       ret = -1;
00567     }
00568   else
00569     {
00570       //cout<<"Luminace is good, no need to modify"<<endl;
00571     }
00572   return ret;
00573 }
00574
00575
00576 template<class StorageType>
00577 int ColorHistogram<StorageType>::CheckImageQuality(float percent,
00578                            float &shutter,
00579                            float &gain)
00580 {
00581   std::vector<double> vHistL = GetHistL();
00582
00583      if(GetBinSize() == 32)
00584        {
00585
00586          double lowerLum =vHistL[0]+vHistL[1]+vHistL[2]+vHistL[3];
00587          double higherLum = vHistL[5]+vHistL[6]+vHistL[7];
00588
00589          if(lowerLum > percent)
00590            {
00591              cout<<"Luminance is low: increase!"<<endl;
00592              shutter = 1;
00593          return 1;
00594            }
00595          else if(higherLum > percent)
00596           {
00597              cout<<"Luminance is high: decrease!"<<endl;
00598              shutter = -1;
00599          return -1;
00600            }
00601      else
00602        {
00603          cout<<"Luminace is good, no need to modify"<<endl;
00604          return 0;
00605        }
00606        }
00607      else
00608        {
00609          BIASERR("Only implemented for binSizeHue==8");
00610      return -1;
00611        }
00612
00613   //return 0;
00614 }//end CheckImageQuality
00615
00616 /**
00617    dumps information on histogram to ostream
00618    format:
00619    binsize tab ux tab uy tab lx tab ly
00620    hs histogram, as a matrix with binsize x binsize (tab separated)
00621    l values as a line with lenght binsize (tab separated)
00622 */
00623 template<class StorageType>
00624 void ColorHistogram<StorageType>::DumpCSV(std::ostream& os)
00625 {
00626   int nBins = 256/binSize_;
00627   int nBinsSat = 256/binSizeSat_;
00628
00629   for(int i=0;i<nBins;i++){
00630     for(int j=0;j<nBinsSat;j++){
00631      os <<hist_[i][j]<<",";
00632     }
00633     os <<endl;
00634   }
00635   os<<endl; //create empty line
00636   //luminance
00637   for(int i=0;i<nBins;i++){
00638     os <<histl_[i]<<",";
00639   }
00640
00641   //complete luminance
00642   os <<endl<<endl;
00643   for(int i=0;i<8;i++){
00644     os <<luminance_[i]<<",";
00645   }
00646 }
00647
00648 /**
00649    dumps information on histogram to ostream
00650    format:
00651    binsize tab ux tab uy tab lx tab ly
00652    hs histogram, as a matrix with binsize x binsize (tab separated)
00653    l values as a line with lenght binsize (tab separated)
00654 */
00655 template<class StorageType>
00656 void ColorHistogram<StorageType>::Dump(std::ostream& os)
00657 {
00658   int nBins = 256/binSize_;
00659   int nBinsSat = 256/binSizeSat_;
00660
00661   os<<binSize_<<"\t"<<binSizeSat_<<"\t"<<ux_<<
00662     "\t"<<uy_<<"\t"<<lx_<<"\t"<<ly_<<endl;
00663
00664   for(int i=0;i<nBins;i++){
00665     for(int j=0;j<nBinsSat;j++){
00666      os <<hist_[i][j]<<"\t";
00667     }
00668     os <<endl;
00669   }
00670   os<<endl; //create empty line
00671
00672   for(int i=0;i<nBins;i++){
00673     os <<histl_[i]<<"\t";
00674   }
00675   //create empty line
00676   os <<endl<<endl;
00677    for(int i=0;i<8;i++){
00678     os <<luminance_[i]<<"\t";
00679   }
00680
00681   os <<endl<<endl;
00682   os <<binCount_<<endl;
00683 }
00684
00685 template<class StorageType>
00686 int ColorHistogram<StorageType>::GetNumberOfEntries()
00687 {
00688
00689   return 6 + (256/binSize_)*(256/binSizeSat_) + 2*(256/binSize_) +1;
00690 }
00691
00692
00693
00694
00695 //reads the information of a histogram from disk
00696 template<class StorageType>
00697 int ColorHistogram<StorageType>::Read(char *filename)
00698 {
00699   cout<<"Reading the histogram"<<endl;
00700   ifstream histofile(filename);
00701   if (!histofile){
00702     cerr << "unable to open " << filename<< endl;
00703     perror("");
00704     return -1;
00705   }
00706   int binSize,binSizeSat,ux,uy,lx,ly;
00707
00708   histofile >> binSize;
00709   histofile >> binSizeSat;
00710   histofile >> ux >> uy >> lx >> ly;
00711   SetBinSize(binSize,binSizeSat);
00712   SetROI(ux,uy,lx,ly);
00713   int nBins = 256/binSize_;
00714   int nBinsSat = 256/binSizeSat_;
00715   for(int i=0;i<nBins;i++){
00716     for(int j=0;j<nBinsSat;j++){
00717       histofile >> hist_[i][j];
00718     }
00719   }
00720
00721   //And now the L-vector
00722   for(int i=0;i<nBins;i++){
00723     histofile >> histl_[i];
00724
00725   }
00726
00727  for(int i=0;i<8;i++){
00728     histofile >> luminance_[i];
00729
00730   }
00731
00732
00733   return 0;
00734 }
00735
00736
00737 template<class StorageType>
00738 void ColorHistogram<StorageType>::Normalise_()
00739 {
00740   //go through whole vector and divide by binCount_
00741   const int end=256>>shift_;
00742   const int endSat=256>>shiftSat_;
00743   const int endLum=256>>shiftLum_;
00744
00745
00746   for(int i=0;i<end;i++){
00747     histl_[i]/=binCount_;
00748     for(int j=0;j<endSat;j++){
00749      hist_[i][j] /=binCount_;
00750     }
00751   }
00752   //normalise luminance as well
00753   for(int k=0;k<endLum;k++)
00754     {
00755       luminance_[k]/=binCount_;
00756     }
00757
00758   normalised_=true;
00759 }
00760
00761
00762 template<class StorageType>
00763 int ColorHistogram<StorageType>::DeleteHist_()
00764 {
00765   binCount_=0;
00766   histCount_=0;
00767   histl_.assign(histl_.size(),0);
00768   for (unsigned int i=0;i<hist_.size();i++) {
00769     hist_[i].assign(hist_.size(),0);
00770   }
00771
00772   return 0;
00773 }
00774
00775 template<class StorageType>
00776 float ColorHistogram<StorageType>::GetSaturatedBins() const
00777 {
00778   const int end=256>>shift_;
00779   const int endSat=256>>shiftSat_;
00780   float count=0;
00781   for(int i=0;i<end;i++){
00782     for(int j=0;j<endSat;j++){
00783       if (hist_[i][j]!=0) count++;
00784     }
00785   }
00786   count/=float(end*endSat);
00787   return count;
00788 }
00789
00790
00791 template<class StorageType>
00792 char* ColorHistogram<StorageType>::GetBinaryData(int &length){
00793   int dataLength= sizeof(double) * (hist_.size()*hist_[0].size() + histl_.size()*2)
00794     +  7*sizeof(int);
00795
00796   char *ptr = new char[dataLength];
00797   int *tmp_int_ptr=(int *)ptr;
00798   *tmp_int_ptr++ = binSize_;
00799   *tmp_int_ptr++ = binSizeSat_;
00800   *tmp_int_ptr++ = ux_;
00801   *tmp_int_ptr++ = uy_;
00802   *tmp_int_ptr++ = lx_;
00803   *tmp_int_ptr++ = ly_;
00804   *tmp_int_ptr++ = binCount_;
00805
00806   length += 7*sizeof(int);
00807   int numSat = 256/binSizeSat_;
00808   int numHue = 256/binSize_;
00809
00810
00811   double *tmp_ptr=(double*)tmp_int_ptr;
00812   for (int h=0; h<numHue; h++) {
00813     for (int s=0; s<numSat; s++){
00814       *tmp_ptr++ = hist_[h][s];
00815       length+=sizeof(double);
00816     }
00817   }
00818   for(int l=0;l<numHue;l++){
00819     *tmp_ptr++ = histl_[l];  length+=sizeof(double);}
00820
00821
00822   for(int t=0;t<numHue;t++){
00823     *tmp_ptr++ = luminance_[t];  length+=sizeof(double);}
00824
00825   return ptr;
00826 }
00827
00828 template<class StorageType>
00829 void ColorHistogram<StorageType>::ReadBinaryData(char *data)
00830 {
00831
00832   int *tmp_int_ptr =(int *)data;
00833   binSize_ = *tmp_int_ptr++;
00834   binSizeSat_ = *tmp_int_ptr++;
00835   ux_ = *tmp_int_ptr++;
00836   uy_ = *tmp_int_ptr++;
00837   lx_ = *tmp_int_ptr++;
00838   ly_ = *tmp_int_ptr++;
00839   binCount_ = *tmp_int_ptr++;
00840
00841   double *tmp_ptr=(double*)tmp_int_ptr;
00842
00843   SetBinSize(binSize_,binSizeSat_);
00844   SetROI(ux_,uy_,lx_,ly_);
00845   int nBins = 256/binSize_;
00846   int nBinsSat = 256/binSizeSat_;
00847   for(int i=0;i<nBins;i++){
00848     for(int j=0;j<nBinsSat;j++){
00849       hist_[i][j] = *tmp_ptr++;
00850     }
00851   }
00852
00853   //And now the L-vector
00854   for(int i=0;i<nBins;i++){
00855     histl_[i] = *tmp_ptr++;
00856   }
00857
00858  for(int i=0;i<nBins;i++){
00859    luminance_[i] = *tmp_ptr++;
00860  }
00861
00862 }
00863
00864
00865 #define INST(type) template class ColorHistogram<type>;
00866
00867 INST(float)
00868 INST(unsigned char)
00869
00870   // disabled untested instances, myriards of warnings
00871
00872 // #ifdef BUILD_IMAGE_INT
00873 // INST(int);
00874 // #endif
00875 // #ifdef BUILD_IMAGE_CHAR
00876 // INST(char);
00877 // #endif
00878 // #ifdef BUILD_IMAGE_SHORT
00879 // INST(short);
00880 // #endif
00881 // #ifdef BUILD_IMAGE_USHORT
00882 // INST(unsigned short);
00883 // #endif
00884 // #ifdef BUILD_IMAGE_USHORT
00885 // INST(unsigned int);
00886 // #endif
00887 // #ifdef BUILD_IMAGE_DOUBLE
00888 // INST(double);
00889 // #endif
00890
00891 } // namespace BIAS
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorHistogram.hh Source File

Image

ColorHistogram.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __COLORHISTOGRAM_HH__
00027 #define __COLORHISTOGRAM_HH__
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <vector>
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Math/Math.hh>
00033
00034
00035
00036 // start from big bits, because small bits are used in Image
00037 #define D_COLOR_HIST_VEC 0x8000000
00038
00039 namespace BIAS{
00040
00041
00042     /**
00043     @class ColorHistogram
00044     @ingroup g_image
00045     This Class handels Histogram matters on Images.
00046     It represents an histogram and offers basic methods
00047     on histograms.
00048     @author Ingo Schiller
00049     Histogram is represented in HSL by an double vector + vector for L values
00050     @status untested
00051     */
00052
00053     template <class StorageType>
00054     class BIASImage_EXPORT ColorHistogram
00055     {
00056     public:
00057         ///std Con-/Destructor
00058         ColorHistogram();
00059         ~ColorHistogram();
00060
00061
00062         /**
00063         Deletes current Histogram information
00064         */
00065         int Clear();
00066
00067
00068         /**
00069         set the coords for the ROI
00070         */
00071         int SetROI(int ux, int uy, int lx, int ly);
00072
00073         /**
00074         set the binsize (must be divideable by 2pown)
00075         */
00076         int SetBinSize(int binsize);
00077
00078         /**
00079         set the binsize for different binSizes (must be divideable by 2pown)
00080         */
00081         int SetBinSize(int binSizeHue, int binSizeSat);
00082
00083
00084         /**
00085         set minsat_, which defines the minimum saturation
00086         */
00087         inline void SetMinSat(int minsat)
00088         {minSat_ = minsat;}
00089
00090         /**
00091         sets Lambda, which is used to calculate the dist
00092         in CalcSimilarity
00093         */
00094         inline void SetLambda(int lambda)
00095         {lambda_=lambda;}
00096         /**
00097         sets expDist_ true or false, used to calculate the dist
00098         in CalcSimilarity
00099         */
00100         inline void SetExpDist(bool expdist)
00101         {expDist_ = expdist;}
00102
00103         /**
00104         GetBinSize
00105         @return the binSize of Hue and light
00106         */
00107         inline int GetBinSize() const {return binSize_;}
00108
00109         /**
00110         GetBinSizeSat
00111         @return the binSize of Sat
00112         */
00113         inline int GetBinSizeSat() const {return binSizeSat_;}
00114
00115         /**
00116         returns the histogram with H&S values
00117         */
00118         std::vector<std::vector<double> > GetHist() const;
00119
00120         /**
00121         returns the L-values of the HSLcolorspace that are <MINSAT in the ROI
00122         */
00123         std::vector<double> GetHistL() const;
00124
00125
00126         /**
00127         @returns the Height of the ROI
00128         */
00129         int GetHeightROI() const;
00130
00131         /**
00132         @returns the width of the ROI
00133         */
00134         int GetWidthROI() const;
00135
00136         /**
00137         @returns the coords of ROI in an array
00138         */
00139         void GetROI(std::vector<int>& roi) const;
00140
00141         /**
00142         calcluates the histogram from data and adds them to the internal data
00143         structures
00144         @author schiller
00145         @param image = the image
00146         @param ux = upper left corner x of region of interest
00147         @param uy = upper left corner y of region of interest
00148         @param lx = lower right corner x of region of interest
00149         @param ly = lower right corner y of region of interest
00150         */
00151         int GenerateHist(BIAS::Image<StorageType>& image,
00152             int ux, int uy, int lx, int ly);
00153
00154         /**
00155         calculates the Histogram of the image
00156         ATTENTION: ROI must be set in upper function SetROI if this function
00157         is used
00158         @param image = the image
00159         @returns -1 if image does not exist
00160         */
00161         int GenerateHist(BIAS::Image<StorageType>& image);
00162
00163
00164
00165         /** Updates the histogramm with values from hist,
00166         where the factor gives the weighting of the new values from hist.
00167         @return 0 in case of no error
00168         @author Daniel Grest, March 2004
00169         */
00170         int Update(const BIAS::ColorHistogram<StorageType> &hist,
00171             double factor=0.5);
00172
00173         /**
00174         Calculates the Bhattacharyya similarity Coeiffient^2
00175         which is the distance or difference of 2 colorhistograms
00176         @param the chist to compare with
00177         @returns double value, which indicates the similarity. 1 if similar.
00178         @author schiller March 2004
00179         */
00180         double CalcSimilarity(const BIAS::ColorHistogram<StorageType> chist) const;
00181
00182         /**
00183         Calculates the Bhattacharyya similarity Coeiffient^2
00184         which is the distance or difference of 2 colorhistograms.
00185         returns a weight, which is in [0..1] and is the percentage of the bins
00186         unequal zero.
00187         @param the chist to compare with
00188         @returns double value, which indicates the similarity. 1 if similar.
00189         @author grest May 2004
00190         */
00191         double CalcSimilarity(const BIAS::ColorHistogram<StorageType> chist,
00192             double &weight) const;
00193
00194         /** returns the percentage [0..1] of HS-bins in the histogram
00195         that have values
00196         unequal to zero
00197         @author grest, Mar 2005
00198         */
00199         float GetSaturatedBins() const;
00200
00201
00202         /**
00203         checks the image quality depending on the given Histogram
00204         and increases ,decreases shutter and gain
00205         @param percent = percentage of pixels in the luminance vector required
00206         @param hist = the colorhistogram of the interesting part of the image
00207         @param shutter = shutter value
00208         @param gain = gain value
00209         @returns -1 if lum too high , 1 if lum too low , 0 if lum is good
00210         @author schiller
00211         */
00212         int CheckImageQuality(float percent,
00213             float &shutter,
00214             float &gain);
00215
00216
00217
00218         /**
00219         same as above but luminance vector is created form
00220         all pixels in histogram
00221         @returns -1 if lum too high , 1 if lum too low , 0 if lum is good
00222         */
00223         int CheckImageQualityComplete(float percent,
00224             float &shutter,
00225             float &gain);
00226
00227
00228
00229         /**
00230         same as above but checks similarity of luminance to a
00231         given reference histogram
00232         @param cHist = the reference colorHistogram
00233         @returns -1 if lum too high , 1 if lum too low , 0 if lum is good
00234         */
00235         int CheckImageQualityRef(ColorHistogram<StorageType>& cHist,
00236             float percent,
00237             float &shutter,
00238             float &gain);
00239
00240         /**
00241         dumps information on histogram
00242         @param os = the outstream, default std::cout
00243         @author Schiller
00244         */
00245         void Dump(std::ostream& os=std::cout);
00246         void DumpCSV(std::ostream& os=std::cout);
00247
00248         /** returns the length of a dumped ColorHistogram
00249         this calculates of binsize, binsizesat (1 each)
00250         coords              (4)
00251         the matrix          (nrofbinssat * nrofbins)
00252         lvector             (nrofbins)
00253         luminance vector    (nrofbins)
00254         total pixelcount    (1)
00255         @author Ingo Schiller
00256         */
00257         int GetNumberOfEntries();
00258
00259         /**
00260         reads a histogram from instream and fills the internal data
00261         structures
00262         @param is = the instream
00263         @author Schiller March 2004
00264         @returns 0 if ok, -1 if no file
00265         */
00266         int Read(char *filename);
00267
00268         char* GetBinaryData(int &length);
00269
00270         void ReadBinaryData(char *data);
00271
00272
00273     public:
00274         //vector which holds complete luminance information of histogram.
00275         std::vector<double> luminance_ ;
00276
00277
00278     protected:
00279         /**
00280         Normalises the histogram to be able to use it in the Bhatt... Difference
00281         */
00282         void Normalise_();
00283
00284         /**
00285         deletes hist_, histl_...
00286         */
00287         int DeleteHist_();
00288
00289         bool normalised_;
00290
00291         unsigned short int histCount_;
00292         unsigned int binCount_; // number of bins in histogram
00293         BIAS::Image<StorageType> *image_;
00294         std::vector<std::vector<double> > hist_;// histogram
00295         std::vector<double> histl_; //the l-values below MINSAT
00296
00297         int ux_,uy_,lx_,ly_;
00298
00299         double minBinVal_, maxBinVal_;
00300
00301         //modifieable Parameters for GUI
00302         int binSize_;
00303         int binSizeSat_;
00304         int shift_; // used for shifting instead of dividing
00305         int shiftSat_;
00306         int shiftLum_;
00307         int minSat_,lambda_;
00308         bool expDist_;
00309     }; // class
00310
00311
00312 } // namespace BIAS
00313
00314 #include <Base/Common/BIASpragmaEnd.hh>
00315 #endif // __COLORHISTOGRAM_HH__
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorMultiHistogram.cpp Source File

Image

ColorMultiHistogram.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "ColorMultiHistogram.hh"
00027 #include <Base/Image/ImageBase.hh>
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 namespace BIAS {
00033
00034 /**
00035    This class creates a ColorMultiHistogram in the HSL color space.
00036    @author ingo schiller
00037    @date march 2004
00038  */
00039 template<class StorageType>
00040 ColorMultiHistogram<StorageType>::ColorMultiHistogram()
00041 {
00042   minSat_=10;
00043   lambda_=20;
00044   binSize_=32;
00045   hist1_.SetMinSat(minSat_);
00046   hist1_.SetLambda(lambda_);
00047   hist1_.SetBinSize(binSize_);
00048   hist1_.SetExpDist(true);
00049   hist2_.SetMinSat(minSat_);
00050   hist2_.SetLambda(lambda_);
00051   hist2_.SetBinSize(binSize_);
00052   hist2_.SetExpDist(true);
00053 }
00054
00055 template<class StorageType>
00056 ColorMultiHistogram<StorageType>::~ColorMultiHistogram()
00057 {
00058
00059 }
00060
00061
00062 //set the region of interest in first histogram
00063 template<class StorageType>
00064 int ColorMultiHistogram<StorageType>::SetROI1(int ux, int uy, int lx, int ly){
00065
00066   hist1_.SetROI(ux,uy,lx,ly);
00067
00068   return 0;
00069 }
00070
00071 //set the region of interest in second histogram
00072 template<class StorageType>
00073 int ColorMultiHistogram<StorageType>::SetROI2(int ux, int uy, int lx, int ly){
00074
00075   hist2_.SetROI(ux,uy,lx,ly);
00076   return 0;
00077 }
00078
00079
00080 //Set the binsize, which is then set in the ColorHistograms
00081 template<class StorageType>
00082 int ColorMultiHistogram<StorageType>::SetBinSize(int binsize){
00083   hist1_.SetBinSize(binsize);
00084   hist2_.SetBinSize(binsize);
00085   return 0;
00086 }
00087
00088 /**
00089    @returns the first ColorHistogram
00090 */
00091 template<class StorageType>
00092 ColorHistogram<StorageType> ColorMultiHistogram<StorageType>::GetHist1() const
00093 {
00094   return hist1_;
00095 }
00096
00097
00098 /**
00099    @returns the second ColorHistogram
00100 */
00101 template<class StorageType>
00102 ColorHistogram<StorageType> ColorMultiHistogram<StorageType>::GetHist2() const
00103 {
00104   return hist2_;
00105 }
00106
00107
00108 /**
00109    @returns the distance of the centers of the ROIs
00110    in pixels
00111 */
00112 template<class StorageType>
00113 void ColorMultiHistogram<StorageType>::GetDistROIs(std::vector<double>& dist) const
00114 {
00115   std::vector<int> first,second;
00116   dist.assign(2,0.0);
00117
00118   hist1_.GetROI(first);
00119   hist2_.GetROI(second);
00120
00121   dist[0]=(second[2]+second[0])/2-(first[2]+first[0])/2;
00122   dist[1]=(second[3]+second[1])/2-(first[3]+first[1])/2;
00123
00124 }
00125
00126
00127 template<class StorageType>
00128 int ColorMultiHistogram<StorageType>::Clear()
00129 {
00130   hist1_.Clear();
00131   hist2_.Clear();
00132
00133   return 0;
00134 }
00135
00136 /**
00137    simply call the GenerateHist() from ColorHistogram twice here
00138 */
00139 template<class StorageType>
00140 int ColorMultiHistogram<StorageType>::GenerateHist(BIAS::Image<StorageType>& img)
00141 {
00142   hist1_.GenerateHist(img);
00143   hist2_.GenerateHist(img);
00144   return 0;
00145 }
00146
00147 /**
00148    simply call the GenerateHist() from ColorHistogram twice here
00149 */
00150 template<>
00151 int ColorMultiHistogram<unsigned char>::GenerateHist(BIAS::Image<unsigned char>& img)
00152 {
00153   hist1_.GenerateHist(img);
00154   hist2_.GenerateHist(img);
00155
00156   return 0;
00157 }
00158
00159 /**
00160    simply call the CalcSimilarity from ColorHistograms here and
00161    multiply the values. This is the distance of the MultiHistogram
00162 */
00163 template<class StorageType>
00164 double ColorMultiHistogram<StorageType>::CalcSimilarity(const BIAS::ColorMultiHistogram<StorageType> &chist) const
00165 {
00166   //indicators for similarity
00167   double dist1=0,dist2=0;
00168   dist1=hist1_.CalcSimilarity(chist.GetHist1());
00169   //cout<<"Dist1: "<<dist1<<endl;
00170   dist2=hist2_.CalcSimilarity(chist.GetHist2());
00171   //cout<<"Dist2: "<<dist2<<endl;
00172   dist1+=dist2;
00173   dist1/=2;
00174   return dist1;
00175 }
00176
00177 template<class StorageType> double
00178 ColorMultiHistogram<StorageType>::CalcSimilarityColorWeighted(const BIAS::ColorMultiHistogram<StorageType> &chist) const
00179 {
00180   //indicators for similarity
00181   double dist1=0,dist2=0, w1, w2;
00182   dist1=hist1_.CalcSimilarity(chist.GetHist1(), w1);
00183   //cout<<"Dist1: "<<dist1<<endl;
00184   dist2=hist2_.CalcSimilarity(chist.GetHist2(), w2);
00185   //cout<<"Dist2: "<<dist2<<endl;
00186   dist1= (dist1*w1 + dist2*w2)  / (w1+w2);
00187   return dist1;
00188 }
00189
00190 template<class StorageType>
00191 int ColorMultiHistogram<StorageType>::Update(const ColorMultiHistogram<StorageType> &hist,double factor)
00192 {
00193   hist1_.Update(hist.GetHist1(),factor);
00194   hist2_.Update(hist.GetHist2(),factor);
00195   return 0;
00196 }
00197
00198
00199 /**
00200    dumps information on MultiHistogram to ostreams
00201    format: first hist1, then hist2
00202    binsize tab ux tab uy tab lx tab ly
00203    hs histogram, as a matrix with binsize x binsize (tab separated)
00204    l values as a line with lenght binsize (tab separated)
00205 */
00206 template<class StorageType>
00207 void ColorMultiHistogram<StorageType>::Dump(std::ostream& os,std::ostream& os2)
00208 {
00209   hist1_.Dump(os);
00210   hist2_.Dump(os2);
00211 }
00212
00213 //reads the information of a histogram from disk
00214 template<class StorageType>
00215 int ColorMultiHistogram<StorageType>::Read(char *filename1, char *filename2)
00216 {
00217   //cout<<"Reading the histograms"<<endl;
00218
00219   hist1_.Read(filename1);
00220   hist2_.Read(filename2);
00221
00222   return 0;
00223 }
00224
00225
00226
00227 #define INST(type) template class ColorMultiHistogram<type>;
00228
00229 INST(float)
00230 INST(unsigned char)
00231
00232   // disabled untested instances, myriards of warnings
00233 // #ifdef BUILD_IMAGE_INT
00234 // INST(int);
00235 // #endif
00236 // #ifdef BUILD_IMAGE_CHAR
00237 // INST(char);
00238 // #endif
00239 // #ifdef BUILD_IMAGE_SHORT
00240 // INST(short);
00241 // #endif
00242 // #ifdef BUILD_IMAGE_USHORT
00243 // INST(unsigned short);
00244 // #endif
00245 // #ifdef BUILD_IMAGE_USHORT
00246 // INST(unsigned int);
00247 // #endif
00248 // #ifdef BUILD_IMAGE_DOUBLE
00249 // INST(double);
00250 // #endif
00251
00252 } // namespace BIAS
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorMultiHistogram.hh Source File

Image

ColorMultiHistogram.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __COLOR_MULTI_HISTOGRAM_HH__
00027 #define __COLOR_MULTI_HISTOGRAM_HH__
00028
00029 #include <Base/Math/Math.hh>
00030 #include "ColorHistogram.hh"
00031
00032
00033 // start from big bits, because small bits are used in Image
00034 #define D_COLOR_MULTI_HIST_VEC 0x9000000
00035
00036 namespace BIAS{
00037
00038   /**
00039      @class ColorMultiHistogram
00040      This Class handels MultiHistogram matters on Images.
00041      it is derived from Colorhistogram, to make it usable just like a
00042      normal ColorHistogram
00043      It represents a Multihistogram and offers the same Methods as
00044      ColorHistogram
00045      @author Ingo Schiller March 2004
00046      MultiHistogram is represented by two ColorHistograms
00047      @status untested
00048    */
00049
00050 template <class StorageType>
00051 class BIASImage_EXPORT ColorMultiHistogram
00052   {
00053   public:
00054     ///
00055     ColorMultiHistogram();
00056     ~ColorMultiHistogram();
00057
00058
00059     /**
00060        Deletes ALL current Histogram information
00061     */
00062     int Clear();
00063
00064
00065     /**
00066        set the coords for the ROI in first Histogram
00067     */
00068     int SetROI1(int ux, int uy, int lx, int ly);
00069
00070     /**
00071        set the coords for the ROI in second Histogram
00072     */
00073     int SetROI2(int ux, int uy, int lx, int ly);
00074
00075
00076     /**
00077        set the binsize (must be divideable by 2pown)
00078     */
00079     int SetBinSize(int binsize);
00080
00081     /**
00082        set minsat_, which defines the minimum saturation
00083     */
00084     inline void SetMinSat(int minsat)
00085     {minSat_ = minsat;}
00086
00087     /**
00088        sets Lambda, which is used to calculate the dist
00089        in CalcSimilarity
00090     */
00091     inline void SetLambda(int lambda)
00092     {lambda_=lambda;}
00093
00094     /**
00095        GetBinSize
00096     */
00097     inline int GetBinSize() const {return binSize_;}
00098
00099     /**
00100        Get Hist1
00101        @return the first Histogram
00102     */
00103     ColorHistogram<StorageType> GetHist1() const;
00104
00105
00106     /**
00107        Get Hist2
00108        @return the second Histogram
00109     */
00110     ColorHistogram<StorageType> GetHist2() const;
00111
00112     /**
00113        @returns the distance of the two centers of the ROIs in pixels
00114        first x coords than y coord
00115     */
00116     void GetDistROIs(std::vector<double>& dist) const;
00117
00118     /**
00119       calculates the Histogram of the image
00120       ATTENTION: ROI must be set in upper function SetROI if this function
00121       is used
00122       @param image = the image
00123       @returns -1 if image does not exist
00124     */
00125     int GenerateHist(BIAS::Image<StorageType>& image);
00126
00127     /** Updates the histogramm with values from hist,
00128         where the factor gives the weighting of the new values from hist.
00129         @return 0 in case of no error
00130         @author Daniel Grest, March 2004
00131      */
00132     int Update(const BIAS::ColorMultiHistogram<StorageType> &hist,
00133                double factor=0.5);
00134
00135     /**
00136        Calculates the Bhattacharyya similarity Coeiffient^2
00137        which is the distance or difference of 2 ColorMultiHistograms
00138        @param the hist to compare with
00139        @returns double value, which indicates the similarity. 1 if similar.
00140        @author schiller March 2004
00141      */
00142     double CalcSimilarity(const ColorMultiHistogram<StorageType> &chist) const;
00143
00144      /**
00145        Calculates the Bhattacharyya similarity Coeiffient^2
00146        which is the distance or difference of 2 ColorMultiHistograms.
00147        Same As CalcSimilarity, but the two histogram values are weighted
00148        according to the amount of color bins which are not zero.
00149        @param the hist to compare with
00150        @returns double value, which indicates the similarity. 1 if similar.
00151        @author grest May 2004
00152      */
00153     double CalcSimilarityColorWeighted(const BIAS::ColorMultiHistogram<StorageType> &chist) const;
00154
00155     /**
00156        dumps information on the MultiHistogram
00157        calls the Dump of ColorHistogram
00158        @param os = the outstream, default std::cout
00159        @author Schiller
00160     */
00161     void Dump(std::ostream& os=std::cout,std::ostream& os2=std::cout);
00162
00163     /**
00164        reads a histogram from instream and fills the internal data
00165        structures
00166        @param the filenames of the two histograms
00167        @author Schiller March 2004
00168        @returns 0 if ok, -1 if no file
00169      */
00170     int Read(char *filename1, char *filename2);
00171
00172   protected:
00173
00174     // two ColorHistograms representating the Multihistogram
00175     BIAS::ColorHistogram<StorageType> hist1_, hist2_;
00176     //modifieable Parameters for GUI
00177     int binSize_,minSat_,lambda_;
00178
00179   }; // class
00180
00181
00182 } // namespace BIAS
00183 #endif // __COLOR_MULTI_HISTOGRAM_HH__
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorSegmentation.cpp Source File

Image

ColorSegmentation.cpp

Go to the documentation of this file.
00001 #include "ColorSegmentation.hh"
00002
00003
00004 #include <bias_config.h>
00005 #ifndef BIAS_HAVE_PTHREADS
00006 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::ImageCanvas needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00007 #endif
00008 #include <pthread.h>
00009
00010 #include <Base/Image/ImageConvert.hh>
00011 #include <Base/Image/ImageIO.hh>
00012 #include <Base/Debug/Exception.hh>
00013 #include <cmath>
00014
00015 using namespace BIAS;
00016 using namespace std;
00017
00018
00019 ColorSegmentation::
00020 ColorSegmentation()
00021 {
00022   stdFarbRaum=BIAS::ImageBase::CM_HSL;
00023 }
00024
00025
00026 void ColorSegmentation::
00027 SetColorSpace(BIAS::ImageBase::EColorModel farbraum)
00028 {
00029   stdFarbRaum=farbraum;
00030 }
00031
00032
00033 void ColorSegmentation::
00034 Segment(BIAS::Image<unsigned char> &src,
00035         BIAS::Image<unsigned char> &res,
00036         int hue, int hueIntervall, int minSaturation)
00037 {
00038   const unsigned int width = src.GetWidth();
00039   const unsigned int height = src.GetHeight();
00040
00041   if (res.GetWidth() !=  src.GetWidth() ||
00042     res.GetHeight() != src.GetHeight() ||
00043     res.GetChannelCount() != 1){
00044       if (!res.IsEmpty()){
00045         res.Release();
00046       }
00047     }
00048
00049     if(res.IsEmpty()){
00050       res = BIAS::Image<unsigned char>(width,height,1,false);
00051     }
00052
00053     unsigned char **ida = src.GetImageDataArray();
00054     if (src.GetColorModel() != stdFarbRaum){
00055       BIAS::ImageConvert::Convert(src,image,stdFarbRaum,false);
00056       ida = image.GetImageDataArray();
00057     }
00058
00059     unsigned char **rida = res.GetImageDataArray();
00060     int tl[] = {0, 0};
00061     int br[] = {(int)width, (int)height};
00062     Segment((const unsigned char **)ida, rida, tl, br, hue,
00063       hueIntervall, minSaturation);
00064 }
00065
00066
00067
00068 void ColorSegmentation::
00069 GetHueImage(BIAS::Image<unsigned char> &imgHue)
00070 {
00071   unsigned int width=image.GetWidth();
00072   unsigned int height=image.GetHeight();
00073   if(imgHue.IsEmpty())
00074   {
00075     imgHue=BIAS::Image<unsigned char>(width,height,1,false);
00076   }
00077   for (unsigned int y=0; y<height; y++)
00078   {
00079     for (unsigned int x=0;x<width; x++)
00080     {
00081       imgHue.SetPixel(image.GetImageDataArray()[y][3*x],x,y,0);
00082     }
00083   }
00084 }
00085
00086
00087 void ColorSegmentation::
00088 GetSatImage(BIAS::Image<unsigned char> &imgSat)
00089 {
00090
00091   unsigned int width=image.GetWidth();
00092   unsigned int height=image.GetHeight();
00093   if(imgSat.IsEmpty())
00094   {
00095     imgSat=BIAS::Image<unsigned char>(width,height,1,false);
00096   }
00097   for (unsigned int y=0; y<height; y++)
00098   {
00099     for (unsigned int x=0;x<width; x++)
00100     {
00101       imgSat.SetPixel(image.GetImageDataArray()[y][3*x+1],x,y,0);
00102     }
00103   }
00104 }
00105
00106
00107 void ColorSegmentation::
00108 GetGreyImage(BIAS::Image<unsigned char> &imgGrey)
00109 {
00110   unsigned int width=image.GetWidth();
00111   unsigned int height=image.GetHeight();
00112   if(imgGrey.IsEmpty())
00113   {
00114     imgGrey=BIAS::Image<unsigned char>(width,height,1,false);
00115   }
00116   for (unsigned int y=0; y<height; y++)
00117   {
00118     for (unsigned int x=0;x<width; x++)
00119     {
00120       imgGrey.SetPixel(image.GetImageDataArray()[y][3*x+2],x,y,0);
00121     }
00122   }
00123 }
00124
00125
00126 struct SegmentationData {
00127   int tl[2], br[2];
00128   const unsigned char **imgHSV;
00129   unsigned char **imRes;
00130   int hue, hueIntervall, minSaturation;
00131 };
00132
00133
00134 void ColorSegmentationThreaded::
00135 Segment(BIAS::Image<unsigned char> &src,
00136         BIAS::Image<unsigned char> &res,
00137         int hue, int hueIntervall,int minSaturation)
00138 {
00139   if (res.GetWidth() !=  src.GetWidth() ||
00140       res.GetHeight() != src.GetHeight() ||
00141       res.GetChannelCount() != 1){
00142     if (!res.IsEmpty()){
00143       res.Release();
00144     }
00145   }
00146
00147   if(res.IsEmpty()){
00148     res = BIAS::Image<unsigned char>(src.GetWidth(), src.GetHeight(), 1,false);
00149   }
00150
00151   Image<unsigned char> hsv;
00152   if (src.GetColorModel() != BIAS::ImageBase::CM_HSL){
00153     BIAS::ImageConvert::Convert(src, hsv, BIAS::ImageBase::CM_HSL, false);
00154   } else {
00155     hsv.StealImage(src);
00156   }
00157
00158   pthread_t thread1, thread2;
00159   SegmentationData d1, d2;
00160   const int width = (int)src.GetWidth();
00161   const int height = (int)src.GetHeight();
00162   d1.tl[0] = d1.tl[1] = 0;
00163   d1.br[0] = width; d1.br[1] = height/2;
00164   d2.tl[0] = 0;  d2.tl[1] = height/2-1;
00165   d2.br[0] = width; d2.br[1] = height;
00166   d1.imgHSV = d2.imgHSV = (const unsigned char **)hsv.GetImageDataArray();
00167   d1.imRes = d2.imRes = res.GetImageDataArray();
00168   d1.hue = d2.hue = hue;
00169   d1.hueIntervall = d2.hueIntervall = hueIntervall;
00170   d1.minSaturation = d2.minSaturation = minSaturation;
00171   if (pthread_create(&thread1, NULL,
00172                      &ColorSegmentationThreaded::Segment_, &d1)!=0){
00173     BEXCEPTION("error creating thread 1");
00174   }
00175   if (pthread_create(&thread2, NULL,
00176                      &ColorSegmentationThreaded::Segment_, &d2)!=0){
00177     BEXCEPTION("error creating thread 2");
00178   }
00179   if (pthread_join(thread1, NULL)!=0){
00180     BEXCEPTION("error joining thread 1");
00181   }
00182   if (pthread_join(thread2, NULL)!=0){
00183     BEXCEPTION("error joining thread 2");
00184   }
00185 }
00186
00187
00188 void *ColorSegmentationThreaded::
00189 Segment_(void *data)
00190 {
00191   SegmentationData *segdata = static_cast<SegmentationData *>(data);
00192   ColorSegmentation segmenter;
00193   segmenter.Segment(segdata->imgHSV, segdata->imRes, segdata->tl,
00194     segdata->br, segdata->hue,
00195     segdata->hueIntervall, segdata->minSaturation);
00196   return (void *)(NULL);
00197 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ColorSegmentation.hh Source File

Image

ColorSegmentation.hh

Go to the documentation of this file.
00001 #ifndef _ColorSegmentation_hh_
00002 #define _ColorSegmentation_hh_
00003
00004 #include <bias_config.h>
00005 #ifndef BIAS_HAVE_PTHREADS
00006 #  error You need pthreads. Please recompile BIAS wih USE_PTHREADS
00007 #endif // BIAS_HAVE_PTHREADS
00008
00009 #include <Base/Image/Image.hh>
00010
00011
00012
00013 namespace BIAS {
00014
00015   /** @class ColorSegmentation
00016   @brief
00017   @author africk */
00018   class ColorSegmentation
00019     : public BIAS::Debug
00020   {
00021   public:
00022     ColorSegmentation();
00023     void SetColorSpace(BIAS::ImageBase::EColorModel farbraum);
00024     void Segment(BIAS::Image<unsigned char> &src,
00025       BIAS::Image<unsigned char> &res,
00026       int hue,int hueIntervall,int minSaturation);
00027     void GetHueImage(BIAS::Image<unsigned char> &imgHue);
00028     void GetSatImage(BIAS::Image<unsigned char> &imgSat);
00029     void GetGreyImage(BIAS::Image<unsigned char> &imgGrey);
00030
00031     inline void Segment(const unsigned char **src, unsigned char **dst,
00032                         const int tl[2], const int br[2],
00033                         const int hue, const int hueIntervall,
00034                         const int minSaturation)
00035     {
00036       register int x, y;
00037       int c, s, d;
00038       for (y = tl[1]; y < br[1]; y++) {
00039         for (x = tl[0]; x < br[0]; x++) {
00040           c = (int)src[y][3*x];
00041           s = (int)src[y][3*x+1];
00042           d = abs(hue-c);
00043           //if (d>=128) d=256-d;
00044           if (d<=hueIntervall && s>=minSaturation)
00045             dst[y][x] = 255;
00046           else
00047             dst[y][x] = 0;
00048         }
00049       }
00050     };
00051
00052   protected:
00053     BIAS::Image<unsigned char> image;
00054     BIAS::ImageBase::EColorModel stdFarbRaum;
00055
00056   };
00057
00058   class ColorSegmentationThreaded
00059   {
00060   public:
00061     void Segment(BIAS::Image<unsigned char> &src,
00062       BIAS::Image<unsigned char> &res,
00063       int hue,int hueIntervall,int minSaturation);
00064   protected:
00065     static void *Segment_(void *data);
00066
00067   };
00068
00069 }
00070
00071 #endif
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/CompareFloatingPoint.hh Source File

Base » Common

CompareFloatingPoint.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _CompareFloatingPoint_hh_
00025 #define _CompareFloatingPoint_hh_
00026
00027 #include <limits>
00028 #include <cmath>
00029
00030 namespace BIAS {
00031
00032   /** @brief comparison function for floating point values
00033       @author woelk 02/2006 */
00034   template <typename T> // left < right
00035   inline bool Less(const T left, const T right,
00036                    const T eps = std::numeric_limits<T>::epsilon())
00037   { return ((right-left) > eps); }
00038
00039   /** @brief comparison function for floating point values
00040       @author woelk 02/2006 */
00041   template <typename T>  // left <= right
00042   inline bool LessEqual(const T left, const T right,
00043                         const T eps = std::numeric_limits<T>::epsilon())
00044   { return (Less(left, right, eps) || Equal(left, right, eps)); }
00045
00046   /** @brief comparison function for floating point values
00047       @author woelk 02/2006 */
00048   template <class T> // left > right
00049   inline bool Greater(const T left, const T right,
00050                       const T eps = std::numeric_limits<T>::epsilon())
00051   { return ((left-right) > eps); }
00052
00053   /** @brief comparison function for floating point values
00054       @author woelk 02/2006 */
00055   template <class T> // left >= right
00056   inline bool GreaterEqual(const T left, const T right,
00057                            const T eps = std::numeric_limits<T>::epsilon())
00058   { return (Greater(left,right) || Equal(left, right, eps)); }
00059
00060   /** @brief comparison function for floating point values
00061       See http://www.boost.org/libs/test/doc/components/test_tools/floating_point_comparison.html and
00062       for discussion
00063       @author woelk 02/2006 */
00064   template <class T> // left == right
00065   inline bool Equal(const T left, const T right,
00066                     const T eps = std::numeric_limits<T>::epsilon())
00067   { return (fabs(left-right) <= eps * fabs(right) ||
00068             fabs(left-right) <= eps * fabs(left) ); }
00069
00070 }
00071
00072 #endif // _CompareFloatingPoint_hh_
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CompressJpeg.cpp Source File

Image

CompressJpeg.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "CompressJpeg.hh"
00026
00027 /*
00028  * Include file for users of JPEG library.
00029  * You will need to have included system headers that define at least
00030  * the typedefs FILE and size_t before you can include jpeglib.h.
00031  * (stdio.h is sufficient on ANSI-conforming systems.)
00032  * You may also wish to include "jerror.h".
00033  */
00034
00035 extern "C" {
00036 #include "jpeglib.h"
00037 }
00038
00039 /*
00040  * <setjmp.h> is used for the optional error recovery mechanism shown in
00041  * the second part of the example.
00042  */
00043
00044 #include <setjmp.h>
00045
00046 /*
00047  * include memory-system-funcs
00048  */
00049 #ifdef WIN32
00050 #include <io.h>
00051 #else
00052 #include <sys/mman.h>
00053 #endif
00054 #include <fcntl.h>
00055 #include <sys/types.h>
00056
00057
00058 /*
00059  * global vars for jpeg-library
00060  */
00061 extern "C" {
00062   JSAMPLE * image_buffer;   /* Points to large array of R,G,B-order data */
00063   int image_height;       /* Number of rows in image */
00064   int image_width;          /* Number of columns in image */
00065   int image_channels;     /* Number of channels in image */
00066 }
00067
00068
00069
00070 using namespace std;
00071 using namespace BIAS;
00072
00073
00074 /*
00075  * Some stuff for decompressor-method
00076  */
00077 struct my_error_mgr {
00078   struct jpeg_error_mgr pub;    /* "public" fields */
00079
00080   jmp_buf setjmp_buffer;    /* for return to caller */
00081 };
00082
00083 typedef struct my_error_mgr * my_error_ptr;
00084
00085 /*
00086  * Here's the routine that will replace the standard error_exit method:
00087  */
00088 METHODDEF(void)
00089 my_error_exit (j_common_ptr cinfo)
00090 {
00091   /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
00092   my_error_ptr myerr = (my_error_ptr) cinfo->err;
00093
00094   /* Always display the message. */
00095   /* We could postpone this until after returning, if we chose. */
00096   (*cinfo->err->output_message) (cinfo);
00097
00098   /* Return control to the setjmp point */
00099   longjmp(myerr->setjmp_buffer, 1);
00100 }
00101
00102 /**
00103    Routines for source (data array) managing
00104 */
00105 METHODDEF(void)
00106 init_source (j_decompress_ptr /*cinfo*/)
00107 {
00108   /* no work necessary here */
00109 }
00110 METHODDEF(boolean)
00111 fill_input_buffer (j_decompress_ptr cinfo)
00112 {
00113   static JOCTET dummy[] = { (JOCTET) 0xFF, (JOCTET) JPEG_EOI };
00114
00115   // WARNMS(cinfo, JWRN_JPEG_EOF);
00116
00117   /* Insert a fake EOI marker */
00118
00119   cinfo->src->next_input_byte = dummy;
00120   cinfo->src->bytes_in_buffer = 2;
00121
00122   return TRUE;
00123 }
00124 METHODDEF(void)
00125 skip_input_data (j_decompress_ptr cinfo, long num_bytes)
00126 {
00127   if (num_bytes > 0) {
00128     while (num_bytes > (long) cinfo->src->bytes_in_buffer) {
00129       num_bytes -= (long) cinfo->src->bytes_in_buffer;
00130       (void) fill_input_buffer(cinfo);
00131     }
00132     cinfo->src->next_input_byte += (size_t) num_bytes;
00133     cinfo->src->bytes_in_buffer -= (size_t) num_bytes;
00134   }
00135
00136 }
00137
00138 METHODDEF(void)
00139 term_source (j_decompress_ptr /* cinfo*/)
00140 {
00141   /* no work necessary here */
00142 }
00143
00144
00145 /**
00146    Routines for destination (data array) managing
00147 */
00148 METHODDEF(void)
00149 init_destination (j_compress_ptr /*cinfo*/)
00150 { /* initialize destination */
00151   /* no work necessary here (buffer = data) */
00152 }
00153 METHODDEF(boolean)
00154 empty_output_buffer (j_compress_ptr cinfo)
00155 {
00156   BIASERR("JPEG-buffer is too small!!!");
00157   cinfo->dest->next_output_byte = NULL;
00158   cinfo->dest->free_in_buffer = 0;
00159   return true;
00160 }
00161 METHODDEF(void)
00162 term_destination (j_compress_ptr /*cinfo*/)
00163 {
00164   /* no work necessary here */
00165 }
00166
00167
00168 /**
00169    Routine for using libjpeg compression-methods
00170    (borrowed from libjpeg-example, with litle changes)
00171 */
00172 int create_JPEG_file (void * outfile, long length, int quality)
00173 {
00174   /* This struct contains the JPEG compression parameters and pointers to
00175    * working space (which is allocated as needed by the JPEG library).
00176    * It is possible to have several such structures, representing multiple
00177    * compression/decompression processes, in existence at once.  We refer
00178    * to any one struct (and its associated working data) as a "JPEG object".
00179    */
00180   struct jpeg_compress_struct cinfo;
00181   /* This struct represents a JPEG error handler.  It is declared separately
00182    * because applications often want to supply a specialized error handler
00183    * (see the second half of this file for an example).  But here we just
00184    * take the easy way out and use the standard error handler, which will
00185    * print a message on stderr and call exit() if compression fails.
00186    * Note that this struct must live as long as the main JPEG parameter
00187    * struct, to avoid dangling-pointer problems.
00188    */
00189   struct jpeg_error_mgr jerr;
00190   struct jpeg_destination_mgr jdest;
00191   /* More stuff */
00192   JSAMPROW row_pointer[1];  /* pointer to JSAMPLE row[s] */
00193   int row_stride;       /* physical row width in image buffer */
00194
00195   /* Step 1: allocate and initialize JPEG compression object */
00196
00197   /* We have to set up the error handler first, in case the initialization
00198    * step fails.  (Unlikely, but it could happen if you are out of memory.)
00199    * This routine fills in the contents of struct jerr, and returns jerr's
00200    * address which we place into the link field in cinfo.
00201    */
00202   cinfo.err = jpeg_std_error(&jerr);
00203   /* Now we can initialize the JPEG compression object. */
00204   jpeg_create_compress(&cinfo);
00205
00206   /* Step 2: specify data destination (eg, a file) */
00207   /* Note: steps 2 and 3 can be done in either order. */
00208
00209   /* Here we use the library-supplied code to send compressed data to a
00210    * stdio stream.  You can also write your own code to do something else.
00211    * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
00212    * requires it in order to write binary files.
00213    */
00214   //no more files
00215   //   if (outfile == NULL) {
00216   //     fprintf(stderr, "can't open \n");
00217   //     return -1;
00218   //   }
00219   //   jpeg_stdio_dest(&cinfo, outfile);
00220   //init destination mgr
00221   cinfo.dest = &jdest;
00222   jdest.init_destination = init_destination;
00223   jdest.empty_output_buffer = empty_output_buffer;
00224   jdest.term_destination = term_destination;
00225   jdest.free_in_buffer = length;
00226   jdest.next_output_byte = (JOCTET *) outfile;
00227
00228   /* Step 3: set parameters for compression */
00229
00230   /* First we supply a description of the input image.
00231    * Four fields of the cinfo struct must be filled in:
00232    */
00233   cinfo.image_width = image_width;  /* image width and height, in pixels */
00234   cinfo.image_height = image_height;
00235   cinfo.input_components = image_channels;/* # of color components per pixel */
00236   if (image_channels == 1) {
00237     cinfo.in_color_space = JCS_GRAYSCALE;   /* colorspace of input image */
00238   } else if (image_channels == 3) {
00239     cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
00240   } else {
00241     BIASERR("Compression not implemented for images with channels != 1,3");
00242     return -1;
00243   }
00244   /* Now use the library's routine to set default compression parameters.
00245    * (You must set at least cinfo.in_color_space before calling this,
00246    * since the defaults depend on the source color space.)
00247    */
00248   jpeg_set_defaults(&cinfo);
00249   /* Now you can set any non-default parameters you wish to.
00250    * Here we just illustrate the use of quality (quantization table) scaling:
00251    */
00252   jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
00253
00254   /* Step 4: Start compressor */
00255
00256   /* TRUE ensures that we will write a complete interchange-JPEG file.
00257    * Pass TRUE unless you are very sure of what you're doing.
00258    */
00259   jpeg_start_compress(&cinfo, TRUE);
00260
00261   /* Step 5: while (scan lines remain to be written) */
00262   /*           jpeg_write_scanlines(...); */
00263
00264   /* Here we use the library's state variable cinfo.next_scanline as the
00265    * loop counter, so that we don't have to keep track ourselves.
00266    * To keep things simple, we pass one scanline per call; you can pass
00267    * more if you wish, though.
00268    */
00269   row_stride = image_width * image_channels;/*SAMPLEs per row in image_buffer*/
00270
00271   while (cinfo.next_scanline < cinfo.image_height) {
00272     /* jpeg_write_scanlines expects an array of pointers to scanlines.
00273      * Here the array is only one element long, but you could pass
00274      * more than one scanline at a time if that's more convenient.
00275      */
00276     row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
00277     (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
00278   }
00279
00280   /* Step 6: Finish compression */
00281
00282   jpeg_finish_compress(&cinfo);
00283
00284   int res = length - cinfo.dest->free_in_buffer;
00285   /* After finish_compress, we can close the output file. */
00286   // fclose(outfile); NOT closed -> needed for next cicle and filelength
00287
00288   /* Step 7: release JPEG compression object */
00289
00290   /* This is an important step since it will release a good deal of memory. */
00291   jpeg_destroy_compress(&cinfo);
00292
00293   /* And we're done! */
00294   return res;
00295 }
00296
00297
00298 int deflate_JPEG_file (void * infile, long length,
00299                        BIAS::Image<unsigned char> &destImg)
00300 {
00301   /* This struct contains the JPEG decompression parameters and pointers to
00302    * working space (which is allocated as needed by the JPEG library).
00303    */
00304   struct jpeg_decompress_struct cinfo;
00305   /* We use our protected extension JPEG error handler.
00306    * Note that this struct must live as long as the main JPEG parameter
00307    * struct, to avoid dangling-pointer problems.
00308    */
00309   struct my_error_mgr jerr;
00310   //hanlder for datasource
00311   struct jpeg_source_mgr jsrc;
00312   /* More stuff */
00313   JSAMPARRAY buffer;        /* Output row buffer */
00314   int row_stride;       /* physical row width in output buffer */
00315
00316   /* In this example we want to open the input file before doing anything else,
00317    * so that the setjmp() error recovery below can assume the file is open.
00318    * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
00319    * requires it in order to read binary files.
00320    */
00321
00322   if (infile == NULL) {
00323     BIASERR("No source JPEG given!!!");
00324     return -1;
00325   }
00326
00327   /* Step 1: allocate and initialize JPEG decompression object */
00328
00329   /* We set up the normal JPEG error routines, then override error_exit. */
00330   cinfo.err = jpeg_std_error(&jerr.pub);
00331   jerr.pub.error_exit = my_error_exit;
00332   /* Establish the setjmp return context for my_error_exit to use. */
00333   if (setjmp(jerr.setjmp_buffer)) {
00334     /* If we get here, the JPEG code has signaled an error.
00335      * We need to clean up the JPEG object, close the input file, and return.
00336      */
00337     jpeg_destroy_decompress(&cinfo);
00338     return -1;
00339   }
00340   /* Now we can initialize the JPEG decompression object. */
00341   jpeg_create_decompress(&cinfo);
00342
00343   /* Step 2: specify data source (eg, a file) */
00344
00345   // No longer from file
00346   //  jpeg_stdio_src(&cinfo, infile);
00347   if (length == 0) {
00348     /* Treat empty input data as fatal error */
00349     jpeg_destroy_decompress(&cinfo);
00350     return -1;
00351   }
00352   //set function pointers for source-mgr
00353   cinfo.src = &jsrc;
00354   jsrc.init_source = init_source;
00355   jsrc.fill_input_buffer = fill_input_buffer;
00356   jsrc.skip_input_data = skip_input_data;
00357   jsrc.resync_to_restart = jpeg_resync_to_restart; /* use default method */
00358   jsrc.term_source = term_source;
00359   jsrc.bytes_in_buffer = length;
00360   jsrc.next_input_byte = (JOCTET *) infile;
00361
00362   /* Step 3: read file parameters with jpeg_read_header() */
00363
00364   (void) jpeg_read_header(&cinfo, TRUE);
00365   /* We can ignore the return value from jpeg_read_header since
00366    *   (a) suspension is not possible with the stdio data source, and
00367    *   (b) we passed TRUE to reject a tables-only JPEG file as an error.
00368    * See libjpeg.doc for more info.
00369    */
00370
00371   /* Step 4: set parameters for decompression */
00372
00373   /* In this example, we don't need to change any of the defaults set by
00374    * jpeg_read_header(), so we do nothing here.
00375    */
00376
00377   /* Step 5: Start decompressor */
00378
00379   (void) jpeg_start_decompress(&cinfo);
00380   /* We can ignore the return value since suspension is not possible
00381    * with the stdio data source.
00382    */
00383
00384   /* We may need to do some setup of our own at this point before reading
00385    * the data.  After jpeg_start_decompress() we have the correct scaled
00386    * output image dimensions available, as well as the output colormap
00387    * if we asked for color quantization.
00388    * In this example, we need to make an output work buffer of the right size.
00389    */
00390   if (destImg.IsEmpty()) {
00391     destImg.Init(cinfo.output_width, cinfo.output_height,
00392                  cinfo.output_components);
00393   }
00394   //#ifdef BIAS_DEBUG
00395   if ((destImg.GetWidth() != (unsigned int) cinfo.output_width)||
00396       (destImg.GetHeight() != (unsigned int) cinfo.output_height)||
00397       (destImg.GetChannelCount() != (unsigned int) cinfo.output_components)) {
00398     BIASWARN("Given image has wrong format (height, width, ...) but is now initialized correctly!!!");
00399     destImg.Release();
00400     destImg.Init(cinfo.output_width, cinfo.output_height,
00401                  cinfo.output_components);
00402   }
00403   //#endif //BIAS_DEBUG
00404
00405   unsigned char** img_data = destImg.GetImageDataArray();
00406   /* JSAMPLEs per row in output buffer */
00407   row_stride = cinfo.output_width * cinfo.output_components;
00408   /* Make a one-row-high sample array that will go away when done with image */
00409   buffer = (*cinfo.mem->alloc_sarray)
00410     ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
00411
00412
00413   /* Step 6: while (scan lines remain to be read) */
00414   /*           jpeg_read_scanlines(...); */
00415
00416   /* Here we use the library's state variable cinfo.output_scanline as the
00417    * loop counter, so that we don't have to keep track ourselves.
00418    */
00419   while (cinfo.output_scanline < cinfo.output_height) {
00420     /* jpeg_read_scanlines expects an array of pointers to scanlines.
00421      * Here the array is only one element long, but you could ask for
00422      * more than one scanline at a time if that's more convenient.
00423      */
00424     (void) jpeg_read_scanlines(&cinfo, buffer, 1);
00425     /* Assume put_scanline_someplace wants a pointer and sample count.
00426        canceld for use directly with img_data
00427        put_scanline_someplace(buffer[0], row_stride);
00428     */
00429     memcpy(img_data[cinfo.output_scanline-1],buffer[0],row_stride);
00430   }
00431
00432   /* Step 7: Finish decompression */
00433
00434   (void) jpeg_finish_decompress(&cinfo);
00435   /* We can ignore the return value since suspension is not possible
00436    * with the stdio data source.
00437    */
00438
00439   /* Step 8: Release JPEG decompression object */
00440
00441   /* This is an important step since it will release a good deal of memory. */
00442   jpeg_destroy_decompress(&cinfo);
00443
00444   /* After finish_decompress, we can close the input file.
00445    * Here we postpone it until after no more JPEG errors are possible,
00446    * so as to simplify the setjmp error logic above.  (Actually, I don't
00447    * think that jpeg_destroy can do an error exit, but why assume anything...)
00448    */
00449   // will be done outside fclose(infile);
00450
00451   /* At this point you may want to check to see whether any corrupt-data
00452    * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
00453    */
00454
00455   /* And we're done! */
00456   return 0;
00457 }
00458
00459 int deflate_JPEG_file (void * infile, long length, unsigned int &width,
00460                        unsigned int &height, unsigned int &channels,
00461                        unsigned char* &data)
00462 {
00463   /* This struct contains the JPEG decompression parameters and pointers to
00464    * working space (which is allocated as needed by the JPEG library).
00465    */
00466   struct jpeg_decompress_struct cinfo;
00467   /* We use our protected extension JPEG error handler.
00468    * Note that this struct must live as long as the main JPEG parameter
00469    * struct, to avoid dangling-pointer problems.
00470    */
00471   struct my_error_mgr jerr;
00472   //hanlder for datasource
00473   struct jpeg_source_mgr jsrc;
00474   /* More stuff */
00475   JSAMPARRAY buffer;        /* Output row buffer */
00476   int row_stride;       /* physical row width in output buffer */
00477
00478   /* In this example we want to open the input file before doing anything else,
00479    * so that the setjmp() error recovery below can assume the file is open.
00480    * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
00481    * requires it in order to read binary files.
00482    */
00483
00484   if (infile == NULL) {
00485     BIASERR("No source JPEG given!!!");
00486     return -1;
00487   }
00488
00489   /* Step 1: allocate and initialize JPEG decompression object */
00490
00491   /* We set up the normal JPEG error routines, then override error_exit. */
00492   cinfo.err = jpeg_std_error(&jerr.pub);
00493   jerr.pub.error_exit = my_error_exit;
00494   /* Establish the setjmp return context for my_error_exit to use. */
00495   if (setjmp(jerr.setjmp_buffer)) {
00496     /* If we get here, the JPEG code has signaled an error.
00497      * We need to clean up the JPEG object, close the input file, and return.
00498      */
00499     jpeg_destroy_decompress(&cinfo);
00500     return -1;
00501   }
00502   /* Now we can initialize the JPEG decompression object. */
00503   jpeg_create_decompress(&cinfo);
00504
00505   /* Step 2: specify data source (eg, a file) */
00506
00507   // No longer from file
00508   //  jpeg_stdio_src(&cinfo, infile);
00509   if (length == 0) {
00510     /* Treat empty input data as fatal error */
00511     jpeg_destroy_decompress(&cinfo);
00512     return -1;
00513   }
00514   //set function pointers for source-mgr
00515   cinfo.src = &jsrc;
00516   jsrc.init_source = init_source;
00517   jsrc.fill_input_buffer = fill_input_buffer;
00518   jsrc.skip_input_data = skip_input_data;
00519   jsrc.resync_to_restart = jpeg_resync_to_restart; /* use default method */
00520   jsrc.term_source = term_source;
00521   jsrc.bytes_in_buffer = length;
00522   jsrc.next_input_byte = (JOCTET *) infile;
00523
00524   /* Step 3: read file parameters with jpeg_read_header() */
00525
00526   (void) jpeg_read_header(&cinfo, TRUE);
00527   /* We can ignore the return value from jpeg_read_header since
00528    *   (a) suspension is not possible with the stdio data source, and
00529    *   (b) we passed TRUE to reject a tables-only JPEG file as an error.
00530    * See libjpeg.doc for more info.
00531    */
00532
00533   /* Step 4: set parameters for decompression */
00534
00535   /* In this example, we don't need to change any of the defaults set by
00536    * jpeg_read_header(), so we do nothing here.
00537    */
00538
00539   /* Step 5: Start decompressor */
00540
00541   (void) jpeg_start_decompress(&cinfo);
00542   /* We can ignore the return value since suspension is not possible
00543    * with the stdio data source.
00544    */
00545
00546   /* We may need to do some setup of our own at this point before reading
00547    * the data.  After jpeg_start_decompress() we have the correct scaled
00548    * output image dimensions available, as well as the output colormap
00549    * if we asked for color quantization.
00550    * In this example, we need to make an output work buffer of the right size.
00551    */
00552   width = cinfo.output_width;
00553   height = cinfo.output_height;
00554   channels = cinfo.output_components;
00555
00556   if (data == NULL) {
00557     BIASWARN("Allocating " << width * height * channels << " bytes of mem for"
00558              << " returned datafield!!!\n");
00559     data = new unsigned char[width * height * channels];
00560   }
00561
00562   /* JSAMPLEs per row in output buffer */
00563   row_stride = cinfo.output_width * cinfo.output_components;
00564   /* Make a one-row-high sample array that will go away when done with image */
00565   buffer = (*cinfo.mem->alloc_sarray)
00566     ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
00567
00568
00569   /* Step 6: while (scan lines remain to be read) */
00570   /*           jpeg_read_scanlines(...); */
00571
00572   /* Here we use the library's state variable cinfo.output_scanline as the
00573    * loop counter, so that we don't have to keep track ourselves.
00574    */
00575   while (cinfo.output_scanline < cinfo.output_height) {
00576     /* jpeg_read_scanlines expects an array of pointers to scanlines.
00577      * Here the array is only one element long, but you could ask for
00578      * more than one scanline at a time if that's more convenient.
00579      */
00580     (void) jpeg_read_scanlines(&cinfo, buffer, 1);
00581     /* Assume put_scanline_someplace wants a pointer and sample count.
00582        canceld for use directly with img_data
00583        put_scanline_someplace(buffer[0], row_stride);
00584     */
00585     memcpy(data + (cinfo.output_scanline-1)*width*channels, buffer[0], row_stride);
00586   }
00587
00588   /* Step 7: Finish decompression */
00589
00590   (void) jpeg_finish_decompress(&cinfo);
00591   /* We can ignore the return value since suspension is not possible
00592    * with the stdio data source.
00593    */
00594
00595   /* Step 8: Release JPEG decompression object */
00596
00597   /* This is an important step since it will release a good deal of memory. */
00598   jpeg_destroy_decompress(&cinfo);
00599
00600   /* After finish_decompress, we can close the input file.
00601    * Here we postpone it until after no more JPEG errors are possible,
00602    * so as to simplify the setjmp error logic above.  (Actually, I don't
00603    * think that jpeg_destroy can do an error exit, but why assume anything...)
00604    */
00605   // will be done outside fclose(infile);
00606
00607   /* At this point you may want to check to see whether any corrupt-data
00608    * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
00609    */
00610
00611   /* And we're done! */
00612   return 0;
00613 }
00614
00615
00616
00617
00618 JpegHandler::JpegHandler() {
00619
00620   data_ = NULL;
00621   dataLength_ = 0;
00622   buffsize_ = 0;
00623   setup_ = false;
00624
00625 }
00626
00627 JpegHandler::~JpegHandler() {
00628   if (setup_) Release();
00629 }
00630
00631 int JpegHandler::Init(long size) {
00632
00633   if (setup_) {
00634     Release();
00635   }
00636
00637   buffsize_ = size;
00638
00639   //create buffer
00640   data_ = (void *) new unsigned char[buffsize_];
00641
00642   if (data_ == NULL) {
00643     BIASERR("Could not create buffer!!!");
00644     return -1;
00645   }
00646
00647   setup_ = true;
00648
00649   return 0;
00650 }
00651
00652 void JpegHandler::Release() {
00653
00654   setup_ = false;
00655
00656   delete[] ((unsigned char *) data_);
00657
00658   buffsize_ = 0;
00659 }
00660
00661 int JpegHandler::Compress(BIAS::Image<unsigned char> &srcImg, int quality) {
00662
00663   if (!setup_) {
00664     BIASERR("Object has not been set up. Call Init(...) first!!!");
00665     return -1;
00666   }
00667
00668   image_height = srcImg.GetHeight();
00669   image_width = srcImg.GetWidth();
00670   image_channels = srcImg.GetChannelCount();
00671   image_buffer = srcImg.GetImageData();
00672
00673   dataLength_ = create_JPEG_file(data_, buffsize_, quality);
00674
00675   if (dataLength_ < 0) {
00676     BIASERR("Error crunching JPEG-image\n");
00677     dataLength_ = 0;
00678     return -1;
00679   }
00680
00681   return 0;
00682 }
00683
00684 int JpegHandler::Compress(unsigned int width, unsigned int height, unsigned int channels,
00685                           unsigned char* data, int quality) {
00686
00687   if (!setup_) {
00688     BIASERR("Object has not been set up. Call Init(...) first!!!");
00689     return -1;
00690   }
00691
00692   image_height = height;
00693   image_width = width;
00694   image_channels = channels;
00695   image_buffer = data;
00696
00697   dataLength_ = create_JPEG_file(data_, buffsize_, quality);
00698
00699   if (dataLength_ < 0) {
00700     BIASERR("Error crunching JPEG-image\n");
00701     dataLength_ = 0;
00702     return -1;
00703   }
00704
00705   return 0;
00706 }
00707
00708 int JpegHandler::Decompress(BIAS::Image<unsigned char> &destImg) {
00709
00710   if (!setup_) {
00711     BIASERR("Object has not been set up. Call Init(...) first!!!");
00712     return -1;
00713   }
00714
00715   return deflate_JPEG_file(data_, dataLength_, destImg);
00716 }
00717
00718 int JpegHandler::Decompress(unsigned int &width, unsigned int &height, unsigned int &channels,
00719                             unsigned char* &data)
00720 {
00721   if (!setup_) {
00722     BIASERR("Object has not been set up. Call Init(...) first!!!");
00723     return -1;
00724   }
00725
00726   return deflate_JPEG_file(data_, dataLength_, width, height, channels, data);
00727 }
00728
00729 int JpegHandler::WriteJPEG(const string &filename) {
00730
00731   if (!setup_) {
00732     BIASERR("Object has not been set up. Call Init(...) first!!!");
00733     return -1;
00734   }
00735
00736   FILE * output = fopen(filename.c_str(),"wb");
00737
00738   if (output == NULL) {
00739     BIASERR("Could not open output-file" + filename);
00740     return -1;
00741   }
00742
00743   if (long(fwrite(data_,  1,  dataLength_,  output)) != dataLength_) {
00744     BIASERR("Could not write data completely to " + filename);
00745     return -1;
00746   }
00747
00748   fclose (output);
00749
00750   return 0;
00751 }
00752
00753 int JpegHandler::ReadJPEG(const string &filename) {
00754
00755   if (!setup_) {
00756     BIASERR("Object has not been set up. Call Init(...) first!!!");
00757     return -1;
00758   }
00759
00760   FILE * input = fopen(filename.c_str(),"rb");
00761
00762   if (input == NULL) {
00763     BIASERR("Could not read file" + filename);
00764     return -1;
00765   }
00766
00767   dataLength_ = 0;
00768   fseek(input, 0L, SEEK_END);
00769   dataLength_ = ftell(input);
00770   rewind(input);
00771
00772   if (buffsize_ < dataLength_) {
00773     BIASERR("File (" << dataLength_ << " Byte) too large for buffer ("
00774             << buffsize_ << " Byte), reinit with bigger buffer!!!");
00775     return -1;
00776   }
00777
00778   if (long(fread(data_, 1, dataLength_, input)) != dataLength_) {
00779     BIASERR("Not completely loaded file " + filename + " !!!");
00780     return -1;
00781   }
00782
00783   fclose (input);
00784
00785   return 0;
00786 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CompressJpeg.hh Source File

Image

CompressJpeg.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */#ifndef __JPEGHANDLER_HH__
00024 #define __JPEGHANDLER_HH__
00025
00026 /*
00027  * Include I/O handling and streams
00028  */
00029 #include <stdio.h>
00030 #include <sstream>
00031 #include <string.h>
00032
00033 /*
00034  *  include BIAS-image-libs
00035  */
00036 #include <Base/Image/ImageIO.hh>
00037 #include <Base/Image/ImageConvert.hh>
00038
00039 #ifdef WIN32
00040 #include <windows.h>
00041 #endif
00042
00043 using namespace std;
00044 using namespace BIAS;
00045
00046 namespace BIAS {
00047
00048   /**
00049      \class COmpressJpeg
00050      \author apetersen
00051      \brief Wrapper for fast libjpeg methods
00052
00053      Class for mem-to-mem JPEG-compression. Compress a given BIAS::Image
00054      (unsigned char) to data-array in shared memory file or decompress a
00055      given JPEG-file located in user memory into a BIAS::Image (u. char)
00056
00057      Author: A. Petersen, 15.8.`05
00058   */
00059
00060   class JpegHandler {
00061
00062   public:
00063     /** Standard constructor */
00064     JpegHandler();
00065
00066     /** Standard destructor */
00067     virtual ~JpegHandler();
00068
00069     /**
00070        (Re-)Initialize object with standard values and limit shared
00071        memory area to 'size' (in Byte, default 1MB)
00072
00073        !!! Init object BEVOR first use !!!
00074
00075        (reinit only requiered for changing buffer size)
00076     */
00077     int Init(long size = 1048576);
00078
00079     /**
00080        Releases allocated mem-structures. Use it to regain memory but
00081        call Init again bevor using object afterwards!!!
00082     */
00083     void Release();
00084
00085     /**
00086        Start compression for given BIAS::Image
00087     */
00088     int Compress(BIAS::Image<unsigned char> &srcImg, int quality=60);
00089
00090     /**
00091        Start compression for image
00092     */
00093     int Compress(unsigned int width, unsigned int height, unsigned int channels,
00094                  unsigned char* data, int quality=60);
00095
00096     /**
00097        Start decompression of previous given data (from ReadJPEG or
00098        SetCompressedData), results will be stored in 'destImg'.
00099        Decompress will initialize 'destImg' properly if it isn't.
00100     */
00101     int Decompress(BIAS::Image<unsigned char> &destImg);
00102
00103     /**
00104        Start decompression of previous given data (from ReadJPEG or
00105        SetCompressedData), results will be stored in 'data','width',....
00106        New mem for 'data' will only be allocated if 'data == NULL', else
00107        old allocated mem will be used (!!!so set data=NULL if not shure
00108        about it's size!!!)
00109     */
00110     int Decompress(unsigned int &width, unsigned int &height, unsigned int &channels,
00111                    unsigned char* &data);
00112
00113     /**
00114        Get pointer to memory where to find compressed data and
00115        its length in byte
00116        NO copy will be used, so make sure it's still valid when
00117        starting Decompress or reusing this!!!
00118     */
00119     inline void GetCompressedData(void* &data, long &length) {
00120       data = data_;
00121       length = dataLength_;
00122     }
00123
00124     /**
00125        Copy memory-area in which compressed data can be found
00126        and set its length in byte.
00127     */
00128     inline void SetCompressedData(void* data, long length) {
00129       dataLength_ = length;
00130       memcpy(data_, data, dataLength_);
00131     }
00132
00133     /**
00134        Write previously compressed data to file named filename
00135     */
00136     int WriteJPEG(const string &filename);
00137
00138     /**
00139        Read JPEG-file named 'filename' and store its informations in
00140        compressed data field
00141     */
00142     int ReadJPEG(const string &filename);
00143
00144   protected:
00145     /* Pointer to compression-buffer (compressed data)*/
00146     void* data_;
00147
00148     /* Length in byte of compressed data */
00149     long dataLength_;
00150
00151     /* Length in byte of compression-buffer */
00152     long buffsize_;
00153
00154     /* Info if object has been correctly set */
00155     bool setup_;
00156
00157   };
00158
00159 }
00160
00161 #endif //__JPEGHANDLER_HH__
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/concepts.dox File Reference

Doc/concepts.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Condensation.cpp Source File

StateEstimator

Condensation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Condensation.hh"
00027 #include <float.h>
00028 #include <Base/Common/W32Compat.hh>
00029
00030 //#define TIMING
00031 #ifdef TIMING
00032 #include <Base/Debug/TimeMeasure.hh>
00033 #endif
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 Condensation::Condensation()
00039 {
00040   stateDim_=0;
00041   defaultInitFraction_=0.1;
00042   importanceFraction_=0.0;
00043   _doSecondOrderARP=true;
00044   _randomArray=NULL;
00045 }
00046
00047 Condensation::~Condensation()
00048 {
00049   if (_randomArray) delete[] _randomArray;
00050 }
00051
00052 int Condensation::Init(unsigned int N)
00053 {
00054   initial_=true;
00055   Nsamples_=N;
00056   sumOfWeights_=0;
00057   random_.Reset();
00058   _randomArray=new double[N];
00059   // memory allocation
00060   samplePosNew_.resize(N);
00061   samplePosOld_.resize(N);
00062   samplePosTminus2_.resize(N);
00063   indexTminus2_.resize(N);
00064   oldIndices_.resize(N);
00065   sampleWeights_.resize(N);
00066   sampleWeights_.assign(N,1);
00067   cumulProbArray_.resize(N);
00068   sampleImportanceWeights_.resize(N);
00069   cumulProbArrayImportance_.resize(N);
00070   correctionOfImportanceWeights_.resize(N);
00071   correctionOfImportanceWeights_.assign(N,1);
00072
00073   if (stateDim_==0) {
00074     BIASERR("Error at Init: stateDim_==0, set this at constructor");
00075     return -1;
00076   }
00077
00078   // further memory allocation
00079   diffusionSigma_.newsize(stateDim_);
00080   diffusionSigma_.Set(0);
00081   processFirstOrderScale_.newsize(stateDim_);
00082   processFirstOrderScale_.Set(0);
00083   processSecondOrderScale_.newsize(stateDim_);
00084   processSecondOrderScale_.Set(0);
00085   processMean_.newsize(stateDim_);
00086   processMean_.Set(0);
00087   offSet_.newsize(stateDim_);
00088   offSet_.Set(0);
00089   mean_.newsize(stateDim_);
00090   mean_.Set(0);
00091   meanTminus1_.newsize(stateDim_);
00092   meanTminus1_.Set(0);
00093   BIASCDOUT(D_COND_INIT,"allocating memory for sample vectors\n");
00094
00095   InitModelDefaults();
00096   BIASCDOUT(D_COND_INIT,"InitModelDefaults() passed.\n");
00097
00098   // initial positions
00099   for (unsigned int n=0;n<Nsamples_;n++) {
00100     samplePosNew_[n].newsize(stateDim_);
00101     samplePosOld_[n].newsize(stateDim_);
00102     samplePosTminus2_[n].newsize(stateDim_);
00103   }
00104   return 0;
00105 }
00106
00107 int Condensation::InitPrior()
00108 {
00109 #ifdef TIMING
00110   TimeMeasure timer;
00111   timer.Start();
00112 #endif
00113   BIASCDOUT(D_COND_INIT,"Initial Positions set.\n");
00114   InitPriorPositions(Nsamples_);
00115   samplePosOld_ = samplePosNew_;
00116   samplePosTminus2_ = samplePosOld_;
00117   sumOfWeights_=0;
00118   for (unsigned int n=0; n<Nsamples_; n++) {
00119     BIASCDOUT(D_COND_INIT,"prior position of sample "<<n<<": "
00120               <<samplePosOld_[n]<<endl);
00121     sumOfWeights_ +=  sampleWeights_[n];
00122     cumulProbArray_[n] = sumOfWeights_;
00123     indexTminus2_[n] = n;
00124   }
00125   BIASCDOUT(D_COND_INIT,"init done\n");
00126 #ifdef TIMING
00127   timer.Stop();
00128   cerr << "Condensation::InitPrior()  took "<<timer.GetRealTime()<<" us"<<endl;
00129 #endif
00130
00131   return 0;
00132 }
00133
00134
00135
00136 int Condensation::PredictNewSamplePositions()
00137 {
00138 #ifdef TIMING
00139   TimeMeasure timer;
00140   timer.Start();
00141 #endif
00142
00143   unsigned int sampleIndex=0;
00144   // the number of samples distributed by PriorPositions
00145   // samples with index < initSamples are distributed in this way
00146   unsigned int initSamples=(unsigned int)((double)Nsamples_*
00147                                           (defaultInitFraction_));
00148   // samples with index < importanceSamples and index >= initSamples
00149   // are distributed using importance sampling
00150   unsigned int importanceSamples=(unsigned int)((double)Nsamples_*
00151                                                 importanceFraction_+
00152                                                 initSamples);
00153
00154   InitPriorPositions(initSamples);
00155
00156 #ifdef TIMING
00157   timer.Stop();
00158   cerr << "Condensation::PredictNewSamplePositions()  pick prior samples took "<<timer.GetRealTime()<<" us"<<endl;
00159   timer.Reset();   timer.Start();
00160 #endif
00161
00162
00163   if (importanceSamples!=initSamples) {
00164     //// importance sampling
00165     EvaluateImportanceWeights();
00166
00167     sumOfImportanceWeights_ = 0;
00168     for (unsigned int n=0; n<Nsamples_; n++) {
00169       BIASCDOUT(D_COND_WEIGHTS,"importance weight for sample "<<n<<": "
00170                 <<sampleImportanceWeights_[n]<<endl);
00171       sumOfImportanceWeights_ += sampleImportanceWeights_[n];
00172       cumulProbArrayImportance_[n] = sumOfImportanceWeights_;
00173     }
00174     for (unsigned int i=initSamples; i<importanceSamples; i++) {
00175       BIASCDOUT(D_COND_PROCESS,"importance sample with index:"
00176                 <<sampleIndex<<endl);
00177       sampleIndex = PickImportanceSample_();
00178       //      indexTminus2_[i]=sampleIndex;
00179       oldIndices_[i]=sampleIndex;
00180       SecondOrderARP_(sampleIndex, samplePosNew_[i]);
00181       correctionOfImportanceWeights_[i]=
00182         sampleWeights_[sampleIndex] /
00183         (sampleImportanceWeights_[sampleIndex]+1E-9);
00184       BIASCDOUT(D_COND_PROCESS,"adding diffusion for sampleIndex:"
00185                 <<sampleIndex<<endl);
00186     }
00187   }
00188
00189 #ifdef TIMING
00190   timer.Stop();
00191   cerr << "Condensation::PredictNewSamplePositions()  pick importance samples took "<<timer.GetRealTime()<<" us"<<endl;
00192   timer.Reset();   timer.Start();
00193 #endif
00194
00195   //// standard
00196   /*
00197   int num=Nsamples_-importanceSamples;
00198   random_.GetUniformDistributed(0.0, sumOfWeights_, num, _randomArray);
00199   double r;
00200   int p;
00201
00202   // fast
00203   qsort((void*)_randomArray, num, sizeof(double), Condensation::compdouble);
00204   p=0;
00205   if (_doSecondOrderARP){
00206     for (int n=0; n<num; n++){
00207       r=_randomArray[n];
00208       while (cumulProbArray_[p]<r) p++;
00209       indexTminus2_[n]=p;
00210       SecondOrderARP_(sampleIndex, samplePosNew_[n]);
00211     }
00212   } else {
00213     for (int n=0; n<num; n++){
00214       r=_randomArray[n];
00215       while (cumulProbArray_[p]<r) p++;
00216       samplePosNew_[n]=samplePosOld_[p];
00217     }
00218   }
00219   */
00220   // this is astonishingly faster ?
00221   /// now pick samples from the last time step using the weights
00222   for (unsigned int n=importanceSamples; n<Nsamples_; n++) {
00223     sampleIndex = PickOneSample_();
00224     BIASCDOUT(D_COND_PROCESS,"predicting sample with index:"<<sampleIndex<<endl);
00225     oldIndices_[n]=sampleIndex;
00226       //indexTminus2_[n]=sampleIndex;
00227     BIASCDOUT(D_COND_DEBUG,"Nsamples in SecondOrderARP: "<<n<<" SampleIndex: "
00228               <<sampleIndex<<endl);
00229     SecondOrderARP_(sampleIndex, samplePosNew_[n]);
00230   }
00231   indexTminus2_=oldIndices_;
00232
00233 #ifdef TIMING
00234   timer.Stop();
00235   cerr << "Condensation::PredictNewSamplePositions()  pick standard samples took "<<timer.GetRealTime()<<" us"<<endl;
00236   timer.Reset();   timer.Start();
00237 #endif
00238
00239   /// most probably from the process model
00240   AddOffsets_();
00241
00242   /// most probably gaussian noise
00243   AddDiffusions_();
00244
00245 #ifdef TIMING
00246   timer.Stop();
00247   cerr << "Condensation::PredictNewSamplePositions()  took "<<timer.GetRealTime()<<" us"<<endl;
00248 #endif
00249
00250   return 0;
00251 }
00252
00253
00254
00255
00256 void Condensation::SetDefaultInitFraction(double fraction)
00257 {
00258   if (fraction<0) defaultInitFraction_=0;
00259   else if (fraction>1) defaultInitFraction_=1;
00260   else defaultInitFraction_=fraction;
00261 }
00262
00263
00264 void Condensation::SetImportanceSampleFraction(double fraction)
00265 {
00266   if (fraction<0) importanceFraction_=0;
00267   else if (fraction>1) importanceFraction_=1;
00268   else importanceFraction_=fraction;
00269 }
00270
00271 void Condensation::AddDiffusions_()
00272 {
00273   // do not add diffusion to newly generated samples
00274   const unsigned StartIndex=
00275     (unsigned int)((double)Nsamples_*defaultInitFraction_);
00276   double *r=new double[Nsamples_-StartIndex];
00277   for (unsigned int d=0; d<stateDim_; d++) {
00278     random_.GetNormalDistributed(0.0, diffusionSigma_[d],
00279                                  Nsamples_-StartIndex, r);
00280     for (unsigned i=StartIndex; i<Nsamples_; i++){
00281       samplePosNew_[i][d] += r[i-StartIndex];
00282     }
00283   }
00284   delete[] r;
00285 }
00286
00287 void Condensation::AddOffsets_()
00288 {
00289   if (offSet_.size()>0)
00290     for (unsigned int n=0;n<Nsamples_;n++) {
00291       samplePosNew_[n] += offSet_;
00292       samplePosOld_[n] += offSet_;
00293     }
00294 }
00295
00296 void Condensation::CalculateBaseWeights_()
00297 {
00298 #ifdef TIMING
00299   TimeMeasure timer;
00300   timer.Start();
00301 #endif
00302   double cumul_total;
00303
00304   cumul_total = 0.0;
00305   EvaluateObservationDensities();
00306
00307 #ifdef TIMING
00308   timer.Stop();
00309   std::cout<< "Condensation::CalculateBaseWeights_() Eavl took "<<timer.GetRealTime()<<" us"<<std::endl;
00310   timer.Reset();
00311   timer.Start();
00312 #endif
00313
00314   for (unsigned int n=0; n<Nsamples_; n++) {
00315     BIASCDOUT(D_COND_WEIGHTS,"weight for sample "<<n<<": "<<sampleWeights_[n]<<endl);
00316     cumul_total += sampleWeights_[n];
00317     cumulProbArray_[n] = cumul_total;
00318   }
00319   sumOfWeights_ = cumul_total;
00320
00321 #ifdef TIMING
00322   timer.Stop();
00323   std::cerr << "Condensation::CalculateBaseWeights_()  took "<<timer.GetRealTime()<<" us"<<std::endl;
00324 #endif
00325 }
00326
00327 void Condensation::Process()
00328 {
00329 #ifdef TIMING
00330   TimeMeasure timer, ot;
00331   timer.Start();
00332   ot.Start();
00333 #endif
00334
00335   BIASCDOUT(D_COND_PROCESS,"Calculating Weights\n");
00336   CalculateBaseWeights_();
00337
00338 #ifdef TIMING
00339   timer.Stop();
00340   std::cerr << "Condensation::Process() CalculateBaseWeights_() took "<<timer.GetRealTime()<<" us"<<std::endl;
00341   timer.Reset();
00342   timer.Start();
00343 #endif
00344
00345   samplePosTminus2_=samplePosOld_;
00346   samplePosOld_=samplePosNew_;
00347   meanTminus1_=mean_;
00348
00349 #ifdef TIMING
00350   timer.Stop();
00351   std::cerr << "Condensation::Process() copy of vector took "<<timer.GetRealTime()<<" us"<<std::endl;
00352   timer.Reset();
00353   timer.Start();
00354 #endif
00355
00356   CalculateMean_();
00357   if (initial_) {
00358     meanTminus1_=mean_;
00359     initial_=false;
00360   }
00361
00362 #ifdef TIMING
00363   timer.Stop();
00364   std::cerr << "Condensation::Process() calculate mean took "<<timer.GetRealTime()<<" us"<<std::endl;
00365   ot.Stop();
00366   std::cerr << "Condensation::Process() took "<<ot.GetRealTime()<<" us"<<std::endl;
00367 #endif
00368 }
00369
00370 double Condensation::GetVariance() const
00371 {
00372   BIASASSERT(!isnan(sumOfWeights_) && !isinf(sumOfWeights_));
00373   if (sumOfWeights_<1E-20||sumOfWeights_!=sumOfWeights_) return 0;
00374   double var=0;
00375   BIAS::Vector<double> diff;
00376   for (unsigned int n=0;n<Nsamples_;n++) {
00377     diff = samplePosOld_[n] - mean_;
00378     var +=  (diff*diff) * sampleWeights_[n];
00379   }
00380   var /= sumOfWeights_;
00381   if (var!=var) return 0;
00382   return var;
00383 }
00384
00385 bool Condensation::GetWeightedVariance(Vector<double>& var) const
00386 {
00387   var.newsize(stateDim_);
00388   var.SetZero();
00389   unsigned start=(unsigned)rint(Nsamples_*(defaultInitFraction_+
00390                                            importanceFraction_));
00391   double SumOfWeights=cumulProbArray_[Nsamples_-1]-cumulProbArray_[start];
00392   if (SumOfWeights<DBL_EPSILON) {
00393     BIASCDOUT(D_COND_MEANVAR, "sum of weights top small for variance "
00394               <<"calculation "<<SumOfWeights);
00395     return false;
00396   }
00397   Vector<double> diff;
00398   for (unsigned int n=start;n<Nsamples_;n++) {
00399     diff = samplePosOld_[n] - mean_;
00400     //diff *= sampleWeights_[n];
00401     var += (diff.ElementwiseProduct(diff)) * sampleWeights_[n];
00402   }
00403   var /= SumOfWeights;
00404   return true;
00405 }
00406
00407 bool Condensation::GetVariance(Vector<double>& var) const
00408 {
00409   var.newsize(stateDim_);
00410   var.SetZero();
00411   unsigned start=(unsigned)rint(Nsamples_*(defaultInitFraction_+
00412                                            importanceFraction_));
00413   if (Nsamples_-start<=1) {
00414     BIASCDOUT(D_COND_MEANVAR, "not enough samples "<<Nsamples_-start<<endl);
00415     return false;
00416   }
00417   Vector<double> diff;
00418
00419   for (unsigned int n=start;n<Nsamples_;n++) {
00420     diff = samplePosOld_[n] - mean_;
00421     var +=  (diff.ElementwiseProduct(diff));
00422   }
00423   var /= (double)(Nsamples_-start-1);
00424   return true;
00425 }
00426
00427 double Condensation::GetMeanWeight() const
00428 {
00429   double mean=0.0;
00430   unsigned start=(unsigned)rint(Nsamples_*(defaultInitFraction_+
00431                                            importanceFraction_));
00432   if (Nsamples_-start<=0){
00433     BIASCDOUT(D_COND_MEANVAR, "not enough samples "<<Nsamples_-start<<endl);
00434     return -1.0;
00435   }
00436   Vector<double> diff;
00437
00438   for (unsigned n=start;n<Nsamples_;n++) {
00439     //cout << setw(5) << n << setw(15) << sampleWeights_[n]<<endl;
00440     mean += sampleWeights_[n];
00441   }
00442   mean /= (double)(Nsamples_-start);
00443   return mean;
00444 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Condensation.hh Source File

StateEstimator

Condensation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _CONDENSATION_GENERAL_HH_
00025 #define _CONDENSATION_GENERAL_HH_
00026 #include <Base/Common/BIASpragmaStart.hh>
00027
00028 #include <vector>
00029 #include "Base/Debug/Debug.hh"
00030 #include "Base/Math/Random.hh"
00031 #include "Base/Math/Vector.hh"
00032
00033 //#define TIMING true
00034 #ifdef TIMING
00035 #include "Base/Debug/TimeMeasure.hh"
00036 #endif
00037
00038 namespace BIAS {
00039
00040 #define D_COND_INIT       1<<0
00041 #define D_COND_PROCESS    1<<1
00042 #define D_COND_WEIGHTS    1<<2
00043 #define D_COND_DEBUG      1<<3
00044 #define D_COND_ERROR      1<<4
00045 #define D_COND_MEANVAR    1<<5
00046
00047     /** @class Condensation
00048     @brief CONDENSATION (CONditional DENSity EstimATION) is a state estimator
00049     very similiar to the Kalman Filter, not only for Gaussian-, but also for
00050     any multi-modal distribution.
00051     Also it is a rather simple algorithm.
00052
00053     The current state of a system, described by a state vector, is
00054     estimated using a certain number of samples, which approximate the real
00055     densities. This is done by incorporating measurements ( p(Z|X) )
00056     with a prior distribution p(X)= p(X_t-1 | z_t).
00057
00058     Usage:
00059     -# Write a class derived from Condensation and overload the
00060     three necessary functions. See CondensImg and Examples/condensImgExample
00061     for examples.
00062
00063     -# In your main program, just call Init() once with the desired
00064     amount of samples
00065     -# optional, set parameter for the initial prior
00066     distribution(write your own function)
00067
00068     -# call InitPrior(), which calls InitPriorPositions() and
00069     precalculates the weigths etc.
00070
00071     In the loop:
00072
00073     -# call PredictNewSamplePositions();
00074
00075     -# GetSamplePositions() and measure at those positions
00076
00077     -# call your own necessary functions to give the condensation
00078     your observation values, e. g.SetObservation()
00079
00080     -# call Process(), which calls EvaluateObservationDensities()
00081     and calculates the mean etc.
00082
00083     -# Get the real state of the system, e.g. the mean with GetMean()
00084     @author Daniel Grest, Feb. 2004
00085     */
00086
00087     class BIASStateEstimator_EXPORT Condensation : public Debug
00088     {
00089     public:
00090         Condensation();
00091         virtual ~Condensation();
00092
00093         /** Init the Condensation directly after constructor, with the desired
00094         amount of Samples, there more the better the approximation of
00095         the real densities.
00096         The other Init functions are called here also. */
00097         int Init(unsigned int nrSmaples);
00098
00099         /** sets the sample positions for first time step */
00100         int InitPrior();
00101
00102         /* This routine computes all of the new (unweighted) sample
00103         positions. For each sample, first a base is chosen, then the new
00104         sample position is computed by sampling from the prediction density
00105         p(x_t|x_t-1 = base) */
00106         int PredictNewSamplePositions();
00107
00108         /** all samples are moved by this offset at the prediction step */
00109         void SetPredictionOffset(const BIAS::Vector<double> &offSet)
00110         { offSet_=offSet; }
00111
00112         inline const std::vector<BIAS::Vector<double> >&
00113             GetSamplePositions() { return samplePosNew_;}
00114
00115             /** This really does one iteration of Condensation. It calls
00116             PredictSamplePosition() and EvaluateObservationDensity()
00117             in the necessary order. */
00118             void Process();
00119
00120             /** returns the mean state of the density distribution */
00121             Vector<double> GetMean() { return mean_;}
00122
00123             /** returns the weighted variance as a scalar
00124             @author grest */
00125             double GetVariance() const;
00126
00127             /** Returns the "weighted variance" of the sample positions in var.
00128             Initialization samples and importance samples are not used in
00129             calculation.
00130             @author woelk 12/2004 */
00131             bool GetWeightedVariance(Vector<double>& var) const;
00132
00133             /** Returns the variance of the sample positions in var.
00134             Initialization samples and importance samples are not used in
00135             calculation.
00136             @author woelk 12/2004 */
00137             bool GetVariance(Vector<double>& var) const;
00138
00139             /** Returns the mean weight of all samples. Initialization samples and
00140             importance samples are not used in calculation.
00141             @author woelk 12/2004 */
00142             double GetMeanWeight() const;
00143
00144             /** Set the amount of samples, whose position is always taken
00145             by the prior distribution.
00146             Default is 0.2. <br>
00147             fraction must be in [0..1]; */
00148             void SetDefaultInitFraction(double fraction);
00149
00150             /** Only specifiy a value unlike zero, if EvaluateImportanceWeights()
00151             is overloaded. */
00152             void SetImportanceSampleFraction(double fraction);
00153
00154
00155             /** set a new processMean for the PredictSamplePosition step,
00156             see SecondOrderARP_()
00157             */
00158             inline void SetProcessMean(const BIAS::Vector<double> &newProcessMean)
00159             { processMean_=newProcessMean; }
00160
00161
00162             /** Here u can specify the model and process defaults */
00163             virtual void InitModelDefaults() = 0;
00164
00165             /** The Prior condition is used to init the first sample positions.
00166             Calculates a initial pos for all samples.
00167             The prior cond. maybe defined by an image (if state vector is 2-dim) or
00168             by a mixture of gaussions or Uniform_distributed or ... or ...  */
00169             virtual void InitPriorPositions(unsigned int nrOfInitSamples) = 0;
00170
00171
00172             /** most important function, here u have to calculate a probability for each
00173             sample position based on your observations
00174             and assign this prob. as a weight to the sample */
00175             virtual void EvaluateObservationDensities()=0;
00176
00177             /** If you want to use importance sampling, then overload this function,
00178             which is the importance function. It should be a density distribution,
00179             which gives hint where to measure the object state.<br>
00180             Evaluate here the samplePosOld_, not the new ones <br>
00181             IMPORTANT: the scale of the importance weights must be equal to the
00182             normal weights, like in EvaluateObservationDensities() */
00183             virtual void EvaluateImportanceWeights() {};
00184
00185     protected:
00186         bool _doSecondOrderARP; // should SecondOrderARP_ be used
00187         /** question: real pos_tminus2 of each sample
00188         or better old mean value for all samples? */
00189         inline void SecondOrderARP_(unsigned int indexOldSample,
00190             Vector<double> &newSample);
00191
00192         /** The process model for a first-order auto-regressive process is:<br>
00193         x_{t+1} - mean = (x_t - mean)*scaling + sigma*w_t <br>
00194         where w_t is unit iid Gaussian noise, which is added by AddDiffusion
00195         */
00196         //void FirstOrderARP_(unsigned int indexOldSample,
00197         //                      Vector<double> &new_sample);
00198
00199         /** This is binary search using cumulative probabilities to pick a base
00200         sample. The use of this routine makes Condensation O(NlogN) where N
00201         is the number of samples. It is probably better to pick base
00202         samples deterministically, since then the algorithm is O(N) and
00203         probably marginally more efficient, but this routine is kept here
00204         for conceptual simplicity and because it maps better to the
00205         published literature. */
00206         inline unsigned int PickOneSample_();
00207
00208
00209         inline unsigned int PickImportanceSample_();
00210
00211         /** Once all the unweighted sample positions have been computed using
00212         predict_new_bases, this routine computes the weights by evaluating
00213         the observation density at each of the positions. Cumulative
00214         probabilities are also computed at the same time, to permit an
00215         efficient implementation of pick_base_sample using binary
00216         search. */
00217         virtual void CalculateBaseWeights_();
00218
00219         /** Adds gaussian noise to the position, _can_ be overwritten if some
00220         other (i.e. non gaussian) noise is needed*/
00221         virtual void AddDiffusions_();
00222
00223         /** adds offSet_ to the samplePosNew_, can be overwritten if some other
00224         offset mechanism is needed */
00225         virtual void AddOffsets_();
00226
00227         inline void CalculateMean_();
00228
00229         unsigned int Nsamples_;
00230         unsigned int stateDim_;
00231         std::vector<Vector<double> > samplePosNew_;
00232         std::vector<Vector<double> > samplePosOld_;
00233         std::vector<Vector<double> > samplePosTminus2_;
00234         // indexTminus2_[i] is the index in samplePosTminus2_ for sample
00235         // samplePosOld_[i]
00236         std::vector<unsigned int> indexTminus2_,oldIndices_;
00237
00238         Vector<double> mean_, meanTminus1_;
00239
00240         std::vector<double> sampleWeights_, cumulProbArray_;
00241         std::vector<double> sampleImportanceWeights_, cumulProbArrayImportance_;
00242         std::vector<double> correctionOfImportanceWeights_;
00243
00244         double sumOfWeights_, sumOfImportanceWeights_;
00245
00246         /** Process parameters */
00247         Vector<double> diffusionSigma_, processMean_;
00248         Vector<double> processFirstOrderScale_, processSecondOrderScale_;
00249
00250         bool initial_;
00251         double defaultInitFraction_;
00252         double importanceFraction_;
00253
00254         Random random_;
00255         double *_randomArray; // size Nsamples
00256         BIAS::Vector<double> offSet_;
00257
00258         inline static int compdouble(const void*l, const void*r)
00259         { return (*((double*)l))>(*((double*)r)); }
00260
00261     };
00262
00263
00264     inline unsigned int Condensation::PickOneSample_()
00265     {
00266         if (sumOfWeights_<1E-12)
00267             return (int)random_.GetUniformDistributed(0, Nsamples_);
00268
00269         double choice = random_.GetUniformDistributed(0.0, sumOfWeights_);
00270
00271         register unsigned int low, middle, high;
00272
00273         low = 0;
00274         high = Nsamples_-1;
00275
00276         while (high>(low+1)) {
00277             middle = (high+low) >> 1;
00278             if (choice > cumulProbArray_[middle])
00279                 low = middle;
00280             else high = middle;
00281         }
00282
00283         if (cumulProbArray_[low]==cumulProbArray_[high])
00284             return low;
00285         else return high;
00286     }
00287
00288     inline unsigned int Condensation::PickImportanceSample_()
00289     {
00290         double choice = random_.GetUniformDistributed(0.0,sumOfImportanceWeights_);
00291
00292         unsigned int low, middle, high;
00293
00294         low = 0;
00295         high = Nsamples_;
00296
00297         while (high>(low+1)) {
00298             middle = (high+low)/2;
00299             if (choice > cumulProbArrayImportance_[middle])
00300                 low = middle;
00301             else high = middle;
00302         }
00303
00304         if (cumulProbArrayImportance_[low]==cumulProbArrayImportance_[high])
00305             return low;
00306         else return high;
00307     }
00308
00309     inline void Condensation::SecondOrderARP_(unsigned int indexOldSample,
00310         Vector<double> &newSample)
00311     {
00312         // mean_ is in this moment the mean_ of the previous iteration
00313         for (unsigned int d=0;d<stateDim_;d++){
00314             BIASCDOUT(D_COND_DEBUG,"in SOARP d: "<<d<<std::endl);
00315             //    newSample[d]= processMean_[d] +
00316             //         (samplePosOld_[indexOldSample][d] - processMean_[d]) *
00317             //         processFirstOrderScale_[d] +
00318             //         (mean_[d] - meanTminus1_[d]) *  processSecondOrderScale_[d];
00319
00320             newSample[d]= processMean_[d] +
00321                 (samplePosOld_[indexOldSample][d] - processMean_[d]) *
00322                 processFirstOrderScale_[d] +
00323                 (samplePosOld_[indexOldSample][d]-
00324                 samplePosTminus2_[indexTminus2_[indexOldSample]][d]) *
00325                 processSecondOrderScale_[d];
00326         }
00327     }
00328
00329
00330     inline void Condensation::CalculateMean_()
00331     {
00332 #ifdef TIMING
00333         TimeMeasure timer;
00334         timer.Start();
00335 #endif
00336
00337         if (sumOfWeights_<1E-20||sumOfWeights_!=sumOfWeights_) return; // new mean is old mean
00338         mean_.Set(0);
00339         for (unsigned int n=0;n<Nsamples_;n++)
00340             mean_ += samplePosOld_[n] * sampleWeights_[n];
00341         mean_.MultiplyIP(1.0/sumOfWeights_);
00342
00343 #ifdef TIMING
00344         timer.Stop();
00345         std::cerr << "Condensation::CalculateMean_()  took "<<timer.GetRealTime()<<" us"<<std::endl;
00346 #endif
00347     }
00348
00349 }
00350
00351 #include <Base/Common/BIASpragmaEnd.hh>
00352
00353 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensHisto.cpp Source File

StateEstimator

CondensHisto.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "CondensHisto.hh"
00027 #include "Base/Image/ImageDraw.hh"
00028
00029 #include <Base/Common/BIASpragma.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 //#define DEBUG true
00035
00036
00037 CondensHisto::CondensHisto(){
00038   stateDim_=3;
00039   diffScale_=0.05;
00040   diffScaleSize_=0.05;
00041   minWeight_=0.0;
00042   useMultiHistogram_=false;
00043   secondOrderScale_ = 0.01;
00044   firstOrderScale_ = 0.99;
00045   bIntegralHisto_=false;
00046   m_dMaxRefHistoSize=DBL_MAX;
00047   secondHistPos_[0]=0;  secondHistPos_[1]=1;
00048 }
00049
00050 void CondensHisto::UseIntegralHistogram(bool bIntHisto)
00051 {
00052   bIntegralHisto_ = bIntHisto;
00053 }
00054
00055 void CondensHisto::InitModelDefaults()
00056 {
00057
00058   // the process mean is the image center
00059   processMean_=areaMax_ * 0.5;
00060
00061   // this draws the sample to the image center a little
00062   // its 99% the old position, 1% the mean
00063   processFirstOrderScale_.Set(firstOrderScale_);
00064
00065   // a second Order ARP, set scale to zero to have just a first order
00066   // or set to 0.1 to have 10% second order and 90% first e.g.
00067   processSecondOrderScale_.Set(secondOrderScale_);
00068
00069   // and a diffusion
00070   diffusionSigma_[0]= diffScale_ * areaMax_[0];
00071   diffusionSigma_[1]= diffScale_ * areaMax_[1];
00072
00073   diffusionSigma_[stateDim_-1] = diffScaleSize_ * areaMax_[stateDim_-1];
00074
00075   //here set the percentage of pixels that are sampled
00076   //with importanceFraction()
00077   importanceFraction_ = 0.0;
00078 }
00079
00080
00081
00082
00083 //Here create uniform distribution of the samples
00084 void CondensHisto::InitPriorPositions(unsigned int nrOfInitSamples)
00085 {
00086   // uniform distribution
00087   for (unsigned int n=0; n<nrOfInitSamples; n++) {
00088     for (unsigned int d=0;d<stateDim_;d++) {
00089       samplePosNew_[n][d]=
00090         random_.GetUniformDistributed(areaMin_[d],areaMax_[d]);
00091     }
00092   }
00093 }
00094
00095 void CondensHisto::EvaluateFromIntegralHistoImage_()
00096 {
00097   double dist=0.0;
00098   //here generate the Integral Histo Image
00099   intHisto_.GenerateIntegralHistDiffBin(*img_,refHisto_.GetBinSize(),
00100                                         refHisto_.GetBinSizeSat());
00101
00102   BIASDOUT(D_COND_INT,"in Integral EOD");
00103   int width = (int)img_->GetWidth();
00104   int height = (int)img_->GetHeight();
00105
00106   int heightHalf = refHisto_.GetHeightROI()/2;
00107   int widthHalf = refHisto_.GetWidthROI()/2;
00108   //for each sample in samplePosNew_ compute the coords and
00109   //CalcSimilarity between refHisto_ and IntegralHistoImage
00110   int upperleftx,upperlefty,lowerrightx, lowerrighty;
00111   int upperleftx2,upperlefty2,lowerrightx2, lowerrighty2;
00112
00113   for(unsigned int x = 0; x<Nsamples_; x++){
00114     BIASDOUT(D_COND_PROCESS,"Sample Pos: "<<(int)samplePosNew_[x][0]<<
00115              ","<<(int)samplePosNew_[x][1]);
00116     //calculate coords for the comparison of the hists
00117     //coord = pos - width-/heighthalf*sizefactor
00118     upperleftx=
00119       (int)rint(samplePosNew_[x][0]-widthHalf * samplePosNew_[x][2]);
00120     upperlefty=
00121       (int)rint(samplePosNew_[x][1]-heightHalf* samplePosNew_[x][2]);
00122     lowerrightx=
00123       (int)rint(samplePosNew_[x][0]+widthHalf* samplePosNew_[x][2]);
00124     lowerrighty=
00125       (int)rint(samplePosNew_[x][1]+heightHalf* samplePosNew_[x][2]);
00126
00127     BIASDOUT(D_COND_INT,"ROI: "<<upperleftx<<","<<upperlefty<<
00128              ","<<lowerrightx<<","<<lowerrighty);
00129
00130     // if coords out of image sample weight is 0
00131     if((upperleftx>=width)||(upperleftx<0)||(upperlefty<0)
00132        ||(upperlefty>=height)||(lowerrightx<0)
00133        ||(lowerrightx>=width)||(lowerrighty<0)
00134        ||(lowerrighty>=height) ||(samplePosNew_[x][2]<=0)
00135        ||(samplePosNew_[x][2]> m_dMaxRefHistoSize)
00136        ||(lowerrighty <= upperlefty)||(lowerrightx <= upperleftx)) {
00137       sampleWeights_[x] = 0.0;
00138     } else {
00139       if (useMultiHistogram_) { // compute corners of second histogram
00140         upperleftx2= upperleftx + int(secondHistPos_[0]*2)*widthHalf;
00141         lowerrightx2=upperleftx2+ 2*widthHalf;
00142         upperlefty2= upperlefty+ int(secondHistPos_[1]*2)*heightHalf;
00143         lowerrighty2=upperlefty2+2*heightHalf;
00144       }
00145       if (useMultiHistogram_ &&
00146           !((upperleftx2>=width)||(upperleftx2<0)||(upperlefty2<0)
00147            ||(upperlefty2>=height)||(lowerrightx2<0)
00148            ||(lowerrightx2>=width)||(lowerrighty2<0)
00149            ||(lowerrighty2>=height)) )
00150         dist=intHisto_.CalcSimilarity(refHisto_,upperleftx,upperlefty,
00151                                       lowerrightx,lowerrighty,
00152                                       refHisto2_,upperleftx2,upperlefty2,
00153                                       lowerrightx2, lowerrighty2);
00154       else
00155         //compute similarity only from top histogram
00156         dist=intHisto_.CalcSimilarity(refHisto_,upperleftx,upperlefty,
00157                                       lowerrightx,lowerrighty);
00158     }
00159     BIASDOUT(D_COND_PROCESS,"Distance of Histograms: "<<dist);
00160     if(dist<minWeight_)
00161       sampleWeights_[x] = minWeight_;
00162     else
00163       sampleWeights_[x] = dist;
00164   }
00165 }
00166
00167
00168 /**
00169    Here assign a weight to each sample. The weight must correspond
00170    to the similarity of the histograms of the regions.
00171 */
00172 void CondensHisto::EvaluateObservationDensities()
00173 {
00174   double dist;
00175
00176   std::vector<int> point;
00177   point.assign(2,0);
00178
00179   if(bIntegralHisto_){
00180     EvaluateFromIntegralHistoImage_();
00181   } else {
00182     int heightHalf = refHisto_.GetHeightROI()/2;
00183     int widthHalf = refHisto_.GetWidthROI()/2;
00184
00185     //for each sample in samplePosNew_ generate a Histogram in the present
00186     //picture and CalcSimilarity to the refHisto_
00187     int upperleftx,upperlefty,lowerrightx, lowerrighty;
00188     int upperleftx2,upperlefty2,lowerrightx2, lowerrighty2;
00189     int width=img_->GetWidth();
00190     int height=img_->GetHeight();
00191     for(unsigned int x = 0; x<Nsamples_; x++){
00192       BIASDOUT(D_COND_PROCESS,"Sample Pos: "<<(int)samplePosNew_[x][0]<<
00193                ","<<(int)samplePosNew_[x][1]);
00194       //calculate coords for the comparison of the hists
00195       //coord = pos - width-/heighthalf*sizefactor
00196
00197       upperleftx=(int)(samplePosNew_[x][0]-widthHalf * samplePosNew_[x][2]);
00198       upperlefty=(int)(samplePosNew_[x][1]-heightHalf* samplePosNew_[x][2]);
00199       lowerrightx=(int)(samplePosNew_[x][0]+widthHalf* samplePosNew_[x][2]);
00200       lowerrighty=(int)(samplePosNew_[x][1]+heightHalf* samplePosNew_[x][2]);
00201
00202       BIASDOUT(D_COND_DEBUG,"RIU: "<<upperleftx<<","<<upperlefty<<
00203                ","<<lowerrightx<<","<<lowerrighty);
00204       //if borders out of bounds, weight is zero
00205       if ( upperleftx>=width || upperleftx<0 || upperlefty<0 ||
00206            upperlefty>=height || lowerrightx<0 ||
00207            lowerrightx>=width || lowerrighty<0 ||
00208            lowerrighty>=height ) {
00209         sampleWeights_[x] = 0;
00210       }  else {
00211         if (useMultiHistogram_) { // compute corners of second histogram
00212           upperleftx2= upperleftx + int(secondHistPos_[0]*2)*widthHalf;
00213           lowerrightx2=upperleftx2+ 2*widthHalf;
00214           upperlefty2= upperlefty+ int(secondHistPos_[1]*2)*heightHalf;
00215           lowerrighty2=upperlefty2+2*heightHalf;
00216         }
00217         if (useMultiHistogram_ &&
00218             !((upperleftx2>=width)||(upperleftx2<0)||(upperlefty2<0)
00219               ||(upperlefty2>=height)||(lowerrightx2<0)
00220               ||(lowerrightx2>=width)||(lowerrighty2<0)
00221               ||(lowerrighty2>=height))
00222             ) {
00223           chist_.GenerateHist(*img_,upperleftx2, upperlefty2,
00224                               lowerrightx2, lowerrighty2);
00225           dist = refHisto_.CalcSimilarity(chist_);
00226         } else
00227           dist=-1;
00228         chist_.GenerateHist(*img_,upperleftx, upperlefty,
00229                             lowerrightx, lowerrighty);
00230         if (dist<0) // only top histo
00231           dist = refHisto_.CalcSimilarity(chist_);
00232         else // compute for both histograms
00233           dist = 0.5*dist+ 0.5*refHisto_.CalcSimilarity(chist_);
00234         BIASDOUT(D_COND_PROCESS,"Distance of Histograms: "<<dist);
00235       }
00236       if(dist<minWeight_)
00237         sampleWeights_[x] = minWeight_;
00238       else
00239         sampleWeights_[x] = dist;
00240     }//end for
00241   }
00242
00243 }//end function
00244
00245
00246 //3-dim case
00247 void CondensHisto::SetArea(Vector3<double> min, Vector3<double> max)
00248 {
00249   areaMin_=min;
00250   areaMax_=max;
00251 }
00252
00253 void CondensHisto::CheckImageQuality(double percent, int &shutter, int &gain)
00254 {
00255
00256   int heightHalf = refHisto_.GetHeightROI()/2;
00257   int widthHalf = refHisto_.GetWidthROI()/2;
00258   unsigned int upperleftx,upperlefty,lowerrightx, lowerrighty;
00259
00260   // histogram around mean, with mean size
00261   upperleftx=(int)(mean_[0]-widthHalf * mean_[2]);
00262   upperlefty=(int)(mean_[1]-heightHalf* mean_[2]);
00263   lowerrightx=(int)(mean_[0]+widthHalf* mean_[2]);
00264   lowerrighty=(int)(mean_[1]+heightHalf* mean_[2]);
00265
00266
00267   if(!useMultiHistogram_)
00268   {
00269     BIASERR("Only implemented for Integral Histogram");
00270   }
00271   else if(bIntegralHisto_)
00272    {
00273      std::vector<int> roi;
00274      roi.push_back(upperleftx);
00275      roi.push_back(upperlefty);
00276      roi.push_back(lowerrightx);
00277      roi.push_back(lowerrighty);
00278      Vector<int> hist = intHisto_.GetHistogram(upperleftx,upperlefty,
00279                                                lowerrightx,lowerrighty);
00280
00281      int nBinSat = intHisto_.GetBinSizeSat();
00282      int nBinHue = intHisto_.GetBinSize();
00283      int nLumStart =  nBinSat * nBinHue;
00284
00285      if(nBinHue == 8)
00286        {
00287
00288          double lowerLum =hist[nLumStart]+hist[nLumStart+1]+hist[nLumStart+2]+
00289            hist[nLumStart+3];
00290          double higherLum = hist[nLumStart+5]+hist[nLumStart+6]+
00291            hist[nLumStart+7];
00292          int numPixel = hist[nLumStart+8];
00293          if(lowerLum / numPixel > percent)
00294            {
00295              cout<<"Luminance is low: increase!"<<endl;
00296              shutter = 1;
00297            }
00298          else if(higherLum / numPixel > percent)
00299           {
00300              cout<<"Luminance is high: decrease!"<<endl;
00301              shutter = -1;
00302            }
00303        }
00304      else
00305        {
00306          BIASERR("Only implemented for binSizeHue==8");
00307        }
00308    }
00309   else
00310     {
00311       BIASERR("Only implemented for Integral Histogram");
00312     }
00313 }
00314
00315
00316 void CondensHisto::GetMaxValue(Vector<double> &max)
00317 {
00318   max.newsize(3);
00319   int pos=0;
00320   GetMaxWeight(pos);
00321   max[0] = samplePosOld_[pos][0];
00322   max[1] = samplePosOld_[pos][1];
00323   max[2] = samplePosOld_[pos][2];
00324 }
00325
00326
00327 void CondensHisto::GetMeanValue(Vector<double> &mean)
00328 {
00329   mean = mean_;
00330 }
00331
00332 /**
00333   @param meanVar= MeanVariance is a vector of struct:
00334   [varPosx, varPosy, varSize, varWeight]
00335 */
00336 void CondensHisto::GetMeanVariance(Vector<double>  &meanVar)
00337 {
00338   meanVar.newsize(4);
00339   double meanWeight = GetMeanWeight();
00340   double varWeight=0.0, ddiff;
00341
00342   Vector<double> diff, mVar;
00343   mVar.newsize(3);
00344   mVar.SetZero();
00345   for(unsigned int i=0;i<Nsamples_;i++){
00346     diff = samplePosOld_[i] - mean_;
00347     mVar += diff.ElementwiseProduct(diff);
00348     ddiff = (sampleWeights_[i]-meanWeight);
00349     varWeight += (ddiff*ddiff);
00350   }
00351
00352   mVar/=double(Nsamples_-1);
00353
00354   meanVar[0]=mVar[0];
00355   meanVar[1]=mVar[1];
00356   meanVar[2]=mVar[2];
00357   meanVar[3]=varWeight/double(Nsamples_-1);
00358 }
00359
00360 /**
00361    @return = the maximum weight of all samples
00362    @param index = the index in samplePosNew_ where maxWeight is found
00363 */
00364 double CondensHisto::GetMaxWeight(int &index)
00365 {
00366   double maxWeight=0.0;
00367   index = -1;
00368   for(unsigned int i=0;i<Nsamples_;i++)
00369     {
00370       if(sampleWeights_[i] > maxWeight)
00371         {
00372           index = i;
00373           maxWeight = sampleWeights_[i];
00374         }
00375     }
00376   return maxWeight;
00377 }
00378
00379
00380 /**
00381   @param maxVar= MaxVariance is a vector of struct:
00382   [varPosx, varPosy, varSize, varWeight]
00383 */
00384 void CondensHisto::GetMaxVariance(Vector<double> &maxVar)
00385 {
00386   maxVar.newsize(4);
00387   int index = 0;
00388   double maxWeight = GetMaxWeight(index);
00389   double varWeight=0.0, ddiff;
00390
00391   Vector<double> max=samplePosOld_[index], var, diff;
00392   var.newsize(3);
00393   var.SetZero();
00394   for(unsigned int i=0;i<Nsamples_;i++){
00395     diff = samplePosOld_[i] - max;
00396     var += diff.ElementwiseProduct(diff);
00397     ddiff = (sampleWeights_[i]-maxWeight);
00398     varWeight += (ddiff*ddiff);
00399   }
00400
00401   var/=double(Nsamples_-1);
00402
00403   maxVar[0]=var[0];
00404   maxVar[1]=var[1];
00405   maxVar[2]=var[2];
00406   maxVar[3]=varWeight/double(Nsamples_-1);
00407 }
00408
00409
00410
00411
00412
00413 //this returns the SamplePositions in an image!
00414 //Does not overload GetSamplePositions() in Condensation.hh,
00415 void CondensHisto::GetSamplePositions(Image<float> &sampleImg){
00416
00417   float **imgData = sampleImg.GetImageDataArray();
00418   unsigned int y,x;
00419   for (unsigned int i =0;i<Nsamples_;i++){
00420     y = (unsigned int)fabs(samplePosNew_[i][1]);
00421     x = (unsigned int)fabs(samplePosNew_[i][0]);
00422     imgData[y][x] = float(sampleWeights_[i]);
00423   }
00424 }
00425
00426 /**
00427    @return the active image in condensation algo
00428 */
00429 Image<unsigned char> CondensHisto::GetAktImage(){
00430
00431   return *img_;
00432 }
00433
00434
00435 void CondensHisto::DrawHistoSizes(Image<unsigned char> &img)
00436 {
00437
00438   if (!img.IsEmpty()) img.Release();
00439   img.Init(img_->GetWidth(),img_->GetHeight(),3);
00440   //  img.SetColorModel(ImageBase::CM_Grey);
00441   img.FillImageWithConstValue((unsigned char)0);
00442   unsigned int radius;
00443   unsigned int histosize;
00444   unsigned char values[1];//=new unsigned char[Nsamples_];
00445   values[0]=255;
00446   for (unsigned int i=0;i<Nsamples_;i++)
00447     {
00448
00449     histosize = 3*
00450       (unsigned int)(samplePosNew_[i][2]*
00451                      sqrt(double(refHisto_.GetHeightROI()*
00452                                  refHisto_.GetWidthROI())));
00453
00454     radius = (unsigned int)(sampleWeights_[i]* Nsamples_ /
00455                            sumOfWeights_ + 0.5);
00456
00457     if ( (samplePosNew_[i][0]-radius>0) && (samplePosNew_[i][1]-radius>0) &&
00458          (samplePosNew_[i][0]+radius<img.GetWidth()) &&
00459          (samplePosNew_[i][1]+radius<img.GetHeight()) )
00460       ImageDraw<unsigned char>::CircleCenter(img,
00461                                      (unsigned int)samplePosNew_[i][0],
00462                                      img.GetHeight()-histosize,
00463                                      radius, &values[0]);
00464   }
00465
00466 }
00467
00468
00469 /**
00470    draws the sample positions in the given image with the given value
00471 */
00472 void CondensHisto::DrawSamples(Image<unsigned char> &img)
00473 {
00474   if (img.IsEmpty()) {
00475     img.Init(img_->GetWidth(),img_->GetHeight(),1);
00476     img.SetColorModel(ImageBase::CM_Grey);
00477   }
00478   unsigned char *values = new unsigned char[img.GetChannelCount()];
00479   unsigned int size;
00480   double maxWeight=0;
00481
00482   for (unsigned int n=0;n<Nsamples_;n++)
00483     if (sampleWeights_[n]>maxWeight) maxWeight=sampleWeights_[n];
00484   for (unsigned int n=0;n<Nsamples_;n++) {
00485     for (unsigned int c=0;c<img.GetChannelCount();c++)
00486       values[c]=(unsigned char)(sampleWeights_[n]/maxWeight*255.0+0.5);
00487
00488    size=(unsigned int)(samplePosNew_[n][2]*double(refHisto_.GetHeightROI()));
00489    if (size<=0) size=5;
00490    if ( (samplePosNew_[n][0]-size/2>0) &&
00491          (samplePosNew_[n][1]-size/2>0) &&
00492          (samplePosNew_[n][0]+size/2<img.GetWidth()) &&
00493          (samplePosNew_[n][1]+size/2<img.GetHeight()) )
00494       ImageDraw<unsigned char>::RectangleCenter(img,int(samplePosNew_[n][0]),
00495                                                 int(samplePosNew_[n][1]),
00496                                                 size, values);
00497
00498   }
00499   delete values;
00500 }
00501
00502 /**
00503    draws the sample positions in the given image with the given value
00504 */
00505 void CondensHisto::DrawSamplesWhite(Image<unsigned char> &img)
00506 {
00507   if (img.IsEmpty()) {
00508     img.Init(img_->GetWidth(),img_->GetHeight(),1);
00509     img.SetColorModel(ImageBase::CM_Grey);
00510   }
00511   img.FillImageWithConstValue(255);
00512
00513   unsigned char *values = new unsigned char[img.GetChannelCount()];
00514   unsigned int size;
00515   double maxWeight=0;
00516   unsigned int maxSampleIndex = 0;
00517   for (unsigned int n=0;n<Nsamples_;n++)
00518   {
00519     if (sampleWeights_[n]>maxWeight){
00520       maxSampleIndex = n;//save max sample index
00521       maxWeight=sampleWeights_[n];
00522     }
00523   }
00524   for (unsigned int n=0;n<Nsamples_;n++)
00525   {
00526     size= (unsigned int)(samplePosNew_[n][2]*double(refHisto_.GetHeightROI()));
00527     if (size<=0) size=5;
00528     if ( (samplePosNew_[n][0]-size/2>0) &&
00529          (samplePosNew_[n][1]-size/2>0) &&
00530          (samplePosNew_[n][0]+size/2<img.GetWidth()) &&
00531          (samplePosNew_[n][1]+size/2<img.GetHeight()) )
00532       {
00533         if(n==maxSampleIndex)
00534           {
00535             values[0] = (unsigned char)0;
00536             values[1] = (unsigned char)0;
00537             values[2] = (unsigned char)0;
00538           }
00539         else{
00540           values[0] = (unsigned char)100;
00541           values[1] = (unsigned char)100;
00542           values[2] = (unsigned char)100;
00543         }
00544         ImageDraw<unsigned char>::RectangleCenter(img,int(samplePosNew_[n][0]),
00545                                                   int(samplePosNew_[n][1]),
00546                                                   size, values);
00547       }
00548   }
00549   //draw the last with max value again on top
00550   values[0] = (unsigned char)0;
00551   values[1] = (unsigned char)0;
00552   values[2] = (unsigned char)0;
00553   size= (unsigned int)(samplePosNew_[maxSampleIndex][2]*
00554                        double(refHisto_.GetHeightROI()));
00555   ImageDraw<unsigned char>::RectangleCenter(img,
00556                         int(samplePosNew_[maxSampleIndex][0]),
00557                         int(samplePosNew_[maxSampleIndex][1]),
00558                                                   size, values);
00559   delete values;
00560 }
00561
00562 void CondensHisto::DrawSamplesExt(BIAS::Image<unsigned char> &img)
00563 {
00564   unsigned char *values = new unsigned char[img.GetChannelCount()];
00565   unsigned int size;
00566   double maxWeight=0;
00567   for (unsigned int n=0;n<Nsamples_;n++)
00568     if (sampleWeights_[n]>maxWeight) maxWeight=sampleWeights_[n];
00569   for (unsigned int n=0;n<Nsamples_;n++) {
00570     for (unsigned int c=0;c<img.GetChannelCount();c++)
00571       values[c]=(unsigned char)(sampleWeights_[n]/maxWeight*255.0);
00572     size=  (unsigned int)(samplePosNew_[n][2]*refHisto_.GetHeightROI());
00573     if (size<=0) size=5;
00574     if ( (samplePosNew_[n][0]-size/2>0) &&
00575          (samplePosNew_[n][1]-size/2>0) &&
00576          (samplePosNew_[n][0]+size/2<img.GetWidth()) &&
00577          (samplePosNew_[n][1]+size/2<img.GetHeight()) )
00578       ImageDraw<unsigned char>::RectangleCenter(img,
00579                                 (unsigned int)samplePosNew_[n][0],
00580                                 (unsigned int)samplePosNew_[n][1],
00581                                                 size, values);
00582   }
00583
00584   delete values;
00585 }
00586
00587
00588
00589 /**
00590    draws the samples in the positions
00591    and draws the weights of the samples as circles,
00592    the bigger the circle the higher the weight
00593    and the grey value indicates the size of the ROI of histogram
00594 */
00595 void CondensHisto::DrawWeightedSamples(Image<float> &img)
00596 {
00597   if (!img.IsEmpty()) img.Release();
00598   img.Init(img_->GetWidth(),img_->GetHeight(),1);
00599   img.SetColorModel(ImageBase::CM_Grey);
00600   img.FillImageWithConstValue((float)0);
00601   unsigned int radius;
00602   float *values=new float[Nsamples_];
00603
00604   for (unsigned int i=0;i<Nsamples_;i++) {
00605     //samplePosOld_[stateDim_-1] hold distance to object
00606     values[i]=float(samplePosOld_[i][stateDim_-1]);
00607     radius = (unsigned int)(sampleWeights_[i]* Nsamples_ /
00608                            sumOfWeights_ + 0.5);
00609
00610     if ( (samplePosOld_[i][0]-radius>0) && (samplePosOld_[i][1]-radius>0) &&
00611          (samplePosOld_[i][0]+radius<img.GetWidth()) &&
00612          (samplePosOld_[i][1]+radius<img.GetHeight()) )
00613       ImageDraw<float>::CircleCenter(img,
00614                                      (unsigned int)samplePosOld_[i][0],
00615                                      (unsigned int)samplePosOld_[i][1],
00616                                      radius, &values[i]);
00617   }
00618   delete[] values;
00619 }
00620
00621 /**
00622    draws the poserior distribution of the samples in the image
00623 */
00624 void CondensHisto::DrawPosteriorDistribution(BIAS::Image<unsigned char> &img)
00625 {
00626   if (fImg_.IsEmpty())
00627     fImg_.Init(img.GetWidth(), img.GetHeight(),1);
00628
00629   double max = DrawPosteriorDistribution(fImg_);
00630
00631   float *pixel;
00632   // now copy values into result img.
00633   pixel = fImg_.GetImageData();
00634   unsigned char *data= img.GetImageData();
00635   unsigned int size=img.GetPixelCount();
00636   for (unsigned int i=0;i<size;i++) {
00637     *data = (unsigned char)(*pixel / max  * 255.0);
00638     data++;
00639     pixel++;
00640   }
00641 }
00642
00643
00644 /**
00645    same as above but in grey value picture
00646 */
00647 double CondensHisto::DrawPosteriorDistribution(BIAS::Image<float> &img)
00648 {
00649   float max=0;
00650   float *pixel;
00651   double x,y,dx,dy;
00652   int width=img.GetWidth() ,height=img.GetHeight();
00653   img.FillImageWithConstValue((float)0);
00654   for (unsigned int i=0;i<Nsamples_;i++) {
00655     x = samplePosOld_[i][0];
00656     y = samplePosOld_[i][1];
00657
00658     if ( (x>0) && (y>0) &&
00659          (x<width-1) && (y<height-1) ) {
00660       pixel= (img.GetImageDataArray()[(int)y])+ (int)x;
00661       // inverse bilinear interpolation
00662       dx = x - (double)floor(x);  dy = y - (double)floor(y);
00663       // top left
00664       *pixel+= float((1-dx) * (1-dy) * sampleWeights_[i]);
00665       if (*pixel>max) max=*pixel;
00666       // top right
00667       pixel++;
00668       *pixel+= float((1-dy) * dx * sampleWeights_[i]);
00669       if (*pixel>max) max=*pixel;
00670       // bottom right
00671       pixel+=width;
00672       *pixel+= float(dx * dy * sampleWeights_[i]);
00673       if (*pixel>max) max=*pixel;
00674       // bottom left
00675       pixel--;
00676       *pixel+= float((1-dx) * dy * sampleWeights_[i]);
00677       if (*pixel>max) max=*pixel;
00678     }
00679   }
00680   return max;
00681 }
00682
00683 /**
00684    draws the mean value(mean position of all samples) in
00685    the image, with the size of the rectangle indicating
00686    the size of the histogram
00687 */
00688 void CondensHisto::DrawMean(BIAS::Image<unsigned char> &img)
00689 {
00690 #ifdef DEBUG
00691   cout<<"Mean: "<<mean_[0]<<","<<mean_[1]<<","<<mean_[2]<<endl;
00692
00693   std::vector<double> point;
00694   refMultiHisto_.GetDistROIs(point);//now dist in point
00695   point[0] = mean_[0]+point[0]*mean_[2];
00696   point[1] = mean_[1]+point[1]*mean_[2];
00697   cout<<"In Draw, Point: "<<point[0]<<","<<point[1]<<endl;
00698 #endif
00699   //draw first rectangle
00700   int upperleftx,upperlefty,lowerrightx, lowerrighty;
00701   int upperleftx2,upperlefty2,lowerrightx2, lowerrighty2;
00702   float i=float(mean_[2]*((refHisto_.GetHeightROI()+
00703                            refHisto_.GetWidthROI())/2));
00704   if (i<=0) return;
00705
00706   int heightHalf = int(double(refHisto_.GetHeightROI())/2.0 * mean_[2] + 0.5);
00707   int widthHalf = int(double(refHisto_.GetWidthROI())/2.0 * mean_[2] + 0.5);
00708   upperleftx=
00709     (int)rint(mean_[0]-widthHalf);
00710   upperlefty=
00711     (int)rint(mean_[1]-heightHalf);
00712   lowerrightx=
00713     (int)rint(mean_[0]+widthHalf);
00714   lowerrighty=
00715     (int)rint(mean_[1]+heightHalf);
00716
00717   if ((upperleftx>0) && (upperlefty>0) && (lowerrightx<(int)img.GetWidth()) &&
00718       lowerrighty<(int)img.GetHeight())
00719     {
00720       ImageDraw<unsigned char>::RectangleCorners(img,upperleftx,upperlefty,
00721                                                  lowerrightx,lowerrighty);
00722       ImageDraw<unsigned char>::RectangleCorners(img,upperleftx-1,upperlefty-1,
00723                                                  lowerrightx-1,lowerrighty-1);
00724       ImageDraw<unsigned char>::RectangleCorners(img,upperleftx+1,upperlefty+1,
00725                                                  lowerrightx+1,lowerrighty+1);
00726     }
00727
00728   if(useMultiHistogram_){
00729     upperleftx2= upperleftx + (int)(secondHistPos_[0]*2*widthHalf);
00730     lowerrightx2=upperleftx2+ 2*widthHalf;
00731     upperlefty2= upperlefty+ (int)(secondHistPos_[1]*2*heightHalf);
00732     lowerrighty2=upperlefty2+2*heightHalf;
00733
00734     //draw second rectangle
00735     if ((upperleftx2>0) && (upperlefty2>0) &&
00736         (lowerrightx2<(int)img.GetWidth()) &&
00737         lowerrighty2<(int)img.GetHeight())
00738       ImageDraw<unsigned char>::RectangleCorners(img,upperleftx2,upperlefty2,
00739                                                  lowerrightx2,lowerrighty2);
00740   }
00741 }
00742
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensHisto.hh Source File

StateEstimator

CondensHisto.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can Sredistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HISTO_CONDENSATION__HH_
00027 #define _HISTO_CONDENSATION__HH_
00028
00029 #include <bias_config.h>
00030
00031 // BIAS
00032 #include <StateEstimator/Condensation.hh>
00033 #include <Base/Image/Image.hh>
00034 #include <Base/Math/Vector2.hh>
00035 #include <Base/Math/Vector3.hh>
00036 #include <Image/ColorHistogram.hh>
00037 #include <Image/IntegralHistogram.hh>
00038
00039 #define D_COND_INT      (1<<6)
00040
00041 namespace BIAS{
00042
00043   /**
00044       @class CondensHisto
00045       @brief class for tracking an object in an image
00046
00047       This class is able to handle "normal" ColorHistograms, and
00048       MultiColorHistograms.
00049       Just Set a MultiColorHistogram in SetReferenceHistogram() and
00050       the whole process switches to multiHistogram processing
00051
00052       You have to call:
00053       - SetActiveImage(imgHSL) with an HSL image;
00054       - SetReferenceHistogram(chist); (colorHistogram or ColorMultiHistogram)
00055       - SetArea(Vector3<double>(0,0,0.5), Vector3<double>(width,height,1.5));
00056
00057       - Init(*nsamples);
00058       - InitPrior(); //to set samples for first frame
00059
00060       then just call these functions in every turn
00061       - SetActiveImage(imgHSL)
00062       - PredictNewSamplePositions()
00063       - Process();
00064       @author Ingo Schiller, March 2003, edited by grest
00065   */
00066   class BIASStateEstimator_EXPORT CondensHisto : public Condensation{
00067   public:
00068     /**
00069        Set the state dimension in the constructor
00070     */
00071     CondensHisto();
00072
00073     virtual void InitModelDefaults();
00074
00075     virtual void InitPriorPositions(unsigned int nrOfInitSamples);
00076
00077     virtual void EvaluateObservationDensities();
00078
00079     // virtual void EvaluateImportanceWeights();
00080
00081     void UseIntegralHistogram(bool bIntHisto);
00082
00083     /**
00084        Checks the image Quality by checking the luminance
00085        of the image.
00086        the shutter and gain of the camera has to be set
00087        by the returned shutter and gain in params
00088        @param percent = the allowed percentage of pixels, below minsat in
00089                         light and dark regions
00090        @param shutter = the shutter the camera has to be set to
00091        @param gain    = the gain    ------------  ------------
00092     */
00093     void CheckImageQuality(double percent, int &shutter, int &gain);
00094
00095     /** The area for the initial uniform distribution.
00096         3-dim case
00097     */
00098     void SetArea(Vector3<double> min, Vector3<double> max);
00099
00100     /**
00101        Sets the minimum weight each sample is assigned,
00102        when < lower minWeight_
00103     */
00104     inline void SetMinWeight(double min)
00105     {minWeight_ = min;}
00106
00107     /**
00108        Sets the scale for the diffusion,
00109        diffusi0nSigma = diffScale_*areaMax_
00110        example value would be 0.05
00111     */
00112     inline void SetDiffScale(double diff)
00113     {
00114       diffScale_ = diff;
00115       diffusionSigma_[0] = diffScale_*areaMax_[0];
00116       diffusionSigma_[1] = diffScale_*areaMax_[1];
00117     }
00118
00119     /**
00120        Sets the scale for the diffusion for the size
00121        of the histogram ,
00122        diffusionSigma[stateDim_-1] = diffScaleSize_*areaMax_[stateDim-1]
00123        example value would be 0.05
00124     */
00125     inline void SetDiffScaleSize(double diff)
00126     {
00127       diffScaleSize_= diff;
00128       diffusionSigma_[stateDim_-1]= diffScaleSize_*areaMax_[stateDim_-1];
00129     }
00130
00131
00132     /**
00133        Sets the scale for the second order prediction,
00134        valid values are 0.0000..1 - 1.0
00135     */
00136     inline void SetSecondOrderScale(double scale)
00137     {
00138       if(scale > 1.0)
00139         scale = 1.0;
00140       else if(scale < 0)
00141         scale = 0.0;
00142       secondOrderScale_ = scale;
00143       processSecondOrderScale_.Set(secondOrderScale_);
00144     }
00145
00146   /**
00147        Sets the scale for the first order prediction,
00148        valid values are 0.0000..1 - 1.0
00149     */
00150     inline void SetFirstOrderScale(double scale)
00151     {
00152       if(scale > 1.0)
00153         scale = 1.0;
00154       else if(scale < 0)
00155         scale = 0.0;
00156       firstOrderScale_ = scale;
00157       processFirstOrderScale_.Set(firstOrderScale_);
00158     }
00159
00160
00161
00162     /** sets the present picture to compare and create new observation */
00163     inline void SetActiveImage(Image<unsigned char> &img)
00164     {img_ = &img;}
00165
00166     /** sets the reference colorhistogram */
00167     inline
00168     void SetReferenceHistogram(ColorHistogram<unsigned char> &refHisto)
00169     {
00170       refHisto_=refHisto;
00171       m_dMaxRefHistoSize = double(img_->GetWidth() * img_->GetHeight())/
00172         double(refHisto.GetHeightROI() * refHisto.GetWidthROI());
00173       chist_.SetBinSize(refHisto_.GetBinSize(), refHisto_.GetBinSizeSat());
00174       useMultiHistogram_ = false;
00175       //  cout<<"Using Normal Histogram"<<endl;
00176     }
00177
00178     /** sets if Multihistogram is used or not, default is false */
00179     inline
00180     void SetMultiHistogram(bool multi)
00181     {useMultiHistogram_ = multi;}
00182
00183
00184
00185
00186     /* at every (rounded) sample position, the sampleImg is set
00187        to UCHAR_MAX */
00188     void GetSamplePositions(Image<float> &sampleImg);
00189
00190     /*
00191      @returns the actual position of the mean value
00192      @author Ingo Schiller
00193      @modified 03. August 2004
00194     */
00195     void GetMeanValue(Vector<double> &mean);
00196
00197
00198     /*
00199      @returns the actual position of the sample, with max weight
00200      @author Ingo Schiller
00201      @modified 29.11.04
00202     */
00203     void GetMaxValue(Vector<double> &max);
00204
00205     /**
00206        @param meanVar= MeanVariance is a vector of struct:
00207        [varPosx, varPosy, varSize, varWeight]
00208     */
00209     void GetMeanVariance(Vector<double>  &meanVar);
00210
00211     /**
00212        @param maxVar= MaxVariance is a vector of struct:
00213        [varPosx, varPosy, varSize, varWeight]
00214     */
00215     void GetMaxVariance(Vector<double>  &maxVar);
00216
00217
00218     /**
00219        @return = the maximum weight of all samples;
00220        @param index = the index of which maxWeight is found
00221     */
00222     double GetMaxWeight(int &index);
00223
00224
00225     /**
00226        @returns the aktual image on which the condensation is
00227        doing it's job
00228        @author Ingo Schiller
00229     */
00230     Image<unsigned char> GetAktImage();
00231
00232
00233     /**
00234        this draws the Sizes of the Histogram
00235        as arrows at their x position
00236        @author Ingo Schiler
00237      */
00238     void DrawHistoSizes(Image<unsigned char> &img);
00239
00240     /** this draws the sample weights as circles
00241      */
00242     virtual void DrawSamples(Image<unsigned char> &img);
00243
00244     /**
00245         this draws the sample weights as retangeles with greyvalues
00246         on white base
00247      */
00248     virtual void DrawSamplesWhite(Image<unsigned char> &img);
00249
00250     /** this draws the samples,
00251         histogram sizes as rects and weights as grey values
00252         @author grest / schiller
00253      */
00254     void DrawSamplesExt(Image<unsigned char> &img);
00255
00256     /** this draws the samples as circles and the color indicates the
00257         size of the histogram (the z-coordinate)
00258     */
00259     void DrawWeightedSamples(Image<float> &img);
00260
00261     /** Draws the samples with their weight as greyvalue,
00262         the weight is distributed to the 4 pixels around the sample postion.
00263         Image has to be initialized with correct size and channelcount !
00264     */
00265     void DrawPosteriorDistribution(BIAS::Image<unsigned char> &img);
00266
00267     /** same as above but float precision and
00268         returns the maximum value also.
00269     */
00270     double DrawPosteriorDistribution(BIAS::Image<float> &img);
00271
00272
00273     /** Draws the mean as a rectangle
00274         which size is proportional to the histogram size
00275      */
00276     virtual void DrawMean(BIAS::Image<unsigned char> &img);
00277
00278   protected:
00279     // for better readablity of EvaluateObservationDensities()
00280     void EvaluateFromIntegralHistoImage_();
00281
00282 //#ifdef WIN32 // HACK TODO DLL JW
00283 //    // DLL JW
00284 //    // TODO: solve explicit instantiations
00285 //    template class BIASStateEstimator_EXPORT BIAS::Vector3<double>;
00286 //#endif
00287
00288     BIAS::Vector3<double> areaMin_, areaMax_;
00289     Image<unsigned char> *img_;
00290
00291     // the current histogram for comparision with the old one
00292     ColorHistogram<unsigned char> chist_;
00293
00294    //the integral Histogram image
00295     IntegralHistogram intHisto_;
00296
00297     //reference ColorHistogram
00298     ColorHistogram<unsigned char> refHisto_;
00299     ColorHistogram<unsigned char> refHisto2_;
00300
00301     // needed for DrawPosteriorDistribution()
00302     BIAS::Image<float> fImg_;
00303     //basic weight of each sample to provide a wider spread of the samples
00304     double minWeight_;
00305     double diffScale_;
00306     double diffScaleSize_;
00307     double secondOrderScale_;
00308     double firstOrderScale_;
00309     bool useMultiHistogram_;
00310     double   m_dMaxRefHistoSize;
00311
00312     //relative to first hist, unit is first hist size
00313     BIAS::Vector2<double> secondHistPos_;
00314
00315     bool bIntegralHisto_;
00316   };
00317
00318
00319
00320 }
00321 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/CondensHistoExample.cpp Source File

StateEstimator » Examples

CondensHistoExample.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "StateEstimator/CondensHisto.hh"
00027 #include "Base/Image/ImageDraw.hh"
00028 #include "Base/Image/ImageBase.hh"
00029 #include "Base/Image/ImageIO.hh"
00030 #include "Base/Image/ImageConvert.hh"
00031 #include "Image/ColorHistogram.hh"
00032 #include "Filter/Rescale.hh"
00033 using namespace BIAS;
00034 using namespace std;
00035 #include "math.h"
00036
00037
00038 int main(int argc, char** argv)
00039 {
00040   char fileName[255];
00041   int res = -1;
00042   int binsize=0;
00043   int ux = 341;
00044   int uy = 301;
00045   int lx = 383;
00046   int ly = 353;
00047
00048   BIAS::Image<unsigned char> image,image2, down ,down2;
00049   BIAS::ColorHistogram<unsigned char> chist;
00050   BIAS::CondensHisto condensation;
00051   BIAS::Image<float> samples;
00052   BIAS::Rescale<unsigned char,unsigned char> rescale;
00053
00054
00055 //condensation.SetDebugLevel(D_COND_WEIGHTS);
00056 //condensation.SetDebugLevel(condensation.GetDebugLevel() | D_COND_INIT);
00057 //condensation.SetDebugLevel(condensation.GetDebugLevel() | D_COND_PROCESS);
00058 //condensation.SetDebugLevel(condensation.GetDebugLevel() | D_COND_DEBUG);
00059
00060   if (argc<3)
00061     {
00062       cerr<<"Give an image and a bin width as arguments!"<<endl;
00063       cerr<< argv[0] <<" binsize imagefile"<<endl;
00064       return -1;
00065     }
00066
00067
00068   if((res=ImageIO::ImportImage(argv[2], image)) != 0)
00069     {
00070       cerr<<"Error reading image!"<<endl;
00071       return -1;
00072     }
00073   //operate on half image sizes
00074
00075   down.Init((int)floor((double)image.GetWidth()/2),
00076              (int)floor((double)image.GetHeight()/2),3);
00077   down.SetColorModel(ImageBase::CM_RGB);
00078   rescale.SetFactor(2.0);
00079   rescale.Downsample(image,down);
00080   //convert image to HSL
00081   image.Release();
00082   image.Init(down.GetWidth(),down.GetHeight(),3);
00083
00084   res = ImageConvert::ToHSL(down,image);
00085   cerr<<"Image is in HSL colorspace"<<endl;
00086
00087   sprintf(fileName,"MeanImage_%04d",1);
00088   ImageIO::Write(fileName,down);
00089
00090   binsize = atoi(argv[1]);
00091   chist.SetBinSize(binsize);
00092
00093   chist.GenerateHist(image,ux/2,uy/2,lx/2,ly/2);
00094   chist.Dump();
00095
00096   condensation.SetArea(Vector3<double>(0,0,0.5),\
00097                        Vector3<double>(image.GetWidth(),image.GetHeight(),1.5));
00098
00099   //initialise condensation with amount of initial pixels
00100
00101   condensation.Init(250);
00102   condensation.InitPrior();
00103   condensation.SetMinWeight(0.0);
00104   condensation.InitPriorPositions(250);
00105   //now set the refHisto_ in condensation
00106   condensation.SetReferenceHistogram(chist);
00107
00108   //init a picture for the DrawWeightedSamples(img)
00109   samples.Init(image.GetWidth(),image.GetHeight(),1);
00110
00111   int n =2;
00112   while(n<argc){
00113
00114     //read in next image
00115     if ((res=ImageIO::ImportImage(argv[n], image2)) != 0)
00116     {
00117       cerr<<"Error reading image!"<<endl;
00118       return -1;
00119     }
00120     //convert image to HSL
00121
00122     down2.Init((int)floor((double)image2.GetWidth()/2),
00123                (int)floor((double)image2.GetHeight()/2),3);
00124
00125     rescale.Downsample(image2,down2);
00126     cout<<"Image: "<<n<<" imported."<<endl;
00127
00128     image2.Init(down2.GetWidth(),down2.GetHeight(),3);
00129     ImageConvert::ToHSL(down2,image2);
00130     cerr<<"Image is in HSL colorspace"<<endl;
00131
00132     //set the image as active in the condensation algorithm
00133     condensation.SetActiveImage(image2);
00134
00135     //and now predict new positions(incl. Diffusion etc.
00136     condensation.PredictNewSamplePositions();
00137
00138     //now process next step
00139     condensation.Process();
00140
00141     condensation.DrawWeightedSamples(samples);
00142     sprintf(fileName,"samplesImage_%04d",n);
00143     ImageIO::Write(fileName,samples);
00144
00145     condensation.DrawMean(down2);
00146     sprintf(fileName,"MeanImage_%04d",n);
00147     ImageIO::Write(fileName,down2);
00148     cout<<"after Process()"<<endl;
00149
00150     n++;
00151   }
00152 }
00153
00154
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensImg.cpp Source File

StateEstimator

CondensImg.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "CondensImg.hh"
00027 #include "Base/Image/ImageDraw.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 void CondensImg::InitModelDefaults()
00033 {
00034   // the process mean is the image center
00035   processMean_=areaMax_ * 0.5;
00036
00037   // this draws the sample to the image center a little
00038   // its 99% the old position, 1% the mean
00039   processFirstOrderScale_.Set(0.99);
00040
00041   // a second Order ARP, set scale to zero to have just a first order
00042   // this takes 90% of the last displacements (velocity)
00043   processSecondOrderScale_.Set(.9);
00044
00045   // and a diffusion
00046   diffusionSigma_=0.01 * areaMax_;
00047
00048   importanceFraction_ = 0.0;
00049
00050   defaultInitFraction_=0.05;
00051 }
00052
00053
00054 void CondensImg::InitPriorPositions(unsigned int nrOfInitSamples)
00055 {
00056   // uniform distribution
00057   for (unsigned int n=0; n<nrOfInitSamples; n++)
00058     for (unsigned int d=0;d<stateDim_;d++) {
00059       samplePosNew_[n][d]=
00060         random_.GetUniformDistributed(areaMin_[d],areaMax_[d]);
00061     }
00062 }
00063
00064
00065 void CondensImg::EvaluateObservationDensities()
00066 {
00067   // this function has to assign a weight (probability) to each sample
00068   for (unsigned int n=0;n<Nsamples_;n++) {
00069     // the observation is set by SetObservation
00070     // just set the image value as weight
00071     if ((samplePosNew_[n][0]>0) &&
00072         (samplePosNew_[n][0]<= (double)obsImg_.GetWidth()) &&
00073         (samplePosNew_[n][1]>0) &&
00074         (samplePosNew_[n][1]<=  (double)obsImg_.GetHeight()) ) {
00075       sampleWeights_[n]=
00076         (double)(obsImg_.GetImageDataArray()[(int)samplePosNew_[n][1]][(int)samplePosNew_[n][0]]);
00077     }
00078   }
00079 }
00080
00081 void CondensImg::EvaluateImportanceWeights()
00082 {
00083   // assume we know, that the 'real' object is in the left image half
00084   // assign importanceWeights accordingly
00085   for (unsigned int n=0; n<Nsamples_; n++)
00086     if ( (samplePosOld_[n][0]>areaMin_[0]) &&
00087          (samplePosOld_[n][1]>areaMin_[1]) &&
00088          (samplePosOld_[n][0]<areaMax_[0]/2) &&
00089          (samplePosOld_[n][1]<areaMax_[1]) )
00090       sampleImportanceWeights_[n]=255;
00091     else sampleImportanceWeights_[n]=0;
00092 }
00093
00094 void CondensImg::SetArea(Vector2<double> min, Vector2<double> max)
00095 {
00096   areaMin_=min;
00097   areaMax_=max;
00098 }
00099
00100
00101 void CondensImg::SetObservation(Image<unsigned char> &obsImg)
00102 {
00103   obsImg_=obsImg;
00104 }
00105
00106 void CondensImg::DrawSamples(Image<unsigned char> &img, unsigned char value)
00107 {
00108   if (!img.IsEmpty()) img.Release();
00109   img.Init(obsImg_.GetWidth(),obsImg_.GetHeight(),1);
00110   img.SetColorModel(ImageBase::CM_Grey);
00111   img.FillImageWithConstValue((unsigned char)0);
00112   unsigned int radius;
00113   unsigned char values[1];
00114   for (unsigned int i=0;i<Nsamples_;i++) {
00115     values[0] = value;
00116     radius = (unsigned int)(sampleWeights_[i]* Nsamples_ /
00117                            sumOfWeights_ + 0.5);
00118     //   cerr<<"Drawing circle with radius:"<<radius<<
00119     //      "at pos:"<<samplePosOld_[i]<<endl;
00120     if ( (samplePosOld_[i][0]-radius>0) && (samplePosOld_[i][1]-radius>0) &&
00121          (samplePosOld_[i][0]+radius<img.GetWidth()) &&
00122          (samplePosOld_[i][1]+radius<img.GetHeight()) )
00123       ImageDraw<unsigned char>::CircleCenter(img,
00124                                              (unsigned int)samplePosOld_[i][0],
00125                                              (unsigned int)samplePosOld_[i][1],
00126                                              radius, &values[0]);
00127   }
00128 }
00129
00130
00131 void CondensImg::DrawPosteriorDistribution(BIAS::Image<unsigned char> &img)
00132 {
00133   if (fImg_.IsEmpty())
00134     fImg_.Init(img.GetWidth(), img.GetHeight(),1);
00135
00136   double max = DrawPosteriorDistribution(fImg_);
00137
00138   float *pixel;
00139   // now copy values into result img.
00140   pixel = fImg_.GetImageData();
00141   unsigned char *data= img.GetImageData();
00142   unsigned int size=img.GetPixelCount();
00143   for (unsigned int i=0;i<size;i++) {
00144     *data = (unsigned char)(*pixel / max  * 255.0);
00145     data++;
00146     pixel++;
00147   }
00148 }
00149
00150
00151
00152
00153 double CondensImg::DrawPosteriorDistribution(BIAS::Image<float> &img)
00154 {
00155   float max=0;
00156   float *pixel;
00157   double x,y,dx,dy;
00158   int width=img.GetWidth() ,height=img.GetHeight();
00159   img.FillImageWithConstValue((float)0);
00160   for (unsigned int i=0;i<Nsamples_;i++) {
00161     x = samplePosOld_[i][0];
00162     y = samplePosOld_[i][1];
00163
00164     if ( (x>0) && (y>0) &&
00165          (x<width-1) && (y<height-1) ) {
00166       pixel= (img.GetImageDataArray()[(int)y])+ (int)x;
00167       // inverse bilinear interpolation
00168       dx = x - (double)floor(x);  dy = y - (double)floor(y);
00169       // top left
00170       *pixel+= float((1-dx) * (1-dy) * sampleWeights_[i]);
00171       if (*pixel>max) max=*pixel;
00172       // top right
00173       pixel++;
00174       *pixel+= float((1-dy) * dx * sampleWeights_[i]);
00175       if (*pixel>max) max=*pixel;
00176       // bottom right
00177       pixel+=width;
00178       *pixel+= float(dx * dy * sampleWeights_[i]);
00179       if (*pixel>max) max=*pixel;
00180       // bottom left
00181       pixel--;
00182       *pixel+= float((1-dx) * dy * sampleWeights_[i]);
00183       if (*pixel>max) max=*pixel;
00184     }
00185   }
00186   return max;
00187 }
00188
00189
00190 void CondensImg::DrawMean(BIAS::Image<unsigned char> &img)
00191 {
00192   double var=0;
00193   BIAS::Vector<double> diff;
00194   for (unsigned int n=0;n<Nsamples_;n++) {
00195     diff = samplePosOld_[n] - mean_;
00196     var +=  diff.ScalarProduct(diff) * sampleWeights_[n];
00197   }
00198   var /= sumOfWeights_;
00199   var = sqrt(var);
00200   ImageDraw<unsigned char>::LineGrey(img, (int)(mean_[0]-var),
00201                                      (int)(mean_[1]),  (int)(mean_[0]+var),
00202                                       (int)(mean_[1]),255);
00203   ImageDraw<unsigned char>::LineGrey(img,  (int)mean_[0],  (int)(mean_[1]-var),
00204                                      (int)(mean_[0]), (int)(mean_[1] + var), 255);
00205 }
00206
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/CondensImg.hh Source File

StateEstimator

CondensImg.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_CONDENSATION_HH__
00027 #define __BIAS_CONDENSATION_HH__
00028 #include "./Condensation.hh"
00029 #include "Base/Image/Image.hh"
00030 #include "Base/Math/Vector2.hh"
00031
00032 namespace BIAS {
00033
00034 /** @class CondensImg
00035     @brief example class for condensation with a 2-dim state vector.
00036
00037     The observation p(Z|X) is simply an image, where the greyvalue represents
00038     the probabilty.<br>
00039     See condensImgExample.cpp also!
00040     @author Daniel Grest, Feb. 2004
00041 */
00042
00043 class BIASStateEstimator_EXPORT CondensImg : public Condensation
00044 {
00045 public:
00046   /** u have to set the stateDim in the constructor!
00047    */
00048   CondensImg() { stateDim_=2;}
00049
00050   virtual void InitModelDefaults();
00051
00052   virtual void InitPriorPositions(unsigned int nrOfInitSamples);
00053
00054   virtual void EvaluateObservationDensities();
00055
00056   virtual void EvaluateImportanceWeights();
00057
00058   /** The area for the initial uniform distribution.
00059       Probably image size...
00060    */
00061   void SetArea(Vector2<double> min, Vector2<double> max);
00062
00063   /** converts to Image<float> and calls the function above */
00064   void SetObservation(Image<unsigned char> &osbImg);
00065
00066   /* at every (rounded) sample position, the sampleImg is set
00067      to UCHAR_MAX */
00068   void GetSamplePositions(Image<unsigned char> &sampleImg);
00069
00070   /** this draws the sample weights as circles
00071    */
00072   void DrawSamples(Image<unsigned char> &img,
00073                    unsigned char value=255);
00074
00075   /** Draws the samples with their weight as greyvalue,
00076       the weight is distributed to the 4 pixels around the sample postion.
00077       Image has to be initialized with correct size and channelcount !
00078   */
00079   void DrawPosteriorDistribution(BIAS::Image<unsigned char> &img);
00080
00081   /** same as above but float precision and
00082       returns the maximum value also.
00083   */
00084   double DrawPosteriorDistribution(BIAS::Image<float> &img);
00085
00086
00087   /** Draws the mean as a cross, which size is proportional to the variance
00088    */
00089   void DrawMean(BIAS::Image<unsigned char> &img);
00090
00091 protected:
00092   Vector<double> areaMin_, areaMax_;
00093   Image<unsigned char> obsImg_;
00094
00095   // needed for DrawPosteriorDistribution()
00096   BIAS::Image<float> fImg_;
00097
00098 };
00099
00100 }
00101
00102 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/condensImgExample.cpp Source File

StateEstimator » Examples

condensImgExample.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "../CondensImg.hh"
00027 #include "Base/Image/ImageDraw.hh"
00028 #include "Base/Image/ImageIO.hh"
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 /** This example writes some images, which show the observations made
00035     for each time step and the position and weights of the samples.
00036     The observations are such that on the left a real observation,
00037     where the random position of the Gauss on the right is like a
00038     false measurement.
00039 */
00040
00041 //int main(int argc, char** argv)
00042 int main()
00043 {
00044   BIAS::Random random;
00045
00046   // the CondensImg is just one example of the Condensation
00047   // it is necessary to overload specific functions of Condensation
00048   CondensImg condensation;
00049
00050
00051   //  condensation.SetDebugLevel(D_COND_WEIGHTS);
00052   //  condensation.SetDebugLevel(condensation.GetDebugLevel() | D_COND_INIT);
00053   //  condensation.SetDebugLevel(condensation.GetDebugLevel() | D_COND_PROCESS);
00054
00055   Image<unsigned char> observation, drawImg;
00056   observation.Init(320,240,1);
00057   observation.SetColorModel(ImageBase::CM_Grey);
00058   condensation.SetArea(Vector2<double>(0,0), Vector2<double>(320,240));
00059   condensation.Init(500); // the nr. of samples
00060
00061   condensation.InitPrior();
00062
00063   // uncomment to use importance sampling:
00064   // condensation.SetImportanceFraction(0.4);
00065
00066   char fileName[255];
00067   int n=0,iterations=20;
00068   int x=50,y=50,x2=250,y2=200;
00069   Vector<double> mean;
00070   while (n<iterations) {
00071     mean=condensation.GetMean();
00072     cout<<"Iteration: "<<n<< "/"<<iterations
00073         <<"  Mean State: "<<mean[0]<<","<<mean[1]<<endl;
00074
00075     condensation.PredictNewSamplePositions();
00076
00077     observation.FillImageWithConstValue(5);
00078     y2=random.GetUniformDistributedInt(50,200);
00079     if (n<10 || n>13) { // three times no observation
00080       ImageDraw<unsigned char>::RectangleCenterGreyFill(observation,
00081                                                         x, y, 20, 100);
00082       ImageDraw<unsigned char>::RectangleCenterGreyFill(observation,
00083                                                       x2, y2, 20, 255);
00084     }
00085     y+=10;
00086
00087     // the image 'observation' is the distribution p(Z|X)
00088     // the observations can be modelled by any
00089     condensation.SetObservation(observation);
00090     sprintf(fileName,"observationImage_%04d",n);
00091     ImageIO::Write(fileName,observation);
00092
00093     condensation.DrawSamples(drawImg);
00094     sprintf(fileName,"sampleImage_%04d",n);
00095     ImageIO::Write(fileName,drawImg);
00096
00097     // here ur overloaded functions are called
00098     condensation.Process();
00099     n++;
00100   }
00101 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Conic2D.cpp Source File

Geometry

Conic2D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Conic2D.hh"
00027 #include <Base/Geometry/HomgLine2D.hh>
00028 #include <float.h>
00029 #include <MathAlgo/PolynomialSolve.hh>
00030 #include <MathAlgo/SVD.hh>
00031 #include <Base/Math/Matrix2x2.hh>
00032 #include <Base/Geometry/HomgPoint2D.hh>
00033 #include <Base/Image/Image.hh>
00034 #include <Geometry/Quadric3D.hh>
00035 #include <Geometry/PMatrix.hh>
00036
00037 #define SVD_ZERO_THRESH DBL_EPSILON * 16
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042 double Conic2D::GetDiscriminant() const
00043 {
00044   return ((*this)[0][0]*(*this)[1][1]-(*this)[0][1]*(*this)[0][1]);
00045 }
00046
00047 bool Conic2D::IsDoubleLine() const {
00048   // degenerate case ?
00049   if (fabs(det())>DBL_EPSILON) {
00050     // rank < 3
00051     //cout << "rank<3, Det=" <<det()<<endl;
00052     return false;
00053   }
00054   if (GetSignature() != 0) {
00055     // Degenerated case
00056     //cout << "Degenerated case" <<GetSignature()<<endl;
00057     return false;
00058   }
00059   return true;
00060 }
00061
00062 bool Conic2D::IsSingleLine() const {
00063   // degenerate case ?
00064   if (fabs(det())>DBL_EPSILON) {
00065     // rank < 3
00066     //cout << "rank<3, Det=" <<det()<<endl;
00067     return false;
00068   }
00069   if (GetSignature() != 1) {
00070     // Degenerated case
00071     //cout << "Degenerated case" <<GetSignature()<<endl;
00072     return false;
00073   }
00074   return true;
00075 }
00076
00077 bool Conic2D::IsPoint() const {
00078   // degenerate case ?
00079   if (fabs(det())>DBL_EPSILON) {
00080     // rank < 3
00081     //cout << "rank<3, Det=" <<det()<<endl;
00082     return false;
00083   }
00084   if (GetSignature() != 2) {
00085     // Degenerated case
00086     //cout << "Degenerated case" <<GetSignature()<<endl;
00087     return false;
00088   }
00089   return true;
00090 }
00091
00092 bool Conic2D::IsEllipse() const {
00093   // degenerate case ?
00094   if (fabs(det())<=DBL_EPSILON) {
00095     // rank < 3
00096     //cout << "rank<3, Det=" <<det()<<endl;
00097     return false;
00098   }
00099
00100   if (GetSignature() != 1) {
00101     // Degenerated case
00102     //cout << "Degenerated case" <<GetSignature()<<endl;
00103     return false;
00104   }
00105
00106   // parabola or hyperbola ?
00107   if (GetDiscriminant()<-DBL_EPSILON) {
00108     //cerr <<"GetDiscriminant"<<endl;
00109     return false;
00110   }
00111   if ((*this)[0][0]+(*this)[1][1]>0.0) {
00112     // ok, should be ellipse
00113     return true;
00114   }
00115   // must be empty set
00116   //cerr <<(*this)[0][0] << "/" << (*this)[1][1]<<endl;
00117   return false;
00118 }
00119
00120 bool Conic2D::IsParabola() const {
00121   // degenerate case ?
00122   if (fabs(det())<=DBL_EPSILON) {
00123     // rank < 3
00124     //cout << "rank<3, Det=" <<det()<<endl;
00125     return false;
00126   }
00127
00128   if (GetSignature() != 1) {
00129     // Degenerated case
00130     //cout << "Degenerated case" <<GetSignature()<<endl;
00131     return false;
00132   }
00133
00134   if (fabs(GetDiscriminant())<DBL_EPSILON) {
00135     //cerr <<"GetDiscriminant"<<endl;
00136     return true;
00137   }
00138   return false;
00139 }
00140
00141 bool Conic2D::IsHyperbola() const {
00142   // degenerate case ?
00143   if (fabs(det())<=DBL_EPSILON) {
00144     // rank < 3
00145     //cout << "rank<3, Det=" <<det()<<endl;
00146     return false;
00147   }
00148
00149   if (GetSignature() != 1) {
00150     // Degenerated case
00151     //cout << "Degenerated case" <<GetSignature()<<endl;
00152     return false;
00153   }
00154
00155   // parabola or hyperbola ?
00156   if (GetDiscriminant()>=-DBL_EPSILON) {
00157     //cerr <<"GetDiscriminant"<<endl;
00158     return false;
00159   }
00160   return true;
00161 }
00162
00163 bool Conic2D::IsEmpty() const {
00164   // degenerate case ?
00165   if (fabs(det())<=DBL_EPSILON) {
00166     // rank < 3
00167     //cout << "rank<3, Det=" <<det()<<endl;
00168     return false;
00169   }
00170   if (GetSignature() != 3) {
00171     // Degenerated case
00172     //cout << "Degenerated case" <<GetSignature()<<endl;
00173     return false;
00174   }
00175   return true;
00176 }
00177
00178 Conic2D::ConicType Conic2D::GetConicType() const {
00179   const unsigned int Signature = GetSignature();
00180   if (fabs( det())<=DBL_EPSILON) {
00181     // degenerate case: cone center is on conic
00182     switch (Signature) {
00183     case 1: return Conic2D::SingleLine;
00184     case 2: return Conic2D::Point;
00185     }
00186     // must be signature 0
00187     if (NormL2()>DBL_EPSILON) return Conic2D::DoubleLine;
00188     // we have a zero matrix
00189     return Conic2D::WholePlane;
00190   } else {
00191     // cone center is not on conic
00192     if (Signature==3) return Conic2D::Empty; // no real points
00193     const double disc = GetDiscriminant();
00194     if (disc>DBL_EPSILON) return Conic2D::Ellipse;
00195     if (disc<-DBL_EPSILON) return Conic2D::Hyperbola;
00196     return Conic2D::Parabola;
00197   }
00198   // can never happen but wont produce "no return value" warning
00199   // no, unreachable! (jw)
00200   //return Conic2D::Unknown;
00201 }
00202
00203
00204
00205 void Conic2D::Draw(Image<unsigned char>& img) const {
00206 #ifdef BIAS_DEBUG
00207   if (IsEllipse()) {
00208     BIASERR("Better use ImageDraw::Ellipse for Conic drawing.");
00209   }
00210 #endif
00211
00212   const unsigned int uiHeight = img.GetHeight();
00213   const unsigned int uiWidth  = img.GetWidth();
00214   register unsigned char** ppI = img.GetImageDataArray();
00215
00216   HomgPoint2D p(0,0);
00217   p.Homogenize();
00218   register int LastSign = 0;
00219   double dist;
00220   // dumb drawing algorithm (improve this using parameterized drawing)
00221   // run over all pixels and check where the sign changes
00222   // wont catch all ellipses with some radius<1
00223   for (register unsigned int y=0;y<uiHeight; y++) {
00224     p[0] = -1; p[1] = y;
00225     dist = LocatePoint(p);
00226     if (dist>0.0) LastSign = 1;
00227     else if (dist<0.0) LastSign = -1;
00228     else LastSign = 0 ;
00229     for (register unsigned int x=0; x<uiWidth; x++) {
00230       p[0] = x; p[1] = y;
00231       dist = LocatePoint(p);
00232       if (dist<0.0) {
00233         if (LastSign>0) {
00234           ppI[y][x] = (ppI[y][x]>127)?0:255;
00235           cout << "D";
00236         }
00237         LastSign = -1;
00238       } else if (dist>0.0) {
00239         if (LastSign<0) {
00240           ppI[y][x] = (ppI[y][x]>127)?0:255;
00241           cout << "D";
00242         }
00243         LastSign = 1;
00244       } else {
00245         LastSign = 0;
00246         ppI[y][x] = (ppI[y][x]>127)?0:255;
00247         cout << "D";
00248       }
00249     }
00250   }
00251   // run into perpendicular direction to catch x-parallel lines
00252   for (register unsigned int x=0;x<uiWidth; x++) {
00253     p[0] = x; p[1] = -1;
00254     dist = LocatePoint(p);
00255     if (dist>0.0) LastSign = 1;
00256     else if (dist<0.0) LastSign = -1;
00257     else LastSign = 0 ;
00258     for (register unsigned int y=0; y<uiHeight; y++) {
00259       p[0] = x; p[1] = y;
00260       dist = LocatePoint(p);
00261       // cout << dist <<" ";
00262       if (dist<0.0) {
00263         if (LastSign>0) {
00264           ppI[y][x] = (ppI[y][x]>127)?0:255;
00265            cout << "D";
00266         }
00267         LastSign = -1;
00268       } else if (dist>0.0) {
00269         if (LastSign<0) {
00270           ppI[y][x] = (ppI[y][x]>127)?0:255;
00271           cout << "D";
00272         }
00273         LastSign = 1;
00274       } else {
00275         LastSign = 0;
00276         ppI[y][x] = (ppI[y][x]>127)?0:255;
00277         cout << "D";
00278       }
00279     }
00280   }
00281 }
00282
00283 void Conic2D::SetEllipse(const HomgPoint2D& Center, const double& dAngle,
00284                          const double& radius_a, const double& radius_b) {
00285
00286   SetZero();
00287   (*this)[0][0] = 1.0 / (radius_a*radius_a);
00288   (*this)[1][1] = 1.0 / (radius_b*radius_b);
00289   (*this)[2][2] = -1;
00290
00291   Matrix3x3<double> Transform, Rotation;
00292
00293   // transfer ellipse center into origin
00294   Transform.SetIdentity();
00295   Transform[0][2] = -Center[0];
00296   Transform[1][2] = -Center[1];
00297   Transform[2][2] =  Center[2];
00298
00299   // rotate by dAngle around origin
00300   Rotation.SetIdentity();
00301   Rotation[1][1] =   Rotation[0][0] = cos(dAngle);
00302   Rotation[0][1] = -(Rotation[1][0] = sin(dAngle));
00303
00304   // first transfer, than rotate
00305   Transform = Rotation * Transform;
00306
00307   (*this) = Transform.Transpose() * (*this) * Transform;
00308   // Point * (*this) * Point now means:
00309   // (R * (T * Point)) * (this_canonic) * (R * (T * Point))
00310   // where this_canonic = diag(radius_a^2, radius_b^2, -1) is the unrotated
00311   // ellipse around the origin
00312 }
00313
00314 void Conic2D::
00315 SetPointAndCovariance(const HomgPoint2D& center,
00316                       const Matrix2x2<CONIC2D_TYPE>& cov,
00317                       const double& dScale)
00318 {
00319   BIASASSERT(!center.IsAtInfinity());
00320
00321   // the Euclidean image coordinates
00322   CONIC2D_TYPE cx=center[0]/center[2], cy=center[1]/center[2];
00323
00324   // the upper left 2 by 2 matrix of the conic always consists of the inverse
00325   // covariance matrix
00326   Matrix2x2<CONIC2D_TYPE> icov;
00327   if (cov.Invert(icov)!=0){
00328     BIASASSERT(cov.Invert(icov)==0);
00329   }
00330   const double iscale=1.0/(dScale*dScale);
00331   (*this)[0][0] = icov[0][0] * iscale;
00332   (*this)[0][1] = icov[0][1] * iscale;
00333   (*this)[1][0] = icov[1][0] * iscale;
00334   (*this)[1][1] = icov[1][1] * iscale;
00335
00336   // when center is at (0, 0, 1)^T, the conic c is simply given by the
00337   // inverse covariance matrix:
00338   // c = | cov^-1  0 |
00339   //     | 0      -1 |
00340   // under a translation t = |0 -center|
00341   // the conic c transforms to
00342   // c' = t^T * c * t
00343   // resulting in
00344   (*this)[0][2]=(*this)[2][0]=-(cx*icov[0][0]+cy*icov[0][1]);
00345   (*this)[1][2]=(*this)[2][1]=-(cx*icov[1][0]+cy*icov[1][1]);
00346
00347   (*this)[2][2]=-cx*(*this)[0][2]-cy*(*this)[1][2]-1.0;
00348 }
00349
00350
00351 bool Conic2D::
00352 GetPointAndCovariance(HomgPoint2D& center,
00353                       Matrix2x2<CONIC2D_TYPE>& cov) const {
00354   // the discriminant is the determinant of the upper left 2 by 2 matrix
00355   const double dDisc = GetDiscriminant();
00356   if (fabs(dDisc) <= DBL_EPSILON) {
00357     // degenerate case
00358     return false;
00359   }
00360
00361   const double  a = (*this)[0][0];
00362   const double  b = 0.5*((*this)[1][0]+(*this)[0][1]);
00363   const double  c = (*this)[1][1];
00364   const double  d = 0.5*((*this)[2][0]+(*this)[0][2]);
00365   const double  e = 0.5*((*this)[2][1]+(*this)[1][2]);
00366
00367   // find extremum of quadratic function
00368   center[0] = (b * e - c * d) / dDisc;
00369   center[1] = (b * d - a * e) / dDisc;
00370   center[2] = 1;
00371
00372   // invert the upper left 2 by 2 matrix
00373   cov[0][0]=(*this)[1][1]/dDisc;
00374   cov[1][0]=-(*this)[1][0]/dDisc;
00375   cov[0][1]=-(*this)[0][1]/dDisc;
00376   cov[1][1]=(*this)[0][0]/dDisc;
00377
00378   return true;
00379 }
00380
00381
00382
00383 bool Conic2D::
00384 GetEllipseParameters(double center[2], double a[2], double b[2]) const {
00385   HomgPoint2D c;
00386   Matrix2x2<CONIC2D_TYPE> cov;
00387
00388   if (!GetPointAndCovariance(c, cov)){
00389     return false;
00390   }
00391
00392   center[0]=c[0];
00393   center[1]=c[1];
00394
00395   double la, lb;
00396   Vector2<double> va, vb;
00397   cov.EigenvalueDecomposition(la, va, lb, vb);
00398
00399   cout << "va "<<va[0]<<", "<<va[1]<<"\tla :"<<la
00400        << "\nvb "<<vb[0]<<", "<<vb[1]<<"\tlb :"<<lb<<endl;
00401
00402   la=sqrt(la);
00403   lb=sqrt(lb);
00404
00405   a[0]=la*va[0];
00406   a[1]=la*va[1];
00407
00408   b[0]=lb*vb[0];
00409   b[1]=lb*vb[1];
00410
00411   cout << "center "<<center[0]<<", "<<center[1]<<"\ta: "<<a[0]<<", "<<a[1]
00412        <<"\tb: "<<b[0]<<", "<<b[1]<<endl;
00413   return true;
00414 }
00415
00416 bool Conic2D::GetEllipseParameters(HomgPoint2D& Center,
00417                                    double& dAngle,
00418                                    double& radius_a,
00419                                    double& radius_b) const {
00420   if (!IsEllipse()) {
00421     //    BIASERR("Conic is no ellipse! Make sure Det=-1");
00422     return false;
00423   }
00424
00425   /* ellipse conic is symmetric matrix of form:
00426
00427      a b d
00428      b c e
00429      d e f
00430
00431   */
00432
00433   const double&  a = (*this)[0][0];
00434   const double   b = 0.5*((*this)[1][0]+(*this)[0][1]);
00435   const double&  c = (*this)[1][1];
00436   const double  d = 0.5*((*this)[2][0]+(*this)[0][2]);
00437   const double  e = 0.5*((*this)[2][1]+(*this)[1][2]);
00438
00439   const double dDisc = GetDiscriminant();
00440   if (fabs(dDisc) <= DBL_EPSILON)   {
00441     // degenerate case
00442     return false;
00443   }
00444
00445   // find extremum of quadratic function
00446   Center[0] = (b * e - c * d) / dDisc;
00447   Center[1] = (b * d - a * e) / dDisc;
00448   Center[2] = 1;
00449
00450   const double q0 = LocatePoint(Center);
00451
00452   double theta, lambda1, lambda2;
00453   const double p = (a + c) / 2.0;
00454   const double q = (a - c) / 2.0;
00455   const double r = sqrt(q * q + b * b);
00456   if ((fabs(b) <= DBL_EPSILON) && (fabs(q) <=DBL_EPSILON))
00457     theta = 0.0;
00458   else
00459     theta = 0.5 * atan2(b, q);
00460
00461   dAngle = -theta;
00462
00463   lambda1 = p + r;
00464   lambda2 = p - r;
00465
00466
00467   if ((fabs(lambda1) <= DBL_EPSILON) ||
00468       (fabs(lambda2) <= DBL_EPSILON) ||
00469       (fabs(q0) <= DBL_EPSILON)) {
00470     // degenerate
00471     return false;
00472   }
00473
00474   lambda1 /= -q0;
00475   lambda2 /= -q0;
00476
00477   radius_a = 1.0 / sqrt(fabs(lambda1));
00478   radius_b = 1.0 / sqrt(fabs(lambda2));
00479   return true;
00480 }
00481
00482
00483
00484 bool Conic2D::EllipsoidSilhouetteToGauss(const double& ProbBorder,
00485                                          HomgPoint2D& Center,
00486                                          double& NormalizationFactor){
00487
00488   const double  b = 0.5*((*this)[1][0]+(*this)[0][1]);
00489   const double  d = 0.5*((*this)[2][0]+(*this)[0][2]);
00490   const double  e = 0.5*((*this)[2][1]+(*this)[1][2]);
00491
00492   const double dDisc = GetDiscriminant();
00493   if (fabs(dDisc) <= DBL_EPSILON)   {
00494     // degenerate case
00495     return false;
00496   }
00497
00498   // find extremum of quadratic function
00499   Center[0] = (b * e - (*this)[1][1] * d) / dDisc;
00500   Center[1] = (b * d - (*this)[0][0] * e) / dDisc;
00501   Center[2] = 1;
00502
00503   const double q0 = -LocatePoint(Center);
00504   (*this)[2][2] += q0;
00505
00506   // if we want to evaluate exp( x^T * this * x) and get a probability
00507   // we have to normalize by 1.0 / (2 M_PI * sqrt( discriminant((-2.0*A)^-1 )))
00508   // where A is the upper left 2x2 part of this
00509   // after simplification and exploiting det(A^-1)=1/det(A)
00510   const double N = sqrt(GetDiscriminant()) / M_PI;
00511
00512   const double scale = log(ProbBorder) / (-1.0*q0*(log(N)+1.0));
00513   (*this) *= scale;
00514   NormalizationFactor = sqrt(GetDiscriminant()) / M_PI;
00515   return true;
00516 }
00517
00518 void Conic2D::SetQuadricProjection(const Quadric3D &Q, const PMatrix& P,
00519                                    bool UseSVD) {
00520   // get the dual quadric of Q since its projection is simple
00521   Matrix4x4<double> DualQuadric(Q.GetDualQuadric(UseSVD));
00522
00523   // "project" the dual quadric to the dual conic
00524   Conic2D DualConic;
00525   DualConic = P * DualQuadric * P.Transpose();
00526
00527   // get the actual conic from the dual conic
00528   (*this) = DualConic.GetDualConic(UseSVD);
00529
00530   // set determinant to -1, so we can separate inside/outside in ellipses
00531   Normalize();
00532 }
00533
00534 unsigned int Conic2D::GetSignature() const {
00535   // do singular value decomposition of this
00536   SVD svd(*this);
00537   Vector3<double> S;
00538   Matrix3x3<double> VT;
00539   S = svd.GetS();
00540   VT = svd.GetVT();
00541   // now we need the eigenvalues (with sign !)
00542   // compute this by projecting the (normalized) eigenvectors onto their images
00543   Vector3<double> eigenvector, eigenimage;
00544   int Signature = 0;
00545   for (unsigned int i=0; i<3; i++) {
00546     // get ith eigenvector and its image
00547     VT.GetRow(i,eigenvector);
00548     eigenimage = (*this) * eigenvector;
00549     // compute scalar product, we are not "thinking" homogenized now
00550     // this is simply an analysis of a 3x3 matrix !
00551     S[i] = eigenimage * eigenvector;
00552     if (S[i]<-SVD_ZERO_THRESH) Signature--;
00553     else if (S[i]>SVD_ZERO_THRESH) Signature++;
00554   }
00555
00556   // return number of eigenvalues with one sign minus number of eigenvalues
00557   // with opposite sign, choosing signs such that difference is not negative
00558   if (Signature<0) return (unsigned int)(-Signature);
00559   return (unsigned int)Signature;
00560 }
00561
00562
00563
00564 bool Conic2D::IntersectsCircle(const HomgPoint2D& C, double Radius) const  {
00565   // code has been copied from maple, see below
00566
00567   vector<double> Coefficients;
00568
00569   const double r = Radius;
00570   const double u = C[0]/C[2];
00571   const double v = C[1]/C[2];
00572
00573   const double a = (*this)[0][0];
00574   const double b = (*this)[1][1];
00575   const double c = (*this)[0][1] + (*this)[1][0];
00576   const double d = (*this)[0][2] + (*this)[2][0];
00577   const double e = (*this)[1][2] + (*this)[2][1];
00578   const double f = (*this)[2][2];
00579
00580   // solve quartic equation
00581   Coefficients.resize(5);
00582
00583   // coefficients copied from maple, see below
00584   Coefficients[4] = -2*a*b + b*b + a*a + c*c;
00585
00586   Coefficients[3] = 2*u*c*a + 2*u*c*b - 4*a*a*v + 2*d*c + 2*e*b + 4*b*a*v
00587     - 2*v*c*c  - 2*a*e;
00588
00589   Coefficients[2] = 2*f*b + 2*u*c*e - 2*a*a*r*r  + 2*a*a*u*u  + v*v*c*c
00590     - r*r*c*c  + u*u*c*c  + e*e + 2*u*d*a + d*d  + 2*b*a*u*u
00591     + 4*e*a*v - 2*a*f - 4*v*c*d - 4*u*c*a*v
00592     + 6*a*a*v*v  + 2*u*d*b - 2*b*a*v*v  + 2*b*a*r*r;
00593
00594   Coefficients[1] = - 2*r*r*c*d - 4*a*a*u*u*v + 2*u*c*f - 2*e*a*v*v
00595     + 2*e*a*r*r  + 2*v*v*c*d + 2*f*e - 4*u*d*a*v + 4*f*a*v
00596     - 2*v*d*d + 2*u*u*u*c*a + 2*u*c*a*v*v - 2*u*c*a*r*r
00597     + 2*e*a*u*u + 2*u*d*e + 4*a*a*v*r*r  - 4*a*a*v*v*v
00598     + 2*u*u*c*d;
00599
00600   Coefficients[0] =  2*u*d*f + 2*a*a*u*u*v*v - 2*a*a*u*u*r*r - 2*a*a*v*v*r*r
00601     + 2*u*u*u*d*a + 2*f*a*u*u - 2*f*a*v*v + 2*f*a*r*r + f*f
00602     + a*a*u*u*u*u + a*a*v*v*v*v + a*a*r*r*r*r + u*u*d*d
00603     + v*v*d*d - r*r*d*d + 2*u*d*a*v*v - 2*u*d*a*r*r;
00604
00605
00606   PolynomialSolve ps;
00607   ps.CheckCoefficients(Coefficients);
00608   return (ps.HasRealSolution(Coefficients));
00609   // solution is y component of point
00610
00611 /* maple code that has been used for IntersectsCircle:
00612
00613 eqns := { a*x^2+b*y^2+c*x*y+d*x+e*y+f=0, (x-u)*(x-u)+(y-v)*(y-v)=r*r };
00614
00615                     2       2                              2      2      2
00616                   %1  b - %1  a + %1 e + 2 %1 a v + f - a u  - a v  + a r
00617   {y = %1, x = - --------------------------------------------------------}
00618                                        %1 c + d + 2 a u
00619
00620
00621
00622                     2    2    2            4
00623      %1 := RootOf((b  + a  + c  - 2 a b) _Z  +
00624
00625             2              2
00626     (- 2 v c  + 2 d c - 4 a  v + 2 u c b + 2 e b + 2 u c a + 4 b a v - 2 a e)
00627
00628       3         2  2          2                2  2          2      2  2
00629     _Z  + (- 2 a  r  - 2 b a v  + 2 d a u + 2 a  u  + 2 b a u  + 6 a  v
00630
00631         2  2                                  2                2  2          2
00632      + v  c  + 4 v a e + 2 u c e - 4 v d c + e  - 4 u c a v + u  c  + 2 b a r
00633
00634                           2  2            2    2           2
00635      - 2 a f + 2 u d b - r  c  + 2 b f + d ) _Z  + (2 e a u  + 4 f a v
00636
00637           2  3                    2            2        2                2
00638      - 4 a  v  + 2 f e + 2 u c a v  - 2 u c a r  - 2 v d  + 2 u d e + 2 v  c d
00639
00640                       3                        2      2              2
00641      - 4 u d a v + 2 u  c a + 2 u c f + 2 e a r  - 2 r  c d - 2 e a v
00642
00643           2          2  2        2    2                    3              2
00644      + 2 u  c d - 4 a  u  v + 4 a  v r ) _Z + 2 u d f + 2 u  d a - 2 f a v
00645
00646         2      2  2  2    2  4    2  4    2  4    2  2    2  2    2  2
00647      + f  + 2 a  u  v  + a  u  + a  v  + a  r  + u  d  + v  d  - r  d
00648
00649                 2            2      2  2  2      2  2  2          2          2
00650      + 2 u d a v  - 2 u d a r  - 2 a  v  r  - 2 a  u  r  + 2 f a u  + 2 f a r )
00651
00652 */
00653
00654 }
00655
00656 Conic2D Conic2D::GetDualConic(bool UseSVD) const {
00657   if (UseSVD) {
00658     // do it the safe way
00659     SVD csvd((*this), SVD_ZERO_THRESH, false);
00660     return (csvd.Invert());
00661   }
00662   // do it the fast way
00663   const CONIC2D_TYPE& a = (*this)[0][0];
00664   const CONIC2D_TYPE& b = (*this)[0][1];
00665   const CONIC2D_TYPE& c = (*this)[0][2];
00666   const CONIC2D_TYPE& e = (*this)[1][1];
00667   const CONIC2D_TYPE& f = (*this)[1][2];
00668   const CONIC2D_TYPE& g = (*this)[2][2];
00669   // do it the fast way
00670   Conic2D Dual;
00671   Dual[0][0] = e*g - f*f;
00672   Dual[0][1] = Dual[1][0] = c*f - b*g;
00673   Dual[0][2] = Dual[2][0] = b*f - c*e;
00674   Dual[1][1] = a*g - c*c;
00675   Dual[1][2] = Dual[2][1] = b*c - a*f;
00676   Dual[2][2] = a*e - b*b;
00677
00678   return Dual;
00679 }
00680
00681 int Conic2D::
00682 GetTangentPoints(const HomgPoint2D& x, HomgPoint2D& p1, HomgPoint2D& p2) const
00683 {
00684   Conic2D polar_cross, dc;
00685   HomgLine2D polar;
00686
00687   // The polar of the pointy x with respect to the conic *this intersects the
00688   // conic at the two points where the tangents to the conic through the point
00689   // x touch the conic.
00690   // See Hartley, Zisserman : "Multiple View Geometry", second edidtion
00691   // chapter 2.8, page 58
00692   //polar = (HomgLine2D)((*this)*x);
00693   Mult(x, polar);
00694   BIASCDOUT(D_CONIC2D_TAN, "polar: "<<polar<<endl);
00695
00696   // dc is line (or dual) conic consisting of the two intersection points
00697   // of the polar with the conic C
00698   polar_cross.SetAsCrossProductMatrix(polar);
00699   //dc = polar_cross * (*this) * polar_cross;
00700   Mult(polar_cross, dc);
00701   dc.MultLeft(polar_cross);
00702   BIASCDOUT(D_CONIC2D_TAN, "dc: "<<dc<<endl);
00703
00704   // A dual conic dc consistig of the two points y=(y1, y2, 1)^T and
00705   // x=(x1, x2, 1)^T is given by x*y^T+y*x^T
00706   // (see Hartley, Zisserman : "Multiple View Geometry", second edidtion
00707   // chapter 2.2.3 "Conics and dual conics", page 32, Example 2.8)
00708   // resulting in the matrix A =
00709   //                +-                                       -+
00710   //                |     2 x1 y1,    x1 y2 + x2 y1, x1 + y1  |
00711   //                |                                         |
00712   //                |  x1 y2 + x2 y1,    2 x2 y2,    x2 + y2  |
00713   //                |                                         |
00714   //                |     x1 + y1,       x2 + y2,       2     |
00715   //                +-                                       -+
00716   // The system given by (this) = A can be solved analytically:
00717
00718   // Norm lower right entry of conic to 2.0
00719   //  dc /= 0.5*dc[2][2];
00720   dc.MultiplyIP(0.5*dc[2][2]);
00721   BIASCDOUT(D_CONIC2D_TAN,  "normed dc: "<<dc<<endl);
00722
00723   // Set (*this) = +-         -+
00724   //               |  a  b  c  |
00725   //               |  b  c  e  |
00726   //               |  d  e  2  |
00727   //               +-         -+
00728   double a=dc[0][0], b=dc[0][1], c=dc[1][1], d=dc[0][2], e=dc[1][2];
00729   // Setting (*this) = A results in the equations
00730   // e = x2+y2  ->  x2 = e-y2   (I)
00731   // d = x1+y1  ->  x1 = d-y1   (II)
00732   // c = 2*x2*y2                (III)
00733   // b = x1*y2 + x2*y1          (IV)
00734   // a = 2*x1*y1                (V)
00735   //
00736   double y1a, y1b, y2a, y2b, y1, y2, min;
00737   // Now use (I) in (III) and solve the quadratic equation
00738   double tmp=e*e*0.25 - c*0.5, tmp2;
00739   if (tmp>=0.0){
00740     tmp = sqrt(tmp);
00741     tmp2=e*0.5;
00742     y2a = tmp2+tmp;
00743     y2b = tmp2-tmp;
00744   } else {
00745     BIASERR("no solution for y2: tmp<0 "<<tmp);
00746     return -1;
00747   }
00748   BIASCDOUT(D_CONIC2D_TAN, "y2a: "<<2.0*(e-y2a)*y2a-c
00749             <<"\ny2b: "<<2.0*(e-y2b)*y2b-c<<endl);
00750
00751   // Now use (II) in (V) and solve the quadratic equation
00752   tmp=d*d*0.25 - a*0.5;
00753   if (tmp>=0.0){
00754     tmp = sqrt(tmp);
00755     tmp2 = d*0.5;
00756     y1a = tmp2+tmp;
00757     y1b = tmp2-tmp;
00758   } else {
00759     BIASERR("no solution for y1: tmp<0 "<<tmp);
00760     return -1;
00761   }
00762   BIASCDOUT(D_CONIC2D_TAN,  "y1a: "<<2*d*y1a-2*y1a*y1a-a
00763             << "\ny1b: "<<2*d*y1b-2*y1b*y1b-a<<endl);
00764
00765   // 4 different solutions exist. Test for the best solution by using
00766   // the equation (IV) and minimize the error
00767
00768   // test y1a, y2a
00769   BIASCDOUT(D_CONIC2D_TAN,  "y1a, y2a ("<<y1a<<", "<<y2a<<")"<<endl);
00770   y1=y1a, y2=y2a;
00771   min = fabs((d-y1)*y2+(e-y2)*y1 - b);
00772   BIASCDOUT(D_CONIC2D_TAN,  "y1a, y2a = "<<min<<endl);
00773   // test y1a y2b
00774   BIASCDOUT(D_CONIC2D_TAN,  "y1a, y2b ("<<y1a<<", "<<y2b<<")"<<endl);
00775   tmp = fabs((d-y1a)*y2b+(e-y2b)*y1a - b);
00776   if (tmp<min){
00777     min = tmp;
00778     y1=y1a;
00779     y2=y2b;
00780     BIASCDOUT(D_CONIC2D_TAN,  "y1a, y2b = "<<min<<endl);
00781   } else {
00782     BIASCDOUT(D_CONIC2D_TAN,  "not taking y1a, y2b = "<<tmp<<endl);
00783   }
00784   // test y1b, y2a
00785   BIASCDOUT(D_CONIC2D_TAN,  "y1b, y2a ("<<y1b<<", "<<y2a<<")"<<endl);
00786   tmp = fabs((d-y1b)*y2a+(e-y2a)*y1b - b);
00787   if (tmp<min){
00788     min = tmp;
00789     y1=y1b;
00790     y2=y2a;
00791     BIASCDOUT(D_CONIC2D_TAN,  "y1b, y2a = "<<min<<endl);
00792   } else {
00793     BIASCDOUT(D_CONIC2D_TAN,  "not taking y1b, y2a = "<<tmp<<endl);
00794   }
00795
00796   // test y1b, y2b
00797   BIASCDOUT(D_CONIC2D_TAN,  "y1b, y2b ("<<y1b<<", "<<y2b<<")"<<endl);
00798   tmp = fabs((d-y1b)*y2b+(e-y2b)*y1b - b);
00799   if (tmp<min){
00800     min = tmp;
00801     y1=y1b;
00802     y2=y2b;
00803     BIASCDOUT(D_CONIC2D_TAN,  "y1b, y2b = "<<min<<endl);
00804   } else {
00805     BIASCDOUT(D_CONIC2D_TAN,  "not taking y1b, y2b = "<<tmp<<endl);
00806   }
00807
00808   p1.Set(y1, y2, 1.0);
00809   p2.Set(d-y1, e-y2, 1.0);
00810
00811   BIASCDOUT(D_CONIC2D_TAN, "tangent points: "<<p1<<"\t"<<p2<<endl);
00812
00813
00814   return 2;
00815 }
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Conic2D.hh Source File

Geometry

Conic2D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CONIC2D_HH__
00027 #define __CONIC2D_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Math/Matrix3x3.hh>
00033 #include <Base/Geometry/HomgPoint2D.hh>
00034
00035 #define CONIC2D_TYPE double
00036
00037 #define D_CONIC2D_TAN 0x00000001
00038
00039 #define GAUSS2D_CONFIDENCE_20_PERCENT 0.66
00040 #define GAUSS2D_CONFIDENCE_39_PERCENT 1.00
00041 #define GAUSS2D_CONFIDENCE_50_PERCENT 1.18
00042 #define GAUSS2D_CONFIDENCE_68_PERCENT 1.52
00043 #define GAUSS2D_CONFIDENCE_90_PERCENT 2.15
00044 #define GAUSS2D_CONFIDENCE_95_PERCENT 2.45
00045 #define GAUSS2D_CONFIDENCE_99_PERCENT 3.04
00046
00047 namespace BIAS {
00048
00049   // forward declarations, to reduce compile time, includes are in the cc file
00050   template <class T> class Matrix2x2;
00051   template <class T> class Image;
00052   class Quadric3D;
00053   class PMatrix;
00054
00055   /** @class Conic2D
00056       @ingroup g_geometry
00057       @brief A 3x3 matrix representing a conic (cone/plane intersection)
00058
00059       A conic is a (contour) line in P2, which resulted from the projection
00060       of a quadric (see Quadric3D) of P3. Conics are ellipses, hyperbolas, ...
00061       Each point x of the conic C fulfills  x^T C x = 0
00062       which is a quadratic equation in the components of x.
00063       If nothing else is mentioned, we mean point conics, not line conics.
00064       @author koeser, 10/2003 */
00065
00066   class BIASGeometry_EXPORT Conic2D
00067     : public Matrix3x3<CONIC2D_TYPE>, public Debug
00068   {
00069   public:
00070
00071     enum ConicType { Unknown=0, WholePlane, Ellipse, Parabola, Hyperbola,
00072                      SingleLine, DoubleLine, Point, Empty};
00073
00074     /** @brief default constructor sets all fields to zero */
00075     Conic2D() {};
00076
00077     /** @brief set default matrix values */
00078     explicit Conic2D(const MatrixInitType& i)
00079       : Matrix3x3<CONIC2D_TYPE>(i){};
00080
00081     /** @brief copy constructor uses Conic2D::operator= */
00082     Conic2D(const Matrix<CONIC2D_TYPE>& m) { (*this)=m;};
00083
00084     /** @brief check whether this conic is an ellipse */
00085     bool IsEllipse() const;
00086
00087     /** @brief check whether this conic is a parabola */
00088     bool IsParabola() const;
00089
00090     /** @brief check whether this conic is a hyperbola */
00091     bool IsHyperbola() const;
00092
00093     /** @brief check whether this conic is a single line */
00094     bool IsSingleLine() const;
00095
00096     /** @brief check whether this conic is a double line */
00097     bool IsDoubleLine() const;
00098
00099     /** @brief check whether this conic is a point */
00100     bool IsPoint() const;
00101
00102     /** @brief check whether this conic contains no points */
00103     bool IsEmpty() const;
00104
00105     /** @brief return the type of point conic of (*this) */
00106     ConicType GetConicType() const;
00107
00108     /** @brief constructs a conic from a point and a covariance matrix
00109         @author woelk 06/2005 */
00110     void SetPointAndCovariance(const HomgPoint2D& center,
00111                                const Matrix2x2<CONIC2D_TYPE>& cov,
00112                                const double& dScale =
00113                                GAUSS2D_CONFIDENCE_39_PERCENT);
00114
00115     /** @brief reconstructs center and covariance matrix from conic
00116         @author woelk 06/2005 */
00117     bool GetPointAndCovariance(HomgPoint2D& center,
00118                                Matrix2x2<CONIC2D_TYPE>& cov) const;
00119
00120     /** @brief determines if the point is inside/on/outside the conic
00121
00122     for "closed" conics, such as ellipses, call this function for
00123     a point to determine its position relative to the conic:
00124     <0 means: inside the conic
00125     >0 means: outside the conic
00126     =0 means on the border line
00127     @attention: make sure that the conic is normalized
00128     LocatePoint internally computes the difference of Mahalanobis distances
00129     of point2D from the center and a conic point from the center */
00130     inline double LocatePoint(const HomgPoint2D& point2D) const {
00131       return ( point2D *((*this)*point2D) ); }
00132
00133     /** @brief sets mean of first 2 diag elements to positive value,
00134         so that LocatePoint(x)<0 means x is in conic */
00135     inline bool Normalize() { double d=(*this)[0][0]+(*this)[1][1];
00136     if (fabs(d)<DOUBLE_EPSILON) return false; (*this) /= d; return true;}
00137
00138     /** @brief construct an ellipse with explicit parameters
00139         @param radius_a radius in (originally) x direction
00140         @param radius_b radius in (originally) y direction
00141         @param dAngle rotation angle in radiant (math. positive)
00142         @center center of ellipse  */
00143     void SetEllipse(const HomgPoint2D& Center, const double& dAngle,
00144                     const double& radius_a, const double& radius_b);
00145
00146     /** @brief computes explicit ellipse representation
00147
00148     if the given conic is an ellipse, the ellipse parameters are extracted
00149     and returned in the functions parameters
00150     @param dAngle rotation angle in radiant (math. positive)
00151     @param radius_a radius in (originally) x direction
00152     @param radius_b radius in (originally) y direction
00153     @return returned parameters are only valid if true is returned,
00154     otherwise (*this) is no (or a degenerate) ellipse */
00155     bool GetEllipseParameters(HomgPoint2D& Center,
00156                               double& dAngle,
00157                               double& radius_a,
00158                               double& radius_b) const;
00159
00160     /** returns the center and the two halfaxes of the conic if feasible
00161         (f.e. for drawing with the class ImageDraw)
00162         @author woelk 06/2005 */
00163     bool GetEllipseParameters(double center[2],
00164                               double a[2], double b[2]) const;
00165
00166     /** @brief assign a probability of a gaussian distribution to a conic to
00167         measure probabilities in the image plane
00168
00169         Ellipsoids in 3D space represent iso surfaces of gaussian normal
00170         distributions (e.g. of the 99% volume). Projecting a silhouette of such
00171         an ellipsoid gives a conic (e.g. an ellipse) in the image.
00172         If we want to interpret the conic as the covariance matrix of a gauss
00173         within the image plane, we have to convert it in such a way that
00174         the ellipse center yields zero and the border (the former conic line)
00175         a different value than zero, e.g. a value corresponding to 99%.
00176
00177         Afterwards, you can simply compute
00178         NormalizationFactor * exp(this->LocatePoint(x))
00179         to compute the probability at x
00180
00181         @status still have to test this !
00182     */
00183     bool EllipsoidSilhouetteToGauss(const double& ProbBorder,
00184                                     HomgPoint2D& Center,
00185                                     double& NormalizationFactor);
00186
00187     /** @brief draws conic into an image using a brute force method
00188
00189     A more elegant way of drawing a conic for the case when the conic is
00190     an ellipse can be found in ImageDraw (fw)
00191     */
00192     void Draw(Image<unsigned char>& img) const;
00193
00194     Conic2D& operator=(const Matrix<CONIC2D_TYPE>& m) {
00195       Matrix3x3<CONIC2D_TYPE>::operator=(m);
00196       return (*this);
00197     };
00198
00199     /** @brief constructs a conic that is a projection of the quadric Q using
00200         camera matrix P */
00201     void SetQuadricProjection(const Quadric3D &Q, const PMatrix& P,
00202                               bool UseSVD = false);
00203
00204     /** @brief returns true if the given Conic intersects with the circle of
00205         radius Radius around point C, false otherwise
00206
00207         This is a contour line intersection ! Does not test whether circle
00208         lies "in" conic or vice versa !
00209         @note strongly depends upon numerical robustness of SolveQuartic !
00210         @status tested */
00211     bool IntersectsCircle(const HomgPoint2D& C, double Radius) const;
00212
00213     /** @brief returns the dual of this conic, which is the inverse */
00214     Conic2D GetDualConic(bool UseSVD = false) const;
00215
00216     /** @brief computes signature of matrix,
00217         (no. of neg. eigenvalues) - (no. of pos. eigenvalues) or vice versa
00218         if there are more pos. eigenvalues */
00219     unsigned int GetSignature() const;
00220
00221     /** @brief Returns the two points p1 and p2 on the conic subject to the
00222         constraint that the two tangents at the points p1 and p2 intersect in
00223         the point x.
00224         Returns the number of tangent points (1 or 2) or -1 on error
00225         @author woelk 06/2005 */
00226     int GetTangentPoints(const HomgPoint2D& x, HomgPoint2D& p1,
00227                           HomgPoint2D& p2) const;
00228
00229   protected:
00230     /** @return a value classifying the conic:
00231         -   Discriminant<0: hyperbola
00232         -  (Discriminant=0: parabola ?)
00233         -   Discriminant>0: ellipse */
00234     double GetDiscriminant() const;
00235   };
00236
00237   inline std::ostream& operator<<(std::ostream &os, Conic2D::ConicType& t) {
00238     switch (t) {
00239     case Conic2D::Ellipse   :os<<"Ellipse";break;
00240     case Conic2D::Parabola  :os<<"Parabola";break;
00241     case Conic2D::Hyperbola :os<<"Hyperbola";break;
00242     case Conic2D::SingleLine:os<<"SingleLine";break;
00243     case Conic2D::DoubleLine:os<<"DoubleLine";break;
00244     case Conic2D::Point     :os<<"Point";break;
00245     case Conic2D::Empty     :os<<"Empty";break;
00246     case Conic2D::WholePlane:os<<"WholePlane";break;
00247     case Conic2D::Unknown   :os<<"Unknown";break;
00248     default:BIASERR("Undefined ConicType !"); BIASABORT;
00249     }
00250     return os;
00251   }
00252
00253 }
00254 #endif
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ConsoleRedirectIO.cpp Source File

Gui

ConsoleRedirectIO.cpp

Go to the documentation of this file.
00001 /** Jan Woetzel 2005 */
00002 #include "ConsoleRedirectIO.hh"
00003
00004 #ifdef WIN32
00005 #  include <windows.h>
00006 #  include <stdio.h>
00007 #  include <fcntl.h>
00008 #  include <io.h>
00009 #  include <iostream>
00010 #  include <fstream>
00011 using namespace std;
00012 // maximum number of lines the output console should have
00013 #define CONSOLE_BUF_HEIGHT 1024;
00014 #define CONSOLE_BUF_WIDTH  140;
00015 #endif // WIN32
00016
00017
00018 // JW
00019 void BIAS::ConsoleRedirectIO()
00020 {
00021 #ifdef WIN32
00022 //#  ifdef _DEBUG
00023
00024     //
00025     // open console window
00026     //
00027     int hConHandle=0;
00028     long lStdHandle=0;
00029     CONSOLE_SCREEN_BUFFER_INFO coninfo;
00030     FILE *fp=NULL;
00031     // allocate a console for this app
00032     AllocConsole();
00033     // set the screen buffer to be big enough to let us scroll text
00034     GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
00035     coninfo.dwSize.X = CONSOLE_BUF_WIDTH;
00036     coninfo.dwSize.Y = CONSOLE_BUF_HEIGHT;
00037     // buffer size
00038     SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
00039
00040     //// position and window size:
00041     //coninfo.srWindow.Left=0;
00042     //coninfo.srWindow.Right=CONSOLE_BUF_WIDTH;
00043     //coninfo.srWindow.Top=0;
00044     //coninfo.srWindow.Bottom=75;
00045     //// window size and pos
00046     //SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), TRUE /*bAbsolute*/ , &coninfo.srWindow );
00047
00048     // window title
00049     SetConsoleTitle("ConsoleRedirectIO");
00050
00051     //
00052     // redirections
00053     //
00054     // redirect unbuffered STDOUT to the console
00055     lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
00056     hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
00057     fp = _fdopen( hConHandle, "w" );
00058     *stdout = *fp;
00059     setvbuf( stdout, NULL, _IONBF, 0 );
00060
00061     // redirect unbuffered STDIN to the console
00062     lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
00063     hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
00064     fp = _fdopen( hConHandle, "r" );
00065     *stdin = *fp;
00066     setvbuf( stdin, NULL, _IONBF, 0 );
00067
00068     // redirect unbuffered STDERR to the console
00069     lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
00070     hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
00071     fp = _fdopen( hConHandle, "w" );
00072     *stderr = *fp;
00073     setvbuf( stderr, NULL, _IONBF, 0 );
00074
00075     // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog
00076     // point to console as well and output in correct order
00077     ios::sync_with_stdio(true);
00078
00079 //#  endif // _DEBUG
00080 #else // WIN32
00081     // Linux has no WinMain applications, do nothing. JW
00082 #endif // WIN32
00083 }
00084
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ConsoleRedirectIO.hh Source File

Gui

ConsoleRedirectIO.hh

Go to the documentation of this file.
00001 #ifndef __ConsoleRedirectIO_HH__
00002 #define __ConsoleRedirectIO_HH__
00003
00004 #include <bias_config.h>
00005
00006 namespace BIAS {
00007
00008   /**  @ingroup g_gui
00009   @brief Extra Console for WIN32 WinMain gui applications.
00010
00011   Redirects STDIN, STDERR, cout, cerrm wcout, cin, wcin, wcerr, cerr, wclog, clog.
00012
00013   Displays output to cout, cerrm printf etc.
00014   based on "Covington, Michael. "Adding Graphics to Console Applications," Visual Developer, June/July 1997.
00015   Jan Woetzel 2005
00016   */
00017   void BIASGui_EXPORT ConsoleRedirectIO();
00018 }
00019
00020 #endif // __ConsoleRedirectIO_HH__
00021
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Constraints.hh Source File

Base » Debug

Constraints.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 namespace BIAS {
00026
00027   /** @brief compile time check if B is (grand)father of T
00028   Found it in Bjarne Stroustrup's FAQ:
00029   http://public.research.att.com/~bs/bs_faq2.html
00030   "Actually, Derived_from doesn't check derivation, but conversion, but
00031   that's often a better constaint. Finding good names for constraints
00032   can be hard."
00033   @author woelk 02/2006 */
00034   template<class T, class B>
00035   class DerivedFrom
00036   {
00037   public:
00038     static void Constraints(T* p)
00039     {
00040       B* pb = p;
00041       pb=0 /*NULL*/;
00042     }
00043
00044     DerivedFrom() {
00045       void(*p)(T*) = Constraints;
00046       p=0 /*NULL*/;
00047     }
00048   };
00049
00050   /** @brief compile time check for copy compatibilty between T1 and T2
00051   Found it in Bjarne Stroustrup's FAQ:
00052   http://public.research.att.com/~bs/bs_faq2.html
00053   @author woelk 02/2006 */
00054   template<class T1, class T2>
00055   class CanCopy
00056   {
00057   public:
00058     static void Constraints(T1 a, T2 b) { T2 c = a; b = a; }
00059     CanCopy() {
00060       void(*p)(T1,T2) = Constraints;
00061       p=0 /*NULL*/;
00062     }
00063   };
00064
00065   /** @brief compile time check for comparabilty of T1 and T2
00066   Found it in Bjarne Stroustrup's FAQ:
00067   http://public.research.att.com/~bs/bs_faq2.html
00068   @author woelk 02/2006 */
00069   template<class T1, class T2 = T1>
00070   class CanCompare
00071   {
00072   public:
00073     static void Constraints(T1 a, T2 b) { a==b; a!=b; a<b; }
00074     CanCompare() {
00075       void(*p)(T1,T2) = Constraints;
00076       p=0 /*NULL*/;
00077     }
00078   };
00079
00080   /** @brief compile time check if T1 can be multiplied by T2
00081   Found it in Bjarne Stroustrup's FAQ:
00082   http://public.research.att.com/~bs/bs_faq2.html
00083   @author woelk 02/2006 */
00084   template<class T1, class T2, class T3 = T1>
00085   class CanMultiply
00086   {
00087   public:
00088     static void Constraints(T1 a, T2 b, T3 c) { c = a*b; }
00089     CanMultiply() {
00090       void(*p)(T1,T2,T3) = Constraints;
00091       p=0 /*NULL*/;
00092     }
00093   };
00094 }
00095
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Contour.cpp Source File

Image

Contour.cpp

Go to the documentation of this file.
00001 #include "Contour.hh"
00002
00003 // std includes
00004 #include <limits>
00005
00006 using namespace std;
00007 using namespace BIAS;
00008
00009 void Contour::Init_(BIAS::Image<unsigned char> &img)
00010 {
00011   img_w = img.GetWidth();
00012   img_h = img.GetHeight();
00013   data_  = img.GetImageDataArray();
00014
00015   // draw v lines
00016   const int offset = img_w-1;
00017   for (int i = 0; i < img_h; i++) {
00018     data_[i][0]      = background_;
00019     data_[i][offset] = background_;
00020   }
00021   // draw h lines
00022   for (int n = 0; n < img_h; n += (img_h-1)) {
00023     unsigned char *line = data_[n];
00024     for (int i = 0; i < img_w; i++)
00025       line[i] = background_;
00026   }
00027 }
00028
00029
00030 void Contour::FindFirst_(int &pos_x, int &pos_y) {
00031   for (int y = 0; y < img_h; y++)
00032     for (int x = 0; x < img_w; x++)
00033       if ( IsFg(x,y) ) {
00034         pos_x = x;
00035         pos_y = y;
00036         return;
00037       }
00038 }
00039
00040
00041 int Contour::Process(BIAS::Image<unsigned char> &img)
00042 {
00043   contPixels_.clear();
00044   directionList_.clear();
00045
00046   Init_(img);
00047
00048   // find first foreground pixel location
00049   int first_x = -1;
00050   int first_y = -1;
00051   FindFirst_( first_x, first_y );
00052   if ( first_x < 0 || first_y < 0 )
00053     return -1;
00054
00055   // create
00056   int x = first_x;
00057   int y = first_y;
00058   int d = 0;
00059
00060   do {
00061     contPixels_.push_back ( BIAS::Vector2<int>( x,y ) );
00062     d -= 3;
00063     while (!IsFg(x,y,d)) {
00064       d++;
00065     }
00066     d = (d+16)%8;
00067
00068     directionList_.push_back ( d );
00069
00070     switch ( d ) {
00071     case 0: x += 1; y += 0; break;
00072     case 1: x += 1; y += 1; break;
00073     case 2: x += 0; y += 1; break;
00074     case 3: x -= 1; y += 1; break;
00075     case 4: x -= 1; y += 0; break;
00076     case 5: x -= 1; y -= 1; break;
00077     case 6: x += 0; y -= 1; break;
00078     case 7: x += 1; y -= 1; break;
00079     }
00080   } while ( x != first_x  ||  y != first_y );
00081   return 0;
00082 }
00083
00084 int Contour::Draw(BIAS::Image<unsigned char> &img,
00085                 unsigned char greyValue)
00086 {
00087   for (unsigned int i=0;i<contPixels_.size();i++) {
00088 #ifdef BIAS_DEBUG
00089     if ( (contPixels_[i][1]<0) || contPixels_[i][1]>=(int)img.GetHeight() ||
00090          (contPixels_[i][0]<0) || contPixels_[i][0]>=(int)img.GetWidth() ) {
00091       BIASERR("contour does not fit into image");
00092       return -1;
00093     }
00094 #endif
00095     img.GetImageDataArray()[contPixels_[i][1]][contPixels_[i][0]]=greyValue;
00096   }
00097   return 0;
00098 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Contour.hh Source File

Image

Contour.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __BIAS_IMAGECONTOUR_HH__
00025 #define __BIAS_IMAGECONTOUR_HH__
00026 #include <Base/Common/BIASpragmaStart.hh>
00027
00028 // std includes
00029 #include <vector>
00030
00031 // BIAS includes
00032 #include <Base/Image/Image.hh>
00033 #include <Base/Math/Vector2.hh>
00034
00035 namespace BIAS {
00036     /** @class Contour
00037     @ingroup g_image
00038     @brief a class for calculating the contour(boundary) of a region,
00039     the contour is available as a point set or by freeman code
00040     @author Dennis Herzog, Jan. 2005, edited by grest
00041     */
00042     class BIASImage_EXPORT Contour {
00043     public:
00044         Contour() { background_=0; }
00045         /** creates the contour of the first blob found in the image;
00046         a pixel is assumed as foreground , if the pixel value is != 0;
00047         this function works even if the blob is located at the image border<br>
00048         IMPORTANT: the border of the image is set to zero !
00049         @author herzog, edited by grest
00050         */
00051         int Process(BIAS::Image<unsigned char> &img);
00052
00053         /* draws the contour into img, which was calcuated by Process() before
00054         */
00055         int Draw(BIAS::Image<unsigned char> &img,
00056             unsigned char greyValue=255);
00057
00058         /** @param code the resulting
00059         list of difference vectors coded in FreeManCode,
00060         that means: <br>
00061         0 = step right --<br>
00062         1 = step right & step down --<br>
00063         2 = step down --<br>
00064         3 = step left & step down --<br>
00065         ... --<br>
00066         6 = step up --<br>
00067         7 = step right & step up<br>
00068         */
00069         inline std::vector<int>& GetFreemanCode() { return directionList_;}
00070
00071         /** all pixels belonging to the contour are returned
00072         The first entry corresponds to the first freemanCode,
00073         that means: the direction from the first to the second pixel
00074         is the first value in GetFreemanCode()
00075         */
00076         inline std::vector< BIAS::Vector2<int> >& GetPointSet()
00077         { return contPixels_; }
00078
00079         inline void SetBackGround(unsigned char backGroundColor)
00080         { background_=backGroundColor;}
00081
00082     protected:
00083
00084         inline bool IsFg(int x, int y) {
00085             unsigned char *pixel = data_[y] + x;
00086             return !( pixel[0] == background_ );
00087         }
00088
00089         inline bool IsFg(int x, int y, int direction) {
00090             switch ( (direction+16)%8 ) {
00091     case 0: return IsFg(x+1,y+0);
00092     case 2: return IsFg(x+0,y+1);
00093     case 4: return IsFg(x-1,y+0);
00094     case 6: return IsFg(x+0,y-1);
00095     case 1: return IsFg(x+1,y+1);
00096     case 3: return IsFg(x-1,y+1);
00097     case 5: return IsFg(x-1,y-1);
00098     case 7: return IsFg(x+1,y-1);
00099             }
00100             BIASERR("IsFg: error");
00101             return false;
00102         }
00103
00104         void FindFirst_(int &pos_x, int &pos_y);
00105         void Init_(BIAS::Image<unsigned char> &img);
00106
00107         int img_w;
00108         int img_h;
00109         unsigned char **data_;
00110
00111         unsigned char background_;
00112
00113         std::vector<int> directionList_;
00114         std::vector< BIAS::Vector2<int> > contPixels_; // the contour pixels
00115     };
00116
00117
00118 }
00119
00120 #include <Base/Common/BIASpragmaEnd.hh>
00121 #endif
00122
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/conventions.dox File Reference

Doc/conventions.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/convertRAW.cpp Source File

Base » Image » Examples

convertRAW.cpp

Go to the documentation of this file.
00001 /**
00002 \example convertRAW.cpp demonstrates reading of RAW4096 image format
00003
00004 Reads a .raw RAW4096 image which contains a scorpion 1600x1200 Bayer raw pattern with 8 bpp
00005 and writes it as a jpeg.
00006 Thsi format us used by Mediendom project by Jan Woetzel and Juergen Rienow 2005.
00007 @author Jan Woetzel 05/2005 */
00008
00009 #include <Base/Image/ImageIO.hh>
00010 #include <Base/Image/ImageConvert.hh>
00011
00012 #include <Base/Debug/Error.hh>
00013 #include <Base/Debug/DebugSimple.hh>
00014
00015 // ----------------------
00016
00017 using namespace std;
00018 using namespace BIAS;
00019
00020
00021 void usage(int /*argc*/, char** /*argv*/)
00022 {
00023   cout<<"usage:  readRAW <img.raw> <out.jpg> <jpgQuality>"<<endl
00024     <<"author: Jan Woetzel"<<endl;
00025 }
00026
00027 // main entry for console application
00028 int main(int argc, char** argv){
00029   if (argc==1) usage(argc, argv);
00030
00031   cout<<"started ";
00032   if (argc>0) cout<<argv[0];
00033   cout<<endl;
00034
00035   BIAS::Image<unsigned char> img;
00036
00037   string in("img.raw");
00038   string out("img_out.jpg");
00039   unsigned int quality=100;
00040
00041   if (argc>1) in =argv[1];
00042   if (argc>2) out=argv[2];
00043   if (argc>3) quality=atoi(argv[3]);
00044
00045   // work:
00046   int result = 0;
00047   result = BIAS::ImageIO::ImportRAWwithHeader(in, img);
00048   if (result!=0) {
00049     cout<<"could not load image "<<in<<endl;
00050     return -2;
00051   };
00052
00053   /// to RGB  convert 1 ch Bayer --> 3 channel RGB
00054   BIAS::Image<unsigned char> imgRGB;
00055   BIAS::ImageConvert::ToRGB(img, imgRGB);
00056
00057   // write result:
00058   result = ImageIO::ExportImage(out, imgRGB, BIAS::ImageIO::FF_jpg, false, quality,false,false);
00059   if (result!=0)
00060     cout<<"could not write image."<<endl;
00061
00062 #ifdef BIAS_HAVE_OPENCV
00063   imgRGB.Display(true, 6000);
00064 #endif // BIAS_HAVE_OPENCV
00065
00066   cout<<"done."<<endl;
00067 }
00068
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Convolution.cpp Source File

Filter

Convolution.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004 (see file CONTACTS for details)
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Link�ing
00009   sweden
00010
00011   Multimediale Systeme der Informationsverarbeitung
00012   Institut fuer Informatik
00013   Christian-Albrechts-Universitaet Kiel
00014
00015 BIAS is free software; you can redistribute it and/or modify
00016 it under the terms of the GNU Lesser General Public License as published by
00017 the Free Software Foundation; either version 2.1 of the License, or
00018 (at your option) any later version.
00019
00020 BIAS is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 GNU Lesser General Public License for more details.
00024
00025 You should have received a copy of the GNU Lesser General Public License
00026 along with BIAS; if not, write to the Free Software
00027 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 */
00029
00030 /// \todo This file contains no kind of optimization at all for the moment.
00031 /// To be added later on
00032
00033 #include "Convolution.hh"
00034
00035 #ifdef BIAS_DEBUG
00036 #include "Base/Image/ImageIO.hh"
00037 #endif
00038
00039 #include <Base/Common/BIASpragma.hh>
00040
00041 using namespace BIAS;
00042 using namespace std;
00043
00044 //calculates the center pixel in the convolution kernel.
00045 #define KERNCENTER(thesize) ((thesize-1)>>1)
00046
00047
00048 template <class InputStorageType,class OutputStorageType>
00049 int Convolution<InputStorageType,OutputStorageType>::
00050 ConvIntMat_(const Image<InputStorageType> &src, Image<OutputStorageType> &dst)
00051 {
00052   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvIntMat_\n");
00053   InputStorageType **srcstart=src.GetImageDataArray();
00054   OutputStorageType **dststart=dst.GetImageDataArray();
00055   const Matrix<FM_INT> *kernel=_fm.GetKerneli();
00056   int kern_width=kernel->GetCols();
00057   int kern_height=kernel->GetRows();
00058   int img_width=src.GetWidth();
00059   int img_height=src.GetHeight();
00060   int channelcount=src.GetChannelCount();
00061
00062   int kern_center_x=KERNCENTER(kern_width);
00063   int kern_center_y=KERNCENTER(kern_height);
00064
00065   signed char rightshift=_fm.GetKernelRightShift();
00066   InputStorageType **srcida = NULL;
00067   OutputStorageType **dstida = NULL;
00068
00069   // distance between neighboring pixels in storagetypes
00070   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00071
00072   int offset = 0;
00073   for(int chloop=0;chloop<channelcount;chloop++) {
00074     if (src.IsInterleaved()) {
00075       srcida = srcstart;
00076       dstida = dststart;
00077       // ida[y][PixelSpacing*x] gives first channel, need an offset
00078       offset = chloop;
00079     } else {
00080       // get start of plane:
00081       srcida = srcstart + chloop*img_height;
00082       dstida = dststart + chloop*img_height;
00083       offset = 0;
00084     }
00085     for(int img_x=0;img_x<img_width;img_x++)
00086       for(int img_y=0;img_y<img_height;img_y++) {
00087         register CONV_INT sum=0;
00088         for(int kern_x=0;kern_x<kern_width;kern_x++)
00089           for(int kern_y=0;kern_y<kern_height;kern_y++) {
00090             //kern_center_x-kern_x -> img_offset
00091             int img_offset_x=kern_center_x-kern_x;
00092             int img_offset_y=kern_center_y-kern_y;
00093             if(img_offset_x+img_x<0)
00094               continue;
00095             if(img_offset_y+img_y<0)
00096               continue;
00097             if(img_x+img_offset_x>=img_width)
00098               continue;
00099             if(img_y+img_offset_y>=img_height)
00100               continue;
00101             sum +=(CONV_INT) (srcida[img_y+img_offset_y][(img_x+img_offset_x)
00102                                                          *PixelSpacing+offset]*
00103                               ((*kernel)[kern_y][kern_x]));
00104           }
00105         dstida[img_y][img_x*PixelSpacing+offset]=
00106           (OutputStorageType)((sum)>>rightshift);
00107       }
00108   }
00109
00110   return 0;
00111 }
00112
00113 template <class InputStorageType,class OutputStorageType>
00114 int Convolution<InputStorageType,OutputStorageType>::
00115 ConvIntHori_(const Image<InputStorageType> &src, Image<CONV_INT> &dst)
00116 {
00117   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvIntHori_\n");
00118   InputStorageType **srcstart=src.GetImageDataArray();
00119   CONV_INT **dststart=dst.GetImageDataArray();
00120   const Vector<FM_INT> *kernel=_fm.GetSepih();
00121   int kern_width=kernel->Size();
00122   int img_width=src.GetWidth();
00123   int img_height=src.GetHeight();
00124   int channelcount=src.GetChannelCount();
00125
00126   int kern_center_x=KERNCENTER(kern_width);
00127
00128   signed char rightshift=_fm.GetHorizRightShift();
00129   InputStorageType **srcida = NULL;
00130   CONV_INT **dstida = NULL;
00131
00132   // distance between neighboring pixels in storagetypes
00133   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00134   int offset = 0;
00135   for(int chloop=0;chloop<channelcount;chloop++) {
00136     if (src.IsInterleaved()) {
00137       srcida = srcstart;
00138       dstida = dststart;
00139       // ida[y][PixelSpacing*x] gives first channel, need an offset
00140       offset = chloop;
00141     } else {
00142       // get start of plane:
00143       srcida = srcstart + chloop*img_height;
00144       dstida = dststart + chloop*img_height;
00145       offset = 0;
00146     }
00147
00148     for(int img_y=0;img_y<img_height;img_y++) {
00149       for(int img_x=0;img_x<img_width;img_x++) {
00150     int kern_xmax=min((kern_center_x+img_x+1),kern_width);
00151     int kern_xmin=max(0,(img_x+kern_center_x-img_width+1));
00152         register CONV_INT sum=0;
00153
00154         for(int kern_x=kern_xmin;kern_x<kern_xmax;kern_x++)       {
00155       //         for(int kern_x=0;kern_x<kern_width;kern_x++)         {
00156       int img_offset_x=kern_center_x-kern_x;
00157           sum +=
00158             (CONV_INT)(srcida[img_y][(img_x+img_offset_x)*PixelSpacing+offset])
00159         *((*kernel)[kern_x]);
00160         }
00161         dstida[img_y][img_x*PixelSpacing+offset] =
00162           (CONV_INT)((sum)>>rightshift);
00163       }
00164     }
00165   }
00166
00167   return 0;
00168 }
00169
00170 template <class InputStorageType,class OutputStorageType>
00171 int Convolution<InputStorageType,OutputStorageType>::
00172 ConvIntVert_(const Image<CONV_INT> &src, Image<OutputStorageType> &dst)
00173 {
00174   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvIntVert_\n");
00175   CONV_INT **srcstart=src.GetImageDataArray();
00176   OutputStorageType **dststart=dst.GetImageDataArray();
00177   const Vector<FM_INT> *kernel=_fm.GetSepiv();
00178   int kern_height=kernel->Size();
00179   int img_width=src.GetWidth();
00180   int img_height=src.GetHeight();
00181   int channelcount=src.GetChannelCount();
00182
00183   int kern_center_y=KERNCENTER(kern_height);
00184
00185   signed char rightshift=_fm.GetVertRightShift();
00186   CONV_INT **srcida = NULL;
00187   OutputStorageType **dstida = NULL;
00188
00189   // distance between neighboring pixels in storagetypes
00190   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00191
00192   int offset = 0;
00193
00194   for(int chloop=0;chloop<channelcount;chloop++) {
00195     if (src.IsInterleaved()) {
00196       srcida = srcstart;
00197       dstida = dststart;
00198       // ida[y][PixelSpacing*x] gives first channel, need an offset
00199       offset = chloop;
00200     } else {
00201       // get start of plane:
00202       srcida = srcstart + chloop*img_height;
00203       dstida = dststart + chloop*img_height;
00204       offset = 0;
00205     }
00206
00207     for(int img_y=0;img_y<img_height;img_y++) {
00208       int kern_ymax=min((kern_center_y+img_y+1),kern_height);
00209       int kern_ymin=max(0,(img_y+kern_center_y-img_height+1));
00210
00211       for(int img_x=0;img_x<img_width;img_x++) {
00212         register CONV_INT sum=0;
00213     for(int kern_y=kern_ymin;kern_y<kern_ymax;kern_y++)  {
00214 //      for(int kern_y=0;kern_y<kern_height;kern_y++)  {
00215           //kern_center_x-kern_x -> img_offset
00216           int img_offset_y=kern_center_y-kern_y;
00217
00218           sum +=
00219             (CONV_INT)(srcida[img_y+img_offset_y][img_x*PixelSpacing+offset])*
00220                        ((*kernel)[kern_y]);
00221         }
00222         dstida[img_y][img_x*PixelSpacing+offset]=
00223           (OutputStorageType)((sum)>>rightshift);
00224       }
00225     }
00226   }
00227   return 0;
00228 }
00229
00230 template <class InputStorageType,class OutputStorageType>
00231 int Convolution<InputStorageType,OutputStorageType>::
00232 ConvFloatMat_(const Image<InputStorageType> &src,
00233               Image<OutputStorageType> &dst) {
00234   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvFloatMat_\n");
00235   InputStorageType **srcstart  = src.GetImageDataArray();
00236   OutputStorageType **dststart = dst.GetImageDataArray();
00237   const Matrix<FM_FLOAT> *kernel=_fm.GetKernelf();
00238   const int kern_width   = kernel->GetCols();
00239   const int kern_height  = kernel->GetRows();
00240   const int img_width    = src.GetWidth();
00241   const int img_height   = src.GetHeight();
00242   const int channelcount = src.GetChannelCount();
00243   const int kern_center_x = KERNCENTER(kern_width);
00244   const int kern_center_y = KERNCENTER(kern_height);
00245
00246   InputStorageType **srcida = NULL;
00247   OutputStorageType **dstida = NULL;
00248
00249   // distance between neighboring pixels in storagetypes
00250   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00251
00252   int offset = 0;
00253   for(int chloop=0;chloop<channelcount;chloop++) {
00254     if (src.IsInterleaved()) {
00255       srcida = srcstart;
00256       dstida = dststart;
00257       // ida[y][PixelSpacing*x] gives first channel, need an offset
00258       offset = chloop;
00259     } else {
00260       // get start of plane:
00261       srcida = srcstart + chloop*img_height;
00262       dstida = dststart + chloop*img_height;
00263       offset = 0;
00264     }
00265     for(int img_x=0;img_x<img_width;img_x++)
00266       for(int img_y=0;img_y<img_height;img_y++) {
00267         register CONV_FLOAT sum=0;
00268         for(int kern_x=0;kern_x<kern_width;kern_x++)
00269           for(int kern_y=0;kern_y<kern_height;kern_y++) {
00270             //kern_center_x-kern_x -> img_offset
00271             int img_offset_x=kern_center_x-kern_x*PixelSpacing;
00272             int img_offset_y=kern_center_y-kern_y;
00273             if(img_offset_x+img_x<0)
00274               continue;
00275             if(img_offset_y+img_y<0)
00276               continue;
00277             if(img_x+img_offset_x>=img_width)
00278               continue;
00279             if(img_y+img_offset_y>=img_height)
00280               continue;
00281             sum += (CONV_FLOAT)srcida[img_y+img_offset_y][(img_x+img_offset_x)*
00282                                                           PixelSpacing+offset]
00283               * ((*kernel)[kern_y][kern_x]);
00284           }
00285         dstida[img_y][img_x*PixelSpacing+offset] = (OutputStorageType)sum;
00286       }
00287   }
00288
00289   return 0;
00290 }
00291
00292 template <class InputStorageType,class OutputStorageType>
00293 int Convolution<InputStorageType,OutputStorageType>::
00294 ConvFloatHori_(const Image<InputStorageType> &src, Image<CONV_FLOAT> &dst)
00295 {
00296   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvFloatHori_\n");
00297   InputStorageType **srcstart=src.GetImageDataArray();
00298   CONV_FLOAT **dststart=dst.GetImageDataArray();
00299   const Vector<FM_FLOAT> *kernel=_fm.GetSepfh();
00300   int kern_width=kernel->Size();
00301   int img_width=src.GetWidth();
00302   int img_height=src.GetHeight();
00303   int channelcount=src.GetChannelCount();
00304
00305   int kern_center_x=KERNCENTER(kern_width);
00306   InputStorageType **srcida = NULL;
00307   CONV_FLOAT **dstida = NULL;
00308   int offset = 0;
00309   // distance between neighboring pixels in storagetypes
00310   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00311
00312
00313   for(int chloop=0;chloop<channelcount;chloop++)  {
00314     if (src.IsInterleaved()) {
00315       srcida = srcstart;
00316       dstida = dststart;
00317       // ida[y][PixelSpacing*x] gives first channel, need an offset
00318       offset = chloop;
00319     } else {
00320       // get start of plane:
00321       srcida = srcstart + chloop*img_height;
00322       dstida = dststart + chloop*img_height;
00323       offset = 0;
00324     }
00325
00326
00327     for(int img_y=0;img_y<img_height;img_y++){
00328       for(int img_x=0;img_x<img_width;img_x++) {
00329         int kern_xmax=min((kern_center_x+img_x+1),kern_width);
00330         int kern_xmin=max(0,(img_x+kern_center_x-img_width+1));
00331         register CONV_FLOAT sum=0;
00332         for(int kern_x=kern_xmin;kern_x<kern_xmax;kern_x++)       {
00333           int img_offset_x=kern_center_x-kern_x;
00334           sum+=CONV_FLOAT(srcida[img_y]
00335                           [(img_x+img_offset_x)*PixelSpacing+offset])*
00336             ((*kernel)[kern_x]);
00337         }
00338         dstida[img_y][img_x*PixelSpacing+offset]=(CONV_FLOAT)sum;
00339       }
00340     }
00341   }
00342
00343   return 0;
00344 }
00345
00346 template <class InputStorageType,class OutputStorageType>
00347 int Convolution<InputStorageType,OutputStorageType>::
00348 ConvFloatVert_(const Image<CONV_FLOAT> &src, Image<OutputStorageType> &dst)
00349 {
00350   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::ConvFloatVert_\n");
00351   CONV_FLOAT **srcstart=src.GetImageDataArray();
00352   OutputStorageType **dststart=dst.GetImageDataArray();
00353   const Vector<FM_FLOAT> *kernel=_fm.GetSepfv();
00354   int kern_height=kernel->Size();
00355   int img_width=src.GetWidth();
00356   int img_height=src.GetHeight();
00357   int channelcount=src.GetChannelCount();
00358
00359   int kern_center_y=KERNCENTER(kern_height);
00360   CONV_FLOAT **srcida = NULL;
00361   OutputStorageType **dstida = NULL;
00362   int offset = 0;
00363   // distance between neighboring pixels in storagetypes
00364   const int PixelSpacing = (src.IsInterleaved())? channelcount : 1;
00365   for(int chloop=0;chloop<channelcount;chloop++)    {
00366     if (src.IsInterleaved()) {
00367       srcida = srcstart;
00368       dstida = dststart;
00369       // ida[y][PixelSpacing*x] gives first channel, need an offset
00370       offset = chloop;
00371     } else {
00372       // get start of plane:
00373       srcida = srcstart + chloop*img_height;
00374       dstida = dststart + chloop*img_height;
00375       offset = 0;
00376     }
00377     for(int img_y=0;img_y<img_height;img_y++) {
00378       int kern_ymax=min((kern_center_y+img_y+1),kern_height);
00379       int kern_ymin=max(0,(img_y+kern_center_y-img_height+1));
00380       for(int img_x=0;img_x<img_width;img_x++) {
00381         register CONV_FLOAT sum=0;
00382     for(int kern_y=kern_ymin;kern_y<kern_ymax;kern_y++)  {
00383       //         for(int kern_y=0;kern_y<kern_height;kern_y++)        {
00384           int img_offset_y=kern_center_y-kern_y;
00385
00386           sum +=
00387             (CONV_FLOAT)(srcida[img_y+img_offset_y][img_x*PixelSpacing+offset])
00388             * ((*kernel)[kern_y]);
00389
00390     }
00391         dstida[img_y][img_x*PixelSpacing+offset] = (OutputStorageType)sum;
00392       }
00393     }
00394   }
00395   return 0;
00396 }
00397
00398 template <class InputStorageType, class OutputStorageType>
00399 Convolution<InputStorageType,OutputStorageType>::
00400 Convolution()
00401   : FilterNToN<InputStorageType,OutputStorageType>()
00402 {
00403   _fm.SetZero();
00404 }
00405
00406 template <class InputStorageType, class OutputStorageType>
00407 Convolution<InputStorageType,OutputStorageType>::
00408 Convolution(Param& para, const std::string& postfix)
00409   : FilterNToN<InputStorageType,OutputStorageType>(para,  postfix)
00410 {
00411   _fm.SetZero();
00412 }
00413
00414 template <class InputStorageType, class OutputStorageType>
00415 Convolution<InputStorageType,OutputStorageType>::
00416 Convolution(Param& para, const int group_id, const std::string& postfix)
00417   :FilterNToN<InputStorageType,OutputStorageType>(para, group_id, postfix)
00418 {
00419   _fm.SetZero();
00420 }
00421
00422 template <class InputStorageType, class OutputStorageType>
00423 Convolution<InputStorageType,OutputStorageType>::~Convolution()
00424 {
00425  _fm.SetZero();
00426 }
00427
00428 template <class InputStorageType, class OutputStorageType>
00429 int Convolution<InputStorageType,OutputStorageType>::
00430 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00431 {
00432   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::Filter\n");
00433 #ifdef BIAS_DEBUG
00434   if (typeid(InputStorageType)!=typeid(OutputStorageType)) {
00435     BIASDOUT(D_CONV_TYPES, "Implicit storage type conversion during filtering."
00436              <<" input=" << PRINTTYPE(InputStorageType)
00437              <<", output=" << PRINTTYPE(OutputStorageType));
00438   } else {
00439     BIASDOUT(D_CONV_TYPES, "filtering same storage type: "
00440              <<PRINTTYPE(InputStorageType));
00441   }
00442 #endif
00443   // check if output image is floating point, if so, do float convolution:
00444   // and also if the input image is float, we must use this, because the
00445   // int mask approximation comes into trouble with float input images
00446   if (CalculationInFloat()) {
00447     BIASDOUT(D_CONV_TYPES,"Convolution is done with floating point numbers.");
00448     return Convolution<InputStorageType,OutputStorageType>::FilterFloat(src,dst);
00449   }
00450   // no float => integer type, do integer arithmetic convolution
00451   BIASDOUT(D_CONV_TYPES, "Convolution is done with integer arithmetic.");
00452   return Convolution<InputStorageType,OutputStorageType>::FilterInt(src,dst);
00453 }
00454
00455 template <class InputStorageType, class OutputStorageType>
00456 int Convolution<InputStorageType,OutputStorageType>::
00457 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00458 {
00459   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::FilterInt\n");
00460   BIASDOUT(D_CONV_KERNEL,"Kernel is "<<_fm);
00461
00462   if(!dst.SamePixelAndChannelCount(src)) {
00463     dst.Release();
00464     dst.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),
00465              src.GetStorageType(),src.IsInterleaved());
00466   }
00467   if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_full) {
00468     BIASERR("BorderHandling TBH_full not implemented");
00469     return -1;
00470   }
00471
00472   if(_fm.IsSeparable()) {
00473     if(!_tmpInt.SamePixelAndChannelCount(src)) {
00474       _tmpInt.Release();
00475       _tmpInt.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),
00476                    src.GetStorageType(),src.IsInterleaved());
00477     }
00478     ConvIntHori_(src, _tmpInt);
00479     ConvIntVert_(_tmpInt, dst);
00480 #ifdef BIAS_DEBUG
00481     if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00482       ImageIO::Write("tmp_i_separated_after_hori",_tmpInt);
00483     }
00484 #endif
00485   } else ConvIntMat_(src,dst);
00486
00487   unsigned int ulx,uly,lrx,lry;
00488   src.GetROICorners(ulx,uly,lrx,lry);
00489   if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_same) {
00490     dst.GetROI()->SetCorners(ulx,uly,lrx,lry);
00491   } else if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_valid) {
00492     int kwidth,kheight;
00493     if(_fm.IsSeparable()) {
00494       kwidth  = _fm.GetSepih()->Size();
00495       kheight = _fm.GetSepiv()->Size();
00496     } else {
00497       kwidth  = _fm.GetKerneli()->GetCols();
00498       kheight = _fm.GetKerneli()->GetRows();
00499     }
00500     dst.SetROICorners(ulx+KERNCENTER(kwidth),uly+KERNCENTER(kwidth),
00501                lrx-KERNCENTER(kwidth),lry-KERNCENTER(kwidth));
00502   }
00503 #ifdef BIAS_DEBUG
00504     if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00505       ImageIO::Write("tmp_i_final",dst);
00506     }
00507 #endif
00508   return 0;
00509 }
00510
00511 template <class InputStorageType, class OutputStorageType>
00512 int Convolution<InputStorageType,OutputStorageType>::
00513 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00514 {
00515 #ifdef BIAS_DEBUG
00516   if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00517     Image<InputStorageType> tmp=src;
00518     ImageIO::Write("FilterFloat_Input", tmp);
00519   }
00520 #endif
00521   BIASCDOUT(D_FILTERBASE_CALLSTACK,"Convolution::FilterFloat\n");
00522   BIASDOUT(D_CONV_KERNEL,"Kernel is "<<_fm);
00523   if(!dst.SamePixelAndChannelCount(src)) {
00524     dst.Release();
00525     dst.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),
00526              dst.GetStorageType(),src.IsInterleaved());
00527   }
00528   if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_full) {
00529     BIASERR("BorderHandling TBH_full not implemented");
00530     return -1;
00531   }
00532
00533   if(_fm.IsSeparable()) {
00534     if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00535       _tmpFloat.Release();
00536       _tmpFloat.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),
00537                      ImageBase::ST_float, src.IsInterleaved());
00538     }
00539     ConvFloatHori_(src, _tmpFloat);
00540 #ifdef BIAS_DEBUG
00541     if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00542       ImageIO::Write("FilterFloat_Separated_AfterHorizontal",_tmpFloat);
00543     }
00544 #endif
00545     ConvFloatVert_(_tmpFloat, dst);
00546 #ifdef BIAS_DEBUG
00547     if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00548       ImageIO::Write("FilterFloat_Separated_Final", dst);
00549     }
00550 #endif
00551   } else {
00552     ConvFloatMat_(src, dst);
00553 #ifdef BIAS_DEBUG
00554     if (this->DebugLevelIsSet(D_WRITE_IMAGES)) {
00555       ImageIO::Write("FilterFloat_Final", dst);
00556     }
00557 #endif
00558   }
00559
00560   unsigned int ulx,uly,lrx,lry;
00561   src.GetROICorners(ulx,uly,lrx,lry);
00562
00563   if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_same) {
00564     dst.GetROI()->SetCorners(ulx,uly,lrx,lry);
00565   } else if(this->GetBorderHandling()==Convolution<InputStorageType,OutputStorageType>::TBH_valid)  {
00566     int kwidth,kheight;
00567     if(_fm.IsSeparable())  {
00568       kwidth=_fm.GetSepfh()->Size();
00569       kheight=_fm.GetSepfv()->Size();
00570     } else {
00571       kwidth=_fm.GetKernelf()->GetCols();
00572       kheight=_fm.GetKernelf()->GetRows();
00573     }
00574     dst.GetROI()->SetCorners(ulx+KERNCENTER(kwidth),uly+KERNCENTER(kwidth),
00575                lrx-KERNCENTER(kwidth),lry-KERNCENTER(kwidth));
00576   }
00577   return 0;
00578 }
00579
00580 template <class InputStorageType, class OutputStorageType>
00581 void Convolution<InputStorageType,OutputStorageType>::
00582 PrintKernel() const
00583 {
00584   if (CalculationInFloat()) { // float
00585     cout << "float: ";
00586     if (_fm.IsSeparable()){
00587       cout << "sep horiz: "<< *_fm.GetSepfh()<<"  vert: "<<*_fm.GetSepfv();
00588     } else {
00589       cout << "kernel: "<<*_fm.GetKernelf();
00590     }
00591   } else { // int
00592     cout << "int: ";
00593     if (_fm.IsSeparable()){
00594       cout << "sep horiz: "<< *_fm.GetSepih()<<"  vert: "<<*_fm.GetSepiv();
00595     } else {
00596       cout << "kernel: "<<*_fm.GetKerneli();
00597     }
00598   }
00599   cout << endl;
00600 }
00601
00602 #define FILTER_INSTANTIATION_CLASS Convolution
00603 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Convolution.hh Source File

Filter

Convolution.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009   Johan Skoglund
00010   skoglund@isy.liu.se
00011   CVL/isy
00012   university of Linköping
00013   sweden
00014
00015 BIAS is free software; you can redistribute it and/or modify
00016 it under the terms of the GNU Lesser General Public License as published by
00017 the Free Software Foundation; either version 2.1 of the License, or
00018 (at your option) any later version.
00019
00020 BIAS is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 GNU Lesser General Public License for more details.
00024
00025 You should have received a copy of the GNU Lesser General Public License
00026 along with BIAS; if not, write to the Free Software
00027 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 */
00029
00030
00031 #ifndef __Convolution_hh__
00032 #define __Convolution_hh__
00033
00034 #include "FilterNToN.hh"
00035 #include "FilterMask.hh"
00036 #include <Utils/Param.hh>
00037
00038 #define D_GRADGAUSS_KERNEL 0x00000001
00039 #define D_CONV_KERNEL      0x00000002
00040 #define D_GRAD_DEB         0x00000004
00041 #define D_WRITE_IMAGES     0x00000008
00042 #define D_CONV_TYPES       0x00000010
00043
00044 // data types, in which intermediate values are computed
00045 #define CONV_FLOAT float
00046 #define CONV_INT   int
00047
00048 namespace BIAS {
00049
00050   /** @class Convolution
00051       @ingroup g_filter
00052       @brief generic convolution class.
00053
00054       Use as follows:
00055       - SetKernel(FilterMask)
00056       - Filter(source, destination)
00057
00058       Center pixel is determined by (size-1)>>1.
00059
00060       @author woelk/koeser/skoglund 11/2004 */
00061
00062   template <class InputStorageType, class OutputStorageType>
00063   class BIASFilter_EXPORT Convolution
00064     : public FilterNToN<InputStorageType,  OutputStorageType>
00065   {
00066   public:
00067     /** @brief holds all params internally without param object */
00068     Convolution();
00069
00070     /** @brief uses param object to handle all parameters and base classes */
00071     Convolution(Param& para, const std::string& postfix="");
00072
00073     /** @brief uses param object to handle all parameters and base classes */
00074     Convolution(Param& para, const int group_id, const std::string& postfix);
00075
00076     virtual ~Convolution();
00077
00078     /** @brief decides on the image types which
00079         FilterFunction should be called */
00080     virtual int Filter(const Image<InputStorageType>& src,
00081                        Image<OutputStorageType>& dst);
00082
00083
00084     /** @brief do the convolution using integer arithmetics and shifts */
00085     virtual int FilterInt(const Image<InputStorageType>& src,
00086                           Image<OutputStorageType>& dst);
00087
00088     /** @brief do the convolution using floating point calculations */
00089     virtual int FilterFloat(const Image<InputStorageType>& src,
00090                             Image<OutputStorageType>& dst);
00091
00092     /** @brief get the current filter mask */
00093     inline void GetKernel(FilterMask& fm) const
00094     { fm = _fm; }
00095
00096     /** @brief set a new filter mask */
00097     inline void SetKernel(FilterMask& fm)
00098     { _fm = fm;}
00099
00100     /** @brief prints the used filter mask, for debugging */
00101     void PrintKernel() const;
00102
00103     /** @brief decides if calculation is done in integer or floating point */
00104     inline bool CalculationInFloat() const
00105     { return ((typeid(OutputStorageType)==typeid(float)) ||
00106               (typeid(OutputStorageType)==typeid(double))||
00107               (typeid(InputStorageType)==typeid(float)) ||
00108               (typeid(InputStorageType)==typeid(double))); };
00109
00110   protected:
00111     /// the kernel data used for convolution
00112     FilterMask _fm;
00113
00114     /// temporary memory, needed for separable filters when float filtering
00115     Image<CONV_FLOAT> _tmpFloat;
00116
00117     /// temporary memory, needed for separable filters when integer filtering
00118     Image<CONV_INT> _tmpInt;
00119
00120     /// @brief worker function for int matrix convolution
00121     int ConvIntMat_(const Image<InputStorageType> &src,
00122                     Image<OutputStorageType> &dst);
00123
00124     /// @brief worker function for int separated (horizontal) convolution
00125     int ConvIntHori_(const Image<InputStorageType> &src,
00126                      Image<CONV_INT> &dst);
00127
00128     /// @brief worker function for int separated (vertical) convolution
00129     int ConvIntVert_(const Image<CONV_INT> &src,
00130                      Image<OutputStorageType> &dst);
00131
00132     /// @brief worker function for float matrix convolution
00133     int ConvFloatMat_(const Image<InputStorageType> &src,
00134                       Image<OutputStorageType> &dst);
00135
00136     /// @brief worker function for float separated (horizontal) convolution
00137     int ConvFloatHori_(const Image<InputStorageType> &src,
00138                        Image<CONV_FLOAT> &dst);
00139
00140     /// @brief worker function for float separated (vertical) convolution
00141     int ConvFloatVert_(const Image<CONV_FLOAT> &src,
00142                        Image<OutputStorageType> &dst);
00143
00144     inline void GetBordersValid_(int &border_x, int &border_y) const
00145     { _fm.GetSize(border_x, border_y); }
00146
00147   }; // class
00148
00149
00150 } // namespace
00151
00152 #endif // __Convolution_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CoordinateTransform3D.cpp Source File

Geometry

CoordinateTransform3D.cpp

Go to the documentation of this file.
00001     /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Geometry/CoordinateTransform3D.hh>
00027 #include <MathAlgo/SVD.hh>
00028 #include <Base/Geometry/RMatrixBase.hh>
00029 #include <fstream>
00030 #include <iostream>
00031 #include <Base/Math/Matrix3x4.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036
00037 void CoordinateTransform3D::UpdateMatrix_() {
00038   // delete previous data in matrix
00039   this->SetIdentity();
00040   invTransform_.SetIdentity();
00041
00042   // compute rotational part
00043   RMatrixBase R;
00044   R.SetFromQuaternion(Q_);
00045
00046   Vector3<double> RTC(R.Transpose()*C_);
00047
00048   // copy rotation and translation into matrix
00049   for (unsigned int row=0; row<3; row++) {
00050     for (unsigned int column=0; column<3; column++) {
00051       // *this Global -> Local
00052       (*this)[row][column] = R[column][row] / scale_;
00053
00054       //invTransform Local -> Global
00055       invTransform_[column][row] = R[column][row] * scale_;
00056     }
00057     (*this)[row][3] = RTC[row] / scale_ * (-1.0);// *this Global -> Local
00058     invTransform_[row][3] = C_[row];//invTransform Local -> Global
00059   }
00060 }
00061
00062 void CoordinateTransform3D::
00063 SetFromMatrix3x4(const Matrix3x4<double> &M){
00064   // delete previous data in matrix
00065   this->SetIdentity();
00066   invTransform_.SetIdentity();
00067
00068   for (unsigned int row=0; row<3; row++) {
00069     for (unsigned int column=0; column<4; column++) {
00070       (*this)[row][column] = M[row][column];
00071     }
00072   }
00073   // set this to defined values
00074   Q_.Set(0,0,0,0);
00075   C_.Set(0,0,0);
00076   scale_ = 0.0;
00077
00078   SVD svd((*this));
00079
00080   invTransform_ = svd.Invert();
00081 }
00082
00083
00084 BIAS::Matrix3x4<double>
00085 CoordinateTransform3D::GetMatrix3x4() const {
00086   Matrix3x4<double> P;
00087   for (unsigned int row=0; row<3; row++) {
00088     for (unsigned int column=0; column<4; column++) {
00089       P[row][column] = (*this)[row][column];
00090     }
00091   }
00092   return P;
00093 }
00094
00095
00096 bool CoordinateTransform3D::
00097 Load(const std::string& inputFile)
00098 {
00099   ifstream ifs(inputFile.c_str());
00100   if(!ifs)
00101     return false;
00102   ifs>>*this;
00103   if(!ifs) {
00104     ifs.close();
00105     return false;
00106   }
00107   ifs.close();
00108   UpdateMatrix_();
00109   return true;
00110 }
00111
00112 bool CoordinateTransform3D::
00113 Save(const std::string& outputFile)
00114 {
00115   ofstream ofs(outputFile.c_str());
00116   if(!ofs)
00117     return false;
00118   ofs<<*this;
00119   if(!ofs) {
00120     ofs.close();
00121     return false;
00122   }
00123   ofs.close();
00124   return true;
00125 }
00126
00127
00128 void CoordinateTransform3D::
00129 ConcatenateLocalTransform(const CoordinateTransform3D& localT,
00130                           CoordinateTransform3D& res) const
00131 {
00132   /* if we were using matrices:
00133    * B1 is linear transform local to global (global = B1*local)
00134    * B(1,i) is linear transform local(2) to local (local = B(1,i)*local(2))
00135    * then BC = B1*B(1,i) should be global = BC * local(2)
00136    * this stores B1 in Q_, C_, and scale_.
00137    * localT store B(1,i) in its Q_, C_, and scale_.
00138    */
00139   res.Set(Q_ * localT.Q_,
00140           C_ + Q_.MultVec(localT.C_) * scale_,
00141           scale_ * localT.scale_);
00142 }
00143
00144
00145 void CoordinateTransform3D::
00146 Talk()
00147 {
00148   cout<<"Transformation RAW: "<<endl;
00149   cout<<*this<<endl;
00150
00151   RMatrixBase R;
00152   R.SetFromQuaternion(Q_);
00153   cout<<"Rotation Matrix: "<<R<<endl;
00154
00155   Vector3<double> axis;
00156   double angle;
00157
00158   R.GetRotationAxisAngle(axis, angle);
00159   cout<<" axis = "<<axis<<endl;
00160   cout<<"angle = "<<angle<<endl<<endl;
00161 }
00162
00163 void
00164 CoordinateTransform3D::SetR(const BIAS::RMatrixBase &R)
00165 {
00166   BIASERR("This function is incorrect and terminates with a segfault"
00167           << "R is NOT 4x4");
00168   BIASABORT
00169   for (unsigned int r=0; r<3; r++)
00170     for (unsigned int c=0; c<3; c++) {
00171       *this[r][c]=R[r][c];
00172     }
00173   R.GetQuaternion(Q_);
00174 }
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CoordinateTransform3D.hh Source File

Geometry

CoordinateTransform3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_CoordSystsemTransform3D_hh__
00027 #define __BIAS_CoordSystsemTransform3D_hh__
00028
00029 // never include this unless it is absolutely needed:
00030 // #include "bias_config.h"
00031
00032 #include <Base/Common/BIASpragmaStart.hh>
00033 #include <Base/Debug/Debug.hh>
00034 #include <Base/Geometry/Quaternion.hh>
00035 #include <Base/Math/Matrix4x4.hh>
00036 #include <Base/Geometry/HomgPoint3D.hh>
00037 #include <Base/Geometry/HomgPoint3DCov.hh>
00038 #include <Base/Math/Vector3.hh>
00039
00040 namespace BIAS {
00041
00042
00043   /** @class SimilarityTransformation3D
00044    *  @brief transforms 3d points between two different coodinate systems, e.g.
00045    *         from camera to world coordinates using the camera pose
00046    *
00047    *  We define a local coordinate system LCS(imagine camera coordinate system)
00048    *  and a global coordinate system GCS (imagine world coordinate system).
00049    *  Imagine a 4x4 matrix
00050    *
00051    *                [                C_[0] ]
00052    *                [   scale_*R     C_[1] ]
00053    *         T  =   [                C_[2] ]
00054    *                [  0    0    0     1   ]
00055    *
00056    *  This matrix converts a point X_L in LCS to its representation in GCS like
00057    *
00058    *
00059    *                  X_G = T * X_L
00060    *
00061    *  R is the matrix equivalent of Q_.
00062    *
00063    *  Obviously,      X_L = T.Invert() * X_G
00064    *
00065    *         T.invert()  =   [   R^T/scale_      -R^T*C_/scale_ ]
00066    *                         [  0      0      0        1        ]
00067    *
00068    *  C is the origin of the local coordinate system in global coordinates
00069    *  Q (or R) tranforms a direction in local coordinates into a direction
00070    *  in global coordinates.
00071    *  The terms global and local are only used here to distinguish between
00072    *  two arbitrary coordinate systems, neither of them has to be local/global.
00073    *
00074    *  Apply for: hand-eye transformation, global-local coordinates,
00075    *  camera to world coordinates, ...
00076    *  @author koeser 03/2006
00077    */
00078   class BIASGeometry_EXPORT CoordinateTransform3D :
00079     protected Matrix4x4<double>
00080   {
00081   public:
00082     /** @brief sets identity transform with zero covariance */
00083     CoordinateTransform3D()
00084       : Matrix4x4<double>(MatrixIdentity), Q_(0.0, 0.0, 0.0, 1.0),
00085         C_(0.0,0.0,0.0), scale_(1.0),
00086         invTransform_(MatrixIdentity) {}
00087
00088     /** @brief calls operator= */
00089     CoordinateTransform3D(const CoordinateTransform3D& c)
00090     {
00091       *this = c;
00092     }
00093
00094     /** @brief copy all elements */
00095     const CoordinateTransform3D&
00096     operator=(const CoordinateTransform3D& c) {
00097       Q_= c.Q_;
00098       C_ = c.C_;
00099       scale_ = c.scale_;
00100       invTransform_ = c.invTransform_;
00101       Matrix4x4<double>::operator=(c);
00102       return (*this);
00103     }
00104
00105     /** @brief use matrix, which transforms points in global coordinate system
00106         to points in local coordinate system (like pmatrix )
00107         \attention use only for matrices that cannot be decomposed properly,
00108         otherwise use Set method!
00109     */
00110     void SetFromMatrix3x4(const Matrix3x4<double> &M);
00111
00112 //     /** @brief set from pose object
00113 //     */
00114 //     void SetFromPose(const Pose &pose);
00115
00116     /** @brief get matrix, which transforms points in global coordinate system
00117         to points in local coordinate system */
00118     Matrix3x4<double> GetMatrix3x4() const;
00119
00120     void SetQ(const Quaternion<double>& Q) { Q_ = Q; UpdateMatrix_(); }
00121
00122     /** Sets the upper 3x3 matrix accordingly (copies values)
00123      */
00124     void SetR(const BIAS::RMatrixBase &R);
00125
00126     /** @brief sets origin of local coordinate system in global coordinates */
00127     void SetC(const Vector3<double>& C) { C_ = C; UpdateMatrix_(); }
00128
00129     /** \brief Define local coordinate frame from within the world frame.
00130      * \param[in] Q Tells the orientation of the local frame in
00131      *    the world frame base:
00132      *    Q*(global base vecor)*Q_conj = local base vector.
00133      * \param[in] C Tells the position of th origin of the local frame in the
00134      *    world coordinate frame:
00135      *     global base origin + C_ = local base origin.
00136      * \param[in] scale Is the isotropic scale of base vector length to get
00137      *    local base vector length:
00138      *    ||global base vector||*scale = ||local base vector||.
00139      */
00140     void Set(const Quaternion<double>& Q, const Vector3<double>& C,
00141              const double& scale = 1.0) {
00142       Q_ = Q; C_ = C; scale_ = scale; UpdateMatrix_();
00143     }
00144
00145
00146     HomgPoint3D GlobalToLocal(const HomgPoint3D& X_G) const {
00147       Vector4<double> X_L;
00148       this->Mult(X_G, X_L);
00149       return X_L;
00150     }
00151
00152     HomgPoint3D LocalToGlobal(const HomgPoint3D& X_L) const {
00153       Vector4<double> X_G;
00154       invTransform_.Mult(X_L, X_G);
00155       return X_G;
00156     }
00157
00158     void GlobalToLocal(HomgPoint3D& X_G,
00159                        HomgPoint3DCov& Cov_G) const {
00160       Vector4<double> X(X_G);
00161       this->Mult(X, X_G);
00162       Cov_G = (*this) * Cov_G * (this->Transpose());
00163     }
00164
00165     void LocalToGlobal(HomgPoint3D& X_L,
00166                        HomgPoint3DCov& Cov_L) const {
00167       HomgPoint3D X(X_L);
00168       invTransform_.Mult(X, X_L);
00169       Cov_L = invTransform_ * Cov_L * invTransform_.Transpose();
00170     }
00171
00172     const Quaternion<double>& GetQ() const { return Q_; }
00173
00174     const Vector3<double>& GetC() const { return C_; }
00175
00176     inline const Vector<double> GetCQ() const {
00177       Vector<double> res(7);
00178       for (int i=0; i<3; i++){
00179         res[i] = C_[i]; res[i+3] = Q_[i];
00180       }
00181       res[6] = Q_[3];
00182       return res;
00183     }
00184
00185     inline BIAS::RMatrixBase GetR() const {
00186       RMatrixBase R;
00187       R.SetFromQuaternion(GetQ());
00188       return R;
00189     }
00190
00191     inline  Matrix4x4<double> GetGlobalToLocalTransform() const
00192     { return *this; }
00193
00194     inline  Matrix4x4<double> GetLocalToGlobalTransform() const
00195     { return invTransform_; }
00196
00197     friend std::ostream& operator<<(std::ostream &os,
00198                                     const CoordinateTransform3D& p);
00199     friend std::istream& operator>>(std::istream &is,
00200                                     CoordinateTransform3D& p);
00201
00202     bool Load(const std::string& inputFile);
00203     bool Save(const std::string& outputFile);
00204
00205     /** \brief Calculates transformation from global system of this to local
00206      *  system of argument transformation.
00207      *  if this defines [global <-> local] and
00208      *  argument (localT) defines [local <-> local(2)].
00209      *  the res then defines [global <-> local(2)].
00210      */
00211     void ConcatenateLocalTransform(
00212                                const CoordinateTransform3D& localT,
00213                                CoordinateTransform3D& res ) const;
00214
00215     /** Swapps the meaning of global and local.
00216      */
00217     void InvertIP() {
00218       Q_.Invert(); scale_ = 1.0/scale_;
00219       C_ = -scale_ * Q_.MultVec(C_);
00220       UpdateMatrix_(); }
00221
00222     /**
00223      * Prints Transformation together with more intutive rotation
00224      * representations.
00225      */
00226     void Talk();
00227
00228   protected:
00229     /** @brief computes the 4x4 matrix */
00230     void UpdateMatrix_();
00231
00232     /// this is the rotation between the systems
00233     Quaternion<double> Q_;
00234
00235     /// the translation between the systems
00236     Vector3<double> C_;
00237
00238     /**\brief the scale between the systems
00239      *||vec1Global|| * scale_ = ||vec1Local||
00240      */
00241     double scale_;
00242
00243     /// the uncertainty of the orientation / translation
00244     // yet no complete model for statisitcis on a transformation
00245     //    Matrix<POSE_TYPE> Cov_;
00246
00247     /// matrix representation of inverse transform (LocalToGlobalTranform)
00248     Matrix4x4<double> invTransform_;
00249   };
00250
00251   inline std::ostream& operator<<(std::ostream &os,
00252                                   const CoordinateTransform3D& p) {
00253     os<<"Q_= "<<p.Q_<<" C_= "<<p.C_<<" scale_= "<<p.scale_;
00254     return os;
00255   }
00256
00257   inline std::istream& operator>>(std::istream &is,
00258                                   CoordinateTransform3D& p){
00259     std::string temp;
00260     is>>temp>>p.Q_>>temp>>p.C_>>temp>>p.scale_;
00261     return is;
00262   }
00263
00264
00265 } // end namespace
00266
00267
00268 #include <Base/Common/BIASpragmaEnd.hh>
00269
00270 #endif
00271
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorBase.cpp Source File

FeatureDetector

CornerDetectorBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "CornerDetectorBase.hh"
00026
00027 #include <Base/Common/BIASpragma.hh>
00028
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 //////////////////////////////////////////////////////////////////////////
00034 //                 implementation
00035 //////////////////////////////////////////////////////////////////////////
00036
00037
00038 template <class StorageType>
00039 CornerDetectorBase<StorageType>::
00040 CornerDetectorBase()
00041 {
00042   ParamsAllocated_ = true;
00043   _MaxNum = new int;
00044   *_MaxNum = 0;
00045 }
00046
00047 template <class StorageType>
00048 CornerDetectorBase<StorageType>::
00049 CornerDetectorBase(Param& para, const std::string& postfix)
00050 {
00051   ParamsAllocated_ = false;
00052   int grp=para.GetFreeGroupID();
00053   _AddParameter(para, grp, "-CornerDetectorBase"+postfix);
00054   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp,"CornerDetectorBase");
00055 }
00056
00057 template <class StorageType>
00058 CornerDetectorBase<StorageType>::
00059 CornerDetectorBase(Param& para, const int grp, const std::string& postfix)
00060 {
00061   ParamsAllocated_ = false;
00062   _AddParameter(para, grp, "-CornerDetectorBase"+postfix);
00063 }
00064
00065 template <class StorageType>
00066 CornerDetectorBase<StorageType>::
00067 ~CornerDetectorBase()
00068 {
00069   if (ParamsAllocated_) {
00070     delete _MaxNum;
00071   }
00072 }
00073
00074 template <class StorageType>
00075 int CornerDetectorBase<StorageType>::
00076 Detect(const Image<StorageType>& image, std::vector<HomgPoint2D>& p,
00077        std::vector<QUAL>& quality)
00078 {
00079   BIASERR("call thsi function from derived class");
00080   return -10;
00081 }
00082
00083 template <class StorageType>
00084 int *CornerDetectorBase<StorageType>::
00085 AddCornerDetectorType(Param& para, const string& name, const int grp)
00086 {
00087   vector<string> tt;
00088   vector<int> tti;
00089   tt.push_back("CDT_Susan");
00090   tti.push_back(CornerDetectorBase<StorageType>::CDT_Susan);
00091   tt.push_back("CDT_Harris");
00092   tti.push_back(CornerDetectorBase<StorageType>::CDT_Harris);
00093   tt.push_back("CDT_Foerstner");
00094   tti.push_back(CornerDetectorBase<StorageType>::CDT_Foerstner);
00095   tt.push_back("CDT_KLT");
00096   tti.push_back(CornerDetectorBase<StorageType>::CDT_KLT);
00097   tt.push_back("CDT_Laplace");
00098   tti.push_back(CornerDetectorBase<StorageType>::CDT_Laplace);
00099   //tt.push_back(""); tti.push_back(CornerDetectorBase<StorageType>::);
00100   int *res;
00101   if (para.CheckParam(name)){
00102     res=para.GetParamEnum(name);
00103   } else {
00104     res=para.AddParamEnum(name,
00105                           "type of corner detector to use", tt, CDT_KLT,
00106                           &tti, 0, grp);
00107   }
00108   return res;
00109 }
00110
00111 template <class StorageType>
00112 void CornerDetectorBase<StorageType>::
00113 _AddParameter(Param& para, const int grp, const std::string& postfix)
00114 {
00115   if (para.CheckParam("MaxNumCorners"+postfix)) {
00116     _MaxNum = para.GetParamInt("MaxNumCorners"+postfix);
00117   } else {
00118     _MaxNum = para.AddParamInt("MaxNumCorners"+postfix,
00119                                "Maximum number of corners to detect",
00120                                0, 0, INT_MAX, 0, grp);
00121   }
00122 }
00123
00124 //////////////////////////////////////////////////////////////////////////
00125 //                 instantiation
00126 //////////////////////////////////////////////////////////////////////////
00127
00128 template class CornerDetectorBase<unsigned char>;
00129 template class CornerDetectorBase<float>;
00130
00131 // fill in instances as required
00132 #ifdef BUILD_IMAGE_INT
00133 #endif
00134 #ifdef BUILD_IMAGE_CHAR
00135 template class CornerDetectorBase<char>;
00136 #endif
00137 #ifdef BUILD_IMAGE_SHORT
00138 #endif
00139 #ifdef BUILD_IMAGE_USHORT
00140 template class CornerDetectorBase<unsigned short>;
00141 #endif
00142 #ifdef BUILD_IMAGE_UINT
00143 #endif
00144 #ifdef BUILD_IMAGE_DOUBLE
00145 #endif
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorBase.hh Source File

FeatureDetector

CornerDetectorBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CornerDetectorBase_hh__
00027 #define __CornerDetectorBase_hh__
00028
00029 #include <string>
00030
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Geometry/HomgPoint2D.hh>
00033 #include <Utils/Param.hh>
00034
00035 #define QUAL float
00036
00037 #define D_CD_SUSAN          0x00000001
00038 #define D_CD_SUSAN_QUALITY  0x00000002
00039 #define D_CD_WRITE_DEBUG_IM 0x00000004
00040 #define D_CD_FEATURES       0x00000008
00041 #define D_CD_INIT           0x00000010
00042
00043 namespace BIAS {
00044
00045   /** @class CornerDetectorBase
00046       @ingroup g_feature
00047       @brief purly virtual interface defining class for corner detectors
00048       @author woelk 09/2004 */
00049   template <class StorageType>
00050   class BIASFeatureDetector_EXPORT CornerDetectorBase
00051     : public Debug, public ParamCallbackInterface
00052   {
00053   public:
00054     /** the differnet types of corner detectors */
00055     enum ECDType {CDT_Invalid, CDT_Susan, CDT_Harris,
00056                   CDT_Foerstner, CDT_KLT, CDT_Laplace};
00057   public:
00058     CornerDetectorBase();
00059
00060     CornerDetectorBase(Param& para, const std::string& postfix="");
00061
00062     CornerDetectorBase(Param& para, const int grp, const std::string& postfix);
00063
00064     virtual ~CornerDetectorBase();
00065
00066     /** purely virtual interface definition */
00067     virtual int Detect(const Image<StorageType>& image,
00068                        std::vector<HomgPoint2D>& p,
00069                        std::vector<QUAL>& quality);
00070
00071     /** build the appropriate vectors and adds an enum for corner detector
00072         selection to param in group groupid */
00073     static
00074     int* AddCornerDetectorType(Param& param,
00075                                const std::string& name="CornerDetectorType",
00076                                const int groupid=GRP_ALL);
00077
00078     ///////////////////////////////////////////////////////////////////////
00079
00080     inline void SetMaxNumFeatures(const int maxnum)
00081     { *_MaxNum = maxnum; }
00082     /** @brief @author Dennis Herzog */
00083     inline int GetMaxNumFeatures()
00084     { return *_MaxNum; }
00085
00086   protected:
00087     /** @todo implement tiling mechanism */
00088     int *_NumTilesX, *_NumTilesY;
00089
00090     /// maximum number of corners to return
00091     int *_MaxNum;
00092
00093     void _AddParameter(Param& para, const int grp, const std::string& postfix);
00094
00095     bool ParamsAllocated_;
00096   }; // class
00097
00098
00099 } // namespace
00100
00101 #endif // __CornerDetectorBase_hh__
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorFoerstner.cpp Source File

FeatureDetector

CornerDetectorFoerstner.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "CornerDetectorFoerstner.hh"
00026
00027 using namespace std;
00028 using namespace BIAS;
00029
00030 //////////////////////////////////////////////////////////////////////////
00031 //                 implementation
00032 //////////////////////////////////////////////////////////////////////////
00033
00034
00035
00036 template <class StorageType, class CalculationType>
00037 CornerDetectorFoerstner<StorageType, CalculationType>::
00038 CornerDetectorFoerstner(Param& para, const std::string& postfix):
00039 CornerDetectorGradient<StorageType,
00040                          CalculationType>(para, postfix)
00041 {
00042
00043 }
00044
00045 template <class StorageType, class CalculationType>
00046 CornerDetectorFoerstner<StorageType, CalculationType>::
00047 CornerDetectorFoerstner():
00048 CornerDetectorGradient<StorageType,
00049                          CalculationType>()
00050 {
00051
00052 }
00053
00054 template <class StorageType, class CalculationType>
00055 CornerDetectorFoerstner<StorageType,CalculationType>::
00056 CornerDetectorFoerstner(Param& para,
00057                      const int grp,
00058                      const std::string& postfix):
00059 CornerDetectorGradient<StorageType,
00060                        CalculationType>(para, grp, postfix)
00061 {
00062
00063 }
00064
00065 template <class StorageType, class CalculationType>
00066 CornerDetectorFoerstner<StorageType,CalculationType>::
00067 ~CornerDetectorFoerstner() {
00068
00069 }
00070
00071 template <class StorageType, class CalculationType> int
00072 CornerDetectorFoerstner<StorageType, CalculationType>::
00073 _ComputeCornerness(Image<CalculationType>& Cornerness)
00074 {
00075   // preserver ROI
00076   int tlx, tly, brx, bry;
00077   this->_sgxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00078   Cornerness.GetROI()->SetCorners(tlx, tly, brx, bry);
00079
00080   const unsigned int width=Cornerness.GetWidth();
00081   const unsigned int height=Cornerness.GetHeight();
00082
00083   // work pointers to summed multiplied derivatives
00084   CalculationType *psgxx=this->_sgxx.GetImageData(),
00085     *psgyy=this->_sgyy.GetImageData(),
00086     *psgxy=this->_sgxy.GetImageData();
00087   CalculationType *ptr, *end, tmp;
00088
00089   // init min und max with impossible values
00090   //_max = FLT_MIN;
00091   //_min = FLT_MAX;
00092
00093   // init all pointers to first usable position (skip upper two lines)
00094   /// \todo use ROI instead of border=2
00095   unsigned offs = 2*width+2;
00096   unsigned int x=2,y=2;
00097   ptr = Cornerness.GetImageData()+offs;
00098   psgxx += offs;
00099   psgxy += offs;
00100   psgyy += offs;
00101   end   = Cornerness.GetImageData()+width*(height-2)-2;
00102   const double me=(double)*this->_MinCornerness;
00103   Feat fp;
00104   this->_FeatList.clear();
00105   this->_FeatList.reserve(end-ptr);
00106   // run over all pixels, dont care about borders
00107   // run over all pixels, dont care about borders
00108   while (ptr<end) {
00109     const CalculationType xx = (CalculationType) *psgxx++;
00110     const CalculationType xy = (CalculationType) *psgxy++;
00111     const CalculationType yy = (CalculationType) *psgyy++;
00112
00113     // cornerness = det / trace
00114     tmp = xx*yy-xy*xy / (xx+yy);
00115
00116     // save highest/lowest values for quality analysis later
00117     //if (tmp>_max) _max = tmp;
00118     //else if (tmp<_min) _min=tmp;
00119     if (tmp*(CalculationType)4.0/(xx+yy)>me){
00120         fp.x=x;
00121         fp.y=y;
00122         fp.val=(tmp>(double)INT_MAX)?(INT_MAX):((int)tmp);
00123         this->_FeatList.push_back(fp);
00124         //cout <<"Found a point above min cornerness: "<<endl;
00125       }
00126     *ptr++ = tmp;
00127     if (++x>=width){
00128       y++;
00129       x=0;
00130     }
00131   }
00132   return 0;
00133 }
00134
00135 //////////////////////////////////////////////////////////////////////////
00136 //                 instantiation
00137 //////////////////////////////////////////////////////////////////////////
00138
00139 template class CornerDetectorFoerstner<unsigned char, float>;
00140 template class CornerDetectorFoerstner<float, float>;
00141
00142 // fill in instances as required
00143 #ifdef BUILD_IMAGE_INT
00144 template class CornerDetectorFoerstner<unsigned char, int>;
00145 #endif
00146 #ifdef BUILD_IMAGE_CHAR
00147 template class CornerDetectorFoerstner<unsigned char, char>;
00148 #endif
00149 #ifdef BUILD_IMAGE_SHORT
00150 #endif
00151 #ifdef BUILD_IMAGE_USHORT
00152 template class CornerDetectorFoerstner<unsigned short, float>;
00153 #ifdef BUILD_IMAGE_INT
00154 template class CornerDetectorFoerstner<unsigned short, int>;
00155 #endif
00156 #endif
00157 #ifdef BUILD_IMAGE_UINT
00158 #endif
00159 #ifdef BUILD_IMAGE_DOUBLE
00160 #endif
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorFoerstner.hh Source File

FeatureDetector

CornerDetectorFoerstner.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __CornerDetectorFoerstner_hh__
00026 #define __CornerDetectorFoerstner_hh__
00027
00028 #include "CornerDetectorGradient.hh"
00029
00030 namespace BIAS {
00031
00032   /** @class CornerDetectorFoerstner
00033       @ingroup g_feature
00034       @brief foerstner corner detector, detects grey value corners in images
00035       @author koeser 09/2004 */
00036   template <class StorageType, class CalculationType>
00037   class BIASFeatureDetector_EXPORT CornerDetectorFoerstner
00038     : public CornerDetectorGradient<StorageType, CalculationType>
00039   {
00040   public:
00041     CornerDetectorFoerstner();
00042
00043     CornerDetectorFoerstner(Param& para, const std::string& postfix="");
00044
00045     CornerDetectorFoerstner(Param& para,
00046                             const int grp,const std::string& postfix);
00047
00048     ~CornerDetectorFoerstner();
00049
00050     protected:
00051     /** @brief Computes the Foerstner cornerness criterion det/trace,
00052         points are accepted only if corner-ellipse is also round enough
00053
00054         c = det / trace
00055         Also fills up _FeatList.
00056         @author koeser 09/2004
00057         @todo optimize for ROI usage */
00058       virtual int _ComputeCornerness(Image<CalculationType>& im);
00059
00060
00061   }; // class
00062
00063 } // namespace
00064
00065
00066 #endif // __CornerDetectorFoerstner_hh__
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorGradient.cpp Source File

FeatureDetector

CornerDetectorGradient.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung Institut fuer Informatik
00006   Christian-Albrechts-Universitaet Kiel
00007
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #ifdef WIN32
00025 #  include "Base/Common/W32Compat.hh"
00026 #endif
00027
00028 #include <algorithm>
00029 #include "CornerDetectorGradient.hh"
00030 #include <Base/Image/ImageConvert.hh>
00031
00032 #ifdef BIAS_DEBUG
00033 #include <Base/Image/ImageIO.hh>
00034 #endif
00035
00036   //#define TIME_MEASURE
00037 #ifdef TIME_MEASURE
00038 #include <Base/Debug/TimeMeasure.hh>
00039 #endif
00040
00041 #include <Base/Common/BIASpragma.hh>
00042
00043 using namespace BIAS;
00044 using namespace std;
00045
00046 //////////////////////////////////////////////////////////////////////////
00047 //                 implementation
00048 //////////////////////////////////////////////////////////////////////////
00049
00050
00051 template <class StorageType, class CalculationType>
00052 CornerDetectorGradient<StorageType, CalculationType>::
00053 CornerDetectorGradient()
00054   : CornerDetectorBase<StorageType>(),
00055     _st(),
00056     _gauss()
00057 {
00058   _FeatureMap=NULL;
00059   _MinDistance= new int;
00060   *_MinDistance = 10;
00061   _MinCornerness= new double;
00062   *_MinCornerness = 1.0;
00063   _DoRefinement = new bool;
00064   *_DoRefinement = false;
00065 }
00066
00067 template <class StorageType, class CalculationType>
00068 CornerDetectorGradient<StorageType, CalculationType>::
00069 CornerDetectorGradient(Param& para, const std::string& postfix)
00070   : CornerDetectorBase<StorageType>(para, postfix),
00071     _st(para, "-CornerDetectorGradient"+postfix),
00072     _gauss(para,"-CornerDetectorGradient"+postfix)
00073 {
00074   _FeatureMap=NULL;
00075   int grp=para.GetFreeGroupID();
00076   _AddParam(para, grp, "-CornerDetectorGradient"+postfix);
00077   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp,"CornerDetectorGradient");
00078 }
00079
00080 template <class StorageType, class CalculationType>
00081 CornerDetectorGradient<StorageType, CalculationType>::
00082 CornerDetectorGradient(Param& para, const int grp, const std::string& postfix)
00083   :CornerDetectorBase<StorageType>(para,grp,postfix),
00084    _st(para, grp, "-CornerDetectorGradient"+postfix),
00085    _gauss(para, grp, "-CornerDetectorGradient"+postfix)
00086 {
00087   _FeatureMap=NULL;
00088   _AddParam(para, grp, "-CornerDetectorGradient"+postfix);
00089 }
00090
00091 template <class StorageType, class CalculationType>
00092 CornerDetectorGradient<StorageType, CalculationType>::~CornerDetectorGradient()
00093 {_DeleteInternalMem();
00094  if(this->ParamsAllocated_){
00095    delete _MinDistance;   _MinDistance   = NULL;
00096    delete _MinCornerness; _MinCornerness = NULL;
00097    delete _DoRefinement;  _DoRefinement  = NULL;
00098  }
00099 }
00100
00101 template <class StorageType, class CalculationType>
00102 int CornerDetectorGradient<StorageType, CalculationType>::
00103 Detect(const Image<StorageType>& image, std::vector<HomgPoint2D>& p,
00104        std::vector<QUAL>& quality, std::vector<Matrix2x2<double> > *cov) {
00105   Image<StorageType> fim;
00106   _gauss.Filter(image, fim);
00107 #ifdef BIAS_DEBUG
00108   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00109     Image<StorageType> im2=image;
00110     ImageIO::Write("float-input.mip", im2);
00111     ImageIO::Write("gauss-filtered.mip", fim);
00112   }
00113 #endif
00114
00115   Image<CalculationType> *kim = NULL;
00116   if (typeid(StorageType)==typeid(CalculationType)) {
00117     kim = (Image<CalculationType> *)&fim;
00118   } else {
00119     kim = new Image<CalculationType>(fim.GetWidth(), fim.GetHeight(),
00120                                      fim.GetChannelCount());
00121     ImageConvert::ConvertST(fim, *kim, kim->GetStorageType());
00122   }
00123   int sres=this->_st.CalcStructureTensor(*kim, this->_sgxx, this->_sgxy,
00124                                          this->_sgyy);
00125   if (typeid(StorageType)!=typeid(CalculationType)) delete kim;
00126
00127   if (this->_sgxx.GetWidth()>this->_Cornerness.GetWidth() ||
00128       this->_sgxx.GetHeight()>this->_Cornerness.GetHeight()){
00129     _AllocInternalMem(this->_sgxx.GetWidth(), this->_sgxx.GetHeight());
00130   }
00131
00132   int mres = _ComputeCornerness(this->_Cornerness);
00133   this->_ZeroFeatureMap();
00134   // do we have old corners where no new ones are desired ?
00135   if (p.size()>0) this->_FillFeatureMap(p);
00136   int eres = this->_EnforceMinimumDistance(p, quality);
00137
00138   // compute the covariances
00139   if (cov){
00140     GetCov_(p, *cov);
00141   }
00142
00143   return (sres==0 && mres==0 && eres==0)?(0):-1;
00144 }
00145
00146 template <class StorageType, class CalculationType>
00147 void CornerDetectorGradient<StorageType, CalculationType>::
00148 GetCov_(const vector<HomgPoint2D>& p, vector<Matrix2x2<double> >& cov,
00149         const double noise) const
00150 {
00151   cov.resize(p.size());
00152   const int num = (int)p.size();
00153   int x, y, ires;
00154   const double square_noise = noise * noise;
00155   Matrix2x2<double> c;
00156   for (int i=0; i<num; i++){
00157     x = (int)rint(p[i][0]);
00158     y = (int)rint(p[i][1]);
00159     BIASASSERT(x>=0 && y>=0 &&
00160                x<(int)_sgxx.GetWidth() && y<(int)_sgxx.GetHeight());
00161     c[0][0] = _sgxx.GetImageDataArray()[y][x];
00162     c[1][1] = _sgyy.GetImageDataArray()[y][x];
00163     c[1][0] = c[0][1] = _sgxy.GetImageDataArray()[y][x];
00164     ires = c.Invert(cov[i]);
00165     cov[i] *= square_noise;
00166     if (ires!=0) { ABORT; }
00167   }
00168 }
00169
00170 template <class StorageType, class CalculationType>
00171 int CornerDetectorGradient<StorageType, CalculationType>::
00172 Detect(const Image<CalculationType>& gradx,
00173        const Image<CalculationType>& grady,
00174        std::vector<HomgPoint2D>& p,std::vector<QUAL>& quality,
00175        std::vector<Matrix2x2<double> > *cov)
00176 {
00177 #ifdef TIME_MEASURE
00178   TimeMeasure timer2;
00179   timer2.Start();
00180 #endif
00181
00182 #ifdef BIAS_DEBUG
00183   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00184     Image<CalculationType> im2=gradx;
00185     ImageIO::Write("cd-gradx.mip", im2);
00186     im2=grady;
00187     ImageIO::Write("cd-grady.mip", im2);
00188   }
00189   BIASASSERT(gradx.SamePixelAndChannelCount(grady));
00190 #endif
00191
00192
00193 #ifdef TIME_MEASURE
00194   timer2.Stop();
00195   cerr << "allocating  took "<<timer2.GetRealTime()<<" us\n";
00196   timer2.Reset();
00197   timer2.Start();
00198 #endif
00199
00200   int sres = 0;
00201   // create instances of gradienttype images, so we can compare against
00202   // storagetype
00203   sres=this->_st.CalcStructureTensor(gradx, grady, this->_sgxx,
00204                                      this->_sgxy, this->_sgyy);
00205
00206 #ifdef BIAS_DEBUG
00207   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00208     ImageIO::Write("cd-sgxx.mip", _sgxx);
00209     ImageIO::Write("cd-sgxy.mip", _sgxy);
00210     ImageIO::Write("cd-sgyy.mip", _sgyy);
00211   }
00212 #endif
00213
00214 #ifdef TIME_MEASURE
00215   timer2.Stop();
00216   cerr << "CalcStructureTensor  took "<<timer2.GetRealTime()<<" us\n";
00217   timer2.Reset();
00218   timer2.Start();
00219 #endif
00220
00221   if (this->_sgxx.GetWidth()>this->_Cornerness.GetWidth() ||
00222       this->_sgxx.GetHeight()>this->_Cornerness.GetHeight()){
00223     _AllocInternalMem(this->_sgxx.GetWidth(), this->_sgxx.GetHeight());
00224   }
00225   int mres = _ComputeCornerness(this->_Cornerness);
00226
00227 #ifdef BIAS_DEBUG
00228   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00229     ImageIO::Write("cd-cornerness.mip", _Cornerness);
00230   }
00231 #endif
00232
00233 #ifdef TIME_MEASURE
00234   timer2.Stop();
00235   cerr << "_ComputeCornerness  took "<<timer2.GetRealTime()<<" us\n";
00236   timer2.Reset();
00237   timer2.Start();
00238 #endif
00239
00240   this->_ZeroFeatureMap();
00241   if (p.size()>0) this->_FillFeatureMap(p);
00242   int eres = this->_EnforceMinimumDistance(p, quality);
00243
00244 #ifdef TIME_MEASURE
00245   timer2.Stop();
00246   cerr << "EnforceMinimumDistance  took "<<timer2.GetRealTime()<<" us\n";
00247   timer2.Reset();
00248   timer2.Start();
00249 #endif
00250
00251   // compute the covariances
00252   if (cov){
00253     GetCov_(p, *cov);
00254   }
00255
00256   return (sres==0 && mres==0 && eres==0)?(0):-1;
00257 }
00258
00259 template <class StorageType, class CalculationType>
00260 int CornerDetectorGradient<StorageType, CalculationType>::
00261 Cornerness(const Image<CalculationType>& gradx,
00262            const Image<CalculationType>& grady,
00263            Image<CalculationType>& cornerness)
00264 {
00265   int ires, meres;
00266   if (!gradx.SamePixelAndChannelCount(this->_sgxx)){
00267     _AllocInternalMem(gradx.GetWidth(), gradx.GetHeight());
00268   }
00269
00270   if ((ires=this->_st.CalcStructureTensor(gradx, grady, this->_sgxx,
00271                                          this->_sgxy, this->_sgyy))!=0){
00272     BIASERR("error calculating structure tensor");
00273   }
00274
00275   if (!cornerness.SamePixelAndChannelCount(gradx)){
00276     if (!cornerness.IsEmpty()) cornerness.Release();
00277     cornerness.Init(gradx.GetWidth(), gradx.GetHeight(), 1);
00278   }
00279
00280
00281   meres = _ComputeCornerness(cornerness);
00282
00283   return (ires==0 && meres==0)?0:-1;
00284 }
00285
00286 template <class StorageType, class CalculationType>
00287 int CornerDetectorGradient<StorageType, CalculationType>::
00288 DetectFromCornerness(const Image<CalculationType>& cornerness,
00289                      std::vector<HomgPoint2D>& p, std::vector<QUAL>& quality)
00290 {
00291   // fill feature map from cornerness
00292   int tlx, tly, brx, bry;
00293   cornerness.GetROI()->GetCorners(tlx, tly, brx, bry);
00294   const int minx=tlx;
00295   const int miny=tly;
00296   const int maxx=brx;
00297   const int maxy=bry;
00298   Feat fp; this->_FeatList.clear();
00299   this->_FeatList.reserve((brx-tlx)*(bry-tly));
00300   register CalculationType **ime=cornerness.GetImageDataArray();
00301   register const double me=(double)*this->_MinCornerness;
00302   double ev;
00303
00304   register int x, y;
00305   for (y=miny; y<maxy; y++){
00306     for (x=minx; x<maxx; x++){
00307       ev=ime[y][x];
00308       if (ev>me){
00309         fp.x=x;
00310         fp.y=y;
00311         fp.val=ev;
00312         this->_FeatList.push_back(fp);
00313       }
00314     }
00315   }
00316   // now do non maximum supression
00317   this->_ZeroFeatureMap();
00318   if (p.size()>0) this->_FillFeatureMap(p);
00319   int res = this->_EnforceMinimumDistance(p, quality);
00320
00321   return res;
00322 }
00323
00324
00325 template <class StorageType, class CalculationType>
00326 int CornerDetectorGradient<StorageType, CalculationType>::
00327 DetectFromCornerness(const Image<CalculationType> &cornerness,
00328              const std::vector<Vector2<int> > &region,
00329              std::vector<HomgPoint2D> &p,
00330              std::vector<QUAL> &quality)
00331 {
00332 #ifdef BIAS_DEBUG
00333   BIASASSERT( p.size() == quality.size() );
00334 #endif
00335
00336   CalculationType **imagedatacorn = cornerness.GetImageDataArray();
00337   const double mincorn = (double)*this->_MinCornerness;
00338
00339   // setup feature list
00340   this->_FeatList.clear();
00341   this->_FeatList.reserve(region.size());
00342
00343   // fill feature list with features of min cornerness
00344   Feat fp;
00345   unsigned i;
00346   for (i = 0; i < region.size(); i++) {
00347     const int x = region[i][0];
00348     const int y = region[i][1];
00349     const double corn = imagedatacorn[y][x];
00350
00351     if ( corn > mincorn ) {
00352       fp.x   = x;
00353       fp.y   = y;
00354       fp.val = corn;
00355
00356       this->_FeatList.push_back(fp);
00357     }
00358   }
00359
00360   // init feature map, mask out given features by 'p'
00361   this->_ZeroFeatureMap();
00362   if ( p.size() > 0)
00363     this->_FillFeatureMap(p);
00364
00365   int res = this->_EnforceMinimumDistance(p, quality);
00366
00367   return res;
00368 }
00369
00370 //////////////////////////////////////////////////////////////////////////
00371 // protected functions
00372 //////////////////////////////////////////////////////////////////////////
00373
00374 template <class StorageType, class CalculationType>
00375 int CornerDetectorGradient<StorageType, CalculationType>::
00376 _EnforceMinimumDistance(vector<HomgPoint2D>& points, vector<QUAL>& qual)
00377 {
00378 #ifdef TIME_MEASURE
00379   TimeMeasure timer;
00380   timer.Start();
00381 #endif
00382
00383   //for (int i=0; i<50; i++) cout << i<< ": "<< _FeatList[i] << endl;
00384   //int maxnum=(_InternalMemWidth*_InternalMemHeight)/8;
00385   //partial_sort(_FeatList.begin(), _FeatList.begin()+maxnum, _FeatList.end());
00386   sort(_FeatList.begin(), _FeatList.end());
00387   //  for (int i=0; i<50; i++) cout << i<< ": "<< _FeatList[i] << endl;
00388
00389 #ifdef TIME_MEASURE
00390   timer.Stop();
00391   cerr << "Quicksort of "<<_FeatList.size()<<" took "<<timer.GetRealTime()<<" us\n";
00392   timer.Reset();
00393   timer.Start();
00394 #endif
00395
00396   // clear points and qual
00397   points.clear();
00398   qual.clear();
00399
00400   int minx, maxx, miny, maxy, mx, my;
00401   register int x, y;
00402   register double mineig;
00403   register vector<class Feat>::iterator p=_FeatList.begin();
00404   const int md=*_MinDistance-1;
00405   const int width=_Cornerness.GetWidth();
00406   const int height=_Cornerness.GetHeight();
00407   const int mwidth=width-md;
00408   const int mheight=height-md;
00409   HomgPoint2D hp;
00410
00411   // 1 point in every md by md pixel patch
00412   int num=width*height/(md*md);
00413   points.reserve(num);
00414   qual.reserve(num);
00415
00416   //BIASASSERT(md>=0);
00417
00418   // fill _FeatureMap and points
00419   vector<class Feat>::iterator it;
00420   for (it=_FeatList.begin(); it!=_FeatList.end(); it++){
00421     x=it->x;
00422     y=it->y;
00423     mineig=it->val;
00424     if (!_FeatureMap[y][x]) {
00425       // fill feature map
00426       miny=(y>md)?(y-md):(0);
00427       maxy=(y>=mheight)?(height-1):(y+md);
00428       minx=(x>md)?(x-md):(0);
00429       maxx=(x>=mwidth)?(width-1):(x+md);
00430       for (my=miny; my<=maxy; my++){
00431         for (mx=minx; mx<=maxx; mx++){
00432           _FeatureMap[my][mx]=true;
00433         }
00434       }
00435       // add point to vector
00436       hp.Set((double)(x), (double)(y), 1.0);
00437 #ifdef BIAS_DEBUG
00438       BIASASSERT(!isnan(hp[0]) && !isinf(hp[0]));
00439       BIASASSERT(!isnan(hp[1]) && !isinf(hp[1]));
00440       if (this->DebugLevelIsSet(D_CD_FEATURES) && points.size()<15)
00441         cerr << points.size() << " : ("<<x<<", "<<y<<" ) qual "<<mineig<<endl;
00442 #endif
00443       points.push_back(hp);
00444       qual.push_back((QUAL)mineig);
00445
00446       // check if we have found enough corners:
00447       if ((++_NumberFeaturesSoFar >= (*(this->_MaxNum))) &&
00448           (*this->_MaxNum>0)) break;
00449     }
00450   }
00451
00452   // refine all selected corners
00453   if (*_DoRefinement) _RefineCorners(points, qual);
00454
00455 #ifdef BIAS_DEBUG
00456   for (unsigned i=0; i<points.size(); i++){
00457     BIASASSERT(!isnan(points[i][0]) && !isinf(points[i][0]));
00458     BIASASSERT(!isnan(points[i][1]) && !isinf(points[i][1]));
00459   }
00460 #endif
00461
00462
00463 #ifdef TIME_MEASURE
00464   timer.Stop();
00465   cerr << "EnforceMinimumDistance without Quicksort took "
00466        <<timer.GetRealTime()<<" us\n";
00467 #endif
00468   return 0;
00469 }
00470
00471
00472 template <class StorageType, class CalculationType>
00473 bool CornerDetectorGradient<StorageType, CalculationType>::
00474 _RefineCornerPosition(int col, int row,
00475                      double &x, double &y, QUAL& NewCornerness) {
00476   CalculationType **cornerness = _Cornerness.GetImageDataArray();
00477   // cornerness values of 8-neighbourhood
00478   const register CalculationType& DR_P11 = cornerness[row-1][col-1];
00479   const register CalculationType& DR_P12 = cornerness[row-1][col  ];
00480   const register CalculationType& DR_P13 = cornerness[row-1][col+1];
00481   const register CalculationType& DR_P21 = cornerness[row  ][col-1];
00482   const register CalculationType& DR_P22 = cornerness[row  ][col  ];
00483   const register CalculationType& DR_P23 = cornerness[row  ][col+1];
00484   const register CalculationType& DR_P31 = cornerness[row+1][col-1];
00485   const register CalculationType& DR_P32 = cornerness[row+1][col  ];
00486   const register CalculationType& DR_P33 = cornerness[row+1][col+1];
00487   NewCornerness = (float)DR_P22;
00488
00489   // Create weighting coefficients for the quadratic fit. They are obtained by
00490   // applying these masks to the 3x3 window centered on pixel (row,col) :
00491   float b,c,d,e,f;
00492
00493   // 1/9 * [ -1 +2 -1 ]
00494   //       [ +2 +5 +2 ]
00495   //       [ -1 +2 -1 ]
00496   // dont need "a" here
00497
00498   // 1/6 * [ -1  0 +1 ]
00499   //       [ -1  0 +1 ]
00500   //       [ -1  0 +1 ]
00501   b = (-DR_P11 +  DR_P13 -  DR_P21 +
00502        DR_P23 -  DR_P31 +  DR_P33)/6.0f;
00503
00504   // 1/6 * [ -1 -1 -1 ]
00505   //       [  0  0  0 ]
00506   //       [ +1 +1 +1 ]
00507   c = (-DR_P11 - DR_P12 - DR_P13 +
00508        DR_P31 + DR_P32 + DR_P33)/6.0f;
00509
00510   // 1/3 * [ +1 -2 +1 ]
00511   //       [ +1 -2 +1 ]
00512   //       [ +1 -2 +1 ]
00513   d = (DR_P11 + DR_P13 +
00514        DR_P21 + DR_P23 +
00515        DR_P31 + DR_P33
00516        -2.0f*(DR_P12+DR_P22+DR_P32))/3.0f;
00517
00518   // 1/4 * [ +1  0 -1 ]
00519   //       [  0  0  0 ]
00520   //       [ -1  0 +1 ]
00521   e = (DR_P11 - DR_P31 -
00522        DR_P13 + DR_P33)/4.0f;
00523
00524   // 1/3 * [ +1 +1 +1 ]
00525   //       [ -2 -2 -2 ]
00526   //       [ +1 +1 +1 ]
00527   f = (   DR_P11 +  DR_P12 +  DR_P13
00528           -2.0f*(DR_P21+DR_P22+DR_P23)
00529           +DR_P31 +  DR_P32 +  DR_P33)/3.0f;
00530
00531   // Next find the extremum of the fitted surface by setting its
00532   // partial derivatives to zero. We need to solve the following linear system:
00533   //
00534   //  [ d e ] [ off_x ] + [ b ] = [ 0 ]      (dS/dx = 0)
00535   //  [ e f ] [ off_y ]   [ c ]   [ 0 ]      (dS/dy = 0)
00536   //
00537   // This implies that the fitted surface is
00538   // S(x,y) = a + b x + c y + 1/2 d x^2 + e x y + 1/2 f y^2
00539   // where we don't need to know the value of a.
00540
00541   float det = d*f - e*e;
00542   if (det > 0.0) {
00543     float off_x = (c*e - b*f) / det;
00544     float off_y = (b*e - c*d) / det;
00545
00546     // more than one pixel away
00547     if (fabs (off_x) > 1.0 || fabs (off_y) > 1.0)
00548       return false;
00549     else {
00550       //cout<<"Succesfully refined point. old was "<<x<<" "<<y<<"with q="
00551       //    <<NewCornerness;
00552       x = col+off_x;
00553       y = row+off_y;
00554       // now compute a because we need it for the cornerness value:
00555       // 1/9 * [ -1 +2 -1 ]
00556       //       [ +2 +5 +2 ]
00557       //       [ -1 +2 -1 ]
00558       float a = (-     DR_P11 +2.0f *DR_P12 -     DR_P13
00559                  +2.0f*DR_P21 +5.0f *DR_P22 +2.0f*DR_P23
00560                  -     DR_P31 +2.0f *DR_P32 -     DR_P33)/9.0f;
00561
00562       NewCornerness = float( a + b*off_x + c*off_y + 0.5*d*off_x*off_x
00563         + e*off_x*off_y + 0.5*f*off_y*off_y );
00564       //cout<<" New is  "<<x<<" "<<y<<"with q=" <<NewCornerness <<endl;
00565       return true;
00566     }
00567   }
00568   // it's a saddle surface, but the corner may be good anyway :
00569   else if (det < 0.0) {
00570     x = col;
00571     y = row;
00572     return true;
00573   }
00574
00575   // det is zero !
00576   return false;
00577 }
00578
00579
00580 template <class StorageType, class CalculationType>
00581 int CornerDetectorGradient<StorageType, CalculationType>::
00582 _ComputeCornerness(Image<CalculationType>& i) {
00583   BIASERR("Make instances of derived class, dont call this !!!");
00584   BIASABORT;
00585   return 0;
00586 }
00587
00588 template <class StorageType, class CalculationType>
00589 void CornerDetectorGradient<StorageType, CalculationType>::
00590 _FillFeatureMap(vector<HomgPoint2D>& p)
00591 {
00592   vector<HomgPoint2D>::iterator pit;
00593   const int md=*_MinDistance-1;
00594   const int width=_Cornerness.GetWidth();
00595   const int height=_Cornerness.GetHeight();
00596   const int mwidth=width-md;
00597   const int mheight=height-md;
00598   int minx, maxx, miny, maxy, mx, my, x, y;
00599   for (pit=p.begin(); pit!=p.end(); pit++){
00600     if (!pit->IsAtInfinity()){
00601       _NumberFeaturesSoFar++;
00602       x=(int)rint((*pit)[0]);
00603       y=(int)rint((*pit)[1]);
00604       // fill feature map
00605       miny=(y>md)?(y-md):(0);
00606       maxy=(y>=mheight)?(height-1):(y+md);
00607       minx=(x>md)?(x-md):(0);
00608       maxx=(x>=mwidth)?(width-1):(x+md);
00609       for (my=miny; my<=maxy; my++){
00610         for (mx=minx; mx<=maxx; mx++){
00611           _FeatureMap[my][mx]=true;
00612         }
00613       }
00614     }
00615   }
00616 }
00617
00618 template <class StorageType, class CalculationType>
00619 void CornerDetectorGradient<StorageType, CalculationType>::
00620 _DeleteInternalMem()
00621 {
00622   if (!_Cornerness.IsEmpty()) _Cornerness.Release();
00623
00624   if (_FeatureMap!=NULL) {
00625     delete[] _FeatureMap[0]; _FeatureMap[0]=NULL;
00626     delete[] _FeatureMap; _FeatureMap=NULL;
00627   }
00628 }
00629
00630 template <class StorageType, class CalculationType>
00631 void CornerDetectorGradient<StorageType, CalculationType>::
00632 _AllocInternalMem(const int width, const int height)
00633 {
00634   _DeleteInternalMem();
00635   int size=width*height;
00636   _Cornerness.Init(width, height, 1);
00637 //   _sgxx.Init(width, height, 1);
00638 //   _sgxy.Init(width, height, 1);
00639 //   _sgyy.Init(width, height, 1);
00640   _FeatureMap = new bool*[height];
00641   _FeatureMap[0] = new bool[size];
00642   for (int i=1; i<height; i++) {
00643     _FeatureMap[i]=_FeatureMap[i-1]+width;
00644   }
00645   _FeatList.reserve(size);
00646 }
00647
00648
00649
00650 template <class StorageType, class CalculationType>
00651 void CornerDetectorGradient<StorageType, CalculationType>::
00652 _AddParam(Param& para, const int grp, const std::string& postfix) {
00653   if (para.CheckParam("MinDistance"+postfix)) {
00654     _MinDistance=para.GetParamInt("MinDistance"+postfix);
00655   } else {
00656     _MinDistance=para.AddParamInt("MinDistance"+postfix,
00657                                   "minimum distance between corners",
00658                                   10, 0, INT_MAX, 0, grp);
00659   }
00660
00661   if (para.CheckParam("MinCornerness"+postfix)){
00662     _MinCornerness=para.GetParamDouble("MinCornerness"+postfix);
00663   } else {
00664     _MinCornerness=para.AddParamDouble("MinCornerness"+postfix,
00665                                        "threshold to accept point as corner",
00666                                        1.0, 0.0, DBL_MAX, 0, grp);
00667   }
00668
00669   if (para.CheckParam("SubpixelAccuracy"+postfix)){
00670     _DoRefinement = para.GetParamBool("SubpixelAccuracy"+postfix);
00671   } else {
00672     _DoRefinement =
00673       para.AddParamBool("SubpixelAccuracy"+postfix,
00674                         "refine (int) pixel position by quad. surface fitting",
00675                         false, 0, grp);
00676   }
00677 }
00678
00679
00680
00681 template <class StorageType, class CalculationType>
00682 int CornerDetectorGradient<StorageType, CalculationType>::
00683 _CalcCornerness(const Image<StorageType>& image,
00684                 Image<CalculationType>& cornerness)
00685 {
00686   Image<StorageType> fim;
00687   _gauss.Filter(image, fim);
00688 #ifdef BIAS_DEBUG
00689   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00690     Image<StorageType> im2=image;
00691     ImageIO::Write("float-input.mip", im2);
00692     ImageIO::Write("gauss-filtered.mip", fim);
00693   }
00694 #endif
00695
00696
00697   Image<CalculationType> *kim = NULL;
00698   if (typeid(StorageType)==typeid(CalculationType)) {
00699     kim = (Image<CalculationType> *) &fim;
00700   } else {
00701     kim = new Image<CalculationType>(fim.GetWidth(), fim.GetHeight(),
00702                                      fim.GetChannelCount());
00703     ImageConvert::ConvertST(fim, *kim, kim->GetStorageType());
00704   }
00705   int sres=this->_st.CalcStructureTensor(*kim, this->_sgxx, this->_sgxy,
00706                                          this->_sgyy);
00707   if (typeid(StorageType)!=typeid(CalculationType)) delete kim;
00708
00709   if (this->_sgxx.GetWidth()>this->_Cornerness.GetWidth() ||
00710       this->_sgxx.GetHeight()>this->_Cornerness.GetHeight()){
00711     _AllocInternalMem(this->_sgxx.GetWidth(), this->_sgxx.GetHeight());
00712   }
00713
00714
00715   int mres = _ComputeCornerness(cornerness);
00716   return (sres==0 && mres==0)?0:-1;
00717 }
00718
00719
00720
00721 template <class StorageType, class CalculationType>
00722 int CornerDetectorGradient<StorageType, CalculationType>::
00723 _CalcCornerness(const Image<CalculationType>& gradx,
00724                 const Image<CalculationType>& grady,
00725                 Image<CalculationType>& cornerness) {
00726   int ires, meres;
00727   if ((ires=this->_st.CalcStructureTensorValid(gradx, grady,
00728                                                this->_sgxx, this->_sgxy,
00729                                                this->_sgyy))!=0){
00730     BIASERR("error calculatimng structure tensor");
00731   }
00732   if (!cornerness.SamePixelAndChannelCount(gradx)){
00733     if (!cornerness.IsEmpty()) cornerness.Release();
00734     cornerness.Init(gradx.GetWidth(), gradx.GetHeight(), 1);
00735   }
00736   meres = _ComputeCornerness(cornerness);
00737
00738   return (ires==0 && meres==0)?0:-1;
00739 }
00740
00741 //////////////////////////////////////////////////////////////////////////
00742 //                 instantiation
00743 //////////////////////////////////////////////////////////////////////////
00744
00745
00746 template class CornerDetectorGradient<unsigned char, float>;
00747 template class CornerDetectorGradient<float, float>;
00748
00749 // fill in instances as required
00750 #ifdef BUILD_IMAGE_INT
00751 template class CornerDetectorGradient<unsigned char, int>;
00752 #endif
00753
00754 #ifdef BUILD_IMAGE_CHAR
00755 template class CornerDetectorGradient<unsigned char, char>;
00756 #endif
00757
00758 #ifdef BUILD_IMAGE_SHORT
00759 #endif
00760
00761 #ifdef BUILD_IMAGE_USHORT
00762 #ifdef BUILD_IMAGE_INT
00763 template class CornerDetectorGradient<unsigned short, int>;
00764 #endif
00765 template class CornerDetectorGradient<unsigned short, float>;
00766 #endif
00767
00768 #ifdef BUILD_IMAGE_UINT
00769 #endif
00770
00771 #ifdef BUILD_IMAGE_DOUBLE
00772 #endif
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorGradient.hh Source File

FeatureDetector

CornerDetectorGradient.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CornerDetectorGradient_hh__
00027 #define __CornerDetectorGradient_hh__
00028
00029 #include "CornerDetectorBase.hh"
00030 #include <Filter/StructureTensor.hh>
00031 #include <Filter/Gauss.hh>
00032 #include <Base/Math/Matrix2x2.hh>
00033
00034
00035 namespace BIAS {
00036
00037   /// internal class for feature passing only
00038   class BIASFeatureDetector_EXPORT Feat {
00039   public:
00040     int x, y;
00041     double val;
00042
00043     bool operator<(const Feat& r) const
00044     { return val>r.val; }
00045
00046     Feat& operator=(const Feat& f)
00047     { x=f.x; y=f.y; val=f.val; return *this; }
00048
00049   }; // end of class Feat
00050
00051
00052   inline std::ostream& operator<<(std::ostream & os, const Feat& f)
00053   { os << "("<<f.x<<", "<<f.y<<") = "<<f.val; return os; }
00054
00055
00056
00057   /** @class CornerDetectorGradient
00058       @ingroup g_feature
00059       @brief base class for all gradient based corner detectors
00060
00061       provides  functionality to compute the structure tensor
00062       | gxx gxy |
00063       | gyx gyy |
00064
00065       The function detect low pass filters the image, computes gradients and
00066       the structure tensor and then calls _ComputeCornerness on the structure
00067       tensor image. This function must be implemented in derived classes, it
00068       basically converts the 2x2 structure tensor to a scalar value which
00069       describes how much cornerlike the region around that pixel is, which
00070       is saved in the cornerness image. Values above a threshold are pushed
00071       into an internal list.
00072       Afterwards the EnforceMinimumDistance function is called to sort features
00073       by quality and add them to the final list. New points are accepted only
00074       if the have a minimum distance to all previously extracted points.
00075       In the detect function you may pass a non-empty vector of points,
00076       which are regarded as "existing corners" and none of the new points may
00077       lie withing the critical distance around the old ones. This gives the
00078       possibility to detect new features for a tracker, which has tracked
00079       some points (where no new features are desired) and lost some features.
00080
00081       @author woelk/koeser 09/2004 */
00082
00083   template <class StorageType, class CalculationType>
00084   class BIASFeatureDetector_EXPORT CornerDetectorGradient :
00085     public CornerDetectorBase<StorageType>
00086   {
00087   public:
00088     CornerDetectorGradient();
00089
00090     CornerDetectorGradient(Param& para, const std::string& postfix="");
00091
00092     CornerDetectorGradient(Param& para, const int grp,
00093                            const std::string& postfix);
00094
00095     virtual ~CornerDetectorGradient();
00096
00097     /** @brief detect corners in a grey image
00098
00099         see documentation of BIAS::CornerDetectorGradient class for more info
00100         @param image grey value input image
00101         @param p all points in p _not_ lying at infinity (p[i][2]!=0) are
00102         assumed to be corners of very good quality, in the region around these
00103         points no new features are detected, leave empty if you just want
00104         to detect some features in the image
00105         In any case p is cleared and only new detected points are added before
00106         returning. Example: assume MaxNum=100, you pass a vector p with 40
00107         points of which 12 have the third coordinate w=0. You will get back a
00108         vector of maximum size 72, it may be smaller if Distance and
00109         MinCornerness have too large values
00110         @param quality after returning, for each point in p there is a
00111         quality in quality, no input requirements  */
00112     virtual int Detect(const Image<StorageType>& image,
00113                        std::vector<HomgPoint2D>& p,
00114                        std::vector<QUAL>& quality,
00115                        std::vector<Matrix2x2<double> > *cov = NULL);
00116
00117      /** @brief detect corners given the gradient images
00118
00119         see documentation of BIAS::CornerDetectorGradient class for more info
00120         @param gradx image containing gradient x component
00121         @param grady image containing gradient y component
00122         @param p all points in p _not_ lying at infinity (p[i][2]!=0) are
00123         assumed to be corners of very good quality, in the region around these
00124         points no new features are detected, leave empty if you just want
00125         to detect some features in the image.
00126         In any case p is cleared and only new detected points are added before
00127         returning. Example: assume MaxNum=100, you pass a vector p with 40
00128         points of which 12 have the third coordinate w=0. You will get back a
00129         vector of maximum size 72, it may be smaller if Distance and
00130         MinCornerness have too large values
00131         @param quality after returning, for each point in p there is a
00132         quality in quality, no input requirements  */
00133     virtual int Detect(const Image<CalculationType>& gradx,
00134                        const Image<CalculationType>& grady,
00135                        std::vector<HomgPoint2D>& p,
00136                        std::vector<QUAL>& quality,
00137                        std::vector<Matrix2x2<double> > *cov = NULL);
00138
00139
00140     /** @brief detect corners avoiding double calculation of cornerness image
00141
00142         see documentation of BIAS::CornerDetectorGradient class for more info
00143         @param cornerness image with already computed cornerness
00144         @param p all points in p _not_ lying at infinity (p[i][2]!=0) are
00145         assumed to be corners of very good quality, in the region around these
00146         points no new features are detected, leave empty if you just want
00147         to detect some features in the image
00148         In any case p is cleared and only new detected points are added before
00149         returning. Example: assume MaxNum=100, you pass a vector p with 40
00150         points of which 12 have the third coordinate w=0. You will get back a
00151         vector of maximum size 72, it may be smaller if Distance and
00152         MinCornerness have too large values
00153         @param quality after returning, for each point in p there is a
00154         quality in quality, no input requirements  */
00155     virtual int DetectFromCornerness(const Image<CalculationType>& cornerness,
00156                                      std::vector<HomgPoint2D>& p,
00157                                      std::vector<QUAL>& quality);
00158
00159
00160     /** @brief detect corners avoiding double calculation of cornerness image
00161         @author Dennis Herzog, June 2005 */
00162     virtual int DetectFromCornerness(const Image<CalculationType> &cornerness,
00163                      const std::vector<Vector2<int> > &region,
00164                      std::vector<HomgPoint2D> &p,
00165                      std::vector<QUAL> &quality);
00166
00167     /** @brief calculates the cornerness using the gradients gx and gy
00168         @author woelk 09/2004 */
00169     int Cornerness(const Image<CalculationType>& gradx,
00170                    const Image<CalculationType>& grady,
00171                    Image<CalculationType>& cornerness);
00172
00173
00174     /** @brief rets the min distance of features
00175         (simple parameter access function - does nothing else)
00176         @author Dennis Herzog, 2005-06-22 */
00177     inline int GetMinDistance() const
00178     { return *_MinDistance; }
00179
00180     /** @brief sets the min distance of features
00181         (simple parameter access function - does nothing else)
00182         @author Dennis Herzog, 2005-06-22 */
00183     inline void SetMinDistance(int mindist)
00184     { *_MinDistance = mindist; }
00185
00186     /** @brief rets minimum cornernes of detectable features
00187         (simple parameter access function - does nothing else)
00188         @author Dennis Herzog, 2005-07-04 */
00189     inline double GetMinCornerness()
00190     { return *_MinCornerness; }
00191
00192     /** @brief sets minimum cornernes of detectable features
00193         @author woelk 02/2006 */
00194     inline void SetMinCornerness(double min_cornerness)
00195     { *_MinCornerness = min_cornerness; }
00196
00197     /** @author woelk 02/2006 */
00198     inline void SetSubpixelAccuracy(bool subpixel_accuracy)
00199     { *_DoRefinement = subpixel_accuracy; }
00200
00201     inline void SetStructureTensorHalfWinSize(int halfwinsize)
00202     { _st.SetHalfWinSize(halfwinsize); }
00203
00204   protected:
00205
00206     // exports for dll (cmenk)
00207     BIAS_EXPORT_STL_VECTOR( BIASFeatureDetector_EXPORT, class Feat )
00208
00209     /** calculates the cornerness using the src image
00210         @author woelk 09/2004 */
00211     int _CalcCornerness(const Image<StorageType>& src,
00212                         Image<CalculationType>& cornerness);
00213
00214     /** calculates the cornerness using the gradients gx and gy
00215         @author woelk 09/2004 */
00216     int _CalcCornerness(const Image<CalculationType>& gradx,
00217                         const Image<CalculationType>& grady,
00218                         Image<CalculationType>& cornerness);
00219
00220     /** @brief the main function which should be overwritten in derived
00221         classes, no implmentation in this class
00222
00223         computes the cornerness from the structure tensor image
00224         Uses structure tensor sgxx, _sgxy, _sgyy as input */
00225     virtual int _ComputeCornerness(Image<CalculationType>& Cornerness);
00226
00227
00228     /** @brief selects features sorted by quality from _FeatList such that they
00229         have a min distance as given in the param object
00230
00231         assumes feature map is zeroed
00232         @author woelk 09/2004 */
00233     int _EnforceMinimumDistance(std::vector<HomgPoint2D>& p,
00234                                 std::vector<QUAL>& quality);
00235
00236     /** @brief fit quadratic surface around (row;col) to find the maximum
00237         cornerness subpixel position and save it in x;y
00238         @param col column in image where refinement should take place
00239         @param row row in image where refinement should take place
00240         @param x output, refined coordinate
00241         @param y output, refined coordinate
00242         @param SubPixelCornerness cornerness value at subpixel maximum
00243         @author koeser 01/2004 */
00244     bool _RefineCornerPosition(int col, int row,
00245                                double &x, double &y, QUAL &SubPixelCornerness);
00246
00247     /** @brief refines corner position and quality for all corners in list,
00248         internal Cornerness_ image must be valid
00249         @param pos input/output of old/new position
00250         @param quality holds new cornernesses afterwards
00251         @author koeser 09/2004 */
00252     inline void _RefineCorners(std::vector<HomgPoint2D>& pos,
00253                                std::vector<QUAL>& quality) {
00254       BIASASSERT(pos.size()==quality.size());
00255       std::vector<QUAL>::iterator itq = quality.begin();
00256       for (std::vector<HomgPoint2D>::iterator itp=pos.begin();
00257            itp!=pos.end(); itp++, itq++)
00258         _RefineCornerPosition((int)(*itp)[0], (int)(*itp)[1],
00259                               (*itp)[0], (*itp)[1], *itq);
00260     }
00261
00262     /// @brief frees _Cornerness, _sgxx, _sgxy and _sgyy
00263     void _DeleteInternalMem();
00264
00265     /// @brief allocates _Cornerness , _sgxx, _sgxy and _sgyy
00266     void _AllocInternalMem(const int width, const int height);
00267
00268     /// @brief registers and handles parameters
00269     void _AddParam(Param& para, const int grp, const std::string& postfix);
00270
00271     /// @brief zeros the feature map
00272     inline void _ZeroFeatureMap()
00273     { memset((void*)_FeatureMap[0], 0,
00274              sizeof(bool)*_Cornerness.GetWidth()*_Cornerness.GetHeight());
00275     _NumberFeaturesSoFar = 0;};
00276
00277     /// @brief fills feature map with every point from p which isnt at infinity
00278     void _FillFeatureMap(std::vector<HomgPoint2D>& p);
00279
00280     /** @brief returns the inverse structure tensor, multiplied by noise^2
00281         @author woelk 03/2006 */
00282     void GetCov_(const std::vector<HomgPoint2D>& p,
00283                  std::vector<Matrix2x2<double> >& cov,
00284                  const double noise = 5) const;
00285
00286     /// structure tensor computation object
00287     StructureTensor<CalculationType, CalculationType> _st;
00288
00289     /// internal structure tensor images
00290     Image<CalculationType> _sgxx, _sgxy, _sgyy;
00291
00292     /// resulting image which tells for each pixel how cornerlike it is
00293     Image<CalculationType> _Cornerness;
00294
00295     /// array used to enforce a min distance / neighbor suppression
00296     bool **_FeatureMap;
00297
00298     /// temporary list of detected corners
00299     std::vector<class Feat> _FeatList;
00300
00301     /// Gauss for pre-smoothing
00302     Gauss<StorageType, StorageType> _gauss;
00303
00304     /// initialized with the old features provided by user, then counted up
00305     /// and compared against _MaxNumFeatures from Base class
00306     int _NumberFeaturesSoFar;
00307
00308     // parameter
00309     int *_MinDistance; ///< minimal distance between points
00310     double *_MinCornerness; ///< threshold to accept a feature
00311     bool* _DoRefinement; ///< tells whether subpixel refinement should be done
00312   }; // class
00313
00314 } // namespace
00315
00316 // DLL JW
00317 namespace std {
00318   template class BIASFeatureDetector_EXPORT std::vector<class BIAS::Feat>;
00319 }
00320
00321 #endif // __CornerDetectorGradient_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorHarris.cpp Source File

FeatureDetector

CornerDetectorHarris.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "CornerDetectorHarris.hh"
00026
00027 using namespace std;
00028 using namespace BIAS;
00029
00030
00031 //////////////////////////////////////////////////////////////////////////
00032 //                 implementation
00033 //////////////////////////////////////////////////////////////////////////
00034
00035
00036
00037 template <class StorageType, class CalculationType>
00038 CornerDetectorHarris<StorageType, CalculationType>::
00039 CornerDetectorHarris():
00040 CornerDetectorGradient<StorageType,CalculationType>()
00041 {
00042   this->ParamsAllocated_ = true;
00043   _Scale = new double;
00044   *_Scale = 0.04;
00045 }
00046
00047 template <class StorageType, class CalculationType>
00048 CornerDetectorHarris<StorageType, CalculationType>::
00049 CornerDetectorHarris(Param& para, const std::string& postfix):
00050 CornerDetectorGradient<StorageType,CalculationType>(para, postfix)
00051 {
00052   this->ParamsAllocated_ = false;
00053  int grp=para.GetFreeGroupID();
00054   _AddParam(para, grp, "-CornerDetectorHarris"+postfix);
00055   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp,"CornerDetectorHarris");
00056 }
00057
00058 template <class StorageType, class CalculationType>
00059 CornerDetectorHarris<StorageType,CalculationType>::
00060 CornerDetectorHarris(Param& para, const int grp, const std::string& postfix)
00061   : CornerDetectorGradient<StorageType,
00062                            CalculationType>(para, grp, postfix)
00063 {
00064   this->ParamsAllocated_ = false;
00065   _AddParam(para, grp, "-CornerDetectorHarris"+postfix);
00066 }
00067
00068 template <class StorageType, class CalculationType>
00069 CornerDetectorHarris<StorageType,CalculationType>::
00070 ~CornerDetectorHarris()
00071 {
00072   if (this->ParamsAllocated_)
00073     delete _Scale;
00074 }
00075
00076 template <class StorageType, class CalculationType> int
00077 CornerDetectorHarris<StorageType, CalculationType>::
00078 _ComputeCornerness(Image<CalculationType>& Cornerness)
00079 {
00080   // preserver ROI
00081   int tlx, tly, brx, bry;
00082   this->_sgxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00083   Cornerness.GetROI()->SetCorners(tlx, tly, brx, bry);
00084
00085   const unsigned int width=Cornerness.GetWidth();
00086   const unsigned int height=Cornerness.GetHeight();
00087
00088   // work pointers to summed multiplied derivatives
00089   CalculationType *psgxx=this->_sgxx.GetImageData(),
00090     *psgyy=this->_sgyy.GetImageData(),
00091     *psgxy=this->_sgxy.GetImageData();
00092   CalculationType *ptr, *end, tmp;
00093
00094   // init min und max with impossible values
00095   //_max = FLT_MIN;
00096   //_min = FLT_MAX;
00097   float scale = float ( *_Scale );
00098   // init all pointers to first usable position (skip upper two lines)
00099   /// \todo use ROI instead of border=2
00100   unsigned offs = 2*width+2;
00101   unsigned int x=2,y=2;
00102   ptr = Cornerness.GetImageData()+offs;
00103   psgxx += offs;
00104   psgxy += offs;
00105   psgyy += offs;
00106   end   = Cornerness.GetImageData()+width*(height-2)-2;
00107   const double me=(double)*this->_MinCornerness;
00108   Feat fp;
00109   this->_FeatList.clear();
00110   this->_FeatList.reserve(end-ptr);
00111   // run over all pixels, dont care about borders
00112   while (ptr<end) {
00113     const CalculationType xx = (CalculationType) *psgxx++;
00114     const CalculationType xy = (CalculationType) *psgxy++;
00115     const CalculationType yy = (CalculationType) *psgyy++;
00116
00117     // cornerness = det - scale*trace*trace
00118     tmp = (CalculationType) (xx*yy-xy*xy - scale * (xx+yy) * (xx+yy));
00119
00120     // save highest/lowest values for quality analysis later
00121     //if (tmp>_max) _max = tmp;
00122     //else if (tmp<_min) _min=tmp;
00123     if (tmp>me){
00124         fp.x=x;
00125         fp.y=y;
00126         fp.val=(tmp>(double)INT_MAX)?(INT_MAX):((int)tmp);
00127         this->_FeatList.push_back(fp);
00128         //cout <<"Found a point above min cornerness: "<<endl;
00129       }
00130     *ptr++ = tmp;
00131     if (++x>=width){
00132       y++;
00133       x=0;
00134     }
00135   }
00136   return 0;
00137 }
00138
00139 template <class StorageType, class CalculationType>
00140 void CornerDetectorHarris<StorageType, CalculationType>::
00141 _AddParam(Param& para, const int grp, const std::string& postfix)
00142 {
00143   if (para.CheckParam("ScaleTrace"+postfix)){
00144     _Scale = para.GetParamDouble("ScaleTrace"+postfix);
00145   } else {
00146     _Scale =
00147       para.AddParamDouble("ScaleTrace"+postfix,
00148                           "Weight of trace in Harris min. "
00149                           "eigenvalue approximation",
00150                           0.04, 0.0, DBL_MAX, 0, grp);
00151   }
00152   para.SetEnhancedFlag("ScaleTrace"+postfix, true);
00153 }
00154
00155 //////////////////////////////////////////////////////////////////////////
00156 //                 instantiation
00157 //////////////////////////////////////////////////////////////////////////
00158
00159 template class CornerDetectorHarris<unsigned char, float>;
00160 template class CornerDetectorHarris<float, float>;
00161
00162 // fill in instances as required
00163 #ifdef BUILD_IMAGE_INT
00164 template class CornerDetectorHarris<unsigned char, int>;
00165 #endif
00166 #ifdef BUILD_IMAGE_CHAR
00167 template class CornerDetectorHarris<unsigned char, char>;
00168 #endif
00169 #ifdef BUILD_IMAGE_SHORT
00170 #endif
00171 #ifdef BUILD_IMAGE_USHORT
00172 template class CornerDetectorHarris<unsigned short, float>;
00173 #ifdef BUILD_IMAGE_INT
00174 template class CornerDetectorHarris<unsigned short, int>;
00175 #endif
00176 #endif
00177 #ifdef BUILD_IMAGE_UINT
00178 #endif
00179 #ifdef BUILD_IMAGE_DOUBLE
00180 #endif
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorHarris.hh Source File

FeatureDetector

CornerDetectorHarris.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __CornerDetectorHarris_hh__
00026 #define __CornerDetectorHarris_hh__
00027
00028 #include "CornerDetectorGradient.hh"
00029
00030 namespace BIAS {
00031
00032   /** @class CornerDetectorHarris
00033       @ingroup g_feature
00034       @brief harris corner detector, detects grey value corners in images
00035       @bug CalculationType int does not work, use float
00036       @author koeser 09/2004 */
00037   template <class StorageType, class CalculationType>
00038   class BIASFeatureDetector_EXPORT CornerDetectorHarris
00039     : public CornerDetectorGradient<StorageType, CalculationType>
00040   {
00041   public:
00042     CornerDetectorHarris();
00043
00044     CornerDetectorHarris(Param& para, const std::string& postfix="");
00045
00046     CornerDetectorHarris(Param& para,
00047                          const int grp,const std::string& postfix);
00048
00049     ~CornerDetectorHarris();
00050
00051
00052   protected:
00053     /// weight of trace in harris approximation
00054     double *_Scale;
00055
00056     /** @brief Computes the Harris approximation of the smaller eigenvalue of
00057         the structure tensor over the image and stores it in _Cornerness.
00058
00059         c = det - scale * trace
00060         Also fills up _FeatList.
00061         @author koeser 09/2004
00062         @todo optimize for ROI usage */
00063     virtual int _ComputeCornerness(Image<CalculationType>& Cornerness);
00064
00065     void _AddParam(Param& para, const int grp, const std::string& postfix);
00066
00067   }; // class
00068
00069 } // namespace
00070
00071
00072 #endif // __CornerDetectorHarris_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorKLT.cpp Source File

FeatureDetector

CornerDetectorKLT.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "CornerDetectorKLT.hh"
00026 #include <Base/Image/ImageConvert.hh>
00027 #ifdef BIAS_DEBUG
00028 #include <Base/Image/ImageIO.hh>
00029 #endif
00030
00031   //#define TIME_MEASURE
00032
00033 #include <Base/Debug/TimeMeasure.hh>
00034
00035 #include <limits.h>
00036 #include <algorithm>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 //////////////////////////////////////////////////////////////////////////
00042 //                 implementation
00043 //////////////////////////////////////////////////////////////////////////
00044
00045
00046 template <class StorageType, class CalculationType>
00047 CornerDetectorKLT<StorageType, CalculationType>::
00048 CornerDetectorKLT()
00049   : CornerDetectorGradient<StorageType, CalculationType>()
00050
00051 {
00052 }
00053
00054 template <class StorageType, class CalculationType>
00055 CornerDetectorKLT<StorageType, CalculationType>::
00056 CornerDetectorKLT(Param& para, const std::string& postfix)
00057   : CornerDetectorGradient<StorageType, CalculationType>(para, postfix)
00058
00059 {
00060   //  int grp=para.GetFreeGroupID();
00061   //_AddParam(para, grp, "-CornerDetectorKLT"+postfix);
00062   //if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "CornerDetectorKLT");
00063 }
00064
00065 template <class StorageType, class CalculationType>
00066 CornerDetectorKLT<StorageType, CalculationType>::
00067 CornerDetectorKLT(Param& para, const int grp, const std::string& postfix)
00068 : CornerDetectorGradient<StorageType,CalculationType>(para, grp, postfix)
00069
00070 {
00071   //  _AddParam(para, grp, postfix+"-CornerDetectorKLT");
00072 }
00073
00074 template <class StorageType, class CalculationType>
00075 CornerDetectorKLT<StorageType, CalculationType>::~CornerDetectorKLT()
00076 {}
00077
00078
00079
00080 //////////////////////////////////////////////////////////////////////////////
00081 //                      protected functions
00082 //////////////////////////////////////////////////////////////////////////////
00083
00084
00085 template <class StorageType, class CalculationType>
00086 int CornerDetectorKLT<StorageType, CalculationType>::
00087 _ComputeCornerness(Image<CalculationType>& mineig)
00088 {
00089 #ifdef BIAS_DEBUG
00090   // _FeatureMap is only allocated when this->_Cornerness is allocated
00091   BIASASSERT(this->_Cornerness.SamePixelAndChannelCount(this->_sgxx));
00092   BIASASSERT(this->_Cornerness.SamePixelAndChannelCount(mineig));
00093 #endif
00094   int tlx, tly, brx, bry;
00095   this->_sgxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00096   mineig.GetROI()->SetCorners(tlx, tly, brx, bry);
00097   const int minx=tlx;
00098   const int miny=tly;
00099   const int maxx=brx;
00100   const int maxy=bry;
00101
00102   register int x, y;
00103   register double gxx, gyy, gxy, ev;
00104   register const double me=(double)*this->_MinCornerness;
00105   Feat fp; this->_FeatList.clear();
00106   this->_FeatList.reserve((brx-tlx)*(bry-tly));
00107   register CalculationType **ime=mineig.GetImageDataArray();
00108   register CalculationType **isgxx=this->_sgxx.GetImageDataArray();
00109   register CalculationType **isgxy=this->_sgxy.GetImageDataArray();
00110   register CalculationType **isgyy=this->_sgyy.GetImageDataArray();
00111
00112
00113   for (y=miny; y<maxy; y++){
00114     for (x=minx; x<maxx; x++){
00115       gxx=(double)(isgxx[y][x]);
00116       gyy=(double)isgyy[y][x];
00117       gxy=(double)isgxy[y][x];
00118       ev=((gxx+gyy- sqrt((gxx - gyy)*(gxx - gyy)+4.0*gxy*gxy))/2.0);
00119       //      cerr << ev<<"\t"<<gxx<<"\t"<<gxy<<"\t"<<gyy<<endl;
00120       ime[y][x]=(CalculationType)(ev);
00121       if (ev>me){
00122         fp.x=x;
00123         fp.y=y;
00124         fp.val=(ev>(double)INT_MAX)?(INT_MAX):((int)ev);
00125         this->_FeatList.push_back(fp);
00126       }
00127       /*
00128 #ifdef BIAS_DEBUG
00129       if (DebugLevelIsSet(D_CD_FEATURES) && y<miny+2 && x<minx+2){
00130         cerr << "( "<<x<<", "<<y<<") gxx "<<gxx<<"  gxy "<<gxy<<"  gyy "<<gyy
00131              << "  mineig "<<_Cornerness[y][x]<<endl;
00132       }
00133 #endif
00134       */
00135     }
00136   }
00137 #ifdef BIAS_DEBUG
00138   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00139     ImageIO::Write("mineig.mip", mineig);
00140   }
00141 #endif
00142   return 0;
00143 }
00144
00145 //////////////////////////////////////////////////////////////////////////
00146 //                 instantiation
00147 //////////////////////////////////////////////////////////////////////////
00148
00149 template class CornerDetectorKLT<unsigned char, float>;
00150 template class CornerDetectorKLT<float, float>;
00151
00152 // fill in instances as required
00153 #ifdef BUILD_IMAGE_INT
00154 template class CornerDetectorKLT<unsigned char, int>;
00155 #endif
00156 #ifdef BUILD_IMAGE_CHAR
00157 template class CornerDetectorKLT<unsigned char, char>;
00158 #endif
00159 #ifdef BUILD_IMAGE_SHORT
00160 #endif
00161 #ifdef BUILD_IMAGE_USHORT
00162 template class CornerDetectorKLT<unsigned short, float>;
00163 #ifdef BUILD_IMAGE_INT
00164 template class CornerDetectorKLT<unsigned short, int>;
00165 #endif
00166 #endif
00167 #ifdef BUILD_IMAGE_UINT
00168 #endif
00169 #ifdef BUILD_IMAGE_DOUBLE
00170 #endif
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorKLT.hh Source File

FeatureDetector

CornerDetectorKLT.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CornerDetectorKLT_hh__
00027 #define __CornerDetectorKLT_hh__
00028
00029 #include "CornerDetectorGradient.hh"
00030
00031
00032 namespace BIAS {
00033
00034
00035
00036   /** @class CornerDetectorKLT
00037       @ingroup g_feature
00038       @brief computes the cornerness as the smaller eigenvalue of the
00039              structure tensor matrix
00040       @author woelk 09/2004 */
00041
00042   template <class StorageType, class CalculationType>
00043   class BIASFeatureDetector_EXPORT CornerDetectorKLT
00044     : public CornerDetectorGradient<StorageType, CalculationType>
00045   {
00046   public:
00047     CornerDetectorKLT();
00048
00049     CornerDetectorKLT(Param& para, const std::string& postfix="");
00050
00051     CornerDetectorKLT(Param& para, const int grp, const std::string& postfix);
00052
00053     virtual ~CornerDetectorKLT();
00054
00055   protected:
00056     /** @brief Computes the smaller eigenvalue of the structure tensor _sgxx,
00057         _sgyy, _sgxy over the image and stores it in _Cornerness.
00058         Also fills up _FeatList.
00059         @author woelk 09/2004 */
00060     virtual int _ComputeCornerness(Image<CalculationType>& mineig);
00061
00062   }; // class
00063
00064 } // namespace
00065
00066 #endif // __CornerDetectorKLT_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorSusan.cpp Source File

FeatureDetector

CornerDetectorSusan.cpp

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /* {{{ Copyright etc. */
00010
00011 /**********************************************************************\
00012
00013   SUSAN Version 2l by Stephen Smith
00014   Oxford Centre for Functional Magnetic Resonance Imaging of the Brain,
00015   Department of Clinical Neurology, Oxford University, Oxford, UK
00016   (Previously in Computer Vision and Image Processing Group - now
00017   Computer Vision and Electro Optics Group - DERA Chertsey, UK)
00018   Email:    steve@fmrib.ox.ac.uk
00019   WWW:      http://www.fmrib.ox.ac.uk/~steve
00020
00021   (C) Crown Copyright (1995-1999), Defence Evaluation and Research Agency,
00022   Farnborough, Hampshire, GU14 6TD, UK
00023   DERA WWW site:
00024   http://www.dera.gov.uk/
00025   DERA Computer Vision and Electro Optics Group WWW site:
00026   http://www.dera.gov.uk/imageprocessing/dera/group_home.html
00027   DERA Computer Vision and Electro Optics Group point of contact:
00028   Dr. John Savage, jtsavage@dera.gov.uk, +44 1344 633203
00029
00030   A UK patent has been granted: "Method for digitally processing
00031   images to determine the position of edges and/or corners therein for
00032   guidance of unmanned vehicle", UK Patent 2272285. Proprietor:
00033   Secretary of State for Defence, UK. 15 January 1997
00034
00035   This code is issued for research purposes only and remains the
00036   property of the UK Secretary of State for Defence. This code must
00037   not be passed on without this header information being kept
00038   intact. This code must not be sold.
00039
00040 \**********************************************************************/
00041
00042 /* }}} */
00043 /* {{{ Readme First */
00044
00045 /**********************************************************************\
00046
00047   SUSAN Version 2l
00048   SUSAN = Smallest Univalue Segment Assimilating Nucleus
00049
00050   Email:    steve@fmrib.ox.ac.uk
00051   WWW:      http://www.fmrib.ox.ac.uk/~steve
00052
00053   Related paper:
00054   @article{Smith97,
00055         author = "Smith, S.M. and Brady, J.M.",
00056         title = "{SUSAN} - A New Approach to Low Level Image Processing",
00057         journal = "Int. Journal of Computer Vision",
00058         pages = "45--78",
00059         volume = "23",
00060         number = "1",
00061         month = "May",
00062         year = 1997}
00063
00064   To be registered for automatic (bug) updates of SUSAN, send an email.
00065
00066   Compile with:
00067   gcc -O4 -o susan susan2l.c -lm
00068
00069   See following section for different machine information. Please
00070   report any bugs (and fixes). There are a few optional changes that
00071   can be made in the "defines" section which follows shortly.
00072
00073   Usage: type "susan" to get usage. Only PGM format files can be input
00074   and output. Utilities such as the netpbm package and XV can be used
00075   to convert to and from other formats. Any size of image can be
00076   processed.
00077
00078   This code is written using an emacs folding mode, making moving
00079   around the different sections very easy. This is why there are
00080   various marks within comments and why comments are indented.
00081
00082
00083   SUSAN QUICK:
00084
00085   This version of the SUSAN corner finder does not do all the
00086   false-corner suppression and thus is faster and produced some false
00087   positives, particularly on strong edges. However, because there are
00088   less stages involving thresholds etc., the corners that are
00089   correctly reported are usually more stable than those reported with
00090   the full algorithm. Thus I recommend at least TRYING this algorithm
00091   for applications where stability is important, e.g., tracking.
00092
00093   THRESHOLDS:
00094
00095   There are two thresholds which can be set at run-time. These are the
00096   brightness threshold (t) and the distance threshold (d).
00097
00098   SPATIAL CONTROL: d
00099
00100   In SUSAN smoothing d controls the size of the Gaussian mask; its
00101   default is 4.0. Increasing d gives more smoothing. In edge finding,
00102   a fixed flat mask is used, either 37 pixels arranged in a "circle"
00103   (default), or a 3 by 3 mask which gives finer detail. In corner
00104   finding, only the larger 37 pixel mask is used; d is not
00105   variable. In smoothing, the flat 3 by 3 mask can be used instead of
00106   a larger Gaussian mask; this gives low smoothing and fast operation.
00107
00108   BRIGHTNESS CONTROL: t
00109
00110   In all three algorithms, t can be varied (default=20); this is the
00111   main threshold to be varied. It determines the maximum difference in
00112   greylevels between two pixels which allows them to be considered
00113   part of the same "region" in the image. Thus it can be reduced to
00114   give more edges or corners, i.e. to be more sensitive, and vice
00115   versa. In smoothing, reducing t gives less smoothing, and vice
00116   versa. Set t=10 for the test image available from the SUSAN web
00117   page.
00118
00119   ITERATIONS:
00120
00121   With SUSAN smoothing, more smoothing can also be obtained by
00122   iterating the algorithm several times. This has a different effect
00123   from varying d or t.
00124
00125   FIXED MASKS:
00126
00127   37 pixel mask:    ooo       3 by 3 mask:  ooo
00128                    ooooo                    ooo
00129                   ooooooo                   ooo
00130                   ooooooo
00131                   ooooooo
00132                    ooooo
00133                     ooo
00134
00135   CORNER ATTRIBUTES dx, dy and I
00136   (Only read this if you are interested in the C implementation or in
00137   using corner attributes, e.g., for corner matching)
00138
00139   Corners reported in the corner list have attributes associated with
00140   them as well as positions. This is useful, for example, when
00141   attempting to match corners from one image to another, as these
00142   attributes can often be fairly unchanged between images. The
00143   attributes are dx, dy and I. I is the value of image brightness at
00144   the position of the corner. In the case of susan_corners_quick, dx
00145   and dy are the first order derivatives (differentials) of the image
00146   brightness in the x and y directions respectively, at the position
00147   of the corner. In the case of normal susan corner finding, dx and dy
00148   are scaled versions of the position of the centre of gravity of the
00149   USAN with respect to the centre pixel (nucleus).
00150
00151   BRIGHTNESS FUNCTION LUT IMPLEMENTATION:
00152   (Only read this if you are interested in the C implementation)
00153
00154   The SUSAN brightness function is implemented as a LUT
00155   (Look-Up-Table) for speed. The resulting pointer-based code is a
00156   little hard to follow, so here is a brief explanation. In
00157   setup_brightness_lut() the LUT is setup. This mallocs enough space
00158   for *bp and then repositions the pointer to the centre of the
00159   malloced space. The SUSAN function e^-(x^6) or e^-(x^2) is
00160   calculated and converted to a uchar in the range 0-100, for all
00161   possible image brightness differences (including negative
00162   ones). Thus bp[23] is the output for a brightness difference of 23
00163   greylevels. In the SUSAN algorithms this LUT is used as follows:
00164
00165   p=in + (i-3)*x_size + j - 1;
00166   p points to the first image pixel in the circular mask surrounding
00167   point (x,y).
00168
00169   cp=bp + in[i*x_size+j];
00170   cp points to a position in the LUT corresponding to the brightness
00171   of the centre pixel (x,y).
00172
00173   now for every pixel within the mask surrounding (x,y),
00174   n+=*(cp-*p++);
00175   the brightness difference function is found by moving the cp pointer
00176   down by an amount equal to the value of the pixel pointed to by p,
00177   thus subtracting the two brightness values and performing the
00178   exponential function. This value is added to n, the running USAN
00179   area.
00180
00181   in SUSAN smoothing, the variable height mask is implemented by
00182   multiplying the above by the moving mask pointer, reset for each new
00183   centre pixel.
00184   tmp = *dpt++ * *(cp-brightness);
00185
00186 \**********************************************************************/
00187
00188 /* }}} */
00189
00190 #include "CornerDetectorSusan.hh"
00191
00192 #define  FTOI(a) ( (a) < 0 ? ((int)(a-0.5)) : ((int)(a+0.5)) )
00193
00194
00195
00196 using namespace BIAS;
00197 using namespace std;
00198
00199 //////////////////////////////////////////////////////////////////////////
00200 //                 implementation
00201 //////////////////////////////////////////////////////////////////////////
00202
00203
00204 template <class StorageType>
00205 CornerDetectorSusan<StorageType>::
00206 CornerDetectorSusan()
00207   :   CornerDetectorBase<StorageType>()
00208 {
00209   _cgx=_cgy=_r=NULL;
00210   _bp=NULL;
00211   _susansize=_susanthresh=0;
00212   _Threshold=new int;
00213   *_Threshold = DEFAULT_THRESH;
00214   _Quick= new bool;
00215   *  _Quick= DEFAULT_QUICK;
00216   if (this->_MaxNum!=NULL) *this->_MaxNum = 1850;
00217   this->ParamsAllocated_ = true;
00218 }
00219
00220 template <class StorageType>
00221 CornerDetectorSusan<StorageType>::
00222 CornerDetectorSusan(Param& para, const std::string& postfix)
00223   :   CornerDetectorBase<StorageType>(para, postfix)
00224 {
00225   this->ParamsAllocated_ = false;
00226   _cgx=_cgy=_r=NULL;
00227   _bp=NULL;
00228   _susansize=_susanthresh=0;
00229   int grp=para.GetFreeGroupID();
00230   _AddParameter(para, grp, "-CornerDetectorSusan"+postfix);
00231   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "CornerDetectorSusan");
00232 }
00233
00234 template <class StorageType>
00235 CornerDetectorSusan<StorageType>::
00236 CornerDetectorSusan(Param& para, const int grp, const std::string& postfix)
00237   : CornerDetectorBase<StorageType>(para, grp, postfix)
00238 {
00239   this->ParamsAllocated_ = false;
00240   _cgx=_cgy=_r=NULL;
00241   _bp=NULL;
00242   _susansize=_susanthresh=0;
00243   _AddParameter(para, grp, "-CornerDetectorSusan"+postfix);
00244 }
00245
00246 template <class StorageType>
00247 CornerDetectorSusan<StorageType>::~CornerDetectorSusan()
00248 {
00249  if (_cgx!=NULL) delete[] _cgx;
00250   if (_cgy!=NULL) delete[] _cgy;
00251   if (_r!=NULL) delete[] _r;
00252   if (_bp!=NULL) delete[] (_bp-258);
00253   if (this->ParamsAllocated_) {
00254     delete _Threshold;
00255     delete _Quick;
00256   }
00257 }
00258
00259 template <class StorageType>
00260 int CornerDetectorSusan<StorageType>::
00261 Detect(const Image<StorageType>& image, CORNER_LIST corner_list, int& num)
00262 {
00263 #ifdef BIAS_DEBUG
00264   if ( (image.GetChannelCount()!=1) || (image.IsEmpty()) ) {
00265     BIASERR("Susan: Can only detect corners on grey value images");
00266     return -1;
00267   }
00268 #endif
00269   int x_size = image.GetWidth();
00270   int y_size = image.GetHeight();
00271   if (_susansize<x_size*y_size) {
00272     _SusanReAllocMem(x_size, y_size);
00273   }
00274   StorageType *in = image.GetImageData();
00275
00276   if (_susanthresh!=*_Threshold)
00277     _setup_brightness_lut(*_Threshold, 6);
00278   if (*_Quick){
00279     num = _susan_corners_quick(in, _r, _bp, corner_list,
00280                                x_size, y_size);
00281   } else {
00282     num = _susan_corners(in, _r, _bp, corner_list, x_size,
00283                          y_size);
00284   }
00285   BIASDOUT(D_CD_SUSAN,"Susan found "<< num << " corners ");
00286   return (num>0)?0:-1;
00287 }
00288
00289 template <class StorageType>
00290 int CornerDetectorSusan<StorageType>::
00291 Detect(const Image<StorageType>& image, const Image<StorageType>& roi,
00292        CORNER_LIST corner_list, int& num)
00293 {
00294 #ifdef BIAS_DEBUG
00295   if ( (image.GetChannelCount()!=1) || (image.IsEmpty()) ) {
00296     BIASERR("Susan: Can only detect corners on grey value images");
00297     return -1;
00298   }
00299 #endif
00300   int x_size = image.GetWidth();
00301   int y_size = image.GetHeight();
00302   if (_susansize<x_size*y_size) {
00303     _SusanReAllocMem(x_size, y_size);
00304   }
00305   StorageType *in = image.GetImageData();
00306   StorageType *roid = roi.GetImageData();
00307
00308   if (_susanthresh!=*_Threshold)
00309     _setup_brightness_lut(*_Threshold, 6);
00310   if (*_Quick){
00311     num = _susan_corners_quick(in, _r, _bp, corner_list,
00312                                x_size, y_size);
00313   } else {
00314     num = _susan_corners(in, _r, _bp, corner_list, x_size,
00315                          y_size, roid);
00316   }
00317   BIASDOUT(D_CD_SUSAN,"Susan found "<< num << " corners ");
00318   return (num>0)?0:-1;
00319 }
00320
00321 template <class StorageType>
00322 int CornerDetectorSusan<StorageType>::
00323 Detect(const Image<StorageType>& image, vector<HomgPoint2D>& pvec,
00324        vector<float>& quality)
00325 {
00326 #ifdef BIAS_DEBUG
00327   if ( (image.GetChannelCount()!=1) || (image.IsEmpty()) ) {
00328     BIASERR("Susan: Can only detect corners on grey value images");
00329     return -1;
00330   }
00331 #endif
00332   int x_size = image.GetWidth();
00333   int y_size = image.GetHeight();
00334   if (_susansize<x_size*y_size) {
00335     _SusanReAllocMem(x_size, y_size);
00336   }
00337   StorageType *in = image.GetImageData();
00338
00339   HomgPoint2D p;
00340   int num;
00341
00342   pvec.clear();
00343   quality.clear();
00344
00345   CORNER_LIST corner_list;
00346
00347   if (_susanthresh!=*_Threshold)
00348     _setup_brightness_lut(*_Threshold, 6);
00349   if (*_Quick)
00350     num = _susan_corners_quick(in, _r, _bp, corner_list,
00351                                x_size, y_size);
00352   else
00353     num = _susan_corners(in, _r, _bp, corner_list,
00354                          x_size, y_size);
00355   int n=0;
00356   quality.resize(num+1);
00357   pvec.resize(num+1);
00358   while(corner_list[n].info != 7){
00359     pvec[n].Set((double)corner_list[n].x, (double)corner_list[n].y);
00360     n++;
00361     if (*_Quick){
00362       /*  In the case of susan_corners_quick, dx
00363           and dy are the first order derivatives (differentials) of the image
00364           brightness in the x and y directions respectively, at the position
00365           of the corner. */
00366       quality[n]=((float)fabs((float)corner_list[n].dx*corner_list[n].dy)
00367                   /65025.0f);
00368       //      cerr << (float)fabs(corner_list[n].dx*corner_list[n].dy)/65025.0 << endl;
00369     } else {
00370       /* In the case of normal susan corner finding, dx and dy
00371          are scaled versions of the position of the centre of gravity of the
00372          USAN with respect to the centre pixel (nucleus). */
00373       quality[n]=0.0;
00374       //cerr << corner_list[n].dx << " " << corner_list[n].dy << endl;
00375     }
00376   }
00377   BIASDOUT(D_CD_SUSAN,"Susan found "<< n << " corners ");
00378   return 0;
00379 }
00380
00381
00382
00383 template <class StorageType>
00384 void CornerDetectorSusan<StorageType>::
00385 _int_to_uchar(int *r, StorageType *in, int size)
00386 {
00387   int i,
00388     max_r=r[0],
00389     min_r=r[0];
00390
00391   for (i=0; i<size; i++)
00392     {
00393       if ( r[i] > max_r )
00394         max_r=r[i];
00395       if ( r[i] < min_r )
00396         min_r=r[i];
00397     }
00398
00399   /*printf("min=%d max=%d\n",min_r,max_r);*/
00400
00401   max_r-=min_r;
00402
00403   for (i=0; i<size; i++)
00404     in[i] = (StorageType)((int)((int)(r[i]-min_r)*255)/max_r);
00405 }
00406
00407
00408 template <class StorageType>
00409 void CornerDetectorSusan<StorageType>::
00410 _setup_brightness_lut(int thresh, int form)
00411 {
00412   int   k;
00413   float temp;
00414
00415   _susanthresh=thresh;
00416   if (_bp==NULL){
00417     _bp=new StorageType[516];
00418     _bp+=258;
00419   }
00420
00421
00422   for(k=-256;k<257;k++)
00423     {
00424       temp=((float)k)/((float)thresh);
00425       temp=temp*temp;
00426       if (form==6)
00427         temp=temp*temp*temp;
00428       temp=100.0f*exp(-temp);
00429       *(_bp+k)= (StorageType)temp;
00430     }
00431 }
00432
00433 template <class StorageType>
00434 int CornerDetectorSusan<StorageType>::
00435 _susan_corners(StorageType *in, int *r, StorageType *bp,
00436                CORNER_LIST corner_list, int x_size, int y_size)
00437 {
00438   const int max_no((*this->_MaxNum>0)? (*this->_MaxNum):INT_MAX);
00439   int   n,x,y,sq,xx,yy,
00440     i,j,*cgx,*cgy;
00441   float divide;
00442   StorageType c,*p,*cp;
00443
00444   memset (r,0,x_size * y_size * sizeof(int));
00445
00446   cgx=new int[x_size*y_size];
00447   cgy=new int[x_size*y_size];
00448
00449   for (i=5;i<y_size-5;i++)
00450     for (j=5;j<x_size-5;j++) {
00451       n=100;
00452       p=in + (i-3)*x_size + j - 1;
00453       cp=bp + in[i*x_size+j];
00454
00455       n+=*(cp-*p++);
00456       n+=*(cp-*p++);
00457       n+=*(cp-*p);
00458       p+=x_size-3;
00459
00460       n+=*(cp-*p++);
00461       n+=*(cp-*p++);
00462       n+=*(cp-*p++);
00463       n+=*(cp-*p++);
00464       n+=*(cp-*p);
00465       p+=x_size-5;
00466
00467       n+=*(cp-*p++);
00468       n+=*(cp-*p++);
00469       n+=*(cp-*p++);
00470       n+=*(cp-*p++);
00471       n+=*(cp-*p++);
00472       n+=*(cp-*p++);
00473       n+=*(cp-*p);
00474       p+=x_size-6;
00475
00476       n+=*(cp-*p++);
00477       n+=*(cp-*p++);
00478       n+=*(cp-*p);
00479       if (n<max_no){    /* do this test early and often ONLY to save wasted computation */
00480         p+=2;
00481         n+=*(cp-*p++);
00482     if (n<max_no){
00483       n+=*(cp-*p++);
00484       if (n<max_no){
00485         n+=*(cp-*p);
00486         if (n<max_no){
00487           p+=x_size-6;
00488
00489           n+=*(cp-*p++);
00490           if (n<max_no){
00491         n+=*(cp-*p++);
00492         if (n<max_no){
00493           n+=*(cp-*p++);
00494           if (n<max_no){
00495             n+=*(cp-*p++);
00496             if (n<max_no){
00497               n+=*(cp-*p++);
00498               if (n<max_no){
00499             n+=*(cp-*p++);
00500             if (n<max_no){
00501               n+=*(cp-*p);
00502               if (n<max_no){
00503                 p+=x_size-5;
00504
00505                 n+=*(cp-*p++);
00506                 if (n<max_no){
00507                   n+=*(cp-*p++);
00508                   if (n<max_no){
00509                 n+=*(cp-*p++);
00510                 if (n<max_no){
00511                   n+=*(cp-*p++);
00512                   if (n<max_no){
00513                     n+=*(cp-*p);
00514                     if (n<max_no){
00515                       p+=x_size-3;
00516
00517                       n+=*(cp-*p++);
00518                       if (n<max_no){
00519                     n+=*(cp-*p++);
00520                     if (n<max_no){
00521                       n+=*(cp-*p);
00522
00523                       if (n<max_no)
00524                         {
00525                           x=0;y=0;
00526                           p=in + (i-3)*x_size + j - 1;
00527
00528                           c=*(cp-*p++);x-=c;y-=3*c;
00529                           c=*(cp-*p++);y-=3*c;
00530                           c=*(cp-*p);x+=c;y-=3*c;
00531                           p+=x_size-3;
00532
00533                           c=*(cp-*p++);x-=2*c;y-=2*c;
00534                           c=*(cp-*p++);x-=c;y-=2*c;
00535                           c=*(cp-*p++);y-=2*c;
00536                           c=*(cp-*p++);x+=c;y-=2*c;
00537                           c=*(cp-*p);x+=2*c;y-=2*c;
00538                           p+=x_size-5;
00539
00540                           c=*(cp-*p++);x-=3*c;y-=c;
00541                           c=*(cp-*p++);x-=2*c;y-=c;
00542                           c=*(cp-*p++);x-=c;y-=c;
00543                           c=*(cp-*p++);y-=c;
00544                           c=*(cp-*p++);x+=c;y-=c;
00545                           c=*(cp-*p++);x+=2*c;y-=c;
00546                           c=*(cp-*p);x+=3*c;y-=c;
00547                           p+=x_size-6;
00548
00549                           c=*(cp-*p++);x-=3*c;
00550                           c=*(cp-*p++);x-=2*c;
00551                           c=*(cp-*p);x-=c;
00552                           p+=2;
00553                           c=*(cp-*p++);x+=c;
00554                           c=*(cp-*p++);x+=2*c;
00555                           c=*(cp-*p);x+=3*c;
00556                           p+=x_size-6;
00557
00558                           c=*(cp-*p++);x-=3*c;y+=c;
00559                           c=*(cp-*p++);x-=2*c;y+=c;
00560                           c=*(cp-*p++);x-=c;y+=c;
00561                           c=*(cp-*p++);y+=c;
00562                           c=*(cp-*p++);x+=c;y+=c;
00563                           c=*(cp-*p++);x+=2*c;y+=c;
00564                           c=*(cp-*p);x+=3*c;y+=c;
00565                           p+=x_size-5;
00566
00567                           c=*(cp-*p++);x-=2*c;y+=2*c;
00568                           c=*(cp-*p++);x-=c;y+=2*c;
00569                           c=*(cp-*p++);y+=2*c;
00570                           c=*(cp-*p++);x+=c;y+=2*c;
00571                           c=*(cp-*p);x+=2*c;y+=2*c;
00572                           p+=x_size-3;
00573
00574                           c=*(cp-*p++);x-=c;y+=3*c;
00575                           c=*(cp-*p++);y+=3*c;
00576                           c=*(cp-*p);x+=c;y+=3*c;
00577
00578                           xx=x*x;
00579                           yy=y*y;
00580                           sq=xx+yy;
00581                           if ( sq > ((n*n)/2) )
00582                         {
00583                           if(yy<xx) {
00584                             divide=(float)y/(float)abs(x);
00585                             sq=abs(x)/x;
00586                             sq=*(cp-in[(i+FTOI(divide))*x_size+j+sq]) +
00587                               *(cp-in[(i+FTOI(2*divide))*x_size+j+2*sq]) +
00588                               *(cp-in[(i+FTOI(3*divide))*x_size+j+3*sq]);}
00589                           else {
00590                             divide=(float)x/(float)abs(y);
00591                             sq=abs(y)/y;
00592                             sq=*(cp-in[(i+sq)*x_size+j+FTOI(divide)]) +
00593                               *(cp-in[(i+2*sq)*x_size+j+FTOI(2*divide)]) +
00594                               *(cp-in[(i+3*sq)*x_size+j+FTOI(3*divide)]);}
00595
00596                           if(sq>290){
00597                             r[i*x_size+j] = max_no-n;
00598                             cgx[i*x_size+j] = (51*x)/n;
00599                             cgy[i*x_size+j] = (51*y)/n;}
00600                         }
00601                         }
00602                     }}}}}}}}}}}}}}}}}}}
00603
00604   /* to locate the local maxima */
00605   n=0;
00606   for (i=5;i<y_size-5;i++)
00607     for (j=5;j<x_size-5;j++) {
00608       x = r[i*x_size+j];
00609       if (x>0)  {
00610     /* 5x5 mask */
00611 #ifdef FIVE_SUPP
00612     if (
00613         (x>r[(i-1)*x_size+j+2]) &&
00614         (x>r[(i  )*x_size+j+1]) &&
00615         (x>r[(i  )*x_size+j+2]) &&
00616         (x>r[(i+1)*x_size+j-1]) &&
00617         (x>r[(i+1)*x_size+j  ]) &&
00618         (x>r[(i+1)*x_size+j+1]) &&
00619         (x>r[(i+1)*x_size+j+2]) &&
00620         (x>r[(i+2)*x_size+j-2]) &&
00621         (x>r[(i+2)*x_size+j-1]) &&
00622         (x>r[(i+2)*x_size+j  ]) &&
00623         (x>r[(i+2)*x_size+j+1]) &&
00624         (x>r[(i+2)*x_size+j+2]) &&
00625         (x>=r[(i-2)*x_size+j-2]) &&
00626         (x>=r[(i-2)*x_size+j-1]) &&
00627         (x>=r[(i-2)*x_size+j  ]) &&
00628         (x>=r[(i-2)*x_size+j+1]) &&
00629         (x>=r[(i-2)*x_size+j+2]) &&
00630         (x>=r[(i-1)*x_size+j-2]) &&
00631         (x>=r[(i-1)*x_size+j-1]) &&
00632         (x>=r[(i-1)*x_size+j  ]) &&
00633         (x>=r[(i-1)*x_size+j+1]) &&
00634         (x>=r[(i  )*x_size+j-2]) &&
00635         (x>=r[(i  )*x_size+j-1]) &&
00636         (x>=r[(i+1)*x_size+j-2]) )
00637 #endif
00638 #ifdef SEVEN_SUPP
00639           if (
00640           (x>r[(i-3)*x_size+j-3]) &&
00641           (x>r[(i-3)*x_size+j-2]) &&
00642           (x>r[(i-3)*x_size+j-1]) &&
00643           (x>r[(i-3)*x_size+j  ]) &&
00644           (x>r[(i-3)*x_size+j+1]) &&
00645           (x>r[(i-3)*x_size+j+2]) &&
00646           (x>r[(i-3)*x_size+j+3]) &&
00647
00648           (x>r[(i-2)*x_size+j-3]) &&
00649           (x>r[(i-2)*x_size+j-2]) &&
00650           (x>r[(i-2)*x_size+j-1]) &&
00651           (x>r[(i-2)*x_size+j  ]) &&
00652           (x>r[(i-2)*x_size+j+1]) &&
00653           (x>r[(i-2)*x_size+j+2]) &&
00654           (x>r[(i-2)*x_size+j+3]) &&
00655
00656           (x>r[(i-1)*x_size+j-3]) &&
00657           (x>r[(i-1)*x_size+j-2]) &&
00658           (x>r[(i-1)*x_size+j-1]) &&
00659           (x>r[(i-1)*x_size+j  ]) &&
00660           (x>r[(i-1)*x_size+j+1]) &&
00661           (x>r[(i-1)*x_size+j+2]) &&
00662           (x>r[(i-1)*x_size+j+3]) &&
00663
00664           (x>r[(i)*x_size+j-3]) &&
00665           (x>r[(i)*x_size+j-2]) &&
00666           (x>r[(i)*x_size+j-1]) &&
00667           (x>=r[(i)*x_size+j+1]) &&
00668           (x>=r[(i)*x_size+j+2]) &&
00669           (x>=r[(i)*x_size+j+3]) &&
00670
00671           (x>=r[(i+1)*x_size+j-3]) &&
00672           (x>=r[(i+1)*x_size+j-2]) &&
00673           (x>=r[(i+1)*x_size+j-1]) &&
00674           (x>=r[(i+1)*x_size+j  ]) &&
00675           (x>=r[(i+1)*x_size+j+1]) &&
00676           (x>=r[(i+1)*x_size+j+2]) &&
00677           (x>=r[(i+1)*x_size+j+3]) &&
00678
00679           (x>=r[(i+2)*x_size+j-3]) &&
00680           (x>=r[(i+2)*x_size+j-2]) &&
00681           (x>=r[(i+2)*x_size+j-1]) &&
00682           (x>=r[(i+2)*x_size+j  ]) &&
00683           (x>=r[(i+2)*x_size+j+1]) &&
00684           (x>=r[(i+2)*x_size+j+2]) &&
00685           (x>=r[(i+2)*x_size+j+3]) &&
00686
00687           (x>=r[(i+3)*x_size+j-3]) &&
00688           (x>=r[(i+3)*x_size+j-2]) &&
00689           (x>=r[(i+3)*x_size+j-1]) &&
00690           (x>=r[(i+3)*x_size+j  ]) &&
00691           (x>=r[(i+3)*x_size+j+1]) &&
00692           (x>=r[(i+3)*x_size+j+2]) &&
00693           (x>=r[(i+3)*x_size+j+3]) )
00694 #endif
00695         {
00696           corner_list[n].info=0;
00697           corner_list[n].x=j;
00698           corner_list[n].y=i;
00699           corner_list[n].dx=cgx[i*x_size+j];
00700           corner_list[n].dy=cgy[i*x_size+j];
00701           corner_list[n].I=in[i*x_size+j];
00702           n++;
00703           if(n==MAX_CORNERS){
00704           BIASERR("Too many corners.\n");
00705           return n;
00706           }}}}
00707   corner_list[n].info=7;
00708
00709   delete[] cgx;
00710   delete[] cgy;
00711   return n;
00712 }
00713
00714 /* some modifications by woelk
00715    - added roi to avoid unnecessary computqations
00716    - introduced xj* to avoid unnecessary computations
00717    - introduced _cgx, _cgy and _susanwidth, _susanheight to avoid unnecessaity
00718        malloc/free */
00719 template <class StorageType>
00720 int CornerDetectorSusan<StorageType>::
00721 _susan_corners(StorageType *in, int *r, StorageType *bp,
00722                CORNER_LIST corner_list, int x_size, int y_size,
00723                StorageType *roi) {
00724   const int max_no((*this->_MaxNum>0)? (*this->_MaxNum):INT_MAX);
00725   int   n,x,y,sq,xx,yy,i,j;
00726   float divide;
00727   StorageType c, *p, *cp;
00728   int maxx=x_size-5, maxy=y_size-5;
00729
00730 #ifdef FIVE_SUPP
00731   int j1p, j1m, j2p, j2m, xi, xi1m, xi1p, xi2m, xi2p;
00732 #endif
00733 #ifdef SEVEN_SUPP
00734   int j1p, j1m, j2p, j2m, j3p, j3m, xi, xi1m, xi1p, xi2m, xi2p, xi3m, xi3p;
00735 #endif
00736
00737   memset (r,0,x_size * y_size * sizeof(int));
00738
00739
00740   if (_susansize<x_size*y_size){
00741     _SusanReAllocMem(x_size, y_size);
00742   }
00743
00744   for (i=5;i<maxy;i++)
00745     for (j=5;j<maxx;j++) {
00746       if (roi[i*x_size+j]!=0){
00747         n=100;
00748         p=in + (i-3)*x_size + j - 1;
00749         cp=bp + in[i*x_size+j];
00750
00751         n+=*(cp-*p++);
00752         n+=*(cp-*p++);
00753         n+=*(cp-*p);
00754         p+=x_size-3;
00755
00756         n+=*(cp-*p++);
00757         n+=*(cp-*p++);
00758         n+=*(cp-*p++);
00759         n+=*(cp-*p++);
00760         n+=*(cp-*p);
00761         p+=x_size-5;
00762
00763         n+=*(cp-*p++);
00764         n+=*(cp-*p++);
00765         n+=*(cp-*p++);
00766         n+=*(cp-*p++);
00767         n+=*(cp-*p++);
00768         n+=*(cp-*p++);
00769         n+=*(cp-*p);
00770         p+=x_size-6;
00771
00772         n+=*(cp-*p++);
00773         n+=*(cp-*p++);
00774         n+=*(cp-*p);
00775         if (n<max_no){    /* do this test early and often ONLY to save wasted computation */
00776           p+=2;
00777           n+=*(cp-*p++);
00778           if (n<max_no){
00779             n+=*(cp-*p++);
00780             if (n<max_no){
00781               n+=*(cp-*p);
00782               if (n<max_no){
00783                 p+=x_size-6;
00784
00785                 n+=*(cp-*p++);
00786                 if (n<max_no){
00787                   n+=*(cp-*p++);
00788                   if (n<max_no){
00789                     n+=*(cp-*p++);
00790                     if (n<max_no){
00791                       n+=*(cp-*p++);
00792                       if (n<max_no){
00793                         n+=*(cp-*p++);
00794                         if (n<max_no){
00795                           n+=*(cp-*p++);
00796                           if (n<max_no){
00797                             n+=*(cp-*p);
00798                             if (n<max_no){
00799                               p+=x_size-5;
00800
00801                               n+=*(cp-*p++);
00802                               if (n<max_no){
00803                                 n+=*(cp-*p++);
00804                                 if (n<max_no){
00805                                   n+=*(cp-*p++);
00806                                   if (n<max_no){
00807                                     n+=*(cp-*p++);
00808                                     if (n<max_no){
00809                                       n+=*(cp-*p);
00810                                       if (n<max_no){
00811                                         p+=x_size-3;
00812
00813                                         n+=*(cp-*p++);
00814                                         if (n<max_no){
00815                                           n+=*(cp-*p++);
00816                                           if (n<max_no){
00817                                             n+=*(cp-*p);
00818
00819                                             if (n<max_no)
00820                                               {
00821                                                 x=0;y=0;
00822                                                 p=in + (i-3)*x_size + j - 1;
00823
00824                                                 c=*(cp-*p++);x-=c;y-=3*c;
00825                                                 c=*(cp-*p++);y-=3*c;
00826                                                 c=*(cp-*p);x+=c;y-=3*c;
00827                                                 p+=x_size-3;
00828
00829                                                 c=*(cp-*p++);x-=2*c;y-=2*c;
00830                                                 c=*(cp-*p++);x-=c;y-=2*c;
00831                                                 c=*(cp-*p++);y-=2*c;
00832                                                 c=*(cp-*p++);x+=c;y-=2*c;
00833                                                 c=*(cp-*p);x+=2*c;y-=2*c;
00834                                                 p+=x_size-5;
00835
00836                                                 c=*(cp-*p++);x-=3*c;y-=c;
00837                                                 c=*(cp-*p++);x-=2*c;y-=c;
00838                                                 c=*(cp-*p++);x-=c;y-=c;
00839                                                 c=*(cp-*p++);y-=c;
00840                                                 c=*(cp-*p++);x+=c;y-=c;
00841                                                 c=*(cp-*p++);x+=2*c;y-=c;
00842                                                 c=*(cp-*p);x+=3*c;y-=c;
00843                                                 p+=x_size-6;
00844
00845                                                 c=*(cp-*p++);x-=3*c;
00846                                                 c=*(cp-*p++);x-=2*c;
00847                                                 c=*(cp-*p);x-=c;
00848                                                 p+=2;
00849                                                 c=*(cp-*p++);x+=c;
00850                                                 c=*(cp-*p++);x+=2*c;
00851                                                 c=*(cp-*p);x+=3*c;
00852                                                 p+=x_size-6;
00853
00854                                                 c=*(cp-*p++);x-=3*c;y+=c;
00855                                                 c=*(cp-*p++);x-=2*c;y+=c;
00856                                                 c=*(cp-*p++);x-=c;y+=c;
00857                                                 c=*(cp-*p++);y+=c;
00858                                                 c=*(cp-*p++);x+=c;y+=c;
00859                                                 c=*(cp-*p++);x+=2*c;y+=c;
00860                                                 c=*(cp-*p);x+=3*c;y+=c;
00861                                                 p+=x_size-5;
00862
00863                                                 c=*(cp-*p++);x-=2*c;y+=2*c;
00864                                                 c=*(cp-*p++);x-=c;y+=2*c;
00865                                                 c=*(cp-*p++);y+=2*c;
00866                                                 c=*(cp-*p++);x+=c;y+=2*c;
00867                                                 c=*(cp-*p);x+=2*c;y+=2*c;
00868                                                 p+=x_size-3;
00869
00870                                                 c=*(cp-*p++);x-=c;y+=3*c;
00871                                                 c=*(cp-*p++);y+=3*c;
00872                                                 c=*(cp-*p);x+=c;y+=3*c;
00873
00874                                                 xx=x*x;
00875                                                 yy=y*y;
00876                                                 sq=xx+yy;
00877                                                 if ( sq > ((n*n)/2) ){
00878                                                   if(yy<xx) {
00879                                                     divide=(float)y/(float)abs(x);
00880                                                     sq=abs(x)/x;
00881                                                     sq=*(cp-in[(i+FTOI(divide))*x_size+j+sq]) +
00882                                                       *(cp-in[(i+FTOI(2*divide))*x_size+j+2*sq]) +
00883                                                       *(cp-in[(i+FTOI(3*divide))*x_size+j+3*sq]);}
00884                                                   else {
00885                                                     divide=(float)x/(float)abs(y);
00886                                                     sq=abs(y)/y;
00887                                                     sq=*(cp-in[(i+sq)*x_size+j+FTOI(divide)]) +
00888                                                       *(cp-in[(i+2*sq)*x_size+j+FTOI(2*divide)]) +
00889                                                       *(cp-in[(i+3*sq)*x_size+j+FTOI(3*divide)]);}
00890
00891                                                   if(sq>290){
00892                                                     r[i*x_size+j] = max_no-n;
00893                                                     _cgx[i*x_size+j] = (51*x)/n;
00894                                                     _cgy[i*x_size+j] = (51*y)/n;}
00895                                                 }
00896                                               }
00897                                           }}}}}}}}}}}}}}}}}}}}
00898
00899   /* to locate the local maxima */
00900   n=0;
00901   for (i=5;i<maxy;i++)
00902     for (j=5;j<maxx;j++) {
00903       x = r[i*x_size+j];
00904       if (x>0)  {
00905         j1p=j+1;
00906         j2p=j+2;
00907         j1m=j-1;
00908         j2m=j-2;
00909         xi=i*x_size;
00910         xi1m=(i-1)*x_size;
00911         xi1p=(i+1)*x_size;
00912         xi2m=(i-2)*x_size;
00913         xi2p=(i+2)*x_size;
00914         /* 5x5 mask */
00915 #ifdef FIVE_SUPP
00916         if (
00917             (x>r[xi1m+j2p]) &&
00918             (x>r[xi+j1p]) &&
00919             (x>r[xi+j2p]) &&
00920             (x>r[xi1p+j1m]) &&
00921             (x>r[xi1p+j  ]) &&
00922             (x>r[xi1p+j1p]) &&
00923             (x>r[xi1p+j2p]) &&
00924             (x>r[xi2p+j2m]) &&
00925             (x>r[xi2p+j1m]) &&
00926             (x>r[xi2p+j  ]) &&
00927             (x>r[xi2p+j1p]) &&
00928             (x>r[xi2p+j2p]) &&
00929             (x>=r[xi2m+j2m]) &&
00930             (x>=r[xi2m+j1m]) &&
00931             (x>=r[xi2m+j  ]) &&
00932             (x>=r[xi2m+j1p]) &&
00933             (x>=r[xi2m+j2p]) &&
00934             (x>=r[xi1m+j2m]) &&
00935             (x>=r[xi1m+j1m]) &&
00936             (x>=r[xi1m+j  ]) &&
00937             (x>=r[xi1m+j1p]) &&
00938             (x>=r[xi+j2m]) &&
00939             (x>=r[xi+j1m]) &&
00940             (x>=r[xi1p+j2m]) )
00941 #endif
00942 #ifdef SEVEN_SUPP
00943         j3p=j+3;
00944         j3m=j-3;
00945         xi3m=(i-3)*x_size;
00946         xi3p=(i+3)*x_size;
00947         if (
00948             (x>r[xi3m+j3m]) &&
00949             (x>r[xi3m+j2m]) &&
00950             (x>r[xi3m+j1m]) &&
00951             (x>r[xi3m+j  ]) &&
00952             (x>r[xi3m+j1p]) &&
00953             (x>r[xi3m+j2p]) &&
00954             (x>r[xi3m+j3p]) &&
00955
00956             (x>r[xi2m+j3m]) &&
00957             (x>r[xi2m+j2m]) &&
00958             (x>r[xi2m+j1m]) &&
00959             (x>r[xi2m+j  ]) &&
00960             (x>r[xi2m+j1p]) &&
00961             (x>r[xi2m+j2p]) &&
00962             (x>r[xi2m+j3p]) &&
00963
00964             (x>r[xi1m+j3m]) &&
00965             (x>r[xi1m+j2m]) &&
00966             (x>r[xi1m+j1m]) &&
00967             (x>r[xi1m+j  ]) &&
00968             (x>r[xi1m+j1p]) &&
00969             (x>r[xi1m+j2p]) &&
00970             (x>r[xi1m+j3p]) &&
00971
00972             (x>r[xi+j3m]) &&
00973             (x>r[xi+j2m]) &&
00974             (x>r[xi+j1m]) &&
00975             (x>=r[xi+j1p]) &&
00976             (x>=r[xi+j2p]) &&
00977             (x>=r[xi+j3p]) &&
00978
00979             (x>=r[xi1p+j3m]) &&
00980             (x>=r[xi1p+j2m]) &&
00981             (x>=r[xi1p+j1m]) &&
00982             (x>=r[xi1p+j  ]) &&
00983             (x>=r[xi1p+j1p]) &&
00984             (x>=r[xi1p+j2p]) &&
00985             (x>=r[xi1p+j3p]) &&
00986
00987             (x>=r[xi2p+j3m]) &&
00988             (x>=r[xi2p+j2m]) &&
00989             (x>=r[xi2p+j1m]) &&
00990             (x>=r[xi2p+j  ]) &&
00991             (x>=r[xi2p+j1p]) &&
00992             (x>=r[xi2p+j2p]) &&
00993             (x>=r[xi2p+j3p]) &&
00994
00995             (x>=r[xi3p+j3m]) &&
00996             (x>=r[xi3p+j2m]) &&
00997             (x>=r[xi3p+j1m]) &&
00998             (x>=r[xi3p+j  ]) &&
00999             (x>=r[xi3p+j1p]) &&
01000             (x>=r[xi3p+j2p]) &&
01001             (x>=r[xi3p+j3p]) )
01002 #endif
01003           {
01004             corner_list[n].info=0;
01005             corner_list[n].x=j;
01006             corner_list[n].y=i;
01007             corner_list[n].dx=_cgx[i*x_size+j];
01008             corner_list[n].dy=_cgy[i*x_size+j];
01009             corner_list[n].I=in[i*x_size+j];
01010             n++;
01011             if(n==MAX_CORNERS){
01012               BIASERR("Too many corners.\n");
01013               return n;
01014             }}}}
01015   corner_list[n].info=7;
01016
01017   return n;
01018 }
01019
01020 template <class StorageType>
01021 int CornerDetectorSusan<StorageType>::
01022 _susan_corners_quick(StorageType *in, int *r, StorageType *bp,
01023                      CORNER_LIST corner_list, int x_size, int y_size)
01024 {
01025   const int max_no((*this->_MaxNum>0)? (*this->_MaxNum):INT_MAX);
01026   int   n,x,y,i,j;
01027   StorageType *p, *cp;
01028
01029   memset (r,0,x_size * y_size * sizeof(int));
01030
01031   for (i=7;i<y_size-7;i++)
01032     for (j=7;j<x_size-7;j++) {
01033       n=100;
01034       p=in + (i-3)*x_size + j - 1;
01035       cp=bp + in[i*x_size+j];
01036
01037       n+=*(cp-*p++);
01038       n+=*(cp-*p++);
01039       n+=*(cp-*p);
01040       p+=x_size-3;
01041
01042       n+=*(cp-*p++);
01043       n+=*(cp-*p++);
01044       n+=*(cp-*p++);
01045       n+=*(cp-*p++);
01046       n+=*(cp-*p);
01047       p+=x_size-5;
01048
01049       n+=*(cp-*p++);
01050       n+=*(cp-*p++);
01051       n+=*(cp-*p++);
01052       n+=*(cp-*p++);
01053       n+=*(cp-*p++);
01054       n+=*(cp-*p++);
01055       n+=*(cp-*p);
01056       p+=x_size-6;
01057
01058       n+=*(cp-*p++);
01059       n+=*(cp-*p++);
01060       n+=*(cp-*p);
01061       if (n<max_no){
01062         p+=2;
01063         n+=*(cp-*p++);
01064     if (n<max_no){
01065       n+=*(cp-*p++);
01066       if (n<max_no){
01067         n+=*(cp-*p);
01068         if (n<max_no){
01069           p+=x_size-6;
01070
01071           n+=*(cp-*p++);
01072           if (n<max_no){
01073         n+=*(cp-*p++);
01074         if (n<max_no){
01075           n+=*(cp-*p++);
01076           if (n<max_no){
01077             n+=*(cp-*p++);
01078             if (n<max_no){
01079               n+=*(cp-*p++);
01080               if (n<max_no){
01081             n+=*(cp-*p++);
01082             if (n<max_no){
01083               n+=*(cp-*p);
01084               if (n<max_no){
01085                 p+=x_size-5;
01086
01087                 n+=*(cp-*p++);
01088                 if (n<max_no){
01089                   n+=*(cp-*p++);
01090                   if (n<max_no){
01091                 n+=*(cp-*p++);
01092                 if (n<max_no){
01093                   n+=*(cp-*p++);
01094                   if (n<max_no){
01095                     n+=*(cp-*p);
01096                     if (n<max_no){
01097                       p+=x_size-3;
01098
01099                       n+=*(cp-*p++);
01100                       if (n<max_no){
01101                     n+=*(cp-*p++);
01102                     if (n<max_no){
01103                       n+=*(cp-*p);
01104
01105                       if (n<max_no)
01106                         r[i*x_size+j] = max_no-n;
01107                     }}}}}}}}}}}}}}}}}}}
01108
01109   /* to locate the local maxima */
01110   n=0;
01111   for (i=7;i<y_size-7;i++)
01112     for (j=7;j<x_size-7;j++) {
01113       x = r[i*x_size+j];
01114       if (x>0)  {
01115     /* 5x5 mask */
01116 #ifdef FIVE_SUPP
01117     if (
01118         (x>r[(i-1)*x_size+j+2]) &&
01119         (x>r[(i  )*x_size+j+1]) &&
01120         (x>r[(i  )*x_size+j+2]) &&
01121         (x>r[(i+1)*x_size+j-1]) &&
01122         (x>r[(i+1)*x_size+j  ]) &&
01123         (x>r[(i+1)*x_size+j+1]) &&
01124         (x>r[(i+1)*x_size+j+2]) &&
01125         (x>r[(i+2)*x_size+j-2]) &&
01126         (x>r[(i+2)*x_size+j-1]) &&
01127         (x>r[(i+2)*x_size+j  ]) &&
01128         (x>r[(i+2)*x_size+j+1]) &&
01129         (x>r[(i+2)*x_size+j+2]) &&
01130         (x>=r[(i-2)*x_size+j-2]) &&
01131         (x>=r[(i-2)*x_size+j-1]) &&
01132         (x>=r[(i-2)*x_size+j  ]) &&
01133         (x>=r[(i-2)*x_size+j+1]) &&
01134         (x>=r[(i-2)*x_size+j+2]) &&
01135         (x>=r[(i-1)*x_size+j-2]) &&
01136         (x>=r[(i-1)*x_size+j-1]) &&
01137         (x>=r[(i-1)*x_size+j  ]) &&
01138         (x>=r[(i-1)*x_size+j+1]) &&
01139         (x>=r[(i  )*x_size+j-2]) &&
01140         (x>=r[(i  )*x_size+j-1]) &&
01141         (x>=r[(i+1)*x_size+j-2]) )
01142 #endif
01143 #ifdef SEVEN_SUPP
01144           if (
01145           (x>r[(i-3)*x_size+j-3]) &&
01146           (x>r[(i-3)*x_size+j-2]) &&
01147           (x>r[(i-3)*x_size+j-1]) &&
01148           (x>r[(i-3)*x_size+j  ]) &&
01149           (x>r[(i-3)*x_size+j+1]) &&
01150           (x>r[(i-3)*x_size+j+2]) &&
01151           (x>r[(i-3)*x_size+j+3]) &&
01152
01153           (x>r[(i-2)*x_size+j-3]) &&
01154           (x>r[(i-2)*x_size+j-2]) &&
01155           (x>r[(i-2)*x_size+j-1]) &&
01156           (x>r[(i-2)*x_size+j  ]) &&
01157           (x>r[(i-2)*x_size+j+1]) &&
01158           (x>r[(i-2)*x_size+j+2]) &&
01159           (x>r[(i-2)*x_size+j+3]) &&
01160
01161           (x>r[(i-1)*x_size+j-3]) &&
01162           (x>r[(i-1)*x_size+j-2]) &&
01163           (x>r[(i-1)*x_size+j-1]) &&
01164           (x>r[(i-1)*x_size+j  ]) &&
01165           (x>r[(i-1)*x_size+j+1]) &&
01166           (x>r[(i-1)*x_size+j+2]) &&
01167           (x>r[(i-1)*x_size+j+3]) &&
01168
01169           (x>r[(i)*x_size+j-3]) &&
01170           (x>r[(i)*x_size+j-2]) &&
01171           (x>r[(i)*x_size+j-1]) &&
01172           (x>=r[(i)*x_size+j+1]) &&
01173           (x>=r[(i)*x_size+j+2]) &&
01174           (x>=r[(i)*x_size+j+3]) &&
01175
01176           (x>=r[(i+1)*x_size+j-3]) &&
01177           (x>=r[(i+1)*x_size+j-2]) &&
01178           (x>=r[(i+1)*x_size+j-1]) &&
01179           (x>=r[(i+1)*x_size+j  ]) &&
01180           (x>=r[(i+1)*x_size+j+1]) &&
01181           (x>=r[(i+1)*x_size+j+2]) &&
01182           (x>=r[(i+1)*x_size+j+3]) &&
01183
01184           (x>=r[(i+2)*x_size+j-3]) &&
01185           (x>=r[(i+2)*x_size+j-2]) &&
01186           (x>=r[(i+2)*x_size+j-1]) &&
01187           (x>=r[(i+2)*x_size+j  ]) &&
01188           (x>=r[(i+2)*x_size+j+1]) &&
01189           (x>=r[(i+2)*x_size+j+2]) &&
01190           (x>=r[(i+2)*x_size+j+3]) &&
01191
01192           (x>=r[(i+3)*x_size+j-3]) &&
01193           (x>=r[(i+3)*x_size+j-2]) &&
01194           (x>=r[(i+3)*x_size+j-1]) &&
01195           (x>=r[(i+3)*x_size+j  ]) &&
01196           (x>=r[(i+3)*x_size+j+1]) &&
01197           (x>=r[(i+3)*x_size+j+2]) &&
01198           (x>=r[(i+3)*x_size+j+3]) )
01199 #endif
01200         {
01201           corner_list[n].info=0;
01202           corner_list[n].x=j;
01203           corner_list[n].y=i;
01204           x = in[(i-2)*x_size+j-2] + in[(i-2)*x_size+j-1] + in[(i-2)*x_size+j] + in[(i-2)*x_size+j+1] + in[(i-2)*x_size+j+2] +
01205         in[(i-1)*x_size+j-2] + in[(i-1)*x_size+j-1] + in[(i-1)*x_size+j] + in[(i-1)*x_size+j+1] + in[(i-1)*x_size+j+2] +
01206         in[(i  )*x_size+j-2] + in[(i  )*x_size+j-1] + in[(i  )*x_size+j] + in[(i  )*x_size+j+1] + in[(i  )*x_size+j+2] +
01207         in[(i+1)*x_size+j-2] + in[(i+1)*x_size+j-1] + in[(i+1)*x_size+j] + in[(i+1)*x_size+j+1] + in[(i+1)*x_size+j+2] +
01208         in[(i+2)*x_size+j-2] + in[(i+2)*x_size+j-1] + in[(i+2)*x_size+j] + in[(i+2)*x_size+j+1] + in[(i+2)*x_size+j+2];
01209
01210           corner_list[n].I=x/25;
01211           /*corner_list[n].I=in[i*x_size+j];*/
01212           x = in[(i-2)*x_size+j+2] + in[(i-1)*x_size+j+2] + in[(i)*x_size+j+2] + in[(i+1)*x_size+j+2] + in[(i+2)*x_size+j+2] -
01213         (in[(i-2)*x_size+j-2] + in[(i-1)*x_size+j-2] + in[(i)*x_size+j-2] + in[(i+1)*x_size+j-2] + in[(i+2)*x_size+j-2]);
01214           x += x + in[(i-2)*x_size+j+1] + in[(i-1)*x_size+j+1] + in[(i)*x_size+j+1] + in[(i+1)*x_size+j+1] + in[(i+2)*x_size+j+1] -
01215         (in[(i-2)*x_size+j-1] + in[(i-1)*x_size+j-1] + in[(i)*x_size+j-1] + in[(i+1)*x_size+j-1] + in[(i+2)*x_size+j-1]);
01216
01217           y = in[(i+2)*x_size+j-2] + in[(i+2)*x_size+j-1] + in[(i+2)*x_size+j] + in[(i+2)*x_size+j+1] + in[(i+2)*x_size+j+2] -
01218         (in[(i-2)*x_size+j-2] + in[(i-2)*x_size+j-1] + in[(i-2)*x_size+j] + in[(i-2)*x_size+j+1] + in[(i-2)*x_size+j+2]);
01219           y += y + in[(i+1)*x_size+j-2] + in[(i+1)*x_size+j-1] + in[(i+1)*x_size+j] + in[(i+1)*x_size+j+1] + in[(i+1)*x_size+j+2] -
01220         (in[(i-1)*x_size+j-2] + in[(i-1)*x_size+j-1] + in[(i-1)*x_size+j] + in[(i-1)*x_size+j+1] + in[(i-1)*x_size+j+2]);
01221           corner_list[n].dx=x/15;
01222           corner_list[n].dy=y/15;
01223 //            point.Set((double)j, (double)i);
01224 //            pvec.push_back(point);
01225 //            quality.push_back((float)(x/15*y/15));
01226
01227           n++;
01228           if(n==MAX_CORNERS){
01229         BIASERR("Too many corners.\n");
01230     return n;
01231           }}}}
01232   corner_list[n].info=7;
01233   return n;
01234 }
01235
01236 template <class StorageType>
01237 void CornerDetectorSusan<StorageType>::
01238 _AddParameter(Param& para, const int grp, const std::string& postfix)
01239 {
01240   BIASCDOUT(D_CD_SUSAN, "Tracker<StorageType>: using group ID "
01241             <<grp<<"\n");
01242
01243   if (para.CheckParam("Threshold"+postfix)){
01244     _Threshold=para.GetParamInt("Threshold"+postfix);
01245   } else {
01246     _Threshold=para.AddParamInt("Threshold"+postfix,
01247                                 "threshold for the maximum difference in greylevels between two pixels which allows them to be considered part of the same \"region\" in the image",
01248                                 DEFAULT_THRESH, 0, 100, 't', grp);
01249   }
01250
01251   if (para.CheckParam("Quick"+postfix)){
01252     _Quick=para.GetParamBool("Quick"+postfix);
01253   } else {
01254     _Quick=para.AddParamBool("Quick"+postfix,
01255                              "should the quick mode be used",
01256                              DEFAULT_QUICK, 'q', grp);
01257   }
01258   if (this->_MaxNum!=NULL) *this->_MaxNum = 1850;
01259 }
01260
01261 //////////////////////////////////////////////////////////////////////////
01262 //                 instantiation
01263 //////////////////////////////////////////////////////////////////////////
01264
01265 template class CornerDetectorSusan<unsigned char>;
01266 //template class CornerDetectorSusan<float>;
01267
01268 // fill in instances as required
01269 #ifdef BUILD_IMAGE_INT
01270 #endif
01271 #ifdef BUILD_IMAGE_CHAR
01272 #endif
01273 #ifdef BUILD_IMAGE_SHORT
01274 #endif
01275 #ifdef BUILD_IMAGE_USHORT
01276 template class CornerDetectorSusan<unsigned short>;
01277 #endif
01278 #ifdef BUILD_IMAGE_UINT
01279 #endif
01280 #ifdef BUILD_IMAGE_DOUBLE
01281 #endif
01282
01283 /* {{{ Machine Information */
01284
01285 /**********************************************************************\
01286
01287   Success has been reported with the following:
01288
01289   MACHINE  OS         COMPILER
01290
01291   Sun      4.1.4      bundled C, gcc
01292
01293   Next
01294
01295   SGI      IRIX       SGI cc
01296
01297   DEC      Unix V3.2+
01298
01299   IBM RISC AIX        gcc
01300
01301   PC                  Borland 5.0
01302
01303   PC       Linux      gcc-2.6.3
01304
01305   PC       Win32      Visual C++ 4.0 (Console Application)
01306
01307   PC       Win95      Visual C++ 5.0 (Console Application)
01308                       Thanks to Niu Yongsheng <niuysbit@163.net>:
01309                       Use the FOPENB option below
01310
01311   PC       DOS        djgpp gnu C
01312                       Thanks to Mark Pettovello <mpettove@umdsun2.umd.umich.edu>:
01313                       Use the FOPENB option below
01314
01315   HP       HP-UX      bundled cc
01316                       Thanks to Brian Dixon <briand@hpcvsgen.cv.hp.com>:
01317                       in ksh:
01318                       export CCOPTS="-Aa -D_HPUX_SOURCE | -lM"
01319                       cc -O3 -o susan susan2l.c
01320
01321 \**********************************************************************/
01322
01323 /* }}} */
01324
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/CornerDetectorSusan.hh Source File

FeatureDetector

CornerDetectorSusan.hh

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /* {{{ Copyright etc. */
00010
00011 /**********************************************************************\
00012
00013   SUSAN Version 2l by Stephen Smith
00014   Oxford Centre for Functional Magnetic Resonance Imaging of the Brain,
00015   Department of Clinical Neurology, Oxford University, Oxford, UK
00016   (Previously in Computer Vision and Image Processing Group - now
00017   Computer Vision and Electro Optics Group - DERA Chertsey, UK)
00018   Email:    steve@fmrib.ox.ac.uk
00019   WWW:      http://www.fmrib.ox.ac.uk/~steve
00020
00021   (C) Crown Copyright (1995-1999), Defence Evaluation and Research Agency,
00022   Farnborough, Hampshire, GU14 6TD, UK
00023   DERA WWW site:
00024   http://www.dera.gov.uk/
00025   DERA Computer Vision and Electro Optics Group WWW site:
00026   http://www.dera.gov.uk/imageprocessing/dera/group_home.html
00027   DERA Computer Vision and Electro Optics Group point of contact:
00028   Dr. John Savage, jtsavage@dera.gov.uk, +44 1344 633203
00029
00030   A UK patent has been granted: "Method for digitally processing
00031   images to determine the position of edges and/or corners therein for
00032   guidance of unmanned vehicle", UK Patent 2272285. Proprietor:
00033   Secretary of State for Defence, UK. 15 January 1997
00034
00035   This code is issued for research purposes only and remains the
00036   property of the UK Secretary of State for Defence. This code must
00037   not be passed on without this header information being kept
00038   intact. This code must not be sold.
00039
00040 \**********************************************************************/
00041
00042 /* }}} */
00043 /* {{{ Readme First */
00044
00045 /**********************************************************************\
00046
00047   SUSAN Version 2l
00048   SUSAN = Smallest Univalue Segment Assimilating Nucleus
00049
00050   Email:    steve@fmrib.ox.ac.uk
00051   WWW:      http://www.fmrib.ox.ac.uk/~steve
00052
00053   Related paper:
00054   @article{Smith97,
00055         author = "Smith, S.M. and Brady, J.M.",
00056         title = "{SUSAN} - A New Approach to Low Level Image Processing",
00057         journal = "Int. Journal of Computer Vision",
00058         pages = "45--78",
00059         volume = "23",
00060         number = "1",
00061         month = "May",
00062         year = 1997}
00063
00064   To be registered for automatic (bug) updates of SUSAN, send an email.
00065
00066   Compile with:
00067   gcc -O4 -o susan susan2l.c -lm
00068
00069   See following section for different machine information. Please
00070   report any bugs (and fixes). There are a few optional changes that
00071   can be made in the "defines" section which follows shortly.
00072
00073   Usage: type "susan" to get usage. Only PGM format files can be input
00074   and output. Utilities such as the netpbm package and XV can be used
00075   to convert to and from other formats. Any size of image can be
00076   processed.
00077
00078   This code is written using an emacs folding mode, making moving
00079   around the different sections very easy. This is why there are
00080   various marks within comments and why comments are indented.
00081
00082
00083   SUSAN QUICK:
00084
00085   This version of the SUSAN corner finder does not do all the
00086   false-corner suppression and thus is faster and produced some false
00087   positives, particularly on strong edges. However, because there are
00088   less stages involving thresholds etc., the corners that are
00089   correctly reported are usually more stable than those reported with
00090   the full algorithm. Thus I recommend at least TRYING this algorithm
00091   for applications where stability is important, e.g., tracking.
00092
00093   THRESHOLDS:
00094
00095   There are two thresholds which can be set at run-time. These are the
00096   brightness threshold (t) and the distance threshold (d).
00097
00098   SPATIAL CONTROL: d
00099
00100   In SUSAN smoothing d controls the size of the Gaussian mask; its
00101   default is 4.0. Increasing d gives more smoothing. In edge finding,
00102   a fixed flat mask is used, either 37 pixels arranged in a "circle"
00103   (default), or a 3 by 3 mask which gives finer detail. In corner
00104   finding, only the larger 37 pixel mask is used; d is not
00105   variable. In smoothing, the flat 3 by 3 mask can be used instead of
00106   a larger Gaussian mask; this gives low smoothing and fast operation.
00107
00108   BRIGHTNESS CONTROL: t
00109
00110   In all three algorithms, t can be varied (default=20); this is the
00111   main threshold to be varied. It determines the maximum difference in
00112   greylevels between two pixels which allows them to be considered
00113   part of the same "region" in the image. Thus it can be reduced to
00114   give more edges or corners, i.e. to be more sensitive, and vice
00115   versa. In smoothing, reducing t gives less smoothing, and vice
00116   versa. Set t=10 for the test image available from the SUSAN web
00117   page.
00118
00119   ITERATIONS:
00120
00121   With SUSAN smoothing, more smoothing can also be obtained by
00122   iterating the algorithm several times. This has a different effect
00123   from varying d or t.
00124
00125   FIXED MASKS:
00126
00127   37 pixel mask:    ooo       3 by 3 mask:  ooo
00128                    ooooo                    ooo
00129                   ooooooo                   ooo
00130                   ooooooo
00131                   ooooooo
00132                    ooooo
00133                     ooo
00134
00135   CORNER ATTRIBUTES dx, dy and I
00136   (Only read this if you are interested in the C implementation or in
00137   using corner attributes, e.g., for corner matching)
00138
00139   Corners reported in the corner list have attributes associated with
00140   them as well as positions. This is useful, for example, when
00141   attempting to match corners from one image to another, as these
00142   attributes can often be fairly unchanged between images. The
00143   attributes are dx, dy and I. I is the value of image brightness at
00144   the position of the corner. In the case of susan_corners_quick, dx
00145   and dy are the first order derivatives (differentials) of the image
00146   brightness in the x and y directions respectively, at the position
00147   of the corner. In the case of normal susan corner finding, dx and dy
00148   are scaled versions of the position of the centre of gravity of the
00149   USAN with respect to the centre pixel (nucleus).
00150
00151   BRIGHTNESS FUNCTION LUT IMPLEMENTATION:
00152   (Only read this if you are interested in the C implementation)
00153
00154   The SUSAN brightness function is implemented as a LUT
00155   (Look-Up-Table) for speed. The resulting pointer-based code is a
00156   little hard to follow, so here is a brief explanation. In
00157   setup_brightness_lut() the LUT is setup. This mallocs enough space
00158   for *bp and then repositions the pointer to the centre of the
00159   malloced space. The SUSAN function e^-(x^6) or e^-(x^2) is
00160   calculated and converted to a uchar in the range 0-100, for all
00161   possible image brightness differences (including negative
00162   ones). Thus bp[23] is the output for a brightness difference of 23
00163   greylevels. In the SUSAN algorithms this LUT is used as follows:
00164
00165   p=in + (i-3)*x_size + j - 1;
00166   p points to the first image pixel in the circular mask surrounding
00167   point (x,y).
00168
00169   cp=bp + in[i*x_size+j];
00170   cp points to a position in the LUT corresponding to the brightness
00171   of the centre pixel (x,y).
00172
00173   now for every pixel within the mask surrounding (x,y),
00174   n+=*(cp-*p++);
00175   the brightness difference function is found by moving the cp pointer
00176   down by an amount equal to the value of the pixel pointed to by p,
00177   thus subtracting the two brightness values and performing the
00178   exponential function. This value is added to n, the running USAN
00179   area.
00180
00181   in SUSAN smoothing, the variable height mask is implemented by
00182   multiplying the above by the moving mask pointer, reset for each new
00183   centre pixel.
00184   tmp = *dpt++ * *(cp-brightness);
00185
00186 \**********************************************************************/
00187
00188 /* }}} */
00189
00190 #ifndef __CornerDetectorSusan_hh__
00191 #define __CornerDetectorSusan_hh__
00192
00193 #include "CornerDetectorBase.hh"
00194
00195 #define DEFAULT_THRESH 50
00196 #define DEFAULT_QUICK false
00197 /// size for non-max corner suppression; SEVEN_SUPP or FIVE_SUPP
00198 #define SEVEN_SUPP
00199 /// max corners per frame, for susan and our "harris"
00200 #define MAX_CORNERS   10000
00201
00202 namespace BIAS {
00203
00204   /** @class cornerstruct
00205       @ingroup g_feature
00206       @brief used only by Susan corner detector */
00207   struct cornerstruct   {
00208     int x, y, info, dx, dy, I;
00209   };
00210
00211   typedef struct cornerstruct CORNER_LIST[MAX_CORNERS];
00212
00213   /** @class CornerDetectorSusan
00214       @ingroup g_feature
00215       @brief The Susan corner detector (oxford implementation, see license)
00216
00217       See documentation inside CornerDetectorSusan.hh
00218       @author woelk 09/2004 */
00219   template <class StorageType>
00220   class BIASFeatureDetector_EXPORT CornerDetectorSusan
00221     : public CornerDetectorBase<StorageType>
00222   {
00223   public:
00224     CornerDetectorSusan();
00225
00226     CornerDetectorSusan(Param& para, const std::string& postfix="");
00227
00228     CornerDetectorSusan(Param& para, const int grp,const std::string& postfix);
00229
00230     ~CornerDetectorSusan();
00231
00232     /** @brief Susan Corner Detector returning homogenous points,
00233         @author woelk */
00234     virtual int Detect(const Image<StorageType>& image,
00235                        std::vector<HomgPoint2D>& pvec,
00236                        std::vector<QUAL>& quality);
00237
00238     /** @brief Susan Corner Detector returning corner list,
00239         fast interface for daimler
00240         @author woelk */
00241     int Detect(const Image<StorageType>& image, CORNER_LIST corner_list,
00242               int& num);
00243
00244     /** @brief Susan Corner Detector returning corner list,
00245         only detects corners where roi!=0
00246         @author woelk */
00247     int Detect(const Image<StorageType>& image, const Image<StorageType>& roi,
00248                CORNER_LIST corner_list, int& num);
00249
00250   protected:
00251     /// parameter
00252     int *_Threshold;
00253     bool *_Quick;
00254
00255     /// local vars for susan
00256     int *_cgx, *_cgy, *_r, _susansize, _susanthresh, _num;
00257     StorageType *_bp;
00258
00259     /// protected function for susan
00260     void _int_to_uchar(int *r, StorageType *in, int size);
00261
00262     /// protected function for susan
00263     //void _setup_brightness_lut(StorageType **bp, int thresh, int form);
00264     void _setup_brightness_lut(int thresh, int form);
00265
00266     /// returns the number of corners found
00267     int _susan_corners(StorageType *in, int *r, StorageType *bp,
00268                        CORNER_LIST corner_list, int x_size,
00269                        int y_size);
00270
00271     /** faster version of the above
00272         @author woelk 08 2003  */
00273     int _susan_corners(StorageType *in, int *r, StorageType *bp,
00274                        CORNER_LIST corner_list, int x_size,
00275                        int y_size, StorageType *roi);
00276
00277     /// returns the number of corners found
00278     int _susan_corners_quick(StorageType *in, int *r, StorageType *bp,
00279                              CORNER_LIST corner_list, int x_size,
00280                              int y_size);
00281
00282     /// allocates the internal data structures for susan corner detector
00283     inline void _SusanReAllocMem(int x_size, int y_size)
00284     {
00285       _susansize=x_size*y_size;
00286       if (_cgx!=NULL) delete[] _cgx;
00287       if (_cgy!=NULL) delete[] _cgy;
00288       if (_r!=NULL) delete[] _r;
00289       _r = new int[_susansize];
00290       _cgx=new int[_susansize];
00291       _cgy=new int[_susansize];
00292     };
00293
00294     void _AddParameter(Param& para, const int grp, const std::string& postfix);
00295
00296   }; // class
00297
00298 } // namespace
00299
00300
00301 #endif // __CornerDetectorSusan_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/CornerMatcher.cpp Source File

Matcher2D

CornerMatcher.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "CornerMatcher.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031
00032 #define INST(uctype)\
00033 template int CornerMatcher::SSD<uctype>(HomgPoint2D& p1, HomgPoint2D& p2,\
00034   Image<uctype>& im1,\
00035   Image<uctype>& im2, unsigned int halfwinsize, double& result);\
00036 template int CornerMatcher::NCC<uctype>(HomgPoint2D& p1, HomgPoint2D& p2,\
00037   Image<uctype>& im1,\
00038   Image<uctype>& im2, unsigned int halfwinsize, double& result);\
00039 template int CornerMatcher::NCCSearch<uctype>(HomgPoint2D& p1,HomgPoint2D& p2,\
00040   Image<uctype>& im1, Image<uctype>& im2, unsigned int halfnccwinsize,\
00041   unsigned int halfsearchwinsize, HomgPoint2D& resultpoint,\
00042   double mincorrelation, double& result);\
00043 template int CornerMatcher::ParabolaNCC(HomgPoint2D& p1, HomgPoint2D& p2,\
00044   Image<uctype>& im1, Image<uctype>& im2, unsigned int halfwinsize,\
00045   HomgPoint2D& result);\
00046 template int CornerMatcher::ParabolaNCC5(HomgPoint2D& p1, HomgPoint2D& p2,\
00047   Image<uctype>& im1, Image<uctype>& im2, unsigned int halfwinsize,\
00048   HomgPoint2D& result);\
00049 template int CornerMatcher::RefinePyramideNCC<uctype>(\
00050   vector<vector<HomgPoint2D> >& ps1, PyramidImage<uctype>& im1, \
00051   PyramidImage<uctype>& im2, unsigned int halfnccwinsize, \
00052   vector<vector<HomgPoint2D> >& matches, \
00053   vector<vector<double> >& matchquality)
00054
00055
00056
00057 INST(unsigned char);
00058 //INST(float);
00059
00060 // fill in instances as required
00061 #ifdef BUILD_IMAGE_INT
00062 INST(int);
00063 #endif
00064 #ifdef BUILD_IMAGE_CHAR
00065 INST(char);
00066 #endif
00067 #ifdef BUILD_IMAGE_SHORT
00068 INST(short);
00069 #endif
00070 #ifdef BUILD_IMAGE_USHORT
00071 INST(unsigned short);
00072 #endif
00073 #ifdef BUILD_IMAGE_UINT
00074 INST(unsigned int);
00075 #endif
00076 #ifdef BUILD_IMAGE_DOUBLE
00077 INST(double);
00078 #endif
00079
00080
00081 CornerMatcher::CornerMatcher()
00082   : RegionMatcher()
00083 {}
00084
00085 CornerMatcher::~CornerMatcher()
00086 {}
00087
00088 template <class StorageType>
00089 int CornerMatcher::SSD(HomgPoint2D& p1, HomgPoint2D& p2,
00090                        Image<StorageType>& im1, Image<StorageType>& im2,
00091                        unsigned int halfwinsize, double& result)
00092 {
00093   int res=0;
00094   int ip1[2], ip2[2];
00095   unsigned int uip1[2], uip2[2];
00096   if (p1.IsAtInfinity() || p2.IsAtInfinity())
00097     res=-2;
00098   else {
00099     ip1[0]=(int)rint(p1[0]/p1[2]);
00100     ip1[1]=(int)rint(p1[1]/p1[2]);
00101     ip2[0]=(int)rint(p2[0]/p2[2]);
00102     ip2[1]=(int)rint(p2[1]/p2[2]);
00103     if (ip1[0]<(int)halfwinsize ||
00104         ip1[0]+(int)halfwinsize>=(int)im1.GetWidth() ||
00105         ip1[1]<(int)halfwinsize ||
00106         ip1[1]+(int)halfwinsize>=(int)im1.GetHeight() ||
00107         ip2[0]<(int)halfwinsize ||
00108         ip2[0]+(int)halfwinsize>=(int)im2.GetWidth() ||
00109         ip2[1]<(int)halfwinsize ||
00110         ip2[1]+(int)halfwinsize>=(int)im2.GetHeight())
00111       res=-1;
00112     else{
00113       uip1[0]=(unsigned int)ip1[0];
00114       uip1[1]=(unsigned int)ip1[1];
00115       uip2[0]=(unsigned int)ip2[0];
00116       uip2[1]=(unsigned int)ip2[1];
00117       RegionMatcher::SSD(uip1, uip2, im1.GetImageDataArray(),
00118                          im2.GetImageDataArray(), halfwinsize, result);
00119     }
00120   }
00121   return res;
00122 }
00123
00124 template <class StorageType>
00125 int CornerMatcher::NCC(HomgPoint2D& p1, HomgPoint2D& p2,
00126                        Image<StorageType>& im1, Image<StorageType>& im2,
00127                        unsigned int halfwinsize, double& result)
00128 {
00129   int res=0;
00130   int ip1[2], ip2[2];
00131   unsigned int uip1[2], uip2[2];
00132   if (p1.IsAtInfinity() || p2.IsAtInfinity())
00133     res=-2;
00134   else {
00135     ip1[0]=(int)rint(p1[0]/p1[2]);
00136     ip1[1]=(int)rint(p1[1]/p1[2]);
00137     ip2[0]=(int)rint(p2[0]/p2[2]);
00138     ip2[1]=(int)rint(p2[1]/p2[2]);
00139     if (ip1[0]<(int)halfwinsize ||
00140         ip1[0]+(int)halfwinsize>=(int)im1.GetWidth() ||
00141         ip1[1]<(int)halfwinsize ||
00142         ip1[1]+(int)halfwinsize>=(int)im1.GetHeight() ||
00143         ip2[0]<(int)halfwinsize ||
00144         ip2[0]+(int)halfwinsize>=(int)im2.GetWidth() ||
00145         ip2[1]<(int)halfwinsize ||
00146         ip2[1]+(int)halfwinsize>=(int)im2.GetHeight())
00147       res=-1;
00148     else{
00149       uip1[0]=(unsigned int)ip1[0];
00150       uip1[1]=(unsigned int)ip1[1];
00151       uip2[0]=(unsigned int)ip2[0];
00152       uip2[1]=(unsigned int)ip2[1];
00153       RegionMatcher::NCC(uip1, uip2, im1.GetImageDataArray(),
00154                          im2.GetImageDataArray(), halfwinsize, result);
00155     }
00156   }
00157   return res;
00158 }
00159
00160
00161 template <class StorageType>
00162 int CornerMatcher::NCCSearch(HomgPoint2D& p1, HomgPoint2D& p2,
00163                              Image<StorageType>& im1, Image<StorageType>& im2,
00164                              unsigned int halfnccwinsize,
00165                              unsigned int halfsearchwinsize,
00166                              HomgPoint2D& resultpoint,
00167                              double mincorrelation, double& result)
00168 {
00169   static double THRESHOLD=1e-8;
00170   int res=0;
00171   int ip1[2], ip2[2];
00172   unsigned int uip1[2], uip2[2], resp[2];
00173   int minedgedist = halfnccwinsize + halfsearchwinsize;
00174   if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00175     res=-2;
00176   } else {
00177     ip1[0]=(int)rint(p1[0]/p1[2]);
00178     ip1[1]=(int)rint(p1[1]/p1[2]);
00179     ip2[0]=(int)rint(p2[0]/p2[2]);
00180     ip2[1]=(int)rint(p2[1]/p2[2]);
00181     if (fabs(p2[0]/p2[2]-ip2[0])<THRESHOLD &&
00182         fabs(p2[1]/p2[2]-ip2[1])<THRESHOLD ) {
00183       if (ip1[0] < minedgedist || ip1[0] + minedgedist>=(int)im1.GetWidth() ||
00184           ip1[1] < minedgedist || ip1[1] + minedgedist>=(int)im1.GetHeight() ||
00185           ip2[0] < minedgedist || ip2[0] + minedgedist>=(int)im2.GetWidth() ||
00186           ip2[1] < minedgedist || ip2[1] + minedgedist>=(int)im2.GetHeight() ){
00187         res=-1;
00188       } else {
00189         uip1[0]=(unsigned int)ip1[0];
00190         uip1[1]=(unsigned int)ip1[1];
00191         uip2[0]=(unsigned int)ip2[0];
00192         uip2[1]=(unsigned int)ip2[1];
00193         BIASDOUT(D_CORNER_MATCHER_SEARCH,"p1 " << p1 << " " << uip1[0] << " "
00194                  << uip1[1] << "\tp2 " << p2 << " " << uip2[0]<<" "<< uip2[1]);
00195         BIASDOUT(D_CORNER_MATCHER_SEARCH,"using NCCSearchOdd for " << p2
00196                  << " " << uip2[0] << " "<< uip2[1]);
00197         res = NCCSearchOdd(uip1, uip2, im1.GetImageDataArray(),
00198                            im2.GetImageDataArray(), halfnccwinsize,
00199                            halfsearchwinsize, resp, mincorrelation, result);
00200         resultpoint.Set((double)resp[0], (double)resp[1]);
00201         BIASDOUT(D_CORNER_MATCHER_SEARCH,"resultpoint " << resultpoint);
00202       } // within image
00203     } else { // searcheven/searchodd
00204       ip1[0]=(int)rint(p1[0]/p1[2]);
00205       ip1[1]=(int)rint(p1[1]/p1[2]);
00206       ip2[0]=(int)floor(p2[0]/p2[2]);
00207       ip2[1]=(int)floor(p2[1]/p2[2]);
00208       if (ip1[0] < minedgedist || ip1[0] + minedgedist>=(int)im1.GetWidth() ||
00209           ip1[1] < minedgedist || ip1[1] + minedgedist>=(int)im1.GetHeight() ||
00210           ip2[0] < minedgedist || ip2[0] + minedgedist>=(int)im2.GetWidth() ||
00211           ip2[1] < minedgedist || ip2[1] + minedgedist>=(int)im2.GetHeight() ){
00212         res=-1;
00213       } else {
00214         uip1[0]=(unsigned int)ip1[0];
00215         uip1[1]=(unsigned int)ip1[1];
00216         uip2[0]=(unsigned int)ip2[0];
00217         uip2[1]=(unsigned int)ip2[1];
00218         BIASDOUT(D_CORNER_MATCHER_SEARCH,"using NCCSearchEven for " << p2
00219                  << " " << uip2[0] << " "<< uip2[1]);
00220         res = NCCSearchEven(uip1, uip2, im1.GetImageDataArray(),
00221                             im2.GetImageDataArray(), halfnccwinsize,
00222                             halfsearchwinsize, resp, mincorrelation, result);
00223         resultpoint.Set((double)resp[0], (double)resp[1]);
00224         BIASDOUT(D_CORNER_MATCHER_SEARCH,"resultpoint " << resultpoint);
00225       } // within image
00226     } // if searcheven | serachodd
00227   } // if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00228   return res;
00229 }
00230
00231 /*
00232 template <class StorageType>
00233 int CornerMatcher::KLT(HomgPoint2D& p1, HomgPoint2D& p2,
00234                        Image<StorageType>& im1, Image<StorageType>& im2,
00235                        Image<StorageType>& gradx, Image<StorageType>& grady,
00236                        unsigned int halfwinsize, unsigned int gradientborder,
00237                        unsigned int numiterations, HomgPoint2D& result,
00238                        KLT_TYPE& error)
00239 {
00240   int res=0;
00241   KLT_TYPE dp1[2], dp2[2], resp[2];
00242   double minedgedist = (double)(halfwinsize + gradientborder);
00243
00244   if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00245     res=-2;
00246   } else {
00247     dp1[0]=p1[0]/p1[2];
00248     dp1[1]=p1[1]/p1[2];
00249     dp2[0]=p2[0]/p2[2];
00250     dp2[1]=p2[1]/p2[2];
00251     if (dp1[0] < minedgedist || dp1[0] + minedgedist >= im1.GetWidth() ||
00252         dp1[1] < minedgedist || dp1[1] + minedgedist >= im1.GetHeight() ||
00253         dp2[0] < minedgedist || dp2[0] + minedgedist >= im2.GetWidth() ||
00254         dp2[1] < minedgedist || dp2[1] + minedgedist >= im2.GetHeight() ) {
00255       res=-1;
00256     } else {
00257       BIASDOUT(D_CORNER_MATCHER_KLT,"p1: " << p1 << "\tp2: "<< p2);
00258       res = RegionMatcher::
00259         KLT(dp1, dp2, im1.GetImageDataArray(), im2.GetImageDataArray(),
00260             gradx.GetImageDataArray(), grady.GetImageDataArray(),
00261             im1.GetWidth(), im1.GetHeight(), halfwinsize,
00262             numiterations, resp, error);
00263       result.Set(resp[0], resp[1]);
00264     } // p1 / p1 within image
00265   } // p1 || p2 at infinity
00266
00267   return res;
00268 }
00269
00270 template <class StorageType>
00271 int CornerMatcher::KLT(HomgPoint2D& p1, HomgPoint2D& p2,
00272                        Image<StorageType>& im1, Image<StorageType>& im2,
00273                        Image<StorageType>& gradx, Image<StorageType>& grady,
00274                        unsigned int halfwinsize, unsigned int gradientborder,
00275                        unsigned int maxnumiterations, KLT_TYPE maxerror,
00276                        HomgPoint2D& result, KLT_TYPE& error)
00277 {
00278   int res=0;
00279   KLT_TYPE dp1[2], dp2[2], resp[2];
00280   double minedgedist = (double)(halfwinsize + gradientborder);
00281
00282   if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00283     BIASDOUT(D_CORNER_MATCHER_KLT," a point is at infinty p1: "
00284              << p1 << "\tp2: "<< p2);
00285     res=-2;
00286   } else {
00287     dp1[0]=p1[0]/p1[2];
00288     dp1[1]=p1[1]/p1[2];
00289     dp2[0]=p2[0]/p2[2];
00290     dp2[1]=p2[1]/p2[2];
00291     if (dp1[0] < minedgedist || dp1[0] + minedgedist >= im1.GetWidth() ||
00292         dp1[1] < minedgedist || dp1[1] + minedgedist >= im1.GetHeight() ||
00293         dp2[0] < minedgedist || dp2[0] + minedgedist >= im2.GetWidth() ||
00294         dp2[1] < minedgedist || dp2[1] + minedgedist >= im2.GetHeight() ) {
00295       BIASDOUT(D_CORNER_MATCHER_KLT,
00296                " a point is to cloose to image border p1: "
00297                << p1 << "\tp2: "<< p2);
00298       res=-1;
00299     } else {
00300       BIASDOUT(D_CORNER_MATCHER_KLT,"p1: " << p1 << "\tp2: "<< p2);
00301       res = RegionMatcher::
00302         KLT(dp1, dp2, im1.GetImageDataArray(), im2.GetImageDataArray(),
00303             gradx.GetImageDataArray(), grady.GetImageDataArray(),
00304             im1.GetWidth(), im1.GetHeight(), halfwinsize,
00305             maxnumiterations, maxerror, resp, error);
00306       result.Set(resp[0], resp[1]);
00307     } // p1 / p1 within image
00308   } // p1 || p2 at infinity
00309
00310   return res;
00311 }
00312
00313 template <class StorageType>
00314 int CornerMatcher::KLT2(KLT_TYPE point1[2], KLT_TYPE point2[2],
00315                         PyramidImage2<StorageType>& pyim1,
00316                         PyramidImage2<StorageType>& pyim2,
00317                         PyramidImage2<StorageType>& pygradx1,
00318                         PyramidImage2<StorageType>& pygrady1,
00319                         PyramidImage2<StorageType>& pygradx2,
00320                         PyramidImage2<StorageType>& pygrady2, unsigned pyindex,
00321                         unsigned hws, unsigned maxiterations, double SADThresh,
00322                         KLT_TYPE maxerror, KLT_TYPE res[2], KLT_TYPE& error)
00323 {
00324 #ifdef TIMING
00325   TimeMeasure timer;
00326   timer.Start();
00327 #endif
00328   int pysize, width, height, j;
00329   StorageType **ida1, **ida2, **idagx1, **idagy1, **idagx2, **idagy2;
00330   unsigned x1, x2, y1, y2, corr, mh, mw, sadthresh3x3, sadthresh5x5;
00331   KLT_TYPE p1[2], p2[2], fx, fy, div;
00332
00333   sadthresh3x3=(unsigned)(SADThresh*9.0);
00334   sadthresh5x5=(unsigned)(SADThresh*25.0);
00335   pysize=pyim1.size();
00336   // first track on smallest level
00337   j=pysize-1;
00338   ida1=pyim1[j]->GetImageDataArray();
00339   ida2=pyim2[j]->GetImageDataArray();
00340   idagx1=pygradx1[j]->GetImageDataArray();
00341   idagy1=pygrady1[j]->GetImageDataArray();
00342   idagx2=pygradx2[j]->GetImageDataArray();
00343   idagy2=pygrady2[j]->GetImageDataArray();
00344   width=pyim1[j]->GetWidth();
00345   height=pyim1[j]->GetHeight();
00346   mh=height-hws-1; mw=width-hws-1;
00347
00348   // now track smalles level
00349 #ifdef WIN32
00350   // jw, sunmin: (09/2004)  do NOT use std:: because of compex instance
00351   div=1.0/pow(2.0, double(pysize-pyindex-1));
00352 #else
00353   // jw, woelk: (09/2004): Felix is *sure* that he needs std:: ;-)
00354   div=1.0/std::pow(2.0, double(pysize-pyindex-1));
00355 #endif
00356
00357   p1[0]=point1[0]*div;
00358   p1[1]=point1[1]*div;
00359   p2[0]=p1[0]; p2[1]=p1[1];
00360   fx=fy=0.0;
00361   BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" maybe tracking between ("<<p1[0]<<", "
00362             <<p1[1]<<") and ("<<p2[0]<<", "<<p2[1]<<")\n");
00363   if (p2[0]>hws && p2[1]>hws && p2[0]<mw && p2[1]<mh){
00364     BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" tracking between ("<<p1[0]<<", "
00365               <<p1[1]<<") and ("<<p2[0]<<", "<<p2[1]<<")\n");
00366     if (RegionMatcher::KLT2(p1, p2,ida1,ida2,idagx1,idagy1,idagx2,idagy2,width,
00367                             height,hws,maxiterations,maxerror, res, error)==0){
00368       BIASCDOUT(D_CORNER_MATCHER_PYKLT,j<<" tracking succeeded, maybe sad "
00369                   <<"between ("<<p1[0]<<", "<<p1[1]<<") and ("<<res[0]<<", "
00370                   <<res[1]<<")\n");
00371       x1=(unsigned)rint(p1[0]);
00372       y1=(unsigned)rint(p1[1]);
00373       x2=(unsigned)rint(res[0]);
00374       y2=(unsigned)rint(res[1]);
00375       if (x2>=2 && y2>=2 && x2<mw && y2<mh){
00376         BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad between ("
00377                   <<x1<<", "<<y1<<") and ("<<x2<<", "<<y2<<")\n");
00378         SAD3x3(x1, y1, x2, y2, ida1, ida2, corr);
00379       } else {
00380         BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" no sad, out of bounds\n");
00381         if (j==(int)pyindex) {
00382           return -1;
00383         } else {
00384           corr=sadthresh3x3; // cannot use sad so fake failure
00385         }
00386       }
00387       if (corr<sadthresh3x3){
00388         BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad succeeded ("<<p1[0]<<", "<<
00389                   p1[1]<<") and ("<<res[0]<<", "<<res[1]<<") = "<<corr<<"\n");
00390         fx=res[0]-p1[0];
00391         fy=res[1]-p1[1];
00392       } else {
00393         BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad failed ("<<p1[0]<<", "<<
00394                   p1[1]<<") and ("<<res[0]<<", "<<res[1]<<") = "<<corr<<"\n");
00395         fx=fy=0.0;
00396         if (j==(int)pyindex) { return -2; }
00397       }
00398     } else {
00399       BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" KLT failed\n");
00400       if (j==(int)pyindex) { return -3; }
00401     }
00402   } else {
00403     BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" not tracking, out of bounds\n");
00404     if (j==(int)pyindex) { return -4; }
00405   }
00406
00407 #ifdef TIMING
00408   timer.Stop();
00409   GetDebugStream() << "smallest pyramide leveltook "<<timer.GetRealTime()<<" us"<<endl;
00410   timer.Reset();
00411   timer.Start();
00412 #endif
00413   // hws=2;
00414   for (j=pysize-2; j>=(int)pyindex; j--){
00415     ida1=pyim1[j]->GetImageDataArray();
00416     ida2=pyim2[j]->GetImageDataArray();
00417     idagx1=pygradx1[j]->GetImageDataArray();
00418     idagy1=pygrady1[j]->GetImageDataArray();
00419     idagx2=pygradx2[j]->GetImageDataArray();
00420     idagy2=pygrady2[j]->GetImageDataArray();
00421     width=pyim1[j]->GetWidth();
00422     height=pyim1[j]->GetHeight();
00423     mh=height-hws-1; mw=width-hws-1;
00424
00425     if (j==(int)pyindex){
00426       p1[0]=point1[0];
00427       p1[1]=point1[1];
00428     } else {
00429       p1[0]*=2.0;
00430       p1[1]*=2.0;
00431     }
00432     p2[0]=p1[0]+fx*2;
00433     p2[1]=p1[1]+fy*2;
00434
00435     BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" maybe tracking between ("<<p1[0]
00436               <<", "<<p1[1]<<") and ("<<p2[0]<<", "<<p2[1]<<")\n");
00437     if (p2[0]>hws && p2[1]>hws && p2[0]<mw && p2[1]<mh){
00438       BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" tracking between ("<<p1[0]<<", "
00439                 <<p1[1]<<") and ("<<p2[0]<<", "<<p2[1]<<")\n");
00440       if (RegionMatcher::KLT2(p1,p2,ida1,ida2,idagx1,idagy1,idagx2,idagy2,
00441                               width,height,hws,maxiterations,maxerror,
00442                               res,error)==0){
00443         BIASCDOUT(D_CORNER_MATCHER_PYKLT,j<<" tracking succeeded, maybe sad "
00444                   <<"between ("<<p1[0]<<", "<<p1[1]<<") and ("<<res[0]<<", "
00445                   <<res[1]<<")\n");
00446         x1=(unsigned)rint(p1[0]);
00447         y1=(unsigned)rint(p1[1]);
00448         x2=(unsigned)rint(res[0]);
00449         y2=(unsigned)rint(res[1]);
00450
00451         if (x2>=3 && y2>=3 && x2<mw && y2<mh){
00452           BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad between ("
00453                     <<x1<<", "<<y1<<") and ("<<x2<<", "<<y2<<")\n");
00454           SAD5x5(x1, y1, x2, y2, ida1, ida2, corr);
00455         } else {
00456           BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" no sad, out of bounds\n");
00457           if (j==(int)pyindex) {
00458             return -1;
00459           } else {
00460             corr=sadthresh5x5;
00461           } // cannot use sad so fake failure
00462         }
00463         if (corr<sadthresh5x5){
00464           fx=res[0]-p1[0];
00465           fy=res[1]-p1[1];
00466           BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad succeeded, adding ("<<
00467                     p1[0]<<", "<<p1[1]<<") -> ("<<res[0]<<", "<<res[1]<<"\n");
00468         } else {
00469           BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" sad failed: "<<corr<<"\n");
00470           if (j==(int)pyindex) { return -2; }
00471           else { fx*=2.0; fy*=2.0; }
00472         }
00473       }  else {
00474         BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" KLT failed\n");
00475         if (j==(int)pyindex) { return -3; }
00476       }
00477     } else {
00478       BIASCDOUT(D_CORNER_MATCHER_PYKLT, j<<" not tracking, out of bounds\n");
00479       if (j==(int)pyindex) { return -4; }
00480     }
00481   }
00482 #ifdef TIMING
00483   timer.Stop();
00484   GetDebugStream() << "Pyramid KLT2 took "<<timer.GetRealTime()<<" us"<<endl;
00485 #endif
00486   return 0;
00487
00488 }
00489 */
00490 template <class StorageType>
00491 int CornerMatcher::ParabolaNCC(HomgPoint2D& p1, HomgPoint2D& p2,
00492                                Image<StorageType>& im1,
00493                                Image<StorageType>& im2,
00494                                unsigned int halfwinsize,
00495                                HomgPoint2D& result)
00496 {
00497   int res=0;
00498   KLT_TYPE resu[2];
00499   unsigned int uip1[2], uip2[2];
00500   double dp1x, dp1y;
00501   int ip1[2], ip2[2];
00502   int minedgedist = halfwinsize + 1;
00503   if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00504     res=-2;
00505   } else {
00506     ip1[0]=(int)rint(p1[0]/p1[2]);
00507     ip1[1]=(int)rint(p1[1]/p1[2]);
00508     ip2[0]=(int)rint(p2[0]/p2[2]);
00509     ip2[1]=(int)rint(p2[1]/p2[2]);
00510     if (ip1[0] < minedgedist || ip1[0] + minedgedist>=(int)im1.GetWidth() ||
00511         ip1[1] < minedgedist || ip1[1] + minedgedist>=(int)im1.GetHeight() ||
00512         ip2[0] < minedgedist || ip2[0] + minedgedist>=(int)im2.GetWidth() ||
00513         ip2[1] < minedgedist || ip2[1] + minedgedist>=(int)im2.GetHeight() ){
00514         res=-1;
00515       } else {
00516         uip1[0]=(unsigned int)ip1[0];
00517         dp1x=p1[0]-(double)uip1[0];
00518         uip1[1]=(unsigned int)ip1[1];
00519         dp1y=p1[1]-(double)uip1[1];
00520         uip2[0]=(unsigned int)ip2[0];
00521         uip2[1]=(unsigned int)ip2[1];
00522         res=RegionMatcher::ParabolaNCC(uip1, uip2, im1.GetImageDataArray(),
00523                                        im2.GetImageDataArray(), halfwinsize,
00524                                        resu);
00525         result.Set(resu[0]+dp1x, resu[1]+dp1y);
00526         BIASDOUT(D_CORNER_MATCHER_PARABOLA, "\np1 "<<p1<<"\tp2 "<<p2
00527                  <<"\tuip1 "<<uip1[0]<<" "<<uip1[1]<<"\tuip2 "<<uip2[0]
00528                  <<" "<<uip2[1]<<"\tresu: "<<resu[0]<<" "<<resu[1]
00529                  <<"\tdp1x/y "<<dp1x<<" "<<dp1y);
00530       }
00531   }
00532   return res;
00533 }
00534
00535
00536 template <class StorageType>
00537 int CornerMatcher::ParabolaNCC5(HomgPoint2D& p1, HomgPoint2D& p2,
00538                                Image<StorageType>& im1,
00539                                Image<StorageType>& im2,
00540                                unsigned int halfwinsize,
00541                                HomgPoint2D& result)
00542 {
00543   int res=0;
00544   KLT_TYPE resu[2];
00545   unsigned int uip1[2], uip2[2];
00546   double dp1x, dp1y;
00547   int ip1[2], ip2[2];
00548   int minedgedist = halfwinsize + 2;
00549   if (p1.IsAtInfinity() || p2.IsAtInfinity()) {
00550     res=-2;
00551   } else {
00552     ip1[0]=(int)rint(p1[0]/p1[2]);
00553     ip1[1]=(int)rint(p1[1]/p1[2]);
00554     ip2[0]=(int)rint(p2[0]/p2[2]);
00555     ip2[1]=(int)rint(p2[1]/p2[2]);
00556     if (ip1[0] < minedgedist || ip1[0] + minedgedist>=(int)im1.GetWidth() ||
00557         ip1[1] < minedgedist || ip1[1] + minedgedist>=(int)im1.GetHeight() ||
00558         ip2[0] < minedgedist || ip2[0] + minedgedist>=(int)im2.GetWidth() ||
00559         ip2[1] < minedgedist || ip2[1] + minedgedist>=(int)im2.GetHeight() ){
00560         res=-1;
00561       } else {
00562         uip1[0]=(unsigned int)ip1[0];
00563         dp1x=p1[0]-(double)uip1[0];
00564         uip1[1]=(unsigned int)ip1[1];
00565         dp1y=p1[1]-(double)uip1[1];
00566         uip2[0]=(unsigned int)ip2[0];
00567         uip2[1]=(unsigned int)ip2[1];
00568         res=RegionMatcher::ParabolaNCC5(uip1, uip2, im1.GetImageDataArray(),
00569                                         im2.GetImageDataArray(), halfwinsize,
00570                                         resu);
00571         result.Set(resu[0]+dp1x, resu[1]+dp1y);
00572         BIASDOUT(D_CORNER_MATCHER_PARABOLA, "\np1 "<<p1<<"\tp2 "<<p2
00573                  <<"\tuip1 "<<uip1[0]<<" "<<uip1[1]<<"\tuip2 "<<uip2[0]
00574                  <<" "<<uip2[1]<<"\tresu: "<<resu[0]<<" "<<resu[1]
00575                  <<"\tdp1x/y "<<dp1x<<" "<<dp1y);
00576       }
00577   }
00578   return res;
00579 }
00580
00581
00582 template <class StorageType>
00583 int CornerMatcher::RefinePyramideNCC(vector<vector<HomgPoint2D> >& ps1,
00584                                      PyramidImage<StorageType>& im1,
00585                                      PyramidImage<StorageType>& im2,
00586                                      unsigned int halfnccwinsize,
00587                                      vector<vector<HomgPoint2D> >& matches,
00588                                      vector<vector<double> >& matchquality)
00589 {
00590   int res=0;
00591   unsigned p1[2], p2[2];
00592   StorageType **ida1, **ida2;
00593
00594   for (int lev=im1.size()-2; lev>=0; lev--){
00595     matches[lev].resize(ps1[lev].size());
00596     matchquality[lev].resize(ps1[lev].size());
00597     ida1=im1[lev]->GetImageDataArray();
00598     ida2=im2[lev]->GetImageDataArray();
00599     unsigned maxx=im1[lev]->GetWidth()-halfnccwinsize-1;
00600     unsigned maxy=im1[lev]->GetHeight()-halfnccwinsize-1;
00601     for (unsigned i=0; i<ps1[lev].size(); i++){
00602       p1[0]=(unsigned int)rint(ps1[lev][i][0]);
00603       p1[1]=(unsigned int)rint(ps1[lev][i][1]);
00604       p2[0]=((unsigned int)rint(matches[lev+1][i][0]))<<1;
00605       p2[1]=((unsigned int)rint(matches[lev+1][i][1]))<<1;
00606       if (p1[0]>halfnccwinsize && p1[0]<maxx &&
00607           p1[1]>halfnccwinsize && p1[1]<maxy &&
00608           p2[0]>halfnccwinsize && p2[0]<maxx &&
00609           p2[1]>halfnccwinsize && p2[1]<maxy &&
00610           matchquality[lev+1][i] > -1.0){
00611         NCCSearchEven(p1, p2, ida1, ida2, halfnccwinsize, 3, p2,
00612                       1.0, matchquality[lev][i]);
00613       } else {
00614         matchquality[lev][i]=-5.0;
00615       }
00616       matches[lev][i].Set((double)p2[0], (double)p2[1]);
00617       /*      cerr << lev << " : "<<setw(4)<<i<<" : "<<ps1[lev][i]
00618            <<"  <-->  "<<matches[lev][i]
00619            << "\t@ "<<matchquality[lev][i]<<"\t"<<p2[0]<<", "<<p2[1]<<endl;*/
00620     } // for (ps1it=ps1[lev].begin(); ps1it!=ps1[lev].end(); ps1it++){
00621   } // for (int lev=small-1; lev>=0; lev--)
00622   return res;
00623 }
00624
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/CornerMatcher.hh Source File

Matcher2D

CornerMatcher.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CornerMatcher_hh__
00027 #define __CornerMatcher_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Geometry/HomgPoint2D.hh>
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Image/Image.hh>
00033 #include <Image/PyramidImage.hh>
00034 #include "RegionMatcher.hh"
00035
00036 #define D_CORNER_MATCHER_SEARCH     0x0010
00037 #define D_CORNER_MATCHER_KLT        0x0020
00038 #define D_CORNER_MATCHER_PARABOLA   0x0040
00039 #define D_CORNER_MATCHER_PYKLT      0x0080
00040
00041 namespace BIAS {
00042
00043   /** @class CornerMatcher
00044       @ingroup corrG
00045       @brief class with various functions to detect corresponding image points
00046
00047       detailed desc.
00048   */
00049   class BIASMatcher2D_EXPORT CornerMatcher : public RegionMatcher
00050   {
00051   public:
00052
00053     CornerMatcher();
00054
00055     ~CornerMatcher();
00056
00057     /** wrapper for SSD from RegionMatcher, does boundary checks
00058         and casts uses rint to determine location of ssd*/
00059     template <class StorageType>
00060     int SSD(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00061              Image<StorageType>& im2, unsigned int halfwinsize,
00062              double& result);
00063
00064     /** wrapper for NCC from RegionMatcher, does boundary checks
00065         and casts uses rint to determine location of ncc */
00066     template <class StorageType>
00067     int NCC(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00068              Image<StorageType>& im2, unsigned int halfwinsize,
00069              double& result);
00070
00071     /** wrapper for RegionMatcher::NCCSearchOdd/NCCSearchEven,
00072         does boundary checks and casts     */
00073     template <class StorageType>
00074     int NCCSearch(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00075                   Image<StorageType>& im2, unsigned int halfnccwinsize,
00076                   unsigned int halfsearchwinsize, HomgPoint2D& resultpoint,
00077                   double mincorrelation, double& result);
00078
00079     /** wrapper with range checking for RegionMatcher::KLT
00080         for a description see RegionMatcher::KLT
00081         gradientborder is the halfwinsize of the gradient filter mask */
00082     //    template <class StorageType>
00083 //     int KLT(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00084 //             Image<StorageType>& im2, Image<StorageType>& gradx,
00085 //             Image<StorageType>& grady, unsigned int halfwinsize,
00086 //             unsigned int gradientborder, unsigned int numiterations,
00087 //             HomgPoint2D& result, KLT_TYPE& error);
00088
00089 //     /** as above, but iterates until either maxerror or maxnumiterations is
00090 //         reached */
00091 //     template <class StorageType>
00092 //     int KLT(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00093 //             Image<StorageType>& im2, Image<StorageType>& gradx,
00094 //             Image<StorageType>& grady, unsigned int halfwinsize,
00095 //             unsigned int gradientborder, unsigned int maxnumiterations,
00096 //             KLT_TYPE maxerror, HomgPoint2D& result, KLT_TYPE& error);
00097
00098 //     /** wrapper for RegionMatcher::KLT2 and pyramid images
00099 //         @authopr woelk 10/2003 */
00100 //     template <class StorageType>
00101 //     int KLT2(KLT_TYPE p1[2], KLT_TYPE p2[2], PyramidImage2<StorageType>& im1,
00102 //              PyramidImage2<StorageType>& im2, PyramidImage2<StorageType>& gx1,
00103 //              PyramidImage2<StorageType>& gy1, PyramidImage2<StorageType>& gx2,
00104 //              PyramidImage2<StorageType>& gy2, unsigned pyindex, unsigned hws,
00105 //              unsigned maxiterations, double SADThresh, KLT_TYPE maxerror,
00106 //              KLT_TYPE res[2], KLT_TYPE& error);
00107
00108     /** wrapper for RegionMatcher::ParabolaNCC */
00109     template <class StorageType>
00110     int ParabolaNCC(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00111                     Image<StorageType>& im2, unsigned int halfwinsize,
00112                     HomgPoint2D& result);
00113     /** wrapper for RegionMatcher::ParabolaNCC5 */
00114     template <class StorageType>
00115     int ParabolaNCC5(HomgPoint2D& p1, HomgPoint2D& p2, Image<StorageType>& im1,
00116                     Image<StorageType>& im2, unsigned int halfwinsize,
00117                     HomgPoint2D& result);
00118
00119     /** Assumes that ps1 is fully filled.
00120         The matches on the smallest pyramid level must be given,
00121         i.e. matches[im1.size()-1][i] must correspond to ps1[im1.size()-1][i]
00122         with correlation quality matchquality[i].
00123         It then propagates the matches to the upper (bigger) pyramid levels
00124         using ncc correlation.
00125         @author woelk 05 2003 */
00126     template <class StorageType>
00127     int RefinePyramideNCC(std::vector<std::vector<HomgPoint2D> >& ps1,
00128                           PyramidImage<StorageType>& im1,
00129                           PyramidImage<StorageType>& im2,
00130                           unsigned int halfnccwinsize,
00131                           std::vector<std::vector<HomgPoint2D> >& matches,
00132                           std::vector<std::vector<double> >& matchquality);
00133
00134
00135   }; // class
00136 } // namespace
00137 #endif // __CornerMatcher_hh__
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CovMatrix3x3.cpp Source File

Geometry

CovMatrix3x3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "CovMatrix3x3.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031
00032 CovMatrix3x3::CovMatrix3x3()
00033   : Matrix3x3<COVMATRIX3X3_TYPE>() {
00034   _IsDecomposed = false;
00035 }
00036
00037 CovMatrix3x3::~CovMatrix3x3() {}
00038
00039 CovMatrix3x3::CovMatrix3x3(const CovMatrix3x3& mat)
00040 {
00041   (*this) = mat;
00042 }
00043
00044 int CovMatrix3x3::GetPCA(Vector3<COVMATRIX3X3_TYPE>& S,
00045                          Matrix3x3<COVMATRIX3X3_TYPE>& VT)
00046 {
00047   if (!_IsDecomposed){
00048     if (_Decompose()!=0)
00049       return -1;
00050   } else {
00051 #ifdef BIAS_DEBUG
00052     if (memcmp( (void*)ConsistencyBackup_.GetData(),
00053                 (void*)GetData(), 9*sizeof(COVMATRIX3X3_TYPE))) {
00054       BIASERR("Corrupted Data in CovMatrix. Maybe you forgot to invalidate.");
00055       BIASABORT;
00056     }
00057 #endif
00058   }
00059   S  = _S;
00060   VT = _VT;
00061
00062   return 0;
00063 }
00064
00065 int CovMatrix3x3::GetS(Vector3<COVMATRIX3X3_TYPE>& S)
00066 {
00067   if (!_IsDecomposed){
00068     if (_Decompose()!=0)
00069       return -1;
00070   } else {
00071 #ifdef BIAS_DEBUG
00072     if (memcmp( (void*)ConsistencyBackup_.GetData(),
00073                 (void*)GetData(), 9*sizeof(COVMATRIX3X3_TYPE))) {
00074       BIASERR("Corrupted Data in CovMatrix. Maybe you forgot to invalidate.");
00075       BIASABORT;
00076     }
00077 #endif
00078   }
00079
00080   S = _S;
00081
00082   return 0;
00083 }
00084
00085 int CovMatrix3x3::_Decompose()
00086 {
00087   if (_svd.Compute(*this)!=0){
00088     return -1;
00089   }
00090   _S = Vector3<COVMATRIX3X3_TYPE>(_svd.GetS());
00091   _VT = Matrix3x3<COVMATRIX3X3_TYPE>(_svd.GetVT());
00092   _U = Matrix3x3<COVMATRIX3X3_TYPE>(_svd.GetU());
00093 #ifdef BIAS_DEBUG
00094   ConsistencyBackup_        = (Matrix3x3<COVMATRIX3X3_TYPE>) (*this);
00095 #endif
00096   _IsDecomposed = true;
00097
00098   return 0;
00099 }
00100
00101
00102 CovMatrix3x3& CovMatrix3x3::operator=(const CovMatrix3x3& mat)
00103 {
00104   Matrix3x3<COVMATRIX3X3_TYPE>::operator=(mat);
00105   _S  = mat._S;
00106   _U  = mat._U;
00107   _VT = mat._VT;
00108
00109 #ifdef BIAS_DEBUG
00110   ConsistencyBackup_        = mat.ConsistencyBackup_;
00111 #endif
00112   _IsDecomposed = mat._IsDecomposed;
00113
00114   //_svd=mat._svd;
00115   return (*this);
00116 }
00117
00118
00119 /** Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image  as
00120     determined from the projected covariance matrix covmat. */
00121 int CovMatrix3x3::GetSearchArea(PMatrixBase& P, HomgPoint3D& point3D,
00122                                 Vector2<double>& x, Vector2<double>& y,
00123                                 double scale)
00124 {
00125   int result=0;
00126
00127   Vector3<double> S, TT;
00128   Matrix3x3<double> VT;
00129   HomgPoint3D M;
00130   HomgPoint2D m, point2d;
00131   if (GetPCA(S,VT)!=0){
00132     result = -1;
00133   }
00134
00135   x.Set(DBL_MAX,-DBL_MAX); y.Set(DBL_MAX,-DBL_MAX);
00136   for (int i=0;i<num_rows(); i++)
00137     for (double sig=-1; sig <= 1.1; sig+=2){
00138       // compute point on uncertainty ellipsoid
00139       //      HomgPoint3D T(VT.GetRow(i)); T.Homogenize();
00140       TT.Set(VT.GetRow(i));
00141       TT *= (sig*scale*S[i]);
00142       point3D.Homogenize();
00143       TT[0] +=point3D[0];
00144       TT[1] +=point3D[1];
00145       TT[2] +=point3D[2];
00146       M.Set(TT[0], TT[1], TT[2]);
00147       // project into image
00148       m=P*M;
00149       m.Homogenize();
00150       // update bounding box params
00151       if (m[0]<x[0]) x[0]=m[0];
00152       if (m[0]>x[1]) x[1]=m[0];
00153       if (m[1]<y[0]) y[0]=m[1];
00154       if (m[1]>y[1]) y[1]=m[1];
00155     }
00156
00157   //// check if the projected point3D is in the box
00158   //// otherwise one or more 3DPoints of the ellipsoid are behind the camera
00159   point2d=P*point3D;
00160   point2d.Homogenize();
00161   if (x[1]<point2d[0]) {
00162     x[0]=x[1]; x[1]=DBL_MAX;
00163   }
00164   if (x[0]>point2d[0]) {
00165     x[1]=x[0]; x[0]=-DBL_MAX;
00166   }
00167
00168   if (y[1]<point2d[1]) {
00169     y[0]=y[1]; y[1]=DBL_MAX;
00170   }
00171   if (y[0]>point2d[1]) {
00172     y[1]=y[0]; y[0]=-DBL_MAX;
00173   }
00174
00175   return result;
00176 }
00177
00178 /** Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image  as
00179     determined from the projected covariance matrix covmat.
00180     A min Search Area can be specified with minSearchArea(which is the
00181     radius of the uncertainty sphere).
00182
00183 */
00184 int CovMatrix3x3::GetSearchArea(PMatrixBase& P, HomgPoint3D& point3D,
00185                                 Vector2<double>& x, Vector2<double>& y,
00186                                 double scale, double minSearchArea)
00187 {
00188   int result=0;
00189
00190   Vector3<double> S, TT;
00191   Matrix3x3<double> VT;
00192   HomgPoint3D M;
00193   HomgPoint2D m, point2d;
00194   if (GetPCA(S,VT)!=0){
00195     result = -1;
00196   }
00197   point3D.Homogenize();
00198   x.Set(DBL_MAX,-DBL_MAX); y.Set(DBL_MAX,-DBL_MAX);
00199   for (int i=0;i<num_rows(); i++)
00200     for (double sig=-1; sig <= 1.1; sig+=2){
00201       // compute point on uncertainty ellipsoid
00202       //      HomgPoint3D T(VT.GetRow(i)); T.Homogenize();
00203       TT.SetZero();
00204       TT[i]=1.0;
00205       // at first calculate minimum area with scaled unit sphere
00206       TT *= sig*minSearchArea;
00207       TT[0] +=point3D[0];
00208       TT[1] +=point3D[1];
00209       TT[2] +=point3D[2];
00210       M.Set(TT[0], TT[1], TT[2]);
00211       //// project into image
00212       m=P*M;
00213       m.Homogenize();
00214       // update bounding box params
00215       if (m[0]<x[0]) x[0]=m[0];
00216       if (m[0]>x[1]) x[1]=m[0];
00217       if (m[1]<y[0]) y[0]=m[1];
00218       if (m[1]>y[1]) y[1]=m[1];
00219
00220       //// second: project real cov Matrix
00221       TT.Set(VT.GetRow(i));
00222       TT *= (sig*scale*S[i]);
00223       TT[0] +=point3D[0];
00224       TT[1] +=point3D[1];
00225       TT[2] +=point3D[2];
00226       M.Set(TT[0], TT[1], TT[2]);
00227       // project into image
00228       m=P*M;
00229       m.Homogenize();
00230       // update bounding box params
00231       if (m[0]<x[0]) x[0]=m[0];
00232       if (m[0]>x[1]) x[1]=m[0];
00233       if (m[1]<y[0]) y[0]=m[1];
00234       if (m[1]>y[1]) y[1]=m[1];
00235     }
00236
00237   //// check if the projected point3D is in the box
00238   //// otherwise one or more 3DPoints of the ellipsoid are behind the camera
00239   point2d=P*point3D;
00240   point2d.Homogenize();
00241   if (x[1]<point2d[0]) {
00242     x[0]=x[1]; x[1]=DBL_MAX;
00243   }
00244   if (x[0]>point2d[0]) {
00245     x[1]=x[0]; x[0]=-DBL_MAX;
00246   }
00247
00248   if (y[1]<point2d[1]) {
00249     y[0]=y[1]; y[1]=DBL_MAX;
00250   }
00251   if (y[0]>point2d[1]) {
00252     y[1]=y[0]; y[0]=-DBL_MAX;
00253   }
00254
00255   return result;
00256 }
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/CovMatrix3x3.hh Source File

Geometry

CovMatrix3x3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __CovMatrix3x3_hh__
00027 #define __CovMatrix3x3_hh__
00028
00029 #include <Base/Math/Matrix3x3.hh>
00030 #include <Base/Geometry/PMatrixBase.hh>
00031 #include <Base/Geometry/HomgPoint3DCov.hh>
00032 #include <MathAlgo/SVD.hh>
00033
00034 #define COVMATRIX3X3_TYPE double
00035
00036 namespace BIAS {
00037   /** @class CovMatrix3x3
00038       @ingroup g_math
00039       @ingroup g_geometry
00040       @brief class for 3x3 covariance matrices
00041
00042       This class represents a 3x3 convariance matrix with the capability of
00043       doing a PCA (principle component analysis).
00044
00045       @attention For performance reasons, the PCA is only done once and saved,
00046       subsequent calls to GetPCA() only return a copy.
00047       If the covariance matrix is changed, you must call InvalidatePCA()
00048       to force a recomputation at the next GetPCA()-Call ! */
00049
00050   class BIASGeometry_EXPORT CovMatrix3x3 : public Matrix3x3<COVMATRIX3X3_TYPE>
00051   {
00052   public:
00053     CovMatrix3x3();
00054
00055     ~CovMatrix3x3();
00056
00057     CovMatrix3x3(const CovMatrix3x3& mat);
00058
00059     explicit CovMatrix3x3(const MatrixInitType& i)
00060       : Matrix3x3<COVMATRIX3X3_TYPE>(i){};
00061
00062     CovMatrix3x3(const Matrix3x3<COVMATRIX3X3_TYPE> & mat)
00063       { (*this) = mat; };
00064
00065
00066     int GetPCA(Vector3<COVMATRIX3X3_TYPE>& S,
00067                Matrix3x3<COVMATRIX3X3_TYPE>& VT);
00068
00069     int GetS(Vector3<COVMATRIX3X3_TYPE>& S);
00070
00071     CovMatrix3x3& operator=(const CovMatrix3x3& mat);
00072
00073     CovMatrix3x3& operator=(const BIAS::Matrix3x3<COVMATRIX3X3_TYPE>& mat) {
00074       Matrix3x3<COVMATRIX3X3_TYPE>::operator=(mat);
00075       _IsDecomposed = false;  return (*this); };
00076
00077     /** @brief returns matrix's trace. If this = V * S * V^T, trace means |S|^2
00078         and provides a scalar measure of how uncertain a 3D point is.
00079
00080         Note the difference to det() which means geometric averaging of
00081         singular values rather than arithmetic. If you want to imagine an
00082         ellipsoid, trace is proportional to the mean axis length, while det
00083         is more like the space inside the ellipsoid.
00084         @author koeser */
00085     double Trace() const {
00086       return ((*this)[0][0] + (*this)[1][1] + (*this)[2][2]);
00087     }
00088
00089
00090     /** Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image  as
00091         determined from the projected covariance matrix covmat. multiplied with
00092         scale
00093         @author frahm, woelk 02 2003 */
00094     int GetSearchArea(PMatrixBase& P, HomgPoint3D& point3D,
00095                       Vector2<double>& x, Vector2<double>& y, double scale);
00096
00097     /** Computes the bounding box x=[xmin,xmax] , y=[ymin,ymax] in image  as
00098         determined from the projected covariance matrix covmat.
00099         A min Search Area can be specified with minSearchArea(which is the
00100         radius of the uncertainty sphere).
00101         @author Daniel Grest, Feb 2003
00102     */
00103     int GetSearchArea(PMatrixBase& P, HomgPoint3D& point3D,
00104               Vector2<double>& x, Vector2<double>& y,
00105               double scale, double minSearchArea);
00106
00107
00108     /** Call this function to indicate that the matrix fields have changed
00109         The saved PCA is declared invalid and the next call to GetPCA forces
00110         a recomputation
00111         @author koeser 09/2003 */
00112     inline void InvalidatePCA() { _IsDecomposed = false; };
00113
00114     /** Type conversion for homogenous covariances
00115         @author streckel 05/2006 */
00116     HomgPoint3DCov GetHomogenized() const {
00117       Matrix4x4<double> dum((*this)[0][0],(*this)[0][1],(*this)[0][2],0,
00118                             (*this)[1][0],(*this)[1][1],(*this)[1][2],0,
00119                             (*this)[2][0],(*this)[2][1],(*this)[2][2],0,
00120                             0,0,0,0);
00121       HomgPoint3DCov ch(dum);
00122       return ch;
00123     }
00124
00125     /** Type conversion for homogenous covariances
00126         @author streckel 05/2006 */
00127     void SetFromHomogenized(const HomgPoint3DCov& ch, const HomgPoint3D& ph) {
00128       //unconst variables
00129       HomgPoint3D myph(ph);
00130       HomgPoint3DCov mych(ch);
00131       mych.Homogenize(myph);
00132       Matrix3x3<double> mat(mych[0][0],mych[0][1],mych[0][2],
00133                             mych[1][0],mych[1][1],mych[1][2],
00134                             mych[2][0],mych[2][1],mych[2][2]);
00135       CovMatrix3x3 cov(mat);
00136       *this = cov;
00137     }
00138
00139   protected:
00140     /// flag indicating whether the stored PCA is still valid
00141     bool _IsDecomposed;
00142
00143
00144
00145 #ifdef BIAS_DEBUG
00146     /// saves matrix fields to make consistency checks possible later
00147     Matrix3x3<COVMATRIX3X3_TYPE> ConsistencyBackup_;
00148 #endif
00149
00150     SVD _svd;
00151     Vector3<COVMATRIX3X3_TYPE> _S;
00152     Matrix3x3<COVMATRIX3X3_TYPE> _U, _VT;
00153
00154     int _Decompose();
00155   }; // class
00156
00157
00158
00159 } // namespace
00160
00161
00162 #endif // __CovMatrix3x3_hh__
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommBase.cpp Source File

NetworkComm

CScommBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00027 #endif
00028
00029 #include "CScommBase.hh"
00030
00031 #ifdef WIN32
00032 #  include <winsock2.h>
00033 #else //WIN32
00034 #  include <netinet/in.h>
00035 #  include <sys/socket.h>
00036 #  include <netdb.h>
00037 #  include <unistd.h>
00038 #endif //WIN32
00039
00040 #include <sys/types.h>
00041 #include <stdio.h>
00042 #include <Base/Debug/TimeMeasure.hh>
00043 #include <Base/Debug/Error.hh>
00044
00045 using namespace std;
00046 using namespace BIAS;
00047
00048 const unsigned int maxBinaryG= 1<<24; // 16MB
00049
00050
00051 CScommBase::~CScommBase()
00052 {
00053   //if threaded recv is active ...
00054   if (threaded_) {
00055     //... tell threads to stop ...
00056     terminateReceiver_=true;
00057     //... and wait unitl all receive-threads are finished
00058     for (unsigned int i=0;i<commPartners_.size();i++) {
00059       if (commPartners_[i].connected) {
00060         pthread_join(commPartners_[i].threadid,NULL);
00061       }
00062     }
00063   } else {
00064     //else close all connections
00065     for (unsigned int i=0;i<commPartners_.size();i++) {
00066       if (commPartners_[i].connected) {
00067 #ifdef WIN32
00068         closesocket(commPartners_[i].fd);
00069 #else //WIN32
00070         close(commPartners_[i].fd);
00071 #endif //WIN32
00072       }
00073     }
00074   }
00075
00076 #ifdef WIN32
00077   //do cleanup for winsock-DLL
00078   WSACleanup();
00079 #endif //WIN32
00080 }
00081
00082 CScommBase::CScommBase(bool threaded) : logOut_(std::cout.rdbuf()),
00083 verboseOut_(std::cout.rdbuf())
00084 {
00085   //SetDebugLevel(D_CS_ANALYZE | D_CS_RECEIVER |  D_CS_CONNECT  |
00086   //            D_CS_LISTENER | D_CS_SEND);
00087   timeOut_=0; // no timeOut
00088   onlyNewMsgs_=true;
00089   connectPort_=D_CS_DEFAULT_PORT;
00090   portChange_=false;
00091   threaded_ = threaded;
00092   terminateReceiver_=false;
00093   commPartners_.resize(D_CS_MAXCLIENTS);
00094   commPartnersConnected_=0;
00095   log_=false;
00096   verbose_=false;
00097   registeredMsgs_.reserve(100);
00098   timeOutFlag_=false;
00099   keepAll_=false;
00100   pthread_mutex_init(&registerLock_,NULL);
00101
00102 #ifdef WIN32
00103   /* activate sockets within WIN32*/
00104   {
00105     WSADATA wsa;
00106     if (WSAStartup(MAKEWORD(1, 1), &wsa))
00107     {
00108       BIASERR("WSAStartup() failed with error: "
00109         << (unsigned long)GetLastError() << "\n");
00110       exit(-1);
00111     }
00112   }
00113 #endif //WIN32
00114 }
00115
00116
00117 ///  -----
00118 #include <Base/Common/BIASpragmaStart.hh>
00119
00120 CScommBase::CScommBase(const CScommBase & /*arg*/)
00121 : logOut_(std::cout.rdbuf()),
00122 verboseOut_(std::cout.rdbuf())
00123 {
00124   BIASERR("not implemented");
00125   BIASABORT;
00126 }
00127
00128 CScommBase &
00129 CScommBase ::operator=(const CScommBase & arg)
00130 {
00131   BIASERR("not implemented");
00132   BIASABORT;
00133   return *this;
00134 }
00135 #include <Base/Common/BIASpragmaEnd.hh>
00136 // -----
00137
00138
00139 int CScommBase::GetData_(const string &msgName)
00140 {
00141   // check for registered msg
00142   // first in the indexMap, then search extensively
00143   int index=-1;
00144   map<string, int>::iterator it;
00145   BIASDOUT(D_CS_GETDATA,"Searchin index for:"<<msgName);
00146   if ( (it=indexRegMsgs_.find(msgName)) != indexRegMsgs_.end() ) {
00147     index= it->second;
00148   } else { // search for index
00149     unsigned int i=0;
00150     while ( (index==-1) && i<registeredMsgs_.size() ) {
00151       if ((registeredMsgs_[i].msgName.compare(msgName)==0))
00152         index=i;
00153       i++;
00154     }
00155     if (index<0) {
00156       BIASERR("GetData(): msg "<< msgName<<" not registered");
00157       return -1;
00158     }
00159     // new entry in the map
00160     indexRegMsgs_[msgName]=index;
00161   }
00162   BIASDOUT(D_CS_GETDATA,"found index: "<<index);
00163   return index;
00164 }
00165
00166 int CScommBase::GetData(const string &msgName, vector<float> &floatData)
00167 {
00168   int retValue=0;
00169   int index=GetData_(msgName);
00170   if (index>=0) {
00171     // check for new data and copy it
00172     if (threaded_)
00173       pthread_mutex_lock(&registeredMsgs_[index].dataLock);
00174     if (registeredMsgs_[index].newData) {
00175       floatData=registeredMsgs_[index].floatData;
00176       registeredMsgs_[index].newData=false;
00177     } else {
00178       if (threaded_) retValue=1;
00179       else {
00180         syncReceive_();
00181         if (registeredMsgs_[index].newData) {
00182           floatData=registeredMsgs_[index].floatData;
00183           registeredMsgs_[index].newData=false;
00184         } else retValue=1;
00185       }
00186     }
00187     if (threaded_)
00188       pthread_mutex_unlock(&registeredMsgs_[index].dataLock);
00189   } else retValue=index;
00190   return retValue;
00191 }
00192
00193 int CScommBase::GetData(const string &msgName, vector<int> &intData)
00194 {
00195   int retValue=0;
00196   int index=GetData_(msgName);
00197   if (index>=0) {
00198     // check for new data and copy it
00199     if (threaded_)
00200       pthread_mutex_lock(&registeredMsgs_[index].dataLock);
00201     if (registeredMsgs_[index].newData) {
00202       intData=registeredMsgs_[index].intData;
00203       registeredMsgs_[index].newData=false;
00204     } else {
00205       if (threaded_) retValue=1;
00206       else {
00207         syncReceive_();
00208         if (registeredMsgs_[index].newData) {
00209           intData=registeredMsgs_[index].intData;
00210           registeredMsgs_[index].newData=false;
00211         } else retValue=1;
00212       }
00213     }
00214     if (threaded_)
00215       pthread_mutex_unlock(&registeredMsgs_[index].dataLock);
00216   } else retValue=index;
00217   return retValue;
00218 }
00219
00220
00221 int CScommBase::GetData(const string &msgName, vector<string> &stringData)
00222 {
00223   int retValue=0;
00224   int index=GetData_(msgName);
00225   if (index>=0) {
00226     // check for new data and copy it
00227     if (threaded_)
00228       pthread_mutex_lock(&registeredMsgs_[index].dataLock);
00229     if (registeredMsgs_[index].newData) {
00230       stringData=registeredMsgs_[index].stringData;
00231       registeredMsgs_[index].newData=false;
00232     } else {
00233       if (threaded_) retValue=1;
00234       else {
00235         syncReceive_();
00236         if (registeredMsgs_[index].newData) {
00237           stringData=registeredMsgs_[index].stringData;
00238           registeredMsgs_[index].newData=false;
00239         } else retValue=1;
00240       }
00241     }
00242     if (threaded_)
00243       pthread_mutex_unlock(&registeredMsgs_[index].dataLock);
00244   } else retValue=index;
00245   return retValue;
00246 }
00247
00248
00249 int CScommBase::GetData(const string &msgName, vector<char> &binaryData)
00250 {
00251   int retValue=0;
00252   int index=GetData_(msgName);
00253   if (index>=0) {
00254     // check for new data and copy it
00255     if (threaded_)
00256       pthread_mutex_lock(&registeredMsgs_[index].dataLock);
00257     if (registeredMsgs_[index].newData) {
00258       binaryData.resize(registeredMsgs_[index].binaryDataSize);
00259       memcpy(&(binaryData[0]),
00260         registeredMsgs_[index].binaryData,
00261         registeredMsgs_[index].binaryDataSize);
00262       registeredMsgs_[index].newData=false;
00263     } else {
00264       if (threaded_) retValue=1;
00265       else {
00266         syncReceive_();
00267         if (registeredMsgs_[index].newData) {
00268           binaryData.resize(registeredMsgs_[index].binaryDataSize);
00269           memcpy(&(binaryData[0]),
00270             registeredMsgs_[index].binaryData,
00271             registeredMsgs_[index].binaryDataSize);
00272           registeredMsgs_[index].newData=false;
00273         } else retValue=1;
00274       }
00275     }
00276     if (threaded_)
00277       pthread_mutex_unlock(&registeredMsgs_[index].dataLock);
00278   } else retValue=index;
00279   return retValue;
00280 }
00281
00282 int CScommBase::WaitForNewMessage(std::string &msgName)
00283 {
00284   if (threaded_) {
00285     BIASERR("not working for threaded");
00286     return -2;
00287   }
00288   // look for new msgs in the slots
00289   int nrMewMsgs=0;
00290   for (unsigned int s=0; s<registeredMsgs_.size(); s++) {
00291     if (registeredMsgs_[s].newData) {
00292       msgName=registeredMsgs_[s].msgName;
00293       nrMewMsgs++;
00294     }
00295   }
00296
00297   while (nrMewMsgs==0) { // wait for new msgs
00298     syncReceive_(); // blocks until new data arrived
00299
00300     // look which one arrived
00301     for (unsigned int s=0; s<registeredMsgs_.size(); s++) {
00302       if (registeredMsgs_[s].newData) {
00303         msgName=registeredMsgs_[s].msgName;
00304         nrMewMsgs++;
00305       }
00306     }
00307   }
00308
00309   return nrMewMsgs-1;
00310 }
00311
00312 int
00313 CScommBase::RegisterMsg(string msgName,  EdataType dataType, int amount)
00314 {
00315   return RegisterMsg(string(""), msgName, dataType, amount);
00316 }
00317
00318 int
00319 CScommBase::RegisterMsg(string commPartnerName,
00320                         string msgName,  EdataType dataType, int amount)
00321 {
00322 #ifdef BIAS_DEBUG
00323   // look if this msg was registered already
00324   for (unsigned int i=0;i<registeredMsgs_.size();i++) {
00325     if ( (registeredMsgs_[i].msgName.compare(msgName)==0) ) {
00326       BIASERR("msg:"<<msgName<<" already registered for:"
00327         <<registeredMsgs_[i].commName);
00328       return -1;
00329     }
00330   }
00331 #endif
00332
00333   CScommMsg newMsg;
00334   newMsg.msgName=msgName;
00335   newMsg.commName=commPartnerName;
00336   newMsg.dataType=dataType;
00337   newMsg.dataSize=amount;
00338   if (dataType==CS_BINARY)
00339     amount=0;
00340   newMsg.server=isServer_;
00341
00342   if (threaded_) pthread_mutex_lock(&registerLock_);
00343
00344   registeredMsgs_.push_back(newMsg);
00345
00346   if (threaded_)
00347   {
00348     pthread_mutex_init(&registeredMsgs_.back().dataLock,NULL);
00349     pthread_mutex_unlock(&registerLock_);
00350   }
00351
00352   return 0;
00353 }
00354
00355
00356 int CScommBase::SendMsg(const string &msgName, vector<float> &floatData)
00357 {
00358   string data;
00359   data.reserve(msgName.size()+19*floatData.size());
00360   char dummy[24];
00361   data = '[' + msgName + ']' + ' ';
00362   for (unsigned int f=0;f<floatData.size();f++) {
00363     sprintf(dummy,"%.12f ",floatData[f]);
00364     data+= dummy;
00365   }
00366   return SendMsg_(data);
00367 }
00368
00369 int CScommBase::SendMsg(const string &msgName, vector<int> &intData)
00370 {
00371   string data;
00372   data.reserve(msgName.size()+20*intData.size());
00373   char dummy[24];
00374   data = '[' + msgName + ']' + ' ';
00375   for (unsigned int f=0;f<intData.size();f++) {
00376     sprintf(dummy,"%i ",intData[f]);
00377     data+= dummy;
00378   }
00379   return SendMsg_(data);
00380 }
00381
00382 int CScommBase::SendMsg(const string &msgName, vector<string> &stringData)
00383 {
00384   string data;
00385   data.reserve(msgName.size()+20*stringData.size());
00386   data = '[' + msgName + ']' + ' ';
00387   for (unsigned int i=0;i<stringData.size();i++) {
00388     data+= (stringData[i]+string(" "));
00389   }
00390   return SendMsg_(data);
00391 }
00392
00393 int CScommBase::SendMsg_(const string &data)
00394 {
00395   int res;
00396   for (unsigned int i=0;i<commPartners_.size();i++) {
00397     if (commPartners_[i].connected) {
00398       if (log_) {
00399         logOut_<<mygetpid()<<": Sending "<<data.size()
00400           <<" bytes to "<<commPartners_[i].name<<"."<<endl;
00401         logOutPut_(data.c_str(),data.size());
00402       }
00403 #ifdef WIN32
00404       res = send(commPartners_[i].fd, data.c_str(),data.size(),0);
00405 #else //WIN32
00406       res = send(commPartners_[i].fd, data.c_str(),data.size(),MSG_NOSIGNAL);
00407 #endif //WIN32
00408       if (res <= 0) {
00409         BIASERR(mygetpid()<<"sendmsg() error sending data");
00410         return -1;
00411       }
00412     }
00413   }
00414   return 0;
00415 }
00416
00417 int CScommBase::SendMsg(const std::string &msgName,
00418                         char* binaryData, unsigned int size)
00419 {
00420   std::vector<char> data;
00421   char dummy[255];
00422   sprintf(dummy,"[%s] %i ",msgName.c_str(),size);
00423   int pos=strlen(dummy);
00424   data.resize(pos+size);
00425   memcpy(&data[0],dummy,pos);
00426   memcpy(&data[pos], binaryData,size);
00427
00428   int res;
00429   for (unsigned int i=0;i<commPartners_.size();i++) {
00430     if (commPartners_[i].connected) {
00431       if (log_) {
00432         logOut_<<mygetpid()<<": Sending "<<data.size()
00433           <<" bytes of binary data to "
00434           <<commPartners_[i].name<<"."<<endl;
00435       }
00436 #ifdef WIN32
00437       res = send(commPartners_[i].fd, &(data[0]),data.size(),0);
00438 #else //WIN32
00439       res = send(commPartners_[i].fd, &(data[0]),data.size(),MSG_NOSIGNAL);
00440 #endif //WIN32
00441       if (res <= 0) {
00442         BIASERR(mygetpid()<<"sendmsg() error sending data");
00443         return -1;
00444       }
00445     }
00446   }
00447   return 0;
00448 }
00449
00450 int CScommBase::SendMsg(const std::string commPartnerName,
00451                         const std::string &msgName,
00452                         char* binaryData, unsigned int size)
00453 {
00454   for (unsigned int i=0;i<commPartners_.size();i++) {
00455     if (GetCommPartnerName(i)==commPartnerName) {
00456       return SendMsg(i, msgName, binaryData, size);
00457     }
00458   }
00459   return -2;
00460 }
00461
00462 int CScommBase::SendMsg(int commPartnerNr,
00463                         const std::string &msgName,
00464                         char* binaryData, unsigned int size)
00465 {
00466   std::vector<char> data;
00467   char dummy[255];
00468   sprintf(dummy,"[%s] %i ",msgName.c_str(),size);
00469   int pos=strlen(dummy);
00470   data.resize(pos+size);
00471   memcpy(&data[0],dummy,pos);
00472   memcpy(&data[pos], binaryData,size);
00473
00474   if (commPartners_[commPartnerNr].connected) {
00475     if (log_) {
00476       logOut_<<mygetpid()<<": Sending "<<data.size()
00477         <<" bytes of binary data to "
00478         <<commPartners_[commPartnerNr].name<<"."<<endl;
00479     }
00480 #ifdef WIN32
00481     int res = send(commPartners_[commPartnerNr].fd,
00482       &(data[0]),data.size(),0);
00483 #else //WIN32
00484     int res = send(commPartners_[commPartnerNr].fd,
00485       &(data[0]),data.size(),MSG_NOSIGNAL);
00486 #endif //WIN32
00487     if (res < 0) {
00488       BIASERR(mygetpid()<<"sendmsg() error sending data:"<<strerror(errno));
00489       return -1;
00490     }
00491   } else return -2;
00492   return 0;
00493 }
00494
00495 int
00496 CScommBase::CheckRegisteredMsgs_(string &msgName, const CScommData &cPartner,
00497                                  EdataType &dataTypeToRead,
00498                                  unsigned int &dataSizeToRead)
00499 {
00500   int retValue=-1;
00501   // check if this msg is registered for this comm partner
00502   int msgFound=-1;
00503
00504   if (threaded_) pthread_mutex_lock(&registerLock_);
00505
00506   BIASDOUT(D_CS_ANALYZE,"checking, if msg is registered");
00507   for (unsigned int i=0;i<registeredMsgs_.size();i++) {
00508     if (registeredMsgs_[i].msgName.compare(msgName)==0) {
00509       if ( (registeredMsgs_[i].commName.size()==0) ||
00510         (registeredMsgs_[i].commName.compare(cPartner.name)==0) ) {
00511           if ( (isServer_ && registeredMsgs_[i].server)  ||
00512             (!isServer_ && !registeredMsgs_[i].server) ) {
00513               msgFound=i;
00514               // if the msg is registered without commName bind it to this
00515               // commPartner
00516               if (registeredMsgs_[i].commName.size()==0)
00517                 registeredMsgs_[i].commName=cPartner.name;
00518             } else {
00519               BIASERR(mygetpid()<<
00520                 ": msg not registered for acceptance for this commParnter");
00521               retValue=-1;
00522             }
00523         } else {
00524           BIASERR(mygetpid()<<
00525             ": msg:"<<msgName<<" not registered from:"<<cPartner.name);
00526           retValue=-2;
00527         }
00528     }
00529   }
00530   // set the dataType to read and the dataSize
00531   if (msgFound>=0) {
00532     dataTypeToRead=  registeredMsgs_[msgFound].dataType;
00533     dataSizeToRead=  registeredMsgs_[msgFound].dataSize;;
00534     retValue=msgFound;
00535   }
00536
00537   if (threaded_) pthread_mutex_unlock(&registerLock_);
00538
00539   BIASDOUT(D_CS_GETDATA,"msg:"<<msgName<<" has index "<<msgFound);
00540   return retValue;
00541 }
00542
00543
00544 //  Communication is organized like follows: For each commPartner
00545 //     a msg buffer is filled with incoming bytes, where data is stored
00546 //     as long there are incomplete msgs.<br>
00547 //     Complete msgs are copied to the registered Msgs data field.
00548 //    Complete binary msgs are not copied but just a pointer is stored
00549 int CScommBase::AnalyzeData_(int commNr)
00550 {
00551
00552   //// read the data, parse for registered msgs, copy data to msgBuffer_
00553   CScommData &cPartner= commPartners_[commNr]; // for faster access
00554
00555   // parse for registered msgs
00556   unsigned int pos= cPartner.lastProcessed, end =  cPartner.msgBuffer.size();
00557   //unsigned int lastProcessed=0;
00558   BIASDOUT(D_CS_ANALYZE,"msgBuffer.size():"<< cPartner.msgBuffer.size()
00559     <<"pos: "<<pos<<" end:"<<end);
00560
00561   if (cPartner.msgBuffer.size()<=3) {
00562     // there is nothing to analyze yet, collect more data first
00563     return 1;
00564   }
00565
00566   //   if  (binaryMsgActive_)
00567   //     AnalyzeBinaryMsg_();
00568
00569   int retValue=0;
00570   string msgName;
00571   msgName.reserve(100);
00572   bool bMsgOk=true;
00573   unsigned int dataSizeToRead = 0;
00574   EdataType dataTypeToRead = CS_NONE;
00575   int msgIndex=-1;
00576   bool waitForMore=false;
00577   while ((pos<end) && (!waitForMore)) {
00578     msgName= "";
00579     msgIndex= -1;
00580     BIASDOUT(D_CS_ANALYZE,"msgBuffer.size():"<< cPartner.msgBuffer.size()
00581       <<"pos: "<<pos<<" end:"<<end);
00582
00583     // go to first char of msgName
00584     while ((pos<end) && cPartner.msgBuffer[pos]!='[' ) pos++;
00585     // we are at end or at '['
00586     while ((pos<end) && (cPartner.msgBuffer[pos]=='[' ||
00587       cPartner.msgBuffer[pos]==' ') ) pos++;
00588     //read msgName
00589     BIASDOUT(D_CS_ANALYZE,"reading msg name at pos:"<<pos);
00590     while ((pos<end) && cPartner.msgBuffer[pos]!=']') {
00591       msgName.push_back(cPartner.msgBuffer[pos]);
00592       pos++;
00593     }
00594     if (pos>=end) {
00595       if (retValue<2) retValue=2;
00596     } else { // check for registered msg
00597       if ( (msgIndex=CheckRegisteredMsgs_(msgName, cPartner,
00598         dataTypeToRead, dataSizeToRead))<0) {
00599           string msgNameCut=msgName;
00600           if (msgNameCut.length()>30)
00601             msgName.resize(30);
00602           BIASERR(mygetpid()<<": not a registered msg: "<<msgName
00603             <<" for commPartner:" << cPartner.name);
00604           // go to next '[' and clear buffer
00605           while ((pos<end) && (cPartner.msgBuffer[pos]!=']')) pos++;
00606           cPartner.lastProcessed=pos;
00607         }
00608     }
00609     BIASDOUT(D_CS_ANALYZE,"msgName: "<< msgName);
00610     if (msgIndex>=0) {
00611       // read data until next '[' or end
00612       unsigned int dataRead=0;
00613       string dummy;
00614       vector<string> dummyList;
00615       dummy.reserve(100);
00616       bool bNextMsg=false;
00617       while ( (pos<end) && !bNextMsg) {
00618         while ((pos<end) && (cPartner.msgBuffer[pos]==']' ||
00619           cPartner.msgBuffer[pos]==' ') ) pos++;
00620         dummy="";
00621         while ((pos<end) && cPartner.msgBuffer[pos]!=' '  &&
00622           cPartner.msgBuffer[pos]!='[' ) {
00623             dummy.push_back(cPartner.msgBuffer[pos]);
00624             pos++;
00625           }
00626           BIASDOUT(D_CS_ANALYZE,"trying to read data pos:"<< pos);
00627           if (pos<end) { // one data type read
00628             dummyList.push_back(dummy);
00629             dataRead++;
00630           }
00631           if (dataTypeToRead!=CS_BINARY) {
00632             while ((pos<end) && (cPartner.msgBuffer[pos]==']' ||
00633               cPartner.msgBuffer[pos]==' ') ) pos++;
00634             if (cPartner.msgBuffer[pos]=='[') {
00635               bNextMsg=true;
00636               cPartner.lastProcessed=pos;
00637               if (dataRead!=dataSizeToRead)
00638                 bMsgOk = false;
00639             }
00640           } else { // BINARY
00641             if (dataRead==dataSizeToRead) {
00642               pos++; //there is a ' '  after the size
00643               errno=0;
00644               unsigned int size=strtol(&(dummy[0]),NULL,10);
00645               if (errno==EINVAL)
00646                 BIASERR("error converting size of binary data '"<<dummy<<"'");
00647
00648               BIASDOUT(D_CS_ANALYZE,"checking for "<<size<<
00649                 " binary bytes of data");
00650               if ((end-pos)<size) { //there is not enough data
00651                 dataRead=0; // such that data is not copied to msgBuffer
00652                 waitForMore=true; // end the while (pos<end) loop
00653                 bNextMsg=true;
00654               } else {
00655                 dataRead=dataSizeToRead=size;
00656                 bNextMsg=true;
00657               }
00658             }
00659           }
00660       }
00661       if (dataRead>dataSizeToRead) {
00662         if (retValue<3) retValue=3;
00663         cPartner.lastProcessed=pos;
00664       }
00665
00666       if (!bMsgOk) {
00667         if (retValue<3)
00668           if (dataRead>dataSizeToRead) retValue=4;
00669           else retValue=3;
00670           // '[' from next msg found. but not all expected data read
00671           BIASERR(mygetpid()<<
00672             ": parse error while parsing msg: "<<msgName<< endl
00673             <<"'[' from next msg found, but more or less data read than"
00674             <<" expected. Going on though.");
00675       }
00676
00677       //// data read, now process dummyList and copy to registered MsgBuffer
00678       if (dataRead==dataSizeToRead) {
00679         cPartner.lastProcessed=pos;
00680         BIASDOUT(D_CS_ANALYZE,"converting data types. dataRead:"<<dataRead);
00681         // convert to real data types
00682         if (threaded_)
00683           pthread_mutex_lock(&registeredMsgs_[msgIndex].dataLock);
00684         if (registeredMsgs_[msgIndex].dataType ==  CS_STRING) {
00685           registeredMsgs_[msgIndex].stringData=dummyList;
00686         } else
00687           if (registeredMsgs_[msgIndex].dataType ==  CS_INT) {
00688             registeredMsgs_[msgIndex].intData.clear();
00689             int iTemp;
00690             for (unsigned int i=0;i<dataRead;i++) {
00691               iTemp=atoi(dummyList[i].c_str());
00692               registeredMsgs_[msgIndex].intData.push_back(iTemp);
00693             }
00694           } else
00695             if (registeredMsgs_[msgIndex].dataType ==  CS_FLOAT) {
00696               registeredMsgs_[msgIndex].floatData.clear();
00697               float fTemp;
00698               for (unsigned int i=0;i<dataRead;i++) {
00699                 fTemp=float(atof(dummyList[i].c_str()));
00700                 registeredMsgs_[msgIndex].floatData.push_back(fTemp);
00701               }
00702             } else
00703               if (registeredMsgs_[msgIndex].dataType ==CS_BINARY) {
00704                 registeredMsgs_[msgIndex].binaryDataSize=dataSizeToRead;
00705                 registeredMsgs_[msgIndex].binaryData=
00706                   &(cPartner.msgBuffer[pos]);
00707                 pos+=dataSizeToRead;
00708                 cPartner.lastProcessed=pos;
00709               }
00710               registeredMsgs_[msgIndex].newData = true;
00711               if (threaded_)
00712                 pthread_mutex_unlock(&registeredMsgs_[msgIndex].dataLock);
00713               if (keepAll_) waitForMore=true;
00714       }
00715     } // if msgIndex
00716   } // while (pos<end)
00717
00718   // clear msgBuffer, if larger than 16MB
00719   if (cPartner.msgBuffer.size()>maxBinaryG) {
00720     // make all binary msgs old
00721     for (int i=0;i<(int)registeredMsgs_.size();i++)
00722       if ((i!=msgIndex) && (registeredMsgs_[i].dataType==CS_BINARY))
00723         registeredMsgs_[i].newData=false;
00724
00725     BIASDOUT(D_CS_ANALYZE,"moving:"<<
00726       end-cPartner.lastProcessed<<"bytes. lastprocessed:"<<
00727       cPartner.lastProcessed);
00728     memmove(&(cPartner.msgBuffer[0]),
00729       &(cPartner.msgBuffer[cPartner.lastProcessed]),
00730       end-cPartner.lastProcessed);
00731     cPartner.msgBuffer.resize(end-cPartner.lastProcessed);
00732     cPartner.lastProcessed=0;
00733
00734   }
00735   return retValue;
00736 }
00737
00738
00739 int CScommBase::AnalyzeFirstMsg_(int commNr)
00740 {
00741   // parse data and check for registered msgs
00742   // for testing:
00743   char firstMsg [1000];
00744   unsigned int nr= commPartners_[commNr].msgBuffer.size();
00745   if (nr>999) nr=999;
00746   memset(firstMsg,0, 1000);
00747   memcpy(firstMsg, &(commPartners_[commNr].msgBuffer[0]), nr);
00748
00749   char *pos;
00750   if ( (pos=strstr(firstMsg,"[CLIENTNAME]"))!=NULL) {
00751     commPartners_[commNr].name=string("");
00752     pos+=13;  // first byte after "] "
00753     while ( (*pos != 0) && (*pos!='[') ) {
00754       commPartners_[commNr].name += *pos;
00755       pos++;
00756     }
00757     // Check if a client with this name is already connected
00758     for (unsigned int i=0;i<commPartners_.size();i++) {
00759       if ( ((int)i!=commNr) &&
00760         (commPartners_[i].name.compare( commPartners_[commNr].name)==0) ) {
00761           BIASERR(mygetpid()<<": a commPartner with name:"<<commPartners_[i].name
00762             <<" is already connected. Refusing connection");
00763           return -2;
00764         }
00765     }
00766   } else {
00767     BIASERR(mygetpid()<<": unrecognized comm partner:"<<firstMsg
00768       <<" Disconnecting.");
00769     return -1;
00770   }
00771   pos++; // overread the ending 0
00772   unsigned int newSize= commPartners_[commNr].msgBuffer.size()-(pos-firstMsg);
00773   memmove(&(commPartners_[commNr].msgBuffer[0]),
00774     &(commPartners_[commNr].msgBuffer[pos-firstMsg]),
00775     newSize);
00776   commPartners_[commNr].msgBuffer.resize(newSize);
00777   return 0;
00778 }
00779
00780
00781 void CScommBase::logOutPut_(const char *data, unsigned int size){
00782   if (!log_) return;
00783   logOut_<<endl<<"LOG "<<mygetpid()<<": data of "<<size<<" bytes:"<<endl;
00784   for (unsigned int i=0;i<size;i++)
00785     logOut_<<data[i];
00786   logOut_<<endl;
00787 }
00788
00789 void CScommBase::receiveThread_(int commNr)
00790 {
00791   int res=-1;
00792   unsigned int sleepTime=1000, bufSize=0;
00793   const unsigned int dataSize=200000;
00794   int bytesRecv=0;
00795   bool bReceive=true;
00796   if (timeOut_!=0) sleepTime=timeOut_;
00797
00798   while (bReceive && commPartners_[commNr].connected &&
00799     ! terminateReceiver_) {
00800
00801       bufSize=commPartners_[commNr].msgBuffer.size();
00802       BIASDOUT(D_CS_RECEIVER,mygetpid()<<"Expecting data. "
00803         "Buffer size is:"<<bufSize);
00804       // append new data to msgBuffer
00805       commPartners_[commNr].msgBuffer.resize(bufSize + dataSize);
00806       // receive blocks until a msg arrives
00807       bytesRecv = recv(commPartners_[commNr].fd,
00808         &(commPartners_[commNr].msgBuffer[bufSize]),
00809         dataSize,0);
00810       if (bytesRecv>0) {
00811         commPartners_[commNr].msgBuffer.resize(bufSize + bytesRecv);
00812         if (log_) {
00813           logOut_<<mygetpid()<<": Received "<<bytesRecv<<" bytes from "
00814             <<commPartners_[commNr].name<<endl;
00815           int outBytes= ((bytesRecv>200) ? 200 : bytesRecv);
00816           logOutPut_(&(commPartners_[commNr].msgBuffer[bufSize]),
00817             outBytes);
00818         }
00819         if (isServer_ && (commPartners_[commNr].firstcontact)) {
00820           if (AnalyzeFirstMsg_(commNr)==0) {
00821             if (verbose_)
00822               verboseOut_<<mygetpid()<<": Conn on slot "<<commNr<<" is "
00823               <<commPartners_[commNr].name<<endl;
00824             commPartners_[commNr].firstcontact = false;
00825           } else {
00826             bReceive=false;
00827           }
00828         } else
00829           if (bReceive) {             // not firstcontact, usual case
00830             if ((res=AnalyzeData_(commNr))<0) {
00831               BIASERR(mygetpid()<<
00832                 ": Critical error during analyzing data.");
00833             }
00834           }
00835       } else { // zero bytes received
00836         if (verbose_)
00837           verboseOut_<<mygetpid()<<": zero bytes from "
00838           <<commPartners_[commNr].name<<" Disconnect assumed."<<endl;
00839         bReceive=false;
00840       }
00841
00842     } //while (sensor[commNr].connected &&! terminateReceiver_)
00843
00844     // this line is reached when the connection is closed or terminateReceiver_
00845     // is true
00846     if (verbose_)
00847       verboseOut_<<mygetpid()<<": Disconnecting commPartner on slot:"
00848       <<commNr<<endl;
00849     commPartnersConnected_--;
00850     commPartners_[commNr].connected = false;
00851     commPartners_[commNr].firstcontact = true;
00852     commPartners_[commNr].msgBuffer.clear();
00853 #ifdef WIN32
00854     closesocket(commPartners_[commNr].fd);
00855 #else //WIN32
00856     close(commPartners_[commNr].fd);
00857 #endif //WIN32
00858
00859     // now return to receivethread() and exit this thread
00860 }
00861
00862 void CScommBase::syncReceive_()
00863 {
00864   unsigned int bufSize=0;
00865   const unsigned int dataSize=200000;
00866   int bytesRecv=0;
00867   bool bConnectionError=false;
00868
00869   for (unsigned int commNr=0; commNr < commPartners_.size(); commNr++) {
00870     if (commPartners_[commNr].connected) {
00871       if (commPartners_[commNr].lastProcessed != commPartners_[commNr].msgBuffer.size()) {
00872         //if there is data left in data-buffer, get it...
00873         AnalyzeData_(commNr);
00874       } else {
00875         //... else read data from TCP-buffer!
00876         bufSize=commPartners_[commNr].msgBuffer.size();
00877         BIASDOUT(D_CS_RECEIVER,"Expecting data on slot: " << commNr <<
00878           " Buffer size is:"<<bufSize);
00879         // append new data to msgBuffer
00880         commPartners_[commNr].msgBuffer.resize(bufSize + dataSize);
00881         // receive blocks until a msg arrives
00882         bytesRecv = recv(commPartners_[commNr].fd,
00883           &(commPartners_[commNr].msgBuffer[bufSize]),
00884           dataSize,0);
00885         if (bytesRecv>0) {
00886           commPartners_[commNr].msgBuffer.resize(bufSize + bytesRecv);
00887           if (log_) {
00888             logOut_<< "Slot " << commNr <<": Received "<<bytesRecv<<
00889               " bytes from "<<commPartners_[commNr].name<<endl;
00890             int outBytes= ((bytesRecv>200) ? 200 : bytesRecv);
00891             logOutPut_(&(commPartners_[commNr].msgBuffer[bufSize]),
00892               outBytes);
00893           }
00894           if (isServer_ && (commPartners_[commNr].firstcontact)) {
00895             if (AnalyzeFirstMsg_(commNr)==0) {
00896               if (verbose_)
00897                 verboseOut_<<"Conn on slot "<<commNr<<" is "
00898                 <<commPartners_[commNr].name<<endl;
00899               commPartners_[commNr].firstcontact = false;
00900             } else {
00901               bConnectionError=true;
00902             }
00903           } else {
00904             if (AnalyzeData_(commNr)<0) {
00905               BIASERR("Slot " << commNr <<
00906                 ": Critical error during analyzing data.");
00907             }
00908           }
00909         } else { // zero bytes received
00910           if (verbose_)
00911             verboseOut_<<mygetpid()<<": zero bytes from "
00912             <<commPartners_[commNr].name<<" Disconnect assumed."<<endl;
00913           bConnectionError=true;
00914         }
00915         //if somethings wrong disconnect comm-partner
00916         if (bConnectionError) {
00917           if (verbose_)
00918             verboseOut_<<mygetpid()<<": Disconnecting commPartner on slot:"
00919             <<commNr<<endl;
00920           commPartnersConnected_--;
00921           commPartners_[commNr].connected = false;
00922           commPartners_[commNr].firstcontact = true;
00923           commPartners_[commNr].msgBuffer.clear();
00924
00925 #ifdef WIN32
00926           closesocket(commPartners_[commNr].fd);
00927 #else //WIN32
00928           close(commPartners_[commNr].fd);
00929 #endif //WIN32
00930           //reset for next comm-partner
00931           bConnectionError = false;
00932         }
00933       }
00934     } //if (sensor[commNr].connected)
00935   }
00936
00937 }
00938
00939 int CScommBase::AcceptConn_(int fd)
00940 {
00941   /// create a new receivethread
00942   int firstfree = -1;
00943
00944   // search for the first not connected thread
00945   for (unsigned int i=0 ; firstfree <0 && i<commPartners_.size(); i++)
00946     if ( ! commPartners_[i].connected) firstfree= i;
00947
00948   // sorry, all channels are busy, return to listener
00949   if (firstfree <0 ) {
00950     BIASERR(mygetpid()<<": New connection refused, all "<<commPartners_.size()
00951       <<" channels are busy");
00952     return -1;
00953   }
00954
00955   BIASDOUT(D_CS_LISTENER,"Accepting connection on slot "<<firstfree);
00956
00957   commPartners_[firstfree].connected = true;
00958   commPartners_[firstfree].fd = fd;
00959   commPartners_[firstfree].msgBuffer.reserve(maxBinaryG);
00960   commPartners_[firstfree].lastProcessed=0;
00961   commPartnersConnected_++;
00962
00963   if (threaded_)
00964   {
00965     CSCommWithClientNr *threadcalldata;
00966     threadcalldata = new CSCommWithClientNr;
00967     threadcalldata->commNr = firstfree;
00968     threadcalldata->comm = this;
00969
00970     // spawn of the receiver
00971     pthread_create(&commPartners_[firstfree].threadid, NULL,
00972       receivethread, threadcalldata);
00973   }
00974
00975   return firstfree;
00976 }
00977
00978
00979 void CScommBase::SetLog(bool on)
00980 {
00981   log_=on;
00982   if (on) verbose_=true;
00983 }
00984 void CScommBase::SetLogOut(ostream &outputStream)
00985 {
00986   logOut_.rdbuf(outputStream.rdbuf());
00987 }
00988
00989 void CScommBase::SetVerbose(bool on)
00990 {
00991   verbose_=on;
00992 }
00993 void CScommBase::SetVerboseOut(ostream &outputStream)
00994 {
00995   verboseOut_.rdbuf(outputStream.rdbuf());
00996 }
00997
00998 std::string CScommBase::GetCommPartnerName(int commPartnerNr)
00999 {
01000   if (commPartnerNr>=(int)commPartners_.size())
01001     return string("");
01002
01003   return commPartners_[commPartnerNr].name;
01004 }
01005
01006
01007 void *BIAS::receivethread(void *data)
01008 {
01009   CSCommWithClientNr *calldata;
01010
01011   calldata = (CSCommWithClientNr*)data;
01012
01013   // enter CScommBase::receiveThread_(), it will loop until disconnect
01014   calldata->comm->receiveThread_(calldata->commNr);
01015
01016   delete calldata;
01017
01018   pthread_exit(NULL);
01019
01020   return NULL;
01021 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommBase.hh Source File

NetworkComm

CScommBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIASCScommBase__
00026 #define __BIASCScommBase__
00027
00028 #include <bias_config.h>
00029
00030 #ifndef BIAS_HAVE_PTHREADS
00031 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::ImageCanvas needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00032 #endif
00033
00034 #include <pthread.h>
00035 #include <sys/types.h>
00036 #include <vector>
00037 #include <map>
00038 #include <Base/Debug/Debug.hh>
00039 #include <NetworkComm/CScommClasses.hh>
00040
00041
00042 namespace BIAS {
00043
00044 #define D_CS_MAXCLIENTS 100
00045 #define D_CS_DEFAULT_PORT 4123
00046
00047 #define D_CS_LISTENER         1<<0
00048 #define D_CS_RECEIVER         1<<1
00049 #define D_CS_CONNECT          1<<2
00050 #define D_CS_ANALYZE          1<<3
00051 #define D_CS_SEND             1<<4
00052 #define D_CS_GETDATA          1<<5
00053
00054 #ifdef WIN32
00055 # define mygetpid() (pthread_self()).p
00056 #else
00057 # define mygetpid() getpid()
00058 #endif //WIN32
00059
00060   // enum is really defined in CScommClasses.hh
00061   // enum EdataType { CS_NONE, CS_STRING, CS_FLOAT, CS_INT };
00062
00063   /** @class CScommBase
00064   @brief this class CScomm (ClientServer communciation)
00065   handles data comunication via TCP/IP for one server and
00066   multiple clients.
00067
00068   It spawns threads itself for all communication.
00069   Messages can be registered by functions or within a file(not yet).
00070   See CScommClient or CScommServer for more details.
00071
00072   @author Daniel Grest, Jan 2004
00073   */
00074   class BIASNetworkComm_EXPORT CScommBase
00075     : public BIAS::Debug
00076   {
00077   public:
00078     virtual ~CScommBase();
00079
00080     /** Set threaded to false for deactivating the receive-thread. Data will be
00081     read from TCP-buffer only when GetData methods are called. Threaded
00082     receive is activated by default!
00083     Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there
00084     is any new msg (this need not be the one GetData was called for,
00085     for example binary instead of int)
00086     if receive-buffer is completly filled, send blocks until msg
00087     can be delivered!
00088     */
00089     CScommBase(bool threaded = true);
00090
00091     /// copy ctor required due to ostream member with explicit ctor JW
00092     CScommBase(const CScommBase & arg);
00093
00094     /// assignment op. required due to ostream member with explicit ctor JW
00095     CScommBase & operator=(const CScommBase & arg);
00096
00097     /** If not threaded you can set this true to keep all received data.
00098     Else a call of GetData() will deliver the newest msg only.
00099     Default is off.
00100     If threaded this is useless... (always off)
00101     */
00102     void SetKeepAll(bool on) { keepAll_=on; }
00103
00104     /** only if not threaded! <br>
00105     Blocks until any new msg arrives,
00106     or returns instantly if a new message
00107     is already in a buffer slot. The msg name is returned in msgName.
00108
00109     The return value indicates how many additional new msgs are in the
00110     buffer slots, e.g. if 0 the msgName is the only new message.
00111     @return <0 if an error occured, >=0 the amount of new msgs in other
00112     slots.
00113     */
00114     int WaitForNewMessage(std::string &msgName);
00115
00116
00117     /** returns instantly:<br>
00118     0 if new data has arrived and the data in xxxData <br>
00119     1 if no new data has arrived, the data in xxxData stays unchanged<br>
00120     -1 in case of errors
00121     */
00122     int GetData(const std::string &msgName, std::vector<float> &floatData);
00123     int GetData(const std::string &msgName, std::vector<int> &intData);
00124     int GetData(const std::string &msgName,
00125       std::vector<std::string> &stringData);
00126     /** returns the binarydata in the vector, its wise to reserve enough
00127     bytes, if the size is known.
00128     */
00129     int GetData(const std::string &msgName,
00130       std::vector<char> &binaryData);
00131
00132     /** sends msg msgName to all connected commPartners.
00133     Msg doesn't have to be registered on the sender side,
00134     but must be registered on the receiver side!
00135     */
00136     int SendMsg(const std::string &msgName, std::vector<float> &floatData);
00137     int SendMsg(const std::string &msgName, std::vector<int> &intData);
00138     int SendMsg(const std::string &msgName,
00139       std::vector<std::string> &stringData);
00140
00141     /** maximum size for binary data is 15MB!
00142     */
00143     int SendMsg(const std::string &msgName, char* binaryData, unsigned int size);
00144
00145     /** like above, but msg is only send to one specific commPartner given
00146     as string, which must equal the name given by the client to itself<br>
00147     @return -2 if no such commPartner, 0 in case of no error
00148     */
00149     int SendMsg(const std::string commPartnerName,
00150       const std::string &msgName, char* binaryData, unsigned int size);
00151
00152     /** like above, but msg is only send to one specific commPartner given
00153     as the index number of all connected partners
00154     @return -2 if no such commPartner, 0 in case of no error
00155     */
00156     int SendMsg(int commPartnerNr,
00157       const std::string &msgName, char* binaryData, unsigned int size);
00158
00159
00160     /** only registered msgs are accepted by commPartners
00161     Register a msg with this functions.
00162     Amount is the number of dataTypes for this msg,
00163     for binarydata this is not necessary <br>
00164     The msg will be bound to the first commPartner sending such a msg.
00165     And will be accepted only from him later.<br>
00166     All msgNames have to be unique!
00167
00168     return zero on success
00169     <0 on errors
00170     */
00171     int RegisterMsg(std::string msgName,  EdataType dataType, int amount=1);
00172
00173     /** same as above, but the msg is only accepted from a specific commPartner
00174     */
00175     int RegisterMsg(std::string commPartnerName,
00176       std::string msgName,  EdataType dataType, int amount=1);
00177
00178     /** returns the number of connected commPartners
00179     */
00180     inline int GetConnections() { return  commPartnersConnected_; }
00181
00182     /** returns the name of the commPartner with nr commPartnerNr or
00183     empty string in case of a number, that is to high.
00184     */
00185     std::string GetCommPartnerName(int commPartnerNr);
00186
00187     /** set the time in ms until a commPartner is assumed to be disconnected.<br>
00188     If time is zero there is no timeOut. default is no Time out
00189     */
00190     inline void SetConnectionTimeOut(unsigned int time) {
00191       if (time==0) timeOutFlag_=false; timeOut_=time;}
00192
00193     /** if set on, the server will take automatically the next free TCP port
00194     for connections. The client tries 10 consecutive different ports
00195     to conncect the server. Default is off. Useful if you don't
00196     care about port numbers and just want a connection somehow.
00197     */
00198     inline void SetAutomaticPortChange(bool on) { portChange_=on; }
00199
00200     // tells wether receive-threads are active or not
00201     inline bool GetThreadedReceive() { return threaded_; }
00202
00203     /** gives a lot of information regarding the connections, like the exact
00204     data received and send. Implies verbose.
00205     */
00206     void SetLog(bool on);
00207
00208     /** set the output of log msgs to another stream, e.g. to a file.
00209     Default ist cout.
00210     */
00211     void SetLogOut(std::ostream &outputStream);
00212
00213     /** gives some information about establising conn, and disconnecting etc.
00214     */
00215     void SetVerbose(bool on);
00216
00217     /** set the output of verbose msgs to another stream, e.g. to a file.
00218     Default ist cout.
00219     */
00220     void SetVerboseOut(std::ostream &outputStream);
00221
00222   protected:
00223
00224     // exports for dll (cmenk)
00225     BIAS_EXPORT_STL_VECTOR( BIASNetworkComm_EXPORT, CScommData )
00226       BIAS_EXPORT_STL_VECTOR( BIASNetworkComm_EXPORT, CScommMsg )
00227       //BIAS_EXPORT_STL_MAP( BIASNetworkComm_EXPORT, std::string, int )
00228
00229       void logOutPut_(const char *data, unsigned int size);
00230
00231     // helper func for the SendMsg() funcs
00232     int SendMsg_(const std::string &data);
00233
00234     // helper for GetData(), finds the index of the msg in registeredMsgs
00235     // returns the index, by use of a the std::map indexRegMsgs_
00236     int GetData_(const std::string &msgName);
00237
00238     /** return values:
00239     0 no error all fine
00240
00241     warnings:
00242     1 not enough data to analyze (<3 bytes)
00243     2 no data after msg name
00244     3 more data read than registered for a msg
00245     4 less data read than registered
00246     A warning is returned if one of the above cases was true for any one
00247     msg in the buffer.
00248
00249     errors:
00250     -1 only trash received
00251     */
00252     int AnalyzeData_(int clientNr);
00253
00254     // checks if the msg with msgName ist registered for this comm and
00255     // returns the dataTypeToread and the dataSizeToRead if the msg is registered
00256     // return value is the index of the reg msg in registeredMsgs_ ,
00257     // or <0 for errors and unregistered msgs
00258     int CheckRegisteredMsgs_(std::string &msgName, const CScommData &cPartner,
00259       EdataType &dataTypeToRead,
00260       unsigned int &dataSizeToRead);
00261
00262     void receiveThread_(int clientNr);
00263
00264     //Replaces receiveThread_(..) if threaded-receive is deactivated.
00265     //Reads up to 200000 bytes from receive-buffer for all comm-partners
00266     void syncReceive_();
00267
00268     // this is specific for server, dataSize is changed to the rest of bytes to
00269     // process, while offset is the number of processed bytes
00270     int AnalyzeFirstMsg_(int commNr);
00271
00272     // starts a receive thread for a new connection, called by listener(server)
00273     // or by ConnectServer (client)
00274     int AcceptConn_(int fd);
00275
00276     std::vector<CScommData> commPartners_;
00277     int connectPort_;
00278     int commPartnersConnected_;
00279
00280     // if true, the TCP input buffer is read completely each time
00281     bool onlyNewMsgs_;
00282     bool isServer_;
00283
00284     // added by aptersen
00285     bool portChange_;
00286     bool threaded_;
00287     bool keepAll_;
00288
00289     bool log_;
00290     std::ostream logOut_;
00291     bool verbose_;
00292     std::ostream verboseOut_;
00293
00294     std::string name_;
00295     unsigned int timeOut_;//after this time(ms) without data ,a comm is disc.
00296     bool timeOutFlag_; // if false, there is no timeOut
00297     bool terminateReceiver_;
00298     pthread_mutex_t registerLock_; // needed for acces on registeredMsgs_
00299
00300     std::vector<CScommMsg> msgBuffer_;
00301     std::vector<CScommMsg> registeredMsgs_;
00302
00303   private: // avoid DLL export
00304     /// used by GetData
00305     /// stores the index to registeredMsgs_
00306     std::map<std::string, int> indexRegMsgs_;
00307
00308     //  bool binaryMsgActive_; // for analyzeData
00309
00310   protected:
00311     friend void* receivethread(void *data);
00312     //  friend void* listenthread(void *data);
00313   };
00314
00315   /// these are wrapper to comply to the pthread_create() interface
00316   void *receivethread(void *data);
00317   //extern void* listenthread(void *data); // defined in CScommServer.cc
00318
00319
00320 }
00321
00322 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClasses.hh Source File

NetworkComm

CScommClasses.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef _CScommClasses_
00026 #define _CScommClasses_
00027
00028 #include <bias_config.h>
00029
00030 #ifndef BIAS_HAVE_PTHREADS
00031 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::ImageCanvas needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00032 #endif
00033
00034 namespace BIAS {
00035
00036   enum EdataType { CS_NONE, CS_STRING, CS_FLOAT, CS_INT, CS_BINARY};
00037
00038   /** helper classes for CScommBase
00039   */
00040   class CScommMsg {
00041   public:
00042     CScommMsg() :  newData(false) {}
00043     std::string msgName;
00044     std::string commName;
00045     bool server; // if this msg is accepted by the server or client
00046     EdataType dataType; // which kind of data (for parsing)
00047     unsigned int dataSize; // how many FLOATS or INTs...
00048     bool newData;
00049     pthread_mutex_t dataLock;
00050
00051     // only one of the following is used for a msg
00052     // and the main thread is only allowed to touch one of these
00053     // with GetData()
00054     std::vector<float> floatData;
00055     std::vector<int> intData;
00056     std::vector<std::string> stringData;
00057     char* binaryData;
00058     unsigned int binaryDataSize;
00059   };
00060
00061   class CScommData
00062   {
00063   public:
00064     CScommData() : connected(false),fd(-1),firstcontact(true)
00065     {}
00066     ~CScommData() {};
00067
00068     std::string name;
00069     pthread_t threadid;
00070     bool connected;
00071     int fd;
00072     bool firstcontact;
00073     std::vector<char> msgBuffer; // for buffering of incomplete msgs
00074     unsigned int lastProcessed;
00075   };
00076
00077   // forward declaration
00078   class CScommBase;
00079
00080   /** needed for the creation of receivethreads
00081   */
00082   class CSCommWithClientNr {
00083   public:
00084     CScommBase *comm;
00085     int commNr;
00086   };
00087
00088
00089
00090 }
00091
00092 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClient.cpp Source File

NetworkComm

CScommClient.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00027 #endif
00028
00029 #include "CScommClient.hh"
00030
00031 #ifdef WIN32
00032 #  include <winsock.h>
00033 #else //WIN32
00034 #  include <sys/poll.h>
00035 #  include <sys/socket.h>
00036 #  include <netinet/in.h>
00037 #  include <netdb.h>
00038 #  include <unistd.h>
00039 #  include <netinet/tcp.h>
00040 #endif //WIN32
00041
00042 #include <errno.h>
00043 #include <stdio.h>
00044
00045 #include <Base/Debug/Error.hh>
00046
00047 using namespace std;
00048 using namespace BIAS;
00049
00050 CScommClient::CScommClient(bool threaded) : CScommBase(threaded)
00051 {
00052   isServer_=false;
00053   char hostName[255];
00054   if (gethostname(hostName,255)==0)
00055     name_=hostName;
00056 }
00057
00058
00059 int CScommClient::ConnectServer(string serverName, unsigned int port,
00060                                 unsigned int timeOut)
00061 {
00062   struct hostent *roothostent;
00063   struct sockaddr_in control_addr;
00064   unsigned int counter = 0;
00065   int socketFd;
00066
00067   roothostent = gethostbyname(serverName.c_str());
00068   if (roothostent == NULL) {
00069     BIASERR("Host not found: "<<serverName);
00070     return -2;
00071   }
00072   connectPort_=port;
00073   memset(&control_addr,0 , sizeof(struct sockaddr_in));
00074   control_addr.sin_family = AF_INET;
00075   memcpy((char *) &control_addr.sin_addr.s_addr,
00076     (char *) roothostent->h_addr,
00077     roothostent->h_length);
00078   control_addr.sin_port = htons((u_short) connectPort_);
00079   socketFd = socket(AF_INET, SOCK_STREAM, 0);
00080
00081   bool * flag = new bool(true);
00082   int length = sizeof(bool);
00083   setsockopt(socketFd, IPPROTO_TCP, TCP_NODELAY, (char *) flag, length);
00084
00085   if (verbose_)
00086     logOut_<<"Trying to connect with server "<<serverName<<endl;
00087
00088
00089   int res=-1;
00090   while ( (res<0)  &&  (counter<(timeOut/100)) ) {
00091     control_addr.sin_port = htons((u_short) connectPort_);
00092     if (log_)
00093       logOut_<<"Trying to connect with server "<<serverName
00094       <<" on port "<<connectPort_<<endl;
00095     res=connect(socketFd,(struct sockaddr *)&control_addr,
00096       sizeof(control_addr));
00097     counter++;
00098     if ( (res!=0) &&  portChange_ ) {
00099       connectPort_++;
00100       if ((counter % 10) ==0) connectPort_=D_CS_DEFAULT_PORT;
00101     }
00102 #ifdef WIN32
00103     Sleep(1);
00104 #else //WIN32
00105     usleep (100);
00106 #endif //WIN32
00107   }
00108   if (counter>=(timeOut/100)) {
00109     BIASERR("TimeOut connecting server"<<serverName);
00110     return -1;
00111   }
00112
00113
00114   res = AcceptConn_(socketFd);
00115   // all channels are busy
00116   if (res <0) {
00117     BIASERR("Error creating receivethread for client:"<<name_);
00118     return -4;
00119   }
00120   commPartners_[res].name = serverName;
00121   if (verbose_)
00122     verboseOut_<<"Successfully connected to server "
00123     <<serverName<<" on port: "<<connectPort_<<endl;
00124
00125   //// send client name
00126   char firstMsg[255];
00127   sprintf(firstMsg, "[CLIENTNAME] %s",name_.c_str());
00128   BIASDOUT( D_CS_CONNECT ,"sending:"<<firstMsg);
00129 #ifdef WIN32
00130   res = send(commPartners_[res].fd, firstMsg, strlen(firstMsg)+1,
00131     0);
00132 #else //WIN32
00133   res = send(commPartners_[res].fd, &firstMsg, strlen(firstMsg)+1,
00134     MSG_NOSIGNAL);
00135 #endif //WIN32
00136   if (res <= 0) {
00137     BIASERR("Error: '"<<strerror(errno)<<"' sending CLIENTNAME");
00138     return -3;
00139   }
00140
00141   return 0;
00142 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommClient.hh Source File

NetworkComm

CScommClient.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIASCScommClient__
00026 #define __BIASCScommClient__
00027
00028 #include "CScommBase.hh"
00029
00030
00031 namespace BIAS {
00032   /** @class CScommClient
00033   @brief class for sending/receiving data between clients and servers
00034
00035   Only registered msgs will be accepted at the server side,
00036   similar the client will accept only registered msgs from the server too.
00037   The client needs to know the hostname of the server.
00038   Usage: <br>
00039
00040   -# Konstruktor: CScommClient client;
00041
00042   -# Register msgs:  client.RegisterMsg(msgName, BIAS::CS_FLOAT, 3);
00043
00044   -# connect server:  client.ConnectServer("visu1");
00045
00046   -# send and/or get Data:  client.SendMsg(msgName,vecOfFloats);<br>
00047   client.GetData(msgName, newVecOffloats);
00048
00049   See the examples also.
00050   @author Daniel Grest, Jan. 2004
00051   */
00052   class BIASNetworkComm_EXPORT CScommClient : public CScommBase {
00053   public:
00054
00055     /** Set threaded to false for deactivating the receive-thread. Data will be
00056     read from TCP-buffer only when GetData methods are called. Threaded
00057     receive is activated by default!
00058     Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there
00059     is any new msg (this need not be the one GetData was called for,
00060     for example binary instead of int)
00061     if receive-buffer is completly filled, send blocks until msg
00062     can be delivered!
00063     */
00064     CScommClient(bool threaded = true);
00065     ~CScommClient() {}
00066
00067     /** give the client a name, default ist $HOSTNAME
00068     */
00069     void SetName(std::string clientName) { name_=clientName;}
00070
00071     /** for a client: tries to connect to server with hostname serverName.
00072     @param timeOut in ms
00073     @param serverName hostName of the server as ip or name
00074     @return 0 on success, -1 on timeOut, < -1 on other errors
00075     */
00076     int ConnectServer(std::string serverName,unsigned int port=D_CS_DEFAULT_PORT,
00077       unsigned int timeOut=20000);
00078
00079   };
00080 }
00081
00082 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommServer.cpp Source File

NetworkComm

CScommServer.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00027 #endif
00028
00029 #include "CScommServer.hh"
00030
00031 #ifdef WIN32
00032 #  include <winsock.h>
00033 #else //WIN32
00034 #  include <sys/poll.h>
00035 #  include <netinet/in.h>
00036 #  include <sys/socket.h>
00037 #  include <netdb.h>
00038 #  include <unistd.h>
00039 #  include <netinet/tcp.h>
00040 #endif //WIN32
00041
00042 #include <Base/Debug/Error.hh>
00043 #include <sys/types.h>
00044 #include <errno.h>
00045 #include <stdio.h>
00046
00047 using namespace std;
00048 using namespace BIAS;
00049
00050 CScommServer::CScommServer(bool threaded) : CScommBase(threaded)
00051 {
00052   isServer_=true;
00053   terminateListener_=false;
00054   listenThreadActive_=false;
00055 }
00056
00057
00058 CScommServer::~CScommServer()
00059 {
00060   if (listenThreadActive_) {
00061     terminateListener_=true;
00062     //  pthread_exit(pthreadListener_,NULL);
00063     listenThreadActive_=false;
00064   }
00065 }
00066
00067 void CScommServer::CreateListenThread_()
00068 {
00069   if (listenThreadActive_) return;
00070   int res;
00071   BIASDOUT(D_CS_LISTENER,mygetpid() << ": Starting listener on port " <<
00072     connectPort_);
00073   terminateListener_ = false;
00074   res = pthread_create(&pthreadListener_, NULL, listenthread, this);
00075   if (res!=0) {
00076     BIASERR("cant crete listen thread");
00077   }
00078   listenThreadActive_=true;
00079 }
00080
00081 void CScommServer::WaitForConnections(unsigned int port) {
00082   connectPort_= port;
00083   CreateListenThread_();
00084 }
00085
00086 void *BIAS::listenthread(void *data)
00087 {
00088   struct sockaddr_in client_addr;
00089
00090 #ifdef WIN32
00091   int clilen;
00092 #else //WIN32
00093   socklen_t clilen;
00094 #endif //WIN32
00095
00096   int listenfd, newclientfd;
00097   int res;
00098   CScommServer *comm;
00099
00100   comm = (CScommServer*)data;
00101
00102   listenfd=socket (AF_INET, SOCK_STREAM, 0);
00103
00104   // int reuse_option = 1;
00105   //   res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR,
00106   //                    (char*) &reuse_option, sizeof(reuse_option));
00107   //   if (res<0) {
00108   //     BIASERR("Erorr:'"<<strerror(errno)<<"' while setting socket option:"
00109   //             <<comm->connectPort_);
00110   //     pthread_exit(NULL);
00111   //   }
00112
00113   memset(&client_addr, 0, sizeof(client_addr));
00114   client_addr.sin_family = AF_INET;
00115   client_addr.sin_addr.s_addr = INADDR_ANY;
00116
00117   //turn off Nagle-Algorithm for immediatly sending short msgs
00118   bool * flag = new bool(true);
00119   int length = sizeof(bool);
00120   setsockopt(listenfd, IPPROTO_TCP, TCP_NODELAY, (char *) flag, length);
00121
00122   int maxTries=10;
00123   if (comm->portChange_)
00124     maxTries=1;
00125   int tries=0;
00126   res=-1;
00127   while ((res<0) && tries<maxTries) {
00128     client_addr.sin_port = htons((u_short) comm->connectPort_);
00129     res = bind(listenfd,(struct sockaddr *) &client_addr,
00130       sizeof(client_addr));
00131     tries++;
00132     if (res<0) {
00133       cout<<"res<0"<<" Erorr:'"<<strerror(errno)<<endl;
00134       comm->connectPort_++;
00135     }
00136   }
00137
00138   if ( (res<0) && (tries>maxTries) ) {
00139     BIASERR("Erorr:'"<<strerror(errno)<<"' for ports:"
00140       <<D_CS_DEFAULT_PORT<<" to "<<comm->connectPort_);
00141     pthread_exit(NULL);
00142   }
00143
00144   if (comm->verbose_)
00145     comm->verboseOut_<<mygetpid()
00146     <<": Listening on port "<<comm->connectPort_<<endl;
00147
00148   while (!comm->terminateListener_) {
00149     // now listen
00150     res = listen(listenfd,1);
00151     if (res <0) {
00152       perror("Listening for clients");
00153 #ifdef WIN32
00154       Sleep(1000);
00155 #else //WIN32
00156       sleep(1);
00157 #endif //WIN32
00158       break;
00159     }
00160     clilen = sizeof(client_addr);
00161     newclientfd = accept(listenfd,(struct sockaddr *)&client_addr,&clilen);
00162
00163     if ((comm->GetDebugLevel() & D_CS_LISTENER) >0)
00164       cout << mygetpid() << ": Listener got something"<<endl;
00165
00166     if (newclientfd < 0)
00167       perror("Error accepting connection from client");
00168     else {
00169       res = comm->AcceptConn_(newclientfd);
00170       // all channels are busy, close and wait for a while
00171       if (res <0) {
00172 #ifdef WIN32
00173         closesocket(newclientfd);
00174         Sleep(1000);
00175 #else //WIN32
00176         close(newclientfd);
00177         sleep(1);
00178 #endif //WIN32
00179       }
00180       else
00181         if ((comm->GetDebugLevel() & D_CS_LISTENER) >0)
00182           cout <<"Client accepted, relistening"<<endl;
00183     }
00184   }
00185   pthread_exit(NULL);
00186
00187   return NULL;
00188 }
00189
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/CScommServer.hh Source File

NetworkComm

CScommServer.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIASCScommServer__
00026 #define __BIASCScommServer__
00027
00028 #include "CScommBase.hh"
00029
00030 //#include <Base/Common/BIASpragmaStart.hh>
00031
00032 namespace BIAS {
00033   /** @class CScommServer
00034   @brief class for sending/receiving data between clients and servers
00035
00036   Only registered msgs will be accepted at the server side,
00037   similar the client will accept only registered msgs from the server too.
00038   The server waits on a DEFUALT_PORT for connections from clients,
00039   which need to know the hostname of the server.
00040   Usage: <br>
00041
00042   -# Konstruktor: CScommServer Server;
00043
00044   -# Register msgs:  Server.RegisterMsg(msgName, BIAS::CS_FLOAT, 3);
00045
00046   -# Enable receiver:  Server.WaitForConnections();
00047
00048   -# send and/or get Data:  Server.SendMsg(msgName,vecOfFloats);<br>
00049   Server.GetData(msgName, newVecOffloats);
00050
00051   See the examples also.
00052   @author Daniel Grest, Jan. 2004
00053   */
00054   class BIASNetworkComm_EXPORT CScommServer : public CScommBase {
00055   public:
00056
00057     /** Set threaded to false for deactivating the receive-thread. Data will be
00058     read from TCP-buffer only when GetData methods are called. Threaded
00059     receive is activated by default!
00060     Beware: if there's no msg in tcp-buffer, GetData will BLOCK until there
00061     is any new msg (this need not be the one GetData was called for,
00062     for example binary instead of int)
00063     if receive-buffer is completly filled, send blocks until msg
00064     can be delivered!
00065     */
00066     CScommServer(bool threaded = true);
00067     ~CScommServer();
00068
00069     /** Init function, returns instantly and enables the server to accept
00070     connections on the given port
00071     */
00072     void WaitForConnections(unsigned int port=D_CS_DEFAULT_PORT);
00073
00074   protected:
00075     void CreateListenThread_();
00076     bool terminateListener_, listenThreadActive_;
00077     pthread_t pthreadListener_;
00078
00079     friend void* listenthread(void *data);
00080   };
00081
00082   /// these are wrapper to comply to the pthread_create() interface
00083   void *listenthread(void *data);
00084
00085 }
00086
00087 //#include <Base/Common/BIASpragmaEnd.hh>
00088
00089 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CylinderMapping.cpp Source File

Image

CylinderMapping.cpp

Go to the documentation of this file.
00001 // BIAS includes
00002 #include "CylinderMapping.hh"
00003
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008
00009 static double toDeg(const double rad) {
00010   return (rad / M_PI * 180.0);
00011 }
00012
00013 static double toRad(const double deg) {
00014   return (M_PI / 180.0 * deg);
00015 }
00016
00017
00018 static void rotateY(BIAS::Vector3<double>& v, const double rad) {
00019   v.Set(v[2] * sin(rad) + v[0] * cos(rad),
00020         v[1],
00021         v[2] * cos(rad) - v[0] * sin(rad));
00022 }
00023
00024
00025 CylinderMapping::CylinderMapping()
00026 {
00027   Reset();
00028 }
00029
00030 void CylinderMapping::Reset()
00031 {
00032   px_=-1;          // principal x
00033   py_=-1;          // principal y
00034
00035   focalX_=100;
00036   focalY_=80;
00037
00038   camAngleX_=-1;   // camera opening angle in x-direction
00039   camAngleY_=-1;   // camera opening angle in y-direction
00040 }
00041
00042 void CylinderMapping::setFocalLength(const double fx, const double fy) {
00043   focalX_=fx;
00044   focalY_=fy;
00045 }
00046
00047
00048 void CylinderMapping::setPrincipalPoint(const double in_px_,
00049                                       const double in_py_) {
00050   px_ = in_px_;
00051   py_ = in_py_;
00052 }
00053
00054
00055 int CylinderMapping::GetSourceCoordinates_(const BIAS::HomgPoint2D& sink,
00056                                           BIAS::HomgPoint2D& source)
00057                                           const {
00058
00059   double camAngleY,camAngleX;
00060   camAngleX = toDeg(atan(width_ * 0.5 / focalX_)) * 2.0;
00061   camAngleY = toDeg(atan(height_ * 0.5 / focalY_)) * 2.0;
00062
00063   double px=px_, py=py_;
00064   if (px==-1) px = (width_-1) / 2.0;
00065   if (py==-1) py = (height_-1) / 2.0;
00066
00067   BIAS::HomgPoint2D normsink(sink[0] /  width_,
00068                              sink[1] / height_);
00069
00070   BIAS::Vector3<double> v1(0.0, 0.0, 1.0);
00071   rotateY(v1, toRad(-camAngleX / 2.0));
00072
00073   double origWidth = fabs(v1[0] * (1.0 / v1[2])) * 2.0;
00074
00075   rotateY(v1, toRad(sink[0] / (double) width_ * camAngleX));
00076   v1[1] = normsink[1] - 0.5;
00077
00078   double lambda = 1.0 / v1[2];
00079   source[0] = lambda * v1[0];
00080   source[1] = lambda * v1[1];
00081
00082   source[0] = (source[0] / origWidth + 0.5) * width_;
00083   source[1] = (source[1] + 0.5) * height_;
00084
00085   return 0;
00086 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/CylinderMapping.hh Source File

Image

CylinderMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIAS_CylinderMapping_hh__
00026 #define __BIAS_CylinderMappibg_hh__
00027
00028 // BIAS includes
00029 #include <Base/Image/Image.hh>
00030 #include <Image/BackwardMapping.hh>
00031 #include <Geometry/PMatrix.hh>
00032
00033 namespace BIAS {
00034
00035   /** @class CylinderMapping
00036       @brief functions for spherical undistortion of given images,
00037       needs image dimensions,
00038       principal point and focal length as input additional
00039       to the image data.
00040
00041       Useful for PanoramaMapping !
00042       See also BIAS::BackwardMapping for further details.
00043
00044       @author jbr, february 2006 edited by grest
00045   */
00046   class BIASImage_EXPORT CylinderMapping :
00047     public BIAS::BackwardMapping<unsigned char, unsigned char> {
00048
00049   public:
00050
00051     CylinderMapping();
00052
00053     /** Set the focal length of the camera.
00054         Defaults to 140 degrees field of view in y-direction
00055         @param fx
00056         @param fy
00057     */
00058     void setFocalLength(const double fx, const double fy);
00059
00060
00061     /** Set the principal point of the camera
00062         @param px defaults to half image size
00063         @param py defaults to half image size
00064     */
00065     void setPrincipalPoint(const double px, const double py);
00066
00067
00068     /**    if you want to call Map() twice for this object with different
00069            params, call Reset() before
00070     */
00071     void Reset();
00072
00073   protected:
00074
00075     /** this does the trick
00076      */
00077     virtual int GetSourceCoordinates_(const BIAS::HomgPoint2D& sink,
00078                                       BIAS::HomgPoint2D& source) const;
00079
00080     double px_;          // principal x
00081     double py_;          // principal y
00082
00083     double focalX_;
00084     double focalY_;
00085     double camAngleX_;   // camera opening angle in x-direction
00086     double camAngleY_;   // camera opening angle in y-direction
00087
00088 };
00089
00090 }
00091 #endif
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/DCData.cpp Source File

Image

DCData.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "DCData.hh"
00027 #include <Base/Debug/Error.hh>
00028 #include <string>
00029 #include <cmath>
00030
00031 #include <Base/Common/W32Compat.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036
00037 //////////////////////////////////////////////////////////////////////////
00038 //                    DC_ptu
00039 /////////////////////////////////////////////////////////////////////////
00040
00041 DC_ptu::DC_ptu() : Debug()
00042 {
00043   PanPos = TiltPos = 0.0;
00044   TimeStamp = StartReadTimeStamp = StopReadTimeStamp = 0;
00045 }
00046
00047 DC_ptu::DC_ptu(const DC_ptu& ptu) : Debug()
00048 {
00049   PanPos            = ptu.PanPos             ;
00050   TiltPos           = ptu.TiltPos            ;
00051   TimeStamp         = ptu.TimeStamp          ;
00052   StartReadTimeStamp= ptu.StartReadTimeStamp ;
00053   StopReadTimeStamp = ptu.StopReadTimeStamp  ;
00054 }
00055
00056 DC_ptu::~DC_ptu()
00057 {}
00058
00059 void DC_ptu::Set(double panpos, double tiltpos, unsigned long int timestamp,
00060                  unsigned long startts, unsigned long stopts)
00061 {
00062   PanPos = panpos;
00063   TiltPos = tiltpos;
00064   TimeStamp = timestamp;
00065   StartReadTimeStamp=startts;
00066   StopReadTimeStamp=stopts;
00067 }
00068
00069 void DC_ptu::WriteBinary(char *data)
00070 {
00071 #ifdef BIAS_DEBUG
00072   if (!data) {
00073     BIASERR("data is NULL");
00074     BIASASSERT(false);
00075   }
00076 #endif
00077   /* char *d=data;
00078   (*((double *)d)++)=PanPos;
00079   (*((double *)d)++)=TiltPos;
00080   (*((unsigned long *)d)++)=TimeStamp;
00081   (*((unsigned long *)d)++)=StartReadTimeStamp;
00082   (*((unsigned long *)d)++)=StopReadTimeStamp;*/
00083   double *d = (double*)data;
00084   d[0] = PanPos;
00085   d[1] = TiltPos;
00086   unsigned long *l = (unsigned long *)(d+2);
00087   l[0] = TimeStamp;
00088   l[1] = StartReadTimeStamp;
00089   l[3] = StopReadTimeStamp;
00090 }
00091
00092 void DC_ptu::ReadBinary(char *data)
00093 {
00094   /*char *d=data;
00095   PanPos=(*((double *)d)++);
00096   TiltPos=(*((double *)d)++);
00097   TimeStamp=(*((unsigned long *)d)++);
00098   StartReadTimeStamp=(*((unsigned long *)d)++);
00099   StopReadTimeStamp=(*((unsigned long *)d)++);*/
00100   double *d = (double *)data;
00101   PanPos = d[0];
00102   TiltPos = d[1];
00103   unsigned long *l = (unsigned long *)(d+2);
00104   TimeStamp = l[0];
00105   StartReadTimeStamp = l[1];
00106   StopReadTimeStamp = l[2];
00107 }
00108
00109
00110 istream& BIAS::operator>>(istream& is, DC_ptu& ptu)
00111 {
00112   string tmp;
00113   //  char header[512];
00114   //is.getline(header, 512, '\n');
00115   //if (strcmp(header, "#[PTU Data]")==0){
00116     is >> tmp >> ptu.PanPos >> tmp;
00117     is >> tmp;
00118     if (tmp=="#TiltPos="){
00119       is >> ptu.TiltPos >> tmp;
00120       is >> tmp >> ptu.TimeStamp;
00121       ptu.StartReadTimeStamp = ptu.StopReadTimeStamp = ptu.TimeStamp;
00122     } else if (tmp=="#ImageTimeStamp="){
00123       is >> ptu.TimeStamp;
00124       is >> tmp >> ptu.TiltPos >> tmp;
00125       is >> tmp >> ptu.StartReadTimeStamp;
00126       is >> tmp >> ptu.StopReadTimeStamp;
00127     }
00128     // cerr << ptu << endl;
00129     //} else {
00130     //  BIASERR("unable to read ptu data, invalid header " << tmp);
00131     //}
00132     if (!is) {
00133       BIASERR("error reading ptu meta data from ascii stream");
00134       sleep(1);
00135     }
00136   return is;
00137 }
00138
00139 ostream& BIAS::operator<<(ostream& os, const DC_ptu& ptu)
00140 {
00141   //#ifdef BIAS_DEBUG
00142   streambuf *OutBuf_=cout.rdbuf(), *OsBuf_= os.rdbuf(),
00143     *ErrBuf_=cerr.rdbuf();
00144
00145   if (OutBuf_==OsBuf_ || ErrBuf_==OsBuf_){ // cout or cerr
00146     //if (OutBuf_==OsBuf_) cerr << "os == cout\n";
00147     //if (ErrBuf_==OsBuf_) cerr << "os == cerr\n";
00148
00149     os << "PTU:\tpan: "<<ptu.PanPos<<"\ttilt: "<<ptu.TiltPos
00150        << "\ttime: "<<ptu.TimeStamp<<"\tStartReadTime: "
00151        <<ptu.StartReadTimeStamp<<"\tStopReadTime: "<<ptu.StopReadTimeStamp;
00152   } else {
00153     //#endif
00154     os << "#PanPos= "<<ptu.PanPos<<"  #[rad]"<<endl
00155        << "#ImageTimeStamp= "<<ptu.TimeStamp<<endl
00156        << "#TiltPos= "<<ptu.TiltPos<<"  #[rad]"<<endl
00157        << "#PTUStartReadTimeStamp= "<<ptu.StartReadTimeStamp<<endl
00158        << "#PTUStopReadTimeStamp= "<<ptu.StopReadTimeStamp;
00159     //#ifdef BIAS_DEBUG
00160   }
00161   //#endif
00162   return os;
00163 }
00164
00165 //////////////////////////////////////////////////////////////////////////
00166 //                    DC_inertial
00167 /////////////////////////////////////////////////////////////////////////
00168
00169
00170 DC_inertial::DC_inertial() : Debug()
00171 {
00172   Yaw = YawRateRaw = YawRateOffset = 0.0;
00173   SteeringAngle = Pitch = Speed = 0.0;
00174   LongAcceleration = LatAcceleration = 0.0;
00175   TempomatLever = BlinkLever = SteeringWheelLever = 0;
00176   ArtLeadVehicleDistance = ArtLeadVehicleVelocity = ArtSollVelocity = 0.0;
00177   ArtFlags = 0;
00178   AcceleratorPedal = EngineSpeed = 0.0;
00179   Gear = VehicleFlags = 0;
00180 }
00181
00182 DC_inertial::DC_inertial(const DC_inertial& inert) : Debug()
00183 {
00184   Yaw                      = inert.Yaw;
00185   YawRateRaw               = inert.YawRateRaw;
00186   YawRateOffset            = inert.YawRateOffset;
00187   SteeringAngle            = inert.SteeringAngle;
00188   Pitch                    = inert.Pitch;
00189   Speed                    = inert.Speed;
00190   LongAcceleration         = inert.LongAcceleration;
00191   LatAcceleration          = inert.LatAcceleration;
00192   TempomatLever            = inert.TempomatLever;
00193   BlinkLever               = inert.BlinkLever;
00194   SteeringWheelLever       = inert.SteeringWheelLever;
00195   ArtLeadVehicleDistance   = inert.ArtLeadVehicleDistance;
00196   ArtLeadVehicleVelocity   = inert.ArtLeadVehicleVelocity;
00197   ArtSollVelocity          = inert.ArtSollVelocity;
00198   ArtFlags                 = inert.ArtFlags;
00199   AcceleratorPedal         = inert.AcceleratorPedal;
00200   EngineSpeed              = inert.EngineSpeed;
00201   Gear                     = inert.Gear;
00202   VehicleFlags             = inert.VehicleFlags;
00203 }
00204
00205 DC_inertial::~DC_inertial()
00206 {}
00207
00208 void DC_inertial::Set(double yaw, double yawrateraw, double yawrateoffset,
00209                       double speed, double steeringangle)
00210 {
00211   Yaw = yaw;
00212   YawRateRaw = yawrateraw;
00213   YawRateOffset = yawrateoffset;
00214   Speed = speed;
00215   SteeringAngle = steeringangle;
00216 }
00217
00218 istream& BIAS::operator>>(istream& is, DC_inertial& inert)
00219 {
00220   string tmp;
00221   //  char header[512];
00222   //is.getline(header, 512, '\n');
00223   // cerr << header << endl;
00224   //if (strcmp(header, "#[Inertial Sensor]")==0){
00225     is >> tmp >> inert.Yaw;
00226     is >> tmp >> inert.YawRateRaw;
00227     is >> tmp >> inert.YawRateOffset;
00228     is >> tmp >> inert.SteeringAngle;
00229     is >> tmp >> inert.Pitch;
00230     is >> tmp >> inert.Speed;
00231     is >> tmp >> inert.LongAcceleration;
00232     is >> tmp >> inert.LatAcceleration;
00233     is >> tmp >> inert.TempomatLever;
00234     is >> tmp >> inert.BlinkLever;
00235     is >> tmp >> inert.SteeringWheelLever;
00236     is >> tmp >> inert.ArtLeadVehicleDistance;
00237     is >> tmp >> inert.ArtLeadVehicleVelocity;
00238     is >> tmp >> inert.ArtSollVelocity;
00239     is >> tmp >> inert.ArtFlags;
00240     is >> tmp >> inert.AcceleratorPedal;
00241     is >> tmp >> inert.EngineSpeed;
00242     is >> tmp >> inert.Gear;
00243     is >> tmp >> inert.VehicleFlags;
00244
00245     //cerr << inert << endl;
00246     //} else {
00247     //  BIASERR("unable to read inertial sensor data, invalid header "
00248     //   <<tmp);
00249     //}
00250     if (!is) {
00251       BIASERR("error reading inertial meta data from ascii stream");
00252       sleep(1);
00253     }
00254   return is;
00255 }
00256
00257 ostream& BIAS::operator<<(ostream& os, const DC_inertial& inert)
00258 {
00259   //#ifdef BIAS_DEBUG
00260   streambuf *OutBuf_=cout.rdbuf(), *OsBuf_= os.rdbuf(),
00261     *ErrBuf_=cerr.rdbuf();
00262
00263   if (OutBuf_==OsBuf_ || ErrBuf_==OsBuf_){ // cout or  cerr
00264     os << "INERT: "
00265        <<"   Speed: "<<inert.Speed
00266        <<"   StAng: "<<inert.SteeringAngle
00267        <<"   Yaw: "<<inert.Yaw;
00268       //<<"   YawRateRaw: "<<inert.YawRateRaw
00269       //<<"   YawRateOffset: "<<inert.YawRateOffset
00270       //<<"   LongAccel: "<<inert.LongAcceleration;
00271   } else {
00272     //#endif
00273     os //<< "#[Inertial Sensor]"<<endl
00274       << "#Yaw= "<<inert.Yaw<<endl
00275       << "#YawRateRaw= "<<inert.YawRateRaw<<endl
00276       << "#YawRateOffset= "<<inert.YawRateOffset<<endl
00277       << "#SteeringAngle= "<<inert.SteeringAngle<<endl
00278       << "#Pitch= "<<inert.Pitch<<endl
00279       << "#Speed= "<<inert.Speed<<endl
00280       << "#LongAcceleration= "<<inert.LongAcceleration<<endl
00281       << "#LatAcceleration= "<<inert.LatAcceleration<<endl
00282       << "#TempomatLever= "<<inert.TempomatLever<<endl
00283       << "#BlinkLever= "<<inert.BlinkLever<<endl
00284       << "#SteeringWheelLever= "<<inert.SteeringWheelLever<<endl
00285       << "#ArtLeadVehicleDistance= "<<inert.ArtLeadVehicleDistance<<endl
00286       << "#ArtLeadVehicleVelocity= "<<inert.ArtLeadVehicleVelocity<<endl
00287       << "#ArtSollVelocity= "<<inert.ArtSollVelocity<<endl
00288       << "#ArtFlags= "<<inert.ArtFlags<<endl
00289       << "#AcceleratorPedal= "<<inert.AcceleratorPedal<<endl
00290       << "#EngineSpeed= "<<inert.EngineSpeed<<endl
00291       << "#Gear= "<<inert.Gear<<endl
00292       << "#VehicleFlags= "<<inert.VehicleFlags;
00293     //#ifdef BIAS_DEBUG
00294   }
00295   //#endif
00296   return os;
00297 }
00298
00299
00300
00301
00302
00303 void DC_inertial::WriteBinary(char *data)
00304 {
00305 #ifdef BIAS_DEBUG
00306   if (!data) {
00307     BIASERR("data is NULL");
00308     BIASASSERT(false);
00309   }
00310 #endif
00311   /*char *d = data;
00312   (*((double *)d)++)=Yaw;
00313   (*((double *)d)++)=YawRateRaw;
00314   (*((double *)d)++)=YawRateOffset;
00315   (*((double *)d)++)=SteeringAngle;
00316   (*((double *)d)++)=Pitch;
00317   (*((double *)d)++)=Speed;
00318   (*((double *)d)++)=LongAcceleration;
00319   (*((double *)d)++)=LatAcceleration;
00320   (*((int *)d)++)=TempomatLever;
00321   (*((int *)d)++)=BlinkLever;
00322   (*((int *)d)++)=SteeringWheelLever;
00323   (*((double *)d)++)=ArtLeadVehicleDistance;
00324   (*((double *)d)++)=ArtLeadVehicleVelocity;
00325   (*((double *)d)++)=ArtSollVelocity;
00326   (*((int *)d)++)=ArtFlags;
00327   (*((double *)d)++)=AcceleratorPedal;
00328   (*((double *)d)++)=EngineSpeed;
00329   (*((int *)d)++)=Gear;
00330   (*((int *)d)++)=VehicleFlags;*/
00331   double *d = (double *)data;
00332   d[0] = Yaw;
00333   d[1] = YawRateRaw;
00334   d[2] = YawRateOffset;
00335   d[3] = SteeringAngle;
00336   d[4] = Pitch;
00337   d[5] = Speed;
00338   d[6] = LongAcceleration;
00339   d[7] = LatAcceleration;
00340   int *i = (int *)(d+8);
00341   i[0] = TempomatLever;
00342   i[1] = BlinkLever;
00343   i[2] = SteeringWheelLever;
00344   d = (double *)(i+3);
00345   d[0] = ArtLeadVehicleDistance;
00346   d[1] = ArtLeadVehicleVelocity;
00347   d[2] = ArtSollVelocity;
00348   i = (int *)(d+3);
00349   i[0] = ArtFlags;
00350   d = (double *)(i+1);
00351   d[0] = AcceleratorPedal;
00352   d[1] = EngineSpeed;
00353   i = (int *)(d+2);
00354   i[0] = Gear;
00355   i[1] = VehicleFlags;
00356 }
00357
00358 void DC_inertial::ReadBinary(char *data)
00359 {
00360   /*char *d=data;
00361   Yaw=(*((double *)d)++);
00362   YawRateRaw=(*((double *)d)++);
00363   YawRateOffset=(*((double *)d)++);
00364   SteeringAngle=(*((double *)d)++);
00365   Pitch=(*((double *)d)++);
00366   Speed=(*((double *)d)++);
00367   LongAcceleration=(*((double *)d)++);
00368   LatAcceleration=(*((double *)d)++);
00369   TempomatLever=(*((int *)d)++);
00370   BlinkLever=(*((int *)d)++);
00371   SteeringWheelLever=(*((int *)d)++);
00372   ArtLeadVehicleDistance=(*((double *)d)++);
00373   ArtLeadVehicleVelocity=(*((double *)d)++);
00374   ArtSollVelocity=(*((double *)d)++);
00375   ArtFlags=(*((int *)d)++);
00376   AcceleratorPedal=(*((double *)d)++);
00377   EngineSpeed=(*((double *)d)++);
00378   Gear=(*((int *)d)++);
00379   VehicleFlags=(*((int *)d)++);*/
00380   double *d = (double *)data;
00381   Yaw= d[0];
00382   YawRateRaw= d[1];
00383   YawRateOffset= d[2];
00384   SteeringAngle= d[3];
00385   Pitch= d[4];
00386   Speed= d[5];
00387   LongAcceleration= d[6];
00388   LatAcceleration= d[7];
00389   int *i = (int *)(d+8);
00390   TempomatLever = i[0];
00391   BlinkLever = i[1];
00392   SteeringWheelLever = i[2];
00393   d = (double *)(i+3);
00394   ArtLeadVehicleDistance= d[0];
00395   ArtLeadVehicleVelocity= d[1];
00396   ArtSollVelocity= d[2];
00397   i = (int *)(d+3);
00398   ArtFlags = i[0];
00399   d = (double *)(i+1);
00400   AcceleratorPedal= d[0];
00401   EngineSpeed= d[1];
00402   i = (int *)(d+2);
00403   Gear = i[0];
00404   VehicleFlags = i[1];
00405 }
00406
00407 //////////////////////////////////////////////////////////////////////////
00408 //                    DC_GPS
00409 /////////////////////////////////////////////////////////////////////////
00410
00411
00412 DC_GPS::DC_GPS() : Debug()
00413 {
00414   framenum=0;
00415   latPos=longPos=azimuth=offset=speed=gpsTime=curvature=clothoidParameter=0.0;
00416   mapIndex=scaleFactorSpeed=yawRateOffset=distanceToMap=0.0;
00417 }
00418
00419 DC_GPS::DC_GPS(const DC_GPS& gps) : Debug()
00420 {
00421   framenum          = gps.framenum           ;
00422   latPos            = gps.latPos             ;
00423   longPos               = gps.longPos                ;
00424   azimuth               = gps.azimuth                ;
00425   offset                = gps.offset                 ;
00426   speed               = gps.speed                  ;
00427   gpsTime               = gps.gpsTime                ;
00428   curvature           = gps.curvature              ;
00429   clothoidParameter = gps.clothoidParameter  ;
00430   mapIndex            = gps.mapIndex               ;
00431   scaleFactorSpeed  = gps.scaleFactorSpeed   ;
00432   yawRateOffset       = gps.yawRateOffset          ;
00433   distanceToMap       = gps.distanceToMap          ;
00434 }
00435
00436 DC_GPS::~DC_GPS()
00437 {}
00438
00439 void DC_GPS::Set(int fnum, double lPos, double loPos, double az,
00440                  double sp, double distMap)
00441 {
00442   framenum=fnum;
00443   latPos=lPos;
00444   longPos=loPos;
00445   azimuth=az;
00446   speed=sp;
00447   distanceToMap=distMap;
00448 }
00449
00450 istream& BIAS::operator>>(istream& is, DC_GPS& gps)
00451 {
00452   string tmp;
00453   is >> tmp >> gps.framenum;
00454   for (int i=0; i<12; i++) is >>tmp;
00455   is >> gps.latPos          ;
00456   is >> gps.longPos          ;
00457   is >> gps.azimuth          ;
00458   is >> gps.offset             ;
00459   is >> gps.speed               ;
00460   is >> gps.gpsTime           ;
00461   is >> gps.curvature           ;
00462   is >> gps.clothoidParameter;
00463   is >> gps.mapIndex             ;
00464   is >> gps.scaleFactorSpeed ;
00465   is >> gps.yawRateOffset        ;
00466   is >> gps.distanceToMap        ;
00467   for (int i=0; i<9; i++) is >>tmp;
00468   if (!is) {
00469     BIASERR("error reading gps meta data from ascii stream");
00470     sleep(1);
00471   }
00472   return is;
00473 }
00474
00475 ostream& BIAS::operator<<(ostream& os, const DC_GPS& gps)
00476 {
00477   streambuf *OutBuf_=cout.rdbuf(), *OsBuf_= os.rdbuf(),
00478     *ErrBuf_=cerr.rdbuf();
00479
00480   if (OutBuf_==OsBuf_ || ErrBuf_==OsBuf_){ // cout or  cerr
00481     os << "GPS: framenum: "<<gps.framenum
00482        <<"   latPos: "<<gps.latPos
00483        <<"   longPos: "<<gps.longPos
00484        <<"   azimuth: "<<gps.azimuth
00485        <<"   speed: "<<gps.speed
00486        <<"   distanceToMap: "<<gps.distanceToMap;
00487   } else {
00488     os //<< "#[GPS Data]"<<endl
00489       << "#framenum= "<<gps.framenum<<endl
00490       << "#latPos longPos azimuth offset speed gpsTime curvature clothoidParameter mapIndex scaleFactorSpeed yawRateOffset distanceToMap   "
00491       << gps.framenum         << "\t"
00492       << gps.latPos           << "\t"
00493       << gps.longPos              << "\t"
00494       << gps.azimuth              << "\t"
00495       << gps.offset             << "\t"
00496       << gps.speed              << "\t"
00497       << gps.gpsTime              << "\t"
00498       << gps.curvature          << "\t"
00499       << gps.clothoidParameter<< "\t"
00500       << gps.mapIndex             << "\t"
00501       << gps.scaleFactorSpeed << "\t"
00502       << gps.yawRateOffset      << "\t"
00503       << gps.distanceToMap      <<endl
00504       << "#Traffic Point Map Size: 0"<<endl
00505       << "#LanePointNo posX posZ curvature";
00506   }
00507   return os;
00508 }
00509
00510
00511 void DC_GPS::WriteBinary(char *data)
00512 {
00513 #ifdef BIAS_DEBUG
00514   if (!data) {
00515     BIASERR("data is NULL");
00516     BIASASSERT(false);
00517   }
00518 #endif
00519   /*char *d=data;
00520   (*((int*)d)++)   =framenum         ;
00521   (*((double*)d)++)=latPos           ;
00522   (*((double*)d)++)=longPos            ;
00523   (*((double*)d)++)=azimuth            ;
00524   (*((double*)d)++)=offset             ;
00525   (*((double*)d)++)=speed                ;
00526   (*((double*)d)++)=gpsTime            ;
00527   (*((double*)d)++)=curvature            ;
00528   (*((double*)d)++)=clothoidParameter;
00529   (*((double*)d)++)=mapIndex             ;
00530   (*((double*)d)++)=scaleFactorSpeed ;
00531   (*((double*)d)++)=yawRateOffset        ;
00532   (*((double*)d)++)=distanceToMap        ;*/
00533   int *i = (int *)data;
00534   i[0]   =framenum         ;
00535   double *d = (double *)(i+1);
00536   d[0] = latPos           ;
00537   d[1] = longPos               ;
00538   d[2] = azimuth               ;
00539   d[3] = offset            ;
00540   d[4] = speed               ;
00541   d[5] = gpsTime               ;
00542   d[6] = curvature           ;
00543   d[7] = clothoidParameter;
00544   d[8] = mapIndex            ;
00545   d[9] = scaleFactorSpeed ;
00546   d[10] = yawRateOffset      ;
00547   d[11] = distanceToMap      ;
00548 }
00549
00550 void DC_GPS::ReadBinary(char *data)
00551 {
00552   int *i = (int *)data;
00553   framenum           = i[0];
00554   double *d = (double *)(i+1);
00555   latPos             = d[0];
00556   longPos                = d[1];
00557   azimuth                = d[2];
00558   offset                 = d[3];
00559   speed                = d[4];
00560   gpsTime                = d[5];
00561   curvature            = d[6];
00562   clothoidParameter  = d[7];
00563   mapIndex             = d[8];
00564   scaleFactorSpeed   = d[9];
00565   yawRateOffset        = d[10];
00566   distanceToMap        = d[11];
00567 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/DCData.hh Source File

Image

DCData.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __DCDATA_HH__
00027 #define __DCDATA_HH__
00028
00029 #include <bias_config.h>
00030
00031 #include <iostream>
00032
00033 #include <Base/Debug/Debug.hh>
00034 #include <Base/Debug/Error.hh>
00035
00036 #define D_DC_DATA_CALC  0x0001 // 1
00037
00038 namespace BIAS{
00039
00040   class BIASImage_EXPORT DC_ptu : public Debug {
00041   public:
00042     DC_ptu();
00043     DC_ptu(const DC_ptu& ptu);
00044     ~DC_ptu();
00045
00046     void Set(double PanPos, double TiltPos, unsigned long int TimeStamp,
00047              unsigned long StartReadTimeStamp,unsigned long StopReadTimeStamp);
00048
00049     inline int GetBinaryLength()
00050     {  return 2*sizeof(double)+3*sizeof(unsigned long); };
00051     void ReadBinary(char *data);
00052     void WriteBinary(char *data);
00053
00054     friend std::istream& operator>>(std::istream& is, DC_ptu& ptu);
00055     friend std::ostream& operator<<(std::ostream& os, const DC_ptu& ptu);
00056
00057     double PanPos, TiltPos;
00058     unsigned int TimeStamp, StartReadTimeStamp, StopReadTimeStamp;
00059   };
00060
00061   class BIASImage_EXPORT DC_inertial : public Debug {
00062   public:
00063     DC_inertial();
00064     DC_inertial(const DC_inertial& in);
00065     ~DC_inertial();
00066
00067     void Set(double yaw, double yawrateraw, double yawrateoffset,
00068              double speed, double steeringangle);
00069
00070     inline int GetBinaryLength()
00071     { return 13*sizeof(double)+6*sizeof(int); };
00072     void ReadBinary(char *data);
00073     void WriteBinary(char *data);
00074
00075     friend std::istream& operator>>(std::istream& is, DC_inertial& inert);
00076     friend std::ostream&
00077     operator<<(std::ostream& os, const DC_inertial& inert);
00078
00079     double Yaw, YawRateRaw, YawRateOffset;
00080     double SteeringAngle;
00081     double Pitch;
00082     double Speed;
00083     double LongAcceleration, LatAcceleration;
00084     int TempomatLever, BlinkLever, SteeringWheelLever;
00085     double ArtLeadVehicleDistance, ArtLeadVehicleVelocity, ArtSollVelocity;
00086     int ArtFlags;
00087     double AcceleratorPedal, EngineSpeed;
00088     int Gear, VehicleFlags;
00089   };
00090
00091
00092   class BIASImage_EXPORT DC_GPS : public Debug {
00093   public:
00094     DC_GPS();
00095     DC_GPS(const DC_GPS& gps);
00096     ~DC_GPS();
00097
00098     void Set(int framenum, double latPos, double longPos, double azimuth,
00099              double speed, double distanceToMap);
00100
00101     inline int GetBinaryLength()
00102     { return 12*sizeof(double)+sizeof(int); };
00103
00104     void ReadBinary(char *data);
00105     void WriteBinary(char *data);
00106
00107     friend std::istream& operator>>(std::istream& is, DC_GPS& gsp);
00108     friend std::ostream& operator<<(std::ostream& os, const DC_GPS& gps);
00109
00110     int framenum;
00111     double latPos; // latitude
00112     double longPos; // longitude
00113     double azimuth; // angle to geographic north in rad
00114     double offset;
00115     double speed;
00116     double gpsTime;
00117     double curvature;
00118     double clothoidParameter;
00119     double mapIndex;
00120     double scaleFactorSpeed;
00121     double yawRateOffset;
00122     double distanceToMap;
00123   };
00124
00125 } // namspace BIAS
00126
00127 #endif // __DCDATA_HH__
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Debug.cpp Source File

Base » Debug

Debug.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Debug.hh"
00026
00027 using namespace BIAS;
00028
00029 #ifdef BIAS_DEBUG
00030 // these are the static members of BIAS::Debug
00031 long int BIAS::Debug::GlobalDebugLevel = 0;
00032 std::ostream BIAS::Debug::_zDebugStream(std::cerr.rdbuf());
00033
00034 #endif
00035
00036
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Debug.hh Source File

Base » Debug

Debug.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIASDEBUG_HH__
00027 #define __BIASDEBUG_HH__
00028
00029 #include <bias_config.h>
00030 #include <Base/Common/BIASpragmaStart.hh>
00031
00032 #include <iostream>
00033 #include <iomanip>
00034 #include <string>
00035 #include <stdio.h>
00036
00037
00038
00039
00040 /** \ingroup g_utils
00041     \file Debug.hh
00042     \brief some macros, classes and varaibles for debugging purposes:
00043
00044     The class variables _liDebugLevel and _zDebugStream
00045       must exist for the macros to operate. Usually they are inherited
00046       from the Debug class defined below
00047
00048     _liDebuglevel is a bitfield. It is set to 0 in the constr. of Debug
00049       The bits should be addressed via a #define macros from the header file
00050       of the acording class.
00051
00052     _zDebugStream is a ostream. It is set to cerr in the constructor of
00053       Debug
00054
00055     BIASDOUT(flag, stream)
00056        prints stream to cerr if flag is set in _liDebuglevel
00057
00058     BIASDOUT_THREAD is the aequivalent to BIASDOUT for the use within a thread
00059
00060     BIASGDOUT(level, stream)
00061        prints out debug information if BIASGlobalDebugLevel is greater than
00062        level. It can only be used together with the global debug level.
00063
00064     The global debuglevel variable 'BIASGlobalDebugLevel' is defined in
00065       MainDebug.hh. It should be included only in the application.
00066
00067     The global debug level 'BIASGlobalDebugLevel' should be defined in every
00068       executable via the include of <Debug/MainDebug.hh>.
00069
00070     A function ResetDebugLevelFromGlobal() can be implemented in classes that
00071       need it. See Examples...
00072
00073     An exhaustive example exists.
00074
00075     \author Felix Woelk
00076 **/
00077
00078
00079
00080 #ifdef BIAS_DEBUG
00081
00082
00083 #define BIASDOUT(flag, arg)\
00084     { if ((this->_liDebugLevel & flag)!=0){\
00085         std::ostream _cods_(std::cout.rdbuf()); \
00086         this->GetDebugStream(_cods_); _cods_ << #flag << ", " << __FILE__ \
00087                       << ", " << __LINE__ << " : " << arg << std::endl; } }
00088
00089 #define BIASFLUSHDOUT \
00090     { std::ostream _cods_(std::cout.rdbuf()); \
00091     this->GetDebugStream(_cods_); _cods_.flush(); }
00092
00093 #define BIASDOUT_THREAD(debuglevel, debugstream, flag, arg)\
00094     if ((debuglevel & flag)!=0)\
00095         debugstream << #flag << ", " << __FILE__ << ", " << __LINE__ << " : "\
00096                     << arg << std::endl;
00097
00098 #define BIASGDOUT(level, arg)\
00099     if (Debug::GlobalDebugLevel >= level)\
00100        std::cerr << arg << std::endl;
00101
00102 #define BIASDOUT_CLEAN(flag, arg)\
00103     { if ((this->_liDebugLevel & flag)!=0){\
00104         std::ostream _cods_(std::cout.rdbuf()); \
00105         this->GetDebugStream(_cods_); _cods_ << arg << std::endl; } }
00106
00107 #define BIASCDOUT(flag, arg)\
00108     { if ((this->_liDebugLevel & flag)!=0){\
00109         std::ostream _cods_(std::cout.rdbuf()); \
00110         this->GetDebugStream(_cods_); _cods_ << arg; } }
00111
00112
00113 #else
00114 #define BIASDOUT_CLEAN(flag, arg) {}
00115 #define BIASDOUT(flag, arg) {}
00116 #define BIASFLUSHDOUT {}
00117 #define BIASDOUT_THREAD(debuglevel, debugstream, flag, arg) {}
00118 #define BIASGDOUT(level, arg) {}
00119 #define BIASCDOUT(flag, arg) {}
00120
00121
00122
00123 #endif // BIAS_DEBUG
00124
00125
00126 // TODO: Please use BIASABORT instead!
00127 #ifdef WIN32
00128 #define ABORT cout << "Please hit enter to terminate program!" << endl << flush; \
00129         getchar(); \
00130         exit(-1);
00131 #else
00132 #define ABORT abort();
00133 #endif
00134
00135
00136 /// this returns the type as a string, e.g. PRINTTYPE(int) -> "int"
00137 /// useful when debugging templates
00138 /// on WIN32 thsi can be done more pretty with typeid( *ptr ).name() (jw)
00139 #define PRINTTYPE(thetype)  (\
00140   (typeid(thetype)==typeid(char))? "char": \
00141   (typeid(thetype)==typeid(signed char))?"signed char":\
00142   (typeid(thetype)==typeid(unsigned char))?"unsigned char":\
00143   (typeid(thetype)==typeid(short))? "short": \
00144   (typeid(thetype)==typeid(signed short))? "signed short": \
00145   (typeid(thetype)==typeid(unsigned short))?"unsigned short":\
00146   (typeid(thetype)==typeid(int))? "int":\
00147   (typeid(thetype)==typeid(unsigned int))?"unsigned int":\
00148   (typeid(thetype)==typeid(signed int))?"signed int":\
00149   (typeid(thetype)==typeid(double))?"double":\
00150   (typeid(thetype)==typeid(float))?"float":\
00151   (typeid(thetype)==typeid(long))?"long":\
00152   "UnknownStorageType")
00153
00154
00155 namespace BIAS{
00156
00157   /* this variable os the global debuglevel and should be defined in
00158      every executable via include of <Debug/MainDebug.hh> */
00159   //extern long int GlobalDebugLevel;
00160
00161
00162   /** \class Debug
00163       \ingroup g_utils
00164       \file Debug.hh
00165       \brief some macros, classes and varaibles for debugging purposes
00166            if a class is derived from Debug, then use BIASDOUT() instead of
00167            cerr/cout for debugging purposes
00168
00169       father of many classed to includes flags based debug information
00170
00171       The class variables _liDebugLevel and _zDebugStream
00172       must exist for the macros to operate. Usually they are inherited
00173       from the Debug class defined below
00174
00175       _liDebuglevel is a bitfield. It is set to 0 in the constr. of Debug
00176       The bits should be addressed via a #define macros from the header file
00177       of the acording class.
00178
00179       _zDebugStream is a ostream. It is set to cerr in the constructor of
00180       Debug
00181
00182       - BIASDOUT(flag, stream)
00183         prints stream to cerr if flag is set in _liDebuglevel
00184
00185       - BIASDOUT_THREAD is the aequivalent to BIASDOUT for the use within a thread
00186       - BIASGDOUT(level, stream)
00187         prints out debug information if BIASGlobalDebugLevel is greater than
00188         level. It can only be used together with the global debug level.
00189
00190       - BIASDOUT_CLEAN(flag, stream)
00191         is similar to BIASDOUT except that no flag,file and line is printed
00192
00193
00194       The global debuglevel variable 'BIASGlobalDebugLevel' is defined in
00195       Debug.cpp.
00196
00197       A function ResetDebugLevelFromGlobal() can be implemented in classes that
00198       need it. See Examples...
00199
00200       An exhaustive example exists.
00201
00202       \author Felix Woelk
00203   **/
00204
00205   class BIASDebug_EXPORT Debug{
00206
00207   public:
00208     inline Debug()
00209     {
00210 #ifdef BIAS_DEBUG
00211       _liDebugLevel = 0;
00212 #endif
00213     };
00214
00215     inline Debug(Debug& deb)
00216     {
00217 #ifdef BIAS_DEBUG
00218       _liDebugLevel = deb.GetDebugLevel();
00219 #endif
00220     }
00221
00222     inline ~Debug() {};
00223
00224     inline void SetDebugLevel(long int lv)
00225     {
00226 #ifdef BIAS_DEBUG
00227       _liDebugLevel = lv;
00228 #endif
00229     };
00230
00231     inline int GetDebugLevel() const
00232     {
00233 #ifdef BIAS_DEBUG
00234       return _liDebugLevel;
00235 #else
00236       return 0;
00237 #endif
00238     };
00239
00240     inline bool DebugLevelIsSet(long int lv) const
00241     {
00242 #ifdef BIAS_DEBUG
00243       return ((_liDebugLevel & lv)!=0);
00244 #else
00245       return false;
00246 #endif
00247     };
00248
00249     inline void AddDebugLevel(long int lv)
00250     {
00251 #ifdef BIAS_DEBUG
00252       _liDebugLevel = _liDebugLevel | lv;
00253 #endif
00254     };
00255
00256     inline void RemoveDebugLevel(long int lv)
00257     {
00258 #ifdef BIAS_DEBUG
00259       _liDebugLevel = _liDebugLevel & (~lv);
00260 #endif
00261     };
00262
00263     inline void PrintDebugLevel(std::ostream& os=std::cout) const
00264     {
00265 #ifdef BIAS_DEBUG
00266 #define WS sizeof(long int)*8
00267       os << "0x" << std::hex << std::setw(sizeof(long int)<<1)
00268          << std::setfill('0') << GetDebugLevel() << std::dec << " = ";
00269       for (unsigned i=1; i<=WS; i++){
00270         os << !!((1<<(WS-i))&GetDebugLevel());
00271         if ((i%4)==0) os << " ";
00272         if ((i%8)==0) os << " ";
00273       }
00274       os << std::endl;
00275 #endif
00276     }
00277
00278     inline void SetDebugStream(std::ostream& os)
00279     {
00280 #ifdef BIAS_DEBUG
00281       _zDebugStream.rdbuf(os.rdbuf());
00282 #endif
00283     }
00284
00285     inline std::ostream& GetDebugStream()
00286     {
00287 #ifdef BIAS_DEBUG
00288       return _zDebugStream;
00289 #else
00290       return std::cout;
00291 #endif
00292     }
00293
00294     inline void GetDebugStream(std::ostream& os) const
00295     {
00296 #ifdef BIAS_DEBUG
00297
00298       os.rdbuf(_zDebugStream.rdbuf());
00299 #else
00300       os.rdbuf(std::cout.rdbuf());
00301 #endif
00302     }
00303
00304     inline static void SetGlobalDebugLevel(long int lev)
00305     {
00306 #ifdef BIAS_DEBUG
00307       GlobalDebugLevel = lev;
00308 #endif
00309     }
00310
00311     inline static long int GetGlobalDebugLevel()
00312     {
00313 #ifdef BIAS_DEBUG
00314       return GlobalDebugLevel;
00315 #else
00316       return 0;
00317 #endif
00318     }
00319 #ifdef BIAS_DEBUG
00320     inline Debug& operator=(const Debug& d)
00321     {
00322       _liDebugLevel = d._liDebugLevel;
00323       _zDebugStream.rdbuf(d._zDebugStream.rdbuf());
00324       return *this;
00325     }
00326 #endif
00327   protected:
00328 #ifdef BIAS_DEBUG
00329     long int _liDebugLevel;
00330     static std::ostream _zDebugStream;
00331
00332     static long int GlobalDebugLevel;
00333 #endif
00334
00335   };
00336 } // namespace
00337
00338 #include <Base/Common/BIASpragmaEnd.hh>
00339
00340 #endif // __BIASDEBUG_HH__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/DebugMyMain.cpp Source File

Base » Debug » Examples

DebugMyMain.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "MyDebug.hh"
00027
00028 #include <Base/Debug/Debug.hh>
00029 #include <Base/Debug/Error.hh>
00030 #include <fstream>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 //int main(int argc, char *argv[])
00036 int main()
00037 {
00038   ExampleDebug instance1;
00039   ExampleDebug instance2;
00040
00041
00042
00043   /////////////////////////////////////////////////////////////
00044   // using local per-instance debuglevel
00045   ////////////////////////////////////////////////////////////
00046
00047   // set the debuglevel for instance1
00048   instance1.SetDebugLevel(instance1.GetDebugLevel()|EXAMPLEDEBUG_TESTFLAG);
00049   instance1.SetDebugLevel(instance1.GetDebugLevel()|EXAMPLEDEBUG_TESTFLAG2);
00050
00051   // this instance is with debug information
00052   cout << "\ninstance1 with 'local' debug information:\n" << endl;
00053   instance1.func();
00054
00055   // this instance is without debug information
00056   cout << "\ninstance2 without 'local' debug information:\n" << endl;
00057   instance2.func();
00058
00059
00060
00061   //////////////////////////////////////////////////////////////
00062   //  using the global debug level
00063   /////////////////////////////////////////////////////////////
00064
00065   // the global debg level
00066   instance1.SetGlobalDebugLevel(150);
00067
00068   cout << "\ninstance1 with 'global' debug information:\n" << endl;
00069   instance1.func();
00070
00071   cout << "\ninstance2 with 'global' debug information:\n" << endl;
00072   instance2.func();
00073   cout << "\nthe constructor should be called after the global\n"
00074        <<" debuglevel 'BIASGlobalDebugLevel' is set:\n" << endl;
00075   ExampleDebug instance3;
00076   instance3.func();
00077
00078   cout << "\nor the reset must be done by hand:\n" << endl;
00079   instance2.ResetDebugLevelFromGlobal();
00080   instance2.func();
00081
00082   /////////////////////////////////////////////////////////////
00083   //    redirecting debug output
00084   ///////////////////////////////////////////////////////////////
00085
00086   cout << "\nnow redirect the debug output to file 'debug.txt':\n" << endl;
00087   ofstream os("debug.txt");
00088   if (!os.good())
00089     BIASERR("error opening debug.txt");
00090   instance1.SetDebugStream(os);
00091   instance1.func();
00092
00093   os.close();
00094
00095   cout << "\nnow use cerr again:\n" << endl;
00096   instance1.SetDebugStream(cerr);
00097   instance1.func();
00098
00099   return 0;
00100 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/DebugSimple.hh Source File

Base » Debug

DebugSimple.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __DEBUG_SIMPLE_HH__
00027 #define __DEBUG_SIMPLE_HH__
00028
00029 /**
00030     @brief Macros for output instead of direct cout<<
00031     Can be switched on or off globally,
00032     can be used for logging to file, too.
00033
00034     The significant difference to BIASDebug is that thsi macro does not touch teh class hierarchy
00035     and does not add artificial class members.
00036     But: This debugging scheme supports only levels, not flags.
00037     If you really need more granular debugging/outputs look at BIAS/Base/Debug.hh .
00038     @author Jan Woetzel
00039 **/
00040
00041 // for std::cout / std::cerr
00042 #include <iostream>
00043
00044
00045 /// do COUT outputs?, default is 'on'
00046 #ifndef COUT_ONOFF
00047 #  define COUT_ONOFF 1
00048 #endif
00049
00050 /// which destination for COUT ?
00051 #ifndef COUT_DEST
00052 #  define COUT_DEST std::cout
00053 #endif
00054
00055
00056 // ------ define the macros ------------------------------------------------------
00057
00058 #if COUT_ONOFF
00059 // -- COUT's argument is an ostream to be printed
00060 #  define COUT(output) \
00061      COUT_DEST<<output;
00062 #else
00063 // -- do nothing
00064 #  define COUT(output)
00065 #endif
00066
00067
00068
00069 #endif // do not add code after this line
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DeInterlace.cpp Source File

Filter

DeInterlace.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "DeInterlace.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 //////////////////////////////////////////////////////////////////////////
00034 //                 implementation
00035 //////////////////////////////////////////////////////////////////////////
00036
00037 template <class InputStorageType, class OutputStorageType>
00038 DeInterlace<InputStorageType, OutputStorageType>::
00039 DeInterlace()
00040   : Convolution<InputStorageType, OutputStorageType>()
00041 {
00042   bUseEvenLines_ = true;
00043   bDoDownSamplingByTwo_ = false;
00044   this->_ParamsAllocated = true;
00045   eDeInterlaceType_ = BIAS_DI_22;
00046 }
00047
00048 template <class InputStorageType, class OutputStorageType>
00049 DeInterlace<InputStorageType, OutputStorageType>::
00050 DeInterlace(Param& para, const std::string& postfix)
00051   : Convolution<InputStorageType, OutputStorageType>(para, "-Mean"+postfix)
00052 {
00053   bUseEvenLines_ = true;
00054   bDoDownSamplingByTwo_ = false;
00055   eDeInterlaceType_ = BIAS_DI_22;
00056   int grp=para.GetFreeGroupID();
00057   _AddParam(para, grp, "-DeInterlace"+postfix);
00058   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "DeInterlace");
00059 }
00060
00061
00062 template <class InputStorageType, class OutputStorageType>
00063 DeInterlace<InputStorageType, OutputStorageType>::
00064 DeInterlace(Param& para, const int grp, const std::string& postfix)
00065   : Convolution<InputStorageType, OutputStorageType>(para, grp, "-Mean"+postfix)
00066 {
00067   bUseEvenLines_ = true;
00068   bDoDownSamplingByTwo_ = false;
00069    eDeInterlaceType_ = BIAS_DI_22;
00070   _AddParam(para, grp, "-DeInterlace"+postfix);
00071 }
00072
00073 template <class InputStorageType, class OutputStorageType>
00074 DeInterlace<InputStorageType, OutputStorageType>::
00075 ~DeInterlace()
00076 {
00077
00078 }
00079
00080
00081 template <class InputStorageType, class OutputStorageType>
00082 int DeInterlace<InputStorageType, OutputStorageType>::
00083 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00084 {
00085   BIASCDOUT(D_FILTERBASE_CALLSTACK, "DeInterlace::Filter\n");
00086   int res = 0;
00087
00088   register double sum=0.0;
00089   InputStorageType **psrc;
00090   OutputStorageType **pdst;
00091
00092   register const int width = src.GetWidth();
00093   register const int height= src.GetHeight();
00094   //this is bad case just copy the even to odd lines or vice versa
00095   if(!bDoDownSamplingByTwo_){
00096     if(!dst.SamePixelAndChannelCount(src) || dst.IsEmpty()) {
00097       dst.Release();
00098       dst.Init(src.GetWidth(),src.GetHeight(),src.GetChannelCount(),
00099             src.GetStorageType(),src.IsInterleaved());
00100     }
00101     //go to beginnig of first row "0"
00102     psrc = src.GetImageDataArray();
00103     pdst = dst.GetImageDataArray();
00104     //use even lines 0,2,4,6...
00105     int line=0;
00106     if(bUseEvenLines_)
00107     {
00108       for(int i=0;i<height;i++){
00109         //even line
00110         if ( (i % 2) == 0)line = i;
00111         else line = i-1;
00112         for(int j=0;j<width;j++){
00113           pdst[i][j] = (OutputStorageType)psrc[line][j];
00114         } } }
00115     //use odd lines 1,3,5...
00116     else
00117     {
00118       for(int i=1;i<height-1;i++){
00119         //odd line
00120         if ( (i % 2) == 0)line = i+1;
00121         else line = i;
00122         for(int j=0;j<width;j++){
00123           pdst[i][j] = (OutputStorageType)psrc[line][j];
00124         } } }
00125   } //end downsampling == 1.0
00126   else{
00127     if(dst.GetWidth()!= src.GetWidth()/2 ||
00128        dst.GetHeight() != src.GetHeight()/2 ||
00129        dst.GetChannelCount() != src.GetChannelCount()||
00130        dst.IsEmpty())
00131     {
00132       dst.Release();
00133       dst.Init(src.GetWidth()/2,src.GetHeight()/2,
00134                 src.GetChannelCount(), src.GetStorageType(), src.IsInterleaved());
00135      }
00136     //go to beginnig of first row "0"
00137     psrc = src.GetImageDataArray();
00138     pdst = dst.GetImageDataArray();
00139     //use even lines 0,2,4,6...
00140     if(bUseEvenLines_)
00141     {
00142       int jtwo = 0;
00143       int itwo = 0;
00144       for(int i=0;i<height/2;i++)
00145         for(int j=0;j<width/2;j++){
00146           jtwo = 2*j; itwo = 2*i;
00147
00148           switch(eDeInterlaceType_)
00149           {
00150             case BIAS_DI_121:
00151               if(j==0)//beginning of row
00152                 sum = (psrc[itwo][0]+psrc[itwo][1])/2;
00153               else if(j==(width/2)-1) // end of row
00154                 sum = (psrc[itwo][jtwo-1]+psrc[itwo][jtwo])/2;
00155               else // in between
00156                 sum = double( (psrc[itwo][jtwo-1] + psrc[itwo][jtwo]*2 + psrc[itwo][jtwo+1])/4 );
00157               break;
00158             case BIAS_DI_22:
00159               if(j==0)//beginning of row
00160                 sum = (psrc[itwo][0]+psrc[itwo][1])/2;
00161               else    // rest of row
00162                 sum = (psrc[itwo][jtwo-1]+psrc[itwo][jtwo])/2;
00163               break;
00164           }
00165           pdst[i][j] = (OutputStorageType)sum;
00166         }
00167     }
00168     //use odd lines 1,3,5...
00169     else
00170     {
00171      int jtwo = 0;
00172      int itwo = 0;
00173      for(int i=1;i<height/2;i++)
00174       for(int j=0;j<width/2;j++){
00175         jtwo = 2*j; itwo = (2*i)-1;
00176         switch(eDeInterlaceType_)
00177         {
00178           case BIAS_DI_121:
00179           if(j==0)//beginning of row
00180             sum = (psrc[itwo][0]+psrc[itwo][1])/2;
00181           else if(j==(width/2)-1) // end of row
00182             sum = (psrc[itwo][jtwo-1]+psrc[itwo][jtwo])/2;
00183           else // in between
00184             sum = (psrc[itwo][jtwo-1] + psrc[itwo][jtwo]*2 + psrc[itwo][jtwo+1])/4;
00185         break;
00186         case BIAS_DI_22:
00187           if(j==0)//beginning of row
00188             sum = (psrc[itwo][0]+psrc[itwo][1])/2;
00189           else    // rest of row
00190             sum = (psrc[itwo][jtwo-1]+psrc[itwo][jtwo])/2;
00191           break;
00192         }
00193         pdst[i][j] = (OutputStorageType)sum;
00194       }
00195     }
00196   } //end downsampling != 1.0
00197   return res;
00198 }
00199
00200 template <class InputStorageType, class OutputStorageType>
00201 int DeInterlace<InputStorageType, OutputStorageType>::
00202 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00203 {
00204   BIASERR("Unimplemented interface, calling generic Filter");
00205   return Filter(src, dst);
00206 }
00207
00208 template <class InputStorageType, class OutputStorageType>
00209 int DeInterlace<InputStorageType, OutputStorageType>::
00210 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00211 {
00212   BIASERR("Unimplemented interface, calling generic Filter");
00213   return Filter(src, dst);
00214 }
00215
00216
00217 template <class InputStorageType, class OutputStorageType>
00218 void DeInterlace<InputStorageType, OutputStorageType>::
00219 SetUseEvenLines(bool bEvenLines)
00220 {
00221   bUseEvenLines_ = bEvenLines;
00222 }
00223
00224 template <class InputStorageType, class OutputStorageType>
00225 void DeInterlace<InputStorageType, OutputStorageType>::
00226 SetDeInterlaceType(BIAS_DEINTERLACE_TYPE type)
00227 {
00228  eDeInterlaceType_ = type;
00229 }
00230
00231
00232 template <class InputStorageType, class OutputStorageType>
00233 void DeInterlace<InputStorageType, OutputStorageType>::
00234 SetDownSamplingByTwo(bool bDoDownSamplingByTwo )
00235 {
00236   bDoDownSamplingByTwo_ = bDoDownSamplingByTwo;
00237 }
00238
00239 //////////////////////////////////////////////////////////////////////////
00240 //               protected functions
00241 //////////////////////////////////////////////////////////////////////////
00242
00243 template <class InputStorageType, class OutputStorageType>
00244 void DeInterlace<InputStorageType, OutputStorageType>::
00245 _AddParam(Param& para, const int grp, const std::string& postfix)
00246 {
00247
00248 }
00249
00250
00251
00252 //////////////////////////////////////////////////////////////////////////
00253 //                 instantiation
00254 //////////////////////////////////////////////////////////////////////////
00255 #define FILTER_INSTANTIATION_CLASS DeInterlace
00256 //#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00257 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DeInterlace.hh Source File

Filter

DeInterlace.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __DeInterlace_hh__
00027 #define __DeInterlace_hh__
00028
00029 #include "Convolution.hh"
00030
00031 #include <Base/Common/BIASpragmaStart.hh>
00032
00033 namespace BIAS
00034 {
00035   /** @class Mean
00036       @ingroup g_filter
00037       @brief deinterlacer filter
00038
00039       @author ischiller 01/2005 */
00040
00041   enum BIAS_DEINTERLACE_TYPE{
00042     BIAS_DI_121, //calculate new pixel from old neighbouring pixels with  new = (old1+2*old2+old3)/4
00043     BIAS_DI_22  // calculate new pixel from old neighbouring pixels with  new = (old1+old2)/2
00044   };
00045
00046
00047   template <class InputStorageType, class OutputStorageType>
00048   class BIASFilter_EXPORT DeInterlace : public Convolution<InputStorageType, OutputStorageType>
00049   {
00050   public:
00051     DeInterlace();
00052
00053     DeInterlace(Param& para, const std::string& postfix="");
00054
00055     DeInterlace(Param& para, const int group_id, const std::string& postfix);
00056
00057     DeInterlace(const DeInterlace<InputStorageType, OutputStorageType>& m) {};
00058
00059     ~DeInterlace();
00060
00061     /** @brief averages over a region with constant weights
00062         @author woelk 09/2004 */
00063     virtual int Filter(const Image<InputStorageType>& src,
00064                        Image<OutputStorageType>& dst);
00065
00066     /** @brief only calls filter, for consistency of params */
00067     virtual int FilterInt(const Image<InputStorageType>& src,
00068                           Image<OutputStorageType>& dst);
00069
00070     /** @brief only calls filter, for consistency of params */
00071     virtual int FilterFloat(const Image<InputStorageType>& src,
00072                             Image<OutputStorageType>& dst);
00073
00074     /** Set if the  even or odd lines in the images should be used  */
00075     void SetUseEvenLines(bool bEvenLines=true);
00076
00077     /** Set the Type of deinterlacing e.g. mean of 2 pixel or weighting with 121... */
00078     void SetDeInterlaceType(BIAS_DEINTERLACE_TYPE type);
00079
00080     /** Set the downsampling factor while filter */
00081     void SetDownSamplingByTwo(bool bDoDownSamplingByTwo = true );
00082   protected:
00083
00084     void _AddParam(Param& para, const int group_id,
00085                    const std::string& postfix);
00086
00087     bool bUseEvenLines_;
00088     bool bDoDownSamplingByTwo_;
00089     BIAS_DEINTERLACE_TYPE eDeInterlaceType_;
00090
00091     //using Convolution<InputStorageType, OutputStorageType>::_fm;
00092   }; // class
00093
00094
00095
00096
00097 } // namespace
00098
00099 #include <Base/Common/BIASpragmaEnd.hh>
00100
00101 #endif // __Mean_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: DEPENDENCIES Source File

DEPENDENCIES

Go to the documentation of this file.
00001 Common
00002 ======
00003 Because the build-system of BIAS is based on CMake (www.kitware.com) you must
00004 have properly installed these tools:
00005
00006     * cmake (newest version, at least 2.0.3, see www.cmake.org)
00007
00008 Most of the subdir MathAlgo is based on Blas/Lapack, so BIAS depends on:
00009     * lapack/blas (see below for Win32 hints)
00010
00011
00012 UNIX
00013 ====
00014 There are some packages which have to be installed in order for BIAS
00015 to be built and to work correctly. Currently BIAS depends on:
00016
00017     * libuuid (belongs to ext2 file system tools)
00018     * g2c/f2c (fortran-to-c)
00019     * make (GNU-make prefered, other untested)
00020     * a compiler (gcc/g++ 4.1 prefered)
00021
00022 BIAS has interfaces for or supports the following packages (optional):
00023
00024     * libdv
00025     * fftw3
00026     * GSL (GNU Scientific Library)
00027     * gtk 1.2.10 or gtk2 (both deprecated)
00028     * ImageMagick  (e.g. ImageMagick-6.2.0-Q16)
00029     * imlib (e.g. 1.9.10)
00030     * OpenCV (e.g beta5a)
00031     * OpenGL
00032     * Pthreads
00033     * wxWidgets (formerly known as WxWindows, e.g. 2.6)
00034     * libxml2 (e.g. 2.5.10-25)
00035
00036 Note: Problems with wxWidgets/GTK
00037 Since wxWidgets may itself have dependencies on GTK, you may run into trouble
00038 when activating both. wxWidgets 2.6 and above usually use GTK2. It is
00039 recommended that you do not install GTK1 (GDK1, GLIB1) devel packages if you
00040  are using a GTK2 based wxWidgets installation, because files like glibconfig.h
00041 found in different conflicting versions may be confused in that case.
00042
00043
00044 WINDOWS
00045 ======
00046 We ported most of BIAS to Win32 system using Windows XP and Visual Studio .NET
00047 2003. Older Version of VS are not supported because of their broken template
00048 compilation engine.
00049
00050 Under MS Windows there are the following dependencies:
00051
00052     * lapack/blas     (can be found at
00053                        http://www.cs.unc.edu/~kim/lapack/VCLapack.zip
00054                        set Path variable to both .dll files and ENV variables
00055                        (LAPACK_HOME and BLAS_HOME) to the directory
00056                        which containes lapack, blas and f2c.h (def's needed))
00057
00058 optional:
00059
00060     * libXML2 2.5.10  (which depends on zlib and iconv. All this can be
00061              - 2.6.11  found at http://www.zlatkovic.com/libxml.en.html.
00062                        For configuration with CMake, set environment variables
00063                        XML2_HOME, ICONV_HOME and ZLIB_HOME.
00064                        For runtime set PATH to the directories
00065                        that containes all three DLL's or copy DLL's into
00066                        systemdir)
00067     * ImageMagick  (e.g. ImageMagick-6.2.0-Q16)
00068     * OpenCV (e.g beta5a)
00069     * OpenGL
00070     * Pthreads
00071     * wxWidgets (formerly known as WxWindows, e.g. 2.42)
00072     * libxml2 (e.g. 2.5.10-25)
00073
00074
00075 Not yet integrated dependencies: GSL, imlib (or other imageloader), gtk (will never be integrated),  FFTW3
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Dilation.cpp Source File

Filter

Dilation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Dilation.hh"
00027 #include "Base/Image/ImageConvert.hh"
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 #include <limits>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 template <class InputStorageType, class OutputStorageType>
00036 int Dilation<InputStorageType, OutputStorageType>::
00037 Dilate(const Image<InputStorageType>& Source,
00038        Image<OutputStorageType>& Destination,
00039        int KernelSize)
00040 {
00041   if (Destination.IsEmpty())
00042     Destination.Init(Source.GetWidth(), Source.GetHeight(),
00043                      Source.GetChannelCount());
00044 #ifdef BIAS_BOUNDS_CHECK
00045   if (Source.GetChannelCount() !=1)
00046     BIASERR("Dilation::Dilate()  only implemented for grey images");
00047   if (! Source.SamePixelAndChannelCount(Destination))
00048     BIASERR("Dilation::Dilate()  wrong images izes");
00049   if (KernelSize % 2 != 1)
00050     BIASERR("Dilation::Dilate()  odd KernelSize required");
00051 #endif
00052
00053   int Width = Source.GetWidth();
00054   int Height = Source.GetHeight();
00055   register int HalfKernelSize = (KernelSize - 1) / 2;
00056   OutputStorageType *Dest = NULL;
00057   register OutputStorageType **DestArray;
00058   register InputStorageType **SourceArray = Source.GetImageDataArray();
00059   // if used in place temporary data is necessairy
00060   if ((void*)Source.GetImageData() == (void*)Destination.GetImageData()){
00061     Dest = new OutputStorageType[Height * Width];
00062     DestArray = new OutputStorageType*[Height];
00063     DestArray[0] = Dest;
00064     for (register int i=1; i< Height; i++) {
00065       DestArray[i] = DestArray[i-1] + Width;
00066     }
00067   } else {
00068     DestArray = Destination.GetImageDataArray();
00069   }
00070   // loop
00071   for (register int y = HalfKernelSize;
00072        y < ((int)Source.GetHeight() - HalfKernelSize); y++){
00073     for (register int x = HalfKernelSize;
00074          x < ((int)Source.GetWidth() - HalfKernelSize); x++) {
00075       DestArray[y][x] = 0;
00076       for (register int ky = -HalfKernelSize; ky <= HalfKernelSize; ky++)
00077         for (register int kx = -HalfKernelSize; kx <= HalfKernelSize; kx++)
00078           if (SourceArray[y+ky][x+kx]!=0)
00079             DestArray[y][x]=SourceArray[y+ky][x+kx];
00080     }
00081   }
00082
00083   if ((void*)Source.GetImageData() == (void*)Destination.GetImageData()){
00084     delete[] DestArray;
00085     Destination.Release();
00086     Destination.RedirectImageDataPointer(Dest);
00087   }
00088   // fill borders with zero
00089   FillBorderConst(Destination, (unsigned short int)HalfKernelSize,
00090                   (unsigned short int)HalfKernelSize, (OutputStorageType)0);
00091   return 0;
00092 }
00093
00094 template <class InputStorageType, class OutputStorageType>
00095 int Dilation<InputStorageType, OutputStorageType>::
00096 Dilate3Fast(const Image<InputStorageType>& src,
00097             const Image<InputStorageType>& orig,
00098             Image<OutputStorageType>& dest,
00099             bool Neighbor4) {
00100 #ifdef BIAS_DEBUG
00101   if ((src.GetChannelCount() !=1) || (dest.GetChannelCount() !=1) ||
00102       (orig.GetChannelCount() !=1 ) ) {
00103     BIASERR("Dilation::Dilate3Fast()  only implemented for grey images");
00104     return -1;
00105   }
00106   if (src.GetPixelCount()<25) {
00107     BIASERR("Dilation::Dilate3Fast(): src has less than 25 pixel");
00108     return -2;
00109   }
00110   if ( (src.GetHeight()<5) || (src.GetWidth() < 5)) {
00111     BIASERR("Dilation::Dilate3Fast(): src has less than 5 cols or rows");
00112     return -3;
00113   }
00114   if (src.GetPixelCount() != dest.GetPixelCount()) {
00115     BIASERR("Dilation::Dilate3Fast(): src and dest have different sizes");
00116     return -3;
00117   }
00118 #endif
00119   if (orig.GetStorageType()==dest.GetStorageType()) {
00120     // copy orig to dest
00121     memcpy(dest.GetImageData() , orig.GetImageData(),
00122            orig.GetPixelCount()*sizeof(InputStorageType));
00123   } else {
00124     // have to convert
00125     ImageConvert::ConvertST(orig, dest, dest.GetStorageType());
00126   }
00127   // then delete the eroded background form src in dest
00128   register OutputStorageType *d=dest.GetImageDataArray()[1]+1;
00129   register InputStorageType *p1=src.GetImageDataArray()[0];
00130   register InputStorageType *p2=p1+1, *p3 = p2+1;
00131   register InputStorageType *p4=src.GetImageDataArray()[1];
00132   register InputStorageType *p5 = p4+1, *p6=p5+1;
00133   register InputStorageType *p7 =src.GetImageDataArray()[2];
00134   register InputStorageType *p8 = p7+1, *p9=p8+1;
00135   register InputStorageType *last=&(src.GetImageData()[src.GetPixelCount()-1]);
00136   if (Neighbor4) {
00137     while (p8<last) {
00138       if (*p5==0)
00139     if (*p2==0)
00140       if (*p4==0)
00141         if (*p6==0)
00142           if (*p8==0)
00143         *d=0;
00144       p2++; p4++; p5++; p6++; p8++; d++;
00145     }
00146   } else {
00147     while (p9<=last) {
00148       if (*p5 == 0)
00149     if (*p1==0)
00150       if (*p2==0)
00151         if (*p3==0)
00152           if (*p4==0)
00153         if (*p6==0)
00154           if (*p7==0)
00155             if (*p8==0)
00156               if (*p9==0)
00157             *d=0;
00158       p1++; p2++; p3++; p4++; p5++; p6++; p7++; p8++; p9++; d++;
00159     }
00160   }
00161   //// set border to zero
00162   // top and bottom
00163   register OutputStorageType *o1,*o2,*o9,*olast;
00164   o1 = dest.GetImageDataArray()[0];
00165   o9 = dest.GetImageDataArray()[dest.GetHeight()-1];
00166   olast=&(dest.GetImageData()[dest.GetPixelCount()-1]);
00167   while (o9<=olast) {
00168     *o1=0; *o9=0;
00169     o1++; o9++;
00170   }
00171   //  left and right
00172   register unsigned int offset = dest.GetWidth();
00173   o1 = dest.GetImageData();
00174   o2 = o1+offset-1;
00175   while (o2<=olast) {
00176     *o1 = 0;
00177     *o2 = 0;
00178     o1 += offset;
00179     o2 += offset;
00180   }
00181   return 0;
00182 }
00183
00184 template <class InputStorageType, class OutputStorageType>
00185 int Dilation<InputStorageType, OutputStorageType>::
00186 Dilate3Fast(const Image<InputStorageType>& src,
00187             Image<OutputStorageType>& dest,
00188             bool Neighbor4) {
00189 #ifdef BIAS_DEBUG
00190   if ((src.GetChannelCount() !=1) || (dest.GetChannelCount() !=1) ) {
00191     BIASERR("Dilation::Dilate3Fast()  only implemented for grey images");
00192     return -1;
00193   }
00194   if (src.GetPixelCount()<25) {
00195     BIASERR("Dilation::Dilate3Fast(): src has less than 25 pixel");
00196     return -2;
00197   }
00198   if ( (src.GetHeight()<5) || (src.GetWidth() < 5)) {
00199     BIASERR("Dilation::Dilate3Fast(): src has less than 5 cols or rows");
00200     return -3;
00201   }
00202   if (src.GetPixelCount() != dest.GetPixelCount()) {
00203     BIASERR("Dilation::Dilate3Fast(): src and dest have different sizes");
00204     return -3;
00205   }
00206 #endif
00207
00208   // then delete the eroded background form src in dest
00209   register OutputStorageType *d=dest.GetImageDataArray()[1]+1;
00210   register InputStorageType *p1=src.GetImageDataArray()[0];
00211   register InputStorageType *p2=p1+1, *p3 = p2+1;
00212   register InputStorageType *p4=src.GetImageDataArray()[1];
00213   register InputStorageType *p5 = p4+1, *p6=p5+1;
00214   register InputStorageType *p7 =src.GetImageDataArray()[2];
00215   register InputStorageType *p8 = p7+1, *p9=p8+1;
00216   register InputStorageType *last=&(src.GetImageData()[src.GetPixelCount()-1]);
00217   if (Neighbor4) {
00218     while (p8<last) {
00219       *d = OutputStorageType(255);
00220       if (*p2==0)
00221         if (*p4==0)
00222           if (*p5==0)
00223             if (*p6==0)
00224               if (*p8==0)
00225                 *d = 0;
00226       p2++; p4++; p5++; p6++; p8++; d++;
00227     }
00228   } else {
00229     while (p9<=last) {
00230       *d = OutputStorageType(255);
00231       if (*p1==0)
00232         if (*p2==0)
00233           if (*p3==0)
00234             if (*p4==0)
00235               if (*p5==0)
00236                 if (*p6==0)
00237                   if (*p7==0)
00238                     if (*p8==0)
00239                       if (*p9==0)
00240                         *d=0;
00241       p1++; p2++; p3++; p4++; p5++; p6++; p7++; p8++; p9++; d++;
00242     }
00243   }
00244   //// set border to zero
00245   // top and bottom
00246   register OutputStorageType *o1,*o2,*o9,*olast;
00247   o1 = dest.GetImageDataArray()[0];
00248   o9 = dest.GetImageDataArray()[dest.GetHeight()-1];
00249   olast=&(dest.GetImageData()[dest.GetPixelCount()-1]);
00250   while (o9<=olast) {
00251     *o1=0; *o9=0;
00252     o1++; o9++;
00253   }
00254   //  left and right
00255   register unsigned int offset = dest.GetWidth();
00256   o1 = dest.GetImageData();
00257   o2 = o1+offset-1;
00258   while (o2<=olast) {
00259     *o1 = 0;
00260     *o2 = 0;
00261     o1 += offset;
00262     o2 += offset;
00263   }
00264   return 0;
00265 }
00266
00267 template <class InputStorageType, class OutputStorageType>
00268 int Dilation<InputStorageType, OutputStorageType>::
00269 Filter(const Image<InputStorageType>& src,
00270        Image<OutputStorageType>& dst) {
00271   if (src.GetChannelCount()!=1) {
00272     BIASERR("Erosion only for 1 channel images");
00273     return -1;
00274   }
00275   if (*_FilterBorderHandling==TBH_valid) {
00276     if (*kernelSize_==3) {
00277       Image<InputStorageType> tmp(src);
00278       if ( (dst.IsEmpty()) || (! src.SamePixelAndChannelCount(dst)) )
00279         dst=src;
00280
00281       tmp.FillImageWithConstValue( InputStorageType(255) );
00282
00283       Dilate3Fast(src,tmp,dst,false);
00284       dst.GetROI()->SetCorners(1,1,dst.GetWidth()-2,dst.GetHeight()-2);
00285     } else {
00286       Dilate(src,dst,*kernelSize_);
00287       dst.GetROI()->SetCorners(1,1,dst.GetWidth()-2,dst.GetHeight()-2);
00288     }
00289   } else if  (*_FilterBorderHandling==TBH_same) {
00290     Image<InputStorageType> tmp;
00291     tmp.Init(src.GetWidth() + (*kernelSize_/2)*2,
00292              src.GetHeight()+ (*kernelSize_/2)*2, 1);
00293     tmp.GetROI()->SetCorners(*kernelSize_/2 ,*kernelSize_/2 ,
00294                tmp.GetWidth()-(*kernelSize_/2),
00295                tmp.GetHeight()-(*kernelSize_/2));
00296     tmp.Paste2ROI(src);
00297     Dilate(tmp,dst,*kernelSize_);
00298     dst.GetROI()->SetCorners(*kernelSize_/2 ,*kernelSize_/2 ,
00299                tmp.GetWidth() -(*kernelSize_/2),
00300                tmp.GetHeight()-(*kernelSize_/2));
00301     dst.Cut2ROI();
00302   } else {
00303     BIASERR("Unknown border handling.");
00304     return -1;
00305   }
00306
00307   return 0;
00308 }
00309
00310 template <class InputStorageType, class OutputStorageType>
00311 void Dilation<InputStorageType, OutputStorageType>::
00312 GetBordersValid_(int& border_x, int& border_y) const
00313 {
00314   BIASERR("no parameter support");
00315   BIASABORT;
00316 }
00317
00318 //////////////////////////////////////////////////////////////////////////
00319 //                 instantiation
00320 //////////////////////////////////////////////////////////////////////////
00321 #define FILTER_INSTANTIATION_CLASS Dilation
00322 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Dilation.hh Source File

Filter

Dilation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _BIAS_MOPRH_DILATION_HH_
00025 #define _BIAS_MOPRH_DILATION_HH_
00026 #include "./Morphology.hh"
00027
00028 namespace BIAS {
00029
00030 /** @class Dilation
00031     @ingroup g_filter
00032     @brief Dilation operator for binary images (black and white)
00033
00034     Dilation sets all pixel to 255, which have a neighboring pixel !=0
00035     It is also possible to dilate the image with a real grey-value image with
00036     Dilate3Fast().
00037     Fastest ist TBH_valid and kernelsize=3
00038     or call Dilate3Fast() directly.
00039     @author grest, Oct. 2004
00040  */
00041
00042 template <class InputStorageType, class OutputStorageType>
00043 class BIASFilter_EXPORT Dilation : public Morphology<InputStorageType, OutputStorageType>
00044 {
00045  public:
00046   Dilation() {};
00047   virtual ~Dilation() {};
00048
00049   /** Does the dilation. ROI ignored, but set if TBH_valid
00050    */
00051   virtual int Filter(const Image<InputStorageType>& src,
00052                      Image<OutputStorageType>& dst);
00053
00054    /** dilate with square kernel filled with 255
00055         @author Felix Woelk (22/04/2002)
00056         @status alpha */
00057   int Dilate(const Image<InputStorageType>& Source,
00058              Image<OutputStorageType>& Destination,
00059              int KernelSize = 3);
00060
00061   /** Very fast dilate with 3x3 mask, all values, which are not
00062       not zero, are treated as foreground.
00063       The src img is dilated with pixels from orig.
00064       Therefore src and orig MUST NOT be the same,
00065       set orig to a 255 image if u have no original grey image.
00066       The border of one pixel is always deleted (set to zero).
00067       default is 8-neighborhood.
00068       src and dest must NOT be the same!
00069       @author Daniel Grest, Sept. 2002
00070       @status tested */
00071   int Dilate3Fast(const Image<InputStorageType>& src,
00072                   const Image<InputStorageType>& orig,
00073                   Image<OutputStorageType>& dest,
00074                   bool Neighbor4=false);
00075
00076   /** Very fast dilate with 3x3 mask, all values, which are not
00077       not zero, are treated as foreground.
00078       src and dest must NOT be the same!
00079       @author woelk, grest 04/2006 */
00080   int Dilate3Fast(const Image<InputStorageType>& src,
00081                   Image<OutputStorageType>& dest,
00082                   bool Neighbor4 = false);
00083
00084  protected:
00085   virtual void GetBordersValid_(int& border_x, int& border_y) const;
00086
00087   using Morphology<InputStorageType, OutputStorageType>::_FilterBorderHandling;
00088   using Morphology<InputStorageType, OutputStorageType>::TBH_valid;
00089   using Morphology<InputStorageType, OutputStorageType>::TBH_same;
00090   using Morphology<InputStorageType, OutputStorageType>::TBH_full;
00091   using Morphology<InputStorageType, OutputStorageType>::kernelSize_;
00092
00093 };
00094
00095 } // namespace
00096 #endif
00097
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/ -> Debug Relation

Base » Common

Common → Debug Relation

File in Base » Common | Includes file in Base » Debug
BaseFactory.hh | Debug.hh
BaseFactory.hh | Error.hh
BaseFactory.hh | Exception.hh
Examples / ExampleXMLBase.cpp | Debug.hh
FileHandling.cpp | Error.hh
XMLIO.hh | Debug.hh
XMLIO.hh | Error.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/ -> Math Relation

Base » Common

Common → Math Relation

File in Base » Common | Includes file in Base » Math
XMLIO.hh | Vector.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ -> Debug Relation

Base » Common » Examples

Examples → Debug Relation

File in Base » Common » Examples | Includes file in Base » Debug
ExampleXMLBase.cpp | Debug.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ -> Common Relation

Base » Debug

Debug → Common Relation

File in Base » Debug | Includes file in Base » Common
Debug.hh | BIASpragmaEnd.hh
Debug.hh | BIASpragmaStart.hh
RedirectStreams.hh | BIASpragmaEnd.hh
RedirectStreams.hh | BIASpragmaStart.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/ -> Common Relation

Base » Geometry

Geometry → Common Relation

File in Base » Geometry | Includes file in Base » Common
FMatrixBase.cpp | BIASpragma.hh
HomgPoint2DCov.hh | CompareFloatingPoint.hh
HomgPoint3DCov.hh | CompareFloatingPoint.hh
Normalization.hh | BIASpragmaEnd.hh
Normalization.hh | BIASpragmaStart.hh
PlueckerMatrix.cpp | CompareFloatingPoint.hh
PoseParametrization.cpp | CompareFloatingPoint.hh
PoseParametrizationCovariance.cpp | CompareFloatingPoint.hh
RMatrixBase.cpp | BIASpragma.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/ -> Debug Relation

Base » Geometry

Geometry → Debug Relation

File in Base » Geometry | Includes file in Base » Debug
FMatrixBase.hh | Debug.hh
FMatrixBase.hh | Error.hh
HMatrixBase.hh | Debug.hh
HMatrixBase.hh | Error.hh
HomgLine2D.hh | Debug.hh
HomgLine2D.hh | Error.hh
HomgPlane3D.hh | Debug.hh
HomgPlane3D.hh | Error.hh
HomgPoint1D.hh | Error.hh
HomgPoint2D.hh | Error.hh
HomgPoint2DCov.cpp | Exception.hh
HomgPoint3D.hh | Error.hh
HomgPoint3DCov.cpp | Exception.hh
PlueckerMatrix.cpp | Exception.hh
PMatrixBase.cpp | Exception.hh
PMatrixBase.hh | Debug.hh
PoseParametrization.cpp | Exception.hh
PoseParametrizationCovariance.cpp | Exception.hh
RMatrixBase.hh | Debug.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/ -> Math Relation

Base » Geometry

Geometry → Math Relation

File in Base » Geometry | Includes file in Base » Math
AffineTransf.hh | Matrix3x3.hh
AffineTransf.hh | Matrix3x4.hh
EMatrixBase.hh | Matrix3x3.hh
EuclideanTransf3D.hh | Matrix4x4.hh
EuclideanTransf3D.hh | Vector3.hh
FMatrixBase.hh | Matrix3x3.hh
FMatrixBase.hh | Vector3.hh
HMatrixBase.hh | Matrix3x3.hh
HomgLine2D.hh | Vector3.hh
HomgPlane3D.hh | Matrix3x3.hh
HomgPlane3D.hh | Vector4.hh
HomgPoint1D.hh | Vector2.hh
HomgPoint2D.cpp | Matrix3x3.hh
HomgPoint2D.hh | Matrix3x3.hh
HomgPoint2D.hh | Vector.hh
HomgPoint2D.hh | Vector2.hh
HomgPoint2D.hh | Vector3.hh
HomgPoint2DCov.cpp | Matrix2x2.hh
HomgPoint2DCov.hh | Matrix3x3.hh
HomgPoint3D.hh | Vector3.hh
HomgPoint3D.hh | Vector4.hh
HomgPoint3DCov.cpp | Matrix3x3.hh
HomgPoint3DCov.hh | Matrix4x4.hh
HomgPoint3DCov.hh | Vector4.hh
KMatrix.hh | Matrix3x3.hh
Normalization.hh | Matrix3x3.hh
PlueckerMatrix.hh | Matrix.hh
PlueckerMatrix.hh | Matrix4x4.hh
PlueckerMatrix.hh | Vector.hh
PlueckerMatrix.hh | Vector2.hh
PlueckerMatrix.hh | Vector3.hh
PMatrixBase.hh | Matrix3x3.hh
PMatrixBase.hh | Matrix3x4.hh
PMatrixBase.hh | Matrix4x4.hh
PMatrixBase.hh | Vector.hh
PMatrixBase.hh | Vector3.hh
PMatrixBase.hh | Vector4.hh
PoseParametrization.cpp | Matrix4x4.hh
PoseParametrization.hh | Matrix.hh
PoseParametrization.hh | Matrix4x4.hh
PoseParametrization.hh | Vector.hh
PoseParametrization.hh | Vector3.hh
PoseParametrizationCovariance.cpp | Matrix4x4.hh
PoseParametrizationCovariance.hh | Matrix.hh
PoseParametrizationCovariance.hh | Matrix3x3.hh
PoseParametrizationCovariance.hh | Matrix4x4.hh
Quaternion.hh | Vector3.hh
Quaternion.hh | Vector4.hh
RMatrixBase.hh | Matrix3x3.hh
RMatrixBase.hh | Vector3.hh
TrifocalTensorBase.hh | Matrix3x3.hh
TrifocalTensorBase.hh | Tensor3D3x3x3.hh
TrifocalTensorBase.hh | Vector3.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ -> Common Relation

Base » Image

Image → Common Relation

File in Base » Image | Includes file in Base » Common
Bresenham.hh | W32Compat.hh
EightWaySymmetry.hh | W32Compat.hh
Examples / ExampleBresenham.cpp | LeakChecking.h
Examples / ExampleChessboard.cpp | LeakChecking.h
Examples / ExampleEmpty.cpp | LeakChecking.h
Examples / ExampleForeignData.cpp | LeakChecking.h
Examples / ExampleHSVConversion.cpp | LeakChecking.h
Examples / ExampleIplWrapOpenCV.cpp | LeakChecking.h
Examples / ExampleMetaData.cpp | LeakChecking.h
Examples / ExampleMinMax.cpp | BIASpragma.hh
Examples / ExampleMinMax.cpp | LeakChecking.h
Image.hh | W32Compat.hh
ImageAttributes.cpp | W32Compat.hh
ImageAttributes.hh | BIASpragmaEnd.hh
ImageAttributes.hh | BIASpragmaStart.hh
ImageBase.hh | W32Compat.hh
ImageDraw.cpp | W32Compat.hh
ImageInline.hh | BIASpragmaEnd.hh
ImageInline.hh | BIASpragmaStart.hh
ImageIO.cpp | BIASpragmaEnd.hh
ImageIO.cpp | BIASpragmaStart.hh
ImageIO.cpp | FileHandling.hh
ImageIO.hh | W32Compat.hh
MetaData.hh | BIASpragmaEnd.hh
MetaData.hh | BIASpragmaStart.hh
Operators.cpp | BIASpragma.hh
ROI.hh | BIASpragmaEnd.hh
ROI.hh | BIASpragmaStart.hh
UUID.hh | BIASpragmaEnd.hh
UUID.hh | BIASpragmaStart.hh
WrapBias2Ipl.cpp | W32Compat.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ -> Debug Relation

Base » Image

Image → Debug Relation

File in Base » Image | Includes file in Base » Debug
Examples / convertRAW.cpp | DebugSimple.hh
Examples / convertRAW.cpp | Error.hh
EightWaySymmetry.hh | Error.hh
ExifTag.hh | DebugSimple.hh
ExifTag.hh | Error.hh
ImageAttributes.cpp | DebugSimple.hh
ImageAttributes.cpp | Error.hh
ImageAttributes.hh | Debug.hh
ImageBase.hh | Debug.hh
ImageBase.hh | Error.hh
ImageConvertThreaded.cpp | Exception.hh
ImageIO.cpp | DebugSimple.hh
ImageIO.cpp | TimeMeasurement.hh
MetaData.cpp | Error.hh
Examples / mip2viff.cpp | Error.hh
ROI.cpp | Error.hh
ROI.hh | Debug.hh
ROI.hh | Error.hh
UUID.hh | Debug.hh
UUID.hh | Error.hh
WrapBias2Ipl.cpp | DebugSimple.hh
WrapBias2Ipl.cpp | Error.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ -> Math Relation

Base » Image

Image → Math Relation

File in Base » Image | Includes file in Base » Math
ImageDraw.cpp | Vector2.hh
ImageDraw.hh | Vector2.hh
ImageDraw.hh | Vector3.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ -> Common Relation

Base » Image » Examples

Examples → Common Relation

File in Base » Image » Examples | Includes file in Base » Common
ExampleBresenham.cpp | LeakChecking.h
ExampleChessboard.cpp | LeakChecking.h
ExampleEmpty.cpp | LeakChecking.h
ExampleForeignData.cpp | LeakChecking.h
ExampleHSVConversion.cpp | LeakChecking.h
ExampleIplWrapOpenCV.cpp | LeakChecking.h
ExampleMetaData.cpp | LeakChecking.h
ExampleMinMax.cpp | BIASpragma.hh
ExampleMinMax.cpp | LeakChecking.h
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ -> Debug Relation

Base » Image » Examples

Examples → Debug Relation

File in Base » Image » Examples | Includes file in Base » Debug
convertRAW.cpp | DebugSimple.hh
convertRAW.cpp | Error.hh
mip2viff.cpp | Error.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/ -> Common Relation

Base » Math

Math → Common Relation

File in Base » Math | Includes file in Base » Common
Distribution.hh | BIASpragmaEnd.hh
Distribution.hh | BIASpragmaStart.hh
Examples / ExampleLoadBan.cpp | BIASpragma.hh
Examples / ExampleLoadBan.cpp | LeakChecking.h
Examples / ExampleLoadBOG.cpp | BIASpragma.hh
Examples / ExampleRandom.cpp | LeakChecking.h
Matrix2x2.cpp | BIASpragma.hh
Matrix3x3.cpp | BIASpragma.hh
Polynom.hh | BIASpragmaEnd.hh
Polynom.hh | BIASpragmaStart.hh
Random.hh | BIASpragmaEnd.hh
Random.hh | BIASpragmaStart.hh
Tensor3D3x3x3.cpp | BIASpragma.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/ -> Debug Relation

Base » Math

Math → Debug Relation

File in Base » Math | Includes file in Base » Debug
Cholesky.hh | Error.hh
Distribution.hh | Error.hh
Examples / ExampleRandom.cpp | TimeMeasure.hh
Matrix.hh | Error.hh
Matrix2x2.hh | Error.hh
Matrix3x3.hh | Error.hh
Matrix3x4.hh | Error.hh
Matrix4x4.hh | Error.hh
Operators.hh | Error.hh
Polynom.hh | Debug.hh
Polynom.hh | Error.hh
Random.hh | Debug.hh
Random.hh | Error.hh
Tensor3D.hh | Error.hh
Vector2.hh | Error.hh
Vector3.hh | Error.hh
Vector4.hh | Error.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/ -> tnt Relation

Base » Math

Math → tnt Relation

File in Base » Math | Includes file in Base » Math » tnt
Cholesky.hh | cholesky.h
Matrix.hh | cmat.h
Matrix.hh | fmat.h
Matrix.hh | tnt.h
Operators.hh | cmat.h
Vector.hh | tnt.h
Vector.hh | vec.h
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ -> Common Relation

Base » Math » Examples

Examples → Common Relation

File in Base » Math » Examples | Includes file in Base » Common
ExampleLoadBan.cpp | BIASpragma.hh
ExampleLoadBan.cpp | LeakChecking.h
ExampleLoadBOG.cpp | BIASpragma.hh
ExampleRandom.cpp | LeakChecking.h
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ -> Debug Relation

Base » Math » Examples

Examples → Debug Relation

File in Base » Math » Examples | Includes file in Base » Debug
ExampleRandom.cpp | TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ -> Base Relation

FeatureDetector

FeatureDetector → Base Relation

File in FeatureDetector | Includes file in Base
ColorHarris.cpp | Image / ImageConvert.hh
ColorHarris.cpp | Image / ImageIO.hh
ColorHarris.hh | Debug / Debug.hh
ColorHarris.hh | Image / Image.hh
ColorHarris.hh | Debug / TimeMeasure.hh
CornerDetectorBase.cpp | Common / BIASpragma.hh
CornerDetectorBase.hh | Geometry / HomgPoint2D.hh
CornerDetectorBase.hh | Image / Image.hh
CornerDetectorGradient.cpp | Common / BIASpragma.hh
CornerDetectorGradient.cpp | Image / ImageConvert.hh
CornerDetectorGradient.cpp | Image / ImageIO.hh
CornerDetectorGradient.hh | Math / Matrix2x2.hh
CornerDetectorKLT.cpp | Image / ImageConvert.hh
CornerDetectorKLT.cpp | Image / ImageIO.hh
CornerDetectorKLT.cpp | Debug / TimeMeasure.hh
Examples / ExampleCornerDetector.cpp | Image / ImageConvert.hh
Examples / ExampleCornerDetector.cpp | Image / ImageDraw.hh
Examples / ExampleCornerDetector.cpp | Image / ImageIO.hh
LinearRegionDetector.cpp | Image / ImageConvert.hh
LinearRegionDetector.cpp | Image / ImageIO.hh
LinearRegionDetector.cpp | Debug / TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ -> Filter Relation

FeatureDetector

FeatureDetector → Filter Relation

File in FeatureDetector | Includes file in Filter
ColorHarris.cpp | Gauss.hh
ColorHarris.hh | GradientSobel3x3.hh
CornerDetectorGradient.hh | Gauss.hh
CornerDetectorGradient.hh | StructureTensor.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/ -> Utils Relation

FeatureDetector

FeatureDetector → Utils Relation

File in FeatureDetector | Includes file in Utils
CornerDetectorBase.hh | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/Examples/ -> Base Relation

FeatureDetector » Examples

Examples → Base Relation

File in FeatureDetector » Examples | Includes file in Base
ExampleCornerDetector.cpp | Image / ImageConvert.hh
ExampleCornerDetector.cpp | Image / ImageDraw.hh
ExampleCornerDetector.cpp | Image / ImageIO.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/ -> Base Relation

Filter

Filter → Base Relation

File in Filter | Includes file in Base
Binomial.cpp | Common / BIASpragma.hh
Binomial.cpp | Image / ImageIO.hh
Convolution.cpp | Common / BIASpragma.hh
Convolution.cpp | Image / ImageIO.hh
DeInterlace.cpp | Common / BIASpragma.hh
DeInterlace.hh | Common / BIASpragmaEnd.hh
DeInterlace.hh | Common / BIASpragmaStart.hh
Dilation.cpp | Common / BIASpragma.hh
Dilation.cpp | Image / ImageConvert.hh
DistTransform.cpp | Image / ImageConvert.hh
DistTransform.hh | Common / BIASpragmaEnd.hh
DistTransform.hh | Common / BIASpragmaStart.hh
DistTransform.hh | Image / Image.hh
DistTransform.hh | Math / Vector2.hh
Examples / ExampleBinomial.cpp | Image / ImageIO.hh
Examples / ExampleBinomial.cpp | Debug / TimeMeasure.hh
Examples / ExampleConvolution.cpp | Common / BIASpragma.hh
Examples / ExampleConvolution.cpp | Common / LeakChecking.h
Examples / ExampleDeInterlace.cpp | Image / ImageConvert.hh
Examples / ExampleDeInterlace.cpp | Image / ImageIO.hh
Examples / ExampleDeInterlace.cpp | Debug / TimeMeasure.hh
Examples / ExampleDilation.cpp | Image / Image.hh
Examples / ExampleDilation.cpp | Image / ImageDraw.hh
Examples / ExampleDilation.cpp | Image / ImageIO.hh
Examples / ExampleDistTransform.cpp | Image / Image.hh
Examples / ExampleDistTransform.cpp | Image / ImageDraw.hh
Examples / ExampleDistTransform.cpp | Image / ImageIO.hh
Examples / ExampleErosion.cpp | Image / Image.hh
Examples / ExampleErosion.cpp | Image / ImageDraw.hh
Examples / ExampleErosion.cpp | Image / ImageIO.hh
Examples / ExampleGauss.cpp | Common / BIASpragma.hh
Examples / ExampleGauss.cpp | Image / ImageIO.hh
Examples / ExampleGauss.cpp | Debug / TimeMeasure.hh
Examples / ExampleGradient.cpp | Common / BIASpragma.hh
Examples / ExampleGradient.cpp | Image / ImageConvert.hh
Examples / ExampleGradient.cpp | Image / ImageIO.hh
Examples / ExampleGradient.cpp | Debug / TimeMeasure.hh
Examples / ExampleHarrisColor.cpp | Image / Image.hh
Examples / ExampleHarrisColor.cpp | Image / ImageConvert.hh
Examples / ExampleHarrisColor.cpp | Image / ImageDraw.hh
Examples / ExampleHarrisColor.cpp | Image / ImageIO.hh
Examples / ExampleHarrisColor.cpp | Debug / TimeMeasure.hh
Examples / ExampleMedian.cpp | Image / ImageIO.hh
Examples / ExampleMedian.cpp | Debug / TimeMeasure.hh
Examples / ExampleRescale.cpp | Image / ImageConvert.hh
Examples / ExampleRescale.cpp | Image / ImageIO.hh
Examples / ExampleRescale.cpp | Debug / TimeMeasure.hh
Examples / ExampleStructureTensor.cpp | Image / ImageConvert.hh
Examples / ExampleStructureTensor.cpp | Image / ImageIO.hh
Examples / ExampleUpsampleBy2Grey.cpp | Common / BIASpragma.hh
Examples / ExampleUpsampleBy2Grey.cpp | Image / Image.hh
Examples / ExampleUpsampleBy2Grey.cpp | Image / ImageConvert.hh
Examples / ExampleUpsampleBy2Grey.cpp | Image / ImageIO.hh
Examples / ExampleUpsampleBy2Grey.cpp | Debug / TimeMeasure.hh
FilterBase.cpp | Common / BIASpragma.hh
FilterBase.hh | Image / Image.hh
FilterMask.cpp | Common / W32Compat.hh
FilterMask.hh | Image / Image.hh
FilterMask.hh | Math / Matrix.hh
FilterMask.hh | Math / Vector.hh
FilterNTo2N.cpp | Common / BIASpragma.hh
FilterNTo3N.cpp | Common / BIASpragma.hh
Gauss.cpp | Image / ImageConvert.hh
GradientGauss.hh | Math / Vector3.hh
GradientGaussAsymmetric.hh | Math / Vector3.hh
GradientSimple.hh | Math / Vector3.hh
GradientSobel3x3.hh | Math / Vector3.hh
Label.cpp | Common / BIASpragma.hh
Label.cpp | Image / ImageConvert.hh
Label.cpp | Image / ImageIO.hh
Label.hh | Debug / Debug.hh
Label.hh | Image / Image.hh
Label.hh | Math / Vector2.hh
Mean.cpp | Common / BIASpragma.hh
Mean.hh | Common / BIASpragmaEnd.hh
Mean.hh | Common / BIASpragmaStart.hh
Median.hh | Image / Image.hh
Morphology.cpp | Common / BIASpragma.hh
Morphology.hh | Image / Image.hh
Rescale.cpp | Common / BIASpragma.hh
Rescale.cpp | Image / ImageIO.hh
StructureTensor.cpp | Common / BIASpragma.hh
StructureTensor.cpp | Image / ImageIO.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/ -> Image Relation

Filter

Filter → Image Relation

File in Filter | Includes file in Image
Examples / ExampleDistTransform.cpp | Contour.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/ -> MathAlgo Relation

Filter

Filter → MathAlgo Relation

File in Filter | Includes file in MathAlgo
Label.cpp | Median1D.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/ -> Utils Relation

Filter

Filter → Utils Relation

File in Filter | Includes file in Utils
Convolution.hh | Param.hh
FilterBase.hh | Param.hh
Gauss.hh | Param.hh
StructureTensor.hh | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ -> Base Relation

Filter » Examples

Examples → Base Relation

File in Filter » Examples | Includes file in Base
ExampleBinomial.cpp | Image / ImageIO.hh
ExampleBinomial.cpp | Debug / TimeMeasure.hh
ExampleConvolution.cpp | Common / BIASpragma.hh
ExampleConvolution.cpp | Common / LeakChecking.h
ExampleDeInterlace.cpp | Image / ImageConvert.hh
ExampleDeInterlace.cpp | Image / ImageIO.hh
ExampleDeInterlace.cpp | Debug / TimeMeasure.hh
ExampleDilation.cpp | Image / Image.hh
ExampleDilation.cpp | Image / ImageDraw.hh
ExampleDilation.cpp | Image / ImageIO.hh
ExampleDistTransform.cpp | Image / Image.hh
ExampleDistTransform.cpp | Image / ImageDraw.hh
ExampleDistTransform.cpp | Image / ImageIO.hh
ExampleErosion.cpp | Image / Image.hh
ExampleErosion.cpp | Image / ImageDraw.hh
ExampleErosion.cpp | Image / ImageIO.hh
ExampleGauss.cpp | Common / BIASpragma.hh
ExampleGauss.cpp | Image / ImageIO.hh
ExampleGauss.cpp | Debug / TimeMeasure.hh
ExampleGradient.cpp | Common / BIASpragma.hh
ExampleGradient.cpp | Image / ImageConvert.hh
ExampleGradient.cpp | Image / ImageIO.hh
ExampleGradient.cpp | Debug / TimeMeasure.hh
ExampleHarrisColor.cpp | Image / Image.hh
ExampleHarrisColor.cpp | Image / ImageConvert.hh
ExampleHarrisColor.cpp | Image / ImageDraw.hh
ExampleHarrisColor.cpp | Image / ImageIO.hh
ExampleHarrisColor.cpp | Debug / TimeMeasure.hh
ExampleMedian.cpp | Image / ImageIO.hh
ExampleMedian.cpp | Debug / TimeMeasure.hh
ExampleRescale.cpp | Image / ImageConvert.hh
ExampleRescale.cpp | Image / ImageIO.hh
ExampleRescale.cpp | Debug / TimeMeasure.hh
ExampleStructureTensor.cpp | Image / ImageConvert.hh
ExampleStructureTensor.cpp | Image / ImageIO.hh
ExampleUpsampleBy2Grey.cpp | Common / BIASpragma.hh
ExampleUpsampleBy2Grey.cpp | Image / Image.hh
ExampleUpsampleBy2Grey.cpp | Image / ImageConvert.hh
ExampleUpsampleBy2Grey.cpp | Image / ImageIO.hh
ExampleUpsampleBy2Grey.cpp | Debug / TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ -> Image Relation

Filter » Examples

Examples → Image Relation

File in Filter » Examples | Includes file in Image
ExampleDistTransform.cpp | Contour.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ -> Base Relation

Geometry

Geometry → Base Relation

File in Geometry | Includes file in Base
Conic2D.cpp | Geometry / HomgLine2D.hh
Conic2D.cpp | Geometry / HomgPoint2D.hh
Conic2D.cpp | Image / Image.hh
Conic2D.cpp | Math / Matrix2x2.hh
Conic2D.hh | Debug / Debug.hh
Conic2D.hh | Debug / Error.hh
Conic2D.hh | Geometry / HomgPoint2D.hh
Conic2D.hh | Math / Matrix3x3.hh
CoordinateTransform3D.cpp | Math / Matrix3x4.hh
CoordinateTransform3D.cpp | Geometry / RMatrixBase.hh
CoordinateTransform3D.hh | Common / BIASpragmaEnd.hh
CoordinateTransform3D.hh | Common / BIASpragmaStart.hh
CoordinateTransform3D.hh | Debug / Debug.hh
CoordinateTransform3D.hh | Geometry / HomgPoint3D.hh
CoordinateTransform3D.hh | Geometry / HomgPoint3DCov.hh
CoordinateTransform3D.hh | Math / Matrix4x4.hh
CoordinateTransform3D.hh | Geometry / Quaternion.hh
CoordinateTransform3D.hh | Math / Vector3.hh
CovMatrix3x3.hh | Geometry / HomgPoint3DCov.hh
CovMatrix3x3.hh | Math / Matrix3x3.hh
CovMatrix3x3.hh | Geometry / PMatrixBase.hh
EightWaySymmetryHomg.hh | Image / EightWaySymmetry.hh
EightWaySymmetryHomg.hh | Geometry / HomgPoint2D.hh
EMatrix.hh | Debug / Debug.hh
EMatrix.hh | Debug / Error.hh
EpipolarLine.cpp | Common / BIASpragma.hh
EpipolarLine.cpp | Debug / Debug.hh
EpipolarLine.cpp | Image / ImageDraw.hh
EpipolarLine.hh | Debug / Debug.hh
EpipolarLine.hh | Image / EightWaySymmetry.hh
EpipolarLine.hh | Geometry / HomgLine2D.hh
EpipolarLine.hh | Geometry / HomgPoint2D.hh
EpipolarLine.hh | Image / Image.hh
Examples / ExampleConic.cpp | Geometry / HomgPoint2D.hh
Examples / ExampleConic.cpp | Image / Image.hh
Examples / ExampleConic.cpp | Image / ImageIO.hh
Examples / ExampleLoadBBC.cpp | Geometry / KMatrix.hh
Examples / ExampleLoadBOG_P.cpp | Common / BIASpragma.hh
Examples / ExampleLoadBOG_P.cpp | Geometry / KMatrix.hh
Examples / ExampleLoadBOG_P.cpp | Math / Vector3.hh
Examples / ExamplePMatrix.cpp | Common / BIASpragma.hh
Examples / ExamplePMatrix.cpp | Geometry / HomgPoint2D.hh
Examples / ExamplePMatrix.cpp | Geometry / KMatrix.hh
Examples / ExamplePMatrix.cpp | Math / Random.hh
Examples / ExampleTriangulate.cpp | Geometry / KMatrix.hh
Examples / ExampleTriangulate2.cpp | Geometry / KMatrix.hh
Examples / ExampleTriangulateOptimal.cpp | Math / Random.hh
Examples / ExampleTriangulateOptimal.cpp | Geometry / RMatrixBase.hh
Examples / ExampleTriangulateOptimal.cpp | Debug / TimeMeasure.hh
FMatrix.cpp | Geometry / KMatrix.hh
FMatrix.cpp | Math / Vector3.hh
FMatrix.hh | Debug / Debug.hh
FMatrix.hh | Debug / Error.hh
FMatrix.hh | Geometry / FMatrixBase.hh
FMatrixEstimation.cpp | Common / BIASpragma.hh
FMatrixEstimation.cpp | Geometry / KMatrix.hh
FMatrixEstimation.hh | Common / BIASpragmaEnd.hh
FMatrixEstimation.hh | Common / BIASpragmaStart.hh
FMatrixEstimation.hh | Geometry / HomgPoint2D.hh
FMatrixEstimation.hh | Geometry / Normalization.hh
FMatrixEstimation.hh | Math / Vector.hh
Examples / FMatrixTest.cpp | Math / Random.hh
HMatrix.hh | Geometry / HMatrixBase.hh
HMatrix.hh | Image / Image.hh
HMatrixEstimation.cpp | Geometry / KMatrix.hh
HMatrixEstimation.hh | Geometry / Normalization.hh
Examples / HMatrixTest.cpp | Math / Random.hh
Examples / InvestigateEpipoleEstimation.cpp | Geometry / KMatrix.hh
Examples / InvestigateEpipoleEstimation.cpp | Math / Random.hh
Examples / InvestigateEpipoleEstimation.cpp | Geometry / RMatrixBase.hh
Examples / InvestigateEpipoleEstimation.cpp | Debug / TimeMeasure.hh
Parametrization.cpp | Common / BIASpragma.hh
Parametrization.hh | Common / BIASpragmaEnd.hh
Parametrization.hh | Common / BIASpragmaStart.hh
PMatrix.cpp | Geometry / AffineTransf.hh
PMatrix.cpp | Common / BIASpragma.hh
PMatrix.hh | Common / BIASpragmaEnd.hh
PMatrix.hh | Common / BIASpragmaStart.hh
PMatrix.hh | Debug / Debug.hh
PMatrix.hh | Geometry / HomgLine2D.hh
PMatrix.hh | Geometry / HomgPlane3D.hh
PMatrix.hh | Geometry / HomgPoint3D.hh
PMatrix.hh | Geometry / KMatrix.hh
PMatrix.hh | Geometry / PMatrixBase.hh
PMatrix.hh | Common / XMLBase.hh
PMatrixEstimation.cpp | Common / BIASpragma.hh
PMatrixEstimation.hh | Math / Matrix.hh
PMatrixLinear.hh | Common / BIASpragmaEnd.hh
PMatrixLinear.hh | Common / BIASpragmaStart.hh
PMatrixLinear.hh | Debug / Debug.hh
PMatrixLinear.hh | Geometry / HomgPoint2D.hh
PMatrixLinear.hh | Geometry / HomgPoint3D.hh
Examples / PMatrixTest.cpp | Math / Random.hh
Pose.cpp | Common / CompareFloatingPoint.hh
Pose.hh | Geometry / HomgPoint3D.hh
Pose.hh | Geometry / HomgPoint3DCov.hh
Pose.hh | Math / Matrix3x4.hh
Pose.hh | Math / Matrix4x4.hh
Pose.hh | Geometry / PoseParametrization.hh
Pose.hh | Geometry / Quaternion.hh
Pose.hh | Geometry / RMatrixBase.hh
Projection.hh | Debug / Debug.hh
Projection.hh | Geometry / HomgPoint3D.hh
Projection.hh | Math / Matrix4x4.hh
Projection.hh | Geometry / Quaternion.hh
Projection.hh | Math / Vector4.hh
Projection.hh | Common / XMLBase.hh
ProjectionParametersBase.hh | Common / BIASpragmaEnd.hh
ProjectionParametersBase.hh | Common / BIASpragmaStart.hh
ProjectionParametersBase.hh | Common / CompareFloatingPoint.hh
ProjectionParametersBase.hh | Debug / Debug.hh
ProjectionParametersBase.hh | Geometry / HomgPoint2D.hh
ProjectionParametersBase.hh | Math / Matrix3x4.hh
ProjectionParametersBase.hh | Math / Matrix4x4.hh
ProjectionParametersBase.hh | Geometry / Quaternion.hh
ProjectionParametersBase.hh | Math / Vector3.hh
ProjectionParametersBase.hh | Common / XMLBase.hh
ProjectionParametersIO.cpp | Image / ImageAttributes.hh
ProjectionParametersIO.hh | Common / BIASpragmaEnd.hh
ProjectionParametersIO.hh | Common / BIASpragmaStart.hh
ProjectionParametersIO.hh | Debug / Debug.hh
ProjectionParametersIO.hh | Geometry / HomgPoint2D.hh
ProjectionParametersIO.hh | Geometry / KMatrix.hh
ProjectionParametersIO.hh | Math / Vector3.hh
ProjectionParametersIO.hh | Common / XMLBase.hh
ProjectionParametersPerspective.hh | Common / BIASpragmaEnd.hh
ProjectionParametersPerspective.hh | Common / BIASpragmaStart.hh
ProjectionParametersPerspective.hh | Geometry / KMatrix.hh
ProjectionParametersProjective.hh | Common / BIASpragmaEnd.hh
ProjectionParametersProjective.hh | Common / BIASpragmaStart.hh
ProjectionParametersSpherical.hh | Common / BIASpragmaEnd.hh
ProjectionParametersSpherical.hh | Common / BIASpragmaStart.hh
ProjectionParametersZoom.hh | Common / BIASpragmaEnd.hh
ProjectionParametersZoom.hh | Common / BIASpragmaStart.hh
ProjectionParametersZoom.hh | Geometry / KMatrix.hh
Quadric3D.hh | Debug / Debug.hh
Quadric3D.hh | Debug / Error.hh
Quadric3D.hh | Geometry / HomgPoint3D.hh
Quadric3D.hh | Math / Matrix4x4.hh
RMatrix.hh | Debug / Debug.hh
RMatrix.hh | Math / Matrix3x3.hh
RMatrix.hh | Geometry / RMatrixBase.hh
RMatrix.hh | Math / Vector3.hh
RMatrix.hh | Math / Vector4.hh
SimilarityTransform.cpp | Math / Matrix3x4.hh
SimilarityTransform.cpp | Geometry / RMatrixBase.hh
SimilarityTransform.hh | Common / BIASpragmaEnd.hh
SimilarityTransform.hh | Common / BIASpragmaStart.hh
SimilarityTransform.hh | Debug / Debug.hh
SimilarityTransform.hh | Geometry / HomgPoint3D.hh
SimilarityTransform.hh | Math / Matrix4x4.hh
SimilarityTransform.hh | Geometry / Quaternion.hh
SimilarityTransform.hh | Math / Vector3.hh
TFTensorEstimation.cpp | Geometry / HomgPoint2D.hh
TFTensorEstimation.cpp | Math / Matrix.hh
TFTensorEstimation.hh | Common / BIASpragmaEnd.hh
TFTensorEstimation.hh | Common / BIASpragmaStart.hh
TFTensorEstimation.hh | Geometry / HomgPoint2D.hh
TFTensorEstimation.hh | Geometry / Normalization.hh
Triangulation.cpp | Math / Random.hh
Triangulation.cpp | Geometry / RMatrixBase.hh
Triangulation.hh | Common / BIASpragmaEnd.hh
Triangulation.hh | Common / BIASpragmaStart.hh
Triangulation.hh | Debug / Debug.hh
Triangulation.hh | Geometry / HomgPoint2D.hh
Triangulation.hh | Geometry / HomgPoint3D.hh
Triangulation.hh | Math / Matrix3x3.hh
Triangulation.hh | Math / Matrix4x4.hh
TrifocalTensor.cpp | Debug / DebugSimple.hh
TrifocalTensor.hh | Geometry / HomgPoint2D.hh
TrifocalTensor.hh | Math / Matrix4x4.hh
TrifocalTensor.hh | Geometry / TrifocalTensorBase.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ -> Gui Relation

Geometry

Geometry → Gui Relation

File in Geometry | Includes file in Gui
Examples / InvestigateEpipoleEstimation.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ -> MathAlgo Relation

Geometry

Geometry → MathAlgo Relation

File in Geometry | Includes file in MathAlgo
Conic2D.cpp | PolynomialSolve.hh
Conic2D.cpp | SVD.hh
CoordinateTransform3D.cpp | SVD.hh
CovMatrix3x3.hh | SVD.hh
Examples / Example7Point.cpp | SVD.hh
FMatrix.cpp | SVD.hh
FMatrixEstimation.cpp | Minpack.hh
FMatrixEstimation.cpp | SVD.hh
FMatrixEstimation.hh | PolynomialSolve.hh
HMatrix.cpp | Lapack.hh
HMatrix.cpp | SVD.hh
HMatrixEstimation.cpp | Lapack.hh
HMatrixEstimation.cpp | Minpack.hh
HMatrixEstimation.cpp | SVD.hh
PMatrix.cpp | Lapack.hh
PMatrix.cpp | SVD.hh
PMatrix.hh | SVD.hh
PMatrixEstimation.cpp | Minpack.hh
PMatrixEstimation.hh | Lapack.hh
PMatrixLinear.hh | SVD.hh
ProjectionParametersBase.hh | UnscentedTransform.hh
ProjectionParametersSpherical.hh | Interpolator.hh
RMatrix.cpp | Minpack.hh
RMatrix.cpp | SVD.hh
SimilarityTransform.cpp | SVD.hh
TFTensorEstimation.cpp | SVD.hh
Triangulation.cpp | PolynomialSolve.hh
TrifocalTensor.cpp | SVD.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ -> Base Relation

Geometry » Examples

Examples → Base Relation

File in Geometry » Examples | Includes file in Base
ExampleConic.cpp | Geometry / HomgPoint2D.hh
ExampleConic.cpp | Image / Image.hh
ExampleConic.cpp | Image / ImageIO.hh
ExampleLoadBBC.cpp | Geometry / KMatrix.hh
ExampleLoadBOG_P.cpp | Common / BIASpragma.hh
ExampleLoadBOG_P.cpp | Geometry / KMatrix.hh
ExampleLoadBOG_P.cpp | Math / Vector3.hh
ExamplePMatrix.cpp | Common / BIASpragma.hh
ExamplePMatrix.cpp | Geometry / HomgPoint2D.hh
ExamplePMatrix.cpp | Geometry / KMatrix.hh
ExamplePMatrix.cpp | Math / Random.hh
ExampleTriangulate.cpp | Geometry / KMatrix.hh
ExampleTriangulate2.cpp | Geometry / KMatrix.hh
ExampleTriangulateOptimal.cpp | Math / Random.hh
ExampleTriangulateOptimal.cpp | Geometry / RMatrixBase.hh
ExampleTriangulateOptimal.cpp | Debug / TimeMeasure.hh
FMatrixTest.cpp | Math / Random.hh
HMatrixTest.cpp | Math / Random.hh
InvestigateEpipoleEstimation.cpp | Geometry / KMatrix.hh
InvestigateEpipoleEstimation.cpp | Math / Random.hh
InvestigateEpipoleEstimation.cpp | Geometry / RMatrixBase.hh
InvestigateEpipoleEstimation.cpp | Debug / TimeMeasure.hh
PMatrixTest.cpp | Math / Random.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ -> Gui Relation

Geometry » Examples

Examples → Gui Relation

File in Geometry » Examples | Includes file in Gui
InvestigateEpipoleEstimation.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ -> MathAlgo Relation

Geometry » Examples

Examples → MathAlgo Relation

File in Geometry » Examples | Includes file in MathAlgo
Example7Point.cpp | SVD.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ -> Base Relation

Gui

Gui → Base Relation

File in Gui | Includes file in Base
CameraViewController.hh | Debug / DebugSimple.hh
CameraViewController.hh | Debug / Error.hh
CameraViewController.hh | Math / Vector2.hh
CameraViewController.hh | Math / Vector3.hh
CameraViewExternals.cpp | Debug / DebugSimple.hh
CameraViewExternals.cpp | Debug / Error.hh
CameraViewExternals.hh | Math / Vector3.hh
CameraViewFrustum.cpp | Debug / Error.hh
CameraViewFrustum.cpp | Common / W32Compat.hh
CameraViewInternals.cpp | Debug / DebugSimple.hh
CameraViewInternals.cpp | Debug / Error.hh
CameraViewport.cpp | Debug / Error.hh
CameraViewport.cpp | Common / W32Compat.hh
dndFileTarget.cpp | Debug / Error.hh
DrawTextGL.cpp | Common / BIASpragmaEnd.hh
DrawTextGL.cpp | Common / BIASpragmaStart.hh
DrawTextGL.cpp | Debug / DebugSimple.hh
DrawTextGL.cpp | Debug / Error.hh
DrawTextGL.hh | Common / W32Compat.hh
Examples / ExampleGLShared.cpp | Common / LeakChecking.h
Examples / ExampleImageCanvas.cpp | Image / ImageIO.hh
Examples / ExampleImageCanvasEnhanced.cpp | Image / ImageIO.hh
Examples / ExampleImageCanvasFloat.cpp | Image / ImageIO.hh
Examples / ExampleImageCanvasGLBase.cpp | Image / Image.hh
Examples / ExampleImageCanvasGLBase.cpp | Image / ImageIO.hh
Examples / ExampleImageCanvasGLBase.cpp | Common / LeakChecking.h
Examples / ExampleMultipleGui.cpp | Common / BIASpragma.hh
Examples / ExampleMultipleGui.cpp | Image / Image.hh
Examples / ExampleMultipleGui.cpp | Image / ImageIO.hh
Examples / ExampleOpenGLCanvas.cpp | Common / LeakChecking.h
Examples / ExampleOpenGLCanvasBase.cpp | Common / LeakChecking.h
GeometryGL.cpp | Debug / DebugSimple.hh
GeometryGL.cpp | Image / ImageBase.hh
GeometryGL.cpp | Math / Matrix3x3.hh
GeometryGL.cpp | Math / Matrix3x4.hh
GeometryGL.cpp | Debug / TimeMeasure.hh
GeometryGL.cpp | Math / Vector2.hh
GeometryGL.cpp | Math / Vector3.hh
GeometryGL.hh | Math / Vector3.hh
glcheck.h | Debug / Error.hh
GuiBase.cpp | Common / BIASpragma.hh
GuiBase.cpp | Image / ImageConvert.hh
GuiBase.hh | Debug / Debug.hh
GuiBase.hh | Debug / Error.hh
GuiBase.hh | Image / Image.hh
GuiEnhanced.cpp | Image / Bresenham.hh
GuiEnhanced.hh | Image / Image.hh
GuiWX.cpp | Image / ImageIO.hh
GuiWX.hh | Image / ImageBase.hh
GuiWX.hh | Image / ImageConvert.hh
GuiWX.hh | Image / ImageIO.hh
GuiWX.hh | Math / Math.hh
ImageCanvas.cpp | Image / ImageConvert.hh
ImageCanvas.hh | Debug / Debug.hh
ImageCanvasEnhanced.cpp | Image / ImageConvert.hh
ImageCanvasEnhanced.cpp | Image / ImageDraw.hh
ImageCanvasGLBase.cpp | Debug / DebugSimple.hh
ImageCanvasGLBase.cpp | Debug / Error.hh
ImageCanvasGLBase.cpp | Image / ImageIO.hh
ImageCanvasGLBase.cpp | Math / Vector2.hh
ImageCanvasGLBase.hh | Image / ImageBase.hh
ImgObjGL.cpp | Image / ImageIO.hh
ImgObjGL.hh | Image / Image.hh
ImgObjGL.hh | Image / ImageBase.hh
OpenGLCanvas.cpp | Image / ImageIO.hh
OpenGLCanvas.cpp | Math / Vector2.hh
OpenGLCanvas.cpp | Math / Vector3.hh
OpenGLCanvas.cpp | Math / Vector4.hh
OpenGLCanvasBase.cpp | Common / BIASpragma.hh
OpenGLCanvasBase.cpp | Common / FileHandling.hh
OpenGLCanvasBase.cpp | Image / ImageIO.hh
OpenGLCanvasBase.cpp | Math / Vector2.hh
OpenGLCanvasBase.cpp | Math / Vector3.hh
OpenGLCanvasBase.cpp | Math / Vector4.hh
OpenGLCanvasBase.hh | Debug / DebugSimple.hh
OpenGLCanvasBase.hh | Debug / Error.hh
OpenGLCanvasBase.hh | Image / Image.hh
OpenGLCanvasBase.hh | Math / Vector3.hh
OpenGLCanvasBase.hh | Math / Vector4.hh
ParamGUI.cpp | Common / BIASpragma.hh
ParamGUI.cpp | Debug / DebugSimple.hh
ParamGUI.hh | Common / BIASpragmaEnd.hh
ParamGUI.hh | Common / BIASpragmaStart.hh
Examples / ParamGUISample1.cpp | Common / BIASpragma.hh
ProjectionGUI.hh | Math / Vector.hh
ProjectionGUI.hh | Math / Vector2.hh
RenderModeGL.hh | Math / Vector4.hh
SettingsGL.cpp | Debug / DebugSimple.hh
SettingsGL.cpp | Debug / Error.hh
Examples / TestGui.cpp | Image / Image.hh
Examples / TestGui.cpp | Image / ImageIO.hh
Examples / TestGuiEnhanced.cpp | Image / Image.hh
Examples / TestGuiEnhanced.cpp | Image / ImageDraw.hh
Examples / TestGuiPyramid.cpp | Image / ImageIO.hh
Examples / TestMouse.cpp | Image / Image.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ -> Geometry Relation

Gui

Gui → Geometry Relation

File in Gui | Includes file in Geometry
CameraViewController.hh | PMatrix.hh
GeometryGL.cpp | PMatrix.hh
GeometryGL.cpp | RMatrix.hh
GeometryGL.hh | PMatrix.hh
ProjectionGUI.cpp | ProjectionParametersSpherical.hh
ProjectionGUI.hh | Projection.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ -> Image Relation

Gui

Gui → Image Relation

File in Gui | Includes file in Image
GuiBase.hh | PyramidImage.hh
ImageCanvas.hh | PyramidImage.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ -> Utils Relation

Gui

Gui → Utils Relation

File in Gui | Includes file in Utils
ParamGUI.cpp | ParamTypes.hh
ParamGUI.hh | Param.hh
ParamGUI.hh | ParamTypes.hh
Examples / ParamGUISample1.cpp | Param.hh
Examples / ParamGUISample2.cpp | Param.hh
Examples / ParamGUISample3.cpp | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ -> Base Relation

Gui » Examples

Examples → Base Relation

File in Gui » Examples | Includes file in Base
ExampleGLShared.cpp | Common / LeakChecking.h
ExampleImageCanvas.cpp | Image / ImageIO.hh
ExampleImageCanvasEnhanced.cpp | Image / ImageIO.hh
ExampleImageCanvasFloat.cpp | Image / ImageIO.hh
ExampleImageCanvasGLBase.cpp | Image / Image.hh
ExampleImageCanvasGLBase.cpp | Image / ImageIO.hh
ExampleImageCanvasGLBase.cpp | Common / LeakChecking.h
ExampleMultipleGui.cpp | Common / BIASpragma.hh
ExampleMultipleGui.cpp | Image / Image.hh
ExampleMultipleGui.cpp | Image / ImageIO.hh
ExampleOpenGLCanvas.cpp | Common / LeakChecking.h
ExampleOpenGLCanvasBase.cpp | Common / LeakChecking.h
ParamGUISample1.cpp | Common / BIASpragma.hh
TestGui.cpp | Image / Image.hh
TestGui.cpp | Image / ImageIO.hh
TestGuiEnhanced.cpp | Image / Image.hh
TestGuiEnhanced.cpp | Image / ImageDraw.hh
TestGuiPyramid.cpp | Image / ImageIO.hh
TestMouse.cpp | Image / Image.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ -> Utils Relation

Gui » Examples

Examples → Utils Relation

File in Gui » Examples | Includes file in Utils
ParamGUISample1.cpp | Param.hh
ParamGUISample2.cpp | Param.hh
ParamGUISample3.cpp | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ -> Base Relation

Image

Image → Base Relation

File in Image | Includes file in Base
BackwardMapping.cpp | Common / BIASpragma.hh
BackwardMapping.cpp | Geometry / HomgPoint2D.hh
BackwardMapping.cpp | Image / ImageConvert.hh
BackwardMapping.hh | Geometry / HomgPoint2D.hh
BackwardMapping.hh | Image / Image.hh
BackwardMapping.hh | Math / Matrix2x2.hh
Camera.cpp | Common / BIASpragma.hh
Camera.cpp | Image / Image.hh
Camera.hh | Image / Image.hh
Camera.hh | Geometry / KMatrix.hh
Camera.hh | Image / MetaData.hh
Camera.hh | Math / Vector3.hh
CameraParam.cpp | Image / ImageAttributes.hh
CameraParam.hh | Common / BIASpragmaEnd.hh
CameraParam.hh | Common / BIASpragmaStart.hh
CameraParam.hh | Debug / Error.hh
CameraParam.hh | Geometry / KMatrix.hh
CameraParam.hh | Math / Vector2.hh
CameraParam.hh | Common / XMLIO.hh
ColorHistogram.cpp | Common / BIASpragma.hh
ColorHistogram.cpp | Image / ImageBase.hh
ColorHistogram.cpp | Image / ImageConvert.hh
ColorHistogram.hh | Common / BIASpragmaEnd.hh
ColorHistogram.hh | Common / BIASpragmaStart.hh
ColorHistogram.hh | Image / Image.hh
ColorHistogram.hh | Math / Math.hh
ColorMultiHistogram.cpp | Image / ImageBase.hh
ColorMultiHistogram.hh | Math / Math.hh
ColorSegmentation.cpp | Debug / Exception.hh
ColorSegmentation.cpp | Image / ImageConvert.hh
ColorSegmentation.cpp | Image / ImageIO.hh
ColorSegmentation.hh | Image / Image.hh
CompressJpeg.hh | Image / ImageConvert.hh
CompressJpeg.hh | Image / ImageIO.hh
Contour.hh | Common / BIASpragmaEnd.hh
Contour.hh | Common / BIASpragmaStart.hh
Contour.hh | Image / Image.hh
Contour.hh | Math / Vector2.hh
CylinderMapping.hh | Image / Image.hh
DCData.cpp | Debug / Error.hh
DCData.cpp | Common / W32Compat.hh
DCData.hh | Debug / Debug.hh
DCData.hh | Debug / Error.hh
Examples / ExampleCamera.cpp | Image / ImageIO.hh
Examples / ExampleCamera.cpp | Common / LeakChecking.h
Examples / ExampleContour.cpp | Image / ImageIO.hh
Examples / ExampleContour.cpp | Debug / TimeMeasure.hh
Examples / ExampleCylinderMapping.cpp | Image / ImageIO.hh
Examples / ExampleFFT2D.cpp | Image / Image.hh
Examples / ExampleFFT2D.cpp | Image / ImageConvert.hh
Examples / ExampleFFT2D.cpp | Image / ImageIO.hh
Examples / ExampleFFT2D_Tiles.cpp | Image / Image.hh
Examples / ExampleFFT2D_Tiles.cpp | Image / ImageConvert.hh
Examples / ExampleFFT2D_Tiles.cpp | Image / ImageIO.hh
Examples / ExampleFMT2D.cpp | Image / Image.hh
Examples / ExampleFMT2D.cpp | Image / ImageConvert.hh
Examples / ExampleFMT2D.cpp | Image / ImageIO.hh
Examples / ExampleFMT2D.cpp | Debug / TimeMeasure.hh
Examples / ExampleHistogram.cpp | Image / Image.hh
Examples / ExampleHistogram.cpp | Image / ImageDraw.hh
Examples / ExampleHistogram.cpp | Image / ImageIO.hh
Examples / ExampleHistogram.cpp | Math / Random.hh
Examples / ExampleHomographyMapping.cpp | Image / ImageIO.hh
Examples / ExampleHomographyMapping.cpp | Debug / TimeMeasure.hh
Examples / ExampleLogPolarMapping.cpp | Image / ImageIO.hh
Examples / ExampleLogPolarMapping.cpp | Debug / TimeMeasure.hh
Examples / ExampleMapPerspImages.cpp | Image / ImageBase.hh
Examples / ExampleMapPerspImages.cpp | Image / ImageConvert.hh
Examples / ExampleMapPerspImages.cpp | Image / ImageIO.hh
Examples / ExamplePMDImageIO.cpp | Image / ImageBase.hh
Examples / ExamplePMDImageIO.cpp | Image / ImageConvert.hh
Examples / ExamplePMDImageIO.cpp | Image / ImageIO.hh
Examples / ExampleProjectionMapping.cpp | Image / Image.hh
Examples / ExampleProjectionMapping.cpp | Image / ImageConvert.hh
Examples / ExampleProjectionMapping.cpp | Image / ImageIO.hh
Examples / ExampleProjectionMapping.cpp | Debug / TimeMeasure.hh
Examples / ExampleProjectionMapping.cpp | Math / Vector.hh
Examples / ExampleProjectionMapping.cpp | Math / Vector3.hh
Examples / ExamplePyramidImage.cpp | Debug / Debug.hh
Examples / ExamplePyramidImage.cpp | Image / ImageIO.hh
Examples / ExamplePyramidImage.cpp | Debug / TimeMeasure.hh
Examples / ExampleSphereProjections.cpp | Image / ImageIO.hh
Examples / ExampleUndistort.cpp | Image / ImageIO.hh
Examples / ExampleUnVignette.cpp | Image / ImageIO.hh
Examples / ExampleUnVignette.cpp | Debug / TimeMeasure.hh
FFT2D.cpp | Common / BIASpragmaEnd.hh
FFT2D.cpp | Common / BIASpragmaStart.hh
FFT2D.cpp | Debug / Error.hh
FFT2D_Tiles.cpp | Debug / Error.hh
Histogram.cpp | Common / BIASpragma.hh
Histogram.cpp | Image / ImageBase.hh
Histogram.cpp | Image / ImageDraw.hh
Histogram.hh | Common / BIASpragmaEnd.hh
Histogram.hh | Common / BIASpragmaStart.hh
Histogram.hh | Image / Image.hh
Histogram.hh | Math / Math.hh
HomographyMapping.cpp | Geometry / HomgPoint2D.hh
HomographyMapping.cpp | Image / ImageConvert.hh
HomographyMapping.hh | Common / BIASpragmaEnd.hh
HomographyMapping.hh | Common / BIASpragmaStart.hh
IntegralHistogram.cpp | Common / BIASpragma.hh
IntegralHistogram.cpp | Image / ImageBase.hh
IntegralHistogram.cpp | Image / ImageConvert.hh
IntegralHistogram.cpp | Debug / TimeMeasure.hh
IntegralHistogram.hh | Common / BIASpragmaEnd.hh
IntegralHistogram.hh | Common / BIASpragmaStart.hh
IntegralHistogram.hh | Image / Image.hh
IntegralHistogram.hh | Math / Math.hh
IntegralHistogram.hh | Math / Vector.hh
LogPolarMapping.cpp | Geometry / HomgPoint2D.hh
LogPolarMapping.hh | Common / BIASpragmaEnd.hh
LogPolarMapping.hh | Common / BIASpragmaStart.hh
MatlabTBUndistortion.cpp | Common / BIASpragma.hh
MatlabTBUndistortion.hh | Common / BIASpragmaEnd.hh
MatlabTBUndistortion.hh | Common / BIASpragmaStart.hh
MatlabTBUndistortion.hh | Geometry / HomgPoint2D.hh
MatlabTBUndistortion.hh | Image / Image.hh
MatlabTBUndistortion.hh | Geometry / KMatrix.hh
PMDImageProc.cpp | Image / ImageIO.hh
PMDImageProc.hh | Common / CompareFloatingPoint.hh
PMDImageProc.hh | Image / Image.hh
PMDImageProc.hh | Geometry / KMatrix.hh
PMDImageProc.hh | Image / PMDImageIO.hh
ProjectionMapping.cpp | Geometry / HomgPoint2D.hh
ProjectionMapping.hh | Common / BIASpragmaEnd.hh
ProjectionMapping.hh | Common / BIASpragmaStart.hh
PyramidImage.cpp | Image / ImageIO.hh
PyramidImage.hh | Common / BIASpragmaEnd.hh
PyramidImage.hh | Common / BIASpragmaStart.hh
PyramidImage.hh | Image / Image.hh
RigParameter.cpp | Common / XMLIO.hh
RigParameter.hh | Geometry / HomgPoint2D.hh
RigParameter.hh | Image / ImageBase.hh
RigParameter.hh | Geometry / KMatrix.hh
RigParameter.hh | Math / Matrix3x3.hh
RigParameter.hh | Math / Matrix4x4.hh
RigParameter.hh | Math / Vector3.hh
SphericalUndistortion.cpp | Common / BIASpragma.hh
SphericalUndistortion.cpp | Image / ImageConvert.hh
SphericalUndistortion.cpp | Image / ImageDraw.hh
SphericalUndistortion.cpp | Image / ImageIO.hh
SphericalUndistortion.cpp | Geometry / Quaternion.hh
SphericalUndistortion.cpp | Common / W32Compat.hh
SphericalUndistortion.hh | Debug / Debug.hh
SphericalUndistortion.hh | Geometry / HomgPoint2D.hh
SphericalUndistortion.hh | Image / Image.hh
SphericalUndistortion.hh | Geometry / KMatrix.hh
SphericalUndistortion.hh | Math / Vector.hh
SphericalUndistortion.hh | Math / Vector2.hh
SphericalUndistortion.hh | Common / W32Compat.hh
StereoRedGreen.cpp | Debug / Exception.hh
StereoRedGreen.cpp | Image / Image.hh
StereoRedGreen.cpp | Image / ImageBase.hh
StereoRedGreen.cpp | Image / ImageConvert.hh
UndistortionMapping.cpp | Geometry / HomgPoint2D.hh
UndistortionMapping.cpp | Image / ImageConvert.hh
UndistortionMapping.hh | Common / BIASpragmaEnd.hh
UndistortionMapping.hh | Common / BIASpragmaStart.hh
UnVignette.cpp | Common / BIASpragma.hh
UnVignette.cpp | Debug / TimeMeasure.hh
UnVignette.hh | Common / BIASpragmaEnd.hh
UnVignette.hh | Common / BIASpragmaStart.hh
UnVignette.hh | Geometry / HomgPoint2D.hh
UnVignette.hh | Image / Image.hh
UnVignette.hh | Geometry / KMatrix.hh
UnVignette.hh | Math / Matrix.hh
UnVignette.hh | Math / Vector.hh
VideoStream.cpp | Image / ImageIO.hh
VideoStream.hh | Image / ImageBase.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ -> Filter Relation

Image

Image → Filter Relation

File in Image | Includes file in Filter
FFT2D.hh | FilterNTo2N.hh
PyramidImage.hh | Rescale.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ -> Geometry Relation

Image

Image → Geometry Relation

File in Image | Includes file in Geometry
BackwardMapping.cpp | RMatrix.hh
Camera.hh | PMatrix.hh
Camera.hh | Projection.hh
Camera.hh | RMatrix.hh
CylinderMapping.hh | PMatrix.hh
Examples / ExampleFMT2D.cpp | RMatrix.hh
Examples / ExampleProjectionMapping.cpp | ProjectionParametersSpherical.hh
HomographyMapping.cpp | RMatrix.hh
HomographyMapping.hh | HMatrix.hh
MatlabTBUndistortion.hh | Projection.hh
PMDImageProc.cpp | RMatrix.hh
PMDImageProc.hh | HMatrix.hh
PMDImageProc.hh | Pose.hh
ProjectionMapping.cpp | Projection.hh
ProjectionMapping.cpp | RMatrix.hh
ProjectionMapping.hh | HMatrix.hh
ProjectionMapping.hh | Projection.hh
RigParameter.hh | PMatrix.hh
RigParameter.hh | RMatrix.hh
SphericalUndistortion.cpp | RMatrix.hh
UndistortionMapping.cpp | RMatrix.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ -> MathAlgo Relation

Image

Image → MathAlgo Relation

File in Image | Includes file in MathAlgo
SphericalUndistortion.hh | Interpolator.hh
UnVignette.cpp | Lapack.hh
UnVignette.cpp | SVD.hh
UnVignette.hh | Interpolator.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ -> Utils Relation

Image

Image → Utils Relation

File in Image | Includes file in Utils
Examples / ExampleCylinderMapping.cpp | Param.hh
Examples / ExampleLogPolarMapping.cpp | Param.hh
Examples / ExampleProjectionMapping.cpp | Param.hh
Examples / ExampleProjectionMapping.cpp | ThreeDOut.hh
PyramidImage.hh | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ -> Base Relation

Image » Examples

Examples → Base Relation

File in Image » Examples | Includes file in Base
ExampleCamera.cpp | Image / ImageIO.hh
ExampleCamera.cpp | Common / LeakChecking.h
ExampleContour.cpp | Image / ImageIO.hh
ExampleContour.cpp | Debug / TimeMeasure.hh
ExampleCylinderMapping.cpp | Image / ImageIO.hh
ExampleFFT2D.cpp | Image / Image.hh
ExampleFFT2D.cpp | Image / ImageConvert.hh
ExampleFFT2D.cpp | Image / ImageIO.hh
ExampleFFT2D_Tiles.cpp | Image / Image.hh
ExampleFFT2D_Tiles.cpp | Image / ImageConvert.hh
ExampleFFT2D_Tiles.cpp | Image / ImageIO.hh
ExampleFMT2D.cpp | Image / Image.hh
ExampleFMT2D.cpp | Image / ImageConvert.hh
ExampleFMT2D.cpp | Image / ImageIO.hh
ExampleFMT2D.cpp | Debug / TimeMeasure.hh
ExampleHistogram.cpp | Image / Image.hh
ExampleHistogram.cpp | Image / ImageDraw.hh
ExampleHistogram.cpp | Image / ImageIO.hh
ExampleHistogram.cpp | Math / Random.hh
ExampleHomographyMapping.cpp | Image / ImageIO.hh
ExampleHomographyMapping.cpp | Debug / TimeMeasure.hh
ExampleLogPolarMapping.cpp | Image / ImageIO.hh
ExampleLogPolarMapping.cpp | Debug / TimeMeasure.hh
ExampleMapPerspImages.cpp | Image / ImageBase.hh
ExampleMapPerspImages.cpp | Image / ImageConvert.hh
ExampleMapPerspImages.cpp | Image / ImageIO.hh
ExamplePMDImageIO.cpp | Image / ImageBase.hh
ExamplePMDImageIO.cpp | Image / ImageConvert.hh
ExamplePMDImageIO.cpp | Image / ImageIO.hh
ExampleProjectionMapping.cpp | Image / Image.hh
ExampleProjectionMapping.cpp | Image / ImageConvert.hh
ExampleProjectionMapping.cpp | Image / ImageIO.hh
ExampleProjectionMapping.cpp | Debug / TimeMeasure.hh
ExampleProjectionMapping.cpp | Math / Vector.hh
ExampleProjectionMapping.cpp | Math / Vector3.hh
ExamplePyramidImage.cpp | Debug / Debug.hh
ExamplePyramidImage.cpp | Image / ImageIO.hh
ExamplePyramidImage.cpp | Debug / TimeMeasure.hh
ExampleSphereProjections.cpp | Image / ImageIO.hh
ExampleUndistort.cpp | Image / ImageIO.hh
ExampleUnVignette.cpp | Image / ImageIO.hh
ExampleUnVignette.cpp | Debug / TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ -> Geometry Relation

Image » Examples

Examples → Geometry Relation

File in Image » Examples | Includes file in Geometry
ExampleFMT2D.cpp | RMatrix.hh
ExampleProjectionMapping.cpp | ProjectionParametersSpherical.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ -> Utils Relation

Image » Examples

Examples → Utils Relation

File in Image » Examples | Includes file in Utils
ExampleCylinderMapping.cpp | Param.hh
ExampleLogPolarMapping.cpp | Param.hh
ExampleProjectionMapping.cpp | Param.hh
ExampleProjectionMapping.cpp | ThreeDOut.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/ -> MathAlgo Relation

Matcher2D

Matcher2D → MathAlgo Relation

File in Matcher2D | Includes file in MathAlgo
RegionMatcher.hh | Lapack.hh
TrackerBase.cpp | SVD.hh
TrackerBase.hh | Median1D.hh
TrackerBaseInterface.hh | Median1D.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ -> Base Relation

Matcher2D » Examples

Examples → Base Relation

File in Matcher2D » Examples | Includes file in Base
ExampleColorNCC.cpp | Image / ImageBase.hh
ExampleColorNCC.cpp | Image / ImageConvert.hh
ExampleColorNCC.cpp | Image / ImageIO.hh
ExampleKLTEdge.cpp | Geometry / HomgPoint2D.hh
ExampleKLTEdge.cpp | Image / Image.hh
ExampleKLTEdge.cpp | Image / ImageDraw.hh
ExampleKLTEdge.cpp | Image / ImageIO.hh
ExampleKLTEdge.cpp | Debug / TimeMeasure.hh
ExampleLineMatcher.cpp | Image / Image.hh
ExampleLineMatcher.cpp | Image / ImageConvert.hh
ExampleLineMatcher.cpp | Image / ImageIO.hh
ExampleLineMatcher.cpp | Math / Random.hh
ExampleLineMatcher.cpp | Debug / TimeMeasure.hh
ExampleParabola.cpp | Geometry / HomgPoint2D.hh
ExampleParabola.cpp | Image / Image.hh
ExampleParabola.cpp | Image / ImageDraw.hh
ExampleParabola.cpp | Image / ImageIO.hh
ExampleParabola.cpp | Debug / TimeMeasure.hh
ExampleTracker.cpp | Image / ImageConvert.hh
ExampleTracker.cpp | Image / ImageDraw.hh
ExampleTracker.cpp | Image / ImageIO.hh
ExampleTracker.cpp | Debug / TimeMeasure.hh
ExampleTracker2.cpp | Common / BIASpragma.hh
ExampleTracker2.cpp | Image / ImageConvert.hh
ExampleTracker2.cpp | Image / ImageDraw.hh
ExampleTracker2.cpp | Image / ImageIO.hh
ExampleTracker2.cpp | Debug / TimeMeasure.hh
ExampleTracker3.cpp | Common / BIASpragma.hh
ExampleTracker3.cpp | Image / ImageConvert.hh
ExampleTracker3.cpp | Image / ImageDraw.hh
ExampleTracker3.cpp | Image / ImageIO.hh
ExampleTracker3.cpp | Debug / TimeMeasure.hh
ExampleTrackerBase.cpp | Geometry / HomgPoint2D.hh
ExampleTrackerBase.cpp | Image / Image.hh
ExampleTrackerBase.cpp | Image / ImageConvert.hh
ExampleTrackerBase.cpp | Image / ImageDraw.hh
ExampleTrackerBase.cpp | Image / ImageIO.hh
ExampleTrackerBase.cpp | Debug / TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ -> FeatureDetector Relation

Matcher2D » Examples

Examples → FeatureDetector Relation

File in Matcher2D » Examples | Includes file in FeatureDetector
ExampleTracker.cpp | CornerDetectorKLT.hh
ExampleTracker.cpp | CornerDetectorSusan.hh
ExampleTracker2.cpp | CornerDetectorFoerstner.hh
ExampleTracker2.cpp | CornerDetectorHarris.hh
ExampleTracker2.cpp | CornerDetectorKLT.hh
ExampleTracker3.cpp | CornerDetectorKLT.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ -> Filter Relation

Matcher2D » Examples

Examples → Filter Relation

File in Matcher2D » Examples | Includes file in Filter
ExampleLineMatcher.cpp | GradientSobel3x3.hh
ExampleTrackerBase.cpp | Gauss.hh
ExampleTrackerBase.cpp | GradientGauss.hh
ExampleTrackerBase.cpp | GradientGaussAsymmetric.hh
ExampleTrackerBase.cpp | GradientSobel3x3.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ -> Image Relation

Matcher2D » Examples

Examples → Image Relation

File in Matcher2D » Examples | Includes file in Image
ExampleTracker.cpp | PyramidImage.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ -> Utils Relation

Matcher2D » Examples

Examples → Utils Relation

File in Matcher2D » Examples | Includes file in Utils
ExampleColorNCC.cpp | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/ -> Base Relation

MathAlgo

MathAlgo → Base Relation

File in MathAlgo | Includes file in Base
BSplineCurve.hh | Common / BIASpragmaEnd.hh
BSplineCurve.hh | Common / BIASpragmaStart.hh
BSplineCurve.hh | Debug / Debug.hh
BSplineCurve.hh | Image / Image.hh
BSplineCurve.hh | Image / ImageDraw.hh
BSplineCurve.hh | Math / Matrix.hh
BSplineCurve.hh | Math / Vector.hh
BSplineCurve.hh | Math / Vector2.hh
Examples / ExampleBSplineCurve.cpp | Image / ImageDraw.hh
Examples / ExampleBSplineCurve.cpp | Image / ImageIO.hh
Examples / ExampleBSplineCurve.cpp | Math / Matrix.hh
Examples / ExampleBSplineCurve.cpp | Math / Vector.hh
Examples / ExampleBSplineCurve.cpp | Math / Vector2.hh
Examples / ExampleFFT.cpp | Math / Random.hh
Examples / ExampleGSL.cpp | Math / Random.hh
Examples / ExampleInterpolateLuT.cpp | Common / BIASpragma.hh
Examples / ExampleLeastSquares.cpp | Math / Random.hh
Examples / ExampleLeastSquares.cpp | Debug / TimeMeasure.hh
Examples / ExamplePolynomialSolve.cpp | Common / BIASpragma.hh
Examples / ExamplePolynomialSolve.cpp | Math / Random.hh
Examples / ExamplePowell.cpp | Common / BIASpragma.hh
Examples / ExamplePowell.cpp | Math / Matrix3x3.hh
Examples / ExamplePowell.cpp | Math / Random.hh
Examples / ExamplePowell.cpp | Math / Vector.hh
Examples / ExamplePowell.cpp | Math / Vector3.hh
Examples / ExampleRANSAC.cpp | Common / BIASpragma.hh
Examples / ExampleRANSAC.cpp | Math / Random.hh
Examples / ExampleRANSACPlane.cpp | Common / BIASpragma.hh
Examples / ExampleRANSACPlane.cpp | Math / Random.hh
Examples / ExampleRANSACPlane.hh | Common / BIASpragmaEnd.hh
Examples / ExampleRANSACPlane.hh | Common / BIASpragmaStart.hh
Examples / ExampleRANSACPlane.hh | Geometry / HomgPlane3D.hh
Examples / ExampleRANSACPlane.hh | Geometry / HomgPoint3D.hh
Examples / ExampleRegressionPlane.cpp | Math / Math.hh
Examples / ExampleSVD.cpp | Math / Matrix3x3.hh
Examples / ExampleSVD.cpp | Math / Random.hh
Examples / ExampleSVD.cpp | Debug / TimeMeasure.hh
Examples / ExampleSVD3x3.cpp | Math / Matrix3x3.hh
Examples / ExampleSVD3x3.cpp | Math / Random.hh
Examples / ExampleUnscentedTransform.cpp | Math / Random.hh
Examples / ExampleWeightedLinearLeastSquares.cpp | Math / Matrix.hh
Examples / ExampleWeightedLinearLeastSquares.cpp | Math / Vector.hh
FFT.cpp | Debug / Error.hh
FFT.hh | Debug / Debug.hh
FFT.hh | Math / Vector.hh
GaussHelmert.cpp | Math / Matrix.hh
GaussHelmert.cpp | Math / Vector.hh
GaussHelmert.hh | Debug / Debug.hh
GaussHelmert.hh | Math / Matrix.hh
GaussHelmert.hh | Math / Vector.hh
Examples / interpolate.cpp | Common / BIASpragma.hh
Examples / interpolate.cpp | Image / Image.hh
Examples / interpolate.cpp | Image / ImageDraw.hh
Interpolator.cpp | Debug / Error.hh
Interpolator.hh | Common / BIASpragmaEnd.hh
Interpolator.hh | Common / BIASpragmaStart.hh
Interpolator.hh | Debug / Debug.hh
Interpolator.hh | Image / Image.hh
Interpolator.hh | Math / Matrix.hh
Interpolator.hh | Math / Vector.hh
Interpolator.hh | Math / Vector2.hh
Interpolator.hh | Math / Vector3.hh
Lapack.cpp | Math / tnt / fmat.h
Lapack.cpp | Math / tnt / fortran.h
Lapack.cpp | Math / tnt / vec.h
Lapack.hh | Math / Matrix.hh
Lapack.hh | Math / Vector.hh
LeastSquares.cpp | Common / BIASpragma.hh
LeastSquares.hh | Math / Matrix.hh
LeastSquares.hh | Math / Vector.hh
Median1D.hh | Common / BIASpragmaEnd.hh
Median1D.hh | Common / BIASpragmaStart.hh
Median1D.hh | Debug / Debug.hh
Minpack.cpp | Math / tnt / fortran.h
Minpack.hh | Math / Matrix.hh
Minpack.hh | Math / Vector.hh
MSAC.hh | Common / BIASpragmaEnd.hh
MSAC.hh | Common / BIASpragmaStart.hh
MSAC.hh | Debug / Debug.hh
MSAC.hh | Math / Random.hh
PolynomialSolve.cpp | Common / BIASpragma.hh
PolynomialSolve.cpp | Common / W32Compat.hh
PolynomialSolve.hh | Common / BIASpragmaEnd.hh
PolynomialSolve.hh | Common / BIASpragmaStart.hh
PolynomialSolve.hh | Debug / Debug.hh
PolynomialSolve.hh | Debug / Error.hh
RANSAC.hh | Common / BIASpragmaEnd.hh
RANSAC.hh | Common / BIASpragmaStart.hh
RANSAC.hh | Debug / Debug.hh
RANSAC.hh | Geometry / HomgPoint2D.hh
RANSAC.hh | Math / Matrix.hh
RANSAC.hh | Math / Random.hh
SVD.cpp | Common / CompareFloatingPoint.hh
SVD.cpp | Debug / Exception.hh
SVD.hh | Debug / Debug.hh
SVD.hh | Debug / Error.hh
SVD.hh | Math / Matrix.hh
SVD.hh | Math / Vector.hh
SVD3x3.cpp | Common / BIASpragma.hh
UnscentedTransform.cpp | Common / CompareFloatingPoint.hh
UnscentedTransform.cpp | Debug / Exception.hh
UnscentedTransform.cpp | Math / Matrix.hh
UnscentedTransform.hh | Debug / Debug.hh
UnscentedTransform.hh | Math / Matrix.hh
UnscentedTransform.hh | Math / Vector.hh
minpack / win32_f2c.h | Common / BIASpragmaEnd.hh
minpack / win32_f2c.h | Common / BIASpragmaStart.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/ -> Geometry Relation

MathAlgo

MathAlgo → Geometry Relation

File in MathAlgo | Includes file in Geometry
Examples / ExampleSVD3x3.cpp | FMatrix.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/ -> Gui Relation

MathAlgo

MathAlgo → Gui Relation

File in MathAlgo | Includes file in Gui
Examples / interpolate.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/ -> Utils Relation

MathAlgo

MathAlgo → Utils Relation

File in MathAlgo | Includes file in Utils
MSAC.hh | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ -> Base Relation

MathAlgo » Examples

Examples → Base Relation

File in MathAlgo » Examples | Includes file in Base
ExampleBSplineCurve.cpp | Image / ImageDraw.hh
ExampleBSplineCurve.cpp | Image / ImageIO.hh
ExampleBSplineCurve.cpp | Math / Matrix.hh
ExampleBSplineCurve.cpp | Math / Vector.hh
ExampleBSplineCurve.cpp | Math / Vector2.hh
ExampleFFT.cpp | Math / Random.hh
ExampleGSL.cpp | Math / Random.hh
ExampleInterpolateLuT.cpp | Common / BIASpragma.hh
ExampleLeastSquares.cpp | Math / Random.hh
ExampleLeastSquares.cpp | Debug / TimeMeasure.hh
ExamplePolynomialSolve.cpp | Common / BIASpragma.hh
ExamplePolynomialSolve.cpp | Math / Random.hh
ExamplePowell.cpp | Common / BIASpragma.hh
ExamplePowell.cpp | Math / Matrix3x3.hh
ExamplePowell.cpp | Math / Random.hh
ExamplePowell.cpp | Math / Vector.hh
ExamplePowell.cpp | Math / Vector3.hh
ExampleRANSAC.cpp | Common / BIASpragma.hh
ExampleRANSAC.cpp | Math / Random.hh
ExampleRANSACPlane.cpp | Common / BIASpragma.hh
ExampleRANSACPlane.cpp | Math / Random.hh
ExampleRANSACPlane.hh | Common / BIASpragmaEnd.hh
ExampleRANSACPlane.hh | Common / BIASpragmaStart.hh
ExampleRANSACPlane.hh | Geometry / HomgPlane3D.hh
ExampleRANSACPlane.hh | Geometry / HomgPoint3D.hh
ExampleRegressionPlane.cpp | Math / Math.hh
ExampleSVD.cpp | Math / Matrix3x3.hh
ExampleSVD.cpp | Math / Random.hh
ExampleSVD.cpp | Debug / TimeMeasure.hh
ExampleSVD3x3.cpp | Math / Matrix3x3.hh
ExampleSVD3x3.cpp | Math / Random.hh
ExampleUnscentedTransform.cpp | Math / Random.hh
ExampleWeightedLinearLeastSquares.cpp | Math / Matrix.hh
ExampleWeightedLinearLeastSquares.cpp | Math / Vector.hh
interpolate.cpp | Common / BIASpragma.hh
interpolate.cpp | Image / Image.hh
interpolate.cpp | Image / ImageDraw.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ -> Geometry Relation

MathAlgo » Examples

Examples → Geometry Relation

File in MathAlgo » Examples | Includes file in Geometry
ExampleSVD3x3.cpp | FMatrix.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ -> Gui Relation

MathAlgo » Examples

Examples → Gui Relation

File in MathAlgo » Examples | Includes file in Gui
interpolate.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/ -> Base Relation

MathAlgo » minpack

minpack → Base Relation

File in MathAlgo » minpack | Includes file in Base
win32_f2c.h | Common / BIASpragmaEnd.hh
win32_f2c.h | Common / BIASpragmaStart.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/ -> Base Relation

NetworkComm

NetworkComm → Base Relation

File in NetworkComm | Includes file in Base
Examples / clientExample.cpp | Common / W32Compat.hh
CScommBase.cpp | Common / BIASpragmaEnd.hh
CScommBase.cpp | Common / BIASpragmaStart.hh
CScommBase.cpp | Debug / Error.hh
CScommBase.cpp | Debug / TimeMeasure.hh
CScommBase.hh | Debug / Debug.hh
CScommClient.cpp | Debug / Error.hh
CScommServer.cpp | Debug / Error.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/ -> Base Relation

NetworkComm » Examples

Examples → Base Relation

File in NetworkComm » Examples | Includes file in Base
clientExample.cpp | Common / W32Compat.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/ -> MathAlgo Relation

StateEstimator

StateEstimator → MathAlgo Relation

File in StateEstimator | Includes file in MathAlgo
Kalman.hh | SVD.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ -> Base Relation

StateEstimator » Examples

Examples → Base Relation

File in StateEstimator » Examples | Includes file in Base
CondensHistoExample.cpp | Image / ImageBase.hh
CondensHistoExample.cpp | Image / ImageConvert.hh
CondensHistoExample.cpp | Image / ImageDraw.hh
CondensHistoExample.cpp | Image / ImageIO.hh
condensImgExample.cpp | Image / ImageDraw.hh
condensImgExample.cpp | Image / ImageIO.hh
ExampleKalman.cpp | Math / Random.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ -> Filter Relation

StateEstimator » Examples

Examples → Filter Relation

File in StateEstimator » Examples | Includes file in Filter
CondensHistoExample.cpp | Rescale.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ -> Image Relation

StateEstimator » Examples

Examples → Image Relation

File in StateEstimator » Examples | Includes file in Image
CondensHistoExample.cpp | ColorHistogram.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/ -> Base Relation

Tests

Tests → Base Relation

File in Tests | Includes file in Base
helloconfig.cpp | Image / ImageBase.hh
MathBaseOperators.cpp | Math / Matrix.hh
MathBaseOperators.cpp | Math / Matrix2x2.hh
MathBaseOperators.cpp | Math / Matrix3x3.hh
MathBaseOperators.cpp | Math / Matrix3x4.hh
MathBaseOperators.cpp | Math / Matrix4x4.hh
MathBaseOperators.cpp | Math / Vector.hh
MathBaseOperators.cpp | Math / Vector2.hh
MathBaseOperators.cpp | Math / Vector3.hh
MathBaseOperators.cpp | Math / Vector4.hh
testLeak.cpp | Common / BIASpragma.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Base Relation

Tools

Tools → Base Relation

File in Tools | Includes file in Base
biasadd.cpp | Debug / Error.hh
biasadd.cpp | Image / ImageConvert.hh
biasadd.cpp | Image / ImageIO.hh
biasadd.cpp | Common / LeakChecking.h
biasconvert.cpp | Common / BIASpragma.hh
biasconvert.cpp | Image / ImageAttributes.hh
biasconvert.cpp | Image / ImageBase.hh
biasconvert.cpp | Image / ImageConvert.hh
biasconvert.cpp | Image / ImageIO.hh
biasdetectunvignettewx.cpp | Image / ImageDraw.hh
biasdetectunvignettewx.cpp | Image / ImageIO.hh
biasdiff.cpp | Image / ImageConvert.hh
biasdiff.cpp | Image / ImageIO.hh
biasdiff.cpp | Common / LeakChecking.h
biasextract.cpp | Image / ImageAttributes.hh
biasextract.cpp | Image / ImageIO.hh
biasfilter.cpp | Image / Image.hh
biasfilter.cpp | Image / ImageIO.hh
biasinsert.cpp | Image / ImageConvert.hh
biasinsert.cpp | Image / ImageIO.hh
biasinsert.cpp | Common / LeakChecking.h
biasmerge.cpp | Common / BIASpragma.hh
biasmerge.cpp | Image / ImageBase.hh
biasmerge.cpp | Image / ImageIO.hh
biasprojection.cpp | Common / BIASpragma.hh
biasprojection.cpp | Image / ImageBase.hh
biasprojection.cpp | Image / ImageDraw.hh
biasprojection.cpp | Image / ImageIO.hh
biassetprojection.cpp | Image / ImageIO.hh
biassetuid.cpp | Image / ImageBase.hh
biassetuid.cpp | Image / ImageIO.hh
biasshowepi.cpp | Image / ImageBase.hh
biasshowepi.cpp | Image / ImageConvert.hh
biasshowepi.cpp | Image / ImageDraw.hh
biasshowepi.cpp | Image / ImageIO.hh
biasshowepiwx.cpp | Image / Bresenham.hh
biasshowepiwx.cpp | Image / ImageConvert.hh
biasshowepiwx.cpp | Image / ImageDraw.hh
biasshowepiwx.cpp | Image / ImageIO.hh
biasshowepiwx.cpp | Common / W32Compat.hh
biasshowsm.cpp | Image / ImageIO.hh
biasview.cpp | Image / Image.hh
biasview.cpp | Image / ImageConvert.hh
biasview.cpp | Image / ImageIO.hh
biasview.cpp | Debug / TimeMeasure.hh
biasviewwx.cpp | Common / FileHandling.hh
biasviewwx.cpp | Image / ImageIO.hh
ShowCamWx.cpp | Image / ImageIO.hh
ShowCamWx.cpp | Debug / TimeMeasure.hh
timeit.cpp | Debug / TimeMeasure.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> FeatureDetector Relation

Tools

Tools → FeatureDetector Relation

File in Tools | Includes file in FeatureDetector
biasshowepi.cpp | CornerDetectorHarris.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Filter Relation

Tools

Tools → Filter Relation

File in Tools | Includes file in Filter
biasfilter.cpp | Mean.hh
biasfilter.cpp | Median.hh
biasinsert.cpp | Rescale.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Geometry Relation

Tools

Tools → Geometry Relation

File in Tools | Includes file in Geometry
biasconvert.cpp | PMatrix.hh
biasmerge.cpp | PMatrix.hh
biasprojection.cpp | PMatrix.hh
biasshowepi.cpp | EpipolarLine.hh
biasshowepi.cpp | FMatrix.hh
biasshowepi.cpp | PMatrix.hh
biasshowepiwx.cpp | EpipolarLine.hh
biasshowepiwx.cpp | FMatrix.hh
biasshowepiwx.cpp | PMatrix.hh
biasshowepiwx.cpp | ProjectionParametersSpherical.hh
pmatrix2projection.cpp | PMatrix.hh
pmatrix2projection.cpp | Projection.hh
pmatrix2projection.cpp | ProjectionParametersPerspective.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Gui Relation

Tools

Tools → Gui Relation

File in Tools | Includes file in Gui
biasdetectunvignettewx.cpp | ImageCanvas.hh
biasdetectunvignettewx.cpp | StringConv.hh
biasshowepi.cpp | GuiEnhanced.hh
biasshowepiwx.cpp | ConsoleRedirectIO.hh
biasshowepiwx.cpp | ImageCanvas.hh
biasshowepiwx.cpp | ProjectionGUI.hh
biasshowepiwx.cpp | StringConv.hh
biasshowsm.cpp | GuiEnhanced.hh
biasview.cpp | GuiEnhanced.hh
biasviewwx.cpp | ConsoleRedirectIO.hh
biasviewwx.cpp | ImageCanvas.hh
biasviewwx.cpp | StringConv.hh
ShowCamWx.cpp | ImageCanvas.hh
ShowCamWx.cpp | StringConv.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Image Relation

Tools

Tools → Image Relation

File in Tools | Includes file in Image
biasconvert.cpp | Camera.hh
biasdetectunvignettewx.cpp | Camera.hh
biasdetectunvignettewx.cpp | UnVignette.hh
biasextract.cpp | Camera.hh
biasextract.cpp | CameraParam.hh
biasmerge.cpp | Camera.hh
biasmerge.cpp | HomographyMapping.hh
biasprojection.cpp | Camera.hh
biassetprojection.cpp | Camera.hh
biasshowepi.cpp | Camera.hh
biasshowepiwx.cpp | Camera.hh
biasview.cpp | Camera.hh
biasview.cpp | Histogram.hh
biasviewwx.cpp | Camera.hh
ShowCamWx.cpp | Camera.hh
ShowCamWx.cpp | StereoRedGreen.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> Utils Relation

Tools

Tools → Utils Relation

File in Tools | Includes file in Utils
biasdiff.cpp | Param.hh
biasinsert.cpp | Param.hh
biasshowepi.cpp | ThreeDOut.hh
biasshowsm.cpp | GenSynthMatches.hh
pmatrix2projection.cpp | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ -> VideoSource Relation

Tools

Tools → VideoSource Relation

File in Tools | Includes file in VideoSource
ShowCamWx.cpp | VideoSource_Base.hh
ShowCamWx.cpp | VideoSource_DCAM.hh
ShowCamWx.cpp | VideoSource_DSHOW.hh
ShowCamWx.cpp | VideoSource_Net.hh
ShowCamWx.cpp | VideoSource_Shm.hh
ShowCamWx.cpp | VideoSource_uEye.hh
ShowCamWx.cpp | VideoSource_V4L.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ -> Base Relation

Utils

Utils → Base Relation

File in Utils | Includes file in Base
Examples / ExampleGenSynthMatches.cpp | Common / BIASpragma.hh
Examples / ExampleGenSynthMatches.cpp | Image / ImageIO.hh
Examples / ExampleGGTCube.cpp | Geometry / HomgPoint3D.hh
Examples / ExampleGGTPlane.cpp | Geometry / HomgPoint3D.hh
Examples / ExampleMatchDataBase.cpp | Common / BIASpragma.hh
Examples / ExampleTFT.cpp | Common / BIASpragma.hh
Examples / ExampleTFT.cpp | Image / ImageIO.hh
Examples / ExampleTFT.cpp | Geometry / TrifocalTensorBase.hh
Examples / ExampleThreeDOutVRML.cpp | Common / BIASpragma.hh
Examples / ExampleTriangleMesh.cpp | Image / ImageIO.hh
GenGroundTruth.cpp | Debug / Debug.hh
GenGroundTruth.cpp | Geometry / HomgLine2D.hh
GenGroundTruth.cpp | Geometry / HomgPoint3D.hh
GenGroundTruth.cpp | Image / ImageDraw.hh
GenGroundTruth.cpp | Geometry / KMatrix.hh
GenGroundTruth.cpp | Math / Random.hh
GenGroundTruth.cpp | Math / Vector3.hh
GenGroundTruth.hh | Common / BIASpragmaEnd.hh
GenGroundTruth.hh | Common / BIASpragmaStart.hh
GenGroundTruth.hh | Geometry / HomgPoint2D.hh
GenGroundTruth.hh | Geometry / HomgPoint3D.hh
GenGroundTruth.hh | Image / Image.hh
GenGroundTruth.hh | Geometry / KMatrix.hh
GenSynthMatches.cpp | Image / ImageDraw.hh
GenSynthMatches.hh | Common / BIASpragmaEnd.hh
GenSynthMatches.hh | Common / BIASpragmaStart.hh
GenSynthMatches.hh | Geometry / EuclideanTransf3D.hh
GenSynthMatches.hh | Geometry / FMatrixBase.hh
GenSynthMatches.hh | Geometry / HomgPoint2D.hh
GenSynthMatches.hh | Geometry / HomgPoint3D.hh
GenSynthMatches.hh | Image / Image.hh
GenSynthMatches.hh | Geometry / KMatrix.hh
GenSynthMatches.hh | Geometry / PMatrixBase.hh
GenSynthMatches.hh | Math / Random.hh
GenSynthMatches.hh | Geometry / RMatrixBase.hh
MatchDataBase.cpp | Common / BIASpragma.hh
MatchDataBase.hh | Debug / Debug.hh
MatchDataBase.hh | Geometry / HomgPoint2D.hh
MatchDataBase.hh | Geometry / HomgPoint3D.hh
MatchDataBase.hh | Geometry / KMatrix.hh
MatchDataBase.hh | Geometry / PMatrixBase.hh
MatchDataBase.hh | Geometry / RMatrixBase.hh
Param.cpp | Common / BIASpragma.hh
Param.cpp | Common / BIASpragmaEnd.hh
Param.cpp | Common / BIASpragmaStart.hh
Param.hh | Common / BIASpragmaEnd.hh
Param.hh | Common / BIASpragmaStart.hh
Param.hh | Debug / Debug.hh
Param.hh | Debug / Error.hh
Param.hh | Math / Vector.hh
Param.hh | Common / XMLIO.hh
Examples / ParamExample.cpp | Math / Vector.hh
ParamTypes.cpp | Common / BIASpragmaEnd.hh
ParamTypes.cpp | Common / BIASpragmaStart.hh
ParamTypes.hh | Common / BIASpragmaEnd.hh
ParamTypes.hh | Common / BIASpragmaStart.hh
ParamTypes.hh | Debug / Error.hh
ParamTypes.hh | Math / Vector.hh
PMatrix3DData.hh | Math / RGBA.hh
PMatrix3DData.hh | Math / Vector3.hh
PMatrix3DData.hh | Math / Vector4.hh
ThreeDOut.cpp | Image / ImageIO.hh
ThreeDOut.hh | Debug / Debug.hh
ThreeDOut.hh | Geometry / HomgPlane3D.hh
ThreeDOut.hh | Geometry / HomgPoint3D.hh
ThreeDOut.hh | Image / Image.hh
ThreeDOut.hh | Geometry / PoseParametrization.hh
ThreeDOut.hh | Math / RGBA.hh
ThreeDOut.hh | Math / Vector3.hh
ThreeDOut.hh | Math / Vector4.hh
TriangleMesh.cpp | Math / Vector.hh
TriangleMesh.hh | Image / Image.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ -> Geometry Relation

Utils

Utils → Geometry Relation

File in Utils | Includes file in Geometry
Examples / ExampleVRMLOutProjection.cpp | Projection.hh
GenGroundTruth.cpp | RMatrix.hh
GenGroundTruth.hh | PMatrix.hh
GenSynthMatches.cpp | PMatrix.hh
ThreeDOut.cpp | RMatrix.hh
ThreeDOut.hh | CovMatrix3x3.hh
ThreeDOut.hh | PMatrix.hh
ThreeDOut.hh | Projection.hh
ThreeDOut.hh | Quadric3D.hh
TriangleMesh.cpp | RMatrix.hh
TriangleMesh.hh | PMatrix.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ -> Gui Relation

Utils

Utils → Gui Relation

File in Utils | Includes file in Gui
StatekeeperGL.hh | biasgl.h
ThreeDOut.cpp | biasgl.h
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ -> Base Relation

Utils » Examples

Examples → Base Relation

File in Utils » Examples | Includes file in Base
ExampleGenSynthMatches.cpp | Common / BIASpragma.hh
ExampleGenSynthMatches.cpp | Image / ImageIO.hh
ExampleGGTCube.cpp | Geometry / HomgPoint3D.hh
ExampleGGTPlane.cpp | Geometry / HomgPoint3D.hh
ExampleMatchDataBase.cpp | Common / BIASpragma.hh
ExampleTFT.cpp | Common / BIASpragma.hh
ExampleTFT.cpp | Image / ImageIO.hh
ExampleTFT.cpp | Geometry / TrifocalTensorBase.hh
ExampleThreeDOutVRML.cpp | Common / BIASpragma.hh
ExampleTriangleMesh.cpp | Image / ImageIO.hh
ParamExample.cpp | Math / Vector.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ -> Geometry Relation

Utils » Examples

Examples → Geometry Relation

File in Utils » Examples | Includes file in Geometry
ExampleVRMLOutProjection.cpp | Projection.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> Base Relation

VideoSource

VideoSource → Base Relation

File in VideoSource | Includes file in Base
Examples / ExampleDirectToDisk.cpp | Image / ImageConvert.hh
Examples / ExampleDirectToDisk.cpp | Image / ImageDraw.hh
Examples / ExampleDirectToDisk.cpp | Image / ImageIO.hh
Examples / ExampleDirectToDisk.cpp | Debug / TimeMeasure.hh
Examples / ExampleMDCamToShmWx.cpp | Debug / Exception.hh
Examples / ExampleVideoServer.cpp | Debug / TimeMeasure.hh
Examples / ExampleVideoSource_Net.cpp | Image / ImageIO.hh
Examples / ExampleVideoSource_Shm.cpp | Image / ImageIO.hh
MDcam.hh | Debug / Debug.hh
MDcam.hh | Debug / Error.hh
Examples / showdcam.cpp | Image / ImageConvert.hh
Examples / showdcam.cpp | Image / ImageDraw.hh
Examples / showdcam.cpp | Image / ImageIO.hh
Examples / showdcam.cpp | Debug / TimeMeasure.hh
Examples / showdcam16.cpp | Image / ImageConvert.hh
Examples / showdcam16.cpp | Image / ImageIO.hh
Examples / showdv2cam.cpp | Image / ImageConvert.hh
Examples / showdv2cam.cpp | Image / ImageIO.hh
Examples / showdv2cam.cpp | Debug / TimeMeasure.hh
Examples / showdvcam.cpp | Image / ImageConvert.hh
Examples / showdvcam.cpp | Image / ImageIO.hh
Examples / showdvcam.cpp | Debug / TimeMeasure.hh
Examples / showv4lcam.cpp | Image / ImageConvert.hh
Examples / showv4lcam.cpp | Image / ImageIO.hh
VideoServer.hh | Debug / Debug.hh
VideoServer.hh | Image / ImageConvert.hh
VideoServer.hh | Image / ImageIO.hh
VideoShMFeeder.cpp | Common / BIASpragma.hh
VideoShMFeeder.hh | Debug / Debug.hh
VideoShMFeeder.hh | Image / ImageIO.hh
VideoSource_Base.cpp | Common / BIASpragma.hh
VideoSource_Base.cpp | Image / ImageConvert.hh
VideoSource_Base.cpp | Image / ImageIO.hh
VideoSource_Base.hh | Image / Image.hh
VideoSource_DCAM.hh | Common / W32Compat.hh
VideoSource_Disk.cpp | Common / BIASpragma.hh
VideoSource_Disk.cpp | Image / ImageIO.hh
VideoSource_Disk.hh | Debug / TimeMeasure.hh
VideoSource_DiskPMD.cpp | Common / BIASpragma.hh
VideoSource_DiskPMD.cpp | Image / ImageIO.hh
VideoSource_DSHOW.cpp | Image / ImageConvert.hh
VideoSource_DSHOW.cpp | Image / ImageIO.hh
VideoSource_Net.hh | Common / BIASpragmaEnd.hh
VideoSource_Net.hh | Common / BIASpragmaStart.hh
VideoSource_Shm.cpp | Common / BIASpragma.hh
VideoSource_uEye.cpp | Image / ImageBase.hh
VideoSource_uEye.cpp | Image / ImageIO.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> Filter Relation

VideoSource

VideoSource → Filter Relation

File in VideoSource | Includes file in Filter
VideoServer.hh | Rescale.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> Gui Relation

VideoSource

VideoSource → Gui Relation

File in VideoSource | Includes file in Gui
Examples / ExampleMDCamToShmWx.cpp | StringConv.hh
Examples / showdcam.cpp | GuiGTK.hh
Examples / showdcam16.cpp | GuiGTK.hh
Examples / showdv2cam.cpp | GuiGTK.hh
Examples / showdvcam.cpp | GuiGTK.hh
Examples / showv4lcam.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> Image Relation

VideoSource

VideoSource → Image Relation

File in VideoSource | Includes file in Image
Examples / ExampleDirectToDisk.cpp | Camera.hh
Examples / ExampleVideofeedShm.cpp | Camera.hh
Examples / ExampleVideoSource_Net.cpp | Camera.hh
Examples / ExampleVideoSource_Shm.cpp | Camera.hh
Examples / showdcam.cpp | Camera.hh
Examples / showdcam16.cpp | Camera.hh
Examples / showdv2cam.cpp | Camera.hh
Examples / showdvcam.cpp | Camera.hh
Examples / showv4lcam.cpp | Camera.hh
VideoServer.hh | Camera.hh
VideoServer.hh | CompressJpeg.hh
VideoShMFeeder.hh | Camera.hh
VideoSource_Base.cpp | Camera.hh
VideoSource_Base.cpp | VideoStream.hh
VideoSource_Base.hh | VideoStream.hh
VideoSource_DCAM.hh | Camera.hh
VideoSource_Disk.cpp | Camera.hh
VideoSource_DiskPMD.cpp | Camera.hh
VideoSource_DiskPMD.cpp | PMDImageProc.hh
VideoSource_DiskPMD.hh | Camera.hh
VideoSource_DSHOW.hh | Camera.hh
VideoSource_Net.cpp | Camera.hh
VideoSource_Net.hh | CompressJpeg.hh
VideoSource_Shm.cpp | Camera.hh
VideoSource_Stereo.cpp | Camera.hh
VideoSource_Stereo.hh | Camera.hh
VideoSource_uEye.hh | Camera.hh
VideoSource_V4L.cpp | Camera.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> NetworkComm Relation

VideoSource

VideoSource → NetworkComm Relation

File in VideoSource | Includes file in NetworkComm
VideoServer.hh | CScommServer.hh
VideoSource_Net.hh | CScommClient.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ -> Utils Relation

VideoSource

VideoSource → Utils Relation

File in VideoSource | Includes file in Utils
Examples / ExampleMDCamToShm.cpp | Param.hh
Examples / ExampleMDCamToShmWx.cpp | Param.hh
Examples / ExampleVideoServer.cpp | Param.hh
VideoServer.hh | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ -> Base Relation

VideoSource » Examples

Examples → Base Relation

File in VideoSource » Examples | Includes file in Base
ExampleDirectToDisk.cpp | Image / ImageConvert.hh
ExampleDirectToDisk.cpp | Image / ImageDraw.hh
ExampleDirectToDisk.cpp | Image / ImageIO.hh
ExampleDirectToDisk.cpp | Debug / TimeMeasure.hh
ExampleMDCamToShmWx.cpp | Debug / Exception.hh
ExampleVideoServer.cpp | Debug / TimeMeasure.hh
ExampleVideoSource_Net.cpp | Image / ImageIO.hh
ExampleVideoSource_Shm.cpp | Image / ImageIO.hh
showdcam.cpp | Image / ImageConvert.hh
showdcam.cpp | Image / ImageDraw.hh
showdcam.cpp | Image / ImageIO.hh
showdcam.cpp | Debug / TimeMeasure.hh
showdcam16.cpp | Image / ImageConvert.hh
showdcam16.cpp | Image / ImageIO.hh
showdv2cam.cpp | Image / ImageConvert.hh
showdv2cam.cpp | Image / ImageIO.hh
showdv2cam.cpp | Debug / TimeMeasure.hh
showdvcam.cpp | Image / ImageConvert.hh
showdvcam.cpp | Image / ImageIO.hh
showdvcam.cpp | Debug / TimeMeasure.hh
showv4lcam.cpp | Image / ImageConvert.hh
showv4lcam.cpp | Image / ImageIO.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ -> Gui Relation

VideoSource » Examples

Examples → Gui Relation

File in VideoSource » Examples | Includes file in Gui
ExampleMDCamToShmWx.cpp | StringConv.hh
showdcam.cpp | GuiGTK.hh
showdcam16.cpp | GuiGTK.hh
showdv2cam.cpp | GuiGTK.hh
showdvcam.cpp | GuiGTK.hh
showv4lcam.cpp | GuiGTK.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ -> Image Relation

VideoSource » Examples

Examples → Image Relation

File in VideoSource » Examples | Includes file in Image
ExampleDirectToDisk.cpp | Camera.hh
ExampleVideofeedShm.cpp | Camera.hh
ExampleVideoSource_Net.cpp | Camera.hh
ExampleVideoSource_Shm.cpp | Camera.hh
showdcam.cpp | Camera.hh
showdcam16.cpp | Camera.hh
showdv2cam.cpp | Camera.hh
showdvcam.cpp | Camera.hh
showv4lcam.cpp | Camera.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ -> Utils Relation

VideoSource » Examples

Examples → Utils Relation

File in VideoSource » Examples | Includes file in Utils
ExampleMDCamToShm.cpp | Param.hh
ExampleMDCamToShmWx.cpp | Param.hh
ExampleVideoServer.cpp | Param.hh
Generated on Wed Jun 21 19:06:22 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Distribution.cpp Source File

Base » Math

Distribution.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Distribution.hh"
00026
00027 using namespace BIAS;
00028 using namespace std;
00029
00030 Distribution::Distribution()
00031 {
00032   Reset();
00033 }
00034
00035
00036 Distribution::~Distribution()
00037 {}
00038
00039 void Distribution::Reset()
00040 {
00041   Sum_=SquaredSum_=0.0;
00042   Count_=0;
00043 }
00044
00045 void Distribution::AddData(const vector<double>& data)
00046 {
00047   vector<double>::const_iterator it;
00048   for (it=data.begin(); it!=data.end(); it++){
00049     Sum_ += (*it);
00050     SquaredSum_ += (*it) * (*it);
00051   }
00052   Count_+=(int)data.size();
00053 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Distribution.hh Source File

Base » Math

Distribution.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __Distribution_hh__
00026 #define __Distribution_hh__
00027 #include <Base/Common/BIASpragmaStart.hh>
00028
00029 #include <Base/Debug/Error.hh>
00030 #include <vector>
00031 #include <cmath>
00032
00033
00034 namespace BIAS {
00035
00036   /** @brief class for calculating mean, variance and possibly other parameters
00037       @author woelk 08/2005 */
00038   class BIASMathBase_EXPORT Distribution {
00039   public:
00040     Distribution();
00041
00042     ~Distribution();
00043
00044     void Reset();
00045
00046     void AddData(const std::vector<double>& data);
00047
00048     inline unsigned GetCount()
00049     { return Count_; }
00050
00051     inline double GetMean()
00052     { BIASASSERT(Count_!=0); return Sum_/(double)Count_; }
00053
00054     inline double GetVariance()
00055     { BIASASSERT(Count_>0);
00056       //double mean = GetMean(); // unused
00057       return (SquaredSum_ - Sum_*Sum_/(double)(Count_))/(double)(Count_-1); }
00058
00059     inline double GetSigma()
00060     { return sqrt(GetVariance()); }
00061
00062   protected:
00063     double Sum_;
00064     double SquaredSum_;
00065     unsigned Count_;
00066
00067   }; // class
00068
00069
00070 } // namespace
00071
00072 #include <Base/Common/BIASpragmaEnd.hh>
00073
00074 #endif
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DistTransform.cpp Source File

Filter

DistTransform.cpp

Go to the documentation of this file.
00001 #include "DistTransform.hh"
00002
00003 //BIAS header
00004 #include "Base/Image/ImageConvert.hh"
00005
00006 // std includes
00007 #include <limits>
00008
00009 using namespace std;
00010 using namespace BIAS;
00011
00012 template <class InputStorageType, class OutputStorageType>
00013 void
00014 DistTransform<InputStorageType, OutputStorageType>::
00015 InitDistanceImage_(BIAS::Image<OutputStorageType>& img)
00016 {
00017   OutputStorageType *data = img.GetImageData();
00018   int pixels = img.GetPixelCount();
00019   OutputStorageType maxVal=
00020     OutputStorageType(OutputStorageType(img.GetWidth()+img.GetHeight())/
00021                       2.0*9.0);
00022
00023   // initiate with max possible distance infinity
00024   for (int i = 0; i < pixels; i++)
00025     if (data[i]==zeroLevel_) data[i] = 0;
00026     else data[i] = maxVal;
00027 }
00028
00029
00030 template <class InputStorageType, class OutputStorageType>
00031 void DistTransform<InputStorageType, OutputStorageType>::
00032 MakeDistanceImage_(BIAS::Image<OutputStorageType>& img)
00033 {
00034 #define mymin(a,b) ((a<=b)?a:b)
00035 #define minDEF(s0,s1,s2,s3,s4) mymin(s0, mymin(s1, mymin(s2, mymin(s3, s4))))
00036
00037   OutputStorageType **data=img.GetImageDataArray();
00038
00039   int rows = img.GetHeight();
00040   int cols = img.GetWidth();
00041
00042   // forward pass
00043   for (int k = 1; k <= rows-1; k++)
00044     for (int j = 1; j <= cols-1-1; j++)
00045       data[k][j]= minDEF(data[k][j],                         // origin
00046                       OutputStorageType(data[k][j-1]+3),
00047                       OutputStorageType(data[k-1][j]+3),     // left, top
00048                       OutputStorageType(data[k-1][j-1]+4),
00049                       OutputStorageType(data[k-1][j+1]+4) ); // top diags
00050
00051   // backward pass
00052   for (int k = rows-1-1; k >= 0; k--)
00053     for (int j = cols-1-1; j >= 1; j--)
00054       data[k][j]=
00055             minDEF(data[k][j],                         // origin
00056                 OutputStorageType(data[k][j+1]+3),
00057                 OutputStorageType(data[k+1][j]+3),     // right, bottom
00058                 OutputStorageType(data[k+1][j+1]+4),
00059                 OutputStorageType(data[k+1][j-1]+4) ); // bottom diags
00060 }
00061
00062
00063 template <class InputStorageType, class OutputStorageType>
00064 int DistTransform<InputStorageType, OutputStorageType>::
00065 Filter(const BIAS::Image<InputStorageType>& src_img,
00066        BIAS::Image<OutputStorageType>& dist_img)
00067 {
00068 #ifdef BIAS_DEBUG
00069   if ( (dist_img.GetStorageType()==ImageBase::ST_unsignedchar) ) {
00070     BIASERR("outputType unsigned char is invalid for Distance images use unsigned short or float");
00071     return -1;
00072   }
00073 #endif
00074   ImageConvert::ConvertST(src_img,dist_img,dist_img.GetStorageType());
00075   InitDistanceImage_(dist_img);
00076   MakeDistanceImage_(dist_img);
00077   return 0;
00078 }
00079
00080 template <class InputStorageType, class OutputStorageType>
00081 void DistTransform<InputStorageType, OutputStorageType>::
00082 GetBordersValid_(int & /*border_x*/, int & /*border_y*/) const
00083 {
00084   BIASERR("unfinihed");
00085   BIASABORT;
00086 }
00087
00088 //////////////////////////////////////////////////////////////////////////
00089 //                 instantiation
00090 //////////////////////////////////////////////////////////////////////////
00091 #define FILTER_INSTANTIATION_CLASS DistTransform
00092 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/DistTransform.hh Source File

Filter

DistTransform.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __BIAS_DISTTRANS_HH__
00025 #define __BIAS_DISTTRANS_HH__
00026 #include <Base/Common/BIASpragmaStart.hh>
00027
00028 // std includes
00029 #include <vector>
00030
00031 // BIAS includes
00032 #include <Base/Image/Image.hh>
00033 #include <Base/Math/Vector2.hh>
00034 #include "./FilterBase.hh"
00035
00036 namespace BIAS {
00037   /** @class DistTransform
00038       @brief a class for calculating the distance transform
00039
00040       @author Dennis Herzog, Jan. 2005, edited by grest
00041   */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASFilter_EXPORT DistTransform : public FilterBase<InputStorageType, OutputStorageType>
00044   {
00045
00046   public:
00047
00048     DistTransform() { zeroLevel_=0; }
00049     virtual ~DistTransform() {}
00050
00051     /** Calculates the distanceImage from src
00052         converts the given image to a distance transformed image (the Borgefor
00053         distance is used, that means one step in diagonal direction has a
00054         distance of 4 other steps have distances of 3); <br>
00055         The pixel set, to which the distance is calculated
00056         has to be marked as zero valued pixels, e.g. grey value zero or
00057         SetZeroLevel()
00058         @author herzog
00059         @param img input and output image
00060     */
00061     virtual int Filter(const Image<InputStorageType>& src,
00062                        Image<OutputStorageType>& dst);
00063
00064     void SetZeroLevel(InputStorageType value) { zeroLevel_=value;}
00065
00066   protected:
00067     void MakeDistanceImage_(BIAS::Image<OutputStorageType>& img);
00068     void InitDistanceImage_(BIAS::Image<OutputStorageType>& img);
00069     InputStorageType zeroLevel_;
00070
00071     virtual void GetBordersValid_(int &border_x, int& border_y) const;
00072   };
00073
00074
00075 }
00076
00077 #include <Base/Common/BIASpragmaEnd.hh>
00078
00079 #endif
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/dndFileTarget.cpp Source File

Gui

dndFileTarget.cpp

Go to the documentation of this file.
00001 #include "dndFileTarget.hh"
00002 #include <string>
00003 #include <sstream>
00004 #include "Base/Debug/Error.hh"
00005 #include <Gui/StringConv.hh>
00006 #include <wx/filename.h>
00007
00008 using namespace std;
00009 using namespace BIAS;
00010
00011 /** @author Jan Woetzel 03/2005 */
00012 dndFileTarget::dndFileTarget(wxFrame *frame){m_frame = frame;}
00013
00014 //bool dndFileTarget::OnDropFiles (wxCoord x, wxCoord y, const wxArrayString& filenames)
00015 bool dndFileTarget::OnDropFiles (wxCoord  , wxCoord  , const wxArrayString& filenames)
00016 {
00017     stringstream ss;
00018     for (size_t n = 0; n < filenames.Count(); n++){
00019         if (wxFileName(filenames[n]).IsDir()) {
00020           wxMessageBox(wxT("Dropping directories is unsupoprted. Please drop only filenames!"),
00021               wxT("dndFileTarget Error"), wxOK|wxICON_EXCLAMATION);
00022             return FALSE;
00023         } else {
00024             ss.str("");
00025             ss<<n<<". "<<filenames[n]<<" ";
00026
00027             // do smoething with the dropped string
00028             BIASASSERT(m_frame!=NULL);
00029             m_frame->SetStatusText( AsciiToWx(ss.str()) );
00030             //m_frame->files_.push_back( string(filenames[n]) );
00031             //LoadImageFromList(files_.size()-1);
00032             //// save last name as default if any selected
00033             //if (files_.size()>0) defaultFile=wxString( files_.back().c_str() );
00034         }
00035     };
00036     return TRUE;
00037 }
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/dndFileTarget.hh Source File

Gui

dndFileTarget.hh

Go to the documentation of this file.
00001 #ifndef __dndFileTarget_hh__
00002 #define __dndFileTarget_hh__
00003
00004 /** This file is part of the BIAS library (Basic ImageAlgorithmS).
00005 See the LICENSE file for license. */
00006
00007 #include "bias_config.h"
00008 #include <wx/wx.h>
00009 #include <wx/dnd.h>
00010 #if !wxUSE_DRAG_AND_DROP
00011 #  error The dndFileTarget class requires drag and drop support in the WX library. Please recompile wxWidgets. __FILE__: __LINE__
00012 #endif
00013
00014 namespace BIAS {
00015     /** @brief drag and drop files onto application.
00016     drag a file from MS explorer or kde file manager directly on an application
00017     (instead of using a load from filename function.)
00018     @author Jan Woetzel 03/2005 */
00019     class BIASGui_EXPORT dndFileTarget : public wxFileDropTarget {
00020     public:
00021         dndFileTarget(wxFrame *frame); // ctor
00022         bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
00023     protected:
00024         wxFrame *m_frame;
00025     };
00026 }
00027 #endif // __dndFileTarget_hh__
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/DrawTextGL.cpp Source File

Gui

DrawTextGL.cpp

Go to the documentation of this file.
00001 // Jan Woetzel
00002
00003 #include "DrawTextGL.hh"
00004 #include "biasgl.h"
00005
00006 #if !defined(WIN32)
00007 #  if defined(BIAS_HAVE_GLEW) || defined(MIP_HAVE_GLEW)
00008 #    include <GL/glxew.h>
00009 #  else
00010 #    include <GL/glx.h>
00011 #  endif // glew
00012 #endif // Linux
00013
00014 #ifdef WIN32
00015 #  include <windows.h>      // Header File For Windows
00016 #else //WIN32
00017 #  include <X11/extensions/xf86vmode.h>
00018 #  include <X11/keysym.h>
00019 #  include <X11/Intrinsic.h>    /* Display, Window */
00020 //#  include <GL/glx.h>           /* GLXContext */
00021 #endif // WIN32
00022
00023 #include <iostream>
00024 #include <Base/Debug/Error.hh>
00025 #include <Base/Debug/DebugSimple.hh>
00026
00027
00028 // ------------------------------
00029 using namespace std;
00030 using namespace BIAS;
00031 // ------------------------------
00032 // alphabet starts at char 32 and ends at (32+96)
00033 #define CHARS_START 32
00034 #define CHARS_N 96
00035 // ------------------------------
00036
00037
00038 DrawTextGL::~DrawTextGL()
00039 {
00040     DeleteFont();
00041 }
00042
00043
00044 DrawTextGL::DrawTextGL()
00045 : initialized(false)
00046 {
00047     base=0;
00048     fontname="";
00049 }
00050
00051
00052
00053 // Build a bitmap font for OpenGL usage
00054 // Stores individual charcters in display lists
00055 // Inspired by Nehe lesson 13
00056 // Jan Woetzel 10/2005
00057 int DrawTextGL::InitFont(void* handleDC,
00058                          const std::string & theFontname,
00059                          const int & fontHeight
00060                          )
00061 {
00062     BIASASSERT(handleDC!=NULL);
00063     this->fontname=theFontname;
00064
00065 #ifdef WIN32
00066     //
00067     // WINDOWS (JW)
00068     //
00069
00070     // Windows Font ID
00071     HFONT   font =NULL;
00072     HFONT   oldfont=NULL;
00073     // Storage For Characters
00074     base = glGenLists(CHARS_N);
00075
00076     // CFont:
00077     font = CreateFont(
00078         fontHeight, // height
00079         0, // Width
00080         0,
00081         0,
00082         FW_NORMAL, // font weight, e.g. FW_NORMAL FW_BOLD
00083         FALSE, // Italic
00084         FALSE, // Underline
00085         FALSE, // Strikeout
00086         ANSI_CHARSET,
00087         OUT_TT_PRECIS, // Output Precision OUT_DEFAULT_PRECIS OUT_TT_PRECIS
00088         CLIP_DEFAULT_PRECIS, // Clipping Precision
00089         ANTIALIASED_QUALITY, // Output Quality
00090         FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
00091         fontname.c_str()
00092         );
00093
00094     oldfont = (HFONT)SelectObject(HDC(handleDC), font);
00095     if (oldfont==NULL){
00096         BIASERR("SelectObject failed. NULL");
00097     }
00098
00099     // Build maps
00100     wglUseFontBitmaps(HDC(handleDC), CHARS_START, CHARS_N, base);
00101
00102     // Selects The Font We Want
00103     SelectObject(HDC(handleDC), oldfont);
00104
00105     // Delete The Font since w ehave our display lists
00106     DeleteObject(font);
00107
00108 #else // WIN32
00109
00110     //
00111     // LINUX (JW)
00112     //
00113     Display* display=NULL;
00114     //display = (Display*)(handleDC);
00115
00116     display = XOpenDisplay(0);
00117     if (display == NULL){
00118       BIASERR("XOpenDisplay failed for GLX font initialization. aborting");
00119       return -1;
00120     };
00121     {
00122
00123       XFontStruct *fontX = NULL;
00124       // use N display lists, one for each character
00125       base = glGenLists(CHARS_N);
00126       // load a font with a specific name in "Host Portable Character Encoding"
00127       fontX = XLoadQueryFont(display
00128                  //display.dpy
00129                  ,fontname.c_str()
00130                  // "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1"
00131                  );
00132       if (fontX == NULL)
00133         {
00134           BIASERR("Could not load font "<<fontname<<" switching to fixed");
00135           // try a fallback font
00136         fontname="fixed";
00137         fontX = XLoadQueryFont( display
00138                    //display.dpy
00139                    ,fontname.c_str() );
00140
00141         if (fontX == NULL)
00142           {
00143         BIASERR("Problem loading font - fallback failed, too: "<<fontname);;
00144         this->DeleteFont();
00145         initialized=false;
00146         return -1;
00147           }
00148         }
00149       // Build maps
00150       glXUseXFont(fontX->fid, CHARS_START, CHARS_N, base);
00151
00152       // free XFontStruct since we have our display lists
00153       XFreeFont(display
00154             //display.dpy
00155             ,fontX);
00156     }
00157     // clean up
00158     XCloseDisplay(display);
00159     display = NULL;
00160
00161 #endif // WIN32
00162
00163
00164     initialized=true;
00165     return 0; // OK
00166 }
00167
00168
00169 // JW
00170 void DrawTextGL::DeleteFont()
00171 {
00172     // clean up the display lists we used.
00173     glDeleteLists(base, CHARS_N);
00174 }
00175
00176
00177 // JW: tested, works
00178 void DrawTextGL::PrintNormCoords(const std::string & text,
00179                      const float & xpos, const float & ypos) const
00180 {
00181 #ifdef BIAS_DEBUG
00182     if ((0>xpos)|(xpos>1) | (0>ypos)|(ypos>1) )
00183         BIASERR("("<<xpos<<","<<ypos<<" is out of normalized 0..1 coordinate bounds. Is this intentional?");
00184 #endif //BIAS_DEBUG
00185
00186     // works with OpenGL 1.1
00187     glMatrixMode(GL_PROJECTION);
00188     glPushMatrix();
00189     {
00190         glLoadIdentity();
00191         glOrtho(0.0, 1.0,
00192             0.0, 1.0,
00193             0.1, 1.0);
00194         glMatrixMode(GL_MODELVIEW);
00195         glPushMatrix();
00196         {
00197             glLoadIdentity();
00198             // move into screen
00199             glTranslatef(0.0, 0.0, -0.5);
00200             glRasterPos2f(xpos, ypos);
00201             Print(text); // output
00202         }
00203         glMatrixMode(GL_MODELVIEW);
00204         glPopMatrix();
00205     }
00206     glMatrixMode(GL_PROJECTION);
00207     glPopMatrix();
00208 }
00209
00210
00211 #include <Base/Common/BIASpragmaStart.hh>
00212 // JW: tested, works
00213 void DrawTextGL::PrintWinCoords(const std::string & text,
00214                        const int & xpos, const int & ypos,
00215                        const int & winWidthFallback, const int &winHeightFallback) const
00216 {
00217 #ifdef BIAS_HAVE_GLEW
00218     if (GL_ARB_window_pos) {
00219         // Supported at least by OpenGL 1.4
00220         glWindowPos2f(xpos, ypos);
00221         Print(text);
00222     } else
00223 #endif // BIAS_HAVE_GLEW
00224   {
00225         // fallback for OpenGL 1.1
00226         glMatrixMode(GL_PROJECTION);
00227         glPushMatrix();
00228         {
00229             glLoadIdentity();
00230             gluOrtho2D(
00231                 0.0, float(winWidthFallback),
00232                 0.0, float(winHeightFallback)
00233                 );
00234             glMatrixMode(GL_MODELVIEW);
00235             glPushMatrix();
00236             {
00237                 glLoadIdentity();
00238                 Print(text); // output
00239             }
00240             glMatrixMode(GL_MODELVIEW);
00241             glPopMatrix();
00242         }
00243         glMatrixMode(GL_PROJECTION);
00244         glPopMatrix();
00245     }
00246 }
00247 #include <Base/Common/BIASpragmaEnd.hh>
00248
00249
00250 // JW
00251 void DrawTextGL::Print3D(const std::string & text,
00252                        const float & xpos, const float & ypos, const float & zpos) const
00253 {
00254     glRasterPos3f(xpos, ypos, zpos);
00255     Print(text);
00256 }
00257
00258
00259 // JW
00260 void DrawTextGL::Print3DAbsolute(const std::string & text,
00261                                  const float & xpos, const float & ypos, const float & zpos) const
00262 {
00263     glMatrixMode(GL_MODELVIEW);
00264     glPushMatrix();
00265     {
00266         glLoadIdentity();
00267         Print3D(text, xpos, ypos, zpos);
00268     }
00269     glMatrixMode(GL_MODELVIEW);
00270     glPopMatrix();
00271 }
00272
00273
00274 // JW
00275 void DrawTextGL::Print(const std::string & text) const
00276 {
00277     if (!initialized) {
00278         cout<<"You must call InitFont before using DrawTextGL::Print (JW), aborting."<<endl;
00279         return;
00280     };
00281
00282     glMatrixMode(GL_MODELVIEW);
00283     glPushMatrix();
00284     {
00285         //glTranslatef(0.0f,0.0f,-1.0f);                        // Move One Unit Into The Screen
00286
00287
00288         glPushAttrib(GL_LIST_BIT);
00289         // set display list offset base
00290         glListBase(base - CHARS_START);
00291         // Draws all characters as individual display list calls
00292         glCallLists( text.size(), GL_UNSIGNED_BYTE, text.c_str() );
00293         glPopAttrib(); // restire prevois displa ylist basis
00294     }
00295     glPopMatrix();
00296 }
00297
00298
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/DrawTextGL.hh Source File

Gui

DrawTextGL.hh

Go to the documentation of this file.
00001 #ifndef __DrawTextGL_hh__
00002 #define __DrawTextGL_hh__
00003
00004 #include <bias_config.h>
00005
00006 #ifndef BIAS_HAVE_OPENGL
00007 #  error Please recompile BIAS with USE_OPENGL to use this file.
00008 #endif // BIAS_HAVE_OPENGL
00009
00010 #ifndef BIAS_HAVE_FONTGL
00011 #  error Please enable BIAS_HAVE_FONTGL to use this class (not completely tested on Linux) (JW)
00012 #endif
00013
00014 // default font size, should be negative, e.g. -14 (pixel)
00015 #define DrawTextGL_DEFAULT_FONTSIZE -14
00016
00017 // default font name
00018 #ifdef WIN32
00019 #  define DrawTextGL_DEFAULT_FONTNAME "Arial"
00020 #else // WIN32
00021 #  define DrawTextGL_DEFAULT_FONTNAME "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1"
00022 #endif // WIN32
00023
00024
00025 #include <string>
00026 // BIAS
00027 #include <Base/Common/W32Compat.hh>
00028
00029 namespace BIAS {
00030
00031 /** @brief Draw text to OpenGL as 2D bitmap font.
00032   Implemented as setting up a 2D display list for every standard character.
00033   - Creates font by given name and size "on the fly" for all installed fonts, e.g. True Type fonts or GLX fonts.
00034   - Does not depend on third party libraries (like glut,..)
00035   - Does not need to read a pre-rendered font from disk (like glf does)
00036   - The font has to be available on each client machine at runtime, fallback is tried for unsupported font names.
00037
00038   Uses standard Win32 calls to render TTF fonts on Windows
00039   and GLX fonts on Linux.
00040
00041   Tested with MS Windows XP and (Suse 9.2) Linux (JW).
00042
00043   See Gui/Examples/ExampleGLShared for an Example.
00044
00045   See http://www.opengl.org/resources/features/fontsurvey/ for other possible implementations, in particular 3D "outlined" fonts.
00046       @author Jan Woetzel */
00047 class BIASGui_EXPORT DrawTextGL
00048 {
00049 public:
00050     /// destructor, kills display lists JW
00051     virtual ~DrawTextGL();
00052
00053     /// ctor JW
00054     DrawTextGL();
00055
00056     /// frees the display lists JW
00057     void DeleteFont();
00058
00059     /** set the font up
00060     @return 0 on success, negativ eon error JW
00061     @param theFontname name of teh fornt, e.g. "Arial"
00062     @param theFontname e.g. "Arial", "Times New Roman" or on Linux:  "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1");"
00063     @param handleDC pointer to protected GDI device context,
00064       on WIN32: a HDC, e.g.  for wxWindow use:  GetDC(HWND(this->GetHandle()))
00065       on Linux: .. TODO ..
00066     @author Jan Woetzel */
00067     int InitFont(void* handleDC,
00068         const std::string & theFontname = std::string(DrawTextGL_DEFAULT_FONTNAME) ,
00069         const int & fontHeight = DrawTextGL_DEFAULT_FONTSIZE
00070         );
00071
00072     /** print text on OpenGL screen using current RasterPosition , settings etc. JW */
00073     void Print(const std::string & text) const;
00074
00075     /** print text on OpenGL screen at 2D pos (xpos,ypos) in windows (pixel) coordiantes.
00076         @param winWidthFallback and @param winHeightFallback are used only as GL 1.1 fallback. JW */
00077     void PrintWinCoords(const std::string & text,
00078         const int & xpos, const int & ypos,
00079         const int & winWidthFallback=640, const int &winHeightFallback=480 ) const;
00080
00081     /** print text on OpenGL screen in 0..1 normalized coordinates
00082     with origin at lower left corner
00083     with 0..1 normalizedx coordinates and origin in lower left corner:
00084   \code
00085     Y=1
00086      ^
00087      |
00088      |
00089     0,0  ---> x=1
00090   \endcode
00091     JW */
00092     void PrintNormCoords(const std::string & text,
00093         const float & xpos, const float & ypos) const;
00094
00095     // use current MVP matrix and draw text in 3D position JW */
00096     void Print3D(const std::string & text,
00097         const float & xpos, const float & ypos, const float & zpos) const;
00098
00099     /** draw text in 3d at absolute position,
00100     thus ModelView matrix is set to identity (using push and pop).
00101     Projection matrix is kept JW */
00102     void Print3DAbsolute(const std::string & text,
00103         const float & xpos, const float & ypos, const float & zpos) const;
00104
00105
00106   bool IsInitialized() const {return initialized;};
00107
00108 protected:
00109     // --- data members: --------------------
00110
00111     /// the name of our font, e.g. "Arial" or "-*-helvetica-bold-r-normal--24-*-*-*-p-*-iso8859-1");"
00112     std::string fontname;
00113
00114     /// true if we created teh font as display lists
00115     bool initialized;
00116
00117     /// inde xof our first display list:
00118     unsigned int base;
00119 };
00120
00121 } //namespace BIAS
00122 #endif // __FontGL_HH__
00123
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/EightWaySymmetry.hh Source File

Base » Image

EightWaySymmetry.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // TODO: jw: merge EightWaySymmetry from BIAS/Base/Image and Geometry. (code duplication)
00026
00027
00028 #ifndef __EIGHT_WAY_SYMMETRY_HH__
00029 #define __EIGHT_WAY_SYMMETRY_HH__
00030 #include "bias_config.h"
00031
00032 // BIAS jw: math.h defines required for non-standard symbols:
00033 #include <Base/Common/W32Compat.hh>
00034 #define _USE_MATH_DEFINES
00035 #include <math.h>
00036 //#include <cmath>
00037 #include <iostream>
00038
00039 #include <Base/Debug/Error.hh>
00040
00041
00042
00043
00044 namespace BIAS{
00045
00046   /** direction of line if start is in coordinate origin
00047       as given by compass */
00048   enum TLineType { LT_Invalid, E_NE, NE_N, N_NW, NW_W, W_SW, SW_S, S_SE, SE_E };
00049
00050
00051   template <class T>
00052   class EightWaySymmetry{
00053     /** class for transforming any point to first octant
00054         exists in Base/Image and Base/Geometry to avoid dependencies
00055         between these two libraries */
00056   public:
00057     /// assumes angle is between (-pi, pi] as given by atan2
00058     inline enum TLineType DetermineLineType(double& angle);
00059
00060     /// not tested jet
00061     inline enum TLineType DetermineLineType(const T& startx, const T& starty,
00062                                             const T& endx, const T& endy);
00063
00064     /// transforms Original according to type in a way that
00065     /// Transformed lies on a line with slope in [0,1)
00066     inline void Transform(enum TLineType& type,
00067                           const T& Originalx, const T& Originaly,
00068                           T& Transformedx, T& Transformedy);
00069
00070     /// executes the inverse transformation to the above
00071     inline void InverseTransform(enum TLineType& type,
00072                                  const T& Transformedx, const T& Transformedy,
00073                                  T& Originalx, T& Originaly);
00074
00075     inline void Transform(enum TLineType& type,
00076                           const T orig[2], T transf[2]);
00077
00078     inline void InverseTransform(enum TLineType& type,
00079                                  const T transf[2], T orig[2]);
00080   }; // end of class
00081
00082
00083
00084   // implementations:
00085
00086
00087   //for old compilers 'enum TLineType'
00088   template <class T> inline TLineType
00089   EightWaySymmetry<T>::DetermineLineType(double& angle)
00090   {
00091     enum TLineType type = LT_Invalid;
00092
00093     if (angle >= 0 && angle <= M_PI_4)
00094       type = SE_E;
00095     if (angle > M_PI_4 && angle <= M_PI_2)
00096       type = S_SE;
00097     if (angle > M_PI_2 && angle <= 3 * M_PI_4)
00098       type = SW_S;
00099     if (angle > 3 * M_PI_4 && angle <= M_PI)
00100       type = W_SW;
00101     if (angle > -M_PI && angle <= -3 * M_PI_4)
00102       type = NW_W;
00103     if (angle > -3 * M_PI_4 && angle <= -M_PI_2)
00104       type = N_NW;
00105     if (angle > -M_PI_2 && angle <= -M_PI_4)
00106       type = NE_N;
00107     if (angle > -M_PI_4 && angle < 0)
00108       type = E_NE;
00109
00110     return type;
00111   }
00112
00113   template <class T> inline TLineType              //for old compilers 'enum TLineType'
00114   EightWaySymmetry<T>::DetermineLineType(const T& startx, const T& starty,
00115                                          const T& endx, const T& endy)
00116   {
00117     enum TLineType type = LT_Invalid;
00118     double dx, dy;
00119     dx = (double)endx - (double)startx;
00120     dy = (double)endy - (double)starty;
00121
00122     if (dx>=0){
00123       if (dy>=0){
00124         if (dx>dy){
00125           type = SE_E;
00126         } else {
00127           type = S_SE;
00128         }
00129       } else { // dx >=0 && dy < 0
00130         if(dx>-dy){
00131           type = E_NE;
00132         } else {
00133           type = NE_N;
00134         }
00135       }
00136     } else { // dx < 0
00137       if (dy>=0){
00138         if (-dx>dy){
00139           type = W_SW;
00140         } else {
00141           type = SW_S;
00142         }
00143       } else { // dx <0 && dy <0
00144         if (dx<dy) { //(-dx>-dy){
00145           type = NW_W;
00146         } else {
00147           type = N_NW;
00148         }
00149       }
00150     }
00151     return type;
00152   }
00153
00154   template <class T> inline void
00155   EightWaySymmetry<T>::Transform(enum TLineType& type, const T& Originalx,
00156                                  const T& Originaly, T& Transformedx,
00157                                  T& Transformedy)
00158   {
00159     switch(type){
00160     case SE_E:
00161       Transformedx = Originalx;
00162       Transformedy = Originaly;
00163       break;
00164     case S_SE:
00165       Transformedx = Originaly;
00166       Transformedy = Originalx;
00167       break;
00168     case SW_S:
00169       Transformedx = Originaly;
00170       Transformedy = -Originalx;
00171       break;
00172     case W_SW:
00173       Transformedx = -Originalx;
00174       Transformedy = Originaly;
00175       break;
00176     case NW_W:
00177       Transformedx = Originalx * (-1);
00178       Transformedy = Originaly * (-1);
00179       break;
00180     case N_NW:
00181       Transformedx = -Originaly;
00182       Transformedy = -Originalx;
00183       break;
00184     case NE_N:
00185       Transformedx = -Originaly;
00186       Transformedy = Originalx;
00187       break;
00188     case E_NE:
00189       Transformedx = Originalx;
00190       Transformedy = -Originaly;
00191       break;
00192     case LT_Invalid:
00193       BIASERR("Invalid LineType, maybe wrong slope in EpipolarLine");
00194       break;
00195     }
00196   }
00197
00198
00199   template <class T> inline void
00200   EightWaySymmetry<T>::InverseTransform(enum TLineType& type,
00201                                         const T& Transformedx,
00202                                         const T& Transformedy,
00203                                         T& Originalx,
00204                                         T& Originaly)
00205   {
00206     switch(type){
00207     case SE_E:
00208       Originalx = Transformedx;
00209       Originaly = Transformedy;
00210       break;
00211     case S_SE:
00212       Originalx = Transformedy;
00213       Originaly = Transformedx;
00214       break;
00215     case SW_S:
00216       Originalx = -Transformedy;
00217       Originaly = Transformedx;
00218       break;
00219     case W_SW:
00220       Originalx = -Transformedx;
00221       Originaly = Transformedy;
00222       break;
00223     case NW_W:
00224       Originalx = Transformedx * (-1);
00225       Originaly = Transformedy * (-1);
00226       break;
00227     case N_NW:
00228       Originalx = -Transformedy;
00229       Originaly = -Transformedx;
00230       break;
00231     case NE_N:
00232       Originalx = Transformedy;
00233       Originaly = -Transformedx;
00234       break;
00235     case E_NE:
00236       Originalx = Transformedx;
00237       Originaly = -Transformedy;
00238       break;
00239     case LT_Invalid:
00240       BIASERR("Invalid LineType, maybe wrong slope in EpipolarLine");
00241       break;
00242     }
00243   }
00244
00245   template <class T> inline void
00246   EightWaySymmetry<T>::Transform(enum TLineType& type,
00247                                  const T orig[2], T transf[2])
00248   {
00249     return EightWaySymmetry<T>::Transform(type, orig[0], orig[1], transf[0],
00250                                           transf[1]);
00251   }
00252
00253   template <class T> inline void
00254   EightWaySymmetry<T>::InverseTransform(enum TLineType& type,
00255                                         const T transf[2], T orig[2])
00256   {
00257     return
00258       EightWaySymmetry<T>::InverseTransform(type, transf[0],
00259                                             transf[1], orig[0], orig[1]);
00260   }
00261
00262 } // namespace BIAS
00263
00264 #endif // __8_WAY_SYMMETRY_HH__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EightWaySymmetryHomg.hh Source File

Geometry

EightWaySymmetryHomg.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // TODO: jw: merge EightWaySymmetry from BIAS/Base/Image and Geometry. (code duplication)
00026
00027 #ifndef __EIGHT_WAY_SYMMETRY_HOMG_HH__
00028 #define __EIGHT_WAY_SYMMETRY_HOMG_HH__
00029
00030 #include <cmath>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Image/EightWaySymmetry.hh>
00033
00034 namespace BIAS{
00035
00036   /// direction of line if start is in coordinate origin
00037   /// as given by compass
00038   // the following is coming out of BIASIMage
00039   //    enum TLineType { LT_Invalid, E_NE, NE_N, N_NW, NW_W, W_SW, SW_S, S_SE,
00040   //           SE_E };
00041
00042   // ostream& operator<<(ostream& os, const enum TLineType type);
00043
00044   class BIASGeometry_EXPORT EightWaySymmetryHomg : public EightWaySymmetry<double>
00045   {
00046   public:
00047
00048     inline enum TLineType DetermineLineType(double& angle)
00049       { return EightWaySymmetry<double>::DetermineLineType(angle); };
00050
00051     /// not tested jet
00052     inline enum TLineType DetermineLineType(HomgPoint2D& start,
00053                                             HomgPoint2D& end)
00054       { double s[2], e[2];
00055       s[0]=start[0]/start[2];s[1]=start[1]/start[2];
00056       e[0]=end[0]/end[1];e[1]=end[1]/end[2];
00057         return EightWaySymmetry<double>::DetermineLineType(s[0], s[1], e[0],
00058                                                            e[1]); };
00059
00060     /// transforms Original according to type in a way that
00061     /// Transformed lies on a line with slope in [0,1)
00062     inline void Transform(enum TLineType& type, HomgPoint2D& Original,
00063                           HomgPoint2D& Transformed)
00064       { double o[2];
00065       o[0]=Original[0]/Original[2];o[1]=Original[1]/Original[2];
00066       Transformed[2]=1.0;
00067       EightWaySymmetry<double>::Transform(type, o[0], o[1],Transformed[0],
00068                                           Transformed[1]); }
00069
00070     /// as above
00071     template <class T>
00072     inline void Transform(enum TLineType& type, Vector2<T>& Original,
00073                           Vector2<T>& Transformed)
00074       { EightWaySymmetry<double>::Transform(type, Original[0], Original[1],
00075                                             Transformed[0], Transformed[1]); }
00076
00077     /// executes the inverse transformation to the above
00078     inline void InverseTransform(enum TLineType& type,
00079                                  HomgPoint2D& Transformed,
00080                                  HomgPoint2D& Original)
00081       { double t[2];
00082       t[0]=Transformed[0]/Transformed[2];t[1]=Transformed[1]/Transformed[2];
00083       Original[2]=1.0;
00084       EightWaySymmetry<double>::InverseTransform(type, t[0], t[1],
00085                                                  Original[0], Original[1]); };
00086
00087     /// as above
00088     template <class T>
00089     inline void InverseTransform(enum TLineType& type,
00090                                  Vector2<T>& Transformed,
00091                                  Vector2<T>& Original)
00092       { EightWaySymmetry<double>::InverseTransform(type, Transformed[0],
00093                                                    Transformed[1], Original[0],
00094                                                    Original[1]); }
00095
00096   };
00097
00098
00099 } // namespace BIAS
00100
00101 #endif // __8_WAY_SYMMETRY_HOMG_HH__
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EMatrix.cpp Source File

Geometry

EMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "EMatrix.hh"
00027 #include <limits.h>
00028
00029 using namespace std;
00030 using namespace BIAS;
00031
00032 int EMatrix::InitFromF(const FMatrixBase &F,  KMatrix &K1,
00033                        KMatrix &K2) {
00034   FMatrix Fnorm;
00035
00036   // normalize
00037   double normalization = F.NormFrobenius();
00038   if (fabs(normalization)>DBL_EPSILON)
00039     Fnorm = (F / normalization );
00040   else return -1;
00041
00042   Matrix3x3<double> tmp(K2.Transpose()*Fnorm*K1);
00043
00044   normalization = tmp.NormFrobenius();
00045   if (fabs(normalization)>DBL_EPSILON)
00046     Fnorm = tmp / normalization;
00047   else return -1;
00048
00049   // compose nearest essential matrix
00050   SVD Fnorm_svd(Fnorm);
00051   Vector<double> S(Fnorm_svd.GetS());
00052   tmp.SetZero();
00053   tmp[1][1] = tmp[0][0] = 0.5*(S[0]+S[1]);
00054   tmp[2][2] = 0.0;
00055   (*this) = Matrix3x3<double>( Fnorm_svd.GetU()*tmp*Fnorm_svd.GetVT() );
00056   return 0;
00057 }
00058
00059
00060
00061 int EMatrix::GetRotationTranslation(RMatrix &R, Vector3<double> &C,
00062                                     std::vector<HomgPoint2D> &inlier1,
00063                                     std::vector<HomgPoint2D> &inlier2)
00064 {
00065   //AddDebugLevel(D_EMATRIX_ROT_TRANS);
00066   BIASCDOUT(D_EMATRIX_ROT_TRANS, "####################################"<<endl);
00067   // at first compute possible candidates for baseline and rotation
00068   // details see Hartley Zisserman pp. 239...
00069   SVD svd(*this);
00070   Matrix<double> U = svd.GetU();
00071   Vector3<double> e(U.GetCol(2));
00072   BIASCDOUT(D_EMATRIX_ROT_TRANS,"epipol: "<<e<<endl);
00073 #ifdef BIAS_DEBUG
00074   HomgPoint2D te1, te2;
00075   this->GetEpipolesHomogenized(te1, te2);
00076   BIASCDOUT(D_EMATRIX_ROT_TRANS, "te1: "<<te1<<"\tte2: "<<te2<<endl);
00077 #endif
00078   Matrix3x3<double> W; W.SetZero();
00079   W[0][1] = -1.0; W[1][0] = 1.0; W[2][2] = 1.0;
00080
00081   std::vector<RMatrix > RotCand;
00082   // first candidate
00083   R = svd.GetU()*W*svd.GetVT();
00084   R = R.Transpose();
00085   RotCand.push_back(R.det()*R);
00086   // second candidate
00087   R = svd.GetU()*W.Transpose()*svd.GetVT();
00088   R=R.Transpose();
00089   RotCand.push_back(R.det()*R);
00090
00091   // now evaluating the candidates to find the best one
00092   PMatrix P0, P1; P0.SetIdentity();
00093   BIASCDOUT(D_EMATRIX_ROT_TRANS, "P0 is "<<P0<<endl);
00094   KMatrix K; K.SetIdentity();
00095   unsigned int inlier_count, best_inlier_count=0;
00096   Triangulation triangulator;
00097   HomgPoint3D p3d;
00098   RMatrix RCurrent;
00099   BIAS::Vector3<double> CCurrent;
00100   for (unsigned int i = 0; i < RotCand.size(); i++){
00101     for (double base_sign = -1.0; base_sign <= 2.0 ; base_sign += 2.0){
00102       // since we want to set +/-e as the last column of P
00103       // (which is -R^T*C)
00104       // we have to compute a CCurrent that produces this row
00105       // therefore we undo R^T by multiplying by R
00106       CCurrent = Vector3<double>(base_sign*RotCand[i]*e);
00107       RCurrent = RotCand[i];
00108       // set P1
00109       P1.Compose(K, RCurrent, CCurrent);
00110       BIASCDOUT(D_EMATRIX_ROT_TRANS, "-----------------------------"<<endl);
00111       BIASCDOUT(D_EMATRIX_ROT_TRANS, "P1 is "<<P1<<endl);
00112       inlier_count = 0;
00113       for (unsigned int n =0; n < inlier1.size(); n++){
00114         // now run triangulation
00115         int tri_res;
00116         if ((tri_res=triangulator.Triangulate(P0, P1, inlier1[n],
00117                                               inlier2[n],p3d))==0){
00118           inlier_count++;
00119         }
00120 #ifdef BIAS_DEBUG
00121         if (n<10){
00122           BIASCDOUT(D_EMATRIX_ROT_TRANS, inlier1[n]<<"\t"<< inlier2[n]
00123                     <<"\t"<<p3d<<"\t"<<tri_res<<endl);
00124         }
00125 #endif
00126       }
00127       if (inlier_count > best_inlier_count){
00128         BIASCDOUT(D_EMATRIX_ROT_TRANS, "Set best inlier count "
00129                   << inlier_count <<endl << "R = " << RCurrent
00130                   << ", C = " << CCurrent  << endl);
00131         best_inlier_count = inlier_count;
00132         // save the same R and C we used for the test
00133         R = RCurrent;
00134         C = CCurrent;
00135       } else {
00136         BIASCDOUT(D_EMATRIX_ROT_TRANS, "inlier count " << inlier_count <<endl
00137                   << "R = " << RCurrent << ", C = " << CCurrent  << endl);
00138       }
00139     } // loop over baselines
00140   } // loop over RotCand
00141
00142
00143   if (best_inlier_count == 0) {
00144     BIASERR("No inlier found during triangulation for essential candidates!");
00145     return -1;
00146   }
00147   return 0;
00148 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EMatrix.hh Source File

Geometry

EMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_EMatrix_hh__
00027 #define __BIAS_EMatrix_hh__
00028 #include "bias_config.h"
00029
00030
00031 #include <Base/Debug/Error.hh>
00032 #include <Base/Debug/Debug.hh>
00033 #include "FMatrix.hh"
00034 #include "RMatrix.hh"
00035 #include "Triangulation.hh"
00036
00037 #define D_EMATRIX_ROT_TRANS 0x80000000
00038
00039 namespace BIAS {
00040   /** @class EMatrix
00041       @ingroup g_geometry
00042       @brief class representing an Essential matrix
00043
00044       A essential matrix describes the orientation and position of
00045       two image planes with known calibration. It can be used to estimate
00046       the epipolarline and to distinguish between mismatches and
00047       probably good matchesbecause there are some type of missmatches which
00048       are consistent with the epipolar geometry.
00049
00050       @todo create connection to Base/Geometry/EMatrix
00051   */
00052   class BIASGeometry_EXPORT EMatrix : public FMatrix
00053   {
00054   public:
00055
00056     EMatrix() : FMatrix(){};
00057
00058     explicit EMatrix(const MatrixInitType& i): FMatrix(i){};
00059
00060     EMatrix(const FMatrixBase &F,  KMatrix &K1,  KMatrix &K2)
00061     { if (InitFromF(F,K1,K2)!=0) this->SetZero(); }
00062
00063     /** @brief assuming K1 and K2 as calibrations of the cameras which refer to
00064         the fmatrix, create the nearest valid essential matrix from F */
00065     int InitFromF(const FMatrixBase &F, KMatrix &K1, KMatrix &K2);
00066
00067     /** @brief find R and C(direction), such that maximum number of 3d points
00068         trinagulated from correspondences inlier1 and inlier2 are in front of
00069         both cameras
00070         @return 0=ok, <0 on error, e.g. no triangulation possible */
00071     int GetRotationTranslation(RMatrix &R, Vector3<double> &C,
00072                                std::vector<HomgPoint2D> &inlier1,
00073                                std::vector<HomgPoint2D> &inlier2);
00074
00075     inline EMatrix& operator=(const Matrix3x3<FMATRIX_TYPE>& f){
00076       Matrix3x3<double>::operator=(f);
00077       return *this;
00078     };
00079
00080   };
00081
00082
00083 }
00084
00085 #endif
00086
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EMatrixBase.cpp Source File

Base » Geometry

EMatrixBase.cpp

Go to the documentation of this file.
00001 #include "EMatrixBase.hh"
00002
00003 using namespace BIAS;
00004 using namespace std;
00005
00006
00007
00008
00009
00010
00011
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EMatrixBase.hh Source File

Base » Geometry

EMatrixBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __EMatrixBase_hh__
00026 #define __EMatrixBase_hh__
00027
00028 #include <Base/Math/Matrix3x3.hh>
00029 #include "RMatrixBase.hh"
00030 #include "HomgLine2D.hh"
00031
00032 #define EMATRIX_TYPE double
00033
00034 namespace BIAS {
00035   /** @class EMatrixBase
00036       @ingroup g_geometry
00037       @brief describes the epipolar relationship between two images whith known
00038       internal camera calibration.
00039
00040       @author woelk 07 2004 */
00041   class BIASGeometryBase_EXPORT EMatrixBase : public Matrix3x3<EMATRIX_TYPE>
00042   {
00043   public:
00044     inline EMatrixBase() : Matrix3x3<EMATRIX_TYPE>() { _isDecomposed=false; };
00045     inline ~EMatrixBase() {};
00046
00047     /// see Set(Vector3<EMATRIX_TYPE>& epipole, RMatixBase& R);
00048     inline EMatrixBase(const Vector3<EMATRIX_TYPE>& epipole,
00049                        const RMatrixBase& R)
00050       : Matrix3x3<EMATRIX_TYPE>()
00051     { Set(epipole, R); }
00052     /// see Set(Vector3<EMATRIX_TYPE>& epipole,
00053     ///         Vector3<EMATRIX_TYPE>& EulerAngXYZ);
00054     inline EMatrixBase(const Vector3<EMATRIX_TYPE>& epipole,
00055                        const Vector3<EMATRIX_TYPE>& EulerAngXYZ)
00056       : Matrix3x3<EMATRIX_TYPE>()
00057     { Set(epipole, EulerAngXYZ); };
00058
00059     /** set it from epipole and rotation matrix
00060         in order to generate essential matrix from image 1 to image 2
00061         (i.e. generating the epipolar line in image 2, gfiven a point in
00062         image 1),  use epipole in second image and rotation matrix from image 1
00063         to image 2
00064         @author woelk 07/2004 */
00065     inline void Set(const Vector3<EMATRIX_TYPE>& epipole,
00066                     const RMatrixBase& R);
00067     /** see constructor from epipole and rotation matrix
00068         builds rotation matrix in x, y, z order with moving axis
00069         see RMatrixBase
00070         @author woelk 07/2004 */
00071     inline void Set(const Vector3<EMATRIX_TYPE>& epipole,
00072                     const Vector3<EMATRIX_TYPE>& EulerAngXYZ);
00073
00074
00075     inline double GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D& P1,
00076                                               const BIAS::HomgPoint2D& P2);
00077
00078     /** returns the cosine of the angle bewteen epipolar line
00079         and match line */
00080     inline double GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D& p1,
00081                                               const BIAS::HomgPoint2D& p2);
00082
00083   protected:
00084     bool _isDecomposed;
00085     HomgPoint2D _epipole;
00086     RMatrixBase _R;
00087
00088   };
00089
00090   ///////////////////////////////////////////////////////////////////////////
00091   ///              implementation
00092   ///////////////////////////////////////////////////////////////////////////
00093
00094   void EMatrixBase::Set(const Vector3<EMATRIX_TYPE>& epipole,
00095                         const RMatrixBase& R)
00096   {
00097     Matrix3x3<EMATRIX_TYPE> e;
00098     HomgPoint2D he=epipole; he.Homogenize();
00099     e.SetAsCrossProductMatrix(he);
00100     e.Mult(R, *this);
00101     _isDecomposed=true;
00102     _epipole=he;
00103     _R=R;
00104   }
00105
00106   void EMatrixBase::Set(const Vector3<EMATRIX_TYPE>& epipole,
00107                         const Vector3<EMATRIX_TYPE>& EulerAngXYZ)
00108   {
00109     RMatrixBase R;
00110     R.SetXYZ(EulerAngXYZ[0], EulerAngXYZ[1], EulerAngXYZ[2]);
00111     Set(epipole, R);
00112   }
00113
00114   double EMatrixBase::GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D& P1,
00115                                                   const BIAS::HomgPoint2D& P2)
00116   {
00117     /*
00118     // old version, quite slow but readable ;-)
00119
00120     // use F Matrix to get epipolar line in other image
00121     static BIAS::HomgLine2D EpiLineInImage;
00122     F.GetEpipolarLineImage1(P2,EpiLineInImage);
00123
00124     // compute (perpendicular) distance of point to line and square it
00125     double dError1 = EpiLineInImage.DistanceSquared(P1);
00126
00127     // do the same for the inverse direction and add error value
00128     F.GetEpipolarLineImage2(P1,EpiLineInImage);
00129
00130     double dErrorAll = (dError1 + EpiLineInImage.DistanceSquared(P2));
00131     return dErrorAll;
00132
00133     */
00134     static BIAS::HomgLine2D EL;
00135
00136     // computation of epipolar line relying on homogenized point
00137     const register double *matP = GetData();
00138     EL[0] = P2[0] * matP[0]
00139       + P2[1] * matP[3]
00140       + matP[6];
00141     EL[1] = P2[0] * matP[1]
00142       + P2[1] * matP[4]
00143       + matP[7];
00144     EL[2] = P2[0] * matP[2]
00145       + P2[1] * matP[5]
00146       + matP[8];
00147
00148     double dist = EL[0] * P1[0] + EL[1] * P1[1] + EL[2];
00149     // dist is now = x'Fx (zero for perfect correspondence)
00150
00151     double dError = dist = dist * dist;
00152     dError /= (EL[0]*EL[0]+EL[1]*EL[1]);
00153     // dError containts now the perpendicular distance to epiline in image1
00154
00155     // do the same for the inverse direction and add error value
00156     // EL = F * P1:
00157     EL[0] = matP[0]*P1[0]+ matP[1]*P1[1] + matP[2];
00158     EL[1] = matP[3]*P1[0]+ matP[4]*P1[1] + matP[5];
00159     // EL[2] is not needed
00160
00161     return (dError + (dist / (EL[0]*EL[0]+EL[1]*EL[1])));
00162
00163   }
00164
00165   /// @todo optimze
00166   double EMatrixBase::GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D& p1,
00167                                                   const BIAS::HomgPoint2D& p2)
00168   {
00169     BIASASSERT(_isDecomposed);
00170     double result;
00171     HomgLine2D l1, l2;
00172     HomgPoint2D rcp2;
00173     // l1 is the line between the epipole an p1
00174     l1.Set(_epipole, p1);
00175     l1.Homogenize();
00176     // now apply 'homography' to p2
00177     _R.Mult(p2, rcp2);
00178     // l2 is the line between p1 and R*p2
00179     l2.Set(p1, rcp2);
00180     l2.Homogenize();
00181     // now calculate the angle between these two lines
00182     result=l1[0]*l2[0]+l1[1]*l2[1];
00183     // crop inaccurate results
00184     if (result>=1.0) { result=1.0; }
00185     if (result<=-1.0) { result=-1.0; }
00186     BIASASSERT(result>=-1.0 && result <=1.0);
00187     return 1.0-result;
00188   }
00189
00190 } // namespace
00191
00192
00193 #endif // __EMatrixBase_hh__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EpipolarLine.cpp Source File

Geometry

EpipolarLine.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "EpipolarLine.hh"
00027
00028 #include <Base/Debug/Debug.hh>
00029 #include <Base/Image/ImageDraw.hh>
00030
00031 #include <cmath>
00032 #include <cfloat>
00033
00034 #define MY_DBL_PRECISION 1e-14
00035
00036 #include <Base/Common/BIASpragma.hh>
00037
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042
00043 ostream& operator<<(ostream& os, const enum TEdge edge)
00044 {
00045   switch(edge){
00046   case TopEdge:     os << "top";    break;
00047   case RightEdge:    os << "right";    break;
00048   case BottomEdge:    os << "bottom";    break;
00049   case LeftEdge:    os << "left";    break;
00050   case InvalidEdge:    os << "invalid";    break;
00051   }
00052   return os;
00053 }
00054
00055
00056 EpipolarLine::EpipolarLine() : Debug()
00057 {
00058   HomgLine2D::HomgLine2D();
00059   Width_ = Height_ = 0;
00060   Angle_ = DeltaR_ = RMinLine_ = RMaxLine_ = 0.0;
00061   // set all HomgPoints2D to (0,0,1)
00062   CloseIntersection_.Set (0.0, 0.0);
00063   FarIntersection_ = Current_ = TransformedStart_ = TransformedEnd_
00064     = TransformedCurrent_ = Epipole_ = PInfinity_ = CloseIntersection_;
00065   dx_ = dy_ = 0.0;
00066 }
00067
00068 EpipolarLine::EpipolarLine(const EpipolarLine& line)
00069   :HomgLine2D(line)
00070 {
00071   Epipole_ = line.GetCopyOfEpipole();
00072   EpipolePosition_ = line.GetEpipolePosition();
00073   Type_ = line.GetLineType();
00074   Width_ = line.GetImageWidth();
00075   Height_ = line.GetImageHeight();
00076   Angle_ = line.GetAngle();
00077   FarIntersection_ = line.GetCopyOfFarIntersectionWithImageBorder();
00078   CloseIntersection_ = line.GetCopyOfCloseIntersectionWithImageBorder();
00079   FarEdge_ = line.GetFarEdge();
00080   CloseEdge_ = line.GetCloseEdge();
00081   RMinLine_ = line.GetRMin();
00082   RMaxLine_ = line.GetRMax();
00083   dx_ = line.GetDx();
00084   dy_ = line.GetDy();
00085 }
00086
00087
00088 EpipolarLine& EpipolarLine::operator=(const EpipolarLine& line)
00089 {
00090   (*this).HomgLine2D::operator=(line);
00091   Epipole_ = line.GetCopyOfEpipole();
00092   EpipolePosition_ = line.GetEpipolePosition();
00093   Type_ = line.GetLineType();
00094   Width_ = line.GetImageWidth();
00095   Height_ = line.GetImageHeight();
00096   Angle_ = line.GetAngle();
00097   FarIntersection_ = line.GetCopyOfFarIntersectionWithImageBorder();
00098   CloseIntersection_ = line.GetCopyOfCloseIntersectionWithImageBorder();
00099   FarEdge_ = line.GetFarEdge();
00100   CloseEdge_ = line.GetCloseEdge();
00101   RMinLine_ = line.GetRMin();
00102   RMaxLine_ = line.GetRMax();
00103   dx_ = line.GetDx();
00104   dy_ = line.GetDy();
00105   return *this;
00106 }
00107
00108 EpipolarLine::EpipolarLine(const Vector3<double>& vec)
00109   :HomgLine2D(vec)
00110 {}
00111
00112 EpipolarLine::~EpipolarLine ()
00113 {}
00114
00115 void
00116 EpipolarLine::GetNextLine(bool clockwise, EpipolarLine& nextline,
00117                           double dist)
00118 {
00119   double dx, dy;
00120   HomgPoint2D newpoint;
00121
00122   Homogenize();
00123   //    cerr <<"slope: "<<slope<<"\tinv. slope: "<<bool2string(invslope)
00124   //         <<"\tdr: "<<GetDeltaR)<<"\ttype: "<<GetLineType()
00125   //         <<"\tangle: "<<GetAngle()<<"\tclockwise: "<<bool2string(clockwise)
00126   //         <<endl;
00127
00128   dx = dist*fabs(data_[0]);
00129   dy = dist*fabs(data_[1]);
00130
00131   if (data_[0] * data_[1] < 0)
00132     dx *= -1;
00133
00134   if (fabs(GetAngle())>M_PI_2){
00135     dx *= -1;
00136     dy *= -1;
00137   }
00138
00139   if (!clockwise){
00140     dx *= -1;
00141     dy *= -1;
00142   }
00143
00144   newpoint = GetFarIntersectionWithImageBorder();
00145
00146   // maybe newpoint.Homogenize() ?
00147   newpoint[0] += dx;
00148   newpoint[1] += dy;
00149
00150   nextline.Init(GetImageWidth(), GetImageHeight(), GetEpipole(),
00151                 newpoint, GetEpipolePosition());
00152
00153   BIASDOUT(D_EL_NEXTLINE,"dx: "<<dx<<"\tdy: "<<dy<<"\tnewpoint: ("
00154           <<newpoint[0]<<", "<<newpoint[1]<<")   far int.: ("
00155           <<nextline.GetFarIntersectionWithImageBorder()[0]<<", "
00156           <<nextline.GetFarIntersectionWithImageBorder()[1]<<")  angle: "
00157           <<nextline.GetAngle());
00158 }
00159
00160
00161 int
00162 EpipolarLine::Recalc(unsigned int width, unsigned int height,
00163                      HomgPoint2D& epipole, enum HomgPoint2D::EPosition epos)
00164 {
00165   Width_ = width;
00166   Height_ = height;
00167   Epipole_ = epipole;
00168   EpipolePosition_ = epos;
00169   return Recalc();
00170 }
00171
00172
00173 int
00174 EpipolarLine::Recalc()
00175 {
00176   Homogenize();
00177   // argument point is only used as dummy, to
00178   // verify if (argument-)point sits on image border
00179   HomgPoint2D point(-1.0, -1.0);
00180   if (!DetermineIntersectionsAndEpipoleDistances_(point)) return -1;
00181   Angle_ = atan2(FarIntersection_[1]-Epipole_[1],
00182          FarIntersection_[0]-Epipole_[0]);
00183   Type_ = Sym_.DetermineLineType(Angle_);
00184   Homogenize();
00185   DeltaR_ = (fabs(data_[0]) > fabs(data_[1]))?(fabs(data_[0]/data_[1])):
00186     (fabs(data_[1]/data_[0]));
00187   return 0;
00188 }
00189
00190 void
00191 EpipolarLine::Init(unsigned int width, unsigned int height,
00192                    HomgPoint2D& epipole, HomgPoint2D& otherpoint,
00193                    enum HomgPoint2D::EPosition epos)
00194 {
00195   PInfinity_ = otherpoint;
00196   PInfinityPosition_ = otherpoint.DeterminePosition(width, height);
00197   epipole.CrossProduct(otherpoint, *this);
00198   Homogenize();
00199   Epipole_ = epipole;
00200   Width_ = width;
00201   Height_ = height;
00202   Homogenize();
00203   DeltaR_ = (fabs(data_[0]) > fabs(data_[1]))?(fabs(data_[0]/data_[1])):
00204     (fabs(data_[1]/data_[0]));
00205
00206   DetermineIntersectionsAndEpipoleDistances_(otherpoint);
00207   Angle_ = atan2(FarIntersection_[1]-Epipole_[1],
00208          FarIntersection_[0]-Epipole_[0]);
00209   Type_ = Sym_.DetermineLineType(Angle_);
00210   EpipolePosition_ = epos;
00211 }
00212
00213 void
00214 EpipolarLine::Init(unsigned int width, unsigned int height,
00215                    HomgPoint2D& epipole, HomgPoint2D& pinf)
00216 {
00217   Init(width, height, epipole, pinf,
00218        epipole.DeterminePosition(width, height));
00219 }
00220
00221
00222 //  template <class PixelType> double
00223 //  EpipolarLine::ScanLine(Image<PixelType>& Source, HomgPoint2D& epipole,
00224 //                 double ROffset, unsigned int& DestLength,
00225 //                 PixelType *Destination, bool forward)
00226 double
00227 EpipolarLine::ScanLine(Image<unsigned char>& Source, HomgPoint2D& epipole,
00228                        enum HomgPoint2D::EPosition epos, double RMinImage,
00229                        double RMaxImage, bool forward,
00230                        unsigned int& DestLength, unsigned char *Destination)
00231 {
00232   DestLength = 0;
00233   Homogenize();
00234   Epipole_ = epipole;
00235   Width_ = Source.GetWidth();
00236   Height_ = Source.GetHeight();
00237   Homogenize();
00238   DeltaR_ = (fabs(data_[0]) > fabs(data_[1]))?(fabs(data_[0]/data_[1])):
00239     (fabs(data_[1]/data_[0]));
00240   if (!DetermineIntersectionsAndEpipoleDistances_(epipole))
00241     return -1.0;
00242   Angle_ = atan2(FarIntersection_[1]-Epipole_[1],
00243          FarIntersection_[0]-Epipole_[0]);
00244   EpipolePosition_ = epos;
00245
00246   Type_ = Sym_.DetermineLineType(Angle_);
00247
00248   CalcTransformed_();
00249
00250   BIASDOUT(D_EL_TRANSF,"TransformedLine ("<<TransformedStart_[0]<<", "
00251       <<TransformedStart_[1]<<")  ->  ("<<TransformedEnd_[0]<<", "
00252       <<TransformedEnd_[1]<<")");
00253
00254   ROffset_ = (unsigned int)ceil(RMinLine_) - (unsigned int)ceil(RMinImage);
00255
00256   BIASDOUT(D_EL_OFFSET,"RMinLine_: "<< RMinLine_ <<"\tRMaxLine_: "<< RMaxLine_
00257           <<"\tRMinImage:"<<RMinImage<<"\tRMaxImage:"<<RMaxImage
00258           <<"\tROffset_: "<< ROffset_);
00259
00260   return ScanLine_(Source, ROffset_, DestLength, Destination, forward);
00261 }
00262
00263
00264 // input : Source, ROffset
00265 // output : DestLength, Destination
00266 // assumes that EpipolarLine is fully initialized
00267 //  template <class PixelType> double
00268 //  EpipolarLine::ScanLine_(Image<PixelType>& Source, double ROffset,
00269 //              unsigned int& DestLength, PixelType *Destination,
00270 //              bool forward)
00271 double
00272 EpipolarLine::ScanLine_(Image<unsigned char>& Source, unsigned int ROffset,
00273                         unsigned int& DestLength, unsigned char *Destination,
00274                         bool forward)
00275 {
00276   unsigned int counter= 0;
00277   int counterincr = 0;
00278   unsigned int DestImageWidth =
00279     (unsigned int)floor(sqrt(pow(Source.GetWidth(),2.0) +
00280                              pow(Source.GetHeight(),2.0)))+ 1;
00281
00282   if (Destination == NULL){
00283     Destination = new unsigned char[DestImageWidth];
00284     ROffset = 0;
00285   }
00286
00287   DestLength = ROffset;
00288
00289   if(forward){
00290     counter = DestLength;
00291     counterincr = 1;
00292   } else {
00293     counter = DestImageWidth - DestLength;
00294     counterincr = -1;
00295   }
00296   while ((TransformedCurrent_[0]<=TransformedEnd_[0])&&
00297          (TransformedCurrent_[1]<=TransformedEnd_[1])){
00298     // bilinear interpolation
00299     //Current_=InverseTransform_(TransformedCurrent_);
00300     Sym_.InverseTransform(Type_, TransformedCurrent_, Current_);
00301     BIASDOUT(D_EL_ROUND,"x: "<<Current_[0]<<" y: "<<Current_[1]
00302             <<"\tdest: "<<(int)Destination[DestLength]);
00303     Destination[counter] = (unsigned char)
00304       Source.BilinearInterpolationGrey(Current_[0], Current_[1]);
00305
00306     TransformedCurrent_[0]+=dx_;
00307     TransformedCurrent_[1]+=dy_;
00308     DestLength++;
00309     counter += counterincr;
00310   }
00311   BIASDOUT(D_EL_OFFSET,"DestLength: " << DestLength);
00312   CalcTransformed_();
00313   Length_ = DestLength - ROffset_;
00314   return ROffset - RMinLine_;
00315 }
00316
00317 void
00318 EpipolarLine::Interpolate_(enum TLineType& type, unsigned char **ida, int& x,
00319                            int& y, double& g, unsigned char& result)
00320 {
00321   result = 0;
00322   double gm = 1.0 - g;
00323   switch(type){
00324   case SE_E:
00325     BIASDOUT(D_EL_BRESROUND,x << ", " << y << " : "<< gm << "\t"
00326         << x << ", " << y+1 << " : "<<g);
00327     result = (unsigned char)((double)ida[y][x]*gm +
00328                  (double)ida[y+1][x]*g);
00329     break;
00330   case S_SE:
00331     BIASDOUT(D_EL_BRESROUND,y << ", " << y << " : "<< gm << "\t"
00332         << y << ", " << x+1 << " : "<<g);
00333     result = (unsigned char)((double)ida[x][y]*gm +
00334                  (double)ida[x+1][y]*g);
00335     //        Original[0] = Transformed[1];
00336     //        Original[1] = Transformed[0];
00337     break;
00338   case SW_S:
00339     BIASDOUT(D_EL_BRESROUND,y << ", " << -x << " : "<< gm << "\t"
00340         << y << ", " << -x+1 << " : "<<g);
00341     result = (unsigned char)((double)ida[x][-y]*gm +
00342                  (double)ida[x+1][-y]*g);
00343     //        Original[0] = Transformed[1];
00344     //        Original[1] = -Transformed[0];
00345     break;
00346   case W_SW:
00347     BIASDOUT(D_EL_BRESROUND,-x << ", " << y << " : "<< gm << "\t"
00348         << -x << ", " << y+1 << " : "<<g);
00349     result = (unsigned char)((double)ida[y][-x]*gm +
00350                  (double)ida[y+1][-x]*g);
00351     //        Original[0] = -Transformed[0];
00352     //        Original[1] = Transformed[1];
00353     break;
00354   case NW_W:
00355     BIASDOUT(D_EL_BRESROUND,-x << ", " << -y << " : "<< gm << "  : "
00356         <<(int)ida[-y][-x]<<"\t" << -x << ", " << -y-1 << " : "<<g
00357         <<"  : "<<(int)ida[-y-1][-x]);
00358     result = (unsigned char)((double)ida[-y][-x]*gm +
00359                  (double)ida[-y-1][-x]*g);
00360     BIASDOUT(D_EL_BRESROUND,"result: "<<(int)result);
00361     //        Original = Transformed * (-1);
00362     break;
00363   case N_NW:
00364     BIASDOUT(D_EL_BRESROUND,-y << ", " << -x << " : "<< gm << "\t"
00365         << -y << ", " << -x+1 << " : "<<g);
00366     result = (unsigned char)((double)ida[-x][-y]*gm +
00367                  (double)ida[-x-1][-y]*g);
00368     //        Original[0] = -Transformed[1];
00369     //        Original[1] = -Transformed[0];
00370     break;
00371   case NE_N:
00372     BIASDOUT(D_EL_BRESROUND,-y << ", " << x << " : "<< gm << "\t"
00373         << -y << ", " << x+1 << " : "<<g);
00374     result = (unsigned char)((double)ida[-x][y]*gm +
00375                  (double)ida[-x-1][y]*g);
00376     //        Original[0] = -Transformed[1];
00377     //        Original[1] = Transformed[0];
00378     break;
00379   case E_NE:
00380     BIASDOUT(D_EL_BRESROUND,x << ", " << -y << " : "<< gm << "\t"
00381         << x << ", " << -y+1 << " : "<<g);
00382     result = (unsigned char)((double)ida[-y][x]*gm +
00383                  (double)ida[-y-1][x]*g);
00384     //cerr << " y " << -y << "  g " << gm << endl;
00385     //        Original[0] = Transformed[0];
00386     //        Original[1] = -Transformed[1];
00387     break;
00388   case LT_Invalid:
00389     BIASERR("Invalid LineType, maybe wrong slope in EpipolarLine");
00390     break;
00391   }
00392 }
00393
00394 void EpipolarLine::CalcTransformed_()
00395 {
00396   double dr=0.0;
00397   Vector2<double> Transfslope, Slope(data_[1], data_[0]);
00398 //   dx_ = fabs(data_[0]);
00399 //   dy_ = fabs(data_[1]);
00400   Sym_.Transform(Type_, Slope, Transfslope);
00401   dx_ = fabs(Transfslope[0]);
00402   dy_ = fabs(Transfslope[1]);
00403
00404   BIASDOUT(D_EL_TRANSF," dx_ "<<dx_<<"\tdy_ "<<dy_<<"\ttype: "<<Type_);
00405
00406   Sym_.Transform(Type_, CloseIntersection_, TransformedStart_);
00407   Sym_.Transform(Type_, FarIntersection_, TransformedEnd_);
00408
00409   dr = ceil(RMinLine_) - RMinLine_;
00410   BIASDOUT(D_EL_TRANSF," dr start: "<<dr<<"\tstart befor "
00411           <<(Vector3<double>)TransformedStart_);
00412   TransformedStart_[0] += dx_ * dr;
00413   TransformedStart_[1] += dy_ * dr;
00414
00415   Sym_.InverseTransform(Type_, TransformedStart_, Start_);
00416
00417   dr = RMaxLine_ - floor(RMaxLine_);
00418   BIASDOUT(D_EL_TRANSF," dr end: "<<dr<<"\tend befor "
00419           <<(Vector3<double>)TransformedEnd_);
00420   TransformedEnd_[0] -= dx_ * dr;
00421   TransformedEnd_[1] -= dy_ * dr;
00422
00423   Sym_.InverseTransform(Type_, TransformedEnd_, End_);
00424
00425   BIASDOUT(D_EL_TRANSF,"("<<CloseIntersection_[0]<<", "<<CloseIntersection_[1]
00426       <<") -> ("<<FarIntersection_[0]<<", "<<FarIntersection_[1]
00427       <<")  transf:  ("<<TransformedStart_[0]<<", "<<TransformedStart_[1]
00428       <<") -> ("<<TransformedEnd_[0]<<", "<<TransformedEnd_[1]<<")");
00429
00430   TransformedCurrent_ = TransformedStart_;
00431   Sym_.InverseTransform(Type_, TransformedCurrent_, Current_);
00432
00433 }
00434
00435 // the following is used in DetermineIntersectionsAndEpipoleDistances_
00436 int CompIntersect(const void *left, const void *right)
00437 {
00438   struct TIntersect *Left = (struct TIntersect *)left;
00439   struct TIntersect *Right = (struct TIntersect *)right;
00440   return (Left->EpipoleDistance < Right->EpipoleDistance);
00441 }
00442
00443 bool
00444 EpipolarLine::DetermineIntersectionsAndEpipoleDistances_(HomgPoint2D& point)
00445 {
00446   bool result = true;
00447   int intersectioncount = 0;
00448   struct TIntersect edges[4]; // 0=left, 1=right, 2=top, 3=bottom
00449   HomgLine2D left(-1.0, 0.0, 0.0);
00450   HomgLine2D right(-1.0, 0.0, Width_-1);
00451   HomgLine2D top(0.0, -1.0, 0.0);
00452   HomgLine2D bottom(0.0, -1.0, Height_-1);
00453
00454   edges[0].IntersectsInImage = edges[1].IntersectsInImage
00455     = edges[2].IntersectsInImage = edges[3].IntersectsInImage = false;
00456   edges[0].EpipoleDistance = edges[1].EpipoleDistance
00457     = edges[2].EpipoleDistance = edges[3].EpipoleDistance = -1.0;
00458   edges[0].Edge = LeftEdge;
00459   edges[1].Edge = RightEdge;
00460   edges[2].Edge = TopEdge;
00461   edges[3].Edge = BottomEdge;
00462   edges[0].Point = Intersection(left);
00463   edges[1].Point = Intersection(right);
00464   edges[2].Point = Intersection(top);
00465   edges[3].Point = Intersection(bottom);
00466
00467   // deal with compiler precision
00468   for (unsigned int i=0; i<4; i++){
00469     if (edges[i].Point[0] < 0.0 &&  edges[i].Point[0] > -MY_DBL_PRECISION)
00470       edges[i].Point[0] = 0.0;
00471     if (edges[i].Point[1] < 0.0 &&  edges[i].Point[1] > -MY_DBL_PRECISION)
00472       edges[i].Point[1] = 0.0;
00473     if (edges[i].Point[0] > GetImageWidth() &&
00474         edges[i].Point[0] < GetImageWidth()+MY_DBL_PRECISION)
00475       edges[i].Point[0] = GetImageWidth();
00476     if (edges[i].Point[1] > GetImageHeight() &&
00477         edges[i].Point[1] < GetImageHeight()+MY_DBL_PRECISION)
00478       edges[i].Point[1] = GetImageHeight();
00479   }
00480
00481   //  #ifdef BIAS_DEBUG
00482   //    cout << "untested intersections: " << endl;
00483   //    for (int i=0; i<4; i++){
00484   //      cout << i <<":  (" << edges[i].Point[0] << ", "
00485   //     << edges[i].Point[1] << ",  "<< edges[i].Point[2] <<")\t"
00486   //     << edges[i].EpipoleDistance << endl;
00487   //    }
00488   //  #endif
00489
00490   if ((point[0]==0.0) ||
00491       ((edges[0].Point[2]!=0.0) &&
00492        (edges[0].Point[1]>=0 && edges[0].Point[1]<=Height_-1))){
00493     if(point[0]==0.0)
00494       edges[0].Point=point;
00495     edges[0].IntersectsInImage = true; intersectioncount++;
00496     edges[0].EpipoleDistance = sqrt(pow(edges[0].Point[1]-Epipole_[1],2) +
00497                                     pow(edges[0].Point[0]-Epipole_[0],2));
00498   }
00499   if ((point[0]==Width_-1) ||
00500       ((edges[1].Point[2]!=0.0) &&
00501        (edges[1].Point[1]>=0 && edges[1].Point[1]<=Height_-1))){
00502     if (point[0]==Width_-1)
00503       edges[1].Point=point;
00504     edges[1].IntersectsInImage = true; intersectioncount++;
00505     edges[1].EpipoleDistance = sqrt(pow(edges[1].Point[1]-Epipole_[1],2) +
00506                                     pow(edges[1].Point[0]-Epipole_[0],2));
00507   }
00508   if ((point[1]==0.0) ||
00509       ((edges[2].Point[2]!=0.0) &&
00510        (edges[2].Point[0]>=0 && edges[2].Point[0]<=Width_-1))){
00511     if (point[1]==0.0)
00512       edges[2].Point=point;
00513     edges[2].IntersectsInImage = true; intersectioncount++;
00514     edges[2].EpipoleDistance = sqrt(pow(edges[2].Point[1]-Epipole_[1],2) +
00515                                     pow(edges[2].Point[0]-Epipole_[0],2));
00516   }
00517   if ((point[1]==Height_-1) ||
00518       ((edges[3].Point[2]!=0.0) &&
00519        (edges[3].Point[0]>=0 && edges[3].Point[0]<=Width_-1))){
00520     if (point[1]==Height_-1)
00521       edges[3].Point=point;
00522     edges[3].IntersectsInImage = true;intersectioncount++;
00523     edges[3].EpipoleDistance = sqrt(pow(edges[3].Point[1]-Epipole_[1],2) +
00524                                     pow(edges[3].Point[0]-Epipole_[0],2));
00525   }
00526
00527   //  #ifdef BIAS_DEBUG
00528   //    cout << "unsorted intersections: " << endl;
00529   //    for (int i=0; i<4; i++){
00530   //      cout << i <<":  (" << edges[i].Point[0] << ", "
00531   //     << edges[i].Point[1] << ",  "<< edges[i].Point[2] <<")\t"
00532   //     << edges[i].EpipoleDistance << endl;
00533   //    }
00534   //  #endif
00535
00536   // sort Intersections according to epipole distance
00537   qsort(&edges, 4, sizeof(struct TIntersect), CompIntersect);
00538
00539   //  #ifdef BIAS_DEBUG
00540   //    cout << "sorted intersections: " << endl;
00541   //    for (int i=0; i<4; i++){
00542   //      cout << i <<":  (" << edges[i].Point[0] << ", "
00543   //     << edges[i].Point[1] << ")\t" << edges[i].EpipoleDistance << endl;
00544   //    }
00545   //  #endif
00546
00547 //   if (EpipolePosition_!= Center){
00548
00549     FarIntersection_ = edges[0].Point;
00550     FarEdge_ = edges[0].Edge;
00551     RMaxLine_ = edges[0].EpipoleDistance;
00552     switch(intersectioncount){
00553     case 1:
00554       CloseIntersection_=edges[0].Point;
00555       CloseEdge_ = edges[0].Edge;
00556       RMinLine_ = edges[0].EpipoleDistance;
00557       break;
00558     case 2:
00559       CloseIntersection_=edges[1].Point;
00560       CloseEdge_ = edges[1].Edge;
00561       RMinLine_ = edges[1].EpipoleDistance;
00562       break;
00563     case 3:
00564       CloseIntersection_=edges[2].Point;
00565       CloseEdge_ = edges[2].Edge;
00566       RMinLine_ = edges[2].EpipoleDistance;
00567       break;
00568     case 4:
00569       CloseIntersection_=edges[3].Point;
00570       CloseEdge_ = edges[3].Edge;
00571       RMinLine_ = edges[3].EpipoleDistance;
00572       break;
00573     default:
00574       result = false;
00575 #ifdef BIAS_DEBUG
00576       BIASDOUT(D_EL_INT, "invalid intersection count "<<intersectioncount
00577                <<" of ep. line: "<<*this<<"  with epipole: "<<Epipole_
00578                <<"close intersect: "<<GetCloseIntersectionWithImageBorder()
00579                <<"far intersection: "<<GetFarIntersectionWithImageBorder()
00580                << " sorted intersections: ");
00581       for (int i=0; i<4; i++){
00582         BIASDOUT(D_EL_INT, i <<":  (" << edges[i].Point[0] << ", "
00583                  << edges[i].Point[1] << ")\t" << edges[i].EpipoleDistance);
00584       }
00585       //BIASASSERT(intersectioncount>=2);
00586 #endif
00587       break;
00588     }
00589
00590 //   } else {
00591
00592 //     CloseIntersection_ = Epipole_;
00593 //     CloseEdge_ = BIASInvalidEdge;
00594 //     RMinLine_ = 0.0;
00595 //     int i=0;
00596 //     if (Angle_ >= 0){
00597 //       // take the intersection not sitting on top edge
00598 //       while (edges[i].Point[1]==0) i++;
00599 //     } else {
00600 //       // take the intersection not sitting on bottom edge
00601 //       while (edges[i].Point[1]==Height_) i++;
00602 //     }
00603 //     FarIntersection_=edges[i].Point;
00604 //     FarEdge_ = edges[i].Edge;
00605 //     RMaxLine_ = edges[i].EpipoleDistance;
00606 //   }
00607   return result;
00608 }
00609
00610 // enum TEpipolePosition
00611 // EpipolarLine::DeterminePointPosition_(unsigned int width, unsigned int height,
00612 //                                       HomgPoint2D& point)
00613 // {
00614 //   enum TEpipolePosition epos = HomgPoioInvalidPosition;
00615 //   enum TLocation xpos = LOC_undef, ypos = LOC_undef;
00616
00617 //   if (point[0] < 0)
00618 //     xpos = LOC_LEFT;
00619 //   if (point[0] > width-1)
00620 //     xpos = LOC_RIGHT;
00621 //   if (point[0] >= 0 && point[0] <= width-1)
00622 //     xpos = LOC_MIDDLE;
00623
00624 //   if (point[1] < 0)
00625 //     ypos = LOC_UPPER;
00626 //   if (point[1] > height-1)
00627 //     ypos = LOC_LOWER;
00628 //   if (point[1] >= 0 && point[1] <= height-1)
00629 //     ypos = LOC_MIDDLE;
00630
00631 //   switch (xpos) {
00632 //   case LOC_LEFT:
00633 //     switch (ypos) {
00634 //     case LOC_LOWER:
00635 //       epos = MIPBottomLeft;
00636 //       break;
00637 //     case LOC_UPPER:
00638 //       epos = MIPTopLeft;
00639 //       break;
00640 //     case LOC_MIDDLE:
00641 //       epos = MIPLeft;
00642 //       break;
00643 //     default:
00644 //       BIASERR("DeterminePointPosition_() no valid ypos");
00645 //       break;
00646 //     }
00647 //     break;
00648
00649 //   case LOC_MIDDLE:
00650 //     switch (ypos) {
00651 //     case LOC_LOWER:
00652 //       epos = MIPBottom;
00653 //       break;
00654 //     case LOC_UPPER:
00655 //       epos = MIPTop;
00656 //       break;
00657 //     case LOC_MIDDLE:
00658 //       epos = MIPCenter;
00659 //       break;
00660 //     default:
00661 //       MIPERR("DeterminePointPosition_() no valid ypos");
00662 //       break;
00663 //     }
00664 //     break;
00665
00666 //   case LOC_RIGHT:
00667 //     switch (ypos) {
00668 //     case LOC_LOWER:
00669 //       epos = MIPBottomRight;
00670 //       break;
00671 //     case LOC_UPPER:
00672 //       epos = MIPTopRight;
00673 //       break;
00674 //     case LOC_MIDDLE:
00675 //       epos = MIPRight;
00676 //       break;
00677 //     default:
00678 //       MIPERR("DeterminePointPosition_() no valid ypos");
00679 //       break;
00680 //     }
00681 //     break;
00682
00683 //   default:
00684 //       MIPERR("DeterminePointPosition_() no valid xpos");
00685 //     break;
00686 //   }
00687 //   return epos;
00688 // }
00689
00690
00691 #include <limits> // jw
00692 template <class PixelType>
00693 void EpipolarLine::Draw(Image<PixelType>& im)
00694 {
00695   unsigned int start[2], end[2];
00696   PixelType color[3];
00697   color[0]=PixelType(255);
00698   color[1]=PixelType(255);
00699   color[2]=PixelType(255);
00700
00701 //   cerr << "Epipole: "<<Epipole_<<"   PInfinity: "<<PInfinity_<<endl;
00702 //   cerr << "EpipolePos: "<<EpipolePosition_<<"    pinfpos: "<<PInfinityPosition_<<endl;
00703 //   cerr << GetCloseIntersectionWithImageBorder() << " \t\t"
00704 //        << GetFarIntersectionWithImageBorder() << endl;
00705   if (EpipolePosition_!=HomgPoint2D::Center){
00706     start[0]=(unsigned int)rint(GetCloseIntersectionWithImageBorder()[0]/
00707                                 GetCloseIntersectionWithImageBorder()[2]);
00708     start[1]=(unsigned int)rint(GetCloseIntersectionWithImageBorder()[1]/
00709                                 GetCloseIntersectionWithImageBorder()[2]);
00710   } else {
00711     start[0]=(unsigned int)rint(Epipole_[0]/Epipole_[2]);
00712     start[1]=(unsigned int)rint(Epipole_[1]/Epipole_[2]);
00713     ImageDraw<PixelType>::RectangleCenter(im, start, 5,color);
00714   }
00715
00716   if (PInfinityPosition_!=HomgPoint2D::Center){
00717     end[0]=(unsigned int)rint(GetFarIntersectionWithImageBorder()[0]/
00718                      GetFarIntersectionWithImageBorder()[2]);
00719     end[1]=(unsigned int)rint(GetFarIntersectionWithImageBorder()[1]/
00720                      GetFarIntersectionWithImageBorder()[2]);
00721   } else {
00722     end[0]=(unsigned int)rint(PInfinity_[0]/PInfinity_[2]);
00723     end[1]=(unsigned int)rint(PInfinity_[1]/PInfinity_[2]);
00724     ImageDraw<PixelType>::RectangleCenter(im, end, 5,color);
00725   }
00726   //cerr<<"start"<<start[0]<<" "<<start[1]<<"  end: "<<end[0]<<" "<<end[1]<<endl;
00727   ImageDraw<PixelType>::Line(im, start, end,color);
00728 }
00729
00730 template <class PixelType>
00731 void EpipolarLine::DrawWhole(Image<PixelType>& im)
00732 {
00733   CloseIntersection_.Homogenize();
00734   FarIntersection_.Homogenize();
00735
00736   if (!im.IsPositionInImage(int(rint( CloseIntersection_[0])),
00737                             int(rint( CloseIntersection_[1])))) {
00738     BIASERR("close intersection not in image: "<<CloseIntersection_);
00739     return;
00740   }
00741   if (!im.IsPositionInImage(int(rint( FarIntersection_[0])),
00742                             int(rint( FarIntersection_[1])))) {
00743     BIASERR("far intersection not in image: "<<FarIntersection_);
00744     return;
00745   }
00746
00747   unsigned int start[2], end[2];
00748   start[0] = (unsigned int)rint( CloseIntersection_[0]);
00749   start[1] = (unsigned int)rint( CloseIntersection_[1]);
00750   end[0]   = (unsigned int)rint( FarIntersection_[0]);
00751   end[1]   = (unsigned int)rint( FarIntersection_[1]);
00752   ImageDraw<PixelType>::Line(im, start, end);
00753 }
00754
00755 #define INSTANCE(type) \
00756 template void EpipolarLine::Draw<type>(Image<type>& im);\
00757 template void EpipolarLine::DrawWhole<type>(Image<type>& im);
00758
00759 INSTANCE(unsigned char)
00760 INSTANCE(float)
00761
00762 #ifdef BUILD_IMAGE_CHAR
00763 INSTANCE(char)
00764 #endif
00765 #ifdef BUILD_IMAGE_DOUBLE
00766 INSTANCE(double)
00767 #endif
00768 #ifdef BUILD_IMAGE_UINT
00769 INSTANCE(unsigned int)
00770 #endif
00771 #ifdef BUILD_IMAGE_INT
00772 INSTANCE(int)
00773 #endif
00774 #ifdef BUILD_IMAGE_SHORT
00775 INSTANCE(short)
00776 #endif
00777 #ifdef BUILD_IMAGE_USHORT
00778 INSTANCE(unsigned short)
00779 #endif
00780
00781
00782
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/EpipolarLine.hh Source File

Geometry

EpipolarLine.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __EPIPOLARLINE_HH__
00027 #define __EPIPOLARLINE_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Geometry/HomgPoint2D.hh>
00031 #include <Base/Geometry/HomgLine2D.hh>
00032 #include <Base/Image/EightWaySymmetry.hh>
00033 #include <Base/Debug/Debug.hh>
00034 #include <Base/Image/Image.hh>
00035
00036 #include "EightWaySymmetryHomg.hh"
00037
00038 #include <fstream>
00039 #include <cmath>
00040
00041 #define LOWER 10E-6
00042 #define TWICEPI 6.2831853071795864769252867665590058
00043
00044 #define D_EL_SLOPE 1<<0
00045 #define D_EL_TRANSF 1<<1
00046 #define D_EL_STARTEND 1<<2
00047 #define D_EL_NEWSTARTEND 1<<3
00048 #define D_EL_ROUND 1<<4
00049 #define D_EL_NEXTLINE 1<<5
00050 #define D_EL_OFFSET 1<<6
00051 #define D_EL_BRES 1<<7
00052 #define D_EL_BRESROUND 1<<8
00053 #define D_EL_INT 1<<9
00054
00055
00056 enum TEdge { TopEdge, BottomEdge, LeftEdge, RightEdge, InvalidEdge };
00057
00058 std::ostream& operator<<(std::ostream& os, const enum TEdge edge);
00059
00060 namespace BIAS{
00061   /** @geobase
00062       @brief a class for representing epipolar lines with useful functions like
00063       ScanLine()
00064
00065       coordinate system is image coo system with origin in
00066       upper left image corner
00067       epipole and point at infinty is also stored
00068       @author Felix Woelk
00069   */
00070   class BIASGeometry_EXPORT EpipolarLine : public HomgLine2D, public Debug
00071   {
00072
00073   public:
00074
00075     EpipolarLine();
00076
00077     EpipolarLine(const EpipolarLine& line);
00078
00079     EpipolarLine(const Vector3<HOMGLINE2D_TYPE>& vec);
00080
00081     virtual EpipolarLine& operator=(const EpipolarLine& line);
00082
00083     virtual ~EpipolarLine();
00084
00085     inline void SetEpipole(HomgPoint2D& ep)
00086     { Epipole_ = ep; };
00087
00088     virtual inline HomgPoint2D& GetEpipole()
00089     { return Epipole_; };
00090
00091     virtual inline HomgPoint2D GetCopyOfEpipole() const
00092     { return Epipole_; };
00093
00094     /** return type,
00095         E_NE if 0 < slope < 45 degree
00096         NE_N if 45 < slop < 90 ... */
00097     inline enum TLineType GetLineType() const
00098     { return Type_; }
00099
00100     /// angle to abszissa (-pi, pi]
00101     inline double GetAngle() const
00102     { return Angle_; };
00103
00104     // returns (unsigned int)ceil(RMin(whole image) - RMin(epipolar line))
00105     inline double GetROffset() const
00106     { return ROffset_; };
00107
00108     inline double GetDx() const
00109     { return dx_; };
00110
00111     inline double GetDy() const
00112     { return dy_; };
00113
00114     inline HomgPoint2D& GetTransformedStart()
00115     { return TransformedStart_; };
00116
00117     inline HomgPoint2D& GetTransformedEnd()
00118     { return TransformedEnd_; };
00119
00120     inline HomgPoint2D GetTransformedStart() const
00121     { return TransformedStart_; };
00122
00123     inline HomgPoint2D GetTransformedEnd() const
00124     { return TransformedEnd_; };
00125
00126     ///
00127     virtual inline double GetDeltaR() const
00128     { return DeltaR_; };
00129
00130     /// distance epipole - close intersection with image border
00131     virtual inline double GetRMin() const
00132     { return RMinLine_; }
00133
00134     /// distance epipole - far intersection with image border
00135     virtual inline double GetRMax() const
00136     { return RMaxLine_; }
00137
00138     ///
00139     virtual inline HomgPoint2D& GetFarIntersectionWithImageBorder()
00140     { return FarIntersection_; };
00141
00142     ///
00143     virtual inline HomgPoint2D& GetCloseIntersectionWithImageBorder()
00144     { return CloseIntersection_; };
00145
00146     ///
00147     virtual inline HomgPoint2D GetCopyOfFarIntersectionWithImageBorder() const
00148     { return FarIntersection_; };
00149
00150     ///
00151     virtual inline HomgPoint2D GetCopyOfCloseIntersectionWithImageBorder()const
00152     { return CloseIntersection_; };
00153
00154     virtual inline enum TEdge GetFarEdge() const
00155     { return FarEdge_; };
00156
00157     virtual inline enum TEdge GetCloseEdge() const
00158     { return CloseEdge_; };
00159
00160     virtual inline unsigned int GetImageWidth() const
00161     { return Width_; };
00162
00163     virtual inline unsigned int GetImageHeight() const
00164     { return Height_; };
00165
00166     virtual inline enum HomgPoint2D::EPosition GetEpipolePosition() const
00167     { return EpipolePosition_; };
00168
00169     /** returns next line with maximal possible distance without pixel loss */
00170     virtual void GetNextLine(bool clockwise, EpipolarLine& next,
00171                              double dist=1.0);
00172
00173     /** assumes that data_ is already set
00174         @author woelk
00175         @return 0 on success, -1 on error (line out of image) */
00176     int Recalc(unsigned int width, unsigned int height,
00177                HomgPoint2D& epipole, enum HomgPoint2D::EPosition epos);
00178
00179     /** assumes Width, Height_, data_ and Epipole_ are set correct before
00180         @author woelk
00181         @return 0 on success, -1 on error (line out of image) */
00182     int Recalc();
00183
00184     virtual void Init(unsigned int width, unsigned int height,
00185                       HomgPoint2D& epipole, HomgPoint2D& otherpoint,
00186                       enum HomgPoint2D::EPosition epos);
00187
00188     /** initialize epipolar line with the two endpoints */
00189     virtual void Init(unsigned int width, unsigned int height,
00190                       HomgPoint2D& epipole, HomgPoint2D& otherpoint);
00191
00192     /** scans epipolar line using bresenham, midpint alg. and 8-way symmetry
00193         using minimal necessairy pixel step
00194         fills resulting linear interpolated pixels values in Destination
00195         allocates Destination if NULL to necessairy size
00196         sets length to length of Destination
00197         Destination is filled from ROffset on, only if Destination != NULL
00198         assumes that HomgLine2D::Vector3<double>::data_ is set
00199         @return distance image-epipole on ep. line, negative value if error
00200         @author Felix Woelk */
00201     //    template <class PixelType>
00202     //    double ScanLine(Image<PixelType>& source, HomgPoint2D& epipole,
00203     //            double ROffset, unsigned int& length,
00204     //            PixelType *Destination, bool forward);
00205     // cannot betemplated because virtual function templates are not allowed
00206     virtual double ScanLine(Image<unsigned char>& source,
00207                             HomgPoint2D& epipole,
00208                             enum HomgPoint2D::EPosition epos, double RMin,
00209                             double RMax,
00210                             bool forward, unsigned int& length,
00211                             unsigned char* Destination);
00212
00213     /** draws (*this) into image (only from Pinf to epipole*/
00214     template <class PixelType>
00215     void Draw(Image<PixelType>& im);
00216
00217     /** draws infinite line in image, not stopping at epipole */
00218     template <class PixelType>
00219     void DrawWhole(Image<PixelType>& im);
00220
00221   protected:
00222     HomgPoint2D Epipole_;
00223     enum HomgPoint2D::EPosition EpipolePosition_;
00224     HomgPoint2D PInfinity_;
00225     enum HomgPoint2D::EPosition PInfinityPosition_;
00226
00227     enum TLineType Type_;
00228     int Width_; // width of image
00229     int Height_; // height of image
00230     double Angle_;  // angle of edge (-pi, pi]
00231     double DeltaR_; // distance on line resulting from step = 1 on x axis
00232     HomgPoint2D FarIntersection_; // intersection with close image border
00233     HomgPoint2D CloseIntersection_; // intersection with far image border
00234     enum TEdge FarEdge_, CloseEdge_; //
00235     double RMinLine_, RMaxLine_; // range for r values for this line
00236     // distance rectified image border, image
00237     unsigned int ROffset_;
00238     unsigned int Length_;
00239     // steps resulting in step=1 on epipolarline, always positive
00240     // for transformed line
00241     double dx_, dy_;
00242     EightWaySymmetryHomg Sym_;
00243     // just for drawing
00244     bool SearchOverInf_;
00245
00246     // used for modified bresenham
00247     HomgPoint2D Current_;
00248     HomgPoint2D TransformedStart_, TransformedEnd_;
00249     HomgPoint2D TransformedCurrent_;
00250     HomgPoint2D Start_, End_;
00251
00252     //    template <class PixelType>
00253     //    double ScanLine_(Image<PixelType>& source, double ROffset,
00254     //             unsigned int& length, PixelType *Destination, bool forward);
00255     virtual double ScanLine_(Image<unsigned char>& source,
00256                              unsigned int ROffset,
00257                              unsigned int& length, unsigned char *Destination,
00258                              bool forward);
00259     virtual void CalcTransformed_();
00260
00261     bool DetermineIntersectionsAndEpipoleDistances_(HomgPoint2D& point);
00262
00263     virtual void Interpolate_(enum TLineType& type, unsigned char **ida,
00264                               int& x, int& y, double& g,
00265                               unsigned char& result);
00266   };
00267
00268
00269
00270 } // namespace
00271
00272 // the following is used in DetermineStartEnd_
00273 struct TIntersect {
00274   enum TEdge Edge;
00275   BIAS::HomgPoint2D Point;
00276   bool IntersectsInImage;
00277   double EpipoleDistance;
00278 };
00279
00280 // the following is used in DetermineStartEnd_
00281 int CompIntersect(const void *left, const void *right);
00282
00283 #endif // __EPIPOLARLINE_HH__
00284
00285
00286
00287
00288
00289
00290
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Erosion.cpp Source File

Filter

Erosion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 #include "Erosion.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 template <class InputStorageType, class OutputStorageType>
00033 int Erosion<InputStorageType, OutputStorageType>::
00034 Erode(const Image<InputStorageType>& Source,
00035       Image<OutputStorageType>& Destination,
00036       int KernelSize) {
00037   if (Destination.IsEmpty()) {
00038     Destination.Init(Source.GetWidth(), Source.GetHeight(),
00039                      Source.GetChannelCount());
00040     Destination.SetColorModel(ImageBase::CM_Grey);
00041   }
00042 #ifdef BIAS_BOUNDS_CHECK
00043   if (Source.GetChannelCount() !=1)
00044     BIASERR("Erosion<StorageType>::Dilate() only implemented for grey images");
00045   if (! Source.SamePixelAndChannelCount(Destination))
00046     BIASERR("Erosion<StorageType>::Dilate()  wrong images sizes");
00047   if (KernelSize % 2 != 1)
00048     BIASERR("Erosion<StorageType>::Dilate()  odd KernelSize required");
00049 #endif
00050
00051   int Width = Source.GetWidth();
00052   int Height = Source.GetHeight();
00053   register int HalfKernelSize = (KernelSize - 1) / 2;
00054   register OutputStorageType **DestArray = Destination.GetImageDataArray();
00055   register InputStorageType **SourceArray = Source.GetImageDataArray();
00056
00057   // loop
00058   for (register int y = HalfKernelSize;
00059        y < (Height - HalfKernelSize); y++) {
00060     for (register int x = HalfKernelSize;
00061          x < (Width - HalfKernelSize); x++) {
00062       DestArray[y][x] = SourceArray[y][x];
00063       for (register int ky = -HalfKernelSize; ky <= HalfKernelSize; ky++)
00064         for (register int kx = -HalfKernelSize; kx <= HalfKernelSize; kx++)
00065           if ( (DestArray[y][x]==0) || (SourceArray[y+ky][x+kx]==0) )
00066             DestArray[y][x] = 0;
00067     }
00068   }
00069
00070   // fill borders with zero
00071   FillBorderConst(Destination, (unsigned short int)HalfKernelSize,
00072                   (unsigned short int)HalfKernelSize, (OutputStorageType)0);
00073   return 0;
00074 }
00075
00076
00077
00078 template <class InputStorageType, class OutputStorageType>
00079 int Erosion<InputStorageType, OutputStorageType>::
00080 Erode3Fast(const Image<InputStorageType>& src,
00081            Image<OutputStorageType>& dest,
00082            bool Neighbor4) {
00083 #ifdef BIAS_BOUNDS_CHECK
00084   if ((src.GetChannelCount() !=1) || (dest.GetChannelCount() !=1)) {
00085     BIASERR("Erosion<StorageType>::Erode3Fast()  only implemented for grey images");
00086     return -1;
00087   }
00088   if (src.GetPixelCount()<25) {
00089     BIASERR("Erosion<StorageType>::Erode3Fast(): src has less than 25 pixel");
00090     return -2;
00091   }
00092   if ( (src.GetHeight()<5) || (src.GetWidth() < 5)) {
00093     BIASERR("Erosion<StorageType>::Erode3Fast(): src has less than 5 cols or rows");
00094     return -3;
00095   }
00096   if (src.GetPixelCount() != dest.GetPixelCount()) {
00097     BIASERR("Erosion<StorageType>::Erode3Fast(): src and dest have different sizes");
00098     return -3;
00099   }
00100 #endif
00101   // copy src to dest
00102   //  memcpy(dest.GetImageData() , src.GetImageData(),
00103   //     src.GetPixelCount() * sizeof(StorageType));
00104   memset(dest.GetImageData(),0,src.GetPixelCount()*sizeof(OutputStorageType));
00105   register OutputStorageType *d=dest.GetImageDataArray()[1]+1;
00106   register InputStorageType *p1=src.GetImageDataArray()[0];
00107   register InputStorageType *p2=p1+1, *p3 = p2+1;
00108   register InputStorageType *p4=src.GetImageDataArray()[1];
00109   register InputStorageType *p5 = p4+1, *p6=p5+1;
00110   register InputStorageType *p7 =src.GetImageDataArray()[2];
00111   register InputStorageType *p8 = p7+1, *p9=p8+1;
00112   register InputStorageType *last=&(src.GetImageData()[src.GetPixelCount()-1]);
00113   if (Neighbor4) {
00114     while (p8<last) {
00115       if (*p5 != 0)
00116         if (*p2!=0)
00117           if (*p4!=0)
00118             if (*p6!=0)
00119               if (*p8!=0)
00120                 *d=*p5;
00121       p2++; p4++; p5++; p6++; p8++; d++;
00122     }
00123   } else {
00124     while (p9<=last) {
00125       if (*p5 != 0)
00126         if (*p1!=0)
00127           if (*p2!=0)
00128             if (*p3!=0)
00129               if (*p4!=0)
00130                 if (*p6!=0)
00131                   if (*p7!=0)
00132                     if (*p8!=0)
00133                       if (*p9!=0)
00134                         *d=*p5;
00135       p1++; p2++; p3++; p4++; p5++; p6++; p7++; p8++; p9++; d++;
00136     }
00137   }
00138   //// set border to zero
00139   // top and bottom
00140   register OutputStorageType *o1, *o9, *o2, *olast;
00141   o1 = dest.GetImageDataArray()[0];
00142   o9 = dest.GetImageDataArray()[dest.GetHeight()-1];
00143   olast=
00144     &(dest.GetImageData()[(dest.GetPixelCount()-1)*dest.GetChannelCount()]);
00145   while (o9<=olast) {
00146     *o1=0; *o9=0;
00147     o1++; o9++;
00148   }
00149   //  left and right
00150   register int offset = dest.GetWidth()*dest.GetChannelCount();
00151   o1 = dest.GetImageData();
00152   o2 = o1+offset-1;
00153   while (o2<=olast) {
00154     *o1=0; *o2=0;
00155     o1+=offset; o2+=offset;
00156   }
00157   return 0;
00158 }
00159
00160 template <class InputStorageType, class OutputStorageType>
00161 int Erosion<InputStorageType, OutputStorageType>::
00162 Filter(const Image<InputStorageType>& src,
00163        Image<OutputStorageType>& dst) {
00164   if (src.GetChannelCount()!=1) {
00165     BIASERR("Erosion only for 1 channel images");
00166     return -1;
00167   }
00168   if (*_FilterBorderHandling==TBH_valid) {
00169     if (*kernelSize_==3) {
00170       if ( (dst.IsEmpty()) || (! src.SamePixelAndChannelCount(dst)) )
00171         dst=src;
00172       Erode3Fast(src,dst,false);
00173       dst.GetROI()->SetCorners(1,1,dst.GetWidth()-2,dst.GetHeight()-2);
00174     } else {
00175       Erode(src,dst,*kernelSize_);
00176       dst.GetROI()->SetCorners(1,1,dst.GetWidth()-2,dst.GetHeight()-2);
00177     }
00178   } else if  (*_FilterBorderHandling==TBH_same) {
00179     Image<InputStorageType> tmp;
00180     tmp.Init(src.GetWidth()+ int(*kernelSize_/2)*2,
00181              src.GetHeight()+ int(*kernelSize_/2)*2,1);
00182     tmp.FillImageWithConstValue(InputStorageType(0));
00183     tmp.GetROI()->SetCorners(*kernelSize_/2 ,*kernelSize_/2 ,
00184                tmp.GetWidth()-(*kernelSize_/2),
00185                tmp.GetHeight()-(*kernelSize_/2));
00186     tmp.Paste2ROI(src);
00187     dst.Release();
00188     Erode(tmp,dst,*kernelSize_);
00189     dst.GetROI()->SetCorners(*kernelSize_/2 ,*kernelSize_/2 ,
00190                tmp.GetWidth() -(*kernelSize_/2),
00191                tmp.GetHeight()-(*kernelSize_/2));
00192     dst.Cut2ROI();
00193   } else {
00194     BIASERR("borderhandling not implemnted/");
00195     return -1;
00196   }
00197   return 0;
00198 }
00199
00200 template <class InputStorageType, class OutputStorageType>
00201 void Erosion<InputStorageType, OutputStorageType>::
00202 GetBordersValid_(int& /*border_x*/, int& /*border_y*/) const
00203 {
00204   BIASERR("no parameter support");
00205   BIASABORT;
00206 }
00207
00208
00209 //////////////////////////////////////////////////////////////////////////
00210 //                 instantiation
00211 //////////////////////////////////////////////////////////////////////////
00212 #define FILTER_INSTANTIATION_CLASS Erosion
00213 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Erosion.hh Source File

Filter

Erosion.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _BIAS_MOPRH_EROSION_HH_
00025 #define _BIAS_MOPRH_EROSION_HH_
00026 #include "./Morphology.hh"
00027
00028 namespace BIAS {
00029   /** @class Erosion
00030       @ingroup g_filter
00031       @brief Erosion operator for binary images (black and white)
00032
00033       Erosion sets all pixel to 0, which have a neighboring zero pixel
00034       Fastest ist TBH_valid and kernelsize=3
00035       or call Erode3Fast() directly.
00036       @author grest, Oct. 2004
00037   */
00038
00039   template <class InputStorageType, class OutputStorageType>
00040   class BIASFilter_EXPORT Erosion
00041     : public Morphology<InputStorageType, OutputStorageType>
00042   {
00043   public:
00044     Erosion() {};
00045     virtual ~Erosion() {};
00046
00047     /** Does the erosion. ROI ignored, but set if TBH_valid
00048      */
00049     virtual int Filter(const Image<InputStorageType>& src,
00050                        Image<OutputStorageType>& dst);
00051
00052     /** Very fast erode with 3x3 mask, all values, which are not
00053         not zero, are treated as foreground.
00054         The border of one pixel is always deleted (set to zero).
00055         default is 8-neighborhood. <br>
00056         src and dest must NOT be the same, and dest must be initialized correctly
00057         @author Daniel Grest, Sept. 2002
00058         @status tested */
00059     int Erode3Fast(const Image<InputStorageType>& src,
00060                    Image<OutputStorageType>& dest,
00061                    bool Neighbor4=false);
00062
00063     /** erode with square kernel filled with 255
00064         @author Felix Woelk (24/04/2002)
00065         @status alpha */
00066     int Erode(const Image<InputStorageType>& Source,
00067               Image<OutputStorageType>& Destination, int KernelSize=3);
00068
00069   protected:
00070     virtual void GetBordersValid_(int& border_x, int& border_y) const;
00071
00072
00073     using Morphology<InputStorageType, OutputStorageType>::_FilterBorderHandling;
00074     using Morphology<InputStorageType, OutputStorageType>::TBH_valid;
00075     using Morphology<InputStorageType, OutputStorageType>::TBH_same;
00076     using Morphology<InputStorageType, OutputStorageType>::TBH_full;
00077     using Morphology<InputStorageType, OutputStorageType>::kernelSize_;
00078
00079
00080
00081   };
00082
00083 } // namespace
00084 #endif
00085
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Error.hh Source File

Base » Debug

Error.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIASERROR_HH__
00027 #define __BIASERROR_HH__
00028
00029
00030 /**
00031 DEPRECATED macros:
00032 - unused in BIAS and MIP and conflict with THROW macro from OpenEXR. (Jan Woetzel 2005/09/06)
00033 - THROW, THROW_LIST
00034 - DEF_EXCEPTIONS
00035 - BIAS_CHECK_NAN
00036 */
00037
00038
00039
00040 // Jan Woetzel
00041 #include "bias_config.h"
00042
00043 // assertions are also switched of if NDEBUG is defined
00044 #include <assert.h>
00045 #include <iostream>
00046 #include <sstream>
00047 #include <string>
00048 /// exit, abort, EXIT_FAILURE,
00049 #include <stdlib.h>
00050 // required for BIASABORT and BIASEXIT macros (jw)
00051 #ifdef WIN32
00052 #  include <Base/Debug/biasabort.hh>
00053 #  include <Base/Debug/biasexit.hh>
00054 #endif // WIN32
00055
00056 #ifdef WIN32
00057 #  include <windows.h> // required for OutputDebugString (jw)
00058 #endif
00059
00060
00061
00062 #ifndef ERROR_STREAM
00063 #  ifdef WIN32
00064 //   only cout goes to simple W32 console directly (without rdbuf etc.) (JW)
00065 #    define ERROR_STREAM std::cout
00066 #  else // WIN32
00067 //   cout and cout goes to console on Linux
00068 #    define ERROR_STREAM std::cerr
00069 #  endif // WIN32
00070 #endif // ERROR_STREAM
00071
00072
00073
00074 /** @brief macro to display the complete function name a line of code belongs to.
00075 See MSDN or g++ docu for details.
00076 Works with g++ 3.3 and MS Visual Studo 7.1
00077 @author Jan Woetzel */
00078 #ifdef WIN32
00079 #  define FUNCNAME  __FUNCTION__
00080 #else // WIN32
00081 #  define FUNCNAME  __PRETTY_FUNCTION__
00082 #endif // WIN32
00083
00084
00085
00086 /** set a breakpoint programmatically
00087 This code is handled as a breakpoint exception.
00088 Thus a messagebox will pop up where you can choose
00089 - to "break" (which means use this like a normal breakpoint)
00090 - or "ignore" to continue skipping the breakpoint.
00091 Depends on BIAS_DEBUg and not _DEBUG,
00092 thus works for Debug *and* Release build!
00093 Useful to set a breakpoint in code,
00094 e.g. in addition to an exit or failure return
00095 for MS VS IDE Debugging. VS 71 debugger
00096 see http://www.highprogrammer.com/alan/windev/visualstudio.html
00097 and http://msdn2.microsoft.com/en-us/library//f408b4et.aspx
00098 @author Jan Woetzel */
00099 #if defined(BIAS_DEBUG) && defined(WIN32) && defined(_MSC_VER)
00100 //#include <intrin.h>
00101 //#  define BIASBREAK __asm { int 3 }
00102 #  define BIASBREAK __debugbreak()
00103 #else
00104 #  define BIASBREAK
00105 #endif
00106
00107
00108
00109 /** @brief macro for error handling
00110 Puts message in Debug mode to a destination and adds file+line for "click+jump" in Xemacs on Linux and Visual Studio on Windows.
00111 - The output s written to cerr
00112 - *AND* DebugConsole on WIN32
00113 - thus you can click and jump to code.
00114 In particular you can start main *and* WinMain applications in VS71 debugger and click directly in the "output window" to jump to code.
00115 No output is generated on Release compilation to maximize speed.
00116 The name of the temporary stringstream has to be unique due to the scope !!!
00117 @author Jan Woetzel  */
00118 #if defined(BIAS_DEBUG) && defined(WIN32)
00119
00120 #  define BIASERR(arg) { \
00121   ERROR_STREAM<<std::flush<<"Error in "<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<std::endl \
00122   <<"\t"<<arg<<std::endl<<std::flush; \
00123   std::stringstream ss_BIASERR_unique4713; \
00124   ss_BIASERR_unique4713<<std::endl<<__FILE__<<"("<<__LINE__<<") : "<<FUNCNAME<<std::endl \
00125   <<"\tBIAS Error: "<<arg<<std::endl; \
00126   OutputDebugString( ss_BIASERR_unique4713.str().c_str() ); \
00127 }
00128
00129 /** macro for warning msg. including file+line for click and jump
00130 The temporaries require unique names due to the scope limitation.
00131 @author Jan Woetzel */
00132 #  define BIASWARN(arg) { \
00133   ERROR_STREAM<<std::flush<<"Warning in "<<__FILE__<<":"<<__LINE__<<" :"<<std::endl \
00134   <<"\t"<<arg<<std::endl<<std::flush; \
00135   std::stringstream ss_BIASWARN_unique4193; \
00136   ss_BIASWARN_unique4193<<std::endl<<__FILE__<<"("<<__LINE__<<") : "<<std::endl \
00137   <<"\tBIAS Warning: "<<arg<<std::endl; \
00138   OutputDebugString( ss_BIASWARN_unique4193.str().c_str() ); \
00139 }
00140
00141 #else // defined(BIAS_DEBUG) && defined(WIN32)
00142
00143 // all other: output format for Emacs click and jump (JW)
00144 #  define BIASERR(arg) { \
00145   ERROR_STREAM<<std::flush<<"Error in "<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<"\n" \
00146   <<"\t"<<arg<<std::endl<<std::flush; \
00147 }
00148
00149 #  define BIASWARN(arg) { \
00150   ERROR_STREAM<<std::flush<<"Warning in "<<__FILE__<<":"<<__LINE__<<" :\n\t" \
00151   <<"\t"<<arg<<std::endl<<std::flush; \
00152 }
00153
00154 #endif // defined(BIAS_DEBUG) && defined(WIN32)
00155
00156
00157
00158 /** Issue a warning only once and only in debug mode at runtime.
00159 Avoids flooding with warning noise.
00160 Particularly useful to issue a runtime warning in an inner loop.
00161 @author Jan Woetzel */
00162 #if defined (BIAS_DEBUG) && defined(WIN32)
00163
00164 #  define BIASWARNONCE(arg) { \
00165   static bool _oncerun_BIASWARNONCE_localscope_=false;\
00166   if (!_oncerun_BIASWARNONCE_localscope_) { \
00167     ERROR_STREAM<<std::flush<<"Warning once in "<<__FILE__<<":"<<__LINE__<<" :"<<std::endl \
00168     <<"\t"<<arg<<std::endl<<std::flush; \
00169     std::stringstream ss_BIASWARN_unique4193; \
00170     ss_BIASWARN_unique4193<<std::endl<<__FILE__<<"("<<__LINE__<<") : "<<std::endl \
00171     <<"\tBIAS Warning: "<<arg<<std::endl; \
00172     OutputDebugString( ss_BIASWARN_unique4193.str().c_str() ); \
00173     _oncerun_BIASWARNONCE_localscope_ = true;\
00174   }\
00175 }
00176
00177 #elif defined (BIAS_DEBUG) && !defined(WIN32)
00178
00179 #  define BIASWARNONCE(arg) { \
00180   static bool _oncerun_BIASWARNONCE_localscope_=false;\
00181   if (!_oncerun_BIASWARNONCE_localscope_) { \
00182     ERROR_STREAM<<std::flush<<"Warning once in "<<__FILE__<<":"<<__LINE__<<" :\n\t" \
00183     <<"\t"<<arg<<std::endl<<std::flush; \
00184     _oncerun_BIASWARNONCE_localscope_ = true;\
00185   }\
00186 }
00187
00188 #else // ! BIAS_DEBUG
00189
00190 #  define BIASWARNONCE(arg)
00191
00192 #endif // WIN32
00193
00194
00195 /** macro around new catching exceptions */
00196 #define BIASNEW(arg1,arg2)\
00197   try {arg1= new arg2;} catch (std::bad_alloc){ BIASERR("new failed");};
00198
00199
00200 /** @brief macro to be used instead of abort()
00201 \todo: call MIP::biasabort instead of abort - but this introduces one library dependency.
00202 @author Jan Woetzel **/
00203 #if defined(WIN32) && defined(_MSC_VER)
00204 #define BIASABORT { \
00205   std::cout<<std::flush; std::cerr<<std::flush \
00206   <<__FILE__<<"("<<__LINE__<<") : aborting."<<std::endl<<std::flush; \
00207   std::stringstream ss_BIASABORT_unique_1375; \
00208   ss_BIASABORT_unique_1375<<std::endl \
00209   <<__FILE__<<"("<<__LINE__<<") : aborting."<<std::endl; \
00210   OutputDebugString( ss_BIASABORT_unique_1375.str().c_str() ); \
00211   __debugbreak(); \
00212   BIAS::biasabort(); \
00213 }
00214 #else
00215 #define BIASABORT { \
00216   std::cout<<std::flush; std::cerr<<std::flush \
00217   <<__FILE__<<", "<<__LINE__<<" aborting."<<std::endl<<std::flush; \
00218   abort(); \
00219 }
00220 #endif
00221
00222
00223
00224 /** @brief macro to be used instead of assert()
00225 Expands to output on debug and on release:
00226 -Linux release nothing,
00227 -Windows release: Attention!
00228 Assume that condition holds and let the compiler exploit
00229 this knowledge for optimization.
00230 Be warned: This may unintentionally optimize away your error handling code!
00231 see http://msdn2.microsoft.com/en-us/library//1b3fsfxw.aspx
00232 @author Jan Woetzel **/
00233 #if defined(BIAS_DEBUG) && defined(WIN32) && defined(_DEBUG) && defined(_MSC_VER) && !defined(NDEBUG)
00234 // Windows and Microsoft compiler, break in debugger
00235 #  define BIASASSERT(cond) { \
00236   if (!(cond)) { \
00237   std::cout<<std::flush; \
00238   std::cerr<<std::flush; \
00239   std::cerr \
00240   <<__FILE__<<"("<<__LINE__<<") : BIASASSERT failed. "<<std::endl<<std::flush; \
00241   std::stringstream ss_BIASASSERT_unique_1142; \
00242   ss_BIASASSERT_unique_1142<<std::endl \
00243   <<__FILE__<<"("<<__LINE__<<") : BIASASSERT failed. "<<std::endl; \
00244   OutputDebugString( ss_BIASASSERT_unique_1142.str().c_str() ); \
00245   __debugbreak(); \
00246   }; \
00247   assert(cond); \
00248 }
00249
00250 #elif defined(BIAS_DEBUG) && defined(WIN32) && defined(_DEBUG) && !defined(_MSC_VER) && !defined(NDEBUG)
00251 // Windows - but possibly not Micrsoft compiler, drop __debugbreak
00252 #  define BIASASSERT(cond) { \
00253   if (!(cond)) { \
00254   std::cout<<std::flush; \
00255   std::cerr<<std::flush; \
00256   std::cerr \
00257   <<__FILE__<<"("<<__LINE__<<") : BIASASSERT failed. "<<std::endl<<std::flush; \
00258   std::stringstream ss_BIASASSERT_unique_1142; \
00259   ss_BIASASSERT_unique_1142<<std::endl \
00260   <<__FILE__<<"("<<__LINE__<<") : BIASASSERT failed. "<<std::endl; \
00261   OutputDebugString( ss_BIASASSERT_unique_1142.str().c_str() ); \
00262   }; \
00263   assert(cond); \
00264 }
00265
00266 #elif defined(BIAS_DEBUG) && !defined(WIN32) && !defined(NDEBUG)
00267 // Linux - xemacs output format
00268 #  define BIASASSERT(cond) { \
00269   if (!(cond)) { \
00270   std::cout<<std::flush; \
00271   std::cerr<<std::flush; \
00272   std::cerr \
00273   <<__FILE__<<","<<__LINE__<<" : BIASASSERT failed. "<<std::endl<<std::flush; \
00274   }; \
00275   assert(cond); \
00276 }
00277
00278 ///  to be discussed for opimizing builds - assume conditions hold. (JW)
00279 //#elif !defined(BIAS_DEBUG) && defined(WIN32)
00280 //#  define BIASASSERT(cond) __assume(cond)
00281
00282 #else
00283 #  define BIASASSERT(cond)
00284 #endif
00285
00286
00287 /** @brief macro to be used instead of exit()
00288 @autor Jan Woetzel **/
00289 #if defined(WIN32) && defined(_MSC_VER)
00290 #define BIASEXIT(mesg) { \
00291   std::cerr<<std::flush<<std::endl<<"exit request in "<<__FILE__<<","<<__LINE__<<" : "<<std::endl<<mesg<<std::endl; \
00292   __debugbreak(); \
00293   BIAS::biasexit(EXIT_FAILURE); \
00294 }
00295 #else // WIN32
00296 #define BIASEXIT(mesg) { \
00297   std::cerr<<std::flush<<std::endl<<"exit request in "<<__FILE__<<","<<__LINE__<<" : "<<std::endl<<mesg<<std::endl; \
00298   exit(EXIT_FAILURE); \
00299 }
00300 #endif // WIN32
00301
00302
00303 /** verbose writing calling information to screen in Debug mode.
00304 Typical usage:
00305 \verbatim
00306 void MyClass::MyFunction(...)
00307 {
00308   CALLINFO; ...
00309 }
00310 \endverbatim
00311 @author Jan Woetzel */
00312 #ifdef BIAS_DEBUG
00313 #  define CALLINFO {std::cout<<"called "<<__FILE__<<", "<<__LINE__<<": "<<FUNCNAME<<std::endl<<std::flush;}
00314 #else //BIAS_DEBUG
00315 #  define CALLINFO
00316 #endif // BIAS_DEBUG
00317
00318
00319
00320 /** alias for pthread C interface for mutex locking */
00321 #define BIAS_MUTEX_LOCK(arg)   pthread_mutex_lock(arg);
00322 #define BIAS_MUTEX_UNLOCK(arg) pthread_mutex_unlock(arg);
00323
00324
00325
00326 /** DEPRECATED - JW 12/2005
00327 - unused in BIAS,MIP,S2DT
00328 - bad style, please use templated isnan/isinf etc. */
00329 #define BIAS_CHECK_NAN  BIAS_CHECK_NAN_is_deprecated_because_never_used_see_BIAS_Error_hh
00330
00331
00332 /** DEPRECATED - JW 12/2005
00333 not used  (at least in BIAS,MIP,SCan2DTracking... ) */
00334 /*
00335 //#define DEF_EXCEPTION(theClass, theText) \
00336 //class  theClass : public Exception { theClass() : Exception(theText) {} };
00337 */
00338 //#define DEF_EXCEPTION   DEF_EXCEPTION_is_deprecated_beause_never_used_see_BIAS_Error_hh
00339
00340
00341 /**
00342 not finished... to be continued... (JW)
00343 checked_cast uses fast static_cast in Release build
00344 but checks cast with an ASSERT in Debug.
00345 Typical usage:
00346 class Foo { ...  };
00347 class Bar : public Foo { ...  };
00348 Foo * pFoo = new Bar;
00349 Bar * pBar = checked_cast<Bar *>(pFoo);
00350 see inspiration source:  http://www.highprogrammer.com/alan/windev/visualstudio.html
00351 and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vclrf__try_cast.asp
00352 and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pluslang_Casting_Operators.asp
00353 -- does not (yet) work as expected, furterh work required (JW) --
00354 @author Jan Woetzel 2005 */
00355 /*
00356 //template <class destT, class srcT>
00357 //TypeTo checked_cast(srcT p)
00358 //{
00359 //    BIASASSERT(dynamic_cast<destT>(p));
00360 //    return static_cast<destT>(p);
00361 //};
00362 */
00363
00364 #endif // __BIASERROR_HH__
00365
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EuclideanTransf3D.cpp Source File

Base » Geometry

EuclideanTransf3D.cpp

Go to the documentation of this file.
00001 #include "EuclideanTransf3D.hh"
00002
00003
00004 using namespace BIAS;
00005 using namespace std;
00006
00007 EuclideanTransf3D::EuclideanTransf3D() : Matrix4x4<double>()
00008 {}
00009
00010
00011 EuclideanTransf3D::~EuclideanTransf3D()
00012 {}
00013
00014 void EuclideanTransf3D::Set(RMatrixBase& R, Vector3<double>& t)
00015 {
00016   double *d=GetData();
00017   double *r=R.GetData();
00018   double *td=t.GetData();
00019   d[0]=r[0]; d[1]=r[1]; d[2]=r[2]; d[3]=td[0];
00020   d[4]=r[3]; d[5]=r[4]; d[6]=r[5]; d[7]=td[1];
00021   d[8]=r[6]; d[9]=r[7]; d[10]=r[8]; d[11]=td[2];
00022   d[12]=d[13]=d[14]=0.0; d[15]=1.0;
00023 }
00024
00025 void EuclideanTransf3D::SetXYZ(Vector3<double>& EulerAng, Vector3<double>& t)
00026 {
00027   RMatrixBase R;
00028   R.SetXYZ(EulerAng[0], EulerAng[1], EulerAng[2]);
00029   Set(R, t);
00030 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/EuclideanTransf3D.hh Source File

Base » Geometry

EuclideanTransf3D.hh

Go to the documentation of this file.
00001 #ifndef __EuclideanTransf3D_hh__
00002 #define __EuclideanTransf3D_hh__
00003
00004 #include "Base/Math/Matrix4x4.hh"
00005 #include "Base/Math/Vector3.hh"
00006 #include "Base/Geometry/RMatrixBase.hh"
00007
00008 namespace BIAS {
00009
00010   /** @class EuclideanTransf3D
00011       @ingroup g_geometry
00012       @brief Euclidean transformation for 3D points
00013       @author woelk 08/2004 */
00014   class BIASGeometryBase_EXPORT EuclideanTransf3D : public Matrix4x4<double>
00015   {
00016   public:
00017     EuclideanTransf3D();
00018     ~EuclideanTransf3D();
00019
00020     void Set(RMatrixBase& R, Vector3<double>& t);
00021
00022     void SetXYZ(Vector3<double>& EulerAng, Vector3<double>& t);
00023
00024   protected:
00025
00026
00027   }; // class
00028
00029 } // namespace
00030
00031
00032
00033 #endif // __EuclideanTransf3D_hh__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/Example7Point.cpp Source File

Geometry » Examples

Example7Point.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 #include <Geometry/FMatrixEstimation.hh>
00028 #include <MathAlgo/SVD.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034 typedef vector<HomgPoint2D> PointVector;
00035
00036 void
00037 loadFlowVectors(char* filename, PointVector& match1,
00038         PointVector& match2)
00039 {
00040   match1.clear();
00041   match2.clear();
00042   FILE *stream;
00043   stream = fopen ( filename , "rb" );
00044   char buffer[256];
00045   float x1, y1, w1, x2, y2, w2;
00046   bool done=false;
00047   while (!done)
00048     {
00049       fgets(buffer, 256, stream);
00050       if (buffer[0] == '#' || buffer[0] == '\n') continue; //commentary
00051       if (feof(stream)) {
00052           done=true;
00053           break;
00054       }
00055       sscanf(buffer, "%f %f %f %f %f %f \n", &x1, &y1, &w1, &x2, &y2, &w2);
00056       match1.push_back(HomgPoint2D(x1, y1, w1));
00057       match2.push_back(HomgPoint2D(x2, y2, w2));
00058     }
00059   fclose(stream);
00060 }
00061
00062 int main(int argc, char *argv[])
00063 {
00064   vector<HomgPoint2D> p1, p2;
00065
00066   if (argc>=2){
00067     loadFlowVectors(argv[1], p1, p2);
00068     for (int i=0; i<(int)p1.size(); i++){
00069       cout << p1[i]<<"\t"<<p2[i]<<endl;
00070     }
00071   } else {
00072     cerr << argv[0]<<" pointfile\n";
00073     return -1;
00074   }
00075
00076   vector<FMatrix> Fvec;
00077   FMatrixEstimation fest;
00078
00079   if (fest.SevenPoint(Fvec, p1, p2)!=0){
00080     BIASERR("error estimating F");
00081   }
00082
00083   SVD svd;
00084   for (int i=0; i<(int)Fvec.size(); i++){
00085     svd.Compute(Fvec[i]);
00086     cout << "singular values of "<<i<<"th solution are "
00087          <<svd.GetS()[0]<<"\t"<<svd.GetS()[1]<<"\t"<<svd.GetS()[2]<<endl;
00088   }
00089
00090   return 0;
00091 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleBinomial.cpp Source File

Filter » Examples

ExampleBinomial.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005 Johan Skoglund
00006 skoglund@isy.liu.se
00007 CVL/isy
00008 university of Linköping
00009 sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #include "Filter/Binomial.hh"
00027 #include "Base/Image/ImageIO.hh"
00028 #include <iostream>
00029
00030 #include <Base/Debug/TimeMeasure.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 #define TYPE2 unsigned char
00036
00037
00038 int main(int argc, char *argv[])
00039 {
00040   TimeMeasure timeri, timerf;
00041
00042   if (argc<2) {
00043     cout << "usage: "<<argv[0]<<" <image>\n";
00044     //return -1;
00045     return 0; // for dart test
00046   }
00047
00048   Image<unsigned char> src;
00049   if (ImageIO::Load(argv[1], src)!=0){
00050     cout <<"Error loading "<<argv[1]<<endl;
00051     exit(-1);
00052   }
00053
00054   Image<TYPE2> dst, dst1, dst2, fdiff;
00055
00056   // input image is unsigned char, output is float !
00057   Binomial<unsigned char, TYPE2> theBinomial;
00058
00059   theBinomial.AddDebugLevel(D_CONV_TYPES);
00060   theBinomial.AddDebugLevel(D_WRITE_IMAGES);
00061   theBinomial.AddDebugLevel(D_FILTERBASE_CALLSTACK);
00062   theBinomial.AddDebugLevel(D_CONV_KERNEL);
00063   theBinomial.AddDebugLevel(D_BINOMIAL_KERNEL);
00064
00065   theBinomial.Filter(src, dst);
00066   ImageIO::Write( "auto_filtered", dst);
00067   dst.SetZero();
00068   cout<<"now filtering in int"<<endl;
00069   theBinomial.FilterInt(src, dst1);
00070   ImageIO::Write("int_filtered", dst1);
00071
00072   cout<<"now filtering in float"<<endl;
00073   theBinomial.FilterFloat(src, dst2);
00074   ImageIO::Write("float_fitered", dst2);
00075
00076   bool WantCompare = true;
00077   if (WantCompare) {
00078     TYPE2 fmin, fmax;
00079     fdiff.AbsDiff(dst1, dst2);
00080     fdiff.GetMinMaxPixelValue(fmin, fmax);
00081     cerr << "differences between "<<(double)fmin<<" and "<<(double)fmax<<endl;
00082   }
00083   bool WantTiming = true;
00084   if (WantTiming) {
00085     theBinomial.SetDebugLevel(0);
00086     // warming up
00087     for (int i=0; i<1; i++){
00088       cout<<"now filtering in int"<<endl;
00089       theBinomial.FilterInt(src, dst1);
00090
00091       cout<<"now filtering in float"<<endl;
00092       theBinomial.FilterFloat(src, dst2);
00093     }
00094     cout<<"Now comparing performance..."<<endl<<flush;
00095     // go
00096     for (int i=0; i<1; i++){
00097       timeri.Start();
00098       theBinomial.FilterInt(src, dst1);
00099       timeri.Stop();
00100
00101       timerf.Start();
00102       theBinomial.FilterFloat(src, dst2);
00103       timerf.Stop();
00104     }
00105
00106     cerr << "int took "<<endl;
00107     timeri.Print();
00108
00109     cerr << "float took "<<endl;
00110     timerf.Print();
00111   }
00112   return 0;
00113 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleBresenham.cpp Source File

Base » Image » Examples

ExampleBresenham.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028 #include "Base/Image/ImageIO.hh"
00029 #include "Base/Image/Bresenham.hh"
00030 #include "Base/Image/BresenhamCircle.hh"
00031 #include "Base/Image/ScanLine.hh"
00032 #include "Base/Image/ScanLine2.hh"
00033 #include "Base/Image/Image.hh"
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 int main (int argc, char *argv[])
00039 {
00040   Image<unsigned char> im(200, 200, 1);
00041   unsigned char **ida=im.GetImageDataArray();
00042   int next[2], start[]={10,30}, end[]={120,90}, center[]={100, 100};
00043   int epsilon=4, radius=30;
00044
00045   if (argc==5){
00046     start[0]=atoi(argv[1]);
00047     start[1]=atoi(argv[2]);
00048     end[0]=atoi(argv[3]);
00049     end[1]=atoi(argv[4]);
00050   } else if (argc!=1){
00051     cerr << endl << argv[0] << " [ startx starty endx endy ]" << endl << endl;
00052   }
00053
00054   im.FillImageWithConstValue((unsigned char)0);
00055
00056   BresenhamCircle bcirc(center, radius);
00057
00058
00059   while (bcirc.GetNext(next)){
00060     ida[next[1]][next[0]]=255;
00061   }
00062
00063   center[0]-=5;
00064   center[1]-=5;
00065   BresenhamCircleEighth bce(center, radius);
00066
00067   while (bce.GetNext(next)){
00068     ida[next[1]][next[0]]=255;
00069   }
00070
00071   //ScanLine sl(start, end, epsilon);
00072   ScanLine2 sl(start, end, epsilon);
00073
00074   while (sl.GetNext(next)){
00075     ida[next[1]][next[0]]=255;
00076   }
00077
00078   Bresenham bres(start, end);
00079
00080   while (bres.GetNext(next)){
00081     ida[next[1]][next[0]]=0;
00082   }
00083
00084   ImageIO::Write("bresenham", im);
00085
00086   return 0;
00087 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleBSplineCurve.cpp Source File

MathAlgo » Examples

ExampleBSplineCurve.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004, 2005    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Image/ImageDraw.hh>
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Base/Math/Matrix.hh>
00028 #include <Base/Math/Vector.hh>
00029 #include <Base/Math/Vector2.hh>
00030 #include <MathAlgo/BSplineCurve.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 /**
00036    Example draws:
00037    - regular open quadratic bspline into ExampleBSplineCurve0.mip
00038    - regular closed quadratic bspline into ExampleBSplineCurve1.mip
00039    - regular open cubic bspline into ExampleBSplineCurve2.mip
00040    - regular closed cubic bspline into ExampleBSplineCurve3.mip
00041  */
00042
00043 BIAS::Image<unsigned char> img;
00044 unsigned int imgCounter=0;
00045 unsigned char value[1];
00046
00047
00048 void drawQuadratic(BIAS::BSplineCurve bspline){
00049   img.FillImageWithConstValue(value);
00050   double t=0;
00051   double d=0.01;//stepsize
00052   Vector2<double> tmp;//remember last result
00053   Vector2<double> res;
00054
00055   bspline.QuadraticUniformBSpline(res,t);//first result
00056   tmp=res;
00057   t+=d;
00058   while(t<1.+d){
00059     bspline.QuadraticUniformBSpline(res,t);
00060     ImageDraw<unsigned char>::Line(img,(unsigned int)tmp[0],
00061                                    (unsigned int)tmp[1],
00062                                    (unsigned int)res[0],
00063                                    (unsigned int)res[1],
00064                                    255);
00065     tmp=res;
00066     t+=d;
00067   }
00068   char title[255];
00069   sprintf(title, "ExampleBSplineCurve%01i.mip",imgCounter++);
00070   BIAS::ImageIO::Write(title, img);
00071 }
00072
00073 void drawCubic(BIAS::BSplineCurve bspline){
00074   img.FillImageWithConstValue(value);
00075   double t=0;
00076   double d=0.01;//stepsize
00077   Vector2<double> tmp;//remember last result
00078   Vector2<double> res;
00079
00080   bspline.CubicUniformBSpline(res,t);//first result
00081   tmp=res;
00082   t+=d;
00083   while(t<1.+d){
00084     bspline.CubicUniformBSpline(res,t);
00085     ImageDraw<unsigned char>::Line(img,(unsigned int)tmp[0],
00086                                    (unsigned int)tmp[1],
00087                                    (unsigned int)res[0],
00088                                    (unsigned int)res[1],
00089                                    255);
00090     tmp=res;
00091     t+=d;
00092   }
00093   char title[255];
00094   sprintf(title, "ExampleBSplineCurve%01i.mip",imgCounter++);
00095   BIAS::ImageIO::Write(title, img);
00096 }
00097
00098
00099 //int main(int args, char * argv[])
00100 int main()
00101 {
00102   //prepage image for dawing
00103   value[0]=0;
00104   img.Init(400,400);
00105   img.FillImageWithConstValue(value);
00106
00107   //bspline constructor
00108   BSplineCurve bsplineQuadraticOpen,bsplineQuadraticClosed,
00109     bsplineCubicOpen,bsplineCubicClosed;
00110
00111   //set controlpoints for simple open bspline (cubic and quadratic)
00112   std::vector<BIAS::Vector2<double> > cPnt;
00113   BIAS::Vector2<double> item;
00114   item[0]=200.;
00115   item[1]=150.;
00116   cPnt.push_back(item);
00117   item[0]=100.;
00118   item[1]=100.;
00119   cPnt.push_back(item);
00120   item[0]=100.;
00121   item[1]=200.;
00122   cPnt.push_back(item);
00123   item[0]=200.;
00124   item[1]=300.;
00125   cPnt.push_back(item);
00126   item[0]=200.;
00127   item[1]=300.;
00128   cPnt.push_back(item);
00129   item[0]=300.;
00130   item[1]=200.;
00131   cPnt.push_back(item);
00132   item[0]=300.;
00133   item[1]=100.;
00134   cPnt.push_back(item);
00135   item[0]=200.;
00136   item[1]=150.;
00137   cPnt.push_back(item);
00138   item[0]=200.;
00139   item[1]=200.;
00140   cPnt.push_back(item);
00141   bsplineQuadraticOpen.SetControlPoints(cPnt);
00142   bsplineCubicOpen.SetControlPoints(cPnt);
00143
00144
00145   //set controlpoints for simple closed bspline
00146   //cPnt[n],cPnt[0],...,cPnt[n],cPnt[0] //quadratic case
00147   //cPnt[n],cPnt[0],...,cPnt[n],cPnt[0],cPnt[1] //cubic case
00148   cPnt.clear();
00149   item[0]=200.;
00150   item[1]=200.;
00151   cPnt.push_back(item);
00152   item[0]=200.;
00153   item[1]=150.;
00154   cPnt.push_back(item);
00155   item[0]=100.;
00156   item[1]=100.;
00157   cPnt.push_back(item);
00158   item[0]=100.;
00159   item[1]=200.;
00160   cPnt.push_back(item);
00161   item[0]=200.;
00162   item[1]=300.;
00163   cPnt.push_back(item);
00164   item[0]=200.;
00165   item[1]=300.;
00166   cPnt.push_back(item);
00167   item[0]=300.;
00168   item[1]=200.;
00169   cPnt.push_back(item);
00170   item[0]=300.;
00171   item[1]=100.;
00172   cPnt.push_back(item);
00173   item[0]=200.;
00174   item[1]=150.;
00175   cPnt.push_back(item);
00176   item[0]=200.;
00177   item[1]=200.;
00178   cPnt.push_back(item);
00179   item[0]=200.;
00180   item[1]=150.;
00181   cPnt.push_back(item);
00182   bsplineQuadraticClosed.SetControlPoints(cPnt);
00183   item[0]=100.;
00184   item[1]=100.;
00185   cPnt.push_back(item);
00186   bsplineCubicClosed.SetControlPoints(cPnt);
00187
00188   //init bsplines (compute coefficient matrices for segments)
00189   bsplineQuadraticOpen.InitQuadraticUniformBSpline();
00190   bsplineQuadraticClosed.InitQuadraticUniformBSpline();
00191   bsplineCubicOpen.InitCubicUniformBSpline();
00192   bsplineCubicClosed.InitCubicUniformBSpline();
00193
00194
00195   //draw open quadratic bspline into ExampleBSplineCurve0.mip
00196   drawQuadratic(bsplineQuadraticOpen);
00197
00198   //draw closed quadratic bspline into ExampleBSplineCurve1.mip
00199   drawQuadratic(bsplineQuadraticClosed);
00200
00201   //draw open cubic bspline into ExampleBSplineCurve2.mip
00202   drawCubic(bsplineCubicOpen);
00203
00204   //draw closed cubic bspline into ExampleBSplineCurve3.mip
00205   drawCubic(bsplineCubicClosed);
00206   return 0;
00207 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCamera.cpp Source File

Image » Examples

ExampleCamera.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028 #include "Image/Camera.hh"
00029 #include "Base/Image/ImageIO.hh"
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034
00035 int main(int argc, char *argv[])
00036 {
00037   Camera<unsigned char> cam, cam2, cam3;
00038   PMatrix P;
00039   KMatrix K;
00040   RMatrix R;
00041   Projection proj;
00042   R.SetXYZ(0.0, 0.0, 0.0);
00043   Vector3<double> C(1.0, 2.0, 3.0);
00044
00045   cam.Init(640, 480, 1);
00046   cam.FillImageWithXValue();
00047 #ifdef BIAS_DAIMLERCHRYSLER
00048   DC_ptu ptu;
00049   DC_inertial inert;
00050   DC_GPS gps;
00051
00052   ptu.PanPos=1;
00053   ptu.TiltPos=0.56;
00054   ptu.TimeStamp=1234567890;
00055
00056   inert.Set(1.0, 2.0, 3.14, 4.2, 7.2);
00057
00058   gps.Set(7, 1.5, 2.5, 3.5, 4.5, 5.5);
00059
00060   cam.SetPTU(ptu);
00061   cam.SetInertial(inert);
00062   cam.SetGPS(gps);
00063 #endif
00064
00065   K.SetIdentity();
00066   K[0][0]=K[1][1]=100;
00067   K[0][2]=cam.GetWidth()/2.0;
00068   K[1][2]=cam.GetHeight()/2.0;
00069
00070   P.Compose(K, R, C);
00071
00072   if (argc>1) {
00073     cout <<"Reading projection from "<<argv[1]<<endl;
00074     proj.XMLRead(argv[1]);
00075     cam.SetProj(proj);
00076   }
00077   cam.SetP(P);
00078   cam.SetC(C);
00079   cam.SetR(R);
00080   cam.SetK(K);
00081   cam.Setf(0.008); // focal length 8mm
00082
00083   cam.UpdateMetaData();
00084
00085   cout <<endl<< "added meta data to camera: "<<endl;
00086   //cam.PrintAppData(cout);
00087   cam.GetMetaData()->Dump();
00088
00089   if (ImageIO::Write("cam", cam)!=0){
00090     BIASERR("error writing cam.mip");
00091     return -1;
00092   }
00093
00094   if (ImageIO::Read("cam.mip", cam2)!=0){
00095     BIASERR("error reading cam.mip");
00096     return -1;
00097   }
00098
00099   cam2.ParseMetaData();
00100
00101   cout <<endl<< "====== now read from mip: \nC:\n" << cam2.GetC()
00102        << "\nR:\n"<<cam2.GetR()<<"\nK:\n"<<cam2.GetK()
00103        << "\nP:\n"<<cam2.GetP()<<" Projection: "<<  cam2.GetProj()<<endl;
00104   cout <<"==== PrintAppData() from mip ======="<<endl;
00105   cam.PrintAppData(cout);
00106   cerr << "sizeof metadata: "<<cam.GetMetaData()->size()<<endl;
00107   if (ImageIO::ExportImage("cam", cam, ImageIO::FF_pgm)!=0){
00108     BIASERR("error writing cam.pgm");
00109     return -1;
00110   }
00111
00112   if (ImageIO::ImportImage("cam.pgm", cam3)!=0){
00113     BIASERR("error reading cam.pgm");
00114     return -1;
00115   }
00116   cout <<endl<< "now read from pgm:"<<endl;
00117   cam3.SetDebugLevel(cam3.GetDebugLevel() |D_CAMERA_METADATA );
00118   cam3.ParseMetaData();
00119   cam3.GetMetaData()->Dump();
00120   cout <<"My Projection fom pgm: "<<  cam3.GetProj()<<endl;
00121
00122   return 0;
00123 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCameraParam.cpp Source File

Image » Examples

ExampleCameraParam.cpp

Go to the documentation of this file.
00001 #include "Image/CameraParam.hh"
00002 #include "Image/RigParameter.hh"
00003 #include <iostream>
00004 using namespace BIAS;
00005 using namespace std;
00006
00007 int main (int argc, char* argv[])
00008 {
00009   CameraParam cp;
00010   RigParameter rp;
00011
00012 #ifdef BIAS_HAVE_XML2
00013   if (argc<2) {
00014     cout <<"no file given, using some build-in data"<<endl;
00015     cp.SetData_OMNITECH_ORIFL_190_3();
00016   }
00017   else cp.ReadCameraData(argv[1]);
00018
00019   if (argc<3) {
00020     cout <<"no rig file given, using some build-in data"<<endl;
00021     rp.SetData_DummyRig();
00022   } else {
00023     rp.ReadRigData(argv[2]);
00024   }
00025   cp.DebugOut();
00026   cp.WriteCameraData("CamDataTest.xml");
00027   cout <<"CamDataTest.xml created" << endl;
00028   //cp.DebugOut();
00029
00030   CameraParam cp2;
00031   cp2.ReadCameraData("CamDataTest.xml");
00032   cp2.DebugOut();
00033   cp2.WriteCameraData("CamDataTestRewrite.xml");
00034   cout <<"CamDataTestRewrite.xml created" << endl;
00035
00036   rp.WriteRigData("RigDataTest.xml");
00037   cout <<"RigDataTest.xml created" << endl;
00038
00039    RigParameter rp2;
00040    rp2.ReadRigData("RigDataTest.xml");
00041    rp2.WriteRigData("RigDataTestRewrite.xml");
00042    cout <<"RigDataTestRewrite.xml created" << endl;
00043 #endif
00044   return 0;
00045 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleCameraParameter.cpp Source File

VideoSource » Examples

ExampleCameraParameter.cpp

Go to the documentation of this file.
00001
00002 #include "../CameraParameter.hh"
00003
00004 #include <iostream>
00005
00006 using namespace MIP;
00007 using namespace std;
00008
00009 int main(int argc,char** argv){
00010
00011 /*
00012 Very small example of how to use CameraParameter for undistortion.
00013 */
00014
00015     double testx,testy;
00016
00017     // Construct with model name and serial number.
00018     // (see CameraParameter.hh for known cameras/lenses)
00019     //CameraParameter cp("SONY EVI-D31","147094",LENS_SONY_EVID31_BUILTIN);
00020     CameraParameter cp("CAMERA_PTGREY_DRAGONFLY_COLOR","1234XYZ",LENS_PENTAX_CMOUNT_4_8);
00021     // Set specific zoom
00022     cp.setZoom(46.5);
00023
00024     // and get the associated focal length.
00025     cout << cp.getFocalLength() << endl;
00026
00027     // When zoom or focal length was set using setZoom() or setFocalLength(),
00028     // you may now undistort points.
00029     // Note: Points must be Bougouet-normalized (subtract principal point, then
00030     //       divide by focal length)
00031
00032     testx=0.5;
00033     testy=0.5;
00034
00035     cp.undistort(testx,testy);
00036
00037     cout << testx << ", " << testy << endl;
00038
00039     testx=-0.5;
00040     testy=-0.5;
00041     cp.undistort(testx,testy);
00042
00043     cout << testx << ", " << testy << endl;
00044
00045     return 0;
00046 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleChessboard.cpp Source File

Base » Image » Examples

ExampleChessboard.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028 #include <iostream>
00029
00030 #include <Base/Image/ImageBase.hh>
00031 #include <Base/Image/ImageConvert.hh>
00032 #include <Base/Image/ImageIO.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 //int main(int argc, char *argv[])
00038 int main()
00039 {
00040   unsigned int size=2048;
00041   Image<unsigned char> im(size, size, 1);
00042   unsigned int chess_field_size=128;
00043   unsigned int x=0, y=0, c=0, r=0;
00044   unsigned char color=0;
00045   unsigned char **ida=im.GetImageDataArray();
00046
00047
00048
00049   for (y=chess_field_size; y<=im.GetHeight(); y+=chess_field_size){
00050     for (x=chess_field_size; x<=im.GetHeight(); x+=chess_field_size){
00051       if (y==chess_field_size)
00052         color = (color==0) ? (unsigned char)255 : (unsigned char)0;
00053       else
00054         color = (ida[y-chess_field_size-1][x-1]==0) ?
00055           (unsigned char)255 : (unsigned char)0;
00056       for (r=1; r<=chess_field_size; r++){
00057         for (c=1; c<=chess_field_size; c++){
00058           ida[y-r][x-c]=color;
00059         }
00060       }
00061     }
00062   }
00063
00064   if (ImageIO::Write("chessboard", im)!=0){
00065     BIASERR("error writing image ");
00066     return -2;
00067   }
00068
00069   if (ImageIO::ExportImage("chessboard", im, ImageIO::FF_ppm)!=0){
00070     BIASERR("error exporting image ");
00071     return -2;
00072   }
00073
00074   return 0;
00075 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleColorNCC.cpp Source File

Matcher2D » Examples

ExampleColorNCC.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include <iomanip>
00028
00029 #include <Utils/Param.hh>
00030 #include <Base/Image/ImageBase.hh>
00031 #include <Base/Image/ImageConvert.hh>
00032 #include <Base/Image/ImageIO.hh>
00033 #include <Matcher2D/RegionMatcher.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 int demo(unsigned int size) {
00039  Image<unsigned char> im(size, size, 3);
00040   unsigned int chess_field_size=size/8;
00041   unsigned int x=0, y=0, c=0, r=0;
00042   unsigned char **ida=im.GetImageDataArray();
00043   unsigned char red=89,blue=127;
00044
00045   for (x=0;x<im.GetWidth(); x+= chess_field_size) {
00046     //    color = (color==0) ? (unsigned char)255 : (unsigned char)0;
00047     if (red==127) red=89; else red=127;
00048     if (blue==127) blue=25; else blue=127;
00049     for (y=0;y<im.GetHeight(); y+= chess_field_size) {
00050      if (red==127) red=89; else red=127;
00051      if (blue==127) blue=25; else blue=127;
00052       //color = (color==0) ? (unsigned char)255 : (unsigned char)0;
00053       for (r=0; r<chess_field_size; r++)
00054         for (c=0; c<chess_field_size; c++){
00055           ida[y+r][(x+c)*3 + 0]=red;
00056           ida[y+r][(x+c)*3 + 1]=255;
00057           ida[y+r][(x+c)*3 + 2]=blue;
00058         }
00059     }
00060   }
00061
00062   // grey level ncc
00063   Image<unsigned char> imGrey(size,size,1);
00064   ImageConvert::Convert(im,imGrey,ImageBase::CM_Grey);
00065   int n=1;
00066   double result=0;
00067   BIAS::RegionMatcher matcher;
00068   //matcher.SetDebugLevel(D_REGION_MATCHER_COLORNCC);
00069   unsigned int p1[2],p2[2];
00070   p1[0]=chess_field_size; p1[1]= chess_field_size;
00071   for (x=chess_field_size-n;x<=chess_field_size+n;x++) {
00072     for (y=chess_field_size-n;y<=chess_field_size+n;y++) {
00073       p2[0]=x; p2[1]=y;
00074       matcher.NCC(p1, p2,imGrey.GetImageDataArray(),imGrey.GetImageDataArray(),
00075                   3, result);
00076       cout<<"["<<p2[0]<<","<<p2[1]<<"]:"<<setprecision(2)<<result<<" ";
00077     }
00078     cout<<endl;
00079   }
00080   cout<<endl;
00081   Image<unsigned char> imHSV(size,size,3);
00082   ImageConvert::Convert(im,imHSV,ImageBase::CM_hsL);
00083   for (x=chess_field_size-n;x<=chess_field_size+n;x++) {
00084     for (y=chess_field_size-n;y<=chess_field_size+n;y++) {
00085       p2[0]=x; p2[1]=y;
00086       matcher.CNCC(p1, p2,imHSV.GetImageDataArray(),
00087                        imHSV.GetImageDataArray(),
00088                        3, result);
00089
00090       cout<<"["<<p2[0]<<","<<p2[1]<<"]:"<<setprecision(2)<<result<<" ";
00091     }
00092     cout<<endl;
00093   }
00094   if (ImageIO::Write("chessboard", im)!=0){
00095     BIASERR("error writing image ");
00096     return -2;
00097   }
00098  if (ImageIO::Write("chessboardGrey", imGrey)!=0){
00099     BIASERR("error writing image ");
00100     return -2;
00101   }
00102   if (ImageIO::ExportImage("chessboard", im, ImageIO::FF_ppm)!=0){
00103     BIASERR("error exporting image ");
00104     return -2;
00105   }
00106   return 0;
00107 }
00108
00109
00110 int main(int argc, char *argv[])
00111 {
00112   BIAS::Param params;
00113   params.DisableDestructorWarning();
00114   params.AddParamBool("chessBoard",
00115                       "only writes colored chessboard image",false);
00116   params.AddParamInt("winSize","the odd half window size of the CNCC operator",
00117                      5,3,1001,'w');
00118   params.AddParamVecDbl("pos","the position in the image where the CNCC"
00119                         " is applied, if only a single image is given",
00120                         "10 10");
00121   params.AddParamString("image1","the image file name","",'i');
00122   params.AddParamString("image2","the image file name of an optional"
00123                         " second image","",'I');
00124
00125   params.ParseCommandLine(argc,argv);
00126
00127   if ((argc<=1) || params.CheckParam("help")) {
00128     cout<<argv[0]<<" [options] <file1> <file2>"<<endl;
00129     cout<<"CNCC is applied to image1 at the given position(defualt is 10,10)."
00130         <<endl<<" if a second image is given CNCC is applied at every pixel in"
00131       " both images at the same position"<<endl;
00132     params.Usage();
00133     exit(0);
00134   }
00135
00136   unsigned int size=800;
00137   if (*params.GetParamBool("chessBoard"))
00138     exit(demo(size));
00139
00140   Image<unsigned char> im1,im2;
00141   if (ImageIO::Load(*params.GetParamString("image1"),im1)!=0) {
00142     BIASERR("error loading image "<<*params.GetParamString("image1"));
00143     exit (-1);
00144   }
00145   //   if (ImageIO::Load(argv[2],im2)!=0) {
00146   //     BIASERR("error loading image "<<argv[2]);
00147   //     exit (-1);
00148   //   }
00149
00150
00151   Image<unsigned char> imGrey1, imHSV1(im1.GetWidth(),im1.GetHeight(),3),
00152     imGrey2, imHSV2(im2.GetWidth(),im2.GetHeight(),3), imRGB1(im1),imRGB2(im2);
00153   ImageConvert::Convert(im1,imRGB1,ImageBase::CM_RGB);
00154   ImageConvert::Convert(imRGB1,imGrey1,ImageBase::CM_Grey);
00155   ImageConvert::Convert(imRGB1,imHSV1,ImageBase::CM_hsL);
00156
00157   Image<unsigned char> imgGreyRes(imGrey1),imgColorRes(imGrey1);
00158   imgColorRes.FillImageWithConstValue((unsigned char)0);
00159   // copmute NCC for the whole image (except border)
00160   BIAS::RegionMatcher matcher;
00161   //matcher.SetDebugLevel(D_REGION_MATCHER_COLORNCC);
00162   unsigned int winSizeNCC= *params.GetParamInt("winSize");
00163   unsigned char **idaRes=imgColorRes.GetImageDataArray();
00164   BIAS::Vector<double> pos= *params.GetParamVecDbl("pos");
00165   unsigned int x,y,p1[2], p2[2];
00166
00167   double result=0;
00168
00169   if (params.GetParamString("image2")->length()>0) {// second image is given
00170     if (ImageIO::Load(*params.GetParamString("image2"),im2)!=0) {
00171       BIASERR("error loading image "<<*params.GetParamString("image2"));
00172       exit (-1);
00173     }
00174     ImageConvert::Convert(im2,imRGB2,ImageBase::CM_RGB);
00175     ImageConvert::Convert(imRGB2,imGrey2,ImageBase::CM_Grey);
00176     ImageConvert::Convert(imRGB2,imHSV2,ImageBase::CM_hsL);
00177
00178     for (y=winSizeNCC;y<imHSV1.GetHeight()-winSizeNCC-1; y++) {
00179       std::cerr << "Processing ColorNCC " <<
00180         (int)((double)(y-winSizeNCC) /
00181               (double)(imHSV1.GetHeight()-winSizeNCC-1)*100) << "%" << '\r';
00182       for (x=winSizeNCC;x<imHSV1.GetWidth()-winSizeNCC-1; x++) {
00183         p2[0]=x; p2[1]=y;
00184         matcher.CNCC(p2,p2,
00185                      imHSV1.GetImageDataArray(),
00186                      imHSV2.GetImageDataArray(),
00187                      winSizeNCC, result);
00188         if (result<0) result=0;
00189         idaRes[y][x]=(unsigned char)(result*255.0);
00190       }
00191     }
00192     if (ImageIO::Write("resultCNCC",imgColorRes)!=0){
00193       BIASERR("error writing image resultCNCC");
00194       return -2;
00195     }
00196     cout<<"result of Color NCC comparison bewtween image"<<
00197       *params.GetParamString("image1") <<" and "<<
00198       *params.GetParamString("image1") <<" written to"<<
00199       " resultCNCC.mip"<<endl;
00200
00201     // now grey vlaue NCC
00202     for (y=winSizeNCC;y<imHSV1.GetHeight()-winSizeNCC-1; y++) {
00203       std::cerr << "Processing Grey value NCC " <<
00204         (int)((double)(y-winSizeNCC) /
00205               (double)(imHSV1.GetHeight()-winSizeNCC-1)*100) << "%" << '\r';
00206       for (x=winSizeNCC;x<imHSV1.GetWidth()-winSizeNCC-1; x++) {
00207         p2[0]=x; p2[1]=y;
00208         matcher.NCC(p2,p2,
00209                     imGrey1.GetImageDataArray(),
00210                     imGrey2.GetImageDataArray(),
00211                     winSizeNCC, result);
00212         if (result<0) result=0;
00213         idaRes[y][x]=(unsigned char)(result*255.0);
00214       }
00215     }
00216
00217     if (ImageIO::Write("resultNCC",imgColorRes)!=0){
00218       BIASERR("error writing image resultNCC");
00219       return -2;
00220     }
00221     cout<<"result of grey value NCC comparison bewtween image"<<
00222       *params.GetParamString("image1") <<" and "<<
00223       *params.GetParamString("image1") <<" written to"<<
00224       " resultNCC.mip"<<endl;
00225
00226   } else { ///////////////////////////////////////// one image case
00227     p1[0]=(unsigned int)pos[0]; p1[1]=(unsigned int)pos[1];
00228     for (y=winSizeNCC;y<imHSV1.GetHeight()-winSizeNCC-1; y++) {
00229       std::cerr << "Processing ColorNCC " <<
00230         (int)((double)(y-winSizeNCC) /
00231               (double)(imHSV1.GetHeight()-winSizeNCC-1)*100) << "%" << '\r';
00232       for (x=winSizeNCC;x<imHSV1.GetWidth()-winSizeNCC-1; x++) {
00233         p2[0]=x; p2[1]=y;
00234         matcher.CNCC(p1,p2,
00235                      imHSV1.GetImageDataArray(),
00236                      imHSV1.GetImageDataArray(),
00237                      winSizeNCC, result);
00238         if (result<0) result=0;
00239         idaRes[y][x]=(unsigned char)(result*255.0);
00240       }
00241     }
00242
00243     if (ImageIO::Write("resultCNCC",imgColorRes)!=0){
00244       BIASERR("error writing image resultCNCC");
00245       return -2;
00246     }
00247     cout<<"result of Color NCC at "<<pos<<" written to resultCNCC.mip"<<endl;
00248
00249     // now grey vlaue NCC
00250     for (y=winSizeNCC;y<imHSV1.GetHeight()-winSizeNCC-1; y++) {
00251       std::cerr << "Processing Grey value NCC " <<
00252         (int)((double)(y-winSizeNCC) /
00253               (double)(imHSV1.GetHeight()-winSizeNCC-1)*100) << "%" << '\r';
00254       for (x=winSizeNCC;x<imHSV1.GetWidth()-winSizeNCC-1; x++) {
00255         p2[0]=x; p2[1]=y;
00256         matcher.NCC(p1,p2,
00257                     imGrey1.GetImageDataArray(),
00258                     imGrey1.GetImageDataArray(),
00259                     winSizeNCC, result);
00260         if (result<0) result=0;
00261         idaRes[y][x]=(unsigned char)(result*255.0);
00262       }
00263     }
00264
00265     if (ImageIO::Write("resultNCC",imgColorRes)!=0){
00266       BIASERR("error writing image resultNCC");
00267       return -2;
00268     }
00269     cout<<"result of grey value NCC at "<<pos<<
00270       " written to resultNCC.mip"<<endl;
00271   }
00272   //  if (ImageIO::Write("imGrey1",imGrey1)!=0){
00273   //     BIASERR("error writing image imgColorRes");
00274   //     return -2;
00275   //   }
00276
00277   //   winSizeNCC=3;
00278   //   idaRes=imgGreyRes.GetImageDataArray();
00279   //   for (x=winSizeNCC;x<imHSV1.GetWidth()-winSizeNCC; x++) {
00280   //     for (y=winSizeNCC;y<imHSV1.GetHeight()-winSizeNCC; y++) {
00281   //       p1[0]=p2[0]=x; p1[1]=p2[1]=y;
00282   //       matcher.NCC(p1, p2,imGrey1.GetImageDataArray(),
00283   //                        imGrey2.GetImageDataArray(),
00284   //                        winSizeNCC, result);
00285   //       if (result<0) result=0;
00286   //       idaRes[y][x]=(unsigned char)(result*255.0);
00287   //     }
00288   //   }
00289   //   if (ImageIO::Write("imgGreyRes",imgGreyRes )!=0){
00290   //     BIASERR("error writing image imgColorRes");
00291   //     return -2;
00292   //   }
00293   return 0;
00294 }
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleCompare.cpp Source File

Base » Common » Examples

ExampleCompare.cpp

Go to the documentation of this file.
00001 #include <Base/Common/CompareFloatingPoint.hh>
00002 #include <iostream>
00003 #include <limits>
00004
00005 using namespace std;
00006 using namespace BIAS;
00007
00008 int main(){
00009   double l=1.0e-50, r=1e-49;
00010   cout << l<<" == "<<r<<" is "<<boolalpha << Equal(l, r) << endl;
00011   return 0;
00012 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleConic.cpp Source File

Geometry » Examples

ExampleConic.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Geometry/HomgPoint2D.hh>
00027 #include <Geometry/Conic2D.hh>
00028 #include <Base/Image/Image.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Geometry/Quadric3D.hh>
00031 #include <Geometry/PMatrix.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 #define RADIUS 50.0
00037
00038 //int main(int argc, char *argv[])
00039 int main()
00040 {
00041
00042   cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ExampleConic $$$$$$$$$$$$$$$$$$$$$$"
00043        << endl;
00044   PMatrix P_current;
00045   P_current.SetIdentity();
00046
00047   Conic2D Conic, Circle;
00048   HomgPoint2D C(320,240), C2(550,240);
00049   Conic.SetEllipse(C, 35.0 *M_PI/180.0, 180.0, 70);
00050
00051   // ****** intersection of conic and circle *******
00052   for (unsigned int i=0; i<15; i++) {
00053     C2[0] -= 25.0;
00054     Circle.SetEllipse(C2, 0.0, RADIUS, RADIUS);
00055     cout << "Circle center is now at "<<C2<<endl;
00056     if (Conic.IntersectsCircle(C2, RADIUS)) cout << "Intersection :"<<i<<endl;
00057     else cout << "No Intersection !"<<endl;
00058     Image<unsigned char> TestImage(640,480);
00059     TestImage.Clear(200);
00060     Circle.Draw(TestImage);
00061     Conic.Draw(TestImage);
00062     char filename[1000];
00063     sprintf(filename,"testimage%03d",i);
00064     ImageIO::ExportImage(filename,TestImage,ImageIO::FF_pgm);
00065   }
00066
00067
00068   // ********** conic from quadric ****************
00069   HomgPoint3D QC(0,0,20); // quadric center
00070
00071   Vector3<double> S, G_0(1,0,0), H_0(0,1,0), I_0(0,0,1);
00072   BIAS::HomgPoint3D G(QC), H(QC), I(QC);
00073
00074
00075   CovMatrix3x3 Cov;
00076   Cov.SetIdentity();
00077   Cov[0][0] = 100;
00078   Cov[1][1] = 64;
00079
00080   Matrix3x3<double> VT;
00081   Cov.GetPCA(S, VT);
00082   cout <<"Singular values of Cov are "<<S<<endl;
00083
00084
00085   VT = VT.Invert();
00086   // get main axes in wcs
00087   G_0 = VT * G_0; G_0.Normalize();
00088   H_0 = VT * H_0; H_0.Normalize();
00089   I_0 = VT * I_0; I_0.Normalize();
00090
00091     // VT = VT.Transpose();
00092   // BIAS::Vector3<double> D0,D1,D2;
00093   // D0 =  VT.GetRow(0); D0.Normalize();
00094   // D1 =  VT.GetRow(1); D1.Normalize();
00095   // D2 =  VT.GetRow(2); D2.Normalize();
00096
00097   for (unsigned int l=0; l<3; l++) {
00098     G[l] +=  sqrt(S[0]) * G_0[l] * GAUSS3D_CONFIDENCE_99_PERCENT;
00099     H[l] +=  sqrt(S[1]) * H_0[l] * GAUSS3D_CONFIDENCE_99_PERCENT;
00100     I[l] +=  sqrt(S[2]) * I_0[l] * GAUSS3D_CONFIDENCE_99_PERCENT;
00101   }
00102
00103   // G, H and I are now extremal points of the ellipsoid, i.e. they are
00104   // each of them is the farest point from the center in the main dirs
00105
00106
00107   // check if ellipsoid center projects into conic, MUST always be true
00108   Quadric3D TestQ(QC, Cov, GAUSS3D_CONFIDENCE_99_PERCENT );
00109   cout << "Quadric is "<< TestQ << endl;
00110
00111   Conic2D TestC; TestC.SetQuadricProjection(TestQ, P_current);
00112   cout << "Conic is "<<(TestC.IsEllipse()?"an ":"no ")
00113        << "ellipse: "<< TestC << endl;
00114
00115   BIAS::HomgPoint3D *pPoint = &QC;
00116   BIAS::HomgPoint2D Projection;
00117   for (int u=0; u<4; u++) {
00118     switch (u) {
00119     case 0:pPoint = &QC;break;
00120     case 1:pPoint = &G; break;
00121     case 2:pPoint = &H; break;
00122     case 3:pPoint = &I; break;
00123     default:BIASERR("Debug loop out of range !");
00124     }
00125     Projection  = P_current * (*pPoint);
00126     Projection.Homogenize();
00127
00128     double Location = TestQ.LocatePoint(*pPoint);
00129     cout <<"Computing point on quadric ! Location is "<<Location
00130          <<", pointindex[u] is "<<u<<endl;;
00131
00132     Location = TestC.LocatePoint(Projection);
00133     if (Location>DBL_EPSILON) {
00134       BIASERR("Covariance ellipsoid projection: Point["<<u<< "] not in"
00135               <<" projection area !"<<endl<<(*pPoint)<<" -> "
00136               << Projection<<endl<<" Location is "<<Location
00137               <<", Conic is "<<TestC
00138               <<", Covariance matrix is "<< Cov
00139               <<" sigmas are "<<S[0]<<" "<<S[1]<<" "<<S[2]<<endl
00140               <<"Ellipsoid center is at "<< QC);
00141       if (TestC.IsEllipse()) {
00142         BIAS::HomgPoint2D Center;
00143         double dAngle, radius_a, radius_b;
00144         if (TestC.GetEllipseParameters(Center,dAngle,radius_a,radius_b)) {
00145           BIASERR("Ellipse at "<<Center<<" with "<<radius_a<<"/"<<radius_b
00146                   <<" rotated by "<<dAngle/M_PI*180.0
00147                   <<" degrees counterclockwise.");
00148         } else {
00149           BIASERR("Error retrieving explicit ellipse parameters.");
00150         }
00151       } else {
00152         BIASERR("Projection is NO ellipse !");
00153       }
00154     }
00155   }
00156
00157
00158   return 0;
00159 }
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleConstraints.cpp Source File

Base » Debug » Examples

ExampleConstraints.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Debug/Constraints.hh>
00026
00027 using namespace BIAS;
00028 //using namespace std;
00029
00030 class Base {
00031 public:
00032   Base() {}
00033 };
00034
00035 class NonBase {
00036 public:
00037   NonBase() {}
00038 };
00039
00040 class FromBase : public Base {
00041 public:
00042   FromBase() {}
00043 };
00044
00045 // only Ts derived from Base are allowed,
00046 // the check is done at compile time and nopt at runtime
00047 template<class T>
00048 class MyTemplate
00049   : public DerivedFrom<T, Base> // accept only Ts derived from  Base
00050 {
00051 public:
00052   MyTemplate() {}
00053 };
00054
00055
00056 int main()
00057 {
00058   //MyTemplate<NonBase> nonBase2;   // compile time error,
00059   MyTemplate<Base>    base2;  // no error
00060   MyTemplate<FromBase> frombase2; // no error
00061
00062   return 0;
00063 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleContour.cpp Source File

Image » Examples

ExampleContour.cpp

Go to the documentation of this file.
00001 #include "Image/Contour.hh"
00002 #include "Base/Image/ImageIO.hh"
00003 #include "Base/Debug/TimeMeasure.hh"
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008 int main(int argc, char** argv)
00009 {
00010
00011  Image<unsigned char> image1, out;
00012   int res;
00013   if (argc <2) {
00014     cerr<<"usage: "<< argv[0] <<" <segmented pgm file> "<<endl;
00015     exit(1);
00016   }
00017
00018   if ((res=ImageIO::ImportImage(argv[1], image1)) != 0){
00019     cerr << "error loading file " << argv[1] << "   " << res << endl;
00020     exit (-1);
00021   }
00022
00023   if (image1.GetChannelCount() != 1){
00024     cerr << "wrong channel count in image"<< endl;
00025   }
00026
00027   Contour cont;
00028   out=image1;
00029   TimeMeasure timer;
00030   timer.Start();
00031   cont.Process(image1);
00032   timer.Stop();
00033   std::cout<<"Finding the contour did take: ";
00034   timer.PrintRealTime();
00035   out.FillImageWithConstValue((unsigned char)0);
00036   cont.Draw(out);
00037   if (ImageIO::ExportImage("contour", out, ImageIO::FF_ppm)!=0){
00038     BIASERR("error writing");
00039   }
00040   cout<<"FreemanCode of Contour:"<<endl;
00041   for (unsigned int i=0;i<cont.GetFreemanCode().size();i++)
00042     cout<<cont.GetFreemanCode()[i]<<" ";
00043   cout<<endl;
00044   cout<<"written contour.pgm"<<endl;
00045 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleConvert.cpp Source File

Base » Image » Examples

ExampleConvert.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030 #include <Base/Image/ImageIO.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 int main(int argc, char *argv[]){
00036   ImageBase source, dest;
00037
00038 //   Image<unsigned char> im1(100, 200, 3), im2;
00039 //   cerr << "   bla "<<endl;
00040 //   im2.Init(100, 200, 1);
00041 //   cerr << (int)(im2.GetImageDataArray()[199][99]) << endl;
00042 //   cerr << (int)(im1.GetImageDataArray()[199][99]) << endl;
00043 //   return -1;
00044
00045   if (argc!=2){
00046     BIASERR(argv[0] << " image ");
00047     //return -1;
00048     return 0; // for Dart testing
00049   }
00050
00051   if (ImageIO::Load(argv[1], source)!=0){
00052     BIASERR("error loading image "<<argv[1]);
00053     //return -2;
00054     return 0; // for Dart testing
00055   }
00056
00057   if (ImageConvert::Convert(source, dest, ImageBase::CM_RGB)!=0){
00058     BIASERR("error converting image to rgb");
00059     //return -3;
00060     return 0; // for Dart testing
00061   }
00062
00063   if (ImageIO::Write("rgb.bias", dest)!=0){
00064     BIASERR("error writing image ");
00065     //return -4;
00066     return 0; // for Dart testing
00067   }
00068   return 0;
00069 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleConvolution.cpp Source File

Filter » Examples

ExampleConvolution.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Linköping
00009   sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 // must be first:
00027 #include <Base/Common/LeakChecking.h>
00028
00029
00030 #include "Filter/Convolution.hh"
00031 #include <iostream>
00032
00033 #include <Base/Common/BIASpragma.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 int main(int argc, char *argv[])
00039 {
00040   Image<unsigned char> src,dst;
00041   src.Init(10,10);
00042   dst.Init(10,10);
00043
00044   Convolution<unsigned char,unsigned char> conv;
00045   FilterMask fm;
00046
00047   unsigned char *srcdata=src.GetImageData();
00048   unsigned char *dstdata=dst.GetImageData();
00049
00050   for(int x=0;x<100;x++)
00051     {
00052       srcdata[x]=0;
00053       dstdata[x]=0;
00054     }
00055   srcdata[10*5+5]=100;
00056   srcdata[0]=100;
00057
00058   Matrix<short> kern;
00059   Vector<short> khor;
00060   Vector<short> kver;
00061   kern.newsize(3,3);
00062   kern[0][0]=1;
00063   kern[0][1]=2;
00064   kern[0][2]=1;
00065   kern[1][0]=2;
00066   kern[1][1]=4;
00067   kern[1][2]=2;
00068   kern[2][0]=1;
00069   kern[2][1]=2;
00070   kern[2][2]=1;
00071
00072   khor.newsize(3);
00073   kver.newsize(3);
00074   khor[0]=1;
00075   khor[1]=2;
00076   khor[2]=1;
00077   kver[0]=1;
00078   kver[1]=2;
00079   kver[2]=1;
00080
00081
00082   fm.Init(kern,1);
00083   fm.CreateFloatFilter();
00084
00085   conv.SetKernel(fm);
00086   conv.FilterInt(src,dst);
00087   cout <<"dst matrix:\n";
00088   for(int y=0;y<10;y++)
00089   {
00090       for(int x=0;x<10;x++)
00091           cout <<(int)dstdata[y*10+x]<<" ";
00092       cout <<endl;
00093   }
00094
00095   fm.Init(khor,kver,1,0);
00096   conv.SetKernel(fm);
00097   conv.FilterInt(src,dst);
00098   cout <<"dst sep:\n";
00099   for(int y=0;y<10;y++)
00100     {
00101       for(int x=0;x<10;x++)
00102     cout <<(int)dstdata[y*10+x]<<" ";
00103       cout <<endl;
00104     }
00105
00106   conv.SetKernel(fm);
00107   conv.FilterFloat(src,dst);
00108   cout <<"dst matrix float:\n";
00109   for(int y=0;y<10;y++)
00110     {
00111       for(int x=0;x<10;x++)
00112     cout <<(int)dstdata[y*10+x]<<" ";
00113       cout <<endl;
00114     }
00115
00116   conv.SetKernel(fm);
00117   conv.FilterFloat(src,dst);
00118   cout <<"dst sep float:\n";
00119   for(int y=0;y<10;y++)
00120     {
00121       for(int x=0;x<10;x++)
00122     cout <<(int)dstdata[y*10+x]<<" ";
00123       cout <<endl;
00124     }
00125
00126   return 0;
00127 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleCopy.cpp Source File

Base » Debug » Examples

ExampleCopy.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include <Base/Debug/Debug.hh>
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 //int main(int argc, char *argv[])
00033 int main()
00034 {
00035   Debug d1, d2;
00036   d1.SetDebugLevel(1);
00037   d2=d1;
00038   cerr << d2.GetDebugLevel() << endl;
00039
00040
00041   return 0;
00042 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/Examples/ExampleCornerDetector.cpp Source File

FeatureDetector » Examples

ExampleCornerDetector.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <bias_config.h>
00026 #include <FeatureDetector/CornerDetectorFoerstner.hh>
00027 #include <FeatureDetector/CornerDetectorHarris.hh>
00028 #include <FeatureDetector/CornerDetectorSusan.hh>
00029 #include <FeatureDetector/CornerDetectorKLT.hh>
00030 #include <FeatureDetector/LinearRegionDetector.hh>
00031 #include <Base/Image/ImageDraw.hh>
00032 #include <Base/Image/ImageConvert.hh>
00033 #include <Base/Image/ImageIO.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 #define DEFAULT_PARA_FILE_NAME "CornerDetector.ini"
00039
00040 #define type 1
00041 #if type == 0
00042
00043 #ifdef BUILD_IMAGE_INT
00044 #define StorageType unsigned char
00045 #define KernelType int
00046 #else
00047 #define StorageType unsigned char
00048 #define KernelType float
00049 #endif
00050
00051 #elif type == 1
00052
00053 #define StorageType float
00054 #define KernelType float
00055
00056 #endif
00057
00058 void Draw(Image<unsigned char>& im, vector<HomgPoint2D>& p)
00059 {
00060   unsigned char col[]={255, 0, 0};
00061   const int nump=p.size();
00062   unsigned start[2];
00063   unsigned radius=1;
00064
00065   for (int l=0; l<nump; l++){
00066     if (!p[l].IsAtInfinity()){
00067       // circel around corner in actual image
00068       start[0]=(unsigned)rint(p[l][0]);
00069       start[1]=(unsigned)rint(p[l][1]);
00070       ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00071                                                    radius, col);
00072     }
00073   }
00074 }
00075
00076 int main(int argc, char *argv[])
00077 {
00078   Param para;
00079   int grp=para.GetFreeGroupID();
00080   CornerDetectorBase<StorageType> *cd = NULL;
00081 #if type == 0
00082   CornerDetectorSusan<StorageType> cds(para, grp, "");
00083 #endif
00084   CornerDetectorKLT<StorageType, KernelType> cdklt(para, grp, "");
00085   CornerDetectorHarris<StorageType, KernelType> cdh(para, grp, "");
00086   CornerDetectorFoerstner<StorageType, KernelType> cdf(para, grp, "");
00087   para.SetGroupName(grp, "CornerDetector");
00088
00089
00090
00091 //#ifdef _DEBUG
00092 //sunmin test for example, surely you can change to the path where you data locate i
00093 //argc = 2; //parameter for Harris feature detector
00094 //argv[1] = "c:\\projects\\imgdata\\images\\001.pnm";
00095 //#endif
00096
00097   Image<unsigned char> ucim, rgbim;
00098   Image<StorageType> im;
00099   vector<HomgPoint2D> p;
00100   vector<QUAL> qual;
00101   int *cdt=CornerDetectorBase<StorageType>::
00102     AddCornerDetectorType(para, "CornerDetectorType", grp);
00103
00104   //para.AddDebugLevel(D_PARAM_CONF_FILE);
00105   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00106
00107   if (argc-argind<1 || argind<1){
00108     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00109     para.Usage(cerr);
00110     para.DisableDestructorWarning();
00111     return -2;
00112   }
00113
00114   *cdt = CornerDetectorBase<StorageType>::CDT_Harris;
00115
00116   switch (*cdt){
00117   case CornerDetectorBase<StorageType>::CDT_Susan:
00118 #if type == 0
00119     cd = &cds;
00120 #else
00121     BIASERR("susan only implemented for unsigned char");
00122 #endif
00123     break;
00124   case CornerDetectorBase<StorageType>::CDT_KLT:
00125     cd = &cdklt;
00126     break;
00127   case CornerDetectorBase<StorageType>::CDT_Harris:
00128     cd = &cdh;
00129     break;
00130   case CornerDetectorBase<StorageType>::CDT_Foerstner:
00131     cd = &cdf;
00132     break;
00133   default:
00134     BIASERR("unknown corner detector type");
00135     BIASABORT
00136     break;
00137   }
00138
00139   bool WantLinearRegionDetector = false;
00140   if (WantLinearRegionDetector) {
00141     cout << "CornerDetector not used, detecting LINEAR regions ..."<<endl;
00142     LinearRegionDetector<float, float> cdl(para);
00143     cd = &cdl;
00144     cd->AddDebugLevel(D_CD_WRITE_DEBUG_IM);
00145     cd->AddDebugLevel(D_CD_FEATURES);
00146   }
00147
00148   for (int i=argind; i<argc; i++){
00149 #if type == 0
00150     if (ImageIO::Load(argv[i], im)!=0){
00151 #else
00152     if (ImageIO::Load(argv[i], ucim)!=0){
00153 #endif
00154       BIASERR("error loading image "<<argv[i]);
00155       para.DisableDestructorWarning();
00156       return -1;
00157     } else {
00158       cerr << "read "<<argv[i]<<endl;
00159     }
00160
00161     ImageBase tempimage;
00162
00163 #if type == 0
00164     ImageConvert::Convert(im, tempimage, ImageBase::CM_Grey);
00165     im = tempimage;
00166 #else
00167     ImageConvert::Convert(ucim, tempimage, ImageBase::CM_Grey);
00168     ucim = tempimage;
00169 #endif
00170
00171
00172 #if type != 0
00173     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00174       BIASERR("error converting image "<<argv[i]);
00175     }
00176     ImageIO::Write("fimage.mip", im);
00177 #endif
00178
00179     if (cd->Detect(im, p, qual)!=0) {
00180       cerr<<"Corner detector indicated an error !"<<endl;
00181     }
00182     cerr << "found "<<p.size()<<" corners"<<endl;
00183
00184     for (unsigned int r=0; r<p.size(); r++) {
00185       cout <<setw(5)<<r<<" : "<<p[r]<<" with quality "<<qual[r]<<endl;
00186     }
00187
00188 #if type == 0
00189     ImageConvert::Convert(im, rgbim, ImageBase::CM_RGB);
00190 #else
00191     ImageConvert::Convert(ucim, rgbim, ImageBase::CM_RGB);
00192 #endif
00193     Draw(rgbim, p);
00194
00195     ostringstream name;
00196     name << "corners-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00197     ImageIO::Write(name.str(), rgbim);
00198
00199   }
00200
00201   para.DisableDestructorWarning();
00202   return 0;
00203 }
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleCylinderMapping.cpp Source File

Image » Examples

ExampleCylinderMapping.cpp

Go to the documentation of this file.
00001 #include <string>
00002 #include <iostream>
00003
00004 // bias includes
00005 #include <Utils/Param.hh>
00006 #include <Base/Image/ImageIO.hh>
00007 #include <Image/CylinderMapping.hh>
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 BIAS::Param para;
00013
00014
00015 void ParamInit(int &args, char **&arg) // $Init
00016 {
00017   // no warning at program exit
00018   para.DisableDestructorWarning();
00019
00020   // add params (as unclassified param group)
00021   para.AddParamBool("help","prints info about all params",false,'h');
00022   para.AddParamString("image","mip file to load","",'i');
00023   para.AddParamInt("threshold","some threshold");
00024   para.AddParamDouble("focal", "focal length", 100.0,-1,1000000,'f');
00025   para.AddParamDouble("hx", "principal point x", -1,-1,1E06);
00026   para.AddParamDouble("hy", "principal point y", -1,-1,1E06);
00027
00028   // get command line params
00029   para.ParseCommandLine(args,arg);
00030
00031   // ? print help informations
00032   if ( *para.GetParamBool("help") == true ) {
00033     cout << endl;
00034     cout << "Press 'h' for a list of possible keys." << endl;
00035     para.Usage();
00036     exit(0);
00037   }
00038 }
00039
00040 int main(int args, char **arg)
00041 {
00042
00043   // init bias param class
00044   ParamInit(args,arg); // modifies params
00045
00046   // show image, iff give
00047   if ( para.GetParamString("image")->size() ==  0 ) {
00048     cout << "no input image specified (try --help)" << endl;
00049     return 0;
00050   }
00051
00052   // read and show image
00053   BIAS::Image<unsigned char> image;
00054   int r = BIAS::ImageIO::Load(*para.GetParamString("image"),image);
00055   if ( r != 0 ) {
00056     BIASERR("error loading image: "<<(*para.GetParamString("image")));
00057   }
00058
00059   BIAS::Image<unsigned char> sdest(image.GetWidth(),
00060                                    image.GetHeight(), image.GetChannelCount());
00061   sdest.Clear(0);
00062
00063   cout << "image width = " << image.GetWidth() << endl;
00064   cout << "image height = " << image.GetHeight() << endl;
00065
00066   // DEBUG
00067   // set the main eye points of the camera
00068   double hx = *(para.GetParamDouble("hx"));
00069   cout << "Setting hx to " << hx << endl;
00070
00071   double hy = *(para.GetParamDouble("hy"));
00072   cout << "Setting hy to " << hy << endl;
00073
00074
00075   // perform the mapping
00076   //
00077   //
00078   //
00079   CylinderMapping smapping;
00080   smapping.setPrincipalPoint(hx, hy);
00081   smapping.setFocalLength(*para.GetParamDouble("focal"),
00082                           *para.GetParamDouble("focal"));
00083   smapping.Map(image, sdest);
00084
00085   BIAS::ImageIO::ExportImage(std::string("cyl_") +
00086                              *para.GetParamString("image"),
00087                              sdest,
00088                              BIAS::ImageIO::FF_ppm);
00089   cout<<"Mapped image written to:"<<"cyl_" <<
00090     *para.GetParamString("image")<<endl;
00091 }
00092
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDeInterlace.cpp Source File

Filter » Examples

ExampleDeInterlace.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Filter/DeInterlace.hh>
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Base/Image/ImageConvert.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 #define type 1
00033 #if type == 1
00034 #define StorageType unsigned char
00035 #define OutputImageType unsigned char
00036 #else
00037 #define StorageType float
00038 #define OutputImageType float
00039 #endif
00040
00041 int main(int argc, char *argv[])
00042 {
00043   Param para;
00044   TimeMeasure Timer1;
00045   DeInterlace<StorageType, OutputImageType> deinterlace;
00046
00047
00048   Image<unsigned char> ucim;
00049   Image<StorageType> im, dst;
00050
00051   if (argc<5){
00052     cerr << argv[0] << " src dst useEvenLines(bool) dodownsamplingbytwo(bool)\n";
00053     return -2;
00054   }
00055
00056 #if type == 1
00057     if (ImageIO::ImportImage(argv[1], im)!=0){
00058 #else
00059     if (ImageIO::Load(argv[1], ucim)!=0){
00060 #endif
00061       BIASERR("error loading image "<<argv[1]);
00062       return -1;
00063     } else {
00064       cerr << "read "<<argv[1]<<endl;
00065     }
00066
00067 #if type != 1
00068     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00069       BIASERR("error converting image "<<argv[1]);
00070     }
00071 #endif
00072     Timer1.Start();
00073     deinterlace.SetUseEvenLines( 0!=atoi(argv[3]) );
00074     deinterlace.SetDownSamplingByTwo( 0!=atoi(argv[4]) );
00075     deinterlace.SetDeInterlaceType(BIAS_DI_22);
00076     deinterlace.Filter(im, dst);
00077     Timer1.Stop();
00078
00079
00080     //int res =
00081       ImageIO::Write(argv[2], dst);
00082
00083     Timer1.Print();
00084     return 0;
00085 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDilation.cpp Source File

Filter » Examples

ExampleDilation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Filter/Dilation.hh>
00027 #include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageDraw.hh>
00030
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 int main (int argc, char *argv[])
00036 {
00037   if (argc!=2){
00038     cerr << argv[0] << "  <image>\n";
00039     return -1;
00040   }
00041   Image<unsigned char> im, res;
00042
00043   if (ImageIO::Load(argv[1], im)!=0){
00044     BIASERR("error loading image "<<argv[1]);
00045     return -2;
00046   }
00047
00048   Dilation<unsigned char, unsigned char> dilation;
00049   dilation.SetKernelSize(3); // kernelsize 3 wich is default is MUCH faster
00050   dilation.SetBorderHandling(FilterBase<unsigned char, unsigned char>::TBH_same);
00051   dilation.Filter(im,res);
00052   ImageIO::Write("result.mip", res);
00053   cout<<"Written result.mip"<<endl;
00054   return 0;
00055 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleDirectToDisk.cpp Source File

VideoSource » Examples

ExampleDirectToDisk.cpp

Go to the documentation of this file.
00001 #include <Image/Camera.hh>
00002 #include <Base/Image/ImageConvert.hh>
00003 #include <Base/Image/ImageDraw.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <VideoSource/VideoSource_DCAM.hh>
00006 // #include <Gui/GuiGTK.hh>
00007
00008 #ifdef WIN32
00009 #  include <windows.h>
00010 #else
00011 #  include <unistd.h>
00012 #  include <getopt.h>
00013 #endif
00014
00015
00016 using namespace BIAS;
00017 using namespace std;
00018
00019 #define StorageType unsigned char
00020
00021 #include <Base/Debug/TimeMeasure.hh>
00022
00023
00024
00025
00026
00027
00028
00029 int main(int /*argc*/, char** /*argv*/)
00030 {
00031   int res = -1;
00032   TimeMeasure t1;
00033   unsigned int loopcount = 100;
00034   VideoSource_DCAM cam;
00035
00036   cout <<"Warning: Improper use can freeze your system and especially your filesystem "<<endl;
00037
00038   //  cam.SetSize(1600,1200);
00039 //   cam.SetLeftTop(174,32);
00040 //  cam.SetFormat7(0,2400,1);
00041    cam.SetDebugLevel(D_DTD | D_DCAM | D_DCAM_F7);
00042 //   cam.SetBinning(true);
00043 //   res = cam.OpenDevice() ;
00044
00045
00046    //  cam.ForceFormat7(true);
00047 //   cam.SetSize(1200,1200);
00048 //   cam.SetSize(1024, 768);
00049    //   cam.SetLeftTop(0,0);
00050    cam.SetFPS(7.5);
00051    res = cam.OpenDevice() ;
00052
00053   //cout <<"Openresult: "<<res<<endl;
00054   //   cam.ExternalTrigger(true);
00055   if (res <0) {
00056     cerr<<" Can not open camera. res="<<res<<endl;
00057     exit(1);
00058   }
00059   //   if (cam.SetWhiteBalance(rgain, bgain)!=0){
00060   //     BIASERR("error setting white balance");}
00061   //   cam.AutoMode(FEATURE_WHITE_BALANCE, true);
00062
00063   //   cam.ShowCapabilities();
00064   cam.SetShutter(float(1.0/50.0));
00065   Camera<unsigned char> img;
00066   cam.InitImage(img);
00067   cam.SetDirectToDisk("VideoStream.miv");
00068   cam.PreGrab();
00069
00070
00071    cam.SetDebugLevel(0);
00072   //   cam.SetFeature(FEATURE_SHARPNESS,0);
00073   t1.Start();
00074   for (unsigned int i=0;i<loopcount; i++) {
00075     cout <<"Grabing image "<<i;
00076     cam.GrabSingle(img);
00077     cout <<" UID: "<<img.GetUID()<<endl;
00078   }
00079   t1.Stop();
00080   float fps = float(loopcount / (t1.GetRealTime()/1000000.0));
00081   cout <<"FPS: "<<fps<<endl;
00082
00083   cam.PostGrab();
00084   cam.CloseDevice();
00085
00086   return 0;
00087 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleDistTransform.cpp Source File

Filter » Examples

ExampleDistTransform.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Filter/DistTransform.hh>
00027 #include <Image/Contour.hh>
00028 #include <Base/Image/Image.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Image/ImageDraw.hh>
00031
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 int main (int argc, char *argv[])
00037 {
00038   if (argc!=2){
00039     cerr << argv[0] << "  <segmented grey value image>\n";
00040     return -1;
00041   }
00042   Image<unsigned char> im;
00043   Image<float> res;
00044
00045   if (ImageIO::Load(argv[1], im)!=0){
00046     BIASERR("error loading image "<<argv[1]);
00047     return -2;
00048   }
00049   DistTransform<unsigned char, float> dTrans;
00050   dTrans.SetZeroLevel(255);
00051   dTrans.Filter(im,res);
00052   ImageIO::Write("distTransform.mip", res);
00053   cout<<"Written distTransform.mip"<<endl;
00054   return 0;
00055 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleDraw.cpp Source File

Base » Image » Examples

ExampleDraw.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/ImageDraw.hh>
00027 #include <Base/Image/ImageIO.hh>
00028
00029 using namespace BIAS;
00030
00031 //int main(int argc, char *argv[])
00032 int main()
00033 {
00034   Image<unsigned char> im(360, 288, 1);
00035
00036   im.FillImageWithConstValue((unsigned char)0);
00037
00038   ImageDraw<unsigned char>::RectangleCorners(im, 0, 0, 359, 287);
00039
00040   unsigned start[]={10, 50}, end[]={150, 150}, length=10, width=5;
00041   unsigned char col[]={200};
00042   ImageDraw<unsigned char>::Arrow(im, start, end, length, width, col);
00043
00044
00045   ImageIO::Write("res.mip", im);
00046   ImageIO::WriteUnbuffered("res2.mip", im);
00047
00048   return 0;
00049 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleEmpty.cpp Source File

Base » Image » Examples

ExampleEmpty.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028
00029 #include "Base/Image/Image.hh"
00030 #include "Base/Image/ImageIO.hh"
00031
00032 using namespace BIAS;
00033
00034 //int main(int argc, char *argv[])
00035 int main()
00036 {
00037   ImageBase bim;
00038   Image<unsigned char> im(649, 480, 1);
00039   BIAS::UUID uid;
00040
00041   ImageIO::Read("im-uc.mip", bim);
00042
00043   return 0;
00044 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleErosion.cpp Source File

Filter » Examples

ExampleErosion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Filter/Erosion.hh>
00027 #include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageDraw.hh>
00030
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 int main (int argc, char *argv[])
00036 {
00037   if (argc!=2){
00038     cerr << argv[0] << "  <image>\n";
00039     return -1;
00040   }
00041   Image<unsigned char> im, res;
00042
00043   if (ImageIO::Read(argv[1], im)!=0){
00044     BIASERR("error loading image "<<argv[1]);
00045     return -2;
00046   }
00047
00048   Erosion<unsigned char, unsigned char> ero;
00049   ero.SetKernelSize(7);
00050   ero.SetBorderHandling(FilterBase<unsigned char, unsigned char>::TBH_same);
00051   ero.Filter(im,res);
00052
00053   ImageIO::Write("result.mip", res);
00054   cout<<"Written result.mip"<<endl;
00055   return 0;
00056 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleFactory.cpp Source File

Base » Common » Examples

ExampleFactory.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BaseFactory.hh>
00026
00027 #include <string>
00028 #include <iostream>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 /* @author woelk 02/2006 */
00034 class Base
00035 {
00036 public:
00037   Base(const string& name)
00038     : Name_(name) {}
00039   inline std::string GetTag() const { return Name_; }
00040   void Who() { cout << "I am "<<Name_<<endl; }
00041   std::string Name_;
00042 };
00043
00044 /* @author woelk 02/2006 */
00045 class A : public Base
00046 {
00047 public:
00048   A() : Base("a") {};
00049   ALLOCATOR_IMPL(Base, A);
00050 };
00051
00052 /* @author woelk 02/2006 */
00053 class B : public Base
00054 {
00055 public:
00056   B() : Base("b") {};
00057   ALLOCATOR_IMPL(Base, B);
00058 };
00059
00060 /* @author woelk 02/2006 */
00061 class C : public Base
00062 {
00063 public:
00064   C() : Base("c") {};
00065   ALLOCATOR_IMPL(Base, C);
00066 };
00067
00068
00069 /* @author woelk 02/2006 */
00070 class MyFactory
00071   : public BaseFactory<Base>
00072 {
00073 public:
00074   MyFactory()
00075     : BaseFactory<Base>()
00076   {
00077     AddType((&A::Allocator));
00078     AddType((&B::Allocator));
00079     AddType((&C::Allocator));
00080   }
00081 };
00082
00083 /* @brief explains the usage of the Factory class
00084    @author woelk 02/2006 */
00085 int main()
00086 {
00087   // main knows nothing of A, B and C
00088   // all knowledge is in factory and henec D coudl be introduced without
00089   // changing main
00090   MyFactory fac;
00091   Base *p = fac.Generate("a");
00092   p->Who();
00093   p = fac.Generate("b");
00094   p->Who();
00095   p = fac.Generate("c");
00096   p->Who();
00097   p = fac.Generate("d");
00098   if (p!=NULL){
00099     p->Who();
00100   } else {
00101     cerr << "could not generate class with name \"d\""<<endl;
00102   }
00103
00104   return 0;
00105 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFFT2D.cpp Source File

Image » Examples

ExampleFFT2D.cpp

Go to the documentation of this file.
00001 #include <Image/FFT2D.hh>
00002 #include <Base/Image/Image.hh>
00003 #include <Base/Image/ImageIO.hh>
00004 #include <Base/Image/ImageConvert.hh>
00005
00006
00007 using namespace std;
00008 using namespace BIAS;
00009
00010
00011 int main(int argc, char *argv[])
00012 {
00013
00014   if (argc<2 || argc > 3){
00015     cerr << argv[0] << "  <image> [image2]\n";
00016     return -1;
00017   }
00018
00019   Image<unsigned char> im1, im1grey;
00020
00021   if (ImageIO::Load(argv[1], im1)!=0){
00022     BIASERR("error loading image "<<argv[1]);
00023     return -2;
00024   }
00025
00026   ImageConvert::ToGrey(im1,im1grey);
00027   ImageIO::Write("0_Grey1",im1grey);
00028
00029   FFT2D<unsigned char, float> fft;
00030   fft.Init(im1grey.GetWidth(),im1grey.GetHeight());
00031
00032   Image<float> i,r;
00033
00034   fft.Filter(im1grey,r,i);
00035   ImageIO::Write("1_Imaginaer1",i);
00036   ImageIO::Write("1_Real1",r);
00037
00038   if(argc == 3){
00039     Image<unsigned char> im2, im2grey,res;
00040     Image<float> cps;
00041     if (ImageIO::Load(argv[2], im2)!=0){
00042       BIASERR("error loading image "<<argv[2]);
00043       return -2;
00044     }
00045     if((im1.GetWidth() != im2.GetWidth()) ||
00046        (im1.GetHeight() != im2.GetHeight())){
00047       BIASERR("images must have same size!");
00048       return -2;
00049     }
00050     ImageConvert::ToGrey(im2,im2grey);
00051     ImageIO::Write("0_Grey2",im2grey);
00052
00053     fft.Filter(im2grey,r,i);
00054     ImageIO::Write("1_Imaginaer2",i);
00055     ImageIO::Write("1_Real2",r);
00056     //ImageIO::Write("1_Hanning2",im2grey);
00057
00058     //fft.TransformPhase(im1grey,p);
00059     //fft.TransformAbs(im1grey,m);
00060     //fft.Normalize(m);
00061     //ImageIO::Write("2_M1",m);
00062     //ImageIO::Write("2_P1",p);
00063     //fft.TransformPhase(im2grey,p);
00064     //fft.TransformAbs(im2grey,m);
00065     //fft.Normalize(m);
00066     //ImageIO::Write("2_M2",m);
00067     //ImageIO::Write("2_P2",p);
00068
00069     fft.CrossPowerSpectrum(im1grey,im2grey,cps);
00070     ImageIO::Write("2_CPS",cps);
00071     //ImageIO::Write("2_M_Norm",m);
00072     //fft.Normalize(cps);
00073     //fft.Normalize(cps);
00074     //ImageIO::Write("3_Normalized",cps);
00075     fft.TransformReverse(cps,res);
00076     ImageIO::Write("4_Resolution",res);
00077
00078   }
00079
00080
00081
00082 /*
00083   // transform to 2-channel image for complex representation
00084   fft.Filter(imgrey,res);
00085   ImageIO::Write("1_FFT2D_Filter",res);
00086   fft.Normalize(res);
00087   ImageIO::Write("2_FFT2D_Normalized",res);
00088   fft.TransformReverse(res,imgrev);
00089   ImageIO::Write("3_FFT2D_Reversed",imgrev);
00090 */
00091 /*
00092   // transform to 2 image (1 channel per image) for complex representation
00093   fft.Filter(im1grey,r1,r2);
00094   ImageIO::Write("4_FFT2D_real",r1);
00095   ImageIO::Write("5_FFT2D_im",r2);
00096
00097   fft.Normalize(r1);
00098   fft.Normalize(r2);
00099   ImageIO::Write("6_FFT2D_real_norm",r1);
00100   ImageIO::Write("7_FFT2D_im_norm",r2);
00101
00102   // transform to 1 image with 1 channel, magnitude and phase
00103   fft.TransformAbs(im1grey,res);
00104   ImageIO::Write("8_FFT2D_magnitude",res);
00105   fft.MultHanning(res);
00106   ImageIO::Write("8_FFT2D_magnitude_hanning",res);
00107   fft.Normalize(res);
00108   ImageIO::Write("8_FFT2D_magnitude_norm",res);
00109
00110   fft.TransformPhase(im1grey,res);
00111   ImageIO::Write("9_FFT2D_phase",res);
00112   fft.Normalize(res);
00113   ImageIO::Write("9_FFT2D_phase_norm",res);
00114 */
00115   return 0;
00116 }
00117
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFFT2D_Tiles.cpp Source File

Image » Examples

ExampleFFT2D_Tiles.cpp

Go to the documentation of this file.
00001 #include <Image/FFT2D_Tiles.hh>
00002 #include <Base/Image/Image.hh>
00003 #include <Base/Image/ImageIO.hh>
00004 #include <Base/Image/ImageConvert.hh>
00005
00006
00007 using namespace std;
00008 using namespace BIAS;
00009
00010
00011 int main(int argc, char *argv[])
00012 {
00013
00014   if (argc!=2){
00015     cerr << argv[0] << "  <image>\n";
00016     return -1;
00017   }
00018
00019   Image<unsigned char> im,imgrey, imgnew;
00020   Image<float> res,r1,r2;
00021
00022   if (ImageIO::Load(argv[1], im)!=0){
00023     BIASERR("error loading image "<<argv[1]);
00024     return -2;
00025   }
00026
00027   ImageConvert::ToGrey(im,imgrey);
00028 //   ImageIO::Write("grey",imgrey);
00029   FFT2D_Tiles<unsigned char, float> fft;
00030
00031   fft.Init(imgrey.GetWidth(),imgrey.GetHeight(),32,32);
00032
00033   // transform to 1 image with 1 channel, length of complex only
00034   fft.TransformAbs(imgrey,res);
00035 //   ImageIO::Write("FFT2D-real",r1);
00036 //   ImageIO::Write("FFT2D-img",r2);
00037 //   fft.Normalize(res);
00038   ImageIO::Write("FFT2D-abs",res);
00039
00040
00041
00042   return 0;
00043 }
Generated on Wed Jun 21 19:01:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleFFT.cpp Source File

MathAlgo » Examples

ExampleFFT.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <MathAlgo/FFT.hh>
00026 #include <Base/Math/Random.hh>
00027 #include <iostream>
00028 #include <iomanip>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 int main(int argc, char *argv[])
00034 {
00035   FFT fft;
00036   Random ran;
00037   bool debug=false;
00038
00039   int data_length=100;
00040   // generate some data by multiplying some sin of random freq.
00041   int num_sin=5;
00042   double const_offset=0.0;
00043   double *sin_freq=new double[num_sin], *phase_offs=new double[num_sin];
00044   ran.GetUniformDistributed(0.0, 0.5, num_sin, sin_freq);
00045   ran.GetUniformDistributed(0.0, 2.0*M_PI, num_sin, phase_offs);
00046
00047   cout << "#using sin waves with freq and phase offset : "<<endl;
00048   for (int i=0; i<num_sin; i++)
00049     cout <<"#freq: "<< sin_freq[i]<<"  \tphase offset: "<<phase_offs[i]<<endl;
00050
00051   // initialize FFT
00052   fft.Init(data_length);
00053
00054   // now generate data
00055   double *in=fft.GetInput();
00056   double *p=in;
00057   for (int l=0; l<data_length; l++, p++){
00058     *p=const_offset;
00059     for (int i=0; i<num_sin; i++)
00060       *p+=sin(2*M_PI*sin_freq[i]*l+phase_offs[i]);
00061     if (debug)
00062       cout <<"sample "<< setw(4) << l <<" : "<<setw(15)<<*p<<endl;
00063   }
00064
00065   // now calculate fft
00066   fft.Compute();
00067
00068   // now get result
00069   int res_length=(data_length>>1)+1;
00070   double *phase=new double[res_length], *mag=new double[res_length];
00071
00072   fft.GetPhase(phase);
00073   fft.GetMagnitude(mag);
00074
00075   cout << "#result of fft: "<<endl;
00076   cout <<setw(4)<<"#num"<<setw(15)<<"freq"<<setw(15)<<"mag"<<setw(15)
00077        <<"phase"<<endl;
00078   for (int i=0; i<res_length; i++){
00079     cout <<setw(4)<<i
00080          <<setw(15)<<(double)i/(double)data_length
00081          <<setw(15)<<mag[i]
00082          <<setw(15)<<phase[i]<<"\n";
00083   }
00084
00085   if (argc>0)
00086     cout << "# pipe outputt into file: "<<argv[0]<<" > tmp.dat"<<endl
00087     << "# and view with gnuplot : echo \"plot \\\"tmp.dat\\\" u 2:3 t \\\"magnitude\\\" w l, \\\"tmp.dat\\\" u 2:4 t \\\"phase\\\" w l; pause 99999;\" |gnuplot"<<endl;
00088
00089   // or easier
00090   fft.DumpResult();
00091
00092   delete[] sin_freq;
00093   delete[] phase_offs;
00094   delete[] phase;
00095   delete[] mag;
00096
00097   return 0;
00098 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleFileNames.cpp Source File

Base » Common » Examples

ExampleFileNames.cpp

Go to the documentation of this file.
00001
00002 #include <iostream>
00003
00004 // BIAS
00005 #include "Base/Common/FileHandling.hh"
00006
00007 using namespace std;
00008
00009 /**
00010 @example ExampleFileNames.cpp
00011 How to split a full path into its components directory, base of filename and extension of the filename.
00012 \todo Windows may need some more work regarding the drive, in particular for network drives \\machine\share
00013 and forwad vs. backward slashes.
00014 @author Jan Woetzel
00015 */
00016
00017 int main(int argc,char** argv){
00018   string full("/this/is/a/directory/ThisIsABase.ext");
00019   string dir, base, ext;
00020
00021   // command line arg given?
00022   if (argc>1) full=argv[1];
00023
00024   cout<<"Splitting  "<<full<<" into: "<<endl;
00025
00026   // run the function:
00027   BIAS::SplitName(full, dir, base, ext);
00028
00029   cout<<"\tdir  '"<<dir <<"'"<<endl
00030       <<"\tbase '"<<base<<"'"<<endl
00031       <<"\text  '"<<ext <<"'"<<endl;
00032
00033   return 0;
00034 }
00035
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleFMT2D.cpp Source File

Image » Examples

ExampleFMT2D.cpp

Go to the documentation of this file.
00001 #include <Image/FFT2D.hh>
00002 #include <Base/Image/Image.hh>
00003 #include <Base/Image/ImageIO.hh>
00004 #include <Base/Image/ImageConvert.hh>
00005 #include <Image/LogPolarMapping.hh>
00006 #include <Image/HomographyMapping.hh>
00007 #include <Base/Debug/TimeMeasure.hh>
00008 #include <Geometry/RMatrix.hh>
00009
00010
00011 using namespace std;
00012 using namespace BIAS;
00013
00014 int cut(const Image<float>& src, Image<float>& dst){
00015   int width = src.GetWidth();
00016   int height = src.GetHeight();
00017
00018   dst.Init(width-1,src.GetHeight(),1);
00019   float *simgp = src.GetImageData();
00020   float *dimgp = dst.GetImageData();
00021
00022   for(int i=0;i<height;i++){
00023     for(int j=1;j<width;j++){
00024       dimgp[(j-1)+i*(width-1)] = simgp[j+i*width];
00025     }
00026   }
00027   return 0;
00028 }
00029
00030 int mirror(const Image<float>& src, Image<float>& dst){
00031
00032   int width = src.GetWidth();
00033   int height = src.GetHeight();
00034   int qsize = width*height/2;
00035   if (!dst.IsEmpty()) dst.Release();
00036   //dst.Init(2*width,height,1);
00037   dst.Init(width,height,1);
00038   float *simgp = src.GetImageData();
00039   float *oimgp = dst.GetImageData();
00040   for(int i=0;i<qsize;i++){
00041
00042     oimgp[qsize+i] =  log(simgp[i]);
00043     oimgp[i] = log(simgp[qsize+i]);
00044   }
00045 //Highpass Filter ??
00046 /*
00047   for(int y =0; y<height;y++){
00048     for(int x=0;x<width;x++){
00049       oimgp[y*width+x] -= (10.0 * cos(0.5*M_PI*(double)x/(double)width) * cos(0.5*M_PI*(double)(y-height/2)/(double)(height/2)));
00050     }
00051   }
00052 */
00053 /*
00054   oimgp[qsize] -= 8;
00055   oimgp[qsize+1] -= 6;
00056   oimgp[qsize+2] -= 4;
00057   oimgp[qsize+3] -= 2;
00058   oimgp[qsize-width] -= 6;
00059   oimgp[qsize-width+1] -= 4;
00060   oimgp[qsize-width+2] -= 2;
00061   oimgp[qsize+width] -= 6;
00062   oimgp[qsize+width+1] -= 4;
00063   oimgp[qsize+width+2] -= 2;
00064   oimgp[qsize-2*width] -= 4;
00065   oimgp[qsize-2*width+1] -= 2;
00066   oimgp[qsize-3*width] -= 2;
00067   oimgp[qsize+2*width] -= 4;
00068   oimgp[qsize+2*width+1] -= 2;
00069   oimgp[qsize+3*width] -= 2;
00070 */
00071
00072   return 0;
00073 }
00074
00075 int castfloat(const Image<unsigned char>& src, Image<float>& dst){
00076   int width = src.GetWidth();
00077   int height = src.GetHeight();
00078   int size = width*height;
00079   dst.Init( width,height,src.GetChannelCount());
00080   unsigned char *imgp1 = src.GetImageData();
00081   float *oimgp1 = dst.GetImageData();
00082   for(int i=0;i<size;i++){
00083     oimgp1[i] = (float) imgp1[i];
00084   }
00085   return 0;
00086 }
00087
00088 int castchar(const Image<float>& src, Image<unsigned char>& dst){
00089   int width = src.GetWidth();
00090   int height = src.GetHeight();
00091   int size = width*height;
00092   dst.Init( width,height,src.GetChannelCount());
00093   float *imgp1 = src.GetImageData();
00094   unsigned char *oimgp1 = dst.GetImageData();
00095   for(int i=0;i<size;i++){
00096     oimgp1[i] = (unsigned char) imgp1[i];
00097   }
00098   return 0;
00099 }
00100
00101 int main(int argc, char *argv[])
00102 {
00103
00104   TimeMeasure t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11;
00105
00106   //load input images and initialize components
00107   t1.Start();
00108   if (argc != 3){
00109     cerr << argv[0] << "  <image> <image2>\n";
00110     return -1;
00111   }
00112
00113   Image<unsigned char> im1, im2,im1grey,im2grey, resuc;
00114   Image<float> im1greyfloat, im2correctedfloat, im2greyfloat, mag1, mag1cut, mag1mirrored, mag2, mag2cut, mag2mirrored, cps, res;
00115   float max, max2;
00116   double angle,scale;
00117   unsigned int* coords = (unsigned int*) calloc(2,sizeof(unsigned int));
00118   unsigned int* coords2 = (unsigned int*) calloc(2,sizeof(unsigned int));
00119   LogPolarMapping<float, float> mapperlp;
00120   HomographyMapping<unsigned char, unsigned char> MapperHM;
00121   HMatrix H(MatrixIdentity);
00122   HMatrix HTrans(MatrixIdentity);
00123   HMatrix HTransInv(MatrixIdentity);
00124   HMatrix HRot(MatrixIdentity);
00125   HMatrix HScale(MatrixIdentity);
00126
00127   if (ImageIO::Load(argv[1], im1)!=0){
00128     BIASERR("error loading image "<<argv[1]);
00129     return -2;
00130   }
00131   if (ImageIO::Load(argv[2], im2)!=0){
00132     BIASERR("error loading image "<<argv[2]);
00133     return -2;
00134   }
00135
00136   int width  = im1.GetWidth();
00137   int height = im1.GetHeight();
00138
00139   if((width != (int)im2.GetWidth()) ||
00140      (height != (int)im2.GetHeight())){
00141     BIASERR("images must have same size!");
00142     return -2;
00143   }
00144
00145   FFT2D<float, float> fft;
00146   mapperlp.SetImageCenter(width/2,height/2);
00147   Image<float> im1lp(width,height, 1);
00148   Image<float> im2lp(width,height, 1);
00149   Image<unsigned char>imgcorrected(width, height, 1);
00150   Image<unsigned char>imgcorrected2(width, height, 1);
00151
00152   t10.Start();
00153   fft.Init(width,height);
00154   t10.Stop();
00155
00156   ImageConvert::ToGrey(im1,im1grey);
00157   ImageIO::Write("0_Grey1",im1grey);
00158   ImageConvert::ToGrey(im2,im2grey);
00159   ImageIO::Write("0_Grey2",im2grey);
00160   im1lp.SetColorModel(im1grey.GetColorModel());
00161   im2lp.SetColorModel(im2grey.GetColorModel());
00162   t1.Stop();
00163
00164   //cast image to float
00165   t2.Start();
00166   castfloat(im1grey,im1greyfloat);
00167   castfloat(im2grey,im2greyfloat);
00168   t2.Stop();
00169
00170   //calculate magnitude for grey float input images
00171   t3.Start();
00172   fft.TransformAbs(im1greyfloat,mag1);
00173   ImageIO::Write("1_mag1",mag1);
00174   fft.TransformAbs(im2greyfloat,mag2);
00175   ImageIO::Write("1_mag2",mag2);
00176   t3.Stop();
00177
00178   //cut image if too large and mirror magnitude to have CT at left border center position and width exactly half the original images width
00179   t4.Start();
00180   if(mag1.GetWidth()%2 != 0){
00181     cut(mag1,mag1cut);
00182     cut(mag2,mag2cut);
00183   }
00184   mirror(mag1cut,mag1mirrored);
00185   mirror(mag2cut,mag2mirrored);
00186   ImageIO::Write("2_mag1mirrored",mag1mirrored);
00187   ImageIO::Write("2_mag2mirrored",mag2mirrored);
00188   t4.Stop();
00189
00190   //calculate Log-Polar spectrum for prepared magnitude
00191   t5.Start();
00192   mapperlp.Map(mag1mirrored, im1lp, MapBilinear);
00193   if (ImageIO::Write("ImgLogPolar.mip", im1lp)!=0){
00194     BIASERR("error image");
00195   }
00196
00197   mapperlp.Map(mag2mirrored, im2lp, MapBilinear);
00198   if (ImageIO::Write("ImgLogPolar2.mip", im2lp)!=0){
00199     BIASERR("error image");
00200   }
00201   t5.Stop();
00202
00203   //calculate the Cross Power Spectrum for Log-Polar images
00204   t6.Start();
00205   fft.CrossPowerSpectrum(im1lp,im2lp,cps);
00206   ImageIO::Write("3_CPS",cps);
00207   t6.Stop();
00208
00209   //Transform reverse to find rotation and scale
00210   t7.Start();
00211   fft.TransformReverse(cps,res);
00212   ImageIO::Write("4_Resolution",res);
00213   t7.Stop();
00214
00215   //find the peak
00216   t8.Start();
00217   max = res.GetMaxPixelValue(0,coords);
00218   t8.Stop();
00219
00220   //Correct the 2. source image with calculated rotation and scale
00221   t9.Start();
00222   angle = (double)coords[1] / (double) height * M_PI;
00223   if (angle > (0.5*M_PI)) angle -= M_PI;
00224   if(coords[0] > (unsigned int)(width/2))
00225     scale = pow((double)(width/2),((double)coords[0]-(double)width)/(double)width);
00226   else
00227     scale = pow((double)(width/2),(double)coords[0]/(double) width);
00228
00229   HTrans[0][2] = (double)(width/2);
00230   HTrans[1][2] = (double)(height/2);
00231   HTransInv[0][2] = (double)-(width/2);
00232   HTransInv[1][2] = (double)-(height/2);
00233   HRot[0][0]= cos(angle);
00234   HRot[0][1]= -sin(angle);
00235   HRot[1][0]= sin(angle);
00236   HRot[1][1]= cos(angle);
00237   HScale[0][0] = scale;
00238   HScale[1][1] = scale;
00239   HScale[1][2] = 1.0;
00240
00241   H =  HTrans * HScale * HRot * HTransInv;
00242   MapperHM.SetHomography(H);
00243   MapperHM.Map(im2grey, imgcorrected, MapBilinear);
00244   ImageIO::Write("5_Corrected",imgcorrected);
00245   t9.Stop();
00246
00247   //Find the translation with the rotation and scale corrected image
00248   t11.Start();
00249   castfloat(imgcorrected,im2correctedfloat);
00250   fft.CrossPowerSpectrum(im1greyfloat,im2correctedfloat,cps);
00251   fft.TransformReverse(cps,res);
00252   ImageIO::Write("6_Resolution2",res);
00253
00254   //Correct the image with the calculated translation
00255   max2 = res.GetMaxPixelValue(0,coords2);
00256   if(coords2[0] > (unsigned int)(width/2))
00257     HTrans[0][2] = width - (int)coords2[0];
00258   else
00259     HTrans[0][2] = -(int)coords2[0];
00260   if(coords2[1] > (unsigned int)(height/2))
00261     HTrans[1][2] = height - (int)coords2[1];
00262   else
00263     HTrans[1][2] = -(int)coords2[1];
00264
00265   MapperHM.SetHomography(HTrans);
00266   MapperHM.Map(imgcorrected, imgcorrected2, MapBilinear);
00267   ImageIO::Write("7_Corrected2",imgcorrected2);
00268   t11.Stop();
00269
00270
00271
00272
00273   cout<<endl<<endl;
00274   cout <<"Loading Image and converting to grey took "<<t1.GetUserTime()<<" ms, "<<endl;
00275   cout <<"Floating took "<<t2.GetUserTime()<<" ms, "<<endl;
00276   cout <<"Init FFT took "<<t10.GetUserTime()<<" ms, "<<endl;
00277   cout <<"FFT took "<<t3.GetUserTime()<<" ms, "<<endl;
00278   cout <<"Mirror took "<<t4.GetUserTime()<<" ms, "<<endl;
00279   cout <<"LogPolar took: "<<t5.GetUserTime()<<" ms, "<<endl;
00280   cout <<"CPS took "<<t6.GetUserTime()<<" ms, "<<endl;
00281   cout <<"IFT took "<<t7.GetUserTime()<<" ms, "<<endl;
00282   cout <<"Finding Max took "<<t8.GetUserTime()<<" ms, "<<endl;
00283   cout <<"Correcting rotation and scale took "<<t9.GetUserTime()<<" ms, "<<endl;
00284   cout <<"Finding and correcting translation took "<<t11.GetUserTime()<<" ms, "<<endl;
00285
00286   cout<<endl;
00287
00288   cout<<"Max at: "<<coords[0]<<"/"<<coords[1]<<" value: "<<max<<endl<<endl;
00289   cout<<"Max2 at: "<<coords2[0]<<"/"<<coords2[1]<<" value: "<<max2<<endl<<endl;
00290   cout<<"Das entspricht (fuer ein 512x512 Bild):"<<endl;
00291   if(coords[0] > (unsigned int)(width/2))
00292     cout<<"Skalierungsfaktor: "<<pow(256.0,((double)coords[0]-width)/512.0)<<endl;
00293   else
00294   cout<<"Skalierungsfaktor: "<<pow(256.0,(double)coords[0]/512.0)<<endl;
00295   cout<<"Rotation: "<<180.0*angle/M_PI<<" Grad"<<endl;
00296
00297   cout<<"Verschiebung: (";
00298   if(coords2[0] > (unsigned int)(width/2))
00299     cout<<width - (int)coords2[0];
00300   else
00301     cout<<-(int)coords2[0];
00302   cout<<",";
00303   if(coords2[1] > (unsigned int)(height/2))
00304     cout<<height - (int)coords2[1];
00305   else
00306     cout<<-(int)coords2[1];
00307   cout<<")"<<endl;
00308   return 0;
00309 }
00310
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleForeignData.cpp Source File

Base » Image » Examples

ExampleForeignData.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027 #include <iostream>
00028
00029 #include <Base/Image/ImageBase.hh>
00030 #include <Base/Image/ImageConvert.hh>
00031 #include <Base/Image/ImageIO.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 //int main(int argc, char *argv[])
00037 int main()
00038 {
00039   unsigned int size=1024;
00040   Image<unsigned char> *im;
00041   im = new Image<unsigned char>(size, size, 1);
00042   unsigned int chess_field_size=128;
00043   unsigned int x=0, y=0, c=0, r=0;
00044   unsigned char color=0;
00045   unsigned char **ida=im->GetImageDataArray();
00046
00047
00048
00049   for (y=chess_field_size; y<=im->GetHeight(); y+=chess_field_size){
00050     for (x=chess_field_size; x<=im->GetHeight(); x+=chess_field_size){
00051       if (y==chess_field_size)
00052         color = (color==0) ? (unsigned char)255 : (unsigned char)0;
00053       else
00054         color = (ida[y-chess_field_size-1][x-1]==0) ?
00055           (unsigned char)255 : (unsigned char)0;
00056       for (r=1; r<=chess_field_size; r++){
00057         for (c=1; c<=chess_field_size; c++){
00058           ida[y-r][x-c]=color;
00059         }
00060       }
00061     }
00062   }
00063
00064 //   // get the pointer
00065   unsigned char *KeepData = im->GetImageData();
00066   unsigned int w,h,ch;
00067   w = im->GetWidth();
00068   h = im->GetHeight();
00069   ch = im->GetChannelCount();
00070 //   // and clear it in the image avoid destruction of the data
00071    im->ClearDataPointer();
00072    // now kick the image and hope the data is ok
00073    delete im;
00074    // construct a new and empty image
00075    im = new Image<unsigned char>;
00076    // and init with the data with out any copy operation
00077      im->InitWithForeignData(w,h,ch,KeepData);
00078
00079
00080   if (ImageIO::Write("chessboard", *im)!=0){
00081     BIASERR("error writing image ");
00082     return -2;
00083   }
00084    delete im;
00085   return 0;
00086 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleGauss.cpp Source File

Filter » Examples

ExampleGauss.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Linköping
00009   sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #include "Filter/Gauss.hh"
00027 #include "Base/Image/ImageIO.hh"
00028 #include <iostream>
00029
00030 #include <Base/Debug/TimeMeasure.hh>
00031
00032 #include <Base/Common/BIASpragma.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 #define TYPE2 unsigned char
00038
00039
00040 int main(int argc, char *argv[])
00041 {
00042   TimeMeasure timeri, timerf, timer7;
00043
00044   Image<unsigned char> src;
00045   if (ImageIO::Load(argv[1], src)!=0){
00046     cout <<"Error loading "<<argv[1]<<endl;
00047     exit(-1);
00048   }
00049
00050   Image<TYPE2> dst, dst1, dst2, fdiff;
00051
00052   // input image is unsigned char, output is float !
00053   Gauss<unsigned char, TYPE2> theGauss;
00054
00055   theGauss.AddDebugLevel(D_CONV_TYPES);
00056   theGauss.AddDebugLevel(D_WRITE_IMAGES);
00057   theGauss.AddDebugLevel(D_FILTERBASE_CALLSTACK);
00058   theGauss.AddDebugLevel(D_CONV_KERNEL);
00059
00060
00061   cout<<"now filtering in 7x7"<<endl;
00062   theGauss.FilterFloat(src, dst2);
00063   ImageIO::Write("7x7_fitered", dst2);
00064   cout<<"now filtering in int"<<endl;
00065   theGauss.FilterInt(src, dst1);
00066   ImageIO::Write("int_filtered", dst1);
00067
00068   cout<<"now filtering in float"<<endl;
00069   theGauss.FilterFloat(src, dst2);
00070   ImageIO::Write("float_fitered", dst2);
00071
00072
00073   theGauss.Filter(src, dst);
00074   ImageIO::Write( "auto_filtered", dst);
00075   dst.SetZero();
00076
00077   bool WantCompare = true;
00078   if (WantCompare) {
00079     TYPE2 fmin, fmax;
00080     fdiff.AbsDiff(dst1, dst2);
00081     fdiff.GetMinMaxPixelValue(fmin, fmax);
00082     cerr << "differences between "<<(double)fmin<<" and "<<(double)fmax<<endl;
00083   }
00084   bool WantTiming = true;
00085   if (WantTiming) {
00086     theGauss.SetDebugLevel(0);
00087     // warming up
00088     for (int i=0; i<10; i++){
00089       cout<<"now filtering in int"<<endl;
00090       theGauss.FilterInt(src, dst1);
00091
00092       cout<<"now filtering in float"<<endl;
00093       theGauss.FilterFloat(src, dst2);
00094     }
00095     cout<<"Now comparing performance..."<<endl<<flush;
00096     // go
00097     for (int i=0; i<100; i++){
00098       timeri.Start();
00099       theGauss.FilterInt(src, dst1);
00100       timeri.Stop();
00101
00102       timerf.Start();
00103       theGauss.FilterFloat(src, dst2);
00104       timerf.Stop();
00105
00106       timer7.Start();
00107       theGauss.Filter7x7Grey(src, dst2);
00108       timer7.Stop();
00109
00110     }
00111
00112     cerr << "int took "<<endl;
00113     timeri.Print();
00114
00115     cerr << "float took "<<endl;
00116     timerf.Print();
00117
00118     cerr << "7x7 took "<<endl;
00119     timer7.Print();
00120
00121   }
00122   return 0;
00123 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGenSynthMatches.cpp Source File

Utils » Examples

ExampleGenSynthMatches.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002
00003 #include <Base/Common/BIASpragma.hh>
00004
00005 #include <Utils/GenSynthMatches.hh>
00006 #include <Base/Image/ImageIO.hh>
00007
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 #define DEFAULT_PARA_FILE_NAME "GenSynthMatches.ini"
00013 #define DEBUG true
00014
00015 int main(int argc, char *argv[])
00016 {
00017   Param para;
00018   GenSynthMatches gsm(para), gsm2(para);
00019   //  gsm.AddDebugLevel(GSM_CAM_MOTION);
00020   //  gsm.AddDebugLevel(GSM_VIEWINGVOL);
00021   //  gsm.AddDebugLevel(GSM_3D_POINTS);
00022   //  gsm.AddDebugLevel(GSM_2D_MATCHES);
00023     gsm.AddDebugLevel(GSM_MOVIN_TRANSF);
00024   //gsm.AddDebugLevel(GSM_MOVIN_3D_POINTS);
00025
00026
00027   bool FoundDefaultParaFile=true;
00028   ifstream is(DEFAULT_PARA_FILE_NAME);
00029   if (!is){
00030     is.close();
00031     if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<" failed"<<endl;
00032     FoundDefaultParaFile=false;
00033   } else {
00034     if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<endl;
00035     para.ReadParameter(DEFAULT_PARA_FILE_NAME);
00036   }
00037
00038   int argind = para.ParseCommandLine(argc, argv);
00039   if (argind<0){
00040     BIASERR("error parsing command line");
00041     return -1;
00042   }
00043
00044   if ((!FoundDefaultParaFile) && (*para.GetParamString("readconfig")=="")) {
00045     cerr << "no parameter file found, writing default to "
00046          <<DEFAULT_PARA_FILE_NAME<<"\n";
00047     para.SetWriteOptions(true,false,false);
00048     para.WriteParameter(DEFAULT_PARA_FILE_NAME);
00049   }
00050
00051
00052   gsm.CreateMatches();
00053
00054   cout << gsm <<endl;
00055   gsm.Write("data.txt");
00056
00057   gsm2.Read("data.txt");
00058
00059   cout << gsm2 <<endl;
00060
00061 //   cout << gsm._MovingTransform[2] << endl;
00062 //   cout << gsm2._MovingTransform[2] << endl;
00063
00064   Image<unsigned char> im;
00065   gsm.DrawTrue(im, 0, 2);
00066
00067   ImageIO::Write("true.mip", im);
00068
00069   gsm.DrawNoisy(im, 0, 2);
00070
00071   ImageIO::Write("noisy.mip", im);
00072
00073   gsm2.DrawTrue(im, 0, 2);
00074
00075   ImageIO::Write("true2.mip", im);
00076
00077   gsm2.DrawNoisy(im, 0, 2);
00078
00079   ImageIO::Write("noisy2.mip", im);
00080
00081
00082   return 0;
00083
00084 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGGTCube.cpp Source File

Utils » Examples

ExampleGGTCube.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include "../GenGroundTruth.hh"
00028 #include "../../Base/Geometry/HomgPoint3D.hh"
00029
00030 using namespace std;
00031 using namespace BIAS;
00032
00033 int main()
00034 {
00035   vector<HomgPoint3D> ScenePoints1;
00036   vector<HomgPoint3D> ScenePoints2;
00037     // generates a default cube
00038   GenGroundTruth::GenerateRandomCube(ScenePoints1);
00039
00040   // generate 300 points in a 150x50x50 "crystal cube"
00041   GenGroundTruth::GenerateRandomCube(ScenePoints2, 300,
00042                                      0.0, 0.0, 0.0,
00043                                      1.0, 0.0, 0.0,
00044                                      1.0, 1.0, 0.0,
00045                                      0.0, 0.0, 1.0,
00046                                      150.0, 50.0, 50.0);
00047
00048   unsigned int i;
00049   cout << "Points in scene 1:" << endl;
00050   for (i=0;i<ScenePoints1.size();i++)
00051     cout << ScenePoints1[i] << endl;
00052
00053   cout << "\nPoints in scene 2:" << endl;
00054   for (i=0;i<ScenePoints2.size();i++)
00055     cout << ScenePoints2[i] << endl;
00056 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleGGTPlane.cpp Source File

Utils » Examples

ExampleGGTPlane.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include "../GenGroundTruth.hh"
00028 #include "../../Base/Geometry/HomgPoint3D.hh"
00029
00030 using namespace std;
00031 using namespace BIAS;
00032
00033 int main()
00034 {
00035   vector<HomgPoint3D> ScenePoints1;
00036   vector<HomgPoint3D> ScenePoints2;
00037   // generates a default plane
00038   GenGroundTruth::GenerateRandomPlane(ScenePoints1);
00039
00040   // generate 100 points in a 150x50 plane
00041   GenGroundTruth::GenerateRandomPlane(ScenePoints2, 100,
00042                                       0.0, 0.0, 0.0,
00043                                       1.0, 1.0, 0.0,
00044                                       1.0, 0.0, 1.0,
00045                                       150.0, 50.0);
00046
00047   unsigned int i;
00048   cout << "Points in scene 1:" << endl;
00049   for (i=0;i<ScenePoints1.size();i++)
00050     cout << ScenePoints1[i] << endl;
00051
00052   cout << "\nPoints in scene 2:" << endl;
00053   for (i=0;i<ScenePoints2.size();i++)
00054     cout << ScenePoints2[i] << endl;
00055 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleGLShared.cpp Source File

Gui » Examples

ExampleGLShared.cpp

Go to the documentation of this file.
00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003 #include <bias_config.h>
00004
00005 #include <Base/Common/LeakChecking.h>
00006
00007 #include "ExampleGLShared.hh"
00008
00009 // BIAS
00010 #include <Gui/ConsoleRedirectIO.hh>
00011 #include <Gui/GeometryGL.hh>
00012
00013 using namespace std;
00014
00015 // required for wx RTTI dynamic construction:
00016 IMPLEMENT_APP(ExampleGLSharedApp)
00017
00018 // --------------------------------------------------------
00019 #ifdef BIAS_HAVE_GLUT
00020 #  define GLUT_BUILDING_LIB
00021 #  include <GL/glut.h>
00022 #endif // BIAS_HAVE_GLUT
00023
00024
00025 ///
00026 /// your own implementation of the scenes GL calls:
00027 ///
00028
00029 MyGLCanvas::MyGLCanvas(wxFrame* parent)
00030 :
00031 BIAS::OpenGLCanvas( parent, -1)
00032 ,dplist(0)
00033 {}
00034
00035
00036 void MyGLCanvas::InitGeometry()
00037 {
00038     // init once:
00039     static bool initDone=false;
00040     if(!initDone)
00041     {
00042         // do init
00043         CHECK_GL_ERROR;
00044         // example for an OpenGL display list
00045         dplist = glGenLists(1); // identifier
00046         glNewList(dplist, GL_COMPILE ); // or: GL_COMPILE_AND_EXECUTE
00047         {
00048             // light source proeprties for enabled lighting:
00049             // specified pos by w=1, direction by w=0:
00050             GLfloat light_position0[]     = {10.0f, 10.0, 10.0f, 0.0f}; // w=0: direction
00051             GLfloat light_maincolor0[]    = {1.0f, 1.0, 1.0f, 1.0f};
00052             GLfloat light_ambientcolor0[] = {0.4f, 0.2f, 0.2f, 1.0f};
00053
00054             // GL create light 0
00055             glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
00056             glLightfv(GL_LIGHT0, GL_DIFFUSE,  light_maincolor0);
00057             glLightfv(GL_LIGHT0, GL_SPECULAR, light_maincolor0);
00058             glLightfv(GL_LIGHT0, GL_AMBIENT,  light_ambientcolor0);
00059
00060             glEnable(GL_LIGHT0);
00061             glEnable(GL_LIGHTING); // may be switched on/off for every object
00062             glEnable(GL_DEPTH_TEST); // depth buffer occlusions of objects
00063
00064             // material properties for enabled lighting:
00065             GLfloat paintcolor0[]    = { 0.9f, 0.2f, 0.5f, 1.0f};
00066             GLfloat specularcolor0[] = { 1.0f, 1.0f, 1.0f, 1.0f};
00067             GLfloat shininess0[]     = { 70.0f }; // 1..128, large values make smaller specular highlights
00068
00069             GLfloat paintcolor1[]    = { 0.3f, 0.9f, 0.4f, 1.0f};
00070             GLfloat paintcolor2[]    = { 0.1f, 0.2f, 0.9f, 1.0f};
00071
00072             glMatrixMode(GL_MODELVIEW);
00073             glPushMatrix();
00074
00075             //// activate material properties:
00076             glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specularcolor0);
00077             glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess0);
00078             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
00079                 paintcolor0);
00080             glColor3f(
00081                 paintcolor0[0],
00082                 paintcolor0[1],
00083                 paintcolor0[2] );
00084
00085             // draw geometry
00086             BIAS::Vector3<float> dtea(-0.5f, -0.2f, 0.0f);
00087             // position of the scene "modeling" matrix
00088             glTranslatef( dtea[0], dtea[1], dtea[2] );
00089             // glutteapot has strange vertex ordering for historical reasons
00090             glFrontFace(GL_CW);
00091 #ifdef BIAS_HAVE_GLUT
00092             glutSolidTeapot(0.6);
00093 #endif //BIAS_HAVE_GLUT
00094             glFrontFace(GL_CCW);
00095
00096             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
00097                 paintcolor1 );
00098             glColor3f(
00099                 paintcolor1[0],
00100                 paintcolor1[1],
00101                 paintcolor1[2] );
00102
00103             glTranslatef( -2*dtea[0], -2*dtea[1], -2*dtea[2] );
00104             glFrontFace(GL_CW);
00105 #ifdef BIAS_HAVE_GLUT
00106             glutSolidTeapot(0.3);
00107 #endif // BIAS_HAVE_GLUT
00108             glFrontFace(GL_CCW);
00109             glTranslatef( dtea[0], dtea[1], dtea[2] );
00110             // back on origin
00111
00112             // activate material properties:
00113             glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, paintcolor2);
00114             glColor3f(paintcolor2[0], paintcolor2[1], paintcolor2[2]);
00115
00116 #ifdef BIAS_HAVE_GLUT
00117             glTranslatef(0,0,-2);
00118             glutSolidSphere(0.8, 30, 60);
00119             glTranslatef(0,0, 2); // back to origin
00120
00121             glTranslatef( 1,0,-3);
00122             glutSolidSphere(0.5, 50, 100);
00123             glTranslatef(-1,0, 3);// back to origin
00124
00125             glTranslatef(0,2,0);
00126             glutSolidCube(0.7);
00127             glTranslatef(0,-2,0);
00128
00129             glTranslatef(0,-1,0);
00130             glutSolidIcosahedron();
00131             glTranslatef(0, 1,0);
00132
00133             glTranslatef(0,-2.2,0);
00134             glutSolidTetrahedron();
00135             glTranslatef(0, 2.2,0);
00136 #endif // BIAS_HAVE_GLUT
00137
00138             glPopMatrix();
00139         }
00140         glEndList();
00141
00142         #ifdef BIAS_HAVE_FONTGL
00143         // font:
00144 #ifdef WIN32
00145         font.InitFont( GetDC(HWND(GetHandle())), "Arial" );
00146 #else // WIN32
00147         font.InitFont( GetHandle(), "Arial" );
00148 #endif // WIN32
00149
00150         #endif // BIAS_HAVE_FONTGL
00151
00152         CHECK_GL_ERROR;
00153         initDone=true;
00154     };
00155 }
00156
00157
00158 void MyGLCanvas::DisplayCalls()
00159 {
00160     //CALLINFO;
00161     CHECK_GL_ERROR;
00162     InitGeometry();
00163
00164     DisplayClear();
00165     DisplayRenderMode();
00166
00167     glMatrixMode(GL_PROJECTION);
00168     gluPerspective(67.5 /*fovy*/,
00169         GetAspectRatio(),
00170         0.1 /*zNear*/ ,
00171         100.0 /*zFar*/
00172         );
00173
00174     glMatrixMode(GL_MODELVIEW);
00175     glLoadIdentity();
00176     gluLookAt(1,1,3, /*eye position*/
00177         1,0.5,0.5, /* centered view on */
00178         0,1,0 /*up*/ );
00179
00180     CHECK_GL_ERROR;
00181
00182     {
00183         //glPushAttrib(GL_CULL_FACE|GL_LIGHT0|GL_LIGHTING|GL_DEPTH_TEST );
00184         //glPopAttrib();
00185
00186         glColor3d(1.0, 0.5, 0.2);
00187
00188         // animation: rotate the scene (not the camera) by using global time as angle:
00189         // thus light and camera stay in the same place
00190         {
00191             const float cycletime=10.0; // approx. sec for a full cycle
00192             const float angleM = fmodf( float(2.0*360.0/cycletime*OpenGLCanvasBase::time), 2.0*360.0);
00193             if (angleM<=360.0){
00194                 glRotatef( angleM,       0.0, 1.0, 0.0 );
00195             } else {
00196                 glRotatef( angleM-360.0, 1.0, 0.0, 0.0 );
00197             }
00198         }
00199
00200 #if 1
00201         if(glIsList(dplist) == GL_TRUE)
00202         {
00203             glCallList(dplist);
00204         } else {
00205             BIASERR("invalid display list dplist="<<dplist);
00206         }
00207 #endif // 0/1
00208
00209         DisplayCoordCross();
00210
00211 #ifdef BIAS_HAVE_FONTGL
00212         if (font.IsInitialized())
00213         {
00214             glColor3f(1.0f, 1.0f, 0.5f);
00215             font.PrintWinCoords("a0",  0, 0 );
00216             font.PrintWinCoords("a100x0y",  100, 0 );
00217             font.PrintWinCoords("a100x50y",  100, 50 ); // OK.
00218
00219             glColor3f(1.0f, 0.5f, 1.0f);
00220             font.DrawTextGL::PrintNormCoords("n0", 0.0, 0.0);
00221             font.DrawTextGL::PrintNormCoords("n0.5x0y", 0.5, 0.0);
00222             font.DrawTextGL::PrintNormCoords("n0.5x0.25y", 0.5, 0.25);
00223
00224             GeometryGL::DisplayCoordCrossAxesLabel(1.0, font);
00225         }
00226 #endif // BIAS_HAVE_FONTGL
00227     }
00228 }
00229
00230
00231 // --------------------------------------------------------
00232
00233 // 2nd sharing with 1st:
00234 MyGLCanvas2::MyGLCanvas2(wxFrame* parent)
00235 :
00236 BIAS::OpenGLCanvas( parent, -1)
00237 ,dplist(0)
00238 {}
00239
00240
00241 // ctor with shared context
00242 MyGLCanvas2::MyGLCanvas2(wxFrame* parent
00243                          ,wxGLContext* sharedContext
00244                          ,wxWindowID id
00245                          ,const wxPoint& pos
00246                          ,const wxSize& size
00247                          ,long style
00248                          ,const wxString& name
00249                          ,int* attribList
00250                          ,const wxPalette& palette )
00251                          :
00252 BIAS::OpenGLCanvas(parent,sharedContext, id,pos,size,style,name,attribList,palette)
00253 ,dplist(0)
00254 {}
00255
00256 void MyGLCanvas2::DisplayCalls()
00257 {
00258     CHECK_GL_ERROR;
00259     DisplayClear();
00260     DisplayRenderMode();
00261     OpenGLCanvas::DisplayCalls();
00262
00263     glMatrixMode(GL_PROJECTION);
00264     gluPerspective(67.5 /*fovy*/,
00265         GetAspectRatio(),
00266         0.1 /*zNear*/ ,
00267         100.0 /*zFar*/
00268         );
00269
00270     glMatrixMode(GL_MODELVIEW);
00271     glLoadIdentity();
00272     gluLookAt(1,1,3, /*eye position*/
00273         0,0,0, /* centered view on */
00274         0,1,0 /*up*/ );
00275
00276     if(glIsList(dplist) == GL_TRUE)
00277     {
00278         {
00279             const float cycletime=3.0; // approx. sec for a full cycle
00280             const float angleM = fmodf( float(2.0*360.0/cycletime*OpenGLCanvasBase::time), 2.0*360.0);
00281             if (angleM<=360.0){
00282                 glRotatef( -angleM,       0.0, 1.0, 0.0 );
00283             } else {
00284                 glRotatef( -(angleM-360.0), 1.0, 0.0, 0.0 );
00285             }
00286         }
00287
00288         glCallList(dplist);
00289     } else {
00290         BIASERR("dplist invalid");
00291     }
00292
00293     GeometryGL::DisplayCoordCross(1.5,3.0);
00294
00295     CHECK_GL_ERROR;
00296 }
00297
00298
00299 // --------------------------------------------------------
00300
00301 bool ExampleGLSharedApp::OnInit()
00302 {
00303     // utility: create a Redirection console for cout, cerr etc.
00304     ConsoleRedirectIO();
00305     // testing output:
00306     cout<<"Hello cout"<<endl;
00307     cout<<"Hello cerr"<<endl;
00308
00309     MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvas"), wxPoint(0,0), wxSize(640,480) );
00310     frame->Show(TRUE);
00311     SetTopWindow(frame);
00312
00313     return TRUE;
00314 }
00315
00316
00317 // --------------------------------------------------------
00318 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00319 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00320 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00321 END_EVENT_TABLE()
00322 // --------------------------------------------------------
00323
00324
00325 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00326 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00327 ,p_canvas(NULL)
00328 ,p_2nd_canvas(NULL)
00329 {
00330     // Create a simple top Menu
00331     wxMenu *menuFile = new wxMenu;
00332     menuFile->Append( ID_ABOUT, wxT("&About...") );
00333     menuFile->AppendSeparator();
00334     menuFile->Append( ID_QUIT, wxT("E&xit") );
00335     wxMenuBar *menuBar = new wxMenuBar;
00336     menuBar->Append(menuFile, wxT("&File"));
00337     SetMenuBar(menuBar);
00338
00339     // Create a simple bottom status bar
00340     CreateStatusBar(1);
00341
00342     // Canvas to test:
00343     p_canvas=new MyGLCanvas(this);
00344
00345     // share the context:
00346     if ( p_canvas->GetContext() == NULL)
00347     {
00348         BIASERR(wxT("context of p_canvas is NULL.")<<endl
00349             <<wxT("This means sharing OpenGL contexts may not be supported.")<<endl
00350             <<wxT("Could not share context. aborting"));
00351         exit(-1);
00352     }
00353     p_2nd_canvas = new MyGLCanvas2(this, p_canvas->GetContext(), -1);
00354     // distribuet the id of the dplist:
00355     p_2nd_canvas->dplist = 1; // HACK there is oly one dplist
00356
00357
00358     // put them into sizers:
00359     wxBoxSizer * sizer = new wxBoxSizer(wxHORIZONTAL);
00360     sizer->Add( p_canvas ,1,wxEXPAND|wxALL);
00361 #if wxCHECK_VERSION(2, 6, 2)
00362     sizer->AddSpacer(4); // available in 2.6.2 but not 2.4.2 (JW)
00363 #endif
00364     sizer->Add( p_2nd_canvas ,1,wxEXPAND|wxALL);
00365
00366     // limit min. size:
00367     sizer->SetItemMinSize(p_canvas, 500,400);
00368     sizer->SetItemMinSize(p_2nd_canvas, 300,200);
00369     sizer->SetSizeHints(this);
00370
00371     // set sizer and triggers Layout()
00372     SetSizerAndFit(sizer);
00373 }
00374
00375
00376 void MyFrame::OnQuit(wxCommandEvent& ){
00377     Close(TRUE);
00378 }
00379
00380
00381 void MyFrame::OnAbout(wxCommandEvent& )
00382 {
00383     wxString title(wxT("About"));
00384     wxString msg; // message
00385     msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00386     msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00387     msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00388     msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00389     msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00390     msg<<wxT("\n");
00391     COUT(msg);
00392     wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00393 }
00394
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleGLShared.hh Source File

Gui » Examples

ExampleGLShared.hh

Go to the documentation of this file.
00001 /** OpenGL example for
00002 1. using multiple canvases sharing teh same canvas inlcuding didplay lists etc.
00003 2. drawing text in OpenGL Using fonts.
00004 Jan Woetzel */
00005
00006 #include <wx/wx.h>
00007
00008 //BIAS
00009 #include <Gui/OpenGLCanvas.hh>
00010 #ifdef WIN32
00011 #  include <Gui/DrawTextGL.hh>
00012 #endif
00013
00014 using namespace BIAS;
00015 using namespace std;
00016
00017
00018 // --------------------------------------------------------
00019 /** @example ExampleGLShared.cpp
00020   Demonstrates
00021   - usage of wx OpenGL canvas,
00022   - setting up a shared context,
00023   - using fonts with OpenGL in absolute and relative mode. Resize teh window to see the effect.
00024 JW */
00025 class ExampleGLSharedApp
00026     : public /*wxApp*/ wxGLApp
00027 {
00028   virtual bool OnInit();
00029 }; // end of ExampleGLSharedApp -----------------------
00030
00031
00032 enum _ExampleGLSharedMyFrameIDs_ {
00033     ID_ABOUT=wxID_ABOUT,
00034     ID_QUIT
00035 };
00036
00037
00038 // --------------------------------------------------------
00039
00040
00041 /** Implement your own OopenGLCanvas derived class
00042     and override one of the Display functions
00043     to plug in your own GL calls / GL scene
00044     @author Jan Woetzl */
00045 class MyGLCanvas : public OpenGLCanvas {
00046 public:
00047     MyGLCanvas(wxFrame* parent);
00048
00049     /// constructor using a shared context
00050     MyGLCanvas(
00051             wxFrame* parent
00052             ,wxGLContext* sharedContext
00053             ,wxWindowID id = -1
00054             ,const wxPoint& pos = wxDefaultPosition
00055             ,const wxSize& size = wxDefaultSize
00056             ,long style=0
00057             ,const wxString& name=wxT("MyGLCanvas sharedContext")
00058             ,int* attribList = 0
00059             ,const wxPalette& palette = wxNullPalette
00060             );
00061
00062     // override to fire our own Display calls:
00063     void DisplayCalls();
00064
00065     //
00066     // additional members:
00067     //
00068
00069     // additional function to load and init geometry, dipsla ylistst etc. JW
00070     void InitGeometry();
00071
00072     // data mebers:
00073     int dplist;
00074 #ifdef BIAS_HAVE_FONTGL
00075     DrawTextGL font;
00076 #endif
00077 };
00078
00079
00080 class MyGLCanvas2 : public OpenGLCanvas {
00081 public:
00082     MyGLCanvas2(wxFrame* parent);
00083
00084     /// constructor using a shared context
00085     MyGLCanvas2(
00086             wxFrame* parent
00087             ,wxGLContext* sharedContext
00088             ,wxWindowID id = -1
00089             ,const wxPoint& pos = wxDefaultPosition
00090             ,const wxSize& size = wxDefaultSize
00091             ,long style=0
00092             ,const wxString& name=wxT("MyGLCanvas sharedContext")
00093             ,int* attribList = 0
00094             ,const wxPalette& palette = wxNullPalette
00095             );
00096
00097     // override to fire our own Display calls:
00098     void DisplayCalls();
00099
00100     int dplist;
00101 };
00102
00103
00104 // --------------------------------------------------------
00105
00106 class MyFrame: public wxFrame {
00107 public:
00108   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00109   void OnQuit(wxCommandEvent& event);
00110   void OnAbout(wxCommandEvent& event);
00111
00112   // data member ---
00113   //BIAS::OpenGLCanvas * p_canvas;
00114   MyGLCanvas * p_canvas;
00115   MyGLCanvas2 * p_2nd_canvas;
00116
00117   DECLARE_EVENT_TABLE()
00118 }; // end of MyFrame --------------------------------------
00119
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleGradient.cpp Source File

Filter » Examples

ExampleGradient.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Filter/FilterNTo2N.hh>
00026 #include <Filter/GradientSobel3x3.hh>
00027 #include <Filter/GradientGauss.hh>
00028 #include <Filter/GradientGaussAsymmetric.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Image/ImageConvert.hh>
00031 #include <Base/Debug/TimeMeasure.hh>
00032
00033 #include <Base/Common/BIASpragma.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 #define DEFAULT_PARA_FILE_NAME "Gradient.ini"
00039
00040
00041 #define InputImageType unsigned char
00042 #define OutputImageType float
00043
00044 int main(int argc, char *argv[])
00045 {
00046   Param para;
00047   TimeMeasure Timer1;
00048   int grp=para.GetFreeGroupID();
00049   FilterNTo2N<InputImageType, OutputImageType> *grad = NULL;
00050   GradientSobel3x3<InputImageType, OutputImageType> gsobel3x3(para, grp, "");
00051   GradientGauss<InputImageType, OutputImageType> ggauss(para, grp, "");
00052   GradientGaussAsymmetric<InputImageType, OutputImageType>
00053     ggaussasymmetric(para, grp, "");
00054   para.SetGroupName(grp, "Gradient");
00055   para.DisableDestructorWarning();
00056   Image<unsigned char> ucim;
00057   Image<InputImageType> im;
00058   Image<OutputImageType> gx, gy, g;
00059
00060  //  if (argc-argind<1 || argind<1){
00061 //     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00062 //     para.Usage(cerr);
00063 //     return -2;
00064 //   }
00065
00066
00067   int gt = 0;
00068   switch (gt){
00069   case 0:
00070     grad = &gsobel3x3;
00071     cerr <<"Sobel3x3\n";
00072     break;
00073   case 1:
00074     grad = &ggauss;
00075     cerr <<"GradientGauss\n";
00076     break;
00077   case 2:
00078     grad = &ggaussasymmetric;
00079     cerr <<"GradientGaussAsymmetric\n";
00080     break;
00081   default:
00082     BIASERR("unknown gradient type");
00083     BIASABORT;
00084     break;
00085   }
00086   grad->AddDebugLevel(D_GRADGAUSS_KERNEL);
00087   grad->AddDebugLevel(D_CONV_KERNEL);
00088   grad->AddDebugLevel(D_GRAD_DEB);
00089
00090   grad->SetBorderHandling(FilterBase<InputImageType,
00091                           OutputImageType>::TBH_valid);
00092   int argind = 1;
00093   for (int i=argind; i<argc; i++){
00094     if (ImageIO::Load(argv[i], im)!=0){
00095       BIASERR("error loading image "<<argv[i]);
00096       return -1;
00097     } else {
00098       cerr << "read "<<argv[i]<<endl;
00099     }
00100
00101 #if type != 1
00102     //  if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00103     //  BIASERR("error converting image "<<argv[i]);
00104     //}
00105 #endif
00106
00107     Timer1.Start();
00108     grad->Filter(im, gx, gy);
00109     Timer1.Stop();
00110
00111     ostringstream name;
00112     name << "gradx-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00113     ImageIO::Write(name.str(), gx);
00114     name.str("");
00115     name << "grady-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00116     ImageIO::Write(name.str(), gy);
00117 //     name.str("");
00118 //     name << "grad-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00119 //     ImageIO::Write(name.str(), g);
00120   }
00121
00122     Timer1.Print();
00123
00124   return 0;
00125 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleGSL.cpp Source File

MathAlgo » Examples

ExampleGSL.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <bias_config.h>
00026 #ifdef BIAS_HAVE_GSL
00027 #include <Base/Math/Random.hh>
00028 #include <MathAlgo/GSL.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 int main(int /*argc*/, char ** /*argv*/ )
00034 {
00035   Random rand;
00036   const int count=100;
00037   const int deg_freedom = 2;
00038   double x;
00039
00040   for (int i=0; i<count; i++){
00041     x = rand.GetUniformDistributed(0.0, 1.0);
00042     cout << setw(13) << setprecision(3) << x
00043          << setw(13) << setprecision(3)
00044          << InvChiSquareCulmProbFun(x, deg_freedom) << endl;
00045   }
00046   return 0;
00047 }
00048 #endif
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleHarrisColor.cpp Source File

Filter » Examples

ExampleHarrisColor.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Image/ImageConvert.hh>
00026 #include <iostream>
00027 #include <iomanip>
00028 #include <Base/Image/Image.hh>
00029 #include <Filter2/ColorHarris.hh>
00030 #include <Base/Image/ImageIO.hh>
00031 #include <Base/Image/ImageDraw.hh>
00032 #include <Base/Debug/TimeMeasure.hh>
00033
00034 #include <getopt.h>
00035
00036   //give detailed time measures
00037   //#define use_timers
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042 void usage(char *name)
00043 {
00044   cerr << endl << endl << name <<" [options] <image-filename>" << endl
00045        << " [-m maxnum]     find maximal maxnum corners"<<endl
00046        << "\t\t default = 150"<<endl
00047        << " [-t sigma]    sigma for gaussian average"<<endl
00048        << "\t\t default = 2.0"<<endl
00049        << " [-s sigma]    sigma for gauss derivative (0=sobel)"<<endl
00050        << "\t\t default = 0"<<endl
00051        << " [-o out]        write pointset to out"<<endl
00052        << endl << endl;
00053 }
00054
00055 #define st_type short
00056 int main(int argc, char *argv[])
00057 {
00058   char c;
00059   unsigned int maxnum=150;
00060   double minqual=0.00001;
00061   double sigma1=0;
00062   double sigma2=2.0;
00063 //   double sigma2=0;
00064   Image<unsigned char> image;
00065   ColorHarris cd;
00066 //   vector<HomgPoint2D> ps;
00067   string file, file2, outfile("pointset.txt");
00068   vector<float> quality;
00069 #ifdef use_timers
00070   int count=2;
00071 #else
00072   int count=200;
00073 #endif
00074
00075   if (argc <2) {
00076     usage (argv[0]);
00077     exit(1);
00078   }
00079
00080   while ((c = getopt(argc, argv, "m:t:s:o:h")) != EOF)
00081     {
00082       switch (c){
00083       case 'o':
00084         outfile=optarg;
00085         break;
00086       case 's':
00087         sigma1 = atof(optarg);
00088         break;
00089       case 't':
00090         sigma2 = atof(optarg);
00091         break;
00092       case 'h':
00093         usage(argv[0]);
00094         return 0;
00095         break;
00096       case 'm':
00097         maxnum = atoi(optarg);
00098         break;
00099       default:
00100         break;
00101       }
00102     }
00103
00104   file = argv[optind];
00105
00106   if (ImageIO::Load(argv[optind], image)!=0){
00107     BIASERR("error loading file " << file);
00108     return -1;
00109   }
00110
00111   cd.SetDebugLevel(0);
00112   Image<int> res;
00113   Image<st_type> st;
00114
00115   TimeMeasure time,time2;
00116   time.start();
00117   for (int i=0; i<count; i++){
00118 //     if(!st.IsEmpty())
00119 //       st.Release();
00120     if (cd.CreateSTColor(image,st,sigma1,sigma2)!=0){
00121       BIASERR("error creating st");
00122       return -1;
00123     }
00124 #ifdef use_timers
00125     time2.start();
00126 #endif
00127     cd.HarrisValue(st,res);
00128 #ifdef use_timers
00129     time2.stop();
00130     cout <<"\nHarrisValue took:\n";
00131     time2.print();
00132     time2.Reset();
00133 #endif
00134   }
00135   time.stop();
00136   cout <<"\n"<<count<<" st harris took:\n";
00137   time.print();
00138
00139   Image<st_type> st2;
00140   ImageIO::Write("res.mip",res);
00141   st.SetColorModel(ImageBase::CM_RGB);
00142   ImageConvert::ToInterleaved(st,st2);
00143   ImageIO::Write("st.mip",st2);
00144
00145 //   NonMax<int> nm;
00146 //   Image<int> res2;
00147 //   res2=res;
00148 //   nm.Filter(res,res2);
00149 //   ImageIO::Write("res2.mip",res2);
00150
00151   return 0;
00152 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleHistogram.cpp Source File

Image » Examples

ExampleHistogram.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Base/Image/ImageDraw.hh>
00029 #include <Base/Math/Random.hh>
00030 #include "Image/Histogram.hh"
00031
00032 #include <iostream>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036 /** \file ExampleHistrogram.cpp
00037     \brief usage for the Histogramm class
00038 */
00039 int main(int argc, char *argv[])
00040 {
00041   int res, binc=256;
00042
00043   Image<unsigned char> image1, image2;
00044   Histogram hist;
00045   Histogram2D hist2D;
00046
00047   if (argc <3) {
00048     cerr<< argv[0] <<" <pgm file> <pgm file2>"<<endl;
00049     exit(1);
00050   }
00051
00052   if ((res=ImageIO::ImportImage(argv[1], image1)) != 0){
00053     cerr << "error loading file " << argv[1] << "   " << res << endl;
00054     exit (-1);
00055   }
00056
00057   if (image1.GetChannelCount() != 1){
00058     cerr << "wrong channel count in image"<< endl;
00059   }
00060
00061   hist.SetFactor(1);
00062
00063   hist.SetDrawMode(HIST_LINES);
00064
00065   // 256 bins and three histograms
00066   hist.InitHist(binc, 3);
00067
00068   // use red as color fo histogram 0
00069   hist.SetColor(255,0,0, 0);
00070   // use green as color for histogram 1
00071   hist.SetColor(0,255,0, 1);
00072   // use blue as color for histogram 2
00073   hist.SetColor(0,0,255, 2);
00074
00075   hist.AddHist(image1, 0);
00076
00077   if ((res=ImageIO::ImportImage(argv[2], image2)) != 0){
00078     cerr << "error loading file " << argv[2] << "   " << res << endl;
00079     exit (-1);
00080   }
00081
00082   hist.AddHist(image2, 1);
00083
00084   vector<double> h3;
00085   Random r;
00086   for (int i=0; i<1024; i++){
00087     for(int j=0; j<1000; j++)
00088       h3.push_back(r.GetUniformDistributed(DBL_MIN,DBL_MAX));
00089   }
00090
00091   hist.AddHist(h3, 2);
00092
00093   hist.Draw();
00094
00095   //hist.DrawLog();
00096
00097   //hist.Dump();
00098
00099   unsigned st[2], end[2];
00100   double dst[2]={0, 1000}, dend[2]={binc, 1000};
00101   unsigned char col[]={255, 0, 255};
00102   dst[0]=0; dend[0]=binc;
00103   for (int i=1000; i<15000; i+=1000){
00104     dst[1]=dend[1]=i;
00105     hist.CooTransf(dst, st, 0);
00106     hist.CooTransf(dend, end, 0);
00107     cerr <<"drawing "<<st[0]<<", "<<st[1]<<" -> "<<end[0]<<", "<<end[1]<<endl;
00108     ImageDraw<unsigned char>::Line(hist, st, end, col);
00109   }
00110
00111
00112   if (ImageIO::ExportImage("hist", hist, ImageIO::FF_ppm)!=0){
00113     BIASERR("error writing");
00114   }
00115
00116   vector<unsigned> xd, yd;
00117   unsigned char *id1, *id2;
00118   id1=image1.GetImageData();
00119   id2=image2.GetImageData();
00120   unsigned pc=image1.GetPixelCount();
00121   if (image2.GetPixelCount()<pc) pc=image2.GetPixelCount();
00122   for (unsigned i=0; i<pc; i++) {
00123     xd.push_back((unsigned)id1[i]);
00124     yd.push_back((unsigned)id2[i]);
00125   }
00126
00127   hist2D.InitHist(128, 256);
00128
00129   hist2D.SetFactor(2);
00130
00131   hist2D.ZeroHist();
00132
00133   hist2D.AddHist(xd, yd);
00134
00135   // the black stripes in the histogram come from the discretizing
00136   hist2D.DrawLog();
00137
00138   //hist2D.Dump();
00139   //hist2D.WriteASCII();
00140
00141   if (ImageIO::ExportImage("hist2D", hist2D, ImageIO::FF_ppm)!=0){
00142     BIASERR("error writing");
00143   }
00144
00145   return 0;
00146 }
00147
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleHomographyMapping.cpp Source File

Image » Examples

ExampleHomographyMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/HomographyMapping.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 int main(int argc, char *argv[])
00037 {
00038
00039   if (argc<2){
00040     BIASERR(argv[0]<<" <image-file> [hmatfile [width height]]");
00041     return -1;
00042   }
00043
00044   Image<unsigned char> im;
00045   if (ImageIO::Load(argv[1], im)!=0){
00046     BIASERR("error loading "<<argv[1]);
00047     return -2;
00048   }
00049   int width  = im.GetWidth();
00050   int height = im.GetHeight();
00051
00052   cout<<"ROI of source image is "<<*im.GetROI()
00053       <<" while image size is "<<width<<" x "<<height<<endl;
00054
00055
00056
00057   HomographyMapping<unsigned char, unsigned char> Mapper;
00058   HMatrix H(MatrixIdentity);
00059   if (argc>2) {
00060     cout<<"Reading HMatrix "<<argv[2]<<endl;
00061     H.Load(argv[2]);
00062     cout<<"H is "<<H<<endl;
00063     H = H.Invert();
00064   } else {
00065  //    H[0][0]= 1.05;   H[0][1]= 1.1;      H[0][2] = -350.0;
00066 //     H[1][0]=-1.1;    H[1][1]= 1.85;     H[1][2] = -100.0;
00067     double angle = -15.0 / 180.0 * M_PI;
00068     HMatrix HRot(MatrixIdentity);
00069     HRot[0][0]= cos(angle);   HRot[0][1] = sin(angle);
00070     HRot[1][0]= -sin(angle);    HRot[1][1]= cos(angle);
00071     HMatrix HScale(MatrixIdentity);
00072      HScale[0][0] = 1.0; HScale[1][1] = 5.0;
00073     //HScale[0][0] = 2.0; HScale[1][1] = 2.0;
00074      HScale[1][2] = -400;
00075     H = HScale * HRot;
00076     cout<<"Using default homography "<<H<<endl;
00077   }
00078
00079   if (argc>4) {
00080     width = atoi(argv[3]);
00081     height = atoi(argv[4]);
00082     cout<<"Using imagesize "<<width<<" x "<<height<<endl;
00083   } else {
00084     cout<<"Using input image size "<<width<<" x "<<height<<endl;
00085   }
00086
00087   Image<unsigned char>
00088     imresnearest(width, height, im.GetChannelCount()),
00089     imresbilinear(width, height, im.GetChannelCount()),
00090     imresbicubic(width, height, im.GetChannelCount()),
00091     imrestrilinear(width, height, im.GetChannelCount()),
00092     imresanisotropic(width, height, im.GetChannelCount());
00093
00094
00095   // trilinear mapping with automatic scale and pyramid size selection
00096   Mapper.SetHomography(H);
00097
00098   cout<<"timing ..."<<endl<<flush;
00099   unsigned int numbermeasurements = 1;
00100   TimeMeasure t1, t2, t3, t4, t5;
00101   for (unsigned int i=0; i<numbermeasurements; i++) {
00102     t1.Start();
00103     // trilinear mapping with automatic scale and pyramid size selection
00104     Mapper.Map(im, imresnearest, MapNearestNeighbor);
00105     t1.Stop();
00106
00107     t2.Start();
00108     // fast backward mapping (bilinaer) disregarding sampling theroem
00109     Mapper.Map(im, imresbilinear, MapBilinear);
00110     t2.Stop();
00111
00112     t3.Start();
00113     // nn mapping
00114     Mapper.Map(im, imresanisotropic, MapAnisotropic);
00115     t3.Stop();
00116
00117     t4.Start();
00118     // trilinear mapping with automatic scale and pyramid size selection
00119     Mapper.Map(im, imrestrilinear, MapTrilinear);
00120     t4.Stop();
00121
00122     t5.Start();
00123     // trilinear mapping with automatic scale and pyramid size selection
00124     Mapper.Map(im, imresbicubic, MapBicubic);
00125     t5.Stop();
00126
00127   }
00128   cout <<"Anisotropic mapping took "
00129        <<t3.GetUserTime()/double(numbermeasurements)
00130        <<" ms, "<<endl
00131        <<"Trilinear mapping took "
00132        <<t4.GetUserTime()/double(numbermeasurements)
00133        <<" ms,"<<endl
00134        <<"Bicubic mapping took "
00135        <<t5.GetUserTime()/double(numbermeasurements)
00136        <<" ms,"<<endl
00137        <<"Bilinear mapping took "
00138        <<t2.GetUserTime()/double(numbermeasurements)
00139        <<" ms,"<<endl
00140        <<"NN-mapping took "
00141        <<t1.GetUserTime()/double(numbermeasurements) <<" ms"<<endl;
00142
00143   if (ImageIO::Write("image_homography_anisotropic.mip", imresanisotropic)!=0){
00144     BIASERR("error image");
00145     return -3;
00146   }
00147   if (ImageIO::Write("image_homography_trilinear.mip", imrestrilinear)!=0){
00148     BIASERR("error image");
00149     return -3;
00150   }
00151   if (ImageIO::Write("image_homography_bicubic.mip", imresbicubic)!=0){
00152     BIASERR("error image");
00153     return -3;
00154   }
00155   if (ImageIO::Write("image_homography_bilinear.mip", imresbilinear)!=0){
00156     BIASERR("error image");
00157     return -3;
00158   }
00159   if (ImageIO::Write("image_homography_nearest.mip", imresnearest)!=0){
00160     BIASERR("error image");
00161     return -3;
00162   }
00163
00164
00165   return 0;
00166 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleHSVConversion.cpp Source File

Base » Image » Examples

ExampleHSVConversion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028
00029 #include <iostream>
00030
00031 #include <Base/Image/ImageBase.hh>
00032 #include <Base/Image/ImageConvert.hh>
00033 #include <Base/Image/ImageIO.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 //int main(int argc, char *argv[])
00039 int main()
00040 {
00041   unsigned int size=800;
00042   Image<unsigned char> im(size, size, 3);
00043   im.SetColorModel(ImageBase::CM_RGB);
00044   unsigned int block_field_size=size/4;
00045   unsigned int c=0, r=0;
00046   unsigned char **ida=im.GetImageDataArray();
00047   cerr<<"R=255, G=0, B=0-255  |  ";
00048   float blue=0;
00049   for (c=0;c<block_field_size;c++) {
00050     for (r=0; r< (block_field_size / 2) ; r++) {
00051       ida[r][c*3 + 0]= 255;
00052       ida[r][c*3 + 1]= 0;
00053       ida[r][c*3 + 2]= (unsigned char)blue;
00054     }
00055     blue+=255.0f / (float)block_field_size;
00056   }
00057
00058   cerr<<"R=255, G=0-255, B=255 |  ";
00059   float green=0;
00060   for (c=block_field_size+1;c<(2*block_field_size);c++) {
00061     for (r=0; r< (block_field_size / 2) ; r++) {
00062       ida[r][c*3 + 0]= 255;
00063       ida[r][c*3 + 1]= (unsigned char)green;
00064       ida[r][c*3 + 2]= 255;
00065     }
00066     green+=255.0f / (float)block_field_size;
00067   }
00068
00069   cerr<<"R=255, G=255, B=255-0 |  ";
00070   blue=255;
00071   for (c=2*block_field_size+1;c<(3*block_field_size);c++) {
00072     for (r=0; r< (block_field_size / 2) ; r++) {
00073       ida[r][c*3 + 0]= 255;
00074       ida[r][c*3 + 1]= 255;
00075       ida[r][c*3 + 2]= (unsigned char)blue;
00076     }
00077     blue-=255.0f / (float)block_field_size;
00078   }
00079
00080   cerr<<"R=255, G=255, B=255-0"<<endl;
00081   green=255;
00082   for (c=3*block_field_size+1; c<size;c++) {
00083     for (r=0; r< (block_field_size / 2) ; r++) {
00084       ida[r][c*3 + 0]= 255;
00085       ida[r][c*3 + 1]= (unsigned char)green;
00086       ida[r][c*3 + 2]= 0;
00087     }
00088     green-=255.0f / (float)block_field_size;
00089   }
00090   cerr<<"--------------------------------------------------------------"<<endl;
00091   cerr<<"R=0, G=0-255, B=255  |  ";
00092   green=0;
00093   for (c=0;c<block_field_size;c++) {
00094     for (r=block_field_size / 2 +1; r< block_field_size ; r++) {
00095       ida[r][c*3 + 0]= 0;
00096       ida[r][c*3 + 1]= (unsigned char)green;
00097       ida[r][c*3 + 2]= 255;
00098     }
00099     green+=255.0f / (float)block_field_size;
00100   }
00101
00102   cerr<<"R=0, G=255, B=255-0   |  ";
00103   blue=0;
00104   for (c=block_field_size+1;c<(2*block_field_size);c++) {
00105     for (r=block_field_size / 2 +1; r< block_field_size ; r++) {
00106       ida[r][c*3 + 0]= 0;
00107       ida[r][c*3 + 1]= 255;
00108       ida[r][c*3 + 2]= (unsigned char)blue;
00109     }
00110     blue-=255.0f / (float)block_field_size;
00111   }
00112
00113   cerr<<"R=0-255, G=255-0, B=0 |  ";
00114   green=255;
00115   float red=0;
00116   for (c=2*block_field_size+1;c<(3*block_field_size);c++) {
00117     for (r=block_field_size / 2 +1; r< block_field_size ; r++) {
00118       ida[r][c*3 + 0]= (unsigned char)red;
00119       ida[r][c*3 + 1]= (unsigned char)green;
00120       ida[r][c*3 + 2]= 0;
00121     }
00122     green-=255.0f / (float)block_field_size;
00123     red+=255.0f / (float)block_field_size;
00124   }
00125
00126   cerr<<"R=255-0, G=0, B=0-255"<<endl;
00127   red=255; blue=0;
00128   for (c=3*block_field_size+1; c<size;c++) {
00129     for (r=block_field_size / 2 +1; r< block_field_size ; r++) {
00130       ida[r][c*3 + 0]= (unsigned char)red;
00131       ida[r][c*3 + 1]= 0;
00132       ida[r][c*3 + 2]= 0;
00133     }
00134     red-=255.0f / (float)block_field_size;
00135     blue+=255.0f / (float)block_field_size;
00136   }
00137
00138   Image<unsigned char> imageHSV(size,size,3);
00139   ImageConvert::Convert(im,imageHSV,ImageBase::CM_HSV);
00140
00141   cerr<<"-------------------------------------------------------"<<endl;
00142   cerr<<"corresonding HSV channels: ";
00143   cerr<<"hue , saturation and value"<<endl;
00144   // copy channels of the imageHSV into original
00145   unsigned char **idaHSV=imageHSV.GetImageDataArray();
00146   for (c=0;c<size;c++) {
00147     for (r=0;r< block_field_size;r++) {
00148       // Hue
00149       ida[r/2+block_field_size+20][c*3 + 0] = idaHSV[r][c*3 + 0];
00150       ida[r/2+block_field_size+20][c*3 + 1] = idaHSV[r][c*3 + 0];
00151       ida[r/2+block_field_size+20][c*3 + 2] = idaHSV[r][c*3 + 0];
00152       // Saturation
00153       ida[r/2+2*block_field_size+20][c*3 + 0] = idaHSV[r][c*3 + 1];
00154       ida[r/2+2*block_field_size+20][c*3 + 1] = idaHSV[r][c*3 + 1];
00155       ida[r/2+2*block_field_size+20][c*3 + 2] = idaHSV[r][c*3 + 1];
00156       // Value
00157       ida[r/2+3*block_field_size+20][c*3 + 0] = idaHSV[r][c*3 + 2];
00158       ida[r/2+3*block_field_size+20][c*3 + 1] = idaHSV[r][c*3 + 2];
00159       ida[r/2+3*block_field_size+20][c*3 + 2] = idaHSV[r][c*3 + 2];
00160     }
00161   }
00162
00163
00164   if (ImageIO::Write("imageHSVExample", im)!=0){
00165     BIASERR("error writing image ");
00166     return -2;
00167   }
00168
00169   if (ImageIO::ExportImage("imageHSVExample", im, ImageIO::FF_ppm)!=0){
00170     BIASERR("error exporting image ");
00171     return -2;
00172   }
00173   cerr<<"image data written to file: imageHSVExample. ppm/mip"<<endl;
00174   return 0;
00175 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageAttributes.cpp Source File

Base » Image » Examples

ExampleImageAttributes.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <string>
00003
00004 #include <Base/Image/ImageAttributes.hh>
00005
00006 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
00007 #  error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
00008 #endif
00009
00010 /**
00011  @example ExampleImageAttributes.cpp
00012  Access Image attrobute susing ImageMagick,
00013  e.g. timestamp, focal length, shutter times automatically written to Jpeg header by digital cameras.
00014  @author Jan Woetzel
00015 */
00016
00017
00018 using namespace std;
00019 using namespace BIAS;
00020
00021
00022 void usage(int argc, char** argv) {
00023     cerr<<"started ";
00024     if (argc>0) cerr<<argv[0]<<endl;
00025     cerr<<"usage: "<<endl
00026         <<argv[0]<<" <image-filename.jpg>"<<endl;
00027 }
00028
00029
00030 int main(int argc, char** argv)
00031 {
00032   if (argc!=2) {
00033     usage(argc, argv);
00034     return 0;
00035   };
00036
00037   string filename("");
00038   BIASASSERT(argc>1);
00039   filename=argv[1];
00040
00041   ImageAttributes attr;
00042   attr.InitExifTags();
00043   attr.Read(filename);
00044   cout<<attr;
00045 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvas.cpp Source File

Gui » Examples

ExampleImageCanvas.cpp

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/ImageCanvas.hh>
00004 #include <Gui/StringConv.hh>
00005 #include <Base/Image/ImageIO.hh>
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010 enum { ID_Quit = 1, ID_About, ID_Load};
00011
00012 class MyApp: public wxApp
00013 {
00014   virtual bool OnInit();
00015 };
00016
00017 IMPLEMENT_APP(MyApp)
00018
00019 class MyFrame: public wxFrame
00020 {
00021 public:
00022
00023   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00024
00025   void OnQuit(wxCommandEvent& event);
00026   void OnAbout(wxCommandEvent& event);
00027   void OnLoad(wxCommandEvent& event);
00028
00029   ImageCanvas *_ic;
00030
00031   DECLARE_EVENT_TABLE()
00032 };
00033
00034 bool MyApp::OnInit()
00035 {
00036   MyFrame *frame = new MyFrame( wxT("ImageCanvas"), wxPoint(50,50),
00037                                 wxSize(450,340) );
00038   frame->Show(TRUE);
00039   SetTopWindow(frame);
00040   return TRUE;
00041 }
00042
00043 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00044   EVT_MENU(ID_Quit, MyFrame::OnQuit)
00045   EVT_MENU(ID_About, MyFrame::OnAbout)
00046   EVT_MENU(ID_Load, MyFrame::OnLoad)
00047 END_EVENT_TABLE()
00048
00049
00050 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00051   : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00052 {
00053   wxMenu *menuFile = new wxMenu;
00054
00055   menuFile->Append( ID_About, wxT("&About...") );
00056   menuFile->Append( ID_Load, wxT("&Load...") );
00057   menuFile->AppendSeparator();
00058   menuFile->Append( ID_Quit, wxT("E&xit") );
00059
00060   wxMenuBar *menuBar = new wxMenuBar;
00061   menuBar->Append(menuFile, wxT("&File"));
00062   SetMenuBar(menuBar);
00063
00064   CreateStatusBar(2);
00065   SetStatusText(wxT("ImageName"), 0);
00066
00067   wxBoxSizer *box=new wxBoxSizer(wxVERTICAL);
00068   _ic=new ImageCanvas(this, GetStatusBar(), 1);
00069   box->Add(_ic, 1, wxALL| wxGROW |wxALIGN_CENTER, 5);
00070   box->SetSizeHints(this);
00071   SetSizer(box);
00072
00073   Image<unsigned char> im;
00074   ImageIO::Load("ucim.pgm", im);
00075   SetStatusText(wxT("ucim.pgm"), 0);
00076   _ic->Show(im, "ucim.pgm");
00077   FitInside();
00078 }
00079
00080 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
00081 { Close(TRUE); }
00082
00083 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
00084 {
00085   wxMessageBox(wxT("This is a wxWindows Hello world sample"),
00086              wxT("About Hello World"), wxOK | wxICON_INFORMATION, this);
00087 }
00088
00089 void MyFrame::OnLoad(wxCommandEvent& WXUNUSED(event))
00090 {
00091   wxFileDialog fileDialog(this, wxT("Choose a file"), wxT("."), wxT("ucim.pgm"));
00092   if (fileDialog.ShowModal() == wxID_OK){
00093     string fname=WxToAscii(fileDialog.GetPath());
00094     Image<unsigned char> im;
00095     if (ImageIO::Load(fname, im)!=0){
00096       BIASERR("errro loading "<<fname);
00097     } else {
00098       SetStatusText(fileDialog.GetFilename(), 0);
00099       _ic->Show(im, WxToAscii(fileDialog.GetFilename()));
00100     }
00101   } else {
00102     cerr << "canceled loadin image" << endl;
00103   }
00104 }
00105
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasEnhanced.cpp Source File

Gui » Examples

ExampleImageCanvasEnhanced.cpp

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/ImageCanvasEnhanced.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <Gui/StringConv.hh>
00006 using namespace BIAS;
00007 using namespace std;
00008
00009 enum { ID_Quit = 1, ID_About, ID_Load, ID_Rect};
00010
00011 class MyApp: public wxApp
00012 {
00013   virtual bool OnInit();
00014 };
00015
00016 IMPLEMENT_APP(MyApp)
00017
00018 class MyFrame: public wxFrame, public ICECallbackInterface
00019 {
00020 public:
00021
00022   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00023
00024   void OnQuit(wxCommandEvent& event);
00025   void OnAbout(wxCommandEvent& event);
00026   void OnLoad(wxCommandEvent& event);
00027   void OnRect(wxCommandEvent& event);
00028
00029   virtual void RectangleSelected(int tl[2], int br[2]);
00030
00031   ImageCanvasEnhanced *_ic;
00032
00033   DECLARE_EVENT_TABLE()
00034 };
00035
00036 bool MyApp::OnInit()
00037 {
00038   MyFrame *frame = new MyFrame( AsciiToWx("ImageCanvasEnhanced"), wxPoint(50,50),
00039                                 wxSize(450,340) );
00040   frame->Show(TRUE);
00041   SetTopWindow(frame);
00042   return TRUE;
00043 }
00044
00045 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00046   EVT_MENU(ID_Quit, MyFrame::OnQuit)
00047   EVT_MENU(ID_About, MyFrame::OnAbout)
00048   EVT_MENU(ID_Load, MyFrame::OnLoad)
00049   EVT_MENU(ID_Rect, MyFrame::OnRect)
00050 END_EVENT_TABLE()
00051
00052
00053 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00054   : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00055 {
00056   wxMenu *menuFile = new wxMenu;
00057
00058   menuFile->Append( ID_About, AsciiToWx("&About...") );
00059   menuFile->Append( ID_Load, AsciiToWx("&Load...") );
00060   menuFile->Append( ID_Rect, AsciiToWx("&Rect...") );
00061   menuFile->AppendSeparator();
00062   menuFile->Append( ID_Quit, AsciiToWx("E&xit") );
00063
00064   wxMenuBar *menuBar = new wxMenuBar;
00065   menuBar->Append(menuFile, AsciiToWx("&File") );
00066   SetMenuBar(menuBar);
00067
00068   CreateStatusBar(2);
00069   SetStatusText(AsciiToWx("ImageName"), 0);
00070
00071   wxBoxSizer *box=new wxBoxSizer(wxVERTICAL);
00072   _ic=new ImageCanvasEnhanced(this, GetStatusBar(), 1);
00073   box->Add(_ic, 1, wxALL| wxGROW |wxALIGN_CENTER, 5);
00074   box->SetSizeHints(this);
00075   SetSizer(box);
00076
00077   Image<unsigned char> im;
00078   ImageIO::Load("ucim.pgm", im);
00079   SetStatusText(AsciiToWx("ucim.pgm"), 0);
00080   _ic->Show(im, "ucim.pgm");
00081   FitInside();
00082 }
00083
00084 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
00085 { Close(TRUE); }
00086
00087 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
00088 {
00089   wxMessageBox(AsciiToWx("This is a wxWindows Hello world sample"),
00090              AsciiToWx("About Hello World")
00091            , wxOK | wxICON_INFORMATION, this);
00092 }
00093
00094 void MyFrame::OnLoad(wxCommandEvent& WXUNUSED(event))
00095 {
00096   wxFileDialog fileDialog(this, AsciiToWx("Choose a file"), AsciiToWx("."),
00097               AsciiToWx("ucim.pgm"));
00098   if (fileDialog.ShowModal() == wxID_OK){
00099     string fname=WxToAscii(fileDialog.GetPath());
00100     Image<unsigned char> im;
00101     if (ImageIO::Load(fname, im)!=0){
00102       BIASERR("error loading "<<fname);
00103     } else {
00104       SetStatusText(fileDialog.GetFilename(), 0);
00105       _ic->Show(im, WxToAscii(fileDialog.GetFilename()));
00106     }
00107   } else {
00108     cerr << "canceled loadin image" << endl;
00109   }
00110 }
00111
00112 void MyFrame::OnRect(wxCommandEvent& WXUNUSED(event))
00113 {
00114   _ic->SelectRectangle(*this);
00115 }
00116
00117 void MyFrame::RectangleSelected(int tl[2], int br[2])
00118 {
00119   cerr << "finished select rectangle: ("<<tl[0]<<", "<<tl[1]<<")  <->  ("
00120        <<br[0]<<", "<<br[1]<<")\n";
00121 }
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasFloat.cpp Source File

Gui » Examples

ExampleImageCanvasFloat.cpp

Go to the documentation of this file.
00001
00002 #include <wx/wx.h>
00003
00004 #include <Gui/ImageCanvas.hh>
00005 #include <Gui/StringConv.hh>
00006 #include <Base/Image/ImageIO.hh>
00007
00008 using namespace BIAS;
00009 using namespace std;
00010
00011 enum { ID_Quit = 1, ID_About, ID_Load};
00012
00013 class MyApp: public wxApp
00014 {
00015   virtual bool OnInit();
00016 };
00017
00018 IMPLEMENT_APP(MyApp)
00019
00020 class MyFrame: public wxFrame
00021 {
00022 public:
00023
00024   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00025
00026   void OnQuit(wxCommandEvent& event);
00027   void OnAbout(wxCommandEvent& event);
00028   void OnLoad(wxCommandEvent& event);
00029
00030   ScaledImageCanvas *_ic;
00031
00032   DECLARE_EVENT_TABLE()
00033 };
00034
00035 bool MyApp::OnInit()
00036 {
00037   MyFrame *frame = new MyFrame( wxT("ImageCanvas"), wxPoint(50,50),
00038                                 wxSize(450,340) );
00039
00040   if (argc>1) {
00041     BIASASSERT(frame!=NULL);
00042     string filename(WxToAscii(argv[1]));
00043     ImageBase img;
00044     //Image<float> im;
00045     if (ImageIO::Load(filename, img)!=0){
00046       BIASERR("error loading "<<filename<<endl);
00047     } else {
00048       // OK
00049       //frame->SetStatusText("trying to load "+filename);
00050       BIASASSERT(frame->_ic != NULL);
00051       frame->_ic->Show(img, filename.c_str() );
00052       cout<<"loaded image file "<<filename<<" successfully."<<endl;
00053       //frame->SetStatusText("loaded "+filename);
00054     }
00055   };
00056   frame->Show(TRUE);
00057   SetTopWindow(frame);
00058   return TRUE;
00059 }
00060
00061 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00062   EVT_MENU(ID_Quit, MyFrame::OnQuit)
00063   EVT_MENU(ID_About, MyFrame::OnAbout)
00064   EVT_MENU(ID_Load, MyFrame::OnLoad)
00065 END_EVENT_TABLE()
00066
00067
00068 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00069   : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00070 {
00071   wxMenu *menuFile = new wxMenu;
00072
00073   menuFile->Append( ID_About, wxT("&About...") );
00074   menuFile->Append( ID_Load, wxT("&Load...") );
00075   menuFile->AppendSeparator();
00076   menuFile->Append( ID_Quit, wxT("E&xit") );
00077
00078   wxMenuBar *menuBar = new wxMenuBar;
00079   menuBar->Append(menuFile, wxT("&File"));
00080
00081   SetMenuBar(menuBar);
00082
00083   CreateStatusBar(2);
00084   SetStatusText(wxT("ImageName"), 0);
00085
00086   wxBoxSizer *box=new wxBoxSizer(wxVERTICAL);
00087
00088   _ic=new ScaledImageCanvas(this, GetStatusBar(), 1);
00089   box->Add(_ic, 1, wxALL| wxGROW, 5);
00090   box->SetSizeHints(this);
00091   SetSizer(box);
00092 }
00093
00094 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
00095 { Close(TRUE); }
00096
00097 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
00098 {
00099   wxMessageBox(wxT("This is a wxWindows Hello world sample"),
00100              wxT("About Hello World"), wxOK | wxICON_INFORMATION, this);
00101 }
00102
00103 void MyFrame::OnLoad(wxCommandEvent& WXUNUSED(event))
00104 {
00105   wxFileDialog fileDialog(this, wxT("Choose a file"), wxT("."), wxT(""));
00106   if (fileDialog.ShowModal() == wxID_OK){
00107     string fname=WxToAscii(fileDialog.GetPath());
00108     Image<float> im;
00109     if (ImageIO::Load(fname, im)!=0){
00110       BIASERR("errro loading "<<fname<<"\nshould a be float image");
00111     } else {
00112       SetStatusText(fileDialog.GetFilename().c_str(), 0);
00113       _ic->Show(im, WxToAscii(fileDialog.GetFilename()));
00114     }
00115   } else {
00116     cerr << "canceled loadin image" << endl;
00117   }
00118 }
00119
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasGLBase.cpp Source File

Gui » Examples

ExampleImageCanvasGLBase.cpp

Go to the documentation of this file.
00001 /** Simple example for BIAS::ImageCanvasGLBase(Base) usage.
00002 @author: Jan Woetzel */
00003 #include <bias_config.h>
00004
00005 #include <Base/Common/LeakChecking.h>
00006
00007 #include "ExampleImageCanvasGLBase.hh"
00008
00009 // BIAS
00010 #include <Gui/ConsoleRedirectIO.hh>
00011 #include <Base/Image/Image.hh>
00012 #include <Base/Image/ImageIO.hh>
00013
00014 // WX
00015 #include <wx/sizer.h>
00016 #include <wx/log.h>
00017
00018
00019
00020
00021 using namespace std;
00022
00023 // required for wx RTTI dynamic construction:
00024 IMPLEMENT_APP(ExampleImageCanvasGLBaseApp)
00025
00026 // --------------------------------------------------------
00027
00028 bool ExampleImageCanvasGLBaseApp::OnInit()
00029 {
00030     // utility: create a Redirection console for cout, cerr etc.
00031     ConsoleRedirectIO();
00032     // testing output:
00033     cout<<"Hello cout"<<endl;
00034     cout<<"Hello cerr"<<endl;
00035
00036     MyFrame *frame = new MyFrame( wxT("ExampleImageCanvasGLBase"), wxPoint(0,0), wxSize(640,480) );
00037     frame->Show(TRUE);
00038     SetTopWindow(frame);
00039
00040     return TRUE;
00041 }
00042
00043
00044 // --------------------------------------------------------
00045 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00046 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00047 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00048 EVT_MENU(ID_LOADIMAGE, MyFrame::OnLoadImage)
00049 END_EVENT_TABLE()
00050 // --------------------------------------------------------
00051
00052
00053 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00054 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00055 ,p_canvas1(NULL)
00056 ,p_canvas2(NULL)
00057 {
00058     // Create a simple top Menu
00059     wxMenu *menuFile = new wxMenu;
00060     menuFile->Append( ID_ABOUT, wxT("&About...") );
00061
00062     menuFile->Append( ID_LOADIMAGE, wxT("&Load Image...\tCtrl-L") );
00063
00064     menuFile->AppendSeparator();
00065     menuFile->Append( ID_QUIT, wxT("E&xit") );
00066
00067
00068
00069     wxMenuBar *menuBar = new wxMenuBar;
00070     menuBar->Append(menuFile, wxT("&File"));
00071     SetMenuBar(menuBar);
00072
00073     // Create a simple bottom status bar
00074     CreateStatusBar(1);
00075
00076     // Canvas to test:
00077     p_canvas1=new BIAS::ImageCanvasGLBase(this, -1);
00078     // create aseond canvas that shares the GL context:
00079     p_canvas2=new BIAS::ImageCanvasGLBase(this, p_canvas1->GetContext(),-1 );
00080
00081     // put them into sizers:
00082     wxBoxSizer * sizer = new wxBoxSizer(wxHORIZONTAL);
00083     sizer->Add( p_canvas1 ,1,wxEXPAND|wxALL);
00084 #if wxCHECK_VERSION(2, 6, 2)
00085     sizer->AddSpacer(4); // available in 2.6.2 but not 2.4.2 (JW)
00086 #endif
00087     sizer->Add(p_canvas2 ,1,wxEXPAND|wxALL);
00088
00089     // limit min. size:
00090     sizer->SetItemMinSize(p_canvas1, 200,100);
00091     sizer->SetItemMinSize(p_canvas2, 200,100);
00092     sizer->SetSizeHints(this);
00093
00094     // set sizer and triggers Layout()
00095     SetSizerAndFit(sizer);
00096
00097     // now work with the canvases:
00098     // enable Mipmapping just for one of them to see the effect:
00099     p_canvas1->EnableMipMapping(true);
00100
00101
00102     // HACK> context i screate dtoo laet on Linux
00103 #ifdef WIN32
00104   this->LoadImages();
00105 #endif // WIN32
00106
00107     // set the image to display:
00108     //p_canvas1->Set(img);
00109     //p_canvas2->Set(img); // allocates GPU texture meory twice
00110     // TODO: share texobjs "id" instead: See wglShareLists (JW)
00111     //p_canvas2->Set(p_canvas1->GetTexobj() );
00112 }
00113
00114
00115 void MyFrame::OnQuit(wxCommandEvent& ){
00116     Close(TRUE);
00117 }
00118
00119
00120 void MyFrame::OnAbout(wxCommandEvent& )
00121 {
00122     wxString title(wxT("About"));
00123     wxString msg; // message
00124     msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00125     msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00126     msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00127     msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00128     msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00129     msg<<wxT("\n");
00130     COUT(msg);
00131     wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00132 }
00133
00134 void MyFrame::LoadImages()
00135 {
00136   CALLINFO;
00137   // set the image to display:
00138   // an image we want to display using OpenGL:
00139   BIAS::Image<unsigned char> img;
00140   string filename(BIAS_TESTS_DATA "r4.jpg");
00141   if (0!=BIAS::ImageIO::Load( filename,img)){
00142     BIASERR("could not load image"<<filename);
00143     return;
00144   };
00145   cout<<"loaded "<<filename<<" for display "<<endl;
00146
00147   // now work with the canvases:
00148   if (p_canvas1!=NULL) {
00149     // set the image to display:
00150     p_canvas1->Set(img);
00151   } else {
00152     BIASERR("p_canvas1 is NULL");
00153   }
00154
00155   if (p_canvas2!=NULL) {
00156     // set the image to display:
00157     p_canvas2->Set(img);
00158   } else {
00159     BIASERR("p_canvas2 is NULL");
00160   }
00161
00162   COUT(FUNCNAME<<" done."<<endl);
00163 }
00164
00165
00166
00167 void MyFrame::OnLoadImage(wxCommandEvent& )
00168 {
00169   //CALLINFO;
00170   LoadImages();
00171 }
00172
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleImageCanvasGLBase.hh Source File

Gui » Examples

ExampleImageCanvasGLBase.hh

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/ImageCanvasGLBase.hh>
00004
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009
00010 // --------------------------------------------------------
00011 class ExampleImageCanvasGLBaseApp : public wxApp {
00012   virtual bool OnInit();
00013 }; // end of ExampleImageCanvasGLBaseApp -----------------------
00014
00015
00016 enum _ExampleImageCanvasGLBaseMyFrameIDs_ {
00017     ID_ABOUT=wxID_ABOUT,
00018     ID_QUIT,
00019     ID_LOADIMAGE
00020 };
00021
00022
00023 // --------------------------------------------------------
00024
00025 class MyFrame: public wxFrame {
00026 public:
00027   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00028   void OnQuit(wxCommandEvent& event);
00029   void OnAbout(wxCommandEvent& event);
00030
00031   void OnLoadImage(wxCommandEvent& );
00032
00033   /** laod images and update content
00034       on Linux thsi has to be called after initialzation. JW */
00035   void LoadImages();
00036
00037
00038   // data member ---
00039   BIAS::ImageCanvasGLBase * p_canvas1;
00040   BIAS::ImageCanvasGLBase * p_canvas2;
00041
00042
00043   DECLARE_EVENT_TABLE()
00044 }; // end of MyFrame --------------------------------------
00045
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageLoad.cpp Source File

Base » Image » Examples

ExampleImageLoad.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example ExampleImageLoad.cpp
00027  Load an arbitrar yfomrat from disk trying all availbale libraries.
00028  @author Jan Woetzel
00029 */
00030
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Image/ImageIO.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036 int main(int argc, char *argv[])
00037 {
00038
00039   if (argc!=2){
00040       BIASERR("usage: "<<argv[0]<<" <image-file>");
00041     return 0;// for Dart testing
00042   }
00043   ImageBase im;
00044   if (ImageIO::Load(argv[1], im)!=0){
00045     BIASERR("error loading "<<argv[1]);
00046     return 0; // for Dart testing
00047   }
00048   cout <<"UID of loaded image is "<<im.GetUID()<<endl;
00049   if (ImageIO::Write("image.mip", im, false, !im.GetUID().IsValid())!=0){
00050     BIASERR("error writing image.mip");
00051     return 0; // for Dart testing
00052   }
00053   return 0;
00054 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageMagickIO.cpp Source File

Base » Image » Examples

ExampleImageMagickIO.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002
00003 #include <Base/Image/ImageBase.hh>
00004 #include <Base/Image/Image.hh>
00005 #include <Base/Image/ImageIO.hh>
00006
00007 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
00008 #  error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
00009 #endif
00010
00011
00012 using namespace std;
00013 using namespace BIAS;
00014
00015 /**
00016  @example ExampleImageMagickIO.cpp
00017  How to use the ImageMagick IO routines directly
00018  instead of all vailable routines from BIAS::ImageIO::Load
00019  @author Jan Woetzel
00020 */
00021
00022
00023 void usage(int argc, char** argv)
00024 {
00025   cerr<<"usage: ";
00026   if (argc>0) cerr<<argv[0]<<" <image-filename>"<<endl;
00027 }
00028
00029 int main(int argc, char** argv)
00030 {
00031   if (argc!=2) {
00032     usage(argc, argv);
00033     return 0;
00034   };
00035
00036   BIAS::Image<unsigned char> img;
00037   BIASASSERT(argc>1);
00038   string filename=argv[1];
00039
00040   // BIAS::ImageIO::ImportImage(filename, img);
00041   BIAS::ImageIO::ImportMagickPPAutoconvert(filename, img);
00042
00043   BIAS::ImageIO::ExportMagickPP("out_Magick.png", img);
00044   BIAS::ImageIO::ExportMagickPP("out_Magick_default.jpg", img);
00045   // BIAS::ImageIO::WriteMagickPP("out_Magick005.jpg", img, 5);
00046   // BIAS::ImageIO::WriteMagickPP("out_Magick100.jpg", img, 100);
00047
00048   if (BIAS::ImageIO::ExportImage("out_Magick_ExportImage_FF_png.png", img, BIAS::ImageIO::FF_png ) !=BIAS_IO_SUCCESS){
00049     BIASERR("an error occurred using ExportImage");
00050   };
00051
00052   if (BIAS::ImageIO::Write("out_Magick_Write.mip", img ) !=BIAS_IO_SUCCESS){
00053     BIASERR("an error occurred writing mip");
00054   };
00055
00056   cout<<"done"<<endl;
00057   return 0;
00058 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleImageOperator.cpp Source File

Base » Image » Examples

ExampleImageOperator.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Base/Image/ImageIO.hh> // test JW
00028
00029 using namespace std;
00030
00031 //int main(int argc, char *argv[])
00032 int main()
00033 {
00034
00035   BIAS::Image<unsigned char> img1,img2;
00036
00037   img1.Init(320,200);
00038   img2.Init(320,200);
00039
00040   for (unsigned int i=0; i<img1.GetPixelCount(); i+=2) {
00041     img1.GetImageData()[i]=127;
00042     img2.GetImageData()[i]=27;
00043     img1.GetImageData()[i+1]=0;
00044     img2.GetImageData()[i+1]=0;
00045   }
00046
00047   img1 -= img2;
00048   cout<<"img1 size = "<<img1.GetWidth()<<" x "<<img1.GetHeight()<<endl;
00049   cout<<"img1.GetImageDataArray()[5][10]="
00050       <<(int)img1.GetImageDataArray()[5][10]<<endl;
00051
00052   BIAS::ImageIO::Write("tmp_ExampleImageOperator",img1);
00053
00054   return 0;
00055 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleInterpolateLuT.cpp Source File

MathAlgo » Examples

ExampleInterpolateLuT.cpp

Go to the documentation of this file.
00001 #include <Base/Common/BIASpragma.hh>
00002
00003 #include <MathAlgo/Interpolator.hh>
00004 #include <iostream>
00005 #include <vector>
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010 //int main(int argc, char *argv[])
00011 int main()
00012 {
00013   Interpolator spline;
00014
00015   vector<double> AngleCorrX,AngleCorrY;
00016
00017   AngleCorrX.push_back(0); AngleCorrY.push_back(0);
00018   AngleCorrX.push_back(0.138); AngleCorrY.push_back(0.138);
00019   AngleCorrX.push_back(0.424); AngleCorrY.push_back(0.421032);
00020   AngleCorrX.push_back(0.757); AngleCorrY.push_back(0.737318);
00021   AngleCorrX.push_back(1.045); AngleCorrY.push_back(0.983345);
00022   AngleCorrX.push_back(1.342); AngleCorrY.push_back(1.20646);
00023   AngleCorrX.push_back(1.436); AngleCorrY.push_back(1.26512);
00024   AngleCorrX.push_back(1.652); AngleCorrY.push_back(1.36786);
00025
00026
00027   spline.SetKnotPoints(AngleCorrX);
00028   spline.SetControlPoints(AngleCorrY);
00029   spline.InitSpline();
00030   double MinAngle;
00031   spline.Spline(MinAngle, AngleCorrX[0],4);
00032   double MaxCamAngle = AngleCorrX[AngleCorrX.size()-1];
00033
00034   cout <<"CamAngle range: ["<<MinAngle<<" , "<<MaxCamAngle*180.0/M_PI<<"]"<<endl;
00035
00036   spline.PrepareLuTSpline(MinAngle-1, MaxCamAngle, 20);
00037   double ang;
00038  int res =  spline.SplineFromLuT(ang, -0.5 );
00039  if (res <0) cout <<"Out of range"<<endl;
00040
00041   return 0;
00042 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleInterpolation.cpp Source File

Base » Image » Examples

ExampleInterpolation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Base/Image/ImageIO.hh>
00028
00029 #define OFFX 0.3
00030 #define OFFY 0.2
00031
00032 using namespace BIAS;
00033 using namespace std;
00034 int main(int argc, char *argv[])
00035 {
00036
00037   if (argc<2){
00038     BIASERR(argv[0]<<" <image-file>");
00039     return -1;
00040   }
00041
00042   Image<unsigned char> im;
00043   if (ImageIO::Load(argv[1], im)!=0){
00044     BIASERR("error loading "<<argv[1]);
00045     return -2;
00046   }
00047   Image<unsigned char> imcubic(im.GetWidth(),im.GetHeight(),
00048                                im.GetChannelCount());
00049
00050   Image<unsigned char> imbilinear(im.GetWidth(),im.GetHeight(),
00051                                   im.GetChannelCount());
00052
00053
00054   unsigned char **pDc = imcubic.GetImageDataArray();
00055   unsigned char **pDb = imbilinear.GetImageDataArray();
00056
00057   double CurValue = 0;
00058   const unsigned int channelcount = im.GetChannelCount();
00059   for (unsigned int x=2; x<im.GetWidth()-3; x++) {
00060     for (unsigned int y=2; y<im.GetHeight()-3; y++) {
00061       for (unsigned int c=0; c<channelcount; c++) {
00062         CurValue = rint(im.BicubicInterpolation(double(x)+double(OFFX),
00063                                                 double(y)+double(OFFY),
00064                                                 (unsigned short)(c) )
00065                                                 );
00066         if (CurValue<0.0)CurValue = 0.0;
00067         if (CurValue>255.0)CurValue = 255.0;
00068         pDc[y][(x*channelcount)+c] = (unsigned char) CurValue;
00069         CurValue = rint(im.BilinearInterpolation(double(x)+double(OFFX),
00070                                                  double(y)+double(OFFY),
00071                                                  (unsigned short)(c) )
00072                                                  );
00073         if (CurValue<0.0)CurValue = 0.0;
00074         if (CurValue>255.0)CurValue = 255.0;
00075         pDb[y][(x*channelcount)+c] = (unsigned char) CurValue;
00076       }
00077     }
00078   }
00079
00080   if (ImageIO::Write("image_bicubic.mip", imcubic)!=0){
00081     BIASERR("error writing cubic image");
00082     return -3;
00083   }
00084   if (ImageIO::Write("image_bilinear.mip", imbilinear)!=0){
00085     BIASERR("error writing bilinear image");
00086     return -3;
00087   }
00088   return 0;
00089 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIpl.cpp Source File

Base » Image » Examples

ExampleIpl.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 /**
00028  @example ExampleIpl.cpp
00029  OpenCV/IPL image format acces.
00030  @author Ingo Thomsen and Jan Woetzel
00031 */
00032
00033
00034 #include <iostream>
00035
00036 #include <Base/Image/Image.hh>
00037 #include <Base/Image/ImageIO.hh>
00038 #include <Base/Image/ImageConvert.hh>
00039
00040 #ifdef BIAS_HAVE_OPENCV
00041 #  include <highgui.h>
00042 #endif
00043
00044 using namespace BIAS;
00045 using namespace std;
00046
00047 int main(int argc, char *argv[])
00048 {
00049 #ifdef BIAS_HAVE_OPENCV
00050   Image<unsigned char> im, im2;
00051   IplImage *dst=NULL;
00052
00053   if (argc!=2){
00054     BIASERR(argv[0]<<" <image-file>");
00055     return -1;
00056   }
00057
00058   if (ImageIO::Load(argv[1], im)!=0){
00059     BIASERR("error loading "<<argv[1]<<" (Load)");
00060     return -2;
00061   }
00062
00063   if (ImageConvert::BIAS2ipl(im, dst)!=0){
00064     BIASERR("error converting bias -> ipl");
00065     return -2;
00066   }
00067
00068   cvNamedWindow( "window", 1 );
00069   cvShowImage( "window", dst );
00070   const int delay=3000;
00071   //cvWaitKey(0);
00072   std::cout<<"will close gui window after "<<delay<<" msecs."<<endl;
00073   cvWaitKey(4000); // msec
00074   std::cout<<"closed window."<<endl;
00075
00076   if (ImageConvert::Ipl2BIAS(dst, im2)!=0){
00077     BIASERR("error converting ipl -> bias");
00078     return -2;
00079   }
00080
00081   if (ImageIO::Write("out_bias-ipl-bias.mip", im2)!=0){
00082     BIASERR("error writing bias-ipl-bias.mip");
00083     return -1;
00084   }
00085 #else
00086     std::cout<<"you compiled without OpenCV."<<endl;
00087 #endif
00088   return 0;
00089 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplImageDisplay.cpp Source File

Base » Image » Examples

ExampleIplImageDisplay.cpp

Go to the documentation of this file.
00001 /** @example ExampleIplImageDisplay.cpp
00002     howto display a BIAS image using OpenCV.
00003     @author Jan Woetzel 2005
00004 */
00005
00006 #include <iostream>
00007 #include <string>
00008
00009 // BIAS
00010 #include <Base/Image/Image.hh>
00011 #include <Base/Image/ImageIO.hh>
00012
00013 using namespace std;
00014 using namespace BIAS;
00015
00016
00017 int main( int argc, char** argv )
00018 {
00019     //
00020     // load image (prerquisit):
00021     //
00022     bool darttestNoGui=false;
00023     bool darttestGui=false;
00024     int  delay=2000;
00025     string filename( BIAS_TESTS_DATA "r4.jpg" );
00026     if (argc>=2) {
00027         if ((strcmp(argv[1],"-darttest")==0)
00028             || (strcmp(argv[1],"-darttestnogui")==0) )
00029         {
00030             darttestNoGui=true;
00031             std::cout<<"started dart test (no gui): "<<argv[0]<<std::endl;
00032         } else if (strcmp(argv[1],"-darttestgui")==0) {
00033             darttestGui=true;
00034             delay=500; // msec is enough for test
00035             std::cout<<"started dart test (with gui): "<<argv[0]<<std::endl;
00036         }
00037     };
00038     // user specified an image to work with:
00039     if (!darttestNoGui && !darttestGui && (argc>1)) filename=argv[1];
00040     // laod an image to work with
00041     BIAS::Image<unsigned char> img;
00042     if (BIAS::ImageIO::Load(filename, img) !=0){
00043         cout<<"error loading image "<<filename<<endl;
00044         return -1;
00045     };
00046     cout<<"loaded image with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00047
00048
00049     //
00050     // major test: the Display routine:
00051     //
00052     if (!darttestNoGui) {
00053         img.Display("Display", true, true, true, delay );
00054     }
00055
00056     return 0;
00057 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplImageDraw.cpp Source File

Base » Image » Examples

ExampleIplImageDraw.cpp

Go to the documentation of this file.
00001 /** @example ExampleIplImageDraw.cpp
00002     howto use OpenCV draw routines with BIAS.
00003     @author Jan Woetzel 2005
00004 */
00005
00006 #include <iostream>
00007 #include <string>
00008
00009 // BIAS
00010 #include <Base/Image/Image.hh>
00011 #include <Base/Image/ImageIO.hh>
00012 #include <Base/Image/ImageDraw.hh>
00013
00014
00015 using namespace std;
00016 using namespace BIAS;
00017
00018
00019
00020 int main( int argc, char** argv ){
00021     int result=0;
00022     bool darttest=false;
00023     if (argc>=2) if (strcmp(argv[1],"-darttest")==0) {
00024         darttest=true;
00025         std::cout<<"started dart test: "<<argv[0]<<std::endl;
00026     }
00027     //
00028     // load a BIAS image to work with:
00029     //
00030     string filename( BIAS_TESTS_DATA "r4.jpg" );
00031     if (!darttest && (argc>1)) filename=argv[1];
00032     BIAS::Image<unsigned char> img;
00033     if (BIAS::ImageIO::Load(filename, img) !=0){
00034         cout<<"error loading image "<<filename<<endl;
00035         return -1;
00036     };
00037     cout<<"loaded image "<<filename<<" with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00038
00039     //
00040     // OK, work:
00041     //
00042     {
00043         ImageDraw<unsigned char>::Circle(img, 100,100, 90 );
00044         ImageDraw<unsigned char>::Circle(img, 100,150, 40,
00045             COLOR_RED,
00046             5, CV_AA, 0 );
00047         ImageDraw<unsigned char>::Line(img, 10,10, 100,100,
00048             Vector3<unsigned char>(42,12,255),
00049             25, // thickness
00050             CV_AA
00051             );
00052
00053         ImageDraw<unsigned char>::Ellipse(img
00054             ,200,300 // center
00055             ,150, 50 // axes
00056             ,45 // orientation
00057             ,0, 270 // paint angle from..to
00058             ,COLOR_WHITE
00059             ,20
00060             );
00061
00062         ImageDraw<unsigned char>::Rectangle(img,
00063             100,100,
00064             150,200,
00065             COLOR_BLACK,
00066             8
00067             );
00068
00069
00070
00071         ImageDraw<unsigned char>::Text(img, "Hello BIAS! 1234567890 äöüÄÖÜ @+-*~°!", 10,50 );
00072         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp RED",  10, 100, COLOR_RED );
00073         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp GREEN",10, 150, COLOR_GREEN );
00074         ImageDraw<unsigned char>::Text(img, "ExampleIplImageDraw.cpp BLUE", 10, 200, COLOR_BLUE );
00075         ImageDraw<unsigned char>::Text(img, "Renault 4TL rocks ;-)", 10, 250, COLOR_BLUE,
00076             CV_FONT_HERSHEY_SIMPLEX, 1.5, 1.5, 0, 2, CV_AA);
00077         ImageDraw<unsigned char>::Text(img, argv[0] , 0, 300, COLOR_WHITE,
00078             CV_FONT_HERSHEY_PLAIN, 0.8, 1.2, 0, 1, CV_AA);
00079     }
00080
00081     //
00082     // output result:
00083     //
00084     string outFn("out_ExampleIplImageDraw.jpg");
00085     result=BIAS::ImageIO::ExportImage(outFn, img, BIAS::ImageIO::FF_jpg);
00086     //string outFn("out_ExampleIplImageDraw.png");
00087     //result=BIAS::ImageIO::ExportImage(outFn, img, BIAS::ImageIO::FF_png);
00088     if (result==0) cout<<"wrote "<<outFn<<endl;
00089
00090
00091     // ---- Example for Dart attachment adta submission (Jan Woetzel) ----
00092     //
00093     // attach Dart client xml data for submission to dart server (JW):
00094     // jpeg is much smaller.
00095     cout<<endl
00096       //<<"<DartMeasurementFile name=\"outputImage1\" type=\"image/png\">"<<outFn<<"</DartMeasurementFile>"
00097     <<"<DartMeasurementFile name=\"outputImage1\" type=\"image/jpeg\">"<<outFn<<"</DartMeasurementFile>"
00098     <<endl;
00099
00100     return result;
00101 }
00102
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleIplWrapOpenCV.cpp Source File

Base » Image » Examples

ExampleIplWrapOpenCV.cpp

Go to the documentation of this file.
00001 /** @example ExampleIplWrapOpenCV.cpp
00002     howto use the wrapper to use a BIAS imaeg with OpenCV image algorithms.
00003     @author Jan Woetzel 2005
00004 */
00005 #include <Base/Common/LeakChecking.h>
00006
00007 #include <iostream>
00008 #include <string>
00009
00010 // BIAS
00011 #include <Base/Image/Image.hh>
00012 #include <Base/Image/ImageIO.hh>
00013 //#include <Base/Image/ImageConvert.hh>
00014 //#include <Base/Image/ImageDraw.hh>
00015 #include <Base/Image/WrapBias2Ipl.hh>
00016
00017
00018 #include "cv.h"
00019 //#include "highgui.h"
00020
00021 using namespace std;
00022 using namespace BIAS;
00023
00024
00025
00026 int main( int argc, char** argv ){
00027     bool darttest=false;
00028     if (argc>=2) if (strcmp(argv[1],"-darttest")==0) {
00029         darttest=true;
00030         std::cout<<"started dart test: "<<argv[0]<<std::endl;
00031     }
00032
00033     // load a BIAS image to work with:
00034     string filename( BIAS_TESTS_DATA "r4.jpg" );
00035     if (!darttest && (argc>1)) filename=argv[1];
00036     BIAS::Image<unsigned char> img;
00037     if (BIAS::ImageIO::Load(filename, img) !=0){
00038         cout<<"error loading image "<<filename<<endl;
00039         return -1;
00040     };
00041     cout<<"loaded image with dim: "<<img.GetWidth()<<"x"<<img.GetHeight()<<endl;
00042
00043     // wrapper to use BIAS image in OpenCV:
00044     WrapBias2Ipl wrap(&img);
00045
00046     // work:  draw something:
00047     {
00048         cvLine( wrap.p_imgIpl,
00049             cvPoint(-20,0),
00050             cvPoint(200,200),
00051             cvScalar(255, 0, 0),
00052             1, 8, 0 );
00053         cvEllipse( wrap.p_imgIpl,
00054             cvPoint(50,100),
00055             cvSize(20,40),
00056             20,
00057             0, 270,
00058             cvScalar(0,255,0) );
00059
00060         string msg("Hello BIAS world! 1234567890");
00061         int linetype=CV_AA; // antialiased
00062         CvFont font1, font2, font3;
00063         cvInitFont( &font1, CV_FONT_HERSHEY_SIMPLEX,
00064             1.0, 1.0,
00065             0, 1, linetype);
00066         cvInitFont( &font2, CV_FONT_HERSHEY_PLAIN,
00067             1.0, 1.0,
00068             0, 1, 0);
00069         cvInitFont( &font3,
00070             CV_FONT_HERSHEY_COMPLEX, // font name
00071             1.0, // hscale
00072             1.0, // vscale
00073             0,   // shear
00074             2,   // thickness
00075             linetype
00076             );
00077         cvPutText( wrap.p_imgIpl, msg.c_str(),
00078             cvPoint(100,50), &font1, cvScalar(255,0,0) );
00079         cvPutText( wrap.p_imgIpl, msg.c_str(),
00080             cvPoint(100,100), &font2, cvScalar(0,255,0) );
00081         cvPutText( wrap.p_imgIpl, msg.c_str(),
00082             cvPoint(100,150), &font3, cvScalar(0,0,255) );
00083     }
00084
00085     // display using CV routines
00086     // color channel order may be wrong! (use fixed highgui)
00087     // avoid gui display on darttest because it doesn't work on Linux without login.
00088     if (!darttest) wrap.Display(true, 2000);
00089
00090     // output to disk:
00091     //cvSaveImage("out_wrapIPL.jpg", wrap.p_imgIpl);
00092     BIAS::ImageIO::ExportImage("out_ExampleIplWrapOpenCV.jpg", *wrap.p_imgBias, BIAS::ImageIO::FF_jpg);
00093
00094     return 0;
00095 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Examples/ExampleKalman.cpp Source File

StateEstimator » Examples

ExampleKalman.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Math/Random.hh>
00026 #include <StateEstimator/Kalman.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 const double meas_noise = 2.0;
00032 const double process_noise = 1.0;
00033
00034 /** computes the next ground truth system state */
00035 Vector<double> Process(const Matrix<double>& A, const Vector<double>& state,
00036                        const Matrix<double>& process_covariance)
00037 {
00038   Vector<double> res;
00039   res = A * state;
00040   const int dim = res.Size();
00041   Vector<double> noise(dim);
00042   static Random random;
00043   for (int i=0; i<dim; i++){
00044     noise[i] =
00045       random.GetNormalDistributed(0.0, sqrt(process_covariance[i][i]));
00046   }
00047   return res + noise;
00048 }
00049
00050 /** computes noisy measuremenst using the ground truth system state */
00051 void GenerateNoisyMeasurements(const Vector<double>& state,
00052                                const Matrix<double>& H,
00053                                Vector<double>& meas,
00054                                Matrix<double>& meas_cov)
00055 {
00056   Vector<double> gt_meas = H * state;
00057   static Random random;
00058   const int meas_dim = meas.Size();
00059   for (int r=0; r<meas_dim; r++){
00060     double std_dev = random.GetUniformDistributed(0.5, meas_noise*3);
00061     meas_cov[r][r] = std_dev * std_dev;
00062     meas[r] = gt_meas[r] +
00063       random.GetNormalDistributed(0.0, std_dev);
00064     //cout << "meas gt: "<<gt_meas[r]<<" noisy: "<<meas[r]<<endl;
00065   }
00066
00067 }
00068
00069 /** @brief simple example for kalman filter usage
00070     @author woelk 04/2006 */
00071 int main(int /*argc*/, char ** /*argv*/ )
00072 {
00073   const int state_dim = 2;
00074   const int meas_dim = 2;
00075   // the system matrix
00076   const Matrix<double> A(state_dim, state_dim, "1.1 0.1 -0.2 1.1");
00077   // the measurement matrix measurement = H * system_state
00078   const Matrix<double> H(meas_dim, state_dim, "1.0 0.0 0.0 1.0");
00079   //cout << "H: "<<H<<endl;
00080   //cout << "A: "<<A<<endl;
00081
00082   Random random;
00083   Vector<double> pred(state_dim), meas(meas_dim), update(state_dim),
00084     state(state_dim);
00085   Matrix<double> pred_cov(state_dim, state_dim),
00086     meas_cov(meas_dim, meas_dim),
00087     update_cov(state_dim, state_dim),
00088     process_covariance(state_dim, state_dim);
00089
00090   // fill process_covariance randomly
00091   double std_dev;
00092   for (int r=0; r<state_dim; r++){
00093     std_dev = random.GetUniformDistributed(0.5, process_noise);
00094     process_covariance[r][r] = std_dev * std_dev;
00095   }
00096
00097   // initialize the system state and covariance matrix
00098   pred_cov.SetZero();
00099   for (int r=0; r<state_dim; r++){
00100     state[r] = random.GetUniformDistributed(-5.0, 5.0);
00101     std_dev = random.GetUniformDistributed(0.5, meas_noise);
00102     pred_cov[r][r] = std_dev * std_dev;
00103     pred[r] = state[r] +
00104       random.GetNormalDistributed(0.0, std_dev);
00105   }
00106   cout << "# ground truth system state: " << state
00107        << "\n# intial system state guess: " << pred
00108        << "\n# covariance matrix of initial system state guess: "
00109        <<pred_cov<<endl;
00110
00111   Kalman kafi;
00112   kafi.Init(A, H, pred, pred_cov);
00113
00114   const int num_cycles=100;
00115   cout <<"# time\tstate\t\tpred\t\tpred_cov\tmeas\t\tmeas-cov\tup\t\tup-cov\n";
00116   for (int i=0; i<num_cycles; i++){
00117     // predict the ground truth
00118     state = Process(A, state, process_covariance);
00119
00120     // predict the estimator
00121     kafi.Predict(process_covariance);
00122     kafi.GetState(pred);
00123     kafi.GetCovariance(pred_cov);
00124
00125     // generate some synthetic measurements
00126     GenerateNoisyMeasurements(state, H, meas, meas_cov);
00127
00128     // update
00129     kafi.Update(meas, meas_cov);
00130     kafi.GetState(update);
00131     kafi.GetCovariance(update_cov);
00132
00133     cout <<i;
00134     for (int d=0; d<state_dim; d++){
00135       cout <<"\t"<<state[d] << "\t" << pred[d]
00136            <<"\t"<<sqrt(pred_cov[d][d])<< "\t";
00137       if (d<meas_dim){
00138         cout << meas[d] << "\t" << sqrt(meas_cov[d][d]) << "\t" ;
00139       } else {
00140         cout << "nan" << "\t" << "nan" << "\t";
00141       }
00142       cout << update[d] << "\t"
00143            << sqrt(update_cov[d][d]);
00144     }
00145     cout << endl;
00146   }
00147
00148   return 0;
00149 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleKLTEdge.cpp Source File

Matcher2D » Examples

ExampleKLTEdge.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Matcher2D/RegionMatcher.hh>
00027 #include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageDraw.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Geometry/HomgPoint2D.hh>
00031 #include <Base/Debug/TimeMeasure.hh>
00032 #include <Filter/Gradient.hh>
00033
00034 #include <iostream>
00035 #include <iomanip>
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 // ExampleKLTEdge 157 100 ~/cvs/TestData/tracker_noise/image*.pgm
00041 // ExampleKLTEdge 100 157 ~/cvs/TestData/tracker_noise/image*.pgm
00042 // ExampleKLTEdge 139 115 ~/cvs/TestData/tracker_diag_noise/image*.pgm
00043 // ExampleKLTEdge 116 115 ~/cvs/TestData/tracker_diag_noise/image*.pgm
00044
00045
00046 int main(int argc, char*argv[])
00047 {
00048   Image<unsigned char> im[2], gradx, grady, gradNWSE, gradNESW, drawim;
00049   KLT_TYPE p[2][2], error, maxerror=0.02, err, errorsum=0.0;
00050   unsigned int uip[2], rectsize=7;
00051   unsigned int maxiter=10; //, numiter=15;
00052   unsigned int halfwinsize=3;
00053   unsigned int newim, oldim, res;
00054   int counter;
00055   //bool UseErrorAsStopCriterion=true;
00056   bool debug=true;
00057   string file;
00058   bool draw=false;
00059   MetaData *md;
00060   AppData appdata;
00061   HomgPoint2D realpoint;
00062
00063   RegionMatcher matcher;
00064   if (debug) matcher.SetDebugLevel(D_REGION_MATCHER_KLT_EDGE);
00065   Gradient grad;
00066   TimeMeasure timer;
00067   TimeMeasure tc;
00068
00069   if (argc<4){
00070     cerr << argv[0] << " : <x-coo> <y-coo> <image> <image> ..."<< endl;
00071     return -5;
00072   }
00073
00074   p[0][0]=atof(argv[1]);
00075   p[0][1]=atof(argv[2]);
00076
00077   if (ImageIO::Load(argv[3], im[0])!=0){
00078     BIASERR("error loading image "<<argv[3]);
00079     return -1;
00080   }
00081
00082   counter=3;
00083   newim=0;
00084   while (counter < argc-1){
00085     counter++;
00086     newim=(newim==0)?(1):(0);
00087     oldim=(newim==0)?(1):(0);
00088
00089     if (ImageIO::Load(argv[counter], im[newim])!=0){
00090       BIASERR("error loading image "<<argv[counter]);
00091       return -1;
00092     } else {
00093       if (debug)
00094         cout << "--------------- newim: " << argv[counter]
00095              << "  --- oldim: " << argv[counter-1] << endl;
00096       md=im[newim].GetMetaData();
00097       if (md->Find(AppData::MD_HomgPoint2D, "#[HomgPoint2D]", appdata)>=0){
00098         if (appdata.tag==AppData::MD_USE_ASCII){
00099           if (debug) cerr << appdata.stag <<" : "<<appdata.sdata<<endl;
00100           sscanf(appdata.sdata.c_str(), "[ %lf %lf %lf ]",
00101                  &realpoint[0], &realpoint[1], &realpoint[2]);
00102         } else {
00103           memcpy(realpoint.GetData(), appdata.data, appdata.length);
00104         }
00105         if (debug) cerr <<"realpoint is at "<<realpoint<<endl;
00106       } else {
00107         BIASERR("cannot find HomgPoint2D in meta data");
00108       }
00109     }
00110
00111     if (p[oldim][0]<=halfwinsize+3 ||
00112         p[oldim][1]<=halfwinsize+3 ||
00113         p[oldim][0]+halfwinsize+3>=im[oldim].GetWidth()-1 ||
00114         p[oldim][1]+halfwinsize+3>=im[oldim].GetHeight()-1){
00115       cout << "point ("<<p[oldim][0]<<", "<<p[oldim][1]<<") too close to "
00116            <<"image border, stopping"<<endl;
00117       break;
00118     }
00119
00120
00121     grad.SobelWE3(im[oldim], gradx);
00122     grad.SobelNS3(im[oldim], grady);
00123     grad.SobelNWSE3(im[oldim], gradNWSE);
00124     grad.SobelNESW3(im[oldim], gradNESW);
00125     if (debug){
00126       ImageIO::Write("gradWE.mip",gradx);
00127       ImageIO::Write("gradNS.mip",grady);
00128       ImageIO::Write("gradNWSE.mip",gradNWSE);
00129       ImageIO::Write("gradNESW.mip",gradNESW);
00130     }
00131     /*
00132       if (!UseErrorAsStopCriterion){
00133       if (debug) cerr <<"doing "<<numiter<<" iterations"<<endl;
00134       timer.Start();
00135       tc.Start();
00136       res = matcher.KLTEdge(p[oldim], p[oldim], im[oldim].GetImageDataArray(),
00137       im[newim].GetImageDataArray(),
00138       gradx.GetImageDataArray(),
00139       grady.GetImageDataArray(),
00140       gradNWSE.GetImageDataArray(),
00141       gradNESW.GetImageDataArray(),
00142       im[oldim].GetWidth(), im[oldim].GetHeight(),
00143       numiter, p[newim], error);
00144       tc.Stop();
00145       timer.Stop();
00146
00147       } else {
00148     */
00149     if (debug)
00150       cerr <<"using maxerror "<<maxerror<<" as stopping criterion"<<endl;
00151     timer.Start();
00152     tc.Start();
00153     //KLTEdge no such function
00154     /*
00155     res = matcher.KLTEdge(p[oldim], p[oldim], im[oldim].GetImageDataArray(),
00156                           im[newim].GetImageDataArray(),
00157                           gradx.GetImageDataArray(),
00158                           grady.GetImageDataArray(),
00159                           gradNWSE.GetImageDataArray(),
00160                           gradNESW.GetImageDataArray(),
00161                           im[oldim].GetWidth(), im[oldim].GetHeight(),
00162                           maxiter, maxerror, p[newim], error);
00163     */
00164     tc.Stop();
00165     timer.Stop();
00166     //    }
00167
00168     tc.Print();
00169     tc.Reset();
00170
00171     if (res!=0){
00172       BIASERR("error matching");
00173       break;
00174     }
00175     err=sqrt((p[newim][0]-realpoint[0])*(p[newim][0]-realpoint[0])+
00176              (p[newim][1]-realpoint[1])*(p[newim][1]-realpoint[1]));
00177     errorsum+=err;
00178
00179     if (draw){
00180       uip[0]=(unsigned int)rint(p[newim][0]);
00181       uip[1]=(unsigned int)rint(p[newim][1]);
00182       drawim=im[newim];
00183       ImageDraw<unsigned char>::RectangleCenter(drawim, uip, rectsize);
00184
00185       file=argv[counter];
00186       file+=".tracked";
00187       ImageIO::Write(file, drawim);
00188     }
00189     cout << setw(2) << counter-3 << " : (" << p[oldim][0]<<", "<<p[oldim][1]
00190          << ") -> ("<< p[newim][0]<<", "<<p[newim][1]<<")  klt-error: "<<error
00191          <<"   real: ("<<realpoint[0]<<", "<<realpoint[1]
00192          <<")   dist-err: "<<err<<endl;
00193
00194   }
00195   cerr << "errorsum over "<<counter-3<<" images: "<<errorsum<<endl
00196        << "  mean error "<<errorsum/(double)(counter-3)<<endl;
00197
00198   timer.Print();
00199   cerr << "KLT trackin over "<<argc-3<<" images took "<<timer.GetRealTime()
00200        <<" us"
00201        << "\n  this is equal to "<<timer.GetRealTime()/double(argc-3)
00202        <<" us per image and corner" << endl;
00203   return 0;
00204 }
00205
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleLeastSquares.cpp Source File

MathAlgo » Examples

ExampleLeastSquares.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <MathAlgo/LeastSquares.hh>
00027 #include <Base/Math/Random.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 double sigma=5.0;
00034
00035 void GetSystem(Matrix<double>& A, Vector<double>& b, Vector<double>& weight,
00036                Vector<double>& sol, unsigned solsize, unsigned numeq)
00037 {
00038   Random ran;
00039   sol.newsize(solsize);
00040   for (unsigned i=0; i<solsize; i++){
00041     sol[i]=ran.GetUniformDistributed(-10.0, 10.0);
00042   }
00043
00044   A.newsize(numeq, solsize);
00045   for (unsigned i=0; i<solsize*numeq; i++){
00046     A[i/solsize][i%solsize]=ran.GetUniformDistributed(-100.0, 100.0);
00047   }
00048
00049   b.newsize(numeq);
00050   b=A*sol;
00051   for (unsigned i=0; i<numeq; i++){
00052     b[i]+=ran.GetNormalDistributed(0.0, sigma);
00053   }
00054
00055   weight.newsize(numeq);
00056   for (unsigned i=0; i<numeq; i++){
00057     weight[i]=ran.GetNormalDistributed(1.0, 0.5);
00058   }
00059 }
00060
00061 void GetSystem(Matrix<double>& A, Vector<double>& weight,
00062                Vector<double>& sol, unsigned solsize, unsigned numeq)
00063 {
00064   Random ran;
00065   double sum=0.0;
00066   sol.newsize(solsize);
00067   for (unsigned i=0; i<solsize; i++){
00068     sol[i]=ran.GetUniformDistributed(-10.0, 10.0);
00069     sum+=sol[i]*sol[i];
00070   }
00071   sum=sqrt(sum);
00072   for (unsigned i=0; i<solsize; i++){
00073     sol[i]/=sum;
00074   }
00075
00076   A.newsize(numeq, solsize);
00077   for (unsigned r=0; r<numeq; r++){
00078     sum=0.0;
00079     for (unsigned c=0; c<solsize-1; c++){
00080       A[r][c]=ran.GetUniformDistributed(-100.0, 100.0);
00081       sum+=A[r][c]*sol[c];
00082     }
00083     A[r][solsize-1]=-sum/sol[solsize-1];
00084   }
00085
00086   //cerr << "Ax: "<<A*sol<<endl;
00087
00088   for (unsigned r=0; r<numeq; r++){
00089     for (unsigned c=0; c<solsize-1; c++){
00090       A[r][c]+=ran.GetNormalDistributed(0.0, sigma);
00091     }
00092   }
00093
00094   //cerr << "Ax: "<<A*sol<<endl;
00095
00096   weight.newsize(numeq);
00097   for (unsigned i=0; i<numeq; i++){
00098     weight[i]=ran.GetNormalDistributed(1.0, 0.5);
00099   }
00100 }
00101
00102 void TestNoWeightAxb(Matrix<double>& A, Vector<double>& b,
00103                      Vector<double>& sol, unsigned solsize,
00104                      LeastSquaresLapack& lsla, LeastSquaresSVD lssvd)
00105 {
00106   Vector<double> x;
00107
00108   cout << "solution:   ";
00109   for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<<sol[i] << "    "; }
00110   cout << endl;
00111
00112   if (lsla.Solve(A, b, x)==0){
00113     cout << "lapack sol: ";
00114     for (unsigned i=0; i<solsize; i++) { cout<<setw(15)<<x[i]<<"    "; }
00115     cout <<endl;
00116   }
00117   if (lssvd.Solve(A, b, x)==0){
00118     cout << "svd sol:    ";
00119     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00120     cout <<endl;
00121   }
00122 }
00123
00124 void TestWeightAxb(Matrix<double>& A, Vector<double>& b,
00125                    Vector<double> &weight,
00126                    Vector<double>& sol, unsigned solsize,
00127                    LeastSquaresLapack& lsla, LeastSquaresSVD lssvd)
00128 {
00129   Vector<double> x;
00130   cout << "solution:   ";
00131   for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< sol[i] << "    "; }
00132   cout << endl;
00133
00134   if (lsla.WeightedSolve(A, b, weight, x)==0){
00135     cout << "lapack sol: ";
00136     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00137     cout <<endl;
00138   }
00139   if (lssvd.WeightedSolve(A, b, weight, x)==0){
00140     cout << "svd sol:    ";
00141     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00142     cout <<endl;
00143   }
00144
00145 }
00146
00147 void TestNoWeightAx(Matrix<double>& A,
00148                     Vector<double>& sol, unsigned solsize,
00149                     LeastSquaresLapack& lsla, LeastSquaresSVD lssvd)
00150 {
00151   Vector<double> x;
00152
00153   cout << "solution:   ";
00154   for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<<sol[i] << "    "; }
00155   cout << endl;
00156
00157   if (lsla.Solve(A, x)==0){
00158     cout << "lapack sol: ";
00159     for (unsigned i=0; i<solsize; i++) { cout<<setw(15)<<x[i]<<"    "; }
00160     cout <<endl;
00161   }
00162   if (lssvd.Solve(A, x)==0){
00163     cout << "svd sol:    ";
00164     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00165     cout <<endl;
00166   }
00167 }
00168
00169 void TestWeightAx(Matrix<double>& A,
00170                   Vector<double> &weight,
00171                   Vector<double>& sol, unsigned solsize,
00172                    LeastSquaresLapack& lsla, LeastSquaresSVD lssvd)
00173 {
00174   Vector<double> x;
00175   cout << "solution:   ";
00176   for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< sol[i] << "    "; }
00177   cout << endl;
00178
00179   if (lsla.WeightedSolve(A, weight, x)==0){
00180     cout << "lapack sol: ";
00181     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00182     cout <<endl;
00183   }
00184   if (lssvd.WeightedSolve(A, weight, x)==0){
00185     cout << "svd sol:    ";
00186     for (unsigned i=0; i<solsize; i++) { cout <<setw(15)<< x[i] << "    "; }
00187     cout <<endl;
00188   }
00189
00190 }
00191
00192 //int main(int argc, char *argv[])
00193 int main()
00194 {
00195   Matrix<double> A;
00196   Vector<double> b, weight, sol, x;
00197   unsigned solsize=5, numeq=10;
00198
00199   LeastSquaresLapack lsla;
00200   LeastSquaresSVD lssvd;
00201
00202   GetSystem(A, b, weight, sol, solsize, numeq);
00203
00204   lsla.Init(solsize, true);
00205   lssvd.Init(solsize, true);
00206
00207   cout << "\nno weights, reduction to ATA, Ax=b\n";
00208   TestNoWeightAxb(A, b, sol, solsize, lsla, lssvd);
00209
00210   cout << "\nweights, reduction to ATA, Ax=b\n";
00211   TestWeightAxb(A, b, weight, sol, solsize, lsla, lssvd);
00212
00213   lsla.Init(solsize, false);
00214   lssvd.Init(solsize, false);
00215
00216   cout << "\nno weights, no reduction to ATA, Ax=b\n";
00217   TestNoWeightAxb(A, b, sol, solsize, lsla, lssvd);
00218
00219   cout << "\nweights, no reduction to ATA, Ax=b\n";
00220   TestWeightAxb(A, b, weight, sol, solsize, lsla, lssvd);
00221
00222
00223
00224   GetSystem(A, weight, sol, solsize, numeq);
00225
00226   lsla.Init(solsize, true);
00227   lssvd.Init(solsize, true);
00228
00229   cout << "\nno weights, reduction to ATA, Ax=0\n";
00230   TestNoWeightAx(A, sol, solsize, lsla, lssvd);
00231
00232   cout << "\nweights, reduction to ATA, Ax=0\n";
00233   TestWeightAx(A, weight, sol, solsize, lsla, lssvd);
00234
00235   lsla.Init(solsize, false);
00236   lssvd.Init(solsize, false);
00237
00238   cout << "\nno weights, no reduction to ATA, Ax=0\n";
00239   TestNoWeightAx(A, sol, solsize, lsla, lssvd);
00240
00241   cout << "\nweights, no reduction to ATA, Ax=0\n";
00242   TestWeightAx(A, weight, sol, solsize, lsla, lssvd);
00243
00244
00245
00246
00247  return 0;
00248 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleLineMatcher.cpp Source File

Matcher2D » Examples

ExampleLineMatcher.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Matcher2D/RegionMatcher.hh>
00027 #include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030
00031 //#include <Filter/Gradient.hh>
00032 //#include <Filter/GradientSimple.hh>
00033 #include <Filter/GradientSobel3x3.hh>
00034
00035 #include <Base/Math/Random.hh>
00036 #include <Base/Debug/TimeMeasure.hh>
00037
00038 #include <iostream>
00039 #include <iomanip>
00040 #include <math.h>
00041
00042 using namespace BIAS;
00043 using namespace std;
00044
00045 // storage type(s) for filter and image templates
00046 //#define InST char
00047 #define InST float
00048 //#define OutST char
00049 #define OutST float
00050
00051
00052
00053 int main(int argc, char*argv[])
00054 {
00055     Image<unsigned char> inputUC;
00056     Image<InST> im1, im2;
00057
00058     Image<OutST> grad1, grad2;
00059     unsigned int p1[2], start[2], end[2];
00060     unsigned int halfwinsize=7;
00061     unsigned int epsilon=2;
00062     double gradientscale=0.5;
00063     unsigned int result[2];
00064     double correlation=-1.0;
00065     unsigned int offset=epsilon+halfwinsize;
00066     int grad_threshold=2;
00067     int res;
00068     bool UseSAD=false;
00069
00070     RegionMatcher matcher;
00071     //matcher.SetDebugLevel(D_REGION_MATCHER_LINE);
00072     //Gradient grad;
00073     //GradientSimple<int, int> grad;
00074     GradientSobel3x3<InST, OutST> grad;
00075
00076     Random rand;
00077     double angle=rand.GetUniformDistributed(0.0, M_PI);
00078     double length1, length2;
00079     int count = 10000;
00080     int maxlength, maxlength2;
00081     bool debug=false;
00082     int debuglevel=0;
00083     TimeMeasure timerNCC, timerSAD;
00084
00085     if (argc<2){
00086         cerr << argv[0] << " : <image> ..."<< endl;
00087         return -5;
00088     }
00089
00090     if (ImageIO::Load(argv[1], inputUC)!=0){
00091         BIASERR("error loading image "<<argv[1]);
00092         return -1;
00093     }
00094     //BIAS::ImageConvert::ConvertST(inputUC, im1, BIAS::ImageBase::ST_char);
00095     BIAS::ImageConvert::ConvertST(inputUC, im1, BIAS::ImageBase::ST_float);
00096     im1=inputUC;
00097     im2=im1;
00098
00099     //grad.Sobel3Norm2(im1, grad1);
00100     grad.Filter(im1,grad1);
00101     grad2=grad1;
00102
00103     if (ImageIO::Write("grad", grad1)!=0){
00104         BIASERR("error writing image grad.mip");
00105         return -1;
00106     }
00107
00108     for (int i=0; i< count; i++){
00109
00110         do{
00111             p1[0]=rand.GetUniformDistributedInt((int)offset,
00112                 (int)im1.GetWidth()-1-(int)offset);
00113             p1[1]=rand.GetUniformDistributedInt((int)offset,
00114                 (int)im1.GetHeight()-1-(int)offset);
00115         } while (grad1.GetImageDataArray()[p1[1]][p1[0]]<grad_threshold );
00116
00117         if (debuglevel>=2)
00118             cout << i<<":\tp1: "<<p1[0]<<" "<<p1[1]<<endl;
00119         maxlength=
00120             ((int)p1[0]-(int)offset>(int)im1.GetWidth()-(int)offset-(int)p1[0]-1) ?
00121             (int)im1.GetWidth()-(int)offset-(int)p1[0]-1 : (int)p1[0]-(int)offset ;
00122         maxlength2=
00123             ((int)p1[1]-(int)offset>(int)im1.GetHeight()-(int)offset-(int)p1[1]-1) ?
00124             (int)im1.GetHeight()-(int)offset-(int)p1[1]-1 : (int)p1[1]-(int)offset ;
00125         maxlength=(maxlength>maxlength2)?maxlength2:maxlength;
00126         if (debuglevel>=2)
00127             cout << "p1: "<<p1[0]<<" "<<p1[1]<<"\tmaxlength: "<<maxlength<<endl;
00128         length1=rand.GetUniformDistributedInt(0, maxlength);
00129         start[0]=(unsigned int)rint((int)p1[0]+sin(angle)*length1);
00130         start[1]=(unsigned int)rint((int)p1[1]+cos(angle)*length1);
00131         length2=rand.GetUniformDistributedInt(0, maxlength);
00132         end[0]=(unsigned int)rint((int)p1[0]-sin(angle)*length2);
00133         end[1]=(unsigned int)rint((int)p1[1]-cos(angle)*length2);
00134
00135         if (debuglevel>=2)
00136             cout << "searching between "
00137             <<start[0]<<" "<<start[1]<<" and "<<end[0]<<" "<<end[1]<<endl;
00138
00139         int mycount=1;
00140         //if (UseSAD){
00141         timerSAD.Start();
00142         for (int k=0; k<mycount; k++){
00143             if (matcher.LineMatcherSAD<OutST>(
00144                 p1, start, end,
00145                 im1.GetImageDataArray(),
00146                 im2.GetImageDataArray(),
00147                 grad1.GetImageDataArray(),
00148                 grad2.GetImageDataArray(),
00149                 halfwinsize,
00150                 epsilon, gradientscale, result,
00151                 correlation)
00152                 !=0)
00153             {
00154                 BIASERR("error in LineMatcherNCC");
00155                 return -2;
00156             };
00157         }
00158         timerSAD.Stop();
00159         cout << "SAD took "<<timerSAD.GetUserTime()/mycount<<" ms"<<endl;
00160         // } else {
00161         timerNCC.Start();
00162         for (int k=0; k<mycount; k++){
00163             if (matcher.LineMatcherNCC(p1, start, end, im1.GetImageDataArray(),
00164                 im2.GetImageDataArray(),
00165                 grad1.GetImageDataArray(),
00166                 grad2.GetImageDataArray(), halfwinsize,
00167                 epsilon, gradientscale, result,
00168                 correlation)!=0){
00169                     BIASERR("error in LineMatcherNCC");
00170                     return -2;
00171                 };
00172         }
00173         timerNCC.Stop();
00174         cout << "NCC took "<<timerNCC.GetUserTime()/mycount<<" ms"<<endl;
00175         //}
00176
00177         if (debuglevel>=1)
00178             cout << "correspondence to "<<p1[0]<<" "<<p1[1]<<" searched between "
00179             <<start[0]<<" "<<start[1]<<" and "<<end[0]<<" "<<end[1]<<" is at "
00180             <<result[0]<<" "<<result[1]<<" with correlation "<<correlation
00181             <<endl;
00182
00183         if ((result[0]!=p1[0])||(result[1]!=p1[1])){
00184             cerr << "\n\n***********\n\nerror, found wrong result\n\n***********\n\n"<<endl;
00185             debug=true;
00186         } else {
00187             if (UseSAD){
00188                 if (correlation>0.1) debug=true;
00189                 else debug=false;
00190             } else {
00191                 if (correlation<1.0) debug=true;
00192                 else debug = false;
00193             }
00194         }
00195         if (debug){
00196             cerr << "staring debug: "<<endl;
00197             matcher.SetDebugLevel(D_REGION_MATCHER_LINE);
00198             if (UseSAD){
00199                 if ((res =matcher.LineMatcherSAD(p1, start, end,
00200                     im1.GetImageDataArray(),
00201                     im2.GetImageDataArray(),
00202                     grad1.GetImageDataArray(),
00203                     grad2.GetImageDataArray(),
00204                     halfwinsize,
00205                     epsilon, gradientscale, result,
00206                     correlation))!=0){
00207                         BIASERR("error in LineMatcherSAD "<<res);
00208                     };
00209             } else {
00210                 if ((res =matcher.LineMatcherNCC(p1, start, end,
00211                     im1.GetImageDataArray(),
00212                     im2.GetImageDataArray(),
00213                     grad1.GetImageDataArray(),
00214                     grad2.GetImageDataArray(),
00215                     halfwinsize,
00216                     epsilon, gradientscale, result,
00217                     correlation))!=0){
00218                         BIASERR("error in LineMatcherNCC "<<res);
00219                     };
00220             }
00221
00222             matcher.SetDebugLevel(0);
00223         }
00224
00225     }; // for
00226     cout << "sum NCC took "<<timerNCC.GetUserTime()<<" ms"<<endl
00227         << "sum SAD took "<<timerSAD.GetUserTime()<<" ms"<<endl;
00228
00229     return 0;
00230 }
00231
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleLoadBan.cpp Source File

Base » Math » Examples

ExampleLoadBan.cpp

Go to the documentation of this file.
00001 ///
00002 /// @example ExampleLoadBan.cpp
00003 /// @brief load 3x4 matrix from Boujou .ban file
00004 ///
00005 /// And this example demonstrates Dart usage:
00006 ///
00007 /// how to generate a runtime test by comparing against reference values and submit results to Dart server dashboard.
00008 ///
00009 /// @author Jan Woetzel
00010 ///
00011
00012
00013 #include <Base/Common/LeakChecking.h>
00014
00015
00016 // STD
00017 #include <iostream>
00018 #include <fstream>
00019 #include <sstream>
00020 #include <string>
00021
00022 // BIAS
00023 #include <bias_config.h>
00024 #include <Base/Math/Matrix3x4.hh>
00025 #include <Base/Math/Vector.hh>
00026
00027 using namespace std;
00028 using namespace BIAS;
00029
00030 #include <Base/Common/BIASpragma.hh>
00031
00032
00033
00034 int main(int argc, char* argv[] )
00035 {
00036     int result=0;
00037     BIASASSERT(argc>0);
00038     cout<<"Starting "<<argv[0]<<endl;
00039 #ifdef BIAS_TESTS_DATA
00040     //string filename="calib01.ban";
00041     //string filename(BIAS_TESTS_DATA "calib01.ban");
00042     string filename;
00043     filename  = string(BIAS_TESTS_DATA);
00044     filename += "calib01.ban";
00045 #else
00046     string filename;
00047     cout<<"BIAS_TESTS_DATA not defined."<<endl;
00048     return -1;
00049 #endif
00050
00051     BIAS::Matrix3x4<double> A;
00052
00053     //
00054     // first test: load Time=2 Matrix from ban file:
00055     //
00056     // load one 3x4 matrix from .ban file containing multiple P's
00057     cout<<"trying to load "<<filename<<endl;
00058     result = A .LoadBan(filename, 2);
00059     if (result==0){
00060         cout<<"successfully loaded "<<filename<<endl
00061             <<"A: "<<A<<endl;
00062     } else {
00063         cout<<"Error. couls not load "<<filename<<endl;
00064         result = -2000;
00065         return result;
00066     };
00067
00068     //
00069     // second test: are the values correct?
00070     //
00071     const double v[12] = {
00072         405.1, -0.0678595, -96.8174, 3800.26,
00073             -2.10686, -202.721, -68.4048, 3483.67,
00074             -0.00379941, 0.00217521, -0.171449, 7.94237 };
00075
00076         cout<<"DBG reference v is: "<<endl;
00077         for (unsigned int i=0; i<12;i++) cout<<v[i]<<" ";
00078         cout<<endl;
00079         const double eps=1E-10; // desired precision
00080         for (unsigned int i=0; i<12; i++) {
00081             if (fabs(v[i] - A.GetData()[i]) >eps){
00082                 cout<<"Error: mismatch for element "<<i<<" : "<<endl
00083                     <<"should be: "<<v[i]
00084                     <<"but read : "<<A.GetData()[i]
00085                     <<endl;
00086                     result += -1*i;
00087             }
00088         }
00089
00090         //
00091         // third test: this should fail because only 0,1,2 are inside the file
00092         //
00093         int errCode = A.LoadBan(filename, 3);
00094         if (errCode == 0){
00095             cout<<"Error: acces to Time 3 should return error but didn't."<<endl;
00096             result += -100;
00097         };
00098
00099         cout<<"done with result = "<<result<<endl;
00100         return result;
00101 }
00102
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleLoadBBC.cpp Source File

Geometry » Examples

ExampleLoadBBC.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // BIAS
00026 #include <Geometry/PMatrix.hh>
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Geometry/KMatrix.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034 int main(int argc, char *argv[]) {
00035   PMatrix P;
00036   KMatrix K;
00037
00038   cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ExampleLoadBBC $$$$$$$$$$$$$$$$$$$$$$"
00039        << endl;
00040   if (argc<2) {
00041     cout<<"Usage: ExampleLoadBBC <filename>"<<endl;
00042     exit(1);
00043   }
00044
00045   cout <<"Loading  BBC-Free-D data from file: "<<argv[1]<<endl;
00046
00047   P.LoadBBC(argv[1]);
00048
00049   cout <<"P : "<<P<<endl;
00050   cout <<"K: "<<P.GetK()<<endl;
00051   cout <<"R: "<<P.GetR()<<endl;
00052   cout <<"C: "<<P.GetC()<<endl;
00053
00054   return 0;
00055 }
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleLoadBOG.cpp Source File

Base » Math » Examples

ExampleLoadBOG.cpp

Go to the documentation of this file.
00001
00002 /// @example ExampleLoadBOG.cpp
00003 /// Shows how to read the BOG format which is used by DaimlerChrysler.
00004 /// @author Jan Woetzel
00005 ///
00006
00007
00008 // STD
00009 #include <Base/Common/BIASpragma.hh>
00010
00011 #include <iostream>
00012 #include <fstream>
00013 #include <string>
00014 #include <vector>
00015
00016
00017 // BIAS
00018 #include <Base/Math/Vector3.hh>
00019 #include <Base/Math/Matrix3x3.hh>
00020
00021
00022 using namespace std;
00023 using namespace BIAS;
00024
00025 // entry JW
00026 int main(int argc, char** argv){
00027     cout<<"started "<<argv[0]<<endl;
00028 #ifdef BIAS_TESTS_DATA
00029     string filename(BIAS_TESTS_DATA "calib01.bog");
00030 #else
00031     string filename("calib01.bog");
00032     cout<<"BIAS_TESTS_DATA  not defined."<<endl;
00033     return -1;
00034 #endif
00035     if (argc>1) filename=argv[1];
00036     cout<<"using filename "<<filename<<endl;
00037
00038     //bool ok=true;
00039
00040     Vector3<double> C;
00041     if (0!=C.LoadBogTC(filename)) return -2;
00042     cout<<"C: "<<C<<endl;
00043
00044     Matrix3x3<double> R;
00045     if (0!=R.LoadBogRC(filename)) return -3;
00046     cout<<"R: "<<R<<endl;
00047
00048     Matrix3x3<double> K;
00049     if (0!=K.LoadBogK(filename)) return -3;
00050     cout<<"K: "<<K<<endl;
00051
00052     // check values for correctness:
00053     int result=0;
00054     const double v[3] = { -317.4137573 , 0.4055223 , -3.9081306 };
00055     const double eps=1E-10; // desired precision
00056     for (unsigned int i=0; i<3; i++) {
00057         if (fabs(v[i] - C.GetData()[i]) >eps){
00058            cout<<"Error: mismatch for element "<<i<<" : "<<endl
00059                     <<" should be: "<<v[i]
00060                     <<" but read : "<<C.GetData()[i]
00061                     <<endl;
00062                     result += -1*i;
00063             }
00064         }
00065     cout<<"done with result="<<result<<endl;
00066     return result; // OK.
00067 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleLoadBOG_P.cpp Source File

Geometry » Examples

ExampleLoadBOG_P.cpp

Go to the documentation of this file.
00001 ///
00002 /// test Daimler .bog reader
00003 /// Jan Woetzel
00004 ///
00005
00006 #include <Base/Common/BIASpragma.hh>
00007
00008 // STD
00009 #include <iostream>
00010 #include <fstream>
00011 #include <string>
00012 #include <vector>
00013
00014 // BIAS
00015 #include <Base/Math/Vector3.hh>
00016 #include <Base/Geometry/KMatrix.hh>
00017 #include <Geometry/PMatrix.hh>
00018 #include <Geometry/RMatrix.hh>
00019
00020
00021 using namespace std;
00022 using namespace BIAS;
00023
00024 // entry JW
00025 int main(int argc, char** argv){
00026     cout<<"started "<<argv[0]<<endl;
00027 #ifdef BIAS_TESTS_DATA
00028     string filename(BIAS_TESTS_DATA "calib01.bog");
00029 #else
00030     string filename("calib01.bog");
00031     cout<<"BIAS_TESTS_DATA  not defined."<<endl;
00032     return -1;
00033 #endif
00034     if (argc>1) filename=argv[1];
00035     cout<<"using filename "<<filename<<endl;
00036     int result=0;
00037     //bool ok=true;
00038
00039     PMatrix P;
00040     if (0!=P.LoadBOG(filename)) return -2;
00041     cout<<"P: "<<P<<endl;
00042     P.Save("out_ExampleLoadBOGP.P");
00043
00044     KMatrix K;
00045     K.LoadBogK(filename);
00046     RMatrix R;
00047     R.LoadBogRC(filename);
00048     Vector3<double> C;
00049     C.LoadBogTC(filename);
00050
00051     // compare:
00052     cout<<"bog.K: "<<K<<endl;
00053     cout<<"P.K  : "<<P.GetK()<<endl;
00054
00055     cout<<"bog.R: "<<R<<endl;
00056     cout<<"P.R  : "<<P.GetR()<<endl;
00057     Vector3<double> axis;
00058     double angle=0;
00059     R.GetRotationAxisAngle(axis,angle);
00060     cout<<"P.angle="<<angle<<" axis="<<axis<<endl;
00061
00062     cout<<"bog.C: "<<C<<endl;
00063     cout<<"P.C  : "<<P.GetC()<<endl;
00064
00065     return result; // OK.
00066 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleLogFacility.cpp Source File

Base » Debug » Examples

ExampleLogFacility.cpp

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 // BIAS
00003 #include <Base/Debug/LogFacility.hh>
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008 class MyTestClass {
00009 public:
00010   MyTestClass() {
00011   };
00012
00013 };
00014
00015
00016
00017
00018
00019 int main(int argc, char *argv[])
00020 {
00021   if (argc>1){
00022     int ll=atoi(argv[1]);
00023     cout <<"Now setting current loglevel to: "<<ll<<endl;
00024     LogFacility::Instance()->SetLogLevel((BIAS_LOG_LEVEL)ll);
00025     if (ll==5) {
00026       LogFacility::Instance()->SetLogLevel(BIAS_LOG_DEBUG);
00027       LogFacility::Instance()->SetShowCodeInfo(true);
00028     }
00029     if (ll==6){
00030       LogFacility::Instance()->SetLogLevel(BIAS_LOG_DEBUG);
00031       LogFacility::Instance()->SetAbortOnFatal(true);
00032     }
00033   }
00034
00035   if (argc>2){
00036     cout <<"Now setting log stream tofile: "<<argv[2]<<endl;
00037     LogFacility::Instance()->OpenLogFile(argv[2]);
00038   }
00039
00040   // this is the full qualified official usage of the LFwithout checking level
00041   LogFacility::Instance()->GetLogStream()<<"Ok, starting up LogFacility"<<endl;
00042
00043
00044   // this macros accepts arbitrary stream-concatenations, checks loglevel
00045   // and codeinfo
00046   BIASLOG(BIAS_LOG_DEBUG,"This is a debug line number:"<<2);
00047
00048   // this is the short form of the above:
00049   BLD("This is a debug line number:"<<3);
00050
00051   BLI("This is an info  line");
00052   BLW("This is a warning  line");
00053   BLF("This is a fatal error");
00054
00055
00056   return 0;
00057 }
00058
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleLogPolarMapping.cpp Source File

Image » Examples

ExampleLogPolarMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /// @author oniemann
00026
00027 #include <Image/LogPolarMapping.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <Base/Debug/TimeMeasure.hh>
00030 #include <Utils/Param.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035
00036 int main(int argc, char *argv[])
00037 {
00038
00039   Param *param = new Param();
00040   string sourceImage;
00041
00042   param->AddParamString("SourceImage",
00043             "Absolute path to the source Image",
00044                         "",
00045                         'i');
00046
00047   param->ParseCommandLine(argc,argv);
00048
00049   //Read and load source image from parameters
00050   sourceImage = *param->GetParamString("SourceImage");
00051   if(sourceImage == "")
00052     {
00053       BIASERR(argv[0]<<" -i<image-file>");
00054     return -1;
00055     }
00056
00057
00058   Image<unsigned char> im;
00059   if (ImageIO::Load(sourceImage, im)!=0){
00060     BIASERR("error loading "<<sourceImage);
00061     return -2;
00062   }
00063
00064   LogPolarMapping<unsigned char, unsigned char> mapper;
00065   int width  = im.GetWidth();
00066   int height = im.GetHeight();
00067   //We want the center of rotation to be in center of the image
00068
00069   mapper.SetImageCenter(width,height/2);
00070
00071   cout<<"ROI of source image is "<<*im.GetROI()
00072       <<" while image size is "<<width<<" x "<<height<<endl;
00073   Image<unsigned char>
00074       imrestrilinear(2*width,height, im.GetChannelCount());
00075   imrestrilinear.SetColorModel(im.GetColorModel());
00076
00077   cout<<"timing ..."<<endl<<flush;
00078   TimeMeasure t1;
00079
00080   t1.Start();
00081   // trilinear mapping with automatic scale and pyramid size selection
00082   mapper.Map(im, imrestrilinear, MapBilinear);
00083   t1.Stop();
00084   if (ImageIO::Write("ImgLogPolar.mip", imrestrilinear)!=0){
00085     BIASERR("error image");
00086   }
00087
00088   cout <<"Trilinear mapping took "
00089        <<t1.GetUserTime()
00090        <<" ms,"<<endl;
00091
00092   return 0;
00093 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleMapPerspImages.cpp Source File

Image » Examples

ExampleMapPerspImages.cpp

Go to the documentation of this file.
00001
00002 #include <bias_config.h>
00003
00004 #ifndef BIAS_HAVE_XML2
00005 #  error You need XML2 to compile this code. Please enable USE_XML2 and recompile BIAS.
00006 #endif // BIAS_HAVE_XML2
00007
00008
00009 #include <Image/CameraParam.hh>
00010 #include <Image/UndistortionMapping.hh>
00011 #include <Image/MatlabTBUndistortion.hh>
00012 #include <Image/SphericalUndistortion.hh>
00013 #include <Base/Image/ImageIO.hh>
00014 #include <Base/Image/ImageBase.hh>
00015 #include <Base/Image/ImageConvert.hh>
00016 #include <iostream>
00017
00018 using namespace BIAS;
00019 using namespace std;
00020
00021
00022
00023 int main(int argc, char** argv )
00024 {
00025   MatlabTBUndistortion mu;
00026   SphericalUndistortion su;
00027   UndistortionMapping<unsigned char, unsigned char> ums;
00028
00029   Image<unsigned char>* src;
00030   Image<unsigned char> dst;
00031   src = new Image<unsigned char> [argc-1];
00032
00033   // double xDst, yDst;
00034   string camfileSphere = "PtScorpion_1600x1200C_IBAK.xml";
00035   string camfilePersp = "PtGrey_Dragonfly_640x480C_4mm.xml";
00036
00037   mu.Init(camfilePersp);
00038   su.Init(camfileSphere);
00039
00040   if (su.IsInitialized() && su.IsSpherical()) {
00041     ums.SetCameraParam(su);
00042     cout << camfileSphere << " used for initialization." << endl;
00043   } else {
00044     cout << "Error: could not read camera data file or no perspective lens!"
00045       << endl;
00046     BIASABORT;
00047   }
00048
00049   if (argc>1) {
00050
00051     int i, j;
00052     for (i=1; i<argc; i++) {
00053       if (ImageIO::Load(argv[i], src[i-1])!=0){
00054         BIASERR("error loading image "<<argv[i]);
00055         return -1;
00056       } else {
00057         ImageConvert::ToGrey(src[i-1], src[i-1]);
00058       }
00059     }
00060
00061     double phi, theta;
00062     double cx, cy;
00063
00064     dst.Init(su.GetWidth(),su.GetHeight());
00065     int ct = argc-1;
00066     for (i=0; i<ct/3+1; i++) {
00067       for (j=((ct-i*3)<3 ? ct-i*3 : 3)-1 ; j>=0; j--) {
00068         phi = i*2*M_PI/(ct/3+1)-M_PI;
00069         theta = (j*M_PI/2)/3;
00070         cout << "drawing image phi:" << phi << "  theta:" << theta << endl;
00071         su.TransfCoordSphere2Image(theta, phi, cx, cy);
00072         ums.MapPerspToSphere(src[i], dst, mu.GetKMatrix(), cx, cy,
00073                              SphericalUndistortion::PERSPECTIVE);
00074       }
00075     }
00076   } else {
00077     cout << "No images given!"
00078          << endl;
00079     BIASABORT;
00080   }
00081
00082   ImageIO::Write("Sphere", dst);
00083   cout << " created: "<<"Sphere.mip"<<endl;
00084
00085
00086   return 0;
00087 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleMatchDataBase.cpp Source File

Utils » Examples

ExampleMatchDataBase.cpp

Go to the documentation of this file.
00001 #include <Utils/MatchDataBase.hh>
00002 #include <Utils/GenSynthMatches.hh>
00003
00004 #include <Base/Common/BIASpragma.hh>
00005 #include <iostream>
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010 int main(int argc, char *argv[])
00011 {
00012   Param para;
00013   GenSynthMatches gsm(para);
00014   gsm.CreateMatches();
00015   const string fname="mdb.txt";
00016
00017   gsm.Write(fname);
00018
00019   std::cout << "original: \n"<<gsm << endl;
00020
00021   MatchDataBase mdb(para), mdb2(para), mdb3(para);
00022   mdb.Read(fname);
00023
00024   std::cout << "read: \n"<< mdb << endl;
00025
00026   KMatrix K;
00027   vector<RMatrixBase> R;
00028   vector<HomgPoint3D> C;
00029   vector<vector<HomgPoint2D> > p, np;
00030   gsm.GetK(K);
00031   gsm.GetR(R);
00032   gsm.GetC(C);
00033   gsm.GetPoints(p);
00034   gsm.GetNormalizedPoints(np);
00035   mdb2.SetData(K, R, C, p);
00036
00037   std::cout << "SetData: \n"<< mdb2 <<endl;
00038
00039   mdb3.SetNormalizedData(K, R, C, np);
00040
00041   std::cout << "SetNormalizedData: \n"<< mdb3 <<endl;
00042
00043
00044   std::cout << "read: "<<boolalpha<<(gsm==mdb)<<endl;
00045   std::cout << "SetData: "<<boolalpha<<(gsm==mdb2)<<endl;
00046   std::cout << "SetNormalizedData: "<<boolalpha<<(gsm==mdb3)<<endl;
00047
00048   return 0;
00049 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleMDCamToShm.cpp Source File

VideoSource » Examples

ExampleMDCamToShm.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <VideoSource/MDcam.hh>
00003 #include <Utils/Param.hh>
00004 #include <fstream>
00005 #include <VideoSource/VideoShMFeeder.hh>
00006 #include <signal.h>
00007
00008 using namespace BIAS;
00009 using namespace std;
00010
00011 bool NotDone = true;
00012
00013
00014 void termhandler(int /*signal*/)
00015 {
00016   cout <<"caught Ctrl-C, exiting gfracefully"<<endl;
00017   NotDone = false;
00018 }
00019
00020
00021 int main(int argc, char *argv[])
00022 {
00023
00024   Param params;
00025
00026
00027   MDcam cams;
00028   int numcams;
00029   //bool done = false;
00030   //int downsample;
00031   //char c = 0;
00032   Camera<unsigned char> *GrabImage;
00033   Camera<unsigned char> pic2;
00034   int res;
00035   vector<string> ShmNames;
00036   string *camfile;
00037   string *ShmPrefix;
00038   int *scanbus;
00039   vector<VideoShMFeeder *> ShmFeeder;
00040
00041
00042
00043   camfile = params.AddParamString("cameras",
00044                   "Configuration file (default: cameras.conf",
00045                   "cameras.conf");
00046   ShmPrefix = params.AddParamString("ShmPrefix",
00047                   "Prefix to address Shm, Camid is added",
00048                   "MDCamShm");
00049   scanbus = params.AddParamInt("scanbus",
00050                    "Only scan the bus number N and write camerafile",-1);
00051
00052
00053   res = params.ParseCommandLine(argc, argv);
00054   if (res <0) exit(1);
00055
00056
00057
00058   if (*scanbus >=0) {
00059     ofstream ofs(camfile->c_str());
00060     if (!ofs) {
00061       perror(camfile->c_str());
00062       exit(1);
00063     }
00064     cams.ScanBus(*scanbus,ofs);
00065     ofs.close();
00066     exit(0);
00067   }
00068
00069   cams.SetFps(30.0);
00070    cams.SetDebugLevel(D_MDCAM_INIT );
00071   cams.SetDebugLevelDcam(D_DCAM_F7 |D_DCAM );
00072
00073   numcams = cams.InitCameras(*camfile);
00074   if (numcams <0) exit(0);
00075
00076   GrabImage = new Camera<unsigned char>[numcams];
00077   for (int i=0; i<numcams; i++) {
00078     cams.GetCamera(i)->InitImage(GrabImage[i]);
00079     ostringstream oss;
00080     oss<<*ShmPrefix<<"-"<<cams.GetCamera(i)->GetID();
00081     ShmNames.push_back(oss.str());
00082     oss.str("");
00083     cout <<"Using: "<<ShmNames[i]<<endl;
00084     VideoShMFeeder *s;
00085     s = new VideoShMFeeder(ShmNames[i]);
00086     ShmFeeder.push_back(s);
00087   }
00088
00089   cams.PreGrab();
00090
00091   // mainloop with show
00092
00093   signal(3,termhandler);
00094
00095   cout <<"Press Ctrl-\\ to exit"<<endl;
00096   int framecount = 0;
00097   while (NotDone) {
00098 //      gettimeofday(&now, NULL);
00099 //      end = start;
00100 //      start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00101 //      fps = 1.0 / (float)(start-end) * 1000.0 ;
00102
00103     cams.GrabSingle(GrabImage);
00104     for (int i=0; i<numcams; i++) {
00105       ShmFeeder[i]->ProcessImage(&(GrabImage[i]));
00106     }
00107     cout <<framecount++<<endl;
00108   }
00109
00110
00111   cams.PostGrab();
00112   cams.ReleaseCameras();
00113   for (unsigned int i=0;i<ShmFeeder.size(); i++)
00114     delete ShmFeeder[i];
00115   params.DisableDestructorWarning();
00116   return 0;
00117 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleMDCamToShmWx.cpp Source File

VideoSource » Examples

ExampleMDCamToShmWx.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <VideoSource/MDcam.hh>
00003 #include <Utils/Param.hh>
00004 #include <fstream>
00005 #include <VideoSource/VideoShMFeeder.hh>
00006 #include <signal.h>
00007 #include "wx/wx.h"
00008 #include <Gui/StringConv.hh>
00009 #include <Base/Debug/Exception.hh>
00010
00011 using namespace BIAS;
00012 using namespace std;
00013
00014 class MyApp : public wxApp
00015 {
00016   virtual bool OnInit();
00017 };
00018
00019
00020 class MyFrame: public wxFrame
00021 {
00022 public:
00023
00024   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00025
00026   void OnQuit(wxCommandEvent& event);
00027   void OnWhiteBalance(wxCommandEvent& event);
00028   void OnAbout(wxCommandEvent& event);
00029   void OnAutoExposure(wxCommandEvent& event);
00030   void OnGain(wxScrollEvent& event);
00031   void OnShutter(wxScrollEvent& event);
00032   void OnTimer(wxTimerEvent& event);
00033
00034   DECLARE_EVENT_TABLE()
00035 protected:
00036   wxButton *QuitButton_, *WhiteBalanceButton_;
00037   wxCheckBox *AutoExposure_;
00038   wxSlider *SliderGain_;
00039   wxSlider *SliderShutter_;
00040   wxTimer      Timer_;
00041
00042   MDcam cams;
00043   int numcams;
00044   Camera<unsigned char> *GrabImage;
00045   vector<string> ShmNames;
00046   const string camfile;
00047   const string ShmPrefix;
00048   int *scanbus;
00049   vector<VideoShMFeeder *> ShmFeeder;
00050   int framecount;
00051   const float max_gain;// = 20.0; // dB
00052   const float max_shutter;// = 0.050; // 50 ms = 20 Hz
00053 };
00054
00055
00056 enum
00057 {
00058   ID_Quit = 1,
00059   ID_About,
00060   ID_MANUAL_EXPOSURE,
00061   ID_SLIDER_GAIN,
00062   ID_SLIDER_SHUTTER,
00063   //ID_SLIDER_EXPOSURE,
00064   ID_BUTTON_QUIT,
00065   ID_BUTTON_WB,
00066   ID_TIMER = 1001
00067 };
00068
00069
00070 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00071   EVT_MENU(ID_Quit, MyFrame::OnQuit)
00072   EVT_MENU(ID_About, MyFrame::OnAbout)
00073   EVT_CHECKBOX(ID_MANUAL_EXPOSURE, MyFrame::OnAutoExposure)
00074   EVT_COMMAND_SCROLL(ID_SLIDER_GAIN, MyFrame::OnGain)
00075   EVT_COMMAND_SCROLL(ID_SLIDER_SHUTTER, MyFrame::OnShutter)
00076   EVT_BUTTON(ID_BUTTON_WB, MyFrame::OnWhiteBalance)
00077   EVT_BUTTON(ID_BUTTON_QUIT, MyFrame::OnQuit)
00078   EVT_TIMER(ID_TIMER, MyFrame::OnTimer)
00079 END_EVENT_TABLE()
00080
00081 IMPLEMENT_APP(MyApp)
00082
00083
00084 bool MyApp::OnInit()
00085 {
00086   MyFrame *frame =
00087       new MyFrame( wxT("MDCam2ShmWx"), wxPoint(50,50), wxSize(450,340) );
00088   frame->Show(TRUE);
00089   SetTopWindow(frame);
00090   return TRUE;
00091 }
00092
00093
00094 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00095   : wxFrame((wxFrame *)NULL, -1, title, pos, size), camfile("cameras.conf"),
00096     ShmPrefix("MDCamShm"), max_gain(30.0), max_shutter(0.03)
00097 {
00098   wxMenu *menuFile = new wxMenu;
00099
00100   menuFile->Append( ID_About, wxT("&About...") );
00101   menuFile->AppendSeparator();
00102   menuFile->Append( ID_Quit, wxT("E&xit") );
00103
00104   wxMenuBar *menuBar = new wxMenuBar;
00105   menuBar->Append( menuFile, wxT("&File") );
00106
00107   SetMenuBar( menuBar );
00108
00109   wxSizer *Sizer = new wxBoxSizer( wxVERTICAL );
00110
00111   AutoExposure_ =
00112     new wxCheckBox(this, ID_MANUAL_EXPOSURE, AsciiToWx("Auto Exposure"),
00113                    wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator,
00114                    AsciiToWx("auto_exposure"));
00115
00116   wxStaticText *GainLabel =
00117     new wxStaticText(this, -1, AsciiToWx("Gain"));
00118   SliderGain_ =
00119     new wxSlider(this, ID_SLIDER_GAIN, 50, 0, 255, wxDefaultPosition,
00120                  wxDefaultSize,  wxSL_HORIZONTAL, wxDefaultValidator,
00121                  AsciiToWx("slider_gain"));
00122
00123   wxStaticText *ShutterLabel =
00124     new wxStaticText(this, -1, AsciiToWx("Shutter"));
00125   SliderShutter_ =
00126     new wxSlider(this, ID_SLIDER_SHUTTER, 255, 0, 255, wxDefaultPosition,
00127                  wxDefaultSize,  wxSL_HORIZONTAL, wxDefaultValidator,
00128                  AsciiToWx("slider_shutter"));
00129
00130   QuitButton_ =
00131     new wxButton(this, ID_BUTTON_QUIT, AsciiToWx("Quit"), wxDefaultPosition,
00132                  wxDefaultSize, 0, wxDefaultValidator,
00133                  AsciiToWx("button"));
00134
00135   WhiteBalanceButton_ =
00136     new wxButton(this, ID_BUTTON_WB, AsciiToWx("White Balance"),
00137                  wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator,
00138                  AsciiToWx("white_balance_button"));
00139
00140   Sizer->Add(AutoExposure_, 0, wxCENTER|wxALL|wxEXPAND,10);
00141   Sizer->Add(GainLabel, 0, wxCENTER|wxTOP|wxRIGHT|wxLEFT, 10);
00142   Sizer->Add(SliderGain_, 0, wxCENTER|wxALL|wxEXPAND, 10);
00143   Sizer->Add(ShutterLabel, 0, wxCENTER|wxTOP|wxRIGHT|wxLEFT, 10);
00144   Sizer->Add(SliderShutter_, 0, wxCENTER|wxALL|wxEXPAND,10);
00145   Sizer->Add(WhiteBalanceButton_, 0, wxCENTER|wxALL,10);
00146   Sizer->Add(QuitButton_, 0, wxCENTER|wxALL,10);
00147
00148   SetSizer( Sizer );
00149
00150   CreateStatusBar();
00151   SetStatusText( wxT("") );
00152
00153   Timer_.SetOwner(this, ID_TIMER);
00154
00155   cams.SetFps(30.0);
00156   //cams.SetDebugLevel(D_MDCAM_INIT );
00157   //cams.SetDebugLevelDcam(D_DCAM_F7 |D_DCAM );
00158
00159   numcams = cams.InitCameras(camfile);
00160   if (numcams <0) exit(0);
00161
00162   GrabImage = new Camera<unsigned char>[numcams];
00163   for (int i=0; i<numcams; i++) {
00164     cams.GetCamera(i)->InitImage(GrabImage[i]);
00165     ostringstream oss;
00166     oss<<ShmPrefix<<"-"<<cams.GetCamera(i)->GetID();
00167     ShmNames.push_back(oss.str());
00168     oss.str("");
00169     cout <<"Using: "<<ShmNames[i]<<endl;
00170     VideoShMFeeder *s;
00171     s = new VideoShMFeeder(ShmNames[i]);
00172     ShmFeeder.push_back(s);
00173   }
00174
00175   cams.PreGrab();
00176   framecount = 0;
00177
00178   AutoExposure_->SetValue(false);
00179   wxCommandEvent cevt;
00180   OnAutoExposure(cevt);
00181   wxScrollEvent evt;
00182   OnGain(evt);
00183   OnShutter(evt);
00184   Timer_.Start(20, true);
00185 }
00186
00187 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
00188 {
00189   cams.PostGrab();
00190   cams.ReleaseCameras();
00191   for (unsigned int i=0;i<ShmFeeder.size(); i++)
00192     delete ShmFeeder[i];
00193   Close(TRUE);
00194 }
00195
00196 void MyFrame::OnWhiteBalance(wxCommandEvent& WXUNUSED(event))
00197 {
00198   cams.OnePushAuto(FEATURE_WHITE_BALANCE);
00199   cerr << "\nwhite balance"<<endl;
00200 }
00201
00202 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
00203 {
00204   wxMessageBox(wxT("This is a wxWidgets Hello world sample"),
00205                wxT("About Hello World"), wxOK | wxICON_INFORMATION, this);
00206 }
00207
00208 void MyFrame::OnAutoExposure(wxCommandEvent& event)
00209 {
00210   bool auto_exposure = AutoExposure_->IsChecked();
00211   if (auto_exposure){
00212     // get shutter and gain from sliders an set to cam
00213     int value = SliderGain_->GetValue();
00214     float gain = (float)value / 255.0 * max_gain;
00215     value = SliderShutter_->GetValue();
00216     float shutter = (float)value / 255.0 * max_shutter;
00217     if (cams.AutoMode(FEATURE_GAIN, auto_exposure)!=0){
00218       BEXCEPTION("error setting camera");
00219     }
00220     if (cams.AutoMode(FEATURE_SHUTTER, auto_exposure)!=0){
00221       BEXCEPTION("error setting camera");
00222     }
00223     if (cams.SetGain(gain)!=0){
00224       BEXCEPTION("error setting camera");
00225     }
00226     if (cams.SetShutter(shutter)!=0){
00227       BEXCEPTION("error setting camera");
00228     }
00229   } else {
00230     if (cams.AutoMode(FEATURE_GAIN, auto_exposure)!=0){
00231       BEXCEPTION("error setting camera");
00232     }
00233     if (cams.AutoMode(FEATURE_SHUTTER, auto_exposure)!=0){
00234       BEXCEPTION("error setting camera");
00235     }
00236   }
00237 }
00238
00239 void MyFrame::OnGain(wxScrollEvent& event)
00240 {
00241   if (!AutoExposure_->IsChecked()){
00242     int value = SliderGain_->GetValue();
00243     float gain = (float)value / 255.0 * max_gain;
00244     if (cams.SetGain(gain)!=0){
00245       BEXCEPTION("error setting camera");
00246     }
00247     //cout << "setting gain: "<<gain<<endl;
00248   }
00249 }
00250
00251 void MyFrame::OnShutter(wxScrollEvent& event)
00252 {
00253   if (!AutoExposure_->IsChecked()){
00254     int value = SliderShutter_->GetValue();
00255     float shutter = (float)value / 255.0 * max_shutter;
00256     if (cams.SetShutter(shutter)!=0){
00257       BEXCEPTION("error setting camera");
00258     }
00259     //cout << "setting shutter: "<<shutter<<endl;
00260   }
00261 }
00262
00263 void MyFrame::OnTimer(wxTimerEvent& event)
00264 {
00265   cams.GrabSingle(GrabImage);
00266   //cout << "numcams: " << numcams<<endl;
00267   for (int i=0; i<numcams; i++) {
00268     ShmFeeder[i]->ProcessImage(&(GrabImage[i]));
00269     //cout << "cm: bayer: "<<boolalpha<< (GrabImage[i].GetColorModel()==ImageBase::CM_Bayer_RGGB)<<endl;
00270   }
00271   cout <<framecount++<<endl;
00272   Timer_.Start(20, true); // grab new images every 20 ms = resp 50 Hz
00273 }
00274
00275
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleMedian.cpp Source File

Filter » Examples

ExampleMedian.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005 Johan Skoglund
00006 skoglund@isy.liu.se
00007 CVL/isy
00008 university of Linköping
00009 sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #include "Filter/Median.hh"
00027 #include "Base/Image/ImageIO.hh"
00028 #include <iostream>
00029
00030 #include <Base/Debug/TimeMeasure.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035
00036
00037 int main(int argc, char *argv[])
00038 {
00039     TimeMeasure timeri, timerf;
00040
00041     Image<float> src;
00042     if (!(argc>1)){
00043         BIASERR("no arg"); return -1;
00044     };
00045     BIASASSERT(argc>1);
00046     if (ImageIO::Load(argv[1], src)!=0){
00047         cout <<"Error loading "<<argv[1]<<endl;
00048         exit(-1);
00049     }
00050
00051     Image<float> dst;
00052
00053     Median<float, float> theMedian;
00054
00055     theMedian.Filter(src, dst);
00056     ImageIO::Write( "median_filtered", dst);
00057
00058     return 0;
00059 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleMetaData.cpp Source File

Base » Image » Examples

ExampleMetaData.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028 #include <Base/Image/Image.hh>
00029 #include <Base/Image/ImageIO.hh>
00030
00031 #include <sstream>
00032
00033 // usually this comes from Base/Geometry/HomgPoint2D.hh
00034 #define HOMGPOINT2D_TYPE double
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 //int main(int argc, char *argv[])
00040 int main()
00041 {
00042   Image<unsigned char> im(256, 256, 1), im2, im3;
00043   MetaData *md=NULL;
00044   // point and point2 should be a HomgPoint2D,
00045   // they are not of type HomgPoint2D because no cross dependencies
00046   // between Base/Image and Base/Geometry are desired
00047   double point[]={2.0, 3.0, 1.0}, point2[3]={0.0, 0.0, 0.0};
00048   ostringstream ascii;
00049   string filename="metadata";
00050   string mipfilename=filename+".mip";
00051   string pgmfilename=filename+".pgm";
00052   string tag;
00053   AppData appdata;
00054
00055   md=im.GetMetaData();
00056   BIASASSERT(md!=NULL);
00057   md->Add(AppData::MD_HomgPoint2D, sizeof(HOMGPOINT2D_TYPE)*3,
00058           (char *)point);
00059   md->Add(AppData::MD_HomgPoint2D, sizeof(HOMGPOINT2D_TYPE)*3,
00060           (char *)point);
00061
00062   ascii <<" [ "<<point[0]<<" "<<point[1]<<" "<<point[2]<<" ]";
00063   md->Add("#[HomgPoint2D]", ascii.str());
00064   md->Add("#[HomgPoint2D]", ascii.str());
00065
00066
00067   if (ImageIO::Write(filename, im)!=0){
00068     BIASERR("error writing image "<<filename);
00069   }
00070   if (ImageIO::ExportImage(filename, im, ImageIO::FF_pgm)!=0){
00071     BIASERR("error exporting image "<<filename);
00072   }
00073
00074   if (ImageIO::Read(mipfilename, im2)!=0){
00075     BIASERR("error reading image "<<filename<<".mip");
00076   }
00077   md=im2.GetMetaData();
00078   BIASASSERT(md!=NULL);
00079   cerr << "found "<<md->size()<<" metadatas in "<<mipfilename<<endl;
00080   md->Dump();
00081
00082
00083   if (md->Find(AppData::MD_HomgPoint2D, appdata)!=-1){
00084     point2[0]=((HOMGPOINT2D_TYPE *)appdata.data)[0];
00085     point2[1]=((HOMGPOINT2D_TYPE *)appdata.data)[1];
00086     point2[2]=((HOMGPOINT2D_TYPE *)appdata.data)[2];
00087     cout << " found MD_HomgPoint2D in "<<filename<<".mip : [ "
00088          <<point2[0]<<" "<<point2[1]<<" "<<point2[2]<<" ]"<<endl;
00089   } else {
00090     BIASERR("MD_HomgPoint2D not found in "<<filename<<".mip");
00091   }
00092
00093   if (ImageIO::ImportImage(pgmfilename, im3)!=0){
00094     BIASERR("error importing image "<<filename);
00095   }
00096
00097   md=im3.GetMetaData();
00098   BIASASSERT(md!=NULL);
00099   cerr << "found "<<md->size()<<" metadatas in "<<pgmfilename<<endl;
00100   md->Dump();
00101
00102   if (md->Find("#[HomgPoint2D]", appdata)!=-1){
00103     cout << " found ascii in "<<filename<<".pgm : "
00104          <<appdata.stag<<appdata.sdata<<endl;
00105   } else {
00106     BIASERR("#[HomgPoint2D] not found in "<<filename<<".pgm");
00107   }
00108
00109   return 0;
00110 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleMinMax.cpp Source File

Base » Image » Examples

ExampleMinMax.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 #include <iostream>
00031
00032 #include <Base/Image/ImageBase.hh>
00033 #include <Base/Image/ImageConvert.hh>
00034 #include <Base/Image/ImageIO.hh>
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 //int main(int argc, char *argv[])
00040 int main()
00041 {
00042   bool interleaved=false;
00043   Image<unsigned char> im(640, 480, 3, interleaved);
00044   unsigned mincoo[2], maxcoo[2];
00045
00046   // set whole image
00047   unsigned char col[]={98, 234, 1};
00048   im.FillImageWithConstValue(col);
00049
00050   unsigned w=im.GetWidth();
00051   unsigned h=im.GetHeight();
00052
00053   //im.SetROI(w>>2, h>>2, w-(w>>2), h-(h>>2));
00054   im.SetROICorners(w>>2, h>>2, w-(w>>2), h-(h>>2));
00055
00056
00057   // now set only ROI to uniform grey
00058   col[0]=col[1]=col[2]=128;
00059   im.FillImageWithConstValue(col);
00060
00061   im.PrintHeader(cout);
00062   cout << endl << (int)im.GetImageData()[0] << " "
00063        << (int)im.GetImageData()[1]
00064        << " " << (int)im.GetImageData()[2] << endl;
00065
00066   // now set two pixels in roi in channel c
00067   int c=0;
00068   im.SetPixel((unsigned char)215, ((w>>1)+2), (h>>1)+2, c);
00069   im.SetPixel((unsigned char)45, ((w>>1)-7), (h>>1)+5, c);
00070
00071   unsigned char min, max;
00072   im.AddDebugLevel(D_IMAGE_MINMAXCOO);
00073   im.GetMinMaxPixelValue(min, max, 1);
00074   cerr << "min: "<<(int)min<<"\tmax: "<<(int)max<<endl;
00075   im.GetMinMaxPixelValue(min, max, 1, mincoo, maxcoo);
00076   cerr << "min: "<<(int)min<<" at ("<<mincoo[0]<<", "<<mincoo[1]
00077        <<")\tmax: "<<(int)max<<" at ("<<maxcoo[0]<<", "<<maxcoo[1]<<")\n";
00078
00079   ImageIO::Write("minmax-img.mip", im);
00080
00081
00082   return 0;
00083 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleMultipleGui.cpp Source File

Gui » Examples

ExampleMultipleGui.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <iostream>
00028 #include <unistd.h>
00029 #include <string>
00030 #include <sstream>
00031 #include <iomanip>
00032 #include <vector>
00033 #include <cstdlib>
00034 #include <Base/Image/Image.hh>
00035 #include <Base/Image/ImageIO.hh>
00036 #include <Gui/GuiGTK.hh>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 int main(int argc, char *argv[])
00042 {
00043   int num=5;
00044   ostringstream name;
00045   vector<Image<unsigned char> > image;
00046   vector<GuiGTK> gui;
00047
00048   gui.resize(num);
00049   image.resize(num);
00050   for (int i=0; i<num; i++){
00051     image[i].Init(360, 288, 1);
00052     image[i].FillImageWithXValue();
00053     name.str("");
00054     name << " gui "<<i;
00055     gui[i].SetTitle(name.str());
00056     gui[i].ShowImage(image[i]);
00057   }
00058
00059   char key=-1;
00060   while (key==-1){
00061     for (int i=0; i<num; i++){
00062       image[i].FillImageWithConstValue((unsigned char)random());
00063       gui[i].ShowImage(image[i]);
00064       if ((key=gui[i].CheckForKeyEvent())!=-1) break;
00065     }
00066   }
00067   return 0;
00068 }
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/ExampleNetsync.cpp Source File

NetworkComm » Examples

ExampleNetsync.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <sys/time.h>
00026 #include <stdlib.h>
00027 #include <sched.h>
00028 #include <unistd.h>
00029 #include <stdio.h>
00030 #include <string.h>
00031 #include <iostream>
00032 #include "../netsync.h"
00033
00034 #define MYSLEEP 20000
00035
00036
00037 using namespace std;
00038
00039
00040 int main (int argc, char* argv[]) {
00041   struct timeval tv;
00042   struct timezone tz;
00043   char name[256];
00044   long starttime, endtime;
00045
00046
00047   int i,n;
00048   long int res;
00049
00050
00051   char buffer[100];
00052   int bufflen;
00053
00054   char **hostlist;
00055
00056   n = gettimeofday (&tv, &tz);
00057   srand (tv.tv_usec);
00058   i=gethostname (name,80);
00059   if (i!=0) printf ("Failed to get host name.\n");
00060
00061   if (argc <3) {
00062     printf("not enough hosts\n");
00063     exit(1);
00064   }
00065   /* hosts for the sync-tree */
00066   hostlist = (char**)malloc(sizeof(char *) * argc -2);
00067   for (i=1; i<argc; i++)
00068     hostlist[i-1] = argv[i];
00069
00070 //   netsync_init_withcontroller(argc-1 , hostlist);
00071   netsync_init(argc-1 , hostlist);
00072
00073   for (i=0; i<5; i++) {
00074     n = gettimeofday (&tv, &tz);
00075     starttime=(tv.tv_sec%1000)*1000 + (tv.tv_usec/1000);
00076     /*      usleep (rand()/RAND_MAX*MYSLEEP/10+ MYSLEEP); */
00077     /*      if ((argc>1) && (i==50)) */
00078     /*        res=netsync_sync(netsync_exit); */
00079     /*      else */
00080
00081     char magic[]="Hallo Welt";
00082     if (netsync_amiroot() ) {
00083       sprintf(buffer,magic);
00084
00085     }
00086     bufflen = strlen(magic)+1;
00087
00088     res=netsync_sync(netsync_finished, buffer, &bufflen);
00089     printf("Sync returned: %s\n",buffer);
00090     if (res==-1) {
00091       printf ("Netsync aborted \n");
00092       exit(0);
00093     }
00094     n = gettimeofday (&tv, &tz);
00095     endtime=(tv.tv_sec%1000)*1000 + (tv.tv_usec/1000);
00096     fprintf (stdout,"%03d %14s duration: %4i ms   %i ms\n",
00097          i,name,endtime-starttime,endtime);
00098     /*      fprintf (fd,"%03d %14s %4i %i\n",  */
00099     /*          i,name,endtime-starttime-(MYSLEEP/1000),endtime); */
00100   }
00101
00102   netsync_cleanup();
00103   return 0;
00104 }
00105
00106
00107
00108
00109
00110
00111
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvas.cpp Source File

Gui » Examples

ExampleOpenGLCanvas.cpp

Go to the documentation of this file.
00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003
00004 #include <bias_config.h>
00005
00006 #include <Base/Common/LeakChecking.h>
00007
00008 #include "ExampleOpenGLCanvas.hh"
00009
00010 // BIAS
00011 #include <Gui/ConsoleRedirectIO.hh>
00012 #include <Gui/GeometryGL.hh>
00013
00014 using namespace std;
00015
00016 // required for wx RTTI dynamic construction:
00017 IMPLEMENT_APP(ExampleOpenGLCanvasApp)
00018
00019 // --------------------------------------------------------
00020 #ifndef BIAS_HAVE_GLUT
00021 #  define GLUT_BUILDING_LIB
00022 #  include <GL/glut.h>
00023 #endif // BIAS_HAVE_GLUT
00024
00025
00026 ///
00027 /// your own implemnetation of the scenes GL calls:
00028 ///
00029
00030 MyGLCanvas::MyGLCanvas(wxFrame* parent)
00031 :
00032 BIAS::OpenGLCanvas( parent, -1,wxDefaultPosition, wxDefaultSize,0,wxT("GL"),(int*)(&attribsRGBASD) )
00033 {}
00034
00035
00036
00037
00038 void MyGLCanvas::DisplayCalls()
00039 {
00040   //CALLINFO;
00041   CHECK_GL_ERROR;
00042
00043   DisplayClear();
00044   DisplayCameraView();
00045   CHECK_GL_ERROR;
00046   glClearColor(0.3,0.1,0.1,0);
00047   glClear(GL_COLOR_BUFFER_BIT);
00048
00049   ////this->GetViewController().GetInternals().frustum.DisplayGL();
00050   //glMatrixMode(GL_PROJECTION);
00051   //glLoadIdentity();
00052   //gluPerspective( 67.5, 1.0, 0.1, 1000);
00053
00054   //this->GetViewController().GetInternals().viewport.DisplayGL();
00055   //this->GetViewController().GetExternals().DisplayGL();
00056
00057   // frustum
00058   //glMatrixMode(GL_PROJECTION);
00059   //glLoadIdentity();
00060   //glFrustum( );
00061   //glMatrixMode(GL_MODELVIEW);
00062
00063   ////// viewport
00064   //glViewport(0,0, 512,512);
00065
00066   ////// all internal
00067   //glMatrixMode(GL_PROJECTION);
00068   //glLoadIdentity();
00069   //gluPerspective(67.5
00070   //  ,1.0
00071   //  //,this->GetViewController().GetInternals().viewport.GetAspect()
00072   //  ,this->GetViewController().GetInternals().frustum.zNear
00073   //  ,this->GetViewController().GetInternals().frustum.zFar
00074   //  );
00075
00076   //glMatrixMode(GL_MODELVIEW);
00077   //glLoadIdentity();
00078   //gluLookAt(
00079   //  GetViewController().GetExternals().C[0],
00080   //  GetViewController().GetExternals().C[1],
00081   //  GetViewController().GetExternals().C[2],
00082   //  0,0,0,
00083   //  0,1,0 );
00084
00085   glMatrixMode(GL_MODELVIEW);
00086 #ifdef BIAS_HAVE_GLUT
00087   glutWireTeapot(0.5);
00088 #endif // BIAS_HAVE_GLUT
00089   this->DisplayCoordCross();
00090
00091   //// animated scene
00092   //BIAS::GeometryGL::DisplayCallsSampleDisplayListScene(this->time);
00093   //CHECK_GL_ERROR;
00094
00095   /*
00096   glColor3f(0.5, 0.5, 0.5);
00097   //glutSolidCube(0.1);
00098   //glutSolidCube(1.0);
00099
00100   glColor3f(0.5, 0, 0);
00101   glPushAttrib(GL_POINT_BIT);
00102   glPointSize(31);
00103   glBegin(GL_POINTS);
00104   glVertex3f(0,0,0);
00105   glEnd();
00106   glPopAttrib();
00107
00108   glColor3f(0, 0.5, 0);
00109   glPushAttrib(GL_POINT_BIT);
00110   glPointSize(7);
00111   glBegin(GL_POINTS);
00112   glVertex3f(0,0,0);
00113   glEnd();
00114   glPopAttrib();
00115   */
00116
00117 }
00118
00119
00120 // --------------------------------------------------------
00121
00122 bool ExampleOpenGLCanvasApp::OnInit()
00123 {
00124   // utility: create a Redirection console for cout, cerr etc.
00125   ConsoleRedirectIO();
00126   // testing output:
00127   cout<<"Hello cout"<<endl;
00128   cout<<"Hello cerr"<<endl;
00129
00130   MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvas"), wxPoint(0,0), wxSize(640,480) );
00131   frame->Show(TRUE);
00132   SetTopWindow(frame);
00133
00134   return TRUE;
00135 }
00136
00137
00138 // --------------------------------------------------------
00139 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00140 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00141 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00142 EVT_MENU(ID_TESTSHOT, MyFrame::OnTestShot)
00143 END_EVENT_TABLE()
00144 // --------------------------------------------------------
00145
00146
00147 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00148 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00149 ,p_canvas(NULL)
00150 {
00151   // Create a simple top Menu
00152   wxMenu *menuFile = new wxMenu;
00153   menuFile->Append( ID_ABOUT, wxT("&About...") );
00154   menuFile->AppendSeparator();
00155   menuFile->Append( ID_TESTSHOT, wxT("&Shot...\tCtrl-S") );
00156   menuFile->AppendSeparator();
00157   menuFile->Append( ID_QUIT, wxT("E&xit") );
00158
00159   wxMenuBar *menuBar = new wxMenuBar;
00160   menuBar->Append(menuFile, wxT("&File"));
00161   SetMenuBar(menuBar);
00162
00163   // Create a simple bottom status bar
00164   CreateStatusBar(3);
00165
00166   // Canvas to test:
00167   //p_canvas=new BIAS::OpenGLCanvas(this, -1);
00168   p_canvas=new MyGLCanvas(this);
00169
00170   //p_2nd_canvas = new MyGLCanvas(this);
00171 }
00172
00173
00174 void MyFrame::OnTestShot(wxCommandEvent& /*event*/)
00175 {
00176   p_canvas->ScreenShot("out_RGB.jpg", true, GL_RGB);
00177
00178   p_canvas->ScreenShot("out_RGB.mip", true, GL_RGB);
00179   p_canvas->ScreenShot("out_RGBA.mip", true, GL_RGBA);
00180   p_canvas->ScreenShot("out_DEPTH.mip", true, GL_DEPTH_COMPONENT);
00181   p_canvas->ScreenShot("out_DEPTH.jpg", true, GL_DEPTH_COMPONENT);
00182   p_canvas->ScreenShot("out_ALPHA.mip", true, GL_ALPHA);
00183   p_canvas->ScreenShot("out_ALPHA.jpg", true, GL_ALPHA);
00184   p_canvas->ScreenShot("out_LUMINANCE.mip", true, GL_LUMINANCE);
00185   p_canvas->ScreenShot("out_STENCIL.mip", true, GL_STENCIL_INDEX);
00186 }
00187
00188
00189 void MyFrame::OnQuit(wxCommandEvent& ){
00190   Close(TRUE);
00191 }
00192
00193
00194 void MyFrame::OnAbout(wxCommandEvent& )
00195 {
00196   wxString title(wxT("About"));
00197   wxString msg; // message
00198   msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00199   msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00200   msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00201   msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00202   msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00203   msg<<wxT("\n");
00204   COUT(msg);
00205   wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00206 }
00207
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvas.hh Source File

Gui » Examples

ExampleOpenGLCanvas.hh

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/OpenGLCanvas.hh>
00004
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009
00010 // --------------------------------------------------------
00011 class ExampleOpenGLCanvasApp
00012     : public /*wxApp*/ wxGLApp
00013 {
00014   virtual bool OnInit();
00015 }; // end of ExampleOpenGLCanvasApp -----------------------
00016
00017
00018 enum _ExampleOpenGLCanvasMyFrameIDs_ {
00019     ID_ABOUT=wxID_ABOUT,
00020     ID_QUIT,
00021   ID_TESTSHOT
00022 };
00023
00024
00025 // --------------------------------------------------------
00026
00027
00028 /**  @example ExampleOpenGLCanvas.cpp
00029
00030   Implement your own OpenGLCanvas derived class
00031     and override one of the Display functions
00032     to plug in your own GL calls / scene
00033     @author Jan Woetzel */
00034 class MyGLCanvas : public OpenGLCanvas {
00035 public:
00036     MyGLCanvas(wxFrame* parent);
00037
00038     /// constructor using a shared context
00039     MyGLCanvas(
00040             wxFrame* parent
00041             ,wxGLContext* sharedContext
00042             ,wxWindowID id = -1
00043             ,const wxPoint& pos = wxDefaultPosition
00044             ,const wxSize& size = wxDefaultSize
00045             ,long style=0
00046             ,const wxString& name=wxT("MyGLCanvas sharedContext")
00047             ,int* attribList = 0
00048             ,const wxPalette& palette = wxNullPalette
00049             );
00050
00051     // override to fire our own Display calls:
00052     void DisplayCalls();
00053
00054 };
00055
00056 // --------------------------------------------------------
00057
00058 class MyFrame: public wxFrame {
00059 public:
00060   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00061   void OnQuit(wxCommandEvent& event);
00062   void OnAbout(wxCommandEvent& event);
00063
00064   void OnTestShot(wxCommandEvent& event);
00065
00066   // data member ---
00067   //BIAS::OpenGLCanvas * p_canvas;
00068   MyGLCanvas * p_canvas;
00069   //MyGLCanvas * p_2nd_canvas;
00070
00071   DECLARE_EVENT_TABLE()
00072 }; // end of MyFrame --------------------------------------
00073
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvasBase.cpp Source File

Gui » Examples

ExampleOpenGLCanvasBase.cpp

Go to the documentation of this file.
00001 /** Simple example for BIAS::OpenGLCanvas(Base) usage.
00002 @author: Jan Woetzel */
00003
00004 #include <Base/Common/LeakChecking.h>
00005
00006 #include "ExampleOpenGLCanvasBase.hh"
00007
00008 // BIAS
00009 #include <Gui/ConsoleRedirectIO.hh>
00010
00011 using namespace std;
00012
00013 // required for wx RTTI dynamic construction:
00014 IMPLEMENT_APP(ExampleOpenGLCanvasApp)
00015
00016
00017 // --------------------------------------------------------
00018 bool ExampleOpenGLCanvasApp::OnInit()
00019 {
00020     // utility: create a Redirection console for cout, cerr etc.
00021     ConsoleRedirectIO();
00022     // testing output:
00023     cout<<"Hallo cout"<<endl;
00024     cout<<"Hallo cerr"<<endl;
00025
00026     MyFrame *frame = new MyFrame( wxT("ExampleOpenGLCanvasBase"), wxPoint(0,0), wxSize(640,480) );
00027     frame->Show(TRUE);
00028     wxLogGui log;
00029     SetTopWindow(frame);
00030
00031     return TRUE;
00032 }
00033
00034
00035 // --------------------------------------------------------
00036 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00037 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
00038 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
00039 END_EVENT_TABLE()
00040 // --------------------------------------------------------
00041
00042
00043 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
00044 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
00045 ,p_canvas(NULL)
00046 {
00047     // Create a simple top Menu
00048     wxMenu *menuFile = new wxMenu;
00049     menuFile->Append( ID_ABOUT, wxT("&About...") );
00050     menuFile->AppendSeparator();
00051     menuFile->Append( ID_QUIT, wxT("E&xit") );
00052     wxMenuBar *menuBar = new wxMenuBar;
00053     menuBar->Append(menuFile, wxT("&File"));
00054     SetMenuBar(menuBar);
00055
00056     // Create a simple bottom status bar
00057     CreateStatusBar(3);
00058
00059     // Canvas to test:
00060     p_canvas=new BIAS::OpenGLCanvasBase(this, -1);
00061
00062 }
00063
00064
00065 void MyFrame::OnQuit(wxCommandEvent& ){
00066     Close(TRUE);
00067 }
00068
00069
00070 void MyFrame::OnAbout(wxCommandEvent& )
00071 {
00072     wxString title(wxT("About"));
00073     wxString msg; // message
00074     msg<<wxT("About - ")<<AsciiToWx(FUNCNAME)<<wxT("\n");
00075     msg<<wxT("author: Jan Woetzel (c) 2003-2005\n");
00076     msg<<wxT("build: ")<<AsciiToWx(__DATE__)<<wxT(" ")<<AsciiToWx(__TIME__)<<wxT("\n");
00077     msg<<wxT("from ")<<AsciiToWx(__FILE__)<<wxT("\n");
00078     msg<<wxT("GUI using: ")<<wxVERSION_STRING<<wxT("\n");
00079     msg<<wxT("\n");
00080     COUT(msg);
00081     wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
00082 }
00083
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ExampleOpenGLCanvasBase.hh Source File

Gui » Examples

ExampleOpenGLCanvasBase.hh

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/OpenGLCanvasBase.hh>
00004
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009
00010 // --------------------------------------------------------
00011
00012 /**  @example ExampleOpenGLCanvasBase.cpp
00013
00014 \todo plases Splel Cechek me !
00015
00016   Implement a simple example for teh OpenGLCanvasBase canvas.
00017   Please note the specialized canvases liek teh OpenGLCanvas (without Base) or teh ImageCanvasGL
00018   which may be a betetr choice for you.
00019     @author Jan Woetzel */
00020 class ExampleOpenGLCanvasApp : public wxApp {
00021   virtual bool OnInit();
00022 }; // end of ExampleOpenGLCanvasApp -----------------------
00023
00024
00025 enum _ExampleOpenGLCanvasMyFrameIDs_ {
00026     ID_ABOUT=wxID_ABOUT,
00027     ID_QUIT
00028 };
00029
00030
00031 // --------------------------------------------------------
00032
00033 class MyFrame: public wxFrame {
00034 public:
00035   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00036   void OnQuit(wxCommandEvent& event);
00037   void OnAbout(wxCommandEvent& event);
00038
00039   // data member ---
00040   BIAS::OpenGLCanvasBase * p_canvas;
00041
00042   DECLARE_EVENT_TABLE()
00043 }; // end of MyFrame --------------------------------------
00044
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleOperators.cpp Source File

Base » Math » Examples

ExampleOperators.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Math/Vector.hh>
00027 #include <Base/Math/Matrix.hh>
00028 #include <Base/Math/Vector2.hh>
00029 #include <Base/Math/Vector3.hh>
00030 #include <Base/Math/Vector4.hh>
00031 #include <Base/Math/Matrix2x2.hh>
00032 #include <Base/Math/Matrix3x3.hh>
00033 #include <Base/Math/Matrix3x4.hh>
00034 #include <Base/Math/Matrix4x4.hh>
00035
00036 using namespace std;
00037 using namespace BIAS;
00038
00039
00040 //int main(int argc, char *argv[])
00041 int main()
00042 {
00043   Vector<double> rvec, vec(5, "1.0 2.0 3.0 4.0 5.0");
00044   Vector2<double> rvec2, vec2(1.0, 2.0);
00045   Vector3<double> rvec3, vec3(1.0, 2.0, 3.0);
00046   Vector4<double> rvec4, vec4(1.0, 2.0, 3.0, 4.0);
00047   Matrix<double> mat(5, 5), rmat;
00048   Matrix<double> mat22(2, 2, "1 2 3 4"); // string ctor
00049   mat.SetIdentity();
00050   mat22.SetIdentity();
00051   Matrix2x2<double> mat2x2("1.0, 2.0, 3.0, 4.0"); // string ctor
00052   Matrix3x3<double> mat3x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
00053   Matrix3x4<double> mat3x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0);
00054
00055   Matrix4x4<double> mat4x4;
00056   mat4x4.SetIdentity();
00057   double rd;
00058
00059   // test the operators in Matrix.hh
00060   rmat = mat + 6.0;
00061   rmat = 6.0 + mat;
00062   rmat = mat - 6.0;
00063   rmat = 6.0 - mat;
00064   rmat = mat * 2.0;
00065   rmat = 2.0 * mat;
00066   rmat = mat / 2.0;
00067   mat += 3.0;
00068   mat -= 3.0;
00069   mat *= 3.0;
00070   mat /= 1.4;
00071   if (rmat==mat)
00072     cout <<"rmat==mat" <<endl;
00073   if (rmat!=mat)
00074     cout <<"rmat!=mat" <<endl;
00075
00076   rmat = mat;
00077   if (rmat==mat)
00078     cout <<"rmat==mat and that is ok" <<endl;
00079
00080
00081   rvec = mat * vec;
00082
00083   rvec2 = mat2x2 * vec2;
00084   rvec2 = mat22 * vec2;
00085   rvec = mat22 * vec2;
00086
00087   rvec2 = vec2 + 2.0;
00088   rvec2 = vec2 - 2.0;
00089   rvec2 = vec2 * 2.0;
00090   rvec2 = vec2 / 2.0;
00091
00092   rvec2 += 2.0;
00093   rvec2 -= 2.0;
00094   rvec2 *= 2.0;
00095   rvec2 /= 2.0;
00096
00097   rvec2 = vec2 + vec2;
00098   rvec2 = vec2 - vec2;
00099   rd = vec2 * vec2;
00100
00101   rvec2 += vec2;
00102   rvec2 -= vec2;
00103
00104   return 0;
00105 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleParabola.cpp Source File

Matcher2D » Examples

ExampleParabola.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Matcher2D/CornerMatcher.hh>
00027 #include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageDraw.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Geometry/HomgPoint2D.hh>
00031 #include <Base/Debug/TimeMeasure.hh>
00032 #include <Filter/Gradient.hh>
00033
00034 #include <iostream>
00035 #include <iomanip>
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 int main(int argc, char*argv[])
00041 {
00042   Image<unsigned char> im[2], drawim;
00043   HomgPoint2D p[2], realpoint;
00044
00045   double correlation, mincorrelation=1.0, error, errorsum=0.0;
00046   unsigned int halfsearchwinsize=2;
00047   unsigned int uip[2], rectsize=7;
00048   unsigned int halfnccwinsize=3;
00049   unsigned int newim, oldim, res;
00050   int counter;
00051   bool debug=false;
00052   string file;
00053   bool draw=false;
00054   bool UseLeastSquaresParabola=false;
00055   MetaData *md;
00056   AppData appdata;
00057
00058   CornerMatcher matcher;
00059   TimeMeasure timer, tc;
00060
00061   if (debug){
00062     matcher.SetDebugLevel(matcher.GetDebugLevel() |D_CORNER_MATCHER_SEARCH);
00063     matcher.SetDebugLevel(matcher.GetDebugLevel() |D_REGION_MATCHER_SEARCHNCC);
00064     matcher.SetDebugLevel(matcher.GetDebugLevel() |D_REGION_MATCHER_PARABOLA);
00065     //     matcher.SetDebugLevel(matcher.GetDebugLevel()|D_REGION_MATCHER_SEARCH_ODD);
00066     //     matcher.SetDebugLevel(matcher.GetDebugLevel()|D_REGION_MATCHER_SEARCH_EVEN);
00067   }
00068
00069   if (argc<4){
00070     cerr << argv[0] << " : <x-coo> <y-coo> <image> <image> ..."<< endl;
00071     return -5;
00072   }
00073
00074   p[0][0]=atof(argv[1]);
00075   p[0][1]=atof(argv[2]);
00076   p[0][2]=p[1][2]=1.0;
00077
00078   if (ImageIO::Load(argv[3], im[0])!=0){
00079     BIASERR("error loading image "<<argv[3]);
00080     return -1;
00081   }
00082
00083   counter=3;
00084   newim=0;
00085   while (counter < argc-1){
00086     counter++;
00087     newim=(newim==0)?(1):(0);
00088     oldim=(newim==0)?(1):(0);
00089
00090     if (ImageIO::Load(argv[counter], im[newim])!=0){
00091       BIASERR("error loading image "<<argv[counter]);
00092       return -1;
00093     } else {
00094       if (debug)
00095         cout << "--------------- newim: " << argv[counter]
00096              << "  --- oldim: " << argv[counter-1] << endl;
00097       md=im[newim].GetMetaData();
00098       if (md->Find(AppData::MD_HomgPoint2D, "#[HomgPoint2D]", appdata)>=0){
00099         if (appdata.tag==AppData::MD_USE_ASCII){
00100           if (debug) cerr << appdata.stag <<" : "<<appdata.sdata<<endl;
00101           sscanf(appdata.sdata.c_str(), "[ %lf %lf %lf ]",
00102                  &realpoint[0], &realpoint[1], &realpoint[2]);
00103         } else {
00104           memcpy(realpoint.GetData(), appdata.data, appdata.length);
00105         }
00106         if (debug) cerr <<"realpoint is at "<<realpoint<<endl;
00107       } else {
00108         BIASERR("cannot find HomgPoint2D in meta data");
00109       }
00110     }
00111
00112     if (p[oldim][0]<=halfnccwinsize+3 ||
00113         p[oldim][1]<=halfnccwinsize+3 ||
00114         p[oldim][0]+halfnccwinsize+3>=im[oldim].GetWidth()-1 ||
00115         p[oldim][1]+halfnccwinsize+3>=im[oldim].GetHeight()-1){
00116       cout << "point ("<<p[oldim][0]<<", "<<p[oldim][1]<<") too close to "
00117            <<"image border, stopping"<<endl;
00118       break;
00119     }
00120
00121     timer.Start();
00122     tc.Start();
00123     if ((res=matcher.NCCSearch(p[oldim], p[oldim], im[oldim], im[newim],
00124                                halfnccwinsize, halfsearchwinsize, p[newim],
00125                                mincorrelation, correlation))!=0){
00126       BIASERR("error in NCCSearch");
00127     }
00128
00129     if (res!=0){
00130       BIASERR("error matching");
00131       break;
00132     }
00133
00134     if (debug)
00135       cerr << p[oldim] << " NCC -> " << p[newim]
00136            << " ("<<correlation<<")   Parabola -> ";
00137
00138     if (UseLeastSquaresParabola){
00139       if ((res=matcher.ParabolaNCC5(p[oldim], p[newim], im[oldim], im[newim],
00140                                     halfnccwinsize, p[newim]))!=0){
00141         BIASERR("error in ParabolaNCC");
00142         break;
00143       }
00144     } else {
00145       if ((res=matcher.ParabolaNCC(p[oldim], p[newim], im[oldim], im[newim],
00146                                    halfnccwinsize, p[newim]))!=0){
00147         BIASERR("error in ParabolaNCC");
00148         break;
00149       }
00150     }
00151     tc.Stop();
00152
00153     timer.Stop();
00154
00155     tc.Print();
00156     tc.Reset();
00157     if (debug)
00158       cerr << p[newim] << endl;
00159
00160     if (res!=0){
00161       BIASERR("error matching");
00162       break;
00163     }
00164
00165     error=p[newim].Distance(realpoint);
00166     errorsum+=error;
00167
00168     cout << setw(2) << counter-3 << " : (" << p[oldim][0]<<", "<<p[oldim][1]
00169          << ") -> ("<< p[newim][0]<<", "<<p[newim][1]<<")  corr: "<<correlation
00170          <<"   real: ("<<realpoint[0]<<", "<<realpoint[1]
00171          <<")   error: "<<error<<endl;
00172
00173     if (draw){
00174       uip[0]=(unsigned int)rint(p[newim][0]);
00175       uip[1]=(unsigned int)rint(p[newim][1]);
00176       drawim=im[newim];
00177       ImageDraw<unsigned char>::RectangleCenter(drawim, uip, rectsize);
00178
00179       file=argv[counter];
00180       file+=".tracked";
00181       ImageIO::Write(file, drawim);
00182     }
00183   }
00184
00185   cerr <<"errorsum over "<<counter-3<<" images: "<<errorsum<<endl
00186        <<"  mean error "<<errorsum/(double)(counter-3)<<endl;
00187
00188   cerr << "Parabola approximation over "<<argc-3<<" images took "
00189        <<timer.GetUserTime()<<" ms"
00190        << "\n  this is equal to "<<timer.GetUserTime()/double(argc-3)
00191        <<" ms per image and corner" << endl;
00192
00193   return 0;
00194 }
00195
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExamplePMatrix.cpp Source File

Geometry » Examples

ExamplePMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <Base/Geometry/HomgPoint2D.hh>
00028 #include <Geometry/PMatrix.hh>
00029 #include <Geometry/RMatrix.hh>
00030 #include <Base/Geometry/KMatrix.hh>
00031 #include <Base/Math/Random.hh>
00032
00033 #include <vector>
00034 #include <Geometry/PMatrixLinear.hh>
00035
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040
00041 //int main(int argc, char *argv[])
00042 int main()
00043 {
00044
00045   cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ExamplePMatrix $$$$$$$$$$$$$$$$$$$$$$"
00046        << endl;
00047   PMatrix P_current;
00048   P_current.SetIdentity();
00049
00050   KMatrix K;
00051   K.SetIdentity();
00052   K *= 100.0;
00053   K[0][2] = 384;
00054   K[1][2] = 256;
00055   K[2][2] = 1.0;
00056   K.SetIdentity();
00057
00058
00059   Vector3<double> axis(1,2,3);
00060   axis.Normalize();
00061   double angle = 1.0;
00062   RMatrix R;
00063   R.Set(axis, angle);
00064
00065   Vector3<double> C(1,2,3);
00066   Matrix3x3<double> Hinf;
00067   P_current.Compose(K,R,C);
00068
00069
00070   if (P_current.GetHinf(Hinf)!=0){
00071     BIASERR("Error computing Hinf");
00072   };
00073   cout<<"C is "<<P_current.GetC()<<" R is "<<P_current.GetR()
00074       <<" K is "<<P_current.GetK()<<" Hinf is "<<Hinf<<endl;
00075   PMatrix Pose=P_current;
00076   cout<<"C is "<<Pose.GetC()<<" R is "<<Pose.GetR()
00077       <<" K is "<<Pose.GetK()<<endl;
00078
00079   bool TestP = false;
00080   if (TestP) {
00081    for (unsigned int i=0; i<4; i++)
00082       for (unsigned int j=0; j<3; j++) {
00083         double noise = 0.995+(0.01*rand()/(double)RAND_MAX);
00084         P_current[j][i] *= noise;
00085         cout << noise <<" ";
00086       }
00087     P_current *= 7.5;
00088     P_current.InvalidateDecomposition();
00089
00090     cout <<"Pcurrent is "<<P_current<<endl;
00091     P_current.Normalize();
00092     cout <<"Pcurrent after normalizing is "<<P_current<<endl;
00093
00094    if (P_current.GetHinf(Hinf)!=0){
00095       BIASERR("Error computing Hinf");
00096     };
00097
00098     cout<<"C is "<<P_current.GetC()<<" R is "<<P_current.GetR()
00099         <<" K is "<<P_current.GetK()<<" Hinf is "<<Hinf<<endl;
00100   }
00101   cout <<" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
00102   cout <<" ++++++++++++++ linear p estimation ++++++++++++++++++++++"<<endl;
00103   BIAS::Random Rand;
00104   vector<HomgPoint3D> vecX;
00105   vector<HomgPoint2D> vecx;
00106   vector<HomgPoint3D*> vecpX;
00107   vector<HomgPoint2D*> vecpx;
00108   unsigned int n=6;
00109   vecX.reserve(n);
00110   vecx.reserve(n);
00111   bool WantPlane=true, WantNoise=true;
00112   unsigned int NumberOffPlane = 0;
00113   HomgPoint3D X,
00114     a(Rand.GetUniformDistributed(-100.0,100.0),
00115       Rand.GetUniformDistributed(-100.0,100.0),
00116       Rand.GetUniformDistributed(1.0,100.0), 1.0),
00117     b(Rand.GetUniformDistributed(-100.0,100.0),
00118       Rand.GetUniformDistributed(-100.0,100.0),
00119       Rand.GetUniformDistributed(1.0,100.0), 1.0),
00120     c(Rand.GetUniformDistributed(-100.0,100.0),
00121       Rand.GetUniformDistributed(-100.0,100.0),
00122       Rand.GetUniformDistributed(1.0,100.0), 1.0);
00123
00124   for (unsigned int i=0; i<n; i++) {
00125     if (WantPlane) {
00126       double weight1 = Rand.GetUniformDistributed(0.0,1.0);
00127       double weight2 = Rand.GetUniformDistributed(0.0,weight1);
00128       X = a*weight1 + b*weight2 + c*(1.0-weight1-weight2);
00129       X[3] = 1.0;
00130     } else {
00131       X.Set(Rand.GetUniformDistributed(-100.0,100.0),
00132             Rand.GetUniformDistributed(-100.0,100.0),
00133             Rand.GetUniformDistributed(1.0,100.0), 1.0);
00134     }
00135     if (i<NumberOffPlane) {
00136       X.Set(Rand.GetUniformDistributed(-100.0,100.0),
00137             Rand.GetUniformDistributed(-100.0,100.0),
00138             Rand.GetUniformDistributed(1.0,100.0), 1.0);
00139     }
00140     cout <<"using point X="<<X<<endl;
00141     HomgPoint2D x;
00142     x = P_current * X;
00143     x.Homogenize();
00144     if (WantNoise) {
00145       x[0] *= Rand.GetUniformDistributed(0.999, 1.001);
00146       x[1] *= Rand.GetUniformDistributed(0.999, 1.001);
00147     }
00148     vecX.push_back(X);
00149     vecx.push_back(x);
00150   }
00151   for (unsigned int i=0; i<n; i++) {
00152     vecpX.push_back(&vecX[i]);
00153     vecpx.push_back(&vecx[i]);
00154   }
00155
00156   PMatrixLinear PLin;
00157   PLin.SetDebugLevel(PMATRIXLINEAR);
00158
00159   Pose.SetZero();Pose.InvalidateDecomposition();
00160   cout <<"Pose estimation:"<<endl;
00161   if (!PLin.ComputeCalibrated(vecpX, vecpx, Pose)) BIASERR("failed !");
00162
00163   cout <<"Pose      is "<<Pose<<endl;
00164   cout <<"P_current is "<<P_current<<endl;
00165   cout <<"Diff      is "<<Pose-P_current<<endl;
00166   cout<<endl;
00167
00168   Pose.SetZero();Pose.InvalidateDecomposition();
00169   cout <<"complete PMatrix estimation:"<<endl;
00170   PLin.SetDebugLevel(0);
00171   if (!PLin.Compute(vecpX, vecpx, Pose)) BIASERR("failed !");
00172   Pose.Normalize();
00173   if (Pose[2][0]*P_current[2][0]<0) Pose *= -1.0;
00174   cout <<"Pose      is "<<Pose<<endl;
00175   cout <<"P_current is "<<P_current<<endl;
00176   cout <<"Diff      is "<<Pose-P_current<<endl;
00177   cout<<endl;
00178
00179   return 0;
00180 }
00181
00182
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExamplePMatrixBase.cpp Source File

Base » Geometry » Examples

ExamplePMatrixBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Geometry/PMatrixBase.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 //int main(int argc, char *argv[])
00032 int main()
00033 {
00034   PMatrixBase P("497.9905512    1.440355214e-05    164.9405861     -1502.278858   79.17947938        415.6922058          226.56256       -2063.531797     0.3299144974    8.243640548e-08       0.9440108179        -8.59805053 ");
00035
00036   PMatrixBase P2("286.845486      2.8e-05         164.940829       -1502.281035    -79.17938         415.692207         226.562599        -2063.53244 -0.329914                  0           0.944011          -8.598052");
00037
00038   HomgPoint3D p3d(3.664444685, -9.783601761, 26.40313911);
00039
00040   HomgPoint2D p2d;
00041
00042   p2d=P * p3d;
00043
00044   p2d.Homogenize();
00045
00046   cerr <<"p2d: "<<p2d<<endl;
00047
00048
00049   p2d=P2 * p3d;
00050
00051   p2d.Homogenize();
00052
00053   cerr <<"p2d: "<<p2d<<endl;
00054
00055   return 0;
00056
00057 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExamplePMDImageIO.cpp Source File

Image » Examples

ExamplePMDImageIO.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030 #include <Base/Image/ImageIO.hh>
00031 #include <Image/PMDImageProc.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 int main(int argc, char *argv[]) {
00037
00038   Image<unsigned char> im, im2;
00039   Image<float> dim, dim2, mcim, mcim2;
00040   string PMDName = "img.tif";
00041   PMDImageMetaData meta, meta2, metad, metad2;
00042
00043   if (argc>1) {
00044     if (strstr(argv[1],".tif")!=NULL) {
00045       PMDName = argv[1];
00046     } else {
00047       if (argc<=1 || ImageIO::Load(argv[1], im)!=0){
00048         cerr << argv[1] << " <image>\n";
00049         im.Init(640, 480, 3);
00050         im.FillImageWithXValue();
00051       } else {
00052         cout << "Read 2D-image:" <<  argv[1] << endl;
00053       }
00054       if (argc<=2 || ImageIO::Load(argv[2], dim)!=0){
00055         cerr << argv[2] << " <image>\n";
00056         dim.Init(640, 480, 1, ImageBase::ST_float);
00057         dim.FillImageWithXValue();
00058       } else {
00059         cout << "Read depth-image:" <<  argv[2] << endl;
00060       }
00061       if (argc<=3 || ImageIO::Load(argv[3], mcim)!=0){
00062         cerr << argv[3] << " <image>\n";
00063         mcim.Init(640, 480, 1, ImageBase::ST_float);
00064         mcim.FillImageWithXValue();
00065       } else {
00066         cout << "Read modulation-coefficients-image:" <<  argv[3] << endl;
00067       }
00068
00069       meta.PrincipalX = 100;
00070       meta.PrincipalY = 200;
00071       meta.FocallengthX = 300;
00072       meta.AspectRatio = 1;
00073       meta.UndistCoeff[0] = 1;
00074       meta.UndistCoeff[1] = 1.3;
00075       meta.UndistCoeff[2] = 1.6;
00076       meta.UndistCoeff[3] = 1.9;
00077
00078       metad.PrincipalX = 1100;
00079       metad.PrincipalY = 1200;
00080       metad.FocallengthX = 1300;
00081       metad.AspectRatio = 1.8;
00082       metad.UndistCoeff[0] = 1.8;
00083       metad.UndistCoeff[1] = 1.34;
00084       metad.UndistCoeff[2] = 1.64;
00085       metad.UndistCoeff[3] = 1.94;
00086
00087       PMDImageProc::Write("img.tif", im, dim, mcim, meta, metad);
00088       cout << "Wrote img.tif" << endl;
00089       cout << "Metadata set: " << endl
00090            << meta.PrincipalX << " " << meta.PrincipalY  << " "
00091            << meta.FocallengthX  << " " << meta.AspectRatio << " " ;
00092       for (int i=0; i<4; i++) {
00093         cout << meta.UndistCoeff[i] << " " ;
00094       }
00095       cout << endl;
00096     }
00097   }
00098
00099   PMDImageProc::Read(PMDName, im2, dim2, mcim2, meta2, metad2);
00100   cout << "Read img.tif" << endl;
00101   cout << "Metadata read: " << endl
00102        << meta2.PrincipalX << " " << meta2.PrincipalY  << " "
00103        << meta2.FocallengthX  << " " << meta2.AspectRatio << " "
00104        << meta2.width  << " " << meta2.height << " "
00105        << meta2.channels << " ";
00106   cout << "|";
00107   for (int i=0; i<4; i++) {
00108     cout << meta2.UndistCoeff[i] << " " ;
00109   }
00110   cout << "|";
00111   for (int i=0; i<3; i++) {
00112     cout << meta2.CameraCenter[i] << " ";
00113   }
00114   cout << "|";
00115   for (int i=0; i<3; i++) {
00116      cout << meta2.CameraRotation[i] << " ";
00117   }
00118   cout  << endl << "Metadata depth read: " << endl
00119         << metad2.PrincipalX << " " << metad2.PrincipalY  << " "
00120         << metad2.FocallengthX  << " " << metad2.AspectRatio << " "
00121         << metad2.width  << " " << metad2.height << " "
00122         << metad2.channels ;
00123
00124   cout << "|";
00125   for (int i=0; i<4; i++) {
00126     cout << metad2.UndistCoeff[i] << " " ;
00127   }
00128   cout << "|";
00129   for (int i=0; i<3; i++) {
00130     cout << metad2.CameraCenter[i] << " ";
00131   }
00132   cout << "|";
00133   for (int i=0; i<3; i++) {
00134      cout << metad2.CameraRotation[i] << " ";
00135   }
00136   cout << endl;
00137
00138   if (!im2.IsEmpty())
00139     ImageIO::Save("img.mip", im2);
00140   if (!dim2.IsEmpty())
00141     ImageIO::Save("imgdepth.mip", dim2);
00142   if (!mcim2.IsEmpty())
00143     ImageIO::Save("imgModCoeff.mip", mcim2);
00144
00145 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExamplePolynom.cpp Source File

Base » Math » Examples

ExamplePolynom.cpp

Go to the documentation of this file.
00001 #include <Base/Math/Polynom.hh>
00002
00003 using namespace BIAS;
00004 using namespace std;
00005
00006 void printPolynom(Polynom p){
00007   for (unsigned int i=0; i<p.GetOrder(); i++){
00008     cout << p[p.GetOrder()-i-1] << "x^" << p.GetOrder()-i-1 << " ";
00009   }
00010   cout<< endl;
00011 }
00012
00013 //int main()
00014 //int main(int argc, char * argv[])
00015 int main()
00016 {
00017
00018   //Polynom of order 3 but coefficient of x^2 is 0
00019   // x + 2
00020   Polynom a(3);
00021   a[0]=2;
00022   a[1]=1;
00023
00024   //Polynom of order 4
00025   // 3x^3 + 2x^2 + 2x + 1
00026   Polynom b(4);
00027   b[0]=1;
00028   b[1]=2;
00029   b[2]=2;
00030   b[3]=3;
00031
00032   //empty polynoms
00033   Polynom c, d, e, f, g, h, i, j, k;
00034   double z = 2.;
00035   c= a+b;
00036   d= b-a;
00037   e= a-b;
00038   f= a*b;
00039   g= z*b;
00040   h= b*z;
00041   i+=h;
00042   j-=h;
00043   k=a;
00044   k*=b;
00045
00046   cout << "polynom a: ";printPolynom(a);
00047   cout << "polynom b: ";printPolynom(b);
00048   cout << "double z: " << z << endl;
00049   cout << endl;
00050   cout << "polynom a+b: ";printPolynom(c);
00051   cout << "polynom b-a: ";printPolynom(d);
00052   cout << "polynom a-b: ";printPolynom(e);
00053   cout << "polynom a*b: ";printPolynom(f);
00054   cout << "polynom z*b: ";printPolynom(g);
00055   cout << "polynom b*z: ";printPolynom(h);
00056   cout << "polynom i+=h: (should be b*z)";printPolynom(i);
00057   cout << "polynom j-=h: (should be -(b*z))";printPolynom(j);
00058   cout << "polynom k=a k*=b (should be a*b)";printPolynom(k);
00059 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExamplePolynomialSolve.cpp Source File

MathAlgo » Examples

ExamplePolynomialSolve.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <MathAlgo/PolynomialSolve.hh>
00028 #include <Base/Math/Random.hh>
00029 #include <algorithm>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 bool debug=false;
00035 double maxerr=1e-8;
00036
00037 namespace std{
00038   bool operator<(complex<double>& left, complex<double>& right)
00039   {
00040     return (left.real()<right.real());
00041   }
00042   bool operator<(const complex<double>& left, const complex<double>& right)
00043   {
00044     return (left.real()<right.real());
00045   }
00046 }
00047
00048 void solout(vector<POLYNOMIALSOLVE_TYPE>& sol)
00049 {
00050   sort(sol.begin(), sol.end());
00051   int s=(int)sol.size();
00052   cout.precision(20);
00053   for (int i=0; i<s; i++)
00054     if (debug) cout << sol[i] << "  ";
00055   if (debug) cout << endl;
00056 }
00057
00058 void solout(vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00059 {
00060   sort(sol.begin(), sol.end());
00061   int s=(int)sol.size();
00062   cout.precision(20);
00063   for (int i=0; i<s; i++)
00064     if (debug) cout << sol[i] << "  ";
00065   if (debug) cout << endl;
00066 }
00067
00068
00069 void errout(vector<POLYNOMIALSOLVE_TYPE>& sol,
00070             vector<POLYNOMIALSOLVE_TYPE>& gtsol)
00071 {
00072   sort(sol.begin(), sol.end());
00073   int s=(int)sol.size();
00074   cout.precision(20);
00075   if (debug) cout << "error: ";
00076   for (int i=0; i<s; i++){
00077
00078    if (debug) cout << fabs(sol[i]-gtsol[i]) << "  ";
00079     if (fabs(sol[i]-gtsol[i])>maxerr) {
00080       cerr << "\n\n\nerror bigger than "<<maxerr<<"\n" <<endl;
00081       debug=true;
00082       cout << "ground truth: ";
00083       solout(gtsol);
00084       cout << "computed: ";
00085       solout(sol);
00086       cout << "error: ";
00087       for (int i=0; i<s; i++) cout << fabs(sol[i]-gtsol[i]) << "  ";
00088       cout << endl;
00089       cerr << "\n\n\nthis happens if the roots of the polynomial are close together\n\n\n"
00090            <<endl;
00091       BIASASSERT(false);
00092     }
00093   }
00094   if (debug) cout << endl << endl;
00095 }
00096
00097 void errout(vector<complex<POLYNOMIALSOLVE_TYPE> >& sol,
00098             vector<POLYNOMIALSOLVE_TYPE>& gtsol)
00099 {
00100   sort(sol.begin(), sol.end());
00101   int s=(int)sol.size();
00102   cout.precision(20);
00103   if (debug) cout << "error: ";
00104   for (int i=0; i<s; i++){
00105     if (debug) cout << fabs((sol[i]).real()-gtsol[i]) << "  ";
00106     if (fabs((sol[i]).real()-gtsol[i])>maxerr) {
00107       cerr << "\n\n\nerror bigger than "<<maxerr<<"\n" <<endl;
00108       debug=true;
00109       cout << "ground truth: ";
00110       solout(gtsol);
00111       cout << "computed: ";
00112       solout(sol);
00113       cout << "error: ";
00114       for (int i=0; i<s; i++) cout << fabs((sol[i]).real()-gtsol[i]) << "  ";
00115       cout << endl;
00116       cerr << "\n\n\nthis happens if the roots of the polynomial are close together\n\n\n"
00117            <<endl;
00118       BIASASSERT(false);
00119     }
00120   }
00121   if (debug) cout << endl << endl;
00122 }
00123
00124 /** @author woelk 08/2004 */
00125 //int main(int argc, char *argv[])
00126 int main()
00127 {
00128   PolynomialSolve ps;
00129   Random ran;
00130
00131   int num=9000;
00132   //num=1; debug=true; ps.AddDebugLevel(D_PS_COEFF);
00133   int maxdeg=8;
00134   double maxsol=5e1;
00135
00136   int deg, nums;
00137   vector<POLYNOMIALSOLVE_TYPE> coeff, sol, gtsol;
00138   vector<complex<POLYNOMIALSOLVE_TYPE> > csol;
00139
00140   for (int n=0; n<num; n++){
00141     deg=ran.GetUniformDistributedInt(0, maxdeg);
00142     //    deg=5;
00143     if (debug){
00144       cout << "-----------------"<< setw(3) << n <<"------------------"<<endl;
00145       cout << "using a polynom of degree "<<deg<<endl;
00146     } else {
00147       if (n%10==0){
00148         cout << n << flush;
00149       } else {
00150         cout << "." << flush;
00151       }
00152     }
00153
00154     gtsol.resize(deg);
00155
00156     // first generate random solutions
00157     for (int d=0; d<deg; d++){
00158       gtsol[d]=ran.GetUniformDistributed(-maxsol, maxsol);
00159       //gtsol[d]=d+1;
00160       if (debug)
00161         cout << d << "th root: "<<gtsol[d]<<endl;
00162     }
00163     sort(gtsol.begin(), gtsol.end());
00164
00165     // now calculate the coefficients
00166     ps.CalCoefficients(gtsol, coeff);
00167     if (debug){
00168       for (int i=0; i<deg+1; i++){
00169         cout << i << "th coefficient: "<< coeff[i]<<endl;
00170       }
00171     }
00172     /* // test for CheckCoefficients
00173     coeff[deg]=0.0;     if (deg>1) coeff[deg-1]=1e-12;
00174     ps.CheckCoefficients(coeff, 1e-11);
00175     if (debug){
00176       for (int i=0; i<coeff.size(); i++){
00177         cout << i << "th coefficient: "<< coeff[i]<<endl;
00178       }
00179     }
00180     */
00181
00182     // check if coefficients are correct
00183     if (debug) {
00184       cout << "polynomial at ground truth roots: "<<endl;
00185       for (int i=0; i<deg; i++){
00186         cout << "p("<<-gtsol[i]<<") = "<<ps.EvaluatePolynomial(gtsol[i], coeff)
00187              << "   ";
00188         cout << endl;
00189       }
00190     }
00191
00192     nums=ps.Solve(coeff, sol);
00193     if (debug) cout <<"Solve (real)    found "<<nums<<" solutions:\n";
00194     if (nums>0) { solout(sol); errout(sol, gtsol); }
00195     nums=ps.Solve(coeff, csol);
00196     if (debug) cout <<"Solve (complex) found "<<nums<<" solutions:\n";
00197     if (nums>0) { solout(csol); errout(csol, gtsol); }
00198
00199     nums=ps.Numeric(coeff, sol);
00200     if (debug)cout<<"Numeric (real)    found "<<nums<<" solutions:\n";
00201     if (nums>0) { solout(sol); errout(sol, gtsol); }
00202     nums=ps.Numeric(coeff,csol);
00203     if (debug) cout<<"Numeric (complex) found "<<nums<<" solutions:\n";
00204     if (nums>0) { solout(csol); errout(csol, gtsol); }
00205
00206     if (deg<=4){
00207       nums=ps.Analytic(coeff, sol);
00208       if (debug) cout << "Analytic (real)    found "<<nums<<" solutions:\n";
00209       if (nums>0) { solout(sol); errout(sol, gtsol); }
00210     }
00211     if (deg<=3){
00212       nums=ps.Analytic(coeff, csol);
00213       if (debug) cout << "Analytic (complex) found "<<nums<<" solutions:\n";
00214       if (nums>0) { solout(csol); errout(csol, gtsol); }
00215     }
00216
00217   }
00218
00219   return 0;
00220 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExamplePowell.cpp Source File

MathAlgo » Examples

ExamplePowell.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <MathAlgo/Minpack.hh>
00028 #include <Base/Math/Random.hh>
00029 #include <Base/Math/Vector.hh>
00030 #include <Base/Math/Matrix3x3.hh>
00031 #include <Base/Math/Vector3.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 Vector<double> m1(3), m2(3);
00037 int num;
00038
00039 void myfunc(int *n, double *x, double *fvec
00040             ,int *iflag
00041             )
00042 {
00043   cerr << setw(3)<< num<<" : "<<x[0]<<"\t"<<x[1]<<"\t"<<x[2]<<" :: \t";
00044   fvec[0]=m2[0]-sin(x[0])*m1[0];
00045   fvec[1]=m2[1]-cos(x[1])*m1[1];
00046   fvec[2]=m2[2]-sin(x[2])*m1[2];
00047   cerr << fvec[0]<<"\t"<<fvec[1]<<"\t"<<fvec[3]<<endl;
00048   num++;
00049 }
00050
00051
00052
00053 //int main(int argc, char *argv[])
00054 int main()
00055 {
00056   int res=0;
00057   Random ran;
00058   num=0;
00059   Matrix3x3<double> mat;
00060   Vector<double> groundtruth(3, "0.09 0.015 -0.02");
00061   Vector<double> InitialGuess(3, "0.15 0.02 -0.05");
00062   Vector<double> Result(3, "0.0 0.0 0.0");
00063
00064   // create matches
00065   m1[0]=ran.GetUniformDistributed(-20.0, 20.0);
00066   m1[1]=ran.GetUniformDistributed(-20.0, 20.0);
00067   m1[2]=ran.GetUniformDistributed(-20.0, 20.0);
00068   mat.Fill(0.0);
00069   mat[0][0]=sin(groundtruth[0]);
00070   mat[1][1]=cos(groundtruth[1]);
00071   mat[2][2]=sin(groundtruth[2]);
00072   cout << "mat: "<<mat<<endl;
00073   m2=mat*(Vector3<double>)m1;
00074   cout <<m1<<"  <-->  "<<m2<<"\tmat * m1: "<<mat*(Vector3<double>)m1<<endl;
00075
00076   if (Powell(myfunc, InitialGuess, Result)!=0){
00077     BIASERR("error in Powell ");
00078     return -1;
00079   }
00080
00081   cout <<  "ground truth        : "<<groundtruth
00082        <<"\nnon linear estimate : "<<Result<<endl;
00083
00084   return res;
00085 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleProjection.cpp Source File

Geometry » Examples

ExampleProjection.cpp

Go to the documentation of this file.
00001 #include <Geometry/Projection.hh>
00002 #include <Geometry/ProjectionParametersSpherical.hh>
00003 #include <iostream>
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008 int main (int argc, char* argv[])
00009 {
00010   Projection proj1, proj2;
00011 #ifdef BIAS_HAVE_XML2
00012   if (argc<2) {
00013     cout <<"no file given, terminating!"<<endl;
00014     exit(0);
00015   }
00016   else {
00017     if (proj1.XMLRead(argv[1])<0) {
00018       if (proj1.ReadFromCamParamFile(argv[1])<0) {
00019         cout << "Error reading file:" << argv[1] << endl;
00020         exit(0);
00021       }
00022     }
00023     cout << "Read file:" << argv[1] << endl;
00024   }
00025
00026   cout <<"Projection is: "<<proj1<<endl;
00027   ProjectionParametersSpherical *pps =
00028     dynamic_cast<ProjectionParametersSpherical *> (proj1.GetParameters());
00029
00030   //const ProjectionParametersSpherical* pPPS =
00031   //   dynamic_cast<const ProjectionParametersSpherical*> proj1.GetParameters();
00032   KMatrix K1, K2, K3;
00033   double imgsize1,imgsize2, imgsize3;
00034   K1 = pps->GetFakeKMatrix(imgsize1,0);
00035   K2 = pps->GetFakeKMatrix(imgsize2,1);
00036   K3 = pps->GetFakeKMatrix(imgsize3,2);
00037   cout << "KMatNormal:" << imgsize1 << "x" << imgsize1 << K1 << endl;
00038   cout << "KMatBig:" <<    imgsize2 << "x" << imgsize1 << K2 << endl;
00039   cout << "KMatSmall:" <<  imgsize3 << "x" << imgsize1 << K3 << endl;
00040   string flat;
00041   proj1.XMLWriteToString(flat);
00042   cout <<"My Projection flat as string: "<<flat<<endl;
00043   proj1.XMLReadFromString(flat);
00044   proj1.XMLWrite("PassedThroughString.xml");
00045
00046
00047   cout <<"Externals: "<<proj1.GetParameters()->GetExternals()<<endl;
00048   HomgPoint3D p3d;
00049   HomgPoint2D p2d;
00050
00051   p3d[0] = 10.0;  p3d[1] = 11.0;  p3d[2] = -10.0;  p3d[3] = 1.0;
00052
00053   p2d = proj1.Project(p3d);
00054   cout <<p3d<<"  -> "<<p2d<<endl;
00055
00056   proj1.XMLWrite("CamDataTest.xml");
00057   cout <<"CamDataTest.xml created" << endl;
00058
00059   proj2.XMLRead("CamDataTest.xml");
00060   proj2.XMLWrite("CamDataTestRewrite.xml");
00061   cout <<"CamDataTestRewrite.xml created" << endl;
00062
00063
00064
00065
00066
00067 #endif
00068   return 0;
00069 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleProjectionMapping.cpp Source File

Image » Examples

ExampleProjectionMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/ProjectionMapping.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Image/Image.hh>
00030 #include <Base/Debug/TimeMeasure.hh>
00031 #include <Base/Math/Vector3.hh>
00032 #include <Base/Math/Vector.hh>
00033 #include <Utils/Param.hh>
00034 #include <Utils/ThreeDOut.hh>
00035 #include <Geometry/ProjectionParametersSpherical.hh>
00036 #include <Image/Camera.hh>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 // Calculates rotationAngle for sequence steps in x or y (yaxis = true)
00042 // direction.
00043 void GetSequenceAngle(unsigned int & sequence ,Projection p1,
00044                       Projection p2, const bool yaxis, double & rotationAngle)
00045 {
00046   unsigned int width1,height1,width2,height2;
00047   double angle1, angle2,focalLength;
00048
00049   ProjectionParametersPerspective *pPPP =
00050     dynamic_cast<ProjectionParametersPerspective * >(p1.GetParameters());
00051   ProjectionParametersSpherical *pPPS =
00052     dynamic_cast<ProjectionParametersSpherical * >(p1.GetParameters());
00053   if (pPPP!=NULL){
00054     pPPP->GetImageSize(width1,height1);
00055     pPPP->GetFocalLength(focalLength);
00056     if(!yaxis) angle1 = 2*atan(width1/(2*focalLength));
00057     else angle1 = 2*atan(height1/(2*focalLength));
00058   }
00059   else if (pPPS!=NULL) angle1 = 1.7*pPPS->GetMaxCamAngle();
00060   else{
00061     cout<<"Hat nicht geklappt. Kamera 1 ist weder Perspektivisch, noch Spherisch.";
00062     return;
00063   }
00064   pPPP = dynamic_cast<ProjectionParametersPerspective * >(p2.GetParameters());
00065   pPPS = dynamic_cast<ProjectionParametersSpherical * >(p2.GetParameters());
00066   if (pPPP!=NULL){
00067     pPPP->GetImageSize(width2,height2);
00068     pPPP->GetFocalLength(focalLength);
00069     if(!yaxis) angle2 = 2*atan(width2/(2*focalLength));
00070     else angle2 = 2*atan(height2/(2*focalLength));
00071   }
00072   else if (pPPS!=NULL) angle2 = 1.7*pPPS->GetMaxCamAngle();
00073   else{
00074     cout<<"Hat nicht geklappt. Kamera 2 ist weder Perspektivisch, noch Spherisch.";
00075     return;
00076   }
00077   if(sequence == 0){
00078     sequence =(unsigned int)(angle1/angle2);
00079     rotationAngle = angle2;
00080   }
00081   else{
00082     rotationAngle = (angle1-angle2)/((double)sequence-1);
00083   }
00084
00085   cout << "Abgedeckter Winkel: " << (rotationAngle*(sequence-1)*180/M_PI) << " Winkel der OriginalKamera: " << (angle1*180/M_PI) << " Winkel der ZielKamera: " << (angle2*180/M_PI) << endl;
00086 }
00087
00088 //Set a rotation of angle a around vector v for projection p.
00089 void SetRotation(Projection & p,Vector3< ROTATION_MATRIX_TYPE >  v,double a)
00090 {
00091   RMatrix R (v, a);
00092   p.GetParameters()->SetR(R);
00093 }
00094
00095 //default sink projection
00096 void GenerateProjection(Projection & p)
00097 {
00098   ProjectionParametersPerspective pBase;
00099
00100   pBase.SetImageSize(640,480);
00101   pBase.SetFocalLengthAndAspect(800.0,1.0);
00102   pBase.SetPrincipal(320,240);
00103   p = pBase;
00104   SetRotation(p,Vector3< ROTATION_MATRIX_TYPE > (0,1,0),0.5);
00105 }
00106
00107 int main(int argc, char *argv[])
00108 {
00109
00110   Param *param = new Param();
00111   string sourceImage,sourceCam,sinkCam;
00112   unsigned int sequence;
00113   Vector< double > rotationVector;
00114   double rotationAngle;
00115   MetaData metaData;
00116
00117   param->AddParamString("SourceImage",
00118             "Absolute path to the source Image",
00119                         "",
00120                         'i');
00121
00122   param->AddParamString("SinkImage",
00123                         "Absolute path to the sink Image",
00124                         "image_projection_trilinear",
00125                         'o');
00126
00127   param->AddParamString("SourceCam",
00128                        "Absolute path to the source Camera calibration XML",
00129                        "",
00130                        'c');
00131   param->AddParamDouble("RotationAngle",
00132                        "Angle to rotate around v in RAD (e.g. 0.1)",
00133                        0.0,
00134                0.0,
00135                2*M_PI,
00136                        'w');
00137   param->AddParamString("SinkCam",
00138                        "Absolute path to the sink Camera calibration XML",
00139                        "",
00140                        's');
00141   param->AddParamVecDbl("RotationVector",
00142                        "A Vector to rotate (e.g. 0.0 1.0 0.0)",
00143                        "0.0 1.0 0.0",
00144                        'v');
00145   param->AddParamInt("Sequence",
00146                        "Give a number of images to create a sequence",
00147                        1,
00148                        1,
00149                1000,
00150                        'S');
00151   param->AddParamBool("Mosaic",
00152                        "Create a mosaic from Image?",
00153                        false,
00154                        'm');
00155   param->ParseCommandLine(argc,argv);
00156
00157   //Read and load source image and projection from parameters
00158   sourceImage = *param->GetParamString("SourceImage");
00159   sourceCam = *param->GetParamString("SourceCam");
00160   if(sourceImage == "" || sourceCam == "")
00161     {
00162       BIASERR(argv[0]<<" -i<image-file> -c<SourceCamera-file>" <<
00163       "-raSs[Rotation-Vector Rotation-Angle] [Sequence] [SinkCamera-file]");
00164     return -1;
00165     }
00166
00167
00168   Image<unsigned char> im;
00169   if (ImageIO::Load(sourceImage, im)!=0){
00170     BIASERR("error loading "<<sourceImage);
00171     return -2;
00172   }
00173   if (im.GetColorModel()!=ImageBase::CM_Grey) ImageConvert::ToGrey(im,im);
00174
00175   ProjectionMapping<unsigned char, unsigned char> mapper;
00176   Projection p1,p2;
00177
00178   if (p1.XMLRead(sourceCam)!=0) {
00179     if (p1.ReadFromCamParamFile(sourceCam)!=0) {
00180       BIASERR("Error reading "<<sourceCam);
00181       return -3;
00182     }
00183   }
00184   BIASASSERT(p1.GetParameters()!=NULL);
00185   mapper.SetSourceCam(p1);
00186
00187   //use default sink projection or load specified one
00188   sinkCam = *param->GetParamString("SinkCam");
00189   if(sinkCam == "")    {
00190     GenerateProjection(p2);
00191   }  else   {
00192     if (p2.XMLRead(sinkCam)!=0) {
00193       if (p2.ReadFromCamParamFile(sinkCam)!=0) {
00194         BIASERR("Error reading "<<sinkCam);
00195         return -3;
00196       }
00197     }
00198   }
00199   BIASASSERT(p2.GetParameters()!=NULL);
00200   //set the rotation for sink projection, default none
00201   rotationVector = *param->GetParamVecDbl("RotationVector");
00202   rotationAngle = *param->GetParamDouble("RotationAngle");
00203   Vector3<ROTATION_MATRIX_TYPE> v(rotationVector);
00204   SetRotation(p2,v,rotationAngle);
00205   cout << rotationVector.Length() << endl;
00206
00207   unsigned int width, height;
00208
00209   sequence = *param->GetParamInt("Sequence");
00210   bool mosaic = *param->GetParamBool("Mosaic");
00211   //calculate the sequence angle if wanted
00212   if(sequence > 1 && !mosaic)
00213     {
00214       GetSequenceAngle(sequence,p1,p2,false,rotationAngle);
00215     }
00216   p2.GetParameters()->GetImageSize(width,height);
00217   cout<<"ROI of source image is "<<*im.GetROI()
00218       <<" while image size is "<<width<<" x "<<height<<endl;
00219   Camera<unsigned char> imrestrilinear;
00220   imrestrilinear.Init(width,height,im.GetChannelCount());
00221   //    imrestrilinear(width,height, im.GetChannelCount());
00222   //imrestrilinear.SetColorModel(im.GetColorModel());
00223
00224   cout<<"timing ..."<<endl<<flush;
00225   TimeMeasure t1;
00226   stringstream filename;
00227   //ThreeDOut vrml;
00228   //vrml.SetParamsCameraStyle(PyramidMesh);
00229   //if(sequence>1) vrml.AddProjection(p1);
00230   //calculate the image for given rotation angle or sequence
00231
00232   for(unsigned int i=0;i<50;i++){
00233     cout<<"Run: "<<i<<"/50"<<endl;
00234     SetRotation(p2,v,(0.03*((double)i-(49.0/2.0))));
00235     //  vrml.AddProjection(p2);
00236     mapper.SetSinkCam(p2);
00237     mapper.Map(im, imrestrilinear, MapTrilinear);
00238     imrestrilinear.SetProj(p2);
00239     imrestrilinear.UpdateMetaData();
00240       filename.str("");
00241     char tmpStr[8];
00242     sprintf(tmpStr, "%03i", i);
00243     filename << "/datapc/sieg/oniemann/data/images/find/find_image_"<<tmpStr<<".mip";
00244     if (ImageIO::Write(filename.str(), imrestrilinear)!=0){
00245       BIASERR("error image");
00246     }
00247   }
00248
00249   if(!mosaic)
00250   {
00251     for (unsigned int i=0; i<sequence; i++) {
00252       if(sequence > 1){
00253     v[0] = 0.0;
00254     v[1] = 1.0;
00255     v[2] = 0.0;
00256     cout << "Run "<<i<<endl;
00257         cout << "RotationAngle: " << rotationAngle*((double)i-(((double)sequence-1)/2.0))*180/M_PI << endl;
00258         SetRotation(p2,v,(rotationAngle*((double)i-(((double)sequence-1)/2.0))));
00259     //  vrml.AddProjection(p2);
00260       }
00261       else{
00262       cout << "Angle: " << (rotationAngle*180/M_PI) << endl;
00263       }
00264       mapper.SetSinkCam(p2);
00265       t1.Start();
00266       // trilinear mapping with automatic scale and pyramid size selection
00267       mapper.Map(im, imrestrilinear, MapTrilinear);
00268       imrestrilinear.SetProj(p2);
00269       imrestrilinear.UpdateMetaData();
00270       t1.Stop();
00271       filename.str("");
00272       char tmpStr[8];
00273       sprintf(tmpStr, "%03i", i);
00274       filename << "/datapc/sieg/oniemann/data/images/reference/reference_image_000_"<<tmpStr<<".mip";
00275       if (ImageIO::Write(filename.str(), imrestrilinear)!=0){
00276         BIASERR("error image");
00277       }
00278     }
00279   }
00280   //calculate mosaic image
00281   else
00282   {
00283     double rotationAngle2;
00284     unsigned int sequence2;
00285     Vector3<ROTATION_MATRIX_TYPE> v2("1 0 0");
00286     RMatrix R, R2, R3;
00287
00288     sequence = 0;
00289     sequence2 = 0;
00290     GetSequenceAngle(sequence,p1,p2,false,rotationAngle);
00291     GetSequenceAngle(sequence2,p1,p2,true,rotationAngle2);
00292     //Run through ImageHeight
00293     for ( unsigned int j=0; j<sequence2; j++) {
00294       R3= RMatrix(v2, (rotationAngle2*((double)j-(((double)sequence2-1.0)/2.0))));
00295       for (unsigned int i=0; i<sequence; i++) {
00296     if(j%2==0){
00297       R2= RMatrix(v, (rotationAngle*((double)i-(((double)sequence-1.0)/2.0))));
00298     }
00299     else{
00300       R2= RMatrix(v, (rotationAngle*((double)i+0.5-(((double)sequence-1.0)/2.0))));
00301     }
00302       //Run through ImageWidth
00303         cout << "Run " << i <<" " << j <<endl;
00304
00305         R2.Mult(R3,R);
00306     p2.GetParameters()->SetR(R);
00307         mapper.SetSinkCam(p2);
00308         t1.Start();
00309         // trilinear mapping with automatic scale and pyramid size selection
00310     imrestrilinear.FillImageWithConstValue((unsigned char)0);
00311         mapper.Map(im, imrestrilinear, MapTrilinear);
00312     imrestrilinear.SetProj(p2);
00313     imrestrilinear.UpdateMetaData();
00314         t1.Stop();
00315         filename.str("");
00316         char tmpStr[8];
00317         sprintf(tmpStr, "%03i_%03i", j, i);
00318         filename << "/datapc/sieg/oniemann/data/images/reference/reference_image_"<<tmpStr<<".mip";
00319         if (ImageIO::Write(filename.str(), imrestrilinear)!=0){
00320           BIASERR("error image");
00321     }
00322       }
00323     }
00324   }
00325
00326   //create vrml file
00327   //vrml.VRMLOut("myVRML.wrl");
00328
00329   cout <<"Trilinear mapping took "
00330        <<t1.GetUserTime()/double(sequence)
00331        <<" ms,"<<endl;
00332
00333   return 0;
00334 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleProjectionParametersIO.cpp Source File

Geometry » Examples

ExampleProjectionParametersIO.cpp

Go to the documentation of this file.
00001 #include <Geometry/ProjectionParametersIO.hh>
00002 #include <iostream>
00003
00004 using namespace BIAS;
00005 using namespace std;
00006
00007 int main (int argc, char* argv[])
00008 {
00009   CameraData cd, cd2;
00010   vector<CameraData> vcd, vcd2;
00011 #ifdef BIAS_HAVE_XML2
00012   if (argc<2) {
00013     cout <<"no file given, using some build-in data"<<endl;
00014     ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(cd);
00015   }
00016   else {
00017     if (ProjectionParametersIO::ReadCameraData(argv[1],cd)<0) {
00018       cout << "Error reading file:" << argv[1] << endl;
00019     } else {
00020       cout << "Read file:" << argv[1] << endl;
00021     }
00022   }
00023
00024   if (argc<3) {
00025     cout <<"no rig file given, using some build-in data"<<endl;
00026     ProjectionParametersIO::SetData_DummyRig(vcd);
00027   } else {
00028     BIASASSERT(argc>1);
00029     if (ProjectionParametersIO::ReadRigData(argv[2],vcd)<0) {
00030       cout << "Error reading file:" << argv[1] << endl;
00031     } else {
00032       cout << "Read file:" << argv[1] << endl;
00033     }
00034   }
00035   cout << "File contents: ";
00036   if (argc>1)
00037     cout<<argv[1]  ;
00038   cout << "-------------------" << endl;
00039   cout << cd;
00040   ProjectionParametersIO::WriteCameraData("CamDataTest.xml",cd);
00041   cout <<"CamDataTest.xml created" << endl;
00042
00043   ProjectionParametersIO::ReadCameraData("CamDataTest.xml",cd2);
00044   cout << "File contents: " << "CamDataTest.xml"
00045        << "-------------------" << endl;
00046   cout << cd2;
00047   ProjectionParametersIO::WriteCameraData("CamDataTestRewrite.xml", cd2);
00048   cout <<"CamDataTestRewrite.xml created" << endl;
00049
00050   cout << "File contents: ";
00051   if (argc>2)
00052     cout<<argv[2];
00053   cout<< "-------------------" << endl;
00054   cout << vcd;
00055   ProjectionParametersIO::WriteRigData("RigDataTest.xml",vcd);
00056   cout <<"RigDataTest.xml created" << endl;
00057
00058   ProjectionParametersIO::ReadRigData("RigDataTest.xml",vcd2);
00059   cout << "File contents: " << "RigDataTest.xml"
00060        << "-------------------" << endl;
00061   cout << vcd2;
00062   ProjectionParametersIO::WriteRigData("RigDataTestRewrite.xml", vcd2);
00063   cout <<"RigDataTestRewrite.xml created" << endl;
00064 #endif
00065   return 0;
00066 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExamplePyramidImage.cpp Source File

Image » Examples

ExamplePyramidImage.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/PyramidImage.hh>
00027   //#include <Image/NewPyramidImage2.hh>
00028 #include <Base/Debug/Debug.hh>
00029 #include <Base/Image/ImageIO.hh>
00030 #include <Base/Debug/TimeMeasure.hh>
00031
00032 #include <sstream>
00033 #include <iomanip>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 #define DEFAULT_PARA_FILE_NAME "PyramidImage.ini"
00039
00040 #define type 1
00041 #if type == 1
00042 #define StorageType unsigned char
00043 #define KernelType int
00044 #else
00045 #define StorageType float
00046 #define KernelType float
00047 #endif
00048
00049 int WritePyImage(const PyramidImage<StorageType>& pim,
00050                  const std::string& name="pyim")
00051 {
00052   ostringstream os;
00053   vector<double> fac=pim.GetFactors();
00054   for (unsigned int i=0; i<pim.size(); i++){
00055     os.str("");
00056     os << name<<"-"<<setw(2)<<setfill('0')<<i<<"-"<<fac[i]<<".mip";
00057     if (ImageIO::Write(os.str(), *pim[i])!=0){
00058       BIASERR("error writing file "<<os.str());
00059       return -3;
00060     }
00061   }
00062
00063   Image<StorageType> im;
00064   pim.GetSingleImage(im);
00065   os.str("");
00066   os << name<<"-all.mip";
00067   ImageIO::Write(os.str(), im);
00068
00069   return 0;
00070 }
00071
00072
00073
00074 int main(int argc, char *argv[])
00075 {
00076   TimeMeasure timer;
00077   Param para;
00078   Image<unsigned char> ucim;
00079   Image<StorageType> im;
00080   PyramidImage<StorageType> pyr(para), pyr2(para);
00081   unsigned int count=10;
00082   ostringstream os;
00083
00084   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00085
00086   if (argc-argind<1 || argind<1){
00087     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00088     para.Usage(cerr);
00089     return -2;
00090   }
00091
00092   for (int i=argind; i<argc; i++){
00093 #if type == 1
00094     if (ImageIO::Load(argv[i], im)!=0){
00095 #else
00096     if (ImageIO::Load(argv[i], ucim)!=0){
00097 #endif
00098       BIASERR("error loading image "<<argv[i]);
00099       return -1;
00100     } else {
00101       cerr << "read "<<argv[i]<<endl;
00102     }
00103
00104 #if type != 1
00105     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00106       BIASERR("error converting image "<<argv[i]);
00107     }
00108 #endif
00109
00110     timer.Start();
00111     for (unsigned int k=0; k<count; k++){
00112       if (!pyr.IsEmpty()) pyr.Release();
00113       pyr.Init(im);
00114     }
00115     timer.Stop();
00116     cout << "calculation of PyramidImage size "<<pyr.size()
00117          <<" of an "<<im.GetWidth()<<"x"<<im.GetHeight()<<" Image took "
00118          <<timer.GetUserTime()/count<<" ms"<<endl;
00119
00120     os.str("");
00121     os << "PyramidImage-"<<setw(3)<<setfill('0')<<i;
00122     if (WritePyImage(pyr, os.str())!=0){
00123       BIASERR("error writing "<<os.str());
00124     }
00125
00126     para.SetParamDouble("Factor-Rescale-PyramidImage", 2.0);
00127     para.SetParamEnum("LowPassType-Rescale-PyramidImage",LPT_Mean);
00128     pyr2.Init(im.GetWidth(), im.GetHeight(), im.GetChannelCount());
00129
00130     timer.Reset();
00131     timer.Start();
00132     for (unsigned int k=0; k<count; k++){
00133       memcpy((void *)pyr2[0]->GetImageData(),
00134              (void *)im.GetImageData(),
00135              sizeof(StorageType)*im.GetPixelCount());
00136       if (pyr2.Downsample()!=0){
00137         BIASERR("error in Downsample()");
00138       }
00139     }
00140     timer.Stop();
00141     cout << "calculation of PyramidImage size "<<pyr2.size()
00142          <<" of an "<<im.GetWidth()<<"x"<<im.GetHeight()<<" Image took "
00143          <<timer.GetUserTime()/count<<" ms"<<endl;
00144
00145     os.str("");
00146     os << "PyramidImage2-"<<setw(3)<<setfill('0')<<i;
00147     if (WritePyImage(pyr2, os.str())!=0){
00148       BIASERR("error writing "<<os.str());
00149     }
00150
00151   }
00152
00153   return 0;
00154 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExampleQuaternion.cpp Source File

Base » Geometry » Examples

ExampleQuaternion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "../Quaternion.hh"
00027
00028 using namespace std;
00029 using namespace BIAS;
00030
00031 int main()
00032 {
00033   Quaternion<double> q;
00034   q.SetValueAsAxisRad(-0.97856,0.049681,-0.14840,0.00102);
00035   RMatrixBase R;
00036   double PhiX, PhiY, PhiZ;
00037   q.GetRotationMatrix(R);
00038   R.GetRotationAnglesXYZ(PhiX, PhiY, PhiZ);
00039   cout << "Rotation  XYZ: " << PhiX << "," <<  PhiY << "," << PhiZ << endl;
00040   R.GetRotationAnglesZYX(PhiX, PhiY, PhiZ);
00041   cout << "Rotation  ZYX: " << PhiX << "," <<  PhiY << "," << PhiZ << endl;
00042
00043   //  Vector3<double> vec(0.5,0.5,0),res;
00044   //q.MultVec(vec,res);
00045   //cout<<"result is:"<<res<<endl;
00046
00047 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom2.cpp Source File

Base » Math » Examples

ExampleRandom2.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <cmath>
00027 #include <cstring>
00028 #include <Base/Math/Random.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 #define COUNT 1000
00034
00035 //int main(int argc, char * argv[])
00036 int main()
00037 {
00038   Random ran1, ran2;
00039   double num1, num2;
00040   double mean1 = 10.0, mean2 = -30.0;
00041   double sigma1 = 0.5, sigma2 = 10.0;
00042   double angle = 0.16;
00043   double dist[COUNT][2];
00044   double covm[2][2];
00045   double mean[2], var[2];
00046
00047   // zero mean and var
00048   for (int i=0; i<2; i++){
00049     mean[i] = var[i] = 0.0;
00050     for (int j=0; j<2; j++)
00051       covm[i][j]=0.0;
00052   }
00053
00054   // calculate a "rotated" 2dimensional distribution for PCA
00055   for (register unsigned int i=0; i<COUNT; i++){
00056     num1=ran1.GetNormalDistributed(mean1, sigma1);
00057     num2=ran2.GetNormalDistributed(mean2, sigma2);
00058     dist[i][0]=num1 * cos(angle) - num2 * sin(angle);
00059     dist[i][1]=num1 * sin(angle) + num2 * cos(angle);
00060     mean[0]+=dist[i][0];
00061     mean[1]+=dist[i][1];
00062     cout << dist[i][0] << "\t" << dist[i][1] << endl;
00063   }
00064
00065   mean[0]/=COUNT;
00066   mean[1]/=COUNT;
00067   cerr << "mean:" << endl;
00068   cerr << mean[0] << "\t" << mean[1] << endl;
00069
00070   // calculate covariance matrix
00071   for (register unsigned int i=0; i<COUNT; i++){
00072     covm[0][0]+=(dist[i][0]-mean[0])*(dist[i][0]-mean[0]);
00073     covm[1][1]+=(dist[i][1]-mean[1])*(dist[i][1]-mean[1]);
00074     covm[0][1]+=(dist[i][1]-mean[1])*(dist[i][0]-mean[0]);
00075   }
00076   covm[0][0]/=COUNT-1;
00077   covm[1][1]/=COUNT-1;
00078   covm[0][1]/=COUNT-1;
00079   covm[1][0]=covm[0][1];
00080
00081   // output of the covariance matrix
00082   cerr << "covariance matrix:" << endl;
00083   for (int i=0; i<2; i++){
00084     for (int j=0; j<2; j++){
00085       cerr << covm[i][j] << "\t";
00086     }
00087     cerr << endl;
00088   }
00089
00090   return 0;
00091 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom2D.cpp Source File

Base » Math » Examples

ExampleRandom2D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifdef WIN32
00027 #  include "Base/Common/W32Compat.hh"
00028 #  include <math.h>
00029 #endif
00030
00031 #include <cmath>
00032 #include <cstring>
00033 #include <Base/Math/Random.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 #define COUNT 9000
00039
00040 //int main(int argc, char * argv[])
00041 int main()
00042 {
00043   Random ran;
00044
00045   ran.Reset();
00046
00047   // generate random covarinace matrix
00048   Matrix2x2<double> cov;
00049   double cov_max=100.0;
00050   Vector2<double> mean;
00051   cov.SetZero();
00052
00053   double sigma1, sigma2;
00054   sigma1=ran.GetUniformDistributed(0.0, cov_max);
00055   sigma2=ran.GetUniformDistributed(0.0, cov_max);
00056   double ang=ran.GetUniformDistributed(0.0, M_PI*2.0);
00057   //ang=0;
00058   // covariance is transformed by R * cov * R.Transpose()
00059   cov[0][0] = cos(ang) * cos(ang) * sigma1 + sin(ang) * sin(ang) * sigma2;
00060   cov[1][1] = cos(ang) * cos(ang) * sigma2 + sin(ang) * sin(ang) * sigma1;
00061   cov[0][1] = (sigma1-sigma2)*cos(ang)*sin(ang);
00062   cov[1][0] = (sigma1-sigma2)*cos(ang)*sin(ang);
00063   //double a, b, c, d;
00064   //   a = cov[0][0];
00065   //   c = cov[1][1];
00066   //   b = cov[0][1];
00067   //   d = cov[1][0];
00068   //  cout << "a "<<a <<"\tb "<<b<<"\tc "<<c<<"\td "<<d<<endl;
00069   //   cout << sigma1*sigma1+sigma1*(-c-a)+(a*c-b*d) << endl;
00070   //   cout << sigma2*sigma2+sigma2*(-c-a)+(a*c-b*d) << endl;
00071   //   cout << (a-sigma1)*(c-sigma1)-b*d << endl;
00072   //   cout << (a-sigma2)*(c-sigma2)-b*d << endl;
00073
00074   mean[0] = ran.GetUniformDistributed(-cov_max, cov_max);
00075   mean[1] = ran.GetUniformDistributed(-cov_max, cov_max);
00076   //mean.SetZero();
00077   cout << "input mean: "<<mean<<endl;
00078   //cout << "sigma1: "<<sigma1<<"\tsigma2: "<<sigma2<<"\tangle: "<<ang<<endl;
00079   cout << "input covariance: "<<cov<<endl;
00080
00081   vector<Vector2<double> > points;
00082
00083   if (ran.GetNormalDistributed(mean, cov, COUNT, points)!=0){
00084     BIASERR("error");
00085     return -1;
00086   }
00087
00088   // now calculate
00089   double dx, dy;
00090   Matrix2x2<double> ocov;
00091   Vector2<double> omean;
00092
00093   // zero mean and var
00094   omean.SetZero();
00095   ocov.SetZero();
00096
00097
00098   // calculate mean
00099   for (register unsigned int i=0; i<COUNT; i++){
00100     //cout << points[i] << endl;
00101     omean[0]+=points[i][0];
00102     omean[1]+=points[i][1];
00103   }
00104
00105   omean[0]/=COUNT;
00106   omean[1]/=COUNT;
00107   cout << "output mean:" << omean << endl;
00108
00109   // calculate covariance matrix
00110   for (register unsigned int i=0; i<COUNT; i++){
00111     dx = points[i][0]-omean[0];
00112     dy = points[i][1]-omean[1];
00113     ocov[0][0] += dx*dx;
00114     ocov[1][1] += dy*dy;
00115     ocov[0][1] += dx*dy;
00116   }
00117   ocov[1][0]=ocov[0][1];
00118   ocov/=(double)(COUNT-1);
00119
00120   // output of the covariance matrix
00121   cout << "output covariance:" << ocov << endl;
00122
00123   return 0;
00124 }
00125
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Examples/ExampleRandom.cpp Source File

Base » Math » Examples

ExampleRandom.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // must be first:
00026 #include <Base/Common/LeakChecking.h>
00027
00028
00029 #include <cmath>
00030 #include <cstring>
00031 #include <Base/Math/Random.hh>
00032 #include <Base/Debug/TimeMeasure.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 #define HIST_BIN_COUNT 64
00038
00039 //int main(int argc, char * argv[])
00040 int main()
00041 {
00042   Random ran;
00043   double num;
00044   unsigned int hist[HIST_BIN_COUNT];
00045   //, histn[HIST_BIN_COUNT];
00046   //unsigned int histnum=0;
00047   double min=-100.0, max=100.0;
00048   //double mean=0.0, sigma=1.0;
00049   //long unsigned int outside=0;
00050   long unsigned int count=100000;
00051   long unsigned int sumuniform=0;
00052   //, sumnormal=0;
00053   //double sigma_int=2.576;
00054   //long int numint=0;
00055
00056   memset((void *)hist, 0, HIST_BIN_COUNT*sizeof(unsigned int));
00057
00058   TimeMeasure timer;
00059   double *uniform=new double[count];
00060   timer.Start();
00061   ran.GetUniformDistributed(min, max, count, uniform);
00062   timer.Stop();
00063   cerr << "getting "<<count<<" uniform distributed random vars took "
00064        << timer.GetRealTime() << " us"<< endl;
00065   for (register unsigned int i=0; i<count; i++){
00066     num = uniform[i];
00067     //    num = ran.GetUniformDistributed(min, max);
00068     //cerr << num << endl;
00069     hist[(unsigned int)floor((num-min)/(max-min)*HIST_BIN_COUNT)]++;
00070   }
00071   for (int i=0; i< HIST_BIN_COUNT; i++){
00072     cout << i << ":  \t" << hist[i] << endl;
00073     sumuniform+=hist[i];
00074   }
00075   cerr << "got "<<sumuniform<<" uniform distributed vars\n";
00076   sumuniform=0;
00077
00078   delete[] uniform;
00079
00080   return 0;
00081
00082
00083 //
00084 //  memset((void *)hist, 0, HIST_BIN_COUNT*sizeof(unsigned int));
00085 //  memset((void *)histn, 0, HIST_BIN_COUNT*sizeof(unsigned int));
00086 //
00087 //  for (register unsigned int i=0; i<count; i++){
00088 //    numint=ran.GetUniformDistributedInt(0, HIST_BIN_COUNT-1);
00089 //    hist[numint]++;
00090 //  }
00091 //  cout << "uniform distributed integer between 0 and HIST_BIN_COUNT" << endl;
00092 //  for (int i=0; i< HIST_BIN_COUNT; i++){
00093 //    cout << i << ":  \t" << hist[i] << endl;
00094 //    sumuniform+=hist[i];
00095 //  }
00096 //  cout << " got "<<sumuniform
00097 //       << " uniform distributed integer random values between 0 "
00098 //       << "and HIST_BIN_COUNT-1"<<endl;
00099 //  sumuniform=0;
00100 //
00101 //
00102 //  memset((void *)hist, 0, HIST_BIN_COUNT*sizeof(unsigned int));
00103 //
00104 //  for (register unsigned int i=0; i<count; i++){
00105 //    num = ran.GetUniformDistributed(min, max);
00106 //    hist[(unsigned int)floor((num-min)/(max-min)*HIST_BIN_COUNT)]++;
00107 //    num = ran.GetNormalDistributed(mean, sigma);
00108 //    // 95.4% of all values lie within mean+-2*sigma
00109 //    histnum =
00110 //      (unsigned int)floor((num - mean + sigma_int*sigma)/
00111 //                          (2*sigma_int*sigma)*HIST_BIN_COUNT);
00112 //    if ((histnum<0) || (histnum >=HIST_BIN_COUNT))
00113 //      outside++;
00114 //    else
00115 //      histn[histnum]++;
00116 //  }
00117 //  cout << "bin\tuniform  \tnormal" << endl;
00118 //  for (int i=0; i< HIST_BIN_COUNT; i++){
00119 //    cout << i << ":  \t" << hist[i] << "   \t" << histn[i] << endl;
00120 //    sumuniform+=hist[i];
00121 //    sumnormal+=histn[i];
00122 //  }
00123 //  cout << "outside of choosen " << sigma_int
00124 //       << " sigma interval : #" << outside
00125 //       << " = " << (double)outside/(double)count*100.0 << "%" << endl;
00126 ////   cout << "normal distributed: " << endl;
00127 ////   for (int i=0; i< HIST_BIN_COUNT; i++){
00128 ////     cout << i << ":  \t" << histn[i] << endl;
00129 ////   }
00130 //  cout << " got "<<sumuniform
00131 //       << " uniform distributed double random values between 0 "
00132 //       << "and HIST_BIN_COUNT-1"<<endl;
00133 //
00134 //  cout << " got "<<sumnormal<<" normal distributed random values"<<endl;
00135 //
00136 //  delete[] uniform;
00137 //  return 0;
00138 }
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSAC.cpp Source File

MathAlgo » Examples

ExampleRANSAC.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include "Base/Math/Random.hh"
00028 #include <vector>
00029 #include <iostream>
00030 #include <iomanip>
00031 #include <float.h>
00032 #include "ExampleRANSAC_double.hh"
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037
00038 /* input : inlier   percentage of inlier
00039            count    number of data generated
00040            mean     mean ofthe generated data
00041            sigma    standard deviation of the generated data
00042    output: data     the generated data */
00043 void GenerateData(unsigned int count, double mean, double sigma,
00044                   double inlier_fraction, vector<double>& data,
00045                   Random& ran)
00046 {
00047   if (data.size()!=count) data.resize(count);
00048
00049   double outlier_num;
00050
00051   for (unsigned int i=0; i<count; i++){
00052     outlier_num=ran.GetUniformDistributed(0.0, 1.0);
00053     if (outlier_num>inlier_fraction){ // generate a outlier
00054       data[i]=ran.GetNormalDistributed(mean, sigma)+
00055         ran.GetUniformDistributed(3*sigma, 30.0*sigma);
00056     } else { // generate an inlier
00057       data[i]=ran.GetNormalDistributed(mean, sigma);
00058     }
00059   }
00060 }
00061
00062
00063 //int main(int argc, char *argv[])
00064 int main()
00065 {
00066   Random ran;
00067   int res =0;
00068   vector<vector<double> > data_array;
00069   vector<double> data;
00070   double min=-100.0, max=100.0;
00071   double minsigma=0.0, maxsigma=5.0;
00072   vector<double> mean;
00073   vector<double> sigma;
00074   double inlier_fraction=0.7;
00075   vector<double> expected_inlier_fraction;
00076   unsigned int data_length=1000;
00077   unsigned int sample_size=2;
00078   bool refine_solution=true;
00079   double inlier_distance_threshold;
00080   double solution;
00081   vector<bool> inliers;
00082   bool debug=true;
00083   doubleRANSAC dr;
00084   double mean_error=0.0;
00085   double solution_error_threshold;
00086
00087
00088   if (debug){
00089     dr.SetDebugLevel(dr.GetDebugLevel() | D_RANSAC_SAMPLES);
00090     dr.SetDebugLevel(dr.GetDebugLevel() | D_RANSAC_SOLVE_MASTER);
00091     dr.SetDebugLevel(dr.GetDebugLevel() | D_DOUBLE_RANSAC_SOLUTION);
00092   }
00093
00094    unsigned int count=1000;
00095    if (debug) { count=1; data_length=100; }
00096
00097   // do this first because Random is used in doubleRANSAC and
00098   // therefor srand is called
00099   data_array.resize(count);
00100   mean.resize(count);
00101   sigma.resize(count);
00102   expected_inlier_fraction.resize(count);
00103   for (unsigned int i=0; i<count; i++){
00104     mean[i]=ran.GetUniformDistributed(min, max);
00105     sigma[i]=ran.GetUniformDistributed(minsigma, maxsigma);
00106
00107     expected_inlier_fraction[i]=inlier_fraction+
00108       ran.GetNormalDistributed(0.0, (1.0-inlier_fraction)/3.0);
00109     if (expected_inlier_fraction[i]>1.0) expected_inlier_fraction[i]=1.0;
00110     GenerateData(data_length, mean[i], sigma[i], inlier_fraction,
00111                  data_array[i], ran);
00112   }
00113
00114   for (unsigned int i=0; i<count; i++){
00115     inlier_distance_threshold=3.0*sigma[i];
00116     solution_error_threshold=1.5*sigma[i];
00117     //expected_inlier_fraction[i]=0.5;
00118
00119     if (debug) {
00120       for (unsigned int j=0; j<data_length; j++)
00121         cout << data_array[i][j] << "  ";
00122       cout << endl;
00123       cout <<setw(5)<<i<<":\tmean: "<<mean[i]<<"\tsigma: "<<sigma[i]<<endl;
00124       cout << "inlier_distance_threshold = "<<inlier_distance_threshold<<endl;
00125       cout << "solution_error_threshold = "<<solution_error_threshold<<endl;
00126       cout << "expected_inlier_fraction " << expected_inlier_fraction[i]<<endl;
00127     }
00128
00129     dr.Init(data_array[i], data_length, inlier_distance_threshold,
00130             refine_solution, sample_size, expected_inlier_fraction[i],
00131             solution_error_threshold);
00132
00133     if (dr.SolveMaster(expected_inlier_fraction[i], solution, inliers)!=0){
00134       BIASERR("error runnign SolveMaster");
00135       cerr << "true solution          \t" << mean[i] <<"  \t"
00136            << "sigma: "<<sigma[i]<<"    \t"
00137            << "expected_inlier_fraction: "<<expected_inlier_fraction[i]<<endl;
00138     } else {
00139       cerr << "true solution          \t" << mean[i] <<"  \t"
00140            << "sigma: "<<sigma[i]<<"    \t"
00141            << "expected_inlier_fraction: "<<expected_inlier_fraction[i]<<endl
00142            << "estimated solution     \t" << solution <<"  \t"
00143            << "error: "<<fabs(solution-mean[i])<<"    \t"
00144            << "expected_inlier_fraction: "<<expected_inlier_fraction[i]<<endl;
00145       if (solution!=solution) exit(-3);
00146       mean_error+=(sigma[i]!=0.0)?(fabs(solution-mean[i])/sigma[i]):
00147         (fabs(solution-mean[i])/DBL_MIN);
00148     }
00149   }
00150   mean_error/=(double)count;
00151
00152   cerr << "\n mean error: "<<mean_error<<" / sigma"<<endl;
00153   return res;
00154 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSAC_double.hh Source File

MathAlgo » Examples

ExampleRANSAC_double.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __ExampleRANSAC_double_hh__
00027 #define __ExampleRANSAC_double_hh__
00028
00029 #include "MathAlgo/RANSAC.hh"
00030
00031 #include <string>
00032
00033 #define D_DOUBLE_RANSAC_SOLUTION 0x0100
00034
00035 namespace BIAS {
00036
00037   class doubleRANSAC : public RANSAC<double>
00038   {
00039     /** this is a class evaluating the mean of the
00040         double data assuming some outlier
00041         using the RANSAC algorithm */
00042   public:
00043     inline doubleRANSAC();
00044
00045     inline ~doubleRANSAC();
00046
00047     inline void Init(std::vector<double>& data, unsigned int data_length,
00048                      double inlier_distance_threshold, bool refine_solution,
00049                      unsigned int sample_size, double expected_inlier_fraction,
00050                      double solution_error_threshold);
00051
00052     inline int GetSampleSolutions(std::vector<unsigned int> &which_samples,
00053                                   std::vector<double> &solutions);
00054
00055     inline bool EvaluateSolution(const double& solution,
00056                                  bool existing_solution_flag,
00057                                  std::vector<bool>& inlier,
00058                                  int& accept_count,
00059                                  double& evaluate_score,
00060                                  bool& ok_to_terminate_flag);
00061
00062     inline bool RefineSolution(std::vector<unsigned int>& which_samples,
00063                                double& solution,
00064                                std::vector<bool>& new_inliers);
00065
00066   protected:
00067     std::vector<double> _vData;
00068     // data  closer to solution than _dInlierDistanceThreshold will be
00069     // regarded as inlying
00070     double _dInlierDistanceThreshold;
00071     // if a sample yields more than _dExpectedInlierFraction inliers and
00072     // the evaluate_score is lower than _dSolutionErrorThreshold,
00073     // RANSACing will stop
00074     double _dExpectedInlierFraction;
00075     double _dSolutionErrorThreshold;
00076   };
00077
00078   doubleRANSAC::doubleRANSAC() : RANSAC<double>()
00079   {}
00080
00081   doubleRANSAC::~doubleRANSAC()
00082   {}
00083
00084   void doubleRANSAC::Init(std::vector<double>& data, unsigned int data_length,
00085                           double inlier_distance_threshold,
00086                           bool refine_solution, unsigned int sample_size,
00087                           double expected_inlier_fraction,
00088                           double solution_error_threshold)
00089   {
00090     RANSAC<double>::Init(sample_size, 1, refine_solution);
00091     _vData=data;
00092     _uiDataSize=data_length;
00093     _dInlierDistanceThreshold=inlier_distance_threshold;
00094     _dExpectedInlierFraction=expected_inlier_fraction;
00095     _dSolutionErrorThreshold=solution_error_threshold;
00096   }
00097
00098   int
00099   doubleRANSAC::GetSampleSolutions(std::vector<unsigned int> &which_samples,
00100                                    std::vector<double> &solutions)
00101   {
00102     double mean=0.0;
00103     for (unsigned int i=0; i<which_samples.size(); i++)
00104       mean+=_vData[which_samples[i]];
00105     mean/=which_samples.size();
00106     solutions.clear();
00107     solutions.push_back(mean);
00108     return solutions.size();
00109   }
00110
00111   bool doubleRANSAC::EvaluateSolution(const double& solution,
00112                                       bool existing_solution_flag,
00113                                       std::vector<bool>& inlier,
00114                                       int& accept_count,
00115                                       double& evaluate_score,
00116                                       bool& ok_to_terminate_flag)
00117   {
00118     bool good_flag=true;
00119     inlier.clear();
00120     inlier.resize(_uiDataSize);
00121
00122     int my_accept_count = 0;
00123     evaluate_score = 0.0;
00124
00125     for (unsigned int i=0; i<_uiDataSize; i++){
00126       inlier[i] = (fabs(solution-_vData[i])<_dInlierDistanceThreshold);
00127       if (inlier[i]) {
00128         my_accept_count++;
00129         evaluate_score += fabs(solution-_vData[i]);
00130         if (existing_solution_flag && my_accept_count>accept_count) break;
00131       }
00132     }
00133     if (my_accept_count!=0) {
00134       evaluate_score/=my_accept_count;
00135     } else {
00136       evaluate_score=DBL_MAX;
00137       good_flag=false;
00138     }
00139     accept_count=my_accept_count;
00140
00141     ok_to_terminate_flag=
00142       ((((double)accept_count/(double)_uiDataSize) > _dExpectedInlierFraction)
00143       && (evaluate_score < _dSolutionErrorThreshold));
00144     std::string bo=(ok_to_terminate_flag)?("true"):("false");
00145     BIASDOUT(D_DOUBLE_RANSAC_SOLUTION, "\nsolution "<<solution
00146              <<"\tscore/expected_score: "
00147              <<evaluate_score<<"/"<<_dSolutionErrorThreshold
00148              <<"\tinliers: "<<accept_count<<"/"<<_uiDataSize<<" = "
00149              <<((double)accept_count/(double)_uiDataSize)<<"/"
00150              <<_dExpectedInlierFraction<<"\t"<<bo);
00151
00152     return good_flag;
00153   }
00154
00155   bool doubleRANSAC::RefineSolution(std::vector<unsigned int>& which_samples,
00156                                     double& solution,
00157                                     std::vector<bool>& new_inliers)
00158   {
00159     solution=0.0;
00160     for(unsigned int i=0; i<which_samples.size(); i++)
00161       solution+=_vData[which_samples[i]];
00162     solution/=which_samples.size();
00163
00164     new_inliers.clear();
00165     new_inliers.resize(_uiDataSize);
00166     for(unsigned int i=0; i<_uiDataSize; i++)
00167       new_inliers[i]=(fabs(solution-_vData[i])<_dInlierDistanceThreshold);
00168     BIASDOUT(D_DOUBLE_RANSAC_SOLUTION, "refined solution "<<solution);
00169     return true;
00170   }
00171
00172 } // namespace
00173
00174
00175
00176
00177 #endif // __ExampleRANSAC_double_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSACPlane.cpp Source File

MathAlgo » Examples

ExampleRANSACPlane.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027   /** This is an example file on how to use the RANSAC algorithm.
00028       It tries to find a dominant plane in a number of 3d points.
00029
00030       RANSAC:
00031       In GetSampleSolutions, 3 of the points are picked and a plane is
00032       constructed from them.
00033
00034       In EvaluateSolution, it is checked, howe many points are "inliers" to
00035       that plane.
00036
00037       In RefineSiolution, least squares is done on all inliers to get a
00038       better plane.
00039
00040       You have to set the inlier threshold (max distance to plane to accept
00041       a point as being on the plane) and the fraction of valid 3d points,
00042       which defines the number of samples performed by RANSAC.
00043
00044       When you call SolveMaster then, you will get the best Plane according
00045       to your input.
00046   */
00047
00048 #include <Base/Common/BIASpragma.hh>
00049
00050 #include "Base/Math/Random.hh"
00051 #include <vector>
00052 #include <iostream>
00053 #include <fstream>
00054 #include <iomanip>
00055 #include <float.h>
00056 #include "ExampleRANSACPlane.hh"
00057   // #include "Utils/ThreeDOut.hh"
00058
00059 using namespace BIAS;
00060 using namespace std;
00061
00062 void readFile(char *filename, std::vector<HomgPoint3D> &points)
00063 {
00064   ifstream infile(filename);
00065   if (!infile) {
00066     BIASERR("couldnt open:"<<filename);
00067     return;
00068   }
00069   char c;
00070   HomgPoint3D point(0,0,0,1);
00071   while (!infile.eof()) {
00072     infile >> point[0] >> point[1]>>point[2]>>c;
00073     if (!infile.eof()) {
00074       points.push_back(point);
00075       cout <<" reading point "<<point<<endl;
00076     }
00077   }
00078 }
00079
00080 int main(int argc, char *argv[])
00081 {
00082   int res =0;
00083   double inlier_fraction=0.1;
00084   bool refine_solution=true;
00085   double  maxsquareddistance = 0.00001;
00086
00087   HomgPlane3D solution;
00088   vector<bool> inliers;
00089   bool debug=false;
00090   PlaneRANSAC dr;
00091
00092
00093   if (argc<2) {
00094     cout<<"enter filename to read points from..."<<endl;
00095     exit(-1);
00096   }
00097   vector<HomgPoint3D> points;
00098   readFile(argv[1], points);
00099
00100   if (debug){
00101     dr.SetDebugLevel(dr.GetDebugLevel() | D_RANSAC_SAMPLES);
00102     dr.SetDebugLevel(dr.GetDebugLevel() | D_RANSAC_SOLVE_MASTER);
00103     //   dr.SetDebugLevel(dr.GetDebugLevel() | D_DOUBLE_RANSAC_SOLUTION);
00104   }
00105
00106
00107
00108   dr.Init(points, points.size(), maxsquareddistance, refine_solution, 3,
00109           inlier_fraction, -1.0);
00110
00111   dr.SolveMaster(inlier_fraction, solution, inliers);
00112
00113
00114   /* // compute covmatrix to draw in vrml style
00115   Vector3<double> center(0,0,0);
00116   unsigned int numinliers = 0;
00117   for (unsigned int i=0; i<inliers.size(); i++) {
00118     if (inliers[i]) {
00119       center[0] += points[i][0];
00120       center[1] += points[i][1];
00121       center[2] += points[i][2];
00122       numinliers++;
00123     }
00124   }
00125   if (numinliers>0) center /= (double) numinliers;
00126   CovMatrix3x3 C;
00127   C.SetZero();
00128   for (unsigned int i=0; i<inliers.size(); i++) {
00129     if (inliers[i]) {
00130       Vector3<double> diff;
00131       for (unsigned int j=0; j<3; j++) diff[j] = points[i][j]-center[j];
00132       CovMatrix3x3 CCurrent(diff.OuterProduct(diff));
00133       for (unsigned int l=0;l<3;l++) {
00134         for (unsigned int k=0;k<3;k++) {
00135           C[l][k] += CCurrent[l][k];
00136         }
00137       }
00138     }
00139   }
00140   C /= (double)numinliers;
00141
00142
00143   BIAS::ThreeDOutParameters tparams;
00144   ThreeDOut T(tparams);
00145
00146   T.AddEllipsoid(C,center, RGBA(255,255,0,0), 1.0);
00147   T.VRMLOutEllipsoids(cout);
00148   */
00149   cout <<"solution is "<<solution<<endl;
00150   return res;
00151 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRANSACPlane.hh Source File

MathAlgo » Examples

ExampleRANSACPlane.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __ExampleRANSAC_Plane_hh__
00027 #define __ExampleRANSAC_Plane_hh__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031
00032 #include "MathAlgo/RANSAC.hh"
00033 #include "MathAlgo/SVD.hh"
00034 #include "Base/Geometry/HomgPoint3D.hh"
00035 #include "Base/Geometry/HomgPlane3D.hh"
00036
00037 #include <string>
00038
00039 namespace BIAS {
00040
00041   class PlaneRANSAC : public RANSAC<HomgPlane3D>
00042   {
00043     /** this is a class evaluating the mean of the
00044         double data assuming some outlier
00045         using the RANSAC algorithm */
00046   public:
00047     inline PlaneRANSAC();
00048
00049     inline ~PlaneRANSAC();
00050
00051     inline void Init(std::vector<HomgPoint3D>& data, unsigned int data_length,
00052                      double inlier_distance_threshold, bool refine_solution,
00053                      unsigned int sample_size, double expected_inlier_fraction,
00054                      double solution_error_threshold);
00055
00056     inline int GetSampleSolutions(std::vector<unsigned int> &which_samples,
00057                                   std::vector<HomgPlane3D> &solutions);
00058
00059     inline bool EvaluateSolution(const HomgPlane3D& solution,
00060                                  bool existing_solution_flag,
00061                                  std::vector<bool>& inlier,
00062                                  int& accept_count,
00063                                  double& evaluate_score,
00064                                  bool& ok_to_terminate_flag);
00065
00066     inline bool RefineSolution(std::vector<unsigned int>& which_samples,
00067                                HomgPlane3D& solution,
00068                                std::vector<bool>& new_inliers);
00069
00070   protected:
00071     std::vector<HomgPoint3D> _vData;
00072     // data  closer to solution than _dInlierDistanceThreshold will be
00073     // regarded as inlying
00074     double _dInlierDistanceThreshold;
00075     // if a sample yields more than _dExpectedInlierFraction inliers and
00076     // the evaluate_score is lower than _dSolutionErrorThreshold,
00077     // RANSACing will stop
00078     double _dExpectedInlierFraction;
00079     double _dSolutionErrorThreshold;
00080   };
00081
00082   PlaneRANSAC::PlaneRANSAC() : RANSAC<HomgPlane3D>()
00083   {}
00084
00085   PlaneRANSAC::~PlaneRANSAC()
00086   {}
00087
00088   void PlaneRANSAC::Init(std::vector<HomgPoint3D>& data,
00089                           unsigned int data_length,
00090                           double inlier_distance_threshold,
00091                           bool refine_solution, unsigned int sample_size,
00092                           double expected_inlier_fraction,
00093                           double solution_error_threshold)
00094   {
00095     RANSAC<HomgPlane3D>::Init(sample_size, 3, refine_solution);
00096     _vData=data;
00097     _uiDataSize=data_length;
00098     _dInlierDistanceThreshold=inlier_distance_threshold;
00099     _dExpectedInlierFraction=expected_inlier_fraction;
00100     _dSolutionErrorThreshold=solution_error_threshold;
00101   }
00102
00103   int
00104   PlaneRANSAC::GetSampleSolutions(std::vector<unsigned int> &which_samples,
00105                                    std::vector<HomgPlane3D> &solutions)
00106   {
00107     solutions.clear();
00108     solutions.push_back(HomgPlane3D(_vData[which_samples[0]],
00109                                     _vData[which_samples[1]],
00110                                     _vData[which_samples[2]]));
00111
00112     return solutions.size();
00113   }
00114
00115   bool PlaneRANSAC::EvaluateSolution(const HomgPlane3D& solution,
00116                                       bool existing_solution_flag,
00117                                       std::vector<bool>& inlier,
00118                                       int& accept_count,
00119                                       double& evaluate_score,
00120                                       bool& ok_to_terminate_flag)
00121   {
00122     bool good_flag=true;
00123     inlier.clear();
00124     inlier.resize(_uiDataSize);
00125
00126     int my_accept_count = 0;
00127     evaluate_score = 0.0;
00128
00129     for (unsigned int i=0; i<_uiDataSize; i++){
00130       inlier[i] = (solution.DistanceSquared(_vData[i]) <
00131                    _dInlierDistanceThreshold);
00132       if (inlier[i]) {
00133         my_accept_count++;
00134         evaluate_score += solution.DistanceSquared(_vData[i]);
00135         if (existing_solution_flag && my_accept_count>accept_count) break;
00136       }
00137     }
00138     if (my_accept_count!=0) {
00139       evaluate_score/=my_accept_count;
00140     } else {
00141       evaluate_score=DBL_MAX;
00142       good_flag=false;
00143     }
00144     accept_count=my_accept_count;
00145
00146     ok_to_terminate_flag=
00147       ((((double)accept_count/(double)_uiDataSize) > _dExpectedInlierFraction)
00148       && (evaluate_score < _dSolutionErrorThreshold));
00149     std::string bo=(ok_to_terminate_flag)?("true"):("false");
00150
00151
00152     return good_flag;
00153   }
00154
00155   bool PlaneRANSAC::RefineSolution(std::vector<unsigned int>& which_samples,
00156                                     HomgPlane3D& solution,
00157                                     std::vector<bool>& new_inliers
00158                                     )
00159   {
00160     BIAS::Matrix<double>  A;
00161
00162     // fill the 3d  points rowwise into A using the scheme
00163     const unsigned int nr_of_points = which_samples.size();
00164     std::cout<<"RefineSolution has "<<nr_of_points<<" inliers"<<std::endl;
00165     A.newsize( nr_of_points, 4 );
00166
00167     for (unsigned int i=0; i<nr_of_points; i++) {
00168         //        -1            X_i             Y_i             Z_i
00169       A[i][0] = _vData[which_samples[i]][0];
00170       A[i][1] = _vData[which_samples[i]][1];
00171       A[i][2] = _vData[which_samples[i]][2];
00172       A[i][3] = _vData[which_samples[i]][3];
00173     }
00174     A = A.Transpose()*A;
00175     // get a solution (linear fit) of this equation system by its SVD
00176     SVD svd(A , 1e-5, false);
00177
00178   // cout<<"U = " << svd.GetU() <<endl;
00179   // cout<<"S = " << svd.GetS() <<endl;
00180   // cout<<"V = " << svd.GetV() <<endl;
00181   // cout<<"Nullspace dim = " << svd.NullspaceDim() <<endl;;
00182
00183     Vector4<double> regplane;
00184     if (svd.Rank()<3) return false;
00185     regplane = svd.GetNullvector(); // get the last Nullvector
00186     solution = HomgPlane3D(regplane);
00187     // cout <<"solution: " << solution << endl;
00188
00189     //  Vector3<double> n_vec;
00190     //double d;
00191   // decompose the solution into HNF of a plane
00192   //d = solution[0];
00193   //n_vec[0] = solution[1];
00194   //n_vec[1] = solution[2];
00195   //n_vec[2] = solution[3];
00196   // now (d, n_vec ) is a plane in normalform
00197
00198   // convert to HNF representation:
00199   //d = d / n_vec.norm_L2(); // divide by actual length for HNF
00200   //n_vec.normalize_length();// normalize n_vec to length 1 (for HNF)
00201
00202   // cout << " plane in HNF:  d = "<<d<<endl;
00203   // cout << " n_vce'0 : " << n_vec << endl;
00204
00205     return true;
00206   }
00207
00208 } // namespace
00209
00210 #include <Base/Common/BIASpragmaEnd.hh>
00211
00212
00213 #endif // __ExampleRANSAC_double_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleRegressionPlane.cpp Source File

MathAlgo » Examples

ExampleRegressionPlane.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include <iomanip>
00028
00029 // use BIAS Base Math library and Algos:
00030 #include <Base/Math/Math.hh>
00031
00032 #include <MathAlgo/SVD.hh>
00033
00034
00035 using namespace std;
00036 using namespace BIAS;
00037
00038
00039
00040 void set_example_designmatrix( BIAS::Matrix<double> & A) {
00041   // fill the 3d  points rowwise into A using the scheme
00042   const int nr_of_points = 7;
00043
00044   A.newsize( nr_of_points, 4 );
00045
00046   //        -1            X_i             Y_i             Z_i
00047   A[0][0] = -1; A[0][1] = 0;    A[0][2] = 0;    A[0][3] = 1; // 1. example points
00048   A[1][0] = -1; A[1][1] = 1;    A[1][2] = 0;    A[1][3] = 1; // 2.
00049   A[2][0] = -1; A[2][1] = 0;    A[2][2] = 1;    A[2][3] = 1; // 3.
00050   A[3][0] = -1; A[3][1] = 1;    A[3][2] = 1;    A[3][3] = 1; // 4.
00051   A[4][0] = -1; A[4][1] = 0.5;  A[4][2] = 0.5;  A[4][3] = 1; // 5.
00052
00053   A[5][0] = -1; A[5][1] = 0.51;  A[5][2] = 0.59;  A[5][3] = 0.9; // 6.
00054   A[6][0] = -1; A[6][1] = 3.49;  A[6][2] = 0.55;  A[6][3] = 1.1; // 7.
00055 }
00056
00057
00058 void calc_Regressionsebene( const BIAS::Matrix<double> & A ) {
00059   cout << "calc_Regressionsebene " << endl;
00060   cout << "Designmatrix (Matrix<double>) A: " << A << endl;
00061
00062   // get a solution (linear fit) of this equation system by its SVD
00063   SVD svd( A );
00064
00065   // cout<<"U = " << svd.GetU() <<endl;
00066   // cout<<"S = " << svd.GetS() <<endl;
00067   // cout<<"V = " << svd.GetV() <<endl;
00068   // cout<<"Nullspace dim = " << svd.NullspaceDim() <<endl;;
00069
00070   BIAS::Vector<double> solution(4);
00071   solution = svd.GetNullvector(); // get the last Nullvector which is the solution
00072   cout <<"solution: " << solution << endl;
00073
00074   Vector3<double> n_vec;
00075   double d;
00076   // decompose the solution into HNF of a plane
00077   d = solution[0];
00078   n_vec[0] = solution[1];
00079   n_vec[1] = solution[2];
00080   n_vec[2] = solution[3];
00081   // now (d, n_vec ) is a plane in normalform
00082
00083   // convert to HNF representation:
00084   d = d / n_vec.NormL2(); // divide by actual length for HNF
00085   n_vec.Normalize();// normalize n_vec to length 1 (for HNF)
00086
00087   cout << " plane in HNF:  d = "<<d<<endl;
00088   cout << " n_vce'0 : " << n_vec << endl;
00089 }  // ------------------------------------------------------------
00090
00091
00092
00093 // ---------------------------------------------------------------------------
00094 // ---------------------------------------------------------------------------
00095 int main() {
00096     BIAS::Matrix<double> M;
00097     set_example_designmatrix( M ); // set example points into this nPoints x 4 designmatrix
00098     calc_Regressionsebene( M ); // calculate the best fit for the regression plane
00099     return 0;
00100 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleRescale.cpp Source File

Filter » Examples

ExampleRescale.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Filter/Rescale.hh>
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Base/Image/ImageConvert.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 #define DEFAULT_PARA_FILE_NAME "Rescale.ini"
00033
00034 #define type 1
00035 #if type == 1
00036 #define StorageType unsigned char
00037 #define OutputImageType unsigned char
00038 #else
00039 #define StorageType float
00040 #define OutputImageType float
00041 #endif
00042
00043 int main(int argc, char *argv[])
00044 {
00045   Param para;
00046   TimeMeasure Timer1;
00047   int grp=para.GetFreeGroupID();
00048   Rescale<StorageType, OutputImageType> rescale(para, grp, "");
00049   para.SetGroupName(grp, "Rescale");
00050
00051   Image<unsigned char> ucim;
00052   Image<StorageType> im, dst;
00053
00054   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00055
00056   if (argc-argind<1 || argind<1){
00057     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00058     para.Usage(cerr);
00059   para.DisableDestructorWarning();
00060     return -2;
00061   }
00062
00063
00064   // set debuglevel
00065   rescale.AddDebugLevel(D_RESCALE_INIT);
00066   //rescale.AddDebugLevel(D_RESCALE_WRITE_IMG);
00067
00068   for (int i=argind; i<argc; i++){
00069 #if type == 1
00070     if (ImageIO::Load(argv[i], im)!=0){
00071 #else
00072     if (ImageIO::Load(argv[i], ucim)!=0){
00073 #endif
00074       BIASERR("error loading image "<<argv[i]);
00075   para.DisableDestructorWarning();
00076       return -1;
00077     } else {
00078       cerr << "read "<<argv[i]<<endl;
00079     }
00080
00081 #if type != 1
00082     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00083       BIASERR("error converting image "<<argv[i]);
00084     }
00085 #endif
00086     Timer1.Start();
00087     rescale.Filter(im, dst);
00088     Timer1.Stop();
00089
00090     ostringstream name;
00091     name << "rescale-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
00092     ImageIO::ExportImage(name.str(), dst, ImageIO::FF_ppm);
00093
00094   }
00095
00096     Timer1.Print();
00097   para.DisableDestructorWarning();
00098   return 0;
00099 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleRigParameter.cpp Source File

Image » Examples

ExampleRigParameter.cpp

Go to the documentation of this file.
00001 #include "Image/RigParameter.hh"
00002
00003 using namespace BIAS;
00004 using namespace std;
00005
00006
00007
00008
00009 int main (int argc, char* argv[])
00010 {
00011
00012   RigParameter Rparam;
00013
00014   if (argc>1) {
00015     Rparam.ReadRigData(argv[1]);
00016     Rparam.WriteRigData("TestRig2.xml");
00017       return 0;
00018   } else {
00019       BIASERR("no arg given");
00020       return -1;
00021   }
00022
00023
00024   //if (argc > 1){
00025   //  Rparam.ReadFromCMP(argv[1]);
00026   //  Rparam.SetLadybugCenters();
00027
00028   //  for (unsigned int i = 0; i< Rparam.Calibration.size() ; i++)
00029   //    cout << "For camera " << i
00030   //         << " rotation is" << Rparam.Rotation[i]
00031   //         << " calibration is " << Rparam.Calibration[i]
00032   //         << " center is " << Rparam.Center[i] << endl;
00033   //} else {
00034   //  cout << "usage: " << argv[0] << " <cmp-file> " << endl;
00035   //}
00036   //
00037   //return 0;
00038 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Examples/ExampleRMatrix.cpp Source File

Base » Geometry » Examples

ExampleRMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Geometry/RMatrixBase.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 int main(int argc, char *argv[]){
00032   if (argc!=4){
00033     cerr << argv[0] << ": PhiX PhiY PhiZ"<<endl;
00034     cerr << "  specify the three rotation angles"<<endl;
00035     return -1;
00036   }
00037   double X = atof(argv[1]), Y = atof(argv[2]), Z = atof(argv[3]);
00038
00039   RMatrixBase Rxyz;
00040   Rxyz.SetXYZ(X, Y, Z);
00041   cout << "R.SetXYZ("<<X<<", "<<Y<<", "<<Z<<") = "<<Rxyz<<endl;
00042   RMatrixBase Rzyx;
00043   Rzyx.SetZYX(X, Y, Z);
00044   cout << "R.SetZYX("<<X<<", "<<Y<<", "<<Z<<") = "<<Rzyx<<endl;
00045
00046   double x, y, z;
00047
00048   if (Rxyz.GetRotationAnglesXYZ(x, y, z)==0){
00049     cout <<"Rxyz was composed from the following angles: "<<x<<" "<<y<<" "
00050          <<z<<endl;
00051   } else {
00052     cout <<"unable to determine angles" <<endl;
00053   }
00054
00055   if (Rzyx.GetRotationAnglesZYX(x, y, z)==0){
00056     cout <<"Rzyx was composed from the following angles: "<<x<<" "<<y<<" "
00057          <<z<<endl;
00058   } else {
00059     cout <<"unable to determine angles" <<endl;
00060   }
00061
00062   //return 0;
00063
00064   Vector3<double> xyz_axis, zyx_axis;
00065   double xyz_angle, zyx_angle;
00066
00067   Rxyz.GetRotationAxisAngle(xyz_axis, xyz_angle);
00068   cerr << "axis: "<< xyz_axis <<"\tangle: "<< xyz_angle<<endl;
00069
00070   Rzyx.GetRotationAxisAngle(zyx_axis, zyx_angle);
00071   cerr << "axis: "<< zyx_axis << "\tangle: "<< zyx_angle<<endl;
00072
00073   RMatrixBase Rxyz2; Rxyz2.Set(xyz_axis, xyz_angle);
00074   RMatrixBase Rzyx2; Rzyx2.Set(zyx_axis, zyx_angle);
00075
00076   cerr << "Rxyz: "<< Rxyz << "Rxyz2 (from axis and angle): " << Rxyz2 << endl;
00077   cerr << "Rxyz * Rxyz2': "<< Rxyz * Rxyz2.Transpose() << endl;
00078
00079   cerr << "Rzyx: "<< Rzyx << "Rzyx2 (from axis and angle): " << Rzyx2 << endl;
00080   cerr << "Rzyx * Rzyx2': "<< Rzyx * Rzyx2.Transpose() << endl;
00081
00082   return 0;
00083 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleROI.cpp Source File

Base » Image » Examples

ExampleROI.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageConvert.hh>
00030 #include <Base/Image/ImageIO.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 int main(int argc, char *argv[])
00036 {
00037   Image<unsigned char> im;
00038
00039
00040   if (argc<=1 || ImageIO::Load(argv[1], im)!=0){
00041     cerr << argv[0] << " <image>\n";
00042     im.Init(640, 480, 1);
00043     im.FillImageWithXValue();
00044   }
00045
00046   int w=im.GetWidth();
00047   int h=im.GetHeight();
00048   im.SetROICorners(w>>2, h>>2, w-(w>>2), h-(h>>2));
00049
00050   cout << "zero image outside of ("<<(w>>2)<<", "<<(h>>2)<<") <--> ("
00051        <<(w-(w>>2))<<", "<<(h-(h>>2))<<")\n";
00052
00053   im.SetOutsideROIZero();
00054
00055   ImageIO::Write("zeroed.mip", im);
00056
00057   if (w>3 && h>3){
00058     for (int x=w-3; x<w; x++)
00059       for (int y=h-3; y<h; y++)
00060           // TODO
00061       im.GetROI()->GetMaskDataArray()[y][x]=UCHAR_MAX;
00062
00063     im.GetROI()->SetMaskValidFlag(true);
00064   } else {
00065     cerr << "image too small\n";
00066   }
00067
00068   im.GetROI()->Mask2Vector();
00069
00070   // JW: do not display, too much output...
00071   //cout << "im: "<<*im.GetROI() << endl;
00072
00073   ImageIO::Write("roi.mip", im);
00074
00075   Image<unsigned char> im2;
00076   if (ImageIO::Read("roi.mip", im2)!=0){
00077     BIASERR("error loading image \"roi.mip\"");
00078     return -1;
00079   }
00080
00081   // JW: do not display, too much output...
00082   //cout << "im2: "<<*im2.GetROI()<<endl;
00083
00084   vector<Position> vec;
00085   vec.resize(3);
00086
00087   vec[0]=Position(w>>1, h>>1);
00088   vec[1]=Position(0, 0);
00089   vec[2]=Position(w>>1, 0);
00090
00091   im2.GetROI()->SetVector(vec);
00092
00093   im2.GetROI()->Vector2Mask();
00094
00095   cout << *im2.GetROI()<<endl;
00096
00097   if (ImageIO::Read("zeroed.mip", im2)!=0){
00098     BIASERR("error reading image \"zeroed.mip\"");
00099     return -1;
00100   }
00101
00102   return 0;
00103 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleShowFreeD.cpp Source File

Utils » Examples

ExampleShowFreeD.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Utils/ThreeDOut.hh"
00027 using namespace std;
00028 using namespace BIAS;
00029
00030 int main(int argc, char* argv[])
00031 {
00032   if (argc<2) {
00033     BIASERR("too few arguments.");
00034     return -1;
00035   }
00036   ifstream ifs(argv[1]);
00037   ThreeDOutParameters p;
00038   p.CameraStyle = PyramidSolid;
00039   ThreeDOut T(p);
00040   int i=0, j = 0;
00041   while (ifs.good()) {
00042     PMatrix P;
00043     if (P.BBCIn(ifs)!=0) break;
00044     cout<<".";
00045     if (i++ == 10) {
00046       RGBAuc color(255,255,255,0);
00047       if (j++==1) {
00048         color[1]=0;
00049         color[2]=0;
00050       }
00051       T.AddPMatrix(P,640,480, color,0.05);
00052       i=0;
00053     }
00054   }
00055   ifs.close();
00056   cout<<endl;
00057   T.VRMLOut("test.wrl");
00058   return 0;
00059 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleSphereProjections.cpp Source File

Image » Examples

ExampleSphereProjections.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Image/CameraParam.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Image/CameraParam.hh>
00029 #include <Image/SphericalUndistortion.hh>
00030 #include <Image/UndistortionMapping.hh>
00031 #include <sstream>
00032 #include <iomanip>
00033
00034 #ifdef   WIN32
00035 #include <Base/Common/getopt_W32.h>
00036 #else  //not WIN32
00037 #include <getopt.h>
00038 #endif //WIN32
00039
00040 using namespace BIAS;
00041 using namespace std;
00042
00043 void usage()
00044 {
00045   cerr << " [-s XX] [-f XX] [-p XX] [-p XX] [-z XX] [-c XX] [-x XX] [-y XX] <image>\n";
00046   cerr << "-s XX Filename of the XML-camera calibration file "
00047        << "(default is PtGrey-Omnitech)\n";
00048   cerr << "-f XX Field Of View in X-Direction in degree, default=100\n";
00049   cerr << "-z XX Zoom Factor for image size, default=1\n";
00050   cerr << "-x XX Set view center X, default=PrincipalX\n";
00051   cerr << "-y XX Set view center Y, default=PrincipalY\n";
00052   cerr << "-c XX draw circles XX is  const angle in deg, default=off\n";
00053   cerr << "-p XX Projection Type, default=0\n";
00054   cerr << "      Projection Types:\n";
00055   cerr << "        0: All Projections\n";
00056   cerr << "        1: Perspective projection      - p=k*tan(alpha)\n";
00057   cerr << "        2: Stereographic projection    - p=k*tan(alpha/2)\n";
00058   cerr << "        3: Equidistant projection      - p=k*alpha\n";
00059   cerr << "        4: sine-law projection         - p=k*sin(alpha)\n";
00060   cerr << "        5: equi-solid-angle projection - p=k*sin(alpha/2)\n";
00061   cerr << "        6: cylindrical projection\n";
00062 }
00063
00064 int main (int argc, char *argv[])
00065 {
00066   Image<unsigned char> source, sink;
00067
00068   int projectionType = 0;
00069   float zoomFactor = 1;
00070   int circleAngle = 0;
00071   int viewCenterX = 0;
00072   int viewCenterY = 0;
00073   int FOVx = 100;
00074   string XMLFile="";
00075
00076   SphericalUndistortion undist;
00077   UndistortionMapping<unsigned char, unsigned char> undistMap;
00078
00079   ostringstream os;
00080
00081   //  char **images=NULL;
00082
00083   //  ifstream is;
00084   //char name[1024];
00085
00086   if (argc <1) {
00087     usage();
00088     return 1;
00089   }
00090
00091   //  images = argv;
00092   char c;
00093   while ((c = char(getopt(argc, argv, "s:f:z:c:p:x:y:"))) != EOF)
00094     {
00095       switch (c){
00096       case 's':
00097         if (optarg) {
00098           XMLFile = optarg;
00099         } else {
00100           usage();
00101           return 1;
00102         }
00103         break;
00104       case 'f':
00105         if (optarg) {
00106           FOVx = atoi(optarg);
00107         } else {
00108           usage();
00109           return 1;
00110         }
00111         break;
00112       case 'z':
00113         if (optarg) {
00114           zoomFactor = (float)atof(optarg);
00115         } else {
00116           usage();
00117           return 1;
00118         }
00119         break;
00120       case 'p':
00121         if (optarg) {
00122           projectionType = atoi(optarg);
00123         } else {
00124           usage();
00125           return 1;
00126         }
00127         break;
00128       case 'c':
00129         if (optarg) {
00130           circleAngle = atoi(optarg);
00131         } else {
00132           usage();
00133           return 1;
00134         }
00135         break;
00136       case 'x':
00137         if (optarg) {
00138           viewCenterX = atoi(optarg);
00139         } else {
00140           usage();
00141           return 1;
00142         }
00143         break;
00144       case 'y':
00145         if (optarg) {
00146           viewCenterY = atoi(optarg);
00147         } else {
00148           usage();
00149           return 1;
00150         }
00151         break;
00152       default:
00153         usage();
00154         return 1;
00155       }
00156     }
00157
00158   if (argc<=optind) {
00159     BIASERR("no image file given!!");
00160     return -1;
00161
00162   }
00163   if (ImageIO::Load(argv[optind], source)!=0){
00164     BIASERR("error loading image "<< argv[optind]);
00165     return -1;
00166   }
00167 #ifdef BIAS_HAVE_XML2
00168   if (XMLFile=="") {
00169     undist.SetData_OMNITECH_ORIFL_190_3();
00170   } else {
00171     undist.Init(XMLFile);
00172   }
00173 #else // BIAS_HAVE_XML2
00174     undist.SetData_OMNITECH_ORIFL_190_3();
00175 #endif // BIAS_HAVE_XML2
00176   if (undist.IsInitialized() && undist.IsSpherical()) {
00177     cout << XMLFile << " used for initialization." << endl;
00178     undistMap.SetCameraParam(undist);
00179   } else {
00180     cout << "Error: could not read camera data file or no sphere lens!"
00181          << endl;
00182     BIASABORT;
00183   }
00184
00185   bool testProjection=false;
00186   if (testProjection) {
00187     double centerX, centerY, radius;
00188     undist.GetSphereCenter(centerX, centerY, radius);
00189     cout <<"centerx="<<centerX<<";centery="<<centerY<<";radius="<<radius<<endl;
00190     double theta, phi;
00191     HomgPoint2D hp(298,388);
00192     undist.TransfCoordImage2Sphere (hp, theta, phi);
00193     cout << "CoordImage2Sphere" << endl;
00194     cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";theta="<<theta<<";phi="<<phi<<endl;
00195     undist.TransfCoordSphere2Image (theta, phi, hp[0], hp[1]);
00196     cout << "CoordSphere2Image" << endl;
00197     cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";theta="<<theta<<";phi="<<phi<<endl;
00198     HomgPoint2D hpp;
00199     KMatrix k;
00200     k.SetIdentity();
00201     undist.ProjectCoord(SphericalUndistortion::EQUIDISTANT, k, hp, hpp);
00202     cout << "ProjectCoord" << endl;
00203     cout <<"icX="<<hp[0]<<";icY="<<hp[1]<<";projX="<<hpp[0]<<";projY="<<hpp[1]<<endl;
00204
00205     return 0;
00206   }
00207
00208   if (circleAngle) {
00209     undist.DrawCircles(source, circleAngle);
00210     ImageIO::ExportImage("circled.ppm", source, ImageIO::FF_ppm);
00211     cout << " created: "<<"circled.ppm"<<endl;
00212   }
00213
00214   undist.CorrectVignette(source);
00215
00216   os.str("");
00217   KMatrix K;
00218   if (projectionType==6) {
00219     undist.ProjectImageCylindric(source, sink, viewCenterX,
00220                                  viewCenterY, zoomFactor);
00221     os << "projection"<< (projectionType-1) <<".ppm";
00222     if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
00223       BIASERR("error writing image "<<os.str());
00224       return -2;
00225     }
00226     cout << " created: "<<os.str()<<endl;
00227   } else {
00228     if (!projectionType) {
00229       int projType;
00230       for (projType=0; projType<5; projType++){
00231         undistMap.ProjectSphereImage(source, sink,
00232                                      source.GetWidth(), source.GetHeight(),
00233                                      FOVx, 0, viewCenterX, viewCenterY,
00234                                      projType, zoomFactor, K);
00235         os.str("");
00236         os << "projection" << projType << ".ppm";
00237         if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
00238           BIASERR("error writing image "<<os.str());
00239           return -2;
00240         }
00241         cout << " created: "<<os.str()<<endl;
00242       }
00243     } else {
00244       undistMap.ProjectSphereImage(source, sink,
00245                                    source.GetWidth(), source.GetHeight(),
00246                                    FOVx, 0, viewCenterX, viewCenterY,
00247                                    projectionType-1, zoomFactor, K);
00248       os.str("");
00249       os << "projection" << (projectionType-1) << "UM.ppm";
00250       if (ImageIO::ExportImage(os.str(), sink, ImageIO::FF_ppm)!=0){
00251         BIASERR("error writing image "<<os.str());
00252         return -2;
00253       }
00254         cout << " created: "<<os.str()<<endl;
00255     }
00256   }
00257
00258   return 0;
00259 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleStructureTensor.cpp Source File

Filter » Examples

ExampleStructureTensor.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Filter/StructureTensor.hh>
00026 #include <Base/Image/ImageIO.hh>
00027 #include <Base/Image/ImageConvert.hh>
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 #define DEFAULT_PARA_FILE_NAME "StructureTensor.ini"
00033
00034 #define type 0
00035
00036 #if type == 0
00037
00038 #ifdef BUILD_IMAGE_INT
00039 #define StorageType unsigned char
00040 #define OutputImageType int
00041 #else
00042 #define StorageType unsigned char
00043 #define OutputImageType float
00044 #endif
00045
00046 #elif type == 1
00047
00048 #define StorageType float
00049 #define OutputImageType float
00050
00051 #endif
00052
00053 int main(int argc, char *argv[])
00054 {
00055   Param para;
00056   int grp=para.GetFreeGroupID();
00057   StructureTensor<OutputImageType, OutputImageType> st(para, grp, "");
00058   para.SetGroupName(grp, "Structure Tensor");
00059
00060   Image<unsigned char> ucim;
00061   Image<OutputImageType> im, sgxx, sgxy, sgyy;
00062
00063   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00064
00065   if (argc-argind<1 || argind<1){
00066     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00067     para.Usage(cerr);
00068     para.DisableDestructorWarning();
00069     return -2;
00070   }
00071
00072   // set debuglevel
00073   //st.AddDebugLevel(D_ST_WRITE_DEBUG_IM);
00074
00075   for (int i=argind; i<argc; i++){
00076     if (ImageIO::Load(argv[i], ucim)!=0){
00077       BIASERR("error loading image "<<argv[i]);
00078       para.DisableDestructorWarning();
00079       return -1;
00080     } else {
00081       cerr << "read "<<argv[i]<<endl;
00082     }
00083
00084     if (ImageConvert::ConvertST(ucim, im, im.GetStorageType())!=0){
00085       BIASERR("error converting image "<<argv[i]);
00086     }
00087
00088     st.CalcStructureTensor(im, sgxx, sgxy, sgyy);
00089
00090     ostringstream name;
00091     name << "sgxx-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
00092     ImageIO::ExportImage(name.str(), sgxx, ImageIO::FF_ppm);
00093     name.str("");
00094     name << "sgxy-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
00095     ImageIO::ExportImage(name.str(), sgxy, ImageIO::FF_ppm);
00096     name.str("");
00097     name << "sgyy-"<<setw(4)<<setfill('0')<<i-argind<<".ppm";
00098     ImageIO::ExportImage(name.str(), sgyy, ImageIO::FF_ppm);
00099
00100   }
00101
00102   para.DisableDestructorWarning();
00103   return 0;
00104 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleSVD3x3.cpp Source File

MathAlgo » Examples

ExampleSVD3x3.cpp

Go to the documentation of this file.
00001 #include <MathAlgo/SVD.hh>
00002 #include <MathAlgo/SVD3x3.hh>
00003 #include <Base/Math/Random.hh>
00004 #include <Base/Math/Matrix3x3.hh>
00005 #include <Geometry/FMatrix.hh>
00006
00007
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 #define F_SVD_THRESH 0.1
00013
00014 void Print(ostream& os, SVD& svd, SVD3x3&svd3x3)
00015 {
00016   os << "U: SVD: "   <<svd.GetU()<<endl;
00017   os << "   SVD3x3: "<<svd3x3.GetU()<<endl;
00018   os << "   diff: "<<svd.GetU()-svd3x3.GetU()<<endl;
00019
00020   os << "S: SVD: "   <<svd.GetS()<<endl;
00021   os << "   SVD3x3: "<<svd3x3.GetS()<<endl;
00022   os << "   diff: "<<svd.GetS()-svd3x3.GetS()<<endl;
00023
00024   os << "V: SVD: "   <<svd.GetV()<<endl;
00025   os << "   SVD3x3: "<<svd3x3.GetV()<<endl;
00026   os << "   diff: "<<svd.GetV()-svd3x3.GetV()<<endl;
00027 }
00028
00029 //int main(int argc, char *arg[])
00030 int main()
00031 {
00032   FMatrix F;
00033   F[0][0] =0.00075284066373225704;
00034   F[0][1] =-0.099906426438442303;
00035   F[0][2] =0.16267766990357244;
00036   F[1][0] =0.10333163045064053;
00037   F[1][1] =0.0014727467665194025;
00038   F[1][2] =0.6803859609102173;
00039   F[2][0] =-0.16234020366691171;
00040   F[2][1] =-0.68087420277635458;
00041   F[2][2] =0.0021896762792443826;
00042
00043   SVD3x3 svdF3x3 ( F, F_SVD_THRESH );
00044
00045   cout << "F: " << F << endl;
00046   Matrix3x3<double> S;
00047   S.SetIdentity();
00048   for (int i=0; i<3; i++)
00049     S[i][i]=svdF3x3.GetS()[i];
00050
00051   cout << "U:" << svdF3x3.GetU() << "S: " << svdF3x3.GetS() << "V: "
00052        << svdF3x3.GetVT() << "\n U S Vt:"
00053        << svdF3x3.GetU() * S * svdF3x3.GetVT() << "\nF:" << F << endl;
00054   cout << "NullspaceDim(): " << svdF3x3.NullspaceDim() << endl;
00055
00056   SVD svdF ( F, F_SVD_THRESH );
00057
00058   cout << "F: " << F << endl;
00059   Matrix3x3<double> S1;
00060   S.SetIdentity();
00061   for (int i=0; i<3; i++)
00062     S1[i][i]=svdF.GetS()[i];
00063
00064   cout << "U:" << svdF.GetU() << "S: " << svdF.GetS() << "V: "
00065        << svdF.GetVT() << "\n U S Vt:"
00066        << svdF.GetU() * S1 * svdF.GetVT() << "\nF:" << F << endl;
00067   cout << "NullspaceDim(): " << svdF.NullspaceDim() << endl;
00068
00069   return 0;
00070 }
00071
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleSVD.cpp Source File

MathAlgo » Examples

ExampleSVD.cpp

Go to the documentation of this file.
00001 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
00002
00003 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00004   Multimediale Systeme der Informationsverarbeitung
00005   Institut fuer Informatik
00006   Christian-Albrechts-Universitaet Kiel
00007
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #include <MathAlgo/SVD.hh>
00025 #include <MathAlgo/SVD3x3.hh>
00026 #include <Base/Math/Random.hh>
00027 #include <Base/Math/Matrix3x3.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 void Print(ostream& os, SVD& svd, SVD3x3&svd3x3)
00035 {
00036   os << "U: SVD: "   <<svd.GetU()<<endl;
00037   os << "   SVD3x3: "<<svd3x3.GetU()<<endl;
00038   os << "   diff: "<<svd.GetU()-svd3x3.GetU()<<endl;
00039
00040   os << "S: SVD: "   <<svd.GetS()<<endl;
00041   os << "   SVD3x3: "<<svd3x3.GetS()<<endl;
00042   os << "   diff: "<<svd.GetS()-svd3x3.GetS()<<endl;
00043
00044   os << "V: SVD: "   <<svd.GetV()<<endl;
00045   os << "   SVD3x3: "<<svd3x3.GetV()<<endl;
00046   os << "   diff: "<<svd.GetV()-svd3x3.GetV()<<endl;
00047 }
00048
00049 /** @brief tests the integrity of the Sqrt() operation
00050     @author woelk 01/2006 */
00051 int MatrixSqrt()
00052 {
00053   const int size = 4;
00054   const int count = 100;
00055   Matrix<double> M(size, size), sqrtM, diff;
00056   Random rand;
00057   SVD svd;
00058   for (int i=0; i<count; i++){
00059     // generate random symmetric positive definit matrix M
00060     for (int c=0; c<size; c++){
00061       for (int r=0; r<size; r++){
00062         M[c][r] = M[r][c] = rand.GetUniformDistributed(-10.0, 10.0);
00063       }
00064     }
00065     M = M * M;
00066
00067     //cout << "M = "<<M<<endl;
00068     sqrtM = svd.Sqrt(M);
00069     //cout << "sqrtM = "<<sqrtM<<endl;
00070     //cout << "sqrtM*sqrtM = "<<sqrtM*sqrtM<<endl;
00071     diff = M - (sqrtM * sqrtM);
00072     if (!diff.IsZero(1e-8)){
00073       BIASERR("error in matrix square root");
00074       return -2;
00075     }
00076   }
00077   //cout <<"succefull\n";
00078   return 0;
00079 }
00080
00081 /* @brief example for SVD usage
00082    @author woelk 07/2004 */
00083 int main()
00084 {
00085   int sqrt_res = MatrixSqrt();
00086
00087   Random rand;
00088   Matrix3x3<double> M;
00089   SVD svd;
00090   SVD3x3 svd3x3;
00091   TimeMeasure tsvd, tsvd3;
00092
00093
00094
00095   int num=90000;
00096   for (int k=0; k<num; k++){
00097 //     if (k==0){
00098 //       M.SetZero();
00099 //       M[0][0]=16384;
00100 //       M[1][1]=M[2][2]=-16384;
00101 //     } else {
00102       for (int i=0; i<9; i++){
00103         M.GetData()[i]=rand.GetUniformDistributed(-10.0, 10.0);
00104       }
00105       //    }
00106
00107     tsvd3.Start();
00108     svd3x3.Compute(M);
00109     tsvd3.Stop();
00110     tsvd.Start();
00111     svd.Compute(M);
00112     tsvd.Stop();
00113
00114     if (k==0){
00115       Print(cerr, svd, svd3x3);
00116     } /*        this does not work, wince svd is not unique
00117
00118       else {
00119       if (svd.GetU()!=svd3x3.GetU()){
00120         BIASERR("differnt U in "<<k<<"th try");
00121         Print(cerr, svd, svd3x3);
00122         break;
00123       }
00124       if (svd.GetS()!=svd3x3.GetS()){
00125         BIASERR("differnt S in "<<k<<"th try");
00126         Print(cerr, svd, svd3x3);
00127         break;
00128       }
00129       if (svd.GetV()!=svd3x3.GetV()){
00130         BIASERR("differnt V in "<<k<<"th try");
00131         Print(cerr, svd, svd3x3);
00132         break;
00133       }
00134       } */
00135
00136     Matrix<double> id, res, D, inv;
00137     Vector<double> d;
00138     id.newsize(3,3);
00139     res.newsize(3,3);
00140     D.newsize(3,3);
00141     inv.newsize(3,3);
00142     d.newsize(3);
00143     id.SetIdentity();
00144     inv=svd.Invert();
00145     res=M*inv-id;
00146     if (!res.IsZero(1e-8)){
00147       BIASERR("svd different decomposition in "<<k<<"th try");
00148       cerr << "res :"<<res<<endl;
00149       cerr << "M :"<<M<<endl;
00150       Print(cerr, svd, svd3x3);
00151       cerr << "svd:   M : " << M << endl;
00152       d=svd.GetS();
00153       D.SetZero();
00154       for (int i=0; i<3; i++) D[i][i]=d[i];
00155       cerr << "     USV': "<<svd.GetU()*D*svd.GetVT()<<endl;
00156       break;
00157     }
00158     inv=svd3x3.Invert();
00159     res=M*inv-id;
00160     if (!res.IsZero(1e-8)){
00161       BIASERR("svd3x3 different decomposition in "<<k<<"th try");
00162       cerr << "res :"<<res<<endl;
00163       cerr << "M :"<<M<<endl;
00164       Print(cerr, svd, svd3x3);
00165       cerr << "svd3x3:   M : " << M << endl;
00166       d=svd3x3.GetS();
00167       D.SetZero();
00168       for (int i=0; i<3; i++) D[i][i]=d[i];
00169       cerr << "        USV': "<<svd3x3.GetU()*D*svd3x3.GetVT()<<endl;
00170        break;
00171    }
00172   }
00173
00174   cerr << "svd: ";
00175   tsvd.Print();
00176   cerr << "user: "<<(double)tsvd.GetUserTime()/(double)num << " ms / svd\n";
00177   cerr << "real: "<<(double)tsvd.GetRealTime()/(double)num << " us / svd\n\n";
00178   cerr << "svd3x3: ";
00179   tsvd3.Print();
00180   cerr << "user: "<<(double)tsvd3.GetUserTime()/(double)num << " ms / svd\n";
00181   cerr << "real: "<<(double)tsvd3.GetRealTime()/(double)num << " us / svd\n\n";
00182
00183   return (sqrt_res==0)?0:-1;
00184 }
00185
00186
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleTFT.cpp Source File

Utils » Examples

ExampleTFT.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002
00003 #include <Utils/GenSynthMatches.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <Base/Geometry/TrifocalTensorBase.hh>
00006
00007 #include <Base/Common/BIASpragma.hh>
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 #define DEFAULT_PARA_FILE_NAME "TFT.ini"
00013 #define DEBUG true
00014
00015 int main(int argc, char *argv[])
00016 {
00017   Param para;
00018   GenSynthMatches gsm(para);
00019   //  gsm.AddDebugLevel(GSM_CAM_MOTION);
00020   //  gsm.AddDebugLevel(GSM_VIEWINGVOL);
00021   //  gsm.AddDebugLevel(GSM_3D_POINTS);
00022   //  gsm.AddDebugLevel(GSM_2D_MATCHES);
00023   //  gsm.AddDebugLevel(GSM_MOVIN_TRANSF);
00024
00025
00026   bool FoundDefaultParaFile=true;
00027   ifstream is(DEFAULT_PARA_FILE_NAME);
00028   if (!is){
00029     is.close();
00030     if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<" failed"<<endl;
00031     FoundDefaultParaFile=false;
00032   } else {
00033     if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<endl;
00034     para.ReadParameter(DEFAULT_PARA_FILE_NAME);
00035   }
00036
00037   int argind = para.ParseCommandLine(argc, argv);
00038   if (argind<0){
00039     BIASERR("error parsing command line");
00040     return -1;
00041   }
00042
00043   if ((!FoundDefaultParaFile) && (*para.GetParamString("readconfig")=="")) {
00044     cerr << "no parameter file found, writing default to "
00045          <<DEFAULT_PARA_FILE_NAME<<"\n";
00046     para.SetWriteOptions(true,false,false);
00047     para.WriteParameter(DEFAULT_PARA_FILE_NAME);
00048   }
00049
00050   if (*para.GetParamInt("NumImages")<3){
00051     BIASERR("must be at least 3 images for trifocal tensor");
00052     BIASASSERT(false);
00053   }
00054
00055   gsm.CreateMatches();
00056
00057   gsm.WriteData("data.txt");
00058
00059   //cout << gsm <<endl;
00060
00061   Image<unsigned char> im;
00062   gsm.DrawTrue(im, 0, 2);
00063
00064   ImageIO::Write("true.mip", im);
00065
00066   gsm.DrawNoisy(im, 0, 2);
00067
00068   ImageIO::Write("noisy.mip", im);
00069
00070   int num=*para.GetParamInt("NumPoints");
00071   vector<HomgPoint2D> m1, m2, m3;
00072   vector<RMatrixBase> R(3);
00073   vector<HomgPoint3D> C(3);
00074   Matrix3x3<double> res;
00075   gsm.GetNormalizedPoints(0, m1);
00076   gsm.GetNormalizedPoints(1, m2);
00077   gsm.GetNormalizedPoints(2, m3);
00078   gsm.GetR(R);
00079   gsm.GetC(C);
00080   TrifocalTensorBase tft;
00081   tft.Compose(R[0], R[1], R[2], C[0], C[1], C[2]);
00082   /*
00083   vector<RMatrixBase> mR(2);
00084   vector<Vector3<double> > mC(2);
00085   for (int i=1; i<3; i++){
00086     mR[i-1]=R[0].Transpose() * R[i];
00087     C[i].Homogenize(); C[0].Homogenize();
00088     HomgPoint3D dC=C[i]-C[0];
00089     for (int k=0; k<3; k++) mC[i-1][k]=dC[k];
00090     mC[i-1]=R[0].Transpose() * mC[i-1];
00091   }
00092   tft.Compose(mR[0], mR[1], mC[0], mC[1]);
00093   */
00094   for (int  i=0; i<num; i++){
00095     tft.CheckPointCorr(m1[i], m2[i], m3[i], res);
00096     //cerr << setw(3)<<i<<" : " << res ;//<< endl;
00097     cerr << setw(3)<<i<<" : " << res.NormL1() <<"\t"<< res.NormL2()<<endl;
00098   }
00099
00100   return 0;
00101 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleThreeDOutVRML.cpp Source File

Utils » Examples

ExampleThreeDOutVRML.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Utils/ThreeDOut.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace std;
00031 using namespace BIAS;
00032
00033 int main()
00034 {
00035   ThreeDOutParameters param;
00036   param.CameraStyle = PyramidSolid;
00037   param.PointStyle = Box;
00038   param.PointSize = 0.1;
00039   param.LineStyle = Solid;
00040   param.DrawUncertaintyEllipsoids = true;
00041   ThreeDOut T(param);
00042   HomgPoint3D P1(1,1,1), P2(0,0,0);
00043   RGBAuc Color(0,0,255,0);
00044
00045   //T.AddLine(P1, P2, Color);
00046   P1[0] = 5;
00047   P1[1] = -1;
00048   //T.AddPoint(P1, Color);
00049   P2[0] = 3;
00050   P2[1] = 2;
00051   //  T.AddPoint(P2);
00052
00053
00054   PMatrix P;
00055   P.SetIdentity();
00056   Color[0]=255;
00057   Color[1]=0;
00058   Color[2]=128;
00059   //T.AddPMatrix(P, 640, 480, Color);
00060
00061   CovMatrix3x3 Cov;
00062   Cov.SetIdentity();
00063   Cov[0][0] = 0.5;
00064   Cov[1][1] = 0.8;
00065   P2[2] = 0.8;
00066   Color[1] = 255;
00067   //T.AddEllipsoid(Cov, P2, Color);
00068
00069
00070 #define IMSIZE 3
00071   Image<unsigned char> im(IMSIZE,IMSIZE,1);
00072   for (unsigned int i=0; i<IMSIZE*IMSIZE; i++)
00073     im.GetImageDataArray()[i/IMSIZE][i%IMSIZE]
00074                                      = (255 / (IMSIZE*IMSIZE)) * i;
00075   // 3 of the 4 corners
00076   Vector3<double> UL(0,0,0), UR(1,0,0), LL(0,1,0);
00077   T.AddImage(UL, UR, LL, IMSIZE, IMSIZE, im.GetImageData());
00078   T.VRMLOut("test.wrl");
00079   T.Dump();
00080   return 0;
00081 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleTile.cpp Source File

Base » Image » Examples

ExampleTile.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageIO.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 int main(int argc, char *argv[])
00035 {
00036   unsigned int tilecount=2;
00037   Image<unsigned char> src, dst;
00038   unsigned int x, y;
00039
00040   if (argc!=2){
00041     BIASERR(argv[0] << " image ");
00042     //return -1;
00043     return 0; // for Dart testing
00044   }
00045
00046   if (ImageIO::Load(argv[1], src)!=0){
00047     BIASERR("error loading image "<<argv[1]);
00048     //return -2;
00049     return 0; // for Dart testing
00050   }
00051
00052   dst.Init(src.GetWidth()*tilecount, src.GetHeight()*tilecount,
00053            src.GetChannelCount(), src.GetStorageType());
00054
00055   for (y=0; y<dst.GetHeight(); y+=src.GetHeight()){
00056     for (x=0; x<dst.GetWidth(); x+=src.GetWidth()){
00057       dst.SetROI(x, y, x+src.GetWidth(), y+src.GetHeight());
00058       if (dst.Paste2ROI(src)!=0){
00059         BIASERR("error pasting to ROI");
00060       }
00061     }
00062   }
00063
00064   if (ImageIO::Write("tile", dst)!=0){
00065     BIASERR("error writing image ");
00066     return -4;
00067   }
00068
00069   if (ImageIO::ExportImage("tile", dst, ImageIO::FF_ppm)!=0){
00070     BIASERR("error exporting image ");
00071     return -2;
00072   }
00073   return 0;
00074 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/ExampleTimeMeasureCycle.cpp Source File

Base » Debug » Examples

ExampleTimeMeasureCycle.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 //
00028 // rewritten by Jan Woetzel Nov/2003
00029 //
00030
00031 #include <limits.h>
00032 #include <iostream>
00033 #include <cmath>
00034
00035 #include <Base/Debug/TimeMeasure.hh>
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 int main(){
00041   std::cout<<"starting."<<std::endl;
00042
00043   const float loops=1E7;
00044
00045   TimeMeasure tc;
00046   tc.Start();
00047   float sum=0;
00048   for (int x=0; x<loops; x++){
00049     sum+=10.0f*(float)x;
00050   };
00051   tc.Stop();
00052   tc.Print();
00053 #ifdef __i386__
00054   tc.PrintCycleCount();
00055 #endif
00056
00057   tc.Reset();
00058
00059   tc.Start();
00060   for (int x=0; x<loops; x++){
00061     sum+=3.0f*(float)x;
00062   }
00063   tc.Stop();
00064   tc.Print();
00065 #ifdef __i386__
00066   tc.PrintCycleCount();
00067 #endif
00068
00069   return 0;
00070 }
00071
00072
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker2.cpp Source File

Matcher2D » Examples

ExampleTracker2.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 /** @example ExampleTracker2
00025     This little example demonstrates the
00026
00027
00028     @ingroup g_tracker
00029     @author woelk */
00030
00031 #include <bias_config.h>
00032 #include <Base/Common/BIASpragma.hh>
00033
00034
00035 #include <Matcher2D/Tracker.hh>
00036 #include <Base/Image/ImageDraw.hh>
00037 #include <Base/Image/ImageConvert.hh>
00038 #include <Base/Image/ImageIO.hh>
00039 #include <FeatureDetector/CornerDetectorKLT.hh>
00040 #include <FeatureDetector/CornerDetectorHarris.hh>
00041 #include <FeatureDetector/CornerDetectorFoerstner.hh>
00042 #include <Base/Debug/TimeMeasure.hh>
00043
00044 #include <deque>
00045
00046 using namespace BIAS;
00047 using namespace std;
00048
00049 #define DEFAULT_PARA_FILE_NAME "Tracker.ini"
00050
00051 /** The preprocessor define type is used to choose between the image type
00052     StorageType is the internal type used to store the images data.
00053     CalculationType is the data type used for calculations.
00054
00055     type 0: Images are of type unsigned char (i.e. byte)
00056             The internal calculation (e.g. gradinets) is done using int.
00057
00058     type 1: Images are of type float (the can be of any type on disk, they are
00059             immediatly casted to float after loading them from disk).
00060             The internal calculation (e.g. gradinets) is done using float.
00061 */
00062 #define type 1
00063 #if type == 0
00064 #define StorageType unsigned char
00065 #define CalculationType int
00066 #elif type == 1
00067 #define StorageType float
00068 #define CalculationType float
00069 #endif
00070
00071 #define DEBUG false
00072
00073 /* The following variables should usually be class member variables.
00074    They are choosen to be global vriables in order to keep the example simple.
00075 */
00076
00077 // the corner detector class
00078 CornerDetectorBase<StorageType> *cd = NULL;
00079 // the tracker class
00080 Tracker<StorageType, CalculationType> *tr = NULL;
00081
00082 // the pyramid images used by the tracker
00083 PyramidImage<CalculationType> *pim[2]; // low pass filtered images
00084 PyramidImage<CalculationType> *gx[2]; // horizontal gradient
00085 PyramidImage<CalculationType> *gy[2]; // vertical gradient
00086
00087 int act=0; // actual index into the pyramid image arrays
00088 int *cdt; // enum indicating which corner detector class to use
00089 int *cdfreq; // corner detector is run at every cdfreq-th frame
00090 int *pyind; //
00091
00092 ///  the resulting data structs
00093 deque<vector<HomgPoint2D> > p; //  the corners
00094 deque<vector<KLT_TYPE> > residui; // mean absolute grey difference
00095 /** int representing success (=0) or failure reason (<0) see
00096     TrackerBase::Track() for details */
00097 deque<vector<int> > results;
00098
00099 /// temporary vector for the
00100 vector<HomgPoint2D> mp;
00101 vector<QUAL> qual; /// the displacement in the last iteration step
00102 vector<HomgPoint2D> cp;
00103 vector<KLT_TYPE> r; //
00104 vector<int> res;
00105
00106 // how often has the tracker/corner detctro been run ?
00107 int tnum=0, cdnum=0;
00108
00109 // time measure classes
00110 TimeMeasure otimer; // overall timer
00111 TimeMeasure ttimer; // timer used for tracking
00112 TimeMeasure cdtimer; // timer for corner detection
00113 // timer used for calculating the pyramid images and filtering
00114 TimeMeasure pytimer;
00115
00116 // should the tracks be drawn as trailing lines ?
00117 bool draw_tracks=true;
00118
00119 const int max_num_points = 150;
00120
00121 /** draw the tracks with a circle around the actual corner position */
00122 void Draw(Image<StorageType>& stim, Image<unsigned char>& im,
00123           deque<vector<HomgPoint2D> >& p, int imnum)
00124 {
00125 #if type == 0
00126   ImageConvert::Convert(stim, im, ImageBase::CM_RGB);
00127 #elif type == 1
00128   Image<unsigned char> ucim;
00129   ImageConvert::ConvertST(stim, ucim, ImageBase::ST_unsignedchar);
00130   ImageConvert::Convert(ucim, im, ImageBase::CM_RGB);
00131 #endif
00132
00133   unsigned char col[]={255, 0, 0};
00134   const int nump=p[0].size();
00135   unsigned start[2], end[2];
00136   const unsigned radius=1;
00137   int maxhist=0;
00138
00139   if (imnum>0){
00140     for (int l=0; l<nump; l++){
00141       if (!p[imnum][l].IsAtInfinity() && !p[imnum-1][l].IsAtInfinity()){
00142         // circel around corner in actual image
00143         start[0]=(unsigned)rint(p[imnum][l][0]);
00144         start[1]=(unsigned)rint(p[imnum][l][1]);
00145         ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00146                                                      radius, col);
00147         if (draw_tracks){
00148           // lines for tracks
00149           for (int i=imnum; i>0; i--){
00150             if (p[i-1][l].IsAtInfinity()) {
00151               if ((imnum-i)>maxhist) maxhist=imnum-i;
00152               break;
00153             }
00154             start[0]=(unsigned)rint(p[i][l][0]);
00155             start[1]=(unsigned)rint(p[i][l][1]);
00156             end[0]=(unsigned)rint(p[i-1][l][0]);
00157             end[1]=(unsigned)rint(p[i-1][l][1]);
00158             if (i-1==0) maxhist=imnum;
00159             ImageDraw<unsigned char>::Line(im, start, end, col);
00160           }
00161         }
00162       }
00163     }
00164   }
00165 }
00166
00167
00168 /** print tracks to stdout, just for debugging purposes */
00169 void DumpTracks(deque<vector<HomgPoint2D> >& p)
00170 {
00171   int numim=0;
00172   while (p[numim].size()>0 && numim<(int)p.size()) numim++;
00173   for (unsigned l=0; l<p[0].size(); l++){
00174     cout <<setw(3)<<l<<" : ";
00175     for (int i=0; i<numim; i++){
00176       cout.precision(4);
00177       fprintf(stdout, "%i:(%5.1f, %5.1f) ", i, p[i][l][0], p[i][l][1]);
00178     }
00179     cout << endl;
00180   }
00181 }
00182
00183
00184
00185
00186 /** the drawing algorithm needs one point at infinity between subsequent
00187     tracks, therefore the last point of the last track is set to (0, 0, 0) */
00188 void InsertZeroPoints(deque<vector<HomgPoint2D> >& p, int i)
00189 {
00190   if (i>0){
00191     const int nump=p[i].size();
00192
00193     for (int k=0; k<nump; k++){
00194       if (p[i][k].IsAtInfinity() && !p[i-1][k].IsAtInfinity()){
00195         p[i-1][k].Set(0.0, 0.0, 0.0);
00196       }
00197     }
00198   }
00199 }
00200
00201 /**
00202  */
00203 void Track(const Image<CalculationType>& im, Image<unsigned char>& rgbim, int i)
00204 {
00205   otimer.Start();
00206   TimeMeasure mcdtimer;
00207
00208   /// the first thing that needs to be done is to calculate the pyramid images
00209   pytimer.Start();
00210   tr->PreparePyramide(im, *pim[act], *gx[act], *gy[act]);
00211   pytimer.Stop();
00212
00213   /// secondly the tracking process is started
00214   ttimer.Start();
00215   tr->Track(*pim[act], *gx[act], *gy[act]);
00216   ttimer.Stop();
00217   tnum++;
00218
00219   // now initially tell the tracker where to track
00220   if (i==0){
00221     cdtimer.Start();
00222     // the gradient based corner detector differ slightly to the Susan
00223     // corner detector regarding the interface
00224     CornerDetectorGradient<StorageType, CalculationType> *cdgrad
00225       = dynamic_cast<CornerDetectorGradient<StorageType, CalculationType> *>(cd);
00226     if (cdgrad){
00227       if (DEBUG) cout << "using gradients for corner detector\n\n";
00228       cdgrad->Detect(*(*gx[act])[*pyind], *(*gy[act])[*pyind], mp, qual);
00229     } else {
00230       if (DEBUG) cout << "using image for corner detector\n";
00231       cd->Detect(*(*pim[act])[*pyind], mp, qual);
00232     }
00233     if (DEBUG) cout << "initially found "<<mp.size()<<" points\n";
00234
00235     // let the tracker know of the point positions
00236     tr->AddNumPoints(mp, qual, max_num_points);
00237     cdtimer.Stop();
00238     cdnum++;
00239   }
00240
00241   // remember the corners in the global data struct
00242   tr->GetPoints(mp);
00243   p.push_back(mp);
00244   if (DEBUG) cout << "added "<<p[0].size()<<" points\n";
00245
00246   // now draw the tracks into rgbim
00247   Draw(*(*pim[act])[*pyind], rgbim, p, i);
00248
00249
00250   // at every cdfreq-th frame the lost tracks indicated by points at infinity
00251   // (i.e. p[2]==0) are filled up again
00252   if (i!=0 && (i % *cdfreq)==0){
00253     // run the corner detector
00254     cdtimer.Start();
00255     // the gradient based corner detector differ slightly to the Susan
00256     // corner detector regarding the interface
00257     CornerDetectorGradient<StorageType, CalculationType> *cdgrad
00258       =dynamic_cast<CornerDetectorGradient<StorageType,CalculationType> *>(cd);
00259     if (cdgrad){
00260       if (DEBUG) cout << "using gradients for corner detector\n\n";
00261       cdgrad->Detect(*(*gx[act])[*pyind], *(*gy[act])[*pyind], cp, qual);
00262     } else {
00263       if (DEBUG) cout << "using image for corner detector\n";
00264       cd->Detect(*(*pim[act])[*pyind], cp, qual);
00265     }
00266
00267     // the track length in the globals data structs are determiend
00268     // by 'zero points'
00269     InsertZeroPoints(p, i);
00270
00271     if (false) DumpTracks(p);
00272
00273     // now only the points where tracking failed are filled up
00274     int num=tr->FillUpPoints(cp, qual);
00275     if (DEBUG) cout << "filled up "<<num<<" points\n";
00276     // get the newly filled up points and remeber them in the global deque
00277     tr->GetPoints(mp);
00278     // restrict the maximum track length in the global data struct (optional)
00279     p.pop_back();
00280     p.push_back(mp);
00281
00282     cdtimer.Stop();
00283     if (false) DumpTracks(p);
00284     cdnum++;
00285   }
00286   // now remember the residui (mean grey value difference)
00287   tr->GetResiduiMAD(r);
00288   residui.push_back(r);
00289   // and the success indicator
00290   tr->GetResults(res);
00291   results.push_back(res);
00292   otimer.Stop();
00293 }
00294
00295 /// mark unnecessairy parameter as enhanced
00296 void MarkEnhancedAndSetDefaults(Param& para)
00297 {
00298   para.SetEnhancedFlag("MaxError-TrackerBase-Tracker", true);
00299   para.SetEnhancedFlag("HalfWinSize-TrackerBase-Tracker", true);
00300   para.SetEnhancedFlag("MaxIterations-TrackerBase-Tracker", true);
00301   para.SetEnhancedFlag("MaxResiduum-TrackerBase-Tracker", true);
00302   para.SetEnhancedFlag("PyIndex-Tracker", true);
00303
00304   para.SetEnhancedFlag("MaxNumCorners-CornerDetectorBase", true);
00305   para.SetEnhancedFlag("SubpixelAccuracy-CornerDetectorGradient", true);
00306   para.SetEnhancedFlag("TrackerType-Tracker", true);
00307 //   para.SetEnhancedFlag("", true);
00308 //   para.SetEnhancedFlag("", true);
00309 //   para.SetEnhancedFlag("", true);
00310 //   para.SetEnhancedFlag("", true);
00311   //para.SetEnhancedFlag("", true);
00312
00313   para.SetParamDouble("Factor-Rescale-PyramidImage", 4.0);
00314   para.SetParamInt("PyramidSize-PyramidImage", 2);
00315   para.SetParamInt("HalfWinSize-StructureTensor-CornerDetectorGradient", 2);
00316   para.SetParamInt("MinDistance-CornerDetectorGradient", 5);
00317 //   para.SetParamEnum("LowPassType-Rescale-PyramidImage", LowPassBase<float, float>::LPT_Mean);
00318 //   para.SetParamEnum("GradientType-StructureTensor-CornerDetectorGradient", GradientBase<float, float>::GT_Sobel3x3);
00319 }
00320
00321 /// the main function
00322 int main(int argc, char *argv[])
00323 {
00324   TimeMeasure timer;
00325   timer.Start();
00326   Param para;
00327
00328   Image<unsigned char> ucim, rgbim;
00329   Image<StorageType> im, im2;
00330   int grp=para.GetFreeGroupID();
00331   tr = new Tracker<StorageType, CalculationType>(para, grp, "");
00332   para.SetGroupName(grp, "Tracker");
00333
00334   grp=para.GetFreeGroupID();
00335   for (int i=0; i<2; i++){
00336     pim[i] = new PyramidImage<CalculationType>(para, grp, "");
00337     gx[i] = new PyramidImage<CalculationType>(para, grp, "");
00338     gy[i] = new PyramidImage<CalculationType>(para, grp, "");
00339   }
00340   para.SetGroupName(grp, "PyramidImage");
00341
00342
00343   // allocate the differnet corner detectors
00344   grp=para.GetFreeGroupID();
00345   CornerDetectorKLT<StorageType, CalculationType> cdklt(para, grp, "");
00346   CornerDetectorHarris<StorageType, CalculationType> cdharris(para, grp, "");
00347   CornerDetectorFoerstner<StorageType, CalculationType> cdfoerstner(para, grp, "");
00348   cdt=CornerDetectorBase<StorageType>::
00349     AddCornerDetectorType(para, "CornerDetectorType", grp);
00350   // parameter for the frequency of the corner detector
00351   cdfreq=para.AddParamInt("CornerDetectorFreq", "corner detector fills up points every n-th frame", 5, 0, INT_MAX, 0, grp);
00352   para.SetGroupName(grp, "CornerDetector");
00353
00354   //
00355   MarkEnhancedAndSetDefaults(para);
00356   /** read parameter from command line and DEFAULT_PARA_FILE_NAME */
00357   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00358   pyind = para.GetParamInt("PyIndex-Tracker");
00359
00360   // use the corner detector choosen by the parameter CornerDetectorType
00361   switch (*cdt){
00362   case CornerDetectorBase<StorageType>::CDT_Susan:
00363 #if type == 0
00364     cd = &cds;
00365 #else
00366     BIASERR("susan only implemented for unsigned char");
00367     cd = NULL;
00368 #endif
00369     if (DEBUG) cout << "using susan\n";
00370     break;
00371   case CornerDetectorBase<StorageType>::CDT_KLT:
00372     cd = &cdklt;
00373     if (DEBUG) cout << "using klt\n";
00374     break;
00375   case CornerDetectorBase<StorageType>::CDT_Harris:
00376     cd = &cdharris;
00377     if (DEBUG) cout << "using harris\n";
00378     break;
00379   case CornerDetectorBase<StorageType>::CDT_Foerstner:
00380     cd = &cdfoerstner;
00381     if (DEBUG) cout << "using foerstner\n";
00382     break;
00383   default:
00384     BIASERR("unknown corner detector type");
00385     cd = NULL;
00386     break;
00387   }
00388   cd->AddDebugLevel(D_CD_WRITE_DEBUG_IM);
00389   //cd->AddDebugLevel(D_CD_FEATURES);
00390
00391   //tr->AddDebugLevel(D_TRACKER_INIT);
00392   //tr->AddDebugLevel(D_TRACKER_PARAM);
00393   //tr->AddDebugLevel(D_TRACKER_TRACK);
00394   tr->AddDebugLevel(D_TRACKER_WRITE_IM);
00395   //tr->AddDebugLevel(D_TRACKER_FILL_UP);
00396
00397   // check if enough images were given on command line
00398   if (argc-argind<2 || argind<1){
00399     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00400     para.Usage(cerr);
00401     para.DisableDestructorWarning();
00402     return -2;
00403   }
00404
00405   // tell the tracker to adopt to new parameter
00406   tr->ParameterChanged();
00407
00408   //
00409   Rescale<float, float> resc;
00410
00411   // loop for every image
00412   for (int i=argind; i<argc; i++){
00413     timer.Stop();
00414     cout << "running at " << 1e6/(double)timer.GetRealTime() << " fps\r";
00415     timer.Reset();
00416     timer.Start();
00417
00418     // act is the index into the actual
00419     // toggle act between 0 and 1
00420     act=!act;
00421 #if type == 0
00422     if (ImageIO::Load(argv[i], im)!=0){
00423 #else
00424     if (ImageIO::Load(argv[i], ucim)!=0){
00425 #endif
00426       BIASERR("error loading image "<<argv[i]);
00427       para.DisableDestructorWarning();
00428       return -1;
00429     } else {
00430       if (DEBUG) cerr << "read "<<argv[i]<<endl;
00431     }
00432
00433 #if type != 0
00434     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00435       BIASERR("error converting image "<<argv[i]);
00436     }
00437 #endif
00438
00439     // downsample the images read from disk by factor 2 (optional)
00440     if (i==argind) im2.Init(im.GetWidth()>>1, im.GetHeight()>>1, 1);
00441     resc.DownsampleBy2Grey(im, im2);
00442     //im2=im;
00443
00444     // if a region of interest needs to be used, it should be set here
00445     //im.SetROI(0, 40, 320, 190);
00446
00447     // now call the function that does the tracking
00448     Track(im2, rgbim, i-argind);
00449
00450     // write result image to disk
00451     ostringstream name;
00452     name << "track-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00453     ImageIO::Write(name.str(), rgbim);
00454
00455   }
00456
00457   // write a Birchfeld style tracker file
00458   if (DEBUG) tr->WriteTrackFile(p, results, "features.txt");
00459
00460   if (DEBUG) cout << "\nTracks: "<<endl;
00461   if (DEBUG) DumpTracks(p);
00462   if (DEBUG) cout << "\n";
00463
00464   cout << "preparing pyramid images took :"
00465        <<pytimer.GetRealTime()/(float)tnum
00466        <<" us / image\n";
00467
00468   cout << "tracking took :"<<ttimer.GetRealTime()/(float)tnum
00469        <<" us / image   user "<<ttimer.GetUserTime()/(float)tnum
00470        <<" ms /image \n";
00471
00472   cout << "detecting corners took: "<<cdtimer.GetRealTime()/(float)cdnum
00473        <<" us / detection\n";
00474
00475   cout << "overall tracking corners took: "<<otimer.GetRealTime()/(float)tnum
00476        <<" us / detection\n";
00477
00478   para.DisableDestructorWarning();
00479   return 0;
00480 }
00481
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker3.cpp Source File

Matcher2D » Examples

ExampleTracker3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /** @example ExampleTracker3
00026     This little example demonstrates the most simple case of usage of the
00027     Tracker class. It also demonstrates that it is neccessary to extract the
00028     tracking information and store them externally.
00029     @ingroup g_tracker
00030     @author woelk */
00031
00032 #include <bias_config.h>
00033
00034 #include <Base/Common/BIASpragma.hh>
00035
00036 #include <Matcher2D/Tracker.hh>
00037 #include <Base/Image/ImageDraw.hh>
00038 #include <Base/Image/ImageConvert.hh>
00039 #include <Base/Image/ImageIO.hh>
00040 #include <FeatureDetector/CornerDetectorKLT.hh>
00041 #define TIMING
00042 #ifdef TIMING
00043 #include <Base/Debug/TimeMeasure.hh>
00044 #endif
00045
00046 #include <deque>
00047
00048 using namespace BIAS;
00049 using namespace std;
00050
00051 #define DEFAULT_PARA_FILE_NAME "Tracker3.ini"
00052
00053 #define StorageType float
00054 #define CalculationType float
00055
00056 //#define DEBUG false
00057 #define DEBUG 1
00058
00059
00060 //  the resulting data structs
00061 deque<vector<HomgPoint2D> > p; //  the corners
00062 deque<vector<KLT_TYPE> > residui; // mean absolute grey difference
00063 /* int representing success (=0) or failure reason (<0) see
00064    TrackerBase::Track() for details */
00065 deque<vector<int> > results;
00066 // covariance matrices
00067 deque<vector<Matrix<double> > > cov;
00068
00069 // temporary vector for the
00070 vector<HomgPoint2D> mp;
00071 vector<QUAL> qual; // the displacement in the last iteration step
00072 vector<HomgPoint2D> cp;
00073 vector<KLT_TYPE> r; //
00074 vector<int> res;
00075 vector<Matrix<double> > tmp_cov;
00076
00077 ImageBase::EStorageType st_type=ImageBase::ST_invalid;
00078
00079 const int max_num_points = 150;
00080
00081 /** Draw the tracks with a circle around the actual corner position.
00082     The covariances are visualized as ellipses. */
00083 void Draw(Image<StorageType>& stim, Image<unsigned char>& im,
00084           deque<vector<HomgPoint2D> >& p,
00085           deque<vector<Matrix<double> > >& cov, int imnum)
00086 {
00087   // should the tracks be drawn as trailing lines ?
00088   bool draw_tracks=true;
00089   bool draw_cov=false;
00090
00091   // draw the 3 sigma ellipsoid scaled with factor 100
00092   double cov_scale=3e2;
00093
00094   Image<unsigned char> ucim;
00095
00096   if (st_type==ImageBase::ST_unsignedshortint){
00097     Image<StorageType> scaled = stim;
00098     scaled.ScaleShift(255.0/4095.0, 0.0);
00099     ImageConvert::ConvertST(scaled, ucim, ImageBase::ST_unsignedchar);
00100   } else {
00101     ImageConvert::ConvertST(stim, ucim, ImageBase::ST_unsignedchar);
00102   }
00103   ImageConvert::Convert(ucim, im, ImageBase::CM_RGB);
00104
00105   unsigned char col[]={255, 0, 0};
00106   unsigned char colgreen[]={0, 255, 0};
00107   const int nump=p[0].size();
00108   unsigned start[2], end[2];
00109   const unsigned radius=1;
00110   int maxhist=0;
00111   double center[2], a[2], b[2], eva, evb;
00112   Vector2<double> na, nb;
00113
00114   if (imnum>0){
00115     for (int l=0; l<nump; l++){
00116       if (!p[imnum][l].IsAtInfinity() && !p[imnum-1][l].IsAtInfinity()){
00117         if (draw_cov){
00118           center[0]=p[imnum][l][0];
00119           center[1]=p[imnum][l][1];
00120           Matrix2x2<KLT_TYPE> curcov;
00121
00122           // we will get a nxn covariance matrix, depending on the number
00123           // of parameters. dx,dy is always the last rows/cols in the
00124           // covariance matrix, therefore copy these data for vizualization
00125           int covoffset =  cov[imnum][l].GetRows()-2;
00126           for (int row=0; row<2; row++)
00127             for (int col=0; col<2; col++)
00128               curcov[row][col] = cov[imnum][l][row+covoffset][col+covoffset];
00129
00130           curcov.EigenvalueDecomposition(eva, na, evb, nb);
00131           // eigenvalues are the \sigma^2
00132           eva=sqrt(eva);
00133           evb=sqrt(evb);
00134           //out << eva<<", "<<evb<<"\n";
00135           a[0]=na[0]*eva*cov_scale;
00136           a[1]=na[1]*eva*cov_scale;
00137           b[0]=nb[0]*evb*cov_scale;
00138           b[1]=nb[1]*evb*cov_scale;
00139           //cout<<"drawing ellipse at "<<center<<" with a="<<a[0]<<" "
00140           //    <<a[1]<<" b="<<b[0]<<" "<<b[1]<<endl;
00141           ImageDraw<unsigned char>::
00142             Ellipse(im, center, a, b, col);
00143         }
00144         // circle around corner in actual image
00145         start[0]=(unsigned)rint(p[imnum][l][0]);
00146         start[1]=(unsigned)rint(p[imnum][l][1]);
00147         ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00148                                                      radius, col);
00149
00150         if (draw_tracks){
00151           // lines for tracks
00152           for (int i=imnum; i>0; i--){
00153             if (p[i-1][l].IsAtInfinity()) {
00154               if ((imnum-i)>maxhist) maxhist=imnum-i;
00155               break;
00156             }
00157             start[0]=(unsigned)rint(p[i][l][0]);
00158             start[1]=(unsigned)rint(p[i][l][1]);
00159             end[0]=(unsigned)rint(p[i-1][l][0]);
00160             end[1]=(unsigned)rint(p[i-1][l][1]);
00161             if (i-1==0) maxhist=imnum;
00162             ImageDraw<unsigned char>::Line(im, start, end, col);
00163           }
00164         }
00165
00166       }
00167     }
00168   } else {
00169     // draw initial poinst blue
00170     for (int l=0; l<nump; l++){
00171       if (!p[imnum][l].IsAtInfinity()){
00172         // circle around corner in actual image
00173         start[0]=(unsigned)rint(p[imnum][l][0]);
00174         start[1]=(unsigned)rint(p[imnum][l][1]);
00175         ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00176                                                      radius, colgreen);
00177       }
00178     }
00179   }
00180 }
00181
00182
00183 /** print tracks to stdout, just for debugging purposes */
00184 void DumpTracks(deque<vector<HomgPoint2D> >& p)
00185 {
00186   int numim=0;
00187   while (p[numim].size()>0 && numim<(int)p.size()) numim++;
00188   for (unsigned l=0; l<p[0].size(); l++){
00189     cout <<setw(3)<<l<<" : ";
00190     for (int i=0; i<numim; i++){
00191       cout.precision(4);
00192       fprintf(stdout, "%i:(%5.1f, %5.1f) ", i, p[i][l][0], p[i][l][1]);
00193     }
00194     cout << endl;
00195   }
00196 }
00197
00198 // the drawing algorithm needs one point at infinity between subsequent tracks,
00199 // therefore the last point of the last track is set to (0, 0, 0)
00200 void InsertZeroPoints(deque<vector<HomgPoint2D> >& p, int i)
00201 {
00202   if (i>0){
00203     const int nump=p[i].size();
00204
00205     for (int k=0; k<nump; k++){
00206       if (p[i][k].IsAtInfinity() && !p[i-1][k].IsAtInfinity()){
00207         p[i-1][k].Set(0.0, 0.0, 0.0);
00208       }
00209     }
00210   }
00211 }
00212
00213
00214 /// mark unnecessairy parameter as enhanced
00215 void MarkEnhancedAndSetDefaults(Param& para)
00216 {
00217   para.SetEnhancedFlag("MaxError-TrackerBase-Tracker", true);
00218   para.SetEnhancedFlag("HalfWinSize-TrackerBase-Tracker", true);
00219   para.SetEnhancedFlag("MaxIterations-TrackerBase-Tracker", true);
00220   para.SetEnhancedFlag("PyIndex-Tracker", true);
00221
00222   para.SetEnhancedFlag("MaxNumCorners-CornerDetectorBase", true);
00223   para.SetEnhancedFlag("SubpixelAccuracy-CornerDetectorGradient", true);
00224   //  para.SetEnhancedFlag("TrackerType-Tracker", true);
00225   //para.SetEnhancedFlag("", true);
00226
00227   para.SetParamDouble("Factor-Rescale-PyramidImage", 4.0);
00228   para.SetParamInt("PyramidSize-PyramidImage", 2);
00229   para.SetParamInt("HalfWinSize-StructureTensor-CornerDetectorGradient", 2);
00230   para.SetParamInt("MinDistance-CornerDetectorGradient", 5);
00231
00232   // use same border handling
00233   para.SetParamEnum("BorderHandling-FilterBase-Binomial-Tracker",
00234                     FilterBase<float, float>::TBH_same);
00235   para.SetParamEnum("BorderHandling-FilterBase-FilterNTo2N-GradientSobel3x3-Tracker",
00236                     FilterBase<float, float>::TBH_same);
00237 }
00238
00239
00240 /** The main function */
00241 int main(int argc, char *argv[])
00242 {
00243   Param para;
00244   para.SetWriteOptions(false, false, false);
00245
00246   ImageBase baseim;
00247   Image<unsigned char> rgbim;
00248   Image<StorageType> im, im2;
00249
00250   // allocate the tracker
00251   int grp=para.GetFreeGroupID();
00252   Tracker<StorageType, CalculationType> tr(para, grp, "");
00253   para.SetGroupName(grp, "Tracker");
00254   //tr.AddDebugLevel(D_TRACKER_INIT);
00255   //tr.AddDebugLevel(D_TRACKER_PARAM);
00256   //tr.AddDebugLevel(D_TRACKER_TRACK);
00257   //tr.AddDebugLevel(D_TRACKER_WRITE_IM);
00258   //tr.AddDebugLevel(D_TRACKER_FILL_UP);
00259
00260   // the pyramid images used by the tracker
00261   PyramidImage<CalculationType> *pim[2]; // low pass filtered images
00262   PyramidImage<CalculationType> *gx[2]; // horizontal gradient
00263   PyramidImage<CalculationType> *gy[2]; // vertical gradient
00264   // allocate the pyramid images
00265   grp=para.GetFreeGroupID();
00266   for (int i=0; i<2; i++){
00267     pim[i] = new PyramidImage<CalculationType>(para, grp, "");
00268     gx[i] = new PyramidImage<CalculationType>(para, grp, "");
00269     gy[i] = new PyramidImage<CalculationType>(para, grp, "");
00270   }
00271   para.SetGroupName(grp, "PyramidImage");
00272
00273   // allocate the corner detector
00274   grp=para.GetFreeGroupID();
00275   CornerDetectorKLT<StorageType, CalculationType> cd(para, grp, "");
00276   para.SetGroupName(grp, "CornerDetector");
00277   //cd.AddDebugLevel(D_CD_WRITE_DEBUG_IM);
00278   //cd.AddDebugLevel(D_CD_FEATURES);
00279
00280   // supress some parameters
00281   MarkEnhancedAndSetDefaults(para);
00282   /* read parameter from command line and DEFAULT_PARA_FILE_NAME */
00283   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00284
00285   // check if enough images were given on command line
00286   if (argc-argind<2 || argind<1){
00287     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00288     para.Usage(cerr);
00289     para.DisableDestructorWarning();
00290     return -2;
00291   }
00292
00293   // tell the tracker to adopt to new parameters read from Tracker.ini or
00294   // command line
00295   tr.ParameterChanged();
00296
00297   // fill up lost tracks every cdfreq-th frame
00298   int cdfreq=1;
00299   // separate the pyramid images
00300   int act=0;
00301   // how many corners are successfully tracked
00302   int num=0;
00303
00304 #ifdef TIMING
00305   TimeMeasure timer;
00306   timer.Start();
00307 #endif
00308
00309   // loop for every image
00310   for (int i=argind; i<argc; i++){
00311     // act is the index into the actual pyramid image
00312     // toggle act between 0 and 1
00313     act=!act;
00314
00315     if (ImageIO::Load(argv[i], baseim)!=0){
00316       BIASERR("error loading image "<<argv[i]);
00317       para.DisableDestructorWarning();
00318       return -1;
00319     } else {
00320       if (DEBUG) cerr << "read "<<argv[i]<<endl;
00321 #ifdef TIMING
00322       cerr << "---------------"<<argv[i]<<"---------------\n";
00323 #endif
00324     }
00325     st_type=baseim.GetStorageType();
00326
00327     // convert to float
00328     if (ImageConvert::ConvertST(baseim, im, ImageBase::ST_float)!=0){
00329       BIASERR("error converting image "<<argv[i]);
00330     }
00331
00332     // convert to grey if necessairy
00333     if (im.GetChannelCount()!=1){
00334       if (ImageConvert::ToGrey(im, im)!=0){
00335         BIASERR("error converting image to grey"<<argv[i]);
00336       }
00337     }
00338
00339 #ifdef TIMING
00340     timer.Stop();
00341     cerr << "loading and converting to float/grey took "<<timer.GetRealTime()<<" us\n";
00342     timer.Reset();
00343     timer.Start();
00344 #endif
00345
00346     // the first thing that needs to be done is to calculate the pyramid images
00347     tr.PreparePyramide(im, *pim[act], *gx[act], *gy[act]);
00348
00349 #ifdef TIMING
00350     timer.Stop();
00351     cerr << "pyramid preparation took "<<timer.GetRealTime()<<" us\n";
00352     timer.Reset();
00353     timer.Start();
00354 #endif
00355
00356     // secondly the tracking process is started
00357     num=tr.Track(*pim[act], *gx[act], *gy[act]);
00358
00359 #ifdef TIMING
00360     timer.Stop();
00361     cerr << "tracking took "<<timer.GetRealTime()<<" us for "<<num<<" corners\n";
00362     cerr << " = "<<timer.GetCycleCount()/num<<" fps/corner/frame\n";
00363     timer.Reset();
00364     timer.Start();
00365 #endif
00366
00367     // now initially tell the tracker where to track
00368     if (i==argind){
00369       cd.Detect(*(*gx[act])[0], *(*gy[act])[0], mp, qual);
00370       if (DEBUG) cout << "initially found "<<mp.size()<<" points\n";
00371
00372       // let the tracker know of the point positions
00373       //tr.AddNumPoints(mp, qual, max_num_points);
00374       tr.ReplaceAllPoints(mp,qual);
00375
00376 #ifdef TIMING
00377       timer.Stop();
00378       cerr << "corner detection took "<<timer.GetRealTime()<<" us\n";
00379       timer.Reset();
00380       timer.Start();
00381 #endif
00382     }
00383
00384     // remember the corners in the global data struct
00385     tr.GetPoints(mp);
00386     p.push_back(mp);
00387
00388     // now remember the residui (mean grey value difference)
00389     tr.GetResiduiMAD(r);
00390     residui.push_back(r);
00391     // and the success indicator
00392     tr.GetResults(res);
00393     results.push_back(res);
00394
00395     tr.GetCovariances(tmp_cov);
00396     cov.push_back(tmp_cov);
00397
00398 #ifdef TIMING
00399     timer.Stop();
00400     cerr << "get results took "<<timer.GetRealTime()<<" us\n";
00401     timer.Reset();
00402     timer.Start();
00403 #endif
00404
00405
00406
00407     // at every cdfreq-th frame the lost tracks indicated by points at infinity
00408     // (i.e. p[2]==0) are filled up again
00409     if (i!=argind && ((i-argind) % cdfreq)==0){
00410       // We are not interested in corners already tracked,
00411       // hence the corner detector must know about the points which are
00412       // already tracked
00413       tr.GetPoints(cp);
00414
00415       cd.Detect(*(*gx[act])[0], *(*gy[act])[0], cp, qual);
00416       // the track length in the globals data structs are determiend
00417       // by 'zero points'
00418       InsertZeroPoints(p, i-argind);
00419
00420       // now only the points where tracking failed are filled up
00421       int num=tr.FillUpPoints(cp, qual);
00422       if (DEBUG) cout << "filled up "<<num<<" points\n";
00423       // get the newly filled up points and remember them in the global deque
00424       tr.GetPoints(mp);
00425       // restrict the maximum track length in the global data struct (optional)
00426       p.pop_back();
00427       p.push_back(mp);
00428
00429     }
00430 #ifdef TIMING
00431     timer.Stop();
00432     cerr << "corner detection took "<<timer.GetRealTime()<<" us\n";
00433     timer.Reset();
00434     timer.Start();
00435 #endif
00436
00437     // now draw the tracks into rgbim
00438     Draw(*(*pim[act])[0], rgbim, p, cov, i-argind);
00439     // write result image to disk
00440     ostringstream name;
00441     name << "track-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00442     ImageIO::Write(name.str(), rgbim);
00443
00444 #ifdef TIMING
00445     timer.Stop();
00446     cerr << "drawing/writing took "<<timer.GetRealTime()<<" us\n";
00447     timer.Reset();
00448     timer.Start();
00449 #endif
00450   }
00451
00452   // write a Birchfeld style tracker file
00453   if (DEBUG) tr.WriteTrackFile(p, results, "features.txt");
00454
00455   if (DEBUG) cout << "\nTracks: "<<endl;
00456   if (DEBUG) DumpTracks(p);
00457   if (DEBUG) cout << "\n";
00458
00459   para.DisableDestructorWarning();
00460   return 0;
00461 }
00462
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTracker.cpp Source File

Matcher2D » Examples

ExampleTracker.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 /** @example ExampleTracker2
00025     This little example demonstrates the
00026
00027
00028     @ingroup g_tracker
00029     @author woelk */
00030
00031 #include <bias_config.h>
00032
00033 #include <Matcher2D/Tracker.hh>
00034 #include <Base/Image/ImageDraw.hh>
00035 #include <Base/Image/ImageConvert.hh>
00036 #include <Base/Image/ImageIO.hh>
00037 #include <FeatureDetector/CornerDetectorSusan.hh>
00038 #include <FeatureDetector/CornerDetectorKLT.hh>
00039 #include <Base/Debug/TimeMeasure.hh>
00040 #include <Image/PyramidImage.hh>
00041
00042 #include <deque>
00043
00044 using namespace BIAS;
00045 using namespace std;
00046
00047 #define DEFAULT_PARA_FILE_NAME "Tracker.ini"
00048
00049 #define type 1
00050 #if type == 0
00051 #define StorageType unsigned char
00052 #define CalculationType int
00053 #elif type == 1
00054 #define StorageType float
00055 #define CalculationType float
00056 #endif
00057
00058 CornerDetectorBase<StorageType> *cd = NULL;
00059 Tracker<StorageType, CalculationType> *tr = NULL;
00060 PyramidImage<CalculationType> *pim[2], *gx[2], *gy[2];
00061 int act=0, *cdt, *cdfreq, *pyind;
00062 deque<vector<HomgPoint2D> > p;
00063 deque<vector<KLT_TYPE> > residui;
00064 deque<vector<int> > results;
00065 vector<HomgPoint2D> mp;
00066 vector<QUAL> qual;
00067 vector<HomgPoint2D> cp;
00068 vector<KLT_TYPE> r;
00069 vector<int> res;
00070 int tnum=0, cdnum=0;
00071 TimeMeasure otimer, ttimer, cdtimer, pytimer;
00072 bool draw_tracks=true;
00073 const int max_num_points=150;
00074
00075 void Draw(Image<unsigned char>& im, deque<vector<HomgPoint2D> >& p, int imnum)
00076 {
00077   unsigned char col[]={255, 0, 0};
00078   const int nump=p[0].size();
00079   unsigned start[2], end[2];
00080   const unsigned radius=1;
00081   int maxhist=0;
00082
00083   if (imnum>0){
00084     for (int l=0; l<nump; l++){
00085       if (!p[imnum][l].IsAtInfinity() && !p[imnum-1][l].IsAtInfinity()){
00086         // circel around corner in actual image
00087         start[0]=(unsigned)rint(p[imnum][l][0]);
00088         start[1]=(unsigned)rint(p[imnum][l][1]);
00089         ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00090                                                      radius, col);
00091         if (draw_tracks){
00092           // lines for tracks
00093           for (int i=imnum; i>0; i--){
00094             if (p[i-1][l].IsAtInfinity()) {
00095               if ((imnum-i)>maxhist) maxhist=imnum-i;
00096               break;
00097             }
00098             start[0]=(unsigned)rint(p[i][l][0]);
00099             start[1]=(unsigned)rint(p[i][l][1]);
00100             end[0]=(unsigned)rint(p[i-1][l][0]);
00101             end[1]=(unsigned)rint(p[i-1][l][1]);
00102             if (i-1==0) maxhist=imnum;
00103             //cerr << "line: ("<<start[0]<<", "<<start[1]<<") -> ("<<end[0]<<", "<<end[1]<<")\n";
00104             ImageDraw<unsigned char>::Line(im, start, end, col);
00105           }
00106         }
00107       }
00108     }
00109   }
00110   //cerr << "max track length "<<maxhist<<endl;
00111 }
00112
00113
00114
00115 void DumpTracks(deque<vector<HomgPoint2D> >& p)
00116 {
00117   int numim=0;
00118   while (p[numim].size()>0 && numim<(int)p.size()) numim++;
00119   for (unsigned l=0; l<p[0].size(); l++){
00120     cout <<setw(3)<<l<<" : ";
00121     for (int i=0; i<numim; i++){
00122       cout.precision(4);
00123       fprintf(stdout, "%i:(%5.1f, %5.1f) ", i, p[i][l][0], p[i][l][1]);
00124       //      cout <<setw(10)<<i<<":("<<p[i][l][0]<<", "<<p[i][l][1]<<") ";
00125     }
00126     cout << endl;
00127   }
00128 }
00129
00130
00131
00132
00133 /** the drawing algorithm needs one point at infinity between subsequent
00134     tracks, therefor the last point of the last track is set to (0, 0, 0) */
00135 void InsertZeroPoints(deque<vector<HomgPoint2D> >& p, int i)
00136 {
00137   if (i>0){
00138     const int nump=p[i].size();
00139
00140     for (int k=0; k<nump; k++){
00141       if (p[i][k].IsAtInfinity() && !p[i-1][k].IsAtInfinity()){
00142         p[i-1][k].Set(0.0, 0.0, 0.0);
00143       }
00144     }
00145   }
00146 }
00147
00148 void Track(const Image<CalculationType>& im, Image<unsigned char>& rgbim, int i)
00149 {
00150   otimer.Start();
00151   TimeMeasure mcdtimer;
00152
00153
00154   pytimer.Start();
00155   tr->PreparePyramide(im, *pim[act], *gx[act], *gy[act]);
00156   pytimer.Stop();
00157
00158   ttimer.Start();
00159   tr->Track(*pim[act], *gx[act], *gy[act]);
00160   ttimer.Stop();
00161   tnum++;
00162
00163   if (i==0){
00164     cdtimer.Start();
00165     CornerDetectorGradient<StorageType, CalculationType> *cdgrad
00166       = dynamic_cast<CornerDetectorGradient<StorageType,CalculationType>*>(cd);
00167     if (cdgrad){
00168       cdgrad->Detect(*(*gx[act])[*pyind], *(*gy[act])[*pyind], mp, qual);
00169     } else {
00170       cd->Detect(*(*pim[act])[*pyind], mp, qual);
00171     }
00172     //cerr << "found "<<mp.size()<<" points\n";
00173     //    mp.resize(*numfeat);
00174     //qual.resize(*numfeat);
00175     tr->AddNumPoints(mp, qual, max_num_points);
00176     cerr << "added "<<mp.size()<<" points\n";
00177     cdtimer.Stop();
00178     cdnum++;
00179   }
00180
00181   tr->GetPoints(mp);
00182   p.push_back(mp);
00183
00184 #if type == 0
00185   ImageConvert::Convert(*(*pim[act])[*pyind], rgbim, ImageBase::CM_RGB);
00186 #elif type == 1
00187   Image<unsigned char> ucim;
00188   ImageConvert::ConvertST(*(*pim[act])[*pyind], ucim, ImageBase::ST_unsignedchar);
00189   ImageConvert::Convert(ucim, rgbim, ImageBase::CM_RGB);
00190 #endif
00191   Draw(rgbim, p, i);
00192
00193
00194   if ((i % *cdfreq)==0){
00195     //DumpTracks(p);
00196     cdtimer.Start();
00197     //mcdtimer.Start();
00198     cd->Detect(*(*pim[act])[*pyind], cp, qual);
00199     //mcdtimer.Stop();
00200     //cerr << "corner detection took "<<mcdtimer.GetRealTime()<<" us\n";
00201     //mcdtimer.Reset();
00202     //mcdtimer.Start();
00203
00204     InsertZeroPoints(p, i);
00205     //DumpTracks(p);
00206     int num=tr->FillUpPoints(cp, qual);
00207     cerr << "filled up "<<num<<" points\n";
00208     tr->GetPoints(mp);
00209     p.pop_back();
00210     p.push_back(mp);
00211     //mcdtimer.Stop();
00212     //cerr << "corner insertion took "<<mcdtimer.GetRealTime()<<" us\n";
00213     cdtimer.Stop();
00214     //DumpTracks(p);
00215     cdnum++;
00216   }
00217   tr->GetResiduiMAD(r);
00218   residui.push_back(r);
00219   tr->GetResults(res);
00220   results.push_back(res);
00221   otimer.Stop();
00222 }
00223
00224
00225
00226 /// the main function
00227 int main(int argc, char *argv[])
00228 {
00229   TimeMeasure timer;
00230   timer.Start();
00231   Param para;
00232   //  para.AddDebugLevel(D_PARAM_CONF_FILE);
00233
00234   Image<unsigned char> ucim, rgbim;
00235   Image<StorageType> im, im2;
00236   int grp=para.GetFreeGroupID();
00237   tr = new Tracker<StorageType, CalculationType>(para, grp, "");
00238   para.SetGroupName(grp, "Tracker");
00239
00240   grp=para.GetFreeGroupID();
00241   for (int i=0; i<2; i++){
00242     pim[i] = new PyramidImage<CalculationType>(para, grp, "");
00243     gx[i] = new PyramidImage<CalculationType>(para, grp, "");
00244     gy[i] = new PyramidImage<CalculationType>(para, grp, "");
00245   }
00246   para.SetGroupName(grp, "PyramidImage");
00247
00248   bool DEBUG=true;
00249   act=0;
00250
00251   grp=para.GetFreeGroupID();
00252 #if type == 0
00253   CornerDetectorSusan<StorageType> cds(para, grp, "");
00254 #endif
00255   CornerDetectorKLT<StorageType, CalculationType> cdklt(para, grp, "");
00256   cdt=CornerDetectorBase<StorageType>::
00257     AddCornerDetectorType(para, "CornerDetectorType", grp);
00258   para.SetGroupName(grp, "CornerDetector");
00259   cdfreq=para.AddParamInt("CornerDetectorFreq", "corner detector fills up points every n th frame", 5, 0, INT_MAX, 0, GRP_ALL);
00260   //numfeat=para.AddParamInt("NumFeatures", "track n features", 250, 0, INT_MAX, 0, GRP_ALL);
00261
00262
00263   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00264   pyind = para.GetParamInt("PyIndex-Tracker");
00265
00266   switch (*cdt){
00267   case CornerDetectorBase<StorageType>::CDT_Susan:
00268 #if type == 0
00269     cd = &cds;
00270 #else
00271     BIASERR("susan only implemented for unsigned char");
00272     cd = NULL;
00273 #endif
00274     break;
00275   case CornerDetectorBase<StorageType>::CDT_KLT:
00276     cd = &cdklt;
00277     break;
00278   default:
00279     BIASERR("unknown corner detector type");
00280     cd = NULL;
00281     break;
00282   }
00283   //cd->AddDebugLevel(D_CD_WRITE_DEBUG_IM);
00284   //cd->AddDebugLevel(D_CD_FEATURES);
00285
00286   //tr->AddDebugLevel(D_TRACKER_INIT);
00287   //tr->AddDebugLevel(D_TRACKER_PARAM);
00288   //tr->AddDebugLevel(D_TRACKER_TRACK);
00289   //tr->AddDebugLevel(D_TRACKER_WRITE_IM);
00290   //tr->AddDebugLevel(D_TRACKER_FILL_UP);
00291
00292   if (argc-argind<2 || argind<1){
00293     cerr << argv[0] << " [parameter] <im1> <im2> [ <im3> ... ] \n";
00294     para.Usage(cerr);
00295   para.DisableDestructorWarning();
00296     return -2;
00297   }
00298
00299   tr->ParameterChanged();
00300
00301   Rescale<float, float> resc;
00302
00303   for (int i=argind; i<argc; i++){
00304     timer.Stop();
00305     cerr << 1e6/(double)timer.GetRealTime() << "fps\n";
00306     timer.Reset();
00307     timer.Start();
00308     act=!act;
00309 #if type == 0
00310     if (ImageIO::Load(argv[i], im)!=0){
00311 #else
00312     if (ImageIO::Load(argv[i], ucim)!=0){
00313 #endif
00314       BIASERR("error loading image "<<argv[i]);
00315       para.DisableDestructorWarning();
00316       return -1;
00317     } else {
00318       if (DEBUG) cerr << "read "<<argv[i]<<endl;
00319     }
00320
00321 #if type != 0
00322     if (ImageConvert::ConvertST(ucim, im, ImageBase::ST_float)!=0){
00323       BIASERR("error converting image "<<argv[i]);
00324     }
00325 #endif
00326
00327     //im.SetROI(0, 80, 640, 400);
00328     //  im.SetROI(160, 160, 480, 320);
00329
00330     //if (i==argind) im2.Init(im.GetWidth()>>1, im.GetHeight()>>1, 1);
00331     //resc.DownsampleBy2Grey(im, im2);
00332     //im.SetROI(0, 40, 320, 190);
00333     Track(im, rgbim, i-argind);
00334
00335     ostringstream name;
00336     name << "track-"<<setw(4)<<setfill('0')<<i-argind<<".mip";
00337     ImageIO::Write(name.str(), rgbim);
00338
00339   }
00340
00341   tr->WriteTrackFile(p, results, "features.txt");
00342
00343   //cout << "\nTracks: "<<endl;
00344   //DumpTracks(p);
00345   //cout << "\n";
00346
00347   cout << "preparing pyramid images took :"
00348        <<pytimer.GetRealTime()/(float)tnum
00349        <<" us / image\n";
00350
00351   cout << "tracking took :"<<ttimer.GetRealTime()/(float)tnum
00352        <<" us / image\n";
00353
00354   cout << "detecting corners took: "<<cdtimer.GetRealTime()/(float)cdnum
00355        <<" us / detection\n";
00356
00357   cout << "overall tracking corners took: "<<otimer.GetRealTime()/(float)tnum
00358        <<" us / detection\n";
00359
00360   para.DisableDestructorWarning();
00361   return 0;
00362 }
00363
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Examples/ExampleTrackerBase.cpp Source File

Matcher2D » Examples

ExampleTrackerBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /** @example ExampleTrackerBase
00026     This little example evaluates a TrackerBase class against synthetically
00027     generated ground truth data.
00028     Synthetically generated ground truth data can be found in the TestData
00029     repository in our cvs.
00030
00031    ExampleTrackerBase 157 157 ~/cvs/TestData/tracker_noise/image*.pgm
00032
00033    @ingroup g_tracker
00034    @author woelk */
00035
00036 #include <Matcher2D/TrackerBase.hh>
00037 #include <Base/Image/Image.hh>
00038 #include <Base/Image/ImageDraw.hh>
00039 #include <Base/Image/ImageIO.hh>
00040 #include <Base/Image/ImageConvert.hh>
00041 #include <Base/Geometry/HomgPoint2D.hh>
00042 #include <Base/Debug/TimeMeasure.hh>
00043 #include <Filter/GradientSobel3x3.hh>
00044 #include <Filter/GradientGauss.hh>
00045 #include <Filter/GradientGaussAsymmetric.hh>
00046 #include <Filter/Gauss.hh>
00047
00048 #include <iostream>
00049 #include <iomanip>
00050
00051 using namespace BIAS;
00052 using namespace std;
00053
00054
00055
00056 // always track using float image, since it is a lot faster
00057 #define StorageType float
00058
00059 // default parameter file name
00060 #define DEFAULT_PARA_FILE_NAME "TrackerBase.ini"
00061
00062
00063 /// loads an image and converts to single channel float image
00064 int LoadImage(char *name, Image<StorageType>& im)
00065 {
00066   ImageBase baseim;
00067
00068   // load image
00069   if (ImageIO::Load(name, baseim)!=0){
00070     BIASERR("error loading image "<<name);
00071     return -1;
00072   }
00073   // convert to float
00074   if (ImageConvert::ConvertST(baseim, im, ImageBase::ST_float)!=0){
00075     BIASERR("error converting image "<<name);
00076     return -2;
00077   }
00078   // convert to grey if necessary
00079   if (im.GetChannelCount()!=1){
00080     if (ImageConvert::ToGrey(im, im)!=0){
00081       BIASERR("error converting image to grey "<<name);
00082       return -3;
00083     }
00084   }
00085   im.SetMetaData(*baseim.GetMetaData());
00086
00087   //ImageIO::Write("fimage.mip", im);
00088   return 0;
00089 }
00090
00091 /// draws the tracking result and saves to name.tracked
00092 void Draw(Image<StorageType>& im, HomgPoint2D& p, Matrix2x2<KLT_TYPE>& cov,
00093           char *name)
00094 {
00095   Image<unsigned char> dim;
00096   unsigned uip[2], radius=1;
00097   unsigned char color[]={255,0,0};
00098   string file;
00099   float cov_scale=1e5;
00100   bool draw_cov=true;
00101
00102
00103   // convert to unsigned char
00104   if (ImageConvert::ConvertST(im, dim, ImageBase::ST_unsignedchar)!=0){
00105     BIASERR("error converting image to unsigned char "<<name);
00106     BIASABORT;
00107   }
00108
00109   // convert to rgb if necessary
00110   if (dim.GetColorModel()!=ImageBase::CM_RGB){
00111     if (ImageConvert::ToRGB(dim, dim)!=0){
00112       BIASERR("error converting image to RGB "<<name);
00113       BIASABORT;
00114     }
00115   }
00116
00117   uip[0]=(unsigned int)rint(p[0]);
00118   uip[1]=(unsigned int)rint(p[1]);
00119
00120   ImageDraw<unsigned char>::
00121     CircleCenterFilled(dim, uip[0], uip[1], radius, color);
00122
00123   if (draw_cov){
00124     double center[2], a[2], b[2], eva, evb;
00125     Vector2<double> na, nb;
00126     center[0]=p[0];
00127     center[1]=p[1];
00128
00129     cov.EigenvalueDecomposition(eva, na, evb, nb);
00130     cout << eva<<", "<<evb<<"\n";
00131     a[0]=na[0]*eva*cov_scale;
00132     a[1]=na[1]*eva*cov_scale;
00133     b[0]=nb[0]*evb*cov_scale;
00134     b[1]=nb[1]*evb*cov_scale;
00135     ImageDraw<unsigned char>::
00136       Ellipse(dim, center, a, b, color);
00137   }
00138
00139   file=name;
00140   file+=".tracked";
00141   ImageIO::Write(file, dim);
00142   cout << "wrote "<<file<<endl;
00143 }
00144
00145 /// the main function
00146 int main(int argc, char*argv[])
00147 {
00148   Param para;
00149   para.SetWriteOptions(false, false, false);
00150   Image<StorageType> fim[2], im[2], drawim;
00151   Image<StorageType> gradx[2], grady[2];
00152   KLT_TYPE error, err, residuumMAD, residuumMSD, errorsum=0.0;
00153   HomgPoint2D p[2];
00154   Matrix2x2<KLT_TYPE> cov;
00155   int newim, oldim, iter;
00156   int res, counter;
00157   bool debug=false;
00158   bool draw=true;
00159   MetaData *md;
00160   AppData appdata;
00161   HomgPoint2D realpoint;
00162
00163   TrackerBase<StorageType> tracker(para);
00164   FilterNTo2N<StorageType, StorageType> *grad=NULL;
00165   GradientSobel3x3<StorageType, StorageType> gsobel3x3(para);
00166   GradientGauss<StorageType,StorageType> ggauss(para);
00167   GradientGaussAsymmetric<StorageType, StorageType>
00168     ggaussasymmetric(para);
00169   int *gradienttype = AddGradientType(para);
00170   Gauss<StorageType, StorageType> gauss(para);
00171
00172   TimeMeasure timer, tc;
00173
00174   int argind = para.UpdateParameter(argc, argv, DEFAULT_PARA_FILE_NAME);
00175
00176   if (argc-argind<4 || argind<1){
00177     cerr << argv[0] << " : <x-coo> <y-coo> <image> <image> ..."<< endl;
00178     return -5;
00179   }
00180
00181   // activate some debugging output of tracking object
00182   //tracker.AddDebugLevel(D_TRACKERB_INIT);
00183   //tracker.AddDebugLevel(D_TRACKERB_SKLT);
00184   //tracker.AddDebugLevel(D_TRACKERB_GKLT);
00185   //tracker.AddDebugLevel(D_TRACKERB_BILINEAR);
00186
00187   // choose the gradient type according to parameter
00188   switch (*gradienttype){
00189   case GT_Sobel3x3:
00190     grad = &gsobel3x3;
00191     cerr <<"Sobel3x3\n";
00192     break;
00193   case GT_Gauss:
00194     grad = &ggauss;
00195     cerr <<"GradientGauss\n";
00196     break;
00197   case GT_GaussAsymmetric:
00198     grad = &ggaussasymmetric;
00199     cerr <<"GradientGaussAsymmetric\n";
00200     break;
00201   default:
00202     BIASERR("unknown gradient type");
00203     grad = NULL;
00204     break;
00205   }
00206   // activate some debugging output of gradient object
00207   //grad->AddDebugLevel(D_GRADGAUSS_KERNEL);
00208   //grad->AddDebugLevel(D_CONV_KERNEL);
00209
00210   // get the point to track from command line
00211   p[0][2]=p[1][2]=1.0;
00212   p[0][0]=atof(argv[argind]);
00213   p[0][1]=atof(argv[argind+1]);
00214   cout << "attempt to track point "<<p[0] << endl;
00215
00216
00217   // load image
00218   if (LoadImage(argv[argind+2], im[0])!=0){
00219     BIASERR("error loading image "<<argv[argind+2]);
00220     return -1;
00221   }
00222
00223   // calculate gradients and low pass filtered images
00224   grad->Filter(im[0], gradx[0], grady[0]);
00225   gauss.Filter(im[0], fim[0]);
00226
00227   counter=argind+2;
00228   newim=0;
00229   // now loop through the images
00230   while (counter < argc-1){
00231     counter++;
00232     newim=(newim==0)?(1):(0);
00233     oldim=(newim==0)?(1):(0);
00234
00235     if (LoadImage(argv[counter], im[newim])!=0){
00236       BIASERR("error loading image "<<argv[counter]);
00237       return -1;
00238     } else {
00239       if (debug)
00240         cout << "\n------- newim: " << argv[counter]
00241              << "\n------- oldim: " << argv[counter-1] << endl;
00242
00243       md=im[newim].GetMetaData();
00244       if (md->Find(AppData::MD_HomgPoint2D, "#[HomgPoint2D]", appdata)>=0){
00245         if (appdata.tag==AppData::MD_USE_ASCII){
00246           if (debug) cerr << appdata.stag <<" : "<<appdata.sdata<<endl;
00247           sscanf(appdata.sdata.c_str(), "[ %lf %lf %lf ]",
00248                  &realpoint[0], &realpoint[1], &realpoint[2]);
00249         } else {
00250           memcpy(realpoint.GetData(), appdata.data, appdata.length);
00251         }
00252         if (debug) cerr <<"realpoint is at "<<realpoint<<endl;
00253       } else {
00254         BIASERR("cannot find HomgPoint2D in meta data");
00255       }
00256     }
00257
00258     // calculate gradients and low pass filtered images
00259     grad->Filter(im[newim], gradx[newim], grady[newim]);
00260     gauss.Filter(im[newim], fim[newim]);
00261
00262     // time the tracking
00263     timer.Start();
00264     tc.Start();
00265
00266 #ifdef BIAS_DEBUG
00267     ImageIO::Write("im1.mip", im[oldim]);
00268     ImageIO::Write("im2.mip", im[newim]);
00269     ImageIO::Write("fim1.mip", fim[oldim]);
00270     ImageIO::Write("fim2.mip", fim[newim]);
00271     ImageIO::Write("gx1.mip", gradx[oldim]);
00272     ImageIO::Write("gx2.mip", gradx[newim]);
00273     ImageIO::Write("gy1.mip", grady[oldim]);
00274     ImageIO::Write("gy2.mip", grady[newim]);
00275     cerr << "Tracking from "<<p[oldim]<<"  -->  "<<p[oldim]<<endl;
00276 #endif
00277
00278     // first: initialize the tracker
00279     tracker.Init(fim[oldim], fim[newim], gradx[oldim], grady[oldim],
00280                   gradx[newim], grady[newim]);
00281
00282     // second: do the tracking
00283     res =
00284       tracker.Track(p[oldim], p[oldim], p[newim], error, iter,
00285                     residuumMAD, residuumMSD, cov);
00286
00287     // time the tracking
00288     tc.Stop();
00289     timer.Stop();
00290     tc.Print();
00291     tc.Reset();
00292
00293     // check for errors
00294     if (res<0){
00295       // stop looping through images if point vanishes from the valid
00296       // image region
00297       if (res==-2){
00298         cout << "point ("<<p[oldim][0]<<", "<<p[oldim][1]<<") too close to "
00299             <<"image border, stopping"<<endl;
00300          break;
00301       }
00302       BIASERR("error matching "<<res);
00303       assert(false);
00304     }
00305
00306     // calculate the error with respect to ground truth from image header
00307     err=sqrt((p[newim][0]-realpoint[0])*(p[newim][0]-realpoint[0])+
00308              (p[newim][1]-realpoint[1])*(p[newim][1]-realpoint[1]));
00309     errorsum+=err;
00310
00311     // draw and save the result
00312     if (draw)
00313       Draw(im[newim], p[newim], cov, argv[counter]);
00314
00315     cout << setw(2) << counter-3 << " : (" << p[oldim][0]<<", "<<p[oldim][1]
00316          << ") -> ("<< p[newim][0]<<", "<<p[newim][1]<<")  klt-error: "<<error
00317          <<"   real: ("<<realpoint[0]<<", "<<realpoint[1]
00318          <<")   dist-err: "<<err<<"   residuumMAD: "<<residuumMAD
00319          <<"   residuumMSD: "<<residuumMSD<<endl;
00320
00321   }
00322   // print out some statistics
00323   cerr << "errorsum over "<<counter-3<<" images: "<<errorsum<<endl
00324        << "  mean error "<<errorsum/(double)(counter-3)<<endl;
00325
00326   timer.Print();
00327   cerr << "KLT trackin over "<<argc-3<<" images took "<<timer.GetRealTime()
00328        <<" us"
00329        << "\n  this is equal to "<<timer.GetRealTime()/double(argc-3)
00330        <<" us per image and corner" << endl;
00331   para.DisableDestructorWarning();
00332   return 0;
00333 }
00334
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleTriangleMesh.cpp Source File

Utils » Examples

ExampleTriangleMesh.cpp

Go to the documentation of this file.
00001 #include <Utils/TriangleMesh.hh>
00002 #include <Utils/ThreeDOut.hh>
00003 #include <Base/Image/ImageIO.hh>
00004
00005 #include <iostream>
00006
00007 using namespace std;
00008 using namespace BIAS;
00009
00010 void usage(char* name)
00011 {
00012   cout<<"usage:\n";
00013   cout<<name<<" <depthmap> <pmatrix> <texture> [outputFile]\n";
00014 }
00015
00016 int main(int argc, char* argv[])
00017 {
00018   if(argc<3) {
00019     usage(argv[0]);
00020     return -1;
00021   }
00022
00023   Image<float> depthMap;
00024   if(ImageIO::Load(argv[1], depthMap)!=0) {
00025     cout<<"depth map could not be loaded!\n";
00026     usage(argv[0]);
00027     return -1;
00028   }
00029
00030   Image<unsigned char> texture;
00031   if(ImageIO::Load(argv[3], texture)!=0) {
00032     cout<<"texture could not be loaded!\n";
00033     usage(argv[0]);
00034     return -1;
00035   }
00036
00037   PMatrix P;
00038   if(!P.Load(argv[2])) {
00039     cout<<"PMatrix could not be loaded!\n";
00040     usage(argv[0]);
00041     return -1;
00042   }
00043
00044   cout<<"meshing..."; cout.flush();
00045   TriangleMesh mesh;
00046
00047   mesh.GenerateDenseMesh(depthMap, P, texture);
00048   cout<<"finished\n";
00049
00050   ThreeDOut vrmlOut;
00051   vrmlOut.AddTriangleMesh(mesh, "mesh_from_"+string(argv[1]),
00052                           argv[3], false);
00053
00054   cout<<"Writing VRML to ";
00055   if(argc>4) {
00056     cout<<argv[4]<<"... ";cout.flush();
00057     vrmlOut.VRMLOut(argv[4]);
00058   }
00059   else {
00060     cout<<"DenseTriangleMesh.wrl... ";cout.flush();
00061     vrmlOut.VRMLOut("DenseTriangleMesh.wrl");
00062   }
00063   cout<<"finished\n";
00064
00065   return 0;
00066 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulate2.cpp Source File

Geometry » Examples

ExampleTriangulate2.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Geometry/Triangulation.hh>
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Geometry/KMatrix.hh>
00029
00030 #include <fstream>
00031 #include <iostream>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 //int main(int argc, char *argv[])
00037 int main()
00038 {
00039   PMatrix
00040 //    pleft("415.692215            2.8e-05                320                 -0
00041 //                  0         415.692207         239.999964                 -0
00042 //                  0                  0                  1                 -0"),
00043 //    pright("415.692215            2.8e-05                320        -443.520012
00044 //                  0         415.692207         239.999964        -332.640009
00045 //                  0                  0                  1             -1.386");
00046     pleft("415.692177      2.7975296e-05                320                 -0\
00047                  0         415.692207        239.9999637                 -0\
00048                  0        8.74228e-08                  1                 -0 "),
00049     pright("415.692177      2.7975296e-05                320            -633.6\
00050                  0         415.692207        239.9999637        -475.199928\
00051                  0        8.74228e-08                  1              -1.98");
00052   //HomgPoint2D point2d_im1(378.0, 86.0, 1.0), point2d_im2(379.0, 83.0, 1.0);
00053   HomgPoint2D point2d_im1(407.0, 100.0, 1.0), point2d_im2(419.0, 90.0, 1.0);
00054   HomgPoint2D ptl, ptr;
00055   //HomgPoint3D p3, p3d_real(11.40732193, -30.37988853, 81.99732971);
00056   HomgPoint3D p3, p3d_real(5.087403297, -8.891034126, 26.40314484);
00057   Matrix3x3<double> cov;
00058   double dist, angle;
00059   Triangulation triangulator;
00060   cerr <<"projecting "<<p3d_real<<" with pleft and pright: "<<endl;
00061   ptl = pleft * p3d_real;
00062   ptl.Homogenize();
00063   cerr << "left: "<< ptl << endl;
00064
00065   ptr = pright * p3d_real;
00066   ptr.Homogenize();
00067   cerr << "right: "<< ptr << endl;
00068
00069   cerr <<endl<< "triangulating from \n"<<point2d_im1<<"\nP: "<<pleft<<endl
00070        <<point2d_im2<<"\nP: "<<pright<<endl;
00071   if (triangulator.Triangulate2D(pleft, pright,  point2d_im1,  point2d_im2,
00072                                p3, cov, dist, angle)!=0){
00073     cerr << "error triangulating using GetNormRayWorldCoo"<<endl;
00074   } else {
00075     cerr << "triangulated: "<<p3<<"\n with covariance matrix: "<<cov
00076          <<"\ndistance: "<<dist<<"\tangle: "<<angle<<endl;
00077   }
00078
00079   cerr <<endl<< "triangulating with svd from points \n"<<point2d_im1<<"\nP: "
00080        <<pleft<<endl<<point2d_im2<<"\nP: "<<pright<<endl;
00081   if (triangulator.Triangulate(pleft, pright, point2d_im1,  point2d_im2,
00082                                p3)!=0){
00083     cerr << "error triangulating using GetNormRayWorldCoo"<<endl;
00084   } else {
00085     cerr << "triangulated: "<<p3<<endl;
00086   }
00087
00088
00089   cerr <<endl<<"triangulating from theoretical points \n"<<ptl<<"\nP: "
00090        <<pleft<<endl <<point2d_im2<<"\nP: "<<ptr<<endl;
00091   if (triangulator.Triangulate2D(pleft, pright,  ptl,  ptr,
00092                                  p3, cov, dist, angle)!=0){
00093     cerr << "error triangulating using GetNormRayWorldCoo"<<endl;
00094   } else {
00095     cerr << "triangulated: "<<p3<<"\n with covariance matrix: "<<cov
00096          <<"\ndistance: "<<dist<<"\tangle: "<<angle<<endl;
00097   }
00098
00099
00100   return 0;
00101 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulate.cpp Source File

Geometry » Examples

ExampleTriangulate.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Geometry/Triangulation.hh>
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Geometry/KMatrix.hh>
00029 #include "Geometry/CovMatrix3x3.hh"
00030 #include <fstream>
00031 #include <iostream>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 //int main(int argc, char *argv[])
00037 int main()
00038 {
00039   PMatrix pleft,pleftScale,pleftScaleTriang,pright,prightScale,prightScaleTriang;
00040   ifstream infileL("left.matrix");
00041   ifstream infileR("right.matrix");
00042
00043   HomgPoint2D pl, pr;
00044   HomgPoint3D p3, p3s, p32, p32s;
00045   CovMatrix3x3 cov;
00046   Triangulation triangulator;
00047
00048   //  triangulator.SetDebugLevel(D_TR_POS|D_TR_TR);
00049
00050   RMatrix rleft, rright, Rscale;
00051   KMatrix K;
00052   Vector3<double> Cleft,CleftScaleShift, Cright, CrightScaleShift;
00053   rleft.SetXYZ(0.0, 0.0, 0.0);
00054   rright.SetXYZ(0.0, 0.0, 0.0); Rscale.SetXYZ(0.4, 0.0, 0.0);
00055   K.SetIdentity();
00056   K[0][0]=K[1][1]=480;
00057   K[0][2]=640/2.0;
00058   K[1][2]=480/2.0;
00059   Cleft.Set(0.0, 0.0, 0.0);
00060   Cright.Set(2.5, 0.0, -5.0);
00061   pleft.Compose(K, rleft, Cleft);
00062   pright.Compose(K, rright, Cright);
00063
00064   double scale = 10.0;
00065   Vector3<double> shift(1.0, 1.0, 1.0);
00066   CleftScaleShift=scale*Cleft;
00067   CleftScaleShift +=shift;
00068   CrightScaleShift=scale*Cright;
00069   CrightScaleShift+=shift;
00070   pleftScale.Compose(K, Rscale, CleftScaleShift);
00071   pleftScaleTriang.Compose(K,Rscale.Transpose()*Rscale,Rscale.Transpose()*(CleftScaleShift-shift)/scale);
00072   prightScale.Compose(K, Rscale, CrightScaleShift);
00073   prightScaleTriang.Compose(K,Rscale.Transpose()*Rscale,Rscale.Transpose()*(CrightScaleShift-shift)/scale);
00074
00075   pleft.InvalidateDecomposition();
00076   pleftScale.InvalidateDecomposition();
00077   pright.InvalidateDecomposition();
00078   if (infileL) infileL>>pleft;
00079   if (infileR) infileR>>pright;
00080   cout<<"Read:"<<endl<<pleft<< endl <<pleftScale<<endl<<pright<<endl;
00081   srand(0);
00082   for (int i = 0; i <=5; i++){
00083     // 3D point
00084     BIAS::HomgPoint3D point3d;
00085     for (int k=0; k<3; k++)
00086       // point coordinate between 0 and 1000
00087       point3d[k]=10.0*rand()/(RAND_MAX+1.0)-5;
00088     point3d[2]+=6;
00089     point3d[3]=1;
00090     // project the point3d to get its image
00091     BIAS::HomgPoint2D point2d_im1(pleft*point3d),
00092       point2d_im1s(pleftScale*point3d);
00093     BIAS::HomgPoint2D point2d_im2(pright*point3d),
00094       point2d_im2s(prightScale*point3d);
00095     point2d_im1.Homogenize();point2d_im1s.Homogenize();
00096     point2d_im2.Homogenize();point2d_im2s.Homogenize();
00097     // add up to 1 pixel  noise
00098     //point2d_im1 = (rand()/(RAND_MAX+1.0)*2.0-1.0) + point2d_im1;
00099     //point2d_im2 = (rand()/(RAND_MAX+1.0)*2.0-1.0) + point2d_im2;
00100     //point2d_im1[2]=1.0;  point2d_im2[2]=1.0;
00101     //cerr << "point left: "<< point2d_im1 << "\tpoint right: "<< point2d_im2
00102     //     << endl;
00103     if (triangulator.Triangulate(pleft, pright,  point2d_im1,  point2d_im2,
00104                                  p3)!=0){
00105       cerr << "error triangulating using SVD"<<endl;
00106     }
00107     cout << "p3 =" << p3;
00108     triangulator.Triangulate(pleftScaleTriang, prightScaleTriang,
00109                              point2d_im1s, point2d_im2s, p3s);
00110     Vector3<double> vp3s(p3s[0]/p3s[3], (p3s[1]/p3s[3]), p3s[2]/p3s[3]);
00111     vp3s = Rscale*vp3s*scale+shift;
00112     cout << "p3 with scaled, rot baseline= " <<   p3s <<  ", vp3s = "
00113          << vp3s << endl;
00114     cout << "error is [" << (vp3s[0]-p3[0])/p3[0] << ", " << (vp3s[1]-p3[1])/p3[1]
00115          << ", " <<(vp3s[2]-p3[2])/p3[2] << "] " << endl;
00116     /*
00117        if (triangulator.Triangulate2D(pleft, pright,  point2d_im1,  point2d_im2,
00118        p32, dist, angle)!=0){
00119        cerr << "error triangulating using GetNormRayWorldCoo"<<endl;
00120        }
00121        cout << "p32 =" << p32;
00122
00123        triangulator.Triangulate2D(pleftScale, prightScale,  point2d_im1,  point2d_im2,
00124        p32s, dist, angle);
00125        cout << "p32 with scaled rot baseline= " <<   p32s << endl;
00126        p32[1]=p32s[1]-10;
00127        p32s =  Vector3<double>(Rscale.Transpose()*p32s);
00128        cout << "scale is [" << p32s[0]/p32[0] << ", " << p32s[1]/p32[1] << ", "
00129        << p32s[2]/p32[2] << "] " << endl;
00130        cerr <<"SVD      point3d: "<<point3d<<" \tp3:"<<p3<<"\tdifference: "
00131        <<(point3d-p3).norm_L2()<<endl;;
00132        cerr <<"NormRay  point3d: "<<point3d<<" \tp3:"<<p32<<"\tdifference: "
00133        <<(point3d-p32).norm_L2()<<endl<<endl;
00134        if (triangulator.GetCovarianceAnalytic(pleft, pright,
00135        point2d_im1,  point2d_im2,
00136        p3, cov, 1)!=0) {
00137        cerr << "error getCovariance"<<endl;
00138        }
00139        cerr<<"CovMatrix:<<"<<cov<<endl;
00140     */
00141   }
00142
00143   pl.Set(196, 100);
00144   pr.Set(155, 101);
00145
00146   cout<<"Now triangulation of:"<<pl<<" "<<pr<<endl;
00147
00148   cout<<"result of Triangluation: "<<
00149     triangulator.Triangulate(pleft, pright, pl, pr, p3)<<endl;
00150
00151   cout<<"p3: "<<p3<<endl;
00152   //  cout<<"Covariance Matrix: "<<endl<<cov<<endl;
00153   //  cout<<"distance of rays: "<<dist<<endl;
00154
00155   Vector3<double> a1,a2, b1,b2;
00156   a1[0]= 0; a2[0]= 0;
00157   a1[1]= 0; a2[1]= 0;
00158   a1[2]= 0; a2[2]= 1;
00159
00160   b1[0]= 0; b2[0]= 1;
00161   b1[1]= 1; b2[1]= 1;
00162   b1[2]= 0; b2[2]= 0;
00163
00164   cout<<"Interscection of: a and b:"<<
00165     triangulator.Intersect(a1,a2,b1,b2)<<endl;
00166
00167   cout<<"Interscection of: b and a:"<<
00168     triangulator.Intersect(b1,b2,a1,a2)<<endl;
00169   return 0;
00170 }
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/ExampleTriangulateOptimal.cpp Source File

Geometry » Examples

ExampleTriangulateOptimal.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Geometry/Triangulation.hh>
00027 #include <Base/Math/Random.hh>
00028 #include <Base/Debug/TimeMeasure.hh>
00029 #include <Base/Geometry/RMatrixBase.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 /** @author woelk 08/2004 */
00035 int main(int argc, char *argv[])
00036 {
00037   Triangulation tri;
00038   //  tri.AddDebugLevel(D_TR_OPT);
00039   Random ran;
00040   KMatrix K;
00041   RMatrixBase R0, R1;
00042   PMatrix P0, P1;
00043   Vector3<double> C0, C1, r0, r1;
00044   HomgPoint3D p3d, tp3d;
00045   HomgPoint2D p0, p1, gtp0, gtp1, np0, np1;
00046   double sigma=2.5;
00047   int num=100, nump=10; // test num times
00048   bool read=false, finished=false;
00049   double osum=0.0, ksum=0.0, ssum=0.0, osum2=0.0, ksum2=0.0, ssum2=0.0;
00050   int onum=0, knum=0, snum=0;
00051
00052   TimeMeasure ot, kt, st;
00053
00054   if (argc==2) {
00055     read=true;
00056   }
00057   if (read){
00058     tri.AddDebugLevel(D_TR_OPT);
00059     num=1;
00060   }
00061
00062   K.SetIdentity();
00063   K[0][0]=K[1][1]=840.0;
00064   K[0][2]=320.0;
00065   K[1][2]=240.0;
00066
00067   for (int p=0; p<nump; p++){
00068     r0.Set(ran.GetNormalDistributed(0.0, 0.1),
00069            ran.GetNormalDistributed(0.0, 0.1),
00070            ran.GetNormalDistributed(0.0, 0.1));
00071     r1.Set(ran.GetNormalDistributed(0.0, 0.5),
00072            ran.GetNormalDistributed(0.0, 0.5),
00073            ran.GetNormalDistributed(0.0, 0.5));
00074
00075     R0.SetXYZ(r0);
00076     R1.SetXYZ(r1);
00077
00078     C0.Set(ran.GetNormalDistributed(0.0, 0.1),
00079            ran.GetNormalDistributed(0.0, 0.1),
00080            ran.GetNormalDistributed(0.0, 0.1));
00081     C1.Set(ran.GetNormalDistributed(1.0, 0.1),
00082            ran.GetNormalDistributed(0.0, 0.1),
00083            ran.GetNormalDistributed(0.0, 0.1));
00084
00085
00086     if (read){
00087       ifstream is(argv[1]);
00088       is >> K >> R0 >> R1 >> C0 >> C1 >> np0 >> np1 >> p3d >> gtp0 >> gtp1;
00089       is.close();
00090       cout << K << R0 << R1 << C0 << C1 << np0 << np1 << p3d<<gtp0<<gtp1<<endl;
00091     }
00092
00093     P0.Compose(K, R0, C0);
00094     P1.Compose(K, R1, C1);
00095     P0.InvalidateDecomposition();
00096     P1.InvalidateDecomposition();
00097
00098     for (int i=0; i<num; i++){
00099       p3d.Set(ran.GetUniformDistributed(-5.0, 5.0),
00100               ran.GetUniformDistributed(-5.0, 5.0),
00101               ran.GetUniformDistributed(4.0, 10.0));
00102       gtp0=P0*p3d;
00103       gtp1=P1*p3d;
00104
00105       gtp0.Homogenize();
00106       gtp1.Homogenize();
00107
00108       if (num<5){
00109         cout << "\ntrue 3d point                                 : "<<p3d<<endl;
00110         cout << "true correspondences                  : "<<gtp0<<" <--> "<<gtp1<<endl;
00111       }
00112
00113       if (read){
00114         p0=np0;
00115         p1=np1;
00116       } else {
00117         p0=gtp0;
00118         p1=gtp1;
00119         p0[0]+=ran.GetNormalDistributed(0.0, sigma);
00120         p0[1]+=ran.GetNormalDistributed(0.0, sigma);
00121         p1[0]+=ran.GetNormalDistributed(0.0, sigma);
00122         p1[1]+=ran.GetNormalDistributed(0.0, sigma);
00123         np0=p0;
00124         np1=p1;
00125       }
00126
00127       if (num<5){
00128         cout << "noisy correspondences (sigma = "<<setw(5)<<sigma<<") : "<<p0<<" <--> "
00129              <<p1<<endl;
00130       }
00131       ot.Start();
00132       if (tri.Optimal(P0, P1, p0, p1, tp3d)==0){
00133         ot.Stop();
00134         if (num<5){
00135           if (tri.DebugLevelIsSet(D_TR_OPT)){
00136             cout << "true 3d point                                 : "<<p3d<<endl;
00137             cout << "true correspondences                  : "<<gtp0<<" <--> "<<gtp1<<endl;
00138             cout << "noisy correspondences (sigma = "<<setw(5)<<sigma<<") : "<<np0<<" <--> "
00139                  <<np1<<endl;
00140           }
00141           cout << "corrected correspondences             : "<<p0<<" <--> "<<p1<<endl;
00142           p0=P0*tp3d; p0.Homogenize();
00143           p1=P1*tp3d; p1.Homogenize();
00144           cout << "projected triangulated point          : "<<p0<<" <--> "<<p1<<endl;
00145           cout << "optimal triangulated 3D point                 : "<<tp3d<<endl;
00146
00147
00148         }
00149         cout << "optimal euclidean dist. in 3D : "<<(tp3d-p3d).NormL2()
00150              <<"\teucl. dist in images: "<<(np0-p0).NormL1()<<"  "
00151              <<(np1-p1).NormL1()<<endl;
00152         osum+=(tp3d-p3d).NormL2();
00153         osum2+=(tp3d-p3d).NormL2()*(tp3d-p3d).NormL2();
00154         onum++;
00155         if ((tp3d-p3d).NormL2()>1.0){
00156           cout << K << R0 << R1 << C0 << C1 << np0 << np1<<p3d<<gtp0<<gtp1<<endl;
00157           ofstream of("deb.txt");
00158           of << K << R0 << R1 << C0 << C1 << np0 << np1 << p3d<<gtp0<<gtp1<<endl;
00159           of.close();
00160           //         finished=true;
00161           //         /*
00162           //           ifstream is("deb.txt");
00163           //           is >> K >> R0 >> R1 >> C0 >> C1 >> np0 >> np1 >> p3d >> gtp0 >> gtp1;
00164           //           is.close();
00165           //           cout << K << R0 << R1 << C0 << C1 << np0<<np1<<p3d<<gtp0<<gtp1<<endl;
00166           //         */
00167         }
00168       } else {
00169         ot.Stop();
00170         cout << "optimal triangulation failed\n";
00171       }
00172
00173       p0=np0;
00174       p1=np1;
00175       kt.Start();
00176       if (tri.Triangulate(P0, P1, p0, p1, tp3d)>=0){
00177         kt.Stop();
00178         if (num<5){
00179           cout << "kanatani triangulated 3D point                : "<<tp3d<<endl;
00180         }
00181         cout << "kanatani euclidean dist. in 3D: "<<(tp3d-p3d).NormL2()<<endl;
00182         ksum+=(tp3d-p3d).NormL2();
00183         ksum2+=(tp3d-p3d).NormL2()*(tp3d-p3d).NormL2();
00184         knum++;
00185       } else {
00186         kt.Stop();
00187         cout << "kanatani triangulation failed\n";
00188       }
00189
00190       p0=np0;
00191       p1=np1;
00192       double dist, ang;
00193       st.Start();
00194       if (tri.Triangulate2D(P0, P1, p0, p1, tp3d, dist, ang)==0){
00195         st.Stop();
00196         if (num<5){
00197           cout << "2D triangulated 3D point                      : "<<tp3d<<endl;
00198         }
00199         cout << "2D euclidean dist. in 3D      : "<<(tp3d-p3d).NormL2()<<"\tdist: "
00200              <<dist<<"\tang: "<<ang<<endl;
00201         ssum+=(tp3d-p3d).NormL2();
00202         ssum2+=(tp3d-p3d).NormL2()*(tp3d-p3d).NormL2();
00203         snum++;
00204       } else {
00205         st.Stop();
00206         cout << "2D triangulation failed\n";
00207       }
00208       if (finished) return -1;
00209
00210     }
00211   }
00212   if (onum>1 && knum>1 && snum>1){
00213     cout << "optimal calculated "<<onum<<" times with mean error "
00214          <<osum/(double)onum<<" +- "
00215          << (osum2-(osum*osum)/(double)onum)/(double)(onum-1.0)
00216          << "\t"<< ot.GetRealTime()/(double)onum<<" us "<<endl;
00217     cout << "kanatani calculated "<<knum<<" times with mean error "
00218          <<ksum/(double)knum<<" +- "
00219          << (ksum2-(ksum*ksum)/(double)knum)/(double)(knum-1.0)
00220          << "\t"<< kt.GetRealTime()/(double)knum<<" us "<<endl;
00221     cout << "2D  calculated "<<snum<<" times with mean error "
00222          <<ssum/(double)snum<<" +- "
00223          << (ssum2-(ssum*ssum)/(double)snum)/(double)(snum-1.0)
00224          <<"\t"<< st.GetRealTime()/(double)snum<<" us "<<endl;
00225   }
00226
00227
00228   return 0;
00229 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleUndistort.cpp Source File

Image » Examples

ExampleUndistort.cpp

Go to the documentation of this file.
00001
00002 #include <bias_config.h>
00003
00004 #ifndef BIAS_HAVE_XML2
00005 #  error You need XML2 to compile this code. Please enable USE_XML2 and recompile BIAS.
00006 #endif // BIAS_HAVE_XML2
00007
00008
00009 #include <Image/CameraParam.hh>
00010 #include <Image/UndistortionMapping.hh>
00011 #include <Image/MatlabTBUndistortion.hh>
00012 #include <Base/Image/ImageIO.hh>
00013 #include <iostream>
00014
00015 using namespace BIAS;
00016 using namespace std;
00017
00018
00019
00020 int main(int argc, char** argv )
00021 {
00022   if (argc<2 ) {
00023     cout <<"Usage: ExampleUndistort <image>"<<endl;
00024     exit(1);
00025   }
00026   CameraParam cp;
00027   UndistortionMapping<unsigned char, unsigned char> um;
00028
00029   Image<unsigned char> src, dst, dst2, dstum, dstum2;
00030   // double xDst, yDst;
00031   string camfile = "MuseumNorwayCam.xml";
00032   cp.ReadCameraData(camfile);
00033   if (cp.IsInitialized() && cp.IsPerspective()) {
00034     cout << camfile << " used for initialization." << endl;
00035     um.SetCameraParam(cp);
00036   } else {
00037     cout << "Error: could not read camera data file or no perspective lens!"
00038       << endl;
00039     BIASABORT;
00040   }
00041
00042   // source image is distorted
00043   if (argc>1) {
00044     if (ImageIO::Load(argv[1], src)!=0){
00045       BIASERR("error loading image "<<argv[1]);
00046       return -1;
00047     }
00048   }
00049
00050   um.UndistortPerspImage(src,dstum);
00051   ImageIO::Write("UndistortedImage", dstum);
00052   cout << " created: "<<"UndistortedImage.mip"<<endl;
00053
00054   um.DistortPerspImage(dstum,dstum2);
00055   ImageIO::Write("RedistortedImage.pgm", dstum2);
00056   cout << " created: "<<"RedistortedImage.mip"<<endl;
00057
00058   return 0;
00059 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleUnscentedTransform.cpp Source File

MathAlgo » Examples

ExampleUnscentedTransform.cpp

Go to the documentation of this file.
00001 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
00002
00003 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00004   Multimediale Systeme der Informationsverarbeitung
00005   Institut fuer Informatik
00006   Christian-Albrechts-Universitaet Kiel
00007
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #include <MathAlgo/UnscentedTransform.hh>
00025 #include <Base/Math/Random.hh>
00026
00027 using namespace BIAS;
00028 using namespace std;
00029
00030 Matrix<double> T;
00031
00032 void MyConstTransform(const Vector<double>& src, Vector<double>& dst)
00033 {
00034   const int dim = src.Size();
00035   T.newsize(dim, dim);
00036   T.SetIdentity();
00037   dst = T * src;
00038 }
00039
00040 void MyLinTransform(const Vector<double>& src, Vector<double>& dst)
00041 {
00042   const int dim = src.Size();
00043   T.newsize(dim, dim);
00044   const double c[] = { 1.0, 2.0, 0.0 };
00045   const int numc = 3;
00046   const int num = dim*dim;
00047   for (int i=0; i<num; i++){
00048     T.GetData()[i] = c[i%numc];
00049   }
00050   dst = T * src;
00051 }
00052
00053 void MySqTransform(const Vector<double>& src, Vector<double>& dst)
00054 {
00055   //const double c[] = { 1.57, 3.14, 6.28 };
00056   const double c[] = { 1.0, 2.0, 0.0 };
00057   const int dim = src.Size();
00058   dst.newsize(dim);
00059   for (int i=0; i<dim; i++){
00060     dst[i] = c[0] + c[1] * src[i] + c[2] * src[i] * src[i];
00061   }
00062 }
00063
00064 class MyUnscentedTransform
00065   : public UnscentedTransform
00066 {
00067 public:
00068   MyUnscentedTransform() : UnscentedTransform() {
00069     /*AddDebugLevel(D_UT_TRANSFORM);
00070     AddDebugLevel(D_UT_PARAM);
00071     AddDebugLevel(D_UT_SIGMA_POINTS); */
00072   };
00073
00074   virtual ~MyUnscentedTransform() {};
00075
00076 protected:
00077
00078   virtual void Transform_(const Vector<double>& src,
00079                           Vector<double>& dst) const
00080   {
00081     MyLinTransform(src, dst);
00082     //MyConstTransform(src, dst);
00083   }
00084 };
00085
00086
00087
00088
00089
00090 int main(int /*argc*/, char ** /*argv*/)
00091 {
00092   Vector<double> src, dst, gt_dst;
00093   Matrix<double> src_cov, dst_cov, gt_dst_cov;
00094
00095   // generate src and src_cov using random number generator
00096   const int dim = 2;
00097   Random rand;
00098   src.newsize(dim);
00099   src_cov.newsize(dim, dim);
00100   for (int r=0; r<dim; r++){
00101     src[r] = rand.GetUniformDistributed(-10.0, 10.0);
00102     for (int c=r; c<dim; c++){
00103       src_cov[r][c] = src_cov[c][r] =
00104         rand.GetUniformDistributed(-1.0, 1.0);
00105     }
00106     src_cov = src_cov * src_cov;
00107   }
00108   /*src[0] = 1.0;
00109   src[1] = 2.0;
00110   src_cov[0][0] = 0.5;
00111   src_cov[1][1] = 0.75;
00112   src_cov[0][1] = src_cov[1][0] = 0.25; */
00113
00114
00115   cout << "src: "<<src<<endl;
00116   cout << "src_cov: "<<src_cov<<endl;
00117   MyUnscentedTransform mut;
00118   mut.SetBeta(2.0);
00119   mut.SetAlpha(0.001);
00120
00121
00122   mut.Transform(src, src_cov, dst, dst_cov);
00123   cout << "ut: dst: "<<dst<<endl;
00124   cout << "ut: dst_cov: "<<dst_cov<<endl;
00125
00126   MyLinTransform(src, gt_dst);
00127   //MyConstTransform(src, gt_dst);
00128   gt_dst_cov = T * src_cov * T.Transpose();
00129   cout << "T: "<<T<<endl;
00130   cout << "gt: dst: "<<gt_dst<<endl;
00131   cout << "gt: dst_cov: "<<gt_dst_cov<<endl;
00132
00133   cout << "diff: "<<(dst - gt_dst)<<endl;
00134   cout << "diff cov: "<<(dst_cov - gt_dst_cov)<<endl;
00135   return 0;
00136 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleUnVignette.cpp Source File

Image » Examples

ExampleUnVignette.cpp

Go to the documentation of this file.
00001
00002 #include <bias_config.h>
00003
00004 #include <Image/CameraParam.hh>
00005 #include <Image/UnVignette.hh>
00006 #include <Base/Image/ImageIO.hh>
00007 #include <iostream>
00008 #include <Base/Debug/TimeMeasure.hh>
00009
00010
00011 using namespace BIAS;
00012 using namespace std;
00013
00014
00015
00016 int main(int argc, char** argv )
00017 {
00018   if (argc<3 ) {
00019     cout <<"Usage: ExampleUnVignette <image> <CameraParam.xml>"<<endl;
00020     exit(0);
00021   }
00022
00023   BIAS::CameraParam cParam;
00024
00025   BIAS::Image<unsigned char> Image;
00026   BIAS::ImageIO::Load(argv[1],Image);
00027   int ret = cParam.ReadCameraData(argv[2]);
00028   if(ret < 0)
00029   {
00030     cout<<"Reading of CameraParams failed!"<<endl;
00031     exit(-1);
00032   }
00033   //parameter: CameraParam , useLuT
00034   BIAS::UnVignette unVig(cParam,LEAST_SQUARES);
00035   BIAS::TimeMeasure timer;
00036   timer.Start();
00037   unVig.Compute(Image);
00038   timer.Stop();
00039   timer.PrintUserTime();
00040   BIAS::ImageIO::Write("ExampleUnVignetted.mip",Image);
00041   cout<<"Output image written to ExampleUnVignetted.mip."<<endl;
00042   return 0;
00043 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Examples/ExampleUpsampleBy2Grey.cpp Source File

Filter » Examples

ExampleUpsampleBy2Grey.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Filter/Rescale.hh>
00030 #include <Base/Debug/TimeMeasure.hh>
00031
00032 #include <Base/Common/BIASpragma.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036 int main(int argc, char *argv[])
00037 {
00038
00039   cout<<"This example compares different upsampling methods for factor 2"
00040       <<endl;
00041
00042   if (argc<2){
00043     BIASERR(argv[0]<<" <image-file>");
00044     return -1;
00045   }
00046
00047   Image<unsigned char> im;
00048   if (ImageIO::Load(argv[1], im)!=0){
00049     BIASERR("error loading "<<argv[1]);
00050     return -2;
00051   }
00052   if (im.GetColorModel() != ImageBase::CM_Grey) ImageConvert::IP_ToGrey(im);
00053   Image<unsigned char> imbicubic(im.GetWidth()*2,im.GetHeight()*2,1);
00054   Image<unsigned char> imbilinear(im.GetWidth()*2,im.GetHeight()*2,1);
00055   Image<unsigned char> imnn(im.GetWidth()*2,im.GetHeight()*2,1);
00056
00057   // automatic
00058   Rescale<unsigned char, unsigned char> Upsampler;
00059   Upsampler.UpsampleBy2Grey(im, imnn, NearestNeighbour);
00060   Upsampler.UpsampleBy2Grey(im, imbilinear, Bilinear);
00061   Upsampler.UpsampleBy2Grey(im, imbicubic, Bicubic);
00062
00063   if (ImageIO::Write("image_bicubic_auto.mip", imbicubic)!=0){
00064     BIASERR("error writing cubic image");
00065     return -3;
00066   }
00067   if (ImageIO::Write("image_bilinear_auto.mip", imbilinear)!=0){
00068     BIASERR("error writing bilinear image");
00069     return -3;
00070   }
00071   if (ImageIO::Write("image_nearestneighbor_auto.mip", imnn)!=0){
00072     BIASERR("error writing bilinear image");
00073     return -3;
00074   }
00075
00076   imbicubic.SetZero();
00077   imbilinear.SetZero();
00078   // manual
00079   unsigned char **pDc = imbicubic.GetImageDataArray();
00080   unsigned char **pDb = imbilinear.GetImageDataArray();
00081
00082   double CurValue = 0;
00083   const unsigned int channelcount = im.GetChannelCount();
00084   for (unsigned int x=2; x<imbicubic.GetWidth()-6; x++) {
00085     for (unsigned int y=2; y<imbicubic.GetHeight()-6; y++) {
00086       for (unsigned int c=0; c<channelcount; c++) {
00087         CurValue = rint(im.BicubicInterpolation(double(x)*0.5,
00088                                                 double(y)*0.5, c));
00089         if (CurValue<0.0)CurValue = 0.0;
00090         if (CurValue>255.0)CurValue = 255.0;
00091         pDc[y][(x*channelcount)+c] = (unsigned char) CurValue;
00092         CurValue = rint(im.BilinearInterpolation(double(x)*0.5,
00093                                                  double(y)*0.5,
00094                                                  c));
00095         if (CurValue<0.0)CurValue = 0.0;
00096         if (CurValue>255.0)CurValue = 255.0;
00097         pDb[y][(x*channelcount)+c] = (unsigned char) CurValue;
00098       }
00099     }
00100   }
00101
00102   if (ImageIO::Write("image_bicubic.mip", imbicubic)!=0){
00103     BIASERR("error writing cubic image");
00104     return -3;
00105   }
00106   if (ImageIO::Write("image_bilinear.mip", imbilinear)!=0){
00107     BIASERR("error writing bilinear image");
00108     return -3;
00109   }
00110
00111   cout<<"Performing time measurements"<<endl;
00112   TimeMeasure b1,b2,b3;
00113   // warming up
00114   Upsampler.UpsampleBy2Grey(im, imbilinear, Bilinear);
00115   Upsampler.UpsampleBy2Grey(im, imbicubic, Bicubic);
00116   Upsampler.UpsampleBy2Grey(im, imnn, NearestNeighbour);
00117   unsigned int numberruns = 10;
00118   for (unsigned int i=0; i<numberruns; i++) {
00119     b1.Start();
00120     Upsampler.UpsampleBy2Grey(im, imbilinear, Bilinear);
00121     b1.Stop();
00122     b2.Start();
00123     Upsampler.UpsampleBy2Grey(im, imbicubic, Bicubic);
00124     b2.Stop();
00125     b3.Start();
00126     Upsampler.UpsampleBy2Grey(im, imnn, NearestNeighbour);
00127     b3.Stop();
00128   }
00129   cout<<"time nearest neighbor (real/user):"
00130       <<b3.GetRealTime()/double(numberruns)
00131       <<" "<<b3.GetUserTime()/double(numberruns)<<endl;
00132   cout<<"time bilinear (real/user):"<<b1.GetRealTime()/double(numberruns)
00133       <<" "<<b1.GetUserTime()/double(numberruns)<<endl;
00134   cout<<"time bicubic  (real/user):"<<b2.GetRealTime()/double(numberruns)
00135       <<" "<<b2.GetUserTime()/double(numberruns)<<endl;
00136
00137
00138   return 0;
00139 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/ExampleUUID.cpp Source File

Base » Image » Examples

ExampleUUID.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Image/UUID.hh>
00026 #include <fstream>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 //int main(int argc, char *argv[])
00032 int main()
00033 {
00034   // write 2 uuids to a file using << operator
00035   ofstream teststream("test.txt");
00036   BIAS::UUID testid = BIAS::UUID::GenerateUUID();
00037   BIAS::UUID testid2 = BIAS::UUID::GenerateUUID();
00038   cout <<"testid has size "<<sizeof(testid)<<endl;
00039
00040   cout << "Writing <"<<testid<<"> and  <"<<testid2 <<">"<<endl;
00041   teststream << testid << testid2;
00042   teststream.close();
00043
00044   // generate new uuid
00045   BIAS::UUID readid;
00046   readid = BIAS::UUID::GenerateUUID();
00047   cout << "Before reading: "<<readid<<endl;
00048   //(JW) getchar();
00049
00050   // read the written uuids
00051   ifstream testread("test.txt");
00052   testread >> readid;
00053   if (!readid.IsValid()) cout <<"Invalid!";
00054   cout << "After reading: "<<readid<<endl;
00055   testread >> readid;
00056   if (!readid.IsValid()) cout <<"Invalid!";
00057   cout << "After reading(2): "<<readid<<endl;
00058   return 0;
00059 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideofeedShm.cpp Source File

VideoSource » Examples

ExampleVideofeedShm.cpp

Go to the documentation of this file.
00001 #include <VideoSource/VideoSource_Base.hh>
00002 #include <VideoSource/VideoSource_Disk.hh>
00003 #include <VideoSource/VideoSource_Shm.hh>
00004
00005 #ifdef BIAS_HAVE_DCAM
00006 #  include <VideoSource/VideoSource_DCAM.hh>
00007 #endif // BIAS_HAVE_DCAM
00008
00009 #include <Image/Camera.hh>
00010 #include <iostream>
00011
00012 #include <VideoSource/VideoShMFeeder.hh>
00013
00014 using namespace std;
00015 using namespace BIAS;
00016
00017
00018 int main( int /*argc*/, char** /*argv*/)
00019 {
00020   VideoSource *cam;
00021   std::vector<std::string>  filenames;
00022   filenames.push_back("pic.mip");
00023
00024   cam = new VideoSource_Disk();
00025 //#ifdef BIAS_HAVE_DCAM
00026 //  cam = new VideoSource_DCAM();
00027 //#endif // BIAS_HAVE_DCAM
00028
00029   BIAS::Camera<unsigned char> pic;
00030   char title[100];
00031
00032   sprintf(title,"Sending Picture");
00033
00034   cam->OpenDevice(filenames);
00035   //cam->OpenDevice();
00036   cam->InitImage(pic);
00037   cam->PreGrab();
00038   cam->GrabSingle(pic);
00039   cout << "Image grab OK\n";
00040
00041   VideoShMFeeder ShMFeeder;
00042
00043   int i =0;
00044   while(i<10000){
00045     cam->GrabSingle(pic);
00046     ShMFeeder.ProcessImage(&pic);
00047     i++;
00048     cout <<i<<endl;
00049
00050   }
00051   cam->PostGrab();
00052
00053   cam->CloseDevice();
00054   delete cam;
00055   return 0;
00056 }
00057
00058
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoServer.cpp Source File

VideoSource » Examples

ExampleVideoServer.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Utils/Param.hh>
00003 #include <VideoSource/VideoServer.hh>
00004 #include <Base/Debug/TimeMeasure.hh>
00005
00006 using namespace std;
00007 using namespace BIAS;
00008
00009
00010 int main( int argc, char *argv[])
00011 {
00012   bool done = false;
00013   Param Params;
00014   TimeMeasure timer_;
00015   float fps;
00016   VideoServer vs(Params);
00017   Params.SetShortCommand("readconfig",'r');
00018   Params.SetShortCommand("writeconfig",'w');
00019   int optind = Params.ParseCommandLine(argc,argv);
00020   if (optind<0) {
00021     cout<<"Usage: "<<argv[0]<<" options"<<endl<<
00022       " by default all images in current dir are taken."<<endl;
00023     exit(1);
00024   }
00025   cout <<"Init class VideoServer"<<endl;
00026   if (vs.Init() <0) exit(1);
00027   cout <<"done"<<endl;
00028   int i=0,res=0;
00029   while(!done){
00030     timer_.Start();
00031     res=vs.ProcessOneImage();
00032
00033     if (res==1) usleep(500); // not yet connected
00034     timer_.Stop();
00035     fps = 1000000.0f / float( timer_.GetRealTime() );
00036     timer_.Reset();
00037     if (res==0) {
00038       unsigned int MessageSize = vs.GetMessageSize();
00039       float bw = (float)MessageSize* fps / 1024;
00040       cout <<"sent image "<<i<<" size: "<<MessageSize<<" fps: "<<fps
00041            <<" bandwidth: "<<bw<< " [kB/s]"<<endl;
00042       i++;
00043     }
00044   }
00045
00046   return 0;
00047 }
00048
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoSource_Net.cpp Source File

VideoSource » Examples

ExampleVideoSource_Net.cpp

Go to the documentation of this file.
00001 #include <VideoSource/VideoSource_Base.hh>
00002 #include <VideoSource/VideoSource_Net.hh>
00003 //#include <Gui/GuiGTK.hh>
00004 //#include <Gui/GuiEnhanced.hh>
00005 #include <Base/Image/ImageIO.hh>
00006 #include <Image/Camera.hh>
00007
00008 //BIAS::GuiEnhanced guie;
00009
00010 using namespace BIAS;
00011 using namespace std;
00012
00013 bool done = false;
00014 bool save = false;
00015 int imgNo = 0;
00016
00017
00018 int main( int argc, char *argv[])
00019 {
00020   VideoSource *cam;
00021   Camera<unsigned char> pic;
00022   cam = new VideoSource_Net;
00023   //  cam->SetDebugLevel(D_NET);
00024   // char c;
00025   int res;
00026   if (argc>1) {
00027       cout <<"Connecting server "<<argv[1]<<endl;
00028       res = cam->OpenDevice(argv[1]);
00029     if (res!=0)
00030       exit(-1);
00031   } else {
00032     cout<<"usage: "<<argv[0]<<" serverName"<<endl;
00033     exit(0);
00034   }
00035
00036   cam->InitImage(pic);
00037
00038   while(!done){
00039     cam->GrabSingle(pic);
00040     if (imgNo==0)
00041       cout <<"Got Image: "<<pic.GetWidth()<<"x"<<pic.GetHeight()<<"x"<<
00042         pic.GetChannelCount()<<endl;
00043
00044     if (imgNo%10==0) {
00045       char name[255];
00046       sprintf(name,"image_%04i.mip",imgNo);
00047       BIAS::ImageIO::Write(name,pic);
00048       cout<<"Written image:"<<name<<" to disk"<<endl;
00049     }
00050     imgNo++;
00051     if (imgNo==200) done=true;
00052   }
00053
00054   cam->CloseDevice();
00055
00056   delete cam;
00057   return 0;
00058 }
00059
00060
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/ExampleVideoSource_Shm.cpp Source File

VideoSource » Examples

ExampleVideoSource_Shm.cpp

Go to the documentation of this file.
00001 #include <VideoSource/VideoSource_Base.hh>
00002 #include <VideoSource/VideoSource_Shm.hh>
00003 //#include <Gui/GuiGTK.hh>
00004 //#include <Gui/GuiEnhanced.hh>
00005 #include <Base/Image/ImageIO.hh>
00006 #include <Image/Camera.hh>
00007 //BIAS::GuiEnhanced guie;
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 bool done = false;
00013 bool save = false;
00014 int imgNo = 0;
00015
00016
00017 int main( int argc, char *argv[])
00018 {
00019   VideoSource *cam;
00020   Camera<unsigned char> pic;
00021   cam = new VideoSource_Shm;
00022   cam->SetDebugLevel(D_NET);
00023   // char c;
00024   int res;
00025   if (argc>1) {
00026       cout <<"Using shared mem file: "<<argv[1]<<endl;
00027       res = cam->OpenDevice(argv[1]);
00028   }
00029   else res = cam->OpenDevice();
00030   if (res <0) exit(1);
00031   res = cam->PreGrab();
00032   if (res <0) exit(1);
00033   cam->InitImage(pic);
00034
00035   while(!done){
00036     cam->GrabSingle(pic);
00037     cout <<"Got Image: "<<pic.GetWidth()<<"x"<<pic.GetHeight()<<"x"<<
00038       pic.GetChannelCount()<<endl;
00039
00040       char name[255];
00041       sprintf(name,"image_%04i.mip",imgNo);
00042       BIAS::ImageIO::ExportImage(name,pic,ImageIO::FF_ppm);
00043     imgNo++;
00044     }
00045
00046
00047   cam->PostGrab();
00048   cam->CloseDevice();
00049
00050   delete cam;
00051   return 0;
00052 }
00053
00054
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/ExampleVideoStream.cpp Source File

Image » Examples

ExampleVideoStream.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Image/VideoStream.hh>
00003 using namespace std;
00004 using namespace BIAS;
00005
00006 int main(int argc, char *argv[])
00007 {
00008
00009   if (argc<2) {
00010     cout <<"Usage: "<<argv[0]<<" <filename>"<<endl;
00011     exit(1);
00012   }
00013
00014   VideoStream vs;
00015   if (vs.Open(argv[1]) <0) exit(1);
00016   vs.PrintHeader();
00017   vs.SplitIntoFiles("VSExport-");
00018
00019   return 0;
00020 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ExampleVRMLOutProjection.cpp Source File

Utils » Examples

ExampleVRMLOutProjection.cpp

Go to the documentation of this file.
00001 #include <Utils/ThreeDOut.hh>
00002 #include <Geometry/Projection.hh>
00003 #include <iostream>
00004
00005 using namespace std;
00006 using namespace BIAS;
00007
00008 int main(int argc, char* argv[])
00009 {
00010   if(argc<3) {
00011     cout<<"usage:\n";
00012     cout<<argv[0]<<" <projectionFile.xml> <ouputFile>\n";
00013     return -1;
00014   }
00015
00016
00017   Projection P;
00018   if(P.XMLRead(argv[1])!=0) {
00019     cout<<"could not read projection file!\n";
00020     return -1;
00021   }
00022
00023   if(P.GetParameters() == NULL) {
00024     cout<<"Fatal error generating projection object!\n";
00025     return -1;
00026   }
00027
00028   ThreeDOut vrmlWriter;
00029   vrmlWriter.AddProjection(P, RGBAuc(0, 255, 0, 0));
00030
00031   vrmlWriter.VRMLOut(argv[2]);
00032
00033   cout<<"finished\n";
00034
00035   return 0;
00036 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/ExampleWeightedLinearLeastSquares.cpp Source File

MathAlgo » Examples

ExampleWeightedLinearLeastSquares.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "MathAlgo/Lapack.hh"
00027 #include "Base/Math/Matrix.hh"
00028 #include "Base/Math/Vector.hh"
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 //int main(int argc, char *argv[])
00034 int main()
00035 {
00036   int res;
00037   Matrix<double> A(3, 3), B(3, 3);
00038   Vector<double> b(3), x;
00039
00040   A.SetIdentity();
00041   B.SetIdentity();
00042   b[0]=2.0; b[1]=3.0; b[2]=16.0;
00043
00044   x = ::Lapack_WLLS_solve(A, b, B, res);
00045
00046   return res;
00047 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleXMLBase.cpp Source File

Base » Common » Examples

ExampleXMLBase.cpp

Go to the documentation of this file.
00001 #include <Base/Common/XMLIO.hh>
00002 #include <Base/Debug/Debug.hh>
00003 #include <Base/Common/XMLBase.hh>
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008 // ############### this is the test class with xml support ###############
00009
00010 #define  VERSIONOFTESTCLASS 0.37
00011
00012 class myTestClass: public XMLBase, Debug {
00013 public:
00014   virtual int XMLGetClassName(string& TopLevelTag, double& Version) const;
00015   virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00016   virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00017   virtual ~myTestClass();
00018   int thedata;
00019 };
00020
00021 // ################## implementation (virtual functions)  ##################
00022
00023 myTestClass::~myTestClass() {}
00024
00025 int myTestClass::XMLGetClassName(std::string& TopLevelTag,
00026                                     double &Version) const {
00027   TopLevelTag = "myTestClass";
00028   Version = VERSIONOFTESTCLASS;
00029   return 0;
00030 }
00031
00032 int myTestClass::XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const {
00033   XMLObject.addAttribute(Node, "theData", thedata);
00034   return 0;
00035 }
00036
00037
00038 int myTestClass::XMLIn(const xmlNodePtr Node, XMLIO& XMLObject) {
00039   thedata = XMLObject.getAttributeValueInt(Node, "theData");
00040   return 0;
00041 }
00042
00043 // ########################## a small example program #######################
00044
00045 int main (int /*argc*/, char ** /*argv*/)
00046 {
00047   // output
00048   myTestClass x, y;
00049   x.thedata = 42;
00050   x.XMLWrite("backupofx.xml");
00051
00052   // input
00053   y.XMLRead("backupofx.xml");
00054
00055   // check result
00056   int result(0);
00057   if (x.thedata == y.thedata)
00058     result=0;
00059   else
00060     result=-1;
00061
00062   cout
00063     <<"x.thedata="<<x.thedata<<endl
00064     <<"y.thedata="<<y.thedata <<endl
00065     <<"result="<<result<<endl;
00066   return result;
00067 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/Examples/ExampleXMLIO.cpp Source File

Base » Common » Examples

ExampleXMLIO.cpp

Go to the documentation of this file.
00001 #include <Base/Common/XMLIO.hh>
00002
00003 using namespace BIAS;
00004 using namespace std;
00005
00006 int main (int /*argc*/, char** /*argv*/)
00007 {
00008   // *****************************************
00009   // Write a new XML-File
00010   // *****************************************
00011
00012   // remember some node pointers
00013   xmlNodePtr rootNode;
00014   xmlNodePtr currentNode2;
00015   xmlNodePtr currentNode3;
00016
00017   // create an instance of XMLIO and initialize it with a new XML-File
00018   XMLIO myXML;
00019
00020  // root node is named "XMLTest"
00021   rootNode = myXML.create("XMLTest");
00022
00023   // set some nodes and attributes
00024   currentNode2 = myXML.addChildNode(rootNode, "Child1");
00025
00026   myXML.addAttribute(currentNode2, "Attrib1", std::string("1234") );
00027   myXML.addAttribute(currentNode2, "Attribute2", std::string("4321.1234") );
00028   myXML.addAttribute(currentNode2, "NextAttribute", std::string("Content of attribute 3") );
00029   myXML.addContent(currentNode2,
00030     std::string("The content of a node is written between the opening and closing tag.") );
00031
00032   currentNode3 = myXML.addChildNode(currentNode2, "ChildOfChild1");
00033   myXML.addAttribute(currentNode3, "AttributeOfChildOfChild1", std::string("FULL") );
00034   myXML.addContent(currentNode3, "myContent");
00035
00036   currentNode2 = myXML.addChildNode(rootNode, "Child2");
00037
00038   // results in an Error: Blanks or special chars  not allowed in node
00039   // and attribute names
00040   myXML.addAttribute(currentNode2, "my Attribute", std::string("will produce an error") );
00041   currentNode2 = myXML.addChildNode(rootNode, "Child 3");
00042   currentNode2 = myXML.addChildNode(rootNode, "Child'3");
00043
00044   // OK again...
00045   currentNode2 = myXML.addChildNode(rootNode, "ThisIsChild3");
00046   myXML.addAttribute(currentNode2, "Roundness", std::string("Child 3 is very round") );
00047   myXML.addContent(currentNode2, "Just some content");
00048
00049   // write the whole predefined structure
00050   myXML.write("test.xml");
00051
00052   // ********************************************************************
00053   // now clear the whole thing and read it again
00054
00055   xmlAttrPtr currAttr;
00056
00057   myXML.clear();
00058
00059   rootNode = myXML.read("test.xml");
00060   if (rootNode == NULL) {
00061     cout << "PARSING ERROR! Exiting XML-sample program...." << endl;
00062     return 0;
00063   }
00064
00065   // Process the complete tree using loops
00066   currentNode2 = myXML.getFirstChild(rootNode);
00067
00068   while (currentNode2!=NULL) {
00069
00070     cout << endl << myXML.getNodeName(currentNode2) << endl;
00071     cout << "   Cont.: '" << myXML.getNodeContentString(currentNode2) << "'" << endl;
00072
00073     currAttr = myXML.getFirstAttribute(currentNode2);
00074     while (currAttr!=NULL) {
00075       cout << "   Attr.: " << myXML.getAttributeName(currAttr) <<
00076         " = '" << myXML.getAttributeValueString(currAttr) << "'" << endl;
00077       currAttr = myXML.getNextAttribute();
00078     }
00079
00080     // only depth 2 -> too lazy for recursion
00081     currentNode3 = myXML.getFirstChild(currentNode2);
00082
00083     while (currentNode3!=NULL) {
00084       cout << endl << "   Child: " << myXML.getNodeName(currentNode3) << endl;
00085       cout << "   Child Cont.: '" << myXML.getNodeContentString(currentNode3) << "'"
00086            << endl;
00087
00088       currAttr = myXML.getFirstAttribute(currentNode3);
00089       while (currAttr!=NULL) {
00090         cout << "   Child Attr.: " << myXML.getAttributeName(currAttr) <<
00091           " = '" << myXML.getAttributeValueString(currAttr) << "'" << endl;
00092         currAttr = myXML.getNextAttribute();
00093       }
00094       currentNode3 = myXML.getNextChild();
00095     }
00096
00097     currentNode2 = myXML.getNextChild(currentNode2);
00098   }
00099
00100   // distinct access to specific Nodes and Attributes
00101   cout << endl << endl << "Distinct Access:" << endl;
00102
00103   currentNode2 = myXML.getChild(rootNode, "ThisIsChild3");
00104   if (currentNode2!=NULL) {
00105     cout << "'Roundness' of 'ThisIsChild3': " <<
00106       myXML.getAttributeValueString(currentNode2, "Roundness") << endl;
00107   }
00108
00109   currentNode2 = myXML.getChild(rootNode, "Child1");
00110   if (currentNode2!=NULL) {
00111     cout << "'Attrib1' of 'Child1': " <<
00112       myXML.getAttributeValueInt(currentNode2, "Attrib1") << endl;
00113     cout << "'Attribute2' of 'Child1': " <<
00114       myXML.getAttributeValueDouble(currentNode2, "Attribute2") << endl;
00115   }
00116
00117   return 0;
00118
00119 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Exception.hh Source File

Base » Debug

Exception.hh

Go to the documentation of this file.
00001 #ifndef _Exception_hh_
00002 #define _Exception_hh_
00003
00004 #include <exception>
00005 #include <sstream>
00006 #include <iostream>
00007
00008 #ifdef WIN32
00009 /** disable vc++ .net warning 4290 stating that exception types are not
00010     checked */
00011 /// \todo never disabled warnign in headers because of teh global side effect (jw)
00012 #  pragma warning( disable : 4290 )
00013 #endif
00014
00015 namespace BIAS {
00016
00017   /** macro throwing a BaseException using stream as argument,
00018       i.e. BEXCEPTION("variable 'a' has content "<<a) */
00019 #define BEXCEPTION(arg)\
00020   { \
00021     std::ostringstream os;\
00022     os << __FILE__ << ":" << __LINE__ <<" : "<< arg;\
00023     throw BIAS::BaseException(os.str().c_str());\
00024   }
00025
00026   /** @class BaseException
00027       @brief generic exception
00028       @author woelk 01/2006 */
00029   class BaseException
00030     : public std::exception
00031   {
00032   public:
00033     BaseException(const char *error_message) throw()
00034     {
00035       Message_ = error_message;
00036       std::cerr << "exception raised: \""<<Message_<<"\"\n";
00037     }
00038
00039     ~BaseException() throw() {};
00040
00041     /** Returns a C-style character string describing the general cause
00042         of the current error.  */
00043     virtual const char* What() const throw()
00044     { return Message_.c_str(); }
00045
00046   protected:
00047     std::string Message_;
00048   };
00049
00050 } // namespace
00051
00052 #endif // _Exception_hh_
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ExifTag.cpp Source File

Base » Image

ExifTag.cpp

Go to the documentation of this file.
00001 #include "ExifTag.hh"
00002
00003 using namespace std;
00004 using namespace BIAS;
00005
00006 std::ostream& ExifTag::Print(std::ostream& os) const
00007 {
00008   if (value!=""){
00009     os<<"ExifTag id="<<id<<", \tname="<<name<<" \tvalue="<<value;
00010   } else {
00011     os<<"ExifTag id="<<id<<", \tname="<<name<<" \tvalue -EMPTY- ";
00012   };
00013   return os;
00014 }
00015
00016 bool ExifTag::GoodValue(const std::string &val) const
00017 {
00018   return (!(
00019         (val=="")
00020         ||(val==".")
00021         ||(val=="unknown")
00022         ));
00023 }
00024
00025 std::ostream& operator<<(std::ostream& os,
00026              const BIAS::ExifTag &tag)
00027 {
00028   //os<<"ExifTag id="<<tag.id<<", \tname="<<tag.name<<" \tvalue="<<tag.value;
00029   return tag.Print(os);
00030 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ExifTag.hh Source File

Base » Image

ExifTag.hh

Go to the documentation of this file.
00001 #ifndef _TAG_H_INCLUDED_
00002 #define _TAG_H_INCLUDED_
00003
00004
00005 #include "bias_config.h"
00006 #include <string>
00007 #include <iostream>
00008 #include <Base/Debug/DebugSimple.hh>
00009 #include <Base/Debug/Error.hh>
00010
00011
00012 // Begin namespace BIAS
00013 namespace BIAS {
00014
00015   /** @class ExifTag
00016       @brief helper class containing EXIF Tag info and its's value 8wriiten e.g. in Jpeg header by digiti la cameras.
00017       @author Jan Woetzel 10/2004 */
00018   class ExifTag {
00019   public:
00020     ~ExifTag(){};
00021     ExifTag(){};
00022     ExifTag(const unsigned short _id,
00023         const std::string _name,
00024         const std::string _value)
00025       : id(_id), name(_name), value(_value)
00026     {};
00027
00028     ExifTag(const unsigned short _id,
00029         const std::string _name)
00030       : id(_id), name(_name), value("")
00031     {};
00032
00033     std::ostream& Print(std::ostream& os=std::cout) const;
00034
00035     /** @return true if the string contains a useful value, in particular not empty, not unknown etc.  JW */
00036     bool GoodValue(const std::string &val) const;
00037
00038
00039     // --- data members ---
00040
00041     unsigned short id; // tag ID
00042     std::string name;  // name=description
00043     std::string value; // value of tag
00044   };
00045 } // end namespace BIAS
00046
00047
00048 // ------------------
00049
00050 /** @brief output operator for TagInfo
00051     @author Jan Woetzel */
00052 std::ostream& operator<<(std::ostream& os,
00053              const BIAS::ExifTag &tag);
00054
00055
00056 #endif
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/f2c_gnu011.h Source File

MathAlgo » minpack

f2c_gnu011.h

Go to the documentation of this file.
00001 /* f2c.h  --  Standard Fortran to C header file */
00002
00003 /**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
00004
00005     - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
00006
00007 #ifndef F2C_INCLUDE
00008 #define F2C_INCLUDE
00009
00010 typedef long int integer;
00011 typedef unsigned long int uinteger;
00012 typedef char *address;
00013 typedef short int shortint;
00014 typedef float real;
00015 typedef double doublereal;
00016 typedef struct { real r, i; } complex;
00017 typedef struct { doublereal r, i; } doublecomplex;
00018 typedef long int logical;
00019 typedef short int shortlogical;
00020 typedef char logical1;
00021 typedef char integer1;
00022 #ifdef INTEGER_STAR_8   /* Adjust for integer*8. */
00023 typedef long long longint;      /* system-dependent */
00024 typedef unsigned long long ulongint;    /* system-dependent */
00025 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
00026 #define qbit_set(a,b)   ((a) |  ((ulongint)1 << (b)))
00027 #endif
00028
00029 #define TRUE_ (1)
00030 #define FALSE_ (0)
00031
00032 /* Extern is for use with -E */
00033 #ifndef Extern
00034 #define Extern extern
00035 #endif
00036
00037 /* I/O stuff */
00038
00039 #ifdef f2c_i2
00040 /* for -i2 */
00041 typedef short flag;
00042 typedef short ftnlen;
00043 typedef short ftnint;
00044 #else
00045 typedef long int flag;
00046 typedef long int ftnlen;
00047 typedef long int ftnint;
00048 #endif
00049
00050 /*external read, write*/
00051 typedef struct
00052 {   flag cierr;
00053     ftnint ciunit;
00054     flag ciend;
00055     char *cifmt;
00056     ftnint cirec;
00057 } cilist;
00058
00059 /*internal read, write*/
00060 typedef struct
00061 {   flag icierr;
00062     char *iciunit;
00063     flag iciend;
00064     char *icifmt;
00065     ftnint icirlen;
00066     ftnint icirnum;
00067 } icilist;
00068
00069 /*open*/
00070 typedef struct
00071 {   flag oerr;
00072     ftnint ounit;
00073     char *ofnm;
00074     ftnlen ofnmlen;
00075     char *osta;
00076     char *oacc;
00077     char *ofm;
00078     ftnint orl;
00079     char *oblnk;
00080 } olist;
00081
00082 /*close*/
00083 typedef struct
00084 {   flag cerr;
00085     ftnint cunit;
00086     char *csta;
00087 } cllist;
00088
00089 /*rewind, backspace, endfile*/
00090 typedef struct
00091 {   flag aerr;
00092     ftnint aunit;
00093 } alist;
00094
00095 /* inquire */
00096 typedef struct
00097 {   flag inerr;
00098     ftnint inunit;
00099     char *infile;
00100     ftnlen infilen;
00101     ftnint  *inex;  /*parameters in standard's order*/
00102     ftnint  *inopen;
00103     ftnint  *innum;
00104     ftnint  *innamed;
00105     char    *inname;
00106     ftnlen  innamlen;
00107     char    *inacc;
00108     ftnlen  inacclen;
00109     char    *inseq;
00110     ftnlen  inseqlen;
00111     char    *indir;
00112     ftnlen  indirlen;
00113     char    *infmt;
00114     ftnlen  infmtlen;
00115     char    *inform;
00116     ftnint  informlen;
00117     char    *inunf;
00118     ftnlen  inunflen;
00119     ftnint  *inrecl;
00120     ftnint  *innrec;
00121     char    *inblank;
00122     ftnlen  inblanklen;
00123 } inlist;
00124
00125 #define VOID void
00126
00127 union Multitype {   /* for multiple entry points */
00128     integer1 g;
00129     shortint h;
00130     integer i;
00131     /* longint j; */
00132     real r;
00133     doublereal d;
00134     complex c;
00135     doublecomplex z;
00136     };
00137
00138 typedef union Multitype Multitype;
00139
00140 /*typedef long int Long;*/  /* No longer used; formerly in Namelist */
00141
00142 struct Vardesc {    /* for Namelist */
00143     char *name;
00144     char *addr;
00145     ftnlen *dims;
00146     int  type;
00147     };
00148 typedef struct Vardesc Vardesc;
00149
00150 struct Namelist {
00151     char *name;
00152     Vardesc **vars;
00153     int nvars;
00154     };
00155 typedef struct Namelist Namelist;
00156
00157 #ifndef _STDLIB_H
00158 /* abs is definde in stdlib.h of glibc 2.2 */
00159 #define abs(x) ((x) >= 0 ? (x) : -(x))
00160 #endif
00161 #define dabs(x) (doublereal)abs(x)
00162 #define min(a,b) ((a) <= (b) ? (a) : (b))
00163 #define max(a,b) ((a) >= (b) ? (a) : (b))
00164 #define dmin(a,b) (doublereal)min(a,b)
00165 #define dmax(a,b) (doublereal)max(a,b)
00166 #define bit_test(a,b)   ((a) >> (b) & 1)
00167 #define bit_clear(a,b)  ((a) & ~((uinteger)1 << (b)))
00168 #define bit_set(a,b)    ((a) |  ((uinteger)1 << (b)))
00169
00170 /* procedure parameter types for -A and -C++ */
00171
00172 #define F2C_proc_par_types 1
00173 #ifdef __cplusplus
00174 typedef int /* Unknown procedure type */ (*U_fp)(...);
00175 typedef shortint (*J_fp)(...);
00176 typedef integer (*I_fp)(...);
00177 typedef real (*R_fp)(...);
00178 typedef doublereal (*D_fp)(...), (*E_fp)(...);
00179 typedef /* Complex */ VOID (*C_fp)(...);
00180 typedef /* Double Complex */ VOID (*Z_fp)(...);
00181 typedef logical (*L_fp)(...);
00182 typedef shortlogical (*K_fp)(...);
00183 typedef /* Character */ VOID (*H_fp)(...);
00184 typedef /* Subroutine */ int (*S_fp)(...);
00185 #else
00186 typedef int /* Unknown procedure type */ (*U_fp)();
00187 typedef shortint (*J_fp)();
00188 typedef integer (*I_fp)();
00189 typedef real (*R_fp)();
00190 typedef doublereal (*D_fp)(), (*E_fp)();
00191 typedef /* Complex */ VOID (*C_fp)();
00192 typedef /* Double Complex */ VOID (*Z_fp)();
00193 typedef logical (*L_fp)();
00194 typedef shortlogical (*K_fp)();
00195 typedef /* Character */ VOID (*H_fp)();
00196 typedef /* Subroutine */ int (*S_fp)();
00197 #endif
00198 /* E_fp is for real functions when -R is not specified */
00199 typedef VOID C_f;   /* complex function */
00200 typedef VOID H_f;   /* character function */
00201 typedef VOID Z_f;   /* double complex function */
00202 typedef doublereal E_f; /* real function with -R not specified */
00203
00204 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
00205
00206 #ifndef Skip_f2c_Undefs
00207 #undef cray
00208 #undef gcos
00209 #undef mc68010
00210 #undef mc68020
00211 #undef mips
00212 #undef pdp11
00213 #undef sgi
00214 #undef sparc
00215 #undef sun
00216 #undef sun2
00217 #undef sun3
00218 #undef sun4
00219 #undef u370
00220 #undef u3b
00221 #undef u3b2
00222 #undef u3b5
00223 #undef unix
00224 #undef vax
00225 #endif
00226 #endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fcscmat.h Source File

Base » Math » tnt

fcscmat.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 //  Templated compressed sparse column matrix (Fortran conventions).
00035 //  uses 1-based offsets in storing row indices.
00036 //  Used primarily to interface with Fortran sparse matrix libaries.
00037 //  (CANNOT BE USED AS AN STL CONTAINER.)
00038
00039
00040 #ifndef FCSCMAT_H
00041 #define FCSCMAT_H
00042
00043 #include <iostream>
00044 #include <cassert>
00045 #include "tnt.h"
00046 #include "vec.h"
00047
00048
00049
00050 namespace TNT
00051 {
00052 template <class T>
00053 class Fortran_Sparse_Col_Matrix
00054 {
00055
00056    protected:
00057
00058        Vector<T>           val_;       // data values (nz_ elements)
00059        Vector<Subscript>   rowind_;    // row_ind (nz_ elements)
00060        Vector<Subscript>   colptr_;    // col_ptr (n_+1 elements)
00061
00062        int nz_;                   // number of nonzeros
00063        Subscript m_;              // global dimensions
00064        Subscript n_;
00065
00066    public:
00067
00068
00069        Fortran_Sparse_Col_Matrix(void);
00070        Fortran_Sparse_Col_Matrix(const Fortran_Sparse_Col_Matrix<T> &S)
00071         : val_(S.val_), rowind_(S.rowind_), colptr_(S.colptr_), nz_(S.nz_),
00072             m_(S.m_), n_(S.n_) {};
00073        Fortran_Sparse_Col_Matrix(Subscript M, Subscript N,
00074             Subscript nz, const T  *val,  const Subscript *r,
00075             const Subscript *c) : val_(nz, val), rowind_(nz, r),
00076             colptr_(N+1, c), nz_(nz), m_(M), n_(N) {};
00077
00078        Fortran_Sparse_Col_Matrix(Subscript M, Subscript N,
00079             Subscript nz, char *val,  char  *r,
00080             char *c) : val_(nz, val), rowind_(nz, r),
00081             colptr_(N+1, c), nz_(nz), m_(M), n_(N) {};
00082
00083        Fortran_Sparse_Col_Matrix(Subscript M, Subscript N,
00084             Subscript nz, const T  *val, Subscript *r, Subscript *c)
00085             : val_(nz, val), rowind_(nz, r), colptr_(N+1, c), nz_(nz),
00086                     m_(M), n_(N) {};
00087
00088       ~Fortran_Sparse_Col_Matrix() {};
00089
00090
00091        T &      val(Subscript i) { return val_(i); }
00092        const T &      val(Subscript i) const { return val_(i); }
00093
00094        Subscript &   row_ind(Subscript i) { return rowind_(i); }
00095        const Subscript &   row_ind(Subscript i) const { return rowind_(i); }
00096
00097        Subscript    col_ptr(Subscript i) { return colptr_(i);}
00098        const Subscript    col_ptr(Subscript i) const { return colptr_(i);}
00099
00100
00101        Subscript    num_cols() const { return m_;}
00102        Subscript    num_rows() const { return n_; }
00103
00104        Subscript          dim(Subscript i) const
00105        {
00106 #ifdef TNT_BOUNDS_CHECK
00107             assert( 1 <= i );
00108             assert( i <= 2 );
00109 #endif
00110             if (i==1) return m_;
00111             else if (i==2) return m_;
00112             else return 0;
00113         }
00114
00115        Subscript          num_nonzeros() const {return nz_;};
00116        Subscript          lbound() const {return 1;}
00117
00118
00119
00120        Fortran_Sparse_Col_Matrix& operator=(const
00121             Fortran_Sparse_Col_Matrix &C)
00122         {
00123             val_ = C.val_;
00124             rowind_ = C.rowind_;
00125             colptr_ = C.colptr_;
00126             nz_ = C.nz_;
00127             m_ = C.m_;
00128             n_ = C.n_;
00129
00130             return *this;
00131         }
00132
00133        Fortran_Sparse_Col_Matrix& newsize(Subscript M, Subscript N,
00134                 Subscript nz)
00135         {
00136             val_.newsize(nz);
00137             rowind_.newsize(nz);
00138             colptr_.newsize(N+1);
00139             return *this;
00140         }
00141 };
00142
00143 template <class T>
00144 ostream& operator<<(ostream &s, const Fortran_Sparse_Col_Matrix<T> &A)
00145 {
00146     Subscript M=A.num_rows();
00147     Subscript N=A.num_cols();
00148
00149     s << M << " " << N << " " << A.num_nonzeros() <<  endl;
00150
00151
00152     for (Subscript k=1; k<=N; k++)
00153     {
00154         Subscript start = A.col_ptr(k);
00155         Subscript end = A.col_ptr(k+1);
00156
00157         for (Subscript i= start; i<end; i++)
00158         {
00159             s << A.row_ind(i) << " " << k << " " << A.val(i) << endl;
00160         }
00161     }
00162
00163     return s;
00164 }
00165
00166
00167
00168 } // namespace TNT
00169
00170 #endif
00171 /* FCSCMAT_H */
00172
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D.cpp Source File

Image

FFT2D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FFT2D.hh"
00027 #include <fftw3.h>
00028 #include <Base/Debug/Error.hh>
00029
00030 #include <complex>
00031 #include <iomanip>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 template <class InputStorageType, class OutputStorageType>
00037 FFT2D<InputStorageType, OutputStorageType>::
00038 FFT2D()
00039 {
00040   _SizeX=0;
00041   _SizeY=0;
00042   _OutNum=0;
00043   _in=NULL;
00044   _out=NULL;
00045   _p_forward=NULL;
00046 }
00047
00048 template <class InputStorageType, class OutputStorageType>
00049 FFT2D<InputStorageType, OutputStorageType>::~FFT2D()
00050 {
00051   Release();
00052   fftw_cleanup();
00053 }
00054
00055 template <class InputStorageType, class OutputStorageType>
00056 void FFT2D<InputStorageType, OutputStorageType>::
00057 Init(int width, int height)
00058 {
00059 #ifdef BIAS_DEBUG
00060   if (_SizeX!=0 || _SizeY!=0 ||  _OutNum!=0 || _out || _in || _p_forward){
00061     BIASERR("FFT2D: call Release() before calling Init() a second time");
00062     BIASABORT;
00063   }
00064 #endif
00065   _SizeX=height;
00066   _SizeY=width;
00067   _Size = _SizeX*_SizeY;
00068   _OutSizeY = (_SizeY>>1)+1;
00069   _OutNum=_SizeX * _OutSizeY;
00070   _out =(fftw_complex*)fftw_malloc(sizeof(fftw_complex) * _OutNum);
00071   _in = (double*)fftw_malloc(sizeof(double) * _Size);
00072   // this is slow a few seconds
00073   _p_forward = fftw_plan_dft_r2c_2d(_SizeX, _SizeY, _in, _out, FFTW_MEASURE);
00074   _p_reverse = fftw_plan_dft_c2r_2d(_SizeX, _SizeY, _out, _in, FFTW_ESTIMATE);
00075 }
00076
00077
00078
00079
00080
00081
00082 template <class InputStorageType, class OutputStorageType>
00083 void FFT2D<InputStorageType, OutputStorageType>::
00084 Release()
00085 {
00086   if (_p_forward) fftw_destroy_plan(_p_forward);
00087   if (_in) fftw_free(_in);
00088   if (_out) fftw_free(_out);
00089   _in=NULL;
00090   _out=NULL;
00091   _p_forward=NULL;
00092   _SizeX=_SizeY=_Size=_OutNum=0;
00093 }
00094
00095
00096 template <class InputStorageType, class OutputStorageType>
00097 int FFT2D<InputStorageType, OutputStorageType>::
00098 Forward_(const Image<InputStorageType>& src)
00099 {
00100 #ifdef BIAS_DEBUG
00101   if (_SizeX==0 || _SizeY==0 ){
00102     BIASERR("FFT2D: call Init() before calling Filter() ");
00103     BIASABORT;
00104   }
00105 #endif
00106
00107   BIASASSERT(src.GetChannelCount() ==1);
00108   BIASASSERT((int)src.GetWidth() == _SizeY);
00109   BIASASSERT((int)src.GetHeight() == _SizeX);
00110   // first, copy and cast src into _in
00111   double *inp = _in;
00112   InputStorageType *imgp = src.GetImageData();
00113   for ( int i=0;i<_Size; i++) {
00114     inp[i] = (double) imgp[i];
00115   }
00116
00117   // run fft via _plan
00118   fftw_execute(_p_forward);
00119   return 0;
00120 }
00121
00122
00123 template <class InputStorageType, class OutputStorageType>
00124 int FFT2D<InputStorageType, OutputStorageType>::
00125 Reverse_(const Image<OutputStorageType>& src)
00126 {
00127 #ifdef BIAS_DEBUG
00128   if (_SizeX==0 || _SizeY==0 ){
00129     BIASERR("FFT2D: call Init() before calling Filter() ");
00130     BIASABORT;
00131   }
00132 #endif
00133
00134   BIASASSERT(src.GetChannelCount() ==2);
00135   BIASASSERT((int)src.GetWidth() == _OutSizeY);
00136   BIASASSERT((int)src.GetHeight() == _SizeX);
00137   // first, copy and cast src into _in
00138   fftw_complex *outp = _out;
00139   OutputStorageType *imgp = src.GetImageData();
00140   for ( int i=0;i<_OutNum; i++) {
00141     outp[i][0] = (double) imgp[2*i];
00142     outp[i][1] = (double) imgp[2*i+1];
00143   }
00144
00145   // run fft via _plan
00146   fftw_execute(_p_reverse);
00147   return 0;
00148 }
00149
00150
00151
00152
00153 /** dst.GetChannelCount()==2*src.GetCHannelCount() */
00154 template <class InputStorageType, class OutputStorageType>
00155 int FFT2D<InputStorageType, OutputStorageType>::
00156 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00157 {
00158   Forward_(src);
00159
00160   if (!dst.IsEmpty()) dst.Release();
00161   dst.Init(_OutSizeY, _SizeX, 2);
00162   // copy and cast back int dst, two channel mode
00163   fftw_complex *outp = _out;
00164   OutputStorageType *oimgp = dst.GetImageData();
00165   for ( int i=0;i<_OutNum; i++){
00166     oimgp[2*i] = (OutputStorageType) outp[i][0];
00167     oimgp[2*i+1] = (OutputStorageType) outp[i][1];
00168   }
00169   return 0;
00170 }
00171
00172
00173
00174 /** dstX.GetChannelCount()==src.GetCHannelCount() */
00175 template <class InputStorageType, class OutputStorageType>
00176 int FFT2D<InputStorageType, OutputStorageType>::
00177 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst1,
00178        Image<OutputStorageType>& dst2)
00179 {
00180   Forward_(src);
00181
00182   if (!dst1.IsEmpty()) dst1.Release();
00183   dst1.Init(_OutSizeY, _SizeX,1);
00184   if (!dst2.IsEmpty()) dst2.Release();
00185   dst2.Init(_OutSizeY, _SizeX,1);
00186   // copy and cast back int dst, two channel mode
00187   fftw_complex *outp = _out;
00188   OutputStorageType *oimgp1 = dst1.GetImageData();
00189   OutputStorageType *oimgp2 = dst2.GetImageData();
00190   for ( int i=0;i<_OutNum; i++){
00191     oimgp1[i] = (OutputStorageType) (outp[i][0]);
00192     oimgp2[i] = (OutputStorageType) (outp[i][1]);
00193   }
00194
00195   return 0;
00196 }
00197
00198
00199 /** dstX.GetChannelCount()==src.GetCHannelCount() */
00200 template <class InputStorageType, class OutputStorageType>
00201 int FFT2D<InputStorageType, OutputStorageType>::
00202 TransformAbs(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00203 {
00204   Forward_(src);
00205   if (!dst.IsEmpty()) dst.Release();
00206   dst.Init(_OutSizeY ,_SizeX,1);
00207   // copy and cast back int dst, abs mode
00208   fftw_complex *outp = _out;
00209   OutputStorageType *oimgp = dst.GetImageData();
00210   for ( int i=0;i<_OutNum; i++){
00211
00212     oimgp[i] =
00213       (OutputStorageType) (sqrt((outp[i][0] * outp[i][0]) + (outp[i][1] * outp[i][1]))/_Size);
00214   }
00215
00216   return 0;
00217 }
00218
00219 /** dstX.GetChannelCount()==src.GetCHannelCount() */
00220 template <class InputStorageType, class OutputStorageType>
00221 int FFT2D<InputStorageType, OutputStorageType>::
00222 TransformLogAbs(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00223 {
00224   Forward_(src);
00225   if (!dst.IsEmpty()) dst.Release();
00226   dst.Init( _OutSizeY ,_SizeX,1);
00227   // copy and cast back int dst, abs mode
00228   fftw_complex *outp = _out;
00229   OutputStorageType *oimgp = dst.GetImageData();
00230   for ( int i=0;i<_OutNum; i++){
00231     oimgp[i] = (OutputStorageType) log(sqrt((outp[i][0]* outp[i][0]) + (outp[i][1]* outp[i][1])));
00232   }
00233
00234   return 0;
00235 }
00236
00237 /** dstX.GetChannelCount()==src.GetCHannelCount() */
00238 template <class InputStorageType, class OutputStorageType>
00239 int FFT2D<InputStorageType, OutputStorageType>::
00240 TransformPhase(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00241 {
00242   Forward_(src);
00243   if (!dst.IsEmpty()) dst.Release();
00244   dst.Init( _OutSizeY ,_SizeX,1);
00245   // copy and cast back int dst, abs mode
00246   fftw_complex *outp = _out;
00247   OutputStorageType *oimgp = dst.GetImageData();
00248   for ( int i=0;i<_OutNum; i++){
00249     oimgp[i] = (OutputStorageType) atan(outp[i][0]/ outp[i][1]);
00250   }
00251
00252   return 0;
00253 }
00254
00255 #include <Base/Common/BIASpragmaStart.hh>
00256 template <class InputStorageType, class OutputStorageType>
00257 int FFT2D<InputStorageType, OutputStorageType>::
00258 Normalize(Image<OutputStorageType>& dst)
00259 {
00260   OutputStorageType *d = dst.GetImageData();
00261   unsigned int count = dst.GetWidth() * dst.GetHeight() *dst.GetChannelCount();
00262   for (unsigned int i=0; i<count; i++)
00263   {
00264     // TODO
00265     ///\todo fix the cast by explicit template JW
00266     d[i] /= (OutputStorageType) _Size;
00267   }
00268   return 0;
00269 }
00270
00271 template <class InputStorageType, class OutputStorageType>
00272 int FFT2D<InputStorageType, OutputStorageType>::
00273 CrossPowerSpectrum(const Image<InputStorageType>& src1, const Image<InputStorageType>& src2, Image<OutputStorageType>& dst1){
00274
00275   fftw_complex *_out2;
00276   _out2 =(fftw_complex*)fftw_malloc(sizeof(fftw_complex) * _OutNum);
00277   Forward_(src2);
00278   //copy second FFT to _out2;
00279   fftw_complex *outp1 = _out;
00280   fftw_complex *outp2 = _out2;
00281   for ( int i=0;i<_OutNum; i++){
00282     outp2[i][0] =  outp1[i][0];
00283     outp2[i][1] =  outp1[i][1];
00284   }
00285   Forward_(src1);
00286
00287   if (!dst1.IsEmpty()) dst1.Release();
00288   //dst1.Init(_OutSizeY, _SizeX,2);
00289   dst1.Init(_OutSizeY, _SizeX,2);
00290   // copy and cast back int dst, two channel mode
00291   double abs;
00292   outp2 = _out2;
00293   outp1 = _out;
00294   OutputStorageType *oimgp1 = dst1.GetImageData();
00295
00296   for ( int i=0;i<_OutNum; i++){
00297     abs = (double)(outp2[i][0] * outp2[i][0] + outp2[i][1] * outp2[i][1]);
00298     oimgp1[2*i] = (OutputStorageType) ((outp1[i][0] * outp2[i][0] + outp1[i][1] * outp2[i][1])/abs);
00299     oimgp1[2*i+1] = (OutputStorageType) ((outp2[i][0] * outp1[i][1] - outp1[i][0] * outp2[i][1])/abs);
00300   }
00301
00302   return 0;
00303 }
00304
00305 #include <Base/Common/BIASpragmaEnd.hh>
00306
00307
00308
00309 template <class InputStorageType, class OutputStorageType>
00310 int FFT2D<InputStorageType, OutputStorageType>::
00311 TransformReverse(const Image<OutputStorageType>& src,
00312                  Image<InputStorageType>& dst)
00313 {
00314   Reverse_(src);
00315   if (!dst.IsEmpty()) dst.Release();
00316   dst.Init(_SizeY, _SizeX,1);
00317   // copy and cast back int dst, abs mode
00318   double *inp = _in;
00319   InputStorageType *oimgp = dst.GetImageData();
00320   for ( int i=0;i<_Size; i++){
00321     oimgp[i] = (InputStorageType) inp[i];
00322   }
00323   return 0;
00324 }
00325
00326 template <class InputStorageType, class OutputStorageType>
00327 void FFT2D<InputStorageType, OutputStorageType>::
00328 GetBordersValid_(int& /*border_x*/, int& /*border_y*/) const
00329 {
00330   BIASERR("no parameter support, yet");
00331   BIASABORT;
00332 }
00333
00334
00335
00336 //////////////////////////////////////////////////////////////////////////
00337 //    explicit  instantiation    (must be at end of file)
00338 //////////////////////////////////////////////////////////////////////////
00339
00340 #if defined(BUILD_IMAGE_FLOAT)
00341 template class BIASImage_EXPORT FFT2D<float, float>;
00342 #endif
00343 #if defined(BUILD_IMAGE_DOUBLE)
00344 template class BIASImage_EXPORT FFT2D<double, double>;
00345 #endif
00346 #if defined(BUILD_IMAGE_UCHAR) && defined(BUILD_IMAGE_FLOAT)
00347 template class BIASImage_EXPORT FFT2D<unsigned char, float>;
00348 #endif
00349 #if defined(BUILD_IMAGE_UCHAR) && defined(BUILD_IMAGE_DOUBLE)
00350 template class BIASImage_EXPORT FFT2D<unsigned char, double>;
00351 #endif
00352
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D.hh Source File

Image

FFT2D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __2DFFT_hh__
00027 #define __2DFFT_hh__
00028
00029 #include <bias_config.h>
00030 #ifndef BIAS_HAVE_FFTW3
00031 #  error You need BIAS_HAVE_FFTW3 to use FFT2D. Please enable USE_FFTW3 and recompile BIAS.
00032 #endif
00033
00034 #include "Filter/FilterNTo2N.hh"
00035
00036 #include <complex>
00037 #include <iostream>
00038 #include <fftw3.h>
00039
00040 namespace BIAS {
00041
00042   /** wrapper to the fftw3 library
00043   use fast as follows:
00044   - call Init() with appropriate size
00045   - call Filter()
00046
00047   \todo FFT2D needs a complete rewrite because the interface concept is wrong. (JW)
00048
00049   @author evers 2004/01, and koeser, jw, oniemann 2006 */
00050   template <class InputStorageType, class OutputStorageType>
00051   class BIASImage_EXPORT  FFT2D   /*: public FilterNTo2N<InputStorageType, OutputStorageType>*/
00052   {
00053   public:
00054     FFT2D();
00055     virtual ~FFT2D();
00056
00057     /** @brief initializes for forward transformation on complete image.
00058     This may take some time
00059     (i.e. several seconds) since some measurements are done. */
00060     void Init(int width, int height);
00061
00062     /** call this before a second call to Init() */
00063     void Release();
00064
00065     /** dst.GetChannelCount()==2*src.GetCHannelCount()
00066     The result is not normalized! */
00067     virtual int Filter(const Image<InputStorageType>& src,
00068       Image<OutputStorageType>& dst);
00069
00070     /** dstX.GetChannelCount()==src.GetCHannelCount()
00071     The result is not normalized! */
00072     virtual int Filter(const Image<InputStorageType>& src,
00073       Image<OutputStorageType>& dst1,
00074       Image<OutputStorageType>& dst2);
00075
00076     /** Transform forward and get absolute value from complex result
00077     The result is not normalized! */
00078     virtual int TransformAbs(const Image<InputStorageType>& src,
00079       Image<OutputStorageType>& dst);
00080     virtual int TransformLogAbs(const Image<InputStorageType>& src,
00081       Image<OutputStorageType>& dst);
00082     virtual int TransformPhase(const Image<InputStorageType>& src,
00083       Image<OutputStorageType>& dst);
00084
00085     /** Transform reverse, src _must_ be of _SizeX,_OutSizeY,2
00086     */
00087     virtual int TransformReverse(const Image<OutputStorageType>& src,
00088       Image<InputStorageType>& dst);
00089
00090     /** Normalize output after transformation */
00091     virtual int Normalize(Image<OutputStorageType>& dst);
00092
00093     virtual int CrossPowerSpectrum(const Image<InputStorageType>& src1,
00094       const Image<InputStorageType>& src2,
00095       Image<OutputStorageType>& dst1);
00096
00097
00098   protected:
00099
00100     virtual int Forward_(const Image<InputStorageType>& src);
00101
00102     // assumes src.GetChannelCount() == 2
00103     virtual int Reverse_(const Image<OutputStorageType>& src);
00104
00105     virtual void GetBordersValid_(int& border_x, int& border_y) const;
00106
00107     fftw_complex *_out;
00108     double *_in;
00109     fftw_plan _p_forward, _p_reverse;
00110     // size of input _Size = SizeX * _SizeY
00111     // Warning: _SizeX is height and _SizeY is width of image
00112     int _SizeX, _SizeY, _Size;
00113     int _OutSizeY;
00114     int _OutNum; // length of output = _SizeX * (_SizeY/2 + 1)
00115   };
00116
00117 } // namespace
00118
00119 #endif // __FFT2D_hh__
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D_Tiles.cpp Source File

Image

FFT2D_Tiles.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FFT2D_Tiles.hh"
00027 #include <fftw3.h>
00028 #include <Base/Debug/Error.hh>
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 template <class InputStorageType, class OutputStorageType>
00035 FFT2D_Tiles<InputStorageType, OutputStorageType>::
00036 FFT2D_Tiles()
00037 {
00038   this->_TileSizeX = 0;
00039   this->_TileSizeY = 0;
00040   this->_NumTilesX = 0;
00041   this->_NumTilesY = 0;
00042 }
00043
00044 template <class InputStorageType, class OutputStorageType>
00045 FFT2D_Tiles<InputStorageType, OutputStorageType>::~FFT2D_Tiles()
00046 {
00047   Release();
00048   fftw_cleanup();
00049 }
00050
00051 template <class InputStorageType, class OutputStorageType>
00052 void FFT2D_Tiles<InputStorageType, OutputStorageType>::
00053 Init(int width, int height, int tilewidth, int tileheight)
00054 {
00055 #ifdef BIAS_DEBUG
00056   if (this->_SizeX!=0 || this->_SizeY!=0 ||  this->_OutNum!=0 || this->_out || this->_in || this->_p_forward){
00057     BIASERR("FFT2D_Tiles: call Release() before calling Init() a second time");
00058     BIASEXIT("FFT2D_Tiles: call Release() before calling Init() a second time");
00059   }
00060 #endif
00061   this->_SizeX=height;
00062   this->_SizeY=width;
00063
00064   this->_TileSizeX = tileheight;
00065   this->_TileSizeY = tilewidth;
00066   this->_NumTilesX = this->_SizeX / this->_TileSizeX;
00067   if (this->_SizeX % this->_TileSizeX >0) this->_NumTilesX++;
00068   this->_NumTilesY = this->_SizeY / this->_TileSizeY;
00069   if (this->_SizeY % this->_TileSizeY >0) this->_NumTilesY++;
00070
00071
00072
00073   this->_Size = this->_TileSizeX*this->_TileSizeY;
00074   this->_OutSizeY = (this->_TileSizeY>>1)+1;
00075   this->_OutNum=this->_TileSizeX * this->_OutSizeY;
00076   this->_out =(fftw_complex*)fftw_malloc(sizeof(fftw_complex) * this->_OutNum);
00077   this->_in = (double*)fftw_malloc(sizeof(double) * this->_Size);
00078   // this is slow a few seconds
00079   this->_p_forward = fftw_plan_dft_r2c_2d(this->_TileSizeX, this->_TileSizeY, this->_in, this->_out, FFTW_MEASURE);
00080   this->_p_reverse = fftw_plan_dft_c2r_2d(this->_TileSizeX, this->_TileSizeY, this->_out, this->_in, FFTW_MEASURE);
00081 }
00082
00083
00084
00085
00086
00087
00088 template <class InputStorageType, class OutputStorageType>
00089 void FFT2D_Tiles<InputStorageType, OutputStorageType>::
00090 Release()
00091 {
00092   if (this->_p_forward) fftw_destroy_plan(this->_p_forward);
00093   if (this->_in) fftw_free(this->_in);
00094   if (this->_out) fftw_free(this->_out);
00095   this->_in=NULL;
00096   this->_out=NULL;
00097   this->_p_forward=NULL;
00098   this->_SizeX=this->_SizeY=this->_Size=this->_OutNum=0;
00099 }
00100
00101
00102 template <class InputStorageType, class OutputStorageType>
00103 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00104 Forward_(const Image<InputStorageType>& /*src*/)
00105 {
00106   BIASERR("not implemented");
00107   return 0;
00108 }
00109
00110
00111 template <class InputStorageType, class OutputStorageType>
00112 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00113 Reverse_(const Image<OutputStorageType>& /*src*/)
00114 {
00115   BIASERR("not implemented");
00116   return 0;
00117 }
00118
00119
00120
00121
00122 /** dst.GetChannelCount()==2*src.GetCHannelCount() */
00123 template <class InputStorageType, class OutputStorageType>
00124 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00125 Filter(const Image<InputStorageType>& /*src*/, Image<OutputStorageType>& dst)
00126 {
00127
00128   if (!dst.IsEmpty()) dst.Release();
00129   dst.Init(this->_OutSizeY, this->_SizeX, 2);
00130   // copy and cast back int dst, two channel mode
00131   fftw_complex *outp = this->_out;
00132   OutputStorageType *oimgp = dst.GetImageData();
00133   for ( int i=0;i<this->_OutNum; i++){
00134     *oimgp = (OutputStorageType) (*outp)[0];
00135     oimgp++;
00136     *oimgp = (OutputStorageType) (*outp)[1];
00137     oimgp++;
00138     outp++;
00139   }
00140   return 0;
00141 }
00142
00143
00144
00145 /** dstX.GetChannelCount()==src.GetCHannelCount() */
00146 template <class InputStorageType, class OutputStorageType>
00147 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00148 Filter(const Image<InputStorageType>& /*src*/,
00149        Image<OutputStorageType>& /*dst1*/,
00150        Image<OutputStorageType>& /*dst2*/)
00151 {
00152   BIASERR("not implemented");
00153   return 0;
00154 }
00155
00156
00157 /** dst.GetChannelCount()==src.GetCHannelCount() */
00158 template <class InputStorageType, class OutputStorageType>
00159 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00160 TransformAbs(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00161 {
00162   Image<InputStorageType> tmpImg;
00163   InputStorageType **Iida ;
00164
00165   if ( ((int) src.GetHeight()  != this->_TileSizeX * this->_NumTilesX)
00166     || ((int) src.GetWidth() != this->_TileSizeY * this->_NumTilesY)) {
00167       tmpImg = src;
00168       tmpImg.ZeroPad( this->_TileSizeX * this->_NumTilesX, this->_TileSizeY * this->_NumTilesY );
00169       Iida = tmpImg.GetImageDataArray();
00170     }
00171   else Iida = src.GetImageDataArray();
00172   // prepare Image
00173   if (!dst.IsEmpty()) dst.Release();
00174   dst.Init( this->_OutSizeY * this->_NumTilesY,this->_TileSizeX * this->_NumTilesX,1);
00175
00176   OutputStorageType **Oida = dst.GetImageDataArray();
00177   // for all tiles
00178   for ( int ty=0; ty<this->_NumTilesY; ty++) {
00179     for ( int tx=0; tx<this->_NumTilesX; tx++) {
00180       double *inp = this->_in;
00181       fftw_complex *outp = this->_out;
00182
00183       // copy this tile int _in;
00184       for ( int y = ty*this->_TileSizeY; y<(ty+1)*this->_TileSizeY; y++)
00185         for ( int x = tx*this->_TileSizeX; x<(tx+1)*this->_TileSizeX; x++) {
00186           *inp++ = Iida[y][x];
00187         }
00188         // fft it
00189         fftw_execute(this->_p_forward);
00190         // copy result back
00191         for ( int y = ty*this->_OutSizeY; y<(ty+1)*this->_OutSizeY; y++)
00192           for ( int x = tx*this->_TileSizeX; x<(tx+1)*this->_TileSizeX; x++) {
00193             // remeber: x is height and y is width
00194             Oida[x][y] = (OutputStorageType) sqrt((*outp[0]* *outp[0]) +
00195               (*outp[1]* *outp[1]));
00196             outp++;
00197           }
00198     }
00199   }
00200
00201   return 0;
00202 }
00203
00204
00205
00206
00207
00208 template <class InputStorageType, class OutputStorageType>
00209 int FFT2D_Tiles<InputStorageType, OutputStorageType>::
00210 TransformReverse(const Image<OutputStorageType>& src,
00211                  Image<InputStorageType>& dst)
00212 {
00213   Reverse_(src);
00214   if (!dst.IsEmpty()) dst.Release();
00215   dst.Init(this->_SizeX, this->_SizeY,1);
00216   // copy and cast back int dst, abs mode
00217   double *inp = this->_in;
00218   InputStorageType *oimgp = dst.GetImageData();
00219   for ( int i=0;i<this->_Size; i++){
00220     *oimgp = (InputStorageType) *inp;
00221     oimgp++;
00222     inp++;
00223   }
00224
00225   return 0;
00226 }
00227
00228 //////////////////////////////////////////////////////////////////////////
00229 //                 instantiation
00230 //////////////////////////////////////////////////////////////////////////
00231 //#define FILTER_INSTANTIATION_CLASS FFT2D_Tiles
00232 //#define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00233 //#include "Filter/Filterinst.hh"
00234
00235
00236 #if defined(BUILD_IMAGE_FLOAT)
00237 template class BIASImage_EXPORT FFT2D_Tiles<float, float>;
00238 #endif
00239 #if defined(BUILD_IMAGE_DOUBLE)
00240 template class BIASImage_EXPORT FFT2D_Tiles<double, double>;
00241 #endif
00242 #if defined(BUILD_IMAGE_UCHAR) && defined(BUILD_IMAGE_FLOAT)
00243 template class BIASImage_EXPORT FFT2D_Tiles<unsigned char, float>;
00244 #endif
00245 #if defined(BUILD_IMAGE_UCHAR) && defined(BUILD_IMAGE_DOUBLE)
00246 template class BIASImage_EXPORT FFT2D_Tiles<unsigned char, double>;
00247 #endif
00248
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/FFT2D_Tiles.hh Source File

Image

FFT2D_Tiles.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __2DFFT_TILES_hh__
00027 #define __2DFFT_TILES_hh__
00028
00029 #include <bias_config.h>
00030
00031 #include "FFT2D.hh"
00032
00033 namespace BIAS {
00034
00035   template <class InputStorageType, class OutputStorageType>
00036   class BIASImage_EXPORT FFT2D_Tiles
00037     : public FFT2D<InputStorageType, OutputStorageType>
00038   {
00039     /** wrapper to the fftw3 library
00040     use fast as follows:
00041     - call Init() with appropriate size
00042     - call Filter()
00043
00044     Jan Woetzel 2005: This class is practically *NOT* implemented !
00045     \todo remove FFT2D_Tiles or really implement it. (JW)
00046
00047     @author evers 2004/01 */
00048   public:
00049     FFT2D_Tiles();
00050     ~FFT2D_Tiles();
00051
00052     virtual void Init(int /*imgsizex*/, int /*imgsizey*/)
00053     {
00054       BIASERR("Can not use FFT2D_Tiles::Init(width,height)");
00055     }
00056     /** @brief Initialize FFT to transform image tile- (patch-)wise
00057     */
00058     virtual void Init(int width, int height,
00059       int tilewidth, int tileheight);
00060
00061     /** cal this before a second call to Init() */
00062     void Release();
00063
00064     /** dst.GetChannelCount()==2*src.GetCHannelCount()
00065     The result is not normalized! */
00066     virtual int Filter(const Image<InputStorageType>& src,
00067       Image<OutputStorageType>& dst);
00068
00069     /** dstX.GetChannelCount()==src.GetCHannelCount()
00070     The result is not normalized! */
00071     virtual int Filter(const Image<InputStorageType>& src,
00072       Image<OutputStorageType>& dst1,
00073       Image<OutputStorageType>& dst2);
00074
00075     /** Transform forward and get absolute value from complex result
00076     The result is not normalized! */
00077     virtual int TransformAbs(const Image<InputStorageType>& src,
00078       Image<OutputStorageType>& dst);
00079
00080     /** Transform reverse, src _must_ be of _SizeX,_OutSizeY,2
00081     */
00082     virtual int TransformReverse(const Image<OutputStorageType>& src,
00083       Image<InputStorageType>& dst);
00084
00085
00086
00087   protected:
00088
00089     virtual int Forward_(const Image<InputStorageType>& src);
00090
00091     // assumes src.GetChannelCount() == 2
00092     virtual int Reverse_(const Image<OutputStorageType>& src);
00093
00094     int _TileSizeX, _TileSizeY;
00095     int _NumTilesX, _NumTilesY;
00096   };
00097
00098 } // namespace
00099
00100 #endif // __FFT2D_Tiles_hh__
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/FFT.cpp Source File

MathAlgo

FFT.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FFT.hh"
00027
00028 #include <Base/Debug/Error.hh>
00029
00030 #include <complex>
00031 #include <iomanip>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 FFT::FFT()
00037 {
00038   _Size=0;
00039   _in=NULL;
00040   _out=NULL;
00041   _p=NULL;
00042 }
00043
00044 FFT::~FFT()
00045 {
00046   Release();
00047 }
00048
00049 void FFT::Init(int size)
00050 {
00051 #ifdef BIAS_DEBUG
00052   if (_Size!=0 || _InputSize!=0 || _OutNum!=0 || _out || _in || _p){
00053     BIASERR("FFT: call Release() before calling Init() a second time");
00054     BIASEXIT("call Release() before calling Init() a second time");
00055   }
00056 #endif
00057   _Size=size;
00058   _InputSize=_Size*sizeof(double);
00059   _OutNum=(_Size>>1)+1;
00060   _out =(fftw_complex*)fftw_malloc(sizeof(fftw_complex) * _OutNum);
00061   _in = (double*)fftw_malloc(sizeof(double) * _Size);
00062   // this is slow a few seconds
00063   _p = fftw_plan_dft_r2c_1d(_Size, _in, _out, FFTW_MEASURE);
00064 }
00065
00066 void FFT::Release()
00067 {
00068   if (_p) fftw_destroy_plan(_p);
00069   if (_in) fftw_free(_in);
00070   if (_out) fftw_free(_out);
00071   _in=NULL;
00072   _out=NULL;
00073   _p=NULL;
00074   _Size=_InputSize=_OutNum=0;
00075 }
00076
00077 void FFT::Compute(double *in)
00078 {
00079   memcpy((void *)_in, (void *)in, _InputSize);
00080   fftw_execute(_p);
00081 }
00082
00083 void FFT::Compute(Vector<double> &in)
00084 {
00085 #ifdef BIAS_DEBUG
00086   if ((int)in.Size()!=_Size){
00087     BIASERR ("called FFT::Compute() with vector of wrong size "<<in.Size());
00088     BIASEXIT("called FFT::Compute() with vector of wrong size "<<in.Size());
00089   }
00090 #endif
00091   Compute(in.GetData());
00092 }
00093
00094 void FFT::GetPhase(double *phase)
00095 {
00096   complex<double> *p=reinterpret_cast<complex<double> *>(_out), *e=p+_OutNum;
00097   double *m=phase;
00098   while (p<e) {
00099     *m=arg(*p);
00100     m++;
00101     p++;
00102   }
00103 }
00104
00105 void FFT::GetMagnitude(double *mag)
00106 {
00107   complex<double> *p=reinterpret_cast<complex<double> *>(_out), *e=p+_OutNum;
00108   double *m=mag;
00109   while (p<e) {
00110     *m=abs(*p);
00111     m++;
00112     p++;
00113   }
00114 }
00115
00116 void FFT::GetPhase(Vector<double>& phase)
00117 {
00118   if ((int)phase.Size()!=_OutNum){
00119     phase.newsize(_OutNum);
00120   }
00121   complex<double> *p=reinterpret_cast<complex<double> *>(_out);
00122   for (int i=0; i<_OutNum; i++){
00123     phase[i]=arg(p[i]);
00124   }
00125 }
00126
00127 void FFT::GetMagnitude(Vector<double>& mag)
00128 {
00129   if ((int)mag.Size()!=_OutNum){
00130     mag.newsize(_OutNum);
00131   }
00132   complex<double> *p=reinterpret_cast<complex<double> *>(_out);
00133   for (int i=0; i<_OutNum; i++){
00134     mag[i]=abs(p[i]);
00135   }
00136 }
00137
00138 void FFT::DumpResult(std::ostream& os)
00139 {
00140   Vector<double> mag, phase;
00141   GetMagnitude(mag);
00142   GetPhase(phase);
00143   os << "#result of fft: "<<endl;
00144   os <<setw(4)<<"#num"<<setw(15)<<"freq"<<setw(15)<<"mag"<<setw(15)
00145        <<"phase"<<endl;
00146   for (int i=0; i<_OutNum; i++){
00147     os <<setw(4)<<i
00148          <<setw(15)<<(double)i/(double)_Size
00149          <<setw(15)<<mag[i]
00150          <<setw(15)<<phase[i]<<"\n";
00151   }
00152
00153 //   os << "# pipe outputt into file: my_program_with_FFT > tmp.dat"<<endl
00154 //      << "# and view with gnuplot : echo \"plot \\\"tmp.dat\\\" u 2:3 t \\\"magnitude\\\" w l, \\\"tmp.dat\\\" u 2:4 t \\\"phase\\\" w l; pause 99999;\" |gnuplot"<<endl;
00155
00156 }
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/FFT.hh Source File

MathAlgo

FFT.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FFT_hh__
00027 #define __FFT_hh__
00028
00029 #include <Base/Debug/Debug.hh>
00030 #include <Base/Math/Vector.hh>
00031
00032 #include <complex>
00033 #include <iostream>
00034 #include <fftw3.h>
00035
00036 namespace BIAS {
00037
00038   class BIASMathAlgo_EXPORT FFT : public Debug
00039   {
00040     /** wrapper to the fftw3 library
00041         use fast as follows:
00042         - call Init() with appropriate size
00043         - call GetInput() and fill it with data
00044         - call Compute()
00045         - get Results with GetPhase, GetMagnitude or GetRes
00046
00047         a slow interface for Vector<double> also exists
00048
00049         an example exists in Examples/ExampleFFT
00050
00051         @author woelk 03/2004 */
00052   public:
00053     FFT();
00054     ~FFT();
00055
00056     /** initializes the internal variables. This may take some time
00057         (i.e. several seconds) since some measurements are done */
00058     void Init(int size);
00059
00060     /** cal this before a second call to Init() */
00061     void Release();
00062
00063     /** returns the internal data. Do _not_ delete */
00064     inline double *GetInput()
00065     { return _in; }
00066
00067     /** slow, memcopys in to internal input data */
00068     void Compute(double *in);
00069
00070     /** slow, memcopys in to internal input data */
00071     void Compute(Vector<double> &in);
00072
00073     /** input must be filled before with GetInput */
00074     inline void Compute()
00075     { fftw_execute(_p); }
00076
00077     /** returns the resulting phase, phase must be of length
00078         size/2+1 (rounded downwards) */
00079     void GetPhase(double *phase);
00080
00081     /** returns the resulting magnitude, mag must be of length
00082        size/2+1 (rounded downwards) */
00083     void GetMagnitude(double *mag);
00084
00085     /** returns the internal data. Do _not_ delete
00086         res is of length size/2+1 */
00087     inline void GetResult(std::complex<double> *res)
00088     { res = reinterpret_cast<std::complex<double> *>(_out); }
00089
00090     /** returns the magnitude */
00091     void GetPhase(Vector<double>& phase);
00092
00093     /** returns the phase */
00094     void GetMagnitude(Vector<double>& mag);
00095
00096     void DumpResult(std::ostream& os=std::cout);
00097
00098   protected:
00099     fftw_complex *_out;
00100     double *_in;
00101     fftw_plan _p;
00102     size_t _InputSize; // in bytes
00103     int _Size; // length of input
00104     int _OutNum; // length of output = _Size/2 + 1
00105   };
00106
00107 } // namespace
00108
00109 #endif // __FFT_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/FileHandling.cpp Source File

Base » Common

FileHandling.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 // must be first:
00025 //#include "precompiled.h"
00026
00027 #define _CRT_SECURE_NO_DEPRECATE
00028 #include <stdio.h>
00029
00030 // Jan Woetzel 03/2005
00031
00032 #include "FileHandling.hh"
00033
00034
00035 #ifdef   WIN32
00036 #  include <Base/Common/W32Compat.hh>
00037 #  include <direct.h>
00038 #  include <time.h>
00039 #else //WIN32
00040 #  include <sys/time.h>
00041 #endif //WIN32
00042
00043 #include <math.h>
00044
00045 // STD
00046 #include <iostream>
00047 #include <fstream>
00048 #include <iomanip> // for std::setw, std::setfill
00049
00050
00051 // BIAS
00052 #include "Base/Debug/Error.hh"
00053
00054
00055 // for transfrom:
00056 #include <algorithm>
00057 #include <cctype>
00058
00059
00060 using namespace std;
00061 //using namespace BIAS:
00062
00063
00064
00065 // JW
00066 bool BIAS::FileReadable( const std::string & s)
00067 {
00068     ifstream ifs( s.c_str() );
00069     // ok, if file could be opended and is redable
00070     bool ok = ifs.good();
00071     ifs.close();
00072     return ok;
00073 }
00074
00075
00076 // JW
00077 void BIAS::SplitName(const std::string & fullname,
00078                      string & dir,
00079                      string & base,
00080                      string & suffix )
00081 {
00082     // find from right
00083     // expr: dir/subdir/base.ext
00084     string::size_type posL = fullname.rfind('/'); // separator for directory
00085     string::size_type posR = fullname.rfind('.'); // separator for suffix
00086
00087     // which separators were found ?
00088     bool foundDir = (posL!=std::string::npos);
00089     bool foundSuf = (posR!=std::string::npos);
00090
00091     if ( foundDir && foundSuf ) {
00092         // found path and suffix. base is inner part
00093         dir    = fullname.substr(0, posL+1 ); // start, length
00094         base   = fullname.substr(posL+1, (posR-posL-1)  );
00095         suffix = fullname.substr(posR, (fullname.size()-posR)  );
00096
00097     } else if ( foundDir && !foundSuf) {
00098         dir    = fullname.substr(0, posL+1 ); // start, length
00099         base   = fullname.substr(posL+1, (fullname.size()-posL) );
00100         suffix = ""; // no suffix found.
00101
00102     } else if ( !foundDir && foundSuf) {
00103         dir    = "";
00104         base   = fullname.substr(0, posR);
00105         suffix = fullname.substr(posR, (fullname.size()-posR) );
00106
00107     } else {
00108         // is already a basename.
00109         // TODO: cerr msg seems to cause a LEAK in string !!! (jw)
00110         // BIASERR("could not split path. delimiters not found. ");
00111         // cerr<<"blah"; // produces a valgrind memory leak/exception
00112         dir="";
00113         base=fullname;
00114         suffix="";
00115     };
00116 }
00117
00118
00119 //JW
00120 std::string BIAS::Directory(const std::string & fullname){
00121     string dir, base, suf;
00122     BIAS::SplitName(fullname,
00123         dir, base, suf );
00124     return dir;
00125 }
00126
00127
00128 //JW
00129 std::string BIAS::Basename(const std::string & fullname){
00130     string dir, base, suf;
00131     BIAS::SplitName(fullname,
00132         dir, base, suf );
00133     return base;
00134 }
00135
00136
00137 //JW
00138 std::string BIAS::Suffix(const std::string & fullname){
00139     string dir, base, suf;
00140     BIAS::SplitName(fullname,
00141         dir, base, suf );
00142     return suf;
00143 }
00144
00145
00146 std::string
00147 BIAS::Extension(const std::string & fullname)
00148 {
00149   string suf = Suffix(fullname);
00150   string ext=suf;
00151
00152   // remove the dot to get extension from suffix
00153   string::size_type pos = suf.rfind('.'); // separator
00154   const bool found = (pos!=std::string::npos);
00155
00156   // cut the dot if found, kepp full ext otherwise
00157   if (found)
00158     ext = suf.substr(pos+1, (suf.size()-pos-1) );
00159
00160   return ext;
00161 }
00162
00163
00164 //JW
00165 void BIAS::LogCommandLine( int argc,char** argv, std::ostream & os){
00166     for (int i=0; i<argc; i++){
00167         os<<argv[i]<<" "<<endl;
00168     }
00169     os<<endl;
00170     os<<"argc="<<argc<<endl;
00171     for (int i=0; i<argc; i++){
00172         os<<"argv["<<i<<"]="<<argv[i]<<endl;
00173     }
00174     os<<flush;
00175 }
00176
00177
00178 void BIAS::LogCommandLine( int argc,char** argv, const std::string & filename){
00179     ofstream ofs;
00180     ofs.open(filename.c_str()
00181         //, ios::app
00182         );
00183     if (!ofs.good()) {
00184         BIASERR("could not open "<<filename<<" for LogCommandLine.");
00185         LogCommandLine(argc, argv, std::cout);
00186     } else {
00187         LogCommandLine(argc, argv, ofs);
00188     };
00189     ofs.close();
00190 }
00191
00192
00193
00194 // return leading zero std::string of number
00195 // not elegantly but works.  JW 05/2003
00196 std::string
00197 BIAS::LeadingZeroString( const int & n,
00198                         const unsigned int & digits )
00199 {
00200     char bufC[10]; //  to convert the integer into a string
00201     // s#thsi switch is not pretty but works...
00202     switch (digits) {
00203   case 1:
00204       sprintf( bufC,"%01i", n);
00205       break;
00206   case 2:
00207       sprintf( bufC,"%02i", n);
00208       break;
00209   case 3:
00210       sprintf( bufC,"%03i", n);
00211       break;
00212   case 4:
00213       sprintf( bufC,"%04i", n);
00214       break;
00215   case 5:
00216       sprintf( bufC,"%05i", n);
00217       break;
00218   case 6 :
00219       sprintf( bufC,"%06i", n);
00220       break;
00221   case 7:
00222       sprintf( bufC,"%07i", n);
00223       break;
00224   case 8:
00225       sprintf( bufC,"%08i", n);
00226       break;
00227   case 9:
00228       sprintf( bufC,"%09i", n);
00229       break;
00230   case 10:
00231       sprintf( bufC,"%010i", n);
00232       break;
00233   case 11:
00234       sprintf( bufC,"%011i", n);
00235       break;
00236   case 12:
00237       sprintf( bufC,"%012i", n);
00238       break;
00239   case 13:
00240       sprintf( bufC,"%013i", n);
00241       break;
00242   case 14:
00243       sprintf( bufC,"%014i", n);
00244       break;
00245   case 15:
00246       sprintf( bufC,"%015i", n);
00247       break;
00248   case 16:
00249       sprintf( bufC,"%016i", n);
00250       break;
00251
00252
00253   default:
00254       BIASERR("error: overflow for digits="<<digits<<" using 10 digits as fallback,now");
00255       sprintf( bufC,"%010i", n);
00256     };
00257     std::string str;
00258     str = bufC;
00259     return str;
00260 }
00261
00262
00263 /// type casting helper function for Suffix/ExtensionName JW
00264 char BIAS::ToLower_c(char c) {
00265     return char(tolower(c));
00266 }
00267
00268 char BIAS::ToUpper_c(char c) {
00269     return char(toupper(c));
00270 }
00271
00272
00273 /// @return lower case string of input JW
00274 std::string BIAS::LowerCase(const std::string & input)
00275 {
00276     string s(input);
00277     // convert each char to lower case
00278     transform(s.begin(), s.end(), s.begin(), ToLower_c);
00279     return s;
00280 }
00281
00282
00283 /// @return lower case string of input JW
00284 std::string BIAS::UpperCase(const std::string & input)
00285 {
00286     string s(input);
00287     // convert each char to lower case
00288     transform(s.begin(), s.end(), s.begin(), ToUpper_c);
00289     return s;
00290 }
00291
00292
00293
00294 std::string BIAS::CurrentDateTimeString() {
00295   time_t tim = time(NULL);
00296   tm *now = localtime(&tim);
00297   //     printf("Date is %d/%02d/%02d\n", now->tm_year+1900,
00298   //            now->tm_mon+1, now->tm_mday);
00299   //     printf("Time is %02d:%02d\n", now->tm_hour, now->tm_min);
00300
00301   stringstream sstime;
00302   sstime << setw(4) << setfill('0') << now->tm_year+1900
00303          << setw(2) << setfill('0') << now->tm_mon+1
00304          << setw(2) << setfill('0') << now->tm_mday << "_"
00305          << setw(2) << setfill('0') << now->tm_hour
00306          << setw(2) << setfill('0') << now->tm_min
00307          << setw(2) << setfill('0') << now->tm_sec;
00308
00309   return sstime.str();
00310 }
00311
00312
00313 int BIAS::ExtractNumberFromRight(const std::string & inStr,
00314                                  int & number,
00315                                  int & posL,
00316                                  int & posR )
00317 {
00318   // parse from rigth numeric part of string:
00319   number=0;
00320   posL=posR=0;
00321
00322   bool done=false;
00323   bool numericStarted=false;
00324   bool numericEnded=false;
00325   int exp10=0;
00326   int current = inStr.size()-1;
00327   while (!done && current>=0){
00328     const char c=inStr[current];
00329     switch (c) {
00330         case '0':
00331         case '1':
00332         case '2':
00333         case '3':
00334         case '4':
00335         case '5':
00336         case '6':
00337         case '7':
00338         case '8':
00339         case '9':
00340           { // numeric: weight digit with current exp.
00341             if (!numericStarted){
00342               numericStarted=true;
00343               posR=current;
00344             }
00345             const int act =atoi(&c);
00346             const int addAct = int(act*pow(10.0, exp10 ));
00347             number += addAct;
00348             // next expopnent
00349             exp10++;
00350             break;
00351           }
00352         default:
00353           { // not numeric
00354             if (numericStarted){
00355               numericEnded=true;
00356               posL=current+1;
00357               done=true;
00358             }
00359           }
00360     }; // switch
00361     current--;
00362   }// while
00363
00364   // found at least one digit?
00365   if (!numericStarted) {
00366     //BIASWARN("could not extract digit from "<<inStr);
00367     return -1;
00368   }
00369
00370   return 0;
00371 }
00372
00373
00374 int BIAS::FilenameSequence(const std::string & refFileName,
00375                            std::string & resultFilename,
00376                            const int & offsetFromRef,
00377                            const unsigned int & stepsize )
00378 {
00379   // extract directory and extension which are kept
00380   string dir, base, suffix;
00381   SplitName(refFileName, dir, base, suffix );
00382
00383   // extract numeric part of base filename from right
00384   int actIndex=0; //< act. index
00385   int posL=0, posR=0; //< cutout positione
00386   int result=ExtractNumberFromRight(base, actIndex, posL, posR );
00387   if (result!=0){
00388     BIASERR("could not extract digit from base="<<base);
00389     return result; // err.
00390   }
00391
00392   // OK:
00393   const int numberOfDigits = posR-posL+1;
00394   BIASASSERT(numberOfDigits>0);
00395
00396   // compute new index based on old index
00397   int newIndex = actIndex +offsetFromRef*stepsize;
00398
00399   // construct new filename
00400   string basePrefix  = base.substr(0, posL); // start, length
00401   string basePostfix = base.substr(posR+1, (base.size()-numberOfDigits) );
00402   resultFilename =  dir
00403     +(basePrefix + BIAS::LeadingZeroString(newIndex,numberOfDigits) +basePostfix)
00404     +suffix;
00405
00406   return 0;
00407 }
00408
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/FileHandling.hh Source File

Base » Common

FileHandling.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __FileHandling_hh__
00025 #define __FileHandling_hh__
00026
00027 /** File handling tools
00028 @todo: correct handling of Win32 SAMBA paths including \\machine\....
00029 @author Jan Woetzel 02/2005
00030 */
00031
00032 #include <bias_config.h>
00033
00034 #include <string>
00035
00036 #define DEFAULT_LEADING_ZEROS 5
00037
00038
00039 namespace BIAS {
00040
00041   /* @return true if the file exists can be pendedis readable on file system */
00042
00043   bool BIASCommon_EXPORT
00044     FileReadable( const std::string & s);
00045
00046
00047   /**  split full path into:
00048   - directory
00049   - basename
00050   - .suffix (inlcluding dot)
00051   @todo: Extract machine name or IP for SMB network shares
00052   for WIN32, e.g. \\machine\share and fix backslashes on  Win32.
00053   @author Jan Woetzel 03/2005 */
00054   // TODO: \todo WIN: fix to make \, \\ and / work on directories (jw)
00055   void BIASCommon_EXPORT
00056     SplitName(const std::string & fullname
00057     ,std::string & dir
00058     ,std::string & base
00059     ,std::string & suffix );
00060
00061   /** get Directory from fullname path JW */
00062   std::string BIASCommon_EXPORT
00063     Directory(const std::string & fullname);
00064
00065   /**  get Basename of file, no suffix, no direcory. */
00066   std::string  BIASCommon_EXPORT
00067     Basename(const std::string & fullname);
00068
00069   /**  get .suffix of file including the ".dot"
00070   No basename, no direcory. */
00071   std::string  BIASCommon_EXPORT
00072     Suffix(const std::string & fullname);
00073
00074   /**  get Extension of file without the "dot"
00075   No basename, no direcory. */
00076   std::string  BIASCommon_EXPORT
00077     Extension(const std::string & fullname);
00078
00079
00080   /// type correct helper wrapper for tolower required for stl transformations JW
00081   char ToLower_c(char c);
00082   /// type correct helper wrapper for toupper required for stl transformations JW
00083   char ToUpper_c(char c);
00084
00085
00086   /// @return lower case string of input JW
00087   std::string BIASCommon_EXPORT LowerCase(const std::string & input);
00088
00089   /// @return upper case string of input JW
00090   std::string BIASCommon_EXPORT UpperCase(const std::string & input);
00091
00092   /** write compilation time/date and all command line arguments
00093   to a log file/stream JW */
00094   void BIASCommon_EXPORT
00095     LogCommandLine( int argc,char** argv, std::ostream & os);
00096
00097   void BIASCommon_EXPORT
00098     LogCommandLine( int argc,char** argv, const std::string & filename);
00099
00100   /** Creates a string with leading zeroes from number JW */
00101   std::string BIASCommon_EXPORT
00102     LeadingZeroString( const int & n,
00103     const unsigned int & digits=DEFAULT_LEADING_ZEROS ) ;
00104
00105   /** @brief create a string containing date and time like 20060329_173054
00106       @author koeser */
00107   std::string  BIASCommon_EXPORT CurrentDateTimeString();
00108
00109   /** @brief extract numeric value fromstring beginnign from right,
00110   e.g. "blah042foo.txt" --> 42 and the pos. of the 0 and 2.
00111   Useful helper for FilenameSequence JW */
00112   int BIASCommon_EXPORT ExtractNumberFromRight(const std::string & inStr,
00113     int & number,
00114     int & posL,
00115     int & posR );
00116
00117
00118   /** @brief construct i,g .seq filename from a given filename
00119   by manipulating the number within base part of RefFilename.
00120   of an image sequence given a ref. filename and an offset.
00121   offset is the number of frames forward or backward from ref. image.
00122   stepsize is teh number of increment/decrement per offset.
00123   e.g ref=100, offset=2, stepsize=7 --> 114
00124   @return 0 for success, other for failure.
00125   @author Jan Woetzel */
00126   int BIASCommon_EXPORT FilenameSequence(const std::string & refFileName,
00127     std::string & resultFilename,
00128     const int & offsetFromRef,
00129     const unsigned int & stepsize=1 );
00130
00131 } // namespace BIAS
00132 #endif // do not add code after this line
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/filter.dox File Reference

Doc/filter.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterBase.cpp Source File

Filter

FilterBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004 (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #include "FilterBase.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034
00035 //#define DEBUG_CALLSTACK
00036
00037 template <class InputStorageType, class OutputStorageType>
00038 FilterBase<InputStorageType, OutputStorageType>::FilterBase()
00039   : Debug()
00040 {
00041   _FilterBorderHandling = new int;
00042   *_FilterBorderHandling = TBH_valid;
00043   _ParamsAllocated = true;
00044 #ifdef DEBUG_CALLSTACK
00045   AddDebugLevel(D_FILTERBASE_CALLSTACK);
00046 #endif
00047 }
00048
00049 template <class InputStorageType, class OutputStorageType>
00050 FilterBase<InputStorageType, OutputStorageType>::
00051 FilterBase(Param& para, const string& postfix)
00052   : Debug()
00053 {
00054   _ParamsAllocated=false;
00055   int grp = para.GetFreeGroupID();
00056   _AddParam(para, grp, "-FilterBase"+postfix);
00057   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "FilterBase");
00058 #ifdef DEBUG_CALLSTACK
00059   AddDebugLevel(D_FILTERBASE_CALLSTACK);
00060 #endif
00061 }
00062
00063
00064 template <class InputStorageType, class OutputStorageType>
00065 FilterBase<InputStorageType, OutputStorageType>::
00066 FilterBase(Param& para, const int grp, const string& postfix)
00067   : Debug()
00068 {
00069   _ParamsAllocated=false;
00070   _AddParam(para, grp, "-FilterBase"+postfix);
00071 #ifdef DEBUG_CALLSTACK
00072   AddDebugLevel(D_FILTERBASE_CALLSTACK);
00073 #endif
00074 }
00075
00076
00077 template <class InputStorageType, class OutputStorageType>
00078 FilterBase<InputStorageType, OutputStorageType>::~FilterBase()
00079 {
00080   if (_ParamsAllocated) {
00081     delete _FilterBorderHandling;
00082     _FilterBorderHandling = NULL;
00083   }
00084 }
00085
00086
00087 template <class InputStorageType, class OutputStorageType>
00088 void FilterBase<InputStorageType, OutputStorageType>::
00089 _AddParam(Param& para, const int grp, const string& postfix)
00090 {
00091   vector<string> tt;
00092   vector<int> tti;
00093   tt.push_back("TBH_valid"); tti.push_back(TBH_valid);
00094   tt.push_back("TBH_same"); tti.push_back(TBH_same);
00095   tt.push_back("TBH_full"); tti.push_back(TBH_full);
00096
00097   if (para.CheckParam("BorderHandling"+postfix)){
00098     _FilterBorderHandling=para.GetParamEnum("BorderHandling"+postfix);
00099   } else {
00100     _FilterBorderHandling=
00101       para.AddParamEnum("BorderHandling"+postfix,
00102                         "border handling type of filter",
00103                         tt, TBH_valid, &tti, 0, grp);
00104   }
00105
00106   para.SetEnhancedFlag("BorderHandling"+postfix, true);
00107 }
00108
00109
00110 template <class InputStorageType, class OutputStorageType>
00111 void FilterBase<InputStorageType, OutputStorageType>::
00112 GetBorders(int& border_x, int& border_y) const
00113 {
00114   switch(*_FilterBorderHandling){
00115   case TBH_same:
00116     border_x=0;
00117     border_y=0;
00118     break;
00119   case TBH_full:
00120     BIASERR("unfinished");
00121     BIASABORT;
00122     break;
00123   case TBH_valid:
00124     GetBordersValid_(border_x, border_y);
00125     break;
00126   default:
00127     BIASASSERT("invalid boder handling type" && false);
00128     BIASABORT;
00129     break;
00130   }
00131 }
00132
00133
00134
00135 int *BIAS::AddGradientType(Param& para, const string& name, const int group_id)
00136 {
00137   vector<string> tt;
00138   vector<int> tti;
00139   tt.push_back("GT_Sobel3x3");
00140   tti.push_back(GT_Sobel3x3);
00141   tt.push_back("GT_Gauss");
00142   tti.push_back(GT_Gauss);
00143   tt.push_back("GT_GaussAsymmetric");
00144   tti.push_back(GT_GaussAsymmetric);
00145   //  tt.push_back(""); tti.push_back(GradientBase<StorageType,KernelType>::);
00146   int *res;
00147
00148   if (para.CheckParam(name)){
00149     res=para.GetParamEnum(name);
00150   } else {
00151     res=para.AddParamEnum(name, "type of gradient filter to use", tt,
00152                           GT_Gauss, &tti, 0, group_id);
00153   }
00154   return res;
00155 }
00156
00157
00158 int *BIAS::AddLowPassType(Param& para, const string& name,  const int group_id)
00159 {
00160
00161   vector<string> tt;
00162   vector<int> tti;
00163   tt.push_back("LPT_Mean");
00164   tti.push_back(LPT_Mean);
00165   tt.push_back("LPT_Gauss");
00166   tti.push_back(LPT_Gauss);
00167   tt.push_back("LPT_Binomial");
00168   tti.push_back(LPT_Binomial);
00169   //  tt.push_back(""); tti.push_back(Gradient<StorageType,KernelType>::);
00170   int *res;
00171
00172   if (para.CheckParam(name)){
00173     res=para.GetParamEnum(name);
00174   } else {
00175     res=para.AddParamEnum(name,
00176                           "type of mean filter to use", tt,
00177                           LPT_Gauss, &tti, 0, group_id);
00178   }
00179   return res;
00180 }
00181
00182 #define FILTER_INSTANTIATION_CLASS FilterBase
00183 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterBase.hh Source File

Filter

FilterBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FilterBase_hh__
00027 #define __FilterBase_hh__
00028
00029 #include <Base/Image/Image.hh>
00030 #include <Utils/Param.hh>
00031
00032 #include <string>
00033
00034 #define D_FILTERBASE_CALLSTACK 0x80000000
00035
00036 namespace BIAS {
00037
00038
00039
00040   /** @enum EGradType
00041       @brief different gradients to be used by hiogher level classes
00042       - GT_Sobel3x3 gradient using 3x3 sobelx and sobely filters
00043       - GT_Gauss gradient using derivatives of gauss with square kernel
00044       - GT_GaussAsymmetric gradient using derivatives of gauss */
00045   enum EGradType { GT_Simple, GT_Sobel3x3, GT_Gauss, GT_GaussAsymmetric };
00046
00047   /** @enum LowPassType
00048       @brief determines which lowpass filter is used before subsampling
00049       - LPT_Mean use non-weighted mean across a window
00050       - LPT_Gauss weight (in a window) with gaussian function */
00051   enum LowPassType { LPT_Mean=0, LPT_Gauss, LPT_Binomial};
00052
00053   /** @brief Helper functio to register parameters */
00054   int* AddGradientType(Param& para, const std::string& name="GradientType",
00055                                 const int group_id=GRP_ALL);
00056
00057   /** @brief Helper functio to register parameters */
00058   int* AddLowPassType(Param& para, const std::string& name="LowPassType",
00059                                const int group_id=GRP_ALL);
00060
00061
00062   /** @class FilterBase
00063       @ingroup g_filter
00064       @brief virtual parent class for API definition of all (future) filters
00065
00066       We would like to have a general (abstract) class FilterBase,
00067       which should be located in BIAS/Filter and which has the main function
00068       Filter(inputimage, outputimage).
00069       This enforces all our filters to have a common interface.
00070       Derived from that, we have Convolution, Gauss, Median, ...
00071       To keep the interface clean and exchangable, all Filters should be
00072       derived from FilterBase and be usable with the standard interface.
00073       The standard function checks the desired properties of the Kernel and
00074       behaves accordingly,
00075       i.e. may call the optimized subroutines, e.g. FastSobel3x3.
00076       These subroutines may also be directly called if the user knows
00077       exactly which implementation he wants.
00078       FilterBase also holds an enum for the output size,
00079       such as "full", "same" or "valid".
00080
00081       @author skoglund, koeser, woelk 11/2004  */
00082
00083   template <class InputStorageType, class OutputStorageType>
00084   class BIASFilter_EXPORT FilterBase : public Debug
00085   {
00086
00087   public:
00088     /** enum for border calculation, same meanings as in matlab:
00089         - TBH_valid: returns only the pixels whose values can be computed
00090                      without using zero padding of the input image. The
00091                      resulting output image is smaller than the input image.
00092                      The ROI of the output image is set accordingly.
00093         - TBH_same:  returns the set of pixels that can be computed by applying
00094                      the filter to all pixels that are actually part of the
00095                      input image. Border pixels are computed using zero
00096                      padding, but the center pixel of the computational kernel
00097                      is applied only to pixels in the image. This results in an
00098                      output image that is the same size as the input image.
00099         - TBH_full:  returns the full convolution. This means conv2 returns all
00100                      pixels for which any of the pixels in the computational
00101                      molecule overlap pixels in the image, even when the center
00102                      pixel is outside the input image. The resulting output
00103                      image is larger than the input image. This is not
00104                      implemented at the moment. */
00105     enum TBorderHandling { TBH_full, TBH_same, TBH_valid };
00106
00107     /** @brief need contructor for param handling */
00108     FilterBase();
00109
00110     FilterBase(Param& para, const std::string& postfix="");
00111
00112     FilterBase(Param& para, const int group_id, const std::string& postfix);
00113
00114     virtual ~FilterBase();
00115
00116     /// prototyp for filter computation function
00117     virtual int Filter(const Image<InputStorageType>& src,
00118                        Image<OutputStorageType>& dst) = 0;
00119
00120     void GetBorders(int& border_x, int& border_y) const;
00121
00122     /////////////////////////////////////////////////////////////////////////
00123
00124     inline void SetBorderHandling(const int bh) { *_FilterBorderHandling=bh; }
00125
00126     inline int GetBorderHandling() const { return *_FilterBorderHandling; }
00127
00128   protected:
00129     bool _ParamsAllocated;
00130
00131     // parameter
00132     int *_FilterBorderHandling; // defaults to valid
00133
00134     void _AddParam(Param& para, const int grp_id,
00135                    const std::string& postfix="");
00136
00137     virtual void GetBordersValid_(int& border_x, int& border_y) const = 0;
00138
00139   }; // class
00140
00141
00142
00143
00144 } // namespace
00145
00146
00147
00148 #endif // __FilterBase_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Filterinst.hh Source File

Filter

Filterinst.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004
00005   Johan Skoglund
00006   skoglund@isy.liu.se
00007   CVL/isy
00008   university of Linköping
00009   sweden
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #ifdef __Filterinst_hh__
00027 #error Filterinst already defined
00028 #endif
00029
00030 #define __Filterinst_hh__
00031
00032
00033   /** @file Filterinst.hh
00034       @brief inline code for instantiation of filter classes
00035
00036       usage: define FILTER_INSTANTION_CLASS as your filter class, e.g.
00037       #define FILTER_INSTANTION_CLASS Gauss
00038       Decide whether you want to allow unsigned output, which makes no sense
00039       for gradient filters, because they might produce negative values
00040       if you want to prohibit instantiation of unsigned output images,
00041       #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00042       Do all this in the cpp file of your class implementation and then
00043       #include "Filterinst.hh"
00044       which explicitly creates all instances that are alowed by your current
00045       cmake configuration, e.g. BUILD_IMAGE_SHORT, ...
00046
00047       WARNING: This class steers the generation of all filter objects of
00048       BIAS, dont touch this unless you REALLY know what you are doing.
00049   */
00050
00051
00052
00053 #ifndef FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00054 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, unsigned char>;
00055 #endif
00056
00057 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<float, float>;
00058 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, float>;
00059
00060 #if defined(BUILD_IMAGE_CHAR)
00061 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, char>;
00062 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<char, char>;
00063 #endif
00064
00065 #if defined(BUILD_IMAGE_USHORT) && !defined(FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT)
00066 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,unsigned short>;
00067 #endif
00068
00069 #if defined(BUILD_IMAGE_SHORT)
00070 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<short, short>;
00071 #endif
00072
00073 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00074 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short, short>;
00075 #endif
00076
00077 #if defined(BUILD_IMAGE_INT)
00078 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<int,int>;
00079 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char,int>;
00080 #endif
00081
00082 #if defined(BUILD_IMAGE_USHORT)
00083 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,float>;
00084 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned char, unsigned short>;
00085 #endif
00086
00087 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00088 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned short,int>;
00089 #endif
00090
00091 #if defined(BUILD_IMAGE_DOUBLE)
00092 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<double,double>;
00093 #endif
00094
00095 #if defined(BUILD_IMAGE_UINT)
00096 template class BIASFilter_EXPORT FILTER_INSTANTIATION_CLASS<unsigned int, unsigned int>;
00097 #endif
00098
00099
00100 #undef FILTER_INSTANTIATION_CLASS
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterMask.cpp Source File

Filter

FilterMask.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004 (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #include "FilterMask.hh"
00025 #include "Base/Common/W32Compat.hh"
00026
00027 using namespace BIAS;
00028 using namespace std;
00029
00030 #define SETZEROSHIFT _KernelRightShift=0;_HorizRightShift=0;_VertRightShift=0
00031
00032 FilterMask::FilterMask() {
00033   _Separable = false;
00034   SETZEROSHIFT;
00035 }
00036
00037 void FilterMask::Init(const Matrix<FM_INT> &kernel, int rs,
00038                       bool ResetOtherType){
00039   _sKernel   = kernel;
00040   _Separable = false;
00041   _HorizRightShift  = 0;
00042   _VertRightShift   = 0;
00043   _KernelRightShift = rs;
00044   if (ResetOtherType) ResetFloatFilter();
00045 }
00046
00047 void FilterMask::Init(const Matrix<FM_FLOAT> &kernel, bool ResetOtherType) {
00048   _fKernel   = kernel;
00049   _Separable = false;
00050   SETZEROSHIFT;
00051   if (ResetOtherType) ResetIntFilter();
00052 }
00053
00054 void FilterMask::Init(const Vector<FM_INT> &horz, const Vector<FM_INT> &vert,
00055                       int hrs, int vrs, bool ResetOtherType) {
00056   _sHoriz    = horz;
00057   _sVert     = vert;
00058   _Separable = true;
00059   _HorizRightShift  = hrs;
00060   _VertRightShift   = vrs;
00061   _KernelRightShift = 0;
00062   if (ResetOtherType) ResetFloatFilter();
00063 }
00064
00065 void FilterMask::Init(const Vector<FM_FLOAT> &horz,
00066                       const Vector<FM_FLOAT> &vert,
00067                       bool ResetOtherType) {
00068   _fHoriz    = horz;
00069   _fVert     = vert;
00070   _Separable = true;
00071   SETZEROSHIFT;
00072   if (ResetOtherType) ResetIntFilter();
00073 }
00074
00075 FilterMask & FilterMask::operator=(const FilterMask& src) {
00076   _sKernel   = src._sKernel;
00077   _fKernel   = src._fKernel;
00078   _sHoriz    = src._sHoriz;
00079   _fHoriz    = src._fHoriz;
00080   _sVert     = src._sVert;
00081   _fVert     = src._fVert;
00082   _Separable = src._Separable;
00083
00084   _KernelRightShift = src._KernelRightShift;
00085   _HorizRightShift  = src._HorizRightShift;
00086   _VertRightShift   = src._VertRightShift;
00087
00088   return *this;
00089 }
00090
00091 void FilterMask::CreateFloatFilter() {
00092   _fKernel.newsize(_sKernel.num_cols(),_sKernel.num_rows());
00093   _fHoriz.newsize(_sHoriz.Size());
00094   _fVert.newsize(_sVert.Size());
00095
00096   FM_FLOAT shiftscale=powf(0.5,(float)_KernelRightShift);
00097   for(int x=0;x<_sKernel.num_cols();x++)
00098     for(int y=0;y<_sKernel.num_rows();y++){
00099       _fKernel[y][x]=_sKernel[y][x]*shiftscale;
00100     }
00101
00102   shiftscale=powf(0.5,(float)_HorizRightShift);
00103   for(int x=0;x<_sHoriz.size();x++) {
00104     _fHoriz[x]=_sHoriz[x]*shiftscale;
00105   }
00106
00107   shiftscale=powf(0.5,(float)_VertRightShift);
00108   for(int x=0;x<_sVert.size();x++){
00109     _fVert[x]=_sVert[x]*shiftscale;
00110   }
00111 }
00112
00113 void FilterMask::CreateIntFilter(int rshift,
00114                                  int rshifth,
00115                                  int rshiftv) {
00116   BIASDOUT(D_FM_INTAPPROX,"Called with shifts "<<rshift<<" "<<rshiftv
00117            <<" "<<rshifth);
00118   FM_FLOAT shiftscale = 0;
00119   if (!_Separable) {
00120     // 2D kernel:
00121     _sKernel.newsize(_fKernel.num_cols(),_fKernel.num_rows());
00122     shiftscale = powf(2.0,(float)rshift);
00123     BIASDOUT(D_FM_INTAPPROX,"Shiftscale is "<<shiftscale);
00124     for(int x=0;x<_sKernel.num_cols();x++)
00125       for(int y=0;y<_sKernel.num_rows();y++){
00126         _sKernel[y][x]=(FM_INT)rintf(_fKernel[y][x]*shiftscale);
00127       }
00128     _KernelRightShift = rshift;
00129   } else {
00130     // horizontal part
00131     _sHoriz.newsize(_fHoriz.Size());
00132     shiftscale = powf(2.0,(float)rshifth);
00133     BIASDOUT(D_FM_INTAPPROX,"Shiftscale horizontal is "<<shiftscale);
00134     for(unsigned int x=0;x<_fHoriz.Size();x++) {
00135       _sHoriz[x] = (FM_INT)rintf(_fHoriz[x] * shiftscale);
00136     }
00137     _HorizRightShift = rshifth;
00138     BIASDOUT(D_FM_INTAPPROX,"Horizontal filter is "<<_sHoriz);
00139
00140     // vertical part
00141     _sVert.newsize(_fVert.Size());
00142     shiftscale = powf(2.0,(float)rshiftv);
00143     BIASDOUT(D_FM_INTAPPROX,"Shiftscale vertical is "<<shiftscale);
00144     for(unsigned int x=0;x<_fVert.Size();x++) {
00145       _sVert[x] = (FM_INT)rintf(_fVert[x] * shiftscale);
00146     }
00147     _VertRightShift = rshiftv;
00148     BIASDOUT(D_FM_INTAPPROX,"Vertical filter is "<<_sVert);
00149   }
00150 }
00151
00152 void FilterMask::ResetFloatFilter() {
00153   if (!_Separable) {
00154     _fKernel.newsize(_sKernel.num_cols(),_sKernel.num_rows());
00155     for(int x=0;x<_sKernel.num_cols();x++)
00156       for(int y=0;y<_sKernel.num_rows();y++){
00157         _fKernel[y][x] = 0;
00158       }
00159   } else {
00160     _fHoriz.newsize(_sHoriz.Size());
00161     for(int x=0;x<_sHoriz.size();x++) {
00162       _fHoriz[x]=0;
00163     }
00164     _fVert.newsize(_sVert.Size());
00165     for(int x=0;x<_sVert.size();x++){
00166       _fVert[x]=0;
00167     }
00168   }
00169 }
00170
00171 void FilterMask::ResetIntFilter() {
00172   if (!_Separable) {
00173     // 2D kernel:
00174     _sKernel.newsize(_fKernel.num_cols(),_fKernel.num_rows());
00175     for(int x=0;x<_sKernel.num_cols();x++)
00176       for(int y=0;y<_sKernel.num_rows();y++){
00177         _sKernel[y][x]=0;
00178       }
00179     _KernelRightShift = 0;
00180   } else {
00181     // horizontal part
00182     _sHoriz.newsize(_fHoriz.Size());
00183     for(unsigned int x=0;x<_fHoriz.Size();x++) {
00184       _sHoriz[x] = 0;
00185     }
00186     _HorizRightShift = 0;
00187
00188     // vertical part
00189     _sVert.newsize(_fVert.Size());
00190     for(unsigned int x=0;x<_fVert.Size();x++) {
00191       _sVert[x] = 0;
00192     }
00193     _VertRightShift = 0;
00194   }
00195 }
00196
00197 void FilterMask::Transpose() {
00198   _sKernel = _sKernel.Transpose();
00199   _fKernel = _fKernel.Transpose();
00200   Vector<FM_INT> stmp(_sHoriz);
00201   _sHoriz = _sVert;
00202   _sVert = stmp;
00203   Vector<FM_FLOAT> ftmp(_fHoriz);
00204   _fHoriz = _fVert;
00205   _fVert = ftmp;
00206   int tmp(_HorizRightShift);
00207   _HorizRightShift = _VertRightShift;
00208   _VertRightShift = tmp;
00209 }
00210
00211 int FilterMask::ComputeIntPrecisionBits(int NumberOfBitsInInputData,
00212                                         int NumberOfBitsInTempData) {
00213   BIASDOUT(D_FM_PRECISION,"Called with NumberOfBitsInInputData="
00214            <<NumberOfBitsInInputData<<" and NumberOfBitsInTempData="
00215            <<NumberOfBitsInTempData);
00216   float norml1 = 0.0, maxentry=0.0;
00217   if (_Separable) {
00218     // get maximum of l1 norms of vectors
00219     float normhori = _fHoriz.NormL1();
00220     float normvert = _fVert.NormL1();
00221     norml1 = (normvert>normhori)?normvert:normhori;
00222     for (int i=0; i<_fHoriz.size(); i++)
00223       if (maxentry<fabs(_fHoriz[i])) maxentry = fabs(_fHoriz[i]);
00224     for (int i=0; i<_fHoriz.size(); i++)
00225       if (maxentry<fabs(_fVert[i])) maxentry = fabs(_fVert[i]);
00226   } else {
00227     float maxval=0, minval=0;
00228     // get sum of absolute values
00229     norml1 = _fKernel.NormL1();
00230     _fKernel.GetMaxMin(maxval, minval);
00231     maxentry = (fabs(maxval)>fabs(minval))?fabs(maxval):fabs(minval);
00232   }
00233   // compute dual logarithm of norm
00234   norml1 = (float)(log(norml1)/log(2.0));
00235   int ScaleBits = (int)ceil(norml1);
00236
00237   // if the filter mask does not sum to unity, ScaleBits contains the number
00238   // of bits to be subtracted from the maximum possible number here.
00239   // ScaleBits can also be negative here, if the float entries sum up to
00240   // a very small number, e.g. 0.2
00241
00242   // now subtract from buffer size: 1.) input data size 2.)norm of mask bits
00243   ScaleBits = NumberOfBitsInTempData-NumberOfBitsInInputData-ScaleBits;
00244   BIASDOUT(D_FM_PRECISION,"ScaleBits are "<<ScaleBits<<" MaxEntry:"<<maxentry);
00245
00246   // in principle we are ready, but in an int of type FM_INT, we can only hold
00247   // a limited number of bits, so check that limit also:
00248   double thetest1 = maxentry * pow(2.0, (double)ScaleBits);
00249   FM_INT thetest2 =
00250     (FM_INT)trunc((double)maxentry*pow(2.0, (double)ScaleBits));
00251   if ((long)thetest1!=(long)thetest2) {
00252     // compute dual logarithm of absolutely largest entry
00253     norml1 = (float)(log(maxentry)/log(2.0));
00254     // largest power-of-2-scaling of largest entry which fits into FM_INT
00255     ScaleBits = ((sizeof(FM_INT)*8-1)-(int)ceil(norml1));
00256     BIASDOUT(D_FM_PRECISION,"int filter content check failed:"
00257              <<(FM_INT)thetest1<<" != "
00258              <<thetest2<<" maxentry is "<<maxentry<<" reducing scalebits to "
00259              <<ScaleBits);
00260
00261   }
00262   return ScaleBits;
00263 }
00264
00265
00266
00267
00268 ostream& BIAS::operator<<(ostream& os, const FilterMask& fm) {
00269   if (fm._Separable) {
00270     os<<"filter mask in separated representation (integer): h="<< fm._sHoriz
00271       <<" with right shift "<< fm._HorizRightShift
00272       <<" v="<<fm._sVert<<" with right shift "<<fm._VertRightShift<<endl;
00273     os <<" the filter mask in separated representation (floating point) h="
00274        <<fm._fHoriz<<" v="<<fm._fVert<<endl;
00275   } else {
00276     os<<"filter mask for integer type convolution:"<<fm._sKernel
00277       <<" with right shift of "<<fm._KernelRightShift<<endl
00278       <<"filter mask for floating point type convolution: " << fm._fKernel;
00279   }
00280
00281   return os;
00282 }
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterMask.hh Source File

Filter

FilterMask.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FILTERMASK_hh__
00027 #define __FILTERMASK_hh__
00028
00029 #include <Base/Image/Image.hh>
00030 #include <Base/Math/Matrix.hh>
00031 #include <Base/Math/Vector.hh>
00032
00033 /// define the type used in the floating point filter mask
00034 #define FM_FLOAT float
00035 /// define the type used in the integer filter mask
00036 #define FM_INT  short
00037 /// set other filter by default to zero ?
00038 #define FM_RESET_OTHER true
00039
00040 #define D_FM_PRECISION (1<<0)
00041 #define D_FM_INTAPPROX (1<<1)
00042
00043 namespace BIAS {
00044   /** @class FilterMask
00045       @ingroup g_filter
00046       @brief A filter mask (or a kernel) used for convolution
00047
00048       When convolving an image with a FilterMask f, that mask is at first
00049       reflected at its symmetry center. Afterwards for each pixel x a
00050       weighted (by the entries of f) sum of the pixels around x is computed
00051       and written into the output image. In case of integer filtering,
00052       the result is shifted by the appropriate right shift.
00053
00054       You can define a filter mask by specifying either the float values or
00055       the int values and computing the other type. You may also set both
00056       manually, set the initalltypes flag to false for that.
00057       If your filtermask is separable you have to call the vector-init to
00058       define that.
00059       @author skoglund, koeser, woelk 11/2004  */
00060
00061   class BIASFilter_EXPORT FilterMask:
00062     public Debug
00063   {
00064   public:
00065     FilterMask();
00066
00067     /** @brief calls operator= */
00068     FilterMask(const FilterMask& mask)
00069     { (*this) = mask; }
00070
00071     /** @brief calls Init
00072         @param ResetOtherType if true, sets other filter entries to zero */
00073     FilterMask(const Matrix<FM_INT> &kernel, int rs,
00074                bool ResetOtherType=FM_RESET_OTHER)
00075     { Init(kernel, rs, ResetOtherType); }
00076
00077     /** @brief calls Init */
00078     FilterMask(const Matrix<FM_FLOAT> &kernel,
00079                bool ResetOtherType=FM_RESET_OTHER)
00080     { Init(kernel, ResetOtherType); }
00081
00082     /** @brief calls Init */
00083     FilterMask(const Vector<FM_INT> &horz, const Vector<FM_INT> &vert,
00084                int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER)
00085     { Init(horz, vert, hrs, vrs, ResetOtherType); }
00086
00087     /** @brief calls Init */
00088     FilterMask(const Vector<FM_FLOAT> &horz, const Vector<FM_FLOAT> &vert,
00089                bool ResetOtherType=FM_RESET_OTHER)
00090     { Init(horz, vert, ResetOtherType); }
00091
00092     /** @brief sets _sKernel and also _fKernel. _Separable is set to false */
00093     void Init(const Matrix<FM_INT> &kernel, int rs,
00094               bool ResetOtherType=FM_RESET_OTHER);
00095
00096     /** @brief sets _fKernel and also calculates the best int approximation
00097         int _sKernel. _Separable is set to false. */
00098     void Init(const Matrix<FM_FLOAT> &kernel,
00099               bool ResetOtherType=FM_RESET_OTHER);
00100
00101     /** @brief sets horz and vert vectors and their right shifts,
00102         _Separable is true, FM_FLOAT vectors are updated also */
00103     void Init(const Vector<FM_INT> &horz, const Vector<FM_INT> &vert,
00104               int hrs, int vrs, bool ResetOtherType=FM_RESET_OTHER);
00105
00106     /** @brief sets horz and vert vectors,
00107         _Separable is true, integer vectors are updated also */
00108     void Init(const Vector<FM_FLOAT> &horz, const Vector<FM_FLOAT> &vert,
00109               bool ResetOtherType=FM_RESET_OTHER);
00110
00111     /** @brief returns pointer to int filter mask */
00112     inline const Matrix<FM_INT>* GetKerneli() const
00113     { return &_sKernel; }
00114
00115     /** @brief returns pointer to float filter mask */
00116     inline const Matrix<FM_FLOAT>* GetKernelf() const
00117     { return &_fKernel; }
00118
00119     /** @brief returns pointer to horizontal int vector for sep. filtering */
00120     inline const Vector<FM_INT>* GetSepih() const
00121     { return &_sHoriz; }
00122
00123     /** @brief returns pointer to vertical int vector for sep. filtering */
00124     inline const Vector<FM_INT>* GetSepiv() const
00125     { return &_sVert; }
00126
00127     /** @brief returns pointer to horiz float vector for sep. filtering */
00128     inline const Vector<FM_FLOAT>* GetSepfh() const
00129     { return &_fHoriz; }
00130
00131     /** @brief returns pointer to vertical float vector for sep. filtering */
00132     inline const Vector<FM_FLOAT>* GetSepfv() const
00133     { return &_fVert; }
00134
00135     /** @brief checks if the kernel is separable */
00136     inline bool IsSeparable() const
00137     { return _Separable; }
00138
00139     /** @brief copy operator, copies ALL components */
00140     FilterMask &operator=(const FilterMask& src);
00141
00142     /** @brief returns right shift applied to data after int mask filtering */
00143     inline int GetKernelRightShift() const
00144     { return _KernelRightShift; }
00145
00146     /** @brief if separable, returns right shift after separated horizontal
00147         int filtering */
00148     inline int GetHorizRightShift() const
00149     { return _HorizRightShift; }
00150
00151     /** @brief if separable, returns right shift after separated vertical
00152         int filtering */
00153     inline int GetVertRightShift() const
00154     { return _VertRightShift; }
00155
00156     /** @brief create the float filter from the int filter */
00157     void CreateFloatFilter();
00158
00159     /** @brief create the int filter from the float filter */
00160     void CreateIntFilter(int rshift, int rshifth, int rshiftv);
00161
00162     /** @brief fill float filter with zeros, same dim as int filter */
00163     void ResetFloatFilter();
00164
00165     /** @brief fill int filter with zeros, same dim as float filter */
00166     void ResetIntFilter();
00167
00168
00169     /** @brief compute the number of shiftable bits for int-from-float mask
00170
00171         When you compute an int approximation of the float mask, you must
00172         avoid overflow. The weighted sum of the convolution is stored in
00173         the type CONV_INT, e.g. int, which means 31 bit range.
00174         The input data has typically 8 bit, so depending on the norm of the
00175         float filter mask, say 1.0 in this example, we can approximate
00176         a 0.3 entry in the float mask by and int entry = 0.3*(1<<(31-8))).
00177         This function computes the maximum possible shift.
00178
00179         @param NumberOfBitsInInputData typically sizeof(InputImageType)*8
00180         @param NumberOfBitsInTempData typically sizeof(CONV_INT)*8-1
00181         @return number of possible shifts in int mask approximation
00182     */
00183     int ComputeIntPrecisionBits(int NumberOfBitsInInputData,
00184                                 int NumberOfBitsInTempData);
00185
00186     /** @brief reset data, all kernel to zero, separable to false */
00187     inline void SetZero() {
00188       if (_sKernel.num_rows()>0) _sKernel.SetZero();
00189       if (_fKernel.num_rows()>0) _fKernel.SetZero(); _Separable=false;}
00190
00191     /** @brief transposes the kernel (and adapts all dependent data) */
00192     void Transpose() ;
00193
00194     /** returns true if size is 1 by one
00195         @author woelk 05/2005 */
00196     inline bool IsSize1x1()
00197     { int h, v; GetSize(h, v); return (h==1 && v==1); }
00198
00199     /** returns the size of the Kernel
00200         @author woelk 05/2005 */
00201     inline void GetSize(int& hor, int& vert) const
00202     { if (_Separable) { hor=_fHoriz.size(); vert=_fVert.Size(); }
00203       else { hor=_fKernel.num_cols(); vert=_fKernel.num_rows(); } }
00204
00205     friend std::ostream& operator<<(std::ostream& os, const FilterMask& fm);
00206   protected:
00207     /// the filter mask if we have a integer type convolution
00208     Matrix<FM_INT> _sKernel;
00209     /// the filter mask if we have a floating type convolution
00210     Matrix<FM_FLOAT> _fKernel;
00211     /// the filter mask in separated representation (integer)
00212     Vector<FM_INT> _sHoriz, _sVert;
00213     /// the filter mask in separated representation (floating point)
00214     Vector<FM_FLOAT> _fHoriz, _fVert;
00215     /// flag indicating if the 2 vectors or the matrix should be used as
00216     /// kernel representation
00217     bool _Separable;
00218     /// the shifts used for the integer filter masks
00219     int _KernelRightShift, _HorizRightShift, _VertRightShift;
00220
00221
00222   }; // class
00223
00224
00225
00226 } // namespace
00227
00228 #endif // __FilterMask_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo2N.cpp Source File

Filter

FilterNTo2N.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FilterNTo2N.hh"
00027
00028
00029 using namespace BIAS;
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 #include <Base/Common/BIASpragma.hh>
00035
00036 template <class InputStorageType, class OutputStorageType>
00037 FilterNTo2N<InputStorageType, OutputStorageType>::
00038 FilterNTo2N()
00039   :FilterBase<InputStorageType, OutputStorageType>()
00040 {
00041   _VecLengthType=new int;
00042   *_VecLengthType=VLT_L2;
00043 }
00044
00045 template <class InputStorageType, class OutputStorageType>
00046 FilterNTo2N<InputStorageType, OutputStorageType>::
00047 FilterNTo2N(Param& para, const std::string& postfix)
00048   :FilterBase<InputStorageType, OutputStorageType>(para, "-FilterNTo2N"+postfix)
00049 {
00050   int grp=para.GetFreeGroupID();
00051   _AddParam(para, grp, "-FilterNTo2N"+postfix);
00052   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "FilterNTo2N");
00053 }
00054
00055 template <class InputStorageType, class OutputStorageType>
00056 FilterNTo2N<InputStorageType, OutputStorageType>::
00057 FilterNTo2N(Param& para, const int group_id, const std::string& postfix)
00058   :FilterBase<InputStorageType, OutputStorageType>(para, group_id, "-FilterNTo2N"+postfix)
00059 {
00060   _AddParam(para, group_id, "-FilterNTo2N"+postfix);
00061 }
00062
00063 template <class InputStorageType, class OutputStorageType>
00064 FilterNTo2N<InputStorageType, OutputStorageType>::~FilterNTo2N()
00065 {
00066   if (_ParamsAllocated && _VecLengthType) {
00067     delete _VecLengthType; _VecLengthType=NULL;
00068   }
00069 }
00070
00071 template <class InputStorageType, class OutputStorageType>
00072 int FilterNTo2N<InputStorageType, OutputStorageType>::
00073 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00074 {
00075   BIASERR("empty");
00076   return -1;
00077 }
00078
00079 template <class InputStorageType, class OutputStorageType>
00080 int FilterNTo2N<InputStorageType, OutputStorageType>::
00081 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00082 {
00083   BIASERR("empty");
00084   return -1;
00085 }
00086
00087 template <class InputStorageType, class OutputStorageType>
00088 int FilterNTo2N<InputStorageType, OutputStorageType>::
00089 FilterFloat(const Image<InputStorageType>& src,Image<OutputStorageType>& dst)
00090 {
00091   BIASERR("empty");
00092   return -1;
00093 }
00094
00095 template <class InputStorageType, class OutputStorageType>
00096 int FilterNTo2N<InputStorageType, OutputStorageType>::
00097 Filter(const Image<InputStorageType>& src,Image<OutputStorageType>& dst1,
00098        Image<OutputStorageType>& dst2)
00099 {
00100   BIASERR("empty");
00101   return -1;
00102 }
00103
00104 template <class InputStorageType, class OutputStorageType>
00105 int FilterNTo2N<InputStorageType, OutputStorageType>::
00106 FilterInt(const Image<InputStorageType>& src,Image<OutputStorageType>& dst1,
00107           Image<OutputStorageType>& dst2)
00108 {
00109   BIASERR("empty");
00110   return -1;
00111 }
00112
00113 template <class InputStorageType, class OutputStorageType>
00114 int FilterNTo2N<InputStorageType, OutputStorageType>::
00115 FilterFloat(const Image<InputStorageType>& src,Image<OutputStorageType>& dst1,
00116             Image<OutputStorageType>& dst2)
00117 {
00118   BIASERR("empty");
00119   return -1;
00120 }
00121
00122
00123 ////////////////////////////////////////////////////////////////////
00124 //   length algorithms
00125 ////////////////////////////////////////////////////////////////////
00126
00127 template <class InputStorageType, class OutputStorageType>
00128 int FilterNTo2N<InputStorageType,OutputStorageType>::
00129 VecLen(const Image<OutputStorageType>& gx,
00130        const Image<OutputStorageType>& gy,
00131        Image<OutputStorageType>& absg)
00132 {
00133   int res=0;
00134   switch (*_VecLengthType){
00135     case VLT_L1:
00136       res=VecLenL1(gx, gy, absg);
00137       break;
00138     case VLT_L2:
00139       res=VecLenL2(gx, gy, absg);
00140       break;
00141     case VLT_max:
00142       res=VecLenMax(gx, gy, absg);
00143       break;
00144   default:
00145     BIASERR("unknown VecLengthType "<<*_VecLengthType);
00146     res=-1;
00147     break;
00148   }
00149
00150   return res;
00151 }
00152
00153 template <class InputStorageType, class OutputStorageType>
00154 int FilterNTo2N<InputStorageType,OutputStorageType>::
00155 VecLenL1(const Image<OutputStorageType>& gx,
00156          const Image<OutputStorageType>& gy,
00157          Image<OutputStorageType>& absg)
00158 {
00159   BIASCDOUT(D_FILTERBASE_CALLSTACK, "FilterNTo2N::VecLenL1\n");
00160   unsigned htlx, htly, hbrx, hbry, vtlx, vtly, vbrx, vbry;
00161   gx.GetROI()->GetCorners(htlx, htly, hbrx, hbry);
00162   gy.GetROI()->GetCorners(vtlx, vtly, vbrx, vbry);
00163   const int minx=(htlx<vtlx)?vtlx:htlx;
00164   const int miny=(htly<vtly)?vtly:htly;
00165   const int maxx=(hbrx>vbrx)?vbrx:hbrx;
00166   const int maxy=(hbry>vbry)?vbry:hbry;
00167
00168   register int x, y;
00169   register OutputStorageType **gxi=gx.GetImageDataArray();
00170   register OutputStorageType **gyi=gy.GetImageDataArray();
00171   register OutputStorageType **absi=absg.GetImageDataArray();
00172
00173   for (y=miny; y<maxy; y++){
00174     for (x=minx; x<maxx; x++){
00175       absi[y][x]=(OutputStorageType)(fabs((double)(gxi[y][x]))+
00176                                      fabs((double)(gyi[y][x])));
00177     }
00178   }
00179
00180   absg.GetROI()->SetCorners(minx, miny, maxx, maxy);
00181
00182   return 0;
00183 }
00184
00185 template <class InputStorageType, class OutputStorageType>
00186 int FilterNTo2N<InputStorageType, OutputStorageType>::
00187 VecLenL2(const Image<OutputStorageType>& gx,
00188          const Image<OutputStorageType>& gy,
00189          Image<OutputStorageType>& absg)
00190 {
00191   BIASCDOUT(D_FILTERBASE_CALLSTACK, "FilterNTo2N::VecLenL2\n");
00192   unsigned htlx, htly, hbrx, hbry, vtlx, vtly, vbrx, vbry;
00193   gx.GetROI()->GetCorners(htlx, htly, hbrx, hbry);
00194   gy.GetROI()->GetCorners(vtlx, vtly, vbrx, vbry);
00195   const int minx=(htlx<vtlx)?vtlx:htlx;
00196   const int miny=(htly<vtly)?vtly:htly;
00197   const int maxx=(hbrx>vbrx)?vbrx:hbrx;
00198   const int maxy=(hbry>vbry)?vbry:hbry;
00199
00200   register int x, y;
00201   register OutputStorageType **gxi=gx.GetImageDataArray();
00202   register OutputStorageType **gyi=gy.GetImageDataArray();
00203   register OutputStorageType **absi=absg.GetImageDataArray();
00204
00205   for (y=miny; y<maxy; y++){
00206     for (x=minx; x<maxx; x++){
00207       absi[y][x]=
00208         (OutputStorageType)sqrt((double)(gxi[y][x])*(double)(gxi[y][x])+
00209                                 (double)(gyi[y][x])*(double)(gyi[y][x]));
00210     }
00211   }
00212
00213   absg.GetROI()->SetCorners(minx, miny, maxx, maxy);
00214
00215   return 0;
00216 }
00217
00218 template <class InputStorageType, class OutputStorageType>
00219 int FilterNTo2N<InputStorageType,OutputStorageType>::
00220 VecLenMax(const Image<OutputStorageType>& gx,
00221           const Image<OutputStorageType>& gy,
00222           Image<OutputStorageType>& absg)
00223 {
00224   BIASCDOUT(D_FILTERBASE_CALLSTACK, "FilterNTo2N::VecLenMax\n");
00225   unsigned htlx, htly, hbrx, hbry, vtlx, vtly, vbrx, vbry;
00226   gx.GetROI()->GetCorners(htlx, htly, hbrx, hbry);
00227   gy.GetROI()->GetCorners(vtlx, vtly, vbrx, vbry);
00228   const int minx=(htlx<vtlx)?vtlx:htlx;
00229   const int miny=(htly<vtly)?vtly:htly;
00230   const int maxx=(hbrx>vbrx)?vbrx:hbrx;
00231   const int maxy=(hbry>vbry)?vbry:hbry;
00232
00233   register int x, y;
00234   register OutputStorageType **gxi=gx.GetImageDataArray();
00235   register OutputStorageType **gyi=gy.GetImageDataArray();
00236   register OutputStorageType **absi=absg.GetImageDataArray();
00237
00238   for (y=miny; y<maxy; y++){
00239     for (x=minx; x<maxx; x++){
00240       absi[y][x]=(gxi[y][x]>=gyi[y][x])?(gxi[y][x]):(gyi[y][x]);
00241     }
00242   }
00243
00244   absg.GetROI()->SetCorners(minx, miny, maxx, maxy);
00245
00246   return 0;
00247 }
00248
00249 template <class InputStorageType, class OutputStorageType>
00250 void FilterNTo2N<InputStorageType, OutputStorageType>::
00251 _AddParam(Param& para, const int grp, const std::string& postfix)
00252 {
00253   vector<string> tt;
00254   vector<int> tti;
00255   tt.push_back("VLT_L1");
00256   tti.push_back(FilterNTo2N<InputStorageType,OutputStorageType>::VLT_L1);
00257   tt.push_back("VLT_L2");
00258   tti.push_back(FilterNTo2N<InputStorageType,OutputStorageType>::VLT_L2);
00259   tt.push_back("VLT_max");
00260   tti.push_back(FilterNTo2N<InputStorageType,OutputStorageType>::VLT_max);
00261
00262
00263   if (para.CheckParam("LengthType"+postfix)){
00264     _VecLengthType=para.GetParamEnum("LengthType"+postfix);
00265   } else {
00266     _VecLengthType=
00267       para.AddParamEnum("LengthType"+postfix,
00268                         "type of algorithm for calculating the vector length",
00269                         tt, VLT_L2, &tti, 0, grp);
00270   }
00271   para.SetEnhancedFlag("LengthType"+postfix, true);
00272 }
00273
00274 #define FILTER_INSTANTIATION_CLASS FilterNTo2N
00275 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00276 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo2N.hh Source File

Filter

FilterNTo2N.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FilterNTo2N_hh__
00027 #define __FilterNTo2N_hh__
00028
00029 #include "FilterBase.hh"
00030
00031
00032 namespace BIAS
00033 {
00034   /** @class FilterNTo2N
00035       @ingroup g_filter
00036       @brief base class for simple n->2n filter implementations
00037
00038       This is the base class for n->2n filters, i.e. for every input channel
00039       two output channels are generated by filters derived from this class.
00040
00041       @author skoglund, koeser, woelk 11/2004 */
00042
00043   template <class InputStorageType, class OutputStorageType>
00044   class BIASFilter_EXPORT FilterNTo2N :
00045     public FilterBase<InputStorageType, OutputStorageType>
00046   {
00047   public:
00048     /** algorithm used to calculate the absolute length of the 2D vector
00049         - VLT_L1:  | fabs(gx) + fabs(gy) |
00050         - VLT_L2:  sqrt(gx*gx+gy*gy)
00051         - VLT_max: max(fabs(gx), fabs(gy)) */
00052     enum EVecLengthType { VLT_L1, VLT_L2, VLT_max };
00053   public:
00054
00055     FilterNTo2N();
00056
00057     FilterNTo2N(Param& para, const std::string& postfix="");
00058
00059     FilterNTo2N(Param& para, const int group_id,
00060                    const std::string& postfix);
00061
00062     virtual ~FilterNTo2N();
00063
00064     /** dst.GetChannelCount()==2*src.GetCHannelCount() */
00065     virtual int Filter(const Image<InputStorageType>& src,
00066                        Image<OutputStorageType>& dst);
00067     virtual int FilterInt(const Image<InputStorageType>& src,
00068                           Image<OutputStorageType>& dst);
00069     virtual int FilterFloat(const Image<InputStorageType>& src,
00070                             Image<OutputStorageType>& dst);
00071
00072     /** dstX.GetChannelCount()==src.GetCHannelCount() */
00073     virtual int Filter(const Image<InputStorageType>& src,
00074                        Image<OutputStorageType>& dst1,
00075                        Image<OutputStorageType>& dst2);
00076     virtual int FilterInt(const Image<InputStorageType>& src,
00077                           Image<OutputStorageType>& dst1,
00078                           Image<OutputStorageType>& dst2);
00079     virtual int FilterFloat(const Image<InputStorageType>& src,
00080                             Image<OutputStorageType>& dst1,
00081                             Image<OutputStorageType>& dst2);
00082
00083     /** decides which vector length to use from *_VecLenthType
00084         @author woelk 12/2004 */
00085     int VecLen(const Image<OutputStorageType>& gx,
00086                const Image<OutputStorageType>& gy,
00087                Image<OutputStorageType>& length);
00088
00089     /** length = | fabs(gx) + fabs(gy) |
00090         destination absg must be initialized
00091         @author woelk 09/2004 */
00092     int VecLenL1(const Image<OutputStorageType>& gx,
00093                  const Image<OutputStorageType>& gy,
00094                  Image<OutputStorageType>& length);
00095
00096     /** length = sqrt(gx*gx+gy*gy)
00097         destination absg must be initialized
00098         @author woelk 09/2004 */
00099     int VecLenL2(const Image<OutputStorageType>& gx,
00100                  const Image<OutputStorageType>& gy,
00101                   Image<OutputStorageType>& length);
00102
00103     /** length = max(fabs(gx),fabs(gy))
00104         destination absg must be initialized
00105         @author woelk 09/2004 */
00106     int VecLenMax(const Image<OutputStorageType>& gx,
00107                   const Image<OutputStorageType>& gy,
00108                   Image<OutputStorageType>& length);
00109
00110   protected:
00111     /// of type Gradient<InputStorageType, OutputStorageType>::EVecLengthType
00112     int *_VecLengthType;
00113
00114     void _AddParam(Param& para, const int grp, const std::string& postfix);
00115
00116     using FilterBase<InputStorageType, OutputStorageType>::_ParamsAllocated;
00117
00118   }; // class
00119 } // namespace
00120
00121 #endif // __FilterNTo2N_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo3N.cpp Source File

Filter

FilterNTo3N.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FilterNTo3N.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 template <class InputStorageType, class OutputStorageType>
00034 FilterNTo3N<InputStorageType, OutputStorageType>::
00035 FilterNTo3N():
00036 FilterBase<InputStorageType, OutputStorageType>(){
00037 }
00038
00039 template <class InputStorageType, class OutputStorageType>
00040 FilterNTo3N<InputStorageType, OutputStorageType>::
00041 FilterNTo3N(Param& para, const std::string& postfix):
00042 FilterBase<InputStorageType, OutputStorageType>(para, postfix){
00043
00044 }
00045
00046 template <class InputStorageType, class OutputStorageType>
00047 FilterNTo3N<InputStorageType, OutputStorageType>::
00048 FilterNTo3N(Param& para, const int group_id,
00049                          const std::string& postfix):
00050 FilterBase<InputStorageType, OutputStorageType>(para, group_id, postfix){
00051
00052 }
00053
00054 template <class InputStorageType, class OutputStorageType>
00055 FilterNTo3N<InputStorageType, OutputStorageType>::~FilterNTo3N(){
00056
00057 }
00058
00059 template <class InputStorageType, class OutputStorageType>
00060 int FilterNTo3N<InputStorageType, OutputStorageType>::
00061 Filter(const Image<InputStorageType>& src,
00062        Image<OutputStorageType>& dst){
00063   BIASERR("empty");
00064   return -1;
00065 }
00066
00067 template <class InputStorageType, class OutputStorageType>
00068 int FilterNTo3N<InputStorageType, OutputStorageType>::
00069 FilterInt(const Image<InputStorageType>& src,
00070           Image<OutputStorageType>& dst){
00071   BIASERR("empty");
00072   return -1;
00073 }
00074
00075 template <class InputStorageType, class OutputStorageType>
00076 int FilterNTo3N<InputStorageType, OutputStorageType>::
00077 FilterFloat(const Image<InputStorageType>& src,
00078             Image<OutputStorageType>& dst){
00079   BIASERR("empty");
00080   return -1;
00081 }
00082
00083 template <class InputStorageType, class OutputStorageType>
00084 int FilterNTo3N<InputStorageType, OutputStorageType>::
00085 Filter(const Image<InputStorageType>& src,
00086        Image<OutputStorageType>& dst1,
00087        Image<OutputStorageType>& dst2,
00088        Image<OutputStorageType>& dst3){
00089   BIASERR("empty");
00090   return -1;
00091 }
00092
00093 template <class InputStorageType, class OutputStorageType>
00094 int FilterNTo3N<InputStorageType, OutputStorageType>::
00095 FilterInt(const Image<InputStorageType>& src,
00096           Image<OutputStorageType>& dst1,
00097           Image<OutputStorageType>& dst2,
00098           Image<OutputStorageType>& dst3){
00099   BIASERR("empty");
00100   return -1;
00101 }
00102
00103 template <class InputStorageType, class OutputStorageType>
00104 int FilterNTo3N<InputStorageType, OutputStorageType>::
00105 FilterFloat(const Image<InputStorageType>& src,
00106             Image<OutputStorageType>& dst1,
00107             Image<OutputStorageType>& dst2,
00108             Image<OutputStorageType>& dst3){
00109   BIASERR("empty");
00110   return -1;
00111 }
00112
00113 #define FILTER_INSTANTIATION_CLASS FilterNTo3N
00114 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00115 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNTo3N.hh Source File

Filter

FilterNTo3N.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FilterNTo3N_hh__
00027 #define __FilterNTo3N_hh__
00028
00029 #include "FilterBase.hh"
00030
00031
00032 namespace BIAS
00033 {
00034   /** @class FilterNTo3N
00035       @ingroup g_filter
00036       @brief base class for simple n->3n filter implementations
00037
00038       This is the base class for n->3n filters, i.e. for every input channel
00039       three output channels are generated by filters derived from this class.
00040
00041       @author skoglund, koeser, woelk 11/2004 */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASFilter_EXPORT FilterNTo3N :
00044     public FilterBase<InputStorageType, OutputStorageType>
00045   {
00046   public:
00047
00048     FilterNTo3N();
00049
00050     FilterNTo3N(Param& para, const std::string& postfix="");
00051
00052     FilterNTo3N(Param& para, const int group_id,
00053                 const std::string& postfix);
00054
00055     virtual ~FilterNTo3N();
00056
00057     /** dst.GetChannelCount()==3*src.GetCHannelCount() */
00058     virtual int Filter(const Image<InputStorageType>& src,
00059                        Image<OutputStorageType>& dst);
00060
00061     virtual int FilterInt(const Image<InputStorageType>& src,
00062                           Image<OutputStorageType>& dst);
00063
00064     virtual int FilterFloat(const Image<InputStorageType>& src,
00065                             Image<OutputStorageType>& dst);
00066
00067     /** dstX.GetChannelCount()==src.GetCHannelCount() */
00068     virtual int Filter(const Image<InputStorageType>& src,
00069                        Image<OutputStorageType>& dst1,
00070                        Image<OutputStorageType>& dst2,
00071                        Image<OutputStorageType>& dst3);
00072
00073     virtual int FilterInt(const Image<InputStorageType>& src,
00074                           Image<OutputStorageType>& dst1,
00075                           Image<OutputStorageType>& dst2,
00076                           Image<OutputStorageType>& dst3);
00077
00078     virtual int FilterFloat(const Image<InputStorageType>& src,
00079                             Image<OutputStorageType>& dst1,
00080                             Image<OutputStorageType>& dst2,
00081                             Image<OutputStorageType>& dst3);
00082
00083
00084   }; // class
00085 } // namespace
00086
00087 #endif // __FilterNTo3N_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNToN.cpp Source File

Filter

FilterNToN.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2004 (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #include "FilterNToN.hh"
00025
00026 using namespace BIAS;
00027 using namespace std;
00028
00029 template <class InputStorageType, class OutputStorageType>
00030 FilterNToN<InputStorageType, OutputStorageType>::
00031 FilterNToN()
00032 : FilterBase<InputStorageType, OutputStorageType>()
00033 { }
00034
00035 template <class InputStorageType, class OutputStorageType>
00036 FilterNToN<InputStorageType, OutputStorageType>::
00037 FilterNToN(Param& para, const std::string& postfix)
00038 : FilterBase<InputStorageType, OutputStorageType>(para, postfix)
00039 {}
00040
00041 template <class InputStorageType, class OutputStorageType>
00042 FilterNToN<InputStorageType, OutputStorageType>::
00043 FilterNToN(Param& para, const int group_id,
00044            const std::string& postfix)
00045 : FilterBase<InputStorageType, OutputStorageType>(para, group_id, postfix)
00046 {}
00047
00048 //////////////////////////////////////////////////////////////////////////
00049 //                 instantiation
00050 //////////////////////////////////////////////////////////////////////////
00051 #define FILTER_INSTANTIATION_CLASS FilterNToN
00052 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/FilterNToN.hh Source File

Filter

FilterNToN.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __FilterNToN_hh__
00027 #define __FilterNToN_hh__
00028
00029 #include "FilterBase.hh"
00030
00031
00032 namespace BIAS
00033 {
00034   /** @class FilterNToN
00035       @ingroup g_filter
00036       @brief base class for simple n->n filter implementations
00037
00038       This is the base class for n->n filters, i.e. for every input channel
00039       a single output channel is generated by filters derived from this class.
00040
00041       @author koeser, skoglund, woelk 11/2004 */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASFilter_EXPORT FilterNToN :
00044     public FilterBase<InputStorageType, OutputStorageType>
00045   {
00046   public:
00047
00048     FilterNToN();
00049
00050     FilterNToN(Param& para, const std::string& postfix="");
00051
00052     FilterNToN(Param& para, const int group_id,const std::string& postfix);
00053
00054     virtual ~FilterNToN(){};
00055
00056     /** virtual function for interface definition */
00057     virtual int Filter(const Image<InputStorageType>& src,
00058                        Image<OutputStorageType>& dst) = 0;
00059
00060     virtual int FilterInt(const Image<InputStorageType>& src,
00061                           Image<OutputStorageType>& dst) = 0;
00062
00063     virtual int FilterFloat(const Image<InputStorageType>& src,
00064                             Image<OutputStorageType>& dst) = 0;
00065
00066   protected:
00067
00068
00069   }; // class
00070 } // namespace
00071
00072 #endif // __FilterNToN_hh__
Generated on Wed Jun 21 19:00:57 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fmat.h Source File

Base » Math » tnt

fmat.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Fortran-compatible matrix: column oriented, 1-based (i,j) indexing
00035
00036 #ifndef FMAT_H
00037 #define FMAT_H
00038
00039 #include "subscript.h"
00040 #include "vec.h"
00041 #include <cstdlib>
00042 #include <cassert>
00043 #include <iostream>
00044 #include <sstream>
00045 #ifdef TNT_USE_REGIONS
00046 #include "region2d.h"
00047 #endif
00048
00049 // simple 1-based, column oriented Matrix class
00050
00051 namespace TNT
00052 {
00053
00054 template <class T>
00055 class Fortran_Matrix
00056 {
00057
00058
00059   public:
00060
00061     typedef         T   value_type;
00062     typedef         T   element_type;
00063     typedef         T*  pointer;
00064     typedef         T*  iterator;
00065     typedef         T&  reference;
00066     typedef const   T*  const_iterator;
00067     typedef const   T&  const_reference;
00068
00069     Subscript lbound() const { return 1;}
00070
00071   protected:
00072     T* v_;                  // these are adjusted to simulate 1-offset
00073     Subscript m_;
00074     Subscript n_;
00075     T** col_;           // these are adjusted to simulate 1-offset
00076
00077     // internal helper function to create the array
00078     // of row pointers
00079
00080     void initialize(Subscript M, Subscript N)
00081     {
00082         // adjust col_[] pointers so that they are 1-offset:
00083         //   col_[j][i] is really col_[j-1][i-1];
00084         //
00085         // v_[] is the internal contiguous array, it is still 0-offset
00086         //
00087         v_ = new T[M*N];
00088         col_ = new T*[N];
00089
00090         assert(v_  != NULL);
00091         assert(col_ != NULL);
00092
00093
00094         m_ = M;
00095         n_ = N;
00096         T* p = v_ - 1;
00097         for (Subscript i=0; i<N; i++)
00098         {
00099             col_[i] = p;
00100             p += M ;
00101
00102         }
00103         col_ --;
00104     }
00105
00106     void copy(const T*  v)
00107     {
00108         Subscript N = m_ * n_;
00109         Subscript i;
00110
00111 #ifdef TNT_UNROLL_LOOPS
00112         Subscript Nmod4 = N & 3;
00113         Subscript N4 = N - Nmod4;
00114
00115         for (i=0; i<N4; i+=4)
00116         {
00117             v_[i] = v[i];
00118             v_[i+1] = v[i+1];
00119             v_[i+2] = v[i+2];
00120             v_[i+3] = v[i+3];
00121         }
00122
00123         for (i=N4; i< N; i++)
00124             v_[i] = v[i];
00125 #else
00126
00127         for (i=0; i< N; i++)
00128             v_[i] = v[i];
00129 #endif
00130     }
00131
00132     void set(const T& val)
00133     {
00134         Subscript N = m_ * n_;
00135         Subscript i;
00136
00137 #ifdef TNT_UNROLL_LOOPS
00138         Subscript Nmod4 = N & 3;
00139         Subscript N4 = N - Nmod4;
00140
00141         for (i=0; i<N4; i+=4)
00142         {
00143             v_[i] = val;
00144             v_[i+1] = val;
00145             v_[i+2] = val;
00146             v_[i+3] = val;
00147         }
00148
00149         for (i=N4; i< N; i++)
00150             v_[i] = val;
00151 #else
00152
00153         for (i=0; i< N; i++)
00154             v_[i] = val;
00155
00156 #endif
00157     }
00158
00159
00160
00161     void destroy()
00162     {
00163         /* do nothing, if no memory has been previously allocated */
00164         if (v_ == NULL) return ;
00165
00166         /* if we are here, then matrix was previously allocated */
00167         delete [] (v_); v_ = NULL;
00168         col_ ++;                // changed back to 0-offset
00169         delete [] (col_); col_ = NULL;
00170     }
00171
00172
00173   public:
00174
00175     T* begin() { return v_; }
00176     const T* begin() const { return v_;}
00177
00178     T* end() { return v_ + m_*n_; }
00179     const T* end() const { return v_ + m_*n_; }
00180
00181
00182     // constructors
00183
00184     Fortran_Matrix() : v_(0), m_(0), n_(0), col_(0)  {};
00185     Fortran_Matrix(const Fortran_Matrix<T> &A)
00186     {
00187         initialize(A.m_, A.n_);
00188         copy(A.v_);
00189     }
00190
00191     Fortran_Matrix(Subscript M, Subscript N, const T& value = T())
00192     {
00193         initialize(M,N);
00194         set(value);
00195     }
00196
00197     Fortran_Matrix(Subscript M, Subscript N, const T* v)
00198     {
00199         initialize(M,N);
00200         copy(v);
00201     }
00202
00203
00204     Fortran_Matrix(Subscript M, Subscript N, char *s)
00205     {
00206         initialize(M,N);
00207         std::istringstream ins(s);
00208
00209         Subscript i, j;
00210
00211         for (i=1; i<=M; i++)
00212             for (j=1; j<=N; j++)
00213                 ins >> (*this)(i,j);
00214     }
00215
00216     // destructor
00217     ~Fortran_Matrix()
00218     {
00219         destroy();
00220     }
00221
00222
00223     // assignments
00224     //
00225     Fortran_Matrix<T>& operator=(const Fortran_Matrix<T> &A)
00226     {
00227         if (v_ == A.v_)
00228             return *this;
00229
00230         if (m_ == A.m_  && n_ == A.n_)      // no need to re-alloc
00231             copy(A.v_);
00232
00233         else
00234         {
00235             destroy();
00236             initialize(A.m_, A.n_);
00237             copy(A.v_);
00238         }
00239
00240         return *this;
00241     }
00242
00243     Fortran_Matrix<T>& operator=(const T& scalar)
00244     {
00245         set(scalar);
00246         return *this;
00247     }
00248
00249
00250     Subscript dim(Subscript d) const
00251     {
00252 #ifdef TNT_BOUNDS_CHECK
00253        assert( d >= 1);
00254         assert( d <= 2);
00255 #endif
00256         return (d==1) ? m_ : ((d==2) ? n_ : 0);
00257     }
00258
00259     Subscript num_rows() const { return m_; }
00260     Subscript num_cols() const { return n_; }
00261
00262     Fortran_Matrix<T>& newsize(Subscript M, Subscript N)
00263     {
00264         if (num_rows() == M && num_cols() == N)
00265             return *this;
00266
00267         destroy();
00268         initialize(M,N);
00269
00270         return *this;
00271     }
00272
00273
00274
00275     // 1-based element access
00276     //
00277     inline reference operator()(Subscript i, Subscript j)
00278     {
00279 #ifdef TNT_BOUNDS_CHECK
00280         assert(1<=i);
00281         assert(i <= m_) ;
00282         assert(1<=j);
00283         assert(j <= n_);
00284 #endif
00285         return col_[j][i];
00286     }
00287
00288     inline const_reference operator() (Subscript i, Subscript j) const
00289     {
00290 #ifdef TNT_BOUNDS_CHECK
00291         assert(1<=i);
00292         assert(i <= m_) ;
00293         assert(1<=j);
00294         assert(j <= n_);
00295 #endif
00296         return col_[j][i];
00297     }
00298
00299
00300 #ifdef TNT_USE_REGIONS
00301
00302     typedef Region2D<Fortran_Matrix<T> > Region;
00303     typedef const_Region2D< Fortran_Matrix<T> > const_Region;
00304
00305     Region operator()(const Index1D &I, const Index1D &J)
00306     {
00307         return Region(*this, I,J);
00308     }
00309
00310     const_Region operator()(const Index1D &I, const Index1D &J) const
00311     {
00312         return const_Region(*this, I,J);
00313     }
00314
00315 #endif
00316
00317
00318 };
00319
00320
00321 /* ***************************  I/O  ********************************/
00322
00323 template <class T>
00324 std::ostream& operator<<(std::ostream &s, const Fortran_Matrix<T> &A)
00325 {
00326     Subscript M=A.num_rows();
00327     Subscript N=A.num_cols();
00328
00329     s << M << " " << N << "\n";
00330
00331     for (Subscript i=1; i<=M; i++)
00332     {
00333         for (Subscript j=1; j<=N; j++)
00334         {
00335             s << A(i,j) << " ";
00336         }
00337         s << "\n";
00338     }
00339
00340
00341     return s;
00342 }
00343
00344 template <class T>
00345 std::istream& operator>>(std::istream &s, Fortran_Matrix<T> &A)
00346 {
00347
00348     Subscript M, N;
00349
00350     s >> M >> N;
00351
00352     if ( !(M == A.num_rows() && N == A.num_cols()))
00353     {
00354         A.newsize(M,N);
00355     }
00356
00357
00358     for (Subscript i=1; i<=M; i++)
00359         for (Subscript j=1; j<=N; j++)
00360         {
00361             s >>  A(i,j);
00362         }
00363
00364
00365     return s;
00366 }
00367
00368 // *******************[ basic matrix algorithms ]***************************
00369
00370
00371 template <class T>
00372 Fortran_Matrix<T> operator+(const Fortran_Matrix<T> &A,
00373     const Fortran_Matrix<T> &B)
00374 {
00375     Subscript M = A.num_rows();
00376     Subscript N = A.num_cols();
00377
00378     assert(M==B.num_rows());
00379     assert(N==B.num_cols());
00380
00381     Fortran_Matrix<T> tmp(M,N);
00382     Subscript i,j;
00383
00384     for (i=1; i<=M; i++)
00385         for (j=1; j<=N; j++)
00386             tmp(i,j) = A(i,j) + B(i,j);
00387
00388     return tmp;
00389 }
00390
00391 template <class T>
00392 Fortran_Matrix<T> operator-(const Fortran_Matrix<T> &A,
00393     const Fortran_Matrix<T> &B)
00394 {
00395     Subscript M = A.num_rows();
00396     Subscript N = A.num_cols();
00397
00398     assert(M==B.num_rows());
00399     assert(N==B.num_cols());
00400
00401     Fortran_Matrix<T> tmp(M,N);
00402     Subscript i,j;
00403
00404     for (i=1; i<=M; i++)
00405         for (j=1; j<=N; j++)
00406             tmp(i,j) = A(i,j) - B(i,j);
00407
00408     return tmp;
00409 }
00410
00411 // element-wise multiplication  (use matmult() below for matrix
00412 // multiplication in the linear algebra sense.)
00413 //
00414 //
00415 template <class T>
00416 Fortran_Matrix<T> mult_element(const Fortran_Matrix<T> &A,
00417     const Fortran_Matrix<T> &B)
00418 {
00419     Subscript M = A.num_rows();
00420     Subscript N = A.num_cols();
00421
00422     assert(M==B.num_rows());
00423     assert(N==B.num_cols());
00424
00425     Fortran_Matrix<T> tmp(M,N);
00426     Subscript i,j;
00427
00428     for (i=1; i<=M; i++)
00429         for (j=1; j<=N; j++)
00430             tmp(i,j) = A(i,j) * B(i,j);
00431
00432     return tmp;
00433 }
00434
00435
00436 template <class T>
00437 Fortran_Matrix<T> transpose(const Fortran_Matrix<T> &A)
00438 {
00439     Subscript M = A.num_rows();
00440     Subscript N = A.num_cols();
00441
00442     Fortran_Matrix<T> S(N,M);
00443     Subscript i, j;
00444
00445     for (i=1; i<=M; i++)
00446         for (j=1; j<=N; j++)
00447             S(j,i) = A(i,j);
00448
00449     return S;
00450 }
00451
00452
00453
00454 template <class T>
00455 inline Fortran_Matrix<T> matmult(const Fortran_Matrix<T>  &A,
00456     const Fortran_Matrix<T> &B)
00457 {
00458
00459 #ifdef TNT_BOUNDS_CHECK
00460     assert(A.num_cols() == B.num_rows());
00461 #endif
00462
00463     Subscript M = A.num_rows();
00464     Subscript N = A.num_cols();
00465     Subscript K = B.num_cols();
00466
00467     Fortran_Matrix<T> tmp(M,K);
00468     T sum;
00469
00470     for (Subscript i=1; i<=M; i++)
00471     for (Subscript k=1; k<=K; k++)
00472     {
00473         sum = 0;
00474         for (Subscript j=1; j<=N; j++)
00475             sum = sum +  A(i,j) * B(j,k);
00476
00477         tmp(i,k) = sum;
00478     }
00479
00480     return tmp;
00481 }
00482
00483 template <class T>
00484 inline Fortran_Matrix<T> operator*(const Fortran_Matrix<T> &A,
00485     const Fortran_Matrix<T> &B)
00486 {
00487     return matmult(A,B);
00488 }
00489
00490 template <class T>
00491 inline int matmult(Fortran_Matrix<T>& C, const Fortran_Matrix<T>  &A,
00492     const Fortran_Matrix<T> &B)
00493 {
00494
00495     assert(A.num_cols() == B.num_rows());
00496
00497     Subscript M = A.num_rows();
00498     Subscript N = A.num_cols();
00499     Subscript K = B.num_cols();
00500
00501     C.newsize(M,K);         // adjust shape of C, if necessary
00502
00503
00504     T sum;
00505
00506     const T* row_i;
00507     const T* col_k;
00508
00509     for (Subscript i=1; i<=M; i++)
00510     {
00511         for (Subscript k=1; k<=K; k++)
00512         {
00513             row_i = &A(i,1);
00514             col_k = &B(1,k);
00515             sum = 0;
00516             for (Subscript j=1; j<=N; j++)
00517             {
00518                 sum +=  *row_i * *col_k;
00519                 row_i += M;
00520                 col_k ++;
00521             }
00522
00523             C(i,k) = sum;
00524         }
00525
00526     }
00527
00528     return 0;
00529 }
00530
00531
00532 template <class T>
00533 Vector<T> matmult(const Fortran_Matrix<T>  &A, const Vector<T> &x)
00534 {
00535
00536 #ifdef TNT_BOUNDS_CHECK
00537     assert(A.num_cols() == x.dim());
00538 #endif
00539
00540     Subscript M = A.num_rows();
00541     Subscript N = A.num_cols();
00542
00543     Vector<T> tmp(M);
00544     T sum;
00545
00546     for (Subscript i=1; i<=M; i++)
00547     {
00548         sum = 0;
00549         for (Subscript j=1; j<=N; j++)
00550             sum = sum +  A(i,j) * x(j);
00551
00552         tmp(i) = sum;
00553     }
00554
00555     return tmp;
00556 }
00557
00558 template <class T>
00559 inline Vector<T> operator*(const Fortran_Matrix<T>  &A, const Vector<T> &x)
00560 {
00561     return matmult(A,x);
00562 }
00563
00564 template <class T>
00565 inline Fortran_Matrix<T> operator*(const Fortran_Matrix<T>  &A, const T &x)
00566 {
00567     Subscript M = A.num_rows();
00568     Subscript N = A.num_cols();
00569
00570     Subscript MN = M*N;
00571
00572     Fortran_Matrix<T> res(M,N);
00573     const T* a = A.begin();
00574     T* t = res.begin();
00575     T* tend = res.end();
00576
00577     for (t=res.begin(); t < tend; t++, a++)
00578         *t = *a * x;
00579
00580     return res;
00581 }
00582
00583 }  // namespace TNT
00584 #endif
00585 // FMAT_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrix.cpp Source File

Geometry

FMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "FMatrix.hh"
00027 #include "Base/Geometry/KMatrix.hh"
00028 #include <MathAlgo/SVD.hh>
00029 #include <Base/Math/Vector3.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034
00035 #define F_SVD_THRESH 0.1
00036
00037
00038 void FMatrix::ComputeFromPMatrices(BIAS::PMatrix &P1,
00039                                    BIAS::PMatrix &P2) {
00040
00041   // invert P1 to get backprojected rays of coordinates
00042   BIAS::PMatrix P1Inv;
00043   P1.GetPseudoInverse(P1Inv);
00044
00045   // get center1, which is the null vector of P1
00046   HomgPoint3D C1;
00047   P1.GetNullVector(C1);
00048
00049   // get epipol in image 2
00050   BIAS::HomgPoint2D e(P2 * C1);
00051
00052   // get cross product matrix of epipol
00053   BIAS::Matrix3x3<double> e_x(e.GetSkewSymmetricMatrix());
00054
00055   // compose all
00056   (*this) = Matrix3x3<double>(e_x * P2 * P1Inv);
00057 }
00058
00059
00060
00061 int FMatrix::GetEpipoles(HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const
00062 {
00063   SVD svdF ( (*this), F_SVD_THRESH );
00064 #ifdef BIAS_DEBUG
00065   if ((GetDebugLevel() & D_FMATRIX_GETEPIPOLES)!=0){
00066     BIAS::FMatrix FCopy = (*this);
00067     cerr << "F: " << FCopy;
00068     Matrix3x3<double> S;
00069     S.SetIdentity();
00070     for (int i=0; i<3; i++)
00071       S[i][i]=svdF.GetS()[i];
00072
00073     cerr << "U:" << svdF.GetU() << "\tS: " << svdF.GetS() << "\tV: "
00074          << svdF.GetVT() << "\n U S Vt:"
00075          << svdF.GetU() * S * svdF.GetVT() << "\nF:" << FCopy << endl;
00076     cerr << "NullspaceDim(): " << svdF.NullspaceDim() << endl;
00077   }
00078 #endif
00079   Vector<double> Ep1, Ep2;
00080   if (!svdF.GetNullvector(Ep1)) {
00081     Epipole1.Set(0,0,0);
00082     return -1;
00083   }
00084   Epipole1 = Ep1;
00085   Epipole1.Normalize();
00086   if (!svdF.GetLeftNullvector(Ep2)) {
00087     Epipole2.Set(0,0,0);
00088     return -2;
00089   }
00090   Epipole2 = Ep2;
00091   Epipole2.Normalize();
00092   return 0;
00093 }
00094
00095 /*-----------------------------------------------------------------
00096   decompose a f matrix to (skew)(rank3).
00097   ----------------------------------------*/
00098 void FMatrix::DecomposetoSR(BIAS::Matrix3x3<double> &skew_matrix,
00099                             BIAS::Matrix3x3<double> &rank3_matrix)
00100
00101 {
00102   HomgPoint2D Epipole1, Epipole2;
00103   GetEpipoles(Epipole1, Epipole2);
00104
00105   //ma2_static_trivec_to_crossmatrix (&epipole2_trivec, cross_matrix);
00106   skew_matrix.SetAsCrossProductMatrix(Epipole2);
00107
00108   //ma2_static_multiply_3x3_3x3 (cross_matrix, f_matrix, rank3_matrix);
00109   rank3_matrix=skew_matrix*(*this);
00110 }
00111
00112 FMatrix& FMatrix::operator=(const FMatrix& f)
00113 {
00114   FMatrixBase::operator=(f);
00115   return *this;
00116 }
00117
00118
00119 bool FMatrix::IsValid()
00120 {
00121   /* result is true by default.
00122      The wrong cases should be intercepted by if-clauses.
00123      The first one that matches permanently sets the result to false.
00124      mdunda 08 2003 */
00125   bool result=true;
00126
00127   SVD svdF ( (*this) );
00128
00129   // The nullspace dimension should be 1. In that case the rank is 2.
00130   int dimN=svdF.NullspaceDim();
00131   if ( dimN != 1 )
00132     {
00133       BIASERR("F-Matrix invalid due to wrong nullspace dimension."
00134           << "dim(N)=" << dimN);
00135       result=false;
00136     }
00137   return result;
00138 }
00139
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrix.hh Source File

Geometry

FMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_FMatrix_hh__
00027 #define __BIAS_FMatrix_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Geometry/FMatrixBase.hh>
00033 #include <Geometry/PMatrix.hh>
00034
00035 #define D_FMATRIX_GETEPIPOLES 0x0001
00036
00037 namespace BIAS {
00038   /** @class FMatrix
00039       @ingroup g_geometry
00040       @brief class representing a Fundamental matrix
00041
00042       A fundemantal matrix describes the orientation and position of
00043       two image planes. It can be used to estimate the epipolarline and to
00044       distinguish between mismatches and good matches */
00045   class BIASGeometry_EXPORT FMatrix : public FMatrixBase, public Debug
00046   {
00047   public:
00048     FMatrix() : Debug()
00049     {};
00050
00051     explicit FMatrix(const MatrixInitType& i)
00052       : FMatrixBase(i){};
00053
00054     FMatrix(const FMatrix& f) : FMatrixBase(f)
00055     {};
00056
00057     FMatrix(const FMatrixBase& f) : FMatrixBase(f) {};
00058
00059     FMatrix(const Matrix3x3<FMATRIX_TYPE>& f) : FMatrixBase(f) {};
00060
00061     /** @brief computes an F matrix from two cameras (defined by arbitrary
00062         P matrices, not only metric ones)
00063         @author koeser 09/2003 */
00064     FMatrix(BIAS::PMatrix &P1, BIAS::PMatrix &P2) : FMatrixBase()
00065     { ComputeFromPMatrices(P1, P2); };
00066
00067     ~FMatrix() {};
00068
00069     FMatrix& operator=(const FMatrix& f);
00070
00071     /** @brief computes an F matrix from two cameras (defined by arbitrary
00072         P matrices, not only metric ones)
00073         @author koeser, updated 07/2004 */
00074     void ComputeFromPMatrices(BIAS::PMatrix &P1, BIAS::PMatrix &P2);
00075
00076     /** @brief Computes the epipoles from this F Matrix
00077         @return 0 on success, <0 if epipoles could not be retrieved
00078         @author JMF/koeser **/
00079     int GetEpipoles(HomgPoint2D &Epipole1, HomgPoint2D &Epipole2) const;
00080
00081     /** @brief same as above, additionally homogenizes epipoles  */
00082     inline void GetEpipolesHomogenized(HomgPoint2D &E1,
00083                                        HomgPoint2D &E2) const
00084     { GetEpipoles(E1, E2); E1.Homogenize(); E2.Homogenize(); };
00085
00086
00087     /** @brief Decomposes f matrix to product (skew)(rank3) */
00088     void DecomposetoSR(BIAS::Matrix3x3<double> &skew_matrix,
00089                        BIAS::Matrix3x3<double> &rank3_matrix);
00090
00091     /** @brief Returns true if all properties of the F-Matrix are correct,
00092         at the moment only rank 2 is checked
00093         @author mdunda 08 2003 **/
00094     bool IsValid();
00095
00096
00097     inline FMatrix& operator=(const Matrix3x3<FMATRIX_TYPE>& f){
00098       Matrix3x3<double>::operator=(f);
00099       return *this;
00100     }
00101
00102   };
00103
00104
00105
00106 } // namespace BIAS
00107
00108
00109 #endif // __BIAS_FMatrix_hh__
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/FMatrixBase.cpp Source File

Base » Geometry

FMatrixBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "FMatrixBase.hh"
00026
00027 #include "HomgPoint3D.hh"
00028 #include "PMatrixBase.hh"
00029
00030 #include <Base/Common/BIASpragma.hh>
00031
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 FMatrixBase::~FMatrixBase()
00037 {}
00038
00039 FMATRIX_TYPE
00040 FMatrixBase::epipolarconstraintRemainder(const HomgPoint2D & pointSource,
00041                                          const HomgPoint2D & pointDest)
00042 {
00043
00044     // calculate p'T * F * p
00045     HomgPoint2D vec;
00046     vec = (*this) * pointDest;
00047
00048     FMATRIX_TYPE sum;
00049     sum = vec.ScalarProduct( pointDest );
00050     return sum;
00051 }
00052
00053
00054
00055
00056
00057 /** Returns epipolar line in image 1 for point in image 2. */
00058 HomgLine2D FMatrixBase::GetEpipolarLineImage1(const HomgPoint2D& point) const
00059 {
00060    HomgLine2D homline;
00061    GetEpipolarLineImage1(point,homline);
00062    return homline;
00063 }
00064
00065 void FMatrixBase::GetEpipolarLineImage1(const HomgPoint2D& point,
00066                                         HomgLine2D& homline) const {
00067
00068   const register FMATRIX_TYPE *matP = this->GetData();
00069   homline[0] = point[0] * matP[0]
00070       + point[1] * matP[3]
00071       + point[2] * matP[6];
00072   homline[1] = point[0] * matP[1]
00073     + point[1] * matP[4]
00074     + point[2] * matP[7];
00075   homline[2] = point[0] * matP[2]
00076     + point[1] * matP[5]
00077     + point[2] * matP[8];
00078 }
00079
00080 /** Returns epipolar line in image 2 for point in image 1. */
00081 HomgLine2D FMatrixBase::GetEpipolarLineImage2(const HomgPoint2D& point) const
00082 {
00083   HomgLine2D homline((*this)*point);
00084   return homline;
00085 }
00086
00087 void FMatrixBase::GetEpipolarLineImage2(const HomgPoint2D& point,
00088                                         HomgLine2D& homline) const
00089 {
00090   homline=HomgLine2D((*this)*point);
00091 }
00092
00093 void FMatrixBase::Compose(const RMatrixBase& R1, const Vector3<double>& C1,
00094                           const RMatrixBase& R2, const Vector3<double>& C2)
00095 {
00096   RMatrixBase R;
00097   (R2.Transpose()).Mult(R1, R);
00098   HomgPoint2D e;
00099   HomgPoint3D C1h(C1);
00100   PMatrixBase P(R2, C2);
00101   e=P*C1h;
00102   e.Homogenize();
00103   Matrix3x3<double> ec;
00104   ec.SetAsCrossProductMatrix(e);
00105   ec.Mult(R, *this);
00106 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/FMatrixBase.hh Source File

Base » Geometry

FMatrixBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_FMatrixBase_hh_
00027 #define _BIAS_FMatrixBase_hh_
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032
00033 #include <Base/Math/Matrix3x3.hh>
00034 #include <Base/Math/Vector3.hh>
00035
00036 #include "RMatrixBase.hh"
00037 #include "KMatrix.hh"
00038 #include "HomgPoint2D.hh"
00039 #include "HomgLine2D.hh"
00040
00041
00042 #define FMATRIX_TYPE double
00043 namespace BIAS {
00044
00045   /** @class FMatrixBase
00046       @ingroup g_geometry
00047       @brief describes the epipolar relationship between a point and his
00048       mapping on a corresponding epipolar line.
00049
00050       The 3x3 matrix F is the fundamental matrix of an image pair (b1, b2).
00051       In particular, with p' = transpose(p) this results in the epipolar
00052       constraint:
00053       p1' F p2 = 0 for every pair (p1, p2) of corresponding image points in
00054       b1 and b2 respectively.
00055
00056       Only implementation very specific to FMatrixBase (and not valid for a
00057       general 3x3 matrix) should be implemented here.
00058       @author Jan Woetzel
00059       @status untested (04/18/2002) now derived from Matrix3x3 and not
00060       directly from Matrix<double>
00061       status alpha (02/26/2002)
00062       @todo -better inherit from a virtual base class Matrix3x3FixedSize **/
00063
00064
00065   class BIASGeometryBase_EXPORT FMatrixBase : public Matrix3x3<FMATRIX_TYPE> {
00066
00067   public:
00068
00069     /** destructor
00070         @status untested (04/18/2002) **/
00071     ~FMatrixBase();
00072
00073     /** default constructor
00074         @status untested (04/18/2002)**/
00075     FMatrixBase() : Matrix3x3<FMATRIX_TYPE>() { _isDecomposed=false; };
00076
00077     /** constructor setting identity or zero
00078         @brief author koeser **/
00079     explicit FMatrixBase(const MatrixInitType& i) :
00080       Matrix3x3<FMATRIX_TYPE>(i) {_isDecomposed=false; };
00081
00082     // DEPRECATED due to instantiation problem JW
00083     //explicit FMatrixBase(const char *s) : Matrix3x3<FMATRIX_TYPE>(s) { _isDecomposed=false; };
00084
00085     /** @author Jan Woetzel
00086         @status untested (04/18/2002) **/
00087     FMatrixBase(const Matrix3x3<FMATRIX_TYPE>& A)
00088       : Matrix3x3<FMATRIX_TYPE>(A)
00089     { _isDecomposed=false; };
00090
00091     /** constructor
00092         for convenience to build form a c-style aaray amtrix
00093         @author Jan Woetzel (07/15/2002)  **/
00094      explicit FMatrixBase(const FMATRIX_TYPE *d) {
00095       // get F from the c-style roww-wise data array d
00096       for (int i=0; i<9;i++) {
00097         (this->GetData())[i] = d[i];
00098       };
00099       _isDecomposed=false;
00100     };
00101
00102     /// see Set(Vector3<FMATRIX_TYPE>& epipole, RMatixBase& R);
00103     inline FMatrixBase(const Vector3<FMATRIX_TYPE>& epipole,
00104                        const RMatrixBase& R)
00105       : Matrix3x3<FMATRIX_TYPE>()
00106     { Set(epipole, R); }
00107
00108     /// see Set(Vector3<FMATRIX_TYPE>& epipole,
00109     ///         Vector3<FMATRIX_TYPE>& EulerAngXYZ);
00110     inline FMatrixBase(const Vector3<FMATRIX_TYPE>& epipole,
00111                        const Vector3<FMATRIX_TYPE>& EulerAngXYZ)
00112       : Matrix3x3<FMATRIX_TYPE>()
00113     { Set(epipole, EulerAngXYZ); };
00114
00115     /** assignment operators
00116         calling corresponding operator from base class "TNT::Matrix"
00117         if appropriate
00118         @author Jan Woetzel
00119         @status untested (04/18/2002)
00120         status alpha (02/25/2002) **/
00121     inline FMatrixBase &operator=(const Matrix3x3<FMATRIX_TYPE> &mat) {
00122       Matrix3x3<FMATRIX_TYPE>::operator=(mat);
00123       _isDecomposed=false;
00124       return *this;
00125     };
00126
00127     /** set it from epipole and rotation matrix
00128         in order to generate essential matrix from image 1 to image 2
00129         (i.e. generating the epipolar line in image 2, gfiven a point in
00130         image 1),  use epipole in second image and rotation matrix from image 1
00131         to image 2
00132         @author woelk 07/2004 */
00133     inline void Set(const Vector3<FMATRIX_TYPE>& epipole,
00134                     const RMatrixBase& R);
00135
00136     /** see constructor from epipole and rotation matrix
00137         builds rotation matrix in x, y, z order with moving axis
00138         see RMatrixBase
00139         @author woelk 07/2004 */
00140     inline void Set(const Vector3<FMATRIX_TYPE>& epipole,
00141                     const Vector3<FMATRIX_TYPE>& EulerAngXYZ);
00142
00143     /** set function, it is undocumented if this really works with the
00144         camer center C, I doubt it, woelk 12/2004 */
00145     inline void Set(RMatrixBase &R, Vector3<FMATRIX_TYPE> &C);
00146
00147
00148     /** @brief computes error in epipolar geometry for the given
00149         correspondence P1;P2
00150
00151         this error is the sum of squared distances to epipolar lines in both
00152         images, for inliers it should typically be of one or two pixels
00153         (if not-normalized pixel coordinates are used)
00154         @attention P1 and P2 HAVE TO BE homogenized
00155         @param P1 homogenized first point of correspondence to check
00156         @param P2 homogenized second point of correspondence to check
00157         @status tested, optimized
00158         @author koeser 09/2003 */
00159      inline double GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D& P1,
00160                                               const BIAS::HomgPoint2D& P2) const;
00161
00162     /** @brief computes error in epipolar geometry for the given
00163         correspondence P1,P2 using above function after homogenizing the points
00164         @author koeser 09/2003 */
00165     inline double GetEpipolarError(BIAS::HomgPoint2D& P1,
00166                                    BIAS::HomgPoint2D& P2)
00167     { P1.Homogenize(); P2.Homogenize();
00168     return GetEpipolarErrorHomogenized(P1,P2);}
00169
00170     /** returns the cosine of the angle bewteen epipolar line
00171         and match line */
00172     inline double GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D& p1,
00173                                               const BIAS::HomgPoint2D& p2);
00174
00175     /** calculates the remainder of the epipolar constraint
00176         with the corresponding points given as argument and this FMatrixBase.
00177         calculate the scalar :  pointDest'T * F *pointSource
00178         @author Jan Woetzel
00179         @status alpha (04/03/2002)**/
00180     FMATRIX_TYPE epipolarconstraintRemainder(const HomgPoint2D &pointSource,
00181                                              const HomgPoint2D & pointDest);
00182
00183     /** Returns epipolar line in image 1 for point in image 2. */
00184     HomgLine2D GetEpipolarLineImage1(const HomgPoint2D& point) const ;
00185
00186     /** Returns epipolar line in image 1 for point in image 2. */
00187     void GetEpipolarLineImage1(const HomgPoint2D& point,
00188                                HomgLine2D& homline) const;
00189
00190     /** Returns epipolar line in image 2 for point in image 1. */
00191     HomgLine2D GetEpipolarLineImage2(const HomgPoint2D& point) const;
00192
00193     /** Returns epipolar line in image 2 for point in image 1. */
00194     void GetEpipolarLineImage2(const HomgPoint2D& point,
00195                                HomgLine2D& homline) const;
00196
00197     /** constructs the Fmatrxi from image 1 to image 2 as
00198         [e]_x R
00199         @author woelk 08/2004 */
00200     void Compose(const KMatrix& K1, const RMatrixBase& R1,
00201                  const Vector3<double>& C1, const KMatrix& K2,
00202                  const RMatrixBase& R2, const Vector3<double>& C2);
00203
00204     /** constructs the FMatrix from image 1 to image 2 as
00205         [e]_x R, assumes K1=K2=Identity()
00206         @author woelk 08/2004 */
00207     void Compose(const RMatrixBase& R1, const Vector3<double>& C1,
00208                  const RMatrixBase& R2, const Vector3<double>& C2);
00209   protected:
00210     // cache for e and r
00211     bool _isDecomposed;
00212     HomgPoint2D _epipole;
00213     RMatrixBase _R;
00214
00215   }; // class FMatrixBase
00216
00217
00218   ///////////////////////////////////////////////////////////////////////////
00219   ///              implementation
00220   ///////////////////////////////////////////////////////////////////////////
00221
00222   void FMatrixBase::Set(const Vector3<FMATRIX_TYPE>& epipole,
00223                         const RMatrixBase& R)
00224   {
00225     Matrix3x3<FMATRIX_TYPE> e;
00226     HomgPoint2D he=epipole; he.Homogenize();
00227     e.SetAsCrossProductMatrix(he);
00228     e.Mult(R, *this);
00229     _isDecomposed=true;
00230     _epipole=he;
00231     _R=R;
00232   }
00233
00234   void FMatrixBase::Set(const Vector3<FMATRIX_TYPE>& epipole,
00235                         const Vector3<FMATRIX_TYPE>& EulerAngXYZ)
00236   {
00237     RMatrixBase R;
00238     R.SetXYZ(EulerAngXYZ[0], EulerAngXYZ[1], EulerAngXYZ[2]);
00239     Set(epipole, R);
00240   }
00241
00242   void FMatrixBase::Set(RMatrixBase &R, Vector3<FMATRIX_TYPE> &C){
00243     // We have two matrices, P0 = [id | 0] and P1 = [R^T | -R^TC]
00244     // Now compute essential matrix.
00245     // C0 = [0 0 0 1] mapped by P1 yields (-R^TC), the epipole in image 1
00246     // This must be in the left null space of E.
00247     // Vice versa C is directly the epipole in image 0 and must be
00248     // in the right null space of E
00249
00250     // this sets the left null space to what we want:
00251     (*this).SetAsCrossProductMatrix(R.Transpose()*C);
00252     // Unfortunately, the right null space of (*this) is now also R^T*C,
00253     // right-multiplying by R^T corrects for that problem:
00254     (*this) = (*this)*R.Transpose();
00255   }
00256
00257   double FMatrixBase::GetEpipolarErrorHomogenized(const BIAS::HomgPoint2D& P1,
00258                                                   const BIAS::HomgPoint2D& P2) const
00259   {
00260     /*
00261     // old version, quite slow but readable ;-)
00262
00263     // use F Matrix to get epipolar line in other image
00264     static BIAS::HomgLine2D EpiLineInImage;
00265     F.GetEpipolarLineImage1(P2,EpiLineInImage);
00266
00267     // compute (perpendicular) distance of point to line and square it
00268     double dError1 = EpiLineInImage.DistanceSquared(P1);
00269
00270     // do the same for the inverse direction and add error value
00271     F.GetEpipolarLineImage2(P1,EpiLineInImage);
00272
00273     double dErrorAll = (dError1 + EpiLineInImage.DistanceSquared(P2));
00274     return dErrorAll;
00275
00276     */
00277     static BIAS::HomgLine2D EL;
00278
00279     // computation of epipolar line relying on homogenized point
00280     const register double *matP = GetData();
00281     EL[0] = P2[0] * matP[0]
00282       + P2[1] * matP[3]
00283       + matP[6];
00284     EL[1] = P2[0] * matP[1]
00285       + P2[1] * matP[4]
00286       + matP[7];
00287     EL[2] = P2[0] * matP[2]
00288       + P2[1] * matP[5]
00289       + matP[8];
00290
00291     double dist = EL[0] * P1[0] + EL[1] * P1[1] + EL[2];
00292     // dist is now = x'Fx (zero for perfect correspondence)
00293
00294     double dError = dist = dist * dist;
00295     dError /= (EL[0]*EL[0]+EL[1]*EL[1]);
00296     // dError containts now the perpendicular distance to epiline in image1
00297
00298     // do the same for the inverse direction and add error value
00299     // EL = F * P1:
00300     EL[0] = matP[0]*P1[0]+ matP[1]*P1[1] + matP[2];
00301     EL[1] = matP[3]*P1[0]+ matP[4]*P1[1] + matP[5];
00302     // EL[2] is not needed
00303
00304     return (dError + (dist / (EL[0]*EL[0]+EL[1]*EL[1])));
00305
00306   }
00307
00308   /// @todo optimze
00309   double FMatrixBase::GetCosAngleErrorHomogenized(const BIAS::HomgPoint2D& p1,
00310                                                   const BIAS::HomgPoint2D& p2)
00311   {
00312     BIASASSERT(_isDecomposed);
00313     double result;
00314     HomgLine2D l1, l2;
00315     HomgPoint2D rcp2;
00316     // l1 is the line between the epipole an p1
00317     l1.Set(_epipole, p1);
00318     l1.Homogenize();
00319     // now apply 'homography' to p2
00320     _R.Mult(p2, rcp2);
00321     // l2 is the line between p1 and R*p2
00322     l2.Set(p1, rcp2);
00323     l2.Homogenize();
00324     // now calculate the angle between these two lines
00325     result=l1[0]*l2[0]+l1[1]*l2[1];
00326     // crop inaccurate results
00327     if (result>=1.0) { result=1.0; }
00328     if (result<=-1.0) { result=-1.0; }
00329     BIASASSERT(result>=-1.0 && result <=1.0);
00330     return 1.0-result;
00331   }
00332
00333 } // namespace
00334 #endif // FMatrixBase
00335
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrixEstimation.cpp Source File

Geometry

FMatrixEstimation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "FMatrixEstimation.hh"
00026 #include "MathAlgo/SVD.hh"
00027 #include "Parametrization.hh"
00028 #include "MathAlgo/Minpack.hh"
00029 #include "Base/Geometry/KMatrix.hh"
00030
00031 #include <Base/Common/BIASpragma.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 FMatrixEstimation *pCurrentObject = NULL;
00037 Parametrization *Para = NULL;
00038
00039
00040 void FErrorFunction(int *m, int *n, double *x,
00041                     double *fvec, int *iflag) {
00042   vector<double> params;
00043   params.reserve(7);
00044   for (unsigned int i=0; i<7; i++) params.push_back(x[i]);
00045   BIAS::FMatrix F;
00046   Para->ParamsToFMatrix(F, params);
00047
00048   const unsigned int uiDataSize = pCurrentObject->p1_->size();
00049   const vector<BIAS::HomgPoint2D> &p1 = *pCurrentObject->p1_;
00050   const vector<BIAS::HomgPoint2D> &p2 = *pCurrentObject->p2_;
00051
00052   for (unsigned int j=0; j<uiDataSize; j++) {
00053     fvec[j] = F.GetEpipolarErrorHomogenized(p1[j], p2[j]);
00054   }
00055 }
00056
00057
00058
00059 int FMatrixEstimation::SevenPoint(std::vector<BIAS::FMatrix>& vecF,
00060                                   const std::vector<BIAS::HomgPoint2D> &p1,
00061                                   const std::vector<BIAS::HomgPoint2D> &p2) {
00062 #ifdef BIAS_DEBUG
00063   if ((p1.size()!=7) || (p2.size()!=7)) {
00064     BIASERR("Must provide 7 point correspondences for 7-Point algorithm"
00065             <<"p1.size="<<p1.size()<<"p2.size="<<p2.size());
00066     BIASABORT;
00067   }
00068 #endif
00069
00070   const std::vector<BIAS::HomgPoint2D> *pp1 = &p1;
00071   const std::vector<BIAS::HomgPoint2D> *pp2 = &p2;
00072   std::vector<BIAS::HomgPoint2D> p1norm;
00073   std::vector<BIAS::HomgPoint2D> p2norm;
00074   KMatrix K1, K2;
00075   if (NormalizeHartley_) {
00076     // for (unsigned int i=0; i<7; i++) cout <<" " <<p1[i];
00077     N_.Hartley(p1, p1norm, K1);
00078     // for (unsigned int i=0; i<7; i++) cout <<" " <<p2[i];
00079     N_.Hartley(p2, p2norm, K2);
00080     pp1 = &p1norm;
00081     pp2 = &p2norm;
00082   }
00083
00084   // determine rank of equation system
00085   BIAS::Matrix<double> A(7, 9);
00086
00087   for (unsigned int i=0; i<7; i++) {
00088     // run over all rows of A (and all point correspondences)
00089     A[i][0] = (*pp1)[i][0] * (*pp2)[i][0];
00090     A[i][1] = (*pp1)[i][1] * (*pp2)[i][0];
00091     A[i][2] =                (*pp2)[i][0];
00092     A[i][3] = (*pp1)[i][0] * (*pp2)[i][1];
00093     A[i][4] = (*pp1)[i][1] * (*pp2)[i][1];
00094     A[i][5] =                (*pp2)[i][1];
00095     A[i][6] = (*pp1)[i][0];
00096     A[i][7] = (*pp1)[i][1];
00097     A[i][8] = 1;
00098   }
00099
00100   BIAS::SVD A_SVD(A);
00101   Vector<double> f1(9),f2(9);
00102   if (!A_SVD.GetNullvector(f1, 0)) {
00103     BIASERR("Error retrieving first F !");
00104   }
00105   if (!A_SVD.GetNullvector(f2, 1)) {
00106     BIASERR("Error retrieving second F !");
00107   }
00108
00109   // f1 and f2 span a 2dimensional null space of A
00110   // find matrix with rank<3 in this subspace:
00111   // impose constraint that det(alpha*f1+(1-alpha)*f2)=0)
00112   std::vector<POLYNOMIALSOLVE_TYPE> AlphaPolynomial, Alphas;
00113   GetDetPolynomial(f1, f2, AlphaPolynomial);
00114
00115   // solve for alpha
00116   PolynomialSolve Solver;
00117   Solver.CheckCoefficients(AlphaPolynomial);
00118   const unsigned int uiNumberSolutions =
00119     Solver.Analytic(AlphaPolynomial, Alphas);
00120
00121   vecF.resize(uiNumberSolutions);
00122   if (uiNumberSolutions==0) return -1;
00123
00124   // compute (1 or 3) solutions from weighting with alphas
00125   for (unsigned int i = 0; i<uiNumberSolutions; i++) {
00126     vecF[i].SetFromVector(f1*Alphas[i] + f2*(1.0-Alphas[i]));
00127     if (NormalizeHartley_)
00128       vecF[i] = K2.Transpose() * vecF[i] * K1;
00129   }
00130
00131   return 0;
00132 }
00133
00134 int FMatrixEstimation::Linear(BIAS::FMatrix& F,
00135                               const std::vector<BIAS::HomgPoint2D> &p1,
00136                               const std::vector<BIAS::HomgPoint2D> &p2) {
00137
00138   const std::vector<BIAS::HomgPoint2D> *pp1 = &p1;
00139   const std::vector<BIAS::HomgPoint2D> *pp2 = &p2;
00140   std::vector<BIAS::HomgPoint2D> p1norm;
00141   std::vector<BIAS::HomgPoint2D> p2norm;
00142   KMatrix K1, K2;
00143   if (NormalizeHartley_) {
00144     N_.Hartley(p1, p1norm, K1);
00145     N_.Hartley(p2, p2norm, K2);
00146     pp1 = &p1norm;
00147     pp2 = &p2norm;
00148   }
00149
00150   // determine rank of equation system
00151   BIAS::Matrix<double> A(p1.size(), 9);
00152
00153   for (unsigned int i=0; i<p1.size(); i++) {
00154     // run over all rows of A (and all point correspondences)
00155     A[i][0] = (*pp1)[i][0] * (*pp2)[i][0];
00156     A[i][1] = (*pp1)[i][1] * (*pp2)[i][0];
00157     A[i][2] =                (*pp2)[i][0];
00158     A[i][3] = (*pp1)[i][0] * (*pp2)[i][1];
00159     A[i][4] = (*pp1)[i][1] * (*pp2)[i][1];
00160     A[i][5] =                (*pp2)[i][1];
00161     A[i][6] = (*pp1)[i][0];
00162     A[i][7] = (*pp1)[i][1];
00163     A[i][8] = 1;
00164   }
00165
00166   BIAS::SVD A_SVD(A);
00167
00168   // get decomposition of F matrix
00169   BIAS::Matrix<double> U,VT;
00170   BIAS::Matrix<double> S(3,3,0.0);
00171   BIAS::Vector<double> s;
00172
00173   // solve equation system and compute least squares F usually with rank 3
00174   VT = A_SVD.GetVT();
00175
00176   for (unsigned int i=0; i<9; i++)
00177     F[i/3][i%3] = VT[8][i];
00178
00179   // re-add hartley normalization, so that f is valid for original coordinates
00180   if (NormalizeHartley_) F = K2.Transpose() * F * K1;
00181
00182   // now F is a matrix probably of rank 3, limit to rank 2:
00183   EnforceMaxRank2(F);
00184
00185   return 0;
00186 }
00187
00188 int FMatrixEstimation::Optimize(BIAS::FMatrix& F,
00189                                 const std::vector<BIAS::HomgPoint2D> &p1,
00190                                 const std::vector<BIAS::HomgPoint2D> &p2) {
00191 #ifdef BIAS_DEBUG
00192   if (p1.size()!=p2.size()) {
00193     BIASERR("Vectors of corresponding points have different sizes !!!");
00194     BIASABORT;
00195   }
00196   if (p1.size()<7) {
00197     BIASERR("Too few points to optimize: "<<p1.size());
00198     return -1;
00199   }
00200 #endif
00201
00202
00203   // we need to call an external function from levenberg-marquardt,
00204   // prepare data structs
00205   // warning: this section is not thread safe !
00206   p1_ = &p1;
00207   p2_ = &p2;
00208   pCurrentObject = this;
00209
00210   vector<double> vecFParamsStart, vecFParamsResult;
00211   Vector<double> FParamsStart(7), FParamsResult(7);
00212   Para = new Parametrization;
00213   Para->FMatrixToParams(F, vecFParamsStart);
00214   for (unsigned int i=0; i<7; i++)  FParamsStart[i] = vecFParamsStart[i];
00215   int res;
00216   if ((res = LevenbergMarquardt(&FErrorFunction, p1.size(),7,
00217                          FParamsStart, FParamsResult,
00218                          MINPACK_DEF_TOLERANCE, LM_DEF_MAX_ITER))!=0) {
00219     // BIASERR("Error in Levenberg-Marquardt-Optimization of F: "<<res);
00220     return -1;
00221   }
00222   vecFParamsResult.resize(7);
00223   for (unsigned int i=0; i<7; i++)  vecFParamsResult[i] = FParamsResult[i];
00224   Para->ParamsToFMatrix(F, vecFParamsResult);
00225   delete Para;
00226   Para = NULL;
00227 #ifdef BIAS_DEBUG
00228   pCurrentObject = NULL;
00229   p1_ = NULL;
00230   p2_ = NULL;
00231 #endif
00232
00233   return 0;
00234 }
00235
00236 void
00237 FMatrixEstimation::GetDetPolynomial(const BIAS::Vector<double> &F1,
00238                                     const BIAS::Vector<double> &F2,
00239                                     std::vector<POLYNOMIALSOLVE_TYPE> &v) {
00240 #ifdef BIAS_DEBUG
00241   if (F1.size()!=9) {
00242     BIASERR("Vector has wrong size "<<F1.size());
00243     BIASABORT;
00244   }
00245   if (F2.size()!=9) {
00246     BIASERR("Vector has wrong size "<<F2.size());
00247     BIASABORT;
00248   }
00249   if (v.size()!=0) {
00250     BIASERR("Vector v is not empty: "<<v.size());
00251     BIASABORT;
00252   }
00253 #endif
00254
00255   // We have two FMatrices in vector form F1, F2.
00256   // We want to find a linear combination of these two which has rank 2
00257
00258   // set up determinant equation using sarrus' rule for 3x3 matrices
00259   // where our combined matrix F = alpha F1 + (1-alpha) F2
00260   // we are looking for alpha, such that det(F)=0
00261
00262   // first we need the differences
00263   const double d[9] = { (F1[0]-F2[0]), (F1[1]-F2[1]), (F1[2]-F2[2]),
00264                        (F1[3]-F2[3]), (F1[4]-F2[4]), (F1[5]-F2[5]),
00265                        (F1[6]-F2[6]), (F1[7]-F2[7]), (F1[8]-F2[8]) };
00266
00267   // init coeffs with zero
00268   v.resize(4,0);
00269
00270   // accessing matrix according to sarrus' rule
00271   // better compute the determinant using short code from MAPLE or something
00272   // like that, as it is done in v_x_l::FMatrixCompute7Point
00273   // this here works definitely, but is quite slow
00274   unsigned int x,y,z;
00275   for (unsigned int i=0; i<3; i++) {
00276     // + diagonal from top to bottom
00277     x = i;
00278     y = 3 + ((i+1)%3);
00279     z = 6 + ((i+2)%3);
00280     v[3] += d[x] * d[y] * d[z];
00281     v[2] += d[x] * d[y] * F2[z] + d[x] * F2[y] * d[z] + F2[x] * d[y] * d[z];
00282     v[1] += d[x] * F2[y] * F2[z] + F2[x] * d[y] * F2[z] + F2[x] * F2[y] * d[z];
00283     v[0] += F2[x] * F2[y] * F2[z];
00284
00285     // - diagonal from bottom to top
00286     x = 6+i;
00287     // y is the same
00288     z = (i+2)%3;
00289     v[3] -= d[x] * d[y] * d[z];
00290     v[2] -= d[x] * d[y] * F2[z] + d[x] * F2[y] * d[z] + F2[x] * d[y] * d[z];
00291     v[1] -= d[x] * F2[y] * F2[z] + F2[x] * d[y] * F2[z] + F2[x] * F2[y] * d[z];
00292     v[0] -= F2[x] * F2[y] * F2[z];
00293   }
00294 }
00295
00296
00297 void FMatrixEstimation::EnforceMaxRank2(BIAS::FMatrix &F) {
00298   // get decomposition of F matrix
00299   BIAS::Matrix<double> U,VT;
00300   BIAS::Matrix<double> S(3,3,0.0);
00301   BIAS::Vector<double> s;
00302   // enforce rank 2 of F using SVD
00303   BIAS::SVD F_SVD(F);
00304
00305   // get singular values of F
00306   s = F_SVD.GetS();
00307
00308   // compose S matrix
00309   S[0][0] = s[0];
00310   S[1][1] = s[1];
00311   // leave smallest singular value at zero
00312
00313   U  = F_SVD.GetU();
00314   VT = F_SVD.GetVT();
00315
00316   // recompose F
00317   F = U * S * VT ;
00318 }
00319
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/FMatrixEstimation.hh Source File

Geometry

FMatrixEstimation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _FMatrixEstimation_h__
00027 #define _FMatrixEstimation_h__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <vector>
00032 #include "FMatrix.hh"
00033 #include "Base/Geometry/HomgPoint2D.hh"
00034 #include "MathAlgo/PolynomialSolve.hh"
00035 #include "Base/Math/Vector.hh"
00036 #include "Base/Geometry/Normalization.hh"
00037
00038 namespace BIAS {
00039  /**  @class FMatrixEstimation
00040       @ingroup g_estimation
00041       @brief functions for estimating a fundamental matrix (FMatrix) given
00042       a set of 2d-2d correspondences (no outlier checks, not robust !)
00043       in two views
00044       @author koeser 11/2003
00045    */
00046   class BIASGeometry_EXPORT FMatrixEstimation : public Debug {
00047   public:
00048
00049     /** @brief constructor with general parameters
00050         @param NormalizeHartley do hartley normalization on 7/8 points */
00051     explicit inline FMatrixEstimation(bool NormalizeHartley = true) {
00052        NormalizeHartley_ = NormalizeHartley;
00053     }
00054
00055     /** @brief compute a vector of FMatrices from seven point correspondences
00056
00057         Depending on the setting of the 3d points and the cameras of the
00058         originating epipolar geometry a vector of no, one or three solutions
00059         is computed:
00060         - degenrate case: no solution
00061         - 3d points and cam centers all lie on a ruled quadric: 3 solutions
00062         - 3d points and cam centers all lie on an unruled quadric: 1 solution
00063
00064         @attention For robust computation it is strongly recommended that you
00065                    normalize your correspondences (e.g. "Hartley")
00066         @param Fvec (output) vector of F matrices which are computed
00067         @param p1 (homogenized!) points in image 1
00068         @param p2 corresponding (homogenized!) points in image 2
00069         @return 0=success, !=0: error
00070         @status tested, not-optimized
00071         @author koeser 11/2003 */
00072     int SevenPoint(std::vector<BIAS::FMatrix>& Fvec,
00073                    const std::vector<BIAS::HomgPoint2D> &p1,
00074                    const std::vector<BIAS::HomgPoint2D> &p2);
00075
00076
00077     /** @brief compute an FMatrix from more than seven point correspondences
00078
00079         This algorithm computes a least squares F on all point correspondences
00080         using SVD of a model matrix. Rank 2 is enforced afterwards.
00081         @attention For robust computation it is strongly recommended that you
00082                    normalize your correspondences (e.g. "Hartley")
00083         @param F matrix which is computed
00084         @param p1 (homogenized!) points in image 1
00085         @param p2 corresponding (homogenized!) points in image 2
00086         @return 0=success, !=0: error
00087         @author koeser 11/2003 */
00088     int Linear(BIAS::FMatrix& F,
00089                const std::vector<BIAS::HomgPoint2D> &p1,
00090                const std::vector<BIAS::HomgPoint2D> &p2);
00091
00092
00093     /** @brief compute an FMatrix from eight point correspondences
00094
00095         This algorithm computes a least squares F on all point correspondences
00096         using SVD of a model matrix. Rank 2 is enforced afterwards, therefore
00097         @attention For robust computation it is strongly recommended that you
00098                    normalize your correspondences (e.g. "Hartley")
00099         @param F matrix which is computed
00100         @param p1 (homogenized!) points in image 1
00101         @param p2 corresponding (homogenized!) points in image 2
00102         @return 0=success, !=0: error
00103         @author koeser 11/2003 */
00104     inline int EightPoint(BIAS::FMatrix& F,
00105                           const std::vector<BIAS::HomgPoint2D> &p1,
00106                           const std::vector<BIAS::HomgPoint2D> &p2)
00107     {      return Linear(F, p1, p2);    };
00108
00109
00110     /** @brief optimize a given FMatrix regarding n 2d point correspondences
00111
00112         minimize an error function on F matrix using iterative
00113         nonlinear optimization techniques such as Levenberg/Marquardt
00114         @attention susceptable to local minima, provide good starting point F
00115         @param F matrix which is optimized
00116         @param p1 (homogenized!) points in image 1
00117         @param p2 corresponding (homogenized!) points in image 2
00118         @return 0=success, !=0: error
00119         @author koeser 11/2003 */
00120     int Optimize(BIAS::FMatrix& F,
00121                  const std::vector<BIAS::HomgPoint2D> &p1,
00122                  const std::vector<BIAS::HomgPoint2D> &p2);
00123
00124
00125     /** @brief enforces a maximum rank of two by setting the smallest singular
00126         value to zero
00127
00128         @param F matrix which has rank MIN{2, previous_rank} afterwards
00129         @author koeser 11/2003 */
00130     void EnforceMaxRank2(BIAS::FMatrix &F);
00131
00132
00133     /// pointer to vector of points in image1 (hack for Optimize)
00134     std::vector<BIAS::HomgPoint2D> const *p1_;
00135     /// pointer to vector of points in image2 (hack for Optimize)
00136     std::vector<BIAS::HomgPoint2D> const *p2_;
00137
00138
00139   protected:
00140     /** @brief set up a polynomial in alpha given Det(alpha*F1+(1-alpha)*F2)=0,
00141         where the f vectors are interpreted as the rows of a 3x3 matrix
00142
00143         @param f1 vector to be interpreted as a 3x3 matrix F1
00144         @param f2 vector to be interpreted as a 3x3 matrix F2
00145         @param v vector of polynomial coefficients in PolynomialSolve style
00146         @author koeser 11/2003 */
00147     void GetDetPolynomial(const BIAS::Vector<double> &f1,
00148                           const BIAS::Vector<double> &f2,
00149                           std::vector<POLYNOMIALSOLVE_TYPE> &v);
00150
00151     /// flag indicating whether we should normalize the given points before
00152         /// and denormalize the fmatrix after computation, so that it refers to
00153         /// the original points
00154         bool NormalizeHartley_;
00155
00156         /// the normalization object
00157         Normalization N_;
00158
00159   }; // end class
00160
00161 } // end namespace
00162
00163 #include <Base/Common/BIASpragmaEnd.hh>
00164
00165 #endif
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/FMatrixTest.cpp Source File

Geometry » Examples

FMatrixTest.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "../FMatrix.hh"
00027 #include "../FMatrixEstimation.hh"
00028 #include "../PMatrixEstimation.hh"
00029 #include "../PMatrixLinear.hh"
00030 #include "../Triangulation.hh"
00031 #include "../../Base/Math/Random.hh"
00032
00033
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 // ---------------------------------------------------------------------------
00039 //int main(int argc, char *argv[])
00040 int main()
00041 {
00042   BIAS::FMatrix F, TheoF;
00043   std::vector<FMatrix> vecF;
00044   BIAS::PMatrix P1,P2;
00045   BIAS::Random Randomizer;
00046
00047   for (unsigned int i=0; i<1; i++) {
00048     // generate random ps:
00049     for (unsigned int x=0; x<4; x++)
00050       for (unsigned int y=0; y<3; y++) {
00051         P1[y][x] = Randomizer.GetUniformDistributed(-1.0, 1.0);
00052         P2[y][x] = Randomizer.GetUniformDistributed(-1.0, 1.0);
00053       }
00054     P1.InvalidateDecomposition();
00055     P2.InvalidateDecomposition();
00056     TheoF.ComputeFromPMatrices(P1, P2);
00057
00058     vector<HomgPoint3D> points;
00059     vector<HomgPoint2D> p1,p2;
00060     cout << "Randomized correspondences are "<<endl;
00061     for (unsigned int p=0; p<7; p++) {
00062       points.push_back(HomgPoint3D(Randomizer.GetUniformDistributed(-1.0,
00063                                                                     1.0),
00064                                    Randomizer.GetUniformDistributed(-1.0,
00065                                                                     1.0),
00066                                    Randomizer.GetUniformDistributed(-1.0,
00067                                                                     1.0)));
00068       p1.push_back(P1 * points[p]); p1[p].Homogenize();
00069       cout << "{ "<<p1[p]<<" ";
00070       p2.push_back(P2 * points[p]); p2[p].Homogenize();
00071       cout << p2[p]<<" }  "<<endl;
00072     }
00073     bool NormalizeHartley = true;
00074     FMatrixEstimation FEstimator(NormalizeHartley);
00075     //vecF.resize(1);
00076     vecF.clear();
00077     FEstimator.SevenPoint(vecF,p1,p2);
00078     HomgPoint2D e1,e2, theoe1, theoe2;
00079     cout << "Computing epipoles "<<endl;
00080     TheoF.GetEpipolesHomogenized(theoe1, theoe2);
00081     for (unsigned int s=0; s<vecF.size(); s++) {
00082
00083       vecF[s].GetEpipolesHomogenized(e1, e2);
00084       cout << "True epipoles are "<<theoe1<<" and "<<theoe2<<endl;
00085       cout << "est. epipoles are "<<e1<<" and "<<e2<<endl;
00086     }
00087
00088   }
00089   return 0;
00090 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fortran.h Source File

Base » Math » tnt

fortran.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Header file to define C/Fortran conventions (Platform specific)
00035
00036 #ifndef FORTRAN_H
00037 #define FORTRAN_H
00038
00039 // help map between C/C++ data types and Fortran types
00040
00041 typedef int     Fortran_integer;
00042 typedef float   Fortran_float;
00043 typedef double  Fortran_double;
00044
00045
00046 typedef Fortran_double *fda_;        // (in/out) double precision array
00047 typedef const Fortran_double *cfda_; // (in) double precsion array
00048
00049 typedef Fortran_double *fd_;        // (in/out)  single double precision
00050 typedef const Fortran_double *cfd_; // (in) single double precision
00051
00052 typedef Fortran_float *ffa_;        // (in/out) float precision array
00053 typedef const Fortran_float *cffa_; // (in) float precsion array
00054
00055 typedef Fortran_float *ff_;         // (in/out)  single float precision
00056 typedef const Fortran_float *cff_;  // (in) single float precision
00057
00058 typedef Fortran_integer *fia_;          // (in/out)  single integer array
00059 typedef const Fortran_integer *cfia_;   // (in) single integer array
00060
00061 typedef Fortran_integer *fi_;           // (in/out)  single integer
00062 typedef const Fortran_integer *cfi_;    // (in) single integer
00063
00064 typedef char *fch_;                // (in/out) single character
00065 typedef char *cfch_;               // (in) single character
00066
00067
00068
00069 #ifndef TNT_SUBSCRIPT_TYPE
00070 #define TNT_SUBSCRIPT_TYPE TNT::Fortran_integer
00071 #endif
00072
00073
00074 #endif
00075 // FORTRAN_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/fspvec.h Source File

Base » Math » tnt

fspvec.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033 //  Templated sparse vector (Fortran conventions).
00034 //  Used primarily to interface with Fortran sparse matrix libaries.
00035 //  (CANNOT BE USED AS AN STL CONTAINER.)
00036
00037 #ifndef FSPVEC_H
00038 #define FSPVEC_H
00039
00040 #include "tnt.h"
00041 #include "vec.h"
00042 #include <cstdlib>
00043 #include <cassert>
00044 #include <iostream>
00045 #include <strstream>
00046
00047
00048
00049 namespace TNT
00050 {
00051 template <class T>
00052 class Fortran_Sparse_Vector
00053 {
00054
00055
00056   public:
00057
00058     typedef Subscript   size_type;
00059     typedef         T   value_type;
00060     typedef         T   element_type;
00061     typedef         T*  pointer;
00062     typedef         T*  iterator;
00063     typedef         T&  reference;
00064     typedef const   T*  const_iterator;
00065     typedef const   T&  const_reference;
00066
00067     Subscript lbound() const { return 1;}
00068
00069   protected:
00070     Vector<T>   val_;
00071     Vector<Subscript> index_;
00072     Subscript dim_;                  // prescribed dimension
00073
00074
00075   public:
00076
00077     // size and shape information
00078
00079     Subscript dim() const { return dim_; }
00080     Subscript num_nonzeros() const { return val_.dim(); }
00081
00082     // access
00083
00084     T& val(Subscript i) { return val_(i); }
00085     const T& val(Subscript i) const { return val_(i); }
00086
00087     Subscript &index(Subscript i) { return index_(i); }
00088     const Subscript &index(Subscript i) const { return index_(i); }
00089
00090     // constructors
00091
00092     Fortran_Sparse_Vector() : val_(), index_(), dim_(0)  {};
00093     Fortran_Sparse_Vector(Subscript N, Subscript nz) : val_(nz),
00094             index_(nz), dim_(N)  {};
00095     Fortran_Sparse_Vector(Subscript N, Subscript nz, const T *values,
00096         const Subscript *indices): val_(nz, values), index_(nz, indices),
00097             dim_(N) {}
00098
00099     Fortran_Sparse_Vector(const Fortran_Sparse_Vector<T> &S):
00100         val_(S.val_), index_(S.index_), dim_(S.dim_) {}
00101
00102     // initialize from string, e.g.
00103     //
00104     //  Fortran_Sparse_Vector<T> A(N, 2, "1.0 2.1", "1 3");
00105     //
00106     Fortran_Sparse_Vector(Subscript N, Subscript nz, char *v,
00107         char *ind) : val_(nz, v), index_(nz, ind), dim_(N) {}
00108
00109     // assignments
00110
00111     Fortran_Sparse_Vector<T> & newsize(Subscript N, Subscript nz)
00112     {
00113         val_.newsize(nz);
00114         index_.newsize(nz);
00115         dim_ = N;
00116         return *this;
00117     }
00118
00119     Fortran_Sparse_Vector<T> & operator=( const Fortran_Sparse_Vector<T> &A)
00120     {
00121         val_ = A.val_;
00122         index_ = A.index_;
00123         dim_ = A.dim_;
00124
00125         return *this;
00126     }
00127
00128     // methods
00129
00130
00131
00132 };
00133
00134
00135 /* ***************************  I/O  ********************************/
00136
00137 template <class T>
00138 ostream& operator<<(ostream &s, const Fortran_Sparse_Vector<T> &A)
00139 {
00140     // output format is :   N nz val1 ind1 val2 ind2 ...
00141     Subscript nz=A.num_nonzeros();
00142
00143     s <<  A.dim() << " " << nz << endl;
00144
00145     for (Subscript i=1; i<=nz; i++)
00146         s   << A.val(i) << "  " << A.index(i) << endl;
00147     s << endl;
00148
00149     return s;
00150 }
00151
00152
00153 template <class T>
00154 istream& operator>>(istream &s, Fortran_Sparse_Vector<T> &A)
00155 {
00156     // output format is :   N nz val1 ind1 val2 ind2 ...
00157
00158     Subscript N;
00159     Subscript nz;
00160
00161     s >> N >> nz;
00162
00163     A.newsize(N, nz);
00164
00165     for (Subscript i=1; i<=nz; i++)
00166             s >>  A.val(i) >> A.index(i);
00167
00168
00169     return s;
00170 }
00171
00172 } // namespace TNT
00173
00174 #endif
00175 // FSPVEC_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- j -

  • j : Multitype
  • JacobianToMask_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • jpeg_ : BIAS::VideoServer
  • JpegHandler() : BIAS::JpegHandler
  • jpegImg_ : BIAS::VideoSource_Net
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- k -

  • K_ : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::PMatrix
  • Kalman() : BIAS::Kalman
  • Kappa_ : BIAS::UnscentedTransform
  • kc1 : BIAS::CPDiscreteParam
  • kc1_ : BIAS::ProjectionParametersPerspective
  • kc1Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc1Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc2 : BIAS::CPDiscreteParam
  • kc2_ : BIAS::ProjectionParametersPerspective
  • kc2Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc2Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc3 : BIAS::CPDiscreteParam
  • kc3_ : BIAS::ProjectionParametersPerspective
  • kc3Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc3Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc4 : BIAS::CPDiscreteParam
  • kc4_ : BIAS::ProjectionParametersPerspective
  • kc4Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc4Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • keepAll_ : BIAS::CScommBase
  • KeepFPS_ : BIAS::VideoSource_Disk
  • kernelSize_ : BIAS::Morphology< InputStorageType, OutputStorageType >
  • KeyBuffer_ : BIAS::GuiBase
  • KeyPressEventCallback_() : BIAS::GuiGTK
  • KFromMeta() : BIAS::PMDImageProc
  • KMatrix() : BIAS::KMatrix
  • knownparams_vect_ : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::CameraData
  • KPts_ : BIAS::Interpolator
  • KroneckerProduct() : BIAS::Vector< T >
  • KValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- l -

  • L : BIAS::Cholesky
  • Label() : BIAS::Label
  • Label4Neighbour() : BIAS::Label
  • Label4Neighbour_() : BIAS::Label
  • Label_ : BIAS::GuiGTK
  • LabelExposeCallback_() : BIAS::GuiGTK
  • LabelInit_() : BIAS::Label
  • LabelInitialized_ : BIAS::Label
  • LabelRelease_() : BIAS::Label
  • LabelResultImage_ : BIAS::Label
  • LabelSumImage_ : BIAS::Label
  • lambda_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • last_time : TNT::stopwatch
  • LastBottom : _FilterBorders
  • LastGenerationTime_ : BIAS::UUID
  • LastGradX_ : BIAS::Tracker< StorageType, CalculationType >
  • LastGradY_ : BIAS::Tracker< StorageType, CalculationType >
  • lastheight : MyFrame
  • LastImage_ : BIAS::Tracker< StorageType, CalculationType >
  • lastProcessed : BIAS::CScommData
  • LastRight : _FilterBorders
  • LastTime_ : BIAS::VideoSource_Shm
  • lastwidth : MyFrame
  • LatAcceleration : BIAS::DC_inertial
  • latPos : BIAS::DC_GPS
  • lbound() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Index1D, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • lbound_ : TNT::Index1D
  • LeastSquares_() : BIAS::UnVignette
  • LeastSquaresBase() : BIAS::LeastSquaresBase
  • LeastSquaresLapack() : BIAS::LeastSquaresLapack
  • LeastSquaresSVD() : BIAS::LeastSquaresSVD
  • left : BIAS::CameraViewFrustum
  • Left : BIAS::HomgPoint2D
  • Left_ : BIAS::VideoSource_Stereo, BIAS::VideoSource_DCAM
  • LeftContravariantContraction1() : BIAS::Tensor3D3x3x3< T >
  • LeftContravariantContraction2() : BIAS::Tensor3D3x3x3< T >
  • LeftContravariantContraction3() : BIAS::Tensor3D3x3x3< T >
  • LeftIm_ : BIAS::VideoSource_Stereo
  • LeftNullspaceDim() : BIAS::SVD
  • Length() : BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • length : BIAS::AppData
  • Length_ : BIAS::EpipolarLine
  • Lens_ : BIAS::VideoSource_DCAM
  • LensIsSpherical_ : BIAS::CameraParam, BIAS::CameraData
  • LensModel_ : BIAS::CameraParam, BIAS::CameraData
  • Line() : BIAS::ImageDraw< StorageType >
  • Linear() : BIAS::PolynomialSolve, BIAS::FMatrixEstimation
  • LinearInterpolation() : BIAS::Image< StorageType >
  • LinearRegionDetector() : BIAS::LinearRegionDetector< StorageType, CalculationType >
  • LineGrey() : BIAS::ImageDraw< StorageType >
  • LineMatcherNCC() : BIAS::RegionMatcher
  • LineMatcherSAD() : BIAS::RegionMatcher
  • LineStyle : BIAS::ThreeDOutParameters
  • linewidth : BIAS::RenderModeGL
  • LineWidth : BIAS::ThreeDOutParameters
  • listenthread : BIAS::CScommServer
  • listenThreadActive_ : BIAS::CScommServer
  • listPntDim1_ : BIAS::Interpolator
  • listPntDim2_ : BIAS::Interpolator
  • listPntDim3_ : BIAS::Interpolator
  • listPolynoms1_ : BIAS::Interpolator
  • listPolynoms2_ : BIAS::Interpolator
  • listPolynoms3_ : BIAS::Interpolator
  • ll : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • LL : BIAS::Image3DData, BIAS::PMatrix3DData
  • Load() : BIAS::SimilarityTransform, BIAS::Pose, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::ImageIO, BIAS::PoseParametrization
  • LoadBan() : BIAS::Matrix3x4< T >
  • LoadBBC() : BIAS::PMatrix
  • LoadBOG() : BIAS::PMatrixBase
  • LoadBogK() : BIAS::Matrix3x3< T >
  • LoadBogRC() : BIAS::Matrix3x3< T >
  • LoadBogTC() : BIAS::Vector3< T >
  • LoadImage() : CuEye
  • LoadImageFromList() : MainFrame
  • LoadImages() : MainFrame, MyFrame
  • LoadImagesAndCalculate() : MainFrame
  • LOC_LEFT : BIAS::HomgPoint2D
  • LOC_LOWER : BIAS::HomgPoint2D
  • LOC_MIDDLE : BIAS::HomgPoint2D
  • LOC_RIGHT : BIAS::HomgPoint2D
  • LOC_undef : BIAS::HomgPoint2D
  • LOC_UPPER : BIAS::HomgPoint2D
  • LocalToGlobal() : BIAS::CoordinateTransform3D
  • LocatePoint() : BIAS::Quadric3D, BIAS::Conic2D
  • location : xvimage
  • location_dim : xvimage
  • location_type : xvimage
  • log2inv_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • log_ : BIAS::CScommBase
  • LogFacility() : BIAS::LogFacility
  • logOut_ : BIAS::CScommBase
  • logOutPut_() : BIAS::CScommBase
  • LogPolarMapping() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • LogToFileAndReset() : BIAS::TimeMeasure
  • LongAcceleration : BIAS::DC_inertial
  • LongIdum_ : BIAS::Random
  • longopts : BIAS::Param
  • longPos : BIAS::DC_GPS
  • Loop_ : BIAS::VideoSource_Disk
  • LowerRightX_ : BIAS::ROI
  • LowerRightY_ : BIAS::ROI
  • LowerTriangularView() : TNT::LowerTriangularView< MaTRiX >
  • lowpass_ : BIAS::Tracker< StorageType, CalculationType >
  • lr : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • LR : BIAS::Image3DData, BIAS::PMatrix3DData
  • LuImage_ : BIAS::UnVignette
  • luminance_ : BIAS::ColorHistogram< StorageType >
  • LuT_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • LuTMax1_ : BIAS::Interpolator
  • LuTMin1_ : BIAS::Interpolator
  • LuTPerspPxPy_ : BIAS::SphericalUndistortion
  • LuTPxPySphere_ : BIAS::SphericalUndistortion
  • LuTSampleDist1_ : BIAS::Interpolator
  • lx_ : BIAS::ColorHistogram< StorageType >
  • ly_ : BIAS::ColorHistogram< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- m -

  • m_ : TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • m_bIsInited : BIAS::VideoSource_uEye
  • m_CameraHandle : BIAS::VideoSource_uEye
  • m_cHSData : BIAS::IntegralHistogram
  • m_cLData : BIAS::IntegralHistogram
  • m_dBitsPerPixel : BIAS::VideoSource_uEye
  • m_dColorMode : BIAS::VideoSource_uEye
  • m_dDepth : BIAS::VideoSource_uEye
  • m_dHeight : BIAS::VideoSource_uEye
  • m_dLeftPos : BIAS::VideoSource_uEye
  • m_dMaxRefHistoSize : BIAS::CondensHisto
  • m_dMemID : BIAS::VideoSource_uEye
  • m_dPixelClock : BIAS::VideoSource_uEye
  • m_dSrcDepth : BIAS::VideoSource_uEye
  • m_dSrcHeight : BIAS::VideoSource_uEye
  • m_dSrcWidth : BIAS::VideoSource_uEye
  • m_dTopPos : BIAS::VideoSource_uEye
  • m_dWidth : BIAS::VideoSource_uEye
  • m_FileList : FindFilesInPath
  • m_FileTypes : FindFilesInPath
  • m_frame : BIAS::dndFileTarget
  • m_FuncPtr : FindFilesInPath
  • m_hu : CuEye
  • m_hwnd : CuEye
  • m_hwndNotify : CuEye
  • m_pImageBuffer : BIAS::VideoSource_uEye
  • m_pSwapBuffer : BIAS::VideoSource_uEye
  • m_ueye : BIAS::VideoSource_uEye
  • machine_dep : xvimage
  • magnificationMode : BIAS::ImgObjGL
  • MainFrame() : MainFrame
  • MainThread_ : BIAS::GuiGTK
  • MainThreadRunning_ : BIAS::GuiWX, BIAS::GuiGTK
  • MainThreadRunningMutex_ : BIAS::GuiGTK
  • MakeDistanceImage_() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • MakeSVD_() : BIAS::PMatrix
  • MakeSymmetric_() : BIAS::HomgPoint3DCov
  • Map() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Map_ : BIAS::ParamTypeEnum, BIAS::BaseFactory< BaseClassType >
  • map_col_size : xvimage
  • map_enable : xvimage
  • map_row_size : xvimage
  • map_scheme : xvimage
  • map_storage_type : xvimage
  • map_subrow_size : xvimage
  • MapBi_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • mapEllipsoids_ : BIAS::ThreeDOut
  • mapImages_ : BIAS::ThreeDOut
  • mapIndex : BIAS::DC_GPS
  • mapIndexedFaceSet_ : BIAS::ThreeDOut
  • mapLines_ : BIAS::ThreeDOut
  • MapPerspToSphere() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • mapping_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • mapPMatrices_ : BIAS::ThreeDOut
  • mapPoints_ : BIAS::ThreeDOut
  • mapProjection3D_ : BIAS::ThreeDOut
  • maps : xvimage
  • maps_per_cycle : xvimage
  • MapTri_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • MapType : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • mapValidTags_ : BIAS::ImageAttributes
  • Mask2Corners() : BIAS::ROI
  • Mask2Vector() : BIAS::ROI
  • MaskData_ : BIAS::ROI
  • MaskDataArray_ : BIAS::ROI
  • MaskHeight_ : BIAS::ROI
  • MaskValid() : BIAS::ROI
  • MaskValid_ : BIAS::ROI
  • MaskWidth_ : BIAS::ROI
  • MatchDataBase() : BIAS::MatchDataBase
  • MatlabTBUndistortion() : BIAS::MatlabTBUndistortion
  • Matrix() : TNT::Matrix< T >, BIAS::Matrix< T >
  • Matrix2x2() : BIAS::Matrix2x2< T >
  • Matrix3x3() : BIAS::Matrix3x3< T >
  • Matrix3x4() : BIAS::Matrix3x4< T >
  • Matrix4x4() : BIAS::Matrix4x4< T >
  • MatrixPanel() : BIAS::MatrixPanel
  • max_ : BIAS::ParamTypeDouble, BIAS::ParamTypeInt
  • max_gain : MyFrame
  • max_shutter : MyFrame
  • maxBinVal_ : BIAS::ColorHistogram< StorageType >
  • MaxBinVal_ : BIAS::Histogram
  • MaxBpP_ : BIAS::VideoSource_DCAM
  • MaxCamAngle_ : BIAS::CameraParam, BIAS::ProjectionParametersSpherical, BIAS::CameraData
  • MaxError_ : BIAS::Tracker< StorageType, CalculationType >
  • MaxHeight_ : BIAS::VideoSource_DCAM
  • MaxHistEntry_ : BIAS::Histogram2D, BIAS::Histogram
  • MaxIter_ : BIAS::Tracker< StorageType, CalculationType >
  • MaxMin() : BIAS::Matrix3x3< T >
  • MaxNumIter_ : BIAS::GaussHelmert
  • MaxOffSet_ : BIAS::ScaledImageCanvas
  • MaxScale_ : BIAS::ScaledImageCanvas
  • MaxSTValue() : BIAS::Image< StorageType >
  • MaxTrials_ : MIP::VideoSource_DV
  • MaxWidth_ : BIAS::VideoSource_DCAM
  • MD_ASCII_DATA : BIAS::AppData
  • MD_CVector : BIAS::AppData
  • MD_Focal_Length : BIAS::AppData
  • MD_GPS_Data : BIAS::AppData
  • MD_HomgPoint2D : BIAS::AppData
  • MD_Inertial_Sensor : BIAS::AppData
  • MD_Invalid : BIAS::AppData
  • MD_KMatrix : BIAS::AppData
  • MD_Orientation : BIAS::AppData
  • MD_PMatrix : BIAS::AppData
  • MD_Projection : BIAS::AppData
  • MD_PTU_Data : BIAS::AppData
  • MD_RMatrix : BIAS::AppData
  • MD_TimeStamp : BIAS::AppData
  • MD_USE_ASCII : BIAS::AppData
  • MD_UUID : BIAS::AppData
  • MDcam() : BIAS::MDcam
  • Mean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • mean_ : BIAS::Condensation, BIAS::Tracker< StorageType, CalculationType >
  • meanTminus1_ : BIAS::Condensation
  • MeanType_ : BIAS::Tracker< StorageType, CalculationType >
  • MeasurementDim_ : BIAS::Kalman
  • MeasureOverhead() : BIAS::TimeMeasure
  • MeasureProcessorFrequency() : BIAS::TimeMeasure
  • Median() : BIAS::Median< InputStorageType, OutputStorageType >
  • Median1D() : BIAS::Median1D< DataType >
  • MedianCenters_ : BIAS::Label
  • MediaSubTypeColorModel_ : BIAS::VideoSource_DSHOW
  • mediaType : BIAS::MySampleGrabberCB
  • MemAlignedBuffer_ : BIAS::ImageIO
  • MemAlignedBufferSize_ : BIAS::ImageIO
  • MemoryLengthTotal_ : BIAS::VideoShMFeeder
  • MergeImage_() : BIAS::ImageConvertThreaded
  • meshVertices_ : BIAS::TriangleMesh
  • Message_ : BIAS::BaseException
  • MetaData() : BIAS::MetaData
  • mHists_ : BIAS::IntegralHistogram
  • MIA_ZoomQuitButton : BIAS::ZoomFrame
  • MiaScWi_ : BIAS::ScaledImageCanvas
  • min_ : BIAS::ParamTypeDouble, BIAS::ParamTypeInt
  • minBinVal_ : BIAS::ColorHistogram< StorageType >
  • MinBinVal_ : BIAS::Histogram
  • MinBorderDist_ : BIAS::Tracker< StorageType, CalculationType >
  • MinBpP_ : BIAS::VideoSource_DCAM
  • minificationMode : BIAS::ImgObjGL
  • MinOffSet_ : BIAS::ScaledImageCanvas
  • minSat_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • minSaturation : SegmentationData
  • MinScale_ : BIAS::ScaledImageCanvas
  • MinSTValue() : BIAS::Image< StorageType >
  • minWeight_ : BIAS::CondensHisto
  • mn_ : TNT::Matrix< T >
  • ModCoeffConvert_() : BIAS::PMDImageProc
  • ModCoeffImg_ : BIAS::VideoSource_DiskPMD
  • Mode_ : BIAS::Histogram
  • Morphology() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • MotionTrackballRotation() : BIAS::CameraViewController
  • MotionTranslation() : BIAS::CameraViewController
  • MotionTranslationForward() : BIAS::CameraViewController
  • MouseButtonMutex_ : BIAS::GuiBase
  • MouseButtonPressCallback_() : BIAS::GuiGTK
  • MouseButtonPressed_ : BIAS::GuiBase
  • MouseButtonPressX_ : BIAS::GuiBase
  • MouseButtonPressY_ : BIAS::GuiBase
  • MouseButtonReleaseCallback_() : BIAS::GuiGTK
  • MouseButtonReleased_ : BIAS::GuiBase
  • MouseButtonReleaseX_ : BIAS::GuiBase
  • MouseButtonReleaseY_ : BIAS::GuiBase
  • MouseMotionCallback_() : BIAS::GuiGTK
  • MousePosX_ : BIAS::GuiBase
  • MousePosY_ : BIAS::GuiBase
  • mousex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • mousey_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • MoveOrbit() : BIAS::CameraViewController
  • MoveToCenter() : BIAS::CameraViewController
  • MoveToClosestPositionInImage() : BIAS::ImageBase
  • MoveWindow() : BIAS::WrapBias2Ipl
  • MSAC() : BIAS::MSAC< SolutionType >
  • MSecondsToHumanReadable() : BIAS::TimeMeasure
  • msgBuffer : BIAS::CScommData
  • msgBuffer_ : BIAS::CScommBase
  • msgName : BIAS::CScommMsg
  • msgSize_ : BIAS::VideoServer
  • Mult() : BIAS::SimilarityTransform, BIAS::Vector3< T >, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::AffineTransf
  • MultIP() : BIAS::Vector3< T >, BIAS::Matrix2x2< T >
  • Multiply() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • MultiplyIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • MultLeft() : BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >
  • MultVec() : BIAS::SimilarityTransform, BIAS::Quaternion< QUAT_TYPE >
  • MyAlgorithm() : MyAlgorithm
  • MyBilinearRegion1_() : BIAS::TrackerBase< StorageType >
  • MyBilinearRegion2_() : BIAS::TrackerBase< StorageType >
  • MyFactory() : MyFactory
  • MyFrame() : MyFrame
  • MyGLCanvas() : MyGLCanvas
  • MyGLCanvas2() : MyGLCanvas2
  • MyGui_ : BIAS::TopFrame, BIAS::WxMainThread
  • MySampleGrabberCB() : BIAS::MySampleGrabberCB
  • MyTemplate() : MyTemplate< T >
  • MyTestClass() : MyTestClass
  • MyUnscentedTransform() : MyUnscentedTransform
  • MyZoomWin_ : BIAS::ImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- n -

  • n_ : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • N_ : BIAS::FMatrixEstimation
  • name : BIAS::IndexedFaceSet, BIAS::Image3DData, BIAS::PMatrix3DData, BIAS::CScommData, Namelist, Vardesc, Namelist, Vardesc, BIAS::ImageCanvasGLBase, BIAS::ExifTag, option
  • Name_ : BIAS::ParamTypeBase, Base
  • name_ : BIAS::CScommBase
  • nBinsize_ : BIAS::IntegralHistogram
  • nBinsizeSat_ : BIAS::IntegralHistogram
  • NCC() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • NCCSearch() : BIAS::CornerMatcher
  • NCCSearchEven() : BIAS::RegionMatcher
  • NCCSearchOdd() : BIAS::RegionMatcher
  • nChannels_ : BIAS::GuiBase
  • NewCoo() : BIAS::ZoomFrame, BIAS::ZoomImageCanvas
  • newData : BIAS::CScommMsg
  • newFrame_ : BIAS::VideoSource_V4L
  • NewImage() : BIAS::ZoomFrame, BIAS::ZoomImageCanvas
  • NewSize() : BIAS::Tensor3D3x3x3< T >, BIAS::Tensor3D< T >
  • newsize() : BIAS::PMatrix, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D3x3x3< T >, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::PMatrixBase
  • NewTagsCallback_() : BIAS::PMDImageIO
  • NewTagsInitialize_() : BIAS::PMDImageIO
  • NewZoom() : BIAS::ZoomImageCanvas
  • NextEllipsoidIndex_ : BIAS::ThreeDOut
  • NextImageIndex_ : BIAS::ThreeDOut
  • NextIndexedFaceSetIndex_ : BIAS::ThreeDOut
  • NextLineIndex_ : BIAS::ThreeDOut
  • NextPIndex_ : BIAS::ThreeDOut
  • NextPointIndex_ : BIAS::ThreeDOut
  • NextProjection3DIndex_ : BIAS::ThreeDOut
  • nLambda_ : BIAS::IntegralHistogram
  • nmatrix_ : BIAS::Interpolator
  • nMinSat_ : BIAS::IntegralHistogram
  • nOldBinsize_ : BIAS::IntegralHistogram
  • nOldBinsizeSat_ : BIAS::IntegralHistogram
  • NonBase() : NonBase
  • NonLinearRefine() : BIAS::PolynomialSolve
  • Norm_ : BIAS::TFTensorEstimation
  • Normalise_() : BIAS::ColorHistogram< StorageType >
  • normalised_ : BIAS::ColorHistogram< StorageType >
  • Normalization() : BIAS::Normalization
  • normalization_ : BIAS::HMatrixEstimation
  • Normalize() : BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::Quadric3D, BIAS::PMatrix, BIAS::Conic2D, BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::HomgPlane3D
  • NormalizeCols() : BIAS::Matrix< T >
  • NormalizeColsToOne() : BIAS::Matrix< T >
  • NormalizeHartley_ : BIAS::FMatrixEstimation
  • normalizeHartley_ : BIAS::HMatrixEstimation
  • NormalizeMatches() : BIAS::GenGroundTruth
  • NormalizeRows() : BIAS::Matrix< T >
  • NormalizeRowsToOne() : BIAS::Matrix< T >
  • NormFrobenius() : BIAS::Matrix< T >
  • NormL1() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • NormL2() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • Nsamples_ : BIAS::Condensation
  • nShift_ : BIAS::IntegralHistogram
  • nShiftSat_ : BIAS::IntegralHistogram
  • NullspaceDim() : BIAS::SVD
  • Num_ : BIAS::Label
  • num_cols() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • num_data_bands : xvimage
  • num_nonzeros() : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >
  • num_of_images : xvimage
  • num_rows() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • numBuffers_ : BIAS::VideoSource_V4L
  • numcams : MyFrame
  • NumCams_ : BIAS::VideoSource_DCAM, BIAS::MDcam
  • NumData_ : BIAS::Histogram
  • Numeric() : BIAS::PolynomialSolve
  • NumImages_ : BIAS::VideoStream
  • NumIter_ : BIAS::Tracker< StorageType, CalculationType >
  • NumLeftClicks_ : BIAS::ImageCanvasEnhanced
  • nvars : Namelist
  • nz_ : TNT::Fortran_Sparse_Col_Matrix< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- o -

  • oacc : olist
  • oblnk : olist
  • obsImg_ : BIAS::CondensImg
  • oerr : olist
  • offset : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, BIAS::SphericalUndistortion::LuTEntry, BIAS::MatlabTBUndistortion::LuTEntry, BIAS::DC_GPS
  • offset_ : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • offSet_ : BIAS::Condensation
  • offsetX_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • offsetY_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • OffsSL_ : BIAS::ScaledImageCanvas
  • ofm : olist
  • ofnm : olist
  • ofnmlen : olist
  • oldIndices_ : BIAS::Condensation
  • OnAbout() : MyFrame, MainFrame, MyFrame
  • OnAutoExposure() : MyFrame
  • OnChar() : BIAS::OpenGLCanvasBase, BIAS::TopFrame
  • OnCheckBox() : BIAS::ParamGUIPanel
  • OnChoice() : BIAS::ParamGUIPanel
  • OnClose() : CutoutFrame, BIAS::ZoomFrame, BIAS::TopFrame
  • OnConfig() : MyFrame
  • OnConfigPin() : MyFrame
  • OnDelay() : MainFrame
  • OnDropFiles() : DragAndDropTarget, BIAS::dndFileTarget
  • one : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >
  • OnePushAuto() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • OnePushRunning() : BIAS::VideoSource_DCAM
  • OnErase() : BIAS::ImageCanvas
  • OnEraseBackground() : BIAS::OpenGLCanvasBase
  • OnExit() : MainFrame, BIAS::WxMainThread
  • OnFit() : MainFrame
  • OnGain() : MyFrame
  • OnGrab() : MyFrame
  • OnGrabContinuous() : MyFrame
  • OnIdle() : MainFrame, BIAS::OpenGLCanvas
  • OnInfo() : MainFrame
  • OnInit() : MyApp, BiasViewApp, BiasShowEpiApp, BiasDetectUnvignetteApp, MyApp, ExampleOpenGLCanvasApp, ExampleImageCanvasGLBaseApp, MyApp, ExampleGLSharedApp
  • OnKey() : MyFrame, BIAS::ZoomImageCanvas
  • OnKeyInfo() : MainFrame
  • OnLeaveWindow() : CutoutFrame
  • OnLeftDown() : MainFrame, PlainImageCanvas
  • OnLeftMouse() : BIAS::ZoomImageCanvas
  • OnLeftMouseButton() : BIAS::ImageCanvasEnhanced
  • OnLoad() : MainFrame, BIAS::ProjectionGUI, MyFrame
  • OnLoadImage() : MyFrame
  • onlyNewMsgs_ : BIAS::CScommBase
  • OnMetaData() : MainFrame
  • OnModified() : BIAS::ProjectionGUI
  • OnMotion() : CutoutFrame, PlainImageCanvas, BIAS::OpenGLCanvas
  • OnMouseDown() : BIAS::OpenGLCanvas
  • OnMouseLeave() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnMouseMove() : BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnMouseWheel() : BIAS::OpenGLCanvas
  • OnNew() : BIAS::ProjectionGUI
  • OnNext() : MainFrame
  • OnNormalizeQuaternion() : BIAS::ProjectionGUI
  • OnPaint() : BIAS::OpenGLCanvasBase, BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnPrev() : MainFrame
  • OnQuit() : MyFrame, BIAS::ZoomFrame, MyFrame
  • OnRect() : MyFrame
  • OnResize() : BIAS::ZoomImageCanvas
  • OnRightDown() : PlainImageCanvas
  • OnRightMouse() : BIAS::ZoomImageCanvas
  • OnRightMouseButton() : BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas
  • OnRunStop() : MainFrame
  • OnSave() : BIAS::ProjectionGUI
  • OnScaleOffset() : BIAS::ScaledImageCanvas
  • OnShutter() : MyFrame
  • OnSize() : MainFrame, BIAS::OpenGLCanvasBase, BIAS::ImageCanvas
  • OnSpinCtrl() : BIAS::ParamGUIPanel
  • OnStepsEnter() : MainFrame
  • OnTestShot() : MyFrame
  • OnTextEnter() : BIAS::ParamGUIPanel
  • OnTimer() : MyFrame, MainFrame
  • OnWhiteBalance() : MyFrame
  • OnZoomFactor() : BIAS::ZoomFrame
  • Open() : BIAS::VideoStream
  • OpenCamera_() : BIAS::VideoSource_uEye
  • OpenDevice() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • OpenGLCanvas() : BIAS::OpenGLCanvas
  • OpenGLCanvasBase() : BIAS::OpenGLCanvasBase
  • OpenGLOut() : BIAS::ThreeDOut
  • OpenGLOutEllipsoids() : BIAS::ThreeDOut
  • OpenGLOutImages() : BIAS::ThreeDOut
  • OpenGLOutLines() : BIAS::ThreeDOut
  • OpenGLOutPMatrices() : BIAS::ThreeDOut
  • OpenGLOutPMatrices_() : BIAS::ThreeDOut
  • OpenGLOutPoints() : BIAS::ThreeDOut
  • OpenLogFile() : BIAS::LogFacility
  • operator *() : TNT::Matrix< T >, BIAS::Matrix3x4< T >, BIAS::Matrix4x4< T >, BIAS::Matrix< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Matrix3x3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >, BIAS::AffineTransf
  • operator *=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator char **() : BIAS::WxToAsciiArray
  • operator!=() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::UUID, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator()() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D< T >, BIAS::UUIDsortAscending
  • operator+() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Image< StorageType >
  • operator+=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator-() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Image< StorageType >
  • operator-=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator/() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >
  • operator/=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Image< StorageType >
  • operator<() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::CCAStruct, BIAS::Feat, BIAS::UUID, BIAS::Position
  • operator<< : BIAS::Vector3< T >, BIAS::Vector< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::CoordinateTransform3D, BIAS::FilterMask, BIAS::UUID, BIAS::ROI, BIAS::Position, BIAS::ImageBase, BIAS::BaseFactory< BaseClassType >
  • operator<=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::UUID
  • operator=() : BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoShMFeeder, BIAS::VideoServer, BIAS::GenSynthMatches, BIAS::CScommBase, BIAS::VideoStream, BIAS::PyramidImage< StorageType >, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::Camera< StorageType >, BIAS::TrifocalTensor, BIAS::SimilarityTransform, BIAS::Quadric3D, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose, BIAS::PMatrix, BIAS::HMatrix, BIAS::FMatrix, BIAS::EpipolarLine, BIAS::EMatrix, BIAS::CovMatrix3x3, BIAS::CoordinateTransform3D, BIAS::Conic2D, BIAS::CCAStruct, BIAS::FilterMask, BIAS::Feat, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Region2D< Array2D >, TNT::Region1D< Array1D >, TNT::Index1D, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D3x3x3< T >, BIAS::Tensor3D< T >, BIAS::Polynom, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::UUID, BIAS::ROI, BIAS::Position, BIAS::MetaData, BIAS::AppData, BIAS::ImageBase, BIAS::Image< StorageType >, BIAS::TrifocalTensorBase, BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >, BIAS::PMatrixBase, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D, BIAS::HMatrixBase, BIAS::FMatrixBase, BIAS::AffineTransf, BIAS::RedirectStreams, BIAS::LogFacility, BIAS::Debug
  • operator==() : BIAS::Matrix< T >, BIAS::MatchDataBase, BIAS::CCAStruct, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Polynom, BIAS::UUID, BIAS::ImageBase, BIAS::RMatrixBase, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator>() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>> : BIAS::Vector3< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::Pose, BIAS::CoordinateTransform3D, BIAS::UUID, BIAS::ImageBase
  • operator[]() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >, BIAS::Polynom
  • operator|() : BIAS::Image< StorageType >
  • OpticalFilter : CameraParameter_s
  • OpticalFilterChanged : CameraParameter_s
  • Optimal() : BIAS::Triangulation
  • Optimize() : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • order_ : BIAS::Polynom
  • Orientation_ : BIAS::Camera< StorageType >
  • OrientationValid_ : BIAS::Camera< StorageType >
  • origim_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • origim_mutex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • origImage_ : MainFrame
  • OrigPicture_ : BIAS::GuiBase
  • orl : olist
  • osta : olist
  • ounit : olist
  • OutBuf_ : BIAS::RedirectStreams
  • OuterProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • OutStr_ : BIAS::RedirectStreams
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- z -

  • z : Multitype
  • zero : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >
  • zero_ : TNT::UpperTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >
  • ZeroHist() : BIAS::Histogram2D, BIAS::Histogram
  • zeroLevel_ : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • ZeroPad() : BIAS::ImageBase
  • ZeroThreshold_ : BIAS::SVD
  • zFar : BIAS::CameraViewFrustum
  • zim_ : BIAS::ZoomImageCanvas
  • zLogFileStream_ : BIAS::LogFacility
  • zLogStream_ : BIAS::LogFacility
  • zNear : BIAS::CameraViewFrustum
  • Zoom() : BIAS::ImageCanvas
  • zoom : BIAS::CPDiscreteParam
  • zoom_ : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • zoomCamera_ : BIAS::CameraParam, BIAS::CameraData
  • Zoomed_ : BIAS::ImageCanvas
  • ZoomFactor_ : BIAS::ZoomImageCanvas
  • ZoomFrame() : BIAS::ZoomFrame
  • ZoomImageCanvas() : BIAS::ZoomImageCanvas
  • ZoomX_ : BIAS::ZoomImageCanvas
  • ZoomXPos_ : BIAS::ZoomImageCanvas
  • ZoomY_ : BIAS::ZoomImageCanvas
  • ZoomYPos_ : BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- ~ -

  • ~AffineTransf() : BIAS::AffineTransf
  • ~AppData() : BIAS::AppData
  • ~BackwardMapping() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • ~BaseException() : BIAS::BaseException
  • ~BaseFactory() : BIAS::BaseFactory< BaseClassType >
  • ~Binomial() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • ~Bresenham() : BIAS::Bresenham
  • ~BresenhamCircle() : BIAS::BresenhamCircle
  • ~BresenhamCircleEighth() : BIAS::BresenhamCircleEighth
  • ~BresenhamCircleSlow() : BIAS::BresenhamCircleSlow
  • ~BSplineCurve() : BIAS::BSplineCurve
  • ~Camera() : BIAS::Camera< StorageType >
  • ~CameraParam() : BIAS::CameraParam
  • ~CameraViewController() : BIAS::CameraViewController
  • ~CameraViewExternals() : BIAS::CameraViewExternals
  • ~CameraViewFrustum() : BIAS::CameraViewFrustum
  • ~CameraViewInternals() : BIAS::CameraViewInternals
  • ~CameraViewport() : BIAS::CameraViewport
  • ~Cholesky() : BIAS::Cholesky
  • ~ColorHistogram() : BIAS::ColorHistogram< StorageType >
  • ~ColorMultiHistogram() : BIAS::ColorMultiHistogram< StorageType >
  • ~Condensation() : BIAS::Condensation
  • ~Convolution() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ~CornerDetectorBase() : BIAS::CornerDetectorBase< StorageType >
  • ~CornerDetectorFoerstner() : BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • ~CornerDetectorGradient() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • ~CornerDetectorHarris() : BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • ~CornerDetectorKLT() : BIAS::CornerDetectorKLT< StorageType, CalculationType >
  • ~CornerDetectorSusan() : BIAS::CornerDetectorSusan< StorageType >
  • ~CornerMatcher() : BIAS::CornerMatcher
  • ~CovMatrix3x3() : BIAS::CovMatrix3x3
  • ~CScommBase() : BIAS::CScommBase
  • ~CScommClient() : BIAS::CScommClient
  • ~CScommData() : BIAS::CScommData
  • ~CScommServer() : BIAS::CScommServer
  • ~CuEye() : CuEye
  • ~DC_GPS() : BIAS::DC_GPS
  • ~DC_inertial() : BIAS::DC_inertial
  • ~DC_ptu() : BIAS::DC_ptu
  • ~Debug() : BIAS::Debug
  • ~DeInterlace() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • ~Dilation() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • ~Distribution() : BIAS::Distribution
  • ~DistTransform() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • ~doubleRANSAC() : BIAS::doubleRANSAC
  • ~DrawTextGL() : BIAS::DrawTextGL
  • ~EMatrixBase() : BIAS::EMatrixBase
  • ~EpipolarLine() : BIAS::EpipolarLine
  • ~Erosion() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • ~EuclideanTransf3D() : BIAS::EuclideanTransf3D
  • ~ExampleDebug() : BIAS::ExampleDebug
  • ~ExifTag() : BIAS::ExifTag
  • ~FFT() : BIAS::FFT
  • ~FFT2D() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • ~FFT2D_Tiles() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • ~FilterBase() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • ~FilterNTo2N() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • ~FilterNTo3N() : BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
  • ~FilterNToN() : BIAS::FilterNToN< InputStorageType, OutputStorageType >
  • ~FMatrix() : BIAS::FMatrix
  • ~FMatrixBase() : BIAS::FMatrixBase
  • ~Fortran_Matrix() : TNT::Fortran_Matrix< T >
  • ~Fortran_Sparse_Col_Matrix() : TNT::Fortran_Sparse_Col_Matrix< T >
  • ~Gauss() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • ~GaussHelmert() : BIAS::GaussHelmert
  • ~GenSynthMatches() : BIAS::GenSynthMatches
  • ~GeometryGL() : BIAS::GeometryGL
  • ~GradientGauss() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • ~GradientGaussAsymmetric() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
  • ~GradientSimple() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • ~GradientSobel3x3() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • ~GuiBase() : BIAS::GuiBase
  • ~GuiEnhanced() : BIAS::GuiEnhanced
  • ~GuiGTK() : BIAS::GuiGTK
  • ~GuiWX() : BIAS::GuiWX
  • ~Histogram() : BIAS::Histogram
  • ~Histogram2D() : BIAS::Histogram2D
  • ~HMatrix() : BIAS::HMatrix
  • ~HMatrixBase() : BIAS::HMatrixBase
  • ~HomgLine2D() : BIAS::HomgLine2D
  • ~HomgLine3D() : BIAS::HomgLine3D
  • ~HomgPlane3D() : BIAS::HomgPlane3D
  • ~HomgPoint1D() : BIAS::HomgPoint1D
  • ~HomgPoint2D() : BIAS::HomgPoint2D
  • ~HomgPoint2DCov() : BIAS::HomgPoint2DCov
  • ~HomgPoint3D() : BIAS::HomgPoint3D
  • ~HomgPoint3DCov() : BIAS::HomgPoint3DCov
  • ~HomographyMapping() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • ~ICECallbackInterface() : BIAS::ICECallbackInterface
  • ~Image() : BIAS::Image< StorageType >
  • ~ImageAttributes() : BIAS::ImageAttributes
  • ~ImageBase() : BIAS::ImageBase
  • ~ImageCanvas() : BIAS::ImageCanvas
  • ~ImageCanvasEnhanced() : BIAS::ImageCanvasEnhanced
  • ~ImageCanvasGLBase() : BIAS::ImageCanvasGLBase
  • ~ImageConvertThreaded() : BIAS::ImageConvertThreaded
  • ~ImgObjGL() : BIAS::ImgObjGL
  • ~IntegralHistogram() : BIAS::IntegralHistogram
  • ~Interpolator() : BIAS::Interpolator
  • ~JpegHandler() : BIAS::JpegHandler
  • ~Kalman() : BIAS::Kalman
  • ~KMatrix() : BIAS::KMatrix
  • ~Label() : BIAS::Label
  • ~LeastSquaresBase() : BIAS::LeastSquaresBase
  • ~LeastSquaresLapack() : BIAS::LeastSquaresLapack
  • ~LeastSquaresSVD() : BIAS::LeastSquaresSVD
  • ~LinearRegionDetector() : BIAS::LinearRegionDetector< StorageType, CalculationType >
  • ~LogFacility() : BIAS::LogFacility
  • ~LogPolarMapping() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • ~MatchDataBase() : BIAS::MatchDataBase
  • ~MatlabTBUndistortion() : BIAS::MatlabTBUndistortion
  • ~Matrix() : TNT::Matrix< T >, BIAS::Matrix< T >
  • ~Matrix2x2() : BIAS::Matrix2x2< T >
  • ~Matrix3x3() : BIAS::Matrix3x3< T >
  • ~Matrix3x4() : BIAS::Matrix3x4< T >
  • ~Matrix4x4() : BIAS::Matrix4x4< T >
  • ~MDcam() : BIAS::MDcam
  • ~Mean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • ~Median() : BIAS::Median< InputStorageType, OutputStorageType >
  • ~Median1D() : BIAS::Median1D< DataType >
  • ~MetaData() : BIAS::MetaData
  • ~Morphology() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • ~MSAC() : BIAS::MSAC< SolutionType >
  • ~MyAlgorithm() : MyAlgorithm
  • ~MyApp() : MyApp
  • ~MyFrame() : MyFrame
  • ~MySampleGrabberCB() : BIAS::MySampleGrabberCB
  • ~myTestClass() : myTestClass
  • ~MyUnscentedTransform() : MyUnscentedTransform
  • ~OpenGLCanvas() : BIAS::OpenGLCanvas
  • ~OpenGLCanvasBase() : BIAS::OpenGLCanvasBase
  • ~Param() : BIAS::Param
  • ~ParamCallbackInterface() : BIAS::ParamCallbackInterface
  • ~Parametrization() : BIAS::Parametrization
  • ~ParamGUI() : BIAS::ParamGUI
  • ~ParamGUIDialog() : BIAS::ParamGUIDialog
  • ~ParamGUIPanel() : BIAS::ParamGUIPanel
  • ~ParamTypeBase() : BIAS::ParamTypeBase
  • ~ParamTypeBool() : BIAS::ParamTypeBool
  • ~ParamTypeDouble() : BIAS::ParamTypeDouble
  • ~ParamTypeEnum() : BIAS::ParamTypeEnum
  • ~ParamTypeInt() : BIAS::ParamTypeInt
  • ~ParamTypeString() : BIAS::ParamTypeString
  • ~ParamTypeVecDbl() : BIAS::ParamTypeVecDbl
  • ~ParamTypeVecInt() : BIAS::ParamTypeVecInt
  • ~PlaneRANSAC() : BIAS::PlaneRANSAC
  • ~PlueckerMatrix() : BIAS::PlueckerMatrix
  • ~PMatrix() : BIAS::PMatrix
  • ~PMatrixBase() : BIAS::PMatrixBase
  • ~PMatrixEstimation() : BIAS::PMatrixEstimation
  • ~Polynom() : BIAS::Polynom
  • ~PolynomialSolve() : BIAS::PolynomialSolve
  • ~Pose() : BIAS::Pose
  • ~PoseParametrizationCovariance() : BIAS::PoseParametrizationCovariance
  • ~Position() : BIAS::Position
  • ~Projection() : BIAS::Projection
  • ~ProjectionMapping() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • ~ProjectionParametersBase() : BIAS::ProjectionParametersBase
  • ~ProjectionParametersPerspective() : BIAS::ProjectionParametersPerspective
  • ~ProjectionParametersProjective() : BIAS::ProjectionParametersProjective
  • ~ProjectionParametersSpherical() : BIAS::ProjectionParametersSpherical
  • ~ProjectionParametersZoom() : BIAS::ProjectionParametersZoom
  • ~PyramidImage() : BIAS::PyramidImage< StorageType >
  • ~Quaternion() : BIAS::Quaternion< QUAT_TYPE >
  • ~Random() : BIAS::Random
  • ~RANSAC() : BIAS::RANSAC< SolutionType >
  • ~RANSACPreKnowledge() : BIAS::RANSACPreKnowledge< SolutionType >
  • ~RedirectStreams() : BIAS::RedirectStreams
  • ~RegionMatcher() : BIAS::RegionMatcher
  • ~Rescale() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • ~RigParameter() : BIAS::RigParameter
  • ~RMatrix() : BIAS::RMatrix
  • ~RMatrixBase() : BIAS::RMatrixBase
  • ~ROI() : BIAS::ROI
  • ~ScaledImageCanvas() : BIAS::ScaledImageCanvas
  • ~ScanLine() : BIAS::ScanLine
  • ~ScanLine2() : BIAS::ScanLine2
  • ~SphericalUndistortion() : BIAS::SphericalUndistortion
  • ~StatekeeperGL() : BIAS::StatekeeperGL
  • ~StereoRedGreen() : BIAS::StereoRedGreen
  • ~StructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • ~SVD() : BIAS::SVD
  • ~SVD3x3() : BIAS::SVD3x3
  • ~Tensor3D() : BIAS::Tensor3D< T >
  • ~Tensor3D3x3x3() : BIAS::Tensor3D3x3x3< T >
  • ~TFTensorEstimation() : BIAS::TFTensorEstimation
  • ~ThreeDOut() : BIAS::ThreeDOut
  • ~TimeMeasure() : BIAS::TimeMeasure
  • ~TimeMeasurement() : BIAS::TimeMeasurement
  • ~TopFrame() : BIAS::TopFrame
  • ~Tracker() : BIAS::Tracker< StorageType, CalculationType >
  • ~TrackerBase() : BIAS::TrackerBase< StorageType >
  • ~TrackerBaseInterface() : BIAS::TrackerBaseInterface< StorageType >
  • ~TrackerSynth() : BIAS::TrackerSynth< StorageType, CalculationType >
  • ~TriangleMesh() : BIAS::TriangleMesh
  • ~Triangulation() : BIAS::Triangulation
  • ~TrifocalTensor() : BIAS::TrifocalTensor
  • ~TrifocalTensorBase() : BIAS::TrifocalTensorBase
  • ~UndistortionMapping() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • ~UnscentedTransform() : BIAS::UnscentedTransform
  • ~UnVignette() : BIAS::UnVignette
  • ~UUID() : BIAS::UUID
  • ~Vector() : BIAS::Vector< T >, TNT::Vector< T >
  • ~Vector2() : BIAS::Vector2< T >
  • ~Vector3() : BIAS::Vector3< T >
  • ~Vector4() : BIAS::Vector4< T >
  • ~VideoServer() : BIAS::VideoServer
  • ~VideoShMFeeder() : BIAS::VideoShMFeeder
  • ~VideoSource() : BIAS::VideoSource
  • ~VideoSource_DCAM() : BIAS::VideoSource_DCAM
  • ~VideoSource_Disk() : BIAS::VideoSource_Disk
  • ~VideoSource_DiskPMD() : BIAS::VideoSource_DiskPMD
  • ~VideoSource_DSHOW() : BIAS::VideoSource_DSHOW
  • ~VideoSource_DV() : MIP::VideoSource_DV
  • ~VideoSource_DV2() : MIP::VideoSource_DV2
  • ~VideoSource_Net() : BIAS::VideoSource_Net
  • ~VideoSource_Shm() : BIAS::VideoSource_Shm
  • ~VideoSource_Stereo() : BIAS::VideoSource_Stereo
  • ~VideoSource_uEye() : BIAS::VideoSource_uEye
  • ~VideoSource_V4L() : BIAS::VideoSource_V4L
  • ~VideoStream() : BIAS::VideoStream
  • ~WrapBias2Ipl() : BIAS::WrapBias2Ipl
  • ~WxMainThread() : BIAS::WxMainThread
  • ~WxToAsciiArray() : BIAS::WxToAsciiArray
  • ~XMLBase() : BIAS::XMLBase
  • ~XMLIO() : BIAS::XMLIO
  • ~ZoomFrame() : BIAS::ZoomFrame
  • ~ZoomImageCanvas() : BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- a -

  • A : A, BIAS::Projection3DData
  • A_ : BIAS::Kalman, BIAS::SVD, BIAS::UnVignette, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::PMatrix, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • AboveThresholdToValue() : BIAS::Image< StorageType >
  • AbsDiff() : BIAS::Image< StorageType >
  • AbsLeftNullspaceDim() : BIAS::SVD
  • AbsNullspaceDim() : BIAS::SVD
  • AbsoluteZeroThreshold_ : BIAS::SVD
  • AbsRightNullspaceDim() : BIAS::SVD
  • AcceleratorPedal : BIAS::DC_inertial
  • AcceptConn_() : BIAS::CScommBase
  • actIndex_ : BIAS::Interpolator
  • ActivateScorpionTimestamp() : BIAS::VideoSource_DCAM, BIAS::MDcam
  • Active_ : BIAS::VideoSource
  • ActiveFrame : BIAS::VideoSource_V4L
  • ActiveFrame_ : BIAS::VideoSource_Disk
  • ActiveFrameMutex_ : BIAS::VideoSource_V4L
  • ActiveTrigger_ : BIAS::MDcam
  • AdaptAxisAngleRepresentation() : BIAS::RigParameter
  • Add() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >, BIAS::MetaData
  • addAttribute() : BIAS::XMLIO
  • AddBoolWidgets() : BIAS::ParamGUIPanel
  • AddCalibration() : BIAS::RigParameter
  • AddCamera() : BIAS::RigParameter
  • AddCameraCenter() : BIAS::RigParameter
  • AddCameraDataToNode() : BIAS::ProjectionParametersIO
  • AddCameraDataToRig() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • AddCameraDataToXMLTree() : BIAS::CameraParam
  • AddCameraOnly() : BIAS::RigParameter
  • addChildNode() : BIAS::XMLIO
  • addComment() : BIAS::XMLIO
  • addContent() : BIAS::XMLIO
  • AddCornerDetectorType() : BIAS::CornerDetectorBase< StorageType >
  • AddData() : BIAS::Distribution
  • AddDebugLevel() : BIAS::Debug
  • AddDiffusions_() : BIAS::Condensation
  • AddDoubleWidgets() : BIAS::ParamGUIPanel
  • AddEllipsoid() : BIAS::ThreeDOut
  • AddEnumWidgets() : BIAS::ParamGUIPanel
  • AddFilenames() : BIAS::VideoSource_Disk
  • AddGaussianNoise_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • AddGoodGuesses() : BIAS::RANSACPreKnowledge< SolutionType >
  • AddHist() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Histogram2D, BIAS::Histogram
  • AddImage() : BIAS::ThreeDOut
  • AddIntWidgets() : BIAS::ParamGUIPanel
  • AddIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • AddLine() : BIAS::ThreeDOut
  • AddMatrixPanel() : BIAS::ProjectionGUI
  • AddNumPoints() : BIAS::Tracker< StorageType, CalculationType >
  • AddOffsets_() : BIAS::Condensation
  • AddOutlier_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • AddParam_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • AddParamBool() : BIAS::Param
  • AddParamDouble() : BIAS::Param
  • AddParamEnum() : BIAS::Param
  • AddParameter_() : BIAS::Tracker< StorageType, CalculationType >
  • AddParamInt() : BIAS::Param
  • AddParams_() : BIAS::VideoServer
  • AddParamString() : BIAS::Param
  • AddParamVecDbl() : BIAS::Param
  • AddParamVecInt() : BIAS::Param
  • AddPMatrix() : BIAS::ThreeDOut
  • AddPoint() : BIAS::ThreeDOut
  • AddPoints() : BIAS::Tracker< StorageType, CalculationType >
  • AddPose() : BIAS::ThreeDOut
  • AddProjection() : BIAS::ThreeDOut
  • addr : Vardesc
  • AddRotation() : BIAS::RigParameter
  • AddSensorCenter() : BIAS::RigParameter
  • AddSensorRotation() : BIAS::RigParameter
  • AddStringWidgets() : BIAS::ParamGUIPanel
  • AddTriangleMesh() : BIAS::ThreeDOut
  • AddType() : BIAS::BaseFactory< BaseClassType >
  • AddVecDblWidgets() : BIAS::ParamGUIPanel
  • AddVecIntWidgets() : BIAS::ParamGUIPanel
  • AddVectorPanel() : BIAS::ProjectionGUI
  • AddWeightedHist() : BIAS::Histogram
  • AddZoomStep() : BIAS::ProjectionParametersZoom
  • aerr : alist
  • AffinePrediction_ : BIAS::Tracker< StorageType, CalculationType >
  • AffineResults_ : BIAS::Tracker< StorageType, CalculationType >
  • AffineTransf() : BIAS::AffineTransf
  • AlgebraicMinimization() : BIAS::TFTensorEstimation
  • aliasing_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • AlignedSize : BIAS::VideoStream::VSHeader
  • AllocateBuffer_() : BIAS::GuiGTK
  • ALLOCATOR_IMPL() : C, B, A
  • AllocatorFunction_ : BIAS::BaseFactory< BaseClassType >::MapEntry
  • AllocatorFunctionPointer : BIAS::BaseFactory< BaseClassType >
  • AllocImageMem() : CuEye
  • Alpha_ : BIAS::UnscentedTransform
  • alphaImg_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Analytic() : BIAS::PolynomialSolve
  • AnalyzeData_() : BIAS::CScommBase
  • AnalyzeFirstMsg_() : BIAS::CScommBase
  • angle : BIAS::Projection3DData
  • Angle_ : BIAS::EpipolarLine
  • AngleCorrX_ : BIAS::CameraParam, BIAS::CameraData
  • AngleCorrY_ : BIAS::CameraParam, BIAS::CameraData
  • animationUpdateEnabled : BIAS::OpenGLCanvasBase
  • AppApp_ : BIAS::GuiWX
  • AppData() : BIAS::AppData
  • AppendChannel() : BIAS::Image< StorageType >
  • ApplyBytesPerPacket() : BIAS::VideoSource_DCAM
  • areaMax_ : BIAS::CondensImg, BIAS::CondensHisto
  • areaMin_ : BIAS::CondensImg, BIAS::CondensHisto
  • ArgV_ : BIAS::Param
  • array() : TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • Arrow() : BIAS::ImageDraw< StorageType >
  • ArtFlags : BIAS::DC_inertial
  • ArtLeadVehicleDistance : BIAS::DC_inertial
  • ArtLeadVehicleVelocity : BIAS::DC_inertial
  • ArtSollVelocity : BIAS::DC_inertial
  • ASCIIString_ : BIAS::Camera< StorageType >
  • ASCIIValid_ : BIAS::Camera< StorageType >
  • AspectRatio : BIAS::PMDImageMetaData
  • aspectratio_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • AssignUUID() : BIAS::UUID
  • AssignUUID_Consecutive() : BIAS::UUID
  • AssignUUID_Global() : BIAS::UUID
  • AT_ : BIAS::Kalman
  • aunit : alist
  • AutoadaptScale_ : BIAS::ScaledImageCanvas
  • AutoExposure_ : MyFrame
  • AutoGain : CameraParameter_s
  • AutoGainChanged : CameraParameter_s
  • AutoMode() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • autoPyramidSize_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • AutoShutter : CameraParameter_s
  • AutoShutterChanged : CameraParameter_s
  • AutoWhiteBalance : CameraParameter_s
  • AutoWhiteBalanceChanged : CameraParameter_s
  • Average_ : BIAS::Histogram
  • axis : BIAS::Projection3DData
  • AXIS_AND_ANGLE : BIAS::PMatrixBase
  • AXIS_TIMES_ANGLE : BIAS::PMatrixBase
  • azimuth : BIAS::DC_GPS
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- b -

  • B() : B
  • bAbortOnFatal_ : BIAS::LogFacility
  • background_ : BIAS::Contour
  • Backproject() : BIAS::PMatrixBase
  • BackprojectByZDepth() : BIAS::PMatrix
  • BackprojectPseudoinverse() : BIAS::PMatrix
  • BackprojectWorldCoo() : BIAS::PMatrix
  • BackwardMapping() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • base : BIAS::DrawTextGL
  • Base() : Base
  • BaseException() : BIAS::BaseException
  • BaseFactory() : BIAS::BaseFactory< BaseClassType >
  • BaseInitialized_ : BIAS::GuiBase
  • BayerToGrey_() : BIAS::ImageConvert
  • BayerToRGB_() : BIAS::ImageConvert
  • BayerToRGBSlow_() : BIAS::ImageConvert
  • BBCIn() : BIAS::PMatrix
  • bc : BIAS::CCAStruct
  • bCodeInfo_ : BIAS::LogFacility
  • bDoDownSamplingByTwo_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • begin() : TNT::Vector< T >, TNT::Fortran_Matrix< T >
  • BelowThresholdToValue() : BIAS::Image< StorageType >
  • Beta_ : BIAS::UnscentedTransform
  • bExpDist_ : BIAS::IntegralHistogram
  • Bezier3() : BIAS::Interpolator
  • bezierInitialized_ : BIAS::Interpolator
  • BGRAToHSL_() : BIAS::ImageConvert
  • BGRAToRGB_() : BIAS::ImageConvert
  • BGRToHSL_() : BIAS::ImageConvert
  • BGRToRGB_() : BIAS::ImageConvert
  • BIAS2ipl() : BIAS::ImageConvert
  • BIASColorModel_ : BIAS::VideoSource_DSHOW
  • BicubicInterpolation() : BIAS::Image< StorageType >
  • BilinearInterpolation() : BIAS::Image< StorageType >
  • BilinearInterpolationGrey() : BIAS::Image< StorageType >
  • BilinearInterpolationGreyMinVal() : BIAS::Image< StorageType >
  • BilinearInterpolationRGBInterleaved() : BIAS::Image< StorageType >
  • BilinearInterpolationRGBPlanar() : BIAS::Image< StorageType >
  • BilinearInterpolationShiftRegion() : BIAS::Image< StorageType >
  • BilinearRegion1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegion2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterBinomial3Sobel3x3_1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterBinomial3Sobel3x3_2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterMask1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterMask2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterVec1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterVec2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionPrefiltered1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionPrefiltered2_() : BIAS::TrackerBaseInterface< StorageType >
  • bImageLoaded_ : MainFrame
  • Binarize() : BIAS::Image< StorageType >
  • binaryData : BIAS::CScommMsg
  • binaryDataSize : BIAS::CScommMsg
  • BinaryThreshold() : BIAS::Image< StorageType >
  • binCount_ : BIAS::ColorHistogram< StorageType >
  • BinCount_ : BIAS::Histogram
  • Bind() : BIAS::WrapBias2Ipl
  • Binomial() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • binomial_ : BIAS::Tracker< StorageType, CalculationType >
  • BinRead() : BIAS::Matrix< T >
  • binSize_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • BinSize_ : BIAS::Histogram
  • binSizeSat_ : BIAS::ColorHistogram< StorageType >
  • bIntegralHisto_ : BIAS::CondensHisto
  • BinWrite() : BIAS::Matrix< T >
  • bIsInitialized_ : BIAS::VideoShMFeeder, BIAS::UnVignette
  • BitDepth_ : BIAS::ImageBase
  • Bitmap_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • bLeastSquaresPrepared_ : BIAS::UnVignette
  • BlinkLever : BIAS::DC_inertial
  • BlobCount_ : BIAS::Label
  • BlobMap_ : BIAS::Label
  • BotRights_ : BIAS::Label
  • bottom : BIAS::CameraViewFrustum
  • Bottom : BIAS::HomgPoint2D
  • BottomLeft : BIAS::HomgPoint2D
  • BottomRight : BIAS::HomgPoint2D
  • BottomRight_ : BIAS::ImageCanvasEnhanced
  • br : SegmentationData, BIAS::CCAStruct
  • brdx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • brdxy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • brdy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Bresenham() : BIAS::Bresenham
  • BresenhamCircle() : BIAS::BresenhamCircle
  • BresenhamCircleEighth() : BIAS::BresenhamCircleEighth
  • BresenhamCircleSlow() : BIAS::BresenhamCircleSlow
  • bShowDialogs_ : BIAS::VideoSource_DSHOW
  • BSplineCurve() : BIAS::BSplineCurve
  • Buffer_ : MIP::VideoSource_DV2, BIAS::GuiWX, BIAS::GuiGTK
  • buffer_ : BIAS::VideoSource_V4L
  • BufferCB() : BIAS::MySampleGrabberCB
  • bufferLastCaptured_ : BIAS::VideoSource_V4L
  • BufferMutex_ : BIAS::GuiGTK
  • BufferSize_ : MIP::VideoSource_DV2
  • buffsize_ : BIAS::JpegHandler
  • bufLengths : BIAS::VideoSource_V4L
  • bufStarts : BIAS::VideoSource_V4L
  • BuildPolarCoordinateMap_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • BuildPyramid_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • bUnVignetteParamsReady_ : MainFrame
  • bUseEvenLines_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • bUseLuT_ : BIAS::UnVignette
  • bXK_1_ : BIAS::Interpolator
  • bXK_2_ : BIAS::Interpolator
  • bXK_3_ : BIAS::Interpolator
  • bYK_1_ : BIAS::Interpolator
  • bYK_2_ : BIAS::Interpolator
  • bYK_3_ : BIAS::Interpolator
  • BytesPerCyle_ : BIAS::VideoSource_DCAM
  • BytesPerPacket_ : BIAS::VideoSource_DCAM
  • BytesPerPixel : BIAS::VideoStream::VSHeader
  • BytesPerPixel_ : BIAS::VideoSource
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- c -

  • c : Multitype, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • C : C, BIAS::Ellipsoid3DData, BIAS::Projection3DData, BIAS::PMatrix3DData, BIAS::CameraViewExternals
  • C_ : BIAS::SimilarityTransform, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • c_FileList : FindFilesInPath
  • CalcAverage_() : BIAS::Histogram
  • CalcBytesPerPacket() : BIAS::VideoSource_DCAM
  • CalcCoordOffset_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • CalcGaussianWeightMatrix_() : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBase< StorageType >
  • CalcImageMean3x3() : MainFrame
  • CalCoefficients() : BIAS::PolynomialSolve
  • CalcRadius_() : BIAS::UnVignette
  • CalcScaleShift() : BIAS::Image< StorageType >
  • CalcSigmaDepth() : BIAS::PMDImageProc
  • CalcSimilarity() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • CalcSimilarityColorWeighted() : BIAS::ColorMultiHistogram< StorageType >
  • CalcStructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor3x3() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor5x5() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor7x7() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensorValid() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcTransformed_() : BIAS::EpipolarLine
  • CalculateBaseWeights_() : BIAS::Condensation
  • CalculateFootpoint() : BIAS::HomgLine3D
  • CalculateMean_() : BIAS::Condensation
  • CalculatePerspDistorion_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculatePerspUndistorion_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculateSphericalCoord_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculateSteps() : MainFrame
  • CalculateToSphereMapping_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculationInFloat() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • Calibration_ : BIAS::RigParameter
  • CallbackObj_ : BIAS::ImageCanvasEnhanced
  • CallbackObject_ : BIAS::ParamTypeBase
  • Cam2_ : MyFrame
  • Cam_ : MyFrame
  • camAngleX_ : BIAS::CylinderMapping
  • camAngleY_ : BIAS::CylinderMapping
  • Camera() : BIAS::Camera< StorageType >
  • camera_ : BIAS::VideoSource_DSHOW, BIAS::MySampleGrabberCB, BIAS::VideoServer
  • Camera_ : BIAS::MDcam, BIAS::RigParameter
  • CameraCenter : BIAS::PMDImageMetaData
  • CameraParam() : BIAS::CameraParam
  • CameraRotation : BIAS::PMDImageMetaData
  • CameraScale : BIAS::ThreeDOutParameters
  • CameraStatus() : CuEye
  • CameraStyle : BIAS::ThreeDOutParameters
  • CameraViewController() : BIAS::CameraViewController
  • CameraViewExternals() : BIAS::CameraViewExternals
  • CameraViewFrustum() : BIAS::CameraViewFrustum
  • CameraViewInternals() : BIAS::CameraViewInternals
  • CameraViewport() : BIAS::CameraViewport
  • camfile : MyFrame
  • CamID_ : BIAS::CameraParam, BIAS::CameraData
  • CamImage_ : BIAS::VideoServer
  • CamImg2_ : MyFrame
  • CamImg_ : MyFrame
  • CamModel_ : BIAS::VideoSource_DCAM, BIAS::CameraParam, BIAS::CameraData
  • camParam_ : BIAS::VideoServer
  • cams : MyFrame
  • camType_ : BIAS::VideoServer
  • CanCompare() : BIAS::CanCompare< T1, T2 >
  • CanCopy() : BIAS::CanCopy< T1, T2 >
  • CanH_ : BIAS::TrifocalTensor
  • CanMultiply() : BIAS::CanMultiply< T1, T2, T3 >
  • Canvas_ : BIAS::TopFrame
  • capability2 : BIAS::VideoSource_V4L
  • CaptureFrame() : CuEye
  • CaptureVideo() : CuEye
  • CartesianToPolar() : BIAS::Vector3< T >
  • cc : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • CCAStruct() : BIAS::CCAStruct
  • CDT_Foerstner : BIAS::CornerDetectorBase< StorageType >
  • CDT_Harris : BIAS::CornerDetectorBase< StorageType >
  • CDT_Invalid : BIAS::CornerDetectorBase< StorageType >
  • CDT_KLT : BIAS::CornerDetectorBase< StorageType >
  • CDT_Laplace : BIAS::CornerDetectorBase< StorageType >
  • CDT_Susan : BIAS::CornerDetectorBase< StorageType >
  • cellSizeX_ : BIAS::CameraParam, BIAS::CameraData
  • cellSizeY_ : BIAS::CameraParam, BIAS::CameraData
  • Center : BIAS::HomgPoint2D
  • center : BIAS::CCAStruct
  • Center_ : BIAS::RigParameter
  • Centers_ : BIAS::Label
  • cerr : cllist
  • Cerr2Null() : BIAS::RedirectStreams
  • cf : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • ChangeImgSize_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Channel_ : MIP::VideoSource_DV
  • ChannelCount : BIAS::VideoStream::VSHeader
  • ChannelCount_ : BIAS::ImageBase
  • channels : BIAS::PMDImageMetaData
  • CheckCoefficients() : BIAS::PolynomialSolve
  • CheckConstraint_() : BIAS::PlueckerMatrix
  • CheckDecomposition_() : BIAS::PMatrix
  • CheckForEvent() : BIAS::GuiBase
  • CheckForKeyEvent() : BIAS::GuiBase
  • CheckFormat() : BIAS::AppData
  • CheckForMouseButtonEvent() : BIAS::GuiBase
  • CheckImageQuality() : BIAS::CondensHisto, BIAS::ColorHistogram< StorageType >
  • CheckImageQualityComplete() : BIAS::ColorHistogram< StorageType >
  • CheckImageQualityRef() : BIAS::ColorHistogram< StorageType >
  • CheckParam() : BIAS::Param
  • CheckPointCorr() : BIAS::TrifocalTensorBase
  • CheckRegisteredMsgs_() : BIAS::CScommBase
  • CheckSVD_() : BIAS::PMatrix
  • CheckSymmetry_() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • chist_ : BIAS::CondensHisto
  • Cholesky() : BIAS::Cholesky
  • ciend : cilist
  • cierr : cilist
  • cifmt : cilist
  • Circle() : BIAS::ImageDraw< StorageType >
  • CircleCenter() : BIAS::ImageDraw< StorageType >
  • CircleCenterFilled() : BIAS::ImageDraw< StorageType >
  • cirec : cilist
  • ciunit : cilist
  • Clear() : BIAS::Interpolator, BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::ProjectionParametersZoom, BIAS::AppData, BIAS::Image< StorageType >, BIAS::PoseParametrizationCovariance, BIAS::BaseFactory< BaseClassType >
  • clear() : BIAS::PyramidImage< StorageType >, BIAS::UUID, BIAS::XMLIO
  • ClearDataPointer() : BIAS::ImageBase
  • ClearDrawingContext_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • ClearEndTangent() : BIAS::Interpolator
  • ClearGuesses() : BIAS::RANSACPreKnowledge< SolutionType >
  • ClearPoints() : BIAS::Tracker< StorageType, CalculationType >
  • ClearStartTangent() : BIAS::Interpolator
  • client_ : BIAS::VideoSource_Net
  • ClipBoundingBoxToROICorners_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • ClipValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Clone() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • Close() : BIAS::VideoStream
  • Closed() : BIAS::GuiBase
  • CloseDevice() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • CloseEdge_ : BIAS::EpipolarLine
  • CloseIntersection_ : BIAS::EpipolarLine
  • CloseTimerFile() : BIAS::TimeMeasure
  • clothoidParameter : BIAS::DC_GPS
  • CM_Bayer_BGGR : BIAS::ImageBase
  • CM_Bayer_GBRG : BIAS::ImageBase
  • CM_Bayer_GRBG : BIAS::ImageBase
  • CM_Bayer_RGGB : BIAS::ImageBase
  • CM_BGR : BIAS::ImageBase
  • CM_BGRA : BIAS::ImageBase
  • CM_DV : BIAS::ImageBase
  • CM_Grey : BIAS::ImageBase
  • CM_GreyA : BIAS::ImageBase
  • CM_HSI_OBS : BIAS::ImageBase
  • CM_HSL : BIAS::ImageBase
  • CM_hsL : BIAS::ImageBase
  • CM_HSV : BIAS::ImageBase
  • CM_invalid : BIAS::ImageBase
  • CM_RGB : BIAS::ImageBase
  • CM_RGBA : BIAS::ImageBase
  • CM_RGBE : BIAS::ImageBase
  • CM_SymTensor2x2 : BIAS::ImageBase
  • CM_UYVY422 : BIAS::ImageBase
  • CM_YUV411 : BIAS::ImageBase
  • CM_YUV420P : BIAS::ImageBase
  • CM_YUV444 : BIAS::ImageBase
  • CM_YUYV422 : BIAS::ImageBase
  • CNCC() : BIAS::RegionMatcher
  • col_ : TNT::Fortran_Matrix< T >
  • col_ptr() : TNT::Fortran_Sparse_Col_Matrix< T >
  • col_size : xvimage
  • Color : BIAS::Line3DData, BIAS::Point3DData, BIAS::Ellipsoid3DData, BIAS::PMatrix3DData
  • Color_ : BIAS::Histogram
  • color_space_model : xvimage
  • ColorCCV() : BIAS::RegionMatcher
  • ColorChannels_ : BIAS::VideoSource
  • ColorHistogram() : BIAS::ColorHistogram< StorageType >
  • ColorMode_ : BIAS::VideoSource
  • colormodel : ThreadArg__
  • ColorModel : BIAS::VideoStream::VSHeader
  • ColorModel_ : BIAS::ImageBase
  • ColorMultiHistogram() : BIAS::ColorMultiHistogram< StorageType >
  • ColorNCC() : BIAS::RegionMatcher
  • ColorOfSelection : BIAS::Projection3DData
  • ColorSegmentation() : BIAS::ColorSegmentation
  • colptr_ : TNT::Fortran_Sparse_Col_Matrix< T >
  • cols_ : BIAS::MatrixPanel
  • Combine() : BIAS::StereoRedGreen
  • comm : BIAS::CSCommWithClientNr
  • comment : xvimage
  • commName : BIAS::CScommMsg
  • commNr : BIAS::CSCommWithClientNr
  • commPartners_ : BIAS::CScommBase
  • commPartnersConnected_ : BIAS::CScommBase
  • compdouble() : BIAS::Condensation
  • CompleteInitialized_ : BIAS::VideoSource
  • Compose() : BIAS::TrifocalTensor, BIAS::PMatrix, BIAS::TrifocalTensorBase, BIAS::PMatrixBase, BIAS::FMatrixBase
  • Compose_() : BIAS::PMatrix
  • Compress() : BIAS::JpegHandler
  • compressionColor_ : BIAS::VideoServer
  • Compressor_ : BIAS::VideoServer
  • Compute() : BIAS::SVD3x3, BIAS::SVD, BIAS::Median1D< DataType >, BIAS::FFT, BIAS::UnVignette, BIAS::RigParameter, BIAS::TFTensorEstimation, BIAS::PMatrixLinear, BIAS::HMatrixEstimation
  • compute() : BIAS::SVD
  • ComputeAffine() : BIAS::HMatrixEstimation
  • ComputeCalibrated() : BIAS::PMatrixLinear
  • ComputeEpipoles() : BIAS::TrifocalTensor
  • ComputeFromFDirect() : BIAS::PMatrixEstimation
  • ComputeFromFQuasiEuklid() : BIAS::PMatrixEstimation
  • ComputeFromPMatrices() : BIAS::FMatrix
  • ComputeIntPrecisionBits() : BIAS::FilterMask
  • ComputeK_() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • ComputeNormalSystem_() : BIAS::GaussHelmert
  • ComputeRotation() : BIAS::PMatrixEstimation
  • ComputeRotationCenter() : BIAS::PMatrixEstimation
  • ComputeSampleCount() : BIAS::RANSAC< SolutionType >
  • ComputeSigmaPoints_() : BIAS::UnscentedTransform
  • ConcatenateLocalTransform() : BIAS::CoordinateTransform3D
  • Condensation() : BIAS::Condensation
  • CondensHisto() : BIAS::CondensHisto
  • CondensImg() : BIAS::CondensImg
  • Conic2D() : BIAS::Conic2D
  • ConicType : BIAS::Conic2D
  • connected : BIAS::CScommData
  • connectPort_ : BIAS::CScommBase
  • ConnectServer() : BIAS::CScommClient
  • ConsistencyBackup_ : BIAS::CovMatrix3x3
  • Consistent() : BIAS::WrapBias2Ipl
  • const_iterator : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • const_reference : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • const_Region1D() : TNT::const_Region1D< Array1D >
  • const_Region2D() : TNT::const_Region2D< Array2D >
  • Constraints() : BIAS::CanMultiply< T1, T2, T3 >, BIAS::CanCompare< T1, T2 >, BIAS::CanCopy< T1, T2 >, BIAS::DerivedFrom< T, B >
  • Context_ : BIAS::VideoSource_Shm
  • ContinousThread_ : BIAS::VideoSource_V4L
  • Contour() : BIAS::Contour
  • contPixels_ : BIAS::Contour
  • controlPoints_ : MainFrame
  • ControlPoints_ : BIAS::UnVignette
  • controls_ : BIAS::MatrixPanel, BIAS::VectorPanel
  • Convert() : BIAS::ImageConvert
  • Convert_() : BIAS::PMDImageProc
  • ConvertIPL32to8() : BIAS::WrapBias2Ipl
  • ConvertST() : BIAS::ImageConvert
  • ConvertThread_() : BIAS::ImageConvertThreaded
  • ConvertThreaded() : BIAS::ImageConvertThreaded
  • ConvertToUC_() : BIAS::GuiBase
  • ConvFloatHori_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvFloatMat_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvFloatVert_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntHori_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntMat_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntVert_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • Convolution() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • cooldbl : MyAlgorithm
  • coollevel : MyAlgorithm
  • CoordEuclidianToPolar() : BIAS::Vector2< T >
  • CoordEuclidianToSphere() : BIAS::Vector3< T >
  • CoordinateTransform3D() : BIAS::CoordinateTransform3D
  • CoordPolarToEuclidian() : BIAS::Vector2< T >
  • CoordSphereToEuclidian() : BIAS::Vector3< T >
  • CooTransf() : BIAS::Histogram2D, BIAS::Histogram
  • copy() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Copy() : BIAS::Vector4< T >, BIAS::Vector2< T >
  • CopyIn_NoInit() : BIAS::ImageBase
  • CopyNoCheck() : BIAS::IntegralHistogram
  • CornerDetectorBase() : BIAS::CornerDetectorBase< StorageType >
  • CornerDetectorFoerstner() : BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • CornerDetectorGradient() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • CornerDetectorHarris() : BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • CornerDetectorKLT() : BIAS::CornerDetectorKLT< StorageType, CalculationType >
  • CornerDetectorSusan() : BIAS::CornerDetectorSusan< StorageType >
  • CornerMatcher() : BIAS::CornerMatcher
  • Cornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • Corners2Mask() : BIAS::ROI
  • Corners2Vector() : BIAS::ROI
  • CorrectCorrespondences() : BIAS::Triangulation
  • CorrectDefString_() : BIAS::ThreeDOut
  • correctionOfImportanceWeights_ : BIAS::Condensation
  • CorrectVignette() : BIAS::SphericalUndistortion
  • Count_ : BIAS::Distribution
  • count_ : BIAS::VideoSource_Net
  • Cout2Null() : BIAS::RedirectStreams
  • Cov_ : BIAS::Tracker< StorageType, CalculationType >, BIAS::Pose, BIAS::PoseParametrization
  • cov_weights_ : BIAS::Triangulation
  • Covariance_ : BIAS::Kalman, BIAS::PMatrix
  • CovMatrix3x3() : BIAS::CovMatrix3x3
  • cp_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • cPnts_ : BIAS::BSplineCurve
  • CQ2Pose_() : BIAS::PoseParametrization
  • create() : BIAS::XMLIO
  • CreateBiasImageShared() : BIAS::WrapBias2Ipl
  • CreateFloatFilter() : BIAS::FilterMask
  • CreateGLTexture() : BIAS::ImgObjGL
  • CreateIdealMatches() : BIAS::GenGroundTruth
  • CreateIntFilter() : BIAS::FilterMask
  • CreateIplImageShared() : BIAS::WrapBias2Ipl
  • CreateListenThread_() : BIAS::CScommServer
  • CreateMatches() : BIAS::GenSynthMatches, BIAS::GenGroundTruth
  • CreateMatchesOutlier() : BIAS::GenGroundTruth
  • CreatePerspective() : BIAS::Projection
  • CreateSampleDisplayListScene() : BIAS::GeometryGL
  • CreateSTColor() : BIAS::ColorHarris
  • CreateTextureMatrix() : BIAS::GeometryGL
  • CreateWindow_() : BIAS::GuiWX, BIAS::GuiGTK
  • CrossPowerSpectrum() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • CrossProduct() : BIAS::Vector3< T >
  • CScommBase() : BIAS::CScommBase
  • CScommClient() : BIAS::CScommClient
  • CScommData() : BIAS::CScommData
  • CScommMsg() : BIAS::CScommMsg
  • CScommServer() : BIAS::CScommServer
  • csta : cllist
  • Cubic() : BIAS::PolynomialSolve
  • CubicUniformBSpline() : BIAS::BSplineCurve
  • CuEye() : CuEye
  • cullface : BIAS::RenderModeGL
  • cumulProbArray_ : BIAS::Condensation
  • cumulProbArrayImportance_ : BIAS::Condensation
  • cunit : cllist
  • CurrAttr_ : BIAS::XMLIO
  • Current_ : BIAS::EpipolarLine
  • CurrNode_ : BIAS::XMLIO
  • curvature : BIAS::DC_GPS
  • Cut2ROI() : BIAS::ImageBase
  • CutoutFrame() : CutoutFrame
  • CutOutHeight_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • CutOutWidth_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • CValid_ : BIAS::Camera< StorageType >
  • CylinderMapping() : BIAS::CylinderMapping
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- d -

  • d : Multitype
  • dAngle : BIAS::Ellipsoid3DData
  • data : BIAS::AppData
  • data_ : BIAS::Contour, BIAS::JpegHandler, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • Data_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • data_encode_scheme : xvimage
  • data_storage_type : xvimage
  • DataLength_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • dataLength_ : BIAS::JpegHandler
  • dataLock : BIAS::CScommMsg
  • dataSize : BIAS::CScommMsg
  • dataType : BIAS::CScommMsg
  • DC_GPS() : BIAS::DC_GPS
  • DC_inertial() : BIAS::DC_inertial
  • DC_ptu() : BIAS::DC_ptu
  • DcamCapture_ : BIAS::VideoSource_DCAM
  • DcamDMABuffers_ : BIAS::VideoSource_DCAM
  • DcamFeatures_ : BIAS::VideoSource_DCAM
  • DcamFormat_ : BIAS::VideoSource_DCAM
  • DcamFps_ : BIAS::VideoSource_DCAM
  • DcamInfo_ : BIAS::VideoSource_DCAM
  • DcamIsoChannel_ : BIAS::VideoSource_DCAM
  • DcamMode_ : BIAS::VideoSource_DCAM
  • DcamNodes_ : BIAS::VideoSource_DCAM
  • dChannelCount_ : BIAS::UnVignette
  • dDepth_ : BIAS::VideoSource_DSHOW
  • dDsBufferSize_ : BIAS::VideoSource_DSHOW
  • Debug() : BIAS::Debug
  • DebuglevelDcam_ : BIAS::MDcam
  • DebugLevelIsSet() : BIAS::Debug
  • DebugOut() : BIAS::CameraParam
  • Decompose_() : BIAS::PMatrix
  • DecomposeAa() : BIAS::PMatrix
  • Decomposed_ : BIAS::SVD
  • DecomposetoSR() : BIAS::FMatrix
  • decompositionExists() : BIAS::Cholesky
  • Decompress() : BIAS::JpegHandler
  • Decompressor_ : BIAS::VideoSource_Net
  • default_ : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool
  • DefaultDevice_ : BIAS::VideoSource
  • DefaultDir_ : MainFrame
  • DefaultFile_ : MainFrame
  • defaultInitFraction_ : BIAS::Condensation
  • DefaultZoom_ : BIAS::ImageCanvas
  • DeInterlace() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • Delete() : BIAS::MetaData
  • DeleteCalibrations() : BIAS::RigParameter
  • DeleteCameraCenters() : BIAS::RigParameter
  • DeleteCameraParams() : BIAS::RigParameter
  • DeleteEvent_() : BIAS::GuiGTK
  • DeleteFont() : BIAS::DrawTextGL
  • DeleteGLTexture() : BIAS::ImgObjGL
  • DeleteHist_() : BIAS::Histogram, BIAS::ColorHistogram< StorageType >
  • DeleteInstance() : BIAS::LogFacility
  • DeleteMediaType_() : BIAS::VideoSource_DSHOW
  • DeleteRotations() : BIAS::RigParameter
  • DeleteSensorCenters() : BIAS::RigParameter
  • DeleteSensorRotations() : BIAS::RigParameter
  • DeltaR_ : BIAS::EpipolarLine
  • DeNormalizeMatches() : BIAS::GenGroundTruth
  • Depth_ : BIAS::ImageBase
  • DepthConvert_() : BIAS::PMDImageProc
  • DepthImg_ : BIAS::VideoSource_DiskPMD
  • DerivedFrom() : BIAS::DerivedFrom< T, B >
  • description : TagInfo
  • description_ : BIAS::TimeMeasurement
  • destCenterX_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destCenterY_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destK_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destProjType_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Destroy() : BIAS::Tensor3D< T >
  • destroy() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Destroy_() : BIAS::GuiGTK
  • DestroyAllWindows() : BIAS::WrapBias2Ipl
  • DestroyWindow() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase, BIAS::WrapBias2Ipl
  • DestructorWarning_ : BIAS::Param
  • det() : BIAS::Matrix4x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >
  • Detect() : BIAS::CornerDetectorSusan< StorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >, BIAS::CornerDetectorBase< StorageType >
  • DetectFromCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • DetermineBIASColorModel_() : BIAS::VideoSource_DSHOW
  • DetermineColorModel_() : BIAS::VideoSource_DSHOW
  • DetermineIntersectionsAndEpipoleDistances_() : BIAS::EpipolarLine
  • DetermineLineType() : BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >
  • DeterminePosition() : BIAS::HomgPoint2D
  • DetermineROI_() : BIAS::Tracker< StorageType, CalculationType >
  • DeviceChannel_ : BIAS::VideoSource
  • dGroundThruthWhite_ : MainFrame
  • dHeight_ : BIAS::VideoSource_DSHOW, BIAS::UnVignette
  • dHeightHalfMPPY_ : BIAS::UnVignette
  • diffScale_ : BIAS::CondensHisto
  • diffScaleSize_ : BIAS::CondensHisto
  • diffusionSigma_ : BIAS::Condensation
  • Dilate() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • Dilate3Fast() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • Dilation() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • dim() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • dim_ : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Sparse_Vector< T >
  • DimensionMatch() : BIAS::ImageBase
  • dims : Vardesc
  • dInterPolationMethod_ : BIAS::UnVignette
  • DirectF7_ : BIAS::VideoSource_DCAM
  • directionList_ : BIAS::Contour
  • DirectNeighborsGreyValidFloat_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • DirectNeighborsGreyValidInt_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • DirectToDisk_ : BIAS::VideoSource
  • DisableDestructorWarning() : BIAS::Param
  • DisableEvent() : CuEye
  • Display() : BIAS::OpenGLCanvasBase, BIAS::WrapBias2Ipl, BIAS::ImageBase
  • DisplayCalls() : BIAS::OpenGLCanvasBase, BIAS::ImageCanvasGLBase, MyGLCanvas, MyGLCanvas2, MyGLCanvas
  • DisplayCallsSampleDisplayListScene() : BIAS::GeometryGL
  • DisplayCameraExternalParams() : BIAS::GeometryGL
  • DisplayCameraInternalParams() : BIAS::GeometryGL
  • DisplayCameraProperties() : BIAS::VideoSource_DSHOW
  • DisplayCameraView() : BIAS::OpenGLCanvas
  • DisplayCameraViewExternalParams() : BIAS::OpenGLCanvas
  • DisplayCameraViewInternalParams() : BIAS::OpenGLCanvas
  • DisplayClear() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplayCoordCross() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplayCoordCrossAxesLabel() : BIAS::GeometryGL
  • DisplayFilterProperties() : BIAS::VideoSource_DSHOW
  • DisplayGL() : BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController
  • DisplayGLExternal() : BIAS::CameraViewController
  • DisplayGLInternal() : BIAS::CameraViewController
  • DisplayImgPlaneTextured() : BIAS::GeometryGL
  • DisplayP() : BIAS::GeometryGL
  • DisplayPinProperties_() : BIAS::VideoSource_DSHOW
  • DisplayQuadTexCoord2D() : BIAS::GeometryGL
  • DisplayQuadTexCoord2DFull() : BIAS::GeometryGL
  • DisplayRenderMode() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplaySampleScene() : BIAS::OpenGLCanvasBase
  • DisplaySceneExampleSimple() : BIAS::GeometryGL
  • DisplaySelectBuffer() : BIAS::OpenGLCanvasBase
  • DisplaySimpleAnimation() : BIAS::GeometryGL
  • DisplaySourcePinProperties() : BIAS::VideoSource_DSHOW
  • DisplayViewAt() : BIAS::CameraViewExternals
  • DisplInLastIter_ : BIAS::Tracker< StorageType, CalculationType >
  • Dist() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Distance() : BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgLine3D, BIAS::HomgLine2D
  • DistanceSquared() : BIAS::HomgPoint2D, BIAS::HomgPlane3D, BIAS::HomgLine2D
  • distanceToMap : BIAS::DC_GPS
  • Distort() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • DistortPerspImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Distribution() : BIAS::Distribution
  • DistTransform() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • Div() : BIAS::Vector3< T >
  • Divide() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • DivideIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • DivIP() : BIAS::Vector3< T >
  • dLogLevel_ : BIAS::LogFacility
  • dndFileTarget() : BIAS::dndFileTarget
  • dNumberOfSteps_ : MainFrame
  • DoesPointProjectIntoImage() : BIAS::ProjectionParametersBase, BIAS::Projection
  • DoesPointProjectIntoImageLocal() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • DoubleLine : BIAS::Conic2D
  • doubleRANSAC() : BIAS::doubleRANSAC
  • Downsample() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBPoT() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2Color() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy4() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy4Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • downsamplingFactor_ : BIAS::CameraParam
  • DownSamplingFactor_ : BIAS::RigParameter
  • dplist : MyGLCanvas2, MyGLCanvas
  • DragAndDropTarget : DragAndDropTarget, MainFrame
  • Draw() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Contour, BIAS::EpipolarLine, BIAS::Conic2D
  • DrawBezierCoords2() : BIAS::Interpolator
  • drawbuffermode : BIAS::RenderModeGL
  • DrawCircles() : BIAS::SphericalUndistortion
  • DrawDistortedLine() : MainFrame
  • DrawHist_() : BIAS::Histogram
  • DrawHistLog_() : BIAS::Histogram
  • DrawHistoSizes() : BIAS::CondensHisto
  • DrawingArea_ : BIAS::GuiGTK
  • DrawingAreaExposeCallback_() : BIAS::GuiGTK
  • DrawLine() : BIAS::GuiEnhanced
  • DrawLog() : BIAS::Histogram2D, BIAS::Histogram
  • DrawMatches() : BIAS::GenGroundTruth
  • DrawMean() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawNoisy() : BIAS::GenSynthMatches
  • DrawPosteriorDistribution() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawRectangle() : BIAS::GuiEnhanced
  • DrawRectangle_() : BIAS::ImageCanvasEnhanced
  • DrawSamples() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawSamplesExt() : BIAS::CondensHisto
  • DrawSamplesWhite() : BIAS::CondensHisto
  • DrawTextGL() : BIAS::DrawTextGL
  • DrawTrue() : BIAS::GenSynthMatches
  • DrawUncertaintyEllipsoids : BIAS::ThreeDOutParameters
  • DrawWeightedSamples() : BIAS::CondensHisto
  • DrawWhole() : BIAS::EpipolarLine
  • DroppedFrame_ : MIP::VideoSource_DV
  • dst : ThreadArg__
  • DtDBuffer_ : BIAS::VideoSource
  • DtDBufferSize_ : BIAS::VideoSource
  • DtDFd_ : BIAS::VideoSource
  • DtDImageHeader_ : BIAS::VideoSource
  • DtDStartOfImage_ : BIAS::VideoSource
  • Dump() : BIAS::ThreeDOut, BIAS::IntegralHistogram, BIAS::Histogram2D, BIAS::Histogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::SimilarityTransform, BIAS::MetaData, BIAS::TrifocalTensorBase
  • DumpCSV() : BIAS::ColorHistogram< StorageType >
  • DumpResult() : BIAS::FFT
  • DumpResults() : BIAS::Tracker< StorageType, CalculationType >
  • DV1394FD_ : MIP::VideoSource_DV2
  • DVDecoder_ : BIAS::ImageConvert
  • DVToRGB_() : BIAS::ImageConvert
  • dwFlags : tagTHREADNAME_INFO
  • dWidth_ : BIAS::VideoSource_DSHOW, BIAS::UnVignette
  • dWidthHalfMPPX_ : BIAS::UnVignette
  • dwThreadID : tagTHREADNAME_INFO
  • dwType : tagTHREADNAME_INFO
  • dx : BIAS::cornerstruct
  • dx_ : BIAS::EpipolarLine
  • dy : BIAS::cornerstruct
  • dy_ : BIAS::EpipolarLine
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- e -

  • E_ParametrizationType : BIAS::PMatrixBase
  • ECDType : BIAS::CornerDetectorBase< StorageType >
  • EColorModel : BIAS::ImageBase
  • eDeInterlaceType_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • Edge : TIntersect
  • editable_ : BIAS::MatrixPanel, BIAS::VectorPanel
  • EigenvalueDecomposition() : BIAS::Matrix2x2< T >
  • EightPoint() : BIAS::FMatrixEstimation
  • element_type : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • ElementwiseDivision() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • ElementwiseProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Ellipse : BIAS::ImageDraw< StorageType >, BIAS::Conic2D
  • EllipsoidSilhouetteToGauss() : BIAS::Conic2D
  • ELocation : BIAS::HomgPoint2D
  • EMatrix() : BIAS::EMatrix
  • EMatrixBase() : BIAS::EMatrixBase
  • EMatrixToParams() : BIAS::Parametrization
  • Empty : BIAS::Conic2D
  • enable_cullface : BIAS::RenderModeGL
  • EnableAutoExit() : CuEye
  • EnableEvent() : CuEye
  • EnableMessage() : CuEye
  • EnableMipMapping() : BIAS::ImageCanvasGLBase
  • end() : TNT::Vector< T >, TNT::Fortran_Matrix< T >
  • End : BIAS::Line3DData
  • End_ : BIAS::EpipolarLine
  • endTangentX_ : BIAS::Interpolator
  • endTangentY_ : BIAS::Interpolator
  • endTangentZ_ : BIAS::Interpolator
  • EnforceMaxRank2() : BIAS::FMatrixEstimation
  • EnforceNormalRange() : BIAS::SphericalUndistortion
  • EnforceNormalRange_() : BIAS::ProjectionParametersSpherical
  • EnforceRConstraints() : BIAS::RMatrix
  • EngineSpeed : BIAS::DC_inertial
  • Enhanced_ : BIAS::ParamTypeBase
  • Entry() : BIAS::WxMainThread
  • EnumFilters_() : BIAS::VideoSource_DSHOW
  • epipolarconstraintRemainder() : BIAS::FMatrixBase
  • EpipolarLine() : BIAS::EpipolarLine
  • Epipole21_ : BIAS::TrifocalTensor
  • Epipole31_ : BIAS::TrifocalTensor
  • Epipole_ : BIAS::EpipolarLine
  • EpipoleDistance : TIntersect
  • EpipolePosition_ : BIAS::EpipolarLine
  • EPosition : BIAS::HomgPoint2D
  • EqualizeFeature() : BIAS::MDcam
  • EQUI_SOLID_ANGLE : BIAS::SphericalUndistortion
  • EQUIDISTANT : BIAS::SphericalUndistortion
  • Erode() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • Erode3Fast() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • Erosion() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • ErrBuf_ : BIAS::RedirectStreams
  • ErrStr_ : BIAS::RedirectStreams
  • EStorageType : BIAS::ImageBase
  • EuclideanTransf3D() : BIAS::EuclideanTransf3D
  • EULER : BIAS::PMatrixBase
  • EvaluateFromIntegralHistoImage_() : BIAS::CondensHisto
  • EvaluateImportanceWeights() : BIAS::CondensImg, BIAS::Condensation
  • EvaluateObservationDensities() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • EvaluatePolynomial() : BIAS::PolynomialSolve
  • EvaluateResult_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • EvaluateSolution() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • EVecLengthType : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • ExampleDebug() : BIAS::ExampleDebug
  • ExifTag() : BIAS::ExifTag
  • exists : BIAS::Cholesky
  • ExitCamera() : CuEye
  • ExitEvent() : CuEye
  • expDist_ : BIAS::ColorHistogram< StorageType >
  • ExportDevIL() : BIAS::ImageIO
  • ExportImage() : BIAS::ImageIO
  • ExportImagePnm_() : BIAS::ImageIO
  • ExportImlib() : BIAS::ImageIO
  • ExportMagickPP() : BIAS::ImageIO
  • ExportOpenEXR() : BIAS::ImageIO
  • ExtensionName() : BIAS::ImageIO
  • ExternalTrigger() : BIAS::VideoSource_DCAM, BIAS::MDcam
  • ExternalTrigger_ : BIAS::MDcam
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- f -

  • F_ : BIAS::Parametrization
  • faceIndices : BIAS::IndexedFaceSet
  • Factor_ : BIAS::Histogram2D, BIAS::Histogram, BIAS::GuiBase
  • fakima() : BIAS::Interpolator
  • FarIntersection_ : BIAS::EpipolarLine
  • FastBilinearInterpolationGrey() : BIAS::Image< StorageType >
  • Fcol_ : BIAS::Parametrization
  • fd : BIAS::VideoSource_V4L, BIAS::CScommData
  • FF_auto : BIAS::ImageIO
  • FF_bmp : BIAS::ImageIO
  • FF_dds : BIAS::ImageIO
  • FF_exr : BIAS::ImageIO
  • FF_jpg : BIAS::ImageIO
  • FF_mip : BIAS::ImageIO
  • FF_pbm : BIAS::ImageIO
  • FF_pgm : BIAS::ImageIO
  • FF_png : BIAS::ImageIO
  • FF_ppm : BIAS::ImageIO
  • FF_raw4096 : BIAS::ImageIO
  • FF_Real32 : BIAS::ImageIO
  • FF_tif : BIAS::ImageIO
  • FF_unknown : BIAS::ImageIO
  • FF_viff : BIAS::ImageIO
  • FFT() : BIAS::FFT
  • FFT2D() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • FFT2D_Tiles() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • FGCB : BIAS::VideoSource_DSHOW
  • file_type : xvimage
  • fileName_ : MainFrame
  • FileName_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • FileNames_ : BIAS::VideoSource_Disk
  • FileSize_ : BIAS::VideoStream
  • Fill() : BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • FillBorderConst() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • FillImageWithConstValue() : BIAS::Image< StorageType >
  • FillImageWithXValue() : BIAS::Image< StorageType >
  • FillUpPoints() : BIAS::Tracker< StorageType, CalculationType >
  • Filter() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter11x11Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter13x13Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter3x3Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3GreyThreshold() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3SameGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter3x3ValidGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter5x5() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter5x5Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter5x5GreyThreshold() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter5x5ValidGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter7x7Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter9x9Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • FilterBase() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • FilterFloat() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • FilterGrey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • FilterIgnoreZero5x5() : BIAS::Median< InputStorageType, OutputStorageType >
  • FilterInt() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • FilterMask() : BIAS::FilterMask
  • FilterMean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterMean2x2() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterMean2x2Grey() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterNTo2N() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • FilterNTo3N() : BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
  • FilterNToN() : BIAS::FilterNToN< InputStorageType, OutputStorageType >
  • FilterOnlyZeroIgnoreZero3x3() : BIAS::Median< InputStorageType, OutputStorageType >
  • FilterOnlyZeroIgnoreZero5x5() : BIAS::Median< InputStorageType, OutputStorageType >
  • fImg_ : BIAS::CondensImg, BIAS::CondensHisto
  • Find() : BIAS::MetaData
  • FindCaptureDevice_() : BIAS::VideoSource_DSHOW
  • FindClosestP2() : BIAS::PMatrixEstimation
  • FindFilesInPath() : FindFilesInPath
  • FindFirst_() : BIAS::Contour
  • FindInDir() : FindFilesInPath
  • FindNearest_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • firstcontact : BIAS::CScommData
  • FirstLeft : _FilterBorders
  • firstOrderScale_ : BIAS::CondensHisto
  • FirstUpper : _FilterBorders
  • FitDepthTo2DImage() : BIAS::PMDImageProc
  • FitSizetIfTooSmall() : MainFrame
  • flag : option
  • Flip() : BIAS::ImageBase
  • FlipHorizontal() : BIAS::ImageBase
  • floatData : BIAS::CScommMsg
  • FloatToUC_() : BIAS::ImageConvert
  • FMatrix() : BIAS::FMatrix
  • FMatrixBase() : BIAS::FMatrixBase
  • FMatrixEstimation() : BIAS::FMatrixEstimation
  • FMatrixToParams() : BIAS::Parametrization
  • focallength : BIAS::CPDiscreteParam
  • focallength_ : BIAS::ProjectionParametersPerspective
  • focallengthDef_ : BIAS::CameraParam, BIAS::CameraData
  • FocallengthX : BIAS::PMDImageMetaData
  • focallengthZoom_ : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • focalX_ : BIAS::CylinderMapping
  • focalY_ : BIAS::CylinderMapping
  • font : MyGLCanvas
  • fontname : BIAS::DrawTextGL
  • ForceF7_ : BIAS::VideoSource_DCAM
  • ForceFormat7() : BIAS::VideoSource_DCAM
  • format2_ : BIAS::VideoSource_V4L
  • Format_ : MIP::VideoSource_DV2
  • Fortran_Matrix() : TNT::Fortran_Matrix< T >
  • Fortran_Sparse_Col_Matrix() : TNT::Fortran_Sparse_Col_Matrix< T >
  • Fortran_Sparse_Vector() : TNT::Fortran_Sparse_Vector< T >
  • Forward_() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • FParams_ : BIAS::Parametrization
  • Fps_ : BIAS::MDcam
  • Frame_ : DragAndDropTarget, BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::GuiWX
  • framecount : MyFrame
  • framecount_ : BIAS::OpenGLCanvasBase
  • FrameCounter_ : MyFrame
  • FrameCounterAsTimeStamp_ : BIAS::VideoSource_Disk
  • FrameFinished_ : MIP::VideoSource_DV
  • framenum : BIAS::DC_GPS
  • FrameSize_ : MIP::VideoSource_DV2
  • FramesPerSecond_ : BIAS::VideoSource
  • FrameStarted_ : MIP::VideoSource_DV
  • free() : TNT::Vector_Adaptor< BBVec >
  • FreeBuffer_() : BIAS::GuiGTK
  • FreeImageMem() : CuEye
  • FreezeVideo() : CuEye
  • FromBase() : FromBase
  • FromInterleaved() : BIAS::ImageConvert
  • FromInterleavedRGB_() : BIAS::ImageConvert
  • FromInterleavedYUYV422_() : BIAS::ImageConvert
  • Frow_ : BIAS::Parametrization
  • frustum : BIAS::CameraViewInternals
  • Fscale_ : BIAS::Parametrization
  • fspare1 : xvimage
  • fspare2 : xvimage
  • func() : BIAS::ExampleDebug
  • FUNC_PTR_type : FindFilesInPath
  • fValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- g -

  • g : Multitype
  • g_() : BIAS::GaussHelmert
  • g_uniqueCounter : BIAS::UUID
  • Gain : CameraParameter_s
  • GainChanged : CameraParameter_s
  • GammaMode : CameraParameter_s
  • GammaModeChanged : CameraParameter_s
  • gasdev3_() : BIAS::Random
  • gasdev_() : BIAS::Random
  • gasdevf_() : BIAS::Random
  • Gauss() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • gauss_ : BIAS::Tracker< StorageType, CalculationType >
  • GaussHelmert() : BIAS::GaussHelmert
  • Gear : BIAS::DC_inertial
  • General_Eigenproblem_GeneralMatrix_Lapack() : BIAS::SVD
  • Generate() : BIAS::BaseFactory< BaseClassType >
  • GenerateDenseMesh() : BIAS::TriangleMesh
  • GenerateHist() : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • GenerateIntegralHist() : BIAS::IntegralHistogram
  • GenerateIntegralHistDiffBin() : BIAS::IntegralHistogram
  • GenerateNewUIDs_ : BIAS::VideoSource_Disk
  • GenerateRandomCube() : BIAS::GenGroundTruth
  • GenerateRandomPlane() : BIAS::GenGroundTruth
  • GenerateSamples() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >
  • GenerateSamplesEvenspace() : BIAS::RANSAC< SolutionType >
  • GenerateSamplesRandom() : BIAS::RANSAC< SolutionType >
  • GenerateUUID() : BIAS::UUID
  • GenerateUUID_Consecutive() : BIAS::UUID
  • GenerateUUID_Global() : BIAS::UUID
  • GenSynthMatches() : BIAS::GenSynthMatches
  • GeometryGL() : BIAS::GeometryGL
  • get() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >
  • Get3DPoints() : BIAS::GenSynthMatches
  • GetA() : BIAS::PMatrix
  • GetA_() : BIAS::GaussHelmert
  • GetAbortOnFatal() : BIAS::LogFacility
  • GetActiveFrameNumber() : BIAS::VideoSource_Disk
  • GetActiveImageMem() : CuEye
  • GetAffineResult() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • GetAffineResults() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • GetAktImage() : BIAS::CondensHisto
  • GetAngle() : BIAS::EpipolarLine
  • GetAngleCorrX() : BIAS::CameraParam
  • GetAngleCorrY() : BIAS::CameraParam
  • GetAnisotropicImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetASCIIString() : BIAS::Camera< StorageType >
  • GetAspect() : BIAS::CameraViewport, BIAS::CameraViewFrustum
  • GetAspectratio() : BIAS::CameraParam, BIAS::ProjectionParametersBase
  • GetAspectRatio() : BIAS::CameraParam, BIAS::OpenGLCanvasBase
  • getAttributeByName() : BIAS::XMLIO
  • getAttributeName() : BIAS::XMLIO
  • GetAttributes() : BIAS::XMLIO
  • getAttributeValueBool() : BIAS::XMLIO
  • getAttributeValueDouble() : BIAS::XMLIO
  • getAttributeValueInt() : BIAS::XMLIO
  • getAttributeValueString() : BIAS::XMLIO
  • getAttributeValueVecDbl() : BIAS::XMLIO
  • getAttributeValueVecInt() : BIAS::XMLIO
  • GetAverageRMatrix() : BIAS::RMatrix
  • GetAxisAngle() : BIAS::Quaternion< QUAT_TYPE >
  • GetB_() : BIAS::GaussHelmert
  • GetBiggestAbsEntry() : BIAS::Parametrization
  • GetBin() : BIAS::Histogram
  • GetBinaryData() : BIAS::ColorHistogram< StorageType >
  • GetBinaryLength() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu
  • GetBinCount() : BIAS::Histogram
  • GetBinSize() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • GetBinSizeSat() : BIAS::IntegralHistogram, BIAS::ColorHistogram< StorageType >
  • GetBitDepth() : BIAS::ImageBase
  • GetBitRep() : BIAS::PMDImageIO
  • GetBlobCounts() : BIAS::Label
  • GetBlobMap() : BIAS::Label
  • GetBlobSizes() : BIAS::Label
  • GetBorderHandling() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • GetBorders() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • GetBordersValid_() : BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • GetBoundingBox() : BIAS::ThreeDOut, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetBoundingBoxes() : BIAS::Label
  • GetBytesPerPixel() : BIAS::VideoSource
  • GetC() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • GetCalibrations() : BIAS::RigParameter
  • GetCamera() : BIAS::VideoServer, BIAS::MDcam
  • GetCameraCenter() : BIAS::RigParameter
  • GetCameraCenters() : BIAS::RigParameter
  • GetCameraHandle() : CuEye
  • GetCameraInfo() : CuEye
  • GetCameraParam() : BIAS::RigParameter
  • GetCameraParams() : BIAS::RigParameter
  • GetCameraType() : CuEye
  • GetCamID() : BIAS::CameraParam
  • GetCanonicalH() : BIAS::TrifocalTensor, BIAS::PMatrix
  • GetCellSizeX() : BIAS::CameraParam
  • GetCellSizeY() : BIAS::CameraParam
  • GetCenterOfPoints() : BIAS::ThreeDOut
  • GetCenters() : BIAS::Label
  • GetChangedHomography() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • GetChannel() : BIAS::ImageBase
  • GetChannelCount() : BIAS::ImageBase
  • GetChannelcount() : BIAS::ImageBase
  • getChild() : BIAS::XMLIO
  • GetChildren() : BIAS::XMLIO
  • GetCloseEdge() : BIAS::EpipolarLine
  • GetCloseIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCol() : BIAS::Matrix< T >
  • GetColorChannels() : BIAS::VideoSource
  • GetColorDepth() : CuEye
  • GetColorModel() : BIAS::VideoSource, BIAS::ImageBase
  • GetCols() : BIAS::Matrix< T >
  • GetColumn() : BIAS::Matrix3x3< T >
  • GetCommPartnerName() : BIAS::CScommBase
  • GetCompressedData() : BIAS::JpegHandler
  • GetConicType() : BIAS::Conic2D
  • GetConnections() : BIAS::CScommBase
  • GetContrastValue() : BIAS::ImageDraw< StorageType >
  • GetControlPoints() : BIAS::Interpolator
  • GetCopyOfCloseIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCopyOfEpipole() : BIAS::EpipolarLine
  • GetCopyOfFarIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCopyOfROI() : BIAS::ImageBase
  • GetCopyOfROI2() : BIAS::ImageBase
  • GetCorners() : BIAS::ROI
  • GetCorrespondences() : BIAS::MatchDataBase
  • GetCosAngleErrorHomogenized() : BIAS::FMatrixBase, BIAS::EMatrixBase
  • GetCount() : BIAS::Distribution
  • GetCov() : BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose
  • GetCov_() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetCovariance() : BIAS::Kalman, BIAS::Triangulation, BIAS::Pose, BIAS::PMatrix
  • GetCovariance2D() : BIAS::Triangulation
  • GetCovarianceAnalytic() : BIAS::Triangulation
  • GetCovarianceMatrix() : BIAS::PoseParametrization
  • GetCovariances() : BIAS::Tracker< StorageType, CalculationType >
  • GetCovC() : BIAS::Pose, BIAS::PoseParametrizationCovariance
  • GetCovQ() : BIAS::Pose, BIAS::PoseParametrizationCovariance
  • GetCQ() : BIAS::CoordinateTransform3D, BIAS::PoseParametrization
  • GetCycleCount() : BIAS::TimeMeasure
  • GetData() : BIAS::CScommBase, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Matrix< T >
  • GetData_() : BIAS::CScommBase
  • GetDataArray() : BIAS::Tensor3D< T >, BIAS::Matrix< T >
  • GetDataArray1() : BIAS::Matrix< T >
  • GetDataLast() : BIAS::Vector< T >, BIAS::Matrix< T >
  • GetDataRange() : BIAS::Histogram
  • GetDebugLevel() : BIAS::Debug
  • GetDebugStream() : BIAS::Debug
  • GetDefaultUndistortion() : BIAS::CameraParam
  • GetDeltaR() : BIAS::EpipolarLine
  • GetDepth() : BIAS::ImageBase
  • GetDeterminant() : BIAS::Matrix3x3< T >
  • GetDetPolynomial() : BIAS::FMatrixEstimation
  • GetDialog() : BIAS::ParamGUI
  • GetDim1() : BIAS::Tensor3D< T >
  • GetDim2() : BIAS::Tensor3D< T >
  • GetDim3() : BIAS::Tensor3D< T >
  • GetDirection() : BIAS::PlueckerMatrix
  • GetDiscriminant() : BIAS::Conic2D
  • GetDistROIs() : BIAS::ColorMultiHistogram< StorageType >
  • GetDllVersion() : CuEye
  • GetDownsamplingFactor() : BIAS::CameraParam
  • GetDownSamplingFactor() : BIAS::RigParameter
  • GetDualConic() : BIAS::Conic2D
  • GetDualQuadric() : BIAS::Quadric3D
  • GetDx() : BIAS::EpipolarLine
  • GetDy() : BIAS::EpipolarLine
  • GetEllipseParameters() : BIAS::Conic2D
  • GetEpipolarError() : BIAS::FMatrixBase
  • GetEpipolarErrorHomogenized() : BIAS::FMatrixBase, BIAS::EMatrixBase
  • GetEpipolarLineImage1() : BIAS::FMatrixBase
  • GetEpipolarLineImage2() : BIAS::FMatrixBase
  • GetEpipolarLines() : BIAS::TrifocalTensor
  • GetEpipole() : BIAS::EpipolarLine
  • GetEpipole21() : BIAS::TrifocalTensor
  • GetEpipole31() : BIAS::TrifocalTensor
  • GetEpipolePosition() : BIAS::EpipolarLine
  • GetEpipoles() : BIAS::FMatrix
  • GetEpipolesHomogenized() : BIAS::FMatrix
  • GetError() : BIAS::Tracker< StorageType, CalculationType >, BIAS::HMatrixEstimation
  • GetErrorText() : CuEye
  • GetEuclidean() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • GetEuclidian() : BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • GetEuclidianX() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • GetEuclidianY() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • GetEuclidianZ() : BIAS::HomgPoint3D
  • GetExposureTime() : CuEye
  • GetExtension() : BIAS::ImageIO
  • GetExternals() : BIAS::CameraViewController, BIAS::ProjectionParametersBase, BIAS::Projection
  • Getf() : BIAS::Camera< StorageType >
  • GetFactor() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetFactorOffset() : BIAS::GuiBase
  • GetFactors() : BIAS::PyramidImage< StorageType >
  • GetFakeKMatrix() : BIAS::ProjectionParametersSpherical
  • GetFarEdge() : BIAS::EpipolarLine
  • GetFarIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetFeature() : BIAS::VideoSource_DCAM, BIAS::VideoSource
  • GetFieldOfView() : BIAS::PMatrix
  • GetFieldOfViewDegree() : BIAS::ImageAttributes
  • GetFieldOfViewX() : BIAS::PMatrix
  • GetFieldOfViewY() : BIAS::PMatrix
  • GetFileFormat() : BIAS::ImageIO
  • GetFinalScore() : BIAS::RANSAC< SolutionType >
  • getFirstAttribute() : BIAS::XMLIO
  • getFirstChild() : BIAS::XMLIO
  • GetFMatrix21() : BIAS::TrifocalTensor
  • GetFMatrix31() : BIAS::TrifocalTensor
  • GetFocalLength() : BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetFocalLengthMeter() : BIAS::ImageAttributes
  • GetFocalLengthXPixel() : BIAS::ImageAttributes
  • GetFocalLengthYPixel() : BIAS::ImageAttributes
  • GetFovX() : BIAS::CameraViewFrustum
  • GetFovY() : BIAS::CameraViewFrustum
  • GetFPS() : BIAS::VideoServer
  • GetFrame() : BIAS::ParamGUI
  • GetFrameCount() : BIAS::OpenGLCanvasBase
  • GetFreeGroupID() : BIAS::Param
  • GetFreemanCode() : BIAS::Contour
  • GetFreq() : BIAS::TimeMeasure
  • GetFScaling() : BIAS::Parametrization
  • GetFx() : BIAS::KMatrix
  • GetFy() : BIAS::KMatrix
  • GetGain() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye, BIAS::MDcam
  • GetGammaMode() : BIAS::VideoSource_DCAM
  • GetGLInternalFormat() : BIAS::ImgObjGL
  • GetGlobalDebugLevel() : BIAS::Debug
  • GetGlobalToLocalTransform() : BIAS::CoordinateTransform3D
  • GetGLPixelFormat() : BIAS::ImgObjGL
  • GetGLStorageType() : BIAS::ImgObjGL
  • GetGradGaussRatio() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GetGradGaussSigma() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GetGradientType() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • GetGreyImage() : BIAS::ColorSegmentation
  • GetGroupID() : BIAS::Param
  • GetGroupIDForGroupName() : BIAS::Param
  • GetGroupName() : BIAS::Param
  • GetGTC() : BIAS::GenSynthMatches
  • GetGTNormalizedF() : BIAS::GenSynthMatches
  • GetGTNormalizedPoints() : BIAS::GenSynthMatches
  • GetGTP() : BIAS::GenSynthMatches
  • GetGTPoints() : BIAS::GenSynthMatches
  • GetGTR() : BIAS::GenSynthMatches
  • GetH() : BIAS::PMatrix
  • GetH_() : BIAS::GaussHelmert
  • GetHalfWinSize() : BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • GetHalfWinSizePointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetHardwareName() : BIAS::ImageAttributes
  • GetHeight() : BIAS::VideoSource, BIAS::CameraParam, BIAS::OpenGLCanvasBase, BIAS::ImageBase
  • GetHeightROI() : BIAS::ColorHistogram< StorageType >
  • GetHinf() : BIAS::PMatrix
  • GetHint() : BIAS::ParamTypeEnum, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetHist() : BIAS::ColorHistogram< StorageType >
  • GetHist1() : BIAS::ColorMultiHistogram< StorageType >
  • GetHist2() : BIAS::ColorMultiHistogram< StorageType >
  • GetHistCount() : BIAS::Histogram
  • GetHistL() : BIAS::ColorHistogram< StorageType >
  • GetHistogram() : BIAS::IntegralHistogram
  • GetHomogenized() : BIAS::CovMatrix3x3
  • GetHorizRightShift() : BIAS::FilterMask
  • GetHScaling() : BIAS::Parametrization
  • GetHueImage() : BIAS::ColorSegmentation
  • GetHx() : BIAS::KMatrix
  • GetHy() : BIAS::KMatrix
  • GetID() : BIAS::VideoSource, BIAS::MDcam
  • GetIdentifier() : BIAS::Projection
  • GetIdleTime() : BIAS::TimeMeasure
  • GetIlluCorrX() : BIAS::CameraParam
  • GetIlluCorrY() : BIAS::CameraParam
  • GetImageCanvas() : BIAS::ScaledImageCanvas
  • GetImageCoo() : BIAS::HomgPoint2D
  • GetImageData() : BIAS::ImageBase, BIAS::Image< StorageType >
  • GetImageDataArray() : BIAS::ImageBase, BIAS::Image< StorageType >
  • GetImageDimensions() : BIAS::ImageAttributes
  • GetImageHeight() : BIAS::EpipolarLine
  • GetImagePlane() : BIAS::PMatrix
  • GetImageSize() : BIAS::ProjectionParametersBase
  • GetImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetImageWidth() : BIAS::EpipolarLine
  • GetImgCorner2d() : BIAS::GeometryGL
  • GetImgCorner3d() : BIAS::GeometryGL
  • GetInfoGL() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas, BIAS::GeometryGL
  • GetInliers() : BIAS::GenSynthMatches
  • GetInput() : BIAS::FFT
  • GetInterfaces_() : BIAS::VideoSource_DSHOW
  • GetInternals() : BIAS::CameraViewController
  • GetIntersectionOfImagePlanes() : BIAS::PMatrix
  • GetIntersectionsWithImage() : BIAS::HomgLine2D
  • GetIRQ() : CuEye
  • GetJacobian() : BIAS::HMatrix
  • GetJacobian_() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetK() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::PMatrix
  • GetKernel() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • GetKernelf() : BIAS::FilterMask
  • GetKerneli() : BIAS::FilterMask
  • GetKernelRightShift() : BIAS::FilterMask
  • GetKernelTime() : BIAS::TimeMeasure
  • GetKinv() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetKMatrices() : BIAS::RigParameter
  • GetKMatrix() : BIAS::SphericalUndistortion, BIAS::RigParameter, BIAS::CameraParam
  • GetKnotPoints() : BIAS::Interpolator
  • GetKnownTags() : BIAS::BaseFactory< BaseClassType >
  • GetLabelImage() : BIAS::Label
  • GetLastFilename() : BIAS::VideoSource_Disk
  • GetLeft() : BIAS::VideoSource_DCAM
  • GetLeftNullvector() : BIAS::SVD
  • GetLength() : BIAS::Tensor3D< T >
  • GetLineIntersection() : BIAS::HomgPlane3D
  • GetLineType() : BIAS::EpipolarLine
  • GetLocalToGlobalTransform() : BIAS::CoordinateTransform3D
  • GetLogLevel() : BIAS::LogFacility
  • GetLogStream() : BIAS::LogFacility
  • GetLong() : BIAS::UUID
  • GetLowpass() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetLowPassType() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetMagnitude() : BIAS::FFT
  • GetMappedError() : BIAS::HMatrix
  • GetMappedRange() : BIAS::HMatrix
  • GetMapPMatrices() : BIAS::ThreeDOut
  • GetMaskData() : BIAS::ROI
  • GetMaskDataArray() : BIAS::ROI
  • GetMaskHeight() : BIAS::ROI
  • GetMaskImage() : BIAS::ROI
  • GetMaskWidth() : BIAS::ROI
  • GetMatrices() : BIAS::Tensor3D3x3x3< T >
  • GetMatrix() : BIAS::MatrixPanel, BIAS::SimilarityTransform
  • GetMatrix3x4() : BIAS::CoordinateTransform3D
  • GetMax() : BIAS::Matrix< T >
  • GetMaxCamAngle() : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • GetMaxErrorPointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetMaxHistEntry() : BIAS::Histogram
  • GetMaxIterationsPointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetMaxMin() : BIAS::Matrix< T >
  • GetMaxNumFeatures() : BIAS::CornerDetectorBase< StorageType >
  • GetMaxPixelValue() : BIAS::Image< StorageType >
  • GetMaxValue() : BIAS::CondensHisto
  • GetMaxVariance() : BIAS::CondensHisto
  • GetMaxWeight() : BIAS::CondensHisto
  • GetMean() : BIAS::Condensation, BIAS::Matrix< T >, BIAS::Distribution
  • GetMeanPixelValue() : BIAS::Image< StorageType >
  • GetMeanValue() : BIAS::CondensHisto
  • GetMeanVariance() : BIAS::CondensHisto
  • GetMeanWeight() : BIAS::Condensation
  • GetMedian() : BIAS::Median1D< DataType >
  • GetMedianCenters() : BIAS::Label
  • GetMessageSize() : BIAS::VideoServer
  • GetMetaData() : BIAS::ImageBase
  • GetMin() : BIAS::Matrix< T >
  • GetMinBorderDistance() : BIAS::Tracker< StorageType, CalculationType >
  • GetMinCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetMinDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetMinMaxPixelValue() : BIAS::Image< StorageType >
  • GetMinMaxPixelValueIgnoreRange() : BIAS::Image< StorageType >
  • GetMinPixelValue() : BIAS::Image< StorageType >
  • GetModelForEuid() : BIAS::VideoSource_DCAM
  • GetMousePos() : BIAS::ImageCanvas
  • GetMouseX() : BIAS::GuiBase
  • GetMouseY() : BIAS::GuiBase
  • GetNearTag() : BIAS::BaseFactory< BaseClassType >
  • GetNext() : BIAS::ScanLine2, BIAS::ScanLine, BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • getNextAttribute() : BIAS::XMLIO
  • getNextChild() : BIAS::XMLIO
  • GetNextFilename() : BIAS::VideoSource_Disk
  • GetNextLine() : BIAS::EpipolarLine
  • getNodeContentDouble() : BIAS::XMLIO
  • getNodeContentInt() : BIAS::XMLIO
  • getNodeContentString() : BIAS::XMLIO
  • getNodeName() : BIAS::XMLIO
  • GetNormal() : BIAS::PlueckerMatrix
  • GetNormalDistributed() : BIAS::Random
  • GetNormalized() : BIAS::Vector3< T >
  • GetNormalizedCorrespondences() : BIAS::MatchDataBase
  • GetNormalizedPoints() : BIAS::MatchDataBase
  • GetNormals() : BIAS::TriangleMesh
  • GetNormalVector() : BIAS::HomgPlane3D
  • GetNormRayWorldCoo() : BIAS::PMatrix
  • GetNotebook() : BIAS::ParamGUI
  • GetNullVector() : BIAS::PMatrix
  • GetNullvector() : BIAS::SVD
  • GetNumberOfCameras() : CuEye
  • getNumberOfCameras() : BIAS::RigParameter
  • GetNumberOfEntries() : BIAS::ColorHistogram< StorageType >
  • GetNumberOfRealSolutions() : BIAS::PolynomialSolve
  • GetNumCams() : BIAS::MDcam
  • GetNumElements() : BIAS::Matrix< T >
  • GetNumFramesRemaining() : BIAS::VideoSource_Disk
  • GetNumImages() : BIAS::MatchDataBase
  • GetNumIter() : BIAS::Tracker< StorageType, CalculationType >
  • GetOrder() : BIAS::Polynom
  • GetOrientation() : BIAS::Camera< StorageType >, BIAS::PoseParametrization
  • GetOrigImage() : BIAS::ImageCanvas
  • GetOrigimg() : BIAS::ScaledImageCanvas
  • GetOsVersion() : CuEye
  • GetOwnerframe() : BIAS::OpenGLCanvasBase
  • GetP() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective
  • GetPanel() : BIAS::ParamGUI
  • GetParamBool() : BIAS::Param
  • GetParamDouble() : BIAS::Param
  • GetParamEnum() : BIAS::Param
  • GetParameters() : BIAS::Projection
  • GetParamInt() : BIAS::Param
  • GetParamMap() : BIAS::Param
  • GetParamString() : BIAS::Param
  • GetParamVecDbl() : BIAS::Param
  • GetParamVecInt() : BIAS::Param
  • GetPCA() : BIAS::CovMatrix3x3
  • GetPciSlot() : CuEye
  • GetPerpendicularLine() : BIAS::HomgLine2D
  • GetPEstSystemHom() : BIAS::PMatrixLinear
  • GetPEstSystemInHom() : BIAS::PMatrixLinear
  • GetPhase() : BIAS::FFT
  • GetPixelCount() : BIAS::ImageBase
  • GetPixelNearestNeighbor() : BIAS::Image< StorageType >
  • GetPixelPosition() : BIAS::ImageBase
  • GetPixelSizeXMeter() : BIAS::ImageAttributes
  • GetPixelSizeYMeter() : BIAS::ImageAttributes
  • GetPixelValueDepth() : BIAS::OpenGLCanvasBase
  • GetPixelValueRGB() : BIAS::OpenGLCanvasBase
  • GetPixelValueRGBA() : BIAS::OpenGLCanvasBase
  • GetPlueckerLineCoordinates() : BIAS::PlueckerMatrix
  • GetPMatrix2() : BIAS::TrifocalTensor
  • GetPMatrix3() : BIAS::TrifocalTensor
  • GetPointAndCovariance() : BIAS::Conic2D
  • GetPointFin() : BIAS::HomgLine3D
  • GetPointInf() : BIAS::HomgLine3D
  • GetPoints() : BIAS::MatchDataBase, BIAS::Tracker< StorageType, CalculationType >
  • GetPointSet() : BIAS::Contour
  • GetPose() : BIAS::ProjectionParametersBase, BIAS::Projection
  • GetPoseParameters() : BIAS::Pose
  • GetPoseParametrization() : BIAS::ProjectionParametersBase
  • GetPosition() : BIAS::PoseParametrization
  • GetPositionOffset() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetPrincipal() : BIAS::ProjectionParametersBase
  • GetPrincipalPoint() : BIAS::ImageAttributes
  • GetPrincipalX() : BIAS::CameraParam
  • GetPrincipalY() : BIAS::CameraParam
  • GetProj() : BIAS::Camera< StorageType >
  • GetProjection() : BIAS::ProjectionDialog, BIAS::ProjectionGUI
  • GetPseudoInverse() : BIAS::PMatrix
  • GetPyramidSize() : BIAS::PyramidImage< StorageType >
  • GetQ() : BIAS::SimilarityTransform, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::CoordinateTransform3D
  • GetQuaternion() : BIAS::RMatrixBase
  • GetR() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • GetRadius() : BIAS::CameraParam, BIAS::ProjectionParametersSpherical
  • GetRatio() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetRational_() : BIAS::ImageAttributes
  • GetRatioPointer() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetRayWorldCoo() : BIAS::PMatrix
  • GetRealTime() : BIAS::TimeMeasure
  • GetRejectionType() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • GetRescaleFactor() : BIAS::PyramidImage< StorageType >
  • GetResiduiMAD() : BIAS::Tracker< StorageType, CalculationType >
  • GetResiduiMSD() : BIAS::Tracker< StorageType, CalculationType >
  • GetResult() : BIAS::FFT
  • GetResults() : BIAS::Tracker< StorageType, CalculationType >
  • getRigSize() : BIAS::RigParameter
  • GetRMax() : BIAS::EpipolarLine
  • GetRMin() : BIAS::EpipolarLine
  • GetROffset() : BIAS::EpipolarLine
  • GetROI() : BIAS::ColorHistogram< StorageType >, BIAS::ImageBase
  • GetROICorners() : BIAS::ImageBase
  • GetROILowerRightX() : BIAS::ImageBase
  • GetROILowerRightY() : BIAS::ImageBase
  • GetROIUpperLeftX() : BIAS::ImageBase
  • GetROIUpperLeftY() : BIAS::ImageBase
  • GetRotation() : BIAS::RigParameter
  • GetRotationAnglesXYZ() : BIAS::RMatrixBase
  • GetRotationAnglesZYX() : BIAS::RMatrixBase
  • GetRotationAxisAngle() : BIAS::RMatrixBase
  • GetRotationMatrix() : BIAS::Quaternion< QUAT_TYPE >
  • GetRotations() : BIAS::RigParameter
  • GetRotationTranslation() : BIAS::EMatrix
  • GetRow() : BIAS::Matrix3x3< T >, BIAS::Matrix< T >
  • GetRows() : BIAS::Matrix< T >
  • GetS() : BIAS::SVD, BIAS::CovMatrix3x3
  • GetSamplePositions() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • GetSampleSolution() : BIAS::MSAC< SolutionType >
  • GetSampleSolutions() : BIAS::RANSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • GetSatImage() : BIAS::ColorSegmentation
  • GetSaturatedBins() : BIAS::ColorHistogram< StorageType >
  • GetSearchArea() : BIAS::CovMatrix3x3
  • GetSendImage() : BIAS::VideoServer
  • GetSensorCenter() : BIAS::RigParameter
  • GetSensorCenters() : BIAS::RigParameter
  • GetSensorInfo() : CuEye
  • GetSensorRotation() : BIAS::RigParameter
  • GetSensorRotations() : BIAS::RigParameter
  • GetSepfh() : BIAS::FilterMask
  • GetSepfv() : BIAS::FilterMask
  • GetSepih() : BIAS::FilterMask
  • GetSepiv() : BIAS::FilterMask
  • GetShort_() : BIAS::ImageAttributes
  • GetShowCodeInfo() : BIAS::LogFacility
  • GetShowScaled() : BIAS::ImageCanvas
  • GetShutter() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • GetSigma() : BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Distribution
  • GetSigmaPointer() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetSignature() : BIAS::Quadric3D, BIAS::Conic2D
  • GetSingleImage() : BIAS::PyramidImage< StorageType >
  • GetSingularValue() : BIAS::SVD
  • GetSize() : BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::FilterMask, BIAS::ImageBase
  • GetSizeOfLongestParamName() : BIAS::Param
  • GetSizeOfLongestParamValueString() : BIAS::Param
  • GetSizePointer() : BIAS::Mean< InputStorageType, OutputStorageType >
  • GetSkew() : BIAS::KMatrix
  • GetSkewSymmetricMatrix() : BIAS::Vector3< T >
  • GetSourceCoordinates_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::CylinderMapping, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetSphereCenter() : BIAS::SphericalUndistortion
  • GetSphereRadius() : BIAS::SphericalUndistortion
  • GetState() : BIAS::Kalman
  • GetStorageType() : BIAS::ImageBase
  • GetString() : BIAS::UUID
  • GetString_() : BIAS::ImageAttributes
  • GetSVD() : BIAS::PMatrix
  • GetSystemMatrix() : BIAS::Matrix< T >
  • GetTag() : Base
  • GetTangentPoints() : BIAS::Conic2D
  • GetTexCoords() : BIAS::TriangleMesh
  • GetTexId() : BIAS::ImageCanvasGLBase
  • GetTexobj() : BIAS::ImageCanvasGLBase
  • GetTexTarget() : BIAS::ImageCanvasGLBase
  • GetTexture() : BIAS::TriangleMesh
  • GetThreadedReceive() : BIAS::CScommBase
  • GetTime() : BIAS::Camera< StorageType >
  • GetTitle() : BIAS::GuiBase
  • GetTop() : BIAS::VideoSource_DCAM
  • GetTrackerType() : BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • GetTransformedEnd() : BIAS::EpipolarLine
  • GetTransformedStart() : BIAS::EpipolarLine
  • GetTransmissionTime() : BIAS::VideoSource_DCAM
  • GetTriangleIndices() : BIAS::TriangleMesh
  • GetTrilinearImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetTypeName() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetU() : BIAS::SVD
  • GetUID() : BIAS::ImageBase
  • GetUndistortion() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetUniformDistributed() : BIAS::Random
  • GetUniformDistributedInt() : BIAS::Random
  • GetUp_gl() : BIAS::PMatrix
  • GetUserFreq() : BIAS::TimeMeasure
  • GetUserTime() : BIAS::TimeMeasure
  • GetUUIDCreationTime() : BIAS::UUID
  • GetUUIDRaw() : BIAS::UUID
  • GetV() : BIAS::SVD, BIAS::PMatrix
  • GetValueString() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetVariance() : BIAS::Condensation, BIAS::Distribution
  • GetVector() : BIAS::VectorPanel, BIAS::ROI
  • getVector() : TNT::Vector_Adaptor< BBVec >
  • GetVersionNumber() : BIAS::ImageBase
  • GetVertices() : BIAS::TriangleMesh
  • GetVertRightShift() : BIAS::FilterMask
  • GetViewController() : BIAS::OpenGLCanvas
  • GetVSync() : BIAS::OpenGLCanvasBase
  • GetVSyncInterval() : BIAS::SettingsGL
  • GetVT() : BIAS::SVD
  • GetW() : BIAS::Vector2< T >, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgLine2D
  • GetWeightedVariance() : BIAS::Condensation
  • GetWidth() : BIAS::VideoSource, BIAS::CameraParam, BIAS::OpenGLCanvasBase, BIAS::ImageBase
  • GetWidthROI() : BIAS::ColorHistogram< StorageType >
  • GetWidthStep() : BIAS::ImageBase
  • GetX() : BIAS::Vector2< T >, BIAS::HomgPoint3D
  • GetY() : BIAS::Vector2< T >, BIAS::HomgPoint3D
  • GetZ() : BIAS::HomgPoint3D
  • GetZeroThreshold() : BIAS::SVD
  • GetZoom() : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • GetZoomImage() : BIAS::ZoomImageCanvas, BIAS::GuiEnhanced
  • GetZoomUndistortion() : BIAS::CameraParam
  • ggauss_ : BIAS::Tracker< StorageType, CalculationType >
  • ggaussasymmetric_ : BIAS::Tracker< StorageType, CalculationType >
  • GlobalDebugLevel : BIAS::Debug
  • GlobalToLocal() : BIAS::CoordinateTransform3D
  • GoodValue() : BIAS::ExifTag
  • gpsTime : BIAS::DC_GPS
  • Grabbing_ : BIAS::VideoSource
  • GrabbingContinous_ : BIAS::VideoSource_V4L, BIAS::VideoSource
  • GrabBuffer_ : MIP::VideoSource_DV
  • GrabContThread_() : BIAS::VideoSource_V4L
  • GrabImage : MyFrame
  • GrabSingle() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • GrabSingleDepth() : BIAS::VideoSource_DiskPMD
  • GrabSingleModCoeff() : BIAS::VideoSource_DiskPMD
  • GrabSingleRight() : BIAS::VideoSource_Stereo
  • GrabTime_ : BIAS::VideoSource_V4L
  • grad_ : BIAS::Tracker< StorageType, CalculationType >
  • GradientGauss() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GradientGaussAsymmetric() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
  • GradientSimple() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • GradientSobel3x3() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • GradientType_ : BIAS::Tracker< StorageType, CalculationType >
  • GreyToRGB_() : BIAS::ImageConvert
  • Grid_ : BIAS::ParamGUIPanel
  • Group_ : BIAS::ParamTypeBase
  • GroupNames_ : BIAS::Param
  • gsobel3x3_ : BIAS::Tracker< StorageType, CalculationType >
  • GtkInitialized_ : BIAS::GuiGTK
  • GtkInitializedMutex_ : BIAS::GuiGTK
  • GtkMain() : BIAS::GuiGTK
  • GuiBase() : BIAS::GuiBase
  • GuiEnhanced() : BIAS::GuiEnhanced
  • GuiGTK() : BIAS::GuiGTK
  • GuiWX() : BIAS::GuiWX
  • GuiWxMutex_ : BIAS::GuiWX
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- h -

  • h : Multitype
  • H : BIAS::Projection3DData
  • H0_ : BIAS::PMatrix
  • h_() : BIAS::GaussHelmert
  • H_ : BIAS::Kalman, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::Parametrization, BIAS::HMatrixEstimation
  • HalfWinSize_ : BIAS::Tracker< StorageType, CalculationType >
  • HarrisValue() : BIAS::ColorHarris
  • Hartley() : BIAS::Normalization
  • has_arg : option
  • HasRealSolution() : BIAS::PolynomialSolve
  • Header_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder, BIAS::VideoStream
  • height : BIAS::CameraViewport, BIAS::PMDImageMetaData
  • Height : BIAS::VideoStream::VSHeader
  • height_ : BIAS::CameraParam, BIAS::BackwardMapping< InputStorageType, OutputStorageType >, BIAS::ImageCanvas, BIAS::CameraData, BIAS::ProjectionParametersBase
  • Height_ : BIAS::VideoSource, BIAS::GuiBase, BIAS::EpipolarLine, BIAS::ImageBase
  • heightBrutto : BIAS::ImgObjGL
  • heightOrig : BIAS::ImgObjGL
  • Help_ : BIAS::ParamTypeBase
  • HFromMeta_() : BIAS::PMDImageProc
  • Hidden_ : BIAS::ParamTypeBase
  • Hinf_ : BIAS::PMatrix
  • hist1_ : BIAS::ColorMultiHistogram< StorageType >
  • hist2_ : BIAS::ColorMultiHistogram< StorageType >
  • hist_ : BIAS::ColorHistogram< StorageType >
  • Hist_ : BIAS::Histogram2D, BIAS::Histogram
  • histCount_ : BIAS::ColorHistogram< StorageType >
  • HistCount_ : BIAS::Histogram
  • histl_ : BIAS::ColorHistogram< StorageType >
  • Histogram() : BIAS::Histogram
  • Histogram2D() : BIAS::Histogram2D
  • HistSize_ : BIAS::Histogram
  • HMatrix() : BIAS::HMatrix
  • HMatrixBase() : BIAS::HMatrixBase
  • HMatrixEstimation() : BIAS::HMatrixEstimation
  • HMatrixToParams() : BIAS::Parametrization
  • HomgLine2D() : BIAS::HomgLine2D
  • HomgLine3D() : BIAS::HomgLine3D
  • HomgPlane3D() : BIAS::HomgPlane3D
  • HomgPoint1D() : BIAS::HomgPoint1D
  • HomgPoint2D() : BIAS::HomgPoint2D
  • HomgPoint2DCov() : BIAS::HomgPoint2DCov
  • HomgPoint3D() : BIAS::HomgPoint3D
  • HomgPoint3DCov() : BIAS::HomgPoint3DCov
  • Homogenize() : BIAS::HomgPoint3DCov, BIAS::HomgPoint3D, BIAS::HomgPoint2DCov, BIAS::HomgPoint2D, BIAS::HomgPoint1D, BIAS::HomgLine3D, BIAS::HomgLine2D
  • HomographyMapping() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • HParams_ : BIAS::Parametrization
  • Hscale_ : BIAS::Parametrization
  • HSLToGrey_() : BIAS::ImageConvert
  • HT_ : BIAS::Kalman
  • hue : SegmentationData
  • hueIntervall : SegmentationData
  • Hyperbola : BIAS::Conic2D
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- i -

  • i : Multitype, doublecomplex, complex, Multitype, doublecomplex, complex
  • I : BIAS::cornerstruct
  • IC_ : MyFrame
  • ICECallbackInterface() : BIAS::ICECallbackInterface
  • iciend : icilist
  • icierr : icilist
  • icifmt : icilist
  • icirlen : icilist
  • icirnum : icilist
  • iciunit : icilist
  • id : BIAS::ImgObjGL, BIAS::ExifTag
  • ID_ : BIAS::VideoSource
  • identifier : BIAS::Projection3DData, xvimage
  • identifier_ : BIAS::Projection
  • Identity_ : BIAS::Kalman
  • idleRepaintEnabled : BIAS::OpenGLCanvas
  • Idum_ : BIAS::Random
  • IEEE1394Card_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • IEEE1394Handle_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • Ifs_ : BIAS::VideoStream
  • IlluCorrX_ : BIAS::UnVignette, BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::CameraData
  • IlluCorrY_ : BIAS::UnVignette, BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::CameraData
  • Image() : BIAS::Image< StorageType >
  • image : BIAS::ColorSegmentation
  • Image3DData() : BIAS::Image3DData
  • image_ : BIAS::ColorHistogram< StorageType >
  • ImageAttributes() : BIAS::ImageAttributes
  • ImageBase : BIAS::ImageBase, BIAS::ImageConvert
  • ImageCanvas() : BIAS::ImageCanvas
  • ImageCanvasEnhanced() : BIAS::ImageCanvasEnhanced
  • ImageCanvasGLBase() : BIAS::ImageCanvasGLBase
  • ImageCanvasUC_ : MainFrame
  • ImageConvert : BIAS::ImageBase
  • ImageConvertThreaded() : BIAS::ImageConvertThreaded
  • imagedata : xvimage
  • ImageData : BIAS::Image3DData
  • ImageData_ : BIAS::ImageBase
  • ImageDataArray_ : BIAS::ImageBase
  • ImageFileNames_ : MainFrame
  • ImageHeight_ : MainFrame
  • ImageIO : BIAS::ImageBase
  • ImageName_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas, BIAS::ZoomFrame
  • ImageSize_ : BIAS::VideoSource, BIAS::VideoStream
  • ImageWidth_ : MainFrame
  • img_ : BIAS::CondensHisto
  • img_h : BIAS::Contour
  • img_w : BIAS::Contour
  • ImgBuffer_ : BIAS::VideoShMFeeder
  • ImgCanvas : BIAS::GuiWX
  • imgHeight_ : BIAS::VideoServer
  • imgHSV : SegmentationData
  • ImgObjGL() : BIAS::ImgObjGL
  • imgWidth_ : BIAS::VideoServer
  • importanceFraction_ : BIAS::Condensation
  • ImportDevIL() : BIAS::ImageIO
  • ImportImage() : BIAS::ImageIO
  • ImportImagePnm_() : BIAS::ImageIO
  • ImportImageViff_() : BIAS::ImageIO
  • ImportImlib() : BIAS::ImageIO
  • ImportMagickPP() : BIAS::ImageIO
  • ImportMagickPPAutoconvert() : BIAS::ImageIO
  • ImportOpenEXR() : BIAS::ImageIO
  • ImportRADIANCE() : BIAS::ImageIO
  • ImportRAWwithHeader() : BIAS::ImageIO
  • ImportReal32() : BIAS::ImageIO
  • imRes : SegmentationData
  • inacc : inlist
  • inacclen : inlist
  • inblank : inlist
  • inblanklen : inlist
  • index() : TNT::Fortran_Sparse_Vector< T >
  • Index1D() : TNT::Index1D
  • index_ : TNT::Fortran_Sparse_Vector< T >
  • indexRegMsgs_ : BIAS::CScommBase
  • indexTminus2_ : BIAS::Condensation
  • indir : inlist
  • indirlen : inlist
  • inerr : inlist
  • inex : inlist
  • infile : inlist
  • infilen : inlist
  • Infinity : BIAS::HomgPoint2D
  • infmt : inlist
  • infmtlen : inlist
  • info : BIAS::cornerstruct
  • inform : inlist
  • informlen : inlist
  • Init() : BIAS::VideoServer, BIAS::Kalman, BIAS::Condensation, BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::LeastSquaresBase, BIAS::FFT, BIAS::PlaneRANSAC, BIAS::doubleRANSAC, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::UnVignette, BIAS::SphericalUndistortion, BIAS::PyramidImage< StorageType >, BIAS::MatlabTBUndistortion, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::JpegHandler, BIAS::CameraParam, BIAS::TrifocalTensor, BIAS::EpipolarLine, BIAS::FilterMask, BIAS::ScanLine2, BIAS::ScanLine, BIAS::ImageBase, BIAS::Image< StorageType >, BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • Init_() : BIAS::VideoShMFeeder, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Contour, BIAS::Camera< StorageType >, BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • InitBezier() : BIAS::Interpolator
  • InitCam() : BIAS::VideoSource_DCAM
  • InitCamera() : CuEye
  • InitCameras() : BIAS::MDcam
  • InitCubicUniformBSpline() : BIAS::BSplineCurve
  • InitData_ : MIP::VideoSource_DV2
  • InitDevIL() : BIAS::ImageIO
  • InitDistanceImage_() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • InitEvent() : CuEye
  • InitExifTags() : BIAS::ImageAttributes
  • InitFont() : BIAS::DrawTextGL
  • InitFromF() : BIAS::EMatrix
  • InitGeometry() : MyGLCanvas
  • InitGtk() : BIAS::GuiGTK
  • InitGtk_() : BIAS::GuiGTK
  • InitHist() : BIAS::Histogram2D, BIAS::Histogram
  • initial_ : BIAS::Condensation
  • initialize() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Initialize() : BIAS::ProjectionParametersIO
  • initialized : BIAS::DrawTextGL
  • Initialized_ : BIAS::VideoServer
  • initializedCubic_ : BIAS::BSplineCurve
  • initializedPoly_ : BIAS::Interpolator
  • initializedQuadratic_ : BIAS::BSplineCurve
  • InitializeSensor() : BIAS::ProjectionParametersIO
  • InitImage() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_DSHOW, BIAS::VideoSource
  • InitKernel_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • InitLinear() : BIAS::Interpolator
  • InitMembers() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas, BIAS::ImgObjGL, BIAS::ImageCanvasGLBase, BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController
  • InitMembers_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • InitModelDefaults() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • InitP1P2Trans() : BIAS::PMatrixEstimation
  • InitPerspective() : BIAS::CameraParam
  • InitPrior() : BIAS::Condensation
  • InitPriorPositions() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • InitQuadraticUniformBSpline() : BIAS::BSplineCurve
  • InitSpherical() : BIAS::CameraParam
  • InitSpline() : BIAS::Interpolator
  • InitSpline2() : BIAS::Interpolator
  • InitSpline3() : BIAS::Interpolator
  • InitSplineAkima() : BIAS::Interpolator
  • InitVideoCapture_() : BIAS::VideoSource_DSHOW
  • InitWithContext() : BIAS::OpenGLCanvasBase
  • InitWithContextDone_ : BIAS::OpenGLCanvasBase
  • InitWithForeignData() : BIAS::Image< StorageType >
  • inname : inlist
  • innamed : inlist
  • innamlen : inlist
  • innrec : inlist
  • innum : inlist
  • inopen : inlist
  • InquireImageMem() : CuEye
  • inrecl : inlist
  • inseq : inlist
  • inseqlen : inlist
  • Instance() : BIAS::LogFacility
  • instance_ : BIAS::OpenGLCanvasBase
  • Instances_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • InstancesTotal_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • instancesTotalNo_ : BIAS::OpenGLCanvasBase
  • intData : BIAS::CScommMsg
  • IntegralHistogram() : BIAS::IntegralHistogram
  • InterestPoint : BIAS::ImageCanvasGLBase
  • InterleavedDataOrder_ : BIAS::ImageBase
  • Interpolate_() : BIAS::EpipolarLine
  • InterpolateAbsZoom_() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • InterpolateDistortionFromIndex_() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • InterpolatedLine() : BIAS::ImageDraw< StorageType >
  • InterpolatedLineGrey() : BIAS::ImageDraw< StorageType >
  • InterpolateFocalLength_() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • InterpolationGrey() : BIAS::Image< StorageType >
  • interpolationType_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Interpolator() : BIAS::Interpolator
  • interpolatorAngle_ : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • interpolatorAngleBack_ : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • InterpolatorIllu_ : BIAS::UnVignette
  • interpolatorIllu_ : BIAS::SphericalUndistortion
  • Intersect() : BIAS::Triangulation
  • Intersection() : BIAS::HomgLine2D
  • IntersectsCircle() : BIAS::Conic2D
  • IntersectsInImage : TIntersect
  • intHisto_ : BIAS::CondensHisto
  • inunf : inlist
  • inunflen : inlist
  • inunit : inlist
  • Invalidate() : BIAS::UUID
  • InvalidateDecomposition() : BIAS::PMatrix
  • InvalidatePCA() : BIAS::CovMatrix3x3
  • InvalidateUID() : BIAS::ImageBase
  • InvalidPosition : BIAS::HomgPoint2D
  • Inverse() : BIAS::Quaternion< QUAT_TYPE >
  • InverseTransform() : BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >
  • Invert() : BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::SVD, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::KMatrix
  • InvertIP() : BIAS::Matrix3x3< T >, BIAS::SimilarityTransform, BIAS::CoordinateTransform3D, BIAS::Matrix3x3< T >
  • invK_ : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • invTransform_ : BIAS::CoordinateTransform3D
  • IP_RGBToGrey_() : BIAS::ImageConvert
  • IP_ToGrey() : BIAS::ImageConvert
  • IP_YUV422ToGrey_() : BIAS::ImageConvert
  • Ipl2BIAS() : BIAS::ImageConvert
  • IsAllocated_() : BIAS::GuiGTK
  • IsAtInfinity() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • IsContextAvailable() : BIAS::OpenGLCanvasBase
  • IsCreator_ : BIAS::VideoSource_Shm
  • IsCValid() : BIAS::Camera< StorageType >
  • IsDecomposed_ : BIAS::PMatrix
  • IsDoubleLine() : BIAS::Conic2D
  • IsEllipse() : BIAS::Conic2D
  • IsEmpty() : BIAS::PyramidImage< StorageType >, BIAS::Histogram, BIAS::Projection, BIAS::Conic2D, BIAS::ImageBase
  • IsFg() : BIAS::Contour
  • IsfValid() : BIAS::Camera< StorageType >
  • IsGrabbingContinous() : BIAS::VideoSource
  • IsHomogenized() : BIAS::HomgPoint3DCov, BIAS::HomgPoint3D, BIAS::HomgPoint2DCov, BIAS::HomgPoint2D
  • IsHyperbola() : BIAS::Conic2D
  • IsIdentity() : BIAS::Matrix< T >
  • IsInFrontOfCamera() : BIAS::PMatrix
  • IsInitialized() : BIAS::UnVignette, BIAS::CameraParam, BIAS::DrawTextGL
  • IsInitialized_ : BIAS::CameraParam
  • isInitialized_ : BIAS::XMLIO
  • IsInMap_() : BIAS::BaseFactory< BaseClassType >
  • IsInROI() : BIAS::ROI, BIAS::ImageBase, BIAS::HomgPoint2D
  • IsInROIHomogenized() : BIAS::HomgPoint2D
  • IsInterleaved() : BIAS::ImageBase
  • IsKValid() : BIAS::Camera< StorageType >
  • IsMetric() : BIAS::PMatrix
  • IsMetric_ : BIAS::PMatrix
  • IsMono() : BIAS::RenderModeGL
  • IsNil() : BIAS::UUID
  • IsOrientationValid() : BIAS::Camera< StorageType >
  • IsParabola() : BIAS::Conic2D
  • ispare1 : xvimage
  • ispare2 : xvimage
  • IsPerspective() : BIAS::CameraParam
  • IsPlanar() : BIAS::ImageBase
  • IsPoint() : BIAS::Conic2D
  • IsPointValid() : BIAS::Camera< StorageType >
  • IsPositionInImage() : BIAS::ImageBase
  • IsPowerOfTwoSize() : BIAS::ImageBase
  • IsProjValid() : BIAS::Camera< StorageType >
  • IsPValid() : BIAS::Camera< StorageType >
  • IsPyramid_ : BIAS::GuiBase
  • IsRectangleTexture() : BIAS::ImgObjGL
  • IsRunning() : BIAS::TimeMeasure
  • IsRValid() : BIAS::Camera< StorageType >
  • IsSeparable() : BIAS::FilterMask
  • isServer_ : BIAS::CScommBase
  • IsSingleLine() : BIAS::Conic2D
  • IsSize1x1() : BIAS::FilterMask
  • IsSpherical() : BIAS::CameraParam
  • IsStereoQuadbuffered() : BIAS::RenderModeGL
  • IsTimeValid() : BIAS::Camera< StorageType >
  • IsUsedGroupID() : BIAS::Param
  • IsValid() : BIAS::FMatrix, BIAS::UUID
  • IsValid_ : BIAS::UUID
  • IsZero() : BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • IsZoomCamera() : BIAS::CameraParam
  • item : BIAS::ItemAndWidget
  • iterator : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- p -

  • p1_ : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • p2_ : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • p2tracked_ : BIAS::Tracker< StorageType, CalculationType >
  • P_ : BIAS::Camera< StorageType >
  • p_2nd_canvas : MyFrame
  • p_canvas : MyFrame
  • p_canvas1 : MyFrame
  • p_canvas2 : MyFrame
  • p_externals : BIAS::CameraViewController
  • p_font : BIAS::OpenGLCanvasBase
  • p_id_SelfAllocated : BIAS::ImgObjGL
  • p_imgBias : BIAS::WrapBias2Ipl
  • p_imgIpl : BIAS::WrapBias2Ipl
  • p_imgIplDestroyable : BIAS::WrapBias2Ipl
  • p_internals : BIAS::CameraViewController
  • p_ownerframe : BIAS::OpenGLCanvasBase
  • p_StatBar : BIAS::ScaledImageCanvas
  • p_valueImage : BIAS::ImgObjGL
  • p_valueImage_SelfAllocated : BIAS::ImgObjGL
  • p_viewCtrl_ : BIAS::OpenGLCanvas
  • Pad() : BIAS::ImageBase
  • Padding : BIAS::VideoStream::VSHeader
  • PadPoints_() : BIAS::Tracker< StorageType, CalculationType >
  • PadToPowerOfTwo() : BIAS::ImageBase
  • PadToPowerOfTwoAndFlip() : BIAS::ImageBase
  • panelAspectRatio_ : BIAS::ProjectionGUI
  • panelCenter_ : BIAS::ProjectionGUI
  • panelFocalLength_ : BIAS::ProjectionGUI
  • panelImageSize_ : BIAS::ProjectionGUI
  • panelKMatrix_ : BIAS::ProjectionGUI
  • panelPrincipal_ : BIAS::ProjectionGUI
  • panelQuaternion_ : BIAS::ProjectionGUI
  • panelRadius_ : BIAS::ProjectionGUI
  • panelRMatrix_ : BIAS::ProjectionGUI
  • panelUndistortion_ : BIAS::ProjectionGUI
  • pAngle_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • PanPos : BIAS::DC_ptu
  • Parabola : BIAS::Conic2D
  • ParabolaNCC() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • ParabolaNCC5() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • Param() : BIAS::Param
  • param_ : MyFrame
  • ParamAdd() : MyAlgorithm
  • ParamCallbackInterface() : BIAS::ParamCallbackInterface
  • ParameterChanged() : BIAS::ParamCallbackInterface, BIAS::Tracker< StorageType, CalculationType >, MyAlgorithm
  • Parametrization() : BIAS::Parametrization
  • Parametrization2R_() : BIAS::PMatrixBase
  • ParamGUI() : BIAS::ParamGUI
  • ParamGUIDialog() : BIAS::ParamGUIDialog
  • ParamGUIPanel() : BIAS::ParamGUIPanel
  • ParamMap_ : BIAS::Param
  • Params_ : BIAS::ThreeDOut
  • ParamsAllocated_ : BIAS::VideoServer, BIAS::CornerDetectorBase< StorageType >
  • ParamsToEMatrix() : BIAS::Parametrization
  • ParamsToFMatrix() : BIAS::Parametrization
  • ParamsToHMatrix() : BIAS::Parametrization
  • ParamTypeBase() : BIAS::ParamTypeBase
  • ParamTypeBool() : BIAS::ParamTypeBool
  • ParamTypeDouble() : BIAS::ParamTypeDouble
  • ParamTypeEnum() : BIAS::ParamTypeEnum
  • ParamTypeInt() : BIAS::ParamTypeInt
  • ParamTypeString() : BIAS::ParamTypeString
  • ParamTypeVecDbl() : BIAS::ParamTypeVecDbl
  • ParamTypeVecInt() : BIAS::ParamTypeVecInt
  • Parent_ : BIAS::ParamGUIPanel
  • ParPort_ : BIAS::MDcam
  • ParseCommandLine() : BIAS::Param
  • ParseListFile() : BIAS::Param
  • ParseMetaData() : BIAS::Camera< StorageType >
  • ParseRAWwithHeader() : BIAS::ImageIO
  • ParseView() : BIAS::RigParameter
  • Paste2ROI() : BIAS::ImageBase
  • pCaptureGraphBuilder2_ : BIAS::VideoSource_DSHOW
  • PConsistencyBackup_ : BIAS::PMatrix
  • PConsistencyBackupSVD_ : BIAS::PMatrix
  • pDsBuffer_ : BIAS::VideoSource_DSHOW
  • PercentageValues_ : BIAS::UnVignette
  • PerformClassFunctionOnListedFiles() : FindFilesInPath
  • PerformFunctionOnListedFiles() : FindFilesInPath
  • PERSPECTIVE : BIAS::SphericalUndistortion
  • PERSPECTIVE_DIST : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • PERSPECTIVE_UNDIST : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • pGrabber_ : BIAS::VideoSource_DSHOW
  • pGraphBuilder_ : BIAS::VideoSource_DSHOW
  • Phi() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • PhiX : BIAS::SphericalUndistortion::LuTpxpyEntry
  • PhiY : BIAS::SphericalUndistortion::LuTpxpyEntry
  • PickImportanceSample_() : BIAS::Condensation
  • PickOneSample_() : BIAS::Condensation
  • pImageBuffer_ : BIAS::VideoSource_DSHOW
  • pImgBuffer_ : BIAS::VideoSource_Shm, BIAS::VideoSource_Net
  • PInfinity_ : BIAS::EpipolarLine
  • PInfinityPosition_ : BIAS::EpipolarLine
  • pInPin_ : BIAS::VideoSource_DSHOW
  • pInstance_ : BIAS::LogFacility
  • Pitch : BIAS::DC_inertial
  • PixelValue() : BIAS::Image< StorageType >
  • PixelValueBase() : BIAS::ImageBase
  • PixelValueInterleaved() : BIAS::Image< StorageType >
  • pixsizx : xvimage
  • pixsizy : xvimage
  • PlainImageCanvas() : PlainImageCanvas
  • planar : ThreadArg__
  • PlaneRANSAC() : BIAS::PlaneRANSAC
  • PlueckerMatrix() : BIAS::PlueckerMatrix
  • PMatrix() : BIAS::PMatrix
  • PMatrixBase() : BIAS::PMatrixBase
  • PMatrixEstimation() : BIAS::PMatrixEstimation
  • PMatrixLinear() : BIAS::PMatrixLinear
  • pMediaControl_ : BIAS::VideoSource_DSHOW
  • pMediaEvent_ : BIAS::VideoSource_DSHOW
  • pNullRenderer_ : BIAS::VideoSource_DSHOW
  • point : BIAS::WeightedSigmaPoint
  • Point : BIAS::Point3DData, TIntersect, BIAS::Conic2D
  • pointer : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • PointFin_ : BIAS::HomgLine3D
  • PointInf_ : BIAS::HomgLine3D
  • Points_ : BIAS::Tracker< StorageType, CalculationType >
  • pointsFrom_ : BIAS::HMatrixEstimation
  • pointsize : BIAS::RenderModeGL
  • PointSize : BIAS::ThreeDOutParameters
  • pointsTo_ : BIAS::HMatrixEstimation
  • PointStyle : BIAS::ThreeDOutParameters
  • PointValid_ : BIAS::Camera< StorageType >
  • PolarToCartesian() : BIAS::Vector3< T >
  • PolarTransform() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • poly_ : BIAS::Polynom
  • polygonmodeBACK : BIAS::RenderModeGL
  • polygonmodeFRONT : BIAS::RenderModeGL
  • Polynom() : BIAS::Polynom
  • PolynomialSolve() : BIAS::PolynomialSolve
  • port_ : BIAS::VideoSource_Net, BIAS::VideoServer
  • portChange_ : BIAS::CScommBase
  • Pose() : BIAS::Pose
  • Pose2CQ_() : BIAS::PoseParametrization
  • Pose_ : BIAS::ProjectionParametersBase, BIAS::PoseParametrization
  • PoseFromMeta() : BIAS::PMDImageProc
  • PoseInRigCenter_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigPitch_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigRoll_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigYaw_ : BIAS::CameraData, BIAS::SensorData
  • PoseParametrization() : BIAS::PoseParametrization
  • PoseParametrizationCovariance() : BIAS::PoseParametrizationCovariance
  • Position() : BIAS::Position
  • PostGrab() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • postmultiply1() : BIAS::Tensor3D3x3x3< T >
  • postmultiply2() : BIAS::Tensor3D3x3x3< T >
  • postmultiply3() : BIAS::Tensor3D3x3x3< T >
  • pOutPin_ : BIAS::VideoSource_DSHOW
  • PowerOfTwoSize() : BIAS::ImageBase
  • PP : BIAS::PMatrix3DData
  • PPXTextCtrl_ : MainFrame
  • PPYTextCtrl_ : MainFrame
  • pRadius_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • Precision_ : BIAS::GaussHelmert
  • Predict() : BIAS::Kalman
  • PredictedPoints_ : BIAS::Tracker< StorageType, CalculationType >
  • PredictNewSamplePositions() : BIAS::Condensation
  • PreGrab() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • premultiply1() : BIAS::Tensor3D3x3x3< T >
  • premultiply2() : BIAS::Tensor3D3x3x3< T >
  • premultiply3() : BIAS::Tensor3D3x3x3< T >
  • PrepareLeastSquaresMin_() : BIAS::UnVignette
  • PrepareLuImage_() : BIAS::UnVignette
  • PrepareLuTSpline() : BIAS::Interpolator
  • PreparePyramide() : BIAS::Tracker< StorageType, CalculationType >
  • PrincipalX : BIAS::PMDImageMetaData
  • principalX_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • PrincipalY : BIAS::PMDImageMetaData
  • principalY_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • PrinciplePointX_ : MainFrame, BIAS::UnVignette
  • PrinciplePointY_ : MainFrame, BIAS::UnVignette
  • Print() : BIAS::DrawTextGL, BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController, BIAS::ImageAttributes, BIAS::ExifTag, BIAS::TimeMeasure
  • Print3D() : BIAS::DrawTextGL
  • Print3DAbsolute() : BIAS::DrawTextGL
  • PrintAppData() : BIAS::Camera< StorageType >
  • PrintCycleCount() : BIAS::TimeMeasure
  • PrintData() : BIAS::Image< StorageType >
  • PrintDebugLevel() : BIAS::Debug
  • PrintFormatAndMode_() : BIAS::VideoSource_DCAM
  • PrintHeader() : BIAS::VideoStream, BIAS::ImageBase
  • PrintHelp() : BIAS::OpenGLCanvasBase
  • PrintIdleTime() : BIAS::TimeMeasure
  • PrintInfoDevIL() : BIAS::ImageIO
  • PrintKernel() : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >
  • PrintKernelTime() : BIAS::TimeMeasure
  • PrintLogLevel() : BIAS::LogFacility
  • PrintMsecHumanReadable() : BIAS::TimeMeasure
  • PrintNormCoords() : BIAS::DrawTextGL
  • PrintPointer() : BIAS::Image< StorageType >
  • PrintRealTime() : BIAS::TimeMeasure
  • PrintROI() : BIAS::ImageBase
  • PrintUserTime() : BIAS::TimeMeasure
  • PrintWinCoords() : BIAS::DrawTextGL
  • Process() : BIAS::Condensation, BIAS::Contour, BIAS::Label
  • processFirstOrderScale_ : BIAS::Condensation
  • ProcessImage() : BIAS::VideoShMFeeder
  • processMean_ : BIAS::Condensation
  • ProcessOneImage() : BIAS::VideoServer
  • processSecondOrderScale_ : BIAS::Condensation
  • Proj_ : BIAS::Camera< StorageType >
  • Project() : BIAS::ProjectionParametersBase, BIAS::Projection
  • ProjectCoord() : BIAS::SphericalUndistortion
  • ProjectCoordBack() : BIAS::SphericalUndistortion
  • ProjectCutOut() : BIAS::SphericalUndistortion
  • ProjectCutOut1() : BIAS::SphericalUndistortion
  • ProjectCutOut2() : BIAS::SphericalUndistortion
  • ProjectImageCylindric() : BIAS::SphericalUndistortion
  • Projection() : BIAS::Projection
  • Projection3DData() : BIAS::Projection3DData
  • projection_ : BIAS::ProjectionGUI
  • ProjectionDialog() : BIAS::ProjectionDialog
  • ProjectionGUI() : BIAS::ProjectionGUI
  • ProjectionMapping() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • projectionPanel_ : BIAS::ProjectionGUI
  • ProjectionParametersBase() : BIAS::ProjectionParametersBase
  • ProjectionParametersPerspective() : BIAS::ProjectionParametersPerspective
  • ProjectionParametersProjective() : BIAS::ProjectionParametersProjective
  • ProjectionParametersSpherical() : BIAS::ProjectionParametersSpherical
  • ProjectionParametersZoom() : BIAS::ProjectionParametersZoom
  • ProjectLocal() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • ProjectSphereImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • projgui_ : BIAS::ProjectionDialog
  • ProjValid_ : BIAS::Camera< StorageType >
  • pSampleOutPin_ : BIAS::VideoSource_DSHOW
  • pSrcFilter_ : BIAS::VideoSource_DSHOW
  • pthreadListener_ : BIAS::CScommServer
  • pu_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • pub : my_error_mgr
  • PValid_ : BIAS::Camera< StorageType >
  • px_ : BIAS::CylinderMapping
  • py_ : BIAS::CylinderMapping
  • PyIndex_ : BIAS::Tracker< StorageType, CalculationType >
  • Pyramid0Height_ : BIAS::GuiBase
  • Pyramid0Width_ : BIAS::GuiBase
  • pyramid_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • PyramidImage() : BIAS::PyramidImage< StorageType >
  • PyramidLevels_ : BIAS::GuiBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- q -

  • Q_ : BIAS::SimilarityTransform, BIAS::CoordinateTransform3D
  • Quadratic() : BIAS::PolynomialSolve
  • QuadraticUniformBSpline() : BIAS::BSplineCurve
  • Quadric3D() : BIAS::Quadric3D
  • Quartic() : BIAS::PolynomialSolve
  • QUATERNION : BIAS::PMatrixBase
  • Quaternion() : BIAS::Quaternion< QUAT_TYPE >
  • QueryCam() : BIAS::VideoSource_DCAM
  • QueryInterface() : BIAS::MySampleGrabberCB
  • QuitButton_ : MyFrame, BIAS::ZoomFrame
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- r -

  • r : Multitype, doublecomplex, complex, Multitype, doublecomplex, complex, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • R_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::PMatrix, BIAS::AffineTransf
  • Radius() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • radius_ : BIAS::CameraParam, BIAS::ProjectionParametersSpherical, BIAS::CameraData
  • radiusSelection : BIAS::Projection3DData
  • ran1_() : BIAS::Random
  • ran1c_() : BIAS::Random
  • ran2_() : BIAS::Random
  • Random() : BIAS::Random
  • random_ : BIAS::Condensation
  • rangeChecked_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Rank() : BIAS::SVD
  • RANSAC() : BIAS::RANSAC< SolutionType >
  • RANSACPreKnowledge() : BIAS::RANSACPreKnowledge< SolutionType >
  • raw_dv_handler : MIP::VideoSource_DV
  • rc : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • read() : TNT::stopwatch, BIAS::XMLIO
  • Read() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::PMDImageProc, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::PMDImageIO, BIAS::ImageIO, BIAS::ImageAttributes
  • Read2DImage16Bit_() : BIAS::PMDImageIO
  • Read2DImage8Bit_() : BIAS::PMDImageIO
  • ReadBinary() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ROI
  • ReadBinaryData() : BIAS::ColorHistogram< StorageType >
  • ReadCameraData() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCameraDataV0_8() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCameraDataV1_0() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCorrespondences() : BIAS::GenGroundTruth
  • ReadCycleCounter() : BIAS::TimeMeasure
  • ReadData() : BIAS::GenSynthMatches
  • ReadDepthImage_() : BIAS::PMDImageIO
  • ReadDigitalPort() : CuEye
  • ReadEEPROM() : CuEye
  • ReadFromCamParamFile() : BIAS::Projection
  • ReadFromCMP() : BIAS::RigParameter
  • ReadFromEXIF() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadFromString() : BIAS::XMLIO
  • ReadJPEG() : BIAS::JpegHandler
  • ReadMagickPP() : BIAS::ImageAttributes
  • ReadMetaData_() : BIAS::PMDImageIO
  • ReadModCoeffImage_() : BIAS::PMDImageIO
  • ReadParameter() : BIAS::Param
  • ReadParameterXML() : BIAS::Param
  • ReadRigData() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • ReadRigDataV0_8() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • ReadTracks_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • ReadTriggerPort() : CuEye
  • ReadWorldPoints() : BIAS::GenGroundTruth
  • realtimeAnimation : BIAS::OpenGLCanvas
  • Recalc() : BIAS::EpipolarLine
  • receivethread : BIAS::CScommBase
  • receiveThread_() : BIAS::CScommBase
  • Reciprocal() : BIAS::Image< StorageType >
  • Rectangle() : BIAS::ImageDraw< StorageType >
  • RectangleCenter() : BIAS::ImageDraw< StorageType >
  • RectangleCenterGrey() : BIAS::ImageDraw< StorageType >
  • RectangleCenterGreyFill() : BIAS::ImageDraw< StorageType >
  • RectangleCorners() : BIAS::ImageDraw< StorageType >
  • RectangleCornersGrey() : BIAS::ImageDraw< StorageType >
  • RectangleCornersGreyFill() : BIAS::ImageDraw< StorageType >
  • RectangleSelected() : BIAS::ICECallbackInterface, MyFrame
  • RedirectCerr() : BIAS::RedirectStreams
  • RedirectCout() : BIAS::RedirectStreams
  • RedirectImageDataPointer() : BIAS::ImageBase
  • RedirectStreams() : BIAS::RedirectStreams
  • RedirErr_ : BIAS::RedirectStreams
  • RedirOut_ : BIAS::RedirectStreams
  • Redraw_() : BIAS::GuiGTK
  • RedrawHist_() : BIAS::Histogram
  • reference : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • refHisto2_ : BIAS::CondensHisto
  • refHisto_ : BIAS::CondensHisto
  • RefinePyramideNCC() : BIAS::CornerMatcher
  • RefineSolution() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • RefitClients() : MainFrame
  • RefreshDrawIm_() : BIAS::ImageCanvasEnhanced
  • Region1D() : TNT::Region1D< Array1D >
  • Region2D() : TNT::Region2D< Array2D >
  • RegionMatcher() : BIAS::RegionMatcher
  • RegisterCallbackObject() : BIAS::Param
  • registeredMsgs_ : BIAS::CScommBase
  • registerLock_ : BIAS::CScommBase
  • RegisterMsg() : BIAS::CScommBase
  • ReInitWindow_() : BIAS::GuiGTK
  • RejectMAD_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • RejectX86_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Release() : BIAS::FFT, BIAS::PyramidImage< StorageType >, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::JpegHandler, BIAS::ImgObjGL, BIAS::ROI, BIAS::ImageBase, BIAS::Image< StorageType >
  • release : xvimage
  • ReleaseCameras() : BIAS::MDcam
  • ReleaseHist() : BIAS::Histogram
  • ReleaseImageDataPointer() : BIAS::ImageBase
  • RelLeftNullspaceDim() : BIAS::SVD
  • RelNullspaceDim() : BIAS::SVD
  • RelRightNullspaceDim() : BIAS::SVD
  • RemoveAll() : BIAS::ThreeDOut
  • RemoveAllEllipsoids() : BIAS::ThreeDOut
  • RemoveAllImages() : BIAS::ThreeDOut
  • RemoveAllLines() : BIAS::ThreeDOut
  • RemoveAllPMatrices() : BIAS::ThreeDOut
  • RemoveAllPoints() : BIAS::ThreeDOut
  • RemoveDebugLevel() : BIAS::Debug
  • RemoveEllipsoid() : BIAS::ThreeDOut
  • RemoveImage() : BIAS::ThreeDOut
  • RemoveLine() : BIAS::ThreeDOut
  • RemovePMatrix() : BIAS::ThreeDOut
  • RemovePoint() : BIAS::ThreeDOut
  • RenderBitmap() : CuEye
  • rendermode : BIAS::OpenGLCanvasBase
  • RenderModeGL() : BIAS::RenderModeGL
  • Renumerate() : CuEye
  • ReplaceAllPoints() : BIAS::Tracker< StorageType, CalculationType >
  • ReplaceLastImages() : BIAS::Tracker< StorageType, CalculationType >
  • ReplacePoints() : BIAS::Tracker< StorageType, CalculationType >
  • reqBuf : BIAS::VideoSource_V4L
  • res_ : BIAS::Tracker< StorageType, CalculationType >
  • Rescale() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Rescale< InputStorageType, OutputStorageType >
  • RescaleFilter_ : BIAS::VideoServer
  • reserve : xvimage
  • ReserveInternals_() : BIAS::Tracker< StorageType, CalculationType >
  • reset() : TNT::stopwatch
  • Reset() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::Tracker< StorageType, CalculationType >, BIAS::CylinderMapping, BIAS::Random, BIAS::Distribution, BIAS::TimeMeasure
  • ResetCerr() : BIAS::RedirectStreams
  • ResetCout() : BIAS::RedirectStreams
  • ResetDebugLevelFromGlobal() : BIAS::ExampleDebug
  • ResetFloatFilter() : BIAS::FilterMask
  • ResetIntFilter() : BIAS::FilterMask
  • ResetStream() : BIAS::LogFacility
  • Reshape() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas
  • ResiduiMAD_ : BIAS::Tracker< StorageType, CalculationType >
  • ResiduiMSD_ : BIAS::Tracker< StorageType, CalculationType >
  • Resize() : BIAS::ROI
  • resize() : TNT::Vector_Adaptor< BBVec >
  • Resize_() : BIAS::VideoSource_Shm, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • resizeFactor_ : BIAS::VideoServer
  • ResizeInternals_() : BIAS::Tracker< StorageType, CalculationType >
  • ResizeWindow() : BIAS::WrapBias2Ipl
  • Reverse_() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • Rewind() : BIAS::VideoSource_Disk
  • rf : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • RGBAToRGB_() : BIAS::ImageConvert
  • rgbim_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • RGBToGrey_() : BIAS::ImageConvert
  • RGBTohsL_() : BIAS::ImageConvert
  • RGBToHSL_() : BIAS::ImageConvert
  • RGBToHSV_() : BIAS::ImageConvert
  • right : BIAS::CameraViewFrustum
  • Right : BIAS::HomgPoint2D
  • Right_ : BIAS::VideoSource_Stereo
  • RightIm_ : BIAS::VideoSource_Stereo
  • RightNullspaceDim() : BIAS::SVD
  • RigParameter() : BIAS::RigParameter
  • RMatrix() : BIAS::RMatrix
  • RMatrixBase() : BIAS::RMatrixBase
  • RMaxLine_ : BIAS::EpipolarLine
  • RMinLine_ : BIAS::EpipolarLine
  • ROffset_ : BIAS::EpipolarLine
  • ROI() : BIAS::ROI
  • ROI_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Roi_ : BIAS::ImageBase
  • RootNode_ : BIAS::XMLIO
  • RotateToGrey() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • Rotation_ : BIAS::RigParameter
  • RotAxis : BIAS::Ellipsoid3DData
  • row_ : TNT::Matrix< T >
  • row_ind() : TNT::Fortran_Sparse_Col_Matrix< T >
  • row_size : xvimage
  • rowind_ : TNT::Fortran_Sparse_Col_Matrix< T >
  • rowm1_ : TNT::Matrix< T >
  • rows_ : BIAS::MatrixPanel
  • rtActual : BIAS::TimeMeasure
  • rtKernelSum : BIAS::TimeMeasure
  • rtLast : BIAS::TimeMeasure
  • rtRealSum : BIAS::TimeMeasure
  • running : TNT::stopwatch, BIAS::TimeMeasure
  • RValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- s -

  • s0 : BIAS::Ellipsoid3DData
  • s1 : BIAS::Ellipsoid3DData
  • s2 : BIAS::Ellipsoid3DData
  • S_ : BIAS::SVD
  • SAD() : BIAS::RegionMatcher
  • SADN() : BIAS::RegionMatcher
  • SamePixelAndChannelCount() : BIAS::ImageBase
  • SameSize() : BIAS::ROI
  • SampleCB() : BIAS::MySampleGrabberCB
  • sampleImportanceWeights_ : BIAS::Condensation
  • samplePosNew_ : BIAS::Condensation
  • samplePosOld_ : BIAS::Condensation
  • samplePosTminus2_ : BIAS::Condensation
  • sampleWeights_ : BIAS::Condensation
  • Save() : BIAS::SimilarityTransform, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::ImageIO, BIAS::PoseParametrization
  • SaveGraphFile_() : BIAS::VideoSource_DSHOW
  • SaveImage() : CuEye
  • SaveImageMem() : CuEye
  • SaveUnVignetted() : MainFrame
  • SBar_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • SBarID_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • ScalarProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Scale() : BIAS::Tensor3D< T >, BIAS::Matrix3x3< T >
  • scale_ : BIAS::SimilarityTransform, BIAS::CoordinateTransform3D
  • ScaleCol() : BIAS::Matrix< T >
  • scaledf_ : BIAS::ScaledImageCanvas
  • ScaledImageCanvas() : BIAS::ScaledImageCanvas
  • ScaledImageSizeX_ : BIAS::ImageCanvas
  • ScaledImageSizeY_ : BIAS::ImageCanvas
  • scalefactor : BIAS::ImageCanvasGLBase
  • scaleFactorSpeed : BIAS::DC_GPS
  • ScaleRow() : BIAS::Matrix< T >
  • ScaleShift() : BIAS::Image< StorageType >
  • ScaleShiftBetween() : BIAS::Image< StorageType >
  • ScaleSL_ : BIAS::ScaledImageCanvas
  • ScaleYToMaxEntry_ : BIAS::Histogram
  • scanbus : MyFrame
  • ScanBus() : BIAS::MDcam
  • ScanLine() : BIAS::EpipolarLine, BIAS::ScanLine
  • ScanLine2() : BIAS::ScanLine2
  • ScanLine_() : BIAS::EpipolarLine
  • sCaptureDeviceName_ : BIAS::VideoSource_DSHOW
  • ScorpionTimestampActive_ : BIAS::VideoSource_DCAM
  • ScreenShot() : BIAS::OpenGLCanvasBase
  • sdata : BIAS::AppData
  • SearchOverInf_ : BIAS::EpipolarLine
  • secondHistPos_ : BIAS::CondensHisto
  • SecondOrderARP_() : BIAS::Condensation
  • secondOrderScale_ : BIAS::CondensHisto
  • Seed_ : BIAS::Random
  • Segment() : BIAS::ColorSegmentationThreaded, BIAS::ColorSegmentation
  • Segment_() : BIAS::ColorSegmentationThreaded
  • SelectDefault() : BIAS::VideoSource_DCAM
  • SelectedCam_ : BIAS::VideoSource_DCAM
  • SelectLine() : BIAS::GuiEnhanced
  • SelectLineZoom() : BIAS::GuiEnhanced
  • SelectPoint() : BIAS::GuiEnhanced
  • SelectQuadrate() : BIAS::GuiEnhanced
  • SelectRectangle() : BIAS::ImageCanvasEnhanced, BIAS::GuiEnhanced
  • SelectRectangle_ : BIAS::ImageCanvasEnhanced
  • selfModifying_ : BIAS::ProjectionGUI
  • SendBuffer_ : BIAS::VideoServer
  • SendImage_ : BIAS::VideoServer
  • SendMsg() : BIAS::CScommBase
  • SendMsg_() : BIAS::CScommBase
  • SensorCenter_ : BIAS::RigParameter
  • SensorRotation_ : BIAS::RigParameter
  • server : BIAS::CScommMsg
  • server_ : BIAS::VideoServer
  • set() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Set() : BIAS::Projection3DData, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ImageCanvasGLBase, BIAS::SimilarityTransform, BIAS::Pose, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::RMatrixBase, BIAS::PoseParametrization, BIAS::PlueckerMatrix, BIAS::KMatrix, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPlane3D, BIAS::HomgLine3D, BIAS::HomgLine2D, BIAS::FMatrixBase, BIAS::EuclideanTransf3D, BIAS::EMatrixBase
  • set_identity() : BIAS::PMatrixBase
  • SetAbortOnFatal() : BIAS::LogFacility
  • SetActiveImage() : BIAS::CondensHisto
  • SetAlpha() : BIAS::UnscentedTransform
  • SetArea() : BIAS::CondensImg, BIAS::CondensHisto
  • SetASCIIString() : BIAS::Camera< StorageType >
  • SetAsCrossProductMatrix() : BIAS::Matrix3x3< T >
  • SetAspectratio() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • SetAsRotationMatrix() : BIAS::AffineTransf
  • SetAutoadaptScale() : BIAS::ScaledImageCanvas
  • SetAutomaticPortChange() : BIAS::CScommBase
  • SetBackGround() : BIAS::Contour
  • SetBeta() : BIAS::UnscentedTransform
  • SetBin() : BIAS::Histogram
  • SetBinCount() : BIAS::Histogram
  • SetBinning() : BIAS::VideoSource_DCAM
  • SetBinSize() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetBitDepth() : BIAS::ImageBase
  • SetBorderHandling() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • SetBrightness() : CuEye
  • SetBytesPerPacket() : BIAS::VideoSource_DCAM
  • SetBytesPerPixel() : BIAS::VideoSource
  • SetC() : BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose, BIAS::PMatrix, BIAS::CoordinateTransform3D
  • SetCalibration() : BIAS::RigParameter
  • SetCamera() : BIAS::VideoSource_DCAM, BIAS::MDcam
  • SetCameraCenter() : BIAS::RigParameter
  • SetCameraCenters() : BIAS::RigParameter
  • SetCameraID() : BIAS::VideoSource_DCAM
  • SetCameraParam() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >, BIAS::RigParameter
  • SetCaptureDeviceName() : BIAS::VideoSource_DSHOW
  • SetCaptureMode() : CuEye
  • SetCellSize() : BIAS::CameraParam
  • SetChannel() : BIAS::VideoSource
  • SetClearDrawingContext() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • SetCoarsePointUsage() : BIAS::Tracker< StorageType, CalculationType >
  • SetCol() : BIAS::Matrix< T >
  • SetColor() : BIAS::Histogram
  • SetColorMode() : BIAS::VideoSource_Disk, CuEye
  • SetColorModel() : BIAS::VideoSource, BIAS::Histogram2D, BIAS::Histogram, BIAS::ImageBase
  • SetColorSpace() : BIAS::ColorSegmentation
  • SetCompressedData() : BIAS::JpegHandler
  • SetCompression() : BIAS::XMLIO
  • SetConnectionTimeOut() : BIAS::CScommBase
  • setContent() : BIAS::XMLIO
  • SetContrast() : CuEye
  • SetControlPoints() : BIAS::Interpolator, BIAS::BSplineCurve
  • SetCorners() : BIAS::ROI
  • SetCov() : BIAS::ProjectionParametersBase, BIAS::Projection
  • SetCovariance() : BIAS::Pose, BIAS::PMatrix
  • SetCovarianceMatrix() : BIAS::PoseParametrization
  • SetCovEuclidian() : BIAS::Pose
  • SetCQ() : BIAS::PoseParametrization
  • SetData() : BIAS::MatchDataBase
  • SetData_DummyRig() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • SetData_EVID31_147094() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • SetData_OMNITECH_ORIFL_190_3() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • SetDebugLevel() : BIAS::Debug
  • SetDebugLevelDcam() : BIAS::MDcam
  • SetDebugStream() : BIAS::Debug
  • SetDefault() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • SetDefaultInitFraction() : BIAS::Condensation
  • SetDefaults() : BIAS::Param
  • SetDefaultZoom() : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • SetDeInterlaceType() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetDiffScale() : BIAS::CondensHisto
  • SetDiffScaleSize() : BIAS::CondensHisto
  • SetDirectToDisk() : BIAS::VideoSource
  • SetDisplayHook() : CuEye
  • SetDisplayKeyColor() : CuEye
  • SetDisplayMode() : CuEye
  • SetDisplayOffset() : CuEye
  • SetDisplayWindow() : CuEye
  • SetDownsampling() : BIAS::RigParameter, BIAS::CameraParam
  • SetDownSamplingByTwo() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetDrawMode() : BIAS::Histogram
  • SetEllipse() : BIAS::Conic2D
  • SetEndTangent() : BIAS::Interpolator
  • SetEnhancedFlag() : BIAS::Param
  • SetEpipole() : BIAS::EpipolarLine
  • SetErrorReport() : CuEye
  • SetEuclidean() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • SetExpDist() : BIAS::IntegralHistogram, BIAS::ColorHistogram< StorageType >
  • SetExposureTime() : CuEye
  • SetExternalTrigger() : CuEye
  • Setf() : BIAS::Camera< StorageType >
  • SetFactor() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Rescale< InputStorageType, OutputStorageType >
  • SetFactorOffset() : BIAS::GuiBase
  • SetFeature() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • SetFileList() : MainFrame
  • SetFirstOrderScale() : BIAS::CondensHisto
  • SetFocalLength() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • setFocalLength() : BIAS::CylinderMapping
  • SetFocalLengthAndAspect() : BIAS::ProjectionParametersPerspective
  • SetFormat7() : BIAS::VideoSource_DCAM
  • SetFps() : BIAS::MDcam
  • SetFPS() : BIAS::VideoSource_uEye, BIAS::VideoSource
  • SetFrameCount() : BIAS::OpenGLCanvasBase
  • SetFrameCounterAsTimeStamp() : BIAS::VideoSource_Disk
  • SetFrameRate() : CuEye
  • SetFromAxisAngle() : BIAS::RMatrixBase
  • SetFromColumnVectors() : BIAS::Matrix3x3< T >
  • SetFromEulerAngles() : BIAS::PoseParametrizationCovariance
  • SetFromHomogenized() : BIAS::CovMatrix3x3
  • SetFromHV() : BIAS::RMatrixBase
  • SetFromKMatrix() : BIAS::ProjectionParametersIO
  • SetFromLong() : BIAS::UUID
  • SetFromMatrices() : BIAS::Tensor3D3x3x3< T >
  • SetFromMatrix3x4() : BIAS::CoordinateTransform3D
  • SetFromOriUpGL() : BIAS::RMatrixBase
  • SetFromOrthogonalBasis() : BIAS::RMatrixBase
  • SetFromQuaternion() : BIAS::RMatrixBase
  • SetFromRowVectors() : BIAS::Matrix3x3< T >
  • SetFromString() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase, BIAS::UUID
  • SetFromVector() : BIAS::Tensor3D< T >, BIAS::Matrix3x3< T >, BIAS::PMatrixBase, BIAS::HomgPlane3D
  • SetFx() : BIAS::KMatrix
  • SetFy() : BIAS::KMatrix
  • SetGain() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye, BIAS::MDcam
  • SetGamma() : CuEye
  • SetGammaMode() : BIAS::VideoSource_DCAM
  • SetGenerateNewUIDs() : BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk
  • SetGlobalDebugLevel() : BIAS::Debug
  • SetGradGaussRatio() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • SetGradGaussSigma() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • SetGradientType() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • SetGroupName() : BIAS::Param
  • SetHalfWinSize() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • SetHiddenFlag() : BIAS::Param
  • SetHistCount() : BIAS::Histogram
  • SetHomography() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • SetHue() : CuEye
  • SetHx() : BIAS::KMatrix
  • SetHy() : BIAS::KMatrix
  • SetIdentifier() : BIAS::Projection
  • SetIdentity() : BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >
  • SetImageCenter() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • SetImageMem() : CuEye
  • SetImagePos() : CuEye
  • SetImages() : MainFrame
  • SetImageSize() : CuEye, BIAS::ProjectionParametersBase
  • SetImportanceSampleFraction() : BIAS::Condensation
  • SetInstance() : BIAS::LogFacility
  • SetInterleaved() : BIAS::ImageBase
  • setjmp_buffer : my_error_mgr
  • SetK() : BIAS::Camera< StorageType >, BIAS::ProjectionParametersPerspective
  • SetKeepAll() : BIAS::CScommBase
  • SetKeepFPS() : BIAS::VideoSource_Disk
  • SetKernel() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • SetKernelSize() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • SetKnotPoints() : BIAS::Interpolator
  • SetLadybugCenters() : BIAS::RigParameter
  • SetLambda() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetLeftTop() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM
  • SetLog() : BIAS::CScommBase
  • SetLogLevel() : BIAS::LogFacility
  • SetLogOut() : BIAS::CScommBase
  • SetLogStream() : BIAS::LogFacility
  • SetLoopMode() : BIAS::VideoSource_Disk
  • SetLowPassType() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • SetMainDisplayWindow() : CuEye
  • SetMaskImage() : BIAS::ROI
  • SetMaskValidFlag() : BIAS::ROI
  • SetMatrix() : BIAS::MatrixPanel
  • SetMaxAffineChange() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • SetMaxError() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetMaxIterations() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetMaxNumFeatures() : BIAS::CornerDetectorBase< StorageType >
  • SetMaxResiduumMAD() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • SetMaxSamples() : BIAS::RANSAC< SolutionType >
  • SetMetaData() : BIAS::ImageBase
  • SetMinCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetMinDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetMinSat() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetMinWeight() : BIAS::CondensHisto
  • SetMultiHistogram() : BIAS::CondensHisto
  • SetName() : BIAS::CScommClient
  • SetNormalizedData() : BIAS::MatchDataBase
  • SetObservation() : BIAS::CondensImg
  • SetOffset() : BIAS::ScaledImageCanvas
  • SetOffsetRange() : BIAS::ScaledImageCanvas
  • SetOrder() : BIAS::Polynom
  • SetOrientation() : BIAS::Camera< StorageType >, BIAS::PoseParametrization
  • SetOutsideROIZero() : BIAS::ImageBase
  • SetOwnerframe() : BIAS::OpenGLCanvasBase
  • SetP() : BIAS::Camera< StorageType >, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective
  • SetParamBool() : BIAS::Param
  • SetParamDouble() : BIAS::Param
  • SetParamEnum() : BIAS::Param
  • SetParameterWriteToFile() : BIAS::Param
  • SetParamInt() : BIAS::Param
  • SetParams() : BIAS::ThreeDOut
  • SetParamsCameraScale() : BIAS::ThreeDOut
  • SetParamsCameraStyle() : BIAS::ThreeDOut
  • SetParamsDrawEllipse() : BIAS::ThreeDOut
  • SetParamsPointSize() : BIAS::ThreeDOut
  • SetParamString() : BIAS::Param
  • SetParamVecDbl() : BIAS::Param
  • SetParamVecInt() : BIAS::Param
  • SetPerspective() : BIAS::CameraViewFrustum
  • SetPixel() : BIAS::Image< StorageType >
  • SetPixelClock() : BIAS::VideoSource_uEye, CuEye
  • SetPointAndCovariance() : BIAS::Conic2D
  • SetPose() : BIAS::ProjectionParametersBase, BIAS::Projection
  • SetPoseParametrization() : BIAS::ProjectionParametersBase
  • SetPosition() : BIAS::PoseParametrization
  • SetPredictionOffset() : BIAS::Condensation
  • SetPrincipal() : BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • setPrincipalPoint() : BIAS::CylinderMapping
  • SetProcessMean() : BIAS::Condensation
  • SetProj() : BIAS::Camera< StorageType >
  • SetProjection() : BIAS::ProjectionGUI
  • SetPyramidSize() : BIAS::PyramidImage< StorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • SetQ() : BIAS::SimilarityTransform, BIAS::ProjectionParametersBase, BIAS::Pose, BIAS::CoordinateTransform3D
  • SetQC() : BIAS::ProjectionParametersBase
  • SetQuadricProjection() : BIAS::Conic2D
  • SetR() : BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::CoordinateTransform3D
  • SetRadius() : BIAS::CameraParam, BIAS::ProjectionParametersSpherical
  • SetRangeInt() : BIAS::Param
  • SetRatio() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • SetRECT() : BIAS::ImageCanvasGLBase
  • SetReferenceHistogram() : BIAS::CondensHisto
  • SetRejectionType() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetRescaleFactor() : BIAS::PyramidImage< StorageType >
  • SetROI() : BIAS::PyramidImage< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::ImageBase
  • SetROI1() : BIAS::ColorMultiHistogram< StorageType >
  • SetROI2() : BIAS::ColorMultiHistogram< StorageType >
  • SetROICorners() : BIAS::ImageBase
  • SetRotation() : BIAS::RigParameter
  • SetRow() : BIAS::Matrix< T >
  • SetSampleCount() : BIAS::RANSAC< SolutionType >
  • SetSaturation() : CuEye
  • SetScale() : BIAS::ScaledImageCanvas
  • SetScaledImageSize() : BIAS::ImageCanvas
  • SetScaler() : CuEye
  • SetScaleRange() : BIAS::ScaledImageCanvas
  • SetScaleYToMaxEntry() : BIAS::Histogram
  • SetScrollPos() : CuEye
  • SetSecondOrderScale() : BIAS::CondensHisto
  • SetSensorCenter() : BIAS::RigParameter
  • SetSensorRotation() : BIAS::RigParameter
  • SetShortCommand() : BIAS::Param
  • SetShowCodeInfo() : BIAS::LogFacility
  • SetShowScaled() : BIAS::ImageCanvas
  • SetShutter() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • SetSigma() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • SetSinkCam() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • SetSize() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource, BIAS::CameraParam, BIAS::CameraViewController, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >
  • SetSizeAndColorModel() : BIAS::VideoSource_DSHOW
  • SetSkew() : BIAS::KMatrix
  • SetSourceCam() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • SetStartPos() : BIAS::CameraViewController
  • SetStartTangent() : BIAS::Interpolator
  • SetStatusBarPtr() : BIAS::ScaledImageCanvas
  • SetStatusText() : BIAS::OpenGLCanvasBase, BIAS::ScaledImageCanvas
  • SetStructureTensorHalfWinSize() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetSubpixelAccuracy() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetTarget2D() : BIAS::ImgObjGL
  • SetTargetPOW2() : BIAS::ImgObjGL
  • SetTargetRECT() : BIAS::ImgObjGL
  • SetTime() : BIAS::Camera< StorageType >
  • SetTimerFile() : BIAS::TimeMeasure
  • SetTitle() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • SetTrackerType() : BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetTransform() : CutoutFrame
  • SetUID() : BIAS::PyramidImage< StorageType >, BIAS::ImageBase
  • SetUndistortion() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective
  • SetUnzoomed() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • Setup() : BIAS::ZoomFrame
  • setup_ : BIAS::JpegHandler
  • SetupLutPerspPxPy1() : BIAS::SphericalUndistortion
  • SetupLutPerspPxPy2() : BIAS::SphericalUndistortion
  • SetupLutPxPySphere1() : BIAS::SphericalUndistortion
  • SetupLutPxPySphere2() : BIAS::SphericalUndistortion
  • SetupProjectionLUT() : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • SetUseEvenLines() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetUUIDRaw() : BIAS::UUID
  • SetValueAsAxisRad() : BIAS::Quaternion< QUAT_TYPE >
  • SetVector() : BIAS::VectorPanel, BIAS::ROI
  • SetVectorValidFlag() : BIAS::ROI
  • SetVerbose() : BIAS::CScommBase
  • SetVerboseOut() : BIAS::CScommBase
  • SetVSync() : BIAS::OpenGLCanvasBase
  • SetVSyncInterval() : BIAS::SettingsGL
  • SetW() : BIAS::Vector2< T >
  • SetWaitForNew() : BIAS::VideoSource_V4L
  • SetWhiteBalance() : BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye
  • SetWhiteBalanceMultipliers() : CuEye
  • SetWriteOptions() : BIAS::Param
  • SetWriteViewpoints() : BIAS::ThreeDOut
  • SetX() : BIAS::Vector2< T >
  • SetXYZ() : BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >, BIAS::EuclideanTransf3D
  • SetY() : BIAS::Vector2< T >
  • SetZero() : BIAS::PyramidImage< StorageType >, BIAS::FilterMask, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Matrix< T >, BIAS::ImageBase
  • SetZeroLevel() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • SetZoom() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ZoomFrame, BIAS::ProjectionParametersZoom
  • SetZoomCamera() : BIAS::CameraParam
  • SetZoomed() : BIAS::ImageCanvas
  • SetZYX() : BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >
  • SevenPoint() : BIAS::FMatrixEstimation
  • shademodel : BIAS::RenderModeGL
  • Sharpen : CameraParameter_s
  • SharpenChanged : CameraParameter_s
  • Shift16_ : BIAS::VideoSource_DCAM
  • shift_ : BIAS::ColorHistogram< StorageType >
  • shiftLum_ : BIAS::ColorHistogram< StorageType >
  • shiftSat_ : BIAS::ColorHistogram< StorageType >
  • Shm_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • ShmContext_ : BIAS::VideoShMFeeder
  • ShmFeeder : MyFrame
  • ShmNames : MyFrame
  • ShmPrefix : MyFrame
  • ShortCmd_ : BIAS::ParamTypeBase
  • Show() : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • ShowCapabilities() : BIAS::VideoSource_V4L, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • ShowConvertedImage_() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • ShowData() : BIAS::Param
  • ShowFPS() : BIAS::OpenGLCanvasBase
  • ShowImage() : CutoutFrame, BIAS::GuiBase
  • ShowImg_ : MyFrame
  • ShowMouse_ : BIAS::GuiBase
  • ShowScaled_ : BIAS::ImageCanvas
  • ShowValue() : BIAS::OpenGLCanvasBase
  • Shutter : CameraParameter_s
  • ShutterChanged : CameraParameter_s
  • SimilarityTransform() : BIAS::SimilarityTransform
  • SimpleGreyValidFloat_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • SimpleGreyValidInt_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • SINE_LAW : BIAS::SphericalUndistortion
  • SingleLine : BIAS::Conic2D
  • SinkP_ : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • size : BIAS::SVD, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >, BIAS::CameraViewController
  • Size() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Size_ : BIAS::VideoSource_Shm::ShmImageHeader
  • size_type : TNT::Vector< T >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Matrix< T >
  • SliderGain_ : MyFrame
  • SliderShutter_ : MyFrame
  • SLScale_ : BIAS::ZoomFrame
  • Sobel3x3GreySameFloat_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • Sobel3x3GreyValidFloat_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • Sobel3x3GreyValidInt_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • SoftwareWhiteBalance() : BIAS::VideoSource
  • solve() : BIAS::SVD
  • Solve() : BIAS::SVD, BIAS::PolynomialSolve, BIAS::LeastSquaresSVD, BIAS::LeastSquaresLapack, BIAS::LeastSquaresBase, BIAS::GaussHelmert
  • SolveMaster() : BIAS::RANSACPreKnowledge< SolutionType >, BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >
  • SortVec_ : BIAS::Label
  • SourceP_ : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • speed : BIAS::DC_GPS
  • Speed : BIAS::DC_inertial
  • SPHERICAL : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • SphericalUndistortion() : BIAS::SphericalUndistortion
  • Spline() : BIAS::Interpolator
  • SplineFromLuT() : BIAS::Interpolator
  • SplineLuT1_ : BIAS::Interpolator
  • SplitImage_() : BIAS::ImageConvertThreaded
  • SplitIntoFiles() : BIAS::VideoStream
  • Sqrt() : BIAS::SVD
  • SqrtT() : BIAS::SVD
  • SquaredSum_ : BIAS::Distribution
  • src : ThreadArg__
  • SSD() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • ST_char : BIAS::ImageBase
  • ST_double : BIAS::ImageBase
  • ST_float : BIAS::ImageBase
  • ST_int : BIAS::ImageBase
  • ST_invalid : BIAS::ImageBase
  • ST_shortint : BIAS::ImageBase
  • ST_unsignedchar : BIAS::ImageBase
  • ST_unsignedint : BIAS::ImageBase
  • ST_unsignedshortint : BIAS::ImageBase
  • stag : BIAS::AppData
  • start() : TNT::stopwatch
  • Start : BIAS::TimeMeasurement, BIAS::TimeMeasure, BIAS::Line3DData
  • Start_ : BIAS::EpipolarLine
  • StartGrabContinous() : BIAS::VideoSource_V4L, BIAS::VideoSource
  • StartIso() : BIAS::VideoSource_DCAM
  • startpos : BIAS::CameraViewController
  • startposExt : BIAS::CameraViewController
  • startposInt : BIAS::CameraViewController
  • StartReadTimeStamp : BIAS::DC_ptu
  • startTangentX_ : BIAS::Interpolator
  • startTangentY_ : BIAS::Interpolator
  • startTangentZ_ : BIAS::Interpolator
  • startx : xvimage
  • starty : xvimage
  • State_ : BIAS::Kalman
  • stateDim_ : BIAS::Condensation
  • StatekeeperGL() : BIAS::StatekeeperGL
  • StaticLabel_ : MainFrame
  • Status_ : MIP::VideoSource_DV2
  • StatusBar_ : MyFrame
  • stdFarbRaum : BIAS::ColorSegmentation
  • STDMETHODIMP_() : BIAS::MySampleGrabberCB
  • StealImage() : BIAS::ImageBase
  • SteeringAngle : BIAS::DC_inertial
  • SteeringWheelLever : BIAS::DC_inertial
  • StepsTextCtrl_ : MainFrame
  • STEREOGRAPHIC : BIAS::SphericalUndistortion
  • StereoI_CaptureStereoImage() : BIAS::OpenGLCanvasBase
  • StereoI_GetConvergence() : BIAS::OpenGLCanvasBase
  • StereoI_GetInfo() : BIAS::OpenGLCanvasBase
  • StereoI_GetSeparation() : BIAS::OpenGLCanvasBase
  • StereoI_GetStereoState() : BIAS::OpenGLCanvasBase
  • StereoI_Init() : BIAS::OpenGLCanvasBase
  • StereoI_SetConvergence() : BIAS::OpenGLCanvasBase
  • StereoI_SetSeparation() : BIAS::OpenGLCanvasBase
  • StereoI_SetStereoState() : BIAS::OpenGLCanvasBase
  • StereoRedGreen() : BIAS::StereoRedGreen
  • Stop() : BIAS::TimeMeasure
  • stop() : TNT::stopwatch
  • StopGrabContinous() : BIAS::VideoSource_V4L, BIAS::VideoSource
  • StopIso() : BIAS::VideoSource_DCAM
  • StopLiveVideo() : CuEye
  • StopReadTimeStamp : BIAS::DC_ptu
  • stopstruct : BIAS::TimeMeasure
  • stopwatch() : TNT::stopwatch
  • StopWatch_ : MyFrame
  • StorageType : BIAS::VideoStream::VSHeader
  • StorageType_ : BIAS::ImageBase
  • stringData : BIAS::CScommMsg
  • StructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • su_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Sub() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • SubIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • subrow_size : xvimage
  • SubVec() : BIAS::Vector< T >
  • Sum_ : BIAS::Distribution
  • sumOfImportanceWeights_ : BIAS::Condensation
  • sumOfWeights_ : BIAS::Condensation
  • SupportedFeature_ : BIAS::VideoSource_DCAM
  • SupportedFormats_ : BIAS::VideoSource_DCAM
  • SupportedFramerates_ : BIAS::VideoSource_DCAM
  • SupportedModes_ : BIAS::VideoSource_DCAM
  • SVD() : BIAS::SVD
  • SVD3x3() : BIAS::SVD3x3
  • Svd_ : BIAS::PMatrix
  • svd_ : BIAS::Kalman
  • SwapBuffers() : BIAS::OpenGLCanvasBase
  • Sym_ : BIAS::EpipolarLine
  • syncReceive_() : BIAS::CScommBase
  • SystemStateDim_ : BIAS::Kalman
  • szName : tagTHREADNAME_INFO
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- t -

  • T : TNT::Vector_Adaptor< BBVec >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • T_ : BIAS::Interpolator
  • tag : BIAS::AppData, TagInfo
  • Talk() : BIAS::CoordinateTransform3D
  • TAppData : BIAS::AppData
  • target : BIAS::ImgObjGL
  • targetAddress_ : BIAS::VideoServer
  • tb_ : BIAS::Tracker< StorageType, CalculationType >
  • TBH_full : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TBH_same : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TBH_valid : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TBorderHandling : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TempomatLever : BIAS::DC_inertial
  • Tensor3D() : BIAS::Tensor3D< T >
  • Tensor3D3x3x3() : BIAS::Tensor3D3x3x3< T >
  • terminateListener_ : BIAS::CScommServer
  • terminateReceiver_ : BIAS::CScommBase
  • TestImage_() : BIAS::GuiGTK, BIAS::GuiBase
  • texCoordSet : BIAS::IndexedFaceSet
  • texobj : BIAS::ImageCanvasGLBase
  • Text() : BIAS::ImageDraw< StorageType >
  • texture : BIAS::IndexedFaceSet
  • texture_ : BIAS::TriangleMesh
  • textureCoords_ : BIAS::TriangleMesh
  • textureName : BIAS::IndexedFaceSet
  • TFileFormat : BIAS::ImageIO
  • TFTensorEstimation() : BIAS::TFTensorEstimation
  • thedata : myTestClass
  • theID_ : BIAS::UUID
  • Theta() : BIAS::Vector3< T >
  • ThreadCondition_ : BIAS::VideoSource_V4L
  • threaded_ : BIAS::CScommBase
  • threadid : BIAS::CScommData
  • ThreadInitialized_ : BIAS::GuiWX
  • ThreadsInitialized_ : BIAS::GuiGTK
  • ThreeDOut() : BIAS::ThreeDOut
  • ThreeDOutParameters() : BIAS::ThreeDOutParameters
  • TiltPos : BIAS::DC_ptu
  • time : BIAS::OpenGLCanvasBase
  • Time_ : BIAS::VideoSource_Shm::ShmImageHeader
  • TimeMeasure() : BIAS::TimeMeasure
  • TimeMeasurement() : BIAS::TimeMeasurement
  • timeOut_ : BIAS::CScommBase
  • timeOutFlag_ : BIAS::CScommBase
  • Timer_ : MyFrame, MainFrame
  • timer_ : BIAS::VideoSource_Disk, BIAS::TimeMeasurement
  • TimerStream_ : BIAS::TimeMeasure
  • TimeSec_ : BIAS::Camera< StorageType >
  • TimeStamp : BIAS::DC_ptu
  • TimeUSec_ : BIAS::Camera< StorageType >
  • TimeValid_ : BIAS::Camera< StorageType >
  • Title_ : BIAS::ImageCanvas, BIAS::ZoomFrame, BIAS::GuiBase
  • tl : SegmentationData, BIAS::CCAStruct
  • TmpWxImg_ : BIAS::GuiWX
  • TO_SPHERE : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • ToggleFullScreen() : BIAS::OpenGLCanvasBase
  • ToggleIP() : BIAS::OpenGLCanvasBase
  • ToggleVSync() : BIAS::OpenGLCanvasBase
  • ToGrey() : BIAS::ImageConvert
  • ToHSL() : BIAS::ImageConvert
  • TohsL() : BIAS::ImageConvert
  • ToHSV() : BIAS::ImageConvert
  • ToInterleaved() : BIAS::ImageConvert
  • ToInterleavedRGB() : BIAS::ImageConvert
  • ToInterleavedRGB_() : BIAS::ImageConvert
  • ToInterleavedYUYV422_() : BIAS::ImageConvert
  • Top : BIAS::HomgPoint2D
  • top : BIAS::CameraViewFrustum
  • Top_ : BIAS::VideoSource_DCAM
  • TopFrame : BIAS::TopFrame, BIAS::GuiWX
  • ToPlanar() : BIAS::ImageConvert
  • ToPlanarRGB_() : BIAS::ImageConvert
  • ToPlanarYUYV422_() : BIAS::ImageConvert
  • TopLeft : BIAS::HomgPoint2D
  • TopLeft_ : BIAS::ImageCanvasEnhanced
  • TopLefts_ : BIAS::Label
  • ToplevelWindow_ : MyApp
  • TopRight : BIAS::HomgPoint2D
  • ToRGB() : BIAS::ImageConvert
  • total : TNT::stopwatch
  • TotalLength_ : BIAS::VideoSource_Shm
  • ToVector() : BIAS::Tensor3D< T >
  • Trace() : BIAS::CovMatrix3x3, BIAS::Matrix3x3< T >, BIAS::Matrix< T >
  • Track() : BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • Track_() : BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBaseSimple< StorageType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBaseAffine< StorageType >
  • TrackAffine_() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • Tracker() : BIAS::Tracker< StorageType, CalculationType >
  • TrackerBase() : BIAS::TrackerBase< StorageType >
  • TrackerBaseAffine() : BIAS::TrackerBaseAffine< StorageType >
  • TrackerBaseInterface() : BIAS::TrackerBaseInterface< StorageType >
  • TrackerBaseSimple() : BIAS::TrackerBaseSimple< StorageType >
  • TrackerBaseWeighted() : BIAS::TrackerBaseWeighted< StorageType >
  • TrackerSynth() : BIAS::TrackerSynth< StorageType, CalculationType >
  • Tracks_ : BIAS::TrackerSynth< StorageType, CalculationType >
  • TrackSimple_() : BIAS::TrackerBase< StorageType >
  • TrackWeighted_() : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBase< StorageType >
  • TransfCoordCalibImage2Sphere_() : BIAS::ProjectionParametersSpherical
  • TransfCoordImage2Sphere() : BIAS::SphericalUndistortion
  • TransfCoordImage2Sphere_() : BIAS::ProjectionParametersSpherical
  • TransfCoordRotateSphere2Image() : BIAS::SphericalUndistortion
  • TransfCoordRotateSphere2Image_() : BIAS::ProjectionParametersSpherical
  • TransfCoordSphere2CalibImage() : BIAS::SphericalUndistortion
  • TransfCoordSphere2CalibImage_() : BIAS::ProjectionParametersSpherical
  • TransfCoordSphere2Image() : BIAS::SphericalUndistortion
  • TransfCoordSphere2Image_() : BIAS::ProjectionParametersSpherical
  • TransferView3() : BIAS::TrifocalTensor
  • Transform() : BIAS::UnscentedTransform, BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >, BIAS::PoseParametrizationCovariance, BIAS::PoseParametrization
  • Transform_() : BIAS::UnscentedTransform, MyUnscentedTransform, BIAS::ProjectionParametersBase
  • TransformAbs() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformedCurrent_ : BIAS::EpipolarLine
  • TransformedEnd_ : BIAS::EpipolarLine
  • TransformedStart_ : BIAS::EpipolarLine
  • TransformLogAbs() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformPhase() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformReverse() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformToNewGlobalBy() : BIAS::Pose
  • TransmissionTime_ : BIAS::VideoSource_DCAM
  • Transpose() : BIAS::FilterMask, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >
  • Transpose_View() : TNT::Transpose_View< Array2D >
  • transposed() : BIAS::Vector4< T >
  • TransposedMult() : BIAS::Matrix3x3< T >
  • TransposeIP() : BIAS::Matrix4x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >
  • trash : xvimage
  • triangleIndices_ : BIAS::TriangleMesh
  • Triangulate() : BIAS::Triangulation
  • Triangulate2D() : BIAS::Triangulation
  • TriangulateLinear() : BIAS::Triangulation
  • Triangulation() : BIAS::Triangulation
  • TrifocalTensor() : BIAS::TrifocalTensor
  • TrifocalTensorBase() : BIAS::TrifocalTensorBase
  • Trigger_ : BIAS::VideoSource_DCAM
  • tsec : BIAS::VideoStream::VSImageHeader
  • tusec : BIAS::VideoStream::VSImageHeader
  • type : Vardesc
  • Type_ : BIAS::EpipolarLine
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- u -

  • U_ : BIAS::SVD
  • ubound() : TNT::Index1D
  • ubound_ : TNT::Index1D
  • ucim_ : BIAS::ScaledImageCanvas, BIAS::ZoomImageCanvas
  • ucImage_ : MainFrame
  • UDPServerThrottle_ : BIAS::VideoServer
  • ul : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • UL : BIAS::Image3DData, BIAS::PMatrix3DData
  • UNDEF : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • UndistCoeff : BIAS::PMDImageMetaData
  • Undistort() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • UndistortFast() : BIAS::MatlabTBUndistortion
  • UndistortionMapping() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • UndistortPerspImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • UniqueSortedGroups() : BIAS::Param
  • UnitHeight_ : BIAS::VideoSource_DCAM
  • UnitLowerTriangularView() : TNT::UnitLowerTriangularView< MaTRiX >
  • UnitUpperTriangularView() : TNT::UnitUpperTriangularView< MaTRiX >
  • UnitWidth_ : BIAS::VideoSource_DCAM
  • Unknown : BIAS::Conic2D
  • Unproject() : BIAS::OpenGLCanvasBase
  • UnProjectLocal() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • UnProjectToCovLocal() : BIAS::Projection
  • UnProjectToPoint() : BIAS::Projection
  • UnProjectToPointLocal() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersBase, BIAS::Projection
  • UnProjectToRay() : BIAS::ProjectionParametersBase, BIAS::Projection
  • UnProjectToRayLocal() : BIAS::Projection
  • UnscentedTransform() : BIAS::UnscentedTransform
  • UnsetROI() : BIAS::ROI, BIAS::ImageBase
  • unVigImage_ : MainFrame
  • UnVignette() : MainFrame, BIAS::UnVignette
  • UnVignette_ : MainFrame
  • up : BIAS::CameraViewExternals
  • Up : BIAS::PMatrix3DData
  • Update() : BIAS::Kalman, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • UpdateDisplay() : CuEye
  • UpdateEllipsoid() : BIAS::ThreeDOut
  • UpdateGUI() : BIAS::ProjectionGUI
  • UpdateImageDataArrayFromImageData_() : BIAS::ImageBase
  • UpdateLine() : BIAS::ThreeDOut
  • UpdateLowpass() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpdateMatrix_() : BIAS::CoordinateTransform3D
  • UpdateMetaData() : BIAS::Camera< StorageType >
  • UpdateParameter() : BIAS::Param
  • UpdatePMatrix() : BIAS::ThreeDOut
  • UpdatePMatrixColor() : BIAS::ThreeDOut
  • UpdatePoint() : BIAS::ThreeDOut
  • UpdatePyramidSize() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • UpdateScaleOffset() : BIAS::ScaledImageCanvas
  • UpdateStatusBar() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • UpdateTime() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas
  • UpperLeftX_ : BIAS::ROI
  • UpperLeftY_ : BIAS::ROI
  • upperTriangle() : BIAS::Cholesky
  • UpperTriangularView() : TNT::UpperTriangularView< MaTRiX >
  • Upsample() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2RGBInterleaved() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleGrey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • ur : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • UR : BIAS::Image3DData, BIAS::PMatrix3DData
  • Usage() : BIAS::Param
  • UseBinning_ : BIAS::VideoSource_DCAM
  • UseChannel() : MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • UseCoarserPointIfLost_ : BIAS::Tracker< StorageType, CalculationType >
  • UseDirectNeighbors() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • useDirectNeighbors_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • UseDMA_ : BIAS::VideoSource_DCAM
  • UseIntegralHistogram() : BIAS::CondensHisto
  • useMultiHistogram_ : BIAS::CondensHisto
  • user : BIAS::TimeMeasure
  • UserGuesses_ : BIAS::RANSACPreKnowledge< SolutionType >
  • UserSizeToFormat7_() : BIAS::VideoSource_DCAM
  • UserSizeToMode() : BIAS::VideoSource_DCAM
  • UserTopLeft_ : BIAS::VideoSource_DCAM
  • UseTCP_ : BIAS::VideoSource_Net
  • useUDP_ : BIAS::VideoServer
  • ustIgnoreDistortion_ : BIAS::ProjectionParametersBase
  • ustTransformIntoImage_ : BIAS::ProjectionParametersBase
  • uuid : BIAS::VideoStream::VSImageHeader
  • UUID() : BIAS::UUID
  • ux_ : BIAS::ColorHistogram< StorageType >
  • uy_ : BIAS::ColorHistogram< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- v -

  • V : BIAS::Projection3DData
  • V0_ : BIAS::PMatrix
  • v_ : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • val : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >, BIAS::Feat, option
  • val_ : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >
  • validate() : BIAS::Interpolator
  • ValidTexobj() : BIAS::ImageCanvasGLBase
  • value : BIAS::ExifTag
  • value_ : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool
  • value_type : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • vars : Namelist
  • Vbox_ : BIAS::GuiGTK
  • VecLen() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenL1() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenL2() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenMax() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • vecParameters_ : BIAS::Projection
  • Vector() : BIAS::Vector< T >, TNT::Vector< T >
  • Vector2() : BIAS::Vector2< T >
  • Vector2Corners() : BIAS::ROI
  • Vector2Mask() : BIAS::ROI
  • Vector3() : BIAS::Vector3< T >
  • Vector4() : BIAS::Vector4< T >
  • Vector_ : BIAS::ROI
  • Vector_Adaptor() : TNT::Vector_Adaptor< BBVec >
  • VectorPanel() : BIAS::VectorPanel
  • VectorValid() : BIAS::ROI
  • VectorValid_ : BIAS::ROI
  • VehicleFlags : BIAS::DC_inertial
  • verbose_ : BIAS::CScommBase
  • verboseOut_ : BIAS::CScommBase
  • version : xvimage
  • Version_ : BIAS::ROI, BIAS::ImageBase
  • vertexNormals_ : BIAS::TriangleMesh
  • vertexSet : BIAS::IndexedFaceSet
  • VideoServer() : BIAS::VideoServer
  • VideoShMFeeder() : BIAS::VideoShMFeeder
  • VideoSource() : BIAS::VideoSource
  • VideoSource_DCAM() : BIAS::VideoSource_DCAM
  • VideoSource_Disk() : BIAS::VideoSource_Disk
  • VideoSource_DiskPMD() : BIAS::VideoSource_DiskPMD
  • VideoSource_DSHOW() : BIAS::VideoSource_DSHOW
  • VideoSource_DV() : MIP::VideoSource_DV
  • VideoSource_DV2() : MIP::VideoSource_DV2
  • VideoSource_DV_Internal_Init_() : MIP::VideoSource_DV
  • VideoSource_Net() : BIAS::VideoSource_Net
  • VideoSource_Shm() : BIAS::VideoSource_Shm
  • VideoSource_Stereo() : BIAS::VideoSource_Stereo
  • VideoSource_uEye() : BIAS::VideoSource_uEye
  • VideoSource_V4L() : BIAS::VideoSource_V4L
  • VideoStream() : BIAS::VideoStream
  • viewAt : BIAS::CameraViewExternals
  • ViewDifference() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • viewport : BIAS::CameraViewInternals
  • VignettePercentage_ : MainFrame
  • VLT_L1 : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VLT_L2 : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VLT_max : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • vm1_ : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >
  • VRMLOut() : BIAS::ThreeDOut
  • VRMLOutEllipsoids() : BIAS::ThreeDOut
  • VRMLOutImages() : BIAS::ThreeDOut
  • VRMLOutIndexedFaceSets() : BIAS::ThreeDOut
  • VRMLOutLines() : BIAS::ThreeDOut
  • VRMLOutPMatrices() : BIAS::ThreeDOut
  • VRMLOutPMatricesAsArrows_() : BIAS::ThreeDOut
  • VRMLOutPMatricesAsMesh_() : BIAS::ThreeDOut
  • VRMLOutPoints() : BIAS::ThreeDOut
  • VRMLOutPointsAsBoxes_() : BIAS::ThreeDOut
  • VRMLOutPointsAsPointSet_() : BIAS::ThreeDOut
  • VRMLOutPointsAsSpheres_() : BIAS::ThreeDOut
  • VRMLOutProjection() : BIAS::ThreeDOut
  • VRMLOutWriteHeader() : BIAS::ThreeDOut
  • VRMLOutWriteNavigationInfo() : BIAS::ThreeDOut
  • VRMLOutWriteViewpoint() : BIAS::ThreeDOut
  • VRMLtransparency() : BIAS::ThreeDOut
  • vsd_ : BIAS::VideoSource_DiskPMD
  • vsync : BIAS::RenderModeGL
  • VT_ : BIAS::SVD
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- w -

  • WaitForConnections() : BIAS::CScommServer
  • WaitForEvent() : BIAS::GuiBase
  • WaitForKeyEvent() : BIAS::GuiBase
  • WaitForMouseButtonEvent() : BIAS::GuiBase
  • waitForNew_ : BIAS::VideoSource_V4L
  • WaitForNewMessage() : BIAS::CScommBase
  • WaitKey() : BIAS::WrapBias2Ipl
  • weight : BIAS::SphericalUndistortion::LuTEntry, BIAS::MatlabTBUndistortion::LuTEntry
  • weight_cov : BIAS::WeightedSigmaPoint
  • weight_mean : BIAS::WeightedSigmaPoint
  • WeightedSolve() : BIAS::LeastSquaresSVD, BIAS::LeastSquaresLapack, BIAS::LeastSquaresBase
  • What() : BIAS::BaseException
  • wheight_ : BIAS::ZoomImageCanvas
  • WhiteBalance : CameraParameter_s
  • WhiteBalanceButton_ : MyFrame
  • WhiteBalanceChanged : CameraParameter_s
  • WhiteBalanceOnePush : CameraParameter_s
  • Who() : Base
  • WholePlane : BIAS::Conic2D
  • widget : BIAS::ItemAndWidget
  • WidgetIDs_ : BIAS::ParamGUIPanel
  • width : BIAS::CameraViewport, BIAS::PMDImageMetaData
  • Width : BIAS::VideoStream::VSHeader
  • Width_ : BIAS::VideoSource, BIAS::GuiBase, BIAS::EpipolarLine, BIAS::ImageBase
  • width_ : BIAS::CameraParam, BIAS::BackwardMapping< InputStorageType, OutputStorageType >, BIAS::ImageCanvas, BIAS::CameraData, BIAS::ProjectionParametersBase
  • widthBrutto : BIAS::ImgObjGL
  • widthOrig : BIAS::ImgObjGL
  • WidthStep_ : BIAS::ImageBase
  • Window_ : BIAS::ZoomFrame, BIAS::GuiGTK
  • WindowCount_ : BIAS::GuiGTK
  • WindowCounter_ : BIAS::GuiWX
  • WindowCountMutex_ : BIAS::GuiGTK
  • WindowCreated_ : BIAS::GuiBase
  • WrapBias2Ipl : BIAS::WrapBias2Ipl, BIAS::ImageBase
  • write() : BIAS::XMLIO
  • Write() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::PMDImageProc, BIAS::PMDImageIO, BIAS::ImageIO
  • Write2DImage16Bit_() : BIAS::PMDImageIO
  • Write2DImage8Bit_() : BIAS::PMDImageIO
  • WriteAscii() : BIAS::MetaData
  • WriteASCII() : BIAS::Histogram2D, BIAS::Histogram
  • WriteBinary() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ROI, BIAS::MetaData
  • WriteCAHV_10() : BIAS::PMatrix
  • WriteCameraData() : MainFrame, BIAS::CameraParam, BIAS::ProjectionParametersIO
  • WriteComments_ : BIAS::Param
  • WriteCorrespondences() : BIAS::GenGroundTruth
  • WriteData() : BIAS::GenSynthMatches
  • WriteDepthImage_() : BIAS::PMDImageIO
  • WriteDigitalPort() : CuEye
  • WriteDirect_() : BIAS::VideoSource
  • WriteEEPROM() : CuEye
  • WriteEnhanced_ : BIAS::Param
  • WriteImages() : BIAS::PyramidImage< StorageType >
  • WriteIndent_ : BIAS::Param
  • WriteJPEG() : BIAS::JpegHandler
  • WriteMetaData_() : BIAS::PMDImageIO
  • WriteModCoeffImage_() : BIAS::PMDImageIO
  • writeOutTexture : BIAS::IndexedFaceSet
  • WriteParameter() : BIAS::Param
  • WriteParameterXML() : BIAS::Param
  • WriteRigData() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • WriteRunMe() : BIAS::Param
  • WriteToFile_ : BIAS::ParamTypeBase
  • WriteToString() : BIAS::XMLIO
  • WriteTrackFile() : BIAS::Tracker< StorageType, CalculationType >
  • WriteTrackLog_() : BIAS::Tracker< StorageType, CalculationType >
  • WriteUnbuffered() : BIAS::ImageIO
  • WriteViewpoints_ : BIAS::ThreeDOut
  • WriteWorldPoints() : BIAS::GenGroundTruth
  • wwidth_ : BIAS::ZoomImageCanvas
  • wxbitmap_mutex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • wximage_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • WxInitialized : BIAS::GuiWX
  • WxMainLoop_ : BIAS::GuiWX
  • WxMainThread : BIAS::WxMainThread, BIAS::GuiWX
  • WxToAsciiArray() : BIAS::WxToAsciiArray
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- x -

  • x : BIAS::CCAStruct, BIAS::cornerstruct, BIAS::Feat, BIAS::Position
  • x0 : BIAS::CameraViewport
  • X_ : BIAS::UnVignette
  • x_floor : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • x_floor_end : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • XBinCount_ : BIAS::Histogram2D
  • XBinSize_ : BIAS::Histogram2D
  • XCenter_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • xCoeff_ : BIAS::BSplineCurve
  • XMaxBinVal_ : BIAS::Histogram2D
  • XMinBinVal_ : BIAS::Histogram2D
  • XMLAdd() : BIAS::XMLBase
  • xmlDoc_ : BIAS::XMLIO
  • XMLGetClassName() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLIn() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLIO() : BIAS::XMLIO
  • XMLOut() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLRead() : BIAS::XMLBase
  • XMLReadFromString() : BIAS::XMLBase
  • XMLWrite() : BIAS::XMLBase
  • XMLWriteToString() : BIAS::XMLBase
  • XOffset_ : BIAS::GuiBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

Here is a list of all class members with links to the classes they belong to:

- y -

  • y : BIAS::CCAStruct, BIAS::cornerstruct, BIAS::Feat, BIAS::Position
  • y0 : BIAS::CameraViewport
  • Y_ : BIAS::UnVignette
  • y_floor : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • y_floor_end : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Yaw : BIAS::DC_inertial
  • yawRateOffset : BIAS::DC_GPS
  • YawRateOffset : BIAS::DC_inertial
  • YawRateRaw : BIAS::DC_inertial
  • YBinCount_ : BIAS::Histogram2D
  • YBinSize_ : BIAS::Histogram2D
  • YCenter_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • yCoeff_ : BIAS::BSplineCurve
  • YMaxBinVal_ : BIAS::Histogram2D
  • YMinBinVal_ : BIAS::Histogram2D
  • YOffset_ : BIAS::GuiBase
  • YUV420PToGrey_() : BIAS::ImageConvert
  • YUV420PToRGB_() : BIAS::ImageConvert
  • YUV422ToGrey_() : BIAS::ImageConvert
  • YUV422ToRGB_() : BIAS::ImageConvert
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Enumerations

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions

  • ConicType : BIAS::Conic2D
  • E_ParametrizationType : BIAS::PMatrixBase
  • ECDType : BIAS::CornerDetectorBase< StorageType >
  • EColorModel : BIAS::ImageBase
  • ELocation : BIAS::HomgPoint2D
  • EPosition : BIAS::HomgPoint2D
  • EStorageType : BIAS::ImageBase
  • EVecLengthType : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • MapType : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • TAppData : BIAS::AppData
  • TBorderHandling : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TFileFormat : BIAS::ImageIO
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Enumerator

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • h
  • i
  • l
  • m
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • AXIS_AND_ANGLE : BIAS::PMatrixBase
  • AXIS_TIMES_ANGLE : BIAS::PMatrixBase

- b -

  • Bottom : BIAS::HomgPoint2D
  • BottomLeft : BIAS::HomgPoint2D
  • BottomRight : BIAS::HomgPoint2D

- c -

  • CDT_Foerstner : BIAS::CornerDetectorBase< StorageType >
  • CDT_Harris : BIAS::CornerDetectorBase< StorageType >
  • CDT_Invalid : BIAS::CornerDetectorBase< StorageType >
  • CDT_KLT : BIAS::CornerDetectorBase< StorageType >
  • CDT_Laplace : BIAS::CornerDetectorBase< StorageType >
  • CDT_Susan : BIAS::CornerDetectorBase< StorageType >
  • Center : BIAS::HomgPoint2D
  • CM_Bayer_BGGR : BIAS::ImageBase
  • CM_Bayer_GBRG : BIAS::ImageBase
  • CM_Bayer_GRBG : BIAS::ImageBase
  • CM_Bayer_RGGB : BIAS::ImageBase
  • CM_BGR : BIAS::ImageBase
  • CM_BGRA : BIAS::ImageBase
  • CM_DV : BIAS::ImageBase
  • CM_Grey : BIAS::ImageBase
  • CM_GreyA : BIAS::ImageBase
  • CM_HSI_OBS : BIAS::ImageBase
  • CM_HSL : BIAS::ImageBase
  • CM_hsL : BIAS::ImageBase
  • CM_HSV : BIAS::ImageBase
  • CM_invalid : BIAS::ImageBase
  • CM_RGB : BIAS::ImageBase
  • CM_RGBA : BIAS::ImageBase
  • CM_RGBE : BIAS::ImageBase
  • CM_SymTensor2x2 : BIAS::ImageBase
  • CM_UYVY422 : BIAS::ImageBase
  • CM_YUV411 : BIAS::ImageBase
  • CM_YUV420P : BIAS::ImageBase
  • CM_YUV444 : BIAS::ImageBase
  • CM_YUYV422 : BIAS::ImageBase

- d -

  • DoubleLine : BIAS::Conic2D

- e -

  • Ellipse : BIAS::ImageDraw< StorageType >, BIAS::Conic2D
  • Empty : BIAS::Conic2D
  • EQUI_SOLID_ANGLE : BIAS::SphericalUndistortion
  • EQUIDISTANT : BIAS::SphericalUndistortion
  • EULER : BIAS::PMatrixBase

- f -

  • FF_auto : BIAS::ImageIO
  • FF_bmp : BIAS::ImageIO
  • FF_dds : BIAS::ImageIO
  • FF_exr : BIAS::ImageIO
  • FF_jpg : BIAS::ImageIO
  • FF_mip : BIAS::ImageIO
  • FF_pbm : BIAS::ImageIO
  • FF_pgm : BIAS::ImageIO
  • FF_png : BIAS::ImageIO
  • FF_ppm : BIAS::ImageIO
  • FF_raw4096 : BIAS::ImageIO
  • FF_Real32 : BIAS::ImageIO
  • FF_tif : BIAS::ImageIO
  • FF_unknown : BIAS::ImageIO
  • FF_viff : BIAS::ImageIO

- h -

  • Hyperbola : BIAS::Conic2D

- i -

  • Infinity : BIAS::HomgPoint2D
  • InvalidPosition : BIAS::HomgPoint2D

- l -

  • Left : BIAS::HomgPoint2D
  • LOC_LEFT : BIAS::HomgPoint2D
  • LOC_LOWER : BIAS::HomgPoint2D
  • LOC_MIDDLE : BIAS::HomgPoint2D
  • LOC_RIGHT : BIAS::HomgPoint2D
  • LOC_undef : BIAS::HomgPoint2D
  • LOC_UPPER : BIAS::HomgPoint2D

- m -

  • MD_ASCII_DATA : BIAS::AppData
  • MD_CVector : BIAS::AppData
  • MD_Focal_Length : BIAS::AppData
  • MD_GPS_Data : BIAS::AppData
  • MD_HomgPoint2D : BIAS::AppData
  • MD_Inertial_Sensor : BIAS::AppData
  • MD_Invalid : BIAS::AppData
  • MD_KMatrix : BIAS::AppData
  • MD_Orientation : BIAS::AppData
  • MD_PMatrix : BIAS::AppData
  • MD_Projection : BIAS::AppData
  • MD_PTU_Data : BIAS::AppData
  • MD_RMatrix : BIAS::AppData
  • MD_TimeStamp : BIAS::AppData
  • MD_USE_ASCII : BIAS::AppData
  • MD_UUID : BIAS::AppData
  • MIA_ZoomQuitButton : BIAS::ZoomFrame

- p -

  • Parabola : BIAS::Conic2D
  • PERSPECTIVE : BIAS::SphericalUndistortion
  • PERSPECTIVE_DIST : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • PERSPECTIVE_UNDIST : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Point : BIAS::Point3DData, TIntersect, BIAS::Conic2D

- q -

  • QUATERNION : BIAS::PMatrixBase

- r -

  • Right : BIAS::HomgPoint2D

- s -

  • SINE_LAW : BIAS::SphericalUndistortion
  • SingleLine : BIAS::Conic2D
  • SPHERICAL : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • ST_char : BIAS::ImageBase
  • ST_double : BIAS::ImageBase
  • ST_float : BIAS::ImageBase
  • ST_int : BIAS::ImageBase
  • ST_invalid : BIAS::ImageBase
  • ST_shortint : BIAS::ImageBase
  • ST_unsignedchar : BIAS::ImageBase
  • ST_unsignedint : BIAS::ImageBase
  • ST_unsignedshortint : BIAS::ImageBase
  • STEREOGRAPHIC : BIAS::SphericalUndistortion

- t -

  • TBH_full : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TBH_same : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TBH_valid : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • TO_SPHERE : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Top : BIAS::HomgPoint2D
  • TopLeft : BIAS::HomgPoint2D
  • TopRight : BIAS::HomgPoint2D

- u -

  • UNDEF : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Unknown : BIAS::Conic2D

- v -

  • VLT_L1 : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VLT_L2 : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VLT_max : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >

- w -

  • WholePlane : BIAS::Conic2D
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- _ -

  • _AddParam() : BIAS::PyramidImage< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Morphology< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >, BIAS::CornerDetectorHarris< StorageType, CalculationType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _AddParameter() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::MSAC< SolutionType >, BIAS::CornerDetectorSusan< StorageType >, BIAS::CornerDetectorBase< StorageType >
  • _AddUniformDistributedOutliers() : BIAS::GenSynthMatches
  • _AllocInternalMem() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _am_computeIntensityDifferenceAffine() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _am_getGradientWinAffine() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _ApplyMeanFilter() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _AreMovingObjectsVisible() : BIAS::GenSynthMatches
  • _Bilinear() : BIAS::RegionMatcher
  • _BilinearRegion() : BIAS::RegionMatcher
  • _CalcCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _CalculateKernel() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • _CalculateKernels() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _CalculateSampleCount() : BIAS::MSAC< SolutionType >
  • _CalculateTerminateScore() : BIAS::MSAC< SolutionType >
  • _CheckParams() : BIAS::GenSynthMatches
  • _ComputeCornerness() : BIAS::LinearRegionDetector< StorageType, CalculationType >, BIAS::CornerDetectorKLT< StorageType, CalculationType >, BIAS::CornerDetectorHarris< StorageType, CalculationType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >, BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • _CreateCamMovement() : BIAS::GenSynthMatches
  • _CreateLevels() : BIAS::PyramidImage< StorageType >
  • _CreateMoving2DPoints() : BIAS::GenSynthMatches
  • _CreateMoving3DPoints() : BIAS::GenSynthMatches
  • _CreateMovingGT2DPoints() : BIAS::GenSynthMatches
  • _CreateMovingTransforms() : BIAS::GenSynthMatches
  • _CreateStatic2DPoints() : BIAS::GenSynthMatches
  • _CreateStatic3DPoints() : BIAS::GenSynthMatches
  • _CreateStaticGT2DPoints() : BIAS::GenSynthMatches
  • _Decompose() : BIAS::CovMatrix3x3
  • _DeleteInternalMem() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _Draw() : BIAS::GenSynthMatches
  • _EnforceMinimumDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _FillFeatureMap() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _FillInterpolatedColor() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _FillInterpolatedGrey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _GenerateSamplesRandom() : BIAS::MSAC< SolutionType >
  • _GetCoeff() : BIAS::PolynomialSolve
  • _GradientProducts() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _int_to_uchar() : BIAS::CornerDetectorSusan< StorageType >
  • _IsSeen() : BIAS::GenSynthMatches
  • _ParabolaApprox() : BIAS::RegionMatcher
  • _RefineCornerPosition() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _RefineCorners() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _ReleaseHist() : BIAS::Histogram2D
  • _SetCamData() : BIAS::MatchDataBase
  • _SetKernel() : BIAS::Mean< InputStorageType, OutputStorageType >
  • _setup_brightness_lut() : BIAS::CornerDetectorSusan< StorageType >
  • _susan_corners() : BIAS::CornerDetectorSusan< StorageType >
  • _susan_corners_quick() : BIAS::CornerDetectorSusan< StorageType >
  • _SusanReAllocMem() : BIAS::CornerDetectorSusan< StorageType >
  • _Swap() : BIAS::SVD3x3
  • _Transpose() : BIAS::MatchDataBase
  • _UpdateCovWeights() : BIAS::Triangulation
  • _UpdateGrad() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _WriteDebugImage() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _ZeroFeatureMap() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- j -

  • JacobianToMask_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • JpegHandler() : BIAS::JpegHandler
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- k -

  • Kalman() : BIAS::Kalman
  • KeyPressEventCallback_() : BIAS::GuiGTK
  • KFromMeta() : BIAS::PMDImageProc
  • KMatrix() : BIAS::KMatrix
  • KroneckerProduct() : BIAS::Vector< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- l -

  • Label() : BIAS::Label
  • Label4Neighbour() : BIAS::Label
  • Label4Neighbour_() : BIAS::Label
  • LabelExposeCallback_() : BIAS::GuiGTK
  • LabelInit_() : BIAS::Label
  • LabelRelease_() : BIAS::Label
  • lbound() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Index1D, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • LeastSquares_() : BIAS::UnVignette
  • LeastSquaresBase() : BIAS::LeastSquaresBase
  • LeastSquaresLapack() : BIAS::LeastSquaresLapack
  • LeastSquaresSVD() : BIAS::LeastSquaresSVD
  • LeftContravariantContraction1() : BIAS::Tensor3D3x3x3< T >
  • LeftContravariantContraction2() : BIAS::Tensor3D3x3x3< T >
  • LeftContravariantContraction3() : BIAS::Tensor3D3x3x3< T >
  • LeftNullspaceDim() : BIAS::SVD
  • Length() : BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Line() : BIAS::ImageDraw< StorageType >
  • Linear() : BIAS::PolynomialSolve, BIAS::FMatrixEstimation
  • LinearInterpolation() : BIAS::Image< StorageType >
  • LinearRegionDetector() : BIAS::LinearRegionDetector< StorageType, CalculationType >
  • LineGrey() : BIAS::ImageDraw< StorageType >
  • LineMatcherNCC() : BIAS::RegionMatcher
  • LineMatcherSAD() : BIAS::RegionMatcher
  • Load() : BIAS::SimilarityTransform, BIAS::Pose, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::ImageIO, BIAS::PoseParametrization
  • LoadBan() : BIAS::Matrix3x4< T >
  • LoadBBC() : BIAS::PMatrix
  • LoadBOG() : BIAS::PMatrixBase
  • LoadBogK() : BIAS::Matrix3x3< T >
  • LoadBogRC() : BIAS::Matrix3x3< T >
  • LoadBogTC() : BIAS::Vector3< T >
  • LoadImage() : CuEye
  • LoadImageFromList() : MainFrame
  • LoadImages() : MainFrame, MyFrame
  • LoadImagesAndCalculate() : MainFrame
  • LocalToGlobal() : BIAS::CoordinateTransform3D
  • LocatePoint() : BIAS::Quadric3D, BIAS::Conic2D
  • LogFacility() : BIAS::LogFacility
  • logOutPut_() : BIAS::CScommBase
  • LogPolarMapping() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • LogToFileAndReset() : BIAS::TimeMeasure
  • LowerTriangularView() : TNT::LowerTriangularView< MaTRiX >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- m -

  • MainFrame() : MainFrame
  • MakeDistanceImage_() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • MakeSVD_() : BIAS::PMatrix
  • MakeSymmetric_() : BIAS::HomgPoint3DCov
  • Map() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • MapBi_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • MapPerspToSphere() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • MapTri_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Mask2Corners() : BIAS::ROI
  • Mask2Vector() : BIAS::ROI
  • MaskValid() : BIAS::ROI
  • MatchDataBase() : BIAS::MatchDataBase
  • MatlabTBUndistortion() : BIAS::MatlabTBUndistortion
  • Matrix() : TNT::Matrix< T >, BIAS::Matrix< T >
  • Matrix2x2() : BIAS::Matrix2x2< T >
  • Matrix3x3() : BIAS::Matrix3x3< T >
  • Matrix3x4() : BIAS::Matrix3x4< T >
  • Matrix4x4() : BIAS::Matrix4x4< T >
  • MatrixPanel() : BIAS::MatrixPanel
  • MaxMin() : BIAS::Matrix3x3< T >
  • MaxSTValue() : BIAS::Image< StorageType >
  • MDcam() : BIAS::MDcam
  • Mean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • MeasureOverhead() : BIAS::TimeMeasure
  • MeasureProcessorFrequency() : BIAS::TimeMeasure
  • Median() : BIAS::Median< InputStorageType, OutputStorageType >
  • Median1D() : BIAS::Median1D< DataType >
  • MergeImage_() : BIAS::ImageConvertThreaded
  • MetaData() : BIAS::MetaData
  • MinSTValue() : BIAS::Image< StorageType >
  • ModCoeffConvert_() : BIAS::PMDImageProc
  • Morphology() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • MotionTrackballRotation() : BIAS::CameraViewController
  • MotionTranslation() : BIAS::CameraViewController
  • MotionTranslationForward() : BIAS::CameraViewController
  • MouseButtonPressCallback_() : BIAS::GuiGTK
  • MouseButtonReleaseCallback_() : BIAS::GuiGTK
  • MouseMotionCallback_() : BIAS::GuiGTK
  • MoveOrbit() : BIAS::CameraViewController
  • MoveToCenter() : BIAS::CameraViewController
  • MoveToClosestPositionInImage() : BIAS::ImageBase
  • MoveWindow() : BIAS::WrapBias2Ipl
  • MSAC() : BIAS::MSAC< SolutionType >
  • MSecondsToHumanReadable() : BIAS::TimeMeasure
  • Mult() : BIAS::SimilarityTransform, BIAS::Vector3< T >, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::AffineTransf
  • MultIP() : BIAS::Vector3< T >, BIAS::Matrix2x2< T >
  • Multiply() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • MultiplyIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • MultLeft() : BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >
  • MultVec() : BIAS::SimilarityTransform, BIAS::Quaternion< QUAT_TYPE >
  • MyAlgorithm() : MyAlgorithm
  • MyBilinearRegion1_() : BIAS::TrackerBase< StorageType >
  • MyBilinearRegion2_() : BIAS::TrackerBase< StorageType >
  • MyFactory() : MyFactory
  • MyFrame() : MyFrame
  • MyGLCanvas() : MyGLCanvas
  • MyGLCanvas2() : MyGLCanvas2
  • MySampleGrabberCB() : BIAS::MySampleGrabberCB
  • MyTemplate() : MyTemplate< T >
  • MyTestClass() : MyTestClass
  • MyUnscentedTransform() : MyUnscentedTransform
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- n -

  • NCC() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • NCCSearch() : BIAS::CornerMatcher
  • NCCSearchEven() : BIAS::RegionMatcher
  • NCCSearchOdd() : BIAS::RegionMatcher
  • NewCoo() : BIAS::ZoomFrame, BIAS::ZoomImageCanvas
  • NewImage() : BIAS::ZoomFrame, BIAS::ZoomImageCanvas
  • NewSize() : BIAS::Tensor3D3x3x3< T >, BIAS::Tensor3D< T >
  • newsize() : BIAS::PMatrix, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D3x3x3< T >, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::PMatrixBase
  • NewTagsCallback_() : BIAS::PMDImageIO
  • NewTagsInitialize_() : BIAS::PMDImageIO
  • NewZoom() : BIAS::ZoomImageCanvas
  • NonBase() : NonBase
  • NonLinearRefine() : BIAS::PolynomialSolve
  • Normalise_() : BIAS::ColorHistogram< StorageType >
  • Normalization() : BIAS::Normalization
  • Normalize() : BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::Quadric3D, BIAS::PMatrix, BIAS::Conic2D, BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::HomgPlane3D
  • NormalizeCols() : BIAS::Matrix< T >
  • NormalizeColsToOne() : BIAS::Matrix< T >
  • NormalizeMatches() : BIAS::GenGroundTruth
  • NormalizeRows() : BIAS::Matrix< T >
  • NormalizeRowsToOne() : BIAS::Matrix< T >
  • NormFrobenius() : BIAS::Matrix< T >
  • NormL1() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • NormL2() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • NullspaceDim() : BIAS::SVD
  • num_cols() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • num_nonzeros() : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >
  • num_rows() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • Numeric() : BIAS::PolynomialSolve
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- o -

  • offset() : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, BIAS::SphericalUndistortion::LuTEntry, BIAS::MatlabTBUndistortion::LuTEntry, BIAS::DC_GPS
  • OnAbout() : MyFrame, MainFrame, MyFrame
  • OnAutoExposure() : MyFrame
  • OnChar() : BIAS::OpenGLCanvasBase, BIAS::TopFrame
  • OnCheckBox() : BIAS::ParamGUIPanel
  • OnChoice() : BIAS::ParamGUIPanel
  • OnClose() : CutoutFrame, BIAS::ZoomFrame, BIAS::TopFrame
  • OnConfig() : MyFrame
  • OnConfigPin() : MyFrame
  • OnDelay() : MainFrame
  • OnDropFiles() : DragAndDropTarget, BIAS::dndFileTarget
  • OnePushAuto() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • OnePushRunning() : BIAS::VideoSource_DCAM
  • OnErase() : BIAS::ImageCanvas
  • OnEraseBackground() : BIAS::OpenGLCanvasBase
  • OnExit() : MainFrame, BIAS::WxMainThread
  • OnFit() : MainFrame
  • OnGain() : MyFrame
  • OnGrab() : MyFrame
  • OnGrabContinuous() : MyFrame
  • OnIdle() : MainFrame, BIAS::OpenGLCanvas
  • OnInfo() : MainFrame
  • OnInit() : MyApp, BiasViewApp, BiasShowEpiApp, BiasDetectUnvignetteApp, MyApp, ExampleOpenGLCanvasApp, ExampleImageCanvasGLBaseApp, MyApp, ExampleGLSharedApp
  • OnKey() : MyFrame, BIAS::ZoomImageCanvas
  • OnKeyInfo() : MainFrame
  • OnLeaveWindow() : CutoutFrame
  • OnLeftDown() : MainFrame, PlainImageCanvas
  • OnLeftMouse() : BIAS::ZoomImageCanvas
  • OnLeftMouseButton() : BIAS::ImageCanvasEnhanced
  • OnLoad() : MainFrame, BIAS::ProjectionGUI, MyFrame
  • OnLoadImage() : MyFrame
  • OnMetaData() : MainFrame
  • OnModified() : BIAS::ProjectionGUI
  • OnMotion() : CutoutFrame, PlainImageCanvas, BIAS::OpenGLCanvas
  • OnMouseDown() : BIAS::OpenGLCanvas
  • OnMouseLeave() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnMouseMove() : BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnMouseWheel() : BIAS::OpenGLCanvas
  • OnNew() : BIAS::ProjectionGUI
  • OnNext() : MainFrame
  • OnNormalizeQuaternion() : BIAS::ProjectionGUI
  • OnPaint() : BIAS::OpenGLCanvasBase, BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • OnPrev() : MainFrame
  • OnQuit() : MyFrame, BIAS::ZoomFrame, MyFrame
  • OnRect() : MyFrame
  • OnResize() : BIAS::ZoomImageCanvas
  • OnRightDown() : PlainImageCanvas
  • OnRightMouse() : BIAS::ZoomImageCanvas
  • OnRightMouseButton() : BIAS::ImageCanvasEnhanced, BIAS::ImageCanvas
  • OnRunStop() : MainFrame
  • OnSave() : BIAS::ProjectionGUI
  • OnScaleOffset() : BIAS::ScaledImageCanvas
  • OnShutter() : MyFrame
  • OnSize() : MainFrame, BIAS::OpenGLCanvasBase, BIAS::ImageCanvas
  • OnSpinCtrl() : BIAS::ParamGUIPanel
  • OnStepsEnter() : MainFrame
  • OnTestShot() : MyFrame
  • OnTextEnter() : BIAS::ParamGUIPanel
  • OnTimer() : MyFrame, MainFrame
  • OnWhiteBalance() : MyFrame
  • OnZoomFactor() : BIAS::ZoomFrame
  • Open() : BIAS::VideoStream
  • OpenCamera_() : BIAS::VideoSource_uEye
  • OpenDevice() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • OpenGLCanvas() : BIAS::OpenGLCanvas
  • OpenGLCanvasBase() : BIAS::OpenGLCanvasBase
  • OpenGLOut() : BIAS::ThreeDOut
  • OpenGLOutEllipsoids() : BIAS::ThreeDOut
  • OpenGLOutImages() : BIAS::ThreeDOut
  • OpenGLOutLines() : BIAS::ThreeDOut
  • OpenGLOutPMatrices() : BIAS::ThreeDOut
  • OpenGLOutPMatrices_() : BIAS::ThreeDOut
  • OpenGLOutPoints() : BIAS::ThreeDOut
  • OpenLogFile() : BIAS::LogFacility
  • operator *() : TNT::Matrix< T >, BIAS::Matrix3x4< T >, BIAS::Matrix4x4< T >, BIAS::Matrix< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Matrix3x3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >, BIAS::AffineTransf
  • operator *=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator char **() : BIAS::WxToAsciiArray
  • operator!=() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::UUID, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator()() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D< T >, BIAS::UUIDsortAscending
  • operator+() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Image< StorageType >
  • operator+=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator-() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Image< StorageType >
  • operator-=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator/() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >
  • operator/=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Image< StorageType >
  • operator<() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::CCAStruct, BIAS::Feat, BIAS::UUID, BIAS::Position
  • operator<<() : BIAS::Vector3< T >, BIAS::Vector< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::CoordinateTransform3D, BIAS::FilterMask, BIAS::UUID, BIAS::ROI, BIAS::Position, BIAS::ImageBase, BIAS::BaseFactory< BaseClassType >
  • operator<=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::UUID
  • operator=() : BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoShMFeeder, BIAS::VideoServer, BIAS::GenSynthMatches, BIAS::CScommBase, BIAS::VideoStream, BIAS::PyramidImage< StorageType >, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::Camera< StorageType >, BIAS::TrifocalTensor, BIAS::SimilarityTransform, BIAS::Quadric3D, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose, BIAS::PMatrix, BIAS::HMatrix, BIAS::FMatrix, BIAS::EpipolarLine, BIAS::EMatrix, BIAS::CovMatrix3x3, BIAS::CoordinateTransform3D, BIAS::Conic2D, BIAS::CCAStruct, BIAS::FilterMask, BIAS::Feat, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Region2D< Array2D >, TNT::Region1D< Array1D >, TNT::Index1D, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >, BIAS::Tensor3D3x3x3< T >, BIAS::Tensor3D< T >, BIAS::Polynom, BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::UUID, BIAS::ROI, BIAS::Position, BIAS::MetaData, BIAS::AppData, BIAS::ImageBase, BIAS::Image< StorageType >, BIAS::TrifocalTensorBase, BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >, BIAS::PMatrixBase, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D, BIAS::HMatrixBase, BIAS::FMatrixBase, BIAS::AffineTransf, BIAS::RedirectStreams, BIAS::LogFacility, BIAS::Debug
  • operator==() : BIAS::Matrix< T >, BIAS::MatchDataBase, BIAS::CCAStruct, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Polynom, BIAS::UUID, BIAS::ImageBase, BIAS::RMatrixBase, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator>() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>>() : BIAS::Vector3< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::Pose, BIAS::CoordinateTransform3D, BIAS::UUID, BIAS::ImageBase
  • operator[]() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >, BIAS::Polynom
  • operator|() : BIAS::Image< StorageType >
  • Optimal() : BIAS::Triangulation
  • Optimize() : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • OuterProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- z -

  • ZeroHist() : BIAS::Histogram2D, BIAS::Histogram
  • ZeroPad() : BIAS::ImageBase
  • Zoom() : BIAS::ImageCanvas
  • ZoomFrame() : BIAS::ZoomFrame
  • ZoomImageCanvas() : BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- ~ -

  • ~AffineTransf() : BIAS::AffineTransf
  • ~AppData() : BIAS::AppData
  • ~BackwardMapping() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • ~BaseException() : BIAS::BaseException
  • ~BaseFactory() : BIAS::BaseFactory< BaseClassType >
  • ~Binomial() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • ~Bresenham() : BIAS::Bresenham
  • ~BresenhamCircle() : BIAS::BresenhamCircle
  • ~BresenhamCircleEighth() : BIAS::BresenhamCircleEighth
  • ~BresenhamCircleSlow() : BIAS::BresenhamCircleSlow
  • ~BSplineCurve() : BIAS::BSplineCurve
  • ~Camera() : BIAS::Camera< StorageType >
  • ~CameraParam() : BIAS::CameraParam
  • ~CameraViewController() : BIAS::CameraViewController
  • ~CameraViewExternals() : BIAS::CameraViewExternals
  • ~CameraViewFrustum() : BIAS::CameraViewFrustum
  • ~CameraViewInternals() : BIAS::CameraViewInternals
  • ~CameraViewport() : BIAS::CameraViewport
  • ~Cholesky() : BIAS::Cholesky
  • ~ColorHistogram() : BIAS::ColorHistogram< StorageType >
  • ~ColorMultiHistogram() : BIAS::ColorMultiHistogram< StorageType >
  • ~Condensation() : BIAS::Condensation
  • ~Convolution() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ~CornerDetectorBase() : BIAS::CornerDetectorBase< StorageType >
  • ~CornerDetectorFoerstner() : BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • ~CornerDetectorGradient() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • ~CornerDetectorHarris() : BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • ~CornerDetectorKLT() : BIAS::CornerDetectorKLT< StorageType, CalculationType >
  • ~CornerDetectorSusan() : BIAS::CornerDetectorSusan< StorageType >
  • ~CornerMatcher() : BIAS::CornerMatcher
  • ~CovMatrix3x3() : BIAS::CovMatrix3x3
  • ~CScommBase() : BIAS::CScommBase
  • ~CScommClient() : BIAS::CScommClient
  • ~CScommData() : BIAS::CScommData
  • ~CScommServer() : BIAS::CScommServer
  • ~CuEye() : CuEye
  • ~DC_GPS() : BIAS::DC_GPS
  • ~DC_inertial() : BIAS::DC_inertial
  • ~DC_ptu() : BIAS::DC_ptu
  • ~Debug() : BIAS::Debug
  • ~DeInterlace() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • ~Dilation() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • ~Distribution() : BIAS::Distribution
  • ~DistTransform() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • ~doubleRANSAC() : BIAS::doubleRANSAC
  • ~DrawTextGL() : BIAS::DrawTextGL
  • ~EMatrixBase() : BIAS::EMatrixBase
  • ~EpipolarLine() : BIAS::EpipolarLine
  • ~Erosion() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • ~EuclideanTransf3D() : BIAS::EuclideanTransf3D
  • ~ExampleDebug() : BIAS::ExampleDebug
  • ~ExifTag() : BIAS::ExifTag
  • ~FFT() : BIAS::FFT
  • ~FFT2D() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • ~FFT2D_Tiles() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • ~FilterBase() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • ~FilterNTo2N() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • ~FilterNTo3N() : BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
  • ~FilterNToN() : BIAS::FilterNToN< InputStorageType, OutputStorageType >
  • ~FMatrix() : BIAS::FMatrix
  • ~FMatrixBase() : BIAS::FMatrixBase
  • ~Fortran_Matrix() : TNT::Fortran_Matrix< T >
  • ~Fortran_Sparse_Col_Matrix() : TNT::Fortran_Sparse_Col_Matrix< T >
  • ~Gauss() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • ~GaussHelmert() : BIAS::GaussHelmert
  • ~GenSynthMatches() : BIAS::GenSynthMatches
  • ~GeometryGL() : BIAS::GeometryGL
  • ~GradientGauss() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • ~GradientGaussAsymmetric() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
  • ~GradientSimple() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • ~GradientSobel3x3() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • ~GuiBase() : BIAS::GuiBase
  • ~GuiEnhanced() : BIAS::GuiEnhanced
  • ~GuiGTK() : BIAS::GuiGTK
  • ~GuiWX() : BIAS::GuiWX
  • ~Histogram() : BIAS::Histogram
  • ~Histogram2D() : BIAS::Histogram2D
  • ~HMatrix() : BIAS::HMatrix
  • ~HMatrixBase() : BIAS::HMatrixBase
  • ~HomgLine2D() : BIAS::HomgLine2D
  • ~HomgLine3D() : BIAS::HomgLine3D
  • ~HomgPlane3D() : BIAS::HomgPlane3D
  • ~HomgPoint1D() : BIAS::HomgPoint1D
  • ~HomgPoint2D() : BIAS::HomgPoint2D
  • ~HomgPoint2DCov() : BIAS::HomgPoint2DCov
  • ~HomgPoint3D() : BIAS::HomgPoint3D
  • ~HomgPoint3DCov() : BIAS::HomgPoint3DCov
  • ~HomographyMapping() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • ~ICECallbackInterface() : BIAS::ICECallbackInterface
  • ~Image() : BIAS::Image< StorageType >
  • ~ImageAttributes() : BIAS::ImageAttributes
  • ~ImageBase() : BIAS::ImageBase
  • ~ImageCanvas() : BIAS::ImageCanvas
  • ~ImageCanvasEnhanced() : BIAS::ImageCanvasEnhanced
  • ~ImageCanvasGLBase() : BIAS::ImageCanvasGLBase
  • ~ImageConvertThreaded() : BIAS::ImageConvertThreaded
  • ~ImgObjGL() : BIAS::ImgObjGL
  • ~IntegralHistogram() : BIAS::IntegralHistogram
  • ~Interpolator() : BIAS::Interpolator
  • ~JpegHandler() : BIAS::JpegHandler
  • ~Kalman() : BIAS::Kalman
  • ~KMatrix() : BIAS::KMatrix
  • ~Label() : BIAS::Label
  • ~LeastSquaresBase() : BIAS::LeastSquaresBase
  • ~LeastSquaresLapack() : BIAS::LeastSquaresLapack
  • ~LeastSquaresSVD() : BIAS::LeastSquaresSVD
  • ~LinearRegionDetector() : BIAS::LinearRegionDetector< StorageType, CalculationType >
  • ~LogFacility() : BIAS::LogFacility
  • ~LogPolarMapping() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • ~MatchDataBase() : BIAS::MatchDataBase
  • ~MatlabTBUndistortion() : BIAS::MatlabTBUndistortion
  • ~Matrix() : TNT::Matrix< T >, BIAS::Matrix< T >
  • ~Matrix2x2() : BIAS::Matrix2x2< T >
  • ~Matrix3x3() : BIAS::Matrix3x3< T >
  • ~Matrix3x4() : BIAS::Matrix3x4< T >
  • ~Matrix4x4() : BIAS::Matrix4x4< T >
  • ~MDcam() : BIAS::MDcam
  • ~Mean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • ~Median() : BIAS::Median< InputStorageType, OutputStorageType >
  • ~Median1D() : BIAS::Median1D< DataType >
  • ~MetaData() : BIAS::MetaData
  • ~Morphology() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • ~MSAC() : BIAS::MSAC< SolutionType >
  • ~MyAlgorithm() : MyAlgorithm
  • ~MyApp() : MyApp
  • ~MyFrame() : MyFrame
  • ~MySampleGrabberCB() : BIAS::MySampleGrabberCB
  • ~myTestClass() : myTestClass
  • ~MyUnscentedTransform() : MyUnscentedTransform
  • ~OpenGLCanvas() : BIAS::OpenGLCanvas
  • ~OpenGLCanvasBase() : BIAS::OpenGLCanvasBase
  • ~Param() : BIAS::Param
  • ~ParamCallbackInterface() : BIAS::ParamCallbackInterface
  • ~Parametrization() : BIAS::Parametrization
  • ~ParamGUI() : BIAS::ParamGUI
  • ~ParamGUIDialog() : BIAS::ParamGUIDialog
  • ~ParamGUIPanel() : BIAS::ParamGUIPanel
  • ~ParamTypeBase() : BIAS::ParamTypeBase
  • ~ParamTypeBool() : BIAS::ParamTypeBool
  • ~ParamTypeDouble() : BIAS::ParamTypeDouble
  • ~ParamTypeEnum() : BIAS::ParamTypeEnum
  • ~ParamTypeInt() : BIAS::ParamTypeInt
  • ~ParamTypeString() : BIAS::ParamTypeString
  • ~ParamTypeVecDbl() : BIAS::ParamTypeVecDbl
  • ~ParamTypeVecInt() : BIAS::ParamTypeVecInt
  • ~PlaneRANSAC() : BIAS::PlaneRANSAC
  • ~PlueckerMatrix() : BIAS::PlueckerMatrix
  • ~PMatrix() : BIAS::PMatrix
  • ~PMatrixBase() : BIAS::PMatrixBase
  • ~PMatrixEstimation() : BIAS::PMatrixEstimation
  • ~Polynom() : BIAS::Polynom
  • ~PolynomialSolve() : BIAS::PolynomialSolve
  • ~Pose() : BIAS::Pose
  • ~PoseParametrizationCovariance() : BIAS::PoseParametrizationCovariance
  • ~Position() : BIAS::Position
  • ~Projection() : BIAS::Projection
  • ~ProjectionMapping() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • ~ProjectionParametersBase() : BIAS::ProjectionParametersBase
  • ~ProjectionParametersPerspective() : BIAS::ProjectionParametersPerspective
  • ~ProjectionParametersProjective() : BIAS::ProjectionParametersProjective
  • ~ProjectionParametersSpherical() : BIAS::ProjectionParametersSpherical
  • ~ProjectionParametersZoom() : BIAS::ProjectionParametersZoom
  • ~PyramidImage() : BIAS::PyramidImage< StorageType >
  • ~Quaternion() : BIAS::Quaternion< QUAT_TYPE >
  • ~Random() : BIAS::Random
  • ~RANSAC() : BIAS::RANSAC< SolutionType >
  • ~RANSACPreKnowledge() : BIAS::RANSACPreKnowledge< SolutionType >
  • ~RedirectStreams() : BIAS::RedirectStreams
  • ~RegionMatcher() : BIAS::RegionMatcher
  • ~Rescale() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • ~RigParameter() : BIAS::RigParameter
  • ~RMatrix() : BIAS::RMatrix
  • ~RMatrixBase() : BIAS::RMatrixBase
  • ~ROI() : BIAS::ROI
  • ~ScaledImageCanvas() : BIAS::ScaledImageCanvas
  • ~ScanLine() : BIAS::ScanLine
  • ~ScanLine2() : BIAS::ScanLine2
  • ~SphericalUndistortion() : BIAS::SphericalUndistortion
  • ~StatekeeperGL() : BIAS::StatekeeperGL
  • ~StereoRedGreen() : BIAS::StereoRedGreen
  • ~StructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • ~SVD() : BIAS::SVD
  • ~SVD3x3() : BIAS::SVD3x3
  • ~Tensor3D() : BIAS::Tensor3D< T >
  • ~Tensor3D3x3x3() : BIAS::Tensor3D3x3x3< T >
  • ~TFTensorEstimation() : BIAS::TFTensorEstimation
  • ~ThreeDOut() : BIAS::ThreeDOut
  • ~TimeMeasure() : BIAS::TimeMeasure
  • ~TimeMeasurement() : BIAS::TimeMeasurement
  • ~TopFrame() : BIAS::TopFrame
  • ~Tracker() : BIAS::Tracker< StorageType, CalculationType >
  • ~TrackerBase() : BIAS::TrackerBase< StorageType >
  • ~TrackerBaseInterface() : BIAS::TrackerBaseInterface< StorageType >
  • ~TrackerSynth() : BIAS::TrackerSynth< StorageType, CalculationType >
  • ~TriangleMesh() : BIAS::TriangleMesh
  • ~Triangulation() : BIAS::Triangulation
  • ~TrifocalTensor() : BIAS::TrifocalTensor
  • ~TrifocalTensorBase() : BIAS::TrifocalTensorBase
  • ~UndistortionMapping() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • ~UnscentedTransform() : BIAS::UnscentedTransform
  • ~UnVignette() : BIAS::UnVignette
  • ~UUID() : BIAS::UUID
  • ~Vector() : BIAS::Vector< T >, TNT::Vector< T >
  • ~Vector2() : BIAS::Vector2< T >
  • ~Vector3() : BIAS::Vector3< T >
  • ~Vector4() : BIAS::Vector4< T >
  • ~VideoServer() : BIAS::VideoServer
  • ~VideoShMFeeder() : BIAS::VideoShMFeeder
  • ~VideoSource() : BIAS::VideoSource
  • ~VideoSource_DCAM() : BIAS::VideoSource_DCAM
  • ~VideoSource_Disk() : BIAS::VideoSource_Disk
  • ~VideoSource_DiskPMD() : BIAS::VideoSource_DiskPMD
  • ~VideoSource_DSHOW() : BIAS::VideoSource_DSHOW
  • ~VideoSource_DV() : MIP::VideoSource_DV
  • ~VideoSource_DV2() : MIP::VideoSource_DV2
  • ~VideoSource_Net() : BIAS::VideoSource_Net
  • ~VideoSource_Shm() : BIAS::VideoSource_Shm
  • ~VideoSource_Stereo() : BIAS::VideoSource_Stereo
  • ~VideoSource_uEye() : BIAS::VideoSource_uEye
  • ~VideoSource_V4L() : BIAS::VideoSource_V4L
  • ~VideoStream() : BIAS::VideoStream
  • ~WrapBias2Ipl() : BIAS::WrapBias2Ipl
  • ~WxMainThread() : BIAS::WxMainThread
  • ~WxToAsciiArray() : BIAS::WxToAsciiArray
  • ~XMLBase() : BIAS::XMLBase
  • ~XMLIO() : BIAS::XMLIO
  • ~ZoomFrame() : BIAS::ZoomFrame
  • ~ZoomImageCanvas() : BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- a -

  • A() : A, BIAS::Projection3DData
  • AboveThresholdToValue() : BIAS::Image< StorageType >
  • AbsDiff() : BIAS::Image< StorageType >
  • AbsLeftNullspaceDim() : BIAS::SVD
  • AbsNullspaceDim() : BIAS::SVD
  • AbsRightNullspaceDim() : BIAS::SVD
  • AcceptConn_() : BIAS::CScommBase
  • ActivateScorpionTimestamp() : BIAS::VideoSource_DCAM, BIAS::MDcam
  • AdaptAxisAngleRepresentation() : BIAS::RigParameter
  • Add() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >, BIAS::MetaData
  • addAttribute() : BIAS::XMLIO
  • AddBoolWidgets() : BIAS::ParamGUIPanel
  • AddCalibration() : BIAS::RigParameter
  • AddCamera() : BIAS::RigParameter
  • AddCameraCenter() : BIAS::RigParameter
  • AddCameraDataToNode() : BIAS::ProjectionParametersIO
  • AddCameraDataToRig() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • AddCameraDataToXMLTree() : BIAS::CameraParam
  • AddCameraOnly() : BIAS::RigParameter
  • addChildNode() : BIAS::XMLIO
  • addComment() : BIAS::XMLIO
  • addContent() : BIAS::XMLIO
  • AddCornerDetectorType() : BIAS::CornerDetectorBase< StorageType >
  • AddData() : BIAS::Distribution
  • AddDebugLevel() : BIAS::Debug
  • AddDiffusions_() : BIAS::Condensation
  • AddDoubleWidgets() : BIAS::ParamGUIPanel
  • AddEllipsoid() : BIAS::ThreeDOut
  • AddEnumWidgets() : BIAS::ParamGUIPanel
  • AddFilenames() : BIAS::VideoSource_Disk
  • AddGaussianNoise_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • AddGoodGuesses() : BIAS::RANSACPreKnowledge< SolutionType >
  • AddHist() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Histogram2D, BIAS::Histogram
  • AddImage() : BIAS::ThreeDOut
  • AddIntWidgets() : BIAS::ParamGUIPanel
  • AddIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • AddLine() : BIAS::ThreeDOut
  • AddMatrixPanel() : BIAS::ProjectionGUI
  • AddNumPoints() : BIAS::Tracker< StorageType, CalculationType >
  • AddOffsets_() : BIAS::Condensation
  • AddOutlier_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • AddParam_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • AddParamBool() : BIAS::Param
  • AddParamDouble() : BIAS::Param
  • AddParamEnum() : BIAS::Param
  • AddParameter_() : BIAS::Tracker< StorageType, CalculationType >
  • AddParamInt() : BIAS::Param
  • AddParams_() : BIAS::VideoServer
  • AddParamString() : BIAS::Param
  • AddParamVecDbl() : BIAS::Param
  • AddParamVecInt() : BIAS::Param
  • AddPMatrix() : BIAS::ThreeDOut
  • AddPoint() : BIAS::ThreeDOut
  • AddPoints() : BIAS::Tracker< StorageType, CalculationType >
  • AddPose() : BIAS::ThreeDOut
  • AddProjection() : BIAS::ThreeDOut
  • AddRotation() : BIAS::RigParameter
  • AddSensorCenter() : BIAS::RigParameter
  • AddSensorRotation() : BIAS::RigParameter
  • AddStringWidgets() : BIAS::ParamGUIPanel
  • AddTriangleMesh() : BIAS::ThreeDOut
  • AddType() : BIAS::BaseFactory< BaseClassType >
  • AddVecDblWidgets() : BIAS::ParamGUIPanel
  • AddVecIntWidgets() : BIAS::ParamGUIPanel
  • AddVectorPanel() : BIAS::ProjectionGUI
  • AddWeightedHist() : BIAS::Histogram
  • AddZoomStep() : BIAS::ProjectionParametersZoom
  • AffineTransf() : BIAS::AffineTransf
  • AlgebraicMinimization() : BIAS::TFTensorEstimation
  • AllocateBuffer_() : BIAS::GuiGTK
  • ALLOCATOR_IMPL() : C, B, A
  • AllocImageMem() : CuEye
  • Analytic() : BIAS::PolynomialSolve
  • AnalyzeData_() : BIAS::CScommBase
  • AnalyzeFirstMsg_() : BIAS::CScommBase
  • AppData() : BIAS::AppData
  • AppendChannel() : BIAS::Image< StorageType >
  • ApplyBytesPerPacket() : BIAS::VideoSource_DCAM
  • array() : TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • Arrow() : BIAS::ImageDraw< StorageType >
  • AssignUUID() : BIAS::UUID
  • AssignUUID_Consecutive() : BIAS::UUID
  • AssignUUID_Global() : BIAS::UUID
  • AutoMode() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- b -

  • B() : B
  • Backproject() : BIAS::PMatrixBase
  • BackprojectByZDepth() : BIAS::PMatrix
  • BackprojectPseudoinverse() : BIAS::PMatrix
  • BackprojectWorldCoo() : BIAS::PMatrix
  • BackwardMapping() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Base() : Base
  • BaseException() : BIAS::BaseException
  • BaseFactory() : BIAS::BaseFactory< BaseClassType >
  • BayerToGrey_() : BIAS::ImageConvert
  • BayerToRGB_() : BIAS::ImageConvert
  • BayerToRGBSlow_() : BIAS::ImageConvert
  • BBCIn() : BIAS::PMatrix
  • begin() : TNT::Vector< T >, TNT::Fortran_Matrix< T >
  • BelowThresholdToValue() : BIAS::Image< StorageType >
  • Bezier3() : BIAS::Interpolator
  • BGRAToHSL_() : BIAS::ImageConvert
  • BGRAToRGB_() : BIAS::ImageConvert
  • BGRToHSL_() : BIAS::ImageConvert
  • BGRToRGB_() : BIAS::ImageConvert
  • BIAS2ipl() : BIAS::ImageConvert
  • BicubicInterpolation() : BIAS::Image< StorageType >
  • BilinearInterpolation() : BIAS::Image< StorageType >
  • BilinearInterpolationGrey() : BIAS::Image< StorageType >
  • BilinearInterpolationGreyMinVal() : BIAS::Image< StorageType >
  • BilinearInterpolationRGBInterleaved() : BIAS::Image< StorageType >
  • BilinearInterpolationRGBPlanar() : BIAS::Image< StorageType >
  • BilinearInterpolationShiftRegion() : BIAS::Image< StorageType >
  • BilinearRegion1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegion2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterBinomial3Sobel3x3_1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterBinomial3Sobel3x3_2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterMask1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterMask2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterVec1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionFilterVec2_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionPrefiltered1_() : BIAS::TrackerBaseInterface< StorageType >
  • BilinearRegionPrefiltered2_() : BIAS::TrackerBaseInterface< StorageType >
  • Binarize() : BIAS::Image< StorageType >
  • BinaryThreshold() : BIAS::Image< StorageType >
  • Bind() : BIAS::WrapBias2Ipl
  • Binomial() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • BinRead() : BIAS::Matrix< T >
  • BinWrite() : BIAS::Matrix< T >
  • Bresenham() : BIAS::Bresenham
  • BresenhamCircle() : BIAS::BresenhamCircle
  • BresenhamCircleEighth() : BIAS::BresenhamCircleEighth
  • BresenhamCircleSlow() : BIAS::BresenhamCircleSlow
  • BSplineCurve() : BIAS::BSplineCurve
  • BufferCB() : BIAS::MySampleGrabberCB
  • BuildPolarCoordinateMap_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • BuildPyramid_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- c -

  • C() : C, BIAS::Ellipsoid3DData, BIAS::Projection3DData, BIAS::PMatrix3DData, BIAS::CameraViewExternals
  • CalcAverage_() : BIAS::Histogram
  • CalcBytesPerPacket() : BIAS::VideoSource_DCAM
  • CalcCoordOffset_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • CalcGaussianWeightMatrix_() : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBase< StorageType >
  • CalcImageMean3x3() : MainFrame
  • CalCoefficients() : BIAS::PolynomialSolve
  • CalcRadius_() : BIAS::UnVignette
  • CalcScaleShift() : BIAS::Image< StorageType >
  • CalcSigmaDepth() : BIAS::PMDImageProc
  • CalcSimilarity() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • CalcSimilarityColorWeighted() : BIAS::ColorMultiHistogram< StorageType >
  • CalcStructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor3x3() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor5x5() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensor7x7() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcStructureTensorValid() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • CalcTransformed_() : BIAS::EpipolarLine
  • CalculateBaseWeights_() : BIAS::Condensation
  • CalculateFootpoint() : BIAS::HomgLine3D
  • CalculateMean_() : BIAS::Condensation
  • CalculatePerspDistorion_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculatePerspUndistorion_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculateSphericalCoord_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculateSteps() : MainFrame
  • CalculateToSphereMapping_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • CalculationInFloat() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • Camera() : BIAS::Camera< StorageType >
  • CameraParam() : BIAS::CameraParam
  • CameraStatus() : CuEye
  • CameraViewController() : BIAS::CameraViewController
  • CameraViewExternals() : BIAS::CameraViewExternals
  • CameraViewFrustum() : BIAS::CameraViewFrustum
  • CameraViewInternals() : BIAS::CameraViewInternals
  • CameraViewport() : BIAS::CameraViewport
  • CanCompare() : BIAS::CanCompare< T1, T2 >
  • CanCopy() : BIAS::CanCopy< T1, T2 >
  • CanMultiply() : BIAS::CanMultiply< T1, T2, T3 >
  • CaptureFrame() : CuEye
  • CaptureVideo() : CuEye
  • CartesianToPolar() : BIAS::Vector3< T >
  • CCAStruct() : BIAS::CCAStruct
  • Cerr2Null() : BIAS::RedirectStreams
  • ChangeImgSize_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • CheckCoefficients() : BIAS::PolynomialSolve
  • CheckConstraint_() : BIAS::PlueckerMatrix
  • CheckDecomposition_() : BIAS::PMatrix
  • CheckForEvent() : BIAS::GuiBase
  • CheckForKeyEvent() : BIAS::GuiBase
  • CheckFormat() : BIAS::AppData
  • CheckForMouseButtonEvent() : BIAS::GuiBase
  • CheckImageQuality() : BIAS::CondensHisto, BIAS::ColorHistogram< StorageType >
  • CheckImageQualityComplete() : BIAS::ColorHistogram< StorageType >
  • CheckImageQualityRef() : BIAS::ColorHistogram< StorageType >
  • CheckParam() : BIAS::Param
  • CheckPointCorr() : BIAS::TrifocalTensorBase
  • CheckRegisteredMsgs_() : BIAS::CScommBase
  • CheckSVD_() : BIAS::PMatrix
  • CheckSymmetry_() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • Cholesky() : BIAS::Cholesky
  • Circle() : BIAS::ImageDraw< StorageType >
  • CircleCenter() : BIAS::ImageDraw< StorageType >
  • CircleCenterFilled() : BIAS::ImageDraw< StorageType >
  • Clear() : BIAS::Interpolator, BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::ProjectionParametersZoom, BIAS::AppData, BIAS::Image< StorageType >, BIAS::PoseParametrizationCovariance, BIAS::BaseFactory< BaseClassType >
  • clear() : BIAS::PyramidImage< StorageType >, BIAS::UUID, BIAS::XMLIO
  • ClearDataPointer() : BIAS::ImageBase
  • ClearEndTangent() : BIAS::Interpolator
  • ClearGuesses() : BIAS::RANSACPreKnowledge< SolutionType >
  • ClearPoints() : BIAS::Tracker< StorageType, CalculationType >
  • ClearStartTangent() : BIAS::Interpolator
  • ClipBoundingBoxToROICorners_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • ClipValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Clone() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • Close() : BIAS::VideoStream
  • Closed() : BIAS::GuiBase
  • CloseDevice() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • CloseTimerFile() : BIAS::TimeMeasure
  • CNCC() : BIAS::RegionMatcher
  • col_ptr() : TNT::Fortran_Sparse_Col_Matrix< T >
  • ColorCCV() : BIAS::RegionMatcher
  • ColorHistogram() : BIAS::ColorHistogram< StorageType >
  • ColorMultiHistogram() : BIAS::ColorMultiHistogram< StorageType >
  • ColorNCC() : BIAS::RegionMatcher
  • ColorSegmentation() : BIAS::ColorSegmentation
  • Combine() : BIAS::StereoRedGreen
  • compdouble() : BIAS::Condensation
  • Compose() : BIAS::TrifocalTensor, BIAS::PMatrix, BIAS::TrifocalTensorBase, BIAS::PMatrixBase, BIAS::FMatrixBase
  • Compose_() : BIAS::PMatrix
  • Compress() : BIAS::JpegHandler
  • Compute() : BIAS::SVD3x3, BIAS::SVD, BIAS::Median1D< DataType >, BIAS::FFT, BIAS::UnVignette, BIAS::RigParameter, BIAS::TFTensorEstimation, BIAS::PMatrixLinear, BIAS::HMatrixEstimation
  • compute() : BIAS::SVD
  • ComputeAffine() : BIAS::HMatrixEstimation
  • ComputeCalibrated() : BIAS::PMatrixLinear
  • ComputeEpipoles() : BIAS::TrifocalTensor
  • ComputeFromFDirect() : BIAS::PMatrixEstimation
  • ComputeFromFQuasiEuklid() : BIAS::PMatrixEstimation
  • ComputeFromPMatrices() : BIAS::FMatrix
  • ComputeIntPrecisionBits() : BIAS::FilterMask
  • ComputeK_() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • ComputeNormalSystem_() : BIAS::GaussHelmert
  • ComputeRotation() : BIAS::PMatrixEstimation
  • ComputeRotationCenter() : BIAS::PMatrixEstimation
  • ComputeSampleCount() : BIAS::RANSAC< SolutionType >
  • ComputeSigmaPoints_() : BIAS::UnscentedTransform
  • ConcatenateLocalTransform() : BIAS::CoordinateTransform3D
  • Condensation() : BIAS::Condensation
  • CondensHisto() : BIAS::CondensHisto
  • CondensImg() : BIAS::CondensImg
  • Conic2D() : BIAS::Conic2D
  • ConnectServer() : BIAS::CScommClient
  • Consistent() : BIAS::WrapBias2Ipl
  • const_Region1D() : TNT::const_Region1D< Array1D >
  • const_Region2D() : TNT::const_Region2D< Array2D >
  • Constraints() : BIAS::CanMultiply< T1, T2, T3 >, BIAS::CanCompare< T1, T2 >, BIAS::CanCopy< T1, T2 >, BIAS::DerivedFrom< T, B >
  • Contour() : BIAS::Contour
  • Convert() : BIAS::ImageConvert
  • Convert_() : BIAS::PMDImageProc
  • ConvertIPL32to8() : BIAS::WrapBias2Ipl
  • ConvertST() : BIAS::ImageConvert
  • ConvertThread_() : BIAS::ImageConvertThreaded
  • ConvertThreaded() : BIAS::ImageConvertThreaded
  • ConvertToUC_() : BIAS::GuiBase
  • ConvFloatHori_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvFloatMat_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvFloatVert_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntHori_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntMat_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • ConvIntVert_() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • Convolution() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • CoordEuclidianToPolar() : BIAS::Vector2< T >
  • CoordEuclidianToSphere() : BIAS::Vector3< T >
  • CoordinateTransform3D() : BIAS::CoordinateTransform3D
  • CoordPolarToEuclidian() : BIAS::Vector2< T >
  • CoordSphereToEuclidian() : BIAS::Vector3< T >
  • CooTransf() : BIAS::Histogram2D, BIAS::Histogram
  • copy() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Copy() : BIAS::Vector4< T >, BIAS::Vector2< T >
  • CopyIn_NoInit() : BIAS::ImageBase
  • CopyNoCheck() : BIAS::IntegralHistogram
  • CornerDetectorBase() : BIAS::CornerDetectorBase< StorageType >
  • CornerDetectorFoerstner() : BIAS::CornerDetectorFoerstner< StorageType, CalculationType >
  • CornerDetectorGradient() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • CornerDetectorHarris() : BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • CornerDetectorKLT() : BIAS::CornerDetectorKLT< StorageType, CalculationType >
  • CornerDetectorSusan() : BIAS::CornerDetectorSusan< StorageType >
  • CornerMatcher() : BIAS::CornerMatcher
  • Cornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • Corners2Mask() : BIAS::ROI
  • Corners2Vector() : BIAS::ROI
  • CorrectCorrespondences() : BIAS::Triangulation
  • CorrectDefString_() : BIAS::ThreeDOut
  • CorrectVignette() : BIAS::SphericalUndistortion
  • Cout2Null() : BIAS::RedirectStreams
  • CovMatrix3x3() : BIAS::CovMatrix3x3
  • CQ2Pose_() : BIAS::PoseParametrization
  • create() : BIAS::XMLIO
  • CreateBiasImageShared() : BIAS::WrapBias2Ipl
  • CreateFloatFilter() : BIAS::FilterMask
  • CreateGLTexture() : BIAS::ImgObjGL
  • CreateIdealMatches() : BIAS::GenGroundTruth
  • CreateIntFilter() : BIAS::FilterMask
  • CreateIplImageShared() : BIAS::WrapBias2Ipl
  • CreateListenThread_() : BIAS::CScommServer
  • CreateMatches() : BIAS::GenSynthMatches, BIAS::GenGroundTruth
  • CreateMatchesOutlier() : BIAS::GenGroundTruth
  • CreatePerspective() : BIAS::Projection
  • CreateSampleDisplayListScene() : BIAS::GeometryGL
  • CreateSTColor() : BIAS::ColorHarris
  • CreateTextureMatrix() : BIAS::GeometryGL
  • CreateWindow_() : BIAS::GuiWX, BIAS::GuiGTK
  • CrossPowerSpectrum() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • CrossProduct() : BIAS::Vector3< T >
  • CScommBase() : BIAS::CScommBase
  • CScommClient() : BIAS::CScommClient
  • CScommData() : BIAS::CScommData
  • CScommMsg() : BIAS::CScommMsg
  • CScommServer() : BIAS::CScommServer
  • Cubic() : BIAS::PolynomialSolve
  • CubicUniformBSpline() : BIAS::BSplineCurve
  • CuEye() : CuEye
  • Cut2ROI() : BIAS::ImageBase
  • CutoutFrame() : CutoutFrame
  • CylinderMapping() : BIAS::CylinderMapping
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- d -

  • DC_GPS() : BIAS::DC_GPS
  • DC_inertial() : BIAS::DC_inertial
  • DC_ptu() : BIAS::DC_ptu
  • Debug() : BIAS::Debug
  • DebugLevelIsSet() : BIAS::Debug
  • DebugOut() : BIAS::CameraParam
  • Decompose_() : BIAS::PMatrix
  • DecomposeAa() : BIAS::PMatrix
  • DecomposetoSR() : BIAS::FMatrix
  • decompositionExists() : BIAS::Cholesky
  • Decompress() : BIAS::JpegHandler
  • DeInterlace() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • Delete() : BIAS::MetaData
  • DeleteCalibrations() : BIAS::RigParameter
  • DeleteCameraCenters() : BIAS::RigParameter
  • DeleteCameraParams() : BIAS::RigParameter
  • DeleteEvent_() : BIAS::GuiGTK
  • DeleteFont() : BIAS::DrawTextGL
  • DeleteGLTexture() : BIAS::ImgObjGL
  • DeleteHist_() : BIAS::Histogram, BIAS::ColorHistogram< StorageType >
  • DeleteInstance() : BIAS::LogFacility
  • DeleteMediaType_() : BIAS::VideoSource_DSHOW
  • DeleteRotations() : BIAS::RigParameter
  • DeleteSensorCenters() : BIAS::RigParameter
  • DeleteSensorRotations() : BIAS::RigParameter
  • DeNormalizeMatches() : BIAS::GenGroundTruth
  • DepthConvert_() : BIAS::PMDImageProc
  • DerivedFrom() : BIAS::DerivedFrom< T, B >
  • Destroy() : BIAS::Tensor3D< T >
  • destroy() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Destroy_() : BIAS::GuiGTK
  • DestroyAllWindows() : BIAS::WrapBias2Ipl
  • DestroyWindow() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase, BIAS::WrapBias2Ipl
  • det() : BIAS::Matrix4x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >
  • Detect() : BIAS::CornerDetectorSusan< StorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >, BIAS::CornerDetectorBase< StorageType >
  • DetectFromCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • DetermineBIASColorModel_() : BIAS::VideoSource_DSHOW
  • DetermineColorModel_() : BIAS::VideoSource_DSHOW
  • DetermineIntersectionsAndEpipoleDistances_() : BIAS::EpipolarLine
  • DetermineLineType() : BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >
  • DeterminePosition() : BIAS::HomgPoint2D
  • DetermineROI_() : BIAS::Tracker< StorageType, CalculationType >
  • Dilate() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • Dilate3Fast() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • Dilation() : BIAS::Dilation< InputStorageType, OutputStorageType >
  • dim() : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • DimensionMatch() : BIAS::ImageBase
  • DirectNeighborsGreyValidFloat_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • DirectNeighborsGreyValidInt_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • DisableDestructorWarning() : BIAS::Param
  • DisableEvent() : CuEye
  • Display() : BIAS::OpenGLCanvasBase, BIAS::WrapBias2Ipl, BIAS::ImageBase
  • DisplayCalls() : BIAS::OpenGLCanvasBase, BIAS::ImageCanvasGLBase, MyGLCanvas, MyGLCanvas2, MyGLCanvas
  • DisplayCallsSampleDisplayListScene() : BIAS::GeometryGL
  • DisplayCameraExternalParams() : BIAS::GeometryGL
  • DisplayCameraInternalParams() : BIAS::GeometryGL
  • DisplayCameraProperties() : BIAS::VideoSource_DSHOW
  • DisplayCameraView() : BIAS::OpenGLCanvas
  • DisplayCameraViewExternalParams() : BIAS::OpenGLCanvas
  • DisplayCameraViewInternalParams() : BIAS::OpenGLCanvas
  • DisplayClear() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplayCoordCross() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplayCoordCrossAxesLabel() : BIAS::GeometryGL
  • DisplayFilterProperties() : BIAS::VideoSource_DSHOW
  • DisplayGL() : BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController
  • DisplayGLExternal() : BIAS::CameraViewController
  • DisplayGLInternal() : BIAS::CameraViewController
  • DisplayImgPlaneTextured() : BIAS::GeometryGL
  • DisplayP() : BIAS::GeometryGL
  • DisplayPinProperties_() : BIAS::VideoSource_DSHOW
  • DisplayQuadTexCoord2D() : BIAS::GeometryGL
  • DisplayQuadTexCoord2DFull() : BIAS::GeometryGL
  • DisplayRenderMode() : BIAS::OpenGLCanvasBase, BIAS::GeometryGL
  • DisplaySampleScene() : BIAS::OpenGLCanvasBase
  • DisplaySceneExampleSimple() : BIAS::GeometryGL
  • DisplaySelectBuffer() : BIAS::OpenGLCanvasBase
  • DisplaySimpleAnimation() : BIAS::GeometryGL
  • DisplaySourcePinProperties() : BIAS::VideoSource_DSHOW
  • DisplayViewAt() : BIAS::CameraViewExternals
  • Dist() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Distance() : BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgLine3D, BIAS::HomgLine2D
  • DistanceSquared() : BIAS::HomgPoint2D, BIAS::HomgPlane3D, BIAS::HomgLine2D
  • Distort() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • DistortPerspImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • Distribution() : BIAS::Distribution
  • DistTransform() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • Div() : BIAS::Vector3< T >
  • Divide() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • DivideIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • DivIP() : BIAS::Vector3< T >
  • dndFileTarget() : BIAS::dndFileTarget
  • DoesPointProjectIntoImage() : BIAS::ProjectionParametersBase, BIAS::Projection
  • DoesPointProjectIntoImageLocal() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • doubleRANSAC() : BIAS::doubleRANSAC
  • Downsample() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBPoT() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2Color() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy2Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy4() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DownsampleBy4Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • DragAndDropTarget() : DragAndDropTarget, MainFrame
  • Draw() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Contour, BIAS::EpipolarLine, BIAS::Conic2D
  • DrawBezierCoords2() : BIAS::Interpolator
  • DrawCircles() : BIAS::SphericalUndistortion
  • DrawDistortedLine() : MainFrame
  • DrawHist_() : BIAS::Histogram
  • DrawHistLog_() : BIAS::Histogram
  • DrawHistoSizes() : BIAS::CondensHisto
  • DrawingAreaExposeCallback_() : BIAS::GuiGTK
  • DrawLine() : BIAS::GuiEnhanced
  • DrawLog() : BIAS::Histogram2D, BIAS::Histogram
  • DrawMatches() : BIAS::GenGroundTruth
  • DrawMean() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawNoisy() : BIAS::GenSynthMatches
  • DrawPosteriorDistribution() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawRectangle() : BIAS::GuiEnhanced
  • DrawRectangle_() : BIAS::ImageCanvasEnhanced
  • DrawSamples() : BIAS::CondensImg, BIAS::CondensHisto
  • DrawSamplesExt() : BIAS::CondensHisto
  • DrawSamplesWhite() : BIAS::CondensHisto
  • DrawTextGL() : BIAS::DrawTextGL
  • DrawTrue() : BIAS::GenSynthMatches
  • DrawWeightedSamples() : BIAS::CondensHisto
  • DrawWhole() : BIAS::EpipolarLine
  • Dump() : BIAS::ThreeDOut, BIAS::IntegralHistogram, BIAS::Histogram2D, BIAS::Histogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::SimilarityTransform, BIAS::MetaData, BIAS::TrifocalTensorBase
  • DumpCSV() : BIAS::ColorHistogram< StorageType >
  • DumpResult() : BIAS::FFT
  • DumpResults() : BIAS::Tracker< StorageType, CalculationType >
  • DVToRGB_() : BIAS::ImageConvert
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- e -

  • EigenvalueDecomposition() : BIAS::Matrix2x2< T >
  • EightPoint() : BIAS::FMatrixEstimation
  • ElementwiseDivision() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • ElementwiseProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Ellipse() : BIAS::ImageDraw< StorageType >, BIAS::Conic2D
  • EllipsoidSilhouetteToGauss() : BIAS::Conic2D
  • EMatrix() : BIAS::EMatrix
  • EMatrixBase() : BIAS::EMatrixBase
  • EMatrixToParams() : BIAS::Parametrization
  • EnableAutoExit() : CuEye
  • EnableEvent() : CuEye
  • EnableMessage() : CuEye
  • EnableMipMapping() : BIAS::ImageCanvasGLBase
  • end() : TNT::Vector< T >, TNT::Fortran_Matrix< T >
  • EnforceMaxRank2() : BIAS::FMatrixEstimation
  • EnforceNormalRange() : BIAS::SphericalUndistortion
  • EnforceNormalRange_() : BIAS::ProjectionParametersSpherical
  • EnforceRConstraints() : BIAS::RMatrix
  • Entry() : BIAS::WxMainThread
  • EnumFilters_() : BIAS::VideoSource_DSHOW
  • epipolarconstraintRemainder() : BIAS::FMatrixBase
  • EpipolarLine() : BIAS::EpipolarLine
  • EqualizeFeature() : BIAS::MDcam
  • Erode() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • Erode3Fast() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • Erosion() : BIAS::Erosion< InputStorageType, OutputStorageType >
  • EuclideanTransf3D() : BIAS::EuclideanTransf3D
  • EvaluateFromIntegralHistoImage_() : BIAS::CondensHisto
  • EvaluateImportanceWeights() : BIAS::CondensImg, BIAS::Condensation
  • EvaluateObservationDensities() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • EvaluatePolynomial() : BIAS::PolynomialSolve
  • EvaluateResult_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • EvaluateSolution() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • ExampleDebug() : BIAS::ExampleDebug
  • ExifTag() : BIAS::ExifTag
  • ExitCamera() : CuEye
  • ExitEvent() : CuEye
  • ExportDevIL() : BIAS::ImageIO
  • ExportImage() : BIAS::ImageIO
  • ExportImagePnm_() : BIAS::ImageIO
  • ExportImlib() : BIAS::ImageIO
  • ExportMagickPP() : BIAS::ImageIO
  • ExportOpenEXR() : BIAS::ImageIO
  • ExtensionName() : BIAS::ImageIO
  • ExternalTrigger() : BIAS::VideoSource_DCAM, BIAS::MDcam
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- f -

  • fakima() : BIAS::Interpolator
  • FastBilinearInterpolationGrey() : BIAS::Image< StorageType >
  • FFT() : BIAS::FFT
  • FFT2D() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • FFT2D_Tiles() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • Fill() : BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • FillBorderConst() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • FillImageWithConstValue() : BIAS::Image< StorageType >
  • FillImageWithXValue() : BIAS::Image< StorageType >
  • FillUpPoints() : BIAS::Tracker< StorageType, CalculationType >
  • Filter() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter11x11Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter13x13Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter3x3Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3GreyThreshold() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter3x3SameGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter3x3ValidGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter5x5() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter5x5Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter5x5GreyThreshold() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter5x5ValidGreyFloat() : BIAS::Binomial< InputStorageType, OutputStorageType >
  • Filter7x7Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • Filter9x9Grey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • FilterBase() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • FilterFloat() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • FilterGrey() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • FilterIgnoreZero5x5() : BIAS::Median< InputStorageType, OutputStorageType >
  • FilterInt() : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::FilterNToN< InputStorageType, OutputStorageType >, BIAS::FilterNTo3N< InputStorageType, OutputStorageType >, BIAS::FilterNTo2N< InputStorageType, OutputStorageType >, BIAS::DeInterlace< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • FilterMask() : BIAS::FilterMask
  • FilterMean() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterMean2x2() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterMean2x2Grey() : BIAS::Mean< InputStorageType, OutputStorageType >
  • FilterNTo2N() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • FilterNTo3N() : BIAS::FilterNTo3N< InputStorageType, OutputStorageType >
  • FilterNToN() : BIAS::FilterNToN< InputStorageType, OutputStorageType >
  • FilterOnlyZeroIgnoreZero3x3() : BIAS::Median< InputStorageType, OutputStorageType >
  • FilterOnlyZeroIgnoreZero5x5() : BIAS::Median< InputStorageType, OutputStorageType >
  • Find() : BIAS::MetaData
  • FindCaptureDevice_() : BIAS::VideoSource_DSHOW
  • FindClosestP2() : BIAS::PMatrixEstimation
  • FindFilesInPath() : FindFilesInPath
  • FindFirst_() : BIAS::Contour
  • FindInDir() : FindFilesInPath
  • FindNearest_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • FitDepthTo2DImage() : BIAS::PMDImageProc
  • FitSizetIfTooSmall() : MainFrame
  • Flip() : BIAS::ImageBase
  • FlipHorizontal() : BIAS::ImageBase
  • FloatToUC_() : BIAS::ImageConvert
  • FMatrix() : BIAS::FMatrix
  • FMatrixBase() : BIAS::FMatrixBase
  • FMatrixEstimation() : BIAS::FMatrixEstimation
  • FMatrixToParams() : BIAS::Parametrization
  • ForceFormat7() : BIAS::VideoSource_DCAM
  • Fortran_Matrix() : TNT::Fortran_Matrix< T >
  • Fortran_Sparse_Col_Matrix() : TNT::Fortran_Sparse_Col_Matrix< T >
  • Fortran_Sparse_Vector() : TNT::Fortran_Sparse_Vector< T >
  • Forward_() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • free() : TNT::Vector_Adaptor< BBVec >
  • FreeBuffer_() : BIAS::GuiGTK
  • FreeImageMem() : CuEye
  • FreezeVideo() : CuEye
  • FromBase() : FromBase
  • FromInterleaved() : BIAS::ImageConvert
  • FromInterleavedRGB_() : BIAS::ImageConvert
  • FromInterleavedYUYV422_() : BIAS::ImageConvert
  • func() : BIAS::ExampleDebug
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- g -

  • g_() : BIAS::GaussHelmert
  • gasdev3_() : BIAS::Random
  • gasdev_() : BIAS::Random
  • gasdevf_() : BIAS::Random
  • Gauss() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GaussHelmert() : BIAS::GaussHelmert
  • General_Eigenproblem_GeneralMatrix_Lapack() : BIAS::SVD
  • Generate() : BIAS::BaseFactory< BaseClassType >
  • GenerateDenseMesh() : BIAS::TriangleMesh
  • GenerateHist() : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • GenerateIntegralHist() : BIAS::IntegralHistogram
  • GenerateIntegralHistDiffBin() : BIAS::IntegralHistogram
  • GenerateRandomCube() : BIAS::GenGroundTruth
  • GenerateRandomPlane() : BIAS::GenGroundTruth
  • GenerateSamples() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >
  • GenerateSamplesEvenspace() : BIAS::RANSAC< SolutionType >
  • GenerateSamplesRandom() : BIAS::RANSAC< SolutionType >
  • GenerateUUID() : BIAS::UUID
  • GenerateUUID_Consecutive() : BIAS::UUID
  • GenerateUUID_Global() : BIAS::UUID
  • GenSynthMatches() : BIAS::GenSynthMatches
  • GeometryGL() : BIAS::GeometryGL
  • get() : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >
  • Get3DPoints() : BIAS::GenSynthMatches
  • GetA() : BIAS::PMatrix
  • GetA_() : BIAS::GaussHelmert
  • GetAbortOnFatal() : BIAS::LogFacility
  • GetActiveFrameNumber() : BIAS::VideoSource_Disk
  • GetActiveImageMem() : CuEye
  • GetAffineResult() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • GetAffineResults() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • GetAktImage() : BIAS::CondensHisto
  • GetAngle() : BIAS::EpipolarLine
  • GetAngleCorrX() : BIAS::CameraParam
  • GetAngleCorrY() : BIAS::CameraParam
  • GetAnisotropicImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetASCIIString() : BIAS::Camera< StorageType >
  • GetAspect() : BIAS::CameraViewport, BIAS::CameraViewFrustum
  • GetAspectratio() : BIAS::CameraParam, BIAS::ProjectionParametersBase
  • GetAspectRatio() : BIAS::CameraParam, BIAS::OpenGLCanvasBase
  • getAttributeByName() : BIAS::XMLIO
  • getAttributeName() : BIAS::XMLIO
  • GetAttributes() : BIAS::XMLIO
  • getAttributeValueBool() : BIAS::XMLIO
  • getAttributeValueDouble() : BIAS::XMLIO
  • getAttributeValueInt() : BIAS::XMLIO
  • getAttributeValueString() : BIAS::XMLIO
  • getAttributeValueVecDbl() : BIAS::XMLIO
  • getAttributeValueVecInt() : BIAS::XMLIO
  • GetAverageRMatrix() : BIAS::RMatrix
  • GetAxisAngle() : BIAS::Quaternion< QUAT_TYPE >
  • GetB_() : BIAS::GaussHelmert
  • GetBiggestAbsEntry() : BIAS::Parametrization
  • GetBin() : BIAS::Histogram
  • GetBinaryData() : BIAS::ColorHistogram< StorageType >
  • GetBinaryLength() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu
  • GetBinCount() : BIAS::Histogram
  • GetBinSize() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • GetBinSizeSat() : BIAS::IntegralHistogram, BIAS::ColorHistogram< StorageType >
  • GetBitDepth() : BIAS::ImageBase
  • GetBitRep() : BIAS::PMDImageIO
  • GetBlobCounts() : BIAS::Label
  • GetBlobMap() : BIAS::Label
  • GetBlobSizes() : BIAS::Label
  • GetBorderHandling() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • GetBorders() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • GetBordersValid_() : BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::Label, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >, BIAS::Erosion< InputStorageType, OutputStorageType >, BIAS::DistTransform< InputStorageType, OutputStorageType >, BIAS::Dilation< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • GetBoundingBox() : BIAS::ThreeDOut, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetBoundingBoxes() : BIAS::Label
  • GetBytesPerPixel() : BIAS::VideoSource
  • GetC() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • GetCalibrations() : BIAS::RigParameter
  • GetCamera() : BIAS::VideoServer, BIAS::MDcam
  • GetCameraCenter() : BIAS::RigParameter
  • GetCameraCenters() : BIAS::RigParameter
  • GetCameraHandle() : CuEye
  • GetCameraInfo() : CuEye
  • GetCameraParam() : BIAS::RigParameter
  • GetCameraParams() : BIAS::RigParameter
  • GetCameraType() : CuEye
  • GetCamID() : BIAS::CameraParam
  • GetCanonicalH() : BIAS::TrifocalTensor, BIAS::PMatrix
  • GetCellSizeX() : BIAS::CameraParam
  • GetCellSizeY() : BIAS::CameraParam
  • GetCenterOfPoints() : BIAS::ThreeDOut
  • GetCenters() : BIAS::Label
  • GetChangedHomography() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • GetChannel() : BIAS::ImageBase
  • GetChannelCount() : BIAS::ImageBase
  • GetChannelcount() : BIAS::ImageBase
  • getChild() : BIAS::XMLIO
  • GetChildren() : BIAS::XMLIO
  • GetCloseEdge() : BIAS::EpipolarLine
  • GetCloseIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCol() : BIAS::Matrix< T >
  • GetColorChannels() : BIAS::VideoSource
  • GetColorDepth() : CuEye
  • GetColorModel() : BIAS::VideoSource, BIAS::ImageBase
  • GetCols() : BIAS::Matrix< T >
  • GetColumn() : BIAS::Matrix3x3< T >
  • GetCommPartnerName() : BIAS::CScommBase
  • GetCompressedData() : BIAS::JpegHandler
  • GetConicType() : BIAS::Conic2D
  • GetConnections() : BIAS::CScommBase
  • GetContrastValue() : BIAS::ImageDraw< StorageType >
  • GetControlPoints() : BIAS::Interpolator
  • GetCopyOfCloseIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCopyOfEpipole() : BIAS::EpipolarLine
  • GetCopyOfFarIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetCopyOfROI() : BIAS::ImageBase
  • GetCopyOfROI2() : BIAS::ImageBase
  • GetCorners() : BIAS::ROI
  • GetCorrespondences() : BIAS::MatchDataBase
  • GetCosAngleErrorHomogenized() : BIAS::FMatrixBase, BIAS::EMatrixBase
  • GetCount() : BIAS::Distribution
  • GetCov() : BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose
  • GetCov_() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetCovariance() : BIAS::Kalman, BIAS::Triangulation, BIAS::Pose, BIAS::PMatrix
  • GetCovariance2D() : BIAS::Triangulation
  • GetCovarianceAnalytic() : BIAS::Triangulation
  • GetCovarianceMatrix() : BIAS::PoseParametrization
  • GetCovariances() : BIAS::Tracker< StorageType, CalculationType >
  • GetCovC() : BIAS::Pose, BIAS::PoseParametrizationCovariance
  • GetCovQ() : BIAS::Pose, BIAS::PoseParametrizationCovariance
  • GetCQ() : BIAS::CoordinateTransform3D, BIAS::PoseParametrization
  • GetCycleCount() : BIAS::TimeMeasure
  • GetData() : BIAS::CScommBase, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Matrix< T >
  • GetData_() : BIAS::CScommBase
  • GetDataArray() : BIAS::Tensor3D< T >, BIAS::Matrix< T >
  • GetDataArray1() : BIAS::Matrix< T >
  • GetDataLast() : BIAS::Vector< T >, BIAS::Matrix< T >
  • GetDataRange() : BIAS::Histogram
  • GetDebugLevel() : BIAS::Debug
  • GetDebugStream() : BIAS::Debug
  • GetDefaultUndistortion() : BIAS::CameraParam
  • GetDeltaR() : BIAS::EpipolarLine
  • GetDepth() : BIAS::ImageBase
  • GetDeterminant() : BIAS::Matrix3x3< T >
  • GetDetPolynomial() : BIAS::FMatrixEstimation
  • GetDialog() : BIAS::ParamGUI
  • GetDim1() : BIAS::Tensor3D< T >
  • GetDim2() : BIAS::Tensor3D< T >
  • GetDim3() : BIAS::Tensor3D< T >
  • GetDirection() : BIAS::PlueckerMatrix
  • GetDiscriminant() : BIAS::Conic2D
  • GetDistROIs() : BIAS::ColorMultiHistogram< StorageType >
  • GetDllVersion() : CuEye
  • GetDownsamplingFactor() : BIAS::CameraParam
  • GetDownSamplingFactor() : BIAS::RigParameter
  • GetDualConic() : BIAS::Conic2D
  • GetDualQuadric() : BIAS::Quadric3D
  • GetDx() : BIAS::EpipolarLine
  • GetDy() : BIAS::EpipolarLine
  • GetEllipseParameters() : BIAS::Conic2D
  • GetEpipolarError() : BIAS::FMatrixBase
  • GetEpipolarErrorHomogenized() : BIAS::FMatrixBase, BIAS::EMatrixBase
  • GetEpipolarLineImage1() : BIAS::FMatrixBase
  • GetEpipolarLineImage2() : BIAS::FMatrixBase
  • GetEpipolarLines() : BIAS::TrifocalTensor
  • GetEpipole() : BIAS::EpipolarLine
  • GetEpipole21() : BIAS::TrifocalTensor
  • GetEpipole31() : BIAS::TrifocalTensor
  • GetEpipolePosition() : BIAS::EpipolarLine
  • GetEpipoles() : BIAS::FMatrix
  • GetEpipolesHomogenized() : BIAS::FMatrix
  • GetError() : BIAS::Tracker< StorageType, CalculationType >, BIAS::HMatrixEstimation
  • GetErrorText() : CuEye
  • GetEuclidean() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • GetEuclidian() : BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • GetEuclidianX() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • GetEuclidianY() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • GetEuclidianZ() : BIAS::HomgPoint3D
  • GetExposureTime() : CuEye
  • GetExtension() : BIAS::ImageIO
  • GetExternals() : BIAS::CameraViewController, BIAS::ProjectionParametersBase, BIAS::Projection
  • Getf() : BIAS::Camera< StorageType >
  • GetFactor() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetFactorOffset() : BIAS::GuiBase
  • GetFactors() : BIAS::PyramidImage< StorageType >
  • GetFakeKMatrix() : BIAS::ProjectionParametersSpherical
  • GetFarEdge() : BIAS::EpipolarLine
  • GetFarIntersectionWithImageBorder() : BIAS::EpipolarLine
  • GetFeature() : BIAS::VideoSource_DCAM, BIAS::VideoSource
  • GetFieldOfView() : BIAS::PMatrix
  • GetFieldOfViewDegree() : BIAS::ImageAttributes
  • GetFieldOfViewX() : BIAS::PMatrix
  • GetFieldOfViewY() : BIAS::PMatrix
  • GetFileFormat() : BIAS::ImageIO
  • GetFinalScore() : BIAS::RANSAC< SolutionType >
  • getFirstAttribute() : BIAS::XMLIO
  • getFirstChild() : BIAS::XMLIO
  • GetFMatrix21() : BIAS::TrifocalTensor
  • GetFMatrix31() : BIAS::TrifocalTensor
  • GetFocalLength() : BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetFocalLengthMeter() : BIAS::ImageAttributes
  • GetFocalLengthXPixel() : BIAS::ImageAttributes
  • GetFocalLengthYPixel() : BIAS::ImageAttributes
  • GetFovX() : BIAS::CameraViewFrustum
  • GetFovY() : BIAS::CameraViewFrustum
  • GetFPS() : BIAS::VideoServer
  • GetFrame() : BIAS::ParamGUI
  • GetFrameCount() : BIAS::OpenGLCanvasBase
  • GetFreeGroupID() : BIAS::Param
  • GetFreemanCode() : BIAS::Contour
  • GetFreq() : BIAS::TimeMeasure
  • GetFScaling() : BIAS::Parametrization
  • GetFx() : BIAS::KMatrix
  • GetFy() : BIAS::KMatrix
  • GetGain() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye, BIAS::MDcam
  • GetGammaMode() : BIAS::VideoSource_DCAM
  • GetGLInternalFormat() : BIAS::ImgObjGL
  • GetGlobalDebugLevel() : BIAS::Debug
  • GetGlobalToLocalTransform() : BIAS::CoordinateTransform3D
  • GetGLPixelFormat() : BIAS::ImgObjGL
  • GetGLStorageType() : BIAS::ImgObjGL
  • GetGradGaussRatio() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GetGradGaussSigma() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GetGradientType() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • GetGreyImage() : BIAS::ColorSegmentation
  • GetGroupID() : BIAS::Param
  • GetGroupIDForGroupName() : BIAS::Param
  • GetGroupName() : BIAS::Param
  • GetGTC() : BIAS::GenSynthMatches
  • GetGTNormalizedF() : BIAS::GenSynthMatches
  • GetGTNormalizedPoints() : BIAS::GenSynthMatches
  • GetGTP() : BIAS::GenSynthMatches
  • GetGTPoints() : BIAS::GenSynthMatches
  • GetGTR() : BIAS::GenSynthMatches
  • GetH() : BIAS::PMatrix
  • GetH_() : BIAS::GaussHelmert
  • GetHalfWinSize() : BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • GetHalfWinSizePointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetHardwareName() : BIAS::ImageAttributes
  • GetHeight() : BIAS::VideoSource, BIAS::CameraParam, BIAS::OpenGLCanvasBase, BIAS::ImageBase
  • GetHeightROI() : BIAS::ColorHistogram< StorageType >
  • GetHinf() : BIAS::PMatrix
  • GetHint() : BIAS::ParamTypeEnum, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetHist() : BIAS::ColorHistogram< StorageType >
  • GetHist1() : BIAS::ColorMultiHistogram< StorageType >
  • GetHist2() : BIAS::ColorMultiHistogram< StorageType >
  • GetHistCount() : BIAS::Histogram
  • GetHistL() : BIAS::ColorHistogram< StorageType >
  • GetHistogram() : BIAS::IntegralHistogram
  • GetHomogenized() : BIAS::CovMatrix3x3
  • GetHorizRightShift() : BIAS::FilterMask
  • GetHScaling() : BIAS::Parametrization
  • GetHueImage() : BIAS::ColorSegmentation
  • GetHx() : BIAS::KMatrix
  • GetHy() : BIAS::KMatrix
  • GetID() : BIAS::VideoSource, BIAS::MDcam
  • GetIdentifier() : BIAS::Projection
  • GetIdleTime() : BIAS::TimeMeasure
  • GetIlluCorrX() : BIAS::CameraParam
  • GetIlluCorrY() : BIAS::CameraParam
  • GetImageCanvas() : BIAS::ScaledImageCanvas
  • GetImageCoo() : BIAS::HomgPoint2D
  • GetImageData() : BIAS::ImageBase, BIAS::Image< StorageType >
  • GetImageDataArray() : BIAS::ImageBase, BIAS::Image< StorageType >
  • GetImageDimensions() : BIAS::ImageAttributes
  • GetImageHeight() : BIAS::EpipolarLine
  • GetImagePlane() : BIAS::PMatrix
  • GetImageSize() : BIAS::ProjectionParametersBase
  • GetImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetImageWidth() : BIAS::EpipolarLine
  • GetImgCorner2d() : BIAS::GeometryGL
  • GetImgCorner3d() : BIAS::GeometryGL
  • GetInfoGL() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas, BIAS::GeometryGL
  • GetInliers() : BIAS::GenSynthMatches
  • GetInput() : BIAS::FFT
  • GetInterfaces_() : BIAS::VideoSource_DSHOW
  • GetInternals() : BIAS::CameraViewController
  • GetIntersectionOfImagePlanes() : BIAS::PMatrix
  • GetIntersectionsWithImage() : BIAS::HomgLine2D
  • GetIRQ() : CuEye
  • GetJacobian() : BIAS::HMatrix
  • GetJacobian_() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetK() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::PMatrix
  • GetKernel() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • GetKernelf() : BIAS::FilterMask
  • GetKerneli() : BIAS::FilterMask
  • GetKernelRightShift() : BIAS::FilterMask
  • GetKernelTime() : BIAS::TimeMeasure
  • GetKinv() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetKMatrices() : BIAS::RigParameter
  • GetKMatrix() : BIAS::SphericalUndistortion, BIAS::RigParameter, BIAS::CameraParam
  • GetKnotPoints() : BIAS::Interpolator
  • GetKnownTags() : BIAS::BaseFactory< BaseClassType >
  • GetLabelImage() : BIAS::Label
  • GetLastFilename() : BIAS::VideoSource_Disk
  • GetLeft() : BIAS::VideoSource_DCAM
  • GetLeftNullvector() : BIAS::SVD
  • GetLength() : BIAS::Tensor3D< T >
  • GetLineIntersection() : BIAS::HomgPlane3D
  • GetLineType() : BIAS::EpipolarLine
  • GetLocalToGlobalTransform() : BIAS::CoordinateTransform3D
  • GetLogLevel() : BIAS::LogFacility
  • GetLogStream() : BIAS::LogFacility
  • GetLong() : BIAS::UUID
  • GetLowpass() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetLowPassType() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetMagnitude() : BIAS::FFT
  • GetMappedError() : BIAS::HMatrix
  • GetMappedRange() : BIAS::HMatrix
  • GetMapPMatrices() : BIAS::ThreeDOut
  • GetMaskData() : BIAS::ROI
  • GetMaskDataArray() : BIAS::ROI
  • GetMaskHeight() : BIAS::ROI
  • GetMaskImage() : BIAS::ROI
  • GetMaskWidth() : BIAS::ROI
  • GetMatrices() : BIAS::Tensor3D3x3x3< T >
  • GetMatrix() : BIAS::MatrixPanel, BIAS::SimilarityTransform
  • GetMatrix3x4() : BIAS::CoordinateTransform3D
  • GetMax() : BIAS::Matrix< T >
  • GetMaxCamAngle() : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • GetMaxErrorPointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetMaxHistEntry() : BIAS::Histogram
  • GetMaxIterationsPointer() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • GetMaxMin() : BIAS::Matrix< T >
  • GetMaxNumFeatures() : BIAS::CornerDetectorBase< StorageType >
  • GetMaxPixelValue() : BIAS::Image< StorageType >
  • GetMaxValue() : BIAS::CondensHisto
  • GetMaxVariance() : BIAS::CondensHisto
  • GetMaxWeight() : BIAS::CondensHisto
  • GetMean() : BIAS::Condensation, BIAS::Matrix< T >, BIAS::Distribution
  • GetMeanPixelValue() : BIAS::Image< StorageType >
  • GetMeanValue() : BIAS::CondensHisto
  • GetMeanVariance() : BIAS::CondensHisto
  • GetMeanWeight() : BIAS::Condensation
  • GetMedian() : BIAS::Median1D< DataType >
  • GetMedianCenters() : BIAS::Label
  • GetMessageSize() : BIAS::VideoServer
  • GetMetaData() : BIAS::ImageBase
  • GetMin() : BIAS::Matrix< T >
  • GetMinBorderDistance() : BIAS::Tracker< StorageType, CalculationType >
  • GetMinCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetMinDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • GetMinMaxPixelValue() : BIAS::Image< StorageType >
  • GetMinMaxPixelValueIgnoreRange() : BIAS::Image< StorageType >
  • GetMinPixelValue() : BIAS::Image< StorageType >
  • GetModelForEuid() : BIAS::VideoSource_DCAM
  • GetMousePos() : BIAS::ImageCanvas
  • GetMouseX() : BIAS::GuiBase
  • GetMouseY() : BIAS::GuiBase
  • GetNearTag() : BIAS::BaseFactory< BaseClassType >
  • GetNext() : BIAS::ScanLine2, BIAS::ScanLine, BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • getNextAttribute() : BIAS::XMLIO
  • getNextChild() : BIAS::XMLIO
  • GetNextFilename() : BIAS::VideoSource_Disk
  • GetNextLine() : BIAS::EpipolarLine
  • getNodeContentDouble() : BIAS::XMLIO
  • getNodeContentInt() : BIAS::XMLIO
  • getNodeContentString() : BIAS::XMLIO
  • getNodeName() : BIAS::XMLIO
  • GetNormal() : BIAS::PlueckerMatrix
  • GetNormalDistributed() : BIAS::Random
  • GetNormalized() : BIAS::Vector3< T >
  • GetNormalizedCorrespondences() : BIAS::MatchDataBase
  • GetNormalizedPoints() : BIAS::MatchDataBase
  • GetNormals() : BIAS::TriangleMesh
  • GetNormalVector() : BIAS::HomgPlane3D
  • GetNormRayWorldCoo() : BIAS::PMatrix
  • GetNotebook() : BIAS::ParamGUI
  • GetNullVector() : BIAS::PMatrix
  • GetNullvector() : BIAS::SVD
  • GetNumberOfCameras() : CuEye
  • getNumberOfCameras() : BIAS::RigParameter
  • GetNumberOfEntries() : BIAS::ColorHistogram< StorageType >
  • GetNumberOfRealSolutions() : BIAS::PolynomialSolve
  • GetNumCams() : BIAS::MDcam
  • GetNumElements() : BIAS::Matrix< T >
  • GetNumFramesRemaining() : BIAS::VideoSource_Disk
  • GetNumImages() : BIAS::MatchDataBase
  • GetNumIter() : BIAS::Tracker< StorageType, CalculationType >
  • GetOrder() : BIAS::Polynom
  • GetOrientation() : BIAS::Camera< StorageType >, BIAS::PoseParametrization
  • GetOrigImage() : BIAS::ImageCanvas
  • GetOrigimg() : BIAS::ScaledImageCanvas
  • GetOsVersion() : CuEye
  • GetOwnerframe() : BIAS::OpenGLCanvasBase
  • GetP() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective
  • GetPanel() : BIAS::ParamGUI
  • GetParamBool() : BIAS::Param
  • GetParamDouble() : BIAS::Param
  • GetParamEnum() : BIAS::Param
  • GetParameters() : BIAS::Projection
  • GetParamInt() : BIAS::Param
  • GetParamMap() : BIAS::Param
  • GetParamString() : BIAS::Param
  • GetParamVecDbl() : BIAS::Param
  • GetParamVecInt() : BIAS::Param
  • GetPCA() : BIAS::CovMatrix3x3
  • GetPciSlot() : CuEye
  • GetPerpendicularLine() : BIAS::HomgLine2D
  • GetPEstSystemHom() : BIAS::PMatrixLinear
  • GetPEstSystemInHom() : BIAS::PMatrixLinear
  • GetPhase() : BIAS::FFT
  • GetPixelCount() : BIAS::ImageBase
  • GetPixelNearestNeighbor() : BIAS::Image< StorageType >
  • GetPixelPosition() : BIAS::ImageBase
  • GetPixelSizeXMeter() : BIAS::ImageAttributes
  • GetPixelSizeYMeter() : BIAS::ImageAttributes
  • GetPixelValueDepth() : BIAS::OpenGLCanvasBase
  • GetPixelValueRGB() : BIAS::OpenGLCanvasBase
  • GetPixelValueRGBA() : BIAS::OpenGLCanvasBase
  • GetPlueckerLineCoordinates() : BIAS::PlueckerMatrix
  • GetPMatrix2() : BIAS::TrifocalTensor
  • GetPMatrix3() : BIAS::TrifocalTensor
  • GetPointAndCovariance() : BIAS::Conic2D
  • GetPointFin() : BIAS::HomgLine3D
  • GetPointInf() : BIAS::HomgLine3D
  • GetPoints() : BIAS::MatchDataBase, BIAS::Tracker< StorageType, CalculationType >
  • GetPointSet() : BIAS::Contour
  • GetPose() : BIAS::ProjectionParametersBase, BIAS::Projection
  • GetPoseParameters() : BIAS::Pose
  • GetPoseParametrization() : BIAS::ProjectionParametersBase
  • GetPosition() : BIAS::PoseParametrization
  • GetPositionOffset() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • GetPrincipal() : BIAS::ProjectionParametersBase
  • GetPrincipalPoint() : BIAS::ImageAttributes
  • GetPrincipalX() : BIAS::CameraParam
  • GetPrincipalY() : BIAS::CameraParam
  • GetProj() : BIAS::Camera< StorageType >
  • GetProjection() : BIAS::ProjectionDialog, BIAS::ProjectionGUI
  • GetPseudoInverse() : BIAS::PMatrix
  • GetPyramidSize() : BIAS::PyramidImage< StorageType >
  • GetQ() : BIAS::SimilarityTransform, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::CoordinateTransform3D
  • GetQuaternion() : BIAS::RMatrixBase
  • GetR() : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • GetRadius() : BIAS::CameraParam, BIAS::ProjectionParametersSpherical
  • GetRatio() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetRational_() : BIAS::ImageAttributes
  • GetRatioPointer() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetRayWorldCoo() : BIAS::PMatrix
  • GetRealTime() : BIAS::TimeMeasure
  • GetRejectionType() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • GetRescaleFactor() : BIAS::PyramidImage< StorageType >
  • GetResiduiMAD() : BIAS::Tracker< StorageType, CalculationType >
  • GetResiduiMSD() : BIAS::Tracker< StorageType, CalculationType >
  • GetResult() : BIAS::FFT
  • GetResults() : BIAS::Tracker< StorageType, CalculationType >
  • getRigSize() : BIAS::RigParameter
  • GetRMax() : BIAS::EpipolarLine
  • GetRMin() : BIAS::EpipolarLine
  • GetROffset() : BIAS::EpipolarLine
  • GetROI() : BIAS::ColorHistogram< StorageType >, BIAS::ImageBase
  • GetROICorners() : BIAS::ImageBase
  • GetROILowerRightX() : BIAS::ImageBase
  • GetROILowerRightY() : BIAS::ImageBase
  • GetROIUpperLeftX() : BIAS::ImageBase
  • GetROIUpperLeftY() : BIAS::ImageBase
  • GetRotation() : BIAS::RigParameter
  • GetRotationAnglesXYZ() : BIAS::RMatrixBase
  • GetRotationAnglesZYX() : BIAS::RMatrixBase
  • GetRotationAxisAngle() : BIAS::RMatrixBase
  • GetRotationMatrix() : BIAS::Quaternion< QUAT_TYPE >
  • GetRotations() : BIAS::RigParameter
  • GetRotationTranslation() : BIAS::EMatrix
  • GetRow() : BIAS::Matrix3x3< T >, BIAS::Matrix< T >
  • GetRows() : BIAS::Matrix< T >
  • GetS() : BIAS::SVD, BIAS::CovMatrix3x3
  • GetSamplePositions() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • GetSampleSolution() : BIAS::MSAC< SolutionType >
  • GetSampleSolutions() : BIAS::RANSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • GetSatImage() : BIAS::ColorSegmentation
  • GetSaturatedBins() : BIAS::ColorHistogram< StorageType >
  • GetSearchArea() : BIAS::CovMatrix3x3
  • GetSendImage() : BIAS::VideoServer
  • GetSensorCenter() : BIAS::RigParameter
  • GetSensorCenters() : BIAS::RigParameter
  • GetSensorInfo() : CuEye
  • GetSensorRotation() : BIAS::RigParameter
  • GetSensorRotations() : BIAS::RigParameter
  • GetSepfh() : BIAS::FilterMask
  • GetSepfv() : BIAS::FilterMask
  • GetSepih() : BIAS::FilterMask
  • GetSepiv() : BIAS::FilterMask
  • GetShort_() : BIAS::ImageAttributes
  • GetShowCodeInfo() : BIAS::LogFacility
  • GetShowScaled() : BIAS::ImageCanvas
  • GetShutter() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • GetSigma() : BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Distribution
  • GetSigmaPointer() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • GetSignature() : BIAS::Quadric3D, BIAS::Conic2D
  • GetSingleImage() : BIAS::PyramidImage< StorageType >
  • GetSingularValue() : BIAS::SVD
  • GetSize() : BIAS::Mean< InputStorageType, OutputStorageType >, BIAS::FilterMask, BIAS::ImageBase
  • GetSizeOfLongestParamName() : BIAS::Param
  • GetSizeOfLongestParamValueString() : BIAS::Param
  • GetSizePointer() : BIAS::Mean< InputStorageType, OutputStorageType >
  • GetSkew() : BIAS::KMatrix
  • GetSkewSymmetricMatrix() : BIAS::Vector3< T >
  • GetSourceCoordinates_() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >, BIAS::ProjectionMapping< InputStorageType, OutputStorageType >, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::CylinderMapping, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetSphereCenter() : BIAS::SphericalUndistortion
  • GetSphereRadius() : BIAS::SphericalUndistortion
  • GetState() : BIAS::Kalman
  • GetStorageType() : BIAS::ImageBase
  • GetString() : BIAS::UUID
  • GetString_() : BIAS::ImageAttributes
  • GetSVD() : BIAS::PMatrix
  • GetSystemMatrix() : BIAS::Matrix< T >
  • GetTag() : Base
  • GetTangentPoints() : BIAS::Conic2D
  • GetTexCoords() : BIAS::TriangleMesh
  • GetTexId() : BIAS::ImageCanvasGLBase
  • GetTexobj() : BIAS::ImageCanvasGLBase
  • GetTexTarget() : BIAS::ImageCanvasGLBase
  • GetTexture() : BIAS::TriangleMesh
  • GetThreadedReceive() : BIAS::CScommBase
  • GetTime() : BIAS::Camera< StorageType >
  • GetTitle() : BIAS::GuiBase
  • GetTop() : BIAS::VideoSource_DCAM
  • GetTrackerType() : BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • GetTransformedEnd() : BIAS::EpipolarLine
  • GetTransformedStart() : BIAS::EpipolarLine
  • GetTransmissionTime() : BIAS::VideoSource_DCAM
  • GetTriangleIndices() : BIAS::TriangleMesh
  • GetTrilinearImageValue_() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • GetTypeName() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetU() : BIAS::SVD
  • GetUID() : BIAS::ImageBase
  • GetUndistortion() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • GetUniformDistributed() : BIAS::Random
  • GetUniformDistributedInt() : BIAS::Random
  • GetUp_gl() : BIAS::PMatrix
  • GetUserFreq() : BIAS::TimeMeasure
  • GetUserTime() : BIAS::TimeMeasure
  • GetUUIDCreationTime() : BIAS::UUID
  • GetUUIDRaw() : BIAS::UUID
  • GetV() : BIAS::SVD, BIAS::PMatrix
  • GetValueString() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • GetVariance() : BIAS::Condensation, BIAS::Distribution
  • GetVector() : BIAS::VectorPanel, BIAS::ROI
  • getVector() : TNT::Vector_Adaptor< BBVec >
  • GetVersionNumber() : BIAS::ImageBase
  • GetVertices() : BIAS::TriangleMesh
  • GetVertRightShift() : BIAS::FilterMask
  • GetViewController() : BIAS::OpenGLCanvas
  • GetVSync() : BIAS::OpenGLCanvasBase
  • GetVSyncInterval() : BIAS::SettingsGL
  • GetVT() : BIAS::SVD
  • GetW() : BIAS::Vector2< T >, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgLine2D
  • GetWeightedVariance() : BIAS::Condensation
  • GetWidth() : BIAS::VideoSource, BIAS::CameraParam, BIAS::OpenGLCanvasBase, BIAS::ImageBase
  • GetWidthROI() : BIAS::ColorHistogram< StorageType >
  • GetWidthStep() : BIAS::ImageBase
  • GetX() : BIAS::Vector2< T >, BIAS::HomgPoint3D
  • GetY() : BIAS::Vector2< T >, BIAS::HomgPoint3D
  • GetZ() : BIAS::HomgPoint3D
  • GetZeroThreshold() : BIAS::SVD
  • GetZoom() : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • GetZoomImage() : BIAS::ZoomImageCanvas, BIAS::GuiEnhanced
  • GetZoomUndistortion() : BIAS::CameraParam
  • GlobalToLocal() : BIAS::CoordinateTransform3D
  • GoodValue() : BIAS::ExifTag
  • GrabContThread_() : BIAS::VideoSource_V4L
  • GrabSingle() : BIAS::VideoSource_V4L, BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • GrabSingleDepth() : BIAS::VideoSource_DiskPMD
  • GrabSingleModCoeff() : BIAS::VideoSource_DiskPMD
  • GrabSingleRight() : BIAS::VideoSource_Stereo
  • GradientGauss() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • GradientGaussAsymmetric() : BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >
  • GradientSimple() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • GradientSobel3x3() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • GreyToRGB_() : BIAS::ImageConvert
  • GtkMain() : BIAS::GuiGTK
  • GuiBase() : BIAS::GuiBase
  • GuiEnhanced() : BIAS::GuiEnhanced
  • GuiGTK() : BIAS::GuiGTK
  • GuiWX() : BIAS::GuiWX
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- h -

  • h_() : BIAS::GaussHelmert
  • HarrisValue() : BIAS::ColorHarris
  • Hartley() : BIAS::Normalization
  • HasRealSolution() : BIAS::PolynomialSolve
  • HFromMeta_() : BIAS::PMDImageProc
  • Histogram() : BIAS::Histogram
  • Histogram2D() : BIAS::Histogram2D
  • HMatrix() : BIAS::HMatrix
  • HMatrixBase() : BIAS::HMatrixBase
  • HMatrixEstimation() : BIAS::HMatrixEstimation
  • HMatrixToParams() : BIAS::Parametrization
  • HomgLine2D() : BIAS::HomgLine2D
  • HomgLine3D() : BIAS::HomgLine3D
  • HomgPlane3D() : BIAS::HomgPlane3D
  • HomgPoint1D() : BIAS::HomgPoint1D
  • HomgPoint2D() : BIAS::HomgPoint2D
  • HomgPoint2DCov() : BIAS::HomgPoint2DCov
  • HomgPoint3D() : BIAS::HomgPoint3D
  • HomgPoint3DCov() : BIAS::HomgPoint3DCov
  • Homogenize() : BIAS::HomgPoint3DCov, BIAS::HomgPoint3D, BIAS::HomgPoint2DCov, BIAS::HomgPoint2D, BIAS::HomgPoint1D, BIAS::HomgLine3D, BIAS::HomgLine2D
  • HomographyMapping() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • HSLToGrey_() : BIAS::ImageConvert
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- i -

  • ICECallbackInterface() : BIAS::ICECallbackInterface
  • Image() : BIAS::Image< StorageType >
  • Image3DData() : BIAS::Image3DData
  • ImageAttributes() : BIAS::ImageAttributes
  • ImageBase() : BIAS::ImageBase, BIAS::ImageConvert
  • ImageCanvas() : BIAS::ImageCanvas
  • ImageCanvasEnhanced() : BIAS::ImageCanvasEnhanced
  • ImageCanvasGLBase() : BIAS::ImageCanvasGLBase
  • ImageConvertThreaded() : BIAS::ImageConvertThreaded
  • ImgObjGL() : BIAS::ImgObjGL
  • ImportDevIL() : BIAS::ImageIO
  • ImportImage() : BIAS::ImageIO
  • ImportImagePnm_() : BIAS::ImageIO
  • ImportImageViff_() : BIAS::ImageIO
  • ImportImlib() : BIAS::ImageIO
  • ImportMagickPP() : BIAS::ImageIO
  • ImportMagickPPAutoconvert() : BIAS::ImageIO
  • ImportOpenEXR() : BIAS::ImageIO
  • ImportRADIANCE() : BIAS::ImageIO
  • ImportRAWwithHeader() : BIAS::ImageIO
  • ImportReal32() : BIAS::ImageIO
  • index() : TNT::Fortran_Sparse_Vector< T >
  • Index1D() : TNT::Index1D
  • Init() : BIAS::VideoServer, BIAS::Kalman, BIAS::Condensation, BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::LeastSquaresBase, BIAS::FFT, BIAS::PlaneRANSAC, BIAS::doubleRANSAC, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::UnVignette, BIAS::SphericalUndistortion, BIAS::PyramidImage< StorageType >, BIAS::MatlabTBUndistortion, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::JpegHandler, BIAS::CameraParam, BIAS::TrifocalTensor, BIAS::EpipolarLine, BIAS::FilterMask, BIAS::ScanLine2, BIAS::ScanLine, BIAS::ImageBase, BIAS::Image< StorageType >, BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • Init_() : BIAS::VideoShMFeeder, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Contour, BIAS::Camera< StorageType >, BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • InitBezier() : BIAS::Interpolator
  • InitCam() : BIAS::VideoSource_DCAM
  • InitCamera() : CuEye
  • InitCameras() : BIAS::MDcam
  • InitCubicUniformBSpline() : BIAS::BSplineCurve
  • InitDevIL() : BIAS::ImageIO
  • InitDistanceImage_() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • InitEvent() : CuEye
  • InitExifTags() : BIAS::ImageAttributes
  • InitFont() : BIAS::DrawTextGL
  • InitFromF() : BIAS::EMatrix
  • InitGeometry() : MyGLCanvas
  • InitGtk() : BIAS::GuiGTK
  • InitGtk_() : BIAS::GuiGTK
  • InitHist() : BIAS::Histogram2D, BIAS::Histogram
  • initialize() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Initialize() : BIAS::ProjectionParametersIO
  • InitializeSensor() : BIAS::ProjectionParametersIO
  • InitImage() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_DSHOW, BIAS::VideoSource
  • InitKernel_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • InitLinear() : BIAS::Interpolator
  • InitMembers() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas, BIAS::ImgObjGL, BIAS::ImageCanvasGLBase, BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController
  • InitMembers_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • InitModelDefaults() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • InitP1P2Trans() : BIAS::PMatrixEstimation
  • InitPerspective() : BIAS::CameraParam
  • InitPrior() : BIAS::Condensation
  • InitPriorPositions() : BIAS::CondensImg, BIAS::CondensHisto, BIAS::Condensation
  • InitQuadraticUniformBSpline() : BIAS::BSplineCurve
  • InitSpherical() : BIAS::CameraParam
  • InitSpline() : BIAS::Interpolator
  • InitSpline2() : BIAS::Interpolator
  • InitSpline3() : BIAS::Interpolator
  • InitSplineAkima() : BIAS::Interpolator
  • InitVideoCapture_() : BIAS::VideoSource_DSHOW
  • InitWithContext() : BIAS::OpenGLCanvasBase
  • InitWithForeignData() : BIAS::Image< StorageType >
  • InquireImageMem() : CuEye
  • Instance() : BIAS::LogFacility
  • IntegralHistogram() : BIAS::IntegralHistogram
  • Interpolate_() : BIAS::EpipolarLine
  • InterpolateAbsZoom_() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • InterpolateDistortionFromIndex_() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • InterpolatedLine() : BIAS::ImageDraw< StorageType >
  • InterpolatedLineGrey() : BIAS::ImageDraw< StorageType >
  • InterpolateFocalLength_() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • InterpolationGrey() : BIAS::Image< StorageType >
  • Interpolator() : BIAS::Interpolator
  • Intersect() : BIAS::Triangulation
  • Intersection() : BIAS::HomgLine2D
  • IntersectsCircle() : BIAS::Conic2D
  • Invalidate() : BIAS::UUID
  • InvalidateDecomposition() : BIAS::PMatrix
  • InvalidatePCA() : BIAS::CovMatrix3x3
  • InvalidateUID() : BIAS::ImageBase
  • Inverse() : BIAS::Quaternion< QUAT_TYPE >
  • InverseTransform() : BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >
  • Invert() : BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::SVD, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::KMatrix
  • InvertIP() : BIAS::Matrix3x3< T >, BIAS::SimilarityTransform, BIAS::CoordinateTransform3D, BIAS::Matrix3x3< T >
  • IP_RGBToGrey_() : BIAS::ImageConvert
  • IP_ToGrey() : BIAS::ImageConvert
  • IP_YUV422ToGrey_() : BIAS::ImageConvert
  • Ipl2BIAS() : BIAS::ImageConvert
  • IsAllocated_() : BIAS::GuiGTK
  • IsAtInfinity() : BIAS::HomgPoint3D, BIAS::HomgPoint2D
  • IsContextAvailable() : BIAS::OpenGLCanvasBase
  • IsCValid() : BIAS::Camera< StorageType >
  • IsDoubleLine() : BIAS::Conic2D
  • IsEllipse() : BIAS::Conic2D
  • IsEmpty() : BIAS::PyramidImage< StorageType >, BIAS::Histogram, BIAS::Projection, BIAS::Conic2D, BIAS::ImageBase
  • IsFg() : BIAS::Contour
  • IsfValid() : BIAS::Camera< StorageType >
  • IsGrabbingContinous() : BIAS::VideoSource
  • IsHomogenized() : BIAS::HomgPoint3DCov, BIAS::HomgPoint3D, BIAS::HomgPoint2DCov, BIAS::HomgPoint2D
  • IsHyperbola() : BIAS::Conic2D
  • IsIdentity() : BIAS::Matrix< T >
  • IsInFrontOfCamera() : BIAS::PMatrix
  • IsInitialized() : BIAS::UnVignette, BIAS::CameraParam, BIAS::DrawTextGL
  • IsInMap_() : BIAS::BaseFactory< BaseClassType >
  • IsInROI() : BIAS::ROI, BIAS::ImageBase, BIAS::HomgPoint2D
  • IsInROIHomogenized() : BIAS::HomgPoint2D
  • IsInterleaved() : BIAS::ImageBase
  • IsKValid() : BIAS::Camera< StorageType >
  • IsMetric() : BIAS::PMatrix
  • IsMono() : BIAS::RenderModeGL
  • IsNil() : BIAS::UUID
  • IsOrientationValid() : BIAS::Camera< StorageType >
  • IsParabola() : BIAS::Conic2D
  • IsPerspective() : BIAS::CameraParam
  • IsPlanar() : BIAS::ImageBase
  • IsPoint() : BIAS::Conic2D
  • IsPointValid() : BIAS::Camera< StorageType >
  • IsPositionInImage() : BIAS::ImageBase
  • IsPowerOfTwoSize() : BIAS::ImageBase
  • IsProjValid() : BIAS::Camera< StorageType >
  • IsPValid() : BIAS::Camera< StorageType >
  • IsRectangleTexture() : BIAS::ImgObjGL
  • IsRunning() : BIAS::TimeMeasure
  • IsRValid() : BIAS::Camera< StorageType >
  • IsSeparable() : BIAS::FilterMask
  • IsSingleLine() : BIAS::Conic2D
  • IsSize1x1() : BIAS::FilterMask
  • IsSpherical() : BIAS::CameraParam
  • IsStereoQuadbuffered() : BIAS::RenderModeGL
  • IsTimeValid() : BIAS::Camera< StorageType >
  • IsUsedGroupID() : BIAS::Param
  • IsValid() : BIAS::FMatrix, BIAS::UUID
  • IsZero() : BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • IsZoomCamera() : BIAS::CameraParam
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- p -

  • Pad() : BIAS::ImageBase
  • PadPoints_() : BIAS::Tracker< StorageType, CalculationType >
  • PadToPowerOfTwo() : BIAS::ImageBase
  • PadToPowerOfTwoAndFlip() : BIAS::ImageBase
  • ParabolaNCC() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • ParabolaNCC5() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • Param() : BIAS::Param
  • ParamAdd() : MyAlgorithm
  • ParamCallbackInterface() : BIAS::ParamCallbackInterface
  • ParameterChanged() : BIAS::ParamCallbackInterface, BIAS::Tracker< StorageType, CalculationType >, MyAlgorithm
  • Parametrization() : BIAS::Parametrization
  • Parametrization2R_() : BIAS::PMatrixBase
  • ParamGUI() : BIAS::ParamGUI
  • ParamGUIDialog() : BIAS::ParamGUIDialog
  • ParamGUIPanel() : BIAS::ParamGUIPanel
  • ParamsToEMatrix() : BIAS::Parametrization
  • ParamsToFMatrix() : BIAS::Parametrization
  • ParamsToHMatrix() : BIAS::Parametrization
  • ParamTypeBase() : BIAS::ParamTypeBase
  • ParamTypeBool() : BIAS::ParamTypeBool
  • ParamTypeDouble() : BIAS::ParamTypeDouble
  • ParamTypeEnum() : BIAS::ParamTypeEnum
  • ParamTypeInt() : BIAS::ParamTypeInt
  • ParamTypeString() : BIAS::ParamTypeString
  • ParamTypeVecDbl() : BIAS::ParamTypeVecDbl
  • ParamTypeVecInt() : BIAS::ParamTypeVecInt
  • ParseCommandLine() : BIAS::Param
  • ParseListFile() : BIAS::Param
  • ParseMetaData() : BIAS::Camera< StorageType >
  • ParseRAWwithHeader() : BIAS::ImageIO
  • ParseView() : BIAS::RigParameter
  • Paste2ROI() : BIAS::ImageBase
  • PerformClassFunctionOnListedFiles() : FindFilesInPath
  • PerformFunctionOnListedFiles() : FindFilesInPath
  • Phi() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • PickImportanceSample_() : BIAS::Condensation
  • PickOneSample_() : BIAS::Condensation
  • PixelValue() : BIAS::Image< StorageType >
  • PixelValueBase() : BIAS::ImageBase
  • PixelValueInterleaved() : BIAS::Image< StorageType >
  • PlainImageCanvas() : PlainImageCanvas
  • PlaneRANSAC() : BIAS::PlaneRANSAC
  • PlueckerMatrix() : BIAS::PlueckerMatrix
  • PMatrix() : BIAS::PMatrix
  • PMatrixBase() : BIAS::PMatrixBase
  • PMatrixEstimation() : BIAS::PMatrixEstimation
  • PMatrixLinear() : BIAS::PMatrixLinear
  • PolarToCartesian() : BIAS::Vector3< T >
  • PolarTransform() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • Polynom() : BIAS::Polynom
  • PolynomialSolve() : BIAS::PolynomialSolve
  • Pose() : BIAS::Pose
  • Pose2CQ_() : BIAS::PoseParametrization
  • PoseFromMeta() : BIAS::PMDImageProc
  • PoseParametrization() : BIAS::PoseParametrization
  • PoseParametrizationCovariance() : BIAS::PoseParametrizationCovariance
  • Position() : BIAS::Position
  • PostGrab() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • postmultiply1() : BIAS::Tensor3D3x3x3< T >
  • postmultiply2() : BIAS::Tensor3D3x3x3< T >
  • postmultiply3() : BIAS::Tensor3D3x3x3< T >
  • PowerOfTwoSize() : BIAS::ImageBase
  • Predict() : BIAS::Kalman
  • PredictNewSamplePositions() : BIAS::Condensation
  • PreGrab() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource_Net, MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DSHOW, BIAS::VideoSource_Disk, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • premultiply1() : BIAS::Tensor3D3x3x3< T >
  • premultiply2() : BIAS::Tensor3D3x3x3< T >
  • premultiply3() : BIAS::Tensor3D3x3x3< T >
  • PrepareLeastSquaresMin_() : BIAS::UnVignette
  • PrepareLuImage_() : BIAS::UnVignette
  • PrepareLuTSpline() : BIAS::Interpolator
  • PreparePyramide() : BIAS::Tracker< StorageType, CalculationType >
  • Print() : BIAS::DrawTextGL, BIAS::CameraViewport, BIAS::CameraViewInternals, BIAS::CameraViewFrustum, BIAS::CameraViewExternals, BIAS::CameraViewController, BIAS::ImageAttributes, BIAS::ExifTag, BIAS::TimeMeasure
  • Print3D() : BIAS::DrawTextGL
  • Print3DAbsolute() : BIAS::DrawTextGL
  • PrintAppData() : BIAS::Camera< StorageType >
  • PrintCycleCount() : BIAS::TimeMeasure
  • PrintData() : BIAS::Image< StorageType >
  • PrintDebugLevel() : BIAS::Debug
  • PrintFormatAndMode_() : BIAS::VideoSource_DCAM
  • PrintHeader() : BIAS::VideoStream, BIAS::ImageBase
  • PrintHelp() : BIAS::OpenGLCanvasBase
  • PrintIdleTime() : BIAS::TimeMeasure
  • PrintInfoDevIL() : BIAS::ImageIO
  • PrintKernel() : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Convolution< InputStorageType, OutputStorageType >
  • PrintKernelTime() : BIAS::TimeMeasure
  • PrintLogLevel() : BIAS::LogFacility
  • PrintMsecHumanReadable() : BIAS::TimeMeasure
  • PrintNormCoords() : BIAS::DrawTextGL
  • PrintPointer() : BIAS::Image< StorageType >
  • PrintRealTime() : BIAS::TimeMeasure
  • PrintROI() : BIAS::ImageBase
  • PrintUserTime() : BIAS::TimeMeasure
  • PrintWinCoords() : BIAS::DrawTextGL
  • Process() : BIAS::Condensation, BIAS::Contour, BIAS::Label
  • ProcessImage() : BIAS::VideoShMFeeder
  • ProcessOneImage() : BIAS::VideoServer
  • Project() : BIAS::ProjectionParametersBase, BIAS::Projection
  • ProjectCoord() : BIAS::SphericalUndistortion
  • ProjectCoordBack() : BIAS::SphericalUndistortion
  • ProjectCutOut() : BIAS::SphericalUndistortion
  • ProjectCutOut1() : BIAS::SphericalUndistortion
  • ProjectCutOut2() : BIAS::SphericalUndistortion
  • ProjectImageCylindric() : BIAS::SphericalUndistortion
  • Projection() : BIAS::Projection
  • Projection3DData() : BIAS::Projection3DData
  • ProjectionDialog() : BIAS::ProjectionDialog
  • ProjectionGUI() : BIAS::ProjectionGUI
  • ProjectionMapping() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • ProjectionParametersBase() : BIAS::ProjectionParametersBase
  • ProjectionParametersPerspective() : BIAS::ProjectionParametersPerspective
  • ProjectionParametersProjective() : BIAS::ProjectionParametersProjective
  • ProjectionParametersSpherical() : BIAS::ProjectionParametersSpherical
  • ProjectionParametersZoom() : BIAS::ProjectionParametersZoom
  • ProjectLocal() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • ProjectSphereImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • PyramidImage() : BIAS::PyramidImage< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- q -

  • Quadratic() : BIAS::PolynomialSolve
  • QuadraticUniformBSpline() : BIAS::BSplineCurve
  • Quadric3D() : BIAS::Quadric3D
  • Quartic() : BIAS::PolynomialSolve
  • Quaternion() : BIAS::Quaternion< QUAT_TYPE >
  • QueryCam() : BIAS::VideoSource_DCAM
  • QueryInterface() : BIAS::MySampleGrabberCB
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- r -

  • Radius() : BIAS::Vector3< T >, BIAS::Vector2< T >
  • ran1_() : BIAS::Random
  • ran1c_() : BIAS::Random
  • ran2_() : BIAS::Random
  • Random() : BIAS::Random
  • Rank() : BIAS::SVD
  • RANSAC() : BIAS::RANSAC< SolutionType >
  • RANSACPreKnowledge() : BIAS::RANSACPreKnowledge< SolutionType >
  • read() : TNT::stopwatch, BIAS::XMLIO
  • Read() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::PMDImageProc, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::PMDImageIO, BIAS::ImageIO, BIAS::ImageAttributes
  • Read2DImage16Bit_() : BIAS::PMDImageIO
  • Read2DImage8Bit_() : BIAS::PMDImageIO
  • ReadBinary() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ROI
  • ReadBinaryData() : BIAS::ColorHistogram< StorageType >
  • ReadCameraData() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCameraDataV0_8() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCameraDataV1_0() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadCorrespondences() : BIAS::GenGroundTruth
  • ReadCycleCounter() : BIAS::TimeMeasure
  • ReadData() : BIAS::GenSynthMatches
  • ReadDepthImage_() : BIAS::PMDImageIO
  • ReadDigitalPort() : CuEye
  • ReadEEPROM() : CuEye
  • ReadFromCamParamFile() : BIAS::Projection
  • ReadFromCMP() : BIAS::RigParameter
  • ReadFromEXIF() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • ReadFromString() : BIAS::XMLIO
  • ReadJPEG() : BIAS::JpegHandler
  • ReadMagickPP() : BIAS::ImageAttributes
  • ReadMetaData_() : BIAS::PMDImageIO
  • ReadModCoeffImage_() : BIAS::PMDImageIO
  • ReadParameter() : BIAS::Param
  • ReadParameterXML() : BIAS::Param
  • ReadRigData() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • ReadRigDataV0_8() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • ReadTracks_() : BIAS::TrackerSynth< StorageType, CalculationType >
  • ReadTriggerPort() : CuEye
  • ReadWorldPoints() : BIAS::GenGroundTruth
  • Recalc() : BIAS::EpipolarLine
  • receiveThread_() : BIAS::CScommBase
  • Reciprocal() : BIAS::Image< StorageType >
  • Rectangle() : BIAS::ImageDraw< StorageType >
  • RectangleCenter() : BIAS::ImageDraw< StorageType >
  • RectangleCenterGrey() : BIAS::ImageDraw< StorageType >
  • RectangleCenterGreyFill() : BIAS::ImageDraw< StorageType >
  • RectangleCorners() : BIAS::ImageDraw< StorageType >
  • RectangleCornersGrey() : BIAS::ImageDraw< StorageType >
  • RectangleCornersGreyFill() : BIAS::ImageDraw< StorageType >
  • RectangleSelected() : BIAS::ICECallbackInterface, MyFrame
  • RedirectCerr() : BIAS::RedirectStreams
  • RedirectCout() : BIAS::RedirectStreams
  • RedirectImageDataPointer() : BIAS::ImageBase
  • RedirectStreams() : BIAS::RedirectStreams
  • Redraw_() : BIAS::GuiGTK
  • RedrawHist_() : BIAS::Histogram
  • RefinePyramideNCC() : BIAS::CornerMatcher
  • RefineSolution() : BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • RefitClients() : MainFrame
  • RefreshDrawIm_() : BIAS::ImageCanvasEnhanced
  • Region1D() : TNT::Region1D< Array1D >
  • Region2D() : TNT::Region2D< Array2D >
  • RegionMatcher() : BIAS::RegionMatcher
  • RegisterCallbackObject() : BIAS::Param
  • RegisterMsg() : BIAS::CScommBase
  • ReInitWindow_() : BIAS::GuiGTK
  • RejectMAD_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • RejectX86_() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Release() : BIAS::FFT, BIAS::PyramidImage< StorageType >, BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::JpegHandler, BIAS::ImgObjGL, BIAS::ROI, BIAS::ImageBase, BIAS::Image< StorageType >
  • ReleaseCameras() : BIAS::MDcam
  • ReleaseHist() : BIAS::Histogram
  • ReleaseImageDataPointer() : BIAS::ImageBase
  • RelLeftNullspaceDim() : BIAS::SVD
  • RelNullspaceDim() : BIAS::SVD
  • RelRightNullspaceDim() : BIAS::SVD
  • RemoveAll() : BIAS::ThreeDOut
  • RemoveAllEllipsoids() : BIAS::ThreeDOut
  • RemoveAllImages() : BIAS::ThreeDOut
  • RemoveAllLines() : BIAS::ThreeDOut
  • RemoveAllPMatrices() : BIAS::ThreeDOut
  • RemoveAllPoints() : BIAS::ThreeDOut
  • RemoveDebugLevel() : BIAS::Debug
  • RemoveEllipsoid() : BIAS::ThreeDOut
  • RemoveImage() : BIAS::ThreeDOut
  • RemoveLine() : BIAS::ThreeDOut
  • RemovePMatrix() : BIAS::ThreeDOut
  • RemovePoint() : BIAS::ThreeDOut
  • RenderBitmap() : CuEye
  • RenderModeGL() : BIAS::RenderModeGL
  • Renumerate() : CuEye
  • ReplaceAllPoints() : BIAS::Tracker< StorageType, CalculationType >
  • ReplaceLastImages() : BIAS::Tracker< StorageType, CalculationType >
  • ReplacePoints() : BIAS::Tracker< StorageType, CalculationType >
  • Rescale() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Rescale< InputStorageType, OutputStorageType >
  • ReserveInternals_() : BIAS::Tracker< StorageType, CalculationType >
  • reset() : TNT::stopwatch
  • Reset() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::Tracker< StorageType, CalculationType >, BIAS::CylinderMapping, BIAS::Random, BIAS::Distribution, BIAS::TimeMeasure
  • ResetCerr() : BIAS::RedirectStreams
  • ResetCout() : BIAS::RedirectStreams
  • ResetDebugLevelFromGlobal() : BIAS::ExampleDebug
  • ResetFloatFilter() : BIAS::FilterMask
  • ResetIntFilter() : BIAS::FilterMask
  • ResetStream() : BIAS::LogFacility
  • Reshape() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas
  • Resize() : BIAS::ROI
  • resize() : TNT::Vector_Adaptor< BBVec >
  • Resize_() : BIAS::VideoSource_Shm, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • ResizeInternals_() : BIAS::Tracker< StorageType, CalculationType >
  • ResizeWindow() : BIAS::WrapBias2Ipl
  • Reverse_() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • Rewind() : BIAS::VideoSource_Disk
  • RGBAToRGB_() : BIAS::ImageConvert
  • RGBToGrey_() : BIAS::ImageConvert
  • RGBTohsL_() : BIAS::ImageConvert
  • RGBToHSL_() : BIAS::ImageConvert
  • RGBToHSV_() : BIAS::ImageConvert
  • RightNullspaceDim() : BIAS::SVD
  • RigParameter() : BIAS::RigParameter
  • RMatrix() : BIAS::RMatrix
  • RMatrixBase() : BIAS::RMatrixBase
  • ROI() : BIAS::ROI
  • RotateToGrey() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • row_ind() : TNT::Fortran_Sparse_Col_Matrix< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- s -

  • SAD() : BIAS::RegionMatcher
  • SADN() : BIAS::RegionMatcher
  • SamePixelAndChannelCount() : BIAS::ImageBase
  • SameSize() : BIAS::ROI
  • SampleCB() : BIAS::MySampleGrabberCB
  • Save() : BIAS::SimilarityTransform, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >, BIAS::ImageIO, BIAS::PoseParametrization
  • SaveGraphFile_() : BIAS::VideoSource_DSHOW
  • SaveImage() : CuEye
  • SaveImageMem() : CuEye
  • SaveUnVignetted() : MainFrame
  • ScalarProduct() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Scale() : BIAS::Tensor3D< T >, BIAS::Matrix3x3< T >
  • ScaleCol() : BIAS::Matrix< T >
  • ScaledImageCanvas() : BIAS::ScaledImageCanvas
  • ScaleRow() : BIAS::Matrix< T >
  • ScaleShift() : BIAS::Image< StorageType >
  • ScaleShiftBetween() : BIAS::Image< StorageType >
  • ScanBus() : BIAS::MDcam
  • ScanLine() : BIAS::EpipolarLine, BIAS::ScanLine
  • ScanLine2() : BIAS::ScanLine2
  • ScanLine_() : BIAS::EpipolarLine
  • ScreenShot() : BIAS::OpenGLCanvasBase
  • SecondOrderARP_() : BIAS::Condensation
  • Segment() : BIAS::ColorSegmentationThreaded, BIAS::ColorSegmentation
  • Segment_() : BIAS::ColorSegmentationThreaded
  • SelectDefault() : BIAS::VideoSource_DCAM
  • SelectLine() : BIAS::GuiEnhanced
  • SelectLineZoom() : BIAS::GuiEnhanced
  • SelectPoint() : BIAS::GuiEnhanced
  • SelectQuadrate() : BIAS::GuiEnhanced
  • SelectRectangle() : BIAS::ImageCanvasEnhanced, BIAS::GuiEnhanced
  • SendMsg() : BIAS::CScommBase
  • SendMsg_() : BIAS::CScommBase
  • set() : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • Set() : BIAS::Projection3DData, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ImageCanvasGLBase, BIAS::SimilarityTransform, BIAS::Pose, BIAS::CoordinateTransform3D, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::RMatrixBase, BIAS::PoseParametrization, BIAS::PlueckerMatrix, BIAS::KMatrix, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPlane3D, BIAS::HomgLine3D, BIAS::HomgLine2D, BIAS::FMatrixBase, BIAS::EuclideanTransf3D, BIAS::EMatrixBase
  • set_identity() : BIAS::PMatrixBase
  • SetAbortOnFatal() : BIAS::LogFacility
  • SetActiveImage() : BIAS::CondensHisto
  • SetAlpha() : BIAS::UnscentedTransform
  • SetArea() : BIAS::CondensImg, BIAS::CondensHisto
  • SetASCIIString() : BIAS::Camera< StorageType >
  • SetAsCrossProductMatrix() : BIAS::Matrix3x3< T >
  • SetAspectratio() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • SetAsRotationMatrix() : BIAS::AffineTransf
  • SetAutoadaptScale() : BIAS::ScaledImageCanvas
  • SetAutomaticPortChange() : BIAS::CScommBase
  • SetBackGround() : BIAS::Contour
  • SetBeta() : BIAS::UnscentedTransform
  • SetBin() : BIAS::Histogram
  • SetBinCount() : BIAS::Histogram
  • SetBinning() : BIAS::VideoSource_DCAM
  • SetBinSize() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetBitDepth() : BIAS::ImageBase
  • SetBorderHandling() : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • SetBrightness() : CuEye
  • SetBytesPerPacket() : BIAS::VideoSource_DCAM
  • SetBytesPerPixel() : BIAS::VideoSource
  • SetC() : BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::Pose, BIAS::PMatrix, BIAS::CoordinateTransform3D
  • SetCalibration() : BIAS::RigParameter
  • SetCamera() : BIAS::VideoSource_DCAM, BIAS::MDcam
  • SetCameraCenter() : BIAS::RigParameter
  • SetCameraCenters() : BIAS::RigParameter
  • SetCameraID() : BIAS::VideoSource_DCAM
  • SetCameraParam() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >, BIAS::RigParameter
  • SetCaptureDeviceName() : BIAS::VideoSource_DSHOW
  • SetCaptureMode() : CuEye
  • SetCellSize() : BIAS::CameraParam
  • SetChannel() : BIAS::VideoSource
  • SetClearDrawingContext() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • SetCoarsePointUsage() : BIAS::Tracker< StorageType, CalculationType >
  • SetCol() : BIAS::Matrix< T >
  • SetColor() : BIAS::Histogram
  • SetColorMode() : BIAS::VideoSource_Disk, CuEye
  • SetColorModel() : BIAS::VideoSource, BIAS::Histogram2D, BIAS::Histogram, BIAS::ImageBase
  • SetColorSpace() : BIAS::ColorSegmentation
  • SetCompressedData() : BIAS::JpegHandler
  • SetCompression() : BIAS::XMLIO
  • SetConnectionTimeOut() : BIAS::CScommBase
  • setContent() : BIAS::XMLIO
  • SetContrast() : CuEye
  • SetControlPoints() : BIAS::Interpolator, BIAS::BSplineCurve
  • SetCorners() : BIAS::ROI
  • SetCov() : BIAS::ProjectionParametersBase, BIAS::Projection
  • SetCovariance() : BIAS::Pose, BIAS::PMatrix
  • SetCovarianceMatrix() : BIAS::PoseParametrization
  • SetCovEuclidian() : BIAS::Pose
  • SetCQ() : BIAS::PoseParametrization
  • SetData() : BIAS::MatchDataBase
  • SetData_DummyRig() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • SetData_EVID31_147094() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • SetData_OMNITECH_ORIFL_190_3() : BIAS::CameraParam, BIAS::ProjectionParametersIO
  • SetDebugLevel() : BIAS::Debug
  • SetDebugLevelDcam() : BIAS::MDcam
  • SetDebugStream() : BIAS::Debug
  • SetDefault() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase
  • SetDefaultInitFraction() : BIAS::Condensation
  • SetDefaults() : BIAS::Param
  • SetDefaultZoom() : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • SetDeInterlaceType() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetDiffScale() : BIAS::CondensHisto
  • SetDiffScaleSize() : BIAS::CondensHisto
  • SetDirectToDisk() : BIAS::VideoSource
  • SetDisplayHook() : CuEye
  • SetDisplayKeyColor() : CuEye
  • SetDisplayMode() : CuEye
  • SetDisplayOffset() : CuEye
  • SetDisplayWindow() : CuEye
  • SetDownsampling() : BIAS::RigParameter, BIAS::CameraParam
  • SetDownSamplingByTwo() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetDrawMode() : BIAS::Histogram
  • SetEllipse() : BIAS::Conic2D
  • SetEndTangent() : BIAS::Interpolator
  • SetEnhancedFlag() : BIAS::Param
  • SetEpipole() : BIAS::EpipolarLine
  • SetErrorReport() : CuEye
  • SetEuclidean() : BIAS::HomgPoint3DCov, BIAS::HomgPoint2DCov
  • SetExpDist() : BIAS::IntegralHistogram, BIAS::ColorHistogram< StorageType >
  • SetExposureTime() : CuEye
  • SetExternalTrigger() : CuEye
  • Setf() : BIAS::Camera< StorageType >
  • SetFactor() : BIAS::Histogram2D, BIAS::Histogram, BIAS::Rescale< InputStorageType, OutputStorageType >
  • SetFactorOffset() : BIAS::GuiBase
  • SetFeature() : BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • SetFileList() : MainFrame
  • SetFirstOrderScale() : BIAS::CondensHisto
  • SetFocalLength() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • setFocalLength() : BIAS::CylinderMapping
  • SetFocalLengthAndAspect() : BIAS::ProjectionParametersPerspective
  • SetFormat7() : BIAS::VideoSource_DCAM
  • SetFps() : BIAS::MDcam
  • SetFPS() : BIAS::VideoSource_uEye, BIAS::VideoSource
  • SetFrameCount() : BIAS::OpenGLCanvasBase
  • SetFrameCounterAsTimeStamp() : BIAS::VideoSource_Disk
  • SetFrameRate() : CuEye
  • SetFromAxisAngle() : BIAS::RMatrixBase
  • SetFromColumnVectors() : BIAS::Matrix3x3< T >
  • SetFromEulerAngles() : BIAS::PoseParametrizationCovariance
  • SetFromHomogenized() : BIAS::CovMatrix3x3
  • SetFromHV() : BIAS::RMatrixBase
  • SetFromKMatrix() : BIAS::ProjectionParametersIO
  • SetFromLong() : BIAS::UUID
  • SetFromMatrices() : BIAS::Tensor3D3x3x3< T >
  • SetFromMatrix3x4() : BIAS::CoordinateTransform3D
  • SetFromOriUpGL() : BIAS::RMatrixBase
  • SetFromOrthogonalBasis() : BIAS::RMatrixBase
  • SetFromQuaternion() : BIAS::RMatrixBase
  • SetFromRowVectors() : BIAS::Matrix3x3< T >
  • SetFromString() : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool, BIAS::ParamTypeBase, BIAS::UUID
  • SetFromVector() : BIAS::Tensor3D< T >, BIAS::Matrix3x3< T >, BIAS::PMatrixBase, BIAS::HomgPlane3D
  • SetFx() : BIAS::KMatrix
  • SetFy() : BIAS::KMatrix
  • SetGain() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye, BIAS::MDcam
  • SetGamma() : CuEye
  • SetGammaMode() : BIAS::VideoSource_DCAM
  • SetGenerateNewUIDs() : BIAS::VideoSource_DiskPMD, BIAS::VideoSource_Disk
  • SetGlobalDebugLevel() : BIAS::Debug
  • SetGradGaussRatio() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • SetGradGaussSigma() : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • SetGradientType() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • SetGroupName() : BIAS::Param
  • SetHalfWinSize() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • SetHiddenFlag() : BIAS::Param
  • SetHistCount() : BIAS::Histogram
  • SetHomography() : BIAS::HomographyMapping< InputStorageType, OutputStorageType >
  • SetHue() : CuEye
  • SetHx() : BIAS::KMatrix
  • SetHy() : BIAS::KMatrix
  • SetIdentifier() : BIAS::Projection
  • SetIdentity() : BIAS::Matrix4x4< T >, BIAS::Matrix3x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >
  • SetImageCenter() : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • SetImageMem() : CuEye
  • SetImagePos() : CuEye
  • SetImages() : MainFrame
  • SetImageSize() : CuEye, BIAS::ProjectionParametersBase
  • SetImportanceSampleFraction() : BIAS::Condensation
  • SetInstance() : BIAS::LogFacility
  • SetInterleaved() : BIAS::ImageBase
  • SetK() : BIAS::Camera< StorageType >, BIAS::ProjectionParametersPerspective
  • SetKeepAll() : BIAS::CScommBase
  • SetKeepFPS() : BIAS::VideoSource_Disk
  • SetKernel() : BIAS::Convolution< InputStorageType, OutputStorageType >
  • SetKernelSize() : BIAS::Morphology< InputStorageType, OutputStorageType >
  • SetKnotPoints() : BIAS::Interpolator
  • SetLadybugCenters() : BIAS::RigParameter
  • SetLambda() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetLeftTop() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM
  • SetLog() : BIAS::CScommBase
  • SetLogLevel() : BIAS::LogFacility
  • SetLogOut() : BIAS::CScommBase
  • SetLogStream() : BIAS::LogFacility
  • SetLoopMode() : BIAS::VideoSource_Disk
  • SetLowPassType() : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • SetMainDisplayWindow() : CuEye
  • SetMaskImage() : BIAS::ROI
  • SetMaskValidFlag() : BIAS::ROI
  • SetMatrix() : BIAS::MatrixPanel
  • SetMaxAffineChange() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • SetMaxError() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetMaxIterations() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetMaxNumFeatures() : BIAS::CornerDetectorBase< StorageType >
  • SetMaxResiduumMAD() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • SetMaxSamples() : BIAS::RANSAC< SolutionType >
  • SetMetaData() : BIAS::ImageBase
  • SetMinCornerness() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetMinDistance() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetMinSat() : BIAS::IntegralHistogram, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • SetMinWeight() : BIAS::CondensHisto
  • SetMultiHistogram() : BIAS::CondensHisto
  • SetName() : BIAS::CScommClient
  • SetNormalizedData() : BIAS::MatchDataBase
  • SetObservation() : BIAS::CondensImg
  • SetOffset() : BIAS::ScaledImageCanvas
  • SetOffsetRange() : BIAS::ScaledImageCanvas
  • SetOrder() : BIAS::Polynom
  • SetOrientation() : BIAS::Camera< StorageType >, BIAS::PoseParametrization
  • SetOutsideROIZero() : BIAS::ImageBase
  • SetOwnerframe() : BIAS::OpenGLCanvasBase
  • SetP() : BIAS::Camera< StorageType >, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective
  • SetParamBool() : BIAS::Param
  • SetParamDouble() : BIAS::Param
  • SetParamEnum() : BIAS::Param
  • SetParameterWriteToFile() : BIAS::Param
  • SetParamInt() : BIAS::Param
  • SetParams() : BIAS::ThreeDOut
  • SetParamsCameraScale() : BIAS::ThreeDOut
  • SetParamsCameraStyle() : BIAS::ThreeDOut
  • SetParamsDrawEllipse() : BIAS::ThreeDOut
  • SetParamsPointSize() : BIAS::ThreeDOut
  • SetParamString() : BIAS::Param
  • SetParamVecDbl() : BIAS::Param
  • SetParamVecInt() : BIAS::Param
  • SetPerspective() : BIAS::CameraViewFrustum
  • SetPixel() : BIAS::Image< StorageType >
  • SetPixelClock() : BIAS::VideoSource_uEye, CuEye
  • SetPointAndCovariance() : BIAS::Conic2D
  • SetPose() : BIAS::ProjectionParametersBase, BIAS::Projection
  • SetPoseParametrization() : BIAS::ProjectionParametersBase
  • SetPosition() : BIAS::PoseParametrization
  • SetPredictionOffset() : BIAS::Condensation
  • SetPrincipal() : BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • setPrincipalPoint() : BIAS::CylinderMapping
  • SetProcessMean() : BIAS::Condensation
  • SetProj() : BIAS::Camera< StorageType >
  • SetProjection() : BIAS::ProjectionGUI
  • SetPyramidSize() : BIAS::PyramidImage< StorageType >, BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • SetQ() : BIAS::SimilarityTransform, BIAS::ProjectionParametersBase, BIAS::Pose, BIAS::CoordinateTransform3D
  • SetQC() : BIAS::ProjectionParametersBase
  • SetQuadricProjection() : BIAS::Conic2D
  • SetR() : BIAS::Camera< StorageType >, BIAS::SimilarityTransform, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersBase, BIAS::CoordinateTransform3D
  • SetRadius() : BIAS::CameraParam, BIAS::ProjectionParametersSpherical
  • SetRangeInt() : BIAS::Param
  • SetRatio() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • SetRECT() : BIAS::ImageCanvasGLBase
  • SetReferenceHistogram() : BIAS::CondensHisto
  • SetRejectionType() : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetRescaleFactor() : BIAS::PyramidImage< StorageType >
  • SetROI() : BIAS::PyramidImage< StorageType >, BIAS::ColorHistogram< StorageType >, BIAS::ImageBase
  • SetROI1() : BIAS::ColorMultiHistogram< StorageType >
  • SetROI2() : BIAS::ColorMultiHistogram< StorageType >
  • SetROICorners() : BIAS::ImageBase
  • SetRotation() : BIAS::RigParameter
  • SetRow() : BIAS::Matrix< T >
  • SetSampleCount() : BIAS::RANSAC< SolutionType >
  • SetSaturation() : CuEye
  • SetScale() : BIAS::ScaledImageCanvas
  • SetScaledImageSize() : BIAS::ImageCanvas
  • SetScaler() : CuEye
  • SetScaleRange() : BIAS::ScaledImageCanvas
  • SetScaleYToMaxEntry() : BIAS::Histogram
  • SetScrollPos() : CuEye
  • SetSecondOrderScale() : BIAS::CondensHisto
  • SetSensorCenter() : BIAS::RigParameter
  • SetSensorRotation() : BIAS::RigParameter
  • SetShortCommand() : BIAS::Param
  • SetShowCodeInfo() : BIAS::LogFacility
  • SetShowScaled() : BIAS::ImageCanvas
  • SetShutter() : BIAS::VideoSource_uEye, BIAS::VideoSource_DCAM, BIAS::VideoSource, BIAS::MDcam
  • SetSigma() : BIAS::Gauss< InputStorageType, OutputStorageType >
  • SetSinkCam() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • SetSize() : BIAS::VideoSource_uEye, BIAS::VideoSource_Stereo, BIAS::VideoSource_Shm, BIAS::VideoSource, BIAS::CameraParam, BIAS::CameraViewController, BIAS::Median< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >
  • SetSizeAndColorModel() : BIAS::VideoSource_DSHOW
  • SetSkew() : BIAS::KMatrix
  • SetSourceCam() : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • SetStartPos() : BIAS::CameraViewController
  • SetStartTangent() : BIAS::Interpolator
  • SetStatusBarPtr() : BIAS::ScaledImageCanvas
  • SetStatusText() : BIAS::OpenGLCanvasBase, BIAS::ScaledImageCanvas
  • SetStructureTensorHalfWinSize() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetSubpixelAccuracy() : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • SetTarget2D() : BIAS::ImgObjGL
  • SetTargetPOW2() : BIAS::ImgObjGL
  • SetTargetRECT() : BIAS::ImgObjGL
  • SetTime() : BIAS::Camera< StorageType >
  • SetTimerFile() : BIAS::TimeMeasure
  • SetTitle() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • SetTrackerType() : BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • SetTransform() : CutoutFrame
  • SetUID() : BIAS::PyramidImage< StorageType >, BIAS::ImageBase
  • SetUndistortion() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective
  • SetUnzoomed() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • Setup() : BIAS::ZoomFrame
  • SetupLutPerspPxPy1() : BIAS::SphericalUndistortion
  • SetupLutPerspPxPy2() : BIAS::SphericalUndistortion
  • SetupLutPxPySphere1() : BIAS::SphericalUndistortion
  • SetupLutPxPySphere2() : BIAS::SphericalUndistortion
  • SetupProjectionLUT() : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • SetUseEvenLines() : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • SetUUIDRaw() : BIAS::UUID
  • SetValueAsAxisRad() : BIAS::Quaternion< QUAT_TYPE >
  • SetVector() : BIAS::VectorPanel, BIAS::ROI
  • SetVectorValidFlag() : BIAS::ROI
  • SetVerbose() : BIAS::CScommBase
  • SetVerboseOut() : BIAS::CScommBase
  • SetVSync() : BIAS::OpenGLCanvasBase
  • SetVSyncInterval() : BIAS::SettingsGL
  • SetW() : BIAS::Vector2< T >
  • SetWaitForNew() : BIAS::VideoSource_V4L
  • SetWhiteBalance() : BIAS::VideoSource_DCAM, BIAS::VideoSource, CuEye
  • SetWhiteBalanceMultipliers() : CuEye
  • SetWriteOptions() : BIAS::Param
  • SetWriteViewpoints() : BIAS::ThreeDOut
  • SetX() : BIAS::Vector2< T >
  • SetXYZ() : BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >, BIAS::EuclideanTransf3D
  • SetY() : BIAS::Vector2< T >
  • SetZero() : BIAS::PyramidImage< StorageType >, BIAS::FilterMask, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Matrix< T >, BIAS::ImageBase
  • SetZeroLevel() : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • SetZoom() : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ZoomFrame, BIAS::ProjectionParametersZoom
  • SetZoomCamera() : BIAS::CameraParam
  • SetZoomed() : BIAS::ImageCanvas
  • SetZYX() : BIAS::RMatrixBase, BIAS::Quaternion< QUAT_TYPE >
  • SevenPoint() : BIAS::FMatrixEstimation
  • Show() : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • ShowCapabilities() : BIAS::VideoSource_V4L, BIAS::VideoSource_DCAM, BIAS::VideoSource
  • ShowConvertedImage_() : BIAS::GuiWX, BIAS::GuiGTK, BIAS::GuiBase
  • ShowData() : BIAS::Param
  • ShowFPS() : BIAS::OpenGLCanvasBase
  • ShowImage() : CutoutFrame, BIAS::GuiBase
  • ShowValue() : BIAS::OpenGLCanvasBase
  • SimilarityTransform() : BIAS::SimilarityTransform
  • SimpleGreyValidFloat_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • SimpleGreyValidInt_() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • size() : BIAS::SVD, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >, BIAS::CameraViewController
  • Size() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >
  • Sobel3x3GreySameFloat_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • Sobel3x3GreyValidFloat_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • Sobel3x3GreyValidInt_() : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • SoftwareWhiteBalance() : BIAS::VideoSource
  • solve() : BIAS::SVD
  • Solve() : BIAS::SVD, BIAS::PolynomialSolve, BIAS::LeastSquaresSVD, BIAS::LeastSquaresLapack, BIAS::LeastSquaresBase, BIAS::GaussHelmert
  • SolveMaster() : BIAS::RANSACPreKnowledge< SolutionType >, BIAS::RANSAC< SolutionType >, BIAS::MSAC< SolutionType >
  • SphericalUndistortion() : BIAS::SphericalUndistortion
  • Spline() : BIAS::Interpolator
  • SplineFromLuT() : BIAS::Interpolator
  • SplitImage_() : BIAS::ImageConvertThreaded
  • SplitIntoFiles() : BIAS::VideoStream
  • Sqrt() : BIAS::SVD
  • SqrtT() : BIAS::SVD
  • SSD() : BIAS::RegionMatcher, BIAS::CornerMatcher
  • start() : TNT::stopwatch
  • Start() : BIAS::TimeMeasurement, BIAS::TimeMeasure, BIAS::Line3DData
  • StartGrabContinous() : BIAS::VideoSource_V4L, BIAS::VideoSource
  • StartIso() : BIAS::VideoSource_DCAM
  • StatekeeperGL() : BIAS::StatekeeperGL
  • STDMETHODIMP_() : BIAS::MySampleGrabberCB
  • StealImage() : BIAS::ImageBase
  • StereoI_CaptureStereoImage() : BIAS::OpenGLCanvasBase
  • StereoI_GetConvergence() : BIAS::OpenGLCanvasBase
  • StereoI_GetInfo() : BIAS::OpenGLCanvasBase
  • StereoI_GetSeparation() : BIAS::OpenGLCanvasBase
  • StereoI_GetStereoState() : BIAS::OpenGLCanvasBase
  • StereoI_Init() : BIAS::OpenGLCanvasBase
  • StereoI_SetConvergence() : BIAS::OpenGLCanvasBase
  • StereoI_SetSeparation() : BIAS::OpenGLCanvasBase
  • StereoI_SetStereoState() : BIAS::OpenGLCanvasBase
  • StereoRedGreen() : BIAS::StereoRedGreen
  • Stop() : BIAS::TimeMeasure
  • stop() : TNT::stopwatch
  • StopGrabContinous() : BIAS::VideoSource_V4L, BIAS::VideoSource
  • StopIso() : BIAS::VideoSource_DCAM
  • StopLiveVideo() : CuEye
  • stopwatch() : TNT::stopwatch
  • StructureTensor() : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • Sub() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Matrix< T >
  • SubIP() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Matrix< T >
  • SubVec() : BIAS::Vector< T >
  • SVD() : BIAS::SVD
  • SVD3x3() : BIAS::SVD3x3
  • SwapBuffers() : BIAS::OpenGLCanvasBase
  • syncReceive_() : BIAS::CScommBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- t -

  • Talk() : BIAS::CoordinateTransform3D
  • Tensor3D() : BIAS::Tensor3D< T >
  • Tensor3D3x3x3() : BIAS::Tensor3D3x3x3< T >
  • TestImage_() : BIAS::GuiGTK, BIAS::GuiBase
  • Text() : BIAS::ImageDraw< StorageType >
  • TFTensorEstimation() : BIAS::TFTensorEstimation
  • Theta() : BIAS::Vector3< T >
  • ThreeDOut() : BIAS::ThreeDOut
  • ThreeDOutParameters() : BIAS::ThreeDOutParameters
  • TimeMeasure() : BIAS::TimeMeasure
  • TimeMeasurement() : BIAS::TimeMeasurement
  • ToggleFullScreen() : BIAS::OpenGLCanvasBase
  • ToggleIP() : BIAS::OpenGLCanvasBase
  • ToggleVSync() : BIAS::OpenGLCanvasBase
  • ToGrey() : BIAS::ImageConvert
  • ToHSL() : BIAS::ImageConvert
  • TohsL() : BIAS::ImageConvert
  • ToHSV() : BIAS::ImageConvert
  • ToInterleaved() : BIAS::ImageConvert
  • ToInterleavedRGB() : BIAS::ImageConvert
  • ToInterleavedRGB_() : BIAS::ImageConvert
  • ToInterleavedYUYV422_() : BIAS::ImageConvert
  • TopFrame() : BIAS::TopFrame, BIAS::GuiWX
  • ToPlanar() : BIAS::ImageConvert
  • ToPlanarRGB_() : BIAS::ImageConvert
  • ToPlanarYUYV422_() : BIAS::ImageConvert
  • ToRGB() : BIAS::ImageConvert
  • ToVector() : BIAS::Tensor3D< T >
  • Trace() : BIAS::CovMatrix3x3, BIAS::Matrix3x3< T >, BIAS::Matrix< T >
  • Track() : BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • Track_() : BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBaseSimple< StorageType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBaseAffine< StorageType >
  • TrackAffine_() : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • Tracker() : BIAS::Tracker< StorageType, CalculationType >
  • TrackerBase() : BIAS::TrackerBase< StorageType >
  • TrackerBaseAffine() : BIAS::TrackerBaseAffine< StorageType >
  • TrackerBaseInterface() : BIAS::TrackerBaseInterface< StorageType >
  • TrackerBaseSimple() : BIAS::TrackerBaseSimple< StorageType >
  • TrackerBaseWeighted() : BIAS::TrackerBaseWeighted< StorageType >
  • TrackerSynth() : BIAS::TrackerSynth< StorageType, CalculationType >
  • TrackSimple_() : BIAS::TrackerBase< StorageType >
  • TrackWeighted_() : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBase< StorageType >
  • TransfCoordCalibImage2Sphere_() : BIAS::ProjectionParametersSpherical
  • TransfCoordImage2Sphere() : BIAS::SphericalUndistortion
  • TransfCoordImage2Sphere_() : BIAS::ProjectionParametersSpherical
  • TransfCoordRotateSphere2Image() : BIAS::SphericalUndistortion
  • TransfCoordRotateSphere2Image_() : BIAS::ProjectionParametersSpherical
  • TransfCoordSphere2CalibImage() : BIAS::SphericalUndistortion
  • TransfCoordSphere2CalibImage_() : BIAS::ProjectionParametersSpherical
  • TransfCoordSphere2Image() : BIAS::SphericalUndistortion
  • TransfCoordSphere2Image_() : BIAS::ProjectionParametersSpherical
  • TransferView3() : BIAS::TrifocalTensor
  • Transform() : BIAS::UnscentedTransform, BIAS::EightWaySymmetryHomg, BIAS::EightWaySymmetry< T >, BIAS::PoseParametrizationCovariance, BIAS::PoseParametrization
  • Transform_() : BIAS::UnscentedTransform, MyUnscentedTransform, BIAS::ProjectionParametersBase
  • TransformAbs() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformLogAbs() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformPhase() : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformReverse() : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • TransformToNewGlobalBy() : BIAS::Pose
  • Transpose() : BIAS::FilterMask, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Matrix< T >
  • Transpose_View() : TNT::Transpose_View< Array2D >
  • transposed() : BIAS::Vector4< T >
  • TransposedMult() : BIAS::Matrix3x3< T >
  • TransposeIP() : BIAS::Matrix4x4< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >
  • Triangulate() : BIAS::Triangulation
  • Triangulate2D() : BIAS::Triangulation
  • TriangulateLinear() : BIAS::Triangulation
  • Triangulation() : BIAS::Triangulation
  • TrifocalTensor() : BIAS::TrifocalTensor
  • TrifocalTensorBase() : BIAS::TrifocalTensorBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- u -

  • ubound() : TNT::Index1D
  • Undistort() : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • UndistortFast() : BIAS::MatlabTBUndistortion
  • UndistortionMapping() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • UndistortPerspImage() : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • UniqueSortedGroups() : BIAS::Param
  • UnitLowerTriangularView() : TNT::UnitLowerTriangularView< MaTRiX >
  • UnitUpperTriangularView() : TNT::UnitUpperTriangularView< MaTRiX >
  • Unproject() : BIAS::OpenGLCanvasBase
  • UnProjectLocal() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • UnProjectToCovLocal() : BIAS::Projection
  • UnProjectToPoint() : BIAS::Projection
  • UnProjectToPointLocal() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersBase, BIAS::Projection
  • UnProjectToRay() : BIAS::ProjectionParametersBase, BIAS::Projection
  • UnProjectToRayLocal() : BIAS::Projection
  • UnscentedTransform() : BIAS::UnscentedTransform
  • UnsetROI() : BIAS::ROI, BIAS::ImageBase
  • UnVignette() : MainFrame, BIAS::UnVignette
  • Update() : BIAS::Kalman, BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • UpdateDisplay() : CuEye
  • UpdateEllipsoid() : BIAS::ThreeDOut
  • UpdateGUI() : BIAS::ProjectionGUI
  • UpdateImageDataArrayFromImageData_() : BIAS::ImageBase
  • UpdateLine() : BIAS::ThreeDOut
  • UpdateLowpass() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpdateMatrix_() : BIAS::CoordinateTransform3D
  • UpdateMetaData() : BIAS::Camera< StorageType >
  • UpdateParameter() : BIAS::Param
  • UpdatePMatrix() : BIAS::ThreeDOut
  • UpdatePMatrixColor() : BIAS::ThreeDOut
  • UpdatePoint() : BIAS::ThreeDOut
  • UpdatePyramidSize() : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • UpdateScaleOffset() : BIAS::ScaledImageCanvas
  • UpdateStatusBar() : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • UpdateTime() : BIAS::OpenGLCanvasBase, BIAS::OpenGLCanvas
  • upperTriangle() : BIAS::Cholesky
  • UpperTriangularView() : TNT::UpperTriangularView< MaTRiX >
  • Upsample() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2Grey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleBy2RGBInterleaved() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • UpsampleGrey() : BIAS::Rescale< InputStorageType, OutputStorageType >
  • Usage() : BIAS::Param
  • UseChannel() : MIP::VideoSource_DV2, MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • UseDirectNeighbors() : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • UseIntegralHistogram() : BIAS::CondensHisto
  • UserSizeToFormat7_() : BIAS::VideoSource_DCAM
  • UserSizeToMode() : BIAS::VideoSource_DCAM
  • UUID() : BIAS::UUID
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- v -

  • val() : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >, BIAS::Feat, option
  • validate() : BIAS::Interpolator
  • ValidTexobj() : BIAS::ImageCanvasGLBase
  • VecLen() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenL1() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenL2() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • VecLenMax() : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • Vector() : BIAS::Vector< T >, TNT::Vector< T >
  • Vector2() : BIAS::Vector2< T >
  • Vector2Corners() : BIAS::ROI
  • Vector2Mask() : BIAS::ROI
  • Vector3() : BIAS::Vector3< T >
  • Vector4() : BIAS::Vector4< T >
  • Vector_Adaptor() : TNT::Vector_Adaptor< BBVec >
  • VectorPanel() : BIAS::VectorPanel
  • VectorValid() : BIAS::ROI
  • VideoServer() : BIAS::VideoServer
  • VideoShMFeeder() : BIAS::VideoShMFeeder
  • VideoSource() : BIAS::VideoSource
  • VideoSource_DCAM() : BIAS::VideoSource_DCAM
  • VideoSource_Disk() : BIAS::VideoSource_Disk
  • VideoSource_DiskPMD() : BIAS::VideoSource_DiskPMD
  • VideoSource_DSHOW() : BIAS::VideoSource_DSHOW
  • VideoSource_DV() : MIP::VideoSource_DV
  • VideoSource_DV2() : MIP::VideoSource_DV2
  • VideoSource_DV_Internal_Init_() : MIP::VideoSource_DV
  • VideoSource_Net() : BIAS::VideoSource_Net
  • VideoSource_Shm() : BIAS::VideoSource_Shm
  • VideoSource_Stereo() : BIAS::VideoSource_Stereo
  • VideoSource_uEye() : BIAS::VideoSource_uEye
  • VideoSource_V4L() : BIAS::VideoSource_V4L
  • VideoStream() : BIAS::VideoStream
  • ViewDifference() : BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase
  • VRMLOut() : BIAS::ThreeDOut
  • VRMLOutEllipsoids() : BIAS::ThreeDOut
  • VRMLOutImages() : BIAS::ThreeDOut
  • VRMLOutIndexedFaceSets() : BIAS::ThreeDOut
  • VRMLOutLines() : BIAS::ThreeDOut
  • VRMLOutPMatrices() : BIAS::ThreeDOut
  • VRMLOutPMatricesAsArrows_() : BIAS::ThreeDOut
  • VRMLOutPMatricesAsMesh_() : BIAS::ThreeDOut
  • VRMLOutPoints() : BIAS::ThreeDOut
  • VRMLOutPointsAsBoxes_() : BIAS::ThreeDOut
  • VRMLOutPointsAsPointSet_() : BIAS::ThreeDOut
  • VRMLOutPointsAsSpheres_() : BIAS::ThreeDOut
  • VRMLOutProjection() : BIAS::ThreeDOut
  • VRMLOutWriteHeader() : BIAS::ThreeDOut
  • VRMLOutWriteNavigationInfo() : BIAS::ThreeDOut
  • VRMLOutWriteViewpoint() : BIAS::ThreeDOut
  • VRMLtransparency() : BIAS::ThreeDOut
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- w -

  • WaitForConnections() : BIAS::CScommServer
  • WaitForEvent() : BIAS::GuiBase
  • WaitForKeyEvent() : BIAS::GuiBase
  • WaitForMouseButtonEvent() : BIAS::GuiBase
  • WaitForNewMessage() : BIAS::CScommBase
  • WaitKey() : BIAS::WrapBias2Ipl
  • WeightedSolve() : BIAS::LeastSquaresSVD, BIAS::LeastSquaresLapack, BIAS::LeastSquaresBase
  • What() : BIAS::BaseException
  • Who() : Base
  • WrapBias2Ipl() : BIAS::WrapBias2Ipl, BIAS::ImageBase
  • write() : BIAS::XMLIO
  • Write() : BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::PMDImageProc, BIAS::PMDImageIO, BIAS::ImageIO
  • Write2DImage16Bit_() : BIAS::PMDImageIO
  • Write2DImage8Bit_() : BIAS::PMDImageIO
  • WriteAscii() : BIAS::MetaData
  • WriteASCII() : BIAS::Histogram2D, BIAS::Histogram
  • WriteBinary() : BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::ROI, BIAS::MetaData
  • WriteCAHV_10() : BIAS::PMatrix
  • WriteCameraData() : MainFrame, BIAS::CameraParam, BIAS::ProjectionParametersIO
  • WriteCorrespondences() : BIAS::GenGroundTruth
  • WriteData() : BIAS::GenSynthMatches
  • WriteDepthImage_() : BIAS::PMDImageIO
  • WriteDigitalPort() : CuEye
  • WriteDirect_() : BIAS::VideoSource
  • WriteEEPROM() : CuEye
  • WriteImages() : BIAS::PyramidImage< StorageType >
  • WriteJPEG() : BIAS::JpegHandler
  • WriteMetaData_() : BIAS::PMDImageIO
  • WriteModCoeffImage_() : BIAS::PMDImageIO
  • WriteParameter() : BIAS::Param
  • WriteParameterXML() : BIAS::Param
  • WriteRigData() : BIAS::RigParameter, BIAS::ProjectionParametersIO
  • WriteRunMe() : BIAS::Param
  • WriteToString() : BIAS::XMLIO
  • WriteTrackFile() : BIAS::Tracker< StorageType, CalculationType >
  • WriteTrackLog_() : BIAS::Tracker< StorageType, CalculationType >
  • WriteUnbuffered() : BIAS::ImageIO
  • WriteWorldPoints() : BIAS::GenGroundTruth
  • WxMainThread() : BIAS::WxMainThread, BIAS::GuiWX
  • WxToAsciiArray() : BIAS::WxToAsciiArray
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- x -

  • XMLAdd() : BIAS::XMLBase
  • XMLGetClassName() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLIn() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLIO() : BIAS::XMLIO
  • XMLOut() : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::PMatrix, BIAS::XMLBase, myTestClass
  • XMLRead() : BIAS::XMLBase
  • XMLReadFromString() : BIAS::XMLBase
  • XMLWrite() : BIAS::XMLBase
  • XMLWriteToString() : BIAS::XMLBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- y -

  • YUV420PToGrey_() : BIAS::ImageConvert
  • YUV420PToRGB_() : BIAS::ImageConvert
  • YUV422ToGrey_() : BIAS::ImageConvert
  • YUV422ToRGB_() : BIAS::ImageConvert
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Related Functions

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions

  • DragAndDropTarget : DragAndDropTarget, MainFrame
  • ImageBase : BIAS::ImageBase, BIAS::ImageConvert
  • ImageConvert : BIAS::ImageBase
  • ImageIO : BIAS::ImageBase
  • ImgCanvas : BIAS::GuiWX
  • listenthread : BIAS::CScommServer
  • operator *() : TNT::Matrix< T >, BIAS::Matrix3x4< T >, BIAS::Matrix4x4< T >, BIAS::Matrix< T >, BIAS::Matrix3x3< T >, BIAS::Matrix2x2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Matrix3x3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >, BIAS::AffineTransf
  • operator *=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator!=() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::UUID, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator+() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Image< StorageType >
  • operator+=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator-() : TNT::Matrix< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Image< StorageType >
  • operator-=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Polynom, BIAS::Image< StorageType >
  • operator/() : BIAS::Matrix< T >, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Image< StorageType >
  • operator/=() : BIAS::Vector3< T >, BIAS::Matrix< T >, BIAS::Quaternion< QUAT_TYPE >, BIAS::Vector4< T >, BIAS::Vector< T >, BIAS::Image< StorageType >
  • operator<() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::CCAStruct, BIAS::Feat, BIAS::UUID, BIAS::Position
  • operator<< : BIAS::Vector3< T >, BIAS::Vector< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersBase, BIAS::Projection, BIAS::CoordinateTransform3D, BIAS::FilterMask, BIAS::UUID, BIAS::ROI, BIAS::Position, BIAS::ImageBase, BIAS::BaseFactory< BaseClassType >
  • operator<=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::UUID
  • operator== : BIAS::Matrix< T >, BIAS::MatchDataBase, BIAS::CCAStruct, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >, BIAS::Vector< T >, BIAS::Tensor3D< T >, BIAS::Polynom, BIAS::UUID, BIAS::ImageBase, BIAS::RMatrixBase, BIAS::HomgPoint3D, BIAS::HomgPoint2D, BIAS::HomgPoint1D
  • operator>() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>=() : BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • operator>> : BIAS::Vector3< T >, TNT::Matrix< T >, BIAS::MetaData, BIAS::AppData, BIAS::MatchDataBase, BIAS::GenSynthMatches, BIAS::DC_GPS, BIAS::DC_inertial, BIAS::DC_ptu, BIAS::SimilarityTransform, BIAS::Pose, BIAS::CoordinateTransform3D, BIAS::UUID, BIAS::ImageBase
  • raw_dv_handler : MIP::VideoSource_DV
  • receivethread : BIAS::CScommBase
  • TopFrame : BIAS::TopFrame, BIAS::GuiWX
  • WrapBias2Ipl : BIAS::WrapBias2Ipl, BIAS::ImageBase
  • WxMainThread : BIAS::WxMainThread, BIAS::GuiWX
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Typedefs

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • a
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • n
  • o
  • p
  • r
  • s
  • t
  • v
  • z

- a -

  • addr : Vardesc
  • aerr : alist
  • AllocatorFunctionPointer : BIAS::BaseFactory< BaseClassType >
  • aunit : alist

- c -

  • c : Multitype, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • cerr : cllist
  • ciend : cilist
  • cierr : cilist
  • cifmt : cilist
  • cirec : cilist
  • ciunit : cilist
  • const_iterator : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • const_reference : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • csta : cllist
  • cunit : cllist

- d -

  • d : Multitype
  • dims : Vardesc

- e -

  • element_type : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >

- f -

  • FUNC_PTR_type : FindFilesInPath

- g -

  • g : Multitype

- h -

  • h : Multitype

- i -

  • i : Multitype, doublecomplex, complex, Multitype, doublecomplex, complex
  • iciend : icilist
  • icierr : icilist
  • icifmt : icilist
  • icirlen : icilist
  • icirnum : icilist
  • iciunit : icilist
  • inacc : inlist
  • inacclen : inlist
  • inblank : inlist
  • inblanklen : inlist
  • indir : inlist
  • indirlen : inlist
  • inerr : inlist
  • inex : inlist
  • infile : inlist
  • infilen : inlist
  • infmt : inlist
  • infmtlen : inlist
  • inform : inlist
  • informlen : inlist
  • inname : inlist
  • innamed : inlist
  • innamlen : inlist
  • innrec : inlist
  • innum : inlist
  • inopen : inlist
  • inrecl : inlist
  • inseq : inlist
  • inseqlen : inlist
  • inunf : inlist
  • inunflen : inlist
  • inunit : inlist
  • iterator : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >

- j -

  • j : Multitype

- n -

  • name : BIAS::IndexedFaceSet, BIAS::Image3DData, BIAS::PMatrix3DData, BIAS::CScommData, Namelist, Vardesc, Namelist, Vardesc, BIAS::ImageCanvasGLBase, BIAS::ExifTag, option
  • nvars : Namelist

- o -

  • oacc : olist
  • oblnk : olist
  • oerr : olist
  • ofm : olist
  • ofnm : olist
  • ofnmlen : olist
  • orl : olist
  • osta : olist
  • ounit : olist

- p -

  • pointer : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >

- r -

  • r : Multitype, doublecomplex, complex, Multitype, doublecomplex, complex, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • reference : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Transpose_View< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >

- s -

  • size_type : TNT::Vector< T >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Matrix< T >

- t -

  • T : TNT::Vector_Adaptor< BBVec >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • type : Vardesc

- v -

  • value_type : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • vars : Namelist

- z -

  • z : Multitype
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- _ -

  • _AffineResults : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _all_diff_from_median : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _all_ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _AsciiStrings : BIAS::WxToAsciiArray
  • _AT : BIAS::LeastSquaresBase
  • _ATA : BIAS::LeastSquaresBase
  • _ATb : BIAS::LeastSquaresBase
  • _bInitialized : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle, BIAS::Bresenham
  • _binomial : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _BinomialHWS : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _bl1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _bl1_5 : BIAS::RegionMatcher
  • _bl2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _bl2_5 : BIAS::RegionMatcher
  • _BlockAnimation : MainFrame
  • _bp : BIAS::CornerDetectorSusan< StorageType >
  • _bRefineSolution : BIAS::RANSAC< SolutionType >
  • _BresCirc : BIAS::BresenhamCircleSlow
  • _C : BIAS::MatchDataBase, BIAS::Camera< StorageType >
  • _cgx : BIAS::CornerDetectorSusan< StorageType >
  • _cgy : BIAS::CornerDetectorSusan< StorageType >
  • _ClearBeforeRANSAC : BIAS::RANSACPreKnowledge< SolutionType >
  • _ComputeFilteredImages : BIAS::TrackerBaseInterface< StorageType >
  • _Conv : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >, BIAS::GradientSimple< InputStorageType, OutputStorageType >, BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _Cornerness : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _CurrentImage : MainFrame
  • _CutoutFrame1 : MainFrame
  • _CutoutFrame2 : MainFrame
  • _d : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _Data : BIAS::Tensor3D< T >
  • _DataArray : BIAS::Tensor3D< T >
  • _dBestInlierEvaluateScore : BIAS::RANSAC< SolutionType >
  • _dBestSampleEvaluateScore : BIAS::RANSAC< SolutionType >
  • _dDEpsilon : BIAS::ScanLine2, BIAS::ScanLine
  • _dDx : BIAS::Bresenham
  • _dDy : BIAS::Bresenham
  • _DefaultDir : MainFrame
  • _DefaultFile : MainFrame
  • _DelaySpin : MainFrame
  • _dExpectedInlierFraction : BIAS::MSAC< SolutionType >, BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _dExpectedSigma : BIAS::MSAC< SolutionType >
  • _diff_from_median : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Dim1 : BIAS::Tensor3D< T >
  • _Dim2 : BIAS::Tensor3D< T >
  • _Dim3 : BIAS::Tensor3D< T >
  • _dInlierDistanceThreshold : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _disp : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _DoRefinement : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _doSecondOrderARP : BIAS::Condensation
  • _dProbabilityOfGoodSolution : BIAS::RANSAC< SolutionType >
  • _dSolutionErrorThreshold : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _dSoSmallSolutionChange : BIAS::RANSAC< SolutionType >
  • _dSum : BIAS::TimeMeasure
  • _dTerminateScore : BIAS::MSAC< SolutionType >
  • _dTriangDeltaPixels : BIAS::Triangulation
  • _dTriangSigmaPixels : BIAS::Triangulation
  • _e : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _eLineType : BIAS::Bresenham
  • _epipole : BIAS::FMatrixBase, BIAS::EMatrixBase
  • _f : BIAS::Camera< StorageType >
  • _FeatList : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _FeatureMap : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _fHoriz : BIAS::FilterMask
  • _FileNames : MainFrame
  • _FilterBorderHandling : BIAS::FilterBase< InputStorageType, OutputStorageType >
  • _FitCheckBox : MainFrame
  • _fKernel : BIAS::FilterMask
  • _fm : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _FocalLength : BIAS::GenSynthMatches
  • _Frame : DragAndDropTarget
  • _fVert : BIAS::FilterMask
  • _fwork : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _fwork2 : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _G : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gauss : BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _GaussIO : BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussOO : BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussRatio : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _GaussSigma : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _ggauss : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _ggaussasymmetric : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _Ginv : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _got_solution_flag : BIAS::RANSAC< SolutionType >
  • _grad : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _GradGaussRatio : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _GradGaussSigma : BIAS::GradientGauss< InputStorageType, OutputStorageType >
  • _GradientType : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gradim1x : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim1y : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim2x : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradim2y : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _gradx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _GradXMask : BIAS::TrackerBaseInterface< StorageType >
  • _grady1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _grady2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _GradYMask : BIAS::TrackerBaseInterface< StorageType >
  • _greedy : BIAS::RANSAC< SolutionType >
  • _gsobel3x3 : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gsx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gsx_5 : BIAS::RegionMatcher
  • _gsy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gsy_5 : BIAS::RegionMatcher
  • _GT_C : BIAS::GenSynthMatches
  • _GT_NormalizedPoints : BIAS::GenSynthMatches
  • _GT_P : BIAS::GenSynthMatches
  • _GT_Points : BIAS::GenSynthMatches
  • _GT_R : BIAS::GenSynthMatches
  • _gx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gx1_5 : BIAS::RegionMatcher
  • _gx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gx2_5 : BIAS::RegionMatcher
  • _gxx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gxy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _gy1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gy1_5 : BIAS::RegionMatcher
  • _gy2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::RegionMatcher
  • _gy2_5 : BIAS::RegionMatcher
  • _gyy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _HalfWinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • _HorizRightShift : BIAS::FilterMask
  • _iBestInlierAcceptCount : BIAS::RANSAC< SolutionType >
  • _iBestSampleAcceptCount : BIAS::RANSAC< SolutionType >
  • _ic : MyFrame
  • _iCenter : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iCount : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircle
  • _iCurrent : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iD : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _ida1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _ida2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _iDataSize : BIAS::MSAC< SolutionType >
  • _iDeltaE : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iDeltaSE : BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _idet : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _iDx : BIAS::Bresenham
  • _iDy : BIAS::Bresenham
  • _iEnd : BIAS::Bresenham
  • _iEps : BIAS::Bresenham
  • _iEpsCount : BIAS::ScanLine2, BIAS::ScanLine
  • _iEpsilon : BIAS::ScanLine2, BIAS::ScanLine
  • _iim1 : BIAS::RegionMatcher
  • _iim2 : BIAS::RegionMatcher
  • _im1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _im2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Image1 : MainFrame
  • _Image2 : MainFrame
  • _ImageCanvas : CutoutFrame
  • _ImageCanvas1 : MainFrame
  • _ImageCanvas2 : MainFrame
  • _ImageCanvasFloat : MainFrame
  • _ImageCanvasUC : MainFrame
  • _ImageName1 : MainFrame
  • _ImageName2 : MainFrame
  • _ImHeight : BIAS::GenSynthMatches
  • _ImWidth : BIAS::GenSynthMatches
  • _iMyInt : BIAS::ExampleDebug
  • _in : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _iNext : BIAS::BresenhamCircleSlow
  • _InputSize : BIAS::FFT
  • _InternalMemHeight : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _InternalMemWidth : BIAS::StructureTensor< InputStorageType, OutputStorageType >, BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iRadius : BIAS::BresenhamCircleSlow, BIAS::BresenhamCircleEighth, BIAS::BresenhamCircle
  • _iSampleSize : BIAS::MSAC< SolutionType >
  • _isDecomposed : BIAS::FMatrixBase, BIAS::EMatrixBase
  • _IsDecomposed : BIAS::CovMatrix3x3
  • _iSolutionCount : BIAS::MSAC< SolutionType >
  • _iStart : BIAS::Bresenham
  • _iSym : BIAS::Bresenham
  • _iTransformedCurrent : BIAS::Bresenham
  • _iTransformedEnd : BIAS::Bresenham
  • _iTransformedStart : BIAS::Bresenham
  • _iTransformedUpDown : BIAS::ScanLine2, BIAS::ScanLine
  • _iwork : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iwork2 : BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >
  • _iZeroCenter : BIAS::BresenhamCircleSlow
  • _K : BIAS::MatchDataBase, BIAS::Camera< StorageType >
  • _KernelRightShift : BIAS::FilterMask
  • _Ki : BIAS::MatchDataBase
  • _klthws : BIAS::RegionMatcher
  • _LastHalfWinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Binomial< InputStorageType, OutputStorageType >
  • _LastPositionOffset : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _LastRatio : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _LastSigma : BIAS::GradientGauss< InputStorageType, OutputStorageType >, BIAS::Gauss< InputStorageType, OutputStorageType >
  • _liDebugLevel : BIAS::Debug
  • _lowpass : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _LowpassMask : BIAS::TrackerBaseInterface< StorageType >
  • _MasksSeparable : BIAS::TrackerBaseInterface< StorageType >
  • _MaxAffineChange : BIAS::TrackerBaseAffine< StorageType >, BIAS::TrackerBase< StorageType >
  • _MaxCamDistance : BIAS::GenSynthMatches
  • _MaxDispOutliers : BIAS::GenSynthMatches
  • _MaxError : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • _MaxIterations : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >
  • _MaxNum : BIAS::CornerDetectorBase< StorageType >
  • _MaxResiduumMAD : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxy1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _maxy2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _mean : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _MeanSize : BIAS::Tracker< StorageType, CalculationType >, BIAS::Rescale< InputStorageType, OutputStorageType >, BIAS::Mean< InputStorageType, OutputStorageType >
  • _Median : BIAS::Median1D< DataType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _median_ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _MedianSize : BIAS::Median< InputStorageType, OutputStorageType >
  • _MetaData : MainFrame, BIAS::ImageBase
  • _MinCamDistance : BIAS::GenSynthMatches
  • _MinCornerness : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _MinDistance : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _minx1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _minx2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _miny1 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _miny2 : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _MotionVecX : BIAS::GenSynthMatches
  • _MotionVecY : BIAS::GenSynthMatches
  • _MotionVecZ : BIAS::GenSynthMatches
  • _MovingObjMotionVecX : BIAS::GenSynthMatches
  • _MovingObjMotionVecY : BIAS::GenSynthMatches
  • _MovingObjMotionVecZ : BIAS::GenSynthMatches
  • _MovingObjRotVecX : BIAS::GenSynthMatches
  • _MovingObjRotVecY : BIAS::GenSynthMatches
  • _MovingObjRotVecZ : BIAS::GenSynthMatches
  • _MovingPoints : BIAS::GenSynthMatches
  • _MovingTransform : BIAS::GenSynthMatches
  • _MSACConfidenceThresh : BIAS::MSAC< SolutionType >
  • _MSACRefineSolution : BIAS::MSAC< SolutionType >
  • _MSACSigmaFac : BIAS::MSAC< SolutionType >
  • _ncchws : BIAS::RegionMatcher
  • _nccwinsize : BIAS::RegionMatcher
  • _NeedReload : MainFrame
  • _NormalizedPoints : BIAS::MatchDataBase
  • _num : BIAS::CornerDetectorSusan< StorageType >
  • _NumberFeaturesSoFar : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _NumImages : BIAS::MatchDataBase
  • _NumMovingObjects : BIAS::GenSynthMatches
  • _NumMovingPoints : BIAS::GenSynthMatches
  • _NumOutliers : BIAS::GenSynthMatches
  • _NumPoints : BIAS::MatchDataBase
  • _NumStaticPoints : BIAS::GenSynthMatches
  • _NumTilesX : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::CornerDetectorBase< StorageType >
  • _NumTilesY : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >, BIAS::CornerDetectorBase< StorageType >
  • _OffsetX : CutoutFrame
  • _OffsetY : CutoutFrame
  • _out : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OutlDirChange : BIAS::GenSynthMatches
  • _OutlLengthChange : BIAS::GenSynthMatches
  • _OutNum : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OutSizeY : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _OverallMotionX : BIAS::GenSynthMatches
  • _OverallMotionY : BIAS::GenSynthMatches
  • _OverallMotionZ : BIAS::GenSynthMatches
  • _OverallRotX : BIAS::GenSynthMatches
  • _OverallRotY : BIAS::GenSynthMatches
  • _OverallRotZ : BIAS::GenSynthMatches
  • _p : BIAS::FFT
  • _P : BIAS::MatchDataBase
  • _p_forward : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _p_reverse : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _para : BIAS::GenSynthMatches
  • _ParamsAllocated : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >, BIAS::Tracker< StorageType, CalculationType >, BIAS::PyramidImage< StorageType >, BIAS::FilterBase< InputStorageType, OutputStorageType >
  • _Point : BIAS::Camera< StorageType >
  • _Points : BIAS::MatchDataBase
  • _polygonmodeGL : BIAS::OpenGLCanvas
  • _PositionOffset : BIAS::PyramidImage< StorageType >
  • _PrinciplePointX : BIAS::GenSynthMatches
  • _PrinciplePointY : BIAS::GenSynthMatches
  • _Projection1 : MainFrame
  • _Projection2 : MainFrame
  • _PyramidSize : BIAS::PyramidImage< StorageType >
  • _Quick : BIAS::CornerDetectorSusan< StorageType >
  • _r : BIAS::CornerDetectorSusan< StorageType >
  • _R : BIAS::MatchDataBase, BIAS::Camera< StorageType >, BIAS::FMatrixBase, BIAS::EMatrixBase
  • _rand : BIAS::GenSynthMatches
  • _randomArray : BIAS::Condensation
  • _ReduceToATA : BIAS::LeastSquaresBase
  • _RejectionType : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _rescale : BIAS::PyramidImage< StorageType >
  • _RescaleFactor : BIAS::PyramidImage< StorageType >, BIAS::Rescale< InputStorageType, OutputStorageType >
  • _RescaleMeanSigmaFactor : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _RescaleMeanType : BIAS::Rescale< InputStorageType, OutputStorageType >
  • _ReverseCheckBox : MainFrame
  • _RotVecX : BIAS::GenSynthMatches
  • _RotVecY : BIAS::GenSynthMatches
  • _RotVecZ : BIAS::GenSynthMatches
  • _RunStopButton : MainFrame
  • _S : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _Scale : CutoutFrame, BIAS::CornerDetectorHarris< StorageType, CalculationType >
  • _SelectedPoint1 : MainFrame
  • _SelectedPoint2 : MainFrame
  • _Separable : BIAS::FilterMask
  • _sgxx : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sgxy : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sgyy : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _sHoriz : BIAS::FilterMask
  • _SigmaCamCenterX : BIAS::GenSynthMatches
  • _SigmaCamCenterY : BIAS::GenSynthMatches
  • _SigmaCamCenterZ : BIAS::GenSynthMatches
  • _SigmaCamRotX : BIAS::GenSynthMatches
  • _SigmaCamRotY : BIAS::GenSynthMatches
  • _SigmaCamRotZ : BIAS::GenSynthMatches
  • _SigmaImagePoints : BIAS::GenSynthMatches
  • _Size : BIAS::FFT, BIAS::FFT2D< InputStorageType, OutputStorageType >, BIAS::WxToAsciiArray, BIAS::Tensor3D< T >
  • _SizeMovingObjX : BIAS::GenSynthMatches
  • _SizeMovingObjY : BIAS::GenSynthMatches
  • _SizeMovingObjZ : BIAS::GenSynthMatches
  • _SizeX : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _SizeY : BIAS::FFT2D< InputStorageType, OutputStorageType >
  • _sKernel : BIAS::FilterMask
  • _SobelBinomial : BIAS::TrackerBaseInterface< StorageType >
  • _SolutionSize : BIAS::LeastSquaresBase
  • _ssd_residui : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _st : BIAS::CornerDetectorGradient< StorageType, CalculationType >
  • _StaticPoints : BIAS::GenSynthMatches
  • _susansize : BIAS::CornerDetectorSusan< StorageType >
  • _susanthresh : BIAS::CornerDetectorSusan< StorageType >
  • _svd : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _sVert : BIAS::FilterMask
  • _threshold : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Threshold : BIAS::CornerDetectorSusan< StorageType >
  • _TileSizeX : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • _TileSizeY : BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >
  • _Timer : MainFrame
  • _tmpFloat : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _tmpInt : BIAS::Convolution< InputStorageType, OutputStorageType >
  • _TrackerType : BIAS::TrackerBase< StorageType >
  • _tsgxx : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _tsgxy : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _tsgyy : BIAS::StructureTensor< InputStorageType, OutputStorageType >
  • _U : BIAS::CovMatrix3x3
  • _ucBorderColor : BIAS::Histogram2D, BIAS::Histogram
  • _uiBorder : BIAS::Histogram2D, BIAS::Histogram
  • _UID : BIAS::ImageBase
  • _uiDataSize : BIAS::RANSAC< SolutionType >
  • _uiExplicitSampleNo : BIAS::RANSAC< SolutionType >
  • _uiMaxSamples : BIAS::RANSAC< SolutionType >
  • _uiMaxSolutionsPerSample : BIAS::RANSAC< SolutionType >
  • _uiSampleSize : BIAS::RANSAC< SolutionType >
  • _UserGivenP : BIAS::GenSynthMatches
  • _vData : BIAS::PlaneRANSAC, BIAS::doubleRANSAC
  • _VecLengthType : BIAS::FilterNTo2N< InputStorageType, OutputStorageType >
  • _VertRightShift : BIAS::FilterMask
  • _vFactor : BIAS::PyramidImage< StorageType >
  • _VT : BIAS::LeastSquaresSVD, BIAS::CovMatrix3x3
  • _weight : BIAS::TrackerBaseWeighted< StorageType >, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _Weight : BIAS::LeastSquaresBase
  • _WinSize : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • _winsize : BIAS::RegionMatcher
  • _XYMap : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • _zDebugStream : BIAS::Debug
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- j -

  • jpeg_ : BIAS::VideoServer
  • jpegImg_ : BIAS::VideoSource_Net
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- k -

  • K_ : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective, BIAS::PMatrix
  • Kappa_ : BIAS::UnscentedTransform
  • kc1 : BIAS::CPDiscreteParam
  • kc1_ : BIAS::ProjectionParametersPerspective
  • kc1Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc1Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc2 : BIAS::CPDiscreteParam
  • kc2_ : BIAS::ProjectionParametersPerspective
  • kc2Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc2Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc3 : BIAS::CPDiscreteParam
  • kc3_ : BIAS::ProjectionParametersPerspective
  • kc3Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc3Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • kc4 : BIAS::CPDiscreteParam
  • kc4_ : BIAS::ProjectionParametersPerspective
  • kc4Def_ : BIAS::CameraParam, BIAS::CameraData
  • kc4Zoom_ : BIAS::MatlabTBUndistortion, BIAS::ProjectionParametersZoom
  • keepAll_ : BIAS::CScommBase
  • KeepFPS_ : BIAS::VideoSource_Disk
  • kernelSize_ : BIAS::Morphology< InputStorageType, OutputStorageType >
  • KeyBuffer_ : BIAS::GuiBase
  • knownparams_vect_ : BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::ProjectionParametersZoom, BIAS::CameraData
  • KPts_ : BIAS::Interpolator
  • KValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- l -

  • L : BIAS::Cholesky
  • Label_ : BIAS::GuiGTK
  • LabelInitialized_ : BIAS::Label
  • LabelResultImage_ : BIAS::Label
  • LabelSumImage_ : BIAS::Label
  • lambda_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • last_time : TNT::stopwatch
  • LastBottom : _FilterBorders
  • LastGenerationTime_ : BIAS::UUID
  • LastGradX_ : BIAS::Tracker< StorageType, CalculationType >
  • LastGradY_ : BIAS::Tracker< StorageType, CalculationType >
  • lastheight : MyFrame
  • LastImage_ : BIAS::Tracker< StorageType, CalculationType >
  • lastProcessed : BIAS::CScommData
  • LastRight : _FilterBorders
  • LastTime_ : BIAS::VideoSource_Shm
  • lastwidth : MyFrame
  • LatAcceleration : BIAS::DC_inertial
  • latPos : BIAS::DC_GPS
  • lbound_ : TNT::Index1D
  • left : BIAS::CameraViewFrustum
  • Left_ : BIAS::VideoSource_Stereo, BIAS::VideoSource_DCAM
  • LeftIm_ : BIAS::VideoSource_Stereo
  • length : BIAS::AppData
  • Length_ : BIAS::EpipolarLine
  • Lens_ : BIAS::VideoSource_DCAM
  • LensIsSpherical_ : BIAS::CameraParam, BIAS::CameraData
  • LensModel_ : BIAS::CameraParam, BIAS::CameraData
  • LineStyle : BIAS::ThreeDOutParameters
  • linewidth : BIAS::RenderModeGL
  • LineWidth : BIAS::ThreeDOutParameters
  • listenThreadActive_ : BIAS::CScommServer
  • listPntDim1_ : BIAS::Interpolator
  • listPntDim2_ : BIAS::Interpolator
  • listPntDim3_ : BIAS::Interpolator
  • listPolynoms1_ : BIAS::Interpolator
  • listPolynoms2_ : BIAS::Interpolator
  • listPolynoms3_ : BIAS::Interpolator
  • ll : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • LL : BIAS::Image3DData, BIAS::PMatrix3DData
  • location : xvimage
  • location_dim : xvimage
  • location_type : xvimage
  • log2inv_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • log_ : BIAS::CScommBase
  • logOut_ : BIAS::CScommBase
  • LongAcceleration : BIAS::DC_inertial
  • LongIdum_ : BIAS::Random
  • longopts : BIAS::Param
  • longPos : BIAS::DC_GPS
  • Loop_ : BIAS::VideoSource_Disk
  • LowerRightX_ : BIAS::ROI
  • LowerRightY_ : BIAS::ROI
  • lowpass_ : BIAS::Tracker< StorageType, CalculationType >
  • lr : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • LR : BIAS::Image3DData, BIAS::PMatrix3DData
  • LuImage_ : BIAS::UnVignette
  • luminance_ : BIAS::ColorHistogram< StorageType >
  • LuT_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • LuTMax1_ : BIAS::Interpolator
  • LuTMin1_ : BIAS::Interpolator
  • LuTPerspPxPy_ : BIAS::SphericalUndistortion
  • LuTPxPySphere_ : BIAS::SphericalUndistortion
  • LuTSampleDist1_ : BIAS::Interpolator
  • lx_ : BIAS::ColorHistogram< StorageType >
  • ly_ : BIAS::ColorHistogram< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- m -

  • m_ : TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • m_bIsInited : BIAS::VideoSource_uEye
  • m_CameraHandle : BIAS::VideoSource_uEye
  • m_cHSData : BIAS::IntegralHistogram
  • m_cLData : BIAS::IntegralHistogram
  • m_dBitsPerPixel : BIAS::VideoSource_uEye
  • m_dColorMode : BIAS::VideoSource_uEye
  • m_dDepth : BIAS::VideoSource_uEye
  • m_dHeight : BIAS::VideoSource_uEye
  • m_dLeftPos : BIAS::VideoSource_uEye
  • m_dMaxRefHistoSize : BIAS::CondensHisto
  • m_dMemID : BIAS::VideoSource_uEye
  • m_dPixelClock : BIAS::VideoSource_uEye
  • m_dSrcDepth : BIAS::VideoSource_uEye
  • m_dSrcHeight : BIAS::VideoSource_uEye
  • m_dSrcWidth : BIAS::VideoSource_uEye
  • m_dTopPos : BIAS::VideoSource_uEye
  • m_dWidth : BIAS::VideoSource_uEye
  • m_FileList : FindFilesInPath
  • m_FileTypes : FindFilesInPath
  • m_frame : BIAS::dndFileTarget
  • m_FuncPtr : FindFilesInPath
  • m_hu : CuEye
  • m_hwnd : CuEye
  • m_hwndNotify : CuEye
  • m_pImageBuffer : BIAS::VideoSource_uEye
  • m_pSwapBuffer : BIAS::VideoSource_uEye
  • m_ueye : BIAS::VideoSource_uEye
  • machine_dep : xvimage
  • magnificationMode : BIAS::ImgObjGL
  • MainThread_ : BIAS::GuiGTK
  • MainThreadRunning_ : BIAS::GuiWX, BIAS::GuiGTK
  • MainThreadRunningMutex_ : BIAS::GuiGTK
  • Map_ : BIAS::ParamTypeEnum, BIAS::BaseFactory< BaseClassType >
  • map_col_size : xvimage
  • map_enable : xvimage
  • map_row_size : xvimage
  • map_scheme : xvimage
  • map_storage_type : xvimage
  • map_subrow_size : xvimage
  • mapEllipsoids_ : BIAS::ThreeDOut
  • mapImages_ : BIAS::ThreeDOut
  • mapIndex : BIAS::DC_GPS
  • mapIndexedFaceSet_ : BIAS::ThreeDOut
  • mapLines_ : BIAS::ThreeDOut
  • mapping_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • mapPMatrices_ : BIAS::ThreeDOut
  • mapPoints_ : BIAS::ThreeDOut
  • mapProjection3D_ : BIAS::ThreeDOut
  • maps : xvimage
  • maps_per_cycle : xvimage
  • mapValidTags_ : BIAS::ImageAttributes
  • MaskData_ : BIAS::ROI
  • MaskDataArray_ : BIAS::ROI
  • MaskHeight_ : BIAS::ROI
  • MaskValid_ : BIAS::ROI
  • MaskWidth_ : BIAS::ROI
  • max_ : BIAS::ParamTypeDouble, BIAS::ParamTypeInt
  • max_gain : MyFrame
  • max_shutter : MyFrame
  • maxBinVal_ : BIAS::ColorHistogram< StorageType >
  • MaxBinVal_ : BIAS::Histogram
  • MaxBpP_ : BIAS::VideoSource_DCAM
  • MaxCamAngle_ : BIAS::CameraParam, BIAS::ProjectionParametersSpherical, BIAS::CameraData
  • MaxError_ : BIAS::Tracker< StorageType, CalculationType >
  • MaxHeight_ : BIAS::VideoSource_DCAM
  • MaxHistEntry_ : BIAS::Histogram2D, BIAS::Histogram
  • MaxIter_ : BIAS::Tracker< StorageType, CalculationType >
  • MaxNumIter_ : BIAS::GaussHelmert
  • MaxOffSet_ : BIAS::ScaledImageCanvas
  • MaxScale_ : BIAS::ScaledImageCanvas
  • MaxTrials_ : MIP::VideoSource_DV
  • MaxWidth_ : BIAS::VideoSource_DCAM
  • mean_ : BIAS::Condensation, BIAS::Tracker< StorageType, CalculationType >
  • meanTminus1_ : BIAS::Condensation
  • MeanType_ : BIAS::Tracker< StorageType, CalculationType >
  • MeasurementDim_ : BIAS::Kalman
  • MedianCenters_ : BIAS::Label
  • MediaSubTypeColorModel_ : BIAS::VideoSource_DSHOW
  • mediaType : BIAS::MySampleGrabberCB
  • MemAlignedBuffer_ : BIAS::ImageIO
  • MemAlignedBufferSize_ : BIAS::ImageIO
  • MemoryLengthTotal_ : BIAS::VideoShMFeeder
  • meshVertices_ : BIAS::TriangleMesh
  • Message_ : BIAS::BaseException
  • mHists_ : BIAS::IntegralHistogram
  • MiaScWi_ : BIAS::ScaledImageCanvas
  • min_ : BIAS::ParamTypeDouble, BIAS::ParamTypeInt
  • minBinVal_ : BIAS::ColorHistogram< StorageType >
  • MinBinVal_ : BIAS::Histogram
  • MinBorderDist_ : BIAS::Tracker< StorageType, CalculationType >
  • MinBpP_ : BIAS::VideoSource_DCAM
  • minificationMode : BIAS::ImgObjGL
  • MinOffSet_ : BIAS::ScaledImageCanvas
  • minSat_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • minSaturation : SegmentationData
  • MinScale_ : BIAS::ScaledImageCanvas
  • minWeight_ : BIAS::CondensHisto
  • mn_ : TNT::Matrix< T >
  • ModCoeffImg_ : BIAS::VideoSource_DiskPMD
  • Mode_ : BIAS::Histogram
  • MouseButtonMutex_ : BIAS::GuiBase
  • MouseButtonPressed_ : BIAS::GuiBase
  • MouseButtonPressX_ : BIAS::GuiBase
  • MouseButtonPressY_ : BIAS::GuiBase
  • MouseButtonReleased_ : BIAS::GuiBase
  • MouseButtonReleaseX_ : BIAS::GuiBase
  • MouseButtonReleaseY_ : BIAS::GuiBase
  • MousePosX_ : BIAS::GuiBase
  • MousePosY_ : BIAS::GuiBase
  • mousex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • mousey_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • msgBuffer : BIAS::CScommData
  • msgBuffer_ : BIAS::CScommBase
  • msgName : BIAS::CScommMsg
  • msgSize_ : BIAS::VideoServer
  • MyGui_ : BIAS::TopFrame, BIAS::WxMainThread
  • MyZoomWin_ : BIAS::ImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- n -

  • n_ : TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Fortran_Sparse_Col_Matrix< T >, TNT::Matrix< T >
  • N_ : BIAS::FMatrixEstimation
  • name : BIAS::IndexedFaceSet, BIAS::Image3DData, BIAS::PMatrix3DData, BIAS::CScommData, Namelist, Vardesc, Namelist, Vardesc, BIAS::ImageCanvasGLBase, BIAS::ExifTag, option
  • Name_ : BIAS::ParamTypeBase, Base
  • name_ : BIAS::CScommBase
  • nBinsize_ : BIAS::IntegralHistogram
  • nBinsizeSat_ : BIAS::IntegralHistogram
  • nChannels_ : BIAS::GuiBase
  • newData : BIAS::CScommMsg
  • newFrame_ : BIAS::VideoSource_V4L
  • NextEllipsoidIndex_ : BIAS::ThreeDOut
  • NextImageIndex_ : BIAS::ThreeDOut
  • NextIndexedFaceSetIndex_ : BIAS::ThreeDOut
  • NextLineIndex_ : BIAS::ThreeDOut
  • NextPIndex_ : BIAS::ThreeDOut
  • NextPointIndex_ : BIAS::ThreeDOut
  • NextProjection3DIndex_ : BIAS::ThreeDOut
  • nLambda_ : BIAS::IntegralHistogram
  • nmatrix_ : BIAS::Interpolator
  • nMinSat_ : BIAS::IntegralHistogram
  • nOldBinsize_ : BIAS::IntegralHistogram
  • nOldBinsizeSat_ : BIAS::IntegralHistogram
  • Norm_ : BIAS::TFTensorEstimation
  • normalised_ : BIAS::ColorHistogram< StorageType >
  • normalization_ : BIAS::HMatrixEstimation
  • NormalizeHartley_ : BIAS::FMatrixEstimation
  • normalizeHartley_ : BIAS::HMatrixEstimation
  • Nsamples_ : BIAS::Condensation
  • nShift_ : BIAS::IntegralHistogram
  • nShiftSat_ : BIAS::IntegralHistogram
  • Num_ : BIAS::Label
  • num_data_bands : xvimage
  • num_of_images : xvimage
  • numBuffers_ : BIAS::VideoSource_V4L
  • numcams : MyFrame
  • NumCams_ : BIAS::VideoSource_DCAM, BIAS::MDcam
  • NumData_ : BIAS::Histogram
  • NumImages_ : BIAS::VideoStream
  • NumIter_ : BIAS::Tracker< StorageType, CalculationType >
  • NumLeftClicks_ : BIAS::ImageCanvasEnhanced
  • nz_ : TNT::Fortran_Sparse_Col_Matrix< T >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- o -

  • obsImg_ : BIAS::CondensImg
  • offset : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, BIAS::SphericalUndistortion::LuTEntry, BIAS::MatlabTBUndistortion::LuTEntry, BIAS::DC_GPS
  • offset_ : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • offSet_ : BIAS::Condensation
  • offsetX_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • offsetY_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • OffsSL_ : BIAS::ScaledImageCanvas
  • oldIndices_ : BIAS::Condensation
  • one : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >
  • onlyNewMsgs_ : BIAS::CScommBase
  • OpticalFilter : CameraParameter_s
  • OpticalFilterChanged : CameraParameter_s
  • order_ : BIAS::Polynom
  • Orientation_ : BIAS::Camera< StorageType >
  • OrientationValid_ : BIAS::Camera< StorageType >
  • origim_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • origim_mutex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • origImage_ : MainFrame
  • OrigPicture_ : BIAS::GuiBase
  • OutBuf_ : BIAS::RedirectStreams
  • OutStr_ : BIAS::RedirectStreams
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- z -

  • zero : TNT::UnitUpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >
  • zero_ : TNT::UpperTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >
  • zeroLevel_ : BIAS::DistTransform< InputStorageType, OutputStorageType >
  • ZeroThreshold_ : BIAS::SVD
  • zFar : BIAS::CameraViewFrustum
  • zim_ : BIAS::ZoomImageCanvas
  • zLogFileStream_ : BIAS::LogFacility
  • zLogStream_ : BIAS::LogFacility
  • zNear : BIAS::CameraViewFrustum
  • zoom : BIAS::CPDiscreteParam
  • zoom_ : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • zoomCamera_ : BIAS::CameraParam, BIAS::CameraData
  • Zoomed_ : BIAS::ImageCanvas
  • ZoomFactor_ : BIAS::ZoomImageCanvas
  • ZoomX_ : BIAS::ZoomImageCanvas
  • ZoomXPos_ : BIAS::ZoomImageCanvas
  • ZoomY_ : BIAS::ZoomImageCanvas
  • ZoomYPos_ : BIAS::ZoomImageCanvas
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- a -

  • A : A, BIAS::Projection3DData
  • A_ : BIAS::Kalman, BIAS::SVD, BIAS::UnVignette, BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::PMatrix, TNT::UnitUpperTriangularView< MaTRiX >, TNT::UpperTriangularView< MaTRiX >, TNT::UnitLowerTriangularView< MaTRiX >, TNT::LowerTriangularView< MaTRiX >, TNT::Transpose_View< Array2D >, TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >
  • AbsoluteZeroThreshold_ : BIAS::SVD
  • AcceleratorPedal : BIAS::DC_inertial
  • actIndex_ : BIAS::Interpolator
  • Active_ : BIAS::VideoSource
  • ActiveFrame : BIAS::VideoSource_V4L
  • ActiveFrame_ : BIAS::VideoSource_Disk
  • ActiveFrameMutex_ : BIAS::VideoSource_V4L
  • ActiveTrigger_ : BIAS::MDcam
  • AffinePrediction_ : BIAS::Tracker< StorageType, CalculationType >
  • AffineResults_ : BIAS::Tracker< StorageType, CalculationType >
  • aliasing_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • AlignedSize : BIAS::VideoStream::VSHeader
  • AllocatorFunction_ : BIAS::BaseFactory< BaseClassType >::MapEntry
  • Alpha_ : BIAS::UnscentedTransform
  • alphaImg_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • angle : BIAS::Projection3DData
  • Angle_ : BIAS::EpipolarLine
  • AngleCorrX_ : BIAS::CameraParam, BIAS::CameraData
  • AngleCorrY_ : BIAS::CameraParam, BIAS::CameraData
  • animationUpdateEnabled : BIAS::OpenGLCanvasBase
  • AppApp_ : BIAS::GuiWX
  • areaMax_ : BIAS::CondensImg, BIAS::CondensHisto
  • areaMin_ : BIAS::CondensImg, BIAS::CondensHisto
  • ArgV_ : BIAS::Param
  • ArtFlags : BIAS::DC_inertial
  • ArtLeadVehicleDistance : BIAS::DC_inertial
  • ArtLeadVehicleVelocity : BIAS::DC_inertial
  • ArtSollVelocity : BIAS::DC_inertial
  • ASCIIString_ : BIAS::Camera< StorageType >
  • ASCIIValid_ : BIAS::Camera< StorageType >
  • AspectRatio : BIAS::PMDImageMetaData
  • aspectratio_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • AT_ : BIAS::Kalman
  • AutoadaptScale_ : BIAS::ScaledImageCanvas
  • AutoExposure_ : MyFrame
  • AutoGain : CameraParameter_s
  • AutoGainChanged : CameraParameter_s
  • autoPyramidSize_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • AutoShutter : CameraParameter_s
  • AutoShutterChanged : CameraParameter_s
  • AutoWhiteBalance : CameraParameter_s
  • AutoWhiteBalanceChanged : CameraParameter_s
  • Average_ : BIAS::Histogram
  • axis : BIAS::Projection3DData
  • azimuth : BIAS::DC_GPS
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- b -

  • bAbortOnFatal_ : BIAS::LogFacility
  • background_ : BIAS::Contour
  • base : BIAS::DrawTextGL
  • BaseInitialized_ : BIAS::GuiBase
  • bc : BIAS::CCAStruct
  • bCodeInfo_ : BIAS::LogFacility
  • bDoDownSamplingByTwo_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • Beta_ : BIAS::UnscentedTransform
  • bExpDist_ : BIAS::IntegralHistogram
  • bezierInitialized_ : BIAS::Interpolator
  • BIASColorModel_ : BIAS::VideoSource_DSHOW
  • bImageLoaded_ : MainFrame
  • binaryData : BIAS::CScommMsg
  • binaryDataSize : BIAS::CScommMsg
  • binCount_ : BIAS::ColorHistogram< StorageType >
  • BinCount_ : BIAS::Histogram
  • binomial_ : BIAS::Tracker< StorageType, CalculationType >
  • binSize_ : BIAS::ColorMultiHistogram< StorageType >, BIAS::ColorHistogram< StorageType >
  • BinSize_ : BIAS::Histogram
  • binSizeSat_ : BIAS::ColorHistogram< StorageType >
  • bIntegralHisto_ : BIAS::CondensHisto
  • bIsInitialized_ : BIAS::VideoShMFeeder, BIAS::UnVignette
  • BitDepth_ : BIAS::ImageBase
  • Bitmap_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • bLeastSquaresPrepared_ : BIAS::UnVignette
  • BlinkLever : BIAS::DC_inertial
  • BlobCount_ : BIAS::Label
  • BlobMap_ : BIAS::Label
  • BotRights_ : BIAS::Label
  • bottom : BIAS::CameraViewFrustum
  • BottomRight_ : BIAS::ImageCanvasEnhanced
  • br : SegmentationData, BIAS::CCAStruct
  • brdx : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • brdxy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • brdy : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • bShowDialogs_ : BIAS::VideoSource_DSHOW
  • Buffer_ : MIP::VideoSource_DV2, BIAS::GuiWX, BIAS::GuiGTK
  • buffer_ : BIAS::VideoSource_V4L
  • bufferLastCaptured_ : BIAS::VideoSource_V4L
  • BufferMutex_ : BIAS::GuiGTK
  • BufferSize_ : MIP::VideoSource_DV2
  • buffsize_ : BIAS::JpegHandler
  • bufLengths : BIAS::VideoSource_V4L
  • bufStarts : BIAS::VideoSource_V4L
  • bUnVignetteParamsReady_ : MainFrame
  • bUseEvenLines_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • bUseLuT_ : BIAS::UnVignette
  • bXK_1_ : BIAS::Interpolator
  • bXK_2_ : BIAS::Interpolator
  • bXK_3_ : BIAS::Interpolator
  • bYK_1_ : BIAS::Interpolator
  • bYK_2_ : BIAS::Interpolator
  • bYK_3_ : BIAS::Interpolator
  • BytesPerCyle_ : BIAS::VideoSource_DCAM
  • BytesPerPacket_ : BIAS::VideoSource_DCAM
  • BytesPerPixel : BIAS::VideoStream::VSHeader
  • BytesPerPixel_ : BIAS::VideoSource
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- c -

  • c : Multitype, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • C : C, BIAS::Ellipsoid3DData, BIAS::Projection3DData, BIAS::PMatrix3DData, BIAS::CameraViewExternals
  • C_ : BIAS::SimilarityTransform, BIAS::PMatrix, BIAS::CoordinateTransform3D, BIAS::AffineTransf
  • c_FileList : FindFilesInPath
  • Calibration_ : BIAS::RigParameter
  • CallbackObj_ : BIAS::ImageCanvasEnhanced
  • CallbackObject_ : BIAS::ParamTypeBase
  • Cam2_ : MyFrame
  • Cam_ : MyFrame
  • camAngleX_ : BIAS::CylinderMapping
  • camAngleY_ : BIAS::CylinderMapping
  • camera_ : BIAS::VideoSource_DSHOW, BIAS::MySampleGrabberCB, BIAS::VideoServer
  • Camera_ : BIAS::MDcam, BIAS::RigParameter
  • CameraCenter : BIAS::PMDImageMetaData
  • CameraRotation : BIAS::PMDImageMetaData
  • CameraScale : BIAS::ThreeDOutParameters
  • CameraStyle : BIAS::ThreeDOutParameters
  • camfile : MyFrame
  • CamID_ : BIAS::CameraParam, BIAS::CameraData
  • CamImage_ : BIAS::VideoServer
  • CamImg2_ : MyFrame
  • CamImg_ : MyFrame
  • CamModel_ : BIAS::VideoSource_DCAM, BIAS::CameraParam, BIAS::CameraData
  • camParam_ : BIAS::VideoServer
  • cams : MyFrame
  • camType_ : BIAS::VideoServer
  • CanH_ : BIAS::TrifocalTensor
  • Canvas_ : BIAS::TopFrame
  • capability2 : BIAS::VideoSource_V4L
  • cc : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • cellSizeX_ : BIAS::CameraParam, BIAS::CameraData
  • cellSizeY_ : BIAS::CameraParam, BIAS::CameraData
  • center : BIAS::CCAStruct
  • Center_ : BIAS::RigParameter
  • Centers_ : BIAS::Label
  • cf : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Channel_ : MIP::VideoSource_DV
  • ChannelCount : BIAS::VideoStream::VSHeader
  • ChannelCount_ : BIAS::ImageBase
  • channels : BIAS::PMDImageMetaData
  • chist_ : BIAS::CondensHisto
  • ClearDrawingContext_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • client_ : BIAS::VideoSource_Net
  • CloseEdge_ : BIAS::EpipolarLine
  • CloseIntersection_ : BIAS::EpipolarLine
  • clothoidParameter : BIAS::DC_GPS
  • col_ : TNT::Fortran_Matrix< T >
  • col_size : xvimage
  • Color : BIAS::Line3DData, BIAS::Point3DData, BIAS::Ellipsoid3DData, BIAS::PMatrix3DData
  • Color_ : BIAS::Histogram
  • color_space_model : xvimage
  • ColorChannels_ : BIAS::VideoSource
  • ColorMode_ : BIAS::VideoSource
  • colormodel : ThreadArg__
  • ColorModel : BIAS::VideoStream::VSHeader
  • ColorModel_ : BIAS::ImageBase
  • ColorOfSelection : BIAS::Projection3DData
  • colptr_ : TNT::Fortran_Sparse_Col_Matrix< T >
  • cols_ : BIAS::MatrixPanel
  • comm : BIAS::CSCommWithClientNr
  • comment : xvimage
  • commName : BIAS::CScommMsg
  • commNr : BIAS::CSCommWithClientNr
  • commPartners_ : BIAS::CScommBase
  • commPartnersConnected_ : BIAS::CScommBase
  • CompleteInitialized_ : BIAS::VideoSource
  • compressionColor_ : BIAS::VideoServer
  • Compressor_ : BIAS::VideoServer
  • connected : BIAS::CScommData
  • connectPort_ : BIAS::CScommBase
  • ConsistencyBackup_ : BIAS::CovMatrix3x3
  • Context_ : BIAS::VideoSource_Shm
  • ContinousThread_ : BIAS::VideoSource_V4L
  • contPixels_ : BIAS::Contour
  • controlPoints_ : MainFrame
  • ControlPoints_ : BIAS::UnVignette
  • controls_ : BIAS::MatrixPanel, BIAS::VectorPanel
  • cooldbl : MyAlgorithm
  • coollevel : MyAlgorithm
  • correctionOfImportanceWeights_ : BIAS::Condensation
  • Count_ : BIAS::Distribution
  • count_ : BIAS::VideoSource_Net
  • Cov_ : BIAS::Tracker< StorageType, CalculationType >, BIAS::Pose, BIAS::PoseParametrization
  • cov_weights_ : BIAS::Triangulation
  • Covariance_ : BIAS::Kalman, BIAS::PMatrix
  • cp_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • cPnts_ : BIAS::BSplineCurve
  • cullface : BIAS::RenderModeGL
  • cumulProbArray_ : BIAS::Condensation
  • cumulProbArrayImportance_ : BIAS::Condensation
  • CurrAttr_ : BIAS::XMLIO
  • Current_ : BIAS::EpipolarLine
  • CurrNode_ : BIAS::XMLIO
  • curvature : BIAS::DC_GPS
  • CutOutHeight_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • CutOutWidth_ : BIAS::SphericalUndistortion, BIAS::MatlabTBUndistortion
  • CValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- d -

  • dAngle : BIAS::Ellipsoid3DData
  • data : BIAS::AppData
  • data_ : BIAS::Contour, BIAS::JpegHandler, BIAS::Vector4< T >, BIAS::Vector3< T >, BIAS::Vector2< T >
  • Data_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • data_encode_scheme : xvimage
  • data_storage_type : xvimage
  • DataLength_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • dataLength_ : BIAS::JpegHandler
  • dataLock : BIAS::CScommMsg
  • dataSize : BIAS::CScommMsg
  • dataType : BIAS::CScommMsg
  • DcamCapture_ : BIAS::VideoSource_DCAM
  • DcamDMABuffers_ : BIAS::VideoSource_DCAM
  • DcamFeatures_ : BIAS::VideoSource_DCAM
  • DcamFormat_ : BIAS::VideoSource_DCAM
  • DcamFps_ : BIAS::VideoSource_DCAM
  • DcamInfo_ : BIAS::VideoSource_DCAM
  • DcamIsoChannel_ : BIAS::VideoSource_DCAM
  • DcamMode_ : BIAS::VideoSource_DCAM
  • DcamNodes_ : BIAS::VideoSource_DCAM
  • dChannelCount_ : BIAS::UnVignette
  • dDepth_ : BIAS::VideoSource_DSHOW
  • dDsBufferSize_ : BIAS::VideoSource_DSHOW
  • DebuglevelDcam_ : BIAS::MDcam
  • Decomposed_ : BIAS::SVD
  • Decompressor_ : BIAS::VideoSource_Net
  • default_ : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool
  • DefaultDevice_ : BIAS::VideoSource
  • DefaultDir_ : MainFrame
  • DefaultFile_ : MainFrame
  • defaultInitFraction_ : BIAS::Condensation
  • DefaultZoom_ : BIAS::ImageCanvas
  • DeltaR_ : BIAS::EpipolarLine
  • Depth_ : BIAS::ImageBase
  • DepthImg_ : BIAS::VideoSource_DiskPMD
  • description : TagInfo
  • description_ : BIAS::TimeMeasurement
  • destCenterX_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destCenterY_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destK_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • destProjType_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • DestructorWarning_ : BIAS::Param
  • DeviceChannel_ : BIAS::VideoSource
  • dGroundThruthWhite_ : MainFrame
  • dHeight_ : BIAS::VideoSource_DSHOW, BIAS::UnVignette
  • dHeightHalfMPPY_ : BIAS::UnVignette
  • diffScale_ : BIAS::CondensHisto
  • diffScaleSize_ : BIAS::CondensHisto
  • diffusionSigma_ : BIAS::Condensation
  • dim_ : TNT::const_Region2D< Array2D >, TNT::Region2D< Array2D >, TNT::const_Region1D< Array1D >, TNT::Region1D< Array1D >, TNT::Fortran_Sparse_Vector< T >
  • dInterPolationMethod_ : BIAS::UnVignette
  • DirectF7_ : BIAS::VideoSource_DCAM
  • directionList_ : BIAS::Contour
  • DirectToDisk_ : BIAS::VideoSource
  • DisplInLastIter_ : BIAS::Tracker< StorageType, CalculationType >
  • distanceToMap : BIAS::DC_GPS
  • dLogLevel_ : BIAS::LogFacility
  • dNumberOfSteps_ : MainFrame
  • downsamplingFactor_ : BIAS::CameraParam
  • DownSamplingFactor_ : BIAS::RigParameter
  • dplist : MyGLCanvas2, MyGLCanvas
  • drawbuffermode : BIAS::RenderModeGL
  • DrawingArea_ : BIAS::GuiGTK
  • DrawUncertaintyEllipsoids : BIAS::ThreeDOutParameters
  • DroppedFrame_ : MIP::VideoSource_DV
  • dst : ThreadArg__
  • DtDBuffer_ : BIAS::VideoSource
  • DtDBufferSize_ : BIAS::VideoSource
  • DtDFd_ : BIAS::VideoSource
  • DtDImageHeader_ : BIAS::VideoSource
  • DtDStartOfImage_ : BIAS::VideoSource
  • DV1394FD_ : MIP::VideoSource_DV2
  • DVDecoder_ : BIAS::ImageConvert
  • dwFlags : tagTHREADNAME_INFO
  • dWidth_ : BIAS::VideoSource_DSHOW, BIAS::UnVignette
  • dWidthHalfMPPX_ : BIAS::UnVignette
  • dwThreadID : tagTHREADNAME_INFO
  • dwType : tagTHREADNAME_INFO
  • dx : BIAS::cornerstruct
  • dx_ : BIAS::EpipolarLine
  • dy : BIAS::cornerstruct
  • dy_ : BIAS::EpipolarLine
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- e -

  • eDeInterlaceType_ : BIAS::DeInterlace< InputStorageType, OutputStorageType >
  • Edge : TIntersect
  • editable_ : BIAS::MatrixPanel, BIAS::VectorPanel
  • enable_cullface : BIAS::RenderModeGL
  • End : BIAS::Line3DData
  • End_ : BIAS::EpipolarLine
  • endTangentX_ : BIAS::Interpolator
  • endTangentY_ : BIAS::Interpolator
  • endTangentZ_ : BIAS::Interpolator
  • EngineSpeed : BIAS::DC_inertial
  • Enhanced_ : BIAS::ParamTypeBase
  • Epipole21_ : BIAS::TrifocalTensor
  • Epipole31_ : BIAS::TrifocalTensor
  • Epipole_ : BIAS::EpipolarLine
  • EpipoleDistance : TIntersect
  • EpipolePosition_ : BIAS::EpipolarLine
  • ErrBuf_ : BIAS::RedirectStreams
  • ErrStr_ : BIAS::RedirectStreams
  • exists : BIAS::Cholesky
  • expDist_ : BIAS::ColorHistogram< StorageType >
  • ExternalTrigger_ : BIAS::MDcam
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- f -

  • F_ : BIAS::Parametrization
  • faceIndices : BIAS::IndexedFaceSet
  • Factor_ : BIAS::Histogram2D, BIAS::Histogram, BIAS::GuiBase
  • FarIntersection_ : BIAS::EpipolarLine
  • Fcol_ : BIAS::Parametrization
  • fd : BIAS::VideoSource_V4L, BIAS::CScommData
  • FGCB : BIAS::VideoSource_DSHOW
  • file_type : xvimage
  • fileName_ : MainFrame
  • FileName_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • FileNames_ : BIAS::VideoSource_Disk
  • FileSize_ : BIAS::VideoStream
  • fImg_ : BIAS::CondensImg, BIAS::CondensHisto
  • firstcontact : BIAS::CScommData
  • FirstLeft : _FilterBorders
  • firstOrderScale_ : BIAS::CondensHisto
  • FirstUpper : _FilterBorders
  • flag : option
  • floatData : BIAS::CScommMsg
  • focallength : BIAS::CPDiscreteParam
  • focallength_ : BIAS::ProjectionParametersPerspective
  • focallengthDef_ : BIAS::CameraParam, BIAS::CameraData
  • FocallengthX : BIAS::PMDImageMetaData
  • focallengthZoom_ : BIAS::CameraParam, BIAS::ProjectionParametersZoom
  • focalX_ : BIAS::CylinderMapping
  • focalY_ : BIAS::CylinderMapping
  • font : MyGLCanvas
  • fontname : BIAS::DrawTextGL
  • ForceF7_ : BIAS::VideoSource_DCAM
  • format2_ : BIAS::VideoSource_V4L
  • Format_ : MIP::VideoSource_DV2
  • FParams_ : BIAS::Parametrization
  • Fps_ : BIAS::MDcam
  • Frame_ : DragAndDropTarget, BIAS::TrackerSynth< StorageType, CalculationType >, BIAS::GuiWX
  • framecount : MyFrame
  • framecount_ : BIAS::OpenGLCanvasBase
  • FrameCounter_ : MyFrame
  • FrameCounterAsTimeStamp_ : BIAS::VideoSource_Disk
  • FrameFinished_ : MIP::VideoSource_DV
  • framenum : BIAS::DC_GPS
  • FrameSize_ : MIP::VideoSource_DV2
  • FramesPerSecond_ : BIAS::VideoSource
  • FrameStarted_ : MIP::VideoSource_DV
  • Frow_ : BIAS::Parametrization
  • frustum : BIAS::CameraViewInternals
  • Fscale_ : BIAS::Parametrization
  • fspare1 : xvimage
  • fspare2 : xvimage
  • fValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- g -

  • g_uniqueCounter : BIAS::UUID
  • Gain : CameraParameter_s
  • GainChanged : CameraParameter_s
  • GammaMode : CameraParameter_s
  • GammaModeChanged : CameraParameter_s
  • gauss_ : BIAS::Tracker< StorageType, CalculationType >
  • Gear : BIAS::DC_inertial
  • GenerateNewUIDs_ : BIAS::VideoSource_Disk
  • ggauss_ : BIAS::Tracker< StorageType, CalculationType >
  • ggaussasymmetric_ : BIAS::Tracker< StorageType, CalculationType >
  • GlobalDebugLevel : BIAS::Debug
  • gpsTime : BIAS::DC_GPS
  • Grabbing_ : BIAS::VideoSource
  • GrabbingContinous_ : BIAS::VideoSource_V4L, BIAS::VideoSource
  • GrabBuffer_ : MIP::VideoSource_DV
  • GrabImage : MyFrame
  • GrabTime_ : BIAS::VideoSource_V4L
  • grad_ : BIAS::Tracker< StorageType, CalculationType >
  • GradientType_ : BIAS::Tracker< StorageType, CalculationType >
  • Grid_ : BIAS::ParamGUIPanel
  • Group_ : BIAS::ParamTypeBase
  • GroupNames_ : BIAS::Param
  • gsobel3x3_ : BIAS::Tracker< StorageType, CalculationType >
  • GtkInitialized_ : BIAS::GuiGTK
  • GtkInitializedMutex_ : BIAS::GuiGTK
  • GuiWxMutex_ : BIAS::GuiWX
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- h -

  • H : BIAS::Projection3DData
  • H0_ : BIAS::PMatrix
  • H_ : BIAS::Kalman, BIAS::HomographyMapping< InputStorageType, OutputStorageType >, BIAS::Parametrization, BIAS::HMatrixEstimation
  • HalfWinSize_ : BIAS::Tracker< StorageType, CalculationType >
  • has_arg : option
  • Header_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder, BIAS::VideoStream
  • height : BIAS::CameraViewport, BIAS::PMDImageMetaData
  • Height : BIAS::VideoStream::VSHeader
  • height_ : BIAS::CameraParam, BIAS::BackwardMapping< InputStorageType, OutputStorageType >, BIAS::ImageCanvas, BIAS::CameraData, BIAS::ProjectionParametersBase
  • Height_ : BIAS::VideoSource, BIAS::GuiBase, BIAS::EpipolarLine, BIAS::ImageBase
  • heightBrutto : BIAS::ImgObjGL
  • heightOrig : BIAS::ImgObjGL
  • Help_ : BIAS::ParamTypeBase
  • Hidden_ : BIAS::ParamTypeBase
  • Hinf_ : BIAS::PMatrix
  • hist1_ : BIAS::ColorMultiHistogram< StorageType >
  • hist2_ : BIAS::ColorMultiHistogram< StorageType >
  • hist_ : BIAS::ColorHistogram< StorageType >
  • Hist_ : BIAS::Histogram2D, BIAS::Histogram
  • histCount_ : BIAS::ColorHistogram< StorageType >
  • HistCount_ : BIAS::Histogram
  • histl_ : BIAS::ColorHistogram< StorageType >
  • HistSize_ : BIAS::Histogram
  • HParams_ : BIAS::Parametrization
  • Hscale_ : BIAS::Parametrization
  • HT_ : BIAS::Kalman
  • hue : SegmentationData
  • hueIntervall : SegmentationData
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- i -

  • I : BIAS::cornerstruct
  • IC_ : MyFrame
  • id : BIAS::ImgObjGL, BIAS::ExifTag
  • ID_ : BIAS::VideoSource
  • identifier : BIAS::Projection3DData, xvimage
  • identifier_ : BIAS::Projection
  • Identity_ : BIAS::Kalman
  • idleRepaintEnabled : BIAS::OpenGLCanvas
  • Idum_ : BIAS::Random
  • IEEE1394Card_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • IEEE1394Handle_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • Ifs_ : BIAS::VideoStream
  • IlluCorrX_ : BIAS::UnVignette, BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::CameraData
  • IlluCorrY_ : BIAS::UnVignette, BIAS::MatlabTBUndistortion, BIAS::CameraParam, BIAS::CameraData
  • image : BIAS::ColorSegmentation
  • image_ : BIAS::ColorHistogram< StorageType >
  • ImageCanvasUC_ : MainFrame
  • imagedata : xvimage
  • ImageData : BIAS::Image3DData
  • ImageData_ : BIAS::ImageBase
  • ImageDataArray_ : BIAS::ImageBase
  • ImageFileNames_ : MainFrame
  • ImageHeight_ : MainFrame
  • ImageName_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas, BIAS::ZoomFrame
  • ImageSize_ : BIAS::VideoSource, BIAS::VideoStream
  • ImageWidth_ : MainFrame
  • img_ : BIAS::CondensHisto
  • img_h : BIAS::Contour
  • img_w : BIAS::Contour
  • ImgBuffer_ : BIAS::VideoShMFeeder
  • imgHeight_ : BIAS::VideoServer
  • imgHSV : SegmentationData
  • imgWidth_ : BIAS::VideoServer
  • importanceFraction_ : BIAS::Condensation
  • imRes : SegmentationData
  • index_ : TNT::Fortran_Sparse_Vector< T >
  • indexRegMsgs_ : BIAS::CScommBase
  • indexTminus2_ : BIAS::Condensation
  • info : BIAS::cornerstruct
  • InitData_ : MIP::VideoSource_DV2
  • initial_ : BIAS::Condensation
  • initialized : BIAS::DrawTextGL
  • Initialized_ : BIAS::VideoServer
  • initializedCubic_ : BIAS::BSplineCurve
  • initializedPoly_ : BIAS::Interpolator
  • initializedQuadratic_ : BIAS::BSplineCurve
  • InitWithContextDone_ : BIAS::OpenGLCanvasBase
  • instance_ : BIAS::OpenGLCanvasBase
  • Instances_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • InstancesTotal_ : MIP::VideoSource_DV, BIAS::VideoSource_DCAM
  • instancesTotalNo_ : BIAS::OpenGLCanvasBase
  • intData : BIAS::CScommMsg
  • InterestPoint : BIAS::ImageCanvasGLBase
  • InterleavedDataOrder_ : BIAS::ImageBase
  • interpolationType_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • interpolatorAngle_ : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • interpolatorAngleBack_ : BIAS::SphericalUndistortion, BIAS::ProjectionParametersSpherical
  • InterpolatorIllu_ : BIAS::UnVignette
  • interpolatorIllu_ : BIAS::SphericalUndistortion
  • IntersectsInImage : TIntersect
  • intHisto_ : BIAS::CondensHisto
  • invK_ : BIAS::ProjectionParametersZoom, BIAS::ProjectionParametersPerspective
  • invTransform_ : BIAS::CoordinateTransform3D
  • IsCreator_ : BIAS::VideoSource_Shm
  • IsDecomposed_ : BIAS::PMatrix
  • IsInitialized_ : BIAS::CameraParam
  • isInitialized_ : BIAS::XMLIO
  • IsMetric_ : BIAS::PMatrix
  • ispare1 : xvimage
  • ispare2 : xvimage
  • IsPyramid_ : BIAS::GuiBase
  • isServer_ : BIAS::CScommBase
  • IsValid_ : BIAS::UUID
  • item : BIAS::ItemAndWidget
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- p -

  • p1_ : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • p2_ : BIAS::HMatrixEstimation, BIAS::FMatrixEstimation
  • p2tracked_ : BIAS::Tracker< StorageType, CalculationType >
  • P_ : BIAS::Camera< StorageType >
  • p_2nd_canvas : MyFrame
  • p_canvas : MyFrame
  • p_canvas1 : MyFrame
  • p_canvas2 : MyFrame
  • p_externals : BIAS::CameraViewController
  • p_font : BIAS::OpenGLCanvasBase
  • p_id_SelfAllocated : BIAS::ImgObjGL
  • p_imgBias : BIAS::WrapBias2Ipl
  • p_imgIpl : BIAS::WrapBias2Ipl
  • p_imgIplDestroyable : BIAS::WrapBias2Ipl
  • p_internals : BIAS::CameraViewController
  • p_ownerframe : BIAS::OpenGLCanvasBase
  • p_StatBar : BIAS::ScaledImageCanvas
  • p_valueImage : BIAS::ImgObjGL
  • p_valueImage_SelfAllocated : BIAS::ImgObjGL
  • p_viewCtrl_ : BIAS::OpenGLCanvas
  • Padding : BIAS::VideoStream::VSHeader
  • panelAspectRatio_ : BIAS::ProjectionGUI
  • panelCenter_ : BIAS::ProjectionGUI
  • panelFocalLength_ : BIAS::ProjectionGUI
  • panelImageSize_ : BIAS::ProjectionGUI
  • panelKMatrix_ : BIAS::ProjectionGUI
  • panelPrincipal_ : BIAS::ProjectionGUI
  • panelQuaternion_ : BIAS::ProjectionGUI
  • panelRadius_ : BIAS::ProjectionGUI
  • panelRMatrix_ : BIAS::ProjectionGUI
  • panelUndistortion_ : BIAS::ProjectionGUI
  • pAngle_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • PanPos : BIAS::DC_ptu
  • param_ : MyFrame
  • ParamMap_ : BIAS::Param
  • Params_ : BIAS::ThreeDOut
  • ParamsAllocated_ : BIAS::VideoServer, BIAS::CornerDetectorBase< StorageType >
  • Parent_ : BIAS::ParamGUIPanel
  • ParPort_ : BIAS::MDcam
  • pCaptureGraphBuilder2_ : BIAS::VideoSource_DSHOW
  • PConsistencyBackup_ : BIAS::PMatrix
  • PConsistencyBackupSVD_ : BIAS::PMatrix
  • pDsBuffer_ : BIAS::VideoSource_DSHOW
  • PercentageValues_ : BIAS::UnVignette
  • pGrabber_ : BIAS::VideoSource_DSHOW
  • pGraphBuilder_ : BIAS::VideoSource_DSHOW
  • PhiX : BIAS::SphericalUndistortion::LuTpxpyEntry
  • PhiY : BIAS::SphericalUndistortion::LuTpxpyEntry
  • pImageBuffer_ : BIAS::VideoSource_DSHOW
  • pImgBuffer_ : BIAS::VideoSource_Shm, BIAS::VideoSource_Net
  • PInfinity_ : BIAS::EpipolarLine
  • PInfinityPosition_ : BIAS::EpipolarLine
  • pInPin_ : BIAS::VideoSource_DSHOW
  • pInstance_ : BIAS::LogFacility
  • Pitch : BIAS::DC_inertial
  • pixsizx : xvimage
  • pixsizy : xvimage
  • planar : ThreadArg__
  • pMediaControl_ : BIAS::VideoSource_DSHOW
  • pMediaEvent_ : BIAS::VideoSource_DSHOW
  • pNullRenderer_ : BIAS::VideoSource_DSHOW
  • point : BIAS::WeightedSigmaPoint
  • Point : BIAS::Point3DData, TIntersect, BIAS::Conic2D
  • PointFin_ : BIAS::HomgLine3D
  • PointInf_ : BIAS::HomgLine3D
  • Points_ : BIAS::Tracker< StorageType, CalculationType >
  • pointsFrom_ : BIAS::HMatrixEstimation
  • pointsize : BIAS::RenderModeGL
  • PointSize : BIAS::ThreeDOutParameters
  • pointsTo_ : BIAS::HMatrixEstimation
  • PointStyle : BIAS::ThreeDOutParameters
  • PointValid_ : BIAS::Camera< StorageType >
  • poly_ : BIAS::Polynom
  • polygonmodeBACK : BIAS::RenderModeGL
  • polygonmodeFRONT : BIAS::RenderModeGL
  • port_ : BIAS::VideoSource_Net, BIAS::VideoServer
  • portChange_ : BIAS::CScommBase
  • Pose_ : BIAS::ProjectionParametersBase, BIAS::PoseParametrization
  • PoseInRigCenter_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigPitch_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigRoll_ : BIAS::CameraData, BIAS::SensorData
  • PoseInRigYaw_ : BIAS::CameraData, BIAS::SensorData
  • pOutPin_ : BIAS::VideoSource_DSHOW
  • PP : BIAS::PMatrix3DData
  • PPXTextCtrl_ : MainFrame
  • PPYTextCtrl_ : MainFrame
  • pRadius_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • Precision_ : BIAS::GaussHelmert
  • PredictedPoints_ : BIAS::Tracker< StorageType, CalculationType >
  • PrincipalX : BIAS::PMDImageMetaData
  • principalX_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • PrincipalY : BIAS::PMDImageMetaData
  • principalY_ : BIAS::CameraParam, BIAS::CameraData, BIAS::ProjectionParametersBase
  • PrinciplePointX_ : MainFrame, BIAS::UnVignette
  • PrinciplePointY_ : MainFrame, BIAS::UnVignette
  • processFirstOrderScale_ : BIAS::Condensation
  • processMean_ : BIAS::Condensation
  • processSecondOrderScale_ : BIAS::Condensation
  • Proj_ : BIAS::Camera< StorageType >
  • projection_ : BIAS::ProjectionGUI
  • projectionPanel_ : BIAS::ProjectionGUI
  • projgui_ : BIAS::ProjectionDialog
  • ProjValid_ : BIAS::Camera< StorageType >
  • pSampleOutPin_ : BIAS::VideoSource_DSHOW
  • pSrcFilter_ : BIAS::VideoSource_DSHOW
  • pthreadListener_ : BIAS::CScommServer
  • pu_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • pub : my_error_mgr
  • PValid_ : BIAS::Camera< StorageType >
  • px_ : BIAS::CylinderMapping
  • py_ : BIAS::CylinderMapping
  • PyIndex_ : BIAS::Tracker< StorageType, CalculationType >
  • Pyramid0Height_ : BIAS::GuiBase
  • Pyramid0Width_ : BIAS::GuiBase
  • pyramid_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • PyramidLevels_ : BIAS::GuiBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- q -

  • Q_ : BIAS::SimilarityTransform, BIAS::CoordinateTransform3D
  • QuitButton_ : MyFrame, BIAS::ZoomFrame
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- r -

  • r : Multitype, doublecomplex, complex, Multitype, doublecomplex, complex, BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • R_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >, BIAS::PMatrix, BIAS::AffineTransf
  • radius_ : BIAS::CameraParam, BIAS::ProjectionParametersSpherical, BIAS::CameraData
  • radiusSelection : BIAS::Projection3DData
  • random_ : BIAS::Condensation
  • rangeChecked_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • rc : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • realtimeAnimation : BIAS::OpenGLCanvas
  • RedirErr_ : BIAS::RedirectStreams
  • RedirOut_ : BIAS::RedirectStreams
  • refHisto2_ : BIAS::CondensHisto
  • refHisto_ : BIAS::CondensHisto
  • registeredMsgs_ : BIAS::CScommBase
  • registerLock_ : BIAS::CScommBase
  • release : xvimage
  • rendermode : BIAS::OpenGLCanvasBase
  • reqBuf : BIAS::VideoSource_V4L
  • res_ : BIAS::Tracker< StorageType, CalculationType >
  • RescaleFilter_ : BIAS::VideoServer
  • reserve : xvimage
  • ResiduiMAD_ : BIAS::Tracker< StorageType, CalculationType >
  • ResiduiMSD_ : BIAS::Tracker< StorageType, CalculationType >
  • resizeFactor_ : BIAS::VideoServer
  • rf : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • rgbim_ : BIAS::ScaledImageCanvas, BIAS::ImageCanvas
  • right : BIAS::CameraViewFrustum
  • Right_ : BIAS::VideoSource_Stereo
  • RightIm_ : BIAS::VideoSource_Stereo
  • RMaxLine_ : BIAS::EpipolarLine
  • RMinLine_ : BIAS::EpipolarLine
  • ROffset_ : BIAS::EpipolarLine
  • ROI_ : BIAS::BackwardMapping< InputStorageType, OutputStorageType >
  • Roi_ : BIAS::ImageBase
  • RootNode_ : BIAS::XMLIO
  • Rotation_ : BIAS::RigParameter
  • RotAxis : BIAS::Ellipsoid3DData
  • row_ : TNT::Matrix< T >
  • row_size : xvimage
  • rowind_ : TNT::Fortran_Sparse_Col_Matrix< T >
  • rowm1_ : TNT::Matrix< T >
  • rows_ : BIAS::MatrixPanel
  • rtActual : BIAS::TimeMeasure
  • rtKernelSum : BIAS::TimeMeasure
  • rtLast : BIAS::TimeMeasure
  • rtRealSum : BIAS::TimeMeasure
  • running : TNT::stopwatch, BIAS::TimeMeasure
  • RValid_ : BIAS::Camera< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- s -

  • s0 : BIAS::Ellipsoid3DData
  • s1 : BIAS::Ellipsoid3DData
  • s2 : BIAS::Ellipsoid3DData
  • S_ : BIAS::SVD
  • sampleImportanceWeights_ : BIAS::Condensation
  • samplePosNew_ : BIAS::Condensation
  • samplePosOld_ : BIAS::Condensation
  • samplePosTminus2_ : BIAS::Condensation
  • sampleWeights_ : BIAS::Condensation
  • SBar_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • SBarID_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • scale_ : BIAS::SimilarityTransform, BIAS::CoordinateTransform3D
  • scaledf_ : BIAS::ScaledImageCanvas
  • ScaledImageSizeX_ : BIAS::ImageCanvas
  • ScaledImageSizeY_ : BIAS::ImageCanvas
  • scalefactor : BIAS::ImageCanvasGLBase
  • scaleFactorSpeed : BIAS::DC_GPS
  • ScaleSL_ : BIAS::ScaledImageCanvas
  • ScaleYToMaxEntry_ : BIAS::Histogram
  • scanbus : MyFrame
  • sCaptureDeviceName_ : BIAS::VideoSource_DSHOW
  • ScorpionTimestampActive_ : BIAS::VideoSource_DCAM
  • sdata : BIAS::AppData
  • SearchOverInf_ : BIAS::EpipolarLine
  • secondHistPos_ : BIAS::CondensHisto
  • secondOrderScale_ : BIAS::CondensHisto
  • Seed_ : BIAS::Random
  • SelectedCam_ : BIAS::VideoSource_DCAM
  • SelectRectangle_ : BIAS::ImageCanvasEnhanced
  • selfModifying_ : BIAS::ProjectionGUI
  • SendBuffer_ : BIAS::VideoServer
  • SendImage_ : BIAS::VideoServer
  • SensorCenter_ : BIAS::RigParameter
  • SensorRotation_ : BIAS::RigParameter
  • server : BIAS::CScommMsg
  • server_ : BIAS::VideoServer
  • setjmp_buffer : my_error_mgr
  • setup_ : BIAS::JpegHandler
  • shademodel : BIAS::RenderModeGL
  • Sharpen : CameraParameter_s
  • SharpenChanged : CameraParameter_s
  • Shift16_ : BIAS::VideoSource_DCAM
  • shift_ : BIAS::ColorHistogram< StorageType >
  • shiftLum_ : BIAS::ColorHistogram< StorageType >
  • shiftSat_ : BIAS::ColorHistogram< StorageType >
  • Shm_ : BIAS::VideoSource_Shm, BIAS::VideoShMFeeder
  • ShmContext_ : BIAS::VideoShMFeeder
  • ShmFeeder : MyFrame
  • ShmNames : MyFrame
  • ShmPrefix : MyFrame
  • ShortCmd_ : BIAS::ParamTypeBase
  • ShowImg_ : MyFrame
  • ShowMouse_ : BIAS::GuiBase
  • ShowScaled_ : BIAS::ImageCanvas
  • Shutter : CameraParameter_s
  • ShutterChanged : CameraParameter_s
  • SinkP_ : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • size : BIAS::SVD, TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >, BIAS::CameraViewController
  • Size_ : BIAS::VideoSource_Shm::ShmImageHeader
  • SliderGain_ : MyFrame
  • SliderShutter_ : MyFrame
  • SLScale_ : BIAS::ZoomFrame
  • SortVec_ : BIAS::Label
  • SourceP_ : BIAS::ProjectionMapping< InputStorageType, OutputStorageType >
  • speed : BIAS::DC_GPS
  • Speed : BIAS::DC_inertial
  • SplineLuT1_ : BIAS::Interpolator
  • SquaredSum_ : BIAS::Distribution
  • src : ThreadArg__
  • stag : BIAS::AppData
  • Start : BIAS::TimeMeasurement, BIAS::TimeMeasure, BIAS::Line3DData
  • Start_ : BIAS::EpipolarLine
  • startpos : BIAS::CameraViewController
  • startposExt : BIAS::CameraViewController
  • startposInt : BIAS::CameraViewController
  • StartReadTimeStamp : BIAS::DC_ptu
  • startTangentX_ : BIAS::Interpolator
  • startTangentY_ : BIAS::Interpolator
  • startTangentZ_ : BIAS::Interpolator
  • startx : xvimage
  • starty : xvimage
  • State_ : BIAS::Kalman
  • stateDim_ : BIAS::Condensation
  • StaticLabel_ : MainFrame
  • Status_ : MIP::VideoSource_DV2
  • StatusBar_ : MyFrame
  • stdFarbRaum : BIAS::ColorSegmentation
  • SteeringAngle : BIAS::DC_inertial
  • SteeringWheelLever : BIAS::DC_inertial
  • StepsTextCtrl_ : MainFrame
  • StopReadTimeStamp : BIAS::DC_ptu
  • stopstruct : BIAS::TimeMeasure
  • StopWatch_ : MyFrame
  • StorageType : BIAS::VideoStream::VSHeader
  • StorageType_ : BIAS::ImageBase
  • stringData : BIAS::CScommMsg
  • su_ : BIAS::UndistortionMapping< InputStorageType, OutputStorageType >
  • subrow_size : xvimage
  • Sum_ : BIAS::Distribution
  • sumOfImportanceWeights_ : BIAS::Condensation
  • sumOfWeights_ : BIAS::Condensation
  • SupportedFeature_ : BIAS::VideoSource_DCAM
  • SupportedFormats_ : BIAS::VideoSource_DCAM
  • SupportedFramerates_ : BIAS::VideoSource_DCAM
  • SupportedModes_ : BIAS::VideoSource_DCAM
  • Svd_ : BIAS::PMatrix
  • svd_ : BIAS::Kalman
  • Sym_ : BIAS::EpipolarLine
  • SystemStateDim_ : BIAS::Kalman
  • szName : tagTHREADNAME_INFO
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- t -

  • T_ : BIAS::Interpolator
  • tag : BIAS::AppData, TagInfo
  • target : BIAS::ImgObjGL
  • targetAddress_ : BIAS::VideoServer
  • tb_ : BIAS::Tracker< StorageType, CalculationType >
  • TempomatLever : BIAS::DC_inertial
  • terminateListener_ : BIAS::CScommServer
  • terminateReceiver_ : BIAS::CScommBase
  • texCoordSet : BIAS::IndexedFaceSet
  • texobj : BIAS::ImageCanvasGLBase
  • texture : BIAS::IndexedFaceSet
  • texture_ : BIAS::TriangleMesh
  • textureCoords_ : BIAS::TriangleMesh
  • textureName : BIAS::IndexedFaceSet
  • thedata : myTestClass
  • theID_ : BIAS::UUID
  • ThreadCondition_ : BIAS::VideoSource_V4L
  • threaded_ : BIAS::CScommBase
  • threadid : BIAS::CScommData
  • ThreadInitialized_ : BIAS::GuiWX
  • ThreadsInitialized_ : BIAS::GuiGTK
  • TiltPos : BIAS::DC_ptu
  • time : BIAS::OpenGLCanvasBase
  • Time_ : BIAS::VideoSource_Shm::ShmImageHeader
  • timeOut_ : BIAS::CScommBase
  • timeOutFlag_ : BIAS::CScommBase
  • Timer_ : MyFrame, MainFrame
  • timer_ : BIAS::VideoSource_Disk, BIAS::TimeMeasurement
  • TimerStream_ : BIAS::TimeMeasure
  • TimeSec_ : BIAS::Camera< StorageType >
  • TimeStamp : BIAS::DC_ptu
  • TimeUSec_ : BIAS::Camera< StorageType >
  • TimeValid_ : BIAS::Camera< StorageType >
  • Title_ : BIAS::ImageCanvas, BIAS::ZoomFrame, BIAS::GuiBase
  • tl : SegmentationData, BIAS::CCAStruct
  • TmpWxImg_ : BIAS::GuiWX
  • top : BIAS::CameraViewFrustum
  • Top_ : BIAS::VideoSource_DCAM
  • TopLeft_ : BIAS::ImageCanvasEnhanced
  • TopLefts_ : BIAS::Label
  • ToplevelWindow_ : MyApp
  • total : TNT::stopwatch
  • TotalLength_ : BIAS::VideoSource_Shm
  • Tracks_ : BIAS::TrackerSynth< StorageType, CalculationType >
  • TransformedCurrent_ : BIAS::EpipolarLine
  • TransformedEnd_ : BIAS::EpipolarLine
  • TransformedStart_ : BIAS::EpipolarLine
  • TransmissionTime_ : BIAS::VideoSource_DCAM
  • trash : xvimage
  • triangleIndices_ : BIAS::TriangleMesh
  • Trigger_ : BIAS::VideoSource_DCAM
  • tsec : BIAS::VideoStream::VSImageHeader
  • tusec : BIAS::VideoStream::VSImageHeader
  • Type_ : BIAS::EpipolarLine
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- u -

  • U_ : BIAS::SVD
  • ubound_ : TNT::Index1D
  • ucim_ : BIAS::ScaledImageCanvas, BIAS::ZoomImageCanvas
  • ucImage_ : MainFrame
  • UDPServerThrottle_ : BIAS::VideoServer
  • ul : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • UL : BIAS::Image3DData, BIAS::PMatrix3DData
  • UndistCoeff : BIAS::PMDImageMetaData
  • UnitHeight_ : BIAS::VideoSource_DCAM
  • UnitWidth_ : BIAS::VideoSource_DCAM
  • unVigImage_ : MainFrame
  • UnVignette_ : MainFrame
  • up : BIAS::CameraViewExternals
  • Up : BIAS::PMatrix3DData
  • UpperLeftX_ : BIAS::ROI
  • UpperLeftY_ : BIAS::ROI
  • ur : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • UR : BIAS::Image3DData, BIAS::PMatrix3DData
  • UseBinning_ : BIAS::VideoSource_DCAM
  • UseCoarserPointIfLost_ : BIAS::Tracker< StorageType, CalculationType >
  • useDirectNeighbors_ : BIAS::GradientSimple< InputStorageType, OutputStorageType >
  • UseDMA_ : BIAS::VideoSource_DCAM
  • useMultiHistogram_ : BIAS::CondensHisto
  • user : BIAS::TimeMeasure
  • UserGuesses_ : BIAS::RANSACPreKnowledge< SolutionType >
  • UserTopLeft_ : BIAS::VideoSource_DCAM
  • UseTCP_ : BIAS::VideoSource_Net
  • useUDP_ : BIAS::VideoServer
  • ustIgnoreDistortion_ : BIAS::ProjectionParametersBase
  • ustTransformIntoImage_ : BIAS::ProjectionParametersBase
  • uuid : BIAS::VideoStream::VSImageHeader
  • ux_ : BIAS::ColorHistogram< StorageType >
  • uy_ : BIAS::ColorHistogram< StorageType >
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- v -

  • V : BIAS::Projection3DData
  • V0_ : BIAS::PMatrix
  • v_ : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Fortran_Matrix< T >, TNT::Matrix< T >
  • val : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >, BIAS::Feat, option
  • val_ : TNT::Fortran_Sparse_Vector< T >, TNT::Fortran_Sparse_Col_Matrix< T >
  • value : BIAS::ExifTag
  • value_ : BIAS::ParamTypeEnum, BIAS::ParamTypeVecInt, BIAS::ParamTypeVecDbl, BIAS::ParamTypeString, BIAS::ParamTypeDouble, BIAS::ParamTypeInt, BIAS::ParamTypeBool
  • Vbox_ : BIAS::GuiGTK
  • vecParameters_ : BIAS::Projection
  • Vector_ : BIAS::ROI
  • VectorValid_ : BIAS::ROI
  • VehicleFlags : BIAS::DC_inertial
  • verbose_ : BIAS::CScommBase
  • verboseOut_ : BIAS::CScommBase
  • version : xvimage
  • Version_ : BIAS::ROI, BIAS::ImageBase
  • vertexNormals_ : BIAS::TriangleMesh
  • vertexSet : BIAS::IndexedFaceSet
  • viewAt : BIAS::CameraViewExternals
  • viewport : BIAS::CameraViewInternals
  • VignettePercentage_ : MainFrame
  • vm1_ : TNT::Vector_Adaptor< BBVec >, TNT::Vector< T >, TNT::Matrix< T >
  • vsd_ : BIAS::VideoSource_DiskPMD
  • vsync : BIAS::RenderModeGL
  • VT_ : BIAS::SVD
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- w -

  • waitForNew_ : BIAS::VideoSource_V4L
  • weight : BIAS::SphericalUndistortion::LuTEntry, BIAS::MatlabTBUndistortion::LuTEntry
  • weight_cov : BIAS::WeightedSigmaPoint
  • weight_mean : BIAS::WeightedSigmaPoint
  • wheight_ : BIAS::ZoomImageCanvas
  • WhiteBalance : CameraParameter_s
  • WhiteBalanceButton_ : MyFrame
  • WhiteBalanceChanged : CameraParameter_s
  • WhiteBalanceOnePush : CameraParameter_s
  • widget : BIAS::ItemAndWidget
  • WidgetIDs_ : BIAS::ParamGUIPanel
  • width : BIAS::CameraViewport, BIAS::PMDImageMetaData
  • Width : BIAS::VideoStream::VSHeader
  • Width_ : BIAS::VideoSource, BIAS::GuiBase, BIAS::EpipolarLine, BIAS::ImageBase
  • width_ : BIAS::CameraParam, BIAS::BackwardMapping< InputStorageType, OutputStorageType >, BIAS::ImageCanvas, BIAS::CameraData, BIAS::ProjectionParametersBase
  • widthBrutto : BIAS::ImgObjGL
  • widthOrig : BIAS::ImgObjGL
  • WidthStep_ : BIAS::ImageBase
  • Window_ : BIAS::ZoomFrame, BIAS::GuiGTK
  • WindowCount_ : BIAS::GuiGTK
  • WindowCounter_ : BIAS::GuiWX
  • WindowCountMutex_ : BIAS::GuiGTK
  • WindowCreated_ : BIAS::GuiBase
  • WriteComments_ : BIAS::Param
  • WriteEnhanced_ : BIAS::Param
  • WriteIndent_ : BIAS::Param
  • writeOutTexture : BIAS::IndexedFaceSet
  • WriteToFile_ : BIAS::ParamTypeBase
  • WriteViewpoints_ : BIAS::ThreeDOut
  • wwidth_ : BIAS::ZoomImageCanvas
  • wxbitmap_mutex_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • wximage_ : BIAS::ImageCanvas, BIAS::ZoomImageCanvas
  • WxInitialized : BIAS::GuiWX
  • WxMainLoop_ : BIAS::GuiWX
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- x -

  • x : BIAS::CCAStruct, BIAS::cornerstruct, BIAS::Feat, BIAS::Position
  • x0 : BIAS::CameraViewport
  • X_ : BIAS::UnVignette
  • x_floor : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • x_floor_end : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • XBinCount_ : BIAS::Histogram2D
  • XBinSize_ : BIAS::Histogram2D
  • XCenter_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • xCoeff_ : BIAS::BSplineCurve
  • XMaxBinVal_ : BIAS::Histogram2D
  • XMinBinVal_ : BIAS::Histogram2D
  • xmlDoc_ : BIAS::XMLIO
  • XOffset_ : BIAS::GuiBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members - Variables

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- y -

  • y : BIAS::CCAStruct, BIAS::cornerstruct, BIAS::Feat, BIAS::Position
  • y0 : BIAS::CameraViewport
  • Y_ : BIAS::UnVignette
  • y_floor : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • y_floor_end : BIAS::TrackerBaseInterface< StorageType >, BIAS::TrackerBase< StorageType >
  • Yaw : BIAS::DC_inertial
  • yawRateOffset : BIAS::DC_GPS
  • YawRateOffset : BIAS::DC_inertial
  • YawRateRaw : BIAS::DC_inertial
  • YBinCount_ : BIAS::Histogram2D
  • YBinSize_ : BIAS::Histogram2D
  • YCenter_ : BIAS::LogPolarMapping< InputStorageType, OutputStorageType >
  • yCoeff_ : BIAS::BSplineCurve
  • YMaxBinVal_ : BIAS::Histogram2D
  • YMinBinVal_ : BIAS::Histogram2D
  • YOffset_ : BIAS::GuiBase
Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Gauss.cpp Source File

Filter

Gauss.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Gauss.hh"
00026 #include <Base/Image/ImageConvert.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 //////////////////////////////////////////////////////////////////////////
00032 //                 implementation
00033 //////////////////////////////////////////////////////////////////////////
00034
00035
00036 template <class InputStorageType, class OutputStorageType>
00037 Gauss<InputStorageType, OutputStorageType>::
00038 Gauss()
00039   : Convolution<InputStorageType, OutputStorageType>()
00040 {
00041   // no param object !
00042   this->_ParamsAllocated = true;
00043   _GaussSigma=new double;
00044   *_GaussSigma = 0.7;
00045   _GaussRatio=new double;
00046   *_GaussRatio = 0.01;
00047   _LastRatio = _LastSigma = -1.0;
00048   _GaussIO = NULL;
00049   _GaussOO = NULL;
00050 }
00051
00052 template <class InputStorageType, class OutputStorageType>
00053 Gauss<InputStorageType, OutputStorageType>::
00054 Gauss(Param& para, const std::string& postfix)
00055   : Convolution<InputStorageType, OutputStorageType>(para, "-Gauss"+postfix)
00056 {
00057   _LastRatio = _LastSigma = -1.0;
00058   int grp = para.GetFreeGroupID();
00059   _AddParam(para, grp, "-Gauss"+postfix);
00060   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Gauss");
00061   _GaussIO = NULL;
00062   _GaussOO = NULL;
00063
00064 }
00065
00066 template <class InputStorageType, class OutputStorageType>
00067 Gauss<InputStorageType, OutputStorageType>::
00068 Gauss(Param& para, const int grp, const std::string& postfix)
00069   : Convolution<InputStorageType,OutputStorageType>(para,grp,"-Gauss"+postfix)
00070 {
00071   _LastRatio = _LastSigma = -1.0;
00072   _AddParam(para, grp, "-Gauss"+postfix);
00073   _GaussIO = NULL;
00074   _GaussOO = NULL;
00075 }
00076
00077 template <class StorageType, class KernelType>
00078 Gauss<StorageType, KernelType>::~Gauss()
00079 {
00080   if (this->_ParamsAllocated) {
00081     delete _GaussSigma; _GaussSigma = NULL;
00082     delete _GaussRatio; _GaussRatio = NULL;
00083   }
00084   if (_GaussIO!=NULL) delete _GaussIO;
00085   if (_GaussOO!=NULL) delete _GaussOO;
00086 }
00087
00088
00089 ////////////////////////////////////////////////////////////////////////////
00090
00091 template <class InputStorageType, class OutputStorageType>
00092 int Gauss<InputStorageType, OutputStorageType>::
00093 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00094 {
00095   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter\n");
00096   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00097     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00098
00099   if (_fm.IsSize1x1()){ // do not filter if filter mask is 1x1
00100     return ImageConvert::ConvertST(src, dst, dst.GetStorageType());
00101   }
00102   if ((src.GetChannelCount()==1) && (this->GetBorderHandling() == TBH_valid))
00103     return FilterGrey(src, dst);
00104   return Convolution<InputStorageType, OutputStorageType>::Filter(src,dst);
00105 }
00106
00107 template <class InputStorageType, class OutputStorageType>
00108 int Gauss<InputStorageType, OutputStorageType>::
00109 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00110 {
00111   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter\n");
00112   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00113     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00114   return Convolution<InputStorageType,OutputStorageType>::FilterFloat(src,dst);
00115 }
00116
00117 template <class InputStorageType, class OutputStorageType>
00118 int Gauss<InputStorageType, OutputStorageType>::
00119 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00120 {
00121   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter\n");
00122   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00123     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00124   return Convolution<InputStorageType, OutputStorageType>::FilterInt(src,dst);
00125 }
00126
00127
00128 template <class InputStorageType, class OutputStorageType>
00129 int Gauss<InputStorageType, OutputStorageType>::
00130 FilterGrey(const Image<InputStorageType>& src,
00131            Image<OutputStorageType>& dst,
00132            bool ResetROI)
00133 {
00134   if (_GaussIO==NULL)
00135     _GaussIO = new Gauss<InputStorageType, OutputStorageType>;
00136   if (_GaussOO==NULL)
00137     _GaussOO = new Gauss<OutputStorageType, OutputStorageType>;
00138
00139   // this is the final target sigma:
00140   double smoothsigma = *_GaussSigma;
00141
00142   // compute maximum sigma for the different kernel sizes
00143   // approximate rule:
00144   // if you want to neglect filter mask entries below 10% of the maximum,
00145   // your gauss'es half window size should be of size 5*sigma
00146   const double sqrtlogratio  = 1.0 / sqrt(-2.0 * log(*_GaussRatio));
00147   const double maxsigma3x3   = sqrtlogratio;
00148   const double maxsigma5x5   = 2.0 * sqrtlogratio;
00149   const double maxsigma7x7   = 3.0 * sqrtlogratio;
00150   const double maxsigma9x9   = 4.0 * sqrtlogratio;
00151   const double maxsigma11x11 = 5.0 * sqrtlogratio;
00152   const double maxsigma13x13 = 6.0 * sqrtlogratio;
00153   const double maxsigmaperpass = maxsigma13x13;
00154
00155   // compute how many passes we would need with the largest filter
00156   int MultiPass = (int)rint(smoothsigma * smoothsigma /
00157                             (maxsigmaperpass*maxsigmaperpass));
00158   if (MultiPass>1) {
00159     // we need multiple passes
00160     smoothsigma /= sqrtf(float(MultiPass));
00161     BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass="<<MultiPass);
00162   } else {
00163     BIASDOUT(D_GAUSS_FAST_GREY,"Single pass is sufficient.");
00164   }
00165   _GaussIO->SetSigma(smoothsigma);
00166   _GaussIO->SetRatio(*_GaussRatio);
00167   _GaussOO->SetSigma(smoothsigma);
00168   _GaussOO->SetRatio(*_GaussRatio);
00169   if (*_GaussSigma<maxsigma3x3) {
00170     BIASDOUT(D_GAUSS_FAST_GREY,"Run 3x3");
00171     _GaussIO->Filter3x3Grey(src, dst);
00172   } else if (*_GaussSigma<maxsigma5x5) {
00173     BIASDOUT(D_GAUSS_FAST_GREY,"Run 5x5");
00174     _GaussIO->Filter5x5Grey(src, dst);
00175   } else if (*_GaussSigma<maxsigma7x7) {
00176     BIASDOUT(D_GAUSS_FAST_GREY,"Run 7x7");
00177     _GaussIO->Filter7x7Grey(src,dst);
00178   } else if (*_GaussSigma<maxsigma9x9){
00179     BIASDOUT(D_GAUSS_FAST_GREY,"Run 9x9");
00180     _GaussIO->Filter9x9Grey(src, dst);
00181   } else if (*_GaussSigma<maxsigma11x11){
00182     BIASDOUT(D_GAUSS_FAST_GREY,"Run 11x11");
00183     _GaussIO->Filter11x11Grey(src, dst);
00184   } else {
00185     BIASDOUT(D_GAUSS_FAST_GREY,"Run 13x13");
00186     _GaussIO->Filter13x13Grey(src, dst);
00187   }
00188     while (MultiPass-->1) {
00189       if (ResetROI) dst.UnsetROI();
00190     if (*_GaussSigma<maxsigma3x3) {
00191       BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 3x3");
00192       _GaussOO->Filter3x3Grey(dst, dst);
00193     } else if (*_GaussSigma<maxsigma5x5) {
00194       BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 5x5");
00195       _GaussOO->Filter5x5Grey(dst, dst);
00196     } else if (*_GaussSigma<maxsigma7x7) {
00197       BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 7x7");
00198       _GaussOO->Filter7x7Grey(dst, dst);
00199     } else if (*_GaussSigma<maxsigma9x9) {
00200       BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 9x9");
00201       _GaussOO->Filter9x9Grey(dst, dst);
00202     } else if (*_GaussSigma<maxsigma11x11){
00203         BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 11x11");
00204       _GaussOO->Filter11x11Grey(dst, dst);
00205     } else {
00206         BIASDOUT(D_GAUSS_FAST_GREY,"MultiPass: Run 13x13");
00207       _GaussOO->Filter13x13Grey(dst, dst);
00208     }
00209     }
00210   if (ResetROI) dst.UnsetROI();
00211   return 0;
00212 }
00213
00214 template <class InputStorageType, class OutputStorageType>
00215 int Gauss<InputStorageType, OutputStorageType>::
00216 Filter3x3GreyThreshold(const Image<InputStorageType>& src,
00217                        Image<OutputStorageType>& dst,
00218                        float threshold) {
00219   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter3x3\n");
00220   SetHalfWinSize(1, false);
00221   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00222     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00223
00224   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00225   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00226   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00227   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00228
00229 #ifdef BIAS_DEBUG
00230   if (src.GetChannelCount()!=1) {
00231     BIASERR("image with multiple channels. stopping.");
00232     BIASABORT;
00233   }
00234 #endif
00235   if(!dst.SamePixelAndChannelCount(src)) {
00236     if (!dst.IsEmpty()) dst.Release();
00237     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00238   }
00239   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00240     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00241     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00242                    ImageBase::ST_float, src.IsInterleaved());
00243   }
00244
00245   // horizontal convolution ignoring wrap-arounds
00246   InputStorageType* pS  = src.GetImageData();
00247   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00248   // copy first byte
00249   *pD++ = CONV_FLOAT(*pS);
00250   const int width = src.GetWidth(), height = src.GetHeight();
00251   const InputStorageType* pEndH = src.GetImageData() + width*height-1;
00252   while (++pS<pEndH) {
00253     if(pS[0] <= threshold ||
00254        pS[-1] <= threshold ||
00255        pS[1] <= threshold)
00256       *pD++ = CONV_FLOAT(pS[0]);
00257     else
00258       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1]));
00259   }
00260   // copy last byte
00261   *pD   = CONV_FLOAT(*pS);
00262
00263   // vertical convolution
00264   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-1);
00265   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00266   OutputStorageType* pO = dst.GetImageData();
00267   const CONV_FLOAT* pEndFirst2 =  _tmpFloat.GetImageData() + width;
00268   const CONV_FLOAT* pEndLast2 =  _tmpFloat.GetImageData() + width*height;
00269   // copy first two lines
00270   while (pI<pEndFirst2) *pO++ = OutputStorageType(*pI++);
00271   // convolve main
00272   pI--;
00273   while (++pI<pEndV) {
00274     if(pI[0] <= threshold ||
00275        pI[width] <= threshold ||
00276        pI[-width] <= threshold) {
00277       *pO++ = OutputStorageType(pI[0]);
00278     } else
00279       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width]));
00280   }
00281   // copy last line
00282   while (pI<pEndLast2) *pO++ = OutputStorageType(*pI++);
00283
00284   // update roi
00285   unsigned minx, miny, maxx, maxy;
00286   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00287   dst.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00288
00289   return 0;
00290 }
00291
00292
00293 template <class InputStorageType, class OutputStorageType>
00294 int Gauss<InputStorageType, OutputStorageType>::
00295 Filter3x3Grey(const Image<InputStorageType>& src,
00296               Image<OutputStorageType>& dst) {
00297   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter3x3\n");
00298   SetHalfWinSize(1, false);
00299   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00300     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00301
00302   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00303   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00304   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00305   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00306
00307 #ifdef BIAS_DEBUG
00308   if (src.GetChannelCount()!=1) {
00309     BIASERR("image with multiple channels. stopping.");
00310     BIASABORT;
00311   }
00312 #endif
00313   if(!dst.SamePixelAndChannelCount(src)) {
00314     if (!dst.IsEmpty()) dst.Release();
00315     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00316   }
00317   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00318     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00319     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00320                    ImageBase::ST_float, src.IsInterleaved());
00321   }
00322
00323   // horizontal convolution ignoring wrap-arounds
00324   InputStorageType* pS  = src.GetImageData();
00325   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00326   // copy first byte
00327   *pD++ = CONV_FLOAT(*pS);
00328   const int width = src.GetWidth(), height = src.GetHeight();
00329   const InputStorageType* pEndH = src.GetImageData() + width*height-1;
00330   while (++pS<pEndH) {
00331     *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1]));
00332   }
00333   // copy last byte
00334   *pD   = CONV_FLOAT(*pS);
00335
00336   // vertical convolution
00337   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-1);
00338   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00339   OutputStorageType* pO = dst.GetImageData();
00340   const CONV_FLOAT* pEndFirst2 =  _tmpFloat.GetImageData() + width;
00341   const CONV_FLOAT* pEndLast2 =  _tmpFloat.GetImageData() + width*height;
00342   // copy first two lines
00343   while (pI<pEndFirst2) *pO++ = OutputStorageType(*pI++);
00344   // convolve main
00345   pI--;
00346   while (++pI<pEndV) {
00347     *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width]));
00348   }
00349   // copy last line
00350   while (pI<pEndLast2) *pO++ = OutputStorageType(*pI++);
00351
00352   // update roi
00353   unsigned minx, miny, maxx, maxy;
00354   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00355   dst.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00356
00357   return 0;
00358 }
00359
00360 template <class InputStorageType, class OutputStorageType>
00361 int Gauss<InputStorageType, OutputStorageType>::
00362 Filter5x5GreyThreshold(const Image<InputStorageType>& src,
00363                        Image<OutputStorageType>& dst,
00364                        float threshold) {
00365   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter5x5\n");
00366   SetHalfWinSize(2, false);
00367   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00368     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00369
00370   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00371   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00372   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00373   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00374   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00375   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00376
00377
00378 #ifdef BIAS_DEBUG
00379   if (src.GetChannelCount()!=1) {
00380     BIASERR("image with multiple channels. stopping.");
00381     BIASABORT;
00382   }
00383 #endif
00384   if(!dst.SamePixelAndChannelCount(src)) {
00385     if (!dst.IsEmpty()) dst.Release();
00386     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00387   }
00388   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00389     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00390     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00391                    ImageBase::ST_float, src.IsInterleaved());
00392   }
00393
00394   // horizontal convolution ignoring wrap-arounds
00395   InputStorageType* pS  = src.GetImageData();
00396   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00397   // copy first two bytes
00398   *pD++ = CONV_FLOAT(*pS++);
00399   *pD++ = CONV_FLOAT(*pS);
00400   const int width = src.GetWidth(), height = src.GetHeight();
00401   const int width2 = 2*width;
00402   const InputStorageType* pEndH = src.GetImageData() + width*height-2;
00403   while (++pS<pEndH) {
00404     if(pS[0] <= threshold ||
00405        pS[-1] <= threshold ||
00406        pS[1] <= threshold ||
00407        pS[-2] <= threshold ||
00408        pS[2] <= threshold )
00409       *pD++ = CONV_FLOAT(pS[0]);
00410     else
00411       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])+h2*(pS[-2]+pS[2]));
00412   }
00413   // copy last two bytes
00414   *pD++ = CONV_FLOAT(*pS++);
00415   *pD   = CONV_FLOAT(*pS);
00416
00417   // vertical convolution
00418   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-2);
00419   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00420   OutputStorageType* pO = dst.GetImageData();
00421   const CONV_FLOAT* pEndFirst2 =  _tmpFloat.GetImageData() + 2*width;
00422   const CONV_FLOAT* pEndLast2 =  _tmpFloat.GetImageData() + width*height;
00423   // copy first two lines
00424   while (pI<pEndFirst2) *pO++ = OutputStorageType(*pI++);
00425   // convolve main
00426   pI--;
00427   while (++pI<pEndV) {
00428     if(pI[0] <= threshold ||
00429        pI[width] <= threshold ||
00430        pI[-width] <= threshold ||
00431        pI[width2] <= threshold ||
00432        pI[-width2] <= threshold )
00433       *pO++ = OutputStorageType(pI[0]);
00434     else
00435       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00436                                 + v2*(pI[-width2]+pI[width2]));
00437
00438   }
00439   // copy last two lines
00440   while (pI<pEndLast2) *pO++ = OutputStorageType(*pI++);
00441
00442   // update roi
00443   unsigned minx, miny, maxx, maxy;
00444   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00445   dst.GetROI()->SetCorners(minx+2, miny+2, maxx-2, maxy-2);
00446
00447   return 0;
00448 }
00449
00450 template <class InputStorageType, class OutputStorageType>
00451 int Gauss<InputStorageType, OutputStorageType>::
00452 Filter5x5Grey(const Image<InputStorageType>& src,
00453               Image<OutputStorageType>& dst) {
00454   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter5x5\n");
00455   SetHalfWinSize(2, false);
00456   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00457     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00458
00459   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00460   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00461   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00462   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00463   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00464   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00465
00466
00467 #ifdef BIAS_DEBUG
00468   if (src.GetChannelCount()!=1) {
00469     BIASERR("image with multiple channels. stopping.");
00470     BIASABORT;
00471   }
00472 #endif
00473   if(!dst.SamePixelAndChannelCount(src)) {
00474     if (!dst.IsEmpty()) dst.Release();
00475     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00476   }
00477   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00478     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00479     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00480                    ImageBase::ST_float, src.IsInterleaved());
00481   }
00482
00483   // horizontal convolution ignoring wrap-arounds
00484   InputStorageType* pS  = src.GetImageData();
00485   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00486   // copy first two bytes
00487   *pD++ = CONV_FLOAT(*pS++);
00488   *pD++ = CONV_FLOAT(*pS);
00489   const int width = src.GetWidth(), height = src.GetHeight();
00490   const int width2 = 2*width;
00491   const InputStorageType* pEndH = src.GetImageData() + width*height-2;
00492   while (++pS<pEndH) {
00493     *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])+h2*(pS[-2]+pS[2]));
00494   }
00495   // copy last two bytes
00496   *pD++ = CONV_FLOAT(*pS++);
00497   *pD   = CONV_FLOAT(*pS);
00498
00499   // vertical convolution
00500   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-2);
00501   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00502   OutputStorageType* pO = dst.GetImageData();
00503   const CONV_FLOAT* pEndFirst2 =  _tmpFloat.GetImageData() + 2*width;
00504   const CONV_FLOAT* pEndLast2 =  _tmpFloat.GetImageData() + width*height;
00505   // copy first two lines
00506   while (pI<pEndFirst2) *pO++ = OutputStorageType(*pI++);
00507   // convolve main
00508   pI--;
00509   while (++pI<pEndV) {
00510     *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00511                               + v2*(pI[-width2]+pI[width2]));
00512
00513   }
00514   // copy last two lines
00515   while (pI<pEndLast2) *pO++ = OutputStorageType(*pI++);
00516
00517   // update roi
00518   unsigned minx, miny, maxx, maxy;
00519   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00520   dst.GetROI()->SetCorners(minx+2, miny+2, maxx-2, maxy-2);
00521
00522   return 0;
00523 }
00524
00525 template <class InputStorageType, class OutputStorageType>
00526 int Gauss<InputStorageType, OutputStorageType>::
00527 Filter7x7Grey(const Image<InputStorageType>& src,
00528           Image<OutputStorageType>& dst)
00529 {
00530   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter7x7\n");
00531   SetHalfWinSize(3, false);
00532   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00533     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00534
00535   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[3]);
00536   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00537   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00538   const FM_FLOAT h3 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00539   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[3]);
00540   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00541   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00542   const FM_FLOAT v3 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00543
00544 #ifdef BIAS_DEBUG
00545   if (src.GetChannelCount()!=1) {
00546     BIASERR("image with multiple channels. stopping.");
00547     BIASABORT;
00548   }
00549 #endif
00550   if(!dst.SamePixelAndChannelCount(src)) {
00551     if (!dst.IsEmpty()) dst.Release();
00552     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00553   }
00554   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00555     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00556     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00557                    ImageBase::ST_float, src.IsInterleaved());
00558   }
00559
00560   // horizontal convolution ignoring wrap-arounds
00561   InputStorageType* pS  = src.GetImageData();
00562   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00563   // copy first three bytes
00564   *pD++ = CONV_FLOAT(*pS++);
00565   *pD++ = CONV_FLOAT(*pS++);
00566   *pD++ = CONV_FLOAT(*pS);
00567   const int width = src.GetWidth(), height = src.GetHeight();
00568   const int width2 = 2*width, width3=3*width;
00569   const InputStorageType* pEndH = src.GetImageData() + width*height-3;
00570   while (++pS<pEndH) {
00571       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])
00572              +h2*(pS[-2]+pS[2])+h3*(pS[-3]+pS[3]));
00573   }
00574   // copy last three bytes
00575   *pD++ = CONV_FLOAT(*pS++);
00576   *pD++ = CONV_FLOAT(*pS++);
00577   *pD   = CONV_FLOAT(*pS);
00578
00579   // vertical convolution
00580   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-3);
00581   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00582   OutputStorageType* pO = dst.GetImageData();
00583   const CONV_FLOAT* pEndFirst3 =  _tmpFloat.GetImageData() + 3*width;
00584   const CONV_FLOAT* pEndLast3 =  _tmpFloat.GetImageData() + width*height;
00585   // copy first three lines
00586   while (pI<pEndFirst3) *pO++ = OutputStorageType(*pI++);
00587   // convolve main
00588   pI--;
00589   while (++pI<pEndV) {
00590       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00591                 + v2*(pI[-width2]+pI[width2])
00592                 + v3*(pI[-width3]+pI[width3]));
00593   }
00594   // copy last three lines
00595   while (pI<pEndLast3) *pO++ = OutputStorageType(*pI++);
00596
00597   // update roi
00598   unsigned minx, miny, maxx, maxy;
00599   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00600   dst.GetROI()->SetCorners(minx+3, miny+3, maxx-3, maxy-3);
00601
00602   return 0;
00603 }
00604
00605 template <class InputStorageType, class OutputStorageType>
00606 int Gauss<InputStorageType, OutputStorageType>::
00607 Filter9x9Grey(const Image<InputStorageType>& src,
00608           Image<OutputStorageType>& dst)
00609 {
00610   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter9x9\n");
00611   SetHalfWinSize(4, false);
00612   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00613     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00614   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[4]);
00615   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[3]);
00616   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00617   const FM_FLOAT h3 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00618   const FM_FLOAT h4 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00619   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[4]);
00620   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[3]);
00621   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00622   const FM_FLOAT v3 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00623   const FM_FLOAT v4 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00624
00625 #ifdef BIAS_DEBUG
00626   if (src.GetChannelCount()!=1) {
00627     BIASERR("image with multiple channels. stopping.");
00628     BIASABORT;
00629   }
00630 #endif
00631   if(!dst.SamePixelAndChannelCount(src)) {
00632     if (!dst.IsEmpty()) dst.Release();
00633     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00634   }
00635   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00636     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00637     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00638                    ImageBase::ST_float, src.IsInterleaved());
00639   }
00640
00641
00642   // horizontal convolution ignoring wrap-arounds
00643   InputStorageType* pS  = src.GetImageData();
00644   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00645   // copy first four bytes
00646   *pD++ = CONV_FLOAT(*pS++);
00647   *pD++ = CONV_FLOAT(*pS++);
00648   *pD++ = CONV_FLOAT(*pS++);
00649   *pD++ = CONV_FLOAT(*pS);
00650
00651   const int width = src.GetWidth(), height = src.GetHeight();
00652   const int width2 = 2*width, width3=3*width, width4=4*width;
00653   const InputStorageType* pEndH = src.GetImageData() + width*height-4;
00654   while (++pS<pEndH) {
00655       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])+h2*(pS[-2]+pS[2])
00656              +h3*(pS[-3]+pS[3])+h4*(pS[-4]+pS[4]));
00657   }
00658   // copy last four bytes
00659   *pD++ = CONV_FLOAT(*pS++);
00660   *pD++ = CONV_FLOAT(*pS++);
00661   *pD++ = CONV_FLOAT(*pS++);
00662   *pD   = CONV_FLOAT(*pS);
00663
00664   // vertical convolution
00665   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-4);
00666   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00667   OutputStorageType* pO = dst.GetImageData();
00668   const CONV_FLOAT* pEndFirst4 =  _tmpFloat.GetImageData() + 4*width;
00669   const CONV_FLOAT* pEndLast4 =  _tmpFloat.GetImageData() + width*height;
00670   // copy first four lines
00671   while (pI<pEndFirst4) *pO++ = OutputStorageType(*pI++);
00672   // convolve main
00673   pI--;
00674   while (++pI<pEndV) {
00675       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00676                 + v2*(pI[-width2]+pI[width2])
00677                 + v3*(pI[-width3]+pI[width3])
00678                 + v4*(pI[-width4]+pI[width4]));
00679   }
00680   // copy last four lines
00681   while (pI<pEndLast4) *pO++ = OutputStorageType(*pI++);
00682
00683   // update roi
00684   unsigned minx, miny, maxx, maxy;
00685   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00686   dst.GetROI()->SetCorners(minx+4, miny+4, maxx-4, maxy-4);
00687   return 0;
00688 }
00689
00690 template <class InputStorageType, class OutputStorageType>
00691 int Gauss<InputStorageType, OutputStorageType>::
00692 Filter11x11Grey(const Image<InputStorageType>& src,
00693           Image<OutputStorageType>& dst)
00694 {
00695   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter11x11\n");
00696   SetHalfWinSize(5, false);
00697   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00698     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00699   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[5]);
00700   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[4]);
00701   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[3]);
00702   const FM_FLOAT h3 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00703   const FM_FLOAT h4 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00704   const FM_FLOAT h5 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00705
00706   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[5]);
00707   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[4]);
00708   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[3]);
00709   const FM_FLOAT v3 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00710   const FM_FLOAT v4 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00711   const FM_FLOAT v5 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00712
00713 #ifdef BIAS_DEBUG
00714   if (src.GetChannelCount()!=1) {
00715     BIASERR("image with multiple channels. stopping.");
00716     BIASABORT;
00717   }
00718 #endif
00719   if(!dst.SamePixelAndChannelCount(src)) {
00720     if (!dst.IsEmpty()) dst.Release();
00721     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00722   }
00723   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00724     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00725     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00726                    ImageBase::ST_float, src.IsInterleaved());
00727   }
00728
00729   // horizontal convolution ignoring wrap-arounds
00730   InputStorageType* pS  = src.GetImageData();
00731   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00732   // copy first five bytes
00733   *pD++ = CONV_FLOAT(*pS++);
00734   *pD++ = CONV_FLOAT(*pS++);
00735   *pD++ = CONV_FLOAT(*pS++);
00736   *pD++ = CONV_FLOAT(*pS++);
00737   *pD++ = CONV_FLOAT(*pS);
00738
00739   const int width = src.GetWidth(), height = src.GetHeight();
00740   const int width2 = 2*width, width3=3*width, width4=4*width, width5=5*width;
00741   const InputStorageType* pEndH = src.GetImageData() + width*height-5;
00742   while (++pS<pEndH) {
00743       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])+h2*(pS[-2]+pS[2])
00744              +h3*(pS[-3]+pS[3])+h4*(pS[-4]+pS[4])+h5*(pS[-5]+pS[5]));
00745   }
00746   // copy last five bytes
00747   *pD++ = CONV_FLOAT(*pS++);
00748   *pD++ = CONV_FLOAT(*pS++);
00749   *pD++ = CONV_FLOAT(*pS++);
00750   *pD++ = CONV_FLOAT(*pS++);
00751   *pD   = CONV_FLOAT(*pS);
00752
00753   // vertical convolution
00754   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-5);
00755   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00756   OutputStorageType* pO = dst.GetImageData();
00757   const CONV_FLOAT* pEndFirst5 =  _tmpFloat.GetImageData() + 5*width;
00758   const CONV_FLOAT* pEndLast5 =  _tmpFloat.GetImageData() + width*height;
00759   // copy first four lines
00760   while (pI<pEndFirst5) *pO++ = OutputStorageType(*pI++);
00761   // convolve main
00762   pI--;
00763   while (++pI<pEndV) {
00764       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00765                 + v2*(pI[-width2]+pI[width2])
00766                 + v3*(pI[-width3]+pI[width3])
00767                 + v4*(pI[-width4]+pI[width4])
00768                 + v5*(pI[-width5]+pI[width5]));
00769   }
00770   // copy last four lines
00771   while (pI<pEndLast5) *pO++ = OutputStorageType(*pI++);
00772
00773   // update roi
00774   unsigned minx, miny, maxx, maxy;
00775   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00776   dst.GetROI()->SetCorners(minx+5, miny+5, maxx-5, maxy-5);
00777   return 0;
00778 }
00779
00780 template <class InputStorageType, class OutputStorageType>
00781 int Gauss<InputStorageType, OutputStorageType>::
00782 Filter13x13Grey(const Image<InputStorageType>& src,
00783         Image<OutputStorageType>& dst)
00784 {
00785   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Gauss::Filter13x13\n");
00786   SetHalfWinSize(6, false);
00787   if ((*_GaussSigma != _LastSigma)||(*_GaussRatio != _LastRatio))
00788     _CalculateKernels(*_GaussSigma, *_GaussRatio);
00789   const FM_FLOAT h0 = (const FM_FLOAT)((*_fm.GetSepfh())[6]);
00790   const FM_FLOAT h1 = (const FM_FLOAT)((*_fm.GetSepfh())[5]);
00791   const FM_FLOAT h2 = (const FM_FLOAT)((*_fm.GetSepfh())[4]);
00792   const FM_FLOAT h3 = (const FM_FLOAT)((*_fm.GetSepfh())[3]);
00793   const FM_FLOAT h4 = (const FM_FLOAT)((*_fm.GetSepfh())[2]);
00794   const FM_FLOAT h5 = (const FM_FLOAT)((*_fm.GetSepfh())[1]);
00795   const FM_FLOAT h6 = (const FM_FLOAT)((*_fm.GetSepfh())[0]);
00796
00797   const FM_FLOAT v0 = (const FM_FLOAT)((*_fm.GetSepfv())[6]);
00798   const FM_FLOAT v1 = (const FM_FLOAT)((*_fm.GetSepfv())[5]);
00799   const FM_FLOAT v2 = (const FM_FLOAT)((*_fm.GetSepfv())[4]);
00800   const FM_FLOAT v3 = (const FM_FLOAT)((*_fm.GetSepfv())[3]);
00801   const FM_FLOAT v4 = (const FM_FLOAT)((*_fm.GetSepfv())[2]);
00802   const FM_FLOAT v5 = (const FM_FLOAT)((*_fm.GetSepfv())[1]);
00803   const FM_FLOAT v6 = (const FM_FLOAT)((*_fm.GetSepfv())[0]);
00804
00805 #ifdef BIAS_DEBUG
00806   if (src.GetChannelCount()!=1) {
00807     BIASERR("image with multiple channels. stopping.");
00808     BIASABORT;
00809   }
00810 #endif
00811   if(!dst.SamePixelAndChannelCount(src)) {
00812     if (!dst.IsEmpty()) dst.Release();
00813     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00814   }
00815   if(!_tmpFloat.SamePixelAndChannelCount(src)) {
00816     if (!_tmpFloat.IsEmpty())  _tmpFloat.Release();
00817     _tmpFloat.Init(src.GetWidth(),src.GetHeight(),1,
00818                    ImageBase::ST_float, src.IsInterleaved());
00819   }
00820
00821   // horizontal convolution ignoring wrap-arounds
00822   InputStorageType* pS  = src.GetImageData();
00823   CONV_FLOAT* pD = _tmpFloat.GetImageData();
00824   // copy first five bytes
00825   *pD++ = CONV_FLOAT(*pS++);
00826   *pD++ = CONV_FLOAT(*pS++);
00827   *pD++ = CONV_FLOAT(*pS++);
00828   *pD++ = CONV_FLOAT(*pS++);
00829   *pD++ = CONV_FLOAT(*pS++);
00830   *pD++ = CONV_FLOAT(*pS);
00831
00832   const int width = src.GetWidth(), height = src.GetHeight();
00833   const int width2 = 2*width, width3=3*width, width4=4*width,
00834     width5=5*width, width6=6*width;
00835   const InputStorageType* pEndH = src.GetImageData() + width*height-6;
00836   while (++pS<pEndH) {
00837       *pD++ = CONV_FLOAT(h0*pS[0]+h1*(pS[-1]+pS[1])+h2*(pS[-2]+pS[2])
00838              +h3*(pS[-3]+pS[3])+h4*(pS[-4]+pS[4])
00839              +h5*(pS[-5]+pS[5])+h6*(pS[-6]+pS[6]));
00840   }
00841   // copy last five bytes
00842   *pD++ = CONV_FLOAT(*pS++);
00843   *pD++ = CONV_FLOAT(*pS++);
00844   *pD++ = CONV_FLOAT(*pS++);
00845   *pD++ = CONV_FLOAT(*pS++);
00846   *pD++ = CONV_FLOAT(*pS++);
00847   *pD   = CONV_FLOAT(*pS);
00848
00849   // vertical convolution
00850   const CONV_FLOAT* pEndV = _tmpFloat.GetImageData() + width*(height-6);
00851   CONV_FLOAT* pI  = _tmpFloat.GetImageData();
00852   OutputStorageType* pO = dst.GetImageData();
00853   const CONV_FLOAT* pEndFirst6 =  _tmpFloat.GetImageData() + 6*width;
00854   const CONV_FLOAT* pEndLast6 =  _tmpFloat.GetImageData() + width*height;
00855   // copy first four lines
00856   while (pI<pEndFirst6) *pO++ = OutputStorageType(*pI++);
00857   // convolve main
00858   pI--;
00859   while (++pI<pEndV) {
00860       *pO++ = OutputStorageType(v0*pI[0] + v1*(pI[-width]+pI[width])
00861                 + v2*(pI[-width2]+pI[width2])
00862                 + v3*(pI[-width3]+pI[width3])
00863                 + v4*(pI[-width4]+pI[width4])
00864                 + v5*(pI[-width5]+pI[width5])
00865                 + v6*(pI[-width6]+pI[width6]));
00866   }
00867   // copy last four lines
00868   while (pI<pEndLast6) *pO++ = OutputStorageType(*pI++);
00869
00870   // update roi
00871   unsigned minx, miny, maxx, maxy;
00872   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00873   dst.GetROI()->SetCorners(minx+6, miny+6, maxx-6, maxy-6);
00874   return 0;
00875 }
00876
00877 ////////////////////////////////////////////////////////////////////////////
00878
00879 template <class InputStorageType, class OutputStorageType>
00880 void Gauss<InputStorageType, OutputStorageType>::
00881 _CalculateKernels(double Sigma, double Ratio)
00882 {
00883   const int hws = (int)(floor(sqrt(-2.0*Sigma*Sigma*log(Ratio))));
00884   const int size = (hws<<1)+1;
00885
00886   Vector<FM_FLOAT> H(size), V(size);
00887   BIASCDOUT(D_CONV_KERNEL, "Sigma = "<<Sigma<<"\tRatio = "<<Ratio<<endl);
00888   BIASCDOUT(D_CONV_KERNEL, "size = "<<size<<"\thws = "<<hws<<endl);
00889
00890   double sum=0.0;
00891     int i, ip, im;
00892   if (Sigma==0.0){
00893     H[0]=1.0; V[0]=1.0;
00894   } else {
00895     double fac=1.0/(2.0*Sigma*Sigma);
00896     register double g;
00897     // calculate the filter coefficients as gauss function
00898     for (i=0; i<=hws; i++){
00899       ip = hws+i;
00900       im = hws-i;
00901       g  = expf((float)(-(double)(i*i)*fac));
00902       V[ip] = V[im] = H[im] = H[ip] = (FM_FLOAT)g;
00903       //BIASCDOUT(D_CONV_KERNEL, i<<"v:"<<this->_VVec[im]<<"  "<<endl);
00904       sum += g*2.0;
00905     }
00906     sum -= V[hws]; // added twice
00907     BIASCDOUT(D_CONV_KERNEL, "sum = "<<sum<<endl);
00908
00909     // normalize filter, so that the sum is 1.0
00910     sum = 1.0/sum;
00911     BIASCDOUT(D_CONV_KERNEL, "sum = "<<sum<<endl);
00912     for (i=0; i<=hws; i++){
00913       ip=hws+i;
00914       im=hws-i;
00915       H[ip] = H[im] = V[ip] = V[im] = V[im] * (FM_FLOAT)sum;
00916       BIASCDOUT(D_CONV_KERNEL, H[im]<<"  "<<endl);
00917     }
00918   }
00919   _fm.Init(H,V);
00920   // compute the int approximation
00921   int thebits = _fm.ComputeIntPrecisionBits(sizeof(InputStorageType)*8,
00922                                             sizeof(CONV_INT)*8-1);
00923   _fm.CreateIntFilter(thebits,thebits,thebits);
00924
00925   _LastSigma = Sigma;
00926   _LastRatio = Ratio;
00927
00928 #ifdef BIAS_DEBUG
00929   if (this->DebugLevelIsSet(D_CONV_KERNEL)){
00930     sum = 0.0;
00931     for (i=-hws; i<=hws; i++){
00932       sum += H[i+hws];
00933       BIASCDOUT(D_CONV_KERNEL, H[i+hws]<<"  ");
00934     }
00935     BIASCDOUT(D_CONV_KERNEL, "  sum = "<<sum<<endl);
00936   }
00937 #endif
00938
00939   //#define COMPARE
00940 #ifdef COMPARE
00941   fprintf(stdout, "gauss: \n");
00942   for (i=-hws; i<=hws; i++){
00943     fprintf(stdout, "%f ",HVec[i+hws]);
00944   }
00945   fprintf(stdout, "\n");
00946 #endif
00947 }
00948
00949
00950
00951
00952 template <class StorageType, class KernelType>
00953 void Gauss<StorageType, KernelType>::
00954 _AddParam(Param& para, const int grp, const std::string& postfix)
00955 {
00956   if (para.CheckParam("Sigma"+postfix)){
00957     _GaussSigma=para.GetParamDouble("Sigma"+postfix);
00958   } else {
00959     _GaussSigma=para.AddParamDouble("Sigma"+postfix,
00960                                     "standard deviation of gauss curve",
00961                                     0.7, 0.0, 10.0, 0, grp);
00962   }
00963
00964   if (para.CheckParam("Ratio"+postfix)){
00965     _GaussRatio=para.GetParamDouble("Ratio"+postfix);
00966   } else {
00967     _GaussRatio=para.AddParamDouble("Ratio"+postfix,
00968                                     "gauss is truncated, when factor between "
00969                                     "biggest and smalles entry falls below "
00970                                     "GaussRatio",
00971                                     0.01, 0.0, 1.0, 0, grp);
00972   }
00973   para.SetEnhancedFlag("Ratio"+postfix, true);
00974 }
00975
00976 //////////////////////////////////////////////////////////////////////////
00977 //                 instantiation
00978 //////////////////////////////////////////////////////////////////////////
00979 #define FILTER_INSTANTIATION_CLASS Gauss
00980 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Gauss.hh Source File

Filter

Gauss.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Gauss_hh__
00027 #define __Gauss_hh__
00028
00029 #include <Utils/Param.hh>
00030
00031 #include "Convolution.hh"
00032
00033 #define D_GAUSS_FAST_GREY 0x01
00034
00035 namespace BIAS {
00036   /** @class Gauss
00037       @ingroup g_filter
00038       @brief smoothing with gaussian kernel
00039
00040       Parameters are sigma and ratio, optionally you can set half window size,
00041       which is computed from the other parameters otherwise.
00042       The gaussian kernel is separabel, using vector convolution
00043       The Gaussian function is truncated, when the ratio between the maximum
00044       kernel element and the actual kernel element falls below ratio.
00045
00046       If you have a one-channel (typically grey) image, the fast FilterGrey
00047       method comes into play, which calls the appropriate fast FilterNxNGrey
00048       function according to your sigma and cutoffratio. The fast functions work
00049       on the whole image and dont care about the roi in the src image.
00050
00051       @author woelk 09/2004, koeser 06/2005 */
00052   template <class InputStorageType, class OutputStorageType>
00053   class BIASFilter_EXPORT Gauss
00054     : public Convolution<InputStorageType, OutputStorageType>
00055   {
00056   public:
00057     Gauss();
00058
00059     Gauss(Param& para, const std::string& postfix="");
00060
00061     Gauss(Param& para, const int grp, const std::string& postfix);
00062
00063     ~Gauss();
00064
00065     /** @brief sets gauss kernel if params changed and calls convolution or
00066         fast grey implementation if possible */
00067     virtual int Filter(const Image<InputStorageType>& src,
00068                        Image<OutputStorageType>& dst);
00069
00070     /** @brief sets gauss kernel if params changed and calls convolution */
00071     virtual int FilterFloat(const Image<InputStorageType>& src,
00072                             Image<OutputStorageType>& dst);
00073
00074     /** @brief sets gauss kernel if params changed and calls convolution */
00075     virtual int FilterInt(const Image<InputStorageType>& src,
00076                           Image<OutputStorageType>& dst);
00077
00078     /** @brief wrapper around FilterNxNGrey, which decides on sigma and
00079         cutoffratio which filter to apply and how often
00080         @param ResetROI reset the roi during filtering
00081         @author koeser 06/2005 */
00082     virtual int FilterGrey(const Image<InputStorageType>& src,
00083                            Image<OutputStorageType>& dst,
00084                            bool ResetROI = false);
00085
00086     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00087         roi is updated but ignored
00088         @author koeser 06/2005 */
00089     virtual int Filter3x3Grey(const Image<InputStorageType>& src,
00090                               Image<OutputStorageType>& dst);
00091
00092     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00093         roi is updated but ignored
00094         @author koeser 06/2005 */
00095     virtual int Filter5x5Grey(const Image<InputStorageType>& src,
00096                               Image<OutputStorageType>& dst);
00097
00098     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00099         roi is updated but ignored
00100         Keep src value of test point if any value under filtermask is below
00101         threshold.
00102     */
00103     virtual int Filter3x3GreyThreshold(const Image<InputStorageType>& src,
00104                                        Image<OutputStorageType>& dst,
00105                                        float threshold = 0.0);
00106
00107     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00108         roi is updated but ignored.
00109         Keep src value of test point if any value under filtermask is below
00110         threshold.
00111     */
00112     virtual int Filter5x5GreyThreshold(const Image<InputStorageType>& src,
00113                               Image<OutputStorageType>& dst,
00114                               float threshold = 0.0);
00115
00116     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00117         roi is updated but ignored
00118         @author koeser 06/2005 */
00119     virtual int Filter7x7Grey(const Image<InputStorageType>& src,
00120                               Image<OutputStorageType>& dst);
00121
00122     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00123         roi is updated but ignored
00124         @author koeser 06/2005 */
00125     virtual int Filter9x9Grey(const Image<InputStorageType>& src,
00126                               Image<OutputStorageType>& dst);
00127
00128     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00129         roi is updated but ignored
00130         @author koeser 06/2005 */
00131     virtual int Filter11x11Grey(const Image<InputStorageType>& src,
00132                                 Image<OutputStorageType>& dst);
00133
00134     /** @brief fast, approximate, direct implementation, ignoring wrap-arounds,
00135         roi is updated but ignored
00136         @author koeser 06/2005 */
00137     virtual int Filter13x13Grey(const Image<InputStorageType>& src,
00138                                 Image<OutputStorageType>& dst);
00139
00140     /////////////////////////////////////////////////////////////////////////
00141
00142     inline void SetSigma(const double si) { *_GaussSigma=si; }
00143
00144     inline double GetSigma() const  { return *_GaussSigma; }
00145
00146     inline void SetRatio(const double ratio) { *_GaussRatio=ratio; }
00147
00148     inline double GetRatio() const { return *_GaussRatio; }
00149
00150     /** define the half win size of the kernel, if AdjustSigma is true
00151         sigma is computed according to the cut-off ratio, otherwise the ratio
00152         is adapted to the sigma */
00153     inline void SetHalfWinSize(const int hws, bool AdjustSigma=true)
00154     {
00155       if (AdjustSigma) {
00156         *_GaussSigma = sqrt((double)hws*(double)hws/(-2.0*log(*_GaussRatio)));
00157       } else {
00158         *_GaussRatio = 0.5*(exp(((double)hws*(double)hws)
00159                                 /(-2.0*(*_GaussSigma)*(*_GaussSigma)))+
00160                             exp(((double)(hws+1.0)*(double)(hws+1.0))
00161                                 /(-2.0*(*_GaussSigma)*(*_GaussSigma)))) ;
00162       }
00163     }
00164
00165
00166     // these are interfaces for class Tracker is Track is instantiated
00167     // with out param object
00168     double *GetSigmaPointer(){ return _GaussSigma;};
00169     double *GetRatioPointer(){ return _GaussRatio;};
00170
00171   protected:
00172
00173     /// the parameter
00174     /// sigma of gaussian kernel
00175     double *_GaussSigma;
00176     /// minimum ratio of 1D kernel center and border, ignore smaller entries
00177     double *_GaussRatio;
00178     // the parameter at the time of the last call of _CalculateKernels
00179     // (for caching)
00180     double _LastSigma, _LastRatio;
00181
00182     /// calculates the kernel
00183     void _CalculateKernels(double Sigma, double Ratio);
00184
00185
00186     void _AddParam(Param& para, const int grp, const std::string& postfix);
00187
00188     using Convolution<InputStorageType, OutputStorageType>::_fm;
00189     using Convolution<InputStorageType, OutputStorageType>::_tmpFloat;
00190     using Convolution<InputStorageType, OutputStorageType>::TBH_valid;
00191
00192     /// to allow for iterated gauss convolution saving the intermediate
00193     /// image we need a different instance, this is caused by template concept
00194     Gauss<OutputStorageType, OutputStorageType> *_GaussOO;
00195     Gauss<InputStorageType, OutputStorageType> *_GaussIO;
00196
00197   }; // class
00198
00199 } // namespace
00200
00201
00202
00203 #endif // __Gauss_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GaussHelmert.cpp Source File

MathAlgo

GaussHelmert.cpp

Go to the documentation of this file.
00001 #include "GaussHelmert.hh"
00002
00003 #include <Base/Math/Vector.hh>
00004 #include <Base/Math/Matrix.hh>
00005 #include <MathAlgo/SVD.hh>
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010
00011 BIAS::GaussHelmert::
00012 GaussHelmert()
00013   : Debug(), MaxNumIter_(40), Precision_(1e-8)
00014 {}
00015
00016 BIAS::GaussHelmert::
00017 ~GaussHelmert()
00018 {}
00019
00020 int BIAS::GaussHelmert::
00021 Solve(Vector<double>& observations, const Matrix<double>& obs_cov,
00022       Vector<double>& x, Matrix<double>& cov)
00023 {
00024   // the number of observations
00025   const int N = (int)observations.size();
00026
00027   double sigma_2_hat = 1.0;
00028   Vector<double> x_hat = x;
00029   Vector<double> l_hat = observations;
00030   Vector<double> v_hat(N);
00031   v_hat.SetZero();
00032   Matrix<double> Sigma_ll = obs_cov;
00033   SVD svd;
00034   Matrix<double> Sigma_ll_plus = svd.Invert(Sigma_ll);
00035   Matrix<double> A, B, H;
00036   A = GetA_(l_hat, x_hat);
00037   B = GetB_(l_hat, x_hat);
00038   H = GetH_(x_hat);
00039
00040   // number of constraints on observations and unknowns
00041   const int G = A.num_rows();
00042   // number of unknowns
00043   const int U = A.num_cols();
00044   // number of constraints on unknowns
00045   const int Hn = H.num_cols();
00046
00047   const int R = G + Hn - U;
00048
00049   Matrix<double> Weight, WeightInverse, ATWeightInverse, ATWeightInverseA;
00050   Matrix<double> HT, normal_matrix(Hn+U, Hn+U);
00051   Vector<double> w_g, w_h, ATWeightInverse_w_g, normal_vector(Hn+U), x_mu;
00052   Vector<double> delta_x_hat(U), mu(Hn), lambda;
00053
00054   int res = 0;
00055   int num_iter = 0;
00056   do {
00057
00058     A = GetA_(l_hat, x_hat);
00059     B = GetB_(l_hat, x_hat);
00060     H = GetH_(x_hat);
00061
00062     ComputeNormalSystem_(A, B, H, Sigma_ll, x_hat, l_hat, v_hat,
00063                          normal_matrix, normal_vector);
00064
00065     // solve the system and get x_hat and mu
00066     if ((res = svd.Solve(normal_matrix, normal_vector, x_mu))!=0){
00067       BIASERR("error solving normal equation "<<res);
00068       return -1;
00069     }
00070
00071     for (int r=0; r<U; r++){
00072       delta_x_hat[r] = x_mu[r];
00073     }
00074     for (int r=U; r<U+Hn; r++){
00075       mu[r-U] = x_mu[r];
00076     }
00077
00078     // compute lambda
00079     lambda = WeightInverse * ( A * delta_x_hat - w_g );
00080
00081     // compute v
00082     v_hat = -1.0 * Sigma_ll * B * lambda;
00083
00084     // update x_hat and l_hat
00085     x_hat += delta_x_hat;
00086     l_hat += v_hat;
00087
00088     sigma_2_hat = v_hat.ScalarProduct(Sigma_ll_plus * v_hat) / (double)R;
00089
00090     Sigma_ll += sigma_2_hat * Sigma_ll;
00091     Sigma_ll_plus = svd.Invert(Sigma_ll);
00092
00093     num_iter++;
00094
00095   } while (num_iter<MaxNumIter_ && sigma_2_hat>Precision_);
00096
00097   // compute the covariance matrix
00098   ComputeNormalSystem_(A, B, H, Sigma_ll, x_hat, l_hat, v_hat,
00099                        normal_matrix, normal_vector);
00100   Matrix<double> tmp_cov = svd.Invert(normal_matrix);
00101   for (int r=0; r<U; r++){
00102     for (int c=0; c<U; c++){
00103       cov[r][c] = tmp_cov[r][c] * sigma_2_hat;
00104     }
00105   }
00106   x = x_hat;
00107   observations = l_hat;
00108
00109   return 0;
00110 }
00111
00112
00113 void BIAS::GaussHelmert::
00114 ComputeNormalSystem_(const Matrix<double>& A, const Matrix<double>& B,
00115                      const Matrix<double>& H, const Matrix<double>& Sigma_ll,
00116                      const Vector<double>& x_hat, const Vector<double>& l_hat,
00117                      const Vector<double>& v_hat,
00118                      Matrix<double>& normal_matrix, Vector<double>& normal_vec)
00119 {
00120   Matrix<double> Weight, WeightInverse, ATWeightInverse, ATWeightInverseA, HT;
00121   Vector<double> w_g, w_h, ATWeightInverse_w_g;
00122   SVD svd;
00123
00124   // number of unknowns
00125   const int U = A.num_cols();
00126   // number of constraints on unknowns
00127   const int Hn = H.num_cols();
00128
00129   Weight = B.Transpose() * Sigma_ll * B;
00130   WeightInverse = svd.Invert(Weight);
00131
00132   ATWeightInverse = A.Transpose() * WeightInverse;
00133   ATWeightInverseA = ATWeightInverse * A;
00134   HT = H.Transpose();
00135
00136   w_g = -1.0 * g_(l_hat, x_hat) - B.Transpose() * v_hat;
00137   w_h = -1.0 * h_(x_hat);
00138   ATWeightInverse_w_g = ATWeightInverse * w_g;
00139
00140   normal_matrix.SetZero();
00141
00142   // fill the normal vector
00143   for (int r=0; r<U; r++){
00144     normal_vec[r] = ATWeightInverse_w_g[r];
00145   }
00146   for (int r=U; r<U+Hn; r++){
00147     normal_vec[r] = w_h[r-U];
00148   }
00149
00150   // fill the normal matrix
00151   for (int r=0; r<U; r++){
00152     for (int c=0; c<U; c++){
00153       normal_matrix[r][c] = ATWeightInverseA[r][c];
00154     }
00155   }
00156   for (int r=0; r<U; r++){ // H
00157     for (int c=U; c<U+Hn; c++){
00158       normal_matrix[r][c] = H[r][c-U];
00159     }
00160   }
00161   for (int r=U; r<U+Hn; r++){ // HT
00162     for (int c=0; c<U; c++){
00163       normal_matrix[r][c] = HT[r-U][c];
00164     }
00165   }
00166 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GaussHelmert.hh Source File

MathAlgo

GaussHelmert.hh

Go to the documentation of this file.
00001 #ifndef _GaussHelmert_hh_
00002 #define _GaussHelmert_hh_
00003
00004 #include <Base/Debug/Debug.hh>
00005
00006
00007 #include <Base/Math/Vector.hh>
00008 #include <Base/Math/Matrix.hh>
00009 //template <class T> class Vector;
00010 //template <class T> class Matrix;
00011
00012
00013 namespace BIAS {
00014
00015   //template <class T> class Vector;
00016   //template <class T> class Matrix;
00017
00018
00019   /** @class GaussHelmert
00020       @brief see Foerstner, 2004, "Uncertainty And Projective Geometry"
00021       ! untested !
00022       @author woelk 04/2006 */
00023   class GaussHelmert
00024     : public Debug
00025   {
00026   public:
00027
00028     virtual ~GaussHelmert();
00029
00030     int Solve(BIAS::Vector<double>& observations,
00031       const BIAS::Matrix<double>& obs_cov,
00032       BIAS::Vector<double>& x,
00033       BIAS::Matrix<double>& cov);
00034
00035
00036   protected:
00037     int MaxNumIter_;
00038     double Precision_;
00039
00040     /// protected constructor to prohibit instantiation of class
00041     GaussHelmert();
00042
00043     void ComputeNormalSystem_(const Matrix<double>& A, const Matrix<double>& B,
00044                               const Matrix<double>& H,
00045                               const Matrix<double>& Sigma_ll,
00046                               const Vector<double>& x_hat,
00047                               const Vector<double>& l_hat,
00048                               const Vector<double>& v_hat,
00049                               Matrix<double>& normal_matrix,
00050                               Vector<double>& normal_vector);
00051
00052     /// jacobian of g_() with respect to x at x, l
00053     virtual Matrix<double>& GetA_(const Vector<double>& l,
00054                                   const Vector<double>& x) = 0;
00055
00056     /// transposed of jacobian of g_() with respect to l at x, l
00057     virtual Matrix<double>& GetB_(const Vector<double>& l,
00058                                   const  Vector<double>& x) = 0;
00059
00060     /// transposed of jacobian of h_() with respect to x at x
00061     virtual Matrix<double>& GetH_(const Vector<double>& x) = 0;
00062
00063     /// joint constraints on obseravtions and unknowns
00064     virtual Vector<double>& g_(const Vector<double>& l,
00065                                const Vector<double>& x) = 0;
00066
00067     /// constraints on the unknowns
00068     virtual Vector<double>& h_(const Vector<double>& x) = 0;
00069
00070   }; // class
00071
00072 } // namespace
00073
00074 #endif // _GaussHelmert_hh_
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenGroundTruth.cpp Source File

Utils

GenGroundTruth.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GenGroundTruth.hh"
00027
00028 #include <Base/Debug/Debug.hh>
00029 #include <Base/Math/Random.hh>
00030 #include <Geometry/RMatrix.hh>
00031 #include <Base/Geometry/KMatrix.hh>
00032 #include <Base/Math/Vector3.hh>
00033 #include <Base/Geometry/HomgLine2D.hh>
00034 #include <Base/Geometry/HomgPoint3D.hh>
00035 #include <Base/Image/ImageDraw.hh>
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 void GenGroundTruth::NormalizeMatches(vector<BIAS::HomgPoint2D>& match1,
00041                       vector<BIAS::HomgPoint2D>& match2,
00042                       KMatrix K)
00043 {
00044   KMatrix Kinv=K.Invert();
00045   for (unsigned int i=0; i<match1.size(); i++){
00046     match1[i]=Kinv*match1[i];
00047     match2[i]=Kinv*match2[i];
00048   }
00049 }
00050
00051 void GenGroundTruth::DeNormalizeMatches(vector<BIAS::HomgPoint2D>& match1,
00052                         vector<BIAS::HomgPoint2D>& match2,
00053                         KMatrix K)
00054 {
00055   for (unsigned int i=0; i<match1.size(); i++){
00056     match1[i]=K*match1[i];
00057     match2[i]=K*match2[i];
00058   }
00059 }
00060
00061 void GenGroundTruth::DrawMatches(BIAS::Image<unsigned char>& im,
00062                       vector<BIAS::HomgPoint2D>& match1,
00063                       vector<BIAS::HomgPoint2D>& match2,
00064                       unsigned char lcolor, unsigned char mcolor)
00065 {
00066   unsigned int start[2], end[2];
00067   HomgLine2D line;
00068   unsigned int coo[4];
00069
00070   for (unsigned int i=0; i<match1.size(); i++){
00071     start[0]=(unsigned int)rint(match1[i][0]);
00072     start[1]=(unsigned int)rint(match1[i][1]);
00073     end[0]=(unsigned int)rint(match2[i][0]);
00074     end[1]=(unsigned int)rint(match2[i][1]);
00075     line.Set(match1[i], match2[i]);
00076     line.GetIntersectionsWithImage(im.GetWidth(), im.GetHeight(), coo);
00077     if (ImageDraw<unsigned char>::Line(im, &(coo[0]), &(coo[2]), lcolor)!=0){
00078       BIASERR("error drawing epipolar line "<<i);
00079     }
00080   }
00081   for (unsigned int i=0; i<match1.size(); i++){
00082     start[0]=(unsigned int)rint(match1[i][0]);
00083     start[1]=(unsigned int)rint(match1[i][1]);
00084     end[0]=(unsigned int)rint(match2[i][0]);
00085     end[1]=(unsigned int)rint(match2[i][1]);
00086     if (ImageDraw<unsigned char>::Line(im, start, end, mcolor)!=0){
00087       BIASERR("error drawing match "<<i<<" ("<<start[0]<<", "<<start[1]
00088               <<")  ("<<end[0]<<", "<<end[1]<<")   "<<match1[i]<<"  <-->  "
00089               <<match2[i]);
00090     }
00091   }
00092 }
00093
00094
00095 void GenGroundTruth::CreateIdealMatches(vector<PMatrix>& pvec, unsigned num,
00096                         unsigned width, unsigned height,
00097                         vector<vector<HomgPoint2D> >& matches,
00098                         vector<HomgPoint3D>& points,
00099                         double minx, double maxx, double miny, double maxy,
00100                         double minz, double maxz)
00101 {
00102   Random ran;
00103   unsigned i;
00104   HomgPoint3D p3d(0.0, 0.0, 0.0);
00105   HomgPoint2D p2d(0.0, 0.0);
00106   vector<HomgPoint2D> p2vec;
00107   unsigned numim=pvec.size();
00108   bool done;
00109
00110   p2vec.resize(numim);
00111   points.clear();
00112   for (i=0; i<matches.size(); i++)
00113     matches[i].clear();
00114   matches.clear();
00115
00116   for (i=0; i<num; i++){
00117     do {
00118       p3d[0]=ran.GetUniformDistributed(minx, maxx);
00119       p3d[1]=ran.GetUniformDistributed(miny, maxy);
00120       p3d[2]=ran.GetUniformDistributed(minz, maxz);
00121       done=true;
00122       p2vec.clear();
00123       for (unsigned j=0; j<numim; j++){
00124         p2d=pvec[i]*p3d;
00125         p2d.Homogenize();
00126         if (p2d[0]>=0 && p2d[0]<width-1 && p2d[1]>=0 && p2d[1]<height-1){
00127           p2vec.push_back(p2d);
00128         } else {
00129           done=false;
00130           break;
00131         }
00132       }
00133     } while (!done);
00134     points.push_back(p3d);
00135     matches.push_back(p2vec);
00136   }
00137 }
00138
00139
00140 void GenGroundTruth::CreateMatches(vector<PMatrix>& pvec, unsigned num,
00141                    unsigned width, unsigned height, double spatial_noise,
00142                    vector<vector<HomgPoint2D> >& i_matches,
00143                    vector<vector<HomgPoint2D> >& n_matches,
00144                    vector<HomgPoint3D>& points,
00145                    double minx, double maxx, double miny, double maxy,
00146                    double minz, double maxz)
00147 {
00148   Random ran;
00149   unsigned i;
00150   HomgPoint3D p3d(0.0, 0.0, 0.0);
00151   HomgPoint2D p2d(0.0, 0.0), n_p2d(0.0, 0.0);
00152   vector<HomgPoint2D> p2vec;
00153   vector<HomgPoint2D> noisy_p2vec;
00154   unsigned numim=pvec.size();
00155   bool done;
00156   p2vec.resize(numim);
00157   points.clear();
00158   for (i=0; i<i_matches.size(); i++)
00159     i_matches[i].clear();
00160   for (i=0; i<n_matches.size(); i++)
00161     n_matches[i].clear();
00162   i_matches.clear();
00163   n_matches.clear();
00164
00165   for (i=0; i<num; i++){
00166     do {
00167       p3d[0]=ran.GetUniformDistributed(minx, maxx);
00168       p3d[1]=ran.GetUniformDistributed(miny, maxy);
00169       p3d[2]=ran.GetUniformDistributed(minz, maxz);
00170       done=true;
00171       p2vec.clear();
00172       noisy_p2vec.clear();
00173       for (unsigned j=0; j<numim; j++){
00174         p2d=pvec[i]*p3d;
00175         p2d.Homogenize();
00176         n_p2d[0]=p2d[0]+ran.GetNormalDistributed(0.0, spatial_noise);
00177         n_p2d[1]=p2d[1]+ran.GetNormalDistributed(0.0, spatial_noise);
00178         if (p2d[0]>=0 && p2d[0]<width-1 && p2d[1]>=0 && p2d[1]<height-1 &&
00179             n_p2d[0]>=0 && n_p2d[0]<width-1
00180             && n_p2d[1]>=0 && n_p2d[1]<height-1){
00181           p2vec.push_back(p2d);
00182           noisy_p2vec.push_back(n_p2d);
00183         } else {
00184           done=false;
00185           break;
00186         }
00187       }
00188     } while (!done);
00189     points.push_back(p3d);
00190     i_matches.push_back(p2vec);
00191     n_matches.push_back(noisy_p2vec);
00192   }
00193 }
00194
00195 void GenGroundTruth::CreateMatches(vector<PMatrix>& pvec, vector<PMatrix>& n_pvec,
00196                         unsigned num, unsigned width, unsigned height,
00197                         double spatial_noise, double r_noise, double c_noise,
00198                         vector<vector<HomgPoint2D> >& i_matches,
00199                         vector<vector<HomgPoint2D> >& n_matches,
00200                         vector<HomgPoint3D>& points,
00201                         double minx, double maxx, double miny, double maxy,
00202                         double minz, double maxz, bool print)
00203 {
00204   Random ran;
00205   unsigned i;
00206   HomgPoint3D p3d(0.0, 0.0, 0.0);
00207   HomgPoint2D p2d(0.0, 0.0), n_p2d(0.0, 0.0);
00208   vector<HomgPoint2D> p2vec;
00209   vector<HomgPoint2D> noisy_p2vec;
00210   unsigned numim=pvec.size();
00211   bool done;
00212   RMatrix R;
00213   KMatrix K;
00214   Vector3<double> C, r;
00215   PMatrix P;
00216
00217   p2vec.resize(numim);
00218   points.clear();
00219   for (i=0; i<i_matches.size(); i++)
00220     i_matches[i].clear();
00221   for (i=0; i<n_matches.size(); i++)
00222     n_matches[i].clear();
00223   i_matches.clear();
00224   n_matches.clear();
00225
00226
00227   // create noisy P matrices
00228   n_pvec.clear();
00229   for (i=0; i<numim; i++){
00230     if (pvec[i].GetK(K) || pvec[i].GetR(R) || pvec[i].GetC(C)){
00231       BIASERR("error decomposing pvec["<<i<<"] : "<<pvec[i]<<"\nK: "<<K
00232               <<"\nR: "<<R<<"\nC: "<<C);
00233       return;
00234     }
00235     if (R.GetRotationAnglesXYZ(r[0], r[1], r[2])){
00236       BIASERR("error extracting rotation angles from R: "<<R);
00237       return;
00238     }
00239     cerr << setw(4) <<i<<"   : true C : "<<C
00240          <<"\n         true R : "<<r<<endl;
00241     if (i>0){ // first camera is usually known exact
00242       r[0]+=ran.GetNormalDistributed(0.0, r_noise);
00243       r[1]+=ran.GetNormalDistributed(0.0, r_noise);
00244       r[2]+=ran.GetNormalDistributed(0.0, r_noise);
00245       R.SetXYZ(r[0], r[1], r[2]);
00246       C[0]+=ran.GetNormalDistributed(0.0, c_noise);
00247       C[1]+=ran.GetNormalDistributed(0.0, c_noise);
00248       C[2]+=ran.GetNormalDistributed(0.0, c_noise);
00249     }
00250     cerr <<  "         noisy C : "<<C
00251          <<"\n         noisy R : "<<r<<endl;
00252
00253     P.Compose(K, R, C);
00254     n_pvec.push_back(P);
00255   }
00256
00257   // create points
00258   cerr <<"creating 3D points and matches"<<endl;
00259   for (i=0; i<num; i++){
00260     do {
00261       p3d[0]=ran.GetUniformDistributed(minx, maxx);
00262       p3d[1]=ran.GetUniformDistributed(miny, maxy);
00263       p3d[2]=ran.GetUniformDistributed(minz, maxz);
00264       done=true;
00265       p2vec.clear();
00266       noisy_p2vec.clear();
00267       for (unsigned j=0; j<numim; j++){
00268         p2d=pvec[j]*p3d;
00269         p2d.Homogenize();
00270         n_p2d=n_pvec[j]*p3d;
00271         n_p2d.Homogenize();
00272         n_p2d[0]+=ran.GetNormalDistributed(0.0, spatial_noise);
00273         n_p2d[1]+=ran.GetNormalDistributed(0.0, spatial_noise);
00274         if (p2d[0]>=0 && p2d[0]<width-1 && p2d[1]>=0 && p2d[1]<height-1 &&
00275             n_p2d[0]>=0 && n_p2d[0]<width-1 &&
00276             n_p2d[1]>=0 && n_p2d[1]<height-1){
00277           p2vec.push_back(p2d);
00278           noisy_p2vec.push_back(n_p2d);
00279         } else {
00280           done=false;
00281           break;
00282         }
00283       }
00284       if (done) cout << "*"; else cout <<".";
00285       cout.flush();
00286     } while (!done);
00287     points.push_back(p3d);
00288     i_matches.push_back(p2vec);
00289     n_matches.push_back(noisy_p2vec);
00290   }
00291   cout << endl;
00292
00293   if (print){
00294     cout <<"3D points and matches:"<<endl;
00295     for (unsigned i=0; i<num; i++){
00296       cout <<setw(3) << i <<": true  "<<points[i]<<"    \t: ";
00297       for (unsigned k=0; k<numim; k++)
00298         cout <<k<<i_matches[i][k]<<"  ";
00299       cout <<endl;
00300       cout <<"     noisy "<<points[i]<<"    \t: ";
00301       for (unsigned k=0; k<numim; k++)
00302         cout <<k<<n_matches[i][k]<<"  ";
00303       cout <<endl;
00304     }
00305     cout << endl;
00306   }
00307
00308 }
00309
00310
00311 void GenGroundTruth::CreateMatchesOutlier(vector<BIAS::PMatrix>& pvec,
00312                                vector<BIAS::PMatrix>& n_pvec, unsigned num,
00313                                unsigned width, unsigned height,
00314                                double spatial_noise, double r_noise,
00315                                double c_noise, double outlier_fraction,
00316                                vector<vector<BIAS::HomgPoint2D> >& i_matches,
00317                                vector<vector<BIAS::HomgPoint2D> >& n_matches,
00318                                vector<BIAS::HomgPoint3D>& points,
00319                                double minx/*=-50.0*/, double maxx/*=50.0*/,
00320                                double miny/*=-50.0*/, double maxy/*=50.0*/,
00321                                double minz/*=-50.0*/, double maxz/*=50.0*/,
00322                                bool print)
00323 {
00324   Random ran;
00325   unsigned inlier, outlier;
00326   outlier=(unsigned)rint((double)num*outlier_fraction);
00327   inlier=num-outlier;
00328   unsigned numim=pvec.size();
00329   double offsetx, offsety;
00330
00331   CreateMatches(pvec, n_pvec, num, width, height, spatial_noise, r_noise,
00332                 c_noise, i_matches, n_matches, points, minx, maxx, miny, maxy,
00333                 minz, maxz, false);
00334
00335   for (unsigned i=inlier; i<num; i++){
00336     cerr << i << "is outlier" << endl;
00337     offsetx=ran.GetUniformDistributed(3+2*spatial_noise, 10);
00338     offsety=ran.GetUniformDistributed(3+2*spatial_noise, 10);
00339     for (unsigned j=1; j<numim;j++){
00340       n_matches[i][j][0]+=j*offsetx;
00341       n_matches[i][j][1]+=j*offsety;
00342       i_matches[i][j][0]+=j*offsetx;
00343       i_matches[i][j][1]+=j*offsety;
00344     }
00345   }
00346
00347   if (print){
00348     inlier=num-outlier;
00349
00350     cout <<"3D points and matches:"<<endl;
00351     for (unsigned i=0; i<num; i++){
00352
00353       if (i<inlier) cout << "inl  "; else cout << "outl ";
00354       cout << setw(3) << i <<": true  ";//<<points[i]<<"    \t: ";
00355       for (unsigned k=0; k<numim; k++){
00356         cout <<k<<i_matches[i][k]<<"-"
00357              <<pvec[k].GetK().Invert()*i_matches[i][k]<<"\t";
00358       }
00359       cout <<endl;
00360
00361       cout <<"          noisy ";//<<points[i]<<"    \t: ";
00362       for (unsigned k=0; k<numim; k++)
00363         cout <<k<<n_matches[i][k]<<"-"
00364              <<n_pvec[k].GetK().Invert()*n_matches[i][k]<<"\t";
00365       cout <<endl;
00366
00367     }
00368     cout << endl;
00369   }
00370
00371 }
00372
00373 void GenGroundTruth::GenerateRandomPlane(vector<BIAS::HomgPoint3D> &Points,
00374                          int n,
00375                          double aX, double aY, double aZ,
00376                          double alphaX, double alphaY, double alphaZ,
00377                          double betaX, double betaY, double betaZ,
00378                          double alphamax,
00379                          double betamax)
00380 {
00381   GenerateRandomCube(Points, n, aX, aY, aZ,
00382                      alphaX, alphaY, alphaZ,
00383                      betaX, betaY, betaZ,
00384                      0.0, 0.0, 0.0,
00385                      alphamax, betamax, 0);
00386 }
00387
00388 void GenGroundTruth::GenerateRandomCube(vector<BIAS::HomgPoint3D> &Points,
00389                       int n,
00390                       double aX, double aY, double aZ,
00391                       double alphaX, double alphaY, double alphaZ,
00392                       double betaX, double betaY, double betaZ,
00393                       double gammaX, double gammaY, double gammaZ,
00394                       double alphamax,
00395                       double betamax,
00396                       double gammamax)
00397 {
00398   Random ran;
00399   double f1,f2,f3;
00400   Vector3<double> newpoint;
00401   HomgPoint3D newHomgPoint;
00402   Vector3<double> a(aX,aY,aZ);
00403   Vector3<double> alpha(alphaX,alphaY,alphaZ);
00404   Vector3<double> beta(betaX,betaY,betaZ);
00405   Vector3<double> gamma(gammaX,gammaY,gammaZ);
00406   alpha.Normalize();
00407   beta.Normalize();
00408   gamma.Normalize();
00409   for(int i=0;i<n;i++)
00410     {
00411       f1=ran.GetUniformDistributed(0.0,alphamax);
00412       f2=ran.GetUniformDistributed(0.0,betamax);
00413       f3=ran.GetUniformDistributed(0.0,gammamax);
00414       newpoint = a + f1*alpha + f2*beta + f3*gamma;
00415       newHomgPoint=newpoint;
00416       Points.push_back(newHomgPoint);
00417     }
00418 }
00419
00420 int GenGroundTruth::ReadCorrespondences(const char *Filename,
00421                                 vector<HomgPoint2D> &Points1,
00422                                 vector<HomgPoint2D> &Points2)
00423 {
00424   ifstream filein;
00425   double x,y,w;
00426   Points1.clear();
00427   Points2.clear();
00428   filein.open(Filename, ios::in);
00429   if ( !filein.is_open() )
00430     {
00431       cerr << "Error opening file '" << Filename << "'" << endl;
00432       return -1;
00433     }
00434   while  ( !filein.eof() )
00435     {
00436       filein.read( (char*) &x,sizeof(HOMGPOINT2D_TYPE) );
00437       filein.read( (char*) &y,sizeof(HOMGPOINT2D_TYPE) );
00438       filein.read( (char*) &w,sizeof(HOMGPOINT2D_TYPE) );
00439       Points1.push_back(HomgPoint2D(x,y,w));
00440       filein.read( (char*) &x,sizeof(HOMGPOINT2D_TYPE) );
00441       filein.read( (char*) &y,sizeof(HOMGPOINT2D_TYPE) );
00442       filein.read( (char*) &w,sizeof(HOMGPOINT2D_TYPE) );
00443       Points2.push_back(HomgPoint2D(x,y,w));
00444     }
00445   // the last correspondence is always read in twice so we cut one off
00446   Points1.pop_back();
00447   Points2.pop_back();
00448   filein.close();
00449   assert( Points1.size() == Points2.size() );
00450   return Points1.size();
00451 }
00452
00453
00454 int GenGroundTruth::WriteCorrespondences(const char *Filename,
00455                                 vector<HomgPoint2D> &Points1,
00456                                 vector<HomgPoint2D> &Points2)
00457 {
00458   assert( Points1.size() == Points2.size() );
00459   ofstream fileout;
00460   fileout.open(Filename, ios::out);
00461   if ( !fileout.is_open() )
00462     {
00463       cerr << "Error opening file '" << Filename << "'" << endl;
00464       return -1;
00465     }
00466   for(unsigned int i=0;i<Points1.size();i++)
00467     {
00468       fileout.write( (char*) &Points1[i][0],sizeof(HOMGPOINT2D_TYPE) );
00469       fileout.write( (char*) &Points1[i][1],sizeof(HOMGPOINT2D_TYPE) );
00470       fileout.write( (char*) &Points1[i][2],sizeof(HOMGPOINT2D_TYPE) );
00471       fileout.write( (char*) &Points2[i][0],sizeof(HOMGPOINT2D_TYPE) );
00472       fileout.write( (char*) &Points2[i][1],sizeof(HOMGPOINT2D_TYPE) );
00473       fileout.write( (char*) &Points2[i][2],sizeof(HOMGPOINT2D_TYPE) );
00474     }
00475   fileout.close();
00476   return Points1.size();
00477 }
00478
00479
00480 int GenGroundTruth::ReadWorldPoints( const char *Filename,
00481                             vector<HomgPoint3D> & Points )
00482 {
00483   ifstream filein;
00484   double x,y,z,w;
00485   Points.clear();
00486   filein.open(Filename, ios::in);
00487   if ( !filein.is_open() )
00488     {
00489       cerr << "Error opening file '" << Filename << "'" << endl;
00490       return -1;
00491     }
00492   while  ( !filein.eof() )
00493     {
00494       filein.read( (char*) &x,sizeof(HOMGPOINT3D_TYPE) );
00495       filein.read( (char*) &y,sizeof(HOMGPOINT3D_TYPE) );
00496       filein.read( (char*) &z,sizeof(HOMGPOINT3D_TYPE) );
00497       filein.read( (char*) &w,sizeof(HOMGPOINT3D_TYPE) );
00498       Points.push_back(HomgPoint3D(x,y,z,w));
00499     }
00500   // the last coordinate is always read in twice so we cut one off
00501   Points.pop_back();
00502   filein.close();
00503   return Points.size();
00504 }
00505
00506
00507 int GenGroundTruth::WriteWorldPoints( const char *Filename,
00508                               vector<HomgPoint3D> & Points )
00509 {
00510   ofstream fileout;
00511   fileout.open(Filename, ios::out);
00512   if ( !fileout.is_open() )
00513     {
00514       cerr << "Error opening file '" << Filename << "'" << endl;
00515       return -1;
00516     }
00517   for(unsigned int i=0;i<Points.size();i++)
00518     {
00519       fileout.write( (char*) &Points[i][0],sizeof(HOMGPOINT3D_TYPE) );
00520       fileout.write( (char*) &Points[i][1],sizeof(HOMGPOINT3D_TYPE) );
00521       fileout.write( (char*) &Points[i][2],sizeof(HOMGPOINT3D_TYPE) );
00522       fileout.write( (char*) &Points[i][3],sizeof(HOMGPOINT3D_TYPE) );
00523     }
00524   fileout.close();
00525   return Points.size();
00526 }
00527
00528
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenGroundTruth.hh Source File

Utils

GenGroundTruth.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GENERATE_GROUND_TRUTH_HH__
00027 #define __GENERATE_GROUND_TRUTH_HH__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <Geometry/PMatrix.hh>
00032 #include <Base/Geometry/KMatrix.hh>
00033 #include <Base/Geometry/HomgPoint2D.hh>
00034 #include <Base/Geometry/HomgPoint3D.hh>
00035 #include <Base/Image/Image.hh>
00036
00037 #include <vector>
00038
00039 namespace BIAS {
00040
00041   class BIASUtils_EXPORT GenGroundTruth
00042   {
00043   public:
00044     /** normalizes the matches by multiplying with K^-1
00045         @author woelk 05 2003 */
00046     static void NormalizeMatches(std::vector<BIAS::HomgPoint2D>& match1,
00047                                  std::vector<BIAS::HomgPoint2D>& match2,
00048                                  BIAS::KMatrix K);
00049
00050     /** de-normalizes the matches by multiplying with K
00051         @author woelk 05 2003 */
00052     static void DeNormalizeMatches(std::vector<BIAS::HomgPoint2D>& match1,
00053                                    std::vector<BIAS::HomgPoint2D>& match2,
00054                                    BIAS::KMatrix K);
00055
00056     /** draws the matches in image im with background 0, match in color mcolor
00057         and line defined by match in color lcolcor
00058         @authior woelk 05 2003 */
00059     static void DrawMatches(BIAS::Image<unsigned char>& im,
00060                             std::vector<BIAS::HomgPoint2D>& match1,
00061                             std::vector<BIAS::HomgPoint2D>& match2,
00062                             unsigned char lcolor, unsigned char mcolor);
00063
00064     /** Generates ideal matches in cameras from pvec by randomly creating
00065         a 3D point in the cube between min[x,y,z] and max[x,y,z] and
00066         than looking if it projects into all cameras
00067         @author woelk 05 2003 */
00068     static void CreateIdealMatches(std::vector<BIAS::PMatrix>& pvec, unsigned num,
00069                                    unsigned width, unsigned height,
00070                                    std::vector<std::vector<BIAS::HomgPoint2D> >&
00071                                    matches,
00072                                    std::vector<BIAS::HomgPoint3D>& points,
00073                                    double minx=-50.0, double maxx=50.0,
00074                                    double miny=-50.0, double maxy=50.0,
00075                                    double minz=-50.0, double maxz=50.0);
00076
00077     /** Generates ideal matches in cameras from pvec by randomly creating
00078         a 3D point in the cube between min[x,y,z] and max[x,y,z] and
00079         than looking if it projects into all cameras
00080         Adds spatial noise with sigma spatial_noise to position of 2D
00081         points in every camera.
00082         The ideal matches are returned in i_matches, the noisy matches are
00083         returned in n_matches.
00084         @author woelk 05 2003 */
00085     static void CreateMatches(std::vector<BIAS::PMatrix>& pvec, unsigned num,
00086                        unsigned width, unsigned height, double spatial_noise,
00087                        std::vector<std::vector<BIAS::HomgPoint2D> >& i_matches,
00088                        std::vector<std::vector<BIAS::HomgPoint2D> >& n_matches,
00089                        std::vector<BIAS::HomgPoint3D>& points,
00090                        double minx=-50.0, double maxx=50.0,
00091                        double miny=-50.0, double maxy=50.0,
00092                        double minz=-50.0, double maxz=50.0);
00093
00094     /** Generates ideal matches in cameras from pvec by randomly creating
00095         a 3D point in the cube between min[x,y,z] and max[x,y,z] and
00096         than looking if it projects into all cameras.
00097         Adds spatial noise with a sigma of spatial_noise to position of 2D
00098         points in every camera.
00099         The ideal matches are returned in i_matches, the noisy matches are
00100         returned in n_matches.
00101         An additional normal ditributed position error with sigma of c_noise
00102         and a normal distributed rotational error with sigma of r_noise are
00103         assumed for the camera matrices.
00104         The noisy camera matrices are returned in n_pvec.
00105         @author woelk 05 2003 */
00106     static void CreateMatches(std::vector<BIAS::PMatrix>& pvec,
00107                        std::vector<BIAS::PMatrix>& n_pvec, unsigned num,
00108                        unsigned width, unsigned height, double spatial_noise,
00109                        double r_noise, double c_noise,
00110                        std::vector<std::vector<BIAS::HomgPoint2D> >& i_matches,
00111                        std::vector<std::vector<BIAS::HomgPoint2D> >& n_matches,
00112                        std::vector<BIAS::HomgPoint3D>& points,
00113                        double minx=-50.0, double maxx=50.0,
00114                        double miny=-50.0, double maxy=50.0,
00115                        double minz=-50.0, double maxz=50.0, bool print=false);
00116
00117     /** Generates ideal matches in cameras from pvec by randomly creating
00118         a 3D point in the cube between min[x,y,z] and max[x,y,z] and
00119         than looking if it projects into all cameras.
00120         Adds spatial noise with a sigma of spatial_noise to position of 2D
00121         points in every camera.
00122         The ideal matches are returned in i_matches, the noisy matches are
00123         returned in n_matches.
00124         An additional normal ditributed position error with sigma of c_noise
00125         and a normal distributed rotational error with sigma of r_noise are
00126         assumed for the camera matrices.
00127         The noisy camera matrices are returned in n_pvec.
00128         outlier_fraction of the matches are outlier. They are generated by
00129         adding a random offset to each x and y of each point after image 0.
00130         The offset is generated between 2*spatial_noise and 10*spatial_noise.
00131         @author woelk 05 2003 */
00132     static void
00133     CreateMatchesOutlier(std::vector<BIAS::PMatrix>& pvec,
00134                      std::vector<BIAS::PMatrix>& n_pvec, unsigned num,
00135                      unsigned width, unsigned height, double spatial_noise,
00136                      double r_noise, double c_noise, double outlier_fraction,
00137                      std::vector<std::vector<BIAS::HomgPoint2D> >& i_matches,
00138                      std::vector<std::vector<BIAS::HomgPoint2D> >& n_matches,
00139                      std::vector<BIAS::HomgPoint3D>& points,
00140                      double minx=-50.0, double maxx=50.0,
00141                      double miny=-50.0, double maxy=50.0,
00142                      double minz=-50.0, double maxz=50.0,
00143                      bool print=false);
00144
00145     /** Generates 'n' points which are all located on a plane specified by
00146         space point coords aX, aY, aZ and the coords of two spanning vectors
00147         alphaX, alphaY, alphaZ and betaX, betaY, betaZ, which are normalized
00148         internally.
00149         'alphamax' and 'betamax' define width and height of the plane.
00150         This method does not clear the result vector 'Points'!
00151         By default it generates 200 points on a rectangular 100x100 plane in
00152         the x-y-plane.
00153         This method implicitly calls GenerateRandomCube with the third
00154         dimension set to zero.
00155         @author Matthias Dunda 08 2003 */
00156     static void GenerateRandomPlane(std::vector<BIAS::HomgPoint3D> &Points,
00157                       int n=200,
00158                       double aX=-50.0, double aY=-50.0, double aZ=0.0,
00159                       double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0,
00160                       double betaX=0.0, double betaY=1.0, double betaZ=0.0,
00161                       double alphamax=100.0,
00162                       double betamax=100.0);
00163
00164     /** Generates 'n' points which are all located in a cube specified by
00165         space point coords aX, aY, aZ and the coords of three spanning vectors
00166         alphaX, alphaY, alphaZ and betaX, betaY, betaZ and
00167         gammaX, gammaY, gammaZ, which are normalized internally.
00168         'alphamax', 'betamax' and 'gammamax' define width, height and
00169         depth of the cube.
00170         This method does not clear the result vector 'Points'!
00171         By default it generates 200 points on a rectangular 100x100x100 cube
00172         centered at 0 0 0.
00173         @author Matthias Dunda 08 2003 */
00174     static void GenerateRandomCube(std::vector<BIAS::HomgPoint3D> &Points,
00175                       int n=200,
00176                       double aX=-50.0, double aY=-50.0, double aZ=-50.0,
00177                       double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0,
00178                       double betaX=0.0, double betaY=1.0, double betaZ=0.0,
00179                       double gammaX=0.0, double gammaY=0.0, double gammaZ=1.0,
00180                       double alphamax=100.0,
00181                       double betamax=100.0,
00182                       double gammamax=100.0);
00183
00184     static int ReadCorrespondences(const char *Filename,
00185                                    std::vector<BIAS::HomgPoint2D> &Points1,
00186                                    std::vector<BIAS::HomgPoint2D> &Points2);
00187
00188     /** Store 2D picture correspondences in a file in binary format, so that
00189         you can keep the full accuracy of a double.
00190         @status tested
00191         @author mdunda */
00192     static int WriteCorrespondences(const char *Filename,
00193                                     std::vector<BIAS::HomgPoint2D> &Points1,
00194                                     std::vector<BIAS::HomgPoint2D> &Points2);
00195
00196     /** Read 3D world coordinates from a file in binary format.
00197         @status tested
00198         @author mdunda */
00199     static int ReadWorldPoints( const char *Filename,
00200                                 std::vector<BIAS::HomgPoint3D> & Points );
00201
00202     /** Store 3D world coordinates in a file in binary format, so that
00203         you can keep the full accuracy of a double.
00204         @status tested
00205         @author mdunda */
00206     static int WriteWorldPoints( const char *Filename,
00207                                  std::vector<BIAS::HomgPoint3D> & Points );
00208
00209   }; /* class GenGroundTruth */
00210
00211 } /* namespace MIP */
00212
00213 #include <Base/Common/BIASpragmaEnd.hh>
00214
00215 #endif /* __GENERATE_GROUND_TRUTH_HH__ */
00216
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenSynthMatches.cpp Source File

Utils

GenSynthMatches.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "GenSynthMatches.hh"
00026 #include <Base/Image/ImageDraw.hh>
00027 #include <Geometry/PMatrix.hh>
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032
00033
00034
00035 ostream& BIAS::operator<<(ostream& os, const GenSynthMatches& m)
00036 {
00037
00038   HomgPoint3D p3d(0.0, 0.0, 0.0, 0.0);
00039   os << "true matches (0-"<<*m._NumStaticPoints-1<<"), outliers ("
00040      <<*m._NumStaticPoints<<"-"<<*m._NumStaticPoints+*m._NumOutliers-1
00041      <<") and moving objs ("<<*m._NumStaticPoints+*m._NumOutliers<<"-"
00042      <<*m._NumStaticPoints+*m._NumOutliers+
00043         *m._NumMovingPoints* *m._NumMovingObjects-1<<"): \n";
00044   for (int i=0; i<*m._NumStaticPoints; i++){
00045     os << setw(3)<<i<<" : "<< m._StaticPoints[i] << " : ";
00046     for (int k=0; k<*m._NumImages; k++){
00047       os << k<<":"<<m._GT_Points[k][i]<<"  ";
00048     }
00049     os << endl;
00050   }
00051   for (int i=*m._NumStaticPoints; i<*m._NumStaticPoints+*m._NumOutliers; i++){
00052        os << setw(3) << i << " : " << p3d << " : ";
00053     for (int k=0; k<*m._NumImages; k++){
00054       os << k<<":"<<m._GT_Points[k][i]<<"  ";
00055     }
00056     os << endl;
00057   }
00058   for (int i=*m._NumStaticPoints+*m._NumOutliers;
00059        i<*m._NumStaticPoints+*m._NumOutliers+
00060          *m._NumMovingPoints * *m._NumMovingObjects; i++){
00061     os << setw(3)<<i<<" : "<<
00062       m._MovingPoints[i-*m._NumStaticPoints-*m._NumOutliers] << " : ";
00063     for (int k=0; k<*m._NumImages; k++){
00064       os << k<<":"<<m._GT_Points[k][i]<<"  ";
00065     }
00066     os << endl;
00067   }
00068
00069   //////////////////////////////////////////////////
00070
00071   os << "noisy matches (0-"<<*m._NumStaticPoints-1<<"), outliers ("
00072      <<*m._NumStaticPoints<<"-"<<*m._NumStaticPoints+*m._NumOutliers-1
00073      <<") and moving objs ("<<*m._NumStaticPoints+*m._NumOutliers<<"-"
00074      <<*m._NumStaticPoints+*m._NumOutliers+
00075        *m._NumMovingPoints * *m._NumMovingObjects-1<<"): \n";
00076   for (int i=0; i<*m._NumStaticPoints; i++){
00077     os << setw(3)<<i<<" : "<< m._StaticPoints[i] << " : ";
00078     for (int k=0; k<*m._NumImages; k++){
00079       os << k<<":"<<m._Points[k][i]<<"  ";
00080     }
00081     os << endl;
00082   }
00083   for (int i=*m._NumStaticPoints; i<*m._NumStaticPoints+*m._NumOutliers; i++){
00084        os << setw(3) << i << " : " << p3d << " : ";
00085     for (int k=0; k<*m._NumImages; k++){
00086       os << k<<":"<<m._Points[k][i]<<"  ";
00087     }
00088     os << endl;
00089   }
00090   for (int i=*m._NumStaticPoints+*m._NumOutliers;
00091        i<*m._NumStaticPoints+*m._NumOutliers+
00092          *m._NumMovingPoints * *m._NumMovingObjects; i++){
00093     os << setw(3)<<i<<" : "<<
00094       m._MovingPoints[i-*m._NumStaticPoints-*m._NumOutliers] << " : ";
00095     for (int k=0; k<*m._NumImages; k++){
00096       os << k<<":"<<m._Points[k][i]<<"  ";
00097     }
00098     os << endl;
00099   }
00100
00101   /*
00102   //////////////////////////////////////////////////
00103
00104   os << "normalized true matches (0-"<<*m._NumStaticPoints-1<<"), outliers ("
00105      <<*m._NumStaticPoints<<"-"<<*m._NumStaticPoints+*m._NumOutliers-1
00106      <<") and moving objs ("<<*m._NumStaticPoints+*m._NumOutliers<<"-"
00107      <<*m._NumStaticPoints+*m._NumOutliers+
00108     *m._NumMovingPoints * *m._NumMovingObjects-1<<"): \n";
00109   for (int i=0; i<*m._NumStaticPoints; i++){
00110     os << setw(3)<<i<<" : "<< m._StaticPoints[i] << " : ";
00111     for (int k=0; k<*m._NumImages; k++){
00112       os << k<<":"<<m._GT_NormalizedPoints[k][i]<<"  ";
00113     }
00114     os << endl;
00115   }
00116   for (int i=*m._NumStaticPoints; i<*m._NumStaticPoints+*m._NumOutliers; i++){
00117        os << setw(3) << i << " : " << p3d << " : ";
00118     for (int k=0; k<*m._NumImages; k++){
00119       os << k<<":"<<m._GT_NormalizedPoints[k][i]<<"  ";
00120     }
00121     os << endl;
00122   }
00123   for (int i=*m._NumStaticPoints+*m._NumOutliers;
00124        i<*m._NumStaticPoints+*m._NumOutliers+
00125          *m._NumMovingPoints * *m._NumMovingObjects; i++){
00126     os << setw(3)<<i<<" : "<<
00127       m._MovingPoints[i-*m._NumStaticPoints-*m._NumOutliers] << " : ";
00128     for (int k=0; k<*m._NumImages; k++){
00129       os << k<<":"<<m._GT_NormalizedPoints[k][i]<<"  ";
00130     }
00131     os << endl;
00132   }
00133
00134   //////////////////////////////////////////////////
00135
00136   os << "normalized noisy matches (0-"<<*m._NumStaticPoints-1<<"), outliers ("
00137      <<*m._NumStaticPoints<<"-"<<*m._NumStaticPoints+*m._NumOutliers-1
00138      <<") and moving objs ("<<*m._NumStaticPoints+*m._NumOutliers<<"-"
00139      <<*m._NumStaticPoints+*m._NumOutliers+
00140     *m._NumMovingPoints * *m._NumMovingObjects-1<<"): \n";
00141   for (int i=0; i<*m._NumStaticPoints; i++){
00142     os << setw(3)<<i<<" : "<< m._StaticPoints[i] << " : ";
00143     for (int k=0; k<*m._NumImages; k++){
00144       os << k<<":"<<m._NormalizedPoints[k][i]<<"  ";
00145     }
00146     os << endl;
00147   }
00148   for (int i=*m._NumStaticPoints; i<*m._NumStaticPoints+*m._NumOutliers; i++){
00149        os << setw(3) << i << " : " << p3d << " : ";
00150     for (int k=0; k<*m._NumImages; k++){
00151       os << k<<":"<<m._NormalizedPoints[k][i]<<"  ";
00152     }
00153     os << endl;
00154   }
00155   for (int i=*m._NumStaticPoints+*m._NumOutliers;
00156        i<*m._NumStaticPoints+*m._NumOutliers+*m._NumMovingPoints *
00157          *m._NumMovingObjects; i++){
00158     os << setw(3)<<i<<" : "<<
00159       m._MovingPoints[i-*m._NumStaticPoints-*m._NumOutliers] << " : ";
00160     for (int k=0; k<*m._NumImages; k++){
00161       os << k<<":"<<m._NormalizedPoints[k][i]<<"  ";
00162     }
00163     os << endl;
00164   }
00165   */
00166   return os;
00167 }
00168
00169 //////////////////////////////////////////////////////////////////////////
00170 //
00171 //////////////////////////////////////////////////////////////////////////
00172
00173
00174 GenSynthMatches::GenSynthMatches(Param &para)
00175   : MatchDataBase(para)
00176 {
00177   _para=&para;
00178
00179   _NumStaticPoints=_NumOutliers=_ImWidth=_ImHeight=NULL;
00180   _NumMovingPoints=_NumMovingObjects=NULL;
00181   _PrinciplePointX=_PrinciplePointY=_FocalLength=_SigmaImagePoints=NULL;
00182   _MaxDispOutliers=_SigmaCamCenterX=_OutlDirChange=_OutlLengthChange=NULL;
00183   _SigmaCamCenterY=_SigmaCamCenterZ=_SigmaCamRotX=_SigmaCamRotY=NULL;
00184   _SigmaCamRotZ=_MinCamDistance=_MaxCamDistance=_OverallMotionX=NULL;
00185   _OverallMotionY=_OverallMotionZ=_OverallRotX=_OverallRotY=_OverallRotZ=NULL;
00186   _SizeMovingObjX=_SizeMovingObjY=_SizeMovingObjZ=NULL;
00187   _UserGivenP=NULL;
00188   _MotionVecX=_MotionVecY=_MotionVecZ=_RotVecX=_RotVecY=_RotVecZ=NULL;
00189   _MovingObjMotionVecX=_MovingObjMotionVecY=_MovingObjMotionVecZ=NULL;
00190   _MovingObjRotVecX=_MovingObjRotVecY=_MovingObjRotVecZ=NULL;
00191   _AddParameter(*_para);
00192   Reset();
00193 }
00194
00195 GenSynthMatches::~GenSynthMatches()
00196 {}
00197
00198 int GenSynthMatches::CreateMatches()
00199 {
00200   //  _para->ShowData();
00201
00202   //cout << "DebugLevel is ";
00203   //PrintDebugLevel();
00204   Reset();
00205
00206   _CheckParams();
00207
00208   _CreateCamMovement();
00209   _CreateMovingTransforms();
00210
00211   if (_CreateStatic3DPoints()!=0){
00212     BIASERR("user error: maybe no common viewing vaolume");
00213     return -2;
00214   }
00215   if (_CreateMoving3DPoints()!=0){
00216     BIASERR("user error: moving object not visible");
00217     return -1;
00218   }
00219
00220   _CreateStatic2DPoints();
00221   _AddUniformDistributedOutliers();
00222   _CreateMoving2DPoints();
00223   return 0;
00224 }
00225
00226 void GenSynthMatches::DrawTrue(Image<unsigned char>& im,
00227                                int minindex, int maxindex) const
00228 {
00229   _Draw(im, minindex, maxindex, &_GT_Points);
00230 }
00231
00232 void GenSynthMatches::DrawNoisy(Image<unsigned char>& im,
00233                                int minindex, int maxindex) const
00234 {
00235   _Draw(im, minindex, maxindex, &_Points);
00236 }
00237
00238
00239 void GenSynthMatches::_Draw(Image<unsigned char>& im,
00240                             int minindex, int maxindex,
00241                             const std::vector<std::vector<HomgPoint2D> >* p) const
00242 {
00243   if (minindex<0 || minindex>=*_NumImages ||
00244       maxindex<=0 || maxindex>=*_NumImages){
00245     BIASERR("invalid image to draw");
00246     BIASABORT;
00247   }
00248
00249   double mag=1.0;
00250   int imag=(int)rint(mag);
00251   if (!im.IsEmpty()) im.Release();
00252   im.Init(*_ImWidth*imag, *_ImHeight*imag, 3);
00253   im.FillImageWithConstValue((unsigned char)0);
00254
00255   unsigned char red[3]={255, 0, 0};
00256   unsigned char green[3]={0, 255, 0};
00257   unsigned char hgreen[3]={0, 128, 0};
00258   unsigned char blue[3]={0, 0, 255};
00259   unsigned int start[2], end[2];
00260   unsigned int radius=1;
00261   for (int k=minindex+1; k<maxindex+1; k++){
00262     // draw inliers green
00263     for (int i=0; i<*_NumStaticPoints; i++){
00264       start[0]=(unsigned int)rint((*p)[k-1][i][0]*mag);
00265       start[1]=(unsigned int)rint((*p)[k-1][i][1]*mag);
00266       end[0]=(unsigned int)rint((*p)[k][i][0]*mag);
00267       end[1]=(unsigned int)rint((*p)[k][i][1]*mag);
00268       ImageDraw<unsigned char>::Line(im, start, end, hgreen);
00269       ImageDraw<unsigned char>::Line(im, start, start, green);
00270       if (k==minindex+1){
00271         if (start[0]>=radius && start[1]>=radius &&
00272             start[0]<=*_ImWidth*imag-radius-1 &&
00273             start[1]<=*_ImHeight*imag-radius-1)
00274           ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00275                                                        radius, green);
00276       }
00277     }
00278     // draw outliers blue
00279     for (int i=*_NumStaticPoints; i<*_NumStaticPoints+*_NumOutliers; i++){
00280       start[0]=(unsigned int)rint((*p)[k-1][i][0]*mag);
00281       start[1]=(unsigned int)rint((*p)[k-1][i][1]*mag);
00282       end[0]=(unsigned int)rint((*p)[k][i][0]*mag);
00283       end[1]=(unsigned int)rint((*p)[k][i][1]*mag);
00284       ImageDraw<unsigned char>::Line(im, start, end, blue);
00285       if (k==minindex+1){
00286         if (start[0]>=radius && start[1]>=radius &&
00287             start[0]<=*_ImWidth-radius-1 && start[1]<=*_ImHeight-radius-1)
00288           ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00289                                                        radius, blue);
00290       }
00291     }
00292    // draw moving objects red
00293     for (int i=*_NumStaticPoints+*_NumOutliers;
00294          i<*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints * *_NumMovingObjects; i++){
00295       start[0]=(unsigned int)rint((*p)[k-1][i][0]*mag);
00296       start[1]=(unsigned int)rint((*p)[k-1][i][1]*mag);
00297       end[0]=(unsigned int)rint((*p)[k][i][0]*mag);
00298       end[1]=(unsigned int)rint((*p)[k][i][1]*mag);
00299       ImageDraw<unsigned char>::Line(im, start, end, red);
00300       if (k==minindex+1){
00301         if (start[0]>=radius && start[1]>=radius &&
00302             start[0]<=*_ImWidth-radius-1 && start[1]<=*_ImHeight-radius-1)
00303           ImageDraw<unsigned char>::CircleCenterFilled(im, start[0], start[1],
00304                                                        radius, red);
00305       }
00306     }
00307   }
00308 }
00309
00310
00311 int GenSynthMatches::WriteData(string file) const
00312 {
00313   ofstream of(file.c_str());
00314   if (!of){
00315     BIASERR("error opening "<<file);
00316     return -1;
00317   }
00318   of << *this;
00319   if (!of){
00320     BIASERR("error writing to "<<file);
00321     return -1;
00322   }
00323   of.close();
00324   return 0;
00325 }
00326
00327 // hack to disabled unreachabel warning
00328 #if defined(WIN32)
00329 #  pragma warning(push)
00330 #  pragma warning(disable : 4702)
00331 #endif
00332 int GenSynthMatches::ReadData(string file)
00333 {
00334   ifstream of(file.c_str());
00335   if (!of){
00336     BIASERR("error opening "<<file);
00337     return -1;
00338   }
00339   BIASERR("unfinished");
00340
00341   ////  of >> *this;
00342   //if (!of){
00343   //  BIASERR("error reading from "<<file);
00344   //  return -1;
00345   //}
00346   //of.close();
00347
00348   BIASABORT;
00349   return -1;
00350 }
00351 #if defined(WIN32)
00352 #  pragma warning(pop)
00353 #endif
00354
00355
00356 void GenSynthMatches::Reset()
00357 {
00358   MatchDataBase::Reset();
00359   _rand.Reset();
00360
00361   // clear K, R, C and P
00362   //_K.SetZero();
00363   //_Ki.SetZero();
00364   _GT_R.clear();
00365   //_R.clear();
00366   _GT_C.clear();
00367   //_C.clear();
00368   _GT_P.clear();
00369   //_P.clear();
00370
00371   // now clear the 3D data points
00372   _StaticPoints.clear();
00373   _MovingPoints.clear();
00374
00375   // transformation for moving points
00376   _MovingTransform.clear();
00377
00378   // now clear 2D points
00379   _GT_Points.clear();
00380   //_Points.clear();
00381   _GT_NormalizedPoints.clear();
00382   //_NormalizedPoints.clear();
00383
00384 }
00385
00386 void GenSynthMatches::GetGTR(int imNo, RMatrixBase& R) const
00387 { R = _GT_R[imNo]; }
00388 void GenSynthMatches::GetGTR(std::vector<RMatrixBase>& R) const
00389 { R = _GT_R; }
00390
00391 void GenSynthMatches::GetGTC(int imNo, HomgPoint3D& C) const
00392 { C = _GT_C[imNo]; }
00393 void GenSynthMatches::GetGTC(std::vector<HomgPoint3D>& C) const
00394 { C = _GT_C; }
00395
00396 void GenSynthMatches::GetGTP(int imNo, PMatrixBase& P) const
00397 { P = _GT_P[imNo]; }
00398 void GenSynthMatches::GetGTP(std::vector<PMatrixBase>& P) const
00399 { P = _GT_P; }
00400
00401 void GenSynthMatches::GetGTPoints(int imNo, std::vector<HomgPoint2D>& p) const
00402 { p = _GT_Points[imNo]; }
00403 void GenSynthMatches::GetGTPoints(std::vector<std::vector<HomgPoint2D> >& p) const
00404 { p = _GT_Points; }
00405
00406 void GenSynthMatches::GetGTNormalizedPoints(int imNo, std::vector<HomgPoint2D>& p) const
00407 { p = _GT_NormalizedPoints[imNo]; }
00408 void GenSynthMatches::GetGTNormalizedPoints(std::vector<std::vector<HomgPoint2D> >& p) const
00409 { p = _GT_NormalizedPoints; }
00410
00411 void GenSynthMatches::Get3DPoints(std::vector<HomgPoint3D>& p) const
00412 {
00413   p = _StaticPoints;
00414 }
00415
00416 void GenSynthMatches::GetInliers(std::vector<bool>& inl) const
00417 {
00418   inl.resize(*_NumPoints);
00419   for (int i=0; i<*_NumStaticPoints; i++) inl[i]=true;
00420   for (int i=*_NumStaticPoints; i<*_NumPoints; i++)  inl[i]=false;
00421 }
00422
00423 /** A moving 3D point X_i is generated for image i from 3D Point X using the
00424     euclidean transform E_i=[R_i | T_i]:
00425     X_i = E_i * X
00426     It projects into the image point x_i with the according projection matrix
00427     P_i=[r_i'|-r_i'C_i] (where ' denotes transposition):
00428     x_i = P_i * X_i
00429
00430     Finding a projection matrix P_x where each 3D point from image i-1
00431     projects onto the same 2D points goes as follows:
00432     x_i = P_x X_{i-1}
00433
00434     First take the 3D point and move it to ist new poition in image i. This is
00435     done by first applying the inverse E_{i-1} and then E_i:
00436     X_i = E_i * E_{i-1}^{-1} * X_{i-1}
00437     Now use the old projection matrix P_i.
00438     x_i = P_i * E_i * E_{i-1}^{-1} * X_{i-1}
00439
00440     The new projection matrix P_x is composed as follows:
00441     P_x = P_i * E_i * E_{i-1}^{-1}
00442         = [r_i'|-r_i'C_i] * [R_i | T_i] * [R_{i-1} | T_{i-1}]^{-1}
00443         = [r_i'|-r_i'C_i] * [R_i | T_i] * [R_{i-1}' | -R_{i-1}'T_{i-1}]
00444         = [r_i'|-r_i'C_i] * [R_i R_{i-1}' | T_i - R_i R_{i-1}'T_{i-1}]
00445         = [r_i' R_i R_{i-1}' | -r_i'C_i + r_i'(T_i - R_i R_{i-1}'T_{i-1})]
00446         = [r_i' R_i R_{i-1}' | -r_i'C_i + r_i'T_i - r_i'R_i R_{i-1}'T_{i-1}]
00447         = [r_i'R_iR_{i-1}' | -r_i'R_iR_{i-1}'R_{i-1}R_i'C_i + r_i'R_iR_{i-1}'R_{i-1}R_i'T_i - r_i'R_i R_{i-1}'T_{i-1}]
00448         = [r_i'R_iR_{i-1}' | -r_i'R_iR_{i-1}'(T_{i-1}+R_{i-1}R_i'(C_i-T_i))]
00449     setting R_x' = r_i'R_iR_{i-1}' is aequivalent to R_x = R_{i-1} R_i' r_i
00450     setting C_x = T_{i-1} + R_{i-1} R_i' (C_i - T_i)
00451     and leads to
00452         = [ R_x' | -R_x' C_x ]
00453     @author woelk 08/2004 */
00454 void
00455 GenSynthMatches::GetGTNormalizedF(std::vector<std::vector<FMatrixBase> >& F) const
00456 {
00457   Vector3<double> C1, C2, cc1, cc2;
00458   RMatrixBase R1, R2, R, r1, r2;
00459   int idx;
00460
00461   //cerr << "resizing F with newsize "<<*_NumMovingObjects+1<<endl;
00462   F.resize(*_NumImages-1);
00463   for (int i=1; i<*_NumImages; i++){
00464     //cerr << "resizing F["<<i<<"] with newsize "<<*_NumMovingObjects+1<<endl;
00465     F[i-1].resize(*_NumMovingObjects+1);
00466
00467     _GT_C[i-1].GetEuclidian(C1);
00468     _GT_C[i].GetEuclidian(C2);
00469     BIASCDOUT(GSM_FMATRIX, "\n------------------------------------------\n\n");
00470     BIASCDOUT(GSM_FMATRIX, "C1: "<<C1<<"R1: "<<_GT_R[i-1]<<endl);
00471     BIASCDOUT(GSM_FMATRIX, "C2: "<<C2<<"R2: "<<_GT_R[i]<<endl);
00472     F[i-1][0].Compose(_GT_R[i-1], C1, _GT_R[i], C2);
00473     BIASCDOUT(GSM_FMATRIX, "F from image "<<i-1<<" to "<<i
00474               <<" for static objects is "<<F[i-1][0]<<endl);
00475 #ifdef BIAS_DEBUG
00476       if (DebugLevelIsSet(GSM_FMATRIX)){
00477         for (int k=0; k<*_NumStaticPoints; k++){
00478           BIASCDOUT(GSM_FMATRIX, setw(5)<<k<<"  p2^T * F * p1 = "
00479                     <<(F[i-1][0]*_GT_NormalizedPoints[i-1][k]).
00480                     ScalarProduct(_GT_NormalizedPoints[i][k])
00481                     <<"\t"<<_GT_NormalizedPoints[i-1][k]<<"  "
00482                     <<_GT_NormalizedPoints[i][k]<<endl);
00483         }
00484       }
00485 #endif
00486
00487     for (int l=0; l<*_NumMovingObjects; l++){
00488       _GT_C[i-1].GetEuclidian(C1);
00489       R1=_GT_R[i-1];
00490       BIASCDOUT(GSM_FMATRIX, "\n------\n\nC1: "<<C1<<"R1: "<<R1<<endl);
00491
00492       idx=l * *_NumMovingObjects + i-1;
00493       cc1.Set((*_MovingObjMotionVecX)[idx], (*_MovingObjMotionVecY)[idx],
00494               (*_MovingObjMotionVecZ)[idx]);
00495       r1.SetXYZ((*_MovingObjRotVecX)[idx], (*_MovingObjRotVecY)[idx],
00496                (*_MovingObjRotVecZ)[idx]);
00497
00498       idx=l * *_NumMovingObjects + i;
00499       cc2.Set((*_MovingObjMotionVecX)[idx], (*_MovingObjMotionVecY)[idx],
00500               (*_MovingObjMotionVecZ)[idx]);
00501       _GT_C[i].GetEuclidian(C2);
00502       r2.SetXYZ((*_MovingObjRotVecX)[idx], (*_MovingObjRotVecY)[idx],
00503                 (*_MovingObjRotVecZ)[idx]);
00504       r1.Mult(r2.Transpose(), R);
00505       R.Mult((C2-cc2), C2);
00506       C2+=cc1;
00507       //      C2=cc1+r1*r2.Transpose()*(C2-cc2);
00508       R=_GT_R[i];
00509       R2=r1*r2.Transpose()*R;
00510
00511       BIASCDOUT(GSM_FMATRIX, "C2: "<<C2<<"R2: "<<R2<<endl);
00512
00513       F[i-1][l+1].Compose(R1, C1, R2, C2);
00514       BIASCDOUT(GSM_FMATRIX, "F from image "<<i-1<<" to "<<i<<" for "<<l
00515                 <<"th objects is "<<F[i-1][l+1]<<endl);
00516 #ifdef BIAS_DEBUG
00517       if (DebugLevelIsSet(GSM_FMATRIX)){
00518         for (int k=*_NumStaticPoints + *_NumOutliers + l * *_NumMovingPoints;
00519              k<*_NumStaticPoints + *_NumOutliers + (l+1) * *_NumMovingPoints;
00520              k++){
00521           BIASCDOUT(GSM_FMATRIX, setw(5)<<k<<"  p2^T * F * p1 = "
00522                     <<(F[i-1][l+1]*_GT_NormalizedPoints[i-1][k]).
00523                     ScalarProduct(_GT_NormalizedPoints[i][k])
00524                     <<"\t"<<_GT_NormalizedPoints[i-1][k]<<"  "
00525                     <<_GT_NormalizedPoints[i][k]<<endl);
00526         }
00527       }
00528 #endif
00529     }
00530   }
00531 }
00532
00533 int GenSynthMatches::Write(const std::string& fname) const
00534 {
00535   return MatchDataBase::Write(fname);
00536 }
00537
00538 int GenSynthMatches::Write(ostream& os) const
00539 {
00540   BIASCDOUT(D_MD_IO, "using GenSynthMatches::Write(ostream)\n");
00541   int res=MatchDataBase::Write(os);
00542   if (res==0){
00543     os.write((char*)_NumStaticPoints, sizeof(int));
00544     os.write((char*)_NumOutliers, sizeof(int));
00545     os.write((char*)_ImWidth, sizeof(int));
00546     os.write((char*)_ImHeight, sizeof(int));
00547     os.write((char*)_FocalLength, sizeof(double));
00548     os.write((char*)_PrinciplePointX, sizeof(double));
00549     os.write((char*)_PrinciplePointY, sizeof(double));
00550     os.write((char*)_SigmaImagePoints, sizeof(double));
00551     os.write((char*)_MaxDispOutliers, sizeof(double));
00552     os.write((char*)_OutlDirChange, sizeof(double));
00553     os.write((char*)_OutlLengthChange, sizeof(double));
00554     os.write((char*)_SigmaCamCenterX, sizeof(double));
00555     os.write((char*)_SigmaCamCenterY, sizeof(double));
00556     os.write((char*)_SigmaCamCenterZ, sizeof(double));
00557     os.write((char*)_SigmaCamRotX, sizeof(double));
00558     os.write((char*)_SigmaCamRotY, sizeof(double));
00559     os.write((char*)_SigmaCamRotZ, sizeof(double));
00560     os.write((char*)_MinCamDistance, sizeof(double));
00561     os.write((char*)_MaxCamDistance, sizeof(double));
00562     os.write((char*)_UserGivenP, sizeof(bool));
00563     os.write((char*)_OverallMotionX, sizeof(double));
00564     os.write((char*)_OverallMotionY, sizeof(double));
00565     os.write((char*)_OverallMotionZ, sizeof(double));
00566     os.write((char*)_OverallRotX, sizeof(double));
00567     os.write((char*)_OverallRotY, sizeof(double));
00568     os.write((char*)_OverallRotZ, sizeof(double));
00569     os.write((char*)_NumMovingPoints, sizeof(int));
00570     os.write((char*)_NumMovingObjects, sizeof(int));
00571
00572     for (int i=0; i<*_NumMovingObjects; i++){
00573       os.write((char*)&(*_SizeMovingObjX)[i], sizeof(double));
00574       os.write((char*)&(*_SizeMovingObjY)[i], sizeof(double));
00575       os.write((char*)&(*_SizeMovingObjZ)[i], sizeof(double));
00576     }
00577
00578     for (int i=0; i<*_NumStaticPoints; i++){
00579       os.write((char*)_StaticPoints[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00580     }
00581     for (int i=0; i<*_NumMovingPoints * *_NumMovingObjects; i++){
00582       os.write((char*)_MovingPoints[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00583     }
00584
00585     for (int i=0; i<*_NumImages; i++){
00586       os.write((char*)&(*_MotionVecX)[i], sizeof(double));
00587       os.write((char*)&(*_MotionVecY)[i], sizeof(double));
00588       os.write((char*)&(*_MotionVecZ)[i], sizeof(double));
00589       os.write((char*)&(*_RotVecX)[i], sizeof(double));
00590       os.write((char*)&(*_RotVecY)[i], sizeof(double));
00591       os.write((char*)&(*_RotVecZ)[i], sizeof(double));
00592       for (int k=0; k<*_NumMovingObjects; k++){
00593         int idx=k * *_NumImages + i;
00594         os.write((char*)&(*_MovingObjMotionVecX)[idx], sizeof(double));
00595         os.write((char*)&(*_MovingObjMotionVecY)[idx], sizeof(double));
00596         os.write((char*)&(*_MovingObjMotionVecZ)[idx], sizeof(double));
00597         os.write((char*)&(*_MovingObjRotVecX)[idx], sizeof(double));
00598         os.write((char*)&(*_MovingObjRotVecY)[idx], sizeof(double));
00599         os.write((char*)&(*_MovingObjRotVecZ)[idx], sizeof(double));
00600       }
00601       os.write((char*)_GT_R[i].GetData(), sizeof(ROTATION_MATRIX_TYPE)*9);
00602       os.write((char*)_GT_C[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00603       for (int k=0; k<*_NumMovingObjects; k++){
00604         int idx=k * *_NumImages + i;
00605         os.write((char*)_MovingTransform[idx].GetData(), sizeof(double)*16);
00606       }
00607
00608     }
00609     // write outlier
00610     for (int i=0; i<*_NumImages; i++){
00611       for (int k=*_NumStaticPoints; k<*_NumStaticPoints+*_NumOutliers; k++){
00612         os.write((char*)_GT_Points[i][k].GetData(),sizeof(HOMGPOINT2D_TYPE)*3);
00613       }
00614     }
00615
00616     if (!os) res=-3;
00617   }
00618   return res;
00619 }
00620
00621 int GenSynthMatches::Read(const string& fname)
00622 {
00623   return MatchDataBase::Read(fname);
00624 }
00625
00626 int GenSynthMatches::Read(istream & is)
00627 {
00628   BIASCDOUT(D_MD_IO, "using GenSynthMatches::Read(ostream)\n");
00629   int res = MatchDataBase::Read(is);
00630   if (res==0){
00631     is.read((char*)_NumStaticPoints, sizeof(int));
00632     is.read((char*)_NumOutliers, sizeof(int));
00633     is.read((char*)_ImWidth, sizeof(int));
00634     is.read((char*)_ImHeight, sizeof(int));
00635     is.read((char*)_FocalLength, sizeof(double));
00636     is.read((char*)_PrinciplePointX, sizeof(double));
00637     is.read((char*)_PrinciplePointY, sizeof(double));
00638     is.read((char*)_SigmaImagePoints, sizeof(double));
00639     is.read((char*)_MaxDispOutliers, sizeof(double));
00640     is.read((char*)_OutlDirChange, sizeof(double));
00641     is.read((char*)_OutlLengthChange, sizeof(double));
00642     is.read((char*)_SigmaCamCenterX, sizeof(double));
00643     is.read((char*)_SigmaCamCenterY, sizeof(double));
00644     is.read((char*)_SigmaCamCenterZ, sizeof(double));
00645     is.read((char*)_SigmaCamRotX, sizeof(double));
00646     is.read((char*)_SigmaCamRotY, sizeof(double));
00647     is.read((char*)_SigmaCamRotZ, sizeof(double));
00648     is.read((char*)_MinCamDistance, sizeof(double));
00649     is.read((char*)_MaxCamDistance, sizeof(double));
00650     is.read((char*)_UserGivenP, sizeof(bool));
00651     is.read((char*)_OverallMotionX, sizeof(double));
00652     is.read((char*)_OverallMotionY, sizeof(double));
00653     is.read((char*)_OverallMotionZ, sizeof(double));
00654     is.read((char*)_OverallRotX, sizeof(double));
00655     is.read((char*)_OverallRotY, sizeof(double));
00656     is.read((char*)_OverallRotZ, sizeof(double));
00657     is.read((char*)_NumMovingPoints, sizeof(int));
00658     is.read((char*)_NumMovingObjects, sizeof(int));
00659     _SizeMovingObjX->newsize(*_NumMovingObjects);
00660     _SizeMovingObjY->newsize(*_NumMovingObjects);
00661     _SizeMovingObjZ->newsize(*_NumMovingObjects);
00662     for (int i=0; i<*_NumMovingObjects; i++){
00663       is.read((char*)&(*_SizeMovingObjX)[i], sizeof(double));
00664       is.read((char*)&(*_SizeMovingObjY)[i], sizeof(double));
00665       is.read((char*)&(*_SizeMovingObjZ)[i], sizeof(double));
00666     }
00667
00668     _StaticPoints.resize(*_NumStaticPoints);
00669     for (int i=0; i<*_NumStaticPoints; i++){
00670       is.read((char*)_StaticPoints[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00671     }
00672     _MovingPoints.resize(*_NumMovingPoints * *_NumMovingObjects);
00673     for (int i=0; i<*_NumMovingPoints * *_NumMovingObjects; i++){
00674       is.read((char*)_MovingPoints[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00675     }
00676
00677     _MotionVecX->newsize(*_NumImages);
00678     _MotionVecY->newsize(*_NumImages);
00679     _MotionVecZ->newsize(*_NumImages);
00680     _RotVecX->newsize(*_NumImages);
00681     _RotVecY->newsize(*_NumImages);
00682     _RotVecZ->newsize(*_NumImages);
00683     _MovingObjMotionVecX->newsize(*_NumImages * *_NumMovingObjects);
00684     _MovingObjMotionVecY->newsize(*_NumImages * *_NumMovingObjects);
00685     _MovingObjMotionVecZ->newsize(*_NumImages * *_NumMovingObjects);
00686     _MovingObjRotVecX->newsize(*_NumImages * *_NumMovingObjects);
00687     _MovingObjRotVecY->newsize(*_NumImages * *_NumMovingObjects);
00688     _MovingObjRotVecZ->newsize(*_NumImages * *_NumMovingObjects);
00689     _GT_R.resize(*_NumImages);
00690     _GT_C.resize(*_NumImages);
00691     _GT_P.resize(*_NumImages);
00692     _GT_Points.resize(*_NumImages);
00693     _GT_NormalizedPoints.resize(*_NumImages);
00694     _MovingTransform.resize(*_NumImages * *_NumMovingObjects);
00695
00696     for (int i=0; i<*_NumImages; i++){
00697       is.read((char*)&(*_MotionVecX)[i], sizeof(double));
00698       is.read((char*)&(*_MotionVecY)[i], sizeof(double));
00699       is.read((char*)&(*_MotionVecZ)[i], sizeof(double));
00700       is.read((char*)&(*_RotVecX)[i], sizeof(double));
00701       is.read((char*)&(*_RotVecY)[i], sizeof(double));
00702       is.read((char*)&(*_RotVecZ)[i], sizeof(double));
00703       for (int k=0; k<*_NumMovingObjects; k++){
00704         int idx=k * *_NumImages + i;
00705         is.read((char*)&(*_MovingObjMotionVecX)[idx], sizeof(double));
00706         is.read((char*)&(*_MovingObjMotionVecY)[idx], sizeof(double));
00707         is.read((char*)&(*_MovingObjMotionVecZ)[idx], sizeof(double));
00708         is.read((char*)&(*_MovingObjRotVecX)[idx], sizeof(double));
00709         is.read((char*)&(*_MovingObjRotVecY)[idx], sizeof(double));
00710         is.read((char*)&(*_MovingObjRotVecZ)[idx], sizeof(double));
00711       }
00712
00713       is.read((char*)_GT_R[i].GetData(), sizeof(ROTATION_MATRIX_TYPE)*9);
00714       is.read((char*)_GT_C[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00715       _GT_P[i].Compose(_K, _GT_R[i], _GT_C[i]);
00716       for (int k=0; k<*_NumMovingObjects; k++){
00717         int idx=k * *_NumImages + i;
00718         is.read((char*)_MovingTransform[idx].GetData(), sizeof(double)*16);
00719       }
00720     }
00721     _CreateStaticGT2DPoints();
00722     _CreateMovingGT2DPoints();
00723     // read outlier
00724     for (int i=0; i<*_NumImages; i++){
00725       for (int k=*_NumStaticPoints; k<*_NumStaticPoints+*_NumOutliers; k++){
00726         is.read((char*)_GT_Points[i][k].GetData(),sizeof(HOMGPOINT2D_TYPE)*3);
00727         _GT_NormalizedPoints[i][k]=_Ki*_GT_Points[i][k];
00728       }
00729     }
00730     if (!is) res=-3;
00731   }
00732   return res;
00733 }
00734
00735 void GenSynthMatches::_CreateCamMovement()
00736 {
00737   _K[0][0]=_K[1][1]=*_FocalLength;
00738   _K[2][2]=1.0;
00739   _K[0][2]=*_PrinciplePointX;
00740   _K[1][2]=*_PrinciplePointY;
00741
00742   _Ki=_K.Invert();
00743
00744   _GT_R.resize(*_NumImages);
00745   _R.resize(*_NumImages);
00746   _GT_C.resize(*_NumImages);
00747   _C.resize(*_NumImages);
00748   _GT_P.resize(*_NumImages);
00749   _P.resize(*_NumImages);
00750
00751   HomgPoint3D C, nC;
00752   RMatrixBase R, nR;
00753   for (int i=0; i<*_NumImages; i++){
00754      if (*_UserGivenP){
00755       BIASASSERT((int)_MotionVecX->Size()>=*_NumImages);
00756       BIASASSERT((int)_MotionVecY->Size()>=*_NumImages);
00757       BIASASSERT((int)_MotionVecZ->Size()>=*_NumImages);
00758       BIASASSERT((int)_RotVecX->Size()>=*_NumImages);
00759       BIASASSERT((int)_RotVecY->Size()>=*_NumImages);
00760       BIASASSERT((int)_RotVecZ->Size()>=*_NumImages);
00761       C.Set((*_MotionVecX)[i], (*_MotionVecY)[i], (*_MotionVecZ)[i], 1.0);
00762       nC.Set(C[0]+_rand.GetNormalDistributed(0.0, *_SigmaCamCenterX),
00763              C[1]+_rand.GetNormalDistributed(0.0, *_SigmaCamCenterY),
00764              C[2]+_rand.GetNormalDistributed(0.0, *_SigmaCamCenterZ),
00765              1.0);
00766       R.SetXYZ((*_RotVecX)[i], (*_RotVecY)[i], (*_RotVecZ)[i]);
00767       nR.SetXYZ((*_RotVecX)[i]+_rand.GetNormalDistributed(0.0,*_SigmaCamRotX),
00768                 (*_RotVecY)[i]+_rand.GetNormalDistributed(0.0,*_SigmaCamRotY),
00769                 (*_RotVecZ)[i]+_rand.GetNormalDistributed(0.0,*_SigmaCamRotZ));
00770     } else { // if (*_UserGivenP){
00771       BIASERR("unfinished");
00772     } // if (*_UserGivenP){
00773
00774     _GT_R[i]=R;
00775     _R[i]=nR;
00776     _GT_C[i]=C;
00777     _C[i]=nC;
00778     _GT_P[i].Compose(_K, _GT_R[i], _GT_C[i]);
00779     _P[i].Compose(_K, _R[i], _C[i]);
00780 #ifdef BIAS_DEBUG
00781     BIASCDOUT(GSM_CAM_MOTION, "_K: "<<_K<<endl);
00782     BIASCDOUT(GSM_CAM_MOTION, "_Ki: "<<_Ki<<endl);
00783     if (DebugLevelIsSet(GSM_CAM_MOTION)){
00784       Vector3<double> r, nr;
00785       _GT_R[i].GetRotationAnglesXYZ(r[0], r[1], r[2]);
00786       _R[i].GetRotationAnglesXYZ(nr[0], nr[1], nr[2]);
00787       BIASCDOUT(GSM_CAM_MOTION, "_GT_R["<<i<<"] = "<<r<<endl);
00788       BIASCDOUT(GSM_CAM_MOTION, "_R["<<i<<"] = "<<nr<<endl);
00789       BIASCDOUT(GSM_CAM_MOTION, "_GT_C["<<i<<"] = "<<_GT_C[i]<<endl);
00790       BIASCDOUT(GSM_CAM_MOTION, "_C["<<i<<"] = "<<_C[i]<<endl);
00791       BIASCDOUT(GSM_CAM_MOTION, "_GT_P["<<i<<"] = "<<_GT_P[i]<<endl);
00792       BIASCDOUT(GSM_CAM_MOTION, "_P["<<i<<"] = "<<_P[i]<<endl);
00793     }
00794 #endif
00795   }
00796 }
00797
00798 void GenSynthMatches::_CreateMovingTransforms()
00799 {
00800   _MovingTransform.resize(*_NumImages * *_NumMovingObjects);
00801   if (*_NumMovingObjects>0 && *_NumMovingPoints>0){
00802     Vector3<double> r, t;
00803     const int ni=*_NumImages;
00804     int ofs, idx;
00805     for (int n=0; n<*_NumMovingObjects; n++){
00806       BIASCDOUT(GSM_MOVIN_TRANSF, n<<"th moving object\n");
00807       ofs = ni*n;
00808       for (int k=0; k<ni; k++){
00809         idx=ofs+k;
00810         t[0]=(*_MovingObjMotionVecX)[idx];
00811         t[1]=(*_MovingObjMotionVecY)[idx];
00812         t[2]=(*_MovingObjMotionVecZ)[idx];
00813         r[0]=(*_MovingObjRotVecX)[idx];
00814         r[1]=(*_MovingObjRotVecY)[idx];
00815         r[2]=(*_MovingObjRotVecZ)[idx];
00816         _MovingTransform[idx].SetXYZ(r, t);
00817         BIASCDOUT(GSM_MOVIN_TRANSF, idx<<"th moving transf: "
00818                   <<_MovingTransform[idx]<<endl);
00819       }
00820     }
00821   }
00822 }
00823
00824
00825 int GenSynthMatches::_CreateStatic3DPoints()
00826 {
00827   double minx, maxx, miny, maxy, minz, maxz;
00828   // explanation of var names
00829   // 1. character: f/l - belonging first/last P Matrix
00830   // 2. character: n/f - near/far clippingplane
00831   // 3. character: u/l - upper/lower image corner
00832   // 4. character: r/l - left/right image corner
00833   // points in array are stored in this order
00834   // p3d[0]=fnul, p3d[1]=fnur, p3d[2]=fnll, p3d[3]=fnlr, p3d[4]=fful,
00835   // p3d[5]=ffur, p3d[6]=ffll, p3d[7]=fflr, p3d[8]=lnul, p3d[9]=lnur,
00836   // p3d[10]=lnll, p3d[11]=lnlr, p3d[12]=lful, p3d[13]=lfur, p3d[14]=lfll,
00837   // p3d[15]=lflr;
00838   HomgPoint3D p3d[16];
00839   HomgPoint3D fC, lC;
00840   fC=_GT_C[0];
00841   lC=_GT_C[*_NumImages-1];
00842   PMatrix fP, lP;
00843   fP=_GT_P[0];
00844   lP=_GT_P[*_NumImages-1];
00845
00846   // now calculate the volume seen by at minimum one camera
00847   // backproject the image corners into space and apply min/max depth
00848   Vector3<double> ray;
00849   HomgPoint2D ul(0.0, 0.0), ur(*_ImWidth-1.0, 0.0),
00850     ll(0.0, *_ImHeight-1.0), lr(*_ImWidth-1.0, *_ImHeight-1.0);
00851
00852   fP.BackprojectWorldCoo(ul, *_MinCamDistance, p3d[0]);
00853   fP.BackprojectWorldCoo(ur, *_MinCamDistance, p3d[1]);
00854   fP.BackprojectWorldCoo(ll, *_MinCamDistance, p3d[2]);
00855   fP.BackprojectWorldCoo(lr, *_MinCamDistance, p3d[3]);
00856   fP.BackprojectWorldCoo(ul, *_MaxCamDistance, p3d[4]);
00857   fP.BackprojectWorldCoo(ur, *_MaxCamDistance, p3d[5]);
00858   fP.BackprojectWorldCoo(ll, *_MaxCamDistance, p3d[6]);
00859   fP.BackprojectWorldCoo(lr, *_MaxCamDistance, p3d[7]);
00860
00861   lP.BackprojectWorldCoo(ul, *_MinCamDistance, p3d[8]);
00862   lP.BackprojectWorldCoo(ur, *_MinCamDistance, p3d[9]);
00863   lP.BackprojectWorldCoo(ll, *_MinCamDistance, p3d[10]);
00864   lP.BackprojectWorldCoo(lr, *_MinCamDistance, p3d[11]);
00865   lP.BackprojectWorldCoo(ul, *_MaxCamDistance, p3d[12]);
00866   lP.BackprojectWorldCoo(ur, *_MaxCamDistance, p3d[13]);
00867   lP.BackprojectWorldCoo(ll, *_MaxCamDistance, p3d[14]);
00868   lP.BackprojectWorldCoo(lr, *_MaxCamDistance, p3d[15]);
00869
00870   minx=miny=minz=DBL_MAX;
00871   maxx=maxy=maxz=-DBL_MAX;
00872   for (int j=0; j<16; j++){
00873     BIASCDOUT(GSM_VIEWINGVOL, "p3d["<<j<<"] = "<<p3d[j]<<endl);
00874     if (p3d[j][0]<minx) minx=p3d[j][0];
00875     if (p3d[j][0]>maxx) maxx=p3d[j][0];
00876     if (p3d[j][1]<miny) miny=p3d[j][1];
00877     if (p3d[j][1]>maxy) maxy=p3d[j][1];
00878     if (p3d[j][2]<minz) minz=p3d[j][2];
00879     if (p3d[j][2]>maxz) maxz=p3d[j][2];
00880   }
00881   BIASCDOUT(GSM_VIEWINGVOL, "Generating 3D point between ["<<minx<<", "
00882             <<miny<<", "<<minz<<"] and ["<<maxx<<", "<<maxy<<", "<<maxz
00883             <<"]\n");
00884
00885   // generate static points
00886   HomgPoint3D p;
00887   HomgPoint2D p2d, np2d;
00888   int i=0, mtry;
00889   bool is_seen=true, seen_in_k=false;
00890   _StaticPoints.resize(*_NumStaticPoints);
00891   while(i<*_NumStaticPoints){
00892     mtry=0;
00893     do {
00894       is_seen=true;
00895       p.Set(_rand.GetUniformDistributed(minx, maxx),
00896             _rand.GetUniformDistributed(miny, maxy),
00897             _rand.GetUniformDistributed(minz, maxz));
00898       for (int k=0; k<*_NumImages; k++){
00899         p2d=_GT_P[k]*p;
00900         np2d=_P[k]*p;
00901         // 99 % of all noisy points lie with *_SigmaImagePoints * 2.6 distance
00902         // of true image points
00903         seen_in_k = (_IsSeen(p2d, *_SigmaImagePoints * 2.6) &&
00904                      _IsSeen(np2d, *_SigmaImagePoints * 2.6));
00905         is_seen=is_seen && seen_in_k;
00906         if (!seen_in_k) {
00907           BIASCDOUT(GSM_3D_POINTS, p<<" not seen in P["<<k<<"] : "<<p2d
00908                     <<"/"<<np2d<<"\n");
00909           break;
00910         }
00911       }
00912       if (mtry>1000){
00913         for (int k=0; k<*_NumImages; k++){
00914           cerr << "_P["<<k<<"]: "<<_P[k]<<endl;
00915           cerr << "_GT_P["<<k<<"]: "<<_GT_P[k]<<endl;
00916         }
00917         cerr << "tried to generate 3D points between ["<<minx<<", "<<miny
00918              <<", "<<minz<<"] and ["<<maxx<<", "<<maxy<<", "<<maxz<<"]\n";
00919         BIASERR("more than 1000 tries for one 3D point, maybe no common "
00920                 <<"viewing volume present");
00921         return -1;
00922       }
00923       mtry++;
00924     } while (!is_seen);
00925     _StaticPoints[i]=p;
00926     BIASCDOUT(GSM_3D_POINTS, i<<"th true 3D point: "<<_StaticPoints[i]<<endl);
00927     i++;
00928   }
00929   return 0;
00930 }
00931
00932 int GenSynthMatches::_AreMovingObjectsVisible()
00933 {
00934   if (*_NumMovingPoints>0 && *_NumMovingObjects>0){
00935     HomgPoint3D corner[8], p3d;
00936     HomgPoint2D p2d, np2d;
00937     bool seen_in_k=true, any_seen_in_k=false;
00938     double r1, r2, r3;
00939
00940     for (int i=0; i<*_NumMovingObjects; i++){
00941       corner[0][3]=corner[1][3]=corner[2][3]=corner[3][3]=1.0;
00942       corner[4][3]=corner[5][3]=corner[6][3]=corner[7][3]=1.0;
00943
00944       corner[0][2]=corner[1][2]=corner[2][2]=corner[3][2]=
00945         (*_SizeMovingObjZ)[i]/2.0;
00946       corner[4][2]=corner[5][2]=corner[6][2]=corner[7][2]=
00947         -(*_SizeMovingObjZ)[i]/2.0;
00948
00949       corner[0][1]=corner[1][1]=corner[4][1]=corner[5][1]=
00950         (*_SizeMovingObjY)[i]/2.0;
00951       corner[2][1]=corner[3][1]=corner[6][1]=corner[7][1]=
00952         -(*_SizeMovingObjY)[i]/2.0;
00953
00954       corner[0][0]=corner[3][0]=corner[4][0]=corner[7][0]=
00955         (*_SizeMovingObjX)[i]/2.0;
00956       corner[1][0]=corner[2][0]=corner[5][0]=corner[6][0]=
00957         -(*_SizeMovingObjX)[i]/2.0;
00958
00959       for (int k=0; k<*_NumImages; k++){
00960         int idx = i * *_NumImages + k;
00961         // check if center of moving object is visible
00962         for (int l=0; l<8; l++){
00963           //cerr <<setw(3)<<l<<"  "<<corner[l]<<endl;
00964           p3d=_MovingTransform[idx]*corner[l];
00965           p2d=_GT_P[k]*p3d;
00966           np2d=_P[k]*p3d;
00967           seen_in_k = _IsSeen(p2d) && _IsSeen(np2d);
00968           any_seen_in_k = any_seen_in_k || seen_in_k;
00969         }
00970         if (!any_seen_in_k){
00971           cerr << "_MovingTransform["<<idx<<"]: "<<_MovingTransform[idx]
00972                <<endl;
00973           cerr << "_P["<<k<<"]: "<<_P[k]<<endl;
00974           cerr << "_GT_P["<<k<<"]: "<<_GT_P[k]<<endl;
00975           cerr << "_R["<<k<<"]: "<<_R[k]<<endl;
00976           _R[k].GetRotationAnglesXYZ(r1, r2, r3);
00977           cerr <<"rotation angles of _R["<<k<<"]: "<<r1<<"\t"<< r2<<"\t"
00978                <<r3<<endl;
00979           cerr << "_GT_R["<<k<<"]: "<<_GT_R[k]<<endl;
00980           cerr << "_C["<<k<<"]: "<<_C[k]<<endl;
00981           cerr << "_GT_C["<<k<<"]: "<<_GT_C[k]<<endl;
00982           cerr << "corners: "<<endl;
00983           for (int l=0; l<8; l++){
00984             p3d=_MovingTransform[idx]*corner[l];
00985             p2d=_GT_P[k]*p3d;
00986             np2d=_P[k]*p3d;
00987             cerr <<setw(3)<<l<<" corn: "<<corner[l]<<"\tp3d: "<<p3d<<"\tp2d: "
00988                  <<p2d<<"\tnp2d: "<<np2d<<endl;
00989           }
00990           BIASERR("no corner of moving object not seen in image "<<k);
00991           return -1;
00992         }
00993         // check if center is visible
00994         p3d.Set(0.0, 0.0, 0.0);
00995         p3d=_MovingTransform[idx]*p3d;
00996         p2d=_GT_P[k]*p3d;
00997         np2d=_P[k]*p3d;
00998         seen_in_k = _IsSeen(p2d) && _IsSeen(np2d);
00999         if (!seen_in_k){
01000           cerr << "_MovingTransform["<<idx<<"]: "<<_MovingTransform[idx]<<endl;
01001           cerr << "_P["<<k<<"]: "<<_P[k]<<endl;
01002           cerr << "_GT_P["<<k<<"]: "<<_GT_P[k]<<endl;
01003           cerr << "_R["<<k<<"]: "<<_R[k]<<endl;
01004           _R[k].GetRotationAnglesXYZ(r1, r2, r3);
01005           cerr <<"rotation angles of _R["<<k<<"]: "<<r1<<"\t"<< r2<<"\t"
01006                <<r3<<endl;
01007           cerr << "_GT_R["<<k<<"]: "<<_GT_R[k]<<endl;
01008           cerr << "_C["<<k<<"]: "<<_C[k]<<endl;
01009           cerr << "_GT_C["<<k<<"]: "<<_GT_C[k]<<endl;
01010           BIASERR("center of moving object not seen in image "<<k<<"  center "
01011                   <<p3d<<"  p2d: "<<p2d<<"  np2d: "<<np2d);
01012           return -2;
01013         }
01014       }
01015     }
01016   }
01017   return 0;
01018
01019 }
01020
01021
01022 int GenSynthMatches::_CreateMoving3DPoints()
01023 {
01024   _MovingPoints.resize(*_NumMovingPoints * *_NumMovingObjects);
01025   double x2, y2, z2;
01026
01027   HomgPoint2D p2d, np2d;
01028   HomgPoint3D p3d;
01029   bool seen_in_all=true, seen_in_k=true;
01030   int mpi;
01031
01032   if (_AreMovingObjectsVisible()!=0) return -1;
01033
01034   for (int l=0; l<*_NumMovingObjects; l++){
01035     x2=(*_SizeMovingObjX)[l]/2.0;
01036     y2=(*_SizeMovingObjY)[l]/2.0;
01037     z2=(*_SizeMovingObjZ)[l]/2.0;
01038     for (int i=0; i<*_NumMovingPoints; i++){
01039       mpi=i + l* *_NumMovingPoints;
01040       do {
01041         seen_in_all=true;
01042         _MovingPoints[mpi].Set(_rand.GetUniformDistributed(-x2, x2),
01043                                _rand.GetUniformDistributed(-y2, y2),
01044                                _rand.GetUniformDistributed(-z2, z2), 1.0);
01045         for (int k=0; k<*_NumImages; k++){
01046           p3d=_MovingTransform[l* *_NumImages + k]*_MovingPoints[mpi];
01047           p2d=_GT_P[k]*p3d;
01048           np2d=_P[k]*p3d;
01049           seen_in_k = _IsSeen(p2d) && _IsSeen(np2d);
01050           if (!seen_in_k){
01051             BIASCDOUT(GSM_3D_POINTS, p3d<<" moving point not seen in k "
01052                       <<p2d<<"/"<<np2d<<endl);
01053             break;
01054           }
01055         }
01056         seen_in_all = seen_in_k && seen_in_all;
01057       } while (!seen_in_all);
01058       BIASCDOUT(GSM_3D_POINTS, mpi<<"th moving 3D point : "
01059                 <<_MovingPoints[mpi]<<endl);
01060     }
01061   }
01062   return 0;
01063 }
01064
01065 void GenSynthMatches::_CreateStatic2DPoints()
01066 {
01067   _CreateStaticGT2DPoints();
01068   std::vector<HomgPoint2D> empty(*_NumStaticPoints +
01069                                  *_NumMovingPoints * *_NumMovingObjects
01070                                  + *_NumOutliers);
01071   _Points.assign(*_NumImages, empty);
01072   _NormalizedPoints.assign(*_NumImages, empty);
01073
01074   BIASCDOUT(GSM_NOISE, "Static2D: "<<*_SigmaImagePoints<<endl);
01075
01076   HomgPoint2D noise;
01077   for (int k=0; k<*_NumImages; k++){
01078     for (int i=0; i<*_NumStaticPoints; i++){
01079       _Points[k][i]=_P[k]*_StaticPoints[i];
01080       _Points[k][i].Homogenize();
01081       noise.Set(_rand.GetNormalDistributed(0.0, *_SigmaImagePoints),
01082                 _rand.GetNormalDistributed(0.0, *_SigmaImagePoints), 0.0);
01083       BIASCDOUT(GSM_NOISE, "s2d: "<<noise << endl);
01084       _Points[k][i]+=noise;
01085       _NormalizedPoints[k][i]=_Ki*_Points[k][i];
01086       if (!_IsSeen(_Points[k][i])){
01087         BIASERR("static point "<<i<<"<< not seen in image "<<k<<" : "
01088                 <<_Points[k][i]);
01089       }
01090     }
01091   }
01092 #ifdef BIASDEBUG
01093   if (DebugLevelIsSet(GSM_2D_MATCHES)){
01094     for (int i=0; i<*_NumStaticPoints; i++){
01095       BIASCDOUT(GSM_2D_MATCHES, "match "<<i<<" :  ");
01096       for (int k=0; k<*_NumImages; k++){
01097         BIASCDOUT(GSM_2D_MATCHES, k<<":"<<_GT_Points[k][i]<<"/"
01098                   <<_Points[k][i]<<"/"<<_GT_NormalizedPoints[k][i]<<"/"
01099                   <<_NormalizedPoints[k][i]<<"    ");
01100       }
01101       BIASCDOUT(GSM_2D_MATCHES, endl);
01102     }
01103   }
01104 #endif
01105 }
01106
01107 void GenSynthMatches::_CreateStaticGT2DPoints()
01108 {
01109   std::vector<HomgPoint2D> empty(*_NumStaticPoints
01110                                  + *_NumMovingPoints * *_NumMovingObjects +
01111                                  *_NumOutliers);
01112   _GT_Points.assign(*_NumImages, empty);
01113   _GT_NormalizedPoints.assign(*_NumImages, empty);
01114
01115   for (int k=0; k<*_NumImages; k++){
01116     for (int i=0; i<*_NumStaticPoints; i++){
01117       _GT_Points[k][i]=_GT_P[k]*_StaticPoints[i];
01118       _GT_Points[k][i].Homogenize();
01119       _GT_NormalizedPoints[k][i]=_Ki*_GT_Points[k][i];
01120       if (!_IsSeen(_GT_Points[k][i])){
01121         BIASERR("static GT point "<<i<<"<< not seen in image "<<k<<" : "
01122                 <<_GT_Points[k][i]);
01123       }
01124     }
01125   }
01126 }
01127
01128 void GenSynthMatches::_AddUniformDistributedOutliers()
01129 {
01130   BIASCDOUT(GSM_NOISE, "AddOutlier: "<<*_SigmaImagePoints<<endl);
01131   HomgPoint2D noise, outldisp;
01132   bool seen_from_all=true, seen_in_k=true;
01133   RMatrixBase R;
01134   for (int i=*_NumStaticPoints; i<*_NumStaticPoints+*_NumOutliers; i++){
01135     do {
01136       seen_from_all=true;
01137       _GT_Points[0][i].Set(_rand.GetUniformDistributed(0.0, *_ImWidth-1.0),
01138                         _rand.GetUniformDistributed(0.0, *_ImHeight-1.0), 1.0);
01139       noise.Set(_rand.GetNormalDistributed(0.0, *_SigmaImagePoints),
01140                 _rand.GetNormalDistributed(0.0, *_SigmaImagePoints), 0.0);
01141       BIASCDOUT(GSM_NOISE, "outl: "<<noise << endl);
01142       _Points[0][i]=_GT_Points[0][i]+noise;
01143       _GT_NormalizedPoints[0][i]=_Ki*_GT_Points[0][i];
01144       _NormalizedPoints[0][i]=_Ki*_Points[0][i];
01145       seen_in_k = _IsSeen(_GT_Points[0][i]) && _IsSeen(_Points[0][i]);
01146       seen_from_all = seen_from_all && seen_in_k;
01147       // first match determines direction
01148       outldisp.Set(_rand.GetUniformDistributed(-*_MaxDispOutliers,
01149                                                *_MaxDispOutliers),
01150                    _rand.GetUniformDistributed(-*_MaxDispOutliers,
01151                                                *_MaxDispOutliers), 0.0);
01152       _GT_Points[1][i]=_GT_Points[0][i]+outldisp;
01153       noise.Set(_rand.GetNormalDistributed(0.0, *_SigmaImagePoints),
01154                 _rand.GetNormalDistributed(0.0, *_SigmaImagePoints), 0.0);
01155       BIASCDOUT(GSM_NOISE, "outl: "<<noise << endl);
01156       _Points[1][i]=_GT_Points[1][i]+noise;
01157       _GT_NormalizedPoints[1][i]=_Ki*_GT_Points[1][i];
01158       _NormalizedPoints[1][i]=_Ki*_Points[1][i];
01159       seen_in_k = _IsSeen(_GT_Points[1][i]) && _IsSeen(_Points[1][i]);
01160       seen_from_all = seen_from_all && seen_in_k;
01161       // direction is taken from last match
01162       for (int k=2; k<*_NumImages; k++){
01163         R.SetXYZ(0.0, 0.0, _rand.GetNormalDistributed(0.0,*_OutlDirChange));
01164         outldisp=R*outldisp;
01165         outldisp*=_rand.GetNormalDistributed(1.0,*_OutlLengthChange);
01166         _GT_Points[k][i]=_GT_Points[k-1][i]+outldisp;
01167         noise.Set(_rand.GetNormalDistributed(0.0, *_SigmaImagePoints),
01168                   _rand.GetNormalDistributed(0.0, *_SigmaImagePoints), 0.0);
01169         BIASCDOUT(GSM_NOISE, "outl: "<<noise << endl);
01170         _Points[k][i]=_GT_Points[k][i]+noise;
01171         _GT_NormalizedPoints[k][i]=_Ki*_GT_Points[k][i];
01172         _NormalizedPoints[k][i]=_Ki*_Points[k][i];
01173         seen_in_k = _IsSeen(_GT_Points[k][i]) && _IsSeen(_Points[k][i]);
01174         seen_from_all = seen_from_all && seen_in_k;
01175         if (!seen_from_all) break;
01176       }
01177     } while (!seen_from_all);
01178   }
01179
01180 #ifdef BIASDEBUG
01181   if (DebugLevelIsSet(GSM_2D_MATCHES)){
01182     for (int i=*_NumStaticPoints; i<*_NumStaticPoints+*_NumOutliers; i++){
01183       BIASCDOUT(GSM_2D_MATCHES, "match "<<i<<" :  ");
01184       for (int k=0; k<*_NumImages; k++){
01185         BIASCDOUT(GSM_2D_MATCHES, k<<":"<<_GT_Points[k][i]<<"/"
01186                   <<_Points[k][i]<<"/"<<_GT_NormalizedPoints[k][i]<<"/"
01187                   <<_NormalizedPoints[k][i]<<"    ");
01188       }
01189       BIASCDOUT(GSM_2D_MATCHES, endl);
01190     }
01191   }
01192 #endif
01193 }
01194
01195
01196 void GenSynthMatches::_CreateMoving2DPoints()
01197 {
01198   if ((int)_GT_Points.size()!=*_NumImages ||
01199       (int)_GT_Points[0].size()!=*_NumStaticPoints+*_NumOutliers+
01200       *_NumMovingPoints * *_NumMovingObjects){
01201     BIASERR("internal data structs not allocated call "
01202             <<"_CreateStatic2DPoints() first ");
01203     BIASABORT;
01204   }
01205
01206   _CreateMovingGT2DPoints();
01207
01208   BIASCDOUT(GSM_NOISE, "Moving2D: "<<*_SigmaImagePoints<<endl);
01209
01210   HomgPoint2D noise;
01211   HomgPoint3D p3d;
01212   for (int l=0; l<*_NumMovingObjects; l++){
01213     int offset=*_NumStaticPoints+*_NumOutliers + l * *_NumMovingPoints;
01214     BIASCDOUT(GSM_MOVIN_3D_POINTS, "object "<<l<<endl);
01215     for (int k=0; k<*_NumImages; k++){
01216       int idx=l* *_NumImages + k;
01217       for (int i=offset; i<offset+*_NumMovingPoints; i++){
01218         p3d=_MovingTransform[idx]*_MovingPoints[i-offset+l* *_NumMovingPoints];
01219         BIASCDOUT(GSM_MOVIN_3D_POINTS, "using moving transf "<<idx
01220                   <<" and _MovingPoints["<<i-offset+l * *_NumMovingPoints
01221                   <<"] to create point in image "<<k<<"\n");
01222         _Points[k][i]=_P[k]*p3d;
01223         _Points[k][i].Homogenize();
01224         noise.Set(_rand.GetNormalDistributed(0.0, *_SigmaImagePoints),
01225                   _rand.GetNormalDistributed(0.0, *_SigmaImagePoints), 0.0);
01226         BIASCDOUT(GSM_NOISE, "m2d: "<<noise << endl);
01227         _Points[k][i]+=noise;
01228         BIASCDOUT(GSM_MOVIN_3D_POINTS, "moving 3d point "<<i<<" "<<p3d
01229                   <<"\t "<<_Points[k][i]<<endl);
01230         _NormalizedPoints[k][i]=_Ki*_Points[k][i];
01231         if (!_IsSeen(_Points[k][i])){
01232           BIASERR("moving point "<<i<<"<< not seen in image "<<k<<" : "
01233                   <<_Points[k][i]);
01234         }
01235       }
01236     }
01237   }
01238 }
01239
01240 void GenSynthMatches::_CreateMovingGT2DPoints()
01241 {
01242   if ((int)_GT_Points.size()!=*_NumImages ||
01243       (int)_GT_Points[0].size()!=*_NumStaticPoints+*_NumOutliers+
01244       *_NumMovingPoints * *_NumMovingObjects){
01245     BIASERR("internal data structs not allocated call "
01246             <<"_CreateStatic2DPoints() first ");
01247     BIASABORT;
01248   }
01249
01250   HomgPoint3D p3d;
01251   for (int l=0; l<*_NumMovingObjects; l++){
01252     int offset=*_NumStaticPoints + *_NumOutliers + l * *_NumMovingPoints;
01253     BIASCDOUT(GSM_MOVIN_3D_POINTS, "object "<<l<<endl);
01254     for (int k=0; k<*_NumImages; k++){
01255       int idx=l * *_NumImages + k;
01256       for (int i=offset; i<offset+*_NumMovingPoints; i++){
01257         p3d=_MovingTransform[idx]*_MovingPoints[i-offset+l* *_NumMovingPoints];
01258         BIASCDOUT(GSM_MOVIN_3D_POINTS, "using moving transf "<<idx
01259                   <<" and _MovingPoints["<<i-offset+l * *_NumMovingPoints
01260                   <<"] to create point in image "<<k<<"\n");
01261         _GT_Points[k][i]=_GT_P[k]*p3d;
01262         _GT_Points[k][i].Homogenize();
01263         BIASCDOUT(GSM_MOVIN_3D_POINTS, "moving 3d point "<<i<<" "<<p3d
01264                   <<"\t "<<_GT_Points[k][i]<<endl);
01265
01266         _GT_NormalizedPoints[k][i]=_Ki*_GT_Points[k][i];
01267         if (!_IsSeen(_GT_Points[k][i])){
01268           BIASERR("moving point "<<i<<"<< not seen in image "<<k<<" : "
01269                   <<_GT_Points[k][i]);
01270         }
01271       }
01272     }
01273   }
01274   BIASCDOUT(GSM_MOVIN_3D_POINTS, endl);
01275 }
01276
01277
01278 void GenSynthMatches::_AddParameter(Param &para)
01279 {
01280   ////////////////////////////////////////////////////////////
01281   //         PGNum
01282   ///////////////////////////////////////////////////////////
01283
01284   int grp;
01285   //  para.ShowData();
01286   if (para.CheckParam("NumImages")){
01287     grp=para.GetGroupID("NumImages");
01288   } else {
01289     grp=para.GetFreeGroupID();
01290   }
01291   //  cerr << "GenSynthMatches: using ID "<<grp<<" for group num\n";
01292
01293   if (para.CheckParam("NumStaticPoints")){
01294     _NumStaticPoints=para.GetParamInt("NumStaticPoints");
01295   } else {
01296     _NumStaticPoints=para.AddParamInt("NumStaticPoints", "number of true matches", 10, 0, INT_MAX, 0, grp);
01297   }
01298
01299   if (para.CheckParam("NumOutliers")){
01300     _NumOutliers=para.GetParamInt("NumOutliers");
01301   } else {
01302     _NumOutliers=para.AddParamInt("NumOutliers", "number of outliers", 10, 0, INT_MAX, 0, grp);
01303   }
01304
01305   if (para.CheckParam("ImWidth")){
01306     _ImWidth=para.GetParamInt("ImWidth");
01307   } else {
01308     _ImWidth=para.AddParamInt("ImWidth", "image width", 640, 0, INT_MAX, 0, grp);
01309   }
01310
01311   if (para.CheckParam("ImHeight")){
01312     _ImHeight=para.GetParamInt("ImHeight");
01313   } else {
01314     _ImHeight=para.AddParamInt("ImHeight", "image height", 480, 0, INT_MAX, 0, grp);
01315   }
01316
01317   if (para.CheckParam("NumMovingPoints")){
01318     _NumMovingPoints=para.GetParamInt("NumMovingPoints");
01319   } else {
01320     _NumMovingPoints=para.AddParamInt("NumMovingPoints", "number of moving points", 10, 0, INT_MAX, 0, grp);
01321   }
01322
01323   if (para.CheckParam("NumMovingObjects")){
01324     _NumMovingObjects=para.GetParamInt("NumMovingObjects");
01325   } else {
01326     _NumMovingObjects=para.AddParamInt("NumMovingObjects", "number of moving objects", 1, 0, INT_MAX, 0, grp);
01327   }
01328
01329   if (para.IsUsedGroupID(grp))
01330     para.SetGroupName(grp, "numbers");
01331
01332   ////////////////////////////////////////////////////////////
01333   //         PGMotion
01334   ///////////////////////////////////////////////////////////
01335
01336   grp=para.GetFreeGroupID();
01337   //cerr << "using ID "<<grp<<" for group motion\n";
01338
01339   if (para.CheckParam("FocalLength")){
01340     _FocalLength=para.GetParamDouble("FocalLength");
01341   } else {
01342     _FocalLength=para.AddParamDouble("FocalLength", "focal length in pixel", 840.0, 0.0, DBL_MAX, 0, grp);
01343   }
01344
01345   if (para.CheckParam("PrinciplePointX")){
01346     _PrinciplePointX=para.GetParamDouble("PrinciplePointX");
01347   } else {
01348     _PrinciplePointX=para.AddParamDouble("PrinciplePointX", "x component of principle point", 320.0, 0.0, DBL_MAX, 0, grp);
01349   }
01350
01351   if (para.CheckParam("PrinciplePointY")){
01352     _PrinciplePointY=para.GetParamDouble("PrinciplePointY");
01353   } else {
01354     _PrinciplePointY=para.AddParamDouble("PrinciplePointY", "y component of principle point", 240.0, 0.0, DBL_MAX, 0, grp);
01355   }
01356
01357   if (para.CheckParam("OverallMotionX")){
01358     _OverallMotionX=para.GetParamDouble("OverallMotionX");
01359   } else {
01360     _OverallMotionX=para.AddParamDouble("OverallMotionX", "motion in x direction", -1.0, -DBL_MAX, DBL_MAX, 0, grp);
01361   }
01362
01363   if (para.CheckParam("OverallMotionY")){
01364     _OverallMotionY=para.GetParamDouble("OverallMotionY");
01365   } else {
01366     _OverallMotionY=para.AddParamDouble("OverallMotionY", "motion in y direction", 0.0, -DBL_MAX, DBL_MAX, 0, grp);
01367   }
01368
01369   if (para.CheckParam("OverallMotionZ")){
01370     _OverallMotionZ=para.GetParamDouble("OverallMotionZ");
01371   } else {
01372     _OverallMotionZ=para.AddParamDouble("OverallMotionZ", "motion in z direction", 10.0, -DBL_MAX, DBL_MAX, 0, grp);
01373   }
01374
01375   if (para.CheckParam("OverallRotX")){
01376     _OverallRotX=para.GetParamDouble("OverallRotX");
01377   } else {
01378     _OverallRotX=para.AddParamDouble("OverallRotX", "rotation around x axis", 0.0, -DBL_MAX, DBL_MAX, 0, grp);
01379   }
01380
01381   if (para.CheckParam("OverallRotY")){
01382     _OverallRotY=para.GetParamDouble("OverallRotY");
01383   } else {
01384     _OverallRotY=para.AddParamDouble("OverallRotY", "rotation around y axis", 0.5, -DBL_MAX, DBL_MAX, 0, grp);
01385   }
01386
01387   if (para.CheckParam("OverallRotZ")){
01388     _OverallRotZ=para.GetParamDouble("OverallRotZ");
01389   } else {
01390     _OverallRotZ=para.AddParamDouble("OverallRotZ", "rotation around z axis", 0.0, -DBL_MAX, DBL_MAX, 0, grp);
01391   }
01392
01393   if (para.CheckParam("UserGivenP")){
01394     _UserGivenP=para.GetParamBool("UserGivenP");
01395   } else {
01396     _UserGivenP=para.AddParamBool("UserGivenP", "if true use MotionVec? and RotVec?, if false use Overall? ", true, 0, grp);
01397   }
01398
01399   Vector<double> dflt;
01400   dflt.newsize(2);
01401   dflt[0]=0.0; dflt[1]=-0.1;
01402   if (para.CheckParam("MotionVecX")){
01403     _MotionVecX=para.GetParamVecDbl("MotionVecX");
01404   } else {
01405     _MotionVecX=para.AddParamVecDbl("MotionVecX", "vector of x components of camera centers", dflt, 0, grp);
01406   }
01407
01408   dflt[0]=0.0; dflt[1]=0.0;
01409   if (para.CheckParam("MotionVecY")){
01410     _MotionVecY=para.GetParamVecDbl("MotionVecY");
01411   } else {
01412     _MotionVecY=para.AddParamVecDbl("MotionVecY", "vector of y components of camera centers", dflt, 0, grp);
01413   }
01414
01415   dflt[0]=0.0; dflt[1]=1.0;
01416   if (para.CheckParam("MotionVecZ")){
01417     _MotionVecZ=para.GetParamVecDbl("MotionVecZ");
01418   } else {
01419     _MotionVecZ=para.AddParamVecDbl("MotionVecZ", "vector of z components of camera centers", dflt, 0, grp);
01420   }
01421
01422   dflt[0]=0.0; dflt[1]=0.0;
01423   if (para.CheckParam("RotVecX")){
01424     _RotVecX=para.GetParamVecDbl("RotVecX");
01425   } else {
01426     _RotVecX=para.AddParamVecDbl("RotVecX", "vector of rotation around x-axis", dflt, 0, grp);
01427   }
01428
01429   dflt[0]=0.0; dflt[1]=-0.1;
01430   if (para.CheckParam("RotVecY")){
01431     _RotVecY=para.GetParamVecDbl("RotVecY");
01432   } else {
01433     _RotVecY=para.AddParamVecDbl("RotVecY", "vector of rotation around y-axis", dflt, 0, grp);
01434   }
01435
01436   dflt[0]=0.0; dflt[1]=0.0;
01437   if (para.CheckParam("RotVecZ")){
01438     _RotVecZ=para.GetParamVecDbl("RotVecZ");
01439   } else {
01440     _RotVecZ=para.AddParamVecDbl("RotVecZ", "vector of rotation around z-axis", dflt, 0, grp);
01441   }
01442
01443   if (para.IsUsedGroupID(grp))
01444     para.SetGroupName(grp, "cam motion");
01445
01446   ////////////////////////////////////////////////////////////
01447   //         PGNoise
01448   ///////////////////////////////////////////////////////////
01449
01450   grp=para.GetFreeGroupID();
01451   //cerr << "using ID "<<grp<<" for group noise\n";
01452
01453   if (para.CheckParam("SigmaImagePoints")){
01454     _SigmaImagePoints=para.GetParamDouble("SigmaImagePoints");
01455   } else {
01456     _SigmaImagePoints=para.AddParamDouble("SigmaImagePoints", "sigma of normal distribution in image", 1.0, 0.0, DBL_MAX, 0, grp);
01457   }
01458
01459   if (para.CheckParam("MaxDispOutliers")){
01460     _MaxDispOutliers=para.GetParamDouble("MaxDispOutliers");
01461   } else {
01462     _MaxDispOutliers=para.AddParamDouble("MaxDispOutliers", "max allowed flow for outliers", 25.0, 0.0, DBL_MAX, 0, grp);
01463   }
01464
01465   if (para.CheckParam("SigmaCamCenterX")){
01466     _SigmaCamCenterX=para.GetParamDouble("SigmaCamCenterX");
01467   } else {
01468     _SigmaCamCenterX=para.AddParamDouble("SigmaCamCenterX", "sigma of normal distributed noise of cam centers", 0.1, 0.0, DBL_MAX, 0, grp);
01469   }
01470
01471   if (para.CheckParam("SigmaCamCenterY")){
01472     _SigmaCamCenterY=para.GetParamDouble("SigmaCamCenterY");
01473   } else {
01474     _SigmaCamCenterY=para.AddParamDouble("SigmaCamCenterY", "sigma of normal distributed noise of cam centers", 0.1, 0.0, DBL_MAX, 0, grp);
01475   }
01476
01477   if (para.CheckParam("SigmaCamCenterZ")){
01478     _SigmaCamCenterZ=para.GetParamDouble("SigmaCamCenterZ");
01479   } else {
01480     _SigmaCamCenterZ=para.AddParamDouble("SigmaCamCenterZ", "sigma of normal distributed noise of cam centers", 0.1, 0.0, DBL_MAX, 0, grp);
01481   }
01482
01483   if (para.CheckParam("SigmaCamRotX")){
01484     _SigmaCamRotX=para.GetParamDouble("SigmaCamRotX");
01485   } else {
01486     _SigmaCamRotX=para.AddParamDouble("SigmaCamRotX", "sigma of normal distributed noise of cam rotation", 0.01, 0.0, DBL_MAX, 0, grp);
01487   }
01488
01489   if (para.CheckParam("SigmaCamRotY")){
01490     _SigmaCamRotY=para.GetParamDouble("SigmaCamRotY");
01491   } else {
01492     _SigmaCamRotY=para.AddParamDouble("SigmaCamRotY", "sigma of normal distributed noise of cam rotation", 0.01, 0.0, DBL_MAX, 0, grp);
01493   }
01494
01495   if (para.CheckParam("SigmaCamRotZ")){
01496     _SigmaCamRotZ=para.GetParamDouble("SigmaCamRotZ");
01497   } else {
01498     _SigmaCamRotZ=para.AddParamDouble("SigmaCamRotZ", "sigma of normal distributed noise of cam rotation", 0.01, 0.0, DBL_MAX, 0, grp);
01499   }
01500
01501   if (para.CheckParam("MinCamDistance")){
01502     _MinCamDistance=para.GetParamDouble("MinCamDistance");
01503   } else {
01504     _MinCamDistance=para.AddParamDouble("MinCamDistance", "minimal distance a point must have to every camera", 1.0, 0.0, DBL_MAX, 0, grp);
01505   }
01506
01507   if (para.CheckParam("MaxCamDistance")){
01508     _MaxCamDistance=para.GetParamDouble("MaxCamDistance");
01509   } else {
01510     _MaxCamDistance=para.AddParamDouble("MaxCamDistance", "maximal distance a point can have to every camera", 50.0, 0.0, DBL_MAX, 0, grp);
01511   }
01512
01513   if (para.CheckParam("OutlDirChange")){
01514     _OutlDirChange=para.GetParamDouble("OutlDirChange");
01515   } else {
01516     _OutlDirChange=para.AddParamDouble("OutlDirChange", "maximal change of direction for outlying matches (RAD)", 0.05, -M_PI, M_PI, 0, grp);
01517   }
01518
01519   if (para.CheckParam("OutlLengthChange")){
01520     _OutlLengthChange=para.GetParamDouble("OutlLengthChange");
01521   } else {
01522     _OutlLengthChange=para.AddParamDouble("OutlLengthChange", "maximal change of length for outlying matches", 0.05, -1.0, 1.0, 0, grp);
01523   }
01524
01525   if (para.IsUsedGroupID(grp))
01526     para.SetGroupName(grp, "noise");
01527
01528   ////////////////////////////////////////////////////////////
01529   //         PGMovObj
01530   ///////////////////////////////////////////////////////////
01531
01532   grp=para.GetFreeGroupID();
01533   //cerr << "using ID "<<grp<<" for group moving objects\n";
01534   Vector<double> sizedflt;
01535   sizedflt.newsize(2);
01536   sizedflt[0]=5.0; sizedflt[1]=5.0;
01537   if (para.CheckParam("SizeMovingObjX")){
01538     _SizeMovingObjX=para.GetParamVecDbl("SizeMovingObjX");
01539   } else {
01540     _SizeMovingObjX=para.AddParamVecDbl("SizeMovingObjX", "x size of moving object", sizedflt, 0, grp);
01541   }
01542   sizedflt[0]=1.5; sizedflt[1]=1.5;
01543   if (para.CheckParam("SizeMovingObjY")){
01544     _SizeMovingObjY=para.GetParamVecDbl("SizeMovingObjY");
01545   } else {
01546     _SizeMovingObjY=para.AddParamVecDbl("SizeMovingObjY", "y size of moving object", sizedflt, 0, grp);
01547   }
01548   sizedflt[0]=2.0; sizedflt[1]=2.0;
01549   if (para.CheckParam("SizeMovingObjZ")){
01550     _SizeMovingObjZ=para.GetParamVecDbl("SizeMovingObjZ");
01551   } else {
01552     _SizeMovingObjZ=para.AddParamVecDbl("SizeMovingObjZ", "z size of moving object", sizedflt, 0, grp);
01553   }
01554
01555   dflt.newsize(4);
01556   dflt[0]=10.0; dflt[1]=10.5; dflt[2]=0.0; dflt[3]=-1.0;
01557   if (para.CheckParam("MovingObjMotionVecX")){
01558     _MovingObjMotionVecX=para.GetParamVecDbl("MovingObjMotionVecX");
01559   } else {
01560     _MovingObjMotionVecX=para.AddParamVecDbl("MovingObjMotionVecX", "vector of x components of moving object centers", dflt, 0, grp);
01561   }
01562
01563   dflt[0]=0.0; dflt[1]=0.0; dflt[2]=1.5; dflt[3]=1.5;
01564   if (para.CheckParam("MovingObjMotionVecY")){
01565     _MovingObjMotionVecY=para.GetParamVecDbl("MovingObjMotionVecY");
01566   } else {
01567     _MovingObjMotionVecY=para.AddParamVecDbl("MovingObjMotionVecY", "vector of y components of moving object centers", dflt, 0, grp);
01568   }
01569
01570   dflt[0]=20.0; dflt[1]=20.0; dflt[2]=18.0; dflt[3]=18.0;
01571   if (para.CheckParam("MovingObjMotionVecZ")){
01572     _MovingObjMotionVecZ=para.GetParamVecDbl("MovingObjMotionVecZ");
01573   } else {
01574     _MovingObjMotionVecZ=para.AddParamVecDbl("MovingObjMotionVecZ", "vector of z components of moving object centers", dflt, 0, grp);
01575   }
01576
01577   dflt[0]=0.0; dflt[1]=0.0; dflt[2]=0.0; dflt[3]=0.0;
01578   if (para.CheckParam("MovingObjRotVecX")){
01579     _MovingObjRotVecX=para.GetParamVecDbl("MovingObjRotVecX");
01580   } else {
01581     _MovingObjRotVecX=para.AddParamVecDbl("MovingObjRotVecX", "vector of rotation of moving object around x-axis", dflt, 0, grp);
01582   }
01583
01584   dflt[0]=0.0; dflt[1]=-0.1; dflt[2]=0.0; dflt[3]=0.1;
01585   if (para.CheckParam("MovingObjRotVecY")){
01586     _MovingObjRotVecY=para.GetParamVecDbl("MovingObjRotVecY");
01587   } else {
01588     _MovingObjRotVecY=para.AddParamVecDbl("MovingObjRotVecY", "vector of rotation of moving object around y-axis", dflt, 0, grp);
01589   }
01590
01591   dflt[0]=0.0; dflt[1]=0.0; dflt[2]=0.0; dflt[3]=0.0;
01592   if (para.CheckParam("MovingObjRotVecZ")){
01593     _MovingObjRotVecZ=para.GetParamVecDbl("MovingObjRotVecZ");
01594   } else {
01595     _MovingObjRotVecZ=para.AddParamVecDbl("MovingObjRotVecZ", "vector of rotation of moving object around z-axis", dflt, 0, grp);
01596   }
01597
01598   if (para.IsUsedGroupID(grp))
01599     para.SetGroupName(grp, "moving objects");
01600
01601 }
01602
01603 bool GenSynthMatches::_CheckParams() const
01604 {
01605   if (*_NumPoints!=*_NumStaticPoints+*_NumOutliers+
01606       *_NumMovingPoints * *_NumMovingObjects){
01607     BIASERR("inconsistent parameter (number of points), correcting");
01608     *_NumPoints = *_NumStaticPoints+*_NumOutliers+
01609       *_NumMovingPoints * *_NumMovingObjects;
01610     //    BIASABORT;
01611     return false;
01612   }
01613   if (*_NumMovingObjects>_SizeMovingObjX->size() ||
01614       *_NumMovingObjects>_SizeMovingObjY->size() ||
01615       *_NumMovingObjects>_SizeMovingObjZ->size()){
01616     BIASERR("inconsistent parameter (NumMovingObjects and SizeMovingObj?)"
01617             <<*_NumMovingObjects<<" "<<_SizeMovingObjX->size()
01618             <<" "<<_SizeMovingObjY->size()<<" "<<_SizeMovingObjZ->size());
01619     BIASABORT;
01620     //return false;
01621   }
01622   int n=*_NumMovingObjects**_NumImages;
01623   if (n>_MovingObjMotionVecX->size() ||
01624       n>_MovingObjMotionVecY->size() ||
01625       n>_MovingObjMotionVecZ->size() ||
01626       n>_MovingObjRotVecX->size() ||
01627       n>_MovingObjRotVecY->size() ||
01628       n>_MovingObjRotVecZ->size()){
01629     BIASERR("inconsistent parameter (NumMovingObjects, NumImages and MovingObj*Vec?)");
01630     BIASABORT;
01631     //return false;
01632   }
01633   if ((int)_MotionVecX->Size()<*_NumImages ||
01634       (int)_MotionVecY->Size()<*_NumImages ||
01635       (int)_MotionVecZ->Size()<*_NumImages ||
01636       (int)_RotVecX->Size()<*_NumImages ||
01637       (int)_RotVecY->Size()<*_NumImages ||
01638       (int)_RotVecZ->Size()<*_NumImages){
01639     BIASERR("MotionVec? and RotVec? must be of size NumImages");
01640     BIASABORT;
01641     //return false;
01642   }
01643
01644   return true;
01645 }
01646
01647
01648 GenSynthMatches &GenSynthMatches::operator=(const MatchDataBase& mdb)
01649 {
01650   ((MatchDataBase)(*this))=mdb;
01651
01652   _GT_R=_R;
01653   _GT_C=_C;
01654   _GT_P=_P;
01655   _MovingTransform.resize(0);
01656   _StaticPoints.resize(0);
01657   _MovingPoints.resize(0);
01658   *_NumStaticPoints=*_NumOutliers=*_ImWidth=*_ImHeight=0;
01659   *_FocalLength=*_PrinciplePointX=*_PrinciplePointY=0.0;
01660
01661   *_SigmaImagePoints=*_MaxDispOutliers=*_OutlDirChange=*_OutlLengthChange=*_SigmaCamCenterX=*_SigmaCamCenterY=*_SigmaCamCenterZ=*_SigmaCamRotX=*_SigmaCamRotY=*_SigmaCamRotZ=*_MinCamDistance=*_MaxCamDistance=0.0;
01662
01663   *_UserGivenP=true;
01664
01665   _MotionVecX->newsize(0);
01666   _MotionVecY->newsize(0);
01667   _MotionVecZ->newsize(0);
01668   _RotVecX->newsize(0);
01669   _RotVecY->newsize(0);
01670   _RotVecZ->newsize(0);
01671   _MovingObjMotionVecX->newsize(0);
01672   _MovingObjMotionVecY->newsize(0);
01673   _MovingObjMotionVecZ->newsize(0);
01674   _MovingObjRotVecX->newsize(0);
01675   _MovingObjRotVecY->newsize(0);
01676   _MovingObjRotVecZ->newsize(0);
01677
01678   *_OverallMotionX=*_OverallMotionY=*_OverallMotionZ=*_OverallRotX=*_OverallRotY=*_OverallRotZ=0.0;
01679
01680
01681    *_NumMovingPoints=*_NumMovingObjects=0;
01682    _SizeMovingObjX->newsize(0);
01683    _SizeMovingObjY->newsize(0);
01684    _SizeMovingObjZ->newsize(0);
01685
01686    _Points.resize(0);
01687    _NormalizedPoints.resize(0);
01688
01689    return *this;
01690 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/GenSynthMatches.hh Source File

Utils

GenSynthMatches.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __GenSynthMatches_hh__
00026 #define __GenSynthMatches_hh__
00027
00028 #include <bias_config.h>
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031
00032 #include <iostream>
00033 #include <string>
00034 #include <vector>
00035
00036 #include <Base/Image/Image.hh>
00037 #include <Base/Geometry/HomgPoint2D.hh>
00038 #include <Base/Geometry/HomgPoint3D.hh>
00039 #include <Base/Geometry/KMatrix.hh>
00040 #include <Base/Geometry/FMatrixBase.hh>
00041 #include <Base/Geometry/EuclideanTransf3D.hh>
00042 #include <Base/Geometry/RMatrixBase.hh>
00043 #include <Base/Geometry/PMatrixBase.hh>
00044 #include <Utils/Param.hh>
00045 #include <Base/Math/Random.hh>
00046 #include "MatchDataBase.hh"
00047
00048
00049 namespace BIAS{
00050
00051 #define GSM_CAM_MOTION      0x00010000
00052 #define GSM_VIEWINGVOL      0x00020000
00053 #define GSM_3D_POINTS       0x00040000
00054 #define GSM_2D_MATCHES      0x00080000
00055 #define GSM_MOVIN_TRANSF    0x00100000
00056 #define GSM_MOVIN_3D_POINTS 0x00200000
00057 #define GSM_FMATRIX         0x00400000
00058 #define GSM_NOISE           0x00800000
00059
00060   /** @class GenSynthMatches
00061       @ingroup g_utils
00062       @brief class for generating synthetic matches
00063       @author woelk 2004 */
00064   class BIASUtils_EXPORT GenSynthMatches : public MatchDataBase
00065   {
00066   public:
00067     GenSynthMatches(Param &para);
00068     virtual ~GenSynthMatches();
00069
00070     // clears all internal vectors and resets K and Ki
00071     // also resets _rand
00072     void Reset();
00073
00074     // returns negative value, if error occurs, 0 on success
00075     int CreateMatches();
00076
00077     void DrawTrue(Image<unsigned char>& im, int minindex=0,
00078                   int maxindex=1) const;
00079     void DrawNoisy(Image<unsigned char>& im, int minindex=0,
00080                    int maxindex=1) const;
00081
00082     /// write in ascii file format
00083     int WriteData(std::string file) const;
00084     /// read in ascii file format
00085     int ReadData(std::string file);
00086
00087     /// binary read
00088     int Read(const std::string& fname);
00089     /// binary read
00090     virtual int Read(std::istream& is);
00091
00092     /// binary write
00093     int Write(const std::string& fname) const;
00094     /// binary write
00095     virtual int Write(std::ostream& os) const;
00096
00097     /// R = _GT_R[imNo];
00098     void GetGTR(int imNo, RMatrixBase& R) const;
00099     void GetGTR(std::vector<RMatrixBase>& R) const;
00100
00101     /// C = _GT_C[imNo];
00102     void GetGTC(int imNo, HomgPoint3D& C) const;
00103     void GetGTC(std::vector<HomgPoint3D>& C) const;
00104
00105     /// P = _GT_P[imNo];
00106     void GetGTP(int imNo, PMatrixBase& P) const;
00107     void GetGTP(std::vector<PMatrixBase>& P) const;
00108
00109     /// p = _GT_Points[imNo];
00110     void GetGTPoints(int imNo, std::vector<HomgPoint2D>& p) const;
00111     void GetGTPoints(std::vector<std::vector<HomgPoint2D> >& p) const;
00112
00113     /// p = _GT_NormalizedPoints[imNo];
00114     void GetGTNormalizedPoints(int imNo, std::vector<HomgPoint2D>& p) const;
00115     void GetGTNormalizedPoints(std::vector<std::vector<HomgPoint2D> >& p)const;
00116
00117     /// p = _StaticPoints;
00118     void Get3DPoints(std::vector<HomgPoint3D>& p) const;
00119
00120     /// inl[i] indicates if Get(GT)Points()[i] is outlier
00121     void GetInliers(std::vector<bool>& inl) const;
00122
00123     // returns the fundamental matrices for each indep. motion
00124     void GetGTNormalizedF(std::vector<std::vector<FMatrixBase> >& F) const;
00125
00126     GenSynthMatches &operator=(const MatchDataBase& mdb);
00127
00128     friend BIASUtils_EXPORT std::ostream& operator<<(std::ostream& os,const GenSynthMatches& m);
00129     friend BIASUtils_EXPORT std::istream& operator>>(std::istream& os, GenSynthMatches& m);
00130
00131   protected:
00132     BIAS::Random _rand;
00133     BIAS::Param *_para; // just needed in WriteData
00134
00135     // internal calibration matrix
00136     //BIAS::KMatrix _K, _Ki; // _Ki is inverse of _K
00137     // vector of rotation matrizes of cameras, true and with gaussian noise
00138     // with distribution para _SigmaCamRot?
00139     std::vector<BIAS::RMatrixBase> _GT_R;//, _R;
00140     // vector of camera centers, true and with gaussian noise
00141     // with distribution para _SigmaCamCenter?
00142     std::vector<BIAS::HomgPoint3D> _GT_C;//, _C;
00143     // vector of projection matrizes, true (_K, _GT_R[i], GT_C[i])
00144     // and composed from _K, _R[i] and _C[i]
00145     std::vector<BIAS::PMatrixBase> _GT_P;//, _P;
00146     // vector of transform between moving and static coo
00147     std::vector<BIAS::EuclideanTransf3D> _MovingTransform;
00148     // vector of scene points
00149     std::vector<BIAS::HomgPoint3D> _StaticPoints;
00150     // vector of points from moving object in local coo of moving obj,
00151     // with (0, 0, 0) in center of moving obj
00152     std::vector<BIAS::HomgPoint3D> _MovingPoints;
00153
00154     int *_NumStaticPoints, *_NumOutliers; // *_NumImages, *_NumPoints
00155     int *_ImWidth, *_ImHeight;
00156     double *_FocalLength, *_PrinciplePointX, *_PrinciplePointY;
00157
00158     // noise for different values
00159     double *_SigmaImagePoints, *_MaxDispOutliers, *_OutlDirChange;
00160     double *_OutlLengthChange;
00161     double *_SigmaCamCenterX, *_SigmaCamCenterY, *_SigmaCamCenterZ;
00162     double *_SigmaCamRotX, *_SigmaCamRotY, *_SigmaCamRotZ;
00163
00164     // minimal and maximal distance of 3D points from camera plane
00165     double *_MinCamDistance, *_MaxCamDistance;
00166
00167     bool *_UserGivenP;
00168     // only used from param file if _UserGivenP=true
00169     BIAS::Vector<double> *_MotionVecX, *_MotionVecY, *_MotionVecZ, *_RotVecX, *_RotVecY, *_RotVecZ;
00170     // used to fill MotionVec? and RotVec? if UserGivenP=false
00171     double *_OverallMotionX, *_OverallMotionY, *_OverallMotionZ, *_OverallRotX, *_OverallRotY, *_OverallRotZ;
00172
00173     // parameters for generating moving points
00174     int *_NumMovingPoints, *_NumMovingObjects;
00175     // e.g. *_SizeMovingObjX[k] is the x size of the (k)th moving object
00176     BIAS::Vector<double> *_SizeMovingObjX, *_SizeMovingObjY, *_SizeMovingObjZ;
00177
00178     // describes the motion of the moving objs
00179     // e.g. *_MovingObjMotionVecX[k] is the x coo of the center position
00180     // of the (k div *_NumMovinObj)th moving object in the
00181     // (k div *_NumMovinObj)th image
00182     // i.e. *_MovingObjMotionVecX="1 2 3   7 8 9" and *_NumMovinObj=2
00183     // means object number 1 moves from x=1 in image 1 to x=2 in image 2
00184     // to x=3 in image 3 while object number 2 moves from x=7 in image 1
00185     // to x=8 in image 2 to x=9 in image 3
00186     BIAS::Vector<double> *_MovingObjMotionVecX, *_MovingObjMotionVecY,
00187       *_MovingObjMotionVecZ, *_MovingObjRotVecX, *_MovingObjRotVecY,
00188       *_MovingObjRotVecZ;
00189
00190     // the generated match data:  GT means ground truth
00191     // _GT_Points[k][i] is point number i in image k
00192     // _Points are generated using noisy data
00193     // for inliers the folowing is true
00194     //   _GT_Points[k][i]=_GT_P[k]*_StaticPoints[i]
00195     //   _Points[k][i]=_P[k]*_StaticPoints[i] + Noise(_SigmaImagePoints)
00196     std::vector<std::vector<HomgPoint2D> > _GT_Points;
00197     std::vector<std::vector<HomgPoint2D> > _GT_NormalizedPoints;
00198
00199     /// fills _k, _Ki, _GT_R, _R, GT_C, _C, _GT_P and _P
00200     void _CreateCamMovement();
00201
00202     /// fills _MovinTransforms
00203     void _CreateMovingTransforms();
00204
00205     /// fills _StaticPoints
00206     /// returns -1 if no common viewing volume of all cameras is present
00207     int _CreateStatic3DPoints();
00208
00209     /// returns -1 if no corner of moving object boundary is seen in images
00210     /// or the center of moving objects is not seen in images
00211     int _AreMovingObjectsVisible();
00212
00213     /// fills _MovingPoints
00214     /// returns -1 if no corner of moving object boundary is seen in images
00215     /// or the center of moving objects is not seen in images
00216     int _CreateMoving3DPoints();
00217
00218     /// fills *_NumStaticPoints first entries of _GT_Points, _Points,
00219     ///   _GT_NormalizedPoints, _NormalizedPoints
00220     /// also resizes the above vectors to
00221     ///   [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]
00222     void _CreateStatic2DPoints();
00223     /// fills *_NumStaticPoints first entries of _GT_Points and
00224     ///   _GT_NormalizedPoints
00225     /// also resizes the above vectors to
00226     ///   [*_NumImages][*_NumStaticPoints+*_NumMovingObjects+*_NumOutliers]
00227     void _CreateStaticGT2DPoints();
00228
00229     /// fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints
00230     /// from entries [*_NumStaticPoints] to [*_NumStaticPoints+*_NumOutliers-1]
00231     void _AddUniformDistributedOutliers();
00232
00233     /// fills _GT_Points, _Points, _GT_NormalizedPoints, _NormalizedPoints
00234     /// from entries [*_NumStaticPoints+_*NumOutliers] to
00235     /// [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]
00236     void _CreateMoving2DPoints();
00237     /// fills _GT_Points, _GT_NormalizedPoints
00238     /// from entries [*_NumStaticPoints+_*NumOutliers] to
00239     /// [*_NumStaticPoints+*_NumOutliers+*_NumMovingPoints-1]
00240     void _CreateMovingGT2DPoints();
00241
00242     /// fills all protected pointer values
00243     virtual void _AddParameter(Param &para);
00244
00245     /// helper function used for visualizing the matches
00246     void _Draw(Image<unsigned char>& im, int minindex, int maxindex,
00247                const std::vector<std::vector<HomgPoint2D> >* p) const;
00248
00249     inline bool _IsSeen(HomgPoint2D &p, double border=0.0){
00250       p.Homogenize();
00251       return (p[0]>=border && p[0]<=(((double)*_ImWidth)-border-1.0) &&
00252               p[1]>=border && p[1]<=(((double)*_ImHeight)-border-1.0));
00253     }
00254
00255     bool _CheckParams() const;
00256
00257   }; // class
00258
00259   BIASUtils_EXPORT std::ostream& operator<<(std::ostream& os, const GenSynthMatches& m);
00260   //BIASUtils_EXPORT std::istream& operator>>(std::istream& os, GenSynthMatches m);
00261
00262 } // namespace
00263
00264
00265 #include <Base/Common/BIASpragmaEnd.hh>
00266
00267 #endif
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/geometry.dox File Reference

Doc/geometry.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GeometryGL.cpp Source File

Gui

GeometryGL.cpp

Go to the documentation of this file.
00001
00002 #include "GeometryGL.hh"
00003
00004 // must be first
00005 #include "biasgl.h"
00006
00007 #include <Base/Debug/DebugSimple.hh>
00008 #include <Base/Debug/TimeMeasure.hh>
00009 #include <Base/Math/Vector2.hh>
00010 #include <Base/Math/Vector3.hh>
00011 #include <Base/Math/Matrix3x3.hh>
00012 #include <Base/Math/Matrix3x4.hh>
00013 #include <Geometry/RMatrix.hh>
00014 #include <Geometry/PMatrix.hh>
00015
00016 #include <Base/Image/ImageBase.hh>
00017
00018
00019 // convert GLBoolean for output in stream:
00020 #define GL2Cbool(arg) (unsigned int)(arg)<< (arg?" (true)":" (false)")
00021
00022
00023 // ----------------------------------------------------------
00024 // namespace stuff:
00025 using namespace BIAS;
00026 using namespace std;
00027 // ----------------------------------------------------------
00028
00029 /** @author Jan Woetzel 04/2005 */
00030
00031 GeometryGL::~GeometryGL(){}
00032
00033 GeometryGL::GeometryGL(){}
00034
00035
00036 void GeometryGL::GetInfoGL(std::ostream & os)
00037 {
00038   // get OpenGL info strings into std. strings:
00039   if ( NULL==(char *) glGetString(GL_VENDOR)) {
00040     BIASERR("No Context available (NULL ptr). Skipping RenderGL::GetInfo."<<endl<<flush);;
00041     //CheckGLError();
00042     return;
00043   };
00044 #ifdef BIAS_HAVE_GLEW
00045   string strGlewVersion = (char*) glewGetString(GLEW_VERSION);
00046 #endif // BIAS_HAVE_GLEW
00047   string strVendor     = (char *) glGetString(GL_VENDOR);
00048   string strRenderer   = (char *) glGetString(GL_RENDERER);
00049   string strVersion    = (char *) glGetString(GL_VERSION);
00050   string strExtensions = (char *) glGetString(GL_EXTENSIONS);
00051   //strExtensions  = (char*) wglGetExtensionsStringARB();
00052   // replace blank by newline:
00053   unsigned int index = 0;
00054   while ((index = strExtensions.find(' ', index)) != string::npos)
00055     strExtensions[index++] = '\n';
00056
00057   // only on Win32
00058   string strWglExtensions;
00059 #ifdef WIN32
00060 #  ifdef BIAS_HAVE_GLEW
00061   if (WGLEW_EXT_extensions_string)
00062   {
00063     strWglExtensions = (char*) wglGetExtensionsStringEXT();
00064     CHECK_GL_ERROR;
00065     // replace blank by newline:
00066     index = 0;
00067     while ((index = strWglExtensions.find(' ', index)) != string::npos)
00068       strWglExtensions[index++]='\n';
00069   };
00070 #  endif // BIAS_HAVE_GLEW
00071 #endif // WIN32
00072
00073   GLint max_texture_units=0;
00074   glGetIntegerv(GL_MAX_TEXTURE_UNITS, &max_texture_units);
00075   //CHECK_GL_ERROR;
00076
00077   GLint max_texture_image_units=0;
00078 #ifdef BIAS_HAVE_GLEW
00079   glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_image_units);
00080 #endif // BIAS_HAVE_GLEW
00081
00082   GLint max_general_combiners;
00083   glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &max_general_combiners);
00084   //CHECK_GL_ERROR;
00085   //GLint max_vertex_units;
00086   //glGetIntegerv(GL_MAX_VERTEX_UNITS_ARB, &max_vertex_units);
00087   //CHECK_GL_ERROR;
00088   //GLint max_vertex_shader_instructions;
00089   //glGetIntegerv(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT, &max_vertex_shader_instructions);
00090   //CHECK_GL_ERROR;
00091
00092   GLint red_bits;
00093   glGetIntegerv(GL_RED_BITS, &red_bits);
00094   GLint green_bits;
00095   glGetIntegerv(GL_GREEN_BITS, &green_bits);
00096   GLint blue_bits;
00097   glGetIntegerv(GL_BLUE_BITS, &blue_bits);
00098   GLint alpha_bits;
00099   glGetIntegerv(GL_ALPHA_BITS, &alpha_bits);
00100   GLfloat alpha_bias;
00101   glGetFloatv(GL_ALPHA_BIAS, &alpha_bias);
00102   GLfloat alpha_scale;
00103   glGetFloatv(GL_ALPHA_SCALE, &alpha_scale);
00104   GLboolean cull_face;
00105   glGetBooleanv(GL_CULL_FACE, &cull_face);
00106   GLfloat depth_scale;
00107   glGetFloatv(GL_DEPTH_SCALE, &depth_scale);
00108   GLint depth_bits;
00109   glGetIntegerv(GL_DEPTH_BITS, &depth_bits);
00110   GLfloat depth_bias;
00111   glGetFloatv(GL_DEPTH_BIAS, &depth_bias);
00112   GLfloat depth_range[2];
00113   glGetFloatv(GL_DEPTH_BIAS, &depth_range[0]);
00114   GLfloat depth_clear_value;
00115   glGetFloatv(GL_DEPTH_CLEAR_VALUE, &depth_clear_value);
00116   GLboolean fog;
00117   glGetBooleanv(GL_FOG, &fog);
00118   GLfloat line_width;
00119   glGetFloatv(GL_LINE_WIDTH, &line_width);
00120   GLboolean lighting;
00121   glGetBooleanv(GL_LIGHTING, &lighting);
00122   GLint max_modelview_stack_depth;
00123   glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &max_modelview_stack_depth);
00124   GLint max_projection_stack_depth;
00125   glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &max_projection_stack_depth);
00126   GLint max_texture_stack_depth;
00127   glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &max_texture_stack_depth);
00128   GLint max_texture_size;
00129   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
00130   GLint max_viewport_dims[2];
00131   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_viewport_dims[0]);
00132   GLint name_stack_depth;
00133   glGetIntegerv(GL_NAME_STACK_DEPTH, &name_stack_depth);
00134   GLint max_name_stack_depth;
00135   glGetIntegerv(GL_MAX_NAME_STACK_DEPTH, &max_name_stack_depth);
00136   GLint point_size;
00137   glGetIntegerv(GL_POINT_SIZE, &point_size);
00138   GLint point_size_range[2];
00139   glGetIntegerv(GL_POINT_SIZE_RANGE, &point_size_range[0]);
00140   GLboolean rgba_mode;
00141   glGetBooleanv(GL_RGBA_MODE, &rgba_mode);
00142   GLboolean stencil_test;
00143   glGetBooleanv(GL_STENCIL_TEST, &stencil_test);
00144   GLint stencil_bits;
00145   glGetIntegerv(GL_STENCIL_BITS, &stencil_bits);
00146   GLint draw_buffer;
00147   glGetIntegerv(GL_DRAW_BUFFER, &draw_buffer);
00148   GLint aux_buffers;
00149   glGetIntegerv(GL_AUX_BUFFERS, &aux_buffers);
00150   GLboolean double_buffer;
00151   glGetBooleanv(GL_DOUBLEBUFFER, &double_buffer);
00152   GLboolean stereo;
00153   glGetBooleanv(GL_STEREO, &stereo);
00154   GLint polygon_mode[2];
00155   glGetIntegerv(GL_POLYGON_MODE, &polygon_mode[0]);
00156   GLint viewport[4];
00157   glGetIntegerv(GL_VIEWPORT, &viewport[0]);
00158   GLfloat modelviewMatrix[16];
00159   glGetFloatv(GL_MODELVIEW_MATRIX, &modelviewMatrix[0]);
00160   GLfloat projectionMatrix[16];
00161   glGetFloatv(GL_PROJECTION_MATRIX, &projectionMatrix[0]);
00162   GLfloat textureMatrix0[16];
00163   glGetFloatv(GL_TEXTURE_MATRIX, &textureMatrix0[0]);
00164
00165   CHECK_GL_ERROR;
00166
00167   GLint max_texture_lod_bias;
00168   glGetIntegerv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &max_texture_lod_bias);
00169   //CHECK_GL_ERROR;
00170
00171   os << "Getting Info about OpenGL: " << endl;
00172 #ifdef BIAS_HAVE_GLEW
00173   os << "GLEW_VERSION = " << strGlewVersion  << endl;
00174 #endif // BIAS_HAVE_GLEW
00175   os << "GL_VENDOR    = " << strVendor << endl;
00176   os << "GL_RENDERER  = " << strRenderer << endl;
00177   os << "GL_VERSION   = " << strVersion << endl;
00178   os << "* GL_EXTENSIONS:  " << endl << strExtensions << endl;
00179   os << "* WGL_EXTENSIONS: " << endl << strWglExtensions << endl;
00180
00181   os << endl;
00182
00183   os<<"GL_RED_BITS  = "<<red_bits<<endl;
00184   os<<"GL_GREEN_BITS= "<<green_bits<<endl;
00185   os<<"GL_BLUE_BITS = "<<blue_bits<<endl;
00186   os<<"GL_ALPHA_BITS= "<<alpha_bits<<endl;
00187   os<<"GL_DEPTH_BITS  ="<<depth_bits<<endl;
00188   os<<"GL_STENCIL_BITS="<<stencil_bits<< endl;
00189
00190   os << "GL_MAX_TEXTURE_UNITS= "<<max_texture_units<<" (detected texture units)" << endl;
00191   os << "GL_MAX_TEXTURE_IMAGE_UNITS= " << max_texture_image_units <<endl;
00192
00193   //os << "GL_MAX_GENERAL_COMBINERS_NV= " << max_general_combiners<<endl;
00194   //os << "GL_MAX_VERTEX_UNITS = " << max_vertex_units <<" (detected vertex units)" << endl;
00195   //os << "GL_MAX_VERTEX_SHADER_INSTRUCTIONS= "<<max_vertex_shader_instructions << endl;
00196   os << "GL_ALPHA_SCALE      = " << alpha_scale << endl;
00197   os << "GL_ALPHA_BIAS       = " << alpha_bias << endl;
00198   os << "GL_CULL_FACE        = " << GL2Cbool(cull_face) << endl;
00199   os << "GL_STENCIL_TEST     = " << GL2Cbool(stencil_test) << endl;
00200
00201   os << "GL_DEPTH_SCALE      = " << depth_scale << endl;
00202   os << "GL_DEPTH_BIAS       = " << depth_bias << endl;
00203   os << "GL_DEPTH_RANGE      = " << depth_range[0] << " " <<depth_range[1] << endl;
00204   os << "GL_DEPTH_CLEAR_VALUE= " << depth_clear_value << endl;
00205
00206   os << "GL_DRAW_BUFFER      = " << draw_buffer;
00207   switch (draw_buffer)
00208   {
00209   case GL_FRONT_LEFT:
00210     os<<" GL_FRONT_LEFT"; break;
00211   case GL_FRONT_RIGHT:
00212     os<<" GL_FRONT_RIGHT"; break;
00213   case GL_BACK_LEFT:
00214     os<<" GL_BACK_LEFT"; break;
00215   case GL_BACK_RIGHT:
00216     os<<" GL_BACK_RIGHT"; break;
00217   case GL_FRONT:
00218     os<<" GL_FRONT"; break;
00219   case GL_BACK:
00220     os<<" GL_BACK"; break;
00221   case GL_LEFT:
00222     os<<" GL_LEFT"; break;
00223   case GL_RIGHT:
00224     os<<" GL_RIGHT"; break;
00225   case GL_FRONT_AND_BACK:
00226     os<<" GL_FRONT_AND_BACK"; break;
00227   default:
00228     os<<"unknown";
00229   }
00230   os << endl;
00231   os << "GL_AUX_BUFFERS      = " << aux_buffers <<endl;
00232   os << "GL_DOUBLE_BUFFER    = " << GL2Cbool(double_buffer)<<endl;
00233   os << "GL_STEREO           = " << GL2Cbool(stereo);
00234   if (stereo) os<<" (but not neccessarily enabled)"<<endl;
00235   os<<endl;
00236
00237   os << "GL_FOG              = " << GL2Cbool(fog) << endl;
00238   os << "GL_LINE_WIDTH       = " << line_width << endl;
00239   os << "GL_LIGHTING         = " << GL2Cbool(lighting) << endl;
00240   os << "GL_MAX_MODELVIEW_STACK_DEPTH = " <<max_modelview_stack_depth << endl;
00241   os << "GL_MAX_PROJECTION_STACK_DEPTH= " <<max_projection_stack_depth << endl;
00242   os << "GL_MAX_TEXTURE_LOD_BIAS_EXT  = " << max_texture_lod_bias << endl;
00243   os << "GL_MAX_TEXTURE_STACK_DEPTH   = " << max_texture_stack_depth<< endl;
00244   os << "GL_MAX_TEXTURE_SIZE = " << max_texture_size << endl;
00245   os << "GL_MAX_VIEWPORT_DIMS= " << max_viewport_dims[0]
00246   <<" "<<max_viewport_dims[1] << endl;
00247   os << "GL_POINT_SIZE       = " << point_size << endl;
00248   os << "GL_POINT_SIZE_RANGE = " << point_size_range[0]
00249   <<" "<<point_size_range[1] << endl;
00250   os << "GL_MAX_NAME_STACK_DEPTH = " << max_name_stack_depth<<endl;
00251   os << "GL_NAME_STACK_DEPTH = " << name_stack_depth<<endl;
00252
00253   os << "GL_POLYGON_MODE     = (";
00254   switch(polygon_mode[0]){ // face
00255     case GL_FRONT_AND_BACK: os<<"GL_FRONT_AND_BACK"; break;
00256     case GL_FRONT:          os<<"GL_FRONT"; break;
00257     case GL_BACK:           os<<"GL_BACK"; break;
00258     default:                os<<polygon_mode[0]; break;
00259   }
00260   os<<", ";
00261   switch(polygon_mode[0]){ // mode
00262     case GL_FILL:  os<<"GL_FILL"; break;
00263     case GL_POINT: os<<"GL_POINT"; break;
00264     case GL_LINE:  os<<"GL_LINE"; break;
00265     default:       os<<polygon_mode[1]; break;
00266   }
00267   os<<")"<<endl;
00268
00269   os << "GL_RGBA_MODE        = " << GL2Cbool(rgba_mode) << endl;
00270   os << "GL_VIEWPORT         = x="<<viewport[0]<<" y="<<viewport[1]<<" w="<<viewport[2]<<" h="<<viewport[3]<<endl;
00271
00272   unsigned int row=0;
00273   os << "GL_MODELVIEW_MATRIX = (column-major!)"<<endl;
00274   for (row=0; row<4; row++) {
00275     os<<std::setprecision(10)<<modelviewMatrix[row+ 0]<<" \t";
00276     os<<std::setprecision(10)<<modelviewMatrix[row+ 4]<<" \t";
00277     os<<std::setprecision(10)<<modelviewMatrix[row+ 8]<<" \t";
00278     os<<std::setprecision(10)<<modelviewMatrix[row+12];
00279     os<<endl;
00280   };
00281   os << "GL_PROJECTION_MATRIX = (column-major!) "<<endl;
00282   for (row=0; row<4; row++) {
00283     os<<std::setprecision(10)<<projectionMatrix[row+ 0]<<" \t";
00284     os<<std::setprecision(10)<<projectionMatrix[row+ 4]<<" \t";
00285     os<<std::setprecision(10)<<projectionMatrix[row+ 8]<<" \t";
00286     os<<std::setprecision(10)<<projectionMatrix[row+12];
00287     os<<endl;
00288   };
00289   os << "GL_TEXTURE_MATRIX = (column-major!) "<<endl;
00290   for (row=0; row<4; row++) {
00291     os<<std::setprecision(10)<<textureMatrix0[row+ 0]<<" \t";
00292     os<<std::setprecision(10)<<textureMatrix0[row+ 4]<<" \t";
00293     os<<std::setprecision(10)<<textureMatrix0[row+ 8]<<" \t";
00294     os<<std::setprecision(10)<<textureMatrix0[row+12];
00295     os<<endl;
00296   };
00297   CHECK_GL_ERROR;
00298
00299
00300   unsigned int i=0;
00301   // query all available display lists
00302   int foundDisplists=0;
00303   for (i=0; i<MAX_GL_DISPLIST_ID; i++)
00304   {
00305     if(glIsList(i) == GL_TRUE)
00306     {
00307       foundDisplists++;
00308       os<<"valid displaylistID="<<i<<endl;
00309     };
00310   };
00311   os<<"** found a total of "<<foundDisplists<<" valid display lists/IDs <MAX_GL_DISPLIST_ID="<<MAX_GL_DISPLIST_ID<<" **"<<endl;
00312
00313
00314   // query residence and priority status of all texobj's
00315   GLint resident=GL_FALSE;
00316   GLfloat priority=0;
00317   int foundTextures=0;
00318   for (i=0; i<MAX_GL_TEXOBJ_ID; i++)
00319   {
00320     if (glIsTexture(i))
00321     {
00322       foundTextures++;
00323       glBindTexture(GL_TEXTURE_2D, i );
00324       glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &resident);
00325       glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &priority);
00326       os<<"valid texID="<<i<<" : resident="<<resident<<" priority="<<(float)priority<<endl;
00327     };
00328   };
00329   os<<"** found a total of "<<foundTextures<<" validtextures/IDs <MAX_GL_TEXOBJ_ID="<<MAX_GL_TEXOBJ_ID<<" **"<<endl;
00330   glGetError();
00331 }
00332
00333
00334 // static
00335 void GeometryGL::DisplayClear()
00336 {
00337   CHECK_GL_ERROR;
00338
00339   // set values for clear:
00340   glClearColor(0, 0, 0, 0); // rgba [0,1]
00341   glClearDepth(1.0);
00342   glClearAccum(0,0,0,0);
00343   glClearStencil(0);
00344   glClearIndex(0);
00345
00346   glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // no color mask RGBA
00347
00348   // perform clear operation:
00349   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
00350
00351   // set gl states (on or off)
00352   glDisable(GL_ALPHA_TEST);
00353   glDisable(GL_LIGHTING);
00354
00355   // counter clockwise on screen is front face:
00356   glFrontFace(GL_CCW);
00357   glDisable(GL_CULL_FACE);
00358   glDisable(GL_FOG);
00359   glDisable(GL_NORMALIZE); // just for glNormal
00360
00361   //glDisable(GL_DEPTH_TEST);
00362   glEnable(GL_DEPTH_TEST);
00363
00364   glDisable(GL_BLEND);
00365
00366   glDisable(GL_STENCIL_TEST);
00367   //glEnable(GL_STENCIL_TEST);
00368
00369   glDisable(GL_TEXTURE_2D);
00370   //glDisable(GL_TEXTURE_RECTANGLE_NV); // non-pow2 textures?
00371
00372   // set compare functions
00373   glDepthFunc(GL_LEQUAL);
00374   glAlphaFunc(GL_LEQUAL, (GLclampf)1 );
00375
00376   // set matrices:
00377   glMatrixMode(GL_PROJECTION);
00378   glLoadIdentity();
00379   glMatrixMode(GL_TEXTURE);
00380   glLoadIdentity();
00381   glMatrixMode(GL_MODELVIEW);
00382   glLoadIdentity();
00383
00384   CHECK_GL_ERROR;
00385 }
00386
00387
00388 void GeometryGL::DisplayRenderMode(const BIAS::RenderModeGL  & m)
00389 {
00390   CHECK_GL_ERROR;
00391   glPolygonMode(GL_FRONT, m.polygonmodeFRONT);
00392   glPolygonMode(GL_BACK,  m.polygonmodeBACK);
00393
00394   glShadeModel(m.shademodel);
00395
00396   glEnable(GL_CULL_FACE);
00397   glCullFace(m.cullface);
00398   if (m.enable_cullface) {
00399     glEnable(GL_CULL_FACE);
00400   } else {
00401     glDisable(GL_CULL_FACE);
00402   };
00403
00404   glPointSize(m.pointsize);
00405   glLineWidth(m.linewidth);
00406
00407   CHECK_GL_ERROR;
00408 }
00409
00410
00411 void
00412 GeometryGL::DisplaySimpleAnimation(const double & time)
00413 {
00414   //COUT("DBG time="<<time<<endl);
00415
00416   // animation: rotate depending on current time
00417   glRotated(
00418     time, /*angle*/
00419     0,1,1 /* axis */
00420     );
00421
00422   DisplaySceneExampleSimple();
00423 }
00424
00425
00426 void
00427 GeometryGL::DisplaySceneExampleSimple()
00428 {
00429   // A simple scene not using push or pop
00430   glDisable(GL_LIGHTING); // may be switched on/off for every object
00431   glEnable(GL_DEPTH_TEST); // depth buffer occlusions of objects
00432   glShadeModel(GL_SMOOTH);
00433
00434   const float z = 1.0f;
00435   const float xd= 0.9f; // x dimension
00436   const float yd= 0.9f; // y dimension
00437
00438   // 3 2
00439   // 0 1
00440   BIAS::Vector3<float> p0(-xd, -yd, z);
00441   BIAS::Vector3<float> p1( xd, -yd, z);
00442   BIAS::Vector3<float> p2( xd,  yd, z);
00443   BIAS::Vector3<float> p3(-xd,  yd, z);
00444
00445   {
00446     glBegin(GL_QUADS);
00447     glColor3f(1,0,0);  // red 0
00448     glVertex3fv( &(p0[0]));
00449
00450     glColor3f(0,1,0); // green 1
00451     glVertex3fv( &(p1[0]));
00452
00453     glColor3f(0,0,1); // blue 2
00454     glVertex3fv( &(p2[0]));
00455
00456     glColor3f(1,1,1); // white 3
00457     glVertex3fv( &(p3[0]));
00458     glEnd();
00459
00460     GeometryGL::DisplayCoordCross();
00461   }
00462   CHECK_GL_ERROR;
00463 }
00464
00465 #ifdef BIAS_HAVE_FONTGL
00466 void GeometryGL::DisplayCoordCross(const float & size,
00467                                    const float & linewidth,
00468                                    const BIAS::DrawTextGL & font,
00469                                    const std::string & LabelX,
00470                                    const std::string & LabelY,
00471                                    const std::string & LabelZ )
00472 {
00473   DisplayCoordCrossAxesLabel(size, font, LabelX, LabelY, LabelZ);
00474   DisplayCoordCross(size, linewidth);
00475 }
00476
00477
00478 void GeometryGL::DisplayCoordCrossAxesLabel(const float & size,
00479                                             const DrawTextGL & font,
00480                                             const std::string & LabelX,
00481                                             const std::string & LabelY,
00482                                             const std::string & LabelZ )
00483 {
00484   if (!font.IsInitialized()) {
00485     BIASERR("font not initialized. Please do it on your OpenGLCanvas (because of the context). aborting");
00486     return;
00487   }
00488   // X
00489   glColor3f(
00490     1.0f, 0.0f, 0.0f);
00491   font.Print3D(LabelX,
00492     size, 0.0f, 0.0f);
00493
00494   // Y
00495   glColor3f(
00496     0.0f, 1.0f, 0.0f);
00497   font.Print3D(LabelY,
00498     0.0f, size, 0.0f);
00499
00500   // Z
00501   glColor3f(
00502     0.0f, 0.0f, 1.0f);
00503   font.Print3D(LabelZ,
00504     0.0f, 0.0f, size);
00505 }
00506 #endif //BIAS_HAVE_FONTGL
00507
00508 void GeometryGL::DisplayCoordCross(const float & size,
00509                                    const float & linewidth )
00510 {
00511
00512   // X-axis:
00513   glDisable(GL_TEXTURE_2D);
00514   glDisable(GL_LIGHTING);
00515
00516   if ((linewidth>=1.0) && (linewidth<32.0))
00517     glLineWidth((GLfloat)linewidth);
00518   else
00519     glLineWidth((GLfloat)1.0);
00520
00521   glColor4f(1,0,0, VISIBLEALPHA); // r
00522   glBegin(GL_LINES);
00523   glVertex3f(0,0,0);
00524   glVertex3f(size,0,0);
00525   glEnd();
00526   // Y-axis:
00527   glColor4f(0,1,0, VISIBLEALPHA); // g
00528   glBegin(GL_LINES);
00529   glVertex3f(0,0,0);
00530   glVertex3f(0,size,0);
00531   glEnd();
00532   // Z-axis:
00533   glColor4f(0,0,1, VISIBLEALPHA); // r
00534   glBegin(GL_LINES);
00535   glVertex3f(0,0,0);
00536   glVertex3f(0,0,size);
00537   glEnd();
00538 }
00539
00540
00541
00542 void
00543 GeometryGL::DisplayCameraInternalParams(
00544                                         const int & x0,
00545                                         const int & y0,
00546                                         const unsigned int & width,
00547                                         const unsigned int & height,
00548                                         const float & fovY,
00549                                         const float & zNear,
00550                                         const float & zFar )
00551 {
00552   BIASASSERT(width>=0);
00553   BIASASSERT(height>=0);
00554   BIASASSERT(fovY>0.0);// min. field of view Y (in deg.)
00555   BIASASSERT(fovY<180.0); // max field of view Y (in deg.)
00556
00557   glMatrixMode(GL_PROJECTION);
00558   glLoadIdentity();
00559
00560   float aspect=1.0;
00561   if ((height==0) || (width==0)) {
00562     // degenerate case
00563     aspect = 1.0;
00564   } else {
00565     aspect = (float)width/(float)height;
00566   };
00567   //COUT("DBG aspect w/h = "<<aspect<<endl);
00568   gluPerspective(fovY,
00569     aspect,
00570     zNear, zFar);
00571
00572   // pixel rasterization=which part of image plane:  origin, w, h
00573   glViewport((GLint)x0, (GLint)y0,
00574     (GLsizei)width, (GLsizei)height);
00575
00576 }
00577
00578
00579
00580 void GeometryGL::DisplayCameraExternalParams(BIAS::PMatrix & P){
00581   GeometryGL::DisplayCameraExternalParams(
00582     P.GetC()
00583     ,P.GetV() // P.GetUp_gl()
00584     ,P.GetA()
00585     );
00586 }
00587
00588
00589 void GeometryGL::DisplayCameraExternalParams(const BIAS::Vector3<double> & C,
00590                                              const BIAS::Vector3<double> & up,
00591                                              const BIAS::Vector3<double> & a  )
00592 {
00593   // pose and orientation of the camera (where is it looking at)
00594   Vector3<double> viewAt = C + a;
00595
00596   glMatrixMode(GL_MODELVIEW);
00597   glLoadIdentity();
00598   gluLookAt((GLdouble)C[0],
00599     (GLdouble)C[1],
00600     (GLdouble)C[2],
00601     (GLdouble)viewAt[0],
00602     (GLdouble)viewAt[1],
00603     (GLdouble)viewAt[2],
00604     (GLdouble)up[0],
00605     (GLdouble)up[1],
00606     (GLdouble)up[2]
00607     );
00608 }
00609
00610
00611 BIAS::Vector2<double>
00612 GeometryGL::GetImgCorner2d( const unsigned int & w
00613                            ,const unsigned int & h
00614                            ,const unsigned int & corner
00615                            ,const int texMode
00616                            ,const bool flipY )
00617 {
00618   float width = 1.0;
00619   float height= 1.0;
00620
00621   if (texMode==GL_TEXTURE_RECTANGLE_NV){
00622     // TexRECT has pixel coordinates NOT normalized an dpossibly non-pow2
00623     // texRect dim is in pixel, e.g. 0..1024
00624     width  = float( w );
00625     height = float( h );
00626   } else {
00627     // pow2 texture has normalized coordinates
00628     // assign the fractional (filled) part.
00629     BIASASSERT(w <= BIAS::ImageBase::PowerOfTwoSize(w) );
00630     BIASASSERT(h <= BIAS::ImageBase::PowerOfTwoSize(h) );
00631     width  = float(w) / float(BIAS::ImageBase::PowerOfTwoSize(w));
00632     //float tmp = BIAS::ImageBase::PowerOfTwoSize(h);
00633     height = float(h) / float(BIAS::ImageBase::PowerOfTwoSize(h));
00634   };
00635   BIASASSERT(0<width);
00636   BIASASSERT(0<height);
00637
00638   // return texture coordinates in OpenGL coordinate system
00639   switch (corner)
00640   {
00641   case LOWER_LEFT:
00642     if (flipY) return Vector2<double>(0.0, height);
00643     return Vector2<double>(0.0, 0.0);
00644     break;
00645   case LOWER_RIGHT:
00646     if (flipY) return Vector2<double>(width, height);
00647     return Vector2<double>(width, 0.0);
00648     break;
00649   case UPPER_RIGHT:
00650     if (flipY) return Vector2<double>(width, 0.0);
00651     return Vector2<double>(width, height);
00652     break;
00653   case UPPER_LEFT:
00654     if (flipY) return Vector2<double>(0.0, 0.0);
00655     return Vector2<double>(0.0, height);
00656     break;
00657   default:
00658     BIASERR("corner="<<corner<<" invalid."<<endl);
00659     return Vector2<double>(0.0, 0.0);
00660   };
00661 }
00662
00663
00664 /** compute 3D pos. of P in OpenGL coordinate system
00665 TODO: move this to PMatrix with addition imgDim parameter JW */
00666 BIAS::Vector3<double>
00667 GeometryGL::GetImgCorner3d(BIAS::PMatrix & P
00668                            ,const unsigned int & w
00669                            ,const unsigned int & h
00670                            ,const unsigned int & corner
00671                            ,const double & scale )
00672 {
00673   HomgPoint2D p2d(0,0, 1);
00674   BIAS::Vector3<double> p3d(0,0,0);
00675
00676   // these pixel coordinates are in MIP coordinaet system:
00677   switch (corner) {
00678                     case LOWER_LEFT:
00679                       p2d.Set(0,h, 1);
00680                       break;
00681                     case LOWER_RIGHT:
00682                       p2d.Set(w,h, 1);
00683                       break;
00684                     case UPPER_RIGHT:
00685                       p2d.Set(w,0, 1);
00686                       break;
00687                     case UPPER_LEFT:
00688                       p2d.Set(0,0, 1);
00689                       break;
00690                     case OPTICAL_CENTER:
00691                       p2d.Set( P.GetK().GetHx()
00692                         ,P.GetK().GetHy()
00693                         ,1);
00694                       break;
00695                     default:
00696                       BIASERR("corner="<<corner<<" invalid."<<endl);
00697                       return p3d;
00698   };
00699
00700   Vector3< double > dir; // vector from C to 3D point
00701   dir = P.GetRayWorldCoo(p2d);
00702   dir.Normalize(); // length 1
00703   p3d = P.GetC() + scale * dir;
00704
00705   return p3d;
00706 }
00707
00708
00709 void GeometryGL::DisplayImgPlaneTextured(BIAS::PMatrix & P
00710                                          ,const unsigned int & w
00711                                          ,const unsigned int & h
00712                                          ,const int & texID
00713                                          ,const int & texTarget
00714                                          ,const double & scale
00715                                          ,const bool & flipY
00716                                          ,const BIAS::Vector4<float> & vertexColor)
00717 {
00718   // Display the image plane at a distant scale from projection center textured:
00719   BIASASSERT( GL_TRUE == glIsTexture( texID ) ); // success ?
00720   glEnable( texTarget );
00721   glBindTexture(texTarget, texID );
00722   //glActiveTexture(GL_TEXTURE0);
00723   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
00724   CHECK_GL_ERROR;
00725
00726   // fancy pink in case of texturing error:
00727   //glColor4d(1.0, 0.0, 1.0, VISIBLEALPHA);
00728   glColor4fv( & vertexColor[0] );
00729   glBegin(GL_QUADS);
00730   glTexCoord2dv( & GetImgCorner2d(w,h, LOWER_LEFT, texTarget, flipY)[0] );
00731   glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[0]);
00732
00733   glTexCoord2dv( & GetImgCorner2d(w,h, LOWER_RIGHT, texTarget, flipY)[0] );
00734   glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_RIGHT, scale)[0] );
00735
00736   glTexCoord2dv( & GetImgCorner2d(w,h, UPPER_RIGHT, texTarget, flipY)[0] );
00737   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_RIGHT, scale)[0] );
00738
00739   glTexCoord2dv( & GetImgCorner2d(w,h, UPPER_LEFT, texTarget, flipY)[0] );
00740   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_LEFT, scale)[0] );
00741   glEnd();
00742 }
00743
00744
00745
00746
00747 void GeometryGL::DisplayP(BIAS::PMatrix & P
00748                           ,const unsigned int & w
00749                           ,const unsigned int & h
00750                           ,const double & scale
00751                           ,const float & linewidth
00752                           )
00753 {
00754   //Vector3<double> C(0,0,0);
00755   Vector3<double> C( P.GetC() );
00756
00757   const float alpha = VISIBLEALPHA;
00758
00759   // Display textured image plane
00760   //DisplayImgPlaneTextured(cam, scale);
00761
00762   glDisable(GL_TEXTURE_2D);
00763   glLineWidth(linewidth);
00764
00765   // rectangle between image corners
00766   glBegin(GL_LINE_LOOP);
00767   glColor4f(0,1,0, alpha); // plane corners green
00768   glVertex4d( GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[0],
00769     GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[1],
00770     GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[2],
00771     1.0
00772     );
00773
00774   //glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[0] );
00775   glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_RIGHT,scale)[0] );
00776   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_RIGHT,scale)[0] );
00777   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_LEFT, scale)[0] );
00778   glEnd();
00779
00780   glBegin(GL_LINES);
00781   // Display view vector from red=C=eye=red to center=blue
00782   glColor4f(1,0,0, alpha); // eye=red
00783   glVertex3dv( & C[0] );
00784   glColor4f(0,0,1, alpha); // blue
00785   glVertex3dv( & GetImgCorner3d(P,w,h, OPTICAL_CENTER, scale)[0] );
00786
00787   // connect eye=center to all 4 corners
00788   glColor4f(0,1,0, alpha); // plane corners green
00789   glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_LEFT, scale)[0] );
00790   glColor4f(1,0,0, alpha); // center=red
00791   glVertex3dv( & C[0] );
00792
00793   glColor4f(0,1,0, alpha); // plane corners green
00794   glVertex3dv( & GetImgCorner3d(P,w,h, LOWER_RIGHT, scale)[0] );
00795   glColor4f(1,0,0, alpha); // center=red
00796   glVertex3dv( & C[0] );
00797
00798   glColor4f(0,1,0, alpha); // plane corners green
00799   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_LEFT, scale)[0] );
00800   glColor4f(1,0,0, alpha); // center=red
00801   glVertex3dv( & C[0] );
00802
00803   glColor4f(0,1,0, alpha); // plane corners green
00804   glVertex3dv( & GetImgCorner3d(P,w,h, UPPER_RIGHT, scale)[0] );
00805   glColor4f(1,0,0, alpha); // center=red
00806   glVertex3dv( & C[0] );
00807   glEnd();
00808 }
00809
00810
00811
00812 BIAS::Matrix4x4<double>
00813 GeometryGL::CreateTextureMatrix(BIAS::PMatrix & P
00814                                 ,const unsigned int w
00815                                 ,const unsigned int h
00816                                 ,const bool & useRECTcoord )
00817 {
00818   Matrix4x4<double> result;
00819   result.SetIdentity();
00820
00821   // HACK: determine next pow2 depending on RECT or POW2 texture.
00822   //Vector2<unsigned int> RescaledDimension(1024,768);
00823
00824   // centerMatrix
00825   Matrix3x3<double> Mat;
00826   Mat.SetIdentity();
00827   Mat[0][2] =  1.0; //hx
00828   Mat[1][2] =  1.0; //hy
00829
00830   // normalized power of two coords required (RECT otherwise)
00831   if (!useRECTcoord ) {
00832     Mat[0][0] =  1.0/w;
00833     Mat[1][1] =  1.0/h;
00834     Mat[0][2] =  1.0/w;
00835     Mat[1][2] =  1.0/h;
00836   }
00837
00838   // transform workaround...
00839   Matrix3x4<double> newP;
00840   newP = Mat * P;
00841
00842   // create transposed special 4x4 marix of PTexture
00843   // for OpenGL
00844   // old line 2 will become 3 (for projective comp.)
00845   // new line 2 will be filled with 0 to removed z-component
00846   for (int s=0; s<4; s++) {
00847     result[0][s] = newP[0][s];
00848     result[1][s] = newP[1][s];
00849     result[2][s] = 0.0;
00850     result[3][s] = newP[2][s];
00851   }
00852
00853   // normalize all elements by W (lower right)
00854   result /= result[3][3];
00855
00856   return result;
00857 }
00858
00859
00860
00861 void GeometryGL::DisplayQuadTexCoord2DFull(const BIAS::ImgObjGL & texobj,
00862                                            const bool & additionalFlipY)
00863 {
00864   glMatrixMode(GL_MODELVIEW);
00865   glPushMatrix();
00866   glLoadIdentity();
00867   {
00868     glMatrixMode(GL_PROJECTION);
00869     glLoadIdentity();
00870     glPushMatrix();
00871     {
00872       DisplayQuadTexCoord2D(texobj, additionalFlipY);
00873     }
00874     glMatrixMode(GL_PROJECTION);
00875     glPopMatrix();
00876   }
00877   glMatrixMode(GL_MODELVIEW);
00878   glPopMatrix();
00879 }
00880
00881 void GeometryGL::DisplayQuadTexCoord2D(const BIAS::ImgObjGL & texobj,
00882                                        const bool & additionalFlipY)
00883 {
00884   CHECK_GL_ERROR;
00885   BIASASSERT(texobj.widthOrig>0);
00886   BIASASSERT(texobj.heightOrig>0);
00887   BIASASSERT(glIsTexture(texobj.id));
00888   CHECK_GL_ERROR;
00889
00890   // pow2 texture dim is normalized to 0..1
00891   float width = 0.0f;
00892   float height= 0.0f;
00893
00894   if (texobj.IsRectangleTexture()){
00895     // texRect dim is in pixel, e.g. 0..1024
00896     width  = (float) texobj.widthOrig;
00897     height = (float) texobj.heightOrig;
00898   } else {
00899     // pow2 texture which may be used partially, only.
00900     //width = 1.0f;
00901     //height= 1.0f;
00902     width = float(texobj.widthOrig)  / float(texobj.widthBrutto);
00903     height= float(texobj.heightOrig) / float(texobj.heightBrutto);
00904   }
00905   // 3 2
00906   // 0 1
00907   BIAS::Vector2<float> tc0, tc1, tc2, tc3; // 2d RECT texcoords
00908   if (!additionalFlipY) {
00909     // OpenGL orientation Y up (=Y is NOT flipped)
00910     tc0.Set(0,      0 );
00911     tc1.Set( width, 0 );
00912     tc2.Set( width, height);
00913     tc3.Set( 0,     height);
00914   } else {
00915     // y is flipped (MIP img orientation)
00916     tc0.Set(0,      height );
00917     tc1.Set( width, height );
00918     tc2.Set( width, 0);
00919     tc3.Set( 0,     0);
00920   };
00921
00922   // enable texture mapping:
00923   //glPushAttrib( texobj.target );
00924
00925 #ifdef BIAS_HAVE_GLEW
00926   glActiveTexture( GL_TEXTURE0 );
00927 #endif // BIAS_HAVE_GLEW
00928   // the rest of multitexturing is left to the caller
00929   glEnable( texobj.target );
00930   glBindTexture(texobj.target, texobj.id );
00931   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
00932   CHECK_GL_ERROR;
00933   glTexParameteri(texobj.target, GL_TEXTURE_MIN_FILTER, texobj.minificationMode);
00934   glTexParameteri(texobj.target, GL_TEXTURE_MAG_FILTER, texobj.magnificationMode);
00935   CHECK_GL_ERROR;
00936
00937   glColor3f(1, 1, 0); // pink - fallback color
00938   //const float z = -1.0;
00939   const float z = 0;
00940
00941 #ifdef BIAS_HAVE_GLEW
00942   // for multitexturing:
00943   const unsigned int maxTU=4;
00944   unsigned int i=0;
00945 #endif // BIAS_HAVE_GLEW
00946
00947   glBegin(GL_QUADS);
00948   glTexCoord2fv( &tc0[0] );
00949 #ifdef BIAS_HAVE_GLEW
00950   for (i=0; i<maxTU;i++)
00951     glMultiTexCoord2fv(GL_TEXTURE0+i, &tc0[0]);
00952 #endif // BIAS_HAVE_GLEW
00953   glVertex3f(-1,-1, z);
00954   glTexCoord2fv(&tc1[0]);
00955 #ifdef BIAS_HAVE_GLEW
00956   for (i=0; i<maxTU;i++)
00957     glMultiTexCoord2fv(GL_TEXTURE0+i, &tc1[0]);
00958 #endif // BIAS_HAVE_GLEW
00959   glVertex3f( 1,-1, z);
00960   glTexCoord2fv(&tc2[0]);
00961 #ifdef BIAS_HAVE_GLEW
00962   for (i=0; i<maxTU;i++)
00963     glMultiTexCoord2fv(GL_TEXTURE0+i, &tc2[0]);
00964 #endif // BIAS_HAVE_GLEW
00965   glVertex3f( 1, 1, z);
00966   glTexCoord2fv(&tc3[0]);
00967 #ifdef BIAS_HAVE_GLEW
00968   for (i=0; i<maxTU;i++)
00969     glMultiTexCoord2fv(GL_TEXTURE0+i, &tc3[0]);
00970 #endif // BIAS_HAVE_GLEW
00971   glVertex3f(-1, 1, z);
00972   glEnd();
00973   // texmapping done.
00974   //glPopAttrib();
00975   glDisable( texobj.target );
00976
00977   CHECK_GL_ERROR;
00978 }
00979
00980
00981 void GeometryGL::CreateSampleDisplayListScene(int & dplistID)
00982 {
00983 #ifndef BIAS_HAVE_GLUT
00984   BIASERR("not implemented without glut, please recompile BIAS with USE_GLUT to see a a fancy dispal ylist scene !");
00985   dplistID=0;
00986 #else // BIAS_HAVE_GLUT
00987
00988   // init once:
00989   static bool initDone=false;
00990   if(initDone)
00991     return;
00992
00993   // do init
00994   CHECK_GL_ERROR;
00995   // example for an OpenGL display list
00996   dplistID = glGenLists(1); // identifier
00997   glNewList(dplistID, GL_COMPILE ); // or: GL_COMPILE_AND_EXECUTE
00998   {
00999     // light source proeprties for enabled lighting:
01000     // specified pos by w=1, direction by w=0:
01001     GLfloat light_position0[]     = {10.0f, 10.0, 10.0f, 0.0f}; // w=0: direction
01002     GLfloat light_maincolor0[]    = {1.0f, 1.0, 1.0f, 1.0f};
01003     GLfloat light_ambientcolor0[] = {0.4f, 0.2f, 0.2f, 1.0f};
01004
01005     // GL create light 0
01006     glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
01007     glLightfv(GL_LIGHT0, GL_DIFFUSE,  light_maincolor0);
01008     glLightfv(GL_LIGHT0, GL_SPECULAR, light_maincolor0);
01009     glLightfv(GL_LIGHT0, GL_AMBIENT,  light_ambientcolor0);
01010
01011     glEnable(GL_LIGHT0);
01012     glEnable(GL_LIGHTING); // may be switched on/off for every object
01013     glEnable(GL_DEPTH_TEST); // depth buffer occlusions of objects
01014
01015     // material properties for enabled lighting:
01016     GLfloat paintcolor0[]    = { 0.9, 0.2, 0.5, 1.0};
01017     GLfloat specularcolor0[] = { 1.0, 1.0, 1.0, 1.0};
01018     GLfloat shininess0[]     = { 70. }; // 1..128, large values make smaller specular highlights
01019
01020     GLfloat paintcolor1[]    = { 0.3, 0.9, 0.4, 1.0};
01021     GLfloat paintcolor2[]    = { 0.1, 0.2, 0.9, 0.5};
01022     GLfloat paintcolor3[]    = { 0.5, 0.0, 0.5, 1.0};
01023
01024     glMatrixMode(GL_MODELVIEW);
01025     glPushMatrix();
01026
01027     //// activate material properties:
01028     glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specularcolor0);
01029     glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess0);
01030     glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
01031       paintcolor0);
01032     glColor4fv(paintcolor0);
01033
01034     // draw geometry
01035     BIAS::Vector3<float> dtea(-0.5,-0.2,0);
01036     // position of the scene "modeling" matrix
01037     glTranslatef( dtea[0], dtea[1], dtea[2] );
01038     // teapot has strange vertex ordering for historical reasons
01039     glFrontFace(GL_CW);
01040     glutSolidTeapot(0.6);
01041     glFrontFace(GL_CCW);
01042
01043     glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
01044       paintcolor1 );
01045     glColor4fv(paintcolor1);
01046
01047     glTranslatef( -2*dtea[0], -2*dtea[1], -2*dtea[2] );
01048     glFrontFace(GL_CW);
01049     glutSolidTeapot(0.3);
01050     glFrontFace(GL_CCW);
01051     glTranslatef( dtea[0], dtea[1], dtea[2] );
01052     // back on origin
01053
01054     // activate material properties:
01055     glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, paintcolor2);
01056     glColor4fv(paintcolor2);
01057
01058     glTranslatef(0,0,-2);
01059     glutSolidSphere(0.8, 30, 60);
01060     glTranslatef(0,0, 2); // back to origin
01061
01062     glTranslatef( 1,0,-3);
01063     glutSolidSphere(0.5, 50, 100);
01064     glTranslatef(-1,0, 3);// back to origin
01065
01066
01067     glTranslatef(0,2,0);
01068     glutSolidCube(0.7);
01069     glTranslatef(0,-2,0);
01070
01071     glTranslatef(0,-1,0);
01072     glutSolidIcosahedron();
01073     glTranslatef(0, 1,0);
01074
01075     glTranslatef(0,-2.2,0);
01076     glutSolidTetrahedron();
01077     glTranslatef(0, 2.2,0);
01078
01079     // environment sphere to demonstrate back face
01080     glColor4fv( paintcolor3 );
01081     glutSolidSphere(75.0, 50, 100);
01082
01083     glPopMatrix();
01084   }
01085   glEndList();
01086
01087   CHECK_GL_ERROR;
01088   initDone=true;
01089 #endif // BIAS_HAVE_GLUT
01090 }
01091
01092
01093 void GeometryGL::DisplayCallsSampleDisplayListScene(const double & curTime)
01094 {
01095   //CALLINFO;
01096   CHECK_GL_ERROR;
01097   static int dplist = -1;
01098
01099   // setup scenen as one displaylist
01100   BIAS::GeometryGL::CreateSampleDisplayListScene(dplist);
01101
01102
01103   CHECK_GL_ERROR;
01104   {
01105     if(glIsList(dplist) == GL_TRUE)
01106     {
01107       // animation: rotate the scene (not the camera) by using global time as angle:
01108       // thus light and camera stay in the same place
01109       {
01110         const float cycletime=10.0; // approx. sec for a full cycle
01111         const float angleM = fmodf( float(2.0*360.0/cycletime *curTime), 2.0*360.0);
01112         if (angleM<=360.0){
01113           glRotatef( angleM,       0.0f, 1.0f, 0.0f );
01114         } else {
01115           glRotatef( angleM-360.0f, 1.0f, 0.0f, 0.0f );
01116         }
01117       }
01118
01119       //// interpolate between vertices
01120       //glShadeModel(GL_SMOOTH);
01121       glCallList(dplist);
01122
01123       // no interpolation between vertices
01124       //glTranslatef(0.3,0.2,0.2);
01125       //glShadeModel(GL_FLAT);
01126       //glCallList(dplist);
01127
01128       DisplayCoordCross();
01129
01130     } else {
01131       BIASERR("invalid display list dplist="<<dplist);
01132     }
01133
01134     //glPopAttrib();
01135   }
01136 }
01137
01138
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GeometryGL.hh Source File

Gui

GeometryGL.hh

Go to the documentation of this file.
00001 #ifndef __GeometryGL_hh__
00002 #define __GeometryGL_hh__
00003
00004 // ----------------------------------------------------------
00005 // @author Jan Woetzel (c)  09/2003
00006 // all rights reserved
00007
00008 #include <bias_config.h>
00009
00010 #ifndef BIAS_HAVE_OPENGL
00011 #  error Please recompile BIAS with USE_OPENGL to use this lib.
00012 #endif // BIAS_HAVE_OPENGL
00013
00014
00015 // STD
00016 #include <vector>
00017 #include <iostream>
00018
00019 #include <Base/Math/Vector3.hh>
00020 #include <Geometry/PMatrix.hh>
00021
00022 #include <Gui/ImgObjGL.hh>
00023 #include <Gui/RenderModeGL.hh>
00024
00025 #ifdef BIAS_HAVE_FONTGL
00026 #  include <Gui/DrawTextGL.hh>
00027 #endif // BIAS_HAVE_FONTGL
00028
00029
00030 #ifndef VISIBLEALPHA
00031 #  define VISIBLEALPHA 0.0
00032 #endif
00033
00034 // used by OpenGLInfo:
00035 #define MAX_GL_DISPLIST_ID 1000
00036 #define MAX_GL_TEXOBJ_ID   1000
00037
00038 namespace BIAS {
00039
00040   // corners:
00041   enum CornerIndices {
00042     LOWER_LEFT=0
00043     ,LOWER_RIGHT
00044     ,UPPER_RIGHT
00045     ,UPPER_LEFT
00046     ,OPTICAL_CENTER
00047   };
00048
00049
00050   // jw ---------------------------------------------------------
00051   /** @brief Reusable Geometry an drawing functions for OpenGL
00052   @author Jan Woetzel */
00053   class BIASGui_EXPORT GeometryGL {
00054   public:
00055     /// destructor
00056     virtual ~GeometryGL();
00057
00058     /// ctor
00059     GeometryGL();
00060
00061     /// utility functions
00062
00063     /// deps to glut:
00064     //static void DisplayTeapotLit(const float & size=0.5f, const bool & solid=true);
00065     //static void DisplaySceneExampleLit(const bool & UseResetView=false);
00066
00067     static void DisplayClear();
00068
00069     static void DisplayRenderMode(const BIAS::RenderModeGL  & m);
00070
00071     /** draw a coord cross as three lines in r,g,b
00072     @param withAxes Label true to draw x/y/Z text as axes label JW */
00073     static void DisplayCoordCross(const float & size=1.0f,
00074       const float & linewidth=1.0f );
00075
00076 #ifdef BIAS_HAVE_FONTGL
00077     /** draw only teh axes labels for a coord cross as text in r,g,b JW */
00078     static void DisplayCoordCrossAxesLabel(const float & size,
00079       const BIAS::DrawTextGL & font,
00080       const std::string & LabelX=std::string("x"),
00081       const std::string & LabelY=std::string("y"),
00082       const std::string & LabelZ=std::string("z") );
00083
00084     /** draw coord cross with labels in r,g,b JW */
00085     static void DisplayCoordCross(const float & size,
00086       const float & linewidth,
00087       const BIAS::DrawTextGL & font,
00088       const std::string & LabelX=std::string("x"),
00089       const std::string & LabelY=std::string("y"),
00090       const std::string & LabelZ=std::string("z") );
00091
00092 #endif
00093
00094     static void DisplayCameraInternalParams(
00095       const int & x0,
00096       const int & y0,
00097       const unsigned int & width,
00098       const unsigned int & height,
00099       const float & fovY,
00100       const float & zNear,
00101       const float & zFar );
00102
00103     static void DisplayCameraExternalParams(BIAS::PMatrix & P);
00104
00105     static void DisplayCameraExternalParams(const BIAS::Vector3<double> & C,
00106       const BIAS::Vector3<double> & up,
00107       const BIAS::Vector3<double> & a);
00108
00109     /// print GL state information and displaylist and texture information to os
00110     static void GetInfoGL(std::ostream & os);
00111
00112     static BIAS::Vector3<double> GetImgCorner3d(BIAS::PMatrix & P
00113       ,const unsigned int & width
00114       ,const unsigned int & height
00115       ,const unsigned int & corner
00116       ,const double & scale );
00117
00118     static BIAS::Vector2<double> GetImgCorner2d( const unsigned int & w
00119       ,const unsigned int & h
00120       ,const unsigned int & corner
00121       ,const int texMode
00122       ,const bool flipY );
00123
00124     static void DisplayP(BIAS::PMatrix & P
00125       ,const unsigned int & w
00126       ,const unsigned int & h
00127       ,const double & scale
00128       ,const float & linewidth=1.0f );
00129
00130     /// time dependant scene for samples
00131     static void DisplaySimpleAnimation(const double & time);
00132
00133     // time independant scene for samples
00134     static void DisplaySceneExampleSimple();
00135
00136     /// draws a pkane with attched texture coordinates
00137     static void DisplayImgPlaneTextured(BIAS::PMatrix & P
00138       ,const unsigned int & w
00139       ,const unsigned int & h
00140       ,const int & texID
00141       ,const int & texTarget
00142       ,const double & scale
00143       ,const bool & flipY
00144       ,const BIAS::Vector4<float> & vertexColor=BIAS::Vector4<float>(1.0,0.0,1.0, 0.0)
00145       );
00146
00147     /** compose an OpenGL 4x4 (projective) texture matrix
00148     @param useRECTcoord true to use RECT 0..npixels
00149     instead of 0..1 normalized pw2 texture coordinate JW  */
00150     static BIAS::Matrix4x4<double>
00151       CreateTextureMatrix(BIAS::PMatrix & P
00152       ,const unsigned int w
00153       ,const unsigned int h
00154       ,const bool & useRECTcoord=false );
00155
00156     static void DisplayQuadTexCoord2D(const BIAS::ImgObjGL & texobj,
00157       const bool & additionalFlipY );
00158
00159     static void DisplayQuadTexCoord2DFull(const BIAS::ImgObjGL & texobj,
00160       const bool & additionalFlipY);
00161
00162     /// creates a sample scene as one dispaly list returned in dplistID once
00163     /// the arg is kept as it is if initialization was done before.
00164     static void CreateSampleDisplayListScene(int & dplistID);
00165
00166     // displays a simple displa ylist scene with animation
00167     static void DisplayCallsSampleDisplayListScene(const double & curTime);
00168
00169   };
00170 } // namespace BIAS
00171 #endif
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_long_W32.cpp Source File

Base » Common

getopt_long_W32.cpp

Go to the documentation of this file.
00001 // must be first:
00002 //#include "precompiled.h"
00003
00004 /*  $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $  */
00005 /*  $FreeBSD: src/lib/libc/stdlib/getopt_long.c,v 1.2 2002/10/16 22:18:42 alfred Exp $ */
00006
00007 /*-
00008  * Copyright (c) 2000 The NetBSD Foundation, Inc.
00009  * All rights reserved.
00010  *
00011  * This code is derived from software contributed to The NetBSD Foundation
00012  * by Dieter Baron and Thomas Klausner.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions
00016  * are met:
00017  * 1. Redistributions of source code must retain the above copyright
00018  *    notice, this list of conditions and the following disclaimer.
00019  * 2. Redistributions in binary form must reproduce the above copyright
00020  *    notice, this list of conditions and the following disclaimer in the
00021  *    documentation and/or other materials provided with the distribution.
00022  * 3. All advertising materials mentioning features or use of this software
00023  *    must display the following acknowledgement:
00024  *        This product includes software developed by the NetBSD
00025  *        Foundation, Inc. and its contributors.
00026  * 4. Neither the name of The NetBSD Foundation nor the names of its
00027  *    contributors may be used to endorse or promote products derived
00028  *    from this software without specific prior written permission.
00029  *
00030  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
00031  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00032  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00033  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
00034  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00035  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00036  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00037  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00038  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00039  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00040  * POSSIBILITY OF SUCH DAMAGE.
00041  */
00042
00043 #define _CRT_SECURE_NO_DEPRECATE
00044 #include <stdio.h>
00045
00046 #include "getopt_W32.h"
00047 #include <stdlib.h>
00048 #include <string.h>
00049
00050 #ifdef _WIN32
00051
00052 /* Windows needs warnx().  We change the definition though:
00053  *  1. (another) global is defined, opterrmsg, which holds the error message
00054  *  2. errors are always printed out on stderr w/o the program name
00055  * Note that opterrmsg always gets set no matter what opterr is set to.  The
00056  * error message will not be printed if opterr is 0 as usual.
00057  */
00058
00059 #include <stdio.h>
00060 #include <stdarg.h>
00061
00062 extern char opterrmsg[128];
00063 char opterrmsg[128]; /* last error message is stored here */
00064
00065 static void warnx(int print_error, const char *fmt, ...)
00066 {
00067     va_list ap;
00068     va_start(ap, fmt);
00069     if (fmt != NULL)
00070         _vsnprintf(opterrmsg, 128, fmt, ap);
00071     else
00072         opterrmsg[0]='\0';
00073     va_end(ap);
00074     if (print_error) {
00075         fprintf(stderr, opterrmsg);
00076         fprintf(stderr, "\n");
00077     }
00078 }
00079
00080 #endif /*_WIN32*/
00081
00082 /* not part of the original file */
00083 #ifndef _DIAGASSERT
00084 #  define _DIAGASSERT(X)
00085 #endif
00086
00087 #if HAVE_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND
00088 #  define REPLACE_GETOPT
00089 #endif
00090
00091 #ifdef REPLACE_GETOPT
00092 #  ifdef __weak_alias
00093      __weak_alias(getopt,_getopt)
00094 #  endif
00095
00096   int   opterr = 1;     /* if error message should be printed */
00097   int   optind = 1;     /* index into parent argv vector */
00098   int   optopt = '?';       /* character checked for validity */
00099   int   optreset;       /* reset getopt */
00100   char    *optarg;      /* argument associated with option */
00101 #elif HAVE_CONFIG_H && !HAVE_DECL_OPTRESET
00102   static int optreset;
00103 #endif
00104
00105 #ifdef __weak_alias
00106 __weak_alias(getopt_long,_getopt_long)
00107 #endif
00108
00109 #if !HAVE_GETOPT_LONG
00110 #define IGNORE_FIRST    (*options == '-' || *options == '+')
00111 #define PRINT_ERROR ((opterr) && ((*options != ':') \
00112                       || (IGNORE_FIRST && options[1] != ':')))
00113 #define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
00114 #define PERMUTE         (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
00115 /* XXX: GNU ignores PC if *options == '-' */
00116 #define IN_ORDER        (!IS_POSIXLY_CORRECT && *options == '-')
00117
00118 /* return values */
00119 #define BADCH   (int)'?'
00120 #define BADARG      ((IGNORE_FIRST && options[1] == ':') \
00121              || (*options == ':') ? (int)':' : (int)'?')
00122 #define INORDER (int)1
00123
00124 #define EMSG    ""
00125
00126 static int getopt_internal(int, char * const *, const char *);
00127 static int gcd(int, int);
00128 static void permute_args(int, int, int, char * const *);
00129
00130 static char *place = EMSG; /* option letter processing */
00131
00132 /* XXX: set optreset to 1 rather than these two */
00133 static int nonopt_start = -1; /* first non option argument (for permute) */
00134 static int nonopt_end = -1;   /* first option after non options (for permute) */
00135
00136 /* Error messages */
00137 static const char recargchar[] = "option requires an argument -- %c";
00138 static const char recargstring[] = "option requires an argument -- %s";
00139 static const char ambig[] = "ambiguous option -- %.*s";
00140 static const char noarg[] = "option doesn't take an argument -- %.*s";
00141 static const char illoptchar[] = "unknown option -- %c";
00142 static const char illoptstring[] = "unknown option -- %s";
00143
00144
00145 /*
00146  * Compute the greatest common divisor of a and b.
00147  */
00148 static int
00149 gcd(int a, int b)
00150 {
00151     int c;
00152
00153     c = a % b;
00154     while (c != 0) {
00155         a = b;
00156         b = c;
00157         c = a % b;
00158     }
00159
00160     return b;
00161 }
00162
00163 /*
00164  * Exchange the block from nonopt_start to nonopt_end with the block
00165  * from nonopt_end to opt_end (keeping the same order of arguments
00166  * in each block).
00167  */
00168 static void
00169 permute_args(int panonopt_start, int panonopt_end,int opt_end, char * const * nargv)
00170 {
00171     int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
00172     char *swap;
00173
00174     _DIAGASSERT(nargv != NULL);
00175
00176     /*
00177      * compute lengths of blocks and number and size of cycles
00178      */
00179     nnonopts = panonopt_end - panonopt_start;
00180     nopts = opt_end - panonopt_end;
00181     ncycle = gcd(nnonopts, nopts);
00182     cyclelen = (opt_end - panonopt_start) / ncycle;
00183
00184     for (i = 0; i < ncycle; i++) {
00185         cstart = panonopt_end+i;
00186         pos = cstart;
00187         for (j = 0; j < cyclelen; j++) {
00188             if (pos >= panonopt_end)
00189                 pos -= nnonopts;
00190             else
00191                 pos += nopts;
00192             swap = nargv[pos];
00193             /* LINTED const cast */
00194             ((char **) nargv)[pos] = nargv[cstart];
00195             /* LINTED const cast */
00196             ((char **)nargv)[cstart] = swap;
00197         }
00198     }
00199 }
00200
00201 /*
00202  * getopt_internal --
00203  *  Parse argc/argv argument vector.  Called by user level routines.
00204  *  Returns -2 if -- is found (can be long option or end of options marker).
00205  */
00206 static
00207 int getopt_internal (int nargc, char * const *nargv, const char *options)
00208 {
00209     char *oli;              /* option letter list index */
00210     int optchar;
00211
00212     _DIAGASSERT(nargv != NULL);
00213     _DIAGASSERT(options != NULL);
00214
00215     optarg = NULL;
00216
00217     /*
00218      * XXX Some programs (like rsyncd) expect to be able to
00219      * XXX re-initialize optind to 0 and have getopt_long(3)
00220      * XXX properly function again.  Work around this braindamage.
00221      */
00222     if (optind == 0)
00223         optind = 1;
00224
00225     if (optreset)
00226         nonopt_start = nonopt_end = -1;
00227 start:
00228     if (optreset || !*place) {      /* update scanning pointer */
00229         optreset = 0;
00230         if (optind >= nargc) {          /* end of argument vector */
00231             place = EMSG;
00232             if (nonopt_end != -1) {
00233                 /* do permutation, if we have to */
00234                 permute_args(nonopt_start, nonopt_end,
00235                     optind, nargv);
00236                 optind -= nonopt_end - nonopt_start;
00237             }
00238             else if (nonopt_start != -1) {
00239                 /*
00240                  * If we skipped non-options, set optind
00241                  * to the first of them.
00242                  */
00243                 optind = nonopt_start;
00244             }
00245             nonopt_start = nonopt_end = -1;
00246             return -1;
00247         }
00248         if ((*(place = nargv[optind]) != '-')
00249             || (place[1] == '\0')) {    /* found non-option */
00250             place = EMSG;
00251             if (IN_ORDER) {
00252                 /*
00253                  * GNU extension:
00254                  * return non-option as argument to option 1
00255                  */
00256                 optarg = nargv[optind++];
00257                 return INORDER;
00258             }
00259             if (!PERMUTE) {
00260                 /*
00261                  * if no permutation wanted, stop parsing
00262                  * at first non-option
00263                  */
00264                 return -1;
00265             }
00266             /* do permutation */
00267             if (nonopt_start == -1)
00268                 nonopt_start = optind;
00269             else if (nonopt_end != -1) {
00270                 permute_args(nonopt_start, nonopt_end,
00271                     optind, nargv);
00272                 nonopt_start = optind -
00273                     (nonopt_end - nonopt_start);
00274                 nonopt_end = -1;
00275             }
00276             optind++;
00277             /* process next argument */
00278             goto start;
00279         }
00280         if (nonopt_start != -1 && nonopt_end == -1)
00281             nonopt_end = optind;
00282         if (place[1] && *++place == '-') {  /* found "--" */
00283             place++;
00284             return -2;
00285         }
00286     }
00287     if ((optchar = (int)*place++) == (int)':' ||
00288         (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {
00289         /* option letter unknown or ':' */
00290         if (!*place)
00291             ++optind;
00292 #ifndef _WIN32
00293         if (PRINT_ERROR)
00294             warnx(illoptchar, optchar);
00295 #else
00296             warnx(PRINT_ERROR, illoptchar, optchar);
00297 #endif
00298         optopt = optchar;
00299         return BADCH;
00300     }
00301     if (optchar == 'W' && oli[1] == ';') {      /* -W long-option */
00302         /* XXX: what if no long options provided (called by getopt)? */
00303         if (*place)
00304             return -2;
00305
00306         if (++optind >= nargc) {    /* no arg */
00307             place = EMSG;
00308 #ifndef _WIN32
00309             if (PRINT_ERROR)
00310                 warnx(recargchar, optchar);
00311 #else
00312                 warnx(PRINT_ERROR, recargchar, optchar);
00313 #endif
00314             optopt = optchar;
00315             return BADARG;
00316         } else              /* white space */
00317             place = nargv[optind];
00318         /*
00319          * Handle -W arg the same as --arg (which causes getopt to
00320          * stop parsing).
00321          */
00322         return -2;
00323     }
00324     if (*++oli != ':') {            /* doesn't take argument */
00325         if (!*place)
00326             ++optind;
00327     } else {                /* takes (optional) argument */
00328         optarg = NULL;
00329         if (*place)         /* no white space */
00330             optarg = place;
00331         /* XXX: disable test for :: if PC? (GNU doesn't) */
00332         else if (oli[1] != ':') {   /* arg not optional */
00333             if (++optind >= nargc) {    /* no arg */
00334                 place = EMSG;
00335 #ifndef _WIN32
00336                 if (PRINT_ERROR)
00337                     warnx(recargchar, optchar);
00338 #else
00339                     warnx(PRINT_ERROR, recargchar, optchar);
00340 #endif
00341                 optopt = optchar;
00342                 return BADARG;
00343             } else
00344                 optarg = nargv[optind];
00345         }
00346         place = EMSG;
00347         ++optind;
00348     }
00349     /* dump back option letter */
00350     return optchar;
00351 }
00352
00353 #ifdef REPLACE_GETOPT
00354 /*
00355  * getopt --
00356  *  Parse argc/argv argument vector.
00357  *
00358  * [eventually this will replace the real getopt]
00359  */
00360 int
00361 BIASCommon_EXPORT getopt(nargc, nargv, options)
00362     int nargc;
00363     char * const *nargv;
00364     const char *options;
00365 {
00366     int retval;
00367
00368     _DIAGASSERT(nargv != NULL);
00369     _DIAGASSERT(options != NULL);
00370
00371     if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
00372         ++optind;
00373         /*
00374          * We found an option (--), so if we skipped non-options,
00375          * we have to permute.
00376          */
00377         if (nonopt_end != -1) {
00378             permute_args(nonopt_start, nonopt_end, optind,
00379                        nargv);
00380             optind -= nonopt_end - nonopt_start;
00381         }
00382         nonopt_start = nonopt_end = -1;
00383         retval = -1;
00384     }
00385     return retval;
00386 }
00387 #endif
00388
00389 /*
00390  * getopt_long --
00391  *  Parse argc/argv argument vector.
00392  */
00393 int
00394 getopt_long(int nargc, char * const * nargv, const char *options,
00395             const struct option *long_options, int *idx)
00396 {
00397     int retval;
00398
00399     _DIAGASSERT(nargv != NULL);
00400     _DIAGASSERT(options != NULL);
00401     _DIAGASSERT(long_options != NULL);
00402     /* idx may be NULL */
00403
00404     if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
00405         char *current_argv, *has_equal;
00406         size_t current_argv_len;
00407         int i, match;
00408
00409         current_argv = place;
00410         match = -1;
00411
00412         optind++;
00413         place = EMSG;
00414
00415         if (*current_argv == '\0') {        /* found "--" */
00416             /*
00417              * We found an option (--), so if we skipped
00418              * non-options, we have to permute.
00419              */
00420             if (nonopt_end != -1) {
00421                 permute_args(nonopt_start, nonopt_end,
00422                     optind, nargv);
00423                 optind -= nonopt_end - nonopt_start;
00424             }
00425             nonopt_start = nonopt_end = -1;
00426             return -1;
00427         }
00428         if ((has_equal = strchr(current_argv, '=')) != NULL) {
00429             /* argument found (--option=arg) */
00430             current_argv_len = has_equal - current_argv;
00431             has_equal++;
00432         } else
00433             current_argv_len = strlen(current_argv);
00434
00435         for (i = 0; long_options[i].name; i++) {
00436             /* find matching long option */
00437             if (strncmp(current_argv, long_options[i].name,
00438                 current_argv_len))
00439                 continue;
00440
00441             if (strlen(long_options[i].name) ==
00442                 (unsigned)current_argv_len) {
00443                 /* exact match */
00444                 match = i;
00445                 break;
00446             }
00447             if (match == -1)        /* partial match */
00448                 match = i;
00449             else {
00450                 /* ambiguous abbreviation */
00451 #ifndef _WIN32
00452                 if (PRINT_ERROR)
00453                     warnx(ambig, (int)current_argv_len,
00454                          current_argv);
00455 #else
00456                     warnx(PRINT_ERROR, ambig, (int)current_argv_len,
00457                          current_argv);
00458 #endif
00459                 optopt = 0;
00460                 return BADCH;
00461             }
00462         }
00463         if (match != -1) {          /* option found */
00464                 if (long_options[match].has_arg == no_argument
00465                 && has_equal) {
00466 #ifndef _WIN32
00467                 if (PRINT_ERROR)
00468                     warnx(noarg, (int)current_argv_len,
00469                          current_argv);
00470 #else
00471                     warnx(PRINT_ERROR, noarg, (int)current_argv_len,
00472                          current_argv);
00473 #endif
00474                 /*
00475                  * XXX: GNU sets optopt to val regardless of
00476                  * flag
00477                  */
00478                 if (long_options[match].flag == NULL)
00479                     optopt = long_options[match].val;
00480                 else
00481                     optopt = 0;
00482                 return BADARG;
00483             }
00484             if (long_options[match].has_arg == required_argument ||
00485                 long_options[match].has_arg == optional_argument) {
00486                 if (has_equal)
00487                     optarg = has_equal;
00488                 else if (long_options[match].has_arg ==
00489                     required_argument) {
00490                     /*
00491                      * optional argument doesn't use
00492                      * next nargv
00493                      */
00494                     optarg = nargv[optind++];
00495                 }
00496             }
00497             if ((long_options[match].has_arg == required_argument)
00498                 && (optarg == NULL)) {
00499                 /*
00500                  * Missing argument; leading ':'
00501                  * indicates no error should be generated
00502                  */
00503 #ifndef _WIN32
00504                 if (PRINT_ERROR)
00505                     warnx(recargstring, current_argv);
00506 #else
00507                     warnx(PRINT_ERROR, recargstring, current_argv);
00508 #endif
00509                 /*
00510                  * XXX: GNU sets optopt to val regardless
00511                  * of flag
00512                  */
00513                 if (long_options[match].flag == NULL)
00514                     optopt = long_options[match].val;
00515                 else
00516                     optopt = 0;
00517                 --optind;
00518                 return BADARG;
00519             }
00520         } else {            /* unknown option */
00521 #ifndef _WIN32
00522             if (PRINT_ERROR)
00523                 warnx(illoptstring, current_argv);
00524 #else
00525                 warnx(PRINT_ERROR, illoptstring, current_argv);
00526 #endif
00527             optopt = 0;
00528             return BADCH;
00529         }
00530         if (long_options[match].flag) {
00531             *long_options[match].flag = long_options[match].val;
00532             retval = 0;
00533         } else
00534             retval = long_options[match].val;
00535         if (idx)
00536             *idx = match;
00537     }
00538     return retval;
00539 }
00540 #endif /* !GETOPT_LONG */
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_W32.cpp Source File

Base » Common

getopt_W32.cpp

Go to the documentation of this file.
00001 // must be first:
00002 //#include <precompiled.h>
00003
00004 /*
00005 * Copyright (c) 1987, 1993, 1994
00006 *   The Regents of the University of California.  All rights reserved.
00007 *
00008 * Redistribution and use in source and binary forms, with or without
00009 * modification, are permitted provided that the following conditions
00010 * are met:
00011 * 1. Redistributions of source code must retain the above copyright
00012 *    notice, this list of conditions and the following disclaimer.
00013 * 2. Redistributions in binary form must reproduce the above copyright
00014 *    notice, this list of conditions and the following disclaimer in the
00015 *    documentation and/or other materials provided with the distribution.
00016 * 3. All advertising materials mentioning features or use of this software
00017 *    must display the following acknowledgement:
00018 *   This product includes software developed by the University of
00019 *   California, Berkeley and its contributors.
00020 * 4. Neither the name of the University nor the names of its contributors
00021 *    may be used to endorse or promote products derived from this software
00022 *    without specific prior written permission.
00023 *
00024 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00025 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00027 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00030 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00031 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00033 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00034 * SUCH DAMAGE.
00035 */
00036
00037 //#include <bias_config.h>
00038
00039 #include "getopt_W32.h"
00040 #include <stdio.h>
00041 #include <stdlib.h>
00042 #include <string.h>
00043
00044 // DLL (JW)
00045
00046 BIASCommon_EXPORT int   opterr = 1;     /* if error message should be printed */
00047 BIASCommon_EXPORT int   optind = 1;     /* index into parent argv vector */
00048 BIASCommon_EXPORT int   optopt;         /* character checked for validity */
00049 BIASCommon_EXPORT int   optreset;       /* reset getopt */
00050 BIASCommon_EXPORT char * optarg; /* argument associated with option */
00051
00052 #define BADCH   (int)'?'
00053 #define BADARG  (int)':'
00054 #define EMSG    ""
00055
00056 /*
00057 * getopt --
00058 *   Parse argc/argv argument vector.
00059 */
00060 int
00061 getopt(int nargc,
00062        char * const *nargv,
00063        const char *ostr )
00064 {
00065   static char *place = EMSG;        /* option letter processing */
00066   char *oli;                /* option letter list index */
00067
00068   if (optreset || !*place) {        /* update scanning pointer */
00069     optreset = 0;
00070     if (optind >= nargc || *(place = nargv[optind]) != '-') {
00071       place = EMSG;
00072       return (-1);
00073     }
00074     if (place[1] && *++place == '-') {  /* found "--" */
00075       ++optind;
00076       place = EMSG;
00077       return (-1);
00078     }
00079   }
00080   /* option letter okay? */
00081   optopt = (int)*place;
00082   place++;
00083   oli = strchr(ostr, optopt);
00084   if (optopt == (int)':' ||
00085     !oli )
00086   {
00087     /*
00088     * if the user didn't specify '-' as an option,
00089     * assume it means -1.
00090     */
00091     if (optopt == (int)'-')
00092       return (-1);
00093     if (!*place)
00094       ++optind;
00095     if (opterr && *ostr != ':' && optopt != BADCH)
00096       (void)fprintf(stderr, "%s: illegal option -- %c\n",
00097       "progname", optopt);
00098     return (BADCH);
00099   }
00100   if (*++oli != ':') {          /* don't need argument */
00101     optarg = NULL;
00102     if (!*place)
00103       ++optind;
00104   }
00105   else {                    /* need an argument */
00106     if (*place)         /* no white space */
00107       optarg = place;
00108     else if (nargc <= ++optind) {   /* no arg */
00109       place = EMSG;
00110       if (*ostr == ':')
00111         return (BADARG);
00112       if (opterr)
00113         (void)fprintf(stderr,
00114         "%s: option requires an argument -- %c\n",
00115         "progname", optopt);
00116       return (BADCH);
00117     }
00118     else                /* white space */
00119       optarg = nargv[optind];
00120     place = EMSG;
00121     ++optind;
00122   }
00123   return (optopt);          /* dump back option letter */
00124 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/getopt_W32.h Source File

Base » Common

getopt_W32.h

Go to the documentation of this file.
00001 /*      $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $    */
00002 /*      $FreeBSD: src/include/getopt.h,v 1.1 2002/09/29 04:14:30 eric Exp $ */
00003
00004 /*-
00005  * Copyright (c) 2000 The NetBSD Foundation, Inc.
00006  * All rights reserved.
00007  *
00008  * This code is derived from software contributed to The NetBSD Foundation
00009  * by Dieter Baron and Thomas Klausner.
00010  *
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions
00013  * are met:
00014  * 1. Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  * 2. Redistributions in binary form must reproduce the above copyright
00017  *    notice, this list of conditions and the following disclaimer in the
00018  *    documentation and/or other materials provided with the distribution.
00019  * 3. All advertising materials mentioning features or use of this software
00020  *    must display the following acknowledgement:
00021  *        This product includes software developed by the NetBSD
00022  *        Foundation, Inc. and its contributors.
00023  * 4. Neither the name of The NetBSD Foundation nor the names of its
00024  *    contributors may be used to endorse or promote products derived
00025  *    from this software without specific prior written permission.
00026  *
00027  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
00028  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00029  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00030  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
00031  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00032  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00033  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00034  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00035  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00036  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037  * POSSIBILITY OF SUCH DAMAGE.
00038  */
00039 /* I (friso) found this on the net and adapted it to our needs
00040   - removed GETOP_API declspec(dllimport)
00041   - changed names to *_W32, adapted includes
00042   2005/10: DLL fixes  (Jan Woetzel)
00043 */
00044
00045 #ifndef _GETOPT_H_
00046 #define _GETOPT_H_
00047
00048 #if defined(_WIN32) && defined(__cplusplus)
00049 extern "C" {
00050 #endif // defined(_WIN32) && defined(__cplusplus)
00051
00052
00053 #define __P(args)      args
00054
00055
00056 #include <bias_config.h>
00057
00058 /*
00059  * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
00060  */
00061 #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
00062 #  define no_argument        0
00063 #  define required_argument  1
00064 #  define optional_argument  2
00065
00066   struct option {
00067         /* name of long option */
00068         const char *name;
00069         /*
00070          * one of no_argument, required_argument, and optional_argument:
00071          * whether option takes an argument
00072          */
00073         int has_arg;
00074         /* if not NULL, set *flag to val when option found */
00075         int *flag;
00076         /* if flag not NULL, value to set *flag to; else return value */
00077         int val;
00078   };
00079
00080 BIASCommon_EXPORT int getopt_long (int, char * const *, const char *, const struct option *, int *);
00081
00082 #endif // !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
00083
00084
00085 #ifdef _WIN32
00086 /* These are global getopt variables */
00087
00088 // DLL (JW)
00089 BIASCommon_EXPORT extern int opterr;   /* if error message should be printed */
00090 BIASCommon_EXPORT extern int optind;   /* index into parent argv vector */
00091 BIASCommon_EXPORT extern int optopt;   /* character checked for validity */
00092 BIASCommon_EXPORT extern int optreset; /* reset getopt */
00093 BIASCommon_EXPORT extern char* optarg;   /* argument associated with option */
00094
00095 /* Original getopt */
00096 BIASCommon_EXPORT int getopt (int, char * const *, const char *);
00097
00098 //__END_DECLS
00099
00100 #endif // _WIN32
00101
00102
00103 #if defined(_WIN32) && defined(__cplusplus)
00104 } // of extern "C"
00105 #endif // defined(_WIN32) && defined(__cplusplus)
00106
00107 #endif // !_GETOPT_H_
00108
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/glcheck.h Source File

Gui

glcheck.h

Go to the documentation of this file.
00001 #ifndef _glcheck_h_
00002 #define _glcheck_h_
00003
00004 /** macros to check gl status.
00005
00006 To be used like this:
00007 \verbatim
00008   CHECK_GL:ERROR
00009 \endverbatim
00010 author: Jan Woetzel
00011 */
00012
00013 #include <bias_config.h>
00014
00015 #ifndef BIAS_HAVE_OPENGL
00016 #  error Please recompile BIAS with USE_OPENGL to use OpenGL.
00017 #endif // BIAS_HAVE_OPENGL
00018
00019 #include <Gui/biasgl.h>
00020 #include <GL/glu.h> // for gluErrorString
00021
00022
00023
00024 // BIAS ERR stream:
00025 #include <Base/Debug/Error.hh>
00026
00027 // STD for output of macros:
00028 #include <string>
00029 #include <sstream>
00030 #include <iostream>
00031
00032
00033 // ---------------------------------------------------
00034 ///use this macro in your code to check for OpenGL errors with "click+jump"
00035 ///@author Jan Woetzel
00036 #if defined(BIAS_DEBUG) && defined(WIN32)
00037
00038 #define CHECK_GL_ERROR \
00039 {\
00040   GLenum lastErr = glGetError(); \
00041   if (lastErr!=GL_NO_ERROR) { \
00042     std::stringstream ss; \
00043     ss<<std::endl<<__FILE__<<"("<<__LINE__<<") : "<<FUNCNAME<<std::endl \
00044       <<"\tOpenGL Error: "<<(char *)gluErrorString(lastErr)<<std::endl; \
00045     ERROR_STREAM<<ss.str(); \
00046     OutputDebugString(ss.str().c_str()); \
00047   } \
00048 }
00049
00050 #elif defined(BIAS_DEBUG)
00051
00052 #define CHECK_GL_ERROR \
00053 {\
00054   GLenum lastErr = glGetError(); \
00055   if (lastErr!=GL_NO_ERROR) { \
00056     std::stringstream ss; \
00057     ss<<std::endl<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<std::endl \
00058       <<"\tOpenGL Error: "<<(char *)gluErrorString(lastErr)<<std::endl; \
00059     ERROR_STREAM<<ss.str(); \
00060   } \
00061 }
00062 #else
00063 // release: no output
00064 #  define CHECK_GL_ERROR
00065 #endif
00066
00067
00068
00069 #endif // _glcheck_h_
00070 // DO NOT ADD CODE AFTER THIS LINE
00071
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- j -

  • J_fp : win32_f2c.h, f2c_gnu011.h
  • JACOBI_THRESH : BackwardMapping.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- k -

  • K : InvestigateEpipoleEstimation.cpp
  • K_fp : win32_f2c.h, f2c_gnu011.h
  • KERNCENTER : Convolution.cpp
  • kernel : LGPL
  • KernelType : ExamplePyramidImage.cpp, ExampleCornerDetector.cpp
  • Kiel : LICENSE
  • KIND : LGPL
  • Kinv : InvestigateEpipoleEstimation.cpp
  • KLT_TYPE : TrackerBaseInterface.hh, TrackerBase.hh, RegionMatcher.hh
  • KMATRIX_TYPE : KMatrix.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- l -

  • L_fp : win32_f2c.h, f2c_gnu011.h
  • LABEL_CALC_TYPE : Label.hh
  • LABEL_STORAGE_TYPE : Label.hh
  • Lapack_LLS_QR_linear_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Lapack_LU_linear_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Lapack_WLLS_solve() : Lapack.hh, Lapack.cpp
  • LeadingZeroString() : FileHandling.cpp
  • LEAST_SQUARES : UnVignette.hh
  • LeftEdge : EpipolarLine.hh
  • LENS_PENTAX_CMOUNT_4_2 : VideoSource_DCAM.hh
  • LENS_PENTAX_CMOUNT_4_8 : VideoSource_DCAM.hh
  • LENS_PENTAX_CMOUNT_8_0 : VideoSource_DCAM.hh
  • LENS_SONY_DV_BUILTIN : VideoSource_DCAM.hh
  • LENS_SONY_EVID31_BUILTIN : VideoSource_DCAM.hh
  • LENS_UNKNOWN : VideoSource_DCAM.hh
  • LensModel : VideoSource_DCAM.hh
  • Less() : CompareFloatingPoint.hh
  • LessEqual() : CompareFloatingPoint.hh
  • LevenbergMarquardt() : Minpack.cpp
  • LevenbergMarquardtExtended() : Minpack.cpp
  • LIABILITY : LICENSE
  • libraries : LGPL
  • Library : LGPL
  • LIBRARY : LGPL
  • library : LGPL
  • License : LGPL
  • license : LGPL
  • License< LGPL.html >() : LICENSE
  • LINE : InvestigateEpipoleEstimation.cpp
  • linear_solve() : trisolve.h
  • LineDrawingStyle : ThreeDOut.hh
  • listControlPoints : interpolate.cpp
  • listenthread() : CScommServer.cpp
  • listT : interpolate.cpp
  • listX : interpolate.cpp
  • listY : interpolate.cpp
  • LM_DEF_MAX_ITER : Minpack.hh
  • LM_IMPROPER_INPUT : Minpack.hh
  • LM_OK : Minpack.hh
  • LM_SMALL_FTOL : Minpack.hh
  • LM_SMALL_GTOL : Minpack.hh
  • LM_SMALL_XTOL : Minpack.hh
  • LM_TOO_MANY_IT : Minpack.hh
  • lmder1_() : Minpack.cpp
  • lmder_() : Minpack.cpp
  • lmdif1_() : Minpack.cpp
  • lmdif_() : Minpack.cpp
  • loadFlowVectors() : Example7Point.cpp
  • LoadImage() : ExampleTrackerBase.cpp
  • LogCommandLine() : FileHandling.cpp
  • logical : win32_f2c.h, f2c_gnu011.h
  • logical1 : win32_f2c.h, f2c_gnu011.h
  • logstr : ShowCamWx.cpp
  • Long : win32_f2c.h
  • longint : win32_f2c.h
  • LOWER : EpipolarLine.hh
  • LOWER_LEFT : GeometryGL.hh
  • LOWER_RIGHT : GeometryGL.hh
  • Lower_triangular_solve() : trisolve.h
  • Lower_triangular_view() : triang.h
  • LowerCase() : FileHandling.cpp
  • LowPassType : FilterBase.hh
  • LPT_Binomial : FilterBase.hh
  • LPT_Gauss : FilterBase.hh
  • LPT_Mean : FilterBase.hh
  • LT_Invalid : EightWaySymmetry.hh
  • LU_factor() : lu.h
  • LU_solve() : lu.h
  • LUT_RES : ProjectionParametersPerspective.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- m -

  • M : Random.cpp
  • M1 : Random.cpp
  • m1 : ExamplePowell.cpp
  • M2 : Random.cpp
  • m2 : ExamplePowell.cpp
  • M3 : Random.cpp
  • main() : TestMIPVideoSource_Disk.cpp, showv4lcam.cpp, showmdcam.cpp, showdvcam.cpp, showdv2cam.cpp, showdcam16.cpp, showdcam.cpp, Scan1394Bus.cpp, ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp, ExampleVideoServer.cpp, ExampleVideofeedShm.cpp, ExampleMDCamToShm.cpp, ExampleDirectToDisk.cpp, ExampleCameraParameter.cpp, ParamExample.cpp, ExampleVRMLOutProjection.cpp, ExampleTriangleMesh.cpp, ExampleThreeDOutVRML.cpp, ExampleTFT.cpp, ExampleShowFreeD.cpp, ExampleMatchDataBase.cpp, ExampleGGTPlane.cpp, ExampleGGTCube.cpp, ExampleGenSynthMatches.cpp, timeit.cpp, pmatrix2projection.cpp, biasview.cpp, biasshowsm.cpp, biasshowepi.cpp, biassetuid.cpp, biassetprojection.cpp, biasprojection.cpp, biasmerge.cpp, biasinsert.cpp, biasfilter.cpp, biasextract.cpp, biasdiff.cpp, biasconvert.cpp, biasadd.cpp, testWarn.cpp, testLeak.cpp, testError.cpp, testEnv.cpp, testDefines.cpp, MathBaseOperators.cpp, helloconfig.cpp, ExampleKalman.cpp, condensImgExample.cpp, CondensHistoExample.cpp, serverExample.cpp, ExampleNetsync.cpp, clientExample.cpp, interpolate.cpp, ExampleWeightedLinearLeastSquares.cpp, ExampleUnscentedTransform.cpp, ExampleSVD3x3.cpp, ExampleSVD.cpp, ExampleRegressionPlane.cpp, ExampleRANSACPlane.cpp, ExampleRANSAC.cpp, ExamplePowell.cpp, ExamplePolynomialSolve.cpp, ExampleLeastSquares.cpp, ExampleInterpolateLuT.cpp, ExampleGSL.cpp, ExampleFFT.cpp, ExampleBSplineCurve.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExampleParabola.cpp, ExampleLineMatcher.cpp, ExampleKLTEdge.cpp, ExampleColorNCC.cpp, PMatrix2RigParameter.cpp, ExampleVideoStream.cpp, ExampleUnVignette.cpp, ExampleUndistort.cpp, ExampleSphereProjections.cpp, ExampleRigParameter.cpp, ExamplePyramidImage.cpp, ExampleProjectionMapping.cpp, ExamplePMDImageIO.cpp, ExampleMapPerspImages.cpp, ExampleLogPolarMapping.cpp, ExampleHomographyMapping.cpp, ExampleHistogram.cpp, ExampleFMT2D.cpp, ExampleFFT2D_Tiles.cpp, ExampleFFT2D.cpp, ExampleCylinderMapping.cpp, ExampleContour.cpp, ExampleCameraParam.cpp, ExampleCamera.cpp, TestMouse.cpp, TestGuiPyramid.cpp, TestGuiEnhanced.cpp, TestGui.cpp, ExampleMultipleGui.cpp, PMatrixTest.cpp, InvestigateEpipoleEstimation.cpp, HMatrixTest.cpp, FMatrixTest.cpp, ExampleTriangulateOptimal.cpp, ExampleTriangulate2.cpp, ExampleTriangulate.cpp, ExampleProjectionParametersIO.cpp, ExampleProjection.cpp, ExamplePMatrix.cpp, ExampleLoadBOG_P.cpp, ExampleLoadBBC.cpp, ExampleConic.cpp, Example7Point.cpp, ExampleUpsampleBy2Grey.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleMedian.cpp, ExampleHarrisColor.cpp, ExampleGradient.cpp, ExampleGauss.cpp, ExampleErosion.cpp, ExampleDistTransform.cpp, ExampleDilation.cpp, ExampleDeInterlace.cpp, ExampleConvolution.cpp, ExampleBinomial.cpp, ExampleCornerDetector.cpp, ExampleRandom2D.cpp, ExampleRandom2.cpp, ExampleRandom.cpp, ExamplePolynom.cpp, ExampleOperators.cpp, ExampleLoadBOG.cpp, ExampleLoadBan.cpp, viff2mip.cpp, mip2viff.cpp, ExampleUUID.cpp, ExampleTile.cpp, ExampleROI.cpp, ExampleMinMax.cpp, ExampleMetaData.cpp, ExampleIplWrapOpenCV.cpp, ExampleIplImageDraw.cpp, ExampleIplImageDisplay.cpp, ExampleIpl.cpp, ExampleInterpolation.cpp, ExampleImageOperator.cpp, ExampleImageMagickIO.cpp, ExampleImageLoad.cpp, ExampleImageAttributes.cpp, ExampleHSVConversion.cpp, ExampleForeignData.cpp, ExampleEmpty.cpp, ExampleDraw.cpp, ExampleConvert.cpp, ExampleChessboard.cpp, ExampleBresenham.cpp, convertRAW.cpp, ExampleRMatrix.cpp, ExampleQuaternion.cpp, ExamplePMatrixBase.cpp, ExampleTimeMeasureCycle.cpp, ExampleLogFacility.cpp, ExampleCopy.cpp, ExampleConstraints.cpp, DebugMyMain.cpp, ExampleXMLIO.cpp, ExampleXMLBase.cpp, ExampleFileNames.cpp, ExampleFactory.cpp, ExampleCompare.cpp
  • mainloop() : showv4lcam.cpp, showdvcam.cpp, showdv2cam.cpp, showdcam.cpp
  • MapAnisotropic : BackwardMapping.hh
  • MapBicubic : BackwardMapping.hh
  • MapBilinear : BackwardMapping.hh
  • MapNearestNeighbor : BackwardMapping.hh
  • MapTrilinear : BackwardMapping.hh
  • MarkEnhancedAndSetDefaults() : ExampleTracker3.cpp, ExampleTracker2.cpp
  • MASK_TYPE : ROI.hh
  • MATCH : InvestigateEpipoleEstimation.cpp
  • match1 : InvestigateEpipoleEstimation.cpp
  • match2 : InvestigateEpipoleEstimation.cpp
  • matmult() : triang.h, transv.h, fmat.h, cmat.h
  • Matrix : Vector.hh
  • MATRIX2X2_ZERO_EPS : Matrix2x2.cpp
  • MatrixIdentity : Matrix.hh
  • MatrixInitType : Matrix.hh
  • MatrixSqrt() : ExampleSVD.cpp
  • MatrixZero : Matrix.hh
  • max : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • MAX : SVD3x3.cpp
  • MAX_1394_CARDS : VideoSource_DV.hh, VideoSource_DCAM.hh
  • MAX_1394_CHANNELS : VideoSource_DV.hh, VideoSource_DCAM.hh
  • MAX_1394_SOURCES : VideoSource_DCAM.hh
  • MAX_CORNERS : CornerDetectorSusan.hh
  • MAX_DMABUFFERS : VideoSource_DCAM.hh
  • MAX_GL_DISPLIST_ID : GeometryGL.hh
  • MAX_GL_TEXOBJ_ID : GeometryGL.hh
  • MAX_LAB : Label.cpp
  • max_num_points : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • MAX_QUATERNION_COS_ERROR : RMatrixBase.cpp
  • MAX_SEG : Label.cpp
  • maxarg1 : SVD3x3.cpp
  • maxarg2 : SVD3x3.cpp
  • maxBinaryG : CScommBase.cpp
  • maxerr : ExamplePolynomialSolve.cpp
  • maxGain : ColorHistogram.cpp
  • MAXHEADERLINES : Camera.cpp
  • maxShutter : ColorHistogram.cpp
  • MD_LINE_LENGTH : MetaData.cpp
  • mean : biasfilter.cpp
  • meaningful() : LGPL
  • meas_noise : ExampleKalman.cpp
  • median : biasfilter.cpp
  • METER_PER_INCH : ImageAttributes.cpp
  • method : LGPL
  • min : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • MIN_EIGENVALUE_RATIO : LinearRegionDetector.cpp
  • minDEF : DistTransform.cpp
  • minGain : ColorHistogram.cpp
  • MINIMUM_ROTATION : Parametrization.hh, RMatrixBase.cpp
  • MINPACK_DEF_TOLERANCE : Minpack.hh
  • minShutter : ColorHistogram.cpp
  • MIP_DV_HEIGHT : ImageBase.hh, Image.hh
  • MIP_DV_WIDTH : ImageBase.hh, Image.hh
  • MIP_IDENTIFIER : ImageIO.hh
  • MIP_IDENTIFIER_LENGTH : ImageIO.hh
  • mirror() : ExampleFMT2D.cpp
  • MODCOEFF_MAX : PMDImageProc.cpp
  • MODCOEFF_MIN : PMDImageProc.cpp
  • modeAxis1 : CameraViewController.hh
  • modeAxis2 : CameraViewController.hh
  • modeAxis3 : CameraViewController.hh
  • modify : LGPL
  • MONO : RenderModeGL.hh
  • mp : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • MS_VC_EXCEPTION : ThreadNaming.cpp
  • mult_element() : fmat.h, cmat.h
  • Multitype : win32_f2c.h, f2c_gnu011.h
  • MY_DBL_PRECISION : EpipolarLine.cpp
  • my_error_exit() : CompressJpeg.cpp
  • my_error_ptr : CompressJpeg.cpp
  • MyConstTransform() : ExampleUnscentedTransform.cpp
  • myfunc() : ExamplePowell.cpp
  • mygetpid : CScommBase.hh
  • MyLeak1new() : testLeak.cpp
  • MyLeak2malloc() : testLeak.cpp
  • MyLinTransform() : ExampleUnscentedTransform.cpp
  • mymin : DistTransform.cpp
  • MyPowellFunc() : PolynomialSolve.cpp
  • MYSLEEP : ExampleNetsync.cpp
  • mysobel() : ColorHarris.cpp
  • mysobel2() : ColorHarris.cpp
  • MySqTransform() : ExampleUnscentedTransform.cpp
  • myTolower() : ImageIO.cpp
  • mytoplanar() : ColorHarris.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- n -

  • N_NW : EightWaySymmetry.hh
  • Namelist : win32_f2c.h, f2c_gnu011.h
  • names : LGPL
  • Navigationmode : CameraViewController.hh
  • NCC5x5 : RegionMatcher.hh
  • NDIV : Random.cpp
  • NE_N : EightWaySymmetry.hh
  • NearestNeighbour : Rescale.hh
  • no_argument : getopt_W32.h
  • noarg : getopt_long_W32.cpp
  • NoLeak1() : testLeak.cpp
  • NoLeak2() : testLeak.cpp
  • none : biasfilter.cpp
  • nonopt_end : getopt_long_W32.cpp
  • nonopt_start : getopt_long_W32.cpp
  • not : LGPL
  • NotDone : ExampleMDCamToShm.cpp
  • NTAB : Random.cpp
  • num : ExamplePowell.cpp
  • NUM_PARAM_ESSENTIAL : Parametrization.hh
  • number : LGPL
  • number_of_cols : ViffHeader.hh
  • number_of_rows : ViffHeader.hh
  • NW_W : EightWaySymmetry.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- o -

  • obligations : LGPL
  • offer : LGPL
  • OFFX : ExampleInterpolation.cpp
  • OFFY : ExampleInterpolation.cpp
  • on : LGPL, DEPENDENCIES
  • one : LGPL
  • ONE_OVER_LOG2 : BackwardMapping.cpp
  • OPENGLCANVAS_CONNECT_ONIDLE : OpenGLCanvas.hh
  • OPENGLCANVAS_DEFAULT_idleRepaintEnabled : OpenGLCanvas.hh
  • OPENGLCANVAS_DEFAULT_realtimeAnimation : OpenGLCanvas.hh
  • OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled : OpenGLCanvasBase.hh
  • OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE : OpenGLCanvasBase.hh
  • operates : LGPL
  • operator *() : SimilarityTransform.hh, vec.h, triang.h, transv.h, fmat.h, Polynom.hh
  • operator *=() : Vector2.hh
  • operator+() : vec.h, index.h, fmat.h, Polynom.hh, Operators.hh
  • operator+=() : Vector2.hh
  • operator-() : vec.h, index.h, fmat.h, Polynom.hh
  • operator-=() : Vector2.hh
  • operator/=() : Vector2.hh
  • operator<() : ExamplePolynomialSolve.cpp
  • operator<<() : MatchDataBase.hh, MatchDataBase.cpp, GenSynthMatches.hh, GenSynthMatches.cpp, TrackerBase.hh, TrackerBase.cpp, RigParameter.cpp, DCData.cpp, SimilarityTransform.hh, ProjectionParametersPerspective.hh, ProjectionParametersIO.hh, ProjectionParametersIO.cpp, ProjectionParametersBase.hh, Projection.hh, EpipolarLine.hh, EpipolarLine.cpp, CoordinateTransform3D.hh, Conic2D.hh, FilterMask.cpp, CornerDetectorGradient.hh, Vector4.hh, Vector2.hh, Vector.hh, vecadaptor.h, vec.h, triang.h, transv.h, region2d.h, region1d.h, fspvec.h, fmat.h, fcscmat.h, ROI.hh, ROI.cpp, MetaData.cpp, ImageBase.cpp, ImageAttributes.hh, ImageAttributes.cpp, ExifTag.hh, ExifTag.cpp, PoseParametrization.cpp, HomgPoint2D.hh, HomgPoint2D.cpp, BaseFactory.hh
  • operator==() : RMatrixBase.cpp
  • operator>>() : MatchDataBase.hh, MatchDataBase.cpp, DCData.cpp, SimilarityTransform.hh, Pose.hh, CoordinateTransform3D.hh, Vector4.hh, Vector2.hh, vecadaptor.h, vec.h, fspvec.h, fmat.h, Matrix3x3.hh, MetaData.cpp, ImageBase.cpp, PoseParametrization.cpp
  • optarg : getopt_W32.cpp
  • opterr : getopt_W32.cpp
  • OPTICAL_CENTER : GeometryGL.hh
  • optind : getopt_W32.cpp
  • optional_argument : getopt_W32.h
  • optopt : getopt_W32.cpp
  • optreset : getopt_W32.cpp
  • or() : LGPL
  • otimer : ExampleTracker2.cpp, ExampleTracker.cpp
  • OutputImageType : ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleGradient.cpp, ExampleDeInterlace.cpp
  • OutST : ExampleLineMatcher.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- z -

  • Z_f : win32_f2c.h, f2c_gnu011.h
  • Z_fp : win32_f2c.h, f2c_gnu011.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- a -

  • a : LGPL
  • ABORT : Debug.hh
  • above : LGPL
  • ABOVE : LGPL
  • abs : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • absdiff : RegionMatcher.hh
  • accessors : LGPL
  • act : ExampleTracker2.cpp, ExampleTracker.cpp
  • AddErr() : InvestigateEpipoleEstimation.cpp
  • AddGradientType() : FilterBase.hh, FilterBase.cpp
  • addition : LGPL
  • AddLowPassType() : FilterBase.hh, FilterBase.cpp
  • address : win32_f2c.h, f2c_gnu011.h
  • AdoptPMatrix() : biasconvert.cpp
  • AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_ : ueyeclass.hh
  • algo : ParamGUISample3.cpp, ParamGUISample1.cpp
  • ALLOCATOR_IMPL : BaseFactory.hh
  • ALPHA_OPAQUE : ThreeDOut.hh
  • ALPHA_TRANSPARENT : ThreeDOut.hh
  • Also : LGPL
  • AM : Random.cpp
  • ambig : getopt_long_W32.cpp
  • and : LGPL
  • any : LGPL
  • apply : LGPL
  • Arrow : ThreeDOut.hh
  • AsciiToWx() : StringConv.hh
  • ASSERT_MAP_ELEMENT : ThreeDOut.cpp
  • at : SVD3x3.cpp
  • attribsRGBAD : OpenGLCanvasBase.hh
  • attribsRGBASD : OpenGLCanvasBase.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- b -

  • BACK : InvestigateEpipoleEstimation.cpp
  • BADARG : getopt_W32.cpp, getopt_long_W32.cpp
  • BADCH : getopt_W32.cpp, getopt_long_W32.cpp
  • Basename() : FileHandling.cpp
  • BetaDistribution() : GSL.cpp
  • BEXCEPTION : Exception.hh
  • bgain : showdcam.cpp
  • BIAS_CHECK_NAN : Error.hh
  • BIAS_DEBUG : bias_config.h
  • BIAS_DEFAULT_FORCENEWID : ImageIO.hh
  • BIAS_DEFAULT_IMAGE_QUALITY : ImageIO.hh
  • BIAS_DEFAULT_SYNC : ImageIO.hh
  • BIAS_DEINTERLACE_TYPE : DeInterlace.hh
  • BIAS_DI_121 : DeInterlace.hh
  • BIAS_DI_22 : DeInterlace.hh
  • BIAS_DRAW_CROSS_PRODUCT : ImageDraw.cpp
  • BIAS_DRAW_PRECISION : ImageDraw.cpp
  • BIAS_EXPORT_STL_SET : BIAS_DeclSpec.hh
  • BIAS_EXPORT_STL_VECTOR : BIAS_DeclSpec.hh
  • BIAS_FMATRIXDEBUG : PMatrixEstimation.hh
  • BIAS_FQuasiEuklid : PMatrixEstimation.hh
  • BIAS_HAVE_BLAS : bias_config.h
  • BIAS_HAVE_DEVIL : bias_config.h
  • BIAS_HAVE_FFTW3 : bias_config.h
  • BIAS_HAVE_FONTGL : bias_config.h
  • BIAS_HAVE_GLEW : bias_config.h
  • BIAS_HAVE_GLUT : bias_config.h
  • BIAS_HAVE_GUI : bias_config.h
  • BIAS_HAVE_IMAGEMAGICKLIB : bias_config.h
  • BIAS_HAVE_LAPACK : bias_config.h
  • BIAS_HAVE_OPENCV : bias_config.h
  • BIAS_HAVE_OPENEXR : bias_config.h
  • BIAS_HAVE_OPENGL : bias_config.h
  • BIAS_HAVE_PTHREADS : bias_config.h
  • BIAS_HAVE_VLD : bias_config.h
  • BIAS_HAVE_XML2 : bias_config.h
  • BIAS_IMAGEATTRIBUTES_SUCCESS : ImageAttributes.hh
  • BIAS_IO_SUCCESS : ImageIO.hh
  • BIAS_LOG_DEBUG : LogFacility.hh
  • BIAS_LOG_FATAL : LogFacility.hh
  • BIAS_LOG_INFO : LogFacility.hh
  • BIAS_LOG_LEVEL : LogFacility.hh
  • BIAS_LOG_NONE : LogFacility.hh
  • BIAS_LOG_WARNING : LogFacility.hh
  • BIAS_MUTEX_LOCK : GuiBase.hh, Error.hh
  • BIAS_MUTEX_UNLOCK : GuiBase.hh, Error.hh
  • BIAS_PMATRIXDEBUG : PMatrixEstimation.hh
  • BIAS_SCREENSHOT_DEFAULT_EXTENSION : OpenGLCanvasBase.hh
  • BIAS_SELECTION_OFFSET_PMATRIX : ThreeDOut.hh
  • BIAS_SWAP : Median1D.cpp
  • BIAS_TESTS_DATA : bias_config.h
  • biasabort() : biasabort.cpp
  • BIASABORT : Error.hh
  • BIASASSERT : Error.hh
  • BIASBREAK : Error.hh
  • BIASCDOUT : Debug.hh
  • BIASCommon_EXPORT : BIAS_DeclSpec.hh
  • BIASDebug_EXPORT : BIAS_DeclSpec.hh
  • BIASDOUT : Debug.hh
  • BIASDOUT_CLEAN : Debug.hh
  • BIASDOUT_THREAD : Debug.hh
  • BIASERR : PMDImageIO.cpp, Error.hh
  • biasexit() : biasexit.cpp
  • BIASEXIT : Error.hh
  • BIASFeatureDetector_EXPORT : BIAS_DeclSpec.hh
  • BIASFilter_EXPORT : BIAS_DeclSpec.hh
  • BIASFLUSHDOUT : Debug.hh
  • BIASGDOUT : Debug.hh
  • BIASGeometry_EXPORT : BIAS_DeclSpec.hh
  • BIASGeometryBase_EXPORT : BIAS_DeclSpec.hh
  • BIASGui_EXPORT : BIAS_DeclSpec.hh
  • BIASImage_EXPORT : BIAS_DeclSpec.hh, PMDImageIO.hh
  • BIASImageBase_EXPORT : BIAS_DeclSpec.hh, PMDImageIO.hh
  • BIASLOG : LogFacility.hh
  • BIASLOGALWAYS : LogFacility.hh
  • BIASMatcher2D_EXPORT : BIAS_DeclSpec.hh
  • BIASMathAlgo_EXPORT : BIAS_DeclSpec.hh
  • BIASMathBase_EXPORT : BIAS_DeclSpec.hh
  • BIASNetworkComm_EXPORT : BIAS_DeclSpec.hh
  • BIASNEW : Error.hh
  • BIASOUT : biasshowepi.cpp
  • BIASStateEstimator_EXPORT : BIAS_DeclSpec.hh
  • BIASUtils_EXPORT : BIAS_DeclSpec.hh
  • BIASVideoSource_EXPORT : BIAS_DeclSpec.hh
  • BIASWARN : Error.hh
  • BIASWARNONCE : Error.hh
  • Bicubic : Rescale.hh
  • Bilinear : Rescale.hh
  • bit_clear : f2c_gnu011.h
  • bit_set : f2c_gnu011.h
  • bit_test : f2c_gnu011.h
  • BLD : LogFacility.hh
  • BLF : LogFacility.hh
  • BLI : LogFacility.hh
  • BLW : LogFacility.hh
  • Boston : LGPL
  • BottomEdge : EpipolarLine.hh
  • Box : ThreeDOut.hh
  • bSaveImages_ : ShowCamWx.cpp
  • bShowStereo_ : ShowCamWx.cpp
  • bt : SVD3x3.cpp
  • BUILD_IMAGE_CHAR : bias_config.h
  • BUILD_IMAGE_FLOAT : bias_config.h
  • BUILD_IMAGE_INT : bias_config.h
  • BUILD_IMAGE_UCHAR : bias_config.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- c -

  • C_f : win32_f2c.h, f2c_gnu011.h
  • C_fp : win32_f2c.h, f2c_gnu011.h
  • calc_Regressionsebene() : ExampleRegressionPlane.cpp
  • CalculationType : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • CALLFUNC : ImageConvert.cpp
  • CALLINFO : Error.hh
  • CAMERA_PARAMETER_CURRENT_XML_VERSION : CameraParam.hh, ProjectionParametersIO.hh
  • CAMERA_PTGREY_DRAGONFLY_BW : VideoSource_DCAM.hh
  • CAMERA_PTGREY_DRAGONFLY_COLOR : VideoSource_DCAM.hh
  • CAMERA_PTGREY_DRAGONFLY_HIRES : VideoSource_DCAM.hh
  • CAMERA_PTGREY_SCORPION_COLOR_1600 : VideoSource_DCAM.hh
  • CAMERA_SONY_DFW_V500 : VideoSource_DCAM.hh
  • CAMERA_SONY_DFW_X700 : VideoSource_DCAM.hh
  • CAMERA_SONY_DV : VideoSource_DCAM.hh
  • CAMERA_SONY_EVID31 : VideoSource_DCAM.hh
  • CAMERA_UNKNOWN : VideoSource_DCAM.hh
  • CameraDrawingStyle : ThreeDOut.hh
  • CameraModel : VideoSource_DCAM.hh
  • CameraParameterSet : VideoSource_DCAM.hh
  • CamWin : showv4lcam.cpp
  • case : LGPL
  • CASE_CHAR : ImageConvert.cpp
  • CASE_DOUBLE : ImageConvert.cpp
  • CASE_FLOAT : ImageConvert.cpp
  • CASE_INT : ImageConvert.cpp
  • CASE_SHORT : ImageConvert.cpp
  • CASE_UCHAR : ImageConvert.cpp
  • CASE_UINT : ImageConvert.cpp
  • CASE_USHORT : ImageConvert.cpp
  • castchar() : ExampleFMT2D.cpp
  • castfloat() : ExampleFMT2D.cpp
  • cd : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdfreq : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdnum : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdt : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdtimer : ExampleTracker2.cpp, ExampleTracker.cpp
  • center : InvestigateEpipoleEstimation.cpp
  • cfch_ : fortran.h
  • cfd_ : fortran.h
  • cfda_ : fortran.h
  • cff_ : fortran.h
  • cffa_ : fortran.h
  • cfi_ : fortran.h
  • cfia_ : fortran.h
  • CHARGE : LGPL
  • CHARS_N : DrawTextGL.cpp
  • CHARS_START : DrawTextGL.cpp
  • CHECK_GL_ERROR : glcheck.h
  • CheckChannel : ImageBaseInline.hh
  • CheckCoordinates : ImageBaseInline.hh
  • ChiSquareCulmProbFun() : GSL.cpp
  • Cholesky_upper_factorization() : cholesky.h
  • CI : Param.cpp, ParamGUI.cpp
  • circumstance : LGPL
  • claims : LGPL
  • CNCC_EPSILON : SimilarityMeasure.cpp
  • code : LGPL
  • COLOR_BLACK : ImageDraw.hh
  • COLOR_BLUE : ImageDraw.hh
  • COLOR_GREEN : ImageDraw.hh
  • COLOR_GREY50 : ImageDraw.hh
  • COLOR_RED : ImageDraw.hh
  • COLOR_WHITE : ImageDraw.hh
  • Common : DEPENDENCIES
  • comp() : Median.cpp
  • CompIntersect() : EpipolarLine.hh, EpipolarLine.cpp
  • ComputeCutoutImage() : biasshowepiwx.cpp
  • conditions : LGPL
  • CONIC2D_TYPE : Conic2D.hh
  • ConsoleRedirectIO() : ConsoleRedirectIO.cpp
  • CONTRACT : LICENSE
  • contrast : LGPL
  • CONV_FLOAT : Convolution.hh
  • CONV_INT : Convolution.hh
  • Coon : LGPL
  • CoordinateSystem() : ThreeDOut.cpp
  • copies : LGPL
  • copy : LGPL
  • copying : LGPL
  • Copyright() : LGPL
  • CORNER_LIST : CornerDetectorSusan.hh
  • CornerIndices : GeometryGL.hh
  • CORRESPONDENCE_FILENAME_SUFFIX : PMatrixTest.cpp
  • COUNT : ExampleRandom2D.cpp, ExampleRandom2.cpp
  • countries : LGPL
  • COUT : DebugSimple.hh
  • COUT_DEST : DebugSimple.hh
  • COUT_ONOFF : DebugSimple.hh
  • cov : ExampleTracker3.cpp
  • COVMATRIX3X3_TYPE : CovMatrix3x3.hh
  • cp : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • create_JPEG_file() : CompressJpeg.cpp
  • CreateMatches() : InvestigateEpipoleEstimation.cpp
  • CreateMatches2() : InvestigateEpipoleEstimation.cpp
  • createst() : ColorHarris.cpp
  • createst2() : ColorHarris.cpp
  • CS_BINARY : CScommClasses.hh
  • CS_FLOAT : CScommClasses.hh
  • CS_INT : CScommClasses.hh
  • CS_NONE : CScommClasses.hh
  • CS_STRING : CScommClasses.hh
  • ct : SVD3x3.cpp
  • CurrentDateTimeString() : FileHandling.cpp
  • cut() : ExampleFMT2D.cpp
  • CUTOUT_SIZE : biasshowepiwx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- d -

  • D1 : ImageConvert.cpp
  • D2 : ImageConvert.cpp
  • D_3DOUT_PDECOMP : ThreeDOut.hh
  • D_BF_ADD : BaseFactory.hh
  • D_BF_GEN : BaseFactory.hh
  • D_BINOMIAL_KERNEL : Binomial.hh
  • D_BINOMIAL_WRITE_IM : Binomial.hh
  • D_CAM_DCINERT : Camera.hh
  • D_CAM_DCPTU : Camera.hh
  • D_CAM_IO : Camera.hh
  • D_CAMERA_METADATA : Camera.hh
  • D_CAST_CHECK : ImageBase.hh, Image.hh
  • D_CD_FEATURES : CornerDetectorBase.hh
  • D_CD_INIT : CornerDetectorBase.hh
  • D_CD_SUSAN : CornerDetectorBase.hh
  • D_CD_SUSAN_QUALITY : CornerDetectorBase.hh
  • D_CD_WRITE_DEBUG_IM : CornerDetectorBase.hh
  • D_COLOR_HIST_VEC : ColorHistogram.hh
  • D_COLOR_MULTI_HIST_VEC : ColorMultiHistogram.hh
  • D_COND_DEBUG : Condensation.hh
  • D_COND_ERROR : Condensation.hh
  • D_COND_INIT : Condensation.hh
  • D_COND_INT : CondensHisto.hh
  • D_COND_MEANVAR : Condensation.hh
  • D_COND_PROCESS : Condensation.hh
  • D_COND_WEIGHTS : Condensation.hh
  • D_CONIC2D_TAN : Conic2D.hh
  • D_CONV_KERNEL : Convolution.hh
  • D_CONV_TYPES : Convolution.hh
  • D_CONVERT : ImageBase.hh, Image.hh
  • D_COPYIN : ImageBase.hh, Image.hh
  • D_CORNER_MATCHER_KLT : CornerMatcher.hh
  • D_CORNER_MATCHER_PARABOLA : CornerMatcher.hh
  • D_CORNER_MATCHER_PYKLT : CornerMatcher.hh
  • D_CORNER_MATCHER_SEARCH : CornerMatcher.hh
  • D_CS_ANALYZE : CScommBase.hh
  • D_CS_CONNECT : CScommBase.hh
  • D_CS_DEFAULT_PORT : CScommBase.hh
  • D_CS_GETDATA : CScommBase.hh
  • D_CS_LISTENER : CScommBase.hh
  • D_CS_MAXCLIENTS : CScommBase.hh
  • D_CS_RECEIVER : CScommBase.hh
  • D_CS_SEND : CScommBase.hh
  • D_DC_DATA_CALC : DCData.hh
  • D_DCAM : VideoSource_Base.hh
  • D_DCAM_F7 : VideoSource_Base.hh
  • D_DOUBLE_RANSAC_SOLUTION : ExampleRANSAC_double.hh
  • D_DTD : VideoSource_Base.hh
  • D_DV : VideoSource_Base.hh
  • D_DV2 : VideoSource_Base.hh
  • D_EL_BRES : EpipolarLine.hh
  • D_EL_BRESROUND : EpipolarLine.hh
  • D_EL_INT : EpipolarLine.hh
  • D_EL_NEWSTARTEND : EpipolarLine.hh
  • D_EL_NEXTLINE : EpipolarLine.hh
  • D_EL_OFFSET : EpipolarLine.hh
  • D_EL_ROUND : EpipolarLine.hh
  • D_EL_SLOPE : EpipolarLine.hh
  • D_EL_STARTEND : EpipolarLine.hh
  • D_EL_TRANSF : EpipolarLine.hh
  • D_EMATRIX_ROT_TRANS : EMatrix.hh
  • D_EXIF : ImageAttributes.hh
  • D_FILTERBASE_CALLSTACK : FilterBase.hh
  • D_FM_INTAPPROX : FilterMask.hh
  • D_FM_PRECISION : FilterMask.hh
  • D_FMATRIX_GETEPIPOLES : FMatrix.hh
  • D_fp : win32_f2c.h, f2c_gnu011.h
  • D_GAUSS_FAST_GREY : Gauss.hh
  • D_GRAD_DEB : Convolution.hh
  • D_GRADGAUSS_KERNEL : Convolution.hh
  • D_GUI_DESTRUCT : GuiBase.hh
  • D_GUI_GDK : GuiGTK.hh
  • D_GUI_KEY : GuiBase.hh
  • D_GUI_MAIN : GuiBase.hh
  • D_GUI_MOUSE_BUTTON : GuiBase.hh
  • D_GUI_MUTEX : GuiBase.hh
  • D_GUI_SIGNAL : GuiBase.hh
  • D_GUI_THREAD : GuiGTK.hh
  • D_HIST_VEC : Histogram.hh
  • D_HM_COMP : HMatrixBase.hh
  • D_IC_IM : ImageCanvas.hh
  • D_IMAGE_MINMAXCOO : Image.hh
  • D_IMAGE_TRACE : ImageBase.hh
  • D_IMCONV_IPL : ImageConvert.hh
  • D_INIT : Label.hh
  • D_INT_HIST : IntegralHistogram.hh
  • D_INTERPOL_BEZIER : Interpolator.hh
  • D_INTERPOL_COMMON : Interpolator.hh
  • D_INTERPOL_SPLINE2 : Interpolator.hh
  • D_INTERPOL_SPLINE3 : Interpolator.hh
  • D_LABEL : Label.hh
  • D_LS_MATRIXES : LeastSquares.hh
  • D_LS_RED_MATRIXES : LeastSquares.hh
  • D_LS_SVD : LeastSquares.hh
  • D_MD_IO : MatchDataBase.hh
  • D_MDCAM_GRAB : MDcam.hh
  • D_MDCAM_INIT : MDcam.hh
  • D_MI_CONVGREY : ImageBase.hh, Image.hh
  • D_MI_IOSTREAM : ImageBase.hh, Image.hh
  • D_MI_TOPLANAR : ImageBase.hh, Image.hh
  • D_MSAC_INIT : MSAC.hh
  • D_MSAC_SAMPLES : MSAC.hh
  • D_MSAC_SOLVEM : MSAC.hh
  • D_NET : VideoSource_Base.hh
  • D_PARAM_ALL : Param.hh
  • D_PARAM_CONF_FILE : Param.hh
  • D_PARAM_GET : Param.hh
  • D_PARAM_IO : Param.hh
  • D_PARAM_PARSECMDL : Param.hh
  • D_PS_COEFF : PolynomialSolve.hh
  • D_PS_GSL : PolynomialSolve.hh
  • D_PS_NLREFINE : PolynomialSolve.hh
  • D_PYRAMID_CREATE : PyramidImage.hh
  • D_PYRAMID_SINGLE_IM : PyramidImage.hh
  • D_RANSAC_SAMPLES : RANSAC.hh
  • D_RANSAC_SOLVE_MASTER : RANSAC.hh
  • D_REGION_MATCHER_COLORCCV : RegionMatcher.hh
  • D_REGION_MATCHER_COLORNCC : RegionMatcher.hh
  • D_REGION_MATCHER_KLT : RegionMatcher.hh
  • D_REGION_MATCHER_KLT_EDGE : RegionMatcher.hh
  • D_REGION_MATCHER_LINE : RegionMatcher.hh
  • D_REGION_MATCHER_PARABOLA : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCH_EVEN : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCH_ODD : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCHNCC : RegionMatcher.hh
  • D_RESCALE_INIT : Rescale.hh
  • D_RESCALE_WRITE_IMG : Rescale.hh
  • D_ROI_IO : ROI.hh
  • D_ST_FEATURES : StructureTensor.hh
  • D_ST_INIT : StructureTensor.hh
  • D_ST_WRITE_DEBUG_IM : StructureTensor.hh
  • D_SVD_RANK : SVD.hh
  • D_SVD_SOLVE : SVD.hh
  • D_TR_ARG : Triangulation.hh
  • D_TR_INF : Triangulation.hh
  • D_TR_OPT : Triangulation.hh
  • D_TR_OPT_F : Triangulation.hh
  • D_TR_OPT_TRANSF : Triangulation.hh
  • D_TR_POS : Triangulation.hh
  • D_TR_TR : Triangulation.hh
  • D_TRACKER_ERROR : Tracker.hh
  • D_TRACKER_FILL_UP : Tracker.hh
  • D_TRACKER_IMAGES : Tracker.hh
  • D_TRACKER_INIT : Tracker.hh
  • D_TRACKER_NUMITER : Tracker.hh
  • D_TRACKER_PARAM : Tracker.hh
  • D_TRACKER_TRACK : Tracker.hh
  • D_TRACKER_WRITE_IM : Tracker.hh
  • D_TRACKERB_AFFINE : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_BILINEAR : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_INIT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_INPUT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_KLT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_REJECT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRIANG_COVWEIGHT : Triangulation.hh
  • D_TS_READ : TrackerSynth.hh
  • D_TS_REPLACE : TrackerSynth.hh
  • D_UT_PARAM : UnscentedTransform.hh
  • D_UT_SIGMA_POINTS : UnscentedTransform.hh
  • D_UT_TRANSFORM : UnscentedTransform.hh
  • D_V4L : VideoSource_Base.hh
  • D_VS_WHITEB : VideoSource_Base.hh
  • D_VSO_DISK : VideoSource_Base.hh
  • D_WRITE_IMAGES : Convolution.hh
  • dabs : win32_f2c.h, f2c_gnu011.h
  • DAMAGES : LGPL
  • Dashed : ThreeDOut.hh
  • DATA : LICENSE
  • debug : ExamplePolynomialSolve.cpp
  • DEBUG : ExampleTFT.cpp, ExampleGenSynthMatches.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp
  • DEBUG_SPHEREPROJ_AVG : SphericalUndistortion.hh
  • DEBUG_SPHEREPROJ_CIRCLE : SphericalUndistortion.hh
  • DEF_P_SCALE : ThreeDOut.hh
  • DEFAULT_32to8_scale : ImageBase.hh
  • DEFAULT_Display_delay : ImageBase.hh
  • DEFAULT_DOUBLE_ZERO_THRESHOLD : SVD.hh
  • DEFAULT_FIXED_SCALE : biasview.cpp
  • DEFAULT_LEADING_ZEROS : FileHandling.hh
  • DEFAULT_MAX_AFFINECHANGE : TrackerBase.cpp
  • DEFAULT_PARA_FILE_NAME : ExampleTFT.cpp, ExampleGenSynthMatches.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleGradient.cpp, ExampleCornerDetector.cpp
  • DEFAULT_QUICK : CornerDetectorSusan.hh
  • DEFAULT_THRESH : CornerDetectorSusan.hh
  • DEFAULT_UUID_CONSECUTIVELY : UUID.hh
  • DEFAULT_WrapBias2Ipl_WINNAME : ImageBase.hh
  • DEFECTIVE : LGPL
  • deflate_JPEG_file() : CompressJpeg.cpp
  • DEGREE_PER_RAD : ThreeDOut.cpp
  • delay_ : ShowCamWx.cpp
  • demo() : ExampleColorNCC.cpp
  • DEPTH_MAX : PMDImageProc.cpp
  • DEPTH_MIN : PMDImageProc.cpp
  • DetermineFiletype() : biassetuid.cpp, biasprojection.cpp, biasmerge.cpp, biasconvert.cpp
  • DFLT_PYSIZE : Tracker.cpp
  • Directory() : FileHandling.cpp
  • DistanceFromRotation4Var() : PMatrixEstimation.cpp
  • distribute : LGPL
  • distributed() : LGPL
  • distributor : LGPL
  • dmax : win32_f2c.h, f2c_gnu011.h
  • dmin : win32_f2c.h, f2c_gnu011.h
  • document : LGPL
  • done : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • dot_prod() : vec.h
  • DOUBLE_EPSILON : Matrix.hh
  • DOUBLE_MIN : PolynomialSolve.cpp
  • doublereal : win32_f2c.h, f2c_gnu011.h
  • Draw() : ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExampleCornerDetector.cpp
  • draw_tracks : ExampleTracker2.cpp, ExampleTracker.cpp
  • DrawbufferMode : RenderModeGL.hh
  • drawCubic() : ExampleBSplineCurve.cpp
  • drawQuadratic() : ExampleBSplineCurve.cpp
  • DrawTextGL_DEFAULT_FONTNAME : DrawTextGL.hh
  • DrawTextGL_DEFAULT_FONTSIZE : DrawTextGL.hh
  • dSaveCounter_ : ShowCamWx.cpp
  • DumpTracks() : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • DV_PIC_SIZE : VideoSource_DV.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- e -

  • E_f : win32_f2c.h, f2c_gnu011.h
  • E_fp : win32_f2c.h, f2c_gnu011.h
  • E_NE : EightWaySymmetry.hh
  • EdataType : CScommClasses.hh
  • EGradType : FilterBase.hh
  • Eigenproblem_quadratic_matrix() : Lapack.hh, Lapack.cpp
  • eigenproblem_special_quadratic_matrix_solve() : lapack.h
  • eigenvalue_solve() : lapack.h
  • Eigenvalue_solve() : Lapack.hh, Lapack.cpp
  • EMATRIX_TYPE : EMatrixBase.hh
  • employer() : LGPL
  • empty_output_buffer() : CompressJpeg.cpp
  • EMSG : getopt_W32.cpp, getopt_long_W32.cpp
  • EPIPOLE_FACTOR : InvestigateEpipoleEstimation.cpp
  • EPS : Random.cpp
  • Equal() : CompareFloatingPoint.hh
  • ERejectionType : TrackerBaseInterface.hh, TrackerBase.hh
  • ERR_ILLI : Label.cpp
  • ERR_ILLT : Label.cpp
  • ERR_NOLB : Label.cpp
  • ERROR_STREAM : Error.hh
  • ErrorFunction() : RMatrix.cpp
  • errout() : ExamplePolynomialSolve.cpp
  • estimated_epipole : InvestigateEpipoleEstimation.cpp
  • estimated_epipole2 : InvestigateEpipoleEstimation.cpp
  • ETrackerType : TrackerBase.hh
  • example : LGPL
  • EXAMPLEDEBUG_TESTFLAG : MyDebug.hh
  • EXAMPLEDEBUG_TESTFLAG2 : MyDebug.hh
  • exception : LGPL
  • executable : LGPL
  • Extension() : FileHandling.cpp
  • Extern : win32_f2c.h, f2c_gnu011.h
  • ExtractNumberFromRight() : FileHandling.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- f -

  • F2C_proc_par_types : win32_f2c.h, f2c_gnu011.h
  • F77_DGEEV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGELS : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESVD : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGGGLM : Lapack.cpp
  • F77_DSYEV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F_SVD_THRESH : ExampleSVD3x3.cpp, FMatrix.cpp
  • FACTORY_INVALID_TAG : BaseFactory.hh
  • FALSE_ : win32_f2c.h, f2c_gnu011.h
  • FASTYUV : ImageConvert.cpp
  • fch_ : fortran.h
  • fd_ : fortran.h
  • fda_ : fortran.h
  • fee : LGPL
  • FErrorFunction() : FMatrixEstimation.cpp
  • ff_ : fortran.h
  • ffa_ : fortran.h
  • FFT2D< float, float > : FFT2D.cpp
  • FFT2D< unsigned char, float > : FFT2D.cpp
  • FFT2D_Tiles< float, float > : FFT2D_Tiles.cpp
  • FFT2D_Tiles< unsigned char, float > : FFT2D_Tiles.cpp
  • fi_ : fortran.h
  • fia_ : fortran.h
  • FilenameSequence() : FileHandling.cpp
  • FileReadable() : FileHandling.cpp
  • fill_input_buffer() : CompressJpeg.cpp
  • FILTER_INSTANTIATION_CLASS : StructureTensor.cpp, Rescale.cpp, Morphology.cpp, Median.cpp, Mean.cpp, GradientSobel3x3.cpp, GradientSimple.cpp, GradientGaussAsymmetric.cpp, GradientGauss.cpp, Gauss.cpp, FilterNToN.cpp, FilterNTo3N.cpp, FilterNTo2N.cpp, FilterBase.cpp, Erosion.cpp, DistTransform.cpp, Dilation.cpp, DeInterlace.cpp, Convolution.cpp, Binomial.cpp
  • FILTER_INSTANTIATION_CLASS< float, float > : GradientSimple.cpp, Filterinst.hh
  • FILTER_INSTANTIATION_CLASS< unsigned char, float > : GradientSimple.cpp, Filterinst.hh
  • FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char > : Rescale.cpp, Filterinst.hh
  • FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT : StructureTensor.cpp, GradientSobel3x3.cpp, GradientSimple.cpp, GradientGaussAsymmetric.cpp, GradientGauss.cpp, FilterNTo3N.cpp, FilterNTo2N.cpp
  • FilterBorders : Label.hh
  • filtertype : biasfilter.cpp
  • Finally : LGPL
  • first : Random.cpp
  • FIXED_MAX : biasview.cpp
  • FIXED_MIN : biasview.cpp
  • flag : win32_f2c.h, f2c_gnu011.h
  • FM_FLOAT : FilterMask.hh
  • FM_INT : FilterMask.hh
  • FM_RESET_OTHER : FilterMask.hh
  • FMATRIX_FILENAME_SUFFIX : PMatrixTest.cpp
  • FMATRIX_TYPE : FMatrixBase.hh
  • Fortran_double : fortran.h
  • Fortran_float : fortran.h
  • Fortran_integer : fortran.h
  • Fortran_Matrix_to_Matrix() : Lapack.hh, Lapack.cpp
  • Foundation : LGPL
  • FRAME_DEFAULT_SIZE : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • Frob() : LGPL
  • ftnint : win32_f2c.h, f2c_gnu011.h
  • ftnlen : win32_f2c.h, f2c_gnu011.h
  • FTOI : CornerDetectorSusan.cpp
  • FUNCNAME : PMDImageIO.cpp, Error.hh
  • functions() : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- g -

  • g_pStereoAPI : OpenGLCanvasBase.cpp
  • gain : showdcam.cpp
  • Gamma() : GSL.cpp
  • GAUSS2D_CONFIDENCE_20_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_39_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_50_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_68_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_90_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_95_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_99_PERCENT : Conic2D.hh
  • GAUSS3D_CONFIDENCE_20_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_39_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_50_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_68_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_90_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_95_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_99_PERCENT : Quadric3D.hh
  • gcd() : getopt_long_W32.cpp
  • GENERAL : LGPL
  • General_singular_value_decomposition() : Lapack.hh, Lapack.cpp
  • GenerateData() : ExampleRANSAC.cpp
  • GenerateNoisyMeasurements() : ExampleKalman.cpp
  • GenerateProjection() : ExampleProjectionMapping.cpp
  • Get_pStereoAPI() : OpenGLCanvasBase.cpp
  • GetBaseName() : pmatrix2projection.cpp
  • GetCamIDs() : VideoSource_DCAM.hh, VideoSource_DCAM.cpp, MDcam.cpp
  • getopt() : getopt_W32.cpp
  • getopt_internal() : getopt_long_W32.cpp
  • getopt_long() : getopt_W32.h, getopt_long_W32.cpp
  • GetSequenceAngle() : ExampleProjectionMapping.cpp
  • GetSystem() : ExampleLeastSquares.cpp
  • GL2Cbool : GeometryGL.cpp
  • GLOBALbestErrorSoFar : RMatrix.cpp
  • GLOBALbestQuaternionSoFar : RMatrix.cpp
  • globalEpipole2 : PMatrixEstimation.cpp
  • globalM2 : PMatrixEstimation.cpp
  • GLUT_BUILDING_LIB : ExampleGLShared.cpp, biasgl.h
  • GRAD_UCHAR_ZERO : ColorHarris.cpp
  • GRAYTEST : Operators.cpp
  • Greater() : CompareFloatingPoint.hh
  • GreaterEqual() : CompareFloatingPoint.hh
  • GRP_ALL : Param.hh
  • GRP_NOSHOW : Param.hh
  • GSM_2D_MATCHES : GenSynthMatches.hh
  • GSM_3D_POINTS : GenSynthMatches.hh
  • GSM_CAM_MOTION : GenSynthMatches.hh
  • GSM_FMATRIX : GenSynthMatches.hh
  • GSM_MOVIN_3D_POINTS : GenSynthMatches.hh
  • GSM_MOVIN_TRANSF : GenSynthMatches.hh
  • GSM_NOISE : GenSynthMatches.hh
  • GSM_VIEWINGVOL : GenSynthMatches.hh
  • GT_Gauss : FilterBase.hh
  • GT_GaussAsymmetric : FilterBase.hh
  • GT_Simple : FilterBase.hh
  • GT_Sobel3x3 : FilterBase.hh
  • gx : ExampleTracker2.cpp, ExampleTracker.cpp
  • gy : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- h -

  • H_f : win32_f2c.h, f2c_gnu011.h
  • H_fp : win32_f2c.h, f2c_gnu011.h
  • HALF_CUTOUT_SIZE : biasshowepiwx.cpp
  • HaveImagesMatchingROI() : Operators.cpp
  • help() : biasshowsm.cpp
  • HErrorFunction() : HMatrixEstimation.cpp
  • HIST_BARS : Histogram.hh
  • HIST_BIN_COUNT : ExampleRandom.cpp
  • HIST_LINES : Histogram.hh
  • HIST_POINTS : Histogram.hh
  • HistMode : Histogram.hh
  • HMATRIX_TYPE : HMatrixBase.hh
  • HOLDER : LGPL
  • HOMGLINE2D_EPS : HomgLine2D.hh
  • HOMGLINE2D_TYPE : HomgLine2D.hh
  • HOMGLINE3D_EPS : HomgLine3D.hh
  • HOMGLINE3D_TYPE : HomgLine3D.hh
  • HOMGPLANE3D_EPS : HomgPlane3D.hh
  • HOMGPLANE3D_TYPE : HomgPlane3D.hh
  • HOMGPOINT1D_TYPE : HomgPoint1D.hh
  • HOMGPOINT1D_TYPE_EPS : HomgPoint1D.hh
  • HOMGPOINT2D_TYPE : ExampleMetaData.cpp, HomgPoint2D.hh
  • HOMGPOINT2D_TYPE_EPS : HomgPoint2D.hh
  • HOMGPOINT3D_EPS : HomgPoint3D.hh
  • HOMGPOINT3D_TYPE : HomgPoint3D.hh
  • However : LGPL
  • hybrd1_() : Minpack.cpp
  • hybrd_() : Minpack.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- i -

  • I_fp : win32_f2c.h, f2c_gnu011.h
  • IA : Random.cpp
  • IA1 : Random.cpp
  • IA2 : Random.cpp
  • IA3 : Random.cpp
  • IC : Random.cpp
  • IC1 : Random.cpp
  • IC2 : Random.cpp
  • IC3 : Random.cpp
  • ID_ABOUT : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh, ExampleImageCanvasGLBase.hh, ExampleGLShared.hh
  • ID_About : ExampleMDCamToShmWx.cpp, biasviewwx.cpp, biasdetectunvignettewx.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • ID_AspectRatio : ProjectionGUI.cpp
  • ID_BUTTON_QUIT : ExampleMDCamToShmWx.cpp
  • ID_BUTTON_WB : ExampleMDCamToShmWx.cpp
  • ID_Center : ProjectionGUI.cpp
  • id_config : ShowCamWx.cpp
  • ID_Delay : biasviewwx.cpp
  • ID_Exit : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • ID_Fit : biasviewwx.cpp
  • ID_FocalLength : ProjectionGUI.cpp
  • ID_ImageSize : ProjectionGUI.cpp
  • ID_Info : biasviewwx.cpp
  • id_key : ShowCamWx.cpp
  • ID_KeyInfo : biasviewwx.cpp
  • ID_KMatrix : ProjectionGUI.cpp
  • ID_Load : biasviewwx.cpp, biasdetectunvignettewx.cpp, ProjectionGUI.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • ID_LOADIMAGE : ExampleImageCanvasGLBase.hh
  • ID_MANUAL_EXPOSURE : ExampleMDCamToShmWx.cpp
  • ID_MetaData : biasviewwx.cpp
  • ID_New : ProjectionGUI.cpp
  • ID_Next : biasviewwx.cpp
  • ID_NormalizeQuaternion : ProjectionGUI.cpp
  • ID_Offset : ImageCanvas.cpp
  • id_pin : ShowCamWx.cpp
  • ID_PPX : biasdetectunvignettewx.cpp
  • ID_PPY : biasdetectunvignettewx.cpp
  • ID_Prev : biasviewwx.cpp
  • ID_Principal : ProjectionGUI.cpp
  • ID_Quaternion : ProjectionGUI.cpp
  • ID_QUIT : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh, ExampleImageCanvasGLBase.hh, ExampleGLShared.hh
  • ID_Quit : ExampleMDCamToShmWx.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • id_quit : ShowCamWx.cpp
  • ID_Radius : ProjectionGUI.cpp
  • id_record : ShowCamWx.cpp
  • ID_Rect : ExampleImageCanvasEnhanced.cpp
  • ID_RMatrix : ProjectionGUI.cpp
  • ID_RunStop : biasviewwx.cpp
  • ID_Save : ProjectionGUI.cpp
  • id_save : ShowCamWx.cpp
  • id_save2 : ShowCamWx.cpp
  • ID_Scale : ImageCanvas.cpp
  • ID_SLIDER_GAIN : ExampleMDCamToShmWx.cpp
  • ID_SLIDER_SHUTTER : ExampleMDCamToShmWx.cpp
  • ID_Steps : biasdetectunvignettewx.cpp
  • ID_TESTSHOT : ExampleOpenGLCanvas.hh
  • id_timer : ShowCamWx.cpp
  • ID_Timer : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • ID_TIMER : ExampleMDCamToShmWx.cpp
  • ID_Undistortion : ProjectionGUI.cpp
  • ID_UnVig : biasdetectunvignettewx.cpp
  • ID_WriteCameraData : biasdetectunvignettewx.cpp
  • IDENTIFIER : ImageBase.hh
  • IDENTIFIER_LENGTH : ImageBase.hh
  • If : LGPL
  • IGNORE_FIRST : getopt_long_W32.cpp
  • illoptchar : getopt_long_W32.cpp
  • illoptstring : getopt_long_W32.cpp
  • IM : Random.cpp
  • Image : ImageBase.hh
  • image_buffer : CompressJpeg.cpp
  • image_channels : CompressJpeg.cpp
  • image_height : CompressJpeg.cpp
  • image_width : CompressJpeg.cpp
  • ImageConvert : ImageBase.hh
  • img : ExampleBSplineCurve.cpp
  • imgCounter : ExampleBSplineCurve.cpp
  • imgNo : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • IMPLIED : LGPL
  • IMSIZE : ExampleThreeDOutVRML.cpp
  • IN_ORDER : getopt_long_W32.cpp
  • Inc : LGPL
  • INCLUDING : LGPL
  • init_destination() : CompressJpeg.cpp
  • init_source() : CompressJpeg.cpp
  • initDim1() : interpolate.cpp
  • initDim2() : interpolate.cpp
  • INORDER : getopt_long_W32.cpp
  • InputImageType : ExampleGradient.cpp
  • InsertZeroPoints() : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • INST : CornerMatcher.cpp, Camera.cpp, RegionMatcher.cpp, CornerMatcher.cpp, StereoRedGreen.cpp, SphericalUndistortion.cpp, ColorMultiHistogram.cpp, ColorHistogram.cpp, Camera.cpp, Vector4.cpp, Vector3.cpp, Vector2.cpp, Vector.cpp, Tensor3D3x3x3.cpp, Tensor3D.cpp, Matrix4x4.cpp, Matrix3x4.cpp, Matrix3x3.cpp, Matrix2x2.cpp, Matrix.cpp
  • InST : ExampleLineMatcher.cpp
  • INST_ADDHIST : Histogram.cpp
  • INST_ADDHIST_IMG : Histogram.cpp
  • INSTANCE : EpipolarLine.cpp
  • INSTANCE_Image : Image.cpp
  • INSTANCE_ImageConvert : ImageConvertInstantiation.cpp
  • INSTANCE_ImageConvert_DV : ImageConvertInstantiation.cpp
  • INSTANCE_ImageConvert_OPENCV : ImageConvertInstantiation.cpp
  • INSTANCE_ImageDraw : ImageDraw.cpp
  • INSTI : ImageConvertInstantiation.cpp
  • INSTUC : RegionMatcher.cpp
  • integer : win32_f2c.h, f2c_gnu011.h
  • integer1 : win32_f2c.h, f2c_gnu011.h
  • interfaces : LGPL
  • InterpolationMethod : BackwardMapping.hh
  • InterpolationType : Rescale.hh
  • interpolator : interpolate.cpp
  • InvalidEdge : EpipolarLine.hh
  • InvChiSquareCulmProbFun() : GSL.cpp
  • InvGamma() : GSL.cpp
  • invoked : LGPL
  • IplImage : WrapBias2Ipl.hh
  • IQ : Random.cpp
  • IR : Random.cpp
  • IS_POSIXLY_CORRECT : getopt_long_W32.cpp
  • isolation : LGPL
  • it : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- p -

  • p : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • P_MATRIX_COLS : PMatrixBase.hh
  • P_MATRIX_ROWS : PMatrixBase.hh
  • para : ExampleCylinderMapping.cpp
  • Para : FMatrixEstimation.cpp
  • ParaH : HMatrixEstimation.cpp
  • PARALLEL_THRESHOLD : Triangulation.hh
  • param : pmatrix2projection.cpp
  • ParamCallbackInterface : ParamTypes.hh
  • parameters : LGPL
  • ParamGUI : ParamGUI.hh
  • ParamInit() : ExampleCylinderMapping.cpp
  • ParentExtender : PMDImageIO.hh
  • pCurrentObject : FMatrixEstimation.cpp
  • pCurrentObjectH : HMatrixEstimation.cpp
  • permitted : LGPL
  • PERMUTE : getopt_long_W32.cpp
  • permute_args() : getopt_long_W32.cpp
  • pGLOBALvecR : RMatrix.cpp
  • pim : ExampleTracker2.cpp, ExampleTracker.cpp
  • Place : LGPL
  • place : LGPL, getopt_long_W32.cpp
  • PLUECKERMATRIX_TYPE : PlueckerMatrix.hh
  • PMATRIX_EPSILON : PMatrixBase.hh
  • PMATRIX_TYPE : PMatrixBase.hh
  • PMATRIXLINEAR : PMatrixLinear.hh
  • Point : ThreeDOut.hh
  • PointDrawingStyle : ThreeDOut.hh
  • PointSprite : ThreeDOut.hh
  • PointVector : Example7Point.cpp
  • POLAR_TABLE_OFFSET : GradientSimple.cpp
  • POLAR_TABLE_SIZE : GradientSimple.cpp
  • POLYNOMIALSOLVE_TYPE : PolynomialSolve.hh
  • POSE_TYPE : Pose.hh
  • POSECOVARIANCE_TYPE : PoseParametrizationCovariance.hh
  • Powell() : Minpack.cpp
  • PowellCoeff : PolynomialSolve.cpp
  • PowellCoeffNum : PolynomialSolve.cpp
  • PowellExtended() : Minpack.cpp
  • PP_TYPE : PoseParametrization.hh
  • Print() : ExampleSVD3x3.cpp, ExampleSVD.cpp
  • PRINT_ERROR : getopt_long_W32.cpp
  • printFormatInfo_() : VideoSource_V4L.cpp
  • PrintInfoEXR() : ImageIO.cpp
  • PrintKeyCommands() : biasview.cpp
  • printPolynom() : ExamplePolynom.cpp
  • PRINTTYPE : Debug.hh
  • Process() : ExampleKalman.cpp
  • process_noise : ExampleKalman.cpp
  • PROFITS : LICENSE
  • programs : LGPL
  • PS_DOUBLE_EPSILON : PolynomialSolve.cpp
  • PtoPPP() : pmatrix2projection.cpp
  • public : LGPL
  • pyind : ExampleTracker2.cpp, ExampleTracker.cpp
  • PYRAMID_BACKGROUND : PyramidImage.hh
  • PYRAMID_BORDER : PyramidImage.hh
  • PyramidMesh : ThreeDOut.hh
  • PyramidMeshWithArrow : ThreeDOut.hh
  • PyramidSolid : ThreeDOut.hh
  • PYTHAG : SVD3x3.cpp
  • pytimer : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- q -

  • QR_factor() : qr.h
  • QR_solve() : qr.h
  • QUADRIC3D_TYPE : Quadric3D.hh
  • QUAL : CornerDetectorBase.hh
  • qual : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • QUATERNION_EPSILON : Quaternion.hh
  • QUATERNION_TYPE : Quaternion.hh
  • QUICKINSTALL : INSTALL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- r -

  • R : InvestigateEpipoleEstimation.cpp
  • r : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • R_fp : win32_f2c.h, f2c_gnu011.h
  • R_solve() : qr.h
  • RADIUS : ExampleConic.cpp
  • RANSAC_DEFAULT_PROBOFGOODSOLUTION : RANSAC.hh
  • RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE : RANSAC.hh
  • rather : LGPL
  • raw_dv_handler() : VideoSource_DV.cpp
  • readFile() : ExampleRANSACPlane.cpp
  • READPARAM_CHECKDUPES : Param.cpp
  • ReadPMatrix() : biasconvert.cpp
  • real : win32_f2c.h, f2c_gnu011.h
  • reason() : LGPL
  • recargchar : getopt_long_W32.cpp
  • recargstring : getopt_long_W32.cpp
  • receivethread() : CScommBase.cpp
  • recipients : LGPL
  • required_argument : getopt_W32.h
  • res : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedColor() : Rescale.cpp
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey() : Rescale.cpp
  • residui : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • results : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • rgain : showdcam.cpp
  • RGBAd : RGBA.hh
  • RGBAf : RGBA.hh
  • RGBAuc : RGBA.hh
  • RGBAuc_WHITE_OPAQUE : RGBA.hh
  • RGBAuc_WHITE_SEMI : RGBA.hh
  • RGBd : RGB.hh
  • RGBf : RGB.hh
  • RGBuc : RGB.hh
  • RIG_PARAMETER_CURRENT_XML_VERSION : RigParameter.hh, ProjectionParametersIO.hh
  • RightEdge : EpipolarLine.hh
  • rights : LGPL
  • RM1 : Random.cpp
  • RM2 : Random.cpp
  • RNMX : Random.cpp
  • ROI_IDENTIFIER : ROI.cpp
  • ROI_IDENTIFIER_LENGTH : ROI.cpp
  • ROI_VERSION_NUMBER : ROI.hh
  • rotateY() : CylinderMapping.cpp
  • ROTATION_MATRIX_EPSILON : RMatrixBase.hh
  • ROTATION_MATRIX_TYPE : RMatrixBase.hh
  • rowtime : IntegralHistogram.cpp
  • RT_Invalid : TrackerBase.hh
  • RT_MAD : TrackerBase.hh
  • RT_X86 : TrackerBase.hh
  • runs : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- s -

  • S_fp : win32_f2c.h, f2c_gnu011.h
  • S_SE : EightWaySymmetry.hh
  • SAD3x3 : RegionMatcher.hh
  • SAD5x5 : RegionMatcher.hh
  • sample : LGPL
  • save : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • savecounter : showdcam.cpp
  • SCALE : biasshowepiwx.cpp
  • Scale() : biasview.cpp
  • ScaledImageCanvas_IDs : ImageCanvas.cpp
  • SCROLLBAR_WIDTH : ImageCanvas.cpp
  • SE_E : EightWaySymmetry.hh
  • seconds() : stopwatch.h
  • Section : LGPL
  • SEGDEF : Label.cpp
  • SERVICING : LGPL
  • set_example_designmatrix() : ExampleRegressionPlane.cpp
  • SetRotation() : ExampleProjectionMapping.cpp
  • SetThreadName() : ThreadNaming.cpp
  • SETZEROSHIFT : FilterMask.cpp
  • SEVEN_SUPP : CornerDetectorSusan.hh
  • ShiftAndMark() : biasview.cpp
  • shortint : win32_f2c.h, f2c_gnu011.h
  • shortlogical : win32_f2c.h, f2c_gnu011.h
  • showhistogram() : biasview.cpp
  • sigma : ExampleLeastSquares.cpp
  • SIGN : SVD3x3.cpp
  • sign() : tntmath.h
  • SINGULAR_THRESH_INVERSION : Quadric3D.cpp
  • singular_value_decomposition_general_rectangular_matrix_solve() : lapack.h
  • skip_input_data() : CompressJpeg.cpp
  • SLIDER_DIGITS : ImageCanvas.cpp
  • SMALL_DET : TrackerBase.cpp
  • so : LGPL
  • software : LGPL
  • Solid : ThreeDOut.hh
  • solout() : ExamplePolynomialSolve.cpp
  • SPECIAL : LGPL
  • SPEED_STEP : biasview.cpp, biasshowsm.cpp
  • Sphere : ThreeDOut.hh
  • SPLINE_WITH_LUT : UnVignette.hh
  • SplitName() : FileHandling.hh, FileHandling.cpp
  • st_type : ExampleTracker3.cpp, ExampleHarrisColor.cpp
  • step() : INSTALL
  • STEREO_CONSUMER_NV : RenderModeGL.hh
  • STEREO_LEFT_RIGHT : RenderModeGL.hh
  • STEREO_QUADBUFFERED : RenderModeGL.hh
  • STEREO_TWOSCREENS : RenderModeGL.hh
  • STEREO_UNTOUCHED : RenderModeGL.hh
  • StorageType : showdvcam.cpp, showdv2cam.cpp, showdcam.cpp, ExampleDirectToDisk.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleDeInterlace.cpp, ExampleCornerDetector.cpp
  • STORAGETYPE_MAX : SimilarityMeasure.cpp
  • STREAM_PRECISION : ProjectionParametersBase.cpp, PMatrix.cpp
  • sublicense : LGPL
  • Subscript : subscript.h
  • Suffix() : FileHandling.cpp
  • Suite : LGPL
  • SVD_MAX_ITERATIONS : SVD3x3.cpp
  • SVD_ZERO_THRESH : Quadric3D.cpp, Conic2D.cpp
  • SVDSOLVE : SVD.hh
  • SW_S : EightWaySymmetry.hh
  • swap : Matrix4x4.hh
  • SWIC : ImageConvert.cpp
  • system : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- t -

  • T : ExampleUnscentedTransform.cpp
  • table : LGPL
  • tag_table : ImageAttributes.cpp
  • TagType : BaseFactory.hh
  • TARGET_FPS : OpenGLCanvas.hh
  • TEdge : EpipolarLine.hh
  • term_destination() : CompressJpeg.cpp
  • term_source() : CompressJpeg.cpp
  • termhandler() : ExampleMDCamToShm.cpp
  • terms : LGPL
  • TestNoWeightAx() : ExampleLeastSquares.cpp
  • TestNoWeightAxb() : ExampleLeastSquares.cpp
  • TestWeightAx() : ExampleLeastSquares.cpp
  • TestWeightAxb() : ExampleLeastSquares.cpp
  • TFT_EST_CHECK_EQUATIONS : TFTensorEstimation.cpp
  • TFT_EST_USE_SVD_HACK : TFTensorEstimation.cpp
  • that : LGPL
  • themselves : LGPL
  • Therefore : LGPL
  • these : LGPL
  • they : LGPL
  • things : LGPL
  • THREADNAME_INFO : ThreadNaming.cpp
  • Thus : LGPL
  • tiffFieldInfo : PMDImageIO.hh
  • TIFFTAG_ASPECTRATIO : PMDImageIO.hh
  • TIFFTAG_CAMERACENTER : PMDImageIO.hh
  • TIFFTAG_CAMERAROTATION : PMDImageIO.hh
  • TIFFTAG_FOCALLENGTHX : PMDImageIO.hh
  • TIFFTAG_PRINCIPALPOINT : PMDImageIO.hh
  • TIFFTAG_UNDISTORTION : PMDImageIO.hh
  • TIMING : ExampleTracker3.cpp
  • TLineType : EightWaySymmetry.hh
  • tmp_cov : ExampleTracker3.cpp
  • TNT_BASE_OFFSET : subscript.h
  • TNT_BOUNDS_CHECK : tnt.h
  • TNT_MAJOR_VERSION : version.h
  • TNT_MINOR_VERSION : version.h
  • TNT_SUBMINOR_VERSION : version.h
  • TNT_SUBSCRIPT_TYPE : subscript.h, fortran.h
  • TNT_VERSION_STRING : version.h
  • tnum : ExampleTracker2.cpp, ExampleTracker.cpp
  • TO : LGPL
  • toDeg() : CylinderMapping.cpp
  • ToLower_c() : FileHandling.cpp
  • too : LGPL
  • TopEdge : EpipolarLine.hh
  • toRad() : CylinderMapping.cpp
  • TORT() : LICENSE
  • totalitersum : Tracker.cpp
  • ToUpper_c() : FileHandling.cpp
  • tr : ExampleTracker2.cpp, ExampleTracker.cpp
  • Track() : ExampleTracker2.cpp, ExampleTracker.cpp
  • TRACKER_ERRORINCREASED : TrackerBaseInterface.hh, TrackerBase.hh
  • Tracker_GlobalImageCounter : Tracker.cpp
  • TRACKER_IGNOREPOINT : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_MEANABSDIF : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_NOSTRUCTURE : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_OUTOFIMAGE : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_OUTOFROI : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_SUCCESS : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_TOOMANYITER : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_X84 : TrackerBaseInterface.hh, TrackerBase.hh
  • transpose() : fmat.h, cmat.h
  • Transpose_view() : transv.h
  • TRIANGULATION_DEFAULT_DELTAPIXEL : Triangulation.hh
  • TRIANGULATION_DEFAULT_SIGMA : Triangulation.hh
  • TRIFOCALTENSOR_TYPE : TrifocalTensorBase.hh
  • TRUE_ : win32_f2c.h, f2c_gnu011.h
  • true_epipole : InvestigateEpipoleEstimation.cpp
  • TT_Affine4 : TrackerBase.hh
  • TT_Affine6 : TrackerBase.hh
  • TT_Invalid : TrackerBase.hh
  • TT_Simple : TrackerBase.hh
  • TT_SimpleAffine4 : TrackerBase.hh
  • TT_SimpleAffine6 : TrackerBase.hh
  • TT_Weighted : TrackerBase.hh
  • ttimer : ExampleTracker2.cpp, ExampleTracker.cpp
  • TWICEPI : EpipolarLine.hh
  • type : ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleDeInterlace.cpp, ExampleCornerDetector.cpp
  • TYPE2 : ExampleGauss.cpp, ExampleBinomial.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- u -

  • U_fp : win32_f2c.h, f2c_gnu011.h
  • UINT16_MAX : PMDImageProc.cpp
  • uinteger : f2c_gnu011.h
  • UNDIST_EPS : UnVignette.hh, MatlabTBUndistortion.hh
  • Unit_lower_triangular_solve() : trisolve.h
  • Unit_lower_triangular_view() : triang.h
  • Unit_upper_triangular_solve() : trisolve.h
  • Unit_upper_triangular_view() : triang.h
  • UNKNOWN_META_DATA : ImageIO.hh
  • unrestricted : LGPL
  • UPPER_LEFT : GeometryGL.hh
  • UPPER_RIGHT : GeometryGL.hh
  • Upper_symmetric_eigenvalue_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Upper_triangular_solve() : trisolve.h
  • Upper_triangular_view() : triang.h
  • UpperCase() : FileHandling.cpp
  • usage() : Scan1394Bus.cpp, ExampleTriangleMesh.cpp, pmatrix2projection.cpp, biasview.cpp, biasshowsm.cpp, biasshowepi.cpp, biassetuid.cpp, biassetprojection.cpp, biasprojection.cpp, biasmerge.cpp, biasfilter.cpp, biasextract.cpp, biasconvert.cpp, ExampleSphereProjections.cpp, ExampleHarrisColor.cpp, ExampleImageMagickIO.cpp, ExampleImageAttributes.cpp, convertRAW.cpp
  • Usage() : ShowCamWx.cpp
  • use : LGPL, LICENSE
  • USE : LICENSE
  • USE_DEVIL_ILU : ImageIO.cpp
  • USE_FOUR_EQUATIONS_PER_POINT : TFTensorEstimation.cpp
  • USE_NATIVE_XGA : VideoSource_DCAM_CMU.cpp, VideoSource_DCAM.cpp
  • usertime : IntegralHistogram.cpp
  • UT_NORMALIZE : UnscentedTransform.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- v -

  • value : ExampleBSplineCurve.cpp
  • Vardesc : win32_f2c.h, f2c_gnu011.h
  • Vector2 : Vector.hh
  • VECTOR2SIZE : Vector2.hh
  • Vector3 : Vector.hh
  • VECTOR3_SIZE : Vector3.hh
  • Vector4 : Vector.hh
  • VECTOR4SIZE : Vector4.hh
  • version : LGPL
  • Version : LGPL
  • VERSION_NUMBER : ImageBase.hh
  • VERSIONOFTESTCLASS : ExampleXMLBase.cpp
  • VFF_CM_cieRGB : ViffHeader.hh
  • VFF_CM_cieucsLab : ViffHeader.hh
  • VFF_CM_cieucsLuv : ViffHeader.hh
  • VFF_CM_cieucsSOW : ViffHeader.hh
  • VFF_CM_cieucsUVW : ViffHeader.hh
  • VFF_CM_cieUVW : ViffHeader.hh
  • VFF_CM_cieXYZ : ViffHeader.hh
  • VFF_CM_GENERIC : ViffHeader.hh
  • VFF_CM_genericRGB : ViffHeader.hh
  • VFF_CM_HLS : ViffHeader.hh
  • VFF_CM_HSV : ViffHeader.hh
  • VFF_CM_IHS : ViffHeader.hh
  • VFF_CM_NONE : ViffHeader.hh
  • VFF_CM_ntscCMY : ViffHeader.hh
  • VFF_CM_ntscRGB : ViffHeader.hh
  • VFF_CM_ntscYIQ : ViffHeader.hh
  • VFF_DEP_BIGENDIAN : ViffHeader.hh
  • VFF_DEP_CRAYORDER : ViffHeader.hh
  • VFF_DEP_DECORDER : ViffHeader.hh
  • VFF_DEP_IEEEORDER : ViffHeader.hh
  • VFF_DEP_LITENDIAN : ViffHeader.hh
  • VFF_DEP_NSORDER : ViffHeader.hh
  • VFF_DES_ADPCM : ViffHeader.hh
  • VFF_DES_CCITT : ViffHeader.hh
  • VFF_DES_COMPRESS : ViffHeader.hh
  • VFF_DES_GENERIC : ViffHeader.hh
  • VFF_DES_RAW : ViffHeader.hh
  • VFF_DES_RLE : ViffHeader.hh
  • VFF_DES_TRANSFORM : ViffHeader.hh
  • VFF_LOC_EXPLICIT : ViffHeader.hh
  • VFF_LOC_IMPLICIT : ViffHeader.hh
  • VFF_MAP_FORCE : ViffHeader.hh
  • VFF_MAP_OPTIONAL : ViffHeader.hh
  • VFF_MAPTYP_1_BYTE : ViffHeader.hh
  • VFF_MAPTYP_2_BYTE : ViffHeader.hh
  • VFF_MAPTYP_4_BYTE : ViffHeader.hh
  • VFF_MAPTYP_COMPLEX : ViffHeader.hh
  • VFF_MAPTYP_DOUBLE : ViffHeader.hh
  • VFF_MAPTYP_FLOAT : ViffHeader.hh
  • VFF_MAPTYP_NONE : ViffHeader.hh
  • VFF_MS_CYCLE : ViffHeader.hh
  • VFF_MS_GROUP : ViffHeader.hh
  • VFF_MS_NONE : ViffHeader.hh
  • VFF_MS_ONEPERBAND : ViffHeader.hh
  • VFF_MS_SHARED : ViffHeader.hh
  • VFF_NOTSUB : ViffHeader.hh
  • VFF_TYP_1_BYTE : ViffHeader.hh
  • VFF_TYP_2_BYTE : ViffHeader.hh
  • VFF_TYP_4_BYTE : ViffHeader.hh
  • VFF_TYP_BIT : ViffHeader.hh
  • VFF_TYP_COMPLEX : ViffHeader.hh
  • VFF_TYP_DCOMPLEX : ViffHeader.hh
  • VFF_TYP_DOUBLE : ViffHeader.hh
  • VFF_TYP_FLOAT : ViffHeader.hh
  • videosourcefromchannel : VideoSource_DV.hh, VideoSource_DV.cpp
  • VIFF_HEADERSIZE : ViffHeader.hh
  • VISIBLEALPHA : GeometryGL.hh
  • VLD_AGGREGATE_DUPLICATES : LeakChecking.h
  • VLD_MAX_DATA_DUMP : LeakChecking.h
  • VOID : win32_f2c.h, f2c_gnu011.h
  • void : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- w -

  • W_SW : EightWaySymmetry.hh
  • warranty : LGPL
  • WARRANTY : LGPL
  • whole : LGPL
  • with : LGPL
  • work : LGPL
  • WritePyImage() : ExamplePyramidImage.cpp
  • WS : Debug.hh
  • WX0 : Rescale.cpp
  • WX1 : Rescale.cpp
  • WXDLLEXPORT : _wx_intellisense.h
  • wxEntryInitGui() : GuiWX.cpp
  • wxEntryStart() : GuiWX.cpp
  • WXEXPORT : _wx_intellisense.h
  • wxIDs : ShowCamWx.cpp
  • WxToAscii : StringConv.hh
  • wxUSE_GUI : _wx_intellisense.h
  • wxUSE_MSGDLG : _wx_intellisense.h
  • WY0 : Rescale.cpp
  • WY1 : Rescale.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- x -

  • XML_STD_ENCODING : XMLIO.hh
  • xmlAttr : XMLIO.hh
  • xmlAttrPtr : XMLIO.hh
  • xmlDoc : XMLIO.hh
  • xmlDocPtr : XMLIO.hh
  • xmlNode : XMLIO.hh
  • xmlNodePtr : XMLIO.hh
  • XV_IMAGE_REL_NUM : ViffHeader.hh
  • XV_IMAGE_VER_NUM : ViffHeader.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Here is a list of all file members with links to the files they belong to:

- y -

  • years : LGPL
  • you : LGPL
  • YUV2RGB : ImageConvert.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- _ -

  • __BIAS_CylinderMappibg_hh__ : CylinderMapping.hh
  • __glx_h__ : bias_wx_glcanvas.h
  • __JPEGHANDLER_HH__ : CompressJpeg.hh
  • __P : getopt_W32.h
  • __USE_BIAS__ : PMDImageProc.hh
  • __WXMSW__ : _wx_intellisense.h
  • _CRT_SECURE_NO_DEPRECATE : Camera.cpp, ImageIO.cpp, getopt_long_W32.cpp, FileHandling.cpp
  • _DIAGASSERT : getopt_long_W32.cpp
  • _USE_MATH_DEFINES : Vector2.hh, Vector.hh, Matrix.hh, Image.hh, EightWaySymmetry.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- j -

  • JACOBI_THRESH : BackwardMapping.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- k -

  • KERNCENTER : Convolution.cpp
  • KernelType : ExamplePyramidImage.cpp, ExampleCornerDetector.cpp
  • KLT_TYPE : TrackerBaseInterface.hh, TrackerBase.hh, RegionMatcher.hh
  • KMATRIX_TYPE : KMatrix.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- l -

  • LABEL_CALC_TYPE : Label.hh
  • LABEL_STORAGE_TYPE : Label.hh
  • LINE : InvestigateEpipoleEstimation.cpp
  • LM_DEF_MAX_ITER : Minpack.hh
  • LM_IMPROPER_INPUT : Minpack.hh
  • LM_OK : Minpack.hh
  • LM_SMALL_FTOL : Minpack.hh
  • LM_SMALL_GTOL : Minpack.hh
  • LM_SMALL_XTOL : Minpack.hh
  • LM_TOO_MANY_IT : Minpack.hh
  • LOWER : EpipolarLine.hh
  • LUT_RES : ProjectionParametersPerspective.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- m -

  • M : Random.cpp
  • M1 : Random.cpp
  • M2 : Random.cpp
  • M3 : Random.cpp
  • MASK_TYPE : ROI.hh
  • MATCH : InvestigateEpipoleEstimation.cpp
  • MATRIX2X2_ZERO_EPS : Matrix2x2.cpp
  • max : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • MAX : SVD3x3.cpp
  • MAX_1394_CARDS : VideoSource_DV.hh, VideoSource_DCAM.hh
  • MAX_1394_CHANNELS : VideoSource_DV.hh, VideoSource_DCAM.hh
  • MAX_1394_SOURCES : VideoSource_DCAM.hh
  • MAX_CORNERS : CornerDetectorSusan.hh
  • MAX_DMABUFFERS : VideoSource_DCAM.hh
  • MAX_GL_DISPLIST_ID : GeometryGL.hh
  • MAX_GL_TEXOBJ_ID : GeometryGL.hh
  • MAX_LAB : Label.cpp
  • MAX_QUATERNION_COS_ERROR : RMatrixBase.cpp
  • MAX_SEG : Label.cpp
  • MAXHEADERLINES : Camera.cpp
  • MD_LINE_LENGTH : MetaData.cpp
  • METER_PER_INCH : ImageAttributes.cpp
  • min : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • MIN_EIGENVALUE_RATIO : LinearRegionDetector.cpp
  • minDEF : DistTransform.cpp
  • MINIMUM_ROTATION : Parametrization.hh, RMatrixBase.cpp
  • MINPACK_DEF_TOLERANCE : Minpack.hh
  • MIP_DV_HEIGHT : ImageBase.hh, Image.hh
  • MIP_DV_WIDTH : ImageBase.hh, Image.hh
  • MIP_IDENTIFIER : ImageIO.hh
  • MIP_IDENTIFIER_LENGTH : ImageIO.hh
  • MODCOEFF_MAX : PMDImageProc.cpp
  • MODCOEFF_MIN : PMDImageProc.cpp
  • MS_VC_EXCEPTION : ThreadNaming.cpp
  • MY_DBL_PRECISION : EpipolarLine.cpp
  • mygetpid : CScommBase.hh
  • mymin : DistTransform.cpp
  • MYSLEEP : ExampleNetsync.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- n -

  • NCC5x5 : RegionMatcher.hh
  • NDIV : Random.cpp
  • no_argument : getopt_W32.h
  • NTAB : Random.cpp
  • NUM_PARAM_ESSENTIAL : Parametrization.hh
  • number_of_cols : ViffHeader.hh
  • number_of_rows : ViffHeader.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- o -

  • OFFX : ExampleInterpolation.cpp
  • OFFY : ExampleInterpolation.cpp
  • ONE_OVER_LOG2 : BackwardMapping.cpp
  • OPENGLCANVAS_CONNECT_ONIDLE : OpenGLCanvas.hh
  • OPENGLCANVAS_DEFAULT_idleRepaintEnabled : OpenGLCanvas.hh
  • OPENGLCANVAS_DEFAULT_realtimeAnimation : OpenGLCanvas.hh
  • OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled : OpenGLCanvasBase.hh
  • OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE : OpenGLCanvasBase.hh
  • optional_argument : getopt_W32.h
  • OutputImageType : ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleGradient.cpp, ExampleDeInterlace.cpp
  • OutST : ExampleLineMatcher.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- a -

  • ABORT : Debug.hh
  • abs : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • absdiff : RegionMatcher.hh
  • AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_ : ueyeclass.hh
  • ALLOCATOR_IMPL : BaseFactory.hh
  • ALPHA_OPAQUE : ThreeDOut.hh
  • ALPHA_TRANSPARENT : ThreeDOut.hh
  • AM : Random.cpp
  • ASSERT_MAP_ELEMENT : ThreeDOut.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- b -

  • BACK : InvestigateEpipoleEstimation.cpp
  • BADARG : getopt_W32.cpp, getopt_long_W32.cpp
  • BADCH : getopt_W32.cpp, getopt_long_W32.cpp
  • BEXCEPTION : Exception.hh
  • BIAS_CHECK_NAN : Error.hh
  • BIAS_DEBUG : bias_config.h
  • BIAS_DEFAULT_FORCENEWID : ImageIO.hh
  • BIAS_DEFAULT_IMAGE_QUALITY : ImageIO.hh
  • BIAS_DEFAULT_SYNC : ImageIO.hh
  • BIAS_DRAW_CROSS_PRODUCT : ImageDraw.cpp
  • BIAS_DRAW_PRECISION : ImageDraw.cpp
  • BIAS_EXPORT_STL_SET : BIAS_DeclSpec.hh
  • BIAS_EXPORT_STL_VECTOR : BIAS_DeclSpec.hh
  • BIAS_FMATRIXDEBUG : PMatrixEstimation.hh
  • BIAS_FQuasiEuklid : PMatrixEstimation.hh
  • BIAS_HAVE_BLAS : bias_config.h
  • BIAS_HAVE_DEVIL : bias_config.h
  • BIAS_HAVE_FFTW3 : bias_config.h
  • BIAS_HAVE_FONTGL : bias_config.h
  • BIAS_HAVE_GLEW : bias_config.h
  • BIAS_HAVE_GLUT : bias_config.h
  • BIAS_HAVE_GUI : bias_config.h
  • BIAS_HAVE_IMAGEMAGICKLIB : bias_config.h
  • BIAS_HAVE_LAPACK : bias_config.h
  • BIAS_HAVE_OPENCV : bias_config.h
  • BIAS_HAVE_OPENEXR : bias_config.h
  • BIAS_HAVE_OPENGL : bias_config.h
  • BIAS_HAVE_PTHREADS : bias_config.h
  • BIAS_HAVE_VLD : bias_config.h
  • BIAS_HAVE_XML2 : bias_config.h
  • BIAS_IMAGEATTRIBUTES_SUCCESS : ImageAttributes.hh
  • BIAS_IO_SUCCESS : ImageIO.hh
  • BIAS_MUTEX_LOCK : GuiBase.hh, Error.hh
  • BIAS_MUTEX_UNLOCK : GuiBase.hh, Error.hh
  • BIAS_PMATRIXDEBUG : PMatrixEstimation.hh
  • BIAS_SCREENSHOT_DEFAULT_EXTENSION : OpenGLCanvasBase.hh
  • BIAS_SELECTION_OFFSET_PMATRIX : ThreeDOut.hh
  • BIAS_SWAP : Median1D.cpp
  • BIAS_TESTS_DATA : bias_config.h
  • BIASABORT : Error.hh
  • BIASASSERT : Error.hh
  • BIASBREAK : Error.hh
  • BIASCDOUT : Debug.hh
  • BIASCommon_EXPORT : BIAS_DeclSpec.hh
  • BIASDebug_EXPORT : BIAS_DeclSpec.hh
  • BIASDOUT : Debug.hh
  • BIASDOUT_CLEAN : Debug.hh
  • BIASDOUT_THREAD : Debug.hh
  • BIASERR : PMDImageIO.cpp, Error.hh
  • BIASEXIT : Error.hh
  • BIASFeatureDetector_EXPORT : BIAS_DeclSpec.hh
  • BIASFilter_EXPORT : BIAS_DeclSpec.hh
  • BIASFLUSHDOUT : Debug.hh
  • BIASGDOUT : Debug.hh
  • BIASGeometry_EXPORT : BIAS_DeclSpec.hh
  • BIASGeometryBase_EXPORT : BIAS_DeclSpec.hh
  • BIASGui_EXPORT : BIAS_DeclSpec.hh
  • BIASImage_EXPORT : BIAS_DeclSpec.hh, PMDImageIO.hh
  • BIASImageBase_EXPORT : BIAS_DeclSpec.hh, PMDImageIO.hh
  • BIASLOG : LogFacility.hh
  • BIASLOGALWAYS : LogFacility.hh
  • BIASMatcher2D_EXPORT : BIAS_DeclSpec.hh
  • BIASMathAlgo_EXPORT : BIAS_DeclSpec.hh
  • BIASMathBase_EXPORT : BIAS_DeclSpec.hh
  • BIASNetworkComm_EXPORT : BIAS_DeclSpec.hh
  • BIASNEW : Error.hh
  • BIASOUT : biasshowepi.cpp
  • BIASStateEstimator_EXPORT : BIAS_DeclSpec.hh
  • BIASUtils_EXPORT : BIAS_DeclSpec.hh
  • BIASVideoSource_EXPORT : BIAS_DeclSpec.hh
  • BIASWARN : Error.hh
  • BIASWARNONCE : Error.hh
  • bit_clear : f2c_gnu011.h
  • bit_set : f2c_gnu011.h
  • bit_test : f2c_gnu011.h
  • BLD : LogFacility.hh
  • BLF : LogFacility.hh
  • BLI : LogFacility.hh
  • BLW : LogFacility.hh
  • BUILD_IMAGE_CHAR : bias_config.h
  • BUILD_IMAGE_FLOAT : bias_config.h
  • BUILD_IMAGE_INT : bias_config.h
  • BUILD_IMAGE_UCHAR : bias_config.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- c -

  • CalculationType : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • CALLFUNC : ImageConvert.cpp
  • CALLINFO : Error.hh
  • CAMERA_PARAMETER_CURRENT_XML_VERSION : CameraParam.hh, ProjectionParametersIO.hh
  • CASE_CHAR : ImageConvert.cpp
  • CASE_DOUBLE : ImageConvert.cpp
  • CASE_FLOAT : ImageConvert.cpp
  • CASE_INT : ImageConvert.cpp
  • CASE_SHORT : ImageConvert.cpp
  • CASE_UCHAR : ImageConvert.cpp
  • CASE_UINT : ImageConvert.cpp
  • CASE_USHORT : ImageConvert.cpp
  • CHARS_N : DrawTextGL.cpp
  • CHARS_START : DrawTextGL.cpp
  • CHECK_GL_ERROR : glcheck.h
  • CheckChannel : ImageBaseInline.hh
  • CheckCoordinates : ImageBaseInline.hh
  • CNCC_EPSILON : SimilarityMeasure.cpp
  • COLOR_BLACK : ImageDraw.hh
  • COLOR_BLUE : ImageDraw.hh
  • COLOR_GREEN : ImageDraw.hh
  • COLOR_GREY50 : ImageDraw.hh
  • COLOR_RED : ImageDraw.hh
  • COLOR_WHITE : ImageDraw.hh
  • CONIC2D_TYPE : Conic2D.hh
  • CONV_FLOAT : Convolution.hh
  • CONV_INT : Convolution.hh
  • CORRESPONDENCE_FILENAME_SUFFIX : PMatrixTest.cpp
  • COUNT : ExampleRandom2D.cpp, ExampleRandom2.cpp
  • COUT : DebugSimple.hh
  • COUT_DEST : DebugSimple.hh
  • COUT_ONOFF : DebugSimple.hh
  • COVMATRIX3X3_TYPE : CovMatrix3x3.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- d -

  • D1 : ImageConvert.cpp
  • D2 : ImageConvert.cpp
  • D_3DOUT_PDECOMP : ThreeDOut.hh
  • D_BF_ADD : BaseFactory.hh
  • D_BF_GEN : BaseFactory.hh
  • D_BINOMIAL_KERNEL : Binomial.hh
  • D_BINOMIAL_WRITE_IM : Binomial.hh
  • D_CAM_DCINERT : Camera.hh
  • D_CAM_DCPTU : Camera.hh
  • D_CAM_IO : Camera.hh
  • D_CAMERA_METADATA : Camera.hh
  • D_CAST_CHECK : ImageBase.hh, Image.hh
  • D_CD_FEATURES : CornerDetectorBase.hh
  • D_CD_INIT : CornerDetectorBase.hh
  • D_CD_SUSAN : CornerDetectorBase.hh
  • D_CD_SUSAN_QUALITY : CornerDetectorBase.hh
  • D_CD_WRITE_DEBUG_IM : CornerDetectorBase.hh
  • D_COLOR_HIST_VEC : ColorHistogram.hh
  • D_COLOR_MULTI_HIST_VEC : ColorMultiHistogram.hh
  • D_COND_DEBUG : Condensation.hh
  • D_COND_ERROR : Condensation.hh
  • D_COND_INIT : Condensation.hh
  • D_COND_INT : CondensHisto.hh
  • D_COND_MEANVAR : Condensation.hh
  • D_COND_PROCESS : Condensation.hh
  • D_COND_WEIGHTS : Condensation.hh
  • D_CONIC2D_TAN : Conic2D.hh
  • D_CONV_KERNEL : Convolution.hh
  • D_CONV_TYPES : Convolution.hh
  • D_CONVERT : ImageBase.hh, Image.hh
  • D_COPYIN : ImageBase.hh, Image.hh
  • D_CORNER_MATCHER_KLT : CornerMatcher.hh
  • D_CORNER_MATCHER_PARABOLA : CornerMatcher.hh
  • D_CORNER_MATCHER_PYKLT : CornerMatcher.hh
  • D_CORNER_MATCHER_SEARCH : CornerMatcher.hh
  • D_CS_ANALYZE : CScommBase.hh
  • D_CS_CONNECT : CScommBase.hh
  • D_CS_DEFAULT_PORT : CScommBase.hh
  • D_CS_GETDATA : CScommBase.hh
  • D_CS_LISTENER : CScommBase.hh
  • D_CS_MAXCLIENTS : CScommBase.hh
  • D_CS_RECEIVER : CScommBase.hh
  • D_CS_SEND : CScommBase.hh
  • D_DC_DATA_CALC : DCData.hh
  • D_DCAM : VideoSource_Base.hh
  • D_DCAM_F7 : VideoSource_Base.hh
  • D_DOUBLE_RANSAC_SOLUTION : ExampleRANSAC_double.hh
  • D_DTD : VideoSource_Base.hh
  • D_DV : VideoSource_Base.hh
  • D_DV2 : VideoSource_Base.hh
  • D_EL_BRES : EpipolarLine.hh
  • D_EL_BRESROUND : EpipolarLine.hh
  • D_EL_INT : EpipolarLine.hh
  • D_EL_NEWSTARTEND : EpipolarLine.hh
  • D_EL_NEXTLINE : EpipolarLine.hh
  • D_EL_OFFSET : EpipolarLine.hh
  • D_EL_ROUND : EpipolarLine.hh
  • D_EL_SLOPE : EpipolarLine.hh
  • D_EL_STARTEND : EpipolarLine.hh
  • D_EL_TRANSF : EpipolarLine.hh
  • D_EMATRIX_ROT_TRANS : EMatrix.hh
  • D_EXIF : ImageAttributes.hh
  • D_FILTERBASE_CALLSTACK : FilterBase.hh
  • D_FM_INTAPPROX : FilterMask.hh
  • D_FM_PRECISION : FilterMask.hh
  • D_FMATRIX_GETEPIPOLES : FMatrix.hh
  • D_GAUSS_FAST_GREY : Gauss.hh
  • D_GRAD_DEB : Convolution.hh
  • D_GRADGAUSS_KERNEL : Convolution.hh
  • D_GUI_DESTRUCT : GuiBase.hh
  • D_GUI_GDK : GuiGTK.hh
  • D_GUI_KEY : GuiBase.hh
  • D_GUI_MAIN : GuiBase.hh
  • D_GUI_MOUSE_BUTTON : GuiBase.hh
  • D_GUI_MUTEX : GuiBase.hh
  • D_GUI_SIGNAL : GuiBase.hh
  • D_GUI_THREAD : GuiGTK.hh
  • D_HIST_VEC : Histogram.hh
  • D_HM_COMP : HMatrixBase.hh
  • D_IC_IM : ImageCanvas.hh
  • D_IMAGE_MINMAXCOO : Image.hh
  • D_IMAGE_TRACE : ImageBase.hh
  • D_IMCONV_IPL : ImageConvert.hh
  • D_INIT : Label.hh
  • D_INT_HIST : IntegralHistogram.hh
  • D_INTERPOL_BEZIER : Interpolator.hh
  • D_INTERPOL_COMMON : Interpolator.hh
  • D_INTERPOL_SPLINE2 : Interpolator.hh
  • D_INTERPOL_SPLINE3 : Interpolator.hh
  • D_LABEL : Label.hh
  • D_LS_MATRIXES : LeastSquares.hh
  • D_LS_RED_MATRIXES : LeastSquares.hh
  • D_LS_SVD : LeastSquares.hh
  • D_MD_IO : MatchDataBase.hh
  • D_MDCAM_GRAB : MDcam.hh
  • D_MDCAM_INIT : MDcam.hh
  • D_MI_CONVGREY : ImageBase.hh, Image.hh
  • D_MI_IOSTREAM : ImageBase.hh, Image.hh
  • D_MI_TOPLANAR : ImageBase.hh, Image.hh
  • D_MSAC_INIT : MSAC.hh
  • D_MSAC_SAMPLES : MSAC.hh
  • D_MSAC_SOLVEM : MSAC.hh
  • D_NET : VideoSource_Base.hh
  • D_PARAM_ALL : Param.hh
  • D_PARAM_CONF_FILE : Param.hh
  • D_PARAM_GET : Param.hh
  • D_PARAM_IO : Param.hh
  • D_PARAM_PARSECMDL : Param.hh
  • D_PS_COEFF : PolynomialSolve.hh
  • D_PS_GSL : PolynomialSolve.hh
  • D_PS_NLREFINE : PolynomialSolve.hh
  • D_PYRAMID_CREATE : PyramidImage.hh
  • D_PYRAMID_SINGLE_IM : PyramidImage.hh
  • D_RANSAC_SAMPLES : RANSAC.hh
  • D_RANSAC_SOLVE_MASTER : RANSAC.hh
  • D_REGION_MATCHER_COLORCCV : RegionMatcher.hh
  • D_REGION_MATCHER_COLORNCC : RegionMatcher.hh
  • D_REGION_MATCHER_KLT : RegionMatcher.hh
  • D_REGION_MATCHER_KLT_EDGE : RegionMatcher.hh
  • D_REGION_MATCHER_LINE : RegionMatcher.hh
  • D_REGION_MATCHER_PARABOLA : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCH_EVEN : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCH_ODD : RegionMatcher.hh
  • D_REGION_MATCHER_SEARCHNCC : RegionMatcher.hh
  • D_RESCALE_INIT : Rescale.hh
  • D_RESCALE_WRITE_IMG : Rescale.hh
  • D_ROI_IO : ROI.hh
  • D_ST_FEATURES : StructureTensor.hh
  • D_ST_INIT : StructureTensor.hh
  • D_ST_WRITE_DEBUG_IM : StructureTensor.hh
  • D_SVD_RANK : SVD.hh
  • D_SVD_SOLVE : SVD.hh
  • D_TR_ARG : Triangulation.hh
  • D_TR_INF : Triangulation.hh
  • D_TR_OPT : Triangulation.hh
  • D_TR_OPT_F : Triangulation.hh
  • D_TR_OPT_TRANSF : Triangulation.hh
  • D_TR_POS : Triangulation.hh
  • D_TR_TR : Triangulation.hh
  • D_TRACKER_ERROR : Tracker.hh
  • D_TRACKER_FILL_UP : Tracker.hh
  • D_TRACKER_IMAGES : Tracker.hh
  • D_TRACKER_INIT : Tracker.hh
  • D_TRACKER_NUMITER : Tracker.hh
  • D_TRACKER_PARAM : Tracker.hh
  • D_TRACKER_TRACK : Tracker.hh
  • D_TRACKER_WRITE_IM : Tracker.hh
  • D_TRACKERB_AFFINE : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_BILINEAR : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_INIT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_INPUT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_KLT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRACKERB_REJECT : TrackerBaseInterface.hh, TrackerBase.hh
  • D_TRIANG_COVWEIGHT : Triangulation.hh
  • D_TS_READ : TrackerSynth.hh
  • D_TS_REPLACE : TrackerSynth.hh
  • D_UT_PARAM : UnscentedTransform.hh
  • D_UT_SIGMA_POINTS : UnscentedTransform.hh
  • D_UT_TRANSFORM : UnscentedTransform.hh
  • D_V4L : VideoSource_Base.hh
  • D_VS_WHITEB : VideoSource_Base.hh
  • D_VSO_DISK : VideoSource_Base.hh
  • D_WRITE_IMAGES : Convolution.hh
  • dabs : win32_f2c.h, f2c_gnu011.h
  • DEBUG : ExampleTFT.cpp, ExampleGenSynthMatches.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp
  • DEBUG_SPHEREPROJ_AVG : SphericalUndistortion.hh
  • DEBUG_SPHEREPROJ_CIRCLE : SphericalUndistortion.hh
  • DEF_P_SCALE : ThreeDOut.hh
  • DEFAULT_32to8_scale : ImageBase.hh
  • DEFAULT_Display_delay : ImageBase.hh
  • DEFAULT_DOUBLE_ZERO_THRESHOLD : SVD.hh
  • DEFAULT_FIXED_SCALE : biasview.cpp
  • DEFAULT_LEADING_ZEROS : FileHandling.hh
  • DEFAULT_MAX_AFFINECHANGE : TrackerBase.cpp
  • DEFAULT_PARA_FILE_NAME : ExampleTFT.cpp, ExampleGenSynthMatches.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleGradient.cpp, ExampleCornerDetector.cpp
  • DEFAULT_QUICK : CornerDetectorSusan.hh
  • DEFAULT_THRESH : CornerDetectorSusan.hh
  • DEFAULT_UUID_CONSECUTIVELY : UUID.hh
  • DEFAULT_WrapBias2Ipl_WINNAME : ImageBase.hh
  • DEGREE_PER_RAD : ThreeDOut.cpp
  • DEPTH_MAX : PMDImageProc.cpp
  • DEPTH_MIN : PMDImageProc.cpp
  • DFLT_PYSIZE : Tracker.cpp
  • dmax : win32_f2c.h, f2c_gnu011.h
  • dmin : win32_f2c.h, f2c_gnu011.h
  • DOUBLE_EPSILON : Matrix.hh
  • DOUBLE_MIN : PolynomialSolve.cpp
  • DrawTextGL_DEFAULT_FONTNAME : DrawTextGL.hh
  • DrawTextGL_DEFAULT_FONTSIZE : DrawTextGL.hh
  • DV_PIC_SIZE : VideoSource_DV.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- e -

  • EMATRIX_TYPE : EMatrixBase.hh
  • EMSG : getopt_W32.cpp, getopt_long_W32.cpp
  • EPIPOLE_FACTOR : InvestigateEpipoleEstimation.cpp
  • EPS : Random.cpp
  • ERR_ILLI : Label.cpp
  • ERR_ILLT : Label.cpp
  • ERR_NOLB : Label.cpp
  • ERROR_STREAM : Error.hh
  • EXAMPLEDEBUG_TESTFLAG : MyDebug.hh
  • EXAMPLEDEBUG_TESTFLAG2 : MyDebug.hh
  • Extern : win32_f2c.h, f2c_gnu011.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- f -

  • F2C_proc_par_types : win32_f2c.h, f2c_gnu011.h
  • F77_DGEEV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGELS : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESVD : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGGGLM : Lapack.cpp
  • F77_DSYEV : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F_SVD_THRESH : ExampleSVD3x3.cpp, FMatrix.cpp
  • FACTORY_INVALID_TAG : BaseFactory.hh
  • FALSE_ : win32_f2c.h, f2c_gnu011.h
  • FASTYUV : ImageConvert.cpp
  • FILTER_INSTANTIATION_CLASS : StructureTensor.cpp, Rescale.cpp, Morphology.cpp, Median.cpp, Mean.cpp, GradientSobel3x3.cpp, GradientSimple.cpp, GradientGaussAsymmetric.cpp, GradientGauss.cpp, Gauss.cpp, FilterNToN.cpp, FilterNTo3N.cpp, FilterNTo2N.cpp, FilterBase.cpp, Erosion.cpp, DistTransform.cpp, Dilation.cpp, DeInterlace.cpp, Convolution.cpp, Binomial.cpp
  • FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT : StructureTensor.cpp, GradientSobel3x3.cpp, GradientSimple.cpp, GradientGaussAsymmetric.cpp, GradientGauss.cpp, FilterNTo3N.cpp, FilterNTo2N.cpp
  • FIXED_MAX : biasview.cpp
  • FIXED_MIN : biasview.cpp
  • FM_FLOAT : FilterMask.hh
  • FM_INT : FilterMask.hh
  • FM_RESET_OTHER : FilterMask.hh
  • FMATRIX_FILENAME_SUFFIX : PMatrixTest.cpp
  • FMATRIX_TYPE : FMatrixBase.hh
  • FRAME_DEFAULT_SIZE : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • FTOI : CornerDetectorSusan.cpp
  • FUNCNAME : PMDImageIO.cpp, Error.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- g -

  • GAUSS2D_CONFIDENCE_20_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_39_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_50_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_68_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_90_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_95_PERCENT : Conic2D.hh
  • GAUSS2D_CONFIDENCE_99_PERCENT : Conic2D.hh
  • GAUSS3D_CONFIDENCE_20_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_39_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_50_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_68_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_90_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_95_PERCENT : Quadric3D.hh
  • GAUSS3D_CONFIDENCE_99_PERCENT : Quadric3D.hh
  • GL2Cbool : GeometryGL.cpp
  • GLUT_BUILDING_LIB : ExampleGLShared.cpp, biasgl.h
  • GRAD_UCHAR_ZERO : ColorHarris.cpp
  • GRAYTEST : Operators.cpp
  • GRP_ALL : Param.hh
  • GRP_NOSHOW : Param.hh
  • GSM_2D_MATCHES : GenSynthMatches.hh
  • GSM_3D_POINTS : GenSynthMatches.hh
  • GSM_CAM_MOTION : GenSynthMatches.hh
  • GSM_FMATRIX : GenSynthMatches.hh
  • GSM_MOVIN_3D_POINTS : GenSynthMatches.hh
  • GSM_MOVIN_TRANSF : GenSynthMatches.hh
  • GSM_NOISE : GenSynthMatches.hh
  • GSM_VIEWINGVOL : GenSynthMatches.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- h -

  • HIST_BIN_COUNT : ExampleRandom.cpp
  • HMATRIX_TYPE : HMatrixBase.hh
  • HOMGLINE2D_EPS : HomgLine2D.hh
  • HOMGLINE2D_TYPE : HomgLine2D.hh
  • HOMGLINE3D_EPS : HomgLine3D.hh
  • HOMGLINE3D_TYPE : HomgLine3D.hh
  • HOMGPLANE3D_EPS : HomgPlane3D.hh
  • HOMGPLANE3D_TYPE : HomgPlane3D.hh
  • HOMGPOINT1D_TYPE : HomgPoint1D.hh
  • HOMGPOINT1D_TYPE_EPS : HomgPoint1D.hh
  • HOMGPOINT2D_TYPE : ExampleMetaData.cpp, HomgPoint2D.hh
  • HOMGPOINT2D_TYPE_EPS : HomgPoint2D.hh
  • HOMGPOINT3D_EPS : HomgPoint3D.hh
  • HOMGPOINT3D_TYPE : HomgPoint3D.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- i -

  • IA : Random.cpp
  • IA1 : Random.cpp
  • IA2 : Random.cpp
  • IA3 : Random.cpp
  • IC : Random.cpp
  • IC1 : Random.cpp
  • IC2 : Random.cpp
  • IC3 : Random.cpp
  • IDENTIFIER : ImageBase.hh
  • IDENTIFIER_LENGTH : ImageBase.hh
  • IGNORE_FIRST : getopt_long_W32.cpp
  • IM : Random.cpp
  • IMSIZE : ExampleThreeDOutVRML.cpp
  • IN_ORDER : getopt_long_W32.cpp
  • INORDER : getopt_long_W32.cpp
  • InputImageType : ExampleGradient.cpp
  • INST : CornerMatcher.cpp, Camera.cpp, RegionMatcher.cpp, CornerMatcher.cpp, StereoRedGreen.cpp, SphericalUndistortion.cpp, ColorMultiHistogram.cpp, ColorHistogram.cpp, Camera.cpp, Vector4.cpp, Vector3.cpp, Vector2.cpp, Vector.cpp, Tensor3D3x3x3.cpp, Tensor3D.cpp, Matrix4x4.cpp, Matrix3x4.cpp, Matrix3x3.cpp, Matrix2x2.cpp, Matrix.cpp
  • InST : ExampleLineMatcher.cpp
  • INST_ADDHIST : Histogram.cpp
  • INST_ADDHIST_IMG : Histogram.cpp
  • INSTANCE : EpipolarLine.cpp
  • INSTANCE_Image : Image.cpp
  • INSTANCE_ImageConvert : ImageConvertInstantiation.cpp
  • INSTANCE_ImageConvert_DV : ImageConvertInstantiation.cpp
  • INSTANCE_ImageConvert_OPENCV : ImageConvertInstantiation.cpp
  • INSTANCE_ImageDraw : ImageDraw.cpp
  • INSTI : ImageConvertInstantiation.cpp
  • INSTUC : RegionMatcher.cpp
  • IQ : Random.cpp
  • IR : Random.cpp
  • IS_POSIXLY_CORRECT : getopt_long_W32.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- p -

  • P_MATRIX_COLS : PMatrixBase.hh
  • P_MATRIX_ROWS : PMatrixBase.hh
  • PARALLEL_THRESHOLD : Triangulation.hh
  • PERMUTE : getopt_long_W32.cpp
  • PLUECKERMATRIX_TYPE : PlueckerMatrix.hh
  • PMATRIX_EPSILON : PMatrixBase.hh
  • PMATRIX_TYPE : PMatrixBase.hh
  • PMATRIXLINEAR : PMatrixLinear.hh
  • POLAR_TABLE_OFFSET : GradientSimple.cpp
  • POLAR_TABLE_SIZE : GradientSimple.cpp
  • POLYNOMIALSOLVE_TYPE : PolynomialSolve.hh
  • POSE_TYPE : Pose.hh
  • POSECOVARIANCE_TYPE : PoseParametrizationCovariance.hh
  • PP_TYPE : PoseParametrization.hh
  • PRINT_ERROR : getopt_long_W32.cpp
  • PRINTTYPE : Debug.hh
  • PS_DOUBLE_EPSILON : PolynomialSolve.cpp
  • PYRAMID_BACKGROUND : PyramidImage.hh
  • PYRAMID_BORDER : PyramidImage.hh
  • PYTHAG : SVD3x3.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- q -

  • QUADRIC3D_TYPE : Quadric3D.hh
  • QUAL : CornerDetectorBase.hh
  • QUATERNION_EPSILON : Quaternion.hh
  • QUATERNION_TYPE : Quaternion.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- r -

  • RADIUS : ExampleConic.cpp
  • RANSAC_DEFAULT_PROBOFGOODSOLUTION : RANSAC.hh
  • RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE : RANSAC.hh
  • READPARAM_CHECKDUPES : Param.cpp
  • required_argument : getopt_W32.h
  • RGBAuc_WHITE_OPAQUE : RGBA.hh
  • RGBAuc_WHITE_SEMI : RGBA.hh
  • RIG_PARAMETER_CURRENT_XML_VERSION : RigParameter.hh, ProjectionParametersIO.hh
  • RM1 : Random.cpp
  • RM2 : Random.cpp
  • RNMX : Random.cpp
  • ROI_IDENTIFIER : ROI.cpp
  • ROI_IDENTIFIER_LENGTH : ROI.cpp
  • ROI_VERSION_NUMBER : ROI.hh
  • ROTATION_MATRIX_EPSILON : RMatrixBase.hh
  • ROTATION_MATRIX_TYPE : RMatrixBase.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- s -

  • SAD3x3 : RegionMatcher.hh
  • SAD5x5 : RegionMatcher.hh
  • SCROLLBAR_WIDTH : ImageCanvas.cpp
  • SEGDEF : Label.cpp
  • SETZEROSHIFT : FilterMask.cpp
  • SEVEN_SUPP : CornerDetectorSusan.hh
  • SIGN : SVD3x3.cpp
  • SINGULAR_THRESH_INVERSION : Quadric3D.cpp
  • SLIDER_DIGITS : ImageCanvas.cpp
  • SMALL_DET : TrackerBase.cpp
  • SPEED_STEP : biasview.cpp, biasshowsm.cpp
  • st_type : ExampleTracker3.cpp, ExampleHarrisColor.cpp
  • StorageType : showdvcam.cpp, showdv2cam.cpp, showdcam.cpp, ExampleDirectToDisk.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleDeInterlace.cpp, ExampleCornerDetector.cpp
  • STORAGETYPE_MAX : SimilarityMeasure.cpp
  • STREAM_PRECISION : ProjectionParametersBase.cpp, PMatrix.cpp
  • SVD_MAX_ITERATIONS : SVD3x3.cpp
  • SVD_ZERO_THRESH : Quadric3D.cpp, Conic2D.cpp
  • SVDSOLVE : SVD.hh
  • swap : Matrix4x4.hh
  • SWIC : ImageConvert.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- t -

  • TARGET_FPS : OpenGLCanvas.hh
  • TFT_EST_CHECK_EQUATIONS : TFTensorEstimation.cpp
  • TFT_EST_USE_SVD_HACK : TFTensorEstimation.cpp
  • TIFFTAG_ASPECTRATIO : PMDImageIO.hh
  • TIFFTAG_CAMERACENTER : PMDImageIO.hh
  • TIFFTAG_CAMERAROTATION : PMDImageIO.hh
  • TIFFTAG_FOCALLENGTHX : PMDImageIO.hh
  • TIFFTAG_PRINCIPALPOINT : PMDImageIO.hh
  • TIFFTAG_UNDISTORTION : PMDImageIO.hh
  • TIMING : ExampleTracker3.cpp
  • TNT_BASE_OFFSET : subscript.h
  • TNT_BOUNDS_CHECK : tnt.h
  • TNT_MAJOR_VERSION : version.h
  • TNT_MINOR_VERSION : version.h
  • TNT_SUBMINOR_VERSION : version.h
  • TNT_SUBSCRIPT_TYPE : subscript.h, fortran.h
  • TNT_VERSION_STRING : version.h
  • TRACKER_ERRORINCREASED : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_IGNOREPOINT : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_MEANABSDIF : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_NOSTRUCTURE : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_OUTOFIMAGE : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_OUTOFROI : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_SUCCESS : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_TOOMANYITER : TrackerBaseInterface.hh, TrackerBase.hh
  • TRACKER_X84 : TrackerBaseInterface.hh, TrackerBase.hh
  • TRIANGULATION_DEFAULT_DELTAPIXEL : Triangulation.hh
  • TRIANGULATION_DEFAULT_SIGMA : Triangulation.hh
  • TRIFOCALTENSOR_TYPE : TrifocalTensorBase.hh
  • TRUE_ : win32_f2c.h, f2c_gnu011.h
  • TWICEPI : EpipolarLine.hh
  • type : ExampleTracker2.cpp, ExampleTracker.cpp, ExamplePyramidImage.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleDeInterlace.cpp, ExampleCornerDetector.cpp
  • TYPE2 : ExampleGauss.cpp, ExampleBinomial.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- u -

  • UINT16_MAX : PMDImageProc.cpp
  • UNDIST_EPS : UnVignette.hh, MatlabTBUndistortion.hh
  • UNKNOWN_META_DATA : ImageIO.hh
  • USE_DEVIL_ILU : ImageIO.cpp
  • USE_FOUR_EQUATIONS_PER_POINT : TFTensorEstimation.cpp
  • USE_NATIVE_XGA : VideoSource_DCAM_CMU.cpp, VideoSource_DCAM.cpp
  • UT_NORMALIZE : UnscentedTransform.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- v -

  • VECTOR2SIZE : Vector2.hh
  • VECTOR3_SIZE : Vector3.hh
  • VECTOR4SIZE : Vector4.hh
  • VERSION_NUMBER : ImageBase.hh
  • VERSIONOFTESTCLASS : ExampleXMLBase.cpp
  • VFF_CM_cieRGB : ViffHeader.hh
  • VFF_CM_cieucsLab : ViffHeader.hh
  • VFF_CM_cieucsLuv : ViffHeader.hh
  • VFF_CM_cieucsSOW : ViffHeader.hh
  • VFF_CM_cieucsUVW : ViffHeader.hh
  • VFF_CM_cieUVW : ViffHeader.hh
  • VFF_CM_cieXYZ : ViffHeader.hh
  • VFF_CM_GENERIC : ViffHeader.hh
  • VFF_CM_genericRGB : ViffHeader.hh
  • VFF_CM_HLS : ViffHeader.hh
  • VFF_CM_HSV : ViffHeader.hh
  • VFF_CM_IHS : ViffHeader.hh
  • VFF_CM_NONE : ViffHeader.hh
  • VFF_CM_ntscCMY : ViffHeader.hh
  • VFF_CM_ntscRGB : ViffHeader.hh
  • VFF_CM_ntscYIQ : ViffHeader.hh
  • VFF_DEP_BIGENDIAN : ViffHeader.hh
  • VFF_DEP_CRAYORDER : ViffHeader.hh
  • VFF_DEP_DECORDER : ViffHeader.hh
  • VFF_DEP_IEEEORDER : ViffHeader.hh
  • VFF_DEP_LITENDIAN : ViffHeader.hh
  • VFF_DEP_NSORDER : ViffHeader.hh
  • VFF_DES_ADPCM : ViffHeader.hh
  • VFF_DES_CCITT : ViffHeader.hh
  • VFF_DES_COMPRESS : ViffHeader.hh
  • VFF_DES_GENERIC : ViffHeader.hh
  • VFF_DES_RAW : ViffHeader.hh
  • VFF_DES_RLE : ViffHeader.hh
  • VFF_DES_TRANSFORM : ViffHeader.hh
  • VFF_LOC_EXPLICIT : ViffHeader.hh
  • VFF_LOC_IMPLICIT : ViffHeader.hh
  • VFF_MAP_FORCE : ViffHeader.hh
  • VFF_MAP_OPTIONAL : ViffHeader.hh
  • VFF_MAPTYP_1_BYTE : ViffHeader.hh
  • VFF_MAPTYP_2_BYTE : ViffHeader.hh
  • VFF_MAPTYP_4_BYTE : ViffHeader.hh
  • VFF_MAPTYP_COMPLEX : ViffHeader.hh
  • VFF_MAPTYP_DOUBLE : ViffHeader.hh
  • VFF_MAPTYP_FLOAT : ViffHeader.hh
  • VFF_MAPTYP_NONE : ViffHeader.hh
  • VFF_MS_CYCLE : ViffHeader.hh
  • VFF_MS_GROUP : ViffHeader.hh
  • VFF_MS_NONE : ViffHeader.hh
  • VFF_MS_ONEPERBAND : ViffHeader.hh
  • VFF_MS_SHARED : ViffHeader.hh
  • VFF_NOTSUB : ViffHeader.hh
  • VFF_TYP_1_BYTE : ViffHeader.hh
  • VFF_TYP_2_BYTE : ViffHeader.hh
  • VFF_TYP_4_BYTE : ViffHeader.hh
  • VFF_TYP_BIT : ViffHeader.hh
  • VFF_TYP_COMPLEX : ViffHeader.hh
  • VFF_TYP_DCOMPLEX : ViffHeader.hh
  • VFF_TYP_DOUBLE : ViffHeader.hh
  • VFF_TYP_FLOAT : ViffHeader.hh
  • VIFF_HEADERSIZE : ViffHeader.hh
  • VISIBLEALPHA : GeometryGL.hh
  • VLD_AGGREGATE_DUPLICATES : LeakChecking.h
  • VLD_MAX_DATA_DUMP : LeakChecking.h
  • VOID : win32_f2c.h, f2c_gnu011.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- w -

  • WS : Debug.hh
  • WX0 : Rescale.cpp
  • WX1 : Rescale.cpp
  • WXDLLEXPORT : _wx_intellisense.h
  • WXEXPORT : _wx_intellisense.h
  • WxToAscii : StringConv.hh
  • wxUSE_GUI : _wx_intellisense.h
  • wxUSE_MSGDLG : _wx_intellisense.h
  • WY0 : Rescale.cpp
  • WY1 : Rescale.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- x -

  • XML_STD_ENCODING : XMLIO.hh
  • XV_IMAGE_REL_NUM : ViffHeader.hh
  • XV_IMAGE_VER_NUM : ViffHeader.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y

- y -

  • YUV2RGB : ImageConvert.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • _ExampleGLSharedMyFrameIDs_ : ExampleGLShared.hh
  • _ExampleImageCanvasGLBaseMyFrameIDs_ : ExampleImageCanvasGLBase.hh
  • _ExampleOpenGLCanvasMyFrameIDs_ : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh
  • BIAS_DEINTERLACE_TYPE : DeInterlace.hh
  • BIAS_LOG_LEVEL : LogFacility.hh
  • CameraDrawingStyle : ThreeDOut.hh
  • CameraModel : VideoSource_DCAM.hh
  • CornerIndices : GeometryGL.hh
  • DrawbufferMode : RenderModeGL.hh
  • EdataType : CScommClasses.hh
  • EGradType : FilterBase.hh
  • ERejectionType : TrackerBaseInterface.hh, TrackerBase.hh
  • ETrackerType : TrackerBase.hh
  • filtertype : biasfilter.cpp
  • HistMode : Histogram.hh
  • InterpolationMethod : BackwardMapping.hh
  • InterpolationType : Rescale.hh
  • LensModel : VideoSource_DCAM.hh
  • LineDrawingStyle : ThreeDOut.hh
  • LowPassType : FilterBase.hh
  • MatrixInitType : Matrix.hh
  • Navigationmode : CameraViewController.hh
  • PointDrawingStyle : ThreeDOut.hh
  • ScaledImageCanvas_IDs : ImageCanvas.cpp
  • TEdge : EpipolarLine.hh
  • TLineType : EightWaySymmetry.hh
  • wxIDs : ShowCamWx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • w

- a -

  • Arrow : ThreeDOut.hh

- b -

  • BIAS_DI_121 : DeInterlace.hh
  • BIAS_DI_22 : DeInterlace.hh
  • BIAS_LOG_DEBUG : LogFacility.hh
  • BIAS_LOG_FATAL : LogFacility.hh
  • BIAS_LOG_INFO : LogFacility.hh
  • BIAS_LOG_NONE : LogFacility.hh
  • BIAS_LOG_WARNING : LogFacility.hh
  • Bicubic : Rescale.hh
  • Bilinear : Rescale.hh
  • BottomEdge : EpipolarLine.hh
  • Box : ThreeDOut.hh

- c -

  • CAMERA_PTGREY_DRAGONFLY_BW : VideoSource_DCAM.hh
  • CAMERA_PTGREY_DRAGONFLY_COLOR : VideoSource_DCAM.hh
  • CAMERA_PTGREY_DRAGONFLY_HIRES : VideoSource_DCAM.hh
  • CAMERA_PTGREY_SCORPION_COLOR_1600 : VideoSource_DCAM.hh
  • CAMERA_SONY_DFW_V500 : VideoSource_DCAM.hh
  • CAMERA_SONY_DFW_X700 : VideoSource_DCAM.hh
  • CAMERA_SONY_DV : VideoSource_DCAM.hh
  • CAMERA_SONY_EVID31 : VideoSource_DCAM.hh
  • CAMERA_UNKNOWN : VideoSource_DCAM.hh
  • CS_BINARY : CScommClasses.hh
  • CS_FLOAT : CScommClasses.hh
  • CS_INT : CScommClasses.hh
  • CS_NONE : CScommClasses.hh
  • CS_STRING : CScommClasses.hh

- d -

  • Dashed : ThreeDOut.hh

- e -

  • E_NE : EightWaySymmetry.hh

- g -

  • GT_Gauss : FilterBase.hh
  • GT_GaussAsymmetric : FilterBase.hh
  • GT_Simple : FilterBase.hh
  • GT_Sobel3x3 : FilterBase.hh

- h -

  • HIST_BARS : Histogram.hh
  • HIST_LINES : Histogram.hh
  • HIST_POINTS : Histogram.hh

- i -

  • ID_ABOUT : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh, ExampleImageCanvasGLBase.hh, ExampleGLShared.hh
  • ID_About : ExampleMDCamToShmWx.cpp, biasviewwx.cpp, biasdetectunvignettewx.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • ID_AspectRatio : ProjectionGUI.cpp
  • ID_BUTTON_QUIT : ExampleMDCamToShmWx.cpp
  • ID_BUTTON_WB : ExampleMDCamToShmWx.cpp
  • ID_Center : ProjectionGUI.cpp
  • id_config : ShowCamWx.cpp
  • ID_Delay : biasviewwx.cpp
  • ID_Exit : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • ID_Fit : biasviewwx.cpp
  • ID_FocalLength : ProjectionGUI.cpp
  • ID_ImageSize : ProjectionGUI.cpp
  • ID_Info : biasviewwx.cpp
  • id_key : ShowCamWx.cpp
  • ID_KeyInfo : biasviewwx.cpp
  • ID_KMatrix : ProjectionGUI.cpp
  • ID_Load : biasviewwx.cpp, biasdetectunvignettewx.cpp, ProjectionGUI.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • ID_LOADIMAGE : ExampleImageCanvasGLBase.hh
  • ID_MANUAL_EXPOSURE : ExampleMDCamToShmWx.cpp
  • ID_MetaData : biasviewwx.cpp
  • ID_New : ProjectionGUI.cpp
  • ID_Next : biasviewwx.cpp
  • ID_NormalizeQuaternion : ProjectionGUI.cpp
  • ID_Offset : ImageCanvas.cpp
  • id_pin : ShowCamWx.cpp
  • ID_PPX : biasdetectunvignettewx.cpp
  • ID_PPY : biasdetectunvignettewx.cpp
  • ID_Prev : biasviewwx.cpp
  • ID_Principal : ProjectionGUI.cpp
  • ID_Quaternion : ProjectionGUI.cpp
  • ID_QUIT : ExampleOpenGLCanvasBase.hh, ExampleOpenGLCanvas.hh, ExampleImageCanvasGLBase.hh, ExampleGLShared.hh
  • ID_Quit : ExampleMDCamToShmWx.cpp, ExampleImageCanvasFloat.cpp, ExampleImageCanvasEnhanced.cpp, ExampleImageCanvas.cpp
  • id_quit : ShowCamWx.cpp
  • ID_Radius : ProjectionGUI.cpp
  • id_record : ShowCamWx.cpp
  • ID_Rect : ExampleImageCanvasEnhanced.cpp
  • ID_RMatrix : ProjectionGUI.cpp
  • ID_RunStop : biasviewwx.cpp
  • ID_Save : ProjectionGUI.cpp
  • id_save : ShowCamWx.cpp
  • id_save2 : ShowCamWx.cpp
  • ID_Scale : ImageCanvas.cpp
  • ID_SLIDER_GAIN : ExampleMDCamToShmWx.cpp
  • ID_SLIDER_SHUTTER : ExampleMDCamToShmWx.cpp
  • ID_Steps : biasdetectunvignettewx.cpp
  • ID_TESTSHOT : ExampleOpenGLCanvas.hh
  • id_timer : ShowCamWx.cpp
  • ID_Timer : biasviewwx.cpp, biasdetectunvignettewx.cpp
  • ID_TIMER : ExampleMDCamToShmWx.cpp
  • ID_Undistortion : ProjectionGUI.cpp
  • ID_UnVig : biasdetectunvignettewx.cpp
  • ID_WriteCameraData : biasdetectunvignettewx.cpp
  • InvalidEdge : EpipolarLine.hh

- l -

  • LeftEdge : EpipolarLine.hh
  • LENS_PENTAX_CMOUNT_4_2 : VideoSource_DCAM.hh
  • LENS_PENTAX_CMOUNT_4_8 : VideoSource_DCAM.hh
  • LENS_PENTAX_CMOUNT_8_0 : VideoSource_DCAM.hh
  • LENS_SONY_DV_BUILTIN : VideoSource_DCAM.hh
  • LENS_SONY_EVID31_BUILTIN : VideoSource_DCAM.hh
  • LENS_UNKNOWN : VideoSource_DCAM.hh
  • LOWER_LEFT : GeometryGL.hh
  • LOWER_RIGHT : GeometryGL.hh
  • LPT_Binomial : FilterBase.hh
  • LPT_Gauss : FilterBase.hh
  • LPT_Mean : FilterBase.hh
  • LT_Invalid : EightWaySymmetry.hh

- m -

  • MapAnisotropic : BackwardMapping.hh
  • MapBicubic : BackwardMapping.hh
  • MapBilinear : BackwardMapping.hh
  • MapNearestNeighbor : BackwardMapping.hh
  • MapTrilinear : BackwardMapping.hh
  • MatrixIdentity : Matrix.hh
  • MatrixZero : Matrix.hh
  • mean : biasfilter.cpp
  • median : biasfilter.cpp
  • modeAxis1 : CameraViewController.hh
  • modeAxis2 : CameraViewController.hh
  • modeAxis3 : CameraViewController.hh
  • MONO : RenderModeGL.hh

- n -

  • N_NW : EightWaySymmetry.hh
  • NE_N : EightWaySymmetry.hh
  • NearestNeighbour : Rescale.hh
  • none : biasfilter.cpp
  • NW_W : EightWaySymmetry.hh

- o -

  • OPTICAL_CENTER : GeometryGL.hh

- p -

  • Point : ThreeDOut.hh
  • PointSprite : ThreeDOut.hh
  • PyramidMesh : ThreeDOut.hh
  • PyramidMeshWithArrow : ThreeDOut.hh
  • PyramidSolid : ThreeDOut.hh

- r -

  • RightEdge : EpipolarLine.hh
  • RT_Invalid : TrackerBase.hh
  • RT_MAD : TrackerBase.hh
  • RT_X86 : TrackerBase.hh

- s -

  • S_SE : EightWaySymmetry.hh
  • SE_E : EightWaySymmetry.hh
  • Solid : ThreeDOut.hh
  • Sphere : ThreeDOut.hh
  • STEREO_CONSUMER_NV : RenderModeGL.hh
  • STEREO_LEFT_RIGHT : RenderModeGL.hh
  • STEREO_QUADBUFFERED : RenderModeGL.hh
  • STEREO_TWOSCREENS : RenderModeGL.hh
  • STEREO_UNTOUCHED : RenderModeGL.hh
  • SW_S : EightWaySymmetry.hh

- t -

  • TopEdge : EpipolarLine.hh
  • TT_Affine4 : TrackerBase.hh
  • TT_Affine6 : TrackerBase.hh
  • TT_Invalid : TrackerBase.hh
  • TT_Simple : TrackerBase.hh
  • TT_SimpleAffine4 : TrackerBase.hh
  • TT_SimpleAffine6 : TrackerBase.hh
  • TT_Weighted : TrackerBase.hh

- u -

  • UPPER_LEFT : GeometryGL.hh
  • UPPER_RIGHT : GeometryGL.hh

- w -

  • W_SW : EightWaySymmetry.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- _ -

  • _am_compute4by1ErrorVector() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute4by4GradientMatrix() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute6by1ErrorVector() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_compute6by6GradientMatrix() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
  • _am_gauss_jordan_elimination() : TrackerBaseAffine.hh, TrackerBase.hh, TrackerBase.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- l -

  • Lapack_LLS_QR_linear_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Lapack_LU_linear_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Lapack_WLLS_solve() : Lapack.hh, Lapack.cpp
  • LeadingZeroString() : FileHandling.cpp
  • Less() : CompareFloatingPoint.hh
  • LessEqual() : CompareFloatingPoint.hh
  • LevenbergMarquardt() : Minpack.cpp
  • LevenbergMarquardtExtended() : Minpack.cpp
  • Library() : LGPL
  • LIBRARY() : LGPL
  • License() : LGPL
  • License< LGPL.html >() : LICENSE
  • linear_solve() : trisolve.h
  • listenthread() : CScommServer.cpp
  • lmder1_() : Minpack.cpp
  • lmder_() : Minpack.cpp
  • lmdif1_() : Minpack.cpp
  • lmdif_() : Minpack.cpp
  • loadFlowVectors() : Example7Point.cpp
  • LoadImage() : ExampleTrackerBase.cpp
  • LogCommandLine() : FileHandling.cpp
  • Lower_triangular_solve() : trisolve.h
  • Lower_triangular_view() : triang.h
  • LowerCase() : FileHandling.cpp
  • LU_factor() : lu.h
  • LU_solve() : lu.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- m -

  • main() : TestMIPVideoSource_Disk.cpp, showv4lcam.cpp, showmdcam.cpp, showdvcam.cpp, showdv2cam.cpp, showdcam16.cpp, showdcam.cpp, Scan1394Bus.cpp, ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp, ExampleVideoServer.cpp, ExampleVideofeedShm.cpp, ExampleMDCamToShm.cpp, ExampleDirectToDisk.cpp, ExampleCameraParameter.cpp, ParamExample.cpp, ExampleVRMLOutProjection.cpp, ExampleTriangleMesh.cpp, ExampleThreeDOutVRML.cpp, ExampleTFT.cpp, ExampleShowFreeD.cpp, ExampleMatchDataBase.cpp, ExampleGGTPlane.cpp, ExampleGGTCube.cpp, ExampleGenSynthMatches.cpp, timeit.cpp, pmatrix2projection.cpp, biasview.cpp, biasshowsm.cpp, biasshowepi.cpp, biassetuid.cpp, biassetprojection.cpp, biasprojection.cpp, biasmerge.cpp, biasinsert.cpp, biasfilter.cpp, biasextract.cpp, biasdiff.cpp, biasconvert.cpp, biasadd.cpp, testWarn.cpp, testLeak.cpp, testError.cpp, testEnv.cpp, testDefines.cpp, MathBaseOperators.cpp, helloconfig.cpp, ExampleKalman.cpp, condensImgExample.cpp, CondensHistoExample.cpp, serverExample.cpp, ExampleNetsync.cpp, clientExample.cpp, interpolate.cpp, ExampleWeightedLinearLeastSquares.cpp, ExampleUnscentedTransform.cpp, ExampleSVD3x3.cpp, ExampleSVD.cpp, ExampleRegressionPlane.cpp, ExampleRANSACPlane.cpp, ExampleRANSAC.cpp, ExamplePowell.cpp, ExamplePolynomialSolve.cpp, ExampleLeastSquares.cpp, ExampleInterpolateLuT.cpp, ExampleGSL.cpp, ExampleFFT.cpp, ExampleBSplineCurve.cpp, ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExampleParabola.cpp, ExampleLineMatcher.cpp, ExampleKLTEdge.cpp, ExampleColorNCC.cpp, PMatrix2RigParameter.cpp, ExampleVideoStream.cpp, ExampleUnVignette.cpp, ExampleUndistort.cpp, ExampleSphereProjections.cpp, ExampleRigParameter.cpp, ExamplePyramidImage.cpp, ExampleProjectionMapping.cpp, ExamplePMDImageIO.cpp, ExampleMapPerspImages.cpp, ExampleLogPolarMapping.cpp, ExampleHomographyMapping.cpp, ExampleHistogram.cpp, ExampleFMT2D.cpp, ExampleFFT2D_Tiles.cpp, ExampleFFT2D.cpp, ExampleCylinderMapping.cpp, ExampleContour.cpp, ExampleCameraParam.cpp, ExampleCamera.cpp, TestMouse.cpp, TestGuiPyramid.cpp, TestGuiEnhanced.cpp, TestGui.cpp, ExampleMultipleGui.cpp, PMatrixTest.cpp, InvestigateEpipoleEstimation.cpp, HMatrixTest.cpp, FMatrixTest.cpp, ExampleTriangulateOptimal.cpp, ExampleTriangulate2.cpp, ExampleTriangulate.cpp, ExampleProjectionParametersIO.cpp, ExampleProjection.cpp, ExamplePMatrix.cpp, ExampleLoadBOG_P.cpp, ExampleLoadBBC.cpp, ExampleConic.cpp, Example7Point.cpp, ExampleUpsampleBy2Grey.cpp, ExampleStructureTensor.cpp, ExampleRescale.cpp, ExampleMedian.cpp, ExampleHarrisColor.cpp, ExampleGradient.cpp, ExampleGauss.cpp, ExampleErosion.cpp, ExampleDistTransform.cpp, ExampleDilation.cpp, ExampleDeInterlace.cpp, ExampleConvolution.cpp, ExampleBinomial.cpp, ExampleCornerDetector.cpp, ExampleRandom2D.cpp, ExampleRandom2.cpp, ExampleRandom.cpp, ExamplePolynom.cpp, ExampleOperators.cpp, ExampleLoadBOG.cpp, ExampleLoadBan.cpp, viff2mip.cpp, mip2viff.cpp, ExampleUUID.cpp, ExampleTile.cpp, ExampleROI.cpp, ExampleMinMax.cpp, ExampleMetaData.cpp, ExampleIplWrapOpenCV.cpp, ExampleIplImageDraw.cpp, ExampleIplImageDisplay.cpp, ExampleIpl.cpp, ExampleInterpolation.cpp, ExampleImageOperator.cpp, ExampleImageMagickIO.cpp, ExampleImageLoad.cpp, ExampleImageAttributes.cpp, ExampleHSVConversion.cpp, ExampleForeignData.cpp, ExampleEmpty.cpp, ExampleDraw.cpp, ExampleConvert.cpp, ExampleChessboard.cpp, ExampleBresenham.cpp, convertRAW.cpp, ExampleRMatrix.cpp, ExampleQuaternion.cpp, ExamplePMatrixBase.cpp, ExampleTimeMeasureCycle.cpp, ExampleLogFacility.cpp, ExampleCopy.cpp, ExampleConstraints.cpp, DebugMyMain.cpp, ExampleXMLIO.cpp, ExampleXMLBase.cpp, ExampleFileNames.cpp, ExampleFactory.cpp, ExampleCompare.cpp
  • mainloop() : showv4lcam.cpp, showdvcam.cpp, showdv2cam.cpp, showdcam.cpp
  • MarkEnhancedAndSetDefaults() : ExampleTracker3.cpp, ExampleTracker2.cpp
  • matmult() : triang.h, transv.h, fmat.h, cmat.h
  • MatrixSqrt() : ExampleSVD.cpp
  • max() : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • meaningful() : LGPL
  • min() : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • mirror() : ExampleFMT2D.cpp
  • mult_element() : fmat.h, cmat.h
  • my_error_exit() : CompressJpeg.cpp
  • MyConstTransform() : ExampleUnscentedTransform.cpp
  • myfunc() : ExamplePowell.cpp
  • MyLeak1new() : testLeak.cpp
  • MyLeak2malloc() : testLeak.cpp
  • MyLinTransform() : ExampleUnscentedTransform.cpp
  • MyPowellFunc() : PolynomialSolve.cpp
  • mysobel() : ColorHarris.cpp
  • mysobel2() : ColorHarris.cpp
  • MySqTransform() : ExampleUnscentedTransform.cpp
  • myTolower() : ImageIO.cpp
  • mytoplanar() : ColorHarris.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- n -

  • NoLeak1() : testLeak.cpp
  • NoLeak2() : testLeak.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- o -

  • operator *() : SimilarityTransform.hh, vec.h, triang.h, transv.h, fmat.h, Polynom.hh
  • operator *=() : Vector2.hh
  • operator+() : vec.h, index.h, fmat.h, Polynom.hh, Operators.hh
  • operator+=() : Vector2.hh
  • operator-() : vec.h, index.h, fmat.h, Polynom.hh
  • operator-=() : Vector2.hh
  • operator/=() : Vector2.hh
  • operator<() : ExamplePolynomialSolve.cpp
  • operator<<() : MatchDataBase.hh, MatchDataBase.cpp, GenSynthMatches.hh, GenSynthMatches.cpp, TrackerBase.hh, TrackerBase.cpp, RigParameter.cpp, DCData.cpp, SimilarityTransform.hh, ProjectionParametersPerspective.hh, ProjectionParametersIO.hh, ProjectionParametersIO.cpp, ProjectionParametersBase.hh, Projection.hh, EpipolarLine.hh, EpipolarLine.cpp, CoordinateTransform3D.hh, Conic2D.hh, FilterMask.cpp, CornerDetectorGradient.hh, Vector4.hh, Vector2.hh, Vector.hh, vecadaptor.h, vec.h, triang.h, transv.h, region2d.h, region1d.h, fspvec.h, fmat.h, fcscmat.h, ROI.hh, ROI.cpp, MetaData.cpp, ImageBase.cpp, ImageAttributes.hh, ImageAttributes.cpp, ExifTag.hh, ExifTag.cpp, PoseParametrization.cpp, HomgPoint2D.hh, HomgPoint2D.cpp, BaseFactory.hh
  • operator==() : RMatrixBase.cpp
  • operator>>() : MatchDataBase.hh, MatchDataBase.cpp, DCData.cpp, SimilarityTransform.hh, Pose.hh, CoordinateTransform3D.hh, Vector4.hh, Vector2.hh, vecadaptor.h, vec.h, fspvec.h, fmat.h, Matrix3x3.hh, MetaData.cpp, ImageBase.cpp, PoseParametrization.cpp
  • or() : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- a -

  • abs() : tntmath.h, win32_f2c.h, f2c_gnu011.h
  • AddErr() : InvestigateEpipoleEstimation.cpp
  • AddGradientType() : FilterBase.hh, FilterBase.cpp
  • AddLowPassType() : FilterBase.hh, FilterBase.cpp
  • AdoptPMatrix() : biasconvert.cpp
  • and() : LGPL
  • AsciiToWx() : StringConv.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- b -

  • Basename() : FileHandling.cpp
  • BetaDistribution() : GSL.cpp
  • biasabort() : biasabort.cpp
  • biasexit() : biasexit.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- c -

  • calc_Regressionsebene() : ExampleRegressionPlane.cpp
  • castchar() : ExampleFMT2D.cpp
  • castfloat() : ExampleFMT2D.cpp
  • ChiSquareCulmProbFun() : GSL.cpp
  • Cholesky_upper_factorization() : cholesky.h
  • comp() : Median.cpp
  • CompIntersect() : EpipolarLine.hh, EpipolarLine.cpp
  • ComputeCutoutImage() : biasshowepiwx.cpp
  • ConsoleRedirectIO() : ConsoleRedirectIO.cpp
  • CoordinateSystem() : ThreeDOut.cpp
  • Copyright() : LGPL
  • create_JPEG_file() : CompressJpeg.cpp
  • CreateMatches() : InvestigateEpipoleEstimation.cpp
  • CreateMatches2() : InvestigateEpipoleEstimation.cpp
  • createst() : ColorHarris.cpp
  • createst2() : ColorHarris.cpp
  • CurrentDateTimeString() : FileHandling.cpp
  • cut() : ExampleFMT2D.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- d -

  • deflate_JPEG_file() : CompressJpeg.cpp
  • demo() : ExampleColorNCC.cpp
  • DetermineFiletype() : biassetuid.cpp, biasprojection.cpp, biasmerge.cpp, biasconvert.cpp
  • Directory() : FileHandling.cpp
  • DistanceFromRotation4Var() : PMatrixEstimation.cpp
  • distributed() : LGPL
  • dot_prod() : vec.h
  • Draw() : ExampleTrackerBase.cpp, ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp, ExampleCornerDetector.cpp
  • drawCubic() : ExampleBSplineCurve.cpp
  • drawQuadratic() : ExampleBSplineCurve.cpp
  • DumpTracks() : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- e -

  • Eigenproblem_quadratic_matrix() : Lapack.hh, Lapack.cpp
  • eigenproblem_special_quadratic_matrix_solve() : lapack.h
  • eigenvalue_solve() : lapack.h
  • Eigenvalue_solve() : Lapack.hh, Lapack.cpp
  • employer() : LGPL
  • empty_output_buffer() : CompressJpeg.cpp
  • Equal() : CompareFloatingPoint.hh
  • ErrorFunction() : RMatrix.cpp
  • errout() : ExamplePolynomialSolve.cpp
  • Extension() : FileHandling.cpp
  • ExtractNumberFromRight() : FileHandling.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- f -

  • F77_DGEEV() : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGELS() : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESV() : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGESVD() : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • F77_DGGGLM() : Lapack.cpp
  • F77_DSYEV() : Lapack.cpp, lapack.h, Lapack.cpp, lapack.h
  • FErrorFunction() : FMatrixEstimation.cpp
  • FilenameSequence() : FileHandling.cpp
  • FileReadable() : FileHandling.cpp
  • fill_input_buffer() : CompressJpeg.cpp
  • Fortran_Matrix_to_Matrix() : Lapack.hh, Lapack.cpp
  • Frob() : LGPL
  • functions() : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- g -

  • Gamma() : GSL.cpp
  • gcd() : getopt_long_W32.cpp
  • General_singular_value_decomposition() : Lapack.hh, Lapack.cpp
  • GenerateData() : ExampleRANSAC.cpp
  • GenerateNoisyMeasurements() : ExampleKalman.cpp
  • GenerateProjection() : ExampleProjectionMapping.cpp
  • Get_pStereoAPI() : OpenGLCanvasBase.cpp
  • GetBaseName() : pmatrix2projection.cpp
  • GetCamIDs() : VideoSource_DCAM.hh, VideoSource_DCAM.cpp, MDcam.cpp
  • getopt() : getopt_W32.cpp
  • getopt_internal() : getopt_long_W32.cpp
  • getopt_long() : getopt_W32.h, getopt_long_W32.cpp
  • GetSequenceAngle() : ExampleProjectionMapping.cpp
  • GetSystem() : ExampleLeastSquares.cpp
  • Greater() : CompareFloatingPoint.hh
  • GreaterEqual() : CompareFloatingPoint.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- h -

  • HaveImagesMatchingROI() : Operators.cpp
  • help() : biasshowsm.cpp
  • HErrorFunction() : HMatrixEstimation.cpp
  • hybrd1_() : Minpack.cpp
  • hybrd_() : Minpack.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- i -

  • init_destination() : CompressJpeg.cpp
  • init_source() : CompressJpeg.cpp
  • initDim1() : interpolate.cpp
  • initDim2() : interpolate.cpp
  • InsertZeroPoints() : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • INST() : CornerMatcher.cpp, Camera.cpp, RegionMatcher.cpp, CornerMatcher.cpp, StereoRedGreen.cpp, SphericalUndistortion.cpp, ColorMultiHistogram.cpp, ColorHistogram.cpp, Camera.cpp, Vector4.cpp, Vector3.cpp, Vector2.cpp, Vector.cpp, Tensor3D3x3x3.cpp, Tensor3D.cpp, Matrix4x4.cpp, Matrix3x4.cpp, Matrix3x3.cpp, Matrix2x2.cpp, Matrix.cpp
  • InvChiSquareCulmProbFun() : GSL.cpp
  • InvGamma() : GSL.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- p -

  • ParamInit() : ExampleCylinderMapping.cpp
  • permute_args() : getopt_long_W32.cpp
  • Powell() : Minpack.cpp
  • PowellExtended() : Minpack.cpp
  • Print() : ExampleSVD3x3.cpp, ExampleSVD.cpp
  • printFormatInfo_() : VideoSource_V4L.cpp
  • PrintInfoEXR() : ImageIO.cpp
  • PrintKeyCommands() : biasview.cpp
  • printPolynom() : ExamplePolynom.cpp
  • Process() : ExampleKalman.cpp
  • PtoPPP() : pmatrix2projection.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- q -

  • QR_factor() : qr.h
  • QR_solve() : qr.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- r -

  • R_solve() : qr.h
  • raw_dv_handler() : VideoSource_DV.cpp
  • readFile() : ExampleRANSACPlane.cpp
  • ReadPMatrix() : biasconvert.cpp
  • reason() : LGPL
  • receivethread() : CScommBase.cpp
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedColor() : Rescale.cpp
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey() : Rescale.cpp
  • rotateY() : CylinderMapping.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- s -

  • Scale() : biasview.cpp
  • seconds() : stopwatch.h
  • set_example_designmatrix() : ExampleRegressionPlane.cpp
  • SetRotation() : ExampleProjectionMapping.cpp
  • SetThreadName() : ThreadNaming.cpp
  • ShiftAndMark() : biasview.cpp
  • showhistogram() : biasview.cpp
  • sign() : tntmath.h
  • singular_value_decomposition_general_rectangular_matrix_solve() : lapack.h
  • skip_input_data() : CompressJpeg.cpp
  • software() : LGPL
  • solout() : ExamplePolynomialSolve.cpp
  • SplitName() : FileHandling.hh, FileHandling.cpp
  • step() : INSTALL
  • Suffix() : FileHandling.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- t -

  • term_destination() : CompressJpeg.cpp
  • term_source() : CompressJpeg.cpp
  • termhandler() : ExampleMDCamToShm.cpp
  • terms() : LGPL
  • TestNoWeightAx() : ExampleLeastSquares.cpp
  • TestNoWeightAxb() : ExampleLeastSquares.cpp
  • TestWeightAx() : ExampleLeastSquares.cpp
  • TestWeightAxb() : ExampleLeastSquares.cpp
  • toDeg() : CylinderMapping.cpp
  • ToLower_c() : FileHandling.cpp
  • toRad() : CylinderMapping.cpp
  • TORT() : LICENSE
  • ToUpper_c() : FileHandling.cpp
  • Track() : ExampleTracker2.cpp, ExampleTracker.cpp
  • transpose() : fmat.h, cmat.h
  • Transpose_view() : transv.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- u -

  • Unit_lower_triangular_solve() : trisolve.h
  • Unit_lower_triangular_view() : triang.h
  • Unit_upper_triangular_solve() : trisolve.h
  • Unit_upper_triangular_view() : triang.h
  • Upper_symmetric_eigenvalue_solve() : Lapack.hh, Lapack.cpp, lapack.h
  • Upper_triangular_solve() : trisolve.h
  • Upper_triangular_view() : triang.h
  • UpperCase() : FileHandling.cpp
  • usage() : Scan1394Bus.cpp, ExampleTriangleMesh.cpp, pmatrix2projection.cpp, biasview.cpp, biasshowsm.cpp, biasshowepi.cpp, biassetuid.cpp, biassetprojection.cpp, biasprojection.cpp, biasmerge.cpp, biasfilter.cpp, biasextract.cpp, biasconvert.cpp, ExampleSphereProjections.cpp, ExampleHarrisColor.cpp, ExampleImageMagickIO.cpp, ExampleImageAttributes.cpp, convertRAW.cpp
  • Usage() : ShowCamWx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- w -

  • work() : LGPL
  • WritePyImage() : ExamplePyramidImage.cpp
  • wxEntryInitGui() : GuiWX.cpp
  • wxEntryStart() : GuiWX.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • w
  • y

- y -

  • you() : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • e
  • f
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • x
  • z

- a -

  • address : win32_f2c.h, f2c_gnu011.h

- c -

  • C_f : win32_f2c.h, f2c_gnu011.h
  • C_fp : win32_f2c.h, f2c_gnu011.h
  • CameraParameterSet : VideoSource_DCAM.hh
  • cfch_ : fortran.h
  • cfd_ : fortran.h
  • cfda_ : fortran.h
  • cff_ : fortran.h
  • cffa_ : fortran.h
  • cfi_ : fortran.h
  • cfia_ : fortran.h
  • CI : Param.cpp, ParamGUI.cpp
  • CORNER_LIST : CornerDetectorSusan.hh

- d -

  • D_fp : win32_f2c.h, f2c_gnu011.h
  • doublereal : win32_f2c.h, f2c_gnu011.h

- e -

  • E_f : win32_f2c.h, f2c_gnu011.h
  • E_fp : win32_f2c.h, f2c_gnu011.h

- f -

  • fch_ : fortran.h
  • fd_ : fortran.h
  • fda_ : fortran.h
  • ff_ : fortran.h
  • ffa_ : fortran.h
  • fi_ : fortran.h
  • fia_ : fortran.h
  • FilterBorders : Label.hh
  • flag : win32_f2c.h, f2c_gnu011.h
  • Fortran_double : fortran.h
  • Fortran_float : fortran.h
  • Fortran_integer : fortran.h
  • ftnint : win32_f2c.h, f2c_gnu011.h
  • ftnlen : win32_f2c.h, f2c_gnu011.h

- h -

  • H_f : win32_f2c.h, f2c_gnu011.h
  • H_fp : win32_f2c.h, f2c_gnu011.h

- i -

  • I_fp : win32_f2c.h, f2c_gnu011.h
  • integer : win32_f2c.h, f2c_gnu011.h
  • integer1 : win32_f2c.h, f2c_gnu011.h
  • IplImage : WrapBias2Ipl.hh

- j -

  • J_fp : win32_f2c.h, f2c_gnu011.h

- k -

  • K_fp : win32_f2c.h, f2c_gnu011.h

- l -

  • L_fp : win32_f2c.h, f2c_gnu011.h
  • logical : win32_f2c.h, f2c_gnu011.h
  • logical1 : win32_f2c.h, f2c_gnu011.h
  • Long : win32_f2c.h
  • longint : win32_f2c.h

- m -

  • Multitype : win32_f2c.h, f2c_gnu011.h
  • my_error_ptr : CompressJpeg.cpp

- n -

  • Namelist : win32_f2c.h, f2c_gnu011.h

- p -

  • PointVector : Example7Point.cpp

- r -

  • R_fp : win32_f2c.h, f2c_gnu011.h
  • real : win32_f2c.h, f2c_gnu011.h
  • RGBAd : RGBA.hh
  • RGBAf : RGBA.hh
  • RGBAuc : RGBA.hh
  • RGBd : RGB.hh
  • RGBf : RGB.hh
  • RGBuc : RGB.hh

- s -

  • S_fp : win32_f2c.h, f2c_gnu011.h
  • shortint : win32_f2c.h, f2c_gnu011.h
  • shortlogical : win32_f2c.h, f2c_gnu011.h
  • Subscript : subscript.h

- t -

  • TagType : BaseFactory.hh
  • THREADNAME_INFO : ThreadNaming.cpp

- u -

  • U_fp : win32_f2c.h, f2c_gnu011.h
  • uinteger : f2c_gnu011.h

- v -

  • Vardesc : win32_f2c.h, f2c_gnu011.h

- x -

  • xmlAttr : XMLIO.hh
  • xmlAttrPtr : XMLIO.hh
  • xmlDoc : XMLIO.hh
  • xmlDocPtr : XMLIO.hh
  • xmlNode : XMLIO.hh
  • xmlNodePtr : XMLIO.hh

- z -

  • Z_f : win32_f2c.h, f2c_gnu011.h
  • Z_fp : win32_f2c.h, f2c_gnu011.h
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- a -

  • a : LGPL
  • above : LGPL
  • ABOVE : LGPL
  • accessors : LGPL
  • act : ExampleTracker2.cpp, ExampleTracker.cpp
  • addition : LGPL
  • algo : ParamGUISample3.cpp, ParamGUISample1.cpp
  • Also : LGPL
  • ambig : getopt_long_W32.cpp
  • and : LGPL
  • any : LGPL
  • apply : LGPL
  • at : SVD3x3.cpp
  • attribsRGBAD : OpenGLCanvasBase.hh
  • attribsRGBASD : OpenGLCanvasBase.hh
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- k -

  • K : InvestigateEpipoleEstimation.cpp
  • kernel : LGPL
  • Kiel : LICENSE
  • KIND : LGPL
  • Kinv : InvestigateEpipoleEstimation.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- l -

  • LEAST_SQUARES : UnVignette.hh
  • LIABILITY : LICENSE
  • libraries : LGPL
  • Library : LGPL
  • LIBRARY : LGPL
  • library : LGPL
  • License : LGPL
  • license : LGPL
  • listControlPoints : interpolate.cpp
  • listT : interpolate.cpp
  • listX : interpolate.cpp
  • listY : interpolate.cpp
  • logstr : ShowCamWx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- m -

  • m1 : ExamplePowell.cpp
  • m2 : ExamplePowell.cpp
  • match1 : InvestigateEpipoleEstimation.cpp
  • match2 : InvestigateEpipoleEstimation.cpp
  • Matrix : Vector.hh
  • max_num_points : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • maxarg1 : SVD3x3.cpp
  • maxarg2 : SVD3x3.cpp
  • maxBinaryG : CScommBase.cpp
  • maxerr : ExamplePolynomialSolve.cpp
  • maxGain : ColorHistogram.cpp
  • maxShutter : ColorHistogram.cpp
  • meas_noise : ExampleKalman.cpp
  • method : LGPL
  • minGain : ColorHistogram.cpp
  • minShutter : ColorHistogram.cpp
  • modify : LGPL
  • mp : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- n -

  • names : LGPL
  • noarg : getopt_long_W32.cpp
  • nonopt_end : getopt_long_W32.cpp
  • nonopt_start : getopt_long_W32.cpp
  • not : LGPL
  • NotDone : ExampleMDCamToShm.cpp
  • num : ExamplePowell.cpp
  • number : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- o -

  • obligations : LGPL
  • offer : LGPL
  • on : LGPL, DEPENDENCIES
  • one : LGPL
  • operates : LGPL
  • optarg : getopt_W32.cpp
  • opterr : getopt_W32.cpp
  • optind : getopt_W32.cpp
  • optopt : getopt_W32.cpp
  • optreset : getopt_W32.cpp
  • otimer : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- b -

  • bgain : showdcam.cpp
  • Boston : LGPL
  • bSaveImages_ : ShowCamWx.cpp
  • bShowStereo_ : ShowCamWx.cpp
  • bt : SVD3x3.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- c -

  • CamWin : showv4lcam.cpp
  • case : LGPL
  • cd : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdfreq : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdnum : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdt : ExampleTracker2.cpp, ExampleTracker.cpp
  • cdtimer : ExampleTracker2.cpp, ExampleTracker.cpp
  • center : InvestigateEpipoleEstimation.cpp
  • CHARGE : LGPL
  • circumstance : LGPL
  • claims : LGPL
  • code : LGPL
  • Common : DEPENDENCIES
  • conditions : LGPL
  • CONTRACT : LICENSE
  • contrast : LGPL
  • Coon : LGPL
  • copies : LGPL
  • copy : LGPL
  • copying : LGPL
  • countries : LGPL
  • cov : ExampleTracker3.cpp
  • cp : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • ct : SVD3x3.cpp
  • CUTOUT_SIZE : biasshowepiwx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- d -

  • DAMAGES : LGPL
  • DATA : LICENSE
  • debug : ExamplePolynomialSolve.cpp
  • DEFECTIVE : LGPL
  • delay_ : ShowCamWx.cpp
  • distribute : LGPL
  • distributor : LGPL
  • document : LGPL
  • done : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • draw_tracks : ExampleTracker2.cpp, ExampleTracker.cpp
  • dSaveCounter_ : ShowCamWx.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- e -

  • estimated_epipole : InvestigateEpipoleEstimation.cpp
  • estimated_epipole2 : InvestigateEpipoleEstimation.cpp
  • example : LGPL
  • exception : LGPL
  • executable : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- f -

  • fee : LGPL
  • FFT2D< float, float > : FFT2D.cpp
  • FFT2D< unsigned char, float > : FFT2D.cpp
  • FFT2D_Tiles< float, float > : FFT2D_Tiles.cpp
  • FFT2D_Tiles< unsigned char, float > : FFT2D_Tiles.cpp
  • FILTER_INSTANTIATION_CLASS< float, float > : GradientSimple.cpp, Filterinst.hh
  • FILTER_INSTANTIATION_CLASS< unsigned char, float > : GradientSimple.cpp, Filterinst.hh
  • FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char > : Rescale.cpp, Filterinst.hh
  • Finally : LGPL
  • first : Random.cpp
  • Foundation : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- g -

  • g_pStereoAPI : OpenGLCanvasBase.cpp
  • gain : showdcam.cpp
  • GENERAL : LGPL
  • GLOBALbestErrorSoFar : RMatrix.cpp
  • GLOBALbestQuaternionSoFar : RMatrix.cpp
  • globalEpipole2 : PMatrixEstimation.cpp
  • globalM2 : PMatrixEstimation.cpp
  • gx : ExampleTracker2.cpp, ExampleTracker.cpp
  • gy : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- h -

  • HALF_CUTOUT_SIZE : biasshowepiwx.cpp
  • HOLDER : LGPL
  • However : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- i -

  • If : LGPL
  • illoptchar : getopt_long_W32.cpp
  • illoptstring : getopt_long_W32.cpp
  • Image : ImageBase.hh
  • image_buffer : CompressJpeg.cpp
  • image_channels : CompressJpeg.cpp
  • image_height : CompressJpeg.cpp
  • image_width : CompressJpeg.cpp
  • ImageConvert : ImageBase.hh
  • img : ExampleBSplineCurve.cpp
  • imgCounter : ExampleBSplineCurve.cpp
  • imgNo : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • IMPLIED : LGPL
  • Inc : LGPL
  • INCLUDING : LGPL
  • interfaces : LGPL
  • interpolator : interpolate.cpp
  • invoked : LGPL
  • isolation : LGPL
  • it : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- p -

  • p : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • para : ExampleCylinderMapping.cpp
  • Para : FMatrixEstimation.cpp
  • ParaH : HMatrixEstimation.cpp
  • param : pmatrix2projection.cpp
  • ParamCallbackInterface : ParamTypes.hh
  • parameters : LGPL
  • ParamGUI : ParamGUI.hh
  • ParentExtender : PMDImageIO.hh
  • pCurrentObject : FMatrixEstimation.cpp
  • pCurrentObjectH : HMatrixEstimation.cpp
  • permitted : LGPL
  • pGLOBALvecR : RMatrix.cpp
  • pim : ExampleTracker2.cpp, ExampleTracker.cpp
  • Place : LGPL
  • place : LGPL, getopt_long_W32.cpp
  • PowellCoeff : PolynomialSolve.cpp
  • PowellCoeffNum : PolynomialSolve.cpp
  • process_noise : ExampleKalman.cpp
  • PROFITS : LICENSE
  • programs : LGPL
  • public : LGPL
  • pyind : ExampleTracker2.cpp, ExampleTracker.cpp
  • pytimer : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- q -

  • qual : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • QUICKINSTALL : INSTALL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- r -

  • R : InvestigateEpipoleEstimation.cpp
  • r : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • rather : LGPL
  • recargchar : getopt_long_W32.cpp
  • recargstring : getopt_long_W32.cpp
  • recipients : LGPL
  • res : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • residui : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • results : ExampleTracker3.cpp, ExampleTracker2.cpp, ExampleTracker.cpp
  • rgain : showdcam.cpp
  • rights : LGPL
  • rowtime : IntegralHistogram.cpp
  • runs : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- s -

  • sample : LGPL
  • save : ExampleVideoSource_Shm.cpp, ExampleVideoSource_Net.cpp
  • savecounter : showdcam.cpp
  • SCALE : biasshowepiwx.cpp
  • Section : LGPL
  • SERVICING : LGPL
  • sigma : ExampleLeastSquares.cpp
  • so : LGPL
  • software : LGPL
  • SPECIAL : LGPL
  • SPLINE_WITH_LUT : UnVignette.hh
  • st_type : ExampleTracker3.cpp, ExampleHarrisColor.cpp
  • sublicense : LGPL
  • Suite : LGPL
  • system : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- t -

  • T : ExampleUnscentedTransform.cpp
  • table : LGPL
  • tag_table : ImageAttributes.cpp
  • terms : LGPL
  • that : LGPL
  • themselves : LGPL
  • Therefore : LGPL
  • these : LGPL
  • they : LGPL
  • things : LGPL
  • Thus : LGPL
  • tiffFieldInfo : PMDImageIO.hh
  • tmp_cov : ExampleTracker3.cpp
  • tnum : ExampleTracker2.cpp, ExampleTracker.cpp
  • TO : LGPL
  • too : LGPL
  • totalitersum : Tracker.cpp
  • tr : ExampleTracker2.cpp, ExampleTracker.cpp
  • Tracker_GlobalImageCounter : Tracker.cpp
  • true_epipole : InvestigateEpipoleEstimation.cpp
  • ttimer : ExampleTracker2.cpp, ExampleTracker.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- u -

  • unrestricted : LGPL
  • use : LGPL, LICENSE
  • USE : LICENSE
  • usertime : IntegralHistogram.cpp
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- v -

  • value : ExampleBSplineCurve.cpp
  • Vector2 : Vector.hh
  • Vector3 : Vector.hh
  • Vector4 : Vector.hh
  • version : LGPL
  • Version : LGPL
  • videosourcefromchannel : VideoSource_DV.hh, VideoSource_DV.cpp
  • void : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- w -

  • warranty : LGPL
  • WARRANTY : LGPL
  • whole : LGPL
  • with : LGPL
  • work : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • y

- y -

  • years : LGPL
  • you : LGPL
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/glstuff.h Source File

Gui

glstuff.h

Go to the documentation of this file.
00001 #ifndef _glstuff_h_
00002 #define _glstuff_h_
00003
00004 /**
00005 wrapper that asserts compilations with OpenGL AND glew.
00006 - Please note that the app. ha sto call glewinit like this:
00007 \verbatim
00008   if (!(GLEW_VERSION_1_1)) {
00009     // init and try again:
00010     GLenum result = glewInit();
00011     if (result != GLEW_OK){
00012       BIASERR("glewInit failed.");
00013     };
00014   }
00015 \endverbatim
00016 \attention DEPECATED2006/Mar/10 Replaced by biasgl.h - Jan Woetzel
00017
00018 author: Jan Woetzel
00019 */
00020
00021 #include <bias_config.h>
00022
00023 #ifndef BIAS_HAVE_OPENGL
00024 #  error Please recompile BIAS with USE_OPENGL to use OpenGL.
00025 #endif // BIAS_HAVE_OPENGL
00026
00027 #ifndef BIAS_HAVE_GLEW
00028 #  error Please recompile BIAS with USE_GLEW to use GL extension handler GLEW.
00029 #endif // BIAS_HAVE_GLEW
00030
00031 // new file:
00032 #include <Gui/biasgl.h>
00033
00034
00035 #endif // _glstuff_h_
00036 // DO NOT ADD CODE AFTER THIS LINE
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGauss.cpp Source File

Filter

GradientGauss.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GradientGauss.hh"
00027 #include "Convolution.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 //////////////////////////////////////////////////////////////////////////
00033 //                 implementation
00034 //////////////////////////////////////////////////////////////////////////
00035
00036 template <class StorageType, class OutputStorageType>
00037 GradientGauss<StorageType, OutputStorageType>::
00038 GradientGauss()
00039 {
00040   _LastSigma=-DBL_MAX;
00041   _GradGaussSigma=new double;
00042   *_GradGaussSigma=1.0;
00043   _GradGaussRatio=new double;
00044   *_GradGaussRatio=0.01;
00045 }
00046
00047 template <class InputStorageType, class OutputStorageType>
00048 GradientGauss<InputStorageType, OutputStorageType>::
00049 GradientGauss(Param & para, const std::string& postfix)
00050   : FilterNTo2N<InputStorageType, OutputStorageType>(para, "-GradientGauss"+postfix)
00051 {
00052   _LastSigma=-DBL_MAX;
00053   int grp=para.GetFreeGroupID();
00054   _AddParam(para, grp, "-GradientGauss"+postfix);
00055   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Gauss");
00056 }
00057
00058 template <class InputStorageType, class OutputStorageType>
00059 GradientGauss<InputStorageType, OutputStorageType>::
00060 GradientGauss(Param & para, const int grp, const std::string& postfix)
00061   : FilterNTo2N<InputStorageType, OutputStorageType>(para, grp, "-GradientGauss"+postfix)
00062 {
00063   _LastSigma=-DBL_MAX;
00064   _AddParam(para, grp, "-GradientGauss"+postfix);
00065 }
00066
00067 template <class InputStorageType, class OutputStorageType>
00068 GradientGauss<InputStorageType, OutputStorageType>::~GradientGauss() {
00069   if (this->_ParamsAllocated){
00070     delete _GradGaussSigma; _GradGaussSigma = NULL;
00071     delete _GradGaussRatio; _GradGaussRatio = NULL;
00072   }
00073 }
00074
00075 template <class InputStorageType, class OutputStorageType>
00076 int GradientGauss<InputStorageType,OutputStorageType>::
00077 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& grad)
00078 {
00079   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientGauss::Filter(src, dst)\n");
00080
00081   Image<OutputStorageType> gy;
00082   int res = Filter(src, grad, gy);
00083   grad.AppendChannel(gy);
00084   return res;
00085 }
00086
00087 template <class InputStorageType, class OutputStorageType>
00088 int GradientGauss<InputStorageType,OutputStorageType>::
00089 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00090        Image<OutputStorageType>& gy)
00091 {
00092   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientGauss::Filter(src, gx, gy)\n");
00093   //  SetDebugLevel(D_GRADGAUSS_KERNEL);
00094   //cout <<"GradientGauss values are "<< *_GradGaussSigma<< " "<<
00095   //  *_GradGaussRatio<<endl;
00096   if ((fabs(*_GradGaussSigma-_LastSigma)>=DBL_EPSILON) ||
00097       (fabs(*_GradGaussRatio-_LastRatio)>=DBL_EPSILON)){
00098     _CalculateKernels(*_GradGaussSigma, *_GradGaussRatio);
00099   }
00100   if (!gx.SamePixelAndChannelCount(src)){
00101     gx.Release();
00102     gx.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00103   }
00104   if (!gy.SamePixelAndChannelCount(src)){
00105     gy.Release();
00106     gy.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00107   }
00108
00109   if (_Conv.Filter(src, gx)!=0) {
00110     BIASERR("Error in gradient x computation...");
00111     return -1;
00112   }
00113   FilterMask f;
00114   _Conv.GetKernel(f);
00115   f.Transpose();
00116   _Conv.SetKernel(f);
00117   int res = _Conv.Filter(src, gy);
00118   f.Transpose();
00119   _Conv.SetKernel(f);
00120   return res;
00121 }
00122
00123 template <class InputStorageType, class OutputStorageType>
00124 int GradientGauss<InputStorageType,OutputStorageType>::
00125 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00126        Image<OutputStorageType>& gy, Image<OutputStorageType>& absg)
00127 {
00128   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientGauss::Filter(src, gx, gy, absg)\n");
00129
00130   if ((fabs(*_GradGaussSigma-_LastSigma)>=DBL_EPSILON) ||
00131       (fabs(*_GradGaussRatio-_LastRatio)>=DBL_EPSILON)){
00132     _CalculateKernels(*_GradGaussSigma, *_GradGaussRatio);
00133   }
00134   if (!src.SamePixelAndChannelCount(absg)){
00135     if (!absg.IsEmpty()) absg.Release();
00136     absg.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00137   }
00138
00139   int res, absres=0;
00140   res = FilterFloat(src, gx, gy);
00141
00142   unsigned htlx, htly, hbrx, hbry, vtlx, vtly, vbrx, vbry;
00143   gx.GetROI()->GetCorners(htlx, htly, hbrx, hbry);
00144   gy.GetROI()->GetCorners(vtlx, vtly, vbrx, vbry);
00145   const int minx=(htlx<vtlx)?vtlx:htlx;
00146   const int miny=(htly<vtly)?vtly:htly;
00147   const int maxx=(hbrx>vbrx)?vbrx:hbrx;
00148   const int maxy=(hbry>vbry)?vbry:hbry;
00149
00150   register int x, y;
00151   register OutputStorageType **gxi=gx.GetImageDataArray();
00152   register OutputStorageType **gyi=gy.GetImageDataArray();
00153   register OutputStorageType **absi=absg.GetImageDataArray();
00154
00155   int mgx, mgy;
00156   for (y=miny; y<maxy; y++){
00157     for (x=minx; x<maxx; x++){
00158       mgx=(int)gxi[y][x];
00159       mgy=(int)gyi[y][x];
00160       absi[y][x]=(OutputStorageType) sqrt((double)(mgx)*(double)(mgx)+
00161                                           (double)(mgy)*(double)(mgy));
00162     }
00163   }
00164
00165   absg.GetROI()->SetCorners(minx, miny, maxx, maxy);
00166
00167   return (res==0 && absres==0)?0:-1;
00168 }
00169
00170 template <class InputStorageType, class OutputStorageType>
00171 void GradientGauss<InputStorageType, OutputStorageType>::
00172 _CalculateKernels(double Sigma, double Ratio)
00173 {
00174   const int hws=(int)(floor(sqrt(-2.0*Sigma*Sigma*log(Ratio))));
00175   const int size=(hws<<1)+1;
00176   Vector<FM_FLOAT> H(size), V(size);
00177
00178   BIASCDOUT(D_GRADGAUSS_KERNEL, "Sigma = "<<Sigma<<"\tRatio = "<<Ratio<<endl);
00179   BIASCDOUT(D_GRADGAUSS_KERNEL, "size = "<<size<<"\thws = "<<hws<<endl);
00180
00181   int i, ip, im;
00182   double fac=1.0/(2.0*Sigma*Sigma);
00183   register double g;
00184   double sum=0.0, dsum=0.0;
00185   // calculate the filter coefficients as gauss function
00186   // this is a filtermask in the sense of convolution
00187   // it is reflected at its symmetry center before being "dropped"
00188   // onto the image !
00189   for (i=0; i<=hws; i++){
00190     ip=hws+i;
00191     im=hws-i;
00192     g=expf((float)(-(double)(i*i)*fac));
00193     V[ip] = V[im] = (FM_FLOAT) g;
00194     //BIASCDOUT(D_GRADGAUSS_KERNEL, i<<"v:"<<_VVec[im]<<"  "<<endl);
00195     sum += g*2.0;
00196     g = double(i)*g;
00197     H[im] = (FM_FLOAT)  g;
00198     H[ip] = (FM_FLOAT) -g;
00199     dsum+=fabs(2.0*double(i)*g);
00200     BIASCDOUT(D_GRADGAUSS_KERNEL, i<<"h:"<< H[im]<<"  "<<endl);
00201   }
00202   sum -= H[hws];
00203   BIASCDOUT(D_GRADGAUSS_KERNEL, "sum = "<<sum<<"\tdsum = "<<dsum<<endl);
00204
00205   // normalize filter, so that the sum is 1.0
00206   sum  = 1.0 / sum;
00207   dsum = 1.0 / dsum;
00208   BIASCDOUT(D_GRADGAUSS_KERNEL, "sum = "<<sum<<"\tdsum = "<<dsum<<endl);
00209   for (i=0; i<=hws; i++){
00210     ip = hws+i;
00211     im = hws-i;
00212     H[ip] *= (FM_FLOAT)dsum;
00213     H[im] *= (FM_FLOAT)dsum;
00214     V[ip] = V[im] = V[im]*(FM_FLOAT)sum;
00215     BIASCDOUT(D_GRADGAUSS_KERNEL, "h:"<< H[im]<<"  "<<endl);
00216     //BIASCDOUT(D_GRADGAUSS_KERNEL, "v:"<<_VVec[im]<<"  "<<endl);
00217   }
00218   FilterMask F(H,V);
00219   int thebits = F.ComputeIntPrecisionBits(sizeof(InputStorageType)*8,
00220                                           sizeof(CONV_INT)*8-1);
00221   F.CreateIntFilter(thebits,thebits,thebits);
00222
00223   _Conv.SetKernel(F);
00224   _LastSigma = Sigma;
00225   _LastRatio = Ratio;
00226
00227
00228 #ifdef BIAS_DEBUG
00229   sum=dsum=0.0;
00230   for (i=-hws; i<=hws; i++){
00231     sum += H[i+hws];
00232     BIASCDOUT(D_GRADGAUSS_KERNEL, H[i+hws]<<"  ");
00233   }
00234   BIASCDOUT(D_GRADGAUSS_KERNEL, "  sum = "<<sum<<endl);
00235   for (i=-hws; i<=hws; i++){
00236     dsum += V[i+hws];
00237     BIASCDOUT(D_GRADGAUSS_KERNEL, V[i+hws]<<"  ");
00238   }
00239   BIASCDOUT(D_GRADGAUSS_KERNEL, "  sum = "<<dsum<<endl);
00240 #endif
00241
00242
00243 }
00244
00245
00246 template <class InputStorageType, class OutputStorageType>
00247 void GradientGauss<InputStorageType, OutputStorageType>::
00248 _AddParam(Param& para, const int grp, const std::string& postfix)
00249 {
00250   if (para.CheckParam("Sigma"+postfix)){
00251     _GradGaussSigma=para.GetParamDouble("Sigma"+postfix);
00252   } else {
00253     _GradGaussSigma=para.AddParamDouble("Sigma"+postfix,
00254                                         "standard deviation of gauss curve",
00255                                         1.0, 0.0, 10.0, 0, grp);
00256   }
00257
00258   if (para.CheckParam("Ratio"+postfix)){
00259     _GradGaussRatio=para.GetParamDouble("Ratio"+postfix);
00260   } else {
00261     _GradGaussRatio=para.AddParamDouble("Ratio"+postfix,
00262                                         "gauss is truncated, when factor "
00263                                         "between biggest and smalles entry"
00264                                         " falls below Ratio",
00265                                         0.01, 0.0, 1.0, 0, grp);
00266   }
00267   para.SetEnhancedFlag("Ratio"+postfix, true);
00268 }
00269
00270 template <class InputStorageType, class OutputStorageType>
00271 void GradientGauss<InputStorageType, OutputStorageType>::
00272 GetBordersValid_(int &border_x, int &border_y) const
00273 {
00274   _Conv.GetBorders(border_x, border_y);
00275 }
00276
00277 //////////////////////////////////////////////////////////////////////////
00278 //                 instantiation
00279 //////////////////////////////////////////////////////////////////////////
00280 #define FILTER_INSTANTIATION_CLASS GradientGauss
00281 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00282 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGauss.hh Source File

Filter

GradientGauss.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GradientGauss_hh__
00027 #define __GradientGauss_hh__
00028
00029 #include "FilterNTo2N.hh"
00030 #include "Convolution.hh"
00031
00032 #include <Base/Math/Vector3.hh>
00033
00034   // the debugfasgs are defined in Convolution.hh
00035   // #define D_GRADGAUSS_KERNEL 0x00000001
00036
00037 namespace BIAS {
00038
00039   /** @class GradientGauss
00040       @ingroup g_filter
00041       @brief gradient calculation with separated gauss masks
00042
00043
00044
00045       @author woelk 09/2004 */
00046   template <class InputStorageType, class OutputStorageType>
00047   class BIASFilter_EXPORT GradientGauss : public FilterNTo2N<InputStorageType, OutputStorageType>
00048   {
00049   public:
00050     GradientGauss();
00051
00052     GradientGauss(Param & para, const std::string& postfix="");
00053
00054     GradientGauss(Param & para, const int grp, const std::string& postfix);
00055
00056     virtual ~GradientGauss();
00057
00058     /** returns a 2 channel image containig gx and gy
00059         @author woelk 12/2004, untested */
00060     virtual int Filter(const Image<InputStorageType>& src,
00061                        Image<OutputStorageType>& grad);
00062
00063     virtual int Filter(const Image<InputStorageType>& src,
00064                        Image<OutputStorageType>& gx,
00065                        Image<OutputStorageType>& gy);
00066
00067     virtual int Filter(const Image<InputStorageType>& src,
00068                        Image<OutputStorageType>& gx,
00069                        Image<OutputStorageType>& gy,
00070                        Image<OutputStorageType>& absg);
00071
00072     ////////////////////////////////////////////////////////////////////////
00073
00074     inline void SetGradGaussSigma(const double sigma)
00075     { *_GradGaussSigma=sigma; }
00076
00077     inline double GetGradGaussSigma() const { return *_GradGaussSigma; }
00078
00079     inline void SetGradGaussRatio(const double ratio)
00080     { *_GradGaussRatio=ratio; }
00081
00082     inline double GetGradGaussRatio() const { return *_GradGaussRatio; }
00083
00084     inline void PrintKernel() const
00085     { _Conv.PrintKernel(); }
00086
00087   protected:
00088     /// the parameters
00089     double *_GradGaussSigma, *_GradGaussRatio;
00090     /// the parameters at the time of the last call
00091     double _LastSigma, _LastRatio;
00092     /// computation object to execute the convolution
00093     Convolution<InputStorageType, OutputStorageType> _Conv;
00094
00095     /** Fills _HVec with gaussian function and _VVec with derivative of
00096         gaussian function with standard deviation Sigma. The size of _HVec
00097         and _VVec is calculated by using Ration. The Gaussian function is
00098         truncated, when the ration between biggest and smalles entry falls
00099         below Ratio.
00100         @author woelk 09/2004 */
00101     void _CalculateKernels(double Sigma, double Ratio);
00102
00103     void _AddParam(Param& para, const int grp, const std::string& postfix);
00104
00105     virtual void GetBordersValid_(int& border_x, int &border_y) const;
00106
00107   }; // class
00108
00109
00110 } // namsepace
00111
00112 #endif // __GradientGauss_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGaussAsymmetric.cpp Source File

Filter

GradientGaussAsymmetric.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GradientGaussAsymmetric.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 //////////////////////////////////////////////////////////////////////////
00032 //                 implementation
00033 //////////////////////////////////////////////////////////////////////////
00034
00035 template <class InputStorageType, class OutputStorageType>
00036 GradientGaussAsymmetric<InputStorageType, OutputStorageType>::
00037 GradientGaussAsymmetric()
00038   : GradientGauss<InputStorageType, OutputStorageType>()
00039 {}
00040
00041 template <class InputStorageType, class OutputStorageType>
00042 GradientGaussAsymmetric<InputStorageType, OutputStorageType>::
00043 GradientGaussAsymmetric(Param & para,const std::string& postfix)
00044   : GradientGauss<InputStorageType, OutputStorageType>(para, "-GradientGaussAsymmetric"+postfix)
00045 {}
00046
00047 template <class InputStorageType, class OutputStorageType>
00048 GradientGaussAsymmetric<InputStorageType, OutputStorageType>::
00049 GradientGaussAsymmetric(Param & para, const int grp,const std::string& postfix)
00050   : GradientGauss<InputStorageType, OutputStorageType>(para, grp, "-GradientGaussAsymmetric"+postfix)
00051 {}
00052
00053 template <class InputStorageType, class OutputStorageType>
00054 GradientGaussAsymmetric<InputStorageType, OutputStorageType>::
00055 ~GradientGaussAsymmetric()
00056 {}
00057
00058
00059
00060 template <class InputStorageType, class OutputStorageType>
00061 int GradientGaussAsymmetric<InputStorageType,OutputStorageType>::
00062 Filter(const Image<InputStorageType>& src,
00063        Image<OutputStorageType>& gx, Image<OutputStorageType>& gy)
00064 {
00065   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientGauss::Filter(src, gx, gy)\n");
00066
00067   if ((fabs(*this->_GradGaussSigma-this->_LastSigma)>=DBL_EPSILON) ||
00068       (fabs(*this->_GradGaussRatio-this->_LastRatio)>=DBL_EPSILON)){
00069     _CalculateKernels(*this->_GradGaussSigma, *this->_GradGaussRatio);
00070   }
00071   if (!src.SamePixelAndChannelCount(gx)){
00072     if (!gx.IsEmpty()) gx.Release();
00073     gx.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00074   }
00075   if (!src.SamePixelAndChannelCount(gy)){
00076     if (!gy.IsEmpty()) gy.Release();
00077     gy.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00078   }
00079
00080  if (this->_Conv.Filter(src, gx)!=0) {
00081     BIASERR("Error in gradient x computation...");
00082     return -1;
00083   }
00084   FilterMask f;
00085   this->_Conv.GetKernel(f);
00086   f.Transpose();
00087   this->_Conv.SetKernel(f);
00088   int res = this->_Conv.Filter(src, gy);
00089   f.Transpose();
00090   this->_Conv.SetKernel(f);
00091   return res;
00092 }
00093
00094 template <class InputStorageType, class OutputStorageType>
00095 int GradientGaussAsymmetric<InputStorageType,OutputStorageType>::
00096 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& grad)
00097 {
00098   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientGauss::Filter(src, dst)\n");
00099
00100   Image<OutputStorageType> gy;
00101   int res =  Filter(src, grad, gy);
00102   grad.AppendChannel(gy);
00103   return res;
00104 }
00105
00106
00107 template <class InputStorageType, class OutputStorageType>
00108 int GradientGaussAsymmetric<InputStorageType,OutputStorageType>::
00109 Filter(const Image<InputStorageType>& src,
00110        Image<OutputStorageType>& gx,
00111        Image<OutputStorageType>& gy,
00112        Image<OutputStorageType>& absg)
00113 {
00114   BIASCDOUT(D_FILTERBASE_CALLSTACK,"GradientGauss::Filter(src, gx, gy, abs)\n");
00115   if ((fabs(*this->_GradGaussSigma-this->_LastSigma)>=DBL_EPSILON) ||
00116       (fabs(*this->_GradGaussRatio-this->_LastRatio)>=DBL_EPSILON)){
00117     _CalculateKernels(*this->_GradGaussSigma, *this->_GradGaussRatio);
00118   }
00119   if (!src.SamePixelAndChannelCount(absg)){
00120     if (!absg.IsEmpty()) absg.Release();
00121     absg.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00122   }
00123
00124   int res, absres=0;
00125   res = Filter(src, gx, gy);
00126   unsigned htlx, htly, hbrx, hbry, vtlx, vtly, vbrx, vbry;
00127   gx.GetROI()->GetCorners(htlx, htly, hbrx, hbry);
00128   gy.GetROI()->GetCorners(vtlx, vtly, vbrx, vbry);
00129   const int minx=(htlx<vtlx)?vtlx:htlx;
00130   const int miny=(htly<vtly)?vtly:htly;
00131   const int maxx=(hbrx>vbrx)?vbrx:hbrx;
00132   const int maxy=(hbry>vbry)?vbry:hbry;
00133
00134   register int x, y;
00135   register OutputStorageType **gxi=gx.GetImageDataArray();
00136   register OutputStorageType **gyi=gy.GetImageDataArray();
00137   register OutputStorageType **absi=absg.GetImageDataArray();
00138
00139   int mgx, mgy;
00140   for (y=miny; y<maxy; y++){
00141     for (x=minx; x<maxx; x++){
00142       mgx=(int)gxi[y][x];
00143       mgy=(int)gyi[y][x];
00144       absi[y][x]=(OutputStorageType) sqrt((double)(mgx)*(double)(mgx)+
00145                                           (double)(mgy)*(double)(mgy));
00146     }
00147   }
00148
00149   absg.GetROI()->SetCorners(minx, miny, maxx, maxy);
00150
00151   return (res==0 && absres==0)?0:-1;
00152
00153 }
00154
00155
00156 template <class InputStorageType, class OutputStorageType>
00157 void GradientGaussAsymmetric<InputStorageType, OutputStorageType>::
00158 _CalculateKernels(double Sigma, double Ratio)
00159 {
00160   /// \todo check if this is a proper filter mask in the
00161   /// sense of convolution -> reflection at center. We
00162   /// might have introduced an inconsistency here when switching
00163   /// to generic convolution.
00164   const double inv_max_gauss_deriv=1.0/(Sigma*expf(-0.5f));
00165   BIASCDOUT(D_GRADGAUSS_KERNEL, "max_gauss_deriv = "
00166             <<1.0/inv_max_gauss_deriv<<endl);
00167   const double fac=1.0/(2.0*Sigma*Sigma);
00168   const int vhws=(int)(floor(sqrt(-2.0*Sigma*Sigma*log(Ratio))));
00169   int k;
00170   for (k=vhws; k*expf((float)(-k*k*fac))*(float)inv_max_gauss_deriv>=Ratio; k++);
00171   const int hhws=k-1;
00172   const int vsize=(vhws<<1)+1;
00173   const int hsize=(hhws<<1)+1;
00174
00175   Vector<FM_FLOAT> H(hsize), V(vsize);
00176
00177   BIASCDOUT(D_GRADGAUSS_KERNEL, "Sigma = "<<Sigma<<"\tRatio = "<<Ratio<<endl);
00178   BIASCDOUT(D_GRADGAUSS_KERNEL, "vsize = "<<vsize<<"\tvhws = "<<vhws<<endl);
00179   BIASCDOUT(D_GRADGAUSS_KERNEL, "hsize = "<<hsize<<"\thhws = "<<hhws<<endl);
00180
00181   int i, ip, im;
00182   register double g;
00183   double sum=0.0, dsum=0.0;
00184   // calculate the filter coefficients as gauss function
00185   for (i=0; i<=vhws; i++){
00186     ip=vhws+i;
00187     im=vhws-i;
00188     g=expf((float)(-(double)(i*i)*fac));
00189     V[ip] = V[im] = (FM_FLOAT)g;
00190     //BIASCDOUT(D_GRADGAUSS_KERNEL, i<<"v:"<<_VVec[im]<<"  "<<endl);
00191     sum+=g*2.0;
00192     g=double(i)*g;
00193     H[im] = (FM_FLOAT)g;
00194     H[ip] = (FM_FLOAT)-g;
00195     dsum += fabs(2.0*double(i)*g);
00196     //BIASCDOUT(D_GRADGAUSS_KERNEL, i<<"h:"<<_HVec[im]<<"  "<<endl);
00197   }
00198   for (i=vhws+1; i<=hhws; i++){
00199     ip=hhws+i;
00200     im=hhws-i;
00201     g=double(i)*expf((float)(-(double)(i*i)*fac));
00202     H[im]=(FM_FLOAT)g;
00203     H[ip]=(FM_FLOAT)-g;
00204     dsum+=fabs(2.0*double(i)*g);
00205     //BIASCDOUT(D_GRADGAUSS_KERNEL, i<<"h:"<<_HVec[im]<<"  "<<endl);
00206   }
00207
00208   sum-=1.0;
00209   //BIASCDOUT(D_GRADGAUSS_KERNEL, "sum = "<<sum<<"\tdsum = "<<dsum<<endl);
00210
00211   // normalize filter, so that the sum is 1.0
00212   sum  = 1.0/sum;
00213   dsum = 1.0/dsum;
00214   //BIASCDOUT(D_GRADGAUSS_KERNEL, "sum = "<<sum<<"\tdsum = "<<dsum<<endl);
00215   for (i=0; i<=vhws; i++){
00216     ip=vhws+i;
00217     im=vhws-i;
00218     H[ip]*=(float)dsum;
00219     H[im]*=(float)dsum;
00220     V[ip] = V[im] = V[im]*(float)sum;
00221   }
00222   for (i=vhws+1; i<=hhws; i++){
00223     ip=hhws+i;
00224     im=hhws-i;
00225     H[ip] *= (float)dsum;
00226     H[im] *= (float)dsum;
00227   }
00228   this->_LastSigma=Sigma;
00229   this->_LastRatio=Ratio;
00230   FilterMask F(H,V);
00231   // compute the int approximation
00232   int thebits = F.ComputeIntPrecisionBits(sizeof(InputStorageType)*8,
00233                                             sizeof(CONV_INT)*8-1);
00234   F.CreateIntFilter(thebits,thebits,thebits);
00235   this->_Conv.SetKernel(F);
00236
00237 #ifdef BIAS_DEBUG
00238   sum=dsum=0.0;
00239   for (i=-hhws; i<=hhws; i++){
00240     sum += H[i+hhws];
00241     BIASCDOUT(D_GRADGAUSS_KERNEL,H[i+hhws]<<"  ");
00242   }
00243   BIASCDOUT(D_GRADGAUSS_KERNEL, "  sum = "<<sum<<endl);
00244   for (i=-vhws; i<=vhws; i++){
00245     dsum += V[i+vhws];
00246     BIASCDOUT(D_GRADGAUSS_KERNEL, V[i+vhws]<<"  ");
00247   }
00248   BIASCDOUT(D_GRADGAUSS_KERNEL, "  sum = "<<dsum<<endl);
00249 #endif
00250
00251   //#define COMPARE
00252 #ifdef COMPARE
00253   fprintf(stdout, "gauss: \n");
00254   for (i=-hhws; i<=hhws; i++){
00255     fprintf(stdout, "%f ",H[i+hhws]);
00256   }
00257   fprintf(stdout, "\n");
00258   fprintf(stdout, "gaussderiv: \n");
00259   for (i=-vhws; i<=vhws; i++){
00260     fprintf(stdout, "%f ",V[i+vhws]);
00261   }
00262   fprintf(stdout, "\n");
00263 #endif
00264
00265 }
00266
00267 //////////////////////////////////////////////////////////////////////////
00268 //                 instantiation
00269 //////////////////////////////////////////////////////////////////////////
00270 #define FILTER_INSTANTIATION_CLASS GradientGaussAsymmetric
00271 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00272 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientGaussAsymmetric.hh Source File

Filter

GradientGaussAsymmetric.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GradientGaussAsymmetric_hh__
00027 #define __GradientGaussAsymmetric_hh__
00028
00029 #include "GradientGauss.hh"
00030
00031 #include <Base/Math/Vector3.hh>
00032
00033   // the debugfasgs are defined in Convolution.hh
00034   // #define D_GRADGAUSS_KERNEL 0x00000001
00035
00036 namespace BIAS {
00037
00038   /** @class GradientGaussAsymmetric
00039       @ingroup g_filter
00040       @brief gradient calculation with separated gauss masks
00041
00042       @author woelk 09/2004 */
00043   template <class InputStorageType, class OutputStorageType>
00044   class BIASFilter_EXPORT GradientGaussAsymmetric
00045     : public GradientGauss<InputStorageType, OutputStorageType>
00046   {
00047   public:
00048     GradientGaussAsymmetric();
00049
00050     GradientGaussAsymmetric(Param & para, const std::string& postfix="");
00051
00052     GradientGaussAsymmetric(Param & para, const int grp,
00053                             const std::string& postfix);
00054
00055     virtual ~GradientGaussAsymmetric();
00056
00057     /** returns a 2 channel image containing gx and gy
00058         @author woelk 12/2004, untested */
00059     virtual int Filter(const Image<InputStorageType>& src,
00060                        Image<OutputStorageType>& grad);
00061
00062     virtual int Filter(const Image<InputStorageType>& src,
00063                        Image<OutputStorageType>& gx,
00064                        Image<OutputStorageType>& gy);
00065
00066     virtual int Filter(const Image<InputStorageType>& src,
00067                        Image<OutputStorageType>& gx,
00068                        Image<OutputStorageType>& gy,
00069                        Image<OutputStorageType>& absg);
00070
00071   protected:
00072     /** Fills _HVec with gaussian function and _VVec with derivative of
00073         gaussian function with standard deviation Sigma. The size of _HVec
00074         and _VVec is calculated by using Ration. The Gaussian function is
00075         truncated, when the ration between biggest and smalles entry falls
00076         below Ratio.
00077         @author woelk 09/2004 */
00078     void _CalculateKernels(double Sigma, double Ratio);
00079
00080   }; // class
00081
00082
00083 } // namsepace
00084
00085 #endif // __GradientGaussAsymmetric_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSimple.cpp Source File

Filter

GradientSimple.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GradientSimple.hh"
00027 #include "FilterMask.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 namespace BIAS {
00033
00034 #define POLAR_TABLE_OFFSET 128
00035 #define POLAR_TABLE_SIZE 257
00036 //////////////////////////////////////////////////////////////////////////
00037 //                 implementation
00038 //////////////////////////////////////////////////////////////////////////
00039 template <class InputStorageType, class OutputStorageType> void
00040 GradientSimple<InputStorageType, OutputStorageType>::
00041 InitKernel_()
00042 {
00043   // this is a filtermask in the sense of convolution
00044   // it is reflected at its symmetry center before being "dropped"
00045   // onto the image !
00046   Vector<FM_INT> h(3), v(1);
00047   if (useDirectNeighbors_) {
00048     h[0] = 0;
00049     h[1] = 1;
00050     h[2] = -1;
00051   } else {
00052     h[0] = 1;
00053     h[1] = 0;
00054     h[2] = -1;
00055   }
00056   v[0] = 1;
00057   FilterMask f(h, v, useDirectNeighbors_?0:1, 0);
00058   f.CreateFloatFilter();
00059   _Conv.SetKernel(f);
00060 }
00061
00062 template <class InputStorageType, class OutputStorageType>
00063 GradientSimple<InputStorageType, OutputStorageType>::
00064 GradientSimple(bool BuildPCM)
00065   : FilterNTo2N<InputStorageType, OutputStorageType>() ,
00066     pRadius_(NULL), pAngle_(NULL), useDirectNeighbors_(false)
00067 {
00068   InitKernel_();
00069   if (BuildPCM) BuildPolarCoordinateMap_();
00070 }
00071
00072 template <class InputStorageType, class OutputStorageType>
00073 GradientSimple<InputStorageType, OutputStorageType>::
00074 GradientSimple(Param & para, const std::string& postfix, bool BuildPCM)
00075   : FilterNTo2N<InputStorageType, OutputStorageType>
00076 (para, "-GradientSimple"+postfix) ,
00077     pRadius_(NULL), pAngle_(NULL), useDirectNeighbors_(false)
00078 {
00079   InitKernel_();
00080   if (BuildPCM) BuildPolarCoordinateMap_();
00081 }
00082
00083 template <class InputStorageType, class OutputStorageType>
00084 GradientSimple<InputStorageType, OutputStorageType>::
00085 GradientSimple(Param & para, const int grp, const std::string& postfix,
00086                bool BuildPCM)
00087   : FilterNTo2N<InputStorageType, OutputStorageType>
00088 (para, grp, "-GradientSimple"+postfix),
00089     pRadius_(NULL), pAngle_(NULL), useDirectNeighbors_(false)
00090 {
00091   InitKernel_();
00092   if (BuildPCM) BuildPolarCoordinateMap_();
00093 }
00094
00095 template <class InputStorageType, class OutputStorageType>
00096 GradientSimple<InputStorageType, OutputStorageType>::
00097 ~GradientSimple()
00098 {
00099   if (pRadius_ != NULL) {
00100     pRadius_ -= POLAR_TABLE_OFFSET;
00101     for (int i=0; i<POLAR_TABLE_SIZE; i++)
00102       delete [] (pRadius_[i]-POLAR_TABLE_OFFSET);
00103     delete [] pRadius_;
00104     pRadius_ = NULL;
00105   }
00106   if (pAngle_ != NULL) {
00107     pAngle_ -= POLAR_TABLE_OFFSET;
00108     for (int i=0; i<POLAR_TABLE_SIZE; i++)
00109       delete [] (pAngle_[i]-POLAR_TABLE_OFFSET);
00110     delete [] pAngle_;
00111     pAngle_ = NULL;
00112   }
00113 }
00114
00115
00116 template <class InputStorageType, class OutputStorageType>
00117 int GradientSimple<InputStorageType,OutputStorageType>::
00118 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& grad)
00119 {
00120   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::Filter(src, dst)\n");
00121   Image<OutputStorageType> gy;
00122   int res=Filter(src, grad, gy);
00123   grad.AppendChannel(gy);
00124   return res;
00125 }
00126
00127 template <class InputStorageType, class OutputStorageType>
00128 int GradientSimple<InputStorageType,OutputStorageType>::
00129 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00130        Image<OutputStorageType>& gy)
00131 {
00132   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::Filter(src, gx, gy)\n");
00133   int res=0;
00134   if (!gx.SamePixelAndChannelCount(src)){
00135     gx.Release();
00136     gx.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00137   }
00138   if (!gy.SamePixelAndChannelCount(src)){
00139     gy.Release();
00140     gy.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00141   }
00142
00143   if (src.GetChannelCount()==1) {
00144     if (_Conv.CalculationInFloat()){
00145       if (useDirectNeighbors_)
00146         res = DirectNeighborsGreyValidFloat_(src, gx, gy);
00147       else
00148         res = SimpleGreyValidFloat_(src, gx, gy);
00149     } else {
00150       if (useDirectNeighbors_)
00151         res = DirectNeighborsGreyValidInt_(src, gx, gy);
00152       else
00153         res = SimpleGreyValidInt_(src, gx, gy);
00154     }
00155   } else {
00156     // grest
00157     BIASERR("not for multiple channel images");
00158     return -5;
00159   }
00160   return res;
00161 }
00162
00163 template <class InputStorageType, class OutputStorageType>
00164 int GradientSimple<InputStorageType,OutputStorageType>::
00165 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00166        Image<OutputStorageType>& gy, Image<OutputStorageType>& absg)
00167 {
00168   BIASCDOUT(D_FILTERBASE_CALLSTACK,
00169             "GradientSimple::Filter(src, gx, gy, abs)\n");
00170   if (!src.SamePixelAndChannelCount(absg)){
00171     if (!absg.IsEmpty()) absg.Release();
00172     absg.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00173   }
00174
00175   int res, absres=0;
00176   res = Filter(src, gx, gy);
00177
00178   absres = VecLen(gx, gy, absg);
00179
00180   return (res==0 && absres==0)?0:-1;
00181 }
00182
00183
00184
00185
00186 template <class InputStorageType, class OutputStorageType>
00187 int GradientSimple<InputStorageType, OutputStorageType>::
00188 SimpleGreyValidFloat_(const Image<InputStorageType>& src,
00189                       Image<OutputStorageType>& gWE,
00190                       Image<OutputStorageType>& gNS)
00191 {
00192   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::SimpleGreyValidFloat_\n");
00193
00194   OutputStorageType *gx=gWE.GetImageData();
00195   OutputStorageType *gy=gNS.GetImageData();
00196   const int width=(int)src.GetWidth();
00197   const int nwidth = - width;
00198
00199 #ifdef BIAS_DEBUG
00200   BIASASSERT(src.GetChannelCount()==1);
00201   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00202   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00203   BIASASSERT(gx!=gy);
00204   BIASASSERT(_Conv.CalculationInFloat());
00205 #endif
00206
00207   int minx, miny, maxx, maxy;
00208   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00209   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00210   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00211
00212   InputStorageType *ph;
00213
00214   int offset;
00215   OutputStorageType *pgx, *pgy, *end2, *lend2;
00216
00217
00218   int step=width-maxx+minx;
00219
00220   offset=minx+1+(miny+1)*width;
00221   ph = src.GetImageData() + offset;
00222   pgx=gx+offset;
00223   pgy=gy+offset;
00224   step+=2;
00225   end2=gx+maxx+width*(maxy-2)-1;
00226   lend2=gx+maxx+width*(miny+1)-1;
00227   while (pgx<end2){
00228     while (pgx<lend2){
00229       *pgx++ = (OutputStorageType)(ph[1] - ph[-1]);
00230       *pgy++ = (OutputStorageType)(ph[width] - ph[nwidth]);
00231       ph++;
00232     }
00233     ph+=step;
00234     pgx+=step;
00235     pgy+=step;
00236     lend2+=width;
00237   }
00238   return 0;
00239 }
00240
00241
00242 template <class InputStorageType, class OutputStorageType>
00243 int GradientSimple<InputStorageType, OutputStorageType>::
00244 SimpleGreyValidInt_(const Image<InputStorageType>& src,
00245                       Image<OutputStorageType>& gWE,
00246                       Image<OutputStorageType>& gNS)
00247 {
00248   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::SimpleGreyValidInt_\n");
00249
00250   OutputStorageType *gx=gWE.GetImageData();
00251   OutputStorageType *gy=gNS.GetImageData();
00252   const int width=(int)src.GetWidth();
00253   const int nwidth = - width;
00254
00255 #ifdef BIAS_DEBUG
00256   BIASASSERT(src.GetChannelCount()==1);
00257   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00258   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00259   BIASASSERT(gx!=gy);
00260   BIASASSERT(!_Conv.CalculationInFloat());
00261 #endif
00262
00263
00264
00265   int minx, miny, maxx, maxy;
00266   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00267   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00268   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00269
00270   InputStorageType *ph;
00271
00272   int offset;
00273   OutputStorageType *pgx, *pgy, *end2, *lend2;
00274
00275
00276   int step=width-maxx+minx;
00277
00278    offset=minx+1+(miny+1)*width;
00279   ph = src.GetImageData()+offset;
00280
00281   pgx=gx+offset;
00282   pgy=gy+offset;
00283   step+=2;
00284   end2=gx+maxx+width*(maxy-2)-1;
00285   lend2=gx+maxx+width*(miny+1)-1;
00286   while (pgx<end2){
00287     while (pgx<lend2){
00288       *pgx++ = (OutputStorageType)(ph[1] - ph[-1]);
00289       *pgy++ = (OutputStorageType)(ph[width] - ph[nwidth]);
00290       ph++;
00291     }
00292     ph+=step;
00293     pgx+=step;
00294     pgy+=step;
00295     lend2+=width;
00296   }
00297
00298   return 0;
00299 }
00300
00301
00302 template <class InputStorageType, class OutputStorageType>
00303 int GradientSimple<InputStorageType, OutputStorageType>::
00304 DirectNeighborsGreyValidFloat_(const Image<InputStorageType>& src,
00305                                Image<OutputStorageType>& gWE,
00306                                Image<OutputStorageType>& gNS)
00307 {
00308   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::SimpleGreyValidFloat_\n");
00309
00310   OutputStorageType *gx=gWE.GetImageData();
00311   OutputStorageType *gy=gNS.GetImageData();
00312   const int width=(int)src.GetWidth();
00313
00314 #ifdef BIAS_DEBUG
00315   BIASASSERT(src.GetChannelCount()==1);
00316   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00317   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00318   BIASASSERT(gx!=gy);
00319   BIASASSERT(_Conv.CalculationInFloat());
00320 #endif
00321
00322   int minx, miny, maxx, maxy;
00323   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00324   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00325   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00326
00327   InputStorageType *ph;
00328
00329   int offset;
00330   OutputStorageType *pgx, *pgy, *end2, *lend2;
00331
00332
00333   int step=width-maxx+minx;
00334
00335   offset=minx+1+(miny+1)*width;
00336   ph = src.GetImageData() + offset;
00337   pgx=gx+offset;
00338   pgy=gy+offset;
00339   step+=2;
00340   end2=gx+maxx+width*(maxy-2)-1;
00341   lend2=gx+maxx+width*(miny+1)-1;
00342   while (pgx<end2){
00343     while (pgx<lend2){
00344       *pgx++ = (OutputStorageType)(ph[1] - ph[0]);
00345       *pgy++ = (OutputStorageType)(ph[width] - ph[0]);
00346       ph++;
00347     }
00348     ph+=step;
00349     pgx+=step;
00350     pgy+=step;
00351     lend2+=width;
00352   }
00353   return 0;
00354 }
00355
00356
00357
00358
00359 template <class InputStorageType, class OutputStorageType>
00360 int GradientSimple<InputStorageType, OutputStorageType>::
00361 DirectNeighborsGreyValidInt_(const Image<InputStorageType>& src,
00362                              Image<OutputStorageType>& gWE,
00363                              Image<OutputStorageType>& gNS)
00364 {
00365   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSimple::SimpleGreyValidInt_\n");
00366
00367   OutputStorageType *gx=gWE.GetImageData();
00368   OutputStorageType *gy=gNS.GetImageData();
00369   const int width=(int)src.GetWidth();
00370
00371 #ifdef BIAS_DEBUG
00372   BIASASSERT(src.GetChannelCount()==1);
00373   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00374   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00375   BIASASSERT(gx!=gy);
00376   BIASASSERT(!_Conv.CalculationInFloat());
00377 #endif
00378
00379
00380
00381   int minx, miny, maxx, maxy;
00382   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00383   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00384   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00385
00386   InputStorageType *ph;
00387
00388   int offset;
00389   OutputStorageType *pgx, *pgy, *end2, *lend2;
00390
00391
00392   int step=width-maxx+minx;
00393
00394   offset = minx+1+(miny+1)*width;
00395   ph = src.GetImageData()+offset;
00396
00397   // can compute one or two lines more at the border, not yet implemented
00398   pgx  = gx+offset;
00399   pgy  = gy+offset;
00400   step += 2;
00401   end2  = gx + maxx + width*(maxy-2)-1;
00402   lend2 = gx + maxx + width*(miny+1)-1;
00403   while (pgx<end2){
00404     while (pgx<lend2){
00405       *pgx++ = (OutputStorageType)(ph[1] - ph[0]);
00406       *pgy++ = (OutputStorageType)(ph[width] - ph[0]);
00407       ph++;
00408     }
00409     ph   += step;
00410     pgx  += step;
00411     pgy  += step;
00412     lend2+= width;
00413   }
00414
00415   return 0;
00416 }
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428 template <class InputStorageType, class OutputStorageType>
00429 void GradientSimple<InputStorageType, OutputStorageType>::
00430 BuildPolarCoordinateMap_()
00431 {
00432   BIASASSERT(pRadius_ == NULL);
00433   BIASASSERT(pAngle_ == NULL);
00434
00435   pRadius_ = new float* [POLAR_TABLE_SIZE];
00436   for (int i=0; i<POLAR_TABLE_SIZE; i++)
00437     pRadius_[i] = new float [POLAR_TABLE_SIZE] + POLAR_TABLE_OFFSET;
00438   pRadius_ += POLAR_TABLE_OFFSET;
00439
00440   pAngle_ = new float* [POLAR_TABLE_SIZE];
00441   for (int i=0; i<POLAR_TABLE_SIZE; i++)
00442     pAngle_[i] = new float [POLAR_TABLE_SIZE] + POLAR_TABLE_OFFSET;
00443   pAngle_ += POLAR_TABLE_OFFSET;
00444
00445   for (int x=-POLAR_TABLE_OFFSET; x<=128; x++) {
00446     for (int y=-POLAR_TABLE_OFFSET; y<=128; y++) {
00447       pRadius_[x][y] = sqrtf(float(x*x+y*y));
00448
00449       pAngle_[x][y]  = -atan2f( float(y), float(x) );
00450       if (pAngle_[x][y]  < 0.0f)
00451         (pAngle_[x][y]) += 2.0f * (float)M_PI;
00452     }
00453   }
00454 }
00455
00456 template<>
00457 void GradientSimple<unsigned char, char>::
00458 PolarTransform(Image<char>& gx, Image<char>& gy,
00459                Image<float>& magnitude, Image<float>& phase) {
00460   if (pRadius_ == NULL) BuildPolarCoordinateMap_();
00461   BIASASSERT(pRadius_ != NULL);
00462   if (!magnitude.SamePixelAndChannelCount(gx)) {
00463     if (!magnitude.IsEmpty()) magnitude.Release();
00464     magnitude.Init(gx.GetWidth(), gx.GetHeight(), 1);
00465   }
00466   if (!phase.SamePixelAndChannelCount(gx) ) {
00467     if (!phase.IsEmpty()) phase.Release();
00468     phase.Init(gx.GetWidth(), gx.GetHeight(), 1);
00469   }
00470   char *pgx = gx.GetImageData(), *pgy = gy.GetImageData();
00471   float *pm = magnitude.GetImageData(), *pp = phase.GetImageData();
00472   char* const pEnd = pgx + gx.GetPixelCount();
00473   while (pgx<pEnd) {
00474     *pp++ = pAngle_[*pgx][*pgy];
00475     *pm++ = pRadius_[*pgx++][*pgy++];
00476   }
00477 }
00478
00479 template <class InputStorageType, class OutputStorageType>
00480 void GradientSimple<InputStorageType,OutputStorageType>::
00481 PolarTransform(Image<OutputStorageType>& gx, Image<OutputStorageType>& gy,
00482                Image<float>& magnitude, Image<float>& phase) {
00483   if (!magnitude.SamePixelAndChannelCount(gx)) {
00484     if (!magnitude.IsEmpty()) magnitude.Release();
00485     magnitude.Init(gx.GetWidth(), gx.GetHeight(), 1);
00486   }
00487   if (!phase.SamePixelAndChannelCount(gx) ) {
00488     if (!phase.IsEmpty()) phase.Release();
00489     phase.Init(gx.GetWidth(), gx.GetHeight(), 1);
00490   }
00491   OutputStorageType *pgx = gx.GetImageData(), *pgy = gy.GetImageData();
00492   float *pm = magnitude.GetImageData(), *pp = phase.GetImageData();
00493   OutputStorageType* const pEnd = pgx + gx.GetPixelCount();
00494   while (pgx<pEnd) {
00495     *pp++ = -atan2f( float(*pgy), float(*pgy) );
00496     *pm++ = sqrtf(float(*pgx) * float(*pgx) + float(*pgy) * float(*pgy));
00497     pgx++;
00498     pgy++;
00499   }
00500 }
00501
00502
00503 template <class InputStorageType, class OutputStorageType>
00504 void GradientSimple<InputStorageType, OutputStorageType>::
00505 GetBordersValid_(int &border_x, int &border_y) const
00506 {
00507   _Conv.GetBorders(border_x, border_y);
00508 }
00509
00510 //////////////////////////////////////////////////////////////////////////
00511 //                 instantiation
00512 //////////////////////////////////////////////////////////////////////////
00513 #define FILTER_INSTANTIATION_CLASS GradientSimple
00514 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00515 #include "Filterinst.hh"
00516
00517 } // namespace BIAS
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSimple.hh Source File

Filter

GradientSimple.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GradientSimple_hh__
00027 #define __GradientSimple_hh__
00028
00029 #include "FilterNTo2N.hh"
00030
00031 #include <Base/Math/Vector3.hh>
00032 #include "Convolution.hh"
00033
00034
00035 namespace BIAS {
00036
00037   /** @class GradientSimple
00038       @ingroup g_filter
00039       @brief simple gradient calculation
00040       gx(x,y) = I(x+1,y) - I(x-1,y)
00041       gy(x,y) = I(x,y+1) - I(x,y-1)
00042
00043       weights (not filter mask, ->reflection!) are
00044       -                            -1
00045       - WE:   -1 0 1          NS:   0
00046       -                             1
00047
00048       The main interface Filter dispatches: If there is a fast version, it
00049       is called, otherwise Filter calls the generic convolution.
00050       @author koeser 04/2005 */
00051   template <class InputStorageType, class OutputStorageType>
00052   class BIASFilter_EXPORT GradientSimple : public FilterNTo2N<InputStorageType,
00053                                             OutputStorageType>
00054   {
00055   public:
00056     GradientSimple(bool BuildPCM = false);
00057
00058     GradientSimple(Param & para, const std::string& postfix="",
00059                    bool BuildPCM = false );
00060
00061     GradientSimple(Param & para, const int grp, const std::string& postfix,
00062                    bool BuildPCM = false);
00063
00064     virtual ~GradientSimple();
00065
00066     /** returns a 2 channel image containing gx and gy
00067         @author woelk 12/2004, untested */
00068     virtual int Filter(const Image<InputStorageType>& src,
00069                        Image<OutputStorageType>& grad);
00070
00071     virtual int Filter(const Image<InputStorageType>& src,
00072                        Image<OutputStorageType>& gx,
00073                        Image<OutputStorageType>& gy);
00074
00075     virtual int Filter(const Image<InputStorageType>& src,
00076                        Image<OutputStorageType>& gx,
00077                        Image<OutputStorageType>& gy,
00078                        Image<OutputStorageType>& absg);
00079
00080
00081     void PolarTransform(Image<OutputStorageType>& gx,
00082                         Image<OutputStorageType>& gy,
00083                         Image<float>& magnitude,
00084                         Image<float>& phase);
00085
00086     /** @brief if true, we use a filter of [1 -1] otherwise [1 0 -1]
00087
00088     If true we get a better spatial resolution of gradients, however, the
00089     result is shifted by 0.5;0.5 pixels. Take care of noise in your input data.
00090     @author koeser
00091     @date 03/2006 */
00092     void UseDirectNeighbors(bool UseDirectNeighbors) {
00093       if (UseDirectNeighbors != useDirectNeighbors_) {
00094         useDirectNeighbors_ = UseDirectNeighbors;
00095         InitKernel_();
00096       }
00097     }
00098
00099   protected:
00100
00101     /// set up pRadius and pAngle for polar coordinate transformation
00102     void BuildPolarCoordinateMap_();
00103
00104
00105     /// @brief sets the sobel kernel for the convolution object
00106     void InitKernel_();
00107
00108     /// computation object to execute the convolution
00109     Convolution<InputStorageType, OutputStorageType> _Conv;
00110
00111     /** @brief loop unrolled fast float version for [1 0 -1] */
00112     int SimpleGreyValidFloat_(const Image<InputStorageType>& src,
00113                               Image<OutputStorageType>& gWE,
00114                               Image<OutputStorageType>& gNS);
00115
00116     /** @brief loop unrolled fast int version [1 0 -1] */
00117     int SimpleGreyValidInt_(const Image<InputStorageType>& src,
00118                             Image<OutputStorageType>& gWE,
00119                             Image<OutputStorageType>& gNS);
00120
00121     /** @brief loop unrolled fast float version [1 -1]*/
00122     int DirectNeighborsGreyValidFloat_(const Image<InputStorageType>& src,
00123                                        Image<OutputStorageType>& gWE,
00124                                        Image<OutputStorageType>& gNS);
00125
00126     /** @brief loop unrolled fast int version [1 -1] */
00127     int DirectNeighborsGreyValidInt_(const Image<InputStorageType>& src,
00128                                      Image<OutputStorageType>& gWE,
00129                                      Image<OutputStorageType>& gNS);
00130
00131     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00132
00133     /// polar coordinate transformation for char values
00134     float **pRadius_, **pAngle_;
00135
00136     /// if true, we use a filter of [-1 1] otherwise [-1 0 1]
00137     bool useDirectNeighbors_;
00138
00139   }; // class
00140
00141 } // namsepace
00142
00143 #endif // __GradientSimple_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSobel3x3.cpp Source File

Filter

GradientSobel3x3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GradientSobel3x3.hh"
00027 #include "FilterMask.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 //////////////////////////////////////////////////////////////////////////
00033 //                 implementation
00034 //////////////////////////////////////////////////////////////////////////
00035 template <class InputStorageType, class OutputStorageType> void
00036 GradientSobel3x3<InputStorageType, OutputStorageType>::
00037 InitKernel_()
00038 {
00039   // this is a filtermask in the sense of convolution
00040   // it is reflected at its symmetry center before being "dropped"
00041   // onto the image !
00042   Vector<FM_INT> h(3), v(3);
00043   h[0] = 1;
00044   h[1] = 0;
00045   h[2] = -1;
00046   v[0] = v[2] = 1;
00047   v[1] = 2;
00048
00049   FilterMask f(h, v, 1, 2);
00050   //FilterMask f(h, v, 2, 2);
00051   f.CreateFloatFilter();
00052   _Conv.SetKernel(f);
00053 }
00054
00055 template <class InputStorageType, class OutputStorageType>
00056 GradientSobel3x3<InputStorageType, OutputStorageType>::
00057 GradientSobel3x3()
00058   : FilterNTo2N<InputStorageType, OutputStorageType>()
00059 {
00060   InitKernel_();
00061   _fwork = _fwork2 = NULL;
00062   _iwork = _iwork2 = NULL;
00063   _InternalMemWidth = _InternalMemHeight = 0;
00064 }
00065
00066 template <class InputStorageType, class OutputStorageType>
00067 GradientSobel3x3<InputStorageType, OutputStorageType>::
00068 GradientSobel3x3(Param & para, const std::string& postfix)
00069   : FilterNTo2N<InputStorageType, OutputStorageType>(para, "-GradientSobel3x3"+postfix)
00070 {
00071   InitKernel_();
00072   _fwork = _fwork2 = NULL;
00073   _iwork = _iwork2 = NULL;
00074   _InternalMemWidth = _InternalMemHeight = 0;
00075 }
00076
00077 template <class InputStorageType, class OutputStorageType>
00078 GradientSobel3x3<InputStorageType, OutputStorageType>::
00079 GradientSobel3x3(Param & para, const int grp, const std::string& postfix)
00080   : FilterNTo2N<InputStorageType, OutputStorageType>(para, grp, "-GradientSobel3x3"+postfix)
00081 {
00082   InitKernel_();
00083   _fwork = _fwork2 = NULL;
00084   _iwork = _iwork2 = NULL;
00085   _InternalMemWidth = _InternalMemHeight = 0;
00086 }
00087
00088 template <class InputStorageType, class OutputStorageType>
00089 GradientSobel3x3<InputStorageType, OutputStorageType>::
00090 ~GradientSobel3x3()
00091 {
00092   _DeleteInternalMem();
00093 }
00094
00095
00096 template <class InputStorageType, class OutputStorageType>
00097 int GradientSobel3x3<InputStorageType,OutputStorageType>::
00098 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& grad)
00099 {
00100   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Filter(src, dst)\n");
00101   Image<OutputStorageType> gy;
00102   int res=Filter(src, grad, gy);
00103   grad.AppendChannel(gy);
00104   return res;
00105 }
00106
00107 template <class InputStorageType, class OutputStorageType>
00108 int GradientSobel3x3<InputStorageType,OutputStorageType>::
00109 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00110        Image<OutputStorageType>& gy)
00111 {
00112   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Filter(src, gx, gy)\n");
00113   int res=0;
00114   if (!gx.SamePixelAndChannelCount(src)){
00115     gx.Release();
00116     gx.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00117   }
00118   if (!gy.SamePixelAndChannelCount(src)){
00119     gy.Release();
00120     gy.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00121   }
00122
00123   if (src.GetChannelCount()==1) {
00124     if (_InternalMemWidth < (int)src.GetWidth() ||
00125         _InternalMemHeight < (int)src.GetHeight() ) _DeleteInternalMem();
00126     if (_Conv.CalculationInFloat()){
00127       if (_fwork == NULL) _AllocInternalMem(src.GetWidth(), src.GetHeight());
00128       switch (*(this->_FilterBorderHandling)){
00129       case Convolution<InputStorageType,OutputStorageType>::TBH_valid:
00130         res = Sobel3x3GreyValidFloat_(src, gx, gy);
00131         break;
00132       case Convolution<InputStorageType,OutputStorageType>::TBH_same:
00133         res = Sobel3x3GreySameFloat_(src, gx, gy);
00134         break;
00135       default:
00136         BIASERR("unfinished");
00137         res = -1;
00138         break;
00139       }
00140     } else {
00141       if (_iwork == NULL) _AllocInternalMem(src.GetWidth(), src.GetHeight());
00142       res = Sobel3x3GreyValidInt_(src, gx, gy);
00143     }
00144   } else {
00145     // grest
00146     BIASERR("not for multiple channel images");
00147     return -5;
00148 //     if (_Conv.Filter(src, gx)!=0) {
00149 //       BIASERR("Error in gradient x computation...");
00150 //       return -1;
00151 //     }
00152 //     FilterMask f;
00153 //     _Conv.GetKernel(f);
00154 //     f.Transpose();
00155 //     _Conv.SetKernel(f);
00156 //     res =  _Conv.Filter(src, gy);
00157 //     // re-set original kernel
00158 //     f.Transpose();
00159 //     _Conv.SetKernel(f);
00160   }
00161   return res;
00162 }
00163
00164 template <class InputStorageType, class OutputStorageType>
00165 int GradientSobel3x3<InputStorageType,OutputStorageType>::
00166 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& gx,
00167        Image<OutputStorageType>& gy, Image<OutputStorageType>& absg)
00168 {
00169   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Filter(src, gx, gy, abs)\n");
00170   if (!src.SamePixelAndChannelCount(absg)){
00171     if (!absg.IsEmpty()) absg.Release();
00172     absg.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00173   }
00174
00175   int res, absres=0;
00176   res = Filter(src, gx, gy);
00177
00178   absres = VecLen(gx, gy, absg);
00179
00180   return (res==0 && absres==0)?0:-1;
00181 }
00182
00183
00184
00185
00186 template <class InputStorageType, class OutputStorageType>
00187 int GradientSobel3x3<InputStorageType, OutputStorageType>::
00188 Sobel3x3GreyValidFloat_(const Image<InputStorageType>& src,
00189                         Image<OutputStorageType>& gWE,
00190                         Image<OutputStorageType>& gNS)
00191 {
00192   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Sobel3x3GreyValidFloat_\n");
00193   InputStorageType *im=src.GetImageData();
00194   OutputStorageType *gx=gWE.GetImageData();
00195   OutputStorageType *gy=gNS.GetImageData();
00196   const int width=(int)src.GetWidth();
00197   const int nwidth = - width;
00198   const int height=(int)src.GetHeight();
00199
00200 #ifdef BIAS_DEBUG
00201   BIASASSERT(src.GetChannelCount()==1);
00202   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00203   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00204   BIASASSERT(gx!=gy);
00205   BIASASSERT(_Conv.CalculationInFloat());
00206 #endif
00207
00208   if (width>this->_InternalMemWidth || height>this->_InternalMemHeight){
00209     this->_DeleteInternalMem();
00210     this->_AllocInternalMem(width, height);
00211   }
00212
00213   int minx, miny, maxx, maxy;
00214   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00215   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00216   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00217
00218   InputStorageType *end, *p, *lend;
00219   CONV_FLOAT *ph, *pv;
00220   int offset;
00221   OutputStorageType *pgx, *pgy, *end2, *lend2;
00222   CONV_FLOAT tmp, tmpx, tmpy;
00223   int roiw=maxx-minx-1;
00224   int step=width-maxx+minx;
00225
00226   // separated sobel 3x3 for gx and gy
00227
00228   // first line
00229   offset=minx+miny*width;
00230   p=im+1+offset;
00231   ph=this->_fwork[0]+1+offset;
00232   pv=this->_fwork2[0]+offset+width;
00233   lend=p+roiw-1;
00234   while (p<lend){
00235     tmp = (CONV_FLOAT(*p))*2.0f;
00236     *ph++ = CONV_FLOAT(p[-1]) + tmp + CONV_FLOAT(p[1]);
00237     p++;
00238   }
00239   p+=step+1;
00240   ph+=step+1;
00241   lend+=width;
00242   end=im+maxx-1+(maxy-2)*width;
00243   while (p<end){
00244     tmp = (CONV_FLOAT(*p))*2.0f;
00245     *pv++ = CONV_FLOAT(p[nwidth]) + tmp + CONV_FLOAT(p[width]);
00246     ph++;
00247     p++;
00248     while (p<lend){
00249       tmp = (CONV_FLOAT(*p))*2.0f;
00250       *ph++ = CONV_FLOAT(p[-1]) + tmp + CONV_FLOAT(p[1]);
00251       *pv++ = CONV_FLOAT(p[nwidth]) + tmp + CONV_FLOAT(p[width]);
00252       p++;
00253     }
00254     tmp = (CONV_FLOAT(*p))*2.0f;
00255     *pv++ = CONV_FLOAT(p[nwidth]) + tmp + CONV_FLOAT(p[width]);
00256     ph++;
00257     p++;
00258     lend+=width;
00259     p+=step;
00260     ph+=step;
00261     pv+=step;
00262   }
00263   p++; ph++;
00264   // last line
00265   while (p<lend){
00266     tmp = (CONV_FLOAT(*p))*2.0f;
00267     *ph++ = CONV_FLOAT(p[-1]) + tmp + CONV_FLOAT(p[1]);
00268     p++;
00269   }
00270
00271   // now second run from temporary to gradients
00272
00273   offset=minx+1+(miny+1)*width;
00274   ph=this->_fwork[0]+offset;
00275   pv=this->_fwork2[0]+offset;
00276   pgx=gx+offset;
00277   pgy=gy+offset;
00278   step+=2;
00279   end2=gx+maxx+width*(maxy-2)-1;
00280   lend2=gx+maxx+width*(miny+1)-1;
00281   while (pgx<end2){
00282     while (pgx<lend2){
00283       tmpx = (pv[1] - pv[-1])/8.0f;
00284       tmpy = (ph[width] - ph[nwidth])/8.0f;
00285       *pgx++ = (OutputStorageType)tmpx;
00286       *pgy++ = (OutputStorageType)tmpy;
00287       pv++;
00288       ph++;
00289     }
00290     pv+=step;
00291     ph+=step;
00292     pgx+=step;
00293     pgy+=step;
00294     lend2+=width;
00295   }
00296   return 0;
00297 }
00298
00299 template <class InputStorageType, class OutputStorageType>
00300 int GradientSobel3x3<InputStorageType, OutputStorageType>::
00301 Sobel3x3GreySameFloat_(const Image<InputStorageType>& src,
00302                         Image<OutputStorageType>& gWE,
00303                         Image<OutputStorageType>& gNS)
00304 {
00305   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Sobel3x3GreySameFloat_\n");
00306   int res=0;
00307   res = Sobel3x3GreyValidFloat_(src, gWE, gNS);
00308
00309   int minx, miny, maxx, maxy;
00310   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00311   register int x, y, xp, xm, yp, ym;
00312
00313   InputStorageType **srcida=src.GetImageDataArray();
00314   OutputStorageType **gweida=gWE.GetImageDataArray();
00315   OutputStorageType **gnsida=gNS.GetImageDataArray();
00316
00317   // upper left pixel
00318   x = minx;
00319   y = miny;
00320   xp = x+1;
00321   xm = x;
00322   yp = y+1;
00323   ym = y;
00324   gweida[y][x] =
00325     OutputStorageType((float(srcida[ym][xp])-float(srcida[ym][xm])+
00326                        2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00327                        float(srcida[yp][xp])-float(srcida[yp][xm]))/8.0);
00328   gnsida[y][x] =
00329     OutputStorageType((float(srcida[yp][xm])-float(srcida[ym][xm])+
00330                        2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00331                        float(srcida[yp][xp])-float(srcida[ym][xp]))/8.0);
00332
00333   // upper right pixel
00334   x = maxx-1;
00335   y = miny;
00336   xp = x;
00337   xm = x-1;
00338   yp = y+1;
00339   ym = y;
00340   gweida[y][x] =
00341     OutputStorageType((float(srcida[ym][xp])-float(srcida[ym][xm])+
00342                        2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00343                        float(srcida[yp][xp])-float(srcida[yp][xm]))/8.0);
00344   gnsida[y][x] =
00345     OutputStorageType((float(srcida[yp][xm])-float(srcida[ym][xm])+
00346                        2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00347                        float(srcida[yp][xp])-float(srcida[ym][xp]))/8.0);
00348
00349   // lower right pixel
00350   x = maxx-1;
00351   y = maxy-1;
00352   xp = x;
00353   xm = x-1;
00354   yp = y;
00355   ym = y-1;
00356   gweida[y][x] =
00357     OutputStorageType((float(srcida[ym][xp])-float(srcida[ym][xm])+
00358                        2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00359                        float(srcida[yp][xp])-float(srcida[yp][xm]))/8.0);
00360   gnsida[y][x] =
00361     OutputStorageType((float(srcida[yp][xm])-float(srcida[ym][xm])+
00362                        2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00363                        float(srcida[yp][xp])-float(srcida[ym][xp]))/8.0);
00364
00365   // lower left pixel
00366   x = minx;
00367   y = maxy-1;
00368   xp = x+1;
00369   xm = x;
00370   yp = y;
00371   ym = y-1;
00372   gweida[y][x] =
00373     OutputStorageType((float(srcida[ym][xp])-float(srcida[ym][xm])+
00374                        2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00375                        float(srcida[yp][xp])-float(srcida[yp][xm]))/8.0);
00376   gnsida[y][x] =
00377     OutputStorageType((float(srcida[yp][xm])-float(srcida[ym][xm])+
00378                        2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00379                        float(srcida[yp][xp])-float(srcida[ym][xp]))/8.0);
00380
00381   // upper row
00382   y = miny;
00383   yp = y+1;
00384   for (x=minx+1; x<maxx-1; x++){
00385     xp = x+1;
00386     xm = x-1;
00387     gweida[y][x] =
00388       OutputStorageType((2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00389                          float(srcida[yp][xp])-float(srcida[yp][xm]))/6.0);
00390     gnsida[y][x] =
00391       OutputStorageType((2.0*(float(srcida[yp][x])-float(srcida[y][x]))+
00392                          float(srcida[yp][xp])+float(srcida[yp][xm])-
00393                          float(srcida[y][xp])-float(srcida[y][xm]))/8.0);
00394   }
00395   // lower row
00396   y=maxy-1;
00397   ym = y-1;
00398   for (x=minx+1; x<maxx-1; x++){
00399     xp = x+1;
00400     xm = x-1;
00401     gweida[y][x] =
00402       OutputStorageType((2.0*(float(srcida[y][xp])-float(srcida[y][xm]))+
00403                          float(srcida[ym][xp])-float(srcida[ym][xm]))/6.0);
00404     gnsida[y][x] =
00405       OutputStorageType((2.0*(float(srcida[y][x])-float(srcida[ym][x]))-
00406                          float(srcida[ym][xp])-float(srcida[ym][xm])+
00407                          float(srcida[y][xp])+float(srcida[y][xm]))/8.0);
00408   }
00409   // left column
00410   x = minx;
00411   xp = x+1;
00412   for (y=miny+1; y<maxy-1; y++){
00413     yp = y+1;
00414     ym = y-1;
00415     gweida[y][x] =
00416       OutputStorageType((2.0*(float(srcida[y][xp])-float(srcida[y][x]))+
00417                          float(srcida[ym][xp])+float(srcida[yp][xp])-
00418                          float(srcida[ym][x])-float(srcida[yp][x]))/8.0);
00419     gnsida[y][x] =
00420       OutputStorageType((2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00421                          float(srcida[yp][xp])-float(srcida[ym][xp]))/6.0);
00422   }
00423
00424   // right column
00425   x = maxx-1;
00426   xm = x-1;
00427   for (y=miny+1; y<maxy-1; y++){
00428     yp = y+1;
00429     ym = y-1;
00430     gweida[y][x] =
00431       OutputStorageType((2.0*(float(srcida[y][x])-float(srcida[y][xm]))-
00432                          float(srcida[ym][xm])-float(srcida[yp][xm])+
00433                          float(srcida[ym][x])+float(srcida[yp][x]))/8.0);
00434     gnsida[y][x] =
00435       OutputStorageType((2.0*(float(srcida[yp][x])-float(srcida[ym][x]))+
00436                          float(srcida[yp][xm])-float(srcida[ym][xm]))/6.0);
00437   }
00438
00439   gWE.GetROI()->SetCorners(minx, miny, maxx, maxy);
00440   gNS.GetROI()->SetCorners(minx, miny, maxx, maxy);
00441
00442   return res;
00443 }
00444
00445 template <class InputStorageType, class OutputStorageType>
00446 int GradientSobel3x3<InputStorageType, OutputStorageType>::
00447 Sobel3x3GreyValidInt_(const Image<InputStorageType>& src,
00448                       Image<OutputStorageType>& gWE,
00449                       Image<OutputStorageType>& gNS)
00450 {
00451   BIASCDOUT(D_FILTERBASE_CALLSTACK, "GradientSobel3x3::Sobel3x3GreyValidInt_\n");
00452   InputStorageType *im=src.GetImageData();
00453   OutputStorageType *gx=gWE.GetImageData();
00454   OutputStorageType *gy=gNS.GetImageData();
00455   const int width=(int)src.GetWidth();
00456   const int nwidth = - width;
00457   const int height=(int)src.GetHeight();
00458
00459 #ifdef BIAS_DEBUG
00460   BIASASSERT(src.GetChannelCount()==1);
00461   BIASASSERT(src.SamePixelAndChannelCount(gWE));
00462   BIASASSERT(src.SamePixelAndChannelCount(gNS));
00463   BIASASSERT(gx!=gy);
00464   BIASASSERT(!_Conv.CalculationInFloat());
00465 #endif
00466
00467   if (width>this->_InternalMemWidth || height>this->_InternalMemHeight){
00468     this->_DeleteInternalMem();
00469     this->_AllocInternalMem(width, height);
00470   }
00471
00472   int minx, miny, maxx, maxy;
00473   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00474   gWE.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00475   gNS.GetROI()->SetCorners(minx+1, miny+1, maxx-1, maxy-1);
00476
00477   InputStorageType *end, *p, *lend;
00478   CONV_INT *ph, *pv;
00479   int offset;
00480   OutputStorageType *pgx, *pgy, *end2, *lend2;
00481   CONV_INT tmp, tmpx, tmpy;
00482   int roiw=maxx-minx-1;
00483   int step=width-maxx+minx;
00484
00485   // separated sobel 3x3 for gx and gy
00486
00487   // first line
00488   offset=minx+miny*width;
00489   p=im+1+offset;
00490   ph=this->_iwork[0]+1+offset;
00491   pv=this->_iwork2[0]+offset+width;
00492   lend=p+roiw-1;
00493   while (p<lend){
00494     tmp = (CONV_INT(*p))<<1;
00495     *ph++ = CONV_INT(p[-1]) + tmp + CONV_INT(p[1]);
00496     p++;
00497   }
00498   p+=step+1;
00499   ph+=step+1;
00500   lend+=width;
00501   end=im+maxx-1+(maxy-2)*width;
00502   while (p<end){
00503     tmp = (CONV_INT(*p))<<1;
00504     *pv++ = CONV_INT(p[nwidth]) + tmp + CONV_INT(p[width]);
00505     ph++;
00506     p++;
00507     while (p<lend){
00508       tmp = (CONV_INT(*p))<<1;
00509       *ph++ = CONV_INT(p[-1]) + tmp + CONV_INT(p[1]);
00510       *pv++ = CONV_INT(p[nwidth]) + tmp + CONV_INT(p[width]);
00511       p++;
00512     }
00513     tmp = (CONV_INT(*p))<<1;
00514     *pv++ = CONV_INT(p[nwidth]) + tmp + CONV_INT(p[width]);
00515     ph++;
00516     p++;
00517     lend+=width;
00518     p+=step;
00519     ph+=step;
00520     pv+=step;
00521   }
00522   p++; ph++;
00523   // last line
00524   while (p<lend){
00525     tmp = (CONV_INT(*p))<<1;
00526     *ph++ = CONV_INT(p[-1]) + tmp + CONV_INT(p[1]);
00527     p++;
00528   }
00529
00530   // now second run from temporary to gradients
00531
00532   offset=minx+1+(miny+1)*width;
00533   ph=this->_iwork[0]+offset;
00534   pv=this->_iwork2[0]+offset;
00535   pgx=gx+offset;
00536   pgy=gy+offset;
00537   step+=2;
00538   end2=gx+maxx+width*(maxy-2)-1;
00539   lend2=gx+maxx+width*(miny+1)-1;
00540   while (pgx<end2){
00541     while (pgx<lend2){
00542       tmpx = (pv[1] - pv[-1])>>3;  // /8.0;
00543       tmpy = (ph[width] - ph[nwidth])>>3; // /8.0;
00544       *pgx++ = (OutputStorageType)tmpx;
00545       *pgy++ = (OutputStorageType)tmpy;
00546       pv++;
00547       ph++;
00548     }
00549     pv+=step;
00550     ph+=step;
00551     pgx+=step;
00552     pgy+=step;
00553     lend2+=width;
00554   }
00555
00556   return 0;
00557 }
00558
00559 template <class InputStorageType, class OutputStorageType>
00560 void GradientSobel3x3<InputStorageType, OutputStorageType>::
00561 _DeleteInternalMem()
00562 {
00563   if (this->_fwork!=NULL) {
00564     delete[] this->_fwork[0]; this->_fwork[0]=NULL;
00565     delete[] this->_fwork; this->_fwork=NULL;
00566   }
00567   if (_fwork2!=NULL) {
00568     delete[] _fwork2[0]; _fwork2[0]=NULL;
00569     delete[] _fwork2; _fwork2=NULL;
00570   }
00571   if (this->_iwork!=NULL) {
00572     delete[] this->_iwork[0]; this->_iwork[0]=NULL;
00573     delete[] this->_iwork; this->_iwork=NULL;
00574   }
00575   if (_iwork2!=NULL) {
00576     delete[] _iwork2[0]; _iwork2[0]=NULL;
00577     delete[] _iwork2; _iwork2=NULL;
00578   }
00579   this->_InternalMemWidth=this->_InternalMemHeight=0;
00580 }
00581
00582 template <class InputStorageType, class OutputStorageType>
00583 void GradientSobel3x3<InputStorageType, OutputStorageType>::
00584 _AllocInternalMem(const int width, const int height)
00585 {
00586 #ifdef BIAS_DEBUG
00587   if ((this->_fwork!=NULL) || (_fwork2!=NULL) ||
00588       (this->_iwork!=NULL) || (_iwork2!=NULL)){
00589     BIASERR("memory leak, reallocating without deleting!");
00590     BIASABORT;
00591   }
00592 #endif
00593   int size=width*height;
00594
00595   if (_Conv.CalculationInFloat()){
00596     this->_fwork = new CONV_FLOAT*[height];
00597     this->_fwork[0] = new CONV_FLOAT[size];
00598     _fwork2 = new CONV_FLOAT*[height];
00599     _fwork2[0] = new CONV_FLOAT[size];
00600     for (int i=1; i<height; i++) {
00601       this->_fwork[i]=this->_fwork[i-1]+width;
00602       _fwork2[i]=_fwork2[i-1]+width;
00603     }
00604   } else {
00605     this->_iwork = new CONV_INT*[height];
00606     this->_iwork[0] = new CONV_INT[size];
00607     _iwork2 = new CONV_INT*[height];
00608     _iwork2[0] = new CONV_INT[size];
00609     for (int i=1; i<height; i++) {
00610       this->_iwork[i]=this->_iwork[i-1]+width;
00611       _iwork2[i]=_iwork2[i-1]+width;
00612     }
00613   }
00614
00615   this->_InternalMemWidth=width;
00616   this->_InternalMemHeight=height;
00617 }
00618
00619 template <class InputStorageType, class OutputStorageType>
00620 void GradientSobel3x3<InputStorageType, OutputStorageType>::
00621 GetBordersValid_(int &border_x, int &border_y) const
00622 {
00623   border_x = border_y = 1;
00624 }
00625
00626
00627 //////////////////////////////////////////////////////////////////////////
00628 //                 instantiation
00629 //////////////////////////////////////////////////////////////////////////
00630 #define FILTER_INSTANTIATION_CLASS GradientSobel3x3
00631 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
00632 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/GradientSobel3x3.hh Source File

Filter

GradientSobel3x3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GradientSobel3x3_hh__
00027 #define __GradientSobel3x3_hh__
00028
00029 #include "FilterNTo2N.hh"
00030
00031 #include <Base/Math/Vector3.hh>
00032 #include "Convolution.hh"
00033
00034
00035 namespace BIAS {
00036
00037   /** @class GradientSobel3x3
00038       @ingroup g_filter
00039       @brief gradient calculation with sobel 3 by 3 masks
00040
00041       calculates the gradient using the sobel operators<br>
00042            -1 0 1         -1 -2 -1
00043       WE:  -2 0 2    NS:   0  0  0
00044            -1 0 1          1  2  1
00045
00046       They can be separated into:
00047
00048       WE: vh = (-1, 0, 1) and vv = (1, 2, 1)^T
00049
00050       NS: vh = (1, 2, 1) and vv = (-1, 0, 1)^T
00051
00052       @author woelk 09/2004 */
00053   template <class InputStorageType, class OutputStorageType>
00054   class BIASFilter_EXPORT GradientSobel3x3 : public FilterNTo2N<InputStorageType,
00055                                               OutputStorageType>
00056   {
00057   public:
00058     GradientSobel3x3();
00059
00060     GradientSobel3x3(Param & para, const std::string& postfix="");
00061
00062     GradientSobel3x3(Param & para, const int grp, const std::string& postfix);
00063
00064     virtual ~GradientSobel3x3();
00065
00066     /** returns a 2 channel image containing gx and gy
00067         @author woelk 12/2004, untested */
00068     virtual int Filter(const Image<InputStorageType>& src,
00069                        Image<OutputStorageType>& grad);
00070
00071     virtual int Filter(const Image<InputStorageType>& src,
00072                        Image<OutputStorageType>& gx,
00073                        Image<OutputStorageType>& gy);
00074
00075     virtual int Filter(const Image<InputStorageType>& src,
00076                        Image<OutputStorageType>& gx,
00077                        Image<OutputStorageType>& gy,
00078                        Image<OutputStorageType>& absg);
00079
00080   protected:
00081     /// @brief sets the sobel kernel for the convolution object
00082     void InitKernel_();
00083
00084     /// computation object to execute the convolution
00085     Convolution<InputStorageType, OutputStorageType> _Conv;
00086
00087     /// uses CONV_FLOAT for calculation
00088     int Sobel3x3GreyValidFloat_(const Image<InputStorageType>& src,
00089                                 Image<OutputStorageType>& gWE,
00090                                 Image<OutputStorageType>& gNS);
00091
00092     /// uses CONV_INT for calculation
00093     int Sobel3x3GreyValidInt_(const Image<InputStorageType>& src,
00094                               Image<OutputStorageType>& gWE,
00095                               Image<OutputStorageType>& gNS);
00096
00097     /** Repeats the border pixel infinitly in direction perpendicular to
00098         the border to achieve destination image ROIs of same size as
00099         source image ROIs. Untested !!
00100         @author woelk 07/2005 */
00101     int Sobel3x3GreySameFloat_(const Image<InputStorageType>& src,
00102                                Image<OutputStorageType>& gWE,
00103                                Image<OutputStorageType>& gNS);
00104
00105     CONV_FLOAT **_fwork, **_fwork2;
00106     CONV_INT **_iwork, **_iwork2;
00107
00108     int _InternalMemWidth;
00109     int _InternalMemHeight;
00110
00111     void _DeleteInternalMem();
00112     /** deletes _work1 and _work2 and sets _InternalMemSize */
00113     void _AllocInternalMem(const int width, const int height);
00114
00115     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00116
00117   }; // class
00118
00119 } // namsepace
00120
00121 #endif // __GradientSobel3x3_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GSL.cpp Source File

MathAlgo

GSL.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "bias_config.h"
00026 #include <MathAlgo/GSL.hh>
00027
00028 #ifdef BIAS_HAVE_GSL
00029 #include <gsl/gsl_cdf.h>
00030 #include <gsl/gsl_randist.h>
00031 #include <gsl/gsl_sf_gamma.h>
00032
00033 double
00034 BIAS::ChiSquareCulmProbFun(double x, int deg_freedom)
00035 {
00036   return gsl_cdf_chisq_P(x, deg_freedom);
00037 }
00038
00039 double
00040 BIAS::InvChiSquareCulmProbFun(double x, int deg_freedom)
00041 {
00042   return gsl_cdf_chisq_Pinv(x, deg_freedom);
00043 }
00044
00045 double
00046 BIAS::Gamma(double x)
00047 {
00048   return gsl_sf_gamma (x);
00049 }
00050
00051 double
00052 BIAS::InvGamma(double x)
00053 {
00054   return gsl_sf_gammainv (x);
00055 }
00056
00057 double
00058 BIAS::BetaDistribution(double a, double b, double x)
00059 {
00060   return gsl_ran_beta_pdf(x, a, b);
00061 }
00062
00063 #endif // BIAS_HAVE_GSL
00064
00065
00066
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/GSL.hh Source File

MathAlgo

GSL.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __GSL_hh__
00026 #define __GSL_hh__
00027
00028 #include <bias_config.h>
00029
00030 namespace BIAS{
00031
00032 #ifndef BIAS_HAVE_GSL
00033 #error recompile BIAS with gsl support enabled
00034 #else
00035
00036   /** @addtogroup mathalgo
00037       @brief C++ Wrappers for gnu scientific library (GSL)
00038       @author woelk 02/2006 */
00039   BIASMathAlgo_EXPORT
00040   double ChiSquareCulmProbFun(double x, int deg_freedom);
00041
00042   /** @addtogroup mathalgo
00043       @brief C++ Wrappers for gnu scientific library (GSL)
00044       @author woelk 02/2006 */
00045   BIASMathAlgo_EXPORT
00046   double InvChiSquareCulmProbFun(double x, int deg_freedom);
00047
00048   /** @addtogroup mathalgo
00049       @brief C++ Wrappers for gnu scientific library (GSL)
00050       \Gamma(x) = \int_0^\infty dt  t^{x-1} \exp(-t)
00051       The gamma function, x cannot be greater than 171.0 and x cannot be
00052       a negative integer
00053       @author woelk 02/2006 */
00054   BIASMathAlgo_EXPORT
00055   double Gamma(double x);
00056
00057   /** @addtogroup mathalgo
00058       @brief C++ Wrappers for gnu scientific library (GSL)
00059       1/Gamma(x)
00060       @author woelk 02/2006 */
00061   BIASMathAlgo_EXPORT
00062   double InvGamma(double x);
00063
00064   /** @addtogroup mathalgo
00065       @brief C++ Wrappers for gnu scientific library (GSL)
00066       p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx
00067       for 0 <= x <= 1.
00068       @author woelk 02/2006 */
00069   BIASMathAlgo_EXPORT
00070   double BetaDistribution(double a, double b, double x);
00071
00072
00073 #endif // BIAS_HAVE_GSL
00074
00075 } // namespace
00076 #endif // __GSL_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiBase.cpp Source File

Gui

GuiBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "GuiBase.hh"
00026
00027 #ifndef  WIN32
00028 //no unistd in WIN32 by default
00029 #  include <unistd.h>
00030 //#  include <pthread.h>
00031 #endif //WIN32
00032
00033 #include <Base/Image/ImageConvert.hh>
00034
00035 #include <Base/Common/BIASpragma.hh>
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040
00041
00042 // instantiations for ConvertToUC_
00043 template int GuiBase::ConvertToUC_<float>(Image<float>& image, float, float);
00044 #ifdef BUILD_IMAGE_CHAR
00045 template int GuiBase::ConvertToUC_<char>(Image<char>& image, float, float);
00046 #endif
00047
00048 #ifdef BUILD_IMAGE_DOUBLE
00049 template int GuiBase::ConvertToUC_<double>(Image<double>& image, float, float);
00050 #endif
00051
00052 #ifdef BUILD_IMAGE_UINT
00053 template int GuiBase::ConvertToUC_<unsigned int>(Image<unsigned int>& image,
00054                          float, float);
00055 #endif
00056
00057 #ifdef BUILD_IMAGE_INT
00058 template int GuiBase::ConvertToUC_<int>(Image<int>& image, float, float);
00059 #endif
00060
00061 #ifdef BUILD_IMAGE_SHORT
00062 template int GuiBase::ConvertToUC_<short int>(Image<short int>& image,
00063                           float, float);
00064 #endif
00065
00066 #ifdef BUILD_IMAGE_USHORT
00067 template int GuiBase::ConvertToUC_<unsigned short>(Image<unsigned short>& image
00068                            , float, float);
00069 #endif
00070
00071
00072
00073 // instantiate static stuff
00074   pthread_mutex_t GuiBase::MouseButtonMutex_;
00075
00076 bool GuiBase::BaseInitialized_=false;
00077
00078 GuiBase::GuiBase(bool ShowMousePos) : Debug()
00079 {
00080   Init_(ShowMousePos);
00081 }
00082
00083 GuiBase::GuiBase(const string& Title,bool ShowMousePos) :Debug()
00084 {
00085   Init_(ShowMousePos);
00086   Title_=Title;
00087 }
00088
00089 GuiBase::GuiBase(const GuiBase& gui) :Debug()
00090 {
00091   Init_(gui.ShowMouse_);
00092   Title_=gui.Title_;
00093 }
00094
00095
00096 GuiBase::~GuiBase()
00097 {}
00098
00099
00100
00101 void GuiBase::Init_(bool ShowMousePos)
00102 {
00103   WindowCreated_=false;
00104   Width_=0;
00105   Height_=0;
00106   nChannels_=0;
00107   Title_="Window";
00108   KeyBuffer_=-1;
00109   ShowMouse_ = ShowMousePos;
00110   MouseButtonPressed_ = MouseButtonReleased_ = -1;
00111   MouseButtonPressX_ = MouseButtonPressY_ = -1;
00112   MouseButtonReleaseX_ = MouseButtonReleaseY_ = -1;
00113   Factor_ = 1;
00114   XOffset_ = YOffset_ = 0;
00115   if (!BaseInitialized_){
00116     pthread_mutex_init(&MouseButtonMutex_, NULL);
00117     BaseInitialized_ = true;
00118   }
00119   IsPyramid_=false;
00120   Pyramid0Width_=Pyramid0Height_=PyramidLevels_=0;
00121 }
00122
00123 void GuiBase::SetFactorOffset(int xoffset, int yoffset, int factor)
00124 {
00125   XOffset_ = xoffset;
00126   YOffset_ = yoffset;
00127   Factor_ = factor;
00128 }
00129
00130 void GuiBase::GetFactorOffset(int& xoffset, int& yoffset, int& factor)
00131 {
00132   xoffset = XOffset_;
00133   yoffset = YOffset_;
00134   factor = Factor_;
00135 }
00136
00137 //#include <Base/Image/ImageIO.hh>
00138
00139 int GuiBase::ShowImage(ImageBase& image, float min, float max)
00140 {
00141
00142   if (IsPyramid_>0) IsPyramid_--;
00143   //cout <<"GuiBase::ShowImage() "<< IsPyramid_<<endl;
00144   OrigPicture_ = image;
00145   int result=0;
00146   switch(image.GetStorageType()){
00147   case ImageBase::ST_unsignedchar:
00148     {
00149       Image<unsigned char> img;
00150       img.StealImage(image);
00151
00152       if (img.GetColorModel() == ImageBase::CM_RGB)
00153         result=ShowConvertedImage_(img);
00154       else {
00155         Image<unsigned char> rgbimage;
00156         ImageConvert::Convert(img,rgbimage,ImageBase::CM_RGB);
00157         result=ShowConvertedImage_(rgbimage);
00158       }
00159       image.StealImage(img);
00160     }
00161     break;
00162   case ImageBase::ST_float:
00163     {
00164       Image<float> img;
00165       img.StealImage(image);
00166       result=ConvertToUC_(img,min,max);
00167       image.StealImage(img);
00168     }
00169     break;
00170 #ifdef BUILD_IMAGE_USHORT
00171   case ImageBase::ST_unsignedshortint:
00172     {
00173       Image<unsigned short int> img;
00174       img.StealImage(image);
00175       result=ConvertToUC_(img, min, max);
00176       image.StealImage(img);
00177     }
00178     break;
00179 #endif
00180 #ifdef BUILD_IMAGE_CHAR
00181   case ImageBase::ST_char:
00182     {
00183       Image<char> img;
00184       img.StealImage(image);
00185       result=ConvertToUC_(img,min,max);
00186       image.StealImage(img);
00187     }
00188     break;
00189 #endif
00190 #ifdef BUILD_IMAGE_SHORT
00191   case ImageBase::ST_shortint:
00192     {
00193       Image<short int> img;
00194       img.StealImage(image);
00195       result=ConvertToUC_(img,min,max);
00196       image.StealImage(img);
00197     }
00198     break;
00199 #endif
00200 #ifdef BUILD_IMAGE_INT
00201   case ImageBase::ST_int:
00202     {
00203       Image<int> img;
00204       img.StealImage(image);
00205       result=ConvertToUC_(img,min,max);
00206       image.StealImage(img);
00207     }
00208     break;
00209 #endif
00210 #ifdef BUILD_IMAGE_UINT
00211   case ImageBase::ST_unsignedint:
00212     {
00213       Image<unsigned int> img;
00214       img.StealImage(image);
00215       result=ConvertToUC_(img,min,max);
00216       image.StealImage(img);
00217     }
00218     break;
00219      break;
00220 #endif
00221 #ifdef BUILD_IMAGE_DOUBLE
00222   case ImageBase::ST_double:
00223     {
00224       Image<double> img;
00225       img.StealImage(image);
00226       result=ConvertToUC_(img,min,max);
00227       image.StealImage(img);
00228     }
00229     break;
00230 #endif
00231   default:
00232
00233     BIASERR("invalid storage type: "<<int(image.GetStorageType()) );
00234
00235     return -1;
00236     break;
00237   }
00238   return result;
00239 }
00240
00241 template <class PixelType>
00242 int GuiBase::ConvertToUC_(Image<PixelType> &image, float min, float max)
00243 {
00244 //   cout <<"GuiBase::ConvertToUC_()"<<endl;
00245     Image<PixelType> tmpimage;
00246     tmpimage = image;
00247     tmpimage.ScaleShiftBetween(min, max);
00248     Image<unsigned char> ucimage, rgbimage;
00249     ImageConvert::ConvertST(tmpimage, ucimage, ImageBase::ST_unsignedchar);
00250     ImageConvert::Convert(ucimage, rgbimage, ImageBase::CM_RGB);
00251     return ShowConvertedImage_(rgbimage);
00252 }
00253
00254 int GuiBase::ShowImage(PyramidImage<float>& pim)
00255 {
00256   Param para;
00257   PyramidImage<float> tmp(para);
00258   tmp=pim;
00259   PyramidImage<unsigned char> im(para);
00260   im.Init(pim[0]->GetWidth(), pim[0]->GetHeight() , pim.size());
00261   for (unsigned p=0; p<pim.size(); p++){
00262     tmp[p]->ScaleShiftBetween(0, 255);
00263     if (ImageConvert::ConvertST(*tmp[p], *im[p],
00264                                 ImageBase::ST_unsignedchar)!=0){
00265       BIASERR("error converting image");
00266     }
00267   }
00268   return ShowImage(im);
00269 }
00270
00271 int GuiBase::ShowImage(PyramidImage<unsigned char> &pim)
00272 {
00273   Pyramid0Width_=pim[0]->GetWidth();
00274   Pyramid0Height_=pim[0]->GetHeight();
00275   PyramidLevels_ = pim.size();
00276   IsPyramid_=2;
00277   Image<unsigned char> im;
00278   pim.GetSingleImage(im);
00279   return ShowImage(im);
00280 }
00281
00282 int GuiBase::ShowConvertedImage_(Image<unsigned char> &image)
00283 {
00284   BIASERR("GuiBase::ShowConvertedImage_() must be overloaded!!");
00285   return -1;
00286 }
00287
00288 int GuiBase::DestroyWindow()
00289 {
00290   BIASERR("GuiBase::DestroyWindow() must be overloaded!!");
00291   return -1;
00292 }
00293
00294 void GuiBase::SetTitle(string const& Title)
00295 {
00296   BIASERR("GuiBase::SetTitle() must be overloaded!!");
00297   return ;
00298 }
00299
00300
00301 bool GuiBase::CheckForEvent(bool& KeyEvent, char& key, bool& Pressed,
00302                         int& Button, int& Xpos, int& Ypos)
00303 {
00304   char tmp;
00305   if (CheckForMouseButtonEvent(Pressed, Button, Xpos, Ypos)){
00306     KeyEvent=false;
00307     return true;
00308   } else if ((tmp=CheckForKeyEvent()) != -1){
00309     key=tmp;
00310     KeyEvent=true;
00311     return true;
00312   }
00313   return false;
00314 }
00315
00316 void GuiBase::WaitForEvent(bool& KeyEvent, char& key, bool& Pressed,
00317                        int& Button, int& Xpos, int& Ypos)
00318 {
00319   key = -1;
00320   Button = -1;
00321   Xpos = Ypos = -1;
00322   while (WindowCreated_ && (key = CheckForKeyEvent()) == -1 &&
00323     !CheckForMouseButtonEvent(Pressed, Button, Xpos, Ypos)){
00324     #ifdef   WIN32
00325       Sleep(1000);
00326     #else  //not WIN32
00327       usleep(10000);
00328     #endif //WIN32
00329   }
00330   if (key == -1)
00331     KeyEvent = false;
00332   else
00333     KeyEvent = true;
00334 }
00335
00336 bool GuiBase::CheckForEvent(char& key, bool& Pressed, int& Button,
00337             int& Xpos, int& Ypos)
00338 {
00339   key = CheckForKeyEvent();
00340   Button = -1;
00341   Xpos = Ypos = -1;
00342   return (CheckForMouseButtonEvent(Pressed, Button, Xpos, Ypos) || (key!=-1));
00343 }
00344
00345 char GuiBase::CheckForKeyEvent()
00346 {
00347     char Key;
00348     if (KeyBuffer_ != -1){
00349     Key=KeyBuffer_;
00350     KeyBuffer_=-1;
00351     return Key;
00352     }
00353     return KeyBuffer_;
00354 }
00355
00356
00357 char GuiBase::WaitForKeyEvent()
00358 {
00359   BIASDOUT(D_GUI_KEY,"WaitForKeyEvent()");
00360   char Key;
00361   while (WindowCreated_ && KeyBuffer_==-1){
00362     #ifdef   WIN32
00363       Sleep(1000);
00364     #else  //not WIN32
00365       usleep(10000);
00366     #endif //WIN32
00367   }
00368   Key=KeyBuffer_;
00369   KeyBuffer_=-1;
00370   BIASDOUT(D_GUI_KEY,"WaitForKeyEvent() : key pressed : "<<Key);
00371   return Key;
00372 }
00373
00374 bool GuiBase::CheckForMouseButtonEvent(bool& Pressed, int& Button,
00375                      int& Xpos, int& Ypos)
00376 {
00377   bool result=false;
00378   BIAS_MUTEX_LOCK(&MouseButtonMutex_);
00379   if (MouseButtonPressed_ == -1 && MouseButtonReleased_ == -1){
00380     result = false;
00381   } else {
00382     result = true;
00383     if (MouseButtonPressed_ != -1){
00384       Pressed = true;
00385       Button = MouseButtonPressed_;
00386       Xpos = MouseButtonPressX_;
00387       Ypos = MouseButtonPressY_;
00388       MouseButtonPressX_ = MouseButtonPressY_ = -1;
00389       MouseButtonPressed_ = -1;
00390     } else {
00391       Pressed = false;
00392       Button = MouseButtonReleased_;
00393       Xpos = MouseButtonReleaseX_;
00394       Ypos = MouseButtonReleaseY_;
00395       MouseButtonReleaseX_ = MouseButtonReleaseY_ = -1;
00396       MouseButtonReleased_ = -1;
00397     }
00398   }
00399   BIAS_MUTEX_UNLOCK(&MouseButtonMutex_);
00400   return result;
00401 }
00402
00403 void GuiBase::WaitForMouseButtonEvent(bool& Pressed, int& Button,
00404                                       int& Xpos, int& Ypos)
00405 {
00406   BIAS_MUTEX_LOCK(&MouseButtonMutex_);
00407   while (WindowCreated_ && MouseButtonPressed_ == -1 &&
00408          MouseButtonReleased_ == -1){
00409     BIAS_MUTEX_UNLOCK(&MouseButtonMutex_);
00410     #ifdef   WIN32
00411        Sleep(1000);
00412     #else  //not WIN32
00413        usleep(10000);
00414     #endif //WIN32
00415     BIAS_MUTEX_LOCK(&MouseButtonMutex_);
00416   }
00417   if (MouseButtonPressed_ != -1){
00418     Pressed = true;
00419     Button = MouseButtonPressed_;
00420     Xpos = MouseButtonPressX_;
00421     Ypos = MouseButtonPressY_;
00422     MouseButtonPressX_ = MouseButtonPressY_ = -1;
00423     MouseButtonPressed_ = -1;
00424     BIASCDOUT(D_GUI_MOUSE_BUTTON, "pressed at ("<<Xpos<<", "<<Ypos<<")"<<endl);
00425   } else {
00426     Pressed = false;
00427     Button = MouseButtonReleased_;
00428     Xpos = MouseButtonReleaseX_;
00429     Ypos = MouseButtonReleaseY_;
00430     MouseButtonReleaseX_ = MouseButtonReleaseY_ = -1;
00431     MouseButtonReleased_ = -1;
00432     BIASCDOUT(D_GUI_MOUSE_BUTTON, "released at ("<<Xpos<<", "<<Ypos<<")"<<endl);
00433   }
00434   BIAS_MUTEX_UNLOCK(&MouseButtonMutex_);
00435 }
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiBase.hh Source File

Gui

GuiBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // TODO: create a simple GuiCV (see WrapBias2Ipl and highui for this (jw)
00026
00027 #ifndef __GuiBase_hh__
00028 #define __GuiBase_hh__
00029
00030 #include <bias_config.h>
00031
00032 #ifndef BIAS_HAVE_PTHREADS
00033 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::GuiBase needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00034 #endif
00035 #include <pthread.h>
00036
00037 #include <fstream>
00038 #include <string>
00039
00040 #include <Base/Debug/Debug.hh>
00041 #include <Base/Debug/Error.hh>
00042 #include <Base/Image/Image.hh>
00043 #include <Image/PyramidImage.hh>
00044
00045 /// SetDebugLevel uses the following flags
00046 #define D_GUI_DESTRUCT     0x0001
00047 #define D_GUI_MAIN         0x0002
00048 #define D_GUI_SIGNAL       0x0004
00049 #define D_GUI_KEY          0x0008
00050 #define D_GUI_MUTEX        0x0010
00051 #define D_GUI_MOUSE_BUTTON 0x0020
00052
00053 //#define BIAS_MUTEX_DEBUG
00054 #ifdef BIAS_MUTEX_DEBUG
00055 #define BIAS_MUTEX_LOCK(arg)\
00056       cerr <<__FILE__<<":"<<__LINE__<<" attempting to lock mutex .. "<<#arg;\
00057       cerr.flush();\
00058       pthread_mutex_lock(arg);\
00059       cerr <<" .. got lock\n";
00060
00061 #define BIAS_MUTEX_UNLOCK(arg)\
00062       cerr <<__FILE__<<":"<<__LINE__<<" unlocking mutex .. "<<#arg;\
00063       cerr.flush();\
00064       pthread_mutex_unlock(arg);\
00065       cerr <<" .. unlocked\n";
00066 #else
00067  #define BIAS_MUTEX_LOCK(arg) pthread_mutex_lock(arg);
00068  #define BIAS_MUTEX_UNLOCK(arg) pthread_mutex_unlock(arg);
00069 #endif
00070
00071 namespace BIAS{
00072   /** @class GuiBase
00073       @brief Gui is a simple windowing environment...
00074
00075       This is a base class and should not be used directly.
00076   */
00077   class BIASGui_EXPORT GuiBase : public Debug
00078   {
00079   public:
00080     GuiBase(bool ShowMousePos = true);
00081
00082     /// as standard constructor, also sets Title_
00083     GuiBase(std::string const& Title,bool ShowMousePos = true);
00084
00085     GuiBase(const GuiBase& gui);
00086
00087     virtual ~GuiBase();
00088
00089     virtual void SetTitle(std::string const& Title);
00090
00091     std::string GetTitle(){return Title_;};
00092
00093     /// stops the gtk_main loop and closes the window
00094     virtual int DestroyWindow();
00095
00096     /** @brief shows/updates the image shown in window.
00097
00098         This method accepts all different template instances and
00099         converts them to unsigned char before calling
00100         ShowConvertedImage_()    */
00101     virtual int ShowImage(ImageBase &image,float min=0.0,float max=255.0);
00102
00103     virtual int ShowImage(PyramidImage<unsigned char> &pim);
00104     virtual int ShowImage(PyramidImage<float> &pim);
00105
00106
00107     /** @brief checks if any key is pressed and returns it
00108         returns -1 i fo no key is pressed
00109         @author Felix Woelk */
00110     virtual char CheckForKeyEvent();
00111
00112     /** waits until a key is pressed and returns it
00113         @status tested
00114         @author Felix Woelk */
00115     virtual char WaitForKeyEvent();
00116
00117     inline int GetMouseX(){ return MousePosX_;};
00118     inline int GetMouseY(){ return MousePosY_;};
00119
00120     /** @brief waits until any mouse button is pressed or released
00121
00122         Xpos and Ypos are set to the coordinates within the drawing area
00123         Pressed is set to true if the button was pressed and to false if the
00124         button was released
00125         Button is set to th mouse button no: 1 = left, 2 = middle, 3 = right */
00126     virtual void WaitForMouseButtonEvent(bool& Pressed, int& Button,
00127                      int& Xpos, int& Ypos);
00128
00129     /** return true if mouse button is pressed or released, false else
00130         see WaitForMouseButtonEvent for detailed description */
00131     virtual bool CheckForMouseButtonEvent(bool& Pressed, int& Button,
00132                       int& Xpos, int& Ypos);
00133
00134     /** waits for either KeyEvent or MouseButtonEvent, KeyEvent is set to true
00135         if key is pressed, the other variables are set as in
00136         WaitForKeyEvent and WaitForMouseButtonEvent */
00137     virtual void WaitForEvent(bool& KeyEvent, char& key, bool& Pressed,
00138                   int& Button, int& Xpos, int& Ypos);
00139
00140     /** as above but does return immediate with true if event occured */
00141     virtual bool CheckForEvent(bool& KeyEvent, char& key, bool& Pressed,
00142                    int& Button,int& Xpos, int& Ypos);
00143
00144     /** as above but does return immediate with true if event occured
00145         if key != -1 key event occured, if Xpos != -1 && YPos != -1
00146         MouseButton Event occured, also both is possible */
00147     virtual bool CheckForEvent(char& key, bool& Pressed, int& Button,
00148                        int& Xpos, int& Ypos);
00149
00150
00151     /** sets offset and factor for mouse position
00152         mouse position in (e.g. zoomed) window is calculated as follows:
00153         x = real_xpos/factor + xoffset;
00154         y = real_ypos/factor + yoffset;
00155         real_x/ypos are in the window coordinate system */
00156     virtual void SetFactorOffset(int xoffset, int yoffset, int factor);
00157
00158     /** gets offset and factor for mouse position
00159         mouse position in (e.g. zoomed) window is calculated as follows:
00160         x = real_xpos/factor + xoffset;
00161         y = real_ypos/factor + yoffset;
00162         real_x/ypos are in the window coordinate system */
00163     virtual void GetFactorOffset(int& xoffset, int& yoffset, int& factor);
00164     /** returns true if window is closed by user via x button
00165         @author woelk 05/2003 */
00166     inline bool Closed()
00167     { return !WindowCreated_; }
00168
00169   protected:
00170
00171     /** Set up thread and stuff. Must be overloaded
00172         Derived class::Init_() should call GuiBase::Init_()
00173         first.
00174     */
00175     virtual void Init_(bool ShowMousePos);
00176
00177     /// Does the real update of the image shown in window. Must be overloaded
00178     virtual int ShowConvertedImage_(Image<unsigned char> &image);
00179
00180
00181     bool ShowMouse_; // shall mouse position be shown?
00182     bool WindowCreated_;
00183     /// if the following 3 variables are set , Buffer_ is already allocated
00184     unsigned int Width_;
00185     unsigned int Height_;
00186     unsigned int nChannels_;
00187     unsigned int Pyramid0Width_;
00188     unsigned int Pyramid0Height_;
00189     unsigned int PyramidLevels_;
00190
00191     int MousePosX_;
00192     int MousePosY_;
00193     int MouseButtonPressed_;
00194     int MouseButtonPressX_;
00195     int MouseButtonPressY_;
00196     int MouseButtonReleased_;
00197     int MouseButtonReleaseX_;
00198     int MouseButtonReleaseY_;
00199
00200     /// This is the original representation of the picture
00201     ImageBase OrigPicture_;
00202
00203     std::string Title_;
00204     char KeyBuffer_;
00205     int Factor_; // zoom factor for mouse position
00206     int XOffset_, YOffset_; // offset for mouse position
00207     int IsPyramid_; // set to 1 if PryramidImage is displayed, else to zero
00208
00209     static pthread_mutex_t MouseButtonMutex_;
00210     static bool BaseInitialized_;
00211
00212     template <class PixelType>
00213     int ConvertToUC_(Image<PixelType> &image,float min, float max);
00214
00215     /// test if internal variables Width_, Height_ and nChannels_
00216     /// are set correct for image
00217     /// these 3 variables are used as an indicator if Buffer_ is
00218     /// allocated in right size
00219     inline bool TestImage_(Image<unsigned char> &image)
00220     { return ( ( Width_ == image.GetWidth() ) &&
00221                ( Height_ == image.GetHeight() ) &&
00222                ( nChannels_ == image.GetChannelCount() ) ); };
00223
00224   };
00225
00226 } // namepsace BIAS
00227 #endif // __Gui_hh__
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiEnhanced.cpp Source File

Gui

GuiEnhanced.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "GuiEnhanced.hh"
00027
00028 #include <unistd.h>
00029 #include <Base/Image/Bresenham.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 GuiEnhanced::GuiEnhanced()
00035   : GuiGTK()
00036 {}
00037
00038
00039 GuiEnhanced::~GuiEnhanced()
00040 {}
00041
00042 void GuiEnhanced::GetZoomImage(unsigned int xpos, unsigned int ypos,
00043                                unsigned int factor, unsigned int size,
00044                                Image<unsigned char>& zoomimage)
00045 {
00046   if (!zoomimage.IsEmpty())
00047     zoomimage.Release();
00048   zoomimage.Init(2*factor*size+1, 2*factor*size+1, nChannels_);
00049
00050   register unsigned char **ida = zoomimage.GetImageDataArray();
00051   register unsigned int xstart, ystart;
00052   register unsigned char *source=new unsigned char[nChannels_];
00053
00054   for (register int x=(int)xpos-(int)size; x<(int)xpos+(int)size; x++){
00055     for (register int y=(int)ypos-(int)size; y<(int)ypos+(int)size; y++){
00056       if (x<0 || y<0 || x>=(int)Width_ || y>=(int)Height_)
00057         for (unsigned int i=0; i< nChannels_; i++)
00058           source[i] = 0;
00059       else
00060         for (unsigned int i=0; i< nChannels_; i++)
00061           source[i] = Buffer_[Width_*y*nChannels_+x*nChannels_+i];
00062       xstart = (x-xpos+size)*factor;
00063       ystart = (y-ypos+size)*factor;
00064       for (register int i=0; i<(int)factor; i++){
00065         for (register int j=0; j<(int)factor; j++){
00066           for (unsigned int c=0; c<nChannels_; c++){
00067             ida[ystart+i][xstart*nChannels_+j*nChannels_+c] = source[c];
00068           }
00069         }
00070       }
00071     }
00072   }
00073   delete[] source;
00074 }
00075
00076 void GuiEnhanced::GetZoomImage(unsigned int x, unsigned y, unsigned factor,
00077                                unsigned size, Image<unsigned char>& zoomimage,
00078                                int& xoffset, int& yoffset)
00079 {
00080   GetZoomImage(x, y, factor, size, zoomimage);
00081   if (IsPyramid_==0 || (x<Pyramid0Width_+PYRAMID_BORDER+(PYRAMID_BORDER>>1))){
00082     xoffset=x-size;
00083     yoffset=y-size;
00084     //cerr << "no pyramid: xoffset= "<<xoffset<<"\tyoffset= "<<yoffset<<endl;
00085   } else {
00086     xoffset = x-size-Pyramid0Width_-2*PYRAMID_BORDER;
00087     unsigned height = Pyramid0Height_>>1;
00088     int index = 1;
00089     while (y>height) {
00090       y=y-height-PYRAMID_BORDER;
00091       height=height<<1;
00092       index++;
00093     }
00094     //cerr << "index: "<<index<<"\txoffset= "<<xoffset<<"\tyoffset= "<<yoffset<<endl;
00095   }
00096 }
00097
00098 void GuiEnhanced::GetZoomImage(unsigned int xpos, unsigned int ypos,
00099                                unsigned int factor, unsigned int size,
00100                                ImageBase& zoomimage)
00101 {
00102   if (!zoomimage.IsEmpty())
00103     zoomimage.Release();
00104   zoomimage.Init(2*factor*size+1, 2*factor*size+1,
00105                  OrigPicture_.GetChannelCount(),
00106                  OrigPicture_.GetStorageType());
00107   register unsigned int xstart, ystart;
00108   unsigned stsize=OrigPicture_.GetDepth(), msize=stsize*OrigPicture_.GetChannelCount();
00109
00110   register char **ida = (char **)zoomimage.GetImageDataArray();
00111   register char *source=new char[size];
00112
00113   for (register int x=(int)xpos-(int)size; x<(int)xpos+(int)size; x++){
00114     for (register int y=(int)ypos-(int)size; y<(int)ypos+(int)size; y++){
00115       if (x<0 || y<0 || x>=(int)Width_ || y>=(int)Height_)
00116         for (unsigned int i=0; i< msize; i++)
00117           source[i] = 0;
00118       else
00119         for (unsigned int i=0; i< msize; i++)
00120           source[i] = ((char *)(OrigPicture_.GetImageData()))[Width_*y*msize+x*msize+i];
00121       xstart = (x-xpos+size)*factor;
00122       ystart = (y-ypos+size)*factor;
00123       for (register int i=0; i<(int)factor; i++){
00124         for (register int j=0; j<(int)factor; j++){
00125           for (unsigned int c=0; c<msize; c++){
00126             ida[ystart+i][xstart*msize+j*msize+c] = source[c];
00127           }
00128         }
00129       }
00130     }
00131   }
00132   delete[] source;
00133 }
00134
00135 void GuiEnhanced::GetZoomImage(unsigned int x, unsigned y, unsigned factor,
00136                                unsigned size, ImageBase& zoomimage,
00137                                int& xoffset, int& yoffset)
00138 {
00139   GetZoomImage(x, y, factor, size, zoomimage);
00140   if (IsPyramid_==0 || (x<Pyramid0Width_+PYRAMID_BORDER+(PYRAMID_BORDER>>1))){
00141     xoffset=x-size;
00142     yoffset=y-size;
00143     //    cerr << "no pyramid: xoffset= "<<xoffset<<"\tyoffset= "<<yoffset<<endl;
00144   } else {
00145     xoffset = x-size-Pyramid0Width_-2*PYRAMID_BORDER;
00146     unsigned height = Pyramid0Height_>>1;
00147     int index = 1;
00148     while (y>height) {
00149       y=y-height-PYRAMID_BORDER;
00150       height=height<<1;
00151       index++;
00152     }
00153     // cerr << "index: "<<index<<"\txoffset= "<<xoffset<<"\tyoffset= "<<yoffset<<endl;
00154   }
00155 }
00156
00157 int GuiEnhanced::SelectPoint(int point[2])
00158 {
00159   int result = 0;
00160   GuiGTK zoomgui;
00161   Image<unsigned char> zoomimage;
00162   bool pressed=false;
00163   int button=-1, x, y, xz, yz;
00164   unsigned int factor = 15, size = 15;
00165   int tmpx, tmpy;
00166
00167   while (pressed !=true)
00168     WaitForMouseButtonEvent(pressed, button, x, y);
00169   if (button==1){
00170     GetZoomImage(x, y, factor, size, zoomimage);
00171     zoomgui.SetFactorOffset(x-size, y-size, factor);
00172     zoomgui.ShowImage(zoomimage);
00173     button = -1;
00174     pressed = false;
00175     while (pressed!=true)
00176       zoomgui.WaitForMouseButtonEvent(pressed, button, xz, yz);
00177     if (button==1){
00178       tmpx = (int)x - (int)size + xz / (int)factor;
00179       tmpy = (int)y - (int)size + yz / (int)factor;
00180       if (tmpx < 0 || tmpx >= (int)Width_ || tmpy < 0 || tmpy >= (int)Height_){
00181         point[0] = point[1] = 0;
00182         BIASERR("invalid selection");
00183         result = -1;
00184       } else {
00185         point[0] = tmpx;
00186         point[1] = tmpy;
00187         result = 0;
00188       }
00189     } else { // not left mouse button, canceled selection
00190       result=-1;
00191     }
00192     zoomgui.DestroyWindow();
00193   } else { // not left mouse button, canceled selection
00194     result=-1;
00195   }
00196
00197   return result;
00198 }
00199
00200
00201 int GuiEnhanced::SelectRectangle(int upperleft[2],
00202                                  int lowerright[2])
00203 {
00204   int result = 0;
00205   bool pressed=false;
00206   int button=-1, lastx=0, lasty=0;
00207   bool again = true;
00208   int size = Width_ * Height_ * nChannels_;
00209   guchar *OrigBuffer = new guchar[size];
00210   unsigned int tl[2], br[2];
00211
00212   gdk_threads_enter();
00213   memcpy(OrigBuffer, Buffer_, size);
00214   gdk_threads_leave();
00215
00216   while (again){
00217     //     cerr << "start" << endl;
00218     again=false;
00219     int x, y;
00220     while (pressed != true || button != 1){
00221       pressed=false;
00222       button=-1;
00223
00224       WaitForMouseButtonEvent(pressed, button, x,
00225                               y);
00226 //       WaitForMouseButtonEvent(pressed, button, (int)upperleft[0],
00227 //                               (int)upperleft[1]);
00228       upperleft[0]=x;
00229       upperleft[1]=y;
00230     }
00231     //cerr << "first point: (" << x <<", "<<y<<")\n";
00232  //     cerr << "first point: (" << (int)upperleft[0] << ", "
00233 //          << (int)upperleft[1] <<")"<< endl;
00234
00235     pressed=false;
00236     button=-1;
00237     while (CheckForMouseButtonEvent(pressed, button, lowerright[0],
00238                                     lowerright[1]) || pressed != true){
00239       if (lastx != MousePosX_ || lasty != MousePosY_){
00240         gdk_threads_enter();
00241         memcpy(Buffer_, OrigBuffer, size);
00242         gdk_threads_leave();
00243         if ((int)upperleft[0]<MousePosX_){
00244           tl[0] = upperleft[0];
00245           br[0] = MousePosX_;
00246         } else {
00247           tl[0] = MousePosX_;
00248           br[0] = upperleft[0];
00249         }
00250         if ((int)upperleft[1]<MousePosY_){
00251           tl[1] = upperleft[1];
00252           br[1] = MousePosY_;
00253         } else {
00254           tl[1] = MousePosY_;
00255           br[1] = upperleft[1];
00256         }
00257
00258         DrawRectangle(tl, br);
00259         lastx = MousePosX_;
00260         lasty = MousePosY_;
00261       }
00262       usleep(1000);
00263     }
00264     //    cerr << "button: " << button << endl;
00265     if (button != 1){
00266       //cerr << "again" << endl;
00267       again=true;
00268     }
00269     gdk_threads_enter();
00270     memcpy(Buffer_, OrigBuffer, size);
00271     Redraw_();
00272     gdk_threads_leave();
00273   }
00274   upperleft[0]=tl[0];
00275   upperleft[1]=tl[1];
00276   lowerright[0]=br[0];
00277   lowerright[1]=br[1];
00278   return result;
00279 }
00280
00281
00282 int GuiEnhanced::SelectQuadrate(int upperleft[2],
00283                                 int lowerright[2])
00284 {
00285
00286   int result = 0;
00287   bool pressed=false;
00288   int button=-1, lastx=0, lasty=0;
00289   bool again = true;
00290   int size = Width_ * Height_ * nChannels_;
00291   guchar *OrigBuffer = new guchar[size];
00292   unsigned int tl[2], br[2];
00293
00294   gdk_threads_enter();
00295   memcpy(OrigBuffer, Buffer_, size);
00296   gdk_threads_leave();
00297
00298   while (again){
00299     //     cerr << "start" << endl;
00300     again=false;
00301
00302     while (pressed != true || button != 1){
00303       pressed=false;
00304       button=-1;
00305       WaitForMouseButtonEvent(pressed, button, upperleft[0],
00306                               upperleft[1]);
00307     }
00308
00309     //     cerr << "first point: (" << (int)upperleft[0] << ", "
00310     //   << (int)upperleft[1] <<")"<< endl;
00311
00312     pressed=false;
00313     button=-1;
00314     while (CheckForMouseButtonEvent(pressed, button, lowerright[0],
00315                                     lowerright[1]) || pressed != true){
00316       if (lastx != MousePosX_ || lasty != MousePosY_){
00317         gdk_threads_enter();
00318         memcpy(Buffer_, OrigBuffer, size);
00319         gdk_threads_leave();
00320
00321         int mp_x = MousePosX_;
00322         int mp_y = MousePosY_;
00323
00324         int rect_width = abs((int) upperleft[0] - mp_x);
00325         int rect_height= abs((int) upperleft[1] - mp_y);
00326
00327         // In every quadrant there are two possibilitiest for the
00328         // mouse point: Above or under the diagonal
00329
00330         // The mouse point is in ...
00331         if ((int) upperleft[0] < mp_x) {
00332           if ((int) upperleft[1] < mp_y) {
00333
00334             // ... quadrant IV
00335             tl[0] = upperleft[0];
00336             tl[1] = upperleft[1];
00337             if (rect_width < rect_height) {
00338               mp_y = (int) upperleft[1] + rect_width;
00339             } else {
00340               mp_x = (int) upperleft[0] + rect_height;
00341             }
00342             br[0] = mp_x;
00343             br[1] = mp_y;
00344           } else {
00345
00346             // ... quadrant I
00347             tl[0] = upperleft[0];
00348             br[1] = upperleft[1];
00349             if (rect_width < rect_height) {
00350               mp_y = (int) upperleft[1] - rect_width;
00351             } else {
00352               mp_x = (int) upperleft[0] + rect_height;
00353             }
00354             tl[1] = mp_y;
00355             br[0] = mp_x;
00356           }
00357         } else {
00358           if ((int) upperleft[1] < mp_y) {
00359
00360             // ... quadrant III
00361             tl[1] = upperleft[1];
00362             br[0] = upperleft[0];
00363             if (rect_width < rect_height) {
00364               mp_y = (int) upperleft[1] + rect_width;
00365             } else {
00366               mp_x = (int) upperleft[0] - rect_height;
00367             }
00368             tl[0] = mp_x;
00369             br[1] = mp_y;
00370           } else {
00371
00372             // ... quadrant II
00373             br[0] = upperleft[0];
00374             br[1] = upperleft[1];
00375             if (rect_width < rect_height) {
00376               mp_y = (int) upperleft[1] - rect_width;
00377             } else {
00378               mp_x = (int) upperleft[0] - rect_height;
00379             }
00380             tl[0] = mp_x;
00381             tl[1] = mp_y;
00382           }
00383         }
00384
00385         DrawRectangle(tl,br);
00386         lastx = MousePosX_;
00387         lasty = MousePosY_;
00388       }
00389       usleep(1000);
00390     }
00391     //    cerr << "button: " << button << endl;
00392     if (button != 1){
00393       //cerr << "again" << endl;
00394       again=true;
00395     }
00396     gdk_threads_enter();
00397     memcpy(Buffer_, OrigBuffer, size);
00398     Redraw_();
00399     gdk_threads_leave();
00400   }
00401   upperleft[0]=tl[0];
00402   upperleft[1]=tl[1];
00403   lowerright[0]=br[0];
00404   lowerright[1]=br[1];
00405   return result;
00406 } // SelectQuadrate
00407
00408 int GuiEnhanced::SelectLine(int start[2], int end[2])
00409 {
00410   int result=0;
00411   int size = Width_ * Height_ * nChannels_;
00412   guchar *OrigBuffer = new guchar[size];
00413   bool pressed=false;
00414   int button=-1;
00415   int last[2];
00416
00417   gdk_threads_enter();
00418   memcpy(OrigBuffer, Buffer_, size);
00419   gdk_threads_leave();
00420
00421   while (!pressed)
00422     WaitForMouseButtonEvent(pressed, button, start[0],
00423                 start[1]);
00424
00425   if (button==1){
00426     last[0]=start[0];
00427     last[1]=start[1];
00428     pressed=false;
00429     button=-1;
00430     while (!CheckForMouseButtonEvent(pressed, button, end[0],
00431                      end[1]) || pressed != true){
00432       if ((int)last[0] != MousePosX_ || (int)last[1] != MousePosY_){
00433     gdk_threads_enter();
00434     memcpy(Buffer_, OrigBuffer, size);
00435     gdk_threads_leave();
00436     last[0] = MousePosX_;
00437     last[1] = MousePosY_;
00438     DrawLine(start,last);
00439     gdk_threads_enter();
00440     Redraw_();
00441     gdk_threads_leave();
00442       }
00443       usleep(1000);
00444     }
00445     if (button!=1) {// wrong button while selecting end
00446       result=-1;
00447     }
00448   } else { // wrong button while selecting start
00449     result=-1;
00450   }
00451   gdk_threads_enter();
00452   memcpy(Buffer_, OrigBuffer, size);
00453   Redraw_();
00454   gdk_threads_leave();
00455   return result;
00456 }
00457
00458
00459 int GuiEnhanced::SelectLineZoom(int start[2],int end[2])
00460 {
00461   int result=0;
00462   int size = Width_ * Height_ * nChannels_;
00463   guchar *OrigBuffer = new guchar[size];
00464   bool pressed=false;
00465   int button=-1, xz, yz;;
00466   int last[2];
00467   GuiEnhanced zoomgui;
00468   Image<unsigned char> zoomimage;
00469   unsigned int factor=15, zoomsize=15;
00470   int tmpx, tmpy;
00471
00472   gdk_threads_enter();
00473   memcpy(OrigBuffer, Buffer_, size);
00474   gdk_threads_leave();
00475   if (SelectPoint(start)==0){
00476     last[0]=start[0];
00477     last[1]=start[1];
00478     pressed=false;
00479     button=-1;
00480     while (!CheckForMouseButtonEvent(pressed, button, end[0],
00481                      end[1]) || pressed != true){
00482       if ((int)last[0] != MousePosX_ || (int)last[1] != MousePosY_){
00483     gdk_threads_enter();
00484     memcpy(Buffer_, OrigBuffer, size);
00485     gdk_threads_leave();
00486     last[0] = MousePosX_;
00487     last[1] = MousePosY_;
00488
00489     DrawLine(start, last);
00490     gdk_threads_enter();
00491     Redraw_();
00492     gdk_threads_leave();
00493       }
00494       usleep(1000);
00495     }
00496     if (button==1) {
00497       gdk_threads_enter();
00498       memcpy(Buffer_, OrigBuffer, size);
00499       Redraw_();
00500       gdk_threads_leave();
00501       GetZoomImage(end[0], end[1], factor, zoomsize, zoomimage);
00502       zoomgui.SetFactorOffset(end[0]-zoomsize, end[1]-zoomsize, factor);
00503       zoomgui.ShowImage(zoomimage);
00504       button = -1;
00505       pressed = false;
00506       while (pressed!=true)
00507     zoomgui.WaitForMouseButtonEvent(pressed, button, xz, yz);
00508       if (button==1){
00509     tmpx = (int)end[0] - (int)zoomsize + xz / (int)factor;
00510     tmpy = (int)end[1] - (int)zoomsize + yz / (int)factor;
00511     //cerr << "end: " << end[0] << " " << end[1] << "  xz " << xz
00512     //<< " yz: " << yz << "  tmpx " << tmpx << "  tmpy " << tmpy << endl;
00513     if (tmpx < 0 || tmpx >= (int)Width_ || tmpy < 0 || tmpy >= (int)Height_){
00514       end[0] = end[1] = 0;
00515       BIASERR("invalid selection");
00516       result = -1;
00517     } else {
00518       end[0] = tmpx;
00519       end[1] = tmpy;
00520     }
00521       } else { // not left mouse button, canceled selection
00522     result=-1;
00523       }
00524       zoomgui.DestroyWindow();
00525     } else { // wrong button while selecting end
00526       result=-1;
00527     }
00528   } else { // wrong button while selecting start
00529     result=-1;
00530   }
00531   gdk_threads_enter();
00532   memcpy(Buffer_, OrigBuffer, size);
00533   Redraw_();
00534   gdk_threads_leave();
00535   return result;
00536 }
00537
00538 void GuiEnhanced::DrawRectangle(unsigned int tl[2], unsigned int br[2])
00539 {
00540   //cerr <<"draw rectangle ("<<tl[0]<<", "<<tl[1]<<") ("<<br[0]<<" ,"<<br[1]<<")   "<<nChannels_<<"\n";
00541
00542   switch(nChannels_){
00543   case 1:
00544     // top
00545     gdk_threads_enter();
00546     for (int i=0; i< (int)(br[0]-tl[0]); i++)
00547       Buffer_[tl[1]*Width_+tl[0]+i]=
00548         (Buffer_[tl[1]*Width_+tl[0]+i]>128)?((gchar)0):((gchar)255);
00549     // bottom
00550     for (int i=0; i< (int)(br[0]-tl[0]); i++)
00551       Buffer_[br[1]*Width_+tl[0]+i]=
00552         (Buffer_[br[1]*Width_+tl[0]+i]>128)?((gchar)0):((gchar)255);
00553     // left and right
00554     for (int i=0; i < (int)(br[1]-tl[1]); i++){
00555       Buffer_[(tl[1]+i)*Width_+tl[0]]=
00556         (Buffer_[(tl[1]+i)*Width_+tl[0]]>128)?((gchar)0):((gchar)255);
00557       Buffer_[(tl[1]+i)*Width_+br[0]]=
00558         (Buffer_[(tl[1]+i)*Width_+br[0]]>128)?((gchar)0):((gchar)255);
00559     }
00560     gdk_threads_leave();
00561     break;
00562   case 3:
00563     gdk_threads_enter();
00564     for (int i=0; i< (int)(br[0]-tl[0]); i++){
00565       for (int j=0; j<3; j++){
00566         Buffer_[tl[1]*Width_*3+tl[0]*3+i*3+j]=
00567           (Buffer_[tl[1]*Width_*3+tl[0]*3+i*3+j]>128)?((gchar)0):((gchar)255);
00568         Buffer_[br[1]*Width_*3+tl[0]*3+i*3+j]=
00569           (Buffer_[br[1]*Width_*3+tl[0]*3+i*3+j]>128)?((gchar)0):((gchar)255);
00570       }
00571     }
00572     // left and right
00573     for (int i=0; i< (int)(br[1]-tl[1]); i++){
00574       for (int j=0; j<3; j++){
00575         Buffer_[(tl[1]+i)*Width_*3+tl[0]*3+j]=
00576           (Buffer_[(tl[1]+i)*Width_*3+tl[0]*3+j]>128)?((gchar)0):((gchar)255);
00577         Buffer_[(tl[1]+i)*Width_*3+br[0]*3+j]=
00578           (Buffer_[(tl[1]+i)*Width_*3+br[0]*3+j]>128)?((gchar)0):((gchar)255);
00579       }
00580     }
00581     gdk_threads_leave();
00582     break;
00583   default:
00584     BIASERR("invalid channel count " << nChannels_);
00585     break;
00586   }
00587   gdk_threads_enter();
00588   Redraw_();
00589   gdk_threads_leave();
00590 }
00591
00592
00593 void GuiEnhanced::DrawLine(int start[2], int end[2])
00594 {
00595   int next[2];
00596   int adr;
00597   Bresenham bres(start, end);
00598   while (bres.GetNext(next)){
00599     adr=next[1]*Width_*nChannels_+next[0]*nChannels_;
00600     for (register unsigned int c=0; c<nChannels_ ; c++)
00601       Buffer_[adr+c]=(Buffer_[adr+c]>128)?((gchar)0):((gchar)255);
00602   }
00603   gdk_threads_enter();
00604   Redraw_();
00605   gdk_threads_leave();
00606 }
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiEnhanced.hh Source File

Gui

GuiEnhanced.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __GuiEnhanced_hh__
00027 #define __GuiEnhanced_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Image/Image.hh>
00031 #include "GuiGTK.hh"
00032
00033 #include "bias_config.h"
00034
00035 namespace BIAS{
00036   /** @class GuiEnhanced
00037       @ingroup g_gui
00038       @brief extended GuiGTK with zoom and marking options
00039
00040
00041   */
00042   class BIASGui_EXPORT GuiEnhanced : public GuiGTK
00043   {
00044   public:
00045     GuiEnhanced();
00046
00047     virtual ~GuiEnhanced();
00048
00049     void GetZoomImage(unsigned int x, unsigned int y, unsigned int factor,
00050                       unsigned int size, Image<unsigned char>& zoomimage);
00051
00052     void GetZoomImage(unsigned int x, unsigned int y, unsigned int factor,
00053                       unsigned int size, Image<unsigned char>& zoomimage,
00054                       int& xoffset, int& yoffset);
00055
00056     void GetZoomImage(unsigned int x, unsigned int y, unsigned int factor,
00057                       unsigned int size, ImageBase& zoomimage);
00058
00059     void GetZoomImage(unsigned int x, unsigned int y, unsigned int factor,
00060                       unsigned int size, ImageBase& zoomimage,
00061                       int& xoffset, int& yoffset);
00062
00063     int SelectPoint(int point[2]);
00064
00065     /** Select a rectangle using the mouse
00066         First LEFT button selects upper left corner
00067         Second LEFT button selects lower right corner
00068         Pressing the RIGHT cancels
00069         @param upperleft  Here the resulting upper left corner (x and y)
00070            is stored
00071         @param lowerright Here the resulting lower right corner (x and y)
00072            is stored
00073         @return Returns != 0 in case of error
00074     **/
00075     int SelectRectangle(int upperleft[2],int lowerright[2]);
00076
00077
00078     /** Select a quadrate using the mouse
00079         First LEFT button selects upper left corner
00080         Second LEFT button selects lower right corner
00081         (While moving the mouse the selecting box is adjusted to form a
00082         quadrate)
00083         Pressing the RIGHT button cancels
00084
00085         @param upperleft  Here the resulting upper left corner (x and y)
00086         is stored
00087         @param lowerright Here the resulting lower right corner (x and y)
00088         is stored
00089         @return Returns != 0 in case of error
00090         @author Ingo Thomsen**/
00091     int SelectQuadrate(int upperleft[2],int lowerright[2]);
00092
00093      /** select a line in actual image
00094         left mouse button to select start point
00095         left mouse button again to select end point
00096         any other button at any time cancels selection
00097         returns 0 if selection succesfull, negative value else
00098         @author fw */
00099     int SelectLine(int start[2], int end[2]);
00100
00101     /** select a line in actual image
00102         left mouse button to get zoom window for start point
00103         left mouse button in zoom window to select starting point
00104         same procedure for end point
00105         any other button at any time cancels selection
00106         returns 0 if selection succesfull, negative value else
00107         @author fw */
00108     int SelectLineZoom(int start[2],int end[2]);
00109
00110     /** draws a rectangle between tl and br using color
00111         the image buffer is not saved, it cannot be undone
00112         tl must be the top  left corner, br must be the bottom right corner */
00113     void DrawRectangle(unsigned int tl[2], unsigned int br[2]);
00114
00115     /** draws a line between start and end, no boundary checks
00116         the image buffer is not saved, it cannot be undone
00117         @author fw */
00118     void DrawLine(int start[2], int end[2]);
00119
00120   };
00121
00122 } // namespace
00123 #endif // __GuiEnhanced_hh__
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiGTK.cpp Source File

Gui

GuiGTK.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <bias_config.h>
00026 #ifndef BIAS_HAVE_PTHREADS
00027 #  error You need pthreads. please recompile BIAS with USE_PTHREADS.
00028 #endif // BIAS_HAVE_PTHREADS
00029
00030
00031 #include <unistd.h>
00032 #include <pthread.h>
00033 #include <sstream>
00034 #include "GuiGTK.hh"
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 bool GuiGTK::ThreadsInitialized_=false;
00040 bool GuiGTK::MainThreadRunning_=false;
00041 bool GuiGTK::GtkInitialized_=false;
00042 unsigned short GuiGTK::WindowCount_=0;
00043 pthread_t GuiGTK::MainThread_;
00044 pthread_mutex_t GuiGTK::MainThreadRunningMutex_;
00045 pthread_mutex_t GuiGTK::GtkInitializedMutex_;
00046 pthread_mutex_t GuiGTK::WindowCountMutex_;
00047 pthread_mutex_t GuiGTK::BufferMutex_;
00048
00049 /*
00050 #undef BIAS_MUTEX_LOCK
00051 #define BIAS_MUTEX_LOCK(arg)\
00052       cerr <<__FILE__<<":"<<__LINE__<<" attempting to lock mutex .. "<<#arg;\
00053       cerr.flush();\
00054       pthread_mutex_lock(arg);\
00055       cerr <<" .. got lock\n";
00056
00057 #undef BIAS_MUTEX_UNLOCK
00058 #define BIAS_MUTEX_UNLOCK(arg)\
00059       cerr <<__FILE__<<":"<<__LINE__<<" unlocking mutex .. "<<#arg;\
00060       cerr.flush();\
00061       pthread_mutex_unlock(arg);\
00062       cerr <<" .. unlocked\n";
00063 */
00064
00065
00066 GuiGTK::GuiGTK(bool ShowMousePos) : GuiBase(ShowMousePos)
00067 {
00068   Init_(ShowMousePos);
00069 }
00070
00071 GuiGTK::GuiGTK(const string& Title,bool ShowMousePos) : GuiBase(ShowMousePos)
00072 {
00073   Init_(ShowMousePos);
00074   Title_=Title;
00075 }
00076
00077 GuiGTK::GuiGTK(const GuiGTK& gui) : GuiBase(gui)
00078 {}
00079
00080 void GuiGTK::Init_(bool ShowMousePos)
00081 {
00082   GuiBase::Init_(ShowMousePos);
00083
00084   if (!ThreadsInitialized_){
00085     pthread_mutex_init(&MainThreadRunningMutex_, NULL);
00086     pthread_mutex_init(&GtkInitializedMutex_, NULL);
00087     pthread_mutex_init(&WindowCountMutex_, NULL);
00088     pthread_mutex_init(&BufferMutex_, NULL);
00089     ThreadsInitialized_=true;
00090   }
00091   Buffer_=NULL;
00092   Window_=NULL;
00093   DrawingArea_=NULL;
00094   Label_=NULL;
00095   Vbox_=NULL;
00096   //  SetDebugLevel(GetDebugLevel() | D_GUI_GDK);
00097   //AddDebugLevel(D_GUI_THREAD);
00098 }
00099
00100
00101
00102
00103 GuiGTK::~GuiGTK()
00104 {
00105     BIASDOUT(D_GUI_DESTRUCT, "GuiGTK destructor started");
00106     if (WindowCreated_){
00107       DestroyWindow();
00108     }
00109     BIASDOUT(D_GUI_DESTRUCT, "GuiGTK destructor finished");
00110     // gtk_widget_destroy(Window_);
00111 }
00112
00113 void GuiGTK::InitGtk_()
00114 {
00115   int argc1=2;
00116   char **argv1;
00117   argv1=new char*[3];
00118   argv1[0]="Window Title";
00119   argv1[1]="--sync";
00120   argv1[2]=NULL;
00121
00122   InitGtk(&argc1, &argv1);
00123   delete[] argv1;
00124 }
00125
00126 void GuiGTK::InitGtk(int *argc, char **argv[])
00127 {
00128   BIASCDOUT(D_GUI_THREAD, "InitGtk()"<<endl);
00129   /* init threads */
00130   g_thread_init(NULL);
00131 #if GTK_CHECK_VERSION(2,0,0)
00132   gdk_threads_init();
00133   //cerr << "using gtk2\n"<<GTK_MAJOR_VERSION<<endl;
00134 #endif
00135   // ?
00136   gtk_init(argc, argv);
00137   BIASCDOUT(D_GUI_GDK, "gdk_rgb_init ... "); BIASFLUSHDOUT;
00138   gdk_rgb_init();
00139   BIASCDOUT(D_GUI_GDK, " finished\n");
00140   BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00141   BIAS_MUTEX_LOCK(&GtkInitializedMutex_);
00142   BIASDOUT(D_GUI_MUTEX," .. got mutex");
00143   GtkInitialized_=true;
00144   BIAS_MUTEX_UNLOCK(&GtkInitializedMutex_);
00145 }
00146
00147
00148
00149
00150 void GuiGTK::SetTitle(string const& Title)
00151 {
00152   BIASCDOUT(D_GUI_THREAD, "SetTitle()"<<endl);
00153   gdk_threads_enter();
00154   if (WindowCreated_)
00155     gtk_window_set_title(GTK_WINDOW(Window_), Title.c_str());
00156   Title_=Title;
00157   gdk_threads_leave();
00158   return;
00159 }
00160
00161
00162 int GuiGTK::AllocateBuffer_(Image<unsigned char>& image)
00163 {
00164   BIASCDOUT(D_GUI_THREAD, "AllocateBuffer_()"<<endl);
00165     Width_ = image.GetWidth();
00166     Height_ = image.GetHeight();
00167     nChannels_ = image.GetChannelCount();
00168     BIAS_MUTEX_LOCK(&BufferMutex_);
00169     Buffer_ = new guchar[Width_ * Height_ * nChannels_];
00170     BIAS_MUTEX_UNLOCK(&BufferMutex_);
00171     return 0;
00172 }
00173
00174 int GuiGTK::FreeBuffer_()
00175 {
00176   BIASCDOUT(D_GUI_THREAD, "FreeBuffer_()"<<endl);
00177     Width_=0;
00178     Height_=0;
00179     nChannels_=0;
00180     BIAS_MUTEX_LOCK(&BufferMutex_);
00181     delete[] Buffer_;
00182     Buffer_=NULL;
00183     BIAS_MUTEX_UNLOCK(&BufferMutex_);
00184     return 0;
00185 }
00186
00187
00188
00189 int GuiGTK::CreateWindow_(Image<unsigned char> &image)
00190 {
00191   BIASCDOUT(D_GUI_THREAD, "CreateWindow_()"<<endl);
00192   BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00193   BIAS_MUTEX_LOCK(&GtkInitializedMutex_);
00194   BIASDOUT(D_GUI_MUTEX," .. got mutex");
00195   if (!GtkInitialized_){
00196     BIAS_MUTEX_UNLOCK(&GtkInitializedMutex_);
00197     InitGtk_(); }
00198   else
00199     BIAS_MUTEX_UNLOCK(&GtkInitializedMutex_);
00200   AllocateBuffer_(image);
00201
00202   Window_ = gtk_window_new (GTK_WINDOW_TOPLEVEL);
00203
00204   Vbox_ = gtk_vbox_new (FALSE, 5);
00205
00206   DrawingArea_ = gtk_drawing_area_new();
00207
00208   gtk_drawing_area_size (GTK_DRAWING_AREA (DrawingArea_),
00209              Width_, Height_);
00210
00211   Label_ = gtk_label_new("no mouse pointer information yet");
00212
00213   gtk_signal_connect (GTK_OBJECT (Window_), "delete_event",
00214               GTK_SIGNAL_FUNC (DeleteEvent_), this);
00215
00216   gtk_signal_connect (GTK_OBJECT (Window_), "destroy",
00217               GTK_SIGNAL_FUNC (Destroy_), this);
00218
00219   gtk_signal_connect(GTK_OBJECT (DrawingArea_), "expose-event",
00220              GTK_SIGNAL_FUNC(DrawingAreaExposeCallback_), this);
00221
00222 #if !GTK_CHECK_VERSION(0,0,0)
00223   gtk_signal_connect(GTK_OBJECT (Label_), "expose-event",
00224              GTK_SIGNAL_FUNC(LabelExposeCallback_), this);
00225 #endif
00226
00227   gtk_signal_connect(GTK_OBJECT(Window_), "key_press_event",
00228              GTK_SIGNAL_FUNC(KeyPressEventCallback_), this);
00229
00230   gtk_signal_connect(GTK_OBJECT(DrawingArea_), "motion_notify_event",
00231              GTK_SIGNAL_FUNC(MouseMotionCallback_), this);
00232
00233   gtk_signal_connect(GTK_OBJECT(DrawingArea_), "button_press_event",
00234              GTK_SIGNAL_FUNC(MouseButtonPressCallback_), this);
00235
00236   gtk_signal_connect(GTK_OBJECT(DrawingArea_), "button_release_event",
00237              GTK_SIGNAL_FUNC(MouseButtonReleaseCallback_), this);
00238
00239   gtk_widget_add_events(Window_, GDK_KEY_RELEASE_MASK);
00240
00241   gtk_widget_set_events (DrawingArea_, GDK_EXPOSURE_MASK
00242              | GDK_LEAVE_NOTIFY_MASK
00243              | GDK_BUTTON_PRESS_MASK
00244              | GDK_BUTTON_RELEASE_MASK
00245              | GDK_POINTER_MOTION_HINT_MASK
00246              | GDK_POINTER_MOTION_MASK);
00247
00248   gtk_container_add (GTK_CONTAINER (Window_), Vbox_);
00249
00250   gtk_box_pack_start(GTK_BOX (Vbox_), DrawingArea_, FALSE, FALSE, 0);
00251   if (ShowMouse_){
00252     gtk_box_pack_start(GTK_BOX (Vbox_), Label_, TRUE, FALSE, 5);
00253     //cerr << "adding label\n";
00254   }
00255
00256   gtk_widget_show_all (Window_);
00257
00258   BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00259   BIAS_MUTEX_LOCK(&MainThreadRunningMutex_);
00260   BIASDOUT(D_GUI_MUTEX," .. got mutex");
00261   if (!MainThreadRunning_){
00262     MainThreadRunning_=true;
00263     BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00264     pthread_create(&MainThread_ , NULL, GtkMain, this);
00265   } else
00266     BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00267
00268   WindowCreated_=true;
00269   BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00270   BIAS_MUTEX_LOCK(&WindowCountMutex_);
00271   BIASDOUT(D_GUI_MUTEX," .. got mutex");
00272   WindowCount_++;
00273   BIAS_MUTEX_UNLOCK(&WindowCountMutex_);
00274
00275   // cerr << "Create WindowCount_: " << WindowCount_ << endl;
00276
00277   SetTitle(Title_);
00278
00279   return 0;
00280 }
00281
00282
00283 int GuiGTK::DestroyWindow()
00284 {
00285   BIASCDOUT(D_GUI_THREAD, "DestroyWindow()"<<endl);
00286   if (WindowCreated_){
00287     WindowCreated_=false;
00288     BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00289     BIAS_MUTEX_LOCK(&WindowCountMutex_);
00290     BIASDOUT(D_GUI_MUTEX," .. got mutex");
00291     WindowCount_--;
00292     // cerr << "Destroy WindowCount_: " << WindowCount_ << endl;
00293     if (WindowCount_ == 0){
00294       BIASDOUT(D_GUI_SIGNAL, "no more windows, MainThreadRunning_=false");
00295       //gdk_threads_enter();
00296       //gtk_main_quit();
00297       //gdk_threads_leave();
00298       BIASDOUT(D_GUI_MUTEX,"waiting for mutex...");
00299       BIAS_MUTEX_LOCK(&MainThreadRunningMutex_);
00300       BIASDOUT(D_GUI_MUTEX," .. got mutex");
00301       if (MainThreadRunning_){
00302         MainThreadRunning_=false;
00303         BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00304         int res;
00305         if ((res=pthread_join(MainThread_, NULL))!=0){
00306           BIASERR("error joining thread "<<res);
00307         }
00308       } else {
00309         BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00310       }
00311     }
00312     BIAS_MUTEX_UNLOCK(&WindowCountMutex_);
00313
00314     if (DrawingArea_) { gtk_widget_destroy(DrawingArea_); DrawingArea_=NULL; }
00315     if (Label_) { gtk_widget_destroy(Label_); Label_=NULL; }
00316     if (Vbox_) { gtk_widget_destroy(Vbox_); Vbox_=NULL; }
00317     if (Window_) { gtk_widget_destroy(Window_); Window_=NULL; }
00318     //    gtk_widget_hide_all(Window_);
00319   }
00320
00321   if (IsAllocated_())
00322     FreeBuffer_();
00323
00324   return 0;
00325 }
00326
00327 int GuiGTK::ShowConvertedImage_(Image<unsigned char> &image)
00328 {
00329   BIASCDOUT(D_GUI_THREAD, "ShowConvertedImage_()"<<endl);
00330     if (!WindowCreated_)
00331       CreateWindow_(image);
00332     if (!TestImage_(image)){
00333       ReInitWindow_(image);
00334     }
00335     gdk_threads_enter();
00336     BIAS_MUTEX_LOCK(&BufferMutex_);
00337     memcpy(Buffer_, image.GetImageData(), image.GetSize());
00338     BIAS_MUTEX_UNLOCK(&BufferMutex_);
00339     Redraw_();
00340     gdk_threads_leave();
00341     return 0;
00342 }
00343
00344
00345 int GuiGTK::Redraw_()
00346 {
00347   BIASCDOUT(D_GUI_THREAD, "Redraw_()"<<endl);
00348   switch (nChannels_){
00349     case 1:
00350     BIAS_MUTEX_LOCK(&BufferMutex_);
00351     BIASCDOUT(D_GUI_GDK, "gray: "<<Width_<<"x"<<Height_); BIASFLUSHDOUT;
00352     gdk_draw_gray_image (DrawingArea_->window,
00353                          Window_->style->fg_gc[GTK_STATE_NORMAL],
00354                          0, 0, Width_, Height_,
00355                          GDK_RGB_DITHER_MAX, Buffer_, Width_ );
00356     BIASCDOUT(D_GUI_GDK, "   finished\n");
00357     BIAS_MUTEX_UNLOCK(&BufferMutex_);
00358     break;
00359     case 3:
00360     BIAS_MUTEX_LOCK(&BufferMutex_);
00361     BIASCDOUT(D_GUI_GDK, "rgb: "<<Width_<<"x"<<Height_); BIASFLUSHDOUT;
00362     gdk_draw_rgb_image (DrawingArea_->window,
00363                         Window_->style->fg_gc[GTK_STATE_NORMAL],
00364                         0, 0, Width_, Height_,
00365                         GDK_RGB_DITHER_MAX, Buffer_, Width_*3);
00366     BIASCDOUT(D_GUI_GDK, "   finished\n");
00367     BIAS_MUTEX_UNLOCK(&BufferMutex_);
00368     break;
00369     default:
00370     BIASERR(nChannels_
00371             << " channels not supported. Use grey or RGB image");
00372     //exit (-1);
00373     break;
00374     }
00375   return 0;
00376 }
00377
00378
00379 int GuiGTK::ReInitWindow_(Image<unsigned char>& image)
00380 {
00381   BIASCDOUT(D_GUI_THREAD, "ReInitWindow_()"<<endl);
00382   int res = 0;
00383   // cout << "reinitializing\n";
00384   if (IsAllocated_())
00385     FreeBuffer_();
00386   res = AllocateBuffer_(image);
00387   gtk_drawing_area_size (GTK_DRAWING_AREA (DrawingArea_),
00388              Width_, Height_);
00389   // gdk_window_resize(Window_, Width_, Height_);
00390   //  gtk_widget_show_all (Window_);
00391   return res;
00392 }
00393
00394
00395 void* GuiGTK::GtkMain(void* arg)
00396 {
00397   //cout << "thread id main: " << pthread_self() << endl;
00398 #ifdef BIAS_DEBUG
00399   GuiGTK *obj=(GuiGTK *)arg;
00400 #endif
00401   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00402                   "GtkMain()");
00403   bool Running_=true;
00404   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00405                   "waiting for mutex...");
00406   BIAS_MUTEX_LOCK(&MainThreadRunningMutex_);
00407   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00408          " .. got mutex");
00409   MainThreadRunning_=true;
00410   BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00411
00412 //      gdk_threads_enter();
00413 //      gtk_main();
00414 //      gdk_threads_leave();
00415   while (Running_){
00416     gdk_threads_enter();
00417     gtk_main_iteration_do(FALSE);
00418     gdk_threads_leave();
00419     usleep(1000);
00420     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MAIN,
00421            "GtkMain still lives");
00422     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00423            "waiting for mutex...");
00424     BIAS_MUTEX_LOCK(&MainThreadRunningMutex_);
00425     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00426            " .. got mutex");
00427     Running_=MainThreadRunning_;
00428     BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00429   }
00430   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream,D_GUI_MAIN,
00431          "gtk_main finished");
00432   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00433          "waiting for mutex...");
00434   BIAS_MUTEX_LOCK(&MainThreadRunningMutex_);
00435   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MUTEX,
00436          " .. got mutex");
00437   MainThreadRunning_=false;
00438   BIAS_MUTEX_UNLOCK(&MainThreadRunningMutex_);
00439   return (void *)NULL;
00440 }
00441
00442 gint GuiGTK::KeyPressEventCallback_(GtkWidget *Widget,
00443                       GdkEventKey *Event,
00444                       gpointer user_data)
00445 {
00446
00447   GuiGTK *obj=(GuiGTK *)user_data;
00448   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00449                   "KeyPressEventCallback_()"<<endl);
00450   obj->KeyBuffer_=Event->keyval;
00451   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream,D_GUI_KEY,
00452                   "key  pressed: "<<obj->KeyBuffer_<<endl);
00453   return TRUE;
00454 }
00455
00456 gint GuiGTK::MouseButtonPressCallback_(GtkWidget *Widget,
00457                        GdkEventButton *Event,
00458                        gpointer user_data)
00459
00460 {
00461   GuiGTK *obj=(GuiGTK *)user_data;
00462   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00463                   "MouseButtonPressCallback_()");
00464   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MOUSE_BUTTON,
00465          "mouse button "<<(int)Event->button
00466          << " pressed at (" << (int)Event->x
00467          << ", "<<(int)Event->y <<")");
00468   pthread_mutex_lock(&MouseButtonMutex_);
00469   obj->MouseButtonPressed_ = (int)Event->button;
00470   obj->MouseButtonPressX_ = (int)Event->x;
00471   obj->MouseButtonPressY_ = (int)Event->y;
00472   pthread_mutex_unlock(&MouseButtonMutex_);
00473   return TRUE;
00474 }
00475
00476 gint GuiGTK::MouseButtonReleaseCallback_(GtkWidget *Widget,
00477                      GdkEventButton *Event,
00478                      gpointer user_data)
00479 {
00480   GuiGTK *obj=(GuiGTK *)user_data;
00481   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00482                   "MouseButtonReleaseCallback_()");
00483   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_MOUSE_BUTTON,
00484          "mouse button "<<(int)Event->button
00485          << " released at (" << (int)Event->x
00486          << ", "<<(int)Event->y <<")");
00487   pthread_mutex_lock(&MouseButtonMutex_);
00488   obj->MouseButtonReleased_ = (int)Event->button;
00489   obj->MouseButtonReleaseX_ = (int)Event->x;
00490   obj->MouseButtonReleaseY_ = (int)Event->y;
00491   pthread_mutex_unlock(&MouseButtonMutex_);
00492   return TRUE;
00493 }
00494
00495 gint GuiGTK::MouseMotionCallback_(GtkWidget *Widget,
00496                                   GdkEventMotion* Event,
00497                                   gpointer user_data)
00498 {
00499   ostringstream label;
00500   GdkModifierType state;
00501   GuiGTK *obj=(GuiGTK *)user_data;
00502   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00503                   "MouseMotionCallback_()");
00504
00505   //cout << "GuiGTK::MouseMotionCallback_"<<endl;
00506   if (Event->is_hint){
00507     BIASDOUT_THREAD(obj->GetDebugLevel(), obj->GetDebugStream(),
00508                     D_GUI_GDK, "gdk_window_get_pointer ...");
00509     gdk_window_get_pointer (Event->window, &(obj->MousePosX_),
00510                             &(obj->MousePosY_), &state);
00511     BIASDOUT_THREAD(obj->GetDebugLevel(), obj->GetDebugStream(),
00512                     D_GUI_GDK, " finished");
00513   } else {
00514     obj->MousePosX_ = (int)Event->x;
00515     obj->MousePosY_ = (int)Event->y;
00516   }
00517
00518   //cout << "IsPyramid_: "<<obj->IsPyramid_<<"\tPyramid0Width_: "<<obj->Pyramid0Width_<<"\tPyramidLevels_: "<<obj->PyramidLevels_<<endl;
00519   if (obj->IsPyramid_>0 &&  obj->MousePosX_> (int)obj->Pyramid0Width_){
00520     obj->MousePosX_ = obj->MousePosX_ - obj->Pyramid0Width_ - PYRAMID_BORDER;
00521     unsigned i=1;
00522     while ((obj->MousePosY_ > int(obj->Pyramid0Height_>>i)+PYRAMID_BORDER)&&
00523            (i<obj->PyramidLevels_)){
00524       obj->MousePosY_ -= (obj->Pyramid0Height_>>i)+PYRAMID_BORDER;
00525       i++;
00526     }
00527   }
00528
00529   if ((obj->MousePosX_ < (int)obj->Width_) &&
00530       (obj->MousePosY_ < (int)obj->Height_) &&
00531       (obj->MousePosX_ >= 0) && (obj->MousePosY_ >= 0) &&
00532       (obj->Factor_ >= 1)){
00533     label << " (x, y) = ("<< obj->MousePosX_/obj->Factor_+obj->XOffset_
00534           <<", " << obj->MousePosY_/obj->Factor_+obj->YOffset_
00535           <<")          (R G B) = (";
00536     if (obj->OrigPicture_.GetChannelCount() == 1) {
00537       BIAS_MUTEX_LOCK(&BufferMutex_);
00538       switch (obj->OrigPicture_.GetStorageType()) {
00539       case ImageBase::ST_unsignedchar:
00540         label << (int)((unsigned char*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->Width_+obj->MousePosX_]<< " ";
00541         break;
00542       case ImageBase::ST_float:
00543         label << ((float*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->Width_+obj->MousePosX_]<< " ";
00544         break;
00545       case ImageBase::ST_unsignedshortint:
00546         label << (int)((unsigned short int*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->Width_+obj->MousePosX_]<< " ";
00547         break;
00548       case ImageBase::ST_int:
00549         label << (int)((int*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->Width_+obj->MousePosX_]<< " ";
00550         break;
00551       default:
00552         BIASERR("storage type not yet implemented");
00553         break;
00554       }
00555       BIAS_MUTEX_UNLOCK(&BufferMutex_);
00556     } else {
00557
00558       BIAS_MUTEX_LOCK(&BufferMutex_);
00559       for (unsigned int i=0; i<obj->OrigPicture_.GetChannelCount(); i++){
00560         switch (obj->OrigPicture_.GetStorageType()) {
00561         case ImageBase::ST_unsignedchar:
00562           label << (int)((unsigned char*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->OrigPicture_.GetWidth()*obj->OrigPicture_.GetChannelCount()+obj->MousePosX_*obj->OrigPicture_.GetChannelCount()+i]<< " ";
00563           break;
00564         case ImageBase::ST_float:
00565           label << ((float*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->OrigPicture_.GetWidth()*obj->OrigPicture_.GetChannelCount()+obj->MousePosX_*obj->OrigPicture_.GetChannelCount()+i]<< " ";
00566           break;
00567         case ImageBase::ST_int:
00568           label << (int)((int*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->OrigPicture_.GetWidth()*obj->OrigPicture_.GetChannelCount()+obj->MousePosX_*obj->OrigPicture_.GetChannelCount()+i]<< " ";
00569           break;
00570         case ImageBase::ST_char:
00571           label << (int)((signed char*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->OrigPicture_.GetWidth()*obj->OrigPicture_.GetChannelCount()+obj->MousePosX_*obj->OrigPicture_.GetChannelCount()+i]<< " ";
00572           break;
00573         case ImageBase::ST_unsignedshortint:
00574           label << (unsigned short)((unsigned short*)(obj->OrigPicture_.GetImageData()))[obj->MousePosY_*obj->OrigPicture_.GetWidth()*obj->OrigPicture_.GetChannelCount()+obj->MousePosX_*obj->OrigPicture_.GetChannelCount()+i]<< " ";
00575           break;default:
00576           BIASERR("storage type not yet implemented");
00577           break;
00578         }
00579
00580 //         label << (int)obj->Buffer_[obj->MousePosY_*obj->Width_*
00581 //                                    obj->nChannels_
00582 //                                    +obj->MousePosX_*obj->nChannels_+i] <<" ";
00583       }
00584       BIAS_MUTEX_UNLOCK(&BufferMutex_);
00585     }
00586     label << ")";
00587
00588     if (obj->ShowMouse_){
00589       //cerr << "now setting label: "<<label.str() << endl;
00590       gtk_label_set_text(GTK_LABEL(obj->Label_), (gchar *)label.str().c_str());
00591       //       gtk_signal_emit(GTK_OBJECT(obj->Label_),
00592       //              gtk_signal_lookup("expose-event",
00593       //                    GTK_TYPE_LABEL));
00594       //const gchar *l = gtk_label_get_text(GTK_LABEL(obj->Label_));
00595       //cout << "label has text: "<<l<<endl;
00596     }
00597   }
00598   return TRUE;
00599 }
00600
00601 gboolean GuiGTK::DrawingAreaExposeCallback_(GtkWidget *widget,
00602                                          GdkEventExpose *Event,
00603                                          gpointer user_data)
00604 {
00605     GuiGTK *obj=(GuiGTK *)user_data;
00606     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_SIGNAL,
00607         "DrawingAreaExposeCallback_()");
00608     obj->Redraw_();
00609     return TRUE;
00610 }
00611
00612 gboolean GuiGTK::LabelExposeCallback_(GtkWidget *widget,
00613                    GdkEventExpose *Event,
00614                    gpointer user_data)
00615 {
00616 #ifdef BIAS_DEBUG
00617     GuiGTK *obj=(GuiGTK *)user_data;
00618 #endif
00619   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00620                   "LabelExposeCallback_()");
00621     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_SIGNAL,
00622            "LabelExposeCallback_");
00623     // cerr << "LabelExposeCallback_" << endl;
00624     return TRUE;
00625 }
00626
00627 gint GuiGTK::DeleteEvent_( GtkWidget *widget, GdkEvent  *event,
00628                       gpointer user_data )
00629 {
00630      /* Change TRUE to FALSE and the main window will be destroyed with
00631         a "delete_event". */
00632 #ifdef BIAS_DEBUG
00633     GuiGTK *obj=(GuiGTK *)user_data;
00634 #endif
00635   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD,
00636                   "DeleteEvent_()");
00637     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream,
00638                     D_GUI_SIGNAL, "DeleteEvent_");
00639     return(FALSE);
00640 }
00641
00642
00643
00644 void GuiGTK::Destroy_( GtkWidget *widget, gpointer user_data)
00645 {
00646     GuiGTK *obj=(GuiGTK *)user_data;
00647   BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream, D_GUI_THREAD, "Destroy_()");
00648     BIASDOUT_THREAD(obj->_liDebugLevel, obj->_zDebugStream,
00649                     D_GUI_SIGNAL, "Destroy_");
00650     obj->DestroyWindow();
00651 }
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiGTK.hh Source File

Gui

GuiGTK.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "bias_config.h"
00026
00027 #ifndef __GuiGTK_hh__
00028 #define __GuiGTK_hh__
00029
00030 #ifndef BIAS_HAVE_GTK
00031 #  error __FILE__: __LINE__: BIAS_HAVE_GTK not defined. Please recompile BIAS with USE_GTK enabled if you want to use GuiGTK.
00032 #endif // BIAS_HAVE_GTK
00033 #ifndef BIAS_HAVE_PTHREADS
00034 #  error You need pthreads. please recompile BIAS with USE_PTHREADS.
00035 #endif // BIAS_HAVE_PTHREADS
00036
00037 #include <fstream>
00038 #include <gtk/gtk.h>
00039 #include <string>
00040 #include <pthread.h>
00041
00042
00043 #include "GuiBase.hh"
00044
00045 #define D_GUI_GDK    0x00010000
00046 #define D_GUI_THREAD 0x00020000
00047
00048 namespace BIAS{
00049   /** @class GuiGTK
00050       @ingroup g_gui
00051       @brief Gui based on gtk is a simple windowing environment...
00052
00053       Usage:
00054       - get an object
00055
00056       - call ShowImage() to visualize an image
00057
00058       - use CheckForKeyEvent() to have your programm react on pressed keys
00059   */
00060   class BIASGui_EXPORT GuiGTK : public GuiBase
00061   {
00062   public:
00063     GuiGTK(bool ShowMousePos = true);
00064     /// as standard constructor, also sets Title_
00065     GuiGTK(std::string const& Title, bool ShowMousePos = true);
00066
00067     GuiGTK(const GuiGTK& gui);
00068
00069     virtual ~GuiGTK();
00070
00071     void SetTitle(std::string const& Title);
00072
00073     /// stops the gtk_main loop and closes the window
00074     int DestroyWindow();
00075
00076     // can optionaly be called to forward options like --geometry to gtk
00077     void InitGtk(int *argc, char **argv[]);
00078
00079    protected:
00080     guchar *Buffer_;
00081     GtkWidget *Window_;
00082     GtkWidget *DrawingArea_;
00083     GtkWidget *Label_;
00084     GtkWidget *Vbox_;
00085
00086     static pthread_t MainThread_;
00087     static bool ThreadsInitialized_;
00088     static bool MainThreadRunning_;
00089     static bool GtkInitialized_;
00090     static unsigned short int WindowCount_;
00091     static pthread_mutex_t MainThreadRunningMutex_;
00092     static pthread_mutex_t GtkInitializedMutex_;
00093     static pthread_mutex_t WindowCountMutex_;
00094     static pthread_mutex_t BufferMutex_;
00095
00096     void Init_(bool ShowMousePos);
00097
00098     /// gtk needs to be initialized
00099     void InitGtk_();
00100
00101     /// self explaining
00102     inline bool IsAllocated_()
00103     { return ( (Width_!=0) && (Height_!=0) && (nChannels_!=0) ); };
00104
00105     /// self explaining
00106     int AllocateBuffer_(Image<unsigned char>& image);
00107
00108     /// self explaining
00109     int FreeBuffer_();
00110
00111
00112     /// updates the image shown in window
00113     int ShowConvertedImage_(Image<unsigned char> &image);
00114
00115     /// initialy creates a window for a given image size
00116     /// and runs the gtk main loop in a separate thread
00117     /// if not already running
00118     /// also allocates memory for Buffer_
00119     int CreateWindow_(Image<unsigned char> &image);
00120
00121     /// internal function that handles the redraw
00122     int Redraw_();
00123
00124     /// test if internal variables Width_, Height_ and nChannels_
00125     /// are set correct for image
00126     /// these 3 variables are used as an indicator if Buffer_ is
00127     /// allocated in right size
00128     inline bool TestImage_(Image<unsigned char> &image)
00129     { return ( ( Width_ == image.GetWidth() ) &&
00130                ( Height_ == image.GetHeight() ) &&
00131                ( nChannels_ == image.GetChannelCount() ) ); };
00132
00133     /// reallocates memory and set internal variables
00134     int ReInitWindow_(Image<unsigned char> &image);
00135
00136     /// callbacks and thread functions must be static
00137     /// the gtk main loop runs in a separate thread
00138     static void* GtkMain(void* arg);
00139     /// callback for key press event
00140     static gint KeyPressEventCallback_(GtkWidget *Widget,
00141                                        GdkEventKey *Event,
00142                                        gpointer user_data);
00143     /// callback function for expose event
00144     static gboolean DrawingAreaExposeCallback_(GtkWidget *Widget,
00145                                                GdkEventExpose *Event,
00146                                                gpointer user_data);
00147
00148     static gboolean LabelExposeCallback_(GtkWidget *Widget,
00149                                          GdkEventExpose *Event,
00150                                          gpointer user_data);
00151
00152     static gint DeleteEvent_(GtkWidget *widget, GdkEvent  *event,
00153                              gpointer  user_data);
00154
00155     static void Destroy_(GtkWidget *widget, gpointer user_data);
00156
00157     static gint MouseMotionCallback_(GtkWidget *Widget, GdkEventMotion *Event,
00158                                      gpointer user_data);
00159
00160     static gint MouseButtonPressCallback_(GtkWidget *widget,
00161                                           GdkEventButton *event,
00162                                           gpointer user_data);
00163
00164     static gint MouseButtonReleaseCallback_(GtkWidget *widget,
00165                                             GdkEventButton *event,
00166                                             gpointer user_data);
00167
00168   };
00169
00170 } // namepsace BIAS
00171 #endif // __Gui_hh__
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiWX.cpp Source File

Gui

GuiWX.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef  WIN32
00026 #  include <unistd.h>
00027
00028 #  ifndef BIAS_HAVE_PTHREADS
00029 #    error You need pthreads. please recompile BIAS with USE_PTHREADS.
00030 #  endif // BIAS_HAVE_PTHREADS
00031   //no threads in WIN32
00032 #  include <pthread.h>
00033 #endif //WIN32
00034
00035 #include <sstream>
00036 #include "GuiWX.hh"
00037 #include <Base/Image/ImageIO.hh>
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042
00043
00044 bool GuiWX::ThreadInitialized_ = false;
00045 bool GuiWX::MainThreadRunning_ = false;
00046 bool GuiWX::WxInitialized = false;
00047
00048 wxApp * GuiWX::AppApp_ = NULL;
00049
00050 unsigned short int GuiWX::WindowCounter_ = 0;
00051
00052
00053 wxMutex GuiWX::GuiWxMutex_;
00054
00055 /// default constructor
00056 WxMainThread::WxMainThread(){}
00057
00058
00059 /// default constructor
00060 WxMainThread::WxMainThread(GuiWX *gui)
00061 {
00062   MyGui_ = gui;
00063 }
00064
00065
00066 /// default destructor
00067 WxMainThread::~WxMainThread()
00068 {
00069 }
00070
00071
00072 /** Each from wxThread derived class needs the method ::Entry()
00073     which is called when a thread is run.
00074 */
00075 void *WxMainThread::Entry()
00076 {
00077   // hi-jack wxTheApp and start the mainloop
00078    MyGui_->AppApp_ ->MainLoop();
00079 //   while (MyGui_->AppApp_->Pending())
00080 //     MyGui_->AppApp_->Dispatch();
00081
00082   delete MyGui_->AppApp_;
00083   MyGui_->AppApp_ = NULL;
00084   return NULL;
00085 }
00086
00087
00088 /** Just like Entry, every wxThread needs the method ::OnExit()
00089     which is called when a thread terminates or is terminated.
00090     It won't be executed, when a thread is killed.
00091 */
00092 void WxMainThread::OnExit()
00093 {
00094   MyGui_->MainThreadRunning_ = false;
00095 }
00096
00097
00098 GuiWX::GuiWX(bool ShowMousePos) : GuiBase(ShowMousePos)
00099 {
00100   TmpWxImg_ = NULL;
00101   Frame_ = NULL;
00102   Init_(ShowMousePos);
00103   Title_="no title";
00104 }
00105
00106
00107 GuiWX::GuiWX(const string& Title,bool ShowMousePos) : GuiBase(ShowMousePos)
00108 {
00109   TmpWxImg_ = NULL;
00110   Frame_ = NULL;
00111   Init_(ShowMousePos);
00112   Title_=Title;
00113 }
00114
00115 GuiWX::GuiWX(const string& Title) : GuiBase(true)
00116 {
00117   TmpWxImg_ = NULL;
00118   Frame_ = NULL;
00119   Init_(true);
00120   Title_=Title;
00121 }
00122
00123
00124 extern int wxEntryStart(int &argc,  char *argv[]);
00125 extern int wxEntryInitGui();
00126
00127 void GuiWX::Init_(bool ShowMousePos)
00128 {
00129   GuiBase::Init_(ShowMousePos);
00130
00131   int argc=1;
00132   char *argv[1] ={"blafasel"};
00133
00134   Buffer_ = NULL;
00135   if (!WxInitialized) {
00136     AppApp_ = new wxApp;
00137     // set the global wxTheApp pointer to satisfy wxWindows
00138     wxTheApp = AppApp_;
00139     if (::wxEntryStart(argc, argv)) {
00140       BIASERR("wxEntryStart() failed");
00141       return ;
00142     }
00143     wxTheApp->argc = argc;
00144     wxTheApp->argv = argv;
00145     wxTheApp->SetAppName(Title_.c_str());
00146     int retValue;
00147     retValue = wxEntryInitGui();
00148     WxInitialized = true;
00149   }
00150 }
00151
00152
00153 GuiWX::~GuiWX()
00154 {
00155 }
00156
00157
00158 void GuiWX::SetTitle(string const& Title)
00159 {
00160   wxString tmp(Title.c_str());
00161
00162   if ( WindowCreated_ )
00163     Frame_->SetTitle( tmp );
00164
00165   Title_=Title;
00166   return;
00167 }
00168
00169
00170 int GuiWX::DestroyWindow()
00171 {
00172   if (WindowCreated_){
00173     Frame_->Hide();
00174     WindowCreated_=false;
00175     BIASDOUT(D_GUI_MUTEX,"DestroyWindow(): waiting for mutex...");
00176     GuiWxMutex_.Lock();
00177     BIASDOUT(D_GUI_MUTEX,"DestroyWindow(): ...got mutex");
00178     WindowCounter_--;
00179
00180 //     if (WindowCounter_ == 0){
00181 //       delete WxMainLoop_;
00182 //       WxMainLoop_ = NULL;
00183 //     }
00184     GuiWxMutex_.Unlock();
00185 //     delete Frame_;
00186 //     Frame_ = NULL;
00187   }
00188   return 0;
00189 }
00190
00191
00192 int GuiWX::CreateWindow_(Image<unsigned char> &image)
00193 {
00194   if (Frame_ == NULL)
00195     Frame_ = new TopFrame(this, image);
00196   Frame_->SetTitle(Title_.c_str());
00197   Frame_->Show(TRUE);
00198
00199   BIASDOUT(D_GUI_MUTEX,"CreateWindow: Waiting for mutex" );
00200   GuiWxMutex_.Lock();
00201   BIASDOUT(D_GUI_MUTEX,"CreateWindow: Got mutex")
00202   if ( ! MainThreadRunning_ )
00203     {
00204       MainThreadRunning_ = true;
00205       WxMainLoop_ = new WxMainThread(this);
00206       WxMainLoop_->Create() ;
00207       WxMainLoop_->Run();
00208     }
00209   WindowCounter_++;
00210   GuiWxMutex_.Unlock();
00211   WindowCreated_=true;
00212
00213   return 0;
00214 }
00215
00216 #include <Base/Image/ImageIO.hh>
00217
00218
00219 int GuiWX::ShowConvertedImage_(Image<unsigned char> &image)
00220 {
00221
00222   // Create a window if not already done, resize it if necessary
00223   // and display the already converted image
00224   if ( !WindowCreated_ )
00225     CreateWindow_(image);
00226   Frame_->Canvas_->Show(image,"foo");
00227   return 0;
00228 }
00229
00230
00231
00232
00233
00234 // =============  EVENTS FOR TOP_FRAME ===============================
00235 BEGIN_EVENT_TABLE(TopFrame, wxFrame)
00236   EVT_CHAR( TopFrame::OnChar )
00237   EVT_CLOSE( TopFrame::OnClose )
00238 END_EVENT_TABLE()
00239
00240
00241 // =============  METHODS FOR TOP_FRAME ==============================
00242 TopFrame::TopFrame( GuiWX *gui, Image<unsigned char> &image )
00243   : wxFrame( (wxFrame*)NULL, -1, "No Title", wxPoint(-1,-1), wxSize(800,600))
00244 {
00245
00246   CreateStatusBar(3);
00247   int widths[] = { -1, 150, -1 }; // in array, -1 means variable width
00248   SetStatusWidths( 3, widths );
00249   MyGui_ = gui;
00250   Canvas_ = new ImageCanvas( this );
00251 }
00252
00253 TopFrame::~TopFrame()
00254 {
00255   delete Canvas_;
00256   Canvas_ = NULL;
00257 }
00258
00259 void TopFrame::OnChar( wxKeyEvent& event )
00260 {
00261 //   long evkey = event.KeyCode();
00262 }
00263
00264 void TopFrame::OnClose( wxCloseEvent& event )
00265 {
00266   MyGui_->DestroyWindow();
00267 }
00268
00269
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/GuiWX.hh Source File

Gui

GuiWX.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 /** For our wxWindows-GUI we need to define some more classes than GuiWX.
00027     The other three classes WxMainThread, ImgCanvas and TopFrame are needed
00028     for creating windows (and its content) in wxWindows and to split off
00029     the wxWindows-main-loop, which is run in a seperate thread to ensure
00030     that we have only one main-loop for each instance of GuiWX.
00031 */
00032
00033 #ifndef __GuiWX_hh__
00034 #define __GuiWX_hh__
00035
00036 #error This class (BIAS::GuiWX) is deprecated. It will be removed in a few days
00037
00038 #include "bias_config.h"
00039
00040 #include <fstream>
00041 #include <string>
00042
00043 #include <wx/wx.h>
00044 #include <wx/thread.h>
00045
00046 #include "GuiBase.hh"
00047 #include "ImageCanvas.hh"
00048 //BIAS libraries
00049 #include <Base/Math/Math.hh>
00050 #include <Base/Image/ImageBase.hh>
00051 #include <Base/Image/ImageIO.hh>
00052 #include <Base/Image/ImageConvert.hh>
00053
00054 namespace BIAS{
00055
00056
00057 // forward declaration:
00058 class TopFrame;
00059 class GuiWX;
00060
00061 /** @class WxMainThread
00062     To use threads in wxWindows we must create our own class, which is
00063     derived from wxThread.
00064     In this case this is our main thread class in which the main loop
00065     will be run
00066 */
00067 class WxMainThread : public wxThread
00068 {
00069 public:
00070   WxMainThread();
00071   ~WxMainThread();
00072
00073   WxMainThread(GuiWX *gui);
00074
00075   virtual void *Entry();
00076   virtual void OnExit();
00077 protected:
00078   GuiWX *MyGui_;
00079 };
00080
00081
00082
00083 /** This is the fundamental frame in which the canvas (displaying the
00084     image) is positioned.
00085     We also define the status bar here.
00086 */
00087 class TopFrame : public wxFrame
00088 {
00089 public:
00090   TopFrame( GuiWX *gui, Image<unsigned char> &image );
00091   ~TopFrame();
00092
00093   // event handler:
00094   void OnChar( wxKeyEvent& event );
00095   void OnClose( wxCloseEvent& event );
00096
00097   ImageCanvas *Canvas_;
00098
00099 protected:
00100   DECLARE_EVENT_TABLE()
00101   GuiWX  *MyGui_;
00102 };
00103
00104
00105
00106 /** @class GuiWX
00107     @ingroup g_gui
00108     @brief a sophisticated more complex windowing environment
00109
00110     Features:
00111     - GLcanvas
00112     - Menu support
00113
00114     Usage:
00115     - look at the example or ask Jan Friso Evers or Jan Woetzel
00116 */
00117 class BIASGui_EXPORT GuiWX : public GuiBase
00118 {
00119   friend class TopFrame;
00120   friend class ImgCanvas;
00121   friend class WxMainThread;
00122 public:
00123   GuiWX(bool ShowMousePos = true);
00124   /// as standard constructor, also sets Title_
00125   GuiWX(std::string const& Title, bool ShowMousePos);
00126   GuiWX(std::string const& Title);
00127
00128   virtual ~GuiWX();
00129
00130   /// self explaining
00131   void SetTitle(std::string const& Title);
00132
00133
00134   /// stops the wx-main loop and closes the window
00135   int DestroyWindow();
00136
00137
00138 protected:
00139   unsigned char *Buffer_;
00140
00141   // Booleans:
00142   static bool ThreadInitialized_;
00143   static bool MainThreadRunning_;
00144   static bool WxInitialized;
00145
00146   // Counter for open windows
00147   static unsigned short int WindowCounter_;
00148
00149   static wxApp *AppApp_;
00150
00151   // Locks
00152   static wxMutex GuiWxMutex_;
00153
00154   // WX-Widgets
00155   TopFrame *Frame_;
00156
00157   // Main-Thread
00158   wxThread *WxMainLoop_;
00159
00160   wxImage *TmpWxImg_;
00161   /// Init is called from the constructor
00162   void Init_(bool ShowMousePos);
00163
00164   int CreateWindow_(Image<unsigned char> &image);
00165
00166   int ShowConvertedImage_(Image<unsigned char> &image);
00167 };
00168
00169 } // namepsace BIAS
00170 #endif // __GuiWX_hh__
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/helloconfig.cpp Source File

Tests

helloconfig.cpp

Go to the documentation of this file.
00001 /* Test Makefile usage of bias-config (Jan WOetzel) */
00002 #include <iostream>
00003
00004 // check include:
00005 #include <bias_config.h>
00006 #include <Base/Image/ImageBase.hh>
00007
00008 using namespace std;
00009
00010 int main( int argc, char** argv )
00011 {
00012   if (argc>0) cout<<"started "<<argv[0]<<" compiled by Makefile works."<<endl;
00013   // test linking against BIAS
00014   BIAS::ImageBase img;
00015   return 0;
00016 };
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Histogram.cpp Source File

Image

Histogram.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Histogram.hh"
00027
00028 #include <Base/Image/ImageBase.hh>
00029 #include <Base/Image/ImageDraw.hh>
00030
00031 #include <Base/Common/BIASpragma.hh>
00032
00033 using namespace std;
00034
00035 namespace BIAS
00036 {
00037
00038
00039
00040
00041 Histogram::Histogram(unsigned short int size)
00042 {
00043   ColorModel_ = ImageBase::CM_RGB;
00044   BinCount_ = 256;
00045   InterleavedDataOrder_ = true;
00046   HistCount_ = 0;
00047   HistSize_ = 256;
00048   _uiBorder = 2;
00049   _ucBorderColor = 128;
00050   Factor_ = size;
00051   ScaleYToMaxEntry_=true;
00052
00053   Hist_ = NULL;
00054   Color_=NULL;
00055   Average_=NULL;
00056   MinBinVal_=NULL;
00057   BinSize_=NULL;
00058   MaxBinVal_=NULL;
00059   MaxHistEntry_ = NULL;
00060   NumData_ = NULL;
00061 }
00062
00063 Histogram::~Histogram()
00064 {
00065   ReleaseHist();
00066 }
00067
00068 void Histogram::SetFactor(unsigned short Factor)
00069 {
00070   Factor_ = Factor;
00071   InitHist(BinCount_, HistCount_);
00072 }
00073
00074 void Histogram::SetColorModel()
00075 {
00076   BIASERR("Histogram::SetColorModel() not valid for Histogram");
00077 }
00078
00079
00080 void Histogram::SetBinCount(unsigned int bincount)
00081 {
00082   if (bincount != BinCount_){
00083     InitHist(bincount, HistCount_);
00084   }
00085 }
00086
00087
00088 void Histogram::SetHistCount(unsigned int histcount)
00089 {
00090   if (histcount != HistCount_){
00091     InitHist(BinCount_, histcount);
00092   }
00093 }
00094
00095 int Histogram::InitHist(unsigned int bincount , unsigned int histcount)
00096 {
00097   int bc, hs;
00098   ReleaseHist();
00099   HistCount_ = histcount;
00100   BinCount_ = bincount;
00101   Hist_ = new double*[HistCount_];
00102   Color_ = new unsigned char*[HistCount_];
00103   MinBinVal_ = new double[HistCount_];
00104   MaxBinVal_ = new double[HistCount_];
00105   BinSize_ = new double[HistCount_];
00106   MaxHistEntry_ = new double[HistCount_];
00107   NumData_ = new double[HistCount_];
00108   Average_ = new double[HistCount_];
00109   for (register unsigned int i = 0; i < HistCount_; i++){
00110     Hist_[i] = new double[BinCount_];
00111     for (register unsigned int j = 0; j < BinCount_; j++){
00112       Hist_[i][j] = 0.0;
00113     }
00114     Color_[i] = new unsigned char[3];
00115     // deafult Color is black
00116     for (register int j = 0; j < 3; j++){
00117       Color_[i][j] = 0;
00118     }
00119     MinBinVal_[i]=DBL_MAX;
00120     MaxHistEntry_[i]=MaxBinVal_[i]=-DBL_MAX;
00121     NumData_[i]=0.0;
00122     Average_[i]=0.0;
00123   }
00124
00125   // image width and height must be dividable by 4
00126   if (BinCount_ % 4 != 0)
00127     bc = BinCount_ + 4 - (BinCount_ % 4);
00128   else
00129     bc = BinCount_;
00130   if (HistSize_ % 4 != 0)
00131     hs = HistSize_ + 4 - (HistSize_ % 4);
00132   else
00133     hs = HistSize_;
00134
00135   // scale image with Factor_
00136   Init((bc + 2 * _uiBorder) * Factor_ , (hs + 2 * _uiBorder) * Factor_ , 3);
00137   // white background
00138   FillImageWithConstValue(255);
00139   return 0;
00140 }
00141
00142
00143 int Histogram::ReleaseHist()
00144 {
00145   if (Hist_){
00146     for (register int i =0; i < HistCount_; i++){
00147       delete[] Hist_[i];
00148       delete[] Color_[i];
00149     }
00150     delete[] Hist_; Hist_=NULL;
00151   }
00152   HistCount_=0;
00153   if (Color_){ delete[] Color_; Color_=NULL; }
00154   if (Average_){ delete[] Average_; Average_=NULL; }
00155   if (MinBinVal_){ delete[] MinBinVal_; MinBinVal_=NULL; }
00156   if (BinSize_){ delete[] BinSize_; BinSize_=NULL; }
00157   if (MaxBinVal_){ delete[] MaxBinVal_; MaxBinVal_=NULL; }
00158   if (MaxHistEntry_){ delete[] MaxHistEntry_; MaxHistEntry_ = NULL; }
00159   if (NumData_){ delete[] NumData_; NumData_ = NULL; }
00160   Release();
00161   return 0;
00162 }
00163
00164 template <class StorageType>
00165 int Histogram::AddHist(Image<StorageType>& Image,
00166                        unsigned int hist )
00167 {
00168 #ifdef BIAS_DEBUG
00169   if (Image.GetChannelCount() != 1)
00170     BIASERR("Histogram::AddHist only supports one channel images");
00171   if ( hist >= HistCount_)
00172     BIASERR("Histogram::AddHist invalid hist "<<hist);
00173   if (Image.IsEmpty())
00174     BIASERR("Histogram::AddHist called with empty image");
00175 #endif
00176   register StorageType *ImageData = Image.GetImageData();
00177   register StorageType *ImageDataEnd = ImageData + Image.GetPixelCount();
00178   StorageType min, max, diff;
00179   int bin;
00180   Image.GetMinMaxPixelValue(min, max);
00181   diff=max-min;
00182   MinBinVal_[hist]=(double)min;
00183   MaxBinVal_[hist]=(double)max;
00184   BinSize_[hist]=(MaxBinVal_[hist]-MinBinVal_[hist])/(double)BinCount_;
00185
00186   while (ImageData < ImageDataEnd){
00187     if (*ImageData==max){
00188       bin=BinCount_-1;
00189     } else {
00190       bin=(unsigned)floor((double)BinCount_ * ((double)*ImageData-MinBinVal_[hist])/(double)diff);
00191     }
00192 #ifdef BIAS_DEBUG
00193       if (bin<0)
00194         BIASERR("invalid index "<<bin);
00195       if (bin>=(int)BinCount_)
00196         BIASERR("invalid index "<<bin<<" "
00197                 <<*ImageData<<" "<<min<<" "<<BinSize_[hist]<<" "<<BinCount_);
00198 #endif
00199     Hist_[hist][bin]++;
00200     if (Hist_[hist][bin]>MaxHistEntry_[hist])
00201       MaxHistEntry_[hist]=Hist_[hist][bin];
00202     ImageData++;
00203
00204   }
00205   NumData_[hist]+=(double)Image.GetPixelCount();
00206   CalcAverage_(hist);
00207
00208   return 0;
00209 }
00210
00211 template <> BIASImage_EXPORT
00212 int Histogram::AddHist(Image<unsigned char>& Image,
00213                        unsigned int hist )
00214 {
00215 #ifdef BIAS_DEBUG
00216   if (Image.GetChannelCount() != 1)
00217     BIASERR("Histogram::AddHist only supports one channel images");
00218   if ( hist >= HistCount_)
00219     BIASERR("Histogram::AddHist invalid hist "<<hist);
00220   if (Image.IsEmpty())
00221     BIASERR("Histogram::AddHist called with empty image");
00222 #endif
00223   register unsigned char *ImageData = Image.GetImageData();
00224   register unsigned char *ImageDataEnd = ImageData + Image.GetPixelCount();
00225
00226   while (ImageData < ImageDataEnd){
00227     if (Hist_[hist][BinCount_ * *ImageData / 256] + 1 > MaxHistEntry_[hist] ){
00228       MaxHistEntry_[hist] = Hist_[hist][BinCount_ * *ImageData++ / 256]++;
00229     } else {
00230       Hist_[hist][BinCount_ * *ImageData++ / 256]++;
00231     }
00232   }
00233   CalcAverage_(hist);
00234   MinBinVal_[hist]=0.0;
00235   MaxBinVal_[hist]=255.0;
00236   NumData_[hist]+=(double)Image.GetPixelCount();
00237   BinSize_[hist]=(MaxBinVal_[hist]-MinBinVal_[hist])/(double)BinCount_;
00238   return 0;
00239 }
00240
00241
00242 template <class DataType>
00243 int Histogram::AddHist(vector<DataType>& data, unsigned int hist)
00244 {
00245   typename vector<DataType>::iterator it;
00246   DataType max=data.front(), min=data.front();
00247   BIASCDOUT(D_HIST_VEC, "data.size() = "<<data.size()<<endl);
00248   for (it=data.begin(); it!=data.end(); it++){
00249     if ((*it)>max) max=*it;
00250     if ((*it)<min) min=*it;
00251     BIASCDOUT(D_HIST_VEC, (*it)<<" ");
00252   }
00253   BIASCDOUT(D_HIST_VEC, "\nmin/max "<<min<<"/"<<max);
00254   return AddHist(data, min, max, hist);
00255 }
00256
00257 template <class DataType>
00258 int Histogram::AddHist(vector<DataType>& data, DataType min, DataType max,
00259                        unsigned int hist)
00260 {
00261
00262
00263   if (data.size()==0){
00264     BIASERR("data has size 0");
00265     return -1;
00266   }
00267   if (hist>HistCount_){
00268     BIASERR("hist="<<hist<<" to big. HistCount_="<<HistCount_);
00269     return -2;
00270   }
00271
00272   typename vector<DataType>::iterator it;
00273   int bin;
00274   BIASCDOUT(D_HIST_VEC, "data.size() = "<<data.size()<<endl);
00275
00276   BIASCDOUT(D_HIST_VEC, "\nmin/max "<<min<<"/"<<max);
00277   MinBinVal_[hist]=(double)min;
00278   MaxBinVal_[hist]=(double)max;
00279   BIASCDOUT(D_HIST_VEC, "MinBinVal_["<<hist<<"]/MaxBinVal_["<<hist<<"] "<<
00280             MinBinVal_[hist]<<"/"<<MaxBinVal_[hist]);
00281   BinSize_[hist]=(MaxBinVal_[hist]-MinBinVal_[hist])/(double)BinCount_;
00282   BIASCDOUT(D_HIST_VEC, "min: "<<MinBinVal_[hist]<<"   max: "<<MaxBinVal_[hist]
00283             <<"   binsize: "<<BinSize_[hist]<<endl);
00284   for (it=data.begin(); it!=data.end(); it++){
00285     if (*it==max){
00286       bin=BinCount_-1;
00287     } else {
00288       bin=(int)floor(double((*it)-min)/BinSize_[hist]);
00289     }
00290 #ifdef BIAS_DEBUG
00291     if (bin<0){
00292       BIASERR("invalid index "<<bin<<"  data "<<(*it)<<"  min "<<min
00293               <<"  binsize "<<BinSize_[hist]);
00294       BIASABORT;
00295     }
00296     if (bin>=(int)BinCount_){
00297       BIASERR("invalid index "<<bin<<" "
00298               <<*it<<" "<<min<<" "<<BinSize_[hist]<<" "<<BinCount_);
00299       BIASABORT;
00300     }
00301 #endif
00302     Hist_[hist][bin]++;
00303     if (Hist_[hist][bin]>MaxHistEntry_[hist])
00304       MaxHistEntry_[hist]=Hist_[hist][bin];
00305   }
00306   BIASCDOUT(D_HIST_VEC, "MaxHistEntry_["<<hist<<"] = "<<MaxHistEntry_[hist]
00307             <<endl);
00308   NumData_[hist]+=(double)data.size();
00309   CalcAverage_(hist);
00310   return 0;
00311 }
00312
00313
00314
00315 template <class DataType>
00316 int Histogram::AddWeightedHist(vector<DataType>& data, vector<double>& weight,
00317                                unsigned int hist)
00318 {
00319 #ifdef BIAS_DEBUG
00320   if (data.size() != weight.size()){
00321     BIASERR("data and weight have different sizes "<<data.size()
00322             <<" "<<weight.size());
00323     BIASASSERT(data.size() == weight.size());
00324   }
00325 #endif
00326   typename vector<DataType>::iterator it;
00327   vector<double>::iterator wit;
00328   int bin;
00329   DataType max=data.front(), min=data.front();
00330   for (it=data.begin(); it!=data.end(); it++){
00331     if ((*it)>max) max=*it;
00332     if ((*it)<min) min=*it;
00333   }
00334   MinBinVal_[hist]=(double)min;
00335   MaxBinVal_[hist]=(double)max;
00336   BinSize_[hist]=(MaxBinVal_[hist]-MinBinVal_[hist])/(double)BinCount_;
00337
00338   for (it=data.begin(), wit=weight.begin(); it!=data.end(); it++, wit++){
00339     if (*it==max){
00340       bin=BinCount_-1;
00341     } else {
00342       bin=(int)floor(double((*it)-min)/BinSize_[hist]);
00343     }
00344 #ifdef BIAS_DEBUG
00345     if (*it!=max){
00346       if (bin<0)
00347         BIASERR("invalid index "<<bin);
00348       if (bin>=(int)BinCount_)
00349         BIASERR("invalid index "<<bin<<" "
00350                 <<*it<<" "<<min<<" "<<BinSize_[hist]<<" "<<BinCount_);
00351     }
00352 #endif
00353     Hist_[hist][bin]+=(*wit);
00354     if (Hist_[hist][bin]>MaxHistEntry_[hist])
00355       MaxHistEntry_[hist]=Hist_[hist][bin];
00356   }
00357
00358   NumData_[hist]+=(double)data.size();
00359   CalcAverage_(hist);
00360   return 0;
00361 }
00362
00363 template int Histogram::AddWeightedHist<double>(vector<double>& data, vector<double>& weight, unsigned hist);
00364 template int Histogram::AddWeightedHist<float>(vector<float>& data, vector<double>& weight, unsigned hist);
00365 template int Histogram::AddWeightedHist<int>(vector<int>& data, vector<double>& weight, unsigned hist);
00366 template int Histogram::AddWeightedHist<unsigned>(vector<unsigned>& data, vector<double>& weight, unsigned hist);
00367
00368 int Histogram::CalcAverage_(unsigned int hist)
00369 {
00370   Average_[hist] = 0.0;
00371   for (unsigned int i=0; i<BinCount_; i++)
00372     Average_[hist] += Hist_[hist][i];
00373   //cerr << "sum Hist["<<hist<<"]="<<Average_[hist]<<endl;
00374   Average_[hist] /= BinCount_;
00375   //cerr << "average Hist["<<hist<<"]="<<Average_[hist]<<endl;
00376   return 0;
00377 }
00378
00379
00380
00381 int Histogram::ZeroHist(unsigned int hist)
00382 {
00383   MaxHistEntry_[hist]=0.0;
00384   NumData_[hist]=0.0;
00385   Average_[hist]=0.0;
00386   MaxBinVal_[hist]=MinBinVal_[hist]=BinSize_[hist]=0.0;
00387   if (Hist_!=NULL)
00388     memset(Hist_[hist], 0, BinCount_ * sizeof(double));
00389   FillImageWithConstValue(255);
00390   return 0;
00391 }
00392
00393
00394 int Histogram::RedrawHist_(unsigned int hist)
00395 {
00396   return DeleteHist_(hist) + DrawHist_(hist);
00397 }
00398
00399
00400 int Histogram::DrawHist_(unsigned int hist)
00401 {
00402   unsigned int BorderOffset = Factor_ * _uiBorder * GetChannelCount();
00403   register unsigned char **ImageDataArray = GetImageDataArray();
00404   unsigned start[2], end[2], st[2];
00405
00406   // now draw hist
00407   register int y, x, kk;
00408   start[0]=Factor_ * _uiBorder;
00409   start[1]=Factor_ * _uiBorder + Factor_ * (HistSize_-1);
00410   double maxy=(ScaleYToMaxEntry_)?(MaxHistEntry_[hist]):(NumData_[hist]);
00411   for (register unsigned int i = 0; i < BinCount_ ; i++){
00412     y = Factor_ * _uiBorder + Factor_ *
00413       (((int)HistSize_-1)-(int)rint(((int)HistSize_-1)*Hist_[hist][i] /
00414                                     maxy));
00415     x = BorderOffset + Factor_ * 3 * i;
00416 #ifdef BIAS_DEBUG
00417     if (y<0 || y>=(int)GetHeight()){
00418       BIASERR("invalid y="<<y<<" HistSize_="<<HistSize_<<"  Hist_["<<hist<<"]["
00419               <<i<<"]="<<Hist_[hist][i]<<"  MaxHistEntry_="
00420               <<MaxHistEntry_[hist]);
00421       BIASABORT;
00422     }
00423 #endif
00424     switch (Mode_ ) {
00425     case HIST_POINTS:
00426       for (register unsigned int k = 0; k < Factor_ ; k++){
00427         kk = k*3;
00428         for (register unsigned int j = 0; j < Factor_ ; j++){
00429           ImageDataArray[y + j][x + kk] = Color_[hist][0];
00430           ImageDataArray[y + j][x + kk + 1] = Color_[hist][1];
00431           ImageDataArray[y + j][x + kk + 2] = Color_[hist][2];
00432         }
00433       }
00434       break;
00435     case HIST_BARS:
00436       for (register unsigned int k = 0; k < Factor_ ; k++){
00437         kk = k*3;
00438         for (register unsigned int j = y;
00439              j < GetHeight() - Factor_ * _uiBorder; j++){
00440           ImageDataArray[j][x + kk] = Color_[hist][0];
00441           ImageDataArray[j][x + kk + 1] = Color_[hist][1];
00442           ImageDataArray[j][x + kk + 2] = Color_[hist][2];
00443         }
00444       }
00445       break;
00446     case HIST_LINES:
00447       for (register unsigned int k = 0; k < Factor_ ; k++){
00448         for (register unsigned int j = 0; j < Factor_ ; j++){
00449           st[0]=start[0]+k;
00450           st[1]=start[1]+j;
00451           end[0]=x/3+k;
00452           end[1]=y+j;
00453           ImageDraw<unsigned char>::Line(*this, st, end, Color_[hist]);
00454         }
00455       }
00456       start[0]=x/3;
00457       start[1]=y;
00458       break;
00459     }
00460   }
00461   // draw line of average
00462   y = Factor_ * (_uiBorder + (HistSize_ - 1) -
00463                  (int)rint((HistSize_ - 1) * Average_[hist] /
00464                            maxy)) +
00465     Factor_ * _uiBorder;
00466   //cerr << "average of Hist_["<<hist<<"]="<<Average_[hist]<<" at "<<y<<endl;
00467   for (unsigned int j=BorderOffset;
00468        j < (BinCount_ - 1) * Factor_ * 3 + BorderOffset;
00469        j+=3){
00470       ImageDataArray[y][j] = Color_[hist][0];
00471       ImageDataArray[y][j+1] = Color_[hist][1];
00472       ImageDataArray[y][j+2] = Color_[hist][2];
00473   }
00474   return 0;
00475 }
00476
00477 int Histogram::DrawHistLog_(unsigned int hist)
00478 {
00479   unsigned int BorderOffset = Factor_ * _uiBorder * GetChannelCount();
00480   register unsigned char **ImageDataArray = GetImageDataArray();
00481   unsigned start[2], end[2], st[2];
00482
00483   // now draw hist
00484   register int y, x, kk;
00485   start[0]=Factor_ * _uiBorder;
00486   start[1]=Factor_ * _uiBorder + Factor_ * (HistSize_-1);
00487   double maxy=(ScaleYToMaxEntry_)?(MaxHistEntry_[hist]):(NumData_[hist]);
00488   for (register unsigned int i = 0; i < BinCount_ ; i++){
00489     y = Factor_ * _uiBorder + Factor_ *
00490       (((int)HistSize_-1)-
00491        (int)rint(((int)HistSize_-1)*
00492                  log10((Hist_[hist][i]/maxy)*9.0+1.0)));
00493     x = BorderOffset + Factor_ * 3 * i;
00494 #ifdef BIAS_DEBUG
00495     if (y<0 || y>=(int)GetHeight()){
00496       BIASERR("invalid y="<<y<<" HistSize_="<<HistSize_<<"  Hist_["<<hist<<"]["
00497               <<i<<"]="<<Hist_[hist][i]<<"  MaxHistEntry_="
00498               <<MaxHistEntry_[hist]);
00499       BIASABORT;
00500     }
00501 #endif
00502     switch (Mode_ ) {
00503     case HIST_POINTS:
00504       for (register unsigned int k = 0; k < Factor_ ; k++){
00505         kk = k*3;
00506         for (register unsigned int j = 0; j < Factor_ ; j++){
00507           ImageDataArray[y + j][x + kk] = Color_[hist][0];
00508           ImageDataArray[y + j][x + kk + 1] = Color_[hist][1];
00509           ImageDataArray[y + j][x + kk + 2] = Color_[hist][2];
00510         }
00511       }
00512       break;
00513     case HIST_BARS:
00514       for (register unsigned int k = 0; k < Factor_ ; k++){
00515         kk = k*3;
00516         for (register unsigned int j = y;
00517              j < GetHeight() - Factor_ * _uiBorder; j++){
00518           ImageDataArray[j][x + kk] = Color_[hist][0];
00519           ImageDataArray[j][x + kk + 1] = Color_[hist][1];
00520           ImageDataArray[j][x + kk + 2] = Color_[hist][2];
00521         }
00522       }
00523       break;
00524     case HIST_LINES:
00525       for (register unsigned int k = 0; k < Factor_ ; k++){
00526         for (register unsigned int j = 0; j < Factor_ ; j++){
00527           st[0]=start[0]+k;
00528           st[1]=start[1]+j;
00529           end[0]=x/3+k;
00530           end[1]=y+j;
00531           ImageDraw<unsigned char>::Line(*this, st, end, Color_[hist]);
00532         }
00533       }
00534       start[0]=x/3;
00535       start[1]=y;
00536       break;
00537     }
00538   }
00539   // draw line of average
00540   y = Factor_ * (_uiBorder + (HistSize_ - 1) -
00541                  (int)rint((HistSize_ - 1) * Average_[hist] /
00542                            maxy)) +
00543     Factor_ * _uiBorder;
00544   //cerr << "average of Hist_["<<hist<<"]="<<Average_[hist]<<" at "<<y<<endl;
00545   for (unsigned int j=BorderOffset;
00546        j < (BinCount_ - 1) * Factor_ * 3 + BorderOffset;
00547        j+=3){
00548       ImageDataArray[y][j] = Color_[hist][0];
00549       ImageDataArray[y][j+1] = Color_[hist][1];
00550       ImageDataArray[y][j+2] = Color_[hist][2];
00551   }
00552   return 0;
00553 }
00554
00555
00556 int Histogram::DeleteHist_(unsigned int hist)
00557 {
00558   register unsigned char *r = GetImageData();
00559   register unsigned char *g = r + 1;
00560   register unsigned char *b = g + 1;
00561   register unsigned char *end = r + GetChannelCount() * GetPixelCount();
00562
00563   while (r < end){
00564     if ( (*r == Color_[hist][0]) && (*g == Color_[hist][1]) &&
00565      (*b == Color_[hist][2]) )
00566       *r = *g = *b = 255;
00567     r+=3;
00568     g+=3;
00569     b+=3;
00570   }
00571   return 0;
00572 }
00573
00574
00575 int Histogram::SetColor(unsigned char R, unsigned char G, unsigned char B,
00576                unsigned int hist)
00577 {
00578 #ifdef BIAS_DEBUG
00579   if (hist + 1 > HistCount_ )
00580     BIASERR("Histogram::SetColor() inavlid hist "<<hist);
00581 #endif
00582   Color_[hist][0] = R;
00583   Color_[hist][1] = G;
00584   Color_[hist][2] = B;
00585
00586   return 0;
00587 }
00588
00589
00590 int Histogram::Draw()
00591 {
00592   register unsigned char **ImageDataArray = GetImageDataArray();
00593   // draw border
00594   for (unsigned int i=0; i< Factor_ * _uiBorder; i++){
00595     memset((void *)(ImageDataArray[i]), _ucBorderColor, GetWidthStep() *
00596            sizeof(unsigned char));
00597     memset((void *)(ImageDataArray[GetHeight()-1-i]), _ucBorderColor,
00598            GetWidthStep() * sizeof(unsigned char) );
00599     for (unsigned int j=Factor_ * _uiBorder; j<GetHeight()-Factor_ * _uiBorder;
00600          j++){
00601       for (unsigned int c=0; c<GetChannelCount(); c++){
00602         ImageDataArray[j][i*GetChannelCount()+c]=_ucBorderColor;
00603         ImageDataArray[j][(GetWidth()-1-i)*GetChannelCount()+c]=_ucBorderColor;
00604       }
00605     }
00606   }
00607   for (int i = 0; i < HistCount_; i++)
00608     if (MaxHistEntry_[i]>0)
00609       DrawHist_(i);
00610   return 0;
00611 }
00612
00613 int Histogram::DrawLog()
00614 {
00615   register unsigned char **ImageDataArray = GetImageDataArray();
00616   // draw border
00617   for (unsigned int i=0; i< Factor_ * _uiBorder; i++){
00618     memset((void *)(ImageDataArray[i]), _ucBorderColor, GetWidthStep() *
00619            sizeof(unsigned char));
00620     memset((void *)(ImageDataArray[GetHeight()-1-i]), _ucBorderColor,
00621            GetWidthStep() * sizeof(unsigned char) );
00622     for (unsigned int j=Factor_ * _uiBorder; j<GetHeight()-Factor_ * _uiBorder;
00623          j++){
00624       for (unsigned int c=0; c<GetChannelCount(); c++){
00625         ImageDataArray[j][i*GetChannelCount()+c]=_ucBorderColor;
00626         ImageDataArray[j][(GetWidth()-1-i)*GetChannelCount()+c]=_ucBorderColor;
00627       }
00628     }
00629   }
00630   for (int i = 0; i < HistCount_; i++)
00631     DrawHistLog_(i);
00632   return 0;
00633 }
00634
00635 double Histogram::GetBin(unsigned int bin,unsigned int hist)
00636 {
00637   if (bin < BinCount_ && hist < HistCount_) return Hist_[hist][bin];
00638   else return -1;
00639 }
00640
00641 int Histogram::SetBin(unsigned int bin,double value, unsigned int hist)
00642 {
00643   if (bin < BinCount_ && hist < HistCount_) {
00644     Hist_[hist][bin] = value;
00645     MaxHistEntry_[hist] =0.0;
00646
00647     for (unsigned int i=0; i<BinCount_; i++)
00648       if (MaxHistEntry_[hist] < Hist_[hist][i])
00649           MaxHistEntry_[hist] = Hist_[hist][i];
00650     CalcAverage_(hist);
00651     return 0;
00652   }
00653   else return -1;
00654
00655 }
00656
00657 void Histogram::Dump(ostream& os)
00658 {
00659   double *s=new double[HistCount_];
00660   memset((void *)s, 0, sizeof(double)*HistCount_);
00661   for (int b=0; b<(int)BinCount_; b++){
00662     os << setw(4) << b <<": ";
00663     for (int h=0; h<(int)HistCount_; h++){
00664       os << setw(8) << Hist_[h][b];
00665       s[h]+=Hist_[h][b];
00666     }
00667     os << endl;
00668   }
00669   os << " sum: ";
00670   for (int h=0; h<(int)HistCount_; h++){
00671     os << setw(8) << s[h];
00672   }
00673   os << endl;
00674   os << " avg: ";
00675   for (int h=0; h<(int)HistCount_; h++){
00676     os << setw(8) << Average_[h];
00677   }
00678   os << endl;
00679   delete[] s;
00680 }
00681
00682 bool Histogram::IsEmpty()
00683 {
00684   bool result=true;
00685   for (int h=0; h<(int)HistCount_; h++){
00686     result = result && (MaxHistEntry_[h]==0);
00687   }
00688   return result;
00689 }
00690
00691 int Histogram::WriteASCII(const std::string& filename)
00692 {
00693   // first write data file
00694   ofstream of(filename.c_str());
00695   if (!of){
00696     BIASERR("error opening "<<filename);
00697     return -1;
00698   }
00699
00700   WriteASCII(of);
00701
00702   if (!of){
00703     BIASERR("error writing "<<filename);
00704     return -2;
00705   }
00706   of.close();
00707
00708   return 0;
00709 }
00710
00711 void Histogram::WriteASCII(ostream& os)
00712 {
00713   os << "# "<<HistCount_<<" histogram(s) with "<<BinCount_<<" bins"<<endl;
00714   os << "# bin   - number of the bin\n";
00715   os << "# binb  - binborders: [binb, binb+1)\n";
00716   os << "# binv  - number of values contained in bin\n";
00717   os << "#"<<setw(7)<<"bin";
00718   double *bs=new double[HistCount_];
00719   for (int h=0; h<(int)HistCount_; h++){
00720     bs[h]=(MaxBinVal_[h]-MinBinVal_[h])/(double)BinCount_;
00721     os <<setw(15)<<"binb"<<setw(12)<<"binv";
00722   }
00723   os << endl;
00724   for (int b=0; b<(int)BinCount_; b++){
00725     os << setw(8) << b;
00726     for (int h=0; h<(int)HistCount_; h++){
00727       os <<setw(15) << MinBinVal_[h]+b*bs[h] << setw(12) << Hist_[h][b];
00728     }
00729     os << endl;
00730   }
00731   delete[] bs;
00732 }
00733
00734 void Histogram::CooTransf(double datacoo[2], double imcoo[2], unsigned hist)
00735 {
00736   double d[2];
00737   double maxy=(ScaleYToMaxEntry_)?(MaxHistEntry_[hist]):(NumData_[hist]);
00738
00739   d[0]=(datacoo[0]<MinBinVal_[hist])?(MinBinVal_[hist]):
00740     ((datacoo[0]>MaxBinVal_[hist])?(MaxBinVal_[hist]):(datacoo[0]));
00741   d[1]=(datacoo[1]<0.0)?(0.0):
00742     ((datacoo[1]>maxy)?(maxy):(datacoo[1]));
00743
00744   imcoo[0]=Factor_ *
00745     ((double)_uiBorder+(d[0]-MinBinVal_[hist])/BinSize_[hist]);
00746   imcoo[1]=Factor_ * ((double)_uiBorder+double((int)HistSize_-1)*
00747      (1.0-d[1]/maxy));
00748 }
00749
00750 void Histogram::CooTransf(double datacoo[2], unsigned imcoo[2], unsigned hist)
00751 {
00752   double d[2];
00753   CooTransf(datacoo, d, hist);
00754   imcoo[0]=(unsigned)rint(d[0]);
00755   imcoo[1]=(unsigned)rint(d[1]);
00756 }
00757
00758 /////////////////////////////////////////////////////////////////////////
00759 ///   Histogram2D
00760 /////////////////////////////////////////////////////////////////////////
00761
00762 Histogram2D::Histogram2D(unsigned short int zoomfactor)
00763   : Image<unsigned char>()
00764 {
00765   ColorModel_ = ImageBase::CM_RGB;
00766   InterleavedDataOrder_ = true;
00767   Factor_=zoomfactor;
00768   XBinCount_=YBinCount_=0;
00769   Hist_=NULL;
00770   MaxHistEntry_=XMinBinVal_=XMaxBinVal_=YMinBinVal_=YMaxBinVal_=0.0;
00771   XBinSize_=YBinSize_=0.0;
00772   _uiBorder=2;
00773   _ucBorderColor=128;
00774 }
00775
00776 Histogram2D::~Histogram2D()
00777 {
00778   _ReleaseHist();
00779 }
00780
00781 void Histogram2D::SetColorModel()
00782 {
00783   BIASERR("Histogram::SetColorModel() not valid for Histogram");
00784 }
00785
00786 void Histogram2D::SetFactor(unsigned short Factor)
00787 {
00788   Factor_ = Factor;
00789   InitHist(XBinCount_, YBinCount_);
00790 }
00791
00792 void Histogram2D::_ReleaseHist()
00793 {
00794   if (Hist_!=NULL){
00795     delete[] Hist_[0];
00796     delete[] Hist_;
00797   }
00798   XBinCount_=YBinCount_=0;
00799   Hist_=NULL;
00800   MaxHistEntry_=XMinBinVal_=XMaxBinVal_=YMinBinVal_=YMaxBinVal_=0.0;
00801   XBinSize_=YBinSize_=0.0;
00802   Release();
00803 }
00804
00805 void Histogram2D::InitHist(unsigned xbincount, unsigned ybincount)
00806 {
00807   if (Hist_!=NULL){
00808     _ReleaseHist();
00809   }
00810   XBinCount_=ybincount;
00811   YBinCount_=xbincount;
00812   Hist_=new double*[YBinCount_];
00813   Hist_[0]=new double[XBinCount_*YBinCount_];
00814   for (unsigned i=1; i<YBinCount_; i++)
00815     Hist_[i]=Hist_[i-1]+XBinCount_;
00816   // scale image with Factor_
00817   Init((XBinCount_ + 2 * _uiBorder) * Factor_ ,
00818        (YBinCount_ + 2 * _uiBorder) * Factor_ , 3);
00819   // white background
00820   FillImageWithConstValue(255);
00821 }
00822
00823 template <class DataType>
00824 void Histogram2D::AddHist(vector<DataType>& xdata, vector<DataType>& ydata)
00825 {
00826   DataType maxx=xdata.front(), minx=xdata.front(), maxy=ydata.front(),
00827     miny=ydata.front();
00828   typename vector<DataType>::iterator itx, ity;
00829   int xbin, ybin;
00830
00831   for (itx=xdata.begin(); itx!=xdata.end(); itx++){
00832     if (*itx>maxx) maxx=*itx;
00833     if (*itx<minx) minx=*itx;
00834   }
00835   for (ity=ydata.begin(); ity!=ydata.end(); ity++){
00836     if (*ity>maxy) maxy=*ity;
00837     if (*ity<miny) miny=*ity;
00838   }
00839   XMinBinVal_=(double)minx;
00840   XMaxBinVal_=(double)maxx;
00841   YMinBinVal_=(double)miny;
00842   YMaxBinVal_=(double)maxy;
00843
00844   XBinSize_=(XMaxBinVal_-XMinBinVal_)/(double)XBinCount_;
00845   YBinSize_=(YMaxBinVal_-YMinBinVal_)/(double)YBinCount_;
00846 #ifdef BIAS_DEBUG
00847   if (xdata.size()!=ydata.size()){
00848     BIASERR("data vectors have different size "<<xdata.size()<<" "
00849             <<ydata.size());
00850   }
00851 #endif
00852   for (itx=xdata.begin(), ity=ydata.begin(); itx!=xdata.end(); itx++, ity++){
00853     if (*itx==maxx){
00854       xbin=(int)XBinCount_-1;
00855     } else {
00856       xbin=(int)floor(double((*itx)-minx)/XBinSize_);
00857     }
00858     if (*ity==maxy){
00859       ybin=YBinCount_-1;
00860     } else {
00861       ybin=(int)floor(double((*ity)-miny)/YBinSize_);
00862     }
00863 #ifdef BIAS_DEBUG
00864     if (xbin<0 || ybin<0)
00865       BIASERR("invalid index "<<xbin<<" "<<ybin<<" "<<XBinCount_
00866               <<" "<<YBinCount_<<" "<<*itx<<" "<<*ity);
00867     if (xbin>=(int)XBinCount_ || ybin>=(int)YBinCount_ )
00868       BIASERR("invalid index "<<xbin<<" "<<ybin<<"   "<<*itx<<" "<<minx<<" "
00869               <<maxx<<" "<<XBinSize_<<" "<<XBinCount_<<"   "<<*ity<<" "<<miny
00870               <<" "<<maxy<<" "<<YBinSize_<<" "<<YBinCount_);
00871 #endif
00872     Hist_[ybin][xbin]++;
00873     if (Hist_[ybin][xbin]>MaxHistEntry_) MaxHistEntry_=Hist_[ybin][xbin];
00874   }
00875   /*
00876   cerr << "MaxHistEntry_="<<MaxHistEntry_<<endl;
00877   double av=0.0;
00878   for (unsigned y=0; y<YBinCount_; y++){
00879     for (unsigned x=0; x<XBinCount_; x++){
00880       av+=Hist_[y][x];
00881     }
00882   }
00883   cerr << "sum="<<av<<endl;
00884   cerr << "Average="<<av/double(YBinCount_*XBinCount_)<<endl;
00885   */
00886 }
00887
00888
00889 void Histogram2D::ZeroHist()
00890 {
00891   BIASASSERT(Hist_!=NULL);
00892   memset((void *)Hist_[0], 0, sizeof(double)*XBinCount_*YBinCount_);
00893 }
00894
00895 void Histogram2D::Draw()
00896 {
00897   BIASASSERT(Hist_!=NULL);
00898   unsigned char **ida=GetImageDataArray(), r, g, b=0;
00899   unsigned mx, my, a, f3=3*Factor_;
00900
00901   // draw border
00902   for (unsigned int i=0; i< Factor_ * _uiBorder; i++){
00903     memset((void *)(ida[i]), _ucBorderColor, GetWidthStep() *
00904            sizeof(unsigned char));
00905     memset((void *)(ida[GetHeight()-1-i]), _ucBorderColor,
00906            GetWidthStep() * sizeof(unsigned char) );
00907     for (unsigned int j=Factor_ * _uiBorder; j<GetHeight()-Factor_ * _uiBorder;
00908          j++){
00909       for (unsigned int c=0; c<GetChannelCount(); c++){
00910         ida[j][i*GetChannelCount()+c]=_ucBorderColor;
00911         ida[j][(GetWidth()-1-i)*GetChannelCount()+c]=_ucBorderColor;
00912       }
00913     }
00914   }
00915
00916   // draw histogram
00917   for (unsigned y=0; y<YBinCount_; y++){
00918     my=(_uiBorder+y)*Factor_;
00919     for (unsigned x=0; x<XBinCount_; x++){
00920       mx=(_uiBorder+x)*3*Factor_;
00921       if (Hist_[y][x]==0.0){
00922         r=g=0;
00923       } else {
00924         a=(unsigned)rint(Hist_[y][x]/MaxHistEntry_*255.0);
00925         if (Hist_[y][x]>MaxHistEntry_) {
00926           a=255;
00927           BIASERR("error in drawing depth");
00928         } // from green over yellow to red
00929         r=(a>=128)?255:(a*2);
00930         g=(a>=128)?((255-a)*2):255;
00931       }
00932 //       if (r==255 && g==0)
00933 //         cerr <<setw(4)<<x<<setw(4)<<y<<setw(10)<<Hist_[y][x]<<setw(6)<<a<<setw(6)<<(int)r<<setw(6)<<(int)g<<endl;
00934       for (int ro=0; ro<Factor_; ro++){
00935         for (unsigned c=0; c<f3; c+=3){
00936           ida[my+ro][mx+c]=r;
00937           ida[my+ro][mx+c+1]=g;
00938           ida[my+ro][mx+c+2]=b;
00939         }
00940       }
00941     }
00942   }
00943 }
00944
00945 void Histogram2D::DrawLog()
00946 {
00947   BIASASSERT(Hist_!=NULL);
00948   unsigned char **ida=GetImageDataArray(), r, g, b=0;
00949   unsigned mx, my, a, f3=3*Factor_;
00950
00951   // draw border
00952   for (unsigned int i=0; i< Factor_ * _uiBorder; i++){
00953     memset((void *)(ida[i]), _ucBorderColor, GetWidthStep() *
00954            sizeof(unsigned char));
00955     memset((void *)(ida[GetHeight()-1-i]), _ucBorderColor,
00956            GetWidthStep() * sizeof(unsigned char) );
00957     for (unsigned int j=Factor_ * _uiBorder; j<GetHeight()-Factor_ * _uiBorder;
00958          j++){
00959       for (unsigned int c=0; c<GetChannelCount(); c++){
00960         ida[j][i*GetChannelCount()+c]=_ucBorderColor;
00961         ida[j][(GetWidth()-1-i)*GetChannelCount()+c]=_ucBorderColor;
00962       }
00963     }
00964   }
00965
00966   // draw histogram
00967   for (unsigned y=0; y<YBinCount_; y++){
00968     my=(_uiBorder+YBinCount_-1-y)*Factor_;
00969     for (unsigned x=0; x<XBinCount_; x++){
00970       mx=(_uiBorder+x)*3*Factor_;
00971       if (Hist_[y][x]==0.0){
00972         r=g=0;
00973       } else {
00974         a=(unsigned)rint(log10((Hist_[y][x]/MaxHistEntry_)*9.0+1.0)*255.0);
00975         if (Hist_[y][x]>MaxHistEntry_) {
00976           a=255;
00977           BIASERR("error in drawing depth");
00978         } // from green over yellow to red
00979         r=(a>=128)?255:(a*2);
00980         g=(a>=128)?((255-a)*2):255;
00981       }
00982 //       if (r==255 && g==0)
00983 //         cerr <<setw(4)<<x<<setw(4)<<y<<setw(10)<<Hist_[y][x]<<setw(6)<<a<<setw(6)<<(int)r<<setw(6)<<(int)g<<endl;
00984       for (int ro=0; ro<Factor_; ro++){
00985         for (unsigned c=0; c<f3; c+=3){
00986           ida[my+ro][mx+c]=r;
00987           ida[my+ro][mx+c+1]=g;
00988           ida[my+ro][mx+c+2]=b;
00989         }
00990       }
00991     }
00992   }
00993 }
00994
00995 void Histogram2D::Dump(std::ostream& os)
00996 {
00997   os <<"# 2D Histogram with "<<XBinCount_<<" x "<<YBinCount_<<" bins\n"
00998      <<"# x bins from "<<XMinBinVal_<<" to "<<XMaxBinVal_<<endl
00999      <<"# y bins from "<<YMinBinVal_<<" to "<<YMaxBinVal_<<endl
01000      <<"# x, y        - coo of bin\n"
01001      <<"# xval, yval  - the value of the entries of the bin\n"
01002      <<"# count       - number of entries in bin\n"
01003      <<"#\n"
01004      <<"# "<<setw(4)<<"y"<<setw(15)<<"yval"<<setw(6)<<"x"<<setw(15)<<"xval"
01005      <<setw(15)<<"val"<<setw(6)<<"x"<<setw(15)<<"xval"<<setw(15)<<"val"
01006      <<setw(6)<<"x"<<setw(15)<<"xval"<<setw(15)<<"count"
01007      <<setw(6)<<"...\n";
01008   for (unsigned y=0; y<YBinCount_; y++){
01009     os << setw(6) << y << setw(15) << YMinBinVal_+y*YBinSize_;
01010     for (unsigned x=0; x<XBinCount_; x++){
01011       os << setw(6) << x << setw(15) << XMinBinVal_+x*XBinSize_
01012          << setw(15) << Hist_[y][x];
01013     }
01014     os << endl;
01015   }
01016 }
01017
01018 void Histogram2D::WriteASCII(std::ostream& os)
01019 {
01020   os <<"# 2D Histogram with "<<XBinCount_<<" x "<<YBinCount_<<" bins\n"
01021      <<"# x bins from "<<XMinBinVal_<<" to "<<XMaxBinVal_<<endl
01022      <<"# y bins from "<<YMinBinVal_<<" to "<<YMaxBinVal_<<endl
01023      <<"# x, y        - coo of bin\n"
01024      <<"# xval, yval  - the value of the entries of the bin\n"
01025      <<"# count       - number of entries in bin\n"
01026      <<"#\n"
01027      <<"# "<<setw(6)<<"y"<<setw(15)<<"yval"<<setw(8)<<"x"<<setw(15)<<"xval"
01028      <<setw(15)<<"count\n";
01029   for (unsigned y=0; y<YBinCount_; y++){
01030     for (unsigned x=0; x<XBinCount_; x++){
01031       os << setw(8) << y << setw(15) << YMinBinVal_+y*YBinSize_
01032          << setw(8) << x << setw(15) << XMinBinVal_+x*XBinSize_
01033          << setw(15) << Hist_[y][x] << endl;
01034     }
01035     os << endl << endl << endl;
01036   }
01037 }
01038
01039 void Histogram2D::CooTransf(double datacoo[2], double imcoo[2])
01040 {
01041   double d[2];
01042   d[0]=(datacoo[0]<XMinBinVal_)?(XMinBinVal_):
01043     ((datacoo[0]>XMaxBinVal_)?(XMaxBinVal_):(datacoo[0]));
01044   d[1]=(datacoo[1]<YMinBinVal_)?(YMinBinVal_):
01045     ((datacoo[1]>YMaxBinVal_)?(YMaxBinVal_):(datacoo[1]));
01046
01047   imcoo[0]=Factor_ * (_uiBorder + (d[0]-XMinBinVal_)/XBinSize_);
01048   imcoo[1]=Factor_ * (_uiBorder + (d[1]-YMinBinVal_)/YBinSize_);
01049
01050 }
01051
01052 void Histogram2D::CooTransf(double datacoo[2], unsigned imcoo[2])
01053 {
01054   double d[2];
01055   CooTransf(datacoo, d);
01056   imcoo[0]=(unsigned)rint(d[0]);
01057   imcoo[1]=(unsigned)rint(d[1]);
01058 }
01059
01060
01061
01062 ///
01063 /// must be at end of file cmenk, jw
01064 ///
01065
01066
01067 #define INST_ADDHIST(DataType)\
01068 template int  BIASImage_EXPORT Histogram::AddHist<DataType>(std::vector<DataType>& data, DataType min, DataType max, unsigned int hist ); \
01069 template int  BIASImage_EXPORT Histogram::AddHist<DataType>(std::vector<DataType>& data, unsigned int hist); \
01070 template void BIASImage_EXPORT Histogram2D::AddHist(std::vector<DataType>& xdata, std::vector<DataType>& ydata);
01071
01072 INST_ADDHIST(unsigned char)
01073 INST_ADDHIST(float)
01074 INST_ADDHIST(double)
01075 INST_ADDHIST(int)
01076 INST_ADDHIST(unsigned int)
01077
01078
01079
01080 #define INST_ADDHIST_IMG(DataType)\
01081 template int BIASImage_EXPORT Histogram::AddHist<DataType>(Image<DataType> &src, unsigned hist); \
01082
01083 #ifdef BUILD_IMAGE_UCHAR
01084 INST_ADDHIST_IMG(float)
01085 #endif
01086
01087 // no explicit instance as there is an exported specialization (cmenk, jw)
01088 //INST_ADDHIST_IMG(unsigned char);
01089
01090 #ifdef BUILD_IMAGE_INT
01091 INST_ADDHIST_IMG(int)
01092 #endif
01093 #ifdef BUILD_IMAGE_CHAR
01094 INST_ADDHIST_IMG(char)
01095 #endif
01096 #ifdef BUILD_IMAGE_SHORT
01097 INST_ADDHIST_IMG(short)
01098 #endif
01099 #ifdef BUILD_IMAGE_USHORT
01100 INST_ADDHIST_IMG(unsigned short)
01101 #endif
01102 #ifdef BUILD_IMAGE_UINT
01103 INST_ADDHIST_IMG(unsigned int)
01104 #endif
01105 #ifdef BUILD_IMAGE_DOUBLE
01106 INST_ADDHIST_IMG(double)
01107 #endif
01108
01109
01110 } // end namespace
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Histogram.hh Source File

Image

Histogram.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HISTOGRAM_HH__
00027 #define __HISTOGRAM_HH__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <vector>
00032
00033 #include <Base/Image/Image.hh>
00034 #include <Base/Math/Math.hh>
00035
00036 // start from big bits, because small bits are used in Image
00037 #define D_HIST_VEC 0x8000000
00038
00039 namespace BIAS{
00040
00041
00042   enum HistMode {HIST_POINTS, HIST_BARS, HIST_LINES};
00043
00044   /** @class Histogram
00045       @ingroup g_image
00046       @brief class for easy histogram generation
00047
00048       Automatically generate and draw some histograms in one image.
00049
00050       The histogram image has size bincount*zoomfactor+border by
00051       bincount*zoomfactor+border and can display some histograms simultanously.
00052       The zoomfactor represents the size of one point in the histogram image in
00053       pixel units. It can be set via the constructor Histogram().
00054       The Border is fixed to 2 pixel.
00055
00056       For usage, see ExampleHistogram.cpp or call successivly
00057       - InitHist()
00058
00059       - AddHist()
00060
00061       - Draw()
00062
00063       Two styles are possible: point (HIST_POINTS) and bar (HIST_BARS) style.
00064       Use SetDrawMode() for choosing a style.
00065
00066       Colors can be set for each histogram via SetColor().
00067
00068       see also ExampleHistogram.cpp
00069
00070       Since Histogram is derived from Image<unsigned char>, any drawing
00071       function working on Image<unsigned char> can be used on Histogram as
00072       well.
00073
00074       @author woelk */
00075
00076   class BIASImage_EXPORT Histogram : public Image<unsigned char>
00077   {
00078   public:
00079     ///
00080     Histogram(unsigned short int zoomfactor = 2);
00081     ~Histogram();
00082
00083     /// resizes Hist_
00084     void SetBinCount(unsigned int bincount);
00085
00086     inline unsigned int GetBinCount()
00087     { return BinCount_; };
00088
00089     inline unsigned int GetHistCount()
00090     { return HistCount_; };
00091
00092     /// sets the zoomfactor
00093     /** @todo factor also scales the y axis, this is most probably not desired*/
00094     void SetFactor(unsigned short Factor);
00095
00096     /// dummy function to avoid swapping color model in this class
00097     void SetColorModel();
00098
00099     /// Select drawing style. Default is HIST_POINTS
00100     void SetDrawMode(HistMode m) {Mode_ = m;};
00101
00102     /** Reserves internal data structures for histcount histograms. */
00103     void SetHistCount(unsigned int histcount);
00104
00105     /** reserves the internal data structures for histcount histograms with
00106         bincount bins in each in one image
00107         @author woelk */
00108     int InitHist(unsigned int bincount = 256, unsigned int histcount = 1);
00109
00110     /// releases internal data structures (Hist_)
00111     int ReleaseHist();
00112
00113     /** calculates the histogram of image and adds them to the internal data
00114         structures
00115         @author woelk */
00116     template <class StorageType>
00117     int AddHist(Image<StorageType>& Image, unsigned int hist = 0);
00118
00119     /** Calcluates the histogram from data and adds them to the internal data
00120         structures. Minimum and maximum data values are determined
00121         automatically and BinCount_ bins are calculated evenspaced between min
00122         and max.
00123         @author woelk */
00124     template <class DataType>
00125     int AddHist(std::vector<DataType>& data, unsigned int hist = 0);
00126     /* BinCount_ bins are deteremined between min and max
00127        @author woelk 07 2004 */
00128     template <class DataType>
00129     int AddHist(std::vector<DataType>& data, DataType min, DataType max,
00130                 unsigned int hist = 0);
00131
00132     /** for data[i] increase according bin about weight[i]
00133         @author woelk */
00134     template <class DataType>
00135     int AddWeightedHist(std::vector<DataType>& data,
00136                         std::vector<double>& weight, unsigned int hist = 0);
00137
00138     // sets color in which to draw hist num hist
00139     int SetColor(unsigned char R, unsigned char G, unsigned char B,
00140                  unsigned int hist = 0);
00141
00142     /// returns the range of the histogram, i.e. the data value associated
00143     /// with bin[0] and bin[bincount-1]
00144     inline void GetDataRange(double& min, double& max, unsigned int hist = 0)
00145     { min=MinBinVal_[hist] ; max=MaxBinVal_[hist]; }
00146
00147     /// returns the biggest bin in histogram hist
00148     inline void GetMaxHistEntry(double& maxentry, unsigned int hist = 0)
00149     { maxentry=MaxHistEntry_[hist]; }
00150
00151     /// if true, the upper border of histogram is MaxHistEntry, otherwise the
00152     /// upper border of histogram k is \sum_i Hist[k][i] = NumData_[k]
00153     inline void SetScaleYToMaxEntry(bool s)
00154     { ScaleYToMaxEntry_ = s; }
00155
00156     /** actually draws histogram(s) from the internal data structures */
00157     int Draw();
00158
00159     /** actually draws histogram(s) from the internal data structures
00160         uses a logarithmic y axis */
00161     int DrawLog();
00162
00163     /// zeros existing histogram
00164     int ZeroHist(unsigned int hist = 0);
00165
00166     /// Get the counted number of bin from hist, -1 for invalid bin/hist
00167     double GetBin(unsigned int bin, unsigned int hist=0);
00168
00169     /// Set the counted number of bin from hist to manipulate the histogram
00170     int SetBin(unsigned int bin, double value, unsigned int hist=0);
00171
00172     void Dump(std::ostream& os=std::cout);
00173
00174     /// writes ascii data to stream, can be used later e.g. with gnuplot
00175     void WriteASCII(std::ostream& os=std::cout);
00176
00177     /// opens file and calls  WriteASCII() with it
00178     int WriteASCII(const std::string& filename);
00179
00180     /** transforms data coordinates to image coordinates
00181         does automatic clipping */
00182     void CooTransf(double datacoo[2], double imcoo[2], unsigned hist=0);
00183     /** transforms data coordinates to image coordinates
00184         does automatic clipping and rounding */
00185     void CooTransf(double datacoo[2], unsigned imcoo[2], unsigned hist=0);
00186
00187     /** returns true if MaxHistEntry==0 for all histograms
00188         @author woelk 10/2004 */
00189     bool IsEmpty();
00190
00191   protected:
00192     unsigned short int HistCount_;
00193     unsigned int BinCount_; // number of bins in histogram
00194     double **Hist_; // array containing the histogram
00195     unsigned char **Color_; // array containing rgb values for every histogram
00196     unsigned int HistSize_; // height of histogram
00197     double *MaxHistEntry_; // contains the biggest entry in every histograms
00198     double *NumData_; // contains the number of data in each histogram
00199     unsigned short int Factor_; // scaling factor for drawing histogram
00200     double *Average_; // Average value for each hist
00201     HistMode Mode_;
00202     unsigned int _uiBorder; // border of the histogram
00203     unsigned char _ucBorderColor;
00204     double *MinBinVal_, *MaxBinVal_, *BinSize_;
00205     // should the upper border be MaxHistEntry, otherwise the
00206     // upper border of histogram k is \sum_i Hist[k][i]
00207     bool ScaleYToMaxEntry_;
00208
00209
00210     // only calls DeleteHist_ and DrawHist_
00211     int RedrawHist_(unsigned int hist);
00212
00213     // removes all image point with color of hist
00214     int DeleteHist_(unsigned int hist);
00215
00216     // draws histogram
00217     int DrawHist_(unsigned int hist);
00218
00219     // draws histogram
00220     int DrawHistLog_(unsigned int hist);
00221
00222     int CalcAverage_(unsigned int hist);
00223
00224   }; // class
00225
00226   class BIASImage_EXPORT Histogram2D : public Image<unsigned char>
00227   {
00228   public:
00229     Histogram2D(unsigned short zoomfactor = 2);
00230     ~Histogram2D();
00231
00232     /// dummy function to avoid swapping color model in this class
00233     void SetColorModel();
00234
00235     /// sets the zoomfactor
00236     void SetFactor(unsigned short Factor);
00237
00238     void InitHist(unsigned xbincount=256, unsigned ybincount=256);
00239
00240     template <class DataType>
00241     void AddHist(std::vector<DataType>& xdata, std::vector<DataType>& ydata);
00242
00243     void Draw();
00244
00245     void DrawLog();
00246
00247     void ZeroHist();
00248
00249     void Dump(std::ostream& os=std::cout);
00250
00251     /// writes ascii data to stream, can be used later e.g. with gnuplot
00252     void WriteASCII(std::ostream& os=std::cout);
00253
00254     /** transforms data coordinates to image coordinates
00255         automatic clipping of imcoo is performed */
00256     void CooTransf(double datacoo[2], double imcoo[2]);
00257     /** transforms data coordinates to image coordinates
00258         automatic clipping of imcoo is performed */
00259     void CooTransf(double datacoo[2], unsigned imcoo[2]);
00260
00261   protected:
00262     unsigned XBinCount_, YBinCount_;
00263     double **Hist_; // array containing the histogram
00264     double MaxHistEntry_; // contains the biggest entry in each histogram
00265     double XMinBinVal_, XMaxBinVal_, XBinSize_, YMinBinVal_, YMaxBinVal_,
00266       YBinSize_;
00267     unsigned int _uiBorder; // border of the histogram
00268     unsigned char _ucBorderColor;
00269     unsigned short int Factor_; // scaling factor for drawing histogram
00270
00271     void _ReleaseHist();
00272
00273   }; // class
00274
00275 } // namespace BIAS
00276
00277 #include <Base/Common/BIASpragmaEnd.hh>
00278
00279 #endif // __HISTOGRAM_HH__
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrix.cpp Source File

Geometry

HMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HMatrix.hh"
00027
00028 #include <MathAlgo/SVD.hh>
00029 #include <MathAlgo/Lapack.hh>
00030
00031
00032
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 HMatrix::HMatrix()
00038   : HMatrixBase()
00039 {}
00040
00041 HMatrix::HMatrix(Matrix3x3<double> Mat)
00042   : HMatrixBase(Mat)
00043 {}
00044
00045
00046 HMatrix& HMatrix::operator=(const HMatrix& mat)
00047
00048 {
00049   HMatrixBase::operator=(mat);
00050   return *this;
00051 }
00052
00053 HMatrix::~HMatrix()
00054 {}
00055
00056 void HMatrix::GetMappedRange(const unsigned int OrigWidth,
00057                              const unsigned int OrigHeight,
00058                              BIAS::Vector2<double> & corner,
00059                              double & sizeWidth, double & sizeHeight) const {
00060   double minX, maxX, minY, maxY; // extrema
00061
00062   // rect. coordinates of the 4 src. corners.
00063   BIAS::HomgPoint2D mapped[4];
00064
00065   // 0  3
00066   // 1  2
00067   mapped[0]= (*this) * BIAS::HomgPoint2D(0,         0,          1);
00068   // H * '0' left,  upper
00069
00070   mapped[1]= (*this) * BIAS::HomgPoint2D(0,         OrigHeight, 1);
00071   // H * '1' left,  lower
00072
00073   mapped[2]= (*this) * BIAS::HomgPoint2D(OrigWidth, OrigHeight, 1);
00074   // H * '2' right, lower
00075
00076   mapped[3]= (*this) * BIAS::HomgPoint2D(OrigWidth, 0,          1);
00077   // H * '3' right, upper
00078
00079   // calc. extrema(xmy) of mapped corners
00080   // init with first point:
00081   mapped[0].Homogenize(); // let w==1
00082   minX=maxX=mapped[0][0]; // x euclid
00083   minY=maxY=mapped[0][1]; // y suclid
00084   // homogenize and calc extrema
00085   for (unsigned int i=1; i<4; i++) {
00086     mapped[i].Homogenize();
00087     // find new extrema
00088     minX = (mapped[i][0]<minX) ? mapped[i][0] : minX; // x
00089     maxX = (mapped[i][0]>maxX) ? mapped[i][0] : maxX;
00090     minY = (mapped[i][1]<minY) ? mapped[i][1] : minY; // y
00091     maxY = (mapped[i][1]>maxY) ? mapped[i][1] : maxY;
00092   };
00093
00094   corner=BIAS::Vector2<double>(minX, minY);
00095   sizeWidth=maxX-minX;
00096   sizeHeight=maxY-minY;
00097 }
00098
00099
00100 double HMatrix::GetMappedError(const HomgPoint2D &PointPicOne,
00101                                const HomgPoint2D &PointPicTwo) const {
00102
00103   HomgPoint2D x1 = PointPicOne;
00104   HomgPoint2D x2 = PointPicTwo;
00105   x1.Homogenize();
00106   x2.Homogenize();
00107   HomgPoint2D mapped((*this) * x1);
00108   mapped.Homogenize();
00109   return (mapped[0]-x2[0])*(mapped[0]-x2[0]) +
00110     (mapped[1]-x2[1])*(mapped[1]-x2[1]);
00111 }
00112
00113 void HMatrix::GetJacobian(const HomgPoint2D& x, Matrix<double>& Jac) const {
00114 #ifdef BIAS_DEBUG
00115   if (!x.IsHomogenized()) {
00116     BIASERR("supplied unhomogenized point !");
00117     BIASABORT;
00118   }
00119   if ((Jac.GetRows()!=2) ||(Jac.GetCols()!=2)) {
00120     BIASERR("Jacobian has wrong size !");
00121     BIASABORT;
00122   }
00123 #endif
00124
00125   // ( x' y' )^T = H( (x y)^T), assume w==w'==1
00126   const double denominv = 1.0 / ((*this)[2][0]*x[0]+(*this)[2][1]*x[1]+
00127     (*this)[2][2]);
00128
00129   const double denomsquaredinv = denominv * denominv;
00130   const double enumx = ((*this)[0][0]*x[0]+(*this)[0][1]*x[1]+
00131     (*this)[0][2]) * denomsquaredinv;
00132   const double enumy = ((*this)[1][0]*x[0]+(*this)[1][1]*x[1]+
00133     (*this)[1][2]) * denomsquaredinv;
00134
00135   // x'/dx
00136   Jac[0][0] = ((*this)[0][0]*denominv - (*this)[2][0]*enumx);
00137   // x'/dy
00138   Jac[1][0] = ((*this)[0][1]*denominv - (*this)[2][1]*enumx);
00139   // y'/dx
00140   Jac[0][1] = ((*this)[1][0]*denominv - (*this)[2][0]*enumy);
00141   // y'/dy
00142   Jac[1][1] = ((*this)[1][1]*denominv - (*this)[2][1]*enumy);
00143 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrix.hh Source File

Geometry

HMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HMatrix_hh__
00027 #define __HMatrix_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Geometry/HMatrixBase.hh>
00031 #include <Base/Image/Image.hh>
00032
00033
00034 namespace BIAS{
00035
00036   /** @class HMatrix
00037       @ingroup g_geometry
00038       @brief a 3x3 Matrix describing projective transformations between planes
00039   */
00040   class BIASGeometry_EXPORT HMatrix : public HMatrixBase
00041   {
00042   public:
00043     HMatrix();
00044
00045     explicit HMatrix(const MatrixInitType& i)
00046       : HMatrixBase(i){};
00047
00048     HMatrix(Matrix3x3<double> Mat);
00049
00050     ~HMatrix();
00051
00052     HMatrix& operator=(const HMatrix& mat);
00053
00054     /** maps the rectangle (0,0),(OrigWidth,OrigHeight) with this H
00055         and computes mapped range as corner + size. JW 07/2003 */
00056     void GetMappedRange(const unsigned int OrigWidth,
00057                         const unsigned int OrigHeight,
00058                         BIAS::Vector2<double> & corner,
00059                         double & sizeWidth, double & sizeHeight) const;
00060
00061     /** @return the squared distance between the mapped point from
00062         the first picture and the measured point in the second picture
00063         @author mdunad 02 2004 */
00064     double GetMappedError(const BIAS::HomgPoint2D &PointPicOne,
00065                           const BIAS::HomgPoint2D &PointPicTwo) const;
00066
00067     /** @brief returns jacobian of H: R^2 --> R^2
00068
00069         H as a mapping of 2D to 2D is not always a linear mapping, because of
00070         the nonlinear homogenization. This function returns the 2x2 Jacobian
00071         matrix at the point x. You have to pass homogenized points and a
00072         correctly sized jacobian
00073
00074         @param x homogenized point (real point in R^2) for the jacobian
00075         @param Jac (output) 2x2 jacobian at x
00076         @author koeser 04/2005 */
00077     void GetJacobian(const HomgPoint2D& x, Matrix<double>& Jac) const;
00078
00079
00080   };
00081
00082
00083 }// namespace
00084
00085 #endif // __HMatrix_hh__
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HMatrixBase.cpp Source File

Base » Geometry

HMatrixBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HMatrixBase.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 HMatrixBase::~HMatrixBase()
00032 {}
00033
00034
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HMatrixBase.hh Source File

Base » Geometry

HMatrixBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_HMatrixBase_hh_
00027 #define _BIAS_HMatrixBase_hh_
00028 #include "bias_config.h"
00029
00030
00031 #include <Base/Debug/Error.hh>
00032 #include <Base/Debug/Debug.hh>
00033 #include <Base/Math/Matrix3x3.hh>
00034
00035 #include "HomgPoint2D.hh"
00036
00037 #define HMATRIX_TYPE double
00038
00039 #define D_HM_COMP 0x0001
00040 namespace BIAS {
00041
00042 /**
00043     @class HMatrixBase
00044     @ingroup g_geometry
00045     @brief describes a homography
00046
00047     A HMatrixBase describes a homography (mapping between two planes) between
00048     homogenous 2D coordinates by a 3x3 Matrix.
00049     It is derived from Matrix3x3.
00050     Only implementation very specific to HMatrixBase (and not valid for general
00051     3x3 matrices, e.g. like decomposition)
00052     should be implemented here.
00053     @author Jan Woetzel
00054     @status alpha (04/18/2002) now a direct child of Matrix3x3
00055     (and no more of Matrix<HMATRIX_TYPE>)
00056     alpha (02/26/2002)**/
00057
00058   class BIASGeometryBase_EXPORT HMatrixBase : public Matrix3x3<HMATRIX_TYPE>
00059   {
00060   public:
00061     /** default constructor
00062         @status alpha (02/25/2002) , tested in part **/
00063     HMatrixBase() : Matrix3x3<HMATRIX_TYPE>() {};
00064
00065     // DEPRECATED due to instantiation problem JW
00066     //explicit HMatrixBase(const char *s) : Matrix3x3<HMATRIX_TYPE>(s) {};
00067
00068     /** constructor setting identity or zero
00069         @brief author koeser **/
00070     explicit HMatrixBase(const MatrixInitType& i) :
00071       Matrix3x3<HMATRIX_TYPE>(i) {};
00072
00073     /** @author Jan Woetzel
00074         @status untested (02/25/2002) **/
00075     HMatrixBase(const HMatrixBase& A) : Matrix3x3<HMATRIX_TYPE>(A) {};
00076
00077     HMatrixBase(const Matrix3x3<HMATRIX_TYPE>& A) : Matrix3x3<HMATRIX_TYPE>(A)
00078     {};
00079
00080     HMatrixBase(const Matrix<HMATRIX_TYPE>& A) : Matrix3x3<HMATRIX_TYPE>(A) {};
00081
00082     ~HMatrixBase();
00083
00084     /** assignment operators calls corresponding operator from parent
00085         @author Felix Woelk
00086         @status alpha (10/28/2002) **/
00087     inline HMatrixBase& operator= (const HMatrixBase& mat) {
00088       Matrix3x3<HMATRIX_TYPE>::operator= (mat);
00089       return *this;
00090     };
00091
00092   }; // class HMatrixBase
00093 } // end of namespace BIAS
00094 #endif // _BIAS_HMatrixBase_hh_
00095
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrixEstimation.cpp Source File

Geometry

HMatrixEstimation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HMatrixEstimation.hh"
00027
00028 #include <MathAlgo/SVD.hh>
00029 #include <MathAlgo/Lapack.hh>
00030 #include <Base/Geometry/KMatrix.hh>
00031 #include "Parametrization.hh"
00032 #include "MathAlgo/Minpack.hh"
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037
00038
00039 HMatrixEstimation *pCurrentObjectH = NULL;
00040 Parametrization *ParaH = NULL;
00041
00042
00043 void HErrorFunction(int *m, int *n, double *x,
00044                     double *fvec, int *iflag) {
00045   vector<double> params;
00046   params.reserve(8);
00047   for (unsigned int i=0; i<8; i++) params.push_back(x[i]);
00048   BIAS::HMatrix H;
00049   ParaH->ParamsToHMatrix(H, params);
00050   HMatrix Hinv = H.Invert();
00051   const unsigned int uiDataSize = 4*pCurrentObjectH->p1_->size();
00052   const vector<BIAS::HomgPoint2D> &p1 = *pCurrentObjectH->p1_;
00053   const vector<BIAS::HomgPoint2D> &p2 = *pCurrentObjectH->p2_;
00054
00055   double errorsum = 0;
00056   for (unsigned int j=0; j<uiDataSize; j+=4) {
00057     HomgPoint2D ep1=Hinv*p2[j/4];
00058     ep1.Homogenize();
00059     fvec[j]   = ep1[0]-p1[j/4][0];
00060     fvec[j+1] = ep1[1]-p1[j/4][1];
00061     HomgPoint2D ep2=H*p1[j/4];
00062     ep2.Homogenize();
00063     fvec[j+2] = ep2[0]-p2[j/4][0];
00064     fvec[j+3] = ep2[1]-p2[j/4][1];
00065     errorsum += (ep1-p1[j/4]).NormL2() +(ep2-p2[j/4]).NormL2();
00066   }
00067   cout<<errorsum<<" "<<H<<flush<<endl;
00068 }
00069
00070 int HMatrixEstimation::Optimize(BIAS::HMatrix& H,
00071                                 const std::vector<BIAS::HomgPoint2D> &p1,
00072                                 const std::vector<BIAS::HomgPoint2D> &p2) {
00073 #ifdef BIAS_DEBUG
00074   if (p1.size()!=p2.size()) {
00075     BIASERR("Vectors of corresponding points have different sizes !!!");
00076     BIASABORT;
00077   }
00078   if (p1.size()<5) {
00079     BIASERR("Too few points to optimize: "<<p1.size());
00080     return -1;
00081   }
00082 #endif
00083
00084
00085   // we need to call an external function from levenberg-marquardt,
00086   // prepare data structs
00087   // warning: this section is not thread safe !
00088   p1_ = &p1;
00089   p2_ = &p2;
00090   pCurrentObjectH = this;
00091
00092   vector<double> vecHParamsStart, vecHParamsResult;
00093   Vector<double> HParamsStart(8), HParamsResult(8);
00094   ParaH = new Parametrization;
00095   ParaH->HMatrixToParams(H, vecHParamsStart);
00096   for (unsigned int i=0; i<8; i++)  HParamsStart[i] = vecHParamsStart[i];
00097   int res;
00098   if ((res = LevenbergMarquardt(&HErrorFunction, p1.size()*4,8,
00099                                 HParamsStart, HParamsResult,
00100                                 MINPACK_DEF_TOLERANCE, LM_DEF_MAX_ITER))!=0) {
00101     BIASERR("Error in Levenberg-Marquardt-Optimization of H: "<<res);
00102     abort();
00103     return res;
00104   }
00105   vecHParamsResult.resize(8);
00106   for (unsigned int i=0; i<7; i++)  vecHParamsResult[i] = HParamsResult[i];
00107   ParaH->ParamsToHMatrix(H, vecHParamsResult);
00108   delete ParaH;
00109   ParaH = NULL;
00110 #ifdef BIAS_DEBUG
00111   pCurrentObjectH = NULL;
00112   p1_ = NULL;
00113   p2_ = NULL;
00114 #endif
00115
00116   return 0;
00117 }
00118
00119
00120
00121
00122
00123
00124
00125 int HMatrixEstimation::Compute(const vector<BIAS::HomgPoint2D>& points1,
00126                                const vector<BIAS::HomgPoint2D>& points2,
00127                                HMatrix& H) {
00128
00129   int result = 0;
00130   BIASASSERT(points1.size()==points2.size());
00131   if ((int) points1.size()<4){
00132     BIASERR("at least 4 points correspondences are needed for HMatrixBase "
00133             <<"computation");
00134     return -1;
00135   }
00136   pointsFrom_=points1;
00137   pointsTo_=points2;
00138
00139   const std::vector<BIAS::HomgPoint2D> *pp1 = &points1;
00140   const std::vector<BIAS::HomgPoint2D> *pp2 = &points2;
00141   std::vector<BIAS::HomgPoint2D> p1norm;
00142   std::vector<BIAS::HomgPoint2D> p2norm;
00143   KMatrix K1, K2;
00144   if (normalizeHartley_) {
00145     normalization_.Hartley(points1, p1norm, K1);
00146     normalization_.Hartley(points2, p2norm, K2);
00147     pp1 = &p1norm;
00148     pp2 = &p2norm;
00149   }
00150
00151   Matrix<double> A(2*points1.size(), 9);
00152   Vector<double> S;
00153   Matrix<double> U, VT;
00154
00155   register unsigned int p=0, p2=0;
00156   for (p=0, p2=0; p<2*(*pp1).size(); p+=2, p2++){
00157
00158     A[p][0] = A[p][1] = A[p][2] = 0.0;
00159     A[p+1][3] = A[p+1][4] = A[p+1][5] = 0.0;
00160
00161     A[p+1][0] = (*pp2)[p2][2] * (*pp1)[p2][0];
00162     A[p+1][1] = (*pp2)[p2][2] * (*pp1)[p2][1];
00163     A[p+1][2] = (*pp2)[p2][2] * (*pp1)[p2][2];
00164
00165     A[p][3] = - A[p+1][0];
00166     A[p][4] = - A[p+1][1];
00167     A[p][5] = - A[p+1][2];
00168
00169     A[p][6] = (*pp2)[p2][1] * (*pp1)[p2][0];
00170     A[p][7] = (*pp2)[p2][1] * (*pp1)[p2][1];
00171     A[p][8] = (*pp2)[p2][1] * (*pp1)[p2][2];
00172
00173     A[p+1][6] = - (*pp2)[p2][0] * (*pp1)[p2][0];
00174     A[p+1][7] = - (*pp2)[p2][0] * (*pp1)[p2][1];
00175     A[p+1][8] = - (*pp2)[p2][0] * (*pp1)[p2][2];
00176   }
00177
00178   result = General_singular_value_decomposition(A, S, U, VT);
00179
00180   if (result == 0){
00181     for (p=0; p<9; p++){
00182       H.GetData()[p] = VT[8][p];
00183     }
00184   } else {
00185     H.SetZero();
00186   }
00187
00188   // undo normalization
00189   if (normalizeHartley_) H = K2.Invert() * H * K1;
00190
00191   H_=H;
00192   return result;
00193 }
00194
00195 int HMatrixEstimation::ComputeAffine(const vector<BIAS::HomgPoint2D>& points1,
00196                                      const vector<BIAS::HomgPoint2D>& points2,
00197                                      HMatrix& H) {
00198
00199   // use direct linear transformation on point pairs (p', p^T)
00200   // p^T crossproduct  HMatrix * p' = 0
00201   // leads to  A * hvector = 0
00202   // where A is a matrix compute from p and p'
00203
00204   BIASASSERT(points1.size()==points2.size());
00205
00206   pointsFrom_=points1;
00207   pointsTo_=points2;
00208
00209   // perform hartley normalization, if desired
00210   const std::vector<BIAS::HomgPoint2D> *pp1 = &points1;
00211   const std::vector<BIAS::HomgPoint2D> *pp2 = &points2;
00212   std::vector<BIAS::HomgPoint2D> p1norm;
00213   std::vector<BIAS::HomgPoint2D> p2norm;
00214   KMatrix K1, K2;
00215   if (normalizeHartley_) {
00216     normalization_.Hartley(points1, p1norm, K1);
00217     normalization_.Hartley(points2, p2norm, K2);
00218     pp1 = &p1norm;
00219     pp2 = &p2norm;
00220   }
00221
00222   // init model matrix with zero
00223   Matrix<double> A(2*points1.size(), 7, MatrixZero);
00224   H.SetIdentity();
00225
00226   // fill rest of model matrix, same as for general H case, but leaving
00227   // out last row of H (only 7 parameters of which one is redundant)
00228   const unsigned int nummeas = 2*(*pp1).size();
00229   for (register unsigned int p=0, p2=0; p<nummeas; p+=2, p2++){
00230     A[p][3]   = -(A[p+1][0] = (*pp2)[p2][2] * (*pp1)[p2][0]);
00231     A[p][4]   = -(A[p+1][1] = (*pp2)[p2][2] * (*pp1)[p2][1]);
00232     A[p][5]   = -(A[p+1][2] = (*pp2)[p2][2] * (*pp1)[p2][2]);
00233
00234     A[p][6]   =   (*pp2)[p2][1] * (*pp1)[p2][2];
00235     A[p+1][6] = - (*pp2)[p2][0] * (*pp1)[p2][2];
00236   }
00237
00238   // solve using svd (at least 1d solution space)
00239   Vector<double> S;
00240   Matrix<double> U, VT;
00241   if (General_singular_value_decomposition(A, S, U, VT) == 0){
00242     // normalize to H[2][2] = 1
00243     const HMATRIX_TYPE normalization = 1.0 / VT[6][6];
00244     HMATRIX_TYPE* pHData = H.GetData();
00245     for (int p=0; p<6; p++){
00246        *pHData++ = VT[6][p] * normalization;
00247     }
00248   } else {
00249     // svd failed, no solution
00250     return -1;
00251   }
00252
00253   // undo normalization
00254   if (normalizeHartley_) H = K2.Invert() * H * K1;
00255
00256   H_=H;
00257
00258   return 0;
00259 }
00260
00261 int
00262 HMatrixEstimation::Compute(const std::vector<Vector2<double> >& frompoints,
00263                            const std::vector<Vector2<double> >& topoints,
00264                            HMatrix &H)
00265 {
00266 #ifdef BIAS_DEBUG
00267   if (frompoints.size()!= topoints.size()) {
00268     BIASERR("lists fromPoints and toPoints are of different size!");
00269     return -5;
00270   }
00271 #endif
00272   vector<BIAS::HomgPoint2D> fromPointsHomg( frompoints.size() );
00273   vector<BIAS::HomgPoint2D> toPointsHomg( topoints.size() );
00274   for (unsigned int i=0;i<frompoints.size();i++) {
00275     fromPointsHomg[i][0]= frompoints[i][0];
00276     fromPointsHomg[i][1]= frompoints[i][1];
00277     fromPointsHomg[i][2]= 1.0;
00278     toPointsHomg[i][0]= topoints[i][0];
00279     toPointsHomg[i][1]= topoints[i][1];
00280     toPointsHomg[i][2]= 1.0;
00281   }
00282   return Compute(fromPointsHomg, toPointsHomg, H);
00283 }
00284
00285 double HMatrixEstimation::GetError()
00286 {
00287   double err=0;
00288   BIAS::HomgPoint2D mapped;
00289   for (unsigned int c=0;c<pointsFrom_.size();c++) {
00290     mapped= H_ * pointsFrom_[c];
00291     mapped.Homogenize();
00292     mapped-=pointsTo_[c];
00293     err+=mapped[0]*mapped[0] + mapped[1]*mapped[1];
00294   }
00295   err/= (double)pointsFrom_.size();
00296   return err;
00297 }
00298
00299
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/HMatrixEstimation.hh Source File

Geometry

HMatrixEstimation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HMatrixEstimation_hh__
00027 #define __HMatrixEstimation_hh__
00028 #include "bias_config.h"
00029
00030 #include <Geometry/HMatrix.hh>
00031 #include <Base/Geometry/Normalization.hh>
00032
00033 namespace BIAS {
00034
00035   /** @class HMatrixEstimation
00036       @ingroup g_geometry
00037       @brief estimate 3x3 Matrix (homography, affine transformation, ...)
00038
00039       code was originally in HMatrix, moved and extended by koeser 12/2005
00040   */
00041   class BIASGeometry_EXPORT HMatrixEstimation
00042   {
00043   public:
00044
00045     explicit HMatrixEstimation(bool normalizehartley=true) {
00046       normalizeHartley_ = normalizehartley; }
00047
00048     /** calculatinges H using the basic linear transformation algorithm
00049         (see Hartley, Zisserman "Multiple View Geometry", p.73)
00050         p'=Hp -> (homg. coo) [p']x Hp = 0
00051         3 row linear system, but rank 2 -> take only first two rows
00052         p=1...numpoints -> 2*numpoints equations
00053         solve A*h=0 with SVD
00054
00055         @author Woelk/Frahm */
00056     int Compute(const std::vector<BIAS::HomgPoint2D>& frompoints,
00057                 const std::vector<BIAS::HomgPoint2D>& topoints,
00058                 HMatrix& H);
00059
00060     /** @brief optimize a given HMatrix regarding n 2d point correspondences
00061
00062         minimize an error function on H matrix using iterative
00063         nonlinear optimization techniques such as Levenberg/Marquardt
00064         @attention susceptable to local minima, provide good starting point H
00065         @param H matrix which is optimized
00066         @param p1 (homogenized!) points in image 1
00067         @param p2 corresponding (homogenized!) points in image 2
00068         @return 0=success, !=0: error
00069         @author koeser 06/2006 */
00070     int Optimize(BIAS::HMatrix& H,
00071                  const std::vector<BIAS::HomgPoint2D> &p1,
00072                  const std::vector<BIAS::HomgPoint2D> &p2);
00073
00074
00075
00076
00077
00078
00079
00080     /** @brief compute affine transformation (not using DLT !)
00081         @author koeser 12/2005 */
00082     int ComputeAffine(const std::vector<BIAS::HomgPoint2D>& frompoints,
00083                       const std::vector<BIAS::HomgPoint2D>& topoints,
00084                       HMatrix& H);
00085
00086     /** returns the average squared error of the estimation applying the H
00087         to all correspondences
00088     */
00089     double GetError();
00090
00091     /** same as above, different interface, calls Compute(HomgPoints)
00092         @author grest, May 2006
00093      */
00094     int Compute(const std::vector<BIAS::Vector2<double> >& frompoints,
00095                 const std::vector<BIAS::Vector2<double> >& topoints,
00096                 HMatrix &H);
00097
00098     /// pointer to vector of points in image1 (hack for Optimize)
00099     std::vector<BIAS::HomgPoint2D> const *p1_;
00100     /// pointer to vector of points in image2 (hack for Optimize)
00101     std::vector<BIAS::HomgPoint2D> const *p2_;
00102
00103   protected:
00104
00105     // exports for dll (cmenk)
00106     BIAS_EXPORT_STL_VECTOR( BIASGeometry_EXPORT, BIAS::HomgPoint2D )
00107
00108     /// flag indicating whether we should normalize the given points before
00109         /// and denormalize the fmatrix after computation, so that it refers to
00110         /// the original points
00111         bool normalizeHartley_;
00112
00113         /// the normalization object
00114         Normalization normalization_;
00115
00116     HMatrix H_; // the estimated H matrix, needed in GetError()
00117     std::vector<BIAS::HomgPoint2D> pointsFrom_;
00118     std::vector<BIAS::HomgPoint2D> pointsTo_;
00119
00120   };
00121
00122
00123 }// namespace
00124
00125 #endif // __HMatrixEstimation_hh__
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/HMatrixTest.cpp Source File

Geometry » Examples

HMatrixTest.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // BIAS
00026 #include "Geometry/HMatrixEstimation.hh"
00027 #include "Base/Math/Random.hh"
00028
00029 using namespace std;
00030 using namespace BIAS;
00031
00032 // ---------------------------------------------------------------------------
00033 int main(int /*argc*/, char** /*argv*/)
00034 {
00035
00036   HMatrix TheoH(MatrixIdentity), EstH(MatrixZero);
00037
00038   // set homography TheoH
00039   TheoH[0][0]=1.5; TheoH[0][1]=  0; TheoH[0][2]=10;
00040   TheoH[1][0]=  0; TheoH[1][1]=2.1; TheoH[1][2]=100;
00041   TheoH[2][0]=  0; TheoH[2][1]=  0; TheoH[2][2]=1;
00042   // H-matrix
00043   std::vector<HomgPoint2D> points_src;
00044   std::vector<HomgPoint2D> points_dest, points_dest_with_out;
00045
00046   Random R;
00047   const double noise = 0.3;
00048
00049   // build pointsets 2D for computation
00050   for (int i = 0; i <100; i++){
00051     // 2D point
00052     HomgPoint2D point2d_im1;
00053     for (int k=0; k<2; k++)
00054       // point coordinate between 0 and 1000
00055       point2d_im1[k]=1000.0*rand()/(RAND_MAX+1.0);
00056     point2d_im1[2]=1;
00057
00058     // project the point2d to the second image
00059     HomgPoint2D point2d_im2 = TheoH * point2d_im1;
00060     point2d_im2.Homogenize();
00061
00062
00063     point2d_im1[0] += R.GetNormalDistributed(0, noise);
00064     point2d_im2[0] += R.GetNormalDistributed(0, noise);
00065     point2d_im1[1] += R.GetNormalDistributed(0, noise);
00066     point2d_im2[1] += R.GetNormalDistributed(0, noise);
00067
00068     // build correspondences
00069     points_src.push_back(point2d_im1);
00070     points_dest.push_back(point2d_im2);
00071   }
00072
00073   // estimation of H (linearly)
00074   HMatrixEstimation HEstimator;
00075   HEstimator.ComputeAffine(points_src, points_dest, EstH);
00076
00077   // normalize H to contain a one in the lower right corner
00078   if (fabs(EstH[2][2])>1e-50) EstH /= EstH[2][2];
00079
00080   cout << "H ground truth is " << TheoH << endl;
00081
00082
00083   cout << "H Est is " << EstH << endl;
00084
00085   return 0;
00086 }
00087
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine2D.cpp Source File

Base » Geometry

HomgLine2D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgLine2D.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 bool
00032 HomgLine2D::GetIntersectionsWithImage(unsigned int width, unsigned int height,
00033                       unsigned int coo[4])
00034 {
00035   int intersectioncount = 0;
00036   HomgPoint2D edges[4]; // 0=left, 1=right, 2=top, 3=bottom
00037   HomgLine2D left(-1.0, 0.0, 0.0);
00038   HomgLine2D right(-1.0, 0.0, width-1);
00039   HomgLine2D top(0.0, -1.0, 0.0);
00040   HomgLine2D bottom(0.0, -1.0, height-1);
00041
00042   edges[0] = Intersection(left);
00043   edges[1] = Intersection(right);
00044   edges[2] = Intersection(top);
00045   edges[3] = Intersection(bottom);
00046
00047 //    cerr << "HomghLine2D.cc:" << endl;
00048 //    for (int i =0; i<4; i++){
00049 //      cerr << "edges[" << i << "] : " << edges[i] << endl;
00050 //    }
00051
00052   // deal with compiler precision
00053   for (unsigned int i=0; i<4; i++){
00054     if (edges[i][0] < 0.0 && edges[i][0] > -HOMGLINE2D_EPS)
00055       edges[i][0] = 0.0;
00056     if (edges[i][1] < 0.0 && edges[i][1] > -HOMGLINE2D_EPS)
00057       edges[i][1] = 0.0;
00058     if (edges[i][0] > width &&
00059     edges[i][0] < width +HOMGLINE2D_EPS)
00060       edges[i][0] = width;
00061     if (edges[i][1] > height &&
00062     edges[i][1] < height +HOMGLINE2D_EPS)
00063       edges[i][1] = height;
00064   }
00065
00066   // left
00067   if (((edges[0][2] <-HOMGLINE2D_EPS) || (edges[0][2] > HOMGLINE2D_EPS) )&&
00068       (edges[0][1]>=0 && edges[0][1]<=height-1)){
00069     intersectioncount++;
00070     coo[0] = 0;
00071     coo[1] = (unsigned int)rint(edges[0][1]);
00072   }
00073   // right
00074   if (((edges[1][2] <-HOMGLINE2D_EPS) || (edges[0][2] > HOMGLINE2D_EPS) )&&
00075       (edges[1][1]>=0 && edges[1][1]<=height-1)){
00076     if (intersectioncount==0){
00077       coo[0] = width - 1;
00078       coo[1] = (unsigned int)rint(edges[1][1]/edges[1][2]);
00079     } else {
00080       coo[2] = width - 1;
00081       coo[3] = (unsigned int)rint(edges[1][1]/edges[1][2]);
00082     }
00083     intersectioncount++;
00084   }
00085   // top
00086   if (((edges[2][2] <-HOMGLINE2D_EPS) || (edges[2][2] > HOMGLINE2D_EPS) )&&
00087       (edges[2][0]>=0 && edges[2][0]<=width-1)){
00088     switch (intersectioncount){
00089     case 0:
00090       coo[0] = (unsigned int)rint(edges[2][0]/edges[2][2]);
00091       coo[1] = 0;
00092       break;
00093     case 1:
00094       coo[2] = (unsigned int)rint(edges[2][0]/edges[2][2]);
00095       coo[3] = 0;
00096       break;
00097     default:
00098       break;
00099     }
00100     intersectioncount++;
00101   }
00102   // bottom
00103   if (((edges[3][2] <-HOMGLINE2D_EPS) || (edges[3][2] > HOMGLINE2D_EPS) )&&
00104       (edges[3][0]>=0 && edges[3][0]<=width-1)){
00105     switch (intersectioncount){
00106     case 0:
00107       coo[0] = (unsigned int)rint(edges[3][0]/edges[3][2]);
00108       coo[1] = height -1;
00109       break;
00110     case 1:
00111       coo[2] = (unsigned int)rint(edges[3][0]/edges[3][2]);
00112       coo[3] = height -1;
00113       break;
00114     case 2:
00115       if (sqrt(pow((float)(coo[0]-coo[2]),2) + pow((float)(coo[1]-coo[3]),2))<
00116       sqrt(pow((float)(coo[0]-(unsigned int)rint(edges[3][0]/edges[3][2])),2) +
00117            pow((float)(coo[1]-(height -1)),2))){
00118     coo[2] = (unsigned int)rint(edges[3][0]/edges[3][2]);
00119     coo[3] = height -1;
00120       }
00121       break;
00122     default:
00123       break;
00124     }
00125     intersectioncount++;
00126   }
00127
00128
00129   return (intersectioncount >1);
00130 }
00131
00132
00133
00134
00135
00136
00137
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine2D.hh Source File

Base » Geometry

HomgLine2D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HOMGLINE2D_HH__
00027 #define __HOMGLINE2D_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032
00033 #include <Base/Math/Vector3.hh>
00034
00035 #include "HomgPoint2D.hh"
00036
00037 #define HOMGLINE2D_TYPE double
00038 // values whose abs is < epsilon are handled as zero
00039 #define HOMGLINE2D_EPS 1E-12
00040
00041 namespace BIAS {
00042
00043   class BIASGeometryBase_EXPORT HomgLine2D : public Vector3 <HOMGLINE2D_TYPE>
00044   {
00045     /** @class HomgLine2D
00046         @ingroup g_geometry
00047         a line l = (a b c)^T is a form of the implicit straight line equation
00048         0 = a*x + b*y + c
00049         if homogenized, a^2 + b^2 = 1
00050         beware: (a b) is the vector perpendicular to the line direction
00051                 therefor b could be interpreted as dx,
00052                 but then a is equal to -dy
00053         @author woelk 08 2002      */
00054   public:
00055
00056     inline HomgLine2D();
00057
00058     explicit inline HomgLine2D(const Vector3<HOMGLINE2D_TYPE>& vec);
00059
00060     inline HomgLine2D(HOMGLINE2D_TYPE a, HOMGLINE2D_TYPE b, HOMGLINE2D_TYPE c);
00061
00062     /// copy constructor
00063     inline HomgLine2D(const HomgLine2D& line);
00064
00065     /** constructing a line through two points */
00066     inline HomgLine2D(const HomgPoint2D& p1, const HomgPoint2D& p2);
00067
00068     /// destructor
00069     ~HomgLine2D() {};
00070
00071     /** constructing a line through two points */
00072     inline void Set(const HomgPoint2D& p1, const HomgPoint2D& p2);
00073
00074     /** returns length of hypothenuse in gradient triangle */
00075     inline HOMGLINE2D_TYPE GetW();
00076
00077     /** aequivalent to homogenize for points
00078         the gradient triangle is normed to hypothenuse length of 1 */
00079     inline void Homogenize();
00080
00081     /** calculates distance of a point from line */
00082     inline HOMGLINE2D_TYPE Distance(HomgPoint2D& point)
00083     { return sqrt(DistanceSquared(point)); };
00084
00085     /** calculates distance of a point from line */
00086     inline HOMGLINE2D_TYPE Distance(const HomgPoint2D& point)
00087     { return sqrt(DistanceSquared(point)); };
00088
00089
00090     /** calculates squared distance of a point from line */
00091     //inline HOMGLINE2D_TYPE DistanceSquared(HomgPoint2D& point);
00092
00093     /** calculates squared distance of a point from line */
00094     inline HOMGLINE2D_TYPE DistanceSquared(const HomgPoint2D& point);
00095
00096     /** calculates homogenized intersection of two lines */
00097     inline void Intersection(HomgLine2D& line, HomgPoint2D& intersect) const;
00098
00099     /** calls the above */
00100     inline HomgPoint2D Intersection(HomgLine2D& line) const;
00101
00102     /** ! assumes line is given in pixel coo !
00103         returns true if line intersects with image of given size
00104         returns intersections with image ( x1 = coo[0], y1 = coo[1],
00105         x2 = coo[2], y2 = coo[3] ) for usage with DrawLine */
00106     bool GetIntersectionsWithImage(unsigned int width, unsigned int height,
00107                                    unsigned int coo[4]);
00108
00109     /** return perpendicular line throug point */
00110     inline void GetPerpendicularLine(HomgPoint2D& point, HomgLine2D& perpline);
00111
00112
00113
00114   };
00115
00116   ///////////////////////////////////////////////////////////////////
00117   // inline implementations
00118   //////////////////////////////////////////////////////////////////
00119
00120
00121   inline HomgLine2D::HomgLine2D()
00122   { data_[0] = 0; data_[1] = -1; data_[2] = 0.0; }
00123
00124   inline HomgLine2D::HomgLine2D(const Vector3<HOMGLINE2D_TYPE>& vec)
00125   { data_[0] = vec[0]; data_[1] = vec[1]; data_[2] = vec[2]; }
00126
00127   inline HomgLine2D::HomgLine2D(HOMGLINE2D_TYPE a,
00128                                 HOMGLINE2D_TYPE b,
00129                                 HOMGLINE2D_TYPE c)
00130   { data_[0] = a; data_[1] = b; data_[2] = c; }
00131
00132   /// copy constructor
00133   inline HomgLine2D::HomgLine2D(const HomgLine2D& line)
00134   { data_[0] = line[0]; data_[1] = line[1]; data_[2] = line[2]; }
00135
00136   inline
00137   HomgLine2D::HomgLine2D(const HomgPoint2D& p1, const HomgPoint2D& p2)
00138   {
00139     Set(p1, p2);
00140   }
00141
00142   inline void
00143   HomgLine2D::Set(const HomgPoint2D& p1, const HomgPoint2D& p2)
00144   {
00145     p1.CrossProduct(p2, *this);
00146     Homogenize();
00147     // deal with compiler precision
00148     if (data_[0] < HOMGLINE2D_EPS && data_[0] > -HOMGLINE2D_EPS)
00149       data_[0] = 0.0;
00150     if (data_[1] < HOMGLINE2D_EPS && data_[1] > -HOMGLINE2D_EPS)
00151       data_[1] = 0.0;
00152     if (data_[2] < HOMGLINE2D_EPS && data_[2] > -HOMGLINE2D_EPS)
00153       data_[2] = 0.0;
00154   }
00155
00156   inline HOMGLINE2D_TYPE HomgLine2D::GetW()
00157   {
00158     return sqrt(data_[0] * data_[0] + data_[1] * data_[1]);
00159   }
00160
00161   inline void HomgLine2D::Homogenize()
00162   {
00163     register HOMGLINE2D_TYPE w = GetW();
00164     BIASASSERT(w!=0.0);
00165     data_[0] = data_[0] / -w;
00166     data_[1] = data_[1] / -w;
00167     data_[2] = data_[2] / -w;
00168   }
00169
00170   /*
00171   inline HOMGLINE2D_TYPE
00172   HomgLine2D::DistanceSquared(HomgPoint2D& point)
00173   {
00174     HOMGLINE2D_TYPE dist = data_[0] * point[0] + data_[1] * point[1] +
00175       data_[2] * point[2];
00176     dist = dist*dist;
00177     dist/=((data_[0]*data_[0]+data_[1]*data_[1])* point[2]*point[2]);
00178
00179     return (dist>HOMGLINE2D_EPS || dist<-HOMGLINE2D_EPS)?
00180       (dist):(0.0);
00181   }
00182   */
00183   inline HOMGLINE2D_TYPE
00184   HomgLine2D::DistanceSquared(const HomgPoint2D& point)
00185   {
00186     HOMGLINE2D_TYPE dist = data_[0] * point[0] + data_[1] * point[1] +
00187       data_[2] * point[2];
00188     dist = dist*dist;
00189     dist/=((data_[0]*data_[0]+data_[1]*data_[1])* point[2]*point[2]);
00190
00191     return (dist>HOMGLINE2D_EPS)? (dist):(0.0);
00192   }
00193
00194
00195   inline HomgPoint2D
00196   HomgLine2D::Intersection(HomgLine2D& line) const
00197   {
00198     HomgPoint2D point;
00199     Intersection(line, point);
00200     return point;
00201   }
00202
00203   inline void
00204   HomgLine2D::Intersection(HomgLine2D& line, HomgPoint2D& intersect) const
00205   {
00206     CrossProduct(line, intersect);
00207     intersect.Homogenize();
00208   }
00209
00210   inline void
00211   HomgLine2D::GetPerpendicularLine(HomgPoint2D& point, HomgLine2D& perpline)
00212   {
00213     point.Homogenize();
00214     // change slope
00215     perpline[0] = data_[1];
00216     perpline[1] = -data_[0];
00217     // point must lie on lie : perpline^T * point = 0
00218     perpline[2] = - perpline[1]*point[1] - perpline[0]*point[0];
00219   }
00220 }// namespace BIAS
00221 #endif // __HOMGLINE2D_HH__
00222
00223
00224
00225
00226
00227
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgLine3D.hh Source File

Base » Geometry

HomgLine3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HOMGLINE3D_HH__
00027 #define __HOMGLINE3D_HH__
00028 #include "bias_config.h"
00029
00030 #include "HomgPoint3D.hh"
00031
00032 #define HOMGLINE3D_TYPE double
00033 #define HOMGLINE3D_EPS 1e-12
00034 namespace BIAS{
00035
00036 /**@class HomgLine3D
00037    a homogenous homogenized line is described by a direction vector PointInf_
00038    (a point at infinity) and a starting point PointFin_ (which is the
00039    closest vector from the coordinate origin to the line
00040    if the line is not homogenized, it can bve described by any two points
00041 */
00042
00043   class BIASGeometryBase_EXPORT HomgLine3D
00044   {
00045   public:
00046     inline HomgLine3D();
00047
00048     inline HomgLine3D(const HomgPoint3D& p1, const HomgPoint3D& p2);
00049
00050     inline ~HomgLine3D();
00051
00052     inline HomgPoint3D GetPointInf() const
00053     { return PointInf_; };
00054
00055     inline HomgPoint3D GetPointFin() const
00056     { return PointFin_; };
00057
00058     inline void Set(const HomgPoint3D& p1, const HomgPoint3D& p2);
00059
00060     inline void Homogenize();
00061
00062     void CalculateFootpoint(HomgPoint3D& p, HomgPoint3D& footp);
00063
00064     inline void Distance(HomgPoint3D& p, HOMGLINE3D_TYPE& dist);
00065
00066   protected:
00067     HomgPoint3D PointInf_, PointFin_;
00068   };
00069
00070
00071
00072   inline HomgLine3D::HomgLine3D() : PointInf_(), PointFin_()
00073   {}
00074
00075   inline HomgLine3D::HomgLine3D(const HomgPoint3D& p1, const HomgPoint3D& p2)
00076     : PointInf_(p1), PointFin_(p2)
00077   {}
00078
00079   inline HomgLine3D::~HomgLine3D()
00080   {}
00081
00082   inline void HomgLine3D::Set(const HomgPoint3D& p1, const HomgPoint3D& p2)
00083   {
00084     PointInf_ = p1;
00085     PointFin_ = p2;
00086   }
00087
00088   inline void HomgLine3D::Homogenize()
00089   {
00090     Vector3<double> vi, v;
00091     PointInf_.Homogenize();
00092     PointFin_.Homogenize();
00093
00094     // assume one point in euklidean space
00095     BIASASSERT(PointInf_.GetW() != 0.0 || PointFin_.GetW() != 0.0);
00096
00097     if (PointFin_.GetW() == 0){ // points are swapped
00098       HomgPoint3D tmp = PointFin_;
00099       PointFin_ = PointInf_;
00100       PointInf_ = tmp;
00101     }
00102
00103     if (PointInf_.GetW() != 0.0){ // move PointInf_ to infinity
00104       PointInf_ = PointInf_ - PointFin_;
00105       // norm2 can be used because w == 0
00106       PointInf_ /= PointInf_.NormL2();
00107     }
00108
00109     // calculate footpoint to coordinate origin on line
00110     vi[0] = PointInf_[0];
00111     vi[1] = PointInf_[1];
00112     vi[2] = PointInf_[2];
00113     v[0] = PointFin_[0];
00114     v[1] = PointFin_[1];
00115     v[2] = PointFin_[2];
00116     double t;
00117     v.ScalarProduct(vi, t);
00118     v = v - (vi * t);
00119     PointFin_[0] = v[0];
00120     PointFin_[1] = v[1];
00121     PointFin_[2] = v[2];
00122     PointFin_[3] = 1.0;
00123   }
00124
00125
00126   inline void HomgLine3D::CalculateFootpoint(HomgPoint3D& p,
00127                          HomgPoint3D& footp)
00128   {
00129     Vector3<double> vi, v, tmp;
00130
00131     Homogenize();
00132     // cannot calculate footpoint to infinite point
00133     BIASASSERT(p.GetW() !=0.0);
00134     vi[0] = PointInf_[0];
00135     vi[1] = PointInf_[1];
00136     vi[2] = PointInf_[2];
00137     v[0] = PointFin_[0];
00138     v[1] = PointFin_[1];
00139     v[2] = PointFin_[2];
00140     tmp[0] = p[0] / p.GetW();
00141     tmp[1] = p[1] / p.GetW();
00142     tmp[2] = p[2] / p.GetW();
00143     double t;
00144     tmp.SubIP(v);
00145     vi.ScalarProduct(v, t);
00146     v = v + (vi * t);
00147     footp[0] = v[0];
00148     footp[1] = v[1];
00149     footp[2] = v[2];
00150     footp[3] = 1.0;
00151   }
00152
00153   inline void
00154   HomgLine3D::Distance(HomgPoint3D& p, HOMGLINE3D_TYPE& dist)
00155   {
00156     HomgPoint3D footp;
00157     CalculateFootpoint(p, footp);
00158     footp -= p;
00159     dist = footp.NormL2();
00160   }
00161
00162 } // namespace BIAS
00163
00164
00165 #endif // __HOMGLINE3D_HH__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPlane3D.cpp Source File

Base » Geometry

HomgPlane3D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPlane3D.hh"
00027
00028 class BIAS::HomgPlane3D;
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPlane3D.hh Source File

Base » Geometry

HomgPlane3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __HOMGPLANE3D_HH__
00027 #define __HOMGPLANE3D_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Math/Vector4.hh>
00033 #include <Base/Math/Matrix3x3.hh>
00034
00035 #include "HomgPoint3D.hh"
00036
00037 #define HOMGPLANE3D_TYPE double
00038 // values whose abs is < epsilon are handled as zero
00039 #define HOMGPLANE3D_EPS 1E-12
00040
00041 namespace BIAS {
00042   /** @class HomgPlane3D
00043       @ingroup g_geometry
00044       @brief A homogeneous plane (in P^3)
00045       All points X on the plane p fulfill pX = 0
00046   */
00047   class BIASGeometryBase_EXPORT HomgPlane3D : public Vector4<HOMGPLANE3D_TYPE>
00048   {
00049   public:
00050     inline HomgPlane3D()
00051     { data_[0] = data_[1] = data_[3] = 0.0 ; data_[2] = 1.0 ; };
00052
00053     /** @brief set four values of the plane vector */
00054     inline HomgPlane3D(HOMGPLANE3D_TYPE a, HOMGPLANE3D_TYPE b,
00055                        HOMGPLANE3D_TYPE c, HOMGPLANE3D_TYPE d)
00056     { data_[0]=a; data_[1]=b; data_[2]=c; data_[3]=d; };
00057
00058     /** @brief constructs a homogeneous plane from three points
00059         @author koeser 07/2004 */
00060     inline HomgPlane3D(const HomgPoint3D& p1,
00061                        const HomgPoint3D& p2,
00062                        const HomgPoint3D& p3);
00063
00064     /** @brief construct plane, given arbitrary point and normal
00065         @param NormalVector unit length normal vector
00066         @param PointOnPlane arbitrary point on the plane
00067         @author koeser 02/2005  */
00068     explicit inline HomgPlane3D(const Vector3<double>& PointOnPlane,
00069                                 const  Vector3<double>& NormalVector) {
00070       Set(PointOnPlane, NormalVector); }
00071
00072     explicit inline HomgPlane3D(const Vector4<HOMGPLANE3D_TYPE>& theplane)
00073     { Vector4<HOMGPLANE3D_TYPE>::operator=(theplane); };
00074
00075     explicit inline HomgPlane3D(const Vector<HOMGPLANE3D_TYPE>& theplane)
00076     { SetFromVector(theplane); };
00077
00078     inline void SetFromVector(const Vector<HOMGPLANE3D_TYPE>& theplane) {
00079       BIASASSERT(theplane.size()==4);
00080       data_[0]=theplane[0]; data_[1]=theplane[1];
00081       data_[2]=theplane[2]; data_[3]=theplane[3];
00082     }
00083
00084     /** @brief empty destructor */
00085     inline ~HomgPlane3D() {};
00086
00087     /** @brief construct plane, given arbitrary point and normal
00088         @param NormalVector unit length normal vector
00089         @param PointOnPlane arbitrary point on the plane
00090         @author koeser 02/2005  */
00091     inline void Set(const Vector3<double>& PointOnPlane,
00092                     const Vector3<double>& NormalVector) {
00093        data_[0] = NormalVector[0]; data_[1] = NormalVector[1];
00094        data_[2] = NormalVector[2];
00095        data_[3] = -1.0 * NormalVector.ScalarProduct(PointOnPlane);
00096     }
00097
00098     /** @brief set first three components to vector of norm 1 and scales
00099         w accordingly => encodes Hesse normal form
00100
00101         afterwards w contains the distance of the plane
00102         from the origin, while the first three coordinates are the normal
00103         vector in euclidian 3-space. This is called the Hesse normal form. */
00104     inline void Normalize();
00105
00106     /** @brief  returns normal vector */
00107     inline void GetNormalVector(Vector3<HOMGPLANE3D_TYPE>& normalv) const;
00108
00109     /** @brief returns normal vector, only wrapper */
00110     inline Vector3<HOMGPLANE3D_TYPE> GetNormalVector() const;
00111
00112     /** @brief calculates squared distance of a point from plane */
00113     inline HOMGPLANE3D_TYPE DistanceSquared(const HomgPoint3D& point) const;
00114
00115     /** @brief compute the intersection point of the plane with a line (defined
00116         by point and direction)
00117
00118         @param PointOnLine one arbitrary point on the line
00119         @param LineDir The direction of the line, LineDir[3]==0 !
00120         @param Intersection (output) A point lying on the line and on the plane
00121         @return - 0 on success
00122                 - +1 point is at infinity (line and plane parallel)
00123                 - -1 line is in the plane, whole line is solution
00124         @author koeser 01/2005 */
00125     inline int GetLineIntersection(const HomgPoint3D& PointOnLine,
00126                                    const HomgPoint3D& LineDir,
00127                                    HomgPoint3D& Intersection) const;
00128
00129   }; // class
00130
00131
00132   // ----------------------- inline implementation ---------------------------
00133
00134   inline void HomgPlane3D::Normalize() {
00135     (*this) /= sqrt(data_[0]*data_[0]+data_[1]*data_[1]+data_[2]*data_[2]);
00136   }
00137
00138   inline Vector3<HOMGPLANE3D_TYPE>
00139   HomgPlane3D::GetNormalVector() const
00140   {
00141     HOMGPLANE3D_TYPE norm =
00142       sqrt(data_[0]*data_[0]+data_[1]*data_[1]+data_[2]*data_[2]);
00143     Vector3<HOMGPLANE3D_TYPE> normal(data_[0] / norm, data_[1] / norm,
00144                      data_[2] / norm);
00145     return normal;
00146   }
00147
00148   inline void
00149   HomgPlane3D::GetNormalVector(Vector3<HOMGPLANE3D_TYPE>& normalv) const
00150   {
00151     HOMGPLANE3D_TYPE norm =
00152       sqrt(data_[0]*data_[0]+data_[1]*data_[1]+data_[2]*data_[2]);
00153     normalv[0] = data_[0] / norm;
00154     normalv[1] = data_[1] / norm;
00155     normalv[2] = data_[2] / norm;
00156   }
00157
00158
00159   inline HOMGPLANE3D_TYPE
00160   HomgPlane3D::DistanceSquared(const HomgPoint3D& point) const
00161   {
00162     HOMGPLANE3D_TYPE dist = data_[0] * point[0] + data_[1] * point[1] +
00163       data_[2] * point[2] + data_[3] * point[3];
00164     dist = dist*dist;
00165     dist/=((data_[0]*data_[0]+data_[1]*data_[1]+data_[2]*data_[2])*
00166        point[3]*point[3]);
00167
00168     return dist;
00169   }
00170
00171   inline HomgPlane3D::HomgPlane3D(const HomgPoint3D& p1,
00172                                   const HomgPoint3D& p2,
00173                                   const HomgPoint3D& p3) {
00174     // set up four submatrices as in "Multiple View Geometry", p.47
00175     Matrix3x3<HOMGPLANE3D_TYPE>  M234, M134, M124, M123;
00176     for (unsigned int row=0; row<3; row++) {
00177       M234[row][0] = p1[row+1];
00178       M234[row][1] = p2[row+1];
00179       M234[row][2] = p3[row+1];
00180
00181       M123[row][0] = p1[row];
00182       M123[row][1] = p2[row];
00183       M123[row][2] = p3[row];
00184     }
00185
00186     M124[0][0] = p1[0];
00187     M124[0][1] = p2[0];
00188     M124[0][2] = p3[0];
00189     M124[1][0] = p1[1];
00190     M124[1][1] = p2[1];
00191     M124[1][2] = p3[1];
00192     M124[2][0] = p1[3];
00193     M124[2][1] = p2[3];
00194     M124[2][2] = p3[3];
00195
00196     M134[0][0] = p1[0];
00197     M134[0][1] = p2[0];
00198     M134[0][2] = p3[0];
00199     M134[1][0] = p1[2];
00200     M134[1][1] = p2[2];
00201     M134[1][2] = p3[2];
00202     M134[2][0] = p1[3];
00203     M134[2][1] = p2[3];
00204     M134[2][2] = p3[3];
00205
00206     // plane is constructed by determinants of submatrices
00207     (*this)[0] = M234.det();
00208     (*this)[1] = -M134.det();
00209     (*this)[2] = M124.det();
00210     (*this)[3] = -M123.det();
00211   }
00212
00213   inline int
00214   HomgPlane3D::GetLineIntersection(const HomgPoint3D& PointOnLine,
00215                                    const HomgPoint3D& LineDir,
00216                                    HomgPoint3D& Intersection) const {
00217 #ifdef BIAS_DEBUG
00218     if (LineDir[3]!=0.0) {
00219       BIASERR("Incorrect data for line direction (w==0 required for dir)! "
00220               <<PointOnLine<<" "<<LineDir);
00221       BIASABORT;
00222     }
00223 #endif
00224     // solve equation for lamda:
00225     // (PointOnLine + lamda*LineDir) * (this) = 0
00226     // Intersection = PointOnLine + lamda*LineDir
00227
00228     // assume Linedir[3]==0 (only direction)
00229     const double dirproduct = LineDir[0]*data_[0]+LineDir[1]*data_[1]+
00230       LineDir[2]*data_[2];
00231     const double pointproduct = PointOnLine[0]*data_[0] +
00232       PointOnLine[1]*data_[1] + PointOnLine[2]*data_[2] +
00233       PointOnLine[3]*data_[3];
00234     // catch degenerate cases
00235     if (fabs(dirproduct)<HOMGPLANE3D_EPS) {
00236       if (fabs(pointproduct)<HOMGPLANE3D_EPS) {
00237         // lamda = 0/0    ->  arbitrary solution
00238         Intersection = PointOnLine;
00239         return -1;
00240       } else {
00241         // lamda = x/0    ->  line parallel to plane
00242         Intersection = PointOnLine;
00243         Intersection[3] = 0.0;
00244         return 1;
00245       }
00246     }
00247     const double lamda = pointproduct / dirproduct;
00248     Intersection = PointOnLine - (LineDir * lamda);
00249     return 0;
00250   }
00251
00252 } //namespace BIAS
00253 #endif // __HOMGPLANE3D_HH__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint1D.cpp Source File

Base » Geometry

HomgPoint1D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPoint1D.hh"
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint1D.hh Source File

Base » Geometry

HomgPoint1D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HomgPoint1D_hh_
00027 #define _HomgPoint1D_hh_
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Math/Vector2.hh>
00032
00033
00034
00035 // the type of each element:
00036 #define HOMGPOINT1D_TYPE double
00037 // values whose abs is < epsilon are handled as zero
00038 #define HOMGPOINT1D_TYPE_EPS 1E-12
00039
00040 namespace BIAS {
00041
00042   /** @class HomgPoint1D
00043       @brief class HomgPoint1D describes a point with 2 degrees of freedom in
00044       projective coordinates.
00045
00046       manual loop unrolling is used if possible.
00047       The Vector is in row-major order (3 rows, 1 column)
00048       the indizes begin with zero (to size-1)
00049
00050       constructors and assignment operators are never inherited, so they are
00051       wrapped (or reimplemented) here.
00052       @author Jan Woetzel
00053       @status untested  (03/04/2002)
00054   **/
00055
00056   class BIASGeometryBase_EXPORT HomgPoint1D:public Vector2 < HOMGPOINT1D_TYPE > {
00057
00058   public:
00059
00060     /** destructor
00061         @author Jan Woetzel
00062         @status untested (02/28/2002)
00063     **/
00064     ~HomgPoint1D() {}
00065     ;
00066
00067
00068     /** default constructor
00069         @author Jan Woetzel
00070         @status untested (02/28/2002)
00071     **/
00072     inline HomgPoint1D():Vector2 < HOMGPOINT1D_TYPE > () {}
00073     ;
00074
00075     /** copy constructor
00076         @author Jan Woetzel
00077         @status untested (03/05/2002)
00078     **/
00079     inline HomgPoint1D(const HomgPoint1D & p):Vector2 < HOMGPOINT1D_TYPE >
00080     (p) {}
00081     ;
00082
00083
00084     /** assignment with a constant value for all elements
00085         @author Jan Woetzel
00086         @status untested (03/01/2002) **/
00087     explicit inline HomgPoint1D(const HOMGPOINT1D_TYPE & scalar):Vector2 <
00088       HOMGPOINT1D_TYPE > (scalar) {}
00089     ;
00090
00091     /** assignment with an array of values
00092         which is copied into this ones class members
00093         @author Jan Woetzel
00094         @status untested (02/28/2002) **/
00095     explicit inline HomgPoint1D(const HOMGPOINT1D_TYPE * pv):Vector2 <
00096       HOMGPOINT1D_TYPE > (pv) {}
00097     ;
00098
00099     /** constructor with element assignment
00100         @author Jan Woetzel
00101         @status untested (03/01/2002) **/
00102     explicit inline HomgPoint1D(char *s):Vector2 < HOMGPOINT1D_TYPE > (s) {}
00103     ;
00104
00105     /** assignment operator
00106         set the elements of this HomgPoint to the element of vec
00107         @author Jan Woetzel
00108         @status untested (02/25/2002)
00109     **/
00110     inline HomgPoint1D & operator =
00111     (const Vector2 < HOMGPOINT1D_TYPE > &vec) {
00112       Copy(vec.GetData());  // copy the elements of vec to this HomgPoint coordinates
00113       return *this;
00114     };
00115
00116     /** assignment operator
00117         set the vector elementwise to scalar value
00118         @author Jan Woetzel
00119         @status untested (02/28/2002)
00120     **/
00121     inline HomgPoint1D & operator = (const HOMGPOINT1D_TYPE & scalar) {
00122       Set(scalar);
00123       return *this;
00124     };
00125
00126
00127     /** homogenize class data member elements to W==1 by divison by W
00128         @author Jan Woetzel
00129         @status untested (02/28/2002)
00130     **/
00131     inline void Homogenize() {
00132       // w = data_[3]  is not in [-eps..eps]  (means non-zero)
00133       BIASASSERT(!((GetW() > -1 * HOMGPOINT1D_TYPE_EPS)
00134                    && (GetW() < HOMGPOINT1D_TYPE_EPS)));
00135       data_[0] = data_[0] / GetW();
00136       data_[1] = data_[1] / GetW(); // should be 1
00137     }
00138     ;
00139
00140
00141     /** return the euclidian coordinates
00142         Only possible for w !=0 because w==0 describes points of infinity who are'nt not in euclidian space (but may be interpreted as directions)
00143         @author Jan Woetzel
00144         @status untested (03/04/2002)
00145     **/
00146     inline HOMGPOINT1D_TYPE GetEuclidian() {
00147       BIASASSERT(!((GetW() > -1 * HOMGPOINT1D_TYPE_EPS) && (GetW() < HOMGPOINT1D_TYPE_EPS)));   // test if w is zero (in eps env.)
00148       return (GetX() / GetW());
00149     };
00150
00151
00152     ////////////////////////////////////////////////////////////////////////
00153     ///////////////// Comparison operators /////////////////////////////////
00154     ////////////////////////////////////////////////////////////////////////
00155
00156
00157     /** Comparison operator 'equal'
00158         @author Ingo Thomsen
00159         @status tested
00160     **/
00161     inline bool operator== (HomgPoint1D& arg) {
00162       Homogenize();
00163       arg.Homogenize();
00164
00165       // If BIAS_BOUNDS_CHECk is active, Homogenize() does not allow an w component as zero
00166       // and it is enough to compare the non w components
00167       // In the other w component may be zero (and indicating a direction neither than a point)
00168 #ifdef BIAS_BOUNDS_CHECK
00169       return (data_[0] == arg.data_[0]);
00170 #else
00171       return (data_[0] == arg.data_[0]) &&  (data_[1] == arg.data_[1]);
00172 #endif
00173     }
00174
00175     /** Comparison operator 'not equal'
00176         @author Ingo Thomsen
00177         @status tested
00178     **/
00179     inline bool operator!= (HomgPoint1D& arg) {
00180       return !(*this == arg);
00181     }
00182
00183
00184
00185   }
00186   ;             // class HomgPoint1D ------------------------------------------
00187 } // namespace BIAS
00188 #endif
00189 // /////////////    do not add code after this line !    /////////////
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2D.cpp Source File

Base » Geometry

HomgPoint2D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPoint2D.hh"
00027 #include <float.h>
00028 #include <Base/Math/Matrix3x3.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 ostream& operator<<(ostream& os, const enum HomgPoint2D::EPosition pos)
00034 {
00035   switch(pos){
00036   case HomgPoint2D::TopLeft: os << "topleft"; break;
00037   case HomgPoint2D::Top: os << "top"; break;
00038   case HomgPoint2D::TopRight: os << "topright"; break;
00039   case HomgPoint2D::Left: os << "left"; break;
00040   case HomgPoint2D::Center: os << "center"; break;
00041   case HomgPoint2D::Right: os << "right"; break;
00042   case HomgPoint2D::BottomLeft: os << "bottomleft"; break;
00043   case HomgPoint2D::Bottom: os << "bottom"; break;
00044   case HomgPoint2D::BottomRight: os << "bottomright"; break;
00045   case HomgPoint2D::Infinity: os << "infinity"; break;
00046   case HomgPoint2D::InvalidPosition: os << "invalid"; break;
00047   }
00048   return os;
00049 }
00050
00051 HomgPoint2D& HomgPoint2D::
00052 Homogenize(Matrix3x3<HOMGPOINT2D_TYPE>& cov)
00053 {
00054   register const HOMGPOINT2D_TYPE w = data_[2];
00055   Matrix3x3<HOMGPOINT2D_TYPE> J(MatrixZero);
00056   if (fabs(w)>HOMGPOINT2D_TYPE_EPS){
00057     /** the jacobian of the Homogenize() function is either
00058         | 1/w  0    -x/w^2 |
00059         | 0    1/w  -y/w^2 |
00060         | 0    0     0     | */
00061     J[0][0] = J[1][1] = 1.0/w;
00062     HOMGPOINT2D_TYPE w2 = w*w;
00063     J[0][2] = -data_[1]/w2;
00064     J[1][2] = -data_[2]/w2;
00065   } else {
00066     /** or | 1 0 0 |
00067            | 0 1 0 |
00068            | 0 0 0 | */
00069     J[0][0] = J[1][1] = 1.0;
00070   }
00071   cov = J * cov * J.Transpose();
00072
00073   return Homogenize();
00074 }
00075
00076
00077 /*
00078 ostream& operator<<(ostream& os, const BIAS::HomgPoint2D p2D){
00079 #ifdef BIAS_DEBUG
00080   std::streambuf *OutBuf_=std::cout.rdbuf(), *OsBuf_= os.rdbuf(),
00081     *ErrBuf_=std::cerr.rdbuf();
00082
00083   // print size at first to be compatible to Vector<>
00084   if (OutBuf_!=OsBuf_ && ErrBuf_!=OsBuf_){ // not cout and not cerr
00085 #endif
00086       os << VECTOR3_SIZE << std::endl;
00087       os << std::setw(14);      // set width for output format
00088       if (fabs(p2D[2]) > DBL_EPSILON)
00089         os << "[ " << p2D[0]/p2D[2] << "  " <<  p2D[1]/p2D[2] << "  1.0 ]";
00090       else
00091         os << "[ " << p2D[0] << "  " <<  p2D[1] << "  " << p2D[2] << "  ]";
00092       os << std::endl;
00093 #ifdef BIAS_DEBUG
00094   } else {
00095       // cout or cerr
00096
00097     if (fabs(p2D[2]) > DBL_EPSILON)
00098       os << "[ " << std::setprecision(10) << p2D[0]/p2D[2] << "  "
00099          << std::setprecision(10) << p2D[1]/p2D[2] << "  1.0 ]";
00100     else
00101       os << "[ " << std::setprecision(10) << p2D[0] << "  "
00102          << std::setprecision(10) <<  p2D[1] << "  "
00103          << std::setprecision(10)<< p2D[2] << "  ]";
00104   }
00105 #endif
00106   return os;
00107   }
00108 */
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2D.hh Source File

Base » Geometry

HomgPoint2D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HomgPoint2D_hh_
00027 #define _HomgPoint2D_hh_
00028 #include "bias_config.h"
00029
00030 #ifdef WIN32
00031 // implement non-standard (double)rint(double x)
00032 #  define rint(x) (floor(x+0.5))
00033 #endif //_WIN32
00034
00035 #include <Base/Debug/Error.hh>
00036
00037 #include <Base/Math/Vector3.hh>
00038 #include <Base/Math/Vector.hh>
00039 #include <Base/Math/Vector2.hh>
00040 #include <Base/Math/Matrix3x3.hh>
00041
00042 #include <cmath>
00043
00044 // the type of each element:
00045 #define HOMGPOINT2D_TYPE double
00046 // values whose abs is < epsilon are handled as zero
00047 #define HOMGPOINT2D_TYPE_EPS 1E-12
00048
00049 namespace BIAS {
00050   /** @class HomgPoint2D
00051       @ingroup g_geometry
00052       @brief class HomgPoint2D describes a point with 2 degrees of freedom in
00053       projective coordinates.
00054
00055       manual loop unrolling is used if possible.
00056       The Vector is in row-major order (3 rows, 1 column)
00057       the indizes begin with zero (to size-1)
00058
00059       constructors and assignment operators are never inherited, so they are
00060       wrapped (or reimplemented) here.
00061       @author Jan Woetzel
00062       @status untested  (03/04/2002) **/
00063   class BIASGeometryBase_EXPORT HomgPoint2D : public Vector3<HOMGPOINT2D_TYPE>
00064   {
00065   public:
00066     enum ELocation { LOC_LEFT, LOC_RIGHT, LOC_MIDDLE, LOC_UPPER,
00067                      LOC_LOWER, LOC_undef};
00068
00069     enum EPosition { Left, Right, Bottom, Top, TopLeft, TopRight, BottomLeft,
00070                      BottomRight, Center, Infinity, InvalidPosition };
00071
00072     /** default constructor
00073         @author Jan Woetzel
00074         @status alpha (02/28/2002) **/
00075     inline HomgPoint2D()
00076       : Vector3 < HOMGPOINT2D_TYPE > () {};
00077
00078     /**  constructor
00079         @author JMF
00080     **/
00081     // inline HomgPoint2D(const Vector3 < HOMGPOINT2D_TYPE >& p)
00082     // : Vector3 < HOMGPOINT2D_TYPE > (p) {};
00083
00084     /** copy constructor
00085         @author Jan Woetzel (03/05/2002) **/
00086     inline HomgPoint2D(const HomgPoint2D & p)
00087       : Vector3 <HOMGPOINT2D_TYPE> (p) {};
00088
00089
00090     /** assignment with a constant value for all elements
00091         @author Jan Woetzel (03/01/2002) **/
00092     explicit inline HomgPoint2D(const HOMGPOINT2D_TYPE & scalar)
00093       :Vector3 <HOMGPOINT2D_TYPE> (scalar) {};
00094
00095     /** assignment with an array of values
00096         which is copied into this ones class members
00097         @author Jan Woetzel (02/28/2002) **/
00098     explicit inline HomgPoint2D(const HOMGPOINT2D_TYPE * pv)
00099       :Vector3 <HOMGPOINT2D_TYPE> (pv) {};
00100
00101     /** constructor with element assignment
00102         @author Jan Woetzel (03/01/2002) **/
00103     explicit inline HomgPoint2D(char *s):Vector3 <HOMGPOINT2D_TYPE> (s) {};
00104
00105     /** constructor from Vector3    */
00106     inline HomgPoint2D(const Vector3<double>& vec) {
00107       data_[0] = vec[0];
00108       data_[1] = vec[1];
00109       data_[2] = vec[2];
00110     };
00111
00112     /** constructor using euclidic coordinates, setting the 3rd HomgPoint2D
00113         component to 1
00114         @author Ingo Thomsen **/
00115     inline HomgPoint2D(const HOMGPOINT2D_TYPE & x,
00116                        const HOMGPOINT2D_TYPE & y)
00117     {
00118       data_[0] = x;
00119       data_[1] = y;
00120       data_[2] = 1;
00121     };
00122
00123      /** constructor
00124         @author woelk 02 2003 **/
00125     inline HomgPoint2D(const HOMGPOINT2D_TYPE & x,
00126                        const HOMGPOINT2D_TYPE & y,
00127                        const HOMGPOINT2D_TYPE & w)
00128     { data_[0] = x; data_[1] = y; data_[2] = w; };
00129
00130     inline HOMGPOINT2D_TYPE GetW() const { return data_[2]; };
00131
00132     /** destructor
00133         @author Jan Woetzel (02/28/2002)**/
00134     ~HomgPoint2D() {};
00135
00136     /** assignment operator
00137         set the elements of this HomgPoint to the element of vec
00138         @author Jan Woetzel
00139         @status alpha (02/25/2002)**/
00140     inline HomgPoint2D& operator=(const Vector3<HOMGPOINT2D_TYPE> &vec) {
00141       Vector3<HOMGPOINT2D_TYPE>::Set(vec.GetData());
00142       return *this;
00143     };
00144
00145     /** assignment operator
00146         set the vector elementwise to scalar value
00147         @author Jan Woetzel
00148         @status alpha (02/28/2002)**/
00149     inline HomgPoint2D & operator= (const HOMGPOINT2D_TYPE & scalar) {
00150       Vector3 < HOMGPOINT2D_TYPE >::Set(scalar);
00151       return *this;
00152     };
00153
00154
00155     inline bool IsAtInfinity() const
00156     { return (data_[2]>-HOMGPOINT2D_TYPE_EPS &&
00157               data_[2]<HOMGPOINT2D_TYPE_EPS); };
00158
00159
00160     /** set elementwise with given 2 euclidian scalar values.
00161         the additional W-coordinate is set to 1
00162         @author Jan Woetzel
00163         @status alpha (03/05/2002) **/
00164     inline void Set(const HOMGPOINT2D_TYPE & x, const HOMGPOINT2D_TYPE & y)
00165     { Vector3<HOMGPOINT2D_TYPE>::Set(x, y, 1.0); };
00166
00167     inline void Set(const HOMGPOINT2D_TYPE& x, const HOMGPOINT2D_TYPE& y,
00168                     const HOMGPOINT2D_TYPE& z)
00169     { Vector3<HOMGPOINT2D_TYPE>::Set(x, y, z); };
00170
00171     /** Sets this form elements of Vector<T>. */
00172     inline void Set(const Vector<HOMGPOINT2D_TYPE> &vec) {
00173       if (vec.size() != 3){
00174         BIASERR("The vector for initialization of Vector3 has not length 3");
00175       } else {
00176         data_[0] = vec[0];
00177         data_[1] = vec[1];
00178         data_[2] = vec[2];
00179       }
00180     }
00181
00182     /** @author woelk 04 2003 */
00183     inline bool IsHomogenized() const {
00184       return data_[2]<1.0+HOMGPOINT2D_TYPE_EPS &&
00185         data_[2]>1.0-HOMGPOINT2D_TYPE_EPS;
00186     }
00187
00188
00189     /** homogenize class data member elements to W==1 by divison by W
00190         @author koeser (originally jw)
00191         @status optimized **/
00192     inline HomgPoint2D& Homogenize()
00193     {
00194       register const HOMGPOINT2D_TYPE w = data_[2];
00195       if (fabs(w)>HOMGPOINT2D_TYPE_EPS) {
00196         // w = data_[3]  is not in [-eps..eps]  (means non-zero)
00197         data_[0] /= w;
00198         data_[1] /= w;
00199         data_[2]  = 1.0;
00200       } else {
00201         // point is at infinity
00202         data_[2] = 0.0;
00203       }
00204       return (*this);
00205     };
00206
00207     /** homogenizes the point and transforms the associated covariance matrix
00208         @author woelk 03/2005
00209         @status untested */
00210     HomgPoint2D& Homogenize(Matrix3x3<double>& cov);
00211
00212
00213     /** calculate affine coordinates of this and write them to dest
00214         affine coordinates are projective coordinates with last element w == 1;
00215         Only possible for w !=0 because w==0 describes points of infinity
00216         who are'nt not in euclidian space (but may be interpreted as
00217         directions)
00218         @author Jan Woetzel, (03/04/2002)
00219     */
00220     inline void GetEuclidian(Vector2 < HOMGPOINT2D_TYPE > &dest) const
00221     {
00222       dest.GetData()[0] = GetEuclidianX();  // X
00223       dest.GetData()[1] = GetEuclidianY();  // Y
00224     };
00225
00226     /** return teh euclidian coordinates of this homg 2D point
00227         Only possible for w !=0 because w==0 describes points of infinity
00228         who are'nt not in euclidian space (but may be interpreted
00229         as directions)
00230         @author Jan Woetzel
00231         @status untested (03/04/2002)**/
00232     inline Vector2<HOMGPOINT2D_TYPE> GetEuclidian() const {
00233       Vector2<HOMGPOINT2D_TYPE> &euclid2vec = *(new Vector2<HOMGPOINT2D_TYPE>);
00234       GetEuclidian (euclid2vec);
00235       return euclid2vec;
00236     };
00237
00238     /** return the euclidian coordinates
00239         Only possible for w !=0 because w==0 describes points of
00240         infinity who are'nt not in euclidian space (but may be interpreted
00241         as directions)
00242         @author Jan Woetzel
00243         @status untested (03/04/2002)**/
00244     inline HOMGPOINT2D_TYPE GetEuclidianX() const {
00245       BIASASSERT(!((GetW() > -1 * HOMGPOINT2D_TYPE_EPS) &&
00246                    (GetW() < HOMGPOINT2D_TYPE_EPS)));
00247       // test if w is zero (in eps env.)
00248       return ((*this)[0] / GetW());
00249     };
00250
00251     inline HOMGPOINT2D_TYPE GetEuclidianY() const {
00252       BIASASSERT(!((GetW() > -1 * HOMGPOINT2D_TYPE_EPS) &&
00253                    (GetW() < HOMGPOINT2D_TYPE_EPS)));
00254       // test if w is zero (in eps env.)
00255       return ((*this)[1] / GetW());
00256     };
00257
00258     inline HOMGPOINT2D_TYPE Distance(HomgPoint2D& point);
00259     inline HOMGPOINT2D_TYPE DistanceSquared(HomgPoint2D& point);
00260
00261     ////////////////////////////////////////////////////////////////////////
00262     ///////////////// Comparison operators /////////////////////////////////
00263     ////////////////////////////////////////////////////////////////////////
00264
00265     /** Comparison operator 'equal'
00266         @author Ingo Thomsen
00267         @status tested**/
00268     inline bool operator==(HomgPoint2D& arg) {
00269       Homogenize();
00270       arg.Homogenize();
00271
00272       // If BIAS_BOUNDS_CHECk is active, Homogenize() does not allow an
00273       // w component as zero
00274       // and it is enough to compare the non w components
00275       // In the other case the w component may be zero (and
00276       // indicating a direction neither than a point)
00277 #ifdef BIAS_BOUNDS_CHECK
00278       return (data_[0] == arg.data_[0]) && (data_[1] == arg.data_[1]);
00279 #else
00280       return (data_[0] == arg.data_[0]) &&  (data_[1] == arg.data_[1]) &&
00281         (data_[2] == arg.data_[2]);
00282 #endif
00283     }
00284
00285
00286     /** Comparison operator 'not equal'
00287         @author Ingo Thomsen
00288         @status tested **/
00289     inline bool operator!= (HomgPoint2D& arg)
00290     { return !(*this == arg); };
00291
00292     /** return image coordinates for drawing , coo[0]=x, coo[1]=y */
00293     inline bool GetImageCoo(unsigned int width, unsigned int height,
00294                             unsigned int coo[2]);
00295
00296     inline enum EPosition
00297     DeterminePosition(unsigned int width, unsigned int height);
00298
00299     /** @brief determines if point is within rectangular RegionOfInterest
00300         @attention point is assumed to be homogenized !
00301         @author koeser 03/2004 */
00302     inline bool IsInROIHomogenized(const HOMGPOINT2D_TYPE& xmin,
00303                                    const HOMGPOINT2D_TYPE& ymin,
00304                                    const HOMGPOINT2D_TYPE& xmax,
00305                                    const HOMGPOINT2D_TYPE& ymax) const;
00306
00307     /** @brief determines if point is within rectangular RegionOfInterest
00308         @author koeser 03/2004 */
00309     inline bool IsInROI(const HOMGPOINT2D_TYPE& xmin,
00310                         const HOMGPOINT2D_TYPE& ymin,
00311                         const HOMGPOINT2D_TYPE& xmax,
00312                         const HOMGPOINT2D_TYPE& ymax) const;
00313
00314   };
00315
00316   std::ostream& operator<<(std::ostream& os,
00317                            const enum HomgPoint2D::EPosition pos);
00318
00319   // std::ostream& operator<<(std::ostream& os, const BIAS::HomgPoint2D p2D);
00320
00321   //////////////////////////////////////////////////////////////////
00322   // implementations
00323   /////////////////////////////////////////////////////////////////
00324
00325
00326
00327   inline HOMGPOINT2D_TYPE HomgPoint2D::Distance(HomgPoint2D& point)
00328   {
00329     Homogenize();
00330     point.Homogenize();
00331     return sqrt(pow(data_[0] - point[0],2) + pow(data_[1] - point[1],2));
00332   }
00333
00334   inline HOMGPOINT2D_TYPE HomgPoint2D::DistanceSquared(HomgPoint2D& point)
00335   {
00336     Homogenize();
00337     point.Homogenize();
00338     return pow(data_[0] - point[0],2) + pow(data_[1] - point[1],2);
00339   }
00340
00341   inline bool
00342   HomgPoint2D::GetImageCoo(unsigned int width, unsigned int height,
00343                            unsigned int coo[2])
00344   {
00345     bool result = false;
00346     Homogenize();
00347     if (data_[0] >= 0.0 && data_[0] < (width -1) &&
00348         data_[1] >= 0.0 && data_[1] < (height-1)){
00349       result = true;
00350       coo[0] = (unsigned int)rint(data_[0]);
00351       coo[1] = (unsigned int)rint(data_[1]);
00352     }
00353     return result;
00354   }
00355
00356   inline enum HomgPoint2D::EPosition
00357   HomgPoint2D::DeterminePosition(unsigned int width, unsigned int height)
00358   {
00359     enum HomgPoint2D::EPosition pos = InvalidPosition;
00360     enum HomgPoint2D::ELocation xpos = LOC_undef, ypos = LOC_undef;
00361
00362     if (IsAtInfinity()){
00363       //BIASERR("point at infinity");
00364       return pos;
00365     } else {
00366       (*this)[0]/=(*this)[2];
00367       (*this)[1]/=(*this)[2];
00368     }
00369
00370     if ((*this)[0] < 0)
00371       xpos = LOC_LEFT;
00372     if ((*this)[0] > width-1)
00373       xpos = LOC_RIGHT;
00374     if ((*this)[0] >= 0 && (*this)[0] <= width-1)
00375       xpos = LOC_MIDDLE;
00376
00377     if ((*this)[1] < 0)
00378       ypos = LOC_UPPER;
00379     if ((*this)[1] > height-1)
00380       ypos = LOC_LOWER;
00381     if ((*this)[1] >= 0 && (*this)[1] <= height-1)
00382       ypos = LOC_MIDDLE;
00383
00384     switch (xpos) {
00385     case LOC_LEFT:
00386       switch (ypos) {
00387       case LOC_LOWER:
00388         pos = BottomLeft;
00389         break;
00390       case LOC_UPPER:
00391         pos = TopLeft;
00392         break;
00393       case LOC_MIDDLE:
00394         pos = Left;
00395         break;
00396       default:
00397         BIASERR("no valid ypos");
00398         break;
00399       }
00400       break;
00401
00402     case LOC_MIDDLE:
00403       switch (ypos) {
00404       case LOC_LOWER:
00405         pos = Bottom;
00406         break;
00407       case LOC_UPPER:
00408         pos = Top;
00409         break;
00410       case LOC_MIDDLE:
00411         pos = Center;
00412         break;
00413       default:
00414         BIASERR("no valid ypos");
00415         break;
00416       }
00417       break;
00418
00419     case LOC_RIGHT:
00420       switch (ypos) {
00421       case LOC_LOWER:
00422         pos = BottomRight;
00423         break;
00424       case LOC_UPPER:
00425         pos = TopRight;
00426         break;
00427       case LOC_MIDDLE:
00428         pos = Right;
00429         break;
00430       default:
00431         BIASERR("no valid ypos");
00432         break;
00433       }
00434       break;
00435
00436     default:
00437       BIASERR("no valid xpos");
00438       break;
00439     }
00440     return pos;
00441   }
00442
00443   inline bool
00444   HomgPoint2D::IsInROIHomogenized(const HOMGPOINT2D_TYPE& xmin,
00445                                   const HOMGPOINT2D_TYPE& ymin,
00446                                   const HOMGPOINT2D_TYPE& xmax,
00447                                   const HOMGPOINT2D_TYPE& ymax) const {
00448 #ifdef BIAS_DEBUG
00449     if (!IsHomogenized()) {
00450       BIASERR("Supplied unhomogenized point to IsInROIHomogenized(). "
00451               <<"Lucky you! Without BIAS_DEBUG enabled, you do not get this "
00452               <<"warning and there would be a really wrong result here! "
00453               <<"Fix your code and try again. Goodbye.");
00454       BIASABORT;
00455     }
00456 #endif
00457     return (data_[0]>=xmin) && (data_[0]<=xmax) &&
00458       (data_[1]>ymin) && (data_[1]<ymax);
00459   }
00460
00461   // this is code duplication, but for the sake of speed, it is done this way
00462   inline bool HomgPoint2D::IsInROI(const HOMGPOINT2D_TYPE& xmin,
00463                                    const HOMGPOINT2D_TYPE& ymin,
00464                                    const HOMGPOINT2D_TYPE& xmax,
00465                                    const HOMGPOINT2D_TYPE& ymax) const {
00466     return (data_[0]/data_[2]>=xmin) && (data_[0]/data_[2]<=xmax) &&
00467       (data_[1]/data_[2]>ymin) && (data_[1]/data_[2]<ymax);
00468   }
00469
00470
00471 } // namespace BIAS
00472 #endif
00473
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2DCov.cpp Source File

Base » Geometry

HomgPoint2DCov.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPoint2DCov.hh"
00027 #include "HomgPoint2D.hh"
00028 #include <Base/Math/Matrix2x2.hh>
00029 #include <Base/Debug/Exception.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 HomgPoint2DCov::
00035 HomgPoint2DCov()
00036   : Matrix3x3<double>()
00037 {}
00038
00039 HomgPoint2DCov::
00040 HomgPoint2DCov(const MatrixInitType& i)
00041   : Matrix3x3<double>(i) {}
00042
00043 HomgPoint2DCov::
00044 HomgPoint2DCov(const Matrix3x3<double>& m)
00045   : Matrix3x3<double>(m)
00046 {
00047   if (!CheckSymmetry_()){
00048     /*cout << setprecision(20) << (*this)[0][1] <<" == "<< (*this)[1][0] << boolalpha << Equal((*this)[0][1], (*this)[1][0])<<"\t"<<((*this)[0][1]==(*this)[1][0])<<endl;
00049     cout << setprecision(20) << (*this)[0][2] <<" == "<< (*this)[2][0] << boolalpha << Equal((*this)[0][2], (*this)[2][0])<<endl;
00050     cout << setprecision(20) << (*this)[1][2] <<" == "<< (*this)[2][1] << boolalpha << Equal((*this)[1][2], (*this)[2][1])<<endl; */
00051     BEXCEPTION("not a covariance matrix "<<*this);
00052   }
00053 }
00054
00055 HomgPoint2DCov::
00056 HomgPoint2DCov(const Matrix<double>& m)
00057   : Matrix3x3<double>(m)
00058 {
00059   if (!CheckSymmetry_()){
00060     BEXCEPTION("not a covariance matrix "<<*this);
00061   }
00062 }
00063
00064 HomgPoint2DCov::
00065 HomgPoint2DCov(const TNT::Matrix<double>& m)
00066   : Matrix3x3<double>(m)
00067 {
00068   if (!CheckSymmetry_()){
00069     BEXCEPTION("not a covariance matrix "<<*this);
00070   }
00071 }
00072
00073 HomgPoint2DCov::
00074 ~HomgPoint2DCov()
00075 {}
00076
00077 void HomgPoint2DCov::
00078 Homogenize(HomgPoint2D& p)
00079 {
00080   if (!p.IsAtInfinity()){
00081     // the jacobian of the Homogenize() function
00082     // 1/w  0    -x/w^2
00083     // 0    1/w  -y/w^2
00084     // 0    0    0
00085     Matrix3x3<double> J(MatrixZero);
00086     J[0][0] = J[1][1] = 1.0/p[2];
00087     J[0][2] = -p[0]/p[2]/p[2];
00088     J[1][2] = -p[1]/p[2]/p[2];
00089     // the covariance transforms as J * cov * J^T
00090     *this = J * *this * J.Transpose();
00091     p.Homogenize();
00092   } else {
00093     cout << __FILE__<<":"<<__LINE__<<" p "<<p<<" at infinity, doing nothing\n";
00094   }
00095 }
00096
00097
00098 Matrix2x2<double> HomgPoint2DCov::
00099 GetEuclidean() const
00100 {
00101   if (!IsHomogenized()){
00102     BEXCEPTION("euclidean cov matrices can only be returned when homogenized");
00103   }
00104   Matrix2x2<double> res;
00105   res[0][0] = (*this)[0][0];
00106   res[0][1] = (*this)[0][1];
00107   res[1][0] = (*this)[1][0];
00108   res[1][1] = (*this)[1][1];
00109   return res;
00110 }
00111
00112
00113 void HomgPoint2DCov::
00114 SetEuclidean(const Matrix2x2<double>& m)
00115 {
00116   SetZero();
00117   (*this)[0][0] = m[0][0] ;
00118   (*this)[0][1] = m[0][1] ;
00119   (*this)[1][0] = m[1][0] ;
00120   (*this)[1][1] = m[1][1] ;
00121   if (!CheckSymmetry_()){
00122     BEXCEPTION("not a covariance matrix "<<*this);
00123   }
00124 }
00125
00126
00127 bool HomgPoint2DCov::
00128 CheckSymmetry_() const
00129 {
00130   const double eps = 1e-10;
00131   return ( Equal((*this)[0][1], (*this)[1][0], eps) &&
00132            Equal((*this)[0][2], (*this)[2][0], eps) &&
00133            Equal((*this)[1][2], (*this)[2][1], eps) );
00134 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint2DCov.hh Source File

Base » Geometry

HomgPoint2DCov.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HomgPoint2DCov_hh_
00027 #define _HomgPoint2DCov_hh_
00028
00029 #include <Base/Math/Matrix3x3.hh>
00030 #include <Base/Common/CompareFloatingPoint.hh>
00031
00032 namespace BIAS {
00033
00034   template <class T> class Matrix2x2;
00035   class HomgPoint2D;
00036
00037   /** @class HomgPoint2DCov
00038       @brief class representing the covariance matrix of a homogenous point 2D
00039       @author woelk 03/2006 */
00040   class BIASGeometryBase_EXPORT HomgPoint2DCov
00041     : public Matrix3x3<double>
00042   {
00043   public:
00044     HomgPoint2DCov();
00045
00046     HomgPoint2DCov(const MatrixInitType& i);
00047
00048     HomgPoint2DCov(const Matrix3x3<double>& m);
00049
00050     HomgPoint2DCov(const Matrix<double>& m);
00051
00052     HomgPoint2DCov(const TNT::Matrix<double>& m);
00053
00054     virtual ~HomgPoint2DCov();
00055
00056     /** @brief homogenizes p and *this
00057         @author woelk 03/2006 */
00058     void Homogenize(HomgPoint2D& p);
00059
00060     Matrix2x2<double> GetEuclidean() const;
00061
00062     void SetEuclidean(const Matrix2x2<double>& m);
00063
00064     inline bool IsHomogenized() const {
00065       return (Equal((*this)[0][2], 0.0) && Equal((*this)[1][2], 0.0) &&
00066               Equal((*this)[2][0], 0.0) && Equal((*this)[2][1], 0.0) &&
00067               Equal((*this)[2][2], 0.0));
00068     }
00069
00070     inline bool IsZero() const {
00071       return ( Equal((*this)[0][0], 0.0) && Equal((*this)[0][1], 0.0) &&
00072                Equal((*this)[0][2], 0.0) && Equal((*this)[1][0], 0.0) &&
00073                Equal((*this)[1][1], 0.0) && Equal((*this)[1][2], 0.0) &&
00074                Equal((*this)[2][0], 0.0) && Equal((*this)[2][1], 0.0) &&
00075                Equal((*this)[2][2], 0.0) );
00076     }
00077   protected:
00078     bool CheckSymmetry_() const;
00079     /*
00080     inline bool CheckSymmetry_() const
00081     { return ( Equal((*this)[0][1], (*this)[1][0]) &&
00082                Equal((*this)[0][2], (*this)[2][0]) &&
00083                Equal((*this)[1][2], (*this)[2][1]) ); } */
00084
00085
00086   };
00087
00088 }
00089
00090 #endif // _HomgPoint2DCov_hh_
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3D.cpp Source File

Base » Geometry

HomgPoint3D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPoint3D.hh"
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3D.hh Source File

Base » Geometry

HomgPoint3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HomgPoint3D_hh_
00027 #define _HomgPoint3D_hh_
00028 #include "bias_config.h"
00029
00030
00031 #include <Base/Debug/Error.hh>
00032
00033 #include <Base/Math/Vector4.hh>
00034 #include <Base/Math/Vector3.hh>
00035
00036 #define HOMGPOINT3D_TYPE double
00037 #define HOMGPOINT3D_EPS 1E-12
00038
00039 namespace BIAS {
00040
00041 /** @class HomgPoint3D
00042     @ingroup g_geometry
00043     @brief class HomgPoint3D describes a point with 3 degrees of
00044     freedom in projective coordinates.
00045
00046     manual loop unrolling is used if possible.
00047     The Vector is in row-major order (4 rows, 1 column)
00048     the indizes begin with zero (to size-1)
00049
00050     constructors and assignment operators are never inherited,
00051     so they have be wrapped (or reimplemented) here.
00052     @author Jan Woetzel
00053     @status tested in part (03/04/2002)
00054
00055     To DO:
00056     - CrossProduvt  von zwei HomgPOint3D
00057     (Aunterscheidung beide w==0 / beide w!=0, sonst Meldung.
00058 **/
00059
00060
00061   class BIASGeometryBase_EXPORT HomgPoint3D : public Vector4<HOMGPOINT3D_TYPE>
00062   {
00063   public:
00064
00065     inline HomgPoint3D():Vector4 <HOMGPOINT3D_TYPE> () {};
00066
00067     inline HomgPoint3D(const HomgPoint3D & p)
00068       : Vector4<HOMGPOINT3D_TYPE>(p) {};
00069
00070     inline HomgPoint3D(const Vector4<HOMGPOINT3D_TYPE> & p)
00071       : Vector4<HOMGPOINT3D_TYPE>(p) {};
00072
00073     explicit inline HomgPoint3D(const Vector3<HOMGPOINT3D_TYPE>& vec);
00074
00075     inline ~HomgPoint3D() {};
00076
00077     /** assignment with a constant value for all elements
00078         @author Jan Woetzel
00079         @status alpha (03/01/2002) **/
00080      explicit inline HomgPoint3D(const HOMGPOINT3D_TYPE & scalar)
00081       : Vector4<HOMGPOINT3D_TYPE>(scalar) {};
00082
00083     /** assignment with an array of values
00084         which is copied into this ones class members
00085         @author Jan Woetzel
00086         @status untested (02/28/2002) **/
00087      explicit inline HomgPoint3D(const HOMGPOINT3D_TYPE * pv)
00088       : Vector4<HOMGPOINT3D_TYPE>(pv) {};
00089
00090     /** constructor with element assignment
00091         @author Jan Woetzel
00092         @status alpha (03/01/2002) **/
00093      explicit inline HomgPoint3D(char *s)
00094       : Vector4<HOMGPOINT3D_TYPE>(s) {};
00095
00096     /** constructor using euclidic coordinates, setting the 4th
00097         HomgPoint3D component to 1
00098         @author Ingo Thomsen
00099         @status untested */
00100     inline HomgPoint3D(const HOMGPOINT3D_TYPE & x,
00101                        const HOMGPOINT3D_TYPE & y,
00102                        const HOMGPOINT3D_TYPE & z);
00103
00104     /** constructor using projective coordinates and initializes *this
00105         from Vector<double> of length 4 or length 3 in this case the
00106         fourth entry is 1.0.
00107         @author JMF
00108         @status tested */
00109     inline HomgPoint3D(const Vector<double>& vec);
00110
00111     /** @author woelk 11/2003 */
00112     inline HomgPoint3D(const HOMGPOINT3D_TYPE & x,
00113                        const HOMGPOINT3D_TYPE & y,
00114                        const HOMGPOINT3D_TYPE & z,
00115                        const HOMGPOINT3D_TYPE & w)
00116       : Vector4<HOMGPOINT3D_TYPE>(x, y, z, w) {};
00117
00118     inline bool IsAtInfinity() const;
00119
00120     inline HOMGPOINT3D_TYPE GetX();
00121     inline HOMGPOINT3D_TYPE GetY();
00122     inline HOMGPOINT3D_TYPE GetZ();
00123     inline HOMGPOINT3D_TYPE GetW();
00124
00125     /** assignment operator
00126         set the elements of this HomgPoint to the element of vec
00127         @author Jan Woetzel
00128         @status alpha (02/25/2002)
00129     **/
00130     inline HomgPoint3D& operator=(const Vector4<HOMGPOINT3D_TYPE>& vec);
00131
00132     /** assignment operator
00133         set the vector elementwise to scalar value
00134         @author Jan Woetzel
00135         @status alpha (02/28/2002)
00136     **/
00137     inline HomgPoint3D& operator=(const HOMGPOINT3D_TYPE& scalar);
00138     inline HomgPoint3D& operator=(const Vector3<HOMGPOINT3D_TYPE> &vec);
00139
00140     /** homogenize class data member elements to W==1 by divison by W
00141         @author Jan Woetzel
00142         @status alpha (02/28/2002)**/
00143     inline void Homogenize();
00144
00145     /** @author woelk 10 2003 */
00146     inline bool IsHomogenized() const {
00147       return data_[3]<1.0+HOMGPOINT3D_EPS &&
00148         data_[3]>1.0-HOMGPOINT3D_EPS;
00149     }
00150
00151     /** set elementwise with given 3 euclidian scalar values.
00152         the additional W-coordinate is set to 1
00153         @author Jan Woetzel
00154         @status alpha (03/05/2002) **/
00155     inline void Set(const HOMGPOINT3D_TYPE& x, const HOMGPOINT3D_TYPE& y,
00156                     const HOMGPOINT3D_TYPE& z);
00157
00158     /** set elementwise
00159         @author woelk 11/2003 */
00160     inline void Set(const HOMGPOINT3D_TYPE& x, const HOMGPOINT3D_TYPE& y,
00161                     const HOMGPOINT3D_TYPE& z, const HOMGPOINT3D_TYPE& w)
00162     { Vector4<HOMGPOINT3D_TYPE>::Set(x, y, z, w); }
00163
00164     /** set from Vector3
00165         @author woelk 03/2004 */
00166     inline void Set(const Vector3<HOMGPOINT3D_TYPE> &vec);
00167
00168     /** calculate affine coordinates of this and write them to dest
00169         affine coordinates are projective coordinates with last element w == 1;
00170         For w==0 the first three elements are copied describing a direction,
00171         not a point.**/
00172     inline void GetEuclidian(Vector3<HOMGPOINT3D_TYPE> &dest);
00173     inline void GetEuclidian(Vector3<HOMGPOINT3D_TYPE> &dest) const;
00174
00175     /** return the euclidian coordinates
00176         Only possible for w !=0 because w==0 describes points of infinity
00177         who are'nt not in euclidian space (but may be interpreted as
00178         directions)
00179         @author Jan Woetzel
00180         @status untested (03/04/2002)**/
00181     inline HOMGPOINT3D_TYPE GetEuclidianX();
00182
00183     inline HOMGPOINT3D_TYPE GetEuclidianY();
00184
00185     inline HOMGPOINT3D_TYPE GetEuclidianZ();
00186
00187     /** Comparison operator 'equal'
00188         @author Ingo Thomsen
00189         @status tested **/
00190     inline bool operator==(HomgPoint3D& arg);
00191
00192     /** Comparison operator 'not equal'
00193         @author Ingo Thomsen
00194         @status tested **/
00195     inline bool operator!=(HomgPoint3D& arg);
00196
00197     inline HOMGPOINT3D_TYPE Distance(HomgPoint3D& point);
00198
00199   }; // class
00200
00201
00202
00203
00204   inline HomgPoint3D::HomgPoint3D(const Vector3<HOMGPOINT3D_TYPE>& vec)
00205   {
00206     Set(vec);
00207   }
00208
00209   inline HomgPoint3D::HomgPoint3D(const HOMGPOINT3D_TYPE & x,
00210                                   const HOMGPOINT3D_TYPE & y,
00211                                   const HOMGPOINT3D_TYPE & z)
00212   {
00213     data_[0] = x;
00214     data_[1] = y;
00215     data_[2] = z;
00216     data_[3] = 1;
00217   }
00218
00219   inline HOMGPOINT3D_TYPE HomgPoint3D::GetX()
00220   {
00221     return data_[0];
00222   }
00223
00224   inline HOMGPOINT3D_TYPE HomgPoint3D::GetY()
00225   {
00226     return data_[1];
00227   }
00228
00229   inline HOMGPOINT3D_TYPE HomgPoint3D::GetZ()
00230   {
00231     return data_[2];
00232   }
00233
00234   inline HOMGPOINT3D_TYPE HomgPoint3D::GetW()
00235   {
00236     if (data_[3] > -HOMGPOINT3D_EPS && data_[3] < HOMGPOINT3D_EPS)
00237       data_[3] = 0.0;
00238     return data_[3];
00239   }
00240
00241   inline HomgPoint3D&
00242   HomgPoint3D::operator=(const Vector3<HOMGPOINT3D_TYPE> &vec)
00243   {
00244     data_[0] = vec[0];
00245     data_[1] = vec[1];
00246     data_[2] = vec[2];
00247     data_[3] = 1.0;
00248     return *this;
00249   }
00250
00251   inline HomgPoint3D&
00252   HomgPoint3D::operator=(const Vector4<HOMGPOINT3D_TYPE> &vec)
00253   {
00254     Copy(vec.GetData());
00255     return *this;
00256   }
00257
00258   inline HomgPoint3D&
00259   HomgPoint3D::operator=(const HOMGPOINT3D_TYPE& scalar)
00260   {
00261     data_[0] = scalar;
00262     data_[1] = scalar;
00263     data_[2] = scalar;
00264     data_[3] = scalar;
00265     return *this;
00266   }
00267
00268   inline HomgPoint3D::HomgPoint3D(const Vector<double>& vec){
00269
00270     switch (vec.size()){
00271     case 3:
00272       data_[3]=1.0;
00273     case 4:
00274       for (int i=0;i<vec.size();i++)
00275         data_[i]=vec[i];
00276       break;
00277     default:
00278       BIASERR("Initialization of  HomgPoint3D from Vector with length"
00279              << "!= 3 or !=4,length is " << vec.size());
00280     }
00281
00282   }
00283
00284   inline void HomgPoint3D::Homogenize()
00285   {
00286     HOMGPOINT3D_TYPE w = GetW();
00287     if (fabs(w) > HOMGPOINT3D_EPS){
00288       data_[0] = data_[0] / w;
00289       data_[1] = data_[1] / w;
00290       data_[2] = data_[2] / w;
00291       data_[3] = data_[3] / w;
00292     }
00293   }
00294
00295   inline void HomgPoint3D::Set(const HOMGPOINT3D_TYPE & x,
00296                                const HOMGPOINT3D_TYPE & y,
00297                                const HOMGPOINT3D_TYPE & z)
00298   {
00299     Vector4<HOMGPOINT3D_TYPE>::Set(x, y, z, 1);
00300   }
00301
00302   inline void HomgPoint3D::Set(const Vector3<HOMGPOINT3D_TYPE>& vec)
00303   {
00304     data_[0] = vec[0];
00305     data_[1] = vec[1];
00306     data_[2] = vec[2];
00307     data_[3] = 1.0;
00308   }
00309
00310   inline void HomgPoint3D::GetEuclidian(Vector3<HOMGPOINT3D_TYPE> &dest)
00311   {
00312     HOMGPOINT3D_TYPE w = GetW();
00313     if (w != 0.0){
00314       dest[0] = data_[0] / w;
00315       dest[1] = data_[1] / w;
00316       dest[2] = data_[2] / w;
00317     } else {
00318       dest[0] = data_[0];
00319       dest[1] = data_[1];
00320       dest[2] = data_[2];
00321     }
00322   }
00323
00324   inline void HomgPoint3D::GetEuclidian(Vector3<HOMGPOINT3D_TYPE> &dest) const
00325   {
00326     HomgPoint3D p=*this;
00327     p.GetEuclidian(dest);
00328   }
00329
00330   inline HOMGPOINT3D_TYPE HomgPoint3D::GetEuclidianX()
00331   {
00332     HOMGPOINT3D_TYPE w = GetW();
00333     BIASASSERT(w != 0.0);
00334     return (data_[0] / w);
00335   }
00336
00337   inline HOMGPOINT3D_TYPE HomgPoint3D::GetEuclidianY()
00338   {
00339     HOMGPOINT3D_TYPE w = GetW();
00340     BIASASSERT(w != 0.0);
00341     return (data_[1] / w);
00342   }
00343
00344   inline HOMGPOINT3D_TYPE HomgPoint3D::GetEuclidianZ()
00345   {
00346     HOMGPOINT3D_TYPE w = GetW();
00347     BIASASSERT(w != 0.0);
00348     return (data_[2] / w);
00349   }
00350
00351   inline bool HomgPoint3D::operator==(HomgPoint3D& arg)
00352   {
00353     Homogenize();
00354     arg.Homogenize();
00355     return (data_[0] == arg.data_[0]) &&  (data_[1] == arg.data_[1])
00356       && (data_[2] == arg.data_[2]) && (data_[3] == arg.data_[3]);
00357   }
00358
00359   inline bool HomgPoint3D::operator!=(HomgPoint3D& arg)
00360   {
00361     return !(*this == arg);
00362   }
00363
00364   inline bool HomgPoint3D::IsAtInfinity() const
00365   {
00366     return (data_[3] > -HOMGPOINT3D_EPS && data_[3] < HOMGPOINT3D_EPS);
00367   }
00368
00369   inline HOMGPOINT3D_TYPE
00370   HomgPoint3D::Distance(HomgPoint3D& point)
00371   {
00372     Homogenize();
00373     point.Homogenize();
00374     HOMGPOINT3D_TYPE dx=data_[0] - point[0];
00375     HOMGPOINT3D_TYPE dy=data_[1] - point[1];
00376     HOMGPOINT3D_TYPE dz=data_[2] - point[2];
00377     return sqrt(dx*dx + dy*dy + dz*dz);
00378   }
00379
00380 } // namespace BIAS
00381 #endif
00382
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3DCov.cpp Source File

Base » Geometry

HomgPoint3DCov.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomgPoint3DCov.hh"
00027 #include <Base/Geometry/HomgPoint3D.hh>
00028 #include <Base/Math/Matrix3x3.hh>
00029 #include <Base/Debug/Exception.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 HomgPoint3DCov::
00035 HomgPoint3DCov()
00036   : Matrix4x4<double>()
00037 {}
00038
00039 HomgPoint3DCov::
00040 HomgPoint3DCov(const MatrixInitType& i)
00041   : Matrix4x4<double>(i) {}
00042
00043 HomgPoint3DCov::
00044 HomgPoint3DCov(const Matrix4x4<double>& m)
00045   : Matrix4x4<double>(m)
00046 {
00047   if (!CheckSymmetry_()){
00048     /*cout << setprecision(20) << (*this)[0][1] <<" == "<< (*this)[1][0] << boolalpha << Equal((*this)[0][1], (*this)[1][0])<<"\t"<<((*this)[0][1]==(*this)[1][0])<<endl;
00049     cout << setprecision(20) << (*this)[0][2] <<" == "<< (*this)[2][0] << boolalpha << Equal((*this)[0][2], (*this)[2][0])<<endl;
00050     cout << setprecision(20) << (*this)[1][2] <<" == "<< (*this)[2][1] << boolalpha << Equal((*this)[1][2], (*this)[2][1])<<endl; */
00051     //BEXCEPTION("not a covariance matrix "<<*this);
00052     BIASERR("not a covariance matrix, forcing symmetry!! "<<*this);
00053     MakeSymmetric_();
00054   }
00055 }
00056
00057 HomgPoint3DCov::
00058 HomgPoint3DCov(const Matrix<double>& m)
00059   : Matrix4x4<double>(m)
00060 {
00061   if (!CheckSymmetry_()){
00062     BIASERR("not a covariance matrix, forcing symmetry!! "<<*this);
00063     MakeSymmetric_();
00064   }
00065 }
00066
00067 HomgPoint3DCov::
00068 HomgPoint3DCov(const TNT::Matrix<double>& m)
00069   : Matrix4x4<double>(m)
00070 {
00071   if (!CheckSymmetry_()){
00072     BIASERR("not a covariance matrix, forcing symmetry!! "<<*this);
00073     MakeSymmetric_();
00074   }
00075 }
00076
00077 HomgPoint3DCov::
00078 ~HomgPoint3DCov()
00079 {}
00080
00081 void HomgPoint3DCov::
00082 Homogenize(HomgPoint3D& p)
00083 {
00084   if (!p.IsAtInfinity()){
00085     // the jacobian of the Homogenize() function
00086     // 1/w  0    -x/w^2
00087     // 0    1/w  -y/w^2
00088     // 0    0    0
00089     Matrix4x4<double> J(MatrixZero);
00090     J[0][0] = J[1][1] = J[2][2] = 1.0/p[3];
00091     J[0][3] = -p[0]/p[3]/p[3];
00092     J[1][3] = -p[1]/p[3]/p[3];
00093     J[2][3] = -p[2]/p[3]/p[3];
00094     // the covariance transforms as J * cov * J^T
00095     *this = J * *this * J.Transpose();
00096     p.Homogenize();
00097   } else {
00098     cout << __FILE__<<":"<<__LINE__<<" p "<<p<<" at infinity, doing nothing\n";
00099   }
00100 }
00101
00102
00103 Matrix3x3<double> HomgPoint3DCov::
00104 GetEuclidean() const
00105 {
00106   if (!IsHomogenized()){
00107     BEXCEPTION("euclidean cov matrices can only be returned when homogenized");
00108   }
00109   Matrix3x3<double> res;
00110   res[0][0] = (*this)[0][0];
00111   res[0][1] = (*this)[0][1];
00112   res[0][2] = (*this)[0][2];
00113   res[1][0] = (*this)[1][0];
00114   res[1][1] = (*this)[1][1];
00115   res[1][2] = (*this)[1][2];
00116   res[2][0] = (*this)[2][0];
00117   res[2][1] = (*this)[2][1];
00118   res[2][2] = (*this)[2][2];
00119   return res;
00120 }
00121
00122
00123 void HomgPoint3DCov::
00124 SetEuclidean(const Matrix3x3<double>& m)
00125 {
00126   SetZero();
00127   (*this)[0][0] = m[0][0];
00128   (*this)[0][1] = m[0][1];
00129   (*this)[0][2] = m[0][2];
00130   (*this)[1][0] = m[1][0];
00131   (*this)[1][1] = m[1][1];
00132   (*this)[1][2] = m[1][2];
00133   (*this)[2][0] = m[2][0];
00134   (*this)[2][1] = m[2][1];
00135   (*this)[2][2] = m[2][2];
00136   if (!CheckSymmetry_()){
00137     // BIASERR("not a covariance matrix, forcing symmetry!! "<<*this);
00138     MakeSymmetric_();
00139   }
00140 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/HomgPoint3DCov.hh Source File

Base » Geometry

HomgPoint3DCov.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _HomgPoint3DCov_hh_
00027 #define _HomgPoint3DCov_hh_
00028
00029 #include <Base/Math/Matrix4x4.hh>
00030 #include <Base/Math/Vector4.hh>
00031 #include <Base/Common/CompareFloatingPoint.hh>
00032
00033 namespace BIAS {
00034
00035   template <class T> class Matrix3x3;
00036   class HomgPoint3D;
00037
00038   /** @class HomgPoint3DCov
00039       @brief class representing the covariance matrix of a homogenous point 3D
00040       @author woelk 03/2006 */
00041   class BIASGeometryBase_EXPORT HomgPoint3DCov
00042     : public Matrix4x4<double>
00043   {
00044   public:
00045     HomgPoint3DCov();
00046
00047     HomgPoint3DCov(const MatrixInitType& i);
00048
00049     HomgPoint3DCov(const Matrix4x4<double>& m);
00050
00051     HomgPoint3DCov(const Matrix<double>& m);
00052
00053     HomgPoint3DCov(const TNT::Matrix<double>& m);
00054
00055     virtual ~HomgPoint3DCov();
00056
00057     /** @brief homogenizes p and *this
00058         @author woelk 03/2006 */
00059     void Homogenize(HomgPoint3D& p);
00060
00061     Matrix3x3<double> GetEuclidean() const;
00062
00063     void SetEuclidean(const Matrix3x3<double>& m);
00064
00065     inline bool IsHomogenized() const {
00066       return (Equal((*this)[0][3], 0.0) && Equal((*this)[1][3], 0.0) &&
00067               Equal((*this)[2][3], 0.0) && Equal((*this)[3][0], 0.0) &&
00068               Equal((*this)[3][1], 0.0) && Equal((*this)[3][2], 0.0) &&
00069               Equal((*this)[3][3], 0.0));
00070     }
00071
00072     inline bool IsZero() const {
00073       return ( Equal((*this)[0][0], 0.0) && Equal((*this)[0][1], 0.0) &&
00074                Equal((*this)[0][2], 0.0) && Equal((*this)[0][3], 0.0) &&
00075                Equal((*this)[1][0], 0.0) && Equal((*this)[1][1], 0.0) &&
00076                Equal((*this)[1][2], 0.0) && Equal((*this)[1][3], 0.0) &&
00077                Equal((*this)[2][0], 0.0) && Equal((*this)[2][1], 0.0) &&
00078                Equal((*this)[2][2], 0.0) && Equal((*this)[2][3], 0.0) &&
00079                Equal((*this)[3][0], 0.0) && Equal((*this)[3][1], 0.0) &&
00080                Equal((*this)[3][2], 0.0) && Equal((*this)[3][3], 0.0) );
00081     }
00082   protected:
00083     inline bool CheckSymmetry_() const
00084     { return ( Equal((*this)[0][1], (*this)[1][0]) &&
00085                Equal((*this)[0][2], (*this)[2][0]) &&
00086                Equal((*this)[0][3], (*this)[3][0]) &&
00087                Equal((*this)[1][2], (*this)[2][1]) &&
00088                Equal((*this)[1][3], (*this)[3][1]) &&
00089                Equal((*this)[2][3], (*this)[3][2]) ); }
00090
00091   inline void MakeSymmetric_() {
00092     (*this)[1][0] = (*this)[0][1];
00093     (*this)[2][0] = (*this)[0][2];
00094     (*this)[2][1] = (*this)[1][2];
00095   }
00096
00097
00098
00099   };
00100
00101
00102 }
00103
00104 #endif // _HomgPoint3DCov_hh_
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/HomographyMapping.cpp Source File

Image

HomographyMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "HomographyMapping.hh"
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Geometry/HomgPoint2D.hh>
00030
00031 using namespace BIAS;
00032
00033 template <class InputStorageType, class OutputStorageType>
00034 HomographyMapping<InputStorageType, OutputStorageType>::
00035 ~HomographyMapping()
00036 {}
00037
00038
00039 template <class InputStorageType, class OutputStorageType>
00040 HomographyMapping<InputStorageType, OutputStorageType>::
00041 HomographyMapping()
00042 : H_(MatrixIdentity)
00043 {}
00044
00045
00046 template <class InputStorageType, class OutputStorageType>
00047 HomographyMapping<InputStorageType, OutputStorageType>::
00048 HomographyMapping(const HomographyMapping & src)
00049 {
00050     (*this) = src;
00051 }
00052
00053
00054 template <class InputStorageType, class OutputStorageType>
00055 HomographyMapping<InputStorageType, OutputStorageType> &
00056 HomographyMapping<InputStorageType, OutputStorageType>::
00057 operator=(const HomographyMapping & src)
00058 {
00059      H_ = src.H_;
00060      return *this;
00061 }
00062
00063
00064
00065 template <class InputStorageType, class OutputStorageType>
00066 int HomographyMapping<InputStorageType, OutputStorageType>::
00067 RotateToGrey(Image<InputStorageType>& src,
00068              Image<OutputStorageType>& sink,
00069              float PhiX, float PhiY, float PhiZ,
00070              const Matrix3x3<double> &K)
00071 {
00072   Matrix3x3<double> Kinv;
00073   Matrix3x3<double> KRKinv;
00074   Image<InputStorageType> source;
00075
00076   double centerx,centery;
00077
00078   if (!src.IsEmpty()){
00079
00080     if(src.GetColorModel() != ImageBase::CM_Grey)
00081       ImageConvert::Convert(src, source, ImageBase::CM_Grey);
00082     else
00083       source=src;
00084
00085     if(!sink.IsEmpty())
00086       sink.Release();
00087
00088     sink.Init(source.GetWidth(),source.GetHeight(),source.GetChannelCount());
00089
00090     // Prepare inverse camera mattix
00091     Kinv.SetIdentity();
00092     Kinv[0][0] = 1 / K[0][0];
00093     Kinv[1][1] = 1 / K[1][1];
00094     Kinv[0][2] = -K[0][2]/K[0][0];
00095     Kinv[1][2] = -K[1][2]/K[1][1];
00096
00097     centerx = K[0][0];
00098     centery = K[1][1];
00099
00100     RMatrix R;
00101     R.SetXYZ(PhiX,PhiY,PhiZ);
00102     KRKinv = K*R*Kinv;
00103
00104     /*cout << "K=" << K << endl;
00105       cout << "R=" << R << endl;
00106       cout << "Kinv = " << Kinv << endl;
00107       cout << "KRKinv=" << KRKinv << endl;*/
00108     SetHomography(KRKinv);
00109     return Map(src, sink);
00110   } else{
00111     return -1;
00112   }
00113 }
00114
00115
00116
00117 template <class InputStorageType, class OutputStorageType>
00118 int HomographyMapping<InputStorageType, OutputStorageType>::
00119 GetSourceCoordinates_(const HomgPoint2D& sink,
00120                       HomgPoint2D& source) const {
00121   // compute coordinates in source image with backward hoography
00122   H_.Mult(sink, source);
00123   source.Homogenize();
00124   return 0;
00125 }
00126
00127 template <class InputStorageType, class OutputStorageType>
00128 int HomographyMapping<InputStorageType, OutputStorageType>::
00129 GetJacobian_(const HomgPoint2D& sink, Matrix2x2<double>& Jacobian) const {
00130   // analytic jacobian of homography
00131   H_.GetJacobian(sink, Jacobian);
00132   return 0;
00133 }
00134
00135
00136 using namespace std;
00137
00138 template <class InputStorageType, class OutputStorageType>
00139 int HomographyMapping<InputStorageType, OutputStorageType>::
00140 GetBoundingBox(unsigned int sourcewidth, unsigned int sourceheight,
00141                unsigned int /*sinkwidth*/, unsigned int /*sinkheight*/,
00142                int &tlx,  int &tly,
00143                int &brx,  int &bry) {
00144
00145   // do a forward mapping of the corners of the source image and compute
00146   // convex hull rectangle
00147
00148   HomgPoint2D tl(0,0,1), br(sourcewidth, sourceheight,1), bbTL, bbBR;
00149   HomgPoint2D bl(0,sourceheight,1), tr(sourcewidth,0,1), bbBL, bbTR;
00150
00151   HMatrix HI=H_.Invert();
00152   bbTL= HI*tl; bbTL.Homogenize();
00153   bbBR= HI*br; bbBR.Homogenize();
00154   bbBL= HI*bl; bbBL.Homogenize();
00155   bbTR= HI*tr; bbTR.Homogenize();
00156
00157   double dtlx,dtly, dbrx,dbry;
00158
00159   // min(x) and min(y)
00160   dtlx=(bbTL[0]);
00161   if (bbBR[0]<dtlx) dtlx=(bbBR[0]);
00162   if (bbBL[0]<dtlx) dtlx=(bbBL[0]);
00163   if (bbTR[0]<dtlx) dtlx=(bbTR[0]);
00164
00165   dtly=(bbTL[1]);
00166   if (bbBR[1]<dtly) dtly=(bbBR[1]);
00167   if (bbBL[1]<dtly) dtly=(bbBL[1]);
00168   if (bbTR[1]<dtly) dtly=(bbTR[1]);
00169
00170   // max(x) and max(y)
00171   dbrx=(bbTL[0]);
00172   if (bbBR[0]>dbrx) dbrx=(bbBR[0]);
00173   if (bbBL[0]>dbrx) dbrx=(bbBL[0]);
00174   if (bbTR[0]>dbrx) dbrx=(bbTR[0]);
00175
00176   dbry=(bbTL[1]);
00177   if (bbBR[1]>dbry) dbry=(bbBR[1]);
00178   if (bbBL[1]>dbry) dbry=(bbBL[1]);
00179   if (bbTR[1]>dbry) dbry=(bbTR[1]);
00180
00181   if (dtlx >= double(INT_MAX)) dtlx = INT_MAX;
00182   if (dtly >= double(INT_MAX)) dtly = INT_MAX;
00183
00184   // br is outside the boundinx box
00185   if (dbrx>double(INT_MAX)) dbrx = INT_MAX;
00186
00187   if (dbry>double(INT_MAX)) dbry = INT_MAX;
00188
00189   tlx = ( int)dtlx;
00190   tly = ( int)dtly;
00191   brx = ( int)ceil(dbrx);
00192   bry = ( int)ceil(dbry);
00193
00194   return 0;
00195 }
00196
00197 template <class InputStorageType, class OutputStorageType>
00198 HMatrix HomographyMapping<InputStorageType, OutputStorageType>::
00199 GetChangedHomography() const
00200 {
00201   HMatrix HTrans;
00202   HTrans.SetIdentity();
00203   HTrans[0][2]=offsetX_;
00204   HTrans[1][2]=offsetY_;
00205   return H_ * HTrans;
00206 }
00207
00208 // TODO FIXME win32 template instantiation problem (JW)
00209 template class HomographyMapping<unsigned char, unsigned char>;
00210 template class HomographyMapping<float, float>;
00211 template class HomographyMapping<unsigned char, float>;
00212
00213 #if defined(BUILD_IMAGE_CHAR)
00214 // TODO FIXME win32 template instantiation problem (JW)
00215 template class HomographyMapping<unsigned char, char>;
00216 template class HomographyMapping<char, char>;
00217 #endif
00218
00219 #if defined(BUILD_IMAGE_USHORT)
00220 template class HomographyMapping<unsigned short,unsigned short>;
00221 #endif
00222
00223 #if defined(BUILD_IMAGE_SHORT)
00224 template class HomographyMapping<short, short>;
00225 #endif
00226
00227 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00228 template class HomographyMapping<unsigned short, short>;
00229 #endif
00230
00231 #if defined(BUILD_IMAGE_INT)
00232 template class HomographyMapping<int,int>;
00233 #endif
00234
00235 #if defined(BUILD_IMAGE_USHORT)
00236 template class HomographyMapping<unsigned short,float>;
00237 #endif
00238
00239 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00240 template class HomographyMapping<unsigned short,int>;
00241 #endif
00242
00243 #if defined(BUILD_IMAGE_DOUBLE)
00244 template class HomographyMapping<double,double>;
00245 #endif
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/HomographyMapping.hh Source File

Image

HomographyMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragmaStart.hh>
00026
00027 #ifndef __HomographyMapping_hh__
00028 #define __HomographyMapping_hh__
00029
00030 #include <Image/BackwardMapping.hh>
00031 #include <Geometry/HMatrix.hh>
00032
00033
00034 namespace BIAS {
00035
00036   /** @class HomographyMapping
00037       @ingroup g_filter
00038       @brief  Maps image src to image sink with homography H (software
00039       implementation)
00040       @author koeser, edited by grest Nov. 2005
00041   */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASImage_EXPORT HomographyMapping
00044     : public  BackwardMapping<InputStorageType, OutputStorageType>  {
00045   public:
00046
00047     virtual ~HomographyMapping();
00048
00049     HomographyMapping();
00050
00051     /**  required because assignment is
00052          @author Jan Woetzel */
00053     HomographyMapping(const HomographyMapping & src);
00054
00055     /**  required because of const members
00056          @author Jan Woetzel */
00057     HomographyMapping<InputStorageType, OutputStorageType> &
00058     operator=(const HomographyMapping & src);
00059
00060     /** @brief set your homography H (source = H * sink) before calling Map() */
00061     inline void SetHomography(const HMatrix& H) { H_ = H; };
00062
00063
00064     /** @brief given a calibration and 3 rot angles, compute mapped image
00065         Mainly computes the homography and calls map
00066         @author unknown (woelk ?) */
00067     int RotateToGrey(Image<InputStorageType>& src,
00068                      Image<OutputStorageType>& sink,
00069                      float PhiX, float PhiY, float PhiZ,
00070                      const Matrix3x3<double> &K);
00071
00072
00073
00074     /** calculates the bounding box in sink image,
00075         where to do the backward mapping.
00076         The resulting coordinates must be valid in sink, and the resulting
00077         br position should be outside the region.
00078         @author grest, Nov. 2005
00079      */
00080     virtual int GetBoundingBox(unsigned int srcwidth, unsigned int srcheight,
00081                                unsigned int sinkwidth, unsigned int sinkheight,
00082                                int &tlx, int &tly,
00083                                int &brx, int &bry);
00084
00085     /** if Map() is called with newDist=true, the real applied Homography
00086         is changed
00087      */
00088     HMatrix GetChangedHomography() const;
00089
00090   protected:
00091     /** @brief reimplementation for homography, takes sink and computes
00092         coords in source */
00093     virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
00094                                       HomgPoint2D& source) const;
00095
00096     /** @brief analytic jacobian */
00097     virtual int GetJacobian_(const HomgPoint2D& sink,
00098                              Matrix2x2<double>& Jacobian) const;
00099
00100     /// the homography for backward mapping: run over sink and compute
00101     /// source = H_ * sink
00102     HMatrix H_;
00103
00104     using BackwardMapping<InputStorageType, OutputStorageType>::offsetX_;
00105     using BackwardMapping<InputStorageType, OutputStorageType>::offsetY_;
00106   };
00107
00108
00109   //
00110   //#ifdef WIN32
00111   //template <>
00112   //int HomographyMapping<unsigned char, unsigned char>::
00113   //Map(Image<unsigned char> &source, Image<unsigned char> &dest,
00114   //    const HMatrix& H);
00115   //#endif
00116   //
00117
00118 } // namespace
00119
00120 #endif
00121
00122 #include <Base/Common/BIASpragmaEnd.hh>
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Image.cpp Source File

Base » Image

Image.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Image.hh"
00026
00027 #include <assert.h>
00028 #include <stdio.h>
00029 #include <limits.h>
00030 #include <string>
00031
00032
00033 // implementation in extra file:
00034 #include "Operators.cpp"
00035
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040
00041 namespace BIAS {
00042
00043 template<class StorageType>
00044 Image<StorageType>::~Image()
00045 {}
00046
00047
00048 template <>
00049 Image<unsigned char>::Image() : ImageBase()
00050 {
00051 #ifdef BIAS_DEBUG
00052     BIASGDOUT(D_IMAGE_TRACE, "called Image<unsigned char>::Image()");
00053 #endif
00054     StorageType_ = ST_unsignedchar;
00055     Depth_       = sizeof(unsigned char);
00056     BitDepth_    = 8*Depth_;
00057 }
00058
00059 template <>
00060 Image<float>::Image() : ImageBase()
00061 {
00062 #ifdef BIAS_DEBUG
00063     BIASGDOUT(D_IMAGE_TRACE, "called Image<float>::Image()");
00064 #endif
00065     StorageType_ = ST_float;
00066     Depth_       = sizeof(float);
00067     BitDepth_    = 8*Depth_;
00068 }
00069
00070 #ifdef BUILD_IMAGE_SHORT
00071 template <>
00072 Image<short int>::Image() : ImageBase()
00073 {
00074     StorageType_ = ST_shortint;
00075     Depth_       = sizeof(short int);
00076     BitDepth_    = 8*Depth_;
00077 }
00078 #endif // BUILD_IMAGE_SHORT
00079
00080 template<class StorageType>
00081 Image<StorageType>::Image() : ImageBase() {
00082     BIASERR("invalid StorageType, necessary instance of image not compiled:"
00083         <<PRINTTYPE(StorageType));
00084     //BIASABORT
00085 }
00086
00087
00088
00089 template <>
00090 Image<unsigned char>::Image(const ImageBase& im) : ImageBase()
00091 {
00092 #ifdef BIAS_DEBUG
00093     BIASGDOUT(D_IMAGE_TRACE,
00094         "called Image<uchar>::Image(const ImageBase& Source)");
00095 #endif
00096     StorageType_ = ST_unsignedchar;
00097     Depth_       = sizeof(unsigned char);
00098     BitDepth_    = 8*Depth_;
00099     if (GetStorageType()!=StorageType_) {
00100         BIASERR("You tried to construct Image<unsigned char> from "
00101             <<" ImageBase with StorageType "<<im.GetStorageType()
00102             <<". Aborting.");
00103         BIASABORT;
00104     }
00105     this->ImageBase::operator=(im);
00106 }
00107
00108 template <>
00109 Image<float>::Image(const ImageBase& im) : ImageBase()
00110 {
00111 #ifdef BIAS_DEBUG
00112     BIASGDOUT(D_IMAGE_TRACE,
00113         "called Image<float>::Image(const ImageBase& Source)");
00114 #endif
00115     StorageType_ = ST_float;
00116     Depth_       = sizeof(float);
00117     BitDepth_    = 8*Depth_;
00118     if (GetStorageType()!=StorageType_) {
00119         BIASERR("You tried to construct Image<float> from "
00120             <<" ImageBase with StorageType "<<im.GetStorageType()
00121             <<". Aborting.");
00122         BIASABORT;
00123     }
00124     this->ImageBase::operator=(im);
00125 }
00126
00127
00128
00129 template <class StorageType>
00130 Image<StorageType>::Image(const ImageBase& im)
00131 : ImageBase()
00132 {
00133     // this is the generic implementation which must NEVER be called !
00134     BIASERR("You tried to construct Image<"<<PRINTTYPE(StorageType)<<"> from "
00135         <<" ImageBase with StorageType "<<im.GetStorageType()
00136         <<". Not implemented for that type. Aborting.");
00137     BIASABORT;
00138 }
00139
00140
00141 template <class StorageType>
00142 Image<StorageType>::Image(unsigned int Width, unsigned int Height,
00143                           unsigned int channels, bool interleaved)
00144 {
00145     BIASERR("invalid StorageType="<<PRINTTYPE(StorageType));
00146     BIASABORT;
00147 }
00148
00149 template <>
00150 Image<unsigned char>::Image(unsigned int Width, unsigned int Height,
00151                             unsigned int Channels, bool interleaved)
00152 {
00153 #ifdef BIAS_DEBUG
00154     BIASGDOUT(D_IMAGE_TRACE,
00155         "called Image<uchar>::Image(width,height,channels,interl)");
00156 #endif
00157     StorageType_=ST_unsignedchar;
00158     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00159 }
00160 template <>
00161 Image<float>::Image(unsigned int Width, unsigned int Height,
00162                     unsigned int Channels, bool interleaved)
00163 {
00164 #ifdef BIAS_DEBUG
00165     BIASGDOUT(D_IMAGE_TRACE,
00166         "called Image<float>::Image(width,height,channels,interl)");
00167 #endif
00168     StorageType_=ST_float;
00169     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00170 }
00171
00172
00173 #ifdef BUILD_IMAGE_CHAR
00174 template <>
00175 Image<char>::Image() : ImageBase()
00176 {
00177     StorageType_ = ST_char;
00178     Depth_       = sizeof(char);
00179     BitDepth_    = 8*Depth_;
00180 }
00181 template <>
00182 Image<char>::Image(const ImageBase& im) : ImageBase()
00183 {
00184     StorageType_ = ST_char;
00185     Depth_       = sizeof(char);
00186     BitDepth_    = 8*Depth_;
00187     if (GetStorageType()!=StorageType_) {
00188         BIASERR("You tried to construct Image<char> from "
00189             <<" ImageBase with StorageType "<<im.GetStorageType()
00190             <<". Aborting.");
00191         BIASABORT;
00192     }
00193     this->ImageBase::operator=(im);
00194 }
00195
00196
00197 template <>
00198 Image<char>::Image(unsigned int Width, unsigned int Height,
00199                    unsigned int Channels, bool interleaved)
00200 {
00201     StorageType_=ST_char;
00202     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00203 }
00204 #endif
00205
00206
00207 #ifdef BUILD_IMAGE_USHORT
00208 template <>
00209 Image<unsigned short int>::Image() : ImageBase()
00210 {
00211     StorageType_ = ST_unsignedshortint;
00212     Depth_       = sizeof(unsigned short int);
00213     BitDepth_    = 8*Depth_;
00214 }
00215
00216 template <>
00217 Image<unsigned short int>::Image(const ImageBase& im) : ImageBase()
00218 {
00219     StorageType_ = ST_unsignedshortint;
00220     Depth_       = sizeof(unsigned short int);
00221     BitDepth_    = 8*Depth_;
00222     if (GetStorageType()!=StorageType_) {
00223         BIASERR("You tried to construct Image<unsigned short int> from "
00224             <<" ImageBase with StorageType "<<im.GetStorageType()
00225             <<". Aborting.");
00226         BIASABORT;
00227     }
00228     this->ImageBase::operator=(im);
00229 }
00230 template <>
00231 Image<unsigned short int>::Image(unsigned int Width, unsigned int Height,
00232                                  unsigned int Channels, bool interleaved)
00233 {
00234     StorageType_=ST_unsignedshortint;
00235     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00236 }
00237 #endif // BUILD_IMAGE_USHORT
00238
00239
00240
00241 #ifdef BUILD_IMAGE_SHORT
00242 template <>
00243 Image<short int>::Image(const ImageBase& im) : ImageBase()
00244 {
00245     StorageType_ = ST_shortint;
00246     Depth_       = sizeof(short int);
00247     BitDepth_    = 8*Depth_;
00248     if (GetStorageType()!=StorageType_) {
00249         BIASERR("You tried to construct Image<short int> from "
00250             <<" ImageBase with StorageType "<<im.GetStorageType()
00251             <<". Aborting.");
00252         BIASABORT;
00253     }
00254     this->ImageBase::operator=(im);
00255 }
00256
00257 template <>
00258 Image<short int>::Image(unsigned int Width, unsigned int Height,
00259                         unsigned int Channels, bool interleaved)
00260 {
00261     StorageType_=ST_shortint;
00262     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00263 }
00264 #endif
00265
00266
00267 #ifdef BUILD_IMAGE_UINT
00268 template <>
00269 Image<unsigned int>::Image() : ImageBase()
00270 {
00271     StorageType_ = ST_unsignedint;
00272     Depth_       = sizeof(unsigned int);
00273     BitDepth_    = 8*Depth_;
00274 }
00275 template <>
00276 Image<unsigned int>::Image(const ImageBase& im) : ImageBase()
00277 {
00278     StorageType_ = ST_unsignedint;
00279     Depth_       = sizeof(unsigned int);
00280     BitDepth_    = 8*Depth_;
00281     if (GetStorageType()!=StorageType_) {
00282         BIASERR("You tried to construct Image<unsigned int> from "
00283             <<" ImageBase with StorageType "<<im.GetStorageType()
00284             <<". Aborting.");
00285         BIASABORT;
00286     }
00287     this->ImageBase::operator=(im);
00288 }
00289 template <>
00290 Image<unsigned int>::Image(unsigned int Width, unsigned int Height,
00291                            unsigned int Channels, bool interleaved)
00292 {
00293     StorageType_=ST_unsignedint;
00294     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00295 }
00296 #endif
00297
00298
00299 #ifdef BUILD_IMAGE_INT
00300 template <>
00301 Image<int>::Image() : ImageBase()
00302 {
00303     StorageType_ = ST_int;
00304     Depth_       = sizeof(int);
00305     BitDepth_    = 8*Depth_;
00306 }
00307 template <>
00308 Image<int>::Image(const ImageBase& im) : ImageBase()
00309 {
00310     StorageType_ = ST_int;
00311     Depth_       = sizeof(int);
00312     BitDepth_    = 8*Depth_;
00313     if (GetStorageType()!=StorageType_) {
00314         BIASERR("You tried to construct Image<int> from "
00315             <<" ImageBase with StorageType "<<im.GetStorageType()
00316             <<". Aborting.");
00317         BIASABORT;
00318     }
00319     this->ImageBase::operator=(im);
00320 }
00321 template <>
00322 Image<int>::Image(unsigned int Width, unsigned int Height,
00323                   unsigned int Channels, bool interleaved)
00324 {
00325     StorageType_=ST_int;
00326     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00327 }
00328 #endif
00329
00330
00331 #ifdef BUILD_IMAGE_DOUBLE
00332 template <>
00333 Image<double>::Image() : ImageBase()
00334 {
00335     StorageType_ = ST_double;
00336     Depth_       = sizeof(double);
00337     BitDepth_    = 8*Depth_;
00338 }
00339 template <>
00340 Image<double>::Image(const ImageBase& im) : ImageBase()
00341 {
00342     StorageType_ = ST_double;
00343     Depth_       = sizeof(double);
00344     BitDepth_    = 8*Depth_;
00345     if (GetStorageType()!=StorageType_) {
00346         BIASERR("You tried to construct Image<double> from "
00347             <<" ImageBase with StorageType "<<im.GetStorageType()
00348             <<". Aborting.");
00349         BIASABORT;
00350     }
00351     this->ImageBase::operator=(im);
00352 }
00353 template <>
00354 Image<double>::Image(unsigned int Width, unsigned int Height,
00355                      unsigned int Channels, bool interleaved)
00356 {
00357     StorageType_=ST_double;
00358     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00359 }
00360 #endif
00361
00362 template <class StorageType>
00363 void Image<StorageType>::Init(unsigned int Width, unsigned int Height,
00364                               unsigned int Channels,
00365                               enum EStorageType storType, bool interleaved)
00366 {
00367     // StorageType_ is set from constructor
00368     ImageBase::Init(Width, Height, Channels, StorageType_, interleaved);
00369 }
00370
00371 template <class StorageType>
00372 std::ostream & Image<StorageType>::PrintPointer(std::ostream& os) const
00373 {
00374     BIASASSERT(ImageData_ != NULL);
00375     BIASASSERT(ImageDataArray_ != NULL);
00376     os << "\nImageData_: \t\t" << (void *)GetImageData()
00377         << "\nimageDataArray_: \t" << (void *)(GetImageDataArray()[0]);
00378     return os;
00379 }
00380
00381
00382 template <class StorageType>
00383 std::ostream& Image<StorageType>::PrintData(std::ostream& os) const
00384 {
00385     BIASASSERT(ImageData_ != NULL);
00386     os << "\nImageData_: \t\t" << GetImageData()
00387         << endl;
00388     for (unsigned long int i = 0; i < GetPixelCount(); i++)
00389         os << ((StorageType *)GetImageData())[i] << "  ";
00390     //      << (int)GetImageData()[i] << "   ";
00391     os << endl;
00392     return os;
00393 }
00394
00395
00396 template <class StorageType>
00397 void Image<StorageType>::FillImageWithConstValue(StorageType Value)
00398 {
00399     int minx, miny, maxx, maxy, cc=GetChannelCount();
00400     GetROI()->GetCorners(minx, miny, maxx, maxy);
00401     minx*=cc;
00402     maxx*=cc;
00403     register int width=(int)GetWidth()*cc, step=width-maxx+minx;
00404     // beginning of ROI
00405     register StorageType *p=GetImageData()+width*miny+minx;
00406     // end of first row of ROI
00407     register StorageType *le=GetImageData()+width*miny+maxx;
00408     // end of last row of ROI
00409     register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00410     //  int x=0, y=0;
00411     while (p<e){
00412         while (p<le){ // walk width of ROI in one line
00413             *p++ = Value;
00414             //x++;
00415         }
00416         //y++; x=0;
00417         le+=width; // set line end pointer one line further down
00418         p+=step; // skip to beginning of ROI in next line
00419     }
00420 }
00421
00422
00423 template <class StorageType>
00424 void Image<StorageType>::FillImageWithConstValue(StorageType Value[])
00425 {
00426     int minx, miny, maxx, maxy, i;
00427     register int cc=GetChannelCount();
00428     GetROI()->GetCorners(minx, miny, maxx, maxy);
00429     if (IsInterleaved()){
00430         minx*=cc;
00431         maxx*=cc;
00432         register int width=(int)GetWidth()*cc, step=width-maxx+minx;
00433         // beginning of ROI
00434         register StorageType *p=GetImageData()+width*miny+minx;
00435         // end of first row of ROI
00436         register StorageType *le=GetImageData()+width*miny+maxx;
00437         // end of last row of ROI
00438         register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00439         //  int x=0, y=0;
00440         while (p<e){
00441             while (p<le){ // walk width of ROI in one line
00442                 for (i=0; i<cc; i++) *p++ = Value[i];
00443             }
00444             //y++; x=0;
00445             le+=width; // set line end pointer one line further down
00446             p+=step; // skip to beginning of ROI in next line
00447         }
00448     } else {
00449         for (int i=0; i<cc; i++){
00450             register int width=(int)GetWidth(), step=width-maxx+minx;
00451             // beginning of ROI
00452             register StorageType *p=GetImageData()+i*GetPixelCount()+width*miny+minx;
00453             // end of first row of ROI
00454             register StorageType *le=GetImageData()+i*GetPixelCount()+width*miny+maxx;
00455             // end of last row of ROI
00456             register StorageType *e=GetImageData()+i*GetPixelCount()+width*(maxy-1)+maxx;
00457             //  int x=0, y=0;
00458             while (p<e){
00459                 while (p<le){ // walk width of ROI in one line
00460                     *p++ = Value[i];
00461                 }
00462                 //y++; x=0;
00463                 le+=width; // set line end pointer one line further down
00464                 p+=step; // skip to beginning of ROI in next line
00465             }
00466         }
00467     }
00468 }
00469
00470
00471 template <class StorageType>
00472 void Image<StorageType>::FillImageWithXValue()
00473 {
00474     StorageType *p = GetImageData();
00475
00476     for (unsigned int y=0; y< GetHeight(); y++){
00477         for (unsigned int x=0; x< GetWidth(); x++){
00478             p[y*GetWidth()+x]= StorageType(x);
00479         }
00480     }
00481 }
00482
00483
00484 template <class StorageType>
00485 void Image<StorageType>::GetMeanPixelValue(StorageType mean[])
00486 {
00487     if (IsInterleaved()){
00488         register const unsigned cc=GetChannelCount();
00489         register unsigned int i;
00490         double *sum=new double[cc];
00491         for (i=0; i<cc; i++) sum[i]=0.0;
00492         int minx, miny, maxx, maxy;
00493         GetROI()->GetCorners(minx, miny, maxx, maxy);
00494         register double pc=(double)((maxx-minx)*(maxy-miny));
00495         minx*=cc;
00496         maxx*=cc;
00497         register int width=(int)GetWidth()*cc, step=width-maxx+minx;
00498         // beginning of ROI
00499         register StorageType *p=GetImageData()+width*miny+minx;
00500         // end of first row of ROI
00501         register StorageType *le=GetImageData()+width*miny+maxx;
00502         // end of last row of ROI
00503         register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00504         //  int x=0, y=0;
00505         while (p<e){
00506             while (p<le){ // walk width of ROI in one line
00507                 for (i=0; i<cc; i++) sum[i]+=(double)p[i];
00508                 p+=cc;
00509             }
00510             le+=width; // set line end pointer one line further down
00511             p+=step; // skip to beginning of ROI in next line
00512         }
00513
00514         for (i=0; i<cc; i++) mean[i]=(StorageType)(sum[i]/pc);
00515         delete[] sum;
00516     } else {
00517         BIASERR("GetMeanPixelValue not implemented for planar images ");
00518     }
00519 }
00520
00521 // JW 01/2003
00522 template <class StorageType> bool
00523 Image<StorageType>::GetMinMaxPixelValueIgnoreRange(StorageType& min, StorageType& max,
00524                                                    const StorageType ignoreStart, const StorageType ignoreEnd,
00525                                                    const unsigned short int channel ) const
00526 {
00527 #ifdef BIAS_DEBUG
00528     // test if this implementation is suitable...
00529     if (IsEmpty())
00530         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() image is empty");
00531
00532     if (channel > (GetChannelCount() - 1))
00533         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() invalid channel");
00534
00535     if ((!IsPlanar()) ) {
00536         if (GetChannelCount()!=1) {
00537             BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() not yet implemented for interleaved multi channel images");
00538             BIASERR("ChannelCount: "<<GetChannelCount());
00539             BIASERR("IsPlanar: "<<IsPlanar() );
00540         };
00541     };
00542     unsigned minx, miny, maxx, maxy;
00543     GetROI()->GetCorners(minx, miny, maxx, maxy);
00544     if (minx!=0 || miny!=0 || maxx!=GetWidth() || maxy!=GetHeight())
00545         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() not implemented for ROI!");
00546 #endif
00547
00548     // OK, work...
00549     // Planar implementation:
00550
00551     StorageType *p_act, *p_end; // pointer to actual and end position in image data.
00552
00553     p_act = GetImageData() + channel*GetPixelCount(); // pointer to start of data
00554     p_end = p_act + GetPixelCount(); // pointer to end of data
00555     min=0;
00556     max=0;
00557     bool foundInRange = false;
00558     while ((!foundInRange) && (p_act!=p_end)) { // while no legal value found and pixels left..
00559         if (!((*p_act>ignoreStart) && (*p_act<ignoreEnd))) {
00560             // found value out of ignore range, use it as initial min/max
00561             min=*p_act;
00562             max=*p_act;
00563             foundInRange = true;
00564         };
00565         p_act++;
00566     };
00567     // initial valid min and max are set, find 'better' in the rest od the plane:
00568     for ( ;p_act!=p_end; p_act++) {
00569         // check if new min found:
00570         // min and max can't be changed at once!
00571         if (*p_act<min) {
00572             if (!((*p_act>ignoreStart) && (*p_act<ignoreEnd))) {
00573                 min=*p_act; // found
00574             };
00575         } else if (*p_act>max) {
00576             if (!((*p_act>ignoreStart) && (*p_act<ignoreEnd))) {
00577                 max=*p_act; // found
00578             };
00579         };
00580     }; // found min and max for planar image
00581     return foundInRange; // return if any value within range was found
00582 }
00583
00584
00585
00586 template <class StorageType> void
00587 Image<StorageType>::GetMinMaxPixelValue(StorageType& min, StorageType& max,
00588                                         unsigned short int channel,
00589                                         unsigned int *mincoo,
00590                                         unsigned int *maxcoo) const
00591 {
00592     register int ChannelCount = GetChannelCount();
00593     //  register StorageType *ImageDataPointer, *EndImageData;
00594     //  register unsigned int x, y;
00595 #ifdef BIAS_DEBUG
00596     if (IsEmpty())
00597         BIASERR("Image<StorageType>::GetMinMaxPixelValue() image is empty");
00598     if (channel > (ChannelCount - 1))
00599         BIASERR("Image<StorageType>::GetMinMaxPixelValue() inavlid channel");
00600     if ( (GetColorModel() != CM_RGB) &&  (GetColorModel() != CM_BGR) &&
00601         (GetColorModel() != CM_Grey) &&  (GetColorModel() != CM_HSV) &&
00602         (GetColorModel() != CM_Bayer_RGGB) &&
00603         (GetColorModel() != CM_Bayer_GBRG) &&
00604         (GetColorModel() != CM_Bayer_GRBG) &&
00605         (GetColorModel() != CM_Bayer_BGGR) )
00606         BIASERR("Image<StorageType>::GetMinMaxPixelValue() not implemented"
00607         <<" for this colormodel");
00608 #endif
00609     unsigned minx, miny, maxx, maxy;
00610     GetROI()->GetCorners(minx, miny, maxx, maxy);
00611     StorageType **ida=GetImageDataArray();
00612
00613     if (IsInterleaved()){
00614         BIASCDOUT(D_IMAGE_MINMAXCOO," interleaved ("<<minx<<", "<<miny<<") <--> ("
00615             <<maxx<<", "<<maxy<<")\n");
00616         unsigned cc=ChannelCount;
00617         BIASASSERT(ida[miny]!=NULL);
00618         min = max = ida[miny][minx*cc+channel];
00619         const unsigned mmaxx=maxx*cc;
00620         if (mincoo!=NULL || maxcoo!=NULL){ // remember coordinates
00621             BIASCDOUT(D_IMAGE_MINMAXCOO, "remember coordinates\n");
00622             if (mincoo) { mincoo[0]=minx; mincoo[1]=miny; }
00623             if (maxcoo) { maxcoo[0]=minx; maxcoo[1]=miny; }
00624             for (unsigned y=miny; y<maxy; y++){
00625                 for (unsigned x=minx*cc+channel; x<mmaxx; x+=cc){
00626                     if (ida[y][x]>max) {
00627                         max=ida[y][x];
00628                         if (maxcoo) {
00629                             maxcoo[0]=(x-channel)/cc;
00630                             maxcoo[1]=y;
00631                         }
00632                     } else if (ida[y][x]<min) {
00633                         min=ida[y][x];
00634                         if (mincoo) {
00635                             mincoo[0]=(x-channel)/cc;
00636                             mincoo[1]=y;
00637                         }
00638                     }
00639                 }
00640             }
00641         } else { // no need to remeber coordinates
00642             BIASCDOUT(D_IMAGE_MINMAXCOO, "don't remember coordinates\n");
00643             for (unsigned y=miny; y<maxy; y++){
00644                 BIASASSERT(ida[y]!=NULL);
00645                 for (unsigned x=minx*cc+channel; x<mmaxx; x+=cc){
00646                     //cout<<" ("<<(x-channel)/cc<<", "<<y<<"):" <<(int)(ida[y][x])<<flush;
00647                     /// @bug NULL pointer exception occurs, here (e.g. in fuse) JW
00648                     if (ida[y][x]>max) max=ida[y][x];
00649                     if (ida[y][x]<min) min=ida[y][x];
00650                 }
00651             }
00652         }
00653     } else { // planar image
00654         BIASCDOUT(D_IMAGE_MINMAXCOO," planar ("<<minx<<", "<<miny<<") <--> ("
00655             <<maxx<<", "<<maxy<<")\n");
00656         StorageType *start=GetImageData() + channel*GetPixelCount() +
00657             miny*GetWidth() + minx;
00658         StorageType *mendl=start+maxx-minx;
00659         StorageType *end=GetImageData() + channel*GetPixelCount() +
00660             (maxy-1)*GetWidth() + maxx;
00661         int step=(int)GetWidth()-(int)maxx+(int)minx;
00662         int x=minx;
00663         int y=miny;
00664         const int width=(int)GetWidth();
00665         max=min=*start;
00666         BIASCDOUT(D_IMAGE_MINMAXCOO, "starting with min: "<< (int)min <<"\tmax: "
00667             << (int)max <<endl);
00668         if (mincoo!=NULL || maxcoo!=NULL){ // remember coordinates
00669             BIASCDOUT(D_IMAGE_MINMAXCOO, "remember coordinates\n");
00670             if (mincoo) { mincoo[0]=minx; mincoo[1]=miny; }
00671             if (maxcoo) { maxcoo[0]=minx; maxcoo[1]=miny; }
00672             while (start<end){
00673                 while (start<mendl){
00674                     //cerr << " ("<<x<<", "<<y<<") " << (int)(*start) << endl;
00675                     if (*start>max) {
00676                         max=*start;
00677                         if (maxcoo){
00678                             maxcoo[0]=x;
00679                             maxcoo[1]=y;
00680                         }
00681                     } else if (*start<min) {
00682                         min=*start;
00683                         if (mincoo){
00684                             mincoo[0]=x;
00685                             mincoo[1]=y;
00686                         }
00687                     }
00688                     start++;
00689                     x++;
00690                 }
00691                 start+=step;
00692                 mendl+=width;
00693                 y++;
00694                 x=minx;
00695             }
00696         } else { // no need to remeber coordinates
00697             BIASCDOUT(D_IMAGE_MINMAXCOO, "don't remember coordinates\n");
00698             while (start<end){
00699                 while (start<mendl){
00700                     if (*start>max) max=*start;
00701                     else if (*start<min) min=*start;
00702                     start++;
00703                 }
00704                 start+=step;
00705                 mendl+=width;
00706             }
00707         }
00708     }
00709 }
00710
00711
00712 template <class StorageType> StorageType
00713 Image<StorageType>::GetMinPixelValue(unsigned short int channel,
00714                                      unsigned int *coo) const
00715 {
00716     StorageType min, max;
00717     if (coo==NULL){
00718         GetMinMaxPixelValue(min, max, channel);
00719     } else {
00720         unsigned int maxcoo[2];
00721         GetMinMaxPixelValue(min, max, channel, coo, maxcoo);
00722     }
00723     return min;
00724 }
00725
00726
00727
00728
00729 template <class StorageType> StorageType
00730 Image<StorageType>::GetMaxPixelValue(unsigned short int channel,
00731                                      unsigned int *coo) const
00732 {
00733     StorageType min, max;
00734     if (coo==NULL){
00735         GetMinMaxPixelValue(min, max, channel);
00736     } else {
00737         unsigned int mincoo[2];
00738         GetMinMaxPixelValue(min, max, channel, mincoo, coo);
00739     }
00740     return max;
00741 }
00742
00743
00744
00745 template <class StorageType>
00746 int Image<StorageType>::BelowThresholdToValue(StorageType Threshold,
00747                                               StorageType Value)
00748 {
00749     StorageType *p=GetImageData();
00750     unsigned int count = GetPixelCount() * GetChannelCount();
00751     for (register int i=count; i>0 ; i--){
00752         *p = (*p > Threshold) ? *p : Value;
00753         p++;
00754     }
00755     return 0;
00756 }
00757
00758
00759 template <class StorageType>
00760 int Image<StorageType>::AboveThresholdToValue(StorageType Threshold,
00761                                               StorageType Value)
00762 {
00763     StorageType *p=GetImageData();
00764     unsigned int count = GetPixelCount() * GetChannelCount();
00765     for (register int i=count; i>0 ; i--){
00766         *p = (*p < Threshold) ? *p : Value;
00767         p++;
00768     }
00769     return 0;
00770 }
00771
00772 template <class StorageType>
00773 void Image<StorageType>::Binarize(StorageType threshold)
00774 {
00775     StorageType *ptr, *end;
00776     ptr = end = GetImageData();
00777     end += GetPixelCount();
00778     while (ptr < end){
00779         *ptr = (*ptr > threshold)?(MaxSTValue()):(MinSTValue());
00780         ptr++;
00781     }
00782 }
00783
00784
00785
00786
00787 template <class StorageType>
00788 int Image<StorageType>::ScaleShift(double Scale, double Shift)
00789 {
00790     register StorageType *ImageData = GetImageData();
00791     register StorageType *ImageDataEnd =
00792         ImageData + GetPixelCount() * GetChannelCount();
00793     while (ImageData < ImageDataEnd){
00794         *ImageData = (StorageType)( ( (double)(*ImageData) + Shift) * Scale );
00795     ImageData++;
00796     }
00797     return 0;
00798 }
00799
00800 template <class StorageType>
00801 int Image<StorageType>::ScaleShiftBetween(double Min, double  Max)
00802 {
00803     register double Scale, Shift;
00804     int res = CalcScaleShift(Min,Max,Scale,Shift);
00805     if (res!=0) {
00806         BIASERR("Cannot scale-shift, error in determining numbers.");
00807         return res;
00808     }
00809     res = ScaleShift(Scale, Shift);
00810     return res;
00811 }
00812
00813 template <class StorageType>
00814 int Image<StorageType>::CalcScaleShift(double Min, double Max,
00815                                        double& Scale, double &Shift) const
00816 {
00817     StorageType min = 0, max = 0, MinVal = 0, MaxVal = 0;
00818     GetMinMaxPixelValue(MinVal, MaxVal, 0);
00819     for (unsigned int i = 1; i < GetChannelCount(); i++){
00820         GetMinMaxPixelValue(min, max, (unsigned short)i );
00821         if (max > MaxVal) MaxVal = max;
00822         if (min < MinVal) MinVal = min;
00823     }
00824
00825     if ((MaxVal - MinVal) == 0){
00826 #ifdef BIAS_DEBUG
00827         BIASERR("Image<StorageType>::CalcScaleShift(): minimum pixelvalue is"
00828             <<" equal to maximum pixel value -> no scaling possible");
00829 #endif
00830         return -1;
00831     }
00832
00833     Scale = (double)(Max-Min)/(double)(MaxVal-MinVal);
00834     Shift = (double)(Min-MinVal);
00835
00836     return 0;
00837 }
00838
00839 template <class StorageType>
00840 int Image<StorageType>::BinaryThreshold(StorageType Threshold,
00841                                         StorageType MinValue,
00842                                         StorageType MaxValue)
00843 {
00844     register StorageType* ImageData  = GetImageData() + GetROILowerRightY() *
00845         GetWidth() + GetROIUpperLeftX ();
00846     register StorageType* ImageDataStop = GetImageData() +
00847         GetROILowerRightY() * GetWidth() + GetROILowerRightX();
00848     register int ROIBreite   = GetROILowerRightX() - GetROIUpperLeftX() ;
00849     for(int i = GetROILowerRightX() - GetROIUpperLeftX(); i >= 0; i--) {
00850         for(;ImageData < ImageDataStop; ImageData++) {
00851             *ImageData = *ImageData >= Threshold ? MaxValue : MinValue;
00852         }
00853         /* Decrease the counter to proceed with above line */
00854         ImageDataStop -= GetWidth();
00855         ImageData      = ImageDataStop - ROIBreite;
00856     }
00857     return 0;
00858 }
00859
00860
00861 ///////////////////////////////////////////////////////////////////////////
00862 template <class StorageType> double
00863 Image<StorageType>::BilinearInterpolation(const double x,
00864                                           const double y,
00865                                           const unsigned short int channel)
00866                                           const
00867 {
00868 #ifdef BIAS_DEBUG
00869     if ((ceil(x)>(GetWidth()-1)) || (ceil(y)>(GetHeight()-1))
00870         || y<0.0 || x<0.0)
00871         BIASERR("BilinearInterpolation()  coordinates out of bounds "<<x<<" "<<y
00872         <<"   "<<GetWidth()<<" "<<GetHeight());
00873 #endif
00874     double res = -1;
00875
00876     switch (GetColorModel()){
00877   case CM_Grey:
00878       res = BilinearInterpolationGrey(x, y);
00879       break;
00880   case CM_RGB:
00881   case CM_BGR:
00882       if (IsPlanar()){
00883           res = BilinearInterpolationRGBPlanar(x, y, channel);
00884       } else {
00885           res = BilinearInterpolationRGBInterleaved(x, y, channel);
00886       };
00887       break;
00888   default:
00889       BIASERR("BilinearInterpolation() not implemented for this color model "
00890           <<GetColorModel());
00891       break;
00892     }
00893     return res;
00894 }
00895
00896
00897 template <class StorageType> double
00898 Image<StorageType>::BicubicInterpolation(const double& x,
00899                                          const double& y,
00900                                          const unsigned short int
00901                                          channel) const
00902 {
00903     // always use smaller int to find "next" grid position
00904     const int x_int = int(x);
00905     const int y_int = int(y);
00906
00907     // compute offset from regular grid
00908     const double offsetx = x-x_int;
00909     const double offsety = y-y_int;
00910
00911     // y weights
00912     const double wy0 = 0.25 * (((2.0-offsety)*offsety-1.0)*offsety);
00913     const double wy1 = 0.25 * ((3.0*offsety-5.0)*offsety*offsety+2.0);
00914     const double wy2 = 0.25 * (((4.0-3.0*offsety)*offsety+1.0)*offsety);
00915     const double wy3 = 0.25 * ((offsety-1.0)*offsety*offsety);
00916
00917     // x weights
00918     const double wx0 = ((2.0-offsetx)*offsetx-1.0)*offsetx;
00919     const double wx1 = (3.0*offsetx-5.0)*offsetx*offsetx+2.0;
00920     const double wx2 = ((4.0-3.0*offsetx)*offsetx+1.0)*offsetx;
00921     const double wx3 = (offsetx-1.0)*offsetx*offsetx;
00922
00923     const StorageType** pD = (const StorageType**) GetImageDataArray();
00924     return ( (wx0*pD[y_int - 1][(x_int-1) * ChannelCount_ + channel] +
00925         wx1*pD[y_int - 1][ x_int    * ChannelCount_ + channel] +
00926         wx2*pD[y_int - 1][(x_int+1) * ChannelCount_ + channel] +
00927         wx3*pD[y_int - 1][(x_int+2) * ChannelCount_ + channel])*wy0 +
00928         (wx0*pD[y_int    ][(x_int-1) * ChannelCount_ + channel] +
00929         wx1*pD[y_int    ][ x_int    * ChannelCount_ + channel] +
00930         wx2*pD[y_int    ][(x_int+1) * ChannelCount_ + channel] +
00931         wx3*pD[y_int    ][(x_int+2) * ChannelCount_ + channel])*wy1 +
00932         (wx0*pD[y_int + 1][(x_int-1) * ChannelCount_ + channel] +
00933         wx1*pD[y_int + 1][ x_int    * ChannelCount_ + channel] +
00934         wx2*pD[y_int + 1][(x_int+1) * ChannelCount_ + channel] +
00935         wx3*pD[y_int + 1][(x_int+2) * ChannelCount_ + channel])*wy2 +
00936         (wx0*pD[y_int + 2][(x_int-1) * ChannelCount_ + channel] +
00937         wx1*pD[y_int + 2][ x_int    * ChannelCount_ + channel] +
00938         wx2*pD[y_int + 2][(x_int+1) * ChannelCount_ + channel] +
00939         wx3*pD[y_int + 2][(x_int+2) * ChannelCount_ + channel])*wy3 );
00940 }
00941
00942
00943 template <class StorageType>
00944 int Image<StorageType>::AppendChannel(Image<StorageType> &img)
00945 {
00946     StorageType *src1,*src2, *dst, *write;
00947
00948     if (GetWidth()!=img.GetWidth() || GetHeight() != img.GetHeight()
00949         || img.GetChannelCount() >1){
00950             BIASERR("MIPIMage::AppendChannel(): second image has different "
00951                 <<"dimensions");
00952             return -1;
00953         }
00954         if (img.IsEmpty() || IsEmpty()){
00955             BIASERR("Image::Append(): one or both images are empty");
00956             return -1;
00957         }
00958
00959         src1 = GetImageData();
00960         src2 = img.GetImageData();
00961
00962         dst = new StorageType[GetWidth() * GetHeight() * (GetChannelCount() +1)];
00963         write = dst;
00964
00965         if (!IsPlanar())
00966             for (unsigned long int p=0; p<GetPixelCount(); p++){
00967                 for (unsigned long int c=0; c<GetChannelCount(); c++)
00968                     *write++ = *src1++;
00969                 *write++ = *src2++;
00970             }
00971         else
00972             BIASERR("not impl");
00973
00974         ChannelCount_ += 1;
00975         WidthStep_ = GetWidth() * GetChannelCount() * Depth_;
00976         if (GetChannelCount() == 4)
00977             ColorModel_ = CM_RGBA;
00978         if (GetChannelCount() == 2)
00979             ColorModel_ = CM_GreyA;
00980
00981         ReleaseImageDataPointer();
00982         RedirectImageDataPointer(dst);
00983
00984         return 0;
00985 }
00986
00987
00988 template <class StorageType>
00989 void Image<StorageType>::Release()
00990 {
00991     delete[] (char**)ImageDataArray_; ImageDataArray_ = NULL;
00992     delete[] (char*)ImageData_; ImageData_=NULL;
00993     ChannelCount_ = 0;
00994     Width_ = Height_ = 0;
00995     // do not set depth to zero, it is fixed in the templated image case
00996     BitDepth_ = 8 * Depth_;
00997     WidthStep_ = 0;
00998     ColorModel_ = CM_invalid;
00999
01000     GetROI()->Release();
01001     _MetaData.clear();
01002 }
01003
01004
01005 /// Jan Woetzel 01/2003
01006 template <class StorageType>
01007 Image<float> Image<StorageType>::Reciprocal(const float factor, const unsigned short int channel ) {
01008 #ifdef BIAS_DEBUG
01009     // test if this implementation is suitable...
01010     if (IsEmpty())
01011         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() image is empty");
01012
01013     if (channel > (GetChannelCount() - 1))
01014         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() invalid channel");
01015
01016     unsigned minx, miny, maxx, maxy;
01017     GetROI()->GetCorners(minx, miny, maxx, maxy);
01018     if (minx!=0 || miny!=0 || maxx!=GetWidth() || maxy!=GetHeight())
01019         BIASERR("Image<StorageType>::GetMinMaxPixelValueIgnoreZero() not implemented for ROI!");
01020 #endif
01021
01022     // OK, work...
01023     Image<float> res( GetWidth(), GetHeight() ); // result image
01024     StorageType *p_src; // pointer to data in src image
01025     float *p_dest; // pointer to data in dest image
01026
01027     p_src  = GetImageData() + channel*GetPixelCount(); // pointer to start of data in src image
01028     p_dest = res.GetImageData(); // pointer to start of data in dest image
01029     for (unsigned int i=0; i<GetPixelCount(); i++) {
01030         // set value
01031         if (p_src[i] == 0) {
01032             // divison by zero
01033             p_dest[i] = 0.0f; // 0, +inf or -inf. or...
01034         } else {
01035             p_dest[i] = float(factor / p_src[i]);
01036         };
01037     };
01038
01039     return res;
01040 }
01041
01042 template <class StorageType>
01043 int Image<StorageType>::
01044 InitWithForeignData(unsigned int width, unsigned int height,
01045             unsigned int channels,void *data,
01046             const bool interleaved)
01047 {
01048   // first implementation uses standard init, then releses allocated data
01049   // and adjusts data_ to data
01050   // this is quite inefficient and will be changed in the near future
01051   ImageBase::Init(width, height, channels, StorageType_, interleaved);
01052   ReleaseImageDataPointer();
01053   RedirectImageDataPointer(data);
01054   return 0;
01055 }
01056
01057 } // namespace BIAS
01058
01059
01060
01061 //
01062 // solve explicit instantiation
01063 //
01064 #define INSTANCE_Image(type)\
01065 template class BIASImageBase_EXPORT Image<type>;
01066
01067 // create instances
01068 INSTANCE_Image(unsigned char)
01069 INSTANCE_Image(float)
01070 #ifdef BUILD_IMAGE_INT
01071 INSTANCE_Image(int)
01072 #endif
01073 #ifdef BUILD_IMAGE_CHAR
01074 INSTANCE_Image(char)
01075 #endif
01076 #ifdef BUILD_IMAGE_SHORT
01077 INSTANCE_Image(short)
01078 #endif
01079 #if defined(BUILD_IMAGE_USHORT)
01080 INSTANCE_Image(unsigned short)
01081 #endif
01082 #ifdef BUILD_IMAGE_DOUBLE
01083 INSTANCE_Image(double)
01084 #endif
01085 #ifdef BUILD_IMAGE_UINT
01086 INSTANCE_Image(unsigned int)
01087 #endif
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/image.dox File Reference

Doc/image.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Image.hh Source File

Base » Image

Image.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Image_hh__
00027 #define __Image_hh__
00028
00029 #include "bias_config.h"
00030
00031
00032 // tell WIN32 to define math-constants
00033 //--- math.h is included by <complex>
00034 #include <Base/Common/W32Compat.hh>
00035
00036 #define _USE_MATH_DEFINES
00037 #include <math.h>
00038
00039 #include <iostream>
00040 #include <string>
00041 #include <fstream>
00042 // for MaxSTValue and MinSTValue
00043 #include <float.h>
00044 #include <limits.h>
00045
00046 //BIAS
00047 #include <Base/Image/ImageBase.hh>
00048
00049
00050 #define MIP_DV_WIDTH 500
00051 #define MIP_DV_HEIGHT 288
00052
00053 #define D_COPYIN        1<<1
00054 #define D_CONVERT       1<<2
00055 #define D_CAST_CHECK    1<<3
00056 #define D_MI_TOPLANAR   1<<4
00057 #define D_MI_IOSTREAM   1<<5
00058 #define D_MI_CONVGREY   1<<6
00059 #define D_IMAGE_MINMAXCOO   1<<7
00060
00061 namespace BIAS {
00062
00063   /** @class Image
00064       @ingroup g_image_base
00065       @brief The image template class for specific storage types.
00066
00067       The real image data is stored as an array of the specific storage type.
00068       You can get the pointer by GetImageData() while
00069       accessing the image data could also be more efficiently done
00070       by GetImageDataArray()[y][x],
00071       which gives the first channel of pixel at position (x,y).
00072       The second and third channels for interleaved images are at
00073       [y][channelcount*x+1] and [y][channelcount*x+2].<br>
00074
00075       There is an additional MetaData array, which holds information like
00076       the Pmatrix, which are used by derived classes.<br>
00077
00078       see also ExampleLoad.cpp , ExampleOperator.cpp, ExampleChessboard.cpp
00079
00080       @internal The explicit instatiation of the template
00081       is handled in ImageInstantiation.cpp
00082   **/
00083   template <class StorageType>
00084   class BIASImageBase_EXPORT Image : public ImageBase
00085   {
00086   public:
00087     Image();
00088     virtual ~Image();
00089
00090     /** constructor with size and channels
00091         allocates image data */
00092     Image(unsigned int width, unsigned int height, unsigned int channels=1,
00093       const bool interleaved=true);
00094
00095     /** create image from imagebase. this is a dangerous operation and must
00096         therefore not be used by implicit conversion. That means, you can
00097         manually convert ImageBase->Image, but you cannot pass an
00098         Image<float> where Image<char> is expected. */
00099     explicit Image(const ImageBase& im);
00100
00101     /** @brief calls Init from ImageBase
00102         storageType is ignored, just dummy argument */
00103     void Init(unsigned int Width, unsigned int Height,
00104           unsigned int channels=1,
00105           enum EStorageType storageType= ST_unsignedchar,
00106           const bool interleaved=true);
00107
00108     /** @brief reimplemented from ImageBase */
00109     void Release();
00110
00111     /**
00112        This is used to construct a BIAS::Image hull around
00113        existing image data. Be sure to ClearDataPointer() _before_
00114        destructing the Image object to avoid deletion of the data array
00115        @author evers
00116     */
00117     int InitWithForeignData(unsigned int width, unsigned int height,
00118                  unsigned int channels,void *data,
00119                  const bool interleaved=true);
00120
00121
00122     /** @name Get Functions
00123         @{
00124     */
00125     /** overloaded GetImageData() from ImageBase
00126         @author Daniel Grest */
00127     inline StorageType* GetImageData() const
00128     {return (StorageType *)ImageData_;};
00129
00130     /** overloaded GetImageData() from ImageBase
00131         @author Daniel Grest
00132     */
00133     inline StorageType** GetImageDataArray() const
00134     {return (StorageType **)ImageDataArray_;};
00135
00136     /** Returns value of pixel at specific position,
00137         using specific channel as offset
00138         @author Ingo Thomsen
00139         @date 03/27/2002
00140         @status tested (only with interleaved image) **/
00141     inline StorageType PixelValue(const unsigned int x,
00142                   const unsigned int y,
00143                   const unsigned short int channel=0)const;
00144
00145     /** Returns value of pixel at specific position,
00146         using specific channel as offset.
00147         Faster than PixelValue because it has no error check,
00148         works only for interleaved images
00149         @author Johan Skoglund
00150         @date 06/10/2004
00151         @status untested **/
00152     inline StorageType PixelValueInterleaved(const int x,
00153                          const int y,
00154                          const int channel=0)const;
00155
00156     /** Get the minimal pixel value
00157         if coo!=NULL the coo[0]=x of min and coo[1]=y of min
00158         @author Felix Woelk **/
00159     StorageType GetMinPixelValue(unsigned short int channel=0,
00160                  unsigned int *coo=NULL) const;
00161
00162     /** Get the maximal pixel value
00163         if coo!=NULL the coo[0]=x of max and coo[1]=y of max
00164         @author Felix Woelk **/
00165     StorageType GetMaxPixelValue(unsigned short int channel=0,
00166                  unsigned int *coo=NULL) const;
00167
00168     /** @brief returns the minimal and maximal pixel value in channel only
00169         Finds minimum and maximum pixel value in image in channel only, i.e.
00170         all other channels are ignored during the search. Returns the first
00171         occurance of min/max pixelvalue, if they occure multiple times.
00172         @param min The variable where to store the minimun value
00173         @param min The variable where to store the maximum value
00174         if mincoo or maxcoo !=NULL, also stores the location of
00175         min resp. max, works slow on
00176         @tested woelk 10/2004 ( Examples/ExampleMinMax.cpp )
00177         @author Jan Frahm, woelk 01/2003, woelk 10/2004 **/
00178     void GetMinMaxPixelValue(StorageType& min, StorageType& max,
00179                  unsigned short int channel=0,
00180                  unsigned int *mincoo=NULL,
00181                  unsigned int *coo=NULL) const;
00182
00183     /** @author woelk 08/2004 */
00184     void GetMeanPixelValue(StorageType mean[]);
00185
00186     /** @brief Get both, minimal and maximal pixel value
00187         --actual implementation only for planar images--
00188         @param min The variable where to store the minimun value
00189         @param min The variable where to store the maximum value
00190         @param ignoreStart, ignoreEnd define teh range of values to be ignored
00191         @param channel to be searched fro multi-channel images
00192         @return true if a value within raneg was found, else false
00193         @author Jan Woetzel 01/2003 **/
00194     bool GetMinMaxPixelValueIgnoreRange(StorageType& min, StorageType& max,
00195                     const StorageType ignoreStart=0,
00196                     const StorageType ignoreEnd=0,
00197                     const unsigned short int channel=0 )
00198       const;
00199
00200     /** @brief Get the value of a specific channel offset of specific pixel
00201         nearest to given double coordinates
00202
00203         @author Ingo Thomsen
00204         @date 03/27/2002
00205         @status tested (only with interleaved grey images) **/
00206     inline StorageType&
00207     GetPixelNearestNeighbor(const double x, const double y,
00208                 const unsigned short int channel=0)const;
00209
00210     /** @brief Get the value of a specific channel offset of specific pixel
00211         nearest to given float coordinates, using the double version.
00212
00213         @author Ingo Thomsen
00214         @date 03/28/2002
00215         @status tested (only with interleaved gray images) **/
00216     inline StorageType&
00217     GetPixelNearestNeighbor(const float x, const float y,
00218                 const unsigned short int channel=0) const;
00219
00220
00221     // @}
00222     ////////end of Get Functions////////////////////////////////////////////
00223
00224     /** @name Set Functions
00225         @{
00226     */
00227     /**
00228         @brief sets all pixels to zero/value
00229
00230         clear all pixels elements and set them to a 'default' value
00231         JW 04/2003
00232     */
00233     void Clear(const StorageType value=0) {
00234       StorageType tmp_v = value;
00235       FillImageWithConstValue( tmp_v );
00236     };
00237     /// @brief fill grey images
00238     void FillImageWithConstValue(StorageType Value);
00239     /// @brief fill color images
00240     void FillImageWithConstValue(StorageType Value[]);
00241
00242     /// @brief fills image with value depending on x coordinate
00243     void FillImageWithXValue();
00244
00245     /** set the value of a given pixel (x,y) in channel to value.
00246         @warning this function is slower than direct pointer acces if you
00247         want to access ALL pixels of an image!
00248         @author Jan Woetzel 08/2003 */
00249     inline void SetPixel(const StorageType & value, const unsigned int & x,
00250              const unsigned int & y,
00251              const unsigned short int channel=0);
00252
00253     /** set the values of the first three channels of a given pixel (x,y)
00254         in channel to value[0..2].
00255         @warning this function is slower than direct pointer acces if you
00256         want to access ALL pixels of an image!
00257         @author Jan Woetzel 08/2003 */
00258     inline void SetPixel(const StorageType & value0,
00259              const StorageType & value1,
00260              const StorageType & value2,
00261              const unsigned int & x,
00262              const unsigned int & y );
00263
00264     // @}
00265     //////end of Set Functions /////////////////////////////////////////////
00266
00267     /** @name Thresholding and Scaling
00268         @{
00269     */
00270
00271     /** @brief scales and shifts image (all channels simultanously)
00272
00273     does scale and shift every channel with same factor so that
00274     (max of all channels) = Max and (min of all channels) = Min.
00275     First shifts, then scales.
00276     @author Felix Woelk **/
00277     int ScaleShift(double Scale, double Shift);
00278
00279     /** @brief scales and shifts image so afterwards every pixel has a value
00280         between Min and Max
00281
00282         scales and shifts every channel with same factor
00283         @author Felix Woelk **/
00284     int ScaleShiftBetween(double Min, double Max);
00285
00286
00287     /** @brief calculate the values needed by ScaleShiftBetween */
00288     int CalcScaleShift(double Min, double Max,
00289                double& Scale, double &Shift) const;
00290
00291     /// @brief sets alls pixels with values below Threshold to Value
00292     int BelowThresholdToValue(StorageType Threshold, StorageType Value);
00293
00294     /// @brief sets alls pixels with values above Threshold to Value
00295     int AboveThresholdToValue(StorageType Threshold, StorageType Value);
00296
00297     /** @brief sets all pixels >= Threshold to MaxPixelValue
00298         and all others to MinPixelValue
00299         only for one channel / grey images
00300         @author woelk 01 2003 */
00301     void Binarize(StorageType Threshold);
00302
00303     /** @brief Test for every pixel wether it is >= than the threshold. If so
00304         set to a MaxValue, otherwise to an MinValue.
00305
00306         @author Ingo Thomsen
00307         @date 03/28/2002
00308         @status tested **/
00309     int BinaryThreshold(StorageType Threshold,
00310             StorageType MinValue,
00311             StorageType MaxValue);
00312     //@}
00313     /////// end of thresholding //////////////////////////////////////////////
00314     /////////////////////////////////////////////////////////////////////////
00315     /**
00316         @name Operators
00317
00318         Operators -,+,*,/,-=,+=,*=,/= for scalar and image arguments <br>
00319         Operators do only work for argument of the same type <br>
00320         Division Operators do zero checks (if BIAS_DEBUG is defined)
00321         @{
00322     */
00323     /** copies ImageBase to an desired Image<>,
00324         be careful with this, because u can do
00325         something like: Image<char> = Image<float>,
00326         what usualluy not makes sense
00327         @author Friso Evers, Nov. 2002 */
00328     Image<StorageType>& operator=(const ImageBase& Source);
00329
00330
00331     /// Operator /= for scalar value
00332     Image<StorageType>& operator/= (const StorageType& argimage);
00333
00334
00335     /// Operator / for scalar value, returning a new image
00336     Image<StorageType> operator/  (const StorageType& argimage);
00337
00338
00339     /// Operator *= for scalar value
00340     Image<StorageType>& operator*= (const StorageType& argimage);
00341
00342
00343     /// Operator * for scalar value, returning a new image
00344     Image<StorageType> operator*  (const StorageType& argimage);
00345
00346
00347     /// Operator += for scalar value
00348     Image<StorageType>& operator+= (const StorageType& argimage);
00349
00350
00351     /// Operator + for scalar value, returning a new image
00352     Image<StorageType> operator+  (const StorageType& argimage);
00353
00354
00355     /// Operator -= for scalar value
00356     Image<StorageType>& operator-= (const StorageType& argimage);
00357
00358
00359     /// Operator - for scalar value, returning a new image
00360     Image<StorageType> operator-  (const StorageType& argimage);
00361
00362
00363     /// Operator /= for another image as argument
00364     Image<StorageType>& operator/= (const Image<StorageType>& argimage);
00365
00366
00367     /// Operator / for another image as argument, returning a new image
00368     Image<StorageType> operator/  (const Image<StorageType>& argimage);
00369
00370
00371     /// Operator *= for another image as argument
00372     Image<StorageType>& operator*= (const Image<StorageType>& argimage);
00373
00374
00375     /// Operator * for another image as argument, returning a new image
00376     Image<StorageType> operator*  (const Image<StorageType>& argimage);
00377
00378
00379     /// Operator += for another image as argument
00380     Image<StorageType>& operator+= (const Image<StorageType>& argimage);
00381
00382
00383     /// Operator + for another image as argument, returning a new image
00384     Image<StorageType> operator+  (const Image<StorageType>& argimage);
00385
00386
00387     /// Operator -= for another image as argument
00388     Image<StorageType>& operator-= (const Image<StorageType>& argimage);
00389
00390
00391     /** subtracts every from every pixel (in ROI if defined)
00392         the pixel value from argimage
00393         !!! negative results are clipped to zero !!!
00394         @author Ingo Thomsen
00395         @status tested (18/04/2002)
00396     */
00397     Image<StorageType> operator-  (const Image<StorageType>& argimage);
00398
00399
00400     Image<StorageType>& operator|  (const Image<StorageType>& argimage);
00401
00402     //@}
00403     /////////// end of Operators ////////////////////////////////////////////
00404
00405     /** @name Interpolating Functions
00406         @{
00407     */
00408     inline double LinearInterpolation(const unsigned int x,
00409                       const double y) const;
00410
00411     inline double LinearInterpolation(const double x,
00412                       const unsigned int y) const;
00413
00414     /** fast bilinear interpolation
00415         specialisation for unsigned char exists, 20% faster than function
00416         below
00417         @author woelk 01 2003 */
00418     inline StorageType
00419     FastBilinearInterpolationGrey(const double x, const double y) const;
00420
00421     /** Returns the bilinear interpolated pixel value (using channel offset)
00422         value of pixel defined by double coordinates, ignoring an existingROI
00423
00424         @author Ingo Thomsen
00425         @date 04.03.2002
00426         @status tested (only with gray images yet)      **/
00427     double BilinearInterpolation(const double x, const double y,
00428                  const unsigned short int channel=0) const;
00429
00430     /** no boundary checking !
00431         ignores ROI
00432         @author Felix Woelk */
00433     inline double
00434     BilinearInterpolationGrey(const double x, const double y) const;
00435
00436     /** no boundary checking !
00437         ignores ROI
00438         @author Felix Woelk */
00439     inline double
00440     BilinearInterpolationRGBPlanar(const double x, const double y,
00441                    unsigned int channel) const;
00442
00443     /** no boundary checking !
00444         ignores ROI
00445         @author Felix Woelk*/
00446     inline double
00447     BilinearInterpolationRGBInterleaved(const double x, const double y,
00448                     unsigned int channel) const;
00449
00450     /** interpolation with weights according to distances to x and y */
00451     inline double
00452     InterpolationGrey(const double x, const double y) const;
00453
00454     /** @brief sample the continuous (bilinear interpolation of (*this)) image
00455         using a grid with one pixel spacing at subpixel
00456         positions (x-hws, y-hws) , ... (x,y), ... (x-hws, y-hws)
00457         You get a window of size (2*hws_x+1)*(2*hws_y+1) which is exactly
00458         centered at x,y (a subpixel position) of the original image
00459
00460         @param Buffer must have size (2*hws_x+1)*(2*hws_y+1)
00461         @param hws_x half window size in x direction
00462         @param hws_y half window size in y direction
00463         @param x x-center of window
00464         @param y y-center of window
00465         @author koeser 01/2004 */
00466     inline void BilinearInterpolationShiftRegion(const double& x,
00467                          const double& y,
00468                          unsigned int hws_x,
00469                          unsigned int hws_y,
00470                          unsigned char* Buffer);
00471
00472
00473
00474     /** @brief bilinear interpolation pixel value with value check.
00475         If at least one of the input values is <=minVal,
00476         then the unknown value minVal is returned, too.
00477         @param minVal all values <= minVal are invalid/unknown.
00478         @author Jan Woetzel 12/2004 */
00479     inline double
00480     BilinearInterpolationGreyMinVal(const double x,
00481                     const double y,
00482                     const StorageType & minVal) const;
00483
00484     /** Returns the bicubic interpolated pixel value (using channel offset)
00485         value of pixel defined by double coordinates, ignoring an existing ROI
00486         Does not work for planar multi-channel images !
00487
00488         The subpixel value is obtained by computing a weighted average of
00489         the surrounding 4x4 pixel block. The weights are computed by
00490         independent x and y-dir cubic polynomials which guarantee
00491         constant first order derivatives at the grid positions
00492
00493         @attention 1.0<=x<Width-2 and 1.0<=y<Height-2 is required but not
00494         checked
00495         @author koeser 02/2005
00496     **/
00497     double BicubicInterpolation(const double& x, const double& y,
00498                 const unsigned short int channel=0) const;
00499
00500
00501
00502     // @}
00503
00504     /// Append an image with one channel of same StorageType
00505     /** Append means: RGB + A => RGBA */
00506     int AppendChannel(Image<StorageType> &img);
00507
00508     // @}
00509
00510     /** @name Misc Functions
00511         @{
00512     */
00513
00514     /// returns the maximal possible StorageType
00515     inline StorageType MaxSTValue();
00516
00517     /// returns the minimal possible StorageType
00518     inline StorageType MinSTValue();
00519
00520     /// writes pointer of IplImage_ to os (ascii)
00521     std::ostream& PrintPointer(std::ostream &os) const;
00522
00523     /// writes data of IplImage_ to os (ascii)
00524     std::ostream& PrintData(std::ostream &os) const;
00525
00526     /** @brief (*this) = | im1 - im2 |
00527         sets this as the absolute difference between two arg images
00528         @author Felix Woelk */
00529     void AbsDiff(const Image<StorageType>& im1,
00530          const Image<StorageType>& im2);
00531
00532     /** @return the reciprocal for each pixel: x' = 1/x
00533         computes for exactly one channel (in case of multi channel images)
00534         returns float/double image
00535         @author Jan Woetzel 01/2003 */
00536     Image<float> Reciprocal(const float factor=1.0,
00537                 const unsigned short int channel=0
00538                 );
00539
00540     // @}
00541
00542   };
00543
00544   // inline functions
00545 #include "ImageInline.hh"
00546
00547 } // namespace BIAS
00548
00549 #endif // __Image_hh__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageAttributes.cpp Source File

Base » Image

ImageAttributes.cpp

Go to the documentation of this file.
00001 #include "ImageAttributes.hh"
00002 #include <Base/Common/W32Compat.hh>
00003 #include <math.h>
00004 #include <Base/Debug/DebugSimple.hh>
00005 #include <Base/Debug/Error.hh>
00006 #include <string>
00007 #include <exception>
00008 #include <iostream>
00009 #include <iterator>
00010
00011
00012 //#ifdef BIAS_HAVE_IMAGEMAGICKLIB
00013 //#  include <Magick++.h>
00014 //using namespace Magick;
00015 //#endif
00016
00017 using namespace std;
00018 using namespace BIAS;
00019
00020 #define METER_PER_INCH  0.0254
00021
00022 /** -----------------------------
00023     @author Jan Woetzel 10/2004
00024     ----------------------------- */
00025
00026
00027 /** @brief compatibility class for ImageMagick/magick/attribute.c:
00028     @author jan Woetzel */
00029 class TagInfo {
00030 public:
00031   unsigned short tag;
00032   char *description;
00033 };
00034
00035 /** @brief compatibility class for ImageMagick/magick/attribute.c
00036     contains all known EXIF tags
00037     @author jan Woetzel */
00038 static TagInfo tag_table[] =   {
00039   {  0x100, (char *) "ImageWidth"},
00040   {  0x101, (char *) "ImageLength"},
00041   {  0x102, (char *) "BitsPerSample"},
00042   {  0x103, (char *) "Compression"},
00043   {  0x106, (char *) "PhotometricInterpretation"},
00044   {  0x10a, (char *) "FillOrder"},
00045   {  0x10d, (char *) "DocumentName"},
00046   {  0x10e, (char *) "ImageDescription"},
00047   {  0x10f, (char *) "Make"},
00048   {  0x110, (char *) "Model"},
00049   {  0x111, (char *) "StripOffsets"},
00050   {  0x112, (char *) "Orientation"},
00051   {  0x115, (char *) "SamplesPerPixel"},
00052   {  0x116, (char *) "RowsPerStrip"},
00053   {  0x117, (char *) "StripByteCounts"},
00054   {  0x11a, (char *) "XResolution"},
00055   {  0x11b, (char *) "YResolution"},
00056   {  0x11c, (char *) "PlanarConfiguration"},
00057   {  0x128, (char *) "ResolutionUnit"},
00058   {  0x12d, (char *) "TransferFunction"},
00059   {  0x131, (char *) "Software"},
00060   {  0x132, (char *) "DateTime"},
00061   {  0x13b, (char *) "Artist"},
00062   {  0x13e, (char *) "WhitePoint"},
00063   {  0x13f, (char *) "PrimaryChromaticities"},
00064   {  0x156, (char *) "TransferRange"},
00065   {  0x200, (char *) "JPEGProc"},
00066   {  0x201, (char *) "JPEGInterchangeFormat"},
00067   {  0x202, (char *) "JPEGInterchangeFormatLength"},
00068   {  0x211, (char *) "YCbCrCoefficients"},
00069   {  0x212, (char *) "YCbCrSubSampling"},
00070   {  0x213, (char *) "YCbCrPositioning"},
00071   {  0x214, (char *) "ReferenceBlackWhite"},
00072   {  0x1000, (char *) "RelatedImageFileFormat"},
00073   {  0x1001, (char *) "RelatedImageLength"},
00074   {  0x1002, (char *) "RelatedImageWidth"},
00075   {  0x828d, (char *) "CFARepeatPatternDim"},
00076   {  0x828e, (char *) "CFAPattern"},
00077   {  0x828f, (char *) "BatteryLevel"},
00078   {  0x8298, (char *) "Copyright"},
00079   {  0x829a, (char *) "ExposureTime"},
00080   {  0x829d, (char *) "FNumber"},
00081   {  0x83Bb, (char *) "IPTC/NAA"},
00082   {  0x8769, (char *) "ExifOffset"},
00083   {  0x8773, (char *) "InterColorProfile"},
00084   {  0x8822, (char *) "ExposureProgram"},
00085   {  0x8824, (char *) "SpectralSensitivity"},
00086   {  0x8825, (char *) "GPSInfo"},
00087   {  0x8827, (char *) "ISOSpeedRatings"},
00088   {  0x8828, (char *) "OECF"},
00089   {  0x8829, (char *) "Interlace"},
00090   {  0x882a, (char *) "TimeZoneOffset"},
00091   {  0x882b, (char *) "SelfTimerMode"},
00092   {  0x9000, (char *) "ExifVersion"},
00093   {  0x9003, (char *) "DateTimeOriginal"},
00094   {  0x9004, (char *) "DateTimeDigitized"},
00095   {  0x9101, (char *) "ComponentsConfiguration"},
00096   {  0x9102, (char *) "CompressedBitsPerPixel"},
00097   {  0x9201, (char *) "ShutterSpeedValue"},
00098   {  0x9202, (char *) "ApertureValue"},
00099   {  0x9203, (char *) "BrightnessValue"},
00100   {  0x9204, (char *) "ExposureBiasValue"},
00101   {  0x9205, (char *) "MaxApertureValue"},
00102   {  0x9206, (char *) "SubjectDistance"},
00103   {  0x9207, (char *) "MeteringMode"},
00104   {  0x9208, (char *) "LightSrc"},
00105   {  0x9209, (char *) "Flash"},
00106   {  0x920a, (char *) "FocalLength"},
00107   {  0x920b, (char *) "FlashEnergy"},
00108   {  0x920c, (char *) "SpatialFrequencyResponse"},
00109   {  0x920d, (char *) "Noise"},
00110   {  0x9211, (char *) "ImageNumber"},
00111   {  0x9212, (char *) "SecurityClassification"},
00112   {  0x9213, (char *) "ImageHistory"},
00113   {  0x9214, (char *) "SubjectLocation"},
00114   {  0x9215, (char *) "ExposureIndex"},
00115   {  0x9216, (char *) "TIFF/EPStandardID"},
00116   {  0x927c, (char *) "MakerNote"},
00117   {  0x9286, (char *) "UserComment"},
00118   {  0x9290, (char *) "SubSecTime"},
00119   {  0x9291, (char *) "SubSecTimeOriginal"},
00120   {  0x9292, (char *) "SubSecTimeDigitized"},
00121   {  0xA000, (char *) "FlashPixVersion"},
00122   {  0xA001, (char *) "ColorSpace"},
00123   {  0xA002, (char *) "ExifImageWidth"},
00124   {  0xA003, (char *) "ExifImageLength"},
00125   {  0xA005, (char *) "InteroperabilityOffset"},
00126   {  0xA20b, (char *) "FlashEnergy"},
00127   {  0xA20c, (char *) "SpatialFrequencyResponse"},
00128   {  0xA20e, (char *) "FocalPlaneXResolution"},
00129   {  0xA20f, (char *) "FocalPlaneYResolution"},
00130   {  0xA210, (char *) "FocalPlaneResolutionUnit"},
00131   {  0xA214, (char *) "SubjectLocation"},
00132   {  0xA215, (char *) "ExposureIndex"},
00133   {  0xA217, (char *) "SensingMethod"},
00134   {  0xA300, (char *) "FileSource"},
00135   {  0xA301, (char *) "SceneType"},
00136   {  0xA302, (char *) "CFAPattern"},
00137   {  0x0000, (char *) NULL}
00138 };
00139
00140 /** weblinks:
00141 http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/focalplaneresolutionunit.html
00142
00143 http://www.stefanheymann.de/homegallery/exif-felder.htm
00144
00145 http://www.exif.org/specifications.html
00146
00147 */
00148
00149 // JW
00150 void ImageAttributes::InitExifTags(){
00151   // get the number of tags from variable size array:
00152
00153 #ifndef WIN32
00154   // works on Linux with g++
00155   const unsigned int nTags=sizeof(tag_table) / sizeof( typeof( *tag_table ));
00156 #else
00157   /// (JW) no typeof in MS Visual Studio C++ 7.1 compiler
00158   const unsigned int nTags = 99; /// \todo loop until 0x0 end symbol
00159 #endif
00160
00161   COUT("tag_table contains "<<nTags<<" tags.");
00162   for (unsigned int i=0; i<nTags; i++){
00163     if ((tag_table[i].tag!=0x0) && (tag_table[i].description!=NULL)){
00164       // valid tag
00165       this->push_back(ExifTag(tag_table[i].tag,
00166                   tag_table[i].description) );
00167     };
00168   };
00169 }
00170
00171 // JW
00172 int ImageAttributes::Read(const std::string & filename){
00173   return ReadMagickPP(filename);
00174 }
00175
00176
00177 // JW
00178 int ImageAttributes::ReadMagickPP(const std::string & filename){
00179 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
00180   BIASERR("BIAS_HAVE_IMAGEMAGICKLIB not defined. Please recompile BIAS with USE_IMAGEMAGICK enabled to load "<<filename);
00181   return -2;
00182 #else
00183   try {
00184 # ifdef WIN32
00185     // initialize DLL loaded library (not required on Linux but once on Windows)
00186     Magick::InitializeMagick(NULL);
00187 # endif
00188     Magick::Image img;
00189     // get image header data without reading the raw image data:
00190     img.ping(filename);
00191     return ReadMagickPP(img); // OK so far
00192
00193   } catch ( Magick::Exception &error_ ) {
00194     BIASERR("Getting Image attributes from "<<filename<<" with Magick++ failed."<<endl
00195         <<"  Caught exception: "<<endl
00196         <<"  "<<error_.what()<<endl );
00197     return -1; // error
00198   };
00199 #endif
00200 }
00201
00202 // JW
00203 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00204 int ImageAttributes::ReadMagickPP(Magick::Image & img){
00205   try {
00206     ImageAttributes::iterator it;
00207     string name;
00208     string val;
00209     unsigned int index = 0;
00210     for (it=this->begin(); it!=this->end(); it++, index++){
00211       name  = "EXIF:";
00212       name += it->name;
00213       val=img.attribute(name);
00214       if (it->GoodValue( val )){
00215         it->value = val;
00216         mapValidTags_[it->name]=index;
00217         //} else {
00218         //COUT("skipped EXIF tag "<<it->name<<". invalid value= "<<it->value<<endl);
00219       };
00220     };
00221
00222     //} catch (...) {
00223   } catch ( Magick::Exception &error_ ) {
00224     BIASERR("Getting Image attributes from Magick::Image with Magick++ failed."<<endl
00225         <<"  Caught exception: "<<endl
00226         <<"  "<<error_.what()<<endl );
00227     return -1; // error
00228   };
00229   return BIAS_IMAGEATTRIBUTES_SUCCESS; // OK
00230 }
00231 #endif
00232
00233
00234 std::ostream& ImageAttributes::Print(std::ostream& os,
00235                      const bool printAll) const
00236 {
00237   os<<"ImageAttributes: size="<<this->size()<<endl;
00238   ImageAttributes::const_iterator it=this->begin();
00239   for (it=this->begin(); it!=(this->end()); it++){
00240     if (printAll || it->GoodValue(it->value) ) {
00241       it->Print(os);
00242       os<<endl;
00243       //} else {os<<"skipped "<<it->name<<endl;
00244     };
00245   };
00246   return os;
00247 }
00248
00249
00250 std::ostream& operator<<(std::ostream& os,
00251              const BIAS::ImageAttributes &attr)
00252 {
00253   return attr.Print(os);
00254 }
00255
00256
00257 bool ImageAttributes::GetString_(const string& key, string& value) {
00258     map<string, unsigned int>::iterator it;
00259     if ((it = mapValidTags_.find(key))==mapValidTags_.end()) {
00260     BIASDOUT(D_EXIF,"failed to find "<<key);
00261     return false;
00262     }
00263     value = (*this)[it->second].value;
00264     BIASDOUT(D_EXIF,"Found "<<key<<"="<<value);
00265     return true;
00266 }
00267
00268 bool ImageAttributes::GetRational_(const string& key, double& value) {
00269     string thevalue;
00270     if (!GetString_(key, thevalue)) return false;
00271     int slashpos = thevalue.find('/');
00272     string second, first = thevalue.substr(0, slashpos);
00273     if (slashpos>=0 && slashpos<(int)thevalue.size()-1)
00274     second = thevalue.substr(slashpos+1,thevalue.size()-1);
00275     double dfirst = atof(first.c_str());
00276     double dsecond = atof(second.c_str());
00277     value = dfirst/dsecond;
00278     return true;
00279 }
00280
00281 bool ImageAttributes::GetShort_(const string& key, int& value){
00282     string thevalue;
00283     if (!GetString_(key,thevalue)) return false;
00284     value = INT_MAX;
00285     value = atoi(thevalue.c_str());
00286     if (value==INT_MAX) return false;
00287     return true;
00288 }
00289
00290
00291 int ImageAttributes::GetFocalLengthMeter(double &fm) {
00292     if (!GetRational_("FocalLength",fm)) return -1;
00293     // milli meter to meter
00294     fm *= 0.001;
00295     BIASDOUT(D_EXIF, "focal length in meter is "<<fm);
00296     return 0;
00297 }
00298
00299
00300 int ImageAttributes::GetFocalLengthXPixel(double &fp) {
00301     int res = GetFocalLengthMeter(fp);
00302     if (res<0) return res;
00303     double pixelsize;
00304     res = GetPixelSizeXMeter(pixelsize);
00305     if (res<0) return res;
00306     fp /= pixelsize;
00307     BIASDOUT(D_EXIF, "FocalLengthXPixel is "<<fp);
00308     return res;
00309 }
00310
00311 int ImageAttributes::GetFocalLengthYPixel(double &fp) {
00312     int res = GetFocalLengthMeter(fp);
00313     if (res<0) return res;
00314     double pixelsize;
00315     res = GetPixelSizeYMeter(pixelsize);
00316     if (res<0) return res;
00317     fp /= pixelsize;
00318     BIASDOUT(D_EXIF, "FocalLengthYPixel is "<<fp);
00319     return res;
00320 }
00321
00322 int ImageAttributes::GetPixelSizeXMeter(double &p) {
00323     if (!GetRational_("FocalPlaneXResolution", p)) return -1;
00324     BIASDOUT(D_EXIF, "FocalPlaneXResolution is "<<p);
00325     int unit = 0;
00326     if (!GetShort_("FocalPlaneResolutionUnit", unit)) return -1;
00327     switch (unit) {
00328     case 2: // Inch.
00329         p = METER_PER_INCH / p;
00330         break;
00331     case 3: // Centimeter.
00332         p = 0.01 / p;
00333         break;
00334     case 1: // No absolute unit of measurement.
00335     default:// unknown unit
00336         return 1;
00337         break;
00338     }
00339
00340  return 0;
00341 }
00342 int ImageAttributes::GetPixelSizeYMeter(double &p) {
00343     if (!GetRational_("FocalPlaneYResolution", p)) return -1;
00344     BIASDOUT(D_EXIF, "FocalPlaneYResolution is "<<p);
00345     int unit = 0;
00346     if (!GetShort_("FocalPlaneResolutionUnit", unit)) return -1;
00347     switch (unit) {
00348     case 1: // No absolute unit of measurement.
00349         return 1;
00350         break;
00351     case 2: // Inch.
00352         p = METER_PER_INCH / p;
00353         break;
00354     case 3: // Centimeter.
00355         p = 0.01 / p;
00356         break;
00357     default: // unknown unit
00358         return -1;
00359     }
00360
00361  return 0;
00362 }
00363
00364
00365 int ImageAttributes::GetFieldOfViewDegree(double &x, double& y) {
00366     int width, height;
00367     double fp;
00368     if (GetImageDimensions(width, height)!=0) return -1;
00369     if (GetFocalLengthXPixel(fp)<0) return -2;
00370     x = 180.0/M_PI *2.0*atan(double(width)/(2.0*fp));
00371     if (GetFocalLengthYPixel(fp)<0) return -3;
00372     y = 180.0/M_PI *2.0*atan(double(height)/(2.0*fp));
00373
00374     return 0;
00375 }
00376
00377
00378 int ImageAttributes::GetImageDimensions(int& width, int& height) {
00379     if (!GetShort_("ImageWidth", width)) {
00380     if (!GetShort_("ExifImageWidth", width)) {
00381         return -1;
00382     }
00383     if (!GetShort_("ExifImageLength", height)) {
00384         return -1;
00385     }
00386     return 0;
00387     }
00388     if (!GetShort_("ImageLength", height)) return -1;
00389     return 0;
00390 }
00391
00392
00393 int ImageAttributes::GetPrincipalPoint(double& x, double& y) {
00394     int width, height;
00395     if (GetImageDimensions(width, height)!=0) return -1;
00396     x = double(width-1)/2.0;
00397     y = double(height-1)/2.0;
00398     return 1;
00399 }
00400
00401 int ImageAttributes::GetHardwareName(string& Make, string& Model){
00402     Make = "";
00403     Model = "";
00404     int res = 0;
00405     if (!GetString_("Make",Make)) res -= 1;
00406     if (!GetString_("Model",Model)) res -= 2;
00407     return res;
00408 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageAttributes.hh Source File

Base » Image

ImageAttributes.hh

Go to the documentation of this file.
00001 #ifndef _IMAGEATTRIBUTES_H_INCLUDED_
00002 #define _IMAGEATTRIBUTES_H_INCLUDED_
00003 #include <Base/Common/BIASpragmaStart.hh>
00004
00005 #include "bias_config.h"
00006 #include <Base/Debug/Debug.hh>
00007 #include "ExifTag.hh"
00008 #include <iostream>
00009 #include <vector>
00010 #include <string>
00011 #include <map>
00012
00013
00014
00015 /// return code for success:
00016 #define BIAS_IMAGEATTRIBUTES_SUCCESS 0
00017
00018 #define D_EXIF 1
00019
00020 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00021 #  include <Magick++.h>
00022 #endif
00023 /// \todo Avoid inclusion of Magick++ header and use forward declaration here to be able to output runtime error on usage (JW).
00024
00025
00026 // Begin namespace BIAS
00027 namespace BIAS {
00028
00029     /** @class ImageAttributes
00030     @todo Add Image Attributes write functionality to write meta data directly to images EXIF Tags, comments etc.
00031     @brief contains all atribute info and values of e.g. a file.
00032     @author Jan Woetzel 10/2004 */
00033     class BIASImageBase_EXPORT ImageAttributes
00034         : public std::vector< ExifTag >, public BIAS::Debug
00035     {
00036     public:
00037         ~ImageAttributes(){};
00038         ImageAttributes(){};
00039
00040         /** @brief main entry routine to read all EXIF tags from the header of image file.
00041         @return  BIAS_IMAGEATTRIBUTES_SUCCESS if OK.
00042         @param filename image to ping and read header from.
00043         @author Jan Woetzel */
00044         int Read(const std::string & filename);
00045
00046         /** @return  BIAS_IMAGEATTRIBUTES_SUCCESS if reading was OK, negative number in case of error.
00047         @param filename image file to read attributes form header.
00048         @author Jan Woetzel */
00049         int ReadMagickPP(const std::string & filename);
00050
00051 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00052         /** @brief direct interface to Magick::IMage to be able to read the XIF tags of an already opened image.
00053         @return  BIAS_IMAGEATTRIBUTES_SUCCESS;BIAS_EXIFTAGTABLE_SUCCESS
00054         @param filename image to ping and read header from.
00055         @author Jan Woetzel */
00056         int ReadMagickPP(Magick::Image & img);
00057 #endif
00058
00059
00060         /** initialize me vector with all known EXIF tags */
00061         void InitExifTags();
00062
00063         /** print teh content of this to os
00064         @param printAll true prints all tags, false only those whose value is not empty.
00065         */
00066         std::ostream& Print(std::ostream& os=std::cout,
00067             const bool printAll=false) const;
00068
00069         /** @brief compute focallength in meters
00070         @return 0:ok, <0:information missing, >0:missing information guessed
00071         @author koeser 07/2005 */
00072         int GetFocalLengthMeter(double &fm);
00073
00074         /** @brief compute focallength in pixels
00075         @return 0:ok, <0:information missing, >0:missing information guessed
00076         @author koeser 07/2005 */
00077         int GetFocalLengthXPixel(double &fp);
00078
00079         /** @brief compute focallength in pixels
00080         @return 0:ok, <0:information missing, >0:missing information guessed
00081         @author koeser 07/2005 */
00082         int GetFocalLengthYPixel(double &fp);
00083
00084         /** @brief compute pixel size in meter
00085         @return 0:ok, <0:information missing, >0:missing information guessed
00086         @author koeser 07/2005 */
00087         int GetPixelSizeXMeter(double &p);
00088
00089         /** @brief compute pixel size in meter
00090         @return 0:ok, <0:information missing, >0:missing information guessed
00091         @author koeser 07/2005 */
00092         int GetPixelSizeYMeter(double &p);
00093
00094         /** @brief compute field of view in degree
00095         @return 0:ok, <0:information missing, >0:missing information guessed
00096         @author koeser 07/2005 */
00097         int GetFieldOfViewDegree(double &x, double& y);
00098
00099         /** @brief get width and height of image
00100         @return 0:ok, <0:information missing, >0:missing information guessed
00101         @author koeser 07/2005 */
00102         int GetImageDimensions(int& width, int& height);
00103
00104         /** @brief look up principal point
00105         @return 0:ok, <0:information missing, >0:missing information guessed
00106         @author koeser 07/2005 */
00107         int GetPrincipalPoint(double& x, double& y);
00108
00109         /** @brief look up camera make and model
00110         @return 0:ok, <0:information missing, >0:missing information guessed
00111         @author koeser 07/2005 */
00112         int GetHardwareName(std::string& Make, std::string& Model);
00113
00114     protected:
00115         bool GetString_(const std::string& key, std::string& value);
00116         bool GetRational_(const std::string& key, double& value);
00117         bool GetShort_(const std::string& key, int& value);
00118
00119     private: // avoid DLL export by private
00120         std::map<std::string, unsigned int> mapValidTags_;
00121
00122     }; // end of class
00123 } // end namespace
00124
00125
00126 // ------------------
00127
00128 /** @brief output operator for ExifTable
00129 @author Jan Woetzel */
00130 BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os,
00131                          const BIAS::ImageAttributes &attr);
00132
00133
00134 #include <Base/Common/BIASpragmaEnd.hh>
00135
00136 #endif
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBase.cpp Source File

Base » Image

ImageBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "ImageBase.hh"
00027
00028 #ifdef WIN32
00029 #  define _USE_MATH_DEFINES
00030 #endif //WIN32
00031
00032 #include <math.h>
00033 #include <string>
00034 #include <sstream>
00035
00036 using std::string;
00037 using std::stringstream;
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042
00043 ImageBase::~ImageBase()
00044 {
00045   if (ImageDataArray_ != NULL) {
00046     delete[] (char**)ImageDataArray_;
00047     ImageDataArray_ = NULL;
00048   }
00049   if (ImageData_!=NULL){
00050     delete[] (char*)ImageData_;
00051     ImageData_ = NULL;
00052   }
00053 }
00054
00055
00056
00057 ImageBase::ImageBase()
00058 : Debug(),
00059 Roi_()
00060 {
00061 #ifdef BIAS_DEBUG
00062   BIASGDOUT(D_IMAGE_TRACE, "called ImageBase::ImageBase()");
00063 #endif
00064   ImageData_ = NULL;
00065   ImageDataArray_ = NULL;
00066   ChannelCount_ = 0;
00067   Width_ = 0;
00068   Height_ =0;
00069   Depth_ = 0;
00070   BitDepth_ = 0;
00071   WidthStep_ = 0;
00072   ColorModel_ = CM_invalid;
00073   StorageType_=ST_invalid;
00074   InterleavedDataOrder_ = true;
00075   _UID=BIAS::UUID();
00076   _MetaData=MetaData();
00077 }
00078
00079 ImageBase::ImageBase(const ImageBase& im)
00080 {
00081 #ifdef BIAS_DEBUG
00082   BIASGDOUT(D_IMAGE_TRACE, "called ImageBase::ImageBase(const ImageBase& im)");
00083 #endif
00084   ImageData_ = NULL;
00085   ImageDataArray_ = NULL;
00086   Width_ = 0;
00087   Height_ = 0;
00088   ChannelCount_ = 0;
00089
00090   (*this) = im;
00091 }
00092
00093
00094 ImageBase::ImageBase(unsigned int width, unsigned int height,
00095                      unsigned int channels, enum EStorageType storageType,
00096                      bool interleaved)
00097 {
00098 #ifdef BIAS_DEBUG
00099   BIASGDOUT(D_IMAGE_TRACE, "called ImageBase::ImageBase(width, height,"
00100     <<" channels, storageType, interleaved ");
00101 #endif
00102
00103   ImageData_      = NULL;
00104   ImageDataArray_ = NULL;
00105
00106   ColorModel_ = CM_invalid;
00107   InterleavedDataOrder_ = interleaved;
00108
00109   Init(width,height,channels,storageType);
00110
00111   Roi_.Resize(width, height);
00112   Roi_.UnsetROI();
00113 }
00114
00115
00116
00117 void ImageBase::Init(unsigned int Width, unsigned int Height,
00118                      unsigned int channels, enum EStorageType storageType,
00119                      bool interleaved)
00120 {
00121   bool ok=true; // status
00122
00123   if ((ImageData_!=NULL) || (ImageDataArray_ !=NULL)){
00124     BIASERR("Image<StorageType>::Init should only be called once"<<
00125       "\nuse Release if you want to reinit");
00126   }
00127   //BIASASSERT(ImageData_==NULL);
00128   //BIASASSERT(ImageDataArray_==NULL);
00129
00130 #ifdef DISABLE_MODULO_4_SIZE
00131   if (((sizeof(StorageType)*Width) % 4) != 0){
00132     BIASERR("Because IplImage always uses aligned image data\n"
00133       << "  Image only supports images with \n"
00134       << "  (width * sizeof(StorageType)) modulo 4 = 0.\n"
00135       << "  Please choose a width which is divisible by four\n"
00136       << "  if multiplied with sizeof(StorageType) or use either\n"
00137       << "  the CopyIn function (internal only) or\n"
00138       << "  the ImportImage function.\n");
00139     return; // error
00140   };
00141
00142 #  if USE_OPENCV == true
00143   BIASERR("you cannot use -DDISABLE_MODULO_4_SIZE and -DUSE_OPENCV together");
00144 #  endif // USE_OPENCV == true
00145 #endif // DISABLE_MODULO_4_SIZE
00146
00147   Width_ = Width;
00148   Height_ = Height;
00149   ChannelCount_ = channels;
00150   StorageType_ = storageType;
00151   Roi_.Resize(Width, Height);
00152   Roi_.UnsetROI();
00153
00154   switch (storageType) {
00155   case ST_unsignedchar:
00156     Depth_=sizeof(unsigned char);
00157     BitDepth_=8*sizeof(unsigned char);
00158     break;
00159   case  ST_char:
00160     Depth_=sizeof(char);
00161     BitDepth_=8*sizeof(char);
00162     break;
00163   case ST_unsignedshortint:
00164     Depth_=sizeof(unsigned short int);
00165     BitDepth_=8*sizeof(unsigned short int);
00166     break;
00167   case ST_shortint:
00168     Depth_=sizeof(short int);
00169     BitDepth_=8*sizeof(short int);
00170     break;
00171   case ST_unsignedint:
00172     Depth_=sizeof(unsigned int);
00173     BitDepth_=8*sizeof(unsigned int);
00174     break;
00175   case ST_int:
00176     Depth_=sizeof(int);
00177     BitDepth_=8*sizeof(int);
00178     break;
00179   case ST_float:
00180     Depth_=sizeof(float);
00181     BitDepth_=8*sizeof(float);
00182     break;
00183   case ST_double:
00184     Depth_=sizeof(double);
00185     BitDepth_=8*sizeof(double);
00186     break;
00187   default:
00188     // this is no error, e.g. in STL vector operator= call.
00189     BIASERR("Init: invalid storage type '"<<storageType<<"'");
00190     ok=false;
00191     break;
00192   };
00193
00194   InterleavedDataOrder_ = interleaved;
00195   delete[] (char**)ImageData_;
00196   ImageData_ = (void*) new char[Width * Height * channels * Depth_];
00197
00198   //cerr << "image data last: ("<<Width<<"x"<<Height<<") "
00199   //     <<(void *)(&((char *)(ImageData_))[Width * Height * channels * Depth_-1])<<endl;
00200   switch (channels){
00201   case 3:
00202     SetColorModel(CM_RGB);
00203     break;
00204   case 2:
00205     SetColorModel(CM_YUYV422);
00206     break;
00207   case 1:
00208     SetColorModel(CM_Grey);
00209     break;
00210   case 4:
00211     SetColorModel(CM_RGBA);
00212     break;
00213   default:
00214     SetColorModel(CM_invalid);
00215     break;
00216   };
00217
00218   if (InterleavedDataOrder_)
00219     WidthStep_ = Width_ * Depth_ * ChannelCount_;
00220   else
00221     WidthStep_ = Width_ * Depth_;
00222
00223   // ST_invalid could be acorrect initialization (jw)
00224   //BIASASSERT( ok==true ); // all cases were ok
00225
00226   UpdateImageDataArrayFromImageData_();
00227 }
00228
00229
00230 int ImageBase::UpdateImageDataArrayFromImageData_()
00231 {
00232   // catch the IsEmpty NULL data case: JW
00233   if (IsEmpty() || GetPixelCount()==0)
00234   {
00235     if (ImageDataArray_ != NULL) {
00236       delete[] ImageDataArray_;
00237       ImageDataArray_ = NULL;
00238     }
00239     // nothing to point to because no data pixels available
00240     return 0;
00241   }
00242
00243   // we have ImageData
00244   BIASASSERT( !IsEmpty() );
00245   BIASASSERT( GetPixelCount()>0 );
00246   BIASASSERT( GetWidth()>0 );
00247   BIASASSERT( GetHeight()>0 );
00248   BIASASSERT( GetChannelCount()>0 );
00249
00250   const unsigned height=(IsPlanar())?
00251     (GetHeight()*GetChannelCount()) : (GetHeight());
00252   if (ImageDataArray_ != NULL) {
00253     delete[] ImageDataArray_;
00254     ImageDataArray_=NULL;
00255   }
00256   ImageDataArray_ = (void**) new char*[height];
00257   ImageDataArray_[0] = GetImageData();
00258 #ifdef BIAS_DEBUG
00259   unsigned int tmpstep;
00260   if (InterleavedDataOrder_)
00261     tmpstep = Width_ * Depth_ * ChannelCount_;
00262   else
00263     tmpstep = Width_ * Depth_;
00264   if ( tmpstep!=WidthStep_) {
00265     BIASERR("Congratulations! You found a major bug in BIAS."
00266       <<" Inconsistency in image dimension data.");
00267     BIASABORT;
00268   }
00269 #endif
00270   for (register unsigned int i=1; i < height; i++) {
00271     ImageDataArray_[i] = (void*)((char*)(ImageDataArray_[i-1]) +
00272       WidthStep_);
00273   };
00274   return 0;
00275 }
00276
00277
00278 void ImageBase::Release() {
00279 #ifdef BIAS_DEBUG
00280   if (IsEmpty()) {
00281     BIASERR("ImageBase::Release called with empty image !");
00282   }
00283 #endif
00284   // check if we really need to delete the mem
00285   if (ImageDataArray_!=NULL) {
00286     delete[] (char**)ImageDataArray_;
00287     ImageDataArray_ = NULL;
00288   }
00289   if (ImageData_!=NULL) {
00290     delete[] (char*)ImageData_;
00291     ImageData_=NULL;
00292   }
00293   ChannelCount_ = 0;
00294   Width_ = Height_ = Depth_ = BitDepth_ = 0;
00295   WidthStep_  = 0;
00296   ColorModel_ = CM_invalid;
00297   StorageType_= ST_invalid;
00298
00299   Roi_.Release();
00300
00301   _MetaData.clear();
00302 }
00303
00304 int ImageBase::StealImage(ImageBase &source) {
00305   if (source.IsEmpty()) {
00306     BIASERR("tried to steal empty image");
00307     return -1;
00308   }
00309   if (!IsEmpty())
00310     Release();
00311   ImageData_ = source.GetImageData();
00312   ImageDataArray_ = source.GetImageDataArray();
00313   ChannelCount_ = source.GetChannelCount();
00314   ColorModel_ = source.GetColorModel();
00315   StorageType_ = source.GetStorageType();
00316   InterleavedDataOrder_=!source.IsPlanar();
00317
00318   Width_ = source.GetWidth();
00319   Height_ = source.GetHeight();
00320   Depth_ = source.GetDepth();
00321   BitDepth_ = source.GetBitDepth();
00322   WidthStep_ = source.GetWidthStep();
00323
00324   Roi_ = *source.GetROI();
00325
00326   source.ImageData_=NULL;
00327   source.ImageDataArray_=NULL;
00328   // copy(_MetaData.begin(), _MetaData.end(), source._MetaData.begin());
00329   _MetaData.resize(source._MetaData.size());
00330   copy(source._MetaData.begin(), source._MetaData.end(), _MetaData.begin());
00331
00332   source._MetaData.clear();
00333
00334   return 0;
00335 }
00336
00337 int ImageBase::GetChannel(ImageBase &source, unsigned int channel)
00338 {
00339   if (IsEmpty())
00340     Init(source.GetWidth(), source.GetHeight(), 1,source.GetStorageType());
00341
00342 #ifdef BIAS_DEBUG
00343   if ( (source.GetHeight() != GetHeight()) ||
00344     ( (source.GetWidth() != GetWidth()) &&
00345     (source.GetWidth() != GetWidth()/2) ) )
00346     BIASERR("ImageConvert<StorageType>::GetChannel() invalid size of image");
00347   if ( GetChannelCount() != 1 )
00348     BIASERR("ImageConvert<StorageType>::GetChannel() should be called with one"
00349     <<" channel image");
00350   if ( ! source.IsPlanar() )
00351     BIASERR("ImageConvert<StorageType>::GetChannel() should be called from "<<
00352     "planar image");
00353   if ( source.GetChannelCount() == 1 )
00354     BIASERR("ImageConvert<StorageType>::GetChannel() only makes sense with"
00355     <<" color images");
00356 #endif
00357
00358   if (source.GetColorModel()==CM_YUYV422){
00359     switch (channel){
00360     case 0:
00361       memcpy(GetImageData(), source.GetImageData(),
00362         source.GetPixelCount() * source.GetDepth());
00363       break;
00364     case 1:
00365       memcpy(GetImageData(), (char*)(source.GetImageData()) +
00366         source.GetPixelCount()*source.GetDepth(),
00367         source.GetPixelCount() * source.GetDepth() / 2);
00368       break;
00369     case 2:
00370       memcpy(GetImageData(),
00371         (char*)(source.GetImageData()) + source.GetDepth()*
00372         (source.GetPixelCount() + source.GetPixelCount()/2),
00373         source.GetPixelCount() * source.GetDepth() / 2);
00374       break;
00375     default:
00376       BIASERR("ImageConvert<StorageType>::GetChannel() invalid Channel");
00377       return -1;
00378       break;
00379     }
00380   } else
00381     if ( (source.GetColorModel()==CM_RGB) ||
00382       (source.GetColorModel()==CM_BGR) ||
00383       (source.GetColorModel()==CM_HSV) ) {
00384         if (source.IsPlanar()){
00385           switch (channel){
00386         case 0:
00387           memcpy(GetImageData(), source.GetImageData(),
00388             source.GetPixelCount() * source.GetDepth());
00389           break;
00390         case 1:
00391           memcpy(GetImageData(),
00392             (char*)(source.GetImageData()) +
00393             source.GetPixelCount()*source.GetDepth(),
00394             source.GetPixelCount() * source.GetDepth());
00395           break;
00396         case 2:
00397           memcpy(GetImageData(),
00398             (char*)(source.GetImageData()) + 2 * source.GetPixelCount()*
00399             source.GetDepth(),
00400             source.GetPixelCount() * source.GetDepth());
00401           break;
00402         default:
00403           BIASERR("ImageConvert<StorageType>::GetChannel() invalid Channel");
00404           return -1;
00405           break;
00406           }
00407         } else { // interleaved && (CM_RGB || CM_BGR || CM_HSV)
00408 #ifdef BIAS_DEBUG
00409           if ((channel<0) || (channel>2)){
00410             BIASERR("ImageConvert<StorageType>::GetChannel() invalid Channel");
00411             return -1;
00412           }
00413 #endif
00414           char *src=(char *)source.GetImageData();
00415           char *dst=(char *)GetImageData();
00416           char *end=dst+GetPixelCount()*GetDepth();
00417           register int depth=GetDepth();
00418           register int depth2=depth<<1;
00419           switch (channel){
00420       case 0:
00421         while (dst<end){
00422           for (int i=0; i<depth; i++) *dst++=*src++;
00423           src+=depth2;
00424         }
00425         break;
00426       case 1:
00427         while (dst<end){
00428           src+=depth;
00429           for (int i=0; i<depth; i++) *dst++=*src++;
00430           src+=depth;
00431         }
00432         break;
00433       case 2:
00434         while (dst<end){
00435           src+=depth2;
00436           for (int i=0; i<depth; i++) *dst++=*src++;
00437         }
00438         break;
00439       default: break;
00440           }
00441         }
00442       } else {
00443         BIASERR("ImageConvert<StorageType>::GetChannel() not yet implemented for"
00444           <<" this color model "<<source.GetColorModel());
00445         return -1;
00446       }
00447       return 0;
00448 }
00449
00450
00451 int ImageBase::GetCopyOfROI2(ImageBase &copy) const
00452 {
00453 #ifdef BIAS_DEBUG
00454   if (IsPlanar() && GetChannelCount()>1) {
00455     BIASERR("only implemented for interleaved images...");
00456     BIASABORT;
00457   }
00458 #endif
00459   char **dst, **src;
00460   register int y;
00461   int ROIUpperLeftX, ROIUpperLeftY, ROILowerRightX, ROILowerRightY;
00462   GetROI()->GetCorners(ROIUpperLeftX, ROIUpperLeftY,
00463     ROILowerRightX, ROILowerRightY);
00464   if (!copy.IsEmpty()) copy.Release();
00465   copy.Init(ROILowerRightX - ROIUpperLeftX + 1,
00466     ROILowerRightY - ROIUpperLeftY + 1, GetChannelCount(),
00467     GetStorageType());
00468   copy.SetColorModel(GetColorModel());
00469
00470   // following line must be changed if methods is extendend
00471   src = (char**)GetImageDataArray();
00472   dst = (char**)copy.GetImageDataArray();
00473
00474   int length = (ROILowerRightX-ROIUpperLeftX + 1)
00475     * GetChannelCount() * GetDepth();
00476   for (y = ROIUpperLeftY; y <= ROILowerRightY; y++){
00477     memcpy(&(dst[y-ROIUpperLeftY][0]),
00478       &(src[y][ROIUpperLeftX*GetChannelCount()*GetDepth()]), length);
00479   }
00480   return 0;
00481
00482 }
00483
00484 int ImageBase::GetCopyOfROI(ImageBase &copy) const
00485 {
00486 #ifdef BIAS_DEBUG
00487   if (IsPlanar() && GetChannelCount()>1) {
00488     BIASERR("only implemented for interleaved images...");
00489     BIASABORT;
00490   }
00491 #endif
00492   char **dst, **src;
00493   register int y;
00494   int ROIUpperLeftX, ROIUpperLeftY, ROILowerRightX, ROILowerRightY;
00495   GetROI()->GetCorners(ROIUpperLeftX, ROIUpperLeftY,
00496     ROILowerRightX, ROILowerRightY);
00497
00498   if (!copy.IsEmpty()) copy.Release();
00499   copy.Init(ROILowerRightX - ROIUpperLeftX,
00500     ROILowerRightY - ROIUpperLeftY, GetChannelCount(),
00501     GetStorageType());
00502   copy.SetColorModel(GetColorModel());
00503
00504   // following line must be changed if methods is extendend
00505   src = (char**)GetImageDataArray();
00506   dst = (char**)copy.GetImageDataArray();
00507
00508   const int length =
00509     (ROILowerRightX-ROIUpperLeftX) * GetChannelCount() * GetDepth();
00510
00511   for (y = ROIUpperLeftY; y < ROILowerRightY; y++){
00512     memcpy(&(dst[y-ROIUpperLeftY][0]),
00513       &(src[y][ROIUpperLeftX*GetChannelCount()*GetDepth()]), length);
00514   }
00515   return 0;
00516 }
00517
00518
00519 int ImageBase::Paste2ROI(const ImageBase& Image)
00520 {
00521   int ROIUpperLeftX, ROIUpperLeftY, ROILowerRightX, ROILowerRightY;
00522   GetROI()->GetCorners(ROIUpperLeftX, ROIUpperLeftY,
00523     ROILowerRightX, ROILowerRightY);
00524
00525   if ( ((int)Image.GetWidth() != (ROILowerRightX - ROIUpperLeftX)) ||
00526     ((int)Image.GetHeight() != (ROILowerRightY - ROIUpperLeftY)) ){
00527       BIASERR("ImageBase:Paste2ROI():  ROI size in destination is not equal "<<
00528         "to image size in source, aborting! ROI:WxH  "
00529         <<(ROILowerRightX - ROIUpperLeftX)<<"x"
00530         <<(ROILowerRightY - ROIUpperLeftY)<<"  Im:WxH "
00531         <<Image.GetWidth()<<"x"<<Image.GetHeight());
00532       BIASABORT;
00533       return(-1);
00534     }
00535     if (Image.GetColorModel() != GetColorModel()){
00536       BIASERR("ImageBase::Paste2ROI():  ColorModels do not match, aborting!");
00537       BIASABORT;
00538       return(-1);
00539     }
00540
00541     char **dst, **src;
00542     register int y;
00543
00544     dst = (char**)GetImageDataArray();
00545     src = (char**)Image.GetImageDataArray();
00546     int length= (ROILowerRightX-ROIUpperLeftX)*GetChannelCount()*
00547       GetDepth();
00548     for (y = ROIUpperLeftY; y < ROILowerRightY; y++){
00549       memcpy(&(dst[y][ROIUpperLeftX*GetChannelCount()*GetDepth()]),
00550         &(src[y-ROIUpperLeftY][0]),   length);
00551     }
00552     return 0;
00553 }
00554
00555
00556 int ImageBase::Cut2ROI()
00557 {
00558   int ROIUpperLeftX, ROIUpperLeftY, ROILowerRightX, ROILowerRightY;
00559   GetROI()->GetCorners(ROIUpperLeftX, ROIUpperLeftY,
00560     ROILowerRightX, ROILowerRightY);
00561
00562   const int bytesInRow= (ROILowerRightX-ROIUpperLeftX)*
00563     GetChannelCount() * GetDepth();
00564   char *dst = new char[(ROILowerRightY - ROIUpperLeftY)*bytesInRow];
00565   char **src = (char**)GetImageDataArray();
00566
00567   register int y;
00568   int start=ROIUpperLeftX*GetChannelCount()*GetDepth();
00569
00570   for (y = ROIUpperLeftY; y < ROILowerRightY; y++){
00571     memcpy(dst+(y-ROIUpperLeftY)*bytesInRow, &(src[y][start]),
00572       bytesInRow);
00573   }
00574
00575   Width_ =  ROILowerRightX - ROIUpperLeftX;
00576   Height_ = ROILowerRightY - ROIUpperLeftY;
00577   WidthStep_=Width_*ChannelCount_*Depth_;
00578   GetROI()->Resize(GetWidth(),GetHeight());
00579   UnsetROI();
00580   ReleaseImageDataPointer();
00581   RedirectImageDataPointer((void*)dst);
00582   return 0;
00583 }
00584
00585 void ImageBase::SetOutsideROIZero()
00586 {
00587   unsigned tlx, tly, brx, bry;
00588   GetROI()->GetCorners(tlx, tly, brx, bry);
00589
00590   if (tlx>0 || tly>0 || brx<GetWidth() || bry<GetWidth()){
00591     void **ida=GetImageDataArray();
00592     // above ROI
00593     memset(ida[0], 0, tly*GetWidthStep()+tlx*GetChannelCount()*GetDepth());
00594
00595     // from right ROI border to left ROI border
00596     const int size=(GetWidth()-(brx-tlx))*GetChannelCount()*GetDepth();
00597     const int x=brx*GetChannelCount()*GetDepth();
00598     for (unsigned y=tly; y<bry-1; y++){
00599       memset((void*)&(((char*)(ida[y]))[x]), 0, size);
00600     }
00601
00602     // below ROI
00603     memset((void*)&(((char*)(ida[bry-1]))[brx-1]), 0,
00604       (GetHeight()-bry)*GetWidthStep()+GetWidth()-brx);
00605   }
00606 }
00607
00608 //////////////////////////////////////////////////////////////////////////////
00609 //
00610 // Assignment Operator
00611 //
00612 //////////////////////////////////////////////////////////////////////////////
00613 ImageBase& ImageBase::operator=(const ImageBase& Source)
00614 {
00615   /// always copy the members that do not depend on image data
00616   /// to allow feeding Image* into ImageBase*. JW 01/2005
00617 #ifdef BIAS_DEBUG
00618   _liDebugLevel = Source.GetDebugLevel();
00619   BIASGDOUT(D_IMAGE_TRACE,
00620     "called ImageBase::operator=(const ImageBase& Source)"
00621     <<" source->GetStorageType = "<<Source.GetStorageType()
00622     <<" this->GetStorageType   = "<<GetStorageType()
00623     <<" source->GetColorModel  = "<<Source.GetColorModel()
00624     <<" this->GetColorModel    = "<<GetColorModel()
00625     );
00626 #endif
00627
00628   bool skipAlloc=false;
00629   // determine if we can keep the data area or need to realllcoate JW:
00630   if (! (this->IsEmpty())
00631     &&
00632     (Source.IsEmpty()))
00633   {
00634     // src is empty, so should be this.
00635     Release();
00636     // not done because the members need to be set.
00637     //return *this;
00638     skipAlloc=true;
00639   };
00640
00641   // skip allocation if there is no data in source image, required for STL vector allocation
00642   if (Source.IsEmpty()) {
00643      skipAlloc=true;
00644   }
00645
00646
00647   if ((!this->IsEmpty())
00648     &&
00649     (!SamePixelAndChannelCount(Source)  || (Source.GetStorageType()!=GetStorageType())))
00650   {
00651     // sizes or type don't match, realloc
00652     Release();
00653   };
00654
00655   if (this->IsEmpty() && !skipAlloc)
00656   {
00657     Init(Source.GetWidth(), Source.GetHeight(), Source.GetChannelCount(),
00658       Source.GetStorageType());
00659   }
00660
00661
00662   if (!Source.IsEmpty())
00663   {
00664     // copy image data:
00665     memcpy(
00666       this->GetImageData(), // dest
00667       Source.GetImageData(), //src
00668       Source.GetPixelCount() * Source.GetDepth() * Source.GetChannelCount()
00669       );
00670   }
00671
00672   //  update pointers to begin of line for new allocated image data area. NULLS if IsEmpty JW
00673   this->UpdateImageDataArrayFromImageData_();
00674
00675   // copy remaining member values:
00676   StorageType_  = Source.GetStorageType();
00677   ColorModel_   = Source.GetColorModel();
00678   ChannelCount_ = Source.GetChannelCount();
00679   Depth_        = Source.GetDepth();
00680   BitDepth_     = Source.GetBitDepth();
00681   Width_        = Source.GetWidth();
00682   Height_       = Source.GetHeight();
00683   InterleavedDataOrder_ = ! Source.IsPlanar();
00684   WidthStep_    = Source.WidthStep_;
00685   _UID          = Source.GetUID();
00686   _MetaData     = Source._MetaData;
00687   Roi_          = *Source.GetROI();
00688
00689   return *this;
00690 }
00691
00692
00693 void ImageBase::CopyIn_NoInit(void *data)
00694 {
00695   BIASDOUT(D_COPYIN," entering CopyIn_NoInit()");
00696   memcpy(GetImageData(), data, GetPixelCount()*GetChannelCount()*GetDepth());
00697 }
00698
00699
00700 int ImageBase::Flip()
00701 {
00702   int size=GetPixelCount() * GetChannelCount() * GetDepth(); // in byte
00703   if (size<=0) return -1;
00704
00705   char *newData = NULL;
00706   //TODO: this is causing a bad allocation on OpenGL screenshot... (JW DBG)
00707   //try {
00708   newData  = new char[size];
00709   //} catch( bad_alloc &ba) {
00710   // BIASERR( ba.what() );
00711   // return -1;
00712   //};
00713
00714
00715   register unsigned int length =  GetWidth() * GetChannelCount() * GetDepth();
00716   if (InterleavedDataOrder_) {
00717     register char *targetData = newData + size - length;
00718     for (register unsigned int i=0; i < Height_; i++) {
00719       memcpy(targetData,(char*)(ImageDataArray_[i]),length);
00720       targetData -= length;
00721     }
00722   }
00723   else { // planar
00724     BIASERR("Flip not implemented for planar images.");
00725     /*
00726     register int rowSize=Width_*sizeof(StorageType);
00727     register StorageType *targetData = newData+
00728     (Height_-1)*rowSize;
00729     register StorageType *sourceData = ImageData_;
00730     for (int channel=0;channel<ChannelCount_;channel++) {
00731     for (register int i=0; i < Height_; i++) {
00732     memcpy(targetData,sourceData,rowSize);
00733     targetData-=rowSize;
00734     sourceData+=rowSize;
00735     }
00736     targetData+=(2*Height_-1)*rowSize;
00737     } */
00738   }
00739   ReleaseImageDataPointer();
00740   RedirectImageDataPointer((void*)newData);
00741   return 0;
00742 }
00743
00744 int ImageBase::FlipHorizontal()
00745 {
00746   int size=GetPixelCount() * GetChannelCount() * GetDepth(); // in byte
00747   if (size<=0) return -1;
00748   int pixelsize=GetChannelCount() * GetDepth();
00749   char *newData = new char[size];
00750   if (InterleavedDataOrder_) {
00751     register char *targetData;
00752     register char *srcData;
00753     for (register unsigned int i=0; i < Height_; i++) {
00754       targetData = newData + (i+1)*WidthStep_ - pixelsize;
00755       srcData = (char *)(ImageDataArray_[i]);
00756       for (register int x=0; x<(int)Width_; x++){
00757         memcpy(targetData-x*pixelsize, srcData+x*pixelsize, pixelsize);
00758       }
00759     }
00760   } else { // planar
00761     BIASERR("FlipHorizontal not implemented for planar images.");
00762   }
00763   ReleaseImageDataPointer();
00764   RedirectImageDataPointer((void*)newData);
00765   return 0;
00766 }
00767
00768
00769
00770
00771 void ImageBase::PrintHeader(ostream& os) const
00772 {
00773   os << "\nVersion_ : \t\t" << Version_;
00774   os << "\nStorageType_ : \t\tImageBase::"<<StorageType_;
00775   os << "\nColorModel_ : \t\tImageBase::"<< ColorModel_
00776     << " ("<<(int)ColorModel_<<")"
00777     << "\nWidth_: \t\t" << Width_
00778     << "\nHeight_: \t\t" << Height_
00779     << "\nnChannelCount_: \t" << ChannelCount_
00780     << "\nWidthStep_: \t\t" << WidthStep_
00781     << "\nDepth_: \t\t" << Depth_
00782     << "\nBitDepth_: \t\t" << BitDepth_
00783     << "\nPixelCount_: \t\t" << GetPixelCount()
00784     << "\nInterleavedDataOrder_: \t" << InterleavedDataOrder_
00785     << endl << Roi_
00786     << "\nUUID: \t\t\t"<<GetUID()<<" ("
00787     <<      (GetUID().IsValid()?"valid":"invalid")<<")"
00788 #ifdef BIASDEBUG
00789     << "\nDebuglevel_:\t" << Debuglevel_;
00790 #else
00791     ;
00792 #endif
00793 }
00794
00795
00796
00797
00798 // JW 09/2003
00799 bool
00800 ImageBase::IsPowerOfTwoSize() const {
00801   //unsigned int w2, h2;
00802   //return PowerOfTwoSize(w2,h2);
00803   int w=(int)GetWidth();
00804   int h=(int)GetHeight();
00805   return IsPowerOfTwoSize(w, h);
00806 }
00807
00808 // static JW
00809 bool
00810 ImageBase::IsPowerOfTwoSize(const unsigned int w,
00811                             const unsigned int h)
00812 {
00813   // JW 09/03: more efficient is this with bitmasks :-)
00814   return (((w&(w-1))==0) && ((h&(h-1))==0));
00815 }
00816
00817
00818
00819 // Jan Woetzel
00820 bool
00821 ImageBase::PowerOfTwoSize(unsigned int & width2, unsigned int & height2) const {
00822   // next pow2 sizes:
00823   width2  = PowerOfTwoSize( GetWidth() );
00824   height2 = PowerOfTwoSize( GetHeight() );
00825
00826   return ( (GetWidth()==width2) && (GetHeight()==height2));
00827 }
00828
00829 // Jan Woetzel
00830 unsigned int
00831 ImageBase::PowerOfTwoSize(const unsigned int & val) {
00832   // special case
00833   if (val==0)
00834     return 0;
00835
00836   // loop is faster than ldexp etc...
00837   unsigned int res = 1;
00838   while (res < val)
00839     res <<= 1;
00840   return res;
00841 }
00842
00843
00844 // JW
00845 bool ImageBase::DimensionMatch(const BIAS::ImageBase & other) const {
00846   // return treu of width and height matches. don't are about types or channel count
00847   return (  (this->GetWidth() == other.GetWidth())
00848     && (this->GetHeight() == other.GetHeight()) );
00849 }
00850
00851
00852 void *ImageBase::PixelValueBase(unsigned x, unsigned y, unsigned channel)
00853 {
00854   BIASERR("warnig, PixelValueBase is deprecated and will be removed in the "
00855     "future,\nuse GetImageDataArray() instead!");
00856   if (InterleavedDataOrder_)
00857     return (void *)(&((char*)ImageData_)[(y*WidthStep_*Depth_+
00858     x*Depth_*ChannelCount_+
00859     channel)]);
00860   else
00861     return (void *)(&((char*)ImageData_)[channel*Width_*Height_*Depth_+
00862     y*Width_*Depth_+x*Depth_]);
00863 }
00864
00865 /// JW: there's no reason to drop this interface - be API backward compatible!
00866 int ImageBase::SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY,
00867                       unsigned int LowerRightX, unsigned int LowerRightY)
00868 {
00869   return SetROICorners(
00870     UpperLeftX,  UpperLeftY,
00871     LowerRightX,  LowerRightY);
00872 }
00873 int ImageBase::SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY,
00874                              unsigned int LowerRightX, unsigned int LowerRightY)
00875 {
00876   return GetROI()->SetCorners(
00877     UpperLeftX,  UpperLeftY,
00878     LowerRightX,  LowerRightY);
00879 }
00880
00881
00882 void ImageBase::UnsetROI()
00883 {
00884   GetROI()->UnsetROI();
00885 }
00886
00887 void ImageBase::GetROI(unsigned int& UpperLeftX, unsigned int& UpperLeftY,
00888                        unsigned int& LowerRightX, unsigned int& LowerRightY) const
00889 {
00890   GetROICorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00891 }
00892 void ImageBase::GetROICorners(unsigned int& UpperLeftX, unsigned int& UpperLeftY,
00893                               unsigned int& LowerRightX, unsigned int& LowerRightY) const
00894 {
00895   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00896 }
00897
00898
00899 void ImageBase::GetROI( int& UpperLeftX,  int& UpperLeftY,
00900                        int& LowerRightX,  int& LowerRightY) const
00901 {
00902   GetROICorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00903 }
00904 void ImageBase::GetROICorners(int& UpperLeftX, int& UpperLeftY,
00905                               int& LowerRightX, int& LowerRightY) const
00906 {
00907   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00908 }
00909
00910
00911
00912 void ImageBase::PrintROI(std::ostream& os) const
00913 {
00914   os << *GetROI();
00915 }
00916
00917 const unsigned int ImageBase::GetROIUpperLeftX() const
00918 {
00919   unsigned UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY;
00920   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00921   return UpperLeftX;
00922 }
00923
00924 const unsigned int ImageBase::GetROIUpperLeftY() const
00925 {
00926   unsigned UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY;
00927   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00928   return UpperLeftY;
00929 }
00930
00931 const unsigned int ImageBase::GetROILowerRightX() const
00932 {
00933   unsigned UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY;
00934   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00935   return LowerRightX;
00936 }
00937
00938 const unsigned int ImageBase::GetROILowerRightY() const
00939 {
00940   unsigned UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY;
00941   GetROI()->GetCorners(UpperLeftX,  UpperLeftY,  LowerRightX,  LowerRightY);
00942   return LowerRightY;
00943 }
00944
00945
00946 // JW
00947 int ImageBase::ZeroPad(const unsigned int newwidth,
00948                        const unsigned int newheight,
00949                        unsigned char bgcolor )
00950 {
00951   return this->Pad(newwidth, newheight, bgcolor );
00952 }
00953
00954
00955 // JW
00956 int ImageBase::PadToPowerOfTwo(const int & padVal)
00957 {
00958   unsigned int w2, h2;
00959   // do nothing if image is already correct size
00960   if (PowerOfTwoSize(w2,h2)) {
00961     // do nothing.
00962     return 0;
00963   }
00964
00965   // create a temporary
00966   // to use the existing out of place impl.
00967   ImageBase img;
00968   int result=PadToPowerOfTwo( img, padVal );
00969
00970   // assignment to emulaet in-place
00971   *this = img;
00972
00973   return  result;
00974 }
00975
00976
00977 // JW
00978 int
00979 ImageBase::PadToPowerOfTwo(BIAS::ImageBase & dest,
00980                            const int & padVal) const
00981 {
00982 #ifdef BIAS_DEBUG
00983   if (!IsInterleaved()) {
00984     BIASERR("PadToPowerOfTwo just for interleaved format implemented!");
00985   };
00986 #endif
00987   BIASASSERT( IsInterleaved() );
00988
00989   unsigned int w2, h2; // desired dest size
00990   if (PowerOfTwoSize(w2,h2))
00991   {
00992     // is already a power of two - just copy, no padding
00993     // constructor is always safe, operator= not
00994     dest=ImageBase( *this );
00995     return 0;
00996   };
00997
00998   // call general Padding routine
00999   return Pad(dest, w2, h2, padVal);
01000 }
01001
01002
01003
01004
01005 // JW
01006 int
01007 ImageBase::Pad(const unsigned int & newwidth,
01008                const unsigned int & newheight,
01009                const int & padVal)
01010 {
01011   // do nothing if image is already correct size
01012   if ((newwidth==GetWidth()) && (newheight==GetHeight()))
01013   {
01014     // do nothing.
01015     return 0;
01016   }
01017
01018   // create a temporary
01019   // to use the existing out of place impl.
01020   ImageBase img;
01021   int result=Pad( img, newwidth, newheight, padVal );
01022
01023   // assignment to emulaet in-place
01024   *this = img;
01025
01026   return  result;
01027 }
01028
01029
01030 // JW
01031 int
01032 ImageBase::Pad(BIAS::ImageBase & dest,
01033                const unsigned int & newwidth,
01034                const unsigned int & newheight,
01035                const int & padVal) const
01036 {
01037
01038   if (!IsInterleaved())
01039   {
01040     BIASERR("can work on interleaved images, only. Sorry.");
01041     return -1;
01042   }
01043   if (newwidth < GetWidth() || newheight < GetHeight() )
01044   {
01045     BIASERR("can only increase image size. Sorry.");
01046     return -1;
01047   }
01048   BIASASSERT( IsInterleaved() );
01049   BIASASSERT( GetWidth()  <= newwidth  );
01050   BIASASSERT( GetHeight() <= newheight );
01051
01052   //
01053   // OK
01054   //
01055
01056   // pad and copy from upper left origin
01057   dest=ImageBase(newwidth, newheight, GetChannelCount(), GetStorageType(), IsInterleaved() );
01058   dest.SetBitDepth( GetBitDepth() );
01059
01060   // compute bytes per row for src and dest:
01061   const unsigned int src_BytePerRow  = GetDepth() * GetWidth() * GetChannelCount();
01062   const unsigned int dest_BytePerRow = GetDepth() * dest.GetWidth() * dest.GetChannelCount();
01063
01064   //
01065   // dest image is:
01066   //   SSS R
01067   //   BBBBB
01068   //
01069   // S,R:  for all source rows
01070   // copy overlap part from left and init non-overlap data.
01071   for (unsigned int ys=0; ys<GetHeight(); ys++)
01072   {
01073     // S:
01074     // copy:   dest* , src*, n
01075     memcpy(
01076       (void*) dest.GetImageDataArray()[ys],
01077       (void*) GetImageDataArray()[ys],
01078       src_BytePerRow );
01079
01080     // R:
01081     // for all lines of orig image: pad right part
01082     if (dest_BytePerRow > src_BytePerRow) {
01083       // set remainder of row to zero in dest img.
01084       // set    dest*, val, n
01085       memset(
01086         (void*) (& ((unsigned char*)(dest.GetImageDataArray()[ys]))[src_BytePerRow])
01087         ,padVal
01088         ,dest_BytePerRow-src_BytePerRow );
01089     };
01090   };
01091
01092   // B: bottom rectangle
01093   if (GetHeight()<dest.GetHeight())
01094   {
01095     // set    dest*, val, n
01096     memset((void*) dest.GetImageDataArray()[GetHeight()],
01097       padVal,
01098       dest_BytePerRow*(dest.GetHeight()-GetHeight()) );
01099   };
01100   return 0;
01101 }
01102
01103
01104 // JW
01105 int ImageBase::PadToPowerOfTwoAndFlip(const int & padVal)
01106 {
01107   /// \todo replace with linewise memmov
01108   if (0==Flip())
01109   {
01110     return PadToPowerOfTwo(padVal);
01111   } else {
01112     BIASERR("could not flip. skipped padding.");
01113     return -1;
01114   };
01115 }
01116
01117
01118 // JW
01119 // static
01120 int ImageBase::GetSize(const enum BIAS::ImageBase::EStorageType & storagetype)
01121 {
01122   switch (storagetype)
01123   {
01124   case BIAS::ImageBase::ST_unsignedchar:
01125   case BIAS::ImageBase::ST_char:
01126     //BIASASSERT(sizeof(char)==1);
01127     return sizeof(char);
01128   case BIAS::ImageBase::ST_unsignedshortint:
01129   case BIAS::ImageBase::ST_shortint:
01130     //BIASASSERT(sizeof(short int)==2);
01131     return sizeof(short int);
01132   case BIAS::ImageBase::ST_unsignedint:
01133   case BIAS::ImageBase::ST_int:
01134     //BIASASSERT(sizeof(int)==4);
01135     return sizeof(int);
01136   case BIAS::ImageBase::ST_float:
01137     //BIASASSERT(sizeof(float)==4);
01138     return sizeof(float);
01139   case BIAS::ImageBase::ST_double:
01140     //BIASASSERT(sizeof(double)==8);
01141     return sizeof(double);
01142   default:
01143     BIASERR( "unsupported StorageType:"<<storagetype);
01144     BIASBREAK;
01145   };
01146   return 0;
01147 }
01148
01149
01150
01151 // JW
01152 // static
01153 int ImageBase::GetChannelcount(const enum BIAS::ImageBase::EColorModel & colormodel)
01154 {
01155   switch (colormodel)
01156   {
01157   case BIAS::ImageBase::CM_RGBA:
01158   case BIAS::ImageBase::CM_BGRA:
01159     return 4;
01160
01161   case BIAS::ImageBase::CM_HSV:
01162   case BIAS::ImageBase::CM_HSL:
01163   case BIAS::ImageBase::CM_hsL:
01164     BIASWARN("you are possibyl treating a HSV/HSL/hsL as RGB.");
01165   case BIAS::ImageBase::CM_BGR:
01166   case BIAS::ImageBase::CM_RGB:
01167     return 3;
01168
01169   case BIAS::ImageBase::CM_GreyA:
01170     return 2;
01171
01172   case BIAS::ImageBase::CM_Grey:
01173     return 1;
01174
01175   case BIAS::ImageBase::CM_Bayer_BGGR:
01176   case BIAS::ImageBase::CM_Bayer_RGGB:
01177   case BIAS::ImageBase::CM_Bayer_GRBG:
01178   case BIAS::ImageBase::CM_Bayer_GBRG:
01179     BIASWARN("you are possibly treating a Bayer image as RGB.");
01180     return 3;
01181
01182   default:
01183     BIASERR( "unsupported color model "<<colormodel);
01184   };
01185   return 0;
01186 }
01187
01188
01189 #ifdef BIAS_HAVE_OPENCV
01190 // JW
01191 #include "WrapBias2Ipl.hh"
01192
01193 int ImageBase::Display(const std::string & DestWin,
01194                        const bool & autoresize,
01195                        const bool & moveToTopLeft,
01196                        const bool & waitForKey,
01197                        const unsigned int & delayMsec,
01198                        const float &scale)
01199 {
01200   WrapBias2Ipl wrap (this);
01201   return wrap.Display(
01202     DestWin,
01203     autoresize,
01204     moveToTopLeft,
01205     waitForKey,
01206     delayMsec,
01207     scale
01208     );
01209 }
01210
01211 int ImageBase::Display(const bool & waitForKey,
01212                        const unsigned int & delayMsec,
01213                        const float &scale )
01214 {
01215   return this->Display(
01216     string( DEFAULT_WrapBias2Ipl_WINNAME ),
01217     true, true, waitForKey, delayMsec, scale );
01218 }
01219
01220
01221 int ImageBase::Display()
01222 {
01223   return this->Display(
01224     true, /* waitforkey*/
01225     DEFAULT_Display_delay, /* delay*/
01226     DEFAULT_32to8_scale /*float scale */
01227     );
01228 }
01229 #endif // BIAS_HAVE_OPENCV
01230
01231 // fixes for building dlls
01232 namespace BIAS {
01233
01234 std::ostream& operator<<(std::ostream& os, const ImageBase& img2)
01235 {
01236   // TODO: remove dirty const_cast by making req. functuibs in ImgBase const
01237   // to use reinterpret_cast<> we first have to unconst:
01238   ImageBase &img = const_cast<ImageBase&>(img2);
01239
01240   //enum BIAS::ImageBase::EStorageType storageType = img.GetStorageType();
01241   int Version = img.GetVersionNumber();
01242   int depthondisk;
01243   // added in Version 300 to identify mipimage on disk similar to magic number
01244   os.write(IDENTIFIER, IDENTIFIER_LENGTH);
01245   os.write(reinterpret_cast<char*>(&img.StorageType_), sizeof(BIAS::ImageBase::EStorageType));
01246   os.write(reinterpret_cast<char*>(&Version), sizeof(int));
01247   os.write(reinterpret_cast<char*>(&img.ChannelCount_), sizeof(int));
01248   os.write(reinterpret_cast<char*>(&img.Width_), sizeof(int));
01249   os.write(reinterpret_cast<char*>(&img.Height_), sizeof(int));
01250   os.write(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01251   depthondisk = img.Depth_ * 8;
01252   os.write(reinterpret_cast<char*>(& depthondisk), sizeof(int));
01253   os.write(reinterpret_cast<char*>(&img.BitDepth_), sizeof(int));
01254   os.write(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01255   int PixelCount = img.GetPixelCount();
01256   os.write(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01257   os.write(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01258
01259   // version 311: now writing unique image id as a string,
01260   // make sure that id is valid, since IsValid_ is not written
01261 #ifdef BIAS_DEBUG
01262 #  ifdef BIAS_EXTRA_WARN
01263   if (!img.GetUID().IsValid()) {
01264     BIASERR("Writing invalid UID! Generate a valid one before writing image !");
01265     img.GetUID().clear();
01266   }
01267 #  endif //BIAS_EXTRA_WARN
01268 #endif //BIAS_DEBUG
01269   std::string id;
01270   img._UID.GetString(id);
01271   os.write(id.c_str(), 36);
01272   if (img.GetROI()->WriteBinary(os)!=0){
01273     BIASERR("error writing ROI");
01274   }
01275
01276   // finally write image data:
01277   BIASASSERT(img.GetImageData()!=NULL); // jw
01278   // TOOD seems to cause access to uninitialized value(s) by valgrind
01279   // Syscall param write(buf) points to uninitialized Bytes( ExampleMetaData
01280   //( JW)
01281   os.write(
01282     reinterpret_cast<char*>(img.GetImageData()),
01283     img.GetPixelCount() * img.GetChannelCount() * img.Depth_
01284     );
01285
01286   return os;
01287 }
01288
01289 std::ostream& operator<<(std::ostream& os,
01290                          const ImageBase::EStorageType &st)
01291 {
01292   switch (st)
01293   {
01294   case ImageBase::ST_invalid: os<< "ST_invalid"; break;
01295   case ImageBase::ST_unsignedchar: os<< "ST_unsignedchar"; break;
01296   case ImageBase::ST_char: os<< "ST_char"; break;
01297   case ImageBase::ST_unsignedshortint: os<< "ST_unsignedshortint"; break;
01298   case ImageBase::ST_shortint: os<< "ST_shortint"; break;
01299   case ImageBase::ST_unsignedint: os<< "ST_unsignedint"; break;
01300   case ImageBase::ST_int: os<< "ST_int"; break;
01301   case ImageBase::ST_float: os<< "ST_float"; break;
01302   case ImageBase::ST_double: os<< "ST_double"; break;
01303   default: os<<"unknown StorageType"; break;
01304   }
01305   return os;
01306 }
01307
01308
01309 std::ostream& operator<<(std::ostream& os,
01310                          const ImageBase::EColorModel &st)
01311 {
01312   switch (st)
01313   {
01314   case ImageBase::CM_invalid: os<< "CM_invalid"; break;
01315   case ImageBase::CM_Grey: os<< "CM_Grey"; break;
01316   case ImageBase::CM_RGB: os<< "CM_RGB"; break;
01317   case ImageBase::CM_BGR: os<< "CM_BGR"; break;
01318   case ImageBase::CM_YUYV422: os<< "CM_YUYV422"; break;
01319   case ImageBase::CM_UYVY422: os<< "CM_UYVY422"; break;
01320   case ImageBase::CM_YUV420P: os<< "CM_YUV420P"; break;
01321   case ImageBase::CM_YUV444: os<< "CM_YUV444"; break;
01322   case ImageBase::CM_YUV411: os<< "CM_YUV411"; break;
01323   case ImageBase::CM_HSV: os<< "CM_HSV"; break;
01324   case ImageBase::CM_HSI_OBS: os<< "CM_HSI is obsolete use HSL"; break;
01325   case ImageBase::CM_DV: os<< "CM_DV"; break;
01326   case ImageBase::CM_RGBA: os<< "CM_RGBA"; break;
01327   case ImageBase::CM_Bayer_RGGB: os<< "CM_Bayer_RGGB"; break;
01328   case ImageBase::CM_Bayer_GBRG: os<< "CM_Bayer_GBRG"; break;
01329   case ImageBase::CM_Bayer_GRBG: os<< "CM_Bayer_GRBG"; break;
01330   case ImageBase::CM_Bayer_BGGR: os<< "CM_Bayer_BGGR"; break;
01331   case ImageBase::CM_HSL: os << "CM_HSL"; break;
01332   case ImageBase::CM_hsL: os << "CM_hsL"; break;
01333   default: os<<"unknown ColorModel"; break;
01334   }
01335   return os;
01336 }
01337
01338
01339 std::istream& operator>>(std::istream& is, BIAS::ImageBase& img)
01340 {
01341   enum BIAS::ImageBase::EStorageType FileStorageType;
01342   int Version;
01343   int Width, Height, ChannelCount, PixelCount;
01344   char identifier[IDENTIFIER_LENGTH];
01345   char cBuffer[37];
01346   bool roidefined;
01347
01348   is.read(identifier, IDENTIFIER_LENGTH);
01349   if (identifier[0] != 'M' || identifier[1] != 'I' || identifier[2] != 'P'){
01350     BIASERR("no identifier in image, maybe old version or no MIP image"
01351       <<"\ntry mipconvertversion in Image/test");
01352     is.setstate(std::ios::badbit);
01353     return is;
01354   }
01355   if ( ! img.IsEmpty() )
01356     img.Release();
01357
01358   is.read(reinterpret_cast<char*>(&FileStorageType),sizeof(BIAS::ImageBase::EStorageType));
01359   is.read(reinterpret_cast<char*>(&Version), sizeof(int));
01360   switch (Version)
01361   {
01362   case 320: // new ROI class
01363     //  std::cout <<"Opening file with version MIP320"<<std::endl;
01364     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01365     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01366     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01367     img.Init(Width, Height, ChannelCount, FileStorageType);
01368     is.read(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01369     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01370     img.Depth_ /= 8;
01371     is.read(reinterpret_cast<char*>(&img.BitDepth_), sizeof(int));
01372     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01373     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01374     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01375     // read uid:
01376     is.read(cBuffer, 36);
01377     cBuffer[36]=0;
01378     img._UID.SetFromString(cBuffer);
01379     if (img.GetROI()->ReadBinary(is)!=0){
01380       BIASERR("error rteading roi");
01381     }
01382     // read image data
01383     is.read(reinterpret_cast<char*>(img.ImageData_),
01384       img.GetPixelCount() * img.ChannelCount_ * img.Depth_);
01385     break;
01386   case 313: // removed ROIIsDefined_
01387     //    std::cout <<"Opening file with version MIP313"<<std::endl;
01388     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01389     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01390     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01391     img.Init(Width, Height, ChannelCount, FileStorageType);
01392     is.read(reinterpret_cast<char*>(&img.ColorModel_),
01393       sizeof(BIAS::ImageBase::EColorModel));
01394     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01395     img.Depth_ /= 8;
01396     is.read(reinterpret_cast<char*>(&img.BitDepth_), sizeof(int));
01397     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01398     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01399     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01400     {
01401       unsigned UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
01402       is.read(reinterpret_cast<char*>(&UpperLeftX), sizeof(unsigned int));
01403       is.read(reinterpret_cast<char*>(&UpperLeftY), sizeof(unsigned int));
01404       is.read(reinterpret_cast<char*>(&LowerRightX), sizeof(unsigned int));
01405       is.read(reinterpret_cast<char*>(&LowerRightY), sizeof(unsigned int));
01406       // not necessary
01407       //img.GetROI()->Resize(Width, Height);
01408       img.GetROI()->SetCorners(UpperLeftX, UpperLeftY,
01409         LowerRightX, LowerRightY);
01410       //      cout <<"("<<UpperLeftX<<", "<<UpperLeftY<<") <--> ("
01411       //   <<LowerRightX<<", "<<LowerRightY<<")"<<endl;
01412     }
01413     // read uid:
01414     is.read(cBuffer, 36);
01415     cBuffer[36]=0;
01416     img._UID.SetFromString(cBuffer);
01417
01418     // read image data
01419     is.read(reinterpret_cast<char*>(img.ImageData_),
01420       img.GetPixelCount() * img.ChannelCount_ * img.Depth_);
01421     break;
01422   case 312: // removed ROIIsDefined_
01423     //    std::cout <<"Opening file with version MIP312"<<std::endl;
01424     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01425     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01426     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01427     img.Init(Width, Height, ChannelCount, FileStorageType);
01428     is.read(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01429     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01430     img.Depth_ /= 8;
01431     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01432     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01433     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01434     {
01435       unsigned UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
01436       is.read(reinterpret_cast<char*>(&UpperLeftX), sizeof(unsigned int));
01437       is.read(reinterpret_cast<char*>(&UpperLeftY), sizeof(unsigned int));
01438       is.read(reinterpret_cast<char*>(&LowerRightX), sizeof(unsigned int));
01439       is.read(reinterpret_cast<char*>(&LowerRightY), sizeof(unsigned int));
01440       // not necessary
01441       //img.GetROI()->Resize(Width, Height);
01442       img.GetROI()->SetCorners(UpperLeftX, UpperLeftY,
01443         LowerRightX, LowerRightY);
01444     }
01445     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftX_), sizeof(unsigned int));
01446     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftY_), sizeof(unsigned int));
01447     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightX_), sizeof(unsigned int));
01448     //      is.read(reinterpret_cast<char*>(&img.ROILowerRightY_), sizeof(unsigned int));
01449     // read uid:
01450     is.read(cBuffer, 36);
01451     cBuffer[36]=0;
01452     img._UID.SetFromString(cBuffer);
01453
01454     // read image data
01455     is.read(reinterpret_cast<char*>(img.ImageData_), img.GetPixelCount() * img.ChannelCount_
01456       * img.Depth_);
01457     break;
01458   case 311: // solved stack corruption problem due to wrong id writing/loading
01459     //  std::cout <<"Opening file with version MIP311"<<std::endl;
01460     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01461     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01462     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01463     img.Init(Width, Height, ChannelCount, FileStorageType);
01464     is.read(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01465     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01466     img.Depth_ /= 8;
01467     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01468     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01469     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01470     {
01471       unsigned UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
01472       is.read(reinterpret_cast<char*>(&UpperLeftX), sizeof(unsigned int));
01473       is.read(reinterpret_cast<char*>(&UpperLeftY), sizeof(unsigned int));
01474       is.read(reinterpret_cast<char*>(&LowerRightX), sizeof(unsigned int));
01475       is.read(reinterpret_cast<char*>(&LowerRightY), sizeof(unsigned int));
01476       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01477       // not necessary
01478       //img.GetROI()->Resize(Width, Height);
01479       if (roidefined)
01480         img.GetROI()->SetCorners(UpperLeftX, UpperLeftY,
01481         LowerRightX, LowerRightY);
01482     }
01483     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftX_), sizeof(unsigned int));
01484     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftY_), sizeof(unsigned int));
01485     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightX_), sizeof(unsigned int));
01486     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightY_), sizeof(unsigned int));
01487     //       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01488     //       if (!roidefined){
01489     //         img.ROIUpperLeftX_=img.ROIUpperLeftY_=0;
01490     //         img.ROILowerRightX_=img.Width_; img.ROILowerRightY_=img.Height_;
01491     //       }
01492     // read uid:
01493     is.read(cBuffer, 36);
01494     cBuffer[36]=0;
01495     img._UID.SetFromString(cBuffer);
01496
01497     // read image data
01498     is.read(reinterpret_cast<char*>(img.ImageData_), img.GetPixelCount() * img.ChannelCount_
01499       * img.Depth_);
01500     break;
01501   case 310: // introduced unique image id in this version
01502     //   std::cout <<"Opening file with version MIP310"<<std::endl;
01503     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01504     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01505     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01506     img.Init(Width, Height, ChannelCount, FileStorageType);
01507     is.read(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01508     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01509     img.Depth_ /= 8;
01510     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01511     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01512     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01513     {
01514       unsigned UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
01515       is.read(reinterpret_cast<char*>(&UpperLeftX), sizeof(unsigned int));
01516       is.read(reinterpret_cast<char*>(&UpperLeftY), sizeof(unsigned int));
01517       is.read(reinterpret_cast<char*>(&LowerRightX), sizeof(unsigned int));
01518       is.read(reinterpret_cast<char*>(&LowerRightY), sizeof(unsigned int));
01519       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01520       // not necessary
01521       //img.GetROI()->Resize(Width, Height);
01522       if (roidefined)
01523         img.GetROI()->SetCorners(UpperLeftX, UpperLeftY,
01524         LowerRightX, LowerRightY);
01525     }
01526     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftX_), sizeof(unsigned int));
01527     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftY_), sizeof(unsigned int));
01528     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightX_), sizeof(unsigned int));
01529     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightY_), sizeof(unsigned int));
01530     //       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01531     //       if (!roidefined){
01532     //         img.ROIUpperLeftX_=img.ROIUpperLeftY_=0;
01533     //         img.ROILowerRightX_=img.Width_; img.ROILowerRightY_=img.Height_;
01534     //       }
01535     // do not read uid:
01536     { /// \bug fake reading of uuid because of bug, id is DISABLED !
01537       char *tmp=new char[sizeof(UUID)];
01538       is.read(tmp, sizeof(UUID));
01539       delete[] tmp;
01540       BIASERR("Cannot read image id in MIP version 310.");
01541     }
01542
01543     // read image data
01544     is.read(reinterpret_cast<char*>(img.ImageData_), img.GetPixelCount() * img.ChannelCount_
01545       * img.Depth_);
01546     break;
01547   case 300:
01548     //std::cout <<"Opening file with version MIP300"<<std::endl;
01549     is.read(reinterpret_cast<char*>(&ChannelCount), sizeof(int));
01550     is.read(reinterpret_cast<char*>(&Width), sizeof(int));
01551     is.read(reinterpret_cast<char*>(&Height), sizeof(int));
01552     img.Init(Width, Height, ChannelCount, FileStorageType);
01553     is.read(reinterpret_cast<char*>(&img.ColorModel_), sizeof(BIAS::ImageBase::EColorModel));
01554     is.read(reinterpret_cast<char*>(&img.Depth_), sizeof(int));
01555     img.Depth_ /= 8;
01556     is.read(reinterpret_cast<char*>(&img.InterleavedDataOrder_), sizeof(bool));
01557     is.read(reinterpret_cast<char*>(&PixelCount), sizeof(int));
01558     is.read(reinterpret_cast<char*>(&img.WidthStep_), sizeof(int));
01559     {
01560       unsigned UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
01561       is.read(reinterpret_cast<char*>(&UpperLeftX), sizeof(unsigned int));
01562       is.read(reinterpret_cast<char*>(&UpperLeftY), sizeof(unsigned int));
01563       is.read(reinterpret_cast<char*>(&LowerRightX), sizeof(unsigned int));
01564       is.read(reinterpret_cast<char*>(&LowerRightY), sizeof(unsigned int));
01565       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01566       // not necessary
01567       //img.GetROI()->Resize(Width, Height);
01568       if (roidefined)
01569         img.GetROI()->SetCorners(UpperLeftX, UpperLeftY,
01570         LowerRightX, LowerRightY);
01571     }
01572     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftX_), sizeof(unsigned int));
01573     //       is.read(reinterpret_cast<char*>(&img.ROIUpperLeftY_), sizeof(unsigned int));
01574     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightX_), sizeof(unsigned int));
01575     //       is.read(reinterpret_cast<char*>(&img.ROILowerRightY_), sizeof(unsigned int));
01576     //       is.read(reinterpret_cast<char*>(&roidefined), sizeof(bool));
01577     //       if (!roidefined){
01578     //         img.ROIUpperLeftX_=img.ROIUpperLeftY_=0;
01579     //         img.ROILowerRightX_=img.Width_; img.ROILowerRightY_=img.Height_;
01580     //       }
01581     //        img.PrintHeader(cerr);
01582     //         cerr << endl << "size to read "<< img.PixelCount_ * img.ChannelCount_ *  img.Depth_<< endl;
01583     is.read(reinterpret_cast<char*>(img.ImageData_), img.GetPixelCount() * img.ChannelCount_
01584       * img.Depth_);
01585     break;
01586   default:
01587     BIASERR("operator>> invalid or unsupported version number ("<<Version
01588       <<")\ntry mipconvertversion in Image/test");
01589
01590     break;
01591   }
01592   return is;
01593 }
01594
01595 } // end namespace
01596
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBase.hh Source File

Base » Image

ImageBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _IMAGE_BASE_H_INCLUDED_
00027 #define _IMAGE_BASE_H_INCLUDED_
00028
00029 #include <Base/Common/W32Compat.hh>
00030 #include "bias_config.h"
00031 #include <exception>
00032 #include <string>
00033
00034 #include <malloc.h>
00035 #include <string.h>
00036 #include <stdio.h>
00037
00038 #include <Base/Debug/Debug.hh>
00039 #include <Base/Debug/Error.hh>
00040 #include "MetaData.hh"
00041 #include "UUID.hh"
00042 #include "ROI.hh"
00043
00044
00045
00046
00047 // Begin namespace BIAS
00048 namespace BIAS {
00049
00050 #define MIP_DV_WIDTH 500
00051 #define MIP_DV_HEIGHT 288
00052
00053
00054 #define D_COPYIN        1<<1
00055 #define D_CONVERT       1<<2
00056 #define D_CAST_CHECK    1<<3
00057 #define D_MI_TOPLANAR   1<<4
00058 #define D_MI_IOSTREAM   1<<5
00059 #define D_MI_CONVGREY   1<<6
00060
00061   // global debug level
00062 #define D_IMAGE_TRACE 1<<25
00063
00064 #define VERSION_NUMBER 320
00065
00066 #define IDENTIFIER "MIP"
00067 #define IDENTIFIER_LENGTH 3
00068
00069
00070   // used only by Display float to Byte range conversion
00071 #define DEFAULT_32to8_scale 255.0f
00072   // used by Display if waitforkey is specicied
00073 #define DEFAULT_Display_delay 3000
00074   // used by Display routine
00075 #define DEFAULT_WrapBias2Ipl_WINNAME "WrapBias2Ipl_0"
00076
00077
00078   // forward declarations
00079   class BIASImageBase_EXPORT ImageConvert;
00080   template<class StorageType> class BIASImageBase_EXPORT Image;
00081
00082   /** @class ImageBase
00083   @ingroup g_image_base
00084   \brief This is the base class for images in BIAS.
00085
00086   It is a non template class, so you can write image type
00087   independet functions.
00088   Use this class if you deal with different storage types or
00089   you don't know the storage type, eg. when loading an image from disk.
00090   */
00091   class BIASImageBase_EXPORT ImageBase : public Debug
00092   {
00093     friend class ImageConvert;
00094     friend class ImageIO;
00095     friend class WrapBias2Ipl; //JW
00096
00097   public:
00098     enum EStorageType {
00099       ST_invalid =-1,       ///< invalid not set image storage type
00100       ST_unsignedchar,     ///< (8bit) unsigned char image storage type
00101       ST_char,             ///< (8bit) signed char image storage type
00102       ST_unsignedshortint, ///< (16bit) unsigned integer image storage type
00103       ST_shortint,         ///< (16bit) signed integer image storage type
00104       ST_unsignedint,      ///< (32bit) unsigned integer image storage type
00105       ST_int,              ///< (32bit) signed integer image storage type
00106       ST_float,            ///< float image storage type
00107       ST_double            ///< double image storage type
00108     };
00109
00110     /** @enum EColorModel
00111     \brief These are the most often used color models.
00112     */
00113     enum EColorModel
00114     {
00115       CM_invalid = -1, ///< invalid (not set) image format
00116       CM_Grey,        ///< gray values (one channel: gray value)
00117       CM_RGB,         ///< color values (three channel order: red,green,blue)
00118       CM_BGR,         ///< color values (three channel order: blue,green,red)
00119       CM_YUYV422,     ///< YUYV422 (please insert a description)
00120       CM_UYVY422,     ///< (please insert a description)
00121       CM_YUV420P,     ///< (please insert a description)
00122       CM_YUV444,      ///< (please insert a description)
00123       CM_YUV411,      ///< (please insert a description)
00124       CM_HSV,         ///< HSV (three channel order: hue, sat , value)
00125       CM_HSI_OBS,     ///< obsolete, HSI is unused and identical to HSL
00126       CM_DV,          ///< DV (please insert a description)
00127       CM_RGBA,        ///< RGBA (four channel order: red,green,blue,alpha)
00128       CM_GreyA,       ///< Grey  (or Gray) plus Alpha channel
00129       CM_Bayer_RGGB,  ///< One channel RGB image Bayer tile
00130       CM_Bayer_GBRG,  ///< One channel RGB image Bayer tile
00131       CM_Bayer_GRBG,  ///< One channel RGB image Bayer tile
00132       CM_Bayer_BGGR,  ///< One channel RGB image Bayer tile
00133       CM_HSL,         ///< similar to HSV but space is a double tipped cone
00134       CM_hsL,         ///< similar to HSL but euclidean (h,s) for CNCC
00135       CM_SymTensor2x2,///< The image contains a 2x2 symmetric tensor
00136       CM_BGRA,        ///< BGRA (four channel order: blue,green,red,alpha)
00137       CM_RGBE        ///< RGBE: RADIANCE hdr format, four low dynamic channels meaning: 3x mantissa (red,green,blue) +1x (exponent)
00138     };
00139
00140     ImageBase();
00141     virtual ~ImageBase();
00142
00143     ImageBase(const ImageBase& im);
00144
00145     /** @brief Constructor, initializing image size and channels
00146     @author Felix Woelk
00147     @status tested
00148     @param width  image width  of the new image
00149     @param height image height of the new image
00150     @param channels number of color planes
00151     @note Example: Defining an RGB image.
00152     @verbatim
00153     ImageBase im;
00154     im.init(width, height, 3);
00155     @endverbatim **/
00156     ImageBase(unsigned int width, unsigned int height, unsigned int channels=1,
00157       enum EStorageType storageType=  ST_unsignedchar,
00158       const bool interleaved=true);
00159
00160
00161
00162     /**  @brief Initialize image size and channels
00163
00164     @warning call this only for empty images,
00165     calls new for the image data array. Overwrites the color model with
00166     some kind of best guess
00167     @author Felix Woelk
00168     @status tested
00169     @param width  image width  of the new image
00170     @param height image height of the new image
00171     @param channels number of color planes **/
00172     void Init(unsigned int width, unsigned int height, unsigned int channels=1,
00173       enum EStorageType storageType = ST_unsignedchar,
00174       const bool interleaved=true);
00175
00176     /** @brief check if ImageData_ points to allocated image buffer or not */
00177     inline bool IsEmpty() const
00178     { return (ImageData_==NULL); };
00179
00180     /** @brief Take some data and fill it into the Image
00181     @warning Image must be initialized already !
00182     @author Evers  **/
00183     void CopyIn_NoInit(void *data);
00184
00185     /** @brief Free the allocated data structures*/
00186     void Release();
00187
00188     /** @brief steals the image data array from source,
00189     after releasing the actual image data
00190     and sets source image data to NULL
00191
00192     @warning Important for template: Steal images only, if u know the
00193     storageTypes are euqal!
00194     @author Daniel Grest
00195     @status tested */
00196     int StealImage(ImageBase &source);
00197
00198     /////////////////////Get Functions ///////////////////////////////////////
00199     /** @name Get functions
00200     @{
00201     */
00202     inline void* GetImageData() const
00203     { return ImageData_; };
00204
00205     inline void* GetImageData()
00206     { return ImageData_; };
00207
00208     /** @brief Get an array of pointers to image data.
00209
00210     A pixel can be accessed  by
00211     GetImageDataArray()[row][col] or GetImageDataArray()[y][x] <br>
00212     For multi channel images with interleaved data order, access with
00213     GetImageDataArray()[row][col * GetChannelCount() + Channel] <br>
00214     For multi channel images with planar data order, access with
00215     GetImageDataArray()[row + GetHeight * Channel][col] <br>
00216
00217     @author Felix Woelk
00218     @return array with pointer to the first pixels in every row. **/
00219     inline void** GetImageDataArray() const
00220     { return ImageDataArray_; };
00221
00222     inline unsigned int GetWidth() const
00223     { return Width_; };
00224
00225     inline unsigned int GetHeight() const
00226     { return Height_; };
00227
00228     /** returns the bytes per channel, which is the sizeof(StorageType) */
00229     inline unsigned int GetDepth() const
00230     { return Depth_; };
00231
00232     /** returns the bits per channel, which is not necessairily
00233     8*sizeof(StorageType).
00234     @author woelk 12/2004 */
00235     inline unsigned int GetBitDepth() const
00236     { return BitDepth_; };
00237
00238     /** returns the image size in bytes = count - NOT the dimension */
00239     inline unsigned int GetSize() const
00240     { return GetPixelCount() * Depth_ * ChannelCount_; };
00241
00242
00243     /** @return true if the image dimension w x h of this and other
00244     match = are equal
00245     @author JW */
00246     bool DimensionMatch(const BIAS::ImageBase & other) const;
00247
00248
00249     /** @brief returns the number of Color channels, e.g. RGB 3
00250
00251     the value returned is independent of the StorageType */
00252     inline unsigned int GetChannelCount() const
00253     { return ChannelCount_; };
00254
00255
00256     /** @brief returns the number of bytes per line
00257
00258     returns the number of bytes per line, not the number of StorageTypes
00259
00260     interleaved data order: = Width * Depth * ChannelCount
00261     planar data order: = Width * Depth
00262
00263     Useful for memory aligned images (e.g. 4/8 Byte)
00264     and packing of textures.
00265     JW
00266     */
00267     inline unsigned int GetWidthStep() const
00268     { return WidthStep_; };
00269
00270     inline enum EColorModel GetColorModel() const
00271     { return ColorModel_; };
00272
00273     inline enum EStorageType GetStorageType() const
00274     { return StorageType_; };
00275
00276     /** @brief returns number of pixels in image */
00277     inline unsigned long int GetPixelCount() const
00278     { return Width_ * Height_; };
00279
00280     /**
00281     returns the Position (index from array start) in ImageData
00282     Warning: until 2005-01-04 the position inbyte was returned
00283     but used as position in <StorageType> (ImageDraw).
00284     Changed this method to return position in StorageType
00285     Jan-Friso Evers
00286     */
00287     inline unsigned int GetPixelPosition(unsigned int x, unsigned int y,
00288       unsigned short int channel=0) const;
00289
00290     /** copies one specific channel from source to Image
00291     can only be called from an planar image, so call ToPlanar() befor
00292     so far only implemented for CM_YUYV422, BGR  and RGB
00293     @author Felix Woelk
00294     @status untested (17/04/2002) */
00295     int GetChannel(ImageBase &source, unsigned int channel);
00296
00297     /** @brief returns the UUID of the image */
00298     inline const BIAS::UUID & GetUID() const
00299     {  return _UID; };
00300
00301     inline MetaData *GetMetaData()
00302     { return &_MetaData; };
00303
00304     inline void SetMetaData(const MetaData& m)
00305     { _MetaData = m; };
00306
00307     inline int GetVersionNumber() const
00308     { return Version_; };
00309
00310     inline bool IsPlanar() const
00311     { return (! InterleavedDataOrder_); };
00312
00313     inline bool IsInterleaved() const
00314     { return (InterleavedDataOrder_); };
00315
00316     friend BIASImageBase_EXPORT
00317       std::ostream& operator<<(std::ostream& os, const ImageBase &img);
00318     friend BIASImageBase_EXPORT
00319       std::istream& operator>>(std::istream& is, ImageBase& img);
00320
00321     //@}
00322
00323
00324     /** @name Set functions
00325     @{
00326     */
00327     inline void SetColorModel(EColorModel Model)
00328     { ColorModel_ = Model; };
00329
00330     inline void SetInterleaved(bool interleaved)
00331     { InterleavedDataOrder_=interleaved;UpdateImageDataArrayFromImageData_();};
00332
00333     /// needed by ImageIO
00334     inline void SetBitDepth(unsigned bitdepth)
00335     { BIASASSERT(bitdepth<=(8*Depth_)); BitDepth_=bitdepth; };
00336
00337     inline void SetUID(const BIAS::UUID& id)
00338     { _UID = id; };
00339
00340     /** @brief sets the image's uid to invalid */
00341     inline void InvalidateUID()
00342     { _UID.Invalidate(); };
00343
00344     //@}
00345
00346
00347     /** @name Region of Interest Functions
00348     Important: the ROI has a size of (lrx-ulx)*(lry-uly) that means
00349     the lower right point is not part of the ROI!
00350     @{
00351     */
00352
00353     /** Returns a pointer to the roi object.
00354     @author woelk 07/2005 */
00355     inline ROI* GetROI()
00356     { return &Roi_; }
00357
00358     inline const ROI* GetROI() const
00359     { return &Roi_; }
00360
00361     /** @brief deprecated, use SetROICorners()  */
00362     int SetROI(unsigned int UpperLeftX, unsigned int UpperLeftY,
00363       unsigned int LowerRightX, unsigned int LowerRightY);
00364     int SetROICorners(unsigned int UpperLeftX, unsigned int UpperLeftY,
00365       unsigned int LowerRightX, unsigned int LowerRightY);
00366
00367
00368     /** @brief deprecated, use GetROI()->UnsetROI() */
00369     void UnsetROI();
00370
00371     /** @brief deprecated, use GetROICorners() */
00372     void GetROI(unsigned int& UpperLeftX, unsigned int& UpperLeftY,
00373       unsigned int& LowerRightX, unsigned int& LowerRightY) const;
00374     /** @brief deprecated, use GetROICorners() */
00375     void GetROI(int& UpperLeftX, int& UpperLeftY,
00376       int& LowerRightX, int& LowerRightY) const;
00377
00378     /** access region of interest rectangle JW */
00379     void GetROICorners(unsigned int& UpperLeftX, unsigned int& UpperLeftY,
00380       unsigned int& LowerRightX, unsigned int& LowerRightY) const;
00381     /** access region of interest rectangle JW */
00382     void GetROICorners(int& UpperLeftX, int& UpperLeftY,
00383       int& LowerRightX, int& LowerRightY) const;
00384
00385     /** @brief deprecated, use 'os << *GetROI()' */
00386     void PrintROI(std::ostream& os=std::cout) const;
00387
00388     /** @brief returns a copy of ROI (a new image) lower right point excluded,
00389     only interleaved images !
00390     @author Felix Woelk, grest
00391     @status untested **/
00392     int GetCopyOfROI(ImageBase& copy) const;
00393
00394     /** @brief like GetCopyOfROI, but with lower right point included
00395     only interleaved images !
00396     @note GetCopyOfROI returns an image where the lower right ROI point
00397     is not included. This version does it. Correction are not made in
00398     the original method, because extensive corrections would become
00399     necessary in other methods.
00400     @author Ingo Thomsen  **/
00401     int GetCopyOfROI2(ImageBase& copy) const;
00402
00403
00404     /** @brief paste Image to current ROI
00405     @author Felix Woelk 02 2003 **/
00406     int Paste2ROI(const ImageBase& Image);
00407
00408     /** @brief reduces image to current ROI,
00409     !!! image size changes !!!
00410     @author Felix Woelk
00411     @status untested
00412     @todo Make it work on colored Images **/
00413     int Cut2ROI();
00414
00415     /** @brief sets all pixel not in ROI to zero
00416     @author woelk 10/2004 */
00417     void SetOutsideROIZero();
00418
00419     inline const bool IsInROI(double &x, double& y) const {
00420       return Roi_.IsInROI(x,y);
00421     }
00422
00423     /// deprecated, use GetROI()->GetCorners()
00424     const unsigned int GetROIUpperLeftX() const ;
00425
00426     /// deprecated, use GetROI()->GetCorners()
00427     const unsigned int GetROIUpperLeftY() const;
00428
00429     /// deprecated, use GetROI()->GetCorners()
00430     const unsigned int GetROILowerRightX() const;
00431
00432     /// deprecated, use GetROI()->GetCorners()
00433     const unsigned int GetROILowerRightY() const;
00434
00435     //@}
00436
00437     /** @name Operators
00438     @{
00439     */
00440     /** @brief assignment operator,
00441     allocates memory structure via Init only if necessary
00442     @author Felix Woelk **/
00443     ImageBase& operator=(const ImageBase& Source);
00444
00445     /** @brief comparison operator,
00446     based upon the adresses of the actual image data
00447     @author Ingo Thomsen
00448     @status tested **/
00449     inline bool operator== (const ImageBase &img)
00450     { return (GetImageData() == img.GetImageData()); }
00451
00452     ///@}
00453
00454
00455     /** @name Padding and Appending
00456     @{
00457     */
00458
00459     /** @brief flips the image vertically (row order is inverted)
00460     In place function
00461     return 0 in case of success, -1 otherwise
00462     @author Daniel Grest
00463     @date Jun 2002
00464     @status Interleaved tested, planar untested
00465     Aug 2002: Jan-Friso Evers: fixed interleaved for float and other */
00466     int Flip();
00467
00468     /** @brief flips the image horizontal (column order is inverted)
00469     In place function
00470     return 0 in case of success, -1 otherwise
00471     @author woelk 10/2004 */
00472     int FlipHorizontal();
00473
00474     /* enlarge image size keeping old pixel data 1:1
00475     Fill new pixel with padVal which may be zero (for black).
00476     @author Jan Woetzel */
00477     int Pad(BIAS::ImageBase & dest,
00478       const unsigned int & newwidth,
00479       const unsigned int & newheight,
00480       const int & padVal=0) const;
00481
00482     /* in place Padding @author Jan Woetzel */
00483     int Pad(const unsigned int & newwidth,
00484       const unsigned int & newheight,
00485       const int & padVal=0);
00486
00487     /** backward compatibility interface for Pad.
00488     DEPRECATED
00489     @author Jan Woetzel 2005 */
00490     int ZeroPad(const unsigned int newwidth,
00491       const unsigned int newheight,
00492       unsigned char bgcolor=0 );
00493
00494     /** increase the size of this image to next power of two
00495     (e.g. 384x100>512x128)
00496     the original image S is set to upper left rectangle
00497     @param padVal used by memset to pad the right and lower added pixels
00498     No scale, just padding!
00499     \verbatim
00500     orig xx
00501     xxxxxxx
00502     \endverbatim
00503     @author Jan Woetzel 09/2003 - 11/2005 */
00504     int PadToPowerOfTwo(BIAS::ImageBase & dest,  const int & padVal=0 ) const;
00505
00506     /// in place version of the above  @author JW
00507     int PadToPowerOfTwo(const int & padVal=0);
00508
00509
00510     /** first pad, then flip.
00511     useful for OpenGL texture image which must be pow2 size and
00512     Y-flipped ics.
00513     example:
00514     \verbatim
00515     0 1 2
00516     3 4 5
00517     -->
00518     x x x x
00519     x x x x
00520     3 4 5 x
00521     0 1 2 x
00522     \endverbatim
00523     \todo  more efficient in place with memmove
00524     @author Jan Woetzel */
00525     int PadToPowerOfTwoAndFlip(const int & padVal=0);
00526
00527     /// @}
00528
00529
00530     /** @name Misc functions
00531     @{ */
00532
00533
00534     /** @brief checks if data area has same "size" as Image of other type
00535     */
00536     inline bool SamePixelAndChannelCount(const ImageBase& Image) const;
00537
00538     /** @brief Releases ImageData_
00539     (to be used together with RedirectImageDataPointer)
00540     @author Felix woelk */
00541     inline void ReleaseImageDataPointer();
00542
00543     /**  @brief This method takes data and set the internal
00544     image data pointer to this.
00545
00546     You should really know what you are doing using this method.
00547     Don't say you haven't been warned.
00548     @author Friso Evers **/
00549     inline void RedirectImageDataPointer(void *data)
00550     {
00551       ImageData_ = data;
00552       UpdateImageDataArrayFromImageData_();
00553     };
00554
00555
00556     /** @brief set data pointer to NULL, such that image IsEmpty
00557     _without_ deletion of data.
00558     @author evers
00559     */
00560     inline void ClearDataPointer()
00561     { ImageData_ = NULL; delete[] ImageDataArray_; ImageDataArray_ = NULL;}
00562
00563
00564     /** @return true if image size is a power of two JW */
00565     bool IsPowerOfTwoSize() const;
00566     static bool IsPowerOfTwoSize(const unsigned int w,  const unsigned int h);
00567
00568
00569     /** @return next pow2 >= val  JW */
00570     static unsigned int PowerOfTwoSize(const unsigned int & val);
00571
00572
00573     /** @return true if both, width and height are already a power of two.
00574     The next power of two size >= actual size is computed and stored
00575     in args.
00576     useful for OpenGL texture enlargement for 'power of two' textures.
00577     @author Jan Woetzel 09/2003 */
00578     bool PowerOfTwoSize(unsigned int & width2, unsigned int & height2) const;
00579
00580     void *PixelValueBase(unsigned x, unsigned y, unsigned channel=0);
00581
00582     void PrintHeader(std::ostream& os=std::cout) const;
00583
00584     /// zeroes the image
00585     inline void SetZero();
00586
00587     /** @brief check if image contains that pixel position */
00588     inline bool IsPositionInImage(const int& x, const int& y) const;
00589
00590     /** @brief find closest valid pixel position to x,y
00591     @author koeser 01/2005
00592     @return 0=was correct 3,4=y out of range, 1,2 x out of range  */
00593     inline int MoveToClosestPositionInImage(int& x, int& y) const;
00594
00595     /** get the size in Byte of the type corresponding to a storagetype
00596     Useful for allocation calculations.
00597     @author Jan Woetzel */
00598     static int GetSize(const enum BIAS::ImageBase::EStorageType & storagetype);
00599
00600     /** get the number of channels corresponding to the enum ColorModel
00601     Useful for allocation calculations.
00602     @author Jan Woetzel */
00603     static int GetChannelcount(const enum BIAS::ImageBase::EColorModel & colormodel);
00604
00605     /// OpenCV onscreen popup display, very usefula for fast debugging. (JW)
00606 #ifdef BIAS_HAVE_OPENCV
00607
00608     /** display image as popup to screnn sing OpenCv IplImage usign Highgui functions.
00609     Very useful to easily display in aimge, e.g. for debugging.
00610     @param waitForKey if true delaMsec is waited for keypres. 0=forever.
00611     @param delayMsec if waitForKey is true wait for key with 0=forever, see cvWaitkey.
00612     @return pressed key (if any)
00613     @author Jan Woetzel 2005 */
00614     int Display(
00615       const std::string & DestWin,
00616       const bool & autoresize,
00617       const bool & moveToTopLeft,
00618       const bool & waitForKey,
00619       const unsigned int & delayMsec,
00620       const float &scale=DEFAULT_32to8_scale );
00621
00622     /** interface for the above  @author Jan Woetzel 2005 */
00623     int Display(
00624       const bool & waitForKey,
00625       const unsigned int & delayMsec=DEFAULT_Display_delay,
00626       const float &scale=DEFAULT_32to8_scale );
00627
00628     /** @brief display image simple signature interface for Debugger usage
00629     This function can be used to display an (intermediate) image
00630     "interactively" with the MS Visual Studio Debugger
00631     in "Watch+Debug" expert mode.
00632     This signature is required because MSVS debugger
00633     does not support default params.
00634     @author Jan Woetzel */
00635     int Display();
00636
00637 #endif // BIAS_HAVE_OPENCV
00638
00639     // @}
00640
00641   protected:
00642     /** @brief recomputes pointer array returned by GetImageDataArray */
00643     int UpdateImageDataArrayFromImageData_();
00644
00645
00646     // ---------------------------------------
00647     // --- data members:
00648     // ---------------------------------------
00649
00650     /// version number of imagebase class
00651     static const int Version_ =  VERSION_NUMBER;
00652     /// the color model of the pixels
00653     enum EColorModel ColorModel_;
00654     /// the storage type in a pixel channel
00655     enum EStorageType StorageType_;
00656     /// number of channels per pixel
00657     unsigned int ChannelCount_;
00658     /// size of one channel of one pixel in bytes
00659     unsigned int Depth_;
00660     /// relevant bits per pixel per channel
00661     unsigned int BitDepth_;
00662     /// image width in pixels
00663     unsigned int Width_;
00664     /// image height in pixels
00665     unsigned int Height_;
00666     /// planar or interleaved: planar means we have several image planes,
00667     /// e.g. for a 3x3 RGB image data is RRRRRRRRRGGGGGGGGGGBBBBBBBB
00668     /// while interleaved means RGBRGBRGBRGBRGBRGBRGBRGBRGB
00669     bool InterleavedDataOrder_;
00670     /// size of a line in bytes for interleaved, NOT nr . of pixels (but size a line in one plane for planar)
00671     unsigned int WidthStep_;
00672     /// array of pointers to the first byte in an image row
00673     void** ImageDataArray_;
00674     /// a pointer to the image data
00675     void* ImageData_;
00676     /// unique id for every image
00677     BIAS::UUID _UID;
00678     /// additional data block, handled by derived classes
00679     MetaData _MetaData;
00680     /// roi object
00681     ROI Roi_;
00682
00683   }; // end of class
00684
00685   //// fixes for building dlls
00686   BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const ImageBase::EStorageType &st);
00687   BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const ImageBase::EColorModel  &st);
00688   BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const ImageBase &img);
00689   BIASImageBase_EXPORT std::istream& operator>>(std::istream& is, ImageBase& img);
00690
00691 #include "ImageBaseInline.hh"
00692
00693 } // end namespace
00694
00695 #endif // _IMAGE_BASE_H_INCLUDED_
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageBaseInline.hh Source File

Base » Image

ImageBaseInline.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #if !defined(_IMAGE_BASE_H_INCLUDED_)
00026 # error do not include ImageBaseInline here.
00027 #endif
00028
00029 //
00030 // Check for valid x and y coordinates (if BIAS_DEBUG is defined)
00031 // In case of error display the functionname
00032 //
00033 #ifdef BIAS_DEBUG
00034 #define CheckCoordinates(x,y,functionname) \
00035   if (x < 0 || x >= GetWidth()) { \
00036     BIASERR("x-coordinate out of range in "<<functionname<<" "<<x); \
00037   } \
00038   if (y < 0 || y >= GetHeight()) { \
00039     BIASERR("y-coordinate out of range in "<<functionname<<" "<<y); \
00040   }
00041 #else
00042 #define CheckCoordinates(x,y,functionname)
00043 #endif
00044
00045
00046 // Check for valid channel nr. in Debug mode. Do nothing in Release
00047 // In case of error display the functionname (JW 09/2003)
00048 #ifdef BIAS_DEBUG
00049 #define CheckChannel(channel,functionname) \
00050   if (channel >= GetChannelCount()) { \
00051     BIASERR("channel"<<channel<<" out of range in "<<functionname); \
00052   }
00053 #else
00054 #define CheckChannel(channel,functionname)
00055 #endif
00056
00057
00058
00059 inline bool ImageBase::SamePixelAndChannelCount(const ImageBase& Image) const {
00060   return ( (GetPixelCount() == Image.GetPixelCount()) &&
00061            (GetChannelCount() == Image.GetChannelCount()) );
00062 }
00063
00064 inline void ImageBase::SetZero()
00065 {
00066   if (!IsEmpty()){
00067     memset(GetImageData(), 0, GetWidthStep()*GetHeight());
00068   }
00069 }
00070
00071 inline void ImageBase::ReleaseImageDataPointer()
00072 {
00073   delete[] (char**)ImageDataArray_;
00074   delete[] (char*)ImageData_;
00075   ImageDataArray_=NULL;
00076   ImageData_=NULL;
00077 }
00078
00079 inline unsigned int
00080 ImageBase::GetPixelPosition(unsigned int x, unsigned int y,
00081                             unsigned short int channel) const
00082 {
00083   CheckCoordinates(x, y, "GetPixelPosition");
00084
00085   if (IsPlanar())
00086     return y*Width_+x+channel*GetPixelCount();
00087   else
00088     return y*Width_*ChannelCount_ +x*(ChannelCount_)+channel;
00089 }
00090
00091 bool ImageBase::IsPositionInImage(const int& x,const int& y) const{
00092   return (x>=0 && x<(int)Width_ && y>=0 && y<(int)Height_);
00093 }
00094
00095 int  ImageBase::MoveToClosestPositionInImage(int& x, int& y) const {
00096 #ifdef BIAS_DEBUG
00097   if (!((Width_>0)&&(Height_>0))) {
00098     BIASERR("Image is not initialiozed correctly: "<<Width_<<"x"<<Height_);
00099     BIASABORT;
00100   }
00101 #endif
00102   int ret = 0;
00103   if (x<0) {
00104     x = 0;
00105     ret = 1;
00106   } else if (x>=(int)Width_) {
00107     x = Width_-1;
00108     ret = 2;
00109   }
00110   if (y<0) {
00111     y = 0;
00112     ret = 3;
00113   } else if (y>=(int)Height_) {
00114     y = Height_-1;
00115     ret = 4;
00116   }
00117   return ret;
00118 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvas.cpp Source File

Gui

ImageCanvas.cpp

Go to the documentation of this file.
00001 #include "ImageCanvas.hh"
00002
00003 #include <Base/Image/ImageConvert.hh>
00004 #include <Gui/StringConv.hh>
00005
00006 #ifdef   WIN32
00007 #include <wx/image.h>
00008 #endif //WIN32
00009
00010 #include <sstream>
00011 #include <iomanip>
00012
00013 using namespace BIAS;
00014 using namespace std;
00015
00016 #define SCROLLBAR_WIDTH 15
00017
00018
00019 ZoomFrame::~ZoomFrame()
00020 {}
00021
00022 ZoomFrame::ZoomFrame(wxWindow* parent, const wxString& title)
00023 : wxFrame(parent, -1, title)
00024 {
00025   Setup();
00026   Show();
00027 }
00028
00029 void ZoomFrame::Setup()
00030 {
00031   int widths[] = { -1, 180 };
00032   CreateStatusBar(2);
00033   SetStatusWidths(2, widths);
00034
00035   QuitButton_ = new wxButton(this, MIA_ZoomQuitButton, wxT("Close"));
00036
00037   Window_ = new ZoomImageCanvas(this, GetStatusBar(), 1);
00038
00039   SLScale_ = new wxSlider(this, -1, 10, 1, 25, wxDefaultPosition,
00040     wxSize(-1, -1), wxSL_HORIZONTAL);
00041
00042   wxBoxSizer *box = new wxBoxSizer(wxVERTICAL);
00043   wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
00044
00045   box->Add(QuitButton_, 0, wxALL | wxGROW, 3);
00046   box->Add(Window_, 1, wxALL | wxGROW, 3);
00047   hbox->Add(new wxStaticText( this, -1, _T("Zoom") ), 0, wxALL, 5);
00048   hbox->Add(SLScale_, 1, wxALL | wxGROW, 5);
00049   box->Add(hbox, 0, wxGROW, 0);
00050
00051   box->SetSizeHints(this);
00052   SetSizer(box);
00053 }
00054
00055 void ZoomFrame::NewImage(BIAS::ImageBase& im,
00056              BIAS::Image<unsigned char>& ucim,
00057              const wxString& name)
00058 {
00059   Window_->NewImage(im, ucim);
00060   SetStatusText(name, 0);
00061 }
00062
00063 void ZoomFrame::NewCoo(unsigned x, unsigned y)
00064 { Window_->NewCoo(x, y); }
00065
00066
00067
00068 BEGIN_EVENT_TABLE (ZoomFrame, wxFrame)
00069 EVT_BUTTON      (MIA_ZoomQuitButton, ZoomFrame::OnQuit)
00070 EVT_SCROLL      (ZoomFrame::OnZoomFactor)
00071 EVT_CLOSE       (ZoomFrame::OnClose)
00072 //EVT_KEY_DOWN    (ZoomFrame::OnKeyPress)
00073 END_EVENT_TABLE()
00074
00075 //void ZoomFrame::OnQuit(wxCommandEvent & event)
00076 void ZoomFrame::OnQuit(wxCommandEvent &)
00077 {
00078   Close(true);
00079 }
00080
00081 //void ZoomFrame::OnClose(wxCloseEvent & event)
00082 void ZoomFrame::OnClose(wxCloseEvent &)
00083 {
00084   ((ImageCanvas*)GetParent())->SetZoomed(false);
00085   Destroy();
00086 }
00087
00088 void ZoomFrame::SetZoom(unsigned z)
00089 {
00090   BIASASSERT(z>=1);
00091   BIASASSERT(z<=25);
00092   SLScale_->SetValue(z);
00093   Window_->NewZoom(SLScale_->GetValue());
00094 }
00095
00096 //void ZoomFrame::OnZoomFactor(wxScrollEvent & event)
00097 void ZoomFrame::OnZoomFactor(wxScrollEvent&)
00098 { Window_->NewZoom(SLScale_->GetValue()); }
00099
00100 // void ZoomFrame::OnKeyPress(wxKeyEvent &event)
00101 // {
00102 //   cerr <<"ZoomFrame::OnKeyPress\n";
00103 //   event.Skip();
00104 // }
00105
00106 ////////////////////////////////////////////////////////////////////
00107
00108 ZoomImageCanvas::ZoomImageCanvas(wxWindow* parent, wxStatusBar *sbar,
00109                  int sbarid, wxWindowID id, const wxPoint& pos,
00110                  const wxSize& size, long style,
00111                  const wxString& name)
00112                  : wxPanel(parent, id, pos, size, style, name)
00113 {
00114   Bitmap_=NULL;
00115
00116   wxbitmap_mutex_ = new pthread_mutex_t;
00117   origim_mutex_ = new pthread_mutex_t;
00118   pthread_mutex_init(wxbitmap_mutex_, NULL);
00119   pthread_mutex_init(origim_mutex_, NULL);
00120
00121   ZoomFactor_=10;
00122   ZoomX_=0;
00123   ZoomY_=0;
00124   SBar_=sbar;
00125   SBarID_=sbarid;
00126   mousex_=mousey_=-1;
00127 }
00128
00129 ZoomImageCanvas::~ZoomImageCanvas()
00130 {
00131   if (wxbitmap_mutex_) delete wxbitmap_mutex_;
00132   if (origim_mutex_) delete origim_mutex_;
00133 }
00134
00135 void ZoomImageCanvas::GetZoomImage()
00136 {
00137 #ifdef WIN32
00138   GetSize(&wwidth_, &wheight_);
00139   ZoomXPos_=wwidth_/2-ZoomFactor_/2;
00140   ZoomYPos_=wheight_/2-ZoomFactor_/2;
00141 #endif //WIN32
00142
00143   if (zim_.GetWidth()!=(unsigned)wwidth_ ||
00144     zim_.GetHeight()!=(unsigned)wheight_)
00145     zim_.Release();
00146   if (zim_.IsEmpty())
00147     zim_.Init(wwidth_, wheight_, 3);
00148
00149   zim_.FillImageWithConstValue((unsigned char)0);
00150   unsigned char **ida = zim_.GetImageDataArray();
00151   unsigned char **sida= ucim_.GetImageDataArray();
00152   int xsize=wwidth_/ZoomFactor_/2+1;
00153   int ysize=wheight_/ZoomFactor_/2+1;
00154   register unsigned int xstart, ystart;
00155   register unsigned char res[3];
00156   unsigned width=ucim_.GetWidth(), height=ucim_.GetHeight();
00157   int mx, my;
00158
00159   //cout << "wwidth/wheight: "<<wwidth_<<"x"<<wheight_<<endl;
00160   //cout << "width/height: "<<width<<"x"<<height<<endl;
00161   //cout << "x "<<(int)ZoomX_-(int)xsize<<" - "<<(int)ZoomX_+(int)xsize<<endl;
00162   //cout << "y "<<(int)ZoomY_-(int)ysize<<" - "<<(int)ZoomY_+(int)ysize<<endl;
00163   for (int x=(int)ZoomX_-(int)xsize; x<=(int)ZoomX_+(int)xsize; x++){
00164     for (int y=(int)ZoomY_-(int)ysize; y<=(int)ZoomY_+(int)ysize; y++){
00165       if (x<0 || y<0 || x>=(int)width || y>=(int)height){
00166         //cout <<"out of src range: "<< x << "x" <<y<<endl;
00167         res[0]=res[1]=res[2]=0;
00168       } else {
00169         mx=3*x;
00170         res[0]=sida[y][mx]; res[1]=sida[y][mx+1]; res[2]=sida[y][mx+2];
00171       }
00172       xstart = (x-(int)ZoomX_)*(int)ZoomFactor_+(int)ZoomXPos_;
00173       ystart = (y-(int)ZoomY_)*(int)ZoomFactor_+(int)ZoomYPos_;
00174       for (register int i=0; i<(int)ZoomFactor_; i++){
00175         for (register int j=0; j<(int)ZoomFactor_; j++){
00176           my=ystart+i; mx=(xstart+j);
00177           if (mx>=0 && my>=0 && mx<wwidth_ && my<wheight_){
00178             mx*=3;
00179             ida[my][mx] = res[0];
00180             ida[my][mx+1] = res[1];
00181             ida[my][mx+2] = res[2];
00182           }
00183         }
00184       }
00185     }
00186   }
00187   BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00188   wximage_ = new wxImage(zim_.GetWidth(), zim_.GetHeight(),
00189     zim_.GetImageData(), true);
00190   BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00191   if (mousex_>=0 && mousey_>=0){
00192     UpdateStatusBar((unsigned) mousex_, (unsigned) mousey_);
00193   }
00194 }
00195
00196 void ZoomImageCanvas::UpdateStatusBar(unsigned x, unsigned y)
00197 {
00198   if (SBar_){
00199     int ix=(int)x-(int)ZoomXPos_, iy=(int)y-(int)ZoomYPos_;
00200     if (ix<0) ix=ix/(int)ZoomFactor_+(int)ZoomX_-1;
00201     else ix=ix/(int)ZoomFactor_+(int)ZoomX_;
00202     if (iy<0) iy=iy/(int)ZoomFactor_+(int)ZoomY_-1;
00203     else iy=iy/(int)ZoomFactor_+(int)ZoomY_;
00204     BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00205     BIAS_MUTEX_LOCK(origim_mutex_);
00206     if (Bitmap_ && ix>=0 && ix<(int)origim_.GetWidth() &&
00207       iy>=0 && iy<(int)origim_.GetHeight() ){
00208         BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00209         int mix;
00210         ostringstream os;
00211         os << "("<<setw(3)<<ix<<", "<<setw(3)<<iy<<") : (";
00212         switch (origim_.GetChannelCount()){
00213     case 1:
00214       if (origim_.GetStorageType()==ImageBase::ST_unsignedchar)
00215         os << (int)((Image<unsigned char>)origim_).GetImageDataArray()[iy][ix];
00216       else if (origim_.GetStorageType()==ImageBase::ST_float)
00217         os << (float)((Image<float>)origim_).GetImageDataArray()[iy][ix];
00218       break;
00219     case 3:
00220       mix=ix*3;
00221       if (origim_.GetStorageType()==ImageBase::ST_unsignedchar){
00222         os <<(int)
00223           ((Image<unsigned char>)origim_).GetImageDataArray()[iy][mix]
00224           <<", "
00225             <<(int)
00226             ((Image<unsigned char>)origim_).GetImageDataArray()[iy][mix+1]
00227             <<", "
00228               <<(int)
00229               ((Image<unsigned char>)origim_).GetImageDataArray()[iy][mix+2];
00230       } else if (origim_.GetStorageType()==ImageBase::ST_float){
00231         os <<((Image<float>)origim_).GetImageDataArray()[iy][mix]
00232         <<", "
00233           <<((Image<float>)origim_).GetImageDataArray()[iy][mix+1]
00234           <<", "
00235             <<((Image<float>)origim_).GetImageDataArray()[iy][mix+2];
00236       }
00237       break;
00238     default:
00239       BIASERR("???");
00240       break;
00241         }
00242         BIAS_MUTEX_UNLOCK(origim_mutex_);
00243         os <<")";
00244         SBar_->SetStatusText(AsciiToWx(os.str()), SBarID_);
00245       } else {
00246         BIAS_MUTEX_UNLOCK(origim_mutex_);
00247         BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00248         SBar_->SetStatusText(wxT(""), SBarID_);
00249       }
00250   }
00251 }
00252
00253 void ZoomImageCanvas::NewImage(ImageBase& im, Image<unsigned char>& ucim)
00254 {
00255   BIAS_MUTEX_LOCK(origim_mutex_);
00256   origim_ = im;
00257   BIAS_MUTEX_UNLOCK(origim_mutex_);
00258   ucim_ = ucim;
00259   GetZoomImage();
00260 #ifdef WIN32
00261   this->Refresh();
00262 #else
00263   wxPaintEvent pe;
00264   wxPostEvent(this->GetEventHandler(),pe);
00265 #endif
00266 }
00267
00268 void ZoomImageCanvas::NewCoo(unsigned x, unsigned y)
00269 {
00270   if (ZoomX_!=x || ZoomY_!=y){
00271     ZoomX_=x;
00272     ZoomY_=y;
00273     ZoomXPos_=wwidth_/2-ZoomFactor_/2;
00274     ZoomYPos_=wheight_/2-ZoomFactor_/2;
00275     GetZoomImage();
00276 #ifdef WIN32
00277     this->Refresh();
00278 #else
00279     wxPaintEvent pe;
00280     wxPostEvent(this->GetEventHandler(),pe);
00281 #endif
00282   }
00283 }
00284
00285 void ZoomImageCanvas::NewZoom(int zoom)
00286 {
00287   if ((unsigned)zoom!=ZoomFactor_){
00288     ZoomFactor_=zoom;
00289     GetZoomImage();
00290 #ifdef WIN32
00291     this->Refresh();
00292 #else
00293     wxPaintEvent pe;
00294     wxPostEvent(this->GetEventHandler(),pe);
00295 #endif
00296   }
00297 }
00298
00299 BEGIN_EVENT_TABLE (ZoomImageCanvas, wxWindow)
00300 EVT_PAINT       (ZoomImageCanvas::OnPaint)
00301 EVT_MOTION      (ZoomImageCanvas::OnMouseMove)
00302 EVT_RIGHT_DOWN  (ZoomImageCanvas::OnRightMouse)
00303 EVT_LEFT_DOWN   (ZoomImageCanvas::OnLeftMouse)
00304 EVT_CHAR        (ZoomImageCanvas::OnKey)
00305 EVT_SIZE        (ZoomImageCanvas::OnResize)
00306 EVT_LEAVE_WINDOW(ZoomImageCanvas::OnMouseLeave)
00307 END_EVENT_TABLE()
00308
00309 void ZoomImageCanvas::OnRightMouse(wxMouseEvent &event)
00310 {
00311   wxClientDC dc(this);
00312   PrepareDC(dc);
00313   wxPoint pos = event.GetPosition();
00314   int x = dc.DeviceToLogicalX( pos.x );
00315   int y = dc.DeviceToLogicalY( pos.y );
00316   int ix=(x-(int)(wwidth_>>1))/(int)ZoomFactor_+(int)ZoomX_;
00317   int iy=(y-(int)(wheight_>>1))/(int)ZoomFactor_+(int)ZoomY_;
00318   //cerr << "new coo: "<<ix<<", "<<iy; cerr.flush();
00319   NewCoo(ix, iy);
00320   //cerr << " .... finished\n";
00321 }
00322
00323 //void ZoomImageCanvas::OnMouseLeave(wxMouseEvent &event)
00324 void ZoomImageCanvas::OnMouseLeave(wxMouseEvent&)
00325 {
00326   if (SBar_){ SBar_->SetStatusText(wxT(""), SBarID_); }
00327   mousex_=mousey_=-1;
00328 }
00329
00330 void ZoomImageCanvas::OnResize(wxSizeEvent &event)
00331 {
00332   GetSize(&wwidth_, &wheight_);
00333   ZoomXPos_=wwidth_/2-ZoomFactor_/2;
00334   ZoomYPos_=wheight_/2-ZoomFactor_/2;
00335   GetZoomImage();
00336   event.Skip();
00337 #ifdef WIN32
00338   this->Refresh();
00339 #else
00340   wxPaintEvent pe;
00341   wxPostEvent(this->GetEventHandler(),pe);
00342 #endif
00343 }
00344
00345 //void ZoomImageCanvas::OnPaint(wxPaintEvent & event)
00346 void ZoomImageCanvas::OnPaint(wxPaintEvent & )
00347 {
00348   //  wxPanel::OnPaint(event);
00349
00350   wxPaintDC dc(this);
00351   PrepareDC(dc);
00352   BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00353   if (wximage_ && wximage_->Ok()){
00354     if (Bitmap_ != NULL) delete Bitmap_;
00355     Bitmap_ = new wxBitmap(*wximage_);
00356   }
00357   if (Bitmap_ && Bitmap_->Ok() && dc.Ok()) {
00358     if (ClearDrawingContext_) dc.Clear();
00359     dc.DrawBitmap(*Bitmap_, 0, 0);
00360   }
00361   BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00362 }
00363
00364 void ZoomImageCanvas::OnMouseMove(wxMouseEvent &event)
00365 {
00366   wxClientDC dc(this);
00367   PrepareDC(dc);
00368   wxPoint pos = event.GetPosition();
00369   mousex_ = dc.DeviceToLogicalX( pos.x );
00370   mousey_ = dc.DeviceToLogicalY( pos.y );
00371   UpdateStatusBar((unsigned) mousex_, (unsigned) mousey_);
00372 }
00373
00374
00375 void ZoomImageCanvas::OnLeftMouse(wxMouseEvent &event)
00376 {
00377   // pass event through to ImageCanvas which is parent of parent
00378   if (GetParent()){
00379     //  if (GetParent() && GetParent()->GetParent()){
00380     wxClientDC dc(this);
00381     PrepareDC(dc);
00382     wxPoint pos = event.GetPosition();
00383     unsigned int x = dc.DeviceToLogicalX( pos.x );
00384     unsigned int y = dc.DeviceToLogicalY( pos.y );
00385     int ix=(int)x-(int)ZoomXPos_, iy=(int)y-(int)ZoomYPos_;
00386     if (ix<0) ix=ix/(int)ZoomFactor_+(int)ZoomX_-1;
00387     else ix=ix/(int)ZoomFactor_+(int)ZoomX_;
00388     if (iy<0) iy=iy/(int)ZoomFactor_+(int)ZoomY_-1;
00389     else iy=iy/(int)ZoomFactor_+(int)ZoomY_;
00390
00391     wxMouseEvent ke=event;
00392     ke.m_x=ix;
00393     ke.m_y=iy;
00394     wxPostEvent(GetParent()->GetParent()->GetEventHandler(), ke);
00395     //cerr << "passing mouse event at ("<<ix<<", "<<iy
00396     //     <<") from ZoomImageCanvas to ImageCanvas\n";
00397   } else {
00398     BIASERR("no ImageCanvas belonging to ZoomImageCanvas\n");
00399   }
00400   event.Skip();
00401 }
00402
00403
00404 void ZoomImageCanvas::OnKey(wxKeyEvent &event)
00405 {
00406   // pass event through to ImageCanvas which is parent of parent
00407   if (GetParent()){
00408     //  if (GetParent() && GetParent()->GetParent()){
00409     wxClientDC dc(this);
00410     PrepareDC(dc);
00411     wxPoint pos = event.GetPosition();
00412     unsigned int x = dc.DeviceToLogicalX( pos.x );
00413     unsigned int y = dc.DeviceToLogicalY( pos.y );
00414     int ix=(int)x-(int)ZoomXPos_, iy=(int)y-(int)ZoomYPos_;
00415     if (ix<0) ix=ix/(int)ZoomFactor_+(int)ZoomX_-1;
00416     else ix=ix/(int)ZoomFactor_+(int)ZoomX_;
00417     if (iy<0) iy=iy/(int)ZoomFactor_+(int)ZoomY_-1;
00418     else iy=iy/(int)ZoomFactor_+(int)ZoomY_;
00419
00420     wxKeyEvent ke=event;
00421     ke.m_x=ix;
00422     ke.m_y=iy;
00423     ke.m_keyCode=event.GetKeyCode();
00424     wxPostEvent(GetParent()->GetParent()->GetEventHandler(), ke);
00425     // cerr << "passing KEY event at ("<<ix<<", "<<iy
00426     //     <<") from ZoomImageCanvas to ImageCanvas\n";
00427   } else {
00428     BIASERR("no ImageCanvas belonging to ZoomImageCanvas\n");
00429   }
00430   event.Skip();
00431 }
00432
00433 ////////////////////////////////////////////////////////////////////////
00434
00435
00436
00437
00438 ImageCanvas::ImageCanvas(wxWindow* parent, wxStatusBar* sbar, int sbarid,
00439              wxWindowID id, const wxPoint& pos, const wxSize& size,
00440              long style, const wxString& name)
00441              : wxScrolledWindow(parent, id, pos, size, style, name), origim_()
00442 {
00443   Bitmap_=(wxBitmap *)NULL;
00444   wximage_=(wxImage *)NULL;
00445   SBar_=sbar;
00446   SBarID_=sbarid;
00447
00448   wxbitmap_mutex_ = new pthread_mutex_t;
00449   origim_mutex_ = new pthread_mutex_t;
00450   pthread_mutex_init(wxbitmap_mutex_, NULL);
00451   pthread_mutex_init(origim_mutex_, NULL);
00452
00453   Zoomed_=false;
00454   Title_=name;
00455   mousex_=mousey_=-1;
00456   DefaultZoom_=5;
00457   ClearDrawingContext_=true;
00458   ShowScaled_ = false;
00459 }
00460
00461 ImageCanvas::~ImageCanvas()
00462 {
00463   if (wximage_ != NULL) delete wximage_;
00464   if (Bitmap_ != NULL) delete Bitmap_;
00465
00466   if (wxbitmap_mutex_) delete wxbitmap_mutex_;
00467   if (origim_mutex_) delete origim_mutex_;
00468 }
00469
00470 void ImageCanvas::Show(PyramidImage<unsigned char>& pim, string name)
00471 {
00472   Image<unsigned char> im;
00473   pim.GetSingleImage(im);
00474   Show(im, name);
00475 }
00476
00477
00478 void ImageCanvas::Show(BIAS::Image<unsigned char>& im, string name)
00479 {
00480   if (im.GetColorModel()!=ImageBase::CM_RGB){
00481     Image<unsigned char> tmpim;
00482     if (ImageConvert::Convert(im, tmpim, ImageBase::CM_RGB)!=0){
00483       BIASERR("error converting");
00484     }
00485     BIASDOUT(D_IC_IM,"Show(im,name) called Show(im,tmpim,name)");
00486     Show(im, tmpim, name);
00487   } else {
00488     BIASDOUT(D_IC_IM,"Show(im,name) called Show(im,im,name)");
00489     Show(im, im, name);
00490   }
00491 }
00492
00493
00494 void ImageCanvas::Show(BIAS::ImageBase& origim,
00495              BIAS::Image<unsigned char>& scaledrgbim,
00496              std::string name)
00497 {
00498   BIAS_MUTEX_LOCK(origim_mutex_);
00499   BIASDOUT(D_IC_IM,"Adress of origim: "<<&origim);
00500   origim_=origim;
00501   BIAS_MUTEX_UNLOCK(origim_mutex_);
00502   rgbim_=scaledrgbim;
00503   BIASDOUT(D_IC_IM,"Adress of rgbim_: "<<&rgbim_);
00504   width_=origim.GetWidth();
00505   height_=origim.GetHeight();
00506   ImageName_=name;
00507   if(ShowScaled_) {
00508     // adjust virtual size and scrollbars to requested scaled image size
00509     SetVirtualSize(ScaledImageSizeX_, ScaledImageSizeY_);
00510     SetScrollbars(1, 1, ScaledImageSizeX_, ScaledImageSizeY_);
00511   } else {
00512     SetVirtualSize(width_, height_);
00513     SetScrollbars(1, 1, width_, height_);
00514     // workaround: the scrollbars do not dissapear when the size is equal
00515     // to the virtual size
00516     //SetSizeHints(-1, -1, width_+SCROLLBAR_WIDTH, height_+SCROLLBAR_WIDTH);
00517     //SetSizeHints(-1, -1, width_, height_);
00518   }
00519   BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00520   if (wximage_ != NULL) delete wximage_;
00521   wximage_ =new wxImage(rgbim_.GetWidth(), rgbim_.GetHeight(),
00522     rgbim_.GetImageData(), true);
00523   BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00524   if (Zoomed_) {
00525     //BIAS_MUTEX_LOCK(origim_mutex_);
00526     MyZoomWin_->NewImage(origim_, rgbim_, AsciiToWx(ImageName_));
00527     //BIAS_MUTEX_UNLOCK(origim_mutex_);
00528   }
00529   if (mousex_>=0 && mousey_>=0){
00530     UpdateStatusBar((unsigned)mousex_, (unsigned)mousey_);
00531   }
00532 #ifdef WIN32
00533   this->Refresh();
00534 #else
00535   wxPaintEvent pe;
00536   wxPostEvent(this->GetEventHandler(),pe);
00537 #endif
00538 }
00539
00540 void ImageCanvas::Zoom(unsigned x, unsigned y)
00541 {
00542   if (!Zoomed_){
00543     Zoomed_=true;
00544     MyZoomWin_=new ZoomFrame(this, Title_);
00545     //BIAS_MUTEX_LOCK(origim_mutex_);
00546     MyZoomWin_->NewImage(origim_, rgbim_, AsciiToWx(ImageName_));
00547     //BIAS_MUTEX_UNLOCK(origim_mutex_);
00548     MyZoomWin_->SetZoom(DefaultZoom_);
00549   }
00550   if (ShowScaled_) {
00551     MyZoomWin_->NewCoo((int)((float)x * ((float)width_ / (float)ScaledImageSizeX_)),
00552       (int)((float)y *((float)height_/(float)ScaledImageSizeY_)));
00553   }
00554   else MyZoomWin_->NewCoo(x, y);
00555 }
00556
00557 void ImageCanvas::UpdateStatusBar(unsigned x, unsigned y)
00558 {
00559   if (SBar_){
00560     BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00561     if (Bitmap_ && (x>0) && (x<width_) && (y>0) & (y<height_)){
00562       BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00563       ostringstream os;
00564       os << "("<<setw(3)<<x<<", "<<setw(3)<<y<<") : (";
00565       BIAS_MUTEX_LOCK(origim_mutex_);
00566       switch (origim_.GetChannelCount()){
00567     case 1:
00568       if (origim_.GetStorageType()==ImageBase::ST_unsignedchar)
00569         os << (int)((Image<unsigned char>)origim_).GetImageDataArray()[y][x];
00570       else if (origim_.GetStorageType()==ImageBase::ST_float)
00571         os << (float)((Image<float>)origim_).GetImageDataArray()[y][x];
00572       break;
00573     case 3:
00574       if (origim_.GetStorageType()==ImageBase::ST_unsignedchar){
00575         os <<(int)
00576           ((Image<unsigned char>)origim_).GetImageDataArray()[y][x*3]
00577           <<", "
00578             <<(int)
00579             ((Image<unsigned char>)origim_).GetImageDataArray()[y][x*3+1]
00580             <<", "
00581               <<(int)
00582               ((Image<unsigned char>)origim_).GetImageDataArray()[y][x*3+2];
00583       } else if (origim_.GetStorageType()==ImageBase::ST_float){
00584
00585         os <<((Image<float>)origim_).GetImageDataArray()[y][x*3]
00586         <<", "
00587           <<((Image<float>)origim_).GetImageDataArray()[y][x*3+1]
00588           <<", "
00589             <<((Image<float>)origim_).GetImageDataArray()[y][x*3+2];
00590       }
00591       break;
00592     default:
00593       BIASERR("???");
00594       break;
00595       }
00596       BIAS_MUTEX_UNLOCK(origim_mutex_);
00597       os <<")";
00598       SBar_->SetStatusText(AsciiToWx(os.str()), SBarID_);
00599     } else {
00600       SBar_->SetStatusText(wxT(""), SBarID_);
00601       BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00602     }
00603   }
00604 }
00605
00606 bool ImageCanvas::GetMousePos(int& x, int& y)
00607 {
00608   x= mousex_; y=mousey_;
00609   return ((mousex_>=0) && (mousey_>=0));
00610 }
00611
00612 ///////////////////////////////////////////////////////////
00613
00614 BEGIN_EVENT_TABLE (ImageCanvas, wxScrolledWindow)
00615 EVT_PAINT       (ImageCanvas::OnPaint)
00616 EVT_ERASE_BACKGROUND       (ImageCanvas::OnErase)
00617 EVT_MOTION      (ImageCanvas::OnMouseMove)
00618 EVT_RIGHT_DOWN  (ImageCanvas::OnRightMouseButton)
00619 EVT_LEAVE_WINDOW(ImageCanvas::OnMouseLeave)
00620 //EVT_SIZE        (ImageCanvas::OnSize)
00621 //EVT_KEY_DOWN    (ImageCanvas::OnKeyPress)
00622 END_EVENT_TABLE()
00623
00624 //void ImageCanvas::OnErase(wxEraseEvent& event)
00625 void ImageCanvas::OnErase(wxEraseEvent& )
00626 {
00627 }
00628
00629
00630 void ImageCanvas::OnPaint(wxPaintEvent & event)
00631 {
00632   wxScrolledWindow::OnPaint(event);
00633   wxPaintDC dc(this);
00634
00635   PrepareDC(dc);
00636
00637   int CanvasWidth, CanvasHeight;
00638   GetSize(&CanvasWidth,&CanvasHeight);
00639
00640
00641   BIAS_MUTEX_LOCK(wxbitmap_mutex_);
00642   if (wximage_ && wximage_->Ok()){
00643     if (Bitmap_ != NULL) delete Bitmap_;
00644     if (ShowScaled_)  {
00645       wximage_->Rescale(ScaledImageSizeX_, ScaledImageSizeY_);
00646     }
00647     Bitmap_ = new wxBitmap( *wximage_ );
00648   }
00649
00650   if (Bitmap_ && Bitmap_->Ok() && dc.Ok()) {
00651     // set ClearDrawingContext_ to fals to prevent flickering
00652     if (ClearDrawingContext_) dc.Clear();
00653     dc.DrawBitmap( *Bitmap_, 0, 0 );
00654
00655   }
00656   BIAS_MUTEX_UNLOCK(wxbitmap_mutex_);
00657
00658   //wxPostEvent(this->GetParent()->GetEventHandler(), event);
00659 }
00660
00661 //void ImageCanvas::OnMouseLeave(wxMouseEvent &event)
00662 void ImageCanvas::OnMouseLeave(wxMouseEvent &)
00663 {
00664   if (SBar_) SBar_->SetStatusText(wxT(""), SBarID_);
00665   mousex_=mousey_=-1;
00666 }
00667
00668 void ImageCanvas::OnMouseMove(wxMouseEvent &event)
00669 {
00670   wxClientDC dc(this);
00671   PrepareDC(dc);
00672   if (GetParent()) GetParent()->PrepareDC(dc);
00673   wxPoint pos = event.GetPosition();
00674   mousex_ = dc.DeviceToLogicalX( pos.x );
00675   mousey_ = dc.DeviceToLogicalY( pos.y );
00676
00677   if (ShowScaled_) {
00678     // if we are in scaled mode, correct coordinates by scale !
00679     double h = ScaledImageSizeX_, w = ScaledImageSizeY_;
00680     double ow = origim_.GetWidth(), oh = origim_.GetHeight();
00681     double ratiox = ow/w , ratioy = oh/h;
00682     mousex_ = (int)rint(mousex_ * ratiox);
00683     mousey_ = (int)rint(mousey_ * ratioy);
00684   }
00685   UpdateStatusBar((unsigned)mousex_, (unsigned)mousey_);
00686 }
00687
00688 void ImageCanvas::OnRightMouseButton(wxMouseEvent &event)
00689 {
00690   wxClientDC dc(this);
00691   PrepareDC(dc);
00692   wxPoint pos = event.GetPosition();
00693   unsigned x = (unsigned) dc.DeviceToLogicalX( pos.x );
00694   unsigned y = (unsigned) dc.DeviceToLogicalY( pos.y );
00695   Zoom(x, y);
00696 }
00697
00698 void ImageCanvas::OnSize(wxSizeEvent& event)
00699 {
00700   Fit();
00701   event.Skip();
00702 }
00703
00704 // void ImageCanvas::OnKeyPress(wxKeyEvent &event)
00705 // {
00706 //   cerr <<"ImageCanvas::OnKeyPress\n";
00707 //   event.Skip();
00708 // }
00709
00710
00711 //////////////////////////////////////////////////////////////////////////
00712
00713 #define SLIDER_DIGITS 1000
00714
00715 namespace BIAS {
00716   enum ScaledImageCanvas_IDs {
00717     ID_Scale=1,
00718     ID_Offset
00719   };
00720 }
00721
00722 ScaledImageCanvas::ScaledImageCanvas(wxWindow* parent, wxStatusBar* sbar,
00723                    int sbarid, wxWindowID id,
00724                    const wxPoint& pos, const wxSize& size,
00725                    long style, const wxString& name)
00726                    : wxPanel(parent, id, pos, size, style, name), scaledf_()
00727 {
00728   MiaScWi_ = new ImageCanvas(this, sbar, sbarid, -1, wxDefaultPosition,
00729     wxSize(320, 240), wxHSCROLL | wxVSCROLL, name);
00730   //ScaleSL_ = new wxSlider(this, ID_Scale, 100, 10, 500, wxDefaultPosition,
00731   ScaleSL_ = new wxSlider(this, ID_Scale, 100, 0, SLIDER_DIGITS,
00732     wxDefaultPosition, wxSize(-1, -1), wxSL_HORIZONTAL);
00733   //OffsSL_ = new wxSlider(this, ID_Offset, 0, -100, +100, wxDefaultPosition,
00734   OffsSL_ = new wxSlider(this, ID_Offset, 500, 0, SLIDER_DIGITS,
00735     wxDefaultPosition, wxSize(-1, -1), wxSL_HORIZONTAL);
00736   wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
00737   wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
00738   hbox->Add(new wxStaticText( this, -1, _T("Scale") ), 0, wxALL, 3);
00739   hbox->Add(ScaleSL_, 2, wxALL | wxGROW, 3);
00740   hbox->Add(new wxStaticText( this, -1, _T("Offset") ), 0, wxALL, 3);
00741   hbox->Add(OffsSL_, 1, wxALL | wxGROW, 3);
00742   vbox->Add(MiaScWi_, 1, wxALL | wxGROW, 0);
00743   vbox->Add(hbox, 0, wxGROW, 0);
00744   vbox->SetSizeHints(this);
00745   SetSizer(vbox);
00746   MinScale_ =    1.0;
00747   MaxScale_ =  100.0;
00748   MinOffSet_= -100.0;
00749   MaxOffSet_=  100.0;
00750   p_StatBar=NULL;
00751   AutoadaptScale_ = true;
00752 }
00753
00754
00755 ScaledImageCanvas::~ScaledImageCanvas()
00756 {
00757   if (MiaScWi_) delete MiaScWi_;
00758   if (ScaleSL_) delete ScaleSL_;
00759   if (OffsSL_) delete OffsSL_;
00760 }
00761
00762
00763 void ScaledImageCanvas::SetStatusBarPtr(wxStatusBar* p_sbar){
00764   p_StatBar=p_sbar;
00765 }
00766
00767 void ScaledImageCanvas::SetStatusText(const std::string & s){
00768   if(p_StatBar==NULL){
00769     wxMessageBox( AsciiToWx(string("p_StatBar NULL. " + s)) );
00770     return;
00771   }
00772   BIASASSERT(p_StatBar!=NULL);
00773   p_StatBar->SetStatusText(AsciiToWx(s));
00774 }
00775
00776
00777 void ScaledImageCanvas::Show(ImageBase& im, string name)
00778 {
00779   ImageName_=name;
00780   switch (im.GetStorageType()) {
00781   case ImageBase::ST_float:
00782     origim_=im;
00783     break;
00784     //   case ImageBase::ST_unsignedshortint:
00785   default:
00786     ImageConvert::ConvertST(im, origim_, ImageBase::ST_float);
00787     break;
00788   }
00789   scaledf_=(Image<float>)origim_;
00790   if (AutoadaptScale_) {
00791     double scale=0, shift=0;
00792     scaledf_.CalcScaleShift(0.0, 255.0,scale, shift);
00793     SetOffset(shift);
00794     SetScale(scale);
00795   }
00796   UpdateScaleOffset();
00797 }
00798
00799
00800 void ScaledImageCanvas::Show(PyramidImage<float>& pim, string name)
00801 {
00802   Image<float> im;
00803   pim.GetSingleImage(im);
00804   Show(im, name);
00805 }
00806
00807 int ScaledImageCanvas::SetScale(double c_scale)
00808 {
00809   double scale = c_scale;
00810
00811   if (scale < MinScale_ || scale > MaxScale_){
00812     BIASERR("invalid scale="<<scale <<" exceeds valid range "<<MinScale_<<".."<<MaxScale_<<" clipping.");
00813     if (scale<MinScale_)
00814       scale=MinScale_ ;
00815     if (scale>MaxScale_)
00816       scale=MaxScale_ ;
00817     //return -1;
00818   }
00819   int value=(int)rint((scale-MinScale_)*(double)SLIDER_DIGITS/
00820     (MaxScale_-MinScale_));
00821   BIASASSERT(value>=0);
00822   BIASASSERT(value<=1000);
00823   ScaleSL_->SetValue(value);
00824   UpdateScaleOffset();
00825   return 0;
00826 }
00827
00828 int ScaledImageCanvas::SetOffset(double offset)
00829 {
00830   if (offset < MinOffSet_ || offset > MaxOffSet_){
00831     BIASERR("invalid offset");
00832     return -1;
00833   }
00834   int value=(int)rint((offset-MinOffSet_)*(double)SLIDER_DIGITS/
00835     (MaxOffSet_-MinOffSet_));
00836   BIASASSERT(value>=0);
00837   BIASASSERT(value<=1000);
00838   OffsSL_->SetValue(value);
00839   UpdateScaleOffset();
00840   return 0;
00841 }
00842
00843 void ScaledImageCanvas::UpdateScaleOffset()
00844 {
00845   if (!origim_.IsEmpty()){
00846     scaledf_=(Image<float>)origim_;
00847     double sc=1.0, ofs=0.0;
00848     sc=((double)(ScaleSL_->GetValue())*(MaxScale_-MinScale_)/
00849       (double)SLIDER_DIGITS)+MinScale_;
00850
00851     ofs=((double)(OffsSL_->GetValue())*(MaxOffSet_-MinOffSet_)/
00852       (double)SLIDER_DIGITS)+MinOffSet_;
00853
00854     //cerr << "Scale: "<<sc<<"\tOffset: "<<ofs<<endl;
00855     stringstream ss;
00856     ss<<"scale "<<sc<<" offset: "<<ofs;
00857     //if (p_parent!=NULL) {
00858     //  p_parent->SetStatusText(ss.str().c_str() );
00859     //} else {
00860       cout<<ss.str()<<endl;
00861     //}
00862
00863     scaledf_.ScaleShift(sc, ofs);
00864     scaledf_.BelowThresholdToValue(0.0, 0.0);
00865     scaledf_.AboveThresholdToValue(255.0, 255.0);
00866
00867     float **sida=scaledf_.GetImageDataArray();
00868     float **ida=(float **)origim_.GetImageDataArray();
00869     unsigned w=origim_.GetWidth(), h=origim_.GetHeight();
00870     unsigned int channels =origim_.GetChannelCount();
00871     for (unsigned y=0; y<h; y++) {
00872       for (unsigned x=0; x<w; x++) {
00873         for (unsigned int c=0; c<channels; c++) {
00874           if (ida[y][channels*x+c]==0.0) sida[y][channels*x+c]=0.0;
00875         }
00876       }
00877     }
00878     if (ImageConvert::ConvertST(scaledf_, ucim_,
00879       ImageBase::ST_unsignedchar)!=0){
00880         BIASERR("error converting to unsigned char");
00881       }
00882       if (ucim_.GetColorModel()!=ImageBase::CM_RGB){
00883         ImageConvert::Convert(ucim_, rgbim_, ImageBase::CM_RGB);
00884       } else {
00885         rgbim_=ucim_;
00886       }
00887       MiaScWi_->Show(origim_, rgbim_, ImageName_);
00888
00889       //BIASASSERT(this->SBar_ != NULL);
00890       ss.str("");
00891       ss<<"scale= ";
00892       ss<<sc;
00893       ss<<" offset=";
00894       ss<<ofs;
00895       //MiaScWi_->SBar_->SetStatusText(ss.str(), 0); // SBarID_ );
00896       //     cout<<"DBG "<<ss.str()<<endl;
00897       /// \todo: write ofsfet and scale to StatusText instead of cout (JW)
00898   }
00899 }
00900
00901 ImageCanvas* ScaledImageCanvas::GetImageCanvas(){
00902   return MiaScWi_;
00903 }
00904
00905 BIAS::ImageBase & ScaledImageCanvas::GetOrigimg()
00906 {
00907   return origim_;
00908 }
00909
00910
00911 BEGIN_EVENT_TABLE (ScaledImageCanvas, wxPanel)
00912 EVT_SCROLL(ScaledImageCanvas::OnScaleOffset)
00913 END_EVENT_TABLE()
00914
00915 //void ScaledImageCanvas::OnScaleOffset(wxScrollEvent & event)
00916 void ScaledImageCanvas::OnScaleOffset(wxScrollEvent & )
00917 {
00918   UpdateScaleOffset();
00919 }
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvas.hh Source File

Gui

ImageCanvas.hh

Go to the documentation of this file.
00001 #ifndef __ImageCanvas_hh__
00002 #define __ImageCanvas_hh__
00003
00004 #include <bias_config.h>
00005
00006 #ifndef BIAS_HAVE_WXWINDOWS
00007 #  error BIAS_HAVE_WXWINDOWS not defined but required by ImageCanvas. Please enable BIAS_HAVE_WXWINDOWS in CMake configure step.
00008 #endif
00009
00010 #ifndef BIAS_HAVE_PTHREADS
00011 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::ImageCanvas needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00012 #endif
00013
00014 #include <wx/wx.h>
00015 #include <wx/event.h>
00016 #include <Image/PyramidImage.hh>
00017 #include <Base/Debug/Debug.hh>
00018 #include <pthread.h>
00019
00020 #define D_IC_IM (1<<0)
00021
00022
00023 namespace BIAS{
00024
00025   /** @brief used by ImageCanvas and ScaledImageCanvas, should not be used
00026       directly
00027     \todo Create a common base class for ImageCnvas and ImageCanvasGL and derive both classes from it (JW)
00028       @author woelk */
00029   class BIASGui_EXPORT ZoomImageCanvas : public wxPanel
00030   {
00031   public:
00032     ZoomImageCanvas(wxWindow* parent, wxStatusBar *sbar=NULL, int sbarid=0,
00033                     wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
00034                     const wxSize& size = wxSize(320, 240),
00035                     long style = wxTAB_TRAVERSAL,
00036                     const wxString& name = wxT("ZoomImageCanvas"));
00037     ~ZoomImageCanvas();
00038
00039     void NewImage(BIAS::ImageBase& im, BIAS::Image<unsigned char>& ucim);
00040     void NewCoo(unsigned x, unsigned y);
00041     void NewZoom(int zoom);
00042
00043     inline void SetClearDrawingContext(bool clear)
00044     { ClearDrawingContext_=clear; }
00045
00046   protected:
00047     void UpdateStatusBar(unsigned x, unsigned y);
00048     void GetZoomImage();
00049
00050     void OnResize(wxSizeEvent & event);
00051     void OnPaint(wxPaintEvent & event);
00052     void OnMouseMove(wxMouseEvent &event);
00053     void OnMouseLeave(wxMouseEvent &event);
00054     void OnRightMouse(wxMouseEvent &event);
00055     void OnLeftMouse(wxMouseEvent &event);
00056     void OnKey(wxKeyEvent &event);
00057
00058     wxBitmap *Bitmap_;
00059     wxImage *wximage_;
00060     BIAS::Image<unsigned char> ucim_, zim_;
00061     BIAS::ImageBase origim_;
00062     wxStatusBar *SBar_;
00063     int SBarID_;
00064     // if ClearDrawingContext_=false, the drawing context is not cleared
00065     // before a repaint, this should prevent the flickering
00066     bool ClearDrawingContext_;
00067
00068     unsigned ZoomFactor_, ZoomX_, ZoomY_; // zoom coo, set from NewCoo
00069     // upper left corner of ZoomX_, ZoomY_ in Window_
00070     unsigned ZoomXPos_, ZoomYPos_;
00071     int wwidth_, wheight_; // width & height of Window_
00072     int mousex_, mousey_;
00073
00074     pthread_mutex_t *wxbitmap_mutex_, *origim_mutex_;
00075
00076     DECLARE_EVENT_TABLE()
00077   }; // class ZoomImageCanvas
00078
00079   /** @brief used by ImageCanvas and ScaledImageCanvas, should not be used
00080       directly
00081       @author woelk */
00082   class BIASGui_EXPORT ZoomFrame : public wxFrame
00083   {
00084     enum { MIA_ZoomQuitButton };
00085   public:
00086     ZoomFrame(wxWindow* parent, const wxString& title);
00087     ~ZoomFrame();
00088
00089     void NewImage(BIAS::ImageBase& im, BIAS::Image<unsigned char>& ucim,
00090                   const wxString& name);
00091     void NewCoo(unsigned x, unsigned y);
00092
00093     void SetZoom(unsigned z);
00094
00095   protected:
00096     void Setup();
00097
00098     void OnQuit(wxCommandEvent & event);
00099     void OnClose(wxCloseEvent & event);
00100     void OnZoomFactor(wxScrollEvent & event);
00101     //void OnKeyPress(wxKeyEvent &event);
00102
00103     wxString ImageName_;
00104     wxString Title_;
00105     wxButton *QuitButton_;
00106     ZoomImageCanvas *Window_;
00107     wxSlider *SLScale_;
00108
00109     DECLARE_EVENT_TABLE()
00110   }; // class ZoomFrame
00111
00112
00113   /** @class ImageCanvas
00114       @ingroup g_gui
00115       @brief display image in wx application, provides zoom and investigation
00116        functionality
00117       @author woelk */
00118
00119   class BIASGui_EXPORT ImageCanvas : public wxScrolledWindow , public BIAS::Debug
00120   {
00121   public:
00122     ImageCanvas(wxWindow* parent, wxStatusBar* sbar=NULL,
00123                 int sbarid=0, wxWindowID id = -1,
00124                 const wxPoint& pos = wxDefaultPosition,
00125                 const wxSize& size = wxSize(320, 240),
00126                 long style = wxHSCROLL | wxVSCROLL & wxTRANSPARENT,
00127                 const wxString& name = wxT("ScrolledWindow"));
00128     ~ImageCanvas();
00129
00130
00131     void Show(BIAS::Image<unsigned char>& im, std::string name);
00132     void Show(BIAS::ImageBase& origim, BIAS::Image<unsigned char>& scaledrgbim,
00133               std::string name);
00134     void Show(BIAS::PyramidImage<unsigned char>& pim, std::string name);
00135
00136
00137
00138     // to let user access classic hide/show function
00139     virtual bool Show(bool show=true) {return wxScrolledWindow::Show(show);};
00140
00141     inline void SetZoomed(bool s) { Zoomed_ = s; }
00142     inline BIAS::ImageBase *GetOrigImage() { return &origim_; }
00143
00144     bool GetMousePos(int &x, int &y);
00145
00146     inline void SetDefaultZoom(unsigned z)
00147     { DefaultZoom_=z; }
00148
00149     inline void SetClearDrawingContext(bool clear)
00150     { ClearDrawingContext_=clear; }
00151
00152     inline void SetShowScaled(bool on){ShowScaled_ = on;};
00153     inline bool GetShowScaled(){return ShowScaled_;};
00154
00155     /** Sets the size of the scaled image. Only used if show scaled is on. */
00156     inline void SetScaledImageSize(int width, int height)
00157     {
00158       ScaledImageSizeX_ = width;
00159       ScaledImageSizeY_ = height;
00160     }
00161
00162   protected:
00163     void UpdateStatusBar(unsigned x, unsigned y);
00164     void Zoom(unsigned x, unsigned y);
00165
00166     void OnPaint(wxPaintEvent& event);
00167
00168   void OnErase(wxEraseEvent& event);
00169
00170   void OnSize(wxSizeEvent& event);
00171     void OnMouseMove(wxMouseEvent &event);
00172     void OnMouseLeave(wxMouseEvent &event);
00173     void OnRightMouseButton(wxMouseEvent &event);
00174     //void OnKeyPress(wxKeyEvent &event);
00175
00176     wxBitmap *Bitmap_;
00177     wxImage *wximage_;
00178     wxStatusBar *SBar_;
00179     int SBarID_;
00180     ZoomFrame *MyZoomWin_;
00181     unsigned width_, height_;
00182     int mousex_, mousey_;
00183     bool Zoomed_;
00184     BIAS::ImageBase origim_;
00185     BIAS::Image<unsigned char> rgbim_;
00186
00187     // for scaled-down display
00188     bool ShowScaled_;
00189     int ScaledImageSizeX_,ScaledImageSizeY_;
00190
00191     pthread_mutex_t *wxbitmap_mutex_, *origim_mutex_;
00192
00193     unsigned DefaultZoom_;
00194     // if ClearDrawingContext_=false, the drawing context is not cleared
00195     // before a repaint, this should prevent the flickering
00196     bool ClearDrawingContext_;
00197
00198     std::string ImageName_;
00199     wxString Title_;
00200
00201     DECLARE_EVENT_TABLE()
00202   }; // ImageCanvas
00203
00204
00205   /** @class ScaledImageCanvas
00206       @ingroup g_gui
00207       @brief display float images in wx application, provides zoom, scale,
00208       shift  and investigation functionality
00209       @author woelk */
00210   class BIASGui_EXPORT ScaledImageCanvas : public wxPanel
00211   {
00212   public:
00213     ScaledImageCanvas(wxWindow* parent, wxStatusBar* sbar=NULL,
00214                             int sbarid=0, wxWindowID id = -1,
00215                             const wxPoint& pos = wxDefaultPosition,
00216                             const wxSize& size = wxDefaultSize,
00217                             long style = wxTAB_TRAVERSAL,
00218                             const wxString& name = wxT("ScaledScrolledWindow"));
00219     ~ScaledImageCanvas();
00220
00221     void Show(BIAS::ImageBase& im, std::string name);
00222
00223     void Show(BIAS::PyramidImage<float>& pim, std::string name);
00224
00225     // to let user access classic hide/show function
00226     virtual bool Show(bool show=true) {return MiaScWi_->Show(show);};
00227
00228     inline void SetScaleRange(double min, double max)
00229     { BIASASSERT(max>min); MinScale_=min; MaxScale_=max; }
00230
00231     inline void SetOffsetRange(double min, double max)
00232     { BIASASSERT(max>min); MinOffSet_=min; MaxOffSet_=max; }
00233
00234     int SetScale(double scale);
00235     int SetOffset(double offset);
00236
00237     inline void SetDefaultZoom(unsigned z)
00238     { MiaScWi_->SetDefaultZoom(z); }
00239
00240     /** @return  (pointer) to class member ImageCanvas used for display JW */
00241     ImageCanvas* GetImageCanvas();
00242
00243     /** @return datat image origim_ class member JW */
00244     BIAS::ImageBase & GetOrigimg();
00245
00246     /** pointer to sbar to be used JW */
00247     void SetStatusBarPtr(wxStatusBar* p_sbar);
00248
00249     /** display text to sbar if one is assigned */
00250     void SetStatusText(const std::string & s);
00251
00252     /** recalculate scale and shift for each new frame or not ?*/
00253     void SetAutoadaptScale(const bool b){AutoadaptScale_ = b;}
00254
00255   protected:
00256     void OnScaleOffset(wxScrollEvent & event);
00257     void UpdateScaleOffset();
00258
00259     // data member
00260     ImageCanvas *MiaScWi_; // true data image
00261     wxSlider *ScaleSL_, *OffsSL_;
00262     BIAS::ImageBase origim_;
00263     BIAS::Image<float> scaledf_;
00264     BIAS::Image<unsigned char> rgbim_, ucim_;
00265     std::string ImageName_;
00266     double MinScale_, MaxScale_, MinOffSet_, MaxOffSet_;
00267
00268     // pointer to statusbar to use if any
00269     wxStatusBar * p_StatBar;
00270     bool AutoadaptScale_;
00271     DECLARE_EVENT_TABLE()
00272   }; // ScaledImageCanvas
00273
00274
00275 } // namespace
00276
00277
00278 #endif // __ImageCanvas_hh__
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasEnhanced.cpp Source File

Gui

ImageCanvasEnhanced.cpp

Go to the documentation of this file.
00001 #include "ImageCanvasEnhanced.hh"
00002
00003 #include <Base/Image/ImageConvert.hh>
00004 #include <Base/Image/ImageDraw.hh>
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009
00010
00011 ICECallbackInterface::ICECallbackInterface()
00012 {}
00013
00014 ICECallbackInterface::~ICECallbackInterface()
00015 {}
00016
00017 //void ICECallbackInterface::RectangleSelected(int tl[2], int br[2])
00018 void ICECallbackInterface::RectangleSelected(int[2], int[2])
00019 {
00020   BIASERR("error: function of derived class should be called");
00021 }
00022
00023 /////////////////////////////////////////////////////////////////
00024
00025 ImageCanvasEnhanced::ImageCanvasEnhanced(wxWindow* parent,
00026                                          wxStatusBar* sbar,
00027                                          int sbarid, wxWindowID id,
00028                                          const wxPoint& pos,
00029                                          const wxSize& size,
00030                                          long style,
00031                                          const wxString& name)
00032   : ImageCanvas(parent, sbar, sbarid, id, pos, size, style, name)
00033 {
00034   NumLeftClicks_=0;
00035   SelectRectangle_=false;
00036   CallbackObj_=NULL;
00037   BottomRight_[0]=0;
00038   BottomRight_[1]=0;
00039   TopLeft_[0]=0;
00040   TopLeft_[1]=0;
00041 }
00042
00043 ImageCanvasEnhanced::~ImageCanvasEnhanced()
00044 {}
00045
00046 void ImageCanvasEnhanced::SelectRectangle(ICECallbackInterface& obj)
00047 {
00048   BIAS_MUTEX_LOCK(origim_mutex_);
00049   BIASDOUT(D_IC_IM,"origim_ in SelectRectangle adr: "<<&origim_);
00050   //  BIASDOUT(D_IC_IM,"rgbim_  in SelectRectangle adr: "<<&rgbim_);
00051   BIAS_MUTEX_UNLOCK(origim_mutex_);
00052   NumLeftClicks_=0;
00053   SelectRectangle_=true;
00054   CallbackObj_=&obj;
00055
00056 }
00057
00058
00059 BEGIN_EVENT_TABLE (ImageCanvasEnhanced, ImageCanvas)
00060     EVT_LEFT_DOWN  (ImageCanvasEnhanced::OnLeftMouseButton)
00061     EVT_RIGHT_DOWN  (ImageCanvasEnhanced::OnRightMouseButton)
00062     EVT_MOTION      (ImageCanvasEnhanced::OnMouseMove)
00063     EVT_PAINT       (ImageCanvasEnhanced::OnPaint)
00064 END_EVENT_TABLE()
00065
00066 void ImageCanvasEnhanced::OnLeftMouseButton(wxMouseEvent &event)
00067 {
00068   if (SelectRectangle_){
00069     wxClientDC dc(this);
00070     PrepareDC(dc);
00071     wxPoint pos = event.GetPosition();
00072     unsigned x = (unsigned) dc.DeviceToLogicalX( pos.x );
00073     unsigned y = (unsigned) dc.DeviceToLogicalY( pos.y );
00074     switch (NumLeftClicks_){
00075     case 0:
00076       TopLeft_[0]=x; TopLeft_[1]=y;
00077       NumLeftClicks_++;
00078       break;
00079     case 1:
00080       {
00081         BottomRight_[0]=x; BottomRight_[1]=y;
00082         CallbackObj_->RectangleSelected(TopLeft_, BottomRight_);
00083         SelectRectangle_=false;
00084         CallbackObj_=NULL;
00085         NumLeftClicks_=0;
00086         RefreshDrawIm_();
00087         wxPaintEvent pe;
00088         wxPostEvent(this->GetEventHandler(), pe);
00089       }
00090       break;
00091     default:
00092       BIASERR("something strange happend");
00093       break;
00094     }
00095   } else {
00096     event.Skip();
00097   }
00098 }
00099
00100
00101
00102 void ImageCanvasEnhanced::OnRightMouseButton(wxMouseEvent &event)
00103 {
00104
00105   if (SelectRectangle_){
00106     NumLeftClicks_ = 0;
00107     SelectRectangle_=false;
00108     RefreshDrawIm_();
00109     wxPaintEvent pe;
00110     wxPostEvent(this->GetEventHandler(), pe);
00111   }
00112   else
00113      event.Skip();
00114 }
00115
00116
00117 //void ImageCanvasEnhanced::OnPaint(wxCommandEvent &event){
00118 void ImageCanvasEnhanced::OnPaint(wxPaintEvent &event){
00119
00120     if(NumLeftClicks_==1 && SelectRectangle_)
00121     {
00122        event.Skip();
00123     }
00124     else
00125        event.Skip();
00126 }
00127
00128
00129 void ImageCanvasEnhanced::OnMouseMove(wxMouseEvent &event)
00130 {
00131   if (NumLeftClicks_==1 && SelectRectangle_){
00132     wxClientDC dc(this);
00133     PrepareDC(dc);
00134     wxPoint pos = event.GetPosition();
00135     int x = dc.DeviceToLogicalX( pos.x );
00136     int y = dc.DeviceToLogicalY( pos.y );
00137     BottomRight_[0]=x;
00138     BottomRight_[1]=y;
00139     DrawRectangle_(TopLeft_, BottomRight_);
00140   }
00141   event.Skip();
00142 }
00143
00144
00145
00146 void ImageCanvasEnhanced::DrawRectangle_(int tl[2], int br[2])
00147 {
00148   unsigned char color[]={255, 0, 0};
00149   RefreshDrawIm_();
00150   int tmp;
00151   int mtl[]={tl[0], tl[1]}, mbr[]={br[0], br[1]};
00152
00153   if (mtl[0]>mbr[0]) { tmp=mtl[0]; mtl[0]=mbr[0]; mbr[0]=tmp; }
00154   if (mtl[1]>mbr[1]) { tmp=mtl[1]; mtl[1]=mbr[1]; mbr[1]=tmp; }
00155   ImageDraw<unsigned char>::RectangleCorners(rgbim_, mtl[0], mtl[1], mbr[0],
00156                                              mbr[1], color);
00157   BIASDOUT(D_IC_IM,"Rectangle drawn in Image adr: "<<&rgbim_);
00158   wxPaintEvent pe;
00159   wxPostEvent(this->GetEventHandler(), pe);
00160 }
00161
00162
00163 void ImageCanvasEnhanced::RefreshDrawIm_()
00164 {
00165   Image<unsigned char> tmprgb;
00166   if (origim_.GetColorModel()!=ImageBase::CM_RGB){
00167     if (ImageConvert::Convert(origim_, tmprgb, ImageBase::CM_RGB)!=0){
00168       BIASERR("error converting");
00169     }
00170   } else {
00171     tmprgb=origim_;
00172   }
00173   Show(origim_, tmprgb, ImageName_);
00174 }
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasEnhanced.hh Source File

Gui

ImageCanvasEnhanced.hh

Go to the documentation of this file.
00001 #ifndef __ImageCanvasEnhanced_hh__
00002 #define __ImageCanvasEnhanced_hh__
00003
00004 #include "ImageCanvas.hh"
00005 #include <Gui/StringConv.hh>
00006
00007 namespace BIAS {
00008
00009   /** @class ICECallBackInterface
00010       @ingroup g_gui
00011       @brief callback interface for ImageCanvasExtended
00012
00013       instructions:
00014       derive your class e.g. MyFrame from ICECallBackInterface
00015       and override the method RectangleSelected(...)to react to a finished
00016       selection of a rectangle
00017
00018       also declare a pointer to ImageCanvas Enhanced, e.g.
00019       ImageCanvasEnhanced *_ic;
00020
00021
00022       to select a rectangle then call
00023       _ic->SelectRectangle(*this);
00024       where *this is a reference to a ICECallBackInterface
00025       (if your class is derived from ICECallBackInterface this is *this)
00026
00027       @author woelk 08/2004*/
00028   class BIASGui_EXPORT ICECallbackInterface{
00029   public:
00030     ICECallbackInterface();
00031     virtual ~ICECallbackInterface();
00032     /// this function should be overloaded
00033     virtual void RectangleSelected(int tl[2], int br[2]);
00034   };
00035
00036   /** @class ImageCanvasEnhanced
00037       @ingroup g_gui
00038       @brief provides functionality for selection of rectangle, point, ...
00039
00040
00041
00042       @author woelk 08/2004 */
00043   class BIASGui_EXPORT ImageCanvasEnhanced : public ImageCanvas
00044   {
00045   public:
00046     ImageCanvasEnhanced(wxWindow* parent, wxStatusBar* sbar=NULL,
00047                         int sbarid=0, wxWindowID id = -1,
00048                         const wxPoint& pos = wxDefaultPosition,
00049                         const wxSize& size = wxSize(320, 240),
00050                         long style = wxHSCROLL | wxVSCROLL,
00051                         const wxString& name = AsciiToWx("ScrolledWindow"));
00052     ~ImageCanvasEnhanced();
00053
00054     /** Call SelectRectangle with an object derived from ICECallbackInterface.
00055         The function RectangleSelected() should be overloaded in this object.
00056         After rectangle selection is finished (2 clicks with left mouse,
00057         right button cancels) the function obj.RectangleSelected() is called
00058         with top left (tl) and bottom right (br) coordinates.
00059         @author woelk 08/2004 */
00060     void SelectRectangle(ICECallbackInterface& obj);
00061
00062     void OnLeftMouseButton(wxMouseEvent &event);
00063     void OnMouseMove(wxMouseEvent &event);
00064     void OnRightMouseButton(wxMouseEvent &event);
00065     void OnPaint(wxPaintEvent& event);
00066
00067   protected:
00068     int NumLeftClicks_;
00069     int TopLeft_[2], BottomRight_[2];
00070     bool SelectRectangle_;
00071
00072     ICECallbackInterface *CallbackObj_;
00073
00074     void DrawRectangle_(int tl[2], int br[2]);
00075
00076     void RefreshDrawIm_();
00077
00078     DECLARE_EVENT_TABLE()
00079   }; // class
00080
00081
00082 } // namespace
00083
00084
00085
00086 #endif // __ImageCanvasEnhanced_hh__
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasGLBase.cpp Source File

Gui

ImageCanvasGLBase.cpp

Go to the documentation of this file.
00001 // Jan Woetzel
00002
00003 #include "ImageCanvasGLBase.hh"
00004
00005 #include <Base/Debug/Error.hh>
00006 #include <Base/Debug/DebugSimple.hh>
00007
00008 #include <Base/Image/ImageIO.hh>
00009 #include <Base/Math/Vector2.hh>
00010
00011 #include "GeometryGL.hh"
00012
00013 // -----------------------------------------
00014 using namespace std;
00015 using namespace BIAS;
00016 // -----------------------------------------
00017
00018
00019 ImageCanvasGLBase::~ImageCanvasGLBase()
00020 {}
00021
00022
00023 ImageCanvasGLBase::ImageCanvasGLBase(
00024                                      wxFrame* parent
00025                                      ,wxWindowID id
00026                                      ,const wxPoint& pos
00027                                      ,const wxSize& size
00028                                      ,long style
00029                                      ,const wxString& name
00030                                      ,int* attribList
00031                                      ,const wxPalette& palette )
00032                                      : OpenGLCanvas(parent,id,pos,size,style,name,attribList,palette )
00033 {
00034   //CALLINFO;
00035   InitMembers(); // TODO : really required?
00036 }
00037
00038
00039
00040 ImageCanvasGLBase::ImageCanvasGLBase(
00041                                      wxFrame* parent
00042                                      ,wxGLContext* sharedContext
00043                                      ,wxWindowID id
00044                                      ,const wxPoint& pos
00045                                      ,const wxSize& size
00046                                      ,long style
00047                                      ,const wxString& name
00048                                      ,int* attribList
00049                                      ,const wxPalette& palette )
00050                                      : OpenGLCanvas(parent,sharedContext,id,pos,size,style,name,attribList,palette)
00051 {
00052   //CALLINFO;
00053   InitMembers();
00054 }
00055
00056
00057 void ImageCanvasGLBase::DisplayCalls()
00058 {
00059   // draw a fullscreen quad
00060   // textured with the image
00061   if ((texobj.widthBrutto>0) && (texobj.heightBrutto>0))
00062   {
00063     this->GetViewController().GetInternals().viewport.DisplayGL();
00064     GeometryGL::DisplayQuadTexCoord2DFull(
00065       this->texobj,
00066       false /*additionalFlipY*/ );
00067   }
00068 }
00069
00070
00071 void ImageCanvasGLBase::InitMembers()
00072 {
00073   // call the parent initializing function
00074   OpenGLCanvas::InitMembers();
00075
00076   // set our own additional members:
00077   InterestPoint.Set(0.5, 0.5);
00078   scalefactor=1.0f;
00079 }
00080
00081
00082 void ImageCanvasGLBase::EnableMipMapping(const bool & avoidAliasingByMipmapping)
00083 {
00084   if(avoidAliasingByMipmapping) {
00085     texobj.minificationMode=GL_LINEAR_MIPMAP_LINEAR; // trilinear mipmapping
00086   } else {
00087     texobj.minificationMode=GL_NEAREST; // accept aliasing
00088   };
00089 }
00090
00091
00092 // unique id for OpenGL texture object
00093 GLuint ImageCanvasGLBase::GetTexId() const
00094 {
00095 #ifdef BIAS_DEBUG
00096   if (texobj.id!=0) /* 0 marks unused, currently */
00097     BIASASSERT(glIsTexture(texobj.id));
00098 #endif
00099   return texobj.id;
00100 }
00101
00102
00103 // GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_NV
00104 GLenum ImageCanvasGLBase::GetTexTarget() const
00105 {
00106   // must be pow2 in Base class which has no Cg.
00107   BIASASSERT(texobj.target==GL_TEXTURE_2D);
00108   return texobj.target;
00109 }
00110
00111
00112 // valid texobj for capabilities od this base class?
00113 bool ImageCanvasGLBase::ValidTexobj(const ImgObjGL & t) const
00114 {
00115   if (!glIsTexture(t.id))
00116   {
00117     BIASERR("texture id not valid");
00118     return false;
00119   } else if (t.target!=GL_TEXTURE_2D) {
00120     BIASERR("texture target not valid. ImageCanvasBase can only handle GL_TEXTURE_2D");
00121     return false;
00122   } else if (!ImageBase::IsPowerOfTwoSize(t.widthBrutto,  t.heightBrutto)) {
00123     BIASERR("texture must have (brutto) pow2 size. please pad it yourself. npot is not supporte din Base class.");
00124     return false;
00125   } else if (t.widthBrutto<=1){
00126     BIASERR("texture widthBrutto too small");
00127     return false;
00128   } else if (t.heightBrutto<=1){
00129     BIASERR("texture heightBrutto too small");
00130     return false;
00131   };
00132   // OK
00133   return true;
00134 }
00135
00136
00137 int ImageCanvasGLBase::Set(const ImgObjGL & NewTexobj,
00138                            const std::string & name)
00139 {
00140   this->name = name;
00141   this->SetCurrent();
00142   if (!ValidTexobj(NewTexobj)) {
00143     //BIASERR("texture id not valid");
00144     return -1;
00145   };
00146
00147   // OK
00148   // clear old texobj, first:
00149   if (this->texobj.p_valueImage_SelfAllocated) {
00150     delete this->texobj.p_valueImage;
00151     this->texobj.p_valueImage=NULL;
00152   }
00153   // copy new texobj
00154   this->texobj = NewTexobj;
00155   // we should not deallocate because we didn't allocate and copied instead
00156   this->texobj.p_valueImage_SelfAllocated=false;
00157   this->name = name;
00158
00159   // redisplay because we changed the texture
00160   this->Display();
00161
00162   return 0; // OK
00163 }
00164
00165
00166 int ImageCanvasGLBase::Set(BIAS::ImageBase & img,
00167                            const std::string & name,
00168                            const bool & forcePow2tex,
00169                            const bool & flipY
00170                            )
00171 {
00172   this->name = name;
00173   // void SetCurrent on creation:
00174   if (GetParent()->IsShown()) this->SetCurrent();
00175   texobj.CreateGLTexture(img,
00176     forcePow2tex, // true
00177     flipY, // true
00178     true /* ImmediateCopyData*/
00179     );
00180
00181   // redisplay because we changed the texture
00182   this->Display();
00183
00184   return 0; // OK
00185 }
00186
00187
00188 int ImageCanvasGLBase::SetRECT(BIAS::ImageBase & img,
00189                                const std::string & name,
00190                                const bool & flipY )
00191 {
00192   this->GetTexobj().SetTargetRECT();
00193   return this->Set(img,
00194     name,
00195     false, /* forcePow2tex */
00196     flipY );
00197 }
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImageCanvasGLBase.hh Source File

Gui

ImageCanvasGLBase.hh

Go to the documentation of this file.
00001 #ifndef __ImageCanvasGLBase_hh__
00002 #define __ImageCanvasGLBase_hh__
00003
00004
00005 /** \author Jan Woetzel 01/2003 */
00006
00007 // must be first
00008 #include "biasgl.h"
00009
00010 #include <bias_config.h>
00011
00012 #ifndef BIAS_HAVE_WXWINDOWS
00013 #  error Please recompile BIAS with USE_WXWINDOWS to use this lib.
00014 #endif // BIAS_HAVE_WXWINDOWS
00015
00016 #ifndef BIAS_HAVE_OPENGL
00017 #  error Please recompile BIAS with USE_OPENGL to use this lib.
00018 #endif // BIAS_HAVE_OPENGL
00019
00020 // BIAS
00021 #include <Gui/OpenGLCanvas.hh>
00022 #include <Gui/ImgObjGL.hh>
00023
00024 // STD
00025 #include <string>
00026
00027 //#include <Base/Image/Image.hh>
00028 #include <Base/Image/ImageBase.hh>
00029
00030
00031
00032
00033 /**
00034 @class ImageCanvasGLBase
00035 @ingroup g_gui
00036 @brief 2D image display canvas using OpenGL rendering internally.
00037
00038 Thus zooming, interpolation etc is easy and very fast.
00039 In particular useful if you use shared contexts to display OPenGL Image (ids).
00040 This class should not have extended dependencies.
00041 Use The CG Version to display non power of two textures bceause you need a shder for display.
00042
00043 An OpenGL texture (id) is displayed.
00044 This can be created by feeding in a BIAS image, the "value" image.
00045
00046 Thus the true values from "valueimage" are displayed even with fewer bit depth display.
00047 \author Jan Woetzel */
00048 namespace BIAS {
00049   class BIASGui_EXPORT ImageCanvasGLBase : public BIAS::OpenGLCanvas
00050   {
00051   public:
00052     virtual ~ImageCanvasGLBase(); ///< destructor
00053
00054     // ctors
00055     ImageCanvasGLBase(
00056       wxFrame* parent
00057       ,wxWindowID id = -1
00058       ,const wxPoint& pos = wxDefaultPosition
00059       ,const wxSize& size = wxDefaultSize
00060       ,long style = 0
00061       ,const wxString& name = AsciiToWx("ImageCanvasGLBase")
00062       ,int* attribList = NULL
00063       ,const wxPalette& palette = wxNullPalette );
00064
00065     ///
00066     /// constructor using a shared context
00067     ImageCanvasGLBase(
00068       wxFrame* parent
00069       ,wxGLContext* sharedContext = NULL
00070       ,wxWindowID id = -1
00071       ,const wxPoint& pos = wxDefaultPosition
00072       ,const wxSize& size = wxDefaultSize
00073       ,long style=0
00074       ,const wxString& name=AsciiToWx("ImageCanvasGLBase")
00075       ,int* attribList = 0
00076       ,const wxPalette& palette = wxNullPalette );
00077
00078     virtual void DisplayCalls();
00079
00080     virtual void InitMembers();
00081
00082     // unique id for OpenGL texture object
00083     GLuint GetTexId() const;
00084
00085     // GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_NV
00086     GLenum GetTexTarget() const;
00087
00088     bool ValidTexobj(const ImgObjGL & t) const;
00089
00090     /** feed in an existing, possibly shared, GL texture obj for display
00091     note: it is *no* good idea  to call thsi method Show because it conflicts with WX::Show(bool) (JW) */
00092     int Set(const ImgObjGL & NewTexobj,
00093       const std::string & name=std::string("ImgObjGL") );
00094
00095     int Set(
00096       BIAS::ImageBase & img,
00097       //BIAS::Image<unsigned char>& img,
00098       const std::string & name=std::string("Image<unsigned char>"),
00099       const bool & forcePow2tex=true,
00100       const bool & flipY=true
00101       );
00102
00103     /** sets imaeg as a RECT texture JW */
00104     int SetRECT(
00105       BIAS::ImageBase & img,
00106       //BIAS::Image<unsigned char>& img,
00107       const std::string & name=std::string("RECT Image<unsigned char>"),
00108       const bool & flipY=true
00109       );
00110
00111
00112     //int Set(BIAS::ImageBase& img, const std::string & name=std::string("ImageBase"));
00113
00114
00115     //void CreateTexObjFromValueImage_andBind();
00116
00117     ImgObjGL GetTexobj() const {return texobj;};
00118     ImgObjGL & GetTexobj() {return texobj;};
00119
00120     /** set to true for prettier OpenGL texture mipmapping display (which costs performance) JW */
00121     void EnableMipMapping(const bool & avoidAliasingByMipmapping=true);
00122
00123
00124
00125   protected:
00126     // OpenGL texture really used for display:
00127     // textraget must be GL_TEXTURE_2D in this Base class
00128     // because a shader is required to display a GL_TEXTURE_RECTANGLE_NV
00129     // look for a derived class adding Cg shaders to use rectangle textures without padding them to pow2.
00130     // holds all gl specific texture information
00131     BIAS::ImgObjGL texobj;
00132
00133     // name identifier
00134     std::string name;
00135
00136     // 0..1 (Orig) coordinate of an interest point used to determine a zoom region
00137     BIAS::Vector2<float> InterestPoint;
00138     // scale factor for zoom, >1 to zoom in
00139     float scalefactor;
00140
00141     //DECLARE_EVENT_TABLE();
00142   }; // ImageCanvasGL
00143
00144 } // namespace BIAS
00145
00146 #endif
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvert.cpp Source File

Base » Image

ImageConvert.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ImageConvert.hh"
00026
00027 #include <iostream>
00028
00029 #include "ToPlanar.cpp"
00030 #include "ToInterleaved.cpp"
00031 #include "ToHSV.cpp"
00032 #include "ToHSL.cpp"
00033
00034 using namespace std;
00035 using namespace BIAS;
00036
00037
00038 #ifdef BIAS_HAVE_DV
00039 dv_decoder_t *ImageConvert::DVDecoder_ = NULL;
00040 #endif
00041
00042
00043
00044 //#include <Base/Common/BIASpragma.hh>
00045
00046
00047 //
00048 //
00049 // macros - replacement for CALLFUNC, complete rewrite Jan Woetzel 05/2006
00050 //
00051
00052 /// one of the elemenatry switch case statements
00053 /// @author Jan Woetzel
00054 #define SWIC(biasTypeEnum, cpptype, callfunc, src, dst) \
00055 case ImageBase::biasTypeEnum :\
00056 {\
00057   Image< cpptype > typedImg, destImg;\
00058   typedImg.StealImage(src);\
00059   callfunc(typedImg, destImg);\
00060   src.StealImage(typedImg);\
00061   dst.StealImage(destImg);\
00062 }\
00063   break;
00064
00065
00066 // use only those case whose instances are compiled
00067 // create one macro for each type, use dby CALLFUNC macro
00068 // @author Jan Woetzel 05/2006
00069
00070 // always compiled
00071 #define CASE_UCHAR(func, src, dst)   SWIC(ST_unsignedchar, unsigned char, func, src, dst)
00072 #define CASE_FLOAT(func, src, dst)   SWIC(ST_float,         float,         func, src, dst)
00073
00074 // compiled iff option enabled vias bias_config.h
00075 #ifdef BUILD_IMAGE_CHAR
00076 #  define CASE_CHAR(func, src, dst)  SWIC(ST_char, char, func, src, dst)
00077 #else
00078 #  define CASE_CHAR(func, src, dst)
00079 #endif
00080
00081 #ifdef BUILD_IMAGE_SHORT
00082 #  define CASE_SHORT(func, src, dst)  SWIC(ST_shortint, short int, func, src, dst)
00083 #else
00084 #  define CASE_SHORT(func, src, dst)
00085 #endif
00086
00087 #ifdef BUILD_IMAGE_USHORT
00088 #  define CASE_USHORT(func, src, dst)  SWIC(ST_unsignedshortint, unsigned short int, func, src, dst)
00089 #else
00090 #  define CASE_USHORT(func, src, dst)
00091 #endif
00092
00093 #ifdef BUILD_IMAGE_INT
00094 #  define CASE_INT(func, src, dst)  SWIC(ST_int, int, func, src, dst)
00095 #else
00096 #  define CASE_INT(func, src, dst)
00097 #endif
00098
00099 #ifdef BUILD_IMAGE_UINT
00100 #  define CASE_UINT(func, src, dst)  SWIC(ST_unsignedint, unsigned int, func, src, dst)
00101 #else
00102 #  define CASE_UINT(func, src, dst)
00103 #endif
00104
00105 #ifdef BUILD_IMAGE_DOUBLE
00106 #  define CASE_DOUBLE(func, src, dst)  SWIC(ST_double, double, func, src, dst)
00107 #else
00108 #  define CASE_DOUBLE(func, src, dst)
00109 #endif
00110
00111
00112 ///
00113 /// creates all switch cases given a function
00114 /// no pretty implementation but backward compatible to old macro JW
00115 #define CALLFUNC(afunc,source,dest) \
00116   CASE_UCHAR (afunc,source,dest) \
00117   CASE_FLOAT (afunc,source,dest) \
00118   CASE_CHAR  (afunc,source,dest) \
00119   CASE_SHORT (afunc,source,dest) \
00120   CASE_USHORT(afunc,source,dest) \
00121   CASE_INT   (afunc,source,dest) \
00122   CASE_UINT  (afunc,source,dest) \
00123   CASE_DOUBLE(afunc,source,dest)
00124
00125 //
00126 // end of macros
00127 //
00128
00129
00130 // ----- implementation -----
00131
00132 int ImageConvert::Convert(ImageBase &source, ImageBase &dest,
00133                           enum ImageBase::EColorModel targetColorModel,
00134                           bool bPlanar)
00135 {
00136   if ( (dest.GetStorageType()!=ImageBase::ST_invalid) &&
00137     (dest.GetStorageType()!=source.GetStorageType()) ) {
00138       BIASERR("color model conversion cannot convert image from StorageType "
00139         <<source.GetStorageType()<<" to an image with StorageType "
00140         <<dest.GetStorageType());
00141       return -1;
00142     }
00143
00144     if (source==dest) { ///////////// call the In-Place function
00145       if (source.GetColorModel()!=targetColorModel)
00146         switch (targetColorModel)
00147       {
00148         case ImageBase::CM_Grey:
00149           switch (source.GetStorageType())
00150           {
00151             //CALLFUNC_IP(IP_ToGrey,source);
00152             // >> start of former CALLFUNC_IP jw
00153           case ImageBase::ST_unsignedchar:
00154             {
00155               Image<unsigned char> ucImg;
00156               ucImg.StealImage(source);
00157               IP_ToGrey(ucImg);
00158               source.StealImage(ucImg);
00159             }
00160             break;
00161           case ImageBase::ST_float:
00162             {
00163               Image<float> fImg;
00164               fImg.StealImage(source);
00165               IP_ToGrey(fImg);
00166               source.StealImage(fImg);
00167             }
00168             break;
00169 #ifdef BUILD_IMAGE_CHAR
00170           case ImageBase::ST_char:
00171             {
00172               Image<char> cImg;
00173               cImg.StealImage(source);
00174               IP_ToGrey(cImg);
00175               source.StealImage(cImg);
00176             }
00177             break;
00178 #endif // BUILD_IMAGE_CHAR
00179 #ifdef BUILD_IMAGE_SHORT
00180           case ImageBase::ST_shortint:
00181             {
00182               Image<short int> sImg;
00183               sImg.StealImage(source);
00184               IP_ToGrey(sImg);
00185               source.StealImage(sImg);
00186             }
00187             break;
00188 #endif // BUILD_IMAGE_SHORT
00189 #ifdef BUILD_IMAGE_USHORT
00190           case ImageBase::ST_unsignedshortint:
00191             {
00192               Image<unsigned short int> usImg;
00193               usImg.StealImage(source);
00194               IP_ToGrey(usImg);
00195               source.StealImage(usImg);
00196             }
00197             break;
00198 #endif // BUILD_IMAGE_USHORT
00199 #ifdef BUILD_IMAGE_INT
00200           case ImageBase::ST_int:
00201             {
00202               Image<int> iImg;
00203               iImg.StealImage(source);
00204               IP_ToGrey(iImg);
00205               source.StealImage(iImg);
00206             }
00207             break;
00208 #endif // BUILD_IMAGE_INT
00209 #ifdef BUILD_IMAGE_UINT
00210           case ImageBase::ST_unsignedint:
00211             {
00212               Image<unsigned int> uiImg;
00213               uiImg.StealImage(source);
00214               IP_ToGrey(uiImg);
00215               source.StealImage(uiImg);
00216             }
00217             break;
00218 #endif // BUILD_IMAGE_UINT
00219 #ifdef BUILD_IMAGE_DOUBLE
00220           case ImageBase::ST_double:
00221             {
00222               Image<double> dImg;
00223               dImg.StealImage(source);
00224               IP_ToGrey(dImg);
00225               source.StealImage(dImg);
00226             }
00227             break;
00228 #endif // BUILD_IMAGE_DOUBLE
00229             // << end of former CALLFUNC_IP jw
00230
00231           default:
00232             BIASERR("invalid storage type in source image");
00233             return -2;
00234           }
00235           break;
00236         default:
00237           BIASERR("no In-Place-conversion for sourceColorModel:"<<
00238             source.GetColorModel()<<
00239             " to targetColorModel:"<<targetColorModel<< endl<<
00240             "can only In-Place-convert to CM_Grey");
00241           return -3;
00242       }
00243
00244       if (source.IsPlanar() != bPlanar) {
00245         ImageBase destImgBase;
00246         if (source.IsPlanar()) {
00247           switch (source.GetStorageType()) {
00248             CALLFUNC(ToInterleaved,source,destImgBase);
00249         default:
00250           BIASERR("invalid storage type in source image");
00251           return -2;
00252           }
00253         } else { // it is interleaved
00254           switch (source.GetStorageType()) {
00255             CALLFUNC(ToPlanar,source,destImgBase);
00256         default:
00257           BIASERR("invalid storage type in source image");
00258           return -2;
00259           }
00260         }
00261         source.StealImage(destImgBase);
00262       }
00263
00264     } else { ///////////////////////// not In-Place
00265
00266       switch (targetColorModel)
00267       {
00268       case ImageBase::CM_Grey:
00269         switch (source.GetStorageType()) {
00270           CALLFUNC(ToGrey,source,dest);
00271       default:
00272         BIASERR("invalid storage type in source image");
00273         return -2;
00274         }
00275         break;
00276       case ImageBase::CM_RGB:
00277         switch (source.GetStorageType()) {
00278           CALLFUNC(ToRGB,source,dest);
00279       default:
00280         BIASERR("invalid storage type in source image");
00281         return -2;
00282         }
00283         break;
00284       case ImageBase::CM_HSV:
00285         switch (source.GetStorageType()) {
00286           CALLFUNC(ToHSV,source,dest);
00287       default:
00288         BIASERR("invalid storage type in source image");
00289         return -2;
00290         }
00291         break;
00292       case ImageBase::CM_HSL:
00293         switch (source.GetStorageType()) {
00294           CALLFUNC(ToHSL,source,dest);
00295       default:
00296         BIASERR("invalid storage type in source image");
00297         return -2;
00298         }
00299         break;
00300       case ImageBase::CM_hsL:
00301         switch (source.GetStorageType()) {
00302           CALLFUNC(TohsL,source,dest);
00303       default:
00304         BIASERR("invalid storage type in source image");
00305         return -2;
00306         }
00307         break;
00308       default:
00309         BIASERR("no conversion available to targetColorModel:"<<
00310           targetColorModel);
00311         return -3;
00312       }
00313     }
00314     if (source.IsPlanar() != bPlanar) {
00315       ImageBase destImgBase;
00316       if (source.IsPlanar()) {
00317         switch (source.GetStorageType()) {
00318           CALLFUNC(ToInterleaved,dest,destImgBase);
00319       default:
00320         BIASERR("invalid storage type in source image");
00321         return -2;
00322         }
00323       } else { // it is interleaved
00324         switch (source.GetStorageType()) {
00325           CALLFUNC(ToPlanar,dest,destImgBase);
00326       default:
00327         BIASERR("invalid storage type in source image");
00328         return -2;
00329         }
00330       }
00331       dest.StealImage(destImgBase);
00332     }
00333     return 0;
00334 }
00335
00336 /**
00337 Sony DFW-X700 :
00338 r = y + 1.4022 v got
00339 b = y + 1.7710 u
00340 g = y - 0.3475 u - 0.7144 v got
00341 */
00342 #define YUV2RGB(y, u, v, r, g, b)\
00343   r = y + ( ((v << 11) + (v << 10) - (v << 8) + (v << 6) - (v << 3) ) >> 11);\
00344   g = y - ( ((v<<10) + (v<<9) - (v<<6) -  (v<<3) ) >> 11 ) - \
00345   ( ((u << 9) + (u << 7) + (u << 6) + (u << 3) + u) >> 11 );\
00346   b = y + ( ((u << 12) - (u << 9) + (u << 5)+(u<<4)) >> 11);\
00347   r = r < 0 ? 0 : r;\
00348   g = g < 0 ? 0 : g;\
00349   b = b < 0 ? 0 : b;\
00350   r = r > 255 ? 255 : r;\
00351   g = g > 255 ? 255 : g;\
00352   b = b > 255 ? 255 : b
00353
00354
00355
00356
00357 ////////////////////
00358 // ToGrey Section //
00359 ////////////////////
00360 template<class StorageType>
00361 int BIAS::ImageConvert::ToGrey(const Image<StorageType>& source,
00362                                Image<StorageType>& dest)
00363 {
00364   BIASGDOUT(D_CONVERT," ImageConvert::ToGrey()");
00365   int res = -1;
00366
00367   if ( dest.GetPixelCount() != source.GetPixelCount() ||
00368        dest.GetWidth() != source.GetWidth() ||
00369        dest.GetHeight() != source.GetHeight() ){
00370     BIASGDOUT(D_CONVERT,
00371               "ToGrey() should be called with an image of same size");
00372     dest.Release();
00373   }
00374   if ((dest.GetChannelCount() != 1) &&
00375       (dest.GetImageData() != source.GetImageData())){
00376     BIASGDOUT(D_CONVERT,"ToGrey() should be called with an 1 channel image");
00377     dest.Release();
00378   }
00379
00380   if (dest.IsEmpty()) {
00381     dest.Init(source.GetWidth(), source.GetHeight(),1,source.GetStorageType());
00382   }
00383
00384   switch (source.GetColorModel()) {
00385   case ImageBase::CM_Grey:
00386     dest = source;
00387     res = 0;
00388     break;
00389   case ImageBase::CM_DV:
00390 #ifdef BIAS_HAVE_DV
00391     res = DVToRGB_(source,dest);
00392     IP_ToGrey(dest);
00393 #else
00394     BIASERR("CM_DV not supported because BIAS_HAVE_DV not defined!");
00395     BIASABORT;
00396 #endif
00397     break;
00398
00399   case ImageBase::CM_RGB:
00400   case ImageBase::CM_BGR:
00401     res = RGBToGrey_(source,dest);
00402     break;
00403   case ImageBase::CM_UYVY422:
00404   case ImageBase::CM_YUYV422:
00405     res = YUV422ToGrey_(source,dest);
00406     break;
00407   case ImageBase::CM_YUV420P:
00408     res = YUV420PToGrey_(source,dest);
00409     break;
00410   case ImageBase::CM_Bayer_RGGB:
00411   case ImageBase::CM_Bayer_GBRG:
00412   case ImageBase::CM_Bayer_GRBG:
00413   case ImageBase::CM_Bayer_BGGR:
00414     // PtGrToGrey_ is not correct
00415     res = BayerToGrey_(source,dest);
00416     break;
00417   case ImageBase::CM_HSL:
00418   case ImageBase::CM_hsL:
00419     res = HSLToGrey_(source,dest);
00420     break;
00421   default:
00422     BIASERR("ImageConvert::ToGrey(): unknown color model:"<<
00423             source.GetColorModel());
00424     BIASABORT;
00425     break;
00426   }
00427   dest.ChannelCount_=1;
00428   dest.WidthStep_=dest.Width_*dest.Depth_;
00429   dest.SetColorModel(ImageBase::CM_Grey);
00430   // needed for inplace conversion
00431   dest.UpdateImageDataArrayFromImageData_();
00432   return res;
00433 }
00434
00435 int BIAS::ImageConvert::ToGrey(const ImageBase& source,
00436                                ImageBase& dest)
00437 {
00438   int res = 0;
00439   switch (source.GetStorageType()){
00440   case ImageBase::ST_unsignedchar:
00441     {
00442       BIASASSERT(dest.GetStorageType() == ImageBase::ST_unsignedchar);
00443       Image<unsigned char> s(source);
00444       Image<unsigned char> d;
00445       res = ToGrey(s, d);
00446       dest.StealImage(d);
00447     }
00448     break;
00449 #ifdef BUILD_IMAGE_USHORT
00450   case ImageBase::ST_unsignedshortint:
00451     {
00452       BIASASSERT(dest.GetStorageType() == ImageBase::ST_unsignedshortint);
00453       Image<unsigned short> s(source);
00454       Image<unsigned short> d;
00455       res = ToGrey(s, d);
00456       dest.StealImage(d);
00457     }
00458     break;
00459 #endif // BUILD_IMAGE_USHORT
00460   default:
00461     BIASERR("unfinished code");
00462     BIASABORT;
00463     break;
00464   }
00465   return res;
00466 }
00467
00468 template <class StorageType>
00469 int BIAS::ImageConvert::RGBToGrey_(const Image<StorageType>& source,
00470                                    Image<StorageType>& dest)
00471 {
00472   BIASGDOUT(D_CONVERT,"ImageConvert::RGBToGrey_()");
00473   StorageType *p=dest.GetImageData();
00474   StorageType *r, *g, *b;
00475
00476   if (source.IsPlanar()){
00477     switch (source.GetColorModel()){
00478     case ImageBase::CM_RGB:
00479       r=source.GetImageData();
00480       g=r+(source.GetWidth()*source.GetHeight());
00481       b=r+(2*source.GetWidth()*source.GetHeight());
00482       break;
00483     case ImageBase::CM_BGR:
00484       b=source.GetImageData();
00485       g=b+(source.GetWidth()*source.GetHeight());
00486       r=b+(2*source.GetWidth()*source.GetHeight());
00487       break;
00488     default:
00489       BIASERR("RGBToGrey_ must be called with RGB or BGR ColorModel_");
00490       return -1;
00491     }
00492     for (unsigned int i=0; i < dest.GetWidth()*dest.GetHeight(); i++){
00493       p[0]=(StorageType)(0.299*r[0]+0.587*g[0]+0.114*b[0]);
00494       p++; r++; g++; b++;
00495     }
00496   } else {
00497     switch (source.GetColorModel()) {
00498     case ImageBase::CM_RGB:
00499       r=source.GetImageData();
00500       g=r+1;
00501       b=r+2;
00502       break;
00503     case ImageBase::CM_BGR:
00504       b=source.GetImageData();
00505       g=b+1;
00506       r=b+2;
00507       break;
00508     default:
00509       BIASERR("RGBToGrey_ must be called with RGB or BGR ColorModel_");
00510       return -1;
00511     }
00512     for (unsigned int i=0; i < dest.GetWidth()*dest.GetHeight(); i++){
00513       p[0]=(StorageType)(0.299*r[0]+0.587*g[0]+0.114*b[0]);
00514       p++; r+=3; g+=3; b+=3;
00515     }
00516   }
00517   return 0;
00518 }
00519
00520
00521 template <class StorageType>
00522 int BIAS::ImageConvert::YUV422ToGrey_(const Image<StorageType> &source,
00523                                       Image<StorageType>& dest)
00524 {
00525
00526   register StorageType *y = source.GetImageData();
00527   StorageType *sink = dest.GetImageData();
00528   register StorageType *sinkp;
00529   bool IdenticalImages = false;
00530   BIASGDOUT(D_CONVERT,"ImageConvert::YUV422ToGrey_()");
00531
00532   if (y == sink) {
00533     BIASGDOUT(D_MI_CONVGREY,"identical images");
00534     IdenticalImages = true;
00535     sink = new StorageType[source.GetWidth() * source.GetHeight()];
00536   }
00537
00538   switch (source.GetColorModel()) {
00539     case ImageBase::CM_YUYV422:
00540       break;
00541     case ImageBase::CM_UYVY422:
00542       y++;
00543       break;
00544     default:
00545       BIASERR("ImageConvert::YUV422ToGrey_(): unsupported colormodel");
00546       return -1;
00547   }
00548
00549   if (source.IsPlanar()){
00550     memcpy(sink, y, dest.GetPixelCount());
00551   } else {
00552     sinkp = sink;
00553     for (register unsigned long int i=0; i < dest.GetPixelCount(); i++){
00554       sinkp[0]=y[0];
00555       sinkp++;
00556       y+=2;
00557       // cerr << i << " " << endl;
00558     }
00559   }
00560
00561   if (IdenticalImages) {
00562     dest.ReleaseImageDataPointer();
00563     dest.ChannelCount_=1;
00564     dest.RedirectImageDataPointer(sink);
00565   }
00566   return 0;
00567 }
00568
00569
00570
00571 ///////////////////////
00572 // IP_ToGrey Section //
00573 ///////////////////////
00574 template <class StorageType>
00575 int BIAS::ImageConvert::IP_ToGrey(Image<StorageType> &img)
00576 {
00577   int res = -1;
00578
00579   BIASGDOUT(D_CONVERT,"ImageConvert::IP_ToGrey_()");
00580
00581   //   if (sizeof(StorageType) != 1){
00582   //     BIASERR("IP_ToGrey makes only sense with <char> and <unsigned char> images");
00583   //     return -1;
00584   //   }
00585
00586   switch (img.GetColorModel()) {
00587   case ImageBase::CM_Grey://ImageBase::ImageBase::CM_Grey:
00588     BIASERR("already in grey");
00589     break;
00590   case ImageBase::CM_BGR:
00591     res = IP_RGBToGrey_(img);
00592     break;
00593   case ImageBase::CM_RGB:
00594     res = IP_RGBToGrey_(img);
00595     break;
00596   case ImageBase::CM_YUYV422:
00597     res = IP_YUV422ToGrey_(img);
00598     break;
00599   default:
00600     BIASERR("Image::IP_ToGrey(): unknown color model");
00601     res = -1;
00602     break;
00603   }
00604   if (res >=0) {
00605     img.ChannelCount_=1;
00606     img.WidthStep_ = img.Depth_ * img.Width_;
00607     img.SetColorModel(ImageBase::CM_Grey);
00608     img.UpdateImageDataArrayFromImageData_();
00609   }
00610   return res;
00611 }
00612
00613
00614
00615 template <class StorageType>
00616 int BIAS::ImageConvert::IP_RGBToGrey_(Image<StorageType> &img)
00617 {
00618   StorageType *p=img.GetImageData();
00619   StorageType *r, *g, *b;
00620   if (img.IsPlanar()){
00621     switch (img.GetColorModel()){
00622     case ImageBase::CM_RGB:
00623       r=img.GetImageData();
00624       g=r+(img.GetWidth()*img.GetHeight());
00625       b=r+(2*img.GetWidth()*img.GetHeight());
00626       break;
00627     case ImageBase::CM_BGR:
00628       b=img.GetImageData();
00629       g=b+(img.GetWidth()*img.GetHeight());
00630       r=b+(2*img.GetWidth()*img.GetHeight());
00631       break;
00632     default:
00633       BIASERR("IP_RGBToGrey_ must be called with RGB or BGR ColorModel_");
00634       return -1;
00635     }
00636     for (unsigned int i=0; i < img.GetWidth()*img.GetHeight(); i++){
00637       p[0]=(StorageType)(0.299*r[0]+0.587*g[0]+0.114*b[0]);
00638       p++; r++; g++; b++;
00639     }
00640   } else {
00641     switch (img.GetColorModel()) {
00642     case ImageBase::CM_RGB:
00643       r=img.GetImageData();
00644       g=r+1;
00645       b=r+2;
00646       break;
00647     case ImageBase::CM_BGR:
00648       b=img.GetImageData();
00649       g=b+1;
00650       r=b+2;
00651       break;
00652     default:
00653       BIASERR("IP_RGBToGrey_ must be called with RGB or BGR ColorModel_");
00654       return -1;
00655     }
00656
00657     for (unsigned long int i=0; i < img.GetPixelCount(); i++){
00658       p[0]=(StorageType)(0.299*r[0]+0.587*g[0]+0.114*b[0]);
00659       p++; r+=3; g+=3; b+=3;
00660     }
00661   }
00662   return 0;
00663 }
00664
00665
00666
00667
00668
00669 template <class StorageType>
00670 int BIAS::ImageConvert::IP_YUV422ToGrey_(Image<StorageType> &img)
00671 {
00672   StorageType *y;
00673
00674   BIASGDOUT(D_CONVERT,"ImageConvert::IP_YUV422ToGrey_()");
00675
00676
00677   if (img.IsPlanar()){
00678     switch (img.GetColorModel()) {
00679     case ImageBase::CM_YUYV422:
00680       img.ChannelCount_=1;
00681       break;
00682     default:
00683       BIASERR("ImageConvert::IP_YUV422ToGrey_()  color model not yet implemented");
00684       break;
00685     }
00686   } else {
00687     StorageType *dest=img.GetImageData();
00688     switch (img.GetColorModel()) {
00689     case ImageBase::CM_YUYV422:
00690       y = img.GetImageData();
00691       break;
00692     case ImageBase::CM_UYVY422:
00693       y = img.GetImageData() + 1;
00694       break;
00695     default:
00696       BIASERR("ImageConvert::IP_YUV422ToGrey_(): unsupported colormodel");
00697       return -1;
00698     }
00699
00700     for (unsigned int i=0; i < img.GetWidth()*img.GetHeight(); i++){
00701       dest[0]=y[0];
00702       dest++;
00703       y+=2;
00704     }
00705   }
00706   return 0;
00707
00708 }
00709
00710
00711
00712
00713 ////////////////////
00714 //  ToRGB Section //
00715 ////////////////////
00716
00717
00718 template <class StorageType>
00719 int BIAS::ImageConvert::ToRGB(Image<StorageType>& source,
00720                               Image<StorageType>& dest)
00721 {
00722   int res = -1;
00723   bool inplace=(source.GetImageData()==dest.GetImageData());
00724   Image<StorageType>* tmpdest;
00725   if (inplace)
00726     tmpdest = new Image<StorageType>;
00727   else
00728     tmpdest = &dest;
00729
00730
00731   BIASGDOUT(D_CONVERT,"ImageConvert::ToRGB()");
00732   if (!tmpdest->IsEmpty()) {
00733     if (tmpdest->GetChannelCount() != 3 ||
00734       tmpdest->GetWidth()!=source.GetWidth() ||
00735       tmpdest->GetHeight() != source.GetHeight() ){
00736         tmpdest->Release();
00737       }
00738   }
00739
00740   if (tmpdest->IsEmpty()) {
00741     if (source.GetColorModel() == ImageBase::CM_DV) {
00742 #ifdef BIAS_HAVE_DV
00743       tmpdest->Init(720,576, 3,source.GetStorageType()); // PAL
00744 #else
00745       BIASERR("BIAS_HAVE_DV not defined!!!");
00746       BIASABORT;
00747 #endif
00748     } else {
00749       tmpdest->Init(source.GetWidth(), source.GetHeight(), 3,
00750         source.GetStorageType());
00751     }
00752   }
00753
00754   switch (source.GetColorModel()) {
00755   case ImageBase::CM_Grey:
00756     res = GreyToRGB_(source,*tmpdest);
00757     break;
00758   case ImageBase::CM_BGR:
00759     res = BGRToRGB_(source,*tmpdest);
00760     break;
00761   case ImageBase::CM_RGB:
00762     memcpy(tmpdest->GetImageData(), source.GetImageData(),
00763       sizeof(StorageType) * 3 * source.GetPixelCount());
00764     res = 0;
00765     break;
00766   case ImageBase::CM_UYVY422:
00767     res = YUV422ToRGB_(source,*tmpdest);
00768     break;
00769   case ImageBase::CM_YUYV422:
00770     res = YUV422ToRGB_(source,*tmpdest);
00771     break;
00772   case ImageBase::CM_YUV420P:
00773     res = YUV420PToRGB_(source,*tmpdest);
00774     break;
00775   case ImageBase::CM_DV:
00776 #ifdef BIAS_HAVE_DV
00777     res = DVToRGB_(source,*tmpdest);
00778 #else
00779     BIASERR("BIAS_HAVE_DV not defined!!");
00780     BIASABORT;
00781 #endif
00782     break;
00783   case ImageBase::CM_Bayer_RGGB:
00784   case ImageBase::CM_Bayer_GBRG:
00785   case ImageBase::CM_Bayer_GRBG:
00786   case ImageBase::CM_Bayer_BGGR:
00787     res = BayerToRGB_(source,*tmpdest);
00788     break;
00789   case ImageBase::CM_RGBA:
00790     res = RGBAToRGB_(source,*tmpdest);
00791     break;
00792   case ImageBase::CM_BGRA:
00793     res = BGRAToRGB_(source,*tmpdest);
00794     break;
00795   default:
00796     BIASERR("ImageConvert::ToRGB(): unknown color model:"<<
00797       source.GetColorModel());
00798     break;
00799   }
00800   tmpdest->SetColorModel(ImageBase::CM_RGB);
00801
00802   if (inplace){
00803     dest = *tmpdest;
00804     delete tmpdest;
00805   }
00806
00807   return res;
00808 }
00809
00810
00811
00812 template <class StorageType>
00813 int BIAS::ImageConvert::BGRToRGB_(Image<StorageType>& source,
00814                                   Image<StorageType>& dest)
00815 {
00816
00817   BIASGDOUT(D_CONVERT,"BGRToRGB_()");
00818   StorageType *sink = dest.GetImageData();
00819   StorageType *src = source.GetImageData();
00820
00821   // in place
00822   if(src == sink){
00823     StorageType tmp;
00824     for (unsigned long int i=0;i<dest.GetPixelCount(); i++) {
00825       tmp = src[2];
00826       sink[2] = src[0];
00827       sink[0] = tmp;
00828       sink+=3;
00829       src+=3;
00830     }
00831   } else {
00832     for (unsigned long int i=0;i<dest.GetPixelCount(); i++) {
00833       sink[2] = src[0];
00834       sink[1] = src[1];
00835       sink[0] = src[2];
00836       sink+=3;
00837       src+=3;
00838     }
00839   }
00840   return 0;
00841 }
00842
00843 template <class StorageType>
00844 int BIAS::ImageConvert::RGBAToRGB_(Image<StorageType>& source,
00845                                    Image<StorageType>& dest)
00846 {
00847   BIASGDOUT(D_CONVERT,"RGBAToRGB()");
00848   register StorageType *sink = dest.GetImageData();
00849   register StorageType *src = source.GetImageData();
00850   // in place not necessary , as ToRGB() created new dist already
00851   for (unsigned long int i=0;i<dest.GetPixelCount(); i++) {
00852     sink[0] = src[0];
00853     sink[1] = src[1];
00854     sink[2] = src[2];
00855     sink+=3;
00856     src+=4;
00857   }
00858
00859   return 0;
00860 }
00861
00862 template <class StorageType>
00863 int BIAS::ImageConvert::BGRAToRGB_(Image<StorageType>& source,
00864                                    Image<StorageType>& dest)
00865 {
00866   BIASGDOUT(D_CONVERT,"RGBAToRGB()");
00867   register StorageType *sink = dest.GetImageData();
00868   register StorageType *src = source.GetImageData();
00869   // in place not necessary , as ToRGB() created new dist already
00870   for (unsigned long int i=0;i<dest.GetPixelCount(); i++) {
00871     sink[2] = src[0];
00872     sink[1] = src[1];
00873     sink[0] = src[2];
00874     sink+=3;
00875     src+=4;
00876   }
00877
00878   return 0;
00879 }
00880
00881
00882 template <class StorageType>
00883 int BIAS::ImageConvert::YUV422ToRGB_(Image<StorageType>& source,
00884                                      Image<StorageType>& dest)
00885 {
00886
00887
00888   BIASGDOUT(D_CONVERT,"YUV422ToRGB_()");
00889   StorageType *sink;
00890   bool IdenticalImages = false;
00891   StorageType *sourcedata = source.GetImageData();
00892
00893
00894   if (dest.GetImageData() == sourcedata) {
00895     IdenticalImages = true;
00896     sink = new StorageType[source.GetWidth() * source.GetHeight() * 3];
00897   }
00898   else
00899     sink = dest.GetImageData();
00900
00901
00902 #define FASTYUV
00903
00904 #ifndef FASTYUV
00905   float y,u = 0.0,v=0.0;
00906   float r,g,b;
00907
00908   int sinkoffset =0;
00909   int yoffset = 0;
00910   int uvoffset = 1;
00911
00912
00913
00914   if (source.ColorModel_ == ImageBase::CM_UYVY422) {
00915     yoffset = 1;
00916     uvoffset = 0;
00917   }
00918
00919
00920   for (int j = 0; j < (source.GetWidth() * source.GetHeight()) ; j++)
00921   {
00922     //        y = 1.164 *(float) sourcedata[j*2 + yoffset]-16;
00923     y = (float)sourcedata[j*2 + yoffset];
00924     if ( j%2 == 0){
00925       u=  (float)sourcedata[j*2+ uvoffset]- 128;
00926     }
00927     else {
00928       v = (float) sourcedata[j*2+ uvoffset ]- 128;
00929     }
00930
00931     b = rint(y              + 1.77 * u );
00932     g = rint(y - 0.714 * v  - 0.345 * u );
00933     r = rint(y + 1.4 * v );
00934     //        b = rint(y              + 2.018 * v );
00935     //        g = rint(y - 0.813 * u  - 0.391 * v );
00936     //        r = rint(y + 1.596 * u );
00937     r = r >255 ? 255: r;
00938     g = g >255 ? 255: g;
00939     b = b >255 ? 255: b;
00940
00941     r =  r <0 ? 0: r;
00942     g =  g <0 ? 0: g;
00943     b =  b <0 ? 0: b;
00944
00945
00946     sink[sinkoffset++ ] = (unsigned char) r;
00947     sink[sinkoffset++] = (unsigned char) g;
00948     sink[sinkoffset++] = (unsigned char) b;
00949   }
00950
00951 #else
00952   unsigned int i,j;
00953   register int y0,y1,u,v,r,g,b;
00954   if (source.GetColorModel() == ImageBase::CM_UYVY422) {
00955     for (i = 0, j = 0; i < (source.GetWidth()*source.GetHeight() << 1); i += 4, j += 6)     {
00956       u = (unsigned char) sourcedata[i + 0] - 128;
00957       y0 = (unsigned char) sourcedata[i + 1];
00958       v = (unsigned char) sourcedata[i + 2] - 128;
00959       y1 = (unsigned char) sourcedata[i + 3];
00960       YUV2RGB (y0, u, v, r, g, b);
00961       sink[j + 0] = StorageType(r);
00962       sink[j + 1] = StorageType(g);
00963       sink[j + 2] = StorageType(b);
00964       YUV2RGB (y1, u, v, r, g, b);
00965       sink[j + 3] = StorageType(r);
00966       sink[j + 4] = StorageType(g);
00967       sink[j + 5] = StorageType(b);
00968     }
00969
00970   }
00971   else {
00972     for (i = 0, j = 0; i < (dest.GetWidth()*dest.GetHeight() << 1); i += 4, j += 6)     {
00973       u = (unsigned char) sourcedata[i + 1] - 128;
00974       y0 = (unsigned char) sourcedata[i + 0];
00975       v = (unsigned char) sourcedata[i + 3] - 128;
00976       y1 = (unsigned char) sourcedata[i + 2];
00977       YUV2RGB (y0, u, v, r, g, b);
00978       sink[j + 0] = StorageType(r);
00979       sink[j + 1] = StorageType(g);
00980       sink[j + 2] = StorageType(b);
00981       YUV2RGB (y1, u, v, r, g, b);
00982       sink[j + 3] = StorageType(r);
00983       sink[j + 4] = StorageType(g);
00984       sink[j + 5] = StorageType(b);
00985     }
00986   }
00987 #endif
00988   if (IdenticalImages) {
00989     dest.ReleaseImageDataPointer();
00990     dest.ChannelCount_=3;
00991     dest.RedirectImageDataPointer(sink);
00992   }
00993
00994   return 0;
00995 }
00996
00997
00998 template <class StorageType>
00999 int BIAS::ImageConvert::GreyToRGB_(Image<StorageType>& source,
01000                                    Image<StorageType>& dest)
01001 {
01002   BIASGDOUT(D_CONVERT,"GreyToRGB_()");
01003
01004   register StorageType* src_start = source.GetImageData();
01005   register StorageType* src_stop  = src_start + dest.GetPixelCount();
01006   register StorageType* pDest = dest.GetImageData();
01007
01008   for (;src_start < src_stop; src_start++) {
01009     *pDest++ = *src_start;
01010     *pDest++ = *src_start;
01011     *pDest++ = *src_start;
01012   }
01013
01014   return 0;
01015 }
01016
01017 #ifdef BIAS_HAVE_DV
01018 template <class StorageType>
01019 int BIAS::ImageConvert::DVToRGB_(const Image<StorageType>& source,
01020                                  Image<StorageType>& dest,
01021                                  unsigned char quality )
01022 {
01023   BIASERR("DVToRGB_ only makes sense with unsigned char images");
01024   return -1;
01025 }
01026
01027 template <>
01028 int BIAS::ImageConvert::DVToRGB_(const Image<unsigned char>& source,
01029                                  Image<unsigned char>& dest,
01030                                  unsigned char quality )
01031 {
01032   BIASGDOUT(D_CONVERT,"DVToRGB_()");
01033
01034   if (!dest.IsEmpty())
01035     if (dest.GetWidth() != 720 || dest.GetHeight() != 576
01036       || dest.GetChannelCount() != 3)
01037       dest.Release();
01038
01039
01040   if (dest.IsEmpty()) dest.Init(720, 576,3);
01041
01042
01043   unsigned char *sink = dest.GetImageData();
01044   //        4 ? from  avi2pics
01045
01046
01047   unsigned char *pixels[3];
01048   int pitches[3];
01049
01050   pixels[0] = sink;  //target
01051   pixels[1] = NULL;
01052   pixels[2] = NULL;
01053
01054   pitches[0] = 720 * 3;
01055   pitches[1] = 0;
01056   pitches[2] = 0;
01057   if (DVDecoder_ == NULL) DVDecoder_ = dv_decoder_new(0,0,0);
01058   if (DVDecoder_ == NULL) BIASERR("dv_decoder_new() failed.");
01059   //       else cout <<"Got new DVDecoder"<<endl;
01060   //     dv_init(0,0);// new style for 0.9.8
01061   switch (quality) {
01062   case 0:  DVDecoder_->quality = DV_QUALITY_FASTEST ;
01063     break;
01064   case 1: DVDecoder_->quality = DV_QUALITY_FASTEST | DV_QUALITY_AC_1;
01065     break;
01066   case 2: DVDecoder_->quality = DV_QUALITY_COLOR;
01067     break;
01068   case 3: DVDecoder_->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_1;
01069     break;
01070   case 4: DVDecoder_->quality = DV_QUALITY_BEST;
01071     break;
01072   }
01073   //
01074   //  decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_DC;
01075   //decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_1;
01076   //  decoder->quality = DV_QUALITY_BEST;
01077
01078   dv_parse_header(DVDecoder_, source.GetImageData());
01079   dv_decode_full_frame(DVDecoder_, source.GetImageData(),
01080     e_dv_color_rgb, pixels, pitches);
01081
01082   return 0;
01083 }
01084 #endif // of BIAS_HAVE_DV
01085
01086
01087
01088
01089
01090 template <class StorageType>
01091 int BIAS::ImageConvert::BayerToGrey_(const Image<StorageType>& source ,
01092                                      Image<StorageType>& dest)
01093 {
01094   BIASGDOUT(D_CONVERT," Image::BayerToGreySlow_()");
01095
01096   StorageType *sink = dest.GetImageData() ;
01097   StorageType *src = source.GetImageData() ;
01098
01099
01100   int Mask[8];
01101   StorageType R=0,G=0,B=0;
01102   unsigned int srcskip;
01103   srcskip = source.GetWidth() ;
01104
01105   Mask[0] = - (int(source.GetWidth()) +1);
01106   Mask[1] = - int(source.GetWidth());
01107   Mask[2] = - (int(source.GetWidth()) -1);
01108   Mask[3] = -1;
01109   Mask[4] = +1;
01110   Mask[5] = int(source.GetWidth()) -1;
01111   Mask[6] = + int(source.GetWidth());
01112   Mask[7] = int(source.GetWidth()) +1;
01113
01114   unsigned int xoffset = 0;
01115   unsigned int yoffset = 0;
01116   switch (source.GetColorModel()) {
01117   case ImageBase::CM_Bayer_RGGB:
01118     // first pixel in first line
01119     R = *src;
01120     G = (*(src+srcskip)+*(src+1))/2;
01121     B = *(src+srcskip+1);
01122     break;
01123   case ImageBase::CM_Bayer_GBRG:
01124     yoffset = 1;
01125     // first pixel in first line
01126     G = *src;
01127     R = *(src+srcskip);
01128     B = *(src+1);
01129     break;
01130   case ImageBase::CM_Bayer_GRBG:
01131     xoffset = 1;
01132     // first pixel in first line
01133     G = *src;
01134     B = *(src+srcskip);
01135     R = *(src+1);
01136     break;
01137   case ImageBase::CM_Bayer_BGGR:
01138     xoffset = 1;yoffset = 1;
01139     // first pixel in first line
01140     B = *src;
01141     G = (*(src+srcskip)+*(src+1))/2;
01142     R = *(src+srcskip+1);
01143     break;
01144   default:; }
01145   *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01146   src++;
01147   // first line
01148   if (0 == yoffset) {
01149     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01150       if (x%2 == xoffset) {  // staying on Red
01151         R = *src;
01152         G = ( *(src+Mask[3])+ *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01153         B = ( *(src+Mask[5]) + *(src+Mask[7])) /2;
01154       }
01155       else { // staying on Green
01156         R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01157         G = *src;
01158         B = (*(src+Mask[6]) ) ;
01159       }
01160       *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01161       src++;
01162     }
01163   }
01164   else {
01165     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01166       if (x%2 == xoffset) {  // staying on Green
01167         R =  ( *(src+Mask[6]) ) ;
01168         G = *src;
01169         B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01170       }
01171       else { // staying on Blue
01172         R = (  *(src+Mask[5]) + *(src+Mask[7])) /2;
01173         G = ( *(src+Mask[3]) + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01174         B = *src;
01175       }
01176       *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01177       src++;
01178     }
01179   }
01180   // last pixel in first line
01181   if (0 == yoffset) {
01182     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Red
01183       R = *src;
01184       G = ( *(src+Mask[3])+  *(src+Mask[6]) ) /2;
01185       B =  *(src+Mask[5])  ;
01186     }
01187     else { // staying on Green
01188       R =  *(src+Mask[3]);
01189       G = *src;
01190       B = (*(src+Mask[6]) ) ;
01191     }
01192   }
01193   else {
01194     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Green
01195       R =  ( *(src+Mask[6]) ) ;
01196       G = *src;
01197       B =  *(src+Mask[3]) ;
01198     }
01199     else { // staying on Blue
01200       R =  *(src+Mask[5]);
01201       G = ( *(src+Mask[3]) + *(src+Mask[6]) ) /2;
01202       B = *src;
01203     }
01204   }
01205   *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01206   src++;
01207
01208
01209   //loop
01210   for (unsigned int y=1; y<(unsigned int)source.GetHeight()-1; y++) {
01211     // first pixel in line
01212     if (y%2 == yoffset)
01213       if (0%2 == xoffset) {  // staying on Red
01214         R = *src;
01215         G = (*(src+Mask[1])  + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01216         B = ( *(src+Mask[2]) + *(src+Mask[7])) /2;
01217       } else { // staying on Green
01218         R =  *(src+Mask[4]);
01219         G = *src;
01220         B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01221       }
01222     else
01223       if (0 == xoffset) {  // staying on Green
01224         R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01225         G = *src;
01226         B = *(src+Mask[4]);
01227       }
01228       else { // staying on Blue
01229         R = ( *(src+Mask[0]) + *(src+Mask[7])) /2;
01230         G = (*(src+Mask[1])  + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01231         B = *src;
01232       }
01233       *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01234       src++;
01235       // main part of line
01236       for (unsigned int x=1; x<(unsigned int)source.GetWidth()-1; x++) {
01237         if (y%2 == yoffset)
01238           if (x%2 == xoffset) {  // staying on Red
01239             R = *src;
01240             G = (*(src+Mask[1]) + *(src+Mask[3])
01241               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01242             B = ( *(src+Mask[0]) + *(src+Mask[2])
01243               + *(src+Mask[5]) + *(src+Mask[7])) /4;
01244           } else { // staying on Green
01245             R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01246             G = *src;
01247             B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01248           }
01249         else
01250           if (x%2 == xoffset) {  // staying on Green
01251             R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01252             G = *src;
01253             B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01254           }
01255           else { // staying on Blue
01256             R = ( *(src+Mask[0]) + *(src+Mask[2])
01257               + *(src+Mask[5]) + *(src+Mask[7])) /4;
01258             G = (*(src+Mask[1]) + *(src+Mask[3])
01259               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01260             B = *src;
01261           }
01262           *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01263           src++;
01264       }
01265       // last pixel in line
01266       if (y%2 == yoffset)
01267         if ((srcskip-1)%2 == xoffset) {  // staying on Red
01268           R = *src;
01269           G = (*(src+Mask[1]) + *(src+Mask[3]) + *(src+Mask[6]) ) /3;
01270           B = ( *(src+Mask[0]) + *(src+Mask[5])) /2;
01271         } else { // staying on Green
01272           R =  *(src+Mask[3]) ;
01273           G = *src;
01274           B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01275         }
01276       else
01277         if ((srcskip-1)%2 == xoffset) {  // staying on Green
01278           R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01279           G = *src;
01280           B = *(src+Mask[3]);
01281         }
01282         else { // staying on Blue
01283           R = ( *(src+Mask[0]) + *(src+Mask[5])) /2;
01284           G = (*(src+Mask[1]) + *(src+Mask[3])+ *(src+Mask[6]) ) /3;
01285           B = *src;
01286         }
01287         *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01288         src++;
01289
01290
01291   }
01292   // first pixel in last line
01293   if ((source.GetHeight()-1)%2 == yoffset) {
01294     if (0 == xoffset) {  // staying on Red
01295       R = *src;
01296       G = ( *(src+Mask[1])+  *(src+Mask[4]) ) /2;
01297       B =  *(src+Mask[2])  ;
01298     }
01299     else { // staying on Green
01300       R =  *(src+Mask[4]);
01301       G = *src;
01302       B = (*(src+Mask[1]) ) ;
01303     }
01304   }
01305   else {
01306     if (0 == xoffset) {  // staying on Green
01307       R =  ( *(src+Mask[1]) ) ;
01308       G = *src;
01309       B =  *(src+Mask[4]) ;
01310     }
01311     else { // staying on Blue
01312       R =  *(src+Mask[2]);
01313       G = ( *(src+Mask[1]) + *(src+Mask[4]) ) /2;
01314       B = *src;
01315     }
01316   }
01317   *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01318   src++;
01319   // last line
01320   if ((source.GetHeight()-1)%2 == yoffset) {
01321     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01322       if (x%2 == xoffset) {  // staying on Red
01323         R = *src;
01324         G = ( *(src+Mask[3])+ *(src+Mask[1]) + *(src+Mask[4]) ) /3;
01325         B = ( *(src+Mask[0]) + *(src+Mask[2])) /2;
01326       }
01327       else { // staying on Green
01328         R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01329         G = *src;
01330         B = (*(src+Mask[1]) ) ;
01331       }
01332       *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01333       src++;
01334     }
01335   }
01336   else {
01337     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01338       if (x%2 == xoffset) {  // staying on Green
01339         R =  ( *(src+Mask[1]) ) ;
01340         G = *src;
01341         B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01342       }
01343       else { // staying on Blue
01344         R = (  *(src+Mask[0]) + *(src+Mask[2])) /2;
01345         G = ( *(src+Mask[1]) + *(src+Mask[3]) + *(src+Mask[4]) ) /3;
01346         B = *src;
01347       }
01348       *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01349       src++;
01350     }
01351   }
01352   // last pixel in last line
01353   if ((source.GetHeight()-1)%2 == yoffset) {
01354     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Red
01355       R = *src;
01356       G = ( *(src+Mask[3])+  *(src+Mask[1]) ) /2;
01357       B =  *(src+Mask[0])  ;
01358     }
01359     else { // staying on Green
01360       R =  *(src+Mask[3]);
01361       G = *src;
01362       B = (*(src+Mask[1]) ) ;
01363     }
01364   }
01365   else {
01366     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Green
01367       R =  ( *(src+Mask[1]) ) ;
01368       G = *src;
01369       B =  *(src+Mask[3]) ;
01370     }
01371     else { // staying on Blue
01372       R =  *(src+Mask[0]);
01373       G = ( *(src+Mask[3]) + *(src+Mask[1]) ) /2;
01374       B = *src;
01375     }
01376   }
01377   *sink++ = (StorageType)(0.299*(float)R+0.587*(float)G+0.114*(float)B);
01378   src++;
01379   return 0;
01380 }
01381
01382
01383
01384 template <class StorageType>
01385 int BIAS::ImageConvert::BayerToRGB_(Image<StorageType>& source, Image<StorageType>&  dest )
01386 {
01387   BIASGDOUT(D_CONVERT," Image::BayerToRGB_()");
01388
01389   StorageType *sink = dest.GetImageData() ;
01390   StorageType *src = source.GetImageData() ;
01391
01392   BIASASSERT(sink!=NULL);
01393   BIASASSERT(src!=NULL);
01394
01395
01396   int Mask[8];
01397   StorageType R=0,G=0,B=0;
01398   unsigned int srcskip;
01399   srcskip = source.GetWidth() ;
01400
01401   Mask[0] = - (int(source.GetWidth()) +1);
01402   Mask[1] = - int(source.GetWidth());
01403   Mask[2] = - (int(source.GetWidth()) -1);
01404   Mask[3] = -1;
01405   Mask[4] = +1;
01406   Mask[5] = int(source.GetWidth()) -1;
01407   Mask[6] = + int(source.GetWidth());
01408   Mask[7] = int(source.GetWidth()) +1;
01409
01410   unsigned int xoffset = 0;
01411   unsigned int yoffset = 0;
01412   switch (source.GetColorModel()) {
01413   case ImageBase::CM_Bayer_RGGB:
01414     // first pixel in first line
01415     R = *src;
01416     G = (*(src+srcskip)+*(src+1))/2;
01417     B = *(src+srcskip+1);
01418     break;
01419   case ImageBase::CM_Bayer_GBRG:
01420     yoffset = 1;
01421     // first pixel in first line
01422     G = *src;
01423     R = *(src+srcskip);
01424     B = *(src+1);
01425     break;
01426   case ImageBase::CM_Bayer_GRBG:
01427     xoffset = 1;
01428     // first pixel in first line
01429     G = *src;
01430     B = *(src+srcskip);
01431     R = *(src+1);
01432     break;
01433   case ImageBase::CM_Bayer_BGGR:
01434     xoffset = 1;yoffset = 1;
01435     // first pixel in first line
01436     B = *src;
01437     G = (*(src+srcskip)+*(src+1))/2;
01438     R = *(src+srcskip+1);
01439     break;
01440   default:; }
01441   sink[0]=R; sink[1]=G; sink[2]=B;
01442   sink+=3; src++;
01443   // first line
01444   if (0 == yoffset) {
01445     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01446       if (x%2 == xoffset) {  // staying on Red
01447         R = *src;
01448         G = ( *(src+Mask[3])+ *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01449         B = ( *(src+Mask[5]) + *(src+Mask[7])) /2;
01450       }
01451       else { // staying on Green
01452         R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01453         G = *src;
01454         B = (*(src+Mask[6]) ) ;
01455       }
01456       *sink++ =R;
01457       *sink++ =G;
01458       *sink++ =B;
01459       src++;
01460     }
01461   }
01462   else {
01463     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01464       if (x%2 == xoffset) {  // staying on Green
01465         R =  ( *(src+Mask[6]) ) ;
01466         G = *src;
01467         B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01468       }
01469       else { // staying on Blue
01470         R = (  *(src+Mask[5]) + *(src+Mask[7])) /2;
01471         G = ( *(src+Mask[3]) + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01472         B = *src;
01473       }
01474       *sink++ =R;
01475       *sink++ =G;
01476       *sink++ =B;
01477       src++;
01478     }
01479   }
01480   // last pixel in first line
01481   if (0 == yoffset) {
01482     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Red
01483       R = *src;
01484       G = ( *(src+Mask[3])+  *(src+Mask[6]) ) /2;
01485       B =  *(src+Mask[5])  ;
01486     }
01487     else { // staying on Green
01488       R =  *(src+Mask[3]);
01489       G = *src;
01490       B = (*(src+Mask[6]) ) ;
01491     }
01492   }
01493   else {
01494     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Green
01495       R =  ( *(src+Mask[6]) ) ;
01496       G = *src;
01497       B =  *(src+Mask[3]) ;
01498     }
01499     else { // staying on Blue
01500       R =  *(src+Mask[5]);
01501       G = ( *(src+Mask[3]) + *(src+Mask[6]) ) /2;
01502       B = *src;
01503     }
01504   }
01505   *sink++ =R;
01506   *sink++ =G;
01507   *sink++ =B;
01508   src++;
01509
01510
01511   //loop
01512   for (unsigned int y=1; y<(unsigned int)source.GetHeight()-1; y++) {
01513     // first pixel in line
01514     if (y%2 == yoffset)
01515       if (0%2 == xoffset) {  // staying on Red
01516         R = *src;
01517         G = (*(src+Mask[1])  + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01518         B = ( *(src+Mask[2]) + *(src+Mask[7])) /2;
01519       } else { // staying on Green
01520         R =  *(src+Mask[4]);
01521         G = *src;
01522         B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01523       }
01524     else
01525       if (0 == xoffset) {  // staying on Green
01526         R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01527         G = *src;
01528         B = *(src+Mask[4]);
01529       }
01530       else { // staying on Blue
01531         R = ( *(src+Mask[0]) + *(src+Mask[7])) /2;
01532         G = (*(src+Mask[1])  + *(src+Mask[4]) + *(src+Mask[6]) ) /3;
01533         B = *src;
01534       }
01535       *sink++ =R;
01536       *sink++ =G;
01537       *sink++ =B;
01538       src++;
01539       // main part of line
01540       for (unsigned int x=1; x<(unsigned int)source.GetWidth()-1; x++) {
01541         if (y%2 == yoffset)
01542           if (x%2 == xoffset) {  // staying on Red
01543             R = *src;
01544             G = (*(src+Mask[1]) + *(src+Mask[3])
01545               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01546             B = ( *(src+Mask[0]) + *(src+Mask[2])
01547               + *(src+Mask[5]) + *(src+Mask[7])) /4;
01548           } else { // staying on Green
01549             R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01550             G = *src;
01551             B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01552           }
01553         else
01554           if (x%2 == xoffset) {  // staying on Green
01555             R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01556             G = *src;
01557             B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01558           }
01559           else { // staying on Blue
01560             R = ( *(src+Mask[0]) + *(src+Mask[2])
01561               + *(src+Mask[5]) + *(src+Mask[7])) /4;
01562             G = (*(src+Mask[1]) + *(src+Mask[3])
01563               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01564             B = *src;
01565           }
01566           *sink++ =R;
01567           *sink++ =G;
01568           *sink++ =B;
01569           src++;
01570       }
01571       // last pixel in line
01572       if (y%2 == yoffset)
01573         if ((srcskip-1)%2 == xoffset) {  // staying on Red
01574           R = *src;
01575           G = (*(src+Mask[1]) + *(src+Mask[3]) + *(src+Mask[6]) ) /3;
01576           B = ( *(src+Mask[0]) + *(src+Mask[5])) /2;
01577         } else { // staying on Green
01578           R =  *(src+Mask[3]) ;
01579           G = *src;
01580           B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01581         }
01582       else
01583         if ((srcskip-1)%2 == xoffset) {  // staying on Green
01584           R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01585           G = *src;
01586           B = *(src+Mask[3]);
01587         }
01588         else { // staying on Blue
01589           R = ( *(src+Mask[0]) + *(src+Mask[5])) /2;
01590           G = (*(src+Mask[1]) + *(src+Mask[3])+ *(src+Mask[6]) ) /3;
01591           B = *src;
01592         }
01593         *sink++ =R;
01594         *sink++ =G;
01595         *sink++ =B;
01596         src++;
01597
01598
01599   }
01600   // first pixel in last line
01601   if ((source.GetHeight()-1)%2 == yoffset) {
01602     if (0 == xoffset) {  // staying on Red
01603       R = *src;
01604       G = ( *(src+Mask[1])+  *(src+Mask[4]) ) /2;
01605       B =  *(src+Mask[2])  ;
01606     }
01607     else { // staying on Green
01608       R =  *(src+Mask[4]);
01609       G = *src;
01610       B = (*(src+Mask[1]) ) ;
01611     }
01612   }
01613   else {
01614     if (0 == xoffset) {  // staying on Green
01615       R =  ( *(src+Mask[1]) ) ;
01616       G = *src;
01617       B =  *(src+Mask[4]) ;
01618     }
01619     else { // staying on Blue
01620       R =  *(src+Mask[2]);
01621       G = ( *(src+Mask[1]) + *(src+Mask[4]) ) /2;
01622       B = *src;
01623     }
01624   }
01625   *sink++ =R;
01626   *sink++ =G;
01627   *sink++ =B;
01628   src++;
01629   // last line
01630   if ((source.GetHeight()-1)%2 == yoffset) {
01631     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01632       if (x%2 == xoffset) {  // staying on Red
01633         R = *src;
01634         G = ( *(src+Mask[3])+ *(src+Mask[1]) + *(src+Mask[4]) ) /3;
01635         B = ( *(src+Mask[0]) + *(src+Mask[2])) /2;
01636       }
01637       else { // staying on Green
01638         R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01639         G = *src;
01640         B = (*(src+Mask[1]) ) ;
01641       }
01642       *sink++ =R;
01643       *sink++ =G;
01644       *sink++ =B;
01645       src++;
01646     }
01647   }
01648   else {
01649     for (unsigned int x=1; x<(unsigned int)dest.GetWidth()-1; x++){
01650       if (x%2 == xoffset) {  // staying on Green
01651         R =  ( *(src+Mask[1]) ) ;
01652         G = *src;
01653         B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01654       }
01655       else { // staying on Blue
01656         R = (  *(src+Mask[0]) + *(src+Mask[2])) /2;
01657         G = ( *(src+Mask[1]) + *(src+Mask[3]) + *(src+Mask[4]) ) /3;
01658         B = *src;
01659       }
01660       *sink++ =R;
01661       *sink++ =G;
01662       *sink++ =B;
01663       src++;
01664     }
01665   }
01666   // last pixel in last line
01667   if ((source.GetHeight()-1)%2 == yoffset) {
01668     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Red
01669       R = *src;
01670       G = ( *(src+Mask[3])+  *(src+Mask[1]) ) /2;
01671       B =  *(src+Mask[0])  ;
01672     }
01673     else { // staying on Green
01674       R =  *(src+Mask[3]);
01675       G = *src;
01676       B = (*(src+Mask[1]) ) ;
01677     }
01678   }
01679   else {
01680     if ((dest.GetWidth()-1)%2 == xoffset) {  // staying on Green
01681       R =  ( *(src+Mask[1]) ) ;
01682       G = *src;
01683       B =  *(src+Mask[3]) ;
01684     }
01685     else { // staying on Blue
01686       R =  *(src+Mask[0]);
01687       G = ( *(src+Mask[3]) + *(src+Mask[1]) ) /2;
01688       B = *src;
01689     }
01690   }
01691   *sink++ =R;
01692   *sink++ =G;
01693   *sink++ =B;
01694   src++;
01695
01696   return 0;
01697 }
01698
01699
01700
01701
01702
01703
01704
01705
01706 // 2 pixel border in dest is black
01707 template <class StorageType>
01708 int BIAS::ImageConvert::BayerToRGBSlow_(Image<StorageType>& source,
01709                                         Image<StorageType>& dest )
01710 {
01711   BIASGDOUT(D_CONVERT," Image::BayerToRGBSlow_()");
01712
01713   StorageType *sink = dest.GetImageData() + 2 * dest.GetWidthStep() + 6;
01714   StorageType *src = source.GetImageData() + 2 * source.GetWidth() + 2;
01715
01716   int Mask[12];
01717   StorageType R,G,B, d1, d2;
01718
01719   Mask[0] = - (int(source.GetWidth()) +1);
01720   Mask[1] = - int(source.GetWidth());
01721   Mask[2] = - (int(source.GetWidth()) -1);
01722   Mask[3] = -1;
01723   Mask[4] = +1;
01724   Mask[5] = int(source.GetWidth()) -1;
01725   Mask[6] = + int(source.GetWidth());
01726   Mask[7] = int(source.GetWidth()) +1;
01727   Mask[8] = - 2 * int(source.GetWidth());
01728   Mask[9] = - 2 ;
01729   Mask[10] = + 2 ;
01730   Mask[11] = + 2 * int(source.GetWidth());
01731
01732 #define D1 (*(src+Mask[8])>*(src+Mask[11]))?\
01733   (*(src+Mask[8])-*(src+Mask[11])):\
01734   (*(src+Mask[11])-*(src+Mask[8]))
01735 #define D2 (*(src+Mask[9])>*(src+Mask[10]))?\
01736   (*(src+Mask[9])-*(src+Mask[10])):\
01737   (*(src+Mask[10])-*(src+Mask[9]))
01738
01739   unsigned int xoffset = 0;
01740   unsigned int yoffset = 0;
01741   switch (source.GetColorModel()) {
01742   case ImageBase::CM_Bayer_GBRG: yoffset = 1; break;
01743   case ImageBase::CM_Bayer_GRBG: xoffset = 1; break;
01744   case ImageBase::CM_Bayer_BGGR: xoffset = 1;yoffset = 1; break;
01745   default:; }
01746
01747   for (unsigned int y=2; y<(unsigned int)source.GetHeight()-2; y++) {
01748     for (unsigned int x=2; x<(unsigned int)source.GetWidth()-2; x++) {
01749       if (y%2 == yoffset)
01750         if (x%2 == xoffset) {  // staying on Red
01751           R = *src;
01752           d1 = D1;
01753           d2 = D2;
01754           if (d1<d2){
01755             G = (*(src+Mask[1]) + *(src+Mask[6]) ) /2;
01756           } else if (d2<d1){
01757             G = (*(src+Mask[3]) + *(src+Mask[4]) ) /2;
01758           } else {
01759             G = (*(src+Mask[1]) + *(src+Mask[3])
01760               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01761           }
01762           B = ( *(src+Mask[0]) + *(src+Mask[2])
01763             + *(src+Mask[5]) + *(src+Mask[7])) /4;
01764         }
01765         else { // staying on Green
01766           R =  ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01767           G = *src;
01768           B = ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01769         }
01770       else
01771         if (x%2 == xoffset) {  // staying on Green
01772           R =  ( *(src+Mask[1]) + *(src+Mask[6]) ) /2;
01773           G = *src;
01774           B = ( *(src+Mask[3]) + *(src+Mask[4]) ) /2;
01775         }
01776         else { // staying on Blue
01777           R = ( *(src+Mask[0]) + *(src+Mask[2])
01778             + *(src+Mask[5]) + *(src+Mask[7])) /4;
01779           d1 = D1;
01780           d2 = D2;
01781           if (d1<d2){
01782             G = (*(src+Mask[1]) + *(src+Mask[6]) ) /2;
01783           } else if (d2<d1){
01784             G = (*(src+Mask[3]) + *(src+Mask[4]) ) /2;
01785           } else {
01786             G = (*(src+Mask[1]) + *(src+Mask[3])
01787               + *(src+Mask[4]) + *(src+Mask[6]) ) /4;
01788           }
01789           B = *src;
01790         }
01791         *sink++ =R;
01792         *sink++ =G;
01793         *sink++ =B;
01794         src++;
01795     }
01796     sink += 12;
01797     src += 4;
01798   }
01799   dest.SetROI(2,2,dest.GetWidth()-2,dest.GetHeight()-2);
01800   return 0;
01801 }
01802
01803
01804
01805 template <class StorageType>
01806 int BIAS::ImageConvert::YUV420PToRGB_(Image<StorageType>& source,
01807                                       Image<StorageType>&  dest )
01808 {
01809   StorageType *sink = dest.GetImageData() ;
01810   StorageType *src = source.GetImageData() ;
01811   float y,u = 0.0,v=0.0;
01812   float r,g,b;
01813   int uoffset=0 ;
01814   int voffset=0 ;
01815   int width = source.GetWidth();
01816   int height = source.GetHeight();
01817
01818   for (int z = 0; z < height ; z++) {
01819     if (z%2==0) {
01820       voffset = width*height +z/2*width/2;
01821       uoffset = width*height + width*height/4+z/2*width/2;
01822     }
01823     for (int x=0; x< width; x++) {
01824       y = 1.164f * (float) (src[z*width + x] -16) ;
01825       if (  x%2==0 ) {
01826         v = (float) (src[voffset + x/2] -128);
01827         u = (float) (src[uoffset + x/2 ] -128);
01828       }
01829       b =  float(rint( y + 2.018f*v ));
01830       g =  float(rint( y - 0.813f*u  - 0.391f*v));
01831       r =  float(rint( y + 1.596f*u));
01832       if (r>255) r=255;
01833       if (g>255) g=255;
01834       if (b>255) b=255;
01835       if (r<0) r = 0;
01836       if (g<0) g = 0;
01837       if (b<0) b = 0;
01838
01839       sink[(z*width + x)*3 ] = (unsigned char) r;
01840       sink[(z*width + x)*3 +1] =(unsigned char)g;
01841       sink[(z*width + x)*3 +2] =(unsigned char) b;
01842     }
01843   }
01844   return 0;
01845 }
01846
01847 template <class StorageType>
01848 int BIAS::ImageConvert::YUV420PToGrey_(const Image<StorageType>& source,
01849                                        Image<StorageType>&  dest )
01850 {
01851   StorageType *sink = dest.GetImageData() ;
01852   StorageType *src = source.GetImageData() ;
01853
01854   int width = source.GetWidth();
01855   int height = source.GetHeight();
01856
01857   for (int z = 0; z < height ; z++)
01858     for (int x=0; x< width; x++)
01859       sink[(z*width + x) ] =  src[z*width + x];
01860
01861   return 0;
01862 }
01863
01864
01865
01866
01867 int ImageConvert::FloatToUC_(const ImageBase &source, ImageBase &dest)
01868 {
01869   unsigned int values = source.GetPixelCount() * source.GetChannelCount();
01870
01871   unsigned char *d = (unsigned char*)dest.GetImageData();
01872   float *s =(float*) source.GetImageData();
01873   for (unsigned int i=0; i<values; i++){
01874     d[i] = (unsigned char) *s;
01875     s ++;
01876   }
01877
01878   return 0;
01879 }
01880
01881
01882
01883 //  Now storage type conversion
01884 int ImageConvert::ConvertST(const ImageBase &source, ImageBase &dest,
01885                             ImageBase::EStorageType targetST)
01886 {
01887   if (!dest.IsEmpty()) dest.Release();
01888   dest.Init(source.GetWidth(), source.GetHeight(), source.GetChannelCount(),
01889     targetST);
01890   if (targetST==source.GetStorageType()){
01891     dest=source;
01892     return 0;
01893   }
01894
01895   dest.SetColorModel(source.GetColorModel());
01896
01897   // this is NumPixels * Channels
01898   unsigned int values = source.GetPixelCount() * source.GetChannelCount();
01899
01900   switch(targetST) {
01901   case ImageBase::ST_unsignedchar:
01902     {   //target
01903       unsigned char *d = (unsigned char*)dest.GetImageData();
01904       switch (source.GetStorageType()){
01905   case ImageBase::ST_float:
01906     return FloatToUC_(source,dest); break;
01907 #ifdef BUILD_IMAGE_INT
01908   case ImageBase::ST_int:
01909     {
01910       int *s =(int*) source.GetImageData();
01911       for (unsigned int i=0; i<values; i++)
01912         d[i] = (unsigned char) s[i];
01913     }
01914     break;
01915 #endif // BUILD_IMAGE_INT
01916 #ifdef BUILD_IMAGE_SHORT
01917   case ImageBase::ST_unsignedshortint:
01918     {
01919       unsigned short int *s =(unsigned short int*) source.GetImageData();
01920       for (unsigned int i=0; i<values; i++)
01921         d[i] = (unsigned char) s[i];
01922     }
01923     break;
01924 #endif // BUILD_IMAGE_SHORT
01925 #ifdef BUILD_IMAGE_CHAR
01926   case ImageBase::ST_char:
01927     {
01928       char *s = (char*)source.GetImageData();
01929       for (unsigned int i=0; i<values; i++)
01930         d[i] = (unsigned char) s[i];
01931     }
01932     break;
01933 #endif // BUILD_IMAGE_CHAR
01934 #ifdef BUILD_IMAGE_SHORT
01935   case ImageBase::ST_shortint:
01936     {
01937       short *s=(short*)source.GetImageData();
01938       for (unsigned int i=0; i<values; i++)
01939         d[i] = (unsigned char) s[i];
01940     }
01941     break;
01942 #endif // BUILD_IMAGE_SHORT
01943   default:
01944     BIASERR("ConvertST() not fully implemented");
01945     return -1;
01946       }
01947     }
01948     break;
01949   case ImageBase::ST_int:
01950     {
01951       int *d = (int*)dest.GetImageData();
01952       switch (source.GetStorageType()){
01953   case ImageBase::ST_unsignedchar:
01954     {
01955       unsigned char *s =(unsigned char*) source.GetImageData();
01956       for (unsigned int i=0; i<values; i++) d[i] = (int) s[i];
01957     }
01958     break;
01959   case ImageBase::ST_char:
01960     {
01961       char *s =(char*) source.GetImageData();
01962       for (unsigned int i=0; i<values; i++) d[i] = (int) s[i];
01963     }
01964     break;
01965   case ImageBase::ST_unsignedshortint:
01966     {
01967       unsigned short *s =(unsigned short*) source.GetImageData();
01968       for (unsigned int i=0; i<values; i++) d[i] = (int) s[i];
01969     }
01970     break;
01971   default:
01972     BIASERR("ConvertST() not fully implemented");  return -1;
01973       }
01974     } break;
01975   case ImageBase::ST_unsignedshortint:
01976     {
01977       unsigned short int *d = (unsigned short int*)dest.GetImageData();
01978       switch (source.GetStorageType())
01979       {
01980       case ImageBase::ST_unsignedchar:
01981         {
01982           unsigned char *s =(unsigned char*) source.GetImageData();
01983           for (unsigned int i=0; i<values; i++)
01984             d[i] = (unsigned short int) s[i];
01985         }
01986         break;
01987       default:
01988         BIASERR("ConvertST() not fully implemented");  return -1;
01989       }
01990     } break;
01991   case ImageBase::ST_float:
01992     {
01993       float *d = (float*)dest.GetImageData();
01994       switch (source.GetStorageType())
01995       {
01996       case ImageBase::ST_unsignedchar:
01997         {
01998           unsigned char *s =(unsigned char*) source.GetImageData();
01999           unsigned char *e = s+values;
02000           while (s<e)
02001             *d++=(float)*s++;
02002         }
02003         break;
02004       case ImageBase::ST_char:
02005         {
02006           char *s =(char*) source.GetImageData();
02007           char *e = s+values;
02008           while (s<e) *d++=(float)*s++;
02009         }
02010         break;
02011       case ImageBase::ST_unsignedshortint:
02012         {
02013           unsigned short *s =(unsigned short*) source.GetImageData();
02014           for (unsigned int i=0; i<values; i++) d[i] = (float) s[i];
02015         }
02016         break;
02017       default:
02018         BIASERR("ConvertST() not fully implemented "<<source.GetStorageType());
02019         return -1;
02020       }
02021     }
02022     break;
02023   default:
02024     BIASERR("ConvertST() not implemented for this target ST"); return -1;
02025     break;
02026   }
02027   int tlx, tly, brx, bry;
02028   source.GetROI()->GetCorners(tlx, tly, brx, bry);
02029   dest.GetROI()->SetCorners(tlx, tly, brx, bry);
02030
02031   return 0;
02032 }
02033
02034
02035 template <class StorageType>
02036 int BIAS::ImageConvert::HSLToGrey_(const Image<StorageType>& source,
02037                                    Image<StorageType>& dest)
02038 {
02039   BIASGDOUT(D_CONVERT,"ImageConvert::hsLToGrey_()");
02040   StorageType *p=dest.GetImageData();
02041   StorageType *h, *s, *L;
02042
02043   if (source.IsPlanar()){
02044     switch (source.GetColorModel()){
02045     case ImageBase::CM_hsL:
02046     case ImageBase::CM_HSL:
02047       h=source.GetImageData();
02048       s=h+(source.GetWidth()*source.GetHeight());
02049       L=s+(source.GetWidth()*source.GetHeight());
02050       break;
02051     default:
02052       BIASERR("HSLToGrey_ must be called with HSL or hsL ColorModel_");
02053       return -1;
02054     }
02055     for (unsigned int i=0; i < dest.GetWidth()*dest.GetHeight(); i++){
02056       *p=(StorageType)*L;
02057       L++; p++;
02058     }
02059   } else { // interleaved
02060     switch (source.GetColorModel()) {
02061     case ImageBase::CM_hsL:
02062     case ImageBase::CM_HSL:
02063       h=source.GetImageData();
02064       s=h+1;
02065       L=h+2;
02066       break;
02067     default:
02068       BIASERR("HSLToGrey_ must be called with HSL or hsL ColorModel_");
02069       return -1;
02070     }
02071     for (unsigned int i=0; i < dest.GetWidth()*dest.GetHeight(); i++){
02072       *p=(StorageType)(*L);
02073       p++; L+=3;
02074     }
02075   }
02076   return 0;
02077 }
02078
02079 #ifdef BIAS_HAVE_OPENCV
02080 template <class StorageType>
02081 int ImageConvert::BIAS2ipl(const Image<StorageType>& source, IplImage*  &dest)
02082 {
02083   //#ifdef USE_MY_OPENCV
02084   //BIASDOUT(D_IMCONV_IPL, "using own CreateIplImage");
02085   //  cerr << "using own CreateIplImage\n";
02086   //dest = CreateIplImage(source.GetWidth(), source.GetHeight(),
02087   //                      sizeof(StorageType) * 8 , source.GetChannelCount());
02088   //#else
02089   //BIASDOUT(D_IMCONV_IPL, "using official CreateIplImage");
02090   //cerr << "using official CreateIplImage\n";
02091   dest = cvCreateImage(cvSize(source.GetWidth(), source.GetHeight()),
02092     sizeof(StorageType) * 8, source.GetChannelCount());
02093   //#endif
02094
02095   StorageType* newImageData = (StorageType*) dest->imageDataOrigin;
02096
02097   //
02098   // IplImages in OpenCV are always:
02099   //   - GREY
02100   //   - RGB  (with byte Order BGR due to Windows DIB format)
02101   //   - RGBA (with byte Order BGRA)
02102   //
02103   // As an limitation of opencv compared to IPL, color images are ALWAYS
02104   //   interleaved!
02105
02106   //cerr << "source.GetColorModel() :"<<source.GetColorModel()<<endl;
02107   switch (source.GetColorModel()) {
02108
02109   case ImageBase::CM_Grey:
02110     //cerr <<"grey\n";
02111     memcpy(newImageData, source.GetImageData(), source.GetSize());
02112     break;
02113
02114   case ImageBase::CM_BGR :
02115     //cerr <<"BGR\n";
02116     if (source.IsPlanar()) {
02117       //cerr <<"Planar\n";
02118       // planar BGR image
02119       for(int channel = 0; channel < 3; channel++) {
02120         register StorageType* src  = source.GetImageData() +
02121           channel*source.GetPixelCount();
02122         register StorageType* act = newImageData + channel;
02123         register StorageType* stop = src + source.GetPixelCount();
02124         for(;src < stop; src++) {
02125           *act = *src;
02126           act += 3;
02127         }
02128       }
02129     } else {
02130       //cerr <<"Interleaved\n";
02131       // interleaved BGR image - the same format as IplImage itself
02132       memcpy((void*)newImageData, (void*)source.GetImageData(), source.GetSize());
02133     };
02134     break;
02135
02136   case ImageBase::CM_RGB :
02137     //cerr <<"RGB\n";
02138     if (source.IsPlanar()) {
02139       //cerr <<"Planar\n";
02140       // planar RGB image
02141       for(int channel = 0; channel < 3; channel++) {
02142         register StorageType* src  = source.GetImageData() + (2 - channel) *
02143           source.GetPixelCount(); // RGB instead of BGR order!
02144         register StorageType* act = newImageData + channel;
02145         register StorageType* stop = src + source.GetPixelCount();
02146         for(;src < stop; src++) {
02147           *act = *src;
02148           act += 3;
02149         }
02150       }
02151     } else {
02152       //cerr <<"Interleaved\n";
02153       // interleaved RGB image
02154       register StorageType* src  = source.GetImageData();
02155       register StorageType* stop = src + 3 * source.GetPixelCount();
02156       register StorageType* act = newImageData;
02157       while (src < stop) {
02158         // swap RGB because OpenCV uses BGR as native channel order
02159         // only the color conversion routines need this, I fixed highgui to handle channelSeq correctly (jw)
02160         act[0]=src[2];
02161         act[1]=src[1];
02162         act[2]=src[0];
02163         act+=3;
02164         src+=3;
02165       }
02166     }
02167     break;
02168
02169   default:
02170     BIASERR("Only Grey, BGR and RGB images can be converted to IplImages yet."
02171       <<" Aborting!");
02172     return -1;
02173   }
02174
02175   return 0;
02176 }
02177
02178 template <class StorageType>
02179 int ImageConvert::Ipl2BIAS(IplImage* source, Image<StorageType>& dest)
02180 {
02181   // Does the color depth match?
02182   if (8*sizeof(StorageType) != source->depth) {
02183     BIASERR("Cannot convert an IplImage into an Image of different color "
02184       <<"depth!");
02185     return -1;
02186   }
02187
02188   if (source->width <=0 || source->height <= 0) {
02189     BIASERR("IplImage to be converted to Image has no size!");
02190     return -1;
02191   }
02192   if ( !dest.IsEmpty() )
02193     dest.Release();
02194   // What kind of image do we have?
02195   switch (source->nChannels) {
02196   case 1: // gray image
02197     // Release the old image data and allocate new memory
02198     dest.Init(source->width, source->height, 1);
02199     memcpy(dest.GetImageData(), source->imageDataOrigin, dest.GetSize());
02200     break;
02201   case 3:
02202     if (strcmp(source->colorModel, "RGB")==0 &&
02203       strcmp(source->channelSeq, "BGR")==0 &&
02204       source->dataOrder==IPL_DATA_ORDER_PIXEL &&
02205       (source->depth>>3)==sizeof(StorageType) ){
02206         dest.Init(source->width, source->height, 3);
02207         register unsigned char* src = (unsigned char*) source->imageDataOrigin;
02208         register unsigned char* stop = src + 3 * source->width * source->height;
02209         register StorageType* dst = dest.GetImageData();
02210         while (src < stop) {
02211           dst[0]=src[2];
02212           dst[1]=src[1];
02213           dst[2]=src[0];
02214           dst+=3; src+=3;
02215         }
02216       } else {
02217         BIASERR("Ipl2BIAS not implemented for this color model or inavlid storage type");
02218         return -1;
02219       }
02220       break;
02221   default:
02222     BIASERR("Only gray IplImages can be converted to Images yet!");
02223     return -1;
02224   }
02225   return 0;
02226 }
02227 #endif // BIAS_HAVE_OPENCV
02228
02229
02230 //
02231 // solve explicit instantiation of this class
02232 // must be at teh end of teh file JW
02233 #include "ImageConvertInstantiation.cpp"
02234
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvert.hh Source File

Base » Image

ImageConvert.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_IMAGE_CONVERSION_H_
00027 #define _BIAS_IMAGE_CONVERSION_H_
00028
00029 #include "bias_config.h"
00030
00031 #include "Image.hh"
00032 #include "ImageBase.hh"
00033
00034 #ifdef BIAS_HAVE_OPENCV
00035 #  include <cv.h>
00036 #endif
00037
00038
00039 #ifdef BIAS_HAVE_DV
00040 #  include <dv.h>
00041 #endif
00042
00043
00044 #define D_IMCONV_IPL  0x00000001
00045
00046 namespace BIAS {
00047   /** @class ImageConvert
00048       @ingroup g_image_io
00049       @brief class with static functions
00050       for converting all kinds of color formats and storage types
00051
00052       As all fucntions are static they have to be called by
00053       eg. ImageConvert::Convert() and not with an object.
00054       @author Daniel Grest, Nov. 2002 */
00055   class BIASImageBase_EXPORT ImageConvert : Debug {
00056     friend class ImageBase;
00057   public:
00058     /** main general function, calls desired specialized functions,
00059         always initializes the destImage(if not source==dest)
00060         @author Daniel Grest, Nov. 2002*/
00061     static int Convert(BIAS::ImageBase &source, BIAS::ImageBase &dest,
00062                        enum BIAS::ImageBase::EColorModel targetColorModel,
00063                        bool bPlanar=false);
00064
00065     /** ask Felix or Friso
00066         @author Felix Woelk or Friso Evers
00067     */
00068     static int ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest,
00069                          ImageBase::EStorageType targetST);
00070
00071
00072     /** In place conversion to gray image. No further memory is allocated,
00073         because only the the first part of the existing image is used.
00074         @author Felix Woelk **/
00075     template <class StorageType>
00076     BIASImageBase_EXPORT
00077     static int IP_ToGrey(Image<StorageType> &img);
00078
00079     /** wrapper for the templated function below
00080         @author woelk 02/2006 */
00081     //BIASImageBase_EXPORT
00082     static int ToGrey(const ImageBase& source, ImageBase& dest);
00083
00084     /** Create a grey converted copy of source image in this.
00085         Release() and Init() are called if necessary.
00086         @author Felix Woelk **/
00087     template <class StorageType>
00088     BIASImageBase_EXPORT
00089     static int ToGrey(const Image<StorageType>& source,
00090                       Image<StorageType>& dest);
00091
00092
00093
00094     /** Create a RGB converted copy of source image in this.
00095         Release() and Init() are called if necessary.
00096         @author Felix Woelk **/
00097     template <class StorageType>
00098     BIASImageBase_EXPORT
00099     static int ToRGB(Image<StorageType>& source, Image<StorageType>& dest);
00100
00101     /** create a HSV converted copy of source image in this
00102         Release() and Init() are called if necessary.
00103         HSV space is implemented as a cylinder not as a cone!
00104         only for float and unsigned char
00105         @author Felix Woelk  partially tested **/
00106     template <class StorageType>
00107     BIASImageBase_EXPORT
00108     static int ToHSV(Image<StorageType>& source, Image<StorageType>& dest);
00109
00110     /** create a HSL converted copy of source image in this
00111         Release() and Init() are called if necessary.
00112         only for float and unsigned char
00113         @author Daniel Grest, April 2003
00114         @status tested for unsigned char interleaved
00115     */
00116     template <class StorageType>
00117     BIASImageBase_EXPORT
00118     static int ToHSL(Image<StorageType>& source, Image<StorageType>& dest);
00119
00120     /** create a hsL converted copy of source image in this
00121         Release() and Init() are called if necessary.
00122         only for unsigned char
00123         similar to HSL but in euclidean coordinates for the CNCC
00124         @author Daniel Grest, June 2003
00125         @status tested for unsigned char interleaved
00126     */
00127     template <class StorageType>
00128     BIASImageBase_EXPORT
00129     static int TohsL(Image<StorageType>& source, Image<StorageType>& dest);
00130
00131     /** Takes the source image, and build an interleaved version
00132         @author Ingo Thomsen
00133         @date 11.06.2002
00134         @status tested
00135         @todo make it work for yuv **/
00136     template <class StorageType>
00137     BIASImageBase_EXPORT
00138     static int ToInterleaved(Image<StorageType>& source,
00139                              Image<StorageType>& dest);
00140
00141     /** Takes the three channels an compose one interleaved RGB image */
00142     template <class StorageType>
00143     BIASImageBase_EXPORT
00144     static int ToInterleavedRGB(Image<StorageType>& red,
00145                                 Image<StorageType>& green,
00146                                 Image<StorageType>& blue,
00147                                 Image<StorageType>& dest);
00148
00149     /** Converts the existing image to an planar version,
00150         @author Ingo Thomsen
00151         @date 03.04.2002
00152         @status none
00153         case CM_YUYV422 not yet tested **/
00154     template <class StorageType>
00155     BIASImageBase_EXPORT
00156     static int ToPlanar(Image<StorageType>& source,
00157                         Image<StorageType>& dest);
00158
00159     /** extracts color planes to argument images without changing source.
00160         So far only implemented for CM_YUYV422
00161         @author Felix Woelk
00162         @status alpha (18/04/2002) */
00163     template <class StorageType>
00164     BIASImageBase_EXPORT
00165     static int FromInterleaved(Image<StorageType>& source,
00166                                Image<StorageType>& Image1,
00167                                Image<StorageType>& Image2,
00168                                Image<StorageType>& Image3);
00169
00170     /////////////////////////////////////////////////////////////////
00171     /// foreign image formats, ipl, vil
00172     /// so far untested
00173     /////////////////////////////////////////////////////////////////
00174
00175 #ifdef BIAS_HAVE_DV
00176     /** Can specify speed/quality trade off
00177         0 : monochrome , DC coeffs only
00178         1 : monochrome , AC 1 coeffs
00179         2 : color ,  DC coeffs only
00180         3 : color , AC 1 coeffs
00181         4 : color, AC 2 coeffs (slowest but best quality)
00182     */
00183     template <class StorageType>
00184     static int DVToRGB_(const Image<StorageType>& source,
00185                         Image<StorageType>& dest,unsigned char quality=4);
00186 #endif
00187
00188
00189 #ifdef BIAS_HAVE_OPENCV
00190     /** Returns a new, separate IplImage for use with OpenCV created rom teh source BIAS Image.
00191         The dest has to be a call by reference "*&" because the pointer itself is changed due to new (JW).
00192         The colorChannel order is swapped because OpenCv used BGR - which may be inefficient.
00193         See WrapBias2Ipl class, too (jw).
00194         @return newly created IplImage
00195         @todo   ROIs are not yet kept, when converted to IplImages
00196         @author Ingo Thomsen 04.05.2002, Jan Woetzel 2005
00197     */
00198     template <class StorageType>
00199     static int BIAS2ipl(const Image<StorageType>& source, IplImage* &dest);
00200
00201     /** Takes the image information and data of an existing IplImage
00202         and builds a Image. The existing data is discarded.
00203
00204         @author Ingo Thomsen
00205         @date 04.17.2002
00206         @return -1 in case of failure
00207         @param image The IplImage to be transfered
00208         @status untested
00209
00210         @todo Make it work for colored images
00211         @todo Make it work for ROIs **/
00212     template <class StorageType>
00213     static int Ipl2BIAS(IplImage* source, Image<StorageType>& dest);
00214 #endif // BIAS_HAVE_OPENCV
00215
00216
00217   protected:
00218     template <class StorageType>
00219     static int IP_RGBToGrey_(Image<StorageType> &img);
00220
00221     template <class StorageType>
00222     static int IP_YUV422ToGrey_(Image<StorageType> &img);
00223
00224     template <class StorageType>
00225     static int BGRToRGB_(Image<StorageType>& source, Image<StorageType>& dest);
00226
00227     template <class StorageType>
00228     static int YUV422ToRGB_(Image<StorageType>& source,
00229                             Image<StorageType>& dest);
00230
00231
00232     template <class StorageType>
00233     static int YUV420PToRGB_(Image<StorageType>& source,
00234                              Image<StorageType>&  dest ) ;
00235
00236     template <class StorageType>
00237     static int YUV420PToGrey_(const Image<StorageType>& source,
00238                               Image<StorageType>&  dest ) ;
00239     template <class StorageType>
00240     static int GreyToRGB_(Image<StorageType>& source,
00241                           Image<StorageType>& dest);
00242
00243
00244     template <class StorageType>
00245     static int RGBToGrey_(const Image<StorageType>& source,
00246                           Image<StorageType>& dest);
00247
00248     template <class StorageType>
00249     static int YUV422ToGrey_(const Image<StorageType> &source,
00250                              Image<StorageType>& dest);
00251
00252   public:
00253     /** added border calculation, woelk
00254         @authour evers, woelk*/
00255     template <class StorageType>
00256     static int BayerToRGB_(Image<StorageType>& source,
00257                            Image<StorageType>&  dest );
00258   protected:
00259     /** this is the right way, green interpoaltion is mostly done
00260         out of two values
00261         no visible difference to fast calculation as used above
00262         @author woelk 03 2003 */
00263     template <class StorageType>
00264     static int BayerToRGBSlow_(Image<StorageType>& source,
00265                                Image<StorageType>&  dest );
00266     /** interpolates, better than above
00267         @author woelk 03 2003 */
00268     template <class StorageType>
00269     static int BayerToGrey_(const Image<StorageType>& source,
00270                             Image<StorageType>& dest);
00271
00272
00273
00274   protected:
00275     /** just copies the L channel
00276         @author Daniel Grest */
00277     template <class StorageType>
00278     static int HSLToGrey_(const Image<StorageType>& source,
00279                           Image<StorageType>& dest);
00280
00281
00282
00283     // helper function for ToPlanar(Image<StorageType>& source)
00284     template <class StorageType>
00285     static int ToPlanarYUYV422_(Image<StorageType>& source,
00286                                 Image<StorageType>& dest);
00287
00288     template <class StorageType>
00289     static int ToPlanarRGB_(Image<StorageType>& source,
00290                             Image<StorageType>& dest);
00291
00292     // helper function for ToInterleaved(Image<StorageType>& source)
00293     template <class StorageType>
00294     static int ToInterleavedYUYV422_(Image<StorageType>& source,
00295                                      Image<StorageType>& dest);
00296     template <class StorageType>
00297     static int ToInterleavedRGB_(Image<StorageType>& source,
00298                                  Image<StorageType>& dest);
00299
00300     template <class StorageType>
00301     static int FromInterleavedYUYV422_(Image<StorageType>& source,
00302                                        Image<StorageType>& Y,
00303                                        Image<StorageType>& U,
00304                                        Image<StorageType>& V);
00305
00306     template <class StorageType>
00307     static int FromInterleavedRGB_(Image<StorageType>& source,
00308                                    Image<StorageType>& R,
00309                                    Image<StorageType>& G,
00310                                    Image<StorageType>& B);
00311
00312     /// so far only implemented for StorageType=float
00313     //template <class StorageType>
00314     template <class StorageType>
00315     static int RGBToHSV_(Image<StorageType>& source,
00316                          Image<StorageType>& dest);
00317
00318
00319     template <class StorageType>
00320     static int RGBToHSL_(Image<StorageType>& source,
00321                          Image<StorageType>& dest);
00322
00323
00324     template <class StorageType>
00325     static int BGRToHSL_(Image<StorageType>& source,
00326                          Image<StorageType>& dest);
00327
00328     template <class StorageType>
00329     static int BGRAToHSL_(Image<StorageType>& source,
00330                           Image<StorageType>& dest);
00331
00332
00333     template <class StorageType>
00334     BIASImageBase_EXPORT
00335     static int RGBTohsL_(Image<StorageType>& source,
00336                          Image<StorageType>& dest);
00337
00338
00339     template <class StorageType>
00340     BIASImageBase_EXPORT
00341     static int RGBAToRGB_(Image<StorageType>& source,
00342                           Image<StorageType>& dest);
00343
00344     template <class StorageType>
00345     BIASImageBase_EXPORT
00346     static int BGRAToRGB_(Image<StorageType>& source,
00347                           Image<StorageType>& dest);
00348
00349     //in WIN32 forward declarations for specialized function templates are needed
00350 #ifdef _WIN32
00351     template <>
00352     //BIASImageBase_EXPORT
00353     static int RGBToHSV_(Image<float>& source,
00354                          Image<float>& dest);
00355
00356     template <>
00357     //BIASImageBase_EXPORT
00358     static int RGBToHSV_(Image<unsigned char>& source,
00359                          Image<unsigned char>& dest);
00360
00361     template <>
00362     //BIASImageBase_EXPORT
00363     static int RGBToHSL_(Image<float>& source,
00364                          Image<float>& dest);
00365
00366     template <>
00367     //BIASImageBase_EXPORT
00368     static int RGBToHSL_(Image<unsigned char>& source,
00369                          Image<unsigned char>& dest);
00370
00371     template <>
00372     //BIASImageBase_EXPORT
00373     static int BGRToHSL_(Image<unsigned char>& source,
00374                          Image<unsigned char>& dest);
00375
00376     template <>
00377     //BIASImageBase_EXPORT
00378     static int RGBTohsL_(Image<int>& source,
00379                          Image<int>& dest);
00380
00381     template <>
00382     //BIASImageBase_EXPORT
00383     static int RGBTohsL_(Image<unsigned char>& source,
00384                          Image<unsigned char>& dest);
00385
00386 #endif
00387     //...
00388
00389
00390     static int FloatToUC_(const ImageBase &source, ImageBase &dest);
00391
00392
00393
00394 #ifdef BIAS_HAVE_DV
00395     static dv_decoder_t *DVDecoder_;
00396 #endif
00397
00398   };
00399
00400 } // namespace
00401
00402
00403 #endif
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertInstantiation.cpp Source File

Base » Image

ImageConvertInstantiation.cpp

Go to the documentation of this file.
00001 #include "bias_config.h"
00002
00003 ///
00004 /// solve explicit instantiation
00005 /// this file is included by ImageConvert.cpp
00006 /// @author Jan Woetzel
00007 ///
00008
00009 #define INSTANCE_ImageConvert(type)\
00010 template BIASImageBase_EXPORT int ImageConvert::IP_ToGrey(Image<type> &img);\
00011 template BIASImageBase_EXPORT int ImageConvert::ToGrey(const Image<type>& source, Image<type>& dest);\
00012 template BIASImageBase_EXPORT int ImageConvert::ToRGB(Image<type>& source, Image<type>& dest);\
00013 template BIASImageBase_EXPORT int ImageConvert::ToHSV(Image<type>& source,Image<type>& dest);\
00014 template BIASImageBase_EXPORT int ImageConvert::ToHSL(Image<type>& source,Image<type>& dest);\
00015 template BIASImageBase_EXPORT int ImageConvert::TohsL(Image<type>& source,Image<type>& dest);\
00016 template BIASImageBase_EXPORT int ImageConvert::ToInterleaved(Image<type>& source, Image<type>& dest);\
00017 template BIASImageBase_EXPORT int ImageConvert::ToInterleavedRGB(Image<type>& red, Image<type>& green, Image<type>& blue, Image<type>& dest);\
00018 template BIASImageBase_EXPORT int ImageConvert::ToPlanar(Image<type>& source, Image<type>& dest);\
00019 template BIASImageBase_EXPORT int ImageConvert::FromInterleaved(Image<type>& source, Image<type>& Image1, Image<type>& Image2, Image<type>& Image3);\
00020 template BIASImageBase_EXPORT int ImageConvert::IP_RGBToGrey_(Image<type> &img);\
00021 template BIASImageBase_EXPORT int ImageConvert::IP_YUV422ToGrey_(Image<type> &img);\
00022 template BIASImageBase_EXPORT int ImageConvert::BGRToRGB_(Image<type>& source, Image<type>& dest);\
00023 template BIASImageBase_EXPORT int ImageConvert::YUV422ToRGB_(Image<type>& source, Image<type>& dest);\
00024 template BIASImageBase_EXPORT int ImageConvert::GreyToRGB_(Image<type>& source, Image<type>& dest);\
00025 template BIASImageBase_EXPORT int ImageConvert::RGBToGrey_(const Image<type>& source, Image<type>& dest);\
00026 template BIASImageBase_EXPORT int ImageConvert::HSLToGrey_(const Image<type>& source, Image<type>& dest);\
00027 template BIASImageBase_EXPORT int ImageConvert::YUV422ToGrey_(const Image<type> &source, Image<type>& dest);\
00028 template BIASImageBase_EXPORT int ImageConvert::ToPlanarYUYV422_(Image<type>& source, Image<type>& dest);    \
00029 template BIASImageBase_EXPORT int ImageConvert::ToPlanarRGB_(Image<type>& source, Image<type>& dest);\
00030 template BIASImageBase_EXPORT int ImageConvert::ToInterleavedYUYV422_(Image<type>& source, Image<type>& dest);\
00031 template BIASImageBase_EXPORT int ImageConvert::ToInterleavedRGB_(Image<type>& source, Image<type>& dest);\
00032 template BIASImageBase_EXPORT int ImageConvert::FromInterleavedYUYV422_(Image<type>& source, Image<type>& Y, Image<type>& U, Image<type>& V);\
00033 template BIASImageBase_EXPORT int ImageConvert::FromInterleavedRGB_(Image<type>& source, Image<type>& R,  Image<type>& G, Image<type>& B);\
00034 template BIASImageBase_EXPORT int ImageConvert::BayerToGrey_(const Image<type>& source, Image<type>& dest);\
00035 template BIASImageBase_EXPORT int ImageConvert::BayerToRGB_(Image<type>& source, Image<type>& dest);\
00036 template BIASImageBase_EXPORT int ImageConvert::BayerToRGBSlow_(Image<type>& source, Image<type>& dest);
00037
00038
00039 #ifdef BIAS_HAVE_OPENCV
00040 #define INSTANCE_ImageConvert_OPENCV(cvt)\
00041 template BIASImageBase_EXPORT int ImageConvert::BIAS2ipl(const Image<cvt>& source, IplImage* &dest);\
00042 template BIASImageBase_EXPORT int ImageConvert::Ipl2BIAS(IplImage* source, Image<cvt>& dest);
00043 #else
00044 #define INSTANCE_ImageConvert_OPENCV(cvt)
00045 #endif
00046
00047
00048 #ifdef BIAS_HAVE_DV
00049 #define INSTANCE_ImageConvert_DV(dvtype)\
00050 template BIASImageBase_EXPORT int ImageConvert::DVToRGB_(const Image<dvtype>& source, Image<dvtype>& dest,unsigned char quality);
00051 #else
00052 #define INSTANCE_ImageConvert_DV(dvtype)
00053 #endif
00054
00055
00056
00057
00058
00059 // all instances for one type:
00060 #define INSTI(atype)   INSTANCE_ImageConvert(atype) INSTANCE_ImageConvert_OPENCV(atype) INSTANCE_ImageConvert_DV(atype)
00061
00062
00063 INSTI(unsigned char)
00064 INSTI(float)
00065 #ifdef BUILD_IMAGE_INT
00066 INSTI(int)
00067 #endif
00068 #ifdef BUILD_IMAGE_CHAR
00069 INSTI(char)
00070 #endif
00071 #ifdef BUILD_IMAGE_SHORT
00072 INSTI(short)
00073 #endif
00074 #if defined(BUILD_IMAGE_USHORT)
00075 INSTI(unsigned short)
00076 #endif
00077 #ifdef BUILD_IMAGE_DOUBLE
00078 INSTI(double)
00079 #endif
00080 #ifdef BUILD_IMAGE_UINT
00081 INSTI(unsigned int)
00082 #endif
00083
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertThreaded.cpp Source File

Base » Image

ImageConvertThreaded.cpp

Go to the documentation of this file.
00001 #include "ImageConvertThreaded.hh"
00002
00003 #include <Base/Debug/Exception.hh>
00004
00005 //TODO pthread DLL is linked into this DLL!
00006 //#ifdef BIASImageBase_EXPORTS
00007 //#  define PTW32_BUILD
00008 //#  define _DLL
00009 //#endif // BIASImageBase_EXPORTS
00010 #include <pthread.h>
00011
00012
00013
00014 using namespace BIAS;
00015 using namespace std;
00016
00017 BIAS::ImageConvertThreaded::
00018 ImageConvertThreaded()
00019 {}
00020
00021
00022 BIAS::ImageConvertThreaded::
00023 ~ImageConvertThreaded()
00024 {}
00025
00026
00027 struct ThreadArg__ {
00028   ImageBase *src, *dst;
00029   ImageBase::EColorModel colormodel;
00030   bool planar;
00031 };
00032
00033 int BIAS::ImageConvertThreaded::
00034 ConvertThreaded(BIAS::ImageBase &source, BIAS::ImageBase &dest,
00035                 enum BIAS::ImageBase::EColorModel targetColorModel,
00036                 bool bPlanar, const int num_threads)
00037 {
00038   vector<ImageBase> src(num_threads), dst(num_threads);
00039   vector<ThreadArg__> arg(num_threads);
00040   vector<pthread_t> thread(num_threads);
00041
00042   SplitImage_(source, num_threads, src);
00043
00044   for (int i=0; i<num_threads; i++){
00045     arg[i].src = &(src[i]);
00046     arg[i].dst = &(dst[i]);
00047     arg[i].colormodel = targetColorModel;
00048     arg[i].planar = bPlanar;
00049     if (pthread_create(&(thread[i]), NULL, ConvertThread_, &(arg[i]))!=0){
00050       BEXCEPTION("error creating thread "<<i);
00051     }
00052   }
00053
00054   int overall_result = 0;
00055   vector<int> res(num_threads);
00056   void *result=NULL;
00057   for (int i=0; i<num_threads; i++){
00058     if (pthread_join(thread[i], &result)!=0){
00059       BEXCEPTION("error joining thread "<<i);
00060     }
00061     res[i] = *(int *)result;
00062     if (res[i]!=0) { overall_result--; }
00063     delete (int *)result;
00064     result = NULL;
00065   }
00066
00067   int tlx, tly, brx, bry;
00068   source.GetROI()->GetCorners(tlx, tly, brx, bry);
00069   if (!source.SamePixelAndChannelCount(dest)){
00070     if (!dest.IsEmpty()){ dest.Release(); }
00071   }
00072   if (dest.IsEmpty()){
00073     dest.Init(source.GetWidth(), source.GetHeight(), dst[0].GetChannelCount(),
00074               dst[0].GetStorageType(), dst[0].IsInterleaved());
00075   }
00076   dest.SetColorModel(dst[0].GetColorModel());
00077   dest.GetROI()->SetCorners(tlx, tly, brx, bry);
00078   MergeImage_(dst, dest);
00079
00080   return overall_result;
00081 }
00082
00083 void *BIAS::ImageConvertThreaded::
00084 ConvertThread_(void *arg)
00085 {
00086   ThreadArg__ *targ = static_cast<ThreadArg__ *>(arg);
00087   int *res = new int;
00088   *res = ImageConvert::Convert(*(targ->src), *(targ->dst),
00089                                targ->colormodel, targ->planar);
00090   return static_cast<void *>(res);
00091 }
00092
00093 void BIAS::ImageConvertThreaded::
00094 SplitImage_(const ImageBase &source, const int num,
00095             std::vector<ImageBase> &parts)
00096 {
00097   if ((int)parts.size()!=num){
00098     parts.resize(num);
00099   }
00100   ImageBase src(source); // de-const
00101   switch (num){
00102   case 2:
00103     int tlx, tly, brx, bry;
00104     src.GetROI()->GetCorners(tlx, tly, brx, bry);
00105     src.GetROI()->SetCorners(tlx, tly, brx, bry/2);
00106     if (src.GetCopyOfROI(parts[0])!=0){
00107       BEXCEPTION("error copying ROI");
00108     }
00109     src.GetROI()->SetCorners(tlx, bry/2, brx, bry);
00110     if (src.GetCopyOfROI(parts[1])!=0){
00111       BEXCEPTION("error copying ROI");
00112     }
00113     break;
00114   default:
00115     BEXCEPTION("only 2 threads are supported");
00116     break;
00117   }
00118 }
00119
00120 void BIAS::ImageConvertThreaded::
00121 MergeImage_(const std::vector<ImageBase>& parts,
00122             ImageBase& dst)
00123 {
00124   switch (parts.size()){
00125   case 2:
00126     int tlx, tly, brx, bry;
00127     dst.GetROI()->GetCorners(tlx, tly, brx, bry);
00128     dst.GetROI()->SetCorners(tlx, tly, brx, bry/2);
00129     dst.Paste2ROI(parts[0]);
00130     dst.GetROI()->SetCorners(tlx, bry/2, brx, bry);
00131     dst.Paste2ROI(parts[1]);
00132     dst.GetROI()->SetCorners(tlx, tly, brx, bry);
00133     break;
00134   default:
00135     BEXCEPTION("only 2 threads are supported");
00136     break;
00137   }
00138 }
00139
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageConvertThreaded.hh Source File

Base » Image

ImageConvertThreaded.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef _ImageConvertThreaded_hh_
00026 #define _ImageConvertThreaded_hh_
00027
00028 #include <bias_config.h>
00029 #ifndef BIAS_HAVE_PTHREADS
00030 #  error You need pthreads. please recompile BIAS with USE_PTHREADS.
00031 #endif // BIAS_HAVE_PTHREADS
00032
00033 #include "ImageConvert.hh"
00034
00035 namespace BIAS {
00036
00037   class BIASImageBase_EXPORT ImageConvertThreaded
00038     : public ImageConvert
00039   {
00040   public:
00041     ImageConvertThreaded();
00042
00043     ~ImageConvertThreaded();
00044
00045     static int ConvertThreaded(BIAS::ImageBase &source, BIAS::ImageBase &dest,
00046                                enum BIAS::ImageBase::EColorModel targetColorModel,
00047                                bool bPlanar=false, const int num_threads = 2);
00048
00049   protected:
00050     // splits source image into num non overlapping destination images
00051     // only num=2 is supported
00052     static void SplitImage_(const ImageBase &source, const int num,
00053                             std::vector<ImageBase> &parts);
00054
00055     static void MergeImage_(const std::vector<ImageBase>& parts,
00056                             ImageBase& dest);
00057
00058     static void *ConvertThread_(void *arg);
00059
00060   };
00061
00062
00063 } // namespace
00064
00065
00066 #endif // _ImageConvertThreaded_hh_
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageDraw.cpp Source File

Base » Image

ImageDraw.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Common/W32Compat.hh>
00027 #include "ImageDraw.hh"
00028 #include <math.h>
00029 #include "Bresenham.hh"
00030 #include "BresenhamCircle.hh"
00031
00032 #include <Base/Math/Vector2.hh>
00033 #ifdef BIAS_HAVE_OPENCV
00034 #  include <Base/Image/WrapBias2Ipl.hh>
00035 #endif
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 namespace BIAS {
00041
00042 template <class StorageType>
00043 StorageType ImageDraw<StorageType>::GetContrastValue(StorageType t)
00044 {
00045     BIASERR("Dont know what good contrast for "<<t<<" would be for StorageType "
00046         <<PRINTTYPE(StorageType));
00047     return (StorageType)0;
00048 }
00049
00050 template <>
00051 unsigned char ImageDraw<unsigned char>::GetContrastValue(unsigned char t)
00052 {
00053     return ((int)t>128)?(unsigned char)0:(unsigned char)255;
00054 }
00055
00056 template <>
00057 float ImageDraw<float>::GetContrastValue(float t)
00058 {
00059     return float((t>0.0)?-1.0:1.0);
00060 }
00061
00062
00063 /////////
00064 // rectangles
00065
00066 template <class StorageType>
00067 int ImageDraw<StorageType>::RectangleCorners(Image<StorageType>& im,
00068                                              unsigned int minx,
00069                                              unsigned int miny,
00070                                              unsigned int maxx,
00071                                              unsigned int maxy,
00072                                              const StorageType Value[])
00073 {
00074     BIASASSERT(minx<im.GetWidth());
00075     BIASASSERT(miny<im.GetHeight());
00076     BIASASSERT(maxx<im.GetWidth());
00077     BIASASSERT(maxy<im.GetHeight());
00078
00079     register StorageType **ida = im.GetImageDataArray();
00080     register unsigned int xp1, xp2;
00081     for (register unsigned int x = minx; x <= maxx; x++){
00082         xp1 = x * im.GetChannelCount();
00083         for (register unsigned int c=0; c< im.GetChannelCount(); c++)
00084             ida[miny][xp1+c]=ida[maxy][xp1+c]=Value[c];
00085     }
00086     // left and right lines
00087     xp1=minx*im.GetChannelCount();
00088     xp2=maxx*im.GetChannelCount();
00089     for (register unsigned int y = miny; y <= maxy; y++){
00090         for (register unsigned int c=0; c< im.GetChannelCount(); c++)
00091             ida[y][xp1+c]=ida[y][xp2+c]=Value[c];
00092     }
00093     return 0;
00094 }
00095
00096
00097 template <class StorageType>
00098 int ImageDraw<StorageType>::RectangleCorners(Image<StorageType>& im,
00099                                              unsigned int minx,
00100                                              unsigned int miny,
00101                                              unsigned int maxx,
00102                                              unsigned int maxy,
00103                                              const StorageType value)
00104 {
00105     StorageType *val = new StorageType[im.GetChannelCount()];
00106     for (register unsigned int i=0; i<im.GetChannelCount(); i++)
00107         val[i]=value;
00108     return RectangleCorners(im, minx, miny, maxx, maxy, val);
00109 }
00110
00111
00112 template <class StorageType>
00113 int ImageDraw<StorageType>::RectangleCorners(Image<StorageType>& im,
00114                                              unsigned int minx,
00115                                              unsigned int miny,
00116                                              unsigned int maxx,
00117                                              unsigned int maxy)
00118 {
00119     register StorageType **ida = im.GetImageDataArray();
00120     register unsigned int xp1, xp2;
00121     for (register unsigned int x = minx; x <= maxx; x++){
00122         xp1 = x * im.GetChannelCount();
00123         for (register unsigned int c=0; c< im.GetChannelCount(); c++){
00124             ida[miny][xp1+c]=GetContrastValue(ida[miny][xp1+c]);
00125             ida[maxy][xp1+c]=GetContrastValue(ida[maxy][xp1+c]);
00126         }
00127     }
00128     // left and right lines
00129     xp1=minx*im.GetChannelCount();
00130     xp2=maxx*im.GetChannelCount();
00131     for (register unsigned int y = miny+1; y < maxy; y++){
00132         for (register unsigned int c=0; c< im.GetChannelCount(); c++){
00133             ida[y][xp1+c]=GetContrastValue(ida[y][xp1+c]);
00134             ida[y][xp2+c]=GetContrastValue(ida[y][xp2+c]);
00135         }
00136     }
00137     return 0;
00138 }
00139
00140 template <class StorageType>
00141 int ImageDraw<StorageType>::RectangleCornersGrey(Image<StorageType>& im,
00142                                                  unsigned int minx,
00143                                                  unsigned int miny,
00144                                                  unsigned int maxx,
00145                                                  unsigned int maxy,
00146                                                  StorageType GreyValue)
00147 {
00148     register StorageType *ImageDataPointer, *ImageDataPointer2;
00149     register unsigned int Width = im.GetWidth();
00150     // horizontal lines lines
00151     ImageDataPointer = im.GetImageData() +
00152         im.GetPixelPosition(minx,miny);
00153     ImageDataPointer2 = im.GetImageData() +
00154         im.GetPixelPosition(minx,maxy);
00155     for (register unsigned int i = 0; i <= maxx - minx; i++){
00156         *ImageDataPointer = GreyValue;
00157         *ImageDataPointer2 = GreyValue;
00158         ImageDataPointer++;
00159         ImageDataPointer2++;
00160     }
00161     // left and right lines
00162     ImageDataPointer = im.GetImageData() +
00163         im.GetPixelPosition(minx,miny+1);
00164     ImageDataPointer2 = im.GetImageData() +
00165         im.GetPixelPosition(maxx,miny+1);
00166     // top and bottom lines
00167     const unsigned int rowsminusone = maxy - miny ;
00168     for (register unsigned int i = 1; i < rowsminusone; i++){
00169         *ImageDataPointer = GreyValue;
00170         *ImageDataPointer2 = GreyValue;
00171         ImageDataPointer += Width;
00172         ImageDataPointer2 += Width;
00173     }
00174     return 0;
00175 }
00176
00177
00178 template <class StorageType>
00179 int ImageDraw<StorageType>::RectangleCornersGreyFill(Image<StorageType>& im,
00180                                                      unsigned int minx,
00181                                                      unsigned int miny,
00182                                                      unsigned int maxx,
00183                                                      unsigned int maxy,
00184                                                      StorageType GreyValue)
00185 {
00186     register StorageType *ImageDataPointer;
00187
00188     for (unsigned int row=miny;row<=maxy;row++) {
00189         ImageDataPointer = im.GetImageData() +
00190             im.GetPixelPosition(minx,row);
00191         for (register unsigned int i = 0; i <= maxx - minx; i++){
00192             *ImageDataPointer = GreyValue;
00193             ImageDataPointer++;
00194         }
00195     }
00196     return 0;
00197 }
00198
00199
00200 template <class StorageType>
00201 int ImageDraw<StorageType>::RectangleCenter(Image<StorageType>& im,
00202                                             unsigned int X, unsigned int Y,
00203                                             unsigned int Size,
00204                                             const StorageType Value[])
00205 {
00206 #ifdef BIAS_DEBUG
00207     if (Size > (unsigned int)im.GetWidth() ||
00208         Size > (unsigned int)im.GetHeight())
00209         BIASERR("wrong Size "<<Size);
00210 #endif
00211     unsigned int Halfsize = Size >> 1;
00212     if (im.GetChannelCount()==1){
00213         return RectangleCornersGrey(im, (X>Halfsize)?X-Halfsize:0,
00214             (Y>Halfsize)?Y-Halfsize:0,
00215             (X<im.GetWidth()-Halfsize)?
00216             (X+Halfsize):(im.GetWidth()-1),
00217             (Y<im.GetHeight()-Halfsize)?
00218             (Y+Halfsize):(im.GetHeight()-1),
00219             Value[0]);
00220     } else {
00221         return RectangleCorners(im, (X>Halfsize)?X-Halfsize:0,
00222             (Y>Halfsize)?Y-Halfsize:0,
00223             (X<im.GetWidth()-Halfsize)?
00224             (X+Halfsize):(im.GetWidth()-1),
00225             (Y<im.GetHeight()-Halfsize)?
00226             (Y+Halfsize):(im.GetHeight()-1),
00227             Value);
00228     }
00229 }
00230
00231
00232 template <class StorageType>
00233 int ImageDraw<StorageType>::RectangleCenterGrey(Image<StorageType>& im,
00234                                                 unsigned int X, unsigned int Y,
00235                                                 unsigned int Size,
00236                                                 const StorageType Value)
00237 {
00238 #ifdef BIAS_DEBUG
00239     if (Size > (unsigned int)im.GetWidth() ||
00240         Size > (unsigned int)im.GetHeight())
00241         BIASERR("wrong Size "<<Size);
00242 #endif
00243     unsigned int Halfsize = Size >> 1;
00244     return RectangleCornersGrey(im, (X>Halfsize)?X-Halfsize:0,
00245         (Y>Halfsize)?Y-Halfsize:0,
00246         (X<im.GetWidth()-Halfsize)?
00247         (X+Halfsize):(im.GetWidth()-1),
00248         (Y<im.GetHeight()-Halfsize)?
00249         (Y+Halfsize):(im.GetHeight()-1),
00250         Value);
00251 }
00252
00253 template <class StorageType>
00254 int ImageDraw<StorageType>::RectangleCenterGreyFill(Image<StorageType>& im,
00255                                                     unsigned int X,
00256                                                     unsigned int Y,
00257                                                     unsigned int Size,
00258                                                     StorageType Value)
00259 {
00260 #ifdef BIAS_DEBUG
00261     if (Size > (unsigned int)im.GetWidth() ||
00262         Size > (unsigned int)im.GetHeight())
00263         BIASERR("wrong Size "<<Size);
00264 #endif
00265     unsigned int Halfsize = Size >> 1;
00266     return RectangleCornersGreyFill(im, (X>Halfsize)?X-Halfsize:0,
00267         (Y>Halfsize)?Y-Halfsize:0,
00268         (X<im.GetWidth()-Halfsize)?
00269         (X+Halfsize):(im.GetWidth()-1),
00270         (Y<im.GetHeight()-Halfsize)?
00271         (Y+Halfsize):(im.GetHeight()-1),
00272         Value);
00273 }
00274
00275
00276
00277 template <class StorageType>
00278 int ImageDraw<StorageType>::RectangleCenter(Image<StorageType>& im, unsigned int x,
00279                                             unsigned int y, unsigned int size)
00280 {
00281     unsigned int Halfsize = size >> 1;
00282     return RectangleCorners(im, (x>Halfsize)?x-Halfsize:0,
00283         (y>Halfsize)?y-Halfsize:0,
00284         (x<im.GetWidth()-Halfsize)?(x+Halfsize):(im.GetWidth()-1),
00285         (y<im.GetHeight()-Halfsize)?
00286         (y+Halfsize):(im.GetHeight()-1));
00287 }
00288
00289 template <class StorageType>
00290 int ImageDraw<StorageType>::RectangleCenter(Image<StorageType>& im,
00291                                             unsigned int coo[2],
00292                                             unsigned int size)
00293 { return RectangleCenter(im, coo[0], coo[1], size); }
00294
00295 /////////////////////////////////////////////////////////////////////////
00296 // lines
00297 /////////////////////////////////////////////////////////////////////////
00298
00299 template <class StorageType>
00300 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00301                                  const int start[2],
00302                                  const int end[2],
00303                                  const StorageType value[])
00304 {
00305     BIASASSERT(start[0]>=0);
00306     BIASASSERT(start[1]>=0);
00307     BIASASSERT(end[0]>=0);
00308     BIASASSERT(end[1]>=0);
00309
00310     unsigned int us[2], ue[2];
00311     us[0] = (unsigned)start[0];
00312     us[1] = (unsigned)start[1];
00313     ue[0] = (unsigned)end[0];
00314     ue[1] = (unsigned)end[1];
00315
00316     return Line(im, us, ue, value);
00317 }
00318
00319 template <class StorageType>
00320 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00321                                  const unsigned int start[2],
00322                                  const unsigned int end[2],
00323                                  const StorageType value[])
00324 {
00325 #ifdef BIAS_DEBUG
00326   if (start[0]>=im.GetWidth() ||
00327       start[1]>=im.GetHeight() ||
00328       end[0]>=im.GetWidth() ||
00329       end[1]>=im.GetHeight())
00330   {
00331     BIASERR("start- or end-point of line outside of "<<im.GetWidth()<<"x"
00332             <<im.GetHeight()<<" image: ("<<start[0]<<", "
00333             <<start[1]<<") -> ("<<end[0]<<", "<<end[1]<<") "
00334             <<" skipping drawing Line."
00335             );
00336     return -1;
00337     //BIASASSERT(false);
00338   }
00339 #endif
00340   unsigned int next[2];
00341   Bresenham bres(start, end);
00342
00343   next[0]=start[0];
00344   next[1]=start[1];
00345
00346   StorageType **ida=im.GetImageDataArray();
00347   do {
00348     if (next[0]<0 || next[0]>=im.GetWidth() ||
00349         next[1]<0 || next[1]>=im.GetHeight())
00350       break;
00351     for (unsigned int c=0; c<im.GetChannelCount(); c++)
00352       ida[next[1]][next[0]*im.GetChannelCount()+c]=value[c];
00353   } while (bres.GetNext(next));
00354   return 0;
00355 }
00356
00357 template <class StorageType>
00358 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00359                                  const unsigned int start[2],
00360                                  const unsigned int end[2], StorageType value)
00361 {
00362 #ifdef BIAS_DEBUG
00363   if (start[0]<0 || start[0]>=im.GetWidth() ||
00364       start[1]<0 || start[1]>=im.GetHeight() ||
00365       end[0]<0 || end[0]>=im.GetWidth() ||
00366       end[1]<0 || end[1]>=im.GetHeight()){
00367     BIASERR("coordinates out of bounds "<<start[0]<<" "<<start[1]<<" "
00368             <<end[0]<<" "<<end[1]);
00369     BIASABORT;
00370   }
00371 #endif
00372   unsigned int next[2];
00373   Bresenham bres(start, end);
00374
00375   next[0]=start[0];
00376   next[1]=start[1];
00377
00378   StorageType **ida=im.GetImageDataArray();
00379   do {
00380     for (unsigned int c=0; c<im.GetChannelCount(); c++)
00381       ida[next[1]][next[0]*im.GetChannelCount()+c]=value;
00382   } while (bres.GetNext(next));
00383   return 0;
00384 }
00385
00386 template <class StorageType>
00387 int ImageDraw<StorageType>::LineGrey(Image<StorageType>& im,
00388                                      const unsigned int start[2],
00389                                      const unsigned int end[2],
00390                                      StorageType value)
00391 {
00392 #ifdef BIAS_DEBUG
00393   if (start[0]<0 || start[0]>=im.GetWidth() ||
00394       start[1]<0 || start[1]>=im.GetHeight() ||
00395       end[0]<0 || end[0]>=im.GetWidth() ||
00396       end[1]<0 || end[1]>=im.GetHeight()){
00397     BIASERR("coordinates out of bounds");
00398     BIASABORT;
00399   }
00400 #endif
00401   unsigned int next[2];
00402   Bresenham bres(start, end);
00403
00404   next[0]=start[0];
00405   next[1]=start[1];
00406
00407   StorageType **ida=im.GetImageDataArray();
00408   do {
00409     ida[next[1]][next[0]]=value;
00410   } while (bres.GetNext(next));
00411   return 0;
00412 }
00413
00414
00415 template <class StorageType>
00416 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00417                                  const unsigned int start[2],
00418                                  const unsigned int end[2])
00419 {
00420 #ifdef BIAS_DEBUG
00421   if (start[0]<0 || start[0]>=im.GetWidth() ||
00422       start[1]<0 || start[1]>=im.GetHeight() ||
00423       end[0]<0 || end[0]>=im.GetWidth() ||
00424       end[1]<0 || end[1]>=im.GetHeight()){
00425     BIASERR("coordinates out of bounds: "<<start[0]<<";"<<start[1]
00426             <<" to "<<end[0]<<";"<<end[1]);
00427     BIASABORT;
00428   }
00429 #endif
00430   unsigned int next[2];
00431   Bresenham bres(start, end);
00432
00433   next[0]=start[0];
00434   next[1]=start[1];
00435
00436   StorageType **ida=im.GetImageDataArray();
00437   do {
00438     for (unsigned int c=0; c<im.GetChannelCount(); c++)
00439       ida[next[1]][next[0]*im.GetChannelCount()+c]=
00440         GetContrastValue(ida[next[1]][next[0]*im.GetChannelCount()+c]);
00441   } while (bres.GetNext(next));
00442   return 0;
00443 }
00444
00445
00446 template <class StorageType>
00447 int ImageDraw<StorageType>::LineGrey(Image<StorageType>& im,
00448                                      const unsigned int start[2],
00449                                      const unsigned int end[2])
00450 {
00451 #ifdef BIAS_DEBUG
00452   if (start[0]<0 || start[0]>=im.GetWidth() ||
00453       start[1]<0 || start[1]>=im.GetHeight() ||
00454       end[0]<0 || end[0]>=im.GetWidth() ||
00455       end[1]<0 || end[1]>=im.GetHeight()){
00456     BIASERR("coordinates out of bounds");
00457     BIASABORT;
00458   }
00459   if (im.GetChannelCount() !=1){
00460     BIASERR("only for one channel images");
00461     BIASABORT;
00462   }
00463 #endif
00464   unsigned int next[2];
00465   Bresenham bres(start, end);
00466
00467   next[0]=start[0];
00468   next[1]=start[1];
00469
00470   StorageType **ida=im.GetImageDataArray();
00471   do {
00472     ida[next[1]][next[0]]=GetContrastValue(ida[next[1]][next[0]]);
00473   } while (bres.GetNext(next));
00474   return 0;
00475 }
00476
00477
00478
00479 template <class StorageType>
00480 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00481                                  const unsigned int StartX,
00482                                  const unsigned int StartY,
00483                                  const unsigned int EndX,
00484                                  const unsigned int EndY,
00485                                  const StorageType Value[])
00486 {
00487     unsigned int start[]={StartX, StartY}, end[]={EndX, EndY};
00488     return Line(im, start, end, Value);
00489 }
00490
00491
00492 template <class StorageType>
00493 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00494                                  const unsigned int StartX,
00495                                  const unsigned int StartY,
00496                                  const unsigned int EndX,
00497                                  const unsigned int EndY,
00498                                  const StorageType Value)
00499 {
00500     unsigned int start[]={StartX, StartY}, end[]={EndX, EndY};
00501     return Line(im, start, end, Value);
00502 }
00503
00504 template <class StorageType>
00505 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
00506                                  const unsigned int StartX,
00507                                  const unsigned int StartY,
00508                                  const unsigned int EndX,
00509                                  const unsigned int EndY)
00510 {
00511     unsigned int start[]={StartX, StartY}, end[]={EndX, EndY};
00512     return Line(im, start, end);
00513 }
00514
00515
00516
00517 template <class StorageType>
00518 int ImageDraw<StorageType>::LineGrey(Image<StorageType>& im,
00519                                      const unsigned int StartX,
00520                                      const unsigned int StartY,
00521                                      const unsigned int EndX,
00522                                      const unsigned int EndY,
00523                                      const StorageType Value)
00524 {
00525     unsigned int start[]={StartX, StartY}, end[]={EndX, EndY};
00526     return LineGrey(im, start, end, Value);
00527 }
00528
00529 // template <class StorageType>
00530 // int ImageDraw<StorageType>::LineGrey(Image<StorageType>& im,
00531 //                                      const unsigned int StartX,
00532 //                                      const unsigned int StartY,
00533 //                                      const unsigned int EndX,
00534 //                                      const unsigned int EndY,
00535 //                                      StorageType Value)
00536 // {
00537 // #ifdef BIAS_DEBUG
00538 //   if (StartX < 0 || StartX > im.GetWidth()-1 ||
00539 //       StartY < 0 || StartY > im.GetHeight()-1 ||
00540 //       EndX < 0 || EndX > im.GetWidth()-1 ||
00541 //       EndY < 0 || EndY >im.GetHeight()-1)
00542 //     BIASERR("wrong coordinates");
00543 // #endif
00544
00545 //   StorageType **ida=im.GetImageDataArray();
00546 //   int DrawX, DrawY, StX=StartX, StY=StartY, EnX=EndX, EnY=EndY;
00547 //   int OffsetX, OffsetY;
00548 //   bool _bxinv, _byinv, _over_angle;
00549 //   // seeding point, rise, ...
00550 //   int X = 0, Y = 0;
00551 //   int dY,dX, dYmX;
00552 //   int E;
00553 //   int tmp;
00554
00555 //   // shift seeding point to origin and transform
00556 //   // line to first quadrant
00557 //   //
00558 //   OffsetX=StX;
00559 //   OffsetY=StY;
00560 //   StX=0; StY=0;
00561 //   EnX=EnX-OffsetX;
00562 //   EnY=EnY-OffsetY;
00563
00564 //   // transform line to first quadrant
00565 //   if (EnX < 0) { EnX = -EnX; _bxinv = true; }
00566 //   else _bxinv = false;
00567
00568 //   if (EnY < 0) { EnY = -EnY; _byinv = true; }
00569 //   else _byinv = false;
00570
00571 //   // rise less equal 1
00572 //   if (EnX < EnY) {
00573 //     tmp = EnX; EnX = EnY; EnY = tmp;
00574 //     _over_angle = true;
00575 //   }
00576 //   else _over_angle = false;
00577
00578 //   // calculate rise
00579 //   dX = EnX-StX;
00580 //   dY = EnY-StY;
00581 //   dYmX = dY-dX;
00582
00583 //   E = dYmX+dY;
00584
00585 //   // compute Bresenham points
00586 //   for (int i=0; i<dX; i++) {
00587 //     if (_over_angle) { DrawX = Y; DrawY = X; }
00588 //     else { DrawX = X; DrawY = Y; }
00589 //     if (_bxinv) DrawX = -DrawX;
00590 //     if (_byinv) DrawY = -DrawY;
00591 //     DrawY+=OffsetY;
00592 //     DrawX+=OffsetX;
00593 //     // draw point
00594 //     ida[DrawY][DrawX]=Value;
00595 //     // image->PutPixel(&GreyValue,XCoord(X,Y),YCoord(X,Y));
00596 //     X++;
00597
00598 //     // calc next y-coordinate
00599 //     if (E > 0) { Y++; E += 2*(dYmX); }
00600 //     else  E += 2*dY;
00601 //   }
00602 //   if (_over_angle) { DrawX = Y; DrawY = X; }
00603 //   else { DrawX = X; DrawY = Y; }
00604 //   if (_bxinv) DrawX = -DrawX;
00605 //   if (_byinv) DrawY = -DrawY;
00606 //   DrawY+=OffsetY;
00607 //   DrawX+=OffsetX;
00608 //   ida[DrawY][DrawX]=Value;
00609 //   // image->PutPixel(&GreyValue,XCoord(X,Y),YCoord(X,Y));
00610 //   return 0;
00611 // }
00612
00613 #define BIAS_DRAW_CROSS_PRODUCT(a, b, res)\
00614     res[0] = a[1] * b[2] - a[2] * b[1];\
00615     res[1] = a[2] * b[0] - a[0] * b[2];\
00616     res[2] = a[0] * b[1] - a[1] * b[0];
00617
00618 #define BIAS_DRAW_PRECISION 1e-8
00619
00620 template <class StorageType>
00621 int ImageDraw<StorageType>::
00622 Line(Image<StorageType>& im, const double start[2],
00623      const double end[2],
00624      const StorageType value[])
00625 {
00626     int w=im.GetWidth();
00627     int h=im.GetHeight();
00628     double wm=(double)(w-1);
00629     double hm=(double)(h-1);
00630     unsigned uistart[2], uiend[2];
00631     double s[]={start[0], start[1], 1.0}, e[]={end[0], end[1], 1.0};
00632
00633     // the line is build by the cross product of the homogenous
00634     // start and end points
00635     double line[3];
00636     BIAS_DRAW_CROSS_PRODUCT(s, e, line);
00637
00638     // now intersect the line with the image border lines
00639     // again by using the cross product
00640     double top[]={0, -1.0, 0.0}, bottom[]={0.0, -1.0, hm};
00641     double left[]={-1.0, 0.0, 0.0}, right[]={-1.0, 0.0, wm};
00642     double intersections[4][3]; // 0=left, 1=right, 2=top, 3=bottom
00643     BIAS_DRAW_CROSS_PRODUCT(line, left,   intersections[0]);
00644     BIAS_DRAW_CROSS_PRODUCT(line, right,  intersections[1]);
00645     BIAS_DRAW_CROSS_PRODUCT(line, top,    intersections[2]);
00646     BIAS_DRAW_CROSS_PRODUCT(line, bottom, intersections[3]);
00647
00648     unsigned coo[4];
00649     bool intersect[4];
00650     int intersectioncount=0;
00651     // deal with compiler precision
00652     for (unsigned int i=0; i<4; i++){
00653         if (fabs(intersections[i][0]) < BIAS_DRAW_PRECISION)
00654             intersections[i][0] = 0.0;
00655         if (fabs(intersections[i][1]) < BIAS_DRAW_PRECISION)
00656             intersections[i][1] = 0.0;
00657         if (fabs(intersections[i][0]-wm) < BIAS_DRAW_PRECISION)
00658             intersections[i][0] = wm;
00659         if (fabs(intersections[i][1]-hm) < BIAS_DRAW_PRECISION)
00660             intersections[i][1] = hm;
00661         if (fabs(intersections[i][2]) < BIAS_DRAW_PRECISION){
00662             intersections[i][2] = 0.0;
00663             intersect[i]=false;
00664         } else { // homogenize
00665             intersections[i][0]/=intersections[i][2];
00666             intersections[i][1]/=intersections[i][2];
00667             intersect[i]=true;
00668         }
00669     }
00670
00671     // extract the intersection points into coo[]
00672     // left
00673     if (intersect[0] && intersections[0][1]>=0 && intersections[0][1]<=hm){
00674         intersectioncount++;
00675         coo[0] = 0;
00676         coo[1] = (unsigned int)rint(intersections[0][1]);
00677     }
00678     // right
00679     if (intersect[1] && intersections[1][1]>=0 && intersections[1][1]<=hm){
00680         if (intersectioncount==0){
00681             coo[0] = w- 1;
00682             coo[1] = (unsigned int)rint(intersections[1][1]);
00683         } else {
00684             coo[2] = w - 1;
00685             coo[3] = (unsigned int)rint(intersections[1][1]);
00686         }
00687         intersectioncount++;
00688     }
00689     // top
00690     if (intersect[2] && intersections[2][0]>=0 && intersections[2][0]<=wm){
00691         switch (intersectioncount){
00692     case 0:
00693         coo[0] = (unsigned int)rint(intersections[2][0]);
00694         coo[1] = 0;
00695         break;
00696     case 1:
00697         coo[2] = (unsigned int)rint(intersections[2][0]);
00698         coo[3] = 0;
00699         break;
00700     default:
00701         // do nothing, all intersections correctly calulated
00702         // because left and right intersection can not have a common point
00703         // cout << "found intersections "<<coo[0]<<", "<<coo[1]<<"  and  "<<coo[2]<<", "<<coo[3]<<"\nnew intersection "<<(unsigned int)rint(intersections[2][0])<<", 0\n";
00704         break;
00705         }
00706         intersectioncount++;
00707     }
00708     // bottom
00709     if (intersect[3] && intersections[3][0]>=0 && intersections[3][0]<=wm){
00710         switch (intersectioncount){
00711     case 0:
00712         coo[0] = (unsigned int)rint(intersections[3][0]);
00713         coo[1] = h-1;
00714         break;
00715     case 1:
00716         coo[2] = (unsigned int)rint(intersections[3][0]);
00717         coo[3] = h-1;
00718         break;
00719     case 2:
00720         // this can only happen if upper left or upper right corner of image
00721         // is intersection
00722         // It follows that the top corner is always stored in coo[2/3], because
00723         // interscetioncount was 1 when checking for interscetions with top edge
00724         coo[0] = (unsigned int)rint(intersections[3][0]);
00725         coo[1] = h-1;
00726         break;
00727     default:
00728         // do nothing, all intersections correctly calulated
00729         // cout << "found intersections "<<coo[0]<<", "<<coo[1]<<"  and  "<<coo[2]<<", "<<coo[3]<<"\nnew intersection "<<(unsigned int)rint(intersections[2][0])<<", 0\n";
00730         break;
00731         }
00732         intersectioncount++;
00733     }
00734
00735     if (intersectioncount>1){
00736
00737         // now draw the line
00738         if (start[0]>=0.0 && start[0]<=wm && start[1]>=0.0 && start[1]<=hm){
00739             // easy, start[0] in image and start[1] in image
00740             uistart[0]=(unsigned)rint(start[0]);
00741             uistart[1]=(unsigned)rint(start[1]);
00742         } else {
00743             // replace start point
00744
00745             // take coo[0/1] if (end-coo[0/1]).ScalarProduct(end-start)==1.0
00746             double dex = end[0]-coo[0], dey = end[1]-coo[1];
00747             double dx = end[0]-start[0], dy = end[1]-start[1];
00748             if (dx*dex+dy*dey>0.0){ // angle < 90 degree take coo[0/1]
00749                 uistart[0]=coo[0];
00750                 uistart[1]=coo[1];
00751             } else {
00752                 uistart[0]=coo[2];
00753                 uistart[1]=coo[3];
00754             }
00755
00756         }
00757         if (start[0]>=0.0 && start[0]<=wm && start[1]>=0.0 && start[1]<=hm){
00758             // easy, end[0] in image and end[1] in image
00759             uiend[0]=(unsigned)rint(end[0]);
00760             uiend[1]=(unsigned)rint(end[1]);
00761         } else {
00762             // replace end point
00763
00764             // take coo[0/1] if (start-coo[0/1]).ScalarProduct(start-end)==1.0
00765             double dex = start[0]-coo[0], dey = start[1]-coo[1];
00766             double dx = start[0]-end[0], dy = start[1]-end[1];
00767             if (dx*dex+dy*dey>0.0){ // angle < 90 degree take coo[0/1]
00768                 uistart[0]=coo[0];
00769                 uistart[1]=coo[1];
00770             } else {
00771                 uistart[0]=coo[2];
00772                 uistart[1]=coo[3];
00773             }
00774         }
00775         cerr << "drawing between "<<uistart[0]<<", "<<uistart[1]
00776         <<"  and  "<<uiend[0]<<", "<<uiend[1]<<"\n";
00777         return Line(im, uistart, uiend, value);
00778     }
00779
00780     //cerr << "nothing to draw\n";
00781     return 0;
00782 }
00783
00784 #undef BIAS_DRAW_CROSS_PRODUCT
00785 #undef BIAS_DRAW_PRECISION
00786
00787 ////////////////////////////////////////////////////
00788 // interpolated lines
00789 ///////////////////////////////////////////////////////
00790
00791 template <class StorageType>
00792 int ImageDraw<StorageType>::InterpolatedLine(Image<StorageType>& im,
00793                                              const int StartX,
00794                                              const int StartY,
00795                                              const int EndX,
00796                                              const int EndY,
00797                                              const StorageType Value[])
00798 {
00799     if (im.GetChannelCount()==1){
00800         return InterpolatedLineGrey(im, StartX, StartY, EndX, EndY, Value[0]);
00801     } else {
00802         BIASERR("DrawInterpolatedLineColor not jet implemented");
00803         return -1;
00804     }
00805 }
00806
00807 template <class StorageType>
00808 int ImageDraw<StorageType>::InterpolatedLineGrey(Image<StorageType>& im,
00809                                                  const int StartX,
00810                                                  const int StartY,
00811                                                  const int EndX,
00812                                                  const int EndY,
00813                                                  const StorageType GreyValue)
00814 {
00815     StorageType **ida = im.GetImageDataArray();
00816     EightWaySymmetry<int> sym;
00817     enum TLineType type;
00818     int TStartX, TStartY, TEndX, TEndY, CurrX, CurrY;
00819     double TSlope;
00820
00821     type = sym.DetermineLineType(StartX, StartY, EndX, EndY);
00822
00823     sym.Transform(type, StartX, StartY, TStartX, TStartY);
00824
00825     sym.Transform(type, EndX, EndY, TEndX, TEndY);
00826
00827     TSlope = (double)(TEndY - TStartY)/(double)(TEndX - TStartX);
00828
00829     //    cerr << "TSlope: " << TSlope << endl;
00830
00831     register double g, g1, g2, gm, gtmp;
00832     g = 0.0;
00833     g1 = TSlope - 1.0;
00834     g2 = TSlope;
00835
00836     if (TSlope > 1e-15){
00837         while (TStartX < TEndX) {
00838
00839             if (g>1.0){
00840                 g+=g1;
00841                 gtmp = (g<1.0)?(g):(1.0);
00842                 TStartY++;
00843                 gm = (g<1.0)?(1.0 - g):(0.0);
00844                 sym.InverseTransform(type, TStartX, TStartY, CurrX, CurrY);
00845                 //      cerr << " ++a type: " <<type << "  x " << CurrX << "  y " << CurrY << "   g " << g << "  gtmp " << "  g1: " << g1 << "  g2: " << g2 << endl;
00846                 ida[CurrY][CurrX] = (StorageType)rint((double)GreyValue * gm) +
00847                     (StorageType)rint((double)ida[CurrY][CurrX] * gtmp);
00848                 sym.InverseTransform(type, TStartX, TStartY+1, CurrX, CurrY);
00849                 //      cerr << " ++b type: " <<type << "  x " << CurrX << "  y " << CurrY << "   gm " << gm << "  gtmp " << gtmp << endl;
00850                 ida[CurrY][CurrX] = (StorageType)rint((double)GreyValue * gtmp) +
00851                     (StorageType)rint((double)ida[CurrY][CurrX] * gm);
00852                 TStartX++;
00853             } else {
00854                 gm = 1.0 - g;
00855                 sym.InverseTransform(type, TStartX, TStartY, CurrX, CurrY);
00856                 //      cerr << " a type: " <<type << " x " << CurrX << "  y " << CurrY << "   g " << g << endl;
00857                 ida[CurrY][CurrX] = (StorageType)rint((double)GreyValue * gm) +
00858                     (StorageType)rint((double)ida[CurrY][CurrX] * g);
00859                 sym.InverseTransform(type, TStartX, TStartY+1, CurrX, CurrY);
00860                 //      cerr << " b type: " <<type <<" x " << CurrX << "  y " << CurrY << "   gm " << gm << endl;
00861                 ida[CurrY][CurrX] = (StorageType)rint((double)GreyValue * g) +
00862                     (StorageType)rint((double)ida[CurrY][CurrX] * gm);
00863                 TStartX++;
00864                 g+=g2;
00865             }
00866         }
00867     } else {
00868         while (TStartX < TEndX){
00869             //cerr << " x " << TStartX << "  y " << StartY << "   g " << g << endl;
00870             sym.InverseTransform(type, TStartX, TStartY, CurrX, CurrY);
00871             ida[CurrY][CurrX] = (StorageType)rint((double)GreyValue);
00872             TStartX++;
00873         }
00874     }
00875     return 0;
00876 }
00877
00878 ///////////////////////////////////////////////////////////
00879 // circles
00880 //////////////////////////////////////////////////////////
00881
00882 template <class StorageType>
00883 int ImageDraw<StorageType>::CircleCenter(Image<StorageType>& im,
00884                                          unsigned int CenterX,
00885                                          unsigned int CenterY,
00886                                          unsigned int Radius,
00887                                          const StorageType Value[])
00888 {
00889     int res=0;
00890     BresenhamCircle bc;
00891     int center[2], next[2], radius=(int)Radius;
00892     StorageType **ida=im.GetImageDataArray();
00893     unsigned int cc=im.GetChannelCount();
00894     const int height = (int)im.GetHeight();
00895     const int width = (int)im.GetWidth();
00896
00897     register unsigned int c;
00898
00899     center[0]=(int)CenterX;
00900     center[1]=(int)CenterY;
00901
00902     bc.Init(center, radius);
00903
00904     if (Value==NULL) {
00905         // no color supplied, use black and white dep. on background
00906         while (bc.GetNext(next)){
00907             if (next[1]>=0 && next[1]<height &&
00908                 next[0]>=0 && next[0]<width) {
00909                     for (c=0; c<cc; c++) {
00910                         ida[next[1]][next[0]*cc+c]=
00911                             GetContrastValue(ida[next[1]][next[0]*cc+c]);
00912                     }
00913                 }
00914         }
00915     } else {
00916         while (bc.GetNext(next)){
00917             if (next[1]>=0 && next[1]<height &&
00918                 next[0]>=0 && next[0]<width) {
00919                     for (c=0; c<cc; c++) {
00920                         ida[next[1]][next[0]*cc+c]=Value[c];
00921                     }
00922                 }
00923         }
00924     }
00925     return res;
00926 }
00927
00928 template <class StorageType>
00929 int ImageDraw<StorageType>::CircleCenterFilled(Image<StorageType>& im,
00930                                                unsigned int CenterX,
00931                                                unsigned int CenterY,
00932                                                unsigned int Radius,
00933                                                const StorageType Value[])
00934 {
00935     int res=0;
00936     BresenhamCircleEighth bc;
00937     int zerocenter[]={0,0};
00938     int center[2], next[2], radius=(int)Radius;
00939     unsigned int start[2], end[2];
00940
00941     center[0]=(int)CenterX;
00942     center[1]=(int)CenterY;
00943
00944     bc.Init(zerocenter, radius);
00945
00946     while (bc.GetNext(next)){
00947         start[0]=center[0]+next[0];
00948         start[1]=center[1]+next[1];
00949         end[0]=center[0]-next[0];
00950         end[1]=center[1]+next[1];
00951         Line(im, start, end, Value);
00952         start[0]=center[0]+next[1];
00953         start[1]=center[1]+next[0];
00954         end[0]=center[0]-next[1];
00955         end[1]=center[1]+next[0];
00956         Line(im, start, end, Value);
00957         start[0]=center[0]+next[0];
00958         start[1]=center[1]-next[1];
00959         end[0]=center[0]-next[0];
00960         end[1]=center[1]-next[1];
00961         Line(im, start, end, Value);
00962         start[0]=center[0]+next[1];
00963         start[1]=center[1]-next[0];
00964         end[0]=center[0]-next[1];
00965         end[1]=center[1]-next[0];
00966         Line(im, start, end, Value);
00967     }
00968
00969     return res;
00970 }
00971
00972
00973 template <class StorageType>
00974 int ImageDraw<StorageType>::Arrow(Image<StorageType>& im,
00975                                   const unsigned start[2],
00976                                   const unsigned end[2],
00977                                   const unsigned length,
00978                                   const unsigned width,
00979                                   const StorageType value[])
00980 {
00981     int dx=(int)end[0]-(int)start[0], dy=(int)end[1]-(int)start[1];
00982
00983     if (Line(im, start, end, value)!=0){
00984         BIASERR("error drawing line");
00985         return -1;
00986     }
00987
00988 #ifdef BIAS_DEBUG
00989     if (sqrt(double(dx*dx+dy*dy))<length || sqrt(double(dx*dx+dy*dy))<width){
00990         BIASERR("funny arrow, head bigger than tail");
00991         BIASABORT;
00992     }
00993 #endif
00994     int next[2];
00995     Bresenham bres(end, start), bres2;
00996     for (unsigned i=0; i<length; i++)
00997         bres.GetNext(next);
00998
00999     int left[2], right[2], lend[2], rend[2];
01000     rend[0]=(int)next[0]-dy;
01001     rend[1]=(int)next[1]+dx;
01002     lend[0]=(int)next[0]+dy;
01003     lend[1]=(int)next[1]-dx;
01004     //cerr << "next: ("<<next[0]<<", "<<next[1]<<")  lend: ("<<lend[0]<<", "
01005     //     <<lend[1]<<")  rend: ("<<rend[0]<<", "<<rend[1]<<")\n";
01006     bres.Init(next, rend);
01007     bres2.Init(next, lend);
01008     for (unsigned i=0; i<width; i++){
01009         bres.GetNext(right);
01010         bres2.GetNext(left);
01011     }
01012
01013     if (Line(im, end, (unsigned *)right, value)!=0){
01014         BIASERR("error drawing line");
01015         return -1;
01016     };
01017     if (Line(im, end, (unsigned *)left, value)!=0){
01018         BIASERR("error drawing line");
01019         return -1;
01020     };
01021     return 0;
01022 }
01023
01024
01025 /// JW:
01026 template <class StorageType>
01027 int ImageDraw<StorageType>::Line(Image<StorageType>& im,
01028                                  const unsigned int StartX,
01029                                  const unsigned int StartY,
01030                                  const unsigned int EndX,
01031                                  const unsigned int EndY,
01032                                  const StorageType color[],
01033                                  const float thickness )
01034 {
01035 #ifdef BIAS_HAVE_OPENCV
01036     int i_thickness=int(thickness);
01037     Line(im,
01038         StartX, StartY,
01039         EndX, EndY,
01040         Vector3<StorageType>(color[0],color[1], color[2]),
01041         i_thickness
01042         );
01043 #else
01044     BIASERR("Please enable OpenCV to use Lines iwth thickness. (jw)");
01045     // workareound : draw multiple lines to get a thicker one:
01046
01047     // direction of (original) line
01048     BIAS::Vector2<double> dir; //< direction od the line
01049     BIAS::Vector2<double> ortho; //< perpendicalur vector of line displacement for thickness
01050     dir[0] = EndX - StartX; //< dx
01051     dir[1] = EndY - StartY; //< dy
01052
01053     // orthogonal offset is perpendicular to line direction:
01054     ortho.Set( -dir[1], dir[0] ); //< y, x as perpendicular of dir
01055     if (ortho.NormL2() ==0) {
01056         ortho.Set(1.0, 0.0);
01057     } else {
01058         ortho /= ortho.NormL2(); // length one
01059     };
01060
01061     // draw multiple parallel lines to emulate thickness
01062     // QUCKHACK. \todo implement Bresenham for thicked lines or even better with antialised lines. JW
01063     // \todo the line may actually be shifted for fractional part of thickness JW
01064     // it is not enogh to use 1.0 step...
01065     for (float l= float(-thickness/2.0); l <= float(thickness/2.0); l+=1.0) {
01066         //ImageDraw<StorageType::
01067         Line(im,
01068             (unsigned int)(StartX +l * ortho[0]),
01069             (unsigned int)(StartY +l * ortho[1]),
01070
01071             (unsigned int)(EndX   +l * ortho[0] ),
01072             (unsigned int)(EndY   +l * ortho[1] ),
01073             color
01074             );
01075     };
01076 #endif // OpenCV
01077     return 0;
01078 }
01079
01080 template <class StorageType>
01081 int ImageDraw<StorageType>::Ellipse(Image<StorageType>& im,
01082                                     double center[2], double a[2],
01083                                     double b[2],
01084                                     const StorageType Value[])
01085 {
01086     // points on ellipse can be parametrized by angle t
01087     // (a*cos(t), b*sin(t)) if the ellipse-axes are parallel to coordinate axes
01088
01089     const int w = im.GetWidth();
01090     const int h = im.GetHeight();
01091     StorageType **ida=im.GetImageDataArray();
01092     const int cc=im.GetChannelCount();
01093
01094     double length_a = sqrt(a[0]*a[0]+a[1]*a[1]);
01095     double length_b = sqrt(b[0]*b[0]+b[1]*b[1]);
01096
01097     // test for degenerate cases, where the ellipse
01098     // consists only of a single line
01099     if (length_a<1e-8){
01100         double start[2], end[2];
01101         start[0]=center[0]-b[0];
01102         start[1]=center[1]-b[1];
01103         end[0]=center[0]+b[0];
01104         end[1]=center[1]+b[1];
01105         return ImageDraw<StorageType>::Line(im, start, end, Value);
01106     }
01107     if (length_b<1e-8){
01108         double start[2], end[2];
01109         start[0]=center[0]-a[0];
01110         start[1]=center[1]-a[1];
01111         end[0]=center[0]+a[0];
01112         end[1]=center[1]+a[1];
01113         return ImageDraw<StorageType>::Line(im, start, end, Value);
01114     }
01115
01116 #ifdef BIAS_DEBUG
01117     // assume axes are perpendicular
01118     if ((a[0]*b[0]+a[1]*b[1])/(length_a*length_b)>1e-8){
01119         BIASERR("half axes of ellipse are not perpendicular: ("<<a[0]<<", "<<a[1]
01120         <<")   ("<<b[0]<<", "<<b[1]<<")\n");
01121         BIASASSERT((a[0]*b[0]+a[1]*b[1])/(length_a*length_b)<1e-8);
01122     }
01123 #endif
01124
01125     double dt;
01126     if (length_a>length_b){
01127         dt = atan2(1.0, length_a);
01128     } else {
01129         dt = atan2(1.0, length_b);
01130     }
01131     //cout << "dt: "<<dt<<endl;
01132
01133     // angel of axis a with x axis
01134     double ang=atan2(a[1], a[0]);
01135     //cout << "ang: "<<ang*180.0/M_PI<<" deg"<<endl;
01136     // rotation with respect to coordinate system
01137     double ca=cos(ang), sa=sin(ang);
01138
01139     double p[2], rp[2], ap[2];
01140     double t=0.0;
01141     int ix, iy;
01142
01143     while (t<=M_PI_2){
01144         //cout << "t: "<<t<<endl;
01145         p[0] = length_a * cos(t);
01146         p[1] = length_b * sin(t);
01147         //cout << "p : "<<p[0]<<", "<<p[1]<<endl;
01148
01149         ap[0] = p[0];
01150         ap[1] = p[1];
01151         // now rotate and translate the point
01152         rp[0] = ap[0]*ca - ap[1]*sa + center[0];
01153         rp[1] = ap[1]*ca + ap[0]*sa + center[1];
01154         //cout << "1 - rp : "<<rp[0]<<", "<<rp[1]<<endl;
01155         ix = (int)rint(rp[0]);
01156         iy = (int)rint(rp[1]);
01157         if (ix>=0 && ix<w  && iy>=0 && iy<h){
01158             for (int i=0; i<cc; i++)
01159                 ida[iy][ix*cc+i]=Value[i];
01160         }
01161
01162         // use 4-ways symmetry of ellipse
01163         ap[0] = -p[0];
01164         ap[1] = -p[1];
01165         // now rotate and translate the point
01166         rp[0] = ap[0]*ca - ap[1]*sa + center[0];
01167         rp[1] = ap[1]*ca + ap[0]*sa + center[1];
01168         //cout << "2 - rp : "<<rp[0]<<", "<<rp[1]<<endl;
01169         ix = (int)rint(rp[0]);
01170         iy = (int)rint(rp[1]);
01171         if (ix>=0 && ix<w  && iy>=0 && iy<h){
01172             for (int i=0; i<cc; i++)
01173                 ida[iy][ix*cc+i]=Value[i];
01174         }
01175
01176         // use 4-ways symmetry of ellipse
01177         ap[0] = p[0];
01178         ap[1] = -p[1];
01179         // now rotate and translate the point
01180         rp[0] = ap[0]*ca - ap[1]*sa + center[0];
01181         rp[1] = ap[1]*ca + ap[0]*sa + center[1];
01182         //cout << "3 - rp : "<<rp[0]<<", "<<rp[1]<<endl;
01183         ix = (int)rint(rp[0]);
01184         iy = (int)rint(rp[1]);
01185         if (ix>=0 && ix<w  && iy>=0 && iy<h){
01186             for (int i=0; i<cc; i++)
01187                 ida[iy][ix*cc+i]=Value[i];
01188         }
01189
01190         // use 4-ways symmetry of ellipse
01191         ap[0] = -p[0];
01192         ap[1] = p[1];
01193         // now rotate and translate the point
01194         rp[0] = ap[0]*ca - ap[1]*sa + center[0];
01195         rp[1] = ap[1]*ca + ap[0]*sa + center[1];
01196         //cout << "4 - rp : "<<rp[0]<<", "<<rp[1]<<endl;
01197         ix = (int)rint(rp[0]);
01198         iy = (int)rint(rp[1]);
01199         if (ix>=0 && ix<w  && iy>=0 && iy<h){
01200             for (int i=0; i<cc; i++)
01201                 ida[iy][ix*cc+i]=Value[i];
01202         }
01203
01204         t+=dt;
01205     }
01206     return 0;
01207 }
01208
01209
01210 #ifdef BIAS_HAVE_OPENCV
01211 // JW
01212 template <class StorageType>
01213 void ImageDraw<StorageType>::Text(Image<StorageType>& dstImg,
01214                                   const std::string & message,
01215                                   const int & posX,
01216                                   const int & posY,
01217                                   const BIAS::Vector3<StorageType> &colorRGB,
01218                                   const int fontface,
01219                                   const double hscale,
01220                                   const double vscale,
01221                                   const double shear,
01222                                   const int thickness,
01223                                   const int linetype
01224                                   )
01225 {
01226     WrapBias2Ipl wrap( &dstImg );
01227     CvFont font;
01228     cvInitFont( &font,
01229         fontface,
01230         hscale,
01231         vscale,
01232         shear,
01233         thickness,
01234         linetype
01235         );
01236     cvPutText( wrap.p_imgIpl,
01237         message.c_str(),
01238         cvPoint(posX, posY),
01239         &font,
01240         cvScalar(colorRGB[0], colorRGB[1], colorRGB[2]) // no swap!
01241         );
01242 }
01243
01244 // JW
01245 template <class StorageType>
01246 void ImageDraw<StorageType>::Circle(BIAS::Image<StorageType>& dstImg,
01247                                     const int & centerX,
01248                                     const int & centerY,
01249                                     const int & radius,
01250                                     const BIAS::Vector3<StorageType> &colorRGB,
01251                                     const int & thickness,
01252                                     const int & linetype,
01253                                     const int & shift
01254                                     )
01255 {
01256     WrapBias2Ipl wrap( &dstImg );
01257     cvCircle( wrap.p_imgIpl,
01258         cvPoint (centerX, centerY),
01259         radius,
01260         cvScalar(colorRGB[0], colorRGB[1], colorRGB[2] ),
01261         thickness,
01262         linetype,
01263         shift
01264         );
01265 }
01266
01267 // JW
01268 template <class StorageType>
01269 void ImageDraw<StorageType>::Line(BIAS::Image<StorageType>& dstImg,
01270                                   const int & pt1X,
01271                                   const int & pt1Y,
01272                                   const int & pt2X,
01273                                   const int & pt2Y,
01274                                   const BIAS::Vector3<StorageType> &colorRGB,
01275                                   const int thickness,
01276                                   const int linetype,
01277                                   const int shift
01278                                   )
01279 {
01280     WrapBias2Ipl wrap( &dstImg );
01281     cvLine( wrap.p_imgIpl,
01282         cvPoint (pt1X, pt1Y),
01283         cvPoint (pt2X, pt2Y),
01284         cvScalar(colorRGB[0], colorRGB[1], colorRGB[2] ),
01285         thickness,
01286         linetype,
01287         shift
01288         );
01289 }
01290
01291 // JW
01292 template <class StorageType>
01293 void ImageDraw<StorageType>::Rectangle(BIAS::Image<StorageType>& dstImg,
01294                                        const int & pt1X,
01295                                        const int & pt1Y,
01296                                        const int & pt2X,
01297                                        const int & pt2Y,
01298                                        const BIAS::Vector3<StorageType> &colorRGB,
01299                                        const int thickness,
01300                                        const int linetype,
01301                                        const int shift
01302                                        )
01303 {
01304     WrapBias2Ipl wrap( &dstImg );
01305     cvRectangle(wrap.p_imgIpl,
01306         cvPoint (pt1X, pt1Y),
01307         cvPoint (pt2X, pt2Y),
01308         cvScalar(colorRGB[0], colorRGB[1], colorRGB[2] ),
01309         thickness,
01310         linetype,
01311         shift
01312         );
01313 }
01314
01315 // JW
01316 template <class StorageType>
01317 void ImageDraw<StorageType>::Ellipse(BIAS::Image<StorageType>& dstImg,
01318             const int & centerX,
01319             const int & centerY,
01320             const int & axesX,
01321             const int & axesY,
01322             const double & angle,
01323             const double & start_angle,
01324             const double & end_angle,
01325             const BIAS::Vector3<StorageType> &colorRGB,
01326             const int & thickness,
01327             const int & linetype,
01328             const int & shift
01329             )
01330 {
01331     WrapBias2Ipl wrap( &dstImg );
01332     cvEllipse(wrap.p_imgIpl,
01333         cvPoint(centerX, centerY),
01334         cvSize (axesX, axesY),
01335         angle,
01336         start_angle,
01337         end_angle,
01338         cvScalar(colorRGB[0], colorRGB[1], colorRGB[2] ),
01339         thickness,
01340         linetype,
01341         shift );
01342 }
01343
01344
01345 #endif //BIAS_HAVE_OPENCV
01346
01347 } // namespace BIAS
01348
01349
01350 //
01351 // solve explicit instantiation
01352 //
01353 #define INSTANCE_ImageDraw(type)\
01354 template class BIASImageBase_EXPORT ImageDraw<type>;
01355
01356
01357 // create instances
01358 INSTANCE_ImageDraw(unsigned char)
01359 INSTANCE_ImageDraw(float)
01360 #ifdef BUILD_IMAGE_INT
01361 INSTANCE_ImageDraw(int)
01362 #endif
01363 #ifdef BUILD_IMAGE_CHAR
01364 INSTANCE_ImageDraw(char)
01365 #endif
01366 #ifdef BUILD_IMAGE_SHORT
01367 INSTANCE_ImageDraw(short)
01368 #endif
01369 #if defined(BUILD_IMAGE_USHORT)
01370 INSTANCE_ImageDraw(unsigned short)
01371 #endif
01372 #ifdef BUILD_IMAGE_DOUBLE
01373 INSTANCE_ImageDraw(double)
01374 #endif
01375 #ifdef BUILD_IMAGE_UINT
01376 INSTANCE_ImageDraw(unsigned int)
01377 #endif
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageDraw.hh Source File

Base » Image

ImageDraw.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_IMAGE_DRAW_H_
00027 #define _BIAS_IMAGE_DRAW_H_
00028 #include "bias_config.h"
00029
00030 #ifdef BIAS_HAVE_OPENCV
00031 // for font names
00032 #  include <cxcore.h>
00033 //#  include <cv.h>
00034 #endif
00035
00036 #include "Image.hh"
00037 #include <Base/Math/Vector2.hh>
00038 #include <Base/Math/Vector3.hh>
00039
00040 namespace BIAS {
00041     /** @class ImageDraw
00042     @ingroup g_image_other
00043     @brief drawing simple entities into the image like rectangles or lines
00044
00045
00046     As all fucntions are static they have to be called by
00047     eg. ImageDraw::RectangleCenter() and not with an object.
00048     */
00049     template <class StorageType>
00050     class BIASImageBase_EXPORT ImageDraw
00051     {
00052         /** class for Drawing in Images
00053         @author fw */
00054     public:
00055         /* @brief returns value with good contrast to t */
00056         static StorageType GetContrastValue(StorageType t);
00057
00058         ////////////////////////////////////////////////////////////
00059         /// rectangles
00060         ////////////////////////////////////////////////////////////
00061
00062         ////////////////////////////////////
00063         // specifying rectangle corners
00064
00065         /** @brief Draws the rectangle defined by upper left and bottom right
00066         corner with value[i] in channel i **/
00067         static int RectangleCorners(Image<StorageType>& im, unsigned int minx,
00068             unsigned int miny, unsigned int maxx,
00069             unsigned int maxy,
00070             const StorageType value[]);
00071
00072         /** @brief as above but fills all channels with value */
00073         static int RectangleCorners(Image<StorageType>& im, unsigned int minx,
00074             unsigned int miny, unsigned int maxx,
00075             unsigned int maxy,
00076             const StorageType value);
00077
00078         /** @brief decides which color to use */
00079         static int RectangleCorners(Image<StorageType>& im, unsigned int minx,
00080             unsigned int miny, unsigned int maxx,
00081             unsigned int maxy);
00082
00083         /** @brief faster for one channel images */
00084         static int RectangleCornersGrey(Image<StorageType>& im, unsigned int minx,
00085             unsigned int miny, unsigned int maxx,
00086             unsigned int maxy,
00087             const StorageType GreyValue);
00088
00089         /** @brief faster for one channel images */
00090         static int RectangleCornersGreyFill(Image<StorageType>& im,
00091             unsigned int minx, unsigned int miny,
00092             unsigned int maxx, unsigned int maxy,
00093             const StorageType GreyValue);
00094         //////////////////////////
00095         // specifying the rectangle center and size
00096
00097         /** @brief Draws the rectangle around X, Y with Size and Value[i]
00098         in channel i
00099         @author Felix Woelk **/
00100         static int RectangleCenter(Image<StorageType>& im,
00101             unsigned int x, unsigned int y,
00102             unsigned int size,
00103             const StorageType value[]);
00104
00105         /** @brief fills the channels with value */
00106         static int RectangleCenterGrey(Image<StorageType>& im,
00107             unsigned int x, unsigned int y,
00108             unsigned int size,
00109             const StorageType value);
00110
00111         static int RectangleCenterGreyFill(Image<StorageType>& im,
00112             unsigned int x, unsigned int y,
00113             unsigned int size,
00114             const StorageType value);
00115
00116         /** convenience wrapper */
00117         inline
00118             static int RectangleCenter(Image<StorageType>& im, unsigned int coo[2],
00119             unsigned int size,
00120             const StorageType value[])
00121         { return RectangleCenter(im, coo[0], coo[1], size, value); };
00122
00123         /** @brief draws a rectangle of size around x and y,
00124         decides which color to use */
00125         static int RectangleCenter(Image<StorageType>& im, unsigned int x,
00126             unsigned int y, unsigned int size);
00127
00128         /** convenience wrapper */
00129         static int RectangleCenter(Image<StorageType>& im, unsigned int coo[2],
00130             unsigned int size);
00131
00132
00133         //////////////////////////////////////////////////////////////
00134         /// lines
00135         /////////////////////////////////////////////////////////////
00136
00137
00138         /** @brief Draws a line between the two points using the bresenham
00139         algorithm uses value[i] in channel i **/
00140         static int Line(Image<StorageType>& im, const unsigned int start[2],
00141             const unsigned int end[2],
00142             const StorageType value[]);
00143         /// differnet interface for the function above
00144         static int Line(Image<StorageType>& im, const int start[2],
00145             const int end[2],
00146             const StorageType value[]);
00147
00148         /** @brief uses value in every channel */
00149         static int Line(Image<StorageType>& im, const unsigned int start[2],
00150             const unsigned int end[2],
00151             const StorageType value);
00152
00153         /** @brief faster algorithm for 1 channel images */
00154         static int LineGrey(Image<StorageType>& im, const unsigned int start[2],
00155             const unsigned int end[2],
00156             const StorageType value);
00157
00158         /** @brief decides which color to use */
00159         static int Line(Image<StorageType>& im, const unsigned int start[2],
00160             const unsigned int end[2]);
00161
00162         /** @brief faster algorithm for 1 channel images,
00163         decides which color to use */
00164         static int LineGrey(Image<StorageType>& im, const unsigned int start[2],
00165             const unsigned int end[2]);
00166
00167         //////////////////////////
00168         // just wrappers
00169
00170
00171         /** Draw a solid line with a specific thickness.
00172         Internally implemented as drawing multiple Bresenham lines, for now.
00173         \bug This routine is a HACK and incorrect. A generela "solid fill by 4 given corners" algorithm has to be used or a Bresenham with eps=thckness/2.
00174         @param Value the line color.
00175         @param thickness of the line in pixel (perpendicualr to the direction).
00176         @author Jan Woetzel 01/2005
00177         DEPRECATED by JW 2005/08/09, replaced by OpenCV routine call.
00178         */
00179         static int Line(Image<StorageType>& im,
00180             const unsigned int StartX,
00181             const unsigned int StartY,
00182             const unsigned int EndX,
00183             const unsigned int EndY,
00184             const StorageType color[],
00185             const float thickness );
00186
00187
00188         /** convenience wrapper */
00189         static int Line(Image<StorageType>& im, const unsigned int StartX,
00190             const unsigned int StartY, const unsigned int EndX,
00191             const unsigned int EndY,
00192             const StorageType Value[]);
00193
00194         /** convenience wrapper */
00195         static int Line(Image<StorageType>& im, const unsigned int StartX,
00196             const unsigned int StartY, const unsigned int EndX,
00197             const unsigned int EndY,
00198             const StorageType Value);
00199
00200         /** convenience wrapper */
00201         static int Line(Image<StorageType>& im, const unsigned int StartX,
00202             const unsigned int StartY, const unsigned int EndX,
00203             const unsigned int EndY);
00204
00205         /** convenience wrapper */
00206         static int LineGrey(Image<StorageType>& im, const unsigned int StartX,
00207             const unsigned int StartY, const unsigned int EndX,
00208             const unsigned int EndY,
00209             const StorageType Value);
00210
00211         /** convenience wrapper */
00212         inline static int Line(Image<StorageType>& im, unsigned int coo[4],
00213             const StorageType value[])
00214         { return Line(im, &coo[0], &coo[2], value); };
00215
00216         /** @brief Convenience wrapper, draws a line even if start or end point are
00217         not positioned in the image.
00218         untested so far
00219         @author woelk 06/2005 */
00220         static int Line(Image<StorageType>& im, const double start[2],
00221             const double end[2],
00222             const StorageType value[]);
00223
00224         ///////////////////////////
00225         // interpolated lines
00226
00227         /** @brief draws an interpolated line
00228         just a wrapper for the below
00229         @author Felix Woelk */
00230         static int InterpolatedLine(Image<StorageType>& im,
00231             const int StartX, const int StartY,
00232             const int EndX, const int EndY,
00233             const StorageType Value[]);
00234
00235         static int InterpolatedLineGrey(Image<StorageType>& im,
00236             const int StartX, const int StartY,
00237             const int EndX, const int EndY,
00238             const StorageType Value);
00239
00240         inline
00241             static int InterpolatedLineGrey(Image<StorageType>& im,
00242             unsigned int coo[4],
00243             const StorageType Value)
00244         { return InterpolatedLineGrey(im, coo[0], coo[1], coo[2],
00245         coo[3], Value); };
00246
00247
00248         ////////////////////////////////////
00249         // arrows
00250
00251         /**  @brief draws an arrow from start to end, the tips of the head are
00252         length pixel back on the line and width pixel away from the line
00253         @author woelk 12/2003 */
00254         static int Arrow(Image<StorageType>& im, const unsigned start[2],
00255             const unsigned end[2], const unsigned length,
00256             const unsigned width,
00257             const StorageType value[]);
00258
00259
00260         /////////////////////////////////////////
00261         // circles
00262         /** @brief draws a circular line, either using Value or
00263         a good contrast value */
00264         static int CircleCenter(Image<StorageType>& im, unsigned int CenterX,
00265             unsigned int CenterY, unsigned int Radius,
00266             const StorageType Value[]=NULL);
00267
00268         /** @brief draws a filled circle using Value */
00269         static int CircleCenterFilled(Image<StorageType>& im, unsigned int CenterX,
00270             unsigned int CenterY, unsigned int Radius,
00271             const StorageType Value[]);
00272
00273
00274         //////////////////////////////////////////////////////////
00275         // ellipses
00276         //////////////////////////////////////////////////////////
00277
00278         /** @brief draws an ellipse at center with half axes a and b
00279         @author woelk 05/2005 */
00280         static int Ellipse(Image<StorageType>& im, double center[2],
00281             double a[2], double b[2],
00282             const StorageType Value[]);
00283
00284         /** @TODO
00285         static int InterpolatedLineColor(Image<StorageType>& im,
00286         const int StartX, const int StartY,
00287         const int EndX, const int EndY,
00288         StorageType Value[]); */
00289
00290
00291
00292
00293 #ifdef BIAS_HAVE_OPENCV
00294         //////////////////////////////////////////////////////////
00295         // wrapper(s) for OpenCV draw functions (Jan Woetzel 2005)
00296         //////////////////////////////////////////////////////////
00297
00298         // define some olors for easier usage:
00299 #define COLOR_RED    BIAS::Vector3<unsigned char>(255,0,0)
00300 #define COLOR_GREEN  BIAS::Vector3<unsigned char>(0,255,0)
00301 #define COLOR_BLUE   BIAS::Vector3<unsigned char>(0,0,255)
00302 #define COLOR_WHITE  BIAS::Vector3<unsigned char>(255,255,255)
00303 #define COLOR_GREY50 BIAS::Vector3<unsigned char>(128, 128, 128)
00304 #define COLOR_BLACK  BIAS::Vector3<unsigned char>(0,0,0)
00305
00306         /** @brief OpenCV: Draw Text into image
00307         @param message text to display.
00308         @param posX (bottom) left corner of textbox, may be negative and outside image
00309         @param posY bottom (left) corner of textbox, may be negative and outside image
00310         @param colorRGB color to use
00311         @param fontface e.g. CV_FONT_HERSHEY_SIMPLEX, CV_FONT_HERSHEY_PLAIN, CV_FONT_HERSHEY_COMPLEX
00312         @author Jan Woetzel 2005 */
00313         static void Text(BIAS::Image<StorageType>& dstImg,
00314             const std::string & message,
00315             const int & posX=0,
00316             const int & posY=20,
00317             const BIAS::Vector3<StorageType> &colorRGB=Vector3<StorageType>(255,255,255),
00318             const int fontface=CV_FONT_HERSHEY_PLAIN,
00319             const double hscale=1.0,
00320             const double vscale=1.0,
00321             const double shear=0,
00322             const int thickness=1,
00323             const int linetype=8
00324             );
00325
00326         /** OpenCV: Draws a circle
00327         @author JW 2005 */
00328         static void Circle(BIAS::Image<StorageType>& dstImg,
00329             const int & centerX,
00330             const int & centerY,
00331             const int & radius=3,
00332             const BIAS::Vector3<StorageType> &colorRGB=Vector3<StorageType>(255,255,255),
00333             const int & thickness=1,
00334             const int & linetype=8,
00335             const int & shift=0
00336             );
00337
00338         /** OpenCV: Draws a line segment connecting two points
00339         @author JW 2005 */
00340         static void Line(BIAS::Image<StorageType>& dstImg,
00341             const int & pt1X,
00342             const int & pt1Y,
00343             const int & pt2X,
00344             const int & pt2Y,
00345             const BIAS::Vector3<StorageType> &colorRGB=Vector3<StorageType>(255,255,255),
00346             const int thickness=1,
00347             const int linetype=8,
00348             const int shift=0
00349             );
00350
00351         /** @brief  OpenCV: Draws a simple, thick or filled rectangle @author JW 2005
00352             @authior Jan Woetzel 2005 */
00353         static void Rectangle(
00354             BIAS::Image<StorageType>& dstImg,
00355             const int & pt1X,
00356             const int & pt1Y,
00357             const int & pt2X,
00358             const int & pt2Y,
00359             const BIAS::Vector3<StorageType> &colorRGB=Vector3<StorageType>(255,255,255),
00360             const int thickness=1,
00361             const int linetype=8,
00362             const int shift=0
00363             );
00364
00365         /** OpenCV: Draws simple or thick elliptic arc or fills ellipse sector
00366             angles are given in degree
00367             @author JW 2005  */
00368         static void Ellipse(
00369             BIAS::Image<StorageType>& dstImg,
00370             const int & centerX,
00371             const int & centerY,
00372             const int & axesX,
00373             const int & axesY,
00374             const double & angle,
00375             const double & start_angle=0,
00376             const double & end_angle=360,
00377             const BIAS::Vector3<StorageType> &colorRGB=Vector3<StorageType>(255,255,255),
00378             const int & thickness=1,
00379             const int & linetype=8,
00380             const int & shift=0
00381             );
00382
00383 #endif
00384
00385     }; // class ImageDraw
00386
00387 }  // namespace
00388
00389 #endif // _BIAS_IMAGE_DRAW_H_
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageInline.hh Source File

Base » Image

ImageInline.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragmaStart.hh>
00026
00027 template <class StorageType> inline StorageType Image<StorageType>::MaxSTValue()
00028 {
00029   BIASERR("no such StorageType");
00030   return (StorageType)0;
00031 }
00032
00033 template <> inline unsigned char Image<unsigned char>::MaxSTValue()
00034 { return (unsigned char)(UCHAR_MAX); }
00035
00036 template <> inline float Image<float>::MaxSTValue()
00037 { return FLT_MAX; }
00038
00039 #ifdef BUILD_IMAGE_CHAR
00040 template <> inline char Image<char>::MaxSTValue()
00041 { return SCHAR_MAX; }
00042 template <> inline char Image<char>::MinSTValue()
00043 { return SCHAR_MIN; }
00044 #endif
00045 #ifdef BUILD_IMAGE_SHORT
00046 template <> inline short Image<short>::MaxSTValue()
00047 { return SHRT_MAX; }
00048 template <> inline short Image<short>::MinSTValue()
00049 { return SHRT_MIN; }
00050 #endif
00051 #ifdef BUILD_IMAGE_USHORT
00052 template <> inline unsigned short Image<unsigned short>::MaxSTValue()
00053 { return USHRT_MAX; }
00054 template <> inline unsigned short Image<unsigned short>::MinSTValue()
00055 { return 0; }
00056 #endif
00057 #ifdef BUILD_IMAGE_INT
00058 template <> inline int Image<int>::MaxSTValue()
00059 { return INT_MAX; }
00060 template <> inline int Image<int>::MinSTValue()
00061 { return INT_MIN; }
00062 #endif
00063 #ifdef BUILD_IMAGE_UINT
00064 template <> inline unsigned int Image<unsigned int>::MaxSTValue()
00065 { return UINT_MAX; }
00066 template <> inline unsigned int Image<unsigned int>::MinSTValue()
00067 { return 0; }
00068 #endif
00069 #ifdef BUILD_IMAGE_DOUBLE
00070 template <> inline double Image<double>::MaxSTValue()
00071 { return DBL_MAX; }
00072 template <> inline double Image<double>::MinSTValue()
00073 { return DBL_MIN; }
00074 #endif
00075
00076 template <class StorageType> inline StorageType Image<StorageType>::MinSTValue()
00077 {
00078   BIASERR("no such StorageType");
00079   return (StorageType)0;
00080 }
00081
00082 template <> inline unsigned char Image<unsigned char>::MinSTValue()
00083 { return 0; }
00084
00085 template <> inline float Image<float>::MinSTValue()
00086 { return FLT_MIN; }
00087
00088
00089 template <class StorageType>
00090 inline StorageType
00091 Image<StorageType>::PixelValue(const unsigned int x, const unsigned int y,
00092            const unsigned short int channel) const
00093 {
00094   CheckCoordinates(x, y, "PixelValue");
00095
00096   if (IsPlanar()) {
00097     return GetImageData()[channel * GetPixelCount() + y * GetWidth() + x];
00098   } else {
00099     return GetImageData()[GetChannelCount() *
00100                                  ( y * GetWidth() + x ) + channel ];
00101   }
00102 }
00103
00104 template <class StorageType>
00105 inline StorageType
00106 Image<StorageType>::PixelValueInterleaved(const int x,const int y,const int channel) const
00107 {
00108   return GetImageDataArray()[y][x*GetChannelCount()+channel];
00109 }
00110
00111
00112 template <class StorageType>
00113 inline StorageType& Image<StorageType>::GetPixelNearestNeighbor(
00114   const double x, const double y, const unsigned short int channel) const
00115 {
00116   int x_res = (int) ((x - floor(x)) <= 0.5 ? floor(x) : floor(x) + 1);
00117   int y_res = (int) ((y - floor(y)) <= 0.5 ? floor(y) : floor(y) + 1);
00118
00119   CheckCoordinates(x, y, "GetNearestNeighbor");
00120
00121   if (IsPlanar()) {
00122
00123     // The image is planar
00124     return
00125       GetImageData()[GetPixelCount()*channel + x_res + GetWidth() * y_res];
00126   } else {
00127
00128     // The image is interleaved
00129     return
00130       GetImageData()[GetChannelCount()*(x_res+GetWidth()*y_res)+channel];
00131   }
00132 }
00133
00134
00135 template <class StorageType>
00136 inline StorageType& Image<StorageType>::GetPixelNearestNeighbor(
00137     const float x, const float y, const unsigned short int channel) const
00138 {
00139   CheckCoordinates(x, y, "GetNearestNeighbor");
00140
00141   return GetPixelNearestNeighbor((double) x, (double) y, channel);
00142 }
00143
00144
00145 // template <class StorageType>
00146 // inline StorageType& Image<StorageType>::GetPixelNearestNeighbor(
00147 //   const float x, const float y, const enum TChannel channel) const
00148 // {
00149 //   CheckCoordinates(x, y, "GetNearestNeighbor");
00150
00151 //   return GetPixelNearestNeighbor((double) x, (double) y, channel);
00152 // }
00153
00154
00155 // JW
00156 template <class StorageType>
00157 inline void
00158 Image<StorageType>::SetPixel(const StorageType & value,
00159                  const unsigned int & x,
00160                  const unsigned int & y,
00161                  const unsigned short int channel)
00162 {
00163   CheckCoordinates(x, y, "SetPixel");
00164   CheckChannel(channel,"SetPixel");
00165
00166   BIASASSERT( channel<GetChannelCount() );
00167
00168   if (IsPlanar()) {
00169     ((StorageType*)GetImageData())[channel * GetPixelCount() + y*GetWidth() +x] = value;
00170   } else {
00171     ((StorageType*)GetImageData())[GetChannelCount() * (y*GetWidth() +x) +channel ] = value;
00172   };
00173 }
00174
00175
00176 // JW
00177 template <class StorageType>
00178 inline void
00179 Image<StorageType>::SetPixel(const StorageType & value0,
00180                  const StorageType & value1,
00181                  const StorageType & value2,
00182                  const unsigned int & x,
00183                  const unsigned int & y )
00184 {
00185   CheckChannel(2, "SetPixel"); // channels 0,1,2 must be there
00186
00187   SetPixel(value0, x, y, 0);
00188   SetPixel(value1, x, y, 1);
00189   SetPixel(value2, x, y, 2);
00190 }
00191
00192
00193
00194
00195
00196 template <class StorageType>
00197 inline double Image<StorageType>::LinearInterpolation(
00198   const unsigned int x, const double y) const
00199 {
00200 #ifdef BIAS_DEBUG
00201   if ((x<0) || (x>(GetWidth()-1)))
00202     BIASERR("LinearInterpolation() x out of bounds: "<<x);
00203   if ((floor(y)<0) || (ceil(y)>(GetHeight()-1)))
00204     BIASERR("LinearInterpolation() y out of bounds: "<<y);
00205 #endif
00206   double dy = y - floor(y);
00207   StorageType **ImageDataArray = (StorageType**)GetImageDataArray();
00208
00209   return ((1-dy)*(double)ImageDataArray[(unsigned int)floor(y)][x] +
00210       dy*(double)ImageDataArray[(unsigned int)ceil(y)][x]);
00211 }
00212
00213 template <class StorageType>
00214 inline double Image<StorageType>::LinearInterpolation(
00215   const double x, const unsigned int y) const
00216 {
00217 #ifdef BIAS_DEBUG
00218   if ((floor(x)<0) || ((ceil(x))>GetWidth()-1))
00219     BIASERR("LinearInterpolation() x out of bounds: "<<x);
00220   if ((y<0) || (y>(GetHeight()-1)))
00221     BIASERR("LinearInterpolation() y out of bounds: "<<y);
00222 #endif
00223   double dx = x - floor(x);
00224   StorageType **ImageDataArray = (StorageType**)GetImageDataArray();
00225
00226   return ((1-dx)*(double)ImageDataArray[y][(unsigned int)floor(x)] +
00227       dx*(double)ImageDataArray[y][(unsigned int)ceil(x)]);
00228 }
00229
00230 template <class StorageType> inline double
00231 Image<StorageType>::InterpolationGrey(const double x, const double y) const
00232 {
00233   StorageType **ida = (StorageType**)GetImageDataArray();
00234   unsigned int x_floor=(unsigned int)floor(x);
00235   unsigned int y_floor=(unsigned int)floor(y);
00236   unsigned int x_ceil=(unsigned int)ceil(x);
00237   unsigned int y_ceil=(unsigned int)ceil(y);
00238   StorageType ul = ida[y_floor][x_floor];
00239   StorageType ur = ida[y_floor][x_ceil];
00240   StorageType ll = ida[y_ceil][x_floor];
00241   StorageType lr = ida[y_ceil][x_ceil];
00242   double dy = y - y_floor;
00243   double dx = x - x_floor;
00244   double ulw, urw, llw, lrw;
00245   double sum=0.0;
00246   llw=sqrt(pow(1.0-dx,2.0)+pow(dy,2.0));
00247   lrw=sqrt(pow(dx,2.0)+pow(dy,2.0));
00248   ulw=sqrt(pow(1.0-dx,2.0)+pow(1.0-dy,2.0));
00249   urw=sqrt(pow(dx,2.0)+pow(1.0-dy,2.0));
00250   sum+=llw;
00251   sum+=lrw;
00252   sum+=ulw;
00253   sum+=urw;
00254   llw/=sum;
00255   lrw/=sum;
00256   ulw/=sum;
00257   urw/=sum;
00258   return (ul*ulw + ll*llw + lr*lrw + ur*urw);
00259 }
00260
00261 template <class StorageType> inline double Image<StorageType>::
00262 BilinearInterpolationGrey(const double x, const double y) const
00263 {
00264   StorageType **ida = (StorageType**)GetImageDataArray();
00265   unsigned int x_floor=(unsigned int)floor(x);
00266   unsigned int y_floor=(unsigned int)floor(y);
00267   unsigned int x_ceil=(unsigned int)ceil(x);
00268   unsigned int y_ceil=(unsigned int)ceil(y);
00269   StorageType ul = ida[y_floor  ][x_floor  ];
00270   StorageType ur = ida[y_floor  ][x_ceil];
00271   StorageType ll = ida[y_ceil][x_floor  ];
00272   StorageType lr = ida[y_ceil][x_ceil];
00273   double dy = y - y_floor;
00274   double dx = x - x_floor;
00275
00276   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur );
00277 }
00278
00279
00280 // JW 12/2004
00281 template <class StorageType> inline
00282 double
00283 Image<StorageType>::BilinearInterpolationGreyMinVal(const double x, const double y, const StorageType & minVal) const
00284 {
00285   StorageType **ida = (StorageType**)GetImageDataArray();
00286   unsigned int x_floor=(unsigned int)floor(x);
00287   unsigned int y_floor=(unsigned int)floor(y);
00288   unsigned int x_ceil=(unsigned int)ceil(x);
00289   unsigned int y_ceil=(unsigned int)ceil(y);
00290   // pixel values:
00291   StorageType ul = ida[y_floor  ][x_floor  ];
00292   StorageType ur = ida[y_floor  ][x_ceil];
00293   StorageType ll = ida[y_ceil][x_floor  ];
00294   StorageType lr = ida[y_ceil][x_ceil];
00295
00296   // return invalid if at least one of the four neighbors is invalid
00297   if (ul<=minVal) return minVal;
00298   if (ur<=minVal) return minVal;
00299   if (ll<=minVal) return minVal;
00300   if (lr<=minVal) return minVal;
00301
00302   // distance weights:
00303   double dy = y - y_floor;
00304   double dx = x - x_floor;
00305
00306   // OK, compute sum for bilinear interpolation:
00307   return ul
00308     + dy*(ll - ul)
00309     + dx*(ur - ul)
00310     + dy*dx*(ul + lr - ll - ur );
00311 }
00312
00313
00314 template <class StorageType> inline StorageType
00315 Image<StorageType>::FastBilinearInterpolationGrey(const double x,
00316                                                   const double y) const
00317 {
00318   StorageType **ida = GetImageDataArray();
00319   unsigned int x_floor=(unsigned int)floor(x);
00320   unsigned int y_floor=(unsigned int)floor(y);
00321   unsigned int x_ceil=(unsigned int)ceil(x);
00322   unsigned int y_ceil=(unsigned int)ceil(y);
00323   StorageType ul = ida[y_floor][x_floor];
00324   StorageType ur = ida[y_floor][x_ceil];
00325   StorageType ll = ida[y_ceil][x_floor];
00326   StorageType lr = ida[y_ceil][x_ceil];
00327   double dy = y - y_floor;
00328   double dx = x - x_floor;
00329
00330   return (StorageType)(ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur ));
00331 }
00332
00333 /* ca. 20 % faster than the universal function with double above
00334    woelk 01 2003 */
00335 template <> inline unsigned char
00336 Image<unsigned char>::FastBilinearInterpolationGrey(const double x,
00337                             const double y) const
00338 {
00339   register unsigned char **ida = GetImageDataArray();
00340   register unsigned int x_floor = (unsigned int)floor(x);
00341   register unsigned int y_floor = (unsigned int)floor(y);
00342   register unsigned int x_ceil = x_floor+1;
00343   register unsigned int y_ceil = y_floor+1;
00344   register unsigned int ul = (unsigned int)ida[y_floor][x_floor];
00345   register unsigned int ur = (unsigned int)ida[y_floor][x_ceil];
00346   register unsigned int ll = (unsigned int)ida[y_ceil][x_floor];
00347   register unsigned int lr = (unsigned int)ida[y_ceil][x_ceil];
00348   register unsigned int dy = (unsigned int)rint((y - y_floor)*256);
00349   register unsigned int dx = (unsigned int)rint((x - x_floor)*256);
00350
00351   return (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
00352 }
00353
00354 template <class StorageType> inline double Image<StorageType>::
00355 BilinearInterpolationRGBPlanar(const double x, const double y,
00356                    unsigned int channel) const
00357 {
00358   StorageType **ida = ((StorageType**)GetImageDataArray())+channel*GetPixelCount();
00359   unsigned int x_floor=(unsigned int)floor(x);
00360   unsigned int y_floor=(unsigned int)floor(y);
00361   unsigned int x_ceil=(unsigned int)ceil(x);
00362   unsigned int y_ceil=(unsigned int)ceil(y);
00363   StorageType ul = ida[y_floor][x_floor];
00364   StorageType ur = ida[y_floor][x_ceil];
00365   StorageType ll = ida[y_ceil][x_floor];
00366   StorageType lr = ida[y_ceil][x_ceil];
00367   double dy = y - y_floor;
00368   double dx = x - x_floor;
00369
00370   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul - ll - ur + lr);
00371 }
00372
00373 template <class StorageType> inline double Image<StorageType>::
00374 BilinearInterpolationRGBInterleaved(const double x, const double y,
00375                     unsigned int channel) const
00376 {
00377   unsigned int x_floor=(unsigned int)floor(x);
00378   unsigned int y_floor=(unsigned int)floor(y);
00379   unsigned int x_ceil=(unsigned int)ceil(x);
00380   unsigned int y_ceil=(unsigned int)ceil(y);
00381   StorageType ul =
00382     ((StorageType**)GetImageDataArray())[y_floor][x_floor*
00383                                                 GetChannelCount()+channel];
00384   StorageType ur =
00385     ((StorageType**)GetImageDataArray())[y_floor][x_ceil*
00386                                                 GetChannelCount()+channel];
00387   StorageType ll =
00388     ((StorageType**)GetImageDataArray())[y_ceil][x_floor*
00389                                               GetChannelCount()+channel];
00390   StorageType lr =
00391     ((StorageType**)GetImageDataArray())[y_ceil][x_ceil*
00392                                                GetChannelCount()+channel];
00393   double dy = y - y_floor;
00394   double dx = x - x_floor;
00395
00396   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul - ll - ur + lr);
00397 }
00398
00399 template <> inline void Image<unsigned char>::
00400 BilinearInterpolationShiftRegion(const double& x,
00401                                  const double& y,
00402                                  unsigned int hws_x,
00403                                  unsigned int hws_y,
00404                                  unsigned char* Buffer){
00405 #ifdef BIAS_DEBUG
00406   if (ChannelCount_!=1) {
00407     BIASERR("invalid channel count != 1: channels="<<ChannelCount_);
00408     BIASABORT;
00409   }
00410 #endif
00411
00412   /*
00413   // XXXXXXX only for debug purposes: copy region without shift XXXXXXXX
00414   const unsigned int countx = int(x)+hws_x+1;
00415   const unsigned int county = int(y)+hws_y+1;
00416   for (unsigned int iy = int(y)-hws_y; iy< county; iy++) {
00417     for (unsigned int ix = int(x)-hws_x; ix< countx; ix++) {
00418       *Buffer++ = GetImageDataArray()[iy][ix];
00419     }
00420   }
00421   // XXXXXXXXX end debug code XXXXXXXX
00422   */
00423
00424   const unsigned char **ida  = (const unsigned char**)GetImageDataArray();
00425
00426   // get pixel position of upper left corner of region
00427   const unsigned int x_floor = (unsigned int)floor(x) - hws_x;
00428   const unsigned int y_floor = (unsigned int)floor(y) - hws_y;
00429   const unsigned int x_ceil  = (unsigned int)ceil(x)  - hws_x;
00430   const unsigned int y_ceil  = (unsigned int)ceil(y)  - hws_y;
00431
00432   // get pointers to four pixels surrounding upperleft corner of new region
00433   register unsigned char* ul = (unsigned char*) &ida[y_floor  ][x_floor  ];
00434   register unsigned char* ur = (unsigned char*) &ida[y_floor  ][x_ceil];
00435   register unsigned char* ll = (unsigned char*) &ida[y_ceil][x_floor  ];
00436   register unsigned char* lr = (unsigned char*) &ida[y_ceil][x_ceil];
00437
00438   // get pointer to output buffer
00439   register unsigned char* result = Buffer;
00440
00441   // precompute frequently used weights
00442   const double dy = y - floor(y);
00443   const double dx = x - floor(x);
00444   const double dxdy = dx*dy;
00445
00446   // make loop numbers and offset const:
00447   const unsigned int countx = 2*hws_x+1;
00448   const unsigned int county = 2*hws_y+1;
00449   const unsigned int lineoffset = GetWidth()-1-2*hws_x;
00450
00451   // compute new grid pixel by pixel, shifting each pointer one to the right
00452   for (unsigned int iy = 0; iy< county; iy++) {
00453     for (unsigned int ix = 0; ix< countx; ix++, ul++, ur++, ll++, lr++) {
00454       *result = (unsigned char)(*ul + dy*(*ll - *ul) + dx*(*ur - *ul) + dxdy*(*ul + *lr - *ll - *ur));
00455       result++;
00456     }
00457     // end of a window row, go to start of next:
00458     ul += lineoffset;
00459     ur += lineoffset;
00460     ll += lineoffset;
00461     lr += lineoffset;
00462   }
00463
00464 }
00465
00466 template <class StorageType> inline void
00467 Image<StorageType>::BilinearInterpolationShiftRegion(const double& x,
00468                                                      const double& y,
00469                                                      unsigned int hws_x,
00470                                                      unsigned int hws_y,
00471                                                      unsigned char* Buffer){
00472   BIASERR("BilinearInterpolationShiftRegion not implemented for other than unsigned char");
00473 }
00474
00475
00476 #include <Base/Common/BIASpragmaEnd.hh>
00477
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageIO.cpp Source File

Base » Image

ImageIO.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 // TODO: Write Image ImportCV/ExportCV functions using OpenCV cvSaveImage etc.
00026 // TODO: Add Load/ExportImage(filename, img) determining file format extension automatically
00027
00028 #include <bias_config.h>
00029
00030 #define _CRT_SECURE_NO_DEPRECATE
00031
00032 // define it for extra debugging output (JW)
00033 // #define ImageIO_DEBUG_IO
00034
00035
00036 #include "ImageIO.hh"
00037 #include <Base/Common/FileHandling.hh>
00038
00039 // ImageMagick support: Jan Woetzel 10/2004
00040 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00041 #  include <Base/Common/BIASpragmaStart.hh>
00042 #    include <Magick++.h>
00043 #  include <Base/Common/BIASpragmaEnd.hh>
00044 #endif
00045
00046
00047 // required in header (not only cpp)
00048 // due to public EXR PrintHeader interface (JW)
00049 #ifdef BIAS_HAVE_OPENEXR
00050 #  ifdef WIN32
00051 #    pragma warning( push, 1)
00052 #    define PLATFORM_WINDOWS
00053 #  endif // WIN32
00054 #    include <half.h>
00055 #    include <ImfRgbaFile.h>
00056 #    include <ImfRgba.h>
00057 #    include <ImfArray.h>
00058 #    include <ImathBox.h>
00059 using namespace Imf;
00060 using namespace Imath;
00061 #  ifdef WIN32
00062 #    pragma warning( pop)
00063 #  endif // WIN32
00064 #endif
00065
00066
00067 #ifdef BIAS_HAVE_IMLIB
00068 #  include <Imlib.h>
00069 #endif
00070
00071 // use DevIL il with ilu (if DevIL is used at all)
00072 #define USE_DEVIL_ILU
00073
00074 #ifdef BIAS_HAVE_DEVIL
00075 #  include <IL/il.h>
00076 #  ifdef USE_DEVIL_ILU
00077 #    include <IL/ilu.h>
00078 #  endif // USE_DEVIL_ILU
00079 //#  include <IL/ilut.h>
00080 #endif
00081
00082 #include <Base/Debug/DebugSimple.hh>
00083
00084 #ifdef BIAS_DEBUG
00085 #  include <Base/Debug/TimeMeasurement.hh>
00086 #endif // BIAS_DEBUG
00087
00088 #include <fstream>
00089 #include <sstream>
00090
00091 #include "ImageConvert.hh"
00092 #include "ViffHeader.hh"
00093
00094 // for transfrom:
00095 #include <algorithm>
00096 #include <cctype>
00097
00098 // for O_APPEND
00099 #include <fcntl.h>
00100
00101 // for perror
00102 #include <stdio.h>
00103
00104 using namespace BIAS;
00105 using namespace std;
00106
00107 char *ImageIO::MemAlignedBuffer_ = NULL;
00108 unsigned long int ImageIO::MemAlignedBufferSize_ = 0;
00109
00110
00111
00112 /// helper function for ExtensionName type casting @author Jan Woetzel
00113 char myTolower(char c) {
00114   return char(tolower(c));
00115 }
00116
00117
00118
00119 // JW try to Read MIP image and if that fails try all import functions.
00120 int ImageIO::Load(const string& FileName, ImageBase &img)
00121 {
00122 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00123   CALLINFO;
00124 #endif
00125
00126   int result = 0;
00127   ifstream is(FileName.c_str());
00128   char identifier[IDENTIFIER_LENGTH];
00129
00130   if (!is){
00131     result = -1;
00132   } else {
00133     is.read(identifier, IDENTIFIER_LENGTH);
00134     if (!is.good()){
00135       result = -2;
00136       is.close();
00137     } else {
00138       if (identifier[0] == 'M' && identifier[1] == 'I' &&
00139         identifier[2] == 'P'){ // mipimage
00140           is.close();
00141 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00142           COUT("MIP format detected\n");
00143 #endif
00144
00145           result = Read(FileName, img);
00146         } else { // foreign image format
00147           is.close();
00148 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00149           COUT("image not in mip format\n");
00150 #endif
00151           result = ImageIO::ImportImage(FileName, img);
00152         }
00153     }
00154   }
00155   return result;
00156 }
00157
00158
00159 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00160 int ImageIO::ImportMagickPP(const std::string& FileName,
00161                             ImageBase& result,
00162                             const bool & /*dummy*/,
00163                             const bool & readMetaData )
00164 {
00165 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00166   CALLINFO;
00167 #endif
00168
00169   try {
00170     //initialize DLL loaded library (not required on Linux but once on Windows)
00171 #ifdef WIN32
00172     if (!MagickLib::IsMagickInstantiated() )
00173       {
00174         Magick::InitializeMagick(NULL);
00175       };
00176 #endif
00177
00178     Magick::Image image;
00179     image.read( FileName );
00180
00181     // now extract image info from Magick::Image
00182     unsigned width=image.image()->columns;
00183     unsigned height=image.image()->rows;
00184     unsigned bitdepth=image.image()->depth;
00185     unsigned depth=0;
00186     // bitdepth may ba a fractional part of the Byte depth, eg. 12/15 bits are filled.
00187     while (depth<bitdepth)
00188       depth+=8;
00189
00190     depth /= 8; // bit To Byte
00191     //#ifdef BIAS_DEBUG
00192     //    COUT("depth: "<<depth<<"\tbitdepth: "<<bitdepth<<endl);
00193     //#endif
00194
00195 #ifdef BIAS_DAIMLERCHRYSLER
00196     // heuristic to get the correct bitdepth in dc images
00197     // tiff image from daimler have 12 bit bitdepth
00198     string::size_type pos = FileName.find(".tiff");
00199     if (pos != string::npos){
00200       bitdepth = 12;
00201     }
00202 #endif
00203
00204     unsigned cc=0; // ChannelCount
00205     ImageBase::EColorModel cm=ImageBase::CM_invalid;
00206     ImageBase::EStorageType st=ImageBase::ST_invalid;
00207     Magick::StorageType imst=MagickLib::UndefinedPixel;
00208
00209     /// LibMagick: imcs is RGB even for one channel images, like imlib does, too. (bug?)
00210     Magick::ColorspaceType imcs=image.image()->colorspace;
00211     std::string cm_map="";
00212
00213     // choose appropriate storage type
00214     switch (depth)
00215       {
00216       case sizeof(unsigned char):
00217         st=ImageBase::ST_unsignedchar;
00218         imst=MagickLib::CharPixel;
00219         break;
00220       case sizeof(unsigned short):
00221         st=ImageBase::ST_unsignedshortint;
00222         imst=MagickLib::ShortPixel;
00223         break;
00224       case sizeof(float): // could this also be int?
00225         st=ImageBase::ST_float;
00226         imst=MagickLib::FloatPixel;
00227         break;
00228       default:
00229         BIASERR("funny depth "<<depth<<", maybe just unfinished code");
00230         return -4;
00231         break;
00232       }
00233
00234     // choose appropriate color model
00235     switch (imcs)
00236       {
00237       case MagickLib::RGBColorspace:
00238         cm=ImageBase::CM_RGB;
00239         cm_map="RGB";
00240         cc=3;
00241         break;
00242       case MagickLib::GRAYColorspace:
00243         cm=ImageBase::CM_Grey;
00244         cm_map="K";
00245         cc=1;
00246         break;
00247       default:
00248         // look in ImageMagick.h for further ColorspaceType's
00249         BIASERR("color model not implemented ");
00250         return -3;
00251         break;
00252       }
00253     //#ifdef BIAS_DEBUG
00254     //    COUT("cm_map: "<<cm_map<<endl);
00255     //#endif
00256
00257
00258
00259     //#ifdef BIAS_DEBUG
00260     //    COUT("MagickLib::Image: Read "<<image.columns()<<"x"<<image.rows()<<" "
00261     //         <<image.magick()<<" image "<<FileName<<" using ImageMagick++"<<endl);
00262     //    COUT("MagickLib::Image: depth "<<image.depth()<<" bit."<<endl );
00263     //    COUT("MagickLib::Image: comment "<<endl<<image.comment()<<endl );
00264     //    COUT("MagickLib::Image: depth "<<depth<<endl);
00265     //    COUT("MagickLib::Image: size "<<width<<"x"<<height<<endl);
00266     //    COUT("MagickLib::Image: storage class "<<image.image()->storage_class
00267     //         <<endl);
00268     //    COUT("MagickLib::Image: color space "<<image.image()->colorspace<<endl);
00269     //    COUT("MagickLib::Image: channel count "<<cc<<endl);
00270     //#endif
00271
00272     if (!result.IsEmpty()) result.Release();
00273
00274     // do error checking if result has already a specific StorageType
00275     if (result.GetStorageType()!=ImageBase::ST_invalid){
00276       if (result.GetDepth()!=depth){
00277         BIASERR("error: you tried to load a "<<depth<<" byte "
00278                 <<"("<<bitdepth<<"bit) "
00279                 <<"image into an image of storage type "
00280                 <<result.GetStorageType()<<" which has depth "
00281                 <<result.GetDepth()<<" byte");
00282         result.PrintHeader(cout);
00283         //BIASABORT;
00284         return -2;
00285       }
00286     }
00287
00288     if (!result.IsEmpty()) result.Release();
00289
00290     result.Init(width, height, cc, st, true);
00291     //result.PrintHeader(cout);
00292     result.SetBitDepth(bitdepth);
00293
00294     { // scope
00295       if (readMetaData)
00296         {
00297       //#ifdef BIAS_DEBUG
00298           //BIAS::TimeMeasurement tm1("DBG get meta data inside ImportMagickPP ");
00299       //#endif // BIAS_DEBUG
00300           // TODO: crashes due to problem with const reference streaming !
00301           // e.g. on loading ibak "M34/Front/image00000000.jpg" (jw)
00302           // get the meta data from the (ASCII) comment field
00303           stringstream strstr;
00304           // string copy required because you canot directly stream a const references!
00305           // - postpones the crash, but on leaving the scope it crashes, too. MetData operator<< problem?
00306           // TODO, HACK, FIXME fw: 28.2.2006: fw  TODO, HACK, FIXME: Only crash under windows in certain special cases: Needs to be compiled outside the bias library and needs to be run in the debugger of visual studio .net 2003  to reproduce crash. Maybe different libraries are used in this case? Even in that case it only crashes when the argument result  is of type Image<unsigned char>. When result is of type ImageBase, it does not crash.  In all other cases (linux and windows without .net) it works correctly. Neither valgrind nor efence (linux) find any suspicous  activity here. MetaData.operator<< is *NOT* present in callstack. Maybe, buggy stl under windows? TODO, HACK, FIXME, fw:  28.2.2006: fw  TODO, HACK, FIXME
00307           string sTmp = image.comment();
00308           strstr << sTmp;
00309           //COUT("DBG a sTmp         xxx"<<sTmp<<"xxx"<<endl);
00310           //COUT("DBG b strstr.str() xxx"<<strstr.str()<<"xxx"<<endl );
00311           BIASASSERT(result.GetMetaData() != NULL);
00312           strstr >> *(result.GetMetaData());
00313           //result.GetMetaData()->Dump();
00314         }
00315     }
00316
00317
00318     BIASASSERT(result.GetImageData()!=NULL);
00319     image.write(0, 0, width, height, cm_map, imst, result.GetImageData());
00320
00321     // verbose?
00322 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00323   } catch ( Magick::Exception & error_ ) {
00324     BIASERR("Reading "<<FileName<<" with Magick++ failed."<<endl
00325             <<"  Caught exception: "<<endl
00326             <<"  "<<error_.what()<<endl );
00327 #else // verbose
00328   } catch ( Magick::Exception &) {
00329 #endif //verbose
00330     return -1; // error or unsupported format
00331   }
00332
00333   return BIAS_IO_SUCCESS;
00334 }
00335 #endif
00336
00337
00338 #ifdef BIAS_HAVE_OPENEXR
00339 /** Print header information to stream
00340 helper function
00341 @author Jan Woetzel 09/2005 */
00342 int PrintInfoEXR(const RgbaInputFile & f, std::ostream & os)
00343 {
00344   os<<"OpenEXR header information: "<<endl;
00345   os<<"version:         "<<f.version()<<endl;
00346   //os<<"isComplete:      "<<f.isComplete()<<endl;
00347
00348   // (meta) header
00349   const Imf::Header * h = &f.header();
00350   BIASASSERT(h!=NULL);
00351   // data windows
00352   Box2i dw = f.dataWindow();
00353
00354   os<<"hasPreviewImage: "<<h->hasPreviewImage()<<endl;
00355   os<<"pixelAspectRatio:"<<h->pixelAspectRatio()<<endl;
00356   // OpenEXR can handle special image coordinate systems.
00357   os<<"dw dim: "<<dw.max.x - dw.min.x + 1
00358     <<" x "
00359     <<dw.max.y - dw.min.y + 1
00360     <<endl;
00361   os<<"  dw.x: "<<dw.min.x<<".."<<dw.max.x <<endl;
00362   os<<"  dw.y: "<<dw.min.y<<".."<<dw.max.y <<endl;
00363
00364   return BIAS_IO_SUCCESS;
00365 }
00366
00367
00368 // Jan Woetzel 09/2005, Patrick Fittkau 10/2005
00369 int ImageIO::ExportOpenEXR(const std::string& FileName, const ImageBase& img)
00370 {
00371 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00372   CALLINFO;
00373 #endif
00374
00375   try
00376   {
00377     // OpenEXR data struct:
00378     Rgba *exrPixels;
00379     // create exr-format-structure for saving
00380     int exrwidth  = img.GetWidth();
00381     int exrheight = img.GetHeight();
00382     exrPixels = new Rgba[exrheight*exrwidth];
00383
00384     // copy
00385     float **pptr = (float**)(img.GetImageDataArray());
00386     for (int x = 0;x<exrwidth;x++)
00387       for (int y = 0;y<exrheight;y++)
00388       {
00389         exrPixels[y*exrwidth + x].r = (half)pptr[y][x*3  ];
00390         exrPixels[y*exrwidth + x].g = (half)pptr[y][x*3+1];
00391         exrPixels[y*exrwidth + x].b = (half)pptr[y][x*3+2];
00392         exrPixels[y*exrwidth + x].a = (half)1.0;
00393       }
00394
00395       RgbaOutputFile file(FileName.c_str(), exrwidth, exrheight, WRITE_RGBA);
00396       file.setFrameBuffer (exrPixels, 1, exrwidth);
00397       file.writePixels (exrheight);
00398
00399       delete [] exrPixels;
00400       return BIAS_IO_SUCCESS;
00401   } catch
00402     (Iex::BaseExc &error_ )
00403   {
00404     BIASERR("Reading "<<FileName<<" with OpenEXR failed."<<endl
00405       <<"  Caught exception: "<<endl
00406       <<"  "<<error_.what()<<endl
00407       );
00408     return -2; // error
00409   }
00410 }
00411
00412
00413 // fittkau, jw 2005/08
00414 int ImageIO::ImportOpenEXR(const std::string& FileName, ImageBase& result)
00415 {
00416 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00417   CALLINFO;
00418 #endif
00419
00420   try
00421   {
00422
00423     // OpenEXR data starutc:
00424     Array2D<Rgba> exrPixels;
00425     // read OpenEXR-Image into array using OpenEXR lib
00426     // TODO: catch return value/errors/exceptions
00427     // TODO: test format and storagteype of read imge
00428
00429     // see example in "ReadingAndWritingImageFiles.pdf", chapter 2.4 on page 5
00430     // in OpenEXR 1.2.2 documentation (JW)
00431     RgbaInputFile exrfile ( FileName.c_str() );
00432     // pixel data area window
00433     Box2i dw = exrfile.dataWindow();
00434     // OpenEXR can handle special image coordinate systems.
00435     int exrwidth  = dw.max.x - dw.min.x + 1;
00436     int exrheight = dw.max.y - dw.min.y + 1;
00437     BIASASSERT(exrwidth>0);
00438     BIASASSERT(exrheight>0);
00439
00440 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00441     //exrfile.header
00442     PrintInfoEXR(exrfile, std::cout);
00443 #endif
00444
00445     // allocate memory:
00446     exrPixels.resizeErase(exrheight, exrwidth);
00447     exrfile.setFrameBuffer (
00448       &exrPixels[0][0] - dw.min.x - dw.min.y * exrwidth,
00449       1,
00450       exrwidth
00451       );
00452
00453     // copy the pixel data from file into buffer
00454     // for Y-lines min..max (to support partial read)
00455     // we read the complete image.
00456     exrfile.readPixels (dw.min.y, dw.max.y);
00457
00458     // done with exr read image
00459     // convert to BIAS Image Base, now.
00460
00461     if (!result.IsEmpty())  result.Release();
00462
00463     // HACK: fixed format float RGB for now. (fittkau, jw 2005/08)
00464     result.Init(exrwidth, exrheight, 3, BIAS::ImageBase::ST_float, true );
00465     float **pptr = (float**)(result.GetImageDataArray());
00466
00467     for (int x = 0;x<exrwidth;x++)
00468       for (int y = 0;y<exrheight;y++)
00469       {
00470         pptr[y][x*3  ] = (float)exrPixels[y][x].r;
00471         pptr[y][x*3+1] = (float)exrPixels[y][x].g;
00472         pptr[y][x*3+2] = (float)exrPixels[y][x].b;
00473       }
00474
00475       return BIAS_IO_SUCCESS;
00476
00477   }
00478 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00479   catch (Iex::BaseExc &error_ ) {
00480     BIASWARN("Reading "<<FileName<<" with OpenEXR failed."<<endl
00481       <<"  Caught exception: "<<endl
00482       <<"  "<<error_.what()<<endl
00483       );
00484 #else
00485   catch (Iex::BaseExc &/*error_*/ ) {
00486 #endif
00487     return -1; // error
00488   }
00489 }
00490 #endif // BIAS_HAVE_OPENEXR
00491
00492
00493
00494 // JW: major rewrite 2005
00495 int ImageIO::ImportImage(const string& filename, ImageBase &result )
00496 {
00497 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00498   CALLINFO;
00499 #endif
00500
00501   int res=-1; // init as file not read
00502   ifstream ifs;
00503   unsigned char tmpline[512];
00504
00505 #ifdef   WIN32
00506   ifs.open(filename.c_str(),ios::binary);
00507 #else  //not WIN32
00508   ifs.open(filename.c_str());
00509 #endif //WIN32
00510
00511   if (!ifs) {
00512     BIASERR("ImportImage(): open of file \""<<filename<<"\" failed");
00513     perror(filename.c_str());
00514     ifs.close();
00515     return -1;
00516   }
00517
00518   // invalidate old uid, since it may refer to a different image
00519   result.InvalidateUID();
00520
00521   // read first two chars to get a hint what this file is
00522   ifs >>tmpline[0]>>tmpline[1];
00523   if (!ifs){
00524     res=-1;
00525     BIASERR("unable to read from "<<filename);
00526     ifs.close();
00527     return res;
00528   }
00529
00530   // Check for famous P5/P6 in PNM, PGM, PBM to determine the fileformat
00531   // and call our own reader if appropriate.
00532   if (tmpline[0] =='P' && tmpline[1] == '5') {
00533 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00534     COUT("reading single channel pnm/pgm/pbm image using ImportImagePnm_\n");
00535 #endif
00536     res = ImportImagePnm_(ifs, result, 1);
00537     if (res!=BIAS_IO_SUCCESS)
00538       BIASERR("error reading "<<filename<<" although P5 format detected.");
00539     result.SetColorModel(ImageBase::CM_Grey);
00540   } else if (tmpline[0] =='P' && tmpline[1] == '6') {
00541 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00542     COUT("reading 3 channel pnm/pgm/pbm image using ImportImagePnm_\n");
00543 #endif
00544     res = ImportImagePnm_(ifs, result, 3);
00545     if (res!= BIAS_IO_SUCCESS)
00546       BIASERR("error reading "<<filename<<" although P6 format detected.");
00547     result.SetColorModel(ImageBase::CM_RGB);
00548   }
00549
00550   // other loaders do not use file stream but operate on filename directly
00551   // and open theirselves.
00552   ifs.close();
00553
00554   //
00555   // Try to read using external image loaders.
00556   //
00557
00558   // try EXR first because imlib is too verbose on unsupported formats liek exr
00559 #ifdef BIAS_HAVE_OPENEXR
00560   if (res!=BIAS_IO_SUCCESS)
00561     res=ImportOpenEXR(filename, result);
00562 #endif
00563
00564 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00565   if (res!=BIAS_IO_SUCCESS)
00566     res=ImportMagickPP(filename, result);
00567 #endif
00568
00569 #ifdef BIAS_HAVE_IMLIB
00570   if (res!=BIAS_IO_SUCCESS)
00571     res=ImportImlib(filename, result);
00572 #endif
00573
00574 #ifdef BIAS_HAVE_DEVIL
00575   if (res!=BIAS_IO_SUCCESS)
00576     res=ImportDevIL(filename, result);
00577 #endif
00578
00579   //#ifdef BIAS_HAVE_RADIANCE
00580   if (res!=BIAS_IO_SUCCESS)
00581     res=ImportRADIANCE(filename, result);
00582   //#endif
00583
00584   // JW: try to read RAW4096/RAW04096/RAW0nnnn format
00585   if (res!=BIAS_IO_SUCCESS)
00586     res=ImportRAWwithHeader(filename, result);
00587
00588
00589   // JW: try to read VIFF if anything else failed
00590   if (res!=BIAS_IO_SUCCESS) {
00591     // open fstream
00592     std::ifstream ifs(filename.c_str(), std::ios::binary );
00593     if (!ifs) {
00594       BIASERR("could not open "<<filename);
00595     } else {
00596       // OK
00597       res=ImportImageViff_(ifs, result );
00598     }
00599   };
00600
00601
00602   if (res==0){
00603     // --- handle meta data ----------------
00604     AppData ad;
00605     if (result.GetMetaData()->Find(AppData::MD_UUID,"#[UUID]", ad)>=0){
00606       if (ad.tag==AppData::MD_USE_ASCII){
00607         //cerr << "before |"<< ad.sdata <<"|"<< endl ;
00608         while (ad.sdata.length()>0 && (ad.sdata[0]=='#' || ad.sdata[0]==' ' ||
00609           ad.sdata[0]=='\n'))
00610           ad.sdata.erase(0, 1);
00611         if (ad.sdata.length()>36)
00612           ad.sdata.erase(36, ad.sdata.length()-36);
00613         //cerr<<"after |"<<ad.sdata<<"|"<<" length: "<<ad.sdata.length()<<endl;
00614         UUID TempID(ad.sdata);
00615         result.SetUID(TempID);
00616       } else {
00617         BIASERR("UUID is no meta datum in binary images");
00618         BIASERR("possibly two concurrent UUIDs in one image");
00619         //result.SetUID(*((UUID*)ad.data));
00620         //BIASASSERT(false);
00621         BIASABORT;
00622       }
00623     } else {
00624 #ifdef BIAS_DEBUG
00625 #  ifdef BIAS_EXTRA_WARN
00626       BIASERR("warning, no valid UID read, UUID must be set manually");
00627 #  endif
00628 #endif
00629       result.InvalidateUID();
00630     }
00631     //cerr <<"header in ImportImage"<<endl;
00632     //result.PrintHeader(cout);
00633   }
00634   return res;
00635 } // ImportImage
00636
00637
00638
00639
00640
00641 #ifdef BIAS_HAVE_IMLIB
00642 ///JW extracted from ImportImage 10/2004
00643 int ImageIO::ImportImlib(const string& filename, ImageBase &result,
00644                          bool assumeGrey)
00645 {
00646 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00647   CALLINFO;
00648 #endif
00649   // Data structures
00650   ImlibImage *img;
00651   //Static since I have not been able to find a function that frees Imlibdata
00652   //If we read one Image then it is reasonable to think that we will call
00653   //this function again
00654   static ImlibData  *iData=NULL;
00655   static Display    *disp=NULL;
00656
00657   if(disp==NULL)
00658     // Imlib really needs a pointer to the current display (on Unix)
00659     disp=XOpenDisplay(NULL);
00660   if(iData==NULL)
00661     iData=Imlib_init(disp);
00662   img = Imlib_load_image(iData, (char*) filename.c_str());
00663
00664   if (img == NULL) {
00665     // don't be verbose because this is one of many libs trying to open fileformats, e.g. viff, exr, ...
00666     //BIASERR("Could not read or decode image file "<<filename<<" with Imlib. Nothing read!");
00667     return -1;
00668   }
00669
00670   bool isGrey = true;
00671   // Do I have to test for grey at all?
00672   if (assumeGrey) {
00673     isGrey = true;
00674   } else {
00675
00676     // Go through the image and test for equal R,G,B values for each pixel
00677     register unsigned char* start = img->rgb_data;
00678     register unsigned char* stop  = start +
00679       ( img->rgb_width * img->rgb_height * 3);
00680
00681     while (start < stop) {
00682       if ( (*(start) == *(start+1)) && *(start)  == *(start+2)) {
00683         start+=3;
00684       } else {
00685         isGrey = false;
00686         break;
00687       }
00688     }
00689   }
00690
00691   // must be empty before new image information can be inserted
00692   if (!result.IsEmpty()){
00693     result.Release();
00694   }
00695
00696   // copy the raw data in
00697   register unsigned char* sourceImageData = img->rgb_data;
00698   register unsigned char* imageData;
00699   register unsigned char* imageDataStop;
00700
00701   /// Friso said: imlib seems to read three channel images even for
00702   // single channel grey images (JW 10/2004)
00703   if (isGrey) {
00704     // Grey image
00705     result.Init(img->rgb_width, img->rgb_height, 1);
00706     result.SetColorModel(ImageBase::CM_Grey);
00707     imageData     = (unsigned char*)result.GetImageData();
00708     imageDataStop = imageData + result.GetPixelCount();
00709
00710     // Take every third value (r=g=b) to create an image with grey values
00711     for (; imageData < imageDataStop; imageData++, sourceImageData += 3) {
00712       *imageData = *sourceImageData;
00713     }
00714
00715   } else {
00716     // Color image
00717     result.Init(img->rgb_width, img->rgb_height, 3);
00718     result.SetColorModel(ImageBase::CM_RGB);
00719     imageData     =  (unsigned char*)result.GetImageData();
00720     imageDataStop = imageData + 3 *  result.GetPixelCount();
00721     for (; imageData < imageDataStop; imageData++, sourceImageData++) {
00722       *imageData = *sourceImageData;
00723     }
00724   }
00725
00726   Imlib_kill_image(iData,img);
00727   //XCloseDisplay(disp);
00728   return BIAS_IO_SUCCESS;
00729 }
00730 #endif  // BIAS_HAVE_IMLIB
00731
00732
00733
00734 #ifdef BIAS_HAVE_IMLIB
00735 // jw
00736 int ImageIO::ExportImlib( const string& c_filename, ImageBase &img,
00737                          enum TFileFormat FileFormat,
00738                          bool sync,
00739                          int jpeg_quality,
00740                          bool forceNewID,
00741                          const bool & writeMetaData)
00742 {
00743 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00744   CALLINFO;
00745 #endif
00746   int result=-1;
00747   // first get copy of image in img, which is unsigned char
00748   // because most formats based on unsigned char
00749   Image<unsigned char> outpic;
00750   outpic=img;
00751   // Imlib needs an RGB image, interleaved with unsigned char as data type
00752   Image<unsigned char> RGB_version;
00753   ImageConvert::ToRGB(outpic, RGB_version);
00754
00755   // create Imlib data structures
00756   ImlibImage imgImLib;
00757   struct _ImlibSaveInfo saveinfo;
00758   // scale from 0..100 to 0..255
00759   /// \todo: is this imlib scale 2.56 correct, shouldn't it be 2.55 *100 (JW)?
00760   saveinfo.quality = (int) (2.56 * (double) jpeg_quality);
00761
00762   /// static because we didn't find free for xopendisplay... (jw)
00763   static ImlibData  *idata=NULL;
00764   static Display    *imgDisp=NULL;
00765
00766   /// \todo is this the source of the DISPLAY errors (jw)?
00767   if (imgDisp==NULL) imgDisp = XOpenDisplay(NULL);
00768   if (idata==NULL) idata = Imlib_init(imgDisp);
00769
00770   // create an Imlib image and take the Image image data for this purpose
00771   imgImLib.rgb_width  = RGB_version.GetWidth();
00772   imgImLib.rgb_height = RGB_version.GetHeight();
00773   imgImLib.rgb_data   = RGB_version.GetImageData();
00774   imgImLib.filename   = "dummy_file_name";
00775   // call the Imlib saving routine
00776   if (Imlib_save_image(idata, &imgImLib, (char*)c_filename.c_str(), &saveinfo) == 0) {
00777     BIASERR("Error saving " <<c_filename << " with imlib occured. Nothing saved!");
00778     result = -1;
00779   } else {
00780     // OK, successful saved
00781     result = BIAS_IO_SUCCESS;
00782   };
00783   return result;
00784 }
00785 #endif
00786
00787
00788
00789
00790 int ImageIO::ImportImagePnm_(ifstream& ifs, ImageBase &result, int depth)
00791 {
00792 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00793   CALLINFO;
00794 #endif
00795
00796   int xres=-1, yres=-1, maxval=-1, read=0;
00797   int res=0;
00798   char c;
00799
00800   if (!result.IsEmpty())
00801     result.Release();
00802   // start from the beginning and read line with P5 or P6
00803   ifs.seekg(0,ios::beg);
00804
00805   ifs >> c;
00806   if (c!='P'){
00807     BIASERR("invalid magic cookie");
00808     return -1;
00809   }
00810   ifs >> c;
00811   if (c!='5' && c!='6'){
00812     BIASERR("invalid magic cookie");
00813     return -1;
00814   }
00815
00816   // this allows an arbitary amount of whitespace in between the header
00817   while (read<3){
00818     ifs >> c;
00819     ifs.putback(c);
00820     if (c=='#'){
00821       ifs >> *result.GetMetaData();
00822       if (!ifs){
00823         BIASERR("error reading meta data");
00824         return -1;
00825       }
00826     } else if (c>29 || c<40){ // number 0-9
00827       switch (read){
00828     case 0:
00829       ifs >> xres;
00830       //cerr << "xres: "<<xres<<endl;
00831       read++;
00832       break;
00833     case 1:
00834       ifs >> yres;
00835       //cerr << "yres: "<<yres<<endl;
00836       read++;
00837       break;
00838     case 2:
00839       ifs >> maxval;
00840       //cerr << "maxval: "<<maxval<<endl;
00841       read++;
00842       break;
00843     default:
00844       BIASERR("funny error: "
00845         <<"there should be only 3 numerical values in pgm header");
00846       return -1;
00847       break;
00848       }; // switch
00849     } else { // if (c>29 || c<40){
00850       BIASERR("corrupted image header "<<c);
00851     }
00852   }
00853   ifs.read(&c, 1*sizeof(char)); // last whitespace
00854
00855   //cerr <<"image has size "<<xres<<"x"<<yres<<"  with maxval "<<maxval<<endl;
00856   if (maxval==255){
00857 #ifdef BIAS_DEBUG
00858     if (result.GetStorageType()!=ImageBase::ST_unsignedchar &&
00859       result.GetStorageType()!=ImageBase::ST_invalid){
00860         BIASERR("warning trying to load an unsigned char image into an image of"
00861           <<" storage type "<<result.GetStorageType());
00862         //BIASASSERT(false);
00863         BIASABORT;
00864       }
00865 #endif
00866       result.Init(xres, yres, depth, ImageBase::ST_unsignedchar);
00867       ifs.read(reinterpret_cast<char *>(result.GetImageData()), xres * yres * depth);
00868   } else if (maxval==4095){ // 12 bit images
00869 #ifdef BIAS_DEBUG
00870     if (result.GetStorageType()!=ImageBase::ST_unsignedshortint &&
00871       result.GetStorageType()!=ImageBase::ST_invalid){
00872         BIASERR("warning trying to load an unsigned short int image into an "
00873           <<"image of storage type "<<result.GetStorageType());
00874       }
00875 #endif
00876       result.Init(xres, yres, depth, ImageBase::ST_unsignedshortint);
00877       result.SetBitDepth(12);
00878       ifs.read(reinterpret_cast<char *>(result.GetImageData()),
00879         sizeof(unsigned short int) * xres * yres * depth);
00880       // check if bytes need swapping
00881       unsigned short int *p=(unsigned short int *)result.GetImageData(), *pe;
00882       pe=p+result.GetPixelCount()*result.GetChannelCount();
00883       // check if pixel > maxval exist
00884       bool swap=false;
00885       while (p<pe) { swap = (swap || (*p > maxval)); p++; }
00886       // swap bytes if pixel > maxval existed
00887       if (swap){
00888         BIASERR("maxval > "<<maxval<<" : swapping LSB and MSB");
00889         char *cp=(char *)result.GetImageData(), *cpe;
00890         cpe=(char *)((unsigned short int *)cp + result.GetPixelCount()*
00891           result.GetChannelCount());
00892         char c;
00893         while (cp<cpe){
00894           c=cp[0]; cp[0]=cp[1]; cp[1]=c;
00895           cp+=2;
00896         }
00897       }
00898 #ifdef BIAS_DAIMLERCHRYSLER
00899       // check image, since bosch fills last line with values above 4095
00900       p=((unsigned short int *)result.GetImageData());
00901       pe=p+result.GetPixelCount()*result.GetChannelCount();
00902       while (p<pe) {
00903         if (*p>maxval) *p=maxval;
00904         p++;
00905       }
00906 #endif
00907   }
00908
00909   if (!ifs.good()){
00910     BIASERR("error reading from ifs");
00911     res=-1;
00912   }
00913   return res;
00914 }
00915
00916
00917 int ImageIO::Save(
00918                   const std::string& FileName,
00919                   /*const */ ImageBase &img,
00920                   const enum TFileFormat FileFormat,
00921                   const bool sync,
00922                   const int jpeg_quality,
00923                   const bool forceNewID,
00924                   const bool & writeMetaData)
00925 {
00926   return ExportImage(FileName,
00927     img,
00928     FileFormat,
00929     sync,
00930     jpeg_quality,
00931     forceNewID,
00932     writeMetaData );
00933 }
00934
00935
00936
00937 int ImageIO::ExportImage(const string& c_filename,
00938                          /*const*/ ImageBase &img,
00939                          const enum TFileFormat c_FileFormat,
00940                          const bool sync,
00941                          const int c_jpeg_quality,
00942                          const bool forceNewID,
00943                          const bool & writeMetaData)
00944 {
00945 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
00946   CALLINFO;
00947 #endif
00948
00949   // do NOT scale or shift in this routine.
00950   // Do it before calling this routine if you need it. (JW 04/2003)
00951
00952   int result = -1;
00953   int quality = c_jpeg_quality;
00954
00955   // non const to change for auto detection:
00956   TFileFormat FileFormat=c_FileFormat;
00957   if (FileFormat==FF_auto)
00958   {
00959     // determine by filename extension:
00960     FileFormat=GetFileFormat(c_filename);
00961     // if we couldn't determine BIAS FileFormat
00962     // give the external libs their own "low level" try
00963     if (FileFormat==FF_unknown)
00964       FileFormat=FF_auto;
00965   };
00966
00967   // non const for adding suffix
00968   string filename(c_filename);
00969
00970   if (img.GetStorageType()==ImageBase::ST_invalid){
00971     BIASERR("cannot save images with StoragType ST_invalid. ");
00972     return -1;
00973   }
00974
00975
00976   // -----------------------------------------------------
00977   // -- UUID handling following teh ide:a
00978   // -- if the image does not have a UUID we generate one that is written to disk.
00979   // Q: Shall the ID be assigned to the orig. image "by ref." too
00980   //    which results in a *nonÜ const image?
00981   // A: Yes, we want the side effect of assigning the ID by reference,
00982   //    and not only to the local copy for disk only. (koeser, jw 12/Dec/2005)
00983   //    However, this behavior will change when we adopt the calling code
00984   //    to make img const.
00985   // -----------------------------------------------------
00986   //
00987   // force a fresh UID
00988   if (forceNewID) {
00989     img.SetUID(UUID::GenerateUUID());
00990   }
00991
00992   // append to metadataonly if newID froced
00993   // or metadat is really written
00994   // to avoid side effect in the long run
00995   if (writeMetaData && (!img.GetUID().IsValid()))
00996   {
00997     // the image to be saved will become const some day
00998     BIASWARN("UUID assignment required. Please fix your code and assign a UID in the calling function if desired.");
00999     img.SetUID(UUID::GenerateUUID());
01000   }
01001   // write uuid to meta data if valid (only temporary to utilize metadata i/o)
01002   if (writeMetaData)
01003   {
01004     BIASASSERT( img.GetUID().IsValid() );
01005     string suuid;
01006     img.GetUID().GetString(suuid);
01007     img.GetMetaData()->Add("#[UUID]", suuid);
01008   }
01009
01010
01011   // -------------------------------------------------------------
01012   // ---  try to write with our internal format handlers, first.
01013   // -------------------------------------------------------------
01014
01015   if (result!=BIAS_IO_SUCCESS) {
01016     // construct valid filename with appropriate extension
01017     switch (FileFormat)
01018     {
01019     case FF_mip:
01020       filename = ImageIO::ExtensionName( filename, GetExtension(FileFormat) );
01021       result = Write(filename, img, sync, forceNewID);
01022       break;
01023     case FF_pgm:
01024     case FF_ppm:
01025       {
01026         filename = ExtensionName( filename, GetExtension(FileFormat) );
01027         // use our internal impl. only for 8bit, 16 bit is impl. incorrectly
01028         if (img.GetDepth()==1) /* Byte per Channel */
01029         {
01030           if ((FileFormat==FF_pgm) && (img.GetChannelCount()!=1))
01031           {
01032             // we need to convert:
01033             Image<unsigned char> greyIMG(img);
01034             ImageConvert::IP_ToGrey(greyIMG);
01035             result = ExportImagePnm_( filename, greyIMG, sync, writeMetaData);
01036           } else {
01037             // no slow conversion, is already correct fmt
01038             result = ExportImagePnm_( filename, img,     sync, writeMetaData);
01039           };
01040         }
01041       }
01042       break;
01043     case FF_jpg:
01044       filename = ImageIO::ExtensionName( filename, GetExtension(FileFormat) );
01045       if (c_jpeg_quality < 0 || c_jpeg_quality > 100)
01046       {
01047         BIASERR("The quality "<<c_jpeg_quality
01048           <<" is out of valid range 0..100 % falling back to 100% full quality." );
01049         quality=100;
01050       }
01051       break;
01052     case FF_raw4096:
01053       BIASERR("writing raw4096 is not (yet) implemented in BIAS, only on WIN32 scorpion grab application.");
01054       return -7;
01055       break;
01056
01057       //  // we could add our internal handlers for pnm, here.
01058       //  // however - the IMageMagicj and DevIL versions
01059       //  // are more reliable, in particular for hdr formats.
01060
01061     case FF_auto:
01062     case FF_unknown:
01063       // leave the filename as it is for fmt detection by filename.
01064       break;
01065     case FF_bmp:
01066     case FF_pbm:
01067     case FF_tif:
01068     case FF_png:
01069     case FF_viff:
01070     case FF_exr:
01071     case FF_dds:
01072       filename = ExtensionName( filename, GetExtension(FileFormat) );
01073       break;
01074     default:
01075       BIASERR("Unknown image file format for saving "<<c_filename
01076         <<"Nothing saved!"
01077         );
01078       return -1;
01079     } // switch
01080   };
01081
01082   // --------------------------------------------------
01083   // ---   Try to write using external libraries.   ---
01084   // --------------------------------------------------
01085
01086 #ifdef BIAS_HAVE_OPENEXR
01087   if (result!=BIAS_IO_SUCCESS)
01088     // handle only those formats OpenEXR supports
01089     if (FileFormat==FF_exr)
01090       result=ExportOpenEXR(filename, img );
01091 #endif
01092
01093 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
01094   // try to use ImageMagick++ library.
01095   if (result!=BIAS_IO_SUCCESS)
01096     // skip the formats ImageMagick cannot handle,
01097     // at least those it claims to handle but is dpoing wrong things (e.g. dds)
01098     if (
01099       (FileFormat!=FF_dds) &&
01100       (FileFormat!=FF_exr) &&
01101       (FileFormat!=FF_mip) &&
01102       (FileFormat!=FF_raw4096)
01103       )
01104       result=ExportMagickPP (filename, img, quality, writeMetaData);
01105 #endif
01106
01107 #ifdef BIAS_HAVE_IMLIB
01108   // try to use imlib library
01109   // special saving information, only needed for jpeg images
01110   //struct _ImlibSaveInfo saveinfo;
01111   //saveinfo.quality = (int) (2.56 * (double) jpeg_quality);
01112   if (result!=BIAS_IO_SUCCESS)
01113     // skip unsupported fmts.
01114     if (
01115       (FileFormat!=FF_dds) &&
01116       (FileFormat!=FF_exr) &&
01117       (FileFormat!=FF_mip) &&
01118       (FileFormat!=FF_raw4096)
01119       )
01120       result = ExportImlib( filename, img,
01121       FileFormat,
01122       sync,
01123       quality,
01124       forceNewID,
01125       writeMetaData);
01126 #endif
01127
01128 #ifdef BIAS_HAVE_DEVIL
01129   // try to use DevIL library
01130   if (result!=BIAS_IO_SUCCESS)
01131     if (
01132       (FileFormat!=FF_exr) &&
01133       (FileFormat!=FF_mip) &&
01134       (FileFormat!=FF_raw4096)
01135       )
01136       result=ExportDevIL(filename, img);
01137 #endif
01138
01139   return result;
01140 }
01141
01142
01143
01144 int ImageIO::ExportImagePnm_(const string &FileName,
01145                              ImageBase &img,
01146                              bool sync,
01147                              const bool & writeMetaData
01148                              )
01149 {
01150 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01151   CALLINFO;
01152 #endif
01153   ofstream ofs;
01154   // bool sync=false;
01155
01156 #ifdef   WIN32
01157   ofs.open(FileName.c_str(),ios::binary);
01158 #else  //not WIN32
01159   ofs.open(FileName.c_str());
01160 #endif //WIN32
01161
01162   if (!ofs) {
01163     BIASERR("ExportImagePnm_() : open of file "<<FileName<<" failed");
01164     perror(FileName.c_str());
01165     return -1;
01166   }
01167
01168 #ifdef BIASDEBUG
01169   if (img.GetDepth()!=1)
01170     BIASERR(FUNCNAME <<" supports only 8 bit per Channel images. Please call ExportImage or Save instead.");
01171 #endif // BIASDEBUG
01172
01173   switch (img.GetChannelCount()) {
01174   case 3: // 8bit ppm
01175     ofs <<"P6"<<endl;
01176     break;
01177
01178   case 1: // 8bit pgm
01179     ofs << "P5"<<endl;
01180     break;
01181   default:
01182     BIASERR("ExportImagePnm_() : unsupported number of channels: "<<img.GetChannelCount());
01183     return -1;
01184   }
01185
01186   if (writeMetaData){
01187     img.GetMetaData()->WriteAscii(ofs);
01188     if (!ofs){
01189       BIASERR("writing MetaData failed");
01190       return -2;
01191     }
01192   };
01193
01194   ofs << img.GetWidth()<<" "<<img.GetHeight()<<endl;
01195   ofs << "255"<<endl;
01196
01197   ofs.write(reinterpret_cast<char *>(img.GetImageData()), img.GetSize());
01198   if(!ofs) {
01199     BIASERR("ExportImagePnm_() : write failed");
01200     return -1;
01201   }
01202
01203   if (sync) {
01204     // flush streambuf from c++
01205     ofs.flush();
01206     // flush system buffers
01207 #ifndef _WIN32
01208 #if __GNUC__ < 3
01209     fsync(ofs.rdbuf()->fd());
01210 #else
01211     ofs.rdbuf()->pubsync();
01212 #endif
01213 #else
01214     ofs.rdbuf()->pubsync();
01215 #endif
01216   }
01217
01218   ofs.close();
01219   return 0;
01220 }
01221
01222
01223 std::string ImageIO::ExtensionName(const std::string & oldName,
01224                                    const std::string & newExtension)
01225 {
01226   string name    = oldName; // full name
01227   string ext     = BIAS::Extension( oldName );
01228   string newExtLC= BIAS::LowerCase( newExtension );
01229
01230   // catch empty file name:
01231   if (name.size()<1)
01232     name="out___"; // default
01233
01234   // append extension if it is not the correct case insensitive extension:
01235   if (ext!=newExtLC) {
01236     BIASASSERT(name.size()>0);
01237     const char c = name[name.size()-1];
01238     if (c!='.')
01239       name+= ".";
01240     name+=newExtLC;
01241   }
01242   return name;
01243 }
01244
01245
01246 int ImageIO::Write(const string& FileName, ImageBase &img,
01247                    bool sync, bool forceNewID)
01248 {
01249 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01250   CALLINFO;
01251 #endif
01252
01253   int res = 0;
01254   ofstream os;
01255
01256   // assign new id if forced or there is none yet
01257   if ((forceNewID) || (!img.GetUID().IsValid())) {
01258     img.SetUID(UUID::GenerateUUID());
01259   }
01260
01261   // avoid ".mip.mip" (JW)
01262   string file = ImageIO::ExtensionName( FileName, "mip");
01263
01264 #ifdef   WIN32
01265   os.open(file.c_str(),ios::binary);
01266 #else  //not WIN32
01267   os.open(file.c_str());
01268 #endif //WIN32
01269
01270   if (!os){
01271     string Errorstring="Error opening "+file+" writing";
01272     perror(Errorstring.c_str());
01273     return -1;
01274   }
01275
01276   os << img;
01277
01278   res = (os.good())?(0):(-5);
01279
01280   if (res==0){
01281     //cerr <<"Writing MetaData\n";
01282     //img.GetMetaData()->Dump();
01283     img.GetMetaData()->WriteBinary(os);
01284     if (!os){
01285       BIASERR("writing MetaData failed");
01286       res=-6;
01287     }
01288   }
01289
01290   if (sync) {
01291     // flush streambuf from c++
01292     os.flush();
01293     // flush system buffers
01294 #ifndef _WIN32
01295 #  if __GNUC__ < 3 // in gcc 2.9x we can get a POSIX file descriptor
01296     fsync(os.rdbuf()->fd());
01297 #  else   // in gcc 3.x this is prohibited :-(
01298     os.rdbuf()->pubsync();
01299     //     ::sync(); // this is systemcall sync() to sync all buffers
01300 #  endif
01301 #else
01302     /** @todo Sync written files and buffers to disk under WIN32
01303     (evers 2004-10-14) */
01304     //  os.rdbuf()->pubsync();
01305     //     ::sync();
01306 #endif
01307   }
01308   os.close();
01309
01310 #ifndef _WIN32 // alternative way to sync, reopen file to get a handle
01311   int fd = open(file.c_str(),O_APPEND);
01312   fsync(fd); // and now fsync()
01313   close(fd);
01314 #endif
01315   return res;
01316 }
01317
01318
01319 int ImageIO::Read(const string& FileName, ImageBase &img)
01320 {
01321 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01322   CALLINFO;
01323 #endif
01324
01325   int res=0;
01326   ifstream is;
01327
01328 #ifdef   WIN32
01329   is.open(FileName.c_str(),ios::binary);
01330 #else  //not WIN32
01331   is.open(FileName.c_str());
01332 #endif //WIN32
01333
01334   if (!is){
01335     string Errorstring="Error opening "+FileName+" for reading";
01336     perror(Errorstring.c_str());
01337     return -1;
01338   }
01339   is >> img;
01340
01341
01342   res = (is.good())?(0):(-5);
01343
01344   if (res==0){
01345     //cerr << "ImageIO::Read() : "<<is.tellg()<<endl;
01346     is >> *img.GetMetaData();
01347     if (!is && !is.eof()){
01348       BIASERR("error reading MetaData");
01349       res = -6;
01350     }
01351   }
01352
01353   //img.GetMetaData()->Dump();
01354
01355   is.close();
01356
01357
01358   return res;
01359 }
01360
01361
01362
01363 int ImageIO::ImportImageViff_(std::ifstream& ifs, ImageBase &result)
01364 {
01365 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01366   CALLINFO;
01367 #endif
01368
01369   /*class*/ xvimage viff;
01370   if (!ifs) return -1;
01371   if (!result.IsEmpty())  result.Release();
01372   ifs.seekg(0, ios::beg);
01373
01374   // read header struct (jw)
01375   ifs.read((char*)&viff,sizeof(viff));
01376
01377   cout <<"read viff size "<<viff.row_size<<" x "<<viff.col_size<<endl;
01378   // too big viff image size usually means it is no viff image
01379   // and would blow memory (jw 08/2005)
01380   const unsigned long maxUsefulDim=4096*8;
01381   if (viff.row_size>maxUsefulDim || viff.col_size>maxUsefulDim){
01382     // corrupt image?
01383     BIASERR(
01384       "viff image dim "<<viff.row_size<<"x"<<viff.col_size<<" is not useful(>"<<maxUsefulDim<<"),"<<endl
01385       <<"handling it as error. Skipping viff read. Adapt maxUsefulDim if you feel this behavior is wrong. "
01386       );
01387     return -1; // error
01388   }
01389
01390   //   if (xres %4 >0) xresaligned = xres - xres%4;
01391   //   else xresaligned = xres;
01392
01393   //result.Init(xresaligned, yres, depth, ImageBase::ST_unsignedchar);
01394   result.Init(viff.row_size, viff.col_size,
01395     1, ImageBase::ST_float); // 1 is the number of channels
01396   //  cerr << "initialized with " << xres << " " << yres
01397   // << " unsigned char" << endl;
01398
01399   // read data area (jw)
01400   ifs.read(reinterpret_cast<char*>(result.GetImageData()), result.GetSize());
01401   result.SetColorModel(ImageBase::CM_Grey);
01402
01403   return 0;  // ok
01404 }
01405
01406
01407 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
01408 /** @brief: This routine is working inefficiently,
01409 because it doesn't know what to do about conversion if read and requested
01410 types don't match (JW 10/2004)
01411 However it works and assumes RGB in case of doubt.
01412 \todo rewrite by making more use of type Image<..> instead of ImageBase
01413 because lossless conversions and warnings for unwanted lossy conversions
01414 are easier, then (JW).
01415 @author Jan Woetzel 10/2004 */
01416 int ImageIO::ImportMagickPPAutoconvert(const std::string& FileName,
01417                                        ImageBase& result,
01418                                        const bool &/*assumeGrey*/,
01419                                        const bool &readMetaData )
01420 {
01421 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01422   CALLINFO;
01423 #endif
01424
01425   try {
01426 #ifdef WIN32
01427     // initialize DLL loaded library (not required on Linux but once on Windows)
01428     if (!MagickLib::IsMagickInstantiated() )
01429     {
01430       Magick::InitializeMagick(NULL);
01431     };
01432 #endif
01433     Magick::Image image; // temporary converter for lib usage
01434
01435     // Read a file into image object using Magick++ library function:
01436     image.read( FileName );
01437
01438 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01439     COUT(
01440       "DBG Read "<<image.columns()<<"x"<<image.rows()<<" "
01441       <<image.magick()<<" image "
01442       <<FileName<<" using ImageMagick++"<<endl
01443       <<"  depth: "<<image.depth()<<" bit."<<endl
01444       <<"  comment: "<<endl<<image.comment()<<endl
01445       );
01446 #endif
01447
01448     // determine if import image format/channels and bit depth match:
01449     Magick::StorageType outputST=Magick::CharPixel; // output storage type
01450
01451     /** keep the output storagetype
01452     \todo TODO HACK add dynamic cast test for templated Image<> to convert loaded float imaeg automatically to uc etc.. (JW)
01453     \todo add more knowledge about conversion and the option of errors if requested and read type don't match (JW).
01454     check if at least StorageType and bit depth match:
01455     */
01456
01457     //
01458     // first switch: ouput storagetype
01459     //
01460     switch (result.GetStorageType())
01461     {
01462     case BIAS::ImageBase::ST_invalid:
01463       BIASERR("invalid Storagetype ST_invalid FileName="<<FileName<<endl);
01464       break;
01465
01466     case BIAS::ImageBase::ST_unsignedchar:
01467     case BIAS::ImageBase::ST_char:
01468       // 8 bit
01469       if (image.depth() != 8*sizeof(char)){
01470         BIASERR("StorageType is "<<8*sizeof(char)<<" bit but data has "<<image.depth()<<" bit depth. FileName="<<FileName<<endl);
01471         /** \todo handle conversion in extra routine
01472         with extra warnings in case of scaling or lossy conversion.
01473         -Add a 'normalized scale' per conversion for each Storagetype.
01474         -Add a flag to return errors instead of run-time warning. (discussion 26.Oct.2004) (JW)  */
01475         return -1;
01476       } else {
01477         outputST=Magick::CharPixel;
01478         COUT("is an "<<8*sizeof(char)<<" bit (u)char image\n");
01479       };
01480       break;
01481
01482     case BIAS::ImageBase::ST_unsignedshortint:
01483     case BIAS::ImageBase::ST_shortint:
01484       // 16 bit
01485       if (image.depth()!=8*sizeof(short)){
01486         BIASERR("StorageType is "<<8*sizeof(short)<<" bit "
01487           <<"but data has "<<image.depth()<<" bit depth. "
01488           <<"FileName="<<FileName<<endl);
01489         return -2;
01490       } else {
01491         outputST=Magick::ShortPixel;
01492         COUT("is a "<<8*sizeof(short)<<" bit (u)short image\n");
01493       };
01494       break;
01495
01496     case BIAS::ImageBase::ST_unsignedint:
01497     case BIAS::ImageBase::ST_int:
01498       // 32 bit int
01499       if (image.depth()==8*sizeof(int)){
01500         BIASERR("StorageType is "<<8*sizeof(int)<<" bit but data has "<<image.depth()<<" bit depth. FileName="<<FileName<<endl);
01501         return -3;
01502       } else {
01503         outputST=Magick::IntegerPixel;
01504         COUT("is a "<<8*sizeof(int)<<" bit (u)int image\n");
01505       };
01506       break;
01507
01508       /**  \todo float and double pixel are 0..1 normalized range in ImageMagick++. Min, max meta data required (JW) */
01509     case BIAS::ImageBase::ST_float:
01510       // 32 bit float
01511       if (image.depth()!=8*sizeof(float)) {
01512         BIASERR("StorageType is "<<8*sizeof(float)<<" bit but data has "<<image.depth()<<" bit depth. FileName="<<FileName<<endl);
01513         return -4;
01514       } else {
01515         outputST=Magick::FloatPixel;
01516         COUT("is a "<<8*sizeof(float)<<" bit float image\n");
01517         BIASERR("warning: You are using ImageMagick to read a float image. Be aware that ImageMagick float values are normalized to 0..1 !!!"<<endl);
01518       };
01519       break;
01520
01521     case BIAS::ImageBase::ST_double:
01522       // 64 bit double
01523       if (image.depth()!=8*sizeof(double)){
01524         BIASERR("StorageType is "<<8*sizeof(double)<<" bit but data has "<<image.depth()<<" bit depth. FileName="<<FileName<<endl);
01525         return -4;
01526       } else {
01527         outputST=Magick::DoublePixel;
01528         COUT("is a "<<8*sizeof(double)<<" bit float image\n");
01529         BIASERR("warning: You are using ImageMagick to read a double image. Be aware that ImageMagick float values are normalized to 0..1 !!!"<<endl);
01530       };
01531       break;
01532
01533     default:
01534       BIASERR("StorageType "<<result.GetStorageType()<<" not supported. FileName="<<FileName<<endl);
01535       return -9; // error
01536     };
01537
01538
01539     //
01540     // second switch for channels: number and color model
01541     //
01542     string magickMap="RGB"; // default
01543     unsigned int nChannels=3;
01544     //determine import image format/channels:
01545     switch (result.GetColorModel()) {
01546   case BIAS::ImageBase::CM_invalid:
01547     COUT("DBG CM_invalid. Setting default map RGB\n");
01548     nChannels=3;
01549     magickMap="RGB";
01550     break;
01551
01552   case BIAS::ImageBase::CM_Grey:
01553     COUT("DBG CM_Grey\n");
01554     magickMap="K"; // blacK=grey
01555     nChannels=1;
01556     break;
01557   case BIAS::ImageBase::CM_GreyA:
01558     //COUT("DBG CM_GreyA\n");
01559     magickMap="KA";
01560     nChannels=1;
01561     break;
01562   case BIAS::ImageBase::CM_RGB:
01563     //COUT("DBG CM_RGB\n");
01564     magickMap="RGB";
01565     nChannels=3;
01566     break;
01567   case BIAS::ImageBase::CM_RGBA:
01568     //COUT("DBG CM_RGBA\n");
01569     magickMap="RGBA";
01570     nChannels=4;
01571     break;
01572   case BIAS::ImageBase::CM_BGR:
01573     //COUT("DBG CM_BGR\n");
01574     magickMap="BGR";
01575     nChannels=3;
01576     break;
01577
01578   default:
01579     BIASERR("unknown result Color Model "<<result.GetColorModel()<<" "
01580       <<"reading "<<FileName<<endl);
01581     };
01582
01583     // init/allocate result color image data:
01584     if (!result.IsEmpty()) result.Release();
01585     result.Init(image.columns(), image.rows(), nChannels);
01586     result.SetColorModel(ImageBase::CM_RGB);
01587
01588
01589     // get the pointer to our result BIAS image data:
01590     unsigned char* p_imageData     =  (unsigned char*)result.GetImageData();
01591     BIASASSERT( p_imageData != NULL);
01592     // write data array from read in ImageMagick++ image
01593     // to our own ImageData Array.
01594     // details (JW): http://studio.imagemagick.org/Magick++/Image.html#write
01595     image.write(0,0, // upper left corner of region to extract
01596       result.GetWidth(), result.GetHeight(), // region size to extract
01597       "RGB", // map=output format in our pixel data, e.g RGBA
01598       outputST,
01599       p_imageData // pointer to our data array of type
01600       );
01601     if (readMetaData){
01602       BIASERR("reading of MetaData is not implemented for IMageMagick++ but could be done using BIAS::ImageAttributes class (JW 10/2004)\n");
01603     }
01604
01605   } catch( Magick::Exception &error_ ) {
01606     BIASERR("Reading "<<FileName<<" with Magick++ failed."<<endl
01607       <<"  Caught exception: "<<endl
01608       <<"  "<<error_.what()<<endl );
01609     return -1; // error
01610   };
01611   return  BIAS_IO_SUCCESS;// OK
01612 }
01613
01614
01615 // JW
01616 int ImageIO::ExportMagickPP(const std::string& FileNameStr,
01617                             const ImageBase& input,
01618                             const int &quality,
01619                             const bool &writeMetaData,
01620                             const bool &forceBinaryPNMformat,
01621                             const bool &losslesJpgMode,
01622                             const bool &writeGZipped
01623                             )
01624 {
01625 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01626   CALLINFO;
01627 #endif
01628
01629   // binding local namespace scope
01630   using namespace Magick;
01631   using namespace MagickLib;
01632
01633   // const to var. conversio to add .gz suffix (later);
01634   string FileName(FileNameStr);
01635
01636
01637   try {
01638 #ifdef WIN32
01639     // initialize DLL loaded library (not required on Linux but once on Windows)
01640     if (!IsMagickInstantiated() )
01641     {
01642       Magick::InitializeMagick(NULL);
01643     };
01644 #endif
01645
01646     // temporary used for saving to disk
01647     Magick::Image image;
01648     // manipulate image information, e.g. compression
01649
01650     image.colorSpace(RGBColorspace); // default
01651
01652     // determine export image format/channels:
01653     std::string pixmap;
01654     switch (input.GetChannelCount())
01655     {
01656     case 1:
01657       pixmap="K";
01658       image.colorSpace(GRAYColorspace); // default
01659       break;
01660     case 2:
01661       pixmap="KA"; break;
01662     case 3:
01663       pixmap="RGB"; break;
01664     case 4:
01665       pixmap="RGBA"; break;
01666     default:
01667       BIASERR("unsupported channelcount. Could not write image with Magick++");
01668       return -1;
01669     }
01670
01671
01672     // refine the color space used
01673     // there is a difference between color model and channel order
01674     switch (input.GetColorModel())
01675     {
01676     case BIAS::ImageBase::CM_RGB :
01677       // color model
01678       image.colorSpace(RGBColorspace);
01679       // channel order (within colro model)
01680       pixmap="RGB";
01681       break;
01682     case BIAS::ImageBase::CM_BGR :
01683       image.colorSpace(RGBColorspace);
01684       pixmap="BGR";
01685       break;
01686     case BIAS::ImageBase::CM_RGBA :
01687       image.colorSpace(RGBColorspace);
01688       pixmap="RGBA";
01689       break;
01690       //case BIAS::ImageBase::CM::CM_BGBA :
01691       //    pixmap="BGRA";
01692       //    //image.colorSpace(RGBColorspace);
01693       //    break;
01694     case BIAS::ImageBase::CM_Grey :
01695       pixmap="K";
01696       image.colorSpace(GRAYColorspace);
01697       image.type(GrayscaleType);
01698       break;
01699     case BIAS::ImageBase::CM_GreyA :
01700       pixmap="KA";
01701       //image_info->colorspace=GRAYColorspace;
01702       image.colorSpace(UndefinedColorspace);
01703       image.type(GrayscaleMatteType);
01704       break;
01705     case BIAS::ImageBase::CM_HSV :
01706       // HSV=HSB (which is different from HSI and HSL!)
01707       image.colorSpace(HSBColorspace);
01708       break;
01709     case BIAS::ImageBase::CM_HSL :
01710       // HSL=HSI (which is different from HSV nor HSB!)
01711       image.colorSpace(HSLColorspace);
01712       break;
01713     default:
01714       BIASERR("unsupported color model. Please add switch for "<<input.GetColorModel());
01715     }
01716
01717
01718     // determine per pixel input/output storagetype:
01719     Magick::StorageType magick_ST=Magick::CharPixel; // default
01720     image.depth(8); // default depth in bit
01721
01722     // CharPixel, ShortPixel, IntegerPixel, FloatPixel, or DoublePixel
01723     switch (input.GetStorageType())
01724     {
01725     case BIAS::ImageBase::ST_unsignedchar:
01726     case BIAS::ImageBase::ST_char:
01727       magick_ST=Magick::CharPixel;
01728       image.depth(8*sizeof(char)); // usually 8 bit
01729       break;
01730     case BIAS::ImageBase::ST_unsignedshortint:
01731     case BIAS::ImageBase::ST_shortint:
01732       magick_ST=Magick::ShortPixel;
01733       image.depth(8*sizeof(short)); // usually 16bit
01734       break;
01735     case BIAS::ImageBase::ST_unsignedint:
01736     case BIAS::ImageBase::ST_int:
01737       magick_ST=Magick::IntegerPixel;
01738       image.depth(8*sizeof(int)); // usually 32bit
01739       break;
01740     case BIAS::ImageBase::ST_float:
01741       magick_ST=Magick::FloatPixel;
01742       image.depth(8*sizeof(float)); // usually 32bit
01743       break;
01744     case BIAS::ImageBase::ST_double:
01745       magick_ST=Magick::DoublePixel;
01746       image.depth(8*sizeof(double)); // usually 64 bit
01747       break;
01748     default:
01749       BIASERR("unsupported input image BIAS StorageType "<<input.GetStorageType() );
01750     };
01751
01752     // input depth and switch case depth should match:
01753     BIASASSERT( 8*input.GetDepth() == image.depth() );
01754
01755
01756     // for jpeg compression:
01757     image.quality(quality);
01758
01759     // ASCII / binary data format:
01760     if (forceBinaryPNMformat)
01761     {
01762       string ext = BIAS::LowerCase( BIAS::Suffix(FileName) );
01763       // useful option only for pnm images JW
01764       if (   (ext==".pnm")
01765         || (ext==".pbm")
01766         || (ext==".pgm")
01767         || (ext==".ppm")
01768         )
01769       {
01770         // to write Binary data (instead of ASCII)
01771         // set any compression except "none" and "unknown", e.g. RLE works
01772         // no matter if this compression is really used by coder... (JW)
01773         //image.compressType(UndefinedCompression); // makes binary data, too.
01774         //image.compressType(NoCompression);
01775         //image.compressType(BZipCompression);
01776         //image.compressType(FaxCompression);
01777         //image.compressType(Group4Compression);
01778         //image.compressType(JPEGCompression);
01779         //image.compressType(JPEG2000Compression);
01780         //image.compressType(LosslessJPEGCompression);
01781         //image.compressType(LZWCompression);
01782         image.compressType(RLECompression);
01783         //image.compressType(ZipCompression);
01784
01785       } else {
01786         // ASCII PNM - blows size up compared to binary writing
01787         image.compressType(NoCompression);
01788       };
01789     } // textInsteadOfBinaryMode
01790
01791     if (losslesJpgMode)
01792     {
01793       image.compressType(LosslessJPEGCompression);
01794       /// quality and compession are two different parameters in jpeg
01795       /// but the user usually wants lossles *and* no compression on lossless flag,
01796       /// so force 100% quality, here:
01797       image.quality(100);
01798     }
01799
01800     // Read a file into image object using Magick++ library function:
01801     unsigned char* p_imageData     =  (unsigned char*)input.GetImageData();
01802     BIASASSERT(p_imageData!=NULL);
01803
01804     // non const copy: add suffix for zipped format
01805     // useful for ASCII text format liek ASCII pgm --> .pgm.gz
01806     if (writeGZipped)
01807       if (BIAS::Suffix(FileName)!=".gz")
01808         FileName+=".gz";
01809
01810 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01811     COUT("DBG writing "<<input.GetWidth()<<"x"<<input.GetHeight()<<" "
01812       <<pixmap<<" image \""<<FileName
01813       <<"\" using ImageMagick++ "<<endl);
01814 #endif // BIAS_DEBUG
01815
01816     // create ImageMagick pixel buffer object from our image data:
01817     image.read(input.GetWidth(), // dimension
01818       input.GetHeight(),
01819       pixmap, // output map type. e.g. RGBA
01820       magick_ST, // desired storagetype
01821       p_imageData  // pointer to our own data array to be written to disk
01822       );
01823
01824     if (writeMetaData) {
01825       /// JW: MetaData could be written to image.comment but BIAS ASCII representation *theoretically*.
01826       /// However, comment header is limited to 4096 Bytes for some formats
01827       // and ASCII BAIS::MetaData representation is too big for this. (JW)
01828 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01829       BIASERR("writing MetaData using ImageMagick IO is not implemented.");
01830 #endif
01831     }
01832     image.comment("This comment is written by  BIAS::ImageIO::ExportMagickPP");
01833
01834     // start *really* writing to disk using Magick++
01835     // output file type is automatically determined by magick file extension
01836     image.write(FileName);
01837
01838
01839   } catch( Magick::Exception &error_ ) {
01840     BIASERR("Writing "<<FileName<<" with Magick++ failed."<<endl
01841       <<"  Caught exception: "<<endl
01842       <<"  "<<error_.what()<<endl );
01843     return -1; // error
01844   };
01845   return  BIAS_IO_SUCCESS;// OK
01846 }
01847
01848 #endif // BIAS_HAVE_IMAGEMAGICKLIB
01849
01850
01851 // JW
01852 int ImageIO::ImportRAWwithHeader(const std::string & filename,
01853                                  BIAS::ImageBase & img)
01854                                  //int ImageIO::ImportRAWwithHeader(const std::string & filename,
01855                                  //                                 BIAS::Image<unsigned char> & img)
01856 {
01857 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
01858   CALLINFO;
01859 #endif
01860
01861   // header data size:
01862   unsigned int hdrSZ=0;
01863   // tags to find
01864   unsigned int Cols=0;
01865   unsigned int Rows=0;
01866
01867
01868   { // scope
01869     ifstream is;
01870     is.open(filename.c_str());
01871     //is.open(filename.c_str(), ios::binary);
01872     //is.open(filename.c_str(), ios_base::in |ios_base::binary );
01873     if (!is){
01874       BIASERR("could not open image file: "<<filename);
01875       is.close();
01876       return -1;
01877     }
01878     // OK
01879     string line;
01880     getline(is, line);
01881     //cout<<"DBG "<<FUNCNAME<<"line: "<<line<<endl;
01882     if (line.size()<3) return -2; // too small.
01883
01884     // parse header:
01885     string ref7("RAW4096"); // 7 Bytes instead of std. 8 for backward compatibility
01886     string ref("RAW04096");
01887     if ( (0==line.compare(0, ref.size(), ref))
01888       || (0==line.compare(0, ref7.size(), ref7)) )
01889     {
01890       COUT("RAW04096/RAW4096 found."<<endl);
01891       hdrSZ=4096;
01892     } else {
01893       ref="RAW08192";
01894       if (0==line.compare(0, ref.size(), ref)){
01895         hdrSZ=8192;
01896       } else {
01897         ref="2048";
01898         if (0==line.compare(0, ref.size(), ref)){
01899           hdrSZ=2048;
01900         } else {
01901           ref="1024";
01902           if (0==line.compare(0, ref.size(), ref)){
01903             hdrSZ=1024;
01904           } else {
01905             ref="0512";
01906             if (0==line.compare(0, ref.size(), ref)){
01907               hdrSZ=0512;
01908             } else {
01909               BIASERR(filename<<" is no RAW4096/RAWnnnn image. aborting.");
01910               return -3;
01911             }
01912           }
01913         }
01914       }
01915     }
01916
01917
01918     // create string that can be used as char array:
01919     string hdr(hdrSZ,' ');
01920     is.seekg(ios::beg);
01921     // read data as a block:
01922     is.read(&(hdr[0]), hdrSZ);
01923
01924     bool ok=true;
01925     //ok = ok && (0==Parse(hdr, "Cols=", Cols));
01926     ok = ok && (0==ParseRAWwithHeader(hdr, "RowInc=", Cols));
01927     ok = ok && (0==ParseRAWwithHeader(hdr, "Rows=", Rows));
01928
01929     if (ok) cout<<"found dim "<<Cols<<"x"<<Rows<<endl;
01930     is.close();
01931   }
01932
01933   if (!img.IsEmpty()) img.Release();
01934   // HACK: content of RAW is fixed for scorpion 1600x1200
01935   // as RAW 1 plane Bayer pattern, 8 bit. (JW)
01936   img.Init(Cols, Rows, 1);
01937   img.SetColorModel(BIAS::ImageBase::CM_Bayer_RGGB);
01938
01939   //
01940   // reopen file with C fopen intead of C++ fstream
01941   // USE C because of higher performance (measured 15%)
01942   //
01943   //TODO
01944   // FIXME: Linux reads only one line - thu sit is not using binary mode! (jw)
01945   FILE * fp=NULL;
01946   //fp = fopen(filename.c_str(), "rb");
01947   fp = fopen(filename.c_str(), "rt");
01948   if (fp==NULL){
01949     cout<<"could not open "<<filename<<" for C reading"<<endl;
01950     return -3;
01951   }
01952   //OK
01953   unsigned int dataSZ=Cols*Rows;
01954   //memset(&(img.GetImageData()[0]), 0, dataSZ);
01955   {
01956     char * p_data = new char[dataSZ];
01957     memset(p_data, 0, dataSZ);
01958
01959     unsigned int readBytes=0;
01960     // skip header
01961     readBytes=fread( p_data, hdrSZ, 1, fp );
01962
01963     // read data:
01964     readBytes=fread( p_data, dataSZ, 1, fp );
01965
01966     img.CopyIn_NoInit(p_data);
01967     //tmp.CopyIn_NoInit(p_data);
01968
01969     fclose(fp);
01970     delete p_data;
01971   }
01972
01973   return 0; // OK
01974 }
01975
01976
01977 // JW
01978 int ImageIO::ParseRAWwithHeader(const std::string & buf,
01979                                 const std::string & tag,
01980                                 unsigned int & retVal)
01981 {
01982   string::size_type posStart, posEnd;
01983   string valueStr;
01984   posStart=buf.find(tag, 0);
01985   if (posStart!=string::npos){
01986     // found tag
01987     posEnd = buf.find( string("\n"), posStart);
01988     if (posEnd!=string::npos){
01989       valueStr=buf.substr(posStart+tag.size(), posEnd-posStart-tag.size());
01990       stringstream ss;
01991       ss.str(valueStr);
01992       ss>>retVal;
01993       cout<<"valueStr="<<valueStr<<" : "<<retVal<<endl;
01994     }
01995   } else {
01996     cout<<"not found!"<<endl;
01997     return -1;
01998   }
01999   // OK.
02000   return 0;
02001 }
02002
02003
02004 #ifdef WIN32
02005 #  pragma warning (push)
02006 #  pragma warning (disable: 4702) // unreachable code
02007 int ImageIO::WriteUnbuffered(const std::string& /*FileName*/, ImageBase &/*img*/)
02008 {
02009   BIASERR("ImageIO::WriteUnbuffered() not implemented in Win32");
02010   BIASABORT;
02011   return -1;
02012 }
02013 #  pragma warning (pop)
02014
02015 #else
02016 int ImageIO::WriteUnbuffered(const std::string& FileName, ImageBase &img)
02017 {
02018 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02019   CALLINFO;
02020 #endif
02021
02022   if (!img.GetUID().IsValid())
02023     img.SetUID(UUID::GenerateUUID());
02024
02025   std::ostringstream FlatImage;
02026   FlatImage << img;
02027   img.GetMetaData()->WriteBinary(FlatImage);
02028   FlatImage.flush();
02029   unsigned long int is = FlatImage.str().size();
02030   //   cout <<"FlatImage.size: "<<is<<endl;;
02031   if (MemAlignedBufferSize_ < is) {
02032     if (MemAlignedBuffer_ != NULL) free(MemAlignedBuffer_);
02033     MemAlignedBufferSize_ = 512;
02034     while (MemAlignedBufferSize_ < is) MemAlignedBufferSize_ +=512;
02035     //     cout <<"New MemAlignedBuffer_ with size "<<MemAlignedBufferSize_ <<endl;
02036     posix_memalign((void**)&MemAlignedBuffer_, 512, MemAlignedBufferSize_);
02037     if (MemAlignedBuffer_ == NULL) {
02038       BIASERR("Can not posix_memalign()"<<MemAlignedBufferSize_<<" bytes");
02039       return -1;
02040     }
02041   }
02042   // copy flattened image into Buffer
02043   memcpy(MemAlignedBuffer_, FlatImage.str().c_str(), is);
02044
02045   int fd = open(FileName.c_str(),O_WRONLY | O_CREAT | O_DIRECT);
02046   if (fd <0) {
02047     BIASERR("Can not open/create file ");
02048     perror(FileName.c_str());
02049     return -1;
02050   }
02051   fchmod(fd,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
02052   int res = write(fd,MemAlignedBuffer_, MemAlignedBufferSize_);
02053   if (res <0) {
02054     BIASERR("Can not write with O_DIRECT to file ");
02055     perror(FileName.c_str());
02056     return -1;
02057   }
02058
02059   close(fd);
02060
02061   return 0;
02062 }
02063 #endif // WIN32
02064
02065
02066
02067 #ifdef BIAS_HAVE_DEVIL
02068 // JW
02069
02070 void ImageIO::InitDevIL()
02071 {
02072   static bool il_initialized=false;
02073   // once
02074   if (!il_initialized)
02075   {
02076 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02077     // Check if the shared lib's version matches the executable's version.
02078     if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) {
02079       BIASERR("DevIL/OpenIL: "<<endl
02080         <<"IL versions of run-and compiletime are different. "<<endl
02081         <<"compile time IL_VERSION    ="<<IL_VERSION<<endl
02082         <<"runtime      IL_VERSION_NUM="<<ilGetInteger(IL_VERSION_NUM)<<endl
02083         <<"There is a risk that the headers dont match the shared library/DLL. ");
02084     };
02085 #  ifdef USE_DEVIL_ILU
02086     if (iluGetInteger(ILU_VERSION_NUM) < ILU_VERSION) {
02087       BIASERR("DevIL/OpenIL: "
02088         <<"ILU versions of run-and compiletime are different. "
02089         <<" There is a risk that the headers dont match the DLL. ");
02090     };
02091 #  endif // USE_DEVIL_ILU
02092 #endif // BIAS_DEBUG && ImageIO_DEBUG_IO
02093
02094     // global state initialization, required once:
02095     ilInit();
02096 #ifdef USE_DEVIL_ILU
02097     iluInit();
02098 #endif
02099
02100     // done:
02101     il_initialized=true;
02102
02103 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02104     COUT("initialized DevIL(OpenIL runtime version: "
02105       <<ilGetInteger(IL_VERSION_NUM)<<endl );
02106 #endif
02107   }
02108 }
02109
02110
02111 void ImageIO::PrintInfoDevIL(std::ostream & os)
02112 {
02113   os
02114     <<"dim:         "<<ilGetInteger(IL_IMAGE_WIDTH)<<"x"
02115     <<ilGetInteger(IL_IMAGE_HEIGHT)<<" pixel"<<endl
02116     <<"depth        "<<ilGetInteger(IL_IMAGE_DEPTH)<<" Byte "<<endl
02117     <<"size of data "<<ilGetInteger(IL_IMAGE_SIZE_OF_DATA)<<" Byte total"<<endl
02118     <<"BytePerPixel "<<ilGetInteger(IL_IMAGE_BPP)<<endl
02119     <<"Bytes/Pixel  "<<ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL)<<endl
02120     <<"Bits/Pixel   "<<ilGetInteger(IL_IMAGE_BITS_PER_PIXEL)<<endl
02121     <<"num images   "<<ilGetInteger(IL_NUM_IMAGES)<<endl
02122     <<"num mipmaps  "<<ilGetInteger(IL_NUM_MIPMAPS)<<endl
02123
02124     <<"origin_set   "<<ilGetInteger(IL_ORIGIN_SET)<<" "
02125     <<"image_origin "<<ilGetInteger(IL_IMAGE_ORIGIN)<<" "
02126     ;
02127   switch (ilGetInteger(IL_IMAGE_ORIGIN)) {
02128   case IL_ORIGIN_SET:
02129     os<<"IL_ORIGIN_SET"; break;
02130   case IL_ORIGIN_LOWER_LEFT:
02131     os<<"IL_ORIGIN_LOWER_LEFT"; break;
02132   case IL_ORIGIN_UPPER_LEFT:
02133     os<<"IL_ORIGIN_UPPER_LEFT"; break;
02134   case IL_ORIGIN_MODE:
02135     os<<"IL_ORIGIN_MODE"; break;
02136   };
02137   os<<endl;
02138
02139   os<<"offset       "
02140     <<ilGetInteger(IL_IMAGE_OFFX)<<" "<<ilGetInteger(IL_IMAGE_OFFY)<<endl
02141     ;
02142 }
02143
02144 int ImageIO::ImportDevIL(const std::string& FileName, ImageBase& result)
02145 {
02146 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02147   CALLINFO;
02148 #endif
02149
02150   InitDevIL();
02151
02152   if (!result.IsEmpty())
02153     result.Release();
02154
02155   ILuint id=0;
02156   ILuint err=0;
02157
02158   ilGenImages(1, &id);
02159   ilBindImage( id );
02160
02161   bool ok = (IL_TRUE==ilLoadImage( (char*)(FileName.c_str()) ));
02162
02163   err = ilGetError();
02164   if (err!=IL_NO_ERROR || !ok) {
02165 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02166     stringstream ss;
02167     ss<<"could not load "<<FileName<<" ";
02168 #  ifdef USE_DEVIL_ILU
02169     // there is no erro msg of !ok is the reason for failure and no err
02170     if (err!=IL_NO_ERROR)
02171       ss<<": "<<iluErrorString(err);
02172 #  endif
02173     BIASERR(ss.str());
02174 #endif // BIAS_DEBUG && ImageIO_DEBUG_IO
02175     ilDeleteImages(1, &id);
02176     return -1;
02177   }
02178
02179 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02180   PrintInfoDevIL();
02181 #endif
02182
02183
02184   // determine pixel data type:
02185   BIAS::ImageBase::EStorageType  st = BIAS::ImageBase::ST_invalid;
02186   switch (ilGetInteger(IL_IMAGE_TYPE))
02187   {
02188   case IL_BYTE:
02189     st = ImageBase::ST_char; break;
02190   case IL_UNSIGNED_BYTE:
02191     st = ImageBase::ST_unsignedchar; break;
02192   case IL_SHORT:
02193     st = ImageBase::ST_shortint; break;
02194   case IL_UNSIGNED_SHORT:
02195     st = ImageBase::ST_unsignedshortint; break;
02196   case IL_INT:
02197     st = ImageBase::ST_int; break;
02198   case IL_UNSIGNED_INT:
02199     st = ImageBase::ST_unsignedint; break;
02200   case IL_FLOAT:
02201     st = ImageBase::ST_float; break;
02202   case IL_DOUBLE:
02203     st = ImageBase::ST_double; break;
02204   default:
02205     BIASERR("unsupported storage type");
02206   }
02207
02208   unsigned int channels=3;
02209   BIAS::ImageBase::EColorModel cm=BIAS::ImageBase::CM_invalid;
02210   // switch fmt to determine nr. of channels, channel order and seq.
02211   switch (ilGetInteger(IL_IMAGE_FORMAT))
02212   {
02213   case IL_RGB:
02214     channels=3;
02215     cm=BIAS::ImageBase::CM_RGB;
02216     break;
02217   case IL_RGBA:
02218     channels=4;
02219     cm=BIAS::ImageBase::CM_RGBA;
02220     break;
02221   case IL_BGR:
02222     channels=3;
02223     cm=BIAS::ImageBase::CM_BGR;
02224     break;
02225   case IL_BGRA:
02226     channels=4;
02227     cm=BIAS::ImageBase::CM_BGRA;
02228     break;
02229   case IL_LUMINANCE:
02230     channels=1;
02231     cm=BIAS::ImageBase::CM_Grey;
02232     break;
02233   case IL_LUMINANCE_ALPHA:
02234     channels=2;
02235     cm=BIAS::ImageBase::CM_GreyA;
02236     break;
02237   default:
02238     BIASERR("unsupported format");
02239   }
02240
02241   // always interleaved
02242   const bool interleaved = true;
02243   // dim in pixel
02244   const unsigned int w = ilGetInteger(IL_IMAGE_WIDTH);
02245   const unsigned int h = ilGetInteger(IL_IMAGE_HEIGHT);
02246
02247   // allocate new image
02248   result.Init(
02249     w,h,
02250     channels,
02251     st,
02252     interleaved );
02253   result.SetColorModel(cm);
02254
02255   // in Byte:
02256   BIASASSERT(int(result.GetDepth())==int(ilGetInteger(IL_IMAGE_DEPTH)) );
02257 #ifdef BIAS_DEBUG
02258   {
02259     const int ilSZ = ilGetInteger(IL_IMAGE_SIZE_OF_DATA);
02260     BIASASSERT(
02261       int(result.GetPixelCount()*result.GetDepth()*result.GetChannelCount()) == ilSZ
02262       );
02263   }
02264 #endif
02265
02266   // copy the data area
02267   result.CopyIn_NoInit( ilGetData() );
02268
02269   // free temporary devIL image
02270   ilDeleteImages(1, &id);
02271
02272   return BIAS_IO_SUCCESS; // OK
02273 }
02274
02275
02276 int ImageIO::ExportDevIL(const std::string& FileName,
02277                          const ImageBase& img,
02278                          const bool &fileOverwrite,
02279                          const bool &allowPadding )
02280 {
02281 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02282   CALLINFO;
02283 #endif
02284
02285   InitDevIL();
02286
02287   ILuint id=0;
02288   ILuint err=0;
02289   ilGenImages(1, &id);
02290   ilBindImage( id );
02291
02292   // fill attributes and data
02293   unsigned int w=img.GetWidth();
02294   unsigned int h=img.GetHeight();
02295   unsigned int depth=img.GetDepth();
02296   ILenum ilFormat=IL_RGB; //< defaut
02297   ILenum ilType  =IL_BYTE; //< default
02298
02299   // overwrite file if exists?
02300   if (fileOverwrite) {
02301     ilEnable(IL_FILE_OVERWRITE);
02302   } else {
02303     ilDisable(IL_FILE_OVERWRITE);
02304   }
02305
02306
02307   // native storage data type:
02308   switch (img.GetStorageType())
02309   {
02310   case ImageBase::ST_char:
02311     ilType=IL_BYTE;  break;
02312   case ImageBase::ST_unsignedchar:
02313     ilType=IL_UNSIGNED_BYTE;  break;
02314   case ImageBase::ST_shortint:
02315     ilType=IL_SHORT;  break;
02316   case ImageBase::ST_unsignedshortint:
02317     ilType=IL_UNSIGNED_SHORT;  break;
02318   case ImageBase::ST_int:
02319     ilType=IL_INT;  break;
02320   case ImageBase::ST_unsignedint:
02321     ilType=IL_UNSIGNED_INT;  break;
02322   case ImageBase::ST_float:
02323     ilType=IL_FLOAT;  break;
02324   case ImageBase::ST_double:
02325     ilType=IL_DOUBLE;  break;
02326   default:
02327     BIASERR("unsupported storage type");
02328   }
02329
02330 //#ifdef BIAS_DEBUG
02331 //  const unsigned int channels=img.GetChannelCount();
02332 //#endif
02333
02334   // format --> native nr+seq of channels and color model
02335   switch (img.GetColorModel())
02336   {
02337   case BIAS::ImageBase::CM_RGB:
02338     ilFormat=IL_RGB;
02339     BIASASSERT(img.GetChannelCount()==3);
02340     break;
02341   case BIAS::ImageBase::CM_RGBA:
02342     ilFormat=IL_RGBA;
02343     BIASASSERT(img.GetChannelCount()==4);
02344     break;
02345   case BIAS::ImageBase::CM_BGR:
02346     ilFormat=IL_BGR;
02347     BIASASSERT(img.GetChannelCount()==3);
02348     break;
02349   case BIAS::ImageBase::CM_BGRA:
02350     ilFormat=IL_BGRA;
02351     BIASASSERT(img.GetChannelCount()==4);
02352     break;
02353   case BIAS::ImageBase::CM_Grey:
02354     ilFormat=IL_LUMINANCE;
02355     BIASASSERT(img.GetChannelCount()==1);
02356     break;
02357   case BIAS::ImageBase::CM_GreyA:
02358     ilFormat=IL_LUMINANCE_ALPHA;
02359     BIASASSERT(img.GetChannelCount()==2);
02360     break;
02361   default:
02362     BIASERR("unsupported color model/channelcount/ DevIL type");
02363   }
02364
02365   // Byte per Pixel, e.g. 3 for "unsigned char RGB" image
02366   unsigned int BytePerPixel = img.GetDepth()*img.GetChannelCount();
02367
02368   // create temporary DevIL image
02369   // setting attributes and copy data
02370   if (!ilTexImage(
02371     w,h,
02372     depth,
02373     ILubyte (BytePerPixel),
02374     ilFormat,
02375     ilType,
02376     //(ILvoid*)(img.GetImageData())
02377     NULL
02378     ))
02379   {
02380     BIASERR("could not set DevIL attributes for saving "<<FileName);
02381     ilDeleteImages(1, &id);
02382     return -1;
02383   }
02384
02385   // BIAS image coordinate system has origin in upper left corner
02386   // (in contrast to OpenGLs lower left)
02387   ilRegisterOrigin(IL_ORIGIN_UPPER_LEFT);
02388
02389   BIASASSERT(img.GetImageData()!=NULL);
02390   // memcopy the image data:
02391   ilSetData((ILvoid*)(img.GetImageData()) );
02392
02393   // check status
02394   err = ilGetError();
02395   if (err!=IL_NO_ERROR) {
02396     stringstream ss;
02397     ss<<"could not set DevIL for saving "<<FileName<<" ";
02398 #ifdef USE_DEVIL_ILU
02399     ss<<": "<<iluErrorString(err);
02400 #endif
02401     BIASERR(ss.str());
02402     ilDeleteImages(1, &id);
02403     return -1;
02404   }
02405
02406   BIASASSERT(int(img.GetDepth())==int(ilGetInteger(IL_IMAGE_DEPTH)) );
02407 #ifdef BIAS_DEBUG
02408   {
02409     const int ilSZ = ilGetInteger(IL_IMAGE_SIZE_OF_DATA);
02410     BIASASSERT(
02411       int(img.GetPixelCount()*img.GetDepth()*img.GetChannelCount())==ilSZ
02412       );
02413   }
02414 #endif
02415
02416   err = ilGetError();
02417   if (err!=IL_NO_ERROR) {
02418     stringstream ss;
02419     ss<<"could not save to file "<<FileName<<" ";
02420 #ifdef USE_DEVIL_ILU
02421     ss<<": "<<iluErrorString(err);
02422 #endif
02423     PrintInfoDevIL();
02424     BIASERR(ss.str());
02425     ilDeleteImages(1, &id);
02426     return -2;
02427   }
02428
02429   // write to disk:
02430   bool ok = (IL_TRUE==ilSaveImage( (char*)(FileName.c_str()) ));
02431
02432   // check status again:
02433   err = ilGetError();
02434   if (err!=IL_NO_ERROR || !ok)
02435   {
02436     stringstream ss;
02437     ss<<"could not save to file "<<FileName<<" ";
02438 #ifdef USE_DEVIL_ILU
02439     ss<<": "<<iluErrorString(err);
02440 #endif
02441     if (err==IL_BAD_DIMENSIONS && allowPadding) {
02442       // try if padding helps:
02443       // fallback tmp padded image
02444       BIAS::ImageBase tmpIMG(img);
02445       tmpIMG.PadToPowerOfTwo();
02446       // do not allow padding again or we will get an endless loop!
02447       int resultPadded=ExportDevIL(
02448         FileName,
02449         tmpIMG,
02450         fileOverwrite,
02451         false /*allowPading?*/ );
02452       if (resultPadded==0)
02453       {
02454         // everything is fine,  give msg that we paded.
02455         ss<<endl<<"Some formats (e.g. DDS) require power of two size (and depth) "<<endl
02456           <<"Padding from dim "<<w<<"x"<<h<<" "
02457           <<"(depth="<<depth<<" ChannelCount="<<tmpIMG.GetChannelCount()<<") "
02458           <<"to "<<tmpIMG.GetWidth()<<"x"<<tmpIMG.GetHeight()<<" "
02459           <<"(depth="<<tmpIMG.GetDepth()<<" channels="<<tmpIMG.GetChannelCount()<<") "<<endl
02460           <<"was required to save "<<FileName;
02461         BIASWARN(ss.str());
02462       } else {
02463         // padding did not help
02464         BIASERR(ss.str());
02465         ilDeleteImages(1, &id);
02466         return -3;
02467       }
02468     } else {
02469       // error we could do nothing about
02470       BIASERR(ss.str());
02471       ilDeleteImages(1, &id);
02472       return -4;
02473     }
02474   }
02475
02476   // OK:
02477   // free temporary devIL image
02478   ilDeleteImages(1, &id);
02479
02480   return BIAS_IO_SUCCESS;
02481 }
02482 #endif  // BIAS_HAVE_DEVIL
02483
02484
02485
02486 std::string
02487 ImageIO::GetExtension(const BIAS::ImageIO::TFileFormat & fmt)
02488 {
02489   string s;
02490   switch (fmt)
02491   {
02492   case FF_mip:
02493     s="mip"; break;
02494   case FF_ppm:
02495     s="ppm"; break;
02496   case FF_pgm:
02497     s="pgm"; break;
02498   case FF_pbm:
02499     s="pbm"; break;
02500   case FF_jpg:
02501     s="jpg"; break;
02502   case FF_tif:
02503     s="tif"; break;
02504   case FF_png:
02505     s="png"; break;
02506   case FF_viff:
02507     s="vif"; break;
02508   case FF_exr:
02509     s="exr"; break;
02510   case FF_dds:
02511     s="dds"; break;
02512   case FF_raw4096:
02513     s="raw"; break;
02514   case FF_bmp:
02515     s="bmp"; break;
02516     break;
02517   case FF_Real32:
02518     s="real32"; break;
02519
02520   case FF_auto:
02521   case FF_unknown:
02522   default:
02523     BIASERR("Unknown FileFormat "<<fmt<<" Please add switch case");
02524   }
02525   return s;
02526 }
02527
02528
02529
02530 BIAS::ImageIO::TFileFormat
02531 ImageIO::GetFileFormat(const std::string &str)
02532 {
02533   // suffix = "dot"+extension
02534   string ext=BIAS::LowerCase( BIAS::Extension(str) );
02535   // compare ext to all FF_* fixed formats:
02536   if (ext=="mip") {
02537     return FF_mip;
02538   } else if (
02539     (ext=="ppm") ||
02540     (ext=="pnm") /* pNm can be pbm, pgm, ppm. assume color for pnm. */
02541     )
02542   {
02543     return FF_ppm;
02544   } else if (ext=="pgm") {
02545     return FF_pgm;
02546   } else if (ext=="pbm") {
02547     return FF_pbm;
02548   } else if (
02549     (ext=="jpg") ||
02550     (ext=="jpe") ||
02551     (ext=="jpeg")
02552     )
02553   {
02554     return FF_jpg;
02555   } else if (
02556     (ext=="tif") ||
02557     (ext=="tiff")
02558     )
02559   {
02560     return FF_tif;
02561   } else if (ext=="png") {
02562     return FF_png;
02563   } else if (
02564     (ext=="vif") ||
02565     (ext=="vff") ||
02566     (ext=="viff"))
02567   {
02568     return FF_viff;
02569   } else if (ext=="exr") {
02570     return FF_exr;
02571   } else if (
02572     (ext=="dds")  ||
02573     (ext=="dxt")  ||
02574     (ext=="dxt1") ||
02575     (ext=="dxt3") ||
02576     (ext=="dxt5") ||
02577     (ext=="dxtc") ||
02578     (ext=="s3tc")
02579     )
02580   {
02581     // S3's S3TC format and DXTC are essentially the same
02582     return FF_dds;
02583   } else if (
02584     (ext=="raw") ||
02585     (ext=="raw4096") ||
02586     (ext=="scorpion")
02587     )
02588   {
02589     return FF_raw4096;
02590   } else if ((ext=="real32") || (ext=="f32")){
02591     // Mathematica Real32 raw JW
02592     return FF_Real32;
02593   } else {
02594     // unknown ext.
02595     // give the external imaeg writer libsa try,
02596     // they may support a wider raneg of extension.
02597     // Thsu use "FF_auto" on returned "FF_unknown"
02598     return FF_unknown;
02599   }
02600 }
02601
02602
02603 //#ifdef BIAS_HAVE_RADIANCE
02604 // JW
02605 int BIAS::ImageIO::ImportRADIANCE(const std::string& FileName, ImageBase& result)
02606 {
02607   ifstream is;
02608   is.open(FileName.c_str(), ios::binary);
02609   if (!is){
02610     BIASERR("Could not open file "<<FileName);
02611     return -1;
02612   }
02613   //is.seekg(0,ios::beg);
02614   string buf;
02615   unsigned int line=0;
02616   getline(is, buf); line++;
02617   //cout<<line<<". = "<<buf<<endl;
02618
02619   const string signatureRAD("#?RADIANCE");
02620   if (buf!= signatureRAD ){
02621     BIASERR("signatureRAD "<<signatureRAD<<" not found in file "<<FileName);
02622     return -2;
02623   };
02624   // OK, is a RADIANCE file.
02625
02626   bool flipY=false, flipX=false;
02627   unsigned int width=0, height=0;
02628   //float exposure=1.0;
02629
02630   // parse for FORMAT
02631   while (is){
02632     getline(is, buf); line++;
02633     //cout<<line<<". = "<<buf<<endl;
02634     // skip comments:
02635     if (0==buf.compare(0,1,"#")) {
02636       //cout<<"found comment: "<<buf<<endl;
02637       continue;
02638     }
02639     if (0==buf.compare(0,6,"FORMAT")) {
02640       // check format:
02641       if (0==buf.compare("FORMAT=32-bit_rle_rgbe")){
02642         break; // OK
02643       } else {
02644         BIASERR("Only 32-bit_rle_rgbe FORMAT supported but "<<buf<<" found. Failed to load.");
02645         return -5;
02646       }
02647     };
02648   }
02649
02650   // parse for -Y or +Y
02651   while (is){
02652     getline(is, buf); line++;
02653     //cout<<line<<". = "<<buf<<endl;
02654     // skip comments:
02655     if (0==buf.compare(0,1,"#")) {
02656       //cout<<"found comment: "<<buf<<endl;
02657       continue;
02658     }
02659     if (0==buf.compare(0,2,"-Y")
02660       || 0==buf.compare(0,2,"-Y"))
02661     {
02662       // parse x and y value:
02663       stringstream ss(buf);
02664       string dummy;
02665       ss>>dummy; // Y
02666       if (dummy=="+Y"){
02667         flipY=true;
02668       } else if (dummy=="-Y") {
02669         // OK, no flip
02670       } else {
02671         BIASERR("expected +Y or -Y but failed.");
02672         return -8;
02673       }
02674       // read Y value
02675       ss>>height;
02676
02677       ss>>dummy;// X
02678       if (dummy=="+X"){
02679         // OK, no flip
02680       } else if (dummy=="-X") {
02681         flipX=true;
02682       } else {
02683         BIASERR("expected +X or -X but failed.");
02684         return -9;
02685       }
02686       // read X value
02687       ss>>width;
02688       break;
02689     }
02690   };
02691   cout<<FUNCNAME<<" found "<<width<<"x"<<height<<" RADIANCE rle RGBE image. "<<FileName<<endl;
02692   // get RGBE data:
02693   if (!result.IsEmpty()) result.Release();
02694   result.Init(width, height, 4, BIAS::ImageBase::ST_unsignedchar, true );
02695
02696   // get data
02697   char col[4]={0};
02698   unsigned int y=0;
02699   //unsigned int x=0;
02700   //int pos=0;
02701   //int start=0;
02702   //int step=1;
02703   for (y=0; y<height; y++) {
02704     //start = bFlippedY ? (height-y-1)*width : y*width;
02705     //step = bFlippedX ? -1 : 1;
02706
02707     // read 4 Bytes of line:
02708     is.read(col,4);
02709     // is the image /line RLE compressed?
02710     if ( (col[0]==0x2)
02711       && (col[1]==0x2)
02712       && (col[2]==0x0) )
02713     {
02714       BIASERR("unsupported new RADIANCE compression detected in line y="<<y);
02715       // clear the line:
02716       memset( result.GetImageDataArray()[y], 0, 4*width);
02717
02718     } else if ( (col[0]==0x1)
02719       && (col[1]==0x1)
02720       && (col[2]==0x1) )
02721     {
02722       BIASERR("unsupported old RADIANCE run scheme in line y="<<y);
02723       memset( result.GetImageDataArray()[y], 0, 4*width);
02724
02725     } else {
02726
02727       BIASERR("sorry, RADAINCE not completely implemented TODO: RLE (un-)compression is missing. (jw)");
02728       return -99;
02729       /// \todo: decode the runlength encode line, map the RGBE to float or do it in ColorConverion?
02730
02731       /*
02732       // OK, assume line contains only raw data
02733       //start = flipY ? (height-y-1)*width : y*width;
02734       //step  = flipX ? -1 : 1;
02735       // Do the run
02736       int nPixel = ((int) col[3])&0xFF;
02737       unsigned char r = pBuffer[(pos-step)*4];
02738       unsigned char g = pBuffer[(pos-step)*4+1];
02739       unsigned char b = pBuffer[(pos-step)*4+2];
02740       unsigned char e = pBuffer[(pos-step)*4+3];
02741
02742       for( int i=0; i<num; i++ ) {
02743       pBuffer[pos*4] = r;
02744       pBuffer[pos*4+1] = g;
02745       pBuffer[pos*4+2] = b;
02746       pBuffer[pos*4+3] = e;
02747       pos += step;
02748       }
02749
02750       x += num-1;
02751       */
02752     }
02753   }
02754   return 0; // OK
02755 }
02756 //#endif // BIAS_HAVE_RADIANCE
02757
02758
02759
02760 // JW
02761 int BIAS::ImageIO::ImportReal32(const std::string& FileName, ImageBase& result)
02762 {
02763 #if defined(BIAS_DEBUG) && defined(ImageIO_DEBUG_IO)
02764   CALLINFO;
02765 #endif
02766
02767   ifstream is;
02768   is.open(FileName.c_str(), ios::binary);
02769   if (!is){
02770     BIASERR("Could not open file "<<FileName);
02771     is.close();
02772     return -1;
02773   }
02774
02775   // header: 4 float
02776   // format, width, height, nchannels
02777   vector<float> header(4, 0);
02778   unsigned int version=0;
02779   if (is)
02780     is.read( (char*)(&(header[0])), header.size()*sizeof(float) );
02781
02782   if (!is)
02783     return -101;
02784
02785   // supported format? simple check for now.
02786   const float fmt=header[0];
02787   if ((1.0f <= fmt) && (fmt<=1.01f)) {
02788     version=1;
02789   } else {
02790     return -1; // unsupported
02791   }
02792   unsigned int width     = (unsigned int)( header[1] );
02793   unsigned int height    = (unsigned int)( header[2] );
02794   unsigned int nchannels = (unsigned int)( header[3] );
02795
02796   // only small GPU suitable images are written, currently:
02797   // check useful header values:
02798   if (!(0<width))
02799     return -2;
02800   if (!(width<=4096))
02801     return -3;
02802   if (!(0<height))
02803     return -4;
02804   if (!(height<4096))
02805     return -5;
02806   if (!(0<nchannels))
02807     return -6;
02808   if (!(nchannels<=4))
02809     return -7;
02810
02811   // OK
02812
02813   // (re-)allocate
02814   if (!result.IsEmpty())
02815     result.Release();
02816   result.Init(width, height, nchannels, ImageBase::ST_float, true);
02817
02818   // read the raw data:
02819   BIASASSERT(is);
02820   is.read( (char*)(result.GetImageData()),
02821     sizeof(float)*width*height*nchannels );
02822
02823   is.close();
02824   return 0;
02825 }
02826
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ImageIO.hh Source File

Base » Image

ImageIO.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_IMAGEIO_H__
00027 #define __BIAS_IMAGEIO_H__
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Common/W32Compat.hh>
00032 #include <string>
00033 #include "Image.hh"
00034 #include "MetaData.hh"
00035
00036
00037
00038 #define MIP_IDENTIFIER "MIP"
00039 #define MIP_IDENTIFIER_LENGTH 3
00040
00041 #define UNKNOWN_META_DATA -5
00042
00043 // default quality for saving e.g. jpg images from  0..100
00044 #define BIAS_DEFAULT_IMAGE_QUALITY 80
00045 #define BIAS_DEFAULT_SYNC false
00046 #define BIAS_DEFAULT_FORCENEWID true
00047
00048 // return code if no error occured
00049 #define BIAS_IO_SUCCESS 0
00050
00051 namespace BIAS {
00052   /** @class ImageIO
00053   @ingroup g_image_io
00054   @brief routines for loading and writing all kinds of image formats
00055   - use Load/Save and Import/ExportImage for foreign+internal file formats
00056   - Optionally use handlers directly,E.g. Read/Write for proprietary mip fmt.
00057   As all functions are static call them like ImageIO::Load(). */
00058   class BIASImageBase_EXPORT ImageIO {
00059   public:
00060     /** @enum TFileFormat
00061     @brief format specifier when writing an image to a file
00062     Do *NOT* change order or associated enum value
00063     because it may confuse IO rotines for loading old images.
00064     */
00065     enum TFileFormat {
00066       FF_auto=4242 /* automatic format detection by filename*/
00067       ,FF_unknown=9999 /* could not be detected by extension */
00068       ,FF_mip=0
00069       ,FF_ppm=1
00070       ,FF_pgm=2
00071       ,FF_jpg=3
00072       ,FF_tif=4
00073       ,FF_png=5
00074       ,FF_viff=6
00075       ,FF_exr=7
00076       ,FF_dds=8
00077       ,FF_raw4096=9
00078       ,FF_bmp=10
00079       ,FF_pbm=12
00080       ,FF_Real32=13
00081     };
00082
00083     /** @brief Write a mip binary Image to disk
00084     @param FileName output file name. Extension .mip is added if extension
00085     isn't already (case insensitive) 'mip' (JW 04/2003)
00086     @author Felix Woelk
00087     @param sync tries to flush all open buffers/caches **/
00088     static int Write(const std::string& FileName, ImageBase &img,
00089       bool sync=false, bool forceNewID = true);
00090
00091     /** @brief Write a mip binary image to disk circumventing OS caches
00092     as good as possible. (O_DIRECT)
00093     @author Jan-Friso Evers
00094     */
00095     static int WriteUnbuffered(const std::string& FileName, ImageBase &img);
00096
00097
00098     /** @brief Read a mip binary Image from disk and allocate memory structure
00099     @param FileName complete name of file to be loaded
00100     @param img object to receive the image data fro the file
00101     @param id The image is assigned id if there is no id in the file
00102     @author Felix Woelk **/
00103     static int Read(const std::string& FileName, ImageBase &img);
00104
00105     /** @brief first tries a call to Read MIP image and if that fails,
00106     tries to Import Image with all other available format loaders
00107     and third party libraries.
00108     @return -1 in case of error
00109     @return UNKNOWN_META_DATA if meta data could not be read
00110     @author Felix Woelk, Jan Woetzel **/
00111     static int Load(const std::string& FileName, ImageBase& img);
00112
00113     /** @brief Save an image to disk
00114     Interface for ExportImage.
00115     There is a side effect on the image, thus it is not const. A uuid may be assigned
00116     - if there is no valid one
00117     - or forceNew flag is set.
00118     @return 0 on success
00119     @author Jan Woetzel **/
00120     static int Save(
00121       const std::string& FileName,
00122       /*const */ ImageBase &img,
00123       const enum TFileFormat FileFormat=FF_auto,
00124       const bool sync = BIAS_DEFAULT_SYNC,
00125       const int  jpeg_quality= BIAS_DEFAULT_IMAGE_QUALITY,
00126       const bool forceNewID = false, /* do NOT set this to true ! (jw) */
00127       const bool & writeMetaData=false
00128       );
00129
00130
00131     /** @brief Try to import an image from a file.
00132
00133     Formats supported are listed in TFileFormat.
00134     More over a few other formats may be includeable like GIF.
00135     The imported image is always of the type RGB.
00136     @param filename name of the file to be loaded
00137     @return -1 in case of error
00138     @return UNKNOWN_META_DATA if meta data could not be read
00139     param assumeGrey : DEPRECATED. Was used to speed up loading with imlib
00140     @author Ingo Thomsen 2002: Complete Rewrite by Jan Woetzel 2005 **/
00141     static int ImportImage(const std::string& filename, ImageBase &result );
00142
00143     /** @brief Export image as file.
00144     There is a side effect on the img - a may be assigned
00145     - if there is no valid one
00146     - or forceNew flag is set.
00147     attention Do NOT scale or shift in this routine, do it by hand if you need it. (JW 04/2003)
00148     @param filename name of the file to be loaded
00149     @param img Image to be saved, not const because of setUUID side effect.
00150     @param FileFormat What file format shall be used for saving
00151     @param jpeg_quality Quality of a jpeg image to be saved,
00152     unused in all other formats
00153     @param sync does only worlk with pgm/ppm (woelk)
00154     @param writeMetaData true to (try to) write meta data to disk and false to drop it.
00155     @return 0 on success
00156     @author (Ingo Thomsen) - complete rewrite by Jan Woetzel */
00157     static int ExportImage(const std::string& filename,
00158       /*const */ ImageBase &img,
00159       const enum TFileFormat FileFormat=FF_auto,
00160       const bool sync = BIAS_DEFAULT_SYNC,
00161       const int c_jpeg_quality= BIAS_DEFAULT_IMAGE_QUALITY,
00162       const bool forceNewID = BIAS_DEFAULT_FORCENEWID,
00163       const bool & writeMetaData=true);
00164
00165     /** @brief appends extension to name if extension is not already extension,
00166     avoids double extension like ".pgm.pgm"
00167
00168     @param oldName filename (maybe selected by user)
00169     @param newExtension desired extension
00170     @return a filename with extension
00171     @author Jan Woetzel 04/2003 */
00172     static std::string ExtensionName(const std::string & oldName,
00173       const std::string & newExtension);
00174
00175
00176
00177 #ifdef BIAS_HAVE_IMLIB
00178     /** @brief Reads an image from disk using the imlib library.
00179     encapsuled from ImportImage 10/2004
00180
00181     \deprecated Deprecated, ImportMagickPP is succesor. (jw) !!!
00182
00183     @return 0 in case of succes, negative value in case of error.
00184     @param filename the input filename to read from.
00185     @param result is the returned read image
00186     @author Jan Woetzel 10/2004 */
00187     static int ImportImlib(const std::string& filename, ImageBase &result ,bool assumeGrey=false );
00188
00189     /** @brief Writes an image to disk using the imlib library.
00190
00191     \deprecated Deprecated, ExportMagickPP is succesor. (jw) !!!
00192
00193     encapsuled from ExportImage 07/2005 JW */
00194     static int ExportImlib( const std::string& c_filename, BIAS::ImageBase &img,
00195       enum TFileFormat FileFormat,
00196       bool sync=BIAS_DEFAULT_SYNC,
00197       int jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY,
00198       bool forceNewID=BIAS_DEFAULT_FORCENEWID,
00199       const bool & writeMetaData=true);
00200
00201 #endif // BIAS_HAVE_IMLIB
00202
00203
00204
00205
00206 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
00207     /** @brief Reads an image from disk using the ImageMagick++ library.
00208     \todo Implement assumeGrey for MagickPP like for Imlib (JW).
00209
00210     result image must be initialized. Th read image is automatically
00211     converted to match the result image.
00212
00213     @return 0 in case of succes, negative value in case of error.
00214     @param FileName the input filename to read from.
00215     @param img contains the read image if success.
00216     @param assumeGrey not implemented for now, just for interface
00217     compatibility with Bias Import functions
00218     @param readMetaData try to read ASCII metadata from file comment.
00219
00220     See http://www.imagemagick.org/script/formats.php for supported formats.
00221     @author Jan Woetzel 10/2004 */
00222     static int ImportMagickPPAutoconvert(const std::string& FileName,
00223       ImageBase& result,
00224       const bool &assumeGrey=false,
00225       const bool &readMetaData=false );
00226
00227     /** @brief Reads an image from disk using the ImageMagick++ library.
00228     is called automatically by ImportImage.
00229     @param dummy ignored, for consistency with ImportMagickPPAutoconvert
00230     @param readMetaData true to try to read metadat (from comment field)
00231     @return 0 in case of succes, negative value in case of error.
00232     \todo fix the error on reading reference streaming in Metadata operator>>
00233     e.g. on loading ibak "M34/Front/image00000000.jpg" (jw)
00234     @author jw and woelk 12/2004 */
00235     static int ImportMagickPP(const std::string & FileName,
00236       ImageBase & result,
00237       const bool & dummy   = false,
00238       const bool & readMetaData=
00239       // HACK: please fix meta data operator>>, see the code.
00240 #ifdef WIN32
00241       false
00242 #else // WIN32
00243       true
00244 #endif // WIN32
00245       );
00246
00247     /** @brief Reads an image from disk using the ImageMagick++ library.
00248     \todo Implement 16bit short write with  Magick++ using BLOB.
00249     \todo Implement quality directive for jpg saving with Magick++.
00250     \bug IMageMagick PPM files are alwyas written as ASCII instaed of binary (JW)
00251     @return 0 in case of succes, negative value in case of error.
00252     @param FileName the input filename to read from.
00253     @param img contains the image to be written to disk.
00254     @param quality for saving, e.g.1-100 for jpeg, tested for jpeg. Is overridden by losslessMode parameter
00255     @param writeMetaData try to write ASCII MetaData as comment to file.
00256     @param forceBinaryPNMformat true to write BINARY pnm/pbm/pgmp/ppm instead of human readable ASCII.
00257     @param losslesMode true to write in jpeg loslles mode. overrides quality setting
00258     @param writeGZipped true for additional gzip compression (e.g. .pgm.gz) which may be useful for human readable ASCII pgm output but save disk space.
00259
00260     Output file type is determined automatically by file extension.
00261
00262     See http://www.imagemagick.org/script/formats.php or \code identify -list format \endcode for supported formats.
00263     @author Jan Woetzel 10/2004 */
00264     static int ExportMagickPP(const std::string& FileName,
00265       const ImageBase& img,
00266       const int  &quality=BIAS_DEFAULT_IMAGE_QUALITY,
00267       const bool &writeMetaData=false,
00268       const bool &forceBinaryPNMformat=true,
00269       const bool &losslesJpgMode=false,
00270       const bool &writeGZipped=false
00271       );
00272 #endif // BIAS_HAVE_IMAGEMAGICKLIB
00273
00274 #ifdef BIAS_HAVE_OPENEXR
00275   public:
00276     /** @brief load an .exr OpenEXR image from disk.
00277     @author Patrick Fittkau, Jan Woetzel 2005/08 */
00278     static int ImportOpenEXR(const std::string& FileName, ImageBase& result);
00279
00280     /** @brief save an .exr OpenEXR image to disk.
00281     @author Jan Woetzel 2005/09 */
00282     static int ExportOpenEXR(const std::string& FileName,
00283       const ImageBase& result);
00284 #endif // BIAS_HAVE_OPENEXR
00285
00286
00287
00288 #ifdef BIAS_HAVE_DEVIL
00289     /** @brief Reads an image from disk using the DevIL/OpenIL library.
00290     See http://openil.sourceforge.net for details.
00291     Supports reading multiple formats, including
00292     - .bmp, .gif, .jpg, .pcd, .pcx, .pic, .png, .pnm
00293     - .tga, .tif , .io
00294     - .dds
00295     - Doom graphics, ...  and many other.
00296
00297     @return 0 in case of succes, negative value in case of error.
00298     @param FileName the input filename to read from.
00299     @param result contains the read image if success.
00300
00301     @author Jan Woetzel 12/2005 */
00302     static int ImportDevIL(const std::string& FileName,
00303       ImageBase& result);
00304
00305        /** @brief Save to disk using the DevIL/OpenIL library.
00306     See http://openil.sourceforge.net for details.
00307     Supports writing multiple formats, including
00308     - .dds
00309     - .tga, .tif,
00310     - .bmp, .jpg, .pcx, .png, .pnm
00311     - .sgi,.tga
00312     Teh fiel format is determined from teh Filenames extension.
00313     @return 0 in case of succes, negative value in case of error.
00314     @param FileName the output filename to read from.
00315     @param img image to be saved
00316     @param fileOverwrite true to overwrite file if exists
00317     @author Jan Woetzel 12/2005 */
00318     static int ExportDevIL(const std::string& FileName,
00319       const ImageBase& img,
00320       const bool &fileOverwrite=true,
00321       const bool &allowPadding=true );
00322
00323     /** initialize devIL once globally.
00324     Usually called by IL load and save functions automatically.
00325     To speed up first load/save you can "pre-call" it on startup.
00326     @author Jan Woetzel */
00327     static void InitDevIL();
00328
00329     /** print info in currently bound DevIL image
00330     @author Jan Woetzel */
00331     static void PrintInfoDevIL(std::ostream & os=std::cout);
00332
00333 #endif // BIAS_HAVE_DEVIL
00334
00335
00336     /** @brief Reads a proprietary .RAW format from disk
00337     A typical file consists of these blocks:
00338     - magick cookie + HEADER size - 7 Byte, e.g. "RAW4096"
00339     thus magick cookies are "RAW8", "RAW4", "RAW2" ,"RAW1", "RAW0"
00340     for 8192, 4096, 2048, 1024, 0512 Byte header inclufing cookie.
00341
00342     E.g. RAW4096 is 4096 Byte text header followed by arbitrary size RAW datat specicified in the header.
00343     Used for most efficient write to disk on WIN32 using system calls without buffering and cache with DMA.
00344     E.g:
00345     \code
00346     Block Name   -  4   Byte  -  RAW8[192] / RAW4[096] /RAW2[048] /RAW1[024] / RAW0[512]
00347     Block Length -  3/4 Byte  -  8192/192    4096/096  should be 4 Byte but is 3 Byte in old RAW4096 fmt witten for "Mediendom" project.
00348     Block Data   -  binary data area begins at Byte nr. "block length+1", e.g. 4096+1 from teh begginning of file, including header.
00349     \endcode
00350     TODO: encode header information in Write routine compatible to digital cameras .raw format which is very similar.
00351
00352     FYI: IrFanView can read and display this format natively (on WIN32).
00353
00354     Inspired by http://www.dalibor.cz/minolta/raw_file_format.htm
00355     and the need to write exactly on aligned memory and disk block sizes
00356     for performance reasons, in particular on WIN32.
00357
00358     Works only with 8 bpp one plane Bayer pattern raw images
00359     (from scorpion camera) actually.
00360
00361     \bug Reading teh data on Linux is broken because fopen ignores teh binary flag, see "man fopen".
00362
00363     @return 0 in case of succes, negative value in case of error.
00364     @author Jan Woetzel 2005 */
00365     static int ImportRAWwithHeader(const std::string & filename,
00366       BIAS::ImageBase & img);
00367
00368
00369     /** helper function for ImportRAWwithHeader
00370     Parses buf for tag
00371     @return retVal value associated to tag in buf
00372     @author Jan Woetzel 2005 */
00373     static int ParseRAWwithHeader(const std::string & buf,
00374       const std::string & tag,
00375       unsigned int & retVal);
00376
00377 //#ifdef BIAS_HAVE_RADIANCE
00378     /** @brief import Greg Wards Radiance RGBE image format (.hdr, .rad)
00379     A high dynamic range RGBE image contains 24 bits RGB Mantissa
00380     and 8 common exponent bits that encode the dynamic range.
00381     See http://radsite.lbl.gov/radiance/
00382     Own implementation just for copyright reasons.
00383     @author Jan Woetzel 01/2006 */
00384     static int ImportRADIANCE(const std::string& FileName, ImageBase& result);
00385 //#endif // BIAS_HAVE_RADIANCE
00386
00387     /** Loads proprietary raw floating point 2d image from Mathematica Real32 values
00388     Example how to export in Mathematica:
00389     \verbatim
00390     (* helper functions *)
00391     Header[img_] := ({1, Dimensions[img][[1]], Dimensions[img][[2]], 1})
00392     ExportReal32[filename_, img_] := Export[filename <> ".real32", Append[Header[img], img], "Real32"]
00393
00394     (* sample data *)
00395     img = {
00396       {1.1, 2.2},
00397       {3.3, 4.4},
00398       {5.5, 6.6} };
00399
00400     (* final usage writing to disk in appropriate format: *)
00401     ExportReal32["out_img", img]
00402     \endverbatim
00403     @author Jan Woetzel */
00404     static int ImportReal32(const std::string& FileName, ImageBase& result);
00405
00406
00407     /** determines the BIAS::ImageIO::TFileFormat for a given filename/extension
00408     Decision based on extension comparison
00409     @author Jan Woetzel */
00410     static BIAS::ImageIO::TFileFormat GetFileFormat(const std::string &str);
00411
00412     /** return the default extension for a given FileFormat enum
00413     @author Jan Woetzel */
00414     static std::string GetExtension(const BIAS::ImageIO::TFileFormat & fmt);
00415
00416   protected:
00417     static int ImportImagePnm_(std::ifstream& ifs, ImageBase &result,
00418       int depth);
00419     static int ExportImagePnm_(const std::string &FileName, ImageBase &img,
00420       bool sync=false,
00421       const bool & writeMetaData=true);
00422
00423     /** @brief import a one channel grey float viff image (Khoros image format)
00424     for compatibility to old stereo code
00425     @param FileName destination filename
00426     @param img BIAS ImageBase to be written to disk
00427     @author Jan Woetzel 01/2003 */
00428     static int ImportImageViff_(std::ifstream& ifs, ImageBase &result);
00429
00430
00431     // to WriteUnbuffered two members are needed
00432     static char *MemAlignedBuffer_;
00433     static unsigned long int MemAlignedBufferSize_;
00434
00435
00436   }; // end of class
00437 } // end of namespace BIAS
00438
00439 #endif
Generated on Wed Jun 21 19:00:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImgObjGL.cpp Source File

Gui

ImgObjGL.cpp

Go to the documentation of this file.
00001 // Jan Woetzel
00002
00003 #include "ImgObjGL.hh"
00004
00005 // DBG:
00006 #include <Base/Image/ImageIO.hh>
00007 #include <iostream>
00008
00009 // -----------------------------
00010 using namespace BIAS;
00011 using namespace std;
00012
00013
00014 // destructor
00015 ImgObjGL::~ImgObjGL()
00016 {
00017   Release();
00018 }
00019
00020
00021 // ctor
00022 ImgObjGL::ImgObjGL()
00023 : p_valueImage(NULL)
00024 {
00025   InitMembers();
00026 }
00027
00028
00029 // ctor
00030 ImgObjGL::ImgObjGL(
00031                    const GLuint & id,
00032                    const unsigned int & widthBrutto,
00033                    const unsigned int & heightBrutto,
00034                    const GLenum & target )
00035 {
00036   InitMembers();
00037   this->id           = id;
00038   this->widthBrutto  = widthBrutto;
00039   this->heightBrutto = heightBrutto;
00040   this->target       = target;
00041
00042   // assume netto=brutto size
00043   this->widthOrig    = widthBrutto;
00044   this->heightOrig = heightBrutto;
00045
00046 }
00047
00048
00049 void ImgObjGL::InitMembers()
00050 {
00051   id=0;
00052   p_id_SelfAllocated=false;
00053
00054   target=GL_TEXTURE_2D;
00055   magnificationMode=
00056     GL_NEAREST /* prefer blocks for zoom in */
00057     //GL_LINEAR
00058     ;
00059   minificationMode=
00060     GL_NEAREST /* accept aliasing */
00061     //GL_LINEAR
00062     /* avoid aliasing */
00063     //GL_NEAREST_MIPMAP_NEAREST
00064     //GL_LINEAR_MIPMAP_NEAREST // linear pix. interpol. within nearest mipmap
00065     //GL_NEAREST_MIPMAP_LINEAR
00066     //GL_LINEAR_MIPMAP_LINEAR
00067     ;
00068   widthOrig=0;
00069   heightOrig=0;
00070   widthBrutto=0;
00071   heightBrutto=0;
00072   p_valueImage=NULL;
00073   p_valueImage_SelfAllocated=false;
00074 }
00075
00076
00077
00078 void ImgObjGL::Release()
00079 {
00080   if (p_id_SelfAllocated){
00081     this->DeleteGLTexture();
00082   }
00083   if (p_valueImage_SelfAllocated) {
00084     delete p_valueImage;
00085   }
00086   // always set NULL, no matter if we freed or another will do.
00087   p_valueImage=NULL;
00088 }
00089
00090
00091 void ImgObjGL::DeleteGLTexture()
00092 {
00093   glEnable( target );
00094   CHECK_GL_ERROR;
00095   // free gl texture memory and id:
00096   glDeleteTextures(1, (GLuint*)(&id) );
00097   id=0;
00098   CHECK_GL_ERROR;
00099   glDisable( target );
00100   CHECK_GL_ERROR;
00101
00102   //this->InitMembers();
00103 }
00104
00105
00106 bool ImgObjGL::IsRectangleTexture() const
00107 {
00108   return target == GL_TEXTURE_RECTANGLE_NV;
00109 }
00110
00111
00112 //JW
00113 void ImgObjGL::CreateGLTexture(const BIAS::ImageBase & c_img,
00114                                const bool & forcePow2tex,
00115                                const bool & flipY,
00116                                const bool ImmediateCopyData )
00117 {
00118   // initialize glew?
00119 #ifdef BIAS_HAVE_GLEW
00120   {
00121     if (!GLEW_VERSION_1_1){
00122       // maybe glewInit was missing
00123       static int err = -1;
00124       if (GLEW_OK != err){
00125         BIASWARN("initializing glewInit.");
00126         glewInit(); // once
00127         if (GLEW_OK != err) {
00128           // problem: glewInit failed, something is seriously wrong
00129           if (glewGetErrorString(err)==NULL) {
00130             BIASERR("could not init GLEW. glewGetErrorString(err) is NULL");
00131           } else {
00132             BIASERR("could not init GLEW. Error: "<<glewGetErrorString(err));
00133             BIASBREAK;
00134           }
00135         };
00136       }
00137     }
00138   }
00139 #endif // BIAS_HAVE_GLEW
00140
00141   Release(); // release old texture (if there is one)
00142
00143   if (forcePow2tex)
00144     target=GL_TEXTURE_2D;
00145
00146   // do not change the texture target *TO* GL_TEXTURE_RECTANGLE_NV, user should do it by hand.
00147   // This way you can put a pow2 texture into a RECT target - which makes sense for shaders.
00148   // assume target is correct and fixed...
00149
00150
00151   // TODO: use a pointer to avoid copy if it is not required.
00152   // create a non const copy:
00153   BIAS::ImageBase img(c_img);
00154   //BIAS::Image<unsigned char> img(c_img);
00155
00156   // save Orig size
00157   this->widthOrig=img.GetWidth();
00158   this->heightOrig=img.GetHeight();
00159   this->widthBrutto=img.GetWidth();
00160   this->heightBrutto=img.GetHeight();
00161
00162   // determine new size (after padding)
00163   if (!IsRectangleTexture() && !img.IsPowerOfTwoSize())
00164   { /* padding required */
00165     img.PowerOfTwoSize(this->widthBrutto, this->heightBrutto);
00166   }
00167
00168   // create a copy because we usually need to flip
00169   if (ImmediateCopyData)
00170   {
00171     if (IsRectangleTexture()){
00172       // RECT
00173       if (flipY) // just flip, RECT dont need padding.
00174         img.Flip();
00175
00176     } else {
00177       // POT  2D always needs padding
00178       if (flipY) {
00179         img.PadToPowerOfTwoAndFlip();
00180       } else {
00181         img.PadToPowerOfTwo();
00182       }
00183     };
00184     BIASASSERT(img.GetWidth()==this->widthBrutto);
00185     BIASASSERT(img.GetHeight()==this->heightBrutto);
00186   }
00187   BIASASSERT(this->widthBrutto>0);
00188   BIASASSERT(this->heightBrutto>0);
00189
00190   // HACK
00191   glEnable( target );
00192   CHECK_GL_ERROR;
00193   glGenTextures(1, &id);
00194   glBindTexture(target, id);
00195   CHECK_GL_ERROR;
00196
00197   // set up GL texture env an params
00198   glPixelStorei(GL_PACK_ALIGNMENT, 1);
00199   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
00200   // border handling - repeat or clamp?
00201   glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP);
00202   glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP);
00203
00204   if (IsRectangleTexture()){
00205     // no mipmapping for rectangle non-power of two texture
00206     // minification
00207     glTexParameteri(target, GL_TEXTURE_MIN_FILTER,  GL_NEAREST);
00208     // magnification
00209     glTexParameteri(target, GL_TEXTURE_MAG_FILTER,  GL_NEAREST);
00210   } else {
00211     // build mipmaps on texture load?
00212     switch (minificationMode){
00213     case GL_NEAREST_MIPMAP_NEAREST:
00214     case GL_LINEAR_MIPMAP_NEAREST:
00215     case GL_NEAREST_MIPMAP_LINEAR:
00216     case GL_LINEAR_MIPMAP_LINEAR:
00217 #ifdef BIAS_HAVE_GLEW
00218       // warning: mipmaping takes performance
00219       glTexParameteri(target, GL_GENERATE_MIPMAP, GL_TRUE);
00220 #endif //BIAS_HAVE_GLEW
00221       glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, 0);
00222       glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 10);
00223 #ifdef BIAS_HAVE_GLEW
00224       glTexParameterf(target, GL_TEXTURE_LOD_BIAS, 0.0);
00225 #endif // BIAS_HAVE_GLEW
00226       break;
00227     case GL_NEAREST:
00228     case GL_LINEAR:
00229     default:
00230 #ifdef BIAS_HAVE_GLEW
00231       glTexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE);
00232 #endif // BIAS_HAVE_GLEW
00233       glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, 0);
00234       glTexParameteri(target, GL_TEXTURE_MAX_LEVEL,  0);
00235 #ifdef BIAS_HAVE_GLEW
00236       glTexParameterf(target, GL_TEXTURE_LOD_BIAS, 0.0);
00237 #endif // BIAS_HAVE_GLEW
00238     }; // end of switch
00239     // minification
00240     glTexParameteri(target, GL_TEXTURE_MIN_FILTER,  minificationMode);
00241     // magnification
00242     glTexParameteri(target, GL_TEXTURE_MAG_FILTER,  magnificationMode);
00243   };
00244   CHECK_GL_ERROR;
00245
00246   //color RGB888 interleaved format: RGB RGB RGB
00247   GLvoid * p_pixels=NULL;
00248   // copy or just allocate?
00249   if (ImmediateCopyData)
00250     p_pixels = img.GetImageData();
00251
00252   //
00253   // determine flags for conversion between CPU and GPU storage
00254   //
00255
00256   GLenum pixSrc_fmt  = GetGLPixelFormat(img.GetColorModel(),  img.GetChannelCount() );
00257   GLenum pixSrc_type = GetGLStorageType(img.GetStorageType(), img.GetDepth() );
00258   // contains channelcount + precision, 1,2,3,4, GL_RGB, GL_RGBA is NOT enough for >8 bit
00259   GLint gpu_internalFmt = GetGLInternalFormat(img);
00260   // check if the GPU internal format (bits, channels)
00261   // is compatible with texture target (pow2, RECT)
00262   if (!IsRectangleTexture()) {
00263     switch (gpu_internalFmt)
00264     {
00265     case 1:
00266     case 2:
00267     case 3:
00268     case 4:
00269     case GL_RGB:
00270     case GL_RGBA:
00271     case GL_BGR_EXT:
00272     case GL_BGRA_EXT:
00273       // OK, standard fmt that works with pow2 and rect.
00274       break;
00275     default:
00276       // the other formats *may* not work with pow2 textures!
00277       BIASERR("Your requested GPU internal format (>8 bit) and texture target (pow2 GL_TEXTURE_2D)  are possibly not compatible!");
00278       BIASBREAK;
00279     };
00280   };
00281
00282   //
00283   // now really create the GL texture4 (object)
00284   // if p_pixels != NULL then the data will be copied, too.
00285   //
00286   glTexImage2D( target , // target
00287     0, // level
00288     gpu_internalFmt,    // internalformat on GPU, typically GL_RGB
00289     this->widthBrutto,  // width, typically 1024
00290     this->heightBrutto, // height, typically 512
00291     GLint(0),    // no border, BORDER does not work anyway!
00292     pixSrc_fmt,  // format of src pixel data, typically GL_RGB
00293     pixSrc_type, // type, typcially GL_UNSIGNED_BYTE
00294     p_pixels );  // datptr. NULL means just allocate (without copy)
00295
00296   CHECK_GL_ERROR;
00297   BIASASSERT( GL_TRUE == glIsTexture( id ) ); // success ?
00298
00299   p_id_SelfAllocated=true; // we want to release id on destructor
00300
00301   // replace, no light (often forgotten...)
00302   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
00303   glDisable( target );
00304
00305   CHECK_GL_ERROR;
00306 }
00307
00308 //static
00309 GLenum ImgObjGL::GetGLStorageType(const BIAS::ImageBase::EStorageType & biasST,
00310                                   const unsigned int & ByteDepth )
00311 {
00312   switch (biasST)
00313   {
00314   case BIAS::ImageBase::ST_unsignedchar:
00315     BIASASSERT(ByteDepth==1);
00316     return GL_UNSIGNED_BYTE;
00317     break;
00318   case BIAS::ImageBase::ST_char:
00319     BIASASSERT(ByteDepth==1);
00320     return GL_BYTE;
00321     break;
00322   case BIAS::ImageBase::ST_unsignedshortint:
00323     BIASASSERT(ByteDepth==2);
00324     return GL_UNSIGNED_SHORT;
00325     break;
00326   case BIAS::ImageBase::ST_shortint:
00327     BIASASSERT(ByteDepth==2);
00328     return GL_SHORT;
00329     break;
00330   case BIAS::ImageBase::ST_unsignedint:
00331     BIASASSERT(ByteDepth==4);
00332     return GL_UNSIGNED_INT;
00333     break;
00334   case BIAS::ImageBase::ST_int:
00335     BIASASSERT(ByteDepth==4);
00336     return GL_INT;
00337     break;
00338   case BIAS::ImageBase::ST_float:
00339     BIASASSERT(ByteDepth==4);
00340     return GL_FLOAT;
00341     break;
00342   default:
00343     BIASERR( "unsupported StorageType:"<<biasST<<" "
00344       <<"(with Byte depth="<<ByteDepth<<")" );
00345     BIASBREAK;
00346   };
00347   return 0;
00348 }
00349
00350
00351 //static
00352 GLenum ImgObjGL::GetGLPixelFormat(const BIAS::ImageBase::EColorModel & biasCM,
00353                                   const unsigned int & channelcount )
00354 {
00355   switch (biasCM)
00356   {
00357     // these may need ifs tbhrough glew for > GL 1.1
00358     // DIB
00359   case BIAS::ImageBase::CM_BGR:
00360     BIASASSERT(channelcount==3);
00361 #ifdef BIAS_HAVE_GLEW
00362     if (!GLEW_VERSION_1_1)
00363       BIASERR("You need a BGR capable GPU!");
00364 #endif // BIAS_HAVE_GLEW
00365     return GL_BGR_EXT;
00366     break;
00367     // DIB
00368   case BIAS::ImageBase::CM_BGRA:
00369     BIASASSERT(channelcount==3);
00370 #ifdef BIAS_HAVE_GLEW
00371     if (!GLEW_VERSION_1_1)
00372       BIASERR("You need a BGRA_EXT capable GPU!");
00373 #endif // BIAS_HAVE_GLEW
00374     return GL_BGRA_EXT;
00375     break;
00376     // one channel grey, replicated to 4 channel RGBA (grey,grey,grey, 1.0)
00377   case BIAS::ImageBase::CM_Grey:
00378     BIASASSERT(channelcount==1);
00379     return GL_LUMINANCE;
00380     break;
00381     // one channel grey+Alpha, replicated to 4 channel RGBA (grey,grey,grey, alpha)
00382   case BIAS::ImageBase::CM_GreyA:
00383     BIASASSERT(channelcount==2);
00384     return GL_LUMINANCE_ALPHA;
00385     break;
00386     // one channel grey+Alpha, replicated to 4 channel RGBA (grey,grey,grey, alpha)
00387
00388   case BIAS::ImageBase::CM_Bayer_BGGR:
00389   case BIAS::ImageBase::CM_Bayer_RGGB:
00390   case BIAS::ImageBase::CM_Bayer_GRBG:
00391   case BIAS::ImageBase::CM_Bayer_GBRG:
00392     BIASASSERT(channelcount==3);
00393     BIASWARN("you are loading raw Bayer image as RGBA.");
00394     return GL_RGB;
00395     break;
00396
00397   case BIAS::ImageBase::CM_HSV:
00398   case BIAS::ImageBase::CM_HSL:
00399   case BIAS::ImageBase::CM_hsL:
00400     BIASWARN("you are loading HSV/HSL/hsL as RGB.");
00401   case BIAS::ImageBase::CM_RGB:
00402     BIASASSERT(channelcount==3);
00403     return GL_RGB;
00404     break;
00405
00406     // the two simple default cases, used for unkonw formats:
00407   case BIAS::ImageBase::CM_RGBA:
00408     BIASASSERT(channelcount==4);
00409     return GL_RGBA;
00410     break;
00411
00412   default:
00413     BIASERR( "unsupported ColroModel:"<<biasCM<<" "
00414       <<"(with channelcount ="<<channelcount<<")" );
00415     BIASBREAK;
00416   };
00417   return 0;
00418 }
00419
00420
00421 //static
00422 GLint ImgObjGL::GetGLInternalFormat(const BIAS::ImageBase & img)
00423 {
00424   return GetGLInternalFormat(
00425     img.GetStorageType(),
00426     img.GetColorModel(),
00427     img.GetChannelCount(),
00428     img.GetDepth(),
00429     img.GetBitDepth()
00430     );
00431 }
00432
00433
00434 //static
00435 GLint ImgObjGL::GetGLInternalFormat(const BIAS::ImageBase::EStorageType & biasST,
00436                                     const BIAS::ImageBase::EColorModel & /*biasCM*/,
00437                                     const unsigned int & channelcount,
00438                                     const unsigned int & ByteDepth,
00439                                     const unsigned int & BitDepth )
00440 {
00441   // bind the GPU storagetype to the number of Byte and channels for now
00442   // TODO: more general assignment to nr. of bits, colormodel etc.
00443
00444   // 1,2,3,4,
00445   // GL_RGB, GL_RGBA, GL_LUMINANCE
00446   // GL_FLOAT_R32_NV
00447   // GL_RGBA32F_ARB
00448   // GL_FLOAT_RGB16_NV
00449   unsigned int ST_ByteDepth=ImageBase::GetSize(biasST);
00450
00451   // do ByteDepth and storagtype depth match?
00452   BIASASSERT( ByteDepth == ST_ByteDepth );
00453
00454   // more fractional bits than capacity?
00455   BIASASSERT( ST_ByteDepth*8 <= BitDepth);
00456
00457   switch (ByteDepth)
00458   {
00459   case 1: // 8 bit
00460     {
00461       if (channelcount==4)
00462         return GL_RGBA;
00463       if (channelcount==3)
00464         return GL_RGB;
00465       //if (channelcount==1)
00466       //  return GL_LUMINANCE; /// TODO
00467       BIASERR("unsupported channel count for 8 bit");
00468       BIASBREAK;
00469       break;
00470     }
00471   case 2: // 16 bit
00472     {
00473 #if defined(BIAS_DEBUG) && defined(BIAS_HAVE_GLEW)
00474       if (!GLEW_VERSION_1_1)
00475         BIASERR("glew said not even OpenGL 1.1 is supported - did you call glewInit() ?");
00476 #endif
00477
00478 #ifdef BIAS_HAVE_GLEW
00479       if (GLEW_ARB_texture_float){ // requires NV GF FX 6,7
00480
00481         if (channelcount==4)
00482           return GL_RGBA16F_ARB;
00483         else if (channelcount==3)
00484           return GL_RGB16F_ARB;
00485
00486       } else if (GLEW_NV_float_buffer){ // for older NV GF 5xxx
00487
00488         if (channelcount==4)
00489           return GL_FLOAT_RGBA16_NV;
00490         else if (channelcount==3)
00491           return GL_FLOAT_RGB16_NV;
00492         else if (channelcount==1)
00493           return GL_FLOAT_RGBA16_NV; // TODO
00494       }
00495 #endif // BIAS_HAVE_GLEW
00496       BIASERR("unsupported channelcount="<<channelcount<<" for 16 bit or missing extension (e.g. ARB_texture_float,NV_float_buffer)");
00497       BIASBREAK;
00498       break;
00499     }
00500   case 4: // 32 bit
00501     {
00502 #if defined(BIAS_DEBUG) && defined(BIAS_HAVE_GLEW)
00503       if (!GLEW_VERSION_1_1)
00504         BIASERR("glew said not even OpenGL 1.1 is supported - did you call glewInit() ?");
00505 #endif //BIAS_DEBUG + BIAS_HAVE_GLEW
00506
00507 #ifdef BIAS_HAVE_GLEW
00508
00509       if (GLEW_ARB_texture_float){ // newer extension, requires Nvidia GF 6,7
00510
00511         if (channelcount==4)
00512           return GL_RGBA32F_ARB;
00513         else if (channelcount==3)
00514           return GL_RGB32F_ARB;
00515         else if (channelcount==2)
00516           return GL_LUMINANCE_ALPHA32F_ARB; // untested
00517         else if (channelcount==1)
00518           return GL_LUMINANCE32F_ARB; // untested
00519
00520       } else if (GLEW_NV_float_buffer){ // works (only?) with Geforce FX 5xxx
00521
00522         if (channelcount==4)
00523           return GL_FLOAT_RGBA32_NV;
00524         else if (channelcount==3)
00525           return GL_FLOAT_RGB32_NV;
00526         else if (channelcount==1)
00527           return GL_FLOAT_RGBA32_NV; // TODO TESTME
00528
00529       } // ext.
00530 #endif // BIAS_HAVE_GLEW
00531
00532       BIASERR("unsupported channelcount="<<channelcount<<" for 32 bit or missing extension (e.g. ARB_texture_float,NV_float_buffer)");
00533       BIASBREAK;
00534       break;
00535     }
00536   default:
00537     BIASERR("unsupported ByteDepth.");
00538     BIASBREAK;
00539   }
00540   return 0;
00541 }
00542
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ImgObjGL.hh Source File

Gui

ImgObjGL.hh

Go to the documentation of this file.
00001 #ifndef __ImgObjGL_h__
00002 #define __ImgObjGL_h__
00003
00004 #include <bias_config.h>
00005 #ifndef BIAS_HAVE_OPENGL
00006 #  error Please recompile BIAS with USE_OPENGL to use ImgObjGL
00007 #endif // BIAS_HAVE_OPENGL
00008
00009 //#ifndef BIAS_HAVE_GLEW
00010 //#  error Please recompile BIAS with USE_GLEW to use ImgObjGL
00011 //#endif // BIAS_HAVE_GLEW
00012
00013
00014 #include "biasgl.h"
00015
00016 // BIAS
00017 #include <Base/Image/ImageBase.hh>
00018 #include <Base/Image/Image.hh>
00019
00020
00021 /** data holder describing OpenGL texture objects in addition to its unique texID.
00022 @author Jan Woetzel  */
00023 namespace BIAS {
00024   class ImgObjGL {
00025   public:
00026     ~ImgObjGL();
00027
00028     ImgObjGL();
00029
00030     //* ctor initializing members JW */
00031     ImgObjGL(
00032       const GLuint & id,
00033       const unsigned int & widthBrutto,
00034       const unsigned int & heightBrutto,
00035       const GLenum & target=GL_TEXTURE_2D
00036       );
00037
00038     //* set memebrs to defaults */
00039     void InitMembers();
00040
00041     /// frees the pointer members if we allocated them
00042     void Release();
00043
00044     /// deletes the texture memory and frees texture in GL
00045     void  DeleteGLTexture();
00046
00047     /// @return true ibn RECT instead of 2D pow2 object
00048     bool IsRectangleTexture() const;
00049
00050     /**  creates an OpenGL texture from p_valueImage JW
00051     if ImmediateCopyData is false teh memory is just allocated and not copied from c_img.
00052     JW */
00053     void CreateGLTexture(
00054       const BIAS::ImageBase & c_img, /*zeropad etc is currently missing*/
00055       const bool & forcePow2tex=true,
00056       const bool & flipY=true,
00057       const bool ImmediateCopyData=true );
00058
00059
00060     /** set the textur retarget to rectangular or pow 2 texture JW */
00061     void SetTargetPOW2(){ SetTarget2D(); };
00062     void SetTarget2D(){ target=GL_TEXTURE_2D; };
00063     void SetTargetRECT(){ target=GL_TEXTURE_RECTANGLE_NV; };
00064
00065     /** get the GLenum pixel storage type for the corresponding BIAS enum @author Jan Woetzel */
00066     static GLenum GetGLStorageType(const BIAS::ImageBase::EStorageType & biasST,
00067       const unsigned int & ByteDepth );
00068
00069     /** get the GLenum pixel src format for the corresponding BIAS enum ColroModel @author Jan Woetzel */
00070     static GLenum GetGLPixelFormat(const BIAS::ImageBase::EColorModel & biasCM,
00071       const unsigned int & channelcount );
00072
00073     /// JW determin teh GPU internal format teh src data should be mapped to @author Jan Woetzel
00074     static GLint GetGLInternalFormat(
00075       const BIAS::ImageBase::EStorageType & biasST,
00076       const BIAS::ImageBase::EColorModel & biasCM,
00077       const unsigned int & channelcount,
00078       const unsigned int & ByteDepth,
00079       const unsigned int & BitDepth );
00080
00081     ///  interface for teh above @author Jan Woetzel
00082     static GLint GetGLInternalFormat(const BIAS::ImageBase & img);
00083
00084
00085
00086   public:
00087     // OpenGL texture
00088     GLuint id; // unique OpengL texture id
00089     GLenum target; // GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_NV
00090
00091     // true if we "created" the above and need to free it in destructor.
00092     bool p_id_SelfAllocated;
00093
00094     GLenum minificationMode;
00095     GLenum magnificationMode;
00096
00097     // original feed in size
00098     unsigned int widthOrig; // should match p_valueImage size if exists
00099     unsigned int heightOrig;
00100
00101     // padded to next pow2 size:
00102     unsigned int widthBrutto;
00103     unsigned int heightBrutto;
00104
00105     // image containing the original values
00106     BIAS::ImageBase * p_valueImage;
00107
00108     // true if we "newed" the above and have to free it in destructor.
00109     // false if we got a pointer which we do not need to clean up.
00110     bool p_valueImage_SelfAllocated;
00111
00112   };
00113 } // namespace BIAS
00114
00115 #endif
00116
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/index.h Source File

Base » Math » tnt

index.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Vector/Matrix/Array Index Module
00035
00036 #ifndef INDEX_H
00037 #define INDEX_H
00038
00039 #include "subscript.h"
00040
00041 namespace TNT
00042 {
00043
00044 class Index1D
00045 {
00046     Subscript lbound_;
00047     Subscript ubound_;
00048
00049     public:
00050
00051     Subscript lbound() const { return lbound_; }
00052     Subscript ubound() const { return ubound_; }
00053
00054     Index1D(const Index1D &D) : lbound_(D.lbound_), ubound_(D.ubound_) {}
00055     Index1D(Subscript i1, Subscript i2) : lbound_(i1), ubound_(i2) {}
00056
00057     Index1D & operator=(const Index1D &D)
00058     {
00059         lbound_ = D.lbound_;
00060         ubound_ = D.ubound_;
00061         return *this;
00062     }
00063
00064 };
00065
00066 inline Index1D operator+(const Index1D &D, Subscript i)
00067 {
00068     return Index1D(i+D.lbound(), i+D.ubound());
00069 }
00070
00071 inline Index1D operator+(Subscript i, const Index1D &D)
00072 {
00073     return Index1D(i+D.lbound(), i+D.ubound());
00074 }
00075
00076
00077
00078 inline Index1D operator-(Index1D &D, Subscript i)
00079 {
00080     return Index1D(D.lbound()-i, D.ubound()-i);
00081 }
00082
00083 inline Index1D operator-(Subscript i, Index1D &D)
00084 {
00085     return Index1D(i-D.lbound(), i-D.ubound());
00086 }
00087
00088 } // namespace TNT
00089
00090 #endif
00091
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: INSTALL Source File

INSTALL

Go to the documentation of this file.
00001 INSTALL howto for the BIAS library
00002
00003 QUICKINSTALL:
00004 > get BIAS source
00005 > get CMakeModules
00006 > setenv CMAKE_MODULE_PATH to directory of CMakeModules
00007 > cmake .
00008 > make
00009
00010
00011
00012 Building BIAS with CMake
00013 ------------------------
00014
00015 Prerequsits:
00016 (1) Install newest cmake version (minimum 2.0.3) from www.cmake.org
00017 (2) If you have a tar.gz BIAS version, all necessary CMake scripts will be
00018 inside that archive and you can proceed with step (3). When using the BIAS
00019 cvs access, you need to fetch build system scripts(2.1) and tell where
00020 they are(2.2):
00021 (2.1)
00022 Checkout our CMakeModules directory (same CVS settings as BIAS) containing
00023 additional find package macros for BIAS:
00024 > cvs co CMakeModules
00025 (2.2) Let environment variable CMAKE_MODULE_PATH
00026 point to the CMakeModules directory, e.g.
00027 on bash:
00028 > export CMAKE_MODULE_PATH=/home/jw/CMakeModules
00029 or on tcsh:
00030 > setenv CMAKE_MODULE_PATH /home/jw/CMakeModules
00031
00032
00033 (3) checkout/install BIAS source code.
00034
00035 (4) configure
00036 run cmake to change options and to generate makefiles.
00037
00038 example for an in-place build on Linux:
00039 cd to source directory of BIAS
00040 > cd BIAS
00041 configure and generate makefiles:
00042
00043 On Linux:
00044 > ccmake . (mind the 'dot')
00045 See the bottom line for usage insatructions, in particular:
00046 - press 'c', then modify options as required and press 'c' again to configure
00047 - finally press 'g' to generate Makefiles
00048
00049 On Win32:
00050 > CMakeSetup.exe
00051 The GUI is self-explaining.
00052
00053
00054 Note:
00055 You can also use
00056  > cmake .
00057 directly if you prefer commad line instead of graphical interface.
00058
00059
00060 (4.2) configure examples:
00061 With the option BUILD_EXAMPLES at the you may switch the building of example binaries.
00062 > make
00063
00064
00065 (5) compile:
00066 > make
00067
00068 (6) install: (optional, not required)
00069 > make install
00070
00071
00072 See ReadmeCMake.txt for further information.
00073
00074 Jan Woetzel
00075 12/2003 - 11/2004
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/IntegralHistogram.cpp Source File

Image

IntegralHistogram.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "IntegralHistogram.hh"
00027 #include <Base/Image/ImageBase.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Debug/TimeMeasure.hh>
00030
00031 #include <Base/Common/BIASpragma.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 BIAS::TimeMeasure usertime, rowtime;
00037
00038 /**
00039    This class creates an IntegralHistogram in the HSL color space.
00040    @author ingo schiller
00041    @date feb 2004
00042  */
00043 IntegralHistogram::IntegralHistogram()
00044 {
00045   bExpDist_=true;
00046   nMinSat_=10;
00047   nLambda_=20;
00048   nBinsize_=32;
00049   nBinsizeSat_=64;
00050   nOldBinsize_=0;
00051
00052 }
00053
00054 IntegralHistogram::~IntegralHistogram()
00055 {
00056   Clear();
00057 }
00058
00059
00060 void IntegralHistogram::SetBinSize(int binsize){
00061   nBinsize_ = binsize;
00062   // cout<<"Setting new Binsize "<<binsize<<endl;
00063 }
00064
00065 void IntegralHistogram::Clear()
00066 {
00067   bExpDist_=true;
00068   nMinSat_=10;
00069   nLambda_=20;
00070   nBinsize_=32;
00071   nBinsizeSat_=64;
00072   nOldBinsize_=0;
00073 }
00074
00075 Vector<int> IntegralHistogram::
00076 GetHistogram(int ux,int uy,int lx, int ly)
00077 {
00078   //D = D-C-B+A
00079   Vector<int> histo = mHists_[ly-1][lx-1];
00080   if(ux>0 && uy>0)
00081   {
00082     histo -= mHists_[ly-1][ux-1]; //lowery - (upperx-1)
00083     histo -= mHists_[uy-1][lx-1]; // (uppery-1) - lowerx
00084     histo += mHists_[uy-1][ux-1]; // (uppery-1) - (uppery-1)
00085   }
00086   else if(uy==0 && ux >0)
00087   {
00088       histo -= mHists_[ly-1][ux-1];
00089   }
00090   else if(ux==0 && uy >0)
00091   {
00092       histo -= mHists_[uy-1][lx-1];
00093   }
00094   return histo;
00095 }
00096
00097
00098 int IntegralHistogram::GenerateIntegralHist(Image<unsigned char>& img,
00099                                             int nBinsize)
00100 {
00101
00102
00103   //at first test if image is in HSL
00104   if (img.GetColorModel()!=ImageBase::CM_HSL){
00105     BIASERR("GenerateIntegralHist() needs an image with HSL Colormodel!");
00106     return -1;
00107   }
00108   //only resize if changed;
00109   if(nBinsize != nOldBinsize_)
00110     {
00111       nBinsize_ = nBinsize;
00112       nOldBinsize_ = nBinsize;
00113     }
00114   nBinsizeSat_ = nBinsize;
00115   nOldBinsizeSat_ = nBinsize;
00116
00117   const int nWidth = img.GetWidth();
00118   const int nHeight = img.GetHeight();
00119   unsigned char *pData = img.GetImageData(); //the image data
00120   const int nStep = 256/nBinsize_;  //the steps in pData
00121   const int nStep2=nStep*nStep;
00122   const int nNumIndex=nStep2+nStep;
00123   unsigned char hue=0, sat=0, light=0;
00124   int tmp = nBinsize_; //here calculate the shift
00125   nShift_=-1;
00126   while (tmp!=0) {
00127     tmp=tmp>>1; nShift_++;
00128   }
00129
00130
00131   //resize the hists array to prevent overflows and init to 0
00132   if(mHists_.size() != nWidth*nHeight){
00133     Vector<int> tmp(nNumIndex+1);
00134     mHists_.newsize(nHeight, nWidth);
00135     mHists_=tmp;
00136   }
00137
00138
00139   //now go through picture and generate the pixelvalues
00140   Vector<int> *uData, *lData, *RowEnd, *end;
00141   uData = lData = &(mHists_[0][0]);
00142   RowEnd = uData + nWidth;
00143   end = uData + nWidth*nHeight;
00144
00145   //set  mHists_ [0][0]
00146   lData->Fill(0);
00147   hue = (*pData++)>>nShift_;
00148   sat = (*pData++);
00149   light = (*pData++)>>nShift_;
00150   if (sat>nMinSat_){
00151     sat = sat>>nShift_;
00152     (*lData)[hue*nStep+sat]++;
00153   } else {
00154     (*lData)[nStep2+light]++;
00155   }
00156   (*lData)[nNumIndex]=1; // set bincount at [0][0] = 1 (first element
00157   lData++;
00158   // row 0 (setting elements mHists_[0][x]
00159   while (lData < RowEnd){
00160     CopyNoCheck(lData[-1], *lData); // copy mHists_[0][0] to mHists_[0][1]
00161     hue = (*pData++)>>nShift_;
00162     sat = (*pData++);
00163     light = (*pData++)>>nShift_;
00164     if (sat>nMinSat_){
00165       sat = sat>>nShift_;
00166       (*lData)[hue*nStep+sat]++;
00167     } else {
00168       (*lData)[nStep2+light]++;
00169     }
00170     (*lData)[nNumIndex]++; //increase bincount for mHists_[0][x]
00171     lData++;
00172
00173   }
00174   RowEnd += nWidth;
00175   //  usertime.Reset();
00176   //  usertime.Start();
00177   while (lData < end){
00178     // first column
00179     *lData = *uData;
00180     hue = (*pData++)>>nShift_;
00181     sat = (*pData++);
00182     light = (*pData++)>>nShift_;
00183     if (sat>nMinSat_){
00184     sat = sat>>nShift_;
00185       (*lData)[hue*nStep+sat]++;
00186     } else {
00187       (*lData)[nStep2+light]++;
00188     }
00189     (*lData)[nNumIndex]++;  //increase bincount
00190     lData++;
00191     uData++;
00192     while (lData < RowEnd){
00193       *lData = *uData;
00194       *lData -= uData[-1];
00195       *lData += lData[-1];
00196       hue = (*pData++)>>nShift_;
00197       sat = (*pData++);
00198       light = (*pData++)>>nShift_;
00199       if (sat>nMinSat_){
00200         sat = sat>>nShift_;
00201         (*lData)[hue*nStep+sat]++;
00202       } else {
00203         (*lData)[nStep2+light]++;
00204       }
00205       (*lData)[nNumIndex]++;
00206       lData++;
00207       uData++;
00208     }
00209     RowEnd+=nWidth;
00210   }
00211   //  usertime.Stop();
00212   //  cout<<"Building the Int Histo takes \n:";
00213   //  usertime.PrintRealTime();
00214   // cout <<"usecs"<<endl;
00215   //  usertime.Reset();
00216   //Dump(cout, 239, 319);
00217   //assert(false);
00218   return 0;
00219
00220 }
00221
00222
00223 int IntegralHistogram::GenerateIntegralHistDiffBin(Image<unsigned char>& img,
00224                                             int nBinsizeHue, int nBinsizeSat)
00225 {
00226   // cout<<"CreateIntergralHistDiffBin binSizeHue :"<<nBinsizeHue<<endl;
00227   //cout<<"CreateIntergralHistDiffBin binSizeSat :"<<nBinsizeSat<<endl;
00228
00229   //at first test if image is in HSL
00230   if (img.GetColorModel()!=ImageBase::CM_HSL){
00231     BIASERR("GenerateIntegralHist() needs an image with HSL Colormodel!");
00232     return -1;
00233   }
00234   //only resize if changed;
00235   if(nBinsizeHue != nOldBinsize_)
00236     {
00237       nBinsize_ = nBinsizeHue;
00238       nOldBinsize_ = nBinsizeHue;
00239     }
00240   if(nBinsizeSat != nOldBinsizeSat_)
00241     {
00242       nBinsizeSat_ = nBinsizeSat;
00243       nOldBinsizeSat_ = nBinsizeSat;
00244     }
00245
00246   const int nWidth = img.GetWidth();
00247   const int nHeight = img.GetHeight();
00248   unsigned char *pData = img.GetImageData(); //the image data
00249   const int nStep = 256/nBinsize_;  //the steps in pData
00250   const int nStepSat = 256/nBinsizeSat_;
00251   const int nStep2Sat = nStepSat*nStep;
00252   const int nNumIndex=nStep2Sat+nStep;
00253   unsigned char hue=0, sat=0, light=0;
00254   int tmp = nBinsize_; //here calculate the shift
00255   nShift_=-1;
00256   while (tmp!=0) {
00257     tmp=tmp>>1; nShift_++;
00258   }
00259
00260   tmp = nBinsizeSat_;
00261   nShiftSat_=-1;
00262   while (tmp!=0) {
00263     tmp=tmp>>1; nShiftSat_++;
00264   }
00265
00266
00267
00268   //resize the hists array to prevent overflows and init to 0
00269   if(mHists_.size() != nWidth*nHeight){
00270     Vector<int> tmp(nNumIndex+1);
00271     mHists_.newsize(nHeight, nWidth);
00272     mHists_=tmp;
00273   }
00274
00275
00276   //now go through picture and generate the pixelvalues
00277   Vector<int> *uData, *lData, *RowEnd, *end;
00278   uData = lData = &(mHists_[0][0]);
00279   RowEnd = uData + nWidth;
00280   end = uData + nWidth*nHeight;
00281
00282   //set  mHists_[0][0]
00283   lData->Fill(0);
00284   hue = (*pData++)>>nShift_;
00285   sat = (*pData++);
00286   light = (*pData++)>>nShift_;
00287   if (sat>nMinSat_){
00288     sat = sat>>nShiftSat_;
00289     (*lData)[hue*nStepSat+sat]++;
00290   } else {
00291     (*lData)[nStep2Sat+light]++;
00292   }
00293   (*lData)[nNumIndex]=1; // set bincount at [0][0] = 1 (first element
00294   lData++;
00295   // row 0 (setting elements mHists_[0][x]
00296   while (lData < RowEnd){
00297     CopyNoCheck(lData[-1], *lData); // copy mHists_[0][0] to mHists_[0][1]
00298     hue = (*pData++)>>nShift_;
00299     sat = (*pData++);
00300     light = (*pData++)>>nShift_;
00301     if (sat>nMinSat_){
00302       sat = sat>>nShiftSat_;
00303       (*lData)[hue*nStepSat+sat]++;
00304     } else {
00305       (*lData)[nStep2Sat+light]++;
00306     }
00307     (*lData)[nNumIndex]++; //increase bincount for mHists_[0][x]
00308     lData++;
00309
00310   }
00311   RowEnd += nWidth;
00312
00313   usertime.Reset();
00314   usertime.Start();
00315   while (lData < end){
00316     // first column
00317     *lData = *uData;
00318     hue = (*pData++)>>nShift_;
00319     sat = (*pData++);
00320     light = (*pData++)>>nShift_;
00321     if (sat>nMinSat_){
00322       sat = sat>>nShiftSat_;
00323       (*lData)[hue*nStepSat+sat]++;
00324     } else {
00325       (*lData)[nStep2Sat+light]++;
00326     }
00327     (*lData)[nNumIndex]++;  //increase bincount
00328     lData++;
00329     uData++;
00330     while (lData < RowEnd){
00331       *lData = *uData;
00332       *lData -= uData[-1];
00333       *lData += lData[-1];
00334       hue = (*pData++)>>nShift_;
00335       sat = (*pData++);
00336       light = (*pData++)>>nShift_;
00337       if (sat>nMinSat_){
00338         sat = sat>>nShiftSat_;
00339
00340         (*lData)[hue*nStepSat+sat]++;
00341       } else {
00342         (*lData)[nStep2Sat+light]++;
00343       }
00344       (*lData)[nNumIndex]++;
00345       lData++;
00346       uData++;
00347     }
00348     RowEnd+=nWidth;
00349   }
00350   usertime.Stop();
00351   cout<<"Building the Int Histo takes \n:";
00352   usertime.PrintRealTime();
00353   // cout <<"usecs"<<endl;
00354   usertime.Reset();
00355   //Dump(cout, 239, 319);
00356   //assert(false);
00357   return 0;
00358
00359 }
00360
00361
00362 double IntegralHistogram::
00363 CalcSimilarity(ColorHistogram<unsigned char> &chist,
00364                int ux,int uy,int lx, int ly)
00365 {
00366   double dist=0; //indicator for similarity
00367
00368   //  BIAS::TimeMeasure time;
00369   //  time.Reset();
00370   //  time.Start();
00371
00372   //D = D-C-B+A
00373   Vector<int> histo = mHists_[ly-1][lx-1];
00374   if(ux>0 && uy>0)
00375     {
00376       histo -= mHists_[ly-1][ux-1]; //lowery - (upperx-1)
00377       histo -= mHists_[uy-1][lx-1]; // (uppery-1) - lowerx
00378       histo += mHists_[uy-1][ux-1]; // (uppery-1) - (uppery-1)
00379     }
00380   else if(uy==0 && ux >0)
00381     {
00382       histo -= mHists_[ly-1][ux-1];
00383     }
00384   else if(ux==0 && uy >0){
00385     histo -= mHists_[uy-1][lx-1];
00386   }
00387   int nBinwidth =  256/nBinsize_; //width of one bin
00388   int nBinwidthSat= 256/nBinsizeSat_; // width of one bin for Sat
00389   //  int nBinwidthsq = nBinwidth*nBinwidth
00390   int nBinwidthsq = nBinwidth*nBinwidthSat;
00391   int nBinCount = histo[nBinwidthsq+nBinwidth];  //Number of bins
00392   //prevent division by o
00393   if(nBinCount == 0)
00394     nBinCount = 1;
00395
00396   m_cHSData = chist.GetHist();
00397   m_cLData = chist.GetHistL();
00398
00399   //save normalised values (divided by bincount) in normHisto
00400   Vector<double> normHisto(histo.size());
00401   for(int x=0;x<histo.size()-1;x++){
00402     normHisto[x]= (double)((double) histo[x] / nBinCount);
00403   }
00404   //but leave last element as the bincount
00405   normHisto[histo.size()-1] = histo[histo.size()-1];
00406
00407   //sum up the sqrt of the product of q*(n)and q(n;x) over all bins
00408   for(int i=0;i<nBinwidth;i++){
00409     //lValue
00410     dist += sqrt(((double)normHisto[nBinwidthsq+i])*m_cLData[i]);
00411     //hsValues
00412     //  for(int j=0;j<nBinwidth;j++){
00413     for(int j=0;j<nBinwidthSat;j++){
00414       dist += sqrt((normHisto[i*nBinwidthSat+j])*m_cHSData[i][j]);
00415     }
00416   }
00417   //new
00418   if(!bExpDist_)
00419     dist = sqrt(1-dist);
00420   else
00421     dist = exp(-nLambda_*(1-dist));
00422
00423   /* old
00424      if(bExpDist_)
00425      dist = exp(-nLambda_*(1-dist));
00426   */
00427   //  time.Stop();
00428   // cout<<"CalculateSimilarity took:"<<endl;
00429   // time.Print();
00430   return dist;
00431 }
00432
00433 double
00434 IntegralHistogram::CalcSimilarity(ColorHistogram<unsigned char> &chist1,
00435                                   int ux1,int uy1,int lx1, int ly1,
00436                                   ColorHistogram<unsigned char> &chist2,
00437                                   int ux2,int uy2,int lx2, int ly2,
00438                                   double weightSecond)
00439 {
00440   double sim1 = CalcSimilarity(chist1,ux1,uy1,lx1,ly1);
00441   double sim2 = CalcSimilarity(chist2,ux2,uy2,lx2,ly2);
00442   return (1.0-weightSecond)*sim1 + weightSecond*sim2;
00443 }
00444
00445 /**
00446    dumps information on histogram to ostream
00447    format:
00448    binsize tab ux tab uy tab lx tab ly
00449    hs histogram, as a matrix with binsize x binsize (tab separated)
00450    l values as a line with lenght binsize (tab separated)
00451 */
00452 void IntegralHistogram::Dump(std::ostream& os, int y, int x)
00453 {
00454   os << " D = B + C - A\n";
00455   os << "A: "<<mHists_[y-1][x-1]<<endl
00456      << "B: "<<mHists_[y-1][x]<<endl
00457      << "C: "<<mHists_[y][x-1]<<endl
00458      << "D: "<<mHists_[y][x]<<endl;
00459   os << " D = B + C - A\n";
00460 }
00461
00462
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/IntegralHistogram.hh Source File

Image

IntegralHistogram.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __INTEGRALHISTOGRAM_HH__
00027 #define __INTEGRALHISTOGRAM_HH__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <vector>
00032 #include <Base/Image/Image.hh>
00033 #include <Base/Math/Math.hh>
00034 #include <Base/Math/Vector.hh>
00035 #include "ColorHistogram.hh"
00036
00037
00038 #define D_INT_HIST   (1<<0)
00039
00040 namespace BIAS{
00041
00042   /**
00043      @class IntegralHistogram
00044      @ingroup g_image
00045      This Class handels Integral Histograms on HSL Images
00046      It represents an integral image histogram  and offers basic methods
00047      on histograms.
00048      @author Ingo Schiller
00049      @status untested
00050      @date 25.Oktober 2004
00051   */
00052
00053   class BIASImage_EXPORT IntegralHistogram
00054   {
00055   public:
00056     ///
00057     IntegralHistogram();
00058     ~IntegralHistogram();
00059
00060
00061     /**
00062        Deletes ALL current Histogram information
00063     */
00064     void Clear();
00065
00066     /**
00067        set the binsize (must be divideable by 2pown)
00068     */
00069     void SetBinSize(int binsize);
00070
00071     /**
00072        set minsat_, which defines the minimum saturation
00073     */
00074     void SetMinSat(int minsat);
00075
00076     /**
00077        sets Lambda, which is used to calculate the dist
00078        in CalcSimilarity
00079     */
00080     void SetLambda(int lambda);
00081
00082     /**
00083        sets expDist_ true or false, used to calculate the dist
00084        in CalcSimilarity
00085     */
00086     void SetExpDist(bool expdist);
00087
00088
00089     /**
00090        GetBinSize
00091     */
00092     inline int GetBinSize() const {return nBinsize_;}
00093
00094     /**
00095        GetBinSizeSat
00096     */
00097     inline int GetBinSizeSat() const {return nBinsizeSat_;}
00098
00099     /**
00100        Get Histogram
00101        @param roi = the Region in which the histogram should be created
00102        @return = Vector which holds teh Histogram, structure:
00103        binsizeSat * binsizeHue elements(hue and sat )
00104        + binsizeSat elements(luminance)
00105        + totalNumber of entries (last element)
00106     */
00107     Vector<int> GetHistogram(int ux,int uy,int lx, int ly);
00108
00109
00110     /**
00111         calcluates the histogram from the picture and fills the data structs
00112         @author Schiller
00113         @param image = the image
00114     */
00115     int GenerateIntegralHist(BIAS::Image<unsigned char>& image,
00116                              int nBinsize);
00117
00118
00119     /**
00120         calcluates the histogram from the picture and fills the data structs
00121         @author Schiller
00122         @param image = the image
00123         @param nBinsizeHue = binsize in hue direction
00124         @param nBinsizeSat = binsize in sat direction
00125     */
00126     int GenerateIntegralHistDiffBin(BIAS::Image<unsigned char>& image,
00127                                     int nBinsizeHue, int nBinsizeSat);
00128     /**
00129        Calculates the Bhattacharyya similarity Coeiffient^2
00130        which is the distance or difference of 2 colorhistograms.
00131        @param chist = the colorHistogram we compare with
00132        @param roi = the roi to compare with: upperx, uppery, lowerx, lowery
00133        @return double value, which indicates the similarity. 1 if similar.
00134        @author Schiller oktober 2004
00135     */
00136     double CalcSimilarity(ColorHistogram<unsigned char> &chist,
00137                           int ux,int uy,int lx, int ly);
00138
00139     /** Calculates the Bhattacharyya similarity Coeiffient^2
00140         which is the distance or difference of 2 colorhistograms.
00141         The similarity is calculated for two image regions/histograms
00142         the resulting probability is the weighted sum of both.
00143         @return double value, which indicates the similarity. 1 if equal.
00144         @author grest Oct 2005
00145     */
00146     double CalcSimilarity(ColorHistogram<unsigned char> &chist1,
00147                           int ux1,int uy1,int lx1, int ly1,
00148                           ColorHistogram<unsigned char> &chist2,
00149                           int ux2,int uy2,int lx2, int ly2,
00150                           double weightSecond= 0.5);
00151
00152     /**
00153        dumps information on histogram
00154        @param os = the outstream, default std::cout
00155        @author Schiller
00156     */
00157     void Dump(std::ostream& os, int y, int x);
00158
00159   protected:
00160     //this is the major datastruct
00161     //access via [][], has BIAS::Vector which holds H,S,L in binsize each
00162     // + bincount as last element in vector
00163     TNT::Matrix<BIAS::Vector<int> > mHists_;
00164     std::vector<std::vector<double> > m_cHSData;
00165     std::vector<double> m_cLData;
00166
00167     int nMinSat_;
00168     int nLambda_;
00169     bool bExpDist_;
00170     int nBinsize_;
00171     int nBinsizeSat_;
00172     int nOldBinsize_;
00173     int nOldBinsizeSat_;
00174
00175     int nShift_; // used to shift the pixel to correct position
00176     int nShiftSat_;
00177     inline void CopyNoCheck(const BIAS::Vector<int>& src,
00178                             BIAS::Vector<int>& dst){
00179       //BIASASSERT(src.size() == dst.size());
00180       register int *srcData = src.GetData(), *dstData = dst.GetData();
00181       const int *end = srcData + src.size();
00182       while (srcData<end){
00183         *dstData++ = *srcData++;
00184       }
00185     }
00186   }; // class
00187
00188
00189 } // namespace BIAS
00190
00191 #include <Base/Common/BIASpragmaEnd.hh>
00192
00193 #endif // __INTEGRALHISTOGRAM_HH__
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Examples/interpolate.cpp Source File

MathAlgo » Examples

interpolate.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Common/BIASpragma.hh>
00027
00028 #include <stdlib.h>
00029 #include <vector>
00030
00031 // use MIPMath library
00032 #include "MathAlgo/Interpolator.hh"
00033 #include "Base/Image/Image.hh"
00034 #include "Base/Image/ImageDraw.hh"
00035 #include "Gui/GuiGTK.hh"
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 Interpolator interpolator;
00041 std::vector<double> listT;
00042 std::vector<double> listX;
00043 std::vector<double> listY;
00044 std::vector<Vector2<double> > listControlPoints;
00045 void initDim2()
00046 {
00047   double t;
00048   Vector2<double> vec;
00049   t=0; vec[0]=1; vec[1]=599;
00050   listT.push_back(t); listControlPoints.push_back(vec);
00051   t=50; vec[0]=100; vec[1]=450;
00052   listT.push_back(t);  listControlPoints.push_back(vec);
00053   t=100;vec[0]=200; vec[1]=400;
00054   listT.push_back(t);  listControlPoints.push_back(vec);
00055   t=200; vec[0]=300;vec[1]=400;
00056   listT.push_back(t);  listControlPoints.push_back(vec);
00057   t=300;vec[0]=400;vec[1]=400;
00058   listT.push_back(t);  listControlPoints.push_back(vec);
00059   t=400;vec[0]=500;vec[1]=200;
00060   listT.push_back(t);  listControlPoints.push_back(vec);
00061   t=500;vec[0]=600;vec[1]=100;
00062   listT.push_back(t);  listControlPoints.push_back(vec);
00063   t=600;vec[0]=700; vec[1]=100;
00064   listT.push_back(t);  listControlPoints.push_back(vec);
00065   t=700;vec[0]=600;vec[1]=200;
00066   listT.push_back(t);  listControlPoints.push_back(vec);
00067   t=800;vec[0]=500;vec[1]=400;
00068   listT.push_back(t);  listControlPoints.push_back(vec);
00069   t=900;vec[0]=200;vec[1]=200;
00070   listT.push_back(t);  listControlPoints.push_back(vec);
00071
00072   interpolator.SetKnotPoints(listT);
00073   interpolator.SetControlPoints(listControlPoints);
00074   interpolator.InitSpline();
00075   interpolator.InitBezier(2);
00076 }
00077
00078 void initDim1()
00079 {
00080   double t,y;
00081   t=0; y=100;
00082   listT.push_back(t); listY.push_back(y);
00083   t=50; y=100;
00084   listT.push_back(t); listY.push_back(y);
00085   t=100; y=100;
00086   listT.push_back(t); listY.push_back(y);
00087   t=150; y=500;
00088   listT.push_back(t); listY.push_back(y);
00089   t=200;y=500;
00090   listT.push_back(t); listY.push_back(y);
00091   t=300;y=450;
00092   listT.push_back(t); listY.push_back(y);
00093   t=400;y=410;
00094   listT.push_back(t); listY.push_back(y);
00095   t=500;y=100;
00096   listT.push_back(t); listY.push_back(y);
00097   t=600;y=200;
00098   listT.push_back(t); listY.push_back(y);
00099   t=650;y=100;
00100   listT.push_back(t); listY.push_back(y);
00101   t=700;y=350;
00102   listT.push_back(t); listY.push_back(y);
00103
00104   /*double x,y;
00105   x=300.0*0.000; y=1.000*x;
00106   listT.push_back(x); listY.push_back(y);
00107   x=300.0*0.138; y=1.000*x;
00108   listT.push_back(x); listY.push_back(y);
00109   x=300.0*0.424; y=0.993*x;
00110   listT.push_back(x); listY.push_back(y);
00111   x=300.0*0.757; y=0.974*x;
00112   listT.push_back(x); listY.push_back(y);
00113   x=300.0*1.045; y=0.941*x;
00114   listT.push_back(x); listY.push_back(y);
00115   x=300.0*1.342; y=0.899*x;
00116   listT.push_back(x); listY.push_back(y);
00117   x=300.0*1.436; y=0.881*x;
00118   listT.push_back(x); listY.push_back(y);
00119   x=300.0*1.652; y=0.828*x;
00120   listT.push_back(x); listY.push_back(y);
00121   */
00122   /*
00123   double x,y;
00124   x=350*0.005; y=350*1.000;
00125   listT.push_back(x); listY.push_back(y);
00126   x=350*0.092; y=350*1.000;
00127   listT.push_back(x); listY.push_back(y);
00128   x=350*0.179; y=350*1.000;
00129   listT.push_back(x); listY.push_back(y);
00130   x=350*0.266; y=350*1.003;
00131   listT.push_back(x); listY.push_back(y);
00132   x=350*0.354; y=350*1.003;
00133   listT.push_back(x); listY.push_back(y);
00134   x=350*0.439; y=350*1.003;
00135   listT.push_back(x); listY.push_back(y);
00136   x=350*0.527; y=350*1.003;
00137   listT.push_back(x); listY.push_back(y);
00138   x=350*0.615; y=350*1.005;
00139   listT.push_back(x); listY.push_back(y);
00140   x=350*0.701; y=350*1.005;
00141   listT.push_back(x); listY.push_back(y);
00142   x=350*0.788; y=350*1.005;
00143   listT.push_back(x); listY.push_back(y);
00144   x=350*0.875; y=350*1.005;
00145   listT.push_back(x); listY.push_back(y);
00146   x=350*0.962; y=350*1.003;
00147   listT.push_back(x); listY.push_back(y);
00148   x=350*1.049; y=350*0.998;
00149   listT.push_back(x); listY.push_back(y);
00150   x=350*1.135; y=350*0.993;
00151   listT.push_back(x); listY.push_back(y);
00152   x=350*1.223; y=350*0.983;
00153   listT.push_back(x); listY.push_back(y);
00154   x=350*1.310; y=350*0.966;
00155   listT.push_back(x); listY.push_back(y);
00156   x=350*1.398; y=350*0.941;
00157   listT.push_back(x); listY.push_back(y);
00158   x=350*1.485; y=350*0.897;
00159   listT.push_back(x); listY.push_back(y);
00160   x=350*1.572; y=350*0.828;
00161   listT.push_back(x); listY.push_back(y);
00162   x=350*1.660; y=350*0.716;
00163   listT.push_back(x); listY.push_back(y);
00164   */
00165   interpolator.SetKnotPoints(listT);
00166   interpolator.SetControlPoints(listY);
00167   interpolator.InitSpline();
00168   interpolator.InitBezier(1);
00169 }
00170
00171
00172 int main (int argc, char **argv)
00173 {
00174   double dt;
00175
00176   GuiGTK window;
00177   char key = '+';
00178   initDim1();
00179   Image<unsigned char> img;
00180   img.Init(800,600);
00181   for (unsigned int i=0;i<listT.size()-1;i++){
00182     //img.DrawLine(listT[i],600-listY[i],listT[i],600-listY[i],255);
00183     ImageDraw<unsigned char>::Line(img,
00184                                    (unsigned int)listT[i],
00185                                    600-(unsigned int)listY[i],
00186                                    (unsigned int)listT[i+1],
00187                                    600-(unsigned int)listY[i+1],
00188                                    255);
00189   }
00190   window.SetTitle("interpolation test");
00191   window.ShowImage(img);
00192   int x0=0, y0=0, x1=0, y1=0, k=3;
00193   double pos;
00194   bool useSpline=true;
00195   //  Vector2<double> startTang(5,-5),endTang(0,0);
00196   double startTang=-10000,endTang=-10000;
00197   cerr<<"Press h for help."<<endl;
00198
00199   while (key!='q') {
00200     window.ShowImage(img);
00201     key=window.WaitForKeyEvent();
00202     if (key=='s') {
00203       if (startTang==-10000) {
00204         startTang=0;
00205       }
00206       startTang-=0.1;
00207        cout<<"startTang:"<<startTang<<endl;
00208       cout<<"endTang:"<<endTang<<endl;
00209     }
00210     if (key=='w') {
00211       if (startTang==-10000) {
00212         startTang=0;
00213       }
00214       startTang+=0.1;
00215       cout<<"startTang:"<<startTang<<endl;
00216       cout<<"endTang:"<<endTang<<endl;
00217     }
00218     if (key=='a') {
00219       startTang=-10000;
00220       cout<<"startTang:"<<startTang<<endl;
00221       cout<<"endTang:"<<endTang<<endl;
00222    }
00223     if (key=='i') {
00224       if (endTang==-10000) {
00225         endTang=0;
00226       }
00227       endTang+=0.1;
00228       cout<<"startTang:"<<startTang<<endl;
00229       cout<<"endTang:"<<endTang<<endl;
00230     }
00231     if (key=='k') {
00232       if (endTang==-10000) {
00233         endTang=0;
00234       }
00235       endTang-=0.1;
00236       cout<<"startTang:"<<startTang<<endl;
00237       cout<<"endTang:"<<endTang<<endl;
00238     }
00239     if (key=='j') {
00240       endTang=-10000;
00241       cout<<"startTang:"<<startTang<<endl;
00242       cout<<"endTang:"<<endTang<<endl;
00243     }
00244     if (key=='1') k=1;
00245     if (key=='2') k=2;
00246     if (key=='3') k=3;
00247     if (key=='4') k=4;
00248     if (key=='b') {
00249       if (useSpline) {
00250         cout << "showing Bezier" << endl;
00251         useSpline=false;
00252       } else {
00253         cout << "showing Spline" << endl;
00254         useSpline=true;
00255       }
00256     }
00257     if (key=='h') {
00258       cerr<<"keys: "<<endl;
00259       cerr<<"w,s:   change startTangent"<<endl;
00260       cerr<<"a:     relaxed start condition"<<endl;
00261       cerr<<"i,k:   change endTangent"<<endl;
00262       cerr<<"j:     relaxed end condition"<<endl;
00263       cerr<<"1,2,3: change degree of interpolation"<<endl;
00264       cerr<<"4:     use akima-spline"<<endl;
00265       cerr<<"b :    switch Spline and Bezier"<<endl;
00266       cerr<<"q :    quits"<<endl;
00267     }
00268
00269     img.FillImageWithConstValue((unsigned char)0);
00270     int deg=3;
00271     interpolator.SetStartTangent(startTang);
00272     interpolator.SetEndTangent(endTang);
00273     for (int j=1;j<=2;j++) {
00274       if (j==1) deg=1;
00275       else deg=k;
00276       dt=0;
00277       for (int i=0;i<700;i++) {
00278         if (useSpline || j==1) {
00279           interpolator.Spline(pos,dt,deg);
00280         } else {
00281           interpolator.Bezier3(pos,dt);
00282         }
00283         x1=(unsigned int)dt;y1=600-(unsigned int)pos;
00284         //      interpolator.Spline(y,dt,k);
00285         //cerr<<"dt:"<<dt<<" pos:"<<pos<<endl;
00286         //y1=600-(int)y;
00287         //      window.ShowImage(img);
00288         //key=window.WaitForKeyEvent();
00289         if (i>0) ImageDraw<unsigned char>::Line(img, x0,y0,x1,y1,j*126);
00290         x0=x1;
00291         y0=y1;
00292         dt+=1;
00293       }
00294     }
00295
00296   }
00297 }
00298
00299
00300
00301
00302
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Interpolator.cpp Source File

MathAlgo

Interpolator.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 #  define _USE_MATH_DEFINES
00027 #endif //WIN32
00028
00029 #include <math.h>
00030 #include <iostream>
00031 #include "Interpolator.hh"
00032 #include "Base/Debug/Error.hh"
00033 //#include "Base/Image/ImageDraw.hh"
00034 #include "Lapack.hh"
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 Interpolator::Interpolator(){
00040   actIndex_=0; // the index of the actual intervall for t
00041   initializedPoly_=0;
00042   startTangentX_=-10000;
00043   startTangentY_=-10000;
00044   startTangentZ_=-10000;
00045   endTangentX_=-10000;
00046   endTangentY_=-10000;
00047   endTangentZ_=-10000;
00048   nmatrix_.newsize(4,4);
00049   bezierInitialized_ = false;
00050
00051
00052 #ifdef BIASDEBUG
00053   Debuglevel_=0;
00054   //  Debuglevel_|=D_INTERPOL_COMMON;
00055   //  Debuglevel_|=D_INTERPOL_SPLINE3;
00056 #endif
00057 }
00058
00059 void Interpolator::Clear() {
00060   listPolynoms1_.clear();
00061   listPolynoms2_.clear();
00062   listPolynoms3_.clear();
00063   KPts_.clear();
00064   T_.clear();
00065   listPntDim1_.clear();
00066   listPntDim2_.clear();
00067   listPntDim3_.clear();
00068   initializedPoly_=0;
00069   startTangentX_=-10000;
00070   startTangentY_=-10000;
00071   startTangentZ_=-10000;
00072   endTangentX_=-10000;
00073   endTangentY_=-10000;
00074   endTangentZ_=-10000;
00075   bXK_1_.clear();
00076   bXK_2_.clear();
00077   bXK_3_.clear();
00078   bYK_1_.clear();
00079   bYK_2_.clear();
00080   bYK_3_.clear();
00081   bezierInitialized_ = false;
00082 }
00083
00084 void
00085 Interpolator::SetControlPoints(const std::vector<Vector2<double> > &cPnt)
00086 {
00087   double temp;
00088   for (unsigned int i=0;i<cPnt.size();i++) {
00089     temp=cPnt[i][0];listPntDim1_.push_back(temp);
00090     temp=cPnt[i][1];listPntDim2_.push_back(temp);
00091   }
00092 }
00093
00094 void
00095 Interpolator::
00096 SetControlPoints(const std::vector<BIAS::Vector3<double> > &cPnt) {
00097   double temp;
00098   for (unsigned int i=0;i<cPnt.size();i++) {
00099     temp=cPnt[i][0];listPntDim1_.push_back(temp);
00100     temp=cPnt[i][1];listPntDim2_.push_back(temp);
00101     temp=cPnt[i][2];listPntDim3_.push_back(temp);
00102   }
00103 }
00104
00105 void
00106 Interpolator::GetControlPoints(std::vector<Vector2<double> > &cPnt) const
00107 {
00108   Vector2<double> temp;
00109   cPnt.clear();
00110   for (unsigned int i=0;i<listPntDim1_.size();i++) {
00111     temp[0]=listPntDim1_[i];
00112     temp[1]=listPntDim2_[i];
00113     cPnt.push_back(temp);
00114   }
00115 }
00116
00117 void
00118 Interpolator::
00119 GetControlPoints(std::vector<BIAS::Vector3<double> > &cPnt) const
00120 {
00121   Vector3<double> temp;
00122   cPnt.clear();
00123   for (unsigned int i=0;i<listPntDim1_.size();i++) {
00124     temp[0]=listPntDim1_[i];
00125     temp[1]=listPntDim2_[i];
00126     temp[2]=listPntDim3_[i];
00127     cPnt.push_back(temp);
00128   }
00129 }
00130
00131 bool Interpolator::validate(double &t)
00132 {
00133   BIASDOUT(D_INTERPOL_COMMON,"validating t:"<<t);
00134   if (listPntDim1_.size()>KPts_.size()) { // make it uniform
00135     KPts_.clear();
00136     T_.clear();
00137     for (unsigned int i=0;i<listPntDim1_.size();i++)
00138       KPts_.push_back((double)i/(double)(listPntDim1_.size()-1));
00139       T_.push_back(1);
00140   }
00141   unsigned int tSize=KPts_.size()-1;
00142   if ( (tSize<=0) || (listPntDim1_.size()<=1) ) {
00143     BIASERR("less than 2 control points");
00144     return false;
00145   }
00146   if (t<=KPts_[0]) {t=KPts_[0]; actIndex_=0; return true;}
00147
00148   // find the correct intervall
00149   unsigned int i=0;
00150   while ((i<tSize) && (KPts_[i]<t))
00151     i++;
00152   actIndex_=i-1;
00153   return true;
00154 }
00155
00156 void Interpolator::SetKnotPoints(const std::vector<double> &kPnt){
00157   unsigned int n=0;
00158   if ((n=kPnt.size())==0) return;
00159   KPts_.resize(n);
00160   T_.resize(n);
00161   for (unsigned int i=0;i<n;i++)
00162     KPts_[i]=kPnt[i];
00163   for (unsigned int i=0;i<n;i++)
00164     T_[i]=kPnt[i]-kPnt[i-1];
00165 }
00166
00167 void Interpolator::InitSpline()
00168 {
00169   initializedPoly_=0;
00170 }
00171
00172
00173 void Interpolator::InitSplineAkima(std::vector<BIAS::Vector<double> > &listP,
00174                                    std::vector<double> listPnt,
00175                                    double startTangent, double endTangent)
00176 {
00177   int n=listPnt.size();
00178   BIASDOUT(D_INTERPOL_SPLINE3,"n="<<n);
00179   if (n<5) {
00180     InitSpline2(listP,listPnt,-10000);
00181     return;
00182   }
00183
00184   BIAS::Vector<double> a(4); // the polynom coefficients
00185   BIAS::Vector<double> Px(6);
00186   BIAS::Vector<double> Py(6);
00187   int Min, Max;
00188   int from, to;
00189
00190   for (int j=0; j<n-1; j++) {
00191     from = 0;
00192     to = 5;
00193
00194     Min = j - 2;
00195     if (Min<0) {
00196       if (startTangent==-10000) {
00197         from -= Min;
00198       }
00199       Min = 0;
00200     }
00201     Max = j + 3;
00202     if (Max>n-1) {
00203       if (endTangent==-10000) {
00204         to += n-1 - Max;
00205       }
00206       Max = n-1;
00207     }
00208
00209     int k = 0;
00210     for (int i=j-2; i<=j+3; i++) {
00211       if (i>=Min && i<=Max) {
00212         Px[k] = KPts_[i];
00213         Py[k] = listPnt[i];
00214       } else {
00215         if (i<Min) {
00216           if (startTangent==-10000) {
00217             Px[k] = KPts_[Min];
00218             Py[k] = listPnt[Min];
00219           } else {
00220             Px[k] = KPts_[Min] - (KPts_[Min+1]-KPts_[Min]) * (Min-i);
00221             Py[k] = listPnt[Min] -
00222               (KPts_[Min+1]-KPts_[Min]) * (Min-i) * startTangent;
00223           }
00224         } else {
00225           if (endTangent==-10000) {
00226             Px[k] = KPts_[Max];
00227             Py[k] = listPnt[Max];
00228           } else {
00229             Px[k] = KPts_[Max] + (KPts_[Max]-KPts_[Max-1]) * (i-Max);
00230             Py[k] = listPnt[Max] +
00231               (KPts_[Max]-KPts_[Max-1]) * (i-Max) * endTangent;
00232           }
00233         }
00234       }
00235       k++;
00236     }
00237     double xx=Px[2];
00238     for (int i=0; i<6; i++) {
00239       Px[i]-=xx;
00240     }
00241     fakima(a, Px, Py, from, to, 2);
00242     listP.push_back(a);
00243     }
00244   initializedPoly_=4;
00245 }
00246
00247
00248 void Interpolator::fakima(BIAS::Vector<double> &a,
00249                           BIAS::Vector<double> Px, BIAS::Vector<double> Py,
00250                           int from, int to, int intervall)
00251 {
00252     double d1,d2;
00253     double a1,a2;
00254   BIAS::Vector<double> dq(6);
00255   BIAS::Vector<double> si(2);
00256   BIAS::Matrix<double> A(4,4);
00257   BIAS::Vector<double> b(4);
00258
00259     for (int i=0; i<from; i++)  {
00260         d1 = Py[from+1] - Py[from];
00261         d2 = Px[from+1] - Px[from];
00262         if (d2 == 0)
00263             dq[i] = 0.0;
00264         else
00265             dq[i] = d1/d2;
00266    }
00267     for (int i=from; i<to; i++) {
00268         d1 = Py[i+1] - Py[i];
00269         d2 = Px[i+1] - Px[i];
00270         if (d2 == 0)
00271             dq[i] = 0.0;
00272         else
00273             dq[i] = d1/d2;
00274     }
00275     for (int i=to; i<6; i++)    {
00276         d1 = Py[to] - Py[to-1];
00277         d2 = Px[to] - Px[to-1];
00278         if (d2 == 0)
00279             dq[i] = 0.0;
00280         else
00281             dq[i] = d1/d2;
00282    }
00283
00284     // calculate tangent si0
00285   double eps=0.000001;
00286     a1 = fabs(dq[intervall+1] - dq[intervall]);
00287     a2 = fabs(dq[intervall-1] - dq[intervall-2]);
00288     if ((a1+a2) < eps) {
00289         si[0] = (dq[intervall-1]+dq[intervall]) / 2;
00290     } else {
00291         si[0] = (a1 * dq[intervall-1] + a2 * dq[intervall]) / (a1+a2);
00292   }
00293
00294     // calculate tangent si1
00295     intervall ++;
00296     a1 = fabs(dq[intervall+1] - dq[intervall]);
00297     a2 = fabs(dq[intervall-1] - dq[intervall-2]);
00298     if ((a1+a2) <eps) {
00299         si[1] = (dq[intervall-1]+dq[intervall]) / 2;
00300   } else {
00301         si[1] = (a1 * dq[intervall-1] + a2 * dq[intervall]) / (a1+a2);
00302   }
00303
00304   //construct LGS
00305     intervall --;
00306     A[0][0] = ((double)(Px[intervall])) *
00307     ((double)(Px[intervall])) * ((double)(Px[intervall]));
00308     A[0][1] = ((double)(Px[intervall])) * ((double)(Px[intervall]));
00309     A[0][2] = (double)(Px[intervall]);
00310     A[0][3] = 1.0;
00311
00312     A[1][0] = ((double)(Px[intervall+1])) *
00313     ((double)(Px[intervall+1])) * ((double)(Px[intervall+1]));
00314     A[1][1] = ((double)(Px[intervall+1])) * ((double)(Px[intervall+1]));
00315     A[1][2] = (double)(Px[intervall+1]);
00316     A[1][3] = 1.0;
00317
00318     A[2][0] = 3.0 * ((double)(Px[intervall])) * ((double)(Px[intervall]));
00319     A[2][1] = 2.0 * ((double)(Px[intervall]));
00320     A[2][2] = 1.0;
00321     A[2][3] = 0.0;
00322
00323     A[3][0] = 3.0 * ((double)(Px[intervall+1])) * ((double)(Px[intervall+1]));
00324     A[3][1] = 2.0 * ((double)(Px[intervall+1]));
00325     A[3][2] = 1.0;
00326     A[3][3] = 0.0;
00327
00328     b[0] = (double)(Py[intervall]);
00329     b[1] = (double)(Py[intervall+1]);
00330     b[2] = si[0];
00331     b[3] = si[1];
00332
00333   a=Lapack_LU_linear_solve(A,b);
00334 }
00335
00336 void
00337 Interpolator::InitSpline3(std::vector<BIAS::Vector<double> > &listP,
00338                   std::vector<double> listPnt,
00339                   double startTangent, double endTangent)
00340 {
00341   // t0 is 0!   different t values are handed by tOffset_
00342   unsigned int i;
00343   unsigned int n=listPnt.size();
00344   BIASDOUT(D_INTERPOL_SPLINE3,"n="<<n);
00345   if (n==3) {
00346     InitSpline2(listP,listPnt,startTangent);
00347     return;
00348   }
00349   // first calculate the tangents for all control points
00350   // x is the solution with the tangent values
00351   // if start or end tangent are not set, thenthe relaxed end condition
00352   // P1''=0 or Pn''=0 is used
00353   int stAdd=0;
00354   if (startTangent==-10000) {
00355     stAdd=1;
00356   }
00357   int edAdd=0;
00358   if (endTangent==-10000) {
00359     edAdd=1;
00360   }
00361   BIAS::Vector<double> x(n-2+stAdd+edAdd),b(n-2+stAdd+edAdd);
00362   assert (n>2);
00363   BIAS::Matrix<double> A(n-2+stAdd+edAdd,n-2+stAdd+edAdd);
00364   A.Fill(0);
00365
00366   // linear equations like those in
00367   // David Salomon's CG, page 238 for nonuniform Splines
00368   if (stAdd==0) {
00369     // startTangent set
00370     A[0][0]=2.0*(T_[1] + T_[2]);
00371     A[0][1]=T_[1];
00372     b[0]= 3.0/(T_[1]*T_[2]) *
00373       ( T_[1]*T_[1] * (listPnt[2] - listPnt[1]) +
00374         T_[2]*T_[2] * (listPnt[1] - listPnt[0]) ) -
00375       T_[2] * startTangent;
00376   } else {
00377     // relaxed start condition
00378     A[0][0]=2.0*T_[1];
00379     A[0][1]=T_[1];
00380     b[0]= 3.0 * (listPnt[1] - listPnt[0]);
00381   }
00382   for (i=1;i<n-3+stAdd+edAdd;i++) {
00383     A[i][i-1]=T_[i+2-stAdd];
00384     A[i][i] = 2.0 * (T_[i+1-stAdd] + T_[i+2-stAdd]);
00385     A[i][i+1] = T_[i+1-stAdd];
00386     b[i] = 3.0/(T_[i+1-stAdd]*T_[i+2-stAdd]) *
00387       ( T_[i+1-stAdd]*T_[i+1-stAdd] *
00388         (listPnt[i+2-stAdd] - listPnt[i+1-stAdd]) +
00389         T_[i+2-stAdd]*T_[i+2-stAdd] * (listPnt[i+1-stAdd] - listPnt[i-stAdd]));
00390   }
00391   if (edAdd==0) {
00392     // endTangent set
00393     A[n-3+stAdd][n-4+stAdd] = T_[n-1];
00394     A[n-3+stAdd][n-3+stAdd] = 2.0 * (T_[n-1] + T_[n-2]);
00395     b[n-3+stAdd]= 3.0/(T_[n-1]*T_[n-2]) *
00396       ( T_[n-2]*T_[n-2] * (listPnt[n-1] - listPnt[n-2]) +
00397         T_[n-1]*T_[n-1] * (listPnt[n-2] - listPnt[n-3]) ) -
00398       T_[n-2] * endTangent;
00399   } else {
00400     // relaxed end condition
00401     A[n-2+stAdd][n-3+stAdd] = T_[n-1];
00402     A[n-2+stAdd][n-2+stAdd] = 2.0 * T_[n-1];
00403     b[n-2+stAdd]= 3.0 * (listPnt[n-1] - listPnt[n-2]);
00404   }
00405   BIASDOUT(D_INTERPOL_SPLINE3," A:"<<A);
00406
00407   x=Lapack_LU_linear_solve(A,b);
00408   BIASDOUT(D_INTERPOL_SPLINE3,"Vector x:"<<x);
00409
00410   BIAS::Vector<double> a(4); // the polynom coefficients
00411   double t_i_1;
00412   if (stAdd==0) {
00413     // startTangent set
00414     // the first segment
00415     t_i_1= T_[1];
00416     a[0]= listPnt[0];
00417     a[1]= startTangent;
00418     a[2]= 3.0* (listPnt[1]-listPnt[0])/(t_i_1*t_i_1) -
00419       2.0/t_i_1* startTangent - x[0]/t_i_1;
00420     a[3]= 2.0/(t_i_1*t_i_1*t_i_1)* (listPnt[0]-listPnt[1]) +
00421       (startTangent + x[0]) / (t_i_1*t_i_1);
00422     listP.push_back(a);
00423   }
00424   BIASDOUT(D_INTERPOL_SPLINE3,"First Polynom:"<<a);
00425   for (i=1;i<n-2+stAdd+edAdd;i++) { // second segment to n-2 segment
00426     t_i_1= T_[i+1-stAdd];
00427     a[0]= listPnt[i-stAdd];
00428     a[1]= x[i-1]; // x are the tangent values
00429     a[2]= 3.0/(t_i_1*t_i_1)* (listPnt[i+1-stAdd]-listPnt[i-stAdd]) -
00430       2.0/t_i_1* x[i-1] - x[i]/t_i_1;
00431     a[3]= 2.0/(t_i_1*t_i_1*t_i_1)* (listPnt[i-stAdd]-listPnt[i+1-stAdd]) +
00432       (x[i-1] + x[i]) / (t_i_1*t_i_1);
00433     listP.push_back(a);
00434     BIASDOUT(D_INTERPOL_SPLINE3,"polynom "<<i<<": "<<a);
00435   }
00436   if (edAdd==0) {
00437     // endTangent set
00438     // last (n-1) segment
00439     t_i_1= T_[n-1];
00440     a[0]= listPnt[n-2];
00441     a[1]= x[n-3+stAdd];
00442     a[2]= 3.0/(t_i_1*t_i_1)* (listPnt[n-1]-listPnt[n-2]) -
00443       2.0/t_i_1* x[n-3+stAdd] - endTangent/t_i_1;
00444     a[3]= 2.0/(t_i_1*t_i_1*t_i_1)* (listPnt[n-2]-listPnt[n-1]) +
00445       (x[n-3+stAdd] + endTangent) / (t_i_1*t_i_1);
00446     listP.push_back(a);
00447   }
00448   initializedPoly_=3;
00449
00450 //    for (int i=0; i<n; i++) {
00451 //      cout << i << "  T:" << T_[i] << "    listPnt:" << listPnt[i]
00452 //           << endl;
00453 //    }
00454
00455 //    cout << "ST x:" << startTangent << endl;
00456 //    for (int i=0; i<n-2; i++) {
00457 //      cout << i+1 << "  x:" << x[i] << endl;
00458 //    }
00459 //    cout << "ET x:" << endTangent << endl;
00460 }
00461
00462 void
00463 Interpolator::InitSpline2(std::vector<BIAS::Vector<double> > &listP,
00464                   std::vector<double> listPnt,
00465                   double startTangent)
00466 {
00467   unsigned int n=listPnt.size();
00468   if (n<3) {
00469     InitLinear(listP,listPnt);
00470     return;
00471   }
00472   unsigned int i;
00473   const double eps=0.00000001;
00474   BIAS::Vector<double> a(3);
00475   double t0,t1, y0,y1,s1;
00476
00477   // take the next control point for each new polynom
00478   double t0Deriv;
00479   if (startTangent==-10000)
00480     startTangent = 0;
00481
00482   for (i=0;i<n-1;i++) {
00483     t0=KPts_[i];t1=KPts_[i+1];
00484     y0=listPnt[i];y1=listPnt[i+1];
00485     if (i==0) t0Deriv=startTangent;
00486     else t0Deriv=a[1]+ 2*a[2] * t0;
00487     s1=2*t0*(t1-t0) - (t1*t1 - t0*t0);
00488     if (fabs(s1)<eps) a[2]=0;
00489     else a[2]=(t0Deriv*(t1-t0) - y1 + y0) / s1;
00490     a[1]=t0Deriv - 2*a[2]*t0;
00491     a[0]=y0 - a[2]*t0*t0 - a[1]*t0;
00492     listP.push_back(a);
00493     BIASDOUT(D_INTERPOL_SPLINE2,"t0Deriv:"<<t0Deriv<<" a:"<<a);
00494   }
00495   //  BIASDOUT(D_POLYNOM,"a0:"<<a[0]<<" a1:"<<a[1]<<" a2:"<<a[2]);
00496   //  cerr<<"a:"<<a;
00497   initializedPoly_=2;
00498 }
00499
00500 void Interpolator::InitLinear(std::vector<BIAS::Vector<double> > &listP,
00501         std::vector<double> listPnt)
00502 {
00503   unsigned int i,n=listPnt.size()-1;
00504   BIAS::Vector<double> a(2);
00505   for (i=0;i<n;i++) {
00506     if (T_[i+1]>0)
00507       a[1]=(listPnt[i+1]-listPnt[i]) / T_[i+1];
00508     else a[1]=0;
00509     a[0]=listPnt[i]-a[1]*KPts_[i];
00510     listP.push_back(a);
00511   }
00512   initializedPoly_=1;
00513 }
00514
00515
00516 // calculates the polynom coefficients for each intervall
00517 void Interpolator::InitSpline(unsigned int k, unsigned int dim)
00518 {
00519   listPolynoms1_.clear();
00520   listPolynoms2_.clear();
00521   listPolynoms3_.clear();
00522   actIndex_=0;
00523   if (dim==1) {
00524     if (k==1)
00525       InitLinear(listPolynoms1_,listPntDim1_);
00526     if (k==2)
00527       InitSpline2(listPolynoms1_,listPntDim1_,startTangentX_);
00528     if (k==3)
00529       InitSpline3(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00530     if (k==4)
00531       InitSplineAkima(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00532   }
00533   if (dim==2)  {
00534     if (k==1) {
00535       InitLinear(listPolynoms1_,listPntDim1_);
00536       InitLinear(listPolynoms2_,listPntDim2_);
00537     }
00538     if (k==2) {
00539       InitSpline2(listPolynoms1_,listPntDim1_,startTangentX_);
00540       InitSpline2(listPolynoms2_,listPntDim2_,startTangentY_);
00541     }
00542     if (k==3) {
00543       InitSpline3(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00544       InitSpline3(listPolynoms2_,listPntDim2_,startTangentY_,endTangentY_);
00545     }
00546     if (k==4) {
00547       InitSplineAkima(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00548       InitSplineAkima(listPolynoms2_,listPntDim2_,startTangentY_,endTangentY_);
00549     }
00550   }
00551   if (dim==3) {
00552     if (k==1) {
00553       InitLinear(listPolynoms1_,listPntDim1_);
00554       InitLinear(listPolynoms2_,listPntDim2_);
00555       InitLinear(listPolynoms3_,listPntDim3_);
00556     }
00557     if (k==2) {
00558       InitSpline2(listPolynoms1_,listPntDim1_,startTangentX_);
00559       InitSpline2(listPolynoms2_,listPntDim2_,startTangentY_);
00560       InitSpline2(listPolynoms3_,listPntDim3_,startTangentZ_);
00561     }
00562     if (k==3) {
00563       InitSpline3(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00564       InitSpline3(listPolynoms2_,listPntDim2_,startTangentY_,endTangentY_);
00565       InitSpline3(listPolynoms3_,listPntDim3_,startTangentZ_,endTangentZ_);
00566     }
00567     if (k==4) {
00568       InitSplineAkima(listPolynoms1_,listPntDim1_,startTangentX_,endTangentX_);
00569       InitSplineAkima(listPolynoms2_,listPntDim2_,startTangentY_,endTangentY_);
00570       InitSplineAkima(listPolynoms3_,listPntDim3_,startTangentZ_,endTangentZ_);
00571     }
00572   }
00573 }
00574
00575
00576 int Interpolator::Spline(double &res, double t, unsigned int k)
00577 {
00578   if (!validate(t)) {
00579     BIASERR("invalid values, result is undefined");
00580     res=0;
00581     return -1;
00582   }
00583
00584   if (t>KPts_[KPts_.size()-1]) {
00585     res=listPntDim1_[actIndex_+1];
00586     return 1;
00587   }
00588    // if less than 4 control points
00589   if (listPntDim1_.size()<=k) k=listPntDim1_.size()-1;
00590
00591   if (initializedPoly_!=k)
00592     InitSpline(k,1);
00593   if (k==3 || k==4) {
00594     t = t-KPts_[actIndex_];
00595   }
00596
00597   res=0;
00598   for (int i=0;i<listPolynoms1_[actIndex_].size();i++) {
00599     if (k!=4) {
00600       res+=listPolynoms1_[actIndex_][i]*pow(t,i);
00601     } else {
00602       res+=listPolynoms1_[actIndex_][i]*pow(t,3-i);
00603     }
00604   }
00605   return 0;
00606 }
00607
00608
00609 int Interpolator::Spline(Vector2<double> &res, double t, unsigned int k)
00610 {
00611   if (!validate(t)) {
00612     BIASERR("invalid values, result is undefined");
00613     res = 0;
00614     return -1;
00615   }
00616   if (t>KPts_[KPts_.size()-1]) {
00617     res[0]=listPntDim1_[actIndex_+1];
00618     res[1]=listPntDim2_[actIndex_+1];
00619     return 1;
00620   }
00621    // if less than 4 control points
00622   if (listPntDim1_.size()<=k) k=listPntDim1_.size()-1;
00623
00624   if (initializedPoly_!=k)
00625     InitSpline(k,2);
00626   res.Set(0);
00627   double t0=KPts_[actIndex_], t1= KPts_[actIndex_+1];
00628   double tint1= T_[actIndex_+1];
00629   if (k==3 || k==4) {
00630     t = (t-t0)/(t1-t0) * tint1;
00631   }
00632   for (int i=0;i<listPolynoms1_[actIndex_].size();i++) {
00633     res[0]+=listPolynoms1_[actIndex_][i]*pow(t,(int)i);
00634     res[1]+=listPolynoms2_[actIndex_][i]*pow(t,(int)i);
00635   }
00636   return 0;
00637 }
00638
00639 int Interpolator::Spline(Vector3<double> &res, double t, unsigned int k)
00640 {
00641   if (!validate(t)) {
00642     BIASERR("invalid values, result is undefined");
00643     res.Set(0.0);
00644     return -1;
00645   }
00646   BIASDOUT(D_INTERPOL_COMMON,"validate returned true");
00647   if (t>KPts_.back()) {
00648     res[0]=listPntDim1_[actIndex_+1];
00649     res[1]=listPntDim2_[actIndex_+1];
00650     res[2]=listPntDim3_[actIndex_+1];
00651     return 1;
00652   }
00653   // if less than 4 control points
00654   if (listPntDim1_.size()<=k) k=listPntDim1_.size()-1;
00655
00656   if (initializedPoly_!=k)
00657     InitSpline(k,3);
00658   res.Set(0.0);
00659   double t0=KPts_[actIndex_], t1= KPts_[actIndex_+1];
00660   double tint1= T_[actIndex_+1];
00661   if (k==3 || k==4) {
00662     t = (t-t0)/(t1-t0) * tint1;
00663   }
00664   BIASDOUT(D_INTERPOL_COMMON,"evaluating result");
00665   for (int i=0;i<listPolynoms1_[actIndex_].size();i++) {
00666     res[0]+=listPolynoms1_[actIndex_][i]*pow(t,(int)i);
00667     res[1]+=listPolynoms2_[actIndex_][i]*pow(t,(int)i);
00668     res[2]+=listPolynoms3_[actIndex_][i]*pow(t,(int)i);
00669   }
00670   return 0;
00671 }
00672
00673 /**
00674     Calculation of the coefficients of the Bezier interpolation
00675     @author Ingo Schiller
00676     @param dimension of control points (int)
00677     @status tested 12.05.03
00678 */
00679
00680 void
00681 Interpolator::InitBezier(int dim_of_CP)
00682 {
00683   //n = number of control points
00684   int n = listPntDim1_.size();
00685   bezierInitialized_ = true;
00686   BIASDOUT(D_INTERPOL_BEZIER,"Number of CPs: "<<n);
00687
00688   double stTanX, stTanY, stTanZ;
00689   double edTanX, edTanY, edTanZ;
00690   if (startTangentX_==-10000) {
00691     stTanX = 0;
00692   } else {
00693     stTanX = startTangentX_;
00694   }
00695   if (startTangentY_==-10000) {
00696     stTanY = 0;
00697   } else {
00698     stTanY = startTangentY_;
00699   }
00700   if (startTangentZ_==-10000) {
00701     stTanZ = 0;
00702   } else {
00703     stTanZ = startTangentZ_;
00704   }
00705   if (endTangentX_==-10000) {
00706     edTanX = 0;
00707   } else {
00708     edTanX = endTangentX_;
00709   }
00710   if (endTangentY_==-10000) {
00711     edTanY = 0;
00712   } else {
00713     edTanY = endTangentY_;
00714   }
00715   if (endTangentZ_==-10000) {
00716     edTanZ = 0;
00717   } else {
00718     edTanZ = endTangentZ_;
00719   }
00720   //set the matrix(row,column)
00721   nmatrix_.Fill(0.0);
00722   nmatrix_[0][0]=-1;
00723   nmatrix_[1][0]=nmatrix_[0][1]=nmatrix_[1][2]=nmatrix_[2][1]=3;
00724   nmatrix_[2][0]=nmatrix_[0][2]=-3;
00725   nmatrix_[1][1]=-6;
00726   nmatrix_[3][0]=nmatrix_[0][3]=1;
00727
00728   BIASDOUT(D_INTERPOL_BEZIER,"NMatrix set");
00729
00730   switch(dim_of_CP){
00731   case 1:
00732     bXK_1_.clear();
00733     bYK_1_.clear();
00734     bXK_1_.reserve(n-1);
00735     bYK_1_.reserve(n-1);
00736
00737
00738     //set X0 according to start- and endtangents
00739     bXK_1_.push_back(listPntDim1_[0]+stTanX);
00740     bYK_1_.push_back(0.0);
00741
00742     // rest of coefficients, Xn not requiered,  Y0 not requiered
00743     for(unsigned int i =1;i<listPntDim1_.size()-1;i++){
00744       bXK_1_.push_back(listPntDim1_[i]+(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00745       bYK_1_.push_back(listPntDim1_[i]-(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00746     }
00747
00748     //Yn according to start- and endtangents
00749     bYK_1_.push_back(listPntDim1_.back()-edTanX);
00750     //Xn to keep the size
00751     bXK_1_.push_back(0.0);
00752     break;
00753
00754   case 2:
00755     bXK_1_.clear();
00756     bXK_2_.clear();
00757     bYK_1_.clear();
00758     bYK_2_.clear();
00759
00760     bXK_1_.reserve(n-1);
00761     bXK_2_.reserve(n-1);
00762     bYK_1_.reserve(n-1);
00763     bYK_2_.reserve(n-1);
00764
00765     //set X0 according to start- and endtangents
00766     bXK_1_.push_back(listPntDim1_[0]+stTanX);
00767     bXK_2_.push_back(listPntDim2_[0]+stTanY);
00768     bYK_1_.push_back(0.0);
00769     bYK_2_.push_back(0.0);
00770
00771     // rest of coefficients, Xn not requiered,Y0 not requiered
00772     for(unsigned int i =1;i<listPntDim1_.size()-1;i++){
00773       bXK_1_.push_back(listPntDim1_[i]+(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00774       bXK_2_.push_back(listPntDim2_[i]+(listPntDim2_[i+1]-listPntDim2_[i-1])/2);
00775       bYK_1_.push_back(listPntDim1_[i]-(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00776       bYK_2_.push_back(listPntDim2_[i]-(listPntDim2_[i+1]-listPntDim2_[i-1])/2);
00777     }
00778
00779     //set Yn according to start tangents
00780     bYK_1_.push_back(listPntDim1_.back()-edTanX);
00781     bYK_2_.push_back(listPntDim2_.back()-edTanY);
00782     //set Xn to keep track of the size
00783     bXK_1_.push_back(0.0);
00784     bXK_2_.push_back(0.0);
00785
00786     BIASDOUT(D_INTERPOL_BEZIER,"Alle koeffizienten berechnet");
00787     break;
00788
00789
00790   case 3:
00791     bXK_1_.clear();
00792     bXK_2_.clear();
00793     bXK_3_.clear();
00794
00795     bYK_1_.clear();
00796     bYK_2_.clear();
00797     bYK_3_.clear();
00798
00799     bXK_1_.reserve(n-1);
00800     bXK_2_.reserve(n-1);
00801     bXK_3_.reserve(n-1);
00802     bYK_1_.reserve(n-1);
00803     bYK_2_.reserve(n-1);
00804     bYK_3_.reserve(n-1);
00805
00806     BIASDOUT(D_INTERPOL_BEZIER,"bXK and bYK resized.");
00807
00808  //set X0 according to start- and endtangents
00809     bXK_1_.push_back(listPntDim1_[0]+stTanX);
00810     bXK_2_.push_back(listPntDim2_[0]+stTanY);
00811     bXK_3_.push_back(listPntDim3_[0]+stTanZ);
00812
00813     bYK_1_.push_back(0.0);
00814     bYK_2_.push_back(0.0);
00815     bYK_3_.push_back(0.0);
00816
00817     // rest of coefficients, Xn not requiered Y0 not requiered
00818     for(unsigned int i =1;i<listPntDim1_.size()-1;i++){
00819       bXK_1_.push_back(listPntDim1_[i]+(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00820       bXK_2_.push_back(listPntDim2_[i]+(listPntDim2_[i+1]-listPntDim2_[i-1])/2);
00821       bXK_3_.push_back(listPntDim3_[i]+(listPntDim3_[i+1]-listPntDim3_[i-1])/2);
00822       bYK_1_.push_back(listPntDim1_[i]-(listPntDim1_[i+1]-listPntDim1_[i-1])/2);
00823       bYK_2_.push_back(listPntDim2_[i]-(listPntDim2_[i+1]-listPntDim2_[i-1])/2);
00824       bYK_3_.push_back(listPntDim3_[i]-(listPntDim3_[i+1]-listPntDim3_[i-1])/2);
00825     }
00826     //set Yn according to start- and endtangents
00827     bYK_1_.push_back(listPntDim1_.back()-edTanX);
00828     bYK_2_.push_back(listPntDim2_.back()-edTanY);
00829     bYK_3_.push_back(listPntDim3_.back()-edTanZ);
00830
00831     // set Xn to keep track of the size
00832     bXK_1_.push_back(0.0);
00833     bXK_2_.push_back(0.0);
00834     bXK_3_.push_back(0.0);
00835
00836     BIASDOUT(D_INTERPOL_BEZIER,"Alle koeffizienten berechnet");
00837
00838     break;
00839   default:
00840     cout<<"WRONG DIMENSION IN BEZIER INTERPOLATION"<<endl;
00841     break;
00842   }
00843 }
00844
00845 /**
00846     1 dimensional case
00847     @status untested 12.05.03
00848     @author Ingo Schiller
00849 */
00850 int Interpolator::Bezier3(double &res, double t)
00851 {
00852   if(!bezierInitialized_)
00853     InitBezier(1);
00854
00855 #ifdef BIAS_DEBUG
00856   int n = listPntDim1_.size(); //= number of control points
00857   int segments = n-1;  // number of segments
00858 #endif
00859   int in_segment = 0; //in which segment is t?
00860
00861   //tvalues
00862   BIAS::Matrix<double> tvector(1,4);
00863   // the used Control points are stored here
00864   BIAS::Matrix<double> cpoints(4,1,0.0);
00865
00866
00867   /**  detection in which segment t is found starting with a segment 0
00868    */
00869   if (!validate(t)) {
00870     BIASERR("invalid values, result is undefined");
00871     res=0;
00872     return -1;
00873   }
00874   in_segment = actIndex_;
00875
00876   //if t > limit return the value of last control point
00877   if(t>KPts_.back()) {
00878     res=listPntDim1_.back();
00879     return 1;
00880   }
00881
00882   // now store the valid points in cpoints
00883   //Pi
00884   cpoints[0][0]= listPntDim1_[in_segment];
00885   //Xi
00886   cpoints[1][0]= bXK_1_[in_segment];
00887   //Yi+1
00888   cpoints[2][0]= bYK_1_[in_segment+1];
00889   //Pi+1
00890   cpoints[3][0]= listPntDim1_[in_segment+1];
00891
00892
00893   //now adjust t according to number of segments
00894   t=(t-KPts_[in_segment])/(KPts_[in_segment+1]-KPts_[in_segment]);
00895
00896   BIASDOUT(D_INTERPOL_BEZIER," t:"<<t<<" Segs:"<<segments);
00897   BIASDOUT(D_INTERPOL_BEZIER,"In Segment:"<<in_segment);
00898
00899 //set the tvector
00900   tvector[0][3] = 1;
00901   tvector[0][2] = t;
00902   tvector[0][1] = pow(t,2);
00903   tvector[0][0] = pow(t,3);
00904
00905   BIASDOUT(D_INTERPOL_BEZIER,"The TVector"<<tvector);
00906   BIASDOUT(D_INTERPOL_BEZIER,"The NMatrix"<<nmatrix_);
00907   BIASDOUT(D_INTERPOL_BEZIER,"The PMatrix"<<cpoints);
00908
00909 //do the Matrix multiplikations
00910   tvector.Mult(nmatrix_);
00911   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult nmatrix.");
00912   tvector.Mult(cpoints);
00913   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult cpoints.");
00914
00915   res = tvector[0][0];
00916
00917   BIASDOUT(D_INTERPOL_BEZIER,"Result : "<<res);
00918
00919   return 0;
00920 }
00921
00922 /**
00923    2 dimensional case
00924    @status tested 28.04.03
00925    @author Ingo Schiller
00926  */
00927
00928 int Interpolator::Bezier3(BIAS::Vector2<double> &res, double t)
00929 {
00930   if(!bezierInitialized_)
00931     InitBezier(2);
00932
00933 #ifdef BIAS_DEBUG
00934   int n = listPntDim1_.size(); //= number of control points
00935   int segments = n-1;  // number of segments
00936 #endif
00937   int in_segment = 0; //in which segment is t?
00938
00939   //tvalues
00940   BIAS::Matrix<double> tvector(1,4);
00941   // the used Control points are stored here
00942   BIAS::Matrix<double> cpoints(4,2,0.0);
00943
00944
00945  /**  detection in which segment t is found starting with a segment 0
00946    */
00947   if (!validate(t)) {
00948     BIASERR("invalid values, result is undefined");
00949     res[0]=0;
00950     res[1]=0;
00951     in_segment = 0;
00952     return -1;
00953   }
00954   else
00955     in_segment = actIndex_;
00956
00957   //if t > limit, return the value of the last control point
00958  if(t>KPts_.back()){
00959     res[0]=listPntDim1_.back();
00960     res[1]=listPntDim2_.back();
00961     return 1;
00962   }
00963
00964   // now store the valid points in cpoints
00965   //Pi
00966   cpoints[0][0]=listPntDim1_[in_segment];
00967   cpoints[0][1]=listPntDim2_[in_segment];
00968   //Xi
00969   cpoints[1][0]= bXK_1_[in_segment];
00970   cpoints[1][1]= bXK_2_[in_segment];
00971   //Yi+1
00972   cpoints[2][0]= bYK_1_[in_segment+1];
00973   cpoints[2][1]= bYK_2_[in_segment+1];
00974   //Pi+1
00975   cpoints[3][0]= listPntDim1_[in_segment+1];
00976   cpoints[3][1]= listPntDim2_[in_segment+1];
00977
00978   //now adjust t according to number of segments
00979   t=(t-KPts_[in_segment])/(KPts_[in_segment+1]-KPts_[in_segment]);
00980
00981   BIASDOUT(D_INTERPOL_BEZIER," t:"<<t<<" Segs:"<<segments);
00982   BIASDOUT(D_INTERPOL_BEZIER,"In Segment:"<<in_segment);
00983
00984 //set the tvectorbXK_2_.size()
00985   tvector[0][3] = 1;
00986   tvector[0][2] = t;
00987   tvector[0][1] = pow(t,2);
00988   tvector[0][0] = pow(t,3);
00989
00990   BIASDOUT(D_INTERPOL_BEZIER,"The TVector"<<tvector);
00991   BIASDOUT(D_INTERPOL_BEZIER,"The NMatrix"<<nmatrix_);
00992   BIASDOUT(D_INTERPOL_BEZIER,"The PMatrix"<<cpoints);
00993
00994 //do the Matrix multiplikations
00995   tvector.Mult(nmatrix_);
00996   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult nmatrix.");
00997   tvector.Mult(cpoints);
00998   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult cpoints.");
00999
01000
01001   res[0] = tvector[0][0];
01002   res[1] = tvector[0][1];
01003
01004   BIASDOUT(D_INTERPOL_BEZIER,"Result : "<<res[0]<<"  "<<res[1]);
01005
01006   return 0;
01007 }
01008
01009
01010 /**
01011    3 dimensional case
01012    @status 28.04.03 tested and working
01013    @author Ingo Schiller
01014  */
01015 int Interpolator::Bezier3(BIAS::Vector3<double> &res, double t)
01016 {
01017   if(!bezierInitialized_)
01018     InitBezier(3);
01019
01020 #ifdef BIAS_DEBUG
01021   int n = listPntDim1_.size(); //= number of control points
01022   int segments = n-1;  // number of segments
01023 #endif
01024   int in_segment = 0; //in which segment is t?
01025
01026   //tvalues
01027   BIAS::Matrix<double> tvector(1,4);
01028   // the used Control points are stored here
01029   BIAS::Matrix<double> cpoints(4,3,0.0);
01030
01031   /**  detection in which segment t is found starting with a segment 0
01032    */
01033   if (!validate(t)) {
01034     BIASERR("invalid values, result is undefined");
01035     res[0] = 0;
01036     res[1] = 0;
01037     res[2] = 0;
01038
01039     return -1;
01040   }
01041   in_segment = actIndex_;
01042
01043   //if t > last control point return value of last control point.
01044   if (t>KPts_.back()){
01045     res[0]=listPntDim1_.back();
01046     res[1]=listPntDim2_.back();
01047     res[2]=listPntDim3_.back();
01048     return 1;
01049   }
01050
01051   // now store the valid points in cpoints
01052   //Pi
01053   cpoints[0][0]=listPntDim1_[in_segment];
01054   cpoints[0][1]=listPntDim2_[in_segment];
01055   cpoints[0][2]=listPntDim3_[in_segment];
01056   //Xi
01057   cpoints[1][0]= bXK_1_[in_segment];
01058   cpoints[1][1]= bXK_2_[in_segment];
01059   cpoints[1][2]= bXK_3_[in_segment];
01060   //Yi+1
01061   cpoints[2][0]= bYK_1_[in_segment+1];
01062   cpoints[2][1]= bYK_2_[in_segment+1];
01063   cpoints[2][2]= bYK_3_[in_segment+1];
01064   //Pi+1
01065   cpoints[3][0]= listPntDim1_[in_segment+1];
01066   cpoints[3][1]= listPntDim2_[in_segment+1];
01067   cpoints[3][2]= listPntDim3_[in_segment+1];
01068
01069   //now adjust t according to number of segments
01070   t=(t-KPts_[in_segment])/(KPts_[in_segment+1]-KPts_[in_segment]);
01071
01072   BIASDOUT(D_INTERPOL_BEZIER," t:"<<t<<" Segs:"<<segments);
01073   BIASDOUT(D_INTERPOL_BEZIER,"In Segment:"<<in_segment);
01074
01075 //set the tvector
01076   tvector[0][3] = 1;
01077   tvector[0][2] = t;
01078   tvector[0][1] = pow(t,2);
01079   tvector[0][0] = pow(t,3);
01080
01081
01082   BIASDOUT(D_INTERPOL_BEZIER,"The TVector"<<tvector);
01083   BIASDOUT(D_INTERPOL_BEZIER,"The NMatrix"<<nmatrix_);
01084   BIASDOUT(D_INTERPOL_BEZIER,"The PMatrix"<<cpoints);
01085
01086 //do the Matrix multiplikations
01087   tvector.Mult(nmatrix_);
01088   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult nmatrix.");
01089   tvector.Mult(cpoints);
01090   BIASDOUT(D_INTERPOL_BEZIER,"tvector mult cpoints.");
01091
01092   res[0] = tvector[0][0];
01093   res[1] = tvector[0][1];
01094   res[2] = tvector[0][2];
01095   BIASDOUT(D_INTERPOL_BEZIER,"Result :"<<res[0]<<" "<<res[1]<<" "<<res[2]);
01096
01097   return 0;
01098
01099 }
01100
01101
01102
01103
01104
01105 int Interpolator::PrepareLuTSpline(double min, double max, unsigned int N,
01106                    unsigned int k)
01107 {
01108
01109   SplineLuT1_.resize(N);
01110   LuTMin1_ = min;
01111   LuTMax1_ = max;
01112   LuTSampleDist1_ = (max-min) / double(N-1);
01113
01114   for (unsigned int i=0;i<N; i++)
01115     Spline(SplineLuT1_[i], min +  double(i) * LuTSampleDist1_, k);
01116
01117 //   for (unsigned int i=0;i<N; i++)
01118 //     cout <<"LuT "<<i<<" : "<<min + double(i) * LuTSampleDist1_<<" -> "
01119 //   <<SplineLuT1_[i]<<endl;
01120
01121   return 0;
01122 }
01123
01124
01125 int Interpolator::SplineFromLuT(double &res, double t) const
01126 {
01127   if (t<LuTMin1_ || t>LuTMax1_) return -1;
01128   int index = (int)rint((t - LuTMin1_) / LuTSampleDist1_);
01129   BIASASSERT(index >=0);
01130   BIASASSERT(index < (int)SplineLuT1_.size());
01131   res = SplineLuT1_[index];
01132   //cout <<"t: "<<t<<" index: "<<index<<" res: "<<res<<endl;
01133   return 0;
01134 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Interpolator.hh Source File

MathAlgo

Interpolator.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_INTERPOLATOR_
00027 #define _BIAS_INTERPOLATOR_
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <vector>
00032 #include "Base/Debug/Debug.hh"
00033 #include "Base/Math/Matrix.hh"
00034 #include "Base/Math/Vector.hh"
00035 #include "Base/Math/Vector2.hh"
00036 #include "Base/Math/Vector3.hh"
00037 #include "Base/Image/Image.hh"
00038
00039
00040 namespace BIAS {
00041   /** @class Interpolator
00042       @ingroup g_mathalgo
00043       @brief this class interpolates a function y=f(t)
00044       between given control points (the y-values)
00045
00046       this class interpolates a function y=f(t)
00047       with different algorithms between given control points (the y-values),
00048       which can be one, two or three dimensional.
00049       Interpolation means, the curve reaches all control points.
00050
00051       usage:
00052       -# SetControlPoints()
00053
00054       -# optional: SetKnotPoints(), if not set the t values range form 0 to 1
00055       such that the controlpoints are uniformly spaced
00056
00057       -# call a Interpolation function, like Spline() or Bezier3()
00058
00059       see also 'Computer Graphics & Geometric Modeling' from David Salomon
00060       @author Daniel Grest, Juli 2002
00061   */
00062 #define D_INTERPOL_SPLINE3 1<<0
00063 #define D_INTERPOL_SPLINE2 1<<1
00064 #define D_INTERPOL_COMMON  1<<2
00065 #define D_INTERPOL_BEZIER  1<<3
00066
00067   class BIASMathAlgo_EXPORT Interpolator : public Debug
00068   {
00069
00070   public:
00071     Interpolator();
00072     Interpolator(const Interpolator &ip)
00073     { operator=(ip); }
00074     ~Interpolator() {};
00075
00076     /** resets everything.
00077         clears all lists and calls constructor
00078     */
00079     void Clear();
00080
00081     /** set the control points, which control the interpolating curve
00082      */
00083     void SetControlPoints(const std::vector<double> &cPnt1){
00084       listPntDim1_=cPnt1;};
00085     void SetControlPoints(const std::vector<BIAS::Vector2<double> > &cPnt);
00086     void SetControlPoints(const std::vector<BIAS::Vector3<double> > &cPnt);
00087     void GetControlPoints(std::vector<double> &cPnt) const {
00088       cPnt=listPntDim1_;};
00089     void GetControlPoints(std::vector<BIAS::Vector2<double> > &cPnt) const;
00090     void GetControlPoints(std::vector<BIAS::Vector3<double> > &cPnt) const;
00091
00092     /** set the additional knot points,
00093         if you want nonuniform interpolation.
00094         Otherwise they will be uniformly spaced.
00095         The values in kPnt must be increasing,
00096         such that kPnt[i]<kPnt[i+1]
00097     */
00098     void SetKnotPoints(const std::vector<double> &kPnt);
00099     void GetKnotPoints(std::vector<double> &kPnt) const{
00100       kPnt=KPts_;};
00101
00102
00103     inline void SetStartTangent(double startTangent){
00104       startTangentX_=startTangent;
00105     };
00106     inline void SetStartTangent(BIAS::Vector2<double> startTangent){
00107       startTangentX_=startTangent[0];startTangentY_=startTangent[1];
00108     };
00109     inline void SetStartTangent(BIAS::Vector3<double> startTangent){
00110       startTangentX_=startTangent[0]; startTangentY_=startTangent[1];
00111       startTangentZ_=startTangent[2];
00112     };
00113     inline void ClearStartTangent(){
00114       startTangentX_=startTangentY_=startTangentZ_=-10000;
00115     };
00116
00117     inline void SetEndTangent(double endTangent){endTangentX_=endTangent;};
00118     inline void SetEndTangent(BIAS::Vector2<double> endTangent){
00119       endTangentX_=endTangent[0];endTangentY_=endTangent[1];};
00120     inline void SetEndTangent(BIAS::Vector3<double> endTangent){
00121       endTangentX_=endTangent[0]; endTangentY_=endTangent[1];
00122       endTangentZ_=endTangent[2];
00123     };
00124     inline void ClearEndTangent(){
00125       endTangentX_=endTangentY_=endTangentZ_=-10000;
00126     };
00127
00128     /** call this for restart at t= first knot point
00129         initiates recalculation of all polynom coeefficients
00130         at first call of Spline()
00131     */
00132     void InitSpline();
00133
00134
00135     /** these functions do the Spline interpolation
00136         which reaches each control point.
00137         k is the degree of the interpolation polynom.
00138         implemented for k=1,2,3,4 (linear, quadratic splines,
00139         cubic splines, akima cubic splines)
00140         If no start or end tangents are set, the end condition is
00141         relaxed for cubic and akima splines.
00142     */
00143     int Spline(double &res, double t, unsigned int k=3);
00144     int Spline(BIAS::Vector2<double> &res, double t, unsigned int k=3);
00145     int Spline(BIAS::Vector3<double> &res, double t, unsigned int k=3);
00146
00147
00148     /** here the calculation of all coefficients for the bezier interpolation
00149         is done and the nmatrix is set
00150         is called by Bezier3() if not called manually
00151         @author Ingo Schiller
00152         @param dimension of Control Points
00153     */
00154     void InitBezier(int dim_of_CP);
00155
00156
00157     /** these functions do the bezier interpolation as described
00158         in David Salomon 4.14.19 which reaches each control point
00159         /////////////////////////////////////////////
00160         IMPORTANT NOTICE:
00161         if the knotpoints are not set, the value of t must be between 0 and 1!
00162         if t > 1 the value of the last controlpoint is returned!
00163         /////////////////////////////////////////////
00164         calculates P(t)= tvector(t)*nmatrix*cpoints
00165         @author Ingo Schiller
00166         @param reference to the result(return value)
00167         @param time t of which value is to be calculated
00168     */
00169
00170     int Bezier3(double &res, double t);
00171     int Bezier3(BIAS::Vector2<double> &res, double t);
00172     int Bezier3(BIAS::Vector3<double> &res, double t);
00173
00174     void DrawBezierCoords2(Image<unsigned char> &img);
00175
00176     /**
00177        @brief Prepare Look-up-Table in range [min,max] with N samples
00178
00179        Prepare a Look-up-Table for spline interpolation in the range
00180        [min,max] with N samples. Use SplineFromLuT() afterwards;
00181        @author evers
00182        @date 2005-04-15
00183     */
00184     int PrepareLuTSpline(double min, double max, unsigned int N,
00185                          unsigned int k=3);
00186
00187     /**
00188        @brief Get spline interpolation using Look-up-Table.
00189        return code is negativ if argument is out of bound os LuT
00190        @author evers
00191        @date 2005-04-15
00192     */
00193     int SplineFromLuT(double &res, double t) const;
00194
00195
00196   protected:
00197     void InitSpline(unsigned int k, unsigned int dim);
00198     void InitLinear(std::vector<BIAS::Vector<double> > &listP,
00199                     std::vector<double> listPnt);
00200     // precalculates all coefficients for the segments
00201     // for polynoms of degree 3
00202     void InitSpline3(std::vector<BIAS::Vector<double> > &listP,
00203                      std::vector<double> listPnt,
00204                      double startTangent=0, double endTangent=0);
00205
00206     // precalculates all coefficients for the segments
00207     // for polynoms of degree 2
00208     void InitSpline2(std::vector<BIAS::Vector<double> > &listP,
00209                      std::vector<double> listPnt,
00210                      double startTangent=0);
00211
00212     // precalculates all coefficients for an akima spline
00213     // of degree 3
00214     void InitSplineAkima(std::vector<BIAS::Vector<double> > &listP,
00215                          std::vector<double> listPnt,
00216                          double startTangent, double endTangent);
00217
00218     // validates important conditions
00219     bool validate(double &t);
00220
00221     //subroutine for akima spline
00222     void fakima(BIAS::Vector<double> &a,
00223                 BIAS::Vector<double> Px, BIAS::Vector<double> Py,
00224                 int from, int to, int intervall);
00225
00226     std::vector<double> KPts_; // knot values for control points
00227     std::vector<double> T_; // knot value intervals for control points
00228     //double tOffset_;  // T_[0] has to be 0, for coefficient calculation
00229
00230     std::vector<double> listPntDim1_; // control points dimension 1
00231     std::vector<double> listPntDim2_; // control points dimension 2
00232     std::vector<double> listPntDim3_; // control points dimension 3
00233
00234     // list of polynom coefficients for dimension 1,2,3
00235     std::vector<BIAS::Vector<double> > listPolynoms1_;
00236     std::vector<BIAS::Vector<double> > listPolynoms2_;
00237     std::vector<BIAS::Vector<double> > listPolynoms3_;
00238
00239     // lists of bezier coefficients for all dimensions
00240     std::vector<double> bXK_1_;
00241     std::vector<double> bXK_2_;
00242     std::vector<double> bXK_3_;
00243
00244     std::vector<double> bYK_1_;
00245     std::vector<double> bYK_2_;
00246     std::vector<double> bYK_3_;
00247     //nmatrix for the calcutaion of the bezier interpolation
00248     BIAS::Matrix<double> nmatrix_;
00249
00250     double startTangentX_;
00251     double startTangentY_;
00252     double startTangentZ_;
00253     double endTangentX_;
00254     double endTangentY_;
00255     double endTangentZ_;
00256
00257     int actIndex_; // the index of the actual intervall for t
00258     // the degree of the polynom for which  was initialized
00259     unsigned int initializedPoly_;
00260     //indicates if InitBezier has been called
00261     bool bezierInitialized_;
00262
00263     std::vector<double> SplineLuT1_;
00264     double LuTMin1_,LuTMax1_, LuTSampleDist1_;
00265
00266   };
00267
00268 }
00269
00270 #include <Base/Common/BIASpragmaEnd.hh>
00271
00272 #endif
00273
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/introduction.dox File Reference

Doc/introduction.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/InvestigateEpipoleEstimation.cpp Source File

Geometry » Examples

InvestigateEpipoleEstimation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "bias_config.h"
00027 #include "Geometry/EpipoleEstimation.hh"
00028 #include "Base/Math/Random.hh"
00029 #include "Base/Geometry/KMatrix.hh"
00030 #include "Base/Geometry/RMatrixBase.hh"
00031 #include "Geometry/FMatrix.hh"
00032 #include "Geometry/PMatrix.hh"
00033 #include "Gui/GuiGTK.hh"
00034 #include "Base/Debug/TimeMeasure.hh"
00035
00036 #include <iostream>
00037 #include <iomanip>
00038
00039 #define EPIPOLE_FACTOR 15.0
00040 #define BACK 0
00041 #define LINE 70
00042 #define MATCH 255
00043
00044 using namespace BIAS;
00045 using namespace std;
00046
00047 // minor noise in camera position
00048 BIAS::RMatrixBase R;
00049 BIAS::KMatrix K, Kinv;
00050 BIAS::HomgPoint2D true_epipole, estimated_epipole, estimated_epipole2, center;
00051 vector<BIAS::HomgPoint2D> match1, match2;
00052
00053 void CreateMatches2(vector<HomgPoint2D>& match1, vector<HomgPoint2D>& match2,
00054                     unsigned int match_count, unsigned int width,
00055                     unsigned int height, double spatial_noise_sigma,
00056                     double r_ang)
00057 {
00058   PMatrix P1, P2;
00059   RMatrixBase R1, R2;
00060   HomgPoint3D C1, C2;
00061   KMatrix K;
00062   K.SetIdentity();
00063   K[0][0]=K[1][1]=840.0;
00064   K[0][2]=(width-1.0)/2.0;
00065   K[1][2]=(height-1.0)/2.0;
00066   R1.SetIdentity();
00067   R2.SetXYZ(r_ang, 0.0, 0.0);
00068   C1.Set(0.0, 0.0, 0.0);
00069   // movement 45 deg to camera plane
00070   // for about 45 centimeter
00071   C2.Set(0.3, 0.0, 0.3);
00072
00073   P1.Compose(K, R1, C1);
00074   P2.Compose(K, R2, C2);
00075
00076   vector<PMatrix> pvec;
00077   pvec.push_back(P1);
00078   pvec.push_back(P2);
00079   //  cout << pvec[0] << "\n" << pvec[1] << endl;
00080
00081   true_epipole = P2 * C1;
00082   true_epipole.Homogenize();
00083
00084   vector<vector<HomgPoint2D> > i_matches, n_matches;
00085   vector<HomgPoint3D> p3d;
00086
00087   CreateMatches(pvec, match_count, width, height, spatial_noise_sigma,
00088                 i_matches, n_matches, p3d, 2.0, -30.0, 30.0, -30.0, 30.0,
00089                 -30.0, 30.0, false);
00090
00091   match1.resize(match_count);
00092   match2.resize(match_count);
00093   for (unsigned i=0; i<match_count; i++){
00094     match1[i]=n_matches[i][0];
00095     match2[i]=n_matches[i][1];
00096     //    cout << n_matches[i][0]<<"\t"<<n_matches[i][1]<<endl;
00097   }
00098   //cout << endl<<endl;
00099 }
00100
00101 void CreateMatches(vector<BIAS::HomgPoint2D>& match1,
00102                    vector<BIAS::HomgPoint2D>& match2,
00103                    unsigned int match_count, BIAS::HomgPoint2D epipole,
00104                    unsigned int width, unsigned int height,
00105                    double maxdisparity, double mindisparity,
00106                    double spatial_noise_sigma)
00107 {
00108   Random ran;
00109   BIAS::HomgPoint2D p1, p2;
00110   double dist, p1epipoledist;
00111
00112
00113   match1.clear();
00114   match2.clear();
00115   p1[2]=p2[2]=1.0;
00116   for (unsigned int i=0; i<match_count; i++){
00117     do {
00118       // create first point per random
00119       p1[0]=ran.GetUniformDistributed(0.0, (double)width-1.0);
00120       p1[1]=ran.GetUniformDistributed(0.0, (double)height-1.0);
00121       // distance from epipole
00122       p1epipoledist=sqrt((epipole[0]-p1[0])*(epipole[0]-p1[0])+
00123                          (epipole[1]-p1[1])*(epipole[1]-p1[1]));
00124       do dist=ran.GetUniformDistributed(mindisparity, maxdisparity);
00125       while (dist>=p1epipoledist);
00126       //cout << p1epipoledist << "  " << dist << endl;
00127       p2[0]=p1[0]+(epipole[0]-p1[0])*dist/p1epipoledist
00128         + ran.GetNormalDistributed(0.0, spatial_noise_sigma);
00129       p2[1]=p1[1]+(epipole[1]-p1[1])*dist/p1epipoledist
00130         + ran.GetNormalDistributed(0.0, spatial_noise_sigma);
00131       // add some noise to camera orientation
00132       p2=K*R*Kinv*p2;
00133       p2.Homogenize();
00134     } while (p2[0]<0.0 || p2[0]>(double)(width-1) ||
00135              p2[1]<0.0 || p2[1]>(double)(height-1));
00136     //cout << setw(4) << i << ":\t"<<p1 << "\t"<<p2 << endl;
00137     match1.push_back(p1);
00138     match2.push_back(p2);
00139   }
00140   //cout << endl;
00141 }
00142
00143 void AddErr(double& mean_ep_dist, double& mean_ang, double& mean_el_dist)
00144 {
00145   mean_ep_dist += estimated_epipole.Distance(true_epipole);
00146
00147   HomgLine2D l1, l2;
00148   vector<HomgPoint2D>::iterator it1, it2;
00149   Matrix3x3<double> E;
00150   double ma=0.0, md=0.0;
00151   int c=0;
00152   E.SetAsCrossProductMatrix(true_epipole);
00153   for (it1=match1.begin(), it2=match2.begin();
00154        it1!=match1.end() && it2!=match2.end(); it1++, it2++, c++){
00155     l1.Set(true_epipole, *it2);
00156     l1.Homogenize();
00157     l2.Set(estimated_epipole, *it2);
00158     l2.Homogenize();
00159     ma+=fabs(atan2(l1[1], l1[0])-atan2(l2[1], l2[0]));
00160     md+=(*it1).ScalarProduct(E*(*it2));
00161   }
00162   mean_ang=ma/(double)c;
00163   mean_el_dist=md/(double)c;
00164 }
00165
00166 int main(int argc, char *argv[])
00167 {
00168   ofstream os("errcp3.txt");
00169   ofstream os2("errls3.txt");
00170   Random ran;
00171   double spatial_noise_sigma=0.0;
00172   double max_disparity=50.0;
00173   double mindisparity=2.0;
00174   unsigned int match_count=80;
00175   unsigned int width=640, height=480;
00176   int count=100;
00177   double mean_ep_dist_ls, mean_ep_dist_cp, mean_ang_ls, mean_ang_cp;
00178   double mean_el_dist_ls, mean_el_dist_cp;
00179   EpipoleEstimation ee;
00180   TimeMeasure tc;
00181   //double cf=1000/(2.4*1024*1024*1024);
00182   //cerr <<cf<<endl;
00183   center.Set(width/2, height/2);
00184
00185   if (argc>=2) match_count=atoi(argv[1]);
00186   if (argc>=3) spatial_noise_sigma=atof(argv[2]);
00187
00188   K.Fill(0.0);
00189   K[0][0]=K[1][1]=840.0;
00190   K[0][2]=double(width)/2.0;
00191   K[1][2]=double(height)/2.0;
00192   K[2][2]=1.0;
00193   Kinv=K.Invert();
00194
00195   true_epipole[2]=1.0;
00196   true_epipole[0]=
00197     ran.GetUniformDistributed(-EPIPOLE_FACTOR*(double)width,
00198                               (EPIPOLE_FACTOR+1.0)*(double)width);
00199   true_epipole[1]=ran.GetUniformDistributed(-EPIPOLE_FACTOR*(double)height,
00200                                             EPIPOLE_FACTOR+1.0*(double)height);
00201
00202   CreateMatches2(match1, match2, match_count, width, height,
00203                        spatial_noise_sigma, 0.0);
00204
00205   os <<"# EpipoleEstimationCrossProduct\n"
00206      <<"# true epipole: "<<true_epipole[0]<<" "<<true_epipole[1]
00207      <<" "<<true_epipole[2]<<endl
00208      <<"# "<<match_count<<" matches"
00209      <<"\n# max disparity: "<<max_disparity
00210      <<"\n# min disparity: "<<mindisparity<<endl;
00211   os2 <<"# EpipoleEstimationCrossProduct\n"
00212       <<"# true epipole: "<<true_epipole[0]<<" "<<true_epipole[1]
00213       <<" "<<true_epipole[2]<<endl
00214       <<"# "<<match_count<<" matches"
00215       <<"\n# max disparity: "<<max_disparity
00216       <<"\n# min disparity: "<<mindisparity<<endl;
00217
00218   double err_r;
00219
00220   for (spatial_noise_sigma=0.0; spatial_noise_sigma<1.05;
00221        spatial_noise_sigma+=0.1){
00222     os <<endl<<endl<<"# spatial noise: "<<spatial_noise_sigma
00223        <<"\n# spat-nois\trot-err(DEG)\trot-err(RAD)\tabs-dist-err"
00224        <<"\tabs-angle-err\tabs-el-dist-err\n";
00225     os2 <<endl<<endl<<"# spatial noise: "<<spatial_noise_sigma
00226         <<"\n# spat-nois\trot-err(DEG)\trot-err(RAD)\tabs-dist-err"
00227        <<"\tabs-angle-err\tabs-el-dist-err\n";
00228     for (err_r=1e-3; err_r<=0.5; err_r*=2.0){
00229       mean_ep_dist_ls = mean_ep_dist_cp = mean_ang_ls = mean_ang_cp =
00230         mean_el_dist_ls = mean_el_dist_cp = 0.0;
00231       for (int c=0; c<count; c++){
00232         CreateMatches2(match1, match2, match_count, width, height,
00233                        spatial_noise_sigma, err_r);
00234
00235         if (ee.CrossProductLeastSquaresSVD(match1,match2,
00236                                            estimated_epipole)!=0){
00237           BIASERR("error estimating epipole");
00238           return 0;
00239         }
00240         AddErr(mean_ep_dist_cp, mean_ang_cp, mean_el_dist_cp);
00241
00242         if (ee.MatchLengthWeightedLeastSquares(match1, match2,
00243                                                estimated_epipole)!=0){
00244           BIASERR("error estimating epipole");
00245           return 0;
00246         }
00247         AddErr(mean_ep_dist_ls, mean_ang_ls, mean_el_dist_ls);
00248
00249         cout <<".";
00250         cout.flush();
00251       } // for (int c=0; c<count; c++){
00252       mean_ep_dist_ls /= count;
00253       mean_ep_dist_cp /= count;
00254       mean_ang_ls /= count;
00255       mean_ang_cp /= count;
00256       mean_el_dist_ls /= count;
00257       mean_el_dist_cp /= count;
00258
00259       os2 <<setw(6)<<spatial_noise_sigma<< "\t"<< setw(6) << err_r/2/M_PI*360
00260          << setw(12) << err_r << "\t" << setw(12)
00261          <<mean_ep_dist_ls << "\t" << setw(12)
00262          <<mean_ang_ls<<"\t"<<mean_el_dist_ls<<endl;
00263
00264       os <<setw(6)<<spatial_noise_sigma<< "\t"<< setw(6) << err_r/2/M_PI*360
00265           << setw(12) <<err_r << "\t" << setw(12)
00266           <<mean_ep_dist_cp << "\t" << setw(12)
00267          <<mean_ang_cp<<"\t"<<mean_el_dist_cp<<endl;
00268
00269       cout <<endl;
00270       cout <<setw(12)<<spatial_noise_sigma<<setw(12)<<err_r<<"\t"<<setw(12)
00271            <<mean_ep_dist_ls
00272            << "\t"<<setw(12)<<mean_ang_ls<<"\t"<<mean_el_dist_ls<<endl;
00273       cout <<setw(12)<<spatial_noise_sigma<<setw(12)<<err_r<<"\t"<<setw(12)
00274            <<mean_ep_dist_cp
00275            << "\t"<<setw(12)<<mean_ang_cp<<"\t"<<mean_el_dist_cp<<endl;
00276     }
00277   }
00278   os2.close();
00279   os.close();
00280   return 0;
00281 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Kalman.cpp Source File

StateEstimator

Kalman.cpp

Go to the documentation of this file.
00001 #include <StateEstimator/Kalman.hh>
00002
00003 #include <Base/Common/BIASpragma.hh>
00004
00005 using namespace BIAS;
00006 using namespace std;
00007
00008
00009
00010 Kalman::Kalman()
00011 {
00012   SystemStateDim_=MeasurementDim_=0;
00013 }
00014
00015 Kalman::Kalman(const Matrix<double>& SystemMatrix,
00016                const Matrix<double>& MeasurementMatrix,
00017                const Vector<double>& InitialSystemState,
00018                const Matrix<double>& InitialSystemCovariance)
00019 {
00020   Init(SystemMatrix, MeasurementMatrix, InitialSystemState,
00021        InitialSystemCovariance);
00022 }
00023
00024 Kalman::~Kalman()
00025 {}
00026
00027 void Kalman::Init(const Matrix<double>& SystemMatrix,
00028                   const Matrix<double>& MeasurementMatrix,
00029                   const Vector<double>& InitialSystemState,
00030                   const Matrix<double>& InitialSystemCovariance)
00031 {
00032   State_ = InitialSystemState;
00033   Covariance_ = InitialSystemCovariance;
00034   SystemStateDim_ = InitialSystemState.size();
00035   MeasurementDim_ = MeasurementMatrix.num_rows();
00036
00037   A_ = SystemMatrix;
00038   AT_ = A_.Transpose();
00039   H_ = MeasurementMatrix;
00040   HT_ = H_.Transpose();
00041
00042   Identity_.newsize(SystemStateDim_, SystemStateDim_);
00043   Identity_.SetIdentity();
00044
00045   BIASASSERT(A_.num_cols()==SystemStateDim_);
00046   BIASASSERT(A_.num_rows()==SystemStateDim_);
00047
00048   BIASASSERT(H_.num_cols()==SystemStateDim_);
00049 }
00050
00051 void Kalman::Predict(const Matrix<double>& ProcessCovariance)
00052 {
00053   BIASASSERT(A_.num_cols()!=0);
00054   BIASASSERT(A_.num_rows()!=0);
00055   State_ = A_ * State_;
00056   Covariance_ = A_ * Covariance_ * AT_ + ProcessCovariance;
00057 }
00058
00059 void Kalman::Predict(const Matrix<double>& SystemMatrix,
00060                      const Matrix<double>& ProcessCovariance)
00061 {
00062   A_=SystemMatrix;
00063
00064   BIASASSERT(A_.num_cols()==SystemStateDim_);
00065   BIASASSERT(A_.num_rows()==SystemStateDim_);
00066
00067   AT_=A_.Transpose();
00068
00069   Predict(ProcessCovariance);
00070 }
00071
00072 void Kalman::Update(const Vector<double>& Measurement,
00073                     const Matrix<double>& MeasurementCovariance)
00074 {
00075   BIASASSERT(Measurement.size()==MeasurementDim_);
00076   BIASASSERT(MeasurementCovariance.num_cols()==MeasurementDim_);
00077   BIASASSERT(MeasurementCovariance.num_rows()==MeasurementDim_);
00078
00079   Matrix<double> denominator;
00080   denominator = H_ * Covariance_ * HT_ + MeasurementCovariance;
00081   Matrix<double> inv;
00082   inv = svd_.Invert(denominator);
00083
00084   Matrix<double> K;
00085   K = Covariance_ * HT_ * inv;
00086
00087   State_ = State_ + K*(Measurement - H_*State_);
00088
00089   Covariance_ = (Identity_ - K * H_) * Covariance_;
00090 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: StateEstimator/Kalman.hh Source File

StateEstimator

Kalman.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Kalman_hh__
00027 #define __Kalman_hh__
00028
00029 #include <Base/Debug/Debug.hh>
00030 #include <Base/Math/Matrix.hh>
00031 #include <Base/Math/Vector.hh>
00032 #include <MathAlgo/SVD.hh>
00033
00034 namespace BIAS {
00035
00036   /** Classical Kalman filter. See
00037       http://www.cs.unc.edu/~welch/kalman/
00038       for details.
00039
00040       Initialize it by either
00041       - either calling Init
00042       - or calling the approbriate constructor
00043       with the initial system state, the system matrix and the measurement
00044       matrix.
00045
00046       Use it by consecutively call
00047       - Predict()
00048       - Update()
00049
00050       Extract the prediction (prior) by calling GetState() and
00051       GetCovariance() after the Predict() step.
00052
00053       Extract the estimated system state by calling GetState() and
00054       GetCovariance() after the Update() step.
00055
00056
00057
00058       @author Felix Woelk 05/2005, untested so far */
00059   class BIASStateEstimator_EXPORT Kalman : public Debug
00060   {
00061   public:
00062     Kalman();
00063
00064     Kalman(const Matrix<double>& SystemMatrix,
00065            const Matrix<double>& MeasurementMatrix,
00066            const Vector<double>& InitialSystemState,
00067            const Matrix<double>& InitialSystemCovariance);
00068
00069     ~Kalman();
00070
00071     void Init(const Matrix<double>& SystemMatrix,
00072               const Matrix<double>& MeasurementMatrix,
00073               const Vector<double>& InitialSystemState,
00074               const Matrix<double>& InitialSystemCovariance);
00075
00076     /** Calculates the prediction using the system matrix A
00077         @author woelk 05/2005 */
00078     void Predict(const Matrix<double>& ProcessCovariance);
00079
00080     /** Use this prediction function system in case of varying system matrix A.
00081         @author woelk 05/2005 */
00082     void Predict(const Matrix<double>& SystemMatrix,
00083                  const Matrix<double>& ProcessCovariance);
00084
00085     /** Calculates the update step.
00086         @author woelk 05/2005 */
00087     void Update(const Vector<double>& Measurement,
00088                 const Matrix<double>& MeasurementCovariance);
00089
00090     /** Returns the system state. It could be the prediction, if called after
00091         the predict step or the posterior, if GetState is called after
00092         the update step.
00093         @author woelk 05/2005 */
00094     inline void GetState(Vector<double>& state) const
00095     { state = State_; }
00096
00097     /** Returns the system state covariance. It could be the covariance of the
00098         prediction, if called after the predict step or the covariance of the
00099         posterior, if GetState is called after the update step.
00100         @author woelk 05/2005 */
00101     inline void GetCovariance(Matrix<double>& cov) const
00102     { cov = Covariance_; }
00103
00104   protected:
00105     /// Contains either the prediction (prior) or Bayes optimal system estimate
00106     /// (posterior) depending what function (Predict()/Update()) wascalled last
00107     Vector<double> State_;
00108     /// The covariance matrix corresponding to State_
00109     Matrix<double> Covariance_;
00110
00111     /// measurement matrix and transposed
00112     Matrix<double> H_, HT_;
00113
00114     /// measurement matrix and transposed
00115     Matrix<double> A_, AT_;
00116
00117     /// identity matrix
00118     Matrix<double> Identity_;
00119
00120     /// dimensions of system space and measurement space
00121     int SystemStateDim_, MeasurementDim_;
00122
00123     /// needed for matrix inversion
00124     SVD svd_;
00125
00126   }; // class
00127
00128
00129
00130 } // namespace
00131
00132
00133 #endif // __Kalman_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/KMatrix.cpp Source File

Base » Geometry

KMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "KMatrix.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 KMatrix KMatrix::Invert() const
00032 {
00033     KMatrix Kinv;
00034     Kinv.SetIdentity();
00035     Kinv[0][0] = 1.0 / (*this)[0][0];
00036     Kinv[1][1] = 1.0 / (*this)[1][1];
00037     Kinv[0][1] = - (*this)[0][1]/((*this)[0][0] * (*this)[1][1]);
00038     Kinv[0][2] = ((*this)[0][1] * (*this)[1][2])/
00039         ((*this)[0][0] * (*this)[1][1]) - (*this)[0][2]/(*this)[0][0];
00040     Kinv[1][2] = -  (*this)[1][2] / (*this)[1][1];
00041     return Kinv;
00042 }
00043
00044
00045
00046
00047 // JW
00048 KMATRIX_TYPE KMatrix::GetFx() const { return (*this)[0][0]; }
00049 void KMatrix::SetFx(const KMATRIX_TYPE & val) { (*this)[0][0]=val; }
00050
00051 KMATRIX_TYPE KMatrix::GetFy() const { return (*this)[1][1]; }
00052 void KMatrix::SetFy(const KMATRIX_TYPE & val) { (*this)[1][1]=val; }
00053
00054 KMATRIX_TYPE KMatrix::GetSkew() const {return (*this)[0][1]; }
00055 void KMatrix::SetSkew(const KMATRIX_TYPE & val) { (*this)[0][1]=val; }
00056
00057 KMATRIX_TYPE KMatrix::GetHx() const { return (*this)[0][2]; }
00058 void KMatrix::SetHx(const KMATRIX_TYPE & val) { (*this)[0][2]=val; }
00059
00060 KMATRIX_TYPE KMatrix::GetHy() const { return (*this)[1][2]; }
00061 void KMatrix::SetHy(const KMATRIX_TYPE & val)  { (*this)[1][2]=val; }
00062
00063
00064 // JW
00065 void KMatrix::Set(const KMATRIX_TYPE & fx
00066                   ,const KMATRIX_TYPE & fy
00067                   ,const KMATRIX_TYPE & hx
00068                   ,const KMATRIX_TYPE & hy
00069                   ,const KMATRIX_TYPE & skew)
00070 {
00071     SetIdentity();
00072     SetFx(fx);
00073     SetFy(fy);
00074     SetHx(hx);
00075     SetHy(hy);
00076
00077     SetSkew(skew);
00078 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/KMatrix.hh Source File

Base » Geometry

KMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __KMatrix_hh__
00027 #define __KMatrix_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Math/Matrix3x3.hh>
00031
00032 #define KMATRIX_TYPE double
00033
00034 namespace BIAS{
00035   /** @class KMatrix
00036       @ingroup g_geometry
00037       @brief
00038       K describes the mapping from world coordinates (wcs) to pixel
00039       coordinates (pcs).
00040       To remember:
00041       (1) (R' | -R' C) projects a homgenous 3D (scene) point from wcs to
00042                        2d ics.
00043       (2) K            transfroms a 2d scene point from ics to pcs
00044                        (pixel coordinates) (which is mainly shift of origin
00045                         + scale).
00046       @author Jan Woetzel
00047   */
00048   class BIASGeometryBase_EXPORT KMatrix : public Matrix3x3<KMATRIX_TYPE>
00049   {
00050   public:
00051     KMatrix() : Matrix3x3<KMATRIX_TYPE>() {};
00052
00053     /** constructor setting identity or zero
00054         @brief author koeser **/
00055     explicit KMatrix(const MatrixInitType& i) :
00056       Matrix3x3<KMATRIX_TYPE>(i) {};
00057
00058     KMatrix(const Matrix3x3<KMATRIX_TYPE>& A) : Matrix3x3<KMATRIX_TYPE>(A) {};
00059
00060     ~KMatrix() {};
00061
00062     /** returns analyticaly inverted matrix */
00063     KMatrix Invert() const;
00064
00065     /** get and set data members by verbose names.
00066         fx  skew  hx
00067         0   fy    hy
00068         0   0     1
00069         @author JW 2005 */
00070     void Set(const KMATRIX_TYPE & fx
00071         ,const KMATRIX_TYPE & fy
00072         ,const KMATRIX_TYPE & hx
00073         ,const KMATRIX_TYPE & hy
00074         ,const KMATRIX_TYPE & skew=KMATRIX_TYPE(0) );
00075
00076     KMATRIX_TYPE GetFx() const;
00077     void SetFx(const KMATRIX_TYPE & val);
00078
00079     KMATRIX_TYPE GetFy() const;
00080     void SetFy(const KMATRIX_TYPE & val);
00081
00082     KMATRIX_TYPE GetSkew() const;
00083     void SetSkew(const KMATRIX_TYPE & val);
00084
00085     KMATRIX_TYPE GetHx() const;
00086     void SetHx(const KMATRIX_TYPE & val);
00087
00088     KMATRIX_TYPE GetHy() const;
00089     void SetHy(const KMATRIX_TYPE & val);
00090
00091   };
00092
00093 } // namespace
00094
00095
00096 #endif // __KMatrix_hh__
00097
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Label.cpp Source File

Filter

Label.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00027 #endif
00028
00029 #include <limits.h>
00030 #include <stdio.h>
00031 #include "Label.hh"
00032
00033 #include <Base/Image/ImageIO.hh>
00034 #include <Base/Image/ImageConvert.hh>
00035
00036 #include <algorithm>
00037
00038 #include <Base/Common/BIASpragma.hh>
00039 #include <MathAlgo/Median1D.hh>
00040
00041 #define ERR_ILLT 0 /* Datenstruktur wird nicht unterstuetzt */
00042 #define ERR_ILLI 1 /* Datentyp wird nicht unterstuetzt */
00043 #define ERR_NOLB 0 /*  Zu viele Gebiete */
00044
00045 #define MAX_SEG UCHAR_MAX
00046 #define MAX_LAB USHRT_MAX
00047
00048 #define SEGDEF 1
00049
00050 using namespace BIAS;
00051 using namespace std;
00052
00053
00054
00055 Label::Label()
00056 {
00057   LabelInitialized_=false;
00058   *_FilterBorderHandling=TBH_same;
00059   //AddDebugLevel(D_LABEL);
00060 }
00061
00062 Label::~Label()
00063 {}
00064
00065
00066 void Label::LabelInit_(const Image<LABEL_CALC_TYPE>& Image)
00067 {
00068   BIASDOUT(D_INIT,"LabelInit_()");
00069   unsigned int UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
00070   Image.GetROI()->GetCorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00071   LabelSumImage_.Init(LowerRightX - UpperLeftX, LowerRightY - UpperLeftY);
00072   LabelResultImage_.Init(LowerRightX - UpperLeftX,
00073                          LowerRightY - UpperLeftY);
00074   LabelInitialized_=true;
00075 }
00076
00077 void Label::LabelInit_(const Image<unsigned char>& Image)
00078 {
00079   BIASDOUT(D_INIT,"LabelInit_()");
00080   unsigned int UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
00081   Image.GetROI()->GetCorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00082   LabelSumImage_.Init(LowerRightX - UpperLeftX, LowerRightY - UpperLeftY);
00083   LabelResultImage_.Init(LowerRightX - UpperLeftX,
00084                          LowerRightY - UpperLeftY);
00085   LabelInitialized_=true;
00086 }
00087
00088
00089 void Label::LabelRelease_()
00090 {
00091     BIASDOUT(D_INIT,"LabelShortRelease_()");
00092     LabelSumImage_.Release();
00093     LabelResultImage_.Release();
00094     LabelInitialized_=false;
00095 }
00096
00097
00098
00099 int Label::Label4Neighbour_()
00100 {
00101   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Label::Label4Neighbour_\n");
00102   int nx, ny, i, k, no_seg, lab_seg2, lab_segv, no_all, *seg_list = NULL;
00103   register int value, lab_seg1;
00104   register LABEL_CALC_TYPE *adr, *adr_out;
00105   // initialize
00106   try { seg_list = new int[MAX_LAB]; }
00107   catch (bad_alloc) { BIASERR("new failed "); }
00108   nx = LabelSumImage_.GetWidth();
00109   ny = LabelSumImage_.GetHeight();
00110   adr = LabelSumImage_.GetImageData();
00111   adr_out = LabelResultImage_.GetImageData();
00112   no_seg = 0;
00113
00114   /*****
00115    *
00116    *     FIRST LINE
00117    *
00118    *****/
00119   adr++;
00120   *adr_out++ = 0;
00121   seg_list[0] = SEGDEF;
00122   lab_seg1 = 0;
00123   for ( k = nx-1 ; k > 0 ; k--)
00124     {
00125       if (*adr != *(adr-1))
00126         {
00127           no_seg++;
00128           seg_list[no_seg] = SEGDEF;
00129           lab_seg1 = no_seg;
00130         };
00131       adr++;
00132       *adr_out++ = lab_seg1;
00133     };
00134
00135   /*****
00136    *
00137    *     NEXT LINES
00138    *
00139    *****/
00140   for ( i = ny-1 ; i > 0 ; i--)
00141     {
00142
00143       /*****
00144        *
00145        *     FIRST PIXEL
00146        *
00147        *****/
00148       value = *adr;
00149       lab_seg1 = -1;
00150       if ( *(adr-nx) == value ) lab_seg1 = *(adr_out-nx);
00151
00152       if ( lab_seg1 == -1 )
00153         {
00154           no_seg++;
00155           seg_list[no_seg] = SEGDEF;
00156           lab_seg1 = no_seg;
00157         };
00158       adr++;
00159       adr_out++;
00160
00161       /*****
00162        *
00163        *     CHECK LABEL OF NEXT PIXELS
00164        *
00165        *****/
00166       lab_segv = lab_seg1;
00167       for ( k = nx-1 ; k > 0; k--)
00168         {
00169           lab_seg1 = -1;
00170           lab_seg2 = *(adr_out-nx);
00171           value = *adr;
00172           if ( *(adr-1) == value)
00173             {
00174               lab_seg1 = lab_segv;
00175             }
00176           else if ( *(adr-nx) == value)
00177             {
00178               lab_seg1 = *(adr_out-nx);
00179             };
00180           /*****
00181            *
00182            *     NEW REGION ?
00183            *
00184            *****/
00185           if ( lab_seg1 == -1)
00186             {
00187               no_seg++;
00188               seg_list[no_seg] = SEGDEF;
00189               lab_seg1 = no_seg;
00190               if (no_seg > MAX_LAB) {
00191                 BIASERR("error: too many blobs " << ERR_NOLB);
00192               }
00193             };
00194
00195           /*****
00196            *
00197            *     ACTUALIZE REGION LINE
00198            *
00199            *****/
00200           *(adr_out-1) = lab_segv;
00201           lab_segv = lab_seg1;
00202
00203           /*****
00204            *
00205            *     CHECK REGION MERGING
00206            *
00207            *****/
00208           if ( k != 1 && value == *(adr-nx) && lab_seg1 != lab_seg2)
00209             {
00210               int m;
00211               seg_list[lab_seg2] = -lab_seg1-1;
00212               for ( m = nx ; m > 0; m--)
00213                 {
00214                   if ( *(adr_out-m) == lab_seg2)
00215                     *(adr_out-m) = lab_seg1;
00216                 };
00217               lab_segv = lab_seg1;
00218             };
00219
00220           adr_out++;
00221           adr++;
00222         };
00223       *(adr_out-1) = lab_segv;
00224     };
00225
00226   /*****
00227    *
00228    *     GET NEW LABEL
00229    *
00230    *****/
00231   no_all = 0;
00232   for ( i = 0; i <= no_seg ; i++)
00233     {
00234       if (seg_list[i] == SEGDEF)
00235         {
00236           seg_list[i] = no_all;
00237           no_all++;
00238         };
00239     };
00240
00241   /*****
00242    *
00243    *     LABEL MERGED REGIONS
00244    *
00245    *****/
00246   for ( i = 0; i <= no_seg ; i++)
00247     {
00248       int ind;
00249       ind = i;
00250       while (seg_list[ind] < 0 )
00251         {
00252           ind = -seg_list[ind]-1;
00253         };
00254       seg_list[i] = seg_list[ind];
00255     };
00256
00257   /*****
00258    *
00259    *     NEW IMAGE-LABEL
00260    *
00261    *****/
00262   adr_out = LabelResultImage_.GetImageData();
00263   for ( i = nx*ny ; i > 0 ; i--)
00264     {
00265       *adr_out = seg_list[*adr_out];
00266       adr_out++;
00267     };
00268
00269   delete [] seg_list;
00270   return (no_all);
00271 }
00272
00273
00274
00275 int Label::Label4Neighbour(const BIAS::Image<LABEL_CALC_TYPE>& Image,
00276                            BIAS::Image<LABEL_CALC_TYPE>& DestinationImage)
00277 {
00278   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Label::Label4Neighbour\n");
00279   int CornerCount=0;
00280   if (!LabelInitialized_){
00281     LabelInit_(Image);
00282   }
00283   if ( ! Image.SamePixelAndChannelCount(LabelSumImage_) ){
00284     LabelRelease_();
00285     LabelInit_(Image);
00286   }
00287   Image.GetCopyOfROI(LabelSumImage_);
00288
00289   CornerCount = Label4Neighbour_();
00290
00291   DestinationImage.Paste2ROI(LabelResultImage_);
00292
00293   return CornerCount;
00294 }
00295
00296
00297 int Label::Label4Neighbour(const Image<unsigned char>& image,
00298                            Image<unsigned char>& DestinationImage)
00299 {
00300   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Label::Label4Neighbour\n");
00301   int CornerCount=0;
00302
00303   if (!LabelInitialized_)
00304     LabelInit_(image);
00305
00306
00307   if ( ! image.SamePixelAndChannelCount(LabelSumImage_) ){
00308     LabelRelease_();
00309     LabelInit_(image);
00310   }
00311
00312   // explicit cast
00313   Image<unsigned char> roi;
00314   image.GetCopyOfROI(roi);
00315   ImageConvert::ConvertST(roi, LabelSumImage_, LABEL_STORAGE_TYPE);
00316
00317   //      ImageIO::Write("labelsumimage.",LabelSumImage_);
00318
00319
00320   CornerCount = Label4Neighbour_();
00321
00322   if (CornerCount > MAX_SEG){
00323     BIASERR("Label::Label4Neighbour() Segmentzahl "
00324             << CornerCount <<" der Label zu gross\n");
00325     CornerCount = MAX_SEG;
00326   }
00327
00328   DestinationImage.Paste2ROI(LabelResultImage_);
00329
00330   return CornerCount;
00331 }
00332
00333 int Label::Process(const Image<unsigned char>& im)
00334 {
00335   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Label::Process\n");
00336   if  (!LabelInitialized_)
00337     LabelInit_(im);
00338
00339   Image<unsigned char> roiImg;
00340   im.GetCopyOfROI(roiImg);
00341   unsigned minx, miny, maxx, maxy;
00342   im.GetROI()->GetCorners(minx, miny, maxx, maxy);
00343   /*static int coun=0;
00344     ostringstream os("");
00345     os << setw(4)<<setfill('0')<<coun;
00346     ImageIO::Write("roi-"+os.str()+".mip", roiImg);*/
00347   if (!LabelResultImage_.SamePixelAndChannelCount(roiImg) ) {
00348     LabelRelease_();
00349     LabelInit_(roiImg);
00350   }
00351   ImageConvert::ConvertST( roiImg, LabelSumImage_ ,LABEL_STORAGE_TYPE);
00352   //  ImageIO::Write("lsi-"+os.str()+".mip", LabelSumImage_);
00353
00354   int width, height;
00355   width=LabelResultImage_.GetWidth();
00356   height=LabelResultImage_.GetHeight();
00357   BIASCDOUT(D_LABEL, "image size: "<<width<<"x"<<height<<endl);
00358   //LabelResultImage_.FillImageWithConstValue(0);
00359   //coun++;
00360   int count = Label4Neighbour_();
00361   //ImageIO::Write("lri-"+os.str()+".mip", LabelResultImage_);
00362
00363   BIASCDOUT(D_LABEL, "found "<<count<<" blobs\n");
00364   BlobCount_.clear();
00365   BlobMap_.clear();
00366   TopLefts_.clear();
00367   BotRights_.clear();
00368   Centers_.clear();
00369   MedianCenters_.clear();
00370
00371   if (count<=0) {
00372     BlobCount_.push_back(0);
00373   } else {
00374     //ImageIO::Write("sim.mip", LabelResultImage_);
00375     // initialize data structs
00376     BlobCount_.resize(count-1);
00377     TopLefts_.resize(count-1);
00378     BotRights_.resize(count-1);
00379     Centers_.resize(count-1);
00380     MedianCenters_.resize(count-1);
00381     SortVec_.resize(count);
00382     Num_.clear();
00383     for (int n=0; n<count; n++){
00384       SortVec_[n].bc=0;
00385       SortVec_[n].tl.Set(width, height);
00386       SortVec_[n].br.Set(0, 0);
00387       SortVec_[n].center.Set(0.0, 0.0);
00388       SortVec_[n].x.clear();
00389       SortVec_[n].y.clear();
00390     }
00391     // now get values
00392     LABEL_CALC_TYPE **ida=LabelResultImage_.GetImageDataArray();
00393     LABEL_CALC_TYPE c;
00394     unsigned int i;
00395     for (int y=0; y<height; y++){
00396       for (int x=0; x<width; x++){
00397         c=ida[y][x];
00398         // find the correct SortVec index
00399         i=0;
00400         while (i<Num_.size() && Num_[i]!=c) i++;
00401         // create SortVec it if not found
00402         if (i==Num_.size()) Num_.push_back(c);
00403         // fill SortVec_[i]
00404         /*if (SortVec_[i].bc>10000){
00405           cout << SortVec_[i].bc<<" : c: "<<c<<"\ti="<<i<<"  "<<Num_.size()
00406           <<" "<<SortVec_.size()<<endl;
00407           }*/
00408         SortVec_[i].bc++; // BlobCount_[i]++;
00409         SortVec_[i].center += Vector2<double>((double)x, (double)y);
00410         SortVec_[i].x.push_back(x);
00411         SortVec_[i].y.push_back(y);
00412         if (SortVec_[i].tl[0]>x) SortVec_[i].tl[0]=x;
00413         if (SortVec_[i].tl[1]>y) SortVec_[i].tl[1]=y;
00414         if (SortVec_[i].br[0]<x) SortVec_[i].br[0]=x;
00415         if (SortVec_[i].br[1]<y) SortVec_[i].br[1]=y;
00416       }
00417     }
00418
00419     sort(SortVec_.begin(), SortVec_.end());
00420     const Vector2<double> offset((double)minx, (double)miny);
00421     BIASCDOUT(D_LABEL, "neglecting bg label: "<<SortVec_[0].center <<"\t"
00422               << (double)SortVec_[0].bc << "\t"<<SortVec_[0].tl<<"\t"
00423               << SortVec_[0].br
00424               << (SortVec_[0].center / (double)SortVec_[0].bc) <<"\t"
00425               <<endl);
00426     static Median1D<int> med;
00427     double mx, my;
00428     for (int i=1, j=0; i<count; i++, j++){
00429       BlobCount_[j]=SortVec_[i].bc;
00430       BlobMap_[i]=SortVec_[i].bc;
00431       TopLefts_[j]=SortVec_[i].tl;
00432       BotRights_[j]=SortVec_[i].br;
00433       Centers_[j] = (SortVec_[i].center / (double)SortVec_[i].bc) + offset;
00434       med.Compute(SortVec_[i].x);
00435       mx = (double)med.GetMedian() + offset[0];
00436       med.Compute(SortVec_[i].y);
00437       my = (double)med.GetMedian() + offset[1];
00438       MedianCenters_[j] = Vector2<double>(mx, my);
00439       //cout << "c: "<<Centers_[j]<<"\tmc: "<<MedianCenters_[j]<<endl;
00440       BIASCDOUT(D_LABEL, SortVec_[i].center <<"\t"
00441                 << (double)SortVec_[i].bc << "\t"<<Centers_[j] <<"\t"
00442                 << SortVec_[i].tl <<"\t"<< SortVec_[i].br<< "\t"
00443                 << (SortVec_[i].center / (double)SortVec_[i].bc) <<"\n");
00444     }
00445   }
00446   return 0;
00447 }
00448
00449 int Label::Filter(const Image<unsigned char>& src, Image<unsigned char>& dst)
00450 {
00451   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Label::Filter\n");
00452
00453   Process(src);
00454   if (BlobCount_.size()>255) {
00455     BIASERR("Label.Filter(): resulting image invalid, cause more than 255 "
00456             "regions");
00457   }
00458   bool UseLargeImage = false;
00459   Image<LABEL_CALC_TYPE> LargeImage;
00460   if (!LabelResultImage_.SamePixelAndChannelCount(src)) {
00461     LargeImage.Init(src.GetWidth(), src.GetHeight(), 1);
00462     unsigned int UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
00463     src.GetROI()->GetCorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00464     LargeImage.GetROI()->SetCorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00465     LargeImage.Paste2ROI(LabelResultImage_);
00466     UseLargeImage = true;
00467   }
00468
00469   if (!dst.SamePixelAndChannelCount(src)) {
00470     if (!dst.IsEmpty()) dst.Release();
00471     dst.Init(src.GetWidth(), src.GetHeight(), 1);
00472   }
00473
00474   if (UseLargeImage)  ImageConvert::ConvertST(LargeImage, dst,
00475                                               ImageBase::ST_unsignedchar);
00476   else ImageConvert::ConvertST(LabelResultImage_, dst,
00477                                ImageBase::ST_unsignedchar);
00478   return 0;
00479 }
00480
00481 void Label::
00482 GetBordersValid_(int& border_x, int& border_y) const
00483 {
00484   border_x = border_y = 0;
00485 }
00486
00487
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Label.hh Source File

Filter

Label.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Label_HH__
00027 #define __Label_HH__
00028
00029 #include <bias_config.h>
00030
00031
00032 #include <vector>
00033
00034 #include <new>
00035
00036 #include <Base/Debug/Debug.hh>
00037 #include <Base/Image/Image.hh>
00038 #include <Base/Math/Vector2.hh>
00039 #include "FilterBase.hh"
00040
00041
00042 #define LABEL_STORAGE_TYPE ImageBase::ST_int
00043 #define LABEL_CALC_TYPE int
00044
00045 typedef struct _FilterBorders{
00046   int FirstLeft;
00047   int LastRight;
00048   int FirstUpper;
00049   int LastBottom;
00050  } FilterBorders;
00051
00052 #define D_INIT        0x0001
00053 #define D_LABEL       0x0002
00054
00055
00056 namespace BIAS
00057 {
00058   // for sorting SortVec_
00059   class /*BIASFilter_EXPORT*/ CCAStruct {
00060   public:
00061     CCAStruct() {};
00062     CCAStruct(const CCAStruct& s){
00063       bc=s.bc; tl=s.tl; br=s.br; center=s.center; x=s.x; y=s.y; }
00064
00065     int bc; ///< blob count = number of pixesl in blob
00066     BIAS::Vector2<int> tl, br; // bounding box of blob
00067     BIAS::Vector2<double> center; // blob center
00068     std::vector<int> x, y; // for median computation
00069
00070     CCAStruct& operator=(const CCAStruct& s) {
00071       bc=s.bc; tl=s.tl; br=s.br; center= s.center; x=s.x; y=s.y;return *this; }
00072     bool operator<(const CCAStruct &right) const {
00073       return bc>right.bc; };
00074     bool operator==(const CCAStruct &right) const {
00075       return bc==right.bc; };
00076   };
00077
00078
00079   /** @class Label
00080       @ingroup g_filter
00081       @brief does a connected component analysis and labels all connected
00082       regions
00083
00084       there is no difference between fore and background. Each region that
00085       has a different color than all its neighbouring pixels is its own region.
00086       Each pixel is assigned to one region.
00087
00088       There are utility functions to get Blobcounts and bounding boxes.
00089       So far only 4neighborhoud and grey value images only.
00090       Important: When using Filter(), the resulting image is only valid
00091       if there are less than 255 regions!!
00092       @author woelk
00093   */
00094   class BIASFilter_EXPORT Label
00095     : public BIAS::FilterBase<unsigned char, unsigned char>
00096   {
00097   public:
00098
00099     /// standard constructor
00100     Label();
00101
00102     /// standard destructor
00103     ~Label();
00104
00105     /** call this if you don't need the output image, is faster than Filter
00106      */
00107     int Process(const Image<unsigned char>& im);
00108
00109     virtual int Filter(const Image<unsigned char>& src,
00110                        Image<unsigned char>& dst);
00111
00112     /** labels an unsigned short int using an 4er neighbourhood and
00113         returns it in DestinationImage
00114         if DestinationImage is allocated it is not reallocated
00115         @status untested
00116         @author Felix Woelk
00117     */
00118     int Label4Neighbour(const BIAS::Image<unsigned char>& Image,
00119                         BIAS::Image<unsigned char>& DestinationImage);
00120
00121
00122
00123     /** labels an unsigned short int using an 4er neighbourhood and
00124         returns it in DestinationImage
00125         if DestinationImage is allocated it is not reallocated */
00126     int Label4Neighbour(const BIAS::Image<LABEL_CALC_TYPE>& Image,
00127                         BIAS::Image<LABEL_CALC_TYPE>& DestinationImage);
00128
00129     /** returns a list with the size of each blob, largest first,
00130         if no blobs are found a list with a single 0 is returned
00131         @author Daniel Grest, Aug. 2004
00132     */
00133     inline std::vector<int> GetBlobCounts()
00134     { return BlobCount_; }
00135
00136     /** Returns a map that hold the blob size for each label. */
00137     inline std::map<unsigned char, int> GetBlobMap()
00138     { return BlobMap_; }
00139
00140     /** returns in li the image where each region has a different grey value,
00141         value zero is the background region
00142      */
00143     inline void GetLabelImage(Image<LABEL_CALC_TYPE> &li)
00144     { li=LabelResultImage_; }
00145
00146     /** returns two lists,one with the topLeft coordinates of the
00147         bounding boxes of each region and one with the botrights,
00148         sorted by size of regions  (in pixel)
00149         @return 0, in case of no error
00150         @author woelk
00151     */
00152     inline
00153       int GetBoundingBoxes(std::vector<BIAS::Vector2<int> >& topLefts,
00154       std::vector<BIAS::Vector2<int> >& botRights)
00155     { topLefts = TopLefts_; botRights = BotRights_; return 0; };
00156
00157     /** @brief returns the centers of the blobs
00158         @author woelk 03/2006 */
00159     inline void GetCenters(std::vector<BIAS::Vector2<double> >& centers) const
00160     { centers = Centers_; }
00161
00162     /** @brief returns the median centers of the blobs
00163         @author woelk 03/2006 */
00164     inline void GetMedianCenters(std::vector<BIAS::Vector2<double> >&cts) const
00165     { cts = MedianCenters_; }
00166
00167     inline void GetBlobSizes(std::vector<int>& sizes) const
00168     { sizes = BlobCount_; }
00169
00170   protected:
00171     // exports for DLL (Jan Woetzel 2005/11/02):
00172     //    class BIASFilter_EXPORT BIAS::CCAStruct; // disabled for g++4.0,friso
00173     BIAS_EXPORT_STL_VECTOR( BIASFilter_EXPORT, int )
00174     BIAS_EXPORT_STL_VECTOR( BIASFilter_EXPORT, BIAS::Vector2<int> )
00175     BIAS_EXPORT_STL_VECTOR( BIASFilter_EXPORT, BIAS::Vector2<double> )
00176     BIAS_EXPORT_STL_VECTOR( BIASFilter_EXPORT, BIAS::CCAStruct )
00177     //BIAS_EXPORT_STL_MAP( BIASFilter_EXPORT, unsigned char, int )
00178
00179
00180     // protecteds for Label filter
00181     bool LabelInitialized_;
00182     Image<LABEL_CALC_TYPE> LabelSumImage_;
00183     Image<LABEL_CALC_TYPE> LabelResultImage_;
00184     void LabelInit_(const Image<unsigned char>& Image);
00185     void LabelInit_(const Image<LABEL_CALC_TYPE>& Image);
00186     void LabelRelease_();
00187     int Label4Neighbour_();
00188     // for CCA funxtionality
00189     std::vector<int> Num_;
00190
00191     std::vector<BIAS::CCAStruct> SortVec_;
00192
00193
00194     std::vector<int> BlobCount_;
00195     std::vector<BIAS::Vector2<int> > TopLefts_, BotRights_;
00196     std::vector<BIAS::Vector2<double> > Centers_;
00197     std::vector<BIAS::Vector2<double> > MedianCenters_;
00198
00199     virtual void GetBordersValid_(int& border_x, int& border_y) const;
00200
00201 private: // avoid DLL export
00202   std::map<unsigned char,int> BlobMap_;
00203   };
00204
00205 } // namespace
00206
00207 #endif // __FILTER_HH__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Lapack.cpp Source File

MathAlgo

Lapack.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Lapack.hh"
00027 #include <Base/Math/tnt/fortran.h>
00028 #include <Base/Math/tnt/vec.h>
00029 #include <Base/Math/tnt/fmat.h>
00030
00031 #ifdef BIAS_DEBUG
00032 #include "SVD.hh"
00033 #endif
00034
00035 #define F77_DGESV   dgesv_
00036 #define F77_DGELS   dgels_
00037 #define F77_DSYEV   dsyev_
00038 #define F77_DGEEV   dgeev_
00039 #define F77_DGESVD  dgesvd_
00040 #define F77_DGGGLM  dggglm_
00041
00042 #ifdef WIN32
00043 // Windows
00044 #  include "MathAlgo/minpack/win32_f2c.h"
00045 #  include "Blas.h"
00046
00047 // JW: VCLapack header.
00048 // "small" conflicts with rpcndr.h:144 as defien to char (JW)
00049 #  pragma warning(push)
00050 #  pragma warning (disable: 4518)
00051 #  ifdef small
00052 #  pragma warning(disable: 4005)
00053 #    define small smallUnique1852_
00054 #    include "Lapack.h"
00055 #    define small char
00056 #  else // small
00057 #    include "Lapack.h"
00058 #  endif // small
00059 #  pragma warning(pop)
00060 #else // WIN32
00061 // Unix: Fortran Lapack, not CLapack
00062
00063 extern "C"
00064 {
00065     // linear equations (general) using LU factorizaiton
00066   //
00067   void F77_DGESV(cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda,
00068                  fia_ ipiv, fda_ b, cfi_ ldb, fi_ info);
00069
00070   // solve linear least squares using QR or LU factorization
00071   //
00072   void F77_DGELS(cfch_ trans, cfi_ M, cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda,
00073                  fda_ B, cfi_ ldb, fda_ work, cfi_ lwork, fi_ info);
00074
00075   // solve weighted linear least squares
00076   void F77_DGGGLM(cfi_ N, cfi_ M, cfi_ P, fda_ A, cfi_ lda, fda_ B, cfi_ ldb,
00077                   fda_ b, fda_ x, fda_ y, fda_ work, cfi_ lwork, fi_ info);
00078
00079   // solve symmetric eigenvalues
00080   //
00081   void F77_DSYEV( cfch_ jobz, cfch_ uplo, cfi_ N, fda_  A, cfi_ lda,
00082                   fda_ W, fda_ work, cfi_ lwork, fi_ info);
00083
00084   // solve unsymmetric eigenvalues
00085   //
00086   void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00087                  fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00088                  cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00089
00090
00091   /**
00092      [see fortran.h for typedefs]
00093      SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
00094      WORK, LWORK, INFO )
00095
00096      Scalar Arguments:
00097      CHARACTER          JOBU, JOBVT
00098      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
00099
00100      Array Arguments:
00101      DOUBLE PRECISION   A( LDA, * ), S( * ), U( LDU, * ),  VT( LDVT, * ), WORK( * )
00102
00103      Purpose
00104      =======
00105
00106      DGESVD computes the singular value decomposition (SVD) of a real
00107      M-by-N matrix A, optionally computing the left and/or right singular
00108      vectors. The SVD is written
00109
00110      A = U * SIGMA * transpose(V)
00111
00112      where SIGMA is an M-by-N matrix which is zero except for its
00113      min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
00114      V is an N-by-N orthogonal matrix.  The diagonal elements of SIGMA
00115      are the singular values of A; they are real and non-negative, and
00116      are returned in descending order.  The first min(m,n) columns of
00117      U and V are the left and right singular vectors of A.
00118
00119      Note that the routine returns V**T, not V.
00120      (JW, 03/2002)
00121   */
00122   void F77_DGESVD( cfch_ JOBU, cfch_ JOBVT, fi_ M, fi_ N,
00123                    fda_ A, fi_ LDA, fda_ S, fda_ U,fi_ LDU,
00124                    fda_ VT, fi_ LDVT, fda_ WORK, fi_ LWORK, fi_ INFO);
00125
00126
00127 } // end extern C
00128 #endif //WIN32
00129
00130
00131 using namespace TNT;
00132
00133 BIAS::Matrix<double>
00134 Fortran_Matrix_to_Matrix(const Fortran_Matrix < double >&FMat)
00135 {
00136   BIAS::Matrix < double > res(FMat.num_rows(), FMat.num_cols());
00137
00138   // get the pointer to the data array of the Matrix
00139   double *dataP = res.GetData();
00140   int nCols = res.num_cols(); // nr of rows of the Matrix
00141
00142   // copy the elements to this, rember the different index base (0/1)
00143   // and the difference between row-major / col-major order
00144   // transpose the values because Fortran_Matrices are column-major
00145   // and Matrix is row-major
00146   for (int row = 0; row < res.num_rows(); row++) {
00147     for (int col = 0; col < res.num_cols(); col++) {
00148       dataP[nCols * row + col] = FMat(row + 1, col + 1); // assign elementwise
00149     }
00150   }
00151   return res;
00152 }
00153
00154 void
00155 Fortran_Matrix_to_Matrix(const Fortran_Matrix < double >&FMat,
00156                          BIAS::Matrix<double>  &res)
00157 {
00158   res.newsize(FMat.num_rows(), FMat.num_cols());
00159
00160   // get the pointer to the data array of the Matrix
00161   double *dataP = res.GetData();
00162   int nCols = res.num_cols(); // nr of rows of the Matrix
00163
00164   // copy the elements to this, rember the different index base (0/1)
00165   // and the difference between row-major / col-major order
00166   // transpose the values because Fortran_Matrices are column-major
00167   // and Matrix is row-major
00168   for (int row = 0; row < res.num_rows(); row++) {
00169     for (int col = 0; col < res.num_cols(); col++) {
00170       dataP[nCols * row + col] = FMat(row + 1, col + 1); // assign elementwise
00171     }
00172   }
00173 }
00174
00175
00176 BIAS::Vector<double>
00177 Lapack_LU_linear_solve(const BIAS::Matrix<double> &A,
00178                        const BIAS::Vector<double> &b)
00179 {
00180   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00181                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00182   Vector<double> FVY(b.size(),b.GetData());
00183
00184   const Fortran_integer one=1;
00185   Subscript M=FMA.num_rows();
00186   Subscript N=FMA.num_cols();
00187
00188   Vector<double> x(b);
00189   Vector<Fortran_integer> index(M);
00190   Fortran_integer info = 0;
00191
00192 #ifdef WIN32
00193   //different calling arguments in WIN32
00194   long int NT(N);
00195   long int oneT(one);
00196   long int MT(M);
00197   long int* indT = new long int[M];
00198   long int infT(info);
00199
00200   F77_DGESV(&NT, &oneT, &FMA(1,1), &MT, indT, &x(1), &MT, &infT); //WIN32
00201   delete[] indT;
00202 #else
00203   F77_DGESV(&N, &one, &FMA(1,1), &M, &index(1), &x(1), &M, &info); //UNIX
00204 #endif
00205
00206   BIAS::Vector<double> vecResult(A.num_cols());
00207
00208   if (info != 0) return BIAS::Vector<double>(0);
00209   else {
00210     for (int i=0;i<vecResult.size();i++)
00211       vecResult[i]=x[i];
00212     return vecResult;
00213   }
00214 }
00215
00216 BIAS::Vector<double>
00217 Lapack_LLS_QR_linear_solve(const BIAS::Matrix<double> &A,
00218                            const BIAS::Vector<double> &b, int &res)
00219 {
00220     res=0;
00221 #ifdef BIAS_DEBUG
00222   BIAS::SVD svd(A);
00223   if (svd.Rank()!=(unsigned)((A.num_cols()>A.num_rows())?A.num_rows():A.num_cols())){
00224     BIASERR("cannot solve because rank of A is too low (see man dgels)"
00225             << "\nA is "<<A.num_rows()<<"x"<<A.num_cols()
00226             <<"  and has rank "<<svd.Rank()<<"   should have rank "
00227             <<((A.num_cols()>A.num_rows())?(A.num_rows()):(A.num_cols())));
00228     res=-1;
00229     BIASERR("A: "<<A<<"  Singular Values: "<<svd.GetS());
00230     //BIASASSERT(false);
00231   }
00232   if (A.num_rows()<A.num_cols()){
00233     BIASERR("system is not overdetermined since A is a "<<A.num_rows()
00234             <<"x"<<A.num_cols()<<" matrix");
00235   }
00236 #endif
00237   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00238                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00239   Vector<double> FVY(b.size(),b.GetData());
00240   const Fortran_integer one=1;
00241   Subscript M=FMA.num_rows();
00242   Subscript N=FMA.num_cols();
00243
00244   Vector<double> x(b);
00245   Fortran_integer info = 0;
00246
00247   char transp = 'N';
00248   Fortran_integer lwork = 5 * (M+N);      // temporary work space
00249   Vector<double> work(lwork);
00250
00251 #ifdef WIN32
00252   //different function prarams in WIN32
00253   long int NT(N);
00254   long int oneT(one);
00255   long int MT(M);
00256   long int infT(info);
00257   long int lworkT(lwork);
00258
00259   F77_DGELS(&transp, &MT, &NT, &oneT, &FMA(1,1), &MT, &x(1), &MT,  &work(1),
00260             &lworkT, &infT);
00261 #else  //WIN32
00262   F77_DGELS(&transp, &M, &N, &one, &FMA(1,1), &M, &x(1), &M,  &work(1),
00263             &lwork, &info);
00264 #endif //WIN32
00265
00266   res|=info;
00267   BIAS::Vector<double> vecResult(N);
00268   if (res != 0) {
00269     BIASERR("error calculating linear least squares problem "<<res);
00270     return BIAS::Vector<double>(0);
00271   }
00272   else {
00273     for (int i=0;i<vecResult.size();i++)
00274       vecResult[i]=x[i];
00275     return vecResult;
00276   }
00277 }
00278
00279
00280 BIAS::Vector<double>
00281 Lapack_WLLS_solve(const BIAS::Matrix<double> &A,
00282                   const BIAS::Vector<double> &b,
00283                   const BIAS::Matrix<double> &B, int &res)
00284 {
00285 #ifdef MIP_DEBUG
00286   if (A.num_rows()!=B.num_rows()){
00287     BIASERR("wrong matrix dimension ");
00288     res=-1;
00289   }
00290   if (A.num_rows()!=b.num_rows()){
00291     BIASERR("wrong vector dimension ");
00292     res=-2;
00293   }
00294   // to befinished (see man dggglm);
00295 #endif
00296   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00297                              ((BIAS::Matrix<double>)transpose(A)).GetData());
00298   Fortran_Matrix<double> FMB(B.num_rows(), B.num_cols(),
00299                              ((BIAS::Matrix<double>)transpose(B)).GetData());
00300   Vector<double> FVY(b.size(),b.GetData());
00301   Subscript N=FMA.num_rows();
00302   Subscript M=FMA.num_cols();
00303   Subscript P=FMB.num_cols();
00304   Vector<double> x(M);
00305   Vector<double> y(P);
00306   Fortran_integer info = 0;
00307
00308   Fortran_integer lwork = 5 * (M+N+P);      // temporary work space
00309   Vector<double> work(lwork);
00310
00311 #ifdef WIN32
00312   //different calling arguments in WIN32
00313   long int NT(N);
00314   long int MT(M);
00315   long int PT(P);
00316   long int infT(info);
00317   long int lworkT(lwork);
00318
00319   F77_DGGGLM(&NT, &MT, &PT, &FMA(1,1), &NT, &FMB(1,1), &NT, &FVY(1), &x(1), &y(1),
00320              &work(1), &lworkT, &infT);
00321 #else  //WIN32
00322   F77_DGGGLM(&N, &M, &P, &FMA(1,1), &N, &FMB(1,1), &N, &FVY(1), &x(1), &y(1),
00323              &work(1), &lwork, &info);
00324 #endif //WIN32
00325
00326   res=info;
00327   BIAS::Vector<double> vecResult(x.size());
00328   if (info != 0) {
00329     BIASERR("error calculating weighted linear least squares problem "<<res);
00330     return BIAS::Vector<double>(0);
00331   } else {
00332     for (int i=0;i<vecResult.size();i++)
00333       vecResult[i]=x[i];
00334     return vecResult;
00335   }
00336 }
00337
00338 // *********************** Eigenvalue problems *******************
00339
00340 // solve symmetric eigenvalue problem (eigenvalues only)
00341 BIAS::Vector<double>
00342 Upper_symmetric_eigenvalue_solve(const BIAS::Matrix<double> &A)
00343 {
00344   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00345                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00346   char jobz = 'N';
00347   char uplo = 'U';
00348   Subscript N = FMA.num_rows();
00349
00350   assert(N == FMA.num_cols());
00351
00352   Vector<double> eigvals(N);
00353   Fortran_integer worksize = 3*N;
00354   Fortran_integer info = 0;
00355   Vector<double> work(worksize);
00356
00357 #ifdef WIN32
00358   //different calling arguments in WIN32
00359   long int NT(N);
00360   long int infT(info);
00361   long int worksizeT(worksize);
00362
00363   F77_DSYEV(&jobz, &uplo, &NT, &FMA(1,1), &NT, eigvals.begin(), work.begin(),
00364         &worksizeT, &infT);
00365 #else  //WIN32
00366   F77_DSYEV(&jobz, &uplo, &N, &FMA(1,1), &N, eigvals.begin(), work.begin(),
00367             &worksize, &info);
00368 #endif //WIN32
00369
00370   BIAS::Vector<double> vecResult(eigvals.size());
00371
00372   if (info != 0) return BIAS::Vector<double>(0);
00373   else {
00374     for (int i=0;i<vecResult.size();i++)
00375       vecResult[i]=eigvals[i];
00376     return vecResult;
00377   }
00378 }
00379
00380
00381 // solve unsymmetric eigenvalue problems (for a rectangular matrix)
00382 //
00383 int
00384 Eigenvalue_solve(const BIAS::Matrix<double> &A,
00385          BIAS::Vector<double> &wr, BIAS::Vector<double> &wi) {
00386   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00387                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00388   char jobvl = 'N';
00389   char jobvr = 'N';
00390
00391   Fortran_integer N = FMA.num_rows();
00392   assert(N == FMA.num_cols());
00393
00394   if (N<1) return 1;
00395
00396   Fortran_Matrix<double> vl(1,N);  // should be NxN ?
00397   Fortran_Matrix<double> vr(1,N);
00398   Fortran_integer one = 1;
00399
00400   Fortran_integer worksize = 5*N;
00401   Fortran_integer info = 0;
00402   Vector<double> work(worksize, 0.0);
00403
00404   Vector<double> FWR(N), FWI(N);
00405 //  void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00406 //      fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00407 //      cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00408
00409 #ifdef WIN32
00410   //different function arguments in WIN32
00411   long int NT(N);
00412   long int oneT(one);
00413   long int infT(info);
00414   long int worksizeT(worksize);
00415
00416   F77_DGEEV(&jobvl, &jobvr, &NT, &FMA(1,1), &NT, &(FWR(1)), //WIN32
00417         &(FWI(1)), &(vl(1,1)), &oneT, &(vr(1,1)), &oneT,
00418         &(work(1)), &worksizeT, &infT);
00419 #else  //WIN32
00420   F77_DGEEV(&jobvl, &jobvr, &N, &FMA(1,1), &N, &(FWR(1)),   //UNIX
00421             &(FWI(1)), &(vl(1,1)), &one, &(vr(1,1)), &one,
00422             &(work(1)), &worksize, &info);
00423 #endif //WIN32
00424
00425   wr=FWR;
00426   wi=FWI;
00427   return (info==0 ? 0: 1);
00428 }
00429
00430 int
00431 Eigenproblem_quadratic_matrix(const BIAS::Matrix<double> &A,
00432                   BIAS::Vector<double> &ret_EigenValuesReal,
00433                   BIAS::Vector<double> &ret_EigenValuesImag,
00434                   BIAS::Matrix<double> &eigenVectors)
00435 {
00436   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00437                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00438   char jobvl = 'V'; // calculate the left eigenvectors
00439   char jobvr = 'V'; // calculate the right eigenvectors
00440
00441   Fortran_integer N = FMA.num_rows(); // dim of the Matrix should be NxN
00442   assert(N == FMA.num_cols() ); // A must be rectangular NxN matrix
00443   if (N<1) return 1; // 1x1 matrix is a scalar, decomposition is nonsense
00444
00445   Fortran_integer ldvl = N; // size of the left eigenvectormatrix
00446   Fortran_integer ldvr = N; // size of the right eigenvectormatrix
00447
00448   // should be NxN, but left Eigenvectorss are not calculated due to jobvl=N
00449   Fortran_Matrix<double> eigenVectsLeft( N,ldvl );
00450   // will contain a (NxN) Matrix with the right Eigenvectors in columns.
00451   Fortran_Matrix<double> eigenVectsRight( N,ldvr );
00452
00453   Fortran_integer worksize = 5*N;
00454   Fortran_integer info = 0;
00455   Vector<double> work(worksize, 0.0);
00456
00457   Vector<double> ret_EigenValuesRealPart(N,0.0);
00458   Vector<double> ret_EigenValuesImagPart(N,0.0);
00459
00460   //  void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00461   //      fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00462   //      cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00463
00464   // call the lapack lib SVD routine:
00465
00466 #ifdef WIN32
00467   //different function arguments in WIN32
00468   long int NT(N);
00469   long int infT(info);
00470   long int worksizeT(worksize);
00471   long int ldvlT(ldvl);
00472   long int ldvrT(ldvr);
00473
00474   F77_DGEEV(&jobvl, &jobvr, &NT, &FMA(1,1), &NT, &(ret_EigenValuesRealPart(1)), //WIN32
00475             &(ret_EigenValuesImagPart(1)),
00476             &(eigenVectsLeft(1,1)), &ldvlT,
00477             &(eigenVectsRight(1,1)), &ldvrT,
00478             &(work(1)), &worksizeT, &infT);
00479 #else  //WIN32
00480   F77_DGEEV(&jobvl, &jobvr, &N, &FMA(1,1), &N, &(ret_EigenValuesRealPart(1)),   //UNIX
00481             &(ret_EigenValuesImagPart(1)),
00482             &(eigenVectsLeft(1,1)), &ldvl,
00483             &(eigenVectsRight(1,1)), &ldvr,
00484             &(work(1)), &worksize, &info);
00485 #endif //WIN32
00486
00487   eigenVectors.newsize(eigenVectsRight.num_rows(),eigenVectsRight.num_cols());
00488   for (int i = 0; i < eigenVectors.size(); i++) {
00489     eigenVectors.GetData()[i] = eigenVectsRight.begin()[i];
00490   };
00491   eigenVectors=transpose(eigenVectors);
00492   ret_EigenValuesReal= ret_EigenValuesRealPart;
00493   ret_EigenValuesImag= ret_EigenValuesImagPart;
00494   return (info==0 ? 0: 1);
00495 }
00496
00497 int
00498 General_singular_value_decomposition(char jobu, char jobvt,
00499                                      const BIAS::Matrix<double> &A,
00500                                      BIAS::Vector<double> &ret_S,
00501                                      BIAS::Matrix<double> &ret_U,
00502                                      BIAS::Matrix<double> &ret_VT)
00503 {
00504   Fortran_Matrix<double> FMA(A.num_rows(), A.num_cols(),
00505                  ((BIAS::Matrix<double>)transpose(A)).GetData());
00506   //char jobu  = 'A'; // calculate all columns of U
00507   //char jobvt = 'A'; // calculate all n rows of V_h
00508
00509   Fortran_integer M = FMA.num_rows(); // dim of the Matrix A should be MxN
00510   Fortran_integer N = FMA.num_cols(); // dim of the Matrix A should be MxN
00511
00512   Fortran_Matrix<double> U ( M, M );// M x M Orthogonal/Unitary matrix
00513   Fortran_Matrix<double> V ( N, N );// N x N Orthogonal/Unitary matrix
00514   Fortran_Matrix<double> VT(N,N); // N x N Orthogonal/Unitary matrix transposed
00515   Vector<double> S ( (int)max( (int)M, (int)N) );// the M singular values
00516
00517   Fortran_integer lda  = M;
00518   Fortran_integer ldu  = M; // because jobu = A
00519   Fortran_integer ldvt = N; // because jobvt = A
00520
00521   Fortran_integer worksize =  6 * (M > N ? M : N) ;
00522
00523   Fortran_integer info = 0;
00524   Vector<double> work(worksize, 0.0);
00525
00526 #ifdef WIN32
00527   //different function arguments in WIN32
00528   long int NT(N);
00529   long int MT(M);
00530   long int infT(info);
00531   long int ldaT(lda);
00532   long int lduT(ldu);
00533   long int ldvtT(ldvt);
00534   long int worksizeT(worksize);
00535
00536   // call extern Fortran2C routine from liblapack:
00537   F77_DGESVD( &jobu, &jobvt, &MT, &NT, &FMA(1,1), &ldaT, &S(1), &U(1,1),
00538           &lduT, &VT(1,1),  &ldvtT, &work(1), &worksizeT, &infT);        //WIN32
00539 #else  //WIN32
00540   F77_DGESVD( &jobu, &jobvt, &M, &N, &FMA(1,1), &lda, &S(1),    &U(1,1),
00541               &ldu, &VT(1,1),   &ldvt, &work(1), &worksize, &info);      //UNIX
00542 #endif //WIN32
00543
00544   // S is zero exept for the first min(M,N) diagonal elements
00545   // therefore only copy these elements
00546   ret_S.newsize((int)min((int) M,(int)N));
00547   for (int i=0;i<min((int) M,(int)N);i++)
00548   ret_S[i]  = S[i];
00549   ret_U=Fortran_Matrix_to_Matrix(U);
00550   ret_VT=Fortran_Matrix_to_Matrix(VT);
00551
00552   return (info==0 ? 0: 1); // if info !=  0 the arrays were too small.
00553 }
00554
00555
00556
00557
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/lapack.h Source File

Base » Math » tnt

lapack.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Header file for Fortran Lapack
00035
00036 #ifndef LAPACK_H
00037 #define LAPACK_H
00038
00039 // This file incomplete and included here to only demonstrate the
00040 // basic framework for linking with the Fortran Lapack routines.
00041
00042 #include "fortran.h"
00043 #include "vec.h"
00044 #include "fmat.h"
00045
00046
00047 #define F77_DGESV   dgesv_
00048 #define F77_DGELS   dgels_
00049 #define F77_DSYEV   dsyev_
00050
00051 // jw
00052 #define F77_DGEEV   dgeev_
00053 // jw
00054 #define F77_DGESVD  dgesvd_
00055
00056
00057 extern "C"
00058 {
00059
00060     // linear equations (general) using LU factorizaiton
00061     //
00062     void F77_DGESV(cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda,
00063         fia_ ipiv, fda_ b, cfi_ ldb, fi_ info);
00064
00065     // solve linear least squares using QR or LU factorization
00066     //
00067     void F77_DGELS(cfch_ trans, cfi_ M,
00068         cfi_ N, cfi_ nrhs, fda_ A, cfi_ lda, fda_ B, cfi_ ldb, fda_ work,
00069             cfi_ lwork, fi_ info);
00070
00071     // solve symmetric eigenvalues
00072     //
00073     void F77_DSYEV( cfch_ jobz, cfch_ uplo, cfi_ N, fda_  A, cfi_ lda,
00074         fda_ W, fda_ work, cfi_ lwork, fi_ info);
00075
00076     // solve unsymmetric eigenvalues
00077     //
00078     void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00079         fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00080         cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00081
00082 /**
00083  [see fortran.h for typedefs]
00084       SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )
00085
00086  Scalar Arguments:
00087       CHARACTER          JOBU, JOBVT
00088       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
00089
00090  Array Arguments:
00091       DOUBLE PRECISION   A( LDA, * ), S( * ), U( LDU, * ),  VT( LDVT, * ), WORK( * )
00092
00093   Purpose
00094   =======
00095
00096   DGESVD computes the singular value decomposition (SVD) of a real
00097   M-by-N matrix A, optionally computing the left and/or right singular
00098   vectors. The SVD is written
00099
00100        A = U * SIGMA * transpose(V)
00101
00102   where SIGMA is an M-by-N matrix which is zero except for its
00103   min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
00104   V is an N-by-N orthogonal matrix.  The diagonal elements of SIGMA
00105   are the singular values of A; they are real and non-negative, and
00106   are returned in descending order.  The first min(m,n) columns of
00107   U and V are the left and right singular vectors of A.
00108
00109   Note that the routine returns V**T, not V.
00110   (JW, 03/2002)
00111 **/
00112     void F77_DGESVD( cfch_ JOBU,
00113              cfch_ JOBVT,
00114              fi_ M,
00115              fi_ N,
00116              fda_ A,
00117              fi_ LDA,
00118              fda_ S,
00119              fda_ U,
00120              fi_ LDU,
00121              fda_ VT,
00122              fi_ LDVT,
00123              fda_ WORK,
00124              fi_ LWORK,
00125              fi_ INFO  );
00126
00127
00128 }
00129
00130 // solve linear equations using LU factorization
00131
00132 namespace TNT{
00133
00134 Vector<double> Lapack_LU_linear_solve(const Fortran_Matrix<double> &A,
00135     const Vector<double> &b)
00136 {
00137     const Fortran_integer one=1;
00138     Subscript M=A.num_rows();
00139     Subscript N=A.num_cols();
00140
00141     Fortran_Matrix<double> Tmp(A);
00142     Vector<double> x(b);
00143     Vector<Fortran_integer> index(M);
00144     Fortran_integer info = 0;
00145
00146     F77_DGESV(&N, &one, &Tmp(1,1), &M, &index(1), &x(1), &M, &info);
00147
00148     if (info != 0) return Vector<double>(0);
00149     else
00150         return x;
00151 }
00152
00153 // solve linear least squares problem using QR factorization
00154 //
00155 Vector<double> Lapack_LLS_QR_linear_solve(const Fortran_Matrix<double> &A,
00156     const Vector<double> &b)
00157 {
00158     const Fortran_integer one=1;
00159     Subscript M=A.num_rows();
00160     Subscript N=A.num_cols();
00161
00162     Fortran_Matrix<double> Tmp(A);
00163     Vector<double> x(b);
00164     Fortran_integer info = 0;
00165
00166     char transp = 'N';
00167     Fortran_integer lwork = 5 * (M+N);      // temporary work space
00168     Vector<double> work(lwork);
00169
00170     F77_DGELS(&transp, &M, &N, &one, &Tmp(1,1), &M, &x(1), &M,  &work(1),
00171         &lwork, &info);
00172
00173     if (info != 0) return Vector<double>(0);
00174     else
00175         return x;
00176 }
00177
00178 // *********************** Eigenvalue problems *******************
00179
00180 // solve symmetric eigenvalue problem (eigenvalues only)
00181 //
00182 Vector<double> Upper_symmetric_eigenvalue_solve(const Fortran_Matrix<double> &A)
00183 {
00184     char jobz = 'N';
00185     char uplo = 'U';
00186     Subscript N = A.num_rows();
00187
00188     assert(N == A.num_cols());
00189
00190     Vector<double> eigvals(N);
00191     Fortran_integer worksize = 3*N;
00192     Fortran_integer info = 0;
00193     Vector<double> work(worksize);
00194     Fortran_Matrix<double> Tmp = A;
00195
00196     F77_DSYEV(&jobz, &uplo, &N, &Tmp(1,1), &N, eigvals.begin(), work.begin(),
00197         &worksize, &info);
00198
00199     if (info != 0) return Vector<double>();
00200     else
00201         return eigvals;
00202 }
00203
00204
00205 // solve unsymmetric eigenvalue problems (for a rectangular matrix)
00206 //
00207 int eigenvalue_solve(const Fortran_Matrix<double> &A,
00208         Vector<double> &wr, Vector<double> &wi)
00209 {
00210     char jobvl = 'N';
00211     char jobvr = 'N';
00212
00213     Fortran_integer N = A.num_rows();
00214
00215
00216     assert(N == A.num_cols());
00217
00218     if (N<1) return 1;
00219
00220     Fortran_Matrix<double> vl(1,N);  /* should be NxN ? **** */
00221     Fortran_Matrix<double> vr(1,N);
00222     Fortran_integer one = 1;
00223
00224     Fortran_integer worksize = 5*N;
00225     Fortran_integer info = 0;
00226     Vector<double> work(worksize, 0.0);
00227     Fortran_Matrix<double> Tmp = A;
00228
00229     wr.newsize(N);
00230     wi.newsize(N);
00231
00232 //  void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00233 //      fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00234 //      cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00235
00236     F77_DGEEV(&jobvl, &jobvr, &N, &Tmp(1,1), &N, &(wr(1)),
00237         &(wi(1)), &(vl(1,1)), &one, &(vr(1,1)), &one,
00238         &(work(1)), &worksize, &info);
00239
00240     return (info==0 ? 0: 1);
00241 }
00242
00243
00244
00245
00246 /** solve general eigenproblem for a general quadratix (n x n)  matrix.
00247     computes eigenvalues and eigenvectors of A.
00248     (Jan Woetzel), 03/2002
00249 **/
00250 int eigenproblem_special_quadratic_matrix_solve(const Fortran_Matrix<double> &A,
00251         Vector<double> &ret_EigenValuesRealPart, Vector<double> &ret_EigenValuesImagPart,
00252         Fortran_Matrix<double> &eigenVecMatrixR )
00253 {
00254     char jobvl = 'V'; // calculate the left eigenvectors
00255     char jobvr = 'V'; // calculate the right eigenvectors
00256
00257     Fortran_integer N = A.num_rows(); // dim of the Matrix should be NxN
00258     assert(N == A.num_cols() ); // A must be rectangular NxN matrix
00259     if (N<1) return 1; // 1x1 matrix is a scalar, decomposition is nonsense
00260
00261     Fortran_integer ldvl = N; // size of the left eigenvectormatrix
00262     Fortran_integer ldvr = N; // size of the right eigenvectormatrix
00263
00264     Fortran_Matrix<double> eigenVectsLeft( N,ldvl ); // should be NxN, but left Eigenvectorss are not calculated due to jobvl=N
00265     Fortran_Matrix<double> eigenVectsRight( N,ldvr ); // will contain a (NxN) Matrix with the right Eigenvectors in columns.
00266
00267     Fortran_integer worksize = 5*N;
00268     Fortran_integer info = 0;
00269     Vector<double> work(worksize, 0.0);
00270     Fortran_Matrix<double> Tmp = A;
00271
00272     ret_EigenValuesRealPart.newsize(N);
00273     ret_EigenValuesImagPart.newsize(N);
00274
00275 //  void F77_DGEEV(cfch_ jobvl, cfch_ jobvr, cfi_ N, fda_ A, cfi_ lda,
00276 //      fda_ wr, fda_ wi, fda_ vl, cfi_ ldvl, fda_ vr,
00277 //      cfi_ ldvr, fda_ work, cfi_ lwork, fi_ info);
00278
00279     // call the lapack lib SVD routine:
00280     F77_DGEEV(&jobvl, &jobvr, &N, &Tmp(1,1), &N, &(ret_EigenValuesRealPart(1)),
00281         &(ret_EigenValuesImagPart(1)),
00282         &(eigenVectsLeft(1,1)), &ldvl,
00283         &(eigenVectsRight(1,1)), &ldvr,
00284         &(work(1)), &worksize, &info);
00285
00286
00287     eigenVecMatrixR = eigenVectsRight; // return a matrix with Eigenvectors in the columns (Spalten)
00288
00289     return (info==0 ? 0: 1); // if info !=  0 the the arrays were too small.
00290 }
00291
00292
00293
00294
00295 /** solve general eigenproblem.
00296     computes singular value decomposition of a rectangular m x n matrix A
00297     calls extern liblapack routine.
00298     Jan Woetzel 03/2002
00299 **/
00300 int singular_value_decomposition_general_rectangular_matrix_solve ( const Fortran_Matrix<double> &A,
00301     Vector<double> &ret_S, /* vector with singular values of A with s(i) >= s(i+1) */
00302     Fortran_Matrix<double> &ret_U, /* m x m orthogonal/unitary matrix U */
00303     Fortran_Matrix<double> &ret_VT /* n x n orthogonal/unitary matrx transpose(V)*/ )
00304 {
00305   char jobu  = 'A'; // calculate all columns of U
00306   char jobvt = 'A'; // calculate all n rows of V_h
00307
00308   Fortran_integer M = A.num_rows(); // dim of the Matrix A should be MxN
00309   Fortran_integer N = A.num_cols(); // dim of the Matrix A should be MxN
00310
00311   // create a copy od A because jobu=O or jobvt=O may replace the content of A in place !!!
00312   Fortran_Matrix<double> TmpA = A; // M x N Matrix A to be decomposed
00313
00314   Fortran_Matrix<double> U ( M, M );// M x M Orthogonal/Unitary matrix
00315   Fortran_Matrix<double> V ( N, N );// N x N Orthogonal/Unitary matrix
00316   Fortran_Matrix<double> VT ( N, N );// N x N Orthogonal/Unitary matrix transpose(V)
00317   Vector<double> S ( max( (int)M, (int)N) );// the M singular values
00318
00319   Fortran_integer lda  = M;
00320   Fortran_integer ldu  = M; // because jobu = A
00321   Fortran_integer ldvt = N; // because jobvt = A
00322
00323
00324   Fortran_integer worksize =  6 * (M > N ? M : N) ;
00325
00326   Fortran_integer info = 0;
00327   Vector<double> work(worksize, 0.0);
00328
00329   // call extern Fortran2C routine from liblapack:
00330   F77_DGESVD( &jobu,
00331               &jobvt,
00332               &M,
00333               &N,
00334               &TmpA(1,1),
00335               &lda,
00336               &S(1),
00337               &U(1,1),
00338               &ldu,
00339               &VT(1,1),
00340               &ldvt,
00341               &work(1),
00342               &worksize,
00343               &info);
00344
00345   //#if 0
00346   //    // debug output
00347   //    cout << " eVals = " << endl;
00348   //    for (int row=1; row <= M; row++) {
00349   //    cout <<row<<". : " <<S( row );
00350   //    };
00351   //    cout << " U=  " << endl;
00352   //    for (int row=1; row <= M; row++) {
00353   //        for (int col=1; col <= M; col++) {
00354   //        cout << U (row, col) << " ";
00355   //    };
00356   //    cout<<endl;
00357   //    };
00358   //    cout << "  VT=  " << endl;
00359   //    for (int row=1; row <= N; row++) {
00360   //    for (int col=1; col <= N; col++) {
00361   //        cout << VT (row, col)<< " " ;
00362   //    };
00363   //    cout<<endl;
00364   //    };
00365   //#endif
00366
00367   ret_S  = S; // better compute with the return arguments in place (except A!!) (JW)
00368   ret_U  = U;
00369   ret_VT = VT;
00370
00371   return (info==0 ? 0: 1); // if info !=  0 the the arrays were too small.
00372 }
00373
00374
00375 }
00376
00377
00378 #endif
00379 // LAPACK_H
00380
00381
00382
00383
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Lapack.hh Source File

MathAlgo

Lapack.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 /** @file Lapack.hh
00027     BIAS c++ wrapper class for lapack fortran77 functions
00028     @author Daniel Grest, Jan Woetzel, Felix Woelk
00029     @status tested
00030 */
00031 #ifndef BIASLAPACK_H
00032 #define BIASLAPACK_H
00033
00034 #include "bias_config.h"
00035
00036 #include <Base/Math/Matrix.hh>
00037 #include <Base/Math/Vector.hh>
00038
00039
00040
00041 /** @addtogroup mathalgo
00042     \brief C++ Wrappers for important Lapack fortran77 functions
00043
00044     Functions from Lapack, e.g. solving systems of linear equations
00045     or computing eigenvalues
00046     For further information have a look here
00047     <a href="http://www.netlib.org/lapack/lug/">
00048     http://www.netlib.org/lapack/lug/</a>.
00049
00050     @{
00051 */
00052
00053 /** solve linear equations using LU factorization */
00054 BIASMathAlgo_EXPORT
00055 BIAS::Vector<double>
00056 Lapack_LU_linear_solve(const BIAS::Matrix<double> &A,
00057                        const BIAS::Vector<double> &b);
00058
00059 /** linear least squares solves |Ax-b|=min
00060     res=0 on success, anything else
00061     rudimentary tested (woelk)
00062     @author woetzel  */
00063 BIASMathAlgo_EXPORT
00064 BIAS::Vector<double>
00065 Lapack_LLS_QR_linear_solve(const BIAS::Matrix<double> &A,
00066                            const BIAS::Vector<double> &b, int &res);
00067
00068 /** as above but ignores success info (res) */
00069 BIASMathAlgo_EXPORT
00070 inline BIAS::Vector<double>
00071 Lapack_LLS_QR_linear_solve(const BIAS::Matrix<double> &A,
00072                            const BIAS::Vector<double> &b)
00073 { int res; return Lapack_LLS_QR_linear_solve(A, b, res); }
00074
00075
00076 /** weighted linear least squares
00077     solves |B^-1(b-Ax)|=min
00078     res=0 on success, anything else
00079     rudimentary tested
00080     @author woelk 04 2003 */
00081 BIASMathAlgo_EXPORT
00082 BIAS::Vector<double>
00083 Lapack_WLLS_solve(const BIAS::Matrix<double> &A,
00084                   const BIAS::Vector<double> &b,
00085                   const BIAS::Matrix<double> &B, int &res);
00086
00087
00088 // *********************** Eigenvalue problems *******************
00089
00090 /**  solve symmetric eigenvalue problem (eigenvalues only)
00091      @status untested, grest
00092 */
00093 BIASMathAlgo_EXPORT
00094 BIAS::Vector<double>
00095 Upper_symmetric_eigenvalue_solve(const BIAS::Matrix<double> &A);
00096
00097 /** solve unsymmetric eigenvalue problems (for a rectangular matrix)
00098     @status untested, grest
00099 */
00100 BIASMathAlgo_EXPORT
00101 int
00102 Eigenvalue_solve(const BIAS::Matrix<double> &A,
00103                  BIAS::Vector<double> &wr, BIAS::Vector<double> &wi);
00104
00105 /** solve general eigenproblem for a general quadratix (n x n)  matrix.
00106     computes eigenvalues and eigenvectors of A.
00107     (Jan Woetzel), 03/2002
00108 **/
00109 BIASMathAlgo_EXPORT
00110 int
00111 Eigenproblem_quadratic_matrix(const BIAS::Matrix<double> &A,
00112                   BIAS::Vector<double> &ret_EigenValuesReal,
00113                   BIAS::Vector<double> &ret_EigenValuesImag,
00114                   BIAS::Matrix<double> &eigenVectors);
00115
00116 /** solve general eigenproblem.
00117     computes singular value decomposition of a rectangular m x n matrix A
00118     calls extern liblapack routine.
00119     better use SVD.hh
00120     @params ret_S vector with singular values of A with s(i) >= s(i+1)
00121     @params ret_U m x m orthogonal/unitary matrix U
00122     @params ret_VT n x n orthogonal/unitary matrx transpose(V)
00123     Jan Woetzel 03/2002, changed for Matrix by Daniel Grest, July 2002
00124     woelk: added jobu and jobvt
00125     jobu:  'A' - calculate U
00126            'N' - do not calculate U (much faster)
00127     not tested
00128     see man dgesvd*/
00129 BIASMathAlgo_EXPORT
00130 int
00131 General_singular_value_decomposition(char jobu, char jobvt,
00132                                      const BIAS::Matrix<double> &A,
00133                                      BIAS::Vector<double> &ret_S,
00134                                      BIAS::Matrix<double> &ret_U,
00135                                      BIAS::Matrix<double> &ret_VT);
00136
00137 BIASMathAlgo_EXPORT
00138 inline int
00139 General_singular_value_decomposition(const BIAS::Matrix<double> &A,
00140                                      BIAS::Vector<double> &ret_S,
00141                                      BIAS::Matrix<double> &ret_U,
00142                                      BIAS::Matrix<double> &ret_VT)
00143 { return General_singular_value_decomposition('A', 'A', A, ret_S, ret_U,
00144                                               ret_VT); }
00145
00146 BIASMathAlgo_EXPORT
00147 inline int
00148 General_singular_value_decomposition(const BIAS::Matrix<double> &A,
00149                                      BIAS::Vector<double> &ret_S,
00150                                      BIAS::Matrix<double> &ret_VT)
00151 { BIAS::Matrix<double> ret_U;
00152   return General_singular_value_decomposition('N', 'A', A, ret_S, ret_U,
00153                                               ret_VT); }
00154
00155
00156 /** converts the argument Fortran_Matrix to a Matrix and returns it.
00157     it mainly tranposes the data array because Fortran-Matrices
00158     different row/col-order
00159     @author Jan Woetzel
00160     @status bug fixed by Daniel Grest (04/2003)  */
00161 BIASMathAlgo_EXPORT
00162 BIAS::Matrix<double>
00163 Fortran_Matrix_to_Matrix(const TNT::Fortran_Matrix<double>&FMat);
00164
00165 /** converts the argument Fortran_Matrix to a Matrix and returns it.
00166     it mainly tranposes the data array because Fortran-Matrices
00167     different row/col-order, same as above but now copying necessary
00168     @author Daniel Grest
00169     @status beta April 2003*/
00170 BIASMathAlgo_EXPORT
00171 void
00172 Fortran_Matrix_to_Matrix(const TNT::Fortran_Matrix<double> &FMat,
00173                          BIAS::Matrix<double>  &res);
00174
00175 //@}
00176
00177
00178 #endif
00179 // BIASLAPACK_H
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/LeakChecking.h Source File

Base » Common

LeakChecking.h

Go to the documentation of this file.
00001
00002 /** Leak tracing with MS Visual studio and Visual Leak Detector
00003     malloc/free and new/delete are supported
00004     with correct line numbers, call stack etc...
00005     This file requires the .h extension (instead of .hh)
00006     @author Jan Woetzel 08/2005 */
00007
00008 #ifdef WIN32
00009 #  pragma once
00010 #endif
00011
00012 #ifndef __LeakChecking_h__
00013 #define __LeakChecking_h__
00014
00015 #include <bias_config.h>
00016 #if defined(BIAS_HAVE_VLD) && defined(BIAS_DEBUG) && !defined(NDEBUG)
00017
00018 // global options:
00019 #  define VLD_AGGREGATE_DUPLICATES
00020
00021 //#define VLD_MAX_DATA_DUMP 0
00022 #  define VLD_MAX_DATA_DUMP 20
00023
00024 //#  define VLD_START_DISABLED
00025
00026 // enable VLD tracing and link against vld* libraries
00027 #  include <vld.h>
00028
00029 // required if you use VLDEnable/VLDDisable
00030 #  include <vldapi.h>
00031
00032
00033 #endif // BIAS_HAVE_VLD && BIAS_DEBUG && !NDEBUG
00034 #endif //__LeakChecking_h__
00035
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/LeastSquares.cpp Source File

MathAlgo

LeastSquares.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "LeastSquares.hh"
00026
00027 #include "Lapack.hh"
00028
00029 #include <Base/Common/BIASpragma.hh>
00030
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 /////////////////////////////////////////////////////////////////////////
00036 ///           LeastSquaresBase
00037 /////////////////////////////////////////////////////////////////////////
00038
00039 int LeastSquaresBase::Init(unsigned SolutionSize, bool ReduceToATA)
00040 {
00041   _ReduceToATA=ReduceToATA;
00042   _SolutionSize=SolutionSize;
00043   _ATA.newsize(_SolutionSize, _SolutionSize);
00044   _Weight.newsize(_SolutionSize, _SolutionSize);
00045   _ATb.newsize(_SolutionSize);
00046   return 0;
00047 }
00048
00049 int LeastSquaresBase::Solve(Matrix<double> &A, Vector<double> &b,
00050                             Vector<double> &x)
00051 {
00052   BIASERR("only the overloaded function in the derived class can be used");
00053   return -1;
00054 }
00055
00056 int LeastSquaresBase::Solve(Matrix<double> &A, Vector<double> &x)
00057 {
00058   BIASERR("only the overloaded function in the derived class can be used");
00059   return -1;
00060 }
00061
00062 int LeastSquaresBase::WeightedSolve(Matrix<double> &A, Vector<double> &b,
00063                                     Vector<double> &weights, Vector<double> &x)
00064 {
00065   BIASERR("only the overloaded function in the derived class can be used");
00066   return -1;
00067 }
00068
00069 int LeastSquaresBase::WeightedSolve(Matrix<double> &A, Vector<double> &weights,
00070                                     Vector<double> &x)
00071 {
00072   BIASERR("only the overloaded function in the derived class can be used");
00073   return -1;
00074 }
00075
00076
00077 ////////////////////////////////////////////////////////////////////////////
00078 ///             LeastSquaresLapack
00079 ///////////////////////////////////////////////////////////////////////////
00080
00081
00082 int LeastSquaresLapack::Solve(Matrix<double> &A, Vector<double> &b,
00083                               Vector<double> &x)
00084 {
00085   BIASDOUT(D_LS_MATRIXES, "A: "<<A<<"\nb: "<<b);
00086   int res=0;
00087   if (_ReduceToATA){
00088     _AT=A.Transpose();
00089     _AT.Mult(A, _ATA);
00090     _AT.Mult(b, _ATb);
00091     BIASDOUT(D_LS_RED_MATRIXES, "_ATA: "<<_ATA<<"\n_ATb: "<<_ATb);
00092     x=Lapack_LLS_QR_linear_solve(_ATA, _ATb, res);
00093   } else {
00094     x=Lapack_LLS_QR_linear_solve(A, b, res);
00095   }
00096
00097   return res;
00098 }
00099
00100 int LeastSquaresLapack::Solve(Matrix<double> &A, Vector<double> &x)
00101 {
00102   BIASERR("unfinished");
00103   return -1;
00104 }
00105
00106 int LeastSquaresLapack::WeightedSolve(Matrix<double> &A, Vector<double> &b,
00107                                       Vector<double> &weights,
00108                                       Vector<double> &x)
00109 {
00110   BIASDOUT(D_LS_MATRIXES, "A: "<<A<<"\nb: "<<b);
00111   int res=0;
00112   if (_ReduceToATA){
00113     Matrix<double> wA(A);
00114     Vector<double> wb(b);
00115     for (unsigned i=0; i<_SolutionSize; i++){
00116       wA.ScaleRow(i, weights[i]);
00117       wb[i]*=weights[i];
00118     }
00119     _AT=wA.Transpose();
00120     _AT.Mult(wA, _ATA);
00121     _AT.Mult(wb, _ATb);
00122     BIASDOUT(D_LS_RED_MATRIXES, "_ATA: "<<_ATA<<"\n_ATb: "<<_ATb);
00123     x=Lapack_LLS_QR_linear_solve(_ATA, _ATb, res);
00124   } else {
00125     _Weight.newsize(A.num_rows(), A.num_rows());
00126     for (int i=0; i<A.num_rows(); i++){
00127       _Weight[i][i]=1.0/weights[i];
00128     }
00129     x=Lapack_WLLS_solve(A, b, _Weight, res);
00130   }
00131   return res;
00132 }
00133
00134 int LeastSquaresLapack::WeightedSolve(Matrix<double> &A,
00135                                       Vector<double> &weights,
00136                                       Vector<double> &x)
00137 {
00138   BIASERR("unfinished");
00139   return -1;
00140 }
00141
00142
00143 ////////////////////////////////////////////////////////////////////////////
00144 ///             LeastSquaresSVD
00145 ///////////////////////////////////////////////////////////////////////////
00146
00147
00148 /** solve |Ax-b|=min using svd with mxn Matrix A
00149
00150     |r|^2 = |Ax-b|^2 = (Ax-b)^T(Ax-b)
00151     = x^T A^T A x - x^T A^T b - b^T A x + b^T b =
00152        use x^T A^T b = b^T A x (both are real)
00153     = x^T A^T A x - 2 x^T A^T b + b^T b =
00154        use SVD(A^T A) := W S W^T since A^T A is symmetric
00155     = x^T W S W^T x - 2 x^T A^T b + b^T b =
00156        set z:=W^T x -> x=Wz or x^T = z^T W^T
00157     = z^T S z - 2 z^T W^T A^T b + b^T b =
00158        set d:= W^T A^T b
00159     = z^T S z - 2 z^T d + b^T b =
00160     = sum_i(S_i*z_i^2 - 2 z_i d_i + b_i^2)
00161
00162     d |r|^2 / dx = d|r|^2/dz * dz/dx == 0
00163     -> d|r|^2/dz=0
00164     -> z_i = d_i / S_i
00165
00166     x = W z
00167
00168     solve least squares using svd:
00169     1. calculate SVD(A^T A) = W S W^T
00170     2. calculate d = W^T A^T b
00171     3. calculate z: z_i = d_i/S_i
00172     4. calculate x = W z
00173
00174     @author woelk 04 2003 */
00175 int LeastSquaresSVD::Solve(Matrix<double> &A, Vector<double> &b,
00176                            Vector<double> &x)
00177 {
00178   BIASDOUT(D_LS_MATRIXES, "A: "<<A<<"\nb: "<<b);
00179   _AT=A.Transpose();
00180   _AT.Mult(A, _ATA);
00181   _AT.Mult(b, _ATb);
00182   BIASDOUT(D_LS_RED_MATRIXES, "_ATA: "<<_ATA<<"\n_ATb: "<<_ATb);
00183   if (_svd.Compute(_ATA)!=0){
00184      return -2;
00185   }
00186   Vector<double> d(A.num_rows()), z(A.num_cols());
00187   Vector<double> S=_svd.GetS();
00188   d=_svd.GetVT() * _ATb;
00189   BIASDOUT(D_LS_SVD, "_ATA: "<<_ATA<<"\nd: "<<d<<"\nS: "<<S);
00190   for (int i=0; i<A.num_cols(); i++)
00191     z[i]=(fabs(S[i])>DEFAULT_DOUBLE_ZERO_THRESHOLD)?d[i]/S[i]:0.0;
00192
00193   x = _svd.GetU() * z;
00194   return 0;
00195 }
00196
00197
00198 int LeastSquaresSVD::Solve(Matrix<double> &A, Vector<double> &x)
00199 {
00200   BIASDOUT(D_LS_MATRIXES, "A: "<<A);
00201   if (x.size()!=(int)_SolutionSize)
00202     x.newsize(_SolutionSize);
00203
00204   if (_ReduceToATA){
00205     _AT=A.Transpose();
00206     _AT.Mult(A, _ATA);
00207     BIASDOUT(D_LS_RED_MATRIXES, "_ATA: "<<_ATA);
00208      if (General_singular_value_decomposition(_ATA, _S, _VT)!=0){
00209       BIASERR("error in svd");
00210       return -2;
00211     }
00212     for (unsigned i=0; i<_SolutionSize; i++){
00213       x[i]=_VT[_SolutionSize-1][i];
00214     }
00215   } else {
00216     if (General_singular_value_decomposition(A, _S, _VT)!=0){
00217       BIASERR("error in svd");
00218       return -2;
00219     }
00220     for (unsigned i=0; i<_SolutionSize; i++){
00221       x[i]=_VT[_SolutionSize-1][i];
00222     }
00223   }
00224   return 0;
00225 }
00226
00227
00228 int LeastSquaresSVD::WeightedSolve(Matrix<double> &A, Vector<double> &b,
00229                                    Vector<double> &weights, Vector<double> &x)
00230 {
00231   BIASERR("unfinished");
00232   return -1;
00233 }
00234
00235 int LeastSquaresSVD::WeightedSolve(Matrix<double> &A, Vector<double> &weights,
00236                                    Vector<double> &x)
00237 {
00238   BIASDOUT(D_LS_MATRIXES, "A: "<<A<<"\nweights: "<<weights);
00239   if (x.size()!=(int)_SolutionSize)
00240     x.newsize(_SolutionSize);
00241
00242   Matrix<double> wA(A);
00243   for (unsigned i=0; i<_SolutionSize; i++){
00244     wA.ScaleRow(i, weights[i]);
00245   }
00246
00247   if (_ReduceToATA){
00248     _AT=wA.Transpose();
00249     _AT.Mult(wA, _ATA);
00250     BIASDOUT(D_LS_RED_MATRIXES, "_ATA: "<<_ATA);
00251     if (General_singular_value_decomposition(_ATA, _S, _VT)!=0){
00252       BIASERR("error in svd");
00253       return -2;
00254     }
00255     for (unsigned i=0; i<_SolutionSize; i++){
00256       x[i]=_VT[_SolutionSize-1][i];
00257     }
00258   } else {
00259     if (General_singular_value_decomposition(wA, _S, _VT)!=0){
00260       BIASERR("error in svd");
00261       return -2;
00262     }
00263     for (unsigned i=0; i<_SolutionSize; i++){
00264       x[i]=_VT[_SolutionSize-1][i];
00265     }
00266   }
00267   return 0;
00268 }
00269
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/LeastSquares.hh Source File

MathAlgo

LeastSquares.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __LeastSquares_hh__
00027 #define __LeastSquares_hh__
00028
00029 #include <Base/Math/Matrix.hh>
00030 #include <Base/Math/Vector.hh>
00031 #include "SVD.hh"
00032
00033
00034 #define D_LS_MATRIXES      0x00000001
00035 #define D_LS_RED_MATRIXES  0x00000002
00036 #define D_LS_SVD           0x00000004
00037
00038 namespace BIAS{
00039
00040   class BIASMathAlgo_EXPORT LeastSquaresBase : public Debug
00041   {
00042   public:
00043     LeastSquaresBase() : _ATA(), _AT(), _Weight(), _ATb() {};
00044     virtual ~LeastSquaresBase() {};
00045
00046     int Init(unsigned SolutionSize, bool ReduceToATA = true);
00047
00048     virtual int Solve(Matrix<double> &A, Vector<double> &b, Vector<double> &x);
00049
00050     virtual int Solve(Matrix<double> &A, Vector<double> &x);
00051
00052     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &b,
00053                               Vector<double> &weights, Vector<double> &x);
00054
00055     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &weights,
00056                               Vector<double> &x);
00057
00058   protected:
00059     bool _ReduceToATA;
00060     unsigned _SolutionSize;
00061     Matrix<double> _ATA, _AT, _Weight;
00062     Vector<double> _ATb;
00063
00064   }; // class LeastSquaresBase
00065
00066
00067
00068   class BIASMathAlgo_EXPORT LeastSquaresLapack : public LeastSquaresBase
00069   {
00070   public:
00071     LeastSquaresLapack() {};
00072     virtual ~LeastSquaresLapack() {};
00073
00074     virtual int Solve(Matrix<double> &A, Vector<double> &b, Vector<double> &x);
00075
00076     virtual int Solve(Matrix<double> &A, Vector<double> &x);
00077
00078     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &b,
00079                               Vector<double> &weights, Vector<double> &x);
00080
00081     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &weights,
00082                               Vector<double> &x);
00083
00084   }; // class LeastSquaresLapack
00085
00086
00087
00088
00089   class BIASMathAlgo_EXPORT LeastSquaresSVD : public LeastSquaresBase
00090   {
00091   public:
00092     LeastSquaresSVD() : _svd(), _VT(), _S() {};
00093     virtual ~LeastSquaresSVD() {};
00094
00095     virtual int Solve(Matrix<double> &A, Vector<double> &b, Vector<double> &x);
00096
00097     virtual int Solve(Matrix<double> &A, Vector<double> &x);
00098
00099     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &b,
00100                               Vector<double> &weights, Vector<double> &x);
00101
00102     virtual int WeightedSolve(Matrix<double> &A, Vector<double> &weights,
00103                               Vector<double> &x);
00104
00105   protected:
00106     SVD _svd;
00107     Matrix<double> _VT;
00108     Vector<double> _S;
00109
00110   }; // class LeastSquaresSVD
00111
00112 } // namespace
00113
00114 #endif // __LeastSquares_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: LGPL Source File

LGPL

Go to the documentation of this file.
00001           GNU LESSER GENERAL PUBLIC LICENSE
00002                Version 2.1, February 1999
00003
00004  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
00005      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00006  Everyone is permitted to copy and distribute verbatim copies
00007  of this license document, but changing it is not allowed.
00008
00009 [This is the first released version of the Lesser GPL.  It also counts
00010  as the successor of the GNU Library Public License, version 2, hence
00011  the version number 2.1.]
00012
00013                 Preamble
00014
00015   The licenses for most software are designed to take away your
00016 freedom to share and change it.  By contrast, the GNU General Public
00017 Licenses are intended to guarantee your freedom to share and change
00018 free software--to make sure the software is free for all its users.
00019
00020   This license, the Lesser General Public License, applies to some
00021 specially designated software packages--typically libraries--of the
00022 Free Software Foundation and other authors who decide to use it.  You
00023 can use it too, but we suggest you first think carefully about whether
00024 this license or the ordinary General Public License is the better
00025 strategy to use in any particular case, based on the explanations below.
00026
00027   When we speak of free software, we are referring to freedom of use,
00028 not price.  Our General Public Licenses are designed to make sure that
00029 you have the freedom to distribute copies of free software (and charge
00030 for this service if you wish); that you receive source code or can get
00031 it if you want it; that you can change the software and use pieces of
00032 it in new free programs; and that you are informed that you can do
00033 these things.
00034
00035   To protect your rights, we need to make restrictions that forbid
00036 distributors to deny you these rights or to ask you to surrender these
00037 rights.  These restrictions translate to certain responsibilities for
00038 you if you distribute copies of the library or if you modify it.
00039
00040   For example, if you distribute copies of the library, whether gratis
00041 or for a fee, you must give the recipients all the rights that we gave
00042 you.  You must make sure that they, too, receive or can get the source
00043 code.  If you link other code with the library, you must provide
00044 complete object files to the recipients, so that they can relink them
00045 with the library after making changes to the library and recompiling
00046 it.  And you must show them these terms so they know their rights.
00047
00048   We protect your rights with a two-step method: (1) we copyright the
00049 library, and (2) we offer you this license, which gives you legal
00050 permission to copy, distribute and/or modify the library.
00051
00052   To protect each distributor, we want to make it very clear that
00053 there is no warranty for the free library.  Also, if the library is
00054 modified by someone else and passed on, the recipients should know
00055 that what they have is not the original version, so that the original
00056 author's reputation will not be affected by problems that might be
00057 introduced by others.
00058
00059   Finally, software patents pose a constant threat to the existence of
00060 any free program.  We wish to make sure that a company cannot
00061 effectively restrict the users of a free program by obtaining a
00062 restrictive license from a patent holder.  Therefore, we insist that
00063 any patent license obtained for a version of the library must be
00064 consistent with the full freedom of use specified in this license.
00065
00066   Most GNU software, including some libraries, is covered by the
00067 ordinary GNU General Public License.  This license, the GNU Lesser
00068 General Public License, applies to certain designated libraries, and
00069 is quite different from the ordinary General Public License.  We use
00070 this license for certain libraries in order to permit linking those
00071 libraries into non-free programs.
00072
00073   When a program is linked with a library, whether statically or using
00074 a shared library, the combination of the two is legally speaking a
00075 combined work, a derivative of the original library.  The ordinary
00076 General Public License therefore permits such linking only if the
00077 entire combination fits its criteria of freedom.  The Lesser General
00078 Public License permits more lax criteria for linking other code with
00079 the library.
00080
00081   We call this license the "Lesser" General Public License because it
00082 does Less to protect the user's freedom than the ordinary General
00083 Public License.  It also provides other free software developers Less
00084 of an advantage over competing non-free programs.  These disadvantages
00085 are the reason we use the ordinary General Public License for many
00086 libraries.  However, the Lesser license provides advantages in certain
00087 special circumstances.
00088
00089   For example, on rare occasions, there may be a special need to
00090 encourage the widest possible use of a certain library, so that it becomes
00091 a de-facto standard.  To achieve this, non-free programs must be
00092 allowed to use the library.  A more frequent case is that a free
00093 library does the same job as widely used non-free libraries.  In this
00094 case, there is little to gain by limiting the free library to free
00095 software only, so we use the Lesser General Public License.
00096
00097   In other cases, permission to use a particular library in non-free
00098 programs enables a greater number of people to use a large body of
00099 free software.  For example, permission to use the GNU C Library in
00100 non-free programs enables many more people to use the whole GNU
00101 operating system, as well as its variant, the GNU/Linux operating
00102 system.
00103
00104   Although the Lesser General Public License is Less protective of the
00105 users' freedom, it does ensure that the user of a program that is
00106 linked with the Library has the freedom and the wherewithal to run
00107 that program using a modified version of the Library.
00108
00109   The precise terms and conditions for copying, distribution and
00110 modification follow.  Pay close attention to the difference between a
00111 "work based on the library" and a "work that uses the library".  The
00112 former contains code derived from the library, whereas the latter must
00113 be combined with the library in order to run.
00114
00115           GNU LESSER GENERAL PUBLIC LICENSE
00116    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
00117
00118   0. This License Agreement applies to any software library or other
00119 program which contains a notice placed by the copyright holder or
00120 other authorized party saying it may be distributed under the terms of
00121 this Lesser General Public License (also called "this License").
00122 Each licensee is addressed as "you".
00123
00124   A "library" means a collection of software functions and/or data
00125 prepared so as to be conveniently linked with application programs
00126 (which use some of those functions and data) to form executables.
00127
00128   The "Library", below, refers to any such software library or work
00129 which has been distributed under these terms.  A "work based on the
00130 Library" means either the Library or any derivative work under
00131 copyright law: that is to say, a work containing the Library or a
00132 portion of it, either verbatim or with modifications and/or translated
00133 straightforwardly into another language.  (Hereinafter, translation is
00134 included without limitation in the term "modification".)
00135
00136   "Source code" for a work means the preferred form of the work for
00137 making modifications to it.  For a library, complete source code means
00138 all the source code for all modules it contains, plus any associated
00139 interface definition files, plus the scripts used to control compilation
00140 and installation of the library.
00141
00142   Activities other than copying, distribution and modification are not
00143 covered by this License; they are outside its scope.  The act of
00144 running a program using the Library is not restricted, and output from
00145 such a program is covered only if its contents constitute a work based
00146 on the Library (independent of the use of the Library in a tool for
00147 writing it).  Whether that is true depends on what the Library does
00148 and what the program that uses the Library does.
00149
00150   1. You may copy and distribute verbatim copies of the Library's
00151 complete source code as you receive it, in any medium, provided that
00152 you conspicuously and appropriately publish on each copy an
00153 appropriate copyright notice and disclaimer of warranty; keep intact
00154 all the notices that refer to this License and to the absence of any
00155 warranty; and distribute a copy of this License along with the
00156 Library.
00157
00158   You may charge a fee for the physical act of transferring a copy,
00159 and you may at your option offer warranty protection in exchange for a
00160 fee.
00161
00162   2. You may modify your copy or copies of the Library or any portion
00163 of it, thus forming a work based on the Library, and copy and
00164 distribute such modifications or work under the terms of Section 1
00165 above, provided that you also meet all of these conditions:
00166
00167     a) The modified work must itself be a software library.
00168
00169     b) You must cause the files modified to carry prominent notices
00170     stating that you changed the files and the date of any change.
00171
00172     c) You must cause the whole of the work to be licensed at no
00173     charge to all third parties under the terms of this License.
00174
00175     d) If a facility in the modified Library refers to a function or a
00176     table of data to be supplied by an application program that uses
00177     the facility, other than as an argument passed when the facility
00178     is invoked, then you must make a good faith effort to ensure that,
00179     in the event an application does not supply such function or
00180     table, the facility still operates, and performs whatever part of
00181     its purpose remains meaningful.
00182
00183     (For example, a function in a library to compute square roots has
00184     a purpose that is entirely well-defined independent of the
00185     application.  Therefore, Subsection 2d requires that any
00186     application-supplied function or table used by this function must
00187     be optional: if the application does not supply it, the square
00188     root function must still compute square roots.)
00189
00190 These requirements apply to the modified work as a whole.  If
00191 identifiable sections of that work are not derived from the Library,
00192 and can be reasonably considered independent and separate works in
00193 themselves, then this License, and its terms, do not apply to those
00194 sections when you distribute them as separate works.  But when you
00195 distribute the same sections as part of a whole which is a work based
00196 on the Library, the distribution of the whole must be on the terms of
00197 this License, whose permissions for other licensees extend to the
00198 entire whole, and thus to each and every part regardless of who wrote
00199 it.
00200
00201 Thus, it is not the intent of this section to claim rights or contest
00202 your rights to work written entirely by you; rather, the intent is to
00203 exercise the right to control the distribution of derivative or
00204 collective works based on the Library.
00205
00206 In addition, mere aggregation of another work not based on the Library
00207 with the Library (or with a work based on the Library) on a volume of
00208 a storage or distribution medium does not bring the other work under
00209 the scope of this License.
00210
00211   3. You may opt to apply the terms of the ordinary GNU General Public
00212 License instead of this License to a given copy of the Library.  To do
00213 this, you must alter all the notices that refer to this License, so
00214 that they refer to the ordinary GNU General Public License, version 2,
00215 instead of to this License.  (If a newer version than version 2 of the
00216 ordinary GNU General Public License has appeared, then you can specify
00217 that version instead if you wish.)  Do not make any other change in
00218 these notices.
00219
00220   Once this change is made in a given copy, it is irreversible for
00221 that copy, so the ordinary GNU General Public License applies to all
00222 subsequent copies and derivative works made from that copy.
00223
00224   This option is useful when you wish to copy part of the code of
00225 the Library into a program that is not a library.
00226
00227   4. You may copy and distribute the Library (or a portion or
00228 derivative of it, under Section 2) in object code or executable form
00229 under the terms of Sections 1 and 2 above provided that you accompany
00230 it with the complete corresponding machine-readable source code, which
00231 must be distributed under the terms of Sections 1 and 2 above on a
00232 medium customarily used for software interchange.
00233
00234   If distribution of object code is made by offering access to copy
00235 from a designated place, then offering equivalent access to copy the
00236 source code from the same place satisfies the requirement to
00237 distribute the source code, even though third parties are not
00238 compelled to copy the source along with the object code.
00239
00240   5. A program that contains no derivative of any portion of the
00241 Library, but is designed to work with the Library by being compiled or
00242 linked with it, is called a "work that uses the Library".  Such a
00243 work, in isolation, is not a derivative work of the Library, and
00244 therefore falls outside the scope of this License.
00245
00246   However, linking a "work that uses the Library" with the Library
00247 creates an executable that is a derivative of the Library (because it
00248 contains portions of the Library), rather than a "work that uses the
00249 library".  The executable is therefore covered by this License.
00250 Section 6 states terms for distribution of such executables.
00251
00252   When a "work that uses the Library" uses material from a header file
00253 that is part of the Library, the object code for the work may be a
00254 derivative work of the Library even though the source code is not.
00255 Whether this is true is especially significant if the work can be
00256 linked without the Library, or if the work is itself a library.  The
00257 threshold for this to be true is not precisely defined by law.
00258
00259   If such an object file uses only numerical parameters, data
00260 structure layouts and accessors, and small macros and small inline
00261 functions (ten lines or less in length), then the use of the object
00262 file is unrestricted, regardless of whether it is legally a derivative
00263 work.  (Executables containing this object code plus portions of the
00264 Library will still fall under Section 6.)
00265
00266   Otherwise, if the work is a derivative of the Library, you may
00267 distribute the object code for the work under the terms of Section 6.
00268 Any executables containing that work also fall under Section 6,
00269 whether or not they are linked directly with the Library itself.
00270
00271   6. As an exception to the Sections above, you may also combine or
00272 link a "work that uses the Library" with the Library to produce a
00273 work containing portions of the Library, and distribute that work
00274 under terms of your choice, provided that the terms permit
00275 modification of the work for the customer's own use and reverse
00276 engineering for debugging such modifications.
00277
00278   You must give prominent notice with each copy of the work that the
00279 Library is used in it and that the Library and its use are covered by
00280 this License.  You must supply a copy of this License.  If the work
00281 during execution displays copyright notices, you must include the
00282 copyright notice for the Library among them, as well as a reference
00283 directing the user to the copy of this License.  Also, you must do one
00284 of these things:
00285
00286     a) Accompany the work with the complete corresponding
00287     machine-readable source code for the Library including whatever
00288     changes were used in the work (which must be distributed under
00289     Sections 1 and 2 above); and, if the work is an executable linked
00290     with the Library, with the complete machine-readable "work that
00291     uses the Library", as object code and/or source code, so that the
00292     user can modify the Library and then relink to produce a modified
00293     executable containing the modified Library.  (It is understood
00294     that the user who changes the contents of definitions files in the
00295     Library will not necessarily be able to recompile the application
00296     to use the modified definitions.)
00297
00298     b) Use a suitable shared library mechanism for linking with the
00299     Library.  A suitable mechanism is one that (1) uses at run time a
00300     copy of the library already present on the user's computer system,
00301     rather than copying library functions into the executable, and (2)
00302     will operate properly with a modified version of the library, if
00303     the user installs one, as long as the modified version is
00304     interface-compatible with the version that the work was made with.
00305
00306     c) Accompany the work with a written offer, valid for at
00307     least three years, to give the same user the materials
00308     specified in Subsection 6a, above, for a charge no more
00309     than the cost of performing this distribution.
00310
00311     d) If distribution of the work is made by offering access to copy
00312     from a designated place, offer equivalent access to copy the above
00313     specified materials from the same place.
00314
00315     e) Verify that the user has already received a copy of these
00316     materials or that you have already sent this user a copy.
00317
00318   For an executable, the required form of the "work that uses the
00319 Library" must include any data and utility programs needed for
00320 reproducing the executable from it.  However, as a special exception,
00321 the materials to be distributed need not include anything that is
00322 normally distributed (in either source or binary form) with the major
00323 components (compiler, kernel, and so on) of the operating system on
00324 which the executable runs, unless that component itself accompanies
00325 the executable.
00326
00327   It may happen that this requirement contradicts the license
00328 restrictions of other proprietary libraries that do not normally
00329 accompany the operating system.  Such a contradiction means you cannot
00330 use both them and the Library together in an executable that you
00331 distribute.
00332
00333   7. You may place library facilities that are a work based on the
00334 Library side-by-side in a single library together with other library
00335 facilities not covered by this License, and distribute such a combined
00336 library, provided that the separate distribution of the work based on
00337 the Library and of the other library facilities is otherwise
00338 permitted, and provided that you do these two things:
00339
00340     a) Accompany the combined library with a copy of the same work
00341     based on the Library, uncombined with any other library
00342     facilities.  This must be distributed under the terms of the
00343     Sections above.
00344
00345     b) Give prominent notice with the combined library of the fact
00346     that part of it is a work based on the Library, and explaining
00347     where to find the accompanying uncombined form of the same work.
00348
00349   8. You may not copy, modify, sublicense, link with, or distribute
00350 the Library except as expressly provided under this License.  Any
00351 attempt otherwise to copy, modify, sublicense, link with, or
00352 distribute the Library is void, and will automatically terminate your
00353 rights under this License.  However, parties who have received copies,
00354 or rights, from you under this License will not have their licenses
00355 terminated so long as such parties remain in full compliance.
00356
00357   9. You are not required to accept this License, since you have not
00358 signed it.  However, nothing else grants you permission to modify or
00359 distribute the Library or its derivative works.  These actions are
00360 prohibited by law if you do not accept this License.  Therefore, by
00361 modifying or distributing the Library (or any work based on the
00362 Library), you indicate your acceptance of this License to do so, and
00363 all its terms and conditions for copying, distributing or modifying
00364 the Library or works based on it.
00365
00366   10. Each time you redistribute the Library (or any work based on the
00367 Library), the recipient automatically receives a license from the
00368 original licensor to copy, distribute, link with or modify the Library
00369 subject to these terms and conditions.  You may not impose any further
00370 restrictions on the recipients' exercise of the rights granted herein.
00371 You are not responsible for enforcing compliance by third parties with
00372 this License.
00373
00374   11. If, as a consequence of a court judgment or allegation of patent
00375 infringement or for any other reason (not limited to patent issues),
00376 conditions are imposed on you (whether by court order, agreement or
00377 otherwise) that contradict the conditions of this License, they do not
00378 excuse you from the conditions of this License.  If you cannot
00379 distribute so as to satisfy simultaneously your obligations under this
00380 License and any other pertinent obligations, then as a consequence you
00381 may not distribute the Library at all.  For example, if a patent
00382 license would not permit royalty-free redistribution of the Library by
00383 all those who receive copies directly or indirectly through you, then
00384 the only way you could satisfy both it and this License would be to
00385 refrain entirely from distribution of the Library.
00386
00387 If any portion of this section is held invalid or unenforceable under any
00388 particular circumstance, the balance of the section is intended to apply,
00389 and the section as a whole is intended to apply in other circumstances.
00390
00391 It is not the purpose of this section to induce you to infringe any
00392 patents or other property right claims or to contest validity of any
00393 such claims; this section has the sole purpose of protecting the
00394 integrity of the free software distribution system which is
00395 implemented by public license practices.  Many people have made
00396 generous contributions to the wide range of software distributed
00397 through that system in reliance on consistent application of that
00398 system; it is up to the author/donor to decide if he or she is willing
00399 to distribute software through any other system and a licensee cannot
00400 impose that choice.
00401
00402 This section is intended to make thoroughly clear what is believed to
00403 be a consequence of the rest of this License.
00404
00405   12. If the distribution and/or use of the Library is restricted in
00406 certain countries either by patents or by copyrighted interfaces, the
00407 original copyright holder who places the Library under this License may add
00408 an explicit geographical distribution limitation excluding those countries,
00409 so that distribution is permitted only in or among countries not thus
00410 excluded.  In such case, this License incorporates the limitation as if
00411 written in the body of this License.
00412
00413   13. The Free Software Foundation may publish revised and/or new
00414 versions of the Lesser General Public License from time to time.
00415 Such new versions will be similar in spirit to the present version,
00416 but may differ in detail to address new problems or concerns.
00417
00418 Each version is given a distinguishing version number.  If the Library
00419 specifies a version number of this License which applies to it and
00420 "any later version", you have the option of following the terms and
00421 conditions either of that version or of any later version published by
00422 the Free Software Foundation.  If the Library does not specify a
00423 license version number, you may choose any version ever published by
00424 the Free Software Foundation.
00425
00426   14. If you wish to incorporate parts of the Library into other free
00427 programs whose distribution conditions are incompatible with these,
00428 write to the author to ask for permission.  For software which is
00429 copyrighted by the Free Software Foundation, write to the Free
00430 Software Foundation; we sometimes make exceptions for this.  Our
00431 decision will be guided by the two goals of preserving the free status
00432 of all derivatives of our free software and of promoting the sharing
00433 and reuse of software generally.
00434
00435                 NO WARRANTY
00436
00437   15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
00438 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
00439 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
00440 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
00441 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
00442 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00443 PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
00444 LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
00445 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
00446
00447   16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
00448 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
00449 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
00450 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
00451 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
00452 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
00453 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
00454 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
00455 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
00456 DAMAGES.
00457
00458              END OF TERMS AND CONDITIONS
00459
00460            How to Apply These Terms to Your New Libraries
00461
00462   If you develop a new library, and you want it to be of the greatest
00463 possible use to the public, we recommend making it free software that
00464 everyone can redistribute and change.  You can do so by permitting
00465 redistribution under these terms (or, alternatively, under the terms of the
00466 ordinary General Public License).
00467
00468   To apply these terms, attach the following notices to the library.  It is
00469 safest to attach them to the start of each source file to most effectively
00470 convey the exclusion of warranty; and each file should have at least the
00471 "copyright" line and a pointer to where the full notice is found.
00472
00473     <one line to give the library's name and a brief idea of what it does.>
00474     Copyright (C) <year>  <name of author>
00475
00476     This library is free software; you can redistribute it and/or
00477     modify it under the terms of the GNU Lesser General Public
00478     License as published by the Free Software Foundation; either
00479     version 2.1 of the License, or (at your option) any later version.
00480
00481     This library is distributed in the hope that it will be useful,
00482     but WITHOUT ANY WARRANTY; without even the implied warranty of
00483     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00484     Lesser General Public License for more details.
00485
00486     You should have received a copy of the GNU Lesser General Public
00487     License along with this library; if not, write to the Free Software
00488     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00489
00490 Also add information on how to contact you by electronic and paper mail.
00491
00492 You should also get your employer (if you work as a programmer) or your
00493 school, if any, to sign a "copyright disclaimer" for the library, if
00494 necessary.  Here is a sample; alter the names:
00495
00496   Yoyodyne, Inc., hereby disclaims all copyright interest in the
00497   library `Frob' (a library for tweaking knobs) written by James Random Hacker.
00498
00499   <signature of Ty Coon>, 1 April 1990
00500   Ty Coon, President of Vice
00501
00502 That's all there is to it!
00503
00504
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: LICENSE Source File

LICENSE

Go to the documentation of this file.
00001 BIAS - Basic Image AlgoritmS C++ library
00002 Developed at MIP - University of Kiel/Germany
00003
00004 ---------------------------------------------
00005
00006 BIAS License
00007
00008 This file describes the license issues for the BIAS library.
00009
00010 Most parts of BIAS have been developed at the Multimedia Information
00011 Processing Group at University Kiel, Germany. These parts can be used
00012 under the terms of the GNU Lesser General Public License <LGPL.html>
00013 (LGPL). An appropriate notice can be found at the top of each file
00014 covered by this license.
00015
00016 However, some parts of BIAS have been developed by third parties and included
00017 in BIAS for convenience. The copyright of these parts remain at their
00018 original authors and the conditions to use, modify or distribute can be
00019 different (not GNU Lesser General Public License).
00020 An appropriate notice should be found at the top of each file
00021 which is not covered by LGPL license.
00022
00023 List of foreign software components:
00024
00025 Name        Description         Location            License
00026 TNT     Template Numerical Toolkit  Base/Match/tnt          PublicDomain
00027 Minpack     nonlinear optimization      MathAlgo/minpack        ??
00028 Netlib      nonlinear optimization      MathAlgo/netlib         ?
00029 SUSAN       Corner Detector         CornerDetectors/Susan.cpp   Research Only
00030 ViffHeader  Viff image file format      Base/Image          ??
00031 libdv       excerpts of libdv       Base/Image/DV           ?
00032 KLT-affine  affine extension of KLT     Matcher2D/TrackerBase.cpp   see file
00033
00034 BIAS and all it components ar edistributed int the hope that it will be useful.
00035 However, please note:
00036
00037 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
00038 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00039 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00040 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00041 AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00042 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00043 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00044 SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00045 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00046 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00048 OF THE POSSIBILITY OF SUCH DAMAGE.
Generated on Wed Jun 21 19:01:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/license.dox File Reference

Doc/license.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/LinearRegionDetector.cpp Source File

FeatureDetector

LinearRegionDetector.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "LinearRegionDetector.hh"
00026 #include <Base/Image/ImageConvert.hh>
00027 #ifdef BIAS_DEBUG
00028 #include <Base/Image/ImageIO.hh>
00029 #endif
00030
00031   //#define TIME_MEASURE
00032 #define MIN_EIGENVALUE_RATIO 4.0
00033 #include <Base/Debug/TimeMeasure.hh>
00034
00035 #include <limits.h>
00036 #include <algorithm>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 //////////////////////////////////////////////////////////////////////////
00042 //                 implementation
00043 //////////////////////////////////////////////////////////////////////////
00044
00045
00046 template <class StorageType, class CalculationType>
00047 LinearRegionDetector<StorageType, CalculationType>::
00048 LinearRegionDetector()
00049   : CornerDetectorGradient<StorageType, CalculationType>()
00050
00051 {
00052
00053 }
00054
00055 template <class StorageType, class CalculationType>
00056 LinearRegionDetector<StorageType, CalculationType>::
00057 LinearRegionDetector(Param& para, const std::string& postfix)
00058   : CornerDetectorGradient<StorageType, CalculationType>(para, postfix)
00059
00060 {
00061   //  int grp=para.GetFreeGroupID();
00062   //_AddParam(para, grp, "-LinearRegionDetector"+postfix);
00063   //if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "LinearRegionDetector");
00064 }
00065
00066 template <class StorageType, class CalculationType>
00067 LinearRegionDetector<StorageType, CalculationType>::
00068 LinearRegionDetector(Param& para, const int grp, const std::string& postfix)
00069 : CornerDetectorGradient<StorageType,CalculationType>(para, grp, postfix)
00070
00071 {
00072   //  _AddParam(para, grp, postfix+"-LinearRegionDetector");
00073 }
00074
00075 template <class StorageType, class CalculationType>
00076 LinearRegionDetector<StorageType, CalculationType>::~LinearRegionDetector()
00077 {}
00078
00079
00080
00081 //////////////////////////////////////////////////////////////////////////////
00082 //                      protected functions
00083 //////////////////////////////////////////////////////////////////////////////
00084
00085
00086 template <class StorageType, class CalculationType>
00087 int LinearRegionDetector<StorageType, CalculationType>::
00088 _ComputeCornerness(Image<CalculationType>& mineig)
00089 {
00090 #ifdef BIAS_DEBUG
00091   // _FeatureMap is only allocated when this->_Cornerness is allocated
00092   BIASASSERT(this->_Cornerness.SamePixelAndChannelCount(this->_sgxx));
00093   BIASASSERT(this->_Cornerness.SamePixelAndChannelCount(mineig));
00094 #endif
00095   int tlx, tly, brx, bry;
00096   this->_sgxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00097   mineig.GetROI()->SetCorners(tlx, tly, brx, bry);
00098   const int minx=tlx;
00099   const int miny=tly;
00100   const int maxx=brx;
00101   const int maxy=bry;
00102
00103   register int x, y;
00104   register double gxx, gyy, gxy, ev1, ev2;
00105   register const double me=(double)*this->_MinCornerness;
00106   Feat fp; this->_FeatList.clear();
00107   this->_FeatList.reserve((brx-tlx)*(bry-tly));
00108   register CalculationType **ime=mineig.GetImageDataArray();
00109   register CalculationType **isgxx=this->_sgxx.GetImageDataArray();
00110   register CalculationType **isgxy=this->_sgxy.GetImageDataArray();
00111   register CalculationType **isgyy=this->_sgyy.GetImageDataArray();
00112
00113
00114   for (y=miny; y<maxy; y++){
00115     for (x=minx; x<maxx; x++){
00116       gxx=(double)(isgxx[y][x]);
00117       gyy=(double)isgyy[y][x];
00118       gxy=(double)isgxy[y][x];
00119       double tmpsqrt = sqrt((gxx - gyy)*(gxx - gyy)+4.0*gxy*gxy);
00120       ev1=((gxx+gyy+tmpsqrt)/2.0);
00121       ev2=((gxx+gyy-tmpsqrt)/2.0);
00122       ime[y][x]=(CalculationType)fabs(ev1/ev2);
00123       if ((fabs(ev1/ev2)>MIN_EIGENVALUE_RATIO) && (ev1>me)){
00124         double gg=0;
00125         for (int i=-2; i<3; i++)
00126           for (int j=-2; j<3; j++)
00127             gg += (gxx-isgxx[y+i][x+j])*(gxx-isgxx[y+i][x+j])
00128               +(gyy-isgyy[y+i][x+j])*(gyy-isgyy[y+i][x+j])
00129               +(gxy-isgxy[y+i][x+j])*(gxy-isgxy[y+i][x+j]);
00130
00131         if (gg<100000.0) {
00132           fp.x=x;
00133           fp.y=y;
00134           fp.val=(ev1>(double)INT_MAX)?(INT_MAX):((int)ev1);
00135           this->_FeatList.push_back(fp);
00136         }
00137       }
00138     }
00139   }
00140 #ifdef BIAS_DEBUG
00141   if (this->DebugLevelIsSet(D_CD_WRITE_DEBUG_IM)){
00142     ImageIO::Write("maxeig.mip", mineig);
00143   }
00144 #endif
00145   return 0;
00146 }
00147
00148
00149
00150 //////////////////////////////////////////////////////////////////////////
00151 //                 instantiation
00152 //////////////////////////////////////////////////////////////////////////
00153
00154 template class LinearRegionDetector<float, float>;
00155
00156 // fill in instances as required
00157 #ifdef BUILD_IMAGE_INT
00158 template class LinearRegionDetector<unsigned char, int>;
00159 #endif
00160 #ifdef BUILD_IMAGE_CHAR
00161 #endif
00162 #ifdef BUILD_IMAGE_SHORT
00163 #endif
00164 #ifdef BUILD_IMAGE_USHORT
00165 #ifdef BUILD_IMAGE_INT
00166 template class LinearRegionDetector<unsigned short, int>;
00167 #endif
00168 #endif
00169 #ifdef BUILD_IMAGE_UINT
00170 #endif
00171 #ifdef BUILD_IMAGE_DOUBLE
00172 #endif
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: FeatureDetector/LinearRegionDetector.hh Source File

FeatureDetector

LinearRegionDetector.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __LinearRegionDetector_hh__
00026 #define __LinearRegionDetector_hh__
00027
00028 #include "CornerDetectorGradient.hh"
00029
00030 namespace BIAS {
00031
00032   /** @class LinearRegionDetector
00033       @ingroup g_feature
00034       @brief try to detect linear regions (const gradient) in images, experimental code for testing
00035       @author koeser 09/2004 */
00036   template <class StorageType, class CalculationType>
00037   class BIASFeatureDetector_EXPORT LinearRegionDetector
00038     : public CornerDetectorGradient<StorageType, CalculationType>
00039   {
00040   public:
00041     LinearRegionDetector();
00042
00043     LinearRegionDetector(Param& para, const std::string& postfix="");
00044
00045     LinearRegionDetector(Param& para,
00046                             const int grp,const std::string& postfix);
00047
00048     ~LinearRegionDetector();
00049
00050     protected:
00051     /** @brief Computes the larger eigenvalue of the structure tensor
00052         points are accepted only if smaller eigenvalue is significantly smaller
00053         than the larger one
00054
00055         c = max(e1,e2)
00056         Also fills up _FeatList.
00057         @author koeser 09/2004
00058         @todo optimize for ROI usage */
00059       virtual int _ComputeCornerness(Image<CalculationType>& im);
00060
00061
00062   }; // class
00063
00064 } // namespace
00065
00066
00067 #endif // __LinearRegionDetector_hh__
Generated on Wed Jun 21 19:00:56 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/LineMatcher.cpp Source File

Matcher2D

LineMatcher.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Base/Image/ScanLine.hh"
00026 #include <float.h>
00027
00028 template <class StorageType>
00029 int RegionMatcher::LineMatcherNCC(unsigned int p1[2], unsigned int start2[2],
00030                                   unsigned int end2[2],
00031                                   StorageType **ida1, StorageType **ida2,
00032                                   StorageType **grad1, StorageType **grad2,
00033                                   unsigned int halfwinsize,
00034                                   unsigned int epsilon,
00035                                   double gradientscale,
00036                                   unsigned int result[2],
00037                                   double& correlation)
00038 {
00039   int res=0;
00040   ScanLine scan(start2, end2, epsilon);
00041   unsigned int next[2];
00042   StorageType grad_threshold=
00043     (StorageType)rint((double)grad1[p1[1]][p1[0]]*gradientscale);
00044   double tmpcorr;
00045
00046   correlation=-1.1;
00047   while (scan.GetNext(next)){
00048     BIASDOUT(D_REGION_MATCHER_LINE, "point ("<<next[0]<<", "<<next[1]<<")");
00049     if (grad2[next[1]][next[0]]>=grad_threshold){
00050       NCC(p1, next, ida1, ida2, halfwinsize, tmpcorr);
00051 //        cerr << "p1 ("<<p1[0]<<", "<<p1[1]<<")\tnext ("<<next[0]<<", "
00052 //         <<next[1]<<")\tcorr: "<<tmpcorr<<endl;
00053       BIASDOUT(D_REGION_MATCHER_LINE, "gradient is big enough "
00054            <<(int)(grad2[next[1]][next[0]])<<" > "<<gradientscale<<" * "
00055            <<(int)(grad1[p1[1]][p1[0]])<<"\tcorrelation: "<<tmpcorr);
00056       if (tmpcorr>correlation){
00057     result[0]=next[0];
00058     result[1]=next[1];
00059     correlation=tmpcorr;
00060       }
00061     } else { // if (grad2[next[1]][next[0]]>grad_threshold){
00062       BIASDOUT(D_REGION_MATCHER_LINE, "gradient too small "
00063            <<(int)(grad2[next[1]][next[0]])<<" <= "<<gradientscale<<"*"
00064            <<(int)(grad1[p1[1]][p1[0]])<<" = "<<(int)grad_threshold);
00065     }
00066   } // while
00067   if (correlation<-1.0) res=-1;
00068
00069   return res;
00070 }
00071
00072
00073 template <class StorageType> int
00074 RegionMatcher::LineMatcherSAD(unsigned int p1[2], unsigned int start2[2],
00075                   unsigned int end2[2],
00076                   StorageType **ida1, StorageType **ida2,
00077                   StorageType **grad1, StorageType **grad2,
00078                   unsigned int halfwinsize, unsigned int epsilon,
00079                   double gradientscale, unsigned int result[2],
00080                   double& sad)
00081 {
00082   int res=0;
00083   ScanLine scan(start2, end2, epsilon);
00084   unsigned int next[2];
00085   StorageType grad_threshold=
00086     (StorageType)rint((double)grad1[p1[1]][p1[0]]*gradientscale);
00087   double tmpcorr;
00088
00089   sad=DBL_MAX;
00090   while (scan.GetNext(next)){
00091     BIASDOUT(D_REGION_MATCHER_LINE, "point ("<<next[0]<<", "<<next[1]<<")");
00092     if (grad2[next[1]][next[0]]>=grad_threshold){
00093       SAD(p1, next, ida1, ida2, halfwinsize, tmpcorr);
00094 //        cerr << "p1 ("<<p1[0]<<", "<<p1[1]<<")\tnext ("<<next[0]<<", "
00095 //         <<next[1]<<")\tcorr: "<<tmpcorr<<endl;
00096       BIASDOUT(D_REGION_MATCHER_LINE, "gradient is big enough "
00097            <<(int)(grad2[next[1]][next[0]])<<" > "<<gradientscale<<" * "
00098            <<(int)(grad1[p1[1]][p1[0]])<<"\tsad: "<<tmpcorr);
00099       if (tmpcorr<sad){
00100     result[0]=next[0];
00101     result[1]=next[1];
00102     sad=tmpcorr;
00103       }
00104     } else { // if (grad2[next[1]][next[0]]>grad_threshold){
00105       BIASDOUT(D_REGION_MATCHER_LINE, "gradient too small "
00106            <<(int)(grad2[next[1]][next[0]])<<" <= "<<gradientscale<<"*"
00107            <<(int)(grad1[p1[1]][p1[0]])<<" = "<<(int)grad_threshold);
00108     }
00109   } // while
00110   if (sad==DBL_MAX) res=-1;
00111
00112   return res;
00113 }
00114
00115
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/LogFacility.cpp Source File

Base » Debug

LogFacility.cpp

Go to the documentation of this file.
00001 #include "LogFacility.hh"
00002
00003
00004 using namespace BIAS;
00005 using namespace std;
00006
00007
00008 LogFacility * LogFacility::pInstance_ = NULL;
00009
00010
00011
00012 LogFacility::LogFacility():zLogStream_(std::cerr.rdbuf())
00013 {
00014
00015   dLogLevel_ = BIAS_LOG_DEBUG;
00016   bCodeInfo_ = false;
00017   bAbortOnFatal_ = false;
00018 }
00019
00020
00021
00022 LogFacility::LogFacility(const LogFacility &):zLogStream_(std::cerr.rdbuf())
00023 {
00024 }
00025
00026 LogFacility &LogFacility::operator=(const LogFacility &)
00027 {
00028  return *Instance();
00029 }
00030
00031 void LogFacility::SetInstance(LogFacility *other)
00032 {
00033   if (pInstance_ != other) {
00034     delete pInstance_;
00035     pInstance_= other;
00036   }
00037 }
00038
00039
00040 void LogFacility::DeleteInstance()
00041 {
00042   SetInstance(NULL);
00043 }
00044
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/LogFacility.hh Source File

Base » Debug

LogFacility.hh

Go to the documentation of this file.
00001 #ifndef __LOGFACILITY_H__
00002 #define __LOGFACILITY_H__
00003
00004 #ifdef WIN32
00005 #  pragma once
00006 #endif // WIN32
00007
00008 #include <bias_config.h>
00009 #include <iostream>
00010 #include <fstream>
00011
00012 // NEVER use namespace in headers! (jw)
00013
00014
00015 /*************************************************
00016 @class LogFacility
00017
00018
00019 @brief general class to handle logging in BIAS. Classes that want to
00020 use logging have to be derived from LogFacility, set the Loglevel and
00021 all logging will be send to the given stream (file/stdout...)
00022
00023 The idea of LogFacility is, to set up a third stream (in addision to
00024 cout and cerr) using a LogLevel-mechanism to control
00025 verbosity. Appications and high-level libs can write information into
00026 this stream depending on one global log-level.  This stream ist sent
00027 to cerr by default, but it can be redirected into a file or to any
00028 rdbuf available.
00029
00030 In Contrast to BIAS::Debug is also works for non-debug builds (#undef
00031 BIAS_DEBUG). Lowlevel-lib (like here in BIAS and in MIP) should not
00032 use this channel to discuss problems with the user.
00033
00034 The LogLevel is an enum (therefor an int) with the following order:
00035 BIAS_LOG_NONE < BIAS_LOG_FATAL < BIAS_LOG_WARNING < BIAS_LOG_INFO <
00036 BIAS_LOG_DEBUG.  Increasing the current LogLevel results in more
00037 verbose reporting.
00038
00039 To send a message the usage of one of the magic macros is
00040 recommened. The generic macro is BIASLOG(x,y) with two parameters: x
00041 is the log level and y is the message.  Programmers should think
00042 carefully which information belongs to which level. Time-critical code
00043 sections should only use BIAS_LOG_DEBUG, while BIAS_LOG_NONE should
00044 not be used in BIASLOG().  For convenience and to save space in the
00045 code line the following abbreviations are available:
00046
00047 BLF(x) : BIASLOG(BIAS_LOG_FATAL,x)
00048 BLW(x) : BIASLOG(BIAS_LOG_WARNING,x)
00049 BLI(x) : BIASLOG(BIAS_LOG_INFO,x)
00050 BLD(x) : BIASLOG(BIAS_LOG_DEBUG,x)
00051
00052 The flag bCodeInfo_ controls if file names and line numbers are shown.
00053
00054 @author ischiller evers
00055 @date 11/05
00056
00057 *************************************************/
00058 /// \todo it is bad style to disable a warning in a header because of the side effects-
00059 /// but it is hard to avoid in a macro... implement BIAS_LOG_FATALwith one parameter in addition to BIAS_LOG(msg, BIAS_LOG_FATAL) (jw)
00060 #ifdef WIN32
00061 #  pragma warning (disable: 4127)
00062 #endif
00063
00064
00065 //call BIASLOG(BIAS_LOG_LEVEL,"output")
00066 #define BIASLOG(x,y){\
00067   std::ostream _cods_(std::cout.rdbuf()); \
00068   BIAS::LogFacility::Instance()->GetLogStream(_cods_); \
00069   if(x<=BIAS::LogFacility::Instance()->GetLogLevel() && _cods_.good()) {  \
00070   if(BIAS::LogFacility::Instance()->GetShowCodeInfo()) \
00071   _cods_<<__FILE__<<", "<< __LINE__ << " : ";\
00072   _cods_<<y<<std::endl;   \
00073   }\
00074   if( BIAS::LogFacility::Instance()->GetAbortOnFatal() && x==BIAS::BIAS_LOG_FATAL){ \
00075   _cods_<<"Aborting in "<<__FILE__<<", "<<__LINE__<<endl;\
00076   abort();}\
00077 }
00078
00079 //if no logging level is given, always log to stream
00080 #define BIASLOGALWAYS(y){\
00081   std::ostream _cods_(std::cout.rdbuf()); \
00082   this->GetLogStream(_cods_); \
00083   if(x<=this->dLogLevel_ && _cods_.good()) {  \
00084   _cods_<<y<<std::endl; _cods_.flush();\
00085   }\
00086 }
00087
00088
00089
00090 // for Kevin:
00091 //#define PLAIN_COUT_LOGGING
00092
00093
00094 #ifndef PLAIN_COUT_LOGGING
00095 # define BLD(y) BIASLOG(BIAS::BIAS_LOG_DEBUG, y)
00096 # define BLI(y) BIASLOG(BIAS::BIAS_LOG_INFO, y)
00097 # define BLW(y) BIASLOG(BIAS::BIAS_LOG_WARNING, y)
00098 # define BLF(y) BIASLOG(BIAS::BIAS_LOG_FATAL, y)
00099 #else
00100 # define BLD(y) cout<< y<<endl;
00101 # define BLI(y) cout<< y<<endl;
00102 # define BLW(y) cout<< y<<endl;
00103 # define BLF(y) cout<< y<<endl;
00104 #endif
00105
00106
00107 namespace BIAS{
00108
00109
00110   enum BIAS_LOG_LEVEL{
00111     BIAS_LOG_NONE = 0,
00112     BIAS_LOG_FATAL,
00113     BIAS_LOG_WARNING,
00114     BIAS_LOG_INFO,
00115     BIAS_LOG_DEBUG
00116   };
00117
00118   class BIASDebug_EXPORT LogFacility
00119   {
00120   public:
00121
00122     static LogFacility * Instance(){
00123       if (pInstance_== NULL)
00124         pInstance_ = new LogFacility;
00125       return pInstance_;
00126     };
00127
00128     static void SetInstance(LogFacility *other);
00129
00130     /// avoid memory leaks by explicit delete on instance JW
00131     static void DeleteInstance();
00132
00133     bool OpenLogFile(const std::string &sFileName){
00134       if(zLogFileStream_.is_open())
00135         zLogFileStream_.close();
00136
00137       // zLogStream_.clear();
00138
00139       zLogFileStream_.open(sFileName.c_str(), std::ios_base::out | std::ios_base::trunc);
00140       if (zLogFileStream_)
00141         zLogStream_.rdbuf(zLogFileStream_.rdbuf());
00142       return true;
00143     };
00144
00145     bool SetLogLevel(BIAS_LOG_LEVEL dLogLevel){
00146       dLogLevel_ = dLogLevel;
00147       return true;
00148     };
00149
00150     inline BIAS_LOG_LEVEL GetLogLevel(){
00151       return dLogLevel_;
00152     };
00153
00154     bool SetLogStream(std::ostream zStream){
00155       if (zLogFileStream_.is_open())
00156         zLogFileStream_.close();
00157       zLogStream_.rdbuf(zStream.rdbuf());
00158       return true;
00159     };
00160
00161     inline bool GetLogStream(std::ostream &zStream){
00162       zStream.rdbuf(zLogStream_.rdbuf());
00163       return true;
00164     };
00165
00166     inline std::ostream & GetLogStream(){
00167
00168       return zLogStream_;
00169     };
00170
00171     bool ResetStream(){
00172       if(zLogFileStream_.is_open())
00173         zLogFileStream_.close();
00174       zLogStream_.rdbuf(std::cerr.rdbuf());
00175       return true;
00176     };
00177
00178     inline void PrintLogLevel(){
00179       zLogStream_<<"Current LogLevel: ";
00180       switch (dLogLevel_)
00181       {
00182       case BIAS_LOG_NONE: zLogStream_<<"BIAS_LOG_NONE"<<std::endl; break;
00183       case BIAS_LOG_FATAL: zLogStream_<<"BIAS_LOG_FATAL"<<std::endl; break;
00184       case BIAS_LOG_WARNING: zLogStream_<<"BIAS_LOG_WARNINR"<<std::endl; break;
00185       case BIAS_LOG_INFO: zLogStream_<<"BIAS_LOG_INFO"<<std::endl; break;
00186       case BIAS_LOG_DEBUG: zLogStream_<<"BIAS_LOG_DEBUG"<<std::endl; break;
00187       }
00188     };
00189
00190     inline void SetShowCodeInfo(bool b) {
00191       bCodeInfo_ = b;
00192     };
00193     inline bool GetShowCodeInfo(){
00194       return bCodeInfo_;
00195     };
00196
00197     inline void SetAbortOnFatal(bool b) {
00198       bAbortOnFatal_ = b;
00199     };
00200     inline bool GetAbortOnFatal(){
00201       return bAbortOnFatal_;
00202     };
00203
00204   protected:
00205     /// no one can inherit from me
00206     LogFacility(void);
00207
00208     /// no one can copy me
00209     LogFacility(const LogFacility &l);
00210     LogFacility &operator=(const LogFacility &l);
00211
00212     ~LogFacility(void)
00213     {
00214       if (zLogFileStream_.is_open()) {
00215         zLogFileStream_.close();
00216         zLogStream_.rdbuf(std::cerr.rdbuf());
00217       }
00218     };
00219
00220
00221     //the Stream to write logging to
00222     std::ostream  zLogStream_;
00223     //the int holding the LogLevel
00224     BIAS_LOG_LEVEL dLogLevel_;
00225
00226     std::ofstream zLogFileStream_;
00227     bool bCodeInfo_;
00228     bool bAbortOnFatal_;
00229
00230     static LogFacility *pInstance_;
00231
00232   };
00233 }// end namespace
00234 #endif
00235
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/LogPolarMapping.cpp Source File

Image

LogPolarMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Image/LogPolarMapping.hh"
00026 #include <Base/Geometry/HomgPoint2D.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031
00032 template <class InputStorageType, class OutputStorageType>
00033 LogPolarMapping<InputStorageType, OutputStorageType>::
00034 ~LogPolarMapping()
00035 {}
00036
00037 template <class InputStorageType, class OutputStorageType>
00038 LogPolarMapping<InputStorageType, OutputStorageType>::
00039 LogPolarMapping()
00040 {}
00041
00042 template <class InputStorageType, class OutputStorageType>
00043 LogPolarMapping<InputStorageType, OutputStorageType>::
00044 LogPolarMapping(const LogPolarMapping & src)
00045 {
00046   (*this) = src;
00047 }
00048
00049 template <class InputStorageType, class OutputStorageType>
00050 LogPolarMapping<InputStorageType, OutputStorageType> &
00051 LogPolarMapping<InputStorageType, OutputStorageType>::
00052 operator=(const LogPolarMapping & src)
00053 {
00054   XCenter_ = src.XCenter_;
00055   YCenter_ = src.YCenter_;
00056   return *this;
00057 }
00058
00059 template <class InputStorageType, class OutputStorageType>
00060 void LogPolarMapping<InputStorageType, OutputStorageType>::
00061 SetImageCenter(const int & x, const int & y)
00062 {
00063   double a,r;
00064
00065   XCenter_ = x;
00066   YCenter_ = y;
00067   _XYMap = (HomgPoint2D*) calloc(2*x*2*y,sizeof(HomgPoint2D));
00068   for(int i=0;i<2*x;i++){
00069     for(int j=0;j<2*y;j++){
00070       //map image height to 0 - PI (180 Deg)
00071       a = 0.5*M_PI*(double)j/(double)YCenter_;
00072       //map image width to minimum of center coords
00073       r = (double) pow((double)XCenter_,(double)i/(double)(2*XCenter_));
00074       //calculate source pixle position
00075       _XYMap[i+j*2*x][0] = sin(a) * r;
00076       _XYMap[i+j*2*x][1] = YCenter_ + cos(a) * r;
00077     }
00078   }
00079
00080 }
00081
00082 template <class InputStorageType, class OutputStorageType>
00083 int LogPolarMapping<InputStorageType, OutputStorageType>::
00084 GetSourceCoordinates_(const HomgPoint2D & sink,
00085                       HomgPoint2D & source) const {
00086   /*
00087   double a,r;
00088   //map image height to 0 - PI (180 Deg)
00089   a = 0.5*M_PI*(double)sink[1]/(double)YCenter_;
00090   //map image width to minimum of center coords
00091   r = (double) pow((double)XCenter_,(double)sink[0]/(double)(2*XCenter_));
00092   //r=exp(log((double)XCenter_)*(double)sink[0]/(2.0*(double)XCenter_));
00093   //calculate source pixle position
00094   source[0] = sin(a) * r;
00095   source[1] = YCenter_ + cos(a) * r;
00096   */
00097   source[0] = _XYMap[(int)sink[0]+2*XCenter_*(int)sink[1]][0];
00098   source[1] = _XYMap[(int)sink[0]+2*XCenter_*(int)sink[1]][1];
00099   return 0;
00100 }
00101
00102 // TODO FIXME win32 template instantiation problem (JW)
00103 template class LogPolarMapping<unsigned char, unsigned char>;
00104 template class LogPolarMapping<float, float>;
00105 template class LogPolarMapping<unsigned char, float>;
00106
00107 #if defined(BUILD_IMAGE_CHAR)
00108 // TODO FIXME win32 template instantiation problem (JW)
00109 template class LogPolarMapping<unsigned char, char>;
00110 template class LogPolarMapping<char, char>;
00111 #endif
00112
00113 #if defined(BUILD_IMAGE_USHORT)
00114 template class LogPolarMapping<unsigned short,unsigned short>;
00115 #endif
00116
00117 #if defined(BUILD_IMAGE_SHORT)
00118 template class LogPolarMapping<short, short>;
00119 #endif
00120
00121 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00122 template class LogPolarMapping<unsigned short, short>;
00123 #endif
00124
00125 #if defined(BUILD_IMAGE_INT)
00126 template class LogPolarMapping<int,int>;
00127 #endif
00128
00129 #if defined(BUILD_IMAGE_USHORT)
00130 template class LogPolarMapping<unsigned short,float>;
00131 #endif
00132
00133 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00134 template class LogPolarMapping<unsigned short,int>;
00135 #endif
00136
00137 #if defined(BUILD_IMAGE_DOUBLE)
00138 template class LogPolarMapping<double,double>;
00139 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/LogPolarMapping.hh Source File

Image

LogPolarMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragmaStart.hh>
00026
00027 #ifndef __LogPolarMapping_hh__
00028 #define __LogPolarMapping_hh__
00029
00030 #include <Image/BackwardMapping.hh>
00031
00032
00033 namespace BIAS {
00034
00035   /** @class LogPolarMapping
00036       @ingroup g_filter
00037       @brief  Maps cartesian source coordinates to log-polar sink coordinates.
00038        The center of rotation must be set. The minimum center value is the
00039        radius of the circle.
00040       @author oniemann
00041   */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASImage_EXPORT LogPolarMapping
00044     : public  BackwardMapping<InputStorageType, OutputStorageType>  {
00045   public:
00046
00047     virtual ~LogPolarMapping();
00048
00049     LogPolarMapping();
00050
00051     /**  required because assignment is
00052          @author Jan Woetzel */
00053     LogPolarMapping(const LogPolarMapping & src);
00054
00055     /**  required because of const members
00056          @author Jan Woetzel */
00057     LogPolarMapping<InputStorageType, OutputStorageType> &
00058     operator=(const LogPolarMapping & src);
00059
00060     /** @brief set your image center before calling Map(). min(x,y) = radius
00061          of circle.*/
00062     void SetImageCenter(const int & x, const int & y);
00063
00064   protected:
00065     /** @brief reimplementation for Pixel transformation,
00066         takes sink and computes coords in source */
00067     virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
00068                                       HomgPoint2D& source) const;
00069     int XCenter_,YCenter_;
00070     double R_, A_;
00071     HomgPoint2D *_XYMap;
00072
00073   };
00074 } // namespace
00075
00076 #endif
00077
00078 #include <Base/Common/BIASpragmaEnd.hh>
00079
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/lu.h Source File

Base » Math » tnt

lu.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 #ifndef LU_H
00035 #define LU_H
00036
00037 // Solve system of linear equations Ax = b.
00038 //
00039 //  Typical usage:
00040 //
00041 //    Matrix(double) A;
00042 //    Vector(Subscript) ipiv;
00043 //    Vector(double) b;
00044 //
00045 //    1)  LU_Factor(A,ipiv);
00046 //    2)  LU_Solve(A,ipiv,b);
00047 //
00048 //   Now b has the solution x.  Note that both A and b
00049 //   are overwritten.  If these values need to be preserved,
00050 //   one can make temporary copies, as in
00051 //
00052 //    O)  Matrix(double) T = A;
00053 //    1)  LU_Factor(T,ipiv);
00054 //    1a) Vector(double) x=b;
00055 //    2)  LU_Solve(T,ipiv,x);
00056 //
00057 //   See details below.
00058 //
00059
00060
00061 // for fabs()
00062 //
00063 #include <cmath>
00064
00065 // right-looking LU factorization algorithm (unblocked)
00066 //
00067 //   Factors matrix A into lower and upper  triangular matrices
00068 //   (L and U respectively) in solving the linear equation Ax=b.
00069 //
00070 //
00071 // Args:
00072 //
00073 // A        (input/output) Matrix(1:n, 1:n)  In input, matrix to be
00074 //                  factored.  On output, overwritten with lower and
00075 //                  upper triangular factors.
00076 //
00077 // indx     (output) Vector(1:n)    Pivot vector. Describes how
00078 //                  the rows of A were reordered to increase
00079 //                  numerical stability.
00080 //
00081 // Return value:
00082 //
00083 // int      (0 if successful, 1 otherwise)
00084 //
00085 //
00086
00087
00088 namespace TNT
00089 {
00090
00091 template <class MaTRiX, class VecToRSubscript>
00092 int LU_factor( MaTRiX &A, VecToRSubscript &indx)
00093 {
00094     assert(A.lbound() == 1);                // currently for 1-offset
00095     assert(indx.lbound() == 1);             // vectors and matrices
00096
00097     Subscript M = A.num_rows();
00098     Subscript N = A.num_cols();
00099
00100     if (M == 0 || N==0) return 0;
00101     if (indx.dim() != M)
00102         indx.newsize(M);
00103
00104     Subscript i=0,j=0,k=0;
00105     Subscript jp=0;
00106
00107     typename MaTRiX::element_type t;
00108
00109     Subscript minMN =  (M < N ? M : N) ;        // min(M,N);
00110
00111     for (j=1; j<= minMN; j++)
00112     {
00113
00114         // find pivot in column j and  test for singularity.
00115
00116         jp = j;
00117         t = fabs(A(j,j));
00118         for (i=j+1; i<=M; i++)
00119             if ( fabs(A(i,j)) > t)
00120             {
00121                 jp = i;
00122                 t = fabs(A(i,j));
00123             }
00124
00125         indx(j) = jp;
00126
00127         // jp now has the index of maximum element
00128         // of column j, below the diagonal
00129
00130         if ( A(jp,j) == 0 )
00131             return 1;       // factorization failed because of zero pivot
00132
00133
00134         if (jp != j)            // swap rows j and jp
00135             for (k=1; k<=N; k++)
00136             {
00137                 t = A(j,k);
00138                 A(j,k) = A(jp,k);
00139                 A(jp,k) =t;
00140             }
00141
00142         if (j<M)                // compute elements j+1:M of jth column
00143         {
00144             // note A(j,j), was A(jp,p) previously which was
00145             // guarranteed not to be zero (Label #1)
00146             //
00147             typename MaTRiX::element_type recp =  1.0 / A(j,j);
00148
00149             for (k=j+1; k<=M; k++)
00150                 A(k,j) *= recp;
00151         }
00152
00153
00154         if (j < minMN)
00155         {
00156             // rank-1 update to trailing submatrix:   E = E - x*y;
00157             //
00158             // E is the region A(j+1:M, j+1:N)
00159             // x is the column vector A(j+1:M,j)
00160             // y is row vector A(j,j+1:N)
00161
00162             Subscript ii,jj;
00163
00164             for (ii=j+1; ii<=M; ii++)
00165                 for (jj=j+1; jj<=N; jj++)
00166                     A(ii,jj) -= A(ii,j)*A(j,jj);
00167         }
00168     }
00169
00170     return 0;
00171 }
00172
00173
00174
00175
00176 template <class MaTRiX, class VecToR, class VecToRSubscripts>
00177 int LU_solve(const MaTRiX &A, const VecToRSubscripts &indx, VecToR &b)
00178 {
00179     assert(A.lbound() == 1);                // currently for 1-offset
00180     assert(indx.lbound() == 1);             // vectors and matrices
00181     assert(b.lbound() == 1);
00182
00183     Subscript i,ii=0,ip,j;
00184     Subscript n = b.dim();
00185     typename MaTRiX::element_type sum = 0.0;
00186
00187     for (i=1;i<=n;i++)
00188     {
00189         ip=indx(i);
00190         sum=b(ip);
00191         b(ip)=b(i);
00192         if (ii)
00193             for (j=ii;j<=i-1;j++)
00194                 sum -= A(i,j)*b(j);
00195         else if (sum) ii=i;
00196             b(i)=sum;
00197     }
00198     for (i=n;i>=1;i--)
00199     {
00200         sum=b(i);
00201         for (j=i+1;j<=n;j++)
00202             sum -= A(i,j)*b(j);
00203         b(i)=sum/A(i,i);
00204     }
00205
00206     return 0;
00207 }
00208
00209 } // namespace TNT
00210
00211 #endif
00212 // LU_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/main.dox File Reference

Doc/main.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/MatchDataBase.cpp Source File

Utils

MatchDataBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include "MatchDataBase.hh"
00028
00029 #include <fstream>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034
00035
00036 MatchDataBase::MatchDataBase(Param &para)
00037   : Debug()
00038 {
00039   _NumImages=_NumPoints=NULL;
00040   _AddParameter(para);
00041 }
00042
00043 MatchDataBase::~MatchDataBase()
00044 {}
00045
00046 void MatchDataBase::Reset()
00047 {
00048
00049   // clear K, R, C and P
00050   _K.SetZero();
00051   _Ki.SetZero();
00052   _R.clear();
00053   _C.clear();
00054   _P.clear();
00055   // now clear 2D points
00056   _Points.clear();
00057   _NormalizedPoints.clear();
00058 }
00059
00060 void MatchDataBase::GetK(KMatrix& K) const
00061 { K = _K; }
00062
00063 void MatchDataBase::GetR(int imNo, RMatrixBase& R) const
00064 { R = _R[imNo]; }
00065 void MatchDataBase::GetR(std::vector<RMatrixBase>& R) const
00066 { R = _R; }
00067
00068
00069 void MatchDataBase::GetC(int imNo, HomgPoint3D& C) const
00070 { C = _C[imNo]; }
00071 void MatchDataBase::GetC(std::vector<HomgPoint3D>& C) const
00072 { C = _C; }
00073
00074 void MatchDataBase::GetP(int imNo, PMatrixBase& P) const
00075 { P = _P[imNo]; }
00076 void MatchDataBase::GetP(std::vector<PMatrixBase>& P) const
00077 { P = _P; }
00078
00079 void MatchDataBase::GetPoints(int imNo, std::vector<HomgPoint2D>& p) const
00080 { p = _Points[imNo]; }
00081 void MatchDataBase::GetPoints(std::vector<std::vector<HomgPoint2D> >& p) const
00082 { p = _Points; }
00083 void MatchDataBase::GetCorrespondences(vector<vector<HomgPoint2D> >& p) const
00084 { _Transpose(_Points, p); }
00085
00086 void MatchDataBase::GetNormalizedPoints(int imNo, std::vector<HomgPoint2D>& p) const
00087 { p = _NormalizedPoints[imNo]; }
00088 void MatchDataBase::GetNormalizedPoints(vector<vector<HomgPoint2D> >& p) const
00089 { p = _NormalizedPoints; }
00090 void MatchDataBase::GetNormalizedCorrespondences(vector<vector<HomgPoint2D> >& p) const
00091 {  _Transpose(_NormalizedPoints, p); }
00092
00093 void MatchDataBase::SetData(KMatrix& K, std::vector<RMatrixBase>& R,
00094                             std::vector<HomgPoint3D>& C,
00095                             std::vector<std::vector<HomgPoint2D> >& m)
00096 {
00097   BIASASSERT(m.size()==R.size());
00098   BIASASSERT(m.size()>0);
00099   *_NumImages=R.size();
00100   *_NumPoints=m[0].size();
00101   _SetCamData(K, R, C);
00102   _Points.resize(*_NumImages);
00103   _NormalizedPoints.resize(*_NumImages);
00104   for (int i=0; i<*_NumImages; i++){
00105     _Points[i].resize(*_NumPoints);
00106     _NormalizedPoints[i].resize(*_NumPoints);
00107     for (int p=0; p<*_NumPoints; p++){
00108       _Points[i][p]=m[i][p];
00109       _Points[i][p].Homogenize();
00110       _NormalizedPoints[i][p]=_Ki*_Points[i][p];
00111     }
00112   }
00113 }
00114
00115
00116 void MatchDataBase::SetNormalizedData(KMatrix& K, std::vector<RMatrixBase>& R,
00117                                       std::vector<HomgPoint3D>& C,
00118                                       std::vector<std::vector<HomgPoint2D> >& m)
00119 {
00120   BIASASSERT(m.size()==R.size());
00121   BIASASSERT(m.size()>0);
00122   *_NumImages=R.size();
00123   *_NumPoints=m[0].size();
00124   _SetCamData(K, R, C);
00125   _Points.resize(*_NumImages);
00126   _NormalizedPoints.resize(*_NumImages);
00127   for (int i=0; i<*_NumImages; i++){
00128     _Points[i].resize(*_NumPoints);
00129     _NormalizedPoints[i].resize(*_NumPoints);
00130     for (int p=0; p<*_NumPoints; p++){
00131       _NormalizedPoints[i][p]=m[i][p];
00132       _NormalizedPoints[i][p].Homogenize();
00133       _Points[i][p]=_K*_NormalizedPoints[i][p];
00134     }
00135   }
00136 }
00137
00138
00139 void MatchDataBase::_SetCamData(KMatrix& K, std::vector<RMatrixBase>& R,
00140                                 std::vector<HomgPoint3D>& C)
00141 {
00142   _K=K;
00143   _Ki=_K.Invert();
00144   _R=R;
00145   _C=C;
00146   BIASASSERT(_R.size() == _C.size());
00147   _P.resize(_R.size());
00148   for (unsigned i=0; i<_R.size(); i++){
00149     _P[i].Compose(_K, _R[i], _C[i]);
00150   }
00151 }
00152
00153 int MatchDataBase::Write(const string& fname) const
00154 {
00155   ofstream os(fname.c_str());
00156   if (!os){
00157     BIASERR("error opening "<<fname);
00158     return -1;
00159   }
00160   int res=Write(os);
00161
00162   os.close();
00163   return res;
00164 }
00165
00166
00167 int MatchDataBase::Write(ostream &os) const
00168 {
00169   BIASCDOUT(D_MD_IO,"using MatchDataBase::Write(ostream)\n");
00170   BIASCDOUT(D_MD_IO,"MatchDataBase::Write() writing "<<*_NumImages<<" images with "<<*_NumPoints<<" points in each\n");
00171   os.write((char*)_NumImages, sizeof(int));
00172
00173   os.write((char*)_NumPoints, sizeof(int));
00174
00175   os.write((char*)_K.GetData(), sizeof(KMATRIX_TYPE)*9);
00176
00177   for (int i=0; i<*_NumImages; i++){
00178     os.write((char*)_R[i].GetData(), sizeof(ROTATION_MATRIX_TYPE)*9);
00179     os.write((char*)_C[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00180     for (int k=0; k<*_NumPoints; k++){
00181       os.write((char*)_Points[i][k].GetData(), sizeof(HOMGPOINT2D_TYPE)*3);
00182     }
00183   }
00184
00185   if (!os){
00186     BIASERR("error writing data");
00187     return -2;
00188   }
00189   return 0;
00190 }
00191
00192
00193 int MatchDataBase::Read(const string& fname)
00194 {
00195   ifstream is(fname.c_str());
00196   if (!is){
00197     BIASERR("error opening "<<fname);
00198     return -1;
00199   }
00200   int res=Read(is);
00201
00202   is.close();
00203   return res;
00204 }
00205
00206 int MatchDataBase::Read(istream& is)
00207 {
00208   BIASCDOUT(D_MD_IO, "using MatchDataBase::Read(ostream)\n");
00209   is.read((char*)_NumImages, sizeof(int));
00210   is.read((char*)_NumPoints, sizeof(int));
00211
00212   is.read((char*)_K.GetData(), sizeof(KMATRIX_TYPE)*9);
00213   _Ki=_K.Invert();
00214
00215   _Points.resize(*_NumImages);
00216   _NormalizedPoints.resize(*_NumImages);
00217   _R.resize(*_NumImages);
00218   _C.resize(*_NumImages);
00219   _P.resize(*_NumImages);
00220   for (int i=0; i<*_NumImages; i++){
00221     is.read((char*)_R[i].GetData(), sizeof(ROTATION_MATRIX_TYPE)*9);
00222     is.read((char*)_C[i].GetData(), sizeof(HOMGPOINT3D_TYPE)*4);
00223     _P[i].Compose(_K, _R[i], _C[i]);
00224     _Points[i].resize(*_NumPoints);
00225     _NormalizedPoints[i].resize(*_NumPoints);
00226     for (int k=0; k<*_NumPoints; k++){
00227       is.read((char*)_Points[i][k].GetData(), sizeof(HOMGPOINT2D_TYPE)*3);
00228       _NormalizedPoints[i][k]=_Ki*_Points[i][k];
00229     }
00230   }
00231
00232   if (!is){
00233     BIASERR("error reading data");
00234     return -2;
00235   }
00236   BIASCDOUT(D_MD_IO,"MatchDataBase::Read() read "<<*_NumImages
00237             <<" images with "<<*_NumPoints<<" points in each\n");
00238   return 0;
00239 }
00240
00241
00242 bool MatchDataBase::operator==(MatchDataBase& r)
00243 {
00244   bool res=(*_NumImages==*r._NumImages) && (*_NumPoints==*r._NumPoints);
00245   res=res && (_K == r._K) && (_Ki == r._Ki);
00246   if (res){
00247     for (int i=0; i<*_NumImages; i++){
00248       res = res && (_R[i] == r._R[i]) && (_C[i] == r._C[i]) &&
00249         (_P[i] == r._P[i]);
00250       if (!res) cerr <<" R/C/P\n";
00251       for (int k=0; k<*_NumPoints; k++){
00252         res = res && (_Points[i][k]==r._Points[i][k]) &&
00253           (_NormalizedPoints[i][k]==r._NormalizedPoints[i][k]);
00254         if (!res) {
00255           cerr <<"_Points/_NormalizedPoints ["<<k<<"]\n";
00256           cerr << _Points[i][k]<<" - "<<r._Points[i][k]<<" = "
00257                <<_Points[i][k]-r._Points[i][k]<<endl;
00258           cerr << _NormalizedPoints[i][k]<<" <-> "<<r._NormalizedPoints[i][k]
00259                <<" = "<<_NormalizedPoints[i][k]-r._NormalizedPoints[i][k]
00260                <<endl;
00261           break;
00262         }
00263       }
00264       if (!res) break;
00265     }
00266   } else {
00267     cerr <<" Num/K/Ki\n";
00268   }
00269   return res;
00270 }
00271
00272 void MatchDataBase::_AddParameter(Param &para)
00273 {
00274   ////////////////////////////////////////////////////////////
00275   //         PGNum
00276   ///////////////////////////////////////////////////////////
00277
00278   int grp;
00279   if (para.CheckParam("NumStaticPoints")){
00280     grp=para.GetGroupID("NumStaticPoints");
00281   } else {
00282     grp=para.GetFreeGroupID();
00283   }
00284   //  cerr << "MatchDataBase: using ID "<<grp<<" for group num\n";
00285
00286   if (para.CheckParam("NumImages")){
00287     _NumImages=para.GetParamInt("NumImages");
00288   } else {
00289     _NumImages=para.AddParamInt("NumImages", "number of images", 2, 2,
00290                                 INT_MAX, 0, grp);
00291   }
00292
00293   if (para.CheckParam("NumPoints")){
00294     _NumPoints=para.GetParamInt("NumPoints");
00295   } else {
00296     _NumPoints=para.AddParamInt("NumPoints", "number of points in every image",
00297                                 30, 0, INT_MAX, 0, grp);
00298   }
00299
00300 }
00301
00302 /////////////////////////////////////////////////////////////////////////////
00303 //    operators
00304 /////////////////////////////////////////////////////////////////////////////
00305
00306 ostream& BIAS::operator<<(ostream& os, const MatchDataBase& m)
00307 {
00308   os << "K: "<<m._K<<endl;
00309   os << "P: \n";
00310   for (int i=0; i<*m._NumImages; i++){
00311     os << setw(3) << i << " : " << m._P[i]<<endl;
00312   }
00313   os << "_Points: \n";
00314   for (int k=0; k<*m._NumPoints; k++){
00315     os << setw(3) << k << " : ";
00316     for (int i=0; i<*m._NumImages; i++){
00317       os <<i<<":"<<m._Points[i][k] <<" ";
00318     }
00319     os << endl;
00320   }
00321   os << "_NormalizedPoints: \n";
00322   for (int k=0; k<*m._NumPoints; k++){
00323     os << setw(3) << k << " : ";
00324     for (int i=0; i<*m._NumImages; i++){
00325       os <<i<<":"<<m._NormalizedPoints[i][k] <<" ";
00326     }
00327     os << endl;
00328   }
00329   return os;
00330 }
00331
00332 istream& BIAS::operator>>(istream& is, MatchDataBase& m)
00333 {
00334   BIASERR("unfinished");
00335   return is;
00336 }
00337
00338
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/MatchDataBase.hh Source File

Utils

MatchDataBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __MatchDataBase_hh__
00027 #define __MatchDataBase_hh__
00028
00029 #include <bias_config.h>
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Geometry/HomgPoint3D.hh>
00033 #include <Base/Geometry/KMatrix.hh>
00034 #include <Base/Geometry/RMatrixBase.hh>
00035 #include <Base/Geometry/PMatrixBase.hh>
00036 #include <Utils/Param.hh>
00037
00038 #define D_MD_IO 0x00000001
00039
00040 namespace BIAS {
00041
00042   /** @class MatchDataBase
00043       @ingroup g_utils
00044       @brief class for representing matches, used in GenSynthMatches and
00045            biasshowsm
00046       @author woelk 2004 */
00047   class BIASUtils_EXPORT MatchDataBase : public Debug
00048   {
00049   public:
00050     MatchDataBase(Param &para);
00051     virtual ~MatchDataBase();
00052
00053     void Reset();
00054
00055     void GetK(KMatrix& K) const;
00056
00057     void GetR(int imNo, RMatrixBase& R) const;
00058     void GetR(std::vector<RMatrixBase>& R) const;
00059
00060     void GetC(int imNo, HomgPoint3D& C) const;
00061     void GetC(std::vector<HomgPoint3D>& C) const;
00062
00063     void GetP(int imNo, PMatrixBase& P) const;
00064     void GetP(std::vector<PMatrixBase>& P) const;
00065
00066     void GetPoints(int imNo, std::vector<HomgPoint2D>& p) const;
00067     /// p[i][k] is point number k in image i
00068     void GetPoints(std::vector<std::vector<HomgPoint2D> >& p) const;
00069     /// same as GetPOints with inverted indices :
00070     /// p[i][k] is point number i in image k
00071     void GetCorrespondences(std::vector<std::vector<HomgPoint2D> >& p) const;
00072
00073     void GetNormalizedPoints(int imNo, std::vector<HomgPoint2D>& p) const;
00074     /// p[i][k] is point number k in image i
00075     void GetNormalizedPoints(std::vector<std::vector<HomgPoint2D> >& p) const;
00076     /// same as GetNormalizedPoints with inverted indices :
00077     /// p[i][k] is point number i in image k
00078     void GetNormalizedCorrespondences(std::vector<std::vector<HomgPoint2D> >& p) const;
00079
00080
00081     void SetData(KMatrix& K, std::vector<RMatrixBase>& R,
00082                  std::vector<HomgPoint3D>& C,
00083                  std::vector<std::vector<HomgPoint2D> >& m);
00084
00085     void SetNormalizedData(KMatrix& K, std::vector<RMatrixBase>& R,
00086                            std::vector<HomgPoint3D>& C,
00087                            std::vector<std::vector<HomgPoint2D> >& m);
00088
00089     inline int GetNumImages() const
00090     { return *_NumImages; }
00091
00092     /// binary read
00093     int Read(const std::string& fname);
00094     /// binary read
00095     virtual int Read(std::istream& is);
00096
00097     /// binary write
00098     int Write(const std::string& fname) const;
00099     /// binary write
00100     virtual int Write(std::ostream& os) const;
00101
00102     friend BIASUtils_EXPORT std::ostream& operator<<(std::ostream& os, const MatchDataBase& m);
00103
00104     friend BIASUtils_EXPORT std::istream& operator>>(std::istream& is, MatchDataBase& m);
00105
00106     bool operator==(MatchDataBase& l);
00107
00108   protected:
00109     int *_NumImages, *_NumPoints;
00110
00111     // internal calibration matrix
00112     KMatrix _K, _Ki; // _Ki is inverse of _K
00113     // vector of rotation matrizes of cameras
00114     std::vector<RMatrixBase> _R;
00115     // vector of camera centers
00116     std::vector<HomgPoint3D> _C;
00117     // vector of projection matrizes, composed from _K, _R[i] and _C[i]
00118     std::vector<PMatrixBase> _P;
00119
00120     // the generated match data
00121     // _Points[k][i] is point number i in image k
00122     std::vector<std::vector<HomgPoint2D> > _Points;
00123     std::vector<std::vector<HomgPoint2D> > _NormalizedPoints;
00124
00125     void _SetCamData(KMatrix& K, std::vector<RMatrixBase>& R,
00126                      std::vector<HomgPoint3D>& C);
00127
00128     // fills all protected pointer values
00129     virtual void _AddParameter(Param &para);
00130
00131     inline void _Transpose(const std::vector<std::vector<HomgPoint2D> >& src,
00132                            std::vector<std::vector<HomgPoint2D> >& dst) const
00133     {
00134       const int numimg=(int)src.size();
00135       if (numimg>0){
00136         const int numpoints=(int)src[0].size();
00137         dst.resize(numpoints);
00138         for (int i=0; i<numpoints; i++){
00139           dst[i].resize(numimg);
00140           for (int k=0; k<numimg; k++){
00141             dst[i][k]=src[k][i];
00142           }
00143         }
00144       }
00145     }
00146
00147   }; // class
00148
00149   BIASUtils_EXPORT std::ostream& operator<<(std::ostream& os, const MatchDataBase& m);
00150
00151   BIASUtils_EXPORT std::istream& operator>>(std::istream& is, MatchDataBase& m);
00152
00153
00154
00155 } // namespace
00156
00157
00158 #endif // __MatchDataBase_hh__
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/math.dox File Reference

Doc/math.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Math.hh Source File

Base » Math

Math.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIASMath_hh_
00027 #define _BIASMath_hh_
00028 #include "bias_config.h"
00029
00030 /**
00031     @brief This includes all header files neccessary for compiling and
00032     linking with this library.
00033
00034     changed from BIAS to BIAS (jw, 11/05/2002)
00035
00036     @author Jan Woetzel
00037     @status beta (11/05/2002)
00038 **/
00039
00040
00041 // general Matrix
00042 #include "Matrix.hh"
00043
00044 // general Vector
00045 #include "Vector.hh"
00046
00047 // specialised Matrices:
00048 #include "Matrix2x2.hh"
00049 #include "Matrix3x3.hh"
00050 #include "Matrix4x4.hh"
00051 #include "Matrix3x4.hh"
00052
00053 // specialised Vectors:
00054 #include "Vector4.hh"
00055 #include "Vector3.hh"
00056 #include "Vector2.hh"
00057
00058 // the non class member arithmetic operators
00059 #include "Operators.hh"
00060
00061
00062 #endif
00063
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/MathBaseOperators.cpp Source File

Tests

MathBaseOperators.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Math/Vector.hh>
00027 #include <Base/Math/Matrix.hh>
00028 #include <Base/Math/Vector2.hh>
00029 #include <Base/Math/Vector3.hh>
00030 #include <Base/Math/Vector4.hh>
00031 #include <Base/Math/Matrix2x2.hh>
00032 #include <Base/Math/Matrix3x3.hh>
00033 #include <Base/Math/Matrix3x4.hh>
00034 #include <Base/Math/Matrix4x4.hh>
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 int main(int argc, char *argv[])
00040 {
00041   Vector<double> rvec, vec(5, "1.0 2.0 3.0 4.0 5.0");
00042   Vector2<double> rvec2, vec2(1.0, 2.0);
00043   Vector3<double> rvec3, vec3(1.0, 2.0, 3.0);
00044   Vector4<double> rvec4, vec4(1.0, 2.0, 3.0, 4.0);
00045   Matrix<double> mat(5, 5), mat22(2, 2), rmat;
00046   mat.SetIdentity();
00047   mat22.SetIdentity();
00048   Matrix2x2<double> mat2x2("1.0 2.0 3.0 4.0");
00049   Matrix3x3<double> mat3x3("1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0");
00050   Matrix3x4<double> mat3x4("1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0");
00051   Matrix4x4<double> mat4x4;
00052   mat4x4.SetIdentity();
00053   double rd;
00054
00055   // test the operators in Matrix.hh
00056   rmat = mat + 6.0;
00057   rmat = 6.0 + mat;
00058   rmat = mat - 6.0;
00059   rmat = 6.0 - mat;
00060   rmat = mat * 2.0;
00061   rmat = 2.0 * mat;
00062   rmat = mat / 2.0;
00063   mat += 3.0;
00064   mat -= 3.0;
00065   mat *= 3.0;
00066   mat /= 1.4;
00067   if (rmat==mat)
00068     cout <<"rmat==mat" <<endl;
00069   if (rmat!=mat)
00070     cout <<"rmat!=mat" <<endl;
00071
00072   rmat = mat;
00073   if (rmat==mat)
00074     cout <<"rmat==mat and that is ok" <<endl;
00075
00076
00077   rvec = mat * vec;
00078
00079   rvec2 = mat2x2 * vec2;
00080   rvec2 = mat22 * vec2;
00081   rvec = mat22 * vec2;
00082
00083   rvec2 = vec2 + 2.0;
00084   rvec2 = vec2 - 2.0;
00085   rvec2 = vec2 * 2.0;
00086   rvec2 = vec2 / 2.0;
00087
00088   rvec2 += 2.0;
00089   rvec2 -= 2.0;
00090   rvec2 *= 2.0;
00091   rvec2 /= 2.0;
00092
00093   rvec2 = vec2 + vec2;
00094   rvec2 = vec2 - vec2;
00095   rd = vec2 * vec2;
00096
00097   rvec2 += vec2;
00098   rvec2 -= vec2;
00099
00100   return 0;
00101 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/MatlabTBUndistortion.cpp Source File

Image

MatlabTBUndistortion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "MatlabTBUndistortion.hh"
00026 #include <iostream>
00027 #include <math.h>
00028
00029 #include <Base/Common/BIASpragma.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034
00035 MatlabTBUndistortion::MatlabTBUndistortion() {
00036   LuT_ = NULL;
00037   IsInitialized_=false;
00038 }
00039
00040 MatlabTBUndistortion::MatlabTBUndistortion(const CameraParam& cp) {
00041   LuT_ = NULL;
00042   Init(cp);
00043 }
00044
00045 MatlabTBUndistortion::~MatlabTBUndistortion(){
00046   if (LuT_ !=NULL)  delete[] LuT_;
00047 }
00048
00049 int MatlabTBUndistortion::Init(BIAS::Projection &projection)
00050 {
00051   CameraParam cp;
00052   ProjectionParametersPerspective* ppp;
00053   double k1,k2,k3,k4;
00054   unsigned int w,h;
00055   double princX, princY;
00056   double aspectratio;
00057   double focallength;
00058
00059   if((dynamic_cast<ProjectionParametersPerspective *>(projection.GetParameters()))!=NULL)
00060     {
00061       ppp = dynamic_cast<ProjectionParametersPerspective *>(projection.GetParameters());
00062     }
00063   else{
00064     BIASERR("Not a perspective camera, return false");
00065     BIASABORT;
00066   }
00067   ppp->GetUndistortion(k1,k2,k3,k4);
00068   ppp->GetImageSize(w,h);
00069   ppp->GetPrincipal(princX, princY);
00070   ppp->GetFocalLength(focallength);
00071   aspectratio = ppp->GetAspectratio();
00072   //cellY = ppp->GetCellSizeY();
00073   std::vector<double> dummy;
00074
00075   cp.InitPerspective("Perpspective Camera" ,0 ,"generic lens" , w, h, princX, princY, focallength, aspectratio, k1, k2, k3, k4,dummy ,dummy );
00076
00077
00078   Init(cp);
00079
00080   return 0;
00081
00082 }
00083
00084 int MatlabTBUndistortion::Init(const CameraParam& cp)
00085 {
00086   if (cp.IsPerspective()) {
00087     CameraParam::Init(cp);
00088     if (zoomCamera_) {
00089       kc1Zoom_ =  knownparams_vect_[0].kc1;
00090       kc2Zoom_ =  knownparams_vect_[0].kc2;
00091       kc3Zoom_ =  knownparams_vect_[0].kc3;
00092       kc4Zoom_ =  knownparams_vect_[0].kc4;
00093     }
00094     return 0;
00095   } else {
00096     BIASERR("Camera parameters for spherical camera given!");
00097     IsInitialized_=false;
00098     return -1;
00099   }
00100 }
00101
00102
00103 void MatlabTBUndistortion::SetZoom(const double abszoom){
00104   if (!IsInitialized_){
00105     BIASERR("Not inited!");
00106     return;
00107   }
00108   if (zoomCamera_) {
00109     zoom_=abszoom;
00110     focallengthZoom_ = InterpolateFocalLength_();
00111     cout << "interpolating zoom:" << abszoom << " to: " <<
00112       focallengthZoom_ << endl;
00113   } else {
00114     BIASERR("No zoom camera!");
00115     return;
00116   }
00117 }
00118
00119
00120 void MatlabTBUndistortion::SetFocalLength(const double focallength){
00121   if (!IsInitialized_){
00122     BIASERR("Not inited!");
00123     return;
00124   }
00125   if (zoomCamera_) {
00126     focallengthZoom_=focallength;
00127     zoom_=InterpolateAbsZoom_();
00128   } else {
00129     BIASERR("No zoom camera!");
00130     return;
00131   }
00132 }
00133
00134
00135 void MatlabTBUndistortion::SetUnzoomed(){
00136   if (!IsInitialized_){
00137     BIASERR("Not inited!");
00138     return;
00139   }
00140   if (focallengthDef_==0) {
00141     kc1Zoom_=knownparams_vect_[0].kc1;
00142     kc2Zoom_=knownparams_vect_[0].kc2;
00143     kc3Zoom_=knownparams_vect_[0].kc3;
00144     kc4Zoom_=knownparams_vect_[0].kc4;
00145   } else {
00146     kc1Zoom_=kc1Def_;
00147     kc2Zoom_=kc2Def_;
00148     kc3Zoom_=kc3Def_;
00149     kc4Zoom_=kc4Def_;
00150   }
00151   CameraParam::SetUnzoomed();
00152 }
00153
00154 void MatlabTBUndistortion::Undistort(BIAS::HomgPoint2D& point2d) const {
00155   if (!IsInitialized_){
00156     BIASERR("Not inited!");
00157     return;
00158   }
00159   Undistort(point2d[0],point2d[1]);
00160 }
00161
00162 void MatlabTBUndistortion::Undistort(double& origx,double& origy) const {
00163   if (!IsInitialized_){
00164     BIASERR("Not inited!");
00165     return;
00166   }
00167   // do nothing in case of ideal lense
00168   if (kc1Def_==0 && kc2Def_==0 && kc3Def_==0 && kc4Def_==0) return;
00169
00170 // copy of distorted point
00171   double distx,disty;
00172   double x,y;
00173   double twoxy;
00174
00175   double rsquared;
00176   double raddist;
00177   double tandistx, tandisty;
00178
00179   double kc1, kc2, kc3, kc4;
00180   double f=1;
00181
00182   if (zoomCamera_) {
00183     kc1=kc1Zoom_;
00184     kc2=kc2Zoom_;
00185     kc3=kc3Zoom_;
00186     kc4=kc4Zoom_;
00187     f=focallengthZoom_;
00188   } else {
00189     kc1=kc1Def_;
00190     kc2=kc2Def_;
00191     kc3=kc3Def_;
00192     kc4=kc4Def_;
00193     f=focallengthDef_;
00194   }
00195
00196   //  cout << "Undistorting Point (" << origx << "/" << origy << ")";
00197
00198   // Points must be Bougouet-normalized
00199   // (subtract principal point, then divide by focal length)
00200   x = origx = (origx-principalX_)/f;
00201   y = origy = (origy-principalY_)/(aspectratio_*f);
00202
00203   // 5 iterations are enough
00204   for (unsigned int i=0;i<5;i++){
00205
00206     //cout << "Iteration: " << i << ", X:" << x << ", Y:" << y << endl;
00207
00208     twoxy = 2 * x*y;
00209     rsquared = x*x + y*y;
00210
00211     // radial distortion:
00212     raddist = 1 + kc1*rsquared + kc2*rsquared*rsquared;
00213     // tangential distortion:
00214     tandistx = kc3*twoxy + kc4 * (rsquared + 2*x*x);
00215     tandisty = kc4*twoxy + kc3 * (rsquared + 2*y*y);
00216
00217     // apply distortion:
00218     distx = raddist * x + tandistx;
00219     disty = raddist * y + tandisty;
00220
00221     // subtract distortion from distorted coordinates
00222     x = origx - (distx-x);
00223     y = origy - (disty-y);
00224
00225   }
00226
00227   // invert Bougouet-normalization
00228   origx = x*f + principalX_;
00229   origy = y*aspectratio_*f + principalY_;
00230   //cout << " to (" << origx << "/" << origy << ")" << endl;
00231 }
00232
00233 void MatlabTBUndistortion::Distort(BIAS::HomgPoint2D& point2d) const {
00234   if (!IsInitialized_){
00235     BIASERR("Not inited!");
00236     return;
00237   }
00238   Distort(point2d[0],point2d[1]);
00239 }
00240
00241 void MatlabTBUndistortion::Distort(double& origx,double& origy) const {
00242   if (!IsInitialized_){
00243     BIASERR("Not inited!");
00244     return;
00245   }
00246   // copy of distorted point
00247   double distx,disty;
00248   double x,y;
00249   double twoxy;
00250
00251   double rsquared;
00252   double raddist;
00253   double tandistx, tandisty;
00254
00255   double kc1, kc2, kc3, kc4;
00256   double f=1;
00257
00258   if (zoomCamera_) {
00259     kc1=kc1Zoom_;
00260     kc2=kc2Zoom_;
00261     kc3=kc3Zoom_;
00262     kc4=kc4Zoom_;
00263     f=focallengthZoom_;
00264   } else {
00265     kc1=kc1Def_;
00266     kc2=kc2Def_;
00267     kc3=kc3Def_;
00268     kc4=kc4Def_;
00269     f=focallengthDef_;
00270   }
00271
00272   //cout << "Distorting Point (" << origx << "/" << origy << ")";
00273
00274   // Points must be Bougouet-normalized
00275   // (subtract principal point, then divide by focal length)
00276   x = (origx-principalX_)/f;
00277   y = (origy-principalY_)/(aspectratio_*f);
00278
00279   twoxy = 2 * x*y;
00280   rsquared = x*x + y*y;
00281
00282   // radial distortion:
00283   raddist = 1 + kc1*rsquared + kc2*rsquared*rsquared;
00284   // tangential distortion:
00285   tandistx = kc3*twoxy + kc4 * (rsquared + 2*x*x);
00286   tandisty = kc4*twoxy + kc3 * (rsquared + 2*y*y);
00287
00288   // apply distortion:
00289   distx = raddist * x + tandistx;
00290   disty = raddist * y + tandisty;
00291
00292   // invert Bougouet-normalization
00293   origx = distx*f + principalX_;
00294   origy = disty*aspectratio_*f + principalY_;
00295   //cout << " to (" << origx << "/" << origy << ")" << endl;
00296 }
00297
00298
00299 void MatlabTBUndistortion::InterpolateDistortionFromIndex_(unsigned int i,
00300                                                           double relnorm){
00301   //todo: brown: adequate methode finden (lin. interp. ist
00302   //schlechter)
00303
00304   kc1Zoom_=relnorm*(knownparams_vect_[i].kc1-knownparams_vect_[i-1].kc1)+
00305     knownparams_vect_[i-1].kc1;
00306
00307   kc2Zoom_=relnorm*(knownparams_vect_[i].kc2-knownparams_vect_[i-1].kc2)+
00308     knownparams_vect_[i-1].kc2;
00309
00310   kc3Zoom_=relnorm*(knownparams_vect_[i].kc3-knownparams_vect_[i-1].kc3)+
00311     knownparams_vect_[i-1].kc3;
00312
00313   kc4Zoom_=relnorm*(knownparams_vect_[i].kc4-knownparams_vect_[i-1].kc4)+
00314     knownparams_vect_[i-1].kc4;
00315
00316 }
00317
00318 double MatlabTBUndistortion::InterpolateFocalLength_(){
00319
00320   double relnorm;
00321
00322   bool found;
00323   unsigned int i;
00324   found=false;
00325
00326   if (knownparams_vect_[0].zoom<zoom_){ // zoom is higher than the
00327     // known values:
00328     zoom_=knownparams_vect_[0].zoom;  // set to highest available
00329   }
00330
00331   for (i=0;i<knownparams_vect_.size();i++){
00332     if (knownparams_vect_[i].zoom<=zoom_){
00333         found=true;
00334         break;
00335     }
00336   }
00337
00338   if (!found){ // zoom is lower than the known values
00339     focallengthZoom_=knownparams_vect_[i-1].focallength;
00340     return knownparams_vect_[i-1].focallength;
00341   }
00342
00343
00344   if (knownparams_vect_[i].zoom==zoom_){
00345     // interpolate distortion parameters
00346     InterpolateDistortionFromIndex_(i+1,0);
00347     return knownparams_vect_[i].focallength;
00348   } else {
00349     relnorm=(zoom_ - knownparams_vect_[i].zoom) /
00350       (knownparams_vect_[i-1].zoom - knownparams_vect_[i].zoom);
00351     relnorm=1.0-relnorm;
00352     // interpolate distortion parameters
00353     InterpolateDistortionFromIndex_(i,relnorm);
00354   }
00355   return CameraParam::InterpolateFocalLength_();
00356 }
00357
00358
00359
00360 double MatlabTBUndistortion::InterpolateAbsZoom_(){
00361
00362   double relnorm;
00363
00364   bool found;
00365   unsigned int i;
00366   found=false;
00367
00368   if (knownparams_vect_[0].focallength<focallengthZoom_){
00369     focallengthZoom_=knownparams_vect_[0].focallength;
00370   }
00371
00372   for (i=0;i<knownparams_vect_.size();i++){
00373     if (knownparams_vect_[i].focallength<=focallengthZoom_){
00374         found=true;
00375         break;
00376     }
00377   }
00378   if (!found){
00379     return -1;
00380   }
00381
00382   if (knownparams_vect_[i].focallength==focallengthZoom_){
00383     // interpolate distortion parameters
00384     InterpolateDistortionFromIndex_(i+1,0);
00385   } else {
00386     relnorm=(focallengthZoom_ - knownparams_vect_[i].focallength) /
00387       (knownparams_vect_[i-1].focallength - knownparams_vect_[i].focallength);
00388     relnorm=1.0-relnorm;
00389     // interpolate distortion parameters
00390     InterpolateDistortionFromIndex_(i,relnorm);
00391   }
00392
00393   return CameraParam::InterpolateAbsZoom_();
00394 }
00395
00396
00397
00398 int MatlabTBUndistortion::
00399 SetupProjectionLUT(const unsigned int& srcwidth,const
00400                    unsigned int& srcheight,
00401                    const unsigned int &ChanCnt,
00402                    const unsigned int& SizeX, const unsigned int& SizeY)
00403 {
00404   if (!IsInitialized_){
00405 #ifdef BIAS_DEBUG
00406     BIASERR("Not inited!");
00407 #endif
00408     return -1;
00409   }
00410   double xDst, yDst;
00411
00412   CutOutWidth_ = SizeX;
00413   CutOutHeight_ = SizeY;
00414
00415   if (LuT_ !=NULL)  delete[] LuT_;
00416   LuT_ = new LuTEntry[SizeX * SizeY];
00417   LuTEntry *currLE = LuT_;
00418
00419   // go through pixels in dest image (backward mapping)
00420   for (unsigned int y=0; y<SizeY; y++) {
00421     for (unsigned int x=0; x<SizeX; x++) {
00422       xDst = x;
00423       yDst = y;
00424       Distort(xDst,yDst);
00425
00426       // xSrc,ySrc are the coordinates in the original image typically
00427       // between four pixels, so find the neighbours for bilinear
00428       // interpolation
00429       unsigned int x_floor = (unsigned int)floor(xDst);
00430       unsigned int y_floor = (unsigned int)floor(yDst);
00431       unsigned int x_ceil = x_floor+1;
00432       unsigned int y_ceil = y_floor+1;
00433       if (xDst<0) {
00434         x_floor = 0;
00435         x_ceil = 0;
00436       }
00437       if (xDst>SizeX-1) {
00438         x_floor = SizeX-1;
00439         x_ceil = SizeX-1;
00440       }
00441       if (yDst<0) {
00442         y_floor = 0;
00443         y_ceil = 0;
00444       }
00445       if (yDst>SizeY-1) {
00446         y_floor = SizeY-1;
00447         y_ceil = SizeY-1;
00448       }
00449       currLE->weight[0] = (unsigned int)rint((xDst - x_floor)*256);
00450       currLE->weight[1] = (unsigned int)rint((yDst - y_floor)*256);
00451       // calculate the offsetes in the image data array for all four corners
00452       // but only for the first channel of ChanCnt
00453       currLE->offset[0] = (y_floor * srcwidth + x_floor) * ChanCnt;
00454       currLE->offset[1] = (y_ceil * srcwidth + x_floor) * ChanCnt;
00455       currLE->offset[2] = (y_ceil * srcwidth + x_ceil) * ChanCnt;
00456       currLE->offset[3] = (y_floor * srcwidth + x_ceil) * ChanCnt;
00457       currLE++;
00458     }
00459   }
00460   return 0;
00461 }
00462
00463
00464 int MatlabTBUndistortion::
00465 UndistortFast(const Image<unsigned char>& src,Image<unsigned char>& dst)
00466 {
00467   unsigned char *srcp, *dstp;
00468   srcp = src.GetImageData();
00469
00470 #ifdef BIAS_DEBUG
00471   if (LuT_ ==NULL){
00472     BIASERR("LUT not initialized!");
00473     return -1;
00474   }
00475 #endif
00476
00477   if (dst.IsEmpty()) {
00478     dst.Init((int)(src.GetWidth()), (int)(src.GetHeight()),
00479              src.GetChannelCount());
00480   }
00481
00482   dstp = dst.GetImageData();
00483
00484   if (src.GetChannelCount() ==1) {
00485     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
00486       unsigned char ul = *(srcp + LuT_[i].offset[0]); //ida[y_floor][x_floor];
00487       unsigned char ll = *(srcp + LuT_[i].offset[1]);// ida[y_ceil][x_floor];
00488       unsigned char lr = *(srcp + LuT_[i].offset[2]);// ida[y_ceil][x_ceil];
00489       unsigned char ur = *(srcp + LuT_[i].offset[3]); // ida[y_floor][x_ceil];
00490       unsigned int dx = LuT_[i].weight[0];
00491       unsigned int dy = LuT_[i].weight[1];
00492       *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) +
00493                                 (dx<<8)*(ur - ul) +
00494                                 dy*dx*(ul - ll - ur + lr))>>16);
00495       dstp++;
00496     }
00497   }
00498   else {
00499     unsigned int cc = src.GetChannelCount();
00500     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
00501       for (unsigned int c=0; c<cc; c++) {
00502         unsigned char ul = *(srcp + LuT_[i].offset[0] + c);
00503         unsigned char ll = *(srcp + LuT_[i].offset[1] + c);
00504         unsigned char lr = *(srcp + LuT_[i].offset[2] + c);
00505         unsigned char ur = *(srcp + LuT_[i].offset[3] + c);
00506         unsigned int dx = LuT_[i].weight[0];
00507         unsigned int dy = LuT_[i].weight[1];
00508         *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) +
00509                                   (dx<<8)*(ur - ul) +
00510                                   dy*dx*(ul - ll - ur + lr))>>16);
00511         dstp++;
00512       }
00513     }
00514   }
00515   return 0;
00516 }
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/MatlabTBUndistortion.hh Source File

Image

MatlabTBUndistortion.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __MatlabTBUndistortion_hh__
00026 #define __MatlabTBUndistortion_hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <Base/Image/Image.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Geometry/KMatrix.hh>
00033 #include <Geometry/Projection.hh>
00034 #include <Image/CameraParam.hh>
00035
00036 #include <vector>
00037 #include <string>
00038
00039 #define UNDIST_EPS 1e-9
00040
00041 namespace BIAS{
00042
00043   class BIASImage_EXPORT MatlabTBUndistortion : public BIAS::CameraParam{
00044
00045     //    static std::string CameraModelName[];
00046     // static std::string LensModelName[];
00047
00048   public:
00049     MatlabTBUndistortion();
00050     MatlabTBUndistortion(const CameraParam &cp);
00051
00052     ~MatlabTBUndistortion();
00053
00054     // @brief default initialization
00055     int Init(const CameraParam &cp);
00056     int Init(BIAS::Projection &projection);
00057
00058     /** @brief Set the current camera zoom, the focal length will be
00059         calculated.
00060         @author buck */
00061     void SetZoom(const double abszoom);
00062
00063     /** @brief get the current camera focal length
00064         @author buck */
00065     void SetFocalLength(const double f);
00066
00067     /** @brief Set the zoom and focal length of a zoom camera to the
00068         default settings.
00069         @author streckel 06/2004*/
00070     void SetUnzoomed();
00071
00072    /** @brief Using the Matlab camera calibration toolbox parameters
00073         for an undistortion of distorted coordinates - correct implementation
00074         (Error in the Christian Buck implementation: Iteration does
00075         not converge?!)
00076         @author streckel 06/2004 */
00077     void Undistort(BIAS::HomgPoint2D& point2d) const;
00078     void Undistort(double& origx,double& origy) const;
00079
00080     /** @brief Using the Matlab camera calibration toolbox parameters
00081         for a distortion of undistorted coordinates. Inverse to the
00082         undistort function.
00083         @author streckel 06/2004 */
00084     void Distort(BIAS::HomgPoint2D& point2d) const;
00085     void Distort(double& origx,double& origy) const;
00086
00087     int SetupProjectionLUT(const unsigned int& srcwidth,const
00088                            unsigned int& srcheight,
00089                            const unsigned int &ChanCnt,
00090                            const unsigned int& SizeX,
00091                            const unsigned int& SizeY);
00092
00093    /** @brief Undistortion of an image via a Lookup table
00094        corrects only lens distortion and not aspect ratio
00095        @author streckel 06/2004 */
00096     int UndistortFast(const Image<unsigned char>& src,
00097               Image<unsigned char>& dst);
00098
00099   protected:
00100
00101     // array of camera calibration constants for zoom cameras
00102     std::vector<CPDiscreteParam> knownparams_vect_;
00103
00104     // calibration settings for the current zoom setting of a zoom camera
00105     // zoom and focallengthZoom are dependend:
00106     // if zoom is set, focallengthZoom will be calculated and vice versa
00107     double kc1Zoom_,kc2Zoom_,kc3Zoom_,kc4Zoom_;
00108
00109     // illumination vignette correction
00110     // x is distance in pixel from principal point
00111     // y is illumination correction factor
00112     std::vector<double> IlluCorrX_;
00113     std::vector<double> IlluCorrY_;
00114
00115     void InterpolateDistortionFromIndex_(unsigned int i,double relnorm);
00116     double InterpolateFocalLength_(); // w/ given abszoom
00117     double InterpolateAbsZoom_(); // w/ given focal length
00118
00119     // structure for Look-up-table for bilinear interpolation
00120     // during backward warping
00121     struct LuTEntry {
00122       unsigned int offset[4];
00123       unsigned int  weight[2];
00124     };
00125     LuTEntry *LuT_;
00126     unsigned int CutOutWidth_, CutOutHeight_;
00127   };
00128
00129 }
00130
00131 #include <Base/Common/BIASpragmaEnd.hh>
00132
00133 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix2x2.cpp Source File

Base » Math

Matrix2x2.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Matrix2x2.hh"
00027 #include "Vector2.hh"
00028
00029 #include <Base/Common/BIASpragma.hh>
00030
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 namespace BIAS {
00036
00037 #define MATRIX2X2_ZERO_EPS 1e-13
00038
00039 // template<class T>
00040 // Matrix2x2<T>::Matrix2x2(const Matrix<T> & A)
00041 // : Matrix<T>(2, 2)
00042 // {
00043 //   if (A.num_rows() != 2 || A.num_cols() != 2){
00044 //     BIASERR("try to cast from Matrix with inavlid size "<<A);
00045 //   } else {
00046 //     register T *dataP = A.GetData();
00047 //     memcpy(v_, dataP, 4*sizeof(T));
00048 //   }
00049 // }
00050
00051 template<class T>
00052 Matrix2x2<T>::Matrix2x2(const TNT::Matrix<T>& mat) : Matrix<T>(mat)
00053 {
00054   if ((mat.num_rows() != 2) || (mat.num_cols() != 2)) {
00055     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00056            << mat.num_cols());
00057   }
00058 }
00059
00060
00061 template<class T>
00062 Matrix2x2<T>::Matrix2x2(const std::string & s)
00063 : Matrix<T>(2, 2, s)
00064 {}
00065
00066
00067 template<class T>
00068 Matrix2x2<T>::Matrix2x2(const T a0, const T a1,
00069                         const T a2, const T a3)
00070                         : Matrix<T>(2, 2)
00071 {
00072   this->GetData()[0]=a0; this->GetData()[1]=a1;
00073   this->GetData()[2]=a2; this->GetData()[3]=a3;
00074 }
00075
00076
00077 template<class T>
00078 Matrix2x2<T>::~Matrix2x2() {}
00079
00080 template<class T>
00081 Matrix2x2<T>& Matrix2x2<T>::operator= (const Matrix2x2<T>& mat)
00082 {
00083   register T *matP = mat.GetData();
00084   register T *destP = this->GetData();
00085   memcpy(destP, matP, 4*sizeof(T));
00086   return *this;
00087 }
00088
00089 template<class T>
00090 Matrix2x2<T>& Matrix2x2<T>::newsize(int rows, int cols)
00091 {
00092     BIASERR("does not make sense with fixed size matrix: "<<rows<<" "<<cols);
00093   return *((Matrix2x2 *)NULL);
00094 }
00095
00096
00097 template<>
00098 int Matrix2x2<unsigned int>::Invert(Matrix2x2<unsigned int>& result) const {
00099   BIASERR("not implemented because minus does not make sense for unsigned type");
00100   BIASBREAK;
00101   return -1;
00102 }
00103
00104
00105 template<class T>
00106 int Matrix2x2<T>::Invert(Matrix2x2<T>& result) const
00107 {
00108   T den=(*this)[0][0]*(*this)[1][1]-(*this)[0][1]*(*this)[1][0];
00109   //if (den==0.0) std::cerr << *this << std::endl << den << std::endl;
00110   if (den==0.0) return -1;
00111   BIASASSERT(den!=0.0);
00112
00113   result[0][0]=(*this)[1][1]/den;
00114   result[1][0]=-(*this)[1][0]/den;
00115   result[0][1]=-(*this)[0][1]/den;
00116   result[1][1]=(*this)[0][0]/den;
00117   return 0;
00118 }
00119
00120 template<class T>
00121 int Matrix2x2<T>::EigenvalueDecomposition(T& /*value1*/, Vector2<T>& /*vector1*/,
00122                                           T& /*value2*/, Vector2<T>& /*vector2*/) const
00123 {
00124   BIASERR("int Matrix2x2<T>::EigenvalueDecomposition only for double matrices");return -1;
00125 }
00126
00127 template<>
00128 int Matrix2x2<double>::EigenvalueDecomposition(double& value1,
00129                                                Vector2<double>& vec1,
00130                                                double& value2,
00131                                                Vector2<double>& vec2) const
00132 {
00133   int res=2;
00134   double a=(*this)[0][0], b=(*this)[0][1], c=(*this)[1][1], d=(*this)[1][0];
00135   //cout << "a "<<a <<"\tb "<<b<<"\tc "<<c<<"\td "<<d<<endl;
00136
00137   // eigenvalue decoposition of symmetric 2 by 2 matrix
00138   // | a b | | x_12 |        | x_12 |
00139   // | d c | | y_12 | = l_12 | y_12 |
00140   // -> \lambda_12 = (a+c)/2 +- \sqrt((a+c)^2/4-ac+bd)
00141   // x_1 = - b / sqrt(b*b+(a-l1)*(a-l1));
00142   // y_1 =   (a-l1) / sqrt(b*b+(a-l1)*(a-l1));
00143   // x_2 = - (c-l2) / sqrt(b*b+(c-l2)*(c-l2));
00144   // y_2 =   d / sqrt(d*d+(c-l2)*(c-l2));
00145   double norm1, norm2;
00146   bool value1p, value2p;
00147
00148   //TimeMeasure t;
00149   //t.Start();
00150
00151   norm1=(a+c)/2.0;
00152   norm2=(a+c)*(a+c)/4.0-a*c+b*d;
00153   if (norm2<0.0) {  // imaginary solution
00154     //cout << "only imaginary solutions\n";
00155     //cout << "norm2<0.0: "<<norm2<<endl;
00156     res=0;
00157   } else {
00158     norm2=sqrt(norm2);
00159     value2=norm1+norm2;
00160     value1=norm1-norm2;
00161     value1p=(value1>=0.0);
00162     value2p=(value2>=0.0);
00163     //cout <<"value1: "<<value1<<"\tvalue2: "<<value2<<endl;
00164     if (!value1p) value1=-value1;
00165     if (!value2p) value2=-value2;
00166     //cout <<"value1: "<<value1<<"\tvalue2: "<<value2<<endl;
00167
00168     // number of eigenvalues!=0
00169     res = ((fabs(value1)<DOUBLE_EPSILON)?0:1) +
00170       ((fabs(value2)<DOUBLE_EPSILON)?0:1);
00171     //cout << "rank "<<res<<"\t"<<value1<<"\t"<<value2<<"\n";
00172
00173     norm1 = sqrt(b*b+(a-value1)*(a-value1));
00174     //cout <<"norm1: "<<norm1<<endl;
00175     if (norm1>=MATRIX2X2_ZERO_EPS){
00176       vec1[0] = - b / norm1;
00177       vec1[1] =   (a-value1) / norm1;
00178     } else { //happens if b=0 -> cov is already orthogonal
00179       vec1[0] = 1.0 ;
00180       vec1[1] = 0.0;
00181     }
00182     //cout <<"vec1: "<<vec1<<endl;
00183     if (!value1p) { vec1[0] = -vec1[0]; vec1[1] = -vec1[1]; }
00184     //cout <<"vec1: "<<vec1<<endl;
00185
00186     norm2 = sqrt(d*d+(c-value2)*(c-value2));
00187     //cout <<"norm2: "<<norm2<<endl;
00188     if (norm1>=MATRIX2X2_ZERO_EPS){
00189       vec2[0] = - (c-value2) / norm2;
00190       vec2[1] =   d / norm2;
00191     } else { //happens if b=0 -> cov is already orthogonal
00192       vec2[0] = 0.0;
00193       vec2[1] = 1.0;
00194     }
00195     //cout <<"vec2: "<<vec2<<endl;
00196     if (!value2p) { vec2[0] = -vec2[0]; vec2[1] = -vec2[1]; }
00197     //cout <<"vec2: "<<vec2<<endl;
00198     /*
00199       t.Stop();
00200       cout << "manual took "<<t.GetRealTime()<<" us"<<endl;
00201       t.Reset();
00202     */
00203
00204     //     cout << "value1 "<<value1<<"\tvalue2 "<<value2<<endl;
00205     //     cout << "norm1 "<<norm1<<"\tnorm2 "<<norm2<<endl;
00206     //     cout << "vec1 : "<<vec1[0]<<", "<<vec1[1]<<endl;
00207     //     cout << "vec2 : "<<vec2[0]<<", "<<vec2[1]<<endl;
00208     //     cout << "vec1 . vec2 : "
00209     //          <<vec1[0]*vec2[0]+vec1[1]*vec2[1]<<endl;
00210   }
00211
00212   /*
00213   // compare with svd
00214   //    t.Start();
00215   Matrix2x2<double> A, U;
00216   Vector2<double> S;
00217   A[0][0]=a;
00218   A[0][1]=b;
00219   A[1][1]=c;
00220   A[1][0]=d;
00221   SVD svd(A);
00222   U = svd.GetU();
00223   S = svd.GetS();
00224   vec1[0] = S[0] * U[0][0];
00225   vec1[1] = S[0] * U[0][1];
00226   vec2[0] = S[1] * U[1][0];
00227   vec2[1] = S[1] * U[1][1];
00228   //t.Stop();
00229   //    cout << "svd   took "<<t.GetRealTime()<<" us"<<endl;
00230   cout << "\nsvd :\n";
00231   cout << "vec1 : "<<vec1[0]<<", "<<vec1[1]<<endl;
00232   cout << "vec2 : "<<vec2[0]<<", "<<vec2[1]<<endl;
00233   cout << "U: "<<svd.GetU()<<"\nS: "<<svd.GetS()<<"\nVT: "<<svd.GetVT()<<endl;
00234
00235   */
00236   return res;
00237 }
00238
00239 } // namespace BIAS
00240
00241
00242 #define INST(type) \
00243 template class BIASMathBase_EXPORT BIAS::Matrix2x2<type>;\
00244
00245 INST(unsigned char)
00246 INST(char)
00247 INST(float)
00248 INST(short)
00249 INST(unsigned short)
00250 INST(int)
00251 INST(unsigned int)
00252 INST(double)
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix2x2.hh Source File

Base » Math

Matrix2x2.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Matrix2x2_hh_
00027 #define _Matrix2x2_hh_
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031   //#include <Base/Debug/Debug.hh>
00032
00033 #include "Matrix.hh"
00034 #include "Operators.hh"
00035
00036 namespace BIAS {
00037
00038 /**
00039     @class Matrix2x2
00040     @ingroup g_math
00041     @brief is a 'fixed size' quadratic matrix of dim.
00042     2 x 2 which is templated over the elemnt-type.
00043 **/
00044
00045   // forward declaration to avoid nested includes
00046   template <class T> class Vector2;
00047
00048   template<class T=double>
00049   class BIASMathBase_EXPORT Matrix2x2 : public Matrix<T>
00050   {
00051   public:
00052     Matrix2x2<T>() : Matrix<T>(2, 2) {};
00053
00054     explicit Matrix2x2<T>(const MatrixInitType& i) : Matrix<T>(2, 2, T(0)) {
00055       switch (i) {
00056       case MatrixZero:return;
00057       case MatrixIdentity:{
00058         this->v_[0] = this->v_[3] = T(1); return;
00059       }
00060       default:
00061         BIASERR("undefined MatrixInitType");
00062         BIASABORT;
00063       }
00064     }
00065
00066     // DEPRECATED due to instantiation problem JW
00067     //explicit Matrix2x2<T>(const char *s) : Matrix<T>(2, 2, s) {};
00068     explicit Matrix2x2<T>(const std::string & s);
00069
00070
00071     /** @author Jan Woetzel
00072         @status untested (04/17/2002) **/
00073     Matrix2x2<T>(const Matrix2x2<T> & A) : Matrix<T>(A) {};
00074
00075     /** cast constructor from TNT::Matrix */
00076     Matrix2x2<T>(const TNT::Matrix<T>& A);
00077
00078     /** Set the matrix to | a0 a1 |
00079                           | a2 a3 | */
00080     Matrix2x2<T>(
00081       const T a0, const T a1,
00082       const T a2, const T a3);
00083
00084     virtual ~Matrix2x2<T>();
00085
00086     /** matrix - vector multiplicate this matrix with Vector2,
00087         storing the result in destvec
00088         calculates:
00089         destvec = (this Matrix) * argvec
00090     **/
00091     inline void Mult(const Vector2<T> &argvec, Vector2<T> &destvec) const;
00092
00093     /** matrix - vector multiplicate this matrix with Vector2,
00094         storing the result in destvec
00095         calculates:
00096         destvec^T = argvec^T * (this Matrix)
00097     **/
00098     inline void MultLeft(const Vector2<T> &argvec, Vector2<T> &destvec) const;
00099
00100     /** @brief transposed argvec multipied from left, wrapper function */
00101     Vector2<T> MultLeft(const Vector2<T> &argvec) const {
00102       Vector2<T> ret; MultLeft(argvec, ret); return ret;
00103     }
00104
00105
00106     /** matrix-matrix multiplication with other Matrix2x2,
00107         storing the result in destmat
00108         calculates:
00109         destmat = (this mat) * argmat
00110     **/
00111     inline void Mult(const Matrix2x2<T> & argmat, Matrix2x2<T> & destmat)const;
00112
00113     /** Multiplication in place with argmat */
00114     inline void MultIP(const Matrix2x2<T> & argmat);
00115
00116     /** assignment operator    **/
00117     Matrix2x2<T>& operator=(const Matrix2x2<T> &mat);
00118
00119     /** returns transposed matrix*/
00120     inline Matrix2x2<T> Transpose() const;
00121
00122     /** set this as transposed arg */
00123     inline void Transpose(const Matrix2x2<T>& arg);
00124
00125     /** transpose matrix in place */
00126     inline void TransposeIP();
00127
00128     /** set the elements of this matrix to the identity matrix **/
00129     inline void SetIdentity();
00130
00131     /** calculate the determinante */
00132     inline T det() const;
00133
00134     /** just neccessary to avoid resizing of this 'fixed size' matrix because
00135         it is derived from the resizable Matrix
00136         should be removed when Matrix2x2 becomes a base class.
00137         (04/17/2002) Felix Woelk **/
00138     Matrix2x2 & newsize(int rows, int cols);
00139
00140     /** analyticaly inverts matrix
00141         @author woelk 12 2002 */
00142     int Invert(Matrix2x2<T>& result) const;
00143
00144     inline Matrix2x2<T> Invert() const
00145     { Matrix2x2<T> res; Invert(res); return res; }
00146
00147     /** Eigenvalue decomposition. The eigenvalues and eigenvectors of the
00148         matrix are returned in value1/2 vector1/2.
00149         @return number of linear independent eigenvectors = rank of matrix
00150         @author woelk 06/2005 */
00151     int EigenvalueDecomposition(T& value1, Vector2<T>& vector1,
00152                                 T& value2, Vector2<T>& vector2) const;
00153   }; // class
00154
00155   template <class T>
00156   inline void Matrix2x2<T>::Transpose(const Matrix2x2<T>& arg)
00157   {
00158     register T *dataP = this->GetData();
00159     register T *argP = arg.GetData();
00160     dataP[0] = argP[0]; dataP[3] = argP[3];
00161     dataP[1] = argP[2]; dataP[1] = argP[1];
00162   }
00163
00164   template <class T>
00165   inline Matrix2x2<T> Matrix2x2<T>::Transpose() const
00166   {
00167     Matrix2x2 rs;
00168     rs.Transpose(*this);
00169     return rs;
00170   }
00171
00172   template <class T>
00173   inline void Matrix2x2<T>::TransposeIP()
00174   {
00175     T tmp = this->v_[1];
00176     this->v_[1] = this->v_[2];
00177     this->v_[2] = tmp;
00178   }
00179
00180   template <class T>
00181   inline void Matrix2x2<T>::Mult(const Matrix2x2<T> & argmat,
00182                                  Matrix2x2<T> & destmat) const
00183   {
00184     register T *destP   = destmat.GetData();
00185     const register T *argP  = argmat.GetData();
00186     const register T *matP  = this->GetData();
00187
00188     destP[0] =
00189       matP[0] * argP[0] + matP[1] * argP[2];
00190     destP[1] =
00191       matP[0] * argP[1] + matP[1] * argP[3];
00192
00193     destP[2] =
00194       matP[2] * argP[0] + matP[3] * argP[2];
00195     destP[3] =
00196       matP[2] * argP[1] + matP[3] * argP[3];
00197
00198   }
00199
00200   template <class T>
00201   inline void Matrix2x2<T>::MultIP(const Matrix2x2<T> & argmat)
00202   {
00203     const register T *argP = argmat.GetData();
00204     register T tmp = this->v_[0];
00205
00206     this->v_[0] =
00207       tmp * argP[0] + this->v_[1] * argP[2];
00208     this->v_[1] =
00209       tmp * argP[1] + this->v_[1] * argP[3];
00210
00211     tmp = this->v_[2];
00212     this->v_[2] =
00213       this->v_[2] * argP[0] + this->v_[3] * argP[2];
00214     this->v_[3] =
00215       tmp * argP[1] + this->v_[3] * argP[3];
00216
00217   }
00218
00219   template <class T>
00220   inline void Matrix2x2<T>::Mult(const Vector2<T> &argvec,
00221                                  Vector2<T> &destvec) const
00222   {
00223     const register T *matP = this->GetData();
00224     destvec[0] = argvec[0] * matP[0]
00225       + argvec[1] * matP[1];
00226     destvec[1] = argvec[0] * matP[2]
00227       + argvec[1] * matP[3];
00228   }
00229
00230   template <class T>
00231   inline void Matrix2x2<T>::MultLeft(const Vector2<T> &argvec,
00232                                      Vector2<T> &destvec) const
00233   {
00234     const register T *matP = this->GetData();
00235     destvec[0] = argvec[0] * matP[0]
00236       + argvec[1] * matP[2];
00237     destvec[1] = argvec[0] * matP[1]
00238       + argvec[1] * matP[3];
00239   }
00240
00241
00242   template <class T>
00243   inline void Matrix2x2<T>::SetIdentity() {
00244     register T* d = this->GetData(); // pointer to this matrix's data array
00245     d[0] = d[3] = 1;
00246     d[1] = d[2] = 0;
00247   }
00248
00249
00250
00251   template <class T>
00252   inline T Matrix2x2<T>::det() const
00253   {
00254     register T *dataP = this->GetData();
00255     return (dataP[0] * dataP[3] - dataP[1] * dataP[2]);
00256   }
00257
00258
00259 } // end of namespace BIAS
00260
00261 #endif // _Matrix2x2_hh_
00262
00263
00264
00265
00266
00267
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x3.cpp Source File

Base » Math

Matrix3x3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include "Matrix3x3.hh"
00028
00029 #include <vector>
00030 #include <sstream>
00031 #include <fstream>
00032
00033
00034
00035 using namespace std;
00036
00037 namespace BIAS {
00038
00039
00040 template<class T>
00041 Matrix3x3<T>::Matrix3x3(const Matrix<T>& mat) : Matrix<T>(mat)
00042 {
00043   if ((mat.num_rows() != 3) || (mat.num_cols() != 3)) {
00044     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00045            << mat.num_cols());
00046   }
00047 }
00048
00049 template<class T>
00050 Matrix3x3<T>::Matrix3x3(const std::string & s)
00051 : Matrix<T>(3, 3, s)
00052 {}
00053
00054
00055 template<class T>
00056 Matrix3x3<T>::Matrix3x3(const TNT::Matrix<T>& mat) : Matrix<T>(mat)
00057 {
00058   if ((mat.num_rows() != 3) || (mat.num_cols() != 3)) {
00059     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00060            << mat.num_cols());
00061   }
00062 }
00063
00064
00065 template<class T>
00066 Matrix3x3<T>::Matrix3x3(const T a0, const T a1, const T a2,
00067                         const T a3, const T a4, const T a5,
00068                         const T a6, const T a7, const T a8)
00069                         : Matrix<T>(3, 3)
00070 {
00071   this->GetData()[0]=a0; this->GetData()[1]=a1; this->GetData()[2]=a2;
00072   this->GetData()[3]=a3; this->GetData()[4]=a4; this->GetData()[5]=a5;
00073   this->GetData()[6]=a6; this->GetData()[7]=a7; this->GetData()[8]=a8;
00074 }
00075
00076
00077 template<class T>
00078 Matrix3x3<T>::~Matrix3x3()
00079 {}
00080
00081
00082 template<class T>
00083 Matrix3x3<T> Matrix3x3<T>::Transpose() const
00084 {
00085     Matrix3x3<T> ret;
00086     ret = *this;
00087
00088     T *retd = ret.GetData();
00089     T *thisd = this->GetData();
00090     retd[1] = thisd[3];
00091     retd[3] = thisd[1];
00092     retd[2] = thisd[6];
00093     retd[6] = thisd[2];
00094     retd[5] = thisd[7];
00095     retd[7] = thisd[5];
00096     return ret;
00097 }
00098
00099
00100
00101 template <class T>
00102 Matrix3x3<T>& Matrix3x3<T>::newsize(int rows, int cols)
00103 {
00104   if ((rows != 3) || (cols != 3)) {
00105     // do nothing
00106     // print error message if the new size should not be a 3x4 matrix
00107     BIASERR("The size of a Matrix3x3<T> has to be 3 rows, 3 cols. "
00108            <<"newsize can't create a "
00109            << rows << " x " << cols << " Matrix3x3 !");
00110 #if DEBUG
00111     exit(-1);
00112 #endif
00113     return *this;
00114   } else {
00115     BIASASSERT( rows==3 ); // 3x3 matrix
00116     BIASASSERT( cols==3 );
00117     // call base class function
00118     // (usually unnecessary except for first construction)
00119     Matrix<T>::newsize(3, 3);
00120     return *this;
00121   }
00122 }
00123
00124 template<class T>
00125 void Matrix3x3<T>::SetFromVector(const TNT::Vector<T>& vec)
00126 {
00127   BIASASSERT( vec.size() == 9 );
00128   // fill the matrix rowwise with the first 9 elements of the vector
00129   // example:
00130   // 1 2 3 4 5 6 7 8 9
00131   //  -->
00132   // 1 2 3
00133   // 4 5 6
00134   // 7 8 9
00135   for (int i=0; i<9; i++) {
00136     this->GetData()[i] = vec[i];
00137   }
00138 }
00139
00140 //JW 07/2003
00141 template<class T>
00142 void Matrix3x3<T>::SetFromColumnVectors(const BIAS::Vector3<T> & v0,
00143                                         const BIAS::Vector3<T> & v1,
00144                                         const BIAS::Vector3<T> & v2 )
00145 {
00146   // will be loop-unrolled ..
00147   // for all elements of a column:
00148   for (unsigned int row=0; row<3; row++){
00149     (*this)[row][0]=v0[row];
00150     (*this)[row][1]=v1[row];
00151     (*this)[row][2]=v2[row];
00152   };
00153 }
00154
00155 //JW 07/2003
00156 template<class T>
00157 void Matrix3x3<T>::SetFromRowVectors(const BIAS::Vector3<T> & v0,
00158                                      const BIAS::Vector3<T> & v1,
00159                                      const BIAS::Vector3<T> & v2 )
00160 {
00161   // will be loop-unrolled ..
00162   // for all elements of a row:
00163   for (unsigned int col=0; col<3; col++){
00164     (*this)[0][col]=v0[col];
00165     (*this)[1][col]=v1[col];
00166     (*this)[2][col]=v2[col];
00167   };
00168 }
00169
00170 // JW
00171 template<class T>
00172 void Matrix3x3<T>::GetRow(const unsigned int row, Vector3<T>& v) const
00173 {
00174   BIASASSERT(row<3);// this has only 3 rows[0,1,2]
00175   T* p=this->GetData()+3*row;
00176   v[0]=*p++;
00177   v[1]=*p++;
00178   v[2]=*p;
00179   //  BIAS::Vector3<T> v( &(*this)[row][0] );
00180   //return v;
00181 }
00182
00183 // JW
00184 template<class T>
00185 BIAS::Vector3<T> Matrix3x3<T>::GetColumn(const unsigned int col) const {
00186   BIASASSERT(col<3);// this has only 3 cols[0,1,2]
00187   BIAS::Vector3<T> v( (*this)[0][col], (*this)[1][col], (*this)[2][col] );
00188   return v;
00189 }
00190
00191 template<class T>
00192 T Matrix3x3<T>::GetDeterminant() const
00193 {
00194   double t4 = (*this)[0][0]*(*this)[1][1];
00195   double t6 = (*this)[0][0]*(*this)[1][2];
00196   double t8 = (*this)[0][1]*(*this)[1][0];
00197   double t10 = (*this)[0][2]*(*this)[1][0];
00198   double t12 = (*this)[0][1]*(*this)[2][0];
00199   double t14 = (*this)[0][2]*(*this)[2][0];
00200   return T((t4*(*this)[2][2]-t6*(*this)[2][1]-t8*(*this)[2][2]+
00201           t10*(*this)[2][1]+t12*(*this)[1][2]-t14*(*this)[1][1]));
00202 }
00203
00204 template<class T>
00205 Matrix3x3<T> Matrix3x3<T>::Invert() const
00206 {
00207     /// JW: for what reason should this be deprecated???
00208     //BIASERR("warning Matrix3x3<T>::Invert() is deprecated");
00209
00210
00211     Matrix3x3<T> i;
00212 #ifdef BIAS_DEBUG
00213     int res =
00214 #endif
00215         Invert(i);
00216
00217 #ifdef BIAS_DEBUG
00218     if (res!=0) BIASERR("unable to invert matrix "<<*this);
00219 #endif
00220     BIASASSERT(res==0);
00221
00222     return i;
00223 }
00224
00225
00226 template<>
00227 int Matrix3x3<unsigned int>::Invert(Matrix3x3<unsigned int>& x) const {
00228   BIASERR("not implemented because minus does not make sense for unsigned type");
00229   BIASBREAK;
00230   return -1;
00231 }
00232
00233 template<class T>
00234 int Matrix3x3<T>::Invert(Matrix3x3<T>& x) const
00235 {
00236   int res=0;
00237   BIASASSERT(x.GetData()!=this->GetData());
00238   // following lines have been produced by Maple
00239   const double t4 = (*this)[0][0]*(*this)[1][1];
00240   const double t6 = (*this)[0][0]*(*this)[1][2];
00241   const double t8 = (*this)[0][1]*(*this)[1][0];
00242   const double t10 = (*this)[0][2]*(*this)[1][0];
00243   const double t12 = (*this)[0][1]*(*this)[2][0];
00244   const double t14 = (*this)[0][2]*(*this)[2][0];
00245
00246   const double det=(t4*(*this)[2][2]-t6*(*this)[2][1]-t8*(*this)[2][2]+t10
00247                     *(*this)[2][1]+t12*(*this)[1][2]-t14*(*this)[1][1]);
00248   // matrices with zero determinante ar not invertible
00249   if (det==0.0)
00250     return -1;
00251
00252   const double t17 = 1.0/det;
00253
00254   x[0][0] = T(((*this)[1][1]*(*this)[2][2]-(*this)[1][2]*(*this)[2][1])*t17);
00255   x[0][1] = T(-((*this)[0][1]*(*this)[2][2]-(*this)[0][2]*(*this)[2][1])*t17);
00256   x[0][2] = T(-(-(*this)[0][1]*(*this)[1][2]+(*this)[0][2]*(*this)[1][1])*t17);
00257   x[1][0] = T(-((*this)[1][0]*(*this)[2][2]-(*this)[1][2]*(*this)[2][0])*t17);
00258   x[1][1] = T(((*this)[0][0]*(*this)[2][2]-t14)*t17);
00259   x[1][2] = T(-(t6-t10)*t17);
00260   x[2][0] = T(((*this)[1][0]*(*this)[2][1]-(*this)[1][1]*(*this)[2][0])*t17);
00261   x[2][1] = T(-((*this)[0][0]*(*this)[2][1]-t12)*t17);
00262   x[2][2] = T((t4-t8)*t17);
00263
00264   return res;
00265 }
00266
00267
00268 template<>
00269 int Matrix3x3<unsigned int>::InvertIP()
00270 {
00271   BIASERR("not implemented because minus does not make sense for unsigned type");
00272   BIASBREAK;
00273   return -1;
00274 }
00275
00276
00277 template<class T>
00278 int Matrix3x3<T>::InvertIP()
00279 {
00280   int res=0;
00281   // following lines have been produced by Maple
00282   const double t4 = (*this)[0][0]*(*this)[1][1];
00283   const double t6 = (*this)[0][0]*(*this)[1][2];
00284   const double t8 = (*this)[0][1]*(*this)[1][0];
00285   const double t10 = (*this)[0][2]*(*this)[1][0];
00286   const double t12 = (*this)[0][1]*(*this)[2][0];
00287   const double t14 = (*this)[0][2]*(*this)[2][0];
00288
00289   const double det=(t4*(*this)[2][2]-t6*(*this)[2][1]-t8*(*this)[2][2]+t10
00290                     *(*this)[2][1]+t12*(*this)[1][2]-t14*(*this)[1][1]);
00291   // matrices with zero determinante ar not invertible
00292   if (det==0.0) return -1;
00293
00294   const double t17 = 1.0/det;
00295
00296 #ifdef BIAS_DEBUG
00297   Matrix3x3<T> tm=(*this);
00298 #endif
00299
00300   T tmp[9];
00301
00302   tmp[0] = T(((*this)[1][1]*(*this)[2][2]-(*this)[1][2]*(*this)[2][1])*t17);
00303   tmp[1] = T(-((*this)[0][1]*(*this)[2][2]-(*this)[0][2]*(*this)[2][1])*t17);
00304   tmp[2] = T(-(-(*this)[0][1]*(*this)[1][2]+(*this)[0][2]*(*this)[1][1])*t17);
00305   tmp[3] = T(-((*this)[1][0]*(*this)[2][2]-(*this)[1][2]*(*this)[2][0])*t17);
00306   tmp[4] = T(((*this)[0][0]*(*this)[2][2]-t14)*t17);
00307   tmp[5] = T(-(t6-t10)*t17);
00308   tmp[6] = T(((*this)[1][0]*(*this)[2][1]-(*this)[1][1]*(*this)[2][0])*t17);
00309   tmp[7] = T(-((*this)[0][0]*(*this)[2][1]-t12)*t17);
00310   tmp[8] = T((t4-t8)*t17);
00311
00312   memcpy((void*)(this->GetData()), (void*)tmp, 9*sizeof(T));
00313
00314 #ifdef BIAS_DEBUG
00315   Matrix3x3<T> tm2;
00316   tm.Invert(tm2);
00317   int tres=memcmp(this->GetData(), tm2.GetData(), 9*sizeof(T));
00318   if (tres!=0) cout << (*this)<<"\n"<<tm2<<endl;
00319   BIASASSERT(tres==0);
00320 #endif
00321
00322   return res;
00323 }
00324
00325
00326
00327 // JW 03/2005
00328 template <class T>
00329 int Matrix3x3<T>::LoadBogRC(const std::string & filename)
00330 {
00331     this->SetZero();// reset this
00332     ifstream fs( filename.c_str() );
00333     if (!fs) {
00334         BIASERR("could not open file "<<filename);
00335         return -1; // error, could not open file.
00336     };
00337     // parse and read in
00338     const unsigned int nMax=1024;
00339     char caLine[nMax];
00340     // std string for find
00341     string strLine;
00342     // helper for string to number /atof)
00343     istringstream iss;
00344     unsigned int pos=0, line=0;
00345     vector<string> pattern;
00346     pattern.clear();
00347     pattern.push_back("RC11 ="); // 0
00348     pattern.push_back("RC12 ="); // 1
00349     pattern.push_back("RC13 ="); // 2
00350
00351     pattern.push_back("RC21 ="); // 3
00352     pattern.push_back("RC22 ="); // 4
00353     pattern.push_back("RC23 ="); // 5
00354
00355     pattern.push_back("RC31 ="); // 6
00356     pattern.push_back("RC32 ="); // 7
00357     pattern.push_back("RC33 ="); // 8
00358
00359     vector< bool > found;
00360     found.resize( pattern.size(), false);
00361     BIASASSERT(found.size()>8);
00362     while (!fs.eof() && (fs)
00363         && (
00364         !found[0]
00365         || !found[1]
00366         || !found[2]
00367         || !found[3]
00368         || !found[4]
00369         || !found[5]
00370         || !found[6]
00371         || !found[7]
00372         || !found[8])
00373             )
00374         {
00375             line++;
00376             fs.getline(&caLine[0], nMax);
00377             strLine = caLine;
00378             for (unsigned int i=0; i<pattern.size(); i++){
00379                 pos = strLine.find(pattern[i]);
00380                 if (pos != string::npos){
00381                     found[i]=true;
00382                     iss.clear();
00383                     iss.str(  // after pattern: start, length
00384                         strLine.substr(pos+pattern[i].size(),  strLine.size()-pos-pattern[i].size())
00385                         );
00386                     BIASASSERT(i<9); // dim
00387                     iss>> this->GetData()[i];
00388                 };
00389             };
00390         };
00391         // check if we found all patterns
00392         BIASASSERT(found.size()==pattern.size());
00393         bool foundAll=true;
00394         for (unsigned int j=0; j<found.size(); j++) foundAll=foundAll&&found[j];
00395         if (!foundAll) return -99; // missed something
00396         return 0; // OK.
00397 }
00398
00399
00400
00401 // JW 03/2005
00402 template <class T>
00403 int Matrix3x3<T>::LoadBogK(const std::string & filename)
00404 {
00405     SetIdentity();// reset this
00406     ifstream fs( filename.c_str() );
00407     if (!fs) {
00408         BIASERR("could not open file "<<filename);
00409         return -1; // error, could not open file.
00410     };
00411     // parse and read in
00412     const unsigned int nMax=1024;
00413     char caLine[nMax];
00414     // std string for find
00415     string strLine;
00416     // helper for string to number /atof)
00417     istringstream iss;
00418     unsigned int pos=0, line=0;
00419     vector<string> pattern;
00420     pattern.clear();
00421
00422     pattern.push_back("FC_U ="); // 0
00423     pattern.push_back("SKEW ="); // 1
00424     pattern.push_back("CC_U ="); // 2
00425     // unused place holder:
00426     pattern.push_back("UNUSED_UNUSED-x82S6jd_UNUSED "); // 3
00427     pattern.push_back("FC_V ="); // 4
00428     pattern.push_back("CC_V ="); // 5
00429
00430     vector< bool > found;
00431     found.resize( pattern.size(), false);
00432     BIASASSERT(found.size()>5);
00433     while (!fs.eof() && (fs)
00434         && (
00435         !found[0]
00436         || !found[1]
00437         || !found[2]
00438         //|| !found[3] //unused
00439         || !found[4]
00440         || !found[5] )
00441             )
00442         {
00443             line++;
00444             fs.getline(&caLine[0], nMax);
00445             strLine = caLine;
00446             for (unsigned int i=0; i<pattern.size(); i++){
00447                 if (i!=3){
00448                     pos = strLine.find(pattern[i]);
00449                     if (pos != string::npos){
00450                         found[i]=true;
00451                         iss.clear();
00452                         iss.str(  // after pattern: start, length
00453                             strLine.substr(pos+pattern[i].size(),  strLine.size()-pos-pattern[i].size())
00454                             );
00455                         BIASASSERT(i<9); // dim
00456                         iss>> this->GetData()[i];
00457                     }
00458                 }
00459             };
00460         };
00461         // check if we found all patterns
00462         BIASASSERT(found.size()==pattern.size());
00463         bool foundAll=true;
00464         for (unsigned int j=0; j<found.size(); j++) {
00465             if (j!=3) foundAll=foundAll&&found[j];
00466         }
00467         if (!foundAll) return -99; // missed something
00468         return 0; // OK.
00469 }
00470
00471 #define INST(type) \
00472 template class BIASMathBase_EXPORT BIAS::Matrix3x3<type>;\
00473
00474 INST(unsigned char)
00475 INST(char)
00476 INST(float)
00477 INST(short)
00478 INST(unsigned short)
00479 INST(int)
00480 INST(unsigned int)
00481 INST(double)
00482
00483
00484   }
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x3.hh Source File

Base » Math

Matrix3x3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Matrix3x3_hh_
00027 #define _Matrix3x3_hh_
00028 #include "bias_config.h"
00029
00030 #include <string>
00031
00032 #include <Base/Debug/Error.hh>
00033   //#include <Base/Debug/Debug.hh>
00034
00035 #include "Matrix.hh"
00036 #include "Operators.hh"
00037
00038
00039
00040 // forward declaration to avoid mutual inclusion
00041 //template <class T> class BIASMathBase_EXPORT BIAS::Matrix3x4;
00042 #include <Base/Math/Matrix3x4.hh>
00043
00044 #include <Base/Math/Vector3.hh>
00045
00046   //template <class T> class BIASMathBase_EXPORT Vector3;
00047
00048 namespace BIAS {
00049
00050
00051
00052   /** @class Matrix3x3
00053       @ingroup g_math
00054       @brief is a 'fixed size' quadratic matrix of dim. 3 x 3 which is
00055       templated over the elemnt-type.
00056
00057       @author Jan Woetzel
00058       @status untested (04/17/2002)*/
00059   template<class T=double>
00060   class BIASMathBase_EXPORT Matrix3x3 : public Matrix<T> {
00061
00062   public:
00063     /** default constructor
00064         @status untested **/
00065     Matrix3x3<T>() : Matrix<T>(3, 3) {};
00066
00067     // DEPRECATED due to instantiation problem JW
00068     //explicit Matrix3x3<T>(const char *s) : Matrix<T>(3, 3, s) {};
00069     /// JW
00070     explicit Matrix3x3<T>(const std::string & s);
00071
00072     /** Set the matrix values JW */
00073     Matrix3x3<T>(
00074       const T a0, const T a1, const T a2,
00075       const T a3, const T a4, const T a5,
00076       const T a6, const T a7, const T a8) ;
00077
00078
00079     /** @brief init matrix with identity or zero
00080         @author koeser */
00081     explicit Matrix3x3<T>(const MatrixInitType& i) : Matrix<T>(3, 3, T(0)) {
00082       switch (i) {
00083       case MatrixZero:return;
00084       case MatrixIdentity:{
00085         this->v_[0] = this->v_[4] = this->v_[8] =T(1);
00086         return;
00087       }
00088       default:
00089         BIASERR("undefined MatrixInitType");
00090         BIASABORT;
00091       }
00092     }
00093
00094     /** @author Jan Woetzel
00095         @status untested (04/17/2002) **/
00096     Matrix3x3<T>(const Matrix3x3<T>& A) : Matrix<T>(A) {};
00097
00098     /** cast constructor from Matrix */
00099     Matrix3x3<T>(const Matrix<T>& A);
00100
00101     /** cast constructor from TNT::Matrix */
00102     Matrix3x3<T>(const TNT::Matrix<T>& A);
00103
00104     /** destructor
00105         @status untested (04/17/2002)**/
00106     virtual ~Matrix3x3<T>();
00107
00108
00109     /** matrix - vector multiplicate this matrix with Vector3,
00110         storing the result in destvec
00111         calculates:
00112         destvec = (this Matrix) * argvec
00113         @author Ingo Thomsen, Jan Woetzel
00114         @status untested (04/17/2002)**/
00115     inline void Mult(const Vector3<T> &argvec, Vector3<T> &destvec) const;
00116
00117     /** multiplies matrix from left with transposed argvec, resulting
00118         in transposed destvec
00119         @author woelk 05/2003 */
00120     inline
00121     void TransposedMult(const Vector3<T> &argvec, Vector3<T> &destvec) const;
00122
00123     /** matrix-matrix multiplication with other Matrix3x3,
00124         storing the result in destmat
00125         calculates:
00126         destmat = (this mat) * argmat
00127         @author Ingo Thomsen, Jan Woetzel
00128         @status untested (04/17/2002)**/
00129     inline void Mult(const Matrix3x3<T> & argmat,Matrix3x3<T> & destmat) const;
00130     /** @author woelk 06 2003 */
00131     inline void Mult(const Matrix3x4<T> & argmat,Matrix3x4<T> & destmat) const;
00132
00133     /** scalar-matrix multiplication */
00134     inline void Scale(const T &scalar, Matrix3x3<T> & destmat) const;
00135
00136     /** assignment operator
00137         calls corresponding operator from base class
00138         @author Felix Woelk **/
00139     inline Matrix3x3<T>& operator=(const Matrix3x3<T>& mat);
00140
00141
00142     /** tranpose this matrix "in place"
00143         example:
00144         0 1 2  -->  0 3 6
00145         3 4 5  -->  1 4 7
00146         6 7 8  -->  2 5 8
00147         @author Jan Woetzel
00148         @status untested (04/17/2002)**/
00149     inline void TransposeIP();
00150
00151     /** returns transposed matrix
00152         tested 12.06.2002
00153         @author Felix Woelk    */
00154     Matrix3x3<T> Transpose() const;
00155
00156     /** sets this as transposed arg,  fw */
00157     inline void Transpose(const Matrix3x3<T>& arg);
00158
00159     /** set the elements of this matrix to teh identity matrix
00160         (posisbly overriding the inherited method)
00161         @author Ingo Thomsen, Jan Woetzel
00162         @date 04/17/2002
00163         @status untested **/
00164     inline void SetIdentity();
00165
00166     /** sets the diagonalelements of this 3x3 Matrix
00167         rowwise with the values of the 9 (x1) vector
00168         @author Ingo Thomsen, Jan Woetzel
00169     **/
00170     void SetFromVector(const TNT::Vector<T> & vec);
00171
00172     /** set this matrix from 3 vectors each representating a column
00173         JW 07/2003 */
00174     void SetFromColumnVectors(const BIAS::Vector3<T> & v0,
00175                               const BIAS::Vector3<T> & v1,
00176                               const BIAS::Vector3<T> & v2);
00177
00178     /** set this matrix from 3 vectors, each representating a row
00179         JW 07/2003 */
00180     void SetFromRowVectors(const BIAS::Vector3<T> & v0,
00181                            const BIAS::Vector3<T> & v1,
00182                            const BIAS::Vector3<T> & v2);
00183
00184     /** extract one row ('Zeile') from ths matrix (for convenience) JW */
00185     void GetRow(const unsigned int row, Vector3<T>& r) const;
00186     inline Vector3<T> GetRow(const unsigned int row) const
00187     {
00188       Vector3<T> m;
00189       GetRow(row, m);
00190       return m;
00191     }
00192
00193     /** extract one column ('Spalte') from this matrix (for convenience) JW */
00194     BIAS::Vector3<T> GetColumn(const unsigned int col) const;
00195
00196
00197     /** calculate the determinante
00198         @author Ingo Thomsen
00199         @status alpha (04/17/2002)*/
00200     inline T det() const;
00201
00202     /** just neccessary to avoid resizing of this 'fixed size' matrix because
00203         it is derived from the resizable Matrix
00204         should be removed when Matrix3x3 becomes a base class.
00205         (04/17/2002) Jan Woetzel
00206     **/
00207     Matrix3x3 & newsize(int rows, int cols);
00208
00209     /** Sets matrix from vector as cross product matrix of this vector. */
00210     inline void SetAsCrossProductMatrix(const Vector3<T> &vec);
00211
00212     /** Sets matrix from vector as cross product matrix of a vector.
00213         with components (x, y, z) */
00214     inline void SetAsCrossProductMatrix(const T &x, const T &y, const T &z);
00215
00216     /** Complete inversion
00217         @author Jan-Friso Evers-Senne
00218         2002-08-27 */
00219     Matrix3x3<T> Invert() const;
00220
00221     /** In place matrix conversion.
00222         Returns -1 if determinant is zero, 0 on success.
00223         @author woelk 07/2005 */
00224     int InvertIP();
00225
00226     /** Matrix inversion: inverts this and stores resulty in argument inv.
00227         Returns -1 if determinant is zero, 0 on success.
00228         @author woelk 07/2005 */
00229     int Invert(Matrix3x3<T>& inv) const;
00230
00231     /** return the trace of the matrix
00232         @author woelk 04/2006 */
00233     inline T Trace() const
00234     { const register T *p = this->GetData();    return p[0] + p[4] + p[8]; }
00235
00236     /** returns the Determinant |A| of this
00237         @author grest  */
00238     T GetDeterminant() const;
00239
00240     /** return biggest and smallest entry
00241         @author woelk 08/2004 */
00242     inline void MaxMin(T& max, T&min) const;
00243
00244     /** reads the RC part of a BOG file
00245         which is used by Daimler Chrysler
00246         for storing camera orientation/rotation.
00247         @return 0 for success, negative for errror
00248         @author Jan Woetzel 03/2005
00249         @todo what do teh fields RotMatInRowColumn and ReferenceFrameCurrentCam field mean? transpose? JW
00250         */
00251     int LoadBogRC(const std::string & filename);
00252
00253     /** reads the internal KMatrix part of a BOG file
00254         @return 0 for success, negative for errror
00255         @author Jan Woetzel 03/2005 */
00256     int LoadBogK(const std::string & filename);
00257
00258
00259   }; // class Matrix3x3 --------------------------------------
00260
00261
00262
00263
00264
00265
00266   template <class T> inline void
00267   Matrix3x3<T>::Mult(const Vector3<T> &argvec, Vector3<T> &destvec) const
00268   {
00269     // direct access to the matrix values using fixed indicies:
00270     // 0  1  2       0
00271     // 3  4  5   *   1
00272     // 6  7  8       2
00273     const register T *matP = this->GetData();
00274     destvec[0] = argvec[0] * matP[0]
00275       + argvec[1] * matP[1]
00276       + argvec[2] * matP[2];
00277     destvec[1] = argvec[0] * matP[3]
00278       + argvec[1] * matP[4]
00279       + argvec[2] * matP[5];
00280     destvec[2] = argvec[0] * matP[6]
00281       + argvec[1] * matP[7]
00282       + argvec[2] * matP[8];
00283   }
00284
00285   template <class T> inline void
00286   Matrix3x3<T>::TransposedMult(const Vector3<T> &argvec, Vector3<T> &destvec) const
00287   {
00288     // direct access to the matrix values using fixed indicies:
00289     // 0  1  2       0
00290     // 3  4  5   *   1
00291     // 6  7  8       2
00292     const register T *matP = this->GetData();
00293     destvec[0] = argvec[0] * matP[0]
00294       + argvec[1] * matP[3]
00295       + argvec[2] * matP[6];
00296     destvec[1] = argvec[0] * matP[1]
00297       + argvec[1] * matP[4]
00298       + argvec[2] * matP[7];
00299     destvec[2] = argvec[0] * matP[2]
00300       + argvec[1] * matP[5]
00301       + argvec[2] * matP[8];
00302   }
00303
00304   template <class T> inline void
00305   Matrix3x3<T>::Mult(const Matrix3x3<T> & argmat, Matrix3x3<T> & destmat) const
00306   {
00307     //
00308     // direct access using fixed indicies with matrix order:
00309     //  0 1 2
00310     //  3 4 5
00311     //  6 7 8
00312     register T *destP   = destmat.GetData();
00313     const register T *argP  = argmat.GetData();
00314     const register T *matP  = this->GetData();
00315     // does not work for in place multiplication
00316     BIASASSERT(destP!=argP);
00317     BIASASSERT(destP!=matP);
00318
00319     destP[0] =
00320       matP[0] * argP[0] + matP[1] * argP[3] + matP[2] * argP[6];
00321     destP[1] =
00322       matP[0] * argP[1] + matP[1] * argP[4] + matP[2] * argP[7];
00323     destP[2] =
00324       matP[0] * argP[2] + matP[1] * argP[5] + matP[2] * argP[8];
00325
00326     destP[3] =
00327       matP[3] * argP[0] + matP[4] * argP[3] + matP[5] * argP[6];
00328     destP[4] =
00329       matP[3] * argP[1] + matP[4] * argP[4] + matP[5] * argP[7];
00330     destP[5] =
00331       matP[3] * argP[2] + matP[4] * argP[5] + matP[5] * argP[8];
00332
00333     destP[6] =
00334       matP[6] * argP[0] + matP[7] * argP[3] + matP[8] * argP[6];
00335     destP[7] =
00336       matP[6] * argP[1] + matP[7] * argP[4] + matP[8] * argP[7];
00337     destP[8] =
00338       matP[6] * argP[2] + matP[7] * argP[5] + matP[8] * argP[8];
00339   }
00340
00341   template <class T> inline void
00342   Matrix3x3<T>::Mult(const Matrix3x4<T> & argmat, Matrix3x4<T> & destmat) const
00343   {
00344     //
00345     // direct access using fixed indicies with matrix order:
00346     //  0 1 2
00347     //  3 4 5
00348     //  6 7 8
00349     // oder 3x4
00350     //  0 1 2  3
00351     //  4 5 6  7
00352     //  8 9 10 11
00353     T *destP    = (T*) (destmat.GetData());
00354     const T *argP   = (T*)(argmat.GetData());
00355     const register T *matP  = this->GetData();
00356     // does not work for in place multiplication
00357     BIASASSERT(matP!=argP);
00358     BIASASSERT(matP!=destP);
00359
00360     destP[0] =
00361       matP[0] * argP[0] + matP[1] * argP[4] + matP[2] * argP[8];
00362     destP[1] =
00363       matP[0] * argP[1] + matP[1] * argP[5] + matP[2] * argP[9];
00364     destP[2] =
00365       matP[0] * argP[2] + matP[1] * argP[6] + matP[2] * argP[10];
00366     destP[3] =
00367       matP[0] * argP[3] + matP[1] * argP[7] + matP[2] * argP[11];
00368
00369     destP[4] =
00370       matP[3] * argP[0] + matP[4] * argP[4] + matP[5] * argP[8];
00371     destP[5] =
00372       matP[3] * argP[1] + matP[4] * argP[5] + matP[5] * argP[9];
00373     destP[6] =
00374       matP[3] * argP[2] + matP[4] * argP[6] + matP[5] * argP[10];
00375     destP[7] =
00376       matP[3] * argP[3] + matP[4] * argP[7] + matP[5] * argP[11];
00377
00378     destP[8] =
00379       matP[6] * argP[0] + matP[7] * argP[4] + matP[8] * argP[8];
00380     destP[9] =
00381       matP[6] * argP[1] + matP[7] * argP[5] + matP[8] * argP[9];
00382     destP[10] =
00383       matP[6] * argP[2] + matP[7] * argP[6] + matP[8] * argP[10];
00384     destP[11] =
00385       matP[6] * argP[3] + matP[7] * argP[7] + matP[8] * argP[11];
00386   }
00387
00388
00389   template <class T> inline void
00390   Matrix3x3<T>::Scale(const  T &scalar, Matrix3x3<T> & destmat) const
00391   {
00392     register T *dest = destmat.GetData();
00393     const register T *src   = this->GetData();
00394     for (int i=0; i<9; i++)
00395       dest[i] = scalar * src[i];
00396   }
00397
00398
00399
00400   template <class T> inline void
00401   Matrix3x3<T>::TransposeIP()
00402   {
00403     // swap the 1,2,5 with the 3,6,7
00404     // 0  1  2
00405     // 3  4  5
00406     // 6  7  8
00407     register T *dataP = this->GetData();    // pointer to the data array
00408     register T tmp;
00409     // swap 1,3:
00410     tmp = dataP[1];
00411     dataP[1] = dataP[3];
00412     dataP[3] = tmp;
00413     // swap 2,6:
00414     tmp = dataP[2];
00415     dataP[2] = dataP[6];
00416     dataP[6] = tmp;
00417     // swap 5,7:
00418     tmp = dataP[5];
00419     dataP[5] = dataP[7];
00420     dataP[7] = tmp;
00421   }
00422
00423   template <class T> inline void
00424   Matrix3x3<T>::Transpose(const Matrix3x3<T>& arg)
00425   {
00426     register T *argp = arg.GetData();
00427     this->v_[0] = argp[0]; this->v_[4] = argp[4]; this->v_[8] = argp[8];
00428     this->v_[1] = argp[3]; this->v_[2] = argp[6]; this->v_[3] = argp[1];
00429     this->v_[5] = argp[7]; this->v_[6] = argp[2]; this->v_[7] = argp[5];
00430   }
00431
00432
00433   template <class T> inline void
00434   Matrix3x3<T>::SetIdentity()
00435   {
00436     register T* d = this->GetData(); // pointer to this matrix's data array
00437     d[0] = 1;
00438     d[1] = 0;
00439     d[2] = 0;
00440     d[3] = 0;
00441     d[4] = 1;
00442     d[5] = 0;
00443     d[6] = 0;
00444     d[7] = 0;
00445     d[8] = 1;
00446   }
00447
00448   template <class T> inline T
00449   Matrix3x3<T>::det() const
00450   {
00451     register T *dataP = this->GetData(); // pointer to the data array
00452     return (
00453             dataP[0] * dataP[4] * dataP[8]
00454             + dataP[1] * dataP[5] * dataP[6]
00455             + dataP[2] * dataP[3] * dataP[7]
00456             - dataP[6] * dataP[4] * dataP[2]
00457             - dataP[7] * dataP[5] * dataP[0]
00458             - dataP[8] * dataP[3] * dataP[1] );
00459   }
00460
00461
00462   template<> inline void
00463   Matrix3x3<unsigned int>::SetAsCrossProductMatrix(const Vector3<unsigned int> & /*vec*/){
00464     BIASERR("not implemented because minus does not make sense for unsigned type");
00465     BIASBREAK;
00466   }
00467
00468   template <class T> inline void
00469   Matrix3x3<T>::SetAsCrossProductMatrix(const Vector3<T> &vec)
00470   {
00471     T *mat=this->GetData();
00472     mat[0]=mat[4]=mat[8]=0;
00473     mat[1]=-vec[2]; mat[2]=vec[1];
00474     mat[3]= vec[2]; mat[5]=-vec[0];
00475     mat[6]= -vec[1]; mat[7]=vec[0];
00476   }
00477
00478
00479   template<> inline
00480   void Matrix3x3<unsigned int>::SetAsCrossProductMatrix(const unsigned int & /*x*/, const unsigned int & /*y*/, const unsigned int & /*z*/) {
00481     BIASERR("not implemented because minus does not make sense for unsigned type");
00482     BIASBREAK;
00483   }
00484
00485
00486   template <class T> inline
00487   void Matrix3x3<T>::SetAsCrossProductMatrix(const T &x, const T &y, const T &z)
00488   {
00489     T *mat=this->GetData();
00490     mat[0]=mat[4]=mat[8]=0;
00491     mat[1]= -z; mat[2]= y;
00492     mat[3]=  z; mat[5]=-x;
00493     mat[6]= -y; mat[7]= x;
00494   }
00495
00496
00497
00498   ///////////////////////// non class functions
00499
00500   template <class T>
00501     inline std::istream& operator>>(std::istream &s, Matrix3x3<T> &A)
00502   {
00503     int M, N;
00504
00505     s >> M >> N;
00506
00507     if (M!=3 || N!=3) {
00508       s.setstate(std::ios::badbit | std::ios::failbit);
00509       return s;
00510     }
00511
00512     if ( !(M == A.num_rows() && N == A.num_cols() ))
00513       A.newsize(M,N);
00514
00515     for (int i=0; i<M; i++)
00516       for (int j=0; j<N; j++)
00517         s >>  A[i][j];
00518
00519     return s;
00520   }
00521
00522   template<class T>
00523   inline Matrix3x3<T>& Matrix3x3<T>::operator= (const Matrix3x3<T>& mat)
00524   {
00525     Matrix<T>::operator=(mat);
00526     return *this;
00527   }
00528
00529   template<class T>
00530   inline void Matrix3x3<T>::MaxMin(T& max, T& min) const
00531   {
00532     register T *d=this->GetData();
00533     max = min = *d;
00534
00535     if (d[1]>max) max=d[1];
00536     if (d[2]>max) max=d[2];
00537     if (d[3]>max) max=d[3];
00538     if (d[4]>max) max=d[4];
00539     if (d[5]>max) max=d[5];
00540     if (d[6]>max) max=d[6];
00541     if (d[7]>max) max=d[7];
00542     if (d[8]>max) max=d[8];
00543
00544     if (d[1]<min) min=d[1];
00545     if (d[2]<min) min=d[2];
00546     if (d[3]<min) min=d[3];
00547     if (d[4]<min) min=d[4];
00548     if (d[5]<min) min=d[5];
00549     if (d[6]<min) min=d[6];
00550     if (d[7]<min) min=d[7];
00551     if (d[8]<min) min=d[8];
00552   }
00553
00554
00555
00556 } // end of namespace BIAS
00557
00558 #endif
00559
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x4.cpp Source File

Base » Math

Matrix3x4.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Matrix3x4.hh"
00027 // STD
00028 #include <iostream>
00029 #include <fstream>
00030 #include <sstream>
00031 #include <string>
00032
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 namespace BIAS {
00038
00039 template <class T>
00040 Matrix3x4<T>::~Matrix3x4() {}
00041
00042
00043 template<class T>
00044 Matrix3x4<T>::Matrix3x4(
00045   const T a0, const T a1, const T  a2, const T  a3,
00046   const T a4, const T a5, const T  a6, const T  a7,
00047   const T a8, const T a9, const T a10, const T a11 )
00048   : Matrix<T>(3, 4)
00049 {
00050   this->GetData()[0]=a0; this->GetData()[1]=a1; this->GetData()[ 2]= a2; this->GetData()[ 3]= a3;
00051   this->GetData()[4]=a4; this->GetData()[5]=a5; this->GetData()[ 6]= a6; this->GetData()[ 7]= a7;
00052   this->GetData()[8]=a8; this->GetData()[9]=a9; this->GetData()[10]=a10; this->GetData()[11]=a11;
00053 }
00054
00055
00056 template<class T>
00057 Matrix3x4<T>::Matrix3x4(const std::string & s)
00058 : Matrix<T>(3, 4, s)
00059 {}
00060
00061
00062 template<class T>
00063 Matrix3x4<T>& Matrix3x4<T>::operator= (const Matrix<T> &mat) {
00064     if ((mat.num_rows() == 3) && (mat.num_cols() == 4)) {
00065         Matrix<T>::operator= (mat); // call the operator of the base class
00066         return *this;
00067     } else {
00068         BIASERR("cannot assign with operator= , num_rows=" << mat.num_rows() << " num_cols= " << mat.num_rows()
00069                << " are'nt appropriate for a 3x4 Matrix3x4<T>.");
00070 #if DEBUG
00071         exit(-1);
00072 #endif
00073     };
00074     return *this;
00075 }
00076
00077 template
00078 <class T>
00079 Matrix3x4<T> & Matrix3x4<T>::newsize(int rows, int cols) {
00080     if ((rows != 3) || (cols != 4)) {
00081         // do nothing
00082         // print error message if the new size should not be a 3x4 matrix
00083         BIASERR("The size of a Matrix3x4<T> has to be 3 rows, 4 cols. newsize can't create a " <<rows<< " x " <<cols<< " Matrix3x4 !");
00084 #if DEBUG
00085         exit(-1);
00086 #endif
00087         return *this;
00088
00089     } else {
00090         BIASASSERT( rows==3 ); // 3x4 matrix
00091         BIASASSERT( cols==4 );
00092         // call base class function (usually unnecessary except for first construction)
00093         Matrix<T>::newsize(3, 4);
00094         return *this;
00095     }
00096 }
00097
00098
00099 // JW
00100 template <class T>
00101 int
00102 Matrix3x4<T>::LoadBan(const std::string & filename, const unsigned int & Time){
00103     ifstream fs( filename.c_str() );
00104     if (!fs) {
00105         return -1; // error, could not open file.
00106     } else {
00107         // parse and read in
00108         const unsigned int nMax=1024;
00109         // character array for getline
00110         char caLine[nMax];
00111         // std string for find
00112         string strLine;
00113         bool found=false;
00114         unsigned int pos=0;
00115         // pattern to find
00116         stringstream patternSS;
00117         patternSS<<"AddCameraKey { Time "<<setw(1)<<int(Time)<<" Camera [ ";
00118         string pattern=patternSS.str();
00119         while (!fs.eof() && (fs) &&(!found)){
00120             fs.getline(&caLine[0], nMax);
00121             strLine = caLine;
00122             pos = strLine.find(pattern);
00123             if (pos != string::npos){
00124                 // found pattern
00125                 found=true;
00126                 pos+=pattern.size();
00127                 string sub;
00128                 sub = strLine.substr(pos,  strLine.size()-pos );
00129                 // helper to stream string into numeric variable
00130                 istringstream iss( sub );
00131
00132                 // read numerics
00133                 for (unsigned int row=0; row<3; row++) {
00134                     for (unsigned int col=0; col<4; col++) {
00135                         iss >> (*this)[row][col];
00136                     }
00137                 }
00138                 return 0; // OK.
00139             };
00140         };
00141         fs.close();
00142     };
00143     return -2; // not found.
00144 }
00145
00146 } // end namespace BIAS
00147
00148 #define INST(type) \
00149 template class BIASMathBase_EXPORT BIAS::Matrix3x4<type>;\
00150
00151 INST(unsigned char)
00152 INST(char)
00153 INST(float)
00154 INST(short)
00155 INST(unsigned short)
00156 INST(int)
00157 INST(unsigned int)
00158 INST(double)
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix3x4.hh Source File

Base » Math

Matrix3x4.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Matrix3x4_hh_
00027 #define _Matrix3x4_hh_
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Debug/Error.hh>
00032
00033 #include "Matrix.hh"
00034 #include "Operators.hh"
00035 #include "Vector4.hh"
00036 #include <string>
00037
00038
00039 namespace BIAS {
00040
00041   template <class T> class Matrix3x3;
00042 /**
00043
00044     @class Matrix3x4
00045     @ingroup g_math
00046     @brief is a 'fixed size' rectangular matrix of dim. 3 x 4
00047     which is templated over the element-type
00048
00049     @author Jan Woetzel
00050     @status untested (04/17/2002)
00051 **/
00052
00053   // forward declaration to avoid mutual inclusion
00054   //template <class T> class Vector4;
00055
00056   template<class T=double>
00057   class BIASMathBase_EXPORT Matrix3x4 : public Matrix<T> {
00058
00059   public:
00060     /** default constructor
00061         @status untested **/
00062     Matrix3x4<T>() : Matrix<T>(3, 4) {};
00063
00064
00065     // DEPRECATED due to instantiation problem JW
00066     //explicit Matrix3x4<T>(const char *s) : Matrix<T>(3, 4, s) {};
00067
00068     /// JW
00069     explicit Matrix3x4<T>(const std::string & s);
00070
00071     /** Set the matrix values JW */
00072     Matrix3x4<T>(
00073       const T a0, const T a1, const T  a2, const T  a3,
00074       const T a4, const T a5, const T  a6, const T  a7,
00075       const T a8, const T a9, const T a10, const T a11 );
00076
00077
00078     /** @brief init matrix with identity or zero
00079         @author koeser */
00080     explicit Matrix3x4<T>(const MatrixInitType& i) : Matrix<T>(3, 4, T(0)) {
00081       switch (i) {
00082       case MatrixZero:return;
00083       case MatrixIdentity:{
00084         this->v_[0] = this->v_[5] = this->v_[10] = T(1);
00085         return;
00086       }
00087       default:
00088         BIASERR("undefined MatrixInitType");
00089         BIASABORT;
00090       }
00091     }
00092
00093     /** @author Jan Woetzel
00094         @status untested (04/17/2002) **/
00095     Matrix3x4<T>(const Matrix3x4<T> & A) : Matrix<T>(A) {};
00096
00097
00098     /** destructor
00099         @status untested (04/17/2002)**/
00100     virtual ~Matrix3x4<T>();
00101
00102
00103     /** matrix - vector multiplicate this matrix with Vector4,
00104         storing the result in destvec
00105         calculates:
00106         destvec = (this Matrix) * argvec
00107         @author  Jan Woetzel
00108         @status untested (04/17/2002) **/
00109     inline void Mult(const Vector4<T> &argvec, Vector3<T> &destvec) const;
00110
00111
00112     /** assignment operator
00113         calling corresponding operator from base class if appropriate.
00114         @author Jan Woetzel
00115         @status untested (02/25/2002) **/
00116     Matrix3x4 & operator= (const Matrix<T> &mat);
00117
00118
00119     /** set the elements of this matrix to the matrix
00120         1  0  0  0
00121         0  1  0  0
00122         0  0  1  0
00123         which is no strict identity (!)
00124         @author Jan Woetzel
00125         @date 04/17/2002
00126         @status untested **/
00127     inline void SetIdentity();
00128
00129
00130     /** just neccessary to avoid resizing of this 'fixed size' matrix
00131         because it is derived from teh resizable Matrix
00132         Should be removed if Matrix3x4 becomes a base class.
00133         @woetzel (04/17/2002)
00134         @author Jan Woetzel  **/
00135     Matrix3x4 & newsize(int rows, int cols);
00136
00137     /** Loads a PMatrix from .ban file given by AddCameraKey and Time index
00138         @return 0 in case of success and negative nr. in case of error.
00139         @author Jan Woetzel */
00140     int LoadBan(const std::string & filename, const unsigned int & Time=0);
00141
00142   }; // class Matrix3x4 -------------------------------
00143
00144
00145
00146
00147   template <class T> inline void
00148   Matrix3x4<T>::Mult( const Vector4<T> &argvec, Vector3<T> &destvec) const
00149   {
00150     // direct access to the matrix values using fixed indicies:
00151     //  0  1  2  3       0
00152     //  4  5  6  7   *   1
00153     //  8  9 10 11       2
00154     //                   3
00155     const register T *matP = this->GetData();
00156     // first row:
00157     destvec[0] =
00158       matP[0] * argvec[0]
00159       +matP[1] * argvec[1]
00160       +matP[2] * argvec[2]
00161       +matP[3] * argvec[3];
00162     // second row:
00163     destvec[1] =
00164       matP[4] * argvec[0]
00165       +matP[5] * argvec[1]
00166       +matP[6] * argvec[2]
00167       +matP[7] * argvec[3];
00168     // third row (because of 3x4 there are only 3 rows):
00169     destvec[2] =
00170       matP[8]  * argvec[0]
00171       +matP[9]  * argvec[1]
00172       +matP[10] * argvec[2]
00173       +matP[11] * argvec[3];
00174   }
00175
00176
00177   template <class T> inline void
00178   Matrix3x4<T>::SetIdentity()
00179   {
00180     // set this matrix to teh following (which is no strict identity matrix)
00181     //  1  0  0  0
00182     //  0  1  0  0
00183     //  0  0  1  0
00184     register T* d = this->GetData(); // pointer to this matrix's data array
00185     d[0] = 1;
00186     d[1] = 0;
00187     d[2]  = 0;
00188     d[3] = 0;
00189     d[4] = 0;
00190     d[5] = 1;
00191     d[6]  = 0;
00192     d[7] = 0;
00193     d[8] = 0;
00194     d[9] = 0;
00195     d[10] = 1;
00196     d[11] = 0;
00197   }
00198
00199    //template <class T>
00200    //int LoadBan(const std::string & filename, const unsigned int * Time=0);
00201
00202 } // namespace BIAS
00203
00204 #endif
00205
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix4x4.cpp Source File

Base » Math

Matrix4x4.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Matrix4x4.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031
00032 namespace BIAS {
00033
00034 template <class T>
00035 Matrix4x4<T>::~Matrix4x4() {
00036     // destroy the new allocated members of this class if they exist
00037 }
00038
00039 template <class T>
00040 Matrix4x4<T>::Matrix4x4(const std::string & s)
00041 : Matrix<T>(4, 4, s)
00042 {}
00043
00044
00045 /** Set the matrix values JW */
00046 template <class T>
00047 Matrix4x4<T>::Matrix4x4(const T  a0, const T  a1, const T  a2, const T  a3,
00048                         const T  a4, const T  a5, const T  a6, const T  a7,
00049                         const T  a8, const T  a9, const T a10, const T a11,
00050                         const T a12, const T a13, const T a14, const T a15 )
00051                         : Matrix<T>(4, 4)
00052 {
00053   this->GetData()[ 0]= a0; this->GetData()[ 1]= a1; this->GetData()[ 2]= a2; this->GetData()[ 3]= a3;
00054   this->GetData()[ 4]= a4; this->GetData()[ 5]= a5; this->GetData()[ 6]= a6; this->GetData()[ 7]= a7;
00055   this->GetData()[ 8]= a8; this->GetData()[ 9]= a9; this->GetData()[10]=a10; this->GetData()[11]=a11;
00056   this->GetData()[12]=a12; this->GetData()[13]=a13; this->GetData()[14]=a14; this->GetData()[15]=a15;
00057 }
00058
00059
00060 template <class T>
00061 Matrix4x4<T> & Matrix4x4<T>::operator= (const Matrix<T> &mat) {
00062     if ((mat.num_rows() == 4) && (mat.num_cols() == 4)) {
00063         Matrix<T>::operator= (mat); // call the operator of the base class
00064         return *this;
00065     } else {
00066         BIASERR("cannot assign with operator= , num_rows=" << mat.
00067                num_rows() << " num_cols= " << mat.
00068                num_cols() << " are'nt appropriate for a 4x4 Matrix4x4<T>. ");
00069 #if DEBUG
00070         exit(-1);
00071 #endif
00072     };
00073     return *this;
00074 }
00075
00076 template<class T>
00077 Matrix4x4<T>::Matrix4x4(const Matrix<T>& mat) : Matrix<T>(mat)
00078 {
00079   if ((mat.num_rows() != 4) || (mat.num_cols() != 4)) {
00080     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00081            << mat.num_cols());
00082   }
00083 }
00084
00085 template<class T>
00086 Matrix4x4<T>::Matrix4x4(const TNT::Matrix<T>& mat) : Matrix<T>(mat)
00087 {
00088   if ((mat.num_rows() != 4) || (mat.num_cols() != 4)) {
00089     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00090            << mat.num_cols());
00091   }
00092 }
00093
00094 template <class T>
00095 Matrix4x4<T> & Matrix4x4<T>::newsize(int rows, int cols) {
00096     if ((rows != 4) || (cols != 4)) {
00097         // do nothing
00098         // print error message if the new size should not be a 4x4 matrix
00099         BIASERR("The size of a Matrix4x4<T> has to be 4 rows, 4 cols. newsize can't create a " <<
00100                rows << " x " << cols << " Matrix4x4 !");
00101 #if DEBUG
00102         exit(-1);
00103 #endif
00104         return *this;
00105
00106     } else {
00107         BIASASSERT( rows==4 ); // 4x4 matrix
00108         BIASASSERT( cols==4 );
00109         // call base class function (usually unnecessary except for first construction)
00110         Matrix<T>::newsize(4, 4);
00111         return *this;
00112     };
00113 }
00114
00115 template <class T>
00116 Matrix4x4<T>::Matrix4x4(const Matrix3x3<T> & R,
00117                            const Vector3<T> &trans) : Matrix<T>(4, 4)
00118 {
00119   (*this)[0][0]=R[0][0]; (*this)[0][1]=R[0][1]; (*this)[0][2]=R[0][2];
00120   (*this)[0][3]=trans[0];
00121   (*this)[1][0]=R[1][0]; (*this)[1][1]=R[1][1]; (*this)[1][2]=R[1][2];
00122   (*this)[1][3]=trans[1];
00123   (*this)[2][0]=R[2][0]; (*this)[2][1]=R[2][1]; (*this)[2][2]=R[2][2];
00124   (*this)[2][3]=trans[2];
00125   (*this)[3][0]=0;(*this)[3][1]=0;              (*this)[3][2]=0;
00126   (*this)[3][3]=T(1);
00127
00128 }
00129
00130 } // end namespace BIAS
00131
00132 #define INST(type) \
00133 template class BIASMathBase_EXPORT BIAS::Matrix4x4<type>;\
00134
00135 INST(unsigned char)
00136 INST(char)
00137 INST(float)
00138 INST(short)
00139 INST(unsigned short)
00140 INST(int)
00141 INST(unsigned int)
00142 INST(double)
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix4x4.hh Source File

Base » Math

Matrix4x4.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_Matrix4x4_hh_
00027 #define _BIAS_Matrix4x4_hh_
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031
00032 #include "Matrix.hh"
00033 #include "Matrix3x3.hh"
00034 #include "Vector3.hh"
00035 #include "Vector4.hh"
00036 #include "Operators.hh"
00037
00038 namespace BIAS {
00039
00040   /**
00041      @class Matrix4x4
00042      @ingroup g_math
00043      @brief is a 'fixed size' quadratic matrix of dim. 4 x 4 which is templated
00044      over the element-type
00045
00046      @author Jan Woetzel,  (04/17/2002)
00047   **/
00048
00049   // forward declaration to avoid mutual inclusion
00050   //template <class T> class Matrix3x3;
00051   //template <class T> class Vector4;
00052   //template <class T> class Vector3;
00053
00054   template <class T=double>
00055   class BIASMathBase_EXPORT Matrix4x4 : public Matrix<T>
00056   {
00057   public:
00058
00059     /// constructors
00060     /// call the corresponding constructors of the base class if appropriate
00061     ///
00062
00063     /** default constructor
00064     **/
00065     Matrix4x4<T>() : Matrix<T>(4, 4) {};
00066
00067     // DEPRECATED due to instantiation problem JW
00068     //explicit Matrix4x4<T>(const char *s) : Matrix<T>(4, 4, s) {};
00069     /// JW
00070     explicit Matrix4x4<T>(const std::string & s);
00071
00072
00073     /** Set the matrix values JW */
00074     Matrix4x4<T>(
00075       const T  a0, const T  a1, const T  a2, const T  a3,
00076       const T  a4, const T  a5, const T  a6, const T  a7,
00077       const T  a8, const T  a9, const T a10, const T a11,
00078       const T a12, const T a13, const T a14, const T a15 );
00079
00080     /** @brief init matrix with identity or zero
00081         @author koeser */
00082     explicit Matrix4x4<T>(const MatrixInitType& i) : Matrix<T>(4, 4, T(0)) {
00083       switch (i) {
00084       case MatrixZero:return;
00085       case MatrixIdentity:{
00086         this->v_[0] = this->v_[5] = this->v_[10] = this->v_[15] = T(1);
00087         return;
00088       }
00089       default:
00090         BIASERR("undefined MatrixInitType");
00091         BIASABORT;
00092       }
00093     }
00094
00095
00096     Matrix4x4<T>(const Matrix4x4<T> & A) : Matrix<T>(A) {};
00097
00098     Matrix4x4<T>(const Matrix<T>& arg);
00099
00100     /** cast constructor from TNT::Matrix */
00101     Matrix4x4<T>(const TNT::Matrix<T>& A);
00102
00103     /** Set as Rotation and Translation for similarity transforms
00104         @author grest, Dec. 2004
00105     */
00106     Matrix4x4<T>(const Matrix3x3<T> & R,
00107                  const Vector3<T> &trans);
00108
00109
00110     /** destructor
00111         @status untested (04/17/2002)
00112     **/
00113     virtual ~Matrix4x4<T>();
00114
00115
00116     /** matrix - vector multiplicate this matrix with Vector4,
00117         storing the result in destvec,  calculates:
00118         destvec = (this Matrix) * argvec
00119         @author  Jan Woetzel
00120         @status untested (04/17/2002)
00121     **/
00122     inline void Mult( const Vector4<T> &argvec, Vector4<T> &destvec) const {
00123       // direct access to the matrix values using fixed indicies:
00124       //  0  1  2  3       0
00125       //  4  5  6  7   *   1
00126       //  8  9 10 11       2
00127       // 12 13 14 15       3
00128
00129       // pointer to the beginning of the data array of this matrix
00130       const register T *matP = this->GetData();
00131
00132       // first row:
00133       destvec[0] =
00134         matP[0] * argvec[0]
00135         +matP[1] * argvec[1]
00136         +matP[2] * argvec[2]
00137         +matP[3] * argvec[3];
00138       // second row:
00139       destvec[1] =
00140         matP[4] * argvec[0]
00141         +matP[5] * argvec[1]
00142         +matP[6] * argvec[2]
00143         +matP[7] * argvec[3];
00144       // third row:
00145       destvec[2] =
00146         matP[8]  * argvec[0]
00147         +matP[9]  * argvec[1]
00148         +matP[10] * argvec[2]
00149         +matP[11] * argvec[3];
00150       // fourth row:
00151       destvec[3] =
00152         matP[12] * argvec[0]
00153         +matP[13] * argvec[1]
00154         +matP[14] * argvec[2]
00155         +matP[15] * argvec[3];
00156     };
00157
00158
00159
00160
00161     /** calculate the determinant recursively using sub matrices of size 3x3
00162         @author  koeser 10/2003
00163         @status  experimental, slow implementation, not yet heavily tested
00164     */
00165     inline T det() const {
00166       T d = 0;
00167       Matrix3x3<T> SubMatrix;
00168       for (register unsigned int sub=0; sub<4; sub++) {
00169         // first column is used,
00170         // set up the 3x3 submatrices from the right matrix part
00171         // this is done 4 times (loop counter="sub")
00172         for (register unsigned int i=0; i<3; i++) {
00173           // construct the sub matrix under inspection,
00174           // skip the first column
00175           SubMatrix[0][i] = (*this)[(sub+1)%4][i+1];
00176           SubMatrix[1][i] = (*this)[(sub+2)%4][i+1];
00177           SubMatrix[2][i] = (*this)[(sub+3)%4][i+1];
00178         }
00179         // add value of subdeterminant to overall sum
00180         d += SubMatrix.det() * (*this)[sub][0];
00181       }
00182       return d;
00183     }
00184
00185     /** matrix-matrix multiplication with other Matrix4x4,
00186         storing the result in destmat
00187         using 'manual inlining'
00188         @author Jan Woetzel
00189         @status untested (04/17/2002)
00190     **/
00191     inline void Mult(const Matrix4x4<T> & argmat, Matrix4x4<T> & destmat)const{
00192       //
00193       // direct access using fixed indicies with matrix order:
00194       //  (this matrix) *      arg
00195       //
00196       //   0  1  2  3        0  1  2  3
00197       //   4  5  6  7   *    4  5  6  7
00198       //   8  9 10 11        8  9 10 11
00199       //  12 13 14 15       12 13 14 15
00200
00201       // pointer to the destination matrix's data array
00202       register T *destP     = destmat.GetData();
00203       // pointer to the argument (other) matrix's data array
00204       const register T *argP    = argmat.GetData();
00205       // pointer to this matrix's data array
00206       const register T *matP    = this->GetData();
00207
00208       // first row:
00209       destP[0] =
00210         matP[0]*argP[0] + matP[1]*argP[4] + matP[2]*argP[8] + matP[3]*argP[12];
00211       destP[1] =
00212         matP[0]*argP[1] + matP[1]*argP[5] + matP[2]*argP[9] + matP[3]*argP[13];
00213       destP[2] =
00214         matP[0]*argP[2] + matP[1]*argP[6] + matP[2]*argP[10] + matP[3]*argP[14];
00215       destP[3] =
00216         matP[0]*argP[3] + matP[1]*argP[7] + matP[2]*argP[11] + matP[3]*argP[15];
00217       // second row:
00218       destP[4] =
00219         matP[4]*argP[0] + matP[5]*argP[4] + matP[6]*argP[8] + matP[7]*argP[12];
00220       destP[5] =
00221         matP[4]*argP[1] + matP[5]*argP[5] + matP[6]*argP[9] + matP[7]*argP[13];
00222       destP[6] =
00223         matP[4]*argP[2] + matP[5]*argP[6] + matP[6]*argP[10] + matP[7]*argP[14];
00224       destP[7] =
00225         matP[4]*argP[3] + matP[5]*argP[7] + matP[6]*argP[11] + matP[7]*argP[15];
00226       // third row:
00227       destP[8] =
00228         matP[8]*argP[0] + matP[9]*argP[4] + matP[10]*argP[8] + matP[11]*argP[12];
00229       destP[9] =
00230         matP[8]*argP[1] + matP[9]*argP[5] + matP[10]*argP[9] + matP[11]*argP[13];
00231       destP[10] =
00232         matP[8]*argP[2] + matP[9]*argP[6] + matP[10]*argP[10] + matP[11]*argP[14];
00233       destP[11] =
00234         matP[8]*argP[3] + matP[9]*argP[7] + matP[10]*argP[11] + matP[11]*argP[15];
00235       // fourth row:
00236       destP[12] =
00237         matP[12]*argP[0] + matP[13]*argP[4] + matP[14]*argP[8] + matP[15]*argP[12];
00238       destP[13] =
00239         matP[12]*argP[1] + matP[13]*argP[5] + matP[14]*argP[9] + matP[15]*argP[13];
00240       destP[14] =
00241         matP[12]*argP[2] + matP[13]*argP[6] + matP[14]*argP[10] + matP[15]*argP[14];
00242       destP[15] =
00243         matP[12]*argP[3] + matP[13]*argP[7] + matP[14]*argP[11] + matP[15]*argP[15];
00244     }
00245
00246
00247     /** assignment operators
00248         calling corresponding operator from base class "TNT::Matrix" if appropriate
00249         @author Jan Woetzel
00250         @status untested (02/25/2002)
00251     **/
00252     Matrix4x4 & operator = (const Matrix<T> &mat);
00253
00254
00255     /** set the elements of this matrix to the identity matrix
00256         (posisbly overriding the inherited method)
00257         @author  , Jan Woetzel
00258         @date 04/17/2002
00259         @status untested
00260     **/
00261     inline void SetIdentity() {
00262       register T* d = this->GetData(); // pointer to this matrix's data array
00263       d[0]  = 1;
00264       d[1]  = 0;
00265       d[2]  = 0;
00266       d[3]  = 0;
00267       d[4]  = 0;
00268       d[5]  = 1;
00269       d[6]  = 0;
00270       d[7]  = 0;
00271       d[8]  = 0;
00272       d[9]  = 0;
00273       d[10] = 1;
00274       d[11] = 0;
00275       d[12] = 0;
00276       d[13] = 0;
00277       d[14] = 0;
00278       d[15] = 1;
00279     }
00280
00281     /** just neccessary to avoid resizing of this 'fixed size' matrix because it is derived from teh resizable Matrix
00282         Should be removed if Matrix4x4 becomes a base class.
00283         (04/17/2002) Jan Woetzel
00284     **/
00285     Matrix4x4 & newsize(int rows, int cols);
00286
00287
00288     /** tranpose this matrix "in place"
00289         example:
00290         0  1  2  3  -->  0  4  8 12
00291         4  5  6  7  -->  1  5  9 13
00292         8  9 10 11  -->  2  6 10 14
00293         12 13 14 15  -->  3  7 11 15
00294         @author Jan-Friso Evers-Senne
00295         @status untested (07/08/2002)
00296     **/
00297     inline void TransposeIP() {
00298       register T *dataP = this->GetData();  // pointer to the data array
00299       register T tmp;
00300 #define swap(a,b,tmp) tmp=a;a=b;b=tmp;
00301       swap(dataP[1],dataP[4],tmp);
00302       swap(dataP[2],dataP[8],tmp);
00303       swap(dataP[12],dataP[3],tmp);
00304       swap(dataP[13],dataP[7],tmp);
00305       swap(dataP[14],dataP[11],tmp);
00306       swap(dataP[9],dataP[6],tmp);
00307 #undef swap
00308     }
00309
00310
00311
00312   }; // class Matrix4x4
00313 } // namespace BIAS
00314
00315 #endif
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix.cpp Source File

Base » Math

Matrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Matrix.hh"
00027 #include "Vector.hh"
00028
00029 //additional math constants are not used by default in WIN32 - so set usage
00030
00031 #include <algorithm>
00032 #include <fstream>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 namespace BIAS {
00038
00039 template<class T>
00040 Matrix<T>::~Matrix()
00041 {}
00042
00043 template <class T>
00044 Matrix<T>::Matrix(int rows, int cols, const std::string & s)
00045 : TNT::Matrix<T>(rows, cols, s)
00046 {}
00047
00048
00049 template <class T>
00050 void Matrix<T>::Fill(const T & scalar)
00051 {
00052   TNT::Matrix<T>::operator=(scalar);
00053 }
00054
00055
00056 template <class T>
00057 void Matrix<T>::NormalizeColsToOne(const int row_to_use)
00058 {
00059   if (row_to_use >= this->num_rows()) {
00060     // Error, index for row is expected to be in [0...num_rows-1]
00061     BIASERR("dim of matrix is (" << this->num_rows() << " x " << this->num_cols() <<
00062            ").");
00063     BIASERR("cannot normalize cols by elements in row " << row_to_use <<
00064            ". aborting. ");
00065
00066   } else {
00067
00068     // value of row index is OK for normalization
00069     double divisor;
00070     for (int col = 0; col < this->num_cols(); col++) {
00071       // get the divisor to normalize with
00072       divisor = (*this)[row_to_use][col];
00073       if (fabs(divisor) > DOUBLE_EPSILON) {
00074
00075         // normalize one column (= all rows of one column)
00076         for (int row = 0; row < this->num_cols(); row++) {
00077           // normalize element by dividing it by the row_to_use element of
00078           //the same column
00079           (*this)[row][col] = ((*this)[row][col]) / (T) divisor;
00080         };
00081       } else {
00082         // could not divide by (nearly) zero
00083         BIASERR("could not divide by " << divisor <<
00084                " because it is too close to zero. DOUBLE_EPSILON= "
00085                << DOUBLE_EPSILON);
00086         BIASERR("skipping normalization of this column.");
00087       };
00088     };
00089   };
00090 }
00091
00092
00093
00094
00095 template <class T>
00096 void Matrix<T>::NormalizeRowsToOne(const int col_to_use)
00097 {
00098   if (col_to_use >= this->num_cols()) {
00099     // Error, index for row is expected to be in [0...num_rows-1]
00100     BIASERR("dim of matrix is (" << this->num_rows() << "," << this->num_cols() <<
00101            ").");
00102     BIASERR("cannot normalize rows by elements in col " << col_to_use
00103            << ". aborting. ");
00104   } else {
00105     // value of col index is OK for normalization
00106     double divisor;
00107     for (int row = 0; row < this->num_rows(); row++) {
00108       // get the divisor to normalize with
00109       divisor = (*this)[row][col_to_use];
00110       if (fabs(divisor) > DOUBLE_EPSILON) {
00111
00112         // normalize one row (= all cols of one row)
00113         for (int col = 0; col < this->num_rows(); col++) {
00114           // normalize element by dividing it by the col_to_use
00115           //element of the same column
00116           (*this)[row][col] = ((*this)[row][col]) / (T) divisor;
00117         };
00118       } else {
00119         // could not divide by (nearly) zero
00120         BIASERR("could not divide by " << divisor <<
00121                " because it is too close to zero. DOUBLE_EPSILON= "
00122                << DOUBLE_EPSILON);
00123         BIASERR("skipping normalization of this column.");
00124       };
00125     };
00126   };
00127 }
00128
00129
00130 template <class T>
00131 void Matrix<T>::NormalizeRows()
00132 {
00133   for (int i = 0; i< this->num_rows() ; i++){
00134     double scale = GetRow(i).NormL2();
00135     for (int j = 0; j < this->num_cols(); j++)
00136       (*this)[i][j]=(T)( (*this)[i][j]/scale);
00137   }
00138 }
00139
00140
00141 template <class T>
00142 void Matrix<T>::NormalizeCols()
00143 {
00144   for (int j = 0; j< this->num_cols() ; j++){
00145     double scale = GetCol(j).NormL2();
00146     for (int i = 0; i < this->num_rows(); i++)
00147       (*this)[i][j]=(T) ((*this)[i][j]/scale);
00148   }
00149 }
00150
00151
00152 template<class T>
00153 void Matrix<T>::ScaleRow(int NoRow, T scale)
00154 {
00155   for (int j = 0; j < this->num_cols(); j++)
00156     //((*this)[NoRow][j]) *= scale;
00157     ((*this)[NoRow][j]) = ((*this)[NoRow][j]) * scale;
00158 }
00159
00160
00161 template<class T>
00162 void Matrix<T>::ScaleCol(int NoCol,T scale)
00163 {
00164   for (int i = 0; i < this->num_rows(); i++)
00165     //((*this)[i][NoCol]) *= scale;
00166     (*this)[i][NoCol] =  (*this)[i][NoCol] * scale;
00167 }
00168
00169
00170 template<class T>
00171 Vector<T> Matrix<T>::GetRow(const int& row) const
00172 {
00173   BIASASSERT(row >= 0 && row < this->num_rows());
00174   // create a new Vector which will be returned
00175   // ? faster: copy elements during constructor
00176   const unsigned int numcols = this->num_cols();
00177   Vector<T> vec(numcols);
00178
00179   // copy the elements into the vector:
00180   for (unsigned int col = 0; col < numcols; col++) {
00181     vec[col] = (*this)[row][col];
00182   };
00183
00184   return vec;
00185 }
00186
00187
00188
00189 template <class T>
00190 Vector<T> Matrix<T>::GetCol(const int& col) const
00191 {
00192   BIASASSERT(col >= 0 && col < this->num_cols());
00193   const unsigned int numrows = this->num_rows();
00194   Vector<T> vec(numrows);
00195   // copy the elements into the vector:
00196   for (unsigned int row = 0; row < numrows; row++) {
00197     vec[row] = (*this)[row][col];
00198   };
00199   return vec;
00200 }
00201
00202 template<class T>
00203 void Matrix<T>::SetRow(const int row, const Vector<T>& data)
00204 {
00205   BIASASSERT(row >= 0 && row < this->num_rows());
00206   const  int numcols = (int)this->num_cols();
00207   BIASASSERT(data.size() == numcols);
00208   for (register int col=0; col<numcols; col++)
00209     (*this)[row][col] = data[col];
00210 }
00211
00212 template<class T>
00213 void Matrix<T>::SetCol(const int col, const Vector<T>& data)
00214 {
00215   BIASASSERT(col >= 0 && col < this->num_cols());
00216   const  int numrows = (int)this->num_rows();
00217   BIASASSERT(data.size() == numrows);
00218   for (register int row=0; row<numrows; row++)
00219     (*this)[row][col] = data[row];
00220 }
00221
00222 template<class T>
00223 void Matrix <T>::SetIdentity()
00224 {
00225   SetZero();
00226   for (int i = 0; i < this->num_cols() && i < this->num_rows(); i++) {
00227     //cout << "actual: " << i << endl;
00228     (*this)[i][i] = 1;
00229   }
00230 }
00231
00232
00233 /*
00234 template<class T>
00235 void Matrix<T>::set_diagonal_elements(const Vector<T>& argVec,
00236                                       const bool zero_others)
00237 {
00238   // Check the dimensions
00239   BIASASSERT( argVec.size() == min(num_cols(), num_rows()) );
00240   // Are the otther elements to be set to zero?
00241   if (zero_others)
00242     SetZero();
00243   for(int i = 0; i < argVec.size(); i++)
00244     (*this)[i][i] = argVec[i];
00245 }
00246 */
00247
00248 template<class T>
00249 T Matrix<T>::GetMin() const
00250 {
00251   // initialize result value with last element
00252   register T* dataP = GetDataLast();
00253   T result = *dataP;
00254
00255   for(; dataP >= GetData(); dataP--)
00256     if (*dataP < result)
00257       result = *dataP;
00258
00259   return result;
00260 }
00261
00262 template<class T>
00263 T Matrix<T>::Normalize()
00264 {
00265   T greatest = 0;
00266   for (int i=0; i < this->num_rows(); i++)
00267     for (int j=0; j < this->num_cols(); j++)
00268       if ( ((*this)[i][j])*((*this)[i][j]) > greatest*greatest )
00269         greatest = (*this)[i][j];
00270   (*this) /= greatest;
00271   return greatest;
00272 }
00273
00274 template<class T>
00275 T Matrix<T>::GetMax() const
00276 {
00277   // initialize result value with last element
00278   register T* dataP = GetDataLast();
00279   register T result = *dataP;
00280
00281   for(; dataP >= GetData(); dataP--)
00282     if (*dataP > result)
00283       result = *dataP;
00284
00285   return result;
00286 }
00287
00288 template<class T>
00289 void Matrix<T>::GetMaxMin(T& max, T& min) const
00290 {
00291   max = min = *GetDataLast();
00292   for(register T* dataP = GetDataLast(); dataP >= GetData(); dataP--) {
00293     if (*dataP<min) min = *dataP;
00294     else if (*dataP>max) max = *dataP;
00295   }
00296 }
00297
00298 template<class T>
00299 T Matrix<T>::GetMean() const
00300 {
00301   // initialize result
00302   T result = 0;
00303   for(register T* dataP = GetDataLast(); dataP >= GetData(); dataP--)
00304       result = result + T(*dataP);
00305     //result += T(*dataP);
00306
00307   result = result/T(GetNumElements());
00308   return result;
00309 }
00310
00311 template<class T>
00312 bool Matrix<T>::Load(const std::string & filename){
00313   std::ifstream fs( filename.c_str() );
00314   if (!fs) {
00315     return false; // error, could not open file.
00316   } else {
00317     // read in
00318     fs>>(*this);
00319     fs.close();
00320   };
00321   return true;
00322 }
00323
00324
00325 template<class T>
00326 bool Matrix<T>::Save(const std::string & filename) const {
00327   std::ofstream fs( filename.c_str() );
00328   if (!fs) {
00329     return false; // error, could not open file.
00330   } else {
00331     // write out to disk
00332     fs<<(*this);
00333     fs.close();
00334   };
00335   return true;
00336 }
00337
00338
00339 template<class T>
00340 bool Matrix<T>::BinRead(const char * filename) const
00341 {
00342   ifstream filein;
00343   //filein.open(filename, ios::in);
00344   filein.open(filename, ios::in|ios::binary);
00345   if ( !filein.is_open() )
00346     {
00347       cerr << "Error opening file '" << filename << "'" << endl;
00348       return false;
00349     }
00350
00351   // read and verify dimension
00352   int m,n;
00353   filein.read( (char*) &m, sizeof(int) );
00354   filein.read( (char*) &n, sizeof(int) );
00355
00356   if ( m!=this->m_ || n!=this->n_ )
00357     {
00358       BIASERR("Matrix has wrong dimension! This one is "
00359               << this->m_ << "x" << this->n_ << " but file is "
00360               << m << "x" << n << "." << endl);
00361       return false;
00362     }
00363
00364   // read values
00365   for(int i=0; i<this->m_; i++)
00366     for(int j=0; j<this->n_; j++)
00367       filein.read( (char*) &((*this)[i][j]), sizeof(T) );
00368
00369   filein.close();
00370   return true;
00371 }
00372
00373
00374 template<class T>
00375 bool Matrix<T>::BinWrite(const char * filename) const
00376 {
00377   ofstream fileout;
00378   //fileout.open(filename, ios::out);
00379   fileout.open(filename, ios::out|ios::binary);
00380   if ( !fileout.is_open() )
00381     {
00382       cerr << "Error opening file '" << filename << "'" << endl;
00383       return false;
00384     }
00385
00386   // store the dimension
00387   fileout.write( (char*) &this->m_, sizeof(int) );
00388   fileout.write( (char*) &this->n_, sizeof(int) );
00389
00390   // store values
00391   for(int i=0; i<this->m_; i++)
00392     for(int j=0; j<this->n_; j++)
00393       fileout.write( (char*) &((*this)[i][j]), sizeof(T) );
00394
00395   fileout.close();
00396   return true;
00397 }
00398
00399
00400 template<>
00401 bool Matrix<double>::IsZero( double eps /*=0.0*/) const
00402 {
00403   bool result=true;
00404   for (int i=0; i<this->num_rows(); i++)
00405     for (int j=0; j<this->num_cols(); j++)
00406       if ( fabs((*this)[i][j]) > eps )
00407         result=false;
00408   return result;
00409 }
00410
00411
00412 template<class T>
00413 bool Matrix<T>::IsZero( double eps /*=0.0*/) const
00414 {
00415   if ( eps != 0 )
00416     {
00417       BIASERR("Epsilon environment is not implemented for this type!");
00418     }
00419   bool result=true;
00420   for (int i=0; i<this->num_rows(); i++)
00421     for (int j=0; j<this->num_cols(); j++)
00422       if ( (*this)[i][j] != 0 )
00423         result=false;
00424   return result;
00425 }
00426
00427
00428 template<>
00429 bool Matrix<double>::IsIdentity( double eps /*=0.0*/ ) const
00430 {
00431   bool result=true;
00432   for (int i=0; i<this->num_rows(); i++)
00433     for (int j=0; j<this->num_cols(); j++)
00434       {
00435         if ( i==j && fabs((*this)[i][j]-1.0) > eps )
00436           result=false;
00437         else if ( i!=j && fabs((*this)[i][j]) > eps )
00438           result=false;
00439       }
00440   return result;
00441 }
00442
00443 template<class T>
00444 bool Matrix<T>::IsIdentity( double eps /*=0.0*/ ) const
00445 {
00446   if ( eps != 0 )
00447     {
00448       BIASERR("Epsilon environment is not implemented for this type!");
00449     }
00450   bool result=true;
00451   for (int i=0; i<this->num_rows(); i++)
00452     for (int j=0; j<this->num_cols(); j++)
00453       {
00454         if ( i==j && (*this)[i][j]!=1 )
00455           result=false;
00456         else if ( i!=j && (*this)[i][j] != 0 )
00457           result=false;
00458       }
00459   return result;
00460 }
00461
00462 } // namespace BIAS
00463
00464
00465 ///
00466 /// explicit instantiation
00467 ///
00468 #define INST(type) \
00469 template class BIASMathBase_EXPORT BIAS::Matrix<type>;\
00470 template class BIASMathBase_EXPORT TNT::Matrix<type>;\
00471
00472
00473 INST(unsigned char)
00474 INST(char)
00475 INST(float)
00476 INST(short)
00477 INST(unsigned short)
00478 INST(int)
00479 INST(unsigned int)
00480 INST(double)
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Matrix.hh Source File

Base » Math

Matrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Matrix_hh_
00027 #define _Matrix_hh_
00028
00029 #include "bias_config.h"
00030
00031 #define _USE_MATH_DEFINES
00032 #include <math.h>
00033
00034 #include <Base/Debug/Error.hh>
00035
00036 #include "tnt/tnt.h"
00037 #include "tnt/cmat.h"
00038 #include "tnt/fmat.h"
00039 #include "Operators.hh"
00040
00041 #include <string>
00042
00043 namespace BIAS {
00044
00045 #ifndef DOUBLE_EPSILON
00046 #  define DOUBLE_EPSILON 1E-12
00047 #endif
00048
00049   template<class T> class Vector;
00050
00051   /** @enum MatrixInitType
00052       @brief can be passed to matrix constructors to init the matrix with
00053       the most often used values */
00054   typedef enum {MatrixZero, MatrixIdentity} MatrixInitType;
00055
00056   /**    @class Matrix
00057          @ingroup g_math
00058          @brief  matrix class with arbitrary size, indexing is row major. <br>
00059          Access the data by M[row][col].
00060
00061          class Matrix is the matrix class that should be used by common BIAS
00062          algorithms and data structures with arbitrary size <br>
00063
00064          Access the data simply by M[row][col]. <br>
00065
00066          It is derived from TNT::Matrix to inherit the basic operations and
00067          algorithm.
00068          special implementations should be done here and NOT in TNT:Matrix
00069          because the true 'base' Matrix class "TNT::Matrix"
00070          should be interchangeable and aside from this maintained by NIST.
00071
00072          changed from MIP to BIAS (j1. 11/05/2002)
00073          operators are no longer class members, they are defined after the
00074          class, woelk
00075
00076          @author Jan Woetzel, woelk
00077   */
00078   template <class T=double>
00079   class BIASMathBase_EXPORT Matrix : public TNT::Matrix<T>
00080   {
00081   public:
00082     virtual ~Matrix();
00083
00084     Matrix() : TNT::Matrix<T>() {};
00085
00086
00087
00088     /** @author Jan Woetzel
00089      **/
00090     Matrix(int rows, int cols) :TNT::Matrix<T>(rows, cols) {};
00091
00092     /** assignment with a constant values for all elements (=set)
00093         @author Jan Woetzel **/
00094     Matrix(int rows, int cols, const T value)
00095       : TNT::Matrix<T>(rows, cols, value) {};
00096
00097     /** init with standard form
00098         @author koeser **/
00099     Matrix(int rows, int cols, const MatrixInitType& i)
00100       : TNT::Matrix<T>(rows, cols, T(0)) {
00101       switch (i) {
00102       case MatrixZero:return;
00103       case MatrixIdentity:{
00104         for (int r=0; r<rows; r++) {
00105           if (r==cols) return;
00106           (*this)[r][r] = T(1);
00107         }
00108         return;
00109       }
00110       default: BIASERR("undefined MatrixInitType");
00111         BIASABORT;
00112       }
00113     };
00114
00115
00116     /** DEPRECATED due to instantiation problem @author Jan Woetzel **/
00117     //Matrix(int rows, int cols, const char *s) : TNT::Matrix<T>(rows, cols, s){};
00118
00119     /// replacement for the above to be called as Matrix<>(2,3, "1 2 3 4 5 6") @author Jan Woetzel
00120     explicit Matrix(const int rows, const int cols, const std::string & s);
00121
00122     /** @author Jan Woetzel **/
00123     Matrix(const Matrix<T> &A) : TNT::Matrix<T>(A) {};
00124
00125     /** @author Jan Woetzel **/
00126     Matrix(const TNT::Matrix<T> &A) : TNT::Matrix<T>(A) {};
00127
00128     /** transpose function, storing data destination matrix
00129         @author JMF   **/
00130     inline Matrix<T> Transpose() const;
00131
00132     /////////////////////// Get Functions ////////////////////////////////
00133     /** @name Get Functions
00134         @{
00135     */
00136     /** get the pointer to the data array of the matrix
00137         (for faster direct memeory access)
00138
00139         the order of the data is linewise, which means an elemnt
00140         sequence of e.g.
00141         [0] = M(0,0)
00142         [1] = M(0,1)
00143         [2] = M(0,2)
00144         [3] = M(1,0) // next line
00145         [4] = M(1,1) ...
00146         @author Jan Woetzel
00147         @return a pointer to the data array (beginning with GetData[0])
00148         @status alpha (02/27/2002)
00149         -added const (jw) 03/12/2002 **/
00150     inline  T *GetData() const
00151     { return this->v_; };
00152
00153     /** returns zero based arry for data access */
00154     inline T **GetDataArray() const
00155     { return this->row_; }
00156
00157     /** returns 1 based array to data access */
00158     inline T **GetDataArray1() const
00159     { return this->rowm1_; };
00160
00161     inline unsigned int GetRows() const { return this->m_; }
00162
00163     inline unsigned int GetCols() const { return this->n_; }
00164
00165     /** Get a pointer to the last data element
00166         @author Ingo Thomsen
00167         @date 04/11/2002 **/
00168     inline T* GetDataLast() const
00169     { return GetData() + GetNumElements() - 1; };
00170
00171     /** @brief return a copy of row "row" of this matrix, zero based counting
00172         @author Jan Woetzel **/
00173     Vector<T> GetRow(const int& row) const;
00174
00175     /** @brief return a copy of column "col", zero based counting
00176         @author Jan Woetzel **/
00177     Vector<T> GetCol(const int& col) const;
00178
00179     /** @brief set a row of matrix from vector
00180         @author woelk 08/2004 */
00181     void SetRow(const int row, const Vector<T>& data);
00182
00183     /** @brief set a col of matrix from vector
00184         @author woelk 08/2004 */
00185     void SetCol(const int row, const Vector<T>& data);
00186
00187      /** Returns the total number of elements
00188         @author Ingo Thomsen
00189         @date 04/11/2002
00190         @status tested    **/
00191     inline int GetNumElements() const
00192     { return this->num_cols() * this->num_rows(); };
00193
00194     /** Returns the minimum value of the matrix elements
00195         @author Ingo Thomsen
00196         @date 04/11/2002
00197         @status tested    **/
00198     T GetMin() const;
00199
00200     /** Returns the maximum value of the matrix elements
00201         @author Ingo Thomsen
00202         @date 04/11/2002
00203         @status tested    **/
00204     T GetMax() const;
00205
00206     /// return biggest and smallest entry
00207     void GetMaxMin(T& max, T& min) const;
00208
00209     /** Returns the mean value of the matrix elements
00210         @author Ingo Thomsen
00211         @date 04/11/2002
00212         @status tested    **/
00213     T GetMean() const;
00214
00215     /** Return the L1 norm: |a| + |b| + |c| + ...
00216         @author Ingo Thomsen
00217         @date 04/11/2002
00218         @status untested    **/
00219     inline T NormL1() const;
00220
00221     /** Return the L2 norm: a^2 + b^2 + c^2 + ...
00222         @author woelk 07/2004 */
00223     inline T NormL2() const;
00224
00225     /** @brief Return Frobenius norm = sqrt(trace(A^t * A))
00226         @author koeser 02/2004 */
00227     inline T NormFrobenius() const;
00228
00229     /** @author koeser */
00230     inline T Trace() const;
00231
00232     //@}
00233
00234     //////////////////////////// Arithmetic ////////////////////
00235     /** @name Arithmetic
00236         @{
00237     */
00238     /** \brief assignment operators
00239         calling corresponding operator from base class if appropriate
00240         @author Jan Woetzel
00241         @status alpha (02/25/2002) */
00242     inline Matrix<T>& operator=(const TNT::Matrix<T> &mat);
00243     inline Matrix<T>& operator=(const Matrix<T> &mat);
00244
00245     /** in place addition function
00246         @author Ingo Thomsen
00247         @status tested **/
00248     inline void AddIP(const T& scalar)
00249     { Add(scalar, *this); };
00250
00251     /** Adds arg to this
00252         @author grest,2004
00253     */
00254     inline void AddIP(const Matrix<T> &arg);
00255
00256     /** Subtracts arg from this <br>
00257         this -= arg
00258         @author grest, 2004
00259     */
00260     inline void SubIP(const Matrix<T> &arg);
00261
00262     /** addition function, storing data destination matrix
00263         @author Ingo Thomsen
00264         @status tested **/
00265     inline void Add(const T& scalar,  Matrix<T> &dest) const;
00266
00267     /** in place subtraction function
00268         @author Ingo Thomsen
00269         @status tested **/
00270     inline void SubIP(const T& scalar)
00271     { Sub(scalar, *this); };
00272
00273     /** substraction function, storing data destination matrix
00274         @author Ingo Thomsen
00275         @status tested    **/
00276     inline void Sub(const T& scalar,  Matrix<T> &dest) const;
00277
00278     /** in place multiplication function
00279         @author Ingo Thomsen
00280         @status tested **/
00281     inline void MultiplyIP(const T& scalar)
00282     { Multiply(scalar, *this); };
00283
00284     /** multiplication function, storing data destination matrix
00285         @author Ingo Thomsen
00286         @status tested    **/
00287     inline void Multiply(const T& scalar,  Matrix<T> &dest) const;
00288
00289     /** matrix multiplication, result is not allocated
00290         @author Felix Woelk */
00291     inline void Mult(const Matrix<T>& arg, Matrix<T>& result) const;
00292
00293     /** in Place matrix multiplication
00294         this is equal to M = M * arg, but faster
00295         @author Daniel Grest */
00296     inline void Mult(const Matrix<T>& arg);
00297
00298     /** in Place matrix multiplication
00299         this is equal to M = arg*M, but faster
00300         @author Daniel Grest */
00301     inline void MultLeft(const Matrix<T>& arg);
00302
00303     /** matrix vector multiplication, result is not allocated
00304         @author Felix Woelk */
00305     inline void Mult(const Vector<T>& arg, Vector<T>& result) const;
00306
00307     /** vector matrix multiplication result=arg*this.
00308         @author Marcel Lilienthal */
00309     inline void MultLeft(const Vector<T>& arg, Vector<T>& result) const;
00310
00311     /** in place division function
00312         @author Ingo Thomsen
00313         @status tested    **/
00314     inline void DivideIP(const T& scalar)
00315     { Divide(scalar, *this); };
00316
00317     /** division function, storing data destination matrix
00318         @author Ingo Thomsen
00319         @status tested    **/
00320     inline void Divide(const T& scalar,  Matrix<T> &dest) const;
00321
00322
00323     /** @brief compute square system matrix dest = A^T * A
00324     @param dest holds result of this->Transpose * this
00325
00326         If you want to solve A * x = b, where A has more rows than columns,
00327         a common technique is to solve x = (A^T * A)^-1 * A^T * b.
00328         This function provides a fast way to compute A^T*A from A.
00329         @author grest/koeser */
00330     inline void GetSystemMatrix(Matrix<T> &dest) const;
00331
00332     //@}
00333     ///////////////  Set Functions //////////////////////////////////////////
00334     /** @name Set Functions
00335         @{
00336     */
00337     /** Sets all values to zero
00338         @author Ingo Thomsen
00339         @date 04/11/2002
00340         @status tested    **/
00341     inline void SetZero();
00342
00343
00344     /** @brief Converts matrix to identity matrix
00345
00346     Even if the matrix is not quadratic, the diagonal values
00347     starting with the upper left element are set to 1. Example:
00348
00349     1 0 0       1 0 0 0
00350     0 1 0   or  0 1 0 0
00351     0 0 1       0 0 1 0
00352     0 0 0
00353
00354     @author Ingo Thomsen
00355     **/
00356     void SetIdentity();
00357
00358     /** Takes the elements of a Vector and put them as diagonal elements into
00359         a matrix. The size of this Vector must be exactly
00360         min( matrix.width, matrix.height). Optionally all other elements may
00361         be set to zero
00362         @author Ingo Thomsen
00363         @param zero_others Must be true, if all non-diagonal elements shall be
00364         set to zero    **/
00365     //void set_diagonal_elements(const Vector<T>& argV, const bool zero_others);
00366
00367     void Fill(const T& scalar);
00368
00369     // @}
00370
00371     //////////////////// Scaling and Normalization //////////////////////////
00372     /** @name  Scaling and Normalization
00373         @{
00374     */
00375     /** divides each column of the matrix through the element norm_row_index.
00376         index runs [0..num_rows-1]
00377         for example:
00378         2 3
00379         4 5
00380         normalized with row '1' will be
00381         2/4  3/5
00382         1    1     **/
00383     void NormalizeColsToOne(const int norm_row_index);
00384
00385     /** divides each row of the matrix through the element norm_col_index.
00386         index runs [0..num_cols-1]
00387         for example:
00388         2 3
00389         4 5
00390         normalized with row '1' will be
00391         2/3  1
00392         4/5  1      **/
00393     void NormalizeRowsToOne(const int norm_col_index);
00394
00395     /** Normalizes each row to L2 norm one. Attention each row is normaized
00396         by its own scale! */
00397     void NormalizeRows();
00398
00399     /** Normalizes each coloumn to L_2 norm one. Attention each column is
00400         normaized by its own scale!   */
00401     void NormalizeCols();
00402
00403     /** Normalizes the matrix by the entry with the biggest absolute value
00404         by dividing all elements with this one
00405         @return value of the element the matrix is normalized with
00406         @author mdunda 09 2003 */
00407     T Normalize();
00408
00409     /** Scales row NoRow with scale.      */
00410     void ScaleRow(int NoRow,T scale);
00411
00412     /** Scales column NoCol with scale.     */
00413     void ScaleCol(int NoCol,T scale);
00414     // @}
00415
00416     /////////////////// Input / Output ////////////////////////////////////
00417     /** @name Input / Output
00418         @{
00419     */
00420     /** method to load directly from a given filename.
00421         internally using stream operator
00422         @author Jan Woetzel 05/2003
00423         @return false in case of error, true in case of success
00424     */
00425     bool Load(const std::string & filename);
00426
00427     /** method to save directly to a given filename.
00428         internally using stream operator
00429         @author Jan Woetzel 05/2003
00430         @return false in case of error, true in case of success
00431     */
00432     bool Save(const std::string & filename) const;
00433
00434     /** This method reads a matrix from a given file in binary format.
00435         The file is not human read-/editable but provides full precision.
00436         A dimension check is performed.
00437         @return true on success
00438         @author mdunda 04 2004 */
00439     bool BinRead(const char * filename) const;
00440
00441     /** This method writes a matrix to a given file in binary format.
00442         The file is not human read-/editable but provides full precision.
00443         @return true on success
00444         @author mdunda 04 2004 */
00445     bool BinWrite(const char * filename) const;
00446
00447     // @}
00448
00449     /** Checks if the matrix is a null matrix.
00450         @author mdunda 12 2003
00451         @return true if all elements are zero */
00452     bool IsZero( double eps=0.0 ) const;
00453
00454     /** Checks if the matrix a an identity. I.e. all elements with index
00455         i==j are equal 1 and all others are zero.
00456         @author mdunda 12 2003
00457         @return true if matrix is identity */
00458     bool IsIdentity( double eps=0.0 ) const;
00459
00460   }; // class
00461
00462   //////////////////////////////////////////////////////////////////
00463   ///  operators
00464   ///////////////////////////////////////////////////////////////////
00465
00466   /**  @relates Matrix
00467        addition operator
00468        @author Ingo Thomsen **/
00469   template<class T>
00470   inline Matrix<T>& operator+=(Matrix<T>& mat, const T& scalar)
00471   { mat.AddIP(scalar); return mat; }
00472
00473   /**  @relates Matrix
00474        addition in place operator
00475        @author grest **/
00476   template<class T>
00477   inline Matrix<T>& operator+=(Matrix<T>& mat, const Matrix<T>& arg)
00478   { mat.AddIP(arg); return mat; }
00479
00480   /**  @relates Matrix
00481        subtracts arg from mat, mat = mat - arg
00482        @author grest **/
00483   template<class T>
00484   inline Matrix<T>& operator-=(Matrix<T>& mat, const Matrix<T>& arg)
00485   { mat.SubIP(arg); return mat; }
00486
00487   /** @relates Matrix
00488       substraction operator
00489       @author Ingo Thomsen */
00490   template<class T>
00491   inline Matrix<T>& operator-=(Matrix<T>& mat, const T& scalar)
00492   { mat.AddIP(scalar); return mat; }
00493
00494   /** @relates Matrix
00495       multiplication operator
00496       @author Ingo Thomsen */
00497   template<class T>
00498   inline Matrix<T>& operator*=(Matrix<T>& mat, const T& scalar)
00499   { mat.MultiplyIP(scalar); return mat; }
00500
00501
00502
00503
00504   /** @relates Matrix
00505       operator for equal
00506       @author Ingo Thomsen (07/02/2002)
00507       @status tested  */
00508   template<class T>
00509   inline bool operator==(const Matrix<T>& argl, const Matrix<T>& argr)
00510   {
00511     BIASASSERT( argl.size() == argr.size() );
00512     register T* argP = argl.GetData();
00513     register T* matP = argr.GetData();
00514     for (; matP < argr.GetDataLast() ; matP++, argP++)
00515       if (*matP != *argP)
00516         return false;
00517     return true;
00518   }
00519
00520   /** @relates Matrix
00521       operator for not equal
00522       @author Ingo Thomsen (07/02/2002) **/
00523   template<class T>
00524   inline bool operator!=(const Matrix<T>& argl, const Matrix<T>& argr)
00525   { return !(argl==argr); }
00526
00527   ////////////////////////////////////////////////////////////////////
00528   /// implementation
00529   ///////////////////////////////////////////////////////////////////
00530
00531   template<class T>
00532   inline void Matrix<T>::Add(const T& scalar,  Matrix<T> &dest) const
00533   {
00534     if (this->num_rows() != dest.num_rows() ||
00535         this->num_cols() != dest.num_cols())
00536       dest.newsize(this->num_rows(), this->num_cols());
00537     register T* destP = dest.GetData();
00538     register T* matP = GetData();
00539     for(;matP <= GetDataLast(); matP++, destP++) {
00540       *destP = *matP + scalar;
00541     }
00542   }
00543
00544   template<class T>
00545   inline void Matrix<T>::Sub(const T& scalar,  Matrix<T> &dest) const
00546   {
00547     if (this->num_rows() != dest.num_rows() ||
00548         this->num_cols() != dest.num_cols())
00549       dest.newsize(this->num_rows(), this->num_cols());
00550     register T* destP = dest.GetData();
00551     register T* matP = GetData();
00552     for(;matP <= GetDataLast(); matP++, destP++) {
00553       *destP = *matP - scalar;
00554     }
00555   }
00556
00557   template<class T>
00558   inline void Matrix<T>::Multiply(const T& scalar,  Matrix<T> &dest) const
00559   {
00560     if (this->num_rows() != dest.num_rows() || this->num_cols() != dest.num_cols())
00561       dest.newsize(this->num_rows(), this->num_cols());
00562     register T* destP = dest.GetData();
00563     register T* matP = GetData();
00564     for(;matP <= GetDataLast(); matP++, destP++) {
00565       *destP = *matP * scalar;
00566     }
00567   }
00568
00569   template<class T>
00570   inline void Matrix<T>::Divide(const T& scalar,  Matrix<T> &dest) const
00571   {
00572     if (this->num_rows() != dest.num_rows() || this->num_cols() != dest.num_cols())
00573       dest.newsize(this->num_rows(), this->num_cols());
00574     if (scalar == 0) {
00575       BIASERR("Division by Zero");
00576       //BIASASSERT(false);
00577       BIASABORT;
00578     } else {
00579       register T* destP = dest.GetData();
00580       register T* matP = GetData();
00581       for(;matP <= GetDataLast(); matP++, destP++) {
00582         *destP = *matP / scalar;
00583       }
00584     }
00585   }
00586
00587   template<class T>
00588   inline Matrix<T> Matrix<T>::Transpose() const
00589   {
00590     Matrix<T> Out(this->num_cols(),this->num_rows());
00591     for (int i=0; i<this->num_rows(); i++)
00592       for (int j=0; j<this->num_cols(); j++)
00593         Out[j][i]= (*this)[i][j];
00594     return Out;
00595   }
00596
00597   template<class T>
00598   inline void Matrix<T>::SetZero()
00599   {
00600     for(register T* dataP = GetData(); dataP <= GetDataLast(); dataP++)
00601       *dataP = (T)(0);
00602   }
00603
00604   template<class T>
00605   inline T Matrix<T>::NormL1() const
00606   {
00607     T result = 0;
00608     for(register T* dataP = GetDataLast(); dataP >= GetData(); dataP--) {
00609       result += *dataP > 0 ? *dataP : *dataP * -1;
00610     }
00611     return result;
00612   }
00613
00614   template<class T>
00615   inline T Matrix<T>::NormL2() const
00616   {
00617     T result = 0;
00618     for (register T* dataP = GetDataLast(); dataP >= GetData(); dataP--) {
00619       result += *dataP * *dataP;
00620     }
00621     return (T) sqrt((double)result);
00622   }
00623
00624   template<class T>
00625   inline T Matrix<T>::NormFrobenius() const {
00626     register T result = 0;
00627     // compute only diagonal elements of A^T*A for trace
00628     register int x, i;
00629     for (x=0; x<this->num_rows(); x++) {
00630       if (x<this->num_cols()) {
00631         for (i=0; i<this->num_cols(); i++) {
00632           result += (*this)[x][i]*(*this)[x][i];
00633         }
00634       }
00635     }
00636     // frobenius norm is square root of that trace
00637     return (T) sqrt((double)result);
00638   }
00639
00640   template<class T>
00641   inline T Matrix<T>::Trace() const {
00642     BIASASSERT(this->num_cols() == this->num_rows())
00643     T result = 0;
00644     for (int x=0; x<this->num_rows(); x++)
00645       result = result + (*this)[x][x];
00646     return result;
00647   }
00648
00649   template<class T>
00650   inline void Matrix<T>::Mult(const Matrix<T>& arg, Matrix<T>& result) const
00651   {
00652 #ifdef BIAS_DEBUG
00653     if (this->num_cols() != arg.num_rows() ||
00654         result.num_cols() != arg.num_cols() ||
00655         result.num_rows() != this->num_rows()){
00656       BIASERR("invalid matrix sizes "<<this->num_rows()<<"x"<< this->num_cols()
00657               <<" * "<<arg.num_rows()<<"x"<<arg.num_cols()
00658               <<"  =  "<<result.num_rows()<<"x"<<result.num_cols());
00659       //BIASASSERT(false);
00660       exit(-1);
00661     }
00662 #endif
00663     if (result.num_cols() != arg.num_cols() ||
00664         result.num_rows() != this->num_rows()){
00665       result.newsize(this->num_rows(), arg.num_cols());
00666     }
00667     result.SetZero();
00668     register int x, y, i;
00669     for (x=0; x<result.num_cols(); x++)
00670       for (y=0; y<result.num_rows(); y++)
00671         for (i=0; i<this->num_cols(); i++)
00672           result[y][x]+=(*this)[y][i]*arg[i][x];
00673   }
00674
00675   template<class T>
00676   inline void Matrix<T>::Mult(const Matrix<T>& arg)  {
00677     Matrix<T> result(this->num_rows(),arg.num_cols());
00678     Mult(arg,result);
00679     (*this)=result;
00680   }
00681
00682   template<class T>
00683   inline void Matrix<T>::MultLeft(const Matrix<T>& arg)  {
00684     Matrix<T> result(arg.num_rows(),this->num_cols());
00685     arg.Mult(*this,result);
00686     (*this)=result;
00687   }
00688
00689   template<class T>
00690   inline void Matrix<T>::Mult(const Vector<T>& arg, Vector<T>& result) const {
00691 #ifdef BIAS_DEBUG
00692     if (this->num_cols() != arg.size() ||
00693         result.size() != this->num_rows()) {
00694       BIASERR("invalid matrix/vector sizes "<<this->num_rows()<<"x"<< this->num_cols()
00695               <<" * "<<arg.size()<<"x1"
00696               <<"  =  "<<result.size()<<"x1");
00697       //BIASASSERT(false);
00698       exit(-1);
00699     }
00700 #endif
00701     if (result.size() != this->num_rows()) {
00702       result.newsize(this->num_rows());
00703     }
00704     result.Fill((T)0);
00705     register int y, i;
00706     for (y=0; y<result.size(); y++)
00707       for (i=0; i<this->num_cols(); i++)
00708         result[y]+=(*this)[y][i]*arg[i];
00709   }
00710
00711   template<class T>
00712   inline void Matrix<T>::MultLeft(const Vector<T>& arg,
00713                                   Vector<T>& result) const {
00714 #ifdef BIAS_DEBUG
00715     if (this->num_rows() != arg.size() ||
00716         result.size() != this->num_cols()) {
00717       BIASERR("invalid matrix/vector sizes "
00718               <<arg.size()<<"x1"<<" * "
00719               <<this->num_rows()<<"x"<< this->num_cols()
00720               <<"  =  "<<result.size()<<"x1");
00721       exit(-1);
00722     }
00723 #endif
00724     if (result.size() != this->num_cols()) {
00725       result.newsize(this->num_cols());
00726     }
00727     result.SetZero();
00728     register int y, i;
00729     for (y=0; y<this->num_cols(); y++)
00730       for (i=0; i<this->num_rows(); i++)
00731         result[y]+=(*this)[i][y]*arg[i];
00732
00733   }
00734
00735   template<class T>
00736   inline void Matrix<T>::AddIP(const Matrix<T> &arg)
00737   {
00738 #ifdef BIAS_DEBUG
00739     if (this->num_cols() != arg.num_cols() ||
00740         this->num_rows() != arg.num_rows()) {
00741       BIASERR("invalid matrix sizes "<<this->num_rows()<<"x"<< this->num_cols()
00742               <<" + "<<arg.num_rows()<<"x"<<arg.num_cols());
00743       //BIASASSERT(false);
00744       exit(-1);
00745     }
00746 #endif
00747     T* thisData=GetData();
00748     T* argData=arg.GetData();
00749     register unsigned int size=this->num_rows()*this->num_cols();
00750     for (unsigned int i=0;i<size;i++) {
00751       *thisData = *thisData + T(*argData);
00752       thisData++; argData++;
00753     }
00754   }
00755
00756   template<class T>
00757   inline void Matrix<T>::SubIP(const Matrix<T> &arg)
00758   {
00759 #ifdef BIAS_DEBUG
00760     if (this->num_cols() != arg.num_cols() ||
00761         this->num_rows() != arg.num_rows()) {
00762       BIASERR("invalid matrix sizes "<<this->num_rows()<<"x"<< this->num_cols()
00763               <<" - "<<arg.num_rows()<<"x"<<arg.num_cols());
00764       //BIASASSERT(false);
00765       exit(-1);
00766     }
00767 #endif
00768     T* thisData=GetData();
00769     T* argData=arg.GetData();
00770     register unsigned int size=this->num_rows()*this->num_cols();
00771     for (unsigned int i=0;i<size;i++) {
00772       *thisData = *thisData  - T(*argData);
00773       thisData++; argData++;
00774     }
00775   }
00776
00777   template <class T>
00778   inline void Matrix<T>::GetSystemMatrix(Matrix<T> &dest) const {
00779     const unsigned int colsJ = this->num_cols(), rowsJ = this->num_rows();
00780     // resize result to square matrix
00781     dest.newsize(colsJ, colsJ);
00782
00783     // get output array, account for ++prefix by -1
00784     T *pDestData = dest.GetData()-1;
00785     for (unsigned int row = 0; row<colsJ; row++) {
00786       for (unsigned int col = 0; col<colsJ; col++) {
00787         // init matrix field [row][col] with 0
00788     *(++pDestData) = 0;
00789     for (unsigned int k = 0; k<rowsJ; k++) {
00790           // avoid unneccessary pointer calculations
00791           // dest[row][col] += J[k][row] * J[k][col];
00792       const T* pJ_k_ = this->row_[k];
00793       *pDestData += pJ_k_[row] * pJ_k_[col];
00794     }
00795       }
00796     }
00797   }
00798
00799   template <class T>
00800   inline Matrix<T> &Matrix<T>::operator=(const TNT::Matrix<T> &mat)
00801   {
00802     TNT::Matrix<T>::operator=(mat); // call the operator of the base class
00803     return *this;
00804   }
00805
00806   template <class T>
00807   inline Matrix<T> &Matrix<T>::operator=(const Matrix<T> &mat)
00808   {
00809     TNT::Matrix<T>::operator=(mat); // call the operator of the base class
00810     return *this;
00811   }
00812
00813 } // namespace BIAS
00814 #endif // _Matrix_hh_
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/MDcam.cpp Source File

VideoSource

MDcam.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <sys/io.h>
00026 #include <unistd.h>
00027 #include <fstream>
00028
00029 #include "MDcam.hh"
00030
00031
00032 extern int GetCamIDs(int busid ,int &ncams, int *&camids);
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 MDcam::MDcam()
00038 {
00039   Camera_ = NULL;
00040   NumCams_ = 0;
00041   ParPort_ = 0x378;
00042   ExternalTrigger_ = false;
00043   ActiveTrigger_ = false;
00044
00045 }
00046
00047
00048
00049 MDcam::~MDcam()
00050 {
00051   if (NumCams_ != 0 )
00052     ReleaseCameras();
00053
00054 }
00055
00056
00057 void MDcam::SetDebugLevelDcam(int d) {
00058   DebuglevelDcam_ = d;
00059   for (int i=0; i<NumCams_; i++)
00060     Camera_[i]->SetDebugLevel(d) ;
00061 }
00062
00063
00064
00065 int MDcam::ScanBus(int bus, std::ofstream &ofs)
00066 {
00067   BIASDOUT(D_MDCAM_INIT,"Scanning bus "<<bus);
00068
00069   VideoSource_DCAM *cam;
00070   int ncams = 0;
00071   int *camids = NULL;
00072
00073
00074   GetCamIDs(bus, ncams, camids);
00075
00076   if (ncams >0) {
00077     cam = new VideoSource_DCAM(bus);
00078     cam->SetDebugLevel(DebuglevelDcam_);
00079     for (int i=0; i<ncams; i++) {
00080       cam->SetSize(0,0);
00081       cam->OpenDevice(camids[i]);
00082       if (ofs) {
00083     ofs <<bus<<"  "<<camids[i]<<"  "<<cam->GetWidth()<<"  "
00084         <<cam->GetHeight()<<" 0"<<" 0" <<endl;
00085       }
00086       cam->CloseDevice();
00087     }
00088     delete cam;
00089   }
00090   else {
00091     BIASERR("No cameras found on bus "<<bus);
00092     return -1;
00093   }
00094
00095   return ncams;
00096
00097 }
00098
00099
00100
00101
00102 int MDcam::InitCameras(const string filename)
00103 {
00104   ifstream ifs;
00105   int bus,camid, width,height,xoffset,yoffset;
00106   int res;
00107   BIASDOUT(D_MDCAM_INIT,"InitCameras() from "<<filename);
00108   if (NumCams_ != 0) {
00109     BIASERR("MDcam::InitCameras(): Already initialized");
00110     return -1;
00111   }
00112   ifs.open(filename.c_str());
00113   if (!ifs) {
00114     perror(filename.c_str());
00115     return -1;
00116   }
00117   while (ifs) {
00118     char tmpline[128];
00119     ifs.getline(tmpline,128);
00120     if (tmpline[0]=='0' || tmpline[0]=='1'|| tmpline[0]=='2')
00121       NumCams_ ++;
00122   }
00123
00124   ifs.close();
00125   ifs.clear();
00126   if (!ifs) {
00127     cerr<<"after close"<<endl;
00128     perror(filename.c_str());
00129     return -1;
00130   }
00131   ifs.open(filename.c_str());
00132   if (!ifs) {
00133     perror(filename.c_str());
00134     return -1;
00135   }
00136
00137   Camera_ = new VideoSource_DCAM * [NumCams_];
00138   for (int i=0; i< NumCams_; i++){
00139     ifs >> bus >> camid >> width >> height >>xoffset >>yoffset;
00140     cout <<"Expecting cam "<<i<<" at bus "<<bus<<" with ID "<<camid<<endl;
00141     Camera_[i] = new VideoSource_DCAM(bus);
00142     Camera_[i]->SetDebugLevel(DebuglevelDcam_) ;
00143     //   Camera_[i]->ForceFormat7(true);
00144     Camera_[i]->SetSize(width,height);
00145     //Camera_[i]->SetLeftTop(xoffset,yoffset);
00146     Camera_[i]->SetFPS(Fps_);
00147
00148     res = Camera_[i]->OpenDevice(camid);
00149     if (res < 0) {
00150       BIASERR("Can not open camera "<<camid<<" on bus "<<bus);
00151       return -1;
00152     }
00153  }
00154
00155   ifs.close();
00156
00157
00158   return NumCams_;
00159
00160 }
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171 int MDcam::ReleaseCameras()
00172 {
00173   if (NumCams_ == 0) {
00174     BIASERR("MDcam::Release(): not initialized");
00175     return -1;
00176   }
00177
00178   for (int i=0; i<NumCams_; i++) {
00179     Camera_[i]->CloseDevice();
00180     delete Camera_[i];
00181   }
00182   delete[] Camera_;
00183   NumCams_ = 0;
00184   return 0;
00185 }
00186
00187
00188 void MDcam::ActivateScorpionTimestamp()
00189 {
00190   for (int i=0; i<NumCams_; i++)
00191     Camera_[i]->ActivateScorpionTimestamp();
00192 }
00193
00194
00195 int MDcam::PreGrab()
00196 {
00197   int res;
00198   for (int i=0; i<NumCams_; i++) {
00199     res =  Camera_[i]->PreGrab();
00200     if (res != 0) return res;
00201   }
00202
00203   return 0;
00204 }
00205
00206
00207
00208
00209 int MDcam::PostGrab()
00210 {
00211   int res;
00212   for (int i=0; i<NumCams_; i++) {
00213     res =  Camera_[i]->PostGrab();
00214     if (res != 0) return res;
00215   }
00216
00217   return 0;
00218 }
00219
00220
00221
00222 int MDcam::GrabSingle(Camera<unsigned char> *Image)
00223 {
00224
00225   struct timeval now;
00226
00227   if (ExternalTrigger_ && ActiveTrigger_ ) {
00228     outb(0, ParPort_);
00229     usleep(0);
00230     outb(255,ParPort_);
00231   }
00232   if (ExternalTrigger_)
00233     gettimeofday(&now,NULL);
00234
00235
00236   for (int i=0; i<NumCams_; i++) {
00237     Camera_[i]->GrabSingle(Image[i]);
00238   }
00239
00240   // if external trigger use accurate timestamps
00241   if (ExternalTrigger_) {
00242     stringstream time_ss;
00243     time_ss.str("");
00244     time_ss<<now.tv_sec<<":"<<now.tv_usec;
00245     // reset trigger
00246     if (  ActiveTrigger_ )
00247       outb(255,ParPort_);
00248     for (int i=0; i<NumCams_; i++)
00249       //  Image[i].SetTime(now.tv_sec,now.tv_usec);
00250       Image[i].SetASCIIString(time_ss.str());
00251   }
00252
00253
00254   return 0;
00255
00256 }
00257
00258
00259
00260
00261 int MDcam::SetFeature( int feature, unsigned int value)
00262 {
00263   int res;
00264   for (int i=0; i<NumCams_; i++) {
00265     res = Camera_[i]->SetFeature(feature, value);
00266     if (res<0) return res;
00267   }
00268   return 0;
00269 }
00270
00271 int MDcam::SetGain(float g)
00272 {
00273   int res;
00274   for (int i=0; i<NumCams_; i++) {
00275     res = Camera_[i]->SetGain(g);
00276     if (res<0) return res;
00277   }
00278   return 0;
00279 }
00280
00281 int MDcam::SetShutter(float exptime)
00282 {
00283   int res;
00284   for (int i=0; i<NumCams_; i++) {
00285     res = Camera_[i]->SetShutter(exptime);
00286     if (res<0) return res;
00287   }
00288   return 0;
00289 }
00290
00291
00292 //    int GetFeature( int feature);
00293 int MDcam::AutoMode( int feature, bool on)
00294 {
00295   int res;
00296   for (int i=0; i<NumCams_; i++) {
00297     res = Camera_[i]->AutoMode(feature,on);
00298     if (res<0) return res;
00299   }
00300   return 0;
00301 }
00302
00303 int MDcam::OnePushAuto(int feature)
00304 {
00305   int res;
00306   for (int i=0; i<NumCams_; i++) {
00307     res = Camera_[i]->OnePushAuto(feature);
00308     if (res<0) return res;
00309   }
00310   return 0;
00311 }
00312
00313 int MDcam::ExternalTrigger(bool on, bool active)
00314 {
00315   int res;
00316   if (on && active) {
00317     if (ioperm(ParPort_, 3, 1)) {
00318       BIASERR("Can not acces ParPort at "<<ParPort_<<": Permission denied."<<endl
00319          <<" External Trigger disabled");
00320       ExternalTrigger_ = false;
00321       return -1;
00322     }
00323     // set all bits high
00324     else outb(255, ParPort_);
00325   }
00326
00327   for (int i=0; i<NumCams_; i++) {
00328     res = Camera_[i]->ExternalTrigger(on);
00329     if (res<0) return res;
00330   }
00331   ExternalTrigger_ = on;
00332   ActiveTrigger_ = active;
00333   return 0;
00334 }
00335
00336
00337
00338
00339 int MDcam::EqualizeFeature(int master, int feature)
00340 {
00341   int value = Camera_[master]->GetFeature(feature);
00342   for (int i=0; i<NumCams_; i++) {
00343     if (i != master)
00344       Camera_[i]->SetFeature(feature, value);
00345   }
00346
00347   return 0;
00348 }
00349
00350
00351 int MDcam::SetCamera(CameraParameterSet camparam)
00352 {
00353   int res=0;
00354   for (int i=0; i<NumCams_; i++) {
00355     res = Camera_[i]->SetCamera(camparam);
00356     if (res <0) return res;
00357   }
00358
00359   return res;
00360 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/MDcam.hh Source File

VideoSource

MDcam.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __MDCAM_HH__
00026 #define __MDCAM_HH__
00027
00028 #include <bias_config.h>
00029
00030 #ifndef BIAS_HAVE_DCAM
00031 #  error You need DCAM for BIAS Videosource_DCAM. Please recompile BIAS with USE_DCAM.
00032 #endif // BIAS_HAVE_DCAM
00033
00034 #ifdef WIN32
00035 #  error BIAS MDcam is unsupporte don WIN32, currently. Please fix the code/buildsystem.
00036 #endif // WIN32
00037
00038 #include <string>
00039
00040 #include <VideoSource/VideoSource_Base.hh>
00041 #include <VideoSource/VideoSource_DCAM.hh>
00042 #include <Base/Debug/Debug.hh>
00043 #include <Base/Debug/Error.hh>
00044
00045 #define D_MDCAM_INIT (1<<0)
00046 #define D_MDCAM_GRAB (1<<2)
00047
00048
00049
00050 namespace BIAS{
00051   /**
00052      \class MDcam
00053      \group VideoG
00054      \author evers
00055      \brief MDcam simplifies acces to more then one DCam.
00056      It suports multiple IEEE1394-adapters, extern synchronization via
00057      parallel port and networked capture cluster.
00058   */
00059   class MDcam:public BIAS::Debug
00060   {
00061   public:
00062     /*! Activates the timestamp for PointGrey Scorpion SCOR-20SO
00063      */
00064     void ActivateScorpionTimestamp();
00065
00066     MDcam();
00067     ~MDcam();
00068
00069     void SetDebugLevelDcam(int d);
00070
00071     int  ScanBus(int bus,std::ofstream &ofs);
00072
00073     int InitCameras(const std::string filename);
00074     int ReleaseCameras();
00075
00076     /// Call GrabSingle() with a prepared array of images to be filled
00077     /** The size of the array MUST be the numaber of cameras
00078      */
00079     int GrabSingle(BIAS::Camera<unsigned char> *Image);
00080     int PreGrab();
00081
00082     int PostGrab();
00083
00084     int SetFeature( int feature, unsigned int value);
00085     //    int GetFeature( int feature);
00086     int AutoMode( int feature, bool on);
00087
00088     int OnePushAuto(int feature);
00089
00090     int SetShutter(float exptime);
00091     float GetShutter()
00092     { return Camera_[0]->GetShutter(); }
00093     int SetGain(float g);
00094     float GetGain()
00095     { return Camera_[0]->GetGain(); }
00096
00097     inline void SetFps(float fps){Fps_ = fps;};
00098
00099
00100     /** if on==true && active=true try to open parport at ParPort_,
00101     if it fails, return -1
00102     else set cameras to external trigger mode
00103     if on==false set cameras to internal trigger mode
00104     if active==true est cameras into external trigger mode but
00105      ignore parport
00106     */
00107     int ExternalTrigger(bool on, bool active);
00108
00109     /// Read @param feature from @param master and distributed it to all
00110     int EqualizeFeature(int master, int feature);
00111
00112
00113     int SetCamera(CameraParameterSet camparam);
00114
00115     int GetNumCams(){return NumCams_;};
00116
00117     inline VideoSource_DCAM *GetCamera(int n) { return Camera_[n];};
00118     inline int GetID(int i) {
00119       if (i <NumCams_ ) return Camera_[i]->GetID();
00120       else
00121     return -1;
00122
00123     };
00124
00125
00126
00127
00128   protected:
00129     float Fps_;
00130     int DebuglevelDcam_;
00131
00132
00133     VideoSource_DCAM **Camera_;
00134     int NumCams_;
00135     bool ExternalTrigger_;
00136     bool ActiveTrigger_;
00137
00138     // Address of parport for external trigger
00139     unsigned long ParPort_;
00140
00141
00142
00143
00144
00145
00146   };
00147 } // namespace MIP
00148
00149 #endif
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Mean.cpp Source File

Filter

Mean.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Mean.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 //////////////////////////////////////////////////////////////////////////
00034 //                 implementation
00035 //////////////////////////////////////////////////////////////////////////
00036
00037 template <class InputStorageType, class OutputStorageType>
00038 Mean<InputStorageType, OutputStorageType>::
00039 Mean()
00040   : Convolution<InputStorageType, OutputStorageType>()
00041 {
00042   this->_ParamsAllocated = true;
00043   _MeanSize = new int;
00044   *_MeanSize = 2;
00045 }
00046
00047 template <class InputStorageType, class OutputStorageType>
00048 Mean<InputStorageType, OutputStorageType>::
00049 Mean(Param& para, const std::string& postfix)
00050   : Convolution<InputStorageType, OutputStorageType>(para, "-Mean"+postfix)
00051 {
00052   _MeanSize = NULL;
00053   int grp=para.GetFreeGroupID();
00054   _AddParam(para, grp, "-Mean"+postfix);
00055   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Mean");
00056 }
00057
00058
00059
00060 template <class InputStorageType, class OutputStorageType>
00061 Mean<InputStorageType, OutputStorageType>::
00062 Mean(Param& para, const int grp, const std::string& postfix)
00063   : Convolution<InputStorageType, OutputStorageType>(para, grp, "-Mean"+postfix)
00064 {
00065   _MeanSize=NULL;
00066   _AddParam(para, grp, "-Mean"+postfix);
00067 }
00068
00069 template <class InputStorageType, class OutputStorageType>
00070 Mean<InputStorageType, OutputStorageType>::
00071 ~Mean()
00072 {
00073   if (this->_ParamsAllocated){
00074     delete _MeanSize; _MeanSize = NULL;
00075   }
00076 }
00077
00078
00079 template <class InputStorageType, class OutputStorageType>
00080 int Mean<InputStorageType, OutputStorageType>::
00081 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00082 {
00083  BIASCDOUT(D_FILTERBASE_CALLSTACK, "Mean::Filter\n");
00084   int res=0;
00085   switch (*_MeanSize){
00086   case 1:
00087     dst=src;
00088     break;
00089   case 2:
00090     res=FilterMean2x2(src, dst);
00091     break;
00092   default:
00093     _SetKernel();
00094     res=Convolution<InputStorageType, OutputStorageType>::Filter(src, dst);
00095     break;
00096   }
00097   return res;
00098 }
00099
00100 template <class InputStorageType, class OutputStorageType>
00101 int Mean<InputStorageType, OutputStorageType>::
00102 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00103 {
00104   BIASERR("Unimplemented interface, calling generic Filter");
00105   return Filter(src, dst);
00106 }
00107
00108 template <class InputStorageType, class OutputStorageType>
00109 int Mean<InputStorageType, OutputStorageType>::
00110 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00111 {
00112   BIASERR("Unimplemented interface, calling generic Filter");
00113   return Filter(src, dst);
00114 }
00115
00116 template <class InputStorageType, class OutputStorageType>
00117 int Mean<InputStorageType, OutputStorageType>::
00118 FilterMean(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00119 {
00120   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Mean::FilterMean\n");
00121   BIASERR("deprecated");
00122   return -10;
00123 }
00124
00125 ////////////////////////////////////////////////////////////////////////
00126
00127 template <class InputStorageType, class OutputStorageType>
00128 int Mean<InputStorageType, OutputStorageType>::
00129 FilterMean2x2Grey(const Image<InputStorageType>& src,
00130                   Image<OutputStorageType>& dst)
00131 {
00132   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Mean::FilterMean2x2Grey\n");
00133 #ifdef BIAS_DEBUG
00134   BIASASSERT(src.SamePixelAndChannelCount(dst));
00135   BIASASSERT(src.GetChannelCount()==1);
00136   BIASASSERT(src.GetColorModel()==ImageBase::CM_Grey);
00137   BIASASSERT(((void*)src.GetImageData())!= ((void*)dst.GetImageData()));
00138 #endif
00139   unsigned minx, miny, maxx, maxy;
00140   src.GetROI()->GetCorners(minx, miny, maxx, maxy);
00141
00142   maxx--;
00143   maxy--;
00144
00145   dst.GetROI()->SetCorners(minx, miny, maxx, maxy);
00146
00147   register double sum, lsum;
00148   register InputStorageType *srcu, *srcl;
00149   register OutputStorageType *pdst, *dstend, *dstlend;
00150   register const int width=src.GetWidth();
00151   register const int step=width-(maxx-minx);
00152
00153
00154   srcl = srcu = src.GetImageData() + minx+miny*width;
00155   srcl += width;
00156   pdst = dst.GetImageData() +  minx+miny*width;
00157   dstlend = pdst + width-step;
00158   dstend = dst.GetImageData() +  maxx+(maxy-1)*width;
00159
00160   while (pdst < dstend){
00161     lsum = (double)*srcu++ + (double)*srcl++;
00162     while (pdst < dstlend){
00163       sum = (double)*srcu++ + (double)*srcl++;
00164       *pdst++ = (OutputStorageType)((sum + lsum)/ 4.0);
00165       lsum = sum;
00166     }
00167     srcu += step;
00168     srcl += step;
00169     pdst += step+1;
00170     dstlend += width;
00171   }
00172
00173   return 0;
00174 }
00175
00176
00177 ////////////////////////////////////////////////////////////////////////
00178
00179 template <class InputStorageType, class OutputStorageType>
00180 int Mean<InputStorageType, OutputStorageType>::
00181 FilterMean2x2(const Image<InputStorageType>& src,
00182               Image<OutputStorageType>& dst)
00183 {
00184   BIASCDOUT(D_FILTERBASE_CALLSTACK, "Mean::FilterMean2x2\n");
00185   int res=0;
00186   if (src.GetChannelCount() == 1 && src.GetColorModel()==ImageBase::CM_Grey){
00187     if (! src.SamePixelAndChannelCount(dst)) {
00188       if (!dst.IsEmpty()) dst.Release();
00189       dst.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00190     }
00191
00192     res = FilterMean2x2Grey(src, dst);
00193   } else {
00194     _SetKernel();
00195     res = Convolution<InputStorageType, OutputStorageType>::Filter(src, dst);
00196   }
00197   return res;
00198 }
00199
00200 //////////////////////////////////////////////////////////////////////////
00201 //               protected functions
00202 //////////////////////////////////////////////////////////////////////////
00203
00204 template <class InputStorageType, class OutputStorageType>
00205 void Mean<InputStorageType, OutputStorageType>::
00206 _AddParam(Param& para, const int grp, const std::string& postfix)
00207 {
00208
00209   if (para.CheckParam("Size"+postfix)){
00210     _MeanSize=para.GetParamInt("Size"+postfix);
00211   } else {
00212     _MeanSize=para.AddParamInt("Size"+postfix,
00213                                "the size of the mean filter", 2, 1, INT_MAX
00214                                , 0, grp);
00215   }
00216 }
00217
00218 template <class InputStorageType, class OutputStorageType>
00219 void Mean<InputStorageType, OutputStorageType>::_SetKernel() {
00220   const FM_FLOAT val = 1.0f/(FM_FLOAT)(*_MeanSize);
00221   Vector<FM_FLOAT> H(*_MeanSize), V(*_MeanSize);
00222   for (int i=0; i< *_MeanSize; i++){
00223     H[i] = V[i] = val;
00224   }
00225   _fm.Init(H,V);
00226   // compute the int approximation
00227   int thebits = _fm.ComputeIntPrecisionBits(sizeof(InputStorageType)*8,
00228                                             sizeof(CONV_INT)*8-1);
00229   _fm.CreateIntFilter(thebits,thebits,thebits);
00230 }
00231
00232 template <class InputStorageType, class OutputStorageType>
00233 void Mean<InputStorageType, OutputStorageType>::
00234 GetBordersValid_(int &border_x, int &border_y) const
00235 {
00236   border_x = border_y = (*_MeanSize)/2;
00237 }
00238
00239 //////////////////////////////////////////////////////////////////////////
00240 //                 instantiation
00241 //////////////////////////////////////////////////////////////////////////
00242 #define FILTER_INSTANTIATION_CLASS Mean
00243 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Mean.hh Source File

Filter

Mean.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Mean_hh__
00027 #define __Mean_hh__
00028
00029 #include "Convolution.hh"
00030
00031 #include <Base/Common/BIASpragmaStart.hh>
00032
00033 namespace BIAS
00034 {
00035   /** @class Mean
00036       @ingroup g_filter
00037       @brief average mean filter
00038
00039       @author woelk 09/2004 */
00040   template <class InputStorageType, class OutputStorageType>
00041   class BIASFilter_EXPORT Mean : public Convolution<InputStorageType, OutputStorageType>
00042   {
00043   public:
00044     Mean();
00045
00046     Mean(Param& para, const std::string& postfix="");
00047
00048     Mean(Param& para, const int group_id, const std::string& postfix);
00049
00050     Mean(const Mean<InputStorageType, OutputStorageType>& m) {};
00051
00052     ~Mean();
00053
00054     /** @brief averages over a region with constant weights
00055         @author woelk 09/2004 */
00056     virtual int Filter(const Image<InputStorageType>& src,
00057                        Image<OutputStorageType>& dst);
00058
00059     /** @brief only calls filter, for consistency of params */
00060     virtual int FilterInt(const Image<InputStorageType>& src,
00061                           Image<OutputStorageType>& dst);
00062
00063     /** @brief only calls filter, for consistency of params */
00064     virtual int FilterFloat(const Image<InputStorageType>& src,
00065                             Image<OutputStorageType>& dst);
00066
00067     /** deprecated
00068         @author woelk 09/2004 */
00069     int FilterMean(const Image<InputStorageType>& src,
00070                    Image<OutputStorageType>& dst);
00071
00072     /** dst width = src width - 1, dst height = src height - 1
00073         @todo support for ROI is still missing.
00074         @author woelk  01/2003 */
00075     int FilterMean2x2(const Image<InputStorageType>& src,
00076                       Image<OutputStorageType>& dst);
00077
00078     /** dst must be initialized:
00079         dst width = src width - 1, dst height = src height - 1
00080         Does support ROI. No specialization for integer data types.
00081         @author woelk 09/2004 */
00082     int FilterMean2x2Grey(const Image<InputStorageType>& src,
00083                           Image<OutputStorageType>& dst);
00084
00085     /////////////////////////////////////////////////////////////////////////
00086
00087     inline void SetSize(const int size) { *_MeanSize=size; }
00088
00089     inline int GetSize() const { return *_MeanSize; }
00090
00091     inline int *GetSizePointer(){ return _MeanSize;};
00092
00093   protected:
00094     int *_MeanSize;
00095
00096     void _AddParam(Param& para, const int group_id,
00097                    const std::string& postfix);
00098
00099     /** sets the vector members of Convolution
00100         @author woelk 09/2004 */
00101     void _SetKernel();
00102
00103     using Convolution<InputStorageType, OutputStorageType>::_fm;
00104
00105     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00106
00107   }; // class
00108
00109
00110
00111
00112 } // namespace
00113
00114 #include <Base/Common/BIASpragmaEnd.hh>
00115
00116 #endif // __Mean_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Median1D.cpp Source File

MathAlgo

Median1D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Median1D.hh"
00026
00027 using namespace BIAS;
00028 using namespace std;
00029
00030 /////////////////////////////////////////////////////////////////////////
00031 // implementation
00032 /////////////////////////////////////////////////////////////////////////
00033
00034 template<class DataType>
00035 Median1D<DataType>::Median1D()
00036 {}
00037
00038 template<class DataType>
00039 Median1D<DataType>::Median1D(vector<DataType>& vec)
00040 {
00041   Compute(vec);
00042 }
00043
00044 template<class DataType>
00045 Median1D<DataType>::Median1D(const vector<DataType>& vec)
00046 {
00047   Compute(vec);
00048 }
00049
00050 template<class DataType>
00051 Median1D<DataType>::~Median1D()
00052 {}
00053
00054 template<class DataType>
00055 void Median1D<DataType>::Compute(const vector<DataType>& vec)
00056 {
00057   vector<DataType> tmp=vec;
00058   Compute(tmp);
00059 }
00060
00061 /** This Quickselect routine is based on the algorithm described in
00062     "Numerical recipies in C", Second Edition,
00063     Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 */
00064
00065 #define BIAS_SWAP(a,b) { t=(a); (a)=(b); (b)=t; }
00066
00067 template<class DataType>
00068 void Median1D<DataType>::Compute(vector<DataType>& vec)
00069 {
00070   int low, high;
00071   int med;
00072   int mid, ll, hh;
00073   int n=vec.size();
00074   register DataType t;
00075
00076   low = 0 ; high = n-1 ; med = (low + high) / 2;
00077   for (;;) {
00078     if (high <= low) { /* One element only */
00079       _Median = vec[med];
00080       return;
00081     }
00082
00083     if (high == low + 1) {  /* Two elements only */
00084       if (vec[low] > vec[high])
00085         BIAS_SWAP(vec[low], vec[high]) ;
00086       _Median = vec[med];
00087       return;
00088     }
00089
00090     /* Find med of low, mid and high items; swap into position low */
00091     mid = (low + high) / 2;
00092     if (vec[mid] > vec[high]) BIAS_SWAP(vec[mid], vec[high]) ;
00093     if (vec[low] > vec[high]) BIAS_SWAP(vec[low], vec[high]) ;
00094     if (vec[mid] > vec[low])  BIAS_SWAP(vec[mid], vec[low]) ;
00095
00096     /* Swap low item (now in position mid) into position (low+1) */
00097     BIAS_SWAP(vec[mid], vec[low+1]) ;
00098
00099     /* Nibble from each end towards mid, swapping items when stuck */
00100     ll = low + 1;
00101     hh = high;
00102     for (;;) {
00103       do ll++; while (vec[low] > vec[ll]) ;
00104       do hh--; while (vec[hh]  > vec[low]) ;
00105
00106       if (hh < ll)
00107         break;
00108
00109       BIAS_SWAP(vec[ll], vec[hh]) ;
00110     }
00111
00112     /* Swap mid item (in position low) back into correct position */
00113     BIAS_SWAP(vec[low], vec[hh]) ;
00114
00115     /* Re-set active partition */
00116     if (hh <= med)
00117       low = ll;
00118     if (hh >= med)
00119       high = hh - 1;
00120   }
00121 }
00122
00123 #undef BIAS_SWAP
00124
00125 /////////////////////////////////////////////////////////////////////////
00126 // instantiation
00127 /////////////////////////////////////////////////////////////////////////
00128
00129 template class BIAS::Median1D<double>;
00130 template class BIAS::Median1D<float>;
00131 template class BIAS::Median1D<int>;
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Median1D.hh Source File

MathAlgo

Median1D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __Median1D_hh__
00026 #define __Median1D_hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029 #include <Base/Debug/Debug.hh>
00030
00031 #include <vector>
00032
00033 namespace BIAS {
00034
00035   /** @class Median1D
00036       @ingroup g_mathalgo
00037       @brief computes the median of a vector
00038       @author woelk 06/2005 */
00039   template <class DataType>
00040   class BIASMathAlgo_EXPORT Median1D : public Debug
00041   {
00042   public:
00043     Median1D();
00044
00045     Median1D(std::vector<DataType>& vec);
00046
00047     Median1D(const std::vector<DataType>& vec);
00048
00049     ~Median1D();
00050
00051     /** computation of the median using a quicksort approach
00052         @author woelk 06/2005 */
00053     void Compute(std::vector<DataType>& vec);
00054
00055     void Compute(const std::vector<DataType>& vec);
00056
00057     inline DataType GetMedian()
00058     { return _Median; }
00059
00060   protected:
00061     DataType _Median;
00062
00063   }; // class
00064
00065
00066 } // namespace
00067
00068
00069 #include <Base/Common/BIASpragmaEnd.hh>
00070
00071 #endif // __Median1D_hh__
00072
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Median.cpp Source File

Filter

Median.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Median.hh"
00027
00028 #include "bias_config.h"
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 template <class InputStorageType, class OutputStorageType>
00034 Median<InputStorageType, OutputStorageType>::Median()
00035 {
00036   this->_ParamsAllocated = true;
00037   _MedianSize = new int;
00038   *_MedianSize = 2;
00039 }
00040
00041 template <class InputStorageType, class OutputStorageType>
00042 Median<InputStorageType, OutputStorageType>::~Median()
00043 {
00044   if (this->_ParamsAllocated){
00045     delete _MedianSize; _MedianSize = NULL;
00046   }
00047 }
00048
00049 int comp(const void *a, const void *b)
00050 {
00051   if (*(float*)a< *(float*)b) return -1;
00052   else if (*(float*)a> *(float*)b)return 1;
00053   else return 0;
00054 }
00055
00056
00057 template <class InputStorageType, class OutputStorageType>
00058 int Median<InputStorageType, OutputStorageType>::
00059 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00060 {
00061   unsigned int halfsize = *_MedianSize;;
00062   float minvalue = -1.0;
00063   if (src.GetChannelCount()!=1) {
00064     BIASERR("Median() not implemented for more than one channel");
00065     return -1;
00066   }
00067
00068   Image<OutputStorageType> tmp;
00069   OutputStorageType **dstida = dst.GetImageDataArray();
00070   InputStorageType **srcida  = src.GetImageDataArray();
00071   bool identimg = false;
00072   int size = 2*halfsize+1;
00073
00074
00075   if ((void*)src.GetImageData() != (void*)dst.GetImageData()){
00076     if (!src.SamePixelAndChannelCount(dst)){
00077       if (!dst.IsEmpty())
00078         dst.Release();
00079       dst.Init(src.GetWidth(), src.GetHeight(),1);
00080       dstida = dst.GetImageDataArray();
00081     }
00082   }else {
00083     identimg = true;
00084     tmp.Init(src.GetWidth(), src.GetHeight(),1);
00085     dstida = tmp.GetImageDataArray();
00086   }
00087
00088   float *z,zvalue;
00089   int startx,starty,endx,endy;
00090   unsigned int found ;
00091
00092
00093   z = new float[size*size];
00094
00095   for (unsigned int j=0; j<src.GetHeight(); j++){
00096
00097     for (unsigned int i=0; i<src.GetWidth(); i++) {
00098       found = 0;
00099       startx = int(i)-(size-1)/2;
00100       endx = int(i)+(size-1)/2;
00101       starty = int(j)-(size-1)/2;
00102       endy = int(j)+(size-1)/2;
00103       if (startx<0) startx = 0;
00104       if (starty<0) starty = 0;
00105       if (endx>int(src.GetWidth()-1) ) endx = src.GetWidth()-1;
00106       if (endy>int(src.GetHeight()-1) ) endy = src.GetHeight()-1;
00107       for (int y = starty; y<= endy; y++)
00108     for (int x = startx; x<= endx; x++) {
00109       zvalue =(float)srcida[y][x];
00110       if (zvalue >minvalue) {
00111         z[found] = zvalue;
00112         found++;
00113       }
00114     }
00115       if (found >0) {
00116     qsort(z,found, sizeof(float),comp);
00117     dstida[j][i] = (OutputStorageType)z[found/2];
00118       }
00119       else
00120     dstida[j][i] = (OutputStorageType)0.0;
00121     }
00122   }
00123
00124   delete[] z;
00125
00126   if (identimg)
00127     dst.StealImage(tmp);
00128
00129
00130
00131   return 0;
00132
00133 }
00134
00135 template <class InputStorageType, class OutputStorageType>
00136 int Median<InputStorageType, OutputStorageType>::
00137 FilterInt(const Image<InputStorageType>& src,
00138                       Image<OutputStorageType>& dst) {
00139   BIASERR("FilterInt makes no sense here, using general Filter interface.");
00140   return Filter(src, dst);
00141 }
00142
00143 template <class InputStorageType, class OutputStorageType>
00144 int Median<InputStorageType, OutputStorageType>::
00145 FilterFloat(const Image<InputStorageType>& src,
00146                         Image<OutputStorageType>& dst) {
00147   BIASERR("FilterFloat makes no sense here, using general Filter interface.");
00148   return Filter(src, dst);
00149 }
00150
00151
00152 /*
00153 template <class InputStorageType, class OutputStorageType>
00154 int Median<InputStorageType, OutputStorageType>::
00155 FilterIgnoreZero(Image<InputStorageType>& src,
00156                  Image<OutputStorageType>& dst,
00157                  unsigned int halfsize)
00158 {
00159 #ifdef BIAS_DEBUG
00160   if (src.GetChannelCount()!=1) {
00161     BIASERR("Median() not implemented for more than one channel");
00162     return -1;
00163   }
00164 #endif
00165   Image<StorageType> tmp;
00166   StorageType **dstida, **srcida;
00167   int size = 2*halfsize+1;
00168   float *z,zvalue;
00169   int startx,starty,endx,endy;
00170   unsigned int found ;
00171
00172   if (!src.SamePixelAndChannelCount(dst)){
00173     if (!dst.IsEmpty())
00174       dst.Release();
00175     dst.Init(src.GetWidth(), src.GetHeight(),1);
00176   }
00177
00178   dstida = dst.GetImageDataArray();
00179   srcida = src.GetImageDataArray();
00180   z = new float[size*size];
00181
00182   for (unsigned int j=0; j<src.GetHeight(); j++){
00183     for (unsigned int i=0; i<src.GetWidth(); i++) {
00184       found = 0;
00185       startx = int(i)-(size-1)/2;
00186       endx = int(i)+(size-1)/2;
00187       starty = int(j)-(size-1)/2;
00188       endy = int(j)+(size-1)/2;
00189       if (startx<0) startx = 0;
00190       if (starty<0) starty = 0;
00191       if (endx>int(src.GetWidth()-1) ) endx = src.GetWidth()-1;
00192       if (endy>int(src.GetHeight()-1) ) endy = src.GetHeight()-1;
00193       for (int y = starty; y<= endy; y++)
00194         for (int x = startx; x<= endx; x++) {
00195           zvalue = (float)srcida[y][x];
00196           if (zvalue !=(StorageType)0.0) {
00197             z[found] = zvalue;
00198             found++;
00199           }
00200         }
00201       if (found>1) {
00202         qsort(z,found, sizeof(float),comp);
00203         dstida[j][i] = (StorageType)z[found>>1];
00204       } else {
00205         dstida[j][i] = (StorageType)0.0;
00206       }
00207     }
00208   }
00209
00210   delete[] z;
00211   return 0;
00212 }
00213 */
00214 template <class InputStorageType, class OutputStorageType>
00215 int Median<InputStorageType, OutputStorageType>::FilterIgnoreZero5x5(Image<InputStorageType>& src,
00216                             Image<OutputStorageType>& dst)
00217 {
00218 #ifdef BIAS_DEBUG
00219   if (src.GetChannelCount()!=1) {
00220     BIASERR("Median() not implemented for more than one channel");
00221     return -1;
00222   }
00223 #endif
00224   OutputStorageType **dstida;
00225   InputStorageType **srcida;
00226   float z[25], zvalue;
00227   unsigned found, xm, x2m, xp, x2p, ym, y2m, yp, y2p, w, maxwidth, maxheight, h, x, y;
00228
00229   if (!src.SamePixelAndChannelCount(dst)){
00230     if (!dst.IsEmpty())
00231       dst.Release();
00232     dst.Init(src.GetWidth(), src.GetHeight(),1);
00233   }
00234
00235   dstida = dst.GetImageDataArray();
00236   srcida = src.GetImageDataArray();
00237   memset((void*)dstida[0], 0, sizeof(OutputStorageType)*dst.GetPixelCount());
00238
00239   w=src.GetWidth();
00240   h=src.GetHeight();
00241   maxheight=h-2;
00242   maxwidth=w-2;
00243   for (y=2; y<maxheight; y++){
00244     for (x=2; x<maxwidth; x++) {
00245       if ((zvalue = (float)srcida[y][x])!=0.0){
00246         z[0] = zvalue; found=1;
00247         xm=x-1; x2m=x-2; xp=x+1; x2p=x+2;
00248         ym=y-1; y2m=y-2; yp=y+1; y2p=y+2;
00249         if ((zvalue = (float)srcida[y2m][x2m])!=0.0){
00250           z[found] = zvalue; found++; }
00251         if ((zvalue = (float)srcida[y2m][xm])!=0.0){
00252           z[found] = zvalue; found++; }
00253         if ((zvalue = (float)srcida[y2m][x])!=0.0){
00254           z[found] = zvalue; found++; }
00255         if ((zvalue = (float)srcida[y2m][xp])!=0.0){
00256           z[found] = zvalue; found++; }
00257         if ((zvalue = (float)srcida[y2m][x2p])!=0.0){
00258           z[found] = zvalue; found++; }
00259         if ((zvalue = (float)srcida[ym][x2m])!=0.0){
00260           z[found] = zvalue; found++; }
00261         if ((zvalue = (float)srcida[ym][xm])!=0.0){
00262           z[found] = zvalue; found++; }
00263         if ((zvalue = (float)srcida[ym][x])!=0.0){
00264           z[found] = zvalue; found++; }
00265         if ((zvalue = (float)srcida[ym][xp])!=0.0){
00266           z[found] = zvalue; found++; }
00267         if ((zvalue = (float)srcida[ym][x2p])!=0.0){
00268           z[found] = zvalue; found++; }
00269         if ((zvalue = (float)srcida[y][x2m])!=0.0){
00270           z[found] = zvalue; found++; }
00271         if ((zvalue = (float)srcida[y][xm])!=0.0){
00272           z[found] = zvalue; found++; }
00273
00274         if ((zvalue = (float)srcida[y][xp])!=0.0){
00275           z[found] = zvalue; found++; }
00276         if ((zvalue = (float)srcida[y][x2p])!=0.0){
00277           z[found] = zvalue; found++; }
00278         if ((zvalue = (float)srcida[yp][x2m])!=0.0){
00279           z[found] = zvalue; found++; }
00280         if ((zvalue = (float)srcida[yp][xm])!=0.0){
00281           z[found] = zvalue; found++; }
00282         if ((zvalue = (float)srcida[yp][x])!=0.0){
00283           z[found] = zvalue; found++; }
00284         if ((zvalue = (float)srcida[yp][xp])!=0.0){
00285           z[found] = zvalue; found++; }
00286         if ((zvalue = (float)srcida[yp][x2p])!=0.0){
00287           z[found] = zvalue; found++; }
00288         if ((zvalue = (float)srcida[y2p][x2m])!=0.0){
00289           z[found] = zvalue; found++; }
00290         if ((zvalue = (float)srcida[y2p][xm])!=0.0){
00291           z[found] = zvalue; found++; }
00292         if ((zvalue = (float)srcida[y2p][x])!=0.0){
00293           z[found] = zvalue; found++; }
00294         if ((zvalue = (float)srcida[y2p][xp])!=0.0){
00295           z[found] = zvalue; found++; }
00296         if ((zvalue = (float)srcida[y2p][x2p])!=0.0){
00297           z[found] = zvalue; found++; }
00298
00299         if (found>2) {
00300           qsort(z,found, sizeof(float),comp);
00301           dstida[y][x] = (OutputStorageType)z[found>>1];
00302         }
00303       }
00304     }
00305   }
00306
00307   return 0;
00308 }
00309
00310 template <class InputStorageType, class OutputStorageType>
00311 int Median<InputStorageType, OutputStorageType>::
00312 FilterOnlyZeroIgnoreZero5x5(Image<InputStorageType>& src,
00313                             Image<OutputStorageType>& dst,
00314                             const float& Threshold) {
00315 #ifdef BIAS_DEBUG
00316   if (src.GetChannelCount()!=1) {
00317     BIASERR("Median() not implemented for more than one channel");
00318     return -1;
00319   }
00320 #endif
00321   OutputStorageType **dstida;
00322   InputStorageType **srcida;
00323   float z[25], zvalue;
00324   unsigned found, xm, x2m, xp, x2p, ym, y2m, yp, y2p, w,
00325     maxwidth, maxheight, h, x, y;
00326
00327   if (!src.SamePixelAndChannelCount(dst)){
00328     if (!dst.IsEmpty())
00329       dst.Release();
00330     dst.Init(src.GetWidth(), src.GetHeight(),1);
00331   }
00332
00333   dstida = dst.GetImageDataArray();
00334   srcida = src.GetImageDataArray();
00335   memset((void*)dstida[0], 0, sizeof(OutputStorageType)*dst.GetPixelCount());
00336
00337   w=src.GetWidth();
00338   h=src.GetHeight();
00339   maxheight=h-2;
00340   maxwidth=w-2;
00341   for (y=2; y<maxheight; y++){
00342     for (x=2; x<maxwidth; x++) {
00343       if ((zvalue = (float)srcida[y][x])<=Threshold){
00344         found=0;
00345         xm=x-1; x2m=x-2; xp=x+1; x2p=x+2;
00346         ym=y-1; y2m=y-2; yp=y+1; y2p=y+2;
00347         if ((zvalue = (float)srcida[y2m][x2m])>Threshold){
00348           z[found] = zvalue; found++; }
00349         if ((zvalue = (float)srcida[y2m][xm])>Threshold){
00350           z[found] = zvalue; found++; }
00351         if ((zvalue = (float)srcida[y2m][x])>Threshold){
00352           z[found] = zvalue; found++; }
00353         if ((zvalue = (float)srcida[y2m][xp])>Threshold){
00354           z[found] = zvalue; found++; }
00355         if ((zvalue = (float)srcida[y2m][x2p])>Threshold){
00356           z[found] = zvalue; found++; }
00357         if ((zvalue = (float)srcida[ym][x2m])>Threshold){
00358           z[found] = zvalue; found++; }
00359         if ((zvalue = (float)srcida[ym][xm])>Threshold){
00360           z[found] = zvalue; found++; }
00361         if ((zvalue = (float)srcida[ym][x])>Threshold){
00362           z[found] = zvalue; found++; }
00363         if ((zvalue = (float)srcida[ym][xp])>Threshold){
00364           z[found] = zvalue; found++; }
00365         if ((zvalue = (float)srcida[ym][x2p])>Threshold){
00366           z[found] = zvalue; found++; }
00367         if ((zvalue = (float)srcida[y][x2m])>Threshold){
00368           z[found] = zvalue; found++; }
00369         if ((zvalue = (float)srcida[y][xm])>Threshold){
00370           z[found] = zvalue; found++; }
00371
00372         if ((zvalue = (float)srcida[y][xp])>Threshold){
00373           z[found] = zvalue; found++; }
00374         if ((zvalue = (float)srcida[y][x2p])>Threshold){
00375           z[found] = zvalue; found++; }
00376         if ((zvalue = (float)srcida[yp][x2m])>Threshold){
00377           z[found] = zvalue; found++; }
00378         if ((zvalue = (float)srcida[yp][xm])>Threshold){
00379           z[found] = zvalue; found++; }
00380         if ((zvalue = (float)srcida[yp][x])>Threshold){
00381           z[found] = zvalue; found++; }
00382         if ((zvalue = (float)srcida[yp][xp])>Threshold){
00383           z[found] = zvalue; found++; }
00384         if ((zvalue = (float)srcida[yp][x2p])>Threshold){
00385           z[found] = zvalue; found++; }
00386         if ((zvalue = (float)srcida[y2p][x2m])>Threshold){
00387           z[found] = zvalue; found++; }
00388         if ((zvalue = (float)srcida[y2p][xm])>Threshold){
00389           z[found] = zvalue; found++; }
00390         if ((zvalue = (float)srcida[y2p][x])>Threshold){
00391           z[found] = zvalue; found++; }
00392         if ((zvalue = (float)srcida[y2p][xp])>Threshold){
00393           z[found] = zvalue; found++; }
00394         if ((zvalue = (float)srcida[y2p][x2p])>Threshold){
00395           z[found] = zvalue; found++; }
00396
00397         if (found>2) {
00398           qsort(z,found, sizeof(float),comp);
00399           dstida[y][x] = (OutputStorageType)z[found>>1];
00400         } else {
00401           dstida[y][x] = (OutputStorageType)Threshold;
00402         }
00403       } else {
00404         dstida[y][x]= (OutputStorageType) zvalue;
00405       }
00406     }
00407   }
00408
00409   return 0;
00410 }
00411
00412
00413 template <class InputStorageType, class OutputStorageType>
00414 int Median<InputStorageType, OutputStorageType>::
00415 FilterOnlyZeroIgnoreZero3x3(Image<InputStorageType>& src,
00416                             Image<OutputStorageType>& dst,
00417                             const float& Threshold) {
00418 #ifdef BIAS_DEBUG
00419   if (src.GetChannelCount()!=1) {
00420     BIASERR("Median() not implemented for more than one channel");
00421     return -1;
00422   }
00423 #endif
00424   OutputStorageType **dstida;
00425   InputStorageType **srcida;
00426   float z[9], zvalue;
00427   unsigned found, xm, xp, ym, yp, w,
00428     maxwidth, maxheight, h, x, y;
00429
00430   if (!src.SamePixelAndChannelCount(dst)){
00431     if (!dst.IsEmpty())
00432       dst.Release();
00433     dst.Init(src.GetWidth(), src.GetHeight(),1);
00434   }
00435
00436   dstida = dst.GetImageDataArray();
00437   srcida = src.GetImageDataArray();
00438   memset((void*)dstida[0], 0, sizeof(OutputStorageType)*dst.GetPixelCount());
00439
00440   w=src.GetWidth();
00441   h=src.GetHeight();
00442   maxheight=h-1;
00443   maxwidth=w-1;
00444   for (y=1; y<maxheight; y++) {
00445     for (x=1; x<maxwidth; x++) {
00446       if ((zvalue = (float)srcida[y][x])<=Threshold) {
00447         found = 0;
00448         xm = x-1;
00449         xp = x+1;
00450         ym = y-1;
00451         yp = y+1;
00452         if ((zvalue = (float)srcida[ym][xm])>Threshold){
00453           z[found] = zvalue; found++; }
00454         if ((zvalue = (float)srcida[ym][x])>Threshold){
00455           z[found] = zvalue; found++; }
00456         if ((zvalue = (float)srcida[ym][xp])>Threshold){
00457           z[found] = zvalue; found++; }
00458         if ((zvalue = (float)srcida[y][xm])>Threshold){
00459           z[found] = zvalue; found++; }
00460
00461         if ((zvalue = (float)srcida[y][xp])>Threshold){
00462           z[found] = zvalue; found++; }
00463         if ((zvalue = (float)srcida[yp][xm])>Threshold){
00464           z[found] = zvalue; found++; }
00465         if ((zvalue = (float)srcida[yp][x])>Threshold){
00466           z[found] = zvalue; found++; }
00467         if ((zvalue = (float)srcida[yp][xp])>Threshold){
00468           z[found] = zvalue; found++; }
00469
00470         if (found>=2) {
00471           qsort(z,found, sizeof(float),comp);
00472           dstida[y][x] = (OutputStorageType)z[found>>1];
00473         } else {
00474           //dstida[y][x] = (OutputStorageType)Threshold;
00475         }
00476       } else {
00477         dstida[y][x]= (OutputStorageType) zvalue;
00478       }
00479     }
00480   }
00481   return 0;
00482 }
00483
00484
00485 #ifdef allmediancode
00486 template <class InputStorageType, class OutputStorageType>
00487 int Median<InputStorageType, OutputStorageType>::
00488 NonMaxSupression3x3(Image<InputStorageType>& src,
00489                     Image<OutputStorageType>& dst)
00490 {
00491   if (!src.SamePixelAndChannelCount(dst)){
00492     if (!dst.IsEmpty())
00493       dst.Release();
00494     dst.Init(src.GetWidth(), src.GetHeight(), src.GetChannelCount());
00495   }
00496   if (src.GetChannelCount()!=1){
00497     BIASERR("only for 1 channel images");
00498     return -1;
00499   }
00500   StorageType *ev=src.GetImageData(), *d=dst.GetImageData();
00501   unsigned border=1, height=src.GetHeight();
00502   int width=src.GetWidth();
00503   unsigned offs=border*width+border;
00504   StorageType *pev, *end, act;
00505   int wp=width+1, wm=width-1;
00506
00507
00508   // nonmax suppression in 8 neighbourhood
00509   end=ev+width*(height-border)-border;
00510   pev=ev+offs;
00511   d+=offs;
00512   memset((void *)d, 0, sizeof(StorageType)*src.GetPixelCount());
00513   while (pev<end){
00514     act=*pev;
00515     if (pev[-wp]<act && pev[-width]<act && pev[-wm]<act &&
00516         pev[-1]<act && pev[1]<act &&
00517         pev[wm]<act && pev[width]<act && pev[wp]<act){
00518           *d=*pev;
00519     }
00520     pev++; d++;
00521   }
00522   return 0;
00523 }
00524
00525
00526
00527
00528 /** downloaded from
00529     http://home.od.ua/~relayer/algo/dsp/median/median.html
00530     24.11.2004 woelk */
00531 /*
00532  *  This Quickselect routine is based on the algorithm described in
00533  *  "Numerical recipies in C", Second Edition,
00534  *  Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5
00535  */
00536
00537 #define ELEM_SWAP(a,b) { t=(a); (a)=(b); (b)=t; }
00538
00539 template <class InputStorageType, class OutputStorageType>
00540 int Median<InputStorageType, OutputStorageType>::
00541 Median::Filter(InputStorageType arr[], int n)
00542 {
00543   int low, high ;
00544   int median;
00545   int middle, ll, hh;
00546   register StorageType t;
00547
00548   low = 0 ; high = n-1 ; median = (low + high) / 2;
00549   for (;;) {
00550     if (high <= low) /* One element only */
00551       return arr[median] ;
00552
00553     if (high == low + 1) {  /* Two elements only */
00554       if (arr[low] > arr[high])
00555         ELEM_SWAP(arr[low], arr[high]) ;
00556       return arr[median] ;
00557     }
00558
00559     /* Find median of low, middle and high items; swap into position low */
00560     middle = (low + high) / 2;
00561     if (arr[middle] > arr[high])    ELEM_SWAP(arr[middle], arr[high]) ;
00562     if (arr[low] > arr[high])       ELEM_SWAP(arr[low], arr[high]) ;
00563     if (arr[middle] > arr[low])     ELEM_SWAP(arr[middle], arr[low]) ;
00564
00565     /* Swap low item (now in position middle) into position (low+1) */
00566     ELEM_SWAP(arr[middle], arr[low+1]) ;
00567
00568     /* Nibble from each end towards middle, swapping items when stuck */
00569     ll = low + 1;
00570     hh = high;
00571     for (;;) {
00572       do ll++; while (arr[low] > arr[ll]) ;
00573       do hh--; while (arr[hh]  > arr[low]) ;
00574
00575       if (hh < ll)
00576         break;
00577
00578       ELEM_SWAP(arr[ll], arr[hh]) ;
00579     }
00580
00581     /* Swap middle item (in position low) back into correct position */
00582     ELEM_SWAP(arr[low], arr[hh]) ;
00583
00584     /* Re-set active partition */
00585     if (hh <= median)
00586       low = ll;
00587     if (hh >= median)
00588       high = hh - 1;
00589   }
00590 }
00591
00592 #undef ELEM_SWAP
00593
00594 #endif
00595
00596 template <class InputStorageType, class OutputStorageType>
00597 void Median<InputStorageType, OutputStorageType>::
00598 GetBordersValid_(int &border_x, int &border_y) const
00599 {
00600   border_x = border_y = *_MedianSize;
00601 }
00602
00603 //////////////////////////////////////////////////////////////////////////
00604 //                 instantiation
00605 //////////////////////////////////////////////////////////////////////////
00606 #define FILTER_INSTANTIATION_CLASS Median
00607 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Median.hh Source File

Filter

Median.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __MEDIAN_HH__
00027 #define __MEDIAN_HH__
00028
00029 #include <Base/Image/Image.hh>
00030 #include <Filter/FilterNToN.hh>
00031
00032 namespace BIAS
00033 {
00034   /** @class Median
00035       @ingroup g_filter
00036       @brief 2D median filter
00037
00038       @todo reanimate this class using filter interface
00039   */
00040   template <class InputStorageType, class OutputStorageType>
00041   class BIASFilter_EXPORT Median
00042     : public FilterNToN<InputStorageType,  OutputStorageType>
00043   {
00044   public:
00045     Median();
00046
00047    /// NYI Median(Param& para, const std::string& postfix="");
00048
00049    /// NYI Median(Param& para, const int group_id, const std::string& postfix);
00050
00051     virtual ~Median();
00052
00053     virtual int Filter(const Image<InputStorageType>& src,
00054                        Image<OutputStorageType>& dst);
00055
00056     virtual int FilterInt(const Image<InputStorageType>& src,
00057                           Image<OutputStorageType>& dst);
00058
00059     virtual int FilterFloat(const Image<InputStorageType>& src,
00060                             Image<OutputStorageType>& dst);
00061
00062
00063     /** @brief 2D-Median filter, filtersize is 2*halfsize+1
00064         if minvalue is given, pixels with values smaller minvalue are ignored
00065         and target pixel is only set if half of all source-pixels in current
00066         region if greater minvalue.
00067         @author Jan-Friso Evers-Senne
00068         @date 2003-04-23    */
00069
00070     // NYI int ComputeMedian(Image<InputStorageType>& src,
00071     /*                  Image<OutputStorageType>& dst,
00072                       unsigned int halfsize, float minvalue = FLT_MIN);*/
00073 #ifdef allmediancode
00074     int NonMaxSupression3x3(Image<InputStorageType>& src,
00075                             Image<OutputStorageType>& dst);
00076 #endif
00077
00078     /** @brief 2D-Median filter, filtersize is 2*halfsize+1
00079         Zero values are ignored
00080         src and dst cannot be identical
00081         also removes single values in detection window
00082         @author woelk 09 2003 */
00083     //int FilterIgnoreZero(Image<InputStorageType>& src,
00084     //                     Image<OutputStorageType>& dst,
00085     //                     unsigned int halfsize);
00086
00087     int FilterIgnoreZero5x5(Image<InputStorageType>& src,
00088                             Image<OutputStorageType>& dst);
00089
00090     /** @brief fill spurious gaps in depth maps
00091
00092     compute 5x5 median at zero points, thereby ignoring zero values
00093
00094     @param Threshold all values<=threshold are rewritten, all values>threshold
00095     are used for median sorting
00096     */
00097     int FilterOnlyZeroIgnoreZero5x5(Image<InputStorageType>& src,
00098                                     Image<OutputStorageType>& dst,
00099                                     const float& Threshold = 0.0f);
00100
00101     /** @brief fill spurious gaps in depth maps
00102
00103     compute 3x3 median at zero points, thereby ignoring zero values
00104     @param Threshold all values<=threshold are rewritten, all values>threshold
00105     are used for median sorting
00106     */
00107     int FilterOnlyZeroIgnoreZero3x3(Image<InputStorageType>& src,
00108                                     Image<OutputStorageType>& dst,
00109                                     const float& Threshold = 0.0f);
00110
00111     /** fast median on double array, faster than sort
00112         @author woelk 01/2004 */
00113    /// NYI InputStorageType Filter(InputStorageType arr[], int n);
00114
00115     inline void SetSize(int newsize) {
00116       BIASASSERT(_MedianSize!=NULL);
00117       *_MedianSize = newsize;
00118     }
00119   protected:
00120     /// half win size of median, 1 means 3x3
00121     int* _MedianSize;
00122
00123     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00124   };
00125
00126
00127
00128
00129 }// namepspace
00130
00131 #endif
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/MetaData.cpp Source File

Base » Image

MetaData.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include "MetaData.hh"
00028 #include <Base/Debug/Error.hh>
00029 #include <string>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 // #define DEBUG_METADATA
00035
00036 ////////////////////////////////////////////////////////////////////////
00037 // AppData
00038 ///////////////////////////////////////////////////////////////////////
00039
00040 AppData::AppData()
00041 {
00042   data = NULL;
00043   Clear();
00044 }
00045
00046 AppData::~AppData()
00047 {
00048   if (data != NULL) { delete[] data; data = NULL; }
00049 }
00050
00051 AppData::AppData(const AppData& app)
00052 {
00053   data = NULL;
00054   (*this) = app;
00055 }
00056
00057 AppData& AppData::operator=(const AppData& app)
00058 {
00059   tag = app.tag;
00060   length = app.length;
00061   stag = app.stag;
00062   sdata = app.sdata;
00063   if (data != NULL) delete[] data;
00064   if (length>0) {
00065     data = new char[length];
00066     memcpy(data, app.data, length);
00067   }
00068   else data = NULL;
00069   return (*this);
00070 }
00071
00072 void AppData::Clear()
00073 {
00074   tag=MD_Invalid;
00075   if (data) delete[] data; data=NULL;
00076   data=NULL;
00077   length=0;
00078   stag=sdata="";
00079 }
00080
00081 int AppData::CheckFormat()
00082 {
00083   //cerr <<"checking meta data format for "<<stag<<" sdata\n";
00084   if (tag==MD_USE_ASCII){
00085     string::size_type pos;
00086     string::size_type last=sdata.length()-1;
00087
00088     //cerr << "checking sdata\n";
00089
00090     // check if sdata contains only \n followed by '#'
00091     pos=0;
00092     while ((pos=sdata.find('\n', (pos==0)?0:pos+1))!=string::npos){
00093       if (pos==last || sdata[pos+1]!='#'){
00094         BIASERR("there should be no CR without an immediatly following '#' in "
00095                 <<"ascii meta data "<<sdata);
00096         return -1;
00097       }
00098     };
00099     // check if sdata only contains '#' with a leading '\n'
00100 #ifndef BIAS_DAIMLERCHRYSLER
00101     pos=0;
00102     while ((pos=sdata.find('#', (pos==0)?0:pos+1))!=string::npos){
00103       if (pos==0 || sdata[pos-1]!='\n'){
00104         BIASERR("there should be no '#' without a leading CR in "
00105                 <<"ascii meta data\nthe first '#' is added automatically "
00106                 <<stag<<endl<<sdata<<" "<<pos);
00107         return -2;
00108       }
00109     }
00110 #endif
00111
00112     //cerr << "checking stag\n";
00113     last=stag.length()-1;
00114     if (last<3){
00115       BIASERR("stag too short, stag should look like this: "
00116               <<"'#[a tag]': "<<last+1<<" "<<stag);
00117       return -3;
00118     }
00119     if (stag[0]!='#'){
00120       BIASERR("wrong stag format, stag should start with '#[' "<<stag);
00121       return -4;
00122     }
00123     if (stag[1]!='['){
00124       BIASERR("wrong stag format, stag should start with '#[' "<<stag);
00125       return -5;
00126     }
00127     if (stag[last]!=']'){
00128       BIASERR("wrong stag format, stag should end with ']' "<<stag);
00129       return -6;
00130     }
00131   } else {
00132     if (stag!="" || sdata!=""){
00133       BIASERR("stag or sdata is set but tag is not MD_USE_ASCII");
00134       return -7;
00135     }
00136     if (length<0){
00137       BIASERR("invalid length "<<length);
00138       return -8;
00139     }
00140   }
00141   //cerr << "CheckFormat finished\n";
00142   return 0;
00143 }
00144
00145 ostream& BIAS::operator<<(ostream& os, const AppData::TAppData& ta)
00146 {
00147   switch(ta){
00148   case AppData::MD_PMatrix:
00149     os << "MD_PMatrix ("<<(int)AppData::MD_PMatrix<<")"; break;
00150   case AppData::MD_Orientation:
00151     os << "MD_Orientation ("<<(int)AppData::MD_Orientation<<")"; break;
00152   case AppData::MD_TimeStamp:
00153     os << "MD_TimeStamp ("<<(int)AppData::MD_TimeStamp<<")"; break;
00154   case AppData::MD_PTU_Data:
00155     os << "MD_PTU_Data ("<<(int)AppData::MD_PTU_Data<<")"; break;
00156   case AppData::MD_Inertial_Sensor:
00157     os << "MD_Inertial_Sensor ("<<(int)AppData::MD_Inertial_Sensor<<")"; break;
00158   case AppData::MD_ASCII_DATA:
00159     os << "MD_ASCII_DATA ("<<(int)AppData::MD_ASCII_DATA<<")"; break;
00160   case AppData::MD_RMatrix:
00161     os << "MD_RMatrix ("<<(int)AppData::MD_RMatrix<<")"; break;
00162   case AppData::MD_KMatrix:
00163     os << "MD_KMatrix ("<<(int)AppData::MD_KMatrix<<")"; break;
00164   case AppData::MD_CVector:
00165     os << "MD_CVector ("<<(int)AppData::MD_CVector<<")"; break;
00166   case AppData::MD_HomgPoint2D:
00167     os << "MD_HomgPoint2D ("<<(int)AppData::MD_HomgPoint2D<<")"; break;
00168   case AppData::MD_Invalid:
00169     os << "MD_Invalid ("<<(int)AppData::MD_Invalid<<")"; break;
00170   case AppData::MD_UUID:
00171     os << "MD_UUID ("<<(int)AppData::MD_UUID<<")"; break;
00172   case AppData::MD_USE_ASCII:
00173     os << "MD_USE_ASCII ("<<(int)AppData::MD_USE_ASCII<<")"; break;
00174   case AppData::MD_Focal_Length:
00175     os << "MD_Focal_Length ("<<(int)AppData::MD_Focal_Length<<")"; break;
00176   default: os <<"unknown TAppData.tag: "<<(int)ta; break;
00177   }
00178   return os;
00179 }
00180
00181 ostream& BIAS::operator<<(ostream& os, const AppData& ad)
00182 {
00183   if (ad.tag!=AppData::MD_USE_ASCII){
00184 #ifdef DEBUG_METADATA
00185     cerr << "writing binary: "<<ad.tag<<" length "<<ad.length
00186          << "   at pos: "<<(int)os.tellp()<<endl;
00187 #endif
00188     os.write((char*)&ad.tag, sizeof(AppData::TAppData));
00189     os.write((char*)&ad.length, sizeof(int));
00190     os.write(ad.data, ad.length);
00191   } else {
00192 #ifdef DEBUG_METADATA
00193     cerr << "writing ascii: "<< ad.stag << "\n# "<<ad.sdata;
00194     cerr<<"read binary AppData, type: "<<ad.tag<<" length: "<<ad.length<<endl;
00195     cout << "length "<<ad.sdata.length();
00196     if (ad.sdata.length()>0)
00197       cout <<"  first "<<ad.sdata.c_str()[0];
00198     cout <<endl;
00199       cout << "tag: '"<< ad.stag <<"'\ndata : '"<< ad.sdata<<"'\n";
00200 #endif
00201     if (ad.sdata.length()>0 && ad.sdata.c_str()[0]=='#'){
00202       os << ad.stag << "\n"<<ad.sdata;
00203     } else {
00204       os << ad.stag << "\n# "<<ad.sdata;
00205 #ifdef DEBUG_METADATA
00206       cout << "added #\n";
00207 #endif
00208     }
00209   }
00210   return os;
00211 }
00212
00213 #define MD_LINE_LENGTH 1024
00214
00215 istream& BIAS::operator>>(istream& is, AppData& ad)
00216 {
00217     char id[2]={' ',' '};
00218   is.read(id, 2*sizeof(char));
00219   is.putback(id[1]);
00220   is.putback(id[0]);
00221   if (id[0]=='#' && id[1]=='[') { // ascii data
00222     ad.tag=AppData::MD_USE_ASCII;
00223     // read stag
00224     char c;
00225     char line[MD_LINE_LENGTH];
00226     do {
00227       is.get(c);
00228       ad.stag+=c;
00229     } while (c!=']');
00230     is.getline(line, MD_LINE_LENGTH);
00231     //cout << "line: "<<line<<endl;
00232     ad.sdata+=line;
00233     ad.sdata+="\n";
00234     // read sdata
00235     do {
00236       if (is.peek()!='#') break;
00237       is.read(line, 2);
00238       if (line[0]=='#' && line[1]=='[') {
00239         is.putback(line[1]);
00240         is.putback(line[0]);
00241         break;
00242       }
00243       is.putback(line[1]);
00244       is.putback(line[0]);
00245       is.getline(line, MD_LINE_LENGTH);
00246       //cout << "line: "<<line<<endl;
00247       ad.sdata+=line;
00248       ad.sdata+="\n";
00249     } while (is);
00250     if (ad.stag!="#[PTU Data]" && ad.stag!="#[Inertial Sensor]"){
00251       //cerr << " now removing whitespace from "<<ad.stag<<endl;
00252       // now remove leading '#', CRs, and whitespace
00253       while (ad.sdata.length()>0 && (ad.sdata[0]=='#' || ad.sdata[0]==' ' ||
00254                                      ad.sdata[0]=='\n'))
00255         ad.sdata.erase(0, 1);
00256     } else {
00257       while (ad.sdata.length()>0 && (ad.sdata[0]==' ' || ad.sdata[0]=='\n'))
00258         ad.sdata.erase(0, 1);
00259     }
00260     // remove appended CRs
00261     while (ad.sdata[ad.sdata.length()-1]=='\n')
00262       ad.sdata.erase(ad.sdata.length()-1, 1);
00263 #ifdef DEBUG_METADATA
00264    cerr << "read ascii AppData : stag: "<<ad.stag<<"\t:"<<ad.sdata<<endl;
00265 #endif
00266   } else { // binary data
00267 #ifdef BIAS_DEBUG
00268     if (is.peek()=='#'){
00269       BIASERR("this image contains probably MetaData in old format"
00270               <<"\n use '/usr/net/bin/convasciidata' to convert it");
00271 #if __GNU_C__  < 3
00272       is.setstate(ios::badbit | ios::failbit);
00273 #else
00274       is.setstate(ios_base::badbit | ios_base::failbit);
00275 #endif
00276       return is;
00277     }
00278 #endif
00279 #ifdef DEBUG_METADATA
00280     cerr<<"read binary AppData at pos: "<<(int)is.tellg()<<endl;
00281 #endif
00282     ad.stag="";
00283     ad.sdata="";
00284     is.read((char*)&ad.tag, sizeof(ad.tag));
00285     if (!is) return is;
00286
00287     is.read((char*)&ad.length, sizeof(ad.length));
00288     if (!is) return is;
00289
00290 #ifdef DEBUG_METADATA
00291     cerr<<"read binary AppData, type: "<<ad.tag<<" length: "<<ad.length<<endl;
00292 #endif
00293     char *data = new char[ad.length];
00294     is.read(data, ad.length);
00295     ad.data = data;
00296   }
00297   return is;
00298 }
00299
00300 ////////////////////////////////////////////////////////////////////////
00301 // MetaData
00302 ///////////////////////////////////////////////////////////////////////
00303
00304 MetaData::MetaData() //: Debug()
00305   : vector<AppData>()
00306 {}
00307
00308 MetaData::~MetaData()
00309 {}
00310
00311 void MetaData::Add(enum AppData::TAppData ID, unsigned int length, char *data)
00312 {
00313   AppData ad;
00314   if (Find(ID, ad)>=0)
00315     Delete(ID);
00316   ad.Clear();
00317   ad.tag=ID;
00318   ad.length=length;
00319   ad.data=new char[ad.length];
00320   memcpy(ad.data, data, ad.length);
00321   push_back(ad);
00322 }
00323
00324 void MetaData::Add(AppData& ad)
00325 {
00326   AppData ad2;
00327   if (ad.tag==AppData::MD_USE_ASCII){
00328     if (Find(ad.stag, ad2)>=0)
00329       Delete(ad.stag);
00330 #ifdef BIAS_DEBUG
00331     ad.CheckFormat();
00332 #endif
00333     push_back(ad);
00334   } else {
00335     if (Find(ad.tag, ad2)>=0)
00336       Delete(ad.tag);
00337     push_back(ad);
00338   }
00339 }
00340
00341 void MetaData::Add(const string &tag, const string& data)
00342 {
00343   AppData ad;
00344   if (Find(tag, ad)>=0)
00345     Delete(tag);
00346   ad.Clear();
00347   ad.tag=AppData::MD_USE_ASCII;
00348   ad.stag=tag;
00349   ad.sdata=data;
00350 #ifdef BIAS_DEBUG
00351   ad.CheckFormat();
00352 #endif
00353   push_back(ad);
00354 }
00355
00356
00357 int MetaData::Find(AppData::TAppData tag, AppData &data)
00358 {
00359   MetaData::iterator it;
00360   int i;
00361   bool ascii_present=false;
00362   for (i=0, it=begin(); it!=end(); it++, i++){
00363     if ((*it).tag == AppData::MD_USE_ASCII) ascii_present=true;
00364     if ((*it).tag == tag) {
00365       data = (*it);
00366       return i;
00367     }
00368   }
00369   // not found yet
00370   data.Clear();
00371   if (ascii_present)
00372     return -2;
00373   else
00374     return -1;
00375   //return -5; // just to please the compiler. NO, unreachable... (jw)
00376 }
00377
00378 int MetaData::Find(string tag, AppData &data)
00379 {
00380   MetaData::iterator it;
00381   int i;
00382   bool binary_present=false;
00383   for (i=0, it=begin(); it!=end(); it++, i++){
00384     if ((*it).tag != AppData::MD_USE_ASCII &&
00385         (*it).tag != AppData::MD_Invalid) binary_present=true;
00386     if ((*it).stag == tag) {
00387       data = (*it);
00388       // cerr << "tag: "<< data.tag << endl;
00389       return i;
00390     }
00391   }
00392   // not found yet
00393   data.Clear();
00394   if (binary_present)
00395     return -2;
00396   else
00397     return -1;
00398   //return -5; // just to please the compiler. NO unreachable
00399 }
00400
00401
00402 int MetaData::Find(AppData::TAppData tag, string stag, AppData &data)
00403 {
00404   int res;
00405   if ((res=Find(tag, data))==-2)
00406     res=Find(stag, data);
00407   return res;
00408 }
00409
00410 void MetaData::Delete(enum AppData::TAppData tag)
00411 {
00412   MetaData::iterator it;
00413   for (it=begin(); it!=end(); it++){
00414     if ((*it).tag == tag) {
00415       erase(it);
00416       break;
00417     }
00418   }
00419 }
00420
00421 void MetaData::Delete(const std::string &tag)
00422 {
00423   MetaData::iterator it;
00424   for (it=begin(); it!=end(); it++){
00425     if ((*it).stag == tag) {
00426       erase(it);
00427       break;
00428     }
00429   }
00430 }
00431
00432 ostream &MetaData::WriteBinary(ostream& os)
00433 {
00434   MetaData::const_iterator it;
00435   for (it=begin(); it!=end(); it++){
00436     if ((*it).tag!=AppData::MD_USE_ASCII)
00437       os << (*it);
00438   }
00439   return os;
00440 }
00441
00442 ostream &MetaData::WriteAscii(ostream& os)
00443 {
00444   MetaData::const_iterator it;
00445   for (it=begin(); it!=end(); it++){
00446     if ((*it).tag==AppData::MD_USE_ASCII)
00447       os << (*it) << endl;
00448   }
00449   return os;
00450 }
00451
00452
00453 void MetaData::Dump(ostream& os)
00454 {
00455   for (unsigned int i=0; i<size(); i++)
00456     switch ((*this)[i].tag) {
00457     case AppData::MD_PMatrix:{
00458       os <<"PMatrix ("<<(*this)[i].length<<"): ";
00459       double *d = (double*)(*this)[i].data;
00460       for (int i=0; i<12; i++) os <<"  "<<d[i];
00461       os <<endl;
00462       break;}
00463     case AppData::MD_Projection:
00464       os<< "MD_Projection("<<(*this)[i].length<<"): ";
00465     os <<(*this)[i].data;
00466       os<<endl;
00467       break;
00468     case AppData::MD_Orientation:
00469       os << "MD_Orientation("<<(*this)[i].length<<"): ";
00470       os <<endl;
00471       break;
00472     case AppData::MD_TimeStamp:
00473       os << "MD_TimeStamp("<<(*this)[i].length<<"): ";
00474       os <<endl;
00475       break;
00476     case AppData::MD_PTU_Data:
00477       os << "MD_PTU_Data("<<(*this)[i].length<<"):  ";
00478 #ifdef BIAS_DAIMLERCHRYSLER
00479       {
00480         double *d = (double *)((*this)[i].data);
00481         os << "PanPos: "<< d[0] ;
00482         os << "  TiltPos: "<< d[1] ;
00483         os << "  TimeStamp: "<< ((unsigned long *)(d+2))[0] << endl;
00484       }
00485 #endif
00486       os <<endl;
00487       break;
00488     case AppData::MD_Inertial_Sensor:
00489       os << "MD_Inertial_Sensor("<<(*this)[i].length<<"): ";
00490 #ifdef BIAS_DAIMLERCHRYSLER
00491       //os << *((DC_inertial *)(*this)[i].data) << endl;
00492 #endif
00493       os <<endl;
00494       break;
00495     case AppData::MD_ASCII_DATA:
00496       os << "MD_ASCII_DATA: "<<(*this)[i].data<<endl;
00497       break;
00498     case AppData::MD_RMatrix:
00499       os << "MD_RMatrix("<<(*this)[i].length<<"): ";
00500       os <<endl;
00501       break;
00502     case AppData::MD_KMatrix:
00503       os << "MD_KMatrix("<<(*this)[i].length<<"): ";
00504       os <<endl;
00505       break;
00506     case AppData::MD_CVector:
00507       os << "MD_CVector("<<(*this)[i].length<<"): ";
00508       os <<endl;
00509       break;
00510     case AppData::MD_HomgPoint2D:{
00511       os << "MD_HomgPoint2D: [";
00512       double *d = (double*)(*this)[i].data;
00513       for (int i=0; i<3; i++) os <<" "<<d[i];
00514       os << "]\n";
00515       break;}
00516     case AppData::MD_Invalid:
00517       os << "MD_Invalid("<<(*this)[i].length<<"): ";
00518       os <<endl;
00519       break;
00520     case AppData::MD_UUID:
00521       os <<"MD_UUID("<<(*this)[i].length<<"): "<< (char*)(*this)[i].data<<endl;
00522       break;
00523     case AppData::MD_USE_ASCII:
00524       os << (*this)[i].stag << " - " << (*this)[i].sdata << endl;
00525       break;
00526     case AppData::MD_Focal_Length:
00527       os << "MD_Focal_Length("<<(*this)[i].length<<"): " << " - "
00528          <<*((double*)(*this)[i].data)<<endl;
00529       break;
00530     default:
00531       BIASERR("unknown tag: "<<(int)(*this)[i].tag);
00532       break;
00533     }
00534
00535 }
00536
00537
00538 istream& BIAS::operator>>(istream& is, MetaData& md)
00539 {
00540 #ifdef DEBUG_METADATA
00541   cerr << "A reading binary MetaDatas at pos: "<<is.tellg() << endl;
00542 #endif
00543   AppData ad;
00544   bool binary=true;
00545   if (is.peek()=='#') binary=false;
00546 #ifdef DEBUG_METADATA
00547   cerr << "B reading binary MetaDatas at pos: "<<is.tellg() << endl;
00548 #endif
00549   if (binary){
00550 #ifdef DEBUG_METADATA
00551     cerr << "reading binary MetaDatas" << endl;
00552 #endif
00553     while(is){
00554       ad.Clear();
00555       is >> ad;
00556       if (is)
00557         md.push_back(ad);
00558     }
00559   } else {
00560 #ifdef DEBUG_METADATA
00561     cerr << "reading ascii MetaDatas" << endl;
00562 #endif
00563     char id[2];
00564     char line[MD_LINE_LENGTH];
00565     while(is && is.peek()=='#'){
00566       is.read(id, 2*sizeof(char));
00567       is.putback(id[1]);
00568       is.putback(id[0]);
00569       if (id[0]=='#' && id[1]=='[') { // ascii data
00570         ad.Clear();
00571         is >> ad;
00572         if (is)
00573           md.push_back(ad);
00574         //cerr << "meta datum : "<<ad.stag<<endl;
00575       } else {
00576         is.getline(line, MD_LINE_LENGTH);
00577 #ifdef BIAS_DEBUG
00578 #ifdef BIAS_EXTRA_WARN
00579         BIASERR("skipping non-meta data image comments: "<<line);
00580 #endif
00581 #endif
00582       }
00583     }
00584   }
00585   return is;
00586 }
00587
00588 ostream& BIAS::operator<<(ostream& os, const MetaData& md)
00589 {
00590   if (!os) {
00591     BIASERR("MetaData::AppendToOStream(): ostream not writable!");
00592     return os;
00593   }
00594   MetaData::const_iterator it;
00595   for (it=md.begin(); it!=md.end(); it++){
00596     os << (*it);
00597   }
00598   return os;
00599 }
00600
00601
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/MetaData.hh Source File

Base » Image

MetaData.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __METADATA_HH__
00027 #define __METADATA_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <vector>
00032 #include <string>
00033
00034 namespace BIAS {
00035
00036   /** @class AppData
00037       @brief this is a chunk of metadata, also see MetaData
00038
00039       AppData can hold the meta datum either in ascii format (in this case
00040       AppData.tag is set to AppData::MD_USE_ASCII) or in binary format (in this
00041       case AppData.tag is set to anything except AppData::MD_USE_ASCII or
00042       AppData::MD_Invalid)
00043
00044       Basic operators for reading, writing and assignig exist
00045
00046       @author woelk 11/2003 */
00047
00048   class BIASImageBase_EXPORT AppData
00049   {
00050   public:
00051     /** @enum TAppData
00052         @brief Type of AppData
00053
00054         If set to MD_USE_ASCII, AppData.tag, AppData.length and AppData.data
00055         are invalid. AppData.stag and AppData.sdata should be used.
00056
00057         If set to anything else except MD_Invalid, AppData.tag, AppData.length
00058         and AppData.data are valid. AppData.stag and AppData.sdata should not
00059         be used in this case.
00060
00061         The string tag AppData.stag can be generated from the enum id by
00062         removing 'MD_', substituting underscores with blanks and bracketing
00063         with '#[' and ']'.
00064
00065         For example tag=MD_Inertial_Sensor evolves to
00066         stag="#[Inertial Sensor]".
00067
00068         !! MD_ASCII_DATA is deprecated and should no longer be used. !!
00069         It is keept her for compatibility reasons.
00070     */
00071     enum TAppData {MD_PMatrix=0, MD_Orientation=1, MD_TimeStamp=2,
00072                    MD_PTU_Data=3, MD_Inertial_Sensor=4, MD_ASCII_DATA=5,
00073                    MD_RMatrix=6, MD_KMatrix=7, MD_CVector=8, MD_HomgPoint2D=9,
00074                    MD_Invalid=10, MD_UUID=11, MD_USE_ASCII=12,
00075                    MD_Focal_Length=14, MD_GPS_Data=15, MD_Projection = 16};
00076   public:
00077     AppData();
00078     ~AppData();
00079
00080     AppData(const AppData& app);
00081
00082     AppData& operator=(const AppData& app);
00083
00084     /** @brief Resets all members. */
00085     void Clear();
00086
00087     /** checks if stag and sdata have the correct format */
00088     int CheckFormat();
00089
00090     /** @brief The tag defines the type of data, e.g. MD_PMatrix
00091         is set to MD_USE_ASCII if ascii data is used. See TAppData. */
00092     enum TAppData tag;
00093     /// number of bytes used by the data block
00094     int length;
00095     /// pointer to block of data
00096     char *data;
00097     /// the tag as given in ascii meta data
00098     std::string stag;
00099     /// the data as given in ascii meta data
00100     std::string sdata;
00101   };
00102
00103   /** @relates AppData */
00104   std::ostream& operator<<(std::ostream& os, const AppData& ad);
00105   /** @relates AppData */
00106   std::istream& operator>>(std::istream& is, AppData& ta);
00107
00108   /** @relates TAppData */
00109   std::ostream& operator<<(std::ostream& os, const AppData::TAppData& ta);
00110
00111
00112   /** @class MetaData
00113       @brief this class collects all additional data chunks of type AppData
00114       to be written into/read from an image file
00115
00116       See ExampleMetaData for usage.
00117
00118       @author woelk 11/2003 */
00119   class BIASImageBase_EXPORT MetaData : public std::vector<AppData>
00120   {
00121   public:
00122     MetaData();
00123
00124     MetaData(const MetaData& M) {
00125       (*this) = M;
00126     }
00127
00128     MetaData& operator=(const MetaData& M) {
00129       std::vector<AppData>::operator=(M);
00130       return (*this);
00131     }
00132
00133     ~MetaData();
00134
00135     /** @brief Add a new binary meta datum.
00136
00137         Replace old binary meta datum if already present.
00138         Does not check if corresponding ascii datum is present. */
00139     void Add(enum AppData::TAppData ID, unsigned int length, char *data);
00140     void Add(AppData& ad);
00141     /** @brief Add a new ascii meta datum
00142
00143         Replace old ascii meta datum if already present.
00144         Does not check if corresponding binary datum is present. */
00145     void Add(const std::string &tag, const std::string& data);
00146
00147     /** @brief searches for tag in binary coded AppDatas.
00148
00149         returns:   - position in vector if tag is found
00150
00151                    - -2 if tag not found but ascii data present
00152
00153                    - -1 if tag not found and no ascii data present */
00154     int Find(enum AppData::TAppData tag, AppData &data);
00155     /** @brief searches for tag in ascii coded AppDatas.
00156
00157         returns:   - position in vector if tag is found
00158
00159                    - -2 if tag not found but binary data present
00160
00161                    - -1 if tag not found and no binary data present */
00162     int Find(std::string tag, AppData &data);
00163     /** @brief cascades Find(enum AppData::TAppData tag, AppData &data) and
00164         Find(std::string tag, AppData &data) */
00165     int Find(enum AppData::TAppData tag, std::string stag, AppData &data);
00166
00167     /** @brief Delete the meta datum identified by tag.
00168         Does not search for the corresponding ascii meta datum. */
00169     void Delete(enum AppData::TAppData tag);
00170     /** @brief Delete the meta datum identified by tag.
00171         Does not search for the corresponding binary meta datum. */
00172     void Delete(const std::string &tag);
00173
00174     /** @brief Writes only the meta datas where AppData::tag!=MD_USE_ASCII
00175         to os. */
00176     std::ostream &WriteBinary(std::ostream& os);
00177     /** @brief Writes only the meta datas where AppData::tag==MD_USE_ASCII
00178         to os. */
00179     std::ostream &WriteAscii(std::ostream& os);
00180
00181     /// @brief dumps this to cout, unfinished piece of code
00182     void Dump(std::ostream& os=std::cout);
00183   };
00184
00185   /** @relates MetaData
00186       @brief Reads from is. Decides whether to read ascii format or binary
00187       format */
00188    BIASImageBase_EXPORT std::istream& operator>>(std::istream& is, MetaData& md);
00189   /** @relates MetaData
00190       @brief Dumb write operator writes everything to os.
00191       !!! binary and ascii data are written mixed, if both are present !!! */
00192    BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& is, const MetaData& md);
00193
00194 } //namespace
00195
00196
00197 #include <Base/Common/BIASpragmaEnd.hh>
00198
00199 #endif
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Minpack.cpp Source File

MathAlgo

Minpack.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Minpack.hh"
00027 #include <Base/Math/tnt/fortran.h>
00028
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033   /* hybrd and hybrd1 solve a system of n non-linear equations using the
00034      powell hybrid method. Jacobian is aproximated numerical */
00035   void hybrd_(void (*fcn)(int *n, double *x, double *fvec, int *iflag),
00036               cfi_ n, fda_ x, fda_ fvec, cfd_ xtol, cfi_ maxfev,
00037               cfi_ ml, cfi_ mu, cfd_ epsfcn, fda_ diag, cfi_ mode, cfd_ factor,
00038               cfi_ nprint, fi_ info, fi_ nfev, fda_ fjac, cfi_ ldfjac, fda_ r,
00039               cfi_ lr, fda_ qtf, fda_ wa1, fda_ wa2, fda_ wa3, fda_ wa4);
00040
00041   void hybrd1_(void (*fcn)(int *n, double *x, double *fvec, int *iflag),
00042                cfi_ n, fda_ x, fda_ fvec, cfd_ tol, fi_ info,
00043                fda_ wa, cfi_ lwa);
00044
00045   /* lmder and lmder1 solve a system of n non-linear equations with m
00046      parameters using the Levenberg-Marquardt algorithm. A least squares
00047      solution is used. Jacobian is given analytically */
00048   void lmder_(void (*fcn)(int *m, int *n, double *x, double *fvec,
00049                           double *fjac, int *ldfjac, int *iflag),
00050               cfi_ m, cfi_ n, fda_ x, fda_ fvec, fda_ fjac,
00051               cfi_ ldfjac, cfd_ ftol, cfd_ xtol, cfd_ gtol, cfi_ maxfev,
00052               fda_ diag, cfi_ mode, cfd_ factor, cfi_ nprint, fi_ info,
00053               fi_ nfev, fi_ njev, fia_ ipvt, fda_ qtf, fda_ wa1, fda_ wa2,
00054               fda_ wa3, fda_ wa4);
00055
00056
00057   void lmder1_(void (*fcn)(int *m, int *n, double *x, double *fvec,
00058                            double *fjac, int *ldfjac, int *iflag),
00059                cfi_ m, cfi_ n, fda_ x, fda_ fvec, fda_ fjac,
00060                cfi_ ldfjac, cfd_ tol, fi_ info, fia_ ipvt, fda_ wa, cfi_ lwa);
00061
00062   /* lmdif and lmdif1 solve a system of n non-linear equations with m
00063      parameters using the Levenberg-Marquardt algorithm. A least squares
00064      solution is used. Jacobian is aproximated numerical */
00065   void lmdif_(void (*fcn)(int *m, int *n, double *x, double *fvec, int *iflag),
00066               cfi_ m, cfi_ n, fda_ x, fda_ fvec, cfd_ ftol, cfd_ xtol,
00067               cfd_ gtol, cfi_ maxfev, cfd_ epsfcn, fda_ diag, cfi_ mode,
00068               cfd_ factor, cfi_ nprint, fi_ info, fi_ nfev, fda_ fjac,
00069               cfi_ ldfjac, fia_ ipvt, fda_ qtf, fda_ wa1, fda_ wa2, fda_ wa3,
00070               fda_ wa4);
00071
00072   void lmdif1_(void (*fcn)(int *m, int *n, double *x, double *fvec,
00073                            int *iflag), cfi_ m, cfi_ n, fda_ x, fda_ fvec,
00074                cfd_ tol, fi_ info, fia_ iwa, fda_ wa, cfi_ lwa, cfi_ maxfev);
00075
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079
00080 namespace BIAS{
00081   using namespace std;
00082
00083   int Powell(void (*fun)(int *n, double *x, double *fvec, int *iflag),
00084              Vector<double>& InitialGuess, Vector<double>& Result,
00085              double Tolerance)
00086   {
00087     int info;
00088     int n=InitialGuess.Size();
00089     int lwa=(n*(3*n+13))/2;
00090     double *wa=new double[lwa];
00091     Result=InitialGuess;
00092     Vector<double> FuncVec(n);
00093
00094     hybrd1_(fun, &n, Result.GetData(), FuncVec.GetData(), &Tolerance,
00095            &info, wa, &lwa);
00096
00097     delete[] wa;
00098     return (info==1)?(0):(info==0?-1:info);
00099   }
00100
00101   int PowellExtended(void (*fun)(int *n, double *x, double *fvec, int *iflag),
00102                      Vector<double>& InitialGuess, Vector<double>& Result,
00103                      double EpsFcn, double Tolerance)
00104   {
00105     int info;
00106     int n=InitialGuess.Size();
00107     double *wa=new double[4*n];
00108     Result=InitialGuess;
00109     Vector<double> FuncVec(n);
00110     int maxfev = 200*(n + 1);
00111     int ml = n - 1;
00112     int mu = n - 1;
00113     int mode = 2;
00114     int lr = (n*(n + 1))/2;
00115     double factor=1.0;
00116     int nprint = 0;
00117     double *diag=new double[n];
00118     for (int i=0; i<n; i++) diag[i]=1.0;
00119     int nfev;
00120     double *fjac=new double[n*n];
00121     int ldfjac=n;
00122     double *r=new double[lr];
00123     double *qtf=new double[n];
00124
00125     hybrd_(fun, &n, Result.GetData(), FuncVec.GetData(), &Tolerance,
00126            &maxfev, &ml, &mu, &EpsFcn, diag, &mode, &factor, &nprint,
00127            &info, &nfev, fjac, &ldfjac, r, &lr, qtf, &wa[0], &wa[n],
00128            &wa[2*n], &wa[3*n]);
00129
00130     delete[] wa;
00131     delete[] fjac;
00132     delete[] r;
00133     delete[] qtf;
00134     delete[] diag;
00135
00136    return (info==1)?(0):(info==0?-1:info);
00137   }
00138
00139   int LevenbergMarquardt(void (*fun)(int *m, int *n, double *x,
00140                                                  double *fvec, double *fjac,
00141                                                  int *ldfjac, int *iflag),
00142                          int m, int n, Vector<double>& InitialGuess,
00143                          Vector<double>& Result, double Tolerance)
00144   {
00145 #ifdef BIAS_DEBUG
00146     if (m<n) {
00147       BIASERR("dimension of function output is bigger than input "
00148               <<m<<" "<<n);
00149     }
00150 #endif
00151     int info;
00152     Result=InitialGuess;
00153     Vector<double> FuncVec(m);
00154     double *fjac=new double[m*n];
00155     int ldfjac=m;
00156     int *ipvt=new int[n];
00157     int lwa = 5*n+m;
00158     double *wa=new double[lwa];
00159
00160     lmder1_(fun, &m, &n, Result.GetData(), FuncVec.GetData(), fjac,
00161             &ldfjac, &Tolerance, &info, ipvt, wa, &lwa);
00162
00163     delete[] fjac;
00164     delete[] ipvt;
00165     delete[] wa;
00166
00167     return (info>0 && info<5)?(0):(info==0?-1:info);
00168   }
00169
00170   int LevenbergMarquardtExtended(void (*fun)(int *m, int *n, double *x,
00171                                              double *fvec, double *fjac,
00172                                              int *ldfjac, int *iflag),
00173                                  int m, int n, Vector<double>& InitialGuess,
00174                                  Vector<double>& Result, double Tolerance)
00175  {
00176 #ifdef BIAS_DEBUG
00177     if (m<n) {
00178       BIASERR("dimension of function output is bigger than input "
00179               <<m<<" "<<n);
00180       BIASASSERT(m>=n);
00181     }
00182 #endif
00183     int info;
00184     Result=InitialGuess;
00185     Vector<double> FuncVec(m);
00186     int maxfev = 200*(n + 1);
00187     double ftol = Tolerance;
00188     double xtol = Tolerance;
00189     double gtol = 0.0;
00190     int mode = 1;
00191     int nprint = 0;
00192     double *diag=new double[n];
00193     double factor=1.0;
00194     int *iptv=new int[n];
00195     double *qtf=new double[n];
00196     double *wa=new double[m+3*n];
00197     int nfev, njfev;
00198     double *fjac=new double[m*n];
00199     int ldfjac=m;
00200
00201     lmder_(fun, &m, &n, Result.GetData(), FuncVec.GetData(), fjac, &ldfjac,
00202            &ftol, &xtol, &gtol, &maxfev, diag, &mode, &factor, &nprint, &info,
00203            &nfev, &njfev, iptv, qtf, &wa[0], &wa[n], &wa[2*n], &wa[3*n]);
00204
00205     delete[] diag;
00206     delete[] iptv;
00207     delete[] qtf;
00208     delete[] wa;
00209     delete[] fjac;
00210
00211     return (info>0 && info<4)?(0):(info==0?-1:info);
00212   }
00213
00214   int LevenbergMarquardt(void (*fun)(int *m, int *n, double *x,
00215                                      double *fvec, int *iflag),
00216                          int m, int n, Vector<double>& InitialGuess,
00217                          Vector<double>& Result, double Tolerance, int MaxIter)
00218   {
00219 #ifdef BIAS_DEBUG
00220     if (m<n) {
00221       BIASERR("dimension of function output is bigger than input "
00222               <<m<<" "<<n);
00223     }
00224 #endif
00225     int info;
00226     Result=InitialGuess;
00227     Vector<double> FuncVec(m);
00228     int *iwa=new int[n];
00229     int lwa = m*n+5*n+m;
00230     double *wa=new double[lwa];
00231
00232     lmdif1_(fun, &m, &n, Result.GetData(), FuncVec.GetData(), &Tolerance,
00233             &info, iwa, wa, &lwa, &MaxIter);
00234
00235     delete[] iwa;
00236     delete[] wa;
00237
00238     return (info>0 && info<5)?(0):(info==0?-1:info);
00239   }
00240
00241
00242   int LevenbergMarquardtExtended(void (*fun)(int *m, int *n, double *x,
00243                                              double *fvec, int *iflag),
00244                                  int num_errors, int num_vars,
00245                                  Vector<double>& InitialGuess,
00246                                  Vector<double>& Result, double EpsFcn,
00247                                  double Tolerance, int MaxIter, double* fjac,
00248                                  int* ipvt, double *SumOfSquaredErrors)
00249  {
00250 #ifdef BIAS_DEBUG
00251     if (num_errors<num_vars) {
00252       BIASERR("number of params is bigger than number of error functions "
00253               <<num_errors<<" "<<num_vars);
00254     }
00255 #endif
00256     int info;
00257     Result=InitialGuess;
00258     Vector<double> FuncVec(num_errors);
00259     int maxfev;
00260     if ( MaxIter==LM_DEF_MAX_ITER )
00261       maxfev = 200*(num_vars + 1);
00262     else
00263       maxfev = MaxIter;
00264
00265     double ftol = Tolerance;
00266     double xtol = Tolerance;
00267     double gtol = 0.0;
00268     int mode = 1;
00269     int nprint = 0;
00270     double *diag=new double[num_vars];
00271     double factor=1.0;
00272     bool ExhaustiveData =
00273       (fjac!=NULL) && (ipvt!=NULL) && (SumOfSquaredErrors!=NULL);
00274     if (!ExhaustiveData) {
00275       fjac = new double[num_vars*num_errors];
00276       ipvt = new int[num_vars];
00277     }
00278
00279
00280     int ldfjac  = num_errors;
00281     double *qtf = new double[num_vars];
00282     double *wa  = new double[num_errors+3*num_vars];
00283     int nfev;
00284
00285     lmdif_(fun, &num_errors, &num_vars, Result.GetData(),
00286            FuncVec.GetData(), &ftol, &xtol,
00287            &gtol, &maxfev, &EpsFcn, diag, &mode, &factor, &nprint, &info,
00288            &nfev, fjac, &ldfjac, ipvt, qtf, &wa[0], &wa[num_vars],
00289            &wa[2*num_vars], &wa[3*num_vars]);
00290
00291     delete[] diag;
00292     if (!ExhaustiveData) {
00293       delete[] fjac;
00294       fjac = NULL;
00295       delete[] ipvt;
00296       ipvt = NULL;
00297     } else {
00298       *SumOfSquaredErrors = 0;
00299       for (int i=0; i<num_vars; i++) *SumOfSquaredErrors += qtf[i]*qtf[i];
00300     }
00301
00302     delete[] qtf;
00303     delete[] wa;
00304
00305     return (info>0 && info<5)?(0):(info==0?-1:info);
00306   }
00307 } // namespace
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/Minpack.hh Source File

MathAlgo

Minpack.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Minpack_hh__
00027 #define __Minpack_hh__
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Math/Matrix.hh>
00032 #include <Base/Math/Vector.hh>
00033
00034 #include "Lapack.hh"
00035
00036 #define MINPACK_DEF_TOLERANCE 1e-7
00037 #define LM_DEF_MAX_ITER -1
00038
00039
00040 #define LM_IMPROPER_INPUT -1
00041 #define LM_OK 0
00042 #define LM_TOO_MANY_IT 5
00043 #define LM_SMALL_FTOL  6.
00044 #define LM_SMALL_XTOL  7
00045 #define LM_SMALL_GTOL  8
00046
00047 namespace BIAS{
00048 /** @addtogroup mathalgo
00049     \brief C++ Wrappers for important Lapack fortran77 functions
00050     @{
00051 */
00052
00053   /** Solve a system of n non-linear equations with n unkowns using the
00054       powell hybrid method. Jacobian is calculated numerical by
00055       forward-difference approximation. The error is assumed to be in the
00056       range of machine precision.
00057       See minpack/hybrd1.f
00058       @author woelk
00059       @param fcn is the name of the user-supplied subroutine which
00060              calculates the functions at x and returns the values in fvec.
00061              fcn must be declared e.g. in the user calling program
00062
00063              @param iflag should not be changed by fcn unless
00064              the user wants to terminate execution, in this case set iflag
00065              to a negative integer.
00066
00067              @param n is a positive integer input variable set to the number
00068              of functions and variables.
00069
00070              @param x is an array of length n. on input x must contain
00071              an initial estimate of the solution vector. on output x
00072              contains the final estimate of the solution vector.
00073
00074              @param fvec is an output array of length n which contains
00075              the functions evaluated at the output x.
00076
00077        @param Tolerance is a nonnegative input variable. termination occurs
00078        when the algorithm estimates that the relative error
00079        between x and the solution is at most Tolerance.
00080
00081        @return 0 if everything worked fine
00082
00083        if the user has terminated execution, return is the value of iflag,
00084        see description of fcn. Otherwise, return means
00085          - return=-1   improper input parameters.
00086          - return=0   algorithm estimates that the relative error
00087                       between x and the solution is at most tol.
00088          - return=2   number of calls to fcn has reached or exceeded 200*(n+1)
00089          - return=3   Tolerance is too small. no further improvement in
00090                       the approximate solution x is possible.
00091          - return=4   iteration is not making good progress.
00092   */
00093     BIASMathAlgo_EXPORT
00094   int Powell(void (*fcn)(int *n, double *x, double *fvec, int *iflag),
00095              Vector<double>& InitialGuess, Vector<double>& Result,
00096              double Tolerance=MINPACK_DEF_TOLERANCE);
00097
00098   /** solve a system of n non-linear equations with n unkowns using the
00099       powell hybrid method. Jacobian is aproximated numericaly by
00100       forward-difference approximation.
00101       See Powell for further parameter documentation
00102       See minpack/hybrd.f
00103       @author woelk */
00104     BIASMathAlgo_EXPORT
00105   int PowellExtended(void (*fcn)(int *n, double *x, double *fvec, int *iflag),
00106                      Vector<double>& InitialGuess, Vector<double>& Result,
00107                      double EpsFcn, double Tolerance=MINPACK_DEF_TOLERANCE);
00108
00109   /** Solves an overdetermined system of n non-linear equations with m
00110       parameters using the Levenberg-Marquardt algorithm. A least squares
00111       solution is used. Jacobian is given analytically.
00112
00113       @param fcn minimization function, where m(=sizeof fvec) and n(=sizeof x)
00114              are the numbers of residuals/vars passed via fvec/x
00115       @param m number of residuals, m>=n
00116       @param n number of variables, m>=n
00117       @param InitialGuess start point, size must be n
00118       @param Result solution after optimization (output), size must be n
00119
00120       @return 0 means success in optimization
00121
00122       return values in detail:
00123         - return = -1: Improper input parameters.
00124         - return =  0: a termination condition became true
00125         - return =  5: Number of calls to fcn has reached or exceeded maxfev.
00126         - return =  6: ftol is too small. No further reduction in sum of
00127                        squares possible.
00128         - return =  7: xtol is too small. No further improvement in
00129                        approximate solution x is possible.
00130         - return =  8: gtol is too small. fvec is orthogonal to the columns of
00131                        the jacobian to machine precision.
00132
00133       See minpack/lmder1.f
00134       @author woelk */
00135     BIASMathAlgo_EXPORT
00136   int LevenbergMarquardt(void (*fcn)(int *m, int *n, double *x,
00137                      double *fvec, double *fjac,
00138                      int *ldfjac, int *iflag),
00139                          int m, int n, Vector<double>& InitialGuess,
00140                          Vector<double>& Result,
00141                          double Tolerance=MINPACK_DEF_TOLERANCE);
00142
00143   /** Solves an overdetermined system of n non-linear equations with m
00144       parameters using the Levenberg-Marquardt algorithm. A least squares
00145       solution is used. Jacobian is given analytically.
00146       See minpack/lmder.f
00147       @author woelk */
00148     BIASMathAlgo_EXPORT
00149   int LevenbergMarquardtExtended(void (*fcn)(int *m, int *n, double *x,
00150                                              double *fvec, double *fjac,
00151                                              int *ldfjac, int *iflag),
00152                                  int m, int n, Vector<double>& InitialGuess,
00153                                  Vector<double>& Result,
00154                                  double Tolerance=MINPACK_DEF_TOLERANCE);
00155
00156   /** Solves an overdetermined system of n non-linear equations with m
00157       parameters using the Levenberg-Marquardt algorithm. A least squares
00158       solution is used. Jacobian is calculated numericaly by
00159       forward-difference approximation.
00160       See minpack/lmdif1.f
00161       @param MaxIter max number of error-function evaluations. Note that the
00162       complete numerical approximation of the jacobian is always done as a
00163       whole before this value is checked. Set to -1 if you want to use the
00164       default number of the fortran code
00165       @author woelk */
00166  BIASMathAlgo_EXPORT
00167  int LevenbergMarquardt(void (*fcn)(int *m, int *n, double *x,
00168                                      double *fvec, int *iflag),
00169                          int M, int N, Vector<double>& InitialGuess,
00170                          Vector<double>& Result,
00171                          double Tolerance=MINPACK_DEF_TOLERANCE,
00172                          int MaxIter=LM_DEF_MAX_ITER);
00173
00174   /** Solves an overdetermined system of n non-linear equations with m
00175       parameters using the Levenberg-Marquardt algorithm. A least squares
00176       solution is used. Jacobian is calculated numericaly by
00177       forward-difference approximation.
00178       See minpack/lmdif.f
00179       @param ResultingJacobian pass NULL if you are not interested in the
00180       jacobian at the minimum, otherwise pass a pointer to double [n*m]
00181       @param ipvt pass NULL if you are not interested in the
00182       jacobian at the minimum otherwise pass a pointer to int [n]
00183       @author woelk */
00184   BIASMathAlgo_EXPORT
00185 int LevenbergMarquardtExtended(void (*fcn)(int *m, int *n, double *x,
00186                                              double *fvec, int *iflag),
00187                                  int M, int N, Vector<double>& InitialGuess,
00188                                  Vector<double>& Result, double EpsFcn,
00189                                  double Tolerance=MINPACK_DEF_TOLERANCE,
00190                                  int MaxIter=LM_DEF_MAX_ITER,
00191                                  double* ResultingJacobian=NULL,
00192                                  int* ipvt=NULL,
00193                                  double *SumOfSquaredErrors=NULL);
00194   // @}
00195 } // namespace
00196
00197
00198 #endif // __Minpack_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/mip2viff.cpp Source File

Base » Image » Examples

mip2viff.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example mip2viff.cpp
00027  convert our proprietary .mip format to very old Choros .viff format (depreacted!)
00028  @author Jan Woetzel
00029 */
00030
00031
00032
00033 #include <iostream>
00034
00035 #include <Base/Debug/Error.hh>
00036 //#include <Base/Image/ImageBase.hh>
00037 //#include <Base/Image/ImageConvert.hh>
00038 //#include <Base/Image/ImageIO.hh>
00039
00040 //using namespace BIAS;
00041 using namespace std;
00042
00043 //int main(int argc, char *argv[])
00044 int main()
00045 {
00046     // DEPRECATED!
00047     BIASERR("VIFF export is unsupported (DEPRECATED)");
00048     return -1;
00049
00050     //ImageBase source, dest;
00051     //if (argc!=3)
00052     //{
00053     //    BIASERR(argv[0] << " image.mip image.viff ");
00054     //    return -1;
00055     //}
00056     //if (ImageIO::Load(argv[1], source)!=0)
00057     //{
00058     //    BIASERR("error loading image "<<argv[1]);
00059     //    return -2;
00060     //}
00061
00062     //std::string outFileName;
00063     //outFileName=argv[2];
00064     //if (ImageIO::Write(argv[2], source)!=0)
00065     //{
00066     //    BIASERR("error writing MIP image "<<outFileName<<std::endl);
00067     //    return -4;
00068     //}
00069     //if (ImageIO::ExportImageViff_( outFileName, source)!=0)
00070     //{
00071     //    BIASERR("error writing VIFF image "<<outFileName<<std::endl);
00072     //    return -4;
00073     //}
00074     //return 0;
00075 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/module_hierarchy.dox File Reference

Doc/module_hierarchy.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Morphology.cpp Source File

Filter

Morphology.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Morphology.hh"
00027
00028 #include <Base/Common/BIASpragma.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 template <class InputStorageType, class OutputStorageType>
00034 Morphology<InputStorageType, OutputStorageType>::
00035 Morphology()
00036 {
00037   _ParamsAllocated=true;
00038   kernelSize_ =new int;
00039   *kernelSize_=3;
00040 }
00041
00042 template <class InputStorageType, class OutputStorageType>
00043 Morphology<InputStorageType, OutputStorageType>::
00044 Morphology(Param& para, const string& postfix)
00045 {
00046   _ParamsAllocated=false;
00047   int grp = para.GetFreeGroupID();
00048   _AddParam(para, grp, "-Morphology"+postfix);
00049   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Morphology");
00050 }
00051
00052 template <class InputStorageType, class OutputStorageType>
00053 Morphology<InputStorageType, OutputStorageType>::
00054 Morphology(Param& para, const int grp, const string& postfix)
00055 {
00056   _ParamsAllocated=false;
00057   _AddParam(para, grp, "-Morphology"+postfix);
00058 }
00059
00060 template <class InputStorageType, class OutputStorageType>
00061 Morphology<InputStorageType, OutputStorageType>::~Morphology()
00062 {}
00063
00064 template <class InputStorageType, class OutputStorageType>
00065 int Morphology<InputStorageType, OutputStorageType>::
00066 FillBorderConst(Image<OutputStorageType >& Image,
00067                 unsigned short int XBorderSize,
00068                 unsigned short int YBorderSize,
00069                 OutputStorageType Value) {
00070   register OutputStorageType *UpperAddr, *LowerAddr, *last;
00071   unsigned int ChannelCount= Image.GetChannelCount();
00072
00073   last=
00074     &(Image.GetImageData()[(Image.GetPixelCount()-1)*ChannelCount]);
00075
00076   // fill upper and lower border
00077   if (XBorderSize>0){
00078     UpperAddr=Image.GetImageData();
00079     LowerAddr=Image.GetImageDataArray()[Image.GetHeight()-1];;
00080     while (LowerAddr<=last) {
00081       *UpperAddr=Value;
00082       *LowerAddr=Value;
00083       UpperAddr++; LowerAddr++;
00084     }
00085   }
00086
00087   // fill left and right border
00088   if (YBorderSize > 0){
00089     register int WidthStep = Image.GetWidth()*ChannelCount;
00090     UpperAddr=Image.GetImageData();
00091     LowerAddr=UpperAddr+WidthStep-1;
00092     while (LowerAddr<=last) {
00093         *UpperAddr=Value;
00094         *LowerAddr=Value;
00095         UpperAddr+=WidthStep; LowerAddr+=WidthStep;
00096         }
00097   }
00098
00099   return 0;
00100 }
00101
00102 template <class InputStorageType, class OutputStorageType>
00103 void Morphology<InputStorageType, OutputStorageType>::
00104 _AddParam(Param& para, const int grp, const string& postfix) {
00105   if (para.CheckParam("KernelSize"+postfix)){
00106     kernelSize_=para.GetParamInt("KernelSize"+postfix);
00107   } else {
00108     kernelSize_=
00109       para.AddParamInt("KernelSize",
00110                        "size of the morphological kernel (odd values only)",
00111                        3,3,1000);
00112   }
00113 }
00114
00115 //////////////////////////////////////////////////////////////////////////
00116 //                 instantiation
00117 //////////////////////////////////////////////////////////////////////////
00118 #define FILTER_INSTANTIATION_CLASS Morphology
00119 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Morphology.hh Source File

Filter

Morphology.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Morphology_hh__
00027 #define __Morphology_hh__
00028
00029 #include "./FilterBase.hh"
00030 #include <Base/Image/Image.hh>
00031
00032 namespace BIAS {
00033   /** @class Morphology
00034       @ingroup g_filter
00035       @brief base class for Erosion, Dilation, and single Deletion
00036
00037       @author grest, Oct. 2004
00038   */
00039
00040   template <class InputStorageType, class OutputStorageType>
00041   class BIASFilter_EXPORT Morphology : public FilterBase<InputStorageType, OutputStorageType>
00042   {
00043   public:
00044     Morphology();
00045     virtual ~Morphology();
00046
00047     Morphology(Param& para, const std::string& postfix="");
00048     Morphology(Param& para, const int group_id, const std::string& postfix);
00049
00050     /// fills the XBorderSize respectivly YBorderSize nearest
00051     /// Pixels to picture border with Value
00052     /// XBorderSize defines the border parallel to the x axis
00053     int FillBorderConst(Image<OutputStorageType>& Image,
00054                         unsigned short int XBorderSize,
00055                         unsigned short int YBorderSize,
00056                         OutputStorageType Value);
00057
00058     inline void SetKernelSize(int size) { *kernelSize_=size; }
00059
00060     /** Very fast deletion of pixels with no neighbours.
00061         All values, which are not zero, are treated as foreground.
00062         The border of one pixel is always deleted (set to zero).
00063         default is 8-neighborhood.
00064         src and dest must NOT be the same!
00065         @author Daniel Grest, Sept. 2002
00066         @status tested */
00067     //int DeleteSingles(Image<unsigned char>& src,
00068     //                  Image<unsigned char>& dest,
00069     //                  bool Neighbor4=false);
00070   protected:
00071     void _AddParam(Param& para, const int grp_id,
00072                    const std::string& postfix="");
00073
00074     /// pointer into param object, determines influence region size
00075     int *kernelSize_;
00076
00077     using FilterBase<InputStorageType, OutputStorageType>::_ParamsAllocated;
00078
00079   }; // class
00080
00081
00082 } // namespace
00083
00084
00085 #endif // __Morphology_hh__
Generated on Wed Jun 21 19:00:58 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/MSAC.hh Source File

MathAlgo

MSAC.hh

Go to the documentation of this file.
00001 #ifndef __MSAC_hh__
00002 #define __MSAC_hh__
00003
00004 #include <Base/Common/BIASpragmaStart.hh>
00005
00006 #include <Base/Debug/Debug.hh>
00007 #include <Base/Math/Random.hh>
00008 #include <Utils/Param.hh>
00009
00010 #include <vector>
00011 #include <iterator>
00012
00013 namespace BIAS {
00014
00015 #define D_MSAC_SOLVEM  0x00000001
00016 #define D_MSAC_SAMPLES 0x00000002
00017 #define D_MSAC_INIT    0x00000004
00018
00019   template <class SolutionType>
00020   class BIASMathAlgo_EXPORT MSAC : public virtual BIAS::Debug
00021   {
00022   public:
00023     MSAC(BIAS::Param& para);
00024     MSAC(BIAS::Param& para, const int grp, const std::string& postfix);
00025
00026     virtual ~MSAC();
00027
00028     // sets terminate_score and solution_count automatically
00029     int Init(int data_size);
00030
00031     int Init(int data_size, double terminate_score, int solution_count);
00032
00033     int SolveMaster(SolutionType &solution,
00034                     std::vector<bool> &inliers);
00035
00036     virtual
00037     int GetSampleSolution(std::vector<unsigned int> &which_samples,
00038                           SolutionType &solutions);
00039
00040     virtual
00041     bool EvaluateSolution(const SolutionType& solution,
00042                           std::vector<bool>& inlier, int& num_inliers,
00043                           double& evaluate_score);
00044
00045     virtual
00046     bool RefineSolution(std::vector<unsigned int>& which_samples,
00047                         SolutionType& solution,std::vector<bool>& new_inliers);
00048
00049     virtual
00050     bool GenerateSamples(int sample_index,
00051                          std::vector<unsigned int>& which_samples);
00052
00053
00054   protected:
00055     bool *_MSACRefineSolution;
00056     double *_MSACConfidenceThresh;
00057     double *_MSACSigmaFac;
00058     double *_dExpectedSigma;
00059     double *_dExpectedInlierFraction;
00060     int _iDataSize; // number of data
00061     int _iSolutionCount; // number of solutions to evaluate
00062     int *_iSampleSize; // size of minimum data set needed to calc. sol
00063     double _dTerminateScore;
00064
00065     bool _GenerateSamplesRandom(int sample_index,
00066                                 std::vector<unsigned int>& which_samples);
00067
00068     double _CalculateTerminateScore(double sigma,
00069                                     double expected_inlier_fraction);
00070
00071     int _CalculateSampleCount(double expected_inlier_fraction);
00072
00073
00074     void _AddParameter(BIAS::Param& para, int grp,
00075                        const std::string& postfix);
00076
00077    }; // class
00078
00079
00080
00081
00082
00083   //////////////////////////////////////////////////////////////////////////
00084   //       implementation
00085   //////////////////////////////////////////////////////////////////////////
00086
00087   template <class SolutionType>
00088   MSAC<SolutionType>::MSAC(BIAS::Param& para)
00089     : BIAS::Debug()
00090   {
00091     _MSACRefineSolution=NULL;
00092     _MSACConfidenceThresh=_MSACSigmaFac=NULL;
00093     _iDataSize=0;
00094     _iSolutionCount=0;
00095     _iSampleSize=NULL;
00096     _dTerminateScore=0.0;
00097     _dExpectedSigma=NULL;
00098     _dExpectedInlierFraction=NULL;
00099     int grp=para.GetFreeGroupID();
00100     cerr << "using id "<<grp<<" for MSAC\n";
00101
00102     _AddParameter(para, grp, "-MSAC");
00103   }
00104
00105   template <class SolutionType>
00106   MSAC<SolutionType>::MSAC(BIAS::Param& para, int grp,
00107                            const std::string& postfix)
00108     : BIAS::Debug()
00109   {
00110     _MSACRefineSolution=NULL;
00111     _MSACConfidenceThresh=_MSACSigmaFac=NULL;
00112     _iDataSize=0;
00113     _iSolutionCount=0;
00114     _iSampleSize=NULL;
00115     _dTerminateScore=0.0;
00116     _dExpectedSigma=NULL;
00117     _dExpectedInlierFraction=NULL;
00118     _AddParameter(para, grp, "-MSAC"+postfix);
00119   }
00120
00121
00122   template <class SolutionType>
00123   MSAC<SolutionType>::~MSAC()
00124   {}
00125
00126
00127   template <class SolutionType>
00128   int MSAC<SolutionType>::Init(int data_size)
00129   {
00130     _iDataSize=data_size;
00131     _dTerminateScore=_CalculateTerminateScore(*_dExpectedSigma,
00132                                               *_dExpectedInlierFraction);
00133     //    BIASERR("fast termination disabled"); _dTerminateScore=0.0;
00134     _iSolutionCount=_CalculateSampleCount(*_dExpectedInlierFraction);
00135
00136     return Init(data_size, _dTerminateScore, _iSolutionCount);
00137   }
00138
00139   template <class SolutionType>
00140   int MSAC<SolutionType>::Init(int data_size, double terminate_score,
00141                                int solution_count)
00142   {
00143     _iDataSize=data_size;
00144     _dTerminateScore=terminate_score;
00145     //cout << "MSAC: aborting below score: "<<_dTerminateScore<<endl;
00146     _iSolutionCount=solution_count;
00147     //cout <<"MSAC: doing at most "<<_iSolutionCount<<" runs"<<endl;
00148     BIASCDOUT(D_MSAC_INIT, _iDataSize<<" data points whereof "
00149               <<*_dExpectedInlierFraction*data_size<<" are expected to be "
00150               <<"inliers.\n Inliers are assumed normal distributed with sigma "
00151               <<*_dExpectedSigma<<".\n Using confidence in solution of "
00152               <<*_MSACConfidenceThresh
00153               <<" % with sample set size "<<*_iSampleSize<<" leads to at most "
00154               <<_iSolutionCount
00155               <<" solutions to be evaluated.\n MSAC will abort on score below "
00156               <<_dTerminateScore<<"\n");
00157     BIASASSERT(_iDataSize>=*_iSampleSize);
00158     return 0;
00159   }
00160
00161
00162   template <class SolutionType>
00163   int MSAC<SolutionType>::SolveMaster(SolutionType& solution,
00164                                       std::vector<bool>& inliers)
00165   {
00166     SolutionType best_sol, act_sol;
00167     std::vector<unsigned> which_samples;
00168     std::vector<bool> tmp(_iDataSize, false);
00169     std::vector<std::vector<bool> > inliervec(_iSolutionCount, tmp);
00170     double act_score, best_score=DBL_MAX;
00171     int sample_index, best_index=-1, act_num_inlier, best_num_inlier=0;
00172
00173     which_samples.resize(*_iSampleSize);
00174     inliers.resize(_iSolutionCount);
00175
00176     for (sample_index = 0; sample_index < _iSolutionCount; sample_index++){
00177       //cout << "." << flush;
00178       //for (sample_index = 0; sample_index < 1; sample_index++){
00179       if (GenerateSamples(sample_index, which_samples)){
00180         if (!GetSampleSolution(which_samples, act_sol)){
00181           BIASERR("GetSampleSolution failed");
00182           BIASASSERT(false);
00183         }
00184         if (!EvaluateSolution(act_sol, inliervec[sample_index],
00185                               act_num_inlier, act_score)){
00186           BIASERR("Evaluate Solution failed");
00187           BIASASSERT(false);
00188         }
00189         BIASCDOUT(D_MSAC_SOLVEM, setw(3)<<sample_index<<"th solution: "
00190                   <<act_sol<<" with score "<<act_score<<" and "<<act_num_inlier
00191                   <<" inliers\n");
00192
00193         if (*_MSACRefineSolution && true){
00194           which_samples.clear();
00195           for (int i=0; i<_iDataSize; i++){
00196             if (inliervec[sample_index][i]){
00197               which_samples.push_back(i);
00198             }
00199           }
00200
00201           if (!RefineSolution(which_samples, act_sol,
00202                               inliervec[sample_index])){
00203             BIASERR("RefineSolution returned false");
00204             BIASASSERT(false);
00205           }
00206           if (!EvaluateSolution(act_sol, inliervec[sample_index],
00207                                 act_num_inlier, act_score)){
00208             BIASERR("Evaluate Solution failed");
00209             BIASASSERT(false);
00210           }
00211           BIASCDOUT(D_MSAC_SOLVEM, setw(3)<<sample_index
00212                     <<"th refined solution: "
00213                     <<act_sol<<" with score "<<act_score<<" and "
00214                     <<act_num_inlier<<" inliers\n");
00215         }
00216
00217
00218 #ifdef BIAS_DEBUG
00219         if (sample_index!=0){
00220           BIASCDOUT(D_MSAC_SOLVEM, "(best: "<<best_sol<<"/"<<best_score<<"/"
00221                     <<best_num_inlier<<endl);
00222         }
00223 #endif
00224         if (best_score>act_score){
00225           best_score=act_score;
00226           best_index=sample_index;
00227           best_num_inlier=act_num_inlier;
00228           best_sol=act_sol;
00229         }
00230         if (best_score<_dTerminateScore){
00231           BIASCDOUT(D_MSAC_SOLVEM, "finished sampling, got a good score "
00232                     <<best_score<<endl);
00233           //cout << "rechaded score of "<<best_score<<", aborting\n";
00234           break;
00235         }
00236       } else { // if (GenerateSamples(sample_index, which_samples)){
00237         BIASERR("GenerateSamples failed");
00238         BIASASSERT(false);
00239       }
00240     }
00241     // now search best solution and refine it if not already done in loop
00242     if (!*_MSACRefineSolution){
00243       solution=best_sol;
00244       BIASCDOUT(D_MSAC_SOLVEM, "now refining solution "<<solution<<endl);
00245       which_samples.clear();
00246       for (int i=0; i<_iDataSize; i++){
00247         if (inliervec[best_index][i]){
00248           which_samples.push_back(i);
00249         }
00250       }
00251
00252       if (!RefineSolution(which_samples, solution, inliers)){
00253         BIASERR("RefineSolution returned false");
00254         BIASASSERT(false);
00255       }
00256     } else {
00257       inliers=inliervec[best_index];
00258       solution=best_sol;
00259     }
00260     BIASCDOUT(D_MSAC_SOLVEM, "finished: score "<<best_score<<" with "
00261               <<best_num_inlier<<" inlier, solution is "<<solution<<endl);
00262     return 0;
00263   }
00264
00265   template <class SolutionType>
00266   int MSAC<SolutionType>::
00267   GetSampleSolution(std::vector<unsigned int> &which_samples,
00268                     SolutionType &solutions)
00269   {
00270     BIASERR("this function should be implemented in derived class");
00271     return -1;
00272   }
00273
00274
00275
00276   template <class SolutionType>
00277   bool MSAC<SolutionType>::
00278   EvaluateSolution(const SolutionType& solution, std::vector<bool>& inlier,
00279                    int& num_inliers, double& evaluate_score)
00280   {
00281     BIASERR("this function should be implemented in derived class");
00282     return false;
00283   }
00284
00285
00286
00287
00288   template <class SolutionType>
00289   bool MSAC<SolutionType>::
00290   RefineSolution(std::vector<unsigned int>& which_samples,
00291                  SolutionType& solution, std::vector<bool>& new_inliers)
00292   {
00293     BIASERR("this function should be implemented in derived class");
00294     return false;
00295   }
00296
00297
00298
00299   template <class SolutionType>
00300   bool MSAC<SolutionType>::
00301   GenerateSamples(int sample_index, std::vector<unsigned int>& which_samples)
00302   {
00303     return _GenerateSamplesRandom(sample_index, which_samples);
00304   }
00305
00306
00307
00308
00309   template <class SolutionType>
00310   bool MSAC<SolutionType>::
00311   _GenerateSamplesRandom(int sample_index,
00312                          std::vector<unsigned int>& which_samples)
00313   {
00314     bool res=true;
00315 #ifdef BIAS_DEBUG
00316     if (*_iSampleSize==0){
00317       BIASERR("call Init or appropriate constructor befor using MSAC");
00318       BIASASSERT(false);
00319       res=false;
00320     }
00321     if (*_iSampleSize>=_iDataSize){
00322       BIASERR("_iDataSize should be set in derived class befor using MSAC"
00323               <<" _iSampleSize="<<*_iSampleSize<<"  _iDataSize : "
00324               <<_iDataSize);
00325       BIASASSERT(false);
00326       res=false;
00327     }
00328 #endif
00329     // initialzing random with 0 and 1 does not seem to work well
00330     BIAS::Random ran(sample_index+rand());
00331     int count=0;
00332     unsigned int index;
00333     which_samples.clear();
00334
00335     do {
00336       index = ran.GetUniformDistributedInt(0, _iDataSize-1);
00337       if (find(which_samples.begin(), which_samples.end(), index)==
00338           which_samples.end()){
00339         which_samples.push_back(index);
00340         count++;
00341       }
00342     } while (count<*_iSampleSize);
00343
00344 #ifdef BIAS_DEBUG
00345     if ((GetDebugLevel() & D_MSAC_SAMPLES)!=0){
00346       BIASCDOUT(D_MSAC_SAMPLES, "---------- sample "<<sample_index
00347                <<" ---------------------------------"<<"\nnow using data: ");
00348       std::ostream_iterator<int> oi(GetDebugStream(), " ");
00349       std::copy(which_samples.begin(), which_samples.end(), oi);
00350       GetDebugStream() << std::endl;
00351     }
00352 #endif
00353
00354     return res;
00355   }
00356
00357
00358
00359
00360   template <class SolutionType>
00361   double MSAC<SolutionType>::
00362   _CalculateTerminateScore(double sigma, double expected_inlier_fraction)
00363   {
00364     double res=0.0;
00365     res += _iDataSize * expected_inlier_fraction * sigma;
00366     res += _iDataSize * (1.0-expected_inlier_fraction) *
00367       *_MSACSigmaFac * sigma;
00368     return res;
00369   }
00370
00371
00372
00373
00374   template <class SolutionType>
00375   int MSAC<SolutionType>::
00376   _CalculateSampleCount(double expected_inlier_fraction)
00377   {
00378     if (expected_inlier_fraction == 1.0)
00379       // the analytic expression below cant cope with this so do it explicitly.
00380       return 1;
00381
00382     // from Torr's thesis.
00383     int res = int(log (1.0 - (*_MSACConfidenceThresh)) /
00384                   log (1.0 - pow (expected_inlier_fraction,
00385                                   (double) *_iSampleSize)));
00386     return res;
00387   }
00388
00389
00390
00391
00392
00393
00394
00395   template <class SolutionType>
00396   void MSAC<SolutionType>::
00397   _AddParameter(BIAS::Param& para, int grp, const std::string& postfix)
00398   {
00399
00400     if (para.CheckParam("RefineSolution"+postfix)){
00401       _MSACRefineSolution=para.GetParamBool("RefineSolution"+postfix);
00402     } else {
00403       _MSACRefineSolution=
00404         para.AddParamBool("RefineSolution"+postfix,
00405                           "should the solution be refined afterwards using all inliers?",
00406                           false, 0, grp);
00407     }
00408
00409     if (para.CheckParam("ConfidenceThresh"+postfix)){
00410       _MSACConfidenceThresh=para.GetParamDouble("ConfidenceThresh"+postfix);
00411     } else {
00412       _MSACConfidenceThresh=
00413         para.AddParamDouble("ConfidenceThresh"+postfix,
00414                             "confidence in a correct solution",
00415                             0.95, 0.0, 1.0, 0, grp);
00416     }
00417
00418     if (para.CheckParam("SigmaFac"+postfix)){
00419       _MSACSigmaFac=para.GetParamDouble("SigmaFac"+postfix);
00420     } else {
00421       _MSACSigmaFac=
00422         para.AddParamDouble("SigmaFac"+postfix,
00423                             "a datum is considered inlying, when the residuum is below SigmaFac*sigma",
00424                             1.96, 0.0, DBL_MAX, 0, grp);
00425     }
00426
00427     if (para.CheckParam("ExpectedSigma"+postfix)){
00428       _dExpectedSigma=para.GetParamDouble("ExpectedSigma"+postfix);
00429     } else {
00430       _dExpectedSigma=
00431         para.AddParamDouble("ExpectedSigma"+postfix,
00432                             "expected noise of inlying data", 0.0002,
00433                             0.0, DBL_MAX, 0, grp);
00434     }
00435
00436     if (para.CheckParam("ExpectedInlierFraction"+postfix)){
00437       _dExpectedInlierFraction=
00438         para.GetParamDouble("ExpectedInlierFraction"+postfix);
00439     } else {
00440       _dExpectedInlierFraction=
00441         para.AddParamDouble("ExpectedInlierFraction"+postfix,
00442                             "expected inlier percentage",
00443                             0.8, 0.0, 1.0, 0, grp);
00444     }
00445
00446     if (para.CheckParam("SampleCount"+postfix)){
00447       _iSampleSize=
00448         para.GetParamInt("SampleCount"+postfix);
00449     } else {
00450       _iSampleSize=
00451         para.AddParamInt("SampleCount"+postfix,
00452                          "required number of samples for calulation of solution",
00453                          1, 1, INT_MAX, 0, grp);
00454     }
00455
00456
00457
00458   }
00459
00460
00461
00462 } // namespace
00463
00464
00465 #include <Base/Common/BIASpragmaEnd.hh>
00466
00467 #endif // __MSAC_hh__
00468
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/MyDebug.cpp Source File

Base » Debug » Examples

MyDebug.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "MyDebug.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 ExampleDebug::ExampleDebug() : Debug()
00032 {
00033   _iMyInt=0;
00034   ResetDebugLevelFromGlobal();
00035 }
00036
00037 ExampleDebug::~ExampleDebug()
00038 {}
00039
00040
00041 void ExampleDebug::ResetDebugLevelFromGlobal()
00042 {
00043   if (GetGlobalDebugLevel()>100)
00044     SetDebugLevel(GetDebugLevel()|EXAMPLEDEBUG_TESTFLAG);
00045   if (GetGlobalDebugLevel()>200)
00046     SetDebugLevel(GetDebugLevel()|EXAMPLEDEBUG_TESTFLAG2);
00047 }
00048
00049
00050 void ExampleDebug::func()
00051 {
00052   // do something
00053   for (register int i=0; i<3; i++){
00054     _iMyInt+=10;
00055     BIASDOUT(EXAMPLEDEBUG_TESTFLAG,"some output: "<<_iMyInt
00056              <<"  _liDebugLevel: "<<GetDebugLevel());
00057     BIASDOUT(EXAMPLEDEBUG_TESTFLAG2,"i: "<<i<<"\tBIASGlobalDebugLevel: "
00058              <<GetGlobalDebugLevel());
00059   }
00060 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/Examples/MyDebug.hh Source File

Base » Debug » Examples

MyDebug.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __MyDebug_hh__
00027 #define __MyDebug_hh__
00028 #include <Base/Debug/Debug.hh>
00029
00030 #define EXAMPLEDEBUG_TESTFLAG 0x0001
00031 #define EXAMPLEDEBUG_TESTFLAG2 0x0002
00032
00033 namespace BIAS {
00034
00035   class ExampleDebug : public Debug
00036   {
00037   public:
00038     ExampleDebug();
00039
00040     ~ExampleDebug();
00041
00042     void ResetDebugLevelFromGlobal();
00043
00044     void func();
00045
00046   protected:
00047     int _iMyInt;
00048
00049   };
00050
00051 } // namespace
00052
00053
00054
00055
00056 #endif // __MyDebug_hh__
00057
00058
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- l -

  • Lapack_LLS_QR_linear_solve() : TNT
  • Lapack_LU_linear_solve() : TNT
  • LeadingZeroString() : BIAS
  • LENS_PENTAX_CMOUNT_4_2 : BIAS
  • LENS_PENTAX_CMOUNT_4_8 : BIAS
  • LENS_PENTAX_CMOUNT_8_0 : BIAS
  • LENS_SONY_DV_BUILTIN : BIAS
  • LENS_SONY_EVID31_BUILTIN : BIAS
  • LENS_UNKNOWN : BIAS
  • LensModel : BIAS
  • Less() : BIAS
  • LessEqual() : BIAS
  • LevenbergMarquardt() : BIAS
  • LevenbergMarquardtExtended() : BIAS
  • linear_solve() : TNT
  • LineDrawingStyle : BIAS
  • listenthread() : BIAS
  • LogCommandLine() : BIAS
  • LOWER_LEFT : BIAS
  • LOWER_RIGHT : BIAS
  • Lower_triangular_solve() : TNT
  • Lower_triangular_view() : TNT
  • LowerCase() : BIAS
  • LowPassType : BIAS
  • LPT_Binomial : BIAS
  • LPT_Gauss : BIAS
  • LPT_Mean : BIAS
  • LT_Invalid : BIAS
  • LU_factor() : TNT
  • LU_solve() : TNT
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- m -

  • MapAnisotropic : BIAS
  • MapBicubic : BIAS
  • MapBilinear : BIAS
  • MapNearestNeighbor : BIAS
  • MapTrilinear : BIAS
  • matmult() : TNT
  • Matrix : BIAS
  • MatrixIdentity : BIAS
  • MatrixInitType : BIAS
  • MatrixZero : BIAS
  • max() : TNT
  • maxGain : BIAS
  • maxShutter : BIAS
  • min() : TNT
  • minGain : BIAS
  • minShutter : BIAS
  • modeAxis1 : BIAS
  • modeAxis2 : BIAS
  • modeAxis3 : BIAS
  • MONO : BIAS
  • mult_element() : TNT
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- n -

  • N_NW : BIAS
  • Navigationmode : BIAS
  • NE_N : BIAS
  • NearestNeighbour : BIAS
  • NW_W : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- o -

  • operator *() : BIAS, TNT, BIAS
  • operator *=() : BIAS
  • operator+() : TNT, BIAS
  • operator+=() : BIAS
  • operator-() : TNT, BIAS
  • operator-=() : BIAS
  • operator/=() : BIAS
  • operator<() : std
  • operator<<() : BIAS, TNT, BIAS
  • operator==() : BIAS
  • operator>>() : BIAS, TNT, BIAS
  • OPTICAL_CENTER : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- b -

  • Basename() : BIAS
  • BetaDistribution() : BIAS
  • BIAS_DEINTERLACE_TYPE : BIAS
  • BIAS_DI_121 : BIAS
  • BIAS_DI_22 : BIAS
  • BIAS_LOG_DEBUG : BIAS
  • BIAS_LOG_FATAL : BIAS
  • BIAS_LOG_INFO : BIAS
  • BIAS_LOG_LEVEL : BIAS
  • BIAS_LOG_NONE : BIAS
  • BIAS_LOG_WARNING : BIAS
  • biasabort() : BIAS
  • biasexit() : BIAS
  • Bicubic : BIAS
  • Bilinear : BIAS
  • Box : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- c -

  • CAMERA_PTGREY_DRAGONFLY_BW : BIAS
  • CAMERA_PTGREY_DRAGONFLY_COLOR : BIAS
  • CAMERA_PTGREY_DRAGONFLY_HIRES : BIAS
  • CAMERA_PTGREY_SCORPION_COLOR_1600 : BIAS
  • CAMERA_SONY_DFW_V500 : BIAS
  • CAMERA_SONY_DFW_X700 : BIAS
  • CAMERA_SONY_DV : BIAS
  • CAMERA_SONY_EVID31 : BIAS
  • CAMERA_UNKNOWN : BIAS
  • CameraDrawingStyle : BIAS
  • CameraModel : BIAS
  • ChiSquareCulmProbFun() : BIAS
  • Cholesky_upper_factorization() : TNT
  • ConsoleRedirectIO() : BIAS
  • CORNER_LIST : BIAS
  • CornerIndices : BIAS
  • CS_BINARY : BIAS
  • CS_FLOAT : BIAS
  • CS_INT : BIAS
  • CS_NONE : BIAS
  • CS_STRING : BIAS
  • CurrentDateTimeString() : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- d -

  • Dashed : BIAS
  • Directory() : BIAS
  • dot_prod() : TNT
  • DrawbufferMode : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- e -

  • E_NE : BIAS
  • EdataType : BIAS
  • EGradType : BIAS
  • eigenproblem_special_quadratic_matrix_solve() : TNT
  • eigenvalue_solve() : TNT
  • Equal() : BIAS
  • ERejectionType : BIAS
  • ETrackerType : BIAS
  • Extension() : BIAS
  • ExtractNumberFromRight() : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- f -

  • FilenameSequence() : BIAS
  • FileReadable() : BIAS
  • FILTER_INSTANTIATION_CLASS< float, float > : BIAS
  • FILTER_INSTANTIATION_CLASS< unsigned char, float > : BIAS
  • FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char > : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- g -

  • Gamma() : BIAS
  • Greater() : BIAS
  • GreaterEqual() : BIAS
  • GT_Gauss : BIAS
  • GT_GaussAsymmetric : BIAS
  • GT_Simple : BIAS
  • GT_Sobel3x3 : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- h -

  • HaveImagesMatchingROI() : BIAS
  • HIST_BARS : BIAS
  • HIST_LINES : BIAS
  • HIST_POINTS : BIAS
  • HistMode : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- i -

  • ID_Offset : BIAS
  • ID_Scale : BIAS
  • Image : BIAS
  • ImageConvert : BIAS
  • InterpolationMethod : BIAS
  • InterpolationType : BIAS
  • InvChiSquareCulmProbFun() : BIAS
  • InvGamma() : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- p -

  • ParamCallbackInterface : BIAS
  • ParamGUI : BIAS
  • Point : BIAS
  • PointDrawingStyle : BIAS
  • PointSprite : BIAS
  • Powell() : BIAS
  • PowellExtended() : BIAS
  • PyramidMesh : BIAS
  • PyramidMeshWithArrow : BIAS
  • PyramidSolid : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- q -

  • QR_factor() : TNT
  • QR_solve() : TNT
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- r -

  • R_solve() : TNT
  • raw_dv_handler() : MIP
  • receivethread() : BIAS
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedColor() : BIAS
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey() : BIAS
  • RGBAd : BIAS
  • RGBAf : BIAS
  • RGBAuc : BIAS
  • RGBd : BIAS
  • RGBf : BIAS
  • RGBuc : BIAS
  • RT_Invalid : BIAS
  • RT_MAD : BIAS
  • RT_X86 : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- s -

  • S_SE : BIAS
  • ScaledImageCanvas_IDs : BIAS
  • SE_E : BIAS
  • seconds() : TNT
  • SetThreadName() : BIAS
  • sign() : TNT
  • singular_value_decomposition_general_rectangular_matrix_solve() : TNT
  • Solid : BIAS
  • Sphere : BIAS
  • SplitName() : BIAS
  • STEREO_CONSUMER_NV : BIAS
  • STEREO_LEFT_RIGHT : BIAS
  • STEREO_QUADBUFFERED : BIAS
  • STEREO_TWOSCREENS : BIAS
  • STEREO_UNTOUCHED : BIAS
  • Subscript : TNT
  • Suffix() : BIAS
  • SW_S : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- t -

  • TagType : BIAS
  • TLineType : BIAS
  • ToLower_c() : BIAS
  • ToUpper_c() : BIAS
  • transpose() : TNT
  • Transpose_view() : TNT
  • TT_Affine4 : BIAS
  • TT_Affine6 : BIAS
  • TT_Invalid : BIAS
  • TT_Simple : BIAS
  • TT_SimpleAffine4 : BIAS
  • TT_SimpleAffine6 : BIAS
  • TT_Weighted : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- u -

  • Unit_lower_triangular_solve() : TNT
  • Unit_lower_triangular_view() : TNT
  • Unit_upper_triangular_solve() : TNT
  • Unit_upper_triangular_view() : TNT
  • UPPER_LEFT : BIAS
  • UPPER_RIGHT : BIAS
  • Upper_symmetric_eigenvalue_solve() : TNT
  • Upper_triangular_solve() : TNT
  • Upper_triangular_view() : TNT
  • UpperCase() : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- v -

  • Vector2 : BIAS
  • Vector3 : BIAS
  • Vector4 : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w

Here is a list of all namespace members with links to the namespace documentation for each member:

- w -

  • W_SW : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator

  • BIAS_DEINTERLACE_TYPE : BIAS
  • BIAS_LOG_LEVEL : BIAS
  • CameraDrawingStyle : BIAS
  • CameraModel : BIAS
  • CornerIndices : BIAS
  • DrawbufferMode : BIAS
  • EdataType : BIAS
  • EGradType : BIAS
  • ERejectionType : BIAS
  • ETrackerType : BIAS
  • HistMode : BIAS
  • InterpolationMethod : BIAS
  • InterpolationType : BIAS
  • LensModel : BIAS
  • LineDrawingStyle : BIAS
  • LowPassType : BIAS
  • MatrixInitType : BIAS
  • Navigationmode : BIAS
  • PointDrawingStyle : BIAS
  • ScaledImageCanvas_IDs : BIAS
  • TLineType : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • w

- a -

  • Arrow : BIAS

- b -

  • BIAS_DI_121 : BIAS
  • BIAS_DI_22 : BIAS
  • BIAS_LOG_DEBUG : BIAS
  • BIAS_LOG_FATAL : BIAS
  • BIAS_LOG_INFO : BIAS
  • BIAS_LOG_NONE : BIAS
  • BIAS_LOG_WARNING : BIAS
  • Bicubic : BIAS
  • Bilinear : BIAS
  • Box : BIAS

- c -

  • CAMERA_PTGREY_DRAGONFLY_BW : BIAS
  • CAMERA_PTGREY_DRAGONFLY_COLOR : BIAS
  • CAMERA_PTGREY_DRAGONFLY_HIRES : BIAS
  • CAMERA_PTGREY_SCORPION_COLOR_1600 : BIAS
  • CAMERA_SONY_DFW_V500 : BIAS
  • CAMERA_SONY_DFW_X700 : BIAS
  • CAMERA_SONY_DV : BIAS
  • CAMERA_SONY_EVID31 : BIAS
  • CAMERA_UNKNOWN : BIAS
  • CS_BINARY : BIAS
  • CS_FLOAT : BIAS
  • CS_INT : BIAS
  • CS_NONE : BIAS
  • CS_STRING : BIAS

- d -

  • Dashed : BIAS

- e -

  • E_NE : BIAS

- g -

  • GT_Gauss : BIAS
  • GT_GaussAsymmetric : BIAS
  • GT_Simple : BIAS
  • GT_Sobel3x3 : BIAS

- h -

  • HIST_BARS : BIAS
  • HIST_LINES : BIAS
  • HIST_POINTS : BIAS

- i -

  • ID_Offset : BIAS
  • ID_Scale : BIAS

- l -

  • LENS_PENTAX_CMOUNT_4_2 : BIAS
  • LENS_PENTAX_CMOUNT_4_8 : BIAS
  • LENS_PENTAX_CMOUNT_8_0 : BIAS
  • LENS_SONY_DV_BUILTIN : BIAS
  • LENS_SONY_EVID31_BUILTIN : BIAS
  • LENS_UNKNOWN : BIAS
  • LOWER_LEFT : BIAS
  • LOWER_RIGHT : BIAS
  • LPT_Binomial : BIAS
  • LPT_Gauss : BIAS
  • LPT_Mean : BIAS
  • LT_Invalid : BIAS

- m -

  • MapAnisotropic : BIAS
  • MapBicubic : BIAS
  • MapBilinear : BIAS
  • MapNearestNeighbor : BIAS
  • MapTrilinear : BIAS
  • MatrixIdentity : BIAS
  • MatrixZero : BIAS
  • modeAxis1 : BIAS
  • modeAxis2 : BIAS
  • modeAxis3 : BIAS
  • MONO : BIAS

- n -

  • N_NW : BIAS
  • NE_N : BIAS
  • NearestNeighbour : BIAS
  • NW_W : BIAS

- o -

  • OPTICAL_CENTER : BIAS

- p -

  • Point : BIAS
  • PointSprite : BIAS
  • PyramidMesh : BIAS
  • PyramidMeshWithArrow : BIAS
  • PyramidSolid : BIAS

- r -

  • RT_Invalid : BIAS
  • RT_MAD : BIAS
  • RT_X86 : BIAS

- s -

  • S_SE : BIAS
  • SE_E : BIAS
  • Solid : BIAS
  • Sphere : BIAS
  • STEREO_CONSUMER_NV : BIAS
  • STEREO_LEFT_RIGHT : BIAS
  • STEREO_QUADBUFFERED : BIAS
  • STEREO_TWOSCREENS : BIAS
  • STEREO_UNTOUCHED : BIAS
  • SW_S : BIAS

- t -

  • TT_Affine4 : BIAS
  • TT_Affine6 : BIAS
  • TT_Invalid : BIAS
  • TT_Simple : BIAS
  • TT_SimpleAffine4 : BIAS
  • TT_SimpleAffine6 : BIAS
  • TT_Weighted : BIAS

- u -

  • UPPER_LEFT : BIAS
  • UPPER_RIGHT : BIAS

- w -

  • W_SW : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • o
  • p
  • q
  • r
  • s
  • t
  • u

- a -

  • abs() : TNT
  • AddGradientType() : BIAS
  • AddLowPassType() : BIAS
  • AsciiToWx() : BIAS

- b -

  • Basename() : BIAS
  • BetaDistribution() : BIAS
  • biasabort() : BIAS
  • biasexit() : BIAS

- c -

  • ChiSquareCulmProbFun() : BIAS
  • Cholesky_upper_factorization() : TNT
  • ConsoleRedirectIO() : BIAS
  • CurrentDateTimeString() : BIAS

- d -

  • Directory() : BIAS
  • dot_prod() : TNT

- e -

  • eigenproblem_special_quadratic_matrix_solve() : TNT
  • eigenvalue_solve() : TNT
  • Equal() : BIAS
  • Extension() : BIAS
  • ExtractNumberFromRight() : BIAS

- f -

  • FilenameSequence() : BIAS
  • FileReadable() : BIAS

- g -

  • Gamma() : BIAS
  • Greater() : BIAS
  • GreaterEqual() : BIAS

- h -

  • HaveImagesMatchingROI() : BIAS

- i -

  • InvChiSquareCulmProbFun() : BIAS
  • InvGamma() : BIAS

- l -

  • Lapack_LLS_QR_linear_solve() : TNT
  • Lapack_LU_linear_solve() : TNT
  • LeadingZeroString() : BIAS
  • Less() : BIAS
  • LessEqual() : BIAS
  • LevenbergMarquardt() : BIAS
  • LevenbergMarquardtExtended() : BIAS
  • linear_solve() : TNT
  • listenthread() : BIAS
  • LogCommandLine() : BIAS
  • Lower_triangular_solve() : TNT
  • Lower_triangular_view() : TNT
  • LowerCase() : BIAS
  • LU_factor() : TNT
  • LU_solve() : TNT

- m -

  • matmult() : TNT
  • max() : TNT
  • min() : TNT
  • mult_element() : TNT

- o -

  • operator *() : BIAS, TNT, BIAS
  • operator *=() : BIAS
  • operator+() : TNT, BIAS
  • operator+=() : BIAS
  • operator-() : TNT, BIAS
  • operator-=() : BIAS
  • operator/=() : BIAS
  • operator<() : std
  • operator<<() : BIAS, TNT, BIAS
  • operator==() : BIAS
  • operator>>() : BIAS, TNT, BIAS

- p -

  • Powell() : BIAS
  • PowellExtended() : BIAS

- q -

  • QR_factor() : TNT
  • QR_solve() : TNT

- r -

  • R_solve() : TNT
  • raw_dv_handler() : MIP
  • receivethread() : BIAS
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedColor() : BIAS
  • Rescale< InputImageType, OutputImageType >_FillInterpolatedGrey() : BIAS

- s -

  • seconds() : TNT
  • SetThreadName() : BIAS
  • sign() : TNT
  • singular_value_decomposition_general_rectangular_matrix_solve() : TNT
  • SplitName() : BIAS
  • Suffix() : BIAS

- t -

  • ToLower_c() : BIAS
  • ToUpper_c() : BIAS
  • transpose() : TNT
  • Transpose_view() : TNT

- u -

  • Unit_lower_triangular_solve() : TNT
  • Unit_lower_triangular_view() : TNT
  • Unit_upper_triangular_solve() : TNT
  • Unit_upper_triangular_view() : TNT
  • Upper_symmetric_eigenvalue_solve() : TNT
  • Upper_triangular_solve() : TNT
  • Upper_triangular_view() : TNT
  • UpperCase() : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator

  • CORNER_LIST : BIAS
  • RGBAd : BIAS
  • RGBAf : BIAS
  • RGBAuc : BIAS
  • RGBd : BIAS
  • RGBf : BIAS
  • RGBuc : BIAS
  • Subscript : TNT
  • TagType : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator

  • attribsRGBAD : BIAS
  • attribsRGBASD : BIAS
  • FILTER_INSTANTIATION_CLASS< float, float > : BIAS
  • FILTER_INSTANTIATION_CLASS< unsigned char, float > : BIAS
  • FILTER_INSTANTIATION_CLASS< unsigned char, unsigned char > : BIAS
  • Image : BIAS
  • ImageConvert : BIAS
  • Matrix : BIAS
  • maxGain : BIAS
  • maxShutter : BIAS
  • minGain : BIAS
  • minShutter : BIAS
  • ParamCallbackInterface : BIAS
  • ParamGUI : BIAS
  • Vector2 : BIAS
  • Vector3 : BIAS
  • Vector4 : BIAS
Generated on Wed Jun 21 19:13:29 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Normalization.cpp Source File

Base » Geometry

Normalization.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Normalization.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 int Normalization::Hartley(const vector<HomgPoint2D>& Points,
00032                                                      vector<HomgPoint2D>& NormPoints,
00033                                                  KMatrix& Normalization) const {
00034     const unsigned int uiPointCount(Points.size());
00035     // we need at least two points for a stddev
00036     if (uiPointCount<2) return -1;
00037
00038   NormPoints.reserve(uiPointCount);
00039 #ifdef BIAS_DEBUG
00040   if (NormPoints.size()>0) {
00041     BIASERR("non-empty vector supplied !");
00042     BIASABORT;
00043   }
00044 #endif
00045   // compute mean
00046   double meanX(0), meanY(0);
00047   for (unsigned int i=0; i<uiPointCount; i++) {
00048     meanX += Points[i][0];
00049     meanY += Points[i][1];
00050 #ifdef BIAS_DEBUG
00051     if (Points[i][2]!=1.0) {
00052       BIASERR("Supplied non-homogenized point ("<<i<<") ! "<<Points[i]);
00053       BIASABORT;
00054     }
00055 #endif
00056   }
00057   meanX /= (double)uiPointCount;
00058   meanY /= (double)uiPointCount;
00059
00060   // compute mean distance from center
00061   double meandist(0);
00062   for (unsigned int i=0; i<uiPointCount; i++) {
00063     const BIAS::HomgPoint2D& CurPoint = Points[i];
00064     meandist += sqrt((CurPoint[0]-meanX) * (CurPoint[0]-meanX)  +
00065                      (CurPoint[1]-meanY) * (CurPoint[1]-meanY));
00066   }
00067   meandist /= (double)uiPointCount;
00068
00069   // compute Normalization such that mean is zero and mean distance is sqrt2
00070   Normalization.SetZero();
00071   Normalization[0][0] = M_SQRT2/meandist;
00072   Normalization[0][2] = -meanX/meandist;
00073   Normalization[1][1] = M_SQRT2/meandist;
00074   Normalization[1][2] = -meanY/meandist;
00075   Normalization[2][2] = 1;
00076
00077     HomgPoint2D p;
00078   // now normalize all the points
00079   for (unsigned int i=0; i<uiPointCount; i++) {
00080         Normalization.Mult(Points[i], p);
00081         NormPoints.push_back(p.Homogenize());
00082     }
00083     return 0;
00084 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Normalization.hh Source File

Base » Geometry

Normalization.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Normalization_hh_
00027 #define _Normalization_hh_
00028
00029 #include "bias_config.h"
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <vector>
00032
00033 #include <Base/Math/Matrix3x3.hh>
00034 #include "HomgPoint2D.hh"
00035 #include "KMatrix.hh"
00036
00037
00038
00039 namespace BIAS {
00040   /** @class Normalization
00041       @ingroup g_geometry
00042       @brief class Normalization Functions, e.g. Hartley
00043       @author koeser 07/2004
00044       **/
00045   class BIASGeometryBase_EXPORT Normalization {
00046   public:
00047
00048     /** default constructor, does nothing **/
00049     inline Normalization() {};
00050
00051     /** @brief linearly transform Points with 3x3 matrix, such that they
00052         have mean zero and stddev sqrt(2)
00053         @param Points original (homogenized) points
00054         @param NormPoints normalized (homogenized) points correponding to Points
00055         @param Normalization matrix used for normalization
00056         @author koeser */
00057     int Hartley(const std::vector<HomgPoint2D>& Points,
00058                 std::vector<HomgPoint2D>& NormPoints,
00059                 KMatrix& Normalization) const;
00060
00061   };
00062
00063
00064 } // namespace BIAS
00065
00066 #include <Base/Common/BIASpragmaEnd.hh>
00067
00068 #endif
00069
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvas.cpp Source File

Gui

OpenGLCanvas.cpp

Go to the documentation of this file.
00001
00002 #include "OpenGLCanvas.hh"
00003
00004 #include <Base/Image/ImageIO.hh>
00005 #include <Base/Math/Vector2.hh>
00006 #include <Base/Math/Vector3.hh>
00007 #include <Base/Math/Vector4.hh>
00008
00009 #include "GeometryGL.hh"
00010
00011 // -----------------------------------------
00012 using namespace std;
00013 using namespace BIAS;
00014 // -----------------------------------------
00015
00016 // override parent classes event handling table behavior
00017 BEGIN_EVENT_TABLE (OpenGLCanvas, OpenGLCanvasBase)
00018 // --- parent EVT handlers ---
00019 //EVT_PAINT     (OpenGLCanvasBase::OnPaint)
00020 //EVT_SIZE      (OpenGLCanvasBase::OnSize)
00021 //EVT_ERASE_BACKGROUND (OpenGLCanvasBase::OnEraseBackground)
00022 // --- additional handlers ---
00023 EVT_MOTION(OpenGLCanvas::OnMotion)
00024 EVT_LEFT_DOWN(OpenGLCanvas::OnMouseDown)
00025 EVT_MIDDLE_DOWN(OpenGLCanvas::OnMouseDown)
00026 EVT_RIGHT_DOWN(OpenGLCanvas::OnMouseDown)
00027 EVT_MOUSEWHEEL(OpenGLCanvas::OnMouseWheel)
00028 #if OPENGLCANVAS_CONNECT_ONIDLE
00029 EVT_IDLE   (OpenGLCanvas::OnIdle)
00030 #endif
00031
00032 //EVT_LEFT_DCLICK(OpenGLCanvas::OnLeftDoubleClick)
00033 //EVT_RIGHT_DCLICK(OpenGLCanvas::OnRightDoubleClick)
00034 //EVT_MIDDLE_DCLICK(OpenGLCanvas::OnMiddleDoubleClick)
00035 END_EVENT_TABLE()
00036
00037 // -----------------------------------------
00038 bool         OpenGLCanvas::idleRepaintEnabled = OPENGLCANVAS_DEFAULT_idleRepaintEnabled;
00039 bool       OpenGLCanvas::realtimeAnimation = OPENGLCANVAS_DEFAULT_realtimeAnimation;
00040 // -----------------------------------------
00041
00042 /// destructor
00043 OpenGLCanvas::~OpenGLCanvas(){
00044   delete p_viewCtrl_; p_viewCtrl_=NULL;
00045 }
00046
00047
00048 //// constructors:
00049 OpenGLCanvas::OpenGLCanvas(
00050                            wxFrame* parent
00051                            ,wxWindowID id
00052                            ,const wxPoint& pos
00053                            ,const wxSize& size
00054                            ,long style
00055                            ,const wxString& name
00056                            ,int* attribList
00057                            ,const wxPalette& palette
00058                            )
00059                            : OpenGLCanvasBase(parent,id,pos,size,style,name,attribList,palette)
00060                            ,p_viewCtrl_(NULL)
00061 {
00062   //CALLINFO;
00063   InitMembers();
00064 }
00065
00066
00067 OpenGLCanvas::OpenGLCanvas(
00068                            wxFrame* parent
00069                            ,wxGLContext* sharedContext
00070                            ,wxWindowID id
00071                            ,const wxPoint& pos
00072                            ,const wxSize& size
00073                            ,long style
00074                            ,const wxString& name
00075                            ,int* attribList
00076                            ,const wxPalette& palette
00077                            )
00078                            : OpenGLCanvasBase(parent,sharedContext,id,pos,size,style,name,attribList,palette)
00079                            ,p_viewCtrl_(NULL)
00080 {
00081   //CALLINFO;
00082   InitMembers();
00083 }
00084
00085
00086 void OpenGLCanvas::InitMembers()
00087 {
00088   //CALLINFO;
00089   if (p_viewCtrl_==NULL)
00090     p_viewCtrl_ = new CameraViewController ();
00091
00092   OpenGLCanvasBase::InitMembers();
00093   // additional members:
00094   _polygonmodeGL=GL_FILL;
00095   //_pos=wxPoint(0,0);
00096 }
00097
00098
00099 void OpenGLCanvas::DisplayCameraView()
00100 {
00101   DisplayCameraViewInternalParams();
00102   DisplayCameraViewExternalParams();
00103 }
00104
00105
00106 void OpenGLCanvas::DisplayCameraViewInternalParams()
00107 {
00108   GetViewController().DisplayGLInternal();
00109 }
00110
00111 void OpenGLCanvas::DisplayCameraViewExternalParams(){
00112   GetViewController().DisplayGLExternal();
00113 }
00114
00115
00116
00117
00118 void OpenGLCanvas::OnMotion( wxMouseEvent &event )
00119 {
00120   //#ifdef WIN32
00121   //  wxDC dc;
00122   //#else
00123   //  // HACK
00124   //  wxPaintDC dc(this);
00125   //#endif
00126
00127   wxPoint pos= event.GetPosition(); //< mouse position
00128   if (event.LeftIsDown()){
00129     GetViewController().MotionTranslation( Vector2<double>(double(pos.x), double(pos.y)) );
00130   } else if (event.RightIsDown()){
00131     GetViewController().MotionTranslationForward( Vector2<double>(double(pos.x), double(pos.y)) );
00132   } else {
00133     this->ShowValue( event.GetPosition() );
00134   }
00135 }
00136
00137 void OpenGLCanvas::OnMouseDown( wxMouseEvent &event )
00138 {
00139   wxPoint pos= event.GetPosition(); //< mouse position
00140   GetViewController().SetSize(
00141     Vector2<double>(double(GetWidth()), double(GetHeight())) );
00142   GetViewController().SetStartPos(
00143     Vector2<double>(double(pos.x), double(pos.y)) );
00144 }
00145
00146 void OpenGLCanvas::OnMouseWheel( wxMouseEvent &event )
00147 {
00148   const double fraction=0.25;
00149   const int rot = event.GetWheelRotation();
00150   if (rot>0){
00151     // forward
00152     GetViewController().MoveToCenter( -fraction );
00153   } else if (rot<0){
00154     //backward
00155     GetViewController().MoveToCenter( +fraction);
00156   } else {
00157     BIASWARN("invalid wheel motion rot="<<rot);
00158     BIASBREAK;
00159   }
00160 }
00161
00162
00163 // onidle redisplay
00164 // useful for animations
00165 void OpenGLCanvas::OnIdle(wxIdleEvent& event)
00166 {
00167   // CALLINFO;
00168   // TODO set global OpenGLCanvasBase::time based on system time?
00169   if (!(this->idleRepaintEnabled)) {
00170     return; // nothing to do, in particular do not request more OnIdle events.
00171   };
00172
00173   // for animation
00174   UpdateTime();
00175
00176   // paint again, timestamp may have changed, useful for animations:
00177   Display();
00178   ShowFPS();
00179
00180   // usually only one Idle event is generated on when we become idle
00181   // but we want to run this continuously *while* we stay idle.
00182   event.RequestMore();
00183 }
00184
00185
00186 void OpenGLCanvas::UpdateTime()
00187 {
00188   if (animationUpdateEnabled){
00189     // next time step: increase a bit
00190     if (realtimeAnimation){
00191       BIAS::OpenGLCanvasBase::UpdateTime();
00192     } else {
00193       // fallback that depends on frame no.
00194       // should be a fixed update
00195       // assume scaling for TARGET_FPS fps display...
00196       time +=1.0/TARGET_FPS;
00197     }
00198     //cout<<"OpenGLCanvasBase::time="<<OpenGLCanvasBase::time <<endl; // DBG
00199   }
00200 }
00201
00202 /// return GL state info
00203 void OpenGLCanvas::GetInfoGL(std::ostream & os)
00204 {
00205   OpenGLCanvasBase::GetInfoGL(os);
00206
00207   // display (possibly used) CamerViewcontroller member status:
00208   GetViewController().Print(os);
00209 }
00210
00211 void OpenGLCanvas::Reshape()
00212 {
00213   if (!GetContext())
00214     return; // no context available
00215
00216   this->GetViewController().GetInternals().viewport.width  = GetWidth();
00217   this->GetViewController().GetInternals().viewport.height = GetHeight();
00218
00219   /* (re-)display on canvas decrease due to new viewport transformation */
00220   Display();
00221 }
00222
00223 CameraViewController & OpenGLCanvas::GetViewController(){
00224   BIASASSERT(p_viewCtrl_!=NULL);
00225   return *p_viewCtrl_;
00226 }
00227
00228 CameraViewController OpenGLCanvas::GetViewController() const {
00229   BIASASSERT(p_viewCtrl_!=NULL);
00230   return *p_viewCtrl_;
00231 }
00232
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvas.hh Source File

Gui

OpenGLCanvas.hh

Go to the documentation of this file.
00001 #ifndef __OpenGLCanvas_hh__
00002 #define __OpenGLCanvas_hh__
00003
00004 /** \author Jan Woetzel 01/2003 - 12/2004 */
00005 #include <bias_config.h>
00006 #ifndef BIAS_HAVE_WXWINDOWS
00007 #  error Please recompile BIAS with USE_WXWINDOWS to use this lib.
00008 #endif // BIAS_HAVE_WXWINDOWS
00009
00010 #ifndef BIAS_HAVE_OPENGL
00011 #  error Please recompile BIAS with USE_OPENGL to use this lib.
00012 #endif // BIAS_HAVE_OPENGL
00013
00014 //#ifndef BIAS_HAVE_GLUT
00015 //#  error Please recompile BIAS with USE_GLUT (gl utility toolkit) to use this lib.
00016 //#endif // BIAS_HAVE_GLUT
00017
00018
00019
00020 // must be defined to connect the OnIdle handler at all:
00021 #ifndef OPENGLCANVAS_CONNECT_ONIDLE
00022 #  define OPENGLCANVAS_CONNECT_ONIDLE 1
00023 #endif //OPENGLCANVAS_CONNECT_ONIDLE
00024
00025 // behave like glut with continuous rendering using OnIdle function
00026 // useful only for animations, otherwise CPU time is consumed although the same
00027 // view is rendered again and again. (JW)
00028 // true: repaint in OnIdle event handler
00029 // false: do not repaint bad for animations, but good for CPU if there is no aniamtion.
00030 #ifndef OPENGLCANVAS_DEFAULT_idleRepaintEnabled
00031 #  define OPENGLCANVAS_DEFAULT_idleRepaintEnabled true
00032 #endif
00033
00034 // true:  use realtime wall clock, good for animation taht should not depend on GPU performance/resolution
00035 // false: use fixed incremental counter on each rendering, good for feedback of visual performance of animations.
00036 #ifndef  OPENGLCANVAS_DEFAULT_realtimeAnimation
00037 #  define OPENGLCANVAS_DEFAULT_realtimeAnimation true
00038 #endif
00039
00040 // HACK: expected fps, only for similar speed in realtime and free running mode
00041 //#define TARGET_FPS 500
00042 #define TARGET_FPS 200
00043
00044
00045 // TODO: integrate trackball/virtual camera clas, e.g. based on GLhelper interactor. (JW)
00046
00047 // BIAS
00048 #include <Gui/OpenGLCanvasBase.hh>
00049 #include <Gui/CameraViewController.hh>
00050
00051
00052 namespace BIAS {
00053   /**
00054   @class OpenGLCanvas
00055   @ingroup g_gui
00056   @brief OpenGL canvases with additinal event handling (JW)
00057
00058   In addition to OpenGLCanvasbase "automatioc" event handling is integrated,
00059   e.g.
00060   -Display value under mouse in status bar,
00061   -internal storage of camera view,
00062   -navigation through mouse and keys
00063   And it is optionally adding
00064   -automatic repaint by Onidle function (like in glut)
00065   -automatic update of time for animations.
00066   \author Jan Woetzel */
00067   class BIASGui_EXPORT OpenGLCanvas : public OpenGLCanvasBase
00068   {
00069   public:
00070     virtual ~OpenGLCanvas(); ///< destructor
00071
00072     // ctors
00073     OpenGLCanvas(
00074       wxFrame* parent
00075       ,wxWindowID id = -1
00076       ,const wxPoint& pos = wxDefaultPosition
00077       ,const wxSize& size = wxDefaultSize
00078       ,long style = 0
00079       ,const wxString& name = AsciiToWx("OpenGLCanvas")
00080       ,int* attribList = NULL
00081       ,const wxPalette& palette = wxNullPalette
00082       );
00083
00084     ///
00085     /// constructor using a shared context
00086     OpenGLCanvas(
00087       wxFrame* parent
00088       ,wxGLContext* sharedContext = NULL
00089       ,wxWindowID id = -1
00090       ,const wxPoint& pos = wxDefaultPosition
00091       ,const wxSize& size = wxDefaultSize
00092       ,long style=0
00093       ,const wxString& name=AsciiToWx("OpenGLCanvas")
00094       ,int* attribList = 0
00095       ,const wxPalette& palette = wxNullPalette
00096       );
00097
00098     virtual void InitMembers();
00099
00100     virtual void GetInfoGL(std::ostream & os=std::cout);
00101
00102     /// display call to be overridden by child classes
00103     //virtual void Display();
00104
00105     virtual void DisplayCameraView();
00106     virtual void DisplayCameraViewInternalParams();
00107     virtual void DisplayCameraViewExternalParams();
00108
00109     /// sets the internal time param, by default based on realtime wall clock
00110     virtual void UpdateTime();
00111
00112     /// change of size and aspect ratio.
00113     virtual void Reshape();
00114
00115     void OnMotion( wxMouseEvent &event );
00116     void OnMouseDown( wxMouseEvent &event );
00117     void OnMouseWheel( wxMouseEvent &event );
00118     void OnIdle(wxIdleEvent& event);
00119
00120     //void OnLeftDoubleClick( wxMouseEvent &event );
00121     //void OnRightDoubleClick( wxMouseEvent &event );
00122     //void OnMiddleDoubleClick( wxMouseEvent &event );
00123     //void OnMouseWheel( wxMouseEvent &event );
00124
00125   public:
00126     // true to repaint in OnIdle
00127     static bool idleRepaintEnabled;
00128     // auto update time?
00129     static bool realtimeAnimation;
00130
00131
00132   public:
00133     CameraViewController GetViewController() const;
00134     CameraViewController & GetViewController();
00135
00136   protected:
00137     // for (interactive) view control, holds parameters of virtual camera
00138     CameraViewController * p_viewCtrl_;
00139
00140
00141     //wxPoint _pos; // mouse position
00142     GLenum _polygonmodeGL; // GL_POINT GL_LINE GL_FILL
00143
00144
00145     // override parent classes event handling table:
00146     DECLARE_EVENT_TABLE()
00147
00148   }; // OpenGLCanvas
00149
00150 } // namespace BIAS
00151 #endif
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvasBase.cpp Source File

Gui

OpenGLCanvasBase.cpp

Go to the documentation of this file.
00001
00002 /* author: Jan Woetzel */
00003
00004 #include <Base/Common/BIASpragma.hh>
00005
00006 #include "OpenGLCanvasBase.hh"
00007
00008
00009 #include <Base/Image/ImageIO.hh>
00010 #include <Base/Math/Vector2.hh>
00011 #include <Base/Math/Vector3.hh>
00012 #include <Base/Math/Vector4.hh>
00013 #include <Base/Common/FileHandling.hh>
00014 #include <Gui/StringConv.hh>
00015
00016 // contains simple GL calls:
00017 #include "GeometryGL.hh"
00018
00019 // mode settings (vsync, multi sampling:
00020 #include "SettingsGL.hh"
00021
00022
00023 #include <string>
00024 #include <sstream>
00025 #include <iostream>
00026 #include <fstream>
00027
00028
00029 #include <wx/defs.h> // key code table
00030 #include <wx/log.h>
00031
00032 // Nvidia Stereo rendering conrol API:
00033 #ifdef BIAS_HAVE_STEREOI
00034 #  include "StereoI.h"
00035 #endif // BIAS_HAVE_STEREOI
00036
00037
00038 // -----------------------------------------
00039 using namespace std;
00040 using namespace BIAS;
00041 // -----------------------------------------
00042
00043 // WARNING:  if you change the event table here,
00044 // you may need to change it in the derived classes, too! (jw)
00045 BEGIN_EVENT_TABLE (OpenGLCanvasBase, wxGLCanvas)
00046 EVT_PAINT  (OpenGLCanvasBase::OnPaint)
00047 EVT_SIZE   (OpenGLCanvasBase::OnSize)
00048 EVT_ERASE_BACKGROUND (OpenGLCanvasBase::OnEraseBackground)
00049 EVT_CHAR   (OpenGLCanvasBase::OnChar)
00050 END_EVENT_TABLE()
00051
00052
00053 // static initialization
00054 unsigned int  OpenGLCanvasBase::instancesTotalNo_ = 0;
00055 double        OpenGLCanvasBase::time = 0.0;
00056 bool              OpenGLCanvasBase::animationUpdateEnabled = OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled;
00057
00058 #ifdef BIAS_HAVE_STEREOI
00059 // interface to nVidia consumer 3d stereo API
00060 // Please use Get_pStereoAPI()
00061 static StereoI* g_pStereoAPI = NULL;
00062 #endif // BIAS_HAVE_STEREOI
00063
00064 // ----------------------------------
00065
00066 // -----------------------------------------
00067
00068
00069 /// destructor
00070 OpenGLCanvasBase::~OpenGLCanvasBase()
00071 {
00072 #ifdef BIAS_HAVE_FONTGL
00073   delete p_font;
00074   p_font=NULL;
00075 #endif // BIAS_HAVE_FONTGL
00076 }
00077
00078
00079 OpenGLCanvasBase::OpenGLCanvasBase(
00080                                    wxFrame* parent
00081                                    ,wxWindowID id
00082                                    ,const wxPoint& pos
00083                                    ,const wxSize& size
00084                                    ,long style
00085                                    ,const wxString& name
00086                                    ,int* attribList
00087                                    ,const wxPalette& palette  )
00088                                    : wxGLCanvas(parent,id,pos,size,style,name,attribList,palette)
00089                                    ,p_ownerframe(NULL)
00090 #ifdef BIAS_HAVE_FONTGL
00091                                    ,p_font(NULL)
00092 #endif
00093 {
00094   //CALLINFO;
00095
00096   instancesTotalNo_ ++;
00097   InitMembers();
00098   p_ownerframe=parent;
00099 }
00100
00101
00102 OpenGLCanvasBase::OpenGLCanvasBase(
00103                                    wxFrame* parent
00104                                    ,wxGLContext* sharedContext
00105                                    ,wxWindowID id
00106                                    ,const wxPoint& pos
00107                                    ,const wxSize& size
00108                                    ,long style
00109                                    ,const wxString& name
00110                                    ,int* attribList
00111                                    ,const wxPalette& palette  )
00112                                    : wxGLCanvas(parent,sharedContext,id,pos,size,style,name,attribList,palette)
00113                                    ,p_ownerframe(NULL)
00114 #ifdef BIAS_HAVE_FONTGL
00115                                    ,p_font(NULL)
00116 #endif
00117 {
00118   //CALLINFO;
00119
00120   instancesTotalNo_ ++;
00121   InitMembers();
00122   p_ownerframe=parent;
00123 }
00124
00125
00126 void OpenGLCanvasBase::InitMembers()
00127 {
00128   //CALLINFO;
00129
00130   instance_ = instancesTotalNo_;
00131   InitWithContextDone_ = false;
00132   framecount_ = 0;
00133   animationUpdateEnabled = true;
00134 }
00135
00136
00137 void OpenGLCanvasBase::InitWithContext()
00138 {
00139   if (InitWithContextDone_) return; /* already done */
00140
00141   if (!GetContext())
00142   {
00143     BIASERR("skipped because GetContext failed on frame ");
00144     return; // no context available
00145   };
00146   // OK so far
00147   this->SetCurrent();
00148
00149   if (!IsContextAvailable())
00150   {
00151     BIASERR("skipped because no context available on glGetString GL_VENDOR test");
00152     return;
00153   }
00154
00155
00156 #if defined(BIAS_HAVE_GLUT)
00157 #  if defined(__FREEGLUT_H__) || defined(__FREEGLUT_STD_H__)
00158   {
00159     // freeglut really wants a glutInit call no matter if we use their renderarea handler or not.
00160     int MyArgc=0;
00161     glutInit( &MyArgc, (char**)NULL );
00162   }
00163 #  endif
00164 #endif
00165
00166
00167 #if defined(BIAS_HAVE_GLEW)
00168   /// OK, we have a (valid) Gl Context
00169   /// run init with context once
00170 #  ifdef USE_EXPERIMENTAL_SETTING_GLEW
00171   // some exp. beta drivers don't expose their "hidden" capabilities
00172   // bypass extension query and force "on" for all extensions.
00173   BIASERR("WARNING: you are forcing bypassing glew extension query"<<endl
00174     <<"because USE_EXPERIMENTAL_SETTING_GLEW is defined."<<endl
00175     <<"This is *NOT* recommended in general (JW)");
00176   glewExperimental=GL_TRUE;
00177 #  endif // USE_EXPERIMENTAL_SETTING_GLEW
00178   // init glew symbols:
00179   int err = glewInit();
00180   if (GLEW_OK != err) {
00181     // problem: glewInit failed, something is seriously wrong
00182     BIASERR("could not init GLEW. Error: "<<glewGetErrorString(err));
00183     exit(-1);
00184   };
00185 #endif // BIAS_HAVE_GLEW
00186
00187
00188 #if defined(WIN32) && defined(BIAS_HAVE_GLEW)
00189   // vertical sync initialization
00190   if (WGLEW_EXT_swap_control)
00191   {
00192     SetVSync( rendermode.vsync);
00193     if (GetVSync()!=rendermode.vsync){
00194       BIASERR("could not set vsync to "<<rendermode.vsync<<endl
00195         <<"\tDoes the driver allow application controlled VSYNC/page swapping settings?"<<endl
00196         <<"\tE.g. NVStereo will and driver tab may force overriding our settings." );
00197     };
00198   };
00199 #endif // WIN32
00200
00201 #ifdef BIAS_HAVE_FONTGL
00202   if (p_font==NULL){
00203     p_font=new DrawTextGL;
00204     BIASASSERT(p_font!=NULL);
00205 #  ifdef WIN32
00206     p_font->InitFont( GetDC(HWND(this->GetHandle())) );
00207 #  else // WIN32
00208     p_font->InitFont( this->GetHandle() );
00209 #endif // WIN32
00210
00211   }
00212 #endif // BIAS_HAVE_FONTGL
00213
00214   InitWithContextDone_ =true;
00215 }
00216
00217
00218 bool OpenGLCanvasBase::IsContextAvailable()
00219 {
00220   CHECK_GL_ERROR;
00221   if (!(GetParent()->IsShown())) {
00222     //BIASERR("Parent not yet shown err1");
00223     return false;
00224   };
00225   if (!GetContext()) {
00226     BIASERR("Context not (yet?) available.");
00227     return false; // no context available
00228   }
00229   CHECK_GL_ERROR;
00230   if (!(GetParent()->IsShown())) return false;
00231   // OK.
00232
00233 #ifndef WIN32
00234   // conflicts with FBO:
00235   this->SetCurrent(); // get the GL rendering focus
00236 #endif
00237
00238   CHECK_GL_ERROR;
00239   // get OpenGL info strings into std. strings:
00240   const unsigned char * p_str=NULL;
00241   p_str = glGetString(GL_VENDOR);
00242   CHECK_GL_ERROR;
00243   if ( p_str==NULL) {
00244     BIASERR("No Context available (NULL ptr)");
00245     CHECK_GL_ERROR;
00246     return false;
00247   };
00248   return true; // OK.
00249 }
00250
00251
00252 wxFrame* OpenGLCanvasBase::GetOwnerframe()
00253 {
00254   BIASASSERT(p_ownerframe!=NULL);
00255   return p_ownerframe;
00256 }
00257
00258 void OpenGLCanvasBase::SetOwnerframe(wxFrame* ptr)
00259 {
00260   p_ownerframe=ptr;
00261 }
00262
00263
00264 /// return GL state info
00265 void OpenGLCanvasBase::GetInfoGL(std::ostream & os)
00266 {
00267   if (!GetContext()) return; // no context available
00268   this->SetCurrent(); // get the GL rendering focus
00269   // identify current instance of this canvas (or derived class)
00270   os<<"instance: "<<this->instance_<<endl;
00271
00272   // display OpenGL status:
00273   GeometryGL::GetInfoGL(os);
00274   CHECK_GL_ERROR;
00275
00276 #ifdef BIAS_HAVE_STEREOI
00277   // display NV StereoI status:
00278   this->StereoI_GetInfo(os);
00279 #endif //BIAS_HAVE_STEREOI
00280 }
00281
00282 void OpenGLCanvasBase::SwapBuffers(){
00283   framecount_++;
00284   wxGLCanvas::SwapBuffers();
00285 }
00286
00287 void
00288 OpenGLCanvasBase::Display()
00289 {
00290   //CALLINFO;
00291   CHECK_GL_ERROR;
00292   // this routine is calling SetCurrent to get rendering focus:
00293   if ( !IsContextAvailable() )
00294     return;
00295   if ( !InitWithContextDone_ )
00296     InitWithContext();
00297   if ( !InitWithContextDone_ )
00298     return;
00299
00300   if (!(GetParent()->IsShown())) {
00301     BIASERR("Parent not yet shown.");
00302     return;
00303   };
00304
00305   // realtime clock update (or specialized in derived classed)
00306   UpdateTime(); //< only base needs this, teh drived classes use OnIdle event to update the time.
00307
00308   // dummy catching all previous uncaught GL errors (in particular of other applications)
00309   glGetError();
00310   CHECK_GL_ERROR;
00311
00312   // display to correct buffer for stereo rendering:
00313   DisplaySelectBuffer();
00314   CHECK_GL_ERROR;
00315
00316   // set polygonmode, line+point size etc.
00317   DisplayRenderMode();
00318   CHECK_GL_ERROR;
00319   {
00320     /// >>> begin your fancy GL calls (scene like)
00321
00322     DisplayCalls();
00323
00324     /// <<< end of your GL calls
00325
00326   }
00327   // check if we want to display FPS?
00328   CHECK_GL_ERROR;
00329
00330   this->SwapBuffers(); // glcanvas swap
00331 }
00332
00333
00334 void OpenGLCanvasBase::DisplayCalls()
00335 {
00336   /// >>> begin your fancy GL calls
00337
00338   // simple sample calls:
00339   this->DisplayClear();
00340   this->DisplaySampleScene();
00341
00342   /// <<< end of your GL calls
00343 }
00344
00345
00346 // useful only for quad buffered stereo:
00347 void OpenGLCanvasBase::DisplaySelectBuffer()
00348 {
00349   CHECK_GL_ERROR;
00350   // running quad buffered stereo?
00351   static int bufferNr=0;
00352   switch (rendermode.drawbuffermode)
00353   {
00354   case STEREO_UNTOUCHED:
00355     break;
00356   case MONO:
00357   case STEREO_CONSUMER_NV:
00358     glDrawBuffer(GL_BACK);
00359     CHECK_GL_ERROR;
00360     break;
00361   case STEREO_LEFT_RIGHT:
00362     {
00363       // toggle between left and right:
00364       if (bufferNr==0) {
00365         glDrawBuffer(GL_LEFT);
00366         CHECK_GL_ERROR;
00367         bufferNr=1;
00368       } else {
00369         glDrawBuffer(GL_RIGHT);
00370         CHECK_GL_ERROR;
00371         bufferNr=0;
00372       };
00373       break;
00374     }
00375   case STEREO_QUADBUFFERED:
00376     {
00377       // supported by quadro cards:
00378       //#ifdef BIAS_DEBUG
00379       //            cout<<endl<<"displaying quadbuffered /BACK_LEFT,BACK_RIGHT), bufferNr "<<bufferNr<<endl;
00380       //#endif
00381       // toggle between left and right:
00382       if (bufferNr==0) {
00383         glDrawBuffer(GL_BACK_LEFT);
00384         CHECK_GL_ERROR;
00385         bufferNr=1;
00386       } else {
00387         glDrawBuffer(GL_BACK_RIGHT);
00388         CHECK_GL_ERROR;
00389         bufferNr=0;
00390       };
00391       break;
00392     };
00393   default:
00394     cout<<"unknown/unimplemented rendermode.stereomode"<<rendermode.drawbuffermode<<endl;
00395   };
00396   CHECK_GL_ERROR;
00397 }
00398
00399
00400 // static
00401 void OpenGLCanvasBase::DisplayClear()
00402 {
00403   GeometryGL::DisplayClear();
00404   CHECK_GL_ERROR;
00405 }
00406
00407
00408 void OpenGLCanvasBase::DisplayRenderMode()
00409 {
00410   GeometryGL::DisplayRenderMode(rendermode);
00411 }
00412
00413
00414 //static
00415 void OpenGLCanvasBase::DisplaySampleScene()
00416 {
00417   GeometryGL::DisplaySceneExampleSimple();
00418 }
00419
00420 // static
00421 void OpenGLCanvasBase::DisplayCoordCross(const float & size, const float & linewidth)
00422 {
00423   GeometryGL::DisplayCoordCross(size, linewidth);
00424
00425   // mark axes labels with "x,y,z"
00426 #ifdef BIAS_HAVE_FONTGL
00427   BIASASSERT(p_font!= NULL);
00428   GeometryGL::DisplayCoordCrossAxesLabel(size, *p_font);
00429   //GeometryGL::DisplayCoordCrossAxesLabel(size, *p_font
00430   //  ,"X axis"
00431   //  ,"Y axis"
00432   //  ,"Z axis"
00433   //  );
00434
00435 #endif // BIAS_HAVE_FONTGL
00436 }
00437
00438
00439 void OpenGLCanvasBase::Reshape()
00440 {
00441   // adapt the viewport to cover full window (overriden in child classes)
00442   glViewport(0,0, GetWidth(), GetHeight() );
00443
00444   // (re-)display on canvas decrease due to new viewport transformation
00445   Display();
00446 }
00447
00448
00449 unsigned int OpenGLCanvasBase::GetWidth() const
00450 {
00451   int w, h;
00452   //GetSize(&w, &h);
00453   GetClientSize(&w, &h); // DBG
00454   return w;
00455 }
00456
00457
00458 unsigned int OpenGLCanvasBase::GetHeight() const
00459 {
00460   int w, h;
00461   //GetSize(&w, &h);
00462   GetClientSize(&w, &h);
00463   return h;
00464 }
00465
00466
00467 /// @return aspect 'X/Y' = ratio of width being 'bigger' than reference height
00468 float OpenGLCanvasBase::GetAspectRatio() const {
00469   return ((float)GetWidth() / (float)GetHeight());
00470 }
00471
00472
00473
00474 BIAS::Vector3<float>
00475 OpenGLCanvasBase::GetPixelValueRGB(const wxPoint & pos2d)
00476 {
00477   BIAS::Vector3<float> data;
00478   if (!IsContextAvailable()) {
00479     data.Set(0,0,0);
00480     BIASERR("no context");
00481     return data;
00482   };
00483   glReadPixels(
00484     (GLint)pos2d.x,
00485     (GLint)(GetHeight() -pos2d.y),
00486     (GLsizei)1,  (GLsizei)1,
00487     GL_RGB,
00488     GL_FLOAT,
00489     (GLvoid*)(&data[0]) );
00490   return data;
00491 }
00492
00493
00494 BIAS::Vector4<float>
00495 OpenGLCanvasBase::GetPixelValueRGBA(const wxPoint & pos2d)
00496 {
00497   BIAS::Vector4<float> data;
00498   if (!IsContextAvailable()) {
00499     data.Set(0,0,0,0);
00500     BIASERR("no context");
00501     return data;
00502   };
00503   glReadPixels((GLint)pos2d.x,
00504     (GLint)(GetHeight() -pos2d.y),
00505     (GLsizei)1,  (GLsizei)1,
00506     GL_RGBA,
00507     GL_FLOAT,
00508     (GLvoid*)(&data[0]) );
00509   return data;
00510 }
00511
00512
00513 float
00514 OpenGLCanvasBase::GetPixelValueDepth(const wxPoint & pos2d) const
00515 {
00516   float v=0.0;
00517   CHECK_GL_ERROR
00518     glReadPixels((GLint)pos2d.x,
00519     (GLint)(GetHeight()-pos2d.y),
00520     (GLsizei)1,  (GLsizei)1,
00521     GL_DEPTH_COMPONENT, /* GL_DEPTH */
00522     GL_FLOAT,
00523     (GLvoid*)&v );
00524   CHECK_GL_ERROR
00525     return v;
00526 }
00527
00528
00529 BIAS::Vector3<float>
00530 OpenGLCanvasBase::Unproject(const wxPoint & pos2d, double & d)
00531 {
00532   double pos3d[3];
00533   GLint viewport[4];
00534   GLdouble modelview[16];
00535   GLdouble projection[16];
00536   GLfloat wx=pos2d.x, wy=pos2d.y, wz=1;
00537   GLint x=pos2d.x, y=pos2d.y; // non const version of pos2d
00538
00539   glGetIntegerv(GL_VIEWPORT, viewport);
00540   y=viewport[3]-y;
00541   wy=y;
00542   // get GL status matrices
00543   glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
00544   glGetDoublev(GL_PROJECTION_MATRIX, projection);
00545
00546   // acces Z buffer value at (x,y)
00547   glReadPixels(x, y, 1,1, GL_DEPTH_COMPONENT, GL_FLOAT, &wz);
00548
00549   // compute 3D pos by "unprojection":
00550   gluUnProject(wx,wy,wz,
00551     modelview,
00552     projection,
00553     viewport,
00554     &pos3d[0], &pos3d[1], &pos3d[2] );
00555
00556   //COUT("DBG "<<" wx="<<wx<<" wy="<<wy<<" wz="<<wz" pos3d= "<<pos3d);
00557
00558   d=wz;
00559   //d=0; // TODO: not correctly implemented !
00560
00561   // convert to float result:
00562   BIAS::Vector3<float> result(pos3d[0], pos3d[1], pos3d[2] );
00563   return result;
00564 }
00565
00566
00567 void OpenGLCanvasBase::ScreenShot(const std::string & filename,
00568                                   const bool & flipY,
00569                                   const GLenum & format,
00570                                   const bool &force8Bit )
00571 {
00572   int nChannels=3;
00573   if (format==GL_RGBA){
00574     nChannels=4;
00575   }
00576
00577   // create a temporary CPU memory image, assume three channel RGB for now.
00578   BIAS::ImageBase img(GetWidth(), GetHeight(), nChannels );
00579
00580   this->ScreenShot(img, flipY, format, force8Bit);
00581
00582   COUT("DBG "<<FUNCNAME<<" is writing "<<filename<<endl<<flush);
00583   int result = BIAS::ImageIO::ExportImage(filename, img );
00584   if (result!=0)
00585   {
00586     BIASERR("could not save "<<filename<<" result="<<result );
00587   }
00588 }
00589
00590
00591
00592 // JW
00593 void OpenGLCanvasBase::ScreenShot(BIAS::ImageBase & dest,
00594                                   const bool & flipY,
00595                                   const GLenum & format,
00596                                   const bool &force8Bit )
00597 {
00598   // adapt image size to screen area:
00599   // TODO: add similar "data area reesize really required" function to BIAS::Image
00600
00601   unsigned int channels=3;
00602   GLenum type = GL_UNSIGNED_BYTE;
00603   unsigned int ByteDepth=1;
00604   BIAS::ImageBase::EStorageType st=BIAS::ImageBase::ST_unsignedchar;
00605
00606   switch (format)
00607   {
00608   case GL_DEPTH_COMPONENT:
00609     if (!force8Bit)
00610     {
00611       // we need >=24 bits for depth maps (usually), so si use 32bit float
00612       ByteDepth=4;
00613       type=GL_FLOAT;
00614       st=BIAS::ImageBase::ST_float;
00615     }
00616   case GL_RED:
00617   case GL_GREEN:
00618   case GL_BLUE:
00619   case GL_ALPHA:
00620   case GL_LUMINANCE:
00621   case GL_STENCIL_INDEX:
00622     channels=1;
00623     break;
00624   case GL_LUMINANCE_ALPHA:
00625     channels=2;
00626     break;
00627   case GL_RGB:
00628   case GL_BGR_EXT:
00629     channels=3;
00630     break;
00631   case GL_RGBA:
00632   case GL_BGRA_EXT:
00633     channels=4;
00634     break;
00635   default:
00636     BIASERR("unsupported format");
00637   }
00638
00639   if ( (dest.GetWidth()  != this->GetWidth())
00640     || (dest.GetHeight() != this->GetHeight())
00641     || (dest.GetChannelCount() !=  channels) /* nr. of channels */
00642     || (dest.GetDepth() !=  ByteDepth) /* Byte per channel */
00643     )
00644   {
00645     if (!dest.IsEmpty()) {
00646       dest.Release();
00647     };
00648     dest.Init( this->GetWidth(), this->GetHeight(),
00649       channels,
00650       st,
00651       true /*interleaved*/
00652       );
00653   }
00654
00655   CHECK_GL_ERROR;
00656
00657   // copy data from GPU to CPU:
00658   // read a block from the framebuffer back to CPU
00659
00660   //if (!IsContextAvailable()) {
00661   //    BIASERR("skipped screenshot because no context available.");
00662   //    return;
00663   //}
00664
00665   this->SetCurrent();
00666   glFlush();
00667   glFinish();
00668   glReadPixels( GLint(0), GLint(0), // x,y from lower left
00669     GLsizei(this->GetWidth()), GLsizei( this->GetHeight()), // width, height
00670     format, // format,
00671     type, //type
00672     (GLvoid*)dest.GetImageData()
00673     );
00674   CHECK_GL_ERROR;
00675
00676   // flip vertically because of different texcoord systems between OpenGL and MIP?
00677   if (flipY) dest.Flip();
00678 }
00679
00680 // JW
00681 void OpenGLCanvasBase::ScreenShot()
00682 {
00683   static unsigned int savedNr=0;
00684   // get context bits:
00685   GLint red_bits=0;
00686   GLint green_bits=0;
00687   GLint blue_bits=0;
00688   GLint alpha_bits=0;
00689   GLint depth_bits=0;
00690   GLint stencil_bits=0;
00691   glGetIntegerv(GL_RED_BITS,     &red_bits);
00692   glGetIntegerv(GL_GREEN_BITS,   &green_bits);
00693   glGetIntegerv(GL_BLUE_BITS,    &blue_bits);
00694   glGetIntegerv(GL_ALPHA_BITS,   &alpha_bits);
00695   glGetIntegerv(GL_DEPTH_BITS,   &depth_bits);
00696   glGetIntegerv(GL_STENCIL_BITS, &stencil_bits);
00697
00698   // create unique filename
00699   stringstream ss;
00700   ss<<"out_screenshot_"
00701     <<"savedNr"<<BIAS::LeadingZeroString(savedNr,5)
00702     <<"_framecount"<<BIAS::LeadingZeroString(framecount_, 5)
00703     <<"_instance"<<BIAS::LeadingZeroString(instance_,2)
00704     ;
00705
00706   // save RGB tetxure
00707   if ((red_bits>0) || (green_bits>0) || (blue_bits>0)) {
00708     this->ScreenShot( ss.str() +string("_RGB") +string(BIAS_SCREENSHOT_DEFAULT_EXTENSION),
00709       true /*flip*/, GL_RGB );
00710   }
00711
00712   // save alpha map (if present)
00713   if (alpha_bits>0){
00714     this->ScreenShot( ss.str() +string("_ALPHA") +string(BIAS_SCREENSHOT_DEFAULT_EXTENSION),
00715       true /*flip*/, GL_ALPHA );
00716   }
00717   // save combined rgba
00718   if (red_bits>0 && green_bits>0 && blue_bits>0 && alpha_bits>0) {
00719     this->ScreenShot( ss.str() +string("_RGBA") +string(BIAS_SCREENSHOT_DEFAULT_EXTENSION),
00720       true /*flip*/, GL_RGBA );
00721   }
00722
00723
00724   // save depth map (if present)
00725   if (depth_bits>0){
00726     this->ScreenShot( ss.str() +string("_DEPTH") +string(BIAS_SCREENSHOT_DEFAULT_EXTENSION),
00727       true /*flip*/, GL_DEPTH_COMPONENT );
00728   }
00729
00730   // save stencil buffer (if present)
00731   if (stencil_bits>0){
00732     this->ScreenShot( ss.str() +string("_STENCIL") +string(BIAS_SCREENSHOT_DEFAULT_EXTENSION),
00733       true /*flip*/, GL_STENCIL_INDEX);
00734   }
00735
00736   savedNr++;
00737 }
00738
00739
00740 // JW
00741 void OpenGLCanvasBase::SetStatusText(const wxString& text, int c_field )
00742 {
00743   bool statbarOK=false;
00744   int field = c_field;
00745
00746   if (p_ownerframe!=NULL){
00747     if (p_ownerframe->GetStatusBar()!=NULL)
00748     {
00749       if (p_ownerframe->GetStatusBar()->GetFieldsCount()>field){
00750         // everything is fine
00751         statbarOK=true;
00752       } else {
00753         // status bar has not enough fields, disply to last field
00754         //#ifdef BIAS_DEBUG
00755         //        BIASERR("p_ownerframe has no only "
00756         //          <<p_ownerframe->GetStatusBar()->GetFieldsCount()
00757         //          <<" fields. could not display to field="<<field<<"!");
00758         //#endif // BIAS_DEBUG
00759         field = (p_ownerframe->GetStatusBar()->GetFieldsCount()) -1;
00760         statbarOK=true;
00761       }
00762     } else {
00763       BIASERR("p_ownerframe has no status bar!");
00764     }
00765     //} else {
00766     //  BIASERR("p_ownerframe is NULL!");
00767   };
00768
00769   if (statbarOK)
00770   {
00771     p_ownerframe->SetStatusText(text, field);
00772   } else {
00773     // fallback output
00774     cout<<field<<": "<<text<<endl;
00775   };
00776 }
00777
00778
00779 void
00780 OpenGLCanvasBase::ShowValue(const wxPoint & pos)
00781 {
00782   CHECK_GL_ERROR;
00783   std::stringstream s;
00784   double d=0.0;
00785   BIAS::Vector3<float> p3d(0,0,0);
00786   p3d = Unproject(pos, d);
00787   CHECK_GL_ERROR;
00788
00789   //get pixel value under mouse
00790   BIAS::Vector4<float> rgbGL;
00791   rgbGL = GetPixelValueRGBA(pos);
00792   CHECK_GL_ERROR;
00793   float depthGL= GetPixelValueDepth(pos);
00794   CHECK_GL_ERROR;
00795
00796   //s<<"2d: ";
00797   s<<"("<<pos.x<<";"<<pos.y<<") ";
00798   s<<"rgba=("
00799     <<std::setprecision(5)<<rgbGL[0]<<";"
00800     <<std::setprecision(5)<<rgbGL[1]<<";"
00801     <<std::setprecision(5)<<rgbGL[2]<<";"
00802     <<std::setprecision(5)<<rgbGL[3]<<") ";
00803
00804   s<<"depthGL="<<std::setprecision(5)<<depthGL<<" ";
00805
00806   s<<"3d: ";
00807   s<<"["<<p3d[0]<<";"<<p3d[1]<<";"<<p3d[2]<<"] ";
00808   s<<"dist. "<<d<<" ";
00809
00810 //#ifdef BIAS_DEBUG
00811 //  // display in console (for debugging, in small windows)
00812 //  cout<<s.str()<<endl;
00813 //#endif
00814
00815   SetStatusText(AsciiToWx(s.str()));
00816 }
00817
00818
00819 // computes and displays current FPS in status bar
00820 void OpenGLCanvasBase::ShowFPS(const int & framecounter,
00821                                const float & minUpdateIntervalSec,
00822                                const unsigned int & minNewFrames,
00823                                const unsigned int nField)
00824 {
00825   static float fps=0.0f;
00826   static clock_t start=clock(); // init once
00827   static unsigned int startFrameNo = framecounter;
00828
00829   // how many frames were drawn since last call:
00830   unsigned int nNewFrames = framecounter - startFrameNo;
00831   if (nNewFrames==0) {
00832     // no frames rendered, keep old value, do not update status bar
00833     return;
00834   } else if (nNewFrames<minNewFrames) {
00835     // too few frames for reliable measurement, keep old, do not update status bar
00836     return;
00837   };
00838
00839   // measure time and fps since last fps display
00840   clock_t stop=clock();
00841   clock_t duration = stop -start;
00842
00843   if (float(duration)==0){
00844     // do nothing, keep old value
00845     return;
00846   } else if (duration>=float(CLOCKS_PER_SEC)*minUpdateIntervalSec){
00847     //
00848     // OK
00849     //
00850
00851     // compute avg fps of the last nNewFrames images
00852     fps = (float)nNewFrames * float(CLOCKS_PER_SEC)/(float)duration;
00853
00854     //
00855     // prepare next measurement
00856     //
00857     // next start is this stop
00858     start=stop;
00859     startFrameNo = framecounter;
00860
00861     //
00862     // update status bar
00863     //
00864     stringstream ss;
00865     ss<<fps<<" fps "
00866       <<"("<<framecounter<<")."
00867       ;
00868     SetStatusText(AsciiToWx(ss.str()), nField);
00869   };
00870 }
00871
00872
00873
00874 // HACK: doing fullscreen on frame instead of canvas for now. (JW)
00875 // TODO: hide this, create frame directly around canvas, fullscreen
00876 void OpenGLCanvasBase::ToggleFullScreen()
00877 {
00878   if (p_ownerframe!=NULL) {
00879     long style=0;
00880     if (rendermode.drawbuffermode==BIAS::STEREO_CONSUMER_NV){
00881       // works only in true fullscreen,
00882       // thus all menu and statusbar need to be disabled!
00883       style = style | wxFULLSCREEN_ALL;
00884     }
00885     p_ownerframe->ShowFullScreen(
00886       !(p_ownerframe->IsFullScreen()),
00887       style
00888       |OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE
00889       //|wxFULLSCREEN_NOMENUBAR
00890       //|wxFULLSCREEN_NOTOOLBAR
00891       //|wxFULLSCREEN_NOSTATUSBAR
00892       //|wxFULLSCREEN_NOBORDER
00893       //|wxFULLSCREEN_NOCAPTION
00894       //|wxFULLSCREEN_ALL
00895       );
00896   }
00897 }
00898
00899
00900 void OpenGLCanvasBase::ShowFPS()
00901 {
00902   ShowFPS(this->framecount_,
00903     3.0f, /* sec, */
00904     1, /* nr of new frames */
00905     1 /* nField in status bar */
00906     );
00907 }
00908
00909
00910 ///
00911 /// EVT handlers: ------------------------------------------
00912 ///
00913
00914 void OpenGLCanvasBase::OnPaint( wxPaintEvent &WXUNUSED(event) )
00915 {
00916   // This is a dummy, to avoid an endless succession of paint messages.
00917   // OnPaint handlers must always create a wxPaintDC.
00918   wxPaintDC dc(this);
00919   Display();
00920 }
00921
00922
00923 void OpenGLCanvasBase::OnSize(wxSizeEvent& )
00924 {
00925   Reshape();
00926 }
00927
00928
00929 std::ostream & OpenGLCanvasBase::PrintHelp(std::ostream & os)
00930 {
00931   os<<"key function assignment:"<<endl
00932     <<"F1\t this help"<<endl
00933     <<"F10, INSERT, p\t Screenshot"<<endl
00934     <<"z,y\tPOINT rendering mode"<<endl
00935     <<"x\tLINE polygon rendering mode (wireframe)"<<endl
00936     <<"c\tFILL polygon rendering mode (vertices)"<<endl
00937     <<"v\tFILL front, LINE back polygon rendering mode"<<endl
00938     <<"Z,Y\tSMOOTH shading mode"<<endl
00939     <<"X\tFLAT shading mode"<<endl
00940     <<"i\tInformation, e.g. on OpenGL status"<<endl
00941     <<"k\t toggle culling back  sides"<<endl
00942     <<"K\t toggle culling front sides"<<endl
00943     <<"L\t toggle culling front and back sides, "<<endl
00944     <<" \t =draw only LINES and POINTS, no faces at all."<<endl
00945     <<"]\t increase pointsize (++)"<<endl
00946     <<"[\t decrease pointsize (--)"<<endl
00947     <<"s\tstop animation (halt)"<<endl
00948     <<"a\tanimate=run animation"<<endl
00949     <<"f,F\ttoggle Fullscreen modus (of the frame)"<<endl
00950     <<"V\ttoggle VSYNC swap control on/off"<<endl
00951     ;
00952   return os;
00953 }
00954
00955
00956 //JW
00957 void OpenGLCanvasBase::OnChar(wxKeyEvent& event)
00958 {
00959   switch (event.GetKeyCode())
00960   {
00961   case WXK_F1: /* popup simple help */
00962     {
00963       stringstream ss;
00964       PrintHelp(ss);
00965       ::wxMessageBox(AsciiToWx(ss.str()), wxT("Help"), wxICON_INFORMATION | wxOK );
00966       break;
00967     }
00968 #ifdef BIAS_HAVE_STEREOI
00969   case WXK_F3:
00970     //StereoI_Init();
00971     StereoI_GetInfo();
00972     break;
00973 #endif // BIAS_HAVE_STEREOI
00974   case WXK_PRINT: /* is ignored on WinXP, thus assign other keys, too. (jw) */
00975   case 'p':
00976   case WXK_F10:
00977     SetStatusText(wxT("saving screenshot."));
00978     this->ScreenShot(); break;
00979     //case WXK_F5: // toggles idleRepaintEnabled
00980     //  {
00981     //      idleRepaintEnabled = !idleRepaintEnabled ;
00982     //      stringstream ss;
00983     //      ss<<"Toggled idleRepaintEnabled="<<idleRepaintEnabled;
00984     //      // TODO: Disconnect, GetEventHandler
00985     //      this->GetEventHandler()->Disconnect( ID, wxID_ANY, EVT_IDLE);
00986     //      cout<<ss.str()<<endl;
00987     //      SetStatusText( ss.str().c_str() );
00988     //      break;
00989     //  }
00990   case 'z': /* english keyboard */
00991   case 'y': /* german keyboard */
00992     rendermode.polygonmodeFRONT=GL_POINT;
00993     rendermode.polygonmodeBACK=GL_POINT;
00994     SetStatusText(wxT("PolygonMode POINT"));
00995     Display();
00996     break;
00997   case 'x':  /* wireframe */
00998     rendermode.polygonmodeFRONT=GL_LINE;
00999     rendermode.polygonmodeBACK=GL_LINE;
01000     SetStatusText(wxT("PolygonMode LINE"));
01001     Display();
01002     break;
01003     break;
01004   case 'c':
01005     rendermode.polygonmodeFRONT=GL_FILL;
01006     rendermode.polygonmodeBACK=GL_FILL;
01007     SetStatusText(wxT("PolygonMode FILL"));
01008     Display();
01009     break;
01010   case 'v':
01011     // useful to debug culling
01012     rendermode.polygonmodeFRONT=GL_FILL;
01013     rendermode.polygonmodeBACK=GL_LINE;
01014     SetStatusText(wxT("PolygonMode: front=FILL, back=LINE"));
01015     Display();
01016     break;
01017   case 'Z':
01018   case 'Y':
01019     rendermode.shademodel=GL_SMOOTH;
01020     SetStatusText(wxT("SMOOTH shading"));
01021     Display();
01022     break;
01023   case 'X':
01024     rendermode.shademodel=GL_FLAT;
01025     SetStatusText(wxT("FLAT shading"));
01026     Display();
01027     break;
01028   case 'k':
01029     // backface culling = right hand order to viewer is drawn
01030     if (rendermode.cullface==GL_BACK)
01031       rendermode.enable_cullface = !(rendermode.enable_cullface); // toggle
01032     else
01033       rendermode.enable_cullface = true;
01034     rendermode.cullface=GL_BACK;
01035     if (rendermode.enable_cullface)
01036       SetStatusText(wxT("enabled culling BACK sides (clockwise ordering) "));
01037     else
01038       SetStatusText(wxT("disabled culling."));
01039     Display();
01040     break;
01041   case 'K':
01042     if (rendermode.cullface==GL_FRONT)
01043       rendermode.enable_cullface = !(rendermode.enable_cullface); // toggle
01044     else
01045       rendermode.enable_cullface = true;
01046     rendermode.cullface=GL_FRONT;
01047     if (rendermode.enable_cullface)
01048       SetStatusText(wxT("enabled culling FRONT sides (counterclockwise ordering) "));
01049     else
01050       SetStatusText(wxT("disabled culling. "));
01051     Display();
01052     break;
01053   case 'L':
01054     if (rendermode.cullface==GL_FRONT_AND_BACK)
01055       rendermode.enable_cullface = !(rendermode.enable_cullface); // toggle
01056     else
01057       rendermode.enable_cullface = true;
01058     rendermode.cullface=GL_FRONT_AND_BACK;
01059     // unusual: culling all faces, only lines and points ar drawn!
01060     if (rendermode.enable_cullface)
01061       SetStatusText(wxT("warning: Culling front and back. No faces are drawn, only LINES and POINTS are drawn, no polygones!"));
01062     else
01063       SetStatusText(wxT("disabled culling."));
01064     Display();
01065     break;
01066   case 'i': /* show information */
01067     {
01068       stringstream ss;
01069       this->GetInfoGL(ss);
01070       cout<<ss.str()<<endl;
01071       // this window is too big, add wxDialog with scrollable text control
01072       //::wxMessageBox(wxString(ss.str().c_str()), "Information", wxICON_INFORMATION | wxOK );
01073       ::wxMessageBox(wxT("see cout for information on current OpenGL status."), wxT("Information"), wxICON_INFORMATION | wxOK );
01074       break;
01075     }
01076   case ']':
01077     {
01078       if (rendermode.pointsize<63.0f) rendermode.pointsize++;
01079       BIASASSERT(rendermode.pointsize>=1.0f);
01080       BIASASSERT(rendermode.pointsize<=63.0f);
01081       stringstream ss;
01082       ss<<"increased pointsize to "<<rendermode.pointsize;
01083       SetStatusText( AsciiToWx(ss.str()) ); break;
01084     }
01085   case '[':
01086     {
01087       if (rendermode.pointsize>1.0f) {
01088         rendermode.pointsize--;
01089       }
01090       BIASASSERT(rendermode.pointsize>=1.0f);
01091       BIASASSERT(rendermode.pointsize<=63.0f);
01092       stringstream ss;
01093       ss<<"decreased pointsize to "<<rendermode.pointsize;
01094       SetStatusText( AsciiToWx(ss.str()) ); break;
01095     }
01096   case 's':
01097     animationUpdateEnabled =false;
01098     SetStatusText(wxT("stopped animation"));    break;
01099   case 'a':
01100     animationUpdateEnabled = true;
01101     SetStatusText(wxT("animation running"));    break;
01102   case 'f':
01103   case 'F':
01104     ToggleFullScreen(); break;
01105   case 'V':
01106     {
01107       string msg;
01108       if (!ToggleVSync()){
01109         // error
01110         msg="toggling failed. still: ";
01111         BIASERR("toggling VSync failed. Please verify: "<<endl
01112           <<"  -application controlled vsync should be set in driver tab on WIN32"<<endl
01113           <<"  -Nvidia Stereo driver may override vsync (for shutter glasses)"<<endl );
01114       }
01115       if (GetVSync())
01116         msg+="VSYNC enabled";
01117       else
01118         msg+="VSYNC disable";
01119       COUT(msg<<endl);
01120       SetStatusText(AsciiToWx(msg));
01121       break;
01122     }
01123   }; // end of switch keycode
01124   // always skip keycodes because parent canvases may use them, too - e.g. for menu short cuts.
01125   event.Skip();
01126 }
01127
01128
01129 void OpenGLCanvasBase::OnEraseBackground(wxEraseEvent& )
01130 {
01131   // do nothing (with intention) to help avoid flashing
01132 }
01133
01134
01135 void OpenGLCanvasBase::SetVSync( const bool & trueForOn )
01136 {
01137   if (trueForOn)
01138     SettingsGL::SetVSyncInterval( int(1) );
01139   else
01140     SettingsGL::SetVSyncInterval( int(0) );
01141 }
01142
01143
01144 bool OpenGLCanvasBase::GetVSync()
01145 {
01146   return (SettingsGL::GetVSyncInterval() != int(0) );
01147 }
01148
01149
01150 bool OpenGLCanvasBase::ToggleVSync()
01151 {
01152   bool act = GetVSync();
01153   SetVSync( !act ); // try to toggle
01154   // did the status really change?
01155   return (act!= GetVSync() );
01156 }
01157
01158
01159 void OpenGLCanvasBase::UpdateTime()
01160 {
01161   time = double(clock()) / double(CLOCKS_PER_SEC);
01162 }
01163
01164 bool OpenGLCanvasBase::ToggleIP(bool & value){
01165   value = !value;
01166   return value;
01167 }
01168
01169
01170 // JW
01171 #ifdef BIAS_HAVE_STEREOI
01172 int OpenGLCanvasBase::StereoI_Init()
01173 {
01174   if (g_pStereoAPI!=NULL){
01175     BIASERR("StereoI API already initialized through g_pStereoAPI."<<endl
01176       <<"\tinterface creation should be called once, only. aborting." );
01177     return -1;
01178   };
01179   // must be NULL to use interface only once.
01180   BIASASSERT(g_pStereoAPI==NULL);
01181   if(!CreateStereoI(&g_pStereoAPI)){
01182     BIASERR("CreateStereoI failed. Did you install NVStereo and Nvidia GPU drivers? aborting.");
01183     g_pStereoAPI = NULL;
01184     return -2;
01185   };
01186   BIASASSERT(g_pStereoAPI!=NULL);
01187   if (g_pStereoAPI->GetStereoState() == STEREO_STATE_DISABLED){
01188     BIASERR("Stereo is currently DISABLED.  Did you install enable NVStereo in the driver control panel?");
01189     return -3;
01190   }
01191
01192   // be verbose on current status:
01193   StereoI_GetInfo();
01194
01195   return 0; // OK=success
01196 }
01197
01198
01199 /* catch missing initializations
01200 and insert assertion on NULL ptr */
01201 StereoI* Get_pStereoAPI(){
01202   if (g_pStereoAPI==NULL)
01203     OpenGLCanvasBase::StereoI_Init();
01204   if (g_pStereoAPI==NULL){
01205     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01206     return NULL;
01207   }
01208   BIASASSERT(g_pStereoAPI!=NULL);
01209   return g_pStereoAPI;
01210 }
01211
01212
01213 void OpenGLCanvasBase::StereoI_GetInfo(std::ostream &os)
01214 {
01215   if (Get_pStereoAPI()==NULL)
01216   {
01217     StereoI_Init();
01218     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01219     return;
01220   }
01221   os<<"*StereoI state is:"<<endl;
01222   int tmp=0;
01223   os<<"CheckAPIVersion >=1: "<<bool(Get_pStereoAPI()->CheckAPIVersion(1)>=0)<<endl;
01224
01225   tmp=Get_pStereoAPI()->GetStereoState();
01226   switch (tmp){
01227     case STEREO_STATE_ENABLED:
01228       os<<"STEREO_STATE_ENABLED"<<endl;
01229       break;
01230     case STEREO_STATE_DISABLED:
01231       os<<"STEREO_STATE_DISABLED"<<endl;
01232     default:
01233       {
01234         stringstream ss;
01235         ss<<"STEREO_STATE="<<tmp<<" is unknown.";
01236         BIASERR(ss.str());
01237         break;
01238       }
01239   };
01240   os<<"Separation:  "<<Get_pStereoAPI()->GetSeparation()<<endl;
01241   os<<"Convergence: "<<Get_pStereoAPI()->GetConvergence()<<endl;
01242 }
01243
01244
01245 // simple wrappers:
01246 int OpenGLCanvasBase::StereoI_GetStereoState()
01247 {
01248   if (Get_pStereoAPI()==NULL)   {
01249     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01250     return 0.0f;
01251   }
01252   return Get_pStereoAPI()->GetStereoState();
01253 }
01254 int OpenGLCanvasBase::StereoI_SetStereoState(const int & val)
01255 {
01256   if (Get_pStereoAPI()==NULL)   {
01257     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01258     return 0.0f;
01259   }
01260   return Get_pStereoAPI()->SetStereoState(val);
01261 }
01262 float OpenGLCanvasBase::StereoI_GetSeparation()
01263 {
01264   if (Get_pStereoAPI()==NULL)   {
01265     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01266     return 0.0f;
01267   }
01268   return Get_pStereoAPI()->GetSeparation();
01269 }
01270 float OpenGLCanvasBase::StereoI_SetSeparation(const float & val)
01271 {
01272   if (Get_pStereoAPI()==NULL)   {
01273     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01274     return 0.0f;
01275   }
01276   return Get_pStereoAPI()->SetSeparation(val);
01277 }
01278 float OpenGLCanvasBase::StereoI_GetConvergence()
01279 {
01280   if (Get_pStereoAPI()==NULL)   {
01281     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01282     return 0.0f;
01283   }
01284   return Get_pStereoAPI()->GetConvergence();
01285 }
01286 float OpenGLCanvasBase::StereoI_SetConvergence(const float & val)
01287 {
01288   if (Get_pStereoAPI()==NULL)   {
01289     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01290     return 0.0f;
01291   }
01292   return Get_pStereoAPI()->SetConvergence(val);
01293 }
01294 void OpenGLCanvasBase::StereoI_CaptureStereoImage(const int & format,
01295                                                   const int & quality)
01296 {
01297   if (Get_pStereoAPI()==NULL)   {
01298     BIASERR("StereoI API not avaible through g_pStereoAPI.");
01299     return;
01300   }
01301   return Get_pStereoAPI()->CaptureStereoImage(format, quality);
01302 }
01303 #endif // BIAS_HAVE_STEREOI
01304
01305
01306
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/OpenGLCanvasBase.hh Source File

Gui

OpenGLCanvasBase.hh

Go to the documentation of this file.
00001 #ifndef __OpenGLCanvasBase_hh__
00002 #define __OpenGLCanvasBase_hh__
00003
00004 /** \author Jan Woetzel 01/2003 - 10/2005 */
00005 #include <bias_config.h>
00006 #ifndef BIAS_HAVE_WXWINDOWS
00007 #  error Please recompile BIAS with USE_WXWINDOWS to use this lib.
00008 #endif // BIAS_HAVE_WXWINDOWS
00009
00010 #ifndef BIAS_HAVE_OPENGL
00011 #  error Please recompile BIAS with USE_OPENGL to use this file.
00012 #endif // BIAS_HAVE_OPENGL
00013
00014 //#ifndef BIAS_HAVE_GLEW
00015 //#  error Please recompile BIAS with USE_GLEW to use this file.
00016 //#endif // BIAS_HAVE_GLEW
00017
00018
00019 // avoid VS 2005 deprecated warnings
00020 #ifndef _CRT_SECURE_NO_DEPRECATE
00021 #  define _CRT_SECURE_NO_DEPRECATE
00022 #endif
00023
00024 // must be first
00025 #include <Gui/biasgl.h>
00026 #include <wx/glcanvas.h>
00027
00028 // STD
00029 #include <vector>
00030 #include <iostream>
00031 #include <iomanip>
00032
00033 // BIAS
00034 #include <Base/Debug/Error.hh>
00035 #include <Base/Debug/DebugSimple.hh>
00036 #include <Base/Math/Vector3.hh>
00037 #include <Base/Math/Vector4.hh>
00038 #include <Base/Image/Image.hh>
00039 #include <Gui/StringConv.hh>
00040
00041 // WX
00042 #include <wx/wx.h>
00043 #include <wx/image.h>
00044
00045
00046 #include <Gui/RenderModeGL.hh>
00047 #ifdef BIAS_HAVE_FONTGL
00048 #  include <Gui/DrawTextGL.hh>
00049 #endif
00050
00051
00052 // true: start with theoretically auto update of time
00053 #ifndef OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled
00054 #  define OPENGLCANVASBASE_DEFAULT_animationUpdateEnabled true
00055 #endif
00056
00057 // default fileformat used by screenshot function:
00058 #ifndef BIAS_SCREENSHOT_DEFAULT_EXTENSION
00059 #  define BIAS_SCREENSHOT_DEFAULT_EXTENSION ".mip"
00060 #endif
00061
00062
00063 #define OpenGLCanvasBase_DEFAULT_FULLSCREEN_STYLE  wxFULLSCREEN_NOMENUBAR|wxFULLSCREEN_NOTOOLBAR|wxFULLSCREEN_NOSTATUSBAR|wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION|wxFULLSCREEN_ALL
00064
00065
00066 // some exp. beta drivers don't expose their "hidden" capabilities
00067 // bypass extension query and force "on" for all extensions.
00068 // in general this setting is *NOT* recommended!!! (JW)
00069 //#define USE_EXPERIMENTAL_SETTING_GLEW
00070
00071
00072 namespace BIAS {
00073
00074   /**  helper to simplify setting up format "red,green,blue,alpha,depth" JW
00075   to be used as (int*)&attribsRGBAD JW */
00076   const int attribsRGBAD[] = {  WX_GL_RGBA,
00077     WX_GL_MIN_RED, 1,
00078     WX_GL_MIN_GREEN, 1,
00079     WX_GL_MIN_BLUE, 1,
00080     WX_GL_MIN_ALPHA, 1,
00081     WX_GL_STENCIL_SIZE, 0,
00082     WX_GL_DEPTH_SIZE, 1,
00083     WX_GL_DOUBLEBUFFER,
00084     0
00085   };
00086
00087     /**  helper to simplify setting up format "red,green,blue,alpha,stencil,depth" JW
00088   to be used as (int*)&attribsRGBASD JW */
00089   const int attribsRGBASD[] = {  WX_GL_RGBA,
00090     WX_GL_MIN_RED, 1,
00091     WX_GL_MIN_GREEN, 1,
00092     WX_GL_MIN_BLUE, 1,
00093     WX_GL_MIN_ALPHA, 1,
00094     WX_GL_STENCIL_SIZE, 1,
00095     WX_GL_DEPTH_SIZE, 1,
00096     WX_GL_DOUBLEBUFFER,
00097     0
00098   };
00099
00100
00101     /**
00102     @class OpenGLCanvasBase
00103     @ingroup g_gui
00104     @brief base class for OpenGL canvases you could derive from to get base functionality (JW)
00105
00106     Has minimal dependencies and minimal event interceptions, just functionality.
00107     Use a derrived class for automatic event handling.
00108     Supports shared GL context.
00109     The idea is that you usually just need to derive and reimplement the DisplayCalls() routine.
00110     This clas is
00111     -NOT writing mous epos value to status bar
00112     -NOT updating periodically.
00113     See OpenGLCanvas for an extended version.
00114     // TODO: page flipping stereo for windows mode (no fullscreen)
00115     // TODO: handle multiple rendering contexts with different caabilites (e.g 2 differen GPUs) using "GLEW MX"
00116     // TODO: add application controlled VSYNC enable/disable
00117     // TODO: add application controlled antialiasing settings
00118     // TODO: add keys for switching between 3D stereo rendering modes
00119     // TODO: Rendertexture and Framebufferobject support?
00120     // TODO: support for shared display lists and vertex buffer objects (VBO,VAR)?
00121
00122   Use the attriblist like RGBASD for setting the correct pixel formato rliek this:
00123   \verbatim
00124    int attriblist[] =  {
00125       WX_GL_RGBA,
00126       WX_GL_MIN_RED, 1,
00127       WX_GL_MIN_GREEN, 1,
00128       WX_GL_MIN_BLUE, 1,
00129       WX_GL_MIN_ALPHA, 1,
00130       WX_GL_STENCIL_SIZE, 1,
00131       WX_GL_DOUBLEBUFFER,
00132       0
00133   };
00134   \endverbatim
00135
00136     \mainpage OpenGLCanvasBase and its child classes can be used for OpenGL GUI development.
00137     \author     Jan Woetzel */
00138     class BIASGui_EXPORT OpenGLCanvasBase : public wxGLCanvas
00139     {
00140     public:
00141         virtual ~OpenGLCanvasBase(); ///< destructor
00142
00143         // ctors
00144         OpenGLCanvasBase(
00145             wxFrame* parent
00146             ,wxWindowID id = -1
00147             ,const wxPoint& pos = wxDefaultPosition
00148             ,const wxSize& size = wxDefaultSize
00149             ,long style = 0
00150             ,const wxString& name = AsciiToWx("OpenGLCanvasBase")
00151             ,int* attribList = NULL
00152             ,const wxPalette& palette = wxNullPalette
00153             );
00154
00155         ///
00156         /// constructor using a shared context
00157         OpenGLCanvasBase(
00158             wxFrame* parent
00159             ,wxGLContext* sharedContext = NULL
00160             ,wxWindowID id = -1
00161             ,const wxPoint& pos = wxDefaultPosition
00162             ,const wxSize& size = wxDefaultSize
00163             ,long style=0
00164             ,const wxString& name=AsciiToWx("OpenGLCanvasBase")
00165             ,int* attribList = NULL
00166             ,const wxPalette& palette = wxNullPalette
00167             );
00168
00169
00170         /// any constructor should call this function
00171         /// to initialize all data members (e.g. pointers to NULL)
00172         virtual void InitMembers();
00173
00174         /// init all things that need a context.
00175         /// sets _InitWithContextDone
00176         virtual void InitWithContext();
00177
00178     /// expands parents SwapBUffers by automatic framecount increase
00179     void SwapBuffers();
00180
00181         /**
00182         main display call to be overridden by child classes
00183         usually displays:
00184         -InitWithContext (must be done and must eb first because setting up context may take some time while display is not setup correctly!)
00185         -Clear
00186         -Camera/virtual view
00187         -Geometry
00188         Implements instance
00189         @author Jan Woetzel.
00190         */
00191         virtual void Display();
00192
00193         virtual void DisplayCalls();
00194
00195         /// display default shade model, polygon mode,
00196         virtual void DisplayRenderMode();
00197
00198         /** pop up keyboard layout help. Mut ebe virtualto let child class add their bindings */
00199         virtual std::ostream & PrintHelp(std::ostream & os);
00200
00201         /// useful for quadbuffered stereo, e.g. shutetr glasses
00202         void DisplaySelectBuffer();
00203
00204         /// clears buffers and resets virtual camera to identity
00205         virtual void DisplayClear();
00206
00207         /// display soem very simple Gl calls to draw something at all
00208         static void DisplaySampleScene();
00209
00210         // coordinate cross for orientation
00211         //static
00212     void DisplayCoordCross(const float & size=1.0f, const float & linewidth=1.0f);
00213
00214
00215         ///
00216         /// change of size and aspect ratio.
00217         virtual void Reshape();
00218
00219         /// return GL state information
00220         virtual void GetInfoGL(std::ostream & os);
00221
00222         /* onscreen read pixel values JW */
00223         BIAS::Vector3<float> GetPixelValueRGB(const wxPoint & pos2d);
00224         BIAS::Vector4<float> GetPixelValueRGBA(const wxPoint & pos2d);
00225
00226         /* @return Z value at 2d screen position JW */
00227         float GetPixelValueDepth(const wxPoint & pos2d) const;
00228
00229         /// activates the current rendereing context if there is one
00230         /// and @return true if gl rendering context is available, false if there is none available (yet).
00231         bool IsContextAvailable();
00232
00233         /** computes 3D coordinate from 2D+Z by "unprojection" JW */
00234         BIAS::Vector3<float> Unproject(const wxPoint & pos2d, double & d);
00235
00236         //void SetStatusText(const wxString& text, int field = 0);
00237
00238         unsigned int GetWidth() const;
00239
00240         unsigned int GetHeight() const;
00241
00242         /** GetAspectRatio is X/Y */
00243         float GetAspectRatio() const;
00244
00245         /** shows FPS to status bar base don frame counter and last call to this function
00246         Measures and updates only, if two conditions ar eboth met:
00247         1. at least minUpdateIntervalSec seconds have passed since prvious update
00248         2. at least minNewFrames were drawn since a previous update
00249         Shouls handle multiplem, shared contextst correctly (jw).
00250         JW */
00251         void ShowFPS(const int & framecounter,
00252             const float & minUpdateIntervalSec,
00253             const unsigned int & minNewFrames,
00254             const unsigned int nField);
00255         /// simple interface for the above
00256         void ShowFPS();
00257
00258         /** vertical sync control on or off (VSYNC)  JW*/
00259         static void SetVSync( const bool & trueForOn );
00260
00261         /** @return true if vertical sync is enable,
00262         false for free running mode JW */
00263         static bool GetVSync();
00264
00265         /** try to toggle VSync setting.
00266         @return true if toggling worked, false if status persisted. */
00267         static bool ToggleVSync();
00268
00269         void OnPaint( wxPaintEvent &event );
00270         void OnSize(wxSizeEvent& event);
00271         void OnEraseBackground(wxEraseEvent& event);
00272         virtual void OnChar(wxKeyEvent& event);
00273
00274
00275         /* make an (onscreen) screenshot JW */
00276         // TODO: maybe change arg to ImageBase
00277         void ScreenShot(BIAS::ImageBase & dest,
00278       const bool & flipY=true,
00279       const GLenum & format=GL_RGB,
00280       const bool &force8Bit=false);
00281
00282         void ScreenShot(const std::string & filename,
00283       const bool & flipY=true,
00284       const GLenum & format=GL_RGB,
00285       const bool &force8Bit=false);
00286
00287         /** JW automatic screenshot to file with filename based on frame, instance etc. JW */
00288         void ScreenShot();
00289
00290         unsigned long GetFrameCount() const {return framecount_; };
00291         void SetFrameCount(const unsigned long & newVal) {framecount_ =newVal; };
00292
00293         wxFrame* GetOwnerframe();
00294
00295         void SetOwnerframe(wxFrame* ptr);
00296
00297         /** let an OpenGL canvas use the status bar of the containing frame and cout as fallback (JW) */
00298         void SetStatusText(const wxString& text, const int c_field=0 );
00299
00300         void ShowValue(const wxPoint & pos);
00301
00302         /* toggles between Fullscreen mode (of the frame).
00303         This is a hack to make fullscreen work for singel canvas frames. JW */
00304         void ToggleFullScreen();
00305
00306     /** helper toggling a bool value in place
00307     @return new value JW */
00308     static bool ToggleIP(bool & value);
00309
00310
00311     /// sets the internal time param, by default based on realtime wall clock
00312     virtual void UpdateTime();
00313
00314
00315 #ifdef BIAS_HAVE_STEREOI
00316         /** interace to NVidias consumer Stereo NVStereo driver API.
00317         to enable/disbale stereo and control convergence and separation for stereo rendering
00318         @return 0 on success, negative on error.
00319         @author Jan Woetzel */
00320         static int   StereoI_Init();
00321
00322         /** query status information on current NVStereo rendering state JW */
00323         static void StereoI_GetInfo(std::ostream &os=std::cout);
00324
00325         /** wrappers for StereoI interface */
00326         static int   StereoI_GetStereoState();
00327         static int   StereoI_SetStereoState(const int & val);
00328         static float StereoI_GetSeparation();
00329         static float StereoI_SetSeparation(const float & val);
00330         static float StereoI_GetConvergence();
00331         static float StereoI_SetConvergence(const float & val);
00332         /* 0 for Jpeg, 1 for png,
00333         Stereo images are dumped to [RootDir]\NVSTEREO.IMG JW */
00334         static void StereoI_CaptureStereoImage(const int & format, const int & quality);
00335
00336 #endif // BIAS_HAVE_STEREOI
00337
00338
00339     public:
00340         // global time, useful for animation:
00341         static double time;
00342         // true to set time automatically based on real time or display counter (in child classes)
00343         static bool animationUpdateEnabled;
00344
00345     protected:
00346
00347         // seq. frame counter=nr. of Display call.
00348         unsigned long framecount_;
00349
00350         // pointer to avaible frame for output etc (if there is one), NULL otherwise.
00351         wxFrame * p_ownerframe;
00352
00353         // internally used for intializing once when GL conetxt is available
00354         bool InitWithContextDone_;
00355         // instance counter
00356         unsigned int instance_;
00357         static unsigned int instancesTotalNo_;
00358
00359         // GL status changeable through keys:
00360         BIAS::RenderModeGL rendermode;
00361
00362         // useful for text output:
00363         // TODO: Linux version (JW)
00364 #ifdef BIAS_HAVE_FONTGL
00365         BIAS::DrawTextGL * p_font;
00366 #endif
00367
00368         DECLARE_EVENT_TABLE()
00369
00370     }; // OpenGLCanvasBase
00371
00372 } // namespace BIAS
00373 #endif
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Operators.cpp Source File

Base » Image

Operators.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Image/Image.hh>
00026 #include <Base/Image/ImageConvert.hh>
00027
00028 // disabled warnings
00029 #include <Base/Common/BIASpragma.hh>
00030
00031
00032 namespace BIAS {
00033
00034 //////////////////////////////////////////////////////////////////////////////
00035 //
00036 // Assignment Operator
00037 //
00038 //////////////////////////////////////////////////////////////////////////////
00039
00040 template <class StorageType>
00041 Image<StorageType>& Image<StorageType>::operator=(const ImageBase& Source)
00042 {
00043 #ifdef BIAS_DEBUG
00044   _liDebugLevel = Source.GetDebugLevel();
00045   BIASGDOUT(D_IMAGE_TRACE,
00046             "called Image::operator=(const ImageBase& Source)"
00047             <<" source->GetStorageType = "<<Source.GetStorageType()
00048             <<" this->GetStorageType   = "<<GetStorageType()
00049             <<" this->TemplateType     = "<<PRINTTYPE(StorageType));
00050 #endif
00051   if (GetStorageType()==Source.GetStorageType())
00052     this->ImageBase::operator=(Source);
00053   else {
00054     BIAS::ImageConvert::ConvertST(Source,*this,GetStorageType());
00055     BIASERR("Images have different storage type. Use ConvertST()");
00056   }
00057   return *this;
00058 }
00059
00060
00061 //////////////////////////////////////////////////////////////////////////////
00062 //
00063 //
00064 //   Defining Operators -, -= ,+ ,+= ,* ,*= ,/ ,/= for both a scalar argument and an image
00065 //
00066 //   These operators are templated, so the work only on arguments of the same
00067 //   type as the image itself.
00068 //
00069 //   The division operators have an addition a test for
00070 //      - a zero scalar as argument
00071 //      - for zero values in an argument image (if MIP_BOUNCE_CHECK is defined)
00072 //
00073 //
00074 //////////////////////////////////////////////////////////////////////////////
00075
00076 //
00077 // As long as color images are not supported, exit if operation is tried on non-gray images
00078 //
00079 #ifdef BIAS_DEBUG
00080 #define GRAYTEST(OPERATOR) \
00081 if (GetChannelCount() != 1) { \
00082   BIASERR("Operation " << OPERATOR << " is only defined on gray images. Leaving images unchanged! Aborting!"); \
00083   BIASBREAK;\
00084   exit(-1); \
00085 }
00086 #else
00087 #define GRAYTEST(OPERATOR)
00088 #endif
00089
00090
00091 //////////////////////////////////////////////////////////////////////////////
00092
00093
00094 /// Test the the dimensions of the ROI of two images. If both have none
00095 /// test the dimensions of the whole image
00096 /// Abort in any case of error.
00097 template <class StorageType>
00098 inline bool HaveImagesMatchingROI(const Image<StorageType>& i1,
00099                                   const Image<StorageType>& i2)
00100 {
00101   // Test for matching dimensions of ROI
00102   if ( ( (i1.GetROILowerRightX() - i1.GetROIUpperLeftX()) !=
00103          (i2.GetROILowerRightX() - i2.GetROIUpperLeftX()) ) ||
00104        ( (i1.GetROILowerRightY() - i1.GetROIUpperLeftY()) !=
00105          (i2.GetROILowerRightY() - i2.GetROIUpperLeftY()) ) ) {
00106     BIASERR("Computation not possible: 'Region Of Interest' do not "
00107             <<"match in size! Aborting!");
00108     i1.PrintROI();
00109     i2.PrintROI();
00110     return false;
00111   }
00112   return true;
00113 }
00114
00115
00116 //////////////////////////////////////////////////////////////////////////////
00117 //
00118 // The unary operators on pixel values of an image using a scalar
00119 //
00120 //////////////////////////////////////////////////////////////////////////////
00121
00122 /** Operator += with scalar on pixel values of an image */
00123 template <class StorageType>
00124 Image<StorageType>& Image<StorageType>::operator+= (const StorageType& Value)
00125 {
00126   GRAYTEST("+=");
00127
00128   unsigned int minx, miny, maxx, maxy;
00129   GetROICorners(minx, miny, maxx, maxy);
00130   register int width=(int)GetWidth(), step=width-maxx+minx;
00131   /*register*/ StorageType *p=GetImageData()+width*miny+minx;
00132   /*register*/ StorageType *le=GetImageData()+width*miny+maxx;
00133   /*register*/ StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00134   while (p<e){
00135     while (p<le){ // walk one line
00136       //*p++ += Value;
00137
00138       (*p) += (Value);
00139       //*p = *p + Value;
00140
00141       *p++;
00142     }
00143     le+=width; // skip to beginning of next line
00144     p+=step;
00145   }
00146
00147   return *this;
00148 }
00149
00150
00151 /** Operator -= with scalar on pixel values of an image */
00152 template <class StorageType>
00153 Image<StorageType>& Image<StorageType>::operator-= (const StorageType& Value)
00154 {
00155   GRAYTEST("-=");
00156
00157   unsigned int minx, miny, maxx, maxy;
00158   GetROICorners(minx, miny, maxx, maxy);
00159   register int width=(int)GetWidth(), step=width-maxx+minx;
00160   register StorageType *p=GetImageData()+width*miny+minx;
00161   register StorageType *le=GetImageData()+width*miny+maxx;
00162   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00163   while (p<e){
00164     while (p<le){ // walk one line
00165       *p++ -= Value;
00166     }
00167     le+=width; // skip to beginning of next line
00168     p+=step;
00169   }
00170
00171   return *this;
00172 }
00173
00174
00175 /** Operator *= with scalar on pixel values of an image */
00176 template <class StorageType>
00177 Image<StorageType>& Image<StorageType>::operator*= (const StorageType& Value)
00178 {
00179   GRAYTEST("*=");
00180
00181   unsigned int minx, miny, maxx, maxy;
00182   GetROICorners(minx, miny, maxx, maxy);
00183   register int width=(int)GetWidth(), step=width-maxx+minx;
00184   width *= GetChannelCount();
00185   step  *= GetChannelCount();
00186   register StorageType *p  = GetImageData()+width*miny +minx;
00187   register StorageType *le = GetImageData()+width*miny +maxx;
00188   register StorageType *e  = GetImageData()+width*(maxy-1) +maxx;
00189   while (p<e){
00190     while (p<le){ // walk one line
00191       *p++ *= Value;
00192     }
00193     le+=width; // skip to beginning of next line
00194     p+=step;
00195   }
00196
00197   return *this;
00198 }
00199
00200
00201 /** Operator /= with scalar on pixel values of an image */
00202 template <class StorageType>
00203 Image<StorageType>& Image<StorageType>::operator/= (const StorageType& Value)
00204 {
00205   if (Value == (StorageType) 0) {
00206     BIASERR("Division by zero attempted on image. Aborting!");
00207     exit(-1);
00208   }
00209
00210   // GRAYTEST("/=");
00211
00212   unsigned int minx, miny, maxx, maxy;
00213   GetROICorners(minx, miny, maxx, maxy);
00214   register int width=(int)GetWidth(), step=width-maxx+minx;
00215   register StorageType *p=GetImageData()+width*miny+minx;
00216   register StorageType *le=GetImageData()+width*miny+maxx;
00217   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00218   while (p<e){
00219     while (p<le){ // walk one line
00220       *p++ /= Value;
00221     }
00222     le+=width; // skip to beginning of next line
00223     p+=step;
00224   }
00225
00226   return *this;
00227 }
00228
00229
00230
00231 //////////////////////////////////////////////////////////////////////////////
00232 //
00233 //  The unary operators on pixel values of an  image using the pixel
00234 //  values of another image
00235 //
00236 //////////////////////////////////////////////////////////////////////////////
00237
00238 /** Operator += operating on pixel values with pixel values of another image */
00239 template <class StorageType>
00240 Image<StorageType>&
00241 Image<StorageType>::operator+=(const Image<StorageType>& argimage)
00242 {
00243   GRAYTEST("+=");
00244
00245   unsigned int minx, miny, maxx, maxy;
00246   GetROICorners(minx, miny, maxx, maxy);
00247   register int width=(int)GetWidth(), step=width-maxx+minx;
00248   register StorageType *p=GetImageData()+width*miny+minx;
00249   register StorageType *le=GetImageData()+width*miny+maxx;
00250   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00251   register StorageType *argimagedata=argimage.GetImageData()+width*miny+minx;
00252   while (p<e){
00253     while (p<le){ // walk one line
00254       *p++ += *argimagedata++;
00255     }
00256     le+=width; // skip to beginning of next line
00257     p+=step;
00258     argimagedata+=step;
00259   }
00260
00261   return *this;
00262 }
00263
00264 /** Operator -= operating on pixel values with pixel values of another image */
00265 template <class StorageType> Image<StorageType>&
00266 Image<StorageType>::operator-= (const Image<StorageType>& argimage)
00267 {
00268   GRAYTEST("+=");
00269
00270   unsigned int minx, miny, maxx, maxy;
00271   GetROICorners(minx, miny, maxx, maxy);
00272   register int width=(int)GetWidth(), step=width-maxx+minx;
00273   register StorageType *p=GetImageData()+width*miny+minx;
00274   register StorageType *le=GetImageData()+width*miny+maxx;
00275   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00276   register StorageType *argimagedata=argimage.GetImageData()+width*miny+minx;
00277   while (p<e){
00278     while (p<le){ // walk one line
00279       *p++ -= *argimagedata++;
00280     }
00281     le+=width; // skip to beginning of next line
00282     p+=step;
00283     argimagedata+=step;
00284   }
00285
00286   return *this;
00287 }
00288
00289 /** Operator *= operating on pixel values with pixel values of another image */
00290 template <class StorageType> Image<StorageType>&
00291 Image<StorageType>::operator*= (const Image<StorageType>& argimage)
00292 {
00293   GRAYTEST("+=");
00294
00295   unsigned int minx, miny, maxx, maxy;
00296   GetROICorners(minx, miny, maxx, maxy);
00297   register int width=(int)GetWidth(), step=width-maxx+minx;
00298   register StorageType *p=GetImageData()+width*miny+minx;
00299   register StorageType *le=GetImageData()+width*miny+maxx;
00300   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00301   register StorageType *argimagedata=argimage.GetImageData()+width*miny+minx;
00302   while (p<e){
00303     while (p<le){ // walk one line
00304       *p++ *= *argimagedata++;
00305     }
00306     le+=width; // skip to beginning of next line
00307     p+=step;
00308     argimagedata+=step;
00309   }
00310
00311   return *this;
00312 }
00313
00314 /** Operator /= operating on pixel values with pixel values of another image */template <class StorageType> Image<StorageType>&
00315 Image<StorageType>::operator/= (const Image<StorageType>& argimage)
00316 {
00317   GRAYTEST("+=");
00318
00319   unsigned int minx, miny, maxx, maxy;
00320   GetROICorners(minx, miny, maxx, maxy);
00321   register int width=(int)GetWidth(), step=width-maxx+minx;
00322   register StorageType *p=GetImageData()+width*miny+minx;
00323   register StorageType *le=GetImageData()+width*miny+maxx;
00324   register StorageType *e=GetImageData()+width*(maxy-1)+maxx;
00325   register StorageType *argimagedata=argimage.GetImageData()+width*miny+minx;
00326   while (p<e){
00327     while (p<le){ // walk one line
00328       if(*argimagedata != (StorageType) 0)
00329     *p /= *argimagedata;
00330       argimagedata++;
00331       p++;
00332     }
00333     le+=width; // skip to beginning of next line
00334     p+=step;
00335     argimagedata+=step;
00336   }
00337
00338   return *this;
00339 }
00340
00341 //////////////////////////////////////////////////////////////////////////////
00342 //
00343 // The binary operators on pixel values of an image using a scalar
00344 //
00345 //////////////////////////////////////////////////////////////////////////////
00346
00347
00348 /** Binary operator + operating on pixel values with a scalar,
00349     returning a new image */
00350 template <class StorageType>
00351 Image<StorageType> Image<StorageType>::operator+ (const StorageType& Value)
00352 {
00353   if (Value == (StorageType) 0) {
00354     BIASERR("Division by zero attempted on image. Aborting!");
00355     exit(-1);
00356   }
00357
00358   GRAYTEST("+");
00359
00360   /* In any case we need a new result image */
00361   Image<StorageType> result;
00362   result.Init(GetWidth(), GetHeight(), GetChannelCount());
00363
00364   /* Define a new result image and use the unary version of this operator */
00365   result = (*this);
00366   result += Value;
00367
00368   return result;
00369 }
00370
00371
00372 /** Binary operator - operating on pixel values with a scalar,
00373     returning a new image */
00374 template <class StorageType>
00375 Image<StorageType> Image<StorageType>::operator- (const StorageType& Value)
00376 {
00377   GRAYTEST("-");
00378
00379   /* In any case we need a new result image */
00380   Image<StorageType> result(GetWidth(), GetHeight(), GetChannelCount());
00381
00382   /* Define a new result image and use the unary version of this operator */
00383   result = (*this);
00384   result -= Value;
00385
00386   return result;
00387 }
00388
00389
00390 /** Binary operator * operating on pixel values with a scalar,
00391     returning a new image */
00392 template <class StorageType>
00393 Image<StorageType> Image<StorageType>::operator* (const StorageType& Value)
00394 {
00395   GRAYTEST("*");
00396
00397   /* In any case we need a new result image */
00398   Image<StorageType> result(GetWidth(), GetHeight(), GetChannelCount());
00399
00400   /* Define a new result image and use the unary version of this operator */
00401   result = (*this);
00402   result *= Value;
00403
00404   return result;
00405 }
00406
00407
00408 /** Binary operator / operating on pixel values with a scalar,
00409     returning a new image */
00410 template <class StorageType>
00411 Image<StorageType> Image<StorageType>::operator/ (const StorageType& Value)
00412 {
00413   GRAYTEST("/");
00414
00415   /* In any case we need a new result image */
00416   Image<StorageType> result;
00417   result.Init(GetWidth(), GetHeight(), GetChannelCount());
00418
00419   /* Define a new result image and use the unary version of this operator */
00420   result = (*this);
00421   result /= Value;
00422
00423   return result;
00424 }
00425
00426
00427 //////////////////////////////////////////////////////////////////////////////
00428 //
00429 // The binary operators on pixel values of an image using pixel values of
00430 //   another image, returning a new image
00431 //
00432 //////////////////////////////////////////////////////////////////////////////
00433
00434 /** Binary Operator + operating pixel values with pixel values of another
00435     image, returning a new image */
00436 template <class StorageType> Image<StorageType>
00437 Image<StorageType>::operator+ (const Image<StorageType>& argimage)
00438 {
00439   GRAYTEST("+");
00440
00441   /* In any case we need a new result image */
00442   Image<StorageType> result;
00443   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00444           argimage.GetChannelCount());
00445
00446
00447   if ( HaveImagesMatchingROI(*this, argimage) ) {
00448     /* Define a new result image and use the unary version of this operator */
00449     result = (*this);
00450     result += argimage;
00451   } else {
00452     BIASERR("unmatching ROIs");
00453   }
00454   return result;
00455 }
00456
00457
00458 /** Binary Operator - operating pixel values with pixel values of another
00459     image, returning a new image */
00460 template <class StorageType> Image<StorageType>
00461 Image<StorageType>::operator-(const Image<StorageType>& argimage)
00462 {
00463   GRAYTEST("-");
00464
00465   /* In any case we need a new result image */
00466   Image<StorageType> result;
00467   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00468           argimage.GetChannelCount());
00469
00470   if ( HaveImagesMatchingROI(*this, argimage) ) {
00471     /* Define a new result image and use the unary version of this operator */
00472     result = *this;
00473     result -= argimage;
00474   } else {
00475     BIASERR("unmatching ROIs");
00476   }
00477   return result;
00478 }
00479
00480
00481 /** Binary Operator * operating pixel values with pixel values of another
00482     image, returning a new image */
00483 template <class StorageType> Image<StorageType>
00484 Image<StorageType>::operator* (const Image<StorageType>& argimage)
00485 {
00486   GRAYTEST("*");
00487
00488   /* In any case we need a new result image */
00489   Image<StorageType> result;
00490   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00491           argimage.GetChannelCount());
00492
00493   if ( HaveImagesMatchingROI(*this, argimage) ) {
00494
00495     /* Define a new result image and use the unary version of this operator */
00496     result = (*this);
00497     result *= argimage;
00498   } else {
00499     BIASERR("unmatching ROIs");
00500   }
00501   return result;
00502 }
00503
00504
00505 /** Binary Operator / operating pixel values with pixel values of another
00506     image, returning a new image */
00507 template <class StorageType> Image<StorageType>
00508 Image<StorageType>::operator/ (const Image<StorageType>& argimage)
00509 {
00510   GRAYTEST("/");
00511
00512   /* In any case we need a new result image */
00513   Image<StorageType> result;
00514   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00515           argimage.GetChannelCount());
00516
00517   if ( HaveImagesMatchingROI(*this, argimage) ) {
00518     /* Define a new result image and use the unary version of this operator */
00519     result = (*this);
00520     result /= argimage;
00521   } else {
00522     BIASERR("unmatching ROIs");
00523   }
00524   return result;
00525 }
00526
00527
00528
00529 /** logical Operator || operating pixel values with pixel values of another
00530     image, returning a new image */
00531 template <class StorageType> Image<StorageType>&
00532 Image<StorageType>::operator| (const Image<StorageType>& argimage)
00533 {
00534   BIASERR("operator| not implemented for StorageType");
00535   return *(Image<StorageType>*)NULL;
00536 }
00537
00538 template <> Image<short int>&
00539 Image<short int>::operator| (const Image<short int>& argimage)
00540 {
00541   GRAYTEST("|");
00542
00543   /* In any case we need a new result image */
00544   Image<short int>& result = *(new Image<short int>);
00545   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00546           argimage.GetChannelCount());
00547
00548   if ( HaveImagesMatchingROI(*this, argimage) ) {
00549     BIASERR("Image::operator| not implemented for images with ROIs");
00550   } else {
00551     BIASERR("unmatching ROIs");
00552 //     /* Get the pointer to the begin of the image (and of the newly created result image) and use it as counter */
00553 //     register short int* ImageData       = (short int*)GetImageData();
00554 //     register short int* ImageDataStop   = ImageData + GetPixelCount();
00555 //     register short int* ArgImageData   = (short int*)argimage.GetImageData();
00556 //     register short int* ResultImageData= (short int*)result.GetImageData();
00557 //     for(;ImageData < ImageDataStop; ImageData++,
00558 //    ArgImageData++, ResultImageData++) {
00559 //       *ResultImageData = *ImageData | *ArgImageData;
00560 //     }
00561   }
00562   return result;
00563 }
00564
00565 template <> Image<unsigned char>&
00566 Image<unsigned char>::operator| (const Image<unsigned char>& argimage)
00567 {
00568   GRAYTEST("|");
00569
00570   /* In any case we need a new result image */
00571   Image<unsigned char>& result = *(new Image<unsigned char>);
00572   result.Init(argimage.GetWidth(), argimage.GetHeight(),
00573           argimage.GetChannelCount());
00574
00575   if ( HaveImagesMatchingROI(*this, argimage) ) {
00576     BIASERR("Image::operator| not implemented for images with ROIs");
00577   } else {
00578     BIASERR("unmatching ROIs");
00579 //     /* Get the pointer to the begin of the image (and of the newly created result image) and use it as counter */
00580 //     register unsigned char* ImageData      = (unsigned char* )GetImageData();
00581 //     register unsigned char* ImageDataStop  = ImageData + GetPixelCount();
00582 //     register unsigned char* ArgImageData   =
00583 //       (unsigned char* )argimage.GetImageData();
00584 //     register unsigned char* ResultImageData=
00585 //       (unsigned char* )result.GetImageData();
00586 //     for(;ImageData < ImageDataStop; ImageData++,
00587 //    ArgImageData++, ResultImageData++) {
00588 //       *ResultImageData = *ImageData | *ArgImageData;
00589 //     }
00590   }
00591   return result;
00592 }
00593
00594
00595 /** absolut difference */
00596 template <class StorageType> void
00597 Image<StorageType>::AbsDiff(const Image<StorageType>& im1,
00598                             const Image<StorageType>& im2)
00599 {
00600 #ifdef BIAS_DEBUG
00601   if (!im1.SamePixelAndChannelCount(im2))
00602     BIASERR("images are not of same size or channelcount");
00603 #endif
00604   if (!IsEmpty()) Release();
00605   Init(im1.GetWidth(), im1.GetHeight(), im1.GetChannelCount());
00606   unsigned int cc = im1.GetChannelCount();
00607
00608   /* Do the image dimensions (or the ROI dimensions if both images have one)
00609      fit */
00610   if ( HaveImagesMatchingROI(im1, im2) ) {
00611     unsigned minx,  miny, maxx, maxy;
00612     im1.GetROICorners(minx, miny, maxx, maxy);
00613     StorageType **ida=GetImageDataArray();
00614     StorageType **ida1=im1.GetImageDataArray();
00615     StorageType **ida2=im2.GetImageDataArray();
00616     maxx *= cc;
00617     for (unsigned y=miny; y<maxy; y++){
00618       for (unsigned x=minx; x<maxx; x+= cc){
00619     for (unsigned int c=0;c<cc; c++) {
00620       ida[y][x+c]=(ida1[y][x]>ida2[y][x+c])?
00621         (ida1[y][x+c]-ida2[y][x+c]):(ida2[y][x+c]-ida1[y][x+c]);
00622     }
00623       }
00624     }
00625   } else {
00626     BIASERR("unmatching ROIs");
00627   }
00628 }
00629
00630 //////////////////////////////////////////////////////////////////////////////
00631
00632
00633
00634 } // namespace BIAS
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Operators.hh Source File

Base » Math

Operators.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Operators_hh__
00027 #define __Operators_hh__
00028
00029 #include <Base/Debug/Error.hh>
00030 #include "tnt/cmat.h"
00031
00032 namespace BIAS {
00033
00034   // forward declarations to avaoid nested includes
00035   template<class T> class Matrix;
00036   template<class T> class Vector;
00037   template<class T> class Matrix2x2;
00038   template<class T> class Vector2;
00039   template<class T> class Matrix3x3;
00040   template<class T> class Vector3;
00041   template<class T> class Matrix4x4;
00042   template<class T> class Vector4;
00043
00044   template<class T> class Matrix3x4;
00045
00046   ////////////////////////////////////////////////////////////////////////////
00047   //      unary vector/matrix operators
00048   ////////////////////////////////////////////////////////////////////////////
00049
00050   /** @relates Vector2
00051       @author herzog 2005-07-19 */
00052   template <class T> inline T operator-(const Vector2<T>& v)
00053   { return Vector2<T>( -v[0],-v[1] ); }
00054
00055   /** @relates Vector3
00056       @author herzog 2005-07-19 */
00057   template <class T> inline T operator-(const Vector3<T>& v)
00058   { return Vector3<T>( -v[0],-v[1],-v[2] ); }
00059
00060   /** @relates Vector4
00061       @author herzog 2005-07-19 */
00062   template <class T> inline T operator-(const Vector4<T>& v)
00063   { return Vector4<T>( -v[0],-v[1],-v[2],-v[3] ); }
00064
00065   ////////////////////////////////////////////////////////////////////////////
00066   //      vector - scalar operators
00067   ////////////////////////////////////////////////////////////////////////////
00068
00069   /** @relates Vector */
00070   template <class T>
00071   inline Vector<T> operator*(const Vector<T>& v, const T& scalar)
00072   {
00073     Vector<T> res(v.size());
00074     v.Multiply(scalar, res);
00075     return res;
00076   }
00077
00078   /** @relates Vector */
00079   template <class T>
00080   inline Vector<T> operator*(const T& scalar, const Vector<T>& v)
00081   {
00082     Vector<T> res(v.size());
00083     v.Multiply(scalar, res);
00084     return res;
00085   }
00086
00087   /** Addition operator with scalar argument, returning new vector
00088       @author Ingo Thomsen, tested **/
00089   template <class T>
00090   inline Vector2<T> operator+(const Vector2<T>& vec, const T& scalar) {
00091     Vector2<T> result;
00092     vec.Add(scalar, result);
00093     return result;
00094   }
00095
00096   /** @relates Vector2
00097       Substraction operator with scalar argument, returning new vector
00098       @author Ingo Thomsen, tested **/
00099   template <class T>
00100   inline Vector2<T> operator-(const Vector2<T>& vec, const T& scalar) {
00101     Vector2<T> result;
00102     vec.Sub(scalar, result);
00103     return result;
00104   }
00105
00106   /** @relates Vector2
00107       Multiplication operator with scalar argument, returning new vector
00108       @author Ingo Thomsen, tested **/
00109   template <class T>
00110   inline Vector2<T> operator*(const Vector2<T>& vec, const T& scalar) {
00111     Vector2<T> result;
00112     vec.Multiply(scalar, result);
00113     return result;
00114   }
00115
00116   /** @relates Vector2
00117       Division operator with scalar argument, returning new vector
00118       @author Ingo Thomsen, tested **/
00119   template <class T>
00120   inline Vector2<T> operator/(const Vector2<T>& vec, const T& scalar) {
00121     BIASASSERT(scalar !=(T)0);
00122     Vector2<T> result;
00123     vec.Divide(scalar, result);
00124     return result;
00125   }
00126
00127   /** @relates Vector3 */
00128   template <class T>
00129   inline Vector3<T> operator*(const Vector3<T>& vec, const T& scalar) {
00130     Vector3<T> res;
00131     vec.Multiply(scalar, res);
00132     return res;
00133   }
00134
00135   /** @relates Vector3 */
00136   template <class T>
00137   inline Vector3<T> operator*(const T& scalar, const Vector3<T>& vec) {
00138     Vector3<T> res;
00139     vec.Multiply(scalar, res);
00140     return res;
00141   }
00142
00143   /** @relates Vector3
00144       Addition operator with scalar argument, returning new vector
00145       @author Ingo Thomsen, woelk, tested **/
00146   template <class T>
00147   inline Vector3<T> operator+(const Vector3<T>& vec, const T& scalar) {
00148     Vector3<T> result;
00149     vec.Add(scalar, result);
00150     return result;
00151   }
00152
00153   /** @relates Vector3
00154       Substraction operator with scalar argument, returning new vector
00155       @author Ingo Thomsen, woelk, tested **/
00156   template <class T>
00157   inline Vector3<T> operator-(const Vector3<T>& vec, const T& scalar) {
00158     return vec.Sub(scalar);
00159   }
00160
00161   /** @relates Vector3
00162       Substraction operator with scalar argument, returning new vector
00163       @author woelk, tested **/
00164   template <class T>
00165   inline Vector3<T> operator-(const T& scalar, const Vector3<T>& vec) {
00166     Vector3<T> dest;
00167     vec.Mult(-1, dest);
00168     dest+=scalar;
00169     return dest;
00170   }
00171
00172   /** @relates Vector3
00173       Division operator with scalar argument, returning new vector
00174       @author Ingo Thomsen, tested **/
00175   template <class T>
00176   inline Vector3<T> operator/(const Vector3<T>& vec, const T& scalar) {
00177     Vector3<T> result;
00178     vec.Divide(scalar, result);
00179     return result;
00180   }
00181
00182   /** @relates Vector4
00183      Multiplication operator with scalar argument, returning new vector
00184      @author Ingo Thomsen, tested  **/
00185   template <class T>
00186   inline Vector4<T> operator*(const Vector4<T>& v, const T& scalar)
00187   {
00188     Vector4<T> result;
00189     v.Multiply(scalar, result);
00190     return result;
00191   }
00192
00193   /** @relates Vector4
00194       Division operator with scalar argument, returning new vector
00195       @author Ingo Thomsen, tested **/
00196   template <class T>
00197   inline Vector4<T> operator/(const Vector4<T>& v, const T& scalar)
00198   {
00199 #ifdef BIAS_DEBUG
00200     if (scalar == 0 ) {
00201       BIASERR("Division by Zero!");
00202       return Vector4<T>((T)0,(T)0,(T)0,(T)0);
00203     }
00204 #endif
00205     Vector4<T> result;
00206     v.Divide(scalar, result);
00207     return result;
00208   }
00209
00210   /** @relates Vector4
00211       Addition operator with scalar argument, returning new vector
00212       @author Ingo Thomsen, tested **/
00213   template <class T>
00214   inline Vector4<T> operator+(const Vector4<T>& v, const T& scalar)
00215   {
00216     Vector4<T> result;
00217     v.Add(scalar, result);
00218     return result;
00219   }
00220
00221   /** @relates Vector4
00222       Subtraction operator with scalar argument, returning new vector
00223       @author Ingo Thomsen, tested **/
00224   template <class T>
00225   inline Vector4<T> operator-(const Vector4<T>& v, const T& scalar)
00226   {
00227     Vector4<T> result;
00228     v.Sub(scalar, result);
00229     return result;
00230   }
00231
00232   ////////////////////////////////////////////////////////////////////////////
00233   //      vector - vector operators
00234   ////////////////////////////////////////////////////////////////////////////
00235
00236   /** @relates Vector */
00237   template <class T>
00238   inline T operator*(const Vector<T>& v, const Vector<T> &argvec)
00239   {
00240     T destscalar;
00241     v.ScalarProduct(argvec, destscalar);
00242     return destscalar;
00243   }
00244
00245 //   /** @relates Vector2
00246 //       @author Dennis Herzog, 2005-07-27 **/
00247 //   template <class T>
00248 //   inline bool operator == (const Vector2<T>& a, const Vector2<T>& b)
00249 //   { return a[0]==b[0] && a[1]==b[1]; }
00250
00251 //   template <class T>
00252 //   inline bool operator != (const Vector2<T>& a, const Vector2<T>& b)
00253 //   { return !(a==b); }
00254
00255   /** @relates Vector2
00256       @author Dennis Herzog, 2005-07-27 **/
00257   template <class T>
00258   inline bool operator<= (const Vector2<T>& a, const Vector2<T>& b)
00259   { return a[0]<=b[0] && a[1]<=b[1]; }
00260
00261   /** @relates Vector2
00262       @author Dennis Herzog, 2005-07-27 **/
00263   template <class T>
00264   inline bool operator< (const Vector2<T>& a, const Vector2<T>& b)
00265   { return a[0]<b[0] && a[1]<b[1]; }
00266
00267   /** @relates Vector2
00268       @author Dennis Herzog, 2005-07-27 **/
00269   template <class T>
00270   inline bool operator>= (const Vector2<T>& a, const Vector2<T>& b)
00271   { return b<=a; }
00272
00273   /** @relates Vector2
00274       @author Dennis Herzog, 2005-07-27 **/
00275   template <class T>
00276   inline bool operator> (const Vector2<T>& a, const Vector2<T>& b)
00277   { return b<a; }
00278
00279   /** @relates Vector2
00280       add operator for two Vectors, returning new vector
00281       @author Ingo Thomsen, tested **/
00282   template <class T>
00283   inline Vector2<T> operator+(const Vector2<T> &vec, const Vector2<T> &argvec){
00284     Vector2<T> destvec;
00285     vec.Add(argvec, destvec);
00286     return destvec;
00287   }
00288
00289   /** @relates Vector2
00290       sub operator for two Vectors, returning new vector
00291       @author Ingo Thomsen, tested **/
00292   template <class T>
00293   inline Vector2<T> operator-(const Vector2<T> &vec, const Vector2<T> &argvec){
00294     Vector2<T> destvec;
00295     vec.Sub(argvec, destvec);
00296     return destvec;
00297   }
00298
00299   /** @relates Vector2 */
00300   template <class T>
00301   inline T operator*(const Vector2<T> &vec, const Vector2<T> &argvec){
00302     return vec[0]*argvec[0]+vec[1]*argvec[1];
00303   }
00304
00305 //   /** @relates Vector3
00306 //       @author Dennis Herzog, 2005-07-27 **/
00307 //   template <class T>
00308 //   inline bool operator == (const Vector3<T>& a, const Vector3<T>& b)
00309 //   { return a[0]==b[0] && a[1]==b[1] && a[2]==b[2]; }
00310
00311 //   /** @relates Vector3
00312 //       @author Dennis Herzog, 2005-07-27 **/
00313 //   template <class T>
00314 //   inline bool operator != (const Vector3<T>& a, const Vector3<T>& b)
00315 //   { return !(a==b); }
00316
00317   /** @relates Vector3
00318       @author Dennis Herzog, 2005-07-27 **/
00319   template <class T>
00320   inline bool operator<= (const Vector3<T>& a, const Vector3<T>& b)
00321   { return a[0]<=b[0] && a[1]<=b[1] && a[2]<=b[2]; }
00322
00323   /** @relates Vector3
00324       @author Dennis Herzog, 2005-07-27 **/
00325   template <class T>
00326   inline bool operator< (const Vector3<T>& a, const Vector3<T>& b)
00327   { return a[0]<b[0] && a[1]<b[1] && a[2]<b[2]; }
00328
00329   /** @relates Vector3
00330       @author Dennis Herzog, 2005-07-27 **/
00331   template <class T>
00332   inline bool operator>= (const Vector3<T>& a, const Vector3<T>& b)
00333   { return b<=a; }
00334
00335   /** @relates Vector3
00336       @author Dennis Herzog, 2005-07-27 **/
00337   template <class T>
00338   inline bool operator> (const Vector3<T>& a, const Vector3<T>& b)
00339   { return b<a; }
00340
00341   /** @relates Vector3 */
00342   template <class T>
00343   inline T operator*(const Vector3<T>& vec, const Vector3<T>& arg)
00344   { T res; vec.ScalarProduct(arg, res); return res; }
00345
00346   /** @relates Vector3 */
00347   template <class T>
00348   inline Vector3<T> operator+(const T& scalar, const Vector3<T>& vec) {
00349     Vector3<T> result;
00350     vec.Add(scalar, result);
00351     return result;
00352   }
00353
00354   /** @relates Vector3
00355       add operator for two Vectors, returning new vector
00356       @author Ingo Thomsen, woelk, tested **/
00357   template <class T>
00358   inline Vector3<T> operator+(const Vector3<T>& vec, const Vector3<T>& argvec){
00359     Vector3<T> destvec;
00360     vec.Add(argvec, destvec);
00361     return destvec;
00362   }
00363
00364   /** @relates Vector3
00365       add operator for Vector3, and Vector, so u dont have to cast...
00366       @author D. Grest, tested **/
00367   template <class T>
00368   inline Vector3<T> operator+(const Vector3<T>& vec, const Vector<T>& argvec){
00369     Vector3<T> destvec;
00370 #ifdef BIAS_DEBUG
00371     if (argvec.size()!=3) {
00372       BIASERR("operator+: argument does not havesize 3");
00373     }
00374 #endif
00375     destvec[0]=vec[0]+argvec[0];
00376     destvec[1]=vec[1]+argvec[1];
00377     destvec[2]=vec[2]+argvec[2];
00378     return destvec;
00379   }
00380
00381   /** @relates Vector3
00382       sub operator for two Vectors, returning new vector
00383       @author Ingo Thomsen, tested **/
00384   template <class T>
00385   inline Vector3<T> operator-(const Vector3<T>& vec, const Vector3<T>& argvec){
00386     Vector3<T> destvec;
00387     vec.Sub(argvec, destvec);
00388     return destvec;
00389   }
00390
00391 //   /** @relates Vector4
00392 //       @author Dennis Herzog, 2005-07-27 **/
00393 //   template <class T>
00394 //   inline bool operator == (const Vector4<T>& a, const Vector4<T>& b)
00395 //   { return a[0]==b[0] && a[1]==b[1] && a[2]==b[2] && a[3]==b[3]; }
00396
00397 //   /** @relates Vector4
00398 //       @author Dennis Herzog, 2005-07-27 **/
00399 //   template <class T>
00400 //   inline bool operator != (const Vector4<T>& a, const Vector4<T>& b)
00401 //   { return !(a==b); }
00402
00403   /** @relates Vector4
00404       @author Dennis Herzog, 2005-07-27 **/
00405   template <class T>
00406   inline bool operator<= (const Vector4<T>& a, const Vector4<T>& b)
00407   { return a[0]<=b[0] && a[1]<=b[1] && a[2]<=b[2] && a[3]<=b[3]; }
00408
00409   /** @relates Vector4
00410       @author Dennis Herzog, 2005-07-27 **/
00411   template <class T>
00412   inline bool operator< (const Vector4<T>& a, const Vector4<T>& b)
00413   { return a[0]<b[0] && a[1]<b[1] && a[2]<b[2] && a[3]<b[3]; }
00414
00415   /** @relates Vector4
00416       @author Dennis Herzog, 2005-07-27 **/
00417   template <class T>
00418   inline bool operator>= (const Vector4<T>& a, const Vector4<T>& b)
00419   { return b<=a; }
00420
00421   /** @relates Vector4
00422       @author Dennis Herzog, 2005-07-27 **/
00423   template <class T>
00424   inline bool operator> (const Vector4<T>& a, const Vector4<T>& b)
00425   { return b<a; }
00426
00427   /** @relates Vector4
00428       op* to multiply two vectors by their dotproduct
00429       @author Jan Woetzel, untested (03/06/2002)**/
00430   template <class T>
00431   inline T operator*(const Vector4<T>& v, const Vector4<T>& argvec)
00432   {
00433     T destscalar;
00434     v.ScalarProduct(argvec, destscalar);
00435     return destscalar;
00436   }
00437
00438   /** @relates Vector4
00439       sub operator for two Vectors, returning new vector
00440       @author Ingo Thomsen, tested    **/
00441   template <class T>
00442   inline Vector4<T> operator-(const Vector4<T>& v, const Vector4<T> &argvec)
00443   {
00444     Vector4<T> destvec;
00445     v.Sub(argvec, destvec);
00446     return destvec;
00447   }
00448
00449   /** @relates Vector4
00450       add operator for two Vectors, returning new vector
00451       @author Ingo Thomsen, tested   **/
00452   template <class T>
00453   inline Vector4<T> operator+(const Vector4<T>& v, const Vector4<T> &argvec)
00454   {
00455     Vector4<T> destvec;
00456     v.Add(argvec, destvec);
00457     return destvec;
00458   }
00459
00460
00461
00462   ////////////////////////////////////////////////////////////////////////////
00463   //      matrix - scalar operators
00464   ////////////////////////////////////////////////////////////////////////////
00465
00466   /** @relates Matrix
00467       addition operator, returning new matrix
00468       @author Ingo Thomsen, woelk **/
00469   template<class T>
00470   inline Matrix<T> operator+(const Matrix<T>& mat, const T& scalar)
00471   { Matrix<T> res; mat.Add(scalar, res); return res; }
00472
00473   /** @relates Matrix */
00474   template<class T>
00475   inline Matrix<T> operator+(const T& scalar, const Matrix<T>& mat)
00476   { Matrix<T> res; mat.Add(scalar, res); return res; }
00477
00478   /** @relates Matrix
00479       substraction operator, returning new matrix
00480       @author Ingo Thomsen **/
00481   template<class T>
00482   inline Matrix<T> operator-(const Matrix<T>& mat, const T& scalar)
00483   { Matrix<T> res; mat.Sub(scalar, res); return res; }
00484
00485   /** @relates Matrix */
00486   template<class T>
00487   inline Matrix<T> operator-(const T& scalar, const Matrix<T>& mat)
00488   { Matrix<T> res; mat.Sub(scalar, res); return res; }
00489
00490   /** @relates Matrix
00491       multiplication operator, returning new matrix
00492       @author Ingo Thomsen**/
00493   template<class T>
00494   inline Matrix<T> operator*(const Matrix<T>& mat, const T& scalar)
00495   { Matrix<T> res; mat.Multiply(scalar, res); return res; }
00496
00497   /** @relates Matrix */
00498   template<class T>
00499   inline Matrix<T> operator*(const T& scalar, const Matrix<T>& mat)
00500   { Matrix<T> res; mat.Multiply(scalar, res); return res; }
00501
00502   /** @relates Matrix
00503       division operator, returning new matrix
00504       @author Ingo Thomsen **/
00505   template<class T>
00506   inline Matrix<T> operator/(const Matrix<T>& mat, const T& scalar)
00507   { Matrix<T> res; mat.Divide(scalar, res); return res; }
00508
00509   /** @relates Matrix
00510       division operator
00511       @author Ingo Thomsen **/
00512   template<class T>
00513   inline Matrix<T>& operator/=(Matrix<T>& mat, const T& scalar)
00514   { mat.DivideIP(scalar); return mat; }
00515
00516   /** @relates Matrix3x3 */
00517   template <class T>
00518   inline Matrix3x3<T> operator*(const Matrix3x3<T>& mat, const T &scalar)
00519   {
00520     Matrix3x3<T> res;
00521     mat.Scale(scalar, res);
00522     return res;
00523   }
00524
00525   ////////////////////////////////////////////////////////////////////////////
00526   //      vector - matrix operators
00527   ////////////////////////////////////////////////////////////////////////////
00528
00529   /** @relates Matrix3x3
00530       @relates Vector3
00531       matrix-vector multiplication using 'Mult'
00532       @author Ingo Thomsen, Jan Woetzel,
00533       fw moved out of class, untested (04/17/2002)**/
00534   template <class T>
00535   inline Vector3<T> operator*(const Matrix3x3<T>& mat,
00536                               const Vector3<T> &argvec)
00537   {
00538     Vector3<T> destvec;
00539     mat.Mult(argvec, destvec);
00540     return destvec;
00541   }
00542
00543     /** @relates Matrix4x4
00544         @relates Vector4
00545         matrix-vector multiplication using 'Mult'
00546         @author Jan Woetzel, untested (04/17/2002) */
00547   template <class T>
00548   inline Vector4<T> operator*(const Matrix4x4<T>& mat,
00549                               const Vector4<T> &argvec)
00550   {
00551     Vector4<T> destvec;
00552     mat.Mult(argvec, destvec);
00553     return destvec;
00554   }
00555
00556   /** @relates Matrix
00557       @relates Vector */
00558   template <class T>
00559   inline Vector<T> operator*(const Matrix<T>& mat, const Vector2<T>& vec)
00560   {
00561 #ifdef BIAS_DEBUG
00562     if (mat.num_cols() != 2)
00563       { BIASERR("wrong matrix dimension"<<mat.num_cols()); }
00564 #endif
00565     Vector<T> res(mat.num_rows());
00566     for (register int i=0; i<mat.num_rows(); i++)
00567       res[i]=mat[i][0]*vec[0]+mat[i][1]*vec[1];
00568     return res;
00569   }
00570
00571   /** @relates Matrix2x2
00572       @relates Vector2 */
00573   template <class T>
00574   inline Vector2<T> operator*(const Matrix2x2<T>& mat, const Vector2<T>& vec)
00575   {
00576     Vector2<T> res;
00577     res[0]=mat[0][0]*vec[0]+mat[0][1]*vec[1];
00578     res[1]=mat[1][0]*vec[0]+mat[1][1]*vec[1];
00579     return res;
00580   }
00581
00582   /** @relates Matrix
00583       @relates Vector3 */
00584   template <class T>
00585   inline Vector<T>
00586   operator*(const BIAS::Matrix<T> &mat, const Vector3<T> &vec) {
00587 #ifdef BIAS_DEBUG
00588     if (mat.num_cols() != 3) {
00589       BIASERR("invalid matrix/vector sizes "<<mat.num_rows()<<"x"<<
00590               mat.num_cols()<<" * "<<vec.Size()<<"x1");
00591     }
00592 #endif
00593     Vector<T> result(mat.num_rows());
00594     result.Set((T)0);
00595     register int y, i;
00596     for (y=0; y<(int)result.Size(); y++)
00597       for (i=0; i<3; i++)
00598         result[y]+=mat[y][i]*vec[i];
00599     return result;
00600   }
00601
00602   /** @relates Matrix3x4
00603       @relates Vector4 */
00604   template <class T> inline Vector3<T>
00605   operator*(const Matrix3x4<T>& mat, const Vector4<T> &argvec)
00606   {
00607     Vector3<T> destvec;
00608     mat.Mult(argvec, destvec);
00609     return destvec;
00610   }
00611
00612   /** @relates Matrix
00613       @relates Vector4 */
00614   template <class T> inline Vector<T>
00615   operator*(const BIAS::Matrix<T> &mat, const Vector4<T> &vec) {
00616 #ifdef BIAS_DEBUG
00617     if (mat.num_cols() != 4) {
00618       BIASERR("invalid matrix/vector sizes "<<mat.num_rows()<<"x"<<
00619               mat.num_cols()<<" * "<<vec.size()<<"x1");
00620     }
00621 #endif
00622     Vector<T> result(mat.num_rows());
00623     result.Set((T)0);
00624     register int y, i;
00625     for (y=0; y<result.size(); y++)
00626       for (i=0; i<4; i++)
00627         result[y]+=mat[y][i]*vec[i];
00628     return result;
00629   }
00630
00631   ////////////////////////////////////////////////////////////////////////////
00632   //      matrix - matrix operators
00633   ////////////////////////////////////////////////////////////////////////////
00634
00635   /** @relates Matrix2x2
00636       untested */
00637   template <class T> inline Matrix2x2<T>
00638   operator*(const Matrix2x2<T>& mat, const Matrix2x2<T> & argMat)
00639   {
00640     Matrix2x2<T> destmat;
00641     register T *destP   = destmat.GetData();
00642     const register T *argP  = argMat.GetData();
00643     const register T *matP  = mat.GetData();
00644
00645     destP[0] =
00646       matP[0] * argP[0] + matP[1] * argP[2];
00647     destP[1] =
00648       matP[0] * argP[1] + matP[1] * argP[3];
00649
00650     destP[2] =
00651       matP[2] * argP[0] + matP[3] * argP[2];
00652     destP[3] =
00653       matP[2] * argP[1] + matP[3] * argP[3];
00654     return destmat;
00655   }
00656
00657   /** @relates Matrix3x3
00658       matrix-matrix multiplication using 'Mult'
00659       @author Jan Woetzel, tested (04/17/2002) */
00660   template <class T>
00661   inline Matrix3x3<T> operator*(const Matrix3x3<T> & argL,
00662                                 const Matrix3x3<T> & argR) {
00663     Matrix3x3<T> resMat;
00664     argL.Mult(argR, resMat);
00665     return resMat;
00666   }
00667
00668   /** @relates Matrix3x3
00669       @relates Matrix
00670       matrix-matrix multiplication using 'Mult'
00671       @author Jan Woetzel, tested (04/17/2002) */
00672   template <class T>
00673   inline Matrix<T> operator*(const Matrix3x3<T> & argLeft,
00674                              const Matrix<T> & argMat) {
00675     return TNT::matmult(argLeft, argMat);
00676   }
00677
00678   /** @relates Matrix4x4
00679       matrix-matrix multiplication using 'Mult'
00680       @author Jan Woetzel, status untested (04/17/2002) */
00681   template <class T>
00682   inline Matrix4x4<T> operator*(const Matrix4x4<T>& mat,
00683                                 const Matrix4x4<T> & argMat)
00684   {
00685     Matrix4x4<T> resMat;
00686     mat.Mult(argMat, resMat);
00687     return resMat;
00688   }
00689
00690   /** @relates Matrix3x4 */
00691   template <class T> inline Matrix3x4<T>
00692   operator*(const Matrix3x3<T>& mat, const Matrix3x4<T> &arg)
00693   {
00694     Matrix3x4<T> dest;
00695     mat.Mult(arg, dest);
00696     return dest;
00697   }
00698
00699 } // namespace
00700
00701
00702
00703 #endif // __Operators_hh__
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Param.cpp Source File

Utils

Param.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be usefulen,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include <stdlib.h>
00028 //#include <unistd.h>
00029
00030 #ifdef   WIN32
00031 #  include <Base/Common/getopt_W32.h>
00032 #else  //not WIN32
00033 #  include <getopt.h>
00034 #endif //WIN32
00035
00036 #include <stdio.h>
00037 #include <iostream>
00038 #include <iomanip>
00039 #include <fstream>
00040 #include <sstream>
00041 #include <time.h>
00042 #include <algorithm>
00043
00044 #include "Param.hh"
00045 #include "ParamTypes.hh"
00046
00047 // for umask
00048 #include <sys/types.h>
00049 #include <sys/stat.h>
00050 #include <locale.h>
00051
00052
00053 using namespace BIAS;
00054 using namespace std;
00055
00056 // we set a typedef here, as we need const iterators very often...
00057 typedef map<const std::string,BIAS::ParamTypeBase*>::const_iterator CI;
00058
00059
00060 // JW
00061 ParamCallbackInterface::~ParamCallbackInterface()
00062 {}
00063
00064 ParamCallbackInterface::ParamCallbackInterface()
00065 {}
00066
00067
00068 #include <Base/Common/BIASpragmaStart.hh>
00069 void ParamCallbackInterface::ParameterChanged(
00070     const std::string &paramname,
00071     const void *data)
00072 {}
00073 #include <Base/Common/BIASpragmaEnd.hh>
00074
00075
00076
00077 Param::Param(bool DisableDestructorWarning)
00078 {
00079     DestructorWarning_ = !DisableDestructorWarning;
00080     // init some members
00081     ParamMap_.clear();
00082     AddParamString("writeconfig","Write file with current configuration");
00083     AddParamString("readconfig","Read configuration from file");
00084 #ifdef BIAS_HAVE_XML2
00085     AddParamString("writeconfigXML","Write XML-file with current configuration");
00086     AddParamString("readconfigXML","Read configuration from file");
00087 #endif
00088     AddParamBool("expert","Expert Mode: also show and write paramters marked "
00089         "as enhanced");
00090     SetParameterWriteToFile("writeconfig",false);
00091     SetParameterWriteToFile("readconfig",false);
00092 #ifdef BIAS_HAVE_XML2
00093     SetParameterWriteToFile("writeconfigXML",false);
00094     SetParameterWriteToFile("readconfigXML",false);
00095 #endif
00096     SetParameterWriteToFile("expert", false);
00097     // needed to ensure consistent ,/. behavior in different envs
00098     setlocale(LC_ALL, "C");
00099     // default Write-options
00100     WriteComments_ = true;
00101     WriteIndent_ = true;
00102     WriteEnhanced_ = false;
00103 }
00104
00105
00106 Param::~Param()
00107 {
00108     // destroy all listitems...
00109     for ( CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
00110         // cerr << " deleting "<<it->first<<endl;
00111         delete it->second;
00112     }
00113 #ifdef BIAS_DEBUG
00114     if (DestructorWarning_)
00115         BIASERR("\n Warning: Parameter are held in class Param. Don't delete this class, if you're still using the parameter somewhere.\n\n");
00116 #endif
00117 }
00118
00119
00120 void Param::ShowData(std::ostream &os, int grp, bool showenhanced)
00121 {
00122     int namew=GetSizeOfLongestParamName()+2, typew=7;
00123     int valw=GetSizeOfLongestParamValueString()+2;
00124
00125     namew=(namew<20)?(20):namew;
00126     valw=(valw<7)?(7):valw;
00127
00128     int pos   = 0;
00129
00130     CI it;
00131
00132     os <<"idx"<<setw(namew)<<"name"<<setw(typew)
00133         <<"type"<<setw(valw)<<"value"<<" cmdl-opts"<<endl;
00134
00135     if (grp==GRP_ALL){
00136         vector<int> grps=UniqueSortedGroups();
00137         vector<int>::iterator git;
00138         for (git=grps.begin(); git!=grps.end(); git++){
00139             os <<"\n############### Group ID "<<*git<<" : "<<GetGroupName(*git)
00140                 <<" #######################\n";
00141             for(it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
00142                 if ((*it).second->Group_==*git){
00143                     if ((showenhanced || (!(*it).second->Enhanced_)) &&
00144                         (!(*it).second->Hidden_)) {
00145                             os << pos << ": " << setw(namew) << it->first;
00146                             os << setw(typew) << it->second->GetTypeName()<<" "
00147                                 << setw(valw) << it->second->GetValueString() <<"   "
00148                                 << it->second->ShortCmd_ ;
00149                             if ((*it).second->Enhanced_) os << "   (enhanced)";
00150                             os << endl;
00151                             pos++;
00152                         }
00153                 }
00154             }
00155         }
00156     } else {
00157         for(it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
00158             if ((*it).second->Group_==grp){
00159                 if ((showenhanced || (!(*it).second->Enhanced_)) &&
00160                     (!(*it).second->Hidden_)) {
00161                         os << pos << ": " << setw(namew) << it->first;
00162                         os << setw(typew) << it->second->GetTypeName()<<" "
00163                             << setw(valw) << it->second->GetValueString() <<"   "
00164                             << it->second->ShortCmd_;
00165                         if ((*it).second->Enhanced_) os << "   (enhanced)";
00166                         os << endl;
00167                         pos++;
00168                     }
00169             }
00170         }
00171     }
00172 }
00173
00174
00175 void Param::Usage(std::ostream &os)
00176 {
00177     int namew = 0;
00178     int typew = 9;
00179     char *tmpstr;
00180
00181     // search the length of the largest name
00182     CI it;
00183     bool expert = *GetParamBool("expert");
00184     for(it=ParamMap_.begin(); it!=ParamMap_.end(); it++)
00185     {
00186         if (((!it->second->Enhanced_) || expert) && (!it->second->Hidden_)){
00187             int len = it->first.length();
00188             if ( len>namew )  namew = len;
00189         }
00190     }
00191
00192     // get space for "--" + name + 0
00193     tmpstr = new char[namew+3];
00194     os << endl;
00195     os << "Available Parameters with description and commandline switches";
00196     os << endl;
00197
00198     vector<int> grps=UniqueSortedGroups();
00199     vector<int>::iterator git;
00200     for (git=grps.begin(); git!=grps.end(); git++){
00201         os <<"\n############### Group ID "<<*git<<" : "<<GetGroupName(*git)
00202             <<" #######################\n";
00203         for(it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
00204             if (it->second->Group_ == *git && (!(*it).second->Hidden_) &&
00205                 (expert || (!(*it).second->Enhanced_))){
00206                     sprintf(tmpstr,"--%s",it->first.c_str());
00207                     if (WriteIndent_) os <<setw(namew+2);
00208                     os << tmpstr;
00209
00210                     if (it->second->ShortCmd_ == 0)
00211                         os << "    ";
00212                     else
00213                         os << ", -" << it->second->ShortCmd_;
00214
00215                     if ( ParamTypeInt *item =
00216                         dynamic_cast<ParamTypeInt*>(it->second) )
00217                     {
00218                         // element is of type INTEGER
00219                         os << setw(typew) << "INT ";
00220                         item = NULL; // to fool compiler and suppress warning ;-)
00221                     }
00222                     else if ( ParamTypeBool *item =
00223                         dynamic_cast<ParamTypeBool*>(it->second) )
00224                     {
00225                         // element is of type BOOLEAN
00226                         os << setw(typew) << "BOOL ";
00227                         item = NULL; // to fool compiler and suppress warning ;-)
00228                     }
00229                     else if ( ParamTypeDouble *item =
00230                         dynamic_cast<ParamTypeDouble*>(it->second) )
00231                     {
00232                         // element is of type DOUBLE
00233                         os << setw(typew) << "DOUBLE ";
00234                         item = NULL; // to fool compiler and suppress warning ;-)
00235                     }
00236                     else if ( ParamTypeString *item =
00237                         dynamic_cast<ParamTypeString*>(it->second) )
00238                     {
00239                         // element is of type STRING
00240                         os << setw(typew) << "STRING ";
00241                         item = NULL; // to fool compiler and suppress warning ;-)
00242                     }
00243                     else if ( ParamTypeVecDbl *item =
00244                         dynamic_cast<ParamTypeVecDbl*>(it->second) )
00245                     {
00246                         // element is of type VECTOR OF DOUBLE
00247                         os << setw(typew) << "VECDBL ";
00248                         item = NULL; // to fool compiler and suppress warning ;-)
00249                     }
00250                     else if ( ParamTypeVecInt *item =
00251                         dynamic_cast<ParamTypeVecInt*>(it->second) )
00252                     {
00253                         // element is of type VECTOR OF INTEGER
00254                         os << setw(typew) << "VECINT ";
00255                         item = NULL; // to fool compiler and suppress warning ;-)
00256                     }
00257                     else if ( ParamTypeEnum *item =
00258                         dynamic_cast<ParamTypeEnum*>(it->second) )
00259                     {
00260                         // element is of type VECTOR OF INTEGER
00261                         os << setw(typew) << "ENUM ";
00262                         // now output all possible enum values
00263                         os << "\n\t[ "<<item->GetHint()<<" ] ";
00264                         item = NULL; // to fool compiler and suppress warning ;-)
00265                     }
00266                     else
00267                     {
00268                         os << "unknown ";
00269                     }
00270
00271                     os <<" : ";
00272                     if ( it->second->Help_ != "" ) os << "\n\t" << it->second->Help_;
00273                     else os << "\n\t" << "No help available";
00274
00275                     os<<endl;
00276                 }
00277         }
00278         os<<endl;
00279     }
00280     delete[] tmpstr;
00281 }
00282
00283 // ADDING routines ---------------------------------------------------
00284
00285 int * Param::AddParamInt( const std::string &name,
00286                          const std::string &help, int deflt,
00287                          int min, int max ,char cmdshort, int Group)
00288 {
00289     if ( ParamMap_.find(name)!=ParamMap_.end() )
00290     {
00291         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00292         return NULL;
00293     }
00294
00295     ParamTypeInt * NewItem = new ParamTypeInt();
00296     BIASASSERT(NewItem!=NULL);
00297
00298     NewItem->Name_        = name;
00299     NewItem->Help_        = help;
00300     NewItem->ShortCmd_    = cmdshort;
00301     NewItem->Group_       = Group;
00302     NewItem->WriteToFile_ = true;
00303     NewItem->value_       = deflt;
00304     NewItem->default_     = deflt;
00305     NewItem->min_         = min;
00306     NewItem->max_         = max;
00307     pair<string, ParamTypeBase*> NewPair(name, NewItem);
00308     ParamMap_.insert(ParamMap_.end(), NewPair );
00309
00310     return &(NewItem->value_);;
00311 }
00312
00313
00314 bool * Param::AddParamBool( const std::string &name, const std::string &help,
00315                            bool deflt, char cmdshort, int Group )
00316 {
00317     if ( ParamMap_.find(name)!=ParamMap_.end() )
00318     {
00319         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00320         BIASABORT;
00321         //return NULL;
00322     }
00323     ParamTypeBool * NewItem = new ParamTypeBool();
00324     NewItem->Name_        = name;
00325     NewItem->Help_        = help;
00326     NewItem->ShortCmd_    = cmdshort;
00327     NewItem->Group_       = Group;
00328     NewItem->WriteToFile_ = true;
00329     NewItem->value_       = deflt;
00330     NewItem->default_     = deflt;
00331     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00332     ParamMap_.insert(ParamMap_.end(), NewPair );
00333     return &(NewItem->value_);
00334 }
00335
00336
00337 std::string * Param::AddParamString( const std::string &name,
00338                                     const std::string &help,
00339                                     std::string deflt, char cmdshort,
00340                                     int Group )
00341 {
00342     if ( ParamMap_.find(name)!=ParamMap_.end() )
00343     {
00344         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00345         return NULL;
00346     }
00347     ParamTypeString * NewItem = new ParamTypeString();
00348     NewItem->Name_        = name;
00349     NewItem->Help_        = help;
00350     NewItem->ShortCmd_    = cmdshort;
00351     NewItem->Group_       = Group;
00352     NewItem->WriteToFile_ = true;
00353     NewItem->value_       = deflt;
00354     NewItem->default_     = deflt;
00355     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00356     ParamMap_.insert(ParamMap_.end(), NewPair );
00357     return &(NewItem->value_);;
00358 }
00359
00360
00361 double * Param::AddParamDouble( const std::string &name,
00362                                const std::string &help,
00363                                double deflt,
00364                                double min, double max,
00365                                char cmdshort, int Group)
00366 {
00367     if ( ParamMap_.find(name)!=ParamMap_.end() )
00368     {
00369         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00370         BIASABORT;
00371         //return NULL;
00372     }
00373     ParamTypeDouble * NewItem = new ParamTypeDouble();
00374     NewItem->Name_        = name;
00375     NewItem->Help_        = help;
00376     NewItem->ShortCmd_    = cmdshort;
00377     NewItem->Group_       = Group;
00378     NewItem->WriteToFile_ = true;
00379     NewItem->value_       = deflt;
00380     NewItem->default_     = deflt;
00381     NewItem->min_         = min;
00382     NewItem->max_         = max;
00383     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00384     ParamMap_.insert(ParamMap_.end(), NewPair );
00385     return &(NewItem->value_);;
00386 }
00387
00388
00389 BIAS::Vector<double> * Param::AddParamVecDbl( const std::string &name,
00390                                              const std::string &help,
00391                                              const Vector<double> &deflt,
00392                                              char cmdshort, int Group )
00393 {
00394     if ( ParamMap_.find(name)!=ParamMap_.end() )
00395     {
00396         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00397         return NULL;
00398     }
00399     ParamTypeVecDbl * NewItem = new ParamTypeVecDbl();
00400     NewItem->Name_        = name;
00401     NewItem->Help_        = help;
00402     NewItem->Group_       = Group;
00403     NewItem->ShortCmd_    = cmdshort;
00404     NewItem->WriteToFile_ = true;
00405     NewItem->value_       = deflt;
00406     NewItem->default_     = deflt;
00407     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00408     ParamMap_.insert(ParamMap_.end(), NewPair );
00409     return &(NewItem->value_);
00410 }
00411
00412 BIAS::Vector<double> * Param::AddParamVecDbl( const std::string &name,
00413                                              const std::string &help,
00414                                              const std::string &deflt,
00415                                              char cmdshort,
00416                                              int Group )
00417 {
00418     std::vector<double> parsedValues;
00419     BIAS::Vector<double> values;
00420
00421     std::stringstream defStream(deflt);
00422     double temp;
00423     while (defStream.good()) {
00424         defStream>>temp;
00425         parsedValues.push_back(temp);
00426     }
00427     values.newsize(parsedValues.size());
00428     for (unsigned int i=0;i<parsedValues.size();i++)
00429         values[i]=parsedValues[i];
00430     return AddParamVecDbl(name, help, values, cmdshort,Group);
00431 }
00432
00433
00434 BIAS::Vector<int> * Param::AddParamVecInt( const std::string &name,
00435                                           const std::string &help,
00436                                           const Vector<int> &deflt,
00437                                           char cmdshort, int Group )
00438 {
00439     if ( ParamMap_.find(name)!=ParamMap_.end() )
00440     {
00441         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00442         return NULL;
00443     }
00444     ParamTypeVecInt * NewItem = new ParamTypeVecInt();
00445     NewItem->Name_        = name;
00446     NewItem->Help_        = help;
00447     NewItem->Group_       = Group;
00448     NewItem->ShortCmd_    = cmdshort;
00449     NewItem->WriteToFile_ = true;
00450     NewItem->value_       = deflt;
00451     NewItem->default_     = deflt;
00452     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00453     ParamMap_.insert(ParamMap_.end(), NewPair );
00454     return &(NewItem->value_);;
00455 }
00456
00457 BIAS::Vector<int> * Param::AddParamVecInt( const std::string &name,
00458                                           const std::string &help,
00459                                           const std::string &deflt,
00460                                           char cmdshort,
00461                                           int Group )
00462 {
00463     std::vector<int> parsedValues;
00464     BIAS::Vector<int> values;
00465
00466     std::stringstream defStream(deflt);
00467     int temp;
00468     while (defStream.good()) {
00469         defStream>>temp;
00470         parsedValues.push_back(temp);
00471     }
00472     values.newsize(parsedValues.size());
00473     for (unsigned int i=0;i<parsedValues.size();i++)
00474         values[i]=parsedValues[i];
00475     return AddParamVecInt(name, help, values, cmdshort,Group);
00476 }
00477
00478
00479 int * Param::AddParamEnum( const std::string &name,
00480                           const std::string &help,
00481                           const std::vector<std::string> &enums,
00482                           const int deflt,
00483                           const std::vector<int> * IDs,
00484                           const char cmdshort,
00485                           const int Group )
00486 {
00487     if ( ParamMap_.find(name)!=ParamMap_.end() )
00488     {
00489         BIASERR("Cannot add parameter "<<name<<". Already in list!");
00490         return NULL;
00491     }
00492     if ( enums.empty() )
00493     {
00494         BIASERR("At least one item is needed for enum type");
00495         return NULL;
00496     }
00497     if ( IDs != NULL && IDs->size() != enums.size() )
00498     {
00499         BIASERR("You gave "<<enums.size()<< "enums but "<<IDs->size()
00500             <<" ID values! Both numbers must be equal!");
00501         return NULL;
00502     }
00503     ParamTypeEnum * NewItem = new ParamTypeEnum();
00504     NewItem->Name_        = name;
00505     NewItem->Help_        = help;
00506     NewItem->Group_       = Group;
00507     NewItem->ShortCmd_    = cmdshort;
00508     NewItem->WriteToFile_ = true;
00509     NewItem->value_       = deflt;
00510     NewItem->default_     = deflt;
00511     pair<string,int> NewEnumPair;
00512     int newID;
00513     for(unsigned int i=0; i<enums.size(); i++)
00514     {
00515         newID = IDs?(*IDs)[i]:i;
00516         if ( NewItem->Map_.find(enums[i]) != NewItem->Map_.end() ) {
00517             BIASERR("Given enum IDs must be unique!");
00518             delete NewItem;
00519             return NULL;
00520         }
00521         NewEnumPair = make_pair(enums[i],newID );
00522         NewItem->Map_.insert(NewItem->Map_.end(), NewEnumPair);
00523     }
00524     //   if ( NewItem->Map_.find(deflt) == NewItem->Map_.end() )
00525     //     {
00526     //       BIASERR("The given default ID is not in the enum list!");
00527     //       delete NewItem;
00528     //       return NULL;
00529     //     }
00530     pair<string, ParamTypeBase*> NewPair(name,NewItem);
00531     ParamMap_.insert(ParamMap_.end(), NewPair );
00532     return &(NewItem->value_);
00533 }
00534
00535
00536 //////////////  CheckParam() ///////////////
00537
00538 bool Param::CheckParam(const std::string &name)
00539 {
00540     if ( ParamMap_.find(name) == ParamMap_.end() ) return false;
00541     else return true;
00542 }
00543
00544 // GETTING routines --------------------------------------------------
00545
00546 int * Param::GetParamInt( const std::string &name )const
00547 {
00548     CI it = ParamMap_.find(name);
00549     if ( it==ParamMap_.end() ){
00550         BIASERR("int parameter "<<name<<" not found!");
00551         //   BIASABORT;
00552         return NULL;
00553     }
00554     else if ( ParamTypeInt *item = dynamic_cast<ParamTypeInt*>(it->second) )
00555         return &(item->value_);
00556     else{
00557         BIASERR("Parameter "<<name<<" is not of type INTEGER!");
00558         return NULL;
00559     }
00560 }
00561
00562
00563 bool * Param::GetParamBool( const std::string &name )const
00564 {
00565     CI it = ParamMap_.find(name);
00566     if ( it==ParamMap_.end() ){
00567         BIASERR("bool parameter "<<name<<" not found!");
00568         return NULL;
00569     }
00570     else if ( ParamTypeBool *item = dynamic_cast<ParamTypeBool*>(it->second) )
00571         return &(item->value_);
00572     else{
00573         BIASERR("Parameter "<<name<<" is not of type BOOLEAN!");
00574         return NULL;
00575     }
00576 }
00577
00578
00579 std::string * Param::GetParamString( const std::string &name )const
00580 {
00581     CI it = ParamMap_.find(name);
00582     if ( it==ParamMap_.end() ){
00583         BIASERR("string parameter "<<name<<" not found!");
00584         return NULL;
00585     }
00586     else if (ParamTypeString *item=dynamic_cast<ParamTypeString*>(it->second))
00587         return &(item->value_);
00588     else{
00589         BIASERR("Parameter "<<name<<" is not of type STRING!");
00590         return NULL;
00591     }
00592 }
00593
00594
00595 double * Param::GetParamDouble( const std::string &name )const
00596 {
00597     CI it = ParamMap_.find(name);
00598     if ( it==ParamMap_.end() ){
00599         BIASERR("double parameter "<<name<<" not found!");
00600         //    BIASABORT;
00601         return NULL;
00602     }
00603     else if (ParamTypeDouble *item=dynamic_cast<ParamTypeDouble*>(it->second))
00604         return &(item->value_);
00605     else{
00606         BIASERR("Parameter "<<name<<" is not of type DOUBLE!");
00607         return NULL;
00608     }
00609 }
00610
00611
00612 BIAS::Vector<double> * Param::GetParamVecDbl( const std::string &name )const
00613 {
00614     CI it = ParamMap_.find(name);
00615     if ( it==ParamMap_.end() ){
00616         BIASERR("vecdbl parameter "<<name<<" not found!");
00617         return NULL;
00618     }
00619     else if (ParamTypeVecDbl *item=dynamic_cast<ParamTypeVecDbl*>(it->second))
00620         return &(item->value_);
00621     else{
00622         BIASERR("Parameter "<<name<<" is not of type VECTOR OF DOUBLE!");
00623         return NULL;
00624     }
00625 }
00626
00627
00628 BIAS::Vector<int> * Param::GetParamVecInt( const std::string &name )const
00629 {
00630     CI it = ParamMap_.find(name);
00631     if ( it==ParamMap_.end() ){
00632         BIASERR("vecint parameter "<<name<<" not found!");
00633         return NULL;
00634     }
00635     else if (ParamTypeVecInt *item=dynamic_cast<ParamTypeVecInt*>(it->second))
00636         return &(item->value_);
00637     else{
00638         BIASERR("Parameter "<<name<<" is not of type VECTOR OF INTEGER!");
00639         return NULL;
00640     }
00641 }
00642
00643
00644 int * Param::GetParamEnum( const std::string &name )const
00645 {
00646     CI it = ParamMap_.find(name);
00647     if ( it==ParamMap_.end() ){
00648         BIASERR("enum parameter \""<<name<<"\" not found!");
00649         return NULL;
00650     }
00651     else if ( ParamTypeEnum *item = dynamic_cast<ParamTypeEnum*>(it->second) )
00652         return &(item->value_);
00653     else{
00654         BIASERR("Parameter "<<name<<" is not of type ENUM!");
00655         return NULL;
00656     }
00657 }
00658
00659 // SETTING routines --------------------------------------------------
00660
00661 int * Param::SetParamInt( const std::string &name, const int &value )
00662 {
00663     CI it = ParamMap_.find(name);
00664     if ( it==ParamMap_.end() )
00665     {
00666         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00667             <<" aborting!");
00668         BIASABORT;
00669         //return NULL;
00670     }
00671     if ( ParamTypeInt *item = dynamic_cast<ParamTypeInt*>(it->second) )
00672     {
00673         if ( value < item->min_ || value > item->max_ )
00674         {
00675             BIASERR("Valid values for \""<<name<<"\" are between "
00676                 <<item->min_<<" and "<<item->max_<<"!");
00677             return NULL;
00678         }
00679         item->value_ = value;
00680         return &(item->value_);
00681     }
00682     else
00683     {
00684         BIASERR("Parameter "<<name<<" is not of type INTEGER!");
00685         return NULL;
00686     }
00687 }
00688
00689
00690 bool * Param::SetParamBool( const std::string &name, const bool &value )
00691 {
00692     CI it = ParamMap_.find(name);
00693     if ( it==ParamMap_.end() )
00694     {
00695         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00696             <<" aborting!");
00697         BIASABORT;
00698         //return NULL;
00699     }
00700     if ( ParamTypeBool *item = dynamic_cast<ParamTypeBool*>(it->second) )
00701     {
00702         item->value_ = value;
00703         return &(item->value_);
00704     }
00705     else
00706     {
00707         BIASERR("Parameter "<<name<<" is not of type BOOLEAN!");
00708         return NULL;
00709     }
00710 }
00711
00712
00713 std::string * Param::SetParamString( const std::string &name,
00714                                     const std::string &value )
00715 {
00716     CI it = ParamMap_.find(name);
00717     if ( it==ParamMap_.end() )
00718     {
00719         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00720             <<" aborting!");
00721         BIASABORT;
00722         //return NULL;
00723     }
00724     if ( ParamTypeString *item = dynamic_cast<ParamTypeString*>(it->second) )
00725     {
00726         item->value_ = value;
00727         return &(item->value_);
00728     }
00729     else
00730     {
00731         BIASERR("Parameter "<<name<<" is not of type STRING!");
00732         return NULL;
00733     }
00734 }
00735
00736
00737 double * Param::SetParamDouble( const std::string &name, const double &value )
00738 {
00739     CI it = ParamMap_.find(name);
00740     if ( it==ParamMap_.end() )
00741     {
00742         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00743             <<" aborting!");
00744         BIASABORT;
00745         //return NULL;
00746     }
00747     if ( ParamTypeDouble *item = dynamic_cast<ParamTypeDouble*>(it->second) )
00748     {
00749         if ( value < item->min_ || value > item->max_ )
00750         {
00751             BIASERR("Valid values for "<<name<<" are between "
00752                 <<item->min_<<" and "<<item->max_<<"!");
00753             return NULL;
00754         }
00755         item->value_ = value;
00756         return &(item->value_);
00757     }
00758     else
00759     {
00760         BIASERR("Parameter "<<name<<" is not of type DOUBLE!");
00761         return NULL;
00762     }
00763 }
00764
00765
00766 BIAS::Vector<double> * Param::SetParamVecDbl( const std::string &name,
00767                                              const Vector<double> &value )
00768 {
00769     CI it = ParamMap_.find(name);
00770     if ( it==ParamMap_.end() )
00771     {
00772         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00773             <<" aborting!");
00774         BIASABORT;
00775         //return NULL;
00776     }
00777     if ( ParamTypeVecDbl *item = dynamic_cast<ParamTypeVecDbl*>(it->second) )
00778     {
00779         //       if ( value.size() != item->default_.size() )
00780         //         {
00781         //           BIASERR("New vector for "<<name<<" must be of size "
00782         //                   <<item->default_.size()<<" but this one's is "
00783         //                   <<value.size()<<"!");
00784         //           return NULL;
00785         //         }
00786         item->value_ = value;
00787         return &(item->value_);
00788     }
00789     else
00790     {
00791         BIASERR("Parameter "<<name<<" is not of type VECTOR OF DOUBLE!");
00792         return NULL;
00793     }
00794 }
00795
00796
00797 BIAS::Vector<int> * Param::SetParamVecInt( const std::string &name,
00798                                           const Vector<int> &value )
00799 {
00800     CI it = ParamMap_.find(name);
00801     if ( it==ParamMap_.end() )
00802     {
00803         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00804             <<" aborting!");
00805         BIASABORT;
00806         //return NULL;
00807     }
00808     if ( ParamTypeVecInt *item = dynamic_cast<ParamTypeVecInt*>(it->second) )
00809     {
00810         //       if ( value.size() != item->default_.size() )
00811         //         {
00812         //           BIASERR("New vector for "<<name<<" must be of size "
00813         //                   <<item->default_.size()<<" but this one's is "
00814         //                   <<value.size()<<"!");
00815         //           return NULL;
00816         //         }
00817         item->value_ = value;
00818         return &(item->value_);
00819     }
00820     else
00821     {
00822         BIASERR("Parameter "<<name<<" is not of type VECTOR OF INTEGER!");
00823         return NULL;
00824     }
00825 }
00826
00827
00828 int * Param::SetParamEnum( const std::string &name,const std::string &value )
00829 {
00830     CI it = ParamMap_.find(name);
00831     if ( it==ParamMap_.end() )
00832     {
00833         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00834             <<" aborting!");
00835         BIASABORT;
00836         //return NULL;
00837     }
00838     if ( ParamTypeEnum *item = dynamic_cast<ParamTypeEnum*>(it->second) )
00839     {
00840         map<string,int>::iterator it;
00841         if ( (it=item->Map_.find(value)) == item->Map_.end() ) {
00842             BIASERR(value << " is not a valid ID for this enum!");
00843             return NULL;
00844         }
00845         item->value_ = it->second;
00846         return &(item->value_);
00847     }
00848     else
00849     {
00850         BIASERR("Parameter "<<name<<" is not of type ENUM!");
00851         return NULL;
00852     }
00853 }
00854
00855
00856 int * Param::SetParamEnum( const std::string &name, const int &value )
00857 {
00858     CI it = ParamMap_.find(name);
00859     if ( it==ParamMap_.end() )
00860     {
00861         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00862             <<" aborting!");
00863         BIASABORT;
00864         //return NULL;
00865     }
00866     if ( ParamTypeEnum *item = dynamic_cast<ParamTypeEnum*>(it->second) ) {
00867         // rush through map and if value is valid, set it
00868         map<string, int>::iterator it;
00869         for(it=item->Map_.begin(); it!=item->Map_.end(); it++)
00870             if ( it->second == value ){
00871                 item->value_ = value;
00872                 return &(item->value_);
00873             }
00874             BIASERR(value << " is not in this enum!");
00875             return NULL;
00876     }
00877     else {
00878         BIASERR("Parameter "<<name<<" is not of type ENUM!");
00879         return NULL;
00880     }
00881 }
00882
00883
00884 int Param::SetParameterWriteToFile(const std::string &name, bool writeToFile)
00885 {
00886     CI it = ParamMap_.find(name);
00887     if ( it==ParamMap_.end() )
00888     {
00889         BIASERR("Parameter \""<<name<<"\" not found, cannot set parameter,"
00890             <<" aborting!");
00891         BIASABORT;
00892         //return -1;
00893     }
00894     it->second->WriteToFile_ = writeToFile;
00895     return 0;
00896 }
00897
00898 int Param::SetEnhancedFlag(const std::string &name, bool enhanced)
00899 {
00900     CI it = ParamMap_.find(name);
00901     if ( it==ParamMap_.end() )
00902     {
00903         BIASERR("Parameter \""<<name<<"\" not found, cannot set to enhanced, "
00904             <<" aborting!");
00905         BIASABORT;
00906         //return -1;
00907     }
00908     it->second->Enhanced_ = enhanced;
00909     return 0;
00910 }
00911
00912 int Param::SetHiddenFlag(const std::string &name, bool hidden)
00913 {
00914     CI it = ParamMap_.find(name);
00915     if ( it==ParamMap_.end() )
00916     {
00917         BIASERR("Parameter \""<<name<<"\" not found, cannot set to hidden, "
00918             <<" aborting!");
00919         BIASABORT;
00920         //return -1;
00921     }
00922     it->second->Hidden_ = hidden;
00923     return 0;
00924 }
00925
00926 // command line and file processing methods --------------------------
00927
00928 int Param::UpdateParameter(int &argc, char *argv[],
00929                            const std::string &default_filename)
00930 {
00931     int res;
00932     // provide a default file name to readconfig
00933     *GetParamString("readconfig")=default_filename;
00934     res = ParseCommandLine(argc, argv);
00935     string *name=GetParamString("writeconfig");
00936     bool *expert=GetParamBool("expert");
00937
00938     if (*name!="") {
00939         //cerr << "*name "<<*name<<endl;
00940         // comments on !
00941         SetWriteOptions(WriteIndent_,true,WriteEnhanced_ || *expert);
00942         WriteParameter(*name);
00943         BIASDOUT(D_PARAM_CONF_FILE, "wrote default param file "
00944             <<default_filename<<endl);
00945     } else {
00946         // write default parameter file if no parameter file given and default
00947         // file not found
00948         if (*GetParamString("readconfig")==default_filename) {
00949             BIASDOUT(D_PARAM_CONF_FILE, "using default param file "
00950                 <<default_filename<<endl);
00951             ifstream is(default_filename.c_str());
00952             if (!is) {
00953                 is.close();
00954                 SetWriteOptions(WriteIndent_,false,WriteEnhanced_|| *expert); // comments off
00955                 WriteParameter(default_filename);
00956                 BIASDOUT(D_PARAM_CONF_FILE, "wrote default param file "
00957                     <<default_filename<<endl);
00958             } else {
00959                 is.close();
00960                 BIASDOUT(D_PARAM_CONF_FILE, "found default param file "
00961                     <<default_filename<<endl);
00962             }
00963         } else {
00964             BIASDOUT(D_PARAM_CONF_FILE, "using user given param file "
00965                 <<*GetParamString("readconfig")<<endl);
00966         }
00967     }
00968     return res;
00969 }
00970
00971 int Param::ParseCommandLine(int &argc, char *argv[])
00972 {
00973     // if no arguments are given on Cmdl, return index to last non-opt: 1
00974     string *readPrj;
00975     if (argc==1) {
00976         // read configuration file if one is given (see UpdateParameter)
00977         if ( (readPrj = GetParamString("readconfig"))!=NULL ){
00978             if (*readPrj != ""){
00979                 //cout <<"Reading configuration from file: "<<*readPrj<<endl;
00980                 BIASDOUT(D_PARAM_CONF_FILE, "Reading configuration from file: "
00981                     <<*readPrj<<endl);
00982                 if (ReadParameter(*readPrj)<0) return -1;
00983             }
00984         }
00985         return 1;
00986     }
00987     BIASDOUT(D_PARAM_PARSECMDL,"Param::ParseCommandLine()");
00988
00989     // fisrt get a copy of all that if we not already have one
00990     if (ArgV_.size() ==0)
00991         for ( int i=0;i<argc; i++)
00992             ArgV_.push_back(argv[i]);
00993
00994     //BIASDOUT(D_PARAM_PARSECMDL,"NumParams_: "<<ParamMap_.size());
00995     int itemcount = 0;
00996     // there are NumParams_ shortopts maximum, each may have one arg,
00997     // plus trailing 0
00998     char *shortoptstring=new char[ParamMap_.size()*3+1];
00999     bool bReadConfig =true, bParse=true;
01000     while (bParse) {
01001         // set string empty
01002         shortoptstring[0] = 0;
01003         itemcount = 0;
01004         char tmpstr[2];
01005         tmpstr[1] = 0;
01006
01007         // prepare array of longopts for getopt_long()
01008         // last element must be zeored
01009         longopts = new struct option[ParamMap_.size()+1];
01010         memset(&longopts[ParamMap_.size()], 0, sizeof(struct option));
01011
01012         // traverse list of parameters and fill in longopts[]
01013
01014         for (CI it=ParamMap_.begin(); it!=ParamMap_.end(); ++it)
01015         {
01016             longopts[itemcount].name = (it->first).c_str();
01017             // only type BOOL has an optional argument
01018             if ( dynamic_cast<ParamTypeBool*>(it->second) != NULL )
01019                 longopts[itemcount].has_arg = optional_argument;
01020             else longopts[itemcount].has_arg = required_argument;
01021
01022             // set .flag to NULL, then .val is returned from getopt_long()
01023             longopts[itemcount].flag = NULL;
01024             // set .val to itemcount+offset let us find the target in ParamList_
01025             // much faster. Offset is required to differ from shortopt char
01026             longopts[itemcount].val = itemcount+1000;
01027
01028             // prepare shortoptstring
01029             if ( it->second->ShortCmd_!=0 ) {
01030                 tmpstr[0] = it->second->ShortCmd_;
01031                 strcat(shortoptstring, tmpstr);
01032                 // append ':' to shortopstring for arguments to options
01033                 strcat(shortoptstring, ":");
01034                 // append a second ':' to bool, for optional argument
01035                 if ( dynamic_cast<ParamTypeBool*>(it->second) != NULL)
01036                     strcat(shortoptstring, ":");
01037             }
01038             itemcount++;
01039         }
01040         // reset optind to start scanning from 0
01041         optind = 0;
01042
01043         bool done = false;
01044         int short_or_index=0;
01045         // now scan
01046         while (!done)
01047         {
01048             // getopt_long() returns a char if the short option was found
01049             // if the long option was found, the longopts.val is returned
01050             // in this case the index to longopts[] + 1000
01051             //getopt_long not present in WIN32
01052             short_or_index = ::getopt_long(argc, argv, shortoptstring,
01053                 longopts, NULL);
01054             //        short_or_index = getopt(argc, argv, shortoptstring);
01055
01056             // '?' means unknown option, ':' means missing argument
01057             if (short_or_index == '?' || short_or_index == ':') {
01058                 delete [] longopts;
01059                 Usage();
01060                 return -1;
01061             }
01062
01063             if (short_or_index == -1)
01064                 done = true;
01065             else
01066             {
01067                 // decide if short or long found
01068                 CI it;
01069                 if (short_or_index >=1000){
01070                     // long opt found, take name from longopts and search in map
01071                     int index = short_or_index -1000;
01072                     it = ParamMap_.find(longopts[index].name);
01073                     BIASDOUT(D_PARAM_PARSECMDL,"longopt at "<<index
01074                         <<" : "<<it->first);
01075                 }
01076                 else{
01077                     for(it=ParamMap_.begin();it!=ParamMap_.end(); it++)
01078                         if ( it->second->ShortCmd_==short_or_index ){
01079                             BIASDOUT(D_PARAM_PARSECMDL,"shortopt with "
01080                                 <<(char)short_or_index<<" : "<<it->first);
01081                             break;
01082                         }
01083                 }
01084                 // if optarg ==NUL, user specified a bool switch and no argument
01085                 // or argument is not connected with '=', so fake argument
01086                 if (optarg == NULL) optarg="true";
01087                 // this calls the method from the correct class to insert into
01088                 // (late binding magic)
01089                 it->second->SetFromString(optarg);
01090             } // else if (short_or_index == -1)
01091         } //while ()
01092         /// this delete let the program bail out. but it realy should be deleted
01093         delete[] longopts;
01094
01095         //// check for readconfigXML and readconfig
01096         if (bReadConfig){
01097 #ifdef BIAS_HAVE_XML2
01098             if ( (*(readPrj = GetParamString("readconfigXML")))!="" ){
01099                 //cout <<"Reading configuration from XML-file: "<<*readPrj<<endl;
01100                 BIASDOUT(D_PARAM_CONF_FILE, "Reading configuration from XML-file: "
01101                     <<*readPrj<<endl);
01102                 if (ReadParameterXML(*readPrj)<0) return -1;
01103                 // second parse to let cmdl override config file
01104                 else bParse=true;
01105             } else
01106 #endif
01107                 if ( (*(readPrj = GetParamString("readconfig")))!="" ){
01108                     //cout <<"Reading configuration from file: "<<*readPrj<<endl;
01109                     BIASDOUT(D_PARAM_CONF_FILE, "Reading configuration from file: "
01110                         <<*readPrj<<endl);
01111                     if (ReadParameter(*readPrj)<0) return -1;
01112                     // second parse to let cmdl override config file
01113                     else bParse=true;
01114                 } else {
01115                     bParse=false;
01116                     BIASDOUT(D_PARAM_CONF_FILE, "no configuration file given\n");
01117                 }
01118                 bReadConfig=false;
01119         } else {
01120             bParse=false;
01121         }
01122     } // end while bParse
01123
01124     string *writePrj;
01125
01126     // now eventually write config
01127     if (*(writePrj=GetParamString("writeconfig")) != "") {
01128         string s = *writePrj;
01129         SetParamString("writeconfig",(string)"");
01130         bool *expert=GetParamBool("expert");
01131         SetWriteOptions(WriteIndent_,WriteComments_,WriteEnhanced_ || *expert);
01132         WriteParameter(s);
01133     }
01134
01135 #ifdef BIAS_HAVE_XML2
01136     // now eventually write config to XML-file
01137     if (*(writePrj=GetParamString("writeconfigXML")) != "") {
01138         string s = *writePrj;
01139         SetParamString("writeconfigXML",(string)"");
01140         bool *expert=GetParamBool("expert");
01141         SetWriteOptions(WriteIndent_,WriteComments_,WriteEnhanced_ || *expert);
01142         WriteParameterXML(s);
01143     }
01144 #endif
01145
01146
01147     delete[] shortoptstring;
01148     return optind;
01149 }//////////////// End of ParseCommandLine()
01150
01151
01152 #define READPARAM_CHECKDUPES
01153 int Param::ReadParameter(const string &filename)
01154 {
01155     ifstream ifs;
01156     string typestr;
01157     string namestr;
01158     string assignstr;
01159     string valstr;
01160     char commentstr[1000];
01161     CI it; // const iterator for our ParamMap_
01162     int line = 0;
01163
01164 #ifdef READPARAM_CHECKDUPES
01165     map<string,bool> *ExistingNames = new map<string,bool>;
01166     string current;
01167 #endif
01168
01169
01170     ifs.open(filename.c_str());
01171     if (!ifs) {
01172         BIASERR("error reading parameter file: "<<filename);
01173         ifs.close();
01174         return -1;
01175     }
01176     while (ifs) {
01177
01178         line++;
01179
01180         // try read one word, may be type or comment sign
01181         ifs >>  namestr;
01182         if (namestr[0] == '#') {
01183             ifs.getline(commentstr,sizeof(commentstr),'\n');
01184             BIASDOUT(D_PARAM_IO,"Comment read: "<<namestr<<commentstr);
01185
01186         }
01187         else {
01188             ifs >> assignstr >>valstr ;
01189             // detect strings with whitespace and read them
01190             if (valstr[0] == '"' && valstr[valstr.length()-1] != '"') {
01191                 char c = 0;
01192                 while ( c != '\"') {
01193                     ifs.read(&c,1);
01194                     valstr.append(1,c);
01195                 }
01196             }
01197
01198             ifs >> typestr;
01199             if (ifs) {
01200                 //  cout <<"read: "<<typestr<<" "<<namestr<<" "<<assignstr<<" "<<valstr
01201                 //       <<endl;
01202 #ifdef READPARAM_CHECKDUPES
01203                 current = (string)namestr;
01204                 //cout << "checking line " << line << " name "<<current<<endl;
01205                 if ( ExistingNames->find(current) != ExistingNames->end() ){
01206                     cerr <<"Oops! Found duplicate parameter '" << current
01207                         << "' in line " << line << " of file '" << filename
01208                         << "' " << endl;
01209                     ifs.close();
01210                     return -2;
01211                 }
01212                 else{
01213                     pair<string, bool> NewPair(current,true);
01214                     ExistingNames->insert(ExistingNames->end(), NewPair );
01215                 };
01216
01217 #endif
01218                 // remove double-quotes where necessary
01219                 if (valstr[0] == '"' && valstr[valstr.length()-1] == '"') {
01220                     valstr = valstr.substr(1,valstr.length()-2);
01221                 }
01222                 //  cout <<"read: "<<typestr<<" "<<namestr<<" "<<assignstr<<" "<<valstr
01223                 //       <<endl;
01224
01225                 if ( (it=ParamMap_.find(namestr))==ParamMap_.end() ){
01226           cerr<<"Unknown parameter \""<<namestr
01227               <<"\" in file "<<filename<<" line: "<<line<<endl;
01228                     //           ShowData();
01229                     //           BIASABORT;
01230                 }
01231                 else {
01232                     // this calls the method from the correct class to insert
01233                     // to (late binding magic)
01234                     it->second->SetFromString(valstr);
01235                     BIASDOUT(D_PARAM_IO, filename<<" parameter: "<<namestr
01236                         <<" type: "<<typestr << " valstr: "<<valstr);
01237                 } // if (item == NULL) else {
01238             } // if(ifs)
01239         } // if (comment) else {
01240     } // While (ifs)
01241     ifs.close();
01242
01243 #ifdef READPARAM_CHECKDUPES
01244     delete ExistingNames;
01245 #endif
01246     return 0;
01247 }
01248
01249 #ifdef BIAS_HAVE_XML2
01250
01251 int Param::ReadParameterXML(const string &filename)
01252 {
01253     // Tree for XML-file...
01254     XMLIO tree;
01255     // vector for SubGroup nodes
01256     vector<xmlNodePtr> subgroups;
01257     // namestring for params
01258     string paramname;
01259     string attribType;
01260
01261     // read XML-file
01262     xmlNodePtr root = tree.read(filename);
01263
01264     // if not successful
01265     if (root == NULL){
01266         // exit with error -1
01267         BIASERR("Error reading XML-file: " << filename << endl);
01268         return -1;
01269     }
01270
01271     xmlNodePtr parent = root;
01272     xmlNodePtr child = tree.getFirstChild(parent);
01273
01274     // for all child-nodes...
01275     bool done=false;
01276     while (!done)
01277     {
01278         // if child is a groupnode...
01279         if ((tree.getAttributeName(tree.getFirstAttribute(child)) == "SubGroup")||
01280             (tree.getAttributeName(tree.getFirstAttribute(child)) == "GroupID")) {
01281                 // ...remind the node for descend...
01282                 subgroups.push_back(child);
01283             } else {
01284                 // ...else get type of param, ...
01285                 xmlAttrPtr attrib = tree.getFirstAttribute(child);
01286                 while (tree.getAttributeName(attrib) != "Type") {
01287                     attrib = tree.getNextAttribute();
01288                 }
01289                 attribType = tree.getAttributeValueString(attrib);
01290
01291                 // ...get parametername...
01292                 attrib = tree.getFirstAttribute(child);
01293                 while (tree.getAttributeName(attrib) != "Name") {
01294                     attrib = tree.getNextAttribute();
01295                 }
01296                 paramname = tree.getAttributeValueString(attrib);
01297
01298                 // ... save value...
01299                 attrib = tree.getFirstAttribute(child);
01300                 while (tree.getAttributeName(attrib) != "Value") {
01301                     attrib = tree.getNextAttribute();
01302                 }
01303                 if (attribType == "STRING") {
01304                     SetParamString(paramname, tree.getAttributeValueString(attrib));
01305                 } else if (attribType == "INT") {
01306                     SetParamInt(paramname, tree.getAttributeValueInt(attrib));
01307                 } else if (attribType == "DOUBLE"){
01308                     SetParamDouble(paramname, tree.getAttributeValueDouble(attrib));
01309                 } else if (attribType == "BOOL"){
01310                     SetParamBool(paramname, tree.getAttributeValueBool(attrib));
01311                 } else if (attribType == "VECDBL"){
01312                     SetParamVecDbl(paramname, tree.getAttributeValueVecDbl(attrib));
01313                 } else if (attribType == "VECINT"){
01314                     SetParamVecInt(paramname, tree.getAttributeValueVecInt(attrib));
01315                 } else if (attribType == "ENUM"){
01316                     SetParamEnum(paramname, tree.getAttributeValueString(attrib));
01317                 } else {
01318                     BIASERR("Unknown parametertype: " << attribType << endl);
01319                     return -1;
01320                 }
01321
01322                 //... and set enhanced flag for param
01323                 attrib = tree.getFirstAttribute(child);
01324                 while (tree.getAttributeName(attrib) != "Enhanced") {
01325                     attrib = tree.getNextAttribute();
01326                 }
01327                 SetEnhancedFlag(paramname, tree.getAttributeValueBool(attrib));
01328             }
01329
01330             child = tree.getNextChild();
01331             if ((child == NULL)&&(subgroups.size()>0)) {
01332                 // if all childs done but at least one subgroup left --> descend
01333                 parent = subgroups[subgroups.size()-1];
01334                 subgroups.pop_back();
01335                 child = tree.getFirstChild(parent);
01336             } else
01337                 // if all childs done and no subgroups left --> end
01338                 if ((child == NULL)&&(subgroups.size()==0)) {
01339                     done=true;
01340                     break;
01341                 }
01342
01343     }
01344
01345     return 0;
01346 }
01347
01348 #endif
01349
01350 int Param::GetFreeGroupID()
01351 {
01352     vector<int> gv=UniqueSortedGroups();
01353     if (gv.size()==0){
01354         return 0;
01355     }
01356     return (*(gv.rbegin()))+1;
01357 }
01358
01359 int Param::GetGroupID(const string &name)
01360 {
01361     CI it = ParamMap_.find(name);
01362     if (it != ParamMap_.end()){
01363         return it->second->Group_;
01364     }
01365     BIASERR("no parameter with name "<<name);
01366     return GRP_ALL;
01367 }
01368
01369 int Param::GetGroupIDForGroupName(const string &name)
01370 {
01371     for (unsigned int i=0;i<GroupNames_.size();i++)
01372         if (GroupNames_[i] == name) return i;
01373     return GRP_ALL;
01374 }
01375
01376
01377 int Param::SetGroupName(const int id, const string& name)
01378 {
01379     int res=0;
01380     vector<int> ids=UniqueSortedGroups();
01381     if (find(ids.begin(), ids.end(), id)==ids.end()){
01382         BIASERR("unused group id "<<id);
01383         BIASABORT;
01384         //res=-1;
01385     } else {
01386         if (((*ids.rbegin())+1)>(int)GroupNames_.size()){
01387             GroupNames_.resize((*ids.rbegin())+1, "");
01388         }
01389         GroupNames_[id]=name;
01390     }
01391     return res;
01392 }
01393
01394 std::string Param::GetGroupName(const int group_id)
01395 {
01396     if (group_id==GRP_ALL){
01397         return "all";
01398     }
01399     if (group_id==GRP_NOSHOW){
01400         return "no show";
01401     }
01402     if (group_id>(int)(GroupNames_.size())-1 || group_id<0){
01403         BIASERR("invalid group id or no name given");
01404         //BIASABORT;
01405         return "";
01406     }
01407     return GroupNames_[group_id];
01408 }
01409
01410
01411 vector<int> Param::UniqueSortedGroups()
01412 {
01413     vector<int> res;
01414     CI it;
01415     for (it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01416         if (it->second->WriteToFile_) res.push_back(it->second->Group_);
01417     }
01418     sort(res.begin(), res.end());
01419     vector<int>::iterator end = unique(res.begin(), res.end());
01420     res.erase(end, res.end());
01421     return res;
01422 }
01423
01424 bool Param::IsUsedGroupID(const int group_id)
01425 {
01426     vector<int> ids=UniqueSortedGroups();
01427     return (find(ids.begin(), ids.end(), group_id)!=ids.end());
01428 }
01429
01430 int Param::GetSizeOfLongestParamName()
01431 {
01432     unsigned length=0;
01433     // search for longest name
01434     for (CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01435         if (it->second->Name_.size()>length &&
01436             !it->second->Enhanced_ && !it->second->Hidden_)
01437             length=it->second->Name_.size();
01438     }
01439     return (int)length;
01440 }
01441
01442 int Param::GetSizeOfLongestParamValueString()
01443 {
01444     unsigned length=0;
01445     // search for longest name
01446     for (CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01447         if (it->second->GetValueString().size()>length &&
01448             !it->second->Enhanced_ && !it->second->Hidden_)
01449             length=it->second->GetValueString().size();
01450     }
01451     return (int)length;
01452 }
01453
01454
01455
01456
01457 int Param::WriteParameter(const string &filename)
01458 {
01459     ofstream ofs;
01460     // search for longest name to set namew
01461     int namew=GetSizeOfLongestParamName()+2, typew=12;
01462     int valuew=GetSizeOfLongestParamValueString()+2;
01463     if (WriteIndent_) {
01464         namew=(namew<20)?(20):namew;
01465         valuew=(valuew<7)?(7):valuew;
01466     }
01467     else {
01468         namew = 0;
01469         valuew = 0;
01470     }
01471     ofs.open(filename.c_str());
01472     if ( !ofs.is_open() )
01473         BIASERR( "File '" << filename << "' not opened!" << endl);
01474
01475     ostringstream oss;
01476     vector<int> grps=UniqueSortedGroups();
01477     vector<int>::iterator git;
01478     for (git=grps.begin(); git!=grps.end(); git++){
01479         // dont write empty group headers into the parameter file:
01480         bool ThisGroupInUse = false;
01481         for ( CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01482             if (it->second->WriteToFile_ && it->second->Group_ == *git
01483                 && (WriteEnhanced_ || (!(*it).second->Enhanced_)) &&
01484                 (!(*it).second->Hidden_)) {
01485                     ThisGroupInUse = true;
01486                     break;
01487                 }
01488         }
01489         if (!ThisGroupInUse) continue;
01490
01491         // this group will have at least one entry, write headline
01492         ofs <<"\n############### Group ID "<<*git<<" : "<<GetGroupName(*git)
01493             <<" #######################\n";
01494
01495         // now write the group members
01496         for ( CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01497             if (it->second->WriteToFile_ && it->second->Group_ == *git
01498                 && (WriteEnhanced_ || (!(*it).second->Enhanced_)) &&
01499                 (!(*it).second->Hidden_))
01500             {
01501                 oss.str("");
01502                 if (WriteComments_)
01503                     // first, write name with comment
01504                     ofs <<endl<<"# "<<it->second->Name_<<":  "<<it->second->GetHint()
01505                     <<endl<<"# "<<it->second->Help_<<endl;
01506                 // second write name = value
01507                 oss <<setw(namew)<<it->first<<" = "
01508                     <<setw(valuew)<<left<<it->second->GetValueString()<<right
01509                     <<"  " ;
01510                 while (oss.str().size() <40) oss<<" ";
01511                 ofs <<oss.str();
01512                 oss.str("");
01513                 // third write type name
01514                 oss << "PARAM_"<<it->second->GetTypeName();
01515                 ofs << setw(typew) << oss.str()<< endl;
01516             }
01517         }
01518     }
01519     ofs.close();
01520     return 0;
01521 }
01522
01523 #ifdef BIAS_HAVE_XML2
01524
01525 int Param::WriteParameterXML(const string &filename)
01526 {
01527     // Tree for XML-file...
01528     XMLIO tree;
01529     // ...create base-node
01530     xmlNodePtr root = tree.create("XMLParamfile");
01531     tree.addAttribute(root, "Version", 0.1);
01532
01533     stringstream tempString;
01534
01535     vector<int> grps=UniqueSortedGroups();
01536     vector<int>::iterator git;
01537     for (git=grps.begin(); git!=grps.end(); git++){
01538         // dont write empty group headers into the parameter file:
01539         bool ThisGroupInUse = false;
01540         for ( CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01541             if (it->second->WriteToFile_ && it->second->Group_ == *git
01542                 && (WriteEnhanced_ || (!(*it).second->Enhanced_)) &&
01543                 (!(*it).second->Hidden_)) {
01544                     ThisGroupInUse = true;
01545                     break;
01546                 }
01547         }
01548         if (!ThisGroupInUse) continue;
01549
01550         // this group will have at least one entry, create group-node...
01551         // ... but first erase blanks in group-name and add ID
01552         {
01553             const char *groupName = (GetGroupName(*git)).c_str();
01554             int i=0;
01555             tempString << "Group_" << *git << "_";
01556             while (groupName[i] != 0) {
01557                 if (groupName[i] == ' ') {
01558                     tempString << '_';
01559                 } else {
01560                     tempString << groupName[i];
01561                 }
01562                 i++;
01563             }
01564         }
01565
01566         xmlNodePtr groupNode = tree.addChildNode(root, tempString.str());
01567         if (groupNode == NULL) {
01568             BIASERR("Error creating group: " + tempString.str() +
01569                 " / " + GetGroupName(*git));
01570             return -1;
01571         }
01572         tempString.str("");
01573         tree.addAttribute(groupNode, "GroupID", *git);
01574
01575         // now create the group's member-nodes
01576         for ( CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++){
01577             if (it->second->WriteToFile_ && it->second->Group_ == *git
01578                 && (WriteEnhanced_ || (!(*it).second->Enhanced_)) &&
01579                 (!(*it).second->Hidden_))
01580             {
01581
01582                 xmlNodePtr lastNode = groupNode;
01583                 std::string name = it->first;
01584                 std::string::size_type lastFound = std::string::npos;
01585                 std::string::size_type found = name.rfind('-');
01586                 int depth = 1;
01587                 while (found != string::npos){
01588                     tempString << name.substr(found+1, lastFound-found);
01589                     lastFound = found-1;
01590
01591                     xmlNodePtr temp = tree.getChild(lastNode, tempString.str());
01592                     if (temp == NULL){
01593                         lastNode = tree.addChildNode(lastNode, tempString.str());
01594                         if (lastNode == NULL){
01595                             BIASERR("Error creating SubGroup: " + tempString.str() +
01596                                 " / " + name);
01597                             return -1;
01598                         }
01599                         tree.addAttribute(lastNode, "SubGroup", depth);
01600                     } else {
01601                         lastNode = temp;
01602                     }
01603
01604                     tempString.str("");
01605                     found = name.rfind('-',lastFound);
01606                     depth++;
01607                 }
01608                 if (lastFound == std::string::npos) {
01609                     tempString << name;
01610                 } else {
01611                     tempString << name.substr(0,lastFound+1);
01612                 }
01613
01614                 lastNode = tree.addChildNode(lastNode, tempString.str());
01615                 if (lastNode == NULL){
01616                     BIASERR("Error creating param: " + tempString.str() +
01617                         " / " + name);
01618                     return -1;
01619                 }
01620                 tempString.str("");
01621
01622                 //first: set comments if desired
01623                 if (WriteComments_) {
01624                     tree.addComment(lastNode, it->second->Help_);
01625                 }
01626
01627                 //second: set name and value(s)
01628                 if (it->second->GetTypeName() == "BOOL") {
01629                     tree.addAttribute(lastNode, "Value",
01630                         ((ParamTypeBool*) it->second)->value_);
01631                     tree.addAttribute(lastNode, "Default",
01632                         ((ParamTypeBool*) it->second)->default_);
01633                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01634                 } else if (it->second->GetTypeName() == "INT") {
01635                     tree.addAttribute(lastNode, "Value",
01636                         ((ParamTypeInt*) it->second)->value_);
01637                     tree.addAttribute(lastNode, "Range", it->second->GetHint());
01638                     tree.addAttribute(lastNode, "Default",
01639                         ((ParamTypeInt*) it->second)->default_);
01640                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01641                 } else if (it->second->GetTypeName() == "DOUBLE") {
01642                     tree.addAttribute(lastNode, "Value",
01643                         ((ParamTypeDouble*) it->second)->value_);
01644                     tree.addAttribute(lastNode, "Range", it->second->GetHint());
01645                     tree.addAttribute(lastNode, "Default",
01646                         ((ParamTypeDouble*) it->second)->default_);
01647                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01648                 } else if (it->second->GetTypeName() == "STRING") {
01649                     tree.addAttribute(lastNode, "Value",
01650                         ((ParamTypeString*) it->second)->value_);
01651                     tree.addAttribute(lastNode, "Default",
01652                         ((ParamTypeString*) it->second)->default_);
01653                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01654                 } else if (it->second->GetTypeName() == "VECDBL") {
01655                     tree.addAttribute(lastNode, "Value",
01656                         ((ParamTypeVecDbl*) it->second)->value_);
01657                     tree.addAttribute(lastNode, "Default",
01658                         ((ParamTypeVecDbl*) it->second)->default_);
01659                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01660                 } else if (it->second->GetTypeName() == "VECINT") {
01661                     tree.addAttribute(lastNode, "Value",
01662                         ((ParamTypeVecInt*) it->second)->value_);
01663                     tree.addAttribute(lastNode, "Default",
01664                         ((ParamTypeVecInt*) it->second)->default_);
01665                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01666                 } else if (it->second->GetTypeName() == "ENUM") {
01667                     tree.addAttribute(lastNode, "Value",
01668                         ((ParamTypeEnum*) it->second)->GetValueString());
01669                     tree.addAttribute(lastNode, "Range", it->second->GetHint());
01670                     tree.addAttribute(lastNode, "Name", it->second->Name_);
01671                 } else {
01672                     BIASERR("!!! No matching ParamType for attribute:"
01673                         + it->second->GetTypeName() + " !!!");
01674                     return -1;
01675                 }
01676
01677                 //third: set type
01678                 tree.addAttribute(lastNode, "Type", it->second->GetTypeName());
01679                 //fourth: set enhanced or not enh.
01680                 tree.addAttribute(lastNode, "Enhanced", it->second->Enhanced_);
01681             }
01682         }
01683     }
01684
01685     // if XML-file has been written...
01686     if (tree.write(filename) == 0){
01687         // ...clear tree and exit ...
01688         tree.clear();
01689         return 0;
01690     }
01691
01692     // else exit with error -1
01693     BIASERR("\nCould not write parameterfile:\n     " + filename + "\n");
01694     return -1;
01695 }
01696
01697 #endif
01698
01699 int  Param::WriteRunMe(const std::string &filename)
01700 {
01701     ofstream ofs;
01702     time_t now_s;
01703     struct tm* now;
01704     char datestr[20];
01705     string fname;
01706
01707     time(&now_s);
01708     now = localtime(&now_s);//, &now);
01709     sprintf(datestr,"%4d-%02d-%02d-%02d:%02d",now->tm_year+1900,now->tm_mon+1,now->tm_mday,
01710         now->tm_hour,now->tm_min);
01711
01712     fname = filename + datestr;
01713     ofs.open(fname.c_str());
01714
01715     if (!ofs){
01716         perror(fname.c_str());
01717         return -1;
01718     }
01719     ofs <<"#!/bin/sh"<<endl<<endl;
01720     for (unsigned int i=0;i<ArgV_.size(); i++)
01721         ofs <<ArgV_[i]<<" ";
01722     ofs<<endl<<endl;
01723     ofs.close();
01724 #ifndef  WIN32
01725     chmod(filename.c_str(),0755);
01726 #endif //WIN32
01727     return 0;
01728 }
01729
01730
01731
01732 void Param::SetDefaults()
01733 {
01734     for (CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++)
01735         it->second->SetDefault();
01736 }
01737
01738
01739 int Param::RegisterCallbackObject(const string &name,
01740                                   ParamCallbackInterface *obj)
01741 {
01742     CI it;
01743     if ( (it=ParamMap_.find(name)) != ParamMap_.end()) {
01744         it->second->CallbackObject_ = obj;
01745         return 0;
01746     }
01747     BIASERR("Unknown parameter \""<<name<<"\"in RegisterCallbackObject()");
01748     return -1;
01749 }
01750
01751 int  Param::SetRangeInt(const std::string &name,const int min, const int max)
01752 {
01753     CI it;
01754     if ( (it=ParamMap_.find(name)) != ParamMap_.end()) {
01755         ParamTypeInt *pInt = dynamic_cast<ParamTypeInt *>(it->second);
01756         if (pInt != NULL) {
01757             pInt->min_ = min;
01758             pInt->max_  = max;
01759         }
01760         return 0;
01761     }
01762     BIASERR("Unknown parameter \""<<name<<"\"in RegisterCallbackObject()");
01763     return -1;
01764 }
01765
01766
01767 int Param::SetShortCommand(const string &name, const char cmd)
01768 {
01769     CI it = ParamMap_.find(name);
01770     if ( it==ParamMap_.end() ){
01771         BIASERR("parameter "<<name<<" not found!");
01772         return -1;
01773     }
01774     else
01775         it->second->ShortCmd_ = cmd;
01776     return 0;
01777 }
01778
01779 int Param::ParseListFile(const std::string& ListFileName,
01780              std::vector<std::string>& LinesInFile)
01781 {
01782   ifstream ifs(ListFileName.c_str());
01783   if(!ifs) {
01784     BIASERR("stream to list file "<<ListFileName<<" could not be established");
01785     ifs.close();
01786     return -1;
01787   }
01788
01789   stringstream sstr;
01790   sstr.str("");
01791
01792   do {
01793     ifs.get(*(sstr.rdbuf()));//stream symbols til EOL or EOF(excludes EOL/EOF)
01794     if(sstr.str().size()>0)
01795       LinesInFile.push_back(sstr.str());
01796     sstr.clear();
01797     sstr.str("");
01798   } while(ifs.get()!=EOF);
01799
01800   ifs.close();
01801   return 0;
01802 }
01803
01804 // accessors because of protected-> private member to avoid DLL export JW
01805 std::map<const std::string,BIAS::ParamTypeBase*> &
01806 Param::GetParamMap()
01807 {
01808   return ParamMap_;
01809 }
01810
01811 const std::map<const std::string,BIAS::ParamTypeBase*> &
01812 Param::GetParamMap() const
01813 {
01814   return ParamMap_;
01815 }
01816
01817
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Param.hh Source File

Utils

Param.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIASPARAMETER__
00027 #define __BIASPARAMETER__
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include "bias_config.h"
00031
00032 #include "ParamTypes.hh"
00033 #include <stdlib.h>
00034 #include <string>
00035 #include <vector>
00036 #include <float.h>
00037 #include <map>
00038
00039 #ifdef WIN32
00040 #  include <Base/Common/getopt_W32.h>
00041 #else
00042 #  include <getopt.h>
00043 #endif
00044
00045 #include <Base/Debug/Error.hh>
00046 #include <Base/Debug/Debug.hh>
00047 #include <Base/Math/Vector.hh>
00048 #ifdef BIAS_HAVE_XML2
00049 #  include <Base/Common/XMLIO.hh>
00050 #endif
00051
00052
00053
00054 namespace BIAS {
00055
00056 #define D_PARAM_ALL 0xffffffff
00057 #define D_PARAM_IO           1<<0
00058 #define D_PARAM_PARSECMDL    1<<1
00059 #define D_PARAM_GET          1<<2
00060 #define D_PARAM_CONF_FILE    1<<3
00061
00062 #define GRP_ALL -2
00063 #define GRP_NOSHOW -1
00064
00065     /**
00066     @class ParamCallbackInterface
00067     @ingroup g_utils
00068     @brief This class provides an interface to be called if parameter changes
00069     occured.
00070
00071     If an application makes use of ParamGui and has to react on parameter
00072     changes, it should be derived from this class and could register a
00073     callback for each instance to this method.
00074     */
00075     class BIASUtils_EXPORT ParamCallbackInterface
00076     {
00077     public:
00078         virtual  ~ParamCallbackInterface();
00079         ParamCallbackInterface();
00080
00081         virtual  void ParameterChanged(
00082             const std::string &paramname,
00083             const void *data);
00084
00085     };
00086
00087
00088     /** @class Param
00089     @ingroup g_utils
00090     @brief This class Param provides generic support for parameters.
00091
00092     This is the documentation for the
00093
00094     BIAS::Param
00095
00096     and the
00097
00098     BIAS::ParamGUI
00099
00100     classes.
00101
00102
00103
00104     Philosophy
00105     ==========
00106
00107     The idea behind the Param object is a common class to register all
00108     program parameters in. These parameters can be set from the command
00109     line, read and written to a file or be edited in a graphical interface
00110     that is programmed using the wxWidgets framework toolkit.
00111
00112
00113     Usage
00114     =====
00115
00116     There are the following seven parameter types:
00117
00118     - Integer
00119     - Boolean
00120     - String
00121     - Double
00122     - Vector of Double
00123     - Vector of Integer
00124     - Enumeration
00125
00126     At first you create your instance of the Param oder ParamGUI object in
00127     your application. Afterwards you register your parameters by using the
00128     AddParam... methods corresponding to each of the types above:
00129
00130     The methods are
00131     - AddParamInt
00132     - AddParamBool
00133     - AddParamString
00134     - AddParamDouble
00135     - AddParamVecDbl
00136     - AddParamVecInt
00137     - AddParamEnum.
00138
00139     Each method has the parameters name, a help-string, a default-value,
00140     a short-command and a group ID as parameters.
00141
00142     The name must be unique! An error is displayed if you add a new parameter
00143     with an already existing name.
00144
00145     The help-string should describe the command in a short way.
00146
00147     If you use the short-command, the parameter can be set at the command
00148     line with -<short-command> additionally to --<parameter-name>.
00149
00150     Using the group ID you can put parameters of similar meaning in single
00151     groups, which is useful for visualization.
00152
00153     The first four parameter types come along with standard default values.
00154     For the vector types you must provide an initial vector when adding a
00155     new parameter. When setting new vectors later in your program, the
00156     vector must be of the size given by the initial one.
00157
00158     Using the method ParseCommandLine you can set the values for the
00159     registered parameters from the command line. Also you can use the
00160     default parameters 'readconfig' and 'writeconfig' to read or write a
00161     configuration from/to a file.
00162
00163     In your program you can use the GetParam... and SetParam... methods to
00164     receive a pointer to the data or to set new values for the parameters.
00165
00166
00167     The GUI
00168     =======
00169
00170     The BIAS::ParamGUI class is derived from the BIAS::Param class and
00171     provides the three methods
00172
00173     GetPanel,
00174     GetNotebook and
00175     GetFrame.
00176
00177     The GetPanel method returns a pointer to a wxPanel where the widgets
00178     for the parameters belonging to the given group are placed.
00179
00180     The GetNotebook method returns a pointer to a wxNotebook where on each
00181     notebook page is placed a panel with the parameters of one group.
00182
00183     These two can be placed in your GUI application as you like to. If you
00184     want a standalone frame with the notebook inside you use the GetFrame
00185     method.
00186
00187     The GetFrame method returns a pointer to a wxFrame in which a wxNotebook
00188     with all groups of parameters is embedded.
00189
00190
00191     Why pointers?
00192     =============
00193
00194     A big question about this object is why pointers are returned by
00195     the Add-, Get- and Set-methods. Well, is it wanted, that the data is
00196     only stored at one location and that is the Param object, so if you
00197     are interested in a value, you get the pointer to it.
00198
00199
00200     Internals
00201     =========
00202
00203     Classes:
00204
00205     BIAS::ParamTypeBase
00206     |
00207     +-- BIAS::ParamTypeInt
00208     |
00209     +-- BIAS::ParamTypeBool
00210     |
00211     +-- BIAS::ParamTypeString
00212     |
00213     +-- BIAS::ParamTypeDouble
00214     |
00215     +-- BIAS::ParamTypeVecDbl
00216     |
00217     +-- BIAS::ParamTypeVecInt
00218     |
00219     +-- BIAS::ParamTypeEnum
00220
00221
00222     BIAS::Param
00223     |
00224     +-- BIAS::ParamGUI
00225
00226
00227     STL maps:
00228
00229     In BIAS::Param the main data struct holding the parameter data is a
00230     STL map. The key-value-pairs are of the type string,ParamTypeBase*.
00231
00232     The key-string holds the name of the parameter which is also stored in
00233     the parameter type class.
00234
00235     The ParamTypeEnum class holds another STL map with key of type string and
00236     value of type int. This is used for easier name->number translation.
00237
00238     In the GUI class also has a STL map of type
00239     unsigned int,struct ItemAndWidget to map event IDs to the corresponding
00240     control widget and parameter data.
00241
00242     @author Jan-Friso Evers-Senne, Matthias Dunda
00243
00244     Note about bool: bool options can be used on the cmdl as follow:
00245     -b                         -> result in "true"
00246     --bool=true                -> result in "true"
00247     --bool=<any other string>  -> result in "false"
00248     --bool <any string>        -> Not allowed.
00249     */
00250     class BIASUtils_EXPORT Param : public Debug{
00251
00252     public:
00253       /** Extracts lines from passed file.
00254        * The specified file is expected to contain a list of entries. Those
00255        * entries are assumed to be seperated by newlines.
00256        * \param ListFileName Routine tries to open file with this name.
00257        * \param LinesInFile result of line extraction.
00258        * \returns -1 if file could not be opened.
00259        * \returns 0 all good.
00260        */
00261       static int ParseListFile(const std::string& ListFileName,
00262                    std::vector<std::string>& LinesInFile);
00263
00264         explicit Param(bool DisableDestructorWarning = false);
00265         virtual ~Param();
00266
00267         /* All routines for adding, getting and setting parameters return
00268         a pointer to the data on success or NULL on error! */
00269
00270         // routines for ADDING parameters
00271         /** For all adding routines:
00272         @param name is the unique identifier of the parameter
00273         @param help is a help or 'tooltip' string for that parameter
00274         @param deflt is a default value for that parameter. Note that not
00275         every parameter type has a default at compile time!
00276         @param cmdshort is a short command option for the command line
00277         @param Group is a number to group some parameters for visualization,
00278         e.g. all matchers are in group 1, all trackers are in group 37 etc.
00279         When printing to screen, you can limit the output to a group of
00280         interest. The default is 0 - no special group.
00281         @author mdunda 03 2004 */
00282
00283         int * AddParamInt( const std::string &name,
00284             const std::string &help, int deflt = 0,
00285             int min = INT_MIN, int max = INT_MAX,
00286             char cmdshort = 0, int Group = GRP_NOSHOW);
00287
00288         bool * AddParamBool( const std::string &name,
00289             const std::string &help,
00290             bool deflt = false,
00291             char cmdshort = 0, int Group = GRP_NOSHOW );
00292
00293         std::string * AddParamString( const std::string &name,
00294             const std::string &help,
00295             std::string deflt = "",
00296             char cmdshort = 0, int Group = GRP_NOSHOW );
00297
00298         double * AddParamDouble( const std::string &name,
00299             const std::string &help,
00300             double deflt = 0.0,
00301             double min = -DBL_MAX, double max = DBL_MAX,
00302             char cmdshort = 0, int Group = GRP_NOSHOW );
00303
00304         /** Add a parameter that expects a string on command line
00305         like "<value0>  <value1> <value2> ..." <br>
00306         A vector of double must be given as default vector! */
00307         BIAS::Vector<double> * AddParamVecDbl( const std::string &name,
00308             const std::string &help,
00309             const BIAS::Vector<double> &deflt,
00310             char cmdshort = 0,
00311             int Group = GRP_NOSHOW );
00312
00313         /** The same as above, but default is given by a string,
00314         syntax is as at command line "v_0 v_1 v_2", don't set empty
00315         string, cause the length is determined also by the number of values
00316
00317         @author Daniel Grest, July 2005
00318         */
00319         BIAS::Vector<double> * AddParamVecDbl( const std::string &name,
00320             const std::string &help,
00321             const std::string &deflt,
00322             char cmdshort = 0,
00323             int Group = GRP_NOSHOW );
00324
00325
00326         /**  Add a parameter that expects a string on command line
00327         like "<value0>  <value1> <value2> ..." <br>
00328         A vector of integer must be given a default vector! */
00329         BIAS::Vector<int> * AddParamVecInt( const std::string &name,
00330             const std::string &help,
00331             const BIAS::Vector<int> &deflt,
00332             char cmdshort=0, int Group=GRP_NOSHOW);
00333
00334         /** The same as other AddParamVecInt(), but default is given by a string,
00335         syntax is as at command line "v_0 v_1 v_2". Don't set empty
00336         string, cause the length is determined also by the number of values
00337
00338         @author Daniel Grest, July 2005
00339         */
00340         BIAS::Vector<int> * AddParamVecInt( const std::string &name,
00341             const std::string &help,
00342             const std::string &deflt,
00343             char cmdshort=0, int Group=GRP_NOSHOW);
00344
00345
00346
00347         /** @param enums holds all enumeration names.
00348         @param IDs can be a pointer to a vector of integers. It must have
00349         the same size as 'enums' and gives each name a number, which must
00350         be unique! If NULL the enums are numbered from 0 to enums.size()-1
00351         @author mdunda 03 2004 */
00352         int * AddParamEnum( const std::string &name,
00353             const std::string &help,
00354             const std::vector<std::string> &enums,
00355             const int deflt = 0,
00356             const std::vector<int> * IDs = NULL,
00357             const char cmdshort = 0,
00358             const int Group = GRP_NOSHOW );
00359
00360         /**
00361         \brief Check if parameter has already been added.
00362         */
00363         bool CheckParam(const std::string &name);
00364
00365         // routines for GETTING parameters
00366         int * GetParamInt( const std::string &name ) const;
00367         bool * GetParamBool( const std::string &name )const;
00368         std::string * GetParamString( const std::string &name )const;
00369         double * GetParamDouble( const std::string &name )const;
00370         BIAS::Vector<double> * GetParamVecDbl( const std::string &name )const;
00371         BIAS::Vector<int> * GetParamVecInt( const std::string &name )const;
00372         int * GetParamEnum( const std::string &name )const;
00373
00374         // routines for SETTING parameters
00375         int * SetParamInt( const std::string &name, const int &value );
00376         bool * SetParamBool( const std::string &name, const bool &value );
00377         std::string * SetParamString( const std::string &name,
00378             const std::string &value );
00379         double * SetParamDouble( const std::string &name, const double &value );
00380         BIAS::Vector<double> * SetParamVecDbl( const std::string &name,
00381             const BIAS::Vector<double> &value );
00382         BIAS::Vector<int> * SetParamVecInt( const std::string &name,
00383             const BIAS::Vector<int> &value );
00384         /// set the enum to the ID 'value'
00385         int * SetParamEnum( const std::string &name, const int &value );
00386         /// set the enum to the ID corresponding to the string 'value'
00387         int * SetParamEnum( const std::string &name, const std::string &value );
00388
00389         int SetParameterWriteToFile(const std::string &name, bool writeToFile);
00390
00391         /** @brief if a parametr is marked as enhanced, it is hidden from the
00392         naive user */
00393         int SetEnhancedFlag(const std::string &name, bool enhanced);
00394
00395         /** @brief if a parametr is marked as hidden, it is obsolete and
00396         hidden for all users, use this for parameters overwritten by caller
00397         class*/
00398         int SetHiddenFlag(const std::string &name, bool hidden);
00399
00400         /// sets all entries to their initially (AddParam) given default values
00401         void SetDefaults();
00402
00403         /** Set [Min,Max] as new range, especially usefull in derived class
00404         PramGUI */
00405         virtual int SetRangeInt(const std::string &name,const int min,
00406             const int max);
00407
00408         /// print all data in group grp including current values to os
00409         /// if grp = GRP_ALL, print all values
00410         /// if showenhanced = false, parameters marked as enhanced are not shown
00411         void ShowData(std::ostream &os = std::cout, int grp=GRP_ALL,
00412             bool showenhanced = true);
00413
00414         /// print Help-Information to stdout
00415         void Usage(std::ostream &os = std::cout);
00416
00417         /** @brief update all arguments from command line and parameter file
00418         1. reads parameter from default file
00419         2. if --readconfig is given on commandline, reads parameter
00420         from this file
00421         3. evaluates parameter given on command line
00422
00423         Command line arguments take precedence over arguments from parameter
00424         file. Parameter from parameter file specified with --readconfig=fname
00425         take precedencor over parameter read from default_filename.
00426         If no parameterfile is found, the defaults are written to default_name.
00427         @author woelk 09/2004 */
00428         int UpdateParameter(int &argc, char *argv[],
00429             const std::string &default_filename);
00430
00431         /// scan command line arguments for valid parameters
00432         /** argv is reordered according to getopt() all no recognized arguments
00433         are at the end.
00434         Return value is optind from getopt(), the index of the next not
00435         recognized argument. Sometimes, the function however
00436         returns negative values. ?
00437         @todo document concept of return value of ParseCommandLine
00438         Reads parameter from file if argument --readconfig is given.
00439         @author evers */
00440         int ParseCommandLine(int &argc, char *argv[]);
00441
00442         /// read values for parameters from file
00443         int ReadParameter(const std::string &filename);
00444
00445 #ifdef BIAS_HAVE_XML2
00446         /// read values for parameters from xml-file
00447         int ReadParameterXML(const std::string &filename);
00448 #endif
00449
00450         /** @brief store complete set of parameter in file
00451         if write_comments is set, alo the help strings are written to the file
00452         if show_enhanced is set, also parameters marked as enhanced are written
00453         @author ?? */
00454         int WriteParameter(const std::string &filename);
00455
00456 #ifdef BIAS_HAVE_XML2
00457         int WriteParameterXML(const std::string &filename);
00458 #endif
00459
00460         /** writes complete command line including program name and
00461         unknown command line options,
00462         no defaults, no params read from file */
00463         int WriteRunMe(const std::string &filename);
00464
00465         /** Returns a vector of all group IDs (unique) in ascending order.
00466         Only parameters are with WriteToFile_ = true are considered.
00467         @author woelk 03 2004 */
00468         std::vector<int> UniqueSortedGroups();
00469
00470         /** @brief returns unused group id
00471         @author woelk */
00472         int GetFreeGroupID();
00473
00474         /** @brief returns group id of parameter with name
00475         @author woelk */
00476         int GetGroupID(const std::string &name);
00477
00478         /** @brief
00479         @author evers */
00480         int GetGroupIDForGroupName(const std::string &name);
00481
00482         /** @brief sets the name for a group
00483         @author woelk */
00484         int SetGroupName(const int group_id, const std::string& name);
00485
00486         /** gets the name of a group
00487         @author woelk */
00488         std::string GetGroupName(const int group_id);
00489
00490         /** @brief returns if the group id is used
00491         @author woelk */
00492         bool IsUsedGroupID(const int group_id);
00493
00494         /**
00495         @author evers */
00496         int RegisterCallbackObject(const std::string &name,
00497             ParamCallbackInterface *obj);
00498
00499         /** Uses this just before end of your program to avoid error from
00500         destructor.
00501         @author evers */
00502         void DisableDestructorWarning(){DestructorWarning_ = false;};
00503
00504         /** Add a short commandline switch to an existing parameter.
00505         Useful for readconfig/writeconfig.
00506         @author evers */
00507         int SetShortCommand(const std::string &name, const char cmd);
00508
00509         /** @brief returns the size of the longest param name not marked
00510         as enhanced or hidden
00511         @author woelk 10/2004 */
00512         int GetSizeOfLongestParamName();
00513
00514         /** @brief returns the size of the longest param value string not marked
00515         as enhanced or hidden
00516         @author woelk 10/2004 */
00517         int GetSizeOfLongestParamValueString();
00518
00519         void SetWriteOptions(bool indent, bool comments, bool enhanced)
00520         {
00521             WriteIndent_ = indent;
00522             WriteComments_ = comments;
00523             WriteEnhanced_ = enhanced;
00524         }
00525
00526   protected:
00527     std::map<const std::string,BIAS::ParamTypeBase*> & GetParamMap();
00528     const std::map<const std::string,BIAS::ParamTypeBase*> & GetParamMap() const;
00529
00530     protected:
00531         std::vector<std::string> ArgV_;
00532         std::vector<std::string> GroupNames_;
00533         struct option *longopts;
00534         bool DestructorWarning_;
00535         // WriteOptions
00536         bool WriteIndent_;
00537         bool WriteComments_;
00538         bool WriteEnhanced_;
00539
00540     private: // avoid DLL export
00541       /// this STL map holds the name-ParamType-pairs
00542       std::map<const std::string,BIAS::ParamTypeBase*> ParamMap_;
00543
00544     };
00545
00546 } //namespace BIAS;
00547
00548 #include <Base/Common/BIASpragmaEnd.hh>
00549
00550
00551 #endif
00552
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Parametrization.cpp Source File

Geometry

Parametrization.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Parametrization.hh"
00027 #include <Base/Common/BIASpragma.hh>
00028
00029 #include <vector>
00030
00031 using namespace std;
00032 using namespace BIAS;
00033
00034
00035 Parametrization::Parametrization() {}
00036 Parametrization::~Parametrization() {}
00037
00038 bool Parametrization::FMatrixToParams( const FMatrix &Mat,
00039                                        vector<double> &Params )
00040 {
00041   if ( Mat.IsZero() )
00042     {
00043       BIASERR("A parametrization of a null matrix doesn't make sense!");
00044       return false;
00045     }
00046
00047   F_ = Mat; // set class member
00048   Params.clear();
00049
00050   double scale = GetBiggestAbsEntry();
00051   Fscale_ = 1/scale;
00052
00053   Mat.Scale(Fscale_, F_);
00054
00055   double a,b,c;
00056
00057   HomgPoint2D FEpipole1,FEpipole2;
00058   F_.GetEpipoles(FEpipole1,FEpipole2);
00059   FEpipole1.Homogenize();
00060   FEpipole2.Homogenize();
00061
00062   if ( Frow_ == 0 && Fcol_ == 0 )
00063     {
00064       a=F_[0][1];
00065       b=F_[1][0];
00066       c=F_[1][1];
00067     }
00068   else if ( Frow_ == 1 && Fcol_ == 0 )
00069     {
00070       a=F_[0][0];
00071       b=F_[0][1];
00072       c=F_[1][1];
00073     }
00074   else if ( Frow_ == 0 && Fcol_ == 1 )
00075     {
00076       a=F_[0][0];
00077       b=F_[1][0];
00078       c=F_[1][1];
00079     }
00080   else if ( Frow_ == 1 && Fcol_ == 1 )
00081     {
00082       a=F_[0][0];
00083       b=F_[0][1];
00084       c=F_[1][0];
00085     }
00086
00087   Params.push_back(a);
00088   Params.push_back(b);
00089   Params.push_back(c);
00090
00091   Params.push_back(-FEpipole1[0]);
00092   Params.push_back(-FEpipole1[1]);
00093   Params.push_back(-FEpipole2[0]);
00094   Params.push_back(-FEpipole2[1]);
00095
00096   return true;
00097 }
00098
00099
00100 bool Parametrization::ParamsToFMatrix( FMatrix &Mat,
00101                                        const vector<double> &Params )
00102 {
00103   if ( Params.size() != 7 )
00104     {
00105       BIASERR("There must be 7 parameters to compose the F matrix!");
00106       return false;
00107     }
00108   FParams_ = Params; // set class member
00109
00110   double a=0.0,b=0.0,c=0.0,d=0.0;
00111   double e10,e11,e20,e21;
00112
00113   if ( Frow_ == 0 && Fcol_ == 0 )
00114     {
00115       a = 1;
00116       b = Params[0];
00117       c = Params[1];
00118       d = Params[2];
00119     }
00120   else if ( Frow_ == 1 && Fcol_ == 0 )
00121     {
00122       a = Params[0];
00123       b = Params[1];
00124       c = 1;
00125       d = Params[2];
00126     }
00127   else if ( Frow_ == 0 && Fcol_ == 1 )
00128     {
00129       a = Params[0];
00130       b = 1;
00131       c = Params[1];
00132       d = Params[2];
00133     }
00134   else if ( Frow_ == 1 && Fcol_ == 1 )
00135     {
00136       a = Params[0];
00137       b = Params[1];
00138       c = Params[2];
00139       d = 1;
00140     }
00141
00142   e10 = Params[3];
00143   e11 = Params[4];
00144   e20 = Params[5];
00145   e21 = Params[6];
00146
00147   Mat[0][0] = a;
00148   Mat[0][1] = b;
00149   Mat[0][2] = e10 * a + e11 * b;
00150
00151   Mat[1][0] = c;
00152   Mat[1][1] = d;
00153   Mat[1][2] = e10 * c + e11 * d;
00154
00155   Mat[2][0] = e20 * a + e21 * c;
00156   Mat[2][1] = e20 * b + e21 * d;
00157   Mat[2][2] = e20 * e10 * a + e20 * e11 * b + e21 * e10 * c + e21 * e11 * d;
00158
00159   return true;
00160 }
00161
00162
00163 bool Parametrization::HMatrixToParams( const HMatrix &Mat,
00164                                        vector<double> &Params )
00165 {
00166   if ( Mat.IsZero() )
00167     {
00168       BIASERR("A parametrization of a null matrix doesn't make sense!");
00169       return false;
00170     }
00171
00172   H_ = Mat; // set class member
00173   Params.clear();
00174
00175   // make sure that 3,3 element is positive
00176   if ( H_[2][2] < 0 )
00177     H_.Scale( -1, H_);
00178
00179   // compute the Frobenius norm
00180   double  Hnorm =
00181     H_[0][0] * H_[0][0] + H_[0][1] * H_[0][1] + H_[0][2] * H_[0][2] +
00182     H_[1][0] * H_[1][0] + H_[1][1] * H_[1][1] + H_[1][2] * H_[1][2] +
00183     H_[2][0] * H_[2][0] + H_[2][1] * H_[2][1] + H_[2][2] * H_[2][2];
00184   Hnorm = sqrt(Hnorm);
00185
00186   Hscale_ = Hnorm;
00187
00188   Params.push_back(H_[0][0]/Hnorm);
00189   Params.push_back(H_[0][1]/Hnorm);
00190   Params.push_back(H_[0][2]/Hnorm);
00191   Params.push_back(H_[1][0]/Hnorm);
00192   Params.push_back(H_[1][1]/Hnorm);
00193   Params.push_back(H_[1][2]/Hnorm);
00194   Params.push_back(H_[2][0]/Hnorm);
00195   Params.push_back(H_[2][1]/Hnorm);
00196
00197   return true;
00198 }
00199
00200
00201 bool Parametrization::ParamsToHMatrix( HMatrix &Mat,
00202                                        const vector<double> &Params )
00203 {
00204   if ( Params.size() != 8 )
00205     {
00206       BIASERR("There must be 8 parameters to compose the H matrix!");
00207       return false;
00208     }
00209   HParams_ = Params; // set class member
00210
00211   Mat[0][0]=Params[0];
00212   Mat[0][1]=Params[1];
00213   Mat[0][2]=Params[2];
00214   Mat[1][0]=Params[3];
00215   Mat[1][1]=Params[4];
00216   Mat[1][2]=Params[5];
00217   Mat[2][0]=Params[6];
00218   Mat[2][1]=Params[7];
00219
00220   /* compute the 3,3 element, using the property from parametrization
00221      where ||H|| = 1 (||.|| = Frobenius norm) */
00222   Mat[2][2]=sqrt(1 -
00223     (Params[0] * Params[0] +
00224      Params[1] * Params[1] +
00225      Params[2] * Params[2] +
00226      Params[3] * Params[3] +
00227      Params[4] * Params[4] +
00228      Params[5] * Params[5] +
00229      Params[6] * Params[6] +
00230      Params[7] * Params[7] ));
00231   return true;
00232 }
00233
00234
00235 double Parametrization::GetBiggestAbsEntry()
00236 {
00237   double max=0.0;
00238   for (int r=0;r<2;r++)
00239     for (int c=0;c<2;c++)
00240       if ( abs(F_[r][c])>abs(max) )
00241         {
00242           max = F_[r][c];
00243           Frow_ = r;
00244           Fcol_ = c;
00245         }
00246   return max;
00247 }
00248
00249
00250
00251 bool Parametrization::EMatrixToParams( BIAS::EMatrix &Mat,
00252                                        Vector<double> &Params,
00253                                        std::vector<BIAS::HomgPoint2D> &inlier1,
00254                                        std::vector<BIAS::HomgPoint2D> &inlier2)
00255 {
00256   if (Params.size() != NUM_PARAM_ESSENTIAL){
00257     BIASERR (" parameter vector must have  length " <<NUM_PARAM_ESSENTIAL
00258              << " instead of " << Params.size());
00259     BIASABORT;
00260   }
00261   RMatrix R;
00262   Vector3<double> C;
00263   Mat.GetRotationTranslation(R,C,inlier1,inlier2);
00264
00265   // now parameterization of rotation
00266   double angle;
00267   Vector3<double> rax;
00268   R.GetRotationAxisAngle(rax,angle);
00269   if (fabs(angle)<MINIMUM_ROTATION){
00270     rax.Set(1.0, 0.0, 0.0);
00271     angle = 0;
00272   }
00273   rax *= angle/rax.NormL2();
00274
00275
00276   // now parameterization of translation
00277   Vector3<double> CSpherical(C.CoordEuclidianToSphere());
00278
00279   // parameterize translation
00280   Params[0] = CSpherical[1];
00281   Params[1] = CSpherical[2];
00282   // parameterize rotation
00283   Params[2] = rax[0]; Params[3]=rax[1]; Params[4]=rax[2];
00284   //cout << "params: "<<Params<<endl;
00285   return true;
00286 }
00287
00288
00289 bool Parametrization::ParamsToEMatrix( BIAS::EMatrix &Mat,
00290                                        const Vector<double> &Params ){
00291
00292   if (Params.size() != NUM_PARAM_ESSENTIAL){
00293     BIASERR (" parameter vector has length " << Params.size() << " instead of "
00294              << NUM_PARAM_ESSENTIAL);
00295     BIASABORT;
00296   }
00297   Vector3<double> rax(Params[2],Params[3],Params[4]);
00298   double angle = rax.NormL2();
00299   double c1 = 1.0;//-Params[0]*Params[0]-Params[1]*Params[1];
00300   //  c3 = (c3 >= 0.0) ? sqrt(c3) : sqrt(-1.0*c3);
00301   Vector3<double> C(c1, Params[0],Params[1]);
00302   C = C.CoordSphereToEuclidian();
00303
00304   if (fabs(angle)<MINIMUM_ROTATION){
00305     rax[0] = 1;
00306     rax[1] = 0;
00307     rax[2] = 0;
00308     angle = 0;
00309   } else {
00310     angle = rax.NormL2();
00311     rax /= rax.NormL2();
00312   }
00313
00314   RMatrix R(rax,angle);
00315   Mat.Set(R,C);
00316   //cout << "ParamsToEMatrix: Params="<<Params<<" R=" << R << ", C = " << C <<endl;
00317   Mat /= Mat.NormFrobenius();
00318   return true;
00319
00320 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Parametrization.hh Source File

Geometry

Parametrization.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 /** This class is used for parametrizing F- and H-matrices, generally for
00027     optimization purposes.
00028     Be sure to use one and the same instance of this class for parametrization
00029     and deparametrization of your matrix!!!
00030     This parametrization is needed during the MotionModelSelection which
00031     is part of my diploma thesis.
00032     @author Matthias Dunda
00033     @date 09 2003 */
00034
00035 #ifndef __Parametrization_hh__
00036 #define __Parametrization_hh__
00037
00038 #include <Base/Common/BIASpragmaStart.hh>
00039
00040 #include <vector>
00041
00042 #include "FMatrix.hh"
00043 #include "HMatrix.hh"
00044 #include "EMatrix.hh"
00045
00046 namespace BIAS
00047 {
00048
00049 #define NUM_PARAM_ESSENTIAL 5
00050 #define MINIMUM_ROTATION 1e-6
00051   class BIASGeometry_EXPORT Parametrization
00052   {
00053   public:
00054     Parametrization();
00055     ~Parametrization();
00056
00057     /** parametizes an F-matrix to seven parameters
00058         @return true on success, false on error
00059         @author mdunda 09 2003 */
00060     bool FMatrixToParams( const BIAS::FMatrix &Mat,
00061                           std::vector<double> &Params );
00062
00063     /** composes an F-matrix from the seven given parameters
00064         The deparametrization only works with the previously parametized
00065         values of 'FMatrixToParams', because some internally stored
00066         parameters are important for the correct composition.
00067         @return true on success, false on error
00068         @author mdunda 09 2003 */
00069     bool ParamsToFMatrix( BIAS::FMatrix &Mat,
00070                           const std::vector<double> &Params );
00071
00072     /** parametizes an H-matrix to eight parameters
00073         @return true on success, false on error
00074         @author mdunda 09 2003 */
00075     bool HMatrixToParams( const BIAS::HMatrix &Mat,
00076                           std::vector<double> &Params );
00077
00078     /** composes an H-matrix from the seven given parameters
00079         @return true on success, false on error
00080         @author mdunda 09 2003 */
00081     bool ParamsToHMatrix( BIAS::HMatrix &Mat,
00082                           const std::vector<double> &Params );
00083
00084      /** parametizes an essential-matrix to five parameters
00085         @return true on success, false on error
00086         @author frahm 03 2004 */
00087     static bool EMatrixToParams( BIAS::EMatrix &Mat,
00088                                  Vector<double> &Params,
00089                                  std::vector<BIAS::HomgPoint2D> &inlier1,
00090                                  std::vector<BIAS::HomgPoint2D> &inlier2);
00091
00092     /** composes an essential-matrix from the five given parameters
00093         @return true on success, false on error
00094         @author frahm 03 2004 */
00095     static bool ParamsToEMatrix( BIAS::EMatrix &Mat,
00096                                  const Vector<double> &Params );
00097
00098     inline double GetFScaling() { return Fscale_; }
00099     inline double GetHScaling() { return Hscale_; }
00100
00101   protected:
00102     // protected attributes for F-matrix parametrization
00103     BIAS::FMatrix F_;
00104     std::vector<double> FParams_;
00105
00106     /* the next variables hold the position of the element in the F matrix
00107        that was used for the normalization */
00108     int Frow_,Fcol_;
00109
00110     // protected attributes for H-matrix parametrization
00111     BIAS::HMatrix H_;
00112     std::vector<double> HParams_;
00113
00114     // protected methods (helpers)
00115     /** Find the biggest absolute entry of the upper left 2x2 submatrix of
00116         the internally stored F matrix member.
00117         The position of this element is stored internally and used for
00118         the composition of the F matrix in ParamsToFMatrix.
00119         @return value of the entry with biggest absolute value
00120         @author mdunda 09 2003 */
00121     double GetBiggestAbsEntry();
00122     double Fscale_;
00123     double Hscale_;
00124   }; // class Parametrization
00125 } // namespace BIAS
00126
00127 #include <Base/Common/BIASpragmaEnd.hh>
00128
00129 #endif /* __Parametrization_hh__ */
00130
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/Examples/ParamExample.cpp Source File

Utils » Examples

ParamExample.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027
00028 #include <Utils/Param.hh>
00029 #include <Base/Math/Vector.hh>
00030 using namespace std;
00031 using namespace BIAS;
00032
00033 // class MyAlgorithm : public ParamCallbackInterface
00034 // {
00035 // public:
00036 //   MyAlgorithm(){};
00037 //   ~MyAlgorithm(){};
00038
00039 //   void  AddParam(Param &p) {
00040 //     p.AddParamInt("coollevel","Really cool threshold");
00041 //   };
00042 // };
00043
00044
00045 int main(int argc, char *argv[])
00046 {
00047
00048   Param *p = new Param();
00049
00050   Vector<double> vd(3);
00051   Vector<int> vi(3);
00052   vector<string> myenums;
00053   //   p.SetDebugLevel(D_PARAM_PARSECMDL);
00054
00055   myenums.push_back("foo");
00056   myenums.push_back("bar");
00057
00058   p->AddParamInt("int-test","Help for testint",42,3,100,'i');
00059   p->AddParamDouble("dbl-test","Help for testdbl",1.42,-3.1415,3.1415);
00060   p->AddParamString("str-test","Help for teststr","halloe!");
00061   p->AddParamDouble("dbl-more-test","Help for testdbl",1.42,-3.1415,3.1415);
00062   p->AddParamString("str-more-test","Help for teststr","halloe!");
00063   p->AddParamBool("bool","Help for bool",false);
00064   p->AddParamVecDbl("dbl-vec","Help me, if you can",vd);
00065   p->AddParamVecInt("int-vec","Help me, if you can",vi);
00066   p->AddParamEnum("enum","Help me, if you can",myenums);
00067
00068   p->ParseCommandLine(argc,argv);
00069
00070   p->ShowData();
00071
00072   return 0;
00073 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ParamGUI.cpp Source File

Gui

ParamGUI.cpp

Go to the documentation of this file.
00001 #include <Base/Common/BIASpragma.hh>
00002
00003 #include "ParamGUI.hh"
00004
00005 // STL headers
00006 #include <iostream>
00007 #include <map>
00008
00009 // BIAS headers
00010 #include <Utils/ParamTypes.hh>
00011 #include <Base/Debug/DebugSimple.hh>
00012 #include <Gui/StringConv.hh>
00013
00014 using namespace std;
00015 using namespace BIAS;
00016
00017 // we set a typedef here, as we need const iterators very often...
00018 typedef map<const std::string,BIAS::ParamTypeBase*>::const_iterator CI;
00019
00020 // ========================================================================
00021 // =========                                                      =========
00022 // ====                      P a r a m G U I                           ====
00023 // =========                                                      =========
00024 // ========================================================================
00025 ParamGUI::ParamGUI()
00026   : Param()
00027 {
00028 }
00029
00030
00031 ParamGUI::~ParamGUI()
00032 {
00033 }
00034
00035
00036 wxPanel* ParamGUI::GetPanel(wxWindow *parent, int GroupID)
00037 {
00038   //ParamGUIPanel *panel = new ParamGUIPanel(parent);
00039   wxScrolledWindow* scrolled = new wxScrolledWindow(parent);
00040   ParamGUIPanel* panel = new ParamGUIPanel(scrolled);
00041
00042   int count = 0;
00043   //for (CI it=ParamMap_.begin(); it!=ParamMap_.end(); it++)
00044   for (CI it=GetParamMap().begin(); it!=GetParamMap().end(); it++)
00045   {
00046     if (it->second->Group_ == GroupID)
00047     {
00048       //   panel->SetToolTip("Hallo");
00049       count++;
00050       if ( ParamTypeInt *item = dynamic_cast<ParamTypeInt*>(it->second) )
00051         panel->AddIntWidgets(item);
00052       else if ( ParamTypeBool *item = dynamic_cast<ParamTypeBool*>(it->second) )
00053         panel->AddBoolWidgets(item);
00054       else if ( ParamTypeDouble *item = dynamic_cast<ParamTypeDouble*>(it->second) )
00055         panel->AddDoubleWidgets(item);
00056       else if ( ParamTypeString *item = dynamic_cast<ParamTypeString*>(it->second) )
00057         panel->AddStringWidgets(item);
00058       else if ( ParamTypeVecDbl *item = dynamic_cast<ParamTypeVecDbl*>(it->second) )
00059         panel->AddVecDblWidgets(item);
00060       else if ( ParamTypeVecInt *item = dynamic_cast<ParamTypeVecInt*>(it->second) )
00061         panel->AddVecIntWidgets(item);
00062       else if ( ParamTypeEnum *item = dynamic_cast<ParamTypeEnum*>(it->second) )
00063         panel->AddEnumWidgets(item);
00064       else
00065       {
00066         BIASERR("Invalid parameter type!");
00067       }
00068     }
00069   }
00070   if (count > 0)
00071   {
00072     wxSize size = panel->GetSize();
00073     scrolled->SetScrollbars(1, 1, size.GetWidth(), size.GetHeight());
00074     return scrolled;
00075   }
00076   else
00077   {
00078     BIASERR("The requested group has no members!");
00079     delete panel;
00080     return NULL;
00081   }
00082 }
00083
00084
00085 wxNotebook* ParamGUI::GetNotebook(wxWindow *parent)
00086 {
00087 //   cout << "This is ParamGUI::GetNotebook()." << endl;
00088   wxNotebook *notebook = new wxNotebook( parent, -1 );
00089
00090   std::vector<int> groups = UniqueSortedGroups();
00091
00092   wxPanel *panel;
00093   wxString str;
00094   for(unsigned int i=0; i<groups.size(); i++)
00095     if (groups[i] != GRP_NOSHOW) {
00096 //       cout << "Building panel for group " << groups[i] << endl;
00097       panel = GetPanel(notebook, groups[i]);
00098       if(GroupNames_.size()<=groups.size()){
00099         str.Printf(wxT("Group %d"),groups[i]);
00100       }
00101       else
00102       {
00103         str = AsciiToWx(GetGroupName(groups[i]));
00104       }
00105       if (!notebook->AddPage(panel, str))
00106       {
00107         BIASERR("Error adding notebook page!");
00108         delete notebook;
00109         return NULL;
00110       }
00111     }
00112   notebook->Fit();
00113   return notebook;
00114 }
00115
00116
00117 wxFrame* ParamGUI::GetFrame(wxWindow *parent)
00118 {
00119 //   cout << "This is ParamGUI::GetFrame()." << endl;
00120   wxFrame *newframe = new wxFrame(parent, -1, _T("ParamGUI Frame"),
00121     wxDefaultPosition, wxDefaultSize);
00122   wxNotebook *MyNotebook  = GetNotebook(newframe);
00123 #if wxCHECK_VERSION(2,5,2)
00124   wxBoxSizer *nbsizer;
00125   nbsizer = new wxBoxSizer(wxHORIZONTAL);
00126   nbsizer->Add(MyNotebook);
00127 #else
00128   wxNotebookSizer *nbsizer;
00129   nbsizer = new wxNotebookSizer(MyNotebook);
00130 #endif
00131   newframe->SetSizer(nbsizer);
00132   //newframe->SetSize(wxSize(500,500));
00133   return newframe;
00134 }
00135
00136 ParamGUIDialog* ParamGUI::GetDialog(wxWindow *parent, const wxString &title)
00137 {
00138 //   cout << "This is ParamGUI::GetFrame()." << endl;
00139   ParamGUIDialog *newdialog = new ParamGUIDialog(parent,title,
00140                          wxDefaultPosition,
00141                          wxDefaultSize, this);
00142   return newdialog;
00143 }
00144
00145
00146 // ========================================================================
00147 // =========                                                      =========
00148 // ====                  P a r a m G U I P a n e l                     ====
00149 // =========                                                      =========
00150 // ========================================================================
00151 ParamGUIPanel::ParamGUIPanel(wxWindow *parent)
00152   : wxPanel(parent)
00153 {
00154   Parent_ = parent;
00155   WidgetIDs_.clear();
00156   Grid_ = new wxFlexGridSizer(1,3,2,5);
00157
00158   wxStaticText *Header1 = new wxStaticText( this, -1, _T("Parameter") );
00159   wxStaticText *Header2 = new wxStaticText( this, -1, _T("Type") );
00160   wxStaticText *Header3 = new wxStaticText( this, -1, _T("Value") );
00161   Grid_->Add(Header1, 0, wxALIGN_CENTER);
00162   Grid_->Add(Header2, 0, wxALIGN_CENTER);
00163   Grid_->Add(Header3, 0, wxALIGN_CENTER);
00164   SetSizer(Grid_);
00165   //SetScrollRate(1, 1);
00166 }
00167
00168
00169 ParamGUIPanel::~ParamGUIPanel()
00170 {
00171 }
00172
00173
00174 BEGIN_EVENT_TABLE(ParamGUIPanel, wxPanel)
00175   EVT_SPINCTRL          (-1, ParamGUIPanel::OnSpinCtrl)
00176   EVT_CHECKBOX          (-1, ParamGUIPanel::OnCheckBox)
00177   EVT_TEXT_ENTER        (-1, ParamGUIPanel::OnTextEnter)
00178   EVT_CHOICE            (-1, ParamGUIPanel::OnChoice)
00179 END_EVENT_TABLE()
00180
00181
00182 void ParamGUIPanel::AddIntWidgets(ParamTypeInt *item)
00183 {
00184   wxString tooltip(AsciiToWx(item->Help_));
00185   unsigned int ID = wxNewId(); // generate a new unique ID
00186   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00187   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("Integer") );
00188   wxString str;
00189   str.Printf(wxT("%d"),item->value_);
00190   wxSpinCtrl *Spin = new wxSpinCtrl( this, ID, str, wxDefaultPosition,
00191                                      wxDefaultSize, wxSP_ARROW_KEYS,
00192                                      item->min_, item->max_ );
00193   Spin->SetToolTip(tooltip);
00194   Grid_->SetRows(Grid_->GetRows()+1);
00195   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00196   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00197   Grid_->Add(Spin, 0, wxALIGN_CENTER);
00198   Fit();
00199   struct ItemAndWidget NewStruct;
00200   NewStruct.widget = Spin;
00201   NewStruct.item   = item;
00202   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00203   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00204 }
00205
00206
00207 void ParamGUIPanel::AddBoolWidgets(BIAS::ParamTypeBool *item)
00208 {
00209   wxString tooltip(AsciiToWx(item->Help_));
00210   unsigned int ID = wxNewId(); // generate a new unique ID
00211   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00212   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("Boolean") );
00213   wxCheckBox *CheckBox = new wxCheckBox( this, ID, wxEmptyString );
00214   CheckBox->SetValue(item->value_);
00215
00216   CheckBox->SetToolTip(tooltip);
00217
00218   Grid_->SetRows(Grid_->GetRows()+1);
00219   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00220   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00221   Grid_->Add(CheckBox, 0, wxALIGN_CENTER);
00222
00223   struct ItemAndWidget NewStruct;
00224   NewStruct.widget = CheckBox;
00225   NewStruct.item   = item;
00226   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00227   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00228 }
00229
00230
00231 void ParamGUIPanel::AddDoubleWidgets(BIAS::ParamTypeDouble *item)
00232 {
00233   wxString tooltip(AsciiToWx(item->Help_));
00234   unsigned int ID = wxNewId(); // generate a new unique ID
00235   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00236   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("Double") );
00237   wxString str;
00238   str.Printf(wxT("%f"),item->value_);
00239   wxTextCtrl *TextCtrl = new wxTextCtrl( this, ID, str, wxDefaultPosition,
00240                                          wxDefaultSize, wxTE_PROCESS_ENTER );
00241   TextCtrl->SetToolTip(tooltip);
00242
00243   Grid_->SetRows(Grid_->GetRows()+1);
00244   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00245   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00246   Grid_->Add(TextCtrl, 0, wxALIGN_CENTER);
00247
00248   struct ItemAndWidget NewStruct;
00249   NewStruct.widget = TextCtrl;
00250   NewStruct.item   = item;
00251   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00252   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00253 }
00254
00255
00256 void ParamGUIPanel::AddStringWidgets(BIAS::ParamTypeString *item)
00257 {
00258   wxString tooltip(AsciiToWx(item->Help_));
00259   unsigned int ID = wxNewId(); // generate a new unique ID
00260   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00261   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("String") );
00262   wxString str = AsciiToWx(item->value_);
00263   wxTextCtrl *TextCtrl = new wxTextCtrl( this, ID, str, wxDefaultPosition,
00264                                          wxSize(200,-1), wxTE_PROCESS_ENTER );
00265   TextCtrl->SetToolTip(tooltip);
00266   Grid_->SetRows(Grid_->GetRows()+1);
00267   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00268   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00269   Grid_->Add(TextCtrl, 0, wxALIGN_CENTER);
00270
00271   struct ItemAndWidget NewStruct;
00272   NewStruct.widget = TextCtrl;
00273   NewStruct.item   = item;
00274   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00275   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00276 }
00277
00278
00279 void ParamGUIPanel::AddVecDblWidgets(BIAS::ParamTypeVecDbl *item)
00280 {
00281   wxString tooltip(AsciiToWx(item->Help_));
00282   unsigned int ID = wxNewId(); // generate a new unique ID
00283   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00284   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("VecDbl") );
00285   wxString str = AsciiToWx(item->GetValueString());
00286   wxTextCtrl *TextCtrl = new wxTextCtrl( this, ID, str, wxDefaultPosition,
00287                                          wxSize(200,-1), wxTE_PROCESS_ENTER );
00288   TextCtrl->SetToolTip(tooltip);
00289   Grid_->SetRows(Grid_->GetRows()+1);
00290   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00291   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00292   Grid_->Add(TextCtrl, 0, wxALIGN_CENTER);
00293
00294   struct ItemAndWidget NewStruct;
00295   NewStruct.widget = TextCtrl;
00296   NewStruct.item   = item;
00297   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00298   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00299 }
00300
00301
00302 void ParamGUIPanel::AddVecIntWidgets(BIAS::ParamTypeVecInt *item)
00303 {
00304   wxString tooltip(AsciiToWx(item->Help_));
00305   unsigned int ID = wxNewId(); // generate a new unique ID
00306   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00307   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("VecInt") );
00308   wxString str = AsciiToWx(item->GetValueString());
00309   wxTextCtrl *TextCtrl = new wxTextCtrl( this, ID, str, wxDefaultPosition,
00310                                          wxSize(200,-1), wxTE_PROCESS_ENTER );
00311   TextCtrl->SetToolTip(tooltip);
00312   Grid_->SetRows(Grid_->GetRows()+1);
00313   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00314   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00315   Grid_->Add(TextCtrl, 0, wxALIGN_CENTER);
00316
00317   struct ItemAndWidget NewStruct;
00318   NewStruct.widget = TextCtrl;
00319   NewStruct.item   = item;
00320   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00321   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00322 }
00323
00324
00325 void ParamGUIPanel::AddEnumWidgets(BIAS::ParamTypeEnum *item)
00326 {
00327   wxString tooltip(AsciiToWx(item->Help_));
00328   unsigned int ID = wxNewId(); // generate a new unique ID
00329   wxStaticText *LabelText = new wxStaticText( this, -1, AsciiToWx(item->Name_) );
00330   wxStaticText *TypeText  = new wxStaticText( this, -1, _T("Enum") );
00331   int n = item->Map_.size();
00332   int i=0;
00333   wxString *choices=new wxString[n];
00334   for(map<string,int>::iterator it=item->Map_.begin();
00335       it!=item->Map_.end(); it++){
00336       choices[i] = AsciiToWx(it->first);
00337       i++;
00338     }
00339   wxChoice *Choice = new wxChoice(this, ID, wxDefaultPosition, wxSize(200,-1),
00340                                   n, choices );
00341   Choice->SetToolTip(tooltip);
00342
00343   Grid_->SetRows(Grid_->GetRows()+1);
00344   Grid_->Add(LabelText, 0, wxALIGN_CENTER);
00345   Grid_->Add(TypeText, 0, wxALIGN_CENTER);
00346   Grid_->Add(Choice, 0, wxALIGN_CENTER);
00347
00348   struct ItemAndWidget NewStruct;
00349   NewStruct.widget = Choice;
00350   NewStruct.item   = item;
00351   pair<unsigned int, struct ItemAndWidget> NewPair( ID, NewStruct );
00352   WidgetIDs_.insert(WidgetIDs_.end(), NewPair );
00353   delete[] choices;
00354 }
00355
00356
00357 void ParamGUIPanel::OnSpinCtrl(wxSpinEvent &event)
00358 {
00359 //   COUT("Fetched wxSpinEvent!" << endl);
00360   int ID = event.GetId();
00361 //   COUT("ID = " << ID << endl);
00362   map<unsigned int,struct ItemAndWidget>::const_iterator it;
00363   it = WidgetIDs_.find(ID);
00364   if ( it == WidgetIDs_.end() ){
00365       BIASERR("This error should never occur or otherwise\n "<<
00366               "something with the event IDs went wrong");
00367       return;
00368     }
00369   if ( ParamTypeInt *item =
00370        dynamic_cast<ParamTypeInt*>(it->second.item) ) {
00371     item->value_ = ((wxSpinCtrl*)(it->second.widget))->GetValue();
00372     if (item->CallbackObject_ != NULL)
00373       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00374   }
00375   else
00376     {
00377       BIASERR("Error during dynamic cast!");
00378     }
00379 }
00380
00381
00382 void ParamGUIPanel::OnCheckBox(wxCommandEvent &event)
00383 {
00384 //   COUT("Fetched CheckBox event!" << endl);
00385   int ID = event.GetId();
00386 //   COUT("ID = " << ID << endl);
00387   map<unsigned int,struct ItemAndWidget>::const_iterator it;
00388   it = WidgetIDs_.find(ID);
00389   if ( it == WidgetIDs_.end() ){
00390       BIASERR("This error should never occur or otherwise\n "<<
00391               "something with the event IDs went wrong");
00392       return;
00393     }
00394   if ( ParamTypeBool *item =
00395        dynamic_cast<ParamTypeBool*>(it->second.item) ){
00396     item->value_ = ((wxCheckBox*)(it->second.widget))->GetValue();
00397     if (item->CallbackObject_ != NULL)
00398       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00399   }
00400   else{
00401       BIASERR("Error during dynamic cast!");
00402     }
00403 }
00404
00405
00406 void ParamGUIPanel::OnTextEnter(wxCommandEvent &event)
00407 {
00408     COUT("Fetched TextEnter event!" << endl);
00409   int ID = event.GetId();
00410   //   COUT("ID = " << ID << endl);
00411   map<unsigned int,struct ItemAndWidget>::const_iterator it;
00412   it = WidgetIDs_.find(ID);
00413   if ( it == WidgetIDs_.end() ){
00414     BIASERR("This error should never occur or otherwise\n "<<
00415         "something with the event IDs went wrong");
00416     return;
00417   }
00418   if ( ParamTypeDouble *item =
00419        dynamic_cast<ParamTypeDouble*>(it->second.item) ){
00420     double newval;
00421     if ( !((wxTextCtrl*)it->second.widget)->GetValue().ToDouble(&newval) ){
00422       wxMessageBox( wxT("Please check your input!"),
00423             wxT("Not a double!"),
00424             wxOK | wxICON_ERROR );
00425     }
00426     else{
00427       // atof(
00428       // item->SetFromString() <0)
00429       // setwidgetvaslue(item->GetValueString();
00430       if ( newval > item->max_ ){
00431     wxString error;
00432     error.Printf(wxT("Your value outruns the upper border!\nValue clipped to %f!"),
00433              item->max_);
00434     wxMessageBox( error,wxT("Limits!"),wxOK | wxICON_ERROR );
00435     item->value_ = item->max_;
00436       }
00437       else if ( newval < item->min_ )
00438     {
00439       wxString error;
00440       error.Printf(wxT("Your value underruns the lower border!\nValue ")
00441                wxT("clipped to %f!"),item->min_);
00442       wxMessageBox( error,wxT("Limits!"),wxOK | wxICON_ERROR );
00443       item->value_ = item->min_;
00444     }
00445       else
00446     item->value_ = newval;
00447     if (item->CallbackObject_ != NULL)
00448       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00449     }
00450   }
00451   else if ( ParamTypeString *item =
00452         dynamic_cast<ParamTypeString*>(it->second.item) ) {
00453     item->value_ = WxToAscii(((wxTextCtrl*)(it->second.widget))->GetValue());
00454     if (item->CallbackObject_ != NULL)
00455       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00456   }
00457   else if ( ParamTypeVecDbl *item =
00458         dynamic_cast<ParamTypeVecDbl*>(it->second.item) ){
00459     /// \bug  here a bit SetFromStrng()!!
00460     BIASERR("unfinished "<<item);
00461     if (item->CallbackObject_ != NULL)
00462       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00463   }
00464   else if ( ParamTypeVecInt *item =
00465         dynamic_cast<ParamTypeVecInt*>(it->second.item) ){
00466     /// \bug here a bit SetFromStrng()!!
00467     BIASERR("unfinished "<<item);
00468     if (item->CallbackObject_ != NULL)
00469       item->CallbackObject_->ParameterChanged(item->Name_, &item->value_);
00470   }
00471   else{
00472     BIASERR("Error during dynamic cast!");
00473   }
00474
00475 }
00476
00477
00478 void ParamGUIPanel::OnChoice(wxCommandEvent &event)
00479 {
00480 //   COUT("Fetched Choice event!" << endl);
00481   int ID = event.GetId();
00482 //   COUT("ID = " << ID << endl);
00483   map<unsigned int,struct ItemAndWidget>::const_iterator it;
00484   it = WidgetIDs_.find(ID);
00485   if ( it == WidgetIDs_.end() )
00486     {
00487       BIASERR("This error should never occur or otherwise\n "<<
00488               "something with the event IDs went wrong");
00489       return;
00490     }
00491   if ( ParamTypeEnum *item =
00492        dynamic_cast<ParamTypeEnum*>(it->second.item) )
00493     {
00494       wxString str = ((wxChoice*)(it->second.widget))->GetStringSelection();
00495       string s = WxToAscii(str);
00496 //       cout << str << endl;
00497       item->SetFromString(s);
00498     }
00499   else
00500     {
00501       BIASERR("Error during dynamic cast!");
00502     }
00503 }
00504
00505
00506
00507 ParamGUIDialog::
00508 ParamGUIDialog(wxWindow *parent,const wxString& title, const wxPoint &p,
00509            const wxSize &s,ParamGUI *pg )
00510   :wxDialog(parent,-1,title, p,s, wxRESIZE_BORDER |wxCAPTION | wxSYSTEM_MENU)
00511 {
00512
00513   wxNotebook *MyNotebook  = pg->GetNotebook(this);
00514   wxBoxSizer *mainsizer = new wxBoxSizer(wxVERTICAL);
00515   wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
00516   wxButton *ok = new wxButton(this,wxID_OK,wxT("OK"));
00517   wxButton *cancel = new wxButton(this,wxID_CANCEL,wxT("Cancel"));
00518
00519   buttonsizer->Add(ok);
00520   buttonsizer->Add(cancel);
00521 #if wxCHECK_VERSION(2,5,2)
00522   mainsizer->Add(MyNotebook, 1, wxEXPAND);
00523 #else
00524   wxNotebookSizer *nbsizer;
00525   nbsizer = new wxNotebookSizer(MyNotebook);
00526   mainsizer->Add(nbsizer);
00527 #endif
00528   mainsizer->Add(buttonsizer);
00529
00530   SetSizer(mainsizer);
00531   //SetSize(wxSize(500,500));
00532 }
00533
00534 ParamGUIDialog::
00535 ~ParamGUIDialog()
00536 {
00537 }
00538
00539 BEGIN_EVENT_TABLE(ParamGUIDialog, wxDialog)
00540 END_EVENT_TABLE()
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ParamGUI.hh Source File

Gui

ParamGUI.hh

Go to the documentation of this file.
00001 #ifndef __ParamGUI_hh__
00002 #define __ParamGUI_hh__
00003
00004 #include <bias_config.h>
00005 #include <Base/Common/BIASpragmaStart.hh>
00006
00007 // STL headers
00008 #include <map>
00009
00010 // BIAS headers
00011 #include <Utils/ParamTypes.hh>
00012 #include <Utils/Param.hh>
00013
00014 // WX headers
00015 #include <wx/wx.h>
00016 #include <wx/spinctrl.h>
00017 #include <wx/notebook.h>
00018
00019 namespace BIAS
00020 {
00021     struct BIASGui_EXPORT ItemAndWidget {
00022         wxControl           *widget;
00023         BIAS::ParamTypeBase *item;
00024     };
00025
00026     /** @class ParamGUIPanel
00027     @ingroup g_gui
00028     @brief ??
00029     @author evers/mdunda */
00030     class BIASGui_EXPORT ParamGUIPanel : public wxPanel
00031     {
00032     public:
00033         ParamGUIPanel(wxWindow *parent);
00034         ~ParamGUIPanel();
00035
00036         // methods for adding widgets
00037         void AddIntWidgets(BIAS::ParamTypeInt *item);
00038         void AddBoolWidgets(BIAS::ParamTypeBool *item);
00039         void AddDoubleWidgets(BIAS::ParamTypeDouble *item);
00040         void AddStringWidgets(BIAS::ParamTypeString *item);
00041         void AddVecDblWidgets(BIAS::ParamTypeVecDbl *item);
00042         void AddVecIntWidgets(BIAS::ParamTypeVecInt *item);
00043         void AddEnumWidgets(BIAS::ParamTypeEnum *item);
00044
00045     protected:
00046         wxWindow *Parent_;
00047     private: // avodi DLL export
00048         std::map<unsigned int, struct ItemAndWidget> WidgetIDs_;
00049     protected:
00050         wxFlexGridSizer *Grid_;
00051
00052         // event handling methods
00053         void OnSpinCtrl(wxSpinEvent &event);
00054         void OnCheckBox(wxCommandEvent &event);
00055         void OnTextEnter(wxCommandEvent &event);
00056         void OnChoice(wxCommandEvent &event);
00057
00058         // WX macro to declare an event table for this object
00059         DECLARE_EVENT_TABLE()
00060     };
00061
00062     class BIASGui_EXPORT ParamGUI;
00063
00064     class BIASGui_EXPORT ParamGUIDialog : public wxDialog
00065     {
00066     public:
00067         ParamGUIDialog(wxWindow *parent,const wxString& title,
00068             const wxPoint &p,const wxSize &s, ParamGUI *pg);
00069         ~ParamGUIDialog();
00070     protected:
00071
00072         DECLARE_EVENT_TABLE()
00073     };
00074
00075     /** @class ParamGUI
00076     @ingroup g_gui
00077     @brief ??
00078     @author evers/mdunda */
00079     class BIASGui_EXPORT ParamGUI : public BIAS::Param
00080     {
00081     public:
00082         ParamGUI();
00083         ~ParamGUI();
00084
00085         /** Builds up a wxPanel with the parameters specified by GroupID.
00086         @return a pointer to the new panel
00087         @return NULL on error
00088         @author mdunda 03 2004 */
00089         wxPanel* GetPanel(wxWindow *parent, int GroupID=GRP_ALL);
00090
00091         /** Builds up a wxNotebook with each parameter group on one page.
00092         Group-ID -1 (GRP_NOSHOW) will be ignored.
00093         @return a pointer to the new notebook
00094         @retrun NULL on error
00095         @author mdunda 03 2004
00096         now GroupNames are shown in tabs if all Groupnames are set
00097         ischiller 08.09.04
00098         */
00099         wxNotebook* GetNotebook(wxWindow *parent);
00100
00101         /** Builds up a standalone wxFrame with a notebook embedded in it.
00102         @return a pointer to the new frame
00103         @retrun NULL on error
00104         @author mdunda 03 2004 */
00105         wxFrame* GetFrame(wxWindow *parent);
00106
00107
00108         /** Builds up a  wxDialog with a notebook embedded in it.
00109         @return a pointer to the new dialog
00110         @retrun NULL on error
00111         @author evers  2004-01 */
00112         ParamGUIDialog* GetDialog(wxWindow *parent, const wxString &title);
00113
00114
00115     }; // class
00116 } // namespace
00117
00118 #include <Base/Common/BIASpragmaEnd.hh>
00119
00120 #endif /* __ParamGUI_hh__ */
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample1.cpp Source File

Gui » Examples

ParamGUISample1.cpp

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Base/Common/BIASpragma.hh>
00004
00005 #include <Gui/ParamGUI.hh>
00006 #include <Gui/StringConv.hh>
00007 #include <Utils/Param.hh>
00008 #include <iostream>
00009 #include <vector>
00010 #include <string>
00011
00012 using namespace BIAS;
00013 using namespace std;
00014
00015 // classes
00016
00017 class MyAlgorithm : public ParamCallbackInterface
00018 {
00019 public:
00020   MyAlgorithm(){coollevel = NULL;};
00021   ~MyAlgorithm(){};
00022
00023  void  ParamAdd(Param &p) {
00024    coollevel = p.AddParamInt("coollevel","Really cool threshold",0,0,100,0,1);
00025     cooldbl = p.AddParamDouble("cooldbl","Really cool double ",0,0,100,0,1);
00026     p.RegisterCallbackObject("coollevel",this);
00027     p.RegisterCallbackObject("cooldbl",this);
00028  };
00029
00030
00031 void ParameterChanged(const std::string &name, const void *data){
00032     cout <<"Here is MyAlgorithm! My parameter \""<<name<<"\" changed"<<endl;
00033     if (data == coollevel)
00034       cout <<"Hey, it was \"coollevel\", new cool level is: "<<*coollevel
00035        <<endl;
00036 };
00037
00038 protected:
00039   int *coollevel;
00040   double *cooldbl;
00041
00042 };
00043
00044
00045 class MyApp : public wxApp
00046 {
00047  public:
00048     virtual bool OnInit();
00049 };
00050
00051 DECLARE_APP(MyApp)
00052
00053
00054 class MyFrame : public wxFrame
00055 {
00056 public:
00057   MyFrame();
00058   ~MyFrame();
00059   ParamGUI param_;
00060 };
00061
00062 // uncool global, for testing
00063 MyAlgorithm *algo;
00064
00065 // implementation
00066
00067 IMPLEMENT_APP(MyApp)
00068
00069 bool MyApp::OnInit()
00070 {
00071   MyFrame *frame = new MyFrame();
00072   frame->Show(TRUE);
00073   SetTopWindow(frame);
00074   return true;
00075 }
00076
00077 MyFrame::MyFrame()
00078   : wxFrame(NULL, -1, _T("ParamGUISample1"), wxDefaultPosition,
00079             wxSize(400,600) )
00080 {
00081   param_.AddParamInt("SampleInt1","Hilfetext zu SampleInt1",0,-100,100,0,1);
00082   param_.AddParamBool("SampleBool1","Hilfetext zu SampleBool1",false,0,1);
00083   param_.AddParamDouble("SampleDouble1","Hilfetext zu SampleDouble1");
00084   param_.AddParamString("SampleString1","Hilfetext zu SampleString1");
00085
00086   vector<string> enums;
00087   enums.push_back("Enum 1");
00088   enums.push_back("Enum 2");
00089   enums.push_back("Enum 3");
00090   enums.push_back("Enum 4");
00091
00092   param_.AddParamEnum("SampleEnum","Hilfetext zu SampleEnum",enums);
00093
00094   algo = new MyAlgorithm();
00095   algo->ParamAdd(param_);
00096
00097   param_.ParseCommandLine(wxTheApp->argc,WxToAsciiArray(wxTheApp->argv,wxTheApp->argc));
00098   param_.ShowData();
00099   wxPanel *MyPanel;
00100   MyPanel = param_.GetPanel(this,1);
00101 }
00102
00103 MyFrame::~MyFrame()
00104 {
00105   param_.ShowData();
00106 }
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample2.cpp Source File

Gui » Examples

ParamGUISample2.cpp

Go to the documentation of this file.
00001 #include <wx/wx.h>
00002
00003 #include <Gui/ParamGUI.hh>
00004 #include <Gui/StringConv.hh>
00005 #include <Utils/Param.hh>
00006 #include <iostream>
00007
00008 using namespace BIAS;
00009 using namespace std;
00010
00011 // classes
00012
00013 class MyApp : public wxApp
00014 {
00015  public:
00016     virtual bool OnInit();
00017 };
00018
00019 DECLARE_APP(MyApp)
00020
00021 // implementation
00022
00023 IMPLEMENT_APP(MyApp)
00024
00025 bool MyApp::OnInit()
00026 {
00027   ParamGUI param_;
00028   param_.AddParamInt("SampleInt1","Hilfetext zu SampleInt1",0,-100,100,0,1);
00029   param_.AddParamInt("SampleInt2","Hilfetext zu SampleInt2");
00030   param_.AddParamBool("SampleBool1","Hilfetext zu SampleBool1",false,0,1);
00031   param_.AddParamBool("SampleBool2","Hilfetext zu SampleBool2");
00032   param_.AddParamDouble("SampleDouble1","Hilfetext zu SampleDouble1");
00033   param_.AddParamString("SampleString1","Hilfetext zu SampleString1");
00034
00035   param_.ParseCommandLine(wxTheApp->argc,WxToAsciiArray(wxTheApp->argv,wxTheApp->argc));
00036
00037   wxFrame *frame = param_.GetFrame(NULL);
00038   frame->Show(TRUE);
00039   SetTopWindow(frame);
00040   return true;
00041 }
00042
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/ParamGUISample3.cpp Source File

Gui » Examples

ParamGUISample3.cpp

Go to the documentation of this file.
00001 #include <bias_config.h>
00002 #include <wx/wx.h>
00003
00004 #include <Gui/ParamGUI.hh>
00005 #include <Gui/StringConv.hh>
00006 #include <Utils/Param.hh>
00007 #include <iostream>
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 // classes
00013
00014 class MyAlgorithm : public ParamCallbackInterface
00015 {
00016 public:
00017   MyAlgorithm(){coollevel = NULL;};
00018   ~MyAlgorithm(){};
00019
00020  void  ParamAdd(Param &p) {
00021     coollevel = p.AddParamInt("coollevel","Really cool threshold");
00022     p.RegisterCallbackObject("coollevel",this); };
00023 void ParameterChanged(const std::string &name, const void *data){
00024     cout <<"Here is MyAlgorithm! My parameter \""<<name<<"\" changed"<<endl;
00025     if (data == coollevel)
00026       cout <<"Hey, it was \"coollevel\", new cool level is: "<<*coollevel
00027        <<endl;
00028 };
00029
00030 protected:
00031   int *coollevel;
00032
00033
00034 };
00035
00036
00037 class MyApp : public wxApp
00038 {
00039  public:
00040     virtual bool OnInit();
00041 };
00042
00043 DECLARE_APP(MyApp)
00044
00045
00046 class MyFrame : public wxFrame
00047 {
00048 public:
00049   MyFrame();
00050   ~MyFrame();
00051   ParamGUI param_;
00052 };
00053
00054 // uncool global, for testing
00055 MyAlgorithm *algo;
00056
00057 // implementation
00058
00059 IMPLEMENT_APP(MyApp)
00060
00061 bool MyApp::OnInit()
00062 {
00063   MyFrame *frame = new MyFrame();
00064   frame->Show(TRUE);
00065   SetTopWindow(frame);
00066   return true;
00067 }
00068
00069 MyFrame::MyFrame()
00070   : wxFrame(NULL, -1, _T("ParamGUISample3"), wxDefaultPosition,
00071             wxSize(400,600) )
00072 {
00073   param_.AddParamInt("SampleInt1","Hilfetext zu SampleInt1",0,-100,100,0,1);
00074   param_.AddParamInt("SampleInt2","Hilfetext zu SampleInt2");
00075   param_.AddParamBool("SampleBool1","Hilfetext zu SampleBool1",false,0,1);
00076   param_.AddParamBool("SampleBool2","Hilfetext zu SampleBool2");
00077   param_.AddParamDouble("SampleDouble1","Hilfetext zu SampleDouble1");
00078   param_.AddParamString("SampleString1","Hilfetext zu SampleString1");
00079
00080   algo = new MyAlgorithm();
00081   algo->ParamAdd(param_);
00082
00083   param_.ParseCommandLine(wxTheApp->argc,WxToAsciiArray(wxTheApp->argv,wxTheApp->argc));
00084   param_.ShowData();
00085   wxNotebook *MyNotebook;
00086   MyNotebook = param_.GetNotebook(this);
00087 #if wxCHECK_VERSION(2,5,2)
00088   wxBoxSizer *nbsizer = new wxBoxSizer(wxHORIZONTAL);
00089   nbsizer->Add(MyNotebook);
00090 #else
00091   wxNotebookSizer *nbsizer;
00092   nbsizer = new wxNotebookSizer(MyNotebook);
00093 #endif
00094   SetSizer(nbsizer);
00095   Show();
00096 }
00097
00098 MyFrame::~MyFrame()
00099 {
00100   param_.ShowData();
00101 }
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ParamTypes.cpp Source File

Utils

ParamTypes.cpp

Go to the documentation of this file.
00001
00002 /** Jan Woetzel 2005 */
00003
00004 #include "ParamTypes.hh"
00005 #include "Param.hh" // for delete of CallbackObject_
00006
00007
00008 //#include <Base/Common/BIASpragma.hh>
00009
00010 using namespace std;
00011 using namespace BIAS;
00012
00013
00014
00015 ParamTypeBase::ParamTypeBase()
00016 : Enhanced_(false),
00017 Hidden_(false)
00018 {
00019     CallbackObject_ = NULL;
00020 }
00021
00022 ParamTypeBase::~ParamTypeBase()
00023 {
00024     // TODO HACK jw memory leak
00025     if (CallbackObject_!=NULL)
00026     {
00027         delete CallbackObject_;
00028     }
00029 }
00030
00031
00032 #include <Base/Common/BIASpragmaStart.hh>
00033 int ParamTypeBase::SetFromString(const std::string &s)
00034 {
00035     return 0;
00036 }
00037 #include <Base/Common/BIASpragmaEnd.hh>
00038
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ParamTypes.hh Source File

Utils

ParamTypes.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 /** This file holds the definitions of the parameter types used by
00027 BIAS::Param.
00028 @author mdunda 03 2004 */
00029
00030 #ifndef __ParamTypes_hh__
00031 #define __ParamTypes_hh__
00032 #include <Base/Common/BIASpragmaStart.hh>
00033
00034 #include <Base/Debug/Error.hh>
00035 #include <Base/Math/Vector.hh>
00036
00037 #include <string>
00038 #include <sstream>
00039 #include <map>
00040
00041
00042 namespace BIAS {
00043
00044     // fwd declaratiion
00045     class BIASUtils_EXPORT ParamCallbackInterface;
00046
00047
00048     class BIASUtils_EXPORT ParamTypeBase
00049     {
00050     public:
00051         // destructor
00052         virtual ~ParamTypeBase();
00053
00054         // constructors
00055         ParamTypeBase();
00056
00057         // entries
00058         std::string Name_;
00059         std::string Help_;
00060         char        ShortCmd_;
00061         bool        WriteToFile_; ///< is only written to parameter file if true
00062         bool        Enhanced_; ///< hide this parameter from the 'naive' user
00063         bool        Hidden_; ///< hide this parameter from all users
00064         int         Group_;
00065
00066         // if some one changed a parameter, we should call
00067         // CallbackObject_->ParameterChanged(Name_);
00068         ParamCallbackInterface *CallbackObject_;
00069
00070         virtual void SetDefault(){ /* to be overwritten in derived class */ }
00071
00072         /**
00073         This is a common interface to let a specialized instance read
00074         its data from a string. Used from ParseCommandLine() and ReadParam()
00075         to be overwritten in derived class
00076         */
00077         virtual int SetFromString(const std::string &s);
00078
00079         virtual std::string GetTypeName(){return "NOTYPE";};
00080         virtual std::string GetValueString(){return "NOVAL";};
00081         virtual std::string GetHint(){return "NOVAL";};
00082
00083     };
00084
00085     // derived parameter types following...
00086
00087     // =========================
00088     // ===      BOOLEAN      ===
00089     // =========================
00090     class BIASUtils_EXPORT ParamTypeBool : public ParamTypeBase
00091     {
00092     public:
00093         // 'structors
00094         ParamTypeBool(){}
00095         virtual ~ParamTypeBool()
00096         {}
00097
00098         // entries
00099         bool value_;
00100         bool default_;
00101         /// resets to default value
00102         inline void SetDefault(){ value_=default_; }
00103         virtual int SetFromString(const std::string &s){
00104             // maybe we should try to be case insensitive
00105             value_ = (s == "true");
00106             return 0;
00107         };
00108         virtual std::string GetTypeName(){return "BOOL";};
00109         virtual std::string GetValueString(){return value_?"true":"false";};
00110         virtual std::string GetHint(){return "true / false";};
00111     };
00112
00113
00114     // =========================
00115     // ===      INTEGER      ===
00116     // =========================
00117     class BIASUtils_EXPORT ParamTypeInt : public ParamTypeBase
00118     {
00119     public:
00120         // 'structors
00121         ParamTypeInt()
00122             : ParamTypeBase()
00123         {}
00124
00125         virtual ~ParamTypeInt()
00126         {}
00127
00128         // entries
00129         int value_;
00130         int default_;
00131         int min_;
00132         int max_;
00133         /// resets to default value
00134         inline void SetDefault(){ value_=default_; }
00135         virtual int SetFromString(const std::string &s){
00136             int newval = atoi(s.c_str());
00137             if ( newval < min_ ){
00138                 BIASERR("WARNING: Value for '"<<Name_<<"' clipped to "<<min_<<std::endl);
00139                 value_ = min_;
00140             }
00141             else if (newval > max_ ) {
00142                 BIASERR("WARNING: Value for '"<<Name_<<"' clipped to "<<max_<<std::endl);
00143                 value_ = max_;
00144             }
00145             else value_ = newval;
00146             return 0;
00147         };
00148         virtual std::string GetTypeName(){return "INT";};
00149
00150         virtual std::string GetValueString()
00151         {
00152             std::ostringstream oss;oss<<value_; return oss.str();
00153         };
00154
00155         virtual std::string GetHint()
00156         {
00157             std::ostringstream oss;oss<<"[ "<<min_<<" .. "<<max_<<" ]";
00158             return oss.str();
00159         };
00160
00161     }; // class ParamTypeInt
00162
00163
00164     // =========================
00165     // ===      DOUBLE       ===
00166     // =========================
00167     class BIASUtils_EXPORT ParamTypeDouble : public ParamTypeBase
00168     {
00169     public:
00170         // 'structors
00171         ParamTypeDouble(){}
00172         virtual ~ParamTypeDouble(){}
00173         // entries
00174         double value_;
00175         double default_;
00176         double min_;
00177         double max_;
00178         /// resets to default value
00179         inline void SetDefault(){ value_=default_; }
00180         virtual int SetFromString(const std::string &s){
00181             double newval = atof(s.c_str());
00182             if ( newval < min_ ){
00183                 BIASERR("WARNING: Value for '"<<Name_<<"' clipped to "<<min_<<std::endl);
00184                 value_ = min_;
00185             }
00186             else if (newval > max_ ) {
00187                 BIASERR("WARNING: Value for '"<<Name_<<"' clipped to "<<max_<<std::endl);
00188                 value_ = max_;
00189             }
00190             else value_ = newval;
00191             return 0;
00192         };
00193         virtual std::string GetTypeName(){return "DOUBLE";};
00194         virtual std::string GetValueString(){
00195             std::ostringstream oss;oss<<value_; return oss.str();};
00196             virtual std::string GetHint(){
00197                 std::ostringstream oss;oss<<"[ "<<min_<<" .. "<<max_<<" ]";
00198                 return oss.str();};
00199     };
00200
00201
00202     // =========================
00203     // ===      STRING       ===
00204     // =========================
00205     class BIASUtils_EXPORT ParamTypeString : public ParamTypeBase
00206     {
00207     public:
00208         // 'structors
00209         ParamTypeString(){}
00210         virtual ~ParamTypeString(){}
00211         // entries
00212         std::string value_;
00213         std::string default_;
00214         /// resets to default value
00215         inline void SetDefault(){ value_=default_; }
00216         virtual int SetFromString(const std::string &s){
00217             value_ = s;
00218             return 0;
00219         }
00220         virtual std::string GetTypeName(){return "STRING";};
00221         virtual std::string GetValueString(){return "\""+value_+"\"";};
00222         virtual std::string GetHint(){
00223             std::ostringstream oss;oss<<" def: "<<default_;
00224             return oss.str();};
00225     };
00226
00227
00228     // =========================
00229     // === VECTOR OF DOUBLE  ===
00230     // =========================
00231     class BIASUtils_EXPORT ParamTypeVecDbl : public ParamTypeBase
00232     {
00233     public:
00234         // 'structors
00235         ParamTypeVecDbl(){}
00236         virtual ~ParamTypeVecDbl(){}
00237         // entries
00238         BIAS::Vector<double> value_;
00239         BIAS::Vector<double> default_;
00240         /// resets to default value
00241         inline void SetDefault(){ value_=default_; }
00242         virtual int SetFromString(const std::string &s){
00243             std::istringstream iss(s);
00244             double x;
00245             // check for size
00246             int length=-1;
00247             while (iss){
00248                 iss >> x; length++;
00249             }
00250             //std::cerr << Name_ << " has size "<<length<<std::endl;
00251             // resize vector
00252             value_.newsize(length);
00253             // now read it
00254             std::istringstream iss2(s);
00255             for(unsigned int i=0; i<value_.Size(); i++) {
00256                 iss2 >> x; value_[i] = x;
00257                 //std::cerr << x << "   ";
00258             }
00259             return 0;
00260         };
00261         virtual std::string GetTypeName(){return "VECDBL";};
00262         virtual std::string GetValueString(){
00263             std::ostringstream oss; oss<<"\"";
00264             for (int i=0;i<value_.size(); i++) {
00265                 oss<<value_[i];
00266                 if (i<value_.size()-1) oss <<" ";
00267             }
00268             oss<<"\"";
00269             return oss.str();
00270         };
00271
00272     };
00273
00274
00275     // =========================
00276     // === VECTOR OF INTEGER ===
00277     // =========================
00278     class BIASUtils_EXPORT ParamTypeVecInt : public ParamTypeBase
00279     {
00280     public:
00281         // 'structors
00282         ParamTypeVecInt(){}
00283         virtual ~ParamTypeVecInt(){}
00284         // entries
00285         BIAS::Vector<int> value_;
00286         BIAS::Vector<int> default_;
00287         /// resets to default value
00288         inline void SetDefault(){ value_=default_; }
00289         virtual int SetFromString(const std::string &s){
00290             std::istringstream iss(s);
00291             int x;
00292             // check for size
00293             int length=-1;
00294             while (iss){
00295                 iss >> x; length++;
00296             }
00297             //std::cerr << Name_ << " has size "<<length<<std::endl;
00298             // resize vector
00299             value_.newsize(length);
00300             // now read it
00301             std::istringstream iss2(s);
00302             for(unsigned int i=0; i<value_.Size(); i++) {
00303                 iss2 >> x; value_[i] = x;
00304             }
00305             return 0;
00306         };
00307         virtual std::string GetTypeName(){return "VECINT";};
00308         virtual std::string GetValueString(){
00309             std::ostringstream oss; oss<<"\"";
00310             for (int i=0;i<value_.size(); i++) {
00311                 oss<<value_[i];
00312                 if (i<value_.size()-1) oss <<" ";
00313             }
00314             oss<<"\"";
00315             return oss.str();
00316         };
00317
00318     };
00319
00320
00321     // =========================
00322     // ===       ENUM        ===
00323     // =========================
00324     class BIASUtils_EXPORT ParamTypeEnum : public ParamTypeBase
00325     {
00326     public:
00327         // 'structors
00328         ParamTypeEnum(){}
00329         virtual ~ParamTypeEnum(){}
00330         // entries
00331         int value_;
00332         int default_;
00333         std::map<std::string,int> Map_;
00334         /// resets to default value
00335         inline void SetDefault(){ value_=default_; }
00336         virtual int SetFromString(const std::string &s){
00337             std::map<std::string,int>::iterator it;
00338             if ( (it=Map_.find(s)) ==Map_.end() ) {
00339                 BIASERR("Identifier for '" <<Name_<< "' is not valid. Using default.")
00340                     value_ = default_;
00341             }
00342             else value_ = it->second;
00343             return 0;
00344         }
00345         virtual std::string GetTypeName(){return "ENUM";};
00346         virtual std::string GetValueString(){
00347             std::ostringstream oss;
00348             std::map<std::string,int>::iterator it;
00349             for (it=Map_.begin();it!=Map_.end(); it++)
00350                 if ( it->second == value_ ) oss<<it->first;
00351             return oss.str();};
00352
00353             virtual std::string GetHint(){
00354                 std::ostringstream oss;
00355                 std::map<std::string,int>::iterator it;
00356                 for (it=Map_.begin();it!=Map_.end(); it++){
00357                     if (it!=Map_.begin()) oss<<", ";
00358                     oss<<it->first;
00359                 }
00360                 return oss.str();};
00361     };
00362 } // namespace BIAS
00363
00364
00365 #include <Base/Common/BIASpragmaEnd.hh>
00366 #endif /* __ParamTypes_hh__ */
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PlueckerMatrix.cpp Source File

Base » Geometry

PlueckerMatrix.cpp

Go to the documentation of this file.
00001 #include <Base/Geometry/PlueckerMatrix.hh>
00002
00003 #include <Base/Debug/Exception.hh>
00004 #include <Base/Common/CompareFloatingPoint.hh>
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009 PlueckerMatrix::
00010 PlueckerMatrix(const Matrix4x4<PLUECKERMATRIX_TYPE>& m)
00011   : Matrix4x4<PLUECKERMATRIX_TYPE>(m)
00012 {
00013   // enforce the rank two constraint
00014   if (!CheckConstraint_()){
00015     BEXCEPTION("not a Pluecker matrix: "<<*this);
00016   }
00017 }
00018
00019
00020 bool PlueckerMatrix::
00021 CheckConstraint_() const
00022 {
00023   Vector<PLUECKERMATRIX_TYPE> l = GetPlueckerLineCoordinates();
00024   return Equal(l[0]*l[5] + l[1]*l[4] + l[2]*l[3], 0.0);
00025 }
00026
00027
00028 void PlueckerMatrix::
00029 Set(const HomgPoint3D& p1, const HomgPoint3D& p2)
00030 {
00031   *this = p1.OuterProduct(p2);
00032   this->SubIP(p2.OuterProduct(p1));
00033 }
00034
00035
00036 Vector<PLUECKERMATRIX_TYPE> PlueckerMatrix::
00037 GetPlueckerLineCoordinates() const
00038 {
00039   Vector<PLUECKERMATRIX_TYPE> res(6);
00040   res[0] = (*this)[0][1];
00041   res[1] = (*this)[0][2];
00042   res[2] = (*this)[0][3];
00043   res[3] = (*this)[1][2];
00044   res[4] = (*this)[3][1];
00045   res[5] = (*this)[2][3];
00046   return res;
00047 }
00048
00049
00050 HomgPoint3D PlueckerMatrix::
00051 GetDirection() const
00052 {
00053   return HomgPoint3D((*this)[0][3], (*this)[1][3], (*this)[2][3], 1.0);
00054 }
00055
00056
00057 HomgPoint3D PlueckerMatrix::
00058 GetNormal() const
00059 {
00060   return HomgPoint3D((*this)[0][1], (*this)[0][2], (*this)[1][2], 1.0);
00061 }
00062
00063
00064
00065
00066
00067 /*
00068
00069 void PlueckerMatrix::
00070 CalculateFootpoint(HomgPoint3D& p, HomgPoint3D& footp)
00071 {
00072   if (p.GetW() != 0.0){
00073     BEXCEPTION("cannot calculate footpoint to points at infinity "<<p);
00074   }
00075
00076 }
00077
00078 PLUECKERMATRIX_TYPE PlueckerMatrix::
00079 Distance(HomgPoint3D& p)
00080 {
00081   HomgPoint3D footp;
00082   CalculateFootpoint(p, footp);
00083   footp -= p;
00084   return footp.NormL2();
00085 }
00086
00087
00088 */
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PlueckerMatrix.hh Source File

Base » Geometry

PlueckerMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __PlueckerMatrix_hh__
00026 #define __PlueckerMatrix_hh__
00027 #include "bias_config.h"
00028
00029 #include <Base/Geometry/HomgPoint3D.hh>
00030 #include <Base/Math/Vector3.hh>
00031 #include <Base/Math/Vector2.hh>
00032 #include <Base/Math/Vector.hh>
00033 #include <Base/Math/Matrix.hh>
00034 #include <Base/Math/Matrix4x4.hh>
00035
00036 #define PLUECKERMATRIX_TYPE double
00037
00038 namespace BIAS{
00039
00040 /** @class PlueckerMatrix
00041     @brief represente a 3d line using a 4x4 Pluecker matrix
00042     @author woelk 03/2006 */
00043
00044   class PlueckerMatrix
00045     : public Matrix4x4<PLUECKERMATRIX_TYPE>
00046   {
00047   public:
00048     inline PlueckerMatrix() :  Matrix4x4<PLUECKERMATRIX_TYPE>(MatrixZero) {}
00049
00050     /** @brief cast constructor, checks special constraints */
00051     PlueckerMatrix(const BIAS::Matrix4x4<PLUECKERMATRIX_TYPE>& m);
00052
00053     /** @brief construction of a line through 2 points */
00054     inline PlueckerMatrix(const HomgPoint3D& p1, const HomgPoint3D& p2)
00055     { Set(p1, p2); }
00056
00057     virtual ~PlueckerMatrix() {};
00058
00059     /** @brief construction of a line through 2 points */
00060     void Set(const HomgPoint3D& p1, const HomgPoint3D& p2);
00061
00062     Vector<PLUECKERMATRIX_TYPE> GetPlueckerLineCoordinates() const;
00063
00064     /** @brief direction vetor */
00065     HomgPoint3D GetDirection() const;
00066
00067     /** @brief normal vector to the line */
00068     HomgPoint3D GetNormal() const;
00069
00070   protected:
00071     /** @brief checks for the rank two constraint, i.e. f the direction
00072         and the normal vector are perpendicular to each other */
00073     bool CheckConstraint_() const;
00074   };
00075
00076
00077 } // namespace BIAS
00078
00079
00080 #endif // __PlueckerMatrix_hh__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/pmatrix2projection.cpp Source File

Tools

pmatrix2projection.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 #include <iostream>
00028 #include <vector>
00029
00030 #include <Geometry/PMatrix.hh>
00031 #include <Geometry/Projection.hh>
00032 #include <Geometry/ProjectionParametersPerspective.hh>
00033 #include <Utils/Param.hh>
00034
00035 using namespace std;
00036 using namespace BIAS;
00037
00038 Param param(true);
00039
00040 void usage(char* name)
00041 {
00042   param.Usage();
00043   cout<<"\nConverts PMatrix files into Projection readable files.\n";
00044
00045   cout<<"\n usage:\n";
00046   cout<<name<<"params <PMatrix> ...\n";
00047 }
00048
00049 string GetBaseName(const std::string& FileName)
00050 {
00051   int begin = FileName.find_last_of('/');
00052   int end = FileName.find_last_of('.');
00053   return FileName.substr(begin+1, end-begin-1);
00054 }
00055
00056
00057 void PtoPPP(Projection  &proj,const string &file,
00058         unsigned int w, unsigned int h, bool overwriteIntrinsics)
00059 {
00060   PMatrix P;
00061   ProjectionParametersPerspective* params;
00062   params =dynamic_cast<ProjectionParametersPerspective*>(proj.GetParameters());
00063   if(params==NULL) {
00064     cout<<"no perspective parameters?\n";
00065     exit(0) ;
00066   }
00067     Quaternion<double> quat;
00068   int qres;
00069   if(!P.Load(file)) {
00070     cout<<"could not read "<<file<<endl;
00071     return;
00072   }
00073   qres = static_cast<RMatrixBase>(P.GetR()).GetQuaternion(quat);
00074   BIASASSERT(qres==0);
00075   params->SetQ(quat);
00076   params->SetC(P.GetC());
00077   if (overwriteIntrinsics) {
00078     params->SetK(P.GetK());
00079     params->SetImageSize(w, h);
00080   }
00081 #ifdef BIAS_HAVE_XML2
00082   proj.XMLWrite(GetBaseName(file)+".xml");
00083   cout<<GetBaseName(file)+".xml"<<endl;
00084 #endif //BIAS_HAVE_XML2
00085 }
00086
00087
00088
00089
00090 /** @author bartczak */
00091 int main(int argc, char* argv[])
00092 {
00093   int* width;
00094   int* height;
00095   string* listFile;
00096   string *CameraParamFile;
00097   width = param.AddParamInt("width",
00098                 "width of corresponding image",
00099                 0, 0, INT_MAX, 'w');
00100   height = param.AddParamInt("height",
00101                 "height of corresponding image",
00102                 0, 0, INT_MAX, 'h');
00103   listFile = param.AddParamString("listFile",
00104                   "file containing a list of pamtrices");
00105   CameraParamFile = param.AddParamString("cameraParam",
00106                   "XML-file with camera parameters");
00107
00108   int firstPMatrix = param.ParseCommandLine(argc, argv);
00109   if( argc<2) {
00110     usage(argv[0]);
00111     return 0;
00112   }
00113
00114
00115   PMatrix P;
00116
00117   std::vector< std::string > LinesInFile;
00118   if(*listFile!="") {
00119     Param::ParseListFile (*listFile, LinesInFile);
00120     cout<<"found"<<LinesInFile.size()<<"entries in specified listFile"<<endl;
00121   }
00122
00123   bool UseKFromP = false;
00124   Projection *proj;
00125
00126   if (*CameraParamFile == "") {
00127     cout<<"width = "<<*width<<"  height = "<<*height<<endl;
00128     ProjectionParametersPerspective pp;
00129     proj = new Projection(pp);
00130     UseKFromP = true;
00131   }
00132   else {
00133     proj = new Projection;
00134 #ifdef BIAS_HAVE_XML2
00135     proj->ReadFromCamParamFile(*CameraParamFile);
00136 #endif //BIAS_HAVE_XML2
00137   }
00138
00139
00140   int i;
00141   for(i=0; i<(int)LinesInFile.size(); i++) {
00142     PtoPPP(*proj, LinesInFile[i], *width, *height, UseKFromP);
00143   }
00144
00145   for(i=firstPMatrix; i<argc; i++) {
00146      PtoPPP(*proj, argv[i],  *width, *height, UseKFromP);
00147   }
00148
00149
00150   return 0;
00151 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/Examples/PMatrix2RigParameter.cpp Source File

Image » Examples

PMatrix2RigParameter.cpp

Go to the documentation of this file.
00001 #include "../CameraParam.hh"
00002 #include "../RigParameter.hh"
00003 #include <iostream>
00004
00005 using namespace std;
00006 using namespace BIAS;
00007
00008 // this is an preliminary example of how to write a rigparameter file
00009 // given some pmatrices (2004-06-21).
00010 // rigparameter does not yet fully work, if it does, this example has to be
00011 // updated because K and other params have to be stored in a central place
00012 // and some "virtual" pixel sizes have to be set.
00013
00014
00015 int main (int argc, char* argv[])
00016 {
00017 #ifdef BIAS_HAVE_XML2
00018   cout <<"Usage: "<<endl<<"   "
00019        <<argv[0]<<" output.xml pfile1 [pfile2 ...]" <<endl;
00020   if (argc<2) return -1;
00021
00022   RigParameter rp;
00023
00024   // read all pmatrices from command line file names
00025   vector<PMatrix> vecPMatrices;
00026   for (int param=2; param<argc; param++) {
00027     PMatrix P;
00028     if (!P.Load(argv[param])) {
00029       BIASERR("Error reading pmatrix "<<argv[param]<<" STOPPING.");
00030       exit(-1);
00031     }
00032     cout <<"Loaded P("<< param-1<<") from file "<<argv[param]<<" :"<<P<<endl;
00033     vecPMatrices.push_back(P);
00034
00035     KMatrix K(P.GetK());
00036     CameraParam myCameraParam;
00037     myCameraParam.SetZoomCamera(false);
00038     myCameraParam.SetFocalLength(K[0][0]);
00039     myCameraParam.SetPrincipal(K[0][2], K[1][2]);
00040     myCameraParam.SetCellSize(0.001, K[1][1]/K[0][0]);
00041
00042     //rp.Camera.push_back(myCameraParam);
00043     rp.AddCamera(myCameraParam);
00044     //rp.Calibration.push_back(K);
00045     rp.AddCalibration(K);
00046
00047   }
00048
00049   // set first to reference and compute rig params
00050   rp.Compute(vecPMatrices, vecPMatrices.size());
00051   rp.WriteRigData(argv[1]);
00052   cout <<"Wrote "<<argv[1] << endl;
00053 #endif
00054
00055   return 0;
00056 }
Generated on Wed Jun 21 19:01:08 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/PMatrix3DData.cpp Source File

Utils

PMatrix3DData.cpp

Go to the documentation of this file.
00001 #include "PMatrix3DData.hh"
00002
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/PMatrix3DData.hh Source File

Utils

PMatrix3DData.hh

Go to the documentation of this file.
00001 #ifndef _PMatrix3DData_hh_
00002 #define _PMatrix3DData_hh_
00003
00004 #include <bias_config.h>
00005
00006 #include <string>
00007
00008 #include <Base/Math/Vector3.hh>
00009 #include <Base/Math/Vector4.hh>
00010 #include <Base/Math/RGBA.hh>
00011
00012
00013 namespace BIAS {
00014
00015   /** @class PMatrix3DData
00016   @brief stores important data for drawing a camera */
00017   class BIASUtils_EXPORT PMatrix3DData {
00018   public:
00019     BIAS::Vector3<double> C;  ///< camera center in wcs
00020     BIAS::Vector3<double> UL; ///< upper left corner of image plane in wcs
00021     BIAS::Vector3<double> UR; ///< upper right corner of image plane in wcs
00022     BIAS::Vector3<double> LL; ///< lower left corner of image plane in wcs
00023     BIAS::Vector3<double> LR; ///< lower right corner of image plane in wcs
00024     BIAS::Vector3<double> PP; ///< principle point in wcs
00025     BIAS::Vector3<double> Up; ///< Up-Vector (V)
00026
00027     BIAS::RGBAuc Color;       ///< RGBA color+opacity, 255=opaque, 0=transp.
00028     std::string name;
00029   };
00030 } // end namespace
00031
00032
00033 #endif // _PMatrix3DData_hh_
00034
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrix.cpp Source File

Geometry

PMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragma.hh>
00026
00027 #include "PMatrix.hh"
00028
00029
00030 #include <Base/Geometry/AffineTransf.hh>
00031 #include <MathAlgo/Lapack.hh>
00032 #include <fstream>
00033 #include <sstream>
00034 #include <MathAlgo/SVD.hh>
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039
00040 // precision for output using streams, counted in decimal digits
00041 #define STREAM_PRECISION 12
00042
00043 namespace BIAS {
00044
00045 PMatrix::~PMatrix() {
00046   if (Svd_ != NULL) delete Svd_;
00047 #ifdef BIAS_DEBUG
00048   Svd_ = NULL;
00049 #endif
00050 }
00051
00052 PMatrix::PMatrix(const std::string & s)
00053 : PMatrixBase(s)
00054 {
00055   Svd_ = NULL;
00056   InvalidateDecomposition();
00057 }
00058
00059
00060 PMatrix &
00061 PMatrix::newsize(int rows, int cols)
00062 {
00063   BIASERR("The size of a P-Matrix has to be 3x4. newsize can't create a "
00064          <<rows<<" x "<< cols << " P-matrix. aborting.");
00065   exit(-1);
00066   //return *this;
00067 }
00068
00069 PMatrix::PMatrix(const Matrix<PMATRIX_TYPE>& Amat)
00070   :  PMatrixBase(Amat)
00071 {
00072   if ((Amat.num_rows()==3) && (Amat.num_cols()==4)) {
00073     Svd_=NULL;
00074     InvalidateDecomposition();
00075     IsMetric_ = false;
00076   } else {
00077     BIASERR(" wrong size in constructor! Amat is a "<<Amat.num_rows()
00078             <<" x "<<Amat.num_cols()<<" matrix but must be 3x4."
00079             <<std::endl );
00080     BIASASSERT((Amat.num_rows()==3) && (Amat.num_cols()==4));
00081   };
00082 }
00083
00084 PMatrix& PMatrix::operator=(const PMatrix &mat)
00085 {
00086   if (&mat != this){
00087     BIAS::PMatrixBase::operator=(mat);
00088     if (Svd_!=NULL) { delete Svd_; Svd_=NULL; }
00089     if (mat.Svd_!=NULL) Svd_ = new SVD(*(mat.Svd_));
00090     C_=mat.C_;
00091     A_=mat.A_;
00092     H0_=mat.H0_;
00093     V0_=mat.V0_;
00094     R_=mat.R_;
00095     K_=mat.K_;
00096     Covariance_ = mat.Covariance_;
00097     Hinf_=mat.Hinf_;
00098 #ifdef BIAS_DEBUG
00099     PConsistencyBackup_ = mat.PConsistencyBackup_;
00100     PConsistencyBackupSVD_ = mat.PConsistencyBackupSVD_;
00101 #endif
00102     IsDecomposed_ = mat.IsDecomposed_;
00103     IsMetric_ = mat.IsMetric_;
00104   }
00105   return *this;
00106 }
00107
00108 /** \todo 5 different  Back-Project-Funktions, "Please cleanup"
00109     (evers 2004-11-29)
00110 */
00111
00112
00113 int PMatrix::GetPseudoInverse(BIAS::Matrix<double>& Pinv) {
00114   if (Svd_ == NULL) {
00115     MakeSVD_();
00116   } else {
00117 #ifdef BIAS_DEBUG
00118     CheckSVD_();
00119 #endif
00120   }
00121
00122   Matrix<double> V(Svd_->GetV()); // 3x4 matrix
00123   Matrix<double> SinvUT(4,3);
00124   SinvUT.SetZero();
00125   Matrix<double> U(Svd_->GetU());  // 4x4 matrix
00126   Vector3<double> S(Svd_->GetS());
00127   for (int i=0;i<U.num_rows();i++)
00128     for (int j=0;j<U.num_cols();j++) {
00129       SinvUT[i][j] = 1.0/S[i] * U[j][i];
00130     }
00131   Pinv = V * SinvUT;
00132
00133   return 0;
00134 }
00135
00136
00137 int PMatrix::GetNullVector(HomgPoint3D& C) {
00138   MakeSVD_();
00139   Vector<double> Nullvec(Svd_->GetNullvector());
00140   if (fabs(Nullvec[3]) > DBL_EPSILON) {
00141     // homogenize vector
00142     C.Set(Nullvec[0]/Nullvec[3], Nullvec[1]/Nullvec[3], Nullvec[2]/Nullvec[3],
00143           1.0);
00144   } else {
00145     // return "as is"
00146     C.Set(Nullvec[0],Nullvec[1],Nullvec[2],Nullvec[3]);
00147   }
00148   return 0;
00149 }
00150
00151 int PMatrix::GetHinf(BIAS::Matrix3x3<double> &Hinf) {
00152   if (!IsDecomposed_) {
00153     if (Decompose_()!=0) return -1;
00154   } else {
00155     // flag says: "matrix is decomposed!"
00156 #ifdef BIAS_DEBUG
00157     CheckDecomposition_();
00158 #endif
00159   }
00160   Hinf = Hinf_;
00161   return 0;
00162 }
00163
00164
00165 int PMatrix::GetC(Vector3<double>& C)
00166 {
00167   if (!IsDecomposed_) {
00168     if (Decompose_()!=0)
00169       return -1;
00170   } else {
00171     // flag says: "matrix is decomposed!"
00172 #ifdef BIAS_DEBUG
00173     CheckDecomposition_();
00174 #endif
00175   }
00176
00177   C=C_;
00178   return 0;
00179 }
00180
00181 // JW
00182 BIAS::Vector3<double> PMatrix::GetC() {
00183   BIAS::Vector3<double>  C;
00184   GetC(C);
00185   return C;
00186 }
00187
00188 int PMatrix::GetC(HomgPoint3D& C)
00189 {
00190   if (!IsDecomposed_) {
00191     if (Decompose_()!=0)
00192       return -1;
00193   } else {
00194     // flag says: "matrix is decomposed!"
00195 #ifdef BIAS_DEBUG
00196     CheckDecomposition_();
00197 #endif
00198   }
00199
00200   C.Set(C_[0], C_[1], C_[2]);
00201   return 0;
00202 }
00203
00204 int PMatrix::GetR(Matrix3x3<double>&  R)
00205 {
00206   if (!IsDecomposed_) {
00207     if ( Decompose_() != 0)
00208       return -1;
00209   } else {
00210     // flag says: "matrix is decomposed!"
00211 #ifdef BIAS_DEBUG
00212     CheckDecomposition_();
00213 #endif
00214   }
00215
00216   R=R_;
00217   return 0;
00218 }
00219
00220 int  PMatrix::GetK(KMatrix& K)
00221 {
00222   if (!IsDecomposed_) {
00223     if (Decompose_() != 0)
00224       return -1;
00225   } else {
00226     // flag says: "matrix is decomposed!"
00227 #ifdef BIAS_DEBUG
00228     CheckDecomposition_();
00229 #endif
00230   }
00231   K=K_;
00232   return 0;
00233 }
00234
00235 /// This is not the cam.# standard CAHV, but the unit vector H0
00236 // (jw, 11/2002) (because image size is unknown)
00237 int PMatrix::GetH(Vector3<double>& H)
00238 {
00239   if (!IsDecomposed_) {
00240     if(Decompose_()!=0)
00241       return -1;
00242   } else {
00243
00244     // flag says: "matrix is decomposed!"
00245
00246 #ifdef BIAS_DEBUG
00247     CheckDecomposition_();
00248 #endif
00249   }
00250
00251   H=H0_;
00252   return 0;
00253 }
00254
00255 // JW
00256 BIAS::Vector3<double> PMatrix::GetH(){
00257   BIAS::Vector3<double> h;
00258   if (0!=GetH(h)) BIASERR("could not access H.");
00259   return h;
00260 }
00261
00262 /// This is not the cam.# standard CAHV, but the unit vector H0
00263 //(jw, 11/2002) (because image size is unknown)
00264 int PMatrix::GetV(Vector3<double>&  V)
00265 {
00266   if (!IsDecomposed_) {
00267     if (Decompose_()!=0)
00268       return -1;
00269   } else {
00270     // flag says: "matrix is decomposed!"
00271
00272 #ifdef BIAS_DEBUG
00273     CheckDecomposition_();
00274 #endif
00275   }
00276   V=V0_;
00277   return 0;
00278 }
00279
00280 // JW
00281 BIAS::Vector3<double> PMatrix::GetV(){
00282   BIAS::Vector3<double> v;
00283   if (0!=GetV(v)) BIASERR("could not access V.");
00284   return v;
00285 }
00286
00287 int PMatrix::GetA(Vector3<double>& A)
00288 {
00289   if (!IsDecomposed_) {
00290     if (Decompose_() != 0)
00291       return -1;
00292   } else {
00293     // flag says: "matrix is decomposed!"
00294
00295 #ifdef BIAS_DEBUG
00296     CheckDecomposition_();
00297 #endif
00298   }
00299   A=A_;
00300   return 0;
00301 }
00302
00303 // JW
00304 BIAS::Vector3<double> PMatrix::GetA(){
00305   BIAS::Vector3<double> a;
00306   if (0!=GetA(a)) BIASERR("could not access A.");
00307   return a;
00308 }
00309
00310 void PMatrix::GetSVD(Matrix<double>& U, Vector<double>& S,
00311                      Matrix<double>& VT) {
00312   MakeSVD_();
00313   U  = Svd_->GetU();
00314   S  = Svd_->GetS();
00315   VT = Svd_->GetVT();
00316 }
00317
00318 int PMatrix::Decompose_() {
00319   int decomposeresult = 0;
00320   // see diploma thesis gonzales p. 94 (docu; JW 11/2002)
00321   double rho = 0.0;
00322   PMatrix Ptmp;
00323   Ptmp= *this;
00324   Matrix3x3<double> matA;
00325   Vector<double> vecB(3);
00326
00327   // sum(P_[2][i]^2) must be 1
00328   for (int i=0; i<3; i++)
00329     rho += (*this)[2][i] * (*this)[2][i];
00330   rho = sqrt(rho);
00331   // norm temporary P
00332   if (rho==0) { // JW 05/2003
00333     BIASERR("degenerate case detected in decomposition. P="<<(*this)<<endl);
00334   } else {
00335     Ptmp /= rho;
00336   };
00337
00338   // take only left part of P (as K*R')
00339   // P = [ matA | -vecB]  (docu; JW 11/2002)
00340   // M^T = P[0..2][0..2]
00341   for (int i=0; i<3; i++) {
00342     for (int j=0; j<3; j++)
00343       matA[i][j] = Ptmp[i][j];
00344
00345     vecB[i] = -Ptmp[i][3];
00346   }
00347
00348   // solve linear equations using LU factorization
00349   // solve for C:  "matA * C = vecB" (docu; JW 11/2002)
00350   // Vector<double> tmpC=Lapack_LU_linear_solve(matA, vecB);
00351
00352   int hres = matA.Invert(Hinf_);
00353   if (hres!=0) {
00354     BIASERR("error unable to compute Hinf_.");
00355     Hinf_.SetZero();
00356     decomposeresult = -1;
00357     // pick the smallest base vector from the nullspace and assume center
00358     HomgPoint3D HC;
00359     this->GetNullVector(HC);
00360     HC.GetEuclidian(C_);
00361   } else {
00362     // even here it seems to me more accurate and numerically stable to compute
00363     // the center via the nullvector svd, especially when we dont exactly
00364     // have (-K R^T C) as the last column of P
00365     // However, we keep it the old way since it seemed to work. (koeser)
00366     C_ = Hinf_ * vecB;
00367   }
00368
00369   // take rows of Ptmp in: zeile 1...3 = z1..z3
00370   Vector3<double> z1, z2, z3,  tmp;
00371   K_.Fill(0);
00372   K_[2][2] = 1.0;
00373
00374   // for all cols: fill rows z:
00375   for (int col=0; col<3; col++) {
00376     z1[col] = Ptmp[0][col]; // 1st row
00377     z2[col] = Ptmp[1][col]; // 2nd row
00378     // R = (H V A) , KR^T = Ptmp -> A = z3
00379     R_[col][2] = Ptmp[2][col];
00380     // 3rd row, is unit length 1 because or previous normalization by
00381     // rho (docu: JW 11/2002)
00382     A_[col] = Ptmp[2][col];  // 3rd row
00383   }
00384
00385   // cy = z2^T * z3 (=optical center hx docu; is OK because A is orthogonal
00386   // to V (see diploma thesis Gonzalez, pp. 94 JW 11/2002)
00387   K_[1][2] = z2.ScalarProduct(A_);
00388   // cx = z1^T * z3 (=optical center hx docu; JW 11/2002)
00389   K_[0][2] = z1.ScalarProduct(A_);
00390
00391   // fy = || z2^T - cy * z3^T ||
00392   V0_ = (z2 - (A_ * K_[1][2]) );
00393   K_[1][1] = V0_.NormL2();
00394
00395   // V = 1/fy (z2^T - cx * z3^T)
00396   V0_ /=  K_[1][1];
00397
00398   // kk: how can we assume skew=0, compute R exploiting that
00399   // and then compute the skew ???
00400   //
00401   // skew: S= H * V.NORM
00402   K_[0][1]=z1.ScalarProduct(V0_);
00403
00404   // H = 1/fx (z1^T - cy * z3^T)
00405   // fx = || z1^T - cx * z3^T ||
00406   H0_ = (z1  - V0_*K_[0][1]-(A_ * K_[0][2]) );
00407   K_[0][0] = H0_.NormL2();
00408
00409   H0_ /= K_[0][0];
00410
00411   // docu: Here h, v are 'still' unity vectors, so fill them into R
00412   // (docu; JW 11/2002)
00413   for (int i=0; i<3; i++) {
00414     R_[i][0] = H0_[i];
00415     R_[i][1] = V0_[i];
00416   }
00417 #ifdef BIAS_DEBUG
00418   // make backup of pmatrix fields for debug purposes
00419   PConsistencyBackup_ = (*this);
00420 #endif
00421   IsDecomposed_ = true;
00422   return decomposeresult;
00423 }
00424
00425 void PMatrix::
00426 BackprojectByZDepth(const double& x,
00427             const double& y,
00428             const double& z_depth,
00429             HomgPoint3D& res)
00430 {
00431   HomgPoint3D C;
00432   GetC(C);
00433
00434   HomgPoint2D p(x*z_depth, y*z_depth, z_depth);
00435   p = GetK().Invert()*p;
00436   p = GetR()*p;
00437   res.Set(p[0]+C[0], p[1]+C[1], p[2]+C[2], C[3]);
00438 }
00439
00440 void PMatrix::BackprojectWorldCoo(const HomgPoint2D& point, double depth,
00441                                   HomgPoint3D& res)
00442 {
00443   Vector3<double> ray;
00444   HomgPoint3D C, hray;
00445   if (GetC(C)!=0){
00446     BIASERR("error getting C");
00447     //BIASASSERT(false);
00448     BIASABORT;
00449   }
00450   ray = GetNormRayWorldCoo(point);
00451   hray.Set(depth*ray[0], depth*ray[1], depth*ray[2], 0.0);
00452   res = C+hray;
00453 }
00454
00455 HomgPoint3D PMatrix::BackprojectPseudoinverse (const HomgPoint2D& x) {
00456   Matrix<double> Pinv;
00457   GetPseudoInverse(Pinv);
00458
00459   HomgPoint3D newPoint(Pinv * x);
00460   newPoint.Homogenize();
00461
00462   //// check if direction is the same as camera orientation
00463   Vector3<double> viewray, center;
00464   GetC(center);
00465   viewray[0] = newPoint[0] - center[0];
00466   viewray[1] = newPoint[1] - center[1];
00467   viewray[2] = newPoint[2] - center[2];
00468   // scalar product viewray with camera orientation
00469   double dS = viewray[0] * (*this)[2][0] +  viewray[1] * (*this)[2][1] +
00470     viewray[2] * (*this)[2][2];
00471   if (dS<0) {
00472     // backprojected point is behind camera
00473     newPoint[0] = center[0] - viewray[0];
00474     newPoint[1] = center[1] - viewray[1];
00475     newPoint[2] = center[2] - viewray[2];
00476   }
00477
00478   newPoint[3]=1; // there is the case that w=0, though other values are valid
00479
00480   return newPoint;
00481 }
00482
00483
00484
00485 void PMatrix::GetImagePlane(HomgPlane3D& plane)
00486 {
00487   if (!IsDecomposed_) {
00488     Decompose_();
00489   } else {
00490     // flag says: "matrix is decomposed!"
00491 #ifdef BIAS_DEBUG
00492     CheckDecomposition_();
00493 #endif
00494   }
00495   plane[0] = A_[0];
00496   plane[1] = A_[1];
00497   plane[2] = A_[2];
00498   Vector3<double> PlaneVec(0.0, 0.0, 1.0);
00499   Vector3<double> WorldPlaneVec;
00500   R_.Mult(PlaneVec, WorldPlaneVec);
00501   WorldPlaneVec += C_;
00502   plane[3] = WorldPlaneVec.NormL2();
00503 }
00504
00505 HomgPlane3D PMatrix::GetImagePlane() {
00506   HomgPlane3D plane;
00507   GetImagePlane(plane);
00508   return plane;
00509 }
00510
00511 int PMatrix::GetIntersectionOfImagePlanes(PMatrix& P,
00512                       HomgLine2D& intersection)
00513 {
00514   // this is just the way, to do: fast
00515   // NormalVector = P.GetA()
00516   // Transform Normal Vector to CameraCoo of this PMatrix
00517   // R = GetR();
00518   // NewA = R.TRanspose() * NormalVector
00519   // intersection[0] = NewA[0];
00520   // intersection[1] = NewA[1];
00521   // intersection[2] = NewA[2] + NewA[3];
00522
00523   int res = 0;
00524   HomgPlane3D Plane = P.GetImagePlane();
00525   HomgPlane3D TransformedPlane;
00526   AffineTransf at;
00527   Matrix3x3<double> R;
00528   if (GetR(R) !=0)
00529     return -1;
00530 //    cerr << "Plane: " << Plane << endl;
00531 //    cerr << "R: " << R << endl;
00532   R.TransposeIP();
00533 //    cerr << "R': " << R << endl;
00534   at.SetAsRotationMatrix(R);
00535 //    cerr << "at: " << at << endl;
00536   at.Mult(Plane, TransformedPlane);
00537 //    cerr << "TransfPlane: " << TransformedPlane << endl;
00538
00539   double dot;
00540   TransformedPlane.ScalarProduct(HomgPlane3D(0.0, 0.0, 1.0, 0.0), dot);
00541   if ((dot < PMATRIX_EPSILON) && (dot > -PMATRIX_EPSILON)) {
00542     res = -1;
00543   } else {
00544     intersection[0] = TransformedPlane[0];
00545     intersection[1] = TransformedPlane[1];
00546     intersection[2] = TransformedPlane[2] + TransformedPlane[3];
00547   }
00548
00549   return res;
00550 }
00551
00552
00553 void PMatrix::Compose(const Matrix3x3<double>& K,
00554                       const Matrix3x3<double>& R,
00555                       const Vector3<double>& C)
00556 {
00557   IsMetric_ = true;
00558   R_ = R;
00559   C_ = C;
00560   K_ = K;
00561   for (register int i=0; i<3; i++){
00562     H0_[i] = R_[i][0];
00563     V0_[i] = R_[i][1];
00564     A_[i] = R_[i][2];
00565   }
00566   PMatrixBase::Compose(K, R, C);
00567   for (unsigned int j=0; j<3; j++) {
00568     for (unsigned int i=0; i<3; i++) {
00569       Hinf_[i][j] = (*this)[i][j];
00570     }
00571   }
00572   int res = Hinf_.InvertIP();
00573   if (res!=0) {
00574     BIASERR("error computing Hinf_.");
00575     cout << "K: "<<K<<endl<<"R: "<<R<<endl<<"C: "<<C<<endl;BIASABORT; }
00576
00577 #ifdef BIAS_DEBUG
00578   // save the PMatrix fields
00579   PConsistencyBackup_ = (*this);
00580 #endif
00581   IsDecomposed_=true;
00582
00583   if (Svd_ != NULL) {
00584     delete Svd_;
00585     Svd_ = NULL;
00586   }
00587 }
00588
00589 void PMatrix::Compose(const Matrix3x3<double>& K,
00590                       const Matrix3x3<double>& R,
00591                       const HomgPoint3D& C)
00592 {
00593   Vector3<PMATRIX_TYPE> cnew;
00594   if (!C.IsAtInfinity()){
00595     cnew.Set(C[0]/C[3], C[1]/C[3], C[2]/C[3]);
00596     PMatrix::Compose(K, R, cnew);
00597     for (unsigned int j=0; j<3; j++) {
00598       for (unsigned int i=0; i<3; i++) {
00599         Hinf_[i][j] = (*this)[i][j];
00600       }
00601     }
00602   int hres = Hinf_.InvertIP();
00603   if (hres!=0) BIASERR("error: unable to compute Hinf_.");
00604 #ifdef BIAS_DEBUG
00605     // save the PMatrix fileds
00606     PConsistencyBackup_ = (*this);
00607 #endif
00608     IsDecomposed_ = true;
00609   } else {
00610     BIASERR("cannot compose camera at infinity");
00611   }
00612 }
00613
00614 void PMatrix::
00615 Compose(const Matrix3x3<double>& K,
00616         const Vector<double>& parametrization,
00617         enum E_ParametrizationType param_type)
00618 {
00619   Vector3<double> C;
00620   C.Set(parametrization[0], parametrization[1], parametrization[2]);
00621   RMatrixBase R = Parametrization2R_(parametrization, param_type);
00622
00623   // compute and set Hinf_, ....
00624   Compose(K, R, C);
00625 }
00626
00627 Vector3<double>
00628 PMatrix::GetNormRayWorldCoo(const HomgPoint2D& point)
00629 {
00630   Vector3<double> result = GetRayWorldCoo(point);
00631   //cerr << "point: "<<point<<"\tresult: " << result <<endl;
00632   return result / result.NormL2();
00633 }
00634
00635
00636 Vector3<double>
00637 PMatrix::GetRayWorldCoo(const HomgPoint2D& point)
00638 {
00639   KMatrix Kinv;
00640   Vector3<double> result;
00641
00642   if (!IsDecomposed_){
00643     Decompose_();
00644
00645 //#ifdef BIAS_DEBUG
00646 //    BIASWARN("DBG decomposing P (for call in "__FILE__<<" : "<<__LINE__<<")" );
00647 //#endif
00648
00649   } else {
00650     // flag says: "matrix is decomposed!"
00651 #ifdef BIAS_DEBUG
00652     CheckDecomposition_();
00653 #endif
00654   }
00655
00656   Kinv = K_.Invert();
00657
00658   Kinv.Mult(point, result);
00659
00660   return R_ * result;
00661 }
00662
00663
00664
00665 // JW 11/2002
00666 int PMatrix::WriteCAHV_10(int cols, int rows, ostream & os)
00667 {
00668   if (cols<0 || cols>10000 || rows<0 || rows>10000 ) {
00669     // Error: impossible image size (in pixel) given
00670     BIASERR( " image cols x rows = "<<cols<<" x "<< rows
00671              <<" is to small or to big!");
00672   };
00673
00674   Vector3<double> A0; // unit vector, direction of optical axis
00675   Vector3<double> H0; // unit vector, spans horizontal pixel-axis
00676   Vector3<double> V0; // unit vector, spans vertical pixe-axixs
00677   //(iff there is skew then H0,V0 are NOT orthogonal!)
00678
00679   Vector3<double> H; // Cunningham CAHV 1.0 format H vector
00680   Vector3<double> V; // Cunningham CAHV 1.0 format V vector
00681
00682   // direction of the optical axis:
00683   // get the 3rd row of KR' which is P[2][0..2] and divide it by
00684   // its norm to get a unit vector.
00685   A0[0] = (*this)[2][0];
00686   A0[1] = (*this)[2][1];
00687   A0[2] = (*this)[2][2];
00688   double Alength = sqrt ( A0.ScalarProduct(A0) ); // norm of A
00689   A0 /= Alength; // normalize A to unit vector
00690
00691   H0[0] = (*this)[0][0]; // get 1st row of KR' which is P[0][0..2]
00692   H0[1] = (*this)[0][1];
00693   H0[2] = (*this)[0][2];
00694   H0 /= Alength; // scale H (A should be unit vector)
00695
00696   V0[0] = (*this)[1][0]; // get the 2nd row of KR' which is P[1][0..2]
00697   V0[1] = (*this)[1][1];
00698   V0[2] = (*this)[1][2];
00699   V0 /= Alength; // scale V (A should be unit vector)
00700
00701   Vector3<double> TTh;
00702   Vector3<double> TTv;
00703   TTh =  A0 * ((cols-1)/2.0);
00704   TTv =  A0 * ((rows-1)/2.0);
00705   H = H0 - TTh;
00706   V = V0 - TTv;
00707
00708
00709   // get intrinsic parameters:
00710   double imgCenterX = cols/2.0; // center of the image (not cols-1, see
00711   // RK code (and example)
00712   double imgCenterY = rows/2.0;
00713   KMatrix K;
00714   if (GetK(K) != 0)
00715     return -1;
00716   double opticalCenterX = K[0][2]; // optical center in pixel (cx=hx)
00717   double opticalCenterY = K[1][2]; // (cy=hy)
00718   double bxh = opticalCenterX - imgCenterX; // length (in pixel) from image
00719   //  center to optical center
00720   double byh = opticalCenterY - imgCenterY;
00721   double fx = K[0][0]; // focal length
00722   double fy = K[1][1];
00723   double skew = K[0][1]; // are the x/y axes skewed (=not orthogonal)
00724   double sx = 1.0;
00725   double sy = (fx/fy)*sx;  // ratio of pixel size sx/sy
00726
00727   // write CAHV decomposed P to file in special 'Cunningham CAHV 1.0 format:
00728   Vector3<double> C;
00729   if (GetC(C) !=0)
00730     return -1;
00731   os<<setprecision(12);
00732   os <<";CAHV 1.0" << endl;
00733   os <<";Generated by PMatrix::WriteCAHV_10 (JW 2002)" << endl;
00734   os <<";     Cx       Cy        Cz"<<endl;
00735   os <<C[0]<<" "<<C[1]<<" "<<C[2]<<endl;
00736   os <<";     Ax       Ay        Az"<<endl;
00737   os <<A0[0]<<" "<<A0[1]<<" "<<A0[2]<<endl;
00738   os <<";     Hx       Hy        Hz"<<endl;
00739   os <<H[0]<<" "<<H[1]<<" "<<H[2]<<endl;
00740   os <<";     Vx       Vy        Vz"<<endl;
00741   os <<V[0]<<" "<<V[1]<<" "<<V[2]<<endl;
00742
00743   os <<";     Radialdistortion rd "<<endl;
00744   os <<"0.0"<<endl; // fix to zero because it's not used by following programs
00745   os <<"; Pixelsize sx (fixed)      sy (ratio)"<<endl;
00746   os <<sx<<" "<<sy<<endl;
00747   os <<"; Image-size: colums      rows"<<endl;
00748   os <<cols<<" "<<rows<<endl;
00749   os <<"; Internal parameters:"<<endl;
00750   os <<";  fx = "<< fx <<" fy = "<< fy <<" skew = "<< skew << endl;
00751   os <<";  hx = "<< bxh<<" hy = "<< byh << endl;
00752
00753   return -1;
00754 }
00755
00756
00757
00758
00759 // JW 06/2003
00760 // unfortunately not const because missing consts in decompose etc...
00761 float PMatrix::GetFieldOfView(const unsigned int dimX,
00762                               const unsigned int dimY,
00763                               const bool optmin)
00764 {
00765   BIAS::Vector3<double> nw, vec; // two oposing image corners
00766   BIAS::HomgPoint2D p2d = BIAS::HomgPoint2D( 0.0, 0.0, 1.0); // NW corner
00767   nw = this->GetNormRayWorldCoo( p2d ); // wcs vector
00768
00769   if (!optmin) {
00770     // max. angle
00771     p2d[0]=(double)dimX; // SE corner
00772     p2d[1]=(double)dimY; //w is still 1
00773   } else if (dimX<dimY) {
00774     // min angle X
00775     // optmin and dimX is smaller dimY --> SW is min
00776     p2d[0]=(double)dimX; // y,w are still 0,1
00777   } else {
00778     // min angle Y
00779     // optmin and dimY is smaller
00780     p2d[1]=dimY; // x,w are still 0,1
00781   };
00782
00783   // second vector (SE, SW or NE)
00784   vec = this->GetNormRayWorldCoo( p2d ); // wcs vector
00785   float cosAlpha = float(nw.ScalarProduct(vec));
00786   float alpha = acos( cosAlpha );
00787   // cout<<"DBG fov="<<alpha<<" rad. (= "<<alpha*180.0/M_PI<<" degree)."<<endl;
00788   return alpha;
00789 }
00790
00791
00792 /** @return field of view in y-direction in rad
00793     this routine is complexer than expected...
00794     ... because the principal point may *not* be within camera center.
00795     HACK/FIXME/TODO:
00796     \todo not in general correct impl. !!!
00797     the principal may converge the view -> what is the field of view?
00798     (JW 09/2003)
00799 */
00800 float PMatrix::GetFieldOfViewY(const unsigned int dimX,
00801                                const unsigned int dimY,
00802                                const bool & compY) {
00803   HomgPoint2D north2d, south2d;
00804   // set the 2dimage coord used to determine angle:
00805   if (compY) {
00806     // vertical fov (north->south)
00807     north2d = HomgPoint2D(0.5*(double)dimX, 0.0, 1.0); // N
00808     south2d = HomgPoint2D(0.5*(double)dimX, (double)dimY, 1.0); // S
00809   } else {
00810     // horizontal fov  (west -> east)
00811     north2d = HomgPoint2D(0.0, 0.5*(double)dimY, 1.0); // W
00812     south2d = HomgPoint2D((double)dimX, 0.5*(double)dimY, 1.0); //E
00813   };
00814   // get corresponding direction
00815   Vector3<double> north3d = this->GetNormRayWorldCoo( north2d );
00816   Vector3<double> south3d = this->GetNormRayWorldCoo( south2d );
00817   north3d.Normalize();
00818   south3d.Normalize();
00819   // get angle between
00820   float cosAlpha = float(north3d.ScalarProduct(south3d));
00821   float alpha = acos( cosAlpha );
00822   //cout<<"DBG fovY="<<alpha<<" rad. (= "<<alpha*180.0/M_PI<<" degree)."<<endl;
00823   return alpha;
00824 }
00825
00826 void PMatrix::DecomposeAa(Matrix3x3<PMATRIX_TYPE> &A,
00827                           Vector3<PMATRIX_TYPE> &a) const {
00828   for(int i=0; i<3; i++)
00829     for(int j=0; j<4; j++)
00830       if ( j==3 )
00831         a[i] = (*this)[i][j];
00832       else
00833         A[i][j] = (*this)[i][j];
00834 }
00835
00836
00837 Matrix4x4<PMATRIX_TYPE> PMatrix::GetCanonicalH() const
00838 {
00839   Matrix4x4<PMATRIX_TYPE> ProjH;
00840   GetCanonicalH(ProjH);
00841   return ProjH;
00842 }
00843
00844 void PMatrix::GetCanonicalH(Matrix4x4<PMATRIX_TYPE> &ProjH) const {
00845   Matrix3x3<PMATRIX_TYPE> A;
00846   Vector3<PMATRIX_TYPE> a;
00847   DecomposeAa(A,a);
00848   SVD svd(A);
00849
00850   Matrix3x3<PMATRIX_TYPE> PseudoInv(svd.Invert());
00851   Vector3<PMATRIX_TYPE> x(svd.solve(a));
00852
00853   ProjH[0][0] = PseudoInv[0][0];
00854   ProjH[0][1] = PseudoInv[0][1];
00855   ProjH[0][2] = PseudoInv[0][2];
00856   ProjH[1][0] = PseudoInv[1][0];
00857   ProjH[1][1] = PseudoInv[1][1];
00858   ProjH[1][2] = PseudoInv[1][2];
00859   ProjH[2][0] = PseudoInv[2][0];
00860   ProjH[2][1] = PseudoInv[2][1];
00861   ProjH[2][2] = PseudoInv[2][2];
00862
00863   ProjH[3][0] = 0;
00864   ProjH[3][1] = 0;
00865   ProjH[3][2] = 0;
00866   ProjH[3][3] = 1;
00867
00868   ProjH[0][3] = -x[0];
00869   ProjH[1][3] = -x[1];
00870   ProjH[2][3] = -x[2];
00871 }
00872
00873 int PMatrix::LoadBBC(const std::string &filename, const double& addppx,
00874                      const double& addppy) {
00875   ifstream ifs(filename.c_str());
00876   if (!ifs) {
00877     perror(filename.c_str());
00878     return -1;
00879   }
00880   int thereturn = BBCIn(ifs, addppx, addppy);
00881   ifs.close();
00882   return thereturn;
00883 }
00884
00885 int PMatrix::BBCIn(ifstream &ifs, const double& addppx,
00886                    const double& addppy) {
00887   Vector3<double> BBCC(0.0), BBCA(0.0), BBCUp(0.0);
00888   unsigned int BBCWidth=0, BBCHeight=0;
00889   // Pixelsize and FocalLength are in [m] (meter)
00890   double BBCPxSizeX=0, BBCPxSizeY=0, BBCCxShift=0,
00891     BBCCyShift=0,BBCFocalLength=0;
00892   string key;
00893   istringstream iss;
00894   char linebuf[200];
00895   while (ifs.getline(linebuf,200)) {
00896 //     cout <<"read line: "<<linebuf<<endl;
00897     iss.clear();
00898     iss.str(linebuf);
00899     iss >> key;
00900     if (key == "CVec")              iss >> BBCC[0]>> BBCC[1]>> BBCC[2];
00901     if (key == "AVec")              iss >> BBCA[0]>> BBCA[1]>> BBCA[2];
00902     if (key == "UpVec")             iss >> BBCUp[0]>> BBCUp[1]>> BBCUp[2];
00903     if (key == "Width")             iss >> BBCWidth;
00904     if (key == "Height")            iss >> BBCHeight;
00905     if (key == "PixelSizeX")        iss >> BBCPxSizeX;
00906     if (key == "PixelSizeY")        iss >> BBCPxSizeY;
00907     if (key == "CenterPointShiftX") iss >> BBCCxShift;
00908     if (key == "CenterPointShiftY") iss >> BBCCyShift;
00909     if (key == "FocalLength")       iss >> BBCFocalLength;
00910     if (key == "}") break; // end of entry
00911   }
00912
00913   //cout <<"BBC CVec: "<<BBCC<<endl;
00914   // cout <<"BBC AVec: "<<BBCA<<" with norm="<< BBCA.NormL2()<<endl;
00915   // cout <<"BBC UpVec: "<<BBCUp<<" with norm="<< BBCUp.NormL2()<<endl;
00916   // cout <<"BBC Width: "<<BBCWidth<<endl;
00917   // cout <<"BBC Height: "<<BBCHeight<<endl;
00918   // cout <<"BBC PixelSizeX: "<<BBCPxSizeX<<endl;
00919   // cout <<"BBC PixelSizeY: "<<BBCPxSizeY<<endl;
00920   // cout <<"BBC CenterPointShiftX: "<<BBCCxShift<<endl;
00921   // cout <<"BBC CenterPointShiftY: "<<BBCCyShift<<endl;
00922   // cout <<"BBC FocalLength: "<<BBCFocalLength<<endl;
00923
00924   Matrix3x3<double> K,R;
00925
00926   K.SetIdentity();
00927   K[0][0] = BBCFocalLength / BBCPxSizeX; // fx
00928   K[1][1] = BBCFocalLength / BBCPxSizeY; // fy
00929
00930   // compute principle point, addppx and addppy are useful in case
00931   // the centerpointshift is determined separately
00932   K[0][2] = double(BBCWidth-1)/2.0  + (BBCCxShift+addppx) / BBCPxSizeX;
00933   K[1][2] = double(BBCHeight-1)/2.0 + (BBCCyShift+addppy) / BBCPxSizeY;
00934
00935   Vector3<double> V,C,A,H;
00936   V = -1.0 * BBCUp;
00937
00938   C[0] = BBCC[0];
00939   C[1] = BBCC[1];
00940   C[2] = BBCC[2];
00941
00942   A[0] = BBCA[0];
00943   A[1] = BBCA[1];
00944   A[2] = BBCA[2];
00945
00946
00947    H = V.CrossProduct(A);
00948
00949   for (unsigned int i=0;i<3;i++){
00950     R[i][0] = H[i];
00951     R[i][1] = V[i];
00952     R[i][2] = A[i];
00953   }
00954
00955   // cout <<"K: "<<K<<endl;
00956   //cout <<"R: "<<R<<" with det "<<R.det()<<endl;
00957   //cout<<"PMatrix compile time is "<<__TIME__<<endl;
00958
00959   Compose(K,R,C);
00960
00961   return 0;
00962 }
00963
00964
00965 #ifdef BIAS_HAVE_XML2
00966
00967 int PMatrix::XMLGetClassName(std::string& TopLevelTag,
00968                                 double& Version) const {
00969   TopLevelTag = "PMatrix";
00970   Version = 0.1;
00971   return 0;
00972 }
00973
00974 int PMatrix::XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const {
00975   if (IsMetric_) {
00976 #ifdef BIAS_DEBUG
00977      if (!IsDecomposed_) {
00978        BIASERR("Undecomposed PMatrix cannot be metric !!!");
00979        BIASABORT;
00980      }
00981 #endif
00982      xmlNodePtr childNode;
00983      //XMLObject.addAttribute(Node, "Metric", "true");
00984      XMLObject.addAttribute(Node, "Metric", true);
00985
00986      // K
00987      childNode = XMLObject.addChildNode(Node,"Calibration");
00988      stringstream streamK, streamR;
00989      streamK << std::setprecision(STREAM_PRECISION);
00990      for (unsigned int i=0; i<9; i++) {
00991        streamK << (double) K_.GetData()[i] <<" ";
00992      }
00993      XMLObject.addContent(childNode, streamK.str());
00994
00995      // R
00996      childNode = XMLObject.addChildNode(Node,"Rotation");
00997      streamR << std::setprecision(STREAM_PRECISION);
00998      for (unsigned int i=0; i<9; i++) {
00999        streamR << (double) R_.GetData()[i] <<" ";
01000      }
01001      XMLObject.addContent(childNode, streamR.str());
01002
01003      // C
01004      childNode = XMLObject.addChildNode(Node,"Center");
01005      XMLObject.addAttribute(childNode, "x", C_[0]);
01006      XMLObject.addAttribute(childNode, "y", C_[1]);
01007      XMLObject.addAttribute(childNode, "z", C_[2]);
01008    } else {
01009      // not metric
01010      xmlNodePtr theNode;
01011      //XMLObject.addAttribute(Node, "Metric", "false");
01012      XMLObject.addAttribute(Node, "Metric", false);
01013      theNode = XMLObject.addChildNode(Node,"DataFields");
01014      stringstream datastream;
01015      datastream << std::setprecision(STREAM_PRECISION);
01016      for (unsigned int i=0; i<12; i++) {
01017        datastream << (double) GetData()[i] <<" ";
01018      }
01019      XMLObject.addContent(theNode, datastream.str());
01020    }
01021    return 0;
01022 }
01023
01024 int PMatrix::XMLIn(const xmlNodePtr Node, XMLIO& XMLObject) {
01025   xmlNodePtr childNode;
01026   string sMetric = XMLObject.getAttributeValueString(Node, "Metric");
01027   IsMetric_ = sMetric == "true";
01028   if (IsMetric_) {
01029     // K
01030     if ((childNode = XMLObject.getChild(Node, "Calibration"))==NULL) {
01031       BIASERR("error in xml structure");
01032       return -1;
01033     }
01034     // get data fields
01035     stringstream ssCalibration(XMLObject.getNodeContentString(childNode));
01036     unsigned int CurrentData = 0;
01037     double* pData = K_.GetData();
01038     while (ssCalibration.good() && CurrentData<9) {
01039       ssCalibration >> (pData[CurrentData++]);
01040     }
01041     if (CurrentData<9) {
01042       // reached end of stream before expected end of data
01043       BIASERR("Error parsing XML code ...");
01044       return -1;
01045     }
01046     //cout <<"K is "<<K_<<endl;
01047
01048     // R
01049     if ((childNode = XMLObject.getChild(Node, "Rotation"))==NULL) {
01050       BIASERR("error in xml structure");
01051       return -1;
01052     }
01053     // get data fields
01054     stringstream ssRotation(XMLObject.getNodeContentString(childNode));
01055     CurrentData = 0;
01056     pData = R_.GetData();
01057     while (ssRotation.good() && CurrentData<9) {
01058       ssRotation >> (pData[CurrentData++]);
01059     }
01060     if (CurrentData<9) {
01061       // reached end of stream before expected end of data
01062       BIASERR("Error parsing XML code ...");
01063       return -1;
01064     }
01065     //cout <<"R is "<<R_<<endl;
01066
01067     // C
01068     if ((childNode = XMLObject.getChild(Node, "Center"))==NULL) {
01069       // reached end of stream before expected end of data
01070       BIASERR("Error parsing XML code ...");
01071       return -1;
01072     }
01073     C_[0] = XMLObject.getAttributeValueDouble(childNode, "x");
01074     C_[1] = XMLObject.getAttributeValueDouble(childNode, "y");
01075     C_[2] = XMLObject.getAttributeValueDouble(childNode, "z");
01076     //cout <<"C is "<<C_<<endl;
01077
01078     // Recompose P
01079     Compose(K_, R_, C_);
01080     //cout <<"R after Compose is "<<R_<<endl;
01081     IsMetric_ = true;
01082   } else {
01083     // in the non-metric case we just have 12 values to construct P
01084     if ((childNode = XMLObject.getChild(Node, "DataFields"))==NULL) {
01085       BIASERR("error in xml structure");
01086       return -1;
01087     }
01088
01089     // get data fields
01090     stringstream ssData(XMLObject.getNodeContentString(childNode));
01091     unsigned int CurrentData=0;
01092     double* pData = GetData();
01093
01094     while (ssData.good() && CurrentData<12) {
01095       ssData >> (pData[CurrentData++]);
01096     }
01097     if (CurrentData<12) {
01098       // reached end of stream before expected end of data
01099       BIASERR("Error parsing XML code ...");
01100       return -1;
01101     }
01102     InvalidateDecomposition();
01103     IsMetric_ = false;
01104   }
01105
01106
01107   return 0;
01108 }
01109
01110 #endif // BIAS_HAVE_XML2
01111
01112
01113
01114 bool  PMatrix::Save(const std::string & filename)
01115 {
01116   std::ofstream fs( filename.c_str() );
01117   if (!fs) {
01118     return false; // error, could not open file.
01119   } else {
01120     fs<<(*this);
01121     fs<<"# Covariance [x y z r1 r2 r3] : "<<endl;
01122     fs<<Covariance_<<endl;
01123     if (IsMetric_) {
01124       fs<<"# R: "<<R_<<endl;
01125       fs<<"# C: "<<C_<<endl;
01126       fs<<"# K: "<<K_<<endl;
01127     }
01128     fs.close();
01129   };
01130   return true;
01131 }
01132
01133 } // end namespace BIAS
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrix.hh Source File

Geometry

PMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_PMatrix_hh__
00027 #define __BIAS_PMatrix_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031
00032
00033 #include <Base/Debug/Debug.hh>
00034 #ifdef BIAS_HAVE_XML2
00035 #  include <Base/Common/XMLBase.hh>
00036 #endif
00037 #include <Base/Geometry/PMatrixBase.hh>
00038
00039 #include <Base/Geometry/HomgLine2D.hh>
00040 #include <Base/Geometry/HomgPlane3D.hh>
00041 #include <Base/Geometry/HomgPoint3D.hh>
00042 #include <MathAlgo/SVD.hh>
00043 #include <Base/Geometry/KMatrix.hh>
00044 #include <fstream>
00045 #include <string>
00046
00047 namespace BIAS {
00048
00049   /** @class PMatrix
00050       @ingroup g_geometry
00051       @brief describes a projective 3D -> 2D mapping in homogenous coordinates
00052
00053       The P Matrix is a 3x4 matrix (3 rows {Zeilen}, 4 columns{Spalten})
00054       describing a mapping between a 3D projective point X in space and the
00055       corresponding projective 2D point x (in an image plane).
00056
00057       x = P * X
00058
00059       where X is of type HomgPoint3D and x of type HomgPoint2D.
00060       After homogenizing, x[0] and x[1] contain the image coordinates of the
00061       projection of the 3D point.
00062
00063       If P is a metric camera, it can be composed/decomposed into external
00064       parameters (orientation R and center C) and internal parameters (such
00065       as the focal length in the calibration matrix K):
00066
00067       With R' = transpose of R,  K = Camera calibration matrix and
00068       C = Camera center is:
00069       P = (K R' | -K R' C)
00070
00071       \ref geometry "See also the more general geometry section."
00072
00073       Only implementation very specific to PMatrix
00074       (and not valid for general matrices, e.g. like decomposition)
00075       should be implemented here.
00076
00077
00078       @attention For performance reasons, the PMatrix decomposition/svd is
00079       only done once, subsequent calls to GetC(),... only return copies of the
00080       precomputed values. If the fields of the PMatrix have changed, the
00081       user is responsible for calling InvalidateDecomposition() to force a
00082       re-decomposition at the next GetC(),... call.
00083       If one does not call InvalidateDecomposition() after changing a PMatrix,
00084       subsequent calls of GetC() may return outdated values !
00085
00086       @author Jan Woetzel **/
00087
00088   class BIASGeometry_EXPORT PMatrix : public PMatrixBase
00089 #ifdef BIAS_HAVE_XML2
00090       , public XMLBase
00091 #endif
00092   {
00093   public:
00094
00095     inline PMatrix() : PMatrixBase()
00096     {  Svd_ = NULL; InvalidateDecomposition(); };
00097
00098     explicit PMatrix(const MatrixInitType& i)
00099       : PMatrixBase(i) { Svd_ = NULL; InvalidateDecomposition(); };
00100
00101     // DEPRECATED due to instantiation problem JW
00102     //explicit inline PMatrix(const char *s) : PMatrixBase(s)  { Svd_ = NULL; InvalidateDecomposition(); };
00103     /// replacement for above JW
00104     explicit PMatrix(const std::string & s);
00105
00106     /** @author grest **/
00107     inline PMatrix(const PMatrix & A)
00108     { Svd_=NULL; operator=(A); }
00109
00110     /** @author Jan Woetzel
00111         @status beta (04/17/2002) **/
00112     inline PMatrix(const PMatrixBase & Amat_ )
00113       : PMatrixBase(Amat_)
00114     { Svd_ = NULL; InvalidateDecomposition(); };
00115
00116     /** @author Jan Woetzel
00117         not fine, should no be here, better cast stepwise between direct
00118         father and child
00119         @status untested (04/17/2002) **/
00120     PMatrix(const Matrix<PMATRIX_TYPE>& Amat);
00121
00122     /** Take R, K, C and compose PMatrix
00123         @author Jan-Friso Evers-Senne
00124         @date 2002-08-20 */
00125     inline PMatrix(const Matrix3x3<PMATRIX_TYPE> &K,
00126                    const Matrix3x3<PMATRIX_TYPE> &R,
00127                    const Vector3<PMATRIX_TYPE> &C) {
00128       Svd_ = NULL; Compose(K, R, C); }
00129
00130     /** destructor
00131         @status untested (04/17/2002) **/
00132     virtual ~PMatrix();
00133
00134     inline bool IsMetric() { return IsMetric_;}
00135
00136     /** setting a new size different from 3x4 is not allowed for the fixed
00137         size P-Matrix overloads the general newsize from basec class
00138         @author Jan Woetzel **/
00139     PMatrix& newsize(int rows, int cols);
00140
00141     /** @brief computes translation vector origin world coo -> origin
00142         camera coo (center), uses decomposition, which is cached */
00143     int GetC(Vector3<double>& C);
00144
00145    /** @brief computes translation vector origin world coo -> origin
00146         camera coo (center), uses decomposition, which is cached */
00147     BIAS::Vector3<double> GetC();
00148
00149     /** @brief computes translation vector origin world coo -> origin
00150         camera coo (center), uses decomposition, which is cached */
00151     int GetC(HomgPoint3D& C);
00152
00153     /** @brief this is another way of getting C,
00154         especially interesting for non-metric cameras
00155         @author koeser 07/2004 */
00156     int GetNullVector(HomgPoint3D& C);
00157
00158     /** @returns rotation matrix camera -> world coo
00159         (which contains the column-vectors H0, V0, A (from left to right) ) */
00160     int GetR(Matrix3x3<double>& R);
00161     inline Matrix3x3<double> GetR()
00162     { if (!IsDecomposed_ ) if (Decompose_() != 0)
00163       BIASERR("error decomposing"); return R_; };
00164
00165     /// calibration matrix
00166     int GetK(KMatrix& K);
00167
00168     inline KMatrix GetK()
00169     { if (!IsDecomposed_  ) if (Decompose_() != 0)
00170       BIASERR("error decomposing"); return K_; };
00171
00172     /**
00173         @brief returns the unit vector H0, while H0 and V0 span
00174         the camera coordinate system in world coordinates
00175
00176         returns the unit vector H0 which is not the cam.
00177         standard CAHV because image size is unknown (docu: JW 11/2002)
00178         represents the world coordinates of the vector (1,0,0) in ics
00179         A,H,V are orthonormal */
00180     int GetH(Vector3<double>& H);
00181     BIAS::Vector3<double> GetH();
00182
00183     /** @return the unit vector V0 which is not the cam.#
00184         standard CAHV because image size is unknown (docu: JW 11/2002)
00185         A,H,V are orthonormal*/
00186     int GetV(Vector3<double>& V);
00187     BIAS::Vector3<double> GetV();
00188
00189     /* @return up-vector of OpenGL camera
00190        convenience call for OpenGL JW 09/2003 */
00191     BIAS::Vector3<double> GetUp_gl(){
00192       return GetV().GetNormalized() * (double)-1;
00193     };
00194
00195     /** @brief checks whether X is in optical A-dir from C
00196         (only for metric cameras)
00197         @author koeser 01/05 */
00198     inline bool IsInFrontOfCamera(const Vector3<double>& X) {
00199       return ((X-GetC()).ScalarProduct(GetA())>0.0);
00200     }
00201
00202
00203     /** @brief returns the unit vector A which is the normal vector to the
00204         image plane in world coordinates.
00205
00206         or in other words: the camera orientation <br>
00207         A,H,V are orthonormal*/
00208     int GetA(Vector3<double>& A);
00209
00210     /** @brief returns the unit vector A which is the normal vector to the
00211         image plane in world coordinates.
00212
00213         or in other words: the camera orientation <br>
00214         A,H,V are orthonormal*/
00215     BIAS::Vector3<double> GetA();
00216
00217     /// Returns SVD of this.
00218     void GetSVD(Matrix<double>& U, Vector<double>& S,
00219                 Matrix<double>& VT);
00220
00221     /** @brief returns 4x3 pseudo inverse */
00222     int GetPseudoInverse(BIAS::Matrix<double>& Pinv);
00223
00224
00225     int GetHinf(BIAS::Matrix3x3<double> &Hinf);
00226
00227     /** returns image plane in world coordinates */
00228     void GetImagePlane(HomgPlane3D& plane);
00229
00230     /** calls the above */
00231     HomgPlane3D GetImagePlane();
00232
00233     /** modify C and re-compose P
00234         not fine to use, better use:  Compose() */
00235     void SetC(const Vector3<double>& newC);
00236
00237     /** to re-Decompose_() after filling with data use this.
00238         @author Jan-Friso Evers-Senne */
00239     inline void InvalidateDecomposition();
00240
00241     /** composes this from K, R and C
00242         using P = [ K R' | -K R' C ]
00243         with R' = transpose(R)
00244         @author Felix Woelk */
00245     void Compose(const Matrix3x3<double>& K, const Matrix3x3<double>& R,
00246                  const Vector3<double>& C);
00247
00248     void Compose(const Matrix3x3<double>& K, const Matrix3x3<double>& R,
00249                  const HomgPoint3D& C);
00250
00251     /** @author woelk 02/2006 */
00252     void Compose(const Matrix3x3<double>& K,
00253                  const Vector<double>& parametrization,
00254                  enum E_ParametrizationType param_type);
00255
00256     /** return line resulting of intersection of the two image planes
00257         in pixel coordinates of this camera
00258         return -1 if camera planes are parallel */
00259     int
00260     GetIntersectionOfImagePlanes(PMatrix& P, HomgLine2D& intersection);
00261
00262     /** calls the above
00263         returns line at infinity if planes are parallel */
00264     inline HomgLine2D GetIntersectionOfImagePlanes(PMatrix& P);
00265
00266     /** Returns a homogenized 3D point X on the viewray of x,
00267         which always lies in front of the camera(this is checked).
00268         @author Daniel Grest, last edit Jan 2003 */
00269     HomgPoint3D BackprojectPseudoinverse (const HomgPoint2D& x);
00270
00271     /** returns vector from C to point, w of point determines ray length
00272         analytical inverse of K is used */
00273     Vector3<double> GetRayWorldCoo(const HomgPoint2D& point);
00274     /** returns a 3D point res which is located
00275         depth away from center of projection in direction given by point */
00276     void BackprojectWorldCoo(const HomgPoint2D& point, double depth,
00277                              HomgPoint3D& res);
00278
00279     /** Inverts the PMatrix application to a 3D point whose z-component
00280      * in <b>cameracoordinates</b> and its imagepoint (x,y) is known.
00281      */
00282     void BackprojectByZDepth(const double& x,
00283                  const double& y,
00284                  const double& z_depth,
00285                  HomgPoint3D& res);
00286
00287
00288     /** returns normed vector from C to point
00289         analytical inverse of K is used */
00290     Vector3<double> GetNormRayWorldCoo(const HomgPoint2D& point);
00291
00292     /** write the CAHV decomposition of this P matrix
00293         in CAHV 1,0 format to stream os
00294         (see RK's/TNT CAHV1.0 fromat in SequenceReconstruction/
00295         Sequenetracking/KochSI.C)
00296         cols, rows is the size of the image this P matrix corresponds to.
00297         image size is neccessary because of shift of the axis origin
00298         cenetered/in left corner
00299         This is the 'Cunningham' format (see diss. Reinhard Koch, p.14)
00300         @author Jan Woetzel 11/2002
00301         @argument cols number of pixels
00302         @argument rows number of pixels */
00303     int WriteCAHV_10(int cols, int rows, std::ostream &os=std::cout);
00304
00305     /** assignment operator
00306         @author Jan Woetzel
00307         @status alpha (02/28/2002)**/
00308     PMatrix& operator=(const PMatrix &mat);
00309
00310     /** @return field of view angle in rad.
00311         for max: angle in rad between upper left and lower right
00312         opposing image corners.
00313         for min: min. angle of (horiz. vert) angle.
00314         Max. field of view (not horizontal or verttical fov.)
00315         @param optmin true if the min angle should be used,
00316         else the max angle(=quer)
00317         @param dimX horiz. image dimension in pixel (=columns)
00318         @param dimY vert.  image dimension in pixel (=rows)
00319         unfortunately not const because missing consts in decompose etc..
00320         we assume rectangular pixels for min(x,y) selection.
00321         @author JW 06/2003 */
00322     float GetFieldOfView(const unsigned int dimX,
00323              const unsigned int dimY,
00324              const bool optmin=true);
00325
00326     /* similar to the above, but
00327        @return fov in Y-direction in rad
00328        The angle (should be) measured as total vertical/horizontal, indepedant
00329        of proj. center
00330        TODO/FIXME/HACK! (currently assumes optical center is in image center
00331        JW 09/2003 */
00332     float GetFieldOfViewY(const unsigned int dimX, const unsigned int dimY,
00333                           const bool & compY=true);
00334
00335     // interface for the above
00336     float GetFieldOfViewX(const unsigned int dimX, const unsigned int dimY)
00337     {return GetFieldOfViewY(dimX, dimY, false);}
00338
00339     ///// convenience interface for the above
00340     //float GetFieldOfViewX(const Vector2<unsigned int> & imgDim)
00341     //{return GetFieldOfViewX(imgDim[0], imgDim[1]);}
00342     //
00343     ///// convenience interface for the above
00344     //float GetFieldOfViewY(const Vector2<unsigned int> & imgDim)
00345     //{return GetFieldOfViewY(imgDim[0], imgDim[1]);}
00346
00347     /** overload Load because it has to invalidate decomposition! JW 09/2003 */
00348     bool Load(const std::string & filename){
00349       bool result = BIAS::PMatrixBase::Load(filename);
00350       InvalidateDecomposition();
00351       return result;
00352     };
00353
00354
00355     bool  Save(const std::string & filename);
00356
00357     /** decompose the P-matrix to [ A | a ] where A is a 3x3-matrix
00358         and a is a 3-vector.
00359         @author mdunda 01 2004 */
00360     void DecomposeAa(BIAS::Matrix3x3<PMATRIX_TYPE> &A,
00361                      BIAS::Vector3<PMATRIX_TYPE> &a) const;
00362
00363     /** Get the projective homography matrix so that P * H = [ I | 0 ]
00364         @author mdunda 01 2004 */
00365     Matrix4x4<PMATRIX_TYPE> GetCanonicalH() const;
00366     void GetCanonicalH(Matrix4x4<PMATRIX_TYPE> &ProjH) const;
00367
00368     /** @brief scale P such that optical axis (first three entries of last row)
00369         has unit length
00370         @author koeser 03/2004 */
00371     inline void Normalize();
00372
00373
00374     /** @brief Load calibration data file from BBC-Free-D system
00375
00376         opens a free-d file and reads first (or only) piece of free-d data
00377         @param AddCenterPointShiftX add this to the principle point (in meter)
00378         @param AddCenterPointShiftY add this to the principle point (in meter)
00379         @author evers, koeser */
00380     int LoadBBC(const std::string &filename,
00381                 const double& AddCenterPointShiftX = 0.0,
00382                 const double& AddCenterPointShiftY = 0.0);
00383
00384     /** @brief Load next piece of calibration data from an open BBC-Free-D file
00385         @param AddCenterPointShiftX add this to the principle point (in meter)
00386         @param AddCenterPointShiftY add this to the principle point (in meter)
00387         @author evers, koeser */
00388     int BBCIn(std::ifstream &ifs,
00389               const double& AddCenterPointShiftX = 0.0,
00390               const double& AddCenterPointShiftY = 0.0);
00391
00392 #ifdef BIAS_HAVE_XML2
00393     /** @brief specialization of XML block name function */
00394     virtual int XMLGetClassName(std::string& TopLevelTag,
00395                                 double& Version) const;
00396
00397     /** @brief specialization of XML write function */
00398     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00399
00400     /** @brief specialization of XML read function */
00401     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00402 #endif
00403
00404
00405     int SetCovariance(const BIAS::Matrix<double> &cov) {
00406       Covariance_ = cov; return 0;}
00407
00408     int GetCovariance( BIAS::Matrix<double> &cov) {
00409       cov = Covariance_ ; return 0;}
00410
00411   protected:
00412     /** @brief Computes K,R,C, assuming a metric PMatrix P = K[R^T | -R^T * C]
00413         with K[0][1]=0 (zero skew) and K[2][2]=1
00414
00415         Does a LU-Decomposition of the first 3x3 part. Finally C is computed
00416         from the last column of P
00417         @attention this is NOT the cam.### 'standard' CAHV !
00418         and pmatrix must be metric, i.e. there must not be a _projective_ skew
00419         due to distorted 3d space coordinates:
00420         .Projection equation:  x =  P * H^-1  *  H * X
00421         .                        = (P * H^-1) * (H * X)
00422         .                        =    P'      *    X'
00423         If such a P' (with a projective distortion H) is estimated for some
00424         reason, the lu factorization makes no sense and the Get-Functions will
00425         return bad values, e.g. R is no rotation ...
00426         To get the center in the H-distorted space in that case, you should
00427         call PMatrix::GetNullVector instead.
00428         If you get a k[0][1]==skew!=0.0 the decomposition failed.
00429         (comments added by koeser)
00430         @author woelk */
00431     int Decompose_();
00432
00433     void Compose_();
00434
00435     //* @brief computes a new svd for pseudoinverse */
00436     inline int MakeSVD_();
00437
00438     /** @brief check if SVD is still valid */
00439     inline void CheckSVD_();
00440
00441     /** @brief check if Decomposition is still valid */
00442     inline void CheckDecomposition_();
00443
00444     /// camera center in wcs (extrinsic parameter)
00445     Vector3<double> C_;
00446
00447     /// unit vector in wcs assigning the direction of
00448     /// the optical axis
00449     Vector3<double> A_;
00450
00451     /// unit vector in wcs assigning the direction
00452     /// of the horizontal axis of the image plane
00453     Vector3<double> H0_;
00454
00455     /// unit vector in wcs assigning the direction
00456     /// of the vertical axis of the image plane
00457     Vector3<double> V0_;
00458
00459     /// Hinfinity
00460     Matrix3x3<double> Hinf_;
00461
00462     Matrix3x3<double> R_; ///< rotation matrix (intrinsic parameter)
00463     KMatrix K_; ///< camera calibration matrix (intrinsic parameter)
00464     SVD  *Svd_; ///< (for decomposition, docu: JW 11/2002)
00465
00466 #ifdef BIAS_DEBUG
00467     /// backup of P at time of last decomposition to check whether
00468     /// decomposition is still valid
00469     Matrix3x4<double> PConsistencyBackup_;
00470     Matrix3x4<double> PConsistencyBackupSVD_;
00471
00472 #endif
00473     Matrix<double> Covariance_;
00474
00475     /// tells us whether we have a chached decomposition with C,A,...
00476     bool IsDecomposed_;
00477
00478     /// tells us whether we have an arbitrary 3x4 matrix or
00479     /// a P which is exactly a composition of P = K * R [ I | -C ]
00480     /// this is called a metric pmatrix
00481     bool IsMetric_;
00482   }; // class PMatrix
00483   // ====================================
00484
00485
00486
00487
00488   inline HomgLine2D
00489   PMatrix::GetIntersectionOfImagePlanes(PMatrix& P)
00490   {
00491     HomgLine2D intersection(0.0, 0.0, 0.0);
00492     GetIntersectionOfImagePlanes(P, intersection);
00493     return intersection;
00494   }
00495
00496   inline void PMatrix::InvalidateDecomposition() {
00497     if (Svd_!=NULL) delete Svd_;
00498     Svd_ = NULL;
00499 #ifdef BIAS_DEBUG
00500     PConsistencyBackup_.Fill(-1.0);
00501     PConsistencyBackupSVD_.Fill(-1.0);
00502 #endif
00503     IsDecomposed_ = false;
00504     IsMetric_ = false; }
00505
00506   void PMatrix::Normalize() {
00507 #ifdef BIAS_DEBUG
00508     if (IsDecomposed_) CheckDecomposition_();
00509     if (Svd_ != NULL) CheckSVD_();
00510 #endif
00511
00512     const PMATRIX_TYPE* pLastRow = row_[2];
00513     (*this) /= sqrt(pLastRow[0]*pLastRow[0] +
00514                     pLastRow[1]*pLastRow[1] + pLastRow[2]*pLastRow[2]);
00515 #ifdef BIAS_DEBUG
00516     if (IsDecomposed_) {
00517       // scaling does not touch decomposition, set PMatrix decomposition valid
00518       PConsistencyBackup_ = (*this);
00519     }
00520     if (Svd_ != NULL) {
00521       PConsistencyBackupSVD_ = (*this);
00522     }
00523 #endif
00524   }
00525
00526   inline int PMatrix::MakeSVD_(){
00527     int retvalue = 0;
00528     if (Svd_!=NULL) {
00529 #ifdef BIAS_DEBUG
00530       CheckSVD_();
00531 #endif
00532     } else {
00533       Svd_ = new SVD;
00534       retvalue = Svd_->compute(*this);
00535 #ifdef BIAS_DEBUG
00536       PConsistencyBackupSVD_ = (*this);
00537 #endif
00538     }
00539     return retvalue;
00540   }
00541
00542   inline void PMatrix::CheckSVD_() {
00543 #ifdef BIAS_DEBUG
00544     // check if PMatrix is _REALLY_ still valid
00545     if (memcmp((void*)PConsistencyBackupSVD_.GetData(),
00546                (void*)GetData(),12*sizeof(double))) {
00547       BIASERR("Tried to access cached decomp.(outdated) for changed PMatrix! "
00548               <<"You have to invalidate after changing PMatrix! Aborting.");
00549       BIASABORT;
00550     }
00551 #endif
00552   }
00553
00554   inline void PMatrix::CheckDecomposition_() {
00555 #ifdef BIAS_DEBUG
00556     // check if PMatrix is _REALLY_ still valid
00557     if (memcmp((void*)PConsistencyBackup_.GetData(),
00558                (void*)GetData(),12*sizeof(double))) {
00559       BIASERR("Tried to access cached(outdated) svd for changed PMatrix ! "
00560               <<"You have to invalidate after changing PMatrix! Aborting.");
00561       BIASABORT;
00562     }
00563 #endif
00564   }
00565
00566
00567 } // end namespace
00568
00569
00570 #include <Base/Common/BIASpragmaEnd.hh>
00571
00572 #endif
00573
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PMatrixBase.cpp Source File

Base » Geometry

PMatrixBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "PMatrixBase.hh"
00027 #include "RMatrixBase.hh"
00028 #include <Base/Debug/Exception.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 namespace BIAS {
00034
00035 PMatrixBase::PMatrixBase(const Matrix3x3<PMATRIX_TYPE> &K,
00036                          const Matrix3x3<PMATRIX_TYPE> &R,
00037                          const Vector3<PMATRIX_TYPE> &C)
00038 {
00039   Compose(K, R, C);
00040 }
00041
00042
00043 PMatrixBase::PMatrixBase(const std::string & s)
00044 : Matrix3x4<PMATRIX_TYPE>(s)
00045 {}
00046
00047
00048 void PMatrixBase::Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00049                           const Matrix3x3<PMATRIX_TYPE> &R,
00050                           const Vector3<PMATRIX_TYPE> &C)
00051 {
00052   Matrix3x3<double> Rt, KRt;
00053   Vector3<double> LastCol;
00054
00055   Rt = R;
00056   Rt.TransposeIP();
00057   //cerr <<"Rt: "<<Rt<<endl;
00058   KRt=K*Rt;
00059   //cerr <<"KRt: "<<KRt<<endl;
00060   // last column of P is:  -R'C  (docu; JW 11/2002)
00061   KRt.Mult(C, LastCol);
00062   LastCol.MultIP(-1.0);
00063   //cerr <<"KRt: "<<KRt<<endl;
00064
00065   // fill the Matrix RtRtC = [R' | R' C]  (docu; JW 11/2002)
00066   for (int row=0; row<3; row++) {
00067     (*this)[row][0] = KRt[row][0];
00068     (*this)[row][1] = KRt[row][1];
00069     (*this)[row][2] = KRt[row][2];
00070     (*this)[row][3] = LastCol[row];
00071   }
00072 }
00073
00074 void PMatrixBase::Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00075                           const Matrix3x3<PMATRIX_TYPE> &R,
00076                           const HomgPoint3D &C)
00077 {
00078   Vector3<PMATRIX_TYPE> cnew;
00079   if (!C.IsAtInfinity()){
00080     cnew.Set(C[0]/C[3], C[1]/C[3], C[2]/C[3]);
00081     Compose(K, R, cnew);
00082   } else {
00083     BIASERR("cannot compose camera at infinity");
00084   }
00085 }
00086
00087 void PMatrixBase::Compose(const Matrix3x3<PMATRIX_TYPE> &R,
00088                           const Vector3<PMATRIX_TYPE> &C)
00089 {
00090   Matrix3x3<PMATRIX_TYPE> K;
00091   K.SetIdentity();
00092   Compose(K, R, C);
00093 }
00094
00095 void PMatrixBase::Compose(const Matrix3x3<PMATRIX_TYPE> &R,
00096                           const HomgPoint3D &C)
00097 {
00098   Matrix3x3<PMATRIX_TYPE> K;
00099   K.SetIdentity();
00100   Compose(K, R, C);
00101 }
00102
00103 void PMatrixBase::Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00104                           const Vector<double>& src,
00105                           enum E_ParametrizationType param_type)
00106 {
00107   RMatrixBase R = Parametrization2R_(src, param_type);
00108
00109   Vector3<double> C(src[0], src[1], src[2]);
00110   //cout << "comp K: "<<K<<"\nR: "<<R<<"\nC"<<C<<flush<<endl;
00111   Compose(K, R, C);
00112 }
00113
00114 RMatrixBase PMatrixBase::
00115 Parametrization2R_(const Vector<double>& src,
00116                    enum E_ParametrizationType param_type) const
00117 {
00118   RMatrixBase R;
00119   switch (param_type){
00120   case AXIS_TIMES_ANGLE:
00121     {
00122       if (src.Size()!=6){
00123         BEXCEPTION("invalid src vector size "<<src.Size());
00124       }
00125       Vector3<double> axis_angle;
00126       axis_angle.Set(src[3], src[4], src[5]);
00127       R.SetFromAxisAngle(axis_angle);
00128     }
00129     break;
00130   case AXIS_AND_ANGLE:
00131     {
00132       if (src.Size()!=7){
00133         BEXCEPTION("invalid src vector size "<<src.Size());
00134       }
00135       Vector3<double> axis;
00136       axis.Set(src[3], src[4], src[5]);
00137       R.Set(axis, src[6]);
00138     }
00139     break;
00140   case EULER:
00141     if (src.Size()!=6){
00142       BEXCEPTION("invalid src vector size "<<src.Size());
00143     }
00144     R.SetXYZ(src[3], src[4], src[5]);
00145     break;
00146   case QUATERNION:
00147     {
00148       if (src.Size()!=7){
00149         BEXCEPTION("invalid src vector size "<<src.Size());
00150       }
00151       Quaternion<double> q(src[3], src[4], src[5], src[6]);
00152       R.SetFromQuaternion(q);
00153     }
00154     break;
00155   default:
00156     BIASERR("unknown enum type "<<param_type);
00157     BEXCEPTION("unkown enum type "<<param_type);
00158     break;
00159   }
00160   return R;
00161 }
00162
00163 PMatrixBase::~PMatrixBase() {}
00164
00165 PMatrixBase &
00166 PMatrixBase::newsize(int rows, int cols)
00167 {
00168   BIASERR("The size of a P-Matrix has to be 3x4. newsize can't create a "
00169          << rows<<" x "<< cols << " PMatrixBase. aborting.");
00170   exit(-1);
00171   //return *this;
00172 }
00173
00174
00175 /** Sets P-Matrix from a vector which contains the elements of P
00176     row wise.*/
00177 void PMatrixBase::SetFromVector(const Vector<PMATRIX_TYPE>& vals)
00178 {
00179   PMATRIX_TYPE *data = vals.GetData();
00180   for (unsigned int i = 0 ; i <  P_MATRIX_ROWS; i++)
00181     for (unsigned int j = 0 ; j < P_MATRIX_COLS; j++)
00182       (*this)[i][j]=*(data++);
00183 }
00184
00185
00186 HomgPoint3D PMatrixBase::Backproject(const HomgPoint2D& x, double mu){
00187
00188   BIAS::HomgPoint2D xx=x;
00189   BIAS::Matrix3x3<double> M;
00190   BIAS::HomgPoint2D p4;
00191
00192   for (int i=0;i<3;i++){
00193     p4[i]=(*this)[i][3];
00194     for (int j=0;j<3;j++)
00195       M[i][j]=*this[i][j];
00196   }
00197   // invert M
00198   int ires = M.InvertIP();
00199   if (ires!=0) BIASERR("error: unable to invert M "<<M<<endl);
00200
00201   xx*=mu;
00202   xx-=p4;
00203   xx = M*xx;
00204
00205   BIAS::HomgPoint3D X;
00206
00207   for (int i=0; i<3;i++)
00208     X[i]=xx[i];
00209   X[3]=1;
00210
00211   return X;
00212 }
00213
00214
00215 // JW
00216 int PMatrixBase::LoadBOG(const std::string & filename){
00217     Matrix3x3<PMATRIX_TYPE> K;
00218     Matrix3x3<PMATRIX_TYPE> R;
00219     Vector3<PMATRIX_TYPE> C;
00220     int result=0;
00221     if (0!=K.LoadBogK(filename)) result += -1;
00222     if (0!=R.LoadBogRC(filename)) result += -2;
00223     if (0!=C.LoadBogTC(filename)) result += -4;
00224     Compose(K, R, C);
00225     return result;
00226 }
00227
00228 } // end namespace BIAS
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PMatrixBase.hh Source File

Base » Geometry

PMatrixBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_PMatrix_hh_
00027 #define _BIAS_PMatrix_hh_
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Math/Matrix3x4.hh>
00033 #include <Base/Math/Vector4.hh>
00034 #include <Base/Math/Vector3.hh>
00035 #include <Base/Math/Vector.hh>
00036 #include <Base/Math/Matrix3x3.hh>
00037 #include <Base/Math/Matrix4x4.hh>
00038 #include "HomgLine2D.hh"
00039 #include "HomgPoint3D.hh"
00040   //#include "HomgLine3D.hh"
00041
00042 // dimension of P matrix:
00043 #define P_MATRIX_ROWS 3
00044 #define P_MATRIX_COLS 4
00045
00046 // element typ:
00047 #define PMATRIX_TYPE double
00048
00049 #define PMATRIX_EPSILON 1e-14
00050 namespace BIAS {
00051
00052   class RMatrixBase;
00053
00054 /** @class PMatrixBase
00055     @ingroup g_geometry
00056     @brief describes a projective 3D -> 2D mapping in homogenous coordinates
00057
00058     Matrix P is a 3x4 matrix (3 rows {Zeilen}, 4 columns{Spalten})
00059     describing a mapping between a 3D projective point in space and the
00060     corresponding projective 2D point (in an image plane).
00061
00062     With R' = transpose of R,  K = Kamera calibration matrix and
00063     C = Kamera center is:
00064     P = (K R' | -K R' C)
00065     This means that R is the rotation from camera to world coo, and
00066     R' = R.Transpose() the rotation from world to camera coo.
00067
00068     Only implementation very specific to PMatrix
00069     (and not valid for general matrices, e.g. like decomposition)
00070     should be implemented here.
00071     @author Jan Woetzel
00072     @status alpha (02/26/2002) **/
00073
00074   class BIASGeometryBase_EXPORT PMatrixBase : public Matrix3x4<PMATRIX_TYPE> {
00075
00076   public:
00077     using Matrix3x4<PMATRIX_TYPE>::Mult;
00078
00079     /** default constructor **/
00080     inline PMatrixBase() : Matrix3x4<PMATRIX_TYPE>()
00081     {};
00082
00083     /** constructor setting identity or zero
00084         @brief author koeser **/
00085     explicit PMatrixBase(const MatrixInitType& i) :
00086       Matrix3x4<PMATRIX_TYPE>(i) {};
00087
00088     // DEPRECATED due to instantiation problem JW
00089     //explicit inline PMatrixBase(const char *s) : Matrix3x4<PMATRIX_TYPE>(s) {};
00090     /// replacement for above JW
00091     explicit PMatrixBase(const std::string & s);
00092
00093
00094
00095     /** @author Jan Woetzel **/
00096     inline PMatrixBase(const PMatrixBase & A) : Matrix3x4<PMATRIX_TYPE>(A)
00097     {};
00098
00099     /** @author Jan Woetzel **/
00100     inline PMatrixBase(const Matrix3x4<PMATRIX_TYPE> & Amat_ )
00101       : Matrix3x4<PMATRIX_TYPE>(Amat_)
00102     {};
00103
00104     /** @author Jan Woetzel
00105         not fine, should no be here, better cast stepwise between direct
00106         father and child **/
00107     explicit inline PMatrixBase(const Matrix<PMATRIX_TYPE>& Amat);
00108
00109     /** Take R, K, C and compose PMatrixBase
00110         @author Jan-Friso Evers-Senne
00111         @date 2002-08-20 */
00112     PMatrixBase(const Matrix3x3<PMATRIX_TYPE> &K,
00113                 const Matrix3x3<PMATRIX_TYPE> &R,
00114                 const Vector3<PMATRIX_TYPE> &C);
00115
00116     /** assume K=Identity and compose P
00117         @author woelk 08/2004 */
00118     inline PMatrixBase(const Matrix3x3<PMATRIX_TYPE> &R,
00119                        const Vector3<PMATRIX_TYPE> &C);
00120
00121     /** destructor **/
00122     virtual ~PMatrixBase();
00123
00124     /** setting a new size different from 3x4 is not allowed for the fixed
00125         size P-Matrix overloads the general newsize from basec class
00126         @author Jan Woetzel
00127         @status alpha (02/25/2002)  **/
00128     PMatrixBase &newsize(int rows, int cols);
00129
00130     inline  PMatrixBase& operator=(const PMatrixBase &mat);
00131
00132     /** @brief project a 3D line into an image line
00133         @author woelk */
00134     // deprecated fw    inline void Mult(HomgLine3D& arg, HomgLine2D& dest);
00135
00136     /** Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4
00137         method:
00138         1 0 0 0
00139         0 1 0 0
00140         0 0 1 0
00141         @author Ingo Thomsen
00142         @date 04/11/2002
00143         @status tested **/
00144     inline void set_identity();
00145
00146     /** Sets P-Matrix from a vector which contains the elements of P
00147         row wise.*/
00148     void SetFromVector(const Vector<PMATRIX_TYPE>& vals);
00149
00150     /** composes this from K, R and C
00151         using P = [ K R' | -K R' C ]
00152         with R' = transpose(R)
00153         @author Felix Woelk */
00154     void Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00155                  const Matrix3x3<PMATRIX_TYPE> &R,
00156                  const Vector3<PMATRIX_TYPE> &C);
00157
00158     void Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00159                  const Matrix3x3<PMATRIX_TYPE> &R,
00160                  const HomgPoint3D &C);
00161
00162     /// calibrated case, uses K=Identity
00163     void Compose(const Matrix3x3<PMATRIX_TYPE> &R,
00164                  const Vector3<PMATRIX_TYPE> &C);
00165
00166     /// calibrated case, uses K=Identity
00167     void Compose(const Matrix3x3<PMATRIX_TYPE> &R,
00168                  const HomgPoint3D &C);
00169
00170     /// description of supported parametrization types
00171     enum E_ParametrizationType  { AXIS_TIMES_ANGLE, AXIS_AND_ANGLE,
00172                                   EULER, QUATERNION };
00173
00174     /** Compose a projection matrix using a parametrization. The supported
00175         parametrization vector always starts with the camera center followed
00176         by the camera orientation. Currently Euler angles,
00177         axis (norm 1) and angle, axis times angle and quaternion are supported
00178         as orientation parametrization.
00179         @author woelk 02/2006 */
00180     void Compose(const Matrix3x3<PMATRIX_TYPE> &K,
00181                  const Vector<double>& parametrization,
00182                  enum E_ParametrizationType param_type);
00183
00184     /** Back projects image point x to 3D space and returns ray on which the 3D
00185         space point lies.
00186         @author jmf */
00187     HomgPoint3D Backproject(const HomgPoint2D& x, double mu=1);
00188
00189     /** Load a Daimler .bog fiel and compose a P matri xfrom it.
00190         @author Jan Woetzel 03/2005 */
00191     int LoadBOG(const std::string & filename);
00192
00193   protected:
00194     /// @author woelk 03/2006
00195     RMatrixBase Parametrization2R_(const Vector<double>& parametrization,
00196         enum E_ParametrizationType param_type)const;
00197
00198  }; // class PMatrixBase
00199
00200   ////////////////////////////////////////////////////////////////////////
00201   ///  implementation
00202   ////////////////////////////////////////////////////////////////////////
00203
00204   inline PMatrixBase::PMatrixBase(const Matrix3x3<PMATRIX_TYPE> &R,
00205                                   const Vector3<PMATRIX_TYPE> &C)
00206   { Compose(R, C); }
00207
00208   inline void PMatrixBase::set_identity(){
00209     register PMATRIX_TYPE* d = GetData();
00210     d[0] = d[5] = d[10] = 1;
00211     d[1] = d[2] = d[3] = d[4] = d[6] = d[7] = d[8] = d[9] = d[11] = 0;
00212   }
00213
00214   inline PMatrixBase::PMatrixBase(const Matrix<PMATRIX_TYPE>& Amat)
00215   {
00216     if ((Amat.num_rows()==3) && (Amat.num_cols()==4)) {
00217       //(is slow, better use memcopy or even better 'grandpa'-constructor.
00218       for (int index=0; index<12; index++ ) {
00219         this->GetData()[index] = Amat.GetData()[index];
00220       };
00221     } else {
00222       BIASERR(" wrong size in constructor! Amat is a "<<Amat.num_rows()
00223              <<" x "<<Amat.num_cols()<<" matrix but must be 3x4."
00224              <<std::endl );
00225       exit(1);
00226     };
00227   }
00228
00229   /* deprecated fw   inline void
00230   PMatrixBase::Mult(HomgLine3D& arg, HomgLine2D& dest)
00231   {
00232     HomgPoint2D p1, p2;
00233     HomgPoint3D ptmp;
00234     arg.Homogenize();
00235     ptmp = arg.GetPointFin();
00236     ptmp += arg.GetPointInf();
00237     Matrix3x4<double>::Mult(ptmp, p1);
00238     Matrix3x4<double>::Mult(arg.GetPointFin(), p2);
00239     dest.Set(p1, p2);
00240     }*/
00241
00242   inline  PMatrixBase& PMatrixBase::operator=(const PMatrixBase &mat) {
00243     BIAS::Matrix<PMATRIX_TYPE>::operator=(mat);
00244     return *this;
00245   }
00246
00247 } // end namespace
00248
00249 #endif // _BIAS_PMatrixBase_hh_
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixEstimation.cpp Source File

Geometry

PMatrixEstimation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "PMatrixEstimation.hh"
00026 #include "MathAlgo/Minpack.hh"
00027
00028
00029 BIAS::Matrix<double> globalM2;
00030 BIAS::HomgPoint2D globalEpipole2;
00031
00032 #include <Base/Common/BIASpragma.hh>
00033
00034
00035 using namespace BIAS;
00036
00037 /// error function, which punishes large differences of submatrix from
00038 /// a rotation matrix
00039 void DistanceFromRotation4Var(int *n, double *x,
00040                               double *fvec,
00041                               int *iflag)
00042 {
00043   if (*n!=4) {
00044     BIASERR("Caller supplied invalid n="<< (*n));
00045   }
00046
00047   BIAS::Matrix<double> E2(3,1), BMat(1,3);
00048   for (int k=0; k< 3;k++){
00049     E2[k][0]   = globalEpipole2[k];
00050     BMat[0][k] = x[3]*x[k];
00051   }
00052   BIAS::Matrix<double> Outer = E2*BMat;
00053   BIAS::Matrix<double> SubMatrix = globalM2*x[3] + Outer;
00054
00055   // enforce all rows to be orthogonal
00056   fvec[0] = SubMatrix.GetRow(0)*SubMatrix.GetRow(1);
00057   fvec[1] = SubMatrix.GetRow(1)*SubMatrix.GetRow(2);
00058   fvec[2] = SubMatrix.GetRow(2)*SubMatrix.GetRow(0);
00059   // enforce all rows to be of unit length
00060   fvec[3] =  fabs(1.0-(SubMatrix.GetRow(0) * SubMatrix.GetRow(0)));
00061   fvec[3] += fabs(1.0-(SubMatrix.GetRow(1) * SubMatrix.GetRow(1)));
00062   fvec[3] += fabs(1.0-(SubMatrix.GetRow(2) * SubMatrix.GetRow(2)));
00063
00064 }
00065
00066 int PMatrixEstimation::ComputeFromFDirect(BIAS::FMatrix &F,
00067                                           const double& BaselineMagnitude,
00068                                           BIAS::PMatrix &P1,
00069                                           BIAS::PMatrix &P2){
00070
00071   HomgPoint2D Epipole1, Epipole2;
00072   if (F.GetEpipoles(Epipole1, Epipole2)<0) return -1;
00073
00074   Epipole2.Normalize();
00075   Epipole2 *= BaselineMagnitude;
00076
00077   // initially set p2 to be the identity in its left 3x3 i.e. no rotation
00078   InitP1P2Trans(P1, P2, Epipole2);
00079
00080   //
00081   RMatrix R;
00082   ComputeRotation(F, Epipole1, Epipole2, R);
00083   R = R.Transpose();
00084
00085   // copy R into P2
00086   for (unsigned int i = 0; i < 3; i++)
00087     for (unsigned int j = 0; j < 3; j++)
00088       P2[i][j] = R[i][j];
00089
00090   // sanity check: has R rank 3 ?
00091   SVD RSVD(R);
00092   Vector< double > S = RSVD.GetS();
00093
00094   // catch division by zero problem in next check
00095   if (S[0]<1e-10) return -1;
00096   // sanity check on rank 3 of R
00097   if (S[2]/S[0]<1e-5) return -1;
00098
00099   // if (P2_base.NormFrobenius()<1e-10) return -1;
00100
00101   P1.InvalidateDecomposition();
00102   P2.InvalidateDecomposition();
00103   return 0;
00104 }
00105
00106 void PMatrixEstimation::ComputeRotation(BIAS::FMatrix &F,
00107                                         BIAS::HomgPoint2D &Epipole1,
00108                                         BIAS::HomgPoint2D &Epipole2,
00109                                         BIAS::RMatrix &R){
00110
00111
00112   // set rotation part as described in Foerstner
00113   Matrix3x3<double> ee = Epipole2.OuterProduct(Epipole1);
00114   Matrix3x3<double> e, eF; e.SetAsCrossProductMatrix(Epipole2);
00115   eF=e*F;
00116
00117   eF *= ee.NormFrobenius();
00118   ee *= eF.NormFrobenius()/sqrt(2.0);
00119
00120   R = eF+ee;
00121
00122   // enforce right-handed rotation !
00123   R /= (R.det() < 0.0)
00124     ? -sqrt(R[2][0]*R[2][0]+R[2][1]*R[2][1] + R[2][2]*R[2][2])
00125     :  sqrt(R[2][0]*R[2][0]+R[2][1]*R[2][1] + R[2][2]*R[2][2]);
00126
00127   // check for positive optical axis of the second cemara because the first
00128   // cameras axis is (0 , 0 , 1) otherwise rotate around baseline (epipole)
00129   if ( R[2][2] < 0.0){
00130     RMatrix rot(Epipole2,M_PI);
00131     R = rot*R;
00132   }
00133   R = R.Transpose();
00134 }
00135
00136 void PMatrixEstimation::ComputeRotationCenter(BIAS::PMatrix P1,
00137                                               BIAS::PMatrix P2,
00138                                               BIAS::RMatrix &R,
00139                                               BIAS::Vector3<double> &C){
00140
00141   Vector<double> Epipole2 = P2*P1.GetC();
00142   Epipole2.MultiplyIP(Epipole2.NormL2());
00143
00144   // compute homography for F
00145   Matrix3x3<double> H, H1,H2;
00146   for (unsigned int i = 0; i < 3; i++)
00147     for (unsigned int j = 0; j < 3; j++){
00148       H1[i][j] = P1[i][j];
00149       H2[i][j] = P2[i][j];
00150     }
00151   Matrix3x3<double> H1i;
00152   int ires = H1.Invert(H1i);
00153   if (ires!=0) BIASERR("error: Unable to invert matrix "<<H1<<std::endl);
00154   H = H2*H1i;
00155   H2.SetAsCrossProductMatrix(Epipole2);
00156   H1 = H2*H;
00157   FMatrix F(H1);
00158
00159   HomgPoint2D e1, e2;
00160   F.GetEpipoles(e1,e2);
00161   ComputeRotation(F,e1,e2,R);
00162
00163   // compute center
00164   for (unsigned int j = 0; j < 3; j++)
00165     Epipole2[j] = P2[j][3];
00166
00167   C = R.Transpose()*Epipole2;
00168   C *= -1.0;
00169
00170
00171 }
00172
00173 void PMatrixEstimation::ComputeFromFQuasiEuklid(BIAS::FMatrix &F,
00174                                                 double BaselineMagnitude,
00175                                                 BIAS::PMatrix &P1,
00176                                                 BIAS::PMatrix &P2) {
00177
00178   Matrix<double>    SubMatrix;
00179   Vector<double>    C(4);
00180   Matrix3x3<double> M2Matrix;
00181
00182   BIASDOUT(BIAS_FMATRIXDEBUG, "F = " << F);
00183
00184   HomgPoint2D Epipole1, Epipole2;
00185   F.GetEpipoles(Epipole1, Epipole2);
00186
00187   Epipole2.Normalize();
00188   Epipole2 *= BaselineMagnitude;
00189
00190   BIASDOUT(BIAS_FQuasiEuklid,"Epipole 1 = " << Epipole1
00191            << " Epipole2 = " << Epipole2);
00192
00193
00194   // initially set p2 to be the identity in its left 3x3 i.e. no rotation
00195   InitP1P2Trans(P1, P2, Epipole2);
00196   BIASDOUT(BIAS_FQuasiEuklid,"After InitP1P2Trans P2= "<<P2);
00197
00198   // find the decomposition of p2, and the closest p2 to the current setting.
00199   //FindClosestP2(F, P1, P2, M2Matrix, C, Epipole2);
00200   FindClosestP2(F, P2, M2Matrix, C, Epipole2);
00201   BIASDOUT(BIAS_FQuasiEuklid,"After FindClosestP2 P2 = "<< P2);
00202
00203   // now want to adjust the three DOF in b_trivec to make (m2+e2 b^T) as
00204     // close to orthogonal as possible.
00205
00206     // memcpy (pm_m2_matrix, m2_matrix, sizeof (pm_m2_matrix));
00207     // fm_compute_epipoles (f_matrix, &epipole1_trivec,
00208     // &pm_epipole2_trivec);
00209
00210
00211   // set stop criterion for powell:
00212   double dMaxError = 1e-10;
00213   /// \todo dirty hack: set global variables, which are accessible in error
00214   /// function called from fortran-powell
00215   /// *** this is not thread-safe ! ***
00216   globalEpipole2 = Epipole2;
00217   globalM2 = M2Matrix;
00218
00219   // set current value as start value
00220   Vector<double> CStart = C;
00221
00222   int iError=0;
00223   // minimize error funtion DistanceFromRotation4Var on P using Powell
00224   if ((iError=Powell (&DistanceFromRotation4Var,
00225                       CStart, C, dMaxError))<0) {
00226     BIASERR("Minimization did not succeed, error code is "<<iError);
00227   }
00228     BIASDOUT(BIAS_FQuasiEuklid,"C =" << C);
00229
00230     //ho_trivec_outer_product (&pm_epipole2_trivec, &b_trivec, outer_matrix);
00231   Matrix<double> E2(3,1), BMat(1,3);
00232   for (int k=0; k< 3;k++){
00233     E2[k][0]   = Epipole2[k];
00234     BMat[0][k] = C[k];
00235   }
00236   Matrix<double> Outer = E2*BMat;
00237   BIASDOUT(BIAS_FQuasiEuklid,"M2Matrix = " << M2Matrix);
00238   BIASDOUT(BIAS_FQuasiEuklid,"Outer = " << Outer);
00239
00240   SubMatrix = M2Matrix + Outer;
00241     BIASDOUT(BIAS_FQuasiEuklid,"SubMatrix = " << SubMatrix);
00242
00243     // copy left part of P from submatrix
00244   for (int row = 0; row < 3; row++)
00245     for (int col = 0; col < 3; col++) {
00246       P2[row][col] = SubMatrix [row][col];
00247     }
00248   BIASDOUT(BIAS_FQuasiEuklid,"P2 = " << P2);
00249
00250 }
00251
00252
00253 void PMatrixEstimation::InitP1P2Trans (BIAS::PMatrix &P1,
00254                                        BIAS::PMatrix &P2,
00255                                        HomgPoint2D &Epipole2) {
00256   //  BIASDOUT(BIAS_FMATRIXDEBUG,"In InitP1P2Trans E2 = " << Epipole2);
00257   P1.set_identity();
00258   P2.set_identity();
00259
00260   P2[0][3] = Epipole2[0];
00261   P2[1][3] = Epipole2[1];
00262   P2[2][3] = Epipole2[2];
00263 }
00264
00265
00266 /*---------------------------------------------------------------------------
00267 given approximate P2, compute the nearest value of P2 which is exactly
00268 compatible with P1 and F, using the method in the IJCV paper.  variable names
00269 are from the paper too.
00270 ----------------------------------------------------------------------------*/
00271 void
00272 PMatrixEstimation::FindClosestP2 (BIAS::FMatrix &F,
00273                                   //BIAS::PMatrix &P1,
00274                                   BIAS::PMatrix &P2,
00275                                   Matrix3x3<double> &M2Matrix,
00276                                   Vector<double> &C, HomgPoint2D& Epipole2 )
00277 {
00278
00279   BIASDOUT(BIAS_FMATRIXDEBUG,"F = " << F);
00280   Matrix3x3<double> SkewMatrix, SubMatrix;
00281
00282   double DotProduct=0.0, Magnitude;
00283
00284   Matrix<double> A(9,4);
00285   Vector<double> B(9);
00286
00287   F.DecomposetoSR(SkewMatrix, M2Matrix);
00288
00289   BIASDOUT(BIAS_PMATRIXDEBUG,"M2Matrix = " << M2Matrix);
00290
00291   A[0][0] = M2Matrix [0][0];
00292   A[0][1] = Epipole2[0];
00293   A[0][2] = 0;
00294   A[0][3] = 0;
00295   B[0]    = P2[0][0];
00296
00297   A[1][0] = M2Matrix[0][1];
00298   A[1][1] = 0;
00299   A[1][2] = Epipole2[0];
00300   A[1][3] = 0;
00301   B[1]    = P2[0][1];
00302
00303   A[2][0] = M2Matrix[0][2];
00304   A[2][1] = 0;
00305   A[2][2] = 0;
00306   A[2][3] = Epipole2[0];
00307   B[2]    = P2[0][2];
00308
00309   A[3][0] = M2Matrix[1][0];
00310   A[3][1] = Epipole2[1];
00311   A[3][2] = 0;
00312   A[3][3] = 0;
00313   B[3]    = P2[1][0];
00314
00315   A[4][0] = M2Matrix[1][1];
00316   A[4][1] = 0;
00317   A[4][2] = Epipole2[1];
00318   A[4][3] = 0;
00319   B[4]    = P2[1][1];
00320
00321   A[5][0] = M2Matrix[1][2];
00322   A[5][1] = 0;
00323   A[5][2] = 0;
00324   A[5][3] = Epipole2[1];
00325   B[5]    = P2[1][2];
00326
00327   A[6][0] = M2Matrix[2][0];
00328   A[6][1] = Epipole2[2];
00329   A[6][2] = 0;
00330   A[6][3] = 0;
00331   B[6]    = P2[2][0];
00332
00333   A[7][0] = M2Matrix[2][1];
00334   A[7][1] = 0;
00335   A[7][2] = Epipole2[2];
00336   A[7][3] = 0;
00337   B[7]    = P2[2][1];
00338
00339   A[8][0] = M2Matrix[2][2];
00340   A[8][1] = 0;
00341   A[8][2] = 0;
00342   A[8][3] = Epipole2[2];
00343   B[8] = P2[2][2];
00344
00345   BIASDOUT(BIAS_PMATRIXDEBUG,"A = " << A);
00346   BIASDOUT(BIAS_PMATRIXDEBUG,"B = " << B);
00347
00348   //ma2_solve_equation_svd (a_matrix, x_vector, b_vector);
00349   Matrix<double> AT  = A.Transpose();
00350   BIASDOUT(BIAS_PMATRIXDEBUG,"AT = "  << AT);
00351   Vector<double> ATB = AT*B;
00352   BIASDOUT(BIAS_PMATRIXDEBUG,"ATB = " << ATB);
00353   Matrix<double> ATA = AT*A;
00354   BIASDOUT(BIAS_PMATRIXDEBUG,"ATA = " << ATA);
00355
00356   Vector<double> X=Lapack_LU_linear_solve(ATA,ATB);
00357   BIASDOUT(BIAS_PMATRIXDEBUG,"Lapack_LU_linear_solve X = " << X);
00358   M2Matrix *= X[0];
00359   BIASDOUT(BIAS_PMATRIXDEBUG,"M2Matrix = " << M2Matrix);
00360
00361   // ho_trivec_outer_product (&epipole2_trivec, b_trivec_ptr, outer_matrix);
00362   Matrix<double> E2(3,1), vMat(1,3);
00363   for (int k=0; k< 3;k++){
00364     E2[k][0]   = Epipole2[k];
00365     vMat[0][k] = X[k+1];
00366     C[k]       = X[k+1];
00367   }
00368   C[3]=1;
00369
00370   Matrix<double> Outer=E2*vMat;
00371   SubMatrix = Outer + M2Matrix;
00372
00373   Vector3<double> Col(P2[0][3], P2[1][3], P2[2][3]);
00374
00375   Magnitude  = Col.NormL2();
00376   DotProduct = Col * Epipole2;
00377
00378   if (DotProduct > 0)
00379     Epipole2 *=  Magnitude;
00380   else
00381     Epipole2 *= -Magnitude;
00382
00383   P2[0][0] = SubMatrix[0][0];
00384   P2[0][1] = SubMatrix[0][1];
00385   P2[0][2] = SubMatrix[0][2];
00386   P2[0][3] = Epipole2[0];
00387   P2[1][0] = SubMatrix[1][0];
00388   P2[1][1] = SubMatrix[1][1];
00389   P2[1][2] = SubMatrix[1][2];
00390   P2[1][3] = Epipole2[1];
00391   P2[2][0] = SubMatrix[2][0];
00392   P2[2][1] = SubMatrix[2][1];
00393   P2[2][2] = SubMatrix[2][2];
00394   P2[2][3] = Epipole2[2];
00395
00396 }
00397
00398
00399
00400
00401
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixEstimation.hh Source File

Geometry

PMatrixEstimation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _PMatrixEstimation_h__
00027 #define _PMatrixEstimation_h__
00028
00029 #include <iostream>
00030 #include <fstream>
00031 #include <string>
00032
00033
00034 // BIAS:
00035 #include "Base/Math/Matrix.hh"
00036 #include "FMatrix.hh"
00037 #include "RMatrix.hh"
00038 #include "Geometry/PMatrix.hh"
00039 #include "MathAlgo/Lapack.hh"
00040
00041
00042 #define BIAS_FMATRIXDEBUG 1 << 0
00043 #define BIAS_PMATRIXDEBUG 1 << 1
00044 #define BIAS_FQuasiEuklid 1 << 2
00045
00046 namespace BIAS{
00047   /** @class PMatrixEstimation
00048       @ingroup g_estimation
00049       @brief compute standard P1/P2 from F.
00050       P1 is set to [  I  | 0 ]. The epipole (determined by from F) tells us
00051       only the direction of C2, so choose a C2 with |C2| = 1
00052       @author frahm, koeser */
00053   class BIASGeometry_EXPORT PMatrixEstimation : public Debug {
00054
00055   public:
00056     /** @brief Standard constructor does nothing */
00057     PMatrixEstimation(){};
00058
00059     /** @brief Standard Destructor does nothing */
00060     ~PMatrixEstimation(){};
00061
00062     /** @brief given an FMatrix set P1 as identity and compute P2 to be
00063         consistent with F and P1 such that P2 is euclidean with nonlinear
00064         estimation.*/
00065     void ComputeFromFQuasiEuklid(BIAS::FMatrix &F, double BaselineMagnitude,
00066                                  BIAS::PMatrix &P1, BIAS::PMatrix &P2);
00067
00068     /** @brief given an FMatrix set P1 as identity and compute P2 to be
00069         consistent with F and P1 such that P2 is euclidean with direct
00070         solution of the problem
00071
00072         @return 0: ok    <0: if epipoles could not be extracted and
00073                          P computation failed  */
00074     int ComputeFromFDirect(BIAS::FMatrix &F, const double& BaselineMagnitude,
00075                            BIAS::PMatrix &P1, BIAS::PMatrix &P2);
00076
00077     static void ComputeRotation(BIAS::FMatrix &F, BIAS::HomgPoint2D &Epipole1,
00078                                 BIAS::HomgPoint2D &Epipole2, BIAS::RMatrix &R);
00079
00080     static void ComputeRotationCenter(BIAS::PMatrix P1, BIAS::PMatrix P2,
00081                                       BIAS::RMatrix &R,
00082                                       BIAS::Vector3<double> &C);
00083
00084   protected:
00085     /** @brief set P1 to identity,
00086         set P2 to identity with last column epipole2 */
00087     void InitP1P2Trans (BIAS::PMatrix &P1, BIAS::PMatrix &P2,
00088                         BIAS::HomgPoint2D &Epipole2);
00089
00090     /** @brief given approximate P2, compute the nearest value of P2 which is
00091         exactly compatible with P1 and F */
00092     void FindClosestP2 (BIAS::FMatrix &F,
00093         //BIAS::PMatrix &P1,
00094         BIAS::PMatrix &P2,
00095         Matrix3x3<double> &M2Matrix,
00096         Vector<double> &C,
00097         HomgPoint2D & Epipole2);
00098
00099
00100   };
00101 }
00102
00103 #endif
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixLinear.cpp Source File

Geometry

PMatrixLinear.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "./PMatrixLinear.hh"
00027 #include "./RMatrix.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 bool  PMatrixLinear::Compute(std::vector<HomgPoint3D> &points3D,
00033                              std::vector<HomgPoint2D> &points2D,
00034                              PMatrix& P)
00035 {
00036   std::vector<HomgPoint3D *> ptrPoints3D;
00037   std::vector<HomgPoint2D *> ptrPoints2D;
00038   ptrPoints3D.resize(points3D.size());
00039   ptrPoints2D.resize(points2D.size());
00040
00041   for (unsigned int i=0;i<points3D.size();i++)
00042     ptrPoints3D[i]=&(points3D[i]);
00043   for (unsigned int i=0;i<points2D.size();i++)
00044     ptrPoints2D[i]=&(points2D[i]);
00045
00046   return Compute(ptrPoints3D,ptrPoints2D,P);
00047 }
00048
00049 bool PMatrixLinear::Compute(std::vector<HomgPoint3D*> &points3D,
00050                             std::vector<HomgPoint2D*> &points2D,
00051                             PMatrix& P){
00052 #ifdef BIAS_DEBUG
00053   if  (points2D.size()<points3D.size()) {
00054     BIASERR("Correspondence lists must have same size.");
00055     BIASABORT;
00056   }
00057   if  (points3D.size() < 6)
00058     BIASERR("For P-Matrix computation at least 6 points are needed. "<<
00059            "Points3D has only "<< points3D.size() << " points.");
00060 #endif
00061
00062
00063   // set up "over-determined" equation system
00064   Matrix<double> A;
00065
00066   // check whether we can set up an equation system A from the 2d-3d corrs
00067   if (!GetPEstSystemHom(A, points3D, points2D)) {
00068     BIASERR("no eq. system!");
00069     return false;
00070   }
00071   BIASDOUT(PMATRIXLINEAR,"A = " << A);
00072
00073   // make A well-conditioned
00074   A.NormalizeRows();
00075   BIASDOUT(PMATRIXLINEAR,"A normalized rows = " << A);
00076
00077   // get an SVD of A, if second smallest singvalue is too small we have no
00078   // unique solution, therefore set a relative threshold !
00079   SVD svd(A, 1e-6);
00080
00081   // since P has 11 degrees of freedom, we need 5.5 independent 2d/3d
00082   // correspondences in order to get a 1-dimensional nullspace, i.e. a
00083   // P != 0 as a solution of AP=0
00084
00085   // For six or more correspondences we need a least squares solution
00086   // with the additional constraint |P|=1
00087   // That is, we pick the last column of V, which refers to the smallest
00088   // singular value of S:
00089   BIAS::Matrix<double> VT = svd.GetVT();
00090   P.SetFromVector( VT.GetRow(11) );
00091
00092 #ifdef BIAS_DEBUG
00093   Vector<double> S;
00094   S = svd.GetS();
00095   BIASDOUT(PMATRIXLINEAR,"Singular values in P-Estimation are "<<S
00096            <<" Rel nullspace dim is "<<svd.RelNullspaceDim()
00097            <<" zero thresh is "<<svd.GetZeroThreshold());
00098 #endif
00099   if (svd.RelNullspaceDim()<=1) {
00100     return true;
00101   } else {
00102     //  BIASERR("Detected degenerate case in linear P estimation");
00103     return false;
00104   }
00105 }
00106
00107
00108 bool PMatrixLinear::GetPEstSystemHom(Matrix<double>& A,
00109                                      std::vector<HomgPoint3D*>& points3D,
00110                                      std::vector<HomgPoint2D*>& points2D) {
00111
00112   if (points3D.size() != points2D.size()){
00113
00114     BIASERR("pointlist2D has different length (=" << points2D.size()
00115            << ") than pointlist3D (=" << points3D.size() <<")");
00116     return false;
00117   }
00118
00119   A.newsize(points3D.size()* 2, 12);
00120
00121   for (unsigned i = 0; i < points3D.size(); i++) {
00122
00123     HomgPoint2D const& u = *points2D[i];
00124     HomgPoint3D const& X = *points3D[i];
00125
00126     unsigned row_index = i * 2;
00127     A[row_index][0] = X[0] * u[2];
00128     A[row_index][1] = X[1] * u[2];
00129     A[row_index][2] = X[2] * u[2];
00130     A[row_index][3] = X[3] * u[2];
00131     A[row_index][4] = 0;
00132     A[row_index][5] = 0;
00133     A[row_index][6] = 0;
00134     A[row_index][7] = 0;
00135     A[row_index][8] = -X[0] * u[0];
00136     A[row_index][9] = -X[1] * u[0];
00137     A[row_index][10] = -X[2] * u[0];
00138     A[row_index][11] = -X[3] * u[0];
00139
00140     row_index = i * 2 + 1;
00141     A[row_index][0] =  0;
00142     A[row_index][1] =  0;
00143     A[row_index][2] =  0;
00144     A[row_index][3] =  0;
00145     A[row_index][4] =  X[0] * u[2];
00146     A[row_index][5] =  X[1] * u[2];
00147     A[row_index][6] =  X[2] * u[2];
00148     A[row_index][7] =  X[3] * u[2];
00149     A[row_index][8] = -X[0] * u[1];
00150     A[row_index][9] = -X[1] * u[1];
00151     A[row_index][10] = -X[2] * u[1];
00152     A[row_index][11] = -X[3] * u[1];
00153   }
00154
00155   return true;
00156
00157 }
00158
00159
00160 bool PMatrixLinear::GetPEstSystemInHom(Matrix<double>& A, Vector<double>& b,
00161                                        std::vector<HomgPoint3D*>& points3D,
00162                                        std::vector<HomgPoint2D*>& points2D) {
00163
00164   if (points3D.size() != points2D.size()){
00165
00166     BIASERR("pointlist2D has different length (=" << points2D.size()
00167             << ") than pointlist3D (=" << points3D.size() <<")");
00168     return false;
00169   }
00170
00171   A.newsize(points3D.size()*2, 11);
00172   b.newsize(points3D.size()*2);
00173
00174   for (unsigned i = 0; i < points3D.size(); i++) {
00175
00176     HomgPoint2D const& u = *points2D[i];
00177     HomgPoint3D const& X = *points3D[i];
00178
00179     unsigned row_index = i * 2;
00180     A[row_index][0] = X[0] * u[2];
00181     A[row_index][1] = X[1] * u[2];
00182     A[row_index][2] = X[2] * u[2];
00183     A[row_index][3] = X[3] * u[2];
00184     A[row_index][4] = 0;
00185     A[row_index][5] = 0;
00186     A[row_index][6] = 0;
00187     A[row_index][7] = 0;
00188     A[row_index][8] = -X[0] * u[0];
00189     A[row_index][9] = -X[1] * u[0];
00190     A[row_index][10] = -X[2] * u[0];
00191     b[row_index] = X[3] * u[0];
00192
00193     row_index = i * 2 + 1;
00194     A[row_index][0] =  0;
00195     A[row_index][1] =  0;
00196     A[row_index][2] =  0;
00197     A[row_index][3] =  0;
00198     A[row_index][4] =  X[0] * u[2];
00199     A[row_index][5] =  X[1] * u[2];
00200     A[row_index][6] =  X[2] * u[2];
00201     A[row_index][7] =  X[3] * u[2];
00202     A[row_index][8] = -X[0] * u[1];
00203     A[row_index][9] = -X[1] * u[1];
00204     A[row_index][10] = -X[2] * u[1];
00205     b[row_index] = X[3] * u[1];
00206   }
00207
00208   return true;
00209
00210 }
00211
00212 bool PMatrixLinear::ComputeCalibrated(const vector<HomgPoint3D*> &points3D,
00213                                       const vector<HomgPoint2D*> &points2D,
00214                                       PMatrix& Pose) {
00215
00216   BIASASSERT(points2D.size()>5);
00217   BIASASSERT(points3D.size()==points2D.size());
00218 #ifdef BIAS_DEBUG
00219   for (unsigned int i=0;i<points3D.size(); i++) {
00220     if (!points3D[i]->IsHomogenized()) {
00221       BIASERR("Unhomogenized point !"<< *points3D[i]);
00222       BIASABORT;
00223     }
00224     if (!points2D[i]->IsHomogenized()) {
00225       BIASERR("Unhomogenized point !"<< *points2D[i]);
00226       BIASABORT;
00227     }
00228   }
00229 #endif
00230
00231   // set up model model matrix, 9 colums to estimate the 9 entries of R
00232   // for each pair of the n points contruct a line, and get one
00233   // linear constraint on R. with 5 points, we have 10 constraints
00234   Matrix<double> ModelMatrix(points2D.size()*(points2D.size()-1)/2,9);
00235
00236   unsigned int countrow=0;
00237   Vector3<double> B;
00238   Matrix3x3<double> C;
00239   for (unsigned int i=0; i<points2D.size(); i++) {
00240     Matrix3x3<double> CrossProd(points2D[i]->GetSkewSymmetricMatrix());
00241     for (unsigned int k=i+1; k<points2D.size(); k++) {
00242       // pick two points (k and i), construct 3D line B:
00243       B.Set((*points3D[k])[0]- (*points3D[i])[0],
00244             (*points3D[k])[1]- (*points3D[i])[1],
00245             (*points3D[k])[2]- (*points3D[i])[2]);
00246       // compute outer product matrix C of 3D line and image line
00247       B.OuterProduct(CrossProd * *points2D[k], C);
00248
00249       // the image line through the 2D points, viewed in 3D space and rotated
00250       // by the desired rotation matrix must be coplanar to the plane
00251       // defined by the two points and the camera center
00252
00253       // copy from cross product matrix into model matrix:
00254       register double *pMM = ModelMatrix.GetDataArray()[countrow++];
00255       register double *pC  = C.GetData();
00256       for (register unsigned int d=0; d<9; d++) *pMM++ = *pC++;
00257     }
00258   }
00259   SVD svd(ModelMatrix);
00260
00261   // we estimated a projective entity lambda*R, however, the nullspace
00262   // must not have dimension>1, because this means an ambiguity
00263   if (svd.RelNullspaceDim()>1) {
00264     Vector<double> S=svd.GetS();
00265     BIASDOUT(PMATRIXLINEAR,
00266              "Detected degenerate case in linear Rotation estimation."
00267             <<"Dim of Nullspace is "<<svd.RelNullspaceDim()
00268             <<" with sing values: "<<S);
00269     return false;
00270   }
00271
00272   // ignore null threshold smallest on singular value, get nullvector:
00273   Vector<double> RVector(svd.GetVT().GetRow(8));
00274
00275   // compose rmatrix from rvector
00276   // we have to scale R, so that it comes close to a rotation
00277   RMatrix R;
00278
00279   // first row should have length 1:
00280   //const double scale = 1.0 /
00281   //  sqrt(RVector[0]*RVector[0]+RVector[1]*RVector[1]+RVector[2]*RVector[2]);
00282   //ROTATION_MATRIX_TYPE* pR = R.GetData();
00283   //for (unsigned int j=0; j<9; j++) *pR++ = RVector[j]*scale;
00284
00285   ROTATION_MATRIX_TYPE* pR = R.GetData();
00286   for (unsigned int j=0; j<9; j++) *pR++ = RVector[j];
00287   SVD svdR(R);
00288   R = svdR.GetU() * svdR.GetVT();
00289
00290   // enforce right-handed rotation
00291   if (R.det()<0.0) R *= -1.0;
00292
00293   // BIASWARN("using ground truth rotation");
00294   // R = Pose.GetR();
00295
00296   // here we have something close to a rotation, trust this and compute C
00297   // set up DLT equation system where only C is estimated
00298   // start with R*x ~= [  I  |-C]X, rearrange and solve M * CVector = 0
00299   Matrix<double> M(points3D.size()*3,4);
00300   register unsigned int CurRowInM = 0;
00301   for (unsigned int i=0; i<points3D.size(); i++) {
00302     Vector3<double> Rx = R * *(points2D[i]);
00303     Matrix<double> Rx_cross = Rx.GetSkewSymmetricMatrix();
00304     for (unsigned int r=0; r<3; r++) {
00305       M[CurRowInM][0] = Rx_cross[r][0];
00306       M[CurRowInM][1] = Rx_cross[r][1];
00307       M[CurRowInM][2] = Rx_cross[r][2];
00308       Vector3<double> X((*points3D[i])[0],(*points3D[i])[1],(*points3D[i])[2]);
00309       X = Rx_cross * X;
00310       M[CurRowInM++][3] = -X[r];
00311     }
00312   }
00313   M.NormalizeRows();
00314   SVD svdC(M);
00315
00316   // check for ambiguity (multi-dim. nullspace), which we cant decide
00317   if (svdC.RelNullspaceDim()>1) {
00318     Vector<double> c = svdC.GetS();
00319     BIASDOUT(PMATRIXLINEAR,
00320              "Detected degenerate case in linear center estimation."
00321             <<"Dim of Nullspace is "<<svdC.RelNullspaceDim()
00322             <<" with sing values: "<<c);
00323     return false;
00324   }
00325   // pick null vector of smallest sing value (ignore threshold)
00326   HomgPoint3D CVector(svdC.GetVT().GetRow(3));
00327
00328   // compute center by homogenizing
00329   Vector3<double> Center(CVector[0]/CVector[3], CVector[1]/CVector[3],
00330                          CVector[2]/CVector[3]);
00331
00332   KMatrix K;
00333   K.SetIdentity();
00334   Pose.Compose(K, R, Center);
00335   return true;
00336 }
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/PMatrixLinear.hh Source File

Geometry

PMatrixLinear.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef PMatrixLinear_hh_
00027 #define PMatrixLinear_hh_
00028 #include <Base/Common/BIASpragmaStart.hh>
00029 #include <vector>
00030
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Geometry/HomgPoint3D.hh>
00033 #include <Base/Geometry/HomgPoint2D.hh>
00034 #include <MathAlgo/SVD.hh>
00035 #include "PMatrix.hh"
00036
00037 #define PMATRIXLINEAR 1<<0
00038
00039 namespace BIAS {
00040   /** @class PMatrixLinear
00041       @ingroup g_estimation
00042       @brief This class computes a PMatrix from 2D/3D correspondences with
00043       linear methods.
00044
00045       No nonlinear constraints are enforced: If you have noisy points, you
00046       may get inexact rotations or non-metric PMatrices, although you
00047       compute in a metric framework. however, this class provides
00048       functions which can also be applied in projectively skewed space.
00049       @author koeser/frahm
00050   */
00051
00052   class BIASGeometry_EXPORT PMatrixLinear : public Debug {
00053
00054   public:
00055
00056     PMatrixLinear(){};
00057     /** @brief computes a least squares solution P via SVD, if at least 6 2d-3d
00058         correspondences (pointers) are provided in points3D and points2D.
00059
00060         @attention P may not exactly be decomposable due to noise in points
00061         @param points3D 3D points which project to points2D
00062         @param points2D 2D projections of points3D, any K allowed !
00063         @param P resulting (not always metric) PMatrix
00064         @return false on ambiguity, true on success */
00065     bool Compute(std::vector<HomgPoint3D*> &points3D,
00066                  std::vector<HomgPoint2D*> &points2D,
00067                  PMatrix& P);
00068
00069     /** @brief computes a least squares solution P via SVD, if at least 6 2d-3d
00070         correspondences are provided in points3D and points2D
00071
00072         Algorithm used is DLT. Fails if points3D are coplanar.
00073         @attention P may not exactly be decomposable due to noise in points
00074         @param points3D 3D points which project to points2D
00075         @param points2D 2D projections of points3D, any K allowed !
00076         @param P resulting (not always metric) PMatrix
00077         @return false on ambiguity, true on success */
00078     bool Compute(std::vector<HomgPoint3D> &points3D,
00079                  std::vector<HomgPoint2D> &points2D,
00080                  PMatrix& P);
00081
00082     /** @brief given n>=6 2D/3D correspondences, compute approximate R and C
00083         using linear methods (thats why we need 6, not 3 correspondences !)
00084
00085         The lines of each two 3D points and their projections into the image
00086         are used to determine the rotation of P. For n points, we have
00087         n(n-1)/2 lines (quadratic in n!) and also linear equations,
00088         dont pass too many points if you are interested in performance ! After
00089         R is determined, C is computed separately using linear methods (DLT)
00090         starting from the equation Rx ~= [  I  |-C] X
00091         Algorithm fails if points3D are coplanar
00092         @attention R is no real rotation, enforce afterwards, if you want that!
00093         @param points3D 3D points which project to points2D
00094         @param points2D 2D projections of points3D, K=Identity required !
00095         @param Pose result R^T*[  I  |-C]
00096         @return true on success, false on error (ambiguity)
00097         @author koeser 10/2004 */
00098     bool ComputeCalibrated(const std::vector<HomgPoint3D*> &points3D,
00099                            const std::vector<HomgPoint2D*> &points2D,
00100                            PMatrix& Pose);
00101
00102
00103     /** @brief sets up the homogeneous equation system A for pmatrix
00104         computation using the 2d/3d correspondences provided
00105         @author frahm */
00106     bool GetPEstSystemHom(Matrix<double>& A,
00107                           std::vector<HomgPoint3D*>& points3D,
00108                           std::vector<HomgPoint2D*>& points2D);
00109
00110     /** @brief sets up an inhomogeneous equation system A for pmatrix
00111         computation using the 2d/3d correspondences provided
00112         @author frahm */
00113     bool GetPEstSystemInHom(Matrix<double>& A, Vector<double>& b,
00114                             std::vector<HomgPoint3D*>& points3D,
00115                             std::vector<HomgPoint2D*>& points2D);
00116
00117
00118   };
00119 }
00120
00121 #include <Base/Common/BIASpragmaEnd.hh>
00122
00123 #endif
00124
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Examples/PMatrixTest.cpp Source File

Geometry » Examples

PMatrixTest.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "../FMatrix.hh"
00027 #include "../FMatrixEstimation.hh"
00028 #include "../PMatrixEstimation.hh"
00029 #include "../PMatrixLinear.hh"
00030 #include "../Triangulation.hh"
00031 #include "../../Base/Math/Random.hh"
00032
00033
00034
00035 #define FMATRIX_FILENAME_SUFFIX ".FMatrix"
00036 #define CORRESPONDENCE_FILENAME_SUFFIX ".corresp"
00037
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042 // ---------------------------------------------------------------------------
00043 //int main(int argc, char *argv[])
00044 int main()
00045 {
00046   BIAS::FMatrix F;
00047   BIAS::PMatrix TheoP1,TheoP2;
00048   BIAS::Random Randomizer;
00049   double rangle = 0;
00050   for (unsigned int i=0; i<2; i++) {
00051
00052     Vector3<double> RAxis(Randomizer.GetUniformDistributed(-1.0, 1.0),
00053                           Randomizer.GetUniformDistributed(-1.0, 1.0),
00054                           Randomizer.GetUniformDistributed(-1.0, 1.0));
00055     RAxis.Normalize();
00056     rangle = Randomizer.GetUniformDistributed(-M_PI, M_PI);
00057
00058     Vector3<double> C(Randomizer.GetUniformDistributed(-20, 20),
00059                       Randomizer.GetUniformDistributed(-20, 20),
00060                       Randomizer.GetUniformDistributed(-20, 20));
00061
00062     RMatrix R(RAxis, rangle);
00063
00064     if (R[2][2] < 0.0) {
00065       for (unsigned int y=0;y<3;y++) {
00066         R[1][y] *= -1.0;
00067         R[2][y] *= -1.0;
00068       }
00069     }
00070
00071
00072     // check if opt axes "meet" in front of cams
00073     if (C[0] * R[0][2] >0.0) C[0] *= -1.0;
00074     if (C[1] * R[1][2] >0.0) C[1] *= -1.0;
00075     C.Normalize();
00076
00077     KMatrix K;
00078     K.SetIdentity();
00079     // K[0][0] = Randomizer.GetUniformDistributed(100,1000);
00080     //K[1][1] = Randomizer.GetNormalDistributed(K[0][0], 0.1*K[0][0]);
00081
00082
00083
00084     PMatrix TheoP2(K,R,C);
00085
00086     // generate P1 as identity matrix
00087     TheoP1.set_identity();
00088     TheoP1 = K * TheoP1;
00089
00090     FMatrix F(TheoP1, TheoP2);
00091
00092     HomgPoint2D epi1, epi2;
00093     F.GetEpipolesHomogenized(epi1, epi2);
00094     cout <<"epipoles are "<<epi1<<" and "<<epi2 <<endl;
00095
00096     HomgPoint3D VC1, VC2;
00097     TheoP1.GetC(VC1);
00098     TheoP2.GetC(VC2);
00099     epi1 = TheoP1 * VC2; epi1.Homogenize();
00100     epi2 = TheoP2 * VC1; epi2.Homogenize();
00101     cout <<"validated epipoles are "<<epi1<<" and "<<epi2 <<endl;
00102
00103
00104
00105
00106     //F = epi1.GetSkewSymmetricMatrix() * epi2.GetSkewSymmetricMatrix();
00107     //cout <<"epipoles are now "<<epi1<<" and "<<epi2 <<endl;
00108
00109
00110     // P matrix computation
00111     BIAS::PMatrix P1,P2;
00112
00113     BIAS::PMatrixEstimation PEst;
00114     //PEst.SetDebugLevel(BIAS_FQuasiEuklid|BIAS_FMATRIXDEBUG|BIAS_PMATRIXDEBUG);
00115     double BaselineMagnitude = (i==0)?1:-1;
00116
00117     PEst.ComputeFromFQuasiEuklid(F, BaselineMagnitude,P1,P2);
00118     P2.Normalize();
00119     cout << " TheoP2 = " << TheoP2 << endl;
00120     //cout << "QuasiEu.  P2 = " << P2 << endl;
00121     //cout << "Diff is "<< P2-TheoP2<<endl;
00122
00123     FMatrix FCheck(P1,P2);
00124     FCheck.GetEpipolesHomogenized(epi1, epi2);
00125     //cout <<"computed epipoles are "<<epi1<<" and "<<epi2 <<endl;
00126
00127
00128     PEst.ComputeFromFDirect(F, BaselineMagnitude,P1,P2);
00129     P2.Normalize();
00130     cout << "Direct   P2 = " << P2 << endl;
00131     //cout << "Diff is "<< P2-TheoP2<<endl;
00132     FCheck.ComputeFromPMatrices(P1,P2);
00133     FCheck.GetEpipolesHomogenized(epi1, epi2);
00134     cout <<"computed epipoles are "<<epi1<<" and "<<epi2 <<endl<<endl<<endl;
00135
00136   }
00137   return 0;
00138 }
Generated on Wed Jun 21 19:01:00 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/PMDImageIO.cpp Source File

Base » Image

PMDImageIO.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "PMDImageIO.hh"
00026
00027 #include <stdio.h>
00028 #include <math.h>
00029 #include <iostream>
00030
00031 using namespace std;
00032 using namespace BIAS;
00033
00034 #ifndef BIASERR
00035
00036 #ifdef WIN32
00037 #  define FUNCNAME  __FUNCTION__
00038 #else // WIN32
00039 #  define FUNCNAME  __PRETTY_FUNCTION__
00040 #endif // WIN32
00041
00042 #  define BIASERR(arg) { \
00043   cerr<<std::flush<<"Error in "<<__FILE__<<":"<<__LINE__<<" : "<<FUNCNAME<<std::endl \
00044   <<"\t"<<arg<<std::endl<<std::flush; \
00045 }
00046
00047 #endif
00048
00049 int PMDImageIO::Write2DImage8Bit_(TIFF *tiffimage, uint8* Img2D,
00050                                   PMDImageMetaData MetaData2D,
00051                                   int LinesPerStrip) {
00052
00053   TIFFSetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, "2D-Image");
00054   // We need to set some values for basic tags before we can add any data
00055   TIFFSetField(tiffimage, TIFFTAG_IMAGEWIDTH, MetaData2D.width);
00056   TIFFSetField(tiffimage, TIFFTAG_IMAGELENGTH, MetaData2D.height);
00057   TIFFSetField(tiffimage, TIFFTAG_BITSPERSAMPLE, 8);
00058   TIFFSetField(tiffimage, TIFFTAG_SAMPLESPERPIXEL, MetaData2D.channels);
00059   TIFFSetField(tiffimage, TIFFTAG_ROWSPERSTRIP, LinesPerStrip);
00060   //TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
00061   TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
00062   if (MetaData2D.channels==3) {
00063     TIFFSetField(tiffimage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
00064   } else {
00065     TIFFSetField(tiffimage, PHOTOMETRIC_MINISBLACK, PHOTOMETRIC_RGB);
00066   }
00067   //TIFFSetField(tiffimage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
00068   TIFFSetField(tiffimage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
00069
00070   WriteMetaData_(tiffimage, MetaData2D);
00071
00072   // Write the information to the file
00073   unsigned char* ipt = Img2D;
00074
00075   for (unsigned int i=0;
00076        i< ceil((double)MetaData2D.height/(double)LinesPerStrip); i++) {
00077     int bytecount = MetaData2D.width*LinesPerStrip*MetaData2D.channels;
00078     if ((i+1)*LinesPerStrip>MetaData2D.height) {
00079       bytecount = (MetaData2D.height-i*LinesPerStrip)*
00080         MetaData2D.width*MetaData2D.channels;
00081     }
00082     TIFFWriteEncodedStrip(tiffimage, i, ipt, bytecount);
00083     ipt+=MetaData2D.width*LinesPerStrip*MetaData2D.channels;
00084   }
00085   return 0;
00086 }
00087
00088
00089 int PMDImageIO::Write2DImage16Bit_(TIFF *tiffimage, uint16* Img2D,
00090                                    PMDImageMetaData MetaData2D,
00091                                    int LinesPerStrip) {
00092
00093   TIFFSetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, "2D-Image");
00094   // We need to set some values for basic tags before we can add any data
00095   TIFFSetField(tiffimage, TIFFTAG_IMAGEWIDTH, MetaData2D.width);
00096   TIFFSetField(tiffimage, TIFFTAG_IMAGELENGTH, MetaData2D.height);
00097   TIFFSetField(tiffimage, TIFFTAG_BITSPERSAMPLE, 16);
00098   TIFFSetField(tiffimage, TIFFTAG_SAMPLESPERPIXEL, MetaData2D.channels);
00099   TIFFSetField(tiffimage, TIFFTAG_ROWSPERSTRIP, LinesPerStrip);
00100   //TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
00101   TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
00102   if (MetaData2D.channels==3) {
00103     TIFFSetField(tiffimage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
00104   } else {
00105     TIFFSetField(tiffimage, PHOTOMETRIC_MINISBLACK, PHOTOMETRIC_RGB);
00106   }
00107   //TIFFSetField(tiffimage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
00108   TIFFSetField(tiffimage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
00109
00110   WriteMetaData_(tiffimage, MetaData2D);
00111
00112   // Write the information to the file
00113   unsigned char* ipt = (unsigned char*) Img2D;
00114
00115   for (unsigned int i=0;
00116        i< ceil((double)MetaData2D.height/(double)LinesPerStrip); i++) {
00117     int bytecount = MetaData2D.width*LinesPerStrip*MetaData2D.channels*2;
00118     if ((i+1)*LinesPerStrip>MetaData2D.height) {
00119       bytecount = (MetaData2D.height-i*LinesPerStrip)*
00120         MetaData2D.width*MetaData2D.channels*2;
00121     }
00122     TIFFWriteEncodedStrip(tiffimage, i, ipt, bytecount);
00123     ipt+=MetaData2D.width*LinesPerStrip*MetaData2D.channels*2;
00124   }
00125   return 0;
00126 }
00127
00128
00129 int PMDImageIO::WriteDepthImage_(TIFF *tiffimage, uint16* ImgDepth,
00130                                  PMDImageMetaData MetaDataDepth,
00131                                  int LinesPerStrip) {
00132
00133   TIFFSetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, "Depth-Image");
00134   // We need to set some values for basic tags before we can add any data
00135   TIFFSetField(tiffimage, TIFFTAG_IMAGEWIDTH, MetaDataDepth.width);
00136   TIFFSetField(tiffimage, TIFFTAG_IMAGELENGTH, MetaDataDepth.height);
00137   TIFFSetField(tiffimage, TIFFTAG_BITSPERSAMPLE, 16);
00138   TIFFSetField(tiffimage, TIFFTAG_SAMPLESPERPIXEL, 1);
00139   TIFFSetField(tiffimage, TIFFTAG_ROWSPERSTRIP, LinesPerStrip);
00140   //TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
00141   TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
00142   TIFFSetField(tiffimage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
00143   //TIFFSetField(tiffimage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
00144   TIFFSetField(tiffimage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
00145
00146   WriteMetaData_(tiffimage, MetaDataDepth);
00147
00148   // Write the information to the file
00149   unsigned char* ipt = (unsigned char*) ImgDepth;
00150   for (unsigned int i=0;
00151        i< ceil((double)MetaDataDepth.height/(double)LinesPerStrip); i++) {
00152     int bytecount = MetaDataDepth.width*LinesPerStrip*
00153       MetaDataDepth.channels*2;
00154     if ((i+1)*LinesPerStrip>MetaDataDepth.height) {
00155       bytecount = (MetaDataDepth.height-i*LinesPerStrip)*
00156         MetaDataDepth.width*MetaDataDepth.channels*2;
00157     }
00158     TIFFWriteEncodedStrip(tiffimage, i, ipt, bytecount);
00159     ipt+=MetaDataDepth.width*LinesPerStrip*
00160       MetaDataDepth.channels*2;
00161   }
00162   return 0;
00163 }
00164
00165
00166 int PMDImageIO::WriteModCoeffImage_(TIFF *tiffimage, uint16* ImgModCoeff,
00167                                     PMDImageMetaData MetaDataDepth,
00168                                     int LinesPerStrip) {
00169
00170   TIFFSetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION,
00171                "Modulation-Coefficients");
00172   // We need to set some values for basic tags before we can add any data
00173   TIFFSetField(tiffimage, TIFFTAG_IMAGEWIDTH, MetaDataDepth.width);
00174   TIFFSetField(tiffimage, TIFFTAG_IMAGELENGTH, MetaDataDepth.height);
00175   TIFFSetField(tiffimage, TIFFTAG_BITSPERSAMPLE, 16);
00176   TIFFSetField(tiffimage, TIFFTAG_SAMPLESPERPIXEL, 1);
00177   TIFFSetField(tiffimage, TIFFTAG_ROWSPERSTRIP, LinesPerStrip);
00178   //TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
00179   TIFFSetField(tiffimage, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
00180   TIFFSetField(tiffimage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
00181   //TIFFSetField(tiffimage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
00182   TIFFSetField(tiffimage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
00183
00184   // The metadata of the modulatioin coefficient is the same as for
00185   // the depth image
00186   WriteMetaData_(tiffimage, MetaDataDepth);
00187
00188   // Write the information to the file
00189   unsigned char* ipt = (unsigned char*) ImgModCoeff;
00190   for (unsigned int i=0;
00191        i< ceil((double)MetaDataDepth.height/(double)LinesPerStrip); i++) {
00192     int bytecount = MetaDataDepth.width*LinesPerStrip*
00193       MetaDataDepth.channels*2;
00194     if ((i+1)*LinesPerStrip>MetaDataDepth.height) {
00195       bytecount = (MetaDataDepth.height-i*LinesPerStrip)*
00196         MetaDataDepth.width*MetaDataDepth.channels*2;
00197     }
00198     TIFFWriteEncodedStrip(tiffimage, i, ipt, bytecount);
00199     ipt+=MetaDataDepth.width*LinesPerStrip*
00200       MetaDataDepth.channels*2;
00201   }
00202   return 0;
00203 }
00204
00205
00206 int PMDImageIO::Write(const std::string& FileName,
00207                       uint8* Img2D, uint16* ImgDepth,
00208                       uint16* ImgModCoeff,
00209                       const PMDImageMetaData &MetaData2D,
00210                       const PMDImageMetaData &MetaDataDepth) {
00211
00212   // Open the TIFF file
00213   TIFF *tiffimage;
00214   int LinesPerStrip=10;
00215
00216   /* Set up the callback */
00217   NewTagsInitialize_();
00218
00219   if((tiffimage = TIFFOpen(FileName.c_str(), "w")) == NULL){
00220     BIASERR("Could not open image for writing:" << FileName);
00221     return -1;
00222   }
00223
00224   // Write the rgb or grey image
00225   if (Img2D!=NULL) {
00226     Write2DImage8Bit_(tiffimage, Img2D, MetaData2D, LinesPerStrip);
00227   }
00228
00229   // Write the depth image
00230   if (ImgDepth!=NULL) {
00231     if (Img2D!=NULL) TIFFWriteDirectory(tiffimage);
00232     WriteDepthImage_(tiffimage, ImgDepth, MetaDataDepth, LinesPerStrip);
00233   }
00234
00235   // Write the modulation coefficients
00236   // No modulation coefficients without a depth image
00237   if (ImgDepth!=NULL && ImgModCoeff!=NULL) {
00238
00239     TIFFWriteDirectory(tiffimage);
00240     WriteModCoeffImage_(tiffimage, ImgModCoeff, MetaDataDepth, LinesPerStrip);
00241   }
00242
00243   // Close the file
00244   TIFFClose(tiffimage);
00245   return 0;
00246 }
00247
00248
00249 // Read the rgb or grey image -----------------
00250 int PMDImageIO::Read2DImage8Bit_(TIFF *tiffimage,
00251                                  uint8* &Img2D,
00252                                  PMDImageMetaData &MetaData2D) {
00253
00254   uint16 bps, photo;
00255
00256   if((TIFFGetField(tiffimage, TIFFTAG_BITSPERSAMPLE, &bps) == 0) ||
00257      (bps != 8)){
00258     BIASERR("Bits per Sample != 8!");
00259     return -1;
00260   }
00261
00262   if(TIFFGetField(tiffimage, TIFFTAG_PHOTOMETRIC, &photo) == 0 ||
00263      (photo != PHOTOMETRIC_RGB && photo != PHOTOMETRIC_MINISBLACK)){
00264     BIASERR("Image has the wrong photometric interpretation!");
00265     return -1;
00266   }
00267
00268   ReadMetaData_(tiffimage, MetaData2D);
00269
00270   if ((MetaData2D.channels!=3) && (MetaData2D.channels!=1)) {
00271     BIASERR("Wrong number of channels in 2D image!");
00272     return -1;
00273   }
00274
00275   // Read in the possibly multiple strips
00276   tsize_t stripSize = TIFFStripSize (tiffimage);
00277   int stripMax = TIFFNumberOfStrips (tiffimage);
00278
00279   unsigned char *ipt = new unsigned char[MetaData2D.height*
00280                                          MetaData2D.width*
00281                                          MetaData2D.channels];
00282   Img2D = ipt;
00283
00284   for (int i = 0; i < stripMax; i++){
00285     if (i==stripMax-1) {
00286       stripSize = MetaData2D.height*MetaData2D.width*
00287         MetaData2D.channels-i*stripSize;
00288     }
00289     if(TIFFReadEncodedStrip(tiffimage, i, ipt, stripSize)<0){
00290       BIASERR("Read error on input strip number "<< i);
00291       return -1;
00292     }
00293     ipt += stripSize;
00294   }
00295   return 0;
00296 }
00297
00298
00299   // Read the rgb or grey image -----------------
00300 int PMDImageIO::Read2DImage16Bit_(TIFF *tiffimage,
00301                                   uint16* &Img2D,
00302                                   PMDImageMetaData &MetaData2D){
00303
00304   uint16 bps, photo;
00305
00306   if((TIFFGetField(tiffimage, TIFFTAG_BITSPERSAMPLE, &bps) == 0) ||
00307      (bps != 16)){
00308     BIASERR("Bits per Sample != 16!");
00309     return -1;
00310   }
00311
00312   if(TIFFGetField(tiffimage, TIFFTAG_PHOTOMETRIC, &photo) == 0 ||
00313      (photo != PHOTOMETRIC_RGB && photo != PHOTOMETRIC_MINISBLACK)){
00314     BIASERR("Image has the wrong photometric interpretation!");
00315     return -1;
00316   }
00317
00318   ReadMetaData_(tiffimage, MetaData2D);
00319
00320   if ((MetaData2D.channels!=3) && (MetaData2D.channels!=1)) {
00321     BIASERR("Wrong number of channels in 2D image!");
00322     return -1;
00323   }
00324
00325   // Read in the possibly multiple strips
00326   tsize_t stripSize = TIFFStripSize (tiffimage);
00327   int stripMax = TIFFNumberOfStrips (tiffimage);
00328
00329   unsigned char *ipt = new unsigned char[MetaData2D.height*
00330                                          MetaData2D.width*
00331                                          MetaData2D.channels*2];
00332   Img2D = (uint16*)ipt;
00333
00334   for (int i = 0; i < stripMax; i++){
00335     if (i==stripMax-1) {
00336       stripSize = MetaData2D.height*MetaData2D.width*
00337         MetaData2D.channels-i*stripSize;
00338     }
00339     if(TIFFReadEncodedStrip(tiffimage, i, ipt, stripSize)<0){
00340       BIASERR("Read error on input strip number "<< i);
00341       return -1;
00342     }
00343     ipt += stripSize;
00344   }
00345   return 0;
00346 }
00347
00348 // Read the depth-image
00349 int PMDImageIO::ReadDepthImage_(TIFF *tiffimage,
00350                                 uint16* &ImgDepth,
00351                                 PMDImageMetaData &MetaDataDepth) {
00352
00353   uint16 dbps, dphoto;
00354
00355   if((TIFFGetField(tiffimage, TIFFTAG_BITSPERSAMPLE, &dbps) == 0) ||
00356      (dbps != 16)){
00357     BIASERR("Bits per Sample != 16!");
00358     return -1;
00359   }
00360
00361   if(TIFFGetField(tiffimage, TIFFTAG_PHOTOMETRIC, &dphoto) == 0 ||
00362      (dphoto != PHOTOMETRIC_MINISBLACK)){
00363     BIASERR("Depth Image has the wrong photometric interpretation!");
00364     return -1;
00365   }
00366
00367   ReadMetaData_(tiffimage, MetaDataDepth);
00368
00369   if (MetaDataDepth.channels!=1) {
00370     BIASERR("Wrong number of channels in Depth image!");
00371     return -1;
00372   }
00373
00374   // Read in the possibly multiple strips
00375   tsize_t stripSize = TIFFStripSize (tiffimage);
00376   int stripMax = TIFFNumberOfStrips (tiffimage);
00377
00378   unsigned char* ipt = new unsigned char[MetaDataDepth.height*
00379                                          MetaDataDepth.width*
00380                                          MetaDataDepth.channels*2];
00381   ImgDepth = (uint16*)ipt;
00382   for (int i = 0; i < stripMax; i++){
00383     if (i==stripMax-1) {
00384       stripSize = MetaDataDepth.height*MetaDataDepth.width*
00385         MetaDataDepth.channels*2-i*stripSize;
00386     }
00387     if(TIFFReadEncodedStrip(tiffimage, i, ipt, stripSize)<0){
00388       BIASERR("Read error on input strip number "<< i);
00389       return -1;
00390     }
00391     ipt += stripSize;
00392   }
00393   return 0;
00394 }
00395
00396 // Read the Modulation-Coefficients
00397 int PMDImageIO::ReadModCoeffImage_(TIFF *tiffimage,
00398                                    uint16* &ImgModCoeff,
00399                                    PMDImageMetaData MetaDataDepth) {
00400
00401   uint16 dbps, dphoto;
00402
00403   if((TIFFGetField(tiffimage, TIFFTAG_BITSPERSAMPLE, &dbps) == 0) ||
00404      (dbps != 16)){
00405     BIASERR("Bits per Sample != 16!");
00406     return -1;
00407   }
00408
00409   if(TIFFGetField(tiffimage, TIFFTAG_PHOTOMETRIC, &dphoto) == 0 ||
00410      (dphoto != PHOTOMETRIC_MINISBLACK)){
00411     BIASERR("Modulation Coefficients have the wrong photometric"
00412             << "interpretation!");
00413     return -1;
00414   }
00415
00416   ReadMetaData_(tiffimage, MetaDataDepth);
00417
00418   if (MetaDataDepth.channels!=1) {
00419     BIASERR("Wrong number of channels in Modulation Coefficients image!");
00420     return -1;
00421   }
00422
00423   // Read in the possibly multiple strips
00424   tsize_t stripSize = TIFFStripSize (tiffimage);
00425   int stripMax = TIFFNumberOfStrips (tiffimage);
00426
00427   unsigned char* ipt = new unsigned char[MetaDataDepth.height*
00428                                          MetaDataDepth.width*
00429                                          MetaDataDepth.channels*2];
00430   ImgModCoeff = (uint16*)ipt;
00431   for (int i = 0; i < stripMax; i++){
00432     if (i==stripMax-1) {
00433       stripSize = MetaDataDepth.height*MetaDataDepth.width*
00434         MetaDataDepth.channels*2-i*stripSize;
00435     }
00436     if(TIFFReadEncodedStrip(tiffimage, i, ipt, stripSize)<0){
00437       BIASERR("Read error on input strip number "<< i);
00438       return -1;
00439     }
00440     ipt += stripSize;
00441   }
00442   return 0;
00443 }
00444
00445
00446 int PMDImageIO::Read(const std::string& FileName,
00447                      uint16* &Img2D, uint16* &ImgDepth,
00448                      uint16* &ImgModCoeff,
00449                      PMDImageMetaData &MetaData2D,
00450                      PMDImageMetaData &MetaDataDepth){
00451   // reset image pointer
00452   Img2D=NULL;
00453   ImgDepth=NULL;
00454   ImgModCoeff=NULL;
00455
00456   // Open the TIFF file
00457   TIFF *tiffimage;
00458
00459   /* Set up the callback */
00460   NewTagsInitialize_();
00461
00462   if((tiffimage = TIFFOpen(FileName.c_str(), "r")) == NULL){
00463     BIASERR("Could not open image for reading:" << FileName);
00464     return -1;
00465   }
00466
00467   do {
00468     char* descr;
00469     if (TIFFGetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, &descr) == 0) {
00470       BIASERR("Image description is missing!");
00471       return -1;
00472     }
00473
00474     if(strcmp(descr, "2D-Image") == 0) {
00475       if (Read2DImage16Bit_(tiffimage, Img2D, MetaData2D)<0)
00476         return -1;
00477     }
00478
00479     if(strcmp(descr, "Depth-Image") == 0) {
00480       if (ReadDepthImage_(tiffimage, ImgDepth, MetaDataDepth)<0)
00481           return -2;
00482     }
00483
00484     if(strcmp(descr, "Modulation-Coefficients") == 0) {
00485       if (ReadModCoeffImage_(tiffimage, ImgModCoeff, MetaDataDepth)<0)
00486         return -3;
00487     }
00488
00489   } while (TIFFReadDirectory(tiffimage)!=0);
00490
00491   // Close the file
00492   TIFFClose(tiffimage);
00493   return 0;
00494 }
00495
00496
00497 int PMDImageIO::Read(const std::string& FileName,
00498                      uint8* &Img2D, uint16* &ImgDepth,
00499                      uint16* &ImgModCoeff,
00500                      PMDImageMetaData &MetaData2D,
00501                      PMDImageMetaData &MetaDataDepth){
00502
00503   // reset image pointer
00504   Img2D=NULL;
00505   ImgDepth=NULL;
00506   ImgModCoeff=NULL;
00507
00508   // Open the TIFF file
00509   TIFF *tiffimage;
00510
00511   /* Set up the callback */
00512   NewTagsInitialize_();
00513
00514   if((tiffimage = TIFFOpen(FileName.c_str(), "r")) == NULL){
00515     BIASERR("Could not open image for reading:" << FileName);
00516     return -1;
00517   }
00518
00519   do {
00520     char* descr;
00521     if (TIFFGetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, &descr) == 0) {
00522       BIASERR("Image description is missing!");
00523       return -1;
00524     }
00525
00526     if(strcmp(descr, "2D-Image") == 0) {
00527       if (Read2DImage8Bit_(tiffimage, Img2D, MetaData2D)<0)
00528         return -1;
00529     }
00530
00531     if(strcmp(descr, "Depth-Image") == 0) {
00532       if (ReadDepthImage_(tiffimage, ImgDepth, MetaDataDepth)<0)
00533           return -2;
00534     }
00535
00536     if(strcmp(descr, "Modulation-Coefficients") == 0) {
00537       if (ReadModCoeffImage_(tiffimage, ImgModCoeff, MetaDataDepth)<0)
00538         return -3;
00539     }
00540
00541   } while (TIFFReadDirectory(tiffimage)!=0);
00542
00543   // Close the file
00544   TIFFClose(tiffimage);
00545   return 0;
00546 }
00547
00548 int PMDImageIO::GetBitRep(const std::string& FileName) {
00549   TIFF *tiffimage;
00550
00551   if((tiffimage = TIFFOpen(FileName.c_str(), "r")) == NULL){
00552     BIASERR("Could not open image for reading:" << FileName);
00553     return -1;
00554   }
00555
00556   do {
00557     char* descr;
00558     if (TIFFGetField(tiffimage, TIFFTAG_IMAGEDESCRIPTION, &descr) == 0) {
00559       BIASERR("Image description is missing!");
00560       return -1;
00561     }
00562     if(strcmp(descr, "2D-Image") == 0) {
00563       uint16 bps;
00564       if (TIFFGetField(tiffimage, TIFFTAG_BITSPERSAMPLE, &bps)<0) {
00565         return -1;
00566       } else {
00567         return bps;
00568       }
00569     }
00570   } while (TIFFReadDirectory(tiffimage)!=0);
00571
00572   return 0;
00573 }
00574
00575
00576 int PMDImageIO::ReadMetaData_(TIFF* tiffimage, PMDImageMetaData &MetaData) {
00577
00578   double* cont=NULL;
00579   int16 count;
00580   uint16 channels;
00581   uint32 width, height;
00582
00583   if(TIFFGetField(tiffimage, TIFFTAG_IMAGEWIDTH, &width) == 0){
00584     BIASERR("Image does not define its width");
00585     return -1;
00586   } else {
00587     MetaData.width = width;
00588   }
00589
00590   if(TIFFGetField(tiffimage, TIFFTAG_IMAGELENGTH, &height) == 0){
00591     BIASERR("Image does not define its height");
00592     return -1;
00593   } else {
00594     MetaData.height = height;
00595   }
00596
00597   if((TIFFGetField(tiffimage, TIFFTAG_SAMPLESPERPIXEL, &channels) == 0)){
00598     BIASERR("Wrong number of image planes!");
00599     return -1;
00600   } else {
00601     MetaData.channels =channels;
00602   }
00603
00604   if(TIFFGetField(tiffimage, TIFFTAG_PRINCIPALPOINT, &count, &cont) == 0 ||
00605      (count!=2)){
00606     BIASERR("Error while reading Principal point!");
00607     return -1;
00608   } else {
00609     MetaData.PrincipalX = cont[0];
00610     MetaData.PrincipalY = cont[1];
00611   }
00612
00613   if(TIFFGetField(tiffimage, TIFFTAG_FOCALLENGTHX, &count, &cont) == 0 ||
00614      (count!=1)){
00615     BIASERR("Error while reading focal length!");
00616     return -1;
00617   } else {
00618     MetaData.FocallengthX = cont[0];
00619   }
00620
00621   if(TIFFGetField(tiffimage, TIFFTAG_ASPECTRATIO, &count, &cont) == 0 ||
00622      (count!=1)){
00623     BIASERR("Error while reading aspectratio!");
00624     return -1;
00625   } else {
00626     MetaData.AspectRatio = cont[0];
00627   }
00628
00629   if(TIFFGetField(tiffimage, TIFFTAG_UNDISTORTION, &count, &cont) == 0 ||
00630      (count!=4)){
00631     BIASERR("Error while reading bouget undistortion parameters!");
00632     return -1;
00633   } else {
00634     MetaData.UndistCoeff[0] = cont[0];
00635     MetaData.UndistCoeff[1] = cont[1];
00636     MetaData.UndistCoeff[2] = cont[2];
00637     MetaData.UndistCoeff[3] = cont[3];
00638   }
00639
00640   if(TIFFGetField(tiffimage, TIFFTAG_CAMERACENTER, &count, &cont) == 0 ||
00641      (count!=3)){
00642     BIASERR("Error while reading camera center!");
00643     return -1;
00644   } else {
00645     MetaData.CameraCenter[0] = cont[0];
00646     MetaData.CameraCenter[1] = cont[1];
00647     MetaData.CameraCenter[2] = cont[2];
00648   }
00649
00650   if(TIFFGetField(tiffimage, TIFFTAG_CAMERAROTATION, &count, &cont) == 0 ||
00651      (count!=3)){
00652     BIASERR("Error while reading camera rotation!");
00653     return -1;
00654   } else {
00655     MetaData.CameraRotation[0] = cont[0];
00656     MetaData.CameraRotation[1] = cont[1];
00657     MetaData.CameraRotation[2] = cont[2];
00658   }
00659
00660   return 0;
00661 }
00662
00663 int PMDImageIO::WriteMetaData_(TIFF* tiffimage,
00664                                 const PMDImageMetaData &MetaData) {
00665
00666   double princ[] = {MetaData.PrincipalX, MetaData.PrincipalY};
00667   TIFFSetField(tiffimage, TIFFTAG_PRINCIPALPOINT, 2, &princ);
00668   double f[] = {MetaData.FocallengthX};
00669   TIFFSetField(tiffimage, TIFFTAG_FOCALLENGTHX, 1, &f);
00670   double a[] = {MetaData.AspectRatio};
00671   TIFFSetField(tiffimage, TIFFTAG_ASPECTRATIO, 1, &a);
00672   TIFFSetField(tiffimage, TIFFTAG_UNDISTORTION, 4, &MetaData.UndistCoeff);
00673   TIFFSetField(tiffimage, TIFFTAG_CAMERACENTER, 3, &MetaData.CameraCenter);
00674   TIFFSetField(tiffimage, TIFFTAG_CAMERAROTATION, 3,
00675                &MetaData.CameraRotation);
00676
00677   return 0;
00678 }
00679
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/PMDImageIO.hh Source File

Base » Image

PMDImageIO.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIAS_PMDIMAGEIO_H__
00026 #define __BIAS_PMDIMAGEIO_H__
00027
00028 #include <string>
00029 #include <tiffio.h>
00030
00031 #ifndef __USE_BIAS__
00032
00033 #define BIASImage_EXPORT
00034 #define BIASImageBase_EXPORT
00035
00036 #endif //__USE_BIAS__
00037
00038   // Define user specific TIFF-Tags
00039
00040   /* tags 33550 is a private tag registered to SoftDesk, Inc */
00041 #define TIFFTAG_PRINCIPALPOINT  33550
00042   /* tags 33920-33921 are private tags registered to Intergraph, Inc */
00043 #define TIFFTAG_FOCALLENGTHX    33920
00044 #define TIFFTAG_ASPECTRATIO     33921
00045   /* tags 34263-34264 are private tags registered to NASA-JPL Carto Group */
00046 #define TIFFTAG_UNDISTORTION    34263
00047   /* tags 34735-3438 are private tags registered to SPOT Image, Inc */
00048 #define TIFFTAG_CAMERACENTER    34736
00049 #define TIFFTAG_CAMERAROTATION  34737
00050
00051   static TIFFExtendProc ParentExtender = NULL;
00052
00053   // new tiff tag definitions for extrinsic and intrinsic camera parameters
00054   static const TIFFFieldInfo tiffFieldInfo[] = {
00055     { TIFFTAG_PRINCIPALPOINT,   -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00056       true, true,   "PrincipalPoint" },
00057     { TIFFTAG_FOCALLENGTHX, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00058       true, true,   "FocalLengthX" },
00059     { TIFFTAG_ASPECTRATIO,  -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00060       true, true,   "AspectRatio" },
00061     { TIFFTAG_UNDISTORTION, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00062       true, true,   "BougetUndistortion" },
00063     { TIFFTAG_CAMERACENTER, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00064       true, true,   "CameraCenter" },
00065     { TIFFTAG_CAMERAROTATION,   -1,-1, TIFF_DOUBLE, FIELD_CUSTOM,
00066       true, true,   "CameraRotation" },
00067   };
00068
00069 namespace BIAS {
00070
00071   /** @struct PMDImageMetaData
00072       @brief Store extrinsic and intrinsic camera parameters for
00073       Rotation is in axis * angle representation
00074       image padding and Metadata.
00075       @author streckel 02/2006
00076   */
00077   struct BIASImage_EXPORT PMDImageMetaData {
00078     unsigned int width;
00079     unsigned int height;
00080     unsigned int channels;
00081     double PrincipalX;
00082     double PrincipalY;
00083     double FocallengthX;
00084     double AspectRatio;
00085     double UndistCoeff[4];
00086     double CameraCenter[3];
00087     double CameraRotation[3];
00088   };
00089
00090   /** @class PMDImageIO
00091       @ingroup g_image_base
00092       @brief Save 2D/3D-image-data together with some metadata in a
00093       single tiff-datafile. The 2D-3D-data is aligned, such that for
00094       each pixel in the 2D-image the corresponding depth is
00095       stored at the same position in the depth image. A -1 in the depth
00096       image indicates that no depth data is available.
00097       @author streckel 02/2006 */
00098
00099   class BIASImageBase_EXPORT PMDImageIO {
00100   public:
00101
00102     /** @brief Write a PMD-data 2d/3d-tiff image to disk
00103         @param FileName Output filename, should have the extension .tif
00104         @param Img2D pointer to the 2d-image data to save, if NULL only
00105         depth is written, metadata is also ignored
00106         @param ImgDepth  pointer to the depth data to save, if NULL only
00107         2D-img is written, metadata is also ignored
00108         @param MetaData2D the Metadata of the 2D-image to save
00109         @param MetaDataDepth the Metadata of the depth image to use for padding
00110         @author Birger Streckel **/
00111     static int Write(const std::string& FileName,
00112                      uint8* Img2D, uint16* ImgDepth,
00113                      uint16* ImgModCoeff,
00114                      const PMDImageMetaData &MetaData2D,
00115                      const PMDImageMetaData &MetaDataDepth);
00116     static int Write(const std::string& FileName,
00117                      uint16* Img2D, uint16* ImgDepth,
00118                      uint16* ImgModCoeff,
00119                      const PMDImageMetaData &MetaData2D,
00120                      const PMDImageMetaData &MetaDataDepth);
00121
00122     /** @brief Read a PMD-data 2d/3d-tiff image from disk
00123         @param FileName complete name of file to be loaded
00124         @param Img2D to receive the 2d-image data from the file,
00125         new memory is allocated, if NULL tif contained no 2D-image
00126         @param ImgDepth to receive the depth-image data from the file,
00127         new memory is allocated, if NULL tif contained no depth-image
00128         @param MetaData to receive the Metadata from the file
00129         @author Birger Streckel **/
00130     static int Read(const std::string& FileName,
00131                     uint8* &Img2D, uint16* &ImgDepth,
00132                     uint16* &ImgModCoeff,
00133                     PMDImageMetaData &MetaData2D,
00134                     PMDImageMetaData &MetaDataDepth);
00135     static int Read(const std::string& FileName,
00136                     uint16* &Img2D, uint16* &ImgDepth,
00137                     uint16* &ImgModCoeff,
00138                     PMDImageMetaData &MetaData2D,
00139                     PMDImageMetaData &MetaDataDepth);
00140
00141     /** @brief Returns the bit representation (8 or 16) for the 2D-image in
00142         the PMD-image filename. 0 if there is no 2D image, -1 in case of
00143         error.
00144         @author Birger Streckel
00145     */
00146     static int GetBitRep(const std::string& FileName);
00147
00148   protected:
00149
00150     /* set up callback for initialization of new tags*/
00151     static void NewTagsInitialize_() {
00152
00153       static int first_time=1;
00154
00155       if (! first_time) return; /* Been there. Done that. */
00156       first_time = 0;
00157
00158       /* Grab the inherited method and install */
00159       ParentExtender = TIFFSetTagExtender(NewTagsCallback_);
00160     }
00161
00162
00163     /* callback for initialization of new tags*/
00164     static void NewTagsCallback_(TIFF *tif) {
00165
00166       /* Install the extended Tag field info */
00167       TIFFMergeFieldInfo(tif, tiffFieldInfo,
00168                          sizeof(tiffFieldInfo)/sizeof(tiffFieldInfo[0]));
00169
00170       /* Since the client module may have overridden
00171        * the default directory method, we call it now to
00172        * allow it to set up the rest of its own methods.
00173        */
00174
00175       if (ParentExtender)
00176         (*ParentExtender)(tif);
00177     }
00178
00179     static int ReadMetaData_(TIFF* tiffimage,
00180                              PMDImageMetaData &MetaData);
00181
00182     static int Read2DImage8Bit_(TIFF *tiffimage, uint8* &Img2D,
00183                                 PMDImageMetaData &MetaData2D);
00184     static int Read2DImage16Bit_(TIFF *tiffimage, uint16* &Img2D,
00185                                  PMDImageMetaData &MetaData2D);
00186     static int ReadDepthImage_(TIFF *tiffimage, uint16* &ImgDepth,
00187                                PMDImageMetaData &MetaDataDepth);
00188     static int ReadModCoeffImage_(TIFF *tiffimage, uint16* &ImgModCoeff,
00189                                 PMDImageMetaData MetaDataDepth);
00190
00191
00192     static int WriteMetaData_(TIFF* tiffimage,
00193                               const PMDImageMetaData &MetaData);
00194
00195     static int Write2DImage8Bit_(TIFF *tiffimage, uint8* Img2D,
00196                                  PMDImageMetaData MetaData2D,
00197                                  int LinesPerStrip);
00198     static int Write2DImage16Bit_(TIFF *tiffimage, uint16* Img2D,
00199                                   PMDImageMetaData MetaData2D,
00200                                   int LinesPerStrip);
00201     static int WriteDepthImage_(TIFF *tiffimage, uint16* ImgDepth,
00202                                 PMDImageMetaData MetaDataDepth,
00203                                 int LinesPerStrip);
00204     static int WriteModCoeffImage_(TIFF *tiffimage, uint16* ImgModCoeff,
00205                                    PMDImageMetaData MetaDataDepth,
00206                                    int LinesPerStrip);
00207
00208   };
00209
00210 }
00211 #endif
00212
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PMDImageProc.cpp Source File

Image

PMDImageProc.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Image/PMDImageProc.hh>
00026 #include <Geometry/RMatrix.hh>
00027 #include <Image/HomographyMapping.hh>
00028 #include <Base/Image/ImageIO.hh>
00029 #include <bias_config.h>
00030 #include <stdio.h>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 #define UINT16_MAX (65535U)
00036
00037 // depth range in m
00038 #define DEPTH_MAX 50
00039 #define DEPTH_MIN 0
00040 // modulation coefficient range
00041 #define MODCOEFF_MAX 100
00042 #define MODCOEFF_MIN -100
00043
00044
00045 int PMDImageProc::Write(const std::string& FileName,
00046                         Image<unsigned char> &Img2D,
00047                         Image<float> &ImgDepth,
00048                         Image<float> &ImgModCoeff,
00049                         PMDImageMetaData &MetaData2D,
00050                         PMDImageMetaData &MetaDataDepth) {
00051
00052   uint8* data2D=NULL;
00053   uint16* dataDepth=NULL;
00054   uint16* dataModCoeff=NULL;
00055
00056   MetaData2D.width = Img2D.GetWidth();
00057   MetaData2D.height = Img2D.GetHeight();
00058   MetaData2D.channels = Img2D.GetChannelCount();
00059
00060   if (!Img2D.IsEmpty()) {
00061     if (Img2D.GetStorageType()!=ImageBase::ST_unsignedchar) {
00062       BIASERR("The RGB or grey image has the wrong storage type, has to be" <<
00063               "ST_unsignedchar");
00064       return -1;
00065     }
00066     data2D = (uint8*) Img2D.GetImageData();
00067   }
00068
00069   if (!ImgDepth.IsEmpty()) {
00070
00071     MetaDataDepth.width = ImgDepth.GetWidth();
00072     MetaDataDepth.height = ImgDepth.GetHeight();
00073     MetaDataDepth.channels = ImgDepth.GetChannelCount();
00074     if (ImgDepth.GetStorageType()!=ImageBase::ST_float) {
00075       BIASERR("The depth image has the wrong storage type, has to be" <<
00076               "ST_float");
00077       return -1;
00078     }
00079
00080     unsigned int i;
00081     dataDepth = new uint16[MetaDataDepth.width*MetaDataDepth.height];
00082     uint16* pDataDepth = dataDepth;
00083     float* pDataDepthf = ImgDepth.GetImageData();
00084     for (i=0; i<MetaDataDepth.width*MetaDataDepth.height;
00085          i++, pDataDepthf++, pDataDepth++) {
00086       *pDataDepth = DepthConvert_(*pDataDepthf);
00087     }
00088
00089     if (!ImgModCoeff.IsEmpty()) {
00090       if (ImgModCoeff.GetStorageType()!=ImageBase::ST_float) {
00091         BIASERR("The modulation coefficients image has the wrong storage" <<
00092                 "type, has to be ST_float");
00093         return -1;
00094       }
00095       if (MetaDataDepth.width != ImgModCoeff.GetWidth() ||
00096           MetaDataDepth.height != ImgModCoeff.GetHeight() ||
00097           MetaDataDepth.channels != ImgModCoeff.GetChannelCount()) {
00098         BIASERR("The modulation coefficients image must have same size " <<
00099                 "and channels as the depth image");
00100         return -1;
00101       }
00102
00103       dataModCoeff = new uint16[MetaDataDepth.width*MetaDataDepth.height];
00104       uint16* pDataModCoeff = dataModCoeff;
00105       float* pDataModCoefff = ImgModCoeff.GetImageData();
00106       for (i=0; i<MetaDataDepth.width*MetaDataDepth.height;
00107            i++, pDataModCoefff++, pDataModCoeff++) {
00108         *pDataModCoeff = ModCoeffConvert_(*pDataModCoefff);
00109       }
00110     }
00111   }
00112   PMDImageIO::Write(FileName, data2D, dataDepth, dataModCoeff,
00113                     MetaData2D, MetaDataDepth);
00114
00115   if (dataDepth!=NULL) delete [] dataDepth;
00116   if (dataModCoeff!=NULL) delete [] dataModCoeff;
00117
00118   return 0;
00119
00120 }
00121
00122
00123 int PMDImageProc::Read(const std::string& FileName,
00124                        Image<unsigned char> &Img2D,
00125                        Image<float> &ImgDepth,
00126                        Image<float> &ImgModCoeff,
00127                        PMDImageMetaData &MetaData2D,
00128                        PMDImageMetaData &MetaDataDepth) {
00129
00130   uint8* data2d=NULL;
00131   uint16* dataDepth=NULL;
00132   uint16* dataModCoeff=NULL;
00133   int ret=0, ret2=0, ret3=0;
00134
00135   PMDImageIO::Read(FileName, data2d, dataDepth, dataModCoeff,
00136                    MetaData2D, MetaDataDepth);
00137   if (data2d!=NULL) {
00138     if (!Img2D.IsEmpty()) Img2D.Release();
00139     ret = Img2D.InitWithForeignData(MetaData2D.width, MetaData2D.height,
00140                                     MetaData2D.channels,
00141                                     (unsigned char*) data2d);
00142     if (ret!=0) BIASERR("Error reading 2D image" << ret);
00143
00144     if (MetaData2D.channels==3) {
00145       Img2D.SetColorModel(ImageBase::CM_RGB);
00146     } else {
00147       Img2D.SetColorModel(ImageBase::CM_Grey);
00148     }
00149
00150   }
00151
00152   if (dataDepth!=NULL) {
00153     float *dataDepthf = new float[MetaDataDepth.width*MetaDataDepth.height];
00154     float *pDataDepthf = dataDepthf;
00155     uint16* pDataDepth = dataDepth;
00156     for (unsigned int i=0; i<MetaDataDepth.width*MetaDataDepth.height;
00157          i++, pDataDepthf++, pDataDepth++) {
00158       *pDataDepthf = DepthConvert_(*pDataDepth);
00159     }
00160     if (!ImgDepth.IsEmpty()) ImgDepth.Release();
00161     ret2 = ImgDepth.InitWithForeignData(MetaDataDepth.width,
00162                                         MetaDataDepth.height,
00163                                         MetaDataDepth.channels,
00164                                         dataDepthf);
00165     delete [] dataDepth;
00166     if (ret2!=0) BIASERR("Error reading Depth image" << ret2);
00167   }
00168
00169   if (dataModCoeff!=NULL) {
00170     float *dataModCoefff = new float[MetaDataDepth.width*MetaDataDepth.height];
00171     float *pDataModCoefff = dataModCoefff;
00172     uint16* pDataModCoeff = dataModCoeff;
00173     for (unsigned int i=0; i<MetaDataDepth.width*MetaDataDepth.height;
00174          i++, pDataModCoefff++, pDataModCoeff++) {
00175       *pDataModCoefff = ModCoeffConvert_(*pDataModCoeff);
00176     }
00177     if (!ImgModCoeff.IsEmpty()) ImgModCoeff.Release();
00178     ret3 = ImgModCoeff.InitWithForeignData(MetaDataDepth.width,
00179                                            MetaDataDepth.height,
00180                                            MetaDataDepth.channels,
00181                                            dataModCoefff);
00182     delete [] dataModCoeff;
00183     if (ret3!=0) BIASERR("Error reading Modulation Coefficients image"
00184                          << ret3);
00185   }
00186   return ret+ret2+ret3;
00187 }
00188
00189
00190 int PMDImageProc::FitDepthTo2DImage(Image<float> &ImgDepth,
00191                                     const PMDImageMetaData &MetaData2D,
00192                                     PMDImageMetaData &MetaDataDepth) {
00193
00194   HomographyMapping<float, float> hm;
00195   hm.SetHomography(HFromMeta_(MetaData2D, MetaDataDepth));
00196   BIAS::ImageIO::Write("depthBefore.mip",ImgDepth);
00197   Image<float> mapto(MetaData2D.width, MetaData2D.height, 1);
00198   int ret = hm.Map(ImgDepth, mapto);
00199   BIAS::ImageIO::Write("depthAfter.mip",mapto);
00200   ImgDepth = mapto;
00201   return ret;
00202 }
00203
00204
00205 HMatrix PMDImageProc::HFromMeta_(const PMDImageMetaData &MetaData2D,
00206                                  const PMDImageMetaData &MetaDataDepth) {
00207
00208   if (!Equal(MetaData2D.CameraCenter[0], MetaDataDepth.CameraCenter[0]) ||
00209       !Equal(MetaData2D.CameraCenter[1], MetaDataDepth.CameraCenter[1]) ||
00210       !Equal(MetaData2D.CameraCenter[2], MetaDataDepth.CameraCenter[2])) {
00211     BIASERR("Can not Fit Depth Image to 2D Iamge, centers are not equal!!");
00212   }
00213
00214   KMatrix K2D, KDepth;
00215   K2D = KFromMeta(MetaData2D);
00216   KDepth =  KFromMeta(MetaDataDepth);
00217
00218   Vector3<double> rot2D(MetaData2D.CameraRotation[0],
00219                         MetaData2D.CameraRotation[1],
00220                         MetaData2D.CameraRotation[2]);
00221   Vector3<double> rotDepth(MetaDataDepth.CameraRotation[0],
00222                            MetaDataDepth.CameraRotation[1],
00223                            MetaDataDepth.CameraRotation[2]);
00224   RMatrix Rdiff, RDepth, R2D;
00225   RDepth.SetFromAxisAngle(rotDepth);
00226   R2D.SetFromAxisAngle(rot2D);
00227   Rdiff = R2D*RDepth.Invert();
00228   HMatrix H = KDepth*Rdiff*K2D.Invert();
00229   return H;
00230
00231 }
00232
00233
00234 KMatrix PMDImageProc::KFromMeta(const PMDImageMetaData &MetaData) {
00235   KMatrix K;
00236   K.SetIdentity();
00237   K[0][0] = MetaData.FocallengthX;
00238   K[1][1] = MetaData.AspectRatio * MetaData.FocallengthX;
00239   K[0][2] = MetaData.PrincipalX;
00240   K[1][2] = MetaData.PrincipalY;
00241   return K;
00242 }
00243
00244
00245 Pose PMDImageProc::PoseFromMeta(const PMDImageMetaData &MetaData) {
00246   Pose pose;
00247   RMatrix R;
00248   R.SetFromAxisAngle(Vector3<double>(MetaData.CameraRotation));
00249   Quaternion<double> Q;
00250   R.GetQuaternion(Q);
00251   pose.SetQ(Q);
00252   pose.SetC(Vector3<double>(MetaData.CameraCenter));
00253   return pose;
00254 }
00255
00256
00257 double PMDImageProc::CalcSigmaDepth(Image<float> &ImgDepth,
00258                                     unsigned int x, unsigned int y)
00259 {
00260   if (x<1 || x>ImgDepth.GetWidth()-2 ||
00261       y<1 || y>ImgDepth.GetHeight()-2) {
00262     return -1;
00263   }
00264
00265   // Surrounding min and max depth in m
00266   double minDepth = 1000;
00267   double maxDepth = 0;
00268
00269   for (int dx=-1; dx<=1; dx++) {
00270     for (int dy=-1; dy<=1; dy++) {
00271       if (ImgDepth.PixelValue(x+dx, y+dy)<minDepth)
00272         minDepth = ImgDepth.PixelValue(x+dx, y+dy);
00273       if (ImgDepth.PixelValue(x+dx, y+dy)>maxDepth)
00274         maxDepth = ImgDepth.PixelValue(x+dx, y+dy);
00275     }
00276   }
00277
00278   // Standard deviation for a certain depth in meter
00279   double minDev= 0.002734*minDepth*minDepth +
00280     0.00286723*minDepth - 0.0004229692;
00281   double maxDev= 0.002734*maxDepth*maxDepth +
00282     0.00286723*maxDepth - 0.0004229692;
00283
00284   //depth value is in this range
00285   minDepth -= minDev;
00286   maxDepth += maxDev;
00287   return (maxDepth-minDepth)/2;
00288 }
00289
00290
00291 uint16 PMDImageProc::DepthConvert_(float depth) {
00292   return Convert_(depth, DEPTH_MIN, DEPTH_MAX);
00293 }
00294
00295 float PMDImageProc::DepthConvert_(uint16 depth) {
00296   return Convert_(depth, DEPTH_MIN, DEPTH_MAX);
00297 }
00298
00299 uint16 PMDImageProc::ModCoeffConvert_(float modcoeff) {
00300   return Convert_(modcoeff, MODCOEFF_MIN, MODCOEFF_MAX);
00301 }
00302
00303 float PMDImageProc::ModCoeffConvert_(uint16 modcoeff) {
00304   return Convert_(modcoeff, MODCOEFF_MIN, MODCOEFF_MAX);
00305 }
00306
00307 uint16 PMDImageProc::Convert_(float val, float lower, float upper) {
00308   float step=(upper-lower)/UINT16_MAX;
00309   if (val < lower) return 0;
00310   if (val > upper) return UINT16_MAX;
00311   return (uint16)((val-lower)/step);
00312 }
00313
00314 float PMDImageProc::Convert_(uint16 val, float lower, float upper) {
00315   float step=(upper-lower)/UINT16_MAX;
00316   return val*step+lower;
00317 }
00318
00319
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PMDImageProc.hh Source File

Image

PMDImageProc.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIAS_PMDIMAGEPROC_H__
00026 #define __BIAS_PMDIMAGEPROC_H__
00027
00028 #include <bias_config.h>
00029 #include <Base/Image/Image.hh>
00030
00031 #define __USE_BIAS__
00032 #include <Base/Image/PMDImageIO.hh>  // only after #define __USE_BIAS__
00033
00034 #include <Base/Geometry/KMatrix.hh>
00035 #include <Geometry/HMatrix.hh>
00036 #include <Geometry/Pose.hh>
00037 #include <Base/Common/CompareFloatingPoint.hh>
00038
00039 #ifndef BIAS_HAVE_TIFF
00040 #  error Please recompile BIAS with USE_TIFF
00041 #endif // BIAS_HAVE_TIFF
00042
00043 namespace BIAS {
00044
00045
00046   class BIASImage_EXPORT PMDImageProc
00047   {
00048   public:
00049     /** @brief Write a PMD-data 2d/3d-tiff image to disk
00050         @param FileName Output filename, should have the extension .tif
00051         @param img the 2d-image data to save
00052         @param depthimg the depth data to save
00053         @param MetaData2D the Metadata of the 2D-image to save
00054         @param MetaDataDepth the Metadata of the depth image to use for padding
00055         @author Birger Streckel **/
00056     static int Write(const std::string& FileName,
00057                      Image<unsigned char> &Img2D,
00058                      Image<float> &ImgDepth,
00059                      Image<float> &ImgModCoeff,
00060                      PMDImageMetaData &MetaData2D,
00061                      PMDImageMetaData &MetaDataDepth);
00062
00063     /** @brief Read a PMD-data 2d/3d-tiff image from disk
00064         @param FileName complete name of file to be loaded
00065         @param img to receive the 2d-image data from the file
00066         @param depthimg to receive the depth-image data from the file
00067         @param MetaData to receive the Metadata from the file
00068         @author Birger Streckel **/
00069     static int Read(const std::string& FileName,
00070                     Image<unsigned char> &Img2D,
00071                     Image<float> &ImgDepth,
00072                     Image<float> &ImgModCoeff,
00073                     PMDImageMetaData &MetaData2D,
00074                     PMDImageMetaData &MetaDataDepth);
00075
00076     /** @brief convert a depth image such that the depth and the grey value
00077         at the same pixel position belong to the same ray. The transformaton
00078         information is taken from the metadata. MetaDataDepth is changed
00079         for the converted depth image and is identical to MetaData2D afterwards
00080         @param ImgDepth is the image to convert. This image has to contain
00081         depth informaiton and is changed in size and contents.
00082         @param MetaData2D this is the metadata for the 2D-image.
00083         @param MetaDataDepth the metadata for the depth image. Is adapted
00084         to reflect the image transformation.
00085         @author Birger Streckel **/
00086     static int FitDepthTo2DImage(Image<float> &ImgDepth,
00087                                  const PMDImageMetaData &MetaData2D,
00088                                  PMDImageMetaData &MetaDataDepth);
00089
00090     static KMatrix KFromMeta(const PMDImageMetaData &MetaData);
00091     static Pose PoseFromMeta(const PMDImageMetaData &MetaData);
00092
00093     static double CalcSigmaDepth(Image<float> &ImgDepth,
00094                                  unsigned int x, unsigned int y);
00095
00096   protected:
00097
00098     /* @brief Create a H-Matrix that converts the depth image to the 2D view
00099      */
00100     static HMatrix HFromMeta_(const PMDImageMetaData &MetaData2D,
00101                               const PMDImageMetaData &MetaDataDepth);
00102
00103
00104     static uint16 DepthConvert_(float depth);
00105     static float DepthConvert_(uint16 depth);
00106     static uint16 ModCoeffConvert_(float modcoeff);
00107     static float ModCoeffConvert_(uint16 modcoeff);
00108     static uint16 Convert_(float val, float lower, float upper);
00109     static float Convert_(uint16 val, float lower, float upper);
00110
00111   };
00112
00113 }
00114 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Polynom.hh Source File

Base » Math

Polynom.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004, 2005    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __POLYNOM_HH__
00027 #define __POLYNOM_HH__
00028
00029 #include "Base/Common/BIASpragmaStart.hh"
00030 #include <vector>
00031
00032 #include "Base/Debug/Debug.hh"
00033 #include "Base/Debug/Error.hh"
00034
00035
00036 namespace BIAS{
00037   /**@class Polynom
00038      @ingroup g_math
00039      @brief class for Polynoms of arbitary order
00040
00041      class Polynom represents a Polynom of arbitary order, where
00042      ith element is the coefficient of the ith exponent
00043
00044      @author Marcel Lilienthal, June 2005
00045   */
00046   class Polynom : public Debug
00047   {
00048   public:
00049     Polynom(){
00050       order_=0;
00051     };
00052     ~Polynom(){};
00053
00054     Polynom(const Polynom& toCopy){
00055       operator=(toCopy);
00056     };
00057
00058     /**
00059        constructs a polynom of order=i
00060        the coefficients are 0
00061
00062        @author Marcel Lilienthal
00063      */
00064     Polynom(unsigned int i){
00065       order_=i;
00066       poly_.resize(i,0.0);
00067     };
00068
00069
00070     /**
00071        sets the order of polynom to i
00072        new generated coefficients are 0
00073
00074        @author Marcel Lilienthal
00075      */
00076     inline void SetOrder(unsigned int i){
00077       order_=i;
00078       poly_.resize(i,0.0);
00079     };
00080
00081     inline unsigned int GetOrder() const { return order_; };
00082
00083     //operators
00084     /**
00085        returns a reference to ith coefficent of the polynom readonly
00086
00087        @author Marcel Lilienthal
00088      */
00089     inline const double& operator[](const unsigned int i) const;
00090
00091     /**
00092        returns a reference to ith coefficent of the polynom writable
00093
00094        @author Marcel Lilienthal
00095      */
00096     inline double& operator[](const unsigned int i);
00097
00098
00099     inline Polynom& operator=(const Polynom& a);
00100     inline Polynom& operator+=(const Polynom& a);
00101     inline Polynom& operator+=(const double& d);
00102     inline Polynom& operator-=(const Polynom& a);
00103     inline Polynom& operator-=(const double& d);
00104     inline Polynom& operator*=(const Polynom& a);
00105     inline Polynom& operator*=(const double& d);
00106     inline bool operator==(const Polynom& a) const;
00107     inline bool operator!=(const Polynom& a) const;
00108
00109   protected:
00110     std::vector<double> poly_;
00111     unsigned int order_;
00112   };//class
00113
00114   inline const double& Polynom::operator[](const unsigned int i) const{
00115     BIASASSERT(i<order_);
00116     return poly_[i];
00117   }
00118
00119   inline double& Polynom::operator[](const unsigned int i){
00120     BIASASSERT(i<order_);
00121     return poly_[i];
00122   }
00123
00124   inline Polynom& Polynom::operator=(const Polynom& a){
00125     if (this != &a){
00126       order_ = a.order_;
00127       poly_.resize(order_);
00128       unsigned int i;
00129       for(i=0;i<order_; i++){
00130         poly_[i]=a.poly_[i];
00131       }
00132     }
00133     return *this;
00134   }
00135
00136   inline Polynom& Polynom::operator+=(const Polynom& a){
00137     if ( a.order_>order_ )
00138       SetOrder(a.order_);
00139     unsigned int i;
00140     for(i=0; i<a.order_; i++){
00141       poly_[i]=poly_[i]+a.poly_[i];
00142     }
00143     return *this;
00144   }
00145
00146   inline Polynom& Polynom::operator+=(const double& d){
00147     if (order_==0)
00148       SetOrder(1);
00149     poly_[0]=poly_[0]+d;
00150     return *this;
00151   }
00152
00153   inline Polynom& Polynom::operator-=(const Polynom& a){
00154     if ( a.order_>order_ )
00155       SetOrder(a.order_);
00156     unsigned int i;
00157     for(i=0;i<a.order_;i++){
00158       poly_[i]=poly_[i]-a.poly_[i];
00159     }
00160     return *this;
00161   }
00162
00163   inline Polynom& Polynom::operator-=(const double& d){
00164     if (order_==0)
00165       SetOrder(1);
00166     poly_[0]=poly_[0]-d;
00167     return *this;
00168   }
00169
00170   inline Polynom& Polynom::operator*=(const Polynom& a){
00171     std::vector<double>  c(order_ + a.order_ -1);
00172
00173     unsigned int i,j;
00174     for(i=0; i<order_; i++){
00175       for(j=0; j<a.order_; j++){
00176         c[i+j] += poly_[i] * a.poly_[j];
00177       }
00178     }
00179     SetOrder(c.size());
00180     for(i=0;i<c.size(); i++){
00181       poly_[i]=c[i];
00182     }
00183
00184     return *this;
00185   }
00186
00187   inline Polynom& Polynom::operator*=(const double& d){
00188     unsigned int i;
00189     for(i=0;i<order_;i++){
00190       poly_[i]=poly_[i]*d;
00191     }
00192     return *this;
00193   }
00194
00195   inline bool Polynom::operator==(const Polynom& a) const{
00196     bool res = (this == &a);
00197
00198     if(!res){
00199       res = order_ == a.order_;
00200       if(res){
00201         unsigned int i;
00202         for(i=0; i< order_; i++){
00203           res = poly_[i]==a.poly_[i];
00204           if(!res)
00205             return res;
00206         }
00207       }
00208     }
00209     return res;
00210   }
00211
00212
00213
00214   inline bool Polynom::operator!=(const Polynom& a) const{
00215     return !operator==(a);
00216   }
00217
00218   inline Polynom operator+(const Polynom& a, const Polynom& b){
00219     Polynom c;
00220     c=a;
00221     if(a.GetOrder() < b.GetOrder())
00222       c.SetOrder(b.GetOrder());
00223     unsigned int i;
00224     for(i=0; i<b.GetOrder(); i++)
00225       c[i]+=b[i];
00226     return c;
00227   }
00228
00229   inline Polynom operator-(const Polynom& a, const Polynom& b){
00230     Polynom c;
00231     c=a;
00232     if(a.GetOrder() < b.GetOrder())
00233       c.SetOrder(b.GetOrder());
00234     unsigned int i;
00235     for(i=0; i<b.GetOrder(); i++)
00236       c[i]-=b[i];
00237     return c;
00238   }
00239
00240   inline Polynom operator*(const Polynom& a, const Polynom& b){
00241     Polynom c(a.GetOrder() + b.GetOrder() - 1);
00242
00243     unsigned int i,j;
00244     for(i=0; i<a.GetOrder(); i++){
00245       for(j=0; j<b.GetOrder(); j++){
00246         c[i+j] += a[i] * b[j];
00247       }
00248     }
00249     return c;
00250   }
00251
00252   inline Polynom operator*(const double& d, const Polynom& a){
00253     Polynom c(a.GetOrder());
00254
00255     unsigned int i;
00256     for(i=0; i<a.GetOrder(); i++){
00257       c[i]=a[i]*d;
00258     }
00259     return c;
00260   }
00261
00262   inline Polynom operator*(const Polynom& a, const double& d){
00263     Polynom c(a.GetOrder());
00264
00265     unsigned int i;
00266     for(i=0; i<a.GetOrder(); i++){
00267       c[i]=a[i]*d;
00268     }
00269     return c;
00270     }
00271
00272
00273
00274 }//namespace
00275
00276 #include <Base/Common/BIASpragmaEnd.hh>
00277
00278 #endif //__POLYNOM_HH__
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/PolynomialSolve.cpp Source File

MathAlgo

PolynomialSolve.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #include "Base/Common/W32Compat.hh"
00025
00026 #include "PolynomialSolve.hh"
00027 #include "Minpack.hh"
00028 #ifdef BIAS_HAVE_GSL
00029 #include <gsl/gsl_poly.h>
00030 #include <gsl/gsl_errno.h>
00031 #endif
00032
00033 #define DOUBLE_MIN 1e-6
00034 #define PS_DOUBLE_EPSILON DBL_EPSILON
00035
00036 #include <Base/Common/BIASpragma.hh>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 int PolynomialSolve::Solve(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00042                            vector<POLYNOMIALSOLVE_TYPE>& sol)
00043 {
00044   int deg=(int)coeff.size()-1;
00045   int num=deg;
00046   BIASASSERT(deg>=0);
00047   switch (deg){
00048   case 0:
00049     sol.clear();
00050     num=0;
00051     break;
00052   case 1:
00053     num = Linear(coeff, sol);
00054     break;
00055   case 2:
00056     num = Quadratic(coeff, sol);
00057     break;
00058   case 3:
00059     num = Cubic(coeff, sol);
00060     break;
00061   case 4:
00062     num = Quartic(coeff, sol);
00063     break;
00064   default:
00065     num = Numeric(coeff, sol);
00066     break;
00067   }
00068   return num;
00069 }
00070
00071 int PolynomialSolve::Solve(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00072                            vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00073 {
00074   int deg=(int)coeff.size()-1;
00075   int num=deg;
00076   BIASASSERT(deg>=0);
00077   switch (deg){
00078   case 0:
00079     sol.clear();
00080     num=0;
00081     break;
00082   case 1:
00083     num = Linear(coeff, sol);
00084     break;
00085   case 2:
00086     num = Quadratic(coeff, sol);
00087     break;
00088   case 3:
00089     num = Cubic(coeff, sol);
00090     break;
00091   default:
00092     num = Numeric(coeff, sol);
00093     break;
00094   }
00095   return num;
00096 }
00097
00098
00099
00100
00101
00102
00103
00104
00105 int PolynomialSolve::Numeric(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00106                              vector<POLYNOMIALSOLVE_TYPE>& sol)
00107 {
00108   vector<complex<POLYNOMIALSOLVE_TYPE> > csol;
00109   int res=Numeric(coeff, csol), num=0;
00110   sol.clear();
00111   sol.reserve(coeff.size()-1);
00112   if (res>0){
00113     for (int i=0; i<res; i++){
00114       if (csol[i].imag()==0.0){
00115         sol.push_back(csol[i].real());
00116       }
00117     }
00118     num=sol.size();
00119   } else {
00120     num=res;
00121   }
00122   return num;
00123 }
00124
00125 int PolynomialSolve::Numeric(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00126                              vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00127 {
00128   int deg=(int)coeff.size()-1;
00129 #ifdef BIAD_DEBUG
00130   if (coeff[deg]==0.0){
00131     BIASERR("leading coefficient is zero, aborting"););
00132   }
00133 #endif
00134   BIASASSERT(coeff[deg]!=0.0);
00135   BIASASSERT(deg>=0);
00136
00137   int num=0;
00138 #ifdef BIAS_HAVE_GSL
00139   if (deg>0){
00140 #ifdef BIAS_DEBUG
00141     for (unsigned i=0; i<coeff.size(); i++){
00142       BIASCDOUT(D_PS_GSL, setw(3)<<i<<"th coeff: "<<coeff[i]<<endl);
00143     }
00144 #endif
00145     size_t n=deg+1;
00146     double *a=new double[n];
00147     double *z=new double[2*deg];
00148     gsl_poly_complex_workspace *w=gsl_poly_complex_workspace_alloc(n);
00149
00150     for (unsigned i=0; i<n; i++) a[i]=coeff[i];
00151     int res = gsl_poly_complex_solve(a, n, w, z);
00152     gsl_poly_complex_workspace_free(w);
00153     if (res==GSL_SUCCESS){
00154       sol.reserve(n-1);
00155       sol.clear();
00156       n--;
00157       for (unsigned i=0; i<n; i++){
00158         sol.push_back(complex<double>(z[i<<1], z[(i<<1)+1]));
00159         BIASCDOUT(D_PS_GSL, setw(3)<<i<<"th solution : "<< *sol.rbegin()
00160                   <<"\tpoly("<<z[i<<1]<<") = "
00161                   <<gsl_poly_eval(a, n+1, z[i<<1]) << endl);
00162       }
00163       delete a;
00164       delete z;
00165       num=n;
00166     } else {
00167       sol.clear();
00168       num=-1;
00169     }
00170   } else {
00171     sol.clear();
00172     num=0;
00173   }
00174 #else
00175   deg=0;
00176   sol.clear();
00177   BIASERR("gsl needed for PolynomialSolve::Numeric");
00178   num=-1;
00179 #endif
00180   return num;
00181 }
00182
00183
00184
00185
00186
00187 int PolynomialSolve::Analytic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00188                               vector<POLYNOMIALSOLVE_TYPE>& sol)
00189 {
00190   int deg=(int)coeff.size()-1;
00191   BIASASSERT(deg<=4);
00192   int num=0;
00193   switch (deg){
00194   case 0:
00195     sol.clear();
00196     num=0;
00197     break;
00198   case 1:
00199     num = Linear(coeff, sol);
00200     break;
00201   case 2:
00202     num = Quadratic(coeff, sol);
00203     break;
00204   case 3:
00205     num = Cubic(coeff, sol);
00206     break;
00207   case 4:
00208     num = Quartic(coeff, sol);
00209     break;
00210   default:
00211     BIASERR("something strange happened");
00212     BIASABORT;
00213     break;
00214   }
00215   return num;
00216 }
00217
00218 int PolynomialSolve::Analytic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00219                               vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00220 {
00221   int deg=(int)coeff.size()-1;
00222   BIASASSERT(deg<=3);
00223   int num=0;
00224   switch (deg){
00225   case 0:
00226     sol.clear();
00227     num=0;
00228     break;
00229   case 1:
00230     num = Linear(coeff, sol);
00231     break;
00232   case 2:
00233     num = Quadratic(coeff, sol);
00234     break;
00235   case 3:
00236     num = Cubic(coeff, sol);
00237     break;
00238   default:
00239     BIASERR("something strange happened");
00240     BIASABORT;
00241     break;
00242   }
00243   return num;
00244 }
00245
00246
00247
00248
00249
00250
00251
00252 int PolynomialSolve::Linear(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00253                             vector<POLYNOMIALSOLVE_TYPE>& sol)
00254 {
00255   int deg=(int)coeff.size()-1;
00256 #ifdef BIAS_DEBUG
00257   if(deg!=1 || coeff[deg]==0.0){
00258     BIASERR("coeff is not a polynom of first order");
00259   }
00260 #endif
00261   BIASASSERT(deg==1);
00262   BIASASSERT(coeff[deg]!=0.0);
00263
00264   sol.resize(deg);
00265   // degree 1 has one solution
00266   sol[0] = -coeff[0] / coeff[1];
00267
00268   return 1;
00269 }
00270
00271 int PolynomialSolve::Linear(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00272                             vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00273 {
00274   vector<POLYNOMIALSOLVE_TYPE> rsol;
00275   int deg=Linear(coeff, rsol);
00276   sol.resize(deg);
00277   if (deg!=0)
00278     sol[0] = complex<POLYNOMIALSOLVE_TYPE>(rsol[0], 0.0);
00279   return 1;
00280 }
00281
00282
00283
00284
00285 int PolynomialSolve::Quadratic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00286                                vector<POLYNOMIALSOLVE_TYPE>& sol)
00287 {
00288   int deg=(int)coeff.size()-1;
00289 #ifdef BIAS_DEBUG
00290   if(deg!=2 || coeff[deg]==0.0){
00291     BIASERR("coeff is not a polynom of second order");
00292   }
00293 #endif
00294   BIASASSERT(deg==2);
00295   BIASASSERT(coeff[deg]!=0.0);
00296   int num=0;
00297
00298   sol.clear();
00299   sol.reserve(deg);
00300 #ifdef BIAS_HAVE_GSL
00301   POLYNOMIALSOLVE_TYPE s[2];
00302   num=gsl_poly_solve_quadratic(coeff[2], coeff[1],coeff[0],&(s[0]),&(s[1]));
00303   if (num==2 && s[0]==s[1]) num=1;
00304   for (int i=0; i<num; i++) sol.push_back(s[i]);
00305 #else
00306   // compute normal coefficients
00307   POLYNOMIALSOLVE_TYPE q1 = coeff[1] / (coeff[2] * 2.0);
00308   POLYNOMIALSOLVE_TYPE q0 = coeff[0] /  coeff[2];
00309
00310   // get discriminant and accuracy
00311   POLYNOMIALSOLVE_TYPE discriminant = q1*q1 - q0;
00312   POLYNOMIALSOLVE_TYPE epsilon_d =
00313       (fabs(discriminant)+7.0*q1*q1+3.0*fabs(q0)) * DBL_EPSILON;
00314
00315   // check whether there is no solution
00316   if (discriminant < -epsilon_d) {
00317     num = 0;
00318   } else if (discriminant <= epsilon_d) { // we have solutions, check how many
00319     // within our accuracy, we have two identical solutions !
00320     sol.push_back(-q1);
00321     num = 1;
00322   } else {
00323     // we have two distinct roots in IR
00324     // compute first one according to sign of q1:
00325     POLYNOMIALSOLVE_TYPE FirstRoot =
00326       ((q1>0.0)?-sqrt(discriminant):sqrt(discriminant)) - q1;
00327     sol.push_back(FirstRoot);
00328
00329     // avoid cancellation when calculating second root:
00330     sol.push_back(q0/FirstRoot);
00331     num=2;
00332   }
00333 #endif
00334   return num;
00335 }
00336
00337 int PolynomialSolve::Quadratic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00338                                vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00339 {
00340   int deg=(int)coeff.size()-1;
00341 #ifdef BIAS_DEBUG
00342   if(deg!=2 || coeff[deg]==0.0){
00343     BIASERR("coeff is not a polynom of second order");
00344   }
00345 #endif
00346   BIASASSERT(deg==2);
00347   BIASASSERT(coeff[deg]!=0.0);
00348   int num=0;
00349
00350   sol.resize(deg);
00351 #ifdef BIAS_HAVE_GSL
00352   double z[4];
00353   num = gsl_poly_complex_solve_quadratic(coeff[2], coeff[1], coeff[0],
00354                                          (gsl_complex*)&(z[0]),
00355                                          (gsl_complex*)&(z[2]));
00356   sol[0]=complex<POLYNOMIALSOLVE_TYPE>(z[0], z[1]);
00357   sol[1]=complex<POLYNOMIALSOLVE_TYPE>(z[2], z[3]);
00358 #else
00359   BIASERR("Quadratic(vector<double>, vbector<complex<double>>) only "
00360           <<"implemented with gsl");
00361   num = -1;
00362 #endif
00363   return num;
00364 }
00365
00366
00367
00368
00369
00370 int PolynomialSolve::Cubic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00371                            std::vector<POLYNOMIALSOLVE_TYPE>& sol)
00372 {
00373 #ifdef BIAS_DEBUG
00374   int deg=(int)coeff.size()-1;
00375   if(deg!=3 || coeff[deg]==0.0){
00376     BIASERR("coeff is not a polynom of third order");
00377   }
00378 #endif
00379   BIASASSERT(deg==3);
00380   BIASASSERT(coeff[deg]!=0.0);
00381   int num=0;
00382   sol.reserve(3);
00383
00384 #ifdef BIAS_HAVE_GSL
00385   POLYNOMIALSOLVE_TYPE msol[3];
00386   num = gsl_poly_solve_cubic(coeff[2]/coeff[3], coeff[1]/coeff[3],
00387                              coeff[0]/coeff[3], &(msol[0]),
00388                              &(msol[1]), &(msol[2]));
00389   for (int i=0; i<num; i++)
00390     sol.push_back(msol[i]);
00391 #else
00392   // normalize to first coefficient, i.e. a3=1
00393   POLYNOMIALSOLVE_TYPE a0 = coeff[0] / coeff[3];
00394   POLYNOMIALSOLVE_TYPE a1 = coeff[1] / coeff[3];
00395
00396   // substitute x=z-a2/3
00397   // quadratic term goes away
00398   POLYNOMIALSOLVE_TYPE a2 = coeff[2] / (coeff[3] * 3.0);
00399
00400   POLYNOMIALSOLVE_TYPE q = a1 / 3.0 - a2*a2;
00401   POLYNOMIALSOLVE_TYPE r = ( a1*a2 - a0 ) * 0.5  - a2*a2*a2 ;
00402
00403   // see if we can factorize to z==0
00404   if (fabs(r)<PS_DOUBLE_EPSILON)    {
00405     // yes, its the easy way
00406     // rest is z^2 + 3q == 0
00407     if (q>-PS_DOUBLE_EPSILON) {
00408         // no other solutions apart from z==0
00409         // (or z==0 is a triple zero crossing)
00410         // back-substitute to x
00411         sol.push_back(-a2);
00412         num = 1;
00413     } else {
00414         POLYNOMIALSOLVE_TYPE t = sqrt( -3.0 * q );
00415         sol.resize(3);
00416         sol[0] = -a2 - t;
00417         sol[1] = -a2;
00418         sol[2] = -a2 + t;
00419         num = 3;
00420     }
00421   } else {
00422
00423     // now we have z^3 + 3qz + r = 0
00424     POLYNOMIALSOLVE_TYPE d = q*q*q + r*r;
00425
00426     // can we directly factorize the polynomial into linear and quadratic:
00427     if (fabs(d) < PS_DOUBLE_EPSILON) {
00428       r = cbrt(r);
00429       sol.resize(2);
00430       sol[0] = 2.0*r - a2;
00431       sol[1] = -r - a2;
00432       num = 2;
00433     } else {
00434
00435       // no, we got an offset
00436       if (d > 0.0) {
00437         // quadratic has two imaginary sols
00438         // only one real solution
00439         POLYNOMIALSOLVE_TYPE s1,s2;
00440
00441         d = sqrt(d);
00442
00443         s1 = cbrt(r + d);
00444         s2 = cbrt(r - d);
00445
00446         sol.push_back(s1 + s2 - a2);
00447         return 1;
00448       }
00449
00450       // the general case: d<0
00451       // need to think in complex plane
00452       d = sqrt(-d);
00453       q = atan2(d,r) / 3.0;
00454       r = cbrt(hypot(d,r));
00455
00456       POLYNOMIALSOLVE_TYPE s = 2.0 * r * cos(q);
00457       POLYNOMIALSOLVE_TYPE t = fabs(2.0 * r * sin(q)) * sin(60.0*M_PI/180.0);
00458
00459       sol.resize(3);
00460       sol[0] =  s + -a2 ;
00461       sol[1] = -0.5*s -a2 - t;
00462       sol[2] = -0.5*s -a2 + t;
00463       num=3;
00464     }
00465   }
00466 #endif
00467   return num;
00468 }
00469
00470 int PolynomialSolve::Cubic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00471                            vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00472 {
00473 #ifdef BIAS_DEBUG
00474   int deg=(int)coeff.size()-1;
00475   if(deg!=3 || coeff[deg]==0.0){
00476     BIASERR("coeff is not a polynom of third order");
00477   }
00478 #endif
00479   BIASASSERT(deg==3);
00480   BIASASSERT(coeff[deg]!=0.0);
00481   int num=0;
00482
00483 #ifdef BIAS_HAVE_GSL
00484   double z[6];
00485   num = gsl_poly_complex_solve_cubic(coeff[2]/coeff[3], coeff[1]/coeff[3],
00486                                      coeff[0]/coeff[3], (gsl_complex*)&(z[0]),
00487                                      (gsl_complex*)&(z[2]),
00488                                      (gsl_complex*)&(z[4]));
00489   for (int i=0; i<num; i++){
00490     sol.push_back(complex<POLYNOMIALSOLVE_TYPE>(z[2*i], z[2*i+1]));
00491   }
00492 //   sol[0]=complex<POLYNOMIALSOLVE_TYPE>(z[0], z[1]);
00493 //   sol[1]=complex<POLYNOMIALSOLVE_TYPE>(z[2], z[3]);
00494 //   sol[2]=complex<POLYNOMIALSOLVE_TYPE>(z[4], z[5]);
00495 #else
00496   sol.clear();
00497   BIASERR("gsl needed for PolynomialSolve::Cubic(vector, vector<complex>)");
00498   num=-1;
00499 #endif
00500   return num;
00501 }
00502
00503
00504 int PolynomialSolve::Quartic(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00505                              vector<POLYNOMIALSOLVE_TYPE>& sol)
00506 {
00507   int deg=(int)coeff.size()-1;
00508 #ifdef BIAS_DEBUG
00509   if(deg!=4 || coeff[deg]==0.0){
00510     BIASERR("coeff is not a polynom of fourth order");
00511   }
00512 #endif
00513   BIASASSERT(coeff[deg]!=0.0);
00514   BIASASSERT(deg==4);
00515   int num=0;
00516
00517   sol.clear();
00518   sol.reserve(deg);
00519
00520 #ifdef BIAS_HAVE_GSL
00521   //  BIASERR("no gsl implementation of quartic polynomial available");
00522 #endif
00523
00524   vector<POLYNOMIALSOLVE_TYPE> CubicCoeffs, CubicSolutions;
00525   CubicCoeffs.resize(4);
00526
00527   // normalize to highest order coeficient a4==1
00528   POLYNOMIALSOLVE_TYPE a0 = coeff[0] / coeff[4];
00529   POLYNOMIALSOLVE_TYPE a1 = coeff[1] / coeff[4];
00530   POLYNOMIALSOLVE_TYPE a2 = coeff[2] / coeff[4];
00531   POLYNOMIALSOLVE_TYPE a3 = coeff[3] / coeff[4];
00532
00533   CubicCoeffs[0] = -( a1*a1 + a0 * a3 * a3  - 4.0 * a0 * a2 );
00534   CubicCoeffs[1] = a1*a3 - 4.0 * a0;
00535   CubicCoeffs[2] = -a2;
00536   CubicCoeffs[3] = 1.0;
00537
00538   // unsigned int s =
00539   Cubic(CubicCoeffs, CubicSolutions);
00540   // cout <<"solveCubic returned "<<s<<" solutions."<<endl;
00541
00542   for(unsigned int i = 0 ; i < CubicSolutions.size() ; i++ ) {
00543     POLYNOMIALSOLVE_TYPE u,s,t;
00544     u = CubicSolutions[i];
00545
00546     s = a3*a3 / 4.0 + u - a2;
00547     t = u * u / 4.0 - a0;
00548
00549     if ((s>-DOUBLE_MIN) && (t>-DOUBLE_MIN)) {
00550       if (s<DOUBLE_MIN) s=0;
00551       if (t<DOUBLE_MIN) t=0;
00552
00553       vector<POLYNOMIALSOLVE_TYPE> QuadraticCoeffs, QuadraticSolutions;
00554         QuadraticCoeffs.resize(3);
00555
00556         s = sqrt(s);
00557         t = sqrt(t);
00558
00559         // check sign of t
00560         if ((s*t>0.0)^(a3*u/2.0-a1>0.0)) t = -t;
00561
00562         QuadraticCoeffs[0] = u / 2.0 + t;
00563         QuadraticCoeffs[1] = a3 / 2.0 + s;
00564         QuadraticCoeffs[2] = 1.0;
00565         Quadratic(QuadraticCoeffs, QuadraticSolutions);
00566
00567         QuadraticCoeffs[0] = u / 2.0 - t;
00568         QuadraticCoeffs[1] = a3 / 2.0 - s;
00569         Quadratic(QuadraticCoeffs, sol);
00570
00571       for (unsigned int j=0; j<QuadraticSolutions.size(); j++)
00572         sol.push_back(QuadraticSolutions[j]);
00573         // cout << "SolveQuartic has "<<Solutions.size()<<" solutions: ";
00574       // for (int g=0; g<Solutions.size(); g++) cout << Solutions[g]<<" ";
00575       // cout <<endl;
00576       num = sol.size();
00577     } else {
00578       // cout <<"s="<<s<<" t="<<t<<endl;
00579     }
00580   }
00581   return num;
00582 }
00583
00584 void PolynomialSolve::CheckCoefficients(vector<POLYNOMIALSOLVE_TYPE>& coeff,
00585                                         double eps)
00586 {
00587   while (fabs(*coeff.rbegin())<=eps && coeff.size()>0){
00588     BIASCDOUT(D_PS_COEFF, "removing leading zero: "<<*coeff.rbegin()<<endl);
00589     coeff.pop_back();
00590   }
00591 }
00592
00593 void PolynomialSolve::CalCoefficients(const vector<POLYNOMIALSOLVE_TYPE>& sol,
00594                                       vector<POLYNOMIALSOLVE_TYPE>& coeff)
00595 {
00596   int deg=(int)sol.size();
00597   int nc=deg+1;
00598   coeff.resize(nc);
00599   for (int c=0; c<nc; c++){
00600     BIASCDOUT(D_PS_COEFF, "\ncoff["<<c<<"] = ");
00601     coeff[c]=_GetCoeff(c, 0, sol);
00602     BIASCDOUT(D_PS_COEFF, " = "<<coeff[c]<<endl);
00603   }
00604 }
00605
00606 POLYNOMIALSOLVE_TYPE
00607 PolynomialSolve::_GetCoeff(int order, int begin,
00608                            const vector<POLYNOMIALSOLVE_TYPE>& sol)
00609 {
00610   POLYNOMIALSOLVE_TYPE sum=0.0;
00611   int size=(int)sol.size();
00612   if (order==size){
00613     sum=1.0;
00614     BIASCDOUT(D_PS_COEFF, sum);
00615   } else if (order==0){
00616     sum=-sol[0];
00617     BIASCDOUT(D_PS_COEFF, -sol[0]);
00618     for (int i=1; i<size; i++) {
00619       sum*=-sol[i];
00620       BIASCDOUT(D_PS_COEFF, "*"<<-sol[i]);
00621     }
00622   } else {
00623     sum=0.0;
00624     vector<POLYNOMIALSOLVE_TYPE> msol=sol;
00625     for (int i=begin; i<size; i++){
00626       msol=sol;
00627       // remove (i)th element from msol
00628       msol.erase(msol.begin()+i);
00629 #ifdef BIAS_DEBUG
00630       if (order-1==0) { BIASCDOUT(D_PS_COEFF, " + "); }
00631 #endif
00632       sum+=_GetCoeff(order-1, i, msol);
00633     }
00634   }
00635   return sum;
00636 }
00637
00638 int PolynomialSolve::GetNumberOfRealSolutions(const vector<POLYNOMIALSOLVE_TYPE>& coeff)
00639 {
00640   vector<POLYNOMIALSOLVE_TYPE> sol;
00641   //  Poor implementation of GetNumberOfRealsol().
00642   //  Actually computes all solutions and throws them away.
00643   return (Solve(coeff, sol));
00644 }
00645
00646
00647 int PowellCoeffNum;
00648 double *PowellCoeff=NULL;
00649
00650 void MyPowellFunc(int *n, double *x, double *fvec, int *iflag)
00651 {
00652 #ifdef BIAS_HAVE_GSL
00653   *fvec=gsl_poly_eval(PowellCoeff, PowellCoeffNum, *x);
00654 #else
00655   BIASERR("gsl needed");
00656 #endif
00657 }
00658
00659 int PolynomialSolve::NonLinearRefine(const vector<POLYNOMIALSOLVE_TYPE>& coeff,
00660                                      vector<complex<POLYNOMIALSOLVE_TYPE> >& sol)
00661 {
00662   PowellCoeffNum=coeff.size();
00663   if (PowellCoeff==NULL){ delete[] PowellCoeff; PowellCoeff=NULL; };
00664   PowellCoeff=new double[PowellCoeffNum];
00665   for (int i=0; i<PowellCoeffNum; i++) PowellCoeff[i]=coeff[i];
00666   for (unsigned i=0; i<sol.size(); i++){
00667     if (imag(sol[i])==0.0){
00668       Vector<double> ig(1), re(1);
00669       ig[0]=real(sol[i]);
00670       if (Powell(MyPowellFunc, ig, re, 1e-10)==0){
00671 #ifdef BIAS_HAVE_GSL
00672         GetDebugStream().precision(25);
00673         BIASCDOUT(D_PS_NLREFINE, "before refine: "<<ig[0]<<"\tpoly: "
00674                   <<gsl_poly_eval(PowellCoeff, PowellCoeffNum, ig[0])<<endl);
00675 #endif
00676         sol[i]=(complex<double>(re[0], 0.0));
00677 #ifdef BIAS_HAVE_GSL
00678         BIASCDOUT(D_PS_NLREFINE, "after refine: "<<re[0]<<"\tpoly: "
00679                   <<gsl_poly_eval(PowellCoeff, PowellCoeffNum, re[0])
00680                   <<"\tsol: "<<sol[i]<<endl);
00681 #endif
00682       } else {
00683         BIASERR("nonlinear optimization failed for "<<i);
00684       }
00685     } else {
00686       BIASCDOUT(D_PS_NLREFINE, "not refining "<<sol[i]
00687                 <<", because solution is imaginary  "<<endl);
00688     }
00689   }
00690   delete[] PowellCoeff; PowellCoeff=NULL;
00691   return 0;
00692 }
00693
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/PolynomialSolve.hh Source File

MathAlgo

PolynomialSolve.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_POLYNOMIALSOLVE_
00027 #define _BIAS_POLYNOMIALSOLVE_
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <cfloat>
00032 #include <vector>
00033 #include <complex>
00034 #include "Base/Debug/Debug.hh"
00035 #include "Base/Debug/Error.hh"
00036
00037 #define POLYNOMIALSOLVE_TYPE double
00038
00039 #define D_PS_GSL      0x00000001
00040 #define D_PS_NLREFINE 0x00000002
00041 #define D_PS_COEFF    0x00000004
00042
00043 namespace BIAS {
00044
00045   /** @class PolynomialSolve
00046       @ingroup g_mathalgo
00047       @brief base class for solving polynomial equations
00048
00049       @author koeser 10/2003, woelk 08/2004  */
00050   class BIASMathAlgo_EXPORT PolynomialSolve : public Debug
00051   {
00052
00053   public:
00054     PolynomialSolve() {};
00055     ~PolynomialSolve() {};
00056
00057     /** @brief solve polynomial of arbitrary order n
00058         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00059         coeff[n]!=0.0 is asserted
00060         Uses analytical solution if n<=4
00061         @return number of real solutions, negative value on error
00062         @author koeser, woelk 08/2004 untested */
00063     int Solve(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00064               std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00065     /** @brief solve polynomial of arbitrary order n
00066         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00067         coeff[n]!=0.0 is asserted.
00068         Uses analytical solution if n<=3
00069         @return number of solutions, negative value on error
00070         @author woelk 08/2004 untested */
00071     int Solve(const std::vector<POLYNOMIALSOLVE_TYPE>&  coeff,
00072               std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00073
00074     /** @brief solves polynomial of arbitrary order n numerically
00075         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00076         coeff[n]!=0.0 is asserted.
00077         @return number of real solutions, negative value on error
00078         @author woelk 08/2004 untested */
00079     int Numeric(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00080                 std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00081     /** @brief solves polynomial of arbitrary order n numerically
00082         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00083         coeff[n]!=0.0 is asserted.
00084         @return number of complex solutions, negative value on error
00085         @author woelk 08/2004 untested */
00086     int Numeric(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00087                 std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00088
00089     /** @brief solves polynomial of arbitrary order n<=4 analytically
00090         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00091         coeff[n]!=0.0 is asserted.
00092         @return number of real solutions, negative value on error
00093         @author woelk 08/2004 untested */
00094     int Analytic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00095                  std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00096     /** @brief solves polynomial of arbitrary order n<=3 analytically
00097         coeff[n]x^n+...+coeff[2]x^2+coeff[1]x+coeff[0]=0
00098         coeff[n]!=0.0 is asserted.
00099         @return number of complex solutions, negative value on error
00100         @author woelk 08/2004 untested */
00101     int Analytic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00102                  std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00103
00104     /** solve a polynomial of degree 1
00105         coeff[1]*x+coeff[0]=0
00106         coeff[1] != 0.0 is asserted
00107         returns the number of real solutions (always 1)
00108         @author koeser, woelk 08/2004 */
00109     int Linear(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00110                std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00111     /** solve a polynomial of degree 1
00112         coeff[1]*x+coeff[0]=0
00113         coeff[1] != 0.0 is asserted
00114         returns the number of complex solutions (always 1)
00115         @author woelk 08/2004 */
00116     int Linear(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00117                std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00118
00119     /** solve a polynomial of degree 2
00120         coeff[2]*x^2+coeff[1]*x+coeff[0]=0
00121         coeff[2] != 0.0 is asserted
00122         returns the number of real solutions (0, 1 or 2)
00123         @author koeser, woelk 08/2004 */
00124     int Quadratic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00125                   std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00126     /** solve a polynomial of degree 2
00127         coeff[2]*x^2+coeff[1]*x+coeff[0]=0
00128         coeff[2] != 0.0 is asserted
00129         returns the number of complex solutions (alway 2)
00130         @author woelk 08/2004 */
00131     int Quadratic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00132                   std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00133
00134     /** solve a polynomial of degree 1
00135         coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0
00136          coeff[3] != 0.0 is asserted
00137          returns the number of real solutions
00138          @author koeser, woelk 08/2004 */
00139     int Cubic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00140               std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00141     /** solve a polynomial of degree 1
00142         coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0
00143         coeff[3] != 0.0 is asserted
00144         returns the number of real solutions
00145         @author woelk 08/2004 */
00146     int Cubic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00147               std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00148
00149     /** solve a polynomial of degree 1
00150         coeff[4]*x^4+coeff[3]*x^3+coeff[2]*x^2+coeff[1]*x+coeff[0]=0
00151         coeff[4] != 0.0 is asserted
00152         returns the number of real solutions
00153         @author koeser, woelk 08/2004 */
00154     int Quartic(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00155                 std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00156
00157     /** removes leading zeros in coefficients
00158         @author woelk 08/2004 */
00159     void CheckCoefficients(std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00160                            double eps=DBL_EPSILON);
00161
00162
00163     /** helper function, calulates the coefficients from the solutions
00164         @author woelk 08/2004 */
00165     void CalCoefficients(const std::vector<POLYNOMIALSOLVE_TYPE>& sol,
00166                          std::vector<POLYNOMIALSOLVE_TYPE>& coeff);
00167
00168     /** @brief numerically robust way to evaluate a polynomial at position x,
00169         same principle as in gsl_poly_eval
00170         @author koeser */
00171     inline POLYNOMIALSOLVE_TYPE
00172     EvaluatePolynomial(const POLYNOMIALSOLVE_TYPE x,
00173                        const std::vector<POLYNOMIALSOLVE_TYPE>& coeff);
00174
00175     /** @brief determine number of real solutions of polynomial */
00176     int GetNumberOfRealSolutions(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff);
00177
00178     /** @brief determine whether the polynomial has a solution in IR */
00179     bool HasRealSolution(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff)
00180     { return (GetNumberOfRealSolutions(coeff)>0); };
00181
00182
00183     /** does a non linear refinement using Powel from minpack
00184         for real roots (non imaginary) only
00185         @author woelk, koeser 08/2004 */
00186     int NonLinearRefine(const std::vector<POLYNOMIALSOLVE_TYPE>& coeff,
00187                         std::vector<std::complex<POLYNOMIALSOLVE_TYPE> >& sol);
00188
00189   protected:
00190     /** helper function for CalCoefficients
00191         @author woelk 08/2004 */
00192     POLYNOMIALSOLVE_TYPE
00193     _GetCoeff(int order, int b, const std::vector<POLYNOMIALSOLVE_TYPE>& sol);
00194   };
00195
00196   //////////////////////////////////////////////////////////////////////
00197   //        inline implementation
00198   //////////////////////////////////////////////////////////////////////
00199
00200   inline POLYNOMIALSOLVE_TYPE
00201   PolynomialSolve::EvaluatePolynomial(const POLYNOMIALSOLVE_TYPE x, const
00202                                       std::vector<POLYNOMIALSOLVE_TYPE>& coeff)
00203   {
00204     register int n = (int)coeff.size() - 1;
00205     POLYNOMIALSOLVE_TYPE result = coeff[n--];
00206     while (n>=0) result = result*x + coeff[n--];
00207     return result;
00208   }
00209
00210
00211 } // end namespace
00212
00213 #include <Base/Common/BIASpragmaEnd.hh>
00214
00215 #endif
00216
00217
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Pose.cpp Source File

Geometry

Pose.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Geometry/Pose.hh>
00026 #include <Base/Common/CompareFloatingPoint.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031
00032 BIAS::Pose::
00033 Pose()
00034   : Cov_(7, 7, MatrixZero)
00035 {}
00036
00037
00038 BIAS::Pose::
00039 ~Pose()
00040 {}
00041
00042
00043
00044 Matrix3x3<POSE_TYPE> BIAS::Pose::
00045 GetCovC()
00046 {
00047   Matrix3x3<POSE_TYPE> ret;
00048   for (unsigned int row=0; row<3; row++) {
00049     for (unsigned int col=0; col<3; col++) {
00050       ret[row][col] = Cov_[row][col];
00051     }
00052   }
00053   return ret;
00054 }
00055
00056
00057 Matrix4x4<POSE_TYPE> BIAS::Pose::
00058 GetCovQ()
00059 {
00060   Matrix4x4<POSE_TYPE> ret;
00061   for (unsigned int row=0; row<4; row++) {
00062     for (unsigned int col=0; col<4; col++) {
00063       ret[row][col] = Cov_[row+3][col+3];
00064     }
00065   }
00066   return ret;
00067 }
00068
00069
00070 void BIAS::Pose::
00071 SetQ(const Quaternion<POSE_TYPE>& Q)
00072 {
00073   CoordinateTransform3D::SetQ(Q);
00074   Cov_.SetZero();
00075 }
00076
00077 void BIAS::Pose::
00078 SetC(const Vector3<POSE_TYPE>& C)
00079 {
00080   CoordinateTransform3D::SetC(C);
00081   Cov_.SetZero();
00082 }
00083
00084 void BIAS::Pose::
00085 Set(const Quaternion<POSE_TYPE>& Q, const Vector3<POSE_TYPE>& C)
00086 {
00087   CoordinateTransform3D::Set(Q, C);
00088   Cov_.SetZero();
00089 }
00090
00091
00092 int BIAS::Pose::
00093 SetCovEuclidian(Matrix<POSE_TYPE> Cov)
00094 {
00095   if (Cov.GetRows()!=6 || Cov.GetCols()!=6) {
00096     BIASERR("Euclidian Pose Covariance has to be 7x7");
00097     return -1;
00098   } else {
00099     BIASERR("Not Implemented!!");
00100     BIASABORT;
00101     return -2;
00102   }
00103
00104   //return 0;
00105 }
00106
00107 int BIAS::Pose::
00108 Set(const PoseParametrization& pose)
00109 {
00110   int ret=0;
00111
00112   Set(pose.GetOrientation(), pose.GetPosition());
00113   ret -= SetCovariance(pose.GetCovarianceMatrix());
00114   return ret;
00115 }
00116
00117
00118 void BIAS::Pose::
00119 Set(const Quaternion<POSE_TYPE>& Q,
00120     const Vector3<POSE_TYPE>& C,
00121     const Matrix<POSE_TYPE>& Cov)
00122 {
00123   Set(Q, C);
00124   SetCovariance(Cov);
00125 }
00126
00127 bool BIAS::Pose::
00128 Load(const std::string& inputFile){
00129   bool res = CoordinateTransform3D::Load(inputFile);
00130   if(res && scale_!=1.0) {
00131     BIASERR("Loaded transformation is not a pose - resetting scale!\n");
00132     scale_ = 1.0;
00133     return false;
00134   }
00135   return res;
00136 }
00137
00138 void BIAS::Pose::
00139 TransformToNewGlobalBy(const CoordinateTransform3D& trsf)
00140 {
00141   Pose result;
00142   CoordinateTransform3D intermediate;
00143   trsf.ConcatenateLocalTransform((*this), intermediate);
00144   result.Set(intermediate.GetQ(), intermediate.GetC());
00145   (*this) = result;
00146 }
00147
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Pose.hh Source File

Geometry

Pose.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Pose_hh__
00027 #define __Pose_hh__
00028
00029 #include <Base/Geometry/Quaternion.hh>
00030 #include <Base/Geometry/HomgPoint3D.hh>
00031 #include <Base/Geometry/HomgPoint3DCov.hh>
00032 #include <Base/Math/Matrix4x4.hh>
00033 #include <Base/Math/Matrix3x4.hh>
00034 #include <Base/Geometry/RMatrixBase.hh>
00035 #include <Geometry/CoordinateTransform3D.hh>
00036 #include <Base/Geometry/PoseParametrization.hh>
00037
00038
00039 #define POSE_TYPE double
00040
00041 namespace BIAS {
00042
00043   /** @class Pose
00044       @brief Container for 3D pose, parametrized as euclidean center and
00045       quaternion orientation.
00046       Special coordinate transformation that can also be interpreted as
00047       measureable entity. Meaning: a (camera) pose is measured in the
00048       coordinate system A. In A the pose will define the transformation from
00049       coordinate in A to the pose (camera) coordinate system. This
00050       transformation does not contain scale. Imagine A beeing embedded in
00051       another coordinate system B. In order to find the pose in B the method
00052       TransformBy() can be used. The result will not be able to transform
00053       coordinates
00054       from A into the pose system. This transform can be found using the
00055       method CoordinateTransform3D::ConcatenateLocalTransform()
00056       on a pose object.
00057
00058       @author woelk/koeser/bartczak 03/2006 */
00059
00060   class Pose : public CoordinateTransform3D
00061   {
00062   public:
00063     Pose();
00064
00065     ~Pose();
00066
00067     int Set(const PoseParametrization& pose);
00068
00069     void Set(const Quaternion<POSE_TYPE>& Q,
00070              const Vector3<POSE_TYPE>& C);
00071     void Set(const Quaternion<POSE_TYPE>& Q,
00072              const Vector3<POSE_TYPE>& C,
00073              const Matrix<POSE_TYPE>& cov);
00074
00075     void SetC(const Vector3<POSE_TYPE>& C,
00076               const Matrix3x3<POSE_TYPE>& cov);
00077
00078     void SetC(const HomgPoint3D& C, const HomgPoint3DCov& cov);
00079
00080     void SetQ(const Quaternion<POSE_TYPE>& Q,
00081               const Matrix4x4<POSE_TYPE>& cov);
00082
00083     void SetQ(const Quaternion<POSE_TYPE>& Q);
00084     void SetC(const Vector3<POSE_TYPE>& C);
00085
00086     PoseParametrization GetPoseParameters() const
00087     {
00088       PoseParametrization res;
00089       res.SetOrientation(Q_);
00090       res.SetPosition(C_);
00091       res.SetCovarianceMatrix(Cov_);
00092       return res;
00093     }
00094
00095     /// returns the 7x7 covariance matrix
00096     inline Matrix<POSE_TYPE> GetCov() const {
00097       return Cov_;
00098     }
00099
00100     /// Set internal covariance fron an Euclidian covariance matrix
00101     /// Elements 0,1,2 are C, Elements 3,4,5 are rotation angles
00102     int SetCovEuclidian(Matrix<POSE_TYPE> Cov);
00103
00104     //     inline Matrix3x4<POSE_TYPE> GetMatrix3x4() const {
00105     //       return Pcached_;
00106     //     }
00107
00108     /// Only to use for projective P's which are not decomposable!
00109     /// Invalidates the pose vector and the covariance
00110     //void SetMatrix3x4(const Matrix3x4<POSE_TYPE>& P);
00111
00112     Matrix3x3<POSE_TYPE> GetCovC();
00113     Matrix4x4<POSE_TYPE> GetCovQ();
00114
00115     /*void SetFromCenterEulerAngles(Vector<double>& pose,
00116       Matrix<double>& cov);*/
00117
00118     bool Load(const std::string& inputFile);
00119
00120     friend std::istream& operator>>(std::istream &is,
00121                                     Pose& p);
00122
00123     const Pose& operator=(const Pose& p) {
00124       CoordinateTransform3D::operator=(p);
00125       return (*this);
00126     }
00127
00128     inline const Matrix<POSE_TYPE>& GetCovariance() const {
00129       return Cov_;
00130     }
00131
00132     inline int SetCovariance(const Matrix<POSE_TYPE>& c) {
00133       if (c.GetRows()!=7 || c.GetCols()!=7) {
00134         BIASERR("Pose Covariance has to be 7x7");
00135         Cov_.SetZero();
00136         return -1;
00137       } else {
00138         Cov_ = c;
00139       }
00140       return 0;
00141     }
00142
00143     /** \brief Transforms the position and orientation stored in the pose
00144      * into another global coordinate system.
00145      */
00146     void TransformToNewGlobalBy(const CoordinateTransform3D& trsf);
00147
00148   protected:
00149
00150     // 7x7 covariance matrix
00151     Matrix<POSE_TYPE> Cov_;
00152   };
00153
00154
00155   inline std::istream& operator>>(std::istream &is, Pose& p){
00156     std::string temp;
00157     is>>temp>>p.Q_>>temp>>p.C_>>temp>>p.scale_;
00158     if(is && p.scale_!=1.0) {
00159       BIASERR("Loaded transformation is not a pose - resetting scale!\n");
00160       p.scale_ = 1.0;
00161     }
00162     return is;
00163   }
00164
00165 }
00166
00167 #endif
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrization.cpp Source File

Base » Geometry

PoseParametrization.cpp

Go to the documentation of this file.
00001 #include "PoseParametrization.hh"
00002
00003 #include "PoseParametrizationCovariance.hh"
00004
00005 #include <Base/Debug/Exception.hh>
00006 #include <Base/Common/CompareFloatingPoint.hh>
00007 #include <Base/Math/Matrix4x4.hh>
00008 #include <Base/Geometry/HomgPoint3D.hh>
00009
00010 using namespace BIAS;
00011
00012 PoseParametrization::
00013 PoseParametrization()
00014   : Pose_(7), Cov_(7, 7, MatrixZero)
00015 {
00016   Pose_.SetZero();
00017 }
00018
00019
00020 PoseParametrization::
00021 PoseParametrization(const Vector<PP_TYPE>& CQvec,
00022                     const Matrix<PP_TYPE>& covariance)
00023 {
00024   Set(CQvec, covariance);
00025 }
00026
00027
00028 PoseParametrization::
00029 PoseParametrization(const Vector3<PP_TYPE>& position,
00030                     const Quaternion<PP_TYPE>& orientation,
00031                     const Matrix<PP_TYPE>& covariance)
00032 {
00033   Set(position, orientation, covariance);
00034 }
00035
00036
00037 void PoseParametrization::
00038 Set(const Vector3<PP_TYPE>& position, const Quaternion<PP_TYPE>& orientation,
00039     const Matrix<PP_TYPE>& covariance)
00040 {
00041   Vector<PP_TYPE> CQvec(7);
00042   CQ2Pose_(position, orientation, CQvec);
00043   Set(CQvec, covariance);
00044 }
00045
00046
00047 void PoseParametrization::
00048 SetCQ(const Vector<PP_TYPE>& CQvec)
00049 {
00050   if (CQvec.size() != 7){
00051     BEXCEPTION("invalid vector size, must be 7");
00052   }
00053   Pose_ = CQvec;
00054   Cov_.SetZero();
00055 }
00056
00057
00058 void PoseParametrization::
00059 SetCovarianceMatrix(const Matrix<PP_TYPE>& Cov)
00060 {
00061   if(Cov.num_rows() != 7 || Cov.num_cols() != 7) {
00062     BEXCEPTION("dimension of argument covariance matrix does not match!\n");
00063   }
00064   // todo: check symmetry and positiv definitness of cov
00065   Cov_ = Cov;
00066 }
00067
00068
00069 Vector3<PP_TYPE> PoseParametrization::
00070 GetPosition() const
00071 {
00072   Vector3<PP_TYPE> c;
00073   Quaternion<PP_TYPE> q;
00074   Pose2CQ_(Pose_, c, q);
00075   return c;
00076 }
00077
00078
00079 Quaternion<PP_TYPE> PoseParametrization::
00080 GetOrientation() const
00081 {
00082   Vector3<PP_TYPE> c;
00083   Quaternion<PP_TYPE> q;
00084   Pose2CQ_(Pose_, c, q);
00085   return q;
00086 }
00087
00088
00089 void PoseParametrization::
00090 SetPosition(const Vector3<PP_TYPE>& C)
00091 {
00092   Pose_[0] = C[0];
00093   Pose_[1] = C[1];
00094   Pose_[2] = C[2];
00095   Cov_.SetZero();
00096 }
00097
00098
00099 void PoseParametrization::
00100 SetOrientation(const Quaternion<PP_TYPE>& q)
00101 {
00102   Pose_[3] = q[0];
00103   Pose_[4] = q[1];
00104   Pose_[5] = q[2];
00105   Pose_[6] = q[3];
00106   Cov_.SetZero();
00107 }
00108
00109
00110 bool PoseParametrization::
00111 Load(const std::string& file)
00112 {
00113   std::ifstream ifs(file.c_str());
00114   if(!ifs)
00115     return false;
00116   ifs>>*this;
00117   if(!ifs) {
00118     ifs.close();
00119     return false;
00120   }
00121   ifs.close();
00122   return true;
00123 }
00124
00125
00126 bool PoseParametrization::
00127 Save(const std::string& file) const
00128 {
00129   std::ofstream ofs(file.c_str());
00130   if(!ofs)
00131     return false;
00132   ofs<<*this;
00133   if(!ofs) {
00134     ofs.close();
00135     return false;
00136   }
00137   ofs.close();
00138   return true;
00139 }
00140
00141
00142 void PoseParametrization::
00143 Transform(const Matrix4x4<PP_TYPE>& T)
00144 {
00145   PoseParametrizationCovariance cov = GetCovarianceMatrix();
00146   cov.Transform(T, *this);
00147   SetCovarianceMatrix(cov);
00148
00149   BIASERR("unfinished, transformation of center and quaternion missing");
00150   BIASABORT;
00151 }
00152
00153
00154 void BIAS::PoseParametrization::
00155 Transform(const Vector3<PP_TYPE>& T, const Quaternion<PP_TYPE>& q)
00156 {
00157   BIASERR("untested");
00158   Matrix4x4<PP_TYPE> Transf(MatrixIdentity);
00159   RMatrixBase R;
00160   R.SetFromQuaternion(q);
00161   for (int r=0; r<3; r++){
00162     Transf[r][3] = T[r];
00163     for (int c=0; c<3; c++){
00164       Transf[r][c] = R[r][c];
00165     }
00166   }
00167
00168   Vector3<PP_TYPE> pos = GetPosition(), new_pos;
00169   HomgPoint3D src(pos), dst;
00170   dst = Transf * src;
00171   if (dst.IsAtInfinity()){
00172     BEXCEPTION("position is at infinity: "<<dst);
00173   } else {
00174     dst.GetEuclidian(new_pos);
00175   }
00176
00177   Quaternion<PP_TYPE> o = GetOrientation();
00178   o = q * o;
00179
00180   PoseParametrizationCovariance cov = GetCovarianceMatrix();
00181   cov.Transform(Transf, *this);
00182
00183   Set(new_pos, o, cov);
00184 }
00185
00186
00187 std::ostream& BIAS::
00188 operator<<(std::ostream &os, const PoseParametrization& p)
00189 {
00190   os<< "position= "<<p.GetPosition()<< " orientation= "<<p.GetOrientation()
00191     << " cov= "<<p.GetCovarianceMatrix();
00192   return os;
00193 }
00194
00195
00196 std::istream& BIAS::
00197 operator>>(std::istream &is, PoseParametrization& p)
00198 {
00199   std::string temp;
00200   Vector3<PP_TYPE> position;
00201   Quaternion<PP_TYPE> orientation;
00202   Matrix<PP_TYPE> cov;
00203   is>>temp>>position>>temp>>orientation>>temp>>cov;
00204   p.Set(position, orientation, cov);
00205   return is;
00206 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrization.hh Source File

Base » Geometry

PoseParametrization.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __PoseParametrization_hh__
00027 #define __PoseParametrization_hh__
00028
00029 #include <Base/Math/Vector.hh>
00030 #include <Base/Math/Vector3.hh>
00031 #include <Base/Math/Matrix.hh>
00032 #include <Base/Math/Matrix4x4.hh>
00033 #include <Base/Geometry/Quaternion.hh>
00034
00035 #include <fstream>
00036
00037 namespace BIAS {
00038
00039 #define PP_TYPE double
00040
00041   template <class T> class Vector3;
00042   template <class T> class Quaternion;
00043
00044   /** @class PoseParametrization
00045       @brief Slim class bundeling pose parametrization and associated
00046       covariance matrix.
00047
00048       The pose is parametrized as vector of dimension 7 where the first 3
00049       entries represent the position (euclidean vector of dimension 3) and the
00050       last 4 entries represent the quaternion orientation.
00051
00052       \author bartczak/woelk e.a. 04/2006 */
00053   class BIASGeometryBase_EXPORT PoseParametrization
00054   {
00055   public:
00056     PoseParametrization();
00057
00058     PoseParametrization(const Vector<PP_TYPE>& CQvec,
00059                         const Matrix<PP_TYPE>& covariance);
00060
00061     PoseParametrization(const Vector3<PP_TYPE>& position,
00062                         const Quaternion<PP_TYPE>& orientation,
00063                         const Matrix<PP_TYPE>& covariance);
00064
00065     /** Set this from pose parametrization and zeros associated
00066         covarinace matrix */
00067     void SetCQ(const Vector<PP_TYPE>& CQvec);
00068
00069     /** Set this from position, orientation and covariance */
00070     void Set(const Vector3<PP_TYPE>& position,
00071              const Quaternion<PP_TYPE>& orientation,
00072              const Matrix<PP_TYPE>& covariance);
00073
00074     inline void Set(const Vector<PP_TYPE>& CQvec, const Matrix<PP_TYPE>& Cov)
00075     { SetCQ(CQvec); SetCovarianceMatrix(Cov); }
00076
00077     /** Sets covariance matrix from Cov. Cov must be a 7x7 symmetric positiv
00078         definit matrix (i.e. a covariance matrix) */
00079     void SetCovarianceMatrix(const Matrix<PP_TYPE>& Cov);
00080
00081     /** returns a vector of dimension 7 where first 3 entries are
00082         the position and the last 4 entries are the quaternion orientation */
00083     inline const Vector<PP_TYPE>& GetCQ() const
00084     { return Pose_; }
00085
00086     /** returns the covariance matrix associated with the CQ vector */
00087     inline const Matrix<PP_TYPE>& GetCovarianceMatrix() const
00088     { return Cov_; }
00089
00090     /** set position part of vector and zero covariance matrix */
00091     void SetPosition(const Vector3<PP_TYPE>& C);
00092
00093     /** set orientation part of vector and zero covariance matrix */
00094     void SetOrientation(const Quaternion<PP_TYPE>& q);
00095
00096     /** returns the position (first 3 entries) part of the pose
00097         parametrization vector */
00098     Vector3<PP_TYPE> GetPosition() const;
00099
00100     /** returns the quaternion (last 4 entries) part of the pose
00101         parametrization vector */
00102     Quaternion<PP_TYPE> GetOrientation() const;
00103
00104     bool Load(const std::string& file);
00105
00106     bool Save(const std::string& file) const;
00107
00108     /** Transfroms the pose and associated covariance according to
00109         the point transformation T. Only affine transformations are
00110         supported.
00111         @author woelk 03/2006 */
00112     void Transform(const Matrix4x4<PP_TYPE>& T);
00113
00114     /** Transforms the pose and associated covariance according to
00115         the point transformation parametrized as translation T and rotation Q
00116         @author woelk 05/2006 (untested) */
00117     void Transform(const Vector3<double>& T, const Quaternion<double>& q);
00118
00119   protected:
00120     /** first 3 entries relate to the position */
00121     Vector<PP_TYPE> Pose_;
00122     /** first columns relate to position */
00123     Matrix<PP_TYPE> Cov_;
00124
00125     inline void Pose2CQ_(const Vector<PP_TYPE>& pose, Vector3<PP_TYPE>& position,
00126                          Quaternion<PP_TYPE>& orientation) const{
00127       position[0] = pose[0];
00128       position[1] = pose[1];
00129       position[2] = pose[2];
00130       orientation[0] = pose[3];
00131       orientation[1] = pose[4];
00132       orientation[2] = pose[5];
00133       orientation[3] = pose[6];
00134     };
00135
00136     inline void CQ2Pose_(const Vector3<PP_TYPE>& position,
00137                          const Quaternion<PP_TYPE>& orientation,
00138                          Vector<PP_TYPE>& pose) const{
00139       pose[0] = position[0];
00140       pose[1] = position[1];
00141       pose[2] = position[2];
00142       pose[3] = orientation[0];
00143       pose[4] = orientation[1];
00144       pose[5] = orientation[2];
00145       pose[6] = orientation[3];
00146     };
00147
00148   };
00149
00150   std::ostream& operator<<(std::ostream &os, const PoseParametrization& p);
00151
00152   std::istream& operator>>(std::istream &is, PoseParametrization& p);
00153
00154 }
00155
00156
00157 #endif
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrizationCovariance.cpp Source File

Base » Geometry

PoseParametrizationCovariance.cpp

Go to the documentation of this file.
00001 #include "PoseParametrizationCovariance.hh"
00002 #include <Base/Debug/Exception.hh>
00003 #include <Base/Common/CompareFloatingPoint.hh>
00004 #include <Base/Geometry/PoseParametrization.hh>
00005 #include <Base/Math/Matrix4x4.hh>
00006
00007 using namespace BIAS;
00008
00009 PoseParametrizationCovariance::
00010 PoseParametrizationCovariance()
00011   : Matrix<POSECOVARIANCE_TYPE>(7,7)
00012 {}
00013
00014 PoseParametrizationCovariance::
00015 ~PoseParametrizationCovariance()
00016 {}
00017
00018 void PoseParametrizationCovariance::
00019 SetFromEulerAngles(const Matrix<double>& cov_pose,
00020                    const Vector<double>& pose)
00021 {
00022   if (cov_pose.num_cols() != 6 || cov_pose.num_rows() != 6){
00023     BEXCEPTION("invalid argument "<<cov_pose);
00024   }
00025   if (pose.size() != 6 ){
00026     BEXCEPTION("invalid argument "<<pose);
00027   }
00028   //BIASERR("this is only correct when the trace of the rotation matrix is "
00029   //          "greater than zero");
00030   RMatrixBase R;
00031   R.SetXYZ(pose[3], pose[4], pose[5]);
00032   if (R.Trace()<0.0){
00033     BEXCEPTION("trace of rotation matrix must > 0.0");
00034   }
00035
00036   Matrix<double> J(7, 6, MatrixIdentity);
00037
00038   /** matlab code:
00039       alpha = sym('alpha');
00040       beta = sym('beta');
00041       gamma = sym('gamma');
00042       % compute rotation matrix from euler angles
00043       R_gamma = [ cos(gamma) -sin(gamma) 0
00044       sin(gamma) cos(gamma) 0
00045       0 0 1];
00046       R_beta = [ cos(beta) 0 sin(beta)
00047       0 1 0
00048       -sin(beta) 0 cos(beta) ];
00049       R_alpha = [ 1 0 0
00050       0 cos(alpha) -sin(alpha)
00051       0 sin(alpha) cos(alpha) ];
00052       R = R_gamma * R_beta * R_alpha;
00053       % compute quaternion q from rotation matrix
00054       q = [ 1/2 * sqrt(R(1,1) + R(2,2) + R(3,3) + 1)
00055       (R(3,2)-R(2,3))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1))
00056       (R(1,3)-R(3,1))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1))
00057       (R(2,1)-R(1,2))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1)) ];
00058       % compute jacobian
00059       j = jacobian(q, [alpha, beta, gamma]);
00060       disp('J[0][0] = ');
00061       disp(j(1,1));
00062       disp('J[1][0] = ');
00063       disp(j(2,1));
00064       disp('J[2][0] = ');
00065       disp(j(3,1));
00066       disp('J[3][0] = ');
00067       disp(j(4,1));
00068       disp('J[0][1] = ');
00069       disp(j(1,2));
00070       disp('J[1][1] = ');
00071       disp(j(2,2));
00072       disp('J[2][1] = ');
00073       disp(j(3,2));
00074       disp('J[3][1] = ');
00075       disp(j(4,2));
00076       disp('J[0][2] = ');
00077       disp(j(1,3));
00078       disp('J[1][2] = ');
00079       disp(j(2,3));
00080       disp('J[2][2] = ');
00081       disp(j(3,3));
00082       disp('J[3][2] = ');
00083       disp(j(4,3)); */
00084   double alpha = pose[3], beta = pose[4], gamma = pose[5];
00085   // I guess this should be optimized
00086   J[0][0] =
00087     1/4/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)*(-cos(gamma)*sin(alpha)+sin(gamma)*sin(beta)*cos(alpha)-cos(beta)*sin(alpha));
00088   J[1][0] =
00089     1/2*(cos(beta)*cos(alpha)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(cos(beta)*sin(alpha)+cos(gamma)*sin(alpha)-sin(gamma)*sin(beta)*cos(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-cos(gamma)*sin(alpha)+sin(gamma)*sin(beta)*cos(alpha)-cos(beta)*sin(alpha));
00090   J[2][0] =
00091     1/2*(sin(gamma)*cos(alpha)-cos(gamma)*sin(beta)*sin(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*sin(alpha)+cos(gamma)*sin(beta)*cos(alpha)+sin(beta))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-cos(gamma)*sin(alpha)+sin(gamma)*sin(beta)*cos(alpha)-cos(beta)*sin(alpha));
00092   J[3][0] =
00093     1/2*(-sin(gamma)*sin(alpha)-cos(gamma)*sin(beta)*cos(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*cos(beta)+sin(gamma)*cos(alpha)-cos(gamma)*sin(beta)*sin(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-cos(gamma)*sin(alpha)+sin(gamma)*sin(beta)*cos(alpha)-cos(beta)*sin(alpha));
00094   J[0][1] =
00095     1/4/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)*(-cos(gamma)*sin(beta)+sin(gamma)*cos(beta)*sin(alpha)-sin(beta)*cos(alpha));
00096   J[1][1] =
00097     1/2*(-sin(beta)*sin(alpha)-sin(gamma)*cos(beta)*cos(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(cos(beta)*sin(alpha)+cos(gamma)*sin(alpha)-sin(gamma)*sin(beta)*cos(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-cos(gamma)*sin(beta)+sin(gamma)*cos(beta)*sin(alpha)-sin(beta)*cos(alpha));
00098   J[2][1] =
00099     1/2*(cos(gamma)*cos(beta)*cos(alpha)+cos(beta))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*sin(alpha)+cos(gamma)*sin(beta)*cos(alpha)+sin(beta))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1), (3.0/2.0))*(-cos(gamma)*sin(beta)+sin(gamma)*cos(beta)*sin(alpha)-sin(beta)*cos(alpha));
00100   J[3][1] =
00101     1/2*(-sin(gamma)*sin(beta)-cos(gamma)*cos(beta)*sin(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*cos(beta)+sin(gamma)*cos(alpha)-cos(gamma)*sin(beta)*sin(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1), (3.0/2.0))*(-cos(gamma)*sin(beta)+sin(gamma)*cos(beta)*sin(alpha)-sin(beta)*cos(alpha));
00102   J[0][2] =
00103     1/4/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)*(-sin(gamma)*cos(beta)-sin(gamma)*cos(alpha)+cos(gamma)*sin(beta)*sin(alpha));
00104   J[1][2] =
00105     1/2*(-sin(gamma)*sin(alpha)-cos(gamma)*sin(beta)*cos(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(cos(beta)*sin(alpha)+cos(gamma)*sin(alpha)-sin(gamma)*sin(beta)*cos(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-sin(gamma)*cos(beta)-sin(gamma)*cos(alpha)+cos(gamma)*sin(beta)*sin(alpha));
00106   J[2][2] =
00107     1/2*(cos(gamma)*sin(alpha)-sin(gamma)*sin(beta)*cos(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*sin(alpha)+cos(gamma)*sin(beta)*cos(alpha)+sin(beta))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-sin(gamma)*cos(beta)-sin(gamma)*cos(alpha)+cos(gamma)*sin(beta)*sin(alpha));
00108   J[3][2] =
00109     1/2*(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha))/sqrt(cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1)-1/4*(sin(gamma)*cos(beta)+sin(gamma)*cos(alpha)-cos(gamma)*sin(beta)*sin(alpha))/pow((cos(gamma)*cos(beta)+cos(gamma)*cos(alpha)+sin(gamma)*sin(beta)*sin(alpha)+cos(beta)*cos(alpha)+1),(3.0/2.0))*(-sin(gamma)*cos(beta)-sin(gamma)*cos(alpha)+cos(gamma)*sin(beta)*sin(alpha));
00110
00111   *this = J * cov_pose * J.Transpose();
00112
00113 }
00114
00115
00116 void PoseParametrizationCovariance::
00117 Transform(const Matrix4x4<double>& transf,
00118           const PoseParametrization& pose)
00119 {
00120   Matrix4x4<double> T = transf;
00121   // normalize the transformation such that the last row reads 0 0 0 1
00122   //if ( !Equal(T[3][3], 1.0) ) T /= T[3][3];
00123   if ( !Equal(T[3][0], 0.0) || !Equal(T[3][1], 0.0) ||
00124        !Equal(T[3][2], 0.0) || !Equal(T[3][3], 1.0) ) {
00125     BEXCEPTION("unsupported transformation format (only affine transformations"
00126                " supported): "<<T<<"\n"<<transf);
00127   }
00128
00129   /** The seven dimensional pose p is transformed nonlinearily as follows
00130       f_(0..2) (p) = T[0..2][0..2] * p[0..2]
00131       f_3 (p) = 0
00132       f_(4..6) (p) = T[0..2][0..2] * 1/sin(acos(p[3])) * p[4..6]
00133       explanation:
00134       The pose is composed of the position (p[0..2]) and the orientation
00135       parametrized as a quaternion (p[3..6]). The transformation of the
00136       position is straight forward, i.e. by multiplying with T. The Jacobian of
00137       this transformation is aequivalent to the upper left 3x3 matrix of T.
00138       The union quaternion representing a rotation about the axis [x, y, z]'
00139       with angle a can be interpreted as
00140       q = [ cos(a/2), x* sin(*a/2), y*sin(a/2), z*sin(a/2)]'
00141       and the transformation of the quaternion is aequivalent to the transf.
00142       of the axis [x, y, z] = 1/(sin(acos(q[0])) * q[1..3])
00143       hint: d/dx (1/(sin(acos(x))) = x/(1-x^2)^3/2 */
00144   Matrix<double> J(7, 7, MatrixZero);
00145   double q0 = pose.GetOrientation()[0];
00146   for (int y=0; y<3; y++){
00147     for (int x=0; x<3; x++){
00148       J[y][x] = J[y+4][x+4] = T[y][x];
00149     }
00150     J[y+4][3] = q0 / pow( (1.0 - q0*q0), 1.5);
00151   }
00152   *this = J * *this * J.Transpose();
00153 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/PoseParametrizationCovariance.hh Source File

Base » Geometry

PoseParametrizationCovariance.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __PoseParametrizationCovariance_hh__
00025 #define __PoseParametrizationCovariance_hh__
00026
00027 #include <Base/Math/Matrix.hh>
00028 #include <Base/Math/Matrix3x3.hh>
00029 #include <Base/Math/Matrix4x4.hh>
00030
00031 #define POSECOVARIANCE_TYPE double
00032
00033 namespace BIAS {
00034   // forward declarations
00035   template <class T> class Vector;
00036   class PoseParametrization;
00037
00038   /** @class PoseParametrizationCovariance
00039       @ingroup g_math
00040       @ingroup g_geometry
00041       @brief class encapsulating the transfromations between different pose
00042       parametrizations
00043
00044       This class represents the covariance of a camerpose with
00045       translation and rotation. The pose is assumed to be
00046       tx,ty,tz,q1,q2,q3,q4 with translation t and rotation q as
00047       quaternion. The covariance therefore must be 7x7.
00048       @author woelk 03/2006 */
00049   class BIASGeometryBase_EXPORT PoseParametrizationCovariance
00050     : public Matrix<POSECOVARIANCE_TYPE>
00051   {
00052   public:
00053     PoseParametrizationCovariance(MatrixInitType T)
00054       : Matrix<POSECOVARIANCE_TYPE>(7,7,T){};
00055
00056     PoseParametrizationCovariance();
00057
00058     explicit PoseParametrizationCovariance(const Matrix<POSECOVARIANCE_TYPE>& T)
00059       : Matrix<POSECOVARIANCE_TYPE>(T){};
00060
00061     PoseParametrizationCovariance(const TNT::Matrix<POSECOVARIANCE_TYPE>& T)
00062       : Matrix<POSECOVARIANCE_TYPE>(T){};
00063
00064     ~PoseParametrizationCovariance();
00065
00066     Matrix3x3<POSECOVARIANCE_TYPE> GetCovC();
00067
00068     Matrix4x4<POSECOVARIANCE_TYPE> GetCovQ();
00069
00070     inline void Clear() {}
00071
00072     /** Given a 6D pose (position and euler angles) and its
00073         associated covariance, the function transforms the covaruiance into
00074         pose and quaternion parametrization. The 1st 3 entries of the 6D pose
00075         must be the euclidean position coordinates and the last 3 entries
00076         must be the Euler angles such that the final rotation matrix is
00077         composed from Rz * Ry * Rx. Where Rx denotes the rotation matrix
00078         describing the rotation around the x axis, ....
00079         @author woelk 03/2006 */
00080     void SetFromEulerAngles(const Matrix<double>& cov_pose,
00081                             const Vector<double>& pose);
00082
00083     /** Transfroms the covariance associated with pose according to
00084         the point transformation transf. Only affine transformations are
00085         supported.
00086         @author woelk 03/2006 */
00087     void Transform(const Matrix4x4<double>& transf,
00088                    const PoseParametrization& pose);
00089
00090
00091
00092   protected:
00093   }; // class
00094
00095
00096
00097 } // namespace
00098
00099
00100 #endif // __PoseParametrizationCovariance_hh__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: precompiled.cpp Source File

precompiled.cpp

Go to the documentation of this file.
00001 /** (global) precompiled header compilation file.
00002 Jan Woetzel.
00003 */
00004
00005 //#include <Base/Common/BIASpragma.hh>
00006 #include "precompiled.h"
00007
00008
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: precompiled.h Source File

precompiled.h

Go to the documentation of this file.
00001 /** file for precompiled header usage
00002 @author Jan Woetzel */
00003
00004 //#pragma once
00005 //#include <yvals.h>
00006 //#include <stdio.h>
00007 //#include <stdlib.h>
00008 //#include <iostream>
00009 //#include <fstream>
00010 //#include <vector>
00011 //#include <string>
00012 //#include <sstream>
00013 //#include <map>
00014 //#include <algorithm>
00015
00016
00017 // save (pre-)compilation state:
00018 //#ifdef WIN32
00019 //#  pragma hdrstop
00020 //#endif
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Projection.cpp Source File

Geometry

Projection.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Geometry/Projection.hh>
00027 #include <Geometry/ProjectionParametersIO.hh>
00028 #include <Geometry/ProjectionParametersPerspective.hh>
00029 #include <Geometry/ProjectionParametersProjective.hh>
00030 #include <Geometry/ProjectionParametersSpherical.hh>
00031 #include <Geometry/ProjectionParametersZoom.hh>
00032 #include <iostream>
00033
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038
00039 namespace BIAS {
00040
00041 #ifdef BIAS_HAVE_XML2
00042 int Projection::ReadFromCamParamFile(const string& filename) {
00043
00044   // read datafile
00045   CameraData cd, cd2;
00046   vector<CameraData> vcd;
00047   if(ProjectionParametersIO::ReadRigData(filename, vcd) != 0)
00048     return -1;
00049
00050   // initialize parameter vector
00051   vecParameters_.clear();
00052
00053   for (unsigned int i=0; i<vcd.size(); i++) {
00054     ProjectionParametersBase* ppb;
00055     if (vcd[i].LensIsSpherical_) {
00056       //initialize fisheye camera
00057       ProjectionParametersSpherical* pps = new ProjectionParametersSpherical();
00058       pps->SetRadius(vcd[i].radius_);
00059       pps->SetUndistortion(vcd[i].AngleCorrX_, vcd[i].AngleCorrY_,
00060                            vcd[i].radius_);
00061       ppb = (ProjectionParametersBase*) pps;
00062     } else {
00063       if (vcd[i].zoomCamera_){
00064         // initialize zoom camera
00065         ProjectionParametersZoom* ppz =
00066           new ProjectionParametersZoom();
00067         std::vector<CPDiscreteParam>::iterator it;
00068         ppz->Clear();
00069         for (unsigned int j=0; j<vcd[i].knownparams_vect_.size(); j++) {
00070            ppz->AddZoomStep(vcd[i].knownparams_vect_[j].zoom,
00071                            vcd[i].knownparams_vect_[j].focallength,
00072                            vcd[i].knownparams_vect_[j].kc1,
00073                            vcd[i].knownparams_vect_[j].kc2,
00074                            vcd[i].knownparams_vect_[j].kc3,
00075                            vcd[i].knownparams_vect_[j].kc4);
00076         }
00077         ppb = (ProjectionParametersBase*) ppz;
00078       } else {
00079         // initialize perspective camera
00080         ProjectionParametersPerspective* ppp =
00081           new ProjectionParametersPerspective();
00082         // convert fl to meter
00083         ppp->SetFocalLengthAndAspect( vcd[i].focallengthDef_,
00084                                       vcd[i].aspectratio_);
00085         ppp->SetUndistortion(vcd[i].kc1Def_,vcd[i].kc2Def_,
00086                              vcd[i].kc3Def_,vcd[i].kc4Def_);
00087         ppb = (ProjectionParametersBase*) ppp;
00088       }
00089     }
00090     // Set base parameters
00091     ppb->SetImageSize(vcd[i].width_, vcd[i].height_);
00092     ppb->SetPrincipal(vcd[i].principalX_, vcd[i].principalY_);
00093     double eps = 1e-8;
00094     if ((vcd[i].aspectratio_ < vcd[i].cellSizeX_/vcd[i].cellSizeY_-eps) ||
00095         (vcd[i].aspectratio_ > vcd[i].cellSizeX_/vcd[i].cellSizeY_+eps)) {
00096       BIASERR("Aspect ratio and cellsizes do not match!");
00097       BIASABORT;
00098     }
00099     ppb->SetAspectratio(vcd[i].aspectratio_);
00100     ppb->SetC(vcd[i].PoseInRigCenter_);
00101     RMatrix R;
00102     Quaternion<double> Q;
00103     R.SetXYZ(vcd[i].PoseInRigPitch_, vcd[i].PoseInRigYaw_,
00104              vcd[i].PoseInRigRoll_);
00105     R.GetQuaternion(Q);
00106     ppb->SetQ(Q);
00107
00108     vecParameters_.push_back(ppb);
00109   }
00110
00111   return 0;
00112 }
00113 #endif // BIAS_HAVE_XML2
00114
00115
00116 void Projection::CreatePerspective(const Pose& pose,
00117                                    const KMatrix& K,
00118                                    int width, int height,
00119                                    const Vector4<double>&
00120                                    UndistortionCoefficients) {
00121
00122   ProjectionParametersPerspective* ppp =
00123     new ProjectionParametersPerspective();
00124
00125   ppp->SetFocalLengthAndAspect(K.GetFx(), K.GetFy()/K.GetFx());
00126   ppp->SetUndistortion(UndistortionCoefficients[0],
00127                        UndistortionCoefficients[1],
00128                        UndistortionCoefficients[2],
00129                        UndistortionCoefficients[3]);
00130   ppp->SetImageSize(width, height);
00131   ppp->SetPrincipal(K.GetHx(), K.GetHy());
00132   ppp->SetPose(pose);
00133   vecParameters_.push_back((ProjectionParametersBase*)ppp);
00134 }
00135
00136
00137 HomgPoint2D Projection::Project(const HomgPoint3D &X, unsigned int cam,
00138                                 bool IgnoreDistortion) const
00139 {
00140   if (cam==0) {
00141     Vector3<double> x;
00142     vecParameters_[cam]->GetExternals().Mult(X, x);
00143     return vecParameters_[cam]->ProjectLocal(x, IgnoreDistortion);
00144   }
00145   BIASERR("To be implemented");
00146   BIASABORT;
00147   HomgPoint2D h(0,0,0);
00148   return h;
00149 }
00150
00151
00152 bool Projection::
00153 DoesPointProjectIntoImage(const HomgPoint3D& X,
00154                           HomgPoint2D& x,
00155                           unsigned int cam,
00156                           bool IgnoreDistortion) const
00157 {
00158   if(cam!=0) {
00159     BIASERR("Projection check only implemented for cam=0\n");
00160     return false;
00161   }
00162
00163   return vecParameters_[cam]->DoesPointProjectIntoImage(X, x,
00164                                                         IgnoreDistortion);
00165 }
00166
00167
00168
00169 Vector3<double> Projection::UnProjectToRay(const HomgPoint2D& pos,
00170                                            unsigned int cam,
00171                                            bool IgnoreDistortion) const {
00172   if (cam==0) {
00173     Vector3<double> x, rx;
00174     x = vecParameters_[cam]->UnProjectLocal(pos, IgnoreDistortion);
00175     RMatrix R = vecParameters_[cam]->GetR();
00176     R.Mult(x, rx);
00177     return rx;
00178   }
00179
00180   BIASERR("To be implemented");
00181   BIASABORT;
00182   HomgPoint2D h(0,0,0);
00183   return h;
00184 }
00185
00186
00187 Vector3<double> Projection::UnProjectToPoint(const HomgPoint2D& pos,
00188                                              double depth,
00189                                              unsigned int cam,
00190                                              bool IgnoreDistortion) const
00191 {
00192   Vector3<double> opticalray = UnProjectToRay(pos, cam, IgnoreDistortion);
00193   if(opticalray.NormL2()==0.0) {
00194     BIASERR("returned ray has zero length!");
00195     return Vector3<double> (0,0,0);
00196   }
00197   opticalray.Normalize();
00198   return (GetC() + depth*opticalray);
00199 }
00200
00201 Vector3<double> Projection::UnProjectToPointLocal(const HomgPoint2D& pos,
00202                                                   const double& depth,
00203                                                   unsigned int camSystem,
00204                                                   unsigned int cam,
00205                                                   bool IgnoreDistortion)const {
00206   if (camSystem != cam) {
00207     BIASERR("Not implemented.");
00208     BIASABORT;
00209   }
00210   Vector3<double>
00211     x(vecParameters_[cam]->UnProjectToPointLocal(pos, depth,
00212                                                  IgnoreDistortion));
00213   return x;
00214 }
00215
00216
00217 Matrix3x3<double> Projection::
00218 UnProjectToCovLocal(const HomgPoint2D& pos, const Matrix3x3<double>& cov2D,
00219                     const double& /*depth*/, unsigned int camSystem,
00220                     unsigned int cam, bool IgnoreDistortion) const
00221 {
00222   if (camSystem != cam) {
00223     BIASERR("Not implemented.");
00224     BIASABORT;
00225   }
00226   return vecParameters_[cam]->UnProjectLocal(pos, cov2D, IgnoreDistortion);
00227 }
00228
00229
00230
00231 Vector3<double> Projection::UnProjectToRayLocal(const HomgPoint2D& pos,
00232                                                 unsigned int camSystem,
00233                                                 unsigned int cam,
00234                                                 bool IgnoreDistortion) const {
00235   if(cam!=0) {
00236     BIASERR("Not implemented.");
00237     BIASABORT;
00238   }
00239   if (camSystem != cam) {
00240     BIASERR("Not implemented.");
00241     BIASABORT;
00242   }
00243   Vector3<double> x = vecParameters_[cam]->UnProjectLocal(pos,
00244                                                           IgnoreDistortion);
00245   return x;
00246 }
00247
00248 #ifdef BIAS_HAVE_XML2
00249
00250 int Projection::XMLGetClassName(string& TopLevelTag,
00251                                 double& Version) const{
00252   TopLevelTag = "Projection";
00253   Version = 0.1;
00254   return 0;
00255 }
00256
00257 int Projection::XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const{
00258
00259   xmlNodePtr theNode;
00260   string TopLevelName;
00261   double Version;
00262   if(identifier_.size()>0) {
00263     theNode = XMLObject.addChildNode(Node, "Identifier");
00264     XMLObject.addContent(theNode, identifier_);
00265   }
00266   std::vector<ProjectionParametersBase* >::const_iterator it;
00267   for (it=vecParameters_.begin(); it!=vecParameters_.end(); it++) {
00268     (**it).XMLGetClassName(TopLevelName, Version);
00269     theNode = XMLObject.addChildNode(Node, TopLevelName);
00270     XMLObject.addAttribute(theNode, "Version", Version);
00271     (*it)->XMLOut(theNode, XMLObject);
00272   }
00273
00274   return 0;
00275 }
00276
00277
00278 int Projection::XMLIn(const xmlNodePtr Node, XMLIO& XMLObject){
00279
00280   //delete old cameras
00281   for (unsigned int i=0; i<vecParameters_.size(); i++)
00282     delete vecParameters_[i];
00283   vecParameters_.clear();
00284
00285   string TopLevelName;
00286   xmlNodePtr childNode;
00287   childNode = XMLObject.getFirstChild(Node);
00288   while (childNode!=NULL) {
00289     string nodename = XMLObject.getNodeName(childNode);
00290     if (nodename.compare("ProjectionParametersPerspective")==0) {
00291       ProjectionParametersPerspective* pp =
00292         new ProjectionParametersPerspective();
00293       if(pp->XMLIn(childNode, XMLObject)!=0)
00294         return -1;
00295       vecParameters_.push_back(pp);
00296     }
00297     if (nodename.compare("ProjectionParametersSpherical")==0) {
00298       ProjectionParametersSpherical* pp =
00299         new ProjectionParametersSpherical();
00300       if(pp->XMLIn(childNode, XMLObject)!=0)
00301     return -1;
00302       vecParameters_.push_back(pp);
00303     }
00304     if (nodename.compare("ProjectionParametersProjective")==0) {
00305       ProjectionParametersProjective* pp =
00306         new ProjectionParametersProjective();
00307       if(pp->XMLIn(childNode, XMLObject)!=0)
00308     return -1;
00309       vecParameters_.push_back(pp);
00310     }
00311     if (nodename.compare("ProjectionParametersZoom")==0) {
00312       ProjectionParametersZoom* pp = new ProjectionParametersZoom();
00313       if(pp->XMLIn(childNode, XMLObject)!=0)
00314     return -1;
00315       vecParameters_.push_back(pp);
00316     }
00317     if (nodename.compare("Identifier")==0) {
00318       identifier_ = XMLObject.getNodeContentString(childNode);
00319     }
00320     childNode = XMLObject.getNextChild(childNode);
00321   }
00322   if (vecParameters_.size()>0) {
00323     return 0;
00324   } else {
00325     return -1;
00326   }
00327 }
00328
00329 #endif // BIAS_HAVE_XML2
00330
00331
00332 BIAS::Quaternion<double>
00333 Projection::GetQ(unsigned int cam) const
00334 {
00335   BIASASSERT(cam<vecParameters_.size());
00336   if (cam==0)
00337     return vecParameters_[cam]->GetQ();
00338   else {
00339     BIASERR("not yet defined behaviour !");
00340     BIASEXIT("not yet defined behaviour ");
00341     return Quaternion<double>();
00342   }
00343 }
00344
00345
00346 } // namespace BIAS
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Projection.hh Source File

Geometry

Projection.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_Projection_hh__
00027 #define __BIAS_Projection_hh__
00028 #include <bias_config.h>
00029
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Math/Matrix4x4.hh>
00032 #include <Base/Math/Vector4.hh>
00033 #include <Base/Geometry/HomgPoint3D.hh>
00034 #include <Base/Geometry/Quaternion.hh>
00035 #include <Geometry/Pose.hh>
00036 #include <Geometry/PMatrix.hh>
00037 #include <Geometry/ProjectionParametersBase.hh>
00038 #include <Geometry/ProjectionParametersPerspective.hh>
00039
00040
00041 #ifdef BIAS_HAVE_XML2
00042 #  include <Base/Common/XMLBase.hh>
00043 #endif // BIAS_HAVE_XML2
00044
00045
00046 namespace BIAS {
00047
00048
00049   /** @class Projection
00050
00051   This class hides the underlying projection model, like projection matrix,
00052   spherical camera, lens distortion, ...
00053
00054   */
00055   class BIASGeometry_EXPORT Projection
00056 #ifdef BIAS_HAVE_XML2
00057     : public XMLBase
00058 #endif // BIAS_HAVE_XML2
00059   {
00060   public:
00061     Projection() {
00062       vecParameters_.clear();
00063     }
00064
00065
00066     Projection(const ProjectionParametersBase& p) {
00067       vecParameters_.clear();
00068       vecParameters_.push_back(p.Clone());
00069     }
00070
00071     Projection(const Projection& p) {
00072       (*this) = p;
00073     }
00074
00075     const Projection& operator=(const Projection& p) {
00076       // delete old paramters if any
00077       for (unsigned int i=0; i<vecParameters_.size(); i++)
00078         delete vecParameters_[i];
00079       // copy new parameters
00080       vecParameters_.resize(p.vecParameters_.size());
00081       for (unsigned int i=0; i<p.vecParameters_.size(); i++)
00082         vecParameters_[i] = p.vecParameters_[i]->Clone();
00083       return *this;
00084     }
00085
00086     void CreatePerspective(const BIAS::Pose& pose,
00087                            const BIAS::KMatrix& K,
00088                            int width, int height,
00089                            const BIAS::Vector4<double>&
00090                            UndistortionCoefficients = BIAS::Vector4<double>());
00091
00092 #ifdef BIAS_HAVE_XML2
00093     /**
00094      *  @brief Reads a camera data XML file and constructs the
00095      *  ProjectionParametersBase-pointer, using the ProjectionParametersIO
00096      *  and the CameraParameter file format.
00097      *  @param filename Name of the XML parameter file
00098      */
00099     int ReadFromCamParamFile(const std::string& filename);
00100 #endif // BIAS_HAVE_XML2
00101
00102     bool IsEmpty() const { return (vecParameters_.size()==0);};
00103
00104
00105     /** @brief parameter read function */
00106     const ProjectionParametersBase* GetParameters(unsigned int cam = 0) const {
00107       return vecParameters_[cam];
00108     }
00109
00110     /** @brief parameter write function has to invalidate cache ! */
00111     ProjectionParametersBase* GetParameters(unsigned int cam = 0) {
00112       return vecParameters_[cam];
00113     }
00114
00115     /** @brief return Center of camera with index cam
00116
00117     if cam>0 this is a relative pose in the coordinate system of cam 0 */
00118     inline Vector3<double> GetC(unsigned int cam = 0) const {
00119       if (cam==0)
00120         return vecParameters_[cam]->GetC();
00121       else {
00122         BIASERR("not yet defined behaviour !");
00123         BIASABORT;
00124         return Vector3<double>(0,0,0);
00125       }
00126     };
00127
00128     /** @brief return RMatrix of camera with index cam
00129     if cam>0 this is a relative pose in the coordinate system of cam 0
00130     */
00131     inline RMatrix GetR(unsigned int cam = 0) const {
00132       BIASASSERT(cam<vecParameters_.size());
00133       if (cam==0) return vecParameters_[cam]->GetR();
00134       else {
00135         BIASERR("not yet defined behaviour !");
00136         BIASABORT;
00137         return RMatrix();
00138       }
00139     };
00140
00141
00142     /** @brief return rotation quaternion of camera with index cam
00143         if cam>0 this is a relative pose in the coordinate system of cam 0
00144     */
00145     BIAS::Quaternion<double> GetQ(unsigned int cam = 0) const;
00146
00147
00148     /** @brief return const ref to Pose
00149         @author koeser 02/2006
00150     */
00151     inline Matrix3x4<double> GetExternals(unsigned int cam = 0) const {
00152       BIASASSERT(cam<vecParameters_.size());
00153       if (cam==0) {
00154         return vecParameters_[cam]->GetExternals();
00155       } else {
00156         BIASERR("not yet defined behaviour !");
00157         BIASABORT;
00158         return vecParameters_[0]->GetExternals();
00159       }
00160     }
00161
00162     /** @brief Get the Pose covariance
00163     */
00164     virtual Matrix<double> GetCov(unsigned int cam = 0) const {
00165       if (cam==0) return vecParameters_[cam]->GetCov();
00166       else {
00167         BIASERR("not yet defined behaviour !");
00168         BIASABORT;
00169         return Matrix<double>(7,7);
00170       }
00171     }
00172
00173     /** @brief return complete pose object */
00174     virtual const Pose&
00175     GetPose(unsigned int cam = 0) const {
00176       if (cam!=0) {
00177         BIASERR("not yet defined behaviour !");
00178         BIASABORT;
00179       }
00180       return vecParameters_[cam]->GetPose();
00181     }
00182
00183     /** @brief Set the Pose covariance
00184     */
00185     virtual void SetCov(const Matrix<double>& Cov, unsigned int cam = 0) {
00186       if (cam==0) vecParameters_[cam]->SetCov(Cov);
00187       else {
00188         BIASERR("not yet defined behaviour !");
00189         BIASABORT;
00190       }
00191     }
00192
00193     void SetC(const Vector3<double>& C, unsigned int cam = 0) {
00194       if (cam==0) vecParameters_[cam]->SetC(C);
00195       else {
00196         BIASERR("not yet defined behaviour !");
00197         BIASABORT;
00198       }
00199     }
00200     /** @brief Set the Pose
00201     */
00202     virtual void SetPose(const BIAS::Pose pose, unsigned int cam = 0) {
00203       if (cam==0) vecParameters_[cam]->SetPose(pose);
00204       else {
00205         BIASERR("not yet defined behaviour !");
00206         BIASABORT;
00207       }
00208     }
00209
00210
00211     /** @brief returns the 2d projection of X in camera cam,
00212         where X is given in the global coordinate frame (not the rig)
00213         (need HomgPoint3D to map points at infinity)
00214     */
00215     HomgPoint2D Project(const HomgPoint3D &X, unsigned int cam = 0,
00216                         bool IgnoreDistortion = false) const;
00217
00218     /** Checks if 3D point projects into specified image and returns
00219      *  belonging 2D image point.
00220      *  @param X assumes homogenized point!
00221      *  @author bartczak
00222      */
00223     bool DoesPointProjectIntoImage(const BIAS::HomgPoint3D& X,
00224                                    BIAS::HomgPoint2D& x,
00225                                    unsigned int cam = 0,
00226                                    bool IgnoreDistortion = false) const;
00227
00228
00229     /** @brief calculates the viewing ray in the global coordinate frame
00230       (not the rig) from the camera center which belongs to the given image
00231       position. The resulting vector3 may have any length.
00232     */
00233     Vector3<double> UnProjectToRay(const HomgPoint2D& pos,
00234                                    unsigned int cam = 0,
00235                                    bool IgnoreDistortion = false) const;
00236
00237     /** @brief calculates a 3D point in
00238         the global (not the rig) coordinate system, which
00239         belongs to the image position pos with distance depth to the
00240         camera center.
00241     */
00242     Vector3<double> UnProjectToPoint(const HomgPoint2D& pos,
00243                                      double depth,
00244                                      unsigned int cam = 0,
00245                                      bool IgnoreDistortion = false) const;
00246
00247     /** @brief calculates a 3D point in
00248         a local camera coordinate system specified by camSystem, which
00249         belongs to the image position pos in cam with distance depth to the
00250         camera center cam.
00251         @author koeser  */
00252     Vector3<double> UnProjectToPointLocal(const HomgPoint2D& pos,
00253                                           const double& depth,
00254                                           unsigned int camSystem = 0,
00255                                           unsigned int cam = 0,
00256                                           bool IgnoreDistortion = false) const;
00257
00258
00259     /** @brief calculate 3D point and associated covariance by unprojection
00260         @author woelk 03/2006 */
00261     Matrix3x3<double> UnProjectToCovLocal(const HomgPoint2D& pos,
00262                                           const Matrix3x3<double>& cov2D,
00263                                           const double& depth,
00264                                           unsigned int camSystem = 0,
00265                                           unsigned int cam = 0,
00266                                           bool IgnoreDistortion = false) const;
00267
00268
00269
00270
00271     /** @brief calculates a 3D ray in
00272         a local camera coordinate system specified by camSystem, which
00273         belongs to the image position pos in cam.
00274         */
00275     Vector3<double> UnProjectToRayLocal(const HomgPoint2D& pos,
00276                                         unsigned int camSystem = 0,
00277                                         unsigned int cam = 0,
00278                                         bool IgnoreDistortion = false) const;
00279
00280     virtual ~Projection() {
00281       for (unsigned int i=0; i<vecParameters_.size(); i++)
00282         delete vecParameters_[i];
00283     }
00284
00285 #ifdef BIAS_HAVE_XML2
00286     /** @brief specialization of XML block name function */
00287     virtual int XMLGetClassName(std::string& TopLevelTag,
00288                                 double& Version) const;
00289
00290     /** @brief specialization of XML write function */
00291     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00292
00293     /** @brief specialization of XML read function */
00294     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00295 #endif // BIAS_HAVE_XML2
00296
00297     /** @brief adapt internal params to resampled image
00298         @param ratio 2.0 = downsample, 0.5 = upsample
00299     */
00300     inline void Rescale(float ratio, unsigned int cam = 0) {
00301       vecParameters_[cam]->Rescale(ratio);
00302     }
00303
00304
00305     inline void SetIdentifier(const std::string& identString) {
00306       identifier_ = identString;
00307     }
00308
00309     inline std::string GetIdentifier() const {
00310       return identifier_;
00311     }
00312
00313     friend std::ostream& operator<<(std::ostream &os, const Projection& p);
00314
00315
00316   protected:
00317
00318     // exports for dll (cmenk)
00319     BIAS_EXPORT_STL_VECTOR( BIASGeometry_EXPORT, ProjectionParametersBase* )
00320
00321     /// the intrinsics (like K, ...) of the camera usually only one
00322     /// only in rig mode there may be many, in that case vecIntrinsics[0]
00323     /// holds the external pose while the others hold the internal pose
00324     /// (pose in the coordinate system of the first camera)
00325     std::vector<ProjectionParametersBase* > vecParameters_;
00326
00327     /** Multifunctional identifier.
00328      */
00329     std::string identifier_;
00330
00331   };
00332
00333   inline std::ostream& operator<<(std::ostream &os, const Projection& p) {
00334     os <<"Identifier: """<<p.identifier_<<"""";
00335     os <<"vecParameters_.size(): "<<p.vecParameters_.size()<<std::endl;
00336     std::vector<ProjectionParametersBase* >::const_iterator it;
00337     for (it = p.vecParameters_.begin(); it!=p.vecParameters_.end(); it++){
00338       os<< **it;
00339       if (ProjectionParametersPerspective *pp
00340       = dynamic_cast<ProjectionParametersPerspective *>(*it)) os <<*pp;
00341     }
00342     return os;
00343   }
00344
00345
00346 } // end namespace
00347
00348
00349 #endif //__BIAS_Projection_hh__
00350
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ProjectionGUI.cpp Source File

Gui

ProjectionGUI.cpp

Go to the documentation of this file.
00001 #include <Gui/ProjectionGUI.hh>
00002 #include <Geometry/ProjectionParametersSpherical.hh>
00003 #include <Gui/StringConv.hh>
00004 #include <sstream>
00005
00006 using namespace std;
00007 using namespace BIAS;
00008
00009 /*
00010 ===============================================================================
00011 VectorPanel
00012 ===============================================================================
00013 */
00014
00015 VectorPanel::VectorPanel(wxWindow* parent, wxWindowID id, bool editable)
00016   : wxPanel(parent, id)
00017 {
00018   editable_ = editable;
00019 }
00020
00021 void VectorPanel::SetVector(const Vector<double>& vector)
00022 {
00023   // need to re-create controls?
00024   if (vector.Size() != controls_.size())
00025   {
00026     DestroyChildren();
00027     wxSizer* sizer = new wxFlexGridSizer(vector.Size(), 1);
00028     SetSizer(sizer);
00029
00030     for (int i = 0; i < (int)vector.Size(); i++)
00031     {
00032       wxTextCtrl* control = new wxTextCtrl(this, GetId());
00033       control->SetEditable(editable_);
00034       sizer->Add(control);
00035       controls_.push_back(control);
00036     }
00037   }
00038
00039   // fill controls
00040   for (int i = 0; i < (int)vector.Size(); i++)
00041   {
00042     if (FindFocus() == controls_[i]) continue;
00043
00044     stringstream str;
00045     str << vector[i];
00046     controls_[i]->SetValue(AsciiToWx(str.str()));
00047   }
00048 }
00049
00050 Vector<double> VectorPanel::GetVector() const
00051 {
00052   Vector<double> v(controls_.size());
00053   for (int i = 0; i < (int)controls_.size(); i++)
00054   {
00055     stringstream str(WxToAscii(controls_[i]->GetValue()));
00056     str >> v[i];
00057   }
00058   return v;
00059 }
00060
00061 /*
00062 ===============================================================================
00063 MatrixPanel
00064 ===============================================================================
00065 */
00066
00067 MatrixPanel::MatrixPanel(wxWindow* parent, wxWindowID id, bool editable)
00068   : wxPanel(parent, id)
00069 {
00070   editable_ = editable;
00071 }
00072
00073 void MatrixPanel::SetMatrix(const Matrix<double>& matrix)
00074 {
00075   // need to re-create controls?
00076   if ((int)matrix.GetRows() != rows_ || (int)matrix.GetCols() != cols_)
00077   {
00078     DestroyChildren();
00079     wxSizer* sizer = new wxFlexGridSizer(matrix.GetRows(), matrix.GetCols());
00080     SetSizer(sizer);
00081
00082     rows_ = matrix.GetRows();
00083     cols_ = matrix.GetCols();
00084
00085     for (int i = 0; i < rows_; i++)
00086     {
00087       for (int j = 0; j < cols_; j++)
00088       {
00089         wxTextCtrl* control = new wxTextCtrl(this, GetId());
00090         control->SetEditable(editable_);
00091         sizer->Add(control);
00092         controls_.push_back(control);
00093       }
00094     }
00095   }
00096
00097   // fill controls
00098   for (int i = 0; i < rows_; i++)
00099   {
00100     for (int j = 0; j < cols_; j++)
00101     {
00102       if (FindFocus() == controls_[i*cols_+j]) continue;
00103
00104       stringstream str;
00105       str << matrix.GetDataArray()[i][j];
00106       controls_[i*cols_+j]->SetValue(AsciiToWx(str.str()));
00107     }
00108   }
00109 }
00110
00111 Matrix<double> MatrixPanel::GetMatrix()
00112 {
00113   Matrix<double> matrix(rows_, cols_);
00114   for (int i = 0; i < rows_; i++)
00115   {
00116     for (int j = 0; j < cols_; j++)
00117     {
00118       stringstream str(WxToAscii(controls_[i*cols_+j]->GetValue()));
00119       str >> matrix[i][j];
00120     }
00121   }
00122   return matrix;
00123 }
00124
00125 /*
00126 ===============================================================================
00127 ProjectionGUI
00128 ===============================================================================
00129 */
00130
00131 // event ids
00132 enum
00133 {
00134   ID_New,
00135   ID_Load,
00136   ID_Save,
00137   ID_NormalizeQuaternion
00138 };
00139
00140 // panel ids
00141 enum
00142 {
00143   ID_Center,
00144   ID_Quaternion,
00145   ID_RMatrix,
00146   ID_ImageSize,
00147   ID_AspectRatio,
00148   ID_Principal,
00149   ID_KMatrix,
00150   ID_FocalLength,
00151   ID_Undistortion,
00152   ID_Radius
00153 };
00154
00155 BEGIN_EVENT_TABLE(ProjectionGUI, wxPanel)
00156   EVT_TEXT(-1, ProjectionGUI::OnModified)
00157   EVT_BUTTON(ID_NormalizeQuaternion, ProjectionGUI::OnNormalizeQuaternion)
00158   EVT_BUTTON(ID_New,  ProjectionGUI::OnNew)
00159   EVT_BUTTON(ID_Load, ProjectionGUI::OnLoad)
00160   EVT_BUTTON(ID_Save, ProjectionGUI::OnSave)
00161 END_EVENT_TABLE()
00162
00163 ProjectionGUI::ProjectionGUI(wxWindow* parent, wxWindowID id,
00164                              const wxPoint& pos, const wxSize& size,
00165                              long style, const wxString& name)
00166   : wxPanel(parent, id, pos, size, style, name)
00167 {
00168   panelCenter_        = NULL;
00169   panelQuaternion_    = NULL;
00170   panelRMatrix_       = NULL;
00171   panelImageSize_     = NULL;
00172   panelAspectRatio_   = NULL;
00173   panelPrincipal_     = NULL;
00174   panelKMatrix_       = NULL;
00175   panelFocalLength_   = NULL;
00176   panelUndistortion_  = NULL;
00177   panelRadius_        = NULL;
00178
00179   selfModifying_ = false;
00180
00181   projectionPanel_ = new wxScrolledWindow(this);
00182   projectionPanel_->SetScrollRate(1, 1);
00183
00184   wxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
00185   buttonSizer->Add(new wxButton(this, ID_New,  wxT("New")));
00186   buttonSizer->Add(new wxButton(this, ID_Load, wxT("Load")));
00187   buttonSizer->Add(new wxButton(this, ID_Save, wxT("Save")));
00188
00189   wxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
00190   mainSizer->Add(buttonSizer, 0, wxALL, 5);
00191   mainSizer->Add(projectionPanel_, 1, wxEXPAND | wxALL, 5);
00192
00193   SetSizer(mainSizer);
00194 }
00195
00196 void ProjectionGUI::SetProjection(const Projection& projection)
00197 {
00198   // clear old projection panel
00199   projectionPanel_->DestroyChildren();
00200
00201   // create sizer
00202   wxFlexGridSizer* sizer = new wxFlexGridSizer(2, 5, 5);
00203   sizer->AddGrowableCol(1);
00204   projectionPanel_->SetSizer(sizer);
00205
00206   // base parameters
00207   const ProjectionParametersBase* paramsBase = projection.GetParameters();
00208
00209   panelCenter_      = AddVectorPanel(wxT("Center"),       ID_Center,      true);
00210   panelQuaternion_  = AddVectorPanel(wxT("Quaternion"),   ID_Quaternion,  true);
00211
00212   sizer->AddSpacer(0);
00213   sizer->Add(new wxButton(projectionPanel_, ID_NormalizeQuaternion, wxT("Normalize Quaternion")));
00214
00215   panelRMatrix_     = AddMatrixPanel(wxT("R Matrix"),     ID_RMatrix,     false);
00216   panelImageSize_   = AddVectorPanel(wxT("Image Size"),   ID_ImageSize,   true);
00217   panelAspectRatio_ = AddVectorPanel(wxT("Aspect Ratio"), ID_AspectRatio, true);
00218   panelPrincipal_   = AddVectorPanel(wxT("Principal"),    ID_Principal,   true);
00219
00220   // perspective parameters
00221   const ProjectionParametersPerspective* paramsPersp =
00222     dynamic_cast<const ProjectionParametersPerspective*>(paramsBase);
00223   if (paramsPersp != NULL)
00224   {
00225     panelKMatrix_       = AddMatrixPanel(wxT("K Matrix"),     ID_KMatrix,       false);
00226     panelFocalLength_   = AddVectorPanel(wxT("Focal Length"), ID_FocalLength,   true);
00227     panelUndistortion_  = AddVectorPanel(wxT("Undistortion"), ID_Undistortion,  true);
00228   }
00229   else
00230   {
00231     panelKMatrix_       = NULL;
00232     panelFocalLength_   = NULL;
00233     panelUndistortion_  = NULL;
00234   }
00235
00236   // spherical parameters
00237   const ProjectionParametersSpherical* paramsSpherical =
00238     dynamic_cast<const ProjectionParametersSpherical*>(paramsBase);
00239   if (paramsSpherical != NULL)
00240   {
00241     panelRadius_ = AddVectorPanel(wxT("Radius"), ID_Radius, true);
00242   }
00243   else
00244   {
00245     panelRadius_ = NULL;
00246   }
00247
00248   projection_ = projection;
00249
00250   // fill gui with values from projection
00251   UpdateGUI();
00252
00253   sizer->Layout();
00254   Layout();
00255 }
00256
00257 const Projection& ProjectionGUI::GetProjection() const
00258 {
00259   return projection_;
00260 }
00261
00262 VectorPanel* ProjectionGUI::AddVectorPanel(const wxString& name,
00263                                            wxWindowID id, bool editable)
00264 {
00265   VectorPanel* panel = new VectorPanel(projectionPanel_, id, editable);
00266
00267   wxSizer* sizer = projectionPanel_->GetSizer();
00268   sizer->Add(new wxStaticText(projectionPanel_, -1, name));
00269   sizer->Add(panel, 1, wxEXPAND);
00270
00271   return panel;
00272 }
00273
00274 MatrixPanel* ProjectionGUI::AddMatrixPanel(const wxString& name,
00275                                            wxWindowID id, bool editable)
00276 {
00277   MatrixPanel* panel = new MatrixPanel(projectionPanel_, id, editable);
00278
00279   wxSizer* sizer = projectionPanel_->GetSizer();
00280   sizer->Add(new wxStaticText(projectionPanel_, -1, name));
00281   sizer->Add(panel, 1, wxEXPAND);
00282
00283   return panel;
00284 }
00285
00286 void ProjectionGUI::UpdateGUI()
00287 {
00288   selfModifying_ = true;
00289
00290   // base parameters
00291   const ProjectionParametersBase* paramsBase = projection_.GetParameters();
00292
00293   unsigned int imageWidth, imageHeight;
00294   paramsBase->GetImageSize(imageWidth, imageHeight);
00295
00296   double principalX, principalY;
00297   paramsBase->GetPrincipal(principalX, principalY);
00298
00299   panelCenter_->SetVector(paramsBase->GetC());
00300   panelQuaternion_->SetVector(paramsBase->GetQ());
00301   panelRMatrix_->SetMatrix(paramsBase->GetR());
00302   panelImageSize_->SetVector(Vector2<double>(imageWidth, imageHeight));// TODO: this is no vec2!
00303   panelAspectRatio_->SetVector(Vector<double>(1, paramsBase->GetAspectratio()));
00304   panelPrincipal_->SetVector(Vector2<double>(principalX, principalY)); // TODO: this is no vec2!
00305
00306   // perspective parameters
00307   const ProjectionParametersPerspective* paramsPersp =
00308     dynamic_cast<const ProjectionParametersPerspective*>(paramsBase);
00309   if (paramsPersp != NULL)
00310   {
00311     double focalLength;
00312     double kc1, kc2, kc3, kc4;
00313     paramsPersp->GetFocalLength(focalLength);
00314     paramsPersp->GetUndistortion(kc1, kc2, kc3, kc4);
00315
00316     panelKMatrix_->SetMatrix(paramsPersp->GetK());
00317     panelFocalLength_->SetVector(Vector<double>(1, focalLength));
00318     panelUndistortion_->SetVector(Vector4<double>(kc1, kc2, kc3, kc4));
00319   }
00320
00321   // spherical parameters
00322   const ProjectionParametersSpherical* paramsSpherical =
00323     dynamic_cast<const ProjectionParametersSpherical*>(paramsBase);
00324   if (paramsSpherical != NULL)
00325   {
00326     panelRadius_->SetVector(Vector<double>(1, paramsSpherical->GetRadius()));
00327   }
00328
00329   selfModifying_ = false;
00330 }
00331
00332 void ProjectionGUI::OnNormalizeQuaternion(wxCommandEvent& /*event*/)
00333 {
00334   ProjectionParametersBase* paramsBase = projection_.GetParameters();
00335   Quaternion<double> Q = paramsBase->GetQ();
00336   Q.Normalize();
00337   paramsBase->SetQ(Q);
00338   UpdateGUI();
00339 }
00340
00341 void ProjectionGUI::OnModified(wxCommandEvent& event)
00342 {
00343   if (selfModifying_)
00344   {
00345     return;
00346   }
00347
00348   ProjectionParametersBase* paramsBase = projection_.GetParameters();
00349   ProjectionParametersPerspective* paramsPersp =
00350     dynamic_cast<ProjectionParametersPerspective*>(paramsBase);
00351   ProjectionParametersSpherical* paramsSpherical =
00352     dynamic_cast<ProjectionParametersSpherical*>(paramsBase);
00353
00354   switch (event.GetId())
00355   {
00356     case ID_Center:
00357     {
00358       Vector<double> C = panelCenter_->GetVector();
00359       paramsBase->SetC(Vector3<double>(C));
00360     } break;
00361
00362     case ID_Quaternion:
00363     {
00364       Vector<double> Q = panelQuaternion_->GetVector();
00365       paramsBase->SetQ(Quaternion<double>(Q[0], Q[1], Q[2], Q[3]));
00366     } break;
00367
00368     case ID_RMatrix:
00369     {
00370       Matrix<double> R = panelRMatrix_->GetMatrix();
00371       paramsBase->SetR(Matrix3x3<double>(R));
00372     } break;
00373
00374     case ID_ImageSize:
00375     {
00376       Vector<double> imageSize = panelImageSize_->GetVector();
00377       paramsBase->SetImageSize((int)imageSize[0], (int)imageSize[1]);
00378     } break;
00379
00380     case ID_AspectRatio:
00381     {
00382       Vector<double> aspectratio = panelAspectRatio_->GetVector();
00383       paramsBase->SetAspectratio(aspectratio[0]);
00384       BIASASSERT(false); // aspect ratio is read-only
00385     } break;
00386
00387     case ID_Principal:
00388     {
00389       Vector<double> principal = panelPrincipal_->GetVector();
00390       paramsBase->SetPrincipal(principal[0], principal[1]);
00391     } break;
00392
00393     case ID_KMatrix:
00394     {
00395       BIASASSERT(false); // K matrix is read-only
00396     } break;
00397
00398     case ID_FocalLength:
00399     {
00400       Vector<double> focalLength = panelFocalLength_->GetVector();
00401       paramsPersp->SetFocalLengthAndAspect(focalLength[0],
00402                                            paramsPersp->GetAspectratio());
00403     } break;
00404
00405     case ID_Undistortion:
00406     {
00407       Vector<double> undist = panelUndistortion_->GetVector();
00408       paramsPersp->SetUndistortion(undist[0], undist[1], undist[2], undist[3]);
00409     } break;
00410
00411     case ID_Radius:
00412     {
00413       Vector<double> radius = panelRadius_->GetVector();
00414       paramsSpherical->SetRadius(radius[0]);
00415     } break;
00416   }
00417
00418   UpdateGUI();
00419 }
00420
00421 void ProjectionGUI::OnNew(wxCommandEvent& /*event*/)
00422 {
00423   wxString choices[] = { wxT("Perspective"), wxT("Spherical") };
00424   int numChoices = 2;
00425
00426   wxSingleChoiceDialog dlg(NULL, wxT("Choose projection type:"),
00427                            wxT("New Projection"), numChoices, choices);
00428   if (dlg.ShowModal() == wxID_OK)
00429   {
00430     switch (dlg.GetSelection())
00431     {
00432     case 0:
00433       SetProjection(Projection(ProjectionParametersPerspective()));
00434       break;
00435     case 1:
00436       SetProjection(Projection(ProjectionParametersSpherical()));
00437       break;
00438     }
00439   }
00440 }
00441
00442 void ProjectionGUI::OnLoad(wxCommandEvent& /*event*/)
00443 {
00444   wxFileDialog dlg(NULL, wxT("Load Projection"), wxT(""), wxT(""), wxT("*.*"),
00445                    wxOPEN | wxFILE_MUST_EXIST);
00446   if (dlg.ShowModal() == wxID_OK)
00447   {
00448     Projection loadedProjection;
00449     if (loadedProjection.XMLRead(WxToAscii(dlg.GetPath())) != 0)
00450     {
00451       wxMessageDialog dlg(this, wxT("Failed to load projection"), wxT("Error"));
00452       dlg.ShowModal();
00453     }
00454     else
00455     {
00456       SetProjection(loadedProjection);
00457     }
00458   }
00459 }
00460
00461 void ProjectionGUI::OnSave(wxCommandEvent& /*event*/)
00462 {
00463   wxFileDialog dlg(NULL, wxT("Save Projection"), wxT(""), wxT(""), wxT("*.*"), wxSAVE);
00464   if (dlg.ShowModal() == wxID_OK)
00465   {
00466     if (GetProjection().XMLWrite(WxToAscii(dlg.GetPath())) != 0)
00467     {
00468       wxMessageDialog dlg(this, wxT("Failed to save projection"), wxT("Error"));
00469       dlg.ShowModal();
00470     }
00471   }
00472 }
00473
00474 /*
00475 ===============================================================================
00476 ProjectionDialog
00477 ===============================================================================
00478 */
00479
00480 ProjectionDialog::ProjectionDialog(const Projection& projection, wxWindow* parent,
00481                                    wxWindowID id, const wxString& title)
00482   : wxDialog(parent, id, title, wxDefaultPosition, wxSize(500, 550),
00483              wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
00484 {
00485   projgui_ = new ProjectionGUI(this);
00486   projgui_->SetProjection(projection);
00487
00488   wxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
00489   buttonSizer->Add(new wxButton(this, wxID_OK,     wxT("OK")));
00490   buttonSizer->Add(new wxButton(this, wxID_CANCEL, wxT("Cancel")));
00491
00492   wxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
00493   mainSizer->Add(projgui_, 1, wxEXPAND | wxALL, 5);
00494   mainSizer->Add(buttonSizer, 0, wxBOTTOM | wxALIGN_CENTER, 5);
00495
00496   SetSizer(mainSizer);
00497 }
00498
00499 const Projection& ProjectionDialog::GetProjection() const
00500 {
00501   return projgui_->GetProjection();
00502 }
Generated on Wed Jun 21 19:01:05 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/ProjectionGUI.hh Source File

Gui

ProjectionGUI.hh

Go to the documentation of this file.
00001 #ifndef __ProjectionGUI_hh__
00002 #define __ProjectionGUI_hh__
00003
00004 #include <bias_config.h>
00005
00006 #ifndef BIAS_HAVE_WXWINDOWS
00007 #  error BIAS_HAVE_WXWINDOWS not defined but required by ProjectionGUI. Please enable BIAS_HAVE_WXWINDOWS in CMake configure step.
00008 #endif
00009
00010 #include <wx/wx.h>
00011 #include <Geometry/Projection.hh>
00012 #include <vector>
00013
00014 #include <Base/Math/Vector.hh>
00015 #include <Base/Math/Vector2.hh>
00016
00017 namespace BIAS {
00018
00019   /** @brief Panel for displaying and editing vectors.
00020       @author jkollmann */
00021   class BIASGui_EXPORT VectorPanel : public wxPanel
00022   {
00023   public:
00024     VectorPanel(wxWindow* parent, wxWindowID id, bool editable);
00025     void SetVector(const BIAS::Vector<double>& vector);
00026     BIAS::Vector<double> GetVector() const;
00027
00028   private:
00029     bool editable_;
00030     std::vector<wxTextCtrl*> controls_;
00031   };
00032
00033   /** @brief Panel for displaying and editing matrices.
00034       @author jkollmann */
00035   class BIASGui_EXPORT MatrixPanel : public wxPanel
00036   {
00037   public:
00038     MatrixPanel(wxWindow* parent, wxWindowID id, bool editable);
00039     void SetMatrix(const Matrix<double>& matrix);
00040     Matrix<double> GetMatrix();
00041
00042   private:
00043     bool editable_;
00044     int rows_, cols_;
00045     std::vector<wxTextCtrl*> controls_;
00046   };
00047
00048   /** @brief Panel for displaying and editing projections.
00049       @author jkollmann */
00050   class ProjectionGUI : public wxPanel
00051   {
00052   public:
00053     ProjectionGUI(wxWindow* parent, wxWindowID id = -1,
00054                   const wxPoint& pos = wxDefaultPosition,
00055                   const wxSize& size = wxDefaultSize,
00056                   long style = wxTAB_TRAVERSAL,
00057                   const wxString& name = wxT("panel"));
00058     void SetProjection(const Projection& projection);
00059     const Projection& GetProjection() const;
00060
00061   private:
00062     VectorPanel* AddVectorPanel(const wxString& name, wxWindowID id, bool editable);
00063     MatrixPanel* AddMatrixPanel(const wxString& name, wxWindowID id, bool editable);
00064
00065     void UpdateGUI();
00066
00067     void OnNormalizeQuaternion(wxCommandEvent& event);
00068     void OnModified(wxCommandEvent& event);
00069     void OnNew(wxCommandEvent& event);
00070     void OnLoad(wxCommandEvent& event);
00071     void OnSave(wxCommandEvent& event);
00072
00073     bool selfModifying_;
00074     Projection projection_;
00075     wxScrolledWindow* projectionPanel_;
00076
00077     VectorPanel* panelCenter_;
00078     VectorPanel* panelQuaternion_;
00079     MatrixPanel* panelRMatrix_;
00080     VectorPanel* panelImageSize_;
00081     VectorPanel* panelAspectRatio_;
00082     VectorPanel* panelPrincipal_;
00083     MatrixPanel* panelKMatrix_;
00084     VectorPanel* panelFocalLength_;
00085     VectorPanel* panelUndistortion_;
00086     VectorPanel* panelRadius_;
00087
00088     DECLARE_EVENT_TABLE()
00089   };
00090
00091   /** @brief Dialog containing a ProjectionGUI.
00092       @author jkollmann */
00093    class BIASGui_EXPORT ProjectionDialog : public wxDialog
00094    {
00095    public:
00096     ProjectionDialog(const Projection& projection,
00097                      wxWindow* parent = NULL, wxWindowID id = -1,
00098                      const wxString& title = wxT("Projection"));
00099     const Projection& GetProjection() const;
00100    private:
00101     ProjectionGUI* projgui_;
00102    };
00103
00104 } // namespace BIAS
00105
00106 #endif // __ProjectionGUI_hh__
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ProjectionMapping.cpp Source File

Image

ProjectionMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Image/ProjectionMapping.hh"
00026 #include <Geometry/RMatrix.hh>
00027 #include <Base/Geometry/HomgPoint2D.hh>
00028 #include <Geometry/Projection.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034 template <class InputStorageType, class OutputStorageType>
00035 ProjectionMapping<InputStorageType, OutputStorageType>::
00036 ~ProjectionMapping()
00037 {}
00038
00039 template <class InputStorageType, class OutputStorageType>
00040 ProjectionMapping<InputStorageType, OutputStorageType>::
00041 ProjectionMapping()
00042 : SourceP_(ProjectionParametersPerspective()),
00043   SinkP_(ProjectionParametersPerspective())
00044 {}
00045
00046
00047 template <class InputStorageType, class OutputStorageType>
00048 ProjectionMapping<InputStorageType, OutputStorageType>::
00049 ProjectionMapping(const ProjectionMapping & src)
00050 {
00051     (*this) = src;
00052 }
00053
00054 template <class InputStorageType, class OutputStorageType>
00055 ProjectionMapping<InputStorageType, OutputStorageType> &
00056 ProjectionMapping<InputStorageType, OutputStorageType>::
00057 operator=(const ProjectionMapping & src)
00058 {
00059      SourceP_ = src.SourceP_;
00060      SinkP_ = src.SinkP_;
00061      return *this;
00062 }
00063
00064 template <class InputStorageType, class OutputStorageType>
00065 int ProjectionMapping<InputStorageType, OutputStorageType>::
00066 GetSourceCoordinates_(const HomgPoint2D & sink,
00067                       HomgPoint2D & source) const {
00068   HomgPoint3D point3D;
00069
00070   point3D = SinkP_.UnProjectToPoint(sink,1.0);
00071   source = SourceP_.Project(point3D);
00072   return 0;
00073 }
00074
00075 // TODO FIXME win32 template instantiation problem (JW)
00076 template class ProjectionMapping<unsigned char, unsigned char>;
00077 template class ProjectionMapping<float, float>;
00078 template class ProjectionMapping<unsigned char, float>;
00079
00080 #if defined(BUILD_IMAGE_CHAR)
00081 // TODO FIXME win32 template instantiation problem (JW)
00082 template class ProjectionMapping<unsigned char, char>;
00083 template class ProjectionMapping<char, char>;
00084 #endif
00085
00086 #if defined(BUILD_IMAGE_USHORT)
00087 template class ProjectionMapping<unsigned short,unsigned short>;
00088 #endif
00089
00090 #if defined(BUILD_IMAGE_SHORT)
00091 template class ProjectionMapping<short, short>;
00092 #endif
00093
00094 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00095 template class ProjectionMapping<unsigned short, short>;
00096 #endif
00097
00098 #if defined(BUILD_IMAGE_INT)
00099 template class ProjectionMapping<int,int>;
00100 #endif
00101
00102 #if defined(BUILD_IMAGE_USHORT)
00103 template class ProjectionMapping<unsigned short,float>;
00104 #endif
00105
00106 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00107 template class ProjectionMapping<unsigned short,int>;
00108 #endif
00109
00110 #if defined(BUILD_IMAGE_DOUBLE)
00111 template class ProjectionMapping<double,double>;
00112 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/ProjectionMapping.hh Source File

Image

ProjectionMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragmaStart.hh>
00026
00027 #ifndef __ProjectionMapping_hh__
00028 #define __ProjectionMapping_hh__
00029
00030 #include <Image/BackwardMapping.hh>
00031 #include <Geometry/HMatrix.hh>
00032 #include <Geometry/Projection.hh>
00033
00034
00035 namespace BIAS {
00036
00037   /** @class ProjectionMapping
00038       @ingroup g_filter
00039       @brief  Maps source pixel to sink pixel of given projections
00040       @author niemann
00041   */
00042   template <class InputStorageType, class OutputStorageType>
00043   class BIASImage_EXPORT ProjectionMapping
00044     : public  BackwardMapping<InputStorageType, OutputStorageType>  {
00045   public:
00046
00047     virtual ~ProjectionMapping();
00048
00049     ProjectionMapping();
00050
00051     /**  required because assignment is
00052          @author Jan Woetzel */
00053     ProjectionMapping(const ProjectionMapping & src);
00054
00055     /**  required because of const members
00056          @author Jan Woetzel */
00057     ProjectionMapping<InputStorageType, OutputStorageType> &
00058     operator=(const ProjectionMapping & src);
00059
00060     /** @brief set your source projection before calling Map() */
00061     inline void SetSourceCam(const Projection& P) { SourceP_ = P;};
00062     /** @brief set your sink projection before calling Map() */
00063     inline void SetSinkCam(const Projection& P) { SinkP_ = P;};
00064
00065   protected:
00066     /** @brief reimplementation for Pixel transformation,
00067         takes sink and computes coords in source */
00068     virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
00069                                       HomgPoint2D& source) const;
00070
00071     /// the projections for backward mapping: run over sink and compute
00072     /// source
00073     Projection SourceP_, SinkP_;
00074
00075   };
00076 } // namespace
00077
00078 #endif
00079
00080 #include <Base/Common/BIASpragmaEnd.hh>
00081
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersBase.cpp Source File

Geometry

ProjectionParametersBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <sstream>
00026 #include "Geometry/ProjectionParametersBase.hh"
00027
00028
00029 using namespace BIAS;
00030 using namespace std;
00031 #define STREAM_PRECISION 12
00032
00033
00034
00035 RMatrix ProjectionParametersBase::GetR() const
00036 {
00037   RMatrix R;
00038  // unconst, because RMatrix::SetFromQ() in not const enough
00039   Quaternion<double> qtmp = GetQ();
00040   R.SetFromQuaternion(qtmp);
00041   return R;
00042 }
00043
00044
00045 #ifdef BIAS_HAVE_XML2
00046
00047 int ProjectionParametersBase::
00048 XMLGetClassName(std::string& TopLevelTag,
00049                             double& Version) const {
00050   TopLevelTag = "ProjectionParametersBase";
00051   Version = 0.2;
00052   return 0;
00053 }
00054
00055 int ProjectionParametersBase::
00056 XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const {
00057
00058   xmlNodePtr childNode;
00059   childNode = XMLObject.addChildNode(Node,"ImageSize");
00060   XMLObject.addAttribute(childNode, "width", (int)width_);
00061   XMLObject.addAttribute(childNode, "height", (int)height_);
00062
00063   childNode = XMLObject.addChildNode(Node,"PrincipalPoint");
00064   XMLObject.addAttribute(childNode, "x", principalX_);
00065   XMLObject.addAttribute(childNode, "y", principalY_);
00066
00067   childNode = XMLObject.addChildNode(Node,"AspectRatio");
00068   XMLObject.addAttribute(childNode, "val", aspectratio_);
00069
00070   // R
00071   Quaternion<double> Q = GetQ();
00072   stringstream streamR;
00073   childNode = XMLObject.addChildNode(Node,"Rotation");
00074   streamR << std::setprecision(STREAM_PRECISION);
00075   for (unsigned int i=0; i<4; i++) {
00076     streamR << (double) Q.GetData()[i] <<" ";
00077   }
00078   XMLObject.addContent(childNode, streamR.str());
00079
00080   // C
00081   Vector3<double> C = GetC();
00082   childNode = XMLObject.addChildNode(Node,"Center");
00083   XMLObject.addAttribute(childNode, "x", C[0]);
00084   XMLObject.addAttribute(childNode, "y", C[1]);
00085   XMLObject.addAttribute(childNode, "z", C[2]);
00086
00087   return 0;
00088 }
00089
00090 int ProjectionParametersBase::
00091 XMLIn(const xmlNodePtr Node, XMLIO& XMLObject) {
00092
00093   xmlNodePtr childNode;
00094   if ((childNode = XMLObject.getChild(Node, "ImageSize"))!=NULL) {
00095     width_ = XMLObject.getAttributeValueInt(childNode, "width");
00096     height_ = XMLObject.getAttributeValueInt(childNode, "height");
00097   }
00098   if ((childNode = XMLObject.getChild(Node, "PrincipalPoint"))!=NULL) {
00099     principalX_ = XMLObject.getAttributeValueDouble(childNode, "x");
00100     principalY_ = XMLObject.getAttributeValueDouble(childNode, "y");
00101   }
00102   if ((childNode = XMLObject.getChild(Node, "CellSize"))!=NULL) {
00103     double cellSizeX, cellSizeY;
00104     cellSizeX = XMLObject.getAttributeValueDouble(childNode, "x");
00105     cellSizeY = XMLObject.getAttributeValueDouble(childNode, "y");
00106     aspectratio_ = cellSizeX / cellSizeY;
00107   }
00108   if ((childNode = XMLObject.getChild(Node, "AspectRatio"))!=NULL) {
00109     aspectratio_ = XMLObject.getAttributeValueDouble(childNode, "val");
00110   }
00111
00112   Quaternion<double> Q;
00113   // R
00114   if ((childNode = XMLObject.getChild(Node, "Rotation"))!=NULL) {
00115     // get data fields
00116     stringstream ssRotation(XMLObject.getNodeContentString(childNode));
00117     unsigned int CurrentData = 0;
00118     while (ssRotation.good() && CurrentData<4) {
00119       ssRotation >> (Q.GetData()[CurrentData++]);
00120     }
00121     if (CurrentData<4) {
00122       // reached end of stream before expected end of data
00123       BIASERR("error in xml structure, rotation matrix incomplete.");
00124       return -1;
00125     }
00126   } else BIASERR("No Q found !!!!");
00127   // C
00128   Vector3<double> C;
00129   if ((childNode = XMLObject.getChild(Node, "Center"))!=NULL) {
00130     C[0] = XMLObject.getAttributeValueDouble(childNode, "x");
00131     C[1] = XMLObject.getAttributeValueDouble(childNode, "y");
00132     C[2] = XMLObject.getAttributeValueDouble(childNode, "z");
00133   } else BIASERR("No C found !!!!");
00134   Pose_.Set(Q,C);
00135   return 0;
00136 }
00137 #endif
00138
00139 double ProjectionParametersBase::
00140 ViewDifference(const ProjectionParametersBase*) const {
00141   // there should be an implmentation in each derived class
00142   BIASERR("ViewDifference not implemented in derived class");
00143   BIASABORT;
00144   // visual studio needs this
00145   return 0.0;
00146 }
00147
00148 Vector3<double> ProjectionParametersBase
00149 ::UnProjectToPointLocal(const HomgPoint2D& pos,
00150                         const double& depth, bool IgnoreDistortion) const {
00151   Vector3<double> x(UnProjectLocal(pos, IgnoreDistortion) * depth);
00152   if (fabs(x.NormL2()-depth)>1e-10) {
00153     BIASERR("Unprojection failed:" << x << "  Position:"<< pos
00154             <<"  Norm:" << setw(10) << double(x.NormL2()));
00155     abort();
00156   }
00157   return x;
00158 }
00159
00160
00161 void ProjectionParametersBase::Transform_(const Vector<double>& src,
00162                                           Vector<double>& dst) const {
00163   BIASASSERT(src.size()==3);BIASASSERT(dst.size()==3);
00164   HomgPoint2D xsrc(src[0], src[1], src[2]), xdst;
00165   if (ustTransformIntoImage_) {
00166     xdst = ProjectLocal(xsrc, ustIgnoreDistortion_);
00167   } else {
00168     xdst = UnProjectLocal(xsrc, ustIgnoreDistortion_);
00169   }
00170   // we do a homogenize here, for the spherical case the covariance
00171   // may be interesting on the normalized point maybe.
00172   // For < 160 degrees, this should be no problem.
00173   xdst.Homogenize();
00174   dst[0] = xdst[0]; dst[1] = xdst[1]; dst[2] = xdst[2];
00175 }
00176
00177
00178 Matrix3x3<double> ProjectionParametersBase::
00179 UnProjectLocal(const HomgPoint2D& pos, const Matrix3x3<double>& cov,
00180                bool IgnoreDistortion)
00181 {
00182   // set transformation parameters using cass members
00183   ustIgnoreDistortion_ = IgnoreDistortion;
00184   ustTransformIntoImage_ = false;
00185   // convert into general data structs
00186   Matrix3x3<double> rescov(MatrixZero);
00187   Vector<double> srcPoint(3), resPoint(3);
00188   srcPoint[0] = pos[0]; srcPoint[1] = pos[1]; srcPoint[2] = pos[2];
00189   // use unscented transform to approximate covariance
00190   Transform(srcPoint, cov, resPoint, rescov);
00191   //cout<<"Cov_orig="<<cov<<" around "<<pos<<" transformed to "
00192   //    <<rescov<<" around "<<resPoint<<endl;
00193   return rescov;
00194 }
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersBase.hh Source File

Geometry

ProjectionParametersBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersBase_hh__
00027 #define __BIAS_ProjectionParametersBase_hh__
00028 #include "bias_config.h"
00029
00030 #include <Geometry/Pose.hh>
00031 #include <Base/Common/BIASpragmaStart.hh>
00032 #include <Base/Common/CompareFloatingPoint.hh>
00033 #include <Base/Math/Vector3.hh>
00034 #include <Base/Math/Matrix3x4.hh>
00035 #include <Base/Math/Matrix4x4.hh>
00036 #include <Base/Geometry/HomgPoint2D.hh>
00037 #include <Base/Geometry/Quaternion.hh>
00038 #include <Geometry/PMatrix.hh>
00039 #include <MathAlgo/UnscentedTransform.hh>
00040
00041 #include <Base/Debug/Debug.hh>
00042 #ifdef BIAS_HAVE_XML2
00043 #  include <Base/Common/XMLBase.hh>
00044 #endif
00045
00046 #include <Geometry/RMatrix.hh>
00047
00048 namespace BIAS {
00049
00050  /** @class ProjectionParametersBase
00051      @brief camera parameters which define the mapping between rays in the
00052      camera coordinate system and pixels in the image as well as external pose
00053      @author koeser/evers/streckel
00054  */
00055   class BIASGeometry_EXPORT ProjectionParametersBase :
00056     protected UnscentedTransform
00057 #ifdef BIAS_HAVE_XML2
00058     , public XMLBase
00059 #endif
00060   {
00061   public:
00062
00063     inline ProjectionParametersBase(){
00064       width_=0;
00065       height_=0;
00066       principalX_=0;
00067       principalY_=0;
00068       aspectratio_=1;
00069       // init with some value:
00070       ustTransformIntoImage_ = false;
00071       ustIgnoreDistortion_ = false;
00072     }
00073
00074     virtual ProjectionParametersBase& operator=(const
00075                         ProjectionParametersBase& p) {
00076       Pose_ = p.Pose_;
00077       width_= p.width_;
00078       height_= p.height_;
00079       principalX_= p.principalX_;
00080       principalY_= p.principalY_;
00081       aspectratio_= p.aspectratio_;
00082       return *this;
00083     }
00084
00085     virtual ~ProjectionParametersBase(){};
00086
00087     /** Checks if 3D point projects into specified image and returns
00088      *  belonging 2D image point.
00089      *  @param X assumes homogenized point!
00090      *  @author bartczak
00091      */
00092     bool DoesPointProjectIntoImage(const HomgPoint3D& X,
00093                                    HomgPoint2D& x,
00094                                    bool IgnoreDistortion = false) const
00095     {
00096       HomgPoint3D tempX = GetPose().GlobalToLocal(X);
00097       BIAS::Vector3<double> localX;
00098       tempX.GetEuclidian(localX);
00099       return DoesPointProjectIntoImageLocal(localX, x, IgnoreDistortion);
00100     }
00101     /** Checks if 3D point projects into specified image and returns
00102      *  belonging 2D image point.
00103      *  @param X assumes homogenized point!
00104      *  @author bartczak
00105      */
00106     virtual bool DoesPointProjectIntoImageLocal(const Vector3<double>& localX,
00107                                         HomgPoint2D& x,
00108                                         bool IgnoreDistortion = false) const
00109     {
00110       BIASERR("to be implemented in specialized child class!");
00111       return false;
00112     }
00113
00114
00115     /** @brief calculates the projection of a point
00116         in the world coordinate system
00117         to a pixel in the image plane of the camera
00118         Was in old calss Projection before
00119         @author woelk 05/2006 */
00120     inline HomgPoint2D Project(const HomgPoint3D &X,
00121                                bool IgnoreDistortion = false) const {
00122       Vector3<double> x;
00123       GetExternals().Mult(X, x);
00124       return ProjectLocal(x, IgnoreDistortion);
00125     }
00126
00127     /** @brief calculates the projection of a point
00128         in the local camera coordinate system
00129         to a pixel in the image plane of the camera
00130
00131         In the simplest case perspective pinhole projection x = K * point
00132         where point is transformed of X using  point = (R^T | -R^T C) X */
00133     virtual HomgPoint2D ProjectLocal(const Vector3<double>& point,
00134                                      bool IgnoreDistortion = false) const = 0;
00135
00136     /** @brief calculates the unit size viewing ray from the camera center
00137         (in the camera coordinate system) which belongs to the image position
00138         pos e.g. pos=principal point results in (0,0,1)=optical axis */
00139     virtual Vector3<double> UnProjectLocal(const HomgPoint2D& pos,
00140                                            bool IgnoreDistortion = false)
00141       const = 0;
00142
00143     /** @brief unprojects the covariance matrices to K=Identity camera
00144
00145     This uses the unscented transform to propagate covariance. Use a faster
00146     or better specialization in derived class if you want.
00147         @author koeser 06/2006 */
00148     virtual Matrix3x3<double>
00149     UnProjectLocal(const HomgPoint2D& pos, const Matrix3x3<double>& cov2D,
00150                    bool IgnoreDistortion = false);
00151
00152     /** @brief calculates the viewing ray in the global coordinate frame
00153         from the camera center which belongs to the given image
00154         position. The resulting vector3 may have any length.
00155
00156         @author woelk 05/2006 */
00157     inline Vector3<double> UnProjectToRay(const HomgPoint2D& pos,
00158                                           bool IgnoreDistortion=false) const {
00159       Vector3<double> x, rx;
00160       x = UnProjectLocal(pos, IgnoreDistortion);
00161       RMatrix R = GetR();
00162       R.Mult(x, rx);
00163       return rx;
00164     }
00165
00166     /** @brief calculates a 3D point in
00167         the local camera coordinate system, which
00168         belongs to the image position pos in cam with distance depth to the
00169         camera center cam.
00170         @author koeser  */
00171     virtual Vector3<double>
00172     UnProjectToPointLocal(const HomgPoint2D& pos, const double& depth,
00173                           bool IgnoreDistortion = false) const;
00174
00175
00176     // ---- Getter methods  ------------------------------------------------
00177
00178     /** @brief get projection center */
00179     virtual Vector3<double> GetC() const { return Pose_.GetC(); };
00180
00181     /** @brief return Q of rotation*/
00182     virtual Quaternion<double> GetQ() const { return Pose_.GetQ(); };
00183
00184     /** @brief return rotation matrix R*/
00185     virtual BIAS::RMatrix GetR() const;
00186
00187     /** @brief return pose covariance as 7x7 matrix C,Q */
00188     virtual Matrix<POSE_TYPE> GetCov() const { return Pose_.GetCov(); }
00189
00190     /** @brief return complete pose object */
00191     virtual const Pose& GetPose() const {
00192       return Pose_;
00193     }
00194
00195     inline PoseParametrization GetPoseParametrization() const
00196     { return Pose_.GetPoseParameters(); }
00197
00198     inline void SetPoseParametrization(const PoseParametrization& pp)
00199     { Pose_.Set(pp); }
00200
00201     /** @brief return cached 3x4 RC representation */
00202     virtual Matrix3x4<double> GetExternals() const {
00203       return Pose_.GetMatrix3x4();}
00204
00205     /** @brief return image dimensions */
00206     inline int GetImageSize(unsigned int& Width, unsigned int& Height) const {
00207       Width  = width_;
00208       Height = height_;
00209       return 0;
00210     }
00211
00212     /** @brief return aspectratio = cellSizeX_ / cellSizeY_;*/
00213     inline double GetAspectratio() const {
00214       return aspectratio_;
00215     }
00216
00217     /** @brief get principal point, x in pixels relative to top left corner */
00218     inline int GetPrincipal(double& PrincipalX, double& PrincipalY) const {
00219       PrincipalX = principalX_;
00220       PrincipalY = principalY_;
00221       return 0;
00222     }
00223
00224     // ---- Setter methods  ------------------------------------------------
00225
00226
00227     /** @brief Set CCDaspect ratio = cellSizeX_ / cellSizeY_.
00228         @author streckel */
00229     virtual inline void SetAspectratio(const double AspectRatio) {
00230       aspectratio_ = AspectRatio;
00231     }
00232
00233     /** @brief Set principal point in pixels relative to top left corner
00234         @author streckel */
00235     virtual inline void SetPrincipal(const double x, const double y) {
00236       principalX_ = x;
00237       principalY_ = y;
00238     }
00239
00240     virtual inline void SetImageSize(const unsigned int w,
00241                                      const unsigned int h) {
00242       width_ = w;
00243       height_ = h;
00244     }
00245
00246     /** @brief adapt internal params to resampled image
00247         @param ratio 2.0 = downsample, 0.5 = upsample
00248         /attention only delivers correct results if ratio
00249         is chosen to rescale image size to integral image size
00250         in both directions. Image size is rounded!
00251     */
00252     virtual inline void Rescale(float ratio) {
00253       double widthTemp = (double)width_/ratio;
00254       double heightTemp = (double)height_/ratio;
00255       width_  = (int)rint(widthTemp);
00256       height_ =  (int)rint(heightTemp);
00257       if( (!BIAS::Equal(widthTemp, (double)width_)) ||
00258           (!BIAS::Equal(heightTemp, (double)height_))) {
00259         BIASERR("image size has integer type."<<width_<<"x"<<height_
00260                 <<" Passed rescale factor "<< ratio <<" does not conform!\n");
00261       }
00262       principalX_ /= ratio;
00263       principalY_ /= ratio;
00264     }
00265
00266     /** @brief covariant virtual copy constructor for use in Projection */
00267     virtual ProjectionParametersBase* Clone() const = 0;
00268
00269     virtual void SetQ(const BIAS::Quaternion<double>& Q)
00270     { Pose_.SetQ(Q); }
00271     virtual void SetC(const BIAS::Vector3<double>& C)
00272     { Pose_.SetC(C); }
00273     virtual void SetQC(const BIAS::Quaternion<double>& Q,
00274                      const BIAS::Vector3<double>& C)
00275     { Pose_.Set(Q,C); }
00276
00277     virtual void SetPose(const BIAS::Pose pose)
00278     { Pose_=pose; }
00279
00280     virtual void SetR(const BIAS::RMatrix& R)
00281     { Quaternion<double> Q;
00282       R.GetQuaternion(Q);
00283       Pose_.SetQ(Q);
00284     }
00285
00286     virtual void SetCov(const Matrix<POSE_TYPE>& Cov)
00287     { Pose_.SetCovariance(Cov); }
00288
00289     /** @brief returns difference of two projections like | C1-C2 |
00290
00291     This function can be used for inter camera distance and ordering purposes
00292     @author koeser 03/2006 */
00293     virtual double ViewDifference(const ProjectionParametersBase*) const;
00294
00295 #ifdef BIAS_HAVE_XML2
00296     /** @brief specialization of XML block name function */
00297     virtual int XMLGetClassName(std::string& TopLevelTag,
00298                                 double& Version) const;
00299
00300     /** @brief specialization of XML write function */
00301     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00302
00303     /** @brief specialization of XML read function */
00304     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00305 #endif
00306
00307
00308     /** unscented transform worker function
00309         @author koeser */
00310     virtual void Transform_(const Vector<double>& src,
00311                             Vector<double>& dst) const;
00312
00313     friend std::ostream& operator<<(std::ostream &os,
00314                                     ProjectionParametersBase& p);
00315
00316
00317   protected:
00318     Pose Pose_;
00319
00320     /// width of image in pixels
00321     unsigned int width_;
00322     /// height of image in pixels
00323     unsigned int height_;
00324
00325     /// Principal Point Pixel Coordinates (one for all zoom settings)
00326     double principalX_, principalY_;
00327
00328     /// aspectratio of the camera CCD
00329     double aspectratio_;
00330
00331     /// unscented transform worker variables
00332     bool ustTransformIntoImage_;
00333     bool ustIgnoreDistortion_;
00334   };
00335
00336   inline std::ostream& operator<<(std::ostream &os,
00337                                   ProjectionParametersBase& p)
00338   {
00339     os <<"R:"<<p.GetR()<<"C:"<<p.GetC()<<std::endl;
00340     os<<"ImageSize: "<<p.width_<<" x "<<p.height_<<std::endl;
00341     os<<"Principal: "<<p.principalX_<<" x "<<p.principalY_<<std::endl;
00342     return os;
00343   }
00344
00345
00346
00347 } // end namespace
00348
00349
00350 #include <Base/Common/BIASpragmaEnd.hh>
00351
00352 #endif
00353
Generated on Wed Jun 21 19:01:01 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersIO.cpp Source File

Geometry

ProjectionParametersIO.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Geometry/ProjectionParametersIO.hh"
00026 #include <string>
00027 #include <Base/Image/ImageAttributes.hh>
00028
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034 void ProjectionParametersIO::Initialize(CameraData &cd) {
00035
00036   cd.CamModel_ = "";
00037   cd.CamID_ = 1;
00038   cd.LensModel_ = "";
00039   cd.LensIsSpherical_ = false;
00040   cd.zoomCamera_ =false;
00041
00042   cd.width_=cd.height_=0;
00043   cd.principalX_ = cd.principalY_ =0;
00044   cd.cellSizeX_ = cd.cellSizeY_ = 1;
00045   cd.focallengthDef_ = 0;
00046   cd.kc1Def_ = cd.kc2Def_ = cd.kc3Def_ = cd.kc4Def_ = 0;
00047   cd.knownparams_vect_.clear();
00048   cd.IlluCorrX_.clear();
00049   cd.IlluCorrY_.clear();
00050   cd.AngleCorrX_.clear();
00051   cd.AngleCorrY_.clear();
00052   cd.radius_ = 0;
00053
00054   cd.PoseInRigCenter_.SetZero();
00055   cd.PoseInRigYaw_=0;
00056   cd.PoseInRigPitch_=0;
00057   cd.PoseInRigRoll_=0;
00058
00059 }
00060 void ProjectionParametersIO::InitializeSensor(SensorData &sd) {
00061
00062   sd.PoseInRigCenter_.SetZero();
00063   sd.PoseInRigYaw_=0;
00064   sd.PoseInRigPitch_=0;
00065   sd.PoseInRigRoll_=0;
00066
00067 }
00068
00069
00070 int ProjectionParametersIO::ReadFromEXIF(const std::string& filename,
00071                                          CameraData& cd) {
00072
00073   Initialize(cd);
00074
00075   ImageAttributes exifdata;
00076   exifdata.InitExifTags();
00077   int result = exifdata.Read(filename);
00078   if (result!=0) return result;
00079
00080
00081   string make, model;
00082   exifdata.GetHardwareName(make, model);
00083   cd.CamModel_ = make + "___"+model;
00084
00085   cd.CamID_ = 0;
00086   cd.LensModel_ = "unknown";
00087   cd.LensIsSpherical_ = false;
00088
00089   result = exifdata.GetPixelSizeXMeter(cd.cellSizeX_);
00090   if (result<0) return result;
00091   result = exifdata.GetPixelSizeYMeter(cd.cellSizeY_);
00092   if (result<0) return result;
00093
00094   int width=0, height=0;
00095   result = exifdata.GetImageDimensions(width, height);
00096   if (result<0) return result;
00097   cd.width_ = width;
00098   cd.height_ = height;
00099
00100   cd.aspectratio_ = cd.cellSizeX_ / cd.cellSizeY_;
00101
00102   result = exifdata.GetPrincipalPoint(cd.principalX_, cd.principalY_);
00103   if (result<0) return result;
00104
00105   result = exifdata.GetFocalLengthXPixel(cd.focallengthDef_);
00106   if (result<0) return result;
00107
00108   cd.zoomCamera_ = false;
00109   cd.knownparams_vect_.clear();
00110
00111   return 0;
00112 }
00113
00114
00115 int ProjectionParametersIO::SetFromKMatrix(const KMatrix& K,
00116                                            const int w, const int h,
00117                                            CameraData& cd) {
00118   Initialize(cd);
00119
00120   cd.width_    = w;
00121   cd.height_   = h;
00122   cd.CamModel_ = "fromkmatrix";
00123
00124   // you can set any value here but not zero !
00125   cd.CamID_ = 42;
00126   cd.LensModel_ = "unknown";
00127   cd.LensIsSpherical_ = false;
00128
00129   cd.cellSizeX_  = 1;
00130   cd.cellSizeY_  = K[0][0] / K[1][1];
00131   cd.principalX_ = K[0][2];
00132   cd.principalY_ = K[1][2];
00133
00134   cd.focallengthDef_ = K[0][0];
00135
00136   cd.aspectratio_ = cd.cellSizeX_/cd.cellSizeY_;
00137
00138   cd.knownparams_vect_.clear();
00139   return 0;
00140
00141 }
00142
00143
00144 #ifdef BIAS_HAVE_XML2
00145
00146 int ProjectionParametersIO::WriteRigData(const std::string &filename,
00147                                          const std::vector<CameraData>& vcd,
00148                                          const std::vector<SensorData>& vsd) {
00149
00150   XMLIO myXML;
00151   xmlNodePtr rootNode, childNode1, childNode2, childNode3;
00152   rootNode = myXML.create("rig");
00153   myXML.addAttribute(rootNode, "version", std::string("1.0") );
00154   for (unsigned int i=0; i<vcd.size(); i++) {
00155     childNode1 = myXML.addChildNode(rootNode, "cameraDescription");
00156     AddCameraDataToRig(myXML, childNode1, vcd[i]);
00157     childNode2 = myXML.addChildNode(childNode1, "poseInRig");
00158     myXML.addComment(childNode2, "Yaw, Pitch and Roll are the Rotation_ angles of the camera around the rigs X, Y and Z Axes relative to the rig Rotation_. The Rotation_s are applied in the order XYZ or YPR.");
00159     childNode3 = myXML.addChildNode(childNode2, "x");
00160     myXML.addContent(childNode3, vcd[i].PoseInRigCenter_[0]);
00161     childNode3 = myXML.addChildNode(childNode2, "y");
00162     myXML.addContent(childNode3, vcd[i].PoseInRigCenter_[1]);
00163     childNode3 = myXML.addChildNode(childNode2, "z");
00164     myXML.addContent(childNode3, vcd[i].PoseInRigCenter_[2]);
00165     myXML.addComment(childNode2,"Rotation_ direction: from rig reference system to camera frame.");
00166     childNode3 = myXML.addChildNode(childNode2, "yaw");
00167     myXML.addContent(childNode3, vcd[i].PoseInRigYaw_);
00168     childNode3 = myXML.addChildNode(childNode2, "pitch");
00169     myXML.addContent(childNode3, vcd[i].PoseInRigPitch_);
00170     childNode3 = myXML.addChildNode(childNode2, "roll");
00171     myXML.addContent(childNode3, vcd[i].PoseInRigRoll_);
00172   }
00173
00174   for (unsigned int i=0; i<vsd.size(); i++) {
00175     childNode1 = myXML.addChildNode(rootNode, "sensorDescription");
00176     childNode2 = myXML.addChildNode(childNode1, "poseInRig");
00177     childNode3 = myXML.addChildNode(childNode2, "x");
00178     myXML.addContent(childNode3, vsd[i].PoseInRigCenter_[0]);
00179     childNode3 = myXML.addChildNode(childNode2, "y");
00180     myXML.addContent(childNode3, vsd[i].PoseInRigCenter_[1]);
00181     childNode3 = myXML.addChildNode(childNode2, "z");
00182     myXML.addContent(childNode3, vsd[i].PoseInRigCenter_[2]);
00183     myXML.addComment(childNode2,"Rotation_ direction: from rig reference system to sensor frame.");
00184
00185     childNode3 = myXML.addChildNode(childNode2, "yaw");
00186     myXML.addContent(childNode3, vsd[i].PoseInRigYaw_);
00187     childNode3 = myXML.addChildNode(childNode2, "pitch");
00188     myXML.addContent(childNode3, vsd[i].PoseInRigPitch_);
00189     childNode3 = myXML.addChildNode(childNode2, "roll");
00190     myXML.addContent(childNode3, vsd[i].PoseInRigRoll_);
00191   }
00192   myXML.write(filename);
00193   return 0;
00194 }
00195
00196
00197 int ProjectionParametersIO::ReadRigData(const std::string &filename,
00198                                        std::vector<CameraData>& vcd) {
00199   std::vector<SensorData> vsd;
00200   int ret = ReadRigData(filename,vcd,vsd);
00201   if (vsd.size()>0) {
00202     BIASERR("The data file contained sensor data, use ReadRigData"
00203             << "with vector<SensorData> to get it.");
00204   }
00205   return ret;
00206 }
00207
00208
00209 int ProjectionParametersIO::ReadRigData(const std::string &filename,
00210                                         std::vector<CameraData>& vcd,
00211                                         std::vector<SensorData>& vsd) {
00212   vcd.clear();
00213   vsd.clear();
00214
00215   XMLIO myXML;
00216   xmlNodePtr rootNode, childNode1, childNode2;
00217
00218   rootNode = myXML.read(filename);
00219   if (rootNode==NULL) {
00220     BIASERR("Rig-Parameter-File not found or parse error: " << filename);
00221     return -1;
00222   }
00223
00224   if (myXML.getNodeName(rootNode)!="rig" &&
00225       myXML.getNodeName(rootNode)!="Rig") {
00226     if (myXML.getNodeName(rootNode)!="camera" &&
00227         myXML.getNodeName(rootNode)!="Camera") {
00228       BIASERR("Root node has to be \"rig\" or \"camera\"");
00229       return -1;
00230     } else {
00231       //Root Node is "camera"
00232       vcd.resize(1);
00233       return ReadCameraData(filename, vcd[0]);
00234     }
00235   } else {
00236     // Root node is "Rig"
00237     double vers=0;
00238     vers = myXML.getAttributeValueDouble(rootNode, "version");
00239     if (vers==0) {
00240       vers = myXML.getAttributeValueDouble(rootNode, "Version");
00241     }
00242     if (vers!=RIG_PARAMETER_CURRENT_XML_VERSION) {
00243       BIASWARN("Rig-Parameter File Version (" << vers << ")is Deprecated, "
00244               << "current version is " << RIG_PARAMETER_CURRENT_XML_VERSION);
00245       if (vers==0.8) {
00246         ReadRigDataV0_8(filename, vcd);
00247         return 0;
00248       } else {
00249         return -1;
00250       }
00251     }
00252
00253     childNode1 = myXML.getFirstChild(rootNode);
00254     if (childNode1 == NULL) {
00255       BIASERR("No CameraDescriptions in Rig, empty Rig???");
00256       return -1;
00257     }
00258
00259     int CamCount=0;
00260     int SensCount=0;
00261     CameraData cd;
00262     SensorData sd;
00263     do {
00264       if (myXML.getNodeName(childNode1)=="cameraDescription") {
00265         Initialize(cd);
00266         childNode2 = myXML.getChild(childNode1, "camera");
00267         if (childNode2 == NULL) {
00268           BIASERR("\"CameraDescription\" without a \"Camera\" is not possible.");
00269           return -1;
00270         }  else {
00271           if (ReadCameraData(myXML, childNode2, cd)<0) return -1;
00272         }
00273         childNode2 = myXML.getChild(childNode1, "poseInRig");
00274         if (childNode2 == NULL) {
00275           BIASERR("\"cameraDescription\" without a \"poseInRig\" is not possible.");
00276           return -1;
00277         }  else {
00278           cd.PoseInRigCenter_[0] =
00279             myXML.getNodeContentDouble(myXML.getChild(childNode2, "x"));
00280           cd.PoseInRigCenter_[1] =
00281             myXML.getNodeContentDouble(myXML.getChild(childNode2, "y"));
00282           cd.PoseInRigCenter_[2] =
00283             myXML.getNodeContentDouble(myXML.getChild(childNode2, "z"));
00284           cd.PoseInRigYaw_ =
00285             myXML.getNodeContentDouble(myXML.getChild(childNode2,"yaw"));
00286           cd.PoseInRigPitch_ =
00287             myXML.getNodeContentDouble(myXML.getChild(childNode2,"pitch"));
00288           cd.PoseInRigRoll_ =
00289             myXML.getNodeContentDouble(myXML.getChild(childNode2,"roll"));
00290         }
00291         vcd.push_back(cd);
00292         CamCount++;
00293       }
00294
00295       if (myXML.getNodeName(childNode1)=="sensorDescription") {
00296         InitializeSensor(sd);
00297         childNode2 = myXML.getChild(childNode1, "poseInRig");
00298         if (childNode2 == NULL) {
00299           BIASERR("\"sensorDescription\" without a \"poseInRig\" is not possible.");
00300           return -1;
00301         }  else {
00302           sd.PoseInRigCenter_[0] =
00303             myXML.getNodeContentDouble(myXML.getChild(childNode2, "x"));
00304           sd.PoseInRigCenter_[1] =
00305             myXML.getNodeContentDouble(myXML.getChild(childNode2, "y"));
00306           sd.PoseInRigCenter_[2] =
00307             myXML.getNodeContentDouble(myXML.getChild(childNode2, "z"));
00308           sd.PoseInRigYaw_ =
00309             myXML.getNodeContentDouble(myXML.getChild(childNode2,"yaw"));
00310           sd.PoseInRigPitch_ =
00311             myXML.getNodeContentDouble(myXML.getChild(childNode2,"pitch"));
00312           sd.PoseInRigRoll_ =
00313             myXML.getNodeContentDouble(myXML.getChild(childNode2,"roll"));
00314         }
00315         vcd.push_back(cd);
00316         SensCount++;
00317       }
00318       childNode1 = myXML.getNextChild(childNode1);
00319     } while (childNode1!=NULL);
00320   }
00321
00322   if (vcd.size()==0) return -1;
00323
00324   return 0;
00325 }
00326
00327
00328 int ProjectionParametersIO::ReadRigDataV0_8(const std::string &filename,
00329                                             std::vector<CameraData>& vcd) {
00330
00331   XMLIO myXML;
00332   xmlNodePtr rootNode, childNode1, childNode2;
00333
00334   rootNode = myXML.read(filename);
00335   if (rootNode==NULL) {
00336     BIASERR("Rig-Parameter-File not found or parse error: " << filename);
00337     return -1;
00338   }
00339
00340   // Root node is "Rig"
00341   childNode1 = myXML.getFirstChild(rootNode);
00342   if (childNode1 == NULL) {
00343     BIASERR("No CameraDescriptions in Rig, empty Rig???");
00344     return -1;
00345   }
00346
00347   int CamCount=0;
00348   CameraData cd;
00349   do {
00350     if (myXML.getNodeName(childNode1)=="CameraDescription") {
00351       Initialize(cd);
00352       childNode2 = myXML.getChild(childNode1, "Camera");
00353       if (childNode2 == NULL) {
00354         BIASERR("\"CameraDescription\" without a \"Camera\" is not possible.");
00355         return -1;
00356       }  else {
00357         if (ReadCameraData(myXML, childNode2, cd)<0) return -1;
00358       }
00359       childNode2 = myXML.getChild(childNode1, "PoseInRig");
00360       if (childNode2 == NULL) {
00361         BIASERR("\"CameraDescription\" without a \"PoseInRig\" is not possible.");
00362         return -1;
00363       }  else {
00364         cd.PoseInRigCenter_[0] =
00365           myXML.getAttributeValueDouble(childNode2, "X");
00366         cd.PoseInRigCenter_[1] =
00367           myXML.getAttributeValueDouble(childNode2, "Y");
00368         cd.PoseInRigCenter_[2] =
00369           myXML.getAttributeValueDouble(childNode2, "Z");
00370         cd.PoseInRigYaw_ =
00371           myXML.getAttributeValueDouble(childNode2,"Yaw");
00372         cd.PoseInRigPitch_ =
00373           myXML.getAttributeValueDouble(childNode2,"Pitch");
00374         cd.PoseInRigRoll_ =
00375           myXML.getAttributeValueDouble(childNode2,"Roll");
00376       }
00377       vcd.push_back(cd);
00378       CamCount++;
00379     }
00380     childNode1 = myXML.getNextChild(childNode1);
00381   } while (childNode1!=NULL);
00382
00383   if (vcd.size()==0) return -1;
00384
00385   return 0;
00386 }
00387
00388
00389 int ProjectionParametersIO::WriteCameraData(const std::string& Filename,
00390                                             const CameraData& cd) {
00391
00392   XMLIO myXML;
00393   xmlNodePtr rootNode;
00394   rootNode = myXML.create("camera");
00395   myXML.addAttribute(rootNode, "version",
00396                      CAMERA_PARAMETER_CURRENT_XML_VERSION);
00397   AddCameraDataToNode(myXML, rootNode, cd);
00398   myXML.write(Filename);
00399   return 0;
00400
00401 }
00402
00403
00404 int ProjectionParametersIO::AddCameraDataToRig(XMLIO &myXML,
00405                                                xmlNodePtr &cameraDataNode,
00406                                                const CameraData &cd) {
00407
00408   xmlNodePtr childNode;
00409   childNode = myXML.addChildNode(cameraDataNode, "camera");
00410   myXML.addAttribute(childNode, "version",
00411       std::string("2.0") );
00412   AddCameraDataToNode(myXML, childNode, cd);
00413   return 0;
00414
00415 }
00416
00417
00418 int ProjectionParametersIO::AddCameraDataToNode(XMLIO &myXML,
00419                                                 xmlNodePtr &rootNode,
00420                                                 const CameraData &cd) {
00421
00422   unsigned int i;
00423   xmlNodePtr  childNode2, childNode3, childNode4;
00424   myXML.addComment(rootNode, "\"Model\" is an arbitrary camera name.\n \"SerialID\" is i.e. the camera firewire-bus ID.\n \"ImageWidth\" and \"ImageHeight\" are in pixel.\n \"CellSizeX\" is the size of one CCD-cell in meter.\n \"AspectRatio\" is CellsizeX/CellSizeY (same as FocalLengthY/FocalLengthX).");
00425   childNode2 = myXML.addChildNode(rootNode, "Sensor");
00426   myXML.addAttribute(childNode2, "Model", cd.CamModel_ );
00427   myXML.addAttribute(childNode2, "SerialID", cd.CamID_);
00428   myXML.addAttribute(childNode2, "ImageWidth", (int) cd.width_);
00429   myXML.addAttribute(childNode2, "ImageHeight", (int) cd.height_);
00430   myXML.addAttribute(childNode2, "CellSizeX", cd.cellSizeX_);
00431   myXML.addAttribute(childNode2, "AspectRatio", cd.aspectratio_);
00432   myXML.addComment(rootNode, "\"Model\" is an arbitrary name.\n \"Type\" can be either \"Spherical\" or \"Perspective\"");
00433   childNode2 = myXML.addChildNode(rootNode, "Lens");
00434   myXML.addAttribute(childNode2, "Model", cd.LensModel_ );
00435   string LensType="";
00436   if (cd.LensIsSpherical_) {
00437     LensType="Spherical";
00438   } else {
00439     LensType="Perspective";
00440   }
00441   myXML.addAttribute(childNode2, "Type", LensType);
00442   if (cd.LensIsSpherical_) {
00443     childNode3 = myXML.addChildNode(childNode2, "AngleCalib");
00444     myXML.addComment(childNode3, "Measurement points of angle calibration curve.\n \"AngRay\" is the angle of the viewing ray, \"AngDeformed\" is the Angle deformed by the camera.\n The maximium \"AngRay\" is the cameras FoV.");
00445     for (i=0; i<cd.AngleCorrX_.size(); i++) {
00446       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00447       myXML.addAttribute(childNode4, "AngRay", cd.AngleCorrX_[i]);
00448       myXML.addAttribute(childNode4, "AngDeformed", cd.AngleCorrY_[i]);
00449     }
00450   } else {
00451     childNode3 = myXML.addChildNode(childNode2, "PerspectiveCalib");
00452     myXML.addComment(childNode3, "\"FocalLength\" is FocalLengthX in meters, if you want to give it in pixel set \"CellSizeX\"=1.\n\"k1\" and \"k2\" are radial distortion; \"p1\", \"p2\" are tangential distortion.\n Camera calibration constants coming from the matlab toolbox 'http://www.vision.caltech.edu/bouguetj/calib_doc/'.\n Distortion is calculated as x'=x*(1+k1*r^2+k2*r^4)+2*p1*x*y+p2*(r^2+2*x^2) and y'=y*(1+k1*r^2+k2*r^4)+2*p1*(r^2+2*y^2)+2*p2*x*y with r^2=(x^2+y^2).");
00453     if (cd.focallengthDef_!=0) {
00454       childNode4 = myXML.addChildNode(childNode3, "Default");
00455       //convert to mm
00456       double fl = cd.focallengthDef_ * cd.cellSizeX_;
00457       myXML.addAttribute(childNode4, "FocalLength", fl);
00458       myXML.addAttribute(childNode4, "k1", cd.kc1Def_);
00459       myXML.addAttribute(childNode4, "k2", cd.kc2Def_);
00460       myXML.addAttribute(childNode4, "p1", cd.kc3Def_);
00461       myXML.addAttribute(childNode4, "p2", cd.kc4Def_);
00462     }
00463     for (i=0; i<cd.knownparams_vect_.size(); i++) {
00464       childNode4 = myXML.addChildNode(childNode3, "ZoomStep");
00465       myXML.addAttribute(childNode4, "Zoom", cd.knownparams_vect_[i].zoom);
00466       //convert to mm
00467       double fl = cd.knownparams_vect_[i].focallength * cd.cellSizeX_;
00468       myXML.addAttribute(childNode4, "FocalLength", fl);
00469   //       myXML.addComment(childNode2,"Focal length in meter, if you want to use the pixel value set pixelSpacing to 1.");
00470     myXML.addAttribute(childNode4, "k1", cd.knownparams_vect_[i].kc1);
00471       myXML.addAttribute(childNode4, "k2", cd.knownparams_vect_[i].kc2);
00472       myXML.addAttribute(childNode4, "p1", cd.knownparams_vect_[i].kc3);
00473       myXML.addAttribute(childNode4, "p2", cd.knownparams_vect_[i].kc4);
00474     }
00475   }
00476   childNode3 = myXML.addChildNode(childNode2, "VignetteCalib");
00477   if (cd.LensIsSpherical_) {
00478     myXML.addComment(childNode3, "The measurements for vignette calibration relate the angle of the viewing ray to an absorbtion factor for the corresponding image pixels.");
00479     for (i=0; i<cd.IlluCorrX_.size(); i++) {
00480       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00481       myXML.addAttribute(childNode4, "AngRay", cd.IlluCorrX_[i]);
00482       myXML.addAttribute(childNode4, "Fac", cd.IlluCorrY_[i]);
00483     }
00484   } else {
00485     myXML.addComment(childNode3, "The measurements for vignette calibration relate the distance of a pixel from the image principal point to an absorbtion factor for the corresponding image pixels.");
00486     for (i=0; i<cd.IlluCorrX_.size(); i++) {
00487       childNode4 = myXML.addChildNode(childNode3, "MeasPt");
00488       myXML.addAttribute(childNode4, "Dist", cd.IlluCorrX_[i]);
00489       myXML.addAttribute(childNode4, "Fac", cd.IlluCorrY_[i]);
00490     }
00491   }
00492
00493   myXML.addComment(rootNode, "The \"PrincipalPoint\" is given as a fraction of \"ImageWidth\"/\"ImageHeight\" with (0.5,0.5) is the image center.");
00494   childNode2 = myXML.addChildNode(rootNode, "PrincipalPoint");
00495   myXML.addAttribute(childNode2, "X", cd.principalX_/cd.width_);
00496   myXML.addAttribute(childNode2, "Y", cd.principalY_/cd.height_);
00497   if (cd.LensIsSpherical_) {
00498     myXML.addComment(childNode2, "The \"SphereRadius\" is given as a fraction of \"ImageWidth\".");
00499     myXML.addAttribute(childNode2, "SphereRadius", cd.radius_/cd.width_);
00500   }
00501
00502   return 0;
00503 }
00504
00505
00506 int ProjectionParametersIO::ReadCameraData(const std::string& Filename,
00507                                            CameraData& cd) {
00508
00509   XMLIO myXML;
00510   xmlNodePtr rootNode;
00511   rootNode = myXML.read(Filename);
00512   if (rootNode==NULL) {
00513     BIASERR("Camera-Parameter-File not found or parse error: " << Filename);
00514     return -1;
00515   }
00516
00517   if (myXML.getNodeName(rootNode)!="camera" &&
00518       myXML.getNodeName(rootNode)!="Camera") {
00519     BIASERR("Root node has to be \"camera\"");
00520     return -1;
00521   }
00522   ReadCameraData (myXML, rootNode, cd);
00523
00524   return 0;
00525 }
00526
00527
00528 int ProjectionParametersIO::ReadCameraData(XMLIO &myXML,
00529                                            xmlNodePtr &cameraNode,
00530                                            CameraData& cd) {
00531
00532   Initialize(cd);
00533
00534   double vers = 0;
00535
00536   vers = myXML.getAttributeValueDouble(cameraNode, "Version");
00537   if (vers==0) {
00538     vers = myXML.getAttributeValueDouble(cameraNode, "version");
00539   }
00540   if (vers!=CAMERA_PARAMETER_CURRENT_XML_VERSION) {
00541     BIASWARN("Camera-Parameter Version (" << vers << ") is Deprecated, "
00542              << "current version is " << CAMERA_PARAMETER_CURRENT_XML_VERSION);
00543     if (vers==0.8) {
00544       ReadCameraDataV0_8(myXML, cameraNode, cd);
00545       return 0;
00546     } else {
00547       if (vers==1.0) {
00548         ReadCameraDataV1_0(myXML, cameraNode, cd);
00549         return 0;
00550       } else {
00551         return -1;
00552       }
00553     }
00554   }
00555
00556   xmlNodePtr  childNode2, childNode3, childNode4;
00557
00558   childNode2 = myXML.getChild(cameraNode, "Sensor");
00559   if (childNode2!=NULL) {
00560     cd.CamModel_ = myXML.getAttributeValueString(childNode2, "Model");
00561     cd.CamID_ = myXML.getAttributeValueInt(childNode2, "SerialID");
00562     cd.width_ = myXML.getAttributeValueInt(childNode2, "ImageWidth");
00563     cd.height_ = myXML.getAttributeValueInt(childNode2, "ImageHeight");
00564     if (cd.CamModel_=="" || cd.CamID_==0 || cd.width_==0 || cd.height_==0) {
00565       BIASERR("Sensor-data incomplete. Camera Model=" << cd.CamModel_
00566               << ", Camera Serial=" << cd.CamID_
00567               << ", Image Width=" << cd.width_
00568               << ", Image Height" << cd.height_);
00569       return -1;
00570     }
00571     cd.cellSizeX_ = myXML.getAttributeValueDouble(childNode2, "CellSizeX");
00572     cd.aspectratio_ = myXML.getAttributeValueDouble(childNode2, "AspectRatio");
00573     if (cd.cellSizeX_==0 || cd.aspectratio_==0) {
00574       cd.aspectratio_=1;
00575       cd.cellSizeX_=1;
00576       cd.cellSizeY_=1;
00577     } else {
00578      cd.cellSizeY_ = cd.cellSizeX_ / cd.aspectratio_;
00579     }
00580   } else {
00581     BIASERR("Node \"Sensor\" missing.");
00582     return -1;
00583   }
00584
00585   childNode2 = myXML.getChild(cameraNode, "Lens");
00586   if (childNode2==NULL) {
00587     BIASERR("Node \"Lens\" missing.");
00588     return -1;
00589   }
00590
00591   cd.LensModel_ = myXML.getAttributeValueString(childNode2, "Model");
00592   string LensType = myXML.getAttributeValueString(childNode2, "Type");
00593
00594   if (LensType!="Spherical" && LensType!="Perspective") {
00595     BIASERR("Unknown Lens-Type, has to be \"Spherical\" or \"Perspective\".");
00596     return -1;
00597   }
00598   if (LensType=="Spherical") {
00599     cd.LensIsSpherical_ = true;
00600     cd.zoomCamera_=false;
00601     childNode3 = myXML.getChild(childNode2, "AngleCalib");
00602     if (childNode3==NULL) {
00603       BIASERR("Node \"AngleCalib\" missing.");
00604       return -1;
00605     }
00606     childNode4 = myXML.getFirstChild(childNode3);
00607     if (childNode4 == NULL) {
00608       BIASERR("No angle calibration measurement points.");
00609       return -1;
00610     }  else {
00611       do {
00612         if (myXML.getNodeName(childNode4)=="MeasPt") {
00613           // TODO: Write these into SphereParameters class
00614           double x,y;
00615           x = myXML.getAttributeValueDouble(childNode4, "AngRay");
00616           y = myXML.getAttributeValueDouble(childNode4, "AngDeformed");
00617           cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
00618         }
00619         childNode4 = myXML.getNextChild();
00620       } while (childNode4!=NULL);
00621     }
00622   }
00623   if (LensType=="Perspective") {
00624     cd.LensIsSpherical_ = false;
00625     cd.zoomCamera_=false;
00626     childNode3 = myXML.getChild(childNode2, "PerspectiveCalib");
00627     if (childNode3 != NULL) {
00628       childNode4 = myXML.getFirstChild(childNode3);
00629       if (childNode4 != NULL) {
00630         do {
00631           if (myXML.getNodeName(childNode4)=="Default") {
00632             cd.focallengthDef_ =
00633               myXML.getAttributeValueDouble(childNode4, "FocalLength");
00634             //convert to Pixel
00635             if (cd.cellSizeX_!=1) {
00636               cd.focallengthDef_ = cd.focallengthDef_ / cd.cellSizeX_;
00637             }
00638             cd.kc1Def_ = myXML.getAttributeValueDouble(childNode4, "k1");
00639             cd.kc2Def_ = myXML.getAttributeValueDouble(childNode4, "k2");
00640             cd.kc3Def_ = myXML.getAttributeValueDouble(childNode4, "p1");
00641             cd.kc4Def_ = myXML.getAttributeValueDouble(childNode4, "p2");
00642           }
00643           if (myXML.getNodeName(childNode4)=="ZoomStep") {
00644             CPDiscreteParam dp;
00645             dp.zoom=myXML.getAttributeValueDouble(childNode4, "Zoom");
00646             dp.focallength=myXML.getAttributeValueDouble(childNode4,
00647                                                          "FocalLength");
00648              //convert to Pixel
00649             if (cd.cellSizeX_!=1) {
00650               dp.focallength = dp.focallength / cd.cellSizeX_;
00651             }
00652             dp.kc1=myXML.getAttributeValueDouble(childNode4, "k1");
00653             dp.kc2=myXML.getAttributeValueDouble(childNode4, "k2");
00654             dp.kc3=myXML.getAttributeValueDouble(childNode4, "p1");
00655             dp.kc4=myXML.getAttributeValueDouble(childNode4, "p2");
00656             cd.knownparams_vect_.push_back(dp);
00657             cd.zoomCamera_=true;
00658           }
00659           childNode4 = myXML.getNextChild();
00660         } while (childNode4!=NULL);
00661         if (cd.knownparams_vect_.size()>0 &&
00662             cd.focallengthDef_==0) {
00663             cd.focallengthDef_ = cd.knownparams_vect_[0].focallength;
00664             cd.kc1Def_ = cd.knownparams_vect_[0].kc1;
00665             cd.kc2Def_ = cd.knownparams_vect_[0].kc2;
00666             cd.kc3Def_ = cd.knownparams_vect_[0].kc3;
00667             cd.kc4Def_ = cd.knownparams_vect_[0].kc4;
00668         }
00669       }
00670     }
00671   }
00672
00673   childNode3 = myXML.getChild(childNode2, "VignetteCalib");
00674   if (childNode3 != NULL) {
00675     childNode4 = myXML.getFirstChild(childNode3);
00676     if (childNode4 != NULL) {
00677       do {
00678         if (myXML.getNodeName(childNode4)=="MeasPt") {
00679           // TODO: Write these into SphereParameters & cameradata class
00680           double x,y;
00681           if (cd.LensIsSpherical_) {
00682             x = myXML.getAttributeValueDouble(childNode4, "AngRay");
00683           } else {
00684             x = myXML.getAttributeValueDouble(childNode4, "Dist");
00685           }
00686           y = myXML.getAttributeValueDouble(childNode4, "Fac");
00687           cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
00688         }
00689         childNode4 = myXML.getNextChild();
00690       } while (childNode4!=NULL);
00691     }
00692   }
00693
00694   childNode2 = myXML.getChild(cameraNode, "PrincipalPoint");
00695   if (childNode2 != NULL) {
00696     cd.principalX_ = myXML.getAttributeValueDouble(childNode2, "X");
00697     cd.principalX_ = cd.width_ * cd.principalX_;
00698     cd.principalY_ = myXML.getAttributeValueDouble(childNode2, "Y");
00699     cd.principalY_ = cd.height_ * cd.principalY_;
00700     if (cd.LensIsSpherical_) {
00701       cd.radius_ = myXML.getAttributeValueDouble(childNode2, "SphereRadius");
00702       cd.radius_ = cd.width_ * cd.radius_;
00703     }
00704   } else {
00705     cd.principalX_ = cd.width_/2.0;
00706     cd.principalY_ = cd.height_/2.0;
00707     if (cd.LensIsSpherical_) {
00708       cd.radius_ = cd.height_/2.0;
00709     }
00710   }
00711
00712   return 0;
00713
00714 }
00715
00716
00717 int ProjectionParametersIO::ReadCameraDataV1_0(XMLIO &myXML,
00718                                                xmlNodePtr &cameraNode,
00719                                                CameraData& cd) {
00720
00721   Initialize(cd);
00722
00723   cd.CamModel_ = myXML.getAttributeValueString(cameraNode, "name");
00724
00725   xmlNodePtr  childNode2, childNode3, childNode4, childNode5, childNode6;
00726
00727   childNode2 = myXML.getChild(cameraNode, "id");
00728   cd.CamID_ = myXML.getNodeContentInt(childNode2);
00729   if ( cd.CamID_==0 ) {
00730        BIASERR("Sensor-data incomplete. Camera ID must not be 0:" << cd.CamID_);
00731       return -1;
00732     }
00733
00734   childNode2 = myXML.getChild(cameraNode, "sensor");
00735   if (childNode2!=NULL) {
00736     childNode3 = myXML.getChild(childNode2, "numberOfPixels");
00737     childNode4 = myXML.getChild(childNode3, "x");
00738     cd.width_ = myXML.getNodeContentInt(childNode4);
00739     childNode4 = myXML.getChild(childNode3, "y");
00740     cd.height_ = myXML.getNodeContentInt(childNode4);
00741     if ( cd.width_==0 || cd.height_==0) {
00742       BIASERR("Sensor-data incomplete. Camera ID=" << cd.CamID_
00743               << ", Image Width= " << cd.width_
00744               << ", Image Height= " << cd.height_);
00745       return -1;
00746     }
00747
00748     childNode3 = myXML.getChild(childNode2, "pixelSpacing");
00749     childNode4 = myXML.getChild(childNode3, "x");
00750     cd.cellSizeX_ = myXML.getNodeContentDouble(childNode4);
00751     childNode4 = myXML.getChild(childNode3, "y");
00752     cd.cellSizeY_ = myXML.getNodeContentDouble(childNode4);
00753     if (cd.cellSizeX_==0 || cd.cellSizeY_==0) {
00754       cd.cellSizeX_=1;
00755       cd.cellSizeY_=1;
00756     }
00757     cd.aspectratio_ = cd.cellSizeX_/cd.cellSizeY_;
00758     childNode3 = myXML.getChild(childNode2, "principalPoint");
00759     if (childNode3 != NULL) {
00760       childNode4 = myXML.getChild(childNode3, "x");
00761       cd.principalX_ = myXML.getNodeContentDouble(childNode4);
00762       childNode4 = myXML.getChild(childNode3, "y");
00763       cd.principalY_ = myXML.getNodeContentDouble(childNode4);
00764       //convert to Pixel
00765       cd.principalX_ = cd.width_/2.0  + cd.principalX_/cd.cellSizeX_;
00766       cd.principalY_ = cd.height_/2.0 + cd.principalY_/cd.cellSizeY_;
00767     } else {
00768       cd.principalX_ = cd.width_/2.0;
00769       cd.principalY_ = cd.height_/2.0;
00770     }
00771
00772   } else {
00773     BIASERR("Node \"sensor\" missing.");
00774     return -1;
00775   }
00776
00777   childNode2 = myXML.getChild(cameraNode, "lens");
00778   if (childNode2!=NULL) {
00779     cd.LensIsSpherical_=false;
00780     cd.zoomCamera_=false;
00781   } else {
00782     childNode2 = myXML.getChild(cameraNode, "zoomLens");
00783     if (childNode2!=NULL) {
00784       cd.LensIsSpherical_=false;
00785       cd.zoomCamera_=true;
00786     } else {
00787       childNode2 = myXML.getChild(cameraNode, "sphericalLens");
00788       if (childNode2!=NULL) {
00789         cd.LensIsSpherical_=true;
00790         cd.zoomCamera_=false;
00791       } else {
00792         BIASERR("Camera has no lens-, zoomLens- or sphericalLens-Tag");
00793         return -1;
00794       }
00795     }
00796   }
00797
00798   cd.LensModel_ = myXML.getAttributeValueString(childNode2, "name");
00799
00800   if (cd.LensIsSpherical_) {
00801
00802     childNode3 = myXML.getChild(childNode2, "angleCalibration");
00803     if (childNode3==NULL) {
00804       BIASERR("Node \"angleCalibration\" missing.");
00805       return -1;
00806     }
00807     childNode4 = myXML.getFirstChild(childNode3);
00808     if (childNode4 == NULL) {
00809       BIASERR("No angle calibration measurement points.");
00810       return -1;
00811     }  else {
00812       do {
00813         if (myXML.getNodeName(childNode4)=="measPoint") {
00814           double x,y;
00815           childNode5 = myXML.getChild(childNode4, "angleRay");
00816           x = myXML.getNodeContentDouble(childNode5);
00817           childNode5 = myXML.getChild(childNode4, "angleDeformed");
00818           y = myXML.getNodeContentDouble(childNode5);
00819           cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
00820         }
00821         childNode4 = myXML.getNextChild(childNode4);
00822       } while (childNode4!=NULL);
00823     }
00824
00825     childNode3 = myXML.getChild(childNode2, "vignetteCalibration");
00826     if (childNode3 != NULL) {
00827       childNode4 = myXML.getFirstChild(childNode3);
00828       if (childNode4 != NULL) {
00829         do {
00830           if (myXML.getNodeName(childNode4)=="measPoint") {
00831             double x,y;
00832             childNode5 = myXML.getChild(childNode4, "angleRay");
00833             x = myXML.getNodeContentDouble(childNode5);
00834             childNode5 = myXML.getChild(childNode4, "factor");
00835             y = myXML.getNodeContentDouble(childNode5);
00836             cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
00837           }
00838           childNode4 = myXML.getNextChild(childNode4);
00839         } while (childNode4!=NULL);
00840       }
00841     }
00842
00843     childNode3 = myXML.getChild(childNode2, "sphereRadius");
00844     cd.radius_ = myXML.getNodeContentDouble(childNode3);
00845     if (childNode3==NULL) {
00846       BIASERR("Sphere radius missing!");
00847       return -1;
00848     }
00849
00850   } else {  //  if (!LensIsSpherical_)
00851     if (!cd.zoomCamera_) {
00852       childNode3 = myXML.getChild(childNode2, "focalLength");
00853       cd.focallengthDef_ = myXML.getNodeContentDouble(childNode3);
00854       //convert to Pixel
00855       cd.focallengthDef_ = cd.focallengthDef_/cd.cellSizeX_;
00856       childNode3 = myXML.getChild(childNode2, "distortion");
00857       childNode4 = myXML.getChild(childNode3, "radial");
00858       childNode5 = myXML.getChild(childNode4, "k1");
00859       cd.kc1Def_ = myXML.getNodeContentDouble(childNode5);
00860       childNode5 = myXML.getChild(childNode4, "k2");
00861       cd.kc2Def_ = myXML.getNodeContentDouble(childNode5);
00862       childNode4 = myXML.getChild(childNode3, "tangential");
00863       childNode5 = myXML.getChild(childNode4, "p1");
00864       cd.kc3Def_ = myXML.getNodeContentDouble(childNode5);
00865       childNode5 = myXML.getChild(childNode4, "p2");
00866       cd.kc4Def_ = myXML.getNodeContentDouble(childNode5);
00867     } else { // if (zoomCamera)
00868       childNode3 = myXML.getFirstChild(childNode2);
00869       if (childNode3 != NULL) {
00870         do {
00871           if (myXML.getNodeName(childNode3)=="zoomStep") {
00872             CPDiscreteParam dp;
00873             childNode4 = myXML.getChild(childNode3, "zoom");
00874             dp.zoom = myXML.getNodeContentDouble(childNode4);
00875             childNode4=myXML.getChild(childNode3, "focalLength");
00876             dp.focallength = myXML.getNodeContentDouble(childNode4);
00877              //convert to Pixel
00878             dp.focallength = dp.focallength/cd.cellSizeX_;
00879             childNode4=myXML.getChild(childNode3, "distortion");
00880             childNode5=myXML.getChild(childNode4, "radial");
00881             childNode6=myXML.getChild(childNode5, "k1");
00882             dp.kc1 = myXML.getNodeContentDouble(childNode6);
00883             childNode6=myXML.getChild(childNode5, "k2");
00884             dp.kc2 = myXML.getNodeContentDouble(childNode6);
00885             childNode5=myXML.getChild(childNode4, "tangential");
00886             childNode6=myXML.getChild(childNode5, "p1");
00887             dp.kc3 = myXML.getNodeContentDouble(childNode6);
00888             childNode6=myXML.getChild(childNode5, "p2");
00889             dp.kc4 = myXML.getNodeContentDouble(childNode6);
00890             cd.knownparams_vect_.push_back(dp);
00891           }
00892           if (myXML.getNodeName(childNode3)=="defaultZoom") {
00893             BIASERR("defaultZoom is deprecated and has no effect, use different param-file version");
00894           }
00895           childNode3 = myXML.getNextChild(childNode3);
00896         } while (childNode3!=NULL);
00897         if (cd.knownparams_vect_.size()>0) {
00898           cd.focallengthDef_ = cd.knownparams_vect_[0].focallength;
00899           cd.kc1Def_ = cd.knownparams_vect_[0].kc1;
00900           cd.kc2Def_ = cd.knownparams_vect_[0].kc2;
00901           cd.kc3Def_ = cd.knownparams_vect_[0].kc3;
00902           cd.kc4Def_ = cd.knownparams_vect_[0].kc4;
00903         }
00904       }
00905     }
00906   }
00907
00908   return 0;
00909 }
00910
00911
00912 int ProjectionParametersIO::ReadCameraDataV0_8(XMLIO &myXML,
00913                                                xmlNodePtr &cameraNode,
00914                                                CameraData& cd) {
00915
00916   Initialize(cd);
00917
00918   xmlNodePtr  childNode2, childNode3, childNode4;
00919
00920   childNode2 = myXML.getChild(cameraNode, "Sensor");
00921   if (childNode2!=NULL) {
00922     cd.CamModel_ = myXML.getAttributeValueString(childNode2, "Model");
00923     cd.CamID_ = myXML.getAttributeValueInt(childNode2, "SerialID");
00924     cd.width_ = myXML.getAttributeValueInt(childNode2, "ImageWidth");
00925     cd.height_ = myXML.getAttributeValueInt(childNode2, "ImageHeight");
00926     if (cd.CamModel_=="" || cd.CamID_==0 || cd.width_==0 || cd.height_==0) {
00927       BIASERR("Sensor-data incomplete. Camera Model=" << cd.CamModel_
00928               << ", Camera Serial=" << cd.CamID_
00929               << ", Image Width=" << cd.width_
00930               << ", Image Height" << cd.height_);
00931       return -1;
00932     }
00933     cd.cellSizeX_ = myXML.getAttributeValueDouble(childNode2, "CellSizeInMicrX");
00934     cd.cellSizeY_ = myXML.getAttributeValueDouble(childNode2, "CellSizeInMicrY");
00935     if (cd.cellSizeX_>100 ||cd.cellSizeY_>100) {
00936       cd.cellSizeX_ /= 1000.0;
00937       cd.cellSizeY_ /= 1000.0;
00938     } else {
00939       cd.cellSizeX_ /= 1000000.0;
00940       cd.cellSizeY_ /= 1000000.0;
00941     }
00942     if (cd.cellSizeX_==0 || cd.cellSizeY_==0) {
00943       cd.aspectratio_=1;
00944       cd.cellSizeX_=1;
00945       cd.cellSizeY_=1;
00946     } else {
00947       cd.aspectratio_ = cd.cellSizeX_/cd.cellSizeY_;
00948     }
00949   } else {
00950     BIASERR("Node \"Sensor\" missing.");
00951     return -1;
00952   }
00953
00954   childNode2 = myXML.getChild(cameraNode, "Lens");
00955   if (childNode2==NULL) {
00956     BIASERR("Node \"Lens\" missing.");
00957     return -1;
00958   }
00959
00960   cd.LensModel_ = myXML.getAttributeValueString(childNode2, "Model");
00961   string LensType = myXML.getAttributeValueString(childNode2, "Type");
00962
00963   if (LensType!="Spherical" && LensType!="Perspective") {
00964     BIASERR("Unknown Lens-Type, has to be \"Spherical\" or \"Perspective\".");
00965     return -1;
00966   }
00967   if (LensType=="Spherical") {
00968     cd.LensIsSpherical_ = true;
00969     cd.zoomCamera_=false;
00970     childNode3 = myXML.getChild(childNode2, "AngleCalib");
00971     if (childNode3==NULL) {
00972       BIASERR("Node \"AngleCalib\" missing.");
00973       return -1;
00974     }
00975     childNode4 = myXML.getFirstChild(childNode3);
00976     if (childNode4 == NULL) {
00977       BIASERR("No angle calibration measurement points.");
00978       return -1;
00979     }  else {
00980       do {
00981         if (myXML.getNodeName(childNode4)=="MeasPt") {
00982           // TODO: Write these into SphereParameters class
00983           double x,y;
00984           x = myXML.getAttributeValueDouble(childNode4, "AngRay");
00985           y = myXML.getAttributeValueDouble(childNode4, "AngDeformed");
00986           cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
00987         }
00988         childNode4 = myXML.getNextChild();
00989       } while (childNode4!=NULL);
00990     }
00991   }
00992   if (LensType=="Perspective") {
00993     cd.LensIsSpherical_ = false;
00994     cd.zoomCamera_=false;
00995     childNode3 = myXML.getChild(childNode2, "PerspectiveCalib");
00996     if (childNode3 != NULL) {
00997       childNode4 = myXML.getFirstChild(childNode3);
00998       if (childNode4 != NULL) {
00999         do {
01000           if (myXML.getNodeName(childNode4)=="Default") {
01001             cd.focallengthDef_ =
01002               myXML.getAttributeValueDouble(childNode4, "FocalLengthInMM");
01003             //convert to Pixel
01004             if (cd.cellSizeX_!=1) {
01005               cd.focallengthDef_ = cd.focallengthDef_/1000.0/cd.cellSizeX_;
01006             }
01007             cd.kc1Def_ = myXML.getAttributeValueDouble(childNode4, "KC1");
01008             cd.kc2Def_ = myXML.getAttributeValueDouble(childNode4, "KC2");
01009             cd.kc3Def_ = myXML.getAttributeValueDouble(childNode4, "KC3");
01010             cd.kc4Def_ = myXML.getAttributeValueDouble(childNode4, "KC4");
01011           }
01012           if (myXML.getNodeName(childNode4)=="ZoomStep") {
01013             CPDiscreteParam dp;
01014             dp.zoom=myXML.getAttributeValueDouble(childNode4, "Zoom");
01015             dp.focallength=myXML.getAttributeValueDouble(childNode4,
01016                                                          "FocalLengthInMM");
01017              //convert to Pixel
01018             if (cd.cellSizeX_!=1) {
01019               dp.focallength = dp.focallength/1000.0 / cd.cellSizeX_;
01020             }
01021             dp.kc1=myXML.getAttributeValueDouble(childNode4, "KC1");
01022             dp.kc2=myXML.getAttributeValueDouble(childNode4, "KC2");
01023             dp.kc3=myXML.getAttributeValueDouble(childNode4, "KC3");
01024             dp.kc4=myXML.getAttributeValueDouble(childNode4, "KC4");
01025             cd.knownparams_vect_.push_back(dp);
01026             cd.zoomCamera_=true;
01027           }
01028           childNode4 = myXML.getNextChild();
01029         } while (childNode4!=NULL);
01030         if (cd.knownparams_vect_.size()>0 &&
01031             cd.focallengthDef_==0) {
01032             cd.focallengthDef_ = cd.knownparams_vect_[0].focallength;
01033             cd.kc1Def_ = cd.knownparams_vect_[0].kc1;
01034             cd.kc2Def_ = cd.knownparams_vect_[0].kc2;
01035             cd.kc3Def_ = cd.knownparams_vect_[0].kc3;
01036             cd.kc4Def_ = cd.knownparams_vect_[0].kc4;
01037         }
01038       }
01039     }
01040   }
01041
01042   childNode3 = myXML.getChild(childNode2, "VignetteCalib");
01043   if (childNode3 != NULL) {
01044     childNode4 = myXML.getFirstChild(childNode3);
01045     if (childNode4 != NULL) {
01046       do {
01047         if (myXML.getNodeName(childNode4)=="MeasPt") {
01048           // TODO: Write these into SphereParameters & cameradata class
01049           double x,y;
01050           if (cd.LensIsSpherical_) {
01051             x = myXML.getAttributeValueDouble(childNode4, "AngRay");
01052           } else {
01053             x = myXML.getAttributeValueDouble(childNode4, "Dist");
01054           }
01055           y = myXML.getAttributeValueDouble(childNode4, "Fac");
01056           cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01057         }
01058         childNode4 = myXML.getNextChild();
01059       } while (childNode4!=NULL);
01060     }
01061   }
01062
01063   childNode2 = myXML.getChild(cameraNode, "PrincipalPoint");
01064   if (childNode2 != NULL) {
01065     cd.principalX_ = myXML.getAttributeValueDouble(childNode2, "X");
01066     cd.principalY_ = myXML.getAttributeValueDouble(childNode2, "Y");
01067     if (cd.LensIsSpherical_) {
01068       cd.radius_ = myXML.getAttributeValueDouble(childNode2, "SphereRadius");
01069     }
01070   } else {
01071     cd.principalX_ = cd.width_/2.0;
01072     cd.principalY_ = cd.height_/2.0;
01073     if (cd.LensIsSpherical_) {
01074       cd.radius_ = cd.height_/2.0;
01075     }
01076   }
01077
01078   return 0;
01079 }
01080 #endif
01081
01082 void ProjectionParametersIO::SetData_EVID31_147094(CameraData& cd) {
01083
01084   Initialize(cd);
01085
01086   CPDiscreteParam dp;
01087   cd.CamModel_ = "SONY EVI-D31";
01088   cd.CamID_ = 147094;
01089   cd.LensModel_ = "LENS_SONY_EVID31_BUILTIN";
01090   cd.LensIsSpherical_ = false;
01091
01092   cd.cellSizeX_=1;
01093   cd.cellSizeY_=1;
01094
01095   cd.width_=768;
01096   cd.height_=576;
01097
01098   cd.aspectratio_=1;
01099
01100   cd.principalX_=384;
01101   cd.principalY_=288;
01102
01103 //   exposureTime_ = 0.08;
01104 //   iris_ = 1;
01105 //   reciprocalFocus_ = 1.234;
01106
01107   cd.knownparams_vect_.clear();
01108
01109   // must be in descending order regarding the zoom!
01110
01111   dp.zoom=47;
01112   dp.focallength=910.781402852481733;
01113   dp.kc1=-0.268280770809586;
01114   dp.kc2=0.487451704517498;
01115   dp.kc3=-0.000762042258562;
01116   dp.kc4=-0.001130194838780;
01117   cd.knownparams_vect_.push_back(dp);
01118
01119   dp.zoom=45;
01120   dp.focallength=942.276371802197332;
01121   dp.kc1=-0.222325918868402;
01122   dp.kc2=0.303803084817878;
01123   dp.kc3=-0.000220828107747;
01124   dp.kc4=-0.002379174938453;
01125   cd.knownparams_vect_.push_back(dp);
01126
01127   dp.zoom=43;
01128   dp.focallength=989.223042668483913;
01129   dp.kc1=-0.230499856719837;
01130   dp.kc2=0.632569092436950;
01131   dp.kc3=0.000645301367934;
01132   dp.kc4=-0.002245120579513;
01133   cd.knownparams_vect_.push_back(dp);
01134
01135   dp.zoom=41;
01136   dp.focallength=1046.743156411611380;
01137   dp.kc1=-0.175147739150835;
01138   dp.kc2=0.399855896767651;
01139   dp.kc3=0.001819727735452;
01140   dp.kc4=-0.004642715440390;
01141   cd.knownparams_vect_.push_back(dp);
01142
01143   dp.zoom=39;
01144   dp.focallength=1113.877613258150632;
01145   dp.kc1=-0.199908717507440;
01146   dp.kc2=0.735328948045900;
01147   dp.kc3=0.001857139856879;
01148   dp.kc4=-0.001726332328807;
01149   cd.knownparams_vect_.push_back(dp);
01150
01151   dp.zoom=37;
01152   dp.focallength=1195.129672009601336;
01153   dp.kc1=-0.194029932886528;
01154   dp.kc2=1.052137931539009;
01155   dp.kc3=0.002556010034664;
01156   dp.kc4=-0.002664280436511;
01157   cd.knownparams_vect_.push_back(dp);
01158
01159   dp.zoom=35;
01160   dp.focallength=1284.915674699713918;
01161   dp.kc1=-0.222381373429422;
01162   dp.kc2=1.627430874083972;
01163   dp.kc3=0.001072744905158;
01164   dp.kc4=-0.001628105221342;
01165   cd.knownparams_vect_.push_back(dp);
01166
01167   dp.zoom=33;
01168   dp.focallength=1381.682287410254276;
01169   dp.kc1=-0.221923278642680;
01170   dp.kc2=1.734685282276320;
01171   dp.kc3=0.002486050695331;
01172   dp.kc4=-0.001291711925732;
01173   cd.knownparams_vect_.push_back(dp);
01174
01175   dp.zoom=31;
01176   dp.focallength=1493.437763776483052;
01177   dp.kc1=-0.224447467694984;
01178   dp.kc2=1.863840161034580;
01179   dp.kc3=0.003709677616807;
01180   dp.kc4=-0.001150445035362;
01181   cd.knownparams_vect_.push_back(dp);
01182
01183   dp.zoom=29;
01184   dp.focallength=1616.993704040472039;
01185   dp.kc1=-0.202923793671622;
01186   dp.kc2=1.473981778670278;
01187   dp.kc3=0.003684677768293;
01188   dp.kc4=-0.002550288087126;
01189   cd.knownparams_vect_.push_back(dp);
01190
01191   dp.zoom=27;
01192   dp.focallength=1757.081611652665060;
01193   dp.kc1=-0.217240281709651;
01194   dp.kc2=2.140024501420107;
01195   dp.kc3=0.001114854630183;
01196   dp.kc4=-0.001295578479362;
01197   cd.knownparams_vect_.push_back(dp);
01198
01199   dp.zoom=25;
01200   dp.focallength=1902.05452;
01201   dp.kc1=-0.23863;
01202   dp.kc2=1.61900;
01203   dp.kc3=0.00195;
01204   dp.kc4=-0.00185;
01205   cd.knownparams_vect_.push_back(dp);
01206
01207   dp.zoom=23;
01208   dp.focallength=2074.378333106370974;
01209   dp.kc1=-0.255567875389573;
01210   dp.kc2=1.732924024277849;
01211   dp.kc3=0.001245946585972;
01212   dp.kc4=-0.000594821663798;
01213   cd.knownparams_vect_.push_back(dp);
01214
01215   dp.zoom=21;
01216   dp.focallength=2282.63949;
01217   dp.kc1=-0.26368;
01218   dp.kc2=0.44519;
01219   dp.kc3=0.00174;
01220   dp.kc4=-0.00076;
01221   cd.knownparams_vect_.push_back(dp);
01222
01223   dp.zoom=19;
01224   dp.focallength=2519.628084135987592;
01225   dp.kc1=-0.332071279316112;
01226   dp.kc2=0.944781789471998;
01227   dp.kc3=0.000746973436601;
01228   dp.kc4=-0.001772703465946;
01229   cd.knownparams_vect_.push_back(dp);
01230
01231   dp.zoom=17;
01232   dp.focallength=2824.507670379169667;
01233   dp.kc1=-0.404343435901478;
01234   dp.kc2=0.453162060457514;
01235   dp.kc3=-0.000861720421368;
01236   dp.kc4=-0.001149130726447;
01237   cd.knownparams_vect_.push_back(dp);
01238
01239   dp.zoom=15;
01240   dp.focallength=3226.589266051306367;
01241   dp.kc1=-0.594320179301222;
01242   dp.kc2=12.959736505367889;
01243   dp.kc3=-0.001868658432064;
01244   dp.kc4=-0.000676806079268;
01245   cd.knownparams_vect_.push_back(dp);
01246
01247   dp.zoom=13;
01248   dp.focallength=3788.529115119004928;
01249   dp.kc1=-0.823072669196453;
01250   dp.kc2=27.510513372014003;
01251   dp.kc3=-0.006928032867432;
01252   dp.kc4=0.002134868203333;
01253   cd.knownparams_vect_.push_back(dp);
01254
01255   dp.zoom=11;
01256   dp.focallength=4592.039263971351829;
01257   dp.kc1=-1.121702159939672;
01258   dp.kc2=36.994236469912934;
01259   dp.kc3=-0.014620822228192;
01260   dp.kc4=0.004860766468908;
01261   cd.knownparams_vect_.push_back(dp);
01262
01263   dp.zoom=9;
01264   dp.focallength=5834.063334730769384;
01265   dp.kc1=-1.473018481165970;
01266   dp.kc2=41.598117903225528;
01267   dp.kc3=-0.028692464501407;
01268   dp.kc4=0.007739406251353;
01269   cd.knownparams_vect_.push_back(dp);
01270
01271   dp.zoom=7;
01272   dp.focallength=5877.390940425404551;
01273   dp.kc1=-1.786184809649660;
01274   dp.kc2=109.639598242766894;
01275   dp.kc3=-0.011555140535335;
01276   dp.kc4=-0.002211119391028;
01277   cd.knownparams_vect_.push_back(dp);
01278
01279   // this is a safety-buffer
01280   dp.zoom=1000;
01281   cd.knownparams_vect_.push_back(dp);
01282
01283 }
01284
01285
01286 void ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3(CameraData& cd) {
01287
01288   Initialize(cd);
01289
01290   cd.AngleCorrX_.clear();
01291   cd.AngleCorrY_.clear();
01292   cd.IlluCorrX_.clear();
01293   cd.IlluCorrY_.clear();
01294
01295   cd.CamModel_ = "Fisheye Camera";
01296   cd.CamID_ = 0440;
01297   cd.LensModel_ = "OMNITECH_ORIFL_190_3";
01298   cd.LensIsSpherical_ = true;
01299
01300   cd.width_=640;
01301   cd.height_=480;
01302
01303   cd.principalX_ = 364;
01304   cd.principalY_ = 245;
01305
01306   cd.aspectratio_=1;
01307
01308   cd.knownparams_vect_.clear();
01309
01310   cd.cellSizeX_=1;
01311   cd.cellSizeY_=1;
01312
01313   double x,y;
01314   x=0.000; y=1.000*x;
01315   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01316   x=0.138; y=1.000*x;
01317   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01318   x=0.424; y=0.993*x;
01319   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01320   x=0.757; y=0.974*x;
01321   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01322   x=1.045; y=0.941*x;
01323   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01324   x=1.342; y=0.899*x;
01325   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01326   x=1.436; y=0.881*x;
01327   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01328   x=1.652; y=0.828*x;
01329   cd.AngleCorrX_.push_back(x); cd.AngleCorrY_.push_back(y);
01330
01331   // Vignette correction x=angle, y=darkening factor
01332   x=0.005; y=1.000;
01333   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01334   x=0.092; y=1.000;
01335   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01336   x=0.179; y=1.000;
01337   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01338   x=0.266; y=1.003;
01339   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01340   x=0.354; y=1.003;
01341   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01342   x=0.439; y=1.003;
01343   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01344   x=0.527; y=1.003;
01345   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01346   x=0.615; y=1.005;
01347   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01348   x=0.701; y=1.005;
01349   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01350   x=0.788; y=1.005;
01351   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01352   x=0.875; y=1.005;
01353   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01354   x=0.962; y=1.003;
01355   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01356   x=1.049; y=0.998;
01357   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01358   x=1.135; y=0.993;
01359   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01360   x=1.223; y=0.983;
01361   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01362   x=1.310; y=0.966;
01363   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01364   x=1.398; y=0.941;
01365   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01366   x=1.485; y=0.897;
01367   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01368   x=1.572; y=0.828;
01369   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01370   x=1.660; y=0.716;
01371   cd.IlluCorrX_.push_back(x); cd.IlluCorrY_.push_back(y);
01372
01373   // TODO: Implement Max Angle
01374   //double MaxCamAngle = 1.6581; // 95 deg
01375
01376   cd.radius_ = 226;
01377 }
01378
01379 void ProjectionParametersIO::SetData_DummyRig(std::vector<CameraData>& vcd) {
01380
01381   CameraData cd;
01382   Initialize(cd);
01383   SetData_EVID31_147094(cd);
01384   cd.PoseInRigYaw_=0;
01385   cd.PoseInRigPitch_=0;
01386   cd.PoseInRigRoll_=0;
01387   cd.PoseInRigCenter_.SetZero();
01388   vcd.push_back(cd);
01389
01390   Initialize(cd);
01391   SetData_OMNITECH_ORIFL_190_3(cd);
01392   cd.PoseInRigYaw_=.1;
01393   cd.PoseInRigPitch_=.2;
01394   cd.PoseInRigRoll_=-.15;
01395   cd.PoseInRigCenter_[0]=123.45;
01396   cd.PoseInRigCenter_[1]=321.54;
01397   cd.PoseInRigCenter_[2]=666.67;
01398   vcd.push_back(cd);
01399
01400 }
01401
01402 std::ostream& operator<<(std::ostream& os,
01403                          std::vector<BIAS::CameraData>& vcd) {
01404
01405   os << "vector<CameraData>: " << endl;
01406   for (unsigned int i=0; i<vcd.size(); i++) {
01407     os << " ----------- Camera " << i << "-----------" << endl;
01408     os << vcd[i];
01409     os << endl;
01410   }
01411
01412   return os;
01413 }
01414 std::ostream& operator<<(std::ostream& os,
01415                          std::vector<BIAS::SensorData>& vsd) {
01416
01417   os << "vector<SensorData>: " << endl;
01418   for (unsigned int i=0; i<vsd.size(); i++) {
01419     os << " ----------- Sensor " << i << "-----------" << endl;
01420     os << vsd[i];
01421     os << endl;
01422   }
01423
01424   return os;
01425 }
01426
01427 std::ostream& operator<<(std::ostream& os,
01428                          BIAS::CameraData& cd) {
01429
01430   os << "CamModel_ = " << cd.CamModel_ << endl;
01431   os << "CamID_ = " << cd.CamID_ << endl;
01432   os << "LensModel_ = " << cd.LensModel_ << endl;
01433   os << "LensIsSpherical_ = " << cd.LensIsSpherical_ << endl;
01434   os << "zoomCamera_ = " << cd.zoomCamera_ << endl;
01435   os << "width_ = " << cd.width_ << endl;
01436   os << "height_ = " << cd.height_ << endl;
01437   for (int i=0; i<(int)cd.knownparams_vect_.size();i++) {
01438     os << "knownparams_vect_[" << i << "] = " << endl;
01439     CPDiscreteParam dp;
01440     dp=cd.knownparams_vect_[i];
01441     os << "  zoom = " << dp.zoom << endl;
01442     os << "  focallength = " << dp.focallength << endl;
01443     os << "  kc1 = " << dp.kc1 << endl;
01444     os << "  kc2 = " << dp.kc2 << endl;
01445     os << "  kc3 = " << dp.kc3 << endl;
01446     os << "  kc4 = " << dp.kc4 << endl;
01447   };
01448   for (int i=0; i<(int) cd.AngleCorrX_.size();i++) {
01449     os << "AngleCorrX_[" << i << "] = "
01450        << cd.AngleCorrX_[i] << endl;
01451   }
01452   for (int i=0; i<(int) cd.AngleCorrY_.size();i++) {
01453     os << "AngleCorrY_[" << i << "] = "
01454        << cd.AngleCorrY_[i] << endl;
01455   }
01456   for (int i=0; i<(int) cd.IlluCorrX_.size();i++) {
01457     os << "IlluCorrX_[" << i << "] = "
01458        << cd.IlluCorrX_[i] << endl;
01459   }
01460   for (int i=0; i<(int) cd.IlluCorrY_.size();i++) {
01461     os << "IlluCorrY_[" << i << "] = "
01462        << cd.IlluCorrY_[i] << endl;
01463   }
01464
01465   os << "aspectratio_ = " << cd.aspectratio_ << endl;
01466   os << "cellSizeX_ = " << cd.cellSizeX_ << endl;
01467   os << "cellSizeY_ = " << cd.cellSizeY_ << endl;
01468   os << "principalX_ = " << cd.principalX_ << endl;
01469   os << "principalY_ = " << cd.principalY_ << endl;
01470   os << "focallengthDef_ = " << cd.focallengthDef_ << endl;
01471   os << "kc1Def_ = " << cd.kc1Def_ << endl;
01472   os << "kc2Def_ = " << cd.kc2Def_ << endl;
01473   os << "kc3Def_ = " << cd.kc3Def_ << endl;
01474   os << "kc4Def_ = " << cd.kc4Def_ << endl;
01475   os << "PoseInRigCenter_ = " << cd.PoseInRigCenter_ << endl;
01476   os << "PoseInRigYaw_ = " << cd.PoseInRigYaw_ << endl;
01477   os << "PoseInRigPitch_ = " << cd.PoseInRigPitch_ << endl;
01478   os << "PoseInRigRoll_ = " << cd.PoseInRigRoll_ << endl;
01479
01480   return os;
01481 }
01482 std::ostream& operator<<(std::ostream& os,
01483                          BIAS::SensorData& sd) {
01484
01485   os << "PoseInRigCenter_ = " << sd.PoseInRigCenter_ << endl;
01486   os << "PoseInRigYaw_ = " << sd.PoseInRigYaw_ << endl;
01487   os << "PoseInRigPitch_ = " << sd.PoseInRigPitch_ << endl;
01488   os << "PoseInRigRoll_ = " << sd.PoseInRigRoll_ << endl;
01489
01490   return os;
01491 }
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersIO.hh Source File

Geometry

ProjectionParametersIO.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersIO_hh__
00027 #define __BIAS_ProjectionParametersIO_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <Base/Math/Vector3.hh>
00032 #include <Base/Geometry/HomgPoint2D.hh>
00033
00034 #include <Base/Debug/Debug.hh>
00035 #ifdef BIAS_HAVE_XML2
00036 #  include <Base/Common/XMLBase.hh>
00037 #endif
00038
00039 #include <Base/Geometry/KMatrix.hh>
00040
00041 #define CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0
00042 #define RIG_PARAMETER_CURRENT_XML_VERSION 1.0
00043
00044 namespace BIAS {
00045
00046 #ifndef __BIAS_CPDiscreteParam__
00047 #define __BIAS_CPDiscreteParam__
00048
00049   struct BIASGeometry_EXPORT CPDiscreteParam {
00050     double zoom;
00051     double focallength;
00052     // radial/tangential distortion parameters.
00053     // 4th order model of brown.
00054     double kc1,kc2,kc3,kc4;
00055   };
00056 #endif
00057
00058   struct BIASGeometry_EXPORT SensorData {
00059
00060    // center and rotation relative to a common rig pose
00061     BIAS::Vector3<double> PoseInRigCenter_;
00062     double PoseInRigYaw_;
00063     double PoseInRigPitch_;
00064     double PoseInRigRoll_;
00065
00066   };
00067
00068   struct BIASGeometry_EXPORT CameraData {
00069
00070     // Which camera if used?
00071     std::string CamModel_;
00072     int CamID_;
00073     std::string LensModel_;
00074
00075     // do we have zoom or fixed optics?
00076     bool zoomCamera_;
00077
00078     // Lens can be Spherical or Perspective
00079     bool LensIsSpherical_;
00080
00081     // width and height of the camera image
00082     unsigned int width_, height_;
00083
00084     // filled by inheriting camera model
00085     double aspectratio_;
00086
00087     // size of the single CCD-sensor-cells in meter
00088     double cellSizeX_, cellSizeY_;
00089
00090     // Principal Point Pixel Coordinates (one for all zoom settings)
00091     double principalX_, principalY_;
00092
00093     // image radius if image is spherical
00094     double radius_;
00095
00096     // Maximum image angle of the fisheye camera
00097     double MaxCamAngle_;
00098
00099     // only for perspective lenses
00100     // standard settings for non zoom lenses or
00101     // for zoom default state
00102     // focal length is stored in pixel for cellSizeX
00103     double focallengthDef_;
00104     double kc1Def_,kc2Def_,kc3Def_,kc4Def_;
00105
00106     // array of camera calibration constants for zoom cameras
00107     std::vector<CPDiscreteParam> knownparams_vect_;
00108
00109     // illumination vignette correction
00110     // x is distance in pixel from principal point
00111     // y is illumination correction factor
00112     std::vector<double> IlluCorrX_;
00113     std::vector<double> IlluCorrY_;
00114
00115     // Only for sphere images:
00116     // Calibration measurements for angle correction
00117     std::vector<double> AngleCorrX_;
00118     std::vector<double> AngleCorrY_;
00119
00120     // center and rotation relative to a common rig pose
00121     BIAS::Vector3<double> PoseInRigCenter_;
00122     double PoseInRigYaw_;
00123     double PoseInRigPitch_;
00124     double PoseInRigRoll_;
00125
00126   };
00127
00128   class BIASGeometry_EXPORT ProjectionParametersIO{
00129
00130   public:
00131
00132     /** @brief read jpeg EXIF header and set camera parameter
00133         @return 0 on success
00134         @author koeser 07/2005 */
00135     static int ReadFromEXIF(const std::string& filename,
00136                             CameraData& cd);
00137
00138     /** @brief pass K and image dims to construct a simple parameter file */
00139     static int SetFromKMatrix(const BIAS::KMatrix& K,
00140                               const int w, const int h,
00141                               CameraData& cd);
00142
00143 #ifdef BIAS_HAVE_XML2
00144
00145     /** @brief Write all data camera data and camera positions in the rig
00146         to a rig parameter file in XML-notation
00147         @param Filename Name of the XML-rig-data-file,
00148         document tag will be to be "Rig"
00149         @author streckel 06/2004 */
00150     static int WriteRigData(const std::string &filename,
00151                             const std::vector<CameraData>& vcd,
00152                             const std::vector<SensorData>& vsd=
00153                             std::vector<SensorData>(0,SensorData()));
00154
00155     /** @brief Write all data to a camera data parameter file )
00156         @param Filename Name of the XML-camera-data-file,
00157         document tag will be to be "Camera"
00158         @author streckel 06/2004 */
00159     static int WriteCameraData(const std::string& Filename,
00160                                const CameraData& cd);
00161
00162     /** @brief Read a rig parameter file and store the data in (*this)
00163         the Camera-, Center-, RMatrix-, and KMatrix-Vectors are
00164         reset from the file.
00165         @param Filename Name of the XML-camera-data-file,
00166         document tag has to be "Rig"
00167         @author streckel 06/2004 */
00168     static int ReadRigData(const std::string &filename,
00169                            std::vector<CameraData>& vcd);
00170     static int ReadRigData(const std::string &filename,
00171                            std::vector<CameraData>& vcd,
00172                            std::vector<SensorData>& vsd);
00173
00174     /** @brief Read a camera data parameter file and store the data in (*this)
00175         @param Filename Name of the XML-camera-data-file,
00176         document tag has to be "Camera"
00177         @author streckel 06/2004 */
00178     static int ReadCameraData(const std::string& Filename,
00179                               CameraData& cd);
00180
00181
00182 #endif //BIAS_HAVE_XML2
00183
00184     // Settings for specific cameras (only for testing)
00185     static void SetData_EVID31_147094(CameraData& cd);
00186     static void SetData_OMNITECH_ORIFL_190_3(CameraData& cd);
00187     static void SetData_DummyRig(std::vector<CameraData>& vcd);
00188
00189 protected:
00190
00191   #ifdef BIAS_HAVE_XML2
00192
00193     /** @brief Read a camera data form a precreated XML-tree and store
00194         the data in (*this)  - called from the rig parameter class.
00195         @param myXML points to the XML-Tree
00196         @param cameraNode points to a "Camera"-node to evaluate
00197         @author streckel 06/2004 */
00198     static int ReadCameraData(XMLIO &myXML, xmlNodePtr &cameraNode,
00199                               CameraData& cd);
00200
00201     /** @brief Add a camera sub-tree-structure to an allready created
00202         XML-tree and write the data from (*this) into the tree -
00203         called from the rig parameter class.
00204         @param myXML points to the XML-Tree
00205         @param cameraDataNode points to a "CameraData"-node to append the
00206         "Camera"-node
00207         @author streckel 06/2004 */
00208     static int AddCameraDataToRig(XMLIO &myXML, xmlNodePtr &cameraDataNode,
00209                                  const CameraData &cd);
00210
00211     // called by WriteCameraData and AddCameraDataToRig to add
00212     //the data of a certain camera to a node
00213     static int AddCameraDataToNode(XMLIO &myXML,  xmlNodePtr &rootNode,
00214                                   const CameraData &cd);
00215 #endif // BIAS_HAVE_XML2
00216
00217     /** @brief default zero initialization for a single camera */
00218     static void Initialize(CameraData &cd);
00219
00220     /** @brief default zero initialization for a single sensor */
00221     static void InitializeSensor(SensorData &sd);
00222
00223     /** @brief Reading old file versions */
00224     static int ReadRigDataV0_8(const std::string &filename,
00225                                std::vector<CameraData>& vcd);
00226 #ifdef BIAS_HAVE_XML2
00227
00228     static int ReadCameraDataV1_0(XMLIO &myXML, xmlNodePtr &cameraNode,
00229                                   CameraData& cd);
00230     static int ReadCameraDataV0_8(XMLIO &myXML, xmlNodePtr &cameraNode,
00231                                   CameraData& cd);
00232 #endif // BIAS_HAVE_XML2
00233
00234
00235   };
00236
00237 } // end namespace
00238
00239   /** @relates ProjectionParametersIO
00240       @brief standard ostream operator for dumping ProjectionParametersIO
00241       to screen */
00242 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, std::vector<BIAS::CameraData>& vcd);
00243 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, std::vector<BIAS::SensorData>& vsd);
00244 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, BIAS::CameraData& cd);
00245 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, BIAS::SensorData& sd);
00246
00247 #include <Base/Common/BIASpragmaEnd.hh>
00248
00249 #endif
00250
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersPerspective.cpp Source File

Geometry

ProjectionParametersPerspective.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Geometry/ProjectionParametersPerspective.hh"
00027
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 bool ProjectionParametersPerspective::
00033 DoesPointProjectIntoImageLocal(const Vector3<double>& localX,
00034                                HomgPoint2D& x,
00035                                bool IgnoreDistortion) const
00036 {
00037   if(localX[2] > 0.0) {
00038     x = ProjectLocal(localX, IgnoreDistortion);
00039     x.Homogenize(); //neccessary ?
00040     return (x[0]>=0.0 && x[1]>=0.0 &&
00041             x[0]<=(double)(width_-1) && x[1]<=(double)(height_-1) );
00042   }
00043   return false;
00044 }
00045
00046
00047 HomgPoint2D ProjectionParametersPerspective::
00048 ProjectLocal(const Vector3<double>& point, bool IgnoreDistortion) const {
00049   // in-plane affine coordinate transformation with KMatrix
00050   HomgPoint2D pos;
00051   K_.Mult(point, pos);
00052   // radial distortion here
00053   if (!IgnoreDistortion) Distort(pos);
00054   return pos.Homogenize();
00055 }
00056
00057 Vector3<double>  ProjectionParametersPerspective::
00058 UnProjectLocal(const HomgPoint2D& cPos, bool IgnoreDistortion) const {
00059   HomgPoint2D mpos(cPos); // de-const pos
00060   // radial undistortion here
00061   if (!IgnoreDistortion) Undistort(mpos);
00062   // in-plane affine coordinate transformation with KMatrix
00063   Vector3<double> point;
00064   invK_.Mult(mpos, point);
00065   return point.Normalize();
00066 }
00067
00068 /*
00069 Matrix3x3<double> ProjectionParametersPerspective::
00070 UnProjectLocal(const HomgPoint2D& pos, const Matrix3x3<double>& cov2D,
00071                bool IgnoreDistortion)
00072 {
00073
00074
00075   Matrix3x3<double> cov_unp(cov2D);
00076   if (!IgnoreDistortion) Undistort(pos, cov_unp);// not implemented !!
00077
00078   // covariance matrices transform by multiplying with the jacobian and
00079   // its transposed
00080   return invK_ * cov_unp * invK_.Transpose();
00081
00082 }
00083
00084 void ProjectionParametersPerspective::
00085 Undistort(const HomgPoint2D& point2d, Matrix3x3<double>& cov) const
00086 {
00087   // unfinished, unclear if it is really necessary
00088   static int alreadywarned = 0;
00089   if (alreadywarned ==0) {
00090     BIASERR("not implemented");
00091     alreadywarned=1;
00092   }
00093 }
00094
00095 */
00096
00097 void ProjectionParametersPerspective::Distort(HomgPoint2D& point2d) const {
00098
00099   // do nothing in case of ideal lense
00100   if (kc1_==0 && kc2_==0 && kc3_==0 && kc4_==0) return;
00101
00102   // copy of distorted point
00103   double distx,disty;
00104   double x,y;
00105   double twoxy;
00106
00107   double rsquared;
00108   double raddist;
00109   double tandistx, tandisty;
00110
00111   point2d.Homogenize();
00112
00113   // Points must be Bougouet-normalized
00114   // (subtract principal point, then divide by focal length)
00115   x = (point2d[0]-principalX_)/focallength_;
00116   y = (point2d[1]-principalY_)/(GetAspectratio()*focallength_);
00117
00118   twoxy = 2 * x*y;
00119   rsquared = x*x + y*y;
00120
00121   // radial distortion:
00122   raddist = 1 + kc1_*rsquared + kc2_*rsquared*rsquared;
00123   // tangential distortion:
00124   tandistx = kc3_*twoxy + kc4_ * (rsquared + 2*x*x);
00125   tandisty = kc4_*twoxy + kc3_ * (rsquared + 2*y*y);
00126
00127   // apply distortion:
00128   distx = raddist * x + tandistx;
00129   disty = raddist * y + tandisty;
00130
00131   // invert Bougouet-normalization
00132   point2d[0] = distx*focallength_ + principalX_;
00133   point2d[1] = disty*GetAspectratio()*focallength_ + principalY_;
00134 }
00135
00136
00137 void ProjectionParametersPerspective::Undistort(HomgPoint2D& point2d) const {
00138
00139   // do nothing in case of ideal lense
00140   if (kc1_==0 && kc2_==0 && kc3_==0 && kc4_==0) return;
00141
00142 // copy of distorted point
00143   double distx,disty;
00144   double x,y;
00145   double twoxy;
00146
00147   double rsquared;
00148   double raddist;
00149   double tandistx, tandisty;
00150
00151   point2d.Homogenize();
00152
00153   // Points must be Bougouet-normalized
00154   // (subtract principal point, then divide by focal length)
00155   x = point2d[0] = (point2d[0]-principalX_)/focallength_;
00156   y = point2d[1] = (point2d[1]-principalY_)/(GetAspectratio()*focallength_);
00157
00158   // 5 iterations are enough
00159   for (unsigned int i=0;i<5;i++){
00160
00161     twoxy = 2 * x*y;
00162     rsquared = x*x + y*y;
00163
00164     // radial distortion:
00165     raddist = 1 + kc1_*rsquared + kc2_*rsquared*rsquared;
00166     // tangential distortion:
00167     tandistx = kc3_*twoxy + kc4_ * (rsquared + 2*x*x);
00168     tandisty = kc4_*twoxy + kc3_ * (rsquared + 2*y*y);
00169
00170     // apply distortion:
00171     distx = raddist * x + tandistx;
00172     disty = raddist * y + tandisty;
00173
00174     // subtract distortion from distorted coordinates
00175     x = point2d[0] - (distx-x);
00176     y = point2d[1] - (disty-y);
00177
00178   }
00179
00180   // invert Bougouet-normalization
00181   point2d[0] = x*focallength_ + principalX_;
00182   point2d[1] = y*GetAspectratio()*focallength_ + principalY_;
00183 }
00184
00185 #ifdef BIAS_HAVE_XML2
00186
00187 int ProjectionParametersPerspective::XMLGetClassName(std::string& TopLevelTag,
00188                                                      double& Version) const {
00189   TopLevelTag = "ProjectionParametersPerspective";
00190   Version = 0.1;
00191   return 0;
00192 }
00193
00194 int ProjectionParametersPerspective::XMLOut(const xmlNodePtr Node,
00195                                             XMLIO& XMLObject) const {
00196   xmlNodePtr theNode;
00197   string TopLevelName;
00198   double Version;
00199   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00200   theNode = XMLObject.addChildNode(Node, TopLevelName);
00201   XMLObject.addAttribute(theNode, "Version", Version);
00202   ProjectionParametersBase::XMLOut(theNode, XMLObject);
00203
00204   xmlNodePtr childNode;
00205   XMLObject.addAttribute(Node,"Focallength", focallength_);
00206   childNode = XMLObject.addChildNode(Node,"Distortion");
00207   XMLObject.addAttribute(childNode, "k1", kc1_);
00208   XMLObject.addAttribute(childNode, "k2", kc2_);
00209   XMLObject.addAttribute(childNode, "p1", kc3_);
00210   XMLObject.addAttribute(childNode, "p2", kc4_);
00211   return 0;
00212  }
00213
00214
00215 int ProjectionParametersPerspective::XMLIn(const xmlNodePtr Node,
00216                                            XMLIO& XMLObject) {
00217
00218   string TopLevelName;
00219   double Version;
00220   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00221
00222   xmlNodePtr childNode;
00223   if ((childNode = XMLObject.getChild(Node, TopLevelName))==NULL) {
00224     BIASERR("Error in xml, no tag" << TopLevelName);
00225     return -1;
00226   }
00227   if (ProjectionParametersBase::XMLIn(childNode, XMLObject)!=0) return -1;
00228
00229   focallength_  = XMLObject.getAttributeValueDouble(Node, "Focallength");
00230   if ((childNode = XMLObject.getChild(Node, "Distortion"))!=NULL) {
00231     kc1_ = XMLObject.getAttributeValueDouble(childNode, "k1");
00232     kc2_ = XMLObject.getAttributeValueDouble(childNode, "k2");
00233     kc3_ = XMLObject.getAttributeValueDouble(childNode, "p1");
00234     kc4_ = XMLObject.getAttributeValueDouble(childNode, "p2");
00235   }
00236   ComputeK_();
00237   return 0;
00238 }
00239
00240 #endif // BIAS_HAVE_XML2
00241
00242
00243 void ProjectionParametersPerspective::ComputeK_() {
00244   K_.SetIdentity();
00245   K_[0][0] = focallength_;
00246   K_[1][1] = aspectratio_ * focallength_;
00247   K_[0][1] = 0; //skew_;
00248   K_[0][2] = principalX_;
00249   K_[1][2] = principalY_;
00250   invK_ = K_.Invert();
00251
00252 }
00253
00254 double ProjectionParametersPerspective::
00255 ViewDifference(const ProjectionParametersBase* pPPB) const {
00256   const ProjectionParametersPerspective *pPPP =
00257      dynamic_cast<const ProjectionParametersPerspective* >(pPPB);
00258   // different projection model has a very different view
00259   if (pPPP==NULL) {
00260     BIASERR("View difference for different projection models requested !");
00261     return DBL_MAX;
00262   }
00263
00264   Vector3<double> C0 = pPPP->GetC(), A0, A;
00265
00266   RMatrix R = GetR(), R0 = pPPP->GetR();
00267
00268   A[0] = R[0][2]; A[1] = R[1][2]; A[2] = R[2][2];
00269   A.Normalize();
00270
00271   A0[0] = R0[0][2]; A0[1] = R0[1][2]; A0[2] = R0[2][2];
00272   A0.Normalize();
00273
00274   // compute field of view, assuming const K !
00275   KMatrix K0 =  GetK();
00276   double f = 0.5*(K0[0][0] + K0[1][1]);
00277   double halfw = double(width_ + height_) / 4.0;
00278   double coshalffieldofview = cos(atan(halfw/f));
00279
00280
00281   double newness = (GetC()-C0).NormL2();
00282   newness += 1.0/(1.0-coshalffieldofview)*(1.0-fabs(A.ScalarProduct(A0)));
00283   return newness;
00284 }
00285
00286
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersPerspective.hh Source File

Geometry

ProjectionParametersPerspective.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersPerspective_hh__
00027 #define __BIAS_ProjectionParametersPerspective_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <Geometry/ProjectionParametersBase.hh>
00032 #include <Base/Geometry/KMatrix.hh>
00033 #include <Geometry/PMatrix.hh>
00034
00035 #define LUT_RES 10
00036 namespace BIAS {
00037
00038  /** @class ProjectionParametersPerspective
00039      @brief camera parameters which define the mapping between rays in the
00040      camera coordinate system and pixels in the image as well as external pose
00041      @author koeser/evers/streckel
00042  */
00043   class BIASGeometry_EXPORT ProjectionParametersPerspective
00044     : public  ProjectionParametersBase {
00045   public:
00046
00047     ProjectionParametersPerspective()
00048       : ProjectionParametersBase()
00049     {
00050       K_.SetIdentity();
00051       invK_.SetIdentity();
00052       focallength_=1.0;
00053       kc1_=0;
00054       kc2_=0;
00055       kc3_=0;
00056       kc4_=0;
00057     };
00058
00059     ProjectionParametersPerspective(const ProjectionParametersPerspective & P){
00060       *this = P;
00061     };
00062
00063     ProjectionParametersPerspective&
00064     operator=(const ProjectionParametersPerspective & P){
00065       ProjectionParametersBase::operator=(P);
00066       K_ = P.K_;
00067       invK_ = P.invK_;
00068       focallength_= P.focallength_;
00069       kc1_= P.kc1_;
00070       kc2_= P.kc2_;
00071       kc3_= P.kc3_;
00072       kc4_= P.kc4_;
00073       return *this;
00074     };
00075
00076     virtual ~ProjectionParametersPerspective(){};
00077
00078     bool DoesPointProjectIntoImageLocal(const Vector3<double>& localX,
00079                                         HomgPoint2D& x,
00080                                         bool IgnoreDistortion = false) const;
00081
00082
00083     /** @brief calculates the projection of a point
00084         in the camera coordinate system
00085         to a pixel in the image plane of the camera
00086         with lens distortion
00087         In the simplest case perspective pinhole projection x = K * y
00088         where y is the projection of X using  y = (R^T | -R^T C) X
00089     */
00090     virtual HomgPoint2D ProjectLocal(const Vector3<double>& point,
00091                                      bool IgnoreDistortion = false) const;
00092
00093     /** @brief calculates the viewing ray from the camera center (in the
00094         camera coordinate system) which belongs to the image position pos
00095         with lens distortion
00096         e.g. (0,0,1) means optical axis
00097     */
00098     virtual Vector3<double> UnProjectLocal(const HomgPoint2D& pos,
00099                                            bool IgnoreDistortion = false)const;
00100
00101     /** @brief Using the Matlab camera calibration toolbox parameters
00102         for an undistortion of distorted coordinates.
00103         TODO: faster implementation via Lookup-table
00104         @author streckel 06/2004 */
00105     void Undistort(BIAS::HomgPoint2D& point2d) const;
00106
00107     /** @brief Using the Matlab camera calibration toolbox parameters
00108         for a distortion of undistorted coordinates. Inverse to the
00109         undistort function.
00110         TODO: faster implementation via Lookup-table
00111         @author streckel 06/2004 */
00112     void Distort(BIAS::HomgPoint2D& point2d) const;
00113
00114     /** @brief covariant virtual copy constructor for use in Projection */
00115     virtual ProjectionParametersPerspective* Clone() const {
00116       return new ProjectionParametersPerspective(*this);
00117     }
00118
00119     /** @brief Get the current camera focal length.
00120         @author buck */
00121     inline int GetFocalLength(double& f) const {
00122       f = focallength_;
00123       return 0;
00124     }
00125
00126     inline void GetUndistortion(double& kc1, double& kc2,
00127                                 double& kc3, double& kc4) const
00128     {
00129       kc1 = kc1_;
00130       kc2 = kc2_;
00131       kc3 = kc3_;
00132       kc4 = kc4_;
00133     }
00134
00135     /** @brief Set the current camera focal length in pixel and the a
00136         spect ratio */
00137     inline void SetFocalLengthAndAspect(double f,
00138                                         double AspectRatio) {
00139       focallength_ = f;
00140       ProjectionParametersBase::SetAspectratio(AspectRatio);
00141       ComputeK_();
00142     }
00143
00144     /** @brief Set principal point in pixels relative to top left corner,
00145         virtual overload to recalculate K_
00146         @author streckel */
00147     virtual inline void SetPrincipal(const double x, const double y) {
00148       ProjectionParametersBase::SetPrincipal(x, y);
00149       ComputeK_();
00150     }
00151
00152     /** @brief Set CCD cell-size in meter, virtual overload to
00153         recalculate K_.
00154         @author streckel */
00155     virtual inline void SetAspectratio(const double AspectRatio) {
00156       ProjectionParametersBase::SetAspectratio(AspectRatio);
00157       ComputeK_();
00158     }
00159
00160    /** @brief Set the lens undistortion parameters*/
00161     inline void SetUndistortion(double kc1, double kc2,
00162                                 double kc3, double kc4)
00163     {
00164       kc1_ = kc1;
00165       kc2_ = kc2;
00166       kc3_ = kc3;
00167       kc4_ = kc4;
00168     }
00169
00170     /* @brief get the PMatrix composed from the projection object
00171      */
00172     inline virtual BIAS::PMatrix GetP() const {
00173       return PMatrix(K_, GetR(), GetC());
00174     }
00175
00176     /* @brief get cached KMatrix
00177      */
00178     inline virtual BIAS::KMatrix GetK() const {
00179       return K_;
00180     };
00181
00182     /* @brief get cached inverted KMatrix
00183      */
00184     inline virtual BIAS::KMatrix GetKinv() const {
00185       return invK_;
00186     };
00187
00188     /** @brief sets the internal parameters from a given KMatrix
00189         and updates the cached K and its inverse */
00190     virtual void SetK(const KMatrix& K) {
00191       BIASASSERT(K[0][0]!=0);
00192       focallength_  = K[0][0];
00193       ProjectionParametersBase::SetPrincipal(K[0][2],K[1][2]);
00194       double aspectratio = K[1][1]/K[0][0];
00195       ProjectionParametersBase::SetAspectratio(aspectratio);
00196       K_ = K; invK_ = K.Invert();
00197     };
00198
00199     /** @brief set from P  */
00200     virtual void SetP(const PMatrix& P) {
00201       PMatrix p(P); // de-const
00202       SetK(p.GetK());
00203       SetC(p.GetC());
00204       SetR(p.GetR());
00205       ComputeK_();
00206     };
00207
00208
00209     /** @brief adapt internal params to resampled image
00210         @param ratio 2.0 = downsample, 0.5 = upsample
00211     */
00212     virtual inline void Rescale(float ratio) {
00213       ProjectionParametersBase::Rescale(ratio);
00214       focallength_ /= ratio;
00215       ComputeK_();
00216       // dont have to update radial/tangential distortion coefficients
00217       // because we measure in normalize space
00218     }
00219
00220     virtual double ViewDifference(const ProjectionParametersBase* pPPB) const;
00221
00222 #ifdef BIAS_HAVE_XML2
00223     /** @brief specialization of XML block name function */
00224     virtual int XMLGetClassName(std::string& TopLevelTag,
00225                                 double& Version) const;
00226
00227     /** @brief specialization of XML write function */
00228     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00229
00230     /** @brief specialization of XML read function */
00231     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00232 #endif
00233
00234     friend std::ostream& operator<<(std::ostream &os,
00235                                     ProjectionParametersPerspective& p);
00236
00237
00238
00239   protected:
00240     /** @brief computes the cached KMatrix and its inverse
00241         call after every parameter change */
00242     void ComputeK_();
00243
00244     // focal length, aspect ratio, principal point in K_, inverse in invK_
00245     KMatrix K_, invK_;
00246
00247     // focal length is stored in pixel for cellSizeX
00248     double focallength_;
00249     // lens undistortion parameters after Bouquet
00250     double kc1_,kc2_,kc3_,kc4_;
00251
00252   };
00253
00254   inline std::ostream& operator<<(std::ostream &os,
00255                                   ProjectionParametersPerspective& p)
00256   {
00257     os <<"R:"<<p.GetR()<<"C:"<<p.GetC()<<std::endl;
00258     os<<"ImageSize: "<<p.width_<<" x "<<p.height_<<std::endl;
00259     os<<"Principal: "<<p.principalX_<<" x "<<p.principalY_<<std::endl;
00260     //operator<<(os, (ProjectionParametersBase&)p);
00261     std::cout <<"K:"<<p.GetK()<<std::endl;
00262     return os;
00263   }
00264
00265
00266
00267 } // end namespace
00268
00269
00270 #include <Base/Common/BIASpragmaEnd.hh>
00271
00272 #endif
00273
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersProjective.cpp Source File

Geometry

ProjectionParametersProjective.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Geometry/ProjectionParametersProjective.hh"
00027
00028
00029 using namespace std;
00030 using namespace BIAS;
00031
00032 Matrix3x3<double> ProjectionParametersProjective::
00033 UnProjectLocal(const HomgPoint2D& /*pos*/, const Matrix3x3<double>& /*cov*/,
00034                bool /* IgnoreDistortion */) const
00035 {
00036   BIASERR("covariance propagation for projective space not implemented");
00037   return Matrix3x3<double>(MatrixZero);
00038 }
00039
00040 #ifdef BIAS_HAVE_XML2
00041
00042 int ProjectionParametersProjective::XMLGetClassName(std::string& TopLevelTag,
00043                                                     double& Version) const {
00044   TopLevelTag = "ProjectiveP";
00045   Version = 1.0;
00046   return 0;
00047 }
00048
00049 int ProjectionParametersProjective::XMLOut(const xmlNodePtr Node,
00050                                            XMLIO& XMLObject) const {
00051   Matrix3x4<double> MatrixCache = Pose_.GetMatrix3x4();
00052   xmlNodePtr childNode;
00053   childNode = XMLObject.addChildNode(Node,"MatrixRows");
00054   stringstream datastream;
00055   for (unsigned int i=0; i<12; i++) {
00056     datastream << (double) MatrixCache.GetData()[i] <<" ";
00057   }
00058   XMLObject.addContent(childNode, datastream.str());
00059   return 0;
00060 }
00061
00062 int ProjectionParametersProjective::XMLIn(const xmlNodePtr Node,
00063                                           XMLIO& XMLObject) {
00064   Matrix3x4<double> MatrixCache;
00065   xmlNodePtr childNode;
00066   if ((childNode = XMLObject.getChild(Node, "MatrixRows"))==NULL) {
00067     BIASERR("Error in xml structure.");
00068     return -1;
00069   }
00070
00071   // get data fields
00072   stringstream ssData(XMLObject.getNodeContentString(childNode));
00073   unsigned int CurrentData=0;
00074   double buffer;
00075   while (ssData.good() && CurrentData<12) {
00076     ssData >> buffer;
00077     MatrixCache.GetData()[CurrentData++] = buffer;
00078   }
00079   Pose_.SetFromMatrix3x4(MatrixCache);
00080   if (CurrentData<12) {
00081     // reached end of stream before expected end of data
00082     BIASERR("Error parsing XML code ...");
00083     return -1;
00084   }
00085
00086   return 0;
00087 }
00088
00089 #endif
00090
00091
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersProjective.hh Source File

Geometry

ProjectionParametersProjective.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersProjective_hh__
00027 #define __BIAS_ProjectionParametersProjective_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <Geometry/ProjectionParametersBase.hh>
00032 #include <Geometry/CoordinateTransform3D.hh>
00033 #include <Geometry/PMatrix.hh>
00034
00035 namespace BIAS {
00036
00037  /** @class ProjectionParametersProjective
00038      @brief 12 parametric p for completely projective reconstruction
00039      scenarios, unknown focal lengths, self calibration, ...
00040
00041      The handling of the "pose" in this class is special because we cannot
00042      decompose P to get the center and the rotation. We pretend that it
00043      has R=id and C=0 and encode the external parameters also within
00044      the projection matrix. There may be some cases of infinite points, camera
00045      center at infinity and so on,  which are not covered here, however this
00046      interface is a compromise with respect to the performance of the "normal"
00047      calibrated camera case's interface.
00048      @author koeser 01/2006
00049  */
00050   class BIASGeometry_EXPORT ProjectionParametersProjective:
00051     public  ProjectionParametersBase {
00052   public:
00053
00054     ProjectionParametersProjective()
00055       : ProjectionParametersBase() {};
00056     ProjectionParametersProjective(const ProjectionParametersProjective & P){
00057       *this = P;
00058     };
00059
00060     ProjectionParametersProjective &
00061     operator=(const ProjectionParametersProjective & P){
00062       BIASERR("still not implemented");
00063       BIASABORT;
00064       return *this;
00065     };
00066
00067     virtual ~ProjectionParametersProjective(){};
00068
00069     /** @brief calculates the projection of a point
00070         in the camera coordinate system
00071         to a pixel in the image plane of the camera
00072
00073         In the simplest case perspective pinhole projection x = K * y
00074         where y is the projection of X using  y = (R^T | -R^T C) X
00075     */
00076     virtual HomgPoint2D  ProjectLocal(const Vector3<double>& point,
00077                                       bool IgnoreDistortion = false) const {
00078       HomgPoint3D X_G(point);
00079       HomgPoint3D X_L = Pose_.GlobalToLocal(X_G);
00080       X_L.Homogenize();
00081       HomgPoint2D x_l(X_L[0], X_L[1], X_L[2]);
00082       return x_l;
00083     }
00084
00085     /** @brief calculates the viewing ray from the camera center (in the
00086         camera coordinate system) which belongs to the image position pos
00087         e.g. (0,0,1) means optical axis
00088     */
00089     virtual Vector3<double> UnProjectLocal(const HomgPoint2D& pos,
00090                                            bool IgnoreDistortion = false) const
00091     {
00092       HomgPoint3D X_L((Vector3<double>) pos);
00093       HomgPoint3D X_G = Pose_.LocalToGlobal(X_L);
00094       X_G.Homogenize();
00095       Vector3<double> x_g(X_G[0], X_G[1], X_G[2]);
00096       return x_g;
00097     }
00098
00099     virtual Matrix3x3<double>
00100     UnProjectLocal(const HomgPoint2D& pos,
00101                    const Matrix3x3<double>& cov,
00102                    bool IgnoreDistortion = false) const;
00103
00104     /** @brief get projection center */
00105     virtual Vector3<double> GetC() const { return Vector3<double>(0,0,0); };
00106
00107     /** @brief return R (R^T which is in front part of PMatrix ) */
00108     virtual RMatrix GetR() const { return RMatrix(MatrixIdentity); };
00109
00110
00111     /** @brief covariant virtual copy constructor for use in Projection */
00112     virtual ProjectionParametersProjective* Clone() const {
00113       return new ProjectionParametersProjective(*this);
00114     };
00115
00116     /** @brief adapt internal params to resampled image
00117         @param ratio 2.0 = downsample, 0.5 = upsample
00118     */
00119     virtual inline void Rescale(float ratio) {
00120       BIASERR("unimplemented");
00121       BIASABORT;
00122     }
00123
00124 #ifdef BIAS_HAVE_XML2
00125     /** @brief specialization of XML block name function */
00126     virtual int XMLGetClassName(std::string& TopLevelTag,
00127                                 double& Version) const;
00128
00129     /** @brief specialization of XML write function */
00130     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00131
00132     /** @brief specialization of XML read function */
00133     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00134 #endif
00135     /** @brief set 12 entries if projective P using a PMatrix */
00136     void SetP(const Matrix3x4<double>& P) { Pose_.SetFromMatrix3x4(P);}
00137
00138     void SetR(const RMatrix& R) {BIASERR("dont call this for projective !");}
00139     void SetC(const Vector3<double>& C) {
00140       BIASERR("dont call this for projective !");}
00141
00142     /** @brief return the complete pmatrix (internals+externals / projective)
00143         used for projection */
00144     inline virtual PMatrix GetP() const {
00145       return PMatrix(Pose_.GetMatrix3x4());
00146     }
00147   };
00148
00149
00150
00151 } // end namespace
00152
00153
00154 #include <Base/Common/BIASpragmaEnd.hh>
00155
00156 #endif
00157
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersSpherical.cpp Source File

Geometry

ProjectionParametersSpherical.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Geometry/ProjectionParametersSpherical.hh"
00027
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 bool ProjectionParametersSpherical::
00033 DoesPointProjectIntoImageLocal(const Vector3<double>& localX,
00034                                HomgPoint2D& x,
00035                                bool IgnoreDistortion) const
00036 {
00037   x = ProjectLocal(localX, IgnoreDistortion);
00038   double radius =
00039     sqrt( (x[0]-principalX_) * (x[0]-principalX_) +
00040           (x[1]-principalY_) * (x[1]-principalY_) );
00041
00042   return (x[0]>=0.0 && x[1]>=0.0 &&
00043           x[0]<=(double)(width_-1) && x[1]<=(double)(height_-1) &&
00044           radius<= radius_);
00045
00046 }
00047
00048
00049 HomgPoint2D ProjectionParametersSpherical::
00050 ProjectLocal(const Vector3<double>& point, bool IgnoreDistortion) const {
00051   // transform to spherical coordinates
00052   Vector3<double> rPhiTheta = point.CoordEuclidianToSphere();
00053   // projection point is independent of the radius
00054   HomgPoint2D ret;
00055   if (!IgnoreDistortion) {
00056     if (TransfCoordSphere2Image_(rPhiTheta[2], rPhiTheta[1], ret)<0){
00057       ret.SetZero();
00058     }
00059   } else {
00060     if (TransfCoordSphere2CalibImage_(rPhiTheta[2], rPhiTheta[1], ret)<0){
00061       ret.SetZero();
00062     }
00063   }
00064   return ret;
00065 }
00066
00067 Vector3<double>  ProjectionParametersSpherical::
00068 UnProjectLocal(const HomgPoint2D& pos, bool IgnoreDistortion) const {
00069   // radius = 1;
00070   Vector3<double> rPhiTheta(1,0,0);
00071   Vector3<double> ret;
00072   if (!IgnoreDistortion) {
00073     if (TransfCoordImage2Sphere_(pos, rPhiTheta[2], rPhiTheta[1])<0){
00074       ret.SetZero();
00075     } else {
00076       ret = rPhiTheta.CoordSphereToEuclidian();
00077     }
00078   } else {
00079     if (TransfCoordCalibImage2Sphere_(pos, rPhiTheta[2], rPhiTheta[1])<0){
00080       ret.SetZero();
00081     } else {
00082       ret = rPhiTheta.CoordSphereToEuclidian();
00083     }
00084   }
00085   return ret;
00086 }
00087
00088 Vector3<double> ProjectionParametersSpherical::
00089 UnProjectToPointLocal(const HomgPoint2D& pos,
00090                       const double& depth,
00091                       bool IgnoreDistortion) const {
00092   Vector3<double> x(UnProjectLocal(pos, IgnoreDistortion) * depth);
00093   return x;
00094 }
00095
00096
00097 int ProjectionParametersSpherical::
00098 SetUndistortion(const std::vector<double>& AngleCorrX,
00099                 const std::vector<double>& AngleCorrY,
00100                 const double radius) {
00101
00102   radius_ = radius;
00103
00104   if (AngleCorrX.size()<2 || AngleCorrY.size()<2 ||
00105       AngleCorrX.size()!=AngleCorrY.size()) {
00106     BIASERR("Initialization failed, sizes of angle correction vectors are"
00107             <<  AngleCorrX.size() << AngleCorrY.size());
00108     return -1;
00109   }
00110
00111   double dum;
00112   interpolatorAngle_.SetKnotPoints(AngleCorrX);  //t
00113   interpolatorAngle_.SetControlPoints(AngleCorrY); //y = f(t)
00114   interpolatorAngle_.InitSpline();
00115   interpolatorAngle_.Spline(dum, AngleCorrX[0],4);
00116   MaxCamAngle_ = AngleCorrX[AngleCorrX.size()-1];
00117   int lutsamples = int(radius_*100);
00118   interpolatorAngle_.PrepareLuTSpline(AngleCorrX[0],MaxCamAngle_,
00119                       lutsamples,4 );
00120
00121   interpolatorAngleBack_.SetKnotPoints(AngleCorrY);
00122   interpolatorAngleBack_.SetControlPoints(AngleCorrX);
00123   interpolatorAngleBack_.InitSpline();
00124   interpolatorAngleBack_.Spline(dum, AngleCorrY[0],4);
00125   interpolatorAngleBack_.PrepareLuTSpline(AngleCorrY[0],
00126                       AngleCorrY[AngleCorrY.size()-1],
00127                       lutsamples,4 );
00128
00129   return 0;
00130
00131 }
00132
00133
00134 int ProjectionParametersSpherical::
00135 TransfCoordImage2Sphere_ (const HomgPoint2D& Source,
00136                           double &theta, double &phi) const {
00137
00138   HomgPoint2D SourceH = Source;
00139   SourceH.Homogenize();
00140
00141   double rSrc = sqrt((SourceH[0]-principalX_)*(SourceH[0]-principalX_)+
00142                      (SourceH[1]-principalY_)*(SourceH[1]-principalY_));
00143   if (rSrc>radius_) {
00144     //point not in circle image!
00145     return -1;
00146   }
00147
00148   phi = atan2(SourceH[1]-principalY_,SourceH[0]-principalX_);
00149
00150   double CalMaxCamAngle=0;
00151   // calculate calibrated maximum angle
00152   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00153
00154   // calculate calibrated maximum radius
00155   double RadiusCalMax = MaxCamAngle_/CalMaxCamAngle*radius_;
00156   // calculate calibrated theta and inverse
00157   double CalTheta = rSrc/RadiusCalMax*MaxCamAngle_;
00158   //  interpolatorAngleBack_.Spline(theta, CalTheta,4);
00159   interpolatorAngleBack_.SplineFromLuT(theta, CalTheta);
00160
00161   return 0;
00162 }
00163
00164
00165 int ProjectionParametersSpherical::
00166 TransfCoordRotateSphere2Image_(double theta, double phi,
00167                                double viewCenterX,
00168                                double viewCenterY,
00169                                HomgPoint2D &Source) const
00170 {
00171   double viewTheta, viewPhi;
00172   HomgPoint2D viewCenter(viewCenterX,viewCenterY,1);
00173   if (TransfCoordImage2Sphere_(viewCenter, viewTheta, viewPhi)!=0) {
00174     return -1;
00175   }
00176   // avoid z-rotation by changing the rotation axes
00177   Vector3<double> vecPoint(1.0,phi,theta);
00178   Vector3<double> vecView(1.0,viewPhi,viewTheta);
00179   //Vector3<double> vecCenter(0,0,1);
00180   Vector3<double> vecAxis(cos(viewPhi+M_PI/2),sin(viewPhi+M_PI/2),0);
00181   Vector3<double> vecRot(0,0,0);
00182   vecPoint = vecPoint.CoordSphereToEuclidian();
00183   vecView = vecView.CoordSphereToEuclidian();
00184   /*
00185   // With 1 rotation and moving axis
00186   RMatrix rMat;
00187     rMat.Set(vecAxis, viewTheta);
00188   double x,y,z;
00189   rMat.GetRotationAnglesZYX(x,y,z);
00190   vecRot = rMat*vecPoint;
00191   //cout << x << "," << y << "," << z << endl;
00192   */
00193
00194   //With Quaternions
00195   Quaternion<double> rot;
00196   rot.SetValueAsAxisRad (vecAxis, viewTheta);
00197   rot.MultVec(vecPoint, vecRot);
00198
00199   /*
00200   //With 2 rotations alpha, beta (wrong rotation!!)
00201   // viewAlpha: angle between x-z-Plane and vecView
00202   double viewAlpha = -1 * atan2(vecView[1],vecView[2]);
00203   // viewBeta: angle between y-z-Plane and vecView
00204   double viewBeta = atan2(vecView[0],vecView[2]);
00205   RMatrix rMat;
00206   rMat.SetZYX(viewAlpha,viewBeta,0);
00207   vecRot = rMat*vecPoint;
00208   */
00209
00210   vecRot = vecRot.CoordEuclidianToSphere();
00211   phi = vecRot[1];
00212   theta = vecRot[2];
00213
00214   if (theta > MaxCamAngle_) return -1;
00215   if (phi>M_PI) phi-=2*M_PI;
00216
00217   double CalMaxCamAngle=0;
00218   double CalTheta=0;
00219   // calculate calibrated angles
00220   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00221   interpolatorAngle_.SplineFromLuT(CalTheta, theta);
00222   // apply calculate calibrated radius from calibrated angles
00223   double rSrc = radius_ * CalTheta/CalMaxCamAngle;
00224
00225   Source[0] = rSrc * cos(phi) + principalX_;
00226   Source[1] = rSrc * sin(phi) + principalY_;
00227   Source[2] = 1;
00228   return 0;
00229 }
00230
00231
00232 int ProjectionParametersSpherical::
00233 TransfCoordSphere2Image_(double theta, double phi,
00234                          HomgPoint2D &Source) const {
00235
00236   if (EnforceNormalRange_(theta, phi)<0) return -1;
00237
00238   double CalMaxCamAngle=0;
00239   double CalTheta=0;
00240   // calculate calibrated angles
00241   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00242   interpolatorAngle_.SplineFromLuT(CalTheta, theta);
00243   // apply calculate calibrated radius from calibrated angles
00244   double rSrc = radius_ * CalTheta/CalMaxCamAngle;
00245
00246   Source[0] = rSrc * cos(phi) + principalX_;
00247   Source[1] = rSrc * sin(phi) + principalY_;
00248   Source[2] = 1;
00249
00250   return 0;
00251 }
00252
00253 int ProjectionParametersSpherical::
00254 TransfCoordSphere2CalibImage_(double theta, double phi,
00255                               HomgPoint2D &Source) const {
00256
00257   if (EnforceNormalRange_(theta, phi)<0) return -1;
00258
00259   // apply radius from calibrated angles
00260   double rSrc = radius_ * theta/MaxCamAngle_;
00261
00262   Source[0] = rSrc * cos(phi) + principalX_;
00263   Source[1] = rSrc * sin(phi) + principalY_;
00264   Source[2] = 1;
00265
00266   return 0;
00267
00268 }
00269
00270 int ProjectionParametersSpherical::
00271 TransfCoordCalibImage2Sphere_ (const HomgPoint2D& Source,
00272                                double &theta, double &phi) const {
00273
00274   HomgPoint2D SourceH = Source;
00275   SourceH.Homogenize();
00276
00277   double rSrc = sqrt((SourceH[0]-principalX_)*(SourceH[0]-principalX_)+
00278                      (SourceH[1]-principalY_)*(SourceH[1]-principalY_));
00279
00280   phi = atan2(SourceH[1]-principalY_,SourceH[0]-principalX_);
00281   theta = rSrc/radius_*MaxCamAngle_;
00282   return 0;
00283 }
00284
00285 int ProjectionParametersSpherical::
00286 EnforceNormalRange_(double& theta, double& phi) const {
00287
00288   // theta and phi are periodic in 2*M_PI, if they are out of a suitable
00289   // range, try to find best equivalent angle by adding 2*l*M_PI
00290   double ophi=phi;
00291   double otheta=theta;
00292   if (theta<0.0) {
00293     const int count = (int) ((double)theta / (M_PI*(-2.0)));
00294     theta += ((double)count+1.0) * M_PI*2.0;
00295     if (theta>MaxCamAngle_) {
00296       BIASERR("Angle theta out of range!"<<otheta);
00297       return -1;
00298     }
00299   } else if (theta>MaxCamAngle_) {
00300     const int count = (int) ((double)theta / (M_PI*(2.0)));
00301     theta -= ((double)count+1.0) * M_PI*2.0;
00302     if (theta<0.0) {
00303       //if (otheta-MaxCamAngle_>0.08) {
00304       //  BIASERR("Angle theta out of range: "<<otheta<< "," << otheta-MaxCamAngle_);
00305       //}
00306       return -2;
00307     }
00308   }
00309
00310   if (phi<-M_PI) {
00311     const int count = (int) ((double)phi / (M_PI*(-2.0)));
00312     phi += ((double)count+1.0) * M_PI*2.0;
00313     if (phi>M_PI) {
00314       BIASERR("Angle phi out of range:"<<ophi);
00315       return -3;
00316     }
00317   } else if (phi>M_PI) {
00318     const int count = (int)((double)phi / (M_PI*(2.0)));
00319     phi -= ((double)count+1.0) * M_PI*2.0;
00320     if (phi<-M_PI) {
00321       BIASERR("Angle phi out of range: "<<ophi);
00322       return -4;
00323     }
00324   }
00325   return 0;
00326 }
00327
00328
00329 double ProjectionParametersSpherical::
00330 ViewDifference(const ProjectionParametersBase* pPPB) const {
00331   const ProjectionParametersSpherical *pPPS =
00332      dynamic_cast<const ProjectionParametersSpherical* >(pPPB);
00333   // different projection model has a very different view
00334   if (pPPS==NULL) {
00335     BIASERR("View difference for different projection models requested !");
00336     return DBL_MAX;
00337   }
00338
00339   Vector3<double> C0 = pPPS->GetC();
00340   // Optical axes of the 2 cameras
00341   Vector3<double>  A0, A;
00342
00343   RMatrix R = GetR(), R0 = pPPS->GetR();
00344
00345   A[0] = R[0][2]; A[1] = R[1][2]; A[2] = R[2][2];
00346   A.Normalize();
00347
00348   A0[0] = R0[0][2]; A0[1] = R0[1][2]; A0[2] = R0[2][2];
00349   A0.Normalize();
00350
00351   // compute field of view, assuming const K !
00352   double coshalffieldofview = cos(MaxCamAngle_);
00353
00354   double newness = (GetC()-C0).NormL2();
00355   newness += 1.0/(1.0-coshalffieldofview)*(1.0-fabs(A.ScalarProduct(A0)));
00356   return newness;
00357 }
00358
00359 KMatrix ProjectionParametersSpherical::GetFakeKMatrix(int resolution) const {
00360   double dum;
00361   return GetFakeKMatrix(dum, resolution);
00362 }
00363
00364 KMatrix ProjectionParametersSpherical::GetFakeKMatrix(double& imgsize,
00365                                                       int resolution) const {
00366
00367   // maximum FoV in degree
00368   double FoV = 160;
00369   imgsize=0;
00370
00371   double ang;
00372   ang = (FoV/2.0)*M_PI/180.0;
00373   if (ang>GetMaxCamAngle()) ang = GetMaxCamAngle()-0.01;
00374
00375   Vector3<double> ray1, ray2;
00376   HomgPoint2D imgCoord1, imgCoord2;
00377   switch (resolution) {
00378   case 1:
00379     // measure 1 deg angle in camera center
00380     ray1.Set(sin(ang-M_PI/180.0),0.0,cos(ang-M_PI/180.0));
00381     ray2.Set(sin(ang),0.0,cos(ang));
00382     imgCoord1 = ProjectLocal(ray1);
00383     imgCoord2 = ProjectLocal(ray2);
00384     imgsize=(imgCoord2[0]-imgCoord1[0])*tan(ang)/tan(M_PI/180.0);
00385     break;
00386   case 2:
00387     // measure 1 deg angle near max angle
00388     ray1.Set(sin(ang-M_PI/180.0),0.0,cos(ang-M_PI/180.0));
00389     ray2.Set(sin(ang),0.0,cos(ang));
00390     imgCoord1 = ProjectLocal(ray1);
00391     imgCoord2 = ProjectLocal(ray2);
00392     imgsize=(imgCoord2[0]-imgCoord1[0])/
00393       (tan(ang)-tan(ang-M_PI/180.0))*tan(ang);
00394     break;
00395   case 3:
00396     // measure 1 deg angle in camera center
00397     ray1.Set(sin(ang-M_PI/180.0),0.0,cos(ang-M_PI/180.0));
00398     ray2.Set(sin(ang),0.0,cos(ang));
00399     imgCoord1 = ProjectLocal(ray1);
00400     imgCoord2 = ProjectLocal(ray2);
00401     imgsize=(imgCoord2[0]-imgCoord1[0])*tan(ang)/tan(M_PI/180.0);
00402     imgsize*=2;
00403     break;
00404   default:
00405     ray1.Set(sin(ang),0.0,cos(ang));
00406     imgCoord1 = ProjectLocal(ray1);
00407     imgsize = imgCoord1[0]-principalX_;
00408   }
00409   KMatrix K;
00410   K.SetIdentity();
00411   K[0][0] = imgsize/tan(ang);
00412   K[1][1] = imgsize/tan(ang);
00413   K[0][2] = imgsize;
00414   K[1][2] = imgsize;
00415   imgsize *= 2;
00416   return K;
00417 }
00418
00419
00420 #ifdef BIAS_HAVE_XML2
00421
00422 int ProjectionParametersSpherical::XMLGetClassName(std::string& TopLevelTag,
00423                                                      double& Version) const {
00424   TopLevelTag = "ProjectionParametersSpherical";
00425   Version = 0.1;
00426   return 0;
00427 }
00428
00429
00430 int ProjectionParametersSpherical::XMLOut(const xmlNodePtr Node,
00431                                             XMLIO& XMLObject) const {
00432   xmlNodePtr theNode;
00433   string TopLevelName;
00434   double Version;
00435   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00436   theNode = XMLObject.addChildNode(Node, TopLevelName);
00437   XMLObject.addAttribute(theNode, "Version", Version);
00438   ProjectionParametersBase::XMLOut(theNode, XMLObject);
00439
00440   xmlNodePtr childNode, childNode2;
00441   XMLObject.addAttribute(Node,"Radius", radius_);
00442   childNode = XMLObject.addChildNode(Node,"Distortion");
00443   vector<double> controlpoints, knotpoints;
00444   interpolatorAngle_.GetControlPoints(controlpoints);
00445   interpolatorAngle_.GetKnotPoints(knotpoints);
00446   for (unsigned int i=0; i<controlpoints.size(); i++) {
00447     childNode2= XMLObject.addChildNode(childNode,"MeasPoint");
00448     XMLObject.addAttribute(childNode2, "AngRay", knotpoints[i]);
00449     XMLObject.addAttribute(childNode2, "AngDeformed", controlpoints[i]);
00450   }
00451   return 0;
00452 }
00453
00454
00455 int ProjectionParametersSpherical::XMLIn(const xmlNodePtr Node,
00456                                            XMLIO& XMLObject) {
00457   string TopLevelName;
00458   double Version;
00459   xmlNodePtr childNode, childNode2;
00460
00461   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00462   if ((childNode = XMLObject.getChild(Node, TopLevelName))==NULL) {
00463     BIASERR("Error in xml, no tag" << TopLevelName);
00464     return -1;
00465   }
00466   if (ProjectionParametersBase::XMLIn(childNode, XMLObject)!=0) return -1;
00467
00468   double radius = XMLObject.getAttributeValueDouble(Node, "Radius");
00469   vector<double> AngleCorrX, AngleCorrY;
00470   if ((childNode = XMLObject.getChild(Node, "Distortion"))!=NULL) {
00471     childNode2 = XMLObject.getFirstChild(childNode);
00472     while (childNode2!=NULL) {
00473       string nodename = XMLObject.getNodeName(childNode2);
00474       if (nodename.compare("MeasPoint")==0) {
00475         double x = XMLObject.getAttributeValueDouble(childNode2, "AngRay");
00476         double y = XMLObject.getAttributeValueDouble(childNode2,
00477                                                      "AngDeformed");
00478         AngleCorrX.push_back(x);
00479         AngleCorrY.push_back(y);
00480       }
00481       childNode2 = XMLObject.getNextChild(childNode2);
00482     }
00483     SetUndistortion(AngleCorrX, AngleCorrY, radius);
00484   }
00485   return 0;
00486 }
00487 #endif
00488
00489
00490
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersSpherical.hh Source File

Geometry

ProjectionParametersSpherical.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersSpherical_hh__
00027 #define __BIAS_ProjectionParametersSpherical_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <Geometry/ProjectionParametersBase.hh>
00032 #include <MathAlgo/Interpolator.hh>
00033
00034 namespace BIAS {
00035
00036  /** @class ProjectionParametersSpherical
00037      @brief camera parameters which define the mapping between rays in the
00038      camera coordinate system and pixels in the image as well as external pose
00039      @author koeser/evers/streckel
00040  */
00041   class BIASGeometry_EXPORT ProjectionParametersSpherical:
00042     public  ProjectionParametersBase {
00043   public:
00044
00045     ProjectionParametersSpherical()
00046       : ProjectionParametersBase(){
00047       radius_=0;
00048       MaxCamAngle_=0;
00049     };
00050
00051     ProjectionParametersSpherical(const ProjectionParametersSpherical & P){
00052       *this = P;
00053     };
00054
00055     ProjectionParametersSpherical&
00056     operator=(const ProjectionParametersSpherical & P){
00057       ProjectionParametersBase::operator=(P);
00058       radius_=P.radius_;
00059       MaxCamAngle_=P.MaxCamAngle_;
00060       interpolatorAngle_ = P.interpolatorAngle_;
00061       interpolatorAngleBack_ = P.interpolatorAngleBack_;
00062       return *this;
00063     };
00064
00065     virtual ~ProjectionParametersSpherical(){};
00066
00067     bool DoesPointProjectIntoImageLocal(const BIAS::Vector3<double>& localX,
00068                                         HomgPoint2D& x,
00069                                         bool IgnoreDistortion = false) const;
00070
00071     /** @brief calculates the projection of a point
00072         in the camera coordinate system
00073         to a pixel in the image plane of the camera
00074
00075         In the simplest case perspective pinhole projection x = K * y
00076         where y is the projection of X using  y = (R^T | -R^T C) X
00077     */
00078     virtual HomgPoint2D ProjectLocal(const Vector3<double>& point,
00079                                      bool IgnoreDistortion = false) const;
00080
00081     /** @brief calculates the viewing ray from the camera center (in the
00082         camera coordinate system) which belongs to the image position pos
00083         e.g. (0,0,1) means optical axis
00084     */
00085     virtual Vector3<double>
00086     UnProjectLocal(const HomgPoint2D& pos,
00087                    bool IgnoreDistortion = false) const;
00088
00089     /** @brief covariant virtual copy constructor for use in Projection */
00090     virtual ProjectionParametersSpherical* Clone() const {
00091       return new ProjectionParametersSpherical(*this);
00092     };
00093
00094    inline double GetRadius() const{
00095      return radius_;
00096     }
00097
00098     inline void SetRadius(double r) {
00099       radius_ = r;
00100     }
00101
00102     inline double GetMaxCamAngle() const {
00103       return MaxCamAngle_;
00104     }
00105
00106     int SetUndistortion(const std::vector<double>& AngleCorrX,
00107                         const std::vector<double>& AngleCorrY,
00108                         const double radius);
00109
00110     /** @brief adapt internal params to resampled image
00111         @param ratio 2.0 = downsample, 0.5 = upsample
00112     */
00113     virtual inline void Rescale(float ratio) {
00114       ProjectionParametersBase::Rescale(ratio);
00115       radius_ /= ratio;
00116     }
00117
00118     virtual double ViewDifference(const ProjectionParametersBase* pPPB) const;
00119
00120     /** @brief Returns a fake KMatrix for the fisheye camera.
00121         The FoV of the KMatrix is 160deg or the max fisheye angle,
00122         if this is <160deg.
00123         @param resolution The resolution parameter influences the
00124         Resolution of the perspective image that is represented by the camera.
00125         0 - The perspective image has the same size as the fisheye image
00126         1 - The perspective image has the same resolution as the maximum
00127         fisheye angular resolution up to 160deg.
00128         2 - The perspective image has the minimum resolution of the
00129         fisheye image.
00130         @param imgsize returns the image size
00131         @author streckel 05/2006
00132     */
00133     BIAS::KMatrix GetFakeKMatrix(double& imgsize, int resolution=0) const;
00134     BIAS::KMatrix GetFakeKMatrix(int resolution=0) const;
00135
00136     /** @brief calculates a 3D point in
00137         a local camera coordinate system specified by camSystem, which
00138         belongs to the image position pos in cam with distance depth to the
00139         camera center cam. Overload to habe return value (0,0,0)
00140         for undefined or out of image radius pixels.
00141         @author streckel  */
00142     virtual Vector3<double> UnProjectToPointLocal(const HomgPoint2D& pos,
00143                                                   const double& depth,
00144                                                   bool IgnoreDistortion=false)
00145       const;
00146
00147
00148 #ifdef BIAS_HAVE_XML2
00149     /** @brief specialization of XML block name function */
00150     virtual int XMLGetClassName(std::string& TopLevelTag,
00151                                 double& Version) const;
00152
00153     /** @brief specialization of XML write function */
00154     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00155
00156     /** @brief specialization of XML read function */
00157     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00158 #endif
00159
00160   protected:
00161
00162     /** @brief Transforms a coordinate pair of image coordinates x, y in the
00163         uncalibrated spherical image, to a calibrated pair of polar coordinates
00164         phi, theta.
00165         @author Birger Streckel */
00166     int TransfCoordImage2Sphere_ (const HomgPoint2D& Source,
00167                                  double &theta, double &phi) const;
00168
00169     /** @brief Transforms a coordinate pair of image coordinates x, y in the
00170         calibrated spherical image, to a calibrated pair of polar coordinates
00171         phi, theta.
00172         @author Birger Streckel */
00173     int TransfCoordCalibImage2Sphere_ (const HomgPoint2D& Source,
00174                                       double &theta, double &phi) const;
00175
00176     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00177         to a coordinate pair of image coordinates x, y in the uncalibrated
00178         spherical image.
00179         @author Birger Streckel */
00180     int TransfCoordSphere2Image_ (double theta, double phi,
00181                                  HomgPoint2D &Source) const;
00182
00183     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00184         to a coordinate pair of image coordinates x, y in the uncalibrated
00185         spherical image.
00186         @author Birger Streckel */
00187     int TransfCoordRotateSphere2Image_ (double theta, double phi,
00188                                        double viewCenterX,
00189                                        double viewCenterY,
00190                                        HomgPoint2D &Source) const;
00191
00192     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00193         to a coordinate pair of image coordinates x, y in an equidistant
00194         spherical image.
00195         @author Birger Streckel */
00196     int TransfCoordSphere2CalibImage_ (double theta, double phi,
00197                                       HomgPoint2D &Source) const;
00198
00199     /** @brief theta and phi are periodic in 2*M_PI, if they are out of a
00200         suitable range, try to find best equivalent angle by adding 2*l*M_PI
00201         @return 0 on success, <0 indicates that at least one angle is invalid
00202         @author koeser 10/2004 */
00203     int EnforceNormalRange_(double& theta, double& phi) const;
00204
00205
00206
00207     // image radius if image is spherical
00208     double radius_;
00209
00210     // Maximum image angle of the fisheye camera
00211     double MaxCamAngle_;
00212
00213     // Spline interpolators for image distortion
00214     // x : angle in an undistorted image
00215     // y : distorted angle
00216     // Example: x=pi, y =.8*pi means that the image at angle pi is
00217     // distorted with factor 0.8
00218     Interpolator interpolatorAngle_;
00219     // back-transformation
00220     Interpolator interpolatorAngleBack_;
00221
00222
00223   };
00224
00225
00226
00227 } // end namespace
00228
00229
00230 #include <Base/Common/BIASpragmaEnd.hh>
00231
00232 #endif
00233
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersZoom.cpp Source File

Geometry

ProjectionParametersZoom.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Geometry/ProjectionParametersZoom.hh"
00027
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 HomgPoint2D ProjectionParametersZoom::
00033 ProjectLocal(const Vector3<double>& point, bool IgnoreDistortion) const {
00034   // in-plane affine coordinate transformation with KMatrix
00035   HomgPoint2D pos;
00036   K_.Mult(point, pos);
00037   // radial distortion here
00038   if (!IgnoreDistortion) Distort(pos);
00039   return pos.Homogenize();
00040 }
00041
00042 Vector3<double> ProjectionParametersZoom::
00043 UnProjectLocal(const HomgPoint2D& cPos, bool IgnoreDistortion) const {
00044   HomgPoint2D mpos(cPos); // de-const pos
00045   // radial undistortion here
00046   if (!IgnoreDistortion) Undistort(mpos);
00047   // in-plane affine coordinate transformation with KMatrix
00048   Vector3<double> point;
00049   invK_.Mult(mpos, point);
00050   return point.Normalize();
00051 }
00052
00053
00054
00055 int ProjectionParametersZoom::AddZoomStep(double zoom, double focallength,
00056                                           double kc1, double kc2,
00057                                           double kc3, double kc4)
00058 {
00059   if (knownparams_vect_.size()>0) {
00060     if (knownparams_vect_[knownparams_vect_.size()-1].zoom<zoom) {
00061       BIASERR("Zoom parameters only in descending order.");
00062       return -1;
00063     }
00064   }
00065   CPDiscreteParam dp;
00066   dp.zoom = zoom;
00067   dp.focallength = focallength;
00068   dp.kc1 = kc1;
00069   dp.kc2 = kc2;
00070   dp.kc3 = kc3;
00071   dp.kc4 = kc4;
00072   knownparams_vect_.push_back(dp);
00073   SetUnzoomed();
00074   ComputeK_();
00075   return 0;
00076 }
00077
00078
00079 void ProjectionParametersZoom::ComputeK_() {
00080
00081   K_.SetIdentity();
00082   K_[0][0] = focallengthZoom_;
00083   K_[1][1] = aspectratio_ * focallengthZoom_;
00084   K_[0][1] = 0; //skew_;
00085   K_[0][2] = principalX_;
00086   K_[1][2] = principalY_;
00087   invK_ = K_.Invert();
00088
00089 }
00090
00091 #ifdef BIAS_HAVE_XML2
00092
00093 int ProjectionParametersZoom::XMLGetClassName(std::string& TopLevelTag,
00094                                                      double& Version) const {
00095   TopLevelTag = "ProjectionParametersZoom";
00096   Version = 1.0;
00097   return 0;
00098 }
00099
00100
00101 int ProjectionParametersZoom::XMLOut(const xmlNodePtr Node,
00102                                             XMLIO& XMLObject) const {
00103   xmlNodePtr theNode;
00104   string TopLevelName;
00105   double Version;
00106   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00107   theNode = XMLObject.addChildNode(Node, TopLevelName);
00108   XMLObject.addAttribute(theNode, "Version", Version);
00109   ProjectionParametersBase::XMLOut(theNode, XMLObject);
00110   xmlNodePtr childNode;
00111   for (unsigned int i=0; i<knownparams_vect_.size(); i++) {
00112     childNode = XMLObject.addChildNode(Node,"ZoomStep");
00113     XMLObject.addAttribute(childNode, "Zoom", knownparams_vect_[i].zoom);
00114     XMLObject.addAttribute(childNode, "Focallength",
00115                            knownparams_vect_[i].focallength);
00116     XMLObject.addAttribute(childNode, "k1", knownparams_vect_[i].kc1);
00117     XMLObject.addAttribute(childNode, "k2", knownparams_vect_[i].kc2);
00118     XMLObject.addAttribute(childNode, "p1", knownparams_vect_[i].kc3);
00119     XMLObject.addAttribute(childNode, "p2", knownparams_vect_[i].kc4);
00120   }
00121   return 0;
00122 }
00123
00124
00125 int ProjectionParametersZoom::XMLIn(const xmlNodePtr Node,
00126                                            XMLIO& XMLObject) {
00127   string TopLevelName;
00128   double Version;
00129   ProjectionParametersBase::XMLGetClassName(TopLevelName, Version);
00130
00131   xmlNodePtr childNode;
00132   if ((childNode = XMLObject.getChild(Node, TopLevelName))==NULL) {
00133     BIASERR("Error in xml, no tag" << TopLevelName);
00134     return -1;
00135   }
00136   if (ProjectionParametersBase::XMLIn(childNode, XMLObject)!=0) return -1;
00137   knownparams_vect_.clear();
00138   childNode = XMLObject.getFirstChild(Node);
00139   while (childNode!=NULL) {
00140     string nodename = XMLObject.getNodeName(childNode);
00141     if (nodename.compare("ZoomStep")==0) {
00142       CPDiscreteParam kpv;
00143       kpv.zoom = XMLObject.getAttributeValueDouble(childNode, "Zoom");
00144       kpv.focallength =
00145         XMLObject.getAttributeValueDouble(childNode, "Focallength");
00146       kpv.kc1 = XMLObject.getAttributeValueDouble(childNode, "k1");
00147       kpv.kc2 = XMLObject.getAttributeValueDouble(childNode, "k2");
00148       kpv.kc3 = XMLObject.getAttributeValueDouble(childNode, "p1");
00149       kpv.kc4 = XMLObject.getAttributeValueDouble(childNode, "p2");
00150       knownparams_vect_.push_back(kpv);
00151     }
00152     childNode = XMLObject.getNextChild(childNode);
00153   }
00154   SetUnzoomed();
00155   return 0;
00156 }
00157
00158 #endif
00159
00160
00161 void ProjectionParametersZoom::InterpolateDistortionFromIndex_(unsigned int i,
00162                                                           double relnorm){
00163   //todo: brown: adequate methode finden (lin. interp. ist
00164   //schlechter)
00165
00166   kc1Zoom_=relnorm*(knownparams_vect_[i].kc1-knownparams_vect_[i-1].kc1)+
00167     knownparams_vect_[i-1].kc1;
00168
00169   kc2Zoom_=relnorm*(knownparams_vect_[i].kc2-knownparams_vect_[i-1].kc2)+
00170     knownparams_vect_[i-1].kc2;
00171
00172   kc3Zoom_=relnorm*(knownparams_vect_[i].kc3-knownparams_vect_[i-1].kc3)+
00173     knownparams_vect_[i-1].kc3;
00174
00175   kc4Zoom_=relnorm*(knownparams_vect_[i].kc4-knownparams_vect_[i-1].kc4)+
00176     knownparams_vect_[i-1].kc4;
00177
00178 }
00179
00180
00181 double ProjectionParametersZoom::InterpolateFocalLength_(){
00182
00183   double relnorm;
00184   double absdist;
00185
00186   bool found;
00187   unsigned int i;
00188   found=false;
00189
00190   if (knownparams_vect_[0].zoom<zoom_){ // zoom is higher than the
00191     // known values:
00192     zoom_=knownparams_vect_[0].zoom;  // set to highest available
00193   }
00194
00195   for (i=0;i<knownparams_vect_.size();i++){
00196     if (knownparams_vect_[i].zoom<=zoom_){
00197         found=true;
00198         break;
00199     }
00200   }
00201
00202   if (!found){ // zoom is lower than the known values
00203     focallengthZoom_=knownparams_vect_[i-1].focallength;
00204     return knownparams_vect_[i-1].focallength;
00205   }
00206
00207   if (knownparams_vect_[i].zoom==zoom_){
00208     // interpolate distortion parameters
00209     InterpolateDistortionFromIndex_(i+1,0);
00210     return knownparams_vect_[i].focallength;
00211   } else {
00212     relnorm=(zoom_ - knownparams_vect_[i].zoom) /
00213       (knownparams_vect_[i-1].zoom - knownparams_vect_[i].zoom);
00214     relnorm=1.0-relnorm;
00215     // interpolate distortion parameters
00216     InterpolateDistortionFromIndex_(i,relnorm);
00217     absdist=relnorm*(knownparams_vect_[i].focallength-
00218                      knownparams_vect_[i-1].focallength);
00219     return (absdist+knownparams_vect_[i-1].focallength);
00220   }
00221 }
00222
00223
00224 void ProjectionParametersZoom::Distort(HomgPoint2D& point2d) const {
00225
00226   // do nothing in case of ideal lense
00227   if (kc1Zoom_==0 && kc2Zoom_==0 && kc3Zoom_==0 && kc4Zoom_==0) return;
00228
00229   // copy of distorted point
00230   double distx,disty;
00231   double x,y;
00232   double twoxy;
00233
00234   double rsquared;
00235   double raddist;
00236   double tandistx, tandisty;
00237
00238   point2d.Homogenize();
00239
00240   // Points must be Bougouet-normalized
00241   // (subtract principal point, then divide by focal length)
00242   x = (point2d[0]-principalX_)/focallengthZoom_;
00243   y = (point2d[1]-principalY_)/(GetAspectratio()*focallengthZoom_);
00244
00245   twoxy = 2 * x*y;
00246   rsquared = x*x + y*y;
00247
00248   // radial distortion:
00249   raddist = 1 + kc1Zoom_*rsquared + kc2Zoom_*rsquared*rsquared;
00250   // tangential distortion:
00251   tandistx = kc3Zoom_*twoxy + kc4Zoom_ * (rsquared + 2*x*x);
00252   tandisty = kc4Zoom_*twoxy + kc3Zoom_ * (rsquared + 2*y*y);
00253
00254   // apply distortion:
00255   distx = raddist * x + tandistx;
00256   disty = raddist * y + tandisty;
00257
00258   // invert Bougouet-normalization
00259   point2d[0] = distx*focallengthZoom_ + principalX_;
00260   point2d[1] = disty*GetAspectratio()*focallengthZoom_ + principalY_;
00261 }
00262
00263
00264 void ProjectionParametersZoom::Undistort(HomgPoint2D& point2d) const {
00265
00266   // do nothing in case of ideal lense
00267   if (kc1Zoom_==0 && kc2Zoom_==0 && kc3Zoom_==0 && kc4Zoom_==0) return;
00268
00269 // copy of distorted point
00270   double distx,disty;
00271   double x,y;
00272   double twoxy;
00273
00274   double rsquared;
00275   double raddist;
00276   double tandistx, tandisty;
00277
00278   point2d.Homogenize();
00279
00280   // Points must be Bougouet-normalized
00281   // (subtract principal point, then divide by focal length)
00282   x = point2d[0] = (point2d[0]-principalX_)/focallengthZoom_;
00283   y = point2d[1] = (point2d[1]-principalY_)/(GetAspectratio()*
00284                                              focallengthZoom_);
00285
00286   // 5 iterations are enough
00287   for (unsigned int i=0;i<5;i++){
00288
00289     twoxy = 2 * x*y;
00290     rsquared = x*x + y*y;
00291
00292     // radial distortion:
00293     raddist = 1 + kc1Zoom_*rsquared + kc2Zoom_*rsquared*rsquared;
00294     // tangential distortion:
00295     tandistx = kc3Zoom_*twoxy + kc4Zoom_ * (rsquared + 2*x*x);
00296     tandisty = kc4Zoom_*twoxy + kc3Zoom_ * (rsquared + 2*y*y);
00297
00298     // apply distortion:
00299     distx = raddist * x + tandistx;
00300     disty = raddist * y + tandisty;
00301
00302     // subtract distortion from distorted coordinates
00303     x = point2d[0] - (distx-x);
00304     y = point2d[1] - (disty-y);
00305
00306   }
00307
00308   // invert Bougouet-normalization
00309   point2d[0] = x*focallengthZoom_ + principalX_;
00310   point2d[1] = y*GetAspectratio()*focallengthZoom_ + principalY_;
00311 }
00312
00313
00314 double ProjectionParametersZoom::InterpolateAbsZoom_(){
00315
00316   double relnorm;
00317   double absdist;
00318
00319   bool found;
00320   unsigned int i;
00321   found=false;
00322
00323   if (knownparams_vect_[0].focallength<focallengthZoom_){
00324     focallengthZoom_=knownparams_vect_[0].focallength;
00325   }
00326
00327   for (i=0;i<knownparams_vect_.size();i++){
00328     if (knownparams_vect_[i].focallength<=focallengthZoom_){
00329         found=true;
00330         break;
00331     }
00332   }
00333   if (!found){
00334     return -1;
00335   }
00336
00337   if (knownparams_vect_[i].focallength==focallengthZoom_){
00338     // interpolate distortion parameters
00339     InterpolateDistortionFromIndex_(i+1,0);
00340     return knownparams_vect_[i].zoom;
00341   } else {
00342     relnorm=(focallengthZoom_ - knownparams_vect_[i].focallength) /
00343       (knownparams_vect_[i-1].focallength - knownparams_vect_[i].focallength);
00344     relnorm=1.0-relnorm;
00345     // interpolate distortion parameters
00346     InterpolateDistortionFromIndex_(i,relnorm);
00347     absdist=relnorm*(knownparams_vect_[i].zoom-
00348                      knownparams_vect_[i-1].zoom);
00349     return (absdist+knownparams_vect_[i-1].zoom);
00350   }
00351 }
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/ProjectionParametersZoom.hh Source File

Geometry

ProjectionParametersZoom.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_ProjectionParametersZoom_hh__
00027 #define __BIAS_ProjectionParametersZoom_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Common/BIASpragmaStart.hh>
00031 #include <Geometry/ProjectionParametersBase.hh>
00032 #include <Base/Geometry/KMatrix.hh>
00033
00034 namespace BIAS {
00035
00036 #ifndef __BIAS_CPDiscreteParam__
00037 #define __BIAS_CPDiscreteParam__
00038
00039   // distortion parameters at different zoom levels
00040   struct BIASImage_EXPORT CPDiscreteParam{
00041     double zoom;
00042     double focallength;
00043     // radial/tangential distortion parameters.
00044     // 4th order model of brown.
00045     double kc1,kc2,kc3,kc4;
00046   };
00047
00048 #endif
00049
00050  /** @class ProjectionParametersZoom
00051      @brief camera parameters which define the mapping between rays in the
00052      camera coordinate system and pixels in the image as well as external pose
00053      @author streckel
00054  */
00055   class BIASGeometry_EXPORT ProjectionParametersZoom:
00056     public  ProjectionParametersBase {
00057   public:
00058
00059     ProjectionParametersZoom()
00060       : ProjectionParametersBase() {
00061       K_.SetIdentity();
00062       invK_.SetIdentity();
00063       zoom_=0;
00064       focallengthZoom_=0;
00065       kc1Zoom_=0; kc2Zoom_=0; kc3Zoom_=0; kc4Zoom_=0;
00066     };
00067
00068     ProjectionParametersZoom(const ProjectionParametersZoom & P){
00069       *this = P;
00070     };
00071
00072     ProjectionParametersZoom&
00073     operator=(const ProjectionParametersZoom & P){
00074       BIASERR("not implemented");
00075       BIASABORT;
00076       return *this;
00077     };
00078
00079     virtual ~ProjectionParametersZoom(){};
00080
00081     /** @brief calculates the projection of a point
00082         in the camera coordinate system
00083         to a pixel in the image plane of the camera
00084
00085         In the simplest case perspective pinhole projection x = K * y
00086         where y is the projection of X using  y = (R^T | -R^T C) X
00087     */
00088     virtual HomgPoint2D  ProjectLocal(const Vector3<double>& point,
00089                                       bool IgnoreDistortion = false) const;
00090
00091     /** @brief calculates the viewing ray from the camera center (in the
00092         camera coordinate system) which belongs to the image position pos
00093         e.g. (0,0,1) means optical axis
00094     */
00095     virtual Vector3<double> UnProjectLocal(const HomgPoint2D& pos,
00096                                            bool IgnoreDistortion = false)const;
00097
00098     /** @brief Using the Matlab camera calibration toolbox parameters
00099         for an undistortion of distorted coordinates.
00100         TODO: faster implementation via Lookup-table
00101         @author streckel 06/2004 */
00102     void Undistort(BIAS::HomgPoint2D& point2d) const;
00103
00104     /** @brief Using the Matlab camera calibration toolbox parameters
00105         for a distortion of undistorted coordinates. Inverse to the
00106         undistort function.
00107         TODO: faster implementation via Lookup-table
00108         @author streckel 06/2004 */
00109     void Distort(BIAS::HomgPoint2D& point2d) const;
00110
00111     /** @brief covariant virtual copy constructor for use in Projection */
00112     virtual ProjectionParametersZoom* Clone() const {
00113       return new ProjectionParametersZoom(*this);
00114     };
00115
00116     inline void Clear(){
00117       knownparams_vect_.clear();
00118     }
00119
00120     int AddZoomStep(double zoom, double focallength,
00121                     double kc1, double kc2, double kc3, double kc4);
00122
00123     /* @brief get cached KMatrix
00124      */
00125     inline void GetK(KMatrix& K) const {
00126       K = K_;
00127     };
00128
00129     /* @brief get cached inverted KMatrix
00130      */
00131     inline void GetKinv(KMatrix& invK) const {
00132       invK = invK_;
00133     };
00134
00135     /* @brief get the PMatrix composed from the projection object
00136      */
00137     inline virtual BIAS::PMatrix GetP() const {
00138       return BIAS::PMatrix(K_,GetR(),GetC());
00139     }
00140
00141     /** @brief Get the current camera zoom.
00142         @author buck */
00143     inline int GetZoom(double& zoom) const {
00144         zoom = zoom_;
00145         return 0;
00146     }
00147
00148     /** @brief Get the current camera focal length.
00149         @author buck */
00150     inline int GetFocalLength(double& f) const {
00151       f = focallengthZoom_;
00152       return 0;
00153     }
00154
00155     /** @brief Get the current camera focal length.
00156         @author buck */
00157     inline void GetUndistortion(double& kc1, double& kc2,
00158                                 double& kc3, double& kc4) const
00159     {
00160       kc1 = kc1Zoom_;
00161       kc2 = kc2Zoom_;
00162       kc3 = kc3Zoom_;
00163       kc4 = kc4Zoom_;
00164     }
00165
00166
00167     /** @brief Set CCD cell-size in meter, virtual overload to
00168         recalculate K_.
00169         @author streckel */
00170     virtual inline void SetAspectratio(const double CellSizeX,
00171                                     const double AspectRatio) {
00172       ProjectionParametersBase::SetAspectratio(AspectRatio);
00173       ComputeK_();
00174     }
00175
00176     /** @brief Set principal point in pixels relative to top left corner,
00177         virtual overload to recalculate K_
00178         @author streckel */
00179     virtual inline void SetPrincipal(const double x, const double y) {
00180       ProjectionParametersBase::SetPrincipal(x, y);
00181       ComputeK_();
00182     }
00183
00184     /** @brief Set the current camera zoom, the focal length will be
00185         calculated.
00186         @author buck */
00187     inline int SetZoom(const double abszoom) {
00188       zoom_=abszoom;
00189       focallengthZoom_ = InterpolateFocalLength_();
00190       ComputeK_();
00191       return 0;
00192     }
00193
00194     /** @brief Set the current camera focal length, the zoom will be
00195         calculated.
00196         @author buck */
00197     inline int SetFocalLength(const double f) {
00198       focallengthZoom_=f;
00199       zoom_=InterpolateAbsZoom_();
00200       ComputeK_();
00201       return 0;
00202     }
00203
00204     /** @brief Set the zoom and focal length of a zoom camera to the
00205         default settings.
00206         @author streckel 06/2004*/
00207     inline void SetUnzoomed() {
00208       if (knownparams_vect_.size()>0) {
00209         SetZoom(knownparams_vect_[0].zoom);
00210       }
00211     }
00212
00213
00214     /** @brief adapt internal params to resampled image
00215         @param ratio 2.0 = downsample, 0.5 = upsample
00216     */
00217     virtual inline void Rescale(float ratio) {
00218       BIASERR("unimplemented");
00219       BIASABORT;
00220     }
00221
00222 #ifdef BIAS_HAVE_XML2
00223     /** @brief specialization of XML block name function */
00224     virtual int XMLGetClassName(std::string& TopLevelTag,
00225                                 double& Version) const;
00226
00227     /** @brief specialization of XML write function */
00228     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const;
00229
00230     /** @brief specialization of XML read function */
00231     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject);
00232 #endif
00233
00234   protected:
00235     // focal length, aspect ratio, principal point in K_, inverse in invK_
00236     KMatrix K_, invK_;
00237
00238    // array of camera calibration constants for zoom cameras
00239     std::vector<CPDiscreteParam> knownparams_vect_;
00240
00241     // calibration settings for the current zoom setting of a zoom camera
00242     // zoom and focallengthZoom are dependend:
00243     // if zoom is set, focallengthZoom will be calculated and vice versa
00244     // focal length is stored in pixel
00245     double zoom_;
00246     double focallengthZoom_;
00247     double kc1Zoom_, kc2Zoom_, kc3Zoom_, kc4Zoom_;
00248
00249     void InterpolateDistortionFromIndex_(unsigned int i,double relnorm);
00250     double InterpolateFocalLength_(); // w/ given abszoom
00251     double InterpolateAbsZoom_(); // w/ given focal length
00252
00253     /** @brief computes the cached KMatrix and its inverse
00254         call after every parameter change */
00255     void ComputeK_();
00256
00257   };
00258
00259
00260
00261 } // end namespace
00262
00263
00264 #include <Base/Common/BIASpragmaEnd.hh>
00265
00266 #endif
00267
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PyramidImage.cpp Source File

Image

PyramidImage.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "bias_config.h"
00026 #include "PyramidImage.hh"
00027 #include "Base/Image/ImageIO.hh"
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032 //////////////////////////////////////////////////////////////////////////
00033 //                 implementation
00034 //////////////////////////////////////////////////////////////////////////
00035
00036
00037 template <class StorageType>
00038 PyramidImage<StorageType>::
00039 PyramidImage()
00040   : std::vector<Image<StorageType>* >(),
00041     _rescale()
00042 {
00043   _ParamsAllocated=true;
00044   _PyramidSize=new int;
00045   *_PyramidSize=4;
00046   _RescaleFactor=new double;
00047   *_RescaleFactor=2.0;
00048   _rescale.SetFactor(*_RescaleFactor);
00049   _PositionOffset=0.0;
00050 }
00051
00052
00053 template <class StorageType>
00054 PyramidImage<StorageType>::
00055 PyramidImage(Param& para, const std::string& postfix)
00056   : std::vector<Image<StorageType>* >(),
00057     _rescale(para, "-PyramidImage"+postfix)
00058 {
00059   _PyramidSize=NULL;
00060   _RescaleFactor=NULL;
00061   int grp=para.GetFreeGroupID();
00062   _AddParam(para, grp, "-PyramidImage"+postfix);
00063   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "PyramidImage");
00064   _ParamsAllocated=false;
00065   _PositionOffset=0.0;
00066 }
00067
00068 template <class StorageType>
00069 PyramidImage<StorageType>::
00070 PyramidImage(Param& para, const int grp, const std::string& postfix)
00071   : std::vector<Image<StorageType>* >(),
00072     _rescale(para, grp, "-PyramidImage"+postfix)
00073 {
00074   _PyramidSize=NULL;
00075   _RescaleFactor=NULL;
00076   _AddParam(para, grp, "-PyramidImage"+postfix);
00077   _ParamsAllocated=false;
00078   _PositionOffset=0.0;
00079 }
00080
00081 template <class StorageType>
00082 PyramidImage<StorageType>::
00083 PyramidImage(const PyramidImage<StorageType>& pim)
00084 {
00085   _PyramidSize=NULL;
00086   _RescaleFactor=NULL;
00087   *this=pim;
00088 }
00089
00090 template <class StorageType>
00091 PyramidImage<StorageType>::~PyramidImage()
00092 {
00093   clear();
00094   if (_ParamsAllocated){
00095     delete _PyramidSize;
00096     delete _RescaleFactor;
00097   }
00098 }
00099
00100 template <class StorageType>
00101 void PyramidImage<StorageType>::
00102 Init(const Image<StorageType>& image)
00103 {
00104 #ifdef BIAS_DEBUG
00105   if (this->size()!=0){
00106     BIASERR("do not call init more than once");
00107     BIASABORT;
00108   }
00109 #endif
00110
00111   // this prepares that more pyramid levels may be added later
00112   // double smallerimagesize = image.GetWidth();
00113   // if (smallerimagesize>image.GetHeight())
00114   //   smallerimagesize = image.GetHeight();
00115   // reserve(int(log(smallerimagesize+1.0)/log(2.0))+1);
00116
00117   const int size=*_PyramidSize;
00118   if (size>0){
00119     Image<StorageType> *L0 = new Image<StorageType>(image);
00120     push_back(L0);
00121     this->resize(size);
00122     _CreateLevels();
00123   }
00124 }
00125
00126 template <class StorageType>
00127 void PyramidImage<StorageType>::
00128 Init(unsigned width, unsigned height, unsigned channelcount)
00129 {
00130 #ifdef BIAS_DEBUG
00131   if (this->size()!=0){
00132     BIASERR("do not call init more than once");
00133     BIASABORT;
00134   }
00135 #endif
00136   unsigned int newwidth=0, newheight=0;
00137   double pyfac=1.0;
00138   const int size=*_PyramidSize;
00139   const double factor=*_RescaleFactor;
00140
00141   for (int i=0; i<size; i++){
00142     newwidth = (unsigned int)rint((double)width / pyfac);
00143     newheight = (unsigned int)rint((double)height / pyfac);
00144     Image<StorageType> *L =
00145       new Image<StorageType>(newwidth, newheight, channelcount);
00146     push_back(L);
00147     _vFactor.push_back(pyfac);
00148     pyfac*=factor;
00149   }
00150 }
00151
00152 template <class StorageType>
00153 void PyramidImage<StorageType>::clear()
00154 {
00155   typename vector<Image<StorageType>* >::iterator it;
00156   int i=0;
00157   for (it=this->begin(); it!=this->end(); it++){
00158     if (!(*it)->IsEmpty()) {
00159       (*it)->Release();
00160     }
00161     if ((*it) != NULL) {
00162       delete (*it);
00163       (*it)=NULL;
00164     }
00165     i++;
00166   }
00167   std::vector<Image<StorageType>* >::clear();
00168   _vFactor.clear();
00169   _PositionOffset=0.0;
00170 }
00171
00172 template <class StorageType>
00173 PyramidImage<StorageType>&
00174 PyramidImage<StorageType>::
00175 operator=(const PyramidImage<StorageType>& pim)
00176 {
00177 #ifdef BIAS_DEBUG
00178   if (this->size()!=0){
00179     BIASERR("possible memory leak, assigning to a non empty pyramid image");
00180   }
00181 #endif
00182   _rescale=pim._rescale;
00183   if (_ParamsAllocated){
00184     if (_PyramidSize) { delete _PyramidSize; _PyramidSize=NULL; }
00185     if (_RescaleFactor) { delete _RescaleFactor; _RescaleFactor=NULL; }
00186   }
00187   _ParamsAllocated=pim._ParamsAllocated;
00188   if (_ParamsAllocated){
00189     _PyramidSize=new int;
00190     _PyramidSize=pim._PyramidSize;
00191     _RescaleFactor=new double;
00192     _RescaleFactor=pim._RescaleFactor;
00193   } else {
00194    _PyramidSize=pim._PyramidSize;
00195    _RescaleFactor=pim._RescaleFactor;
00196   }
00197   _vFactor = pim.GetFactors();
00198
00199   if (this->size()!=0) clear();
00200   this->resize(pim.size());
00201   typename PyramidImage<StorageType>::iterator it;
00202   typename PyramidImage<StorageType>::const_iterator cit;
00203
00204   for (it=this->begin(), cit=pim.begin();
00205        it!=this->end() && cit!=pim.end(); it++, cit++){
00206     *it = new Image<StorageType>(*(*cit));
00207   }
00208   _PositionOffset=pim.GetPositionOffset();
00209
00210   return *this;
00211 }
00212
00213 /////////////////////////////////////////////////////////////////////////////
00214
00215 template <class StorageType>
00216 int PyramidImage<StorageType>::
00217 Downsample()
00218 {
00219   int res=0;
00220   typename vector<Image<StorageType>* >::iterator it, lastit;
00221   for (lastit=this->begin(), it=lastit+1;
00222        it!=this->end() && lastit!=this->end(); it++, lastit++)
00223     res += _rescale.Downsample(*(*lastit), *(*it));
00224
00225   _PositionOffset= _rescale.GetPositionOffset();
00226   return res;
00227 }
00228
00229 template <class StorageType>
00230 void PyramidImage<StorageType>::
00231 SetUID(BIAS::UUID uid)
00232 {
00233   typename PyramidImage<StorageType>::iterator it;
00234   for (it=this->begin(); it!=this->end(); it++)
00235     (*it)->SetUID(uid);
00236 }
00237
00238
00239 template <class StorageType>
00240 int PyramidImage<StorageType>::
00241 SetROI(unsigned minx, unsigned miny, unsigned maxx, unsigned maxy)
00242 {
00243   typename PyramidImage<StorageType>::iterator it;
00244   for (it=this->begin(); it!=this->end(); it++){
00245     if ((*it)->GetROI()->SetCorners(minx, miny, maxx, maxy)!=0){
00246       return -1;
00247     }
00248     minx=(unsigned)floor(minx / *_RescaleFactor);
00249     miny=(unsigned)floor(miny / *_RescaleFactor);
00250     maxx=(unsigned)floor(maxx / *_RescaleFactor);
00251     maxy=(unsigned)floor(maxy / *_RescaleFactor);
00252   }
00253   return 0;
00254 }
00255
00256 template <class StorageType>
00257 void PyramidImage<StorageType>::
00258 SetZero()
00259 {
00260   typename PyramidImage<StorageType>::iterator it;
00261   for (it=this->begin(); it!=this->end(); it++){
00262     (*it)->SetZero();
00263   }
00264 }
00265
00266 template <class StorageType>
00267 void PyramidImage<StorageType>::
00268 GetSingleImage(Image<StorageType>& im) const
00269 {
00270   unsigned size=(*this).size();
00271   if (size==1){
00272     im=*(*this)[0];
00273   } else if (size>1) {
00274     //SetDebugLevel(GetDebugLevel() | D_PYRAMID_SINGLE_IM);
00275     register unsigned int i=0, j=0, h=0;
00276     unsigned int width=(*this)[0]->GetWidth()+
00277       (*this)[1]->GetWidth()+PYRAMID_BORDER;
00278     unsigned int height=(*this)[0]->GetHeight();
00279     unsigned int height2=0;
00280
00281     StorageType ***pida=new StorageType**[size];
00282     unsigned *widthstep=new unsigned[size];
00283     unsigned *pwidth = new unsigned[size];
00284     unsigned *pheight=new unsigned[size];
00285     unsigned cc=(*this)[0]->GetChannelCount();
00286
00287     for (i=0; i<size; i++){
00288       pida[i]=(*this)[i]->GetImageDataArray();
00289       widthstep[i]=(*this)[i]->GetWidthStep();
00290       pwidth[i]=(*this)[i]->GetWidth();
00291       pheight[i]=(*this)[i]->GetHeight();
00292       BIASCDOUT(D_PYRAMID_SINGLE_IM, "pida[i]: "<< pida[i] << "\t"
00293                 <<(*this)[i]->GetImageDataArray()<<"\t"<<widthstep[i]
00294                 <<"\t"<<pheight[i]<<endl);
00295     }
00296     // calculate the height of images 1- including border
00297     for (i=1; i<size; i++)
00298       height2+=(pheight[i]+PYRAMID_BORDER);
00299     if (height2>height) height=height2;
00300     // init image
00301     if (im.GetWidth()!=width || im.GetHeight()!=height ||
00302         im.GetChannelCount()!=(*this)[0]->GetChannelCount()) {
00303       im.Release();
00304       im.Init(width, height, (*this)[0]->GetChannelCount());
00305     }
00306     im.FillImageWithConstValue((StorageType)PYRAMID_BACKGROUND);
00307     StorageType **ida = im.GetImageDataArray();
00308
00309     BIASCDOUT(D_PYRAMID_SINGLE_IM,"width: "<<width<<"\theight: "
00310               <<height<<endl);
00311
00312     h=0;
00313     for (j=1; j<size; j++){
00314       for (i=0; i<pheight[j]; i++){
00315         // copy biggest image
00316         if (i+h<pheight[0])
00317           memcpy((void *)(ida[i+h]), (void *)(pida[0][i+h]), widthstep[0]);
00318         // copy j-biggest image
00319         memcpy((void *)(ida[i+h]+pwidth[0]+PYRAMID_BORDER*cc),
00320                (void *)(pida[j][i]),widthstep[j]);
00321       }
00322       for (i=0; i< PYRAMID_BORDER; i++)
00323         if (i+pheight[j]+h<pheight[0])
00324           memcpy((void *)(ida[i+pheight[j]+h]),
00325                  (void *)(pida[0][i+pheight[j]+h]),
00326                  widthstep[0]);
00327       h+=pheight[j]+PYRAMID_BORDER;
00328     }
00329     for (i=h; i<(*this)[0]->GetHeight(); i++){
00330       memcpy((void *)ida[i], pida[0][i], widthstep[0]);
00331     }
00332     delete[] pida;
00333     delete[] widthstep;
00334     delete[] pwidth;
00335     delete[] pheight;
00336   }
00337 }
00338
00339
00340 ////////////////////////////////////////////////////////////////////////////
00341 //                private functions
00342 ////////////////////////////////////////////////////////////////////////////
00343
00344 template <class StorageType>
00345 void PyramidImage<StorageType>::
00346 _CreateLevels()
00347 {
00348   const double factor=*_RescaleFactor;
00349
00350   int res = 0;
00351   double pyfac=1.0;
00352   _vFactor.push_back(pyfac);
00353   typename vector<Image<StorageType>* >::iterator it, lastit;
00354   for (lastit=this->begin(), it=lastit+1;
00355        it!=this->end() && lastit!=this->end(); it++, lastit++){
00356     if ((*it)==NULL) (*it) = new Image<StorageType>();
00357     else if (!(*it)->IsEmpty()) (*it)->Release();
00358     if ((res=_rescale.Filter(*(*lastit), *(*it)))!=0){
00359       BIASERR("filter did not succeed "<<res);
00360       BIASABORT;
00361     }
00362     pyfac*=factor;
00363     _vFactor.push_back(pyfac);
00364   }
00365   _PositionOffset = _rescale.GetPositionOffset();
00366 }
00367
00368 template <class StorageType>
00369 void PyramidImage<StorageType>::
00370 _AddParam(Param& para, const int grp, const std::string& postfix)
00371 {
00372   //para.ShowData();
00373   if (para.CheckParam("PyramidSize"+postfix)){
00374     _PyramidSize=para.GetParamInt("PyramidSize"+postfix);
00375   } else {
00376     _PyramidSize=para.AddParamInt("PyramidSize"+postfix,
00377                                   "number of images in PyramidImage",
00378                                   4, 0, INT_MAX, 0, grp);
00379   }
00380
00381   /////////////////////////////////////////////////////////////////////////
00382
00383   _RescaleFactor=para.GetParamDouble("Factor-Rescale"+postfix);
00384
00385 }
00386
00387 template <class StorageType>
00388 int PyramidImage<StorageType>::
00389 WriteImages(const std::string& prefix)
00390 {
00391   int res=0;
00392   const int psize=this->size();
00393   ostringstream os;
00394   for (int i=0; i<psize; i++){
00395     os.str("");
00396     os << prefix << "-pl"<<i<<".mip";
00397     if ((res=ImageIO::Write(os.str(), *((*this)[i])))!=0){
00398       BIASERR("error writing "<<os.str());
00399       break;
00400     }
00401   }
00402   return res;
00403 }
00404
00405 //////////////////////////////////////////////////////////////////////////
00406 //                 instantiation
00407 //////////////////////////////////////////////////////////////////////////
00408
00409 template class PyramidImage<unsigned char>;
00410 template class PyramidImage<float>;
00411
00412 #ifdef BUILD_IMAGE_INT
00413 template class PyramidImage<int>;
00414 #endif
00415 #ifdef BUILD_IMAGE_CHAR
00416 template class PyramidImage<char>;
00417 #endif
00418 #ifdef BUILD_IMAGE_SHORT
00419 template class PyramidImage<short>;
00420 #endif
00421 #ifdef BUILD_IMAGE_USHORT
00422 template class PyramidImage<unsigned short>;
00423 #endif
00424 #ifdef BUILD_IMAGE_UINT
00425 template class PyramidImage<unsigned int>;
00426 #endif
00427 #ifdef BUILD_IMAGE_DOUBLE
00428 template class PyramidImage<double>;
00429 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/PyramidImage.hh Source File

Image

PyramidImage.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __PYRAMID_HH__
00027 #define __PYRAMID_HH__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <Base/Image/Image.hh>
00032 #include <Utils/Param.hh>
00033 #include <Filter/Rescale.hh>
00034
00035 #include <float.h>
00036 #include <vector>
00037
00038 // for GetSingleImage
00039 // border between pyramid level and fill color
00040 #define PYRAMID_BORDER 2
00041 #define PYRAMID_BACKGROUND 0
00042
00043 #define D_PYRAMID_CREATE      0x00000001
00044 #define D_PYRAMID_SINGLE_IM  0x00000002
00045
00046 namespace BIAS
00047 {
00048   /** @class PyramidImage
00049       @ingroup g_image
00050       @brief class for holding downsampled images
00051
00052       pointer to the images are held in this class
00053       @author woelk 09/2004 */
00054   template <class StorageType>
00055   class BIASImage_EXPORT PyramidImage : public std::vector<Image<StorageType>* >, public Debug
00056   {
00057
00058   public:
00059     PyramidImage();
00060
00061     PyramidImage(Param& para, const std::string& postfix="");
00062
00063     PyramidImage(Param& para, const int grp, const std::string& postfix);
00064
00065     PyramidImage(const PyramidImage<StorageType>& pim);
00066
00067     ~PyramidImage();
00068
00069     /**
00070         @author woelk 09/2004 */
00071     void Init(const Image<StorageType>& image);
00072
00073     /**
00074         @author woelk 09/2004 */
00075     void Init(unsigned int width, unsigned int height,
00076               unsigned int channelcount);
00077
00078     /** also deletes images
00079         @author woelk 09/2004 */
00080     void clear();
00081
00082     inline void Release() { clear(); }
00083
00084     /**
00085         @author woelk 09/2004 */
00086     PyramidImage<StorageType>&
00087     operator=(const PyramidImage<StorageType>& pim);
00088
00089     /** downsamples from (*this)[0]
00090         assumes that all pointers e.g. (*this)[1] are valid
00091         and point to an image of correct size
00092         returns 0 on success, anything else on failure
00093         @author woelk */
00094     int Downsample();
00095
00096     /** returns a single image containing all pyramid images
00097         @author woelk 09/2004 */
00098     void GetSingleImage(Image<StorageType>& im) const;
00099
00100     void SetUID(BIAS::UUID uid);
00101
00102     /** set the ROI for all images */
00103     int SetROI(unsigned minx, unsigned miny, unsigned maxx, unsigned maxy);
00104
00105     inline bool IsEmpty() { return (this->size() == 0); }
00106
00107     /** @brief sets all pixels in all images to zero
00108         @author woelk 10/2004 */
00109     void SetZero();
00110
00111     /** @brief writes a file in mip format per pyramid level using prefix
00112         @author woelk 10/2004 */
00113     int WriteImages(const std::string& prefix);
00114
00115     /////////////////////////////////////////////////////////////////////////
00116     //              get/set functions
00117     /////////////////////////////////////////////////////////////////////////
00118
00119     inline void SetRescaleFactor(const double factor)
00120     { *_RescaleFactor=factor; _rescale.SetFactor(factor); }
00121
00122     inline double GetRescaleFactor() const { return *_RescaleFactor; }
00123
00124     inline void SetPyramidSize(const int size) { *_PyramidSize=size; }
00125
00126     inline int GetPyramidSize() const { return *_PyramidSize; }
00127
00128     inline void SetLowPassType(const int lptype)
00129     { _rescale.SetLowPassType(lptype); }
00130
00131     inline int GetLowPassType() const { return _rescale.GetLowPassType(); }
00132
00133     inline std::vector<double> GetFactors() const { return _vFactor; };
00134
00135     inline std::vector<double>& GetFactors() { return _vFactor; };
00136
00137     /// @author woelk, see _PostionOffset for details
00138     inline double GetPositionOffset() const { return _PositionOffset; };
00139
00140   protected:
00141     // rescale filter for downsampling
00142     Rescale<StorageType, StorageType> _rescale;
00143
00144     bool _ParamsAllocated;
00145     // param
00146     int *_PyramidSize;
00147     // the param of the rescale filter
00148     double *_RescaleFactor;
00149
00150     // _vFactor[i] is the dowsampling factor from (*this)[0] -> (*this)[i]
00151     std::vector<double> _vFactor;
00152
00153     /** Offset which needs to be used when transferring point locations
00154         between pyramid levels:
00155
00156         (2*xs+offset, 2*ys+offset) = (xb, yb) or
00157         (xs, ys) = ((xb-offset)/2.0, (yb-offset)/2.0)
00158
00159         where (xs, ys) is the pixel position in pixel coo. the smaller
00160         destination image and (xb, yb) is the position in pixel coo. in the
00161         bigger source image.
00162
00163         see Rescale::DowsampleBy2 for details
00164         @author woelk 05/2005 */
00165     double _PositionOffset;
00166
00167     /** creates the levels by downsampling from (*this)[0] */
00168     void _CreateLevels();
00169
00170     void _AddParam(Param& para, const int grp, const std::string& postfix);
00171
00172   };
00173
00174 } // namespace BIAS
00175
00176
00177 #include <Base/Common/BIASpragmaEnd.hh>
00178
00179 #endif
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/qr.h Source File

Base » Math » tnt

qr.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033 #ifndef QR_H
00034 #define QR_H
00035
00036 // Classical QR factorization example, based on Stewart[1973].
00037 //
00038 //
00039 // This algorithm computes the factorization of a matrix A
00040 // into a product of an orthognal matrix (Q) and an upper triangular
00041 // matrix (R), such that QR = A.
00042 //
00043 // Parameters:
00044 //
00045 //  A   (in):       Matrix(1:N, 1:N)
00046 //
00047 //  Q   (output):   Matrix(1:N, 1:N), collection of Householder
00048 //                      column vectors Q1, Q2, ... QN
00049 //
00050 //  R   (output):   upper triangular Matrix(1:N, 1:N)
00051 //
00052 // Returns:
00053 //
00054 //  0 if successful, 1 if A is detected to be singular
00055 //
00056
00057
00058 #include <cmath>      //for sqrt() & fabs()
00059 #include "tntmath.h"  // for sign()
00060
00061 // Classical QR factorization, based on Stewart[1973].
00062 //
00063 //
00064 // This algorithm computes the factorization of a matrix A
00065 // into a product of an orthognal matrix (Q) and an upper triangular
00066 // matrix (R), such that QR = A.
00067 //
00068 // Parameters:
00069 //
00070 //  A   (in/out):  On input, A is square, Matrix(1:N, 1:N), that represents
00071 //                  the matrix to be factored.
00072 //
00073 //                 On output, Q and R is encoded in the same Matrix(1:N,1:N)
00074 //                 in the following manner:
00075 //
00076 //                  R is contained in the upper triangular section of A,
00077 //                  except that R's main diagonal is in D.  The lower
00078 //                  triangular section of A represents Q, where each
00079 //                  column j is the vector  Qj = I - uj*uj'/pi_j.
00080 //
00081 //  C  (output):    vector of Pi[j]
00082 //  D  (output):    main diagonal of R, i.e. D(i) is R(i,i)
00083 //
00084 // Returns:
00085 //
00086 //  0 if successful, 1 if A is detected to be singular
00087 //
00088
00089 namespace TNT
00090 {
00091
00092 template <class MaTRiX, class Vector>
00093 int QR_factor(MaTRiX &A, Vector& C, Vector &D)
00094 {
00095     assert(A.lbound() == 1);        // ensure these are all
00096     assert(C.lbound() == 1);        // 1-based arrays and vectors
00097     assert(D.lbound() == 1);
00098
00099     Subscript M = A.num_rows();
00100     Subscript N = A.num_cols();
00101
00102     assert(M == N);                 // make sure A is square
00103
00104     Subscript i,j,k;
00105     typename MaTRiX::element_type eta, sigma, sum;
00106
00107     // adjust the shape of C and D, if needed...
00108
00109     if (N != C.size())  C.newsize(N);
00110     if (N != D.size())  D.newsize(N);
00111
00112     for (k=1; k<N; k++)
00113     {
00114         // eta = max |M(i,k)|,  for k <= i <= n
00115         //
00116         eta = 0;
00117         for (i=k; i<=N; i++)
00118         {
00119             double absA = fabs(A(i,k));
00120             eta = ( absA >  eta ? absA : eta );
00121         }
00122
00123         if (eta == 0)           // matrix is singular
00124         {
00125             cerr << "QR: k=" << k << "\n";
00126             return 1;
00127         }
00128
00129         // form Qk and premiltiply M by it
00130         //
00131         for(i=k; i<=N; i++)
00132             A(i,k)  = A(i,k) / eta;
00133
00134         sum = 0;
00135         for (i=k; i<=N; i++)
00136             sum = sum + A(i,k)*A(i,k);
00137         sigma = sign(A(k,k)) *  sqrt(sum);
00138
00139
00140         A(k,k) = A(k,k) + sigma;
00141         C(k) = sigma * A(k,k);
00142         D(k) = -eta * sigma;
00143
00144         for (j=k+1; j<=N; j++)
00145         {
00146             sum = 0;
00147             for (i=k; i<=N; i++)
00148                 sum = sum + A(i,k)*A(i,j);
00149             sum = sum / C(k);
00150
00151             for (i=k; i<=N; i++)
00152                 A(i,j) = A(i,j) - sum * A(i,k);
00153         }
00154
00155         D(N) = A(N,N);
00156     }
00157
00158     return 0;
00159 }
00160
00161 // modified form of upper triangular solve, except that the main diagonal
00162 // of R (upper portion of A) is in D.
00163 //
00164 template <class MaTRiX, class Vector>
00165 int R_solve(const MaTRiX &A, /*const*/ Vector &D, Vector &b)
00166 {
00167     assert(A.lbound() == 1);        // ensure these are all
00168     assert(D.lbound() == 1);        // 1-based arrays and vectors
00169     assert(b.lbound() == 1);
00170
00171     Subscript i,j;
00172     Subscript N = A.num_rows();
00173
00174     assert(N == A.num_cols());
00175     assert(N == D.dim());
00176     assert(N == b.dim());
00177
00178     typename MaTRiX::element_type sum;
00179
00180     if (D(N) == 0)
00181         return 1;
00182
00183     b(N) = b(N) /
00184             D(N);
00185
00186     for (i=N-1; i>=1; i--)
00187     {
00188         if (D(i) == 0)
00189             return 1;
00190         sum = 0;
00191         for (j=i+1; j<=N; j++)
00192             sum = sum + A(i,j)*b(j);
00193         b(i) = ( b(i) - sum ) /
00194             D(i);
00195     }
00196
00197     return 0;
00198 }
00199
00200
00201 template <class MaTRiX, class Vector>
00202 int QR_solve(const MaTRiX &A, const Vector &c, /*const*/ Vector &d,
00203         Vector &b)
00204 {
00205     assert(A.lbound() == 1);        // ensure these are all
00206     assert(c.lbound() == 1);        // 1-based arrays and vectors
00207     assert(d.lbound() == 1);
00208
00209     Subscript N=A.num_rows();
00210
00211     assert(N == A.num_cols());
00212     assert(N == c.dim());
00213     assert(N == d.dim());
00214     assert(N == b.dim());
00215
00216     Subscript i,j;
00217     typename MaTRiX::element_type sum, tau;
00218
00219     for (j=1; j<N; j++)
00220     {
00221         // form Q'*b
00222         sum = 0;
00223         for (i=j; i<=N; i++)
00224             sum = sum + A(i,j)*b(i);
00225         if (c(j) == 0)
00226             return 1;
00227         tau = sum / c(j);
00228        for (i=j; i<=N; i++)
00229             b(i) = b(i) - tau * A(i,j);
00230     }
00231     return R_solve(A, d, b);        // solve Rx = Q'b
00232 }
00233
00234 } // namespace TNT
00235
00236 #endif
00237 // QR_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Quadric3D.cpp Source File

Geometry

Quadric3D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Quadric3D.hh"
00027 #include <climits>
00028
00029 #define SVD_ZERO_THRESH DBL_EPSILON * 16.0
00030
00031 #define SINGULAR_THRESH_INVERSION 1e-20
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036 Quadric3D::Quadric3D(const HomgPoint3D& C,
00037                      const CovMatrix3x3& cov,
00038                      const double &dScale) {
00039   BIAS::Matrix3x3<double> InvCov, Tmp = cov * (dScale * dScale);
00040
00041   int InversionResult = Tmp.Invert(InvCov);
00042   if (InversionResult!=0) {
00043     // degenerate covariance matrix !
00044     SVD CovSVD(Tmp);
00045     Vector<double> S;
00046     S = CovSVD.GetS();
00047     Matrix3x3<double> V, UT, SdT;
00048     SdT.SetZero();
00049
00050     if (S[0]<SINGULAR_THRESH_INVERSION)
00051       S[0]=SINGULAR_THRESH_INVERSION;
00052     if (S[1]<SINGULAR_THRESH_INVERSION)
00053       S[1]=SINGULAR_THRESH_INVERSION;
00054     if (S[2]<SINGULAR_THRESH_INVERSION)
00055       S[2]=SINGULAR_THRESH_INVERSION;
00056
00057     SdT[0][0] = 1.0/S[0];
00058     SdT[1][1] = 1.0/S[1];
00059     SdT[2][2] = 1.0/S[2];
00060
00061     V = CovSVD.GetV();
00062     UT = CovSVD.GetU().Transpose();
00063     InvCov = V * SdT * UT;
00064     //cout << "using svd to invert Tmp "<< Tmp<<"\n"<<InvCov<<endl;
00065   }
00066
00067   BIAS::Matrix4x4<double> EllipsoidAtOrigin;
00068   EllipsoidAtOrigin.SetIdentity();
00069   for (unsigned int i=0; i<3; i++) {
00070     for (unsigned int j=0; j<3; j++) {
00071       EllipsoidAtOrigin[i][j] =  InvCov[i][j];
00072     }
00073   }
00074   EllipsoidAtOrigin[3][3] = -1;
00075
00076   Matrix4x4<double> MoveToOrigin;
00077   MoveToOrigin.SetIdentity();
00078
00079   for (int i=0; i<3; i++) {
00080     MoveToOrigin[i][3]  =  -C[i];
00081   }
00082   MoveToOrigin[3][3] = C[3];
00083
00084
00085   (*this) = MoveToOrigin.Transpose() * (EllipsoidAtOrigin * MoveToOrigin);
00086   // Quadric has radii dScale*sigma_i and is centered at point3d now
00087
00088   Normalize();
00089 }
00090
00091 unsigned int Quadric3D::GetSignature() {
00092   // do singular value decomposition of this
00093   SVD svd(*this);
00094   Vector4<double> S;
00095   Matrix4x4<double> VT;
00096   S = BIAS::Vector4<COVMATRIX3X3_TYPE>(svd.GetS());
00097   VT = svd.GetVT();
00098
00099   // now we need the eigenvalues (with sign !)
00100   // compute this by projecting the (normalized) eigenvectors onto their images
00101   Vector4<double> eigenvector, eigenimage;
00102   signed char Signature = 0;
00103   for (unsigned int i=0; i<4; i++) {
00104     // get ith eigenvector and its image
00105     eigenvector = VT.GetRow(i);
00106     eigenimage = (*this)*eigenvector;
00107     // compute scalar product, we are not "thinking" homogenized now
00108     // this is simply an analysis of a 4x4 matrix !
00109     S[i] = eigenimage[0] * eigenvector[0] + eigenimage[1] * eigenvector[1]+
00110       eigenimage[2] * eigenvector[2]+  eigenimage[3] * eigenvector[3];
00111     if (S[i]<-SVD_ZERO_THRESH) Signature--;
00112     else if (S[i]>SVD_ZERO_THRESH) Signature++;
00113   }
00114
00115   // return number of eigenvalues with one sign minus number of eigenvalues
00116   // with opposite sign, choosing signs such that difference is not negative
00117   if (Signature<0) return (unsigned int)(-Signature);
00118   return (unsigned int)Signature;
00119 }
00120
00121 Quadric3D Quadric3D::GetDualQuadric(bool UseSVD) const {
00122   if (UseSVD) {
00123     // we want to be numerically robust
00124     SVD qsvd((*this), SVD_ZERO_THRESH, false);
00125     return (qsvd.Invert());
00126   }
00127
00128   // do it the fast way
00129   const QUADRIC3D_TYPE& a = (*this)[0][0];
00130   const QUADRIC3D_TYPE& b = (*this)[0][1];
00131   const QUADRIC3D_TYPE& c = (*this)[0][2];
00132   const QUADRIC3D_TYPE& d = (*this)[0][3];
00133   const QUADRIC3D_TYPE& e = (*this)[1][1];
00134   const QUADRIC3D_TYPE& f = (*this)[1][2];
00135   const QUADRIC3D_TYPE& g = (*this)[1][3];
00136   const QUADRIC3D_TYPE& h = (*this)[2][2];
00137   const QUADRIC3D_TYPE& i = (*this)[2][3];
00138   const QUADRIC3D_TYPE& k = (*this)[3][3];
00139
00140   // analytical inverse, neglecting determinant
00141   Quadric3D Dual;
00142   Dual[0][0] = 2.0*f*g*i - e*i*i - f*f*k + e*h*k - g*g*h;
00143   Dual[1][0] = Dual[0][1] = d*g*h - d*f*i - c*g*i + b*i*i + c*f*k - b*h*k;
00144   Dual[2][0] = Dual[0][2] = c*g*g + d*e*i - b*g*i - c*e*k + b*f*k  -d*f*g;
00145   Dual[3][0] = Dual[0][3] = b*g*h + d*f*f - d*e*h + c*e*i - b*f*i -c*f*g;
00146   Dual[1][1] = 2.0*c*d*i - a*i*i - c*c*k + a*h*k  -d*d*h;
00147   Dual[2][1] = Dual[1][2] = a*g*i - d*(c*g + b*i - d*f) + b*c*k - a*f*k;
00148   Dual[3][1] = Dual[1][3] = b*d*h - a*g*h + a*f*i - c*(d*f + b*i - c*g);
00149   Dual[2][2] = 2.0*b*d*g - a*g*g - b*b*k + a*e*k - d*d*e;
00150   Dual[3][2] = Dual[2][3] = c*d*e - b*d*f - b*c*g + a*f*g + b*b*i - a*e*i;
00151   Dual[3][3] = 2.0*b*c*f - a*f*f - b*b*h + a*e*h -c*c*e;
00152   return Dual;
00153 }
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Quadric3D.hh Source File

Geometry

Quadric3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __QUADRIC3D_HH__
00027 #define __QUADRIC3D_HH__
00028 #include "bias_config.h"
00029
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Math/Matrix4x4.hh>
00033 #include <Base/Geometry/HomgPoint3D.hh>
00034 #include <Geometry/CovMatrix3x3.hh>
00035
00036 #define QUADRIC3D_TYPE double
00037
00038 // defines for confidence of new inlying measurement, see text below
00039 #define GAUSS3D_CONFIDENCE_20_PERCENT 1.00
00040 #define GAUSS3D_CONFIDENCE_39_PERCENT 1.36
00041 #define GAUSS3D_CONFIDENCE_50_PERCENT 1.54
00042 #define GAUSS3D_CONFIDENCE_68_PERCENT 1.88
00043 #define GAUSS3D_CONFIDENCE_90_PERCENT 2.50
00044 #define GAUSS3D_CONFIDENCE_95_PERCENT 2.79
00045 #define GAUSS3D_CONFIDENCE_99_PERCENT 3.37
00046
00047
00048
00049 namespace BIAS {
00050   /** @class Quadric3D
00051       @ingroup g_geometry
00052       @brief A Quadric as a 4x4 matrix (surface in P3 defined by a quadratic
00053              equation, e.g. a sphere)
00054
00055       Quadric3D is a 4x4 matrix Q, which describes a surface in 3d.
00056       All points x that lie on this surface, fulfill    x^T Q x = 0,
00057       which is a quadratic equation in the components of x.
00058       For quadrics such as spheres or ellipsoids you can check if
00059       a point is inside or outside the quadric using LocatePoint(),
00060       for others you can also get the "side" the point lies relative to the
00061       Quadric.
00062       If the Quadric is a _normalized_ ellipsoid, points inside yield negative
00063       values while LocatePoint computes positive ones for points ouside.
00064
00065       Projective cameras map quadrics to conics (see Conic2D) in the image
00066       plane.
00067
00068       Construction of Quadrics (i.e. ellipsoids) from covariance matrices:
00069       You can construct a Quadric3D from a CovMatrix3x3, the 3d surface
00070       will then represent all points of some constant probability of the
00071       3d-normal distribution. The decision which probability to choose
00072       as a threshold, and thus how large the ellipsoid should become,
00073       depends on the desired probability for a new measurement
00074       to lie inside the quadric.
00075
00076       The standard confidence region is the set of points which lie inside
00077       the ellipsoid defined by main axes' length = sigma_i
00078       The probability that a measurement falls into this region is only 20%.
00079       If you want to increase the confidence that a point falls into your
00080       ellipsoid, you may enlarge the main axes by multiplication with a
00081       constant factor (see 3D column in subsequent table).
00082       For comparison purposes, the coresponding factors for 1D/2D are also
00083       given in the table:
00084
00085
00086       -          1-D  2-D  3-D  Conf(%)
00087       -         0.01 0.14 0.33 .. 01
00088       -         0.06 0.32 0.59 .. 05
00089       -         0.14 0.46 0.76 .. 10
00090       -         0.25 0.66 1.00 .. 20
00091       -         0.52 1.00 1.36 .. 39
00092       -         0.68 1.18 1.54 .. 50
00093       -         1.00 1.52 1.88 .. 68
00094       -         1.64 2.15 2.50 .. 90
00095       -         1.96 2.45 2.79 .. 95
00096       -         2.58 3.04 3.37 .. 99
00097       -         2.81 3.26 3.58 .. 99.5
00098
00099       Suppose you have a covariance matrix and want to create an ellipsoid,
00100       where 99% of new measurements will fall in. In that case you have
00101       to use main axes of length (sigma_i*3.37)
00102
00103       @author koeser 10/2003 */
00104
00105   class BIASGeometry_EXPORT Quadric3D : public Matrix4x4<QUADRIC3D_TYPE>
00106   {
00107
00108   public:
00109     Quadric3D() {};
00110
00111     /** @brief set default matrix values */
00112     explicit Quadric3D(const MatrixInitType& i)
00113       : Matrix4x4<QUADRIC3D_TYPE>(i){};
00114
00115     Quadric3D(const Matrix<QUADRIC3D_TYPE> &M) { (*this) = M; };
00116
00117     /** @brief constructs an ellipsoid around the center C
00118
00119         The covariance matrix's stddevs along the main axes (multiplied by
00120         dSize) are used  as the ellipsoid's radii
00121         for dsize==1 this is the standard confidence region (SCR)
00122         see Kanatani: "Statistical optimization ...", p.122
00123         The probability that the point is in the SCR is about 20%
00124         See doc above for values for other probabilities */
00125     Quadric3D(const HomgPoint3D& C, const CovMatrix3x3& cov,
00126               const double& dScale = GAUSS3D_CONFIDENCE_20_PERCENT);
00127
00128     /** @brief determines if point3D is inside/on/outside the surface
00129
00130         For a normalized ellipsoid,
00131         a negative return value means the point is inside, a positive value
00132         means outside and 0 means exactly on the surface (you
00133         have to use epsilon environments for all tests)
00134         LocatePoint internally computes the difference of Mahalanobis distances
00135         of point3D from the center and a surface point from the center */
00136     inline double LocatePoint(const HomgPoint3D& point3D) const {
00137       return ( point3D *((*this)*point3D) ); }
00138
00139     /** @brief sets trace of upperleft submatrix3x3 to unity */
00140     inline bool Normalize() {
00141       double d = (*this)[0][0]+(*this)[1][1]+(*this)[2][2];
00142       if (fabs(d)<DBL_EPSILON) return false;
00143       (*this) /= d; return true; }
00144
00145     Quadric3D& operator=(const Matrix<QUADRIC3D_TYPE> &M) {
00146       Matrix4x4<QUADRIC3D_TYPE>::operator=(M); return (*this);
00147     }
00148
00149     /** @brief computes the dual quadric (points <-> planes)
00150         @param UseSVD use numerically robust svd or fast analytic inverse
00151         @author koeser 03/2005 */
00152     Quadric3D GetDualQuadric(bool UseSVD = false) const;
00153
00154     /** @brief computes signature of matrix,
00155         (no. of neg. eigenvalues) - (no. of pos. eigenvalues) or vice versa
00156         if there are more pos. eigenvalues */
00157     unsigned int GetSignature();
00158
00159   };
00160
00161
00162 }
00163
00164 #endif
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Quaternion.cpp Source File

Base » Geometry

Quaternion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Quaternion.hh"
00027
00028
00029 using namespace BIAS;
00030 using namespace std;
00031
00032
00033 template<class QUAT_TYPE>
00034 Quaternion<QUAT_TYPE>::~Quaternion()
00035 {}
00036
00037 template<class QUAT_TYPE>
00038 Quaternion<QUAT_TYPE>::Quaternion()
00039 : Vector4<QUAT_TYPE>()
00040 {}
00041
00042
00043 template<class QUAT_TYPE>
00044 Quaternion<QUAT_TYPE>::Quaternion(QUAT_TYPE i, QUAT_TYPE j,
00045                                   QUAT_TYPE k, QUAT_TYPE r)
00046                                   : Vector4<QUAT_TYPE>(i, j, k, r)
00047 {}
00048
00049 template<class QUAT_TYPE>
00050 int Quaternion<QUAT_TYPE>::GetAxisAngle(Vector3<QUAT_TYPE>& axis,
00051                                         QUAT_TYPE& angle) const
00052 {
00053   // nicked from OpenSG
00054   int res=0;
00055   Vector3<QUAT_TYPE> q((*this)[0], (*this)[1], (*this)[2]);
00056   QUAT_TYPE len = QUAT_TYPE(q.NormL2());
00057
00058   if(len > QUATERNION_EPSILON) {
00059     q /= len;
00060     axis[0]  = q[0];
00061     axis[1]  = q[1];
00062     axis[2]  = q[2];
00063     angle = QUAT_TYPE(2.0 * acos((*this)[3]));
00064   } else {
00065     axis[0] = 0.0;
00066     axis[1] = 0.0;
00067     axis[2] = 1.0;
00068     angle = 0.0;
00069   }
00070   return res;
00071 }
00072
00073 template<class QUAT_TYPE>
00074 int Quaternion<QUAT_TYPE>::GetRotationMatrix(BIAS::RMatrixBase& /*R*/) const
00075 {
00076   BIASERR("Quaternion<QUAT_TYPE>::GetRotationMatrix() is deprecated, because"
00077           <<" it returned a TRANSPOSED matrix. To prevent code duplication "
00078           <<" this function will be removed in the future. Check your code."
00079           <<"Use RMatrixBase::SetFromQuaternion instead.");
00080   BIASABORT;
00081   return 1;
00082 }
00083
00084 template<class QUAT_TYPE>
00085 int Quaternion<QUAT_TYPE>::
00086 SetXYZ(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ)
00087 {
00088   Quaternion<QUAT_TYPE> q_x;
00089   Quaternion<QUAT_TYPE> q_y;
00090   Quaternion<QUAT_TYPE> q_z;
00091
00092   q_x.SetValueAsAxisRad( 1.,0.,0.,  radX );
00093   q_y.SetValueAsAxisRad( 0.,1.,0.,  radY );
00094   q_z.SetValueAsAxisRad( 0.,0.,1.,  radZ );
00095
00096   q_z.Mult(q_y);
00097   q_z.Mult(q_x);
00098
00099   (*this) = q_z;
00100
00101   return 0;
00102 }
00103
00104 template<class QUAT_TYPE>
00105 int Quaternion<QUAT_TYPE>::
00106 SetZYX(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ)
00107 {
00108   Quaternion<QUAT_TYPE> q_x;
00109   Quaternion<QUAT_TYPE> q_y;
00110   Quaternion<QUAT_TYPE> q_z;
00111
00112   q_x.SetValueAsAxisRad( 1.,0.,0.,  radX );
00113   q_y.SetValueAsAxisRad( 0.,1.,0.,  radY );
00114   q_z.SetValueAsAxisRad( 0.,0.,1.,  radZ );
00115
00116   q_x.Mult(q_y);
00117   q_x.Mult(q_z);
00118
00119   (*this) = q_x;
00120
00121   return 0;
00122 }
00123
00124
00125 template<class QUAT_TYPE>
00126 Quaternion<QUAT_TYPE>& Quaternion<QUAT_TYPE>::operator=(const Quaternion<QUAT_TYPE>& vec)
00127 {
00128   memcpy((void *)this->data_, (void *)vec.GetData(),
00129     VECTOR4SIZE*sizeof(QUAT_TYPE));
00130   return *this;
00131 }
00132
00133
00134 // instances:
00135 // for Quaternions only these make sense
00136 template class BIASGeometryBase_EXPORT BIAS::Quaternion<float>;
00137 template class BIASGeometryBase_EXPORT BIAS::Quaternion<double>;
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/Quaternion.hh Source File

Base » Geometry

Quaternion.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Quaternion_hh__
00027 #define __Quaternion_hh__
00028
00029 #include <bias_config.h>
00030
00031 #include <Base/Math/Vector4.hh>
00032 #include <Base/Math/Vector3.hh>
00033 #include <Base/Geometry/RMatrixBase.hh>
00034 #include <float.h>
00035 #include <Base/Geometry/QuaternionOperators.hh>
00036
00037 namespace BIAS {
00038
00039 #define QUATERNION_EPSILON 1E-10 // DBL_EPSILON, too small (dherzog)
00040 #define QUATERNION_TYPE double
00041
00042   // forward declaration to avoid mutual inclusion
00043   class RMatrixBase;
00044
00045   /** @class Quaternion
00046       @ingroup g_geometry
00047       @brief class for rotation with axis and angle
00048
00049       Quaternions can be used for rotation around an axis through the
00050       origin by spcecifing the normal direction vector of the axis and
00051       an angle.
00052
00053       The rotation for positive angles is clockwise,
00054       when looking in direction of the axis.
00055
00056       Contains qx=[0], qy=[1], qz=[2], qw=[3].
00057
00058       Not every quaternion describes a rotation.
00059       Only quaternions of the form:
00060
00061       qx = x * sin(phi/2) , which is the imaginary part i
00062
00063       qy = y * sin(phi/2)  , which is the imaginary part j
00064
00065       qz = z * sin(phi/2)  , which is the imaginary part k
00066
00067       qw = cos(phi/2),     , which is the real part
00068
00069       where (x, y, z) is the normalized direction vector of the axis
00070       and phi is the angle of rtoation.
00071
00072       Some usefull quaternions:
00073       x            y            z          w          Description
00074       0            0            0          1          Identity quaternion,
00075                                                       no rotation
00076       1            0            0          0            180' turn around X axis
00077       0            1            0          0            180' turn around Y axis
00078       0            0            1          0            180' turn around Z axis
00079       sqrt(0.5)  0          0          sqrt(0.5)  90' rotation around X axis
00080       0            sqrt(0.5)    0          sqrt(0.5)  90' rotation around Y axis
00081       0            0            sqrt(0.5)  sqrt(0.5)  90' rotation around Z axis
00082       -sqrt(0.5) 0          0          sqrt(0.5)  -90' rotation around X axis
00083       0          -sqrt(0.5) 0          sqrt(0.5)  -90' rotation around Y axis
00084       0            0            -sqrt(0.5) sqrt(0.5)    -90' rotation around Z axis
00085
00086       @author grest 06 2003 */
00087   template<class QUAT_TYPE>
00088   class BIASGeometryBase_EXPORT Quaternion
00089     : public Vector4<QUAT_TYPE>
00090   {
00091   public:
00092     ~Quaternion();
00093
00094     Quaternion();
00095
00096     /** copy constructor
00097         @author Daniel Grest (06/2003)
00098     */
00099     inline Quaternion(const Quaternion<QUAT_TYPE> &q) { *this = q; };
00100
00101     Quaternion(QUAT_TYPE i, QUAT_TYPE j, QUAT_TYPE k,
00102                QUAT_TYPE r);
00103
00104
00105
00106     inline void SetIdentity();
00107
00108     /** returns the Inverse rotation Quaternion
00109      */
00110     inline Quaternion<QUAT_TYPE> Inverse() const;
00111
00112     /** inverts this, by changing the rotation axis by *=-1
00113      */
00114     inline void Invert();
00115
00116     /** quaternion multiplication: this= this * quat
00117      */
00118     inline void Mult(const Quaternion<QUAT_TYPE> &quat);
00119
00120     /** quaternion multiplication: res = this * arg
00121      */
00122     inline void Mult(const Quaternion<QUAT_TYPE> &arg,
00123                      Quaternion<QUAT_TYPE> &res) {
00124       res = *this;
00125       res.Mult(arg);
00126     }
00127
00128     /** quaternion multiplication: this = quat * this
00129      */
00130     inline void MultLeft(const Quaternion<QUAT_TYPE> &quat);
00131
00132     /** rotates the given Vector qith the quaternion ( q v q* )
00133         the resulting vector is given in res
00134         @returns 0 in case of no error
00135         @author Daniel Grest, June 2003
00136     */
00137     inline int MultVec(const Vector3<QUAT_TYPE> &vec,
00138                        Vector3<QUAT_TYPE> &res) const;
00139
00140     /* rets result from MultVec()
00141        @author herzog 2005-07-15 */
00142     inline  Vector3<QUAT_TYPE>
00143         MultVec(const Vector3<QUAT_TYPE> &vec) const
00144     {
00145         Vector3<QUAT_TYPE> r; MultVec(vec,r);
00146         return r;
00147     }
00148
00149     /** sets the quaternion with given rotation axis and angle (in rad)
00150         @returns 0 in case of no error
00151         @author Daniel Grest, June 2003
00152     */
00153     inline void SetValueAsAxisRad(const Vector3<QUAT_TYPE> &axis,
00154                                   QUAT_TYPE angle);
00155
00156     /** sets the quaternion with given rotation axis and angle (in rad)
00157         @returns 0 in case of no error
00158         @author Daniel Grest, June 2003
00159     */
00160
00161     inline void SetValueAsAxisRad(QUAT_TYPE axisX, QUAT_TYPE axisY,
00162                                   QUAT_TYPE axisZ, QUAT_TYPE angle);
00163
00164     /** returns a corresponding (quaternion) rotation matrix
00165         @deprecated Transpose problem !!! This function is going to be removed
00166         Use RMatrixBase::SetFromQuaternion instead.
00167         @author grest */
00168     int GetRotationMatrix(RMatrixBase& R) const;
00169
00170     /** returns rotation in axis and angle notation, angle in rad
00171         @author woelk 12 2002 */
00172     int GetAxisAngle(Vector3<QUAT_TYPE>& axis, QUAT_TYPE& angle) const;
00173
00174     /** sets quaternion as concatenated rotations around
00175     x,y,z-axis in order x,y,z (OpenSG conform)
00176         @author herzog 2005-07-19 */
00177     int SetXYZ(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ);
00178
00179     /** sets quaternion as concatenated rotations around
00180     x,y,z-axis in order z,x,y (OpenSG conform)
00181     @author herzog 2005-07-19 */
00182     int SetZYX(QUAT_TYPE radX, QUAT_TYPE radY, QUAT_TYPE radZ);
00183
00184
00185     /** scale vector4 so that norm = 1
00186         The use of this is questionable...  who wrote this? (grest)
00187     */
00188     inline void Normalize() {
00189       (*this) /= (QUAT_TYPE)this->NormL2();
00190     }
00191
00192
00193     /** assignment operator
00194         @author grest 06 2003 */
00195     Quaternion<QUAT_TYPE>& operator=(const Quaternion<QUAT_TYPE>& vec);
00196
00197   }; // class
00198
00199   #include <Base/Geometry/QuaternionInl.hh>
00200
00201 } // namespace
00202
00203 #endif // __Quaternion_hh__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/QuaternionInl.hh Source File

Base » Geometry

QuaternionInl.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 template <class QUAT_TYPE>
00027 inline void Quaternion<QUAT_TYPE>::SetIdentity()
00028 {
00029   (*this)[0] = (*this)[1] = (*this)[2] = 0;
00030   (*this)[3] = 1;
00031 }
00032
00033 template <class QUAT_TYPE>
00034 inline void Quaternion<QUAT_TYPE>::Mult(const Quaternion<QUAT_TYPE> &quat)
00035 {
00036   QUAT_TYPE s1, s2, s3, s4, s5, s6, s7, s8, s9, t;
00037   QUAT_TYPE *qThis = this->GetData();
00038
00039   s1 = (qThis[2] - qThis[1]) * (quat[1] - quat[2]);
00040   s2 = (qThis[3] + qThis[0]) * (quat[3] + quat[0]);
00041   s3 = (qThis[3] - qThis[0]) * (quat[1] + quat[2]);
00042   s4 = (qThis[2] + qThis[1]) * (quat[3] - quat[0]);
00043   s5 = (qThis[2] - qThis[0]) * (quat[0] - quat[1]);
00044   s6 = (qThis[2] + qThis[0]) * (quat[0] + quat[1]);
00045   s7 = (qThis[3] + qThis[1]) * (quat[3] - quat[2]);
00046   s8 = (qThis[3] - qThis[1]) * (quat[3] + quat[2]);
00047
00048   s9 = s6 + s7 + s8;
00049
00050   t  = (s5 + s9) / 2.0f;
00051
00052   qThis[3] = s1 + t - s6;
00053   qThis[0] = s2 + t - s9;
00054   qThis[1] = s3 + t - s8;
00055   qThis[2] = s4 + t - s7;
00056 }
00057
00058 template <class QUAT_TYPE>
00059 inline void Quaternion<QUAT_TYPE>::MultLeft(const Quaternion<QUAT_TYPE> &quatLeft)
00060 {
00061   QUAT_TYPE s1, s2, s3, s4, s5, s6, s7, s8, s9, t;
00062   QUAT_TYPE *qThis = this->GetData();
00063
00064   s1 = (quatLeft[2] - quatLeft[1]) * (qThis[1] - qThis[2]);
00065   s2 = (quatLeft[3] + quatLeft[0]) * (qThis[3] + qThis[0]);
00066   s3 = (quatLeft[3] - quatLeft[0]) * (qThis[1] + qThis[2]);
00067   s4 = (quatLeft[2] + quatLeft[1]) * (qThis[3] - qThis[0]);
00068   s5 = (quatLeft[2] - quatLeft[0]) * (qThis[0] - qThis[1]);
00069   s6 = (quatLeft[2] + quatLeft[0]) * (qThis[0] + qThis[1]);
00070   s7 = (quatLeft[3] + quatLeft[1]) * (qThis[3] - qThis[2]);
00071   s8 = (quatLeft[3] - quatLeft[1]) * (qThis[3] + qThis[2]);
00072
00073   s9 = s6 + s7 + s8;
00074
00075   t  = (s5 + s9) / 2.0f;
00076
00077   qThis[3] = s1 + t - s6;
00078   qThis[0] = s2 + t - s9;
00079   qThis[1] = s3 + t - s8;
00080   qThis[2] = s4 + t - s7;
00081 }
00082
00083 /** rotates the given Vector with the quaternion ( q v q* )
00084     the resulting vector is given in res
00085     @returns 0 in case of no error
00086     @author Daniel Grest, June 2003
00087 */
00088 template <class QUAT_TYPE>
00089 inline int Quaternion<QUAT_TYPE>::MultVec(const Vector3<QUAT_TYPE> &vec,
00090                       Vector3<QUAT_TYPE> &res) const {
00091
00092   register QUAT_TYPE rx,ry,rz;
00093   register QUAT_TYPE Vx= vec[0], Vy=vec[1], Vz=vec[2];
00094   const QUAT_TYPE *q = this->GetData();
00095   {
00096     register QUAT_TYPE QwQx, QwQy, QwQz, QxQy, QxQz, QyQz;
00097     QwQx = q[3] * q[0]; QwQy = q[3] * q[1]; QwQz = q[3] * q[2];
00098     QxQy = q[0] * q[1]; QxQz = q[0] * q[2]; QyQz = q[1] * q[2];
00099     rx = 2* (Vy * (-QwQz + QxQy) + Vz *( QwQy + QxQz));
00100     ry = 2* (Vx * ( QwQz + QxQy) + Vz *(-QwQx + QyQz));
00101     rz = 2* (Vx * (-QwQy + QxQz) + Vy *( QwQx + QyQz));
00102   }
00103   register QUAT_TYPE QwQw, QxQx, QyQy, QzQz;
00104   QwQw= q[3]*q[3]; QxQx = q[0]*q[0]; QyQy = q[1]*q[1]; QzQz= q[2]*q[2];
00105   rx+= Vx * (QwQw + QxQx - QyQy - QzQz);
00106   ry+= Vy * (QwQw - QxQx + QyQy - QzQz);
00107   rz+= Vz * (QwQw - QxQx - QyQy + QzQz);
00108   res[0]=rx; res[1]=ry; res[2]=rz;
00109   return 0;
00110 }
00111
00112
00113 template <class QUAT_TYPE>
00114 inline void Quaternion<QUAT_TYPE>::SetValueAsAxisRad(const Vector3<QUAT_TYPE> &axis,
00115                                           QUAT_TYPE angle)
00116 {
00117   SetValueAsAxisRad(axis[0], axis[1], axis[2], angle);
00118 }
00119
00120 template <class QUAT_TYPE> inline void
00121 Quaternion<QUAT_TYPE>::SetValueAsAxisRad(QUAT_TYPE x, QUAT_TYPE y,
00122                               QUAT_TYPE z, QUAT_TYPE w)
00123 {
00124     QUAT_TYPE rTmp = QUAT_TYPE(sqrt(x * x + y * y + z * z));
00125
00126     if(rTmp > QUATERNION_EPSILON)
00127     {
00128       rTmp = QUAT_TYPE(sin(w / 2.0f)) / rTmp;
00129
00130       (*this)[0] = x * rTmp;
00131       (*this)[1] = y * rTmp;
00132       (*this)[2] = z * rTmp;
00133       (*this)[3] = QUAT_TYPE(cos(w / 2.0f));
00134     }
00135     else
00136     {
00137       SetIdentity();
00138     }
00139 }
00140
00141 template <class QUAT_TYPE> inline
00142 Quaternion<QUAT_TYPE> Quaternion<QUAT_TYPE>::Inverse() const {
00143   Quaternion<QUAT_TYPE> res(*this);
00144   res.Invert();
00145   return res;
00146 }
00147
00148 template <class QUAT_TYPE> inline void
00149 Quaternion<QUAT_TYPE>::Invert() {
00150   (*this)[0] *=-1;
00151   (*this)[1] *=-1;
00152   (*this)[2] *=-1;
00153 }
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/QuaternionOperators.hh Source File

Base » Geometry

QuaternionOperators.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __QuaternionOperators_hh__
00027 #define __QuaternionOperators_hh__
00028
00029
00030 namespace BIAS {
00031
00032   // forward declarations to avaoid nested includes
00033   template<class T> class Quaternion;
00034
00035   ////////////////////////////////////////////////////////////////////////////
00036   //      quaternion quaternion operators
00037   ////////////////////////////////////////////////////////////////////////////
00038
00039     /** @relates Quaternion
00040     what it stands for (wraps Mult())
00041     @author herzog 2005-07-15 */
00042   template<class T>
00043   inline Quaternion<T> operator * (const Quaternion<T>& a,
00044                    const Quaternion<T>& b)
00045   {
00046     Quaternion<T> r = a;
00047     r.Mult(b);
00048     return r;
00049   }
00050
00051   /** @relates Quaternion
00052       what it stands for (wraps Mult())
00053       @author herzog 2005-07-15 */
00054   template<class T>
00055   inline Quaternion<T>& operator *= (Quaternion<T>& l,
00056                      const Quaternion<T>& r)
00057   {
00058     l.Mult(r);
00059     return l;
00060   }
00061
00062     /** @relates Quaternion
00063     what it stands for (wraps Mult() and Inverse())
00064     @author herzog 2005-07-15 */
00065   template<class T>
00066   inline Quaternion<T> operator / (const Quaternion<T>& a,
00067                    const Quaternion<T>& b)
00068   {
00069     Quaternion<T> r = a;
00070     r.Mult(b.Inverse());
00071     return r;
00072   }
00073
00074   /** @relates Quaternion
00075       what it stands for (wraps Mult() and Inverse())
00076       @author herzog 2005-07-15 */
00077   template<class T>
00078   inline Quaternion<T>& operator /= (Quaternion<T>& l,
00079                      const Quaternion<T>& r)
00080   {
00081     l.Mult(r.Inverse());
00082     return l;
00083   }
00084
00085
00086 } // namespace
00087
00088
00089
00090 #endif // __QuaternionOperators_hh__
Generated on Wed Jun 21 19:00:49 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Random.cpp Source File

Base » Math

Random.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Random.hh"
00027
00028 #ifdef WIN32
00029 // implement non-standard (double)rint(double x)
00030 #  define rint(x) (floor(x+0.5))
00031 #endif //_WIN32
00032
00033 #include <cmath>
00034 #include <cstdlib>
00035 #include <stdlib.h>
00036 #include <float.h>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 //#define RANDOM_SEED_ZERO_FIXED
00042
00043 // #ifdef RANDOM_SEED_ZERO_FIXED
00044 // #include <fstream>
00045 // namespace BIAS {
00046 //   int rand(void){
00047 //     static std::ofstream os("random.txt");
00048 //     if (!os.good()){ BIASERR("error writing to file "); BIASABORT; }
00049 //     static int num = 0;
00050 //     int ran = ::rand();
00051 //     cout << setw(5) << num << setw(15) << ran << endl << flush;
00052 //     os << setw(5) << num << setw(15) << ran << endl << flush;
00053 //     num++;
00054 //     return ran;
00055 //   }
00056 // }
00057 //#endif
00058
00059 Random::~Random()
00060 {}
00061
00062
00063 Random::Random()
00064   : Seed_(0), Idum_(0), LongIdum_(0)
00065 {
00066   // to avoid nondeterministics by only instantiating a new object
00067   // never call srand() here
00068   // evers 2005-06-30
00069   //  Reset();
00070 #ifdef RANDOM_SEED_ZERO_FIXED
00071   Reset(0);
00072 #endif
00073 }
00074
00075 Random::Random(long int seed)
00076   : Seed_(0), Idum_(0), LongIdum_(0)
00077 {
00078   Reset(seed);
00079 }
00080
00081 static bool first = true;
00082
00083 void Random::Reset(long int seed)
00084 {
00085 #ifdef RANDOM_SEED_ZERO_FIXED
00086   if (!first){
00087     return;
00088   }
00089   first = false;
00090   Seed_ = 0;
00091 #else
00092   first=first; // avoid warning
00093   Seed_ = seed;
00094 #endif
00095   //cout << "srand("<<Seed_<<")\n";
00096   // initialize random source
00097   srand((long int)Seed_);
00098   // initialize seed for ran1_
00099   Idum_=rand();
00100   LongIdum_ = (long)Idum_;
00101   //cerr << "Idum_: " << Idum_ << "\tLongIdum_: "<<LongIdum_<<endl;
00102 }
00103
00104 void Random::Reset()
00105 {
00106 #ifdef RANDOM_SEED_ZERO_FIXED
00107   if (!first){
00108     return;
00109   }
00110   first = false;
00111   Seed_ = 0;
00112 #else
00113     //long int uc;
00114   time_t uc;
00115
00116   // get the seed (seconds since 1.1.1970 0:00)
00117   time(&uc);
00118   Seed_=(unsigned int)(uc);
00119 #endif
00120   //cout << "srand("<<Seed_<<")\n";
00121   // initialize random source
00122   srand( Seed_ );
00123   // initialize seed for ran1_
00124   Idum_=rand();
00125   LongIdum_ = (long)Idum_;
00126   //cerr << "Idum_: " << Idum_ << "\tLongIdum_: "<<LongIdum_<<endl;
00127 }
00128
00129 int Random::GetUniformDistributedInt(int min, int max)
00130 {
00131   return int(min+(double(rand())/(RAND_MAX)*(max-min+1)));
00132   /*
00133   double bin=(double)(1+max-min);
00134   double res = GetUniformDistributed(0.0, 1.0) * bin;
00135   //cerr <<res/bin << " " <<res<<" "<< (int)floor(res)+min << endl;
00136   return (int)floor(res)+min;
00137 */
00138 }
00139
00140 unsigned int
00141 Random::GetUniformDistributedInt(unsigned int min, unsigned int max)
00142 {
00143   double bin=(double)(1+max-min);
00144   double res = GetUniformDistributed(0.0, 1.0) * bin;
00145   //cerr << setprecision(14) << res<<" "<<(unsigned int)floor(res)+min << endl;
00146   return (unsigned int)floor(res)+min;
00147 }
00148
00149
00150 void Random::GetUniformDistributed(double min, double max,
00151                                    int num, double *res)
00152 {
00153   double size=max-min;
00154   for (int i=0; i<num; i++)
00155     res[i]=min + ran2_(&LongIdum_) * size;
00156 }
00157
00158 void Random::GetNormalDistributed(double mean, double sigma,
00159                                   int num, double *res)
00160 {
00161   for (int i=0; i<num; i++)
00162     res[i]=mean + gasdevf_(&LongIdum_) * sigma;
00163 }
00164
00165
00166
00167 int Random::GetNormalDistributed(const Vector2<double>& mean,
00168                                  const Matrix2x2<double>& cov,
00169                                  Vector2<double>& ran)
00170 {
00171   int res=0;
00172
00173   vector<Vector2<double> > vran;
00174   res = GetNormalDistributed(mean, cov, 1, vran);
00175
00176   if (res==0) ran = vran[1];
00177
00178   return res;
00179 }
00180
00181 int Random::GetNormalDistributed(const Vector2<double>& mean,
00182                                  const Matrix2x2<double>& cov,
00183                                  int num, vector<Vector2<double> >& ran)
00184 {
00185   int res=0;
00186   Vector2<double> eigen_vec1, eigen_vec2, tmp_ran;
00187   double eigen_val1, eigen_val2;
00188   int eigen_res =
00189     cov.EigenvalueDecomposition(eigen_val1,eigen_vec1, eigen_val2, eigen_vec2);
00190
00191   //cout << "eignevalues of covariance "<<eigen_val1<<", "<<eigen_val2<<endl;
00192   //cout << "eignevectors of covariance "<<eigen_vec1<<", "<<eigen_vec2<<endl;
00193
00194   Matrix2x2<double> R;
00195   R[0][0] = eigen_vec1[0];
00196   R[1][0] = eigen_vec1[1];
00197   R[0][1] = eigen_vec2[0];
00198   R[1][1] = eigen_vec2[1];
00199   //cout << "R: "<<R<<endl;
00200
00201   double *ran1, *ran2;
00202   ran1 = new double[num];
00203   ran2 = new double[num];
00204
00205   switch (eigen_res){
00206   case 2:
00207     //cout << "2D distribution" << endl;
00208     GetNormalDistributed(0.0, sqrt(eigen_val1), num, ran1);
00209     GetNormalDistributed(0.0, sqrt(eigen_val2), num, ran2);
00210     break;
00211   case 1:
00212     //cout << "pseudo 2D distribution = 1D dsitribution" << endl;
00213     GetNormalDistributed(0.0, sqrt(eigen_val1), num, ran1);
00214     memset((void *)ran2, 0, sizeof(double)*num);
00215     break;
00216   case 0:
00217     BIASERR("not a covariance matrix ("<<eigen_res<<") "<<cov<<endl);
00218     //BIASASSERT(false);
00219     BIASABORT;
00220     //res = -1;
00221     break;
00222   default:
00223     res = eigen_res;
00224     break;
00225   }
00226
00227   if (res>=0){
00228     ran.resize(num);
00229     vector<Vector2<double> >::iterator it;
00230     for (int i=ran.size()-1; i>=0; i--){
00231       ran[i].Set(ran1[i], ran2[i]);
00232       //cout <<"---\nraw: "<< ran[i]<<endl;
00233       ran[i] = R * ran[i];
00234       //cout <<"rot: "<< ran[i]<<endl;
00235       ran[i] += mean;
00236       //cout <<"sht: "<< ran[i]<<endl;
00237
00238     }
00239   }
00240
00241   delete[] ran1;
00242   delete[] ran2;
00243
00244   return res;
00245 }
00246
00247
00248
00249 // from www.nr.com copied from pdf
00250 #define IA 16807
00251 #define IM 2147483647
00252 #define AM (1.0/IM)
00253 #define IQ 127773
00254 #define IR 2836
00255 #define NTAB 32
00256 #define NDIV (1+(IM-1)/NTAB)
00257 #define EPS DBL_EPSILON
00258 #define RNMX (1.0-EPS)
00259 double Random::ran1_(int *idum)
00260 {
00261   int j;
00262   long k;
00263   static long iy=0;
00264   static long iv[NTAB];
00265   float temp;
00266
00267   if (*idum <= 0 || !iy){
00268     if (-(*idum) < 1) *idum = 1;
00269     else *idum = -(*idum);
00270     for (j=NTAB+7; j>=0; j--){
00271       k=(*idum)/IQ;
00272       *idum=IA*(*idum-k*IQ)-IR*k;
00273       if (*idum <0) *idum += IM;
00274       if (j<NTAB) iv[j] = *idum;
00275     }
00276     iy=iv[0];
00277   }
00278   k=(*idum)/IQ;
00279   *idum=IA*(*idum-k*IQ)-IR*k;
00280   if (*idum < 0) *idum += IM;
00281   j=iy/NDIV;
00282   iy=iv[j];
00283   iv[j] = *idum;
00284   if ((temp=float(AM*iy)) > RNMX) return RNMX;
00285   else return temp;
00286 }
00287 #undef IA
00288 #undef IM
00289 #undef AM
00290 #undef IQ
00291 #undef IR
00292 #undef NTAB
00293 #undef NDIV
00294 #undef EPS
00295 #undef RNMX
00296
00297 //from D_RAN1.c
00298 #define M1 259200
00299 #define IA1 7141
00300 #define IC1 54773
00301 #define RM1 (1.0/M1)
00302 #define M2 134456
00303 #define IA2 8121
00304 #define IC2 28411
00305 #define RM2 (1.0/M2)
00306 #define M3 243000
00307 #define IA3 4561
00308 #define IC3 51349
00309 double Random::ran1c_(int *idum)
00310 {
00311   static long ix1,ix2,ix3;
00312   static double r[98];
00313   double temp;
00314   static int iff=0;
00315   int j;
00316   //void nrerror();
00317
00318   if (*idum < 0 || iff == 0) {
00319     iff=1;
00320     ix1=(IC1-(*idum)) % M1;
00321     ix1=(IA1*ix1+IC1) % M1;
00322     ix2=ix1 % M2;
00323     ix1=(IA1*ix1+IC1) % M1;
00324     ix3=ix1 % M3;
00325     for (j=1;j<=97;j++) {
00326       ix1=(IA1*ix1+IC1) % M1;
00327       ix2=(IA2*ix2+IC2) % M2;
00328       r[j]=(ix1+ix2*RM2)*RM1;
00329     }
00330     *idum=1;
00331   }
00332   ix1=(IA1*ix1+IC1) % M1;
00333   ix2=(IA2*ix2+IC2) % M2;
00334   ix3=(IA3*ix3+IC3) % M3;
00335   j=(int)rint(1 + ((97.0*ix3)/M3));
00336   if (j > 97 || j < 1) BIASERR("RAN1: This cannot happen. "<<j);
00337   temp=r[j];
00338   r[j]=(ix1+ix2*RM2)*RM1;
00339   return temp;
00340 }
00341 #undef M1
00342 #undef IA1
00343 #undef IC1
00344 #undef RM1
00345 #undef M2
00346 #undef IA2
00347 #undef IC2
00348 #undef RM2
00349 #undef M3
00350 #undef IA3
00351 #undef IC3
00352
00353 // from D_RAN2.c
00354 #define M 714025
00355 #define IA 1366
00356 #define IC 150889
00357 double Random::ran2_(long *idum)
00358 {
00359   //cout << "idum "<<*idum<<endl;
00360   static long iy=0, ir[98];
00361   static int iff=0;
00362   int j;
00363
00364   BIASASSERT(idum!=NULL);
00365   if ((*idum) < 0 || iff == 0)
00366   {
00367       iff=1;
00368       if (((*idum)=(IC-(*idum)) % M) < 0) *idum = -(*idum);
00369       for (j=1;j<=97;j++) {
00370           *idum=(IA*(*idum)+IC) % M;
00371           ir[j]=(*idum);
00372       }
00373       (*idum) = (IA*(*idum)+IC) % M;
00374       iy=(*idum);
00375   }
00376   j = (int)floor(1 + 97.0*iy / M);
00377   if (j > 97 || j < 1) BIASERR("RAN2: This cannot happen. "<<j);
00378   iy=ir[j];
00379   *idum=(IA*(*idum)+IC) % M;
00380   ir[j]=(*idum);
00381   return (double) iy/M;
00382 }
00383 #undef M
00384 #undef IA
00385 #undef IC
00386
00387 // from D_GASDEV.c
00388 double Random::gasdev_(int *idum)
00389 {
00390   static int iset=0;
00391   static double gset;
00392   double fac,r,v1,v2;
00393
00394   if  (iset == 0) {
00395     do {
00396       v1=2.0*ran1_(idum)-1.0;
00397       v2=2.0*ran1_(idum)-1.0;
00398       r=v1*v1+v2*v2;
00399     } while (r >= 1.0);
00400     fac=sqrt(-2.0*log(r)/r);
00401     gset=v1*fac;
00402     iset=1;
00403     return v2*fac;
00404   } else {
00405     iset=0;
00406     return gset;
00407   }
00408 }
00409
00410 double Random::gasdevf_(long *idum)
00411 {
00412   static int iset=0;
00413   static double gset;
00414   double fac,r,v1,v2;
00415
00416   if  (iset == 0) {
00417     do {
00418       v1=2.0*ran2_(idum)-1.0;
00419       v2=2.0*ran2_(idum)-1.0;
00420       r=v1*v1+v2*v2;
00421     } while (r >= 1.0);
00422     fac=sqrt(-2.0*log(r)/r);
00423     gset=v1*fac;
00424     iset=1;
00425     return v2*fac;
00426   } else {
00427     iset=0;
00428     return gset;
00429   }
00430 }
00431
00432 // from makenois.c
00433 double Random::gasdev3_(int *idum)
00434 {
00435   static int iset=1;
00436   static double gset;
00437   double fac,r,v1,v2;
00438
00439   if (iset) {
00440     do {
00441       v1=2.0*ran1_(idum)-1.0;
00442       v2=2.0*ran1_(idum)-1.0;
00443       r=v1*v1+v2*v2;
00444     } while (r >= 1.0);
00445     fac=sqrt(-2.0*log(r)/r);
00446     gset = v1*fac;
00447     iset = 0;
00448     return v2*fac;
00449   } else {
00450     iset = 1;
00451     return gset;
00452   }
00453 }
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Random.hh Source File

Base » Math

Random.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_Random_hh__
00027 #define __BIAS_Random_hh__
00028
00029 #include <Base/Common/BIASpragmaStart.hh>
00030
00031 #include <ctime>
00032 #include <vector>
00033
00034 #include <Base/Debug/Error.hh>
00035 #include <Base/Debug/Debug.hh>
00036 #include "Vector2.hh"
00037 #include "Matrix2x2.hh"
00038
00039
00040 namespace BIAS{
00041 /** @class Random
00042     @ingroup g_mathalgo
00043     @brief class for producing random numbers from different distributions
00044
00045     IMPORTANT: Problems arise when multiple of these instances are used
00046          since every call to Reset() results in a call to srand() (from
00047          stdlib) with a specific seed. Calling srand() is a global action
00048          that will affect all other instances as well
00049
00050     @author woelk 2002 */
00051   class BIASMathBase_EXPORT Random : public Debug
00052   {
00053   public:
00054     /** initializes vars/seed with deterministic values, NOT calling reset */
00055     Random();
00056
00057     /** calls Reset(seed) and therefore srand() */
00058     Random(long int seed);
00059
00060     ~Random();
00061
00062     /** calls srand() with a seed generated from system call time,
00063        also initializes some other variables */
00064     void Reset();
00065
00066     /** calls srand with seed, also initializes some other variables */
00067     void Reset(long int seed);
00068
00069     /** on succesive calls return normal distributed random variable
00070         with mean and standard deviation sigma */
00071     inline double GetNormalDistributed(double mean, double sigma)
00072     { return (mean + (gasdevf_(&LongIdum_) * sigma)); };
00073
00074     /** calculates num normal ditributed random variables and stores
00075         them in res */
00076     void GetNormalDistributed(double mean, double sigma,
00077                               int num, double *res);
00078
00079     /** on succesive calls return uniform distributed random variable
00080         between min and max */
00081     inline double GetUniformDistributed(double min, double max)
00082     { return (min + (ran2_(&LongIdum_) * (max-min))); };
00083
00084     /** calculates num uniform ditributed random variables and stores
00085         them in res */
00086     void GetUniformDistributed(double min, double max,
00087                                int num, double *res);
00088
00089     /** get uniform distributed random variable
00090         including min/max */
00091     int GetUniformDistributedInt(int min, int max);
00092
00093     /** get uniform distributed random variable
00094         including min/max */
00095     unsigned int GetUniformDistributedInt(unsigned int min, unsigned int max);
00096
00097     /** See GetNormalDistributed().
00098         @author woelk 07/2005 */
00099     int GetNormalDistributed(const Vector2<double>& mean,
00100                              const Matrix2x2<double>& cov,
00101                              Vector2<double>& ran);
00102
00103     /** Generates a vector of length num containing 2D (dependent) normal
00104         distributed random variables. The 2D distribution is described by the
00105         covariance matrix cov.
00106
00107         @returns 0 on success , negative on error
00108         @author woelk 07/2005 */
00109     int GetNormalDistributed(const Vector2<double>& mean,
00110                              const Matrix2x2<double>& cov,
00111                              int num, std::vector<Vector2<double> >& ran);
00112
00113   protected:
00114     unsigned int Seed_;
00115     int Idum_;
00116     long LongIdum_;
00117     /// produces uniform random variable between 0 and 1 exclusive
00118     double ran1_(int *idum); // from nr pdf
00119     double ran1c_(int *idum); // from D_RAN1.c
00120     double ran2_(long *idum); // from D_RAN2.c
00121     /// produces normal distributed random variable with unit variance and
00122     /// zero mean
00123     double gasdev_(int *idum);
00124     // from makenois.c
00125     double gasdev3_(int *idum);
00126     // selbst gebastelt
00127     double gasdevf_(long *idum);
00128   };
00129
00130
00131 } // namespace
00132
00133 #include <Base/Common/BIASpragmaEnd.hh>
00134
00135 #endif // __Random_hh__
00136
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/RANSAC.hh Source File

MathAlgo

RANSAC.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __RANSAC_hh__
00027 #define __RANSAC_hh__
00028
00029 #include <bias_config.h>
00030 #include <Base/Common/BIASpragmaStart.hh>
00031
00032 #include <Base/Debug/Debug.hh>
00033 #include <Base/Math/Random.hh>
00034 #include <Base/Geometry/HomgPoint2D.hh>
00035 #include <Base/Math/Matrix.hh>
00036
00037 #include <algorithm>
00038 #include <float.h>
00039 #include <iterator>
00040 #include <vector>
00041 #include <iomanip>
00042
00043 #define D_RANSAC_SAMPLES      0x0001
00044 #define D_RANSAC_SOLVE_MASTER 0x0002
00045
00046 #define RANSAC_DEFAULT_PROBOFGOODSOLUTION 0.98
00047 #define RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE 0.02
00048
00049 namespace BIAS {
00050   /** @class RANSAC
00051       @ingroup g_mathalgo
00052       @brief generic abstract RANSAC class,  RANSAC - RANdom SAmple Consensus
00053
00054       To use this class derive a class from it in which
00055       - GetSampleSolutions(...)
00056       - EvaluateSolution(...)
00057       - RefineSolution(...)
00058       are overloaded.
00059       GenerateSamples(...) can be overloaded if for instance an evenspaced
00060       sampling is desired.
00061
00062       For an example of how to use this class see
00063       ./Examples/ExampleRANSAC_double.hh and ./Examples/ExampleRANSAC.cpp
00064
00065       the function SolveMaster was ported from TargetJR -> PMatrixRANSAC by
00066       frahm and from there on further ported to this class from woelk
00067
00068       Since this is a generic templated class the implementation has to go
00069       into the header file.
00070
00071       @author frahm, woelk */
00072
00073
00074   /// do not DLL export this class because it is headeer only.
00075   /// thus no object file is compileed (which could be use in a DLL( cmenk, jw
00076   template <class SolutionType>
00077   class /*BIASMathAlgo_EXPORT*/ RANSAC : public Debug
00078   {
00079
00080   public:
00081     RANSAC();
00082
00083     /** Construct a RANSAC object that takes samples of size sample_size,
00084         returning at most max_solutions_per_sample solutions each time.
00085         If the refine_solution flag is true, a routine has been supplied to
00086         refine the initial fits before evaluation. */
00087     RANSAC(unsigned int sample_size, unsigned int max_solutions_per_sample = 1,
00088            bool refine_solution = false);
00089
00090     virtual ~RANSAC();
00091
00092     void Init(unsigned int sample_size,unsigned int max_solutions_per_sample=1,
00093               bool refine_solution = false);
00094
00095     /** @brief Explicitly set max number of samples
00096
00097         Ransacing will stop after max_samples samples, regardless
00098         of solution quality.  Normally, more than a few thousand samples
00099         signifies a problem. */
00100     void SetMaxSamples(unsigned int max_samples)
00101     { _uiMaxSamples = max_samples; }
00102
00103     /** @brief Explicitly set number of samples
00104
00105         Explicitly set number of samples to make in SolveMaster, i.e.
00106         Value of ComputeSampleCount() is ignored if this function is called
00107         with a strictly positive value uiSamples.
00108         Note:
00109         SolveMaster performs at most min(_uiMaxSamples, uiSamples) iterations
00110         @author koeser
00111      */
00112     void SetSampleCount(unsigned int uiSamples) {
00113       _uiExplicitSampleNo = uiSamples;
00114     }
00115
00116     /** @brief MAIN function called by user
00117
00118         This function is called to run the computation.
00119         On output, solution is set to the best solution found and
00120         inliers indicate which data were inliers to that solution.
00121         The inlying_data_fraction is responsible for the maximal number of
00122         sample sets taken from the data. The smaller the
00123         inlying_data_fraction, the more sample sets are taken
00124
00125         @attention Do NOT override this function in derived classes, unless
00126         you want to do modifications in the RANSAC _algorithm_ itself (and
00127         usually you dont want to do this ...)
00128         input : inlying_data_fraction   expected inlier fraction
00129         output: solution                solution
00130                 inliers                 inlier flags
00131         @return <0 indicates an error, otherwise number of chosen sample
00132         @author frahm, woelk */
00133     virtual int SolveMaster(double inlying_data_fraction,
00134                             SolutionType &solution,
00135                             std::vector<bool> &inliers);
00136
00137     /** @brief Compute solution(s) for the given set of samples
00138         @return the number of solutions found.
00139
00140         The which_samples array will be of length sample_size, selecting the
00141         indices to be fit to from the subclass's data array. */
00142     virtual int GetSampleSolutions(std::vector<unsigned int> &which_samples,
00143                                    std::vector<SolutionType> &solutions);
00144
00145     /** @brief evaluate the goodness of a solution
00146      *
00147      *  For the specified solution, set
00148      *  - an accept count indicating the number of data which are inliers
00149      *    to the given solution,
00150      *  - the inlier flag for each datum to true if the datum is inlying
00151      *  - an evaluate score (typically the average residual) indicating
00152      *    the goodness of fit of the inliers - the solver code requires a
00153      *    positive number where zero is a perfect solution, larger positive
00154      *    scores mean a worse solution.
00155      *  - an ok_to_terminate flag which is set TRUE if the solution
00156      *    is good enough that the robust solver can discontinue search for
00157      *    a better solution.
00158      *
00159      *  If existing_solution_flag is true, then the best accept count
00160      *  so far is in accept_count.  The function can terminate early if
00161      *  it is not going to beat this.
00162      *
00163      *  A skeleton implementation of this function would be written as follows:
00164      *  \verbatim
00165      *  int my_accept_count = 0;
00166      *  for (unsigned int i=0; i<_uiDataSize; i++) {
00167      *    inlier[i] = Consistent(corner_matches[i], solution);
00168      *    if (inlier[i]) {
00169      *      my_accept_count++;
00170      *      evaluate_score += Residual(corner_matches[i], solution);
00171      *      if (existing_solution_flag && my_accept_count>accept_count)
00172      *        break;
00173      *    }
00174      *  }
00175      *  accept_count=my_accept_count;
00176      *  evaluate_score=(accept_count!=0)?(evaluate_score/accept_count):
00177      *    (DBL_MAX);
00178      *  if (evaluate_score < solution_error_threshold &&
00179      *      (double)accept_count/(double)_uiDataSize > min_inlier_fraction)
00180      *    ok_to_terminate_flag=true;
00181      *  else
00182      *    ok_to_terminate_flag=false;
00183      *  return (accept_count!=0) // maybe even (accept_count>inl_frac)
00184      *  \endverbatim
00185      *
00186      *  @param solution (in) solution to be evaluated
00187      *  @param existing_solution_flag (in) if true the best accept_cout so far
00188      *                                is given in accept_count
00189      *  @param accept_count (in/out) input: best accept_cout so far if
00190      *                      existing_solution_flag==true, output: number of
00191      *                      inliers to the current solution
00192      *  @param inlier (out) inlier[i] ==> datum i is inlying
00193      *  @param evaluate_score (out) a score for the solution, 0 means ideal
00194      *                        solution, larger score means worse solution
00195      *  @param ok_to_termiate_flag (out) if true, RANSACing will stop */
00196     virtual
00197     bool EvaluateSolution(const SolutionType& solution,
00198                           bool existing_solution_flag,
00199                           std::vector<bool>& inlier, int& accept_count,
00200                           double& evaluate_score, bool& ok_to_terminate_flag);
00201
00202     /** @brief refine previously computed solution based on its inliers
00203
00204         If implemented, this function should compute a more accurate solution,
00205         e.g. a least squares on all inliers, possibly using as an initial
00206         estimate the solution in solution.
00207         The output array new_inliers should be set to reflect the inliers to
00208         the new solution.
00209         @return false if no better solution than the initial could be found
00210     */
00211     virtual
00212     bool RefineSolution(std::vector<unsigned int>& which_samples,
00213                         SolutionType& solution,
00214                         std::vector<bool>& new_inliers);
00215
00216     /** @brief pick a set of samples
00217
00218         Override this to specialize the technique used to generate samples.
00219         By default, random sampling is assumed but implementations may wish to
00220         use the latin-square sampling provided by generate_sample_evenspace
00221         (below), or some other problem-specific sampling strategy. */
00222     virtual
00223     bool GenerateSamples(int sample_index,
00224                          std::vector<unsigned int>& which_samples);
00225
00226     bool GenerateSamplesEvenspace(int sample_index,
00227                                   std::vector<unsigned int>& sample_table);
00228
00229     bool GenerateSamplesRandom(int sample_index,
00230                                std::vector<unsigned int>& sampletable);
00231
00232     // Return the best EvaluateScore obtained by a previous call of SolveMaster
00233     double GetFinalScore() const { return _dBestSampleEvaluateScore; }
00234
00235   protected:
00236     /// number of samples available
00237     unsigned _uiSampleSize;
00238
00239     /// max number of solutions that are to be computed for one sample set
00240     unsigned _uiMaxSolutionsPerSample;
00241
00242     /// number of data elements needed to compute a solution
00243     unsigned _uiDataSize;
00244
00245     /// do we want to refine a good sample
00246     bool _bRefineSolution;
00247
00248     /// sampled best values
00249     int    _iBestSampleAcceptCount;
00250     double _dBestSampleEvaluateScore;
00251
00252     /// refined best values
00253     int    _iBestInlierAcceptCount;
00254     double _dBestInlierEvaluateScore;
00255
00256     /// absolute max number of samples
00257     unsigned int _uiMaxSamples;
00258
00259     /// use this number of samples
00260     unsigned int _uiExplicitSampleNo;
00261
00262     /// prob. for computing number of samples, set close to 1
00263     double _dProbabilityOfGoodSolution;
00264
00265     /// If all other conditions are right, and the fractional change in the
00266     /// solution statistics is less than this, stop sampling.
00267     double _dSoSmallSolutionChange;
00268
00269     /// if we already have a solution for which EvaluateSolution returned true
00270     bool _got_solution_flag;
00271
00272     /// if true, the first acceptable solution is returned
00273     bool _greedy;
00274
00275   protected:
00276     static int ComputeSampleCount(double inlying_data_fraction,
00277                                   double desired_prob_good,
00278                                   unsigned int sample_size);
00279   };
00280
00281
00282
00283   /************************************************************/
00284   /* now the implementation                                   */
00285   /************************************************************/
00286
00287
00288   template <class SolutionType>
00289   RANSAC<SolutionType>::RANSAC()
00290   {
00291     _dProbabilityOfGoodSolution = RANSAC_DEFAULT_PROBOFGOODSOLUTION;
00292     _dSoSmallSolutionChange = RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE;
00293     _uiSampleSize=_uiMaxSolutionsPerSample=_uiDataSize=_uiMaxSamples=0;
00294     _uiExplicitSampleNo = 0;
00295     _bRefineSolution = false;
00296     _iBestSampleAcceptCount   = _iBestInlierAcceptCount   = -1;
00297     _dBestSampleEvaluateScore = _dBestInlierEvaluateScore = -1.0;
00298     _got_solution_flag = false;
00299     _greedy = false;
00300   }
00301
00302   template <class SolutionType>
00303   RANSAC<SolutionType>::RANSAC(unsigned int sample_size,
00304                                unsigned int max_solutions_per_sample,
00305                                bool refine_solution)
00306   {
00307     _dProbabilityOfGoodSolution = RANSAC_DEFAULT_PROBOFGOODSOLUTION;
00308     _dSoSmallSolutionChange = RANSAC_DEFAULT_SOSMALLSOLUTIONCHANGE;
00309     Init(sample_size, max_solutions_per_sample, refine_solution);
00310     _uiDataSize = 0;
00311     _iBestSampleAcceptCount   = _iBestInlierAcceptCount   = -1;
00312     _dBestSampleEvaluateScore = _dBestInlierEvaluateScore = -1.0;
00313     _got_solution_flag = false;
00314     _greedy = false;
00315   }
00316
00317   template <class SolutionType>
00318   void RANSAC<SolutionType>::Init(unsigned int sample_size,
00319                                   unsigned int max_solutions_per_sample,
00320                                   bool refine_solution)
00321   {
00322     _uiSampleSize=sample_size;
00323     _uiMaxSolutionsPerSample=max_solutions_per_sample;
00324     _bRefineSolution=refine_solution;
00325     _uiMaxSamples = 0;
00326     _uiExplicitSampleNo = 0;
00327   }
00328
00329   template <class SolutionType>
00330   RANSAC<SolutionType>::~RANSAC()
00331   {}
00332
00333   /* @author frahm, woelk */
00334   template <class SolutionType>
00335   int RANSAC<SolutionType>::SolveMaster(double inlying_data_fraction,
00336                                         SolutionType& solution,
00337                                         std::vector<bool>& inliers)
00338   {
00339 #ifdef BIAS_DEBUG
00340     if (_uiDataSize==0){
00341       BIASERR("_uiDataSize should be set in derived class first");
00342       BIASABORT;
00343     }
00344     if (inlying_data_fraction>1.0 || inlying_data_fraction<0.0){
00345       BIASERR("invalid inlying_data_fraction: "<<inlying_data_fraction);
00346       BIASABORT;
00347     }
00348 #endif
00349
00350     if (_uiDataSize < _uiSampleSize) {
00351       BIASERR("SolveMaster: _uiDataSize < _uiSampleSize !");
00352       return -1;
00353     }
00354
00355     std::vector<bool> inlier_set(_uiDataSize, false);
00356
00357     std::vector<SolutionType> multisoln_table(_uiMaxSolutionsPerSample);
00358
00359     // check whether _uiExplicitSampleNo has been set (to a positive value)
00360     int sample_count;
00361     if (_uiExplicitSampleNo>0) {
00362       // yes the user specified to make exactly _uiExplicitSampleNo samples
00363       sample_count = _uiExplicitSampleNo;
00364       BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: Using "<< sample_count
00365              <<" samples (explicitly specified).");
00366     }
00367     else {
00368       // compute the number of samples needed using Torr's thesis
00369       sample_count = ComputeSampleCount(inlying_data_fraction,
00370                                         _dProbabilityOfGoodSolution,
00371                                         _uiSampleSize);
00372
00373       BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: Need at most "<< sample_count
00374                <<" samples for "<< inlying_data_fraction <<" inlier fraction");
00375
00376     }
00377
00378     // Override computed bailout if specified
00379     if (_uiMaxSamples != 0 && (unsigned)sample_count > _uiMaxSamples) {
00380       sample_count = _uiMaxSamples;
00381       BIASDOUT(D_RANSAC_SOLVE_MASTER,"RANSAC: But will bail out after "
00382                << sample_count );
00383     }
00384
00385     // offsets of samples for current solution
00386     std::vector<unsigned int> which_samples;
00387
00388     // number of solutions per sample
00389     int nsolutions;
00390
00391     // number of inliers for current solution
00392     int sample_accept_count;
00393
00394     // score for sample set(resp. current solution), is set by EvaluateSolution
00395     double sample_evaluate_score;
00396
00397     // found a solution that good that we can finish, set by EvaluateSolution
00398     bool ok_to_terminate_flag;
00399
00400     // current solution is accepted by EvaluateSolution
00401     bool good_flag;
00402
00403     // number of inliers for current solution after refinement
00404     int inlier_accept_count;
00405
00406     // score for current solution after refinement
00407     double inlier_evaluate_score;
00408
00409     // indicates that the current is the best solution so far
00410     bool best_so_far_flag;
00411
00412     // indicate whether we have ever reached the checkpoint before
00413     // fast termination can only happen at the second time we reach the
00414     // checkpoint (or if _greedy is set)
00415     bool checkpoint_set_flag = false;
00416
00417     // backup of solution evaluation at last time we were at checkpoint
00418     int sample_checkpoint_count = 0;
00419     int inlier_checkpoint_count = 0;
00420
00421     // if ok_to_terminate is set true, fast termination is enabled if
00422     // termination_check_active_flag is true.
00423     bool termination_check_active_flag = false;
00424
00425     int sample_index;
00426     for (sample_index = 0; sample_index < sample_count; sample_index++){
00427
00428       // jmf for skipping if we haven't enough matches
00429       if (GenerateSamples(sample_index, which_samples)){
00430         /*std::cout << std::setw(3)<<sample_index<<" : ";
00431         copy(which_samples.begin(), which_samples.end(),
00432              std::ostream_iterator<int>(std::cout, "  "));
00433              std::cout << std::endl;*/
00434         nsolutions = GetSampleSolutions(which_samples, multisoln_table);
00435         //std::cout << nsolutions <<" solutions\n";
00436         //if (nsolutions == 0) abort();
00437         for (int solution_index=0; solution_index<nsolutions;solution_index++){
00438           SolutionType* active_solution_ptr = &multisoln_table[solution_index];
00439
00440           if (_got_solution_flag) // ?
00441             sample_accept_count = _iBestSampleAcceptCount;
00442
00443           ok_to_terminate_flag = false;
00444           sample_evaluate_score = DBL_MAX;
00445           good_flag =
00446             EvaluateSolution(*active_solution_ptr, _got_solution_flag,
00447                              inlier_set, sample_accept_count,
00448                              sample_evaluate_score, ok_to_terminate_flag);
00449
00450           BIASDOUT(D_RANSAC_SOLVE_MASTER,"sample: "<<sample_index<<"/"
00451                    <<sample_count<<" ("
00452                    <<solution_index<<")"
00453                    <<" solution: "<<(*active_solution_ptr)
00454                    <<" inliers: " <<sample_accept_count<<"/"<<_uiDataSize
00455                    <<" score: "<< sample_evaluate_score);
00456           inlier_accept_count=-1;
00457           inlier_evaluate_score = 1e20;
00458           if (good_flag && _bRefineSolution) {
00459             which_samples.clear();
00460             for (unsigned int i=0; i<_uiDataSize; i++)
00461               if (inlier_set[i]) which_samples.push_back(i);
00462             if (RefineSolution(which_samples, *active_solution_ptr,
00463                                inlier_set)){
00464               if (_got_solution_flag)
00465                 inlier_accept_count = _iBestInlierAcceptCount;
00466               good_flag =
00467                 EvaluateSolution (*active_solution_ptr, _got_solution_flag,
00468                                   inlier_set, inlier_accept_count,
00469                                   inlier_evaluate_score, ok_to_terminate_flag);
00470               if (good_flag) {
00471                 BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: minimal/refined "
00472                          <<sample_accept_count<<"/"
00473                          <<inlier_accept_count<<" "<<sample_evaluate_score<<"/"
00474                          <<inlier_evaluate_score);
00475               }
00476             } else
00477               BIASDOUT(D_RANSAC_SOLVE_MASTER,
00478                        "RANSAC: (note) refine_solution returned false");
00479           } else { // if (good_flag && _bRefineSolution) {
00480             BIASDOUT(D_RANSAC_SOLVE_MASTER,
00481                      "RANSAC: (note) either good_flag=false or "
00482                      <<"_bRefineSolution=false");
00483           }
00484
00485           // the criteria for deciding the best solution is the following -
00486           // (a) if the accept_count is higher than the previous best, take it,
00487           // (b) if the accept_count is equal to the previous best, and
00488           //     the evaluate score is smaller than the previous best, take it.
00489           if (good_flag) {
00490             best_so_far_flag = false;
00491
00492             if (!_got_solution_flag) {
00493               _got_solution_flag = true;
00494               best_so_far_flag = true;
00495             } else {
00496               if (!_bRefineSolution) {
00497                 if (sample_accept_count > _iBestSampleAcceptCount ||
00498                     (sample_accept_count == _iBestSampleAcceptCount &&
00499                      sample_evaluate_score < _dBestSampleEvaluateScore))
00500                   best_so_far_flag = true;
00501               } else {
00502                 if (inlier_accept_count > _iBestInlierAcceptCount ||
00503                     (inlier_accept_count == _iBestInlierAcceptCount &&
00504                      inlier_evaluate_score < _dBestInlierEvaluateScore))
00505                   best_so_far_flag = true;
00506               }
00507             }
00508
00509             // save all the scores associated with this result.
00510             // future evaluations will be tested against these accept scores.
00511             if (best_so_far_flag) {
00512               _iBestSampleAcceptCount = sample_accept_count;
00513               _dBestSampleEvaluateScore =
00514                 (sample_evaluate_score<inlier_evaluate_score) ?
00515                 sample_evaluate_score : inlier_evaluate_score;
00516               _iBestInlierAcceptCount = inlier_accept_count;
00517               _dBestInlierEvaluateScore = inlier_evaluate_score;
00518
00519               // save inliers and solution
00520               inliers = inlier_set;
00521               solution = *active_solution_ptr;
00522
00523               if (_bRefineSolution){
00524                 BIASDOUT(D_RANSAC_SOLVE_MASTER,"RANSAC: Sample "<<sample_index
00525                          <<" is best so far.  " << "Inliers/score "
00526                          <<_iBestInlierAcceptCount << "/"
00527                          <<_dBestInlierEvaluateScore<<": "<<solution);
00528               } else {
00529                 BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: Sample "<<sample_index
00530                          <<" is best so far.  " << "Inliers/score "
00531                          << _iBestSampleAcceptCount << "/"
00532                          <<_dBestSampleEvaluateScore<<": "<<solution);
00533               }
00534
00535
00536               if (ok_to_terminate_flag){
00537                 termination_check_active_flag = true;
00538                 BIASDOUT(D_RANSAC_SOLVE_MASTER,
00539                          "RANSAC: termination_check_active_flag = true");
00540               }
00541             } // if (best_so_far_flag) {
00542           } // if (good_flag) {
00543         } // for (int solution_index=0; solution_index<nsolutio
00544
00545         // this is all fast termination stuff
00546         if (_got_solution_flag) {
00547           // in greedy mode, we dont want to check the improvement
00548           if (_greedy && termination_check_active_flag) break;
00549           if (!checkpoint_set_flag)
00550             checkpoint_set_flag = true;
00551           else {
00552             // check if we have already found such a good solution that we can
00553             // terminate (termination_check_active_flag)
00554             // and if the best-so-far-solution has not increased
00555             // significantly compared to the previous solution
00556             if (!_bRefineSolution) {
00557               if (termination_check_active_flag &&
00558                   ((double) (_iBestSampleAcceptCount - sample_checkpoint_count)
00559                    /(double)sample_checkpoint_count < _dSoSmallSolutionChange))
00560                 break;
00561             } else {
00562               if (termination_check_active_flag &&
00563                   ((double) (_iBestInlierAcceptCount - inlier_checkpoint_count)
00564                    /(double)inlier_checkpoint_count < _dSoSmallSolutionChange))
00565                 break;
00566             }
00567           }
00568
00569           // save the current best values to measure the improvement next time
00570           inlier_checkpoint_count = _iBestInlierAcceptCount;
00571           sample_checkpoint_count = _iBestSampleAcceptCount;
00572         }
00573       } else { // if (GenerateSamples
00574         BIASERR("GenerateSamples failed");
00575       }
00576     } // for (int sample_index = 0 ...
00577
00578     if (!_got_solution_flag) {
00579       BIASERR("RANSAC: no solution found\n");
00580       // prepare return value "failed"
00581       sample_index = -2;
00582     } else {
00583       if (_bRefineSolution){
00584         BIASDOUT(D_RANSAC_SOLVE_MASTER,"\nRANSAC: using sample "
00585                  <<" with inliers/score "<<_iBestInlierAcceptCount << "/"
00586                  <<_dBestInlierEvaluateScore<<" as solution : "
00587                  <<solution<<"\n\n");
00588       } else {
00589         BIASDOUT(D_RANSAC_SOLVE_MASTER, "\nRANSAC: using sample "
00590                  <<" with inliers/score "<< _iBestSampleAcceptCount << "/"
00591                  <<_dBestSampleEvaluateScore<<" as solution : "
00592                  <<solution<<"\n\n");
00593       }
00594     }
00595     // reset best so far values
00596     _iBestSampleAcceptCount   = -1;
00597     _dBestSampleEvaluateScore = -1;
00598     _iBestInlierAcceptCount   = -1;
00599     _dBestInlierEvaluateScore = -1;
00600     _got_solution_flag = false;
00601     return sample_index;
00602   }
00603
00604
00605   template <class SolutionType>
00606   int RANSAC<SolutionType>::
00607   GetSampleSolutions(std::vector<unsigned int> &which_samples,
00608                      std::vector<SolutionType> &solutions)
00609   {
00610     BIASERR("this function should be implemented in derived class");
00611     return -1;
00612   }
00613
00614
00615   template <class SolutionType>
00616   bool RANSAC<SolutionType>::
00617   EvaluateSolution(const SolutionType& solution, bool existing_solution_flag,
00618                    std::vector<bool>& out_inlier_flags, int& accept_count_ptr,
00619                    double& evaluate_score_ptr, bool& ok_to_terminate_flag_ptr)
00620   {
00621     BIASERR("this function should be implemented in derived class");
00622     return false;
00623   }
00624
00625   template <class SolutionType>
00626   bool RANSAC<SolutionType>::
00627   RefineSolution(std::vector<unsigned int>& which_samples,
00628                  SolutionType& solution,
00629                  std::vector<bool>& new_inliers)
00630   {
00631     BIASERR("this function should be implemented in derived class");
00632     return false;
00633   }
00634
00635   template <class SolutionType>
00636   bool RANSAC<SolutionType>::
00637   GenerateSamples(int sample_index, std::vector<unsigned int>& which_samples)
00638   {
00639     return GenerateSamplesRandom(sample_index, which_samples);
00640   }
00641
00642   template <class SolutionType>
00643   bool RANSAC<SolutionType>::
00644   GenerateSamplesEvenspace(int sample_index,
00645                            std::vector<unsigned int>& which_samples)
00646   {
00647     bool res=false;
00648     BIASERR("unfinished code");
00649     /*
00650     // from sa_generate_sample_evenspace
00651
00652     assert((int)_sample_size <= sample_table.length());
00653     assert((int)_sample_size < data_size);
00654
00655     // basic_offset starts sample_size samples evenly spaced from the data_size set.
00656     unsigned basic_offset = data_size / _sample_size;
00657     unsigned offset = basic_offset + sample_index / basic_offset;
00658     unsigned data_index = sample_index % data_size;
00659
00660     if (offset < basic_offset + data_size) {
00661     for(unsigned count = 0; count < _sample_size; ++count) {
00662     sample_table[count] = data_index;
00663
00664     data_index += offset;
00665
00666     if ((int)data_index >= data_size)
00667     data_index = data_index % data_size;
00668     }
00669     }
00670     else {
00671     if (offset == basic_offset + data_size && (sample_index % basic_offset == 0))
00672     cerr << "RANSAC: Evenspace sampling has reached repetition stage, changing to random sampling\n";
00673
00674     generate_sample_random (sample_index, sample_table);
00675     }
00676     */
00677     return res;
00678   }
00679
00680   template <class SolutionType>
00681   bool RANSAC<SolutionType>::
00682   GenerateSamplesRandom(int sample_index,
00683                         std::vector<unsigned int>& which_samples)
00684   {
00685     bool res=true;
00686 #ifdef BIAS_DEBUG
00687     if (_uiSampleSize==0){
00688       BIASERR("call Init or appropriate constructor befor using RANSAC");
00689       res=false;
00690       BIASABORT;
00691     }
00692     if (_uiSampleSize>=_uiDataSize){
00693       BIASERR("_uiDataSize should be set in derived class befor using RANSAC");
00694       res=false;
00695       BIASABORT;
00696     }
00697 #endif
00698     // initialzing random with 0 and 1 does not seem to work well
00699     Random ran(sample_index+rand());
00700     unsigned int count=0;
00701     unsigned int index;
00702     which_samples.clear();
00703     do {
00704       index = ran.GetUniformDistributedInt((unsigned int)0, _uiDataSize-1);
00705       if (find(which_samples.begin(), which_samples.end(), index)==
00706           which_samples.end()){
00707         which_samples.push_back(index);
00708         count++;
00709         //std::cout << index << "  ";
00710       }
00711     } while (count<_uiSampleSize);
00712     //std::cout << std::endl;
00713 #ifdef BIAS_DEBUG
00714     if ((GetDebugLevel() & D_RANSAC_SAMPLES)!=0){
00715       BIASDOUT(D_RANSAC_SAMPLES, "---------- sample "<<sample_index
00716                <<" ---------------------------------"<<"\nnow using data: ");
00717       std::ostream_iterator<int> oi(GetDebugStream(), " ");
00718       std::copy(which_samples.begin(), which_samples.end(), oi);
00719       GetDebugStream() << std::endl;
00720     }
00721 #endif
00722
00723     return res;
00724   }
00725
00726
00727   template <class SolutionType>
00728   int RANSAC<SolutionType>::
00729   ComputeSampleCount(double inlying_data_fraction, double desired_prob_good,
00730                      unsigned int sample_size)
00731   {
00732     if (inlying_data_fraction == 1.0)
00733       // the analytic expression below cant cope with this so do it explicitly.
00734       return 1;
00735
00736     // from Torr's thesis.
00737     return int(log (1.0 - desired_prob_good) /
00738                log (1.0 - pow (inlying_data_fraction, (double) sample_size)));
00739   }
00740
00741
00742 } // namespace
00743
00744 #include <Base/Common/BIASpragmaEnd.hh>
00745
00746 #endif   //__RANSAC_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/RANSACPreKnowledge.hh Source File

MathAlgo

RANSACPreKnowledge.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __RANSACPREKNOWLEDGE_hh__
00027 #define __RANSACPREKNOWLEDGE_hh__
00028
00029 #include "RANSAC.hh"
00030
00031 namespace BIAS {
00032   /** @class RANSACPreKnowledge
00033       @ingroup g_mathalgo
00034       @brief Extension of RANSAC algorithm: user-supplied guesses are evaluated
00035              and refined using RANSAC criterions before actually starting the
00036              RANSAC algorithm
00037
00038       @author koeser 11/2003 */
00039
00040   template <class SolutionType>
00041   class BIASMathAlgo_EXPORT RANSACPreKnowledge : public RANSAC<SolutionType>
00042   {
00043   public:
00044     using RANSAC<SolutionType>::_uiSampleSize;
00045     using RANSAC<SolutionType>::_uiMaxSolutionsPerSample;
00046     using RANSAC<SolutionType>::_uiDataSize;
00047     using RANSAC<SolutionType>::_bRefineSolution;
00048     using RANSAC<SolutionType>::_iBestSampleAcceptCount;
00049     using RANSAC<SolutionType>::_dBestSampleEvaluateScore;
00050     using RANSAC<SolutionType>::_iBestInlierAcceptCount;
00051     using RANSAC<SolutionType>::_dBestInlierEvaluateScore;
00052     using RANSAC<SolutionType>::_uiMaxSamples;
00053     using RANSAC<SolutionType>::_uiExplicitSampleNo;
00054     using RANSAC<SolutionType>::_dProbabilityOfGoodSolution;
00055     using RANSAC<SolutionType>::_dSoSmallSolutionChange;
00056     using RANSAC<SolutionType>::_got_solution_flag;
00057     using RANSAC<SolutionType>::_greedy;
00058
00059     RANSACPreKnowledge() : RANSAC<SolutionType>()
00060     { _ClearBeforeRANSAC = false; };
00061
00062     /** Construct a RANSAC object that takes samples of size sample_size,
00063         returning at most max_solutions_per_sample solutions each time.
00064         If the refine_solution flag is true, a routine has been supplied to
00065         refine the initial fits before evaluation. */
00066     RANSACPreKnowledge(unsigned int sample_size,
00067                        unsigned int max_solutions_per_sample = 1,
00068                        bool refine_solution = false,
00069                        bool ClearBeforeRANSAC = false):
00070       RANSAC<SolutionType>(sample_size, max_solutions_per_sample,
00071                            refine_solution)
00072     {_ClearBeforeRANSAC = ClearBeforeRANSAC; };
00073
00074     /** @brief default destructor does nothing */
00075     virtual ~RANSACPreKnowledge() { };
00076
00077     /** @brief add some guessed solutions which are tested by RANSAC later */
00078     virtual void AddGoodGuesses(const std::vector<SolutionType> &Guesses) {
00079       UserGuesses_.reserve(UserGuesses_.size() + Guesses.size());
00080       for (typename std::vector<SolutionType>::const_iterator
00081              it = Guesses.begin(); it!=Guesses.end(); it++)
00082         UserGuesses_.push_back(*it);
00083     }
00084
00085     /** @brief clear all guesses */
00086     virtual void ClearGuesses() {
00087       UserGuesses_.clear();
00088     }
00089
00090     /** @brief checks UserGuesses and calls RANSAC::SolveMaster
00091         @author koeser */
00092     virtual int SolveMaster(double inlying_data_fraction,
00093                             SolutionType &solution,
00094                             std::vector<bool> &inliers);
00095
00096   protected:
00097     /// vector of guesses to be checked, which were manually supplied by user
00098     std::vector<SolutionType> UserGuesses_;
00099
00100     /// if we found no absolutely good solution, clear all values before RANSAC
00101     bool _ClearBeforeRANSAC;
00102
00103   };
00104
00105   template <class SolutionType> int
00106   RANSACPreKnowledge<SolutionType>::SolveMaster(double inlying_data_fraction,
00107                                                 SolutionType &solution,
00108                                                 std::vector<bool> &inliers) {
00109
00110     // offsets of samples for current solution
00111     std::vector<unsigned int> which_samples;
00112
00113     // vector indicating which ssamples are inliers
00114     std::vector<bool> inlier_set(_uiDataSize, false);
00115
00116     // number of inliers for current solution
00117     int sample_accept_count;
00118
00119     // score for sample set(resp. current solution), is set by EvaluateSolution
00120     double sample_evaluate_score;
00121
00122     // found a solution that good that we can finish, set by EvaluateSolution
00123     bool ok_to_terminate_flag;
00124
00125     // current solution is accepted by EvaluateSolution
00126     bool good_flag;
00127
00128     // number of inliers for current solution after refinement
00129     int inlier_accept_count;
00130
00131     // score for current solution after refinement
00132     double inlier_evaluate_score;
00133
00134     // indicates that the current is the best solution so far
00135     bool best_so_far_flag;
00136
00137     // if ok_to_terminate is set true, fast termination is enabled if
00138     // termination_check_active_flag is true.
00139     bool termination_check_active_flag = false;
00140
00141
00142     // run over all user guesses and evaluate using RANSAC criterions:
00143     for (typename std::vector<SolutionType>::iterator
00144            it = UserGuesses_.begin(); it!=UserGuesses_.end(); it++) {
00145
00146
00147       ok_to_terminate_flag = false;
00148       sample_evaluate_score = DBL_MAX;
00149       good_flag = EvaluateSolution(*it, _got_solution_flag,
00150                                    inlier_set, sample_accept_count,
00151                                    sample_evaluate_score,
00152                                    ok_to_terminate_flag);
00153
00154       BIASDOUT(D_RANSAC_SOLVE_MASTER,"PreGuess. "
00155                <<" solution: "<<(*it)
00156                <<" inliers: " <<sample_accept_count<<"/"<<_uiDataSize
00157                <<" score: "<< sample_evaluate_score);
00158
00159       inlier_accept_count=-1;
00160       inlier_evaluate_score = 1e20;
00161       if (good_flag && _bRefineSolution) {
00162         which_samples.clear();
00163         for (unsigned int i=0; i<_uiDataSize; i++)
00164           if (inlier_set[i]) which_samples.push_back(i);
00165         if (RefineSolution(which_samples, *it,
00166                            inlier_set)){
00167           if (_got_solution_flag)
00168             inlier_accept_count = _iBestInlierAcceptCount;
00169           good_flag =
00170             EvaluateSolution (*it, _got_solution_flag,
00171                               inlier_set, inlier_accept_count,
00172                               inlier_evaluate_score, ok_to_terminate_flag);
00173           if (good_flag) {
00174             BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: minimal/refined "
00175                      <<sample_accept_count<<"/"
00176                      <<inlier_accept_count<<" "<<sample_evaluate_score<<"/"
00177                      <<inlier_evaluate_score);
00178           }
00179         } else
00180           BIASDOUT(D_RANSAC_SOLVE_MASTER,
00181                    "RANSAC: (note) refine_solution returned false");
00182       } else { // if (good_flag && _bRefineSolution) {
00183         BIASDOUT(D_RANSAC_SOLVE_MASTER,
00184                  "RANSAC: (note) either good_flag=false or "
00185                  <<"_bRefineSolution=false");
00186       }
00187
00188       // the criteria for deciding the best solution is the following -
00189       // (a) if the accept_count is higher than the previous best, take it,
00190       // (b) if the accept_count is equal to the previous best, and
00191       //     the evaluate score is smaller than the previous best, take it.
00192       if (good_flag) {
00193         best_so_far_flag = false;
00194
00195         if (!_got_solution_flag) {
00196           _got_solution_flag = true;
00197           best_so_far_flag = true;
00198         } else {
00199           if (!_bRefineSolution) {
00200             if (sample_accept_count > _iBestSampleAcceptCount ||
00201                 (sample_accept_count == _iBestSampleAcceptCount &&
00202                  sample_evaluate_score < _dBestSampleEvaluateScore))
00203               best_so_far_flag = true;
00204           } else {
00205             if (inlier_accept_count > _iBestInlierAcceptCount ||
00206                 (inlier_accept_count == _iBestInlierAcceptCount &&
00207                  inlier_evaluate_score < _dBestInlierEvaluateScore))
00208               best_so_far_flag = true;
00209           }
00210         }
00211
00212         // save all the scores associated with this result.
00213         // future evaluations will be tested against these accept scores.
00214         if (best_so_far_flag) {
00215           _iBestSampleAcceptCount = sample_accept_count;
00216           _dBestSampleEvaluateScore =
00217             (sample_evaluate_score<inlier_evaluate_score) ?
00218             sample_evaluate_score : inlier_evaluate_score;
00219           _iBestInlierAcceptCount = inlier_accept_count;
00220           _dBestInlierEvaluateScore = inlier_evaluate_score;
00221
00222           // save inliers and solution
00223           inliers = inlier_set;
00224           solution = *it;
00225
00226           if (_bRefineSolution){
00227             BIASDOUT(D_RANSAC_SOLVE_MASTER,"RANSAC: PreGuess "
00228                      <<" is best so far.  " << "Inliers/score "
00229                      <<_iBestInlierAcceptCount << "/"
00230                      <<_dBestInlierEvaluateScore<<": "<<solution);
00231           } else {
00232             BIASDOUT(D_RANSAC_SOLVE_MASTER, "RANSAC: PreGuess "
00233                      <<" is best so far.  " << "Inliers/score "
00234                      << _iBestSampleAcceptCount << "/"
00235                      <<_dBestSampleEvaluateScore<<": "<<solution);
00236           }
00237
00238
00239           if (ok_to_terminate_flag){
00240             termination_check_active_flag = true;
00241             BIASDOUT(D_RANSAC_SOLVE_MASTER,
00242                      "RANSAC: termination_check_active_flag = true");
00243           }
00244         } // if (best_so_far_flag) {
00245       } // if (good_flag) {
00246     } // Guesses
00247
00248     // check whether our guesses yielded a good solution ...
00249     if  (termination_check_active_flag) {
00250       //      std::cout << "VERY GOOD preguess ! skipping RANSAC."<<std::endl;
00251       return 0;
00252     }
00253     // we did not get a really good solution from the guesses
00254     if (_ClearBeforeRANSAC) {
00255       // in order to do a real RANSAC run without high thresholds of
00256       // pre-guesses, we clean up everything
00257       _iBestSampleAcceptCount   = -1;
00258       _dBestSampleEvaluateScore = -1;
00259       _iBestInlierAcceptCount   = -1;
00260       _dBestInlierEvaluateScore = -1;
00261       _got_solution_flag = false;
00262     }
00263     // ok, we have no really good solution, call RANSAC algorithm:
00264     return  RANSAC<SolutionType>::SolveMaster(inlying_data_fraction,
00265                                               solution, inliers);
00266   }
00267
00268 } // end namespace
00269
00270 #endif // header defined
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/RedirectStreams.hh Source File

Base » Debug

RedirectStreams.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __RedirectStreams_hh__
00027 #define __RedirectStreams_hh__
00028 #include "bias_config.h"
00029
00030 #include <iostream>
00031 #include <fstream>
00032 #include <sstream>
00033
00034 namespace BIAS{
00035     /** @class RedirectStreams
00036     @brief used to redirect stdout and stderr into files or to silence them
00037     */
00038     class BIASDebug_EXPORT RedirectStreams {
00039
00040     public:
00041         virtual ~RedirectStreams(){};
00042
00043         /** @brief empty useless constructor, does nothing */
00044         inline RedirectStreams(){};
00045
00046         // required due to members JW
00047         RedirectStreams(const RedirectStreams &src){
00048             (*this) = src;
00049         };
00050
00051
00052         #include <Base/Common/BIASpragmaStart.hh>
00053         // required due to members JW
00054         RedirectStreams & operator=(const RedirectStreams &src){
00055             BIASERR("not implemented due to streams. (jw)");
00056             return *this;
00057         };
00058         #include <Base/Common/BIASpragmaEnd.hh>
00059
00060
00061         /** @brief direct all stdout output into a file */
00062         inline void RedirectCout(char* file);
00063
00064         /** @brief direct all stderr output into a file */
00065         inline void RedirectCerr(char* file);
00066
00067         inline void RedirectCout(const std::string& file)
00068         { RedirectCout((char *)file.c_str()); }
00069
00070         inline void RedirectCerr(const std::string& file)
00071         { RedirectCerr((char *)file.c_str()); }
00072
00073         // no /dev/null on windows
00074 #ifndef WIN32
00075         /** @brief call this to silence cout */
00076         inline void Cout2Null() {
00077             RedirectCout("/dev/null");
00078         }
00079
00080         /** @brief call this to silence cerr */
00081         inline void Cerr2Null() {
00082             RedirectCerr("/dev/null");
00083         }
00084 #endif
00085
00086         /** @brief re-enables backupped standard output for cout */
00087         inline void ResetCout();
00088         /** @brief re-enables backupped standard output for cerr */
00089         inline void ResetCerr();
00090
00091     protected:
00092
00093         std::streambuf *OutBuf_, *ErrBuf_, *RedirOut_, *RedirErr_;
00094
00095         // redirecting cout, cerr to avoid output
00096         std::ofstream OutStr_, ErrStr_;
00097
00098     }; // class RedirectStreams
00099
00100     inline void RedirectStreams::RedirectCout(char* file)
00101     {
00102         OutStr_.open (file);
00103         RedirOut_ = OutStr_.rdbuf();
00104         OutBuf_   = std::cout.rdbuf();
00105         std::cout.rdbuf(RedirOut_);
00106     }
00107
00108     inline void RedirectStreams::RedirectCerr(char* file)
00109     {
00110         ErrStr_.open (file);
00111         RedirErr_ = ErrStr_.rdbuf();
00112         ErrBuf_   = std::cerr.rdbuf();
00113         std::cerr.rdbuf(RedirErr_);
00114     }
00115
00116     inline void RedirectStreams::ResetCout()
00117     {
00118         std::cout.rdbuf(OutBuf_);
00119         OutStr_.close();
00120     }
00121
00122     inline void RedirectStreams::ResetCerr()
00123     {
00124         std::cerr.rdbuf(ErrBuf_);
00125         ErrStr_.close();
00126     }
00127
00128
00129 } // namespace
00130
00131
00132 #endif //__BIASRedirectStreams_hh__
00133
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/region1d.h Source File

Base » Math » tnt

region1d.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034
00035 #ifndef REGION1D_H
00036 #define REGION1D_H
00037
00038
00039 #include "subscript.h"
00040 #include "index.h"
00041 #include <iostream>
00042 #include <cassert>
00043
00044 namespace TNT
00045 {
00046
00047 template <class Array1D>
00048 class const_Region1D;
00049
00050 template <class Array1D>
00051 class Region1D
00052 {
00053     protected:
00054
00055         Array1D &  A_;
00056         Subscript offset_;          // 0-based
00057         Subscript dim_;
00058
00059         typedef typename Array1D::element_type T;
00060
00061     public:
00062         const Array1D & array()  const { return A_; }
00063
00064         Subscript offset() const { return offset_;}
00065         Subscript dim() const { return dim_; }
00066
00067         Subscript offset(Subscript i) const
00068         {
00069 #ifdef TNT_BOUNDS_CHECK
00070             assert(i==TNT_BASE_OFFSET);
00071 #endif
00072             return offset_;
00073         }
00074
00075         Subscript dim(Subscript i) const
00076         {
00077 #ifdef TNT_BOUNDS_CHECK
00078             assert(i== TNT_BASE_OFFSET);
00079 #endif
00080             return offset_;
00081         }
00082
00083
00084         Region1D(Array1D &A, Subscript i1, Subscript i2) : A_(A)
00085         {
00086 #ifdef TNT_BOUNDS_CHECK
00087             assert(TNT_BASE_OFFSET <= i1 );
00088             assert(i2 <= A.dim() + (TNT_BASE_OFFSET-1));
00089             assert(i1 <= i2);
00090 #endif
00091             offset_ = i1 - TNT_BASE_OFFSET;
00092             dim_ = i2-i1 + 1;
00093         }
00094
00095         Region1D(Array1D &A, const Index1D &I) : A_(A)
00096         {
00097 #ifdef TNT_BOUNDS_CHECK
00098             assert(TNT_BASE_OFFSET <=I.lbound());
00099             assert(I.ubound() <= A.dim() + (TNT_BASE_OFFSET-1));
00100             assert(I.lbound() <= I.ubound());
00101 #endif
00102             offset_ = I.lbound() - TNT_BASE_OFFSET;
00103             dim_ = I.ubound() - I.lbound() + 1;
00104         }
00105
00106         Region1D(Region1D<Array1D> &A, Subscript i1, Subscript i2) :
00107                 A_(A.A_)
00108         {
00109 #ifdef TNT_BOUNDS_CHECK
00110             assert(TNT_BASE_OFFSET <= i1 );
00111             assert(i2 <= A.dim() + (TNT_BASE_OFFSET - 1));
00112             assert(i1 <= i2);
00113 #endif
00114                     //     (old-offset)        (new-offset)
00115                     //
00116             offset_ =  (i1 - TNT_BASE_OFFSET) + A.offset_;
00117             dim_ = i2-i1 + 1;
00118         }
00119
00120         Region1D<Array1D> operator()(Subscript i1, Subscript i2)
00121         {
00122 #ifdef TNT_BOUNDS_CHECK
00123             assert(TNT_BASE_OFFSET <= i1);
00124             assert(i2 <= dim() + (TNT_BASE_OFFSET -1));
00125             assert(i1 <= i2);
00126 #endif
00127                     // offset_ is 0-based, so no need for
00128                     //  ( - TNT_BASE_OFFSET)
00129                     //
00130             return Region1D<Array1D>(A_, i1+offset_,
00131                     offset_ + i2);
00132         }
00133
00134
00135         Region1D<Array1D> operator()(const Index1D &I)
00136         {
00137 #ifdef TNT_BOUNDS_CHECK
00138             assert(TNT_BASE_OFFSET<=I.lbound());
00139             assert(I.ubound() <= dim() + (TNT_BASE_OFFSET-1));
00140             assert(I.lbound() <= I.ubound());
00141 #endif
00142             return Region1D<Array1D>(A_, I.lbound()+offset_,
00143                 offset_ + I.ubound());
00144         }
00145
00146
00147
00148
00149         T & operator()(Subscript i)
00150         {
00151 #ifdef TNT_BOUNDS_CHECK
00152             assert(TNT_BASE_OFFSET <= i);
00153             assert(i <=  dim() + (TNT_BASE_OFFSET-1));
00154 #endif
00155             return A_(i+offset_);
00156         }
00157
00158         const T & operator() (Subscript i) const
00159         {
00160 #ifdef TNT_BOUNDS_CHECK
00161             assert(TNT_BASE_OFFSET <= i);
00162             assert(i <= dim() + (TNT_BASE_OFFSET-1));
00163 #endif
00164             return A_(i+offset_);
00165         }
00166
00167
00168         Region1D<Array1D> & operator=(const Region1D<Array1D> &R)
00169         {
00170             // make sure both sides conform
00171             assert(dim() == R.dim());
00172
00173             Subscript N = dim();
00174             Subscript i;
00175             Subscript istart = TNT_BASE_OFFSET;
00176             Subscript iend = istart + N-1;
00177
00178             for (i=istart; i<=iend; i++)
00179                 (*this)(i) = R(i);
00180
00181             return *this;
00182         }
00183
00184
00185
00186         Region1D<Array1D> & operator=(const const_Region1D<Array1D> &R)
00187         {
00188             // make sure both sides conform
00189             assert(dim() == R.dim());
00190
00191             Subscript N = dim();
00192             Subscript i;
00193             Subscript istart = TNT_BASE_OFFSET;
00194             Subscript iend = istart + N-1;
00195
00196             for (i=istart; i<=iend; i++)
00197                 (*this)(i) = R(i);
00198
00199             return *this;
00200
00201         }
00202
00203
00204         Region1D<Array1D> & operator=(const T& t)
00205         {
00206             Subscript N=dim();
00207             Subscript i;
00208             Subscript istart = TNT_BASE_OFFSET;
00209             Subscript iend = istart + N-1;
00210
00211             for (i=istart; i<= iend; i++)
00212                 (*this)(i) = t;
00213
00214             return *this;
00215
00216         }
00217
00218
00219         Region1D<Array1D> & operator=(const Array1D &R)
00220         {
00221             // make sure both sides conform
00222             Subscript N = dim();
00223             assert(dim() == R.dim());
00224
00225             Subscript i;
00226             Subscript istart = TNT_BASE_OFFSET;
00227             Subscript iend = istart + N-1;
00228
00229             for (i=istart; i<=iend; i++)
00230                 (*this)(i) = R(i);
00231
00232             return *this;
00233
00234         }
00235
00236 };
00237
00238 template <class Array1D>
00239 std::ostream& operator<<(std::ostream &s, Region1D<Array1D> &A)
00240 {
00241     Subscript N=A.dim();
00242     Subscript istart = TNT_BASE_OFFSET;
00243     Subscript iend = N - 1 + TNT_BASE_OFFSET;
00244
00245     for (Subscript i=istart; i<=iend; i++)
00246         s << A(i) << endl;
00247
00248     return s;
00249 }
00250
00251
00252 /*  ---------  class const_Region1D ------------ */
00253
00254 template <class Array1D>
00255 class const_Region1D
00256 {
00257     protected:
00258
00259         const Array1D &  A_;
00260         Subscript offset_;          // 0-based
00261         Subscript dim_;
00262        typedef typename Array1D::element_type T;
00263
00264     public:
00265         const Array1D & array()  const { return A_; }
00266
00267         Subscript offset() const { return offset_;}
00268         Subscript dim() const { return dim_; }
00269
00270         Subscript offset(Subscript i) const
00271         {
00272 #ifdef TNT_BOUNDS_CHECK
00273             assert(i==TNT_BASE_OFFSET);
00274 #endif
00275             return offset_;
00276         }
00277
00278         Subscript dim(Subscript i) const
00279         {
00280 #ifdef TNT_BOUNDS_CHECK
00281             assert(i== TNT_BASE_OFFSET);
00282 #endif
00283             return offset_;
00284         }
00285
00286
00287         const_Region1D(const Array1D &A, Subscript i1, Subscript i2) : A_(A)
00288         {
00289 #ifdef TNT_BOUNDS_CHECK
00290             assert(TNT_BASE_OFFSET <= i1 );
00291             assert(i2 <= A.dim() + (TNT_BASE_OFFSET-1));
00292             assert(i1 <= i2);
00293 #endif
00294             offset_ = i1 - TNT_BASE_OFFSET;
00295             dim_ = i2-i1 + 1;
00296         }
00297
00298         const_Region1D(const Array1D &A, const Index1D &I) : A_(A)
00299         {
00300 #ifdef TNT_BOUNDS_CHECK
00301             assert(TNT_BASE_OFFSET <=I.lbound());
00302             assert(I.ubound() <= A.dim() + (TNT_BASE_OFFSET-1));
00303             assert(I.lbound() <= I.ubound());
00304 #endif
00305             offset_ = I.lbound() - TNT_BASE_OFFSET;
00306             dim_ = I.ubound() - I.lbound() + 1;
00307         }
00308
00309         const_Region1D(const_Region1D<Array1D> &A, Subscript i1, Subscript i2) :
00310                 A_(A.A_)
00311         {
00312 #ifdef TNT_BOUNDS_CHECK
00313             assert(TNT_BASE_OFFSET <= i1 );
00314             assert(i2 <= A.dim() + (TNT_BASE_OFFSET - 1));
00315             assert(i1 <= i2);
00316 #endif
00317                     //     (old-offset)        (new-offset)
00318                     //
00319             offset_ =  (i1 - TNT_BASE_OFFSET) + A.offset_;
00320             dim_ = i2-i1 + 1;
00321         }
00322
00323         const_Region1D<Array1D> operator()(Subscript i1, Subscript i2)
00324         {
00325 #ifdef TNT_BOUNDS_CHECK
00326             assert(TNT_BASE_OFFSET <= i1);
00327             assert(i2 <= dim() + (TNT_BASE_OFFSET -1));
00328             assert(i1 <= i2);
00329 #endif
00330                     // offset_ is 0-based, so no need for
00331                     //  ( - TNT_BASE_OFFSET)
00332                     //
00333             return const_Region1D<Array1D>(A_, i1+offset_,
00334                     offset_ + i2);
00335         }
00336
00337
00338         const_Region1D<Array1D> operator()(const Index1D &I)
00339         {
00340 #ifdef TNT_BOUNDS_CHECK
00341             assert(TNT_BASE_OFFSET<=I.lbound());
00342             assert(I.ubound() <= dim() + (TNT_BASE_OFFSET-1));
00343             assert(I.lbound() <= I.ubound());
00344 #endif
00345             return const_Region1D<Array1D>(A_, I.lbound()+offset_,
00346                 offset_ + I.ubound());
00347         }
00348
00349
00350         const T & operator() (Subscript i) const
00351         {
00352 #ifdef TNT_BOUNDS_CHECK
00353             assert(TNT_BASE_OFFSET <= i);
00354             assert(i <= dim() + (TNT_BASE_OFFSET-1));
00355 #endif
00356             return A_(i+offset_);
00357         }
00358
00359
00360
00361
00362 };
00363
00364 template <class Array1D>
00365 std::ostream& operator<<(std::ostream &s, const_Region1D<Array1D> &A)
00366 {
00367     Subscript N=A.dim();
00368
00369     for (Subscript i=1; i<=N; i++)
00370         s << A(i) << endl;
00371
00372     return s;
00373 }
00374
00375
00376 } // namespace TNT
00377
00378 #endif
00379 // const_Region1D_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/region2d.h Source File

Base » Math » tnt

region2d.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032 // 2D Regions for arrays and matrices
00033
00034 #ifndef REGION2D_H
00035 #define REGION2D_H
00036
00037 #include "index.h"
00038 #include <iostream>
00039 #include <cassert>
00040
00041 namespace TNT
00042 {
00043
00044 template <class Array2D>
00045 class const_Region2D;
00046
00047
00048 template <class Array2D>
00049 class Region2D
00050 {
00051     protected:
00052
00053         Array2D &  A_;
00054         Subscript offset_[2];       // 0-offset internally
00055         Subscript dim_[2];
00056
00057     public:
00058         typedef typename Array2D::value_type T;
00059         typedef Subscript   size_type;
00060         typedef         T   value_type;
00061         typedef         T   element_type;
00062         typedef         T*  pointer;
00063         typedef         T*  iterator;
00064         typedef         T&  reference;
00065         typedef const   T*  const_iterator;
00066         typedef const   T&  const_reference;
00067
00068         Array2D & array() { return A_; }
00069         const Array2D & array()  const { return A_; }
00070         Subscript lbound() const { return A_.lbound(); }
00071         Subscript num_rows() const { return dim_[0]; }
00072         Subscript num_cols() const { return dim_[1]; }
00073         Subscript offset(Subscript i) const                 // 1-offset
00074         {
00075 #ifdef TNT_BOUNDS_CHECK
00076             assert( A_.lbound() <= i);
00077             assert( i<= dim_[0] + A_.lbound()-1);
00078 #endif
00079             return offset_[i-A_.lbound()];
00080         }
00081
00082         Subscript dim(Subscript i) const
00083         {
00084 #ifdef TNT_BOUNDS_CHECK
00085             assert( A_.lbound() <= i);
00086             assert( i<= dim_[0] + A_.lbound()-1);
00087 #endif
00088             return dim_[i-A_.lbound()];
00089         }
00090
00091
00092
00093         Region2D(Array2D &A, Subscript i1, Subscript i2, Subscript j1,
00094                 Subscript j2) : A_(A)
00095         {
00096 #ifdef TNT_BOUNDS_CHECK
00097             assert( i1 <= i2 );
00098             assert( j1 <= j2);
00099             assert( A.lbound() <= i1);
00100             assert( i2<= A.dim(A.lbound()) + A.lbound()-1);
00101             assert( A.lbound() <= j1);
00102             assert( j2<= A.dim(A.lbound()+1) + A.lbound()-1 );
00103 #endif
00104
00105
00106             offset_[0] = i1-A.lbound();
00107             offset_[1] = j1-A.lbound();
00108             dim_[0] = i2-i1+1;
00109             dim_[1] = j2-j1+1;
00110         }
00111
00112         Region2D(Array2D &A, const Index1D &I, const Index1D &J) : A_(A)
00113         {
00114 #ifdef TNT_BOUNDS_CHECK
00115             assert( I.lbound() <= I.ubound() );
00116             assert( J.lbound() <= J.ubound() );
00117             assert( A.lbound() <= I.lbound());
00118             assert( I.ubound()<= A.dim(A.lbound()) + A.lbound()-1);
00119             assert( A.lbound() <= J.lbound());
00120             assert( J.ubound() <= A.dim(A.lbound()+1) + A.lbound()-1 );
00121 #endif
00122
00123             offset_[0] = I.lbound()-A.lbound();
00124             offset_[1] = J.lbound()-A.lbound();
00125             dim_[0] = I.ubound() - I.lbound() + 1;
00126             dim_[1] = J.ubound() - J.lbound() + 1;
00127         }
00128
00129         Region2D(Region2D<Array2D> &A, Subscript i1, Subscript i2,
00130             Subscript j1, Subscript j2) : A_(A.A_)
00131         {
00132 #ifdef TNT_BOUNDS_CHECK
00133             assert( i1 <= i2 );
00134             assert( j1 <= j2);
00135             assert( A.lbound() <= i1);
00136             assert( i2<= A.dim(A.lbound()) + A.lbound()-1);
00137             assert( A.lbound() <= j1);
00138             assert( j2<= A.dim(A.lbound()+1) + A.lbound()-1 );
00139 #endif
00140             offset_[0] = (i1 - A.lbound()) + A.offset_[0];
00141             offset_[1] = (j1 - A.lbound()) + A.offset_[1];
00142             dim_[0] = i2-i1 + 1;
00143             dim_[1] = j2-j1+1;
00144         }
00145
00146         Region2D<Array2D> operator()(Subscript i1, Subscript i2,
00147                 Subscript j1, Subscript j2)
00148         {
00149 #ifdef TNT_BOUNDS_CHECK
00150             assert( i1 <= i2 );
00151             assert( j1 <= j2);
00152             assert( A_.lbound() <= i1);
00153             assert( i2<= dim_[0] + A_.lbound()-1);
00154             assert( A_.lbound() <= j1);
00155             assert( j2<= dim_[1] + A_.lbound()-1 );
00156 #endif
00157             return Region2D<Array2D>(A_,
00158                     i1+offset_[0], offset_[0] + i2,
00159                     j1+offset_[1], offset_[1] + j2);
00160         }
00161
00162
00163         Region2D<Array2D> operator()(const Index1D &I,
00164                 const Index1D &J)
00165         {
00166 #ifdef TNT_BOUNDS_CHECK
00167             assert( I.lbound() <= I.ubound() );
00168             assert( J.lbound() <= J.ubound() );
00169             assert( A_.lbound() <= I.lbound());
00170             assert( I.ubound()<= dim_[0] + A_.lbound()-1);
00171             assert( A_.lbound() <= J.lbound());
00172             assert( J.ubound() <= dim_[1] + A_.lbound()-1 );
00173 #endif
00174
00175             return Region2D<Array2D>(A_, I.lbound()+offset_[0],
00176                 offset_[0] + I.ubound(), offset_[1]+J.lbound(),
00177                 offset_[1] + J.ubound());
00178         }
00179
00180         inline T & operator()(Subscript i, Subscript j)
00181         {
00182 #ifdef TNT_BOUNDS_CHECK
00183             assert( A_.lbound() <= i);
00184             assert( i<= dim_[0] + A_.lbound()-1);
00185             assert( A_.lbound() <= j);
00186             assert( j<= dim_[1] + A_.lbound()-1 );
00187 #endif
00188             return A_(i+offset_[0], j+offset_[1]);
00189         }
00190
00191         inline const T & operator() (Subscript i, Subscript j) const
00192         {
00193 #ifdef TNT_BOUNDS_CHECK
00194             assert( A_.lbound() <= i);
00195             assert( i<= dim_[0] + A_.lbound()-1);
00196             assert( A_.lbound() <= j);
00197             assert( j<= dim_[1] + A_.lbound()-1 );
00198 #endif
00199             return A_(i+offset_[0], j+offset_[1]);
00200         }
00201
00202
00203         Region2D<Array2D> & operator=(const Region2D<Array2D> &R)
00204         {
00205             Subscript M = num_rows();
00206             Subscript N = num_cols();
00207
00208             // make sure both sides conform
00209             assert(M == R.num_rows());
00210             assert(N == R.num_cols());
00211
00212
00213             Subscript start = R.lbound();
00214             Subscript Mend =  start + M - 1;
00215             Subscript Nend =  start + N - 1;
00216             for (Subscript i=start; i<=Mend; i++)
00217               for (Subscript j=start; j<=Nend; j++)
00218                 (*this)(i,j) = R(i,j);
00219
00220             return *this;
00221         }
00222
00223         Region2D<Array2D> & operator=(const const_Region2D<Array2D> &R)
00224         {
00225             Subscript M = num_rows();
00226             Subscript N = num_cols();
00227
00228             // make sure both sides conform
00229             assert(M == R.num_rows());
00230             assert(N == R.num_cols());
00231
00232
00233             Subscript start = R.lbound();
00234             Subscript Mend =  start + M - 1;
00235             Subscript Nend =  start + N - 1;
00236             for (Subscript i=start; i<=Mend; i++)
00237               for (Subscript j=start; j<=Nend; j++)
00238                 (*this)(i,j) = R(i,j);
00239
00240             return *this;
00241         }
00242
00243         Region2D<Array2D> & operator=(const Array2D &R)
00244         {
00245             Subscript M = num_rows();
00246             Subscript N = num_cols();
00247
00248             // make sure both sides conform
00249             assert(M == R.num_rows());
00250             assert(N == R.num_cols());
00251
00252
00253             Subscript start = R.lbound();
00254             Subscript Mend =  start + M - 1;
00255             Subscript Nend =  start + N - 1;
00256             for (Subscript i=start; i<=Mend; i++)
00257               for (Subscript j=start; j<=Nend; j++)
00258                 (*this)(i,j) = R(i,j);
00259
00260             return *this;
00261         }
00262
00263         Region2D<Array2D> & operator=(const  T &scalar)
00264         {
00265             Subscript start = lbound();
00266             Subscript Mend = lbound() + num_rows() - 1;
00267             Subscript Nend = lbound() + num_cols() - 1;
00268
00269
00270             for (Subscript i=start; i<=Mend; i++)
00271               for (Subscript j=start; j<=Nend; j++)
00272                 (*this)(i,j) = scalar;
00273
00274             return *this;
00275         }
00276
00277 };
00278
00279 //************************
00280
00281 template <class Array2D>
00282 class const_Region2D
00283 {
00284     protected:
00285
00286         const Array2D &  A_;
00287         Subscript offset_[2];       // 0-offset internally
00288         Subscript dim_[2];
00289
00290     public:
00291     typedef typename Array2D::value_type T;
00292         typedef         T   value_type;
00293         typedef         T   element_type;
00294         typedef const   T*  const_iterator;
00295         typedef const   T&  const_reference;
00296
00297         const Array2D & array() const { return A_; }
00298         Subscript lbound() const { return A_.lbound(); }
00299         Subscript num_rows() const { return dim_[0]; }
00300         Subscript num_cols() const { return dim_[1]; }
00301         Subscript offset(Subscript i) const                 // 1-offset
00302         {
00303 #ifdef TNT_BOUNDS_CHECK
00304             assert( TNT_BASE_OFFSET <= i);
00305             assert( i<= dim_[0] + TNT_BASE_OFFSET-1);
00306 #endif
00307             return offset_[i-TNT_BASE_OFFSET];
00308         }
00309
00310         Subscript dim(Subscript i) const
00311         {
00312 #ifdef TNT_BOUNDS_CHECK
00313             assert( TNT_BASE_OFFSET <= i);
00314             assert( i<= dim_[0] + TNT_BASE_OFFSET-1);
00315 #endif
00316             return dim_[i-TNT_BASE_OFFSET];
00317         }
00318
00319
00320         const_Region2D(const Array2D &A, Subscript i1, Subscript i2,
00321                 Subscript j1, Subscript j2) : A_(A)
00322         {
00323 #ifdef TNT_BOUNDS_CHECK
00324             assert( i1 <= i2 );
00325             assert( j1 <= j2);
00326             assert( TNT_BASE_OFFSET <= i1);
00327             assert( i2<= A.dim(TNT_BASE_OFFSET) + TNT_BASE_OFFSET-1);
00328             assert( TNT_BASE_OFFSET <= j1);
00329             assert( j2<= A.dim(TNT_BASE_OFFSET+1) + TNT_BASE_OFFSET-1 );
00330 #endif
00331
00332             offset_[0] = i1-TNT_BASE_OFFSET;
00333             offset_[1] = j1-TNT_BASE_OFFSET;
00334             dim_[0] = i2-i1+1;
00335             dim_[1] = j2-j1+1;
00336         }
00337
00338         const_Region2D(const Array2D &A, const Index1D &I, const Index1D &J)
00339                 : A_(A)
00340         {
00341 #ifdef TNT_BOUNDS_CHECK
00342             assert( I.lbound() <= I.ubound() );
00343             assert( J.lbound() <= J.ubound() );
00344             assert( TNT_BASE_OFFSET <= I.lbound());
00345             assert( I.ubound()<= A.dim(TNT_BASE_OFFSET) + TNT_BASE_OFFSET-1);
00346             assert( TNT_BASE_OFFSET <= J.lbound());
00347             assert( J.ubound() <= A.dim(TNT_BASE_OFFSET+1) + TNT_BASE_OFFSET-1 );
00348 #endif
00349
00350             offset_[0] = I.lbound()-TNT_BASE_OFFSET;
00351             offset_[1] = J.lbound()-TNT_BASE_OFFSET;
00352             dim_[0] = I.ubound() - I.lbound() + 1;
00353             dim_[1] = J.ubound() - J.lbound() + 1;
00354         }
00355
00356
00357         const_Region2D(const_Region2D<Array2D> &A, Subscript i1,
00358                 Subscript i2,
00359             Subscript j1, Subscript j2) : A_(A.A_)
00360         {
00361 #ifdef TNT_BOUNDS_CHECK
00362             assert( i1 <= i2 );
00363             assert( j1 <= j2);
00364             assert( TNT_BASE_OFFSET <= i1);
00365             assert( i2<= A.dim(TNT_BASE_OFFSET) + TNT_BASE_OFFSET-1);
00366             assert( TNT_BASE_OFFSET <= j1);
00367             assert( j2<= A.dim(TNT_BASE_OFFSET+1) + TNT_BASE_OFFSET-1 );
00368 #endif
00369             offset_[0] = (i1 - TNT_BASE_OFFSET) + A.offset_[0];
00370             offset_[1] = (j1 - TNT_BASE_OFFSET) + A.offset_[1];
00371             dim_[0] = i2-i1 + 1;
00372             dim_[1] = j2-j1+1;
00373         }
00374
00375         const_Region2D<Array2D> operator()(Subscript i1, Subscript i2,
00376                 Subscript j1, Subscript j2)
00377         {
00378 #ifdef TNT_BOUNDS_CHECK
00379             assert( i1 <= i2 );
00380             assert( j1 <= j2);
00381             assert( TNT_BASE_OFFSET <= i1);
00382             assert( i2<= dim_[0] + TNT_BASE_OFFSET-1);
00383             assert( TNT_BASE_OFFSET <= j1);
00384             assert( j2<= dim_[0] + TNT_BASE_OFFSET-1 );
00385 #endif
00386             return const_Region2D<Array2D>(A_,
00387                     i1+offset_[0], offset_[0] + i2,
00388                     j1+offset_[1], offset_[1] + j2);
00389         }
00390
00391
00392         const_Region2D<Array2D> operator()(const Index1D &I,
00393                 const Index1D &J)
00394         {
00395 #ifdef TNT_BOUNDS_CHECK
00396             assert( I.lbound() <= I.ubound() );
00397             assert( J.lbound() <= J.ubound() );
00398             assert( TNT_BASE_OFFSET <= I.lbound());
00399             assert( I.ubound()<= dim_[0] + TNT_BASE_OFFSET-1);
00400             assert( TNT_BASE_OFFSET <= J.lbound());
00401             assert( J.ubound() <= dim_[1] + TNT_BASE_OFFSET-1 );
00402 #endif
00403
00404             return const_Region2D<Array2D>(A_, I.lbound()+offset_[0],
00405                 offset_[0] + I.ubound(), offset_[1]+J.lbound(),
00406                 offset_[1] + J.ubound());
00407         }
00408
00409
00410         inline const T & operator() (Subscript i, Subscript j) const
00411         {
00412 #ifdef TNT_BOUNDS_CHECK
00413             assert( TNT_BASE_OFFSET <= i);
00414             assert( i<= dim_[0] + TNT_BASE_OFFSET-1);
00415             assert( TNT_BASE_OFFSET <= j);
00416             assert( j<= dim_[1] + TNT_BASE_OFFSET-1 );
00417 #endif
00418             return A_(i+offset_[0], j+offset_[1]);
00419         }
00420
00421 };
00422
00423
00424 //  ************** std::ostream algorithms *******************************
00425
00426 template <class Array2D>
00427 std::ostream& operator<<(std::ostream &s, const const_Region2D<Array2D> &A)
00428 {
00429     Subscript start = A.lbound();
00430     Subscript Mend=A.lbound()+ A.num_rows() - 1;
00431     Subscript Nend=A.lbound() + A.num_cols() - 1;
00432
00433
00434     s << A.num_rows() << "  " << A.num_cols() << "\n";
00435     for (Subscript i=start; i<=Mend; i++)
00436     {
00437         for (Subscript j=start; j<=Nend; j++)
00438         {
00439             s << A(i,j) << " ";
00440         }
00441         s << "\n";
00442     }
00443
00444
00445     return s;
00446 }
00447
00448 template <class Array2D>
00449 std::ostream& operator<<(std::ostream &s, const Region2D<Array2D> &A)
00450 {
00451     Subscript start = A.lbound();
00452     Subscript Mend=A.lbound()+ A.num_rows() - 1;
00453     Subscript Nend=A.lbound() + A.num_cols() - 1;
00454
00455
00456     s << A.num_rows() << "  " << A.num_cols() << "\n";
00457     for (Subscript i=start; i<=Mend; i++)
00458     {
00459         for (Subscript j=start; j<=Nend; j++)
00460         {
00461             s << A(i,j) << " ";
00462         }
00463         s << "\n";
00464     }
00465
00466
00467     return s;
00468
00469 }
00470
00471 } // namespace TNT
00472
00473 #endif
00474 // REGION2D_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/RegionMatcher.cpp Source File

Matcher2D

RegionMatcher.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "RegionMatcher.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 #define INSTUC(uctype)\
00032 template void RegionMatcher::NCC<uctype>(double p1[2], double p2[2],\
00033   uctype **ida1, uctype **ida2, unsigned halfwinsize, double& result);\
00034 template void RegionMatcher::NCC<uctype>(unsigned int p1[2], \
00035   unsigned int p2[2],\
00036   uctype **ida1, uctype **roi1, uctype **ida2, uctype **roi2, unsigned hww, \
00037   unsigned hwh, double& result);\
00038 template int RegionMatcher::NCCSearchOdd<uctype>(unsigned int p1[2],\
00039   unsigned int p2[2], uctype **ida1, uctype **ida2,\
00040   unsigned int halfnccwinsize,\
00041   unsigned int halfsearchwinsize, unsigned int resultpoint[2],\
00042   double mincorrelation, double& result);\
00043 template int RegionMatcher::NCCSearchEven<uctype>(unsigned int p1[2],\
00044   unsigned int p2[2],uctype **ida1, uctype **ida2,unsigned int halfnccwinsize,\
00045   unsigned int halfsearchwinsize, unsigned int resultpoint[2],\
00046   double mincorrelation, double& result);\
00047 template int RegionMatcher::LineMatcherNCC<uctype>(unsigned int p1[2],\
00048   unsigned int start2[2], unsigned int end2[2], uctype **ida1, uctype **ida2,\
00049   uctype **grad1, uctype **grad2, unsigned int halfwinsize,\
00050   unsigned int epsilon, double gradientscale, unsigned int result[2],\
00051   double& correlation);\
00052 template int RegionMatcher::LineMatcherSAD<uctype>(unsigned int p1[2],\
00053   unsigned int start2[2], unsigned int end2[2], uctype **ida1, uctype **ida2,\
00054   uctype **grad1, uctype **grad2, unsigned int halfwinsize,\
00055   unsigned int epsilon, double gradientscale, unsigned int result[2],\
00056   double& sad);\
00057 template int RegionMatcher::ParabolaNCC(unsigned int p1[2],\
00058   unsigned int p2[2], uctype **ida1, uctype **ida2,\
00059   unsigned int halfwinsize, KLT_TYPE result[2]);\
00060 template int RegionMatcher::ParabolaNCC5(unsigned int p1[2],\
00061   unsigned int p2[2], uctype **ida1, uctype **ida2,\
00062   unsigned int halfwinsize, KLT_TYPE result[2]);\
00063 template void RegionMatcher::ColorNCC<uctype>(unsigned int p1[2],\
00064  unsigned int p2[2],\
00065  uctype **ida1, uctype **ida2, unsigned int halfwinsize, double& result);\
00066 template void RegionMatcher::CNCC<uctype>(unsigned int p1[2],\
00067  unsigned int p2[2],\
00068  uctype **ida1, uctype **ida2, unsigned int halfwinsize, double& result);\
00069
00070 #define INST(type)\
00071 INSTUC(type)\
00072 template void RegionMatcher::SSD<type>(unsigned int p1[2], unsigned int p2[2],\
00073   type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
00074 template void RegionMatcher::NCC<type>(unsigned int p1[2], unsigned int p2[2],\
00075   type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
00076 template void RegionMatcher::SAD<type>(unsigned int p1[2], unsigned int p2[2],\
00077   type **ida1, type **ida2, unsigned int halfwinsize, double& result);\
00078 template void RegionMatcher::SADN<type>(unsigned int p1[2],unsigned int p2[2],\
00079   type **ida1, type **ida2, unsigned int halfwinsize, double& result);
00080
00081
00082
00083 INSTUC(unsigned char)
00084 INST(float)
00085
00086 // fill in instances as required
00087 #ifdef BUILD_IMAGE_INT
00088 INST(int)
00089 #endif
00090 #ifdef BUILD_IMAGE_CHAR
00091 INST(char)
00092 #endif
00093 #ifdef BUILD_IMAGE_SHORT
00094 INST(short)
00095 #endif
00096 #ifdef BUILD_IMAGE_USHORT
00097 INST(unsigned short)
00098 #endif
00099 #ifdef BUILD_IMAGE_UINT
00100 INST(unsigned int)
00101 #endif
00102 #ifdef BUILD_IMAGE_DOUBLE
00103 INST(double)
00104 #endif
00105
00106
00107 #include "LineMatcher.cpp"
00108 #include "SimilarityMeasure.cpp"
00109
00110
00111 RegionMatcher::RegionMatcher()
00112   : Debug()
00113 {
00114   _klthws=_ncchws=_winsize=_nccwinsize=0;
00115   _bl1_5.newsize(5, 5);
00116   _bl2_5.newsize(5, 5);
00117   _gx1_5.newsize(5, 5);
00118   _gy1_5.newsize(5, 5);
00119   _gx2_5.newsize(5, 5);
00120   _gy2_5.newsize(5, 5);
00121   _gsx_5.newsize(5, 5);
00122   _gsy_5.newsize(5, 5);
00123 }
00124
00125 RegionMatcher::~RegionMatcher()
00126 {}
00127
00128
00129
00130 template <class StorageType>
00131 int RegionMatcher::NCCSearchOdd(unsigned int p1[2], unsigned int p2[2],
00132                                 StorageType **ida1, StorageType **ida2,
00133                                 unsigned int halfnccwinsize,
00134                                 unsigned int halfsearchwinsize,
00135                                 unsigned int resultpoint[2],
00136                                 double mincorrelation, double& result)
00137 {
00138   int res=0; // return value
00139   unsigned int p3[2], p4[2];
00140   double tmpresult, maxresult;
00141
00142   BIASDOUT(D_REGION_MATCHER_SEARCH_ODD, "\np1: "<<p1[0]<<" "<<p1[1]
00143            <<"\tp2: "<<p2[0]<<" "<<p2[1]<<"\tida1: "<<&ida1[0]
00144            <<" ida2: "<<&ida2[0]<<" halfnccwinsize: "<<halfnccwinsize);
00145   // initialize maxresult and point
00146   resultpoint[0]=p2[0];
00147   resultpoint[1]=p2[1];
00148   NCC(p1, p2, ida1, ida2, halfnccwinsize, maxresult);
00149   BIASDOUT(D_REGION_MATCHER_SEARCH_ODD,"("<<p2[0]<<", "<<p2[1]<<") : "
00150            <<maxresult);
00151   if (maxresult > mincorrelation){
00152     result = maxresult;
00153     BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "first correlation succeeded "
00154              <<result);
00155   } else {
00156     BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "first correlation "<<maxresult);
00157     for (register unsigned int sr=1; sr<=halfsearchwinsize; sr++){
00158       BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "search radius " << sr);
00159       p3[1]=p2[1]-sr;
00160       p4[1]=p2[1]+sr;
00161       for (p3[0]=p2[0]-sr, p4[0]=p2[0]-sr; p3[0]<=p2[0]+sr;
00162            p3[0]++, p4[0]++){
00163         NCC(p1, p3, ida1, ida2, halfnccwinsize, tmpresult);
00164         BIASDOUT(D_REGION_MATCHER_SEARCH_ODD,"("<<p3[0]<<", "<<p3[1]<<") : "
00165                  <<tmpresult);
00166         if (tmpresult>maxresult){
00167           maxresult = tmpresult;
00168           resultpoint[0]=p3[0]; resultpoint[1]=p3[1];
00169         }
00170         if (maxresult>mincorrelation) break;
00171
00172         NCC(p1, p4, ida1, ida2, halfnccwinsize, tmpresult);
00173         BIASDOUT(D_REGION_MATCHER_SEARCH_ODD,"("<<p4[0]<<", "<<p4[1]<<") : "
00174                  <<tmpresult);
00175         if (tmpresult>maxresult){
00176           maxresult = tmpresult;
00177           resultpoint[0]=p4[0]; resultpoint[1]=p4[1];
00178         }
00179         if (maxresult>mincorrelation) break;
00180       }
00181       if (maxresult<result){
00182         p3[0]=p2[0]-sr;
00183         p4[0]=p2[0]+sr;
00184         for (p3[1]=p2[1]-sr-1, p4[1]=p2[1]-sr-1; p3[1]<=p2[1]+sr-1;
00185              p3[1]++, p4[1]++){
00186           NCC(p1, p3, ida1, ida2, halfnccwinsize, tmpresult);
00187           BIASDOUT(D_REGION_MATCHER_SEARCH_ODD,"("<<p3[0]<<", "<<p3[1]<<") : "
00188                    <<tmpresult);
00189           if (tmpresult>maxresult){
00190             maxresult = tmpresult;
00191             resultpoint[0]=p3[0]; resultpoint[1]=p3[1];
00192           }
00193           if (maxresult>mincorrelation) break;
00194
00195           NCC(p1, p4, ida1, ida2, halfnccwinsize, tmpresult);
00196           BIASDOUT(D_REGION_MATCHER_SEARCH_ODD,"("<<p4[0]<<", "<<p4[1]<<") : "
00197                    <<tmpresult);
00198           if (tmpresult>maxresult) {
00199             maxresult = tmpresult;
00200             resultpoint[0]=p4[0]; resultpoint[1]=p4[1];
00201           }
00202           if (maxresult>mincorrelation) break;
00203         }
00204       }
00205       if (maxresult>mincorrelation){
00206         result = maxresult;
00207         BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "succeeded at searchradius "<<sr
00208                  <<" with "<<result<<" correlation point: "<<resultpoint);
00209         break;
00210       }
00211     } // for (sr=1; sr<=halfsearchwinsize; sr++)
00212     result=maxresult;
00213     if (mincorrelation < 1.0 && result < mincorrelation){
00214       BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "no success within "<<p2[0] <<" "
00215                << p2[1]
00216                <<" +/- "<<halfsearchwinsize<<"  max correlation "<<result
00217                <<" at "<<resultpoint<< " still lower than "<<mincorrelation);
00218       res=-3;
00219     } else if (mincorrelation >= 1.0){
00220       BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "searched within "<<p2[0]<<" "
00221                <<p2[1]
00222                <<" +/- "<<halfsearchwinsize<<" found max correlation "<<result
00223                <<" at "<<resultpoint[0]<<", "<<resultpoint[1]);
00224     }
00225   } // if (maxresult > result)
00226
00227   return res;
00228 }
00229
00230
00231 template <class StorageType>
00232 int RegionMatcher::NCCSearchEven(unsigned int p1[2], unsigned int p2[2],
00233                                 StorageType **ida1, StorageType **ida2,
00234                                 unsigned int halfnccwinsize,
00235                                 unsigned int halfsearchwinsize,
00236                                 unsigned int resultpoint[2],
00237                                 double mincorrelation, double& result)
00238 {
00239   int res=0; // return value
00240   unsigned int p3[2], p4[2];
00241   double tmpresult, maxresult=-1.0;
00242
00243   /*
00244   // initialize maxresult and point
00245   resultpoint[0]=p2[0];
00246   resultpoint[1]=p2[1];
00247   NCC(p1, p2, ida1, ida2, halfnccwinsize, maxresult);
00248   BIASDOUT(D_REGION_MATCHER_SEARCH_EVEN,"("<<p2[0]<<", "<<p2[1]<<") : "
00249   <<maxresult);
00250   if (maxresult > mincorrelation){
00251   result = maxresult;
00252   BIASDOUT(D_REGION_MATCHER_SEARCHNCC,"first correlation succeeded "
00253   <<result);
00254   } else {
00255   BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "first correlation = "<<maxresult
00256   <<"  at "<<p2[0]<<" "<<p2[1]);
00257   */
00258   BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "\np1: "<<p1[0]<<" "<<p1[1]
00259            <<"\tp2: "<<p2[0]<<" "<<p2[1]<<"\tida1: "<<&ida1[0]
00260            <<" ida2: "<<&ida2[0]<<" halfnccwinsize: "<<halfnccwinsize);
00261   for (register unsigned int sr=1; sr<=halfsearchwinsize; sr++){
00262     BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "search radius " << sr);
00263     // top and bottom side of quadrate
00264     p3[1]=p2[1]-sr+1;
00265     p4[1]=p2[1]+sr;
00266     for (p3[0]=p2[0]-sr+1, p4[0]=p2[0]-sr+1; p3[0]<=p2[0]+sr;
00267          p3[0]++, p4[0]++){
00268       NCC(p1, p3, ida1, ida2, halfnccwinsize, tmpresult);
00269       BIASDOUT(D_REGION_MATCHER_SEARCH_EVEN,"("<<p3[0]<<", "<<p3[1]<<") : "
00270                <<tmpresult);
00271       if (tmpresult>maxresult){
00272         maxresult = tmpresult;
00273         resultpoint[0]=p3[0]; resultpoint[1]=p3[1];
00274       }
00275       if (maxresult>mincorrelation) break;
00276
00277       NCC(p1, p4, ida1, ida2, halfnccwinsize, tmpresult);
00278       BIASDOUT(D_REGION_MATCHER_SEARCH_EVEN,"("<<p4[0]<<", "<<p4[1]<<") : "
00279                <<tmpresult);
00280       if (tmpresult>maxresult){
00281         maxresult = tmpresult;
00282         resultpoint[0]=p4[0]; resultpoint[1]=p4[1];
00283       }
00284       if (maxresult>mincorrelation) break;
00285     }
00286     if (maxresult<mincorrelation){
00287       p3[0]=p2[0]-sr+1;
00288       p4[0]=p2[0]+sr;
00289       for (p3[1]=p2[1]-sr+2, p4[1]=p2[1]-sr+2; p3[1]<=p2[1]+sr-1;
00290            p3[1]++, p4[1]++){
00291         NCC(p1, p3, ida1, ida2, halfnccwinsize, tmpresult);
00292         BIASDOUT(D_REGION_MATCHER_SEARCH_EVEN,"("<<p3[0]<<", "<<p3[1]<<") : "
00293                  <<tmpresult);
00294         if (tmpresult>maxresult){
00295           maxresult = tmpresult;
00296           resultpoint[0]=p3[0]; resultpoint[1]=p3[1];
00297         }
00298         if (maxresult>mincorrelation) break;
00299
00300         NCC(p1, p4, ida1, ida2, halfnccwinsize, tmpresult);
00301         BIASDOUT(D_REGION_MATCHER_SEARCH_EVEN,"("<<p4[0]<<", "<<p4[1]<<") : "
00302                  <<tmpresult);
00303         if (tmpresult>maxresult) {
00304           maxresult = tmpresult;
00305           resultpoint[0]=p4[0]; resultpoint[1]=p4[1];
00306         }
00307         if (maxresult>mincorrelation) break;
00308       }
00309     }
00310     if (maxresult>mincorrelation){
00311       result = maxresult;
00312       BIASDOUT(D_REGION_MATCHER_SEARCHNCC, "succeeded at searchradius "<<sr
00313                <<" with "<<result<<" correlation point: "<<resultpoint);
00314       break;
00315     }
00316   } // for (sr=1; sr<=halfsearchwinsize; sr++)
00317   result=maxresult;
00318   if (mincorrelation < 1.0 && result < mincorrelation){
00319     BIASDOUT(D_REGION_MATCHER_SEARCHNCC,"no success within "<<p2[0]<<" "
00320              <<p2[1]
00321              <<" +/- "<<halfsearchwinsize<<"  max correlation "<<result
00322              <<" at "<<resultpoint<< " still lower than "<<mincorrelation);
00323     res=-3;
00324   } else if (mincorrelation >= 1.0){
00325     BIASDOUT(D_REGION_MATCHER_SEARCHNCC,"searched within "<<p2[0]<<" "<<p2[1]
00326              <<" +/- "<<halfsearchwinsize<<" found max correlation "<<result
00327              <<" at "<<resultpoint[0]<<", "<<resultpoint[1]);
00328   }
00329   //  } // if (maxresult > result)
00330
00331   return res;
00332 }
00333
00334 template <class StorageType>
00335 KLT_TYPE RegionMatcher::_Bilinear(StorageType **ida, KLT_TYPE x, KLT_TYPE y)
00336 {
00337   unsigned int x_floor=(unsigned int)floor(x);
00338   unsigned int y_floor=(unsigned int)floor(y);
00339   unsigned int x_ceil=(unsigned int)ceil(x);
00340   unsigned int y_ceil=(unsigned int)ceil(y);
00341   StorageType ul = ida[y_floor][x_floor];
00342   StorageType ur = ida[y_floor][x_ceil];
00343   StorageType ll = ida[y_ceil][x_floor];
00344   StorageType lr = ida[y_ceil][x_ceil];
00345   KLT_TYPE dy = y - y_floor;
00346   KLT_TYPE dx = x - x_floor;
00347
00348   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur );
00349 }
00350
00351 KLT_TYPE RegionMatcher::_Bilinear(unsigned char**ida,
00352                                                  KLT_TYPE x, KLT_TYPE y)
00353 {
00354 //   unsigned int x_floor=(unsigned int)floor(x);
00355 //   unsigned int y_floor=(unsigned int)floor(y);
00356 //   unsigned int x_ceil=(unsigned int)ceil(x);
00357 //   unsigned int y_ceil=(unsigned int)ceil(y);
00358 //   int ul = (int)(ida[y_floor][x_floor]);
00359 //   int ur = (int)(ida[y_floor][x_ceil]);
00360 //   int ll = (int)(ida[y_ceil][x_floor]);
00361 //   int lr = (int)(ida[y_ceil][x_ceil]);
00362 //   KLT_TYPE dy = y - y_floor;
00363 //   KLT_TYPE dx = x - x_floor;
00364
00365 //   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur );
00366   register unsigned int x_floor = (unsigned int)floor(x);
00367   register unsigned int y_floor = (unsigned int)floor(y);
00368   register unsigned int x_ceil = x_floor+1;
00369   register unsigned int y_ceil = y_floor+1;
00370   register unsigned int ul = (unsigned int)ida[y_floor][x_floor];
00371   register unsigned int ur = (unsigned int)ida[y_floor][x_ceil];
00372   register unsigned int ll = (unsigned int)ida[y_ceil][x_floor];
00373   register unsigned int lr = (unsigned int)ida[y_ceil][x_ceil];
00374   register unsigned int dy = (unsigned int)rint((y - y_floor)*256);
00375   register unsigned int dx = (unsigned int)rint((x - x_floor)*256);
00376
00377   return (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) +
00378                           dy*dx*(ul - ll - ur + lr))>>16);
00379 }
00380
00381 template <class StorageType>
00382 void RegionMatcher::_BilinearRegion(StorageType **ida, KLT_TYPE x,
00383                                     KLT_TYPE y, unsigned hws,
00384                                     Matrix<KLT_TYPE>& res)
00385 {
00386   unsigned  x_floor = (unsigned int)floor(x);
00387   unsigned y_floor = (unsigned int)floor(y);
00388   unsigned x_floor_end = x_floor+hws+1;
00389   unsigned y_floor_end = y_floor+hws+1;
00390   unsigned rf, rc, cf, cc, r, c;
00391   StorageType ul, ur, ll, lr;
00392   register KLT_TYPE dy = (KLT_TYPE)(y - y_floor);
00393   register KLT_TYPE dx = (KLT_TYPE)(x - x_floor);
00394   register KLT_TYPE dxy = dx*dy;
00395   for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00396     for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00397       ul = ida[rf][cf];
00398       ur = ida[rf][cc];
00399       ll = ida[rc][cf];
00400       lr = ida[rc][cc];
00401       res[r][c]=(KLT_TYPE)(ul + dy*(ll - ul) + dx*(ur - ul) +
00402                            dxy*(ul + lr - ll - ur));
00403     }
00404   }
00405 }
00406
00407
00408 void RegionMatcher::_BilinearRegion(unsigned char **ida, KLT_TYPE x,
00409                     KLT_TYPE y, unsigned hws,
00410                     Matrix<KLT_TYPE>& res)
00411 {
00412   unsigned int x_floor = (unsigned int)floor(x);
00413   unsigned int y_floor = (unsigned int)floor(y);
00414   unsigned int x_floor_end = x_floor+hws+1;
00415   unsigned int y_floor_end = y_floor+hws+1;
00416   unsigned rf, rc, cf, cc, r, c;
00417   unsigned ul, ur, ll, lr;
00418   register unsigned int dy = (unsigned int)rint((y - y_floor)*256);
00419   register unsigned int dx = (unsigned int)rint((x - x_floor)*256);
00420   register unsigned int dxy = dx * dy;
00421   for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00422     for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00423       ul = (unsigned)ida[rf][cf];
00424       ur = (unsigned)ida[rf][cc];
00425       ll = (unsigned)ida[rc][cf];
00426       lr = (unsigned)ida[rc][cc];
00427       res[r][c]=(unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) +
00428                                  (dx<<8)*(ur - ul) +
00429                                  dxy*(ul - ll - ur + lr))>>16);
00430     }
00431   }
00432   //BIASERR("unfinished and untested");
00433 }
00434
00435 /*
00436 template <class StorageType>
00437 KLT_TYPE RegionMatcher::_BilinearGrad(StorageType **ida, KLT_TYPE x, KLT_TYPE y)
00438 {
00439   unsigned int x_floor=(unsigned int)floor(x);
00440   unsigned int y_floor=(unsigned int)floor(y);
00441   unsigned int x_ceil=(unsigned int)ceil(x);
00442   unsigned int y_ceil=(unsigned int)ceil(y);
00443   KLT_TYPE ul = (KLT_TYPE)(ida[y_floor][x_floor])-SOBEL_GRAD_UC_ZERO;
00444   KLT_TYPE ur = (KLT_TYPE)(ida[y_floor][x_ceil])-SOBEL_GRAD_UC_ZERO;
00445   KLT_TYPE ll = (KLT_TYPE)(ida[y_ceil][x_floor])-SOBEL_GRAD_UC_ZERO;
00446   KLT_TYPE lr = (KLT_TYPE)(ida[y_ceil][x_ceil])-SOBEL_GRAD_UC_ZERO;
00447   KLT_TYPE dy = y - y_floor;
00448   KLT_TYPE dx = x - x_floor;
00449
00450   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur );
00451 }
00452
00453 // also moves gradient in [-127, 127] befor interpolating
00454
00455 template <>
00456 KLT_TYPE RegionMatcher::_BilinearGrad<unsigned char>(unsigned char **ida, KLT_TYPE x, KLT_TYPE y)
00457 {
00458   unsigned int x_floor=(unsigned int)floor(x);
00459   unsigned int y_floor=(unsigned int)floor(y);
00460   unsigned int x_ceil=(unsigned int)ceil(x);
00461   unsigned int y_ceil=(unsigned int)ceil(y);
00462   int ul = (int)(ida[y_floor][x_floor])-SOBEL_GRAD_UC_ZERO;
00463   int ur = (int)(ida[y_floor][x_ceil])-SOBEL_GRAD_UC_ZERO;
00464   int ll = (int)(ida[y_ceil][x_floor])-SOBEL_GRAD_UC_ZERO;
00465   int lr = (int)(ida[y_ceil][x_ceil])-SOBEL_GRAD_UC_ZERO;
00466   KLT_TYPE dy = y - y_floor;
00467   KLT_TYPE dx = x - x_floor;
00468
00469   return ul + dy*(ll - ul) + dx*(ur - ul) + dy*dx*(ul + lr - ll - ur );
00470 }
00471
00472 template <class StorageType>
00473 void RegionMatcher::_BilinearRegionGrad(StorageType **ida, KLT_TYPE x,
00474                                         KLT_TYPE y, unsigned hws,
00475                                         Matrix<KLT_TYPE>& res)
00476 {
00477   unsigned x_floor = (unsigned int)floor(x);
00478   unsigned y_floor = (unsigned int)floor(y);
00479   unsigned x_floor_end = x_floor+hws+1;
00480   unsigned y_floor_end = y_floor+hws+1;
00481   unsigned rf, rc, cf, cc, r, c;
00482   KLT_TYPE ul, ur, ll, lr;
00483   register KLT_TYPE dy = (KLT_TYPE)(y - y_floor);
00484   register KLT_TYPE dx = (KLT_TYPE)(x - x_floor);
00485   register KLT_TYPE dxy = dx*dy;
00486   for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00487     for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00488       ul = (KLT_TYPE)ida[rf][cf]-(KLT_TYPE)SOBEL_GRAD_UC_ZERO;
00489       ur = (KLT_TYPE)ida[rf][cc]-(KLT_TYPE)SOBEL_GRAD_UC_ZERO;
00490       ll = (KLT_TYPE)ida[rc][cf]-(KLT_TYPE)SOBEL_GRAD_UC_ZERO;
00491       lr = (KLT_TYPE)ida[rc][cc]-(KLT_TYPE)SOBEL_GRAD_UC_ZERO;
00492       res[r][c]=(ul + dy*(ll - ul) + dx*(ur - ul) + dxy*(ul + lr - ll - ur));
00493     }
00494   }
00495
00496 }
00497 */
00498
00499 template <class StorageType>
00500 int RegionMatcher::ParabolaNCC(unsigned int p1[2], unsigned int p2[2],
00501                                StorageType **ida1, StorageType **ida2,
00502                                unsigned int halfwinsize, KLT_TYPE result[2])
00503 {
00504   int res=0;
00505
00506   double x1, x2, x3, y1, y2, y3;
00507   unsigned int p2tmp[2];
00508   BIASDOUT(D_REGION_MATCHER_PARABOLA, "p1 ("<<p1[0]<<", "<<p1[1]<<")\tp2 ("
00509            <<p2[0]<<", "<<p2[1]<<")\tida1: "<<&ida1[0]<<" ida2: "<<&ida2[0]
00510            <<"  halfwinsize: "<<halfwinsize);
00511   NCC(p1, p2, ida1, ida2, halfwinsize, x2);
00512   //cerr <<"x2: "<<x2<<endl;
00513   y2=x2;
00514   p2tmp[0]=p2[0];
00515   p2tmp[1]=p2[1]-1;
00516   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y1);
00517   p2tmp[1]=p2[1]+1;
00518   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y3);
00519   p2tmp[0]=p2[0]-1;
00520   p2tmp[1]=p2[1];
00521   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x1);
00522   p2tmp[0]=p2[0]+1;
00523   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x3);
00524
00525
00526   if (x3>=x2 || x1>=x2) {
00527     BIASERR("invalid correlation data "<<x1<<" "<<x2
00528             <<" "<<x3<<"\n\tcorrelation between ("
00529             <<p1[0]<<", "<<p1[1]<<") and ("<<p2[0]
00530             <<", "<<p2[1]<<") is not a local maximum");
00531     return -1;
00532   }
00533   if (y3>=y2 || y1>=y2) {
00534     BIASERR("invalid correlation data "<<y1<<" "<<y2
00535             <<" "<<y3<<"\n\tcorrelation between ("
00536             <<p1[0]<<", "<<p1[1]<<") and ("<<p2[0]
00537             <<", "<<p2[1]<<") is not a local maximum");
00538   return -1;
00539   }
00540
00541   result[0]=p2[0]+_ParabolaApprox(x1, x2, x3);
00542   result[1]=p2[1]+_ParabolaApprox(y1, y2, y3);
00543   BIASDOUT(D_REGION_MATCHER_PARABOLA, "\n(x1 x2 x3) : res\t("<<x1<<" "<<x2<<" "
00544            <<x3<<") : "<<result[0]-p2[0]<<"\n(y1 y2 y3) : res\t("
00545            <<y1<<" "<<y2<<" "<<y3<<") : "<<result[1]-p2[1]);
00546   return res;
00547 }
00548
00549
00550 template <class StorageType>
00551 int RegionMatcher::ParabolaNCC5(unsigned int p1[2], unsigned int p2[2],
00552                                 StorageType **ida1, StorageType **ida2,
00553                                 unsigned int halfwinsize, KLT_TYPE result[2])
00554 {
00555   int res=0;
00556
00557   double x1, x2, x3, x4, x5, y1, y2, y3, y4, y5;
00558   unsigned int p2tmp[2];
00559   BIASDOUT(D_REGION_MATCHER_PARABOLA, "p1 ("<<p1[0]<<", "<<p1[1]<<")\tp2 ("
00560            <<p2[0]<<", "<<p2[1]<<")\tida1: "<<&ida1[0]<<" ida2: "<<&ida2[0]
00561            <<"  halfwinsize: "<<halfwinsize);
00562   NCC(p1, p2, ida1, ida2, halfwinsize, x3);
00563   //cerr <<"x2: "<<x2<<endl;
00564   y3=x3;
00565   p2tmp[0]=p2[0];
00566   p2tmp[1]=p2[1]-1;
00567   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y2);
00568   p2tmp[1]=p2[1]-2;
00569   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y1);
00570   p2tmp[1]=p2[1]+1;
00571   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y4);
00572   p2tmp[1]=p2[1]+2;
00573   NCC(p1, p2tmp, ida1, ida2, halfwinsize, y5);
00574   p2tmp[0]=p2[0]-1;
00575   p2tmp[1]=p2[1];
00576   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x2);
00577   p2tmp[0]=p2[0]-2;
00578   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x1);
00579   p2tmp[0]=p2[0]+1;
00580   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x4);
00581   p2tmp[0]=p2[0]+2;
00582   NCC(p1, p2tmp, ida1, ida2, halfwinsize, x5);
00583
00584
00585   if (x1>=x3 || x2>=x3 || x4>=x3 || x5>=x3 ) {
00586     BIASERR("invalid correlation data "<<x1<<" "<<x2
00587             <<" "<<x3<<" "<<x4<<" "<<x5<<"\n\tcorrelation between ("
00588             <<p1[0]<<", "<<p1[1]<<") and ("<<p2[0]
00589             <<", "<<p2[1]<<") is not a local maximum");
00590     return -1;
00591   }
00592   if (y1>=y3 || y2>=y3 || y4>=y3 || y5>=y3 ) {
00593     BIASERR("invalid correlation data "<<y1<<" "<<y2
00594             <<" "<<y3<<" "<<y4<<" "<<y5<<"\n\tcorrelation between ("
00595             <<p1[0]<<", "<<p1[1]<<") and ("<<p2[0]
00596             <<", "<<p2[1]<<") is not a local maximum");
00597     return -1;
00598   }
00599
00600   result[0]=p2[0]+_ParabolaApprox(x1, x2, x3, x4, x5);
00601   result[1]=p2[1]+_ParabolaApprox(y1, y2, y3, y4, y5);
00602   BIASDOUT(D_REGION_MATCHER_PARABOLA,
00603            "\n(x1 x2 x3 x4 x5) : res\t("<<x1<<" "<<x2<<" "<<x3<<" "<<x4
00604            <<" "<<x5<<") : "<<result[0]-p2[0]<<"\n(y1 y2 y3 y4 y5) : res\t("
00605            <<y1<<" "<<y2<<" "<<y3<<" "<<y4<<" "<<y5<<") : "<<result[1]-p2[1]);
00606   return res;
00607 }
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/RegionMatcher.hh Source File

Matcher2D

RegionMatcher.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __RegionMatcher_hh__
00027 #define __RegionMatcher_hh__
00028
00029 #include <bias_config.h>
00030
00031 #include <Base/Debug/Debug.hh>
00032 #include <Base/Debug/Error.hh>
00033 #include <MathAlgo/Lapack.hh>
00034 #include <Base/Math/Matrix2x2.hh>
00035 #include <Base/Math/Vector2.hh>
00036
00037 #define D_REGION_MATCHER_SEARCHNCC   0x0001
00038 #define D_REGION_MATCHER_KLT         0x0002
00039 #define D_REGION_MATCHER_LINE        0x0004
00040 #define D_REGION_MATCHER_PARABOLA    0x0008
00041 #define D_REGION_MATCHER_COLORNCC    0x0010
00042 #define D_REGION_MATCHER_COLORCCV    0x0020
00043 #define D_REGION_MATCHER_KLT_EDGE    0x0040
00044 #define D_REGION_MATCHER_SEARCH_EVEN 0x0080
00045 #define D_REGION_MATCHER_SEARCH_ODD  0x0100
00046
00047 // data type for internal calculations in KLT
00048 #define KLT_TYPE double
00049 //#define KLT_TYPE float
00050
00051 namespace BIAS{
00052
00053   /** some fast SAD functions via defines
00054       @author woelk */
00055 #define absdiff(a, b) ((a>b)?(a-b):(b-a))
00056 #define SAD3x3(x1, y1, x2, y2, ida1, ida2, re)\
00057   unsigned x1m=x1-1, x1p=x1+1, y1m=y1-1, y1p=y1+1;\
00058   unsigned x2m=x2-1, x2p=x2+1, y2m=y2-1, y2p=y2+1;\
00059   re = (unsigned)absdiff(ida1[y1m][x1m], ida2[y2m][x2m]) + \
00060        (unsigned)absdiff(ida1[y1m][x1], ida2[y2m][x2]) + \
00061        (unsigned)absdiff(ida1[y1m][x1p], ida2[y2m][x2p]) + \
00062        (unsigned)absdiff(ida1[y1][x1m], ida2[y2][x2m]) + \
00063        (unsigned)absdiff(ida1[y1][x1], ida2[y2][x2]) + \
00064        (unsigned)absdiff(ida1[y1][x1p], ida2[y2][x2p]) + \
00065        (unsigned)absdiff(ida1[y1p][x1m], ida2[y2p][x2m]) + \
00066        (unsigned)absdiff(ida1[y1p][x1], ida2[y2p][x2]) + \
00067        (unsigned)absdiff(ida1[y1p][x1p], ida2[y2p][x2p]);
00068
00069 #define SAD5x5(x1, y1, x2, y2, ida1, ida2, re)\
00070   unsigned x1m=x1-1, x1p=x1+1, y1m=y1-1, y1p=y1+1, x1m2=x1-2, x1p2=x2+2, y1m2=y2-2, y1p2=y2+2;\
00071   unsigned x2m=x2-1, x2p=x2+1, y2m=y2-1, y2p=y2+1, x2m2=x1-2, x2p2=x2+2, y2m2=y2-2, y2p2=y2+2;\
00072   re = (unsigned)absdiff(ida1[y1m2][x1m2], ida2[y2m2][x2m2]) + \
00073        (unsigned)absdiff(ida1[y1m2][x1m],  ida2[y2m2][x2m]) + \
00074        (unsigned)absdiff(ida1[y1m2][x1],   ida2[y2m2][x2]) + \
00075        (unsigned)absdiff(ida1[y1m2][x1p],  ida2[y2m2][x2p]) + \
00076        (unsigned)absdiff(ida1[y1m2][x1p2], ida2[y2m2][x2p2]) + \
00077        (unsigned)absdiff(ida1[y1m][x1m2], ida2[y2m][x2m2]) + \
00078        (unsigned)absdiff(ida1[y1m][x1m],  ida2[y2m][x2m]) + \
00079        (unsigned)absdiff(ida1[y1m][x1],   ida2[y2m][x2]) + \
00080        (unsigned)absdiff(ida1[y1m][x1p],  ida2[y2m][x2p]) + \
00081        (unsigned)absdiff(ida1[y1m][x1p2], ida2[y2m][x2p2]) + \
00082        (unsigned)absdiff(ida1[y1][x1m2], ida2[y2][x2m2]) + \
00083        (unsigned)absdiff(ida1[y1][x1m],  ida2[y2][x2m]) + \
00084        (unsigned)absdiff(ida1[y1][x1],   ida2[y2][x2]) + \
00085        (unsigned)absdiff(ida1[y1][x1p],  ida2[y2][x2p]) + \
00086        (unsigned)absdiff(ida1[y1][x1p2], ida2[y2][x2p2]) + \
00087        (unsigned)absdiff(ida1[y1p][x1m2], ida2[y2p][x2m2]) + \
00088        (unsigned)absdiff(ida1[y1p][x1m],  ida2[y2p][x2m]) + \
00089        (unsigned)absdiff(ida1[y1p][x1],   ida2[y2p][x2]) + \
00090        (unsigned)absdiff(ida1[y1p][x1p],  ida2[y2p][x2p]) + \
00091        (unsigned)absdiff(ida1[y1p][x1p2], ida2[y2p][x2p2]) + \
00092        (unsigned)absdiff(ida1[y1p2][x1m2], ida2[y2p2][x2m2]) + \
00093        (unsigned)absdiff(ida1[y1p2][x1m],  ida2[y2p2][x2m]) + \
00094        (unsigned)absdiff(ida1[y1p2][x1],   ida2[y2p2][x2]) + \
00095        (unsigned)absdiff(ida1[y1p2][x1p],  ida2[y2p2][x2p]) + \
00096        (unsigned)absdiff(ida1[y1p2][x1p2], ida2[y2p2][x2p2]);
00097
00098 #define NCC5x5(x1, y1, x2, y2, ida1, ida2, re)\
00099   unsigned x1m=x1-1, x1p=x1+1, y1m=y1-1, y1p=y1+1, x1m2=x1-2, x1p2=x2+2, y1m2=y2-2, y1p2=y2+2;\
00100   unsigned x2m=x2-1, x2p=x2+1, y2m=y2-1, y2p=y2+1, x2m2=x1-2, x2p2=x2+2, y2m2=y2-2, y2p2=y2+2;\
00101   int im1, im2; unsigned long S11=0, S12=0, S22=0, N=0, S1=0, S2=0;\
00102   im1=ida1[y1m2][x1m2]; im2=ida2[y2m2][x2m2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00103   im1=ida1[y1m2][x1m];  im2=ida2[y2m2][x2m]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00104   im1=ida1[y1m2][x1];   im2=ida2[y2m2][x2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00105   im1=ida1[y1m2][x1p];  im2=ida2[y2m2][x2p]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00106   im1=ida1[y1m2][x1p2]; im2=ida2[y2m2][x2p2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00107   im1=ida1[y1m][x1m2];  im2=ida2[y2m][x2m2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00108   im1=ida1[y1m][x1m];   im2=ida2[y2m][x2m]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00109   im1=ida1[y1m][x1];    im2=ida2[y2m][x2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00110   im1=ida1[y1m][x1p];   im2=ida2[y2m][x2p]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00111   im1=ida1[y1m][x1p2];  im2=ida2[y2m][x2p2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00112   im1=ida1[y1][x1m2];   im2=ida2[y2][x2m2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00113   im1=ida1[y1][x1m];    im2=ida2[y2][x2m]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00114   im1=ida1[y1][x1];     im2=ida2[y2][x2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00115   im1=ida1[y1][x1p];    im2=ida2[y2][x2p]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00116   im1=ida1[y1][x1p2];   im2=ida2[y2][x2p2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00117   im1=ida1[y1p][x1m2];  im2=ida2[y2p][x2m2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00118   im1=ida1[y1p][x1m];   im2=ida2[y2p][x2m]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00119   im1=ida1[y1p][x1];    im2=ida2[y2p][x2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00120   im1=ida1[y1p][x1p];   im2=ida2[y2p][x2p]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00121   im1=ida1[y1p][x1p2];  im2=ida2[y2p][x2p2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00122   im1=ida1[y1p2][x1m2]; im2=ida2[y2p2][x2m2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00123   im1=ida1[y1p2][x1m];  im2=ida2[y2p2][x2m]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00124   im1=ida1[y1p2][x1];   im2=ida2[y2p2][x2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00125   im1=ida1[y1p2][x1p];  im2=ida2[y2p2][x2p]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00126   im1=ida1[y1p2][x1p2]; im2=ida2[y2p2][x2p2]; N++; S1+=im1; S2+=im2; S11+=im1*im1; S12+=im1*im2; S22+=im2*im2; \
00127   re =((double)N*(double)S12 - (double)S1*(double)S2)/ \
00128     sqrt(((double)N*(double)S11 - (double)S1*(double)S1) * \
00129          ((double)N*(double)S22 - (double)S2*(double)S2)); \
00130   if (re!=re) re=0.0;
00131
00132   /** @class RegionMatcher
00133       @ingroup corrG
00134       @brief basic functions for CornerMatcher
00135
00136       class that holds sum of square diffeences (ssd),
00137       normalized cross correlation (ncc) and KLT and parabola interpolation
00138       for a convenient interface working with HomgPoint2D
00139       doing boundary checks use CornerMatcher
00140       @todo check if all klt code has been moved to new filter2 structure
00141       @author fw
00142   */
00143   class BIASMatcher2D_EXPORT RegionMatcher : public Debug
00144   {
00145   public:
00146     RegionMatcher();
00147     ~RegionMatcher();
00148
00149     /** fast sum of square differences (SSD) sim. measurment
00150         between p1 and p2 without boundary checking
00151         specialized version for unsigned char exist
00152         for halfwindowsizes <= 127 if sizeof(unsigned char)=1 and
00153         sizeof(unsigned long int)=4
00154         @author woelk ? untested */
00155     template <class StorageType>
00156     void SSD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1,
00157              StorageType **ida2, unsigned int halfwinsize, double& result);
00158
00159     /** fast sum of absolut differences (SAD) sim. measurement
00160         between p1 and p2 without boundary checking
00161         specialized version for unsigned char exist only
00162         for halfwindowsizes < 2050
00163         @author woelk 02 2003 untested */
00164     template <class StorageType>
00165     void SAD(unsigned int p1[2], unsigned int p2[2], StorageType **ida1,
00166              StorageType **ida2, unsigned int halfwinsize, double& result);
00167
00168     /** 'normalized' version of SAD, returns 1.0 incase of no differences
00169         0.0 in case of max difference
00170         specialized version for unsigned char exist only
00171         for halfwindowsizes < 2050
00172         @author woelk 05 2003 untested */
00173     template <class StorageType>
00174     void SADN(unsigned int p1[2], unsigned int p2[2], StorageType **ida1,
00175               StorageType **ida2, unsigned int halfwinsize, double& result);
00176
00177     /** fast ncc between p1 and p2 without boundary checking
00178         Faster specialisation for unsigned char exists
00179         because of integer arithmetic
00180         Specialisation for unsigned char does work without overflow with
00181         halfwindowsizes <= 127 if sizeof(unsigned char)=1 and
00182         sizeof(unsigned long int)=4
00183         @author woelk */
00184     template <class StorageType>
00185     void NCC(unsigned int p1[2], unsigned int p2[2], StorageType **ida1,
00186              StorageType **ida2, unsigned int halfwinsize, double& result);
00187
00188     /** fast interpolated ncc
00189         @author woelk */
00190     template <class StorageType>
00191     void NCC(double p1[2], double p2[2], StorageType **ida1,
00192              StorageType **ida2, unsigned halfwinsize, double &result);
00193
00194     /** fast ncc between p1 in ida1 and p2 in ida2
00195         the correlation is calculated in a window of width=2*hww+1
00196         and height = 2*hwh+1
00197         only those pixels within the window are used, where the according roi
00198         is not zero
00199         @author woelk 09 2003 , tested */
00200     template <class StorageType>
00201     void NCC(unsigned p1[2], unsigned p2[2], StorageType **ida1,
00202              StorageType **roi1, StorageType **ida2, StorageType **roi2,
00203              unsigned hww, unsigned hwh, double& result);
00204
00205
00206     /** ColorNCC for interleaved HSV images
00207         @author Daniel Grest, March 2003 */
00208     template <class StorageType>
00209     void ColorNCC(unsigned int p1[2], unsigned int p2[2],
00210             StorageType **ida1, StorageType **ida2,
00211             unsigned int halfwinsize, double &result);
00212
00213
00214     /** computes the Cross-CoVariance ,which is equal to NCC
00215         but does no variance(contrast) normailzation
00216         @author Daniel Grest, April 2003 */
00217     template <class StorageType>
00218     void ColorCCV(unsigned int p1[2], unsigned int p2[2],
00219                   StorageType **ida1, StorageType **ida2,
00220                   unsigned int halfwinsize, double &result);
00221
00222
00223     /** ColorNCC for interleaved hsL images
00224         @author Daniel Grest, June 2003 */
00225     template <class StorageType>
00226     void CNCC(unsigned int p1[2], unsigned int p2[2],
00227               StorageType **ida1, StorageType **ida2,
00228               unsigned int halfwinsize, double &result);
00229
00230     /** Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a
00231         point with correlation > mincorrelation.
00232         If point with correlation > mincorrelation is found, the search is
00233         aborted and resultpoint is set.
00234         If no point with correlation > mincorrelation is found, a negative
00235         value is returned. resultpoint is set to the point with biggest
00236         correlation within search window, result is set tot this correlation.
00237         Searching follows an outbound spiral around p2, either until
00238         searchwinsize is completly searched or until a point with
00239         correlation greater than mincorrelation is found
00240         If whole search area should be used, use mincorrelation>=1.0
00241         Searchwindow is always odd-sized (p2+/-halfsearchwinsize)
00242         returns 0 on success, negative value if no point found with
00243         correlation > mincorrelation
00244         !!! warning, no boundary checking is performed,
00245         i.e. p1[i]/p2[i] +-(halfnccwinsize+halfsearchwinsize) must lie
00246         within StorageType-array
00247         input:  p1, p2, ida1, ida2, halfnccwinsize, halfsearchwinsize,
00248         mincorrelation
00249         output: resultpoint, result
00250         */
00251     template <class StorageType>
00252     int NCCSearchOdd(unsigned int p1[2], unsigned int p2[2],
00253                      StorageType **ida1, StorageType **ida2,
00254                      unsigned int halfnccwinsize,
00255                      unsigned int halfsearchwinsize,
00256                      unsigned int resultpoint[2],
00257                      double mincorrelation, double& result);
00258
00259     /** As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5
00260         Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize)
00261         */
00262     template <class StorageType>
00263     int NCCSearchEven(unsigned int p1[2], unsigned int p2[2],
00264                       StorageType **ida1, StorageType **ida2,
00265                       unsigned int halfnccwinsize,
00266                       unsigned int halfsearchwinsize,
00267                       unsigned int resultpoint[2],
00268                       double mincorrelation, double& result);
00269
00270 //     /** find correspondence to p1 from ida1 in ida2
00271 //         at aproximate starting position p2 using KLT algorithm:
00272
00273 //         Solve G * d = e with
00274
00275 //         G = | sum(gx*gx)  sum(gx*gy) |   , and
00276 //         | sum(gx*gy)  sum(gy*gy) |
00277
00278 //         e = | sum(gx*(I2-I1)) sum(gy*(I2-I1)) |^T
00279
00280 //         sums are over the window, gx is x-gradient and gy the y-gradient in
00281 //         first image, I1 and I2 are the grey values in the first
00282 //         resp. the second image
00283 //         iterate numiterations times
00284 //         !!! no initial boundary checks is performed in this algorithm !!!
00285 //         returns 0 on success
00286 //         returns -1 if point slids out of [0, with][0, height] modulo halfwinsize
00287 //         output: result - image coo of p1 in im2
00288 //                 error - norm(e)
00289 //         input : p1 - location of feature point in image1
00290 //                 p2 - aproximate location of same feature point in new image 2
00291 //                      could be set to p1 featurepoint is not moving a lot
00292 //                 ida1 - pointer to the image data (row major) of first image
00293 //                 ida2 - pointer to the image data (row major) of new image
00294 //                 gradx - pointer to the x-gradient data of image1
00295 //                 grady - pointer to the y-gradient data of image1
00296 //                 halfwinsize - the window to use
00297 //                 numiterations - number of iterations to do
00298 //                 width - width of StorageType Arrays
00299 //                 height - height of StorageType Array  ida1[height-1][with-1]
00300 //                          is the maximal allowed acces to the arrays
00301 //         @author fw */
00302 //     template <class StorageType>
00303 //     int KLT(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00304 //             StorageType **ida2, StorageType **gradx, StorageType **grady,
00305 //             unsigned int width, unsigned int height, unsigned int halfwinsize,
00306 //             unsigned int numiterations, KLT_TYPE result[2], KLT_TYPE& error);
00307
00308 //     /** same as KLT above but do it until either maxiterations is reached
00309 //         or the error is dropping below maxerror */
00310 //     template <class StorageType>
00311 //     int KLT(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00312 //             StorageType **ida2, StorageType **gradx, StorageType **grady,
00313 //             unsigned int width, unsigned int height, unsigned int halfwinsize,
00314 //             unsigned int maxiterations, KLT_TYPE maxerror, KLT_TYPE result[2],
00315 //             KLT_TYPE& error);
00316
00317 //     /** as above but uses the averaged gradient of the 2 images */
00318 //     template <class StorageType>
00319 //     int KLT2(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00320 //              StorageType **ida2, StorageType **gradx1, StorageType **grady1,
00321 //              StorageType **gradx2, StorageType **grady2,
00322 //              unsigned int width, unsigned int height, unsigned int halfwinsize,
00323 //              unsigned int maxiterations, KLT_TYPE maxerror, KLT_TYPE result[2],
00324 //              KLT_TYPE& error);
00325
00326 //     /** same as above but also returns the number of iterations used */
00327 //     template <class StorageType>
00328 //     int KLT2(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00329 //              StorageType **ida2, StorageType **gradx1, StorageType **grady1,
00330 //              StorageType **gradx2, StorageType **grady2,
00331 //              unsigned int width, unsigned int height, unsigned int halfwinsize,
00332 //              unsigned int maxiterations, KLT_TYPE maxerror, KLT_TYPE result[2],
00333 //              KLT_TYPE& error, unsigned &iter);
00334
00335 //     /** as above but uses a 5x5 window
00336 //         @author woelk 08 2003 */
00337 //     template <class StorageType>
00338 //     int KLT5x5(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00339 //                StorageType **ida2, StorageType **gradx1, StorageType **grady1,
00340 //                StorageType **gradx2, StorageType **grady2,
00341 //                unsigned width, unsigned height, unsigned maxiterations,
00342 //                KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00343
00344 //     /** searches only perpendicular to the dominating edge, i.e.
00345 //         parallel to the dominating gradient
00346 //         the search direction is discretized in 4 different directions
00347 //         the discretization-error of direction is max 22 deg which
00348 //         accounts to 7% of length error
00349 //         decides which KLT_? to use
00350 //         @author woelk 08 2003    */
00351
00352 //     template <class StorageType>
00353 //     int KLTEdge(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00354 //                 StorageType **ida2, StorageType **gradx, StorageType **grady,
00355 //                 StorageType **gradNWSE, StorageType **gradNESW,
00356 //                 unsigned width, unsigned height, unsigned maxiterations,
00357 //                 KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00358
00359 //     template <class StorageType>
00360 //     int KLTEdge_NS(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00361 //                    StorageType **ida2, StorageType **grad,
00362 //                    unsigned width, unsigned height, unsigned maxiterations,
00363 //                    KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00364
00365 //     template <class StorageType>
00366 //     int KLTEdge_WE(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00367 //                    StorageType **ida2, StorageType **grad,
00368 //                    unsigned width, unsigned height, unsigned maxiterations,
00369 //                    KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00370
00371 //     template <class StorageType>
00372 //     int KLTEdge_NESW(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00373 //                      StorageType **ida2, StorageType **grad,
00374 //                      unsigned width, unsigned height, unsigned maxiterations,
00375 //                      KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00376
00377 //     template <class StorageType>
00378 //     int KLTEdge_NWSE(KLT_TYPE p1[2], KLT_TYPE p2[2], StorageType **ida1,
00379 //                      StorageType **ida2, StorageType **grad,
00380 //                      unsigned width, unsigned height, unsigned maxiterations,
00381 //                      KLT_TYPE maxerror, KLT_TYPE result[2], KLT_TYPE& error);
00382
00383
00384     /** searches along line from start2 to end2 within +/- epsilon pixels
00385         away from the line in ida2 for a match to p1
00386         using ncc with halfwinsize
00387         boundary checking is not done, i.e. start2 and end2
00388         must lie more than halfwindowsize+epsilon away from the
00389         image border
00390         p1 must lie more than halfwinsize away from image border
00391         only for those points in im2 a correlation is calculated for which
00392         the gradient is > grad1[p1[1]][p1[0]]*gradientscale
00393         input: ida1 - pointer to the image data array of im1, row mayor
00394
00395
00396         output: result - image coo of point with greatest corelation
00397         correlation - the correlation betwen p1 and result
00398         returns: 0   on success
00399         -1  no matching point found
00400         <-1 error */
00401     template <class StorageType>
00402     int LineMatcherNCC(unsigned int p1[2], unsigned int start2[2],
00403                        unsigned int end2[2],
00404                        StorageType **ida1, StorageType **ida2,
00405                        StorageType **grad1, StorageType **grad2,
00406                        unsigned int halfwinsize, unsigned int epsilon,
00407                        double gradientscale, unsigned int result[2],
00408                        double& correlation);
00409
00410     /** as above but uses SAD */
00411     template <class StorageType>
00412     int LineMatcherSAD(unsigned int p1[2], unsigned int start2[2],
00413                        unsigned int end2[2],
00414                        StorageType **ida1, StorageType **ida2,
00415                        StorageType **grad1, StorageType **grad2,
00416                        unsigned int halfwinsize, unsigned int epsilon,
00417                        double gradientscale, unsigned int result[2],
00418                        double& sad);
00419
00420     /** function to achieve sub-pixel accuracy if p1 and p2
00421         are corresponding image points from ida1 resp ida2
00422         exact parabola approximation with 3 values is used
00423         no boundary checks, p1 and p2 must be further than
00424         halfwinsize+1 from array border
00425         correlation between p1 and p2 must be a local discrete maximum
00426         i.e. NCC(p1, {p2[0]+/-1, p2[1]+/-1})<NCC(p1, p2)
00427         @author woelk 03 2003 */
00428     template <class StorageType>
00429     int ParabolaNCC(unsigned int p1[2], unsigned int p2[2],
00430                     StorageType **ida1, StorageType **ida2,
00431                     unsigned int halfwinsize, KLT_TYPE result[2]);
00432
00433
00434     /** function to achieve sub-pixel accuracy if p1 and p2
00435         are corresponding image points from ida1 resp ida2
00436         over-determined parabola approximation with 5 values is used
00437         no boundary checks, p1 and p2 must be further than
00438         halfwinsize+2 from array border
00439         correlation between p1 and p2 must be a local discrete maximum
00440         i.e. NCC(p1, {p2[0]+/-2, p2[1]+/-2})<NCC(p1, p2)
00441         @author woelk 04 2003 */
00442     template <class StorageType>
00443     int ParabolaNCC5(unsigned int p1[2], unsigned int p2[2],
00444                     StorageType **ida1, StorageType **ida2,
00445                     unsigned int halfwinsize, KLT_TYPE result[2]);
00446
00447     /*
00448     template <class StorageType>
00449     int GetTrackableRegions(StorageType **gx, StorageType **gy,
00450                             unsigned int halfwinsize, StorageType **tmap,
00451                             StorageType &min, StorageType&max);
00452     */
00453
00454   protected:
00455     template <class StorageType>
00456     KLT_TYPE _Bilinear(StorageType **ida, KLT_TYPE x, KLT_TYPE y);
00457
00458     KLT_TYPE _Bilinear(unsigned char **ida,
00459                       KLT_TYPE x, KLT_TYPE y);
00460
00461     /** bilinear interpolation, also moved gradient image data from [0:255]
00462         to [-127, 128] befor interpolating */
00463 //     template <class StorageType>
00464 //     KLT_TYPE _BilinearGrad(StorageType **ida, KLT_TYPE x, KLT_TYPE y);
00465
00466     template <class StorageType>
00467     void _BilinearRegion(StorageType **ida, KLT_TYPE x, KLT_TYPE y,
00468                          unsigned hws, Matrix<KLT_TYPE>& res);
00469
00470     void _BilinearRegion(unsigned char **ida, KLT_TYPE x, KLT_TYPE y,
00471                          unsigned hws, Matrix<KLT_TYPE>& res);
00472
00473     /** bilinear interpolation, also moved gradient image data from [0:255]
00474         to [-127, 128] befor interpolating */
00475 //     template <class StorageType>
00476 //     void _BilinearRegionGrad(StorageType **ida, KLT_TYPE x, KLT_TYPE y,
00477 //                             unsigned hws, Matrix<KLT_TYPE>& res);
00478
00479     inline
00480     KLT_TYPE _ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3)
00481     { KLT_TYPE a, p;
00482       a = (x1-2.0*x2+x3);
00483       p = (x1-x3);
00484       return (a!=0.0) ? (KLT_TYPE) p/(2.0*a) : (KLT_TYPE) 0.0; }
00485
00486     inline
00487     KLT_TYPE _ParabolaApprox(KLT_TYPE x1, KLT_TYPE x2, KLT_TYPE x3,
00488                              KLT_TYPE x4, KLT_TYPE x5)
00489     { Matrix<double> A(5, 3, "4 -2 1 1 -1 1 0 0 1 1 1 1 4 2 1");
00490       Vector<double> b(5);
00491       b[0]=x1; b[1]=x2; b[2]=x3; b[3]=x4; b[4]=x5;
00492       Vector<double> res=Lapack_LLS_QR_linear_solve(A, b);
00493       return (res[0]!=0.0) ? (KLT_TYPE) res[1]/(2.0*res[0]) : (KLT_TYPE) 0.0; }
00494
00495     // TODO DLL JW
00496     //BIAS_EXPORT_STL_VECTOR
00497     //class BIASMatcher2D_EXPORT BIAS::Matrix2x2<KLT_TYPE>;
00498     //class BIASMatcher2D_EXPORT BIAS::Vector2<KLT_TYPE>;
00499     //class BIASMatcher2D_EXPORT BIAS::Matrix<KLT_TYPE>;
00500     //template class BIASMatcher2D_EXPORT BIAS::Matrix2x2<double>;
00501     //template class BIASMatcher2D_EXPORT BIAS::Vector2<double>;
00502     //template class BIASMatcher2D_EXPORT BIAS::Matrix<double>;
00503
00504
00505     // internal vars for KLT
00506     Matrix2x2<KLT_TYPE> _G, _Ginv;
00507     Vector2<KLT_TYPE> _e, _d, _disp;
00508     Matrix<KLT_TYPE> _gx, _gy, _bl1, _bl2, _gx1, _gy1, _gx2, _gy2, _gsx, _gsy;
00509     Matrix<KLT_TYPE> _bl1_5, _bl2_5, _gx1_5, _gy1_5, _gx2_5, _gy2_5, _gsx_5,
00510       _gsy_5;
00511     unsigned _klthws, _winsize;
00512     // internals vars for interpolated NCC
00513     Matrix<KLT_TYPE> _iim1, _iim2;
00514     unsigned _ncchws, _nccwinsize;
00515
00516   };
00517 } // namespace
00518 #endif // __RegionMatcher_hh__
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/RenderModeGL.hh Source File

Gui

RenderModeGL.hh

Go to the documentation of this file.
00001 #ifndef __RenderModeGL_h__
00002 #define __RenderModeGL_h__
00003
00004 #include <bias_config.h>
00005 #ifndef BIAS_HAVE_OPENGL
00006 #  error Please recompile BIAS with USE_OPENGL to use ImgObjGL
00007 #endif // BIAS_HAVE_OPENGL
00008
00009 #include "biasgl.h"
00010
00011 #include <Base/Math/Vector4.hh>
00012
00013 /**
00014 @ingroup g_gui
00015 @brief GLRenderMode describes mode for rendering.
00016
00017 In particular
00018 #culling,
00019 #pointsize,
00020 #linesize,
00021 #buffer mode (wireframe, points..)
00022 #stereo mod e(e.g. page flipping) for display.
00023 # etc...
00024 @author Jan Woetzel  */
00025 namespace BIAS {
00026
00027     enum  DrawbufferMode {
00028         MONO=0 /* one display but possibly double buffered */
00029         ,STEREO_UNTOUCHED /* do not touch selcting the DrawBuffer, user is doing it himself */
00030         ,STEREO_CONSUMER_NV /* consumer 3D stereo using NV driver. works only in fullscreen */
00031         ,STEREO_QUADBUFFERED /* page flipping quad buffered stereo, e.g. with consumer shutter glasses like Elsa Revelator */
00032         ,STEREO_LEFT_RIGHT /* stereo without sdouble buffering */
00033         ,STEREO_TWOSCREENS /* two monitors, e.g. HMD or polarized glasses */
00034         //,STEREO_ANAGLYPH_RG /* anaglyph using left:red right: green (with one screen) */
00035         //,STEREO_ANAGLYPH_GR /* anaglyph using green-red */
00036         //,STEREO_ANAGLYPH_RB /* anaglyph using red-blue */
00037         //,STEREO_ANAGLYPH_BR /* anaglyph using blue-red*/
00038     };
00039
00040     class RenderModeGL {
00041     public:
00042         RenderModeGL()
00043         {
00044             polygonmodeFRONT=GL_FILL;
00045             polygonmodeBACK=GL_FILL;
00046             shademodel=GL_SMOOTH;
00047
00048             enable_cullface=false;
00049             cullface=GL_BACK;
00050
00051             pointsize=1.0f;
00052             linewidth=1.0f;
00053
00054             // handled extra by Display function
00055             // because it has to match SwapBuffers
00056             drawbuffermode=BIAS::STEREO_UNTOUCHED;
00057             //drawbuffermode=BIAS::STEREO_CONSUMER_NV;
00058             vsync=false;
00059         };
00060
00061         /** no 3D streo enabled, single viewpoint only? */
00062         bool IsMono() const {return (drawbuffermode==BIAS::MONO);};
00063
00064         /** page flipping quad buffered stereo?
00065         E.g. with consumer shutter glasses like Elsa Revelator  */
00066         bool IsStereoQuadbuffered() const {return (drawbuffermode==BIAS::STEREO_QUADBUFFERED);};
00067
00068         // members:
00069
00070         // GL_FILL, GL_FLAT, GL_POINT
00071         GLenum polygonmodeFRONT; ///< glPoygonMode(GL_FRONT...
00072         GLenum polygonmodeBACK;  ///< glPoygonMode(GL_BACK...
00073
00074         // GL_SMOOTH, GL_FLAT
00075         GLenum shademodel; ///< glShadeModel(...
00076
00077         bool enable_cullface;
00078         GLenum cullface; ///< glCullFace: GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK
00079
00080         float pointsize;
00081         float linewidth;
00082
00083         // 3D display using shutter glasses or multiple monitors with polarizers?
00084         BIAS::DrawbufferMode drawbuffermode; // enable page swap stereo, e.g. with shutetr glasses
00085
00086         bool vsync; // true to enable vertical sync
00087     };
00088 } // namespace BIAS
00089
00090 #endif
00091
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Rescale.cpp Source File

Filter

Rescale.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Rescale.hh"
00027
00028 #ifdef BIAS_DEBUG
00029 #include <Base/Image/ImageIO.hh>
00030 #endif
00031
00032 #include <Base/Common/BIASpragma.hh>
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 namespace BIAS {
00038
00039 //////////////////////////////////////////////////////////////////////////
00040 //                 implementation
00041 //////////////////////////////////////////////////////////////////////////
00042
00043 template <class InputImageType, class OutputImageType>
00044 Rescale<InputImageType, OutputImageType>::
00045 Rescale()
00046   : FilterBase<InputImageType, OutputImageType>(), _gauss(), _binomial(), _mean()
00047 {
00048   this->_ParamsAllocated=true;
00049    _RescaleMeanSigmaFactor= new double;
00050    *_RescaleMeanSigmaFactor=0.9;
00051    _RescaleFactor= new double;
00052    *_RescaleFactor= 2.0;
00053    _RescaleMeanType= new int;
00054    *_RescaleMeanType = LPT_Mean;
00055    _LastPositionOffset=0.0;
00056 }
00057
00058 template <class InputImageType, class OutputImageType>
00059 Rescale<InputImageType, OutputImageType>::
00060 Rescale(Param& para, const std::string& postfix)
00061   : FilterBase<InputImageType, OutputImageType>(para, "-Rescale"+postfix),
00062     _gauss(para, "-Rescale"+postfix),
00063     _binomial(para, "-Rescale"+postfix),
00064     _mean(para, "-Rescale"+postfix)
00065 {
00066   int grp=para.GetFreeGroupID();
00067   _AddParam(para, grp, "-Rescale"+postfix);
00068   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Rescale");
00069   //  AddDebugLevel(D_RESCALE_INIT);
00070    _LastPositionOffset=0.0;
00071 }
00072
00073 template <class InputImageType, class OutputImageType>
00074 Rescale<InputImageType, OutputImageType>::
00075 Rescale(Param& para, const int grp, const std::string& postfix)
00076   : FilterBase<InputImageType, OutputImageType>(para, grp, "-Rescale"+postfix),
00077     _gauss(para, grp, "-Rescale"+postfix),
00078     _binomial(para, grp, "-Rescale"+postfix),
00079     _mean(para, grp, "-Rescale"+postfix)
00080 {
00081   _AddParam(para, grp, "-Rescale"+postfix);
00082   //  AddDebugLevel(D_RESCALE_INIT);
00083    _LastPositionOffset=0.0;
00084 }
00085
00086 template <class InputImageType, class OutputImageType>
00087 Rescale<InputImageType, OutputImageType>::~Rescale()
00088 {
00089   if (this->_ParamsAllocated) {
00090     delete _RescaleMeanSigmaFactor;
00091     delete _RescaleFactor;
00092     delete _RescaleMeanType;
00093   }
00094 }
00095
00096
00097 template <class InputImageType, class OutputImageType>
00098 int Rescale<InputImageType, OutputImageType>::
00099 Filter(const Image<InputImageType>& src, Image<OutputImageType>& dst)
00100 {
00101   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::Filter\n");
00102   int res=0;
00103   if (*_RescaleFactor<1.0){
00104     res=Upsample(src, dst);
00105   } else if (*_RescaleFactor>1.0){
00106     res=Downsample(src, dst);
00107   } else {
00108     dst=src;
00109     res=0;
00110     _LastPositionOffset=0.0;
00111   }
00112   return res;
00113 }
00114
00115 //////////////////////////////////////////////////////////////////////////
00116 //               downsampling functions
00117 //////////////////////////////////////////////////////////////////////////
00118
00119 template <class InputImageType, class OutputImageType>
00120 int Rescale<InputImageType, OutputImageType>::
00121 Downsample(const Image<InputImageType>& src, Image<OutputImageType>& dst)
00122 {
00123   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::Downsample(src, dst)\n");
00124   double pow2 = log(*_RescaleFactor)/log(2.0);
00125
00126   if (*_RescaleMeanType == LPT_Mean){
00127     unsigned newwidth, newheight;
00128     if (fabs(*_RescaleFactor-2.0)<=DBL_EPSILON){
00129       newwidth=src.GetWidth()>>1;
00130       newheight=src.GetHeight()>>1;
00131       if (dst.GetWidth()!=newwidth || dst.GetHeight()!=newheight
00132           || dst.GetChannelCount()!=src.GetChannelCount()){
00133         if (!dst.IsEmpty()) dst.Release();
00134         dst.Init(newwidth, newheight, src.GetChannelCount(),
00135                  src.GetStorageType(), src.IsInterleaved() );
00136       }
00137       return DownsampleBy2(src, dst);
00138     } else if (fabs(*_RescaleFactor-4.0)<=DBL_EPSILON ){
00139       newwidth=src.GetWidth()>>2;
00140       newheight=src.GetHeight()>>2;
00141       if (dst.GetWidth()!=newwidth || dst.GetHeight()!=newheight
00142           || dst.GetChannelCount()!=src.GetChannelCount()){
00143         if (!dst.IsEmpty()) dst.Release();
00144         dst.Init(newwidth, newheight, src.GetChannelCount(),
00145                  src.GetStorageType(), src.IsInterleaved());
00146       }
00147       return DownsampleBy4(src, dst);
00148     } else if ( pow2 - floor(pow2) <DBL_EPSILON ) {
00149       return DownsampleBPoT(src,dst);
00150     }
00151   }
00152   return  Downsample(src, dst,
00153                      (unsigned int)floor((double)src.GetWidth()/
00154                                          *_RescaleFactor),
00155                      (unsigned int)floor((double)src.GetHeight()/
00156                                          *_RescaleFactor));
00157 }
00158
00159
00160
00161 template <class InputImageType, class OutputImageType>
00162 int Rescale<InputImageType, OutputImageType>::
00163 Downsample(const Image<InputImageType>& src, Image<OutputImageType>& dst,
00164            const unsigned newwidth, const unsigned newheight)
00165 {
00166   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::Downsample(src, dst, width, height)\n");
00167   const double hfactor = (double)src.GetWidth() / (double)newwidth;
00168   const double vfactor = (double)src.GetHeight() / (double)newheight;
00169   const double factor = (vfactor>hfactor)?vfactor:hfactor;
00170
00171   Image<OutputImageType> meanim;
00172   if (_ApplyMeanFilter(src, meanim, factor)!=0){
00173     BIASERR("error applying mean filter");
00174   }
00175
00176   int tlx, tly, brx, bry;
00177   meanim.GetROI()->GetCorners(tlx, tly, brx, bry);
00178
00179   tlx=(int)ceil((double)tlx/hfactor);
00180   tly=(int)ceil((double)tly/vfactor);
00181   brx=(int)floor((double)brx/hfactor);
00182   bry=(int)floor((double)bry/vfactor);
00183
00184   if (dst.GetWidth()!=newwidth || dst.GetHeight()!=newheight){
00185     if (!dst.IsEmpty()) dst.Release();
00186     dst.Init(newwidth, newheight, src.GetChannelCount(), src.GetStorageType(),
00187              src.IsInterleaved());
00188   }
00189   dst.GetROI()->SetCorners(tlx, tly, brx, bry);
00190
00191   int res=0;
00192   if (src.GetChannelCount()==1 && src.GetColorModel()==ImageBase::CM_Grey){
00193     res=_FillInterpolatedGrey(meanim, dst);
00194   } else {
00195     res=_FillInterpolatedColor(meanim, dst);
00196   }
00197   _LastPositionOffset=0.0;
00198   return res;
00199 }
00200
00201 /*
00202 template <class InputImageType, class OutputImageType>
00203 int Rescale<InputImageType, OutputImageType>::
00204 DownsampleROI(const Image<InputImageType>& src, Image<OutputImageType>& dst,
00205               const unsigned newwidth, const unsigned newheight)
00206 {
00207   BIASDOUT(D_FILTERBASE_CALLSTACK, "DownsampleROI(width, height)\n");
00208   unsigned int src_width = src.GetWidth();
00209   unsigned int src_height = src.GetHeight();
00210
00211
00212   // The ROI boundaries
00213   unsigned int ul_x;
00214   unsigned int ul_y;
00215   unsigned int lr_x;
00216   unsigned int lr_y;
00217   src.GetROI()->GetCorners(ul_x, ul_y, lr_x, lr_y);
00218
00219 #ifdef BIAS_DEBUG
00220   if(ul_x==0 && ul_y==0 && lr_x==src_width && lr_y==src_height){
00221     BIASERR("No ROI defined in source image. Nothing to downsample.");
00222     return -1;
00223   }
00224 #endif
00225
00226   unsigned int roi_width = lr_x - ul_x + 1;
00227
00228   // So what is the factor anyway? (Based on newwidth)
00229   float factor = 1.0 / ((float) newwidth / (float) roi_width);
00230
00231 #ifdef BIAS_DEBUG
00232   unsigned int roi_height = lr_y - ul_y + 1;
00233   // Scaling factor in x and y direction equal?
00234   if (  roi_width * newheight != roi_height * newwidth) {
00235     BIASERR("Downsample to new width AND height for ROI width and height must "
00236             <<"be of equal factor in both directions. ");
00237     // ... or adapt the mean filter!
00238     return -1;
00239   }
00240
00241   if (factor<1.0){
00242     BIASERR("New width and height would suggest an upsampling. Nothing done "
00243             <<factor);
00244     return -1;
00245   }
00246 #endif
00247
00248   unsigned int halfsize = (factor <= 2.0) ? 1 :
00249     (unsigned int) ceil((factor-1.0)/2.0);
00250
00251   // Check the ROI boundaries
00252   if (ul_x < halfsize ||
00253       ul_y < halfsize ||
00254       lr_x > src_width - 1 - halfsize ||
00255       lr_y > src_height - 1 - halfsize
00256       )
00257     {
00258       BIASERR("ROI is to near to the edge of the source image.");
00259       return -1;
00260     }
00261
00262   // Create an image containing the ROI plus edge
00263   Image<InputImageType> roiwithedge, srcroi=src;
00264   srcroi.GetROI()->SetCorners(ul_x - halfsize, ul_y - halfsize, lr_x + halfsize,
00265                 lr_y + halfsize);
00266   srcroi.GetCopyOfROI2(roiwithedge);
00267
00268   Image<OutputImageType> meanim;
00269   if (_ApplyMeanFilter(roiwithedge, meanim, factor)!=0){
00270     BIASERR("error applying mean filter");
00271   }
00272
00273   meanim.GetROI()->SetCorners(halfsize, halfsize,
00274         meanim.GetWidth() - 1 - halfsize,
00275         meanim.GetHeight() - 1 - halfsize);
00276
00277   Image<OutputImageType> filtered_image;
00278   meanim.GetCopyOfROI(filtered_image);
00279
00280   return Upsample(filtered_image, dst, newwidth, newheight);
00281 }
00282 */
00283 ////////////////////////////////////////////////////////////////////////////
00284
00285 template <class InputImageType, class OutputImageType>
00286 int Rescale<InputImageType, OutputImageType>::
00287 DownsampleBy2(const Image<InputImageType>& src, Image<OutputImageType>& dst)
00288 {
00289   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2(src, dst)\n");
00290   int res=0;
00291   unsigned nwidth=src.GetWidth()>>1;
00292   unsigned nheight=src.GetHeight()>>1;
00293   if (dst.GetWidth()!=nwidth || dst.GetHeight()!=nheight){
00294     if (!dst.IsEmpty()) dst.Release();
00295     dst.Init(nwidth, nheight, src.GetChannelCount(), src.GetStorageType(),
00296              src.IsInterleaved());
00297   }
00298   if (src.GetColorModel()==ImageBase::CM_Grey){
00299     res = DownsampleBy2Grey(src, dst);
00300   } else {
00301     if (src.IsInterleaved() && src.GetChannelCount()==3){
00302       res = DownsampleBy2Color(src, dst);
00303     } else {
00304       // this is slow
00305       int newwidth=src.GetWidth()>>1;
00306       int newheight=src.GetHeight()>>1;
00307       res = Downsample(src, dst, newwidth, newheight);
00308     }
00309   }
00310   // see DownsampleBy2 for details
00311   _LastPositionOffset=0.5;
00312   return res;
00313 }
00314
00315 template <class InputImageType, class OutputImageType>
00316 int Rescale<InputImageType, OutputImageType>::
00317 DownsampleBy2Grey(const Image<InputImageType>& Source,
00318                   Image<OutputImageType>& Destination)
00319 {
00320   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Grey\n");
00321   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00322   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00323
00324   // make sure the image is not shifted
00325   if (minx%2!=0) minx++;
00326   if (maxx%2!=0) maxx--;
00327   if (miny%2!=0) miny++;
00328   if (maxy%2!=0) maxy--;
00329
00330   dx=minx>>1;
00331   dy=miny>>1;
00332   mdx=maxx>>1;
00333   mdy=(maxy>>1)-1;
00334
00335   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy+1);
00336
00337   register double sum;
00338   register InputImageType *srcu, *srcl;
00339   register OutputImageType *dst, *dstend, *dstlend;
00340   register int srcwidth=Source.GetWidth(), dstwidth=Destination.GetWidth(),
00341     dststep;
00342   dst = Destination.GetImageData();
00343
00344   srcl = srcu = Source.GetImageData()+minx+miny*srcwidth;
00345   srcl += srcwidth;
00346   dst = Destination.GetImageData() + dy*dstwidth;
00347   dstlend = dst + mdx;
00348   dstend = Destination.GetImageData() + mdx + mdy*dstwidth;
00349   dst+=dx;
00350
00351   srcwidth+=(srcwidth-maxx+minx);
00352   dststep=dstwidth-mdx+dx;
00353
00354   if (srcwidth%2!=0){
00355     srcwidth+=1;
00356   }
00357   while (dst < dstend){
00358     while (dst < dstlend){
00359       sum = 0.0;
00360       sum += (double)*srcu++;
00361       sum += (double)*srcu++;
00362       sum += (double)*srcl++;
00363       sum += (double)*srcl++;
00364       *dst++ = (OutputImageType)(sum / 4.0);
00365     }
00366     srcu += srcwidth;
00367     srcl += srcwidth;
00368     dst += dststep;
00369     dstlend += dstwidth;
00370   }
00371   // see DownsampleBy2 for details
00372   _LastPositionOffset=0.5;
00373   return 0;
00374 }
00375
00376
00377 template <>
00378 int Rescale<unsigned char, unsigned char>::
00379 DownsampleBy2Grey(const Image<unsigned char>& Source,
00380                   Image<unsigned char>& Destination) {
00381   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Grey\n");
00382   register unsigned  sum;
00383   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00384   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00385
00386   // make sure the image is not shifted
00387   if (minx%2!=0) minx++;
00388   if (maxx%2!=0) maxx--;
00389   if (miny%2!=0) miny++;
00390   if (maxy%2!=0) maxy--;
00391
00392   dx=minx>>1;
00393   dy=miny>>1;
00394   mdx=maxx>>1;
00395   mdy=(maxy>>1)-1;
00396
00397   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy+1);
00398
00399   register unsigned char *srcu, *srcl, *dst, *dstend, *dstlend;
00400   register int srcwidth=Source.GetWidth(), dstwidth=Destination.GetWidth(),
00401     dststep;
00402
00403   srcl = srcu = Source.GetImageData()+minx+miny*srcwidth;
00404   srcl += srcwidth;
00405   dst = Destination.GetImageData() + dy*dstwidth;
00406   dstlend = dst + mdx;
00407   dstend = Destination.GetImageData() + mdx + mdy*dstwidth;
00408   dst+=dx;
00409
00410   srcwidth+=(srcwidth-maxx+minx);
00411   dststep=dstwidth-mdx+dx;
00412
00413   if (srcwidth%2!=0){
00414     srcwidth+=1;
00415   }
00416   while (dst < dstend){
00417     while (dst < dstlend){
00418       sum = 0;
00419       sum += *srcu++;
00420       sum += *srcu++;
00421       sum += *srcl++;
00422       sum += *srcl++;
00423       *dst++ = sum >> 2;
00424     }
00425     srcu += srcwidth;
00426     srcl += srcwidth;
00427     dst += dststep;
00428     dstlend += dstwidth;
00429   }
00430   // see DownsampleBy2 for details
00431   _LastPositionOffset=0.5;
00432
00433   return 0;
00434 }
00435
00436
00437 #ifdef BUILD_IMAGE_USHORT
00438 template <>
00439 int Rescale<unsigned short, unsigned short>::
00440 DownsampleBy2Grey(const Image<unsigned short>& Source,
00441                       Image<unsigned short>& Destination)
00442 {
00443   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Grey\n");
00444   register unsigned  sum;
00445   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00446   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00447
00448   // make sure the image is not shifted
00449   if (minx%2!=0) minx++;
00450   if (maxx%2!=0) maxx--;
00451   if (miny%2!=0) miny++;
00452   if (maxy%2!=0) maxy--;
00453
00454   dx=minx>>1;
00455   dy=miny>>1;
00456   mdx=maxx>>1;
00457   mdy=(maxy>>1)-1;
00458
00459   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy+1);
00460
00461   register unsigned short *srcu, *srcl, *dst, *dstend, *dstlend;
00462   register int srcwidth=Source.GetWidth(), dstwidth=Destination.GetWidth(),
00463     dststep;
00464
00465   srcl = srcu = Source.GetImageData()+minx+miny*srcwidth;
00466   srcl += srcwidth;
00467   dst = Destination.GetImageData() + dy*dstwidth;
00468   dstlend = dst + mdx;
00469   dstend = Destination.GetImageData() + mdx + mdy*dstwidth;
00470   dst+=dx;
00471
00472   srcwidth+=(srcwidth-maxx+minx);
00473   dststep=dstwidth-mdx+dx;
00474
00475   if (srcwidth%2!=0){
00476     srcwidth+=1;
00477   }
00478   while (dst < dstend){
00479     while (dst < dstlend){
00480       sum = 0;
00481       sum += *srcu++;
00482       sum += *srcu++;
00483       sum += *srcl++;
00484       sum += *srcl++;
00485       *dst++ = sum >> 2;
00486     }
00487     srcu += srcwidth;
00488     srcl += srcwidth;
00489     dst += dststep;
00490     dstlend += dstwidth;
00491   }
00492   // see DownsampleBy2 for details
00493   _LastPositionOffset=0.5;
00494
00495   return 0;
00496 }
00497 #endif
00498
00499 template <class InputImageType, class OutputImageType>
00500 int Rescale<InputImageType, OutputImageType>::
00501 DownsampleBy2Color(const Image<InputImageType>& Source,
00502                    Image<OutputImageType>& Destination)
00503 {
00504   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Color\n");
00505   BIASASSERT(Source.IsPlanar()==Destination.IsPlanar());
00506 #ifdef BIAS_DEBUG
00507   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
00508     ImageBase im=Source;
00509     ImageIO::Write("filtered-source.mip", im);
00510   }
00511   unsigned tlx, tly, brx, bry;
00512   Source.GetROI()->GetCorners(tlx, tly, brx, bry);
00513   if (tlx!=0 || tly!=0 || brx!=Source.GetWidth() || bry!=Source.GetHeight()){
00514     BIASERR("ROI not yet supported");
00515     //BIASASSERT(false);
00516     BIASABORT;
00517   }
00518 #endif
00519
00520
00521
00522   register double sum1, sum2, sum3;
00523   register InputImageType *srcu, *srcl;
00524   register OutputImageType   *dst, *dstend, *dstlend;
00525   register int srcwidth=Source.GetWidth()*3, dstwidth=Destination.GetWidth()*3;
00526   dst = Destination.GetImageData();
00527   srcl = srcu = Source.GetImageData();
00528   srcl += srcwidth;
00529   dstend = dst + Destination.GetPixelCount() * 3;
00530   dstlend = dst + dstwidth * 3;
00531
00532   if (srcwidth%2!=0){
00533     srcwidth+=3;
00534   }
00535   while (dst < dstend){
00536     while (dst < dstlend){
00537       sum1 = sum2 = sum3 = 0.0;
00538       sum1 += (double)*srcu++;
00539       sum2 += (double)*srcu++;
00540       sum3 += (double)*srcu++;
00541       sum1 += (double)*srcu++;
00542       sum2 += (double)*srcu++;
00543       sum3 += (double)*srcu++;
00544       sum1 += (double)*srcl++;
00545       sum2 += (double)*srcl++;
00546       sum3 += (double)*srcl++;
00547       sum1 += (double)*srcl++;
00548       sum2 += (double)*srcl++;
00549       sum3 += (double)*srcl++;
00550       *dst++ = (OutputImageType)(sum1 / 4.0);
00551       *dst++ = (OutputImageType)(sum2 / 4.0);
00552       *dst++ = (OutputImageType)(sum3 / 4.0);
00553     }
00554     srcu += srcwidth;
00555     srcl += srcwidth;
00556     dstlend += dstwidth;
00557   }
00558   // see DownsampleBy2 for details
00559   _LastPositionOffset=0.5;
00560   return 0;
00561 }
00562
00563 template <>
00564 int Rescale<unsigned char, unsigned char>::
00565 DownsampleBy2Color(const Image<unsigned char>& Source,
00566                    Image<unsigned char>& Destination)
00567 {
00568   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Color\n");
00569   BIASASSERT(Source.IsPlanar()==Destination.IsPlanar());
00570 #ifdef BIAS_DEBUG
00571   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
00572     ImageBase im=Source;
00573     ImageIO::Write("filtered-source.mip", im);
00574   }
00575   unsigned tlx, tly, brx, bry;
00576   Source.GetROI()->GetCorners(tlx, tly, brx, bry);
00577   if (tlx!=0 || tly!=0 || brx!=Source.GetWidth() || bry!=Source.GetHeight()){
00578     BIASERR("ROI not yet supported");
00579     //BIASASSERT(false);
00580     BIASABORT;
00581   }
00582 #endif
00583   register unsigned int sum1, sum2, sum3;
00584   register unsigned char *srcu, *srcl, *dst, *dstend, *dstlend;
00585   register int srcwidth=Source.GetWidth() * 3,
00586     dstwidth=Destination.GetWidth() *3;
00587   dst = Destination.GetImageData();
00588   srcl = srcu = Source.GetImageData();
00589   srcl += srcwidth;
00590   dstend = dst + Destination.GetPixelCount() * 3;
00591   dstlend = dst + dstwidth;
00592
00593   if (srcwidth%2!=0){
00594     srcwidth+=3;
00595   }
00596   while (dst < dstend){
00597     while (dst < dstlend){
00598       sum1 = sum2 = sum3 = 0;
00599       sum1 += *srcu++;
00600       sum2 += *srcu++;
00601       sum3 += *srcu++;
00602       sum1 += *srcu++;
00603       sum2 += *srcu++;
00604       sum3 += *srcu++;
00605       sum1 += *srcl++;
00606       sum2 += *srcl++;
00607       sum3 += *srcl++;
00608       sum1 += *srcl++;
00609       sum2 += *srcl++;
00610       sum3 += *srcl++;
00611       *dst++ = sum1 >> 2;
00612       *dst++ = sum2 >> 2;
00613       *dst++ = sum3 >> 2;
00614     }
00615     srcu += srcwidth;
00616     srcl += srcwidth;
00617     dstlend += dstwidth;
00618   }
00619
00620 //   for (unsigned int y=0;y<Destination.GetHeight(); y++){
00621 //     for (unsigned int x=0;x<Destination.GetWidth(); x++){
00622 //       for (unsigned int c=0;c<3;c++){
00623 //  sum1 = srcu[y *
00624 //       }
00625 //     }
00626 //   }
00627
00628   // see DownsampleBy2 for details
00629   _LastPositionOffset=0.5;
00630
00631   return 0;
00632 }
00633
00634 #ifdef BUILD_IMAGE_USHORT
00635 template <>
00636 int Rescale<unsigned short, unsigned short>::
00637 DownsampleBy2Color(const Image<unsigned short>& Source,
00638                    Image<unsigned short>& Destination)
00639 {
00640   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy2Color\n");
00641 #ifdef BIAS_DEBUG
00642   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
00643     ImageBase im=Source;
00644     ImageIO::Write("filtered-source.mip", im);
00645   }
00646   unsigned tlx, tly, brx, bry;
00647   Source.GetROI()->GetCorners(tlx, tly, brx, bry);
00648   if (tlx!=0 || tly!=0 || brx!=Source.GetWidth() || bry!=Source.GetHeight()){
00649     BIASERR("ROI not yet supported");
00650     BIASASSERT(false);
00651   }
00652 #endif
00653   register unsigned int sum1, sum2, sum3;
00654   register unsigned short *srcu, *srcl, *dst, *dstend, *dstlend;
00655   register int srcwidth=Source.GetWidth() * 3,
00656     dstwidth=Destination.GetWidth() *3;
00657   dst = Destination.GetImageData();
00658   srcl = srcu = Source.GetImageData();
00659   srcl += srcwidth;
00660   dstend = dst + Destination.GetPixelCount() * 3;
00661   dstlend = dst + dstwidth;
00662
00663   if (srcwidth%2!=0){
00664     srcwidth+=3;
00665   }
00666   while (dst < dstend){
00667     while (dst < dstlend){
00668       sum1 = sum2 = sum3 = 0;
00669       sum1 += *srcu++;
00670       sum2 += *srcu++;
00671       sum3 += *srcu++;
00672       sum1 += *srcu++;
00673       sum2 += *srcu++;
00674       sum3 += *srcu++;
00675       sum1 += *srcl++;
00676       sum2 += *srcl++;
00677       sum3 += *srcl++;
00678       sum1 += *srcl++;
00679       sum2 += *srcl++;
00680       sum3 += *srcl++;
00681       *dst++ = sum1 >> 2;
00682       *dst++ = sum2 >> 2;
00683       *dst++ = sum3 >> 2;
00684     }
00685     srcu += srcwidth;
00686     srcl += srcwidth;
00687     dstlend += dstwidth;
00688   }
00689   // see DownsampleBy2 for details
00690   _LastPositionOffset=0.5;
00691   return 0;
00692 }
00693 #endif
00694
00695 /////////////////////////////////////////////////////////////////////////////
00696
00697 template <class InputImageType, class OutputImageType>
00698 int Rescale<InputImageType, OutputImageType>::
00699 DownsampleBy4(const Image<InputImageType>& src, Image<OutputImageType>& dst)
00700 {
00701   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy4\n");
00702   int res=0;
00703   unsigned nwidth=(int)src.GetWidth()>>2;
00704   unsigned nheight=(int)src.GetHeight()>>2;
00705   if (dst.GetWidth()!=nwidth || dst.GetHeight()!=nheight){
00706     if (!dst.IsEmpty()) dst.Release();
00707     dst.Init(nwidth, nheight, src.GetChannelCount(), src.GetStorageType(),
00708              src.IsInterleaved());
00709   }
00710   if (src.GetColorModel()==ImageBase::CM_Grey){
00711     res = DownsampleBy4Grey(src, dst);
00712   } else {
00713     if (src.IsInterleaved() && src.GetChannelCount()==3){
00714       res = DownsampleBPoT(src, dst);
00715     } else {
00716       // this is slow
00717       int newwidth=src.GetWidth()>>2;
00718       int newheight=src.GetHeight()>>2;
00719       res = Downsample(src, dst, newwidth, newheight);
00720     }
00721   }
00722   // see DownsampleBy2 for details
00723   _LastPositionOffset=1.5;
00724   return res;
00725 }
00726
00727 template <class InputImageType, class OutputImageType>
00728 int Rescale<InputImageType, OutputImageType>::
00729 DownsampleBy4Grey(const Image<InputImageType>& Source,
00730                   Image<OutputImageType>& Destination)
00731 {
00732   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy4Grey\n");
00733   BIASASSERT(Source.GetChannelCount()==1 &&
00734              Source.GetColorModel()==ImageBase::CM_Grey);
00735   BIASASSERT(Destination.GetChannelCount()==1 &&
00736              Destination.GetColorModel()==ImageBase::CM_Grey);
00737   BIASASSERT(Source.GetWidth()>>2==Destination.GetWidth());
00738   BIASASSERT(Source.GetHeight()>>2==Destination.GetHeight());
00739
00740   /// \todo warning kerneltype sum needed here
00741
00742   double  sum;
00743   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00744   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00745
00746   // make sure the image is not shifted
00747   if (minx%4!=0) minx+=(4-(minx%4));
00748   if (maxx%4!=0) maxx-=(maxx%4);
00749   if (miny%4!=0) miny+=(4-(miny%4));
00750   if (maxy%4!=0) maxy-=(maxy%4);
00751
00752   dx=minx>>2;
00753   dy=miny>>2;
00754   mdx=maxx>>2;
00755   mdy=maxy>>2;
00756
00757   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy);
00758
00759   register InputImageType *src1, *src2, *src3, *src4;
00760   register OutputImageType *dst, *dstend, *dstlend;
00761   register int srcwidth=(int)Source.GetWidth();
00762   register const int dstwidth=(int)Destination.GetWidth();
00763   register int dststep;
00764
00765   src1 = Source.GetImageData()+minx+miny*srcwidth;
00766   src2 = src1 + srcwidth;
00767   src3 = src2 + srcwidth;
00768   src4 = src3 + srcwidth;
00769
00770   dst = Destination.GetImageData() + dy*dstwidth;
00771   dstlend = dst + mdx;
00772   dst+=dx;
00773   dstend = Destination.GetImageData() + mdx + (mdy-1)*dstwidth;
00774
00775   srcwidth+=(3*srcwidth-maxx+minx);
00776   dststep=dstwidth-mdx+dx;
00777
00778   if (srcwidth%2!=0){
00779     srcwidth+=1;
00780   }
00781
00782   /// \todo warning kerneltype div needed here
00783
00784   const double div=(1.0/16.0);
00785   while (dst < dstend){
00786     while (dst < dstlend){
00787       sum = 0.0;
00788       sum += *src1++;
00789       sum += *src1++;
00790       sum += *src1++;
00791       sum += *src1++;
00792
00793       sum += *src2++;
00794       sum += *src2++;
00795       sum += *src2++;
00796       sum += *src2++;
00797
00798       sum += *src3++;
00799       sum += *src3++;
00800       sum += *src3++;
00801       sum += *src3++;
00802
00803       sum += *src4++;
00804       sum += *src4++;
00805       sum += *src4++;
00806       sum += *src4++;
00807
00808       *dst++ = (OutputImageType)(sum * div);
00809     }
00810     src1 += srcwidth;
00811     src2 += srcwidth;
00812     src3 += srcwidth;
00813     src4 += srcwidth;
00814     dst += dststep;
00815     dstlend += dstwidth;
00816   }
00817   // see DownsampleBy2 for details
00818   _LastPositionOffset=1.5;
00819
00820   return 0;
00821 }
00822
00823
00824 template <>
00825 int Rescale<unsigned char, unsigned char>::
00826 DownsampleBy4Grey(const Image<unsigned char>& Source,
00827                   Image<unsigned char>& Destination)
00828 {
00829   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy4Grey\n");
00830   BIASASSERT(Source.GetChannelCount()==1 &&
00831              Source.GetColorModel()==ImageBase::CM_Grey);
00832   BIASASSERT(Destination.GetChannelCount()==1 &&
00833              Destination.GetColorModel()==ImageBase::CM_Grey);
00834   BIASASSERT(Source.GetWidth()>>2==Destination.GetWidth());
00835   BIASASSERT(Source.GetHeight()>>2==Destination.GetHeight());
00836   register unsigned  sum;
00837   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00838   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00839
00840   // make sure the image is not shifted
00841   if (minx%4!=0) minx+=(4-(minx%4));
00842   if (maxx%4!=0) maxx-=(maxx%4);
00843   if (miny%4!=0) miny+=(4-(miny%4));
00844   if (maxy%4!=0) maxy-=(maxy%4);
00845
00846   dx=minx>>2;
00847   dy=miny>>2;
00848   mdx=maxx>>2;
00849   mdy=maxy>>2;
00850
00851   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy);
00852
00853   register unsigned char *src1, *src2, *src3, *src4, *dst, *dstend, *dstlend;
00854   register int srcwidth=(int)Source.GetWidth();
00855   register const int dstwidth=(int)Destination.GetWidth();
00856   register int dststep;
00857
00858   src1 = Source.GetImageData()+minx+miny*srcwidth;
00859   src2 = src1 + srcwidth;
00860   src3 = src2 + srcwidth;
00861   src4 = src3 + srcwidth;
00862
00863   dst = Destination.GetImageData() + dy*dstwidth;
00864   dstlend = dst + mdx;
00865   dst+=dx;
00866   dstend = Destination.GetImageData() + mdx + (mdy-1)*dstwidth;
00867
00868   srcwidth+=(3*srcwidth-maxx+minx);
00869   dststep=dstwidth-mdx+dx;
00870
00871   if (srcwidth%2!=0){
00872     srcwidth+=1;
00873   }
00874   while (dst < dstend){
00875     while (dst < dstlend){
00876       sum = 0;
00877       sum += *src1++;
00878       sum += *src1++;
00879       sum += *src1++;
00880       sum += *src1++;
00881
00882       sum += *src2++;
00883       sum += *src2++;
00884       sum += *src2++;
00885       sum += *src2++;
00886
00887       sum += *src3++;
00888       sum += *src3++;
00889       sum += *src3++;
00890       sum += *src3++;
00891
00892       sum += *src4++;
00893       sum += *src4++;
00894       sum += *src4++;
00895       sum += *src4++;
00896
00897       *dst++ = sum >> 4;
00898     }
00899     src1 += srcwidth;
00900     src2 += srcwidth;
00901     src3 += srcwidth;
00902     src4 += srcwidth;
00903     dst += dststep;
00904     dstlend += dstwidth;
00905   }
00906   // see DownsampleBy2 for details
00907   _LastPositionOffset=1.5;
00908
00909   return 0;
00910 }
00911
00912 #ifdef BUILD_IMAGE_USHORT
00913 template <>
00914 int Rescale<unsigned short, unsigned short>::
00915 DownsampleBy4Grey(const Image<unsigned short>& Source,
00916                       Image<unsigned short>& Destination)
00917 {
00918   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBy4Grey\n");
00919   BIASASSERT(Source.GetChannelCount()==1 &&
00920              Source.GetColorModel()==ImageBase::CM_Grey);
00921   BIASASSERT(Destination.GetChannelCount()==1 &&
00922              Destination.GetColorModel()==ImageBase::CM_Grey);
00923   BIASASSERT(Source.GetWidth()>>2==Destination.GetWidth());
00924   BIASASSERT(Source.GetHeight()>>2==Destination.GetHeight());
00925   register unsigned  sum;
00926   unsigned minx, miny, maxx, maxy, dx, dy, mdx, mdy;
00927   Source.GetROI()->GetCorners(minx, miny, maxx, maxy);
00928
00929   // make sure the image is not shifted
00930   if (minx%4!=0) minx+=(4-(minx%4));
00931   if (maxx%4!=0) maxx-=(maxx%4);
00932   if (miny%4!=0) miny+=(4-(miny%4));
00933   if (maxy%4!=0) maxy-=(maxy%4);
00934
00935   dx=minx>>2;
00936   dy=miny>>2;
00937   mdx=maxx>>2;
00938   mdy=maxy>>2;
00939
00940   Destination.GetROI()->SetCorners(dx, dy, mdx, mdy);
00941
00942   register unsigned short *src1, *src2, *src3, *src4, *dst, *dstend, *dstlend;
00943   register int srcwidth=(int)Source.GetWidth();
00944   register const int dstwidth=(int)Destination.GetWidth();
00945   register int dststep;
00946
00947   src1 = Source.GetImageData()+minx+miny*srcwidth;
00948   src2 = src1 + srcwidth;
00949   src3 = src2 + srcwidth;
00950   src4 = src3 + srcwidth;
00951
00952   dst = Destination.GetImageData() + dy*dstwidth;
00953   dstlend = dst + mdx;
00954   dst+=dx;
00955   dstend = Destination.GetImageData() + mdx + (mdy-1)*dstwidth;
00956
00957   srcwidth+=(3*srcwidth-maxx+minx);
00958   dststep=dstwidth-mdx+dx;
00959
00960   if (srcwidth%2!=0){
00961     srcwidth+=1;
00962   }
00963   while (dst < dstend){
00964     while (dst < dstlend){
00965       sum = 0;
00966       sum += *src1++;
00967       sum += *src1++;
00968       sum += *src1++;
00969       sum += *src1++;
00970
00971       sum += *src2++;
00972       sum += *src2++;
00973       sum += *src2++;
00974       sum += *src2++;
00975
00976       sum += *src3++;
00977       sum += *src3++;
00978       sum += *src3++;
00979       sum += *src3++;
00980
00981       sum += *src4++;
00982       sum += *src4++;
00983       sum += *src4++;
00984       sum += *src4++;
00985
00986       *dst++ = sum >> 4;
00987     }
00988     src1 += srcwidth;
00989     src2 += srcwidth;
00990     src3 += srcwidth;
00991     src4 += srcwidth;
00992     dst += dststep;
00993     dstlend += dstwidth;
00994   }
00995   // see DownsampleBy2 for details
00996   _LastPositionOffset=1.5;
00997
00998   return 0;
00999 }
01000 #endif
01001
01002
01003
01004
01005
01006 template <class InputImageType, class OutputImageType>
01007 int Rescale<InputImageType, OutputImageType>::
01008 DownsampleBPoT(const Image<InputImageType>& Source,
01009         Image<OutputImageType>& Destination)
01010 {
01011   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::DownsampleBPoT\n");
01012   int res = 0;
01013   unsigned int channels = Source.GetChannelCount();
01014   int PowerOfTwo = (int)rint(log(*_RescaleFactor)/log(2.0));
01015   if (PowerOfTwo == 0){
01016     // No downsample required, just copy
01017     if (Destination.GetWidth() != Source.GetWidth()
01018         || Destination.GetHeight() != Source.GetHeight()
01019         ||  Destination.GetChannelCount() != channels ){
01020       if ( ! Destination.IsEmpty())
01021         Destination.Release();
01022       Destination.Init(Source.GetWidth(),Source.GetHeight(),channels,
01023                        Source.GetStorageType(), Source.IsInterleaved());
01024     }
01025     Destination = Source;
01026     _LastPositionOffset=0.0;
01027   } else { // downsample
01028     unsigned int newwidth, newheight;
01029     unsigned int oldwidth,oldheight;
01030
01031     oldwidth = Source.GetWidth();
01032     oldheight = Source.GetHeight();
01033
01034     newwidth = (oldwidth >> PowerOfTwo);
01035     newheight = (oldheight >> PowerOfTwo);
01036
01037     if (Destination.GetWidth() != newwidth
01038         || Destination.GetHeight() != newheight
01039         ||  Destination.GetChannelCount() != channels ){
01040       if ( ! Destination.IsEmpty())
01041         Destination.Release();
01042       Destination.Init(newwidth,newheight,channels,
01043                        Source.GetStorageType(),
01044                        Source.IsInterleaved());
01045     }
01046     OutputImageType *sink;
01047     InputImageType *src;
01048     bool IdenticalImages = false;
01049
01050     sink = Destination.GetImageData();
01051     src = Source.GetImageData();
01052
01053     if ((void*)src==(void*)sink){
01054       IdenticalImages = true;
01055       sink = new OutputImageType[newwidth * newheight];
01056     }
01057
01058
01059     // calculate offset array
01060     int *offset;
01061     register int x, y, length=(1<<PowerOfTwo);
01062     register int index=0;
01063     offset = new int[length*length]; // 2x2 for PowerofTwo==1
01064     length=(length>>1);
01065     for(y=-length; y<length; y++)
01066       for(x=-length; x<length; x++){
01067         offset[index++]=(int)(y*oldwidth*channels + x*channels);
01068       }
01069
01070     double div=pow(2.0,PowerOfTwo+PowerOfTwo);
01071     register int inc = (length<<1);
01072
01073     int min_y = (int)(length*oldwidth*channels);
01074     int max_y = (int)(oldheight*oldwidth*channels);
01075     register int inc_y = (int)(oldwidth*inc*channels);
01076
01077     int min_x = length*channels;
01078     int max_x = oldwidth*channels;
01079     register int inc_x =(int)(inc*channels);
01080     //     cout <<"channels: "<<channels<<endl;
01081     //     cout <<"y-loop: "<<min_y<<" <"<<max_y<<" inc: "<<inc_y<<endl;
01082     //     cout <<"x-loop: "<<min_x<<" <"<<max_x<<" inc: "<<inc_x<<endl;
01083
01084     register int off_ind;
01085
01086     /// \todo warning kerneltype here
01087
01088     register double sum;
01089     register int image_index=0;
01090     for(y=min_y; y<max_y;y+=inc_y)
01091       for(x=min_x; x<max_x; x+=inc_x){
01092         for (unsigned int c = 0; c<channels; c++) {
01093           sum = 0.0;
01094           for(off_ind=0;off_ind<index;off_ind++){
01095             sum +=  src[y+x+offset[off_ind]+c];
01096           }
01097           sink[image_index]=(OutputImageType)(sum/div);
01098           //        sink[image_index]=src[y+x+c];
01099           image_index ++;
01100         }
01101       }
01102
01103
01104
01105     delete[] offset;
01106
01107     if (IdenticalImages) {
01108       Destination.Release();
01109       Destination.Init(newwidth, newheight, channels);
01110       Destination.ReleaseImageDataPointer();
01111
01112       Destination.RedirectImageDataPointer(sink);
01113     }
01114     _LastPositionOffset= pow(2.0, PowerOfTwo-1.0)-0.5;
01115   }
01116
01117   return res;
01118 }
01119
01120
01121
01122
01123 //////////////////////////////////////////////////////////////////////////
01124 //               upsampling functions
01125 //////////////////////////////////////////////////////////////////////////
01126
01127 template <class InputImageType, class OutputImageType>
01128 int Rescale<InputImageType, OutputImageType>::
01129 Upsample(const Image<InputImageType>& src, Image<OutputImageType>& dst)
01130 {
01131   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::Upsample(src, dst)\n");
01132
01133   return Upsample(src, dst,
01134                   (unsigned int)floor((double)src.GetWidth()/
01135                                       *_RescaleFactor),
01136                   (unsigned int)floor((double)src.GetHeight()/
01137                                       *_RescaleFactor));
01138 }
01139
01140 template <class InputImageType, class OutputImageType>
01141 int Rescale<InputImageType, OutputImageType>::
01142 Upsample(const Image<InputImageType>& src, Image<OutputImageType>& dst,
01143          const unsigned newwidth, const unsigned newheight)
01144 {
01145   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::Upsample(src, dst, w, h)\n");
01146 #ifdef BIAS_DEBUG
01147   unsigned tlx, tly, brx, bry;
01148   src.GetROI()->GetCorners(tlx, tly, brx, bry);
01149   if (tlx!=0 || tly!=0 || brx!=src.GetWidth() || bry!=src.GetHeight()){
01150     BIASERR("ROI not yet supported");
01151     //BIASASSERT(false);
01152     BIASABORT;
01153   }
01154 #endif
01155   BIASASSERT(src.GetWidth()<=newwidth);
01156
01157   BIASASSERT(src.GetHeight()<=newheight);
01158   int res=0;
01159   float oldx, oldy;
01160   float scalex, scaley;
01161   unsigned int channelcount=src.GetChannelCount();
01162   bool identicalimages=false;
01163   OutputImageType *sink;
01164
01165   if ((void *)src.GetImageData() == (void *)dst.GetImageData())
01166     identicalimages=true;
01167
01168   if (!identicalimages){
01169     if (!src.SamePixelAndChannelCount(dst))
01170       if (!dst.IsEmpty()) dst.Release();
01171
01172     if (dst.IsEmpty())
01173       dst.Init(newwidth, newheight, channelcount,  src.GetStorageType(),
01174                src.IsInterleaved());
01175
01176     sink = dst.GetImageData();
01177   } else {
01178     sink = new OutputImageType[ newwidth *  newheight * channelcount];
01179   }
01180
01181   scalex = (float)(src.GetWidth() - 1)/ (float) (newwidth);
01182   scaley = (float)(src.GetHeight() - 1) / (float) (newheight);
01183   if (src.IsInterleaved()) {
01184     for (unsigned int y = 0; y<newheight; y++)
01185       for (unsigned int x = 0; x<newwidth; x++)
01186         for (unsigned int c = 0; c<channelcount; c++) {
01187           oldx = (float)x * scalex;
01188           oldy = (float)y * scaley;
01189 //           oldx = (float)x / factor;
01190 //           oldy = (float)y / factor;
01191           sink[(y * newwidth + x)* channelcount + c] =
01192             (OutputImageType)rint(src.BilinearInterpolation(oldx, oldy, c));
01193         }
01194   } else { // planar
01195     BIASERR("Upscale only implemented on interleaved images");
01196     res = -1;
01197   }
01198   if (identicalimages && res==0){
01199     dst.Release();
01200     dst.Init(newwidth, newheight, channelcount);
01201
01202     dst.ReleaseImageDataPointer();
01203     dst.RedirectImageDataPointer(sink);
01204   }
01205
01206   return res;
01207 }
01208
01209 template <class InputImageType, class OutputImageType>
01210 int Rescale<InputImageType, OutputImageType>::
01211 UpsampleGrey(const Image<InputImageType>& src, Image<OutputImageType>& dst,
01212              const unsigned newwidth, const unsigned newheight)
01213 {
01214   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::UpsampleGrey(src, dst, w, h)\n");
01215 #ifdef BIAS_DEBUG
01216   unsigned tlx, tly, brx, bry;
01217   src.GetROI()->GetCorners(tlx, tly, brx, bry);
01218   if (tlx!=0 || tly!=0 || brx!=src.GetWidth() || bry!=src.GetHeight()){
01219     BIASERR("ROI not yet supported");
01220     //BIASASSERT(false);
01221     BIASABORT;
01222   }
01223 #endif
01224 #ifdef BIAS_DEBUG
01225   if (src.GetChannelCount()!=1 || src.GetColorModel()!=ImageBase::CM_Grey){
01226     BIASERR("only for grey images");
01227     //BIASASSERT(false);
01228     BIASABORT;
01229   }
01230 #endif
01231   BIASASSERT(src.GetWidth()<newwidth);
01232   BIASASSERT(src.GetHeight()<newheight);
01233   BIASASSERT(src.GetChannelCount()==1);
01234   BIASASSERT(src.GetColorModel()==ImageBase::CM_Grey);
01235   int res=0;
01236   float oldx, oldy;
01237   float scalex, scaley;
01238   bool identicalimages=false;
01239   OutputImageType *sink;
01240
01241   if ((void *)src.GetImageData() == (void *)dst.GetImageData())
01242     identicalimages=true;
01243
01244   if (!identicalimages){
01245     if (!src.SamePixelAndChannelCount(dst))
01246       if (!dst.IsEmpty()) dst.Release();
01247
01248     if (dst.IsEmpty())
01249       dst.Init(newwidth, newheight, 1);
01250
01251     sink = dst.GetImageData();
01252   } else {
01253     sink = new OutputImageType[ newwidth *  newheight ];
01254   }
01255
01256   scalex = (float)(src.GetWidth() - 1)/ (float) (newwidth);
01257   scaley = (float)(src.GetHeight() - 1) / (float) (newheight);
01258   if (src.IsInterleaved()) {
01259     for (unsigned int y = 0; y<newheight; y++)
01260       for (unsigned int x = 0; x<newwidth; x++){
01261         oldx = (float)x * scalex;
01262         oldy = (float)y * scaley;
01263         sink[(y * newwidth + x)] =
01264           src.FastBilinearInterpolationGrey(oldx, oldy);
01265       }
01266   } else { // planar
01267     BIASERR("Upscale only implemented on interleaved images");
01268     res = -1;
01269   }
01270   if (identicalimages && res==0){
01271     dst.Release();
01272     dst.Init(newwidth, newheight, 1);
01273
01274     dst.ReleaseImageDataPointer();
01275     dst.RedirectImageDataPointer(sink);
01276   }
01277
01278   return res;
01279 }
01280
01281
01282 // bicubic weights for factor 2 upsampling
01283 #define WY0 -0.03125
01284 #define WY1  0.28125
01285
01286 #define WX0  -0.125
01287 #define WX1  1.125
01288
01289 ////////////////////////////////////////////////////////////////////////////
01290
01291 template <class InputImageType, class OutputImageType>
01292 int Rescale<InputImageType, OutputImageType>::
01293 UpsampleBy2Grey(const Image<InputImageType>& Source,
01294                 Image<OutputImageType>& Destination,
01295                 InterpolationType interpolation_method,
01296                 const double& valmin,
01297                 const double& valmax) {
01298   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::UpsampleBy2Grey\n");
01299   register OutputImageType *dstu=NULL, *dstl=NULL;
01300   register InputImageType *src=NULL,  *srclend=NULL;
01301   const int srcwidth = Source.GetWidth(),
01302     dstwidth = Destination.GetWidth();
01303 #ifdef BIAS_DEBUG
01304   if (srcwidth*2!=dstwidth) {
01305     BIASERR("wrong image width :"<<srcwidth<<"*2 != "<<dstwidth);
01306     BIASABORT;
01307   }
01308 #endif
01309   dstu = dstl = Destination.GetImageData();
01310   src = Source.GetImageData();
01311   dstl += dstwidth;
01312
01313   srclend = src + srcwidth;
01314
01315   switch (interpolation_method) {
01316   case NearestNeighbour: {
01317     register const InputImageType* srcend = src + Source.GetPixelCount();
01318     while (src < srcend){
01319       while (src < srclend){
01320         *dstu++ = *dstl++ = *src;
01321         *dstu++ = *dstl++ = *src++;
01322       }
01323       dstu += dstwidth;
01324       dstl += dstwidth;
01325       srclend += srcwidth;
01326     }
01327     return 0;
01328   }
01329   case Bilinear: {
01330 #ifdef BIAS_DEBUG
01331     if (srcwidth<2) {
01332       BIASERR("need image of more than one line !");
01333       BIASABORT;
01334     }
01335 #endif
01336
01337     register const InputImageType* srcend =
01338       src + Source.GetPixelCount()- srcwidth;
01339     // main part
01340     while (src < srcend){
01341       const InputImageType* c_srclend = srclend-1;
01342       while (src < c_srclend){
01343         *dstl++ =  OutputImageType(0.5 * (src[0] + src[srcwidth]));
01344         *dstu++ = *src;
01345         *dstu++ = OutputImageType(0.5  * (src[0] + src[1]));
01346         *dstl++ = OutputImageType(0.25 * (src[0] + src[1]+
01347                                           src[srcwidth] + src[srcwidth+1]));
01348         src++;
01349       }
01350       // last column
01351       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth]));
01352       *dstu++ = *src;
01353       *dstu++ = *src;
01354       *dstl = dstl[-1]; dstl++;
01355       src++;
01356
01357       // dst: skip already completed line
01358       dstu += dstwidth;
01359       dstl += dstwidth;
01360       srclend += srcwidth;
01361     }
01362     srclend-=1;
01363     // last line only copied
01364     while (src < srclend){
01365       *dstu++ = *dstl++ = *src++;
01366       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-1]+src[0]));
01367     }
01368     // last pixel (nearest neighbour)
01369     *dstu++ = *dstl++ = *src;
01370     *dstu++ = *dstl++ = *src;
01371     return 0;
01372   }
01373   case Bicubic: {
01374 #ifdef BIAS_DEBUG
01375     if (srcwidth<4) {
01376       BIASERR("need image of more than three lines !");
01377       BIASABORT;
01378     }
01379 #endif
01380
01381     // first line bilinear
01382     const InputImageType* c_firstsrclend = srclend-1;
01383     while (src < c_firstsrclend){
01384       *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth]));
01385       *dstu++ = *src;
01386       *dstu++ = OutputImageType(0.5 * (src[0] + src[1]));
01387       *dstl++ = OutputImageType(0.25 * (src[0] + src[1] +
01388                                         src[srcwidth] + src[srcwidth+1]));
01389       src++;
01390     }
01391     // last column
01392     *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth]));
01393     *dstu++ = *src;
01394     *dstu++ = *src;
01395     *dstl   = dstl[-1]; dstl++;
01396     src++;
01397     dstu += dstwidth;
01398     dstl += dstwidth;
01399     srclend += srcwidth;
01400
01401     register const InputImageType* srcend =
01402       Source.GetImageData() + Source.GetPixelCount()- (srcwidth*2+2);
01403
01404     const int width2 = 2*srcwidth;
01405     const int mwidth = -srcwidth;
01406     // main part
01407     while (src < srcend){
01408       // first column bilinear
01409       *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth]));
01410       *dstu++ = *src;
01411       *dstu++ = OutputImageType(0.5  * (src[0] + src[1]));
01412       *dstl++ = OutputImageType(0.25 * (src[0] + src[1] +
01413                                         src[srcwidth] + src[srcwidth+1]));
01414       src++;
01415
01416       const InputImageType* c_srclend = srclend - 2;
01417       while (src < c_srclend){
01418         // lower left
01419         register double val = 2.0*((WY0*(src[mwidth    ]+src[width2    ])) +
01420                                    (WY1*(src[ 0        ]+src[srcwidth  ])));
01421         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01422         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01423         else  *dstl++ = OutputImageType(val);
01424
01425         // upper left is original pixel
01426         *dstu++ = OutputImageType(*src);
01427
01428         // upper right
01429         val = (WX0*(src[-1] + src[2])+WX1*(src[0]+src[1]))*0.5;
01430
01431         if (val>=valmax) *dstu++ = OutputImageType(valmax);
01432         else if (val<=valmin)  *dstu++ = OutputImageType(valmin);
01433         else  *dstu++ = OutputImageType(val);
01434
01435         // lower right
01436         val = ((WX0*(src[mwidth - 1] + src[mwidth + 2]) +
01437                 WX1*(src[mwidth    ] + src[mwidth + 1])) +
01438                (WX0*(src[width2 - 1] + src[width2 + 2]) +
01439                 WX1*(src[width2    ] + src[width2 + 1])))*WY0 +
01440           ((WX0*(src[-1        ] + src[ 2        ]) +
01441             WX1*(src[ 0        ] + src[ 1        ])) +
01442            (WX0*(src[srcwidth  - 1] + src[srcwidth  + 2]) +
01443             WX1*(src[srcwidth     ] + src[srcwidth  + 1])))*WY1;
01444
01445         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01446         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01447         else  *dstl++ = OutputImageType(val);
01448
01449         src++;
01450       }
01451
01452       // last columns
01453       // bilinear
01454       *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth]));
01455       *dstu++ = *src;
01456       *dstu++ = OutputImageType(0.5 * (src[0] + src[1]));
01457       *dstl++ = OutputImageType(0.25 * (src[0] + src[1] +
01458                                         src[srcwidth] + src[srcwidth+1]));
01459       src++;
01460       // copy
01461       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth]));
01462       *dstu++ = *src;
01463       *dstu++ = *src;
01464       *dstl   = dstl[-1]; dstl++;
01465       src++;
01466
01467       dstu += dstwidth;
01468       dstl += dstwidth;
01469       srclend += srcwidth;
01470     }
01471
01472     // bilinear
01473     register const InputImageType* srcendlin =
01474       Source.GetImageData() + Source.GetPixelCount()- srcwidth;
01475     // main part
01476     while (src < srcendlin){
01477       const InputImageType* c_srclend = srclend - 1;
01478       while (src < c_srclend){
01479         *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth]));
01480         *dstu++ = *src++;
01481         *dstu++ = OutputImageType(0.5 * (src[-1] + src[0]));
01482         *dstl++ = OutputImageType(0.25 * (src[-1] + src[0] +
01483                                           src[srcwidth-1] + src[srcwidth]));
01484       }
01485       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth]));
01486       *dstu++ = *src;
01487       *dstu++ = *src;
01488       *dstl   = dstl[-1]; dstl++;
01489       src++;
01490
01491       dstu += dstwidth;
01492       dstl += dstwidth;
01493       srclend += srcwidth;
01494     }
01495
01496     srclend-=1;
01497     // last line only copied
01498     while (src < srclend){
01499       *dstu++ = *dstl++ = *src++;
01500       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-1]+src[0]));
01501     }
01502     // last pixel (nearest neighbour)
01503     *dstu++ = *dstl++ = *src;
01504     *dstu++ = *dstl++ = *src;
01505     return 0;
01506   }
01507   default:
01508     BIASERR("interpolation not implemented in rescale");
01509     BIASABORT;
01510   }
01511   return 0;
01512 }
01513
01514
01515 template <class InputImageType, class OutputImageType>
01516 int Rescale<InputImageType, OutputImageType>::
01517 UpsampleBy2RGBInterleaved(const Image<InputImageType>& Source,
01518                           Image<OutputImageType>& Destination,
01519                           InterpolationType interpolation_method,
01520                           const double& valmin,
01521                           const double& valmax) {
01522   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::UpsampleBy2RGBInterleaved\n");
01523   register OutputImageType *dstu=NULL, *dstl=NULL;
01524   register InputImageType *src=NULL,  *srclend=NULL;
01525   const int srcwidth = Source.GetWidth(),
01526     dstwidth = Destination.GetWidth();
01527   const int srcwidth3 = 3*srcwidth, dstwidth3=3*dstwidth;
01528
01529 #ifdef BIAS_DEBUG
01530   if (srcwidth*2!=dstwidth) {
01531     BIASERR("wrong image width :"<<srcwidth<<"*2 != "<<dstwidth);
01532     BIASABORT;
01533   }
01534   if (Source.GetChannelCount()!=3) {
01535     BIASERR("wrong channel count in source");
01536     BIASABORT;
01537   }
01538   if (Destination.GetChannelCount()!=3) {
01539     BIASERR("wrong channel count in dest");
01540     BIASABORT;
01541   }
01542   if (Destination.IsPlanar() || Source.IsPlanar()) {
01543     BIASERR("only for interleaved images");
01544     BIASABORT;
01545   }
01546 #endif
01547   dstu = dstl = Destination.GetImageData();
01548   src = Source.GetImageData();
01549   dstl += dstwidth3;
01550
01551   srclend = src + srcwidth3;
01552
01553   switch (interpolation_method) {
01554   case NearestNeighbour: {
01555     register const InputImageType* srcend = src + Source.GetPixelCount()*3;
01556     while (src < srcend){
01557       while (src < srclend){
01558         *dstu++ = *dstl++ =  src[0];
01559         *dstu++ = *dstl++ =  src[1];
01560         *dstu++ = *dstl++ =  src[2];
01561         *dstu++ = *dstl++ = *src++;
01562         *dstu++ = *dstl++ = *src++;
01563         *dstu++ = *dstl++ = *src++;
01564       }
01565       dstu += dstwidth3;
01566       dstl += dstwidth3;
01567       srclend += srcwidth3;
01568     }
01569     return 0;
01570   }
01571   case Bilinear: {
01572 #ifdef BIAS_DEBUG
01573     if (srcwidth<2) {
01574       BIASERR("need image of more than one line !");
01575       BIASABORT;
01576     }
01577 #endif
01578
01579     register const InputImageType* srcend =
01580       src + Source.GetPixelCount()*3 - srcwidth3;
01581     // main part
01582     while (src < srcend){
01583       const InputImageType* c_srclend = srclend-3;
01584       while (src < c_srclend){
01585         *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01586         *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01587         *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01588
01589         *dstu++ = src[0];
01590         *dstu++ = src[1];
01591         *dstu++ = src[2];
01592
01593         *dstu++ = OutputImageType(0.5  * (src[0] + src[3]));
01594         *dstu++ = OutputImageType(0.5  * (src[1] + src[4]));
01595         *dstu++ = OutputImageType(0.5  * (src[2] + src[5]));
01596
01597         *dstl++ = OutputImageType(0.25 * (src[0] + src[3]+
01598                                           src[srcwidth3] + src[srcwidth3+1]));
01599         src++;
01600         *dstl++ = OutputImageType(0.25 * (src[0] + src[3]+
01601                                           src[srcwidth3] + src[srcwidth3+1]));
01602         src++;
01603         *dstl++ = OutputImageType(0.25 * (src[0] + src[3]+
01604                                           src[srcwidth3] + src[srcwidth3+1]));
01605         src++;
01606
01607       }
01608       // last column
01609       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01610       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01611       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01612
01613       *dstu++ = src[0];
01614       *dstu++ = src[1];
01615       *dstu++ = src[2];
01616
01617       *dstu++ = src[0];
01618       *dstu++ = src[1];
01619       *dstu++ = src[2];
01620
01621       *dstl = dstl[-3]; dstl++;
01622       *dstl = dstl[-3]; dstl++;
01623       *dstl = dstl[-3]; dstl++;
01624       src+=3;
01625       // dst: skip already completed line
01626       dstu += dstwidth3;
01627       dstl += dstwidth3;
01628       srclend += srcwidth3;
01629     }
01630     srclend-=3;
01631     // last line only copied
01632     while (src < srclend){
01633       *dstu++ = *dstl++ = *src++;
01634       *dstu++ = *dstl++ = *src++;
01635       *dstu++ = *dstl++ = *src++;
01636
01637       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-3]+src[0]));
01638       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-2]+src[1]));
01639       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-1]+src[2]));
01640     }
01641     // last pixel (nearest neighbour)
01642     *dstu++ = *dstl++ = src[0];
01643     *dstu++ = *dstl++ = src[1];
01644     *dstu++ = *dstl++ = src[2];
01645     *dstu++ = *dstl++ = src[0];
01646     *dstu++ = *dstl++ = src[1];
01647     *dstu++ = *dstl++ = src[2];
01648
01649     return 0;
01650   }
01651   case Bicubic: {
01652 #ifdef BIAS_DEBUG
01653     if ((srcwidth<4) || Source.GetHeight()<4) {
01654       BIASERR("need image of more than three lines !");
01655       BIASABORT;
01656     }
01657 #endif
01658
01659     // first line bilinear
01660     const InputImageType* c_firstsrclend = srclend-3;
01661     while (src < c_firstsrclend){
01662       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01663       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01664       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01665
01666       *dstu++ = src[0];
01667       *dstu++ = src[1];
01668       *dstu++ = src[2];
01669
01670       *dstu++ = OutputImageType(0.5 * (src[0] + src[3]));
01671       *dstu++ = OutputImageType(0.5 * (src[1] + src[4]));
01672       *dstu++ = OutputImageType(0.5 * (src[2] + src[5]));
01673
01674       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01675                                         src[srcwidth3] + src[srcwidth3+3]));
01676       src++;
01677       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01678                                         src[srcwidth3] + src[srcwidth3+3]));
01679       src++;
01680       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01681                                         src[srcwidth3] + src[srcwidth3+3]));
01682       src++;
01683     }
01684     // last column
01685     *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01686     *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01687     *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01688     *dstu++ = src[0];
01689     *dstu++ = src[1];
01690     *dstu++ = src[2];
01691     *dstu++ = *src++;
01692     *dstu++ = *src++;
01693     *dstu++ = *src++;
01694     *dstl = dstl[-3]; dstl++;
01695     *dstl = dstl[-3]; dstl++;
01696     *dstl = dstl[-3]; dstl++;
01697
01698     dstu += dstwidth3;
01699     dstl += dstwidth3;
01700     srclend += srcwidth3;
01701
01702     register const InputImageType* srcend =
01703       Source.GetImageData() + Source.GetPixelCount()*3 - (srcwidth3*2+6);
01704
01705     const int width2 = 2*srcwidth3;
01706     const int mwidth = -srcwidth3;
01707     // main part
01708     while (src < srcend){
01709       // first column bilinear
01710       *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth3]));
01711       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01712       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01713
01714       *dstu++ = src[0];
01715       *dstu++ = src[0];
01716       *dstu++ = src[0];
01717
01718       *dstu++ = OutputImageType(0.5  * (src[0] + src[3]));
01719       *dstu++ = OutputImageType(0.5  * (src[1] + src[4]));
01720       *dstu++ = OutputImageType(0.5  * (src[2] + src[5]));
01721
01722       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01723                                         src[srcwidth3] + src[srcwidth3+1]));
01724       src++;
01725       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01726                                         src[srcwidth3] + src[srcwidth3+1]));
01727       src++;
01728       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01729                                         src[srcwidth3] + src[srcwidth3+1]));
01730       src++;
01731
01732       const InputImageType* c_srclend = srclend - 6;
01733       while (src < c_srclend){
01734         // lower left
01735         register double val = 2.0*((WY0*(src[mwidth    ]+src[width2    ])) +
01736                                    (WY1*(src[ 0        ]+src[srcwidth3  ])));
01737         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01738         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01739         else  *dstl++ = OutputImageType(val);
01740
01741         val = 2.0*((WY0*(src[mwidth+1    ]+src[width2+1    ])) +
01742                    (WY1*(src[ 1        ]+src[srcwidth3+1  ])));
01743         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01744         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01745         else  *dstl++ = OutputImageType(val);
01746
01747         val = 2.0*((WY0*(src[mwidth+2    ]+src[width2+2    ])) +
01748                    (WY1*(src[ 2        ]+src[srcwidth3+2  ])));
01749         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01750         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01751         else  *dstl++ = OutputImageType(val);
01752
01753         // upper left is original pixel
01754         *dstu++ = OutputImageType(src[0]);
01755         *dstu++ = OutputImageType(src[1]);
01756         *dstu++ = OutputImageType(src[2]);
01757
01758         // upper right
01759         val = (WX0*(src[-3] + src[6])+WX1*(src[0]+src[3]))*0.5;
01760         if (val>=valmax) *dstu++ = OutputImageType(valmax);
01761         else if (val<=valmin)  *dstu++ = OutputImageType(valmin);
01762         else  *dstu++ = OutputImageType(val);
01763
01764         val = (WX0*(src[-2] + src[7])+WX1*(src[1]+src[4]))*0.5;
01765         if (val>=valmax) *dstu++ = OutputImageType(valmax);
01766         else if (val<=valmin)  *dstu++ = OutputImageType(valmin);
01767         else  *dstu++ = OutputImageType(val);
01768
01769         val = (WX0*(src[-1] + src[8])+WX1*(src[2]+src[5]))*0.5;
01770         if (val>=valmax) *dstu++ = OutputImageType(valmax);
01771         else if (val<=valmin)  *dstu++ = OutputImageType(valmin);
01772         else  *dstu++ = OutputImageType(val);
01773
01774         // lower right
01775         val = ((WX0*(src[mwidth - 3] + src[mwidth + 6]) +
01776                 WX1*(src[mwidth    ] + src[mwidth + 3])) +
01777                (WX0*(src[width2 - 3] + src[width2 + 6]) +
01778                 WX1*(src[width2    ] + src[width2 + 3])))*WY0 +
01779           ((WX0*(src[-3        ] + src[ 6        ]) +
01780             WX1*(src[ 0        ] + src[ 3        ])) +
01781            (WX0*(src[srcwidth3  - 3] + src[srcwidth3  + 6]) +
01782             WX1*(src[srcwidth3     ] + src[srcwidth3  + 3])))*WY1;
01783         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01784         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01785         else  *dstl++ = OutputImageType(val);
01786         src++;
01787         val = ((WX0*(src[mwidth - 3] + src[mwidth + 6]) +
01788                 WX1*(src[mwidth    ] + src[mwidth + 3])) +
01789                (WX0*(src[width2 - 3] + src[width2 + 6]) +
01790                 WX1*(src[width2    ] + src[width2 + 3])))*WY0 +
01791           ((WX0*(src[-3        ] + src[ 6        ]) +
01792             WX1*(src[ 0        ] + src[ 3        ])) +
01793            (WX0*(src[srcwidth3  - 3] + src[srcwidth3  + 6]) +
01794             WX1*(src[srcwidth3     ] + src[srcwidth3  + 3])))*WY1;
01795         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01796         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01797         else  *dstl++ = OutputImageType(val);
01798         src++;
01799         val = ((WX0*(src[mwidth - 3] + src[mwidth + 6]) +
01800                 WX1*(src[mwidth    ] + src[mwidth + 3])) +
01801                (WX0*(src[width2 - 3] + src[width2 + 6]) +
01802                 WX1*(src[width2    ] + src[width2 + 3])))*WY0 +
01803           ((WX0*(src[-3        ] + src[ 6        ]) +
01804             WX1*(src[ 0        ] + src[ 3        ])) +
01805            (WX0*(src[srcwidth3  - 3] + src[srcwidth3  + 6]) +
01806             WX1*(src[srcwidth3     ] + src[srcwidth3  + 3])))*WY1;
01807         if (val>=valmax) *dstl++ = OutputImageType(valmax);
01808         else if (val<=valmin)  *dstl++ = OutputImageType(valmin);
01809         else  *dstl++ = OutputImageType(val);
01810         src++;
01811       }
01812
01813       // last columns
01814       // bilinear
01815       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01816       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01817       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01818
01819       *dstu++ = src[0];
01820       *dstu++ = src[1];
01821       *dstu++ = src[2];
01822
01823       *dstu++ = OutputImageType(0.5 * (src[0] + src[3]));
01824       *dstu++ = OutputImageType(0.5 * (src[1] + src[4]));
01825       *dstu++ = OutputImageType(0.5 * (src[2] + src[5]));
01826
01827       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01828                                         src[srcwidth] + src[srcwidth+1]));
01829       src++;
01830       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01831                                         src[srcwidth] + src[srcwidth+1]));
01832       src++;
01833       *dstl++ = OutputImageType(0.25 * (src[0] + src[3] +
01834                                         src[srcwidth] + src[srcwidth+1]));
01835       src++;
01836
01837
01838       // copy
01839       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01840       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01841       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01842
01843       *dstu++ = *src;
01844       *dstu++ = src[1];
01845       *dstu++ = src[2];
01846
01847       *dstu++ = src[0];
01848       *dstu++ = src[1];
01849       *dstu++ = src[2];
01850
01851       *dstl = dstl[-3]; dstl++;
01852       src++;
01853       *dstl = dstl[-3]; dstl++;
01854       src++;
01855       *dstl = dstl[-3]; dstl++;
01856       src++;
01857
01858       dstu += dstwidth3;
01859       dstl += dstwidth3;
01860       srclend += srcwidth3;
01861     }
01862
01863     // bilinear
01864     register const InputImageType* srcendlin =
01865       Source.GetImageData() + Source.GetPixelCount()- srcwidth3;
01866     // main part
01867     while (src < srcendlin){
01868       const InputImageType* c_srclend = srclend - 3;
01869       while (src < c_srclend){
01870         *dstl++ = OutputImageType(0.5 * (*src + src[srcwidth3]));
01871         *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01872         *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01873
01874         *dstu++ = *src++;
01875         *dstu++ = *src++;
01876         *dstu++ = *src++;
01877
01878         *dstu++ = OutputImageType(0.5 * (src[-3] + src[0]));
01879         *dstu++ = OutputImageType(0.5 * (src[-2] + src[1]));
01880         *dstu++ = OutputImageType(0.5 * (src[-1] + src[2]));
01881
01882         *dstl++ = OutputImageType(0.25 * (src[-3] + src[0] +
01883                                           src[srcwidth3-3] + src[srcwidth3]));
01884         *dstl++ = OutputImageType(0.25 * (src[-2] + src[1] +
01885                                           src[srcwidth3-2] + src[srcwidth3]));
01886         *dstl++ = OutputImageType(0.25 * (src[-1] + src[2] +
01887                                           src[srcwidth3-1] + src[srcwidth3]));
01888       }
01889       *dstl++ = OutputImageType(0.5 * (src[0] + src[srcwidth3]));
01890       *dstl++ = OutputImageType(0.5 * (src[1] + src[srcwidth3+1]));
01891       *dstl++ = OutputImageType(0.5 * (src[2] + src[srcwidth3+2]));
01892
01893       *dstu++ = *src;
01894       *dstu++ = src[1];
01895       *dstu++ = src[2];
01896
01897       *dstu++ = *src;
01898       *dstu++ = src[1];
01899       *dstu++ = src[2];
01900
01901       *dstl = dstl[-3]; dstl++;
01902       src++;
01903       *dstl = dstl[-3]; dstl++;
01904       src++;
01905       *dstl = dstl[-3]; dstl++;
01906       src++;
01907
01908       dstu += dstwidth3;
01909       dstl += dstwidth3;
01910       srclend += srcwidth3;
01911     }
01912
01913     srclend-=3;
01914     // last line only copied
01915     while (src < srclend){
01916       *dstu++ = *dstl++ = *src++;
01917       *dstu++ = *dstl++ = *src++;
01918       *dstu++ = *dstl++ = *src++;
01919
01920       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-3]+src[0]));
01921       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-2]+src[1]));
01922       *dstu++ = *dstl++ = OutputImageType(0.5*(src[-1]+src[2]));
01923     }
01924     // last pixel (nearest neighbour)
01925     *dstu++ = *dstl++ = *src;
01926     *dstu++ = *dstl++ = src[1];
01927     *dstu++ = *dstl++ = src[2];
01928
01929     *dstu++ = *dstl++ = *src;
01930     *dstu++ = *dstl++ = src[1];
01931     *dstu++ = *dstl++ = src[2];
01932
01933
01934
01935     return 0;
01936   }
01937   default:
01938     BIASERR("interpolation not implemented in rescale");
01939     BIASABORT;
01940   }
01941   return 0;
01942 }
01943
01944
01945 template <class InputImageType, class OutputImageType>
01946 int Rescale<InputImageType, OutputImageType>::
01947 UpsampleBy2(const Image<InputImageType>& Source,
01948             Image<OutputImageType>& Destination)
01949 {
01950   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::UpsampleBy2\n");
01951 #ifdef BIAS_DEBUG
01952   if (!Source.IsInterleaved()){
01953     BIASERR("only for interleaved images");
01954     //BIASASSERT(false);
01955     BIASABORT;
01956   }
01957 #endif
01958   register OutputImageType *dstu=NULL, *dstl=NULL;
01959    register InputImageType *src=NULL, *srcend=NULL,  *srclend=NULL;
01960   register int srcwidth=Source.GetWidthStep(),
01961     dstwidth=Destination.GetWidthStep(),
01962     cc=Source.GetChannelCount();
01963   dstu = dstl = Destination.GetImageData();
01964   src = Source.GetImageData();
01965   dstl += dstwidth;
01966   srcend = src + Source.GetPixelCount() * cc - cc;
01967   srclend = src + srcwidth - cc;
01968
01969   while (src < srcend){
01970     while (src < srclend){
01971       for (int i=0; i<cc; i++){
01972         *dstu = *dstl = dstu[cc] = dstl[cc] = *src;
01973         src++; dstu++; dstl++;
01974       }
01975       dstu+=cc;
01976       dstl+=cc;
01977     }
01978     dstu += dstwidth;
01979     dstl += dstwidth;
01980     srclend += srcwidth;
01981   }
01982   return 0;
01983 }
01984
01985
01986 //////////////////////////////////////////////////////////////////////////
01987 //               protected functions
01988 //////////////////////////////////////////////////////////////////////////
01989
01990 template <class InputImageType, class OutputImageType>
01991 void Rescale<InputImageType, OutputImageType>::
01992 _AddParam(Param& para, const int grp, const std::string& postfix)
01993 {
01994
01995   if (para.CheckParam("LowPassType"+postfix)){
01996     _RescaleMeanType =
01997       para.GetParamEnum("LowPassType"+postfix);
01998   } else {
01999     vector<string> lptypes;
02000     lptypes.push_back(string("LPT_Mean"));
02001     lptypes.push_back(string("LPT_Gauss"));
02002
02003     _RescaleMeanType =
02004       para.AddParamEnum("LowPassType"+postfix,
02005                         "kind of low pass filter used",
02006                         lptypes, LPT_Mean, NULL, 0, grp);
02007   }
02008
02009   if (para.CheckParam("MeanSigmaFactor"+postfix)){
02010     _RescaleMeanSigmaFactor=
02011       para.GetParamDouble("MeanSigmaFactor"+postfix);
02012   } else {
02013     _RescaleMeanSigmaFactor=
02014       para.AddParamDouble("MeanSigmaFactor"+postfix,
02015          "sigma of mean filter = MeanSigmaFactor * RescaleFactor",
02016                                        0.9, 0.0, DBL_MAX, 0, grp);
02017   }
02018   para.SetEnhancedFlag("MeanSigmaFactor"+postfix, true);
02019
02020   if (para.CheckParam("Factor"+postfix)){
02021     _RescaleFactor=para.GetParamDouble("Factor"+postfix);
02022   } else {
02023     _RescaleFactor=
02024       para.AddParamDouble("Factor"+postfix,
02025          "the rescale factor used in most of the functions. Factor>1.0 means downsampling.",
02026                           2.0, 0.0, DBL_MAX, 0, grp);
02027   }
02028
02029   ///////////////////////////////////////////////////////////////////////////
02030
02031   _BinomialHWS = para.GetParamInt("HalfWinSize-Binomial"+postfix);
02032
02033   _MeanSize = para.GetParamInt("Size-Mean"+postfix);
02034
02035   _GaussSigma = para.GetParamDouble("Sigma-Gauss"+postfix);
02036
02037   _GaussRatio = para.GetParamDouble("Ratio-Gauss"+postfix);
02038
02039 }
02040
02041 template <class InputImageType, class OutputImageType>
02042 void Rescale<InputImageType, OutputImageType>::
02043 UpdateLowpass(double factor)
02044 {
02045   switch(*_RescaleMeanType){
02046   case LPT_Gauss:
02047     _lowpass = &_gauss;
02048     if (this->_ParamsAllocated) {
02049       _gauss.SetSigma(*_RescaleMeanSigmaFactor * factor);
02050     } else {
02051       *_GaussSigma = *_RescaleMeanSigmaFactor * factor;
02052       BIASCDOUT(D_RESCALE_INIT, "using Gauss low pass filter with sigma "
02053                 <<*_GaussSigma<<"\n");
02054     }
02055     BIASCDOUT(D_RESCALE_INIT, "using Gauss low pass filter\n");
02056     break;
02057   case LPT_Binomial:
02058     _lowpass = &_binomial;
02059     if (this->_ParamsAllocated) {
02060       _binomial.SetHalfWinSize((int)ceil(1.0*factor));
02061     } else {
02062       *_BinomialHWS = (int)ceil(1.0*factor);
02063       BIASCDOUT(D_RESCALE_INIT, "using binomial low pass filter with size "
02064                 <<*_BinomialHWS<<"\n");
02065     }
02066     BIASCDOUT(D_RESCALE_INIT, "using Binomial low pass filter\n");
02067     break;
02068   case LPT_Mean:
02069     _lowpass = &_mean;
02070     if (this->_ParamsAllocated) {
02071       _mean.SetSize((int)ceil(1.0*factor));
02072     } else {
02073       *_MeanSize = (int)ceil(1.0*factor);
02074       BIASCDOUT(D_RESCALE_INIT, "using mean low pass filter with size "
02075                 <<*_MeanSize<<"\n");
02076     }
02077     BIASCDOUT(D_RESCALE_INIT, "using mean low pass filter \n");
02078     break;
02079   default:
02080     BIASERR("unknown low pass filter type");
02081     _lowpass = NULL;
02082     BIASABORT;
02083     break;
02084   }
02085 }
02086
02087 template <class InputImageType, class OutputImageType>
02088 int Rescale<InputImageType, OutputImageType>::
02089 _ApplyMeanFilter(const Image<InputImageType>& src,
02090                  Image<OutputImageType>& dst, const double factor)
02091 {
02092   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_ApplyMeanFilter\n");
02093   UpdateLowpass(factor);
02094   //_lowpass->AddDebugLevel(D_CONV_KERNEL);
02095   int res=_lowpass->Filter(src, dst);
02096 #ifdef BIAS_DEBUG
02097   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02098     ImageIO::Write("rescale-lowpass-filtered.mip", dst);
02099   }
02100 #endif
02101   return res;
02102 }
02103
02104
02105 template <class InputImageType, class OutputImageType>
02106 int Rescale<InputImageType, OutputImageType>::
02107 //_FillInterpolatedGrey(const Image<InputImageType>& src,
02108 _FillInterpolatedGrey(const Image<OutputImageType>& src,
02109                       Image<OutputImageType>& dst)
02110 {
02111   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedGrey\n");
02112 #ifdef BIAS_DEBUG
02113   BIASASSERT(src.GetChannelCount()==1 &&
02114              src.GetColorModel()==ImageBase::CM_Grey);
02115   BIASASSERT(!dst.IsEmpty());
02116
02117   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02118     ImageBase im=src;
02119     ImageIO::Write("filtered.mip", im);
02120   }
02121 #endif
02122   int tlx, tly, brx, bry;
02123   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02124   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02125   OutputImageType **idst=dst.GetImageDataArray();
02126   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02127   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02128   register int x, y;
02129   for (y=miny; y<maxy; y++){
02130     for (x=minx; x<maxx; x++){
02131       idst[y][x]=(OutputImageType)
02132         src.FastBilinearInterpolationGrey(x*facx, y*facy);
02133       //      cerr << "( "<<x<<", "<<y<<")  ->  ( "<<x*facx<<", "<<y*facy<<")\n";
02134     }
02135   }
02136   return 0;
02137 }
02138
02139 template <>
02140 int Rescale<unsigned char, unsigned char>::
02141 _FillInterpolatedGrey(const Image<unsigned char>& src,
02142                       Image<unsigned char>& dst)
02143 {
02144   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedGrey\n");
02145 #ifdef BIAS_DEBUG
02146   BIASASSERT(src.GetChannelCount()==1 &&
02147              src.GetColorModel()==ImageBase::CM_Grey);
02148   BIASASSERT(!dst.IsEmpty());
02149
02150   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02151     ImageBase im=src;
02152     ImageIO::Write("filtered.mip", im);
02153   }
02154 #endif
02155   int tlx, tly, brx, bry;
02156   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02157   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02158   unsigned char **idst=dst.GetImageDataArray();
02159   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02160   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02161   register int x, y;
02162   for (y=miny; y<maxy; y++){
02163     for (x=minx; x<maxx; x++){
02164       idst[y][x]=(unsigned char)
02165         rint(src.FastBilinearInterpolationGrey(x*facx, y*facy));
02166     }
02167   }
02168   return 0;
02169 }
02170
02171 #ifdef BUILD_IMAGE_USHORT
02172 template <>
02173 int Rescale<unsigned short, unsigned short>::
02174 _FillInterpolatedGrey(const Image<unsigned short>& src,
02175                       Image<unsigned short>& dst)
02176 {
02177   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedGrey\n");
02178 #ifdef BIAS_DEBUG
02179   BIASASSERT(src.GetChannelCount()==1 &&
02180              src.GetColorModel()==ImageBase::CM_Grey);
02181   BIASASSERT(!dst.IsEmpty());
02182
02183 //   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02184 //     ImageIO::Write("filtered.mip", src);
02185 //   }
02186 #endif
02187   int tlx, tly, brx, bry;
02188   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02189   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02190   unsigned short **idst=dst.GetImageDataArray();
02191   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02192   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02193   register int x, y;
02194   for (y=miny; y<maxy; y++){
02195     for (x=minx; x<maxx; x++){
02196       idst[y][x]=(unsigned short)
02197         rint(src.FastBilinearInterpolationGrey(x*facx, y*facy));
02198     }
02199   }
02200   return 0;
02201 }
02202 #endif
02203
02204 template <class InputImageType, class OutputImageType>
02205 int Rescale<InputImageType, OutputImageType>::
02206 //_FillInterpolatedColor(const Image<InputImageType>& src,
02207 _FillInterpolatedColor(const Image<OutputImageType>& src,
02208                        Image<OutputImageType>& dst)
02209 {
02210   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedColor\n");
02211 #ifdef BIAS_DEBUG
02212   BIASASSERT(!dst.IsEmpty());
02213   BIASASSERT(src.IsInterleaved());
02214
02215   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02216     ImageBase im=src;
02217     ImageIO::Write("filtered.mip", im);
02218   }
02219 #endif
02220   int tlx, tly, brx, bry;
02221   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02222   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02223   OutputImageType **idst=dst.GetImageDataArray();
02224   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02225   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02226   register int x, y;
02227   const unsigned int cc = src.GetChannelCount();
02228   unsigned int c;
02229   for (y=miny; y<maxy; y++){
02230     for (x=minx; x<maxx; x++){
02231       for (c=0;c<cc; c++)
02232       idst[y][x*cc+c]=(OutputImageType)
02233         src.BilinearInterpolationRGBInterleaved(x*facx, y*facy, c);
02234     }
02235   }
02236   return 0;
02237 }
02238
02239 template <>
02240 int Rescale<unsigned char, unsigned char>::
02241 _FillInterpolatedColor(const Image<unsigned char>& src,
02242                        Image<unsigned char>& dst)
02243 {
02244   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedColor\n");
02245 #ifdef BIAS_DEBUG
02246   BIASASSERT(!dst.IsEmpty());
02247   BIASASSERT(src.IsInterleaved());
02248
02249   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02250     ImageBase im=src;
02251     ImageIO::Write("filtered.mip", im);
02252   }
02253 #endif
02254   int tlx, tly, brx, bry;
02255   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02256   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02257   unsigned char **idst=dst.GetImageDataArray();
02258   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02259   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02260   register int x, y;
02261   const unsigned int cc = src.GetChannelCount();
02262   unsigned int c;
02263   for (y=miny; y<maxy; y++){
02264     for (x=minx; x<maxx; x++){
02265       for (c=0;c<cc; c++)
02266         idst[y][x*cc+c]=(unsigned char)rint
02267           (src.BilinearInterpolationRGBInterleaved(x*facx, y*facy, c));
02268     }
02269   }
02270   return 0;
02271 }
02272
02273 #ifdef BUILD_IMAGE_USHORT
02274 // exactly the same as <unsigned char, int>, but partial specializations
02275 // are not supported by many compilers
02276 template <>
02277 int Rescale<unsigned short,unsigned short>::
02278 _FillInterpolatedColor(const Image<unsigned short>& src,
02279                        Image<unsigned short>& dst)
02280 {
02281   BIASDOUT(D_FILTERBASE_CALLSTACK, "Rescale::_FillInterpolatedColor\n");
02282 #ifdef BIAS_DEBUG
02283   BIASASSERT(!dst.IsEmpty());
02284   BIASASSERT(src.IsInterleaved());
02285
02286 //   if (this->DebugLevelIsSet(D_RESCALE_WRITE_IMG)) {
02287 //     ImageIO::Write("filtered.mip", src);
02288 //   }
02289 #endif
02290
02291   int tlx, tly, brx, bry;
02292   dst.GetROI()->GetCorners(tlx, tly, brx, bry);
02293   const int minx=tlx, maxx=brx, miny=tly, maxy=bry;
02294   unsigned short **idst=dst.GetImageDataArray();
02295   const double facx = (double)src.GetWidth() / (double)dst.GetWidth();
02296   const double facy = (double)src.GetHeight() / (double)dst.GetHeight();
02297   register int x, y;
02298   const unsigned int cc = src.GetChannelCount();
02299   unsigned int c;
02300   for (y=miny; y<maxy; y++){
02301     for (x=minx; x<maxx; x++){
02302       for (c=0;c<cc; c++)
02303         idst[y][x*cc+c]=(unsigned char)rint
02304           (src.BilinearInterpolationRGBInterleaved(x*facx, y*facy, c));
02305     }
02306   }
02307
02308
02309   return 0;
02310 }
02311 #endif
02312
02313 template <class InputImageType, class OutputImageType>
02314 void Rescale<InputImageType, OutputImageType>::
02315 GetBordersValid_(int &border_x, int &border_y) const
02316 {
02317   if (*_RescaleFactor<=1.0){
02318     border_x = border_y = 0;
02319   } else {
02320     _lowpass->GetBorders(border_x, border_y);
02321   }
02322 }
02323
02324 //////////////////////////////////////////////////////////////////////////
02325 //                 instantiation
02326 //////////////////////////////////////////////////////////////////////////
02327 #define FILTER_INSTANTIATION_CLASS Rescale
02328 #include "Filterinst.hh"
02329
02330 } // namespace BIAS
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/Rescale.hh Source File

Filter

Rescale.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Rescale_hh__
00027 #define __Rescale_hh__
00028
00029 #include "FilterBase.hh"
00030 #include "FilterNToN.hh"
00031 #include "Gauss.hh"
00032 #include "Binomial.hh"
00033 #include "Mean.hh"
00034
00035 #define D_RESCALE_INIT       0x00000001
00036 #define D_RESCALE_WRITE_IMG  0x00000002
00037
00038 namespace BIAS
00039 {
00040 enum InterpolationType { NearestNeighbour, Bilinear, Bicubic };
00041
00042
00043   /** @class Rescale
00044       @ingroup g_filter
00045       @brief Down-, Upsampling routines and Resize
00046
00047       @author woelk 09/2004 */
00048   template <class InputStorageType, class OutputStorageType>
00049   class BIASFilter_EXPORT Rescale : public FilterBase<InputStorageType, OutputStorageType>
00050   {
00051   public:
00052     /** uses internal param object */
00053     Rescale();
00054
00055     Rescale(Param& para, const std::string& postfix="");
00056
00057     Rescale(Param& para, const int grp, const std::string& postfix);
00058
00059     virtual ~Rescale();
00060
00061     /** scales the src to dst using the downsampling factor from SetFactor()
00062      */
00063     virtual int Filter(const Image<InputStorageType>& src,
00064                        Image<OutputStorageType>& dst);
00065
00066
00067     /////////////////////////////////////////////////////////////////////////
00068
00069     /** @brief generic downsample function.
00070         @attention, results in coo system offset, when downsampling by 2^n !!
00071         see DownsampleBy2() for details
00072         @author woelk 09/2004 */
00073     int Downsample(const Image<InputStorageType>& src,
00074                    Image<OutputStorageType>& dst);
00075
00076     /** @brief downsamples src to dst of size newwidth x newheight
00077         @attention, results in coo system offset, when downsampling by 2^n !!
00078         see DownsampleBy2() for details
00079         @author woelk 09/2004 **/
00080     int Downsample(const Image<InputStorageType>& src,
00081                    Image<OutputStorageType>& dst,
00082                    const unsigned newwidth, const unsigned newheight);
00083
00084   //   /** Takes the source image that has to have a defined ROI. Based on this
00085 //         ROI it will  store a  downsampled version in the destination image.
00086 //         The pixel values surounding the ROI will be  taken into account while
00087 //         executing the mean filter. Therefore it is not possible to downsample
00088 //         the whole image.
00089 //         @param Source Image with a defined ROI
00090 //         @param Destination Image where the rescaled image will be stored. Will
00091 //         initialized if required.
00092 //         @param newwidth Desired width of the target image
00093 //         @param newheight Desired height of the target image
00094 //         @return -1 In any case of error (e.g. no ROI defined, ROI to close to
00095 //         the edge or desired width/height does no work)
00096 //         @date 26.09.2003
00097 //         @author Ingo Thomsen **/
00098     // int DownsampleROI(const Image<InputStorageType>& src,
00099     //                  Image<OutputStorageType>& dst,
00100     //                  const unsigned newwidth, const unsigned newheight);
00101
00102     /////////////////////////////////////////////////////////////////////////
00103     //              specialized downsampling functions
00104     /////////////////////////////////////////////////////////////////////////
00105
00106     /** Calls the appropriate function for the color model.
00107         Mean low pass filter of size 2x2 is used implicitly,
00108         resulting in the coordinate conversion equation:
00109
00110         (2*xs+0.5, 2*ys+0.5) = (xb, yb) or
00111         (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)
00112
00113         where (xs, ys) is the pixel position in pixel coo. the smaller
00114         destination image and (xb, yb) is the position in pixel coo. in the
00115         bigger source image
00116         E.g. the ray through position (0,0) in the small image intercepts the
00117         bigger image at position (0.5, 0.5).
00118
00119         This must be taken into account when calculating the corrsponding
00120         K matrix of the smaller image. I.e. the principal point in the
00121         smaller image cannot be calculated by simply dividing by 2, but
00122         instead using the formula above.
00123
00124         @author woelk 09/2004 */
00125     int DownsampleBy2(const Image<InputStorageType>& src,
00126                       Image<OutputStorageType>& dst);
00127
00128     /** assumes that destination is initialized.
00129         mean low pass filter is used implicitly,
00130         resulting in the coordinate conversion equation:
00131
00132         (2*xs+0.5, 2*ys+0.5) = (xb, yb) or
00133         (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)
00134
00135         where (xs, ys) is the pixel position in pixel coo. the smaller
00136         destination image and (xb, yb) is the position in pixel coo. in the
00137         bigger source image
00138         E.g. the ray through position (0,0) in the small image intercepts the
00139         bigger image at position (0.5, 0.5).
00140
00141         This must be taken into account when calculating the corrsponding
00142         K matrix of the smaller image. I.e. the principal point in the
00143         smaller image cannot be calculated by simply dividing by 2, but
00144         instead using the formula above.
00145
00146         Destination width = floor(source.GetWidth()/2)
00147         Destination height = floor(source.GetHeight()/2)
00148         Only for one channel images.
00149         Also make use of ROI in Source image (fast :-)) ).
00150
00151         Not tested with odd size images.
00152
00153         @author woelk 01/2003 */
00154     int DownsampleBy2Grey(const Image<InputStorageType>& src,
00155                           Image<OutputStorageType>& dst);
00156
00157     /** assumes that destination is initialized.
00158         mean low pass filter is used implicitly,
00159         resulting in the coordinate conversion equation:
00160
00161         (2*xs+0.5, 2*ys+0.5) = (xb, yb) or
00162         (xs, ys) = ((xb-0.5)/2.0, (yb-0.5)/2.0)
00163
00164         where (xs, ys) is the pixel position in pixel coo. the smaller
00165         destination image and (xb, yb) is the position in pixel coo. in the
00166         bigger source image
00167         E.g. the ray through position (0,0) in the small image intercepts the
00168         bigger image at position (0.5, 0.5).
00169
00170         This must be taken into account when calculating the corrsponding
00171         K matrix of the smaller image. I.e. the principal point in the
00172         smaller image cannot be calculated by simply dividing by 2, but
00173         instead using the formula above.
00174
00175         Destination width = floor(source.GetWidth()/2)
00176         Destination height = floor(source.GetHeight()/2)
00177         only for three channel interleaved images
00178         not tested with odd size images
00179         @author woelk 01/2003 */
00180     int DownsampleBy2Color(const Image<InputStorageType>& src,
00181                            Image<OutputStorageType>& dst);
00182
00183     /////////////////////////////////////////////////////////////////////////
00184
00185     /** calls the appropriate function for the color model
00186         mean low pass filter is usedimplicitly,
00187         resulting in the coordinate conversion equation:
00188
00189         (4*xs+1.5, 4*ys+1.5) = (xb, yb) or
00190         (xs, ys) = ((xb-1.5)/4.0, (yb-1.5)/4.0)
00191
00192         where (xs, ys) is the pixel position in pixel coo. the smaller
00193         destination image and (xb, yb) is the position in pixel coo. in the
00194         bigger source image
00195         E.g. the ray through position (0,0) in the small image intercepts the
00196         bigger image at position (1.5, 1.5).
00197
00198         This must be taken into account when calculating the corrsponding
00199         K matrix of the smaller image. I.e. the principal point in the
00200         smaller image cannot be calculated by simply dividing by 2, but
00201         instead using the formula above.
00202
00203         @author woelk 09/2004 */
00204     int DownsampleBy4(const Image<InputStorageType>& src,
00205                       Image<OutputStorageType>& dst);
00206
00207     /** Assumes that destination is initialized.
00208         The mean low pass filter is used implicitly,
00209         resulting in the coordinate conversion equation:
00210
00211         (4*xs+1.5, 4*ys+1.5) = (xb, yb) or
00212         (xs, ys) = ((xb-1.5)/4.0, (yb-1.5)/4.0)
00213
00214         where (xs, ys) is the pixel position in pixel coo. the smaller
00215         destination image and (xb, yb) is the position in pixel coo. in the
00216         bigger source image
00217         E.g. the ray through position (0,0) in the small image intercepts the
00218         bigger image at position (1.5, 1.5).
00219
00220         This must be taken into account when calculating the corrsponding
00221         K matrix of the smaller image. I.e. the principal point in the
00222         smaller image cannot be calculated by simply dividing by 2, but
00223         instead using the formula above.
00224
00225         Destination width = floor(source.GetWidth()/4)
00226         Destination height = floor(source.GetHeight()/4)
00227         only for one channel grey images
00228         also make use of ROI in Source image (fast :-)) )
00229         @author woelk 09/2004 */
00230     int DownsampleBy4Grey(const Image<InputStorageType>& src,
00231                           Image<OutputStorageType>& dst);
00232
00233
00234     /** The mean low pass filter is used implicitly,
00235         resulting in the coordinate conversion equation:
00236
00237         (2^n*xs+2^(n-1)-0.5, 2^n*ys+2^(n-1)-0.5) = (xb, yb) or
00238         (xs, ys) = ((xb-2^(n-1)+0.5)/2^n, (yb-2^(n-1)+0.5)/2^n)
00239
00240         where (xs, ys) is the pixel position in pixel coo. the smaller
00241         destination image and (xb, yb) is the position in pixel coo. in the
00242         bigger source image and the image is downsample by a facteo 2^n in
00243         width and in height.
00244         E.g. the ray through position (0,0) in the small image intercepts the
00245         bigger image at position (2^(n-1)-0.5, 2^(n-1)-0.5).
00246
00247         This must be taken into account when calculating the corrsponding
00248         K matrix of the smaller image. I.e. the principal point in the
00249         smaller image cannot be calculated by simply dividing by 2, but
00250         instead using the formula above.
00251         @author evers */
00252     int DownsampleBPoT(const Image<InputStorageType>& Source,
00253                        Image<OutputStorageType>& Destination);
00254
00255     /////////////////////////////////////////////////////////////////////////
00256     //              upsampling functions
00257     /////////////////////////////////////////////////////////////////////////
00258
00259     /** generic upsample function
00260         @author woelk 09/2004 */
00261     int Upsample(const Image<InputStorageType>& src,
00262                  Image<OutputStorageType>& dst);
00263
00264     /** Upsamples src to dst of size width by height.
00265         width > src.GetWidth() && height > src.GetHeight() is asserted.
00266         ROI not supported.
00267         @author ? */
00268     int Upsample(const Image<InputStorageType>& src,
00269                  Image<OutputStorageType>& dst,
00270                  const unsigned newwidth, const unsigned newheight);
00271
00272     /** Upsamples src to dst of size width by height.
00273         Only for one channel grey images.
00274         ROI not supported.
00275         width > src.GetWidth() && height > src.GetHeight() is asserted.
00276         @author ? */
00277     int UpsampleGrey(const Image<InputStorageType>& src,
00278                      Image<OutputStorageType>& dst,
00279                      const unsigned newwidth, const unsigned newheight);
00280
00281     /////////////////////////////////////////////////////////////////////////
00282
00283     /** assumes that destination is initialized
00284         dst width = 2*src.GetWidth()
00285         dst height = 2*src.GetHeight()
00286         only for interleaved images
00287         for images with arbitrary channel count
00288         @author woelk 04/2004 */
00289     int UpsampleBy2(const Image<InputStorageType>& src,
00290                     Image<OutputStorageType>& dst);
00291
00292     /** assumes that destination is initialized
00293         dst width = 2*src.GetWidth()
00294         dst height = 2*src.GetHeight()
00295         @param InterpolationType which interpolation to use for off-grid pixel
00296         @param valmin/valmax if bicubic, limit range to these values
00297         only for one channel images
00298         @author woelk/koeser */
00299     int UpsampleBy2Grey(const Image<InputStorageType>& src,
00300                         Image<OutputStorageType>&dst,
00301                         InterpolationType i=NearestNeighbour,
00302                         const double& valmin = 0.0,
00303                         const double& valmax = 255.0);
00304
00305     /** assumes that destination is initialized
00306         dst width = 2*src.GetWidth()
00307         dst height = 2*src.GetHeight()
00308         @param InterpolationType which interpolation to use for off-grid pixel
00309         @param valmin/valmax if bicubic, limit range to these values
00310         only for three channel images
00311         @author koeser 06/2005 */
00312     int UpsampleBy2RGBInterleaved(const Image<InputStorageType>& src,
00313                                   Image<OutputStorageType>&dst,
00314                                   InterpolationType i=NearestNeighbour,
00315                                   const double& valmin = 0.0,
00316                                   const double& valmax = 255.0);
00317
00318     /** updates _lowpass using _RescaleMeanType
00319         @author woelk 09/2004 */
00320     void UpdateLowpass(double factor);
00321
00322     /////////////////////////////////////////////////////////////////////////
00323     //              get/set functions
00324     /////////////////////////////////////////////////////////////////////////
00325
00326     /** the downsampling factor
00327      */
00328     inline void SetFactor(double factor) { *_RescaleFactor=factor; }
00329
00330     inline double GetFactor() const { return *_RescaleFactor; }
00331
00332     inline void SetLowPassType(int lptype)
00333     { *_RescaleMeanType=lptype; UpdateLowpass(*_RescaleFactor);}
00334
00335     inline int GetLowPassType() const { return *_RescaleMeanType; }
00336
00337     /// see DownsampleBy2 for explanation
00338     inline double GetPositionOffset() const { return _LastPositionOffset; };
00339
00340     inline FilterNToN<InputStorageType, OutputStorageType> *GetLowpass()
00341     { return _lowpass; }
00342
00343   protected:
00344     // the mean filter
00345     FilterNToN<InputStorageType, OutputStorageType> *_lowpass;
00346     Gauss<InputStorageType, OutputStorageType> _gauss;
00347     Binomial<InputStorageType, OutputStorageType> _binomial;
00348     Mean<InputStorageType, OutputStorageType> _mean;
00349
00350     // parameter
00351     // *_RescaleFactor<1.0 means upsampling
00352     // *_RescaleFactor>1.0 means downsampling
00353     double *_RescaleFactor;
00354     int *_RescaleMeanType;
00355     double *_RescaleMeanSigmaFactor;
00356     // parameters of Mean, Binomial and Gauss
00357     int *_MeanSize;
00358     int *_BinomialHWS;
00359     double *_GaussSigma;
00360     double *_GaussRatio;
00361
00362
00363     /// see DownsampleBy2 for explanation
00364     double _LastPositionOffset;
00365
00366     /** fills the parameter
00367         @author woelk 09/2004 */
00368     void _AddParam(Param& para, const int grp, const std::string& postfix);
00369
00370     /** updates _mean using _RescaleMeanType
00371         and calls _mean->Filter(src, dst)
00372         @author woelk 09/2004 */
00373     int _ApplyMeanFilter(const Image<InputStorageType>& src,
00374                          Image<OutputStorageType>& dst, const double factor);
00375
00376     /** Assumes dst is initialized and ROI is set.
00377         For every pixel (x, y) in ROI of dst, a bilinear lookup at the
00378         coordinates (x*src.Width/dst.Width, y*src.Height/dst.GetHeight)
00379         is performed.
00380         Only for one channel grey images
00381         @author woelk 09/2004 */
00382     int _FillInterpolatedGrey(const Image<OutputStorageType>& src,
00383                               Image<OutputStorageType>& dst);
00384
00385     /** Same as _FillInterpolatedGrey but for multi channel interleaved
00386         images.
00387         @author woelk 09/2004 */
00388     int _FillInterpolatedColor(const Image<OutputStorageType>& src,
00389                                Image<OutputStorageType>& dst);
00390
00391     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00392
00393   }; // class
00394
00395 #ifdef WIN32
00396   template <> int Rescale<unsigned char, unsigned char>::
00397   _FillInterpolatedGrey(const Image<unsigned char>& src,
00398                         Image<unsigned char>& dst);
00399
00400   template <>
00401   int Rescale<unsigned char, unsigned char>::
00402   _FillInterpolatedColor(const Image<unsigned char>& src,
00403                          Image<unsigned char>& dst);
00404
00405   template <>
00406   int Rescale<unsigned char, unsigned char>::
00407   DownsampleBy2Color(const Image<unsigned char>& Source,
00408                      Image<unsigned char>& Destination);
00409
00410   template <>
00411   int Rescale<unsigned char, unsigned char>::
00412   DownsampleBy2Grey(const Image<unsigned char>& Source,
00413                     Image<unsigned char>& Destination);
00414
00415
00416
00417   template <>
00418   int Rescale<unsigned char, unsigned char>::
00419   DownsampleBy4Grey(const Image<unsigned char>& Source,
00420                     Image<unsigned char>& Destination);
00421
00422   #ifdef BUILD_IMAGE_USHORT
00423   template <>
00424   int Rescale<unsigned short, unsigned short>::
00425   _FillInterpolatedGrey(const Image<unsigned short>& src,
00426                         Image<unsigned short>& dst);
00427
00428   template <>
00429   int Rescale<unsigned short, unsigned short>::
00430   DownsampleBy2Color(const Image<unsigned short>& Source,
00431                      Image<unsigned short>& Destination);
00432   template <>
00433   int Rescale<unsigned short, unsigned short>::
00434   DownsampleBy2Grey(const Image<unsigned short>& Source,
00435                     Image<unsigned short>& Destination);
00436   template <>
00437   int Rescale<unsigned short, unsigned short>::
00438   DownsampleBy4Grey(const Image<unsigned short>& Source,
00439                     Image<unsigned short>& Destination);
00440
00441   template <>
00442   int Rescale<unsigned short, unsigned short>::
00443   _FillInterpolatedColor(const Image<unsigned short>& src,
00444                          Image<unsigned short>& dst);
00445
00446   #endif //BUILD_IMAGE_USHORT
00447   //
00448   //
00449   //
00450 #endif // WIN32
00451
00452
00453 } // namespace
00454
00455 #endif // __Rescale_hh__
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/RGB.hh Source File

Base » Math

RGB.hh

Go to the documentation of this file.
00001
00002 // Jan Woetzel
00003
00004 #ifndef _RGB_hh_
00005 #define _RGB_hh_
00006 #include "bias_config.h"
00007
00008
00009 #include <Base/Math/Vector3.hh>
00010
00011 namespace BIAS {
00012     /** @class RGBuc
00013     @ingroup g_math
00014     @brief class RGBuc is asynonym for a Vector3 of correct type
00015     @author Jan Woetzel **/
00016     typedef BIAS::Vector3<unsigned char> RGBuc;
00017
00018     /** @class RGBf
00019     @ingroup g_math
00020     @brief class RGBAf is asynonym for a Vector3 of correct type
00021     @author Jan Woetzel **/
00022     typedef BIAS::Vector3<float> RGBf;
00023
00024     /** @class RGBd
00025     @ingroup g_math
00026     @brief class RGBAd is asynonym for a Vector of coorect type
00027     @author Jan Woetzel **/
00028     typedef BIAS::Vector3<double> RGBd;
00029
00030 } // namespace BIAS
00031 #endif
00032
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/RGBA.hh Source File

Base » Math

RGBA.hh

Go to the documentation of this file.
00001
00002 // Jan Woetzel
00003
00004 #ifndef _RGBA_hh_
00005 #define _RGBA_hh_
00006
00007 #include "bias_config.h"
00008 #include <Base/Math/Vector4.hh>
00009
00010
00011 /// predefined colors
00012 /// opaque = not transparent
00013 #define RGBAuc_WHITE_OPAQUE BIAS::RGBAuc(255,255,255, 255)
00014
00015 /// semi transparent
00016 #define RGBAuc_WHITE_SEMI   BIAS::RGBAuc(255,255,255, 128)
00017
00018
00019
00020 namespace BIAS {
00021     /** @class RGBAuc
00022     @ingroup g_math
00023     @brief class RGBAuc is asynonym for a Vector4 of corerct type
00024     @author Jan Woetzel **/
00025     typedef BIAS::Vector4<unsigned char> RGBAuc;
00026
00027     /** @class RGBAf
00028     @ingroup g_math
00029     @brief class RGBAf is asynonym for a Vector4 of correct type
00030     @author Jan Woetzel **/
00031     typedef BIAS::Vector4<float> RGBAf;
00032
00033     /** @class RGBAd
00034     @ingroup g_math
00035     @brief class RGBAd is asynonym for a Vector4 of correct type
00036     @author Jan Woetzel **/
00037     typedef BIAS::Vector4<double> RGBAd;
00038
00039 } // namespace BIAS
00040 #endif
00041
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/RigParameter.cpp Source File

Image

RigParameter.cpp

Go to the documentation of this file.
00001
00002 # include "RigParameter.hh"
00003 # include "CameraParam.hh"
00004 #ifdef BIAS_HAVE_XML2
00005 #  include <Base/Common/XMLIO.hh>
00006 #endif
00007 #include <Image/SphericalUndistortion.hh>
00008 #include <Image/MatlabTBUndistortion.hh>
00009
00010 using namespace std;
00011 using namespace BIAS;
00012
00013
00014 bool RigParameter::ReadFromCMP(const string &filename)
00015 {
00016   char tmpline[256];
00017   string viewblock, token;
00018   unsigned int openbrace,linenum;
00019   int pos;
00020   bool BlockStarted=false;
00021
00022   // at first clear internal data members
00023   Center_.clear();
00024   Rotation_.clear();
00025   Calibration_.clear();
00026   Camera_.clear();
00027
00028   ifstream ifs(filename.c_str());
00029   if(!ifs){
00030     perror(filename.c_str());
00031     return false;
00032   }
00033   openbrace = 0;  linenum = 0;
00034
00035   int NoRead = 0;
00036
00037   while (ifs && NoRead < 6){
00038     ifs.getline(tmpline,sizeof(tmpline));
00039     linenum++;
00040     // remove any trailing CR or LF
00041     for (int i=strlen(tmpline)-1; i>0; i--)
00042       if (tmpline[i] == 13 || tmpline[i]==10) tmpline[i] =0;
00043
00044     if (tmpline[0] == 0 || tmpline[0] == '#') {
00045       continue;
00046     }
00047
00048     pos = 0;
00049     while (tmpline[pos] != 0){
00050       if (tmpline[pos] == '{') {
00051         openbrace ++;
00052         if (!BlockStarted) {
00053           BlockStarted = true;
00054           //cout <<"started block at line "<<linenum<<" : "<<tmpline<<endl;
00055         }
00056       }
00057       if (tmpline[pos] == '}') openbrace --;
00058       if (openbrace == 0 && BlockStarted){
00059         //cout <<"finished block at line "<<linenum<<" : "<<tmpline<<endl;
00060         viewblock.append(tmpline);
00061         ParseView(viewblock);
00062         NoRead++;
00063         viewblock="";
00064         BlockStarted = false;
00065       }
00066       pos++;
00067     }
00068     if (BlockStarted)
00069       viewblock.append(tmpline);
00070   }
00071   ifs.close();
00072   return 0;
00073 }
00074
00075
00076 int  RigParameter::ParseView(const string &block)
00077 {
00078
00079   char delim;
00080   int startofblock,endoflastmatrix,startofmatrix,endoflastline;
00081   int startofline, endofline;
00082
00083   std::vector<Matrix4x4<double> > M;
00084   M.resize(3);
00085
00086   RMatrix R;
00087   KMatrix K;
00088
00089   startofblock = block.find('{', 0);
00090   endoflastmatrix = startofblock+1;
00091   for (int m=0; m<3; m++) {
00092     startofmatrix = block.find('{',endoflastmatrix);
00093     endoflastline = startofmatrix+1;
00094
00095     for (int line=0; line<4; line++){
00096       startofline = block.find('{',endoflastline);
00097       endofline = block.find('}',startofline);
00098       string fourfloats(block.substr(startofline+1,endofline-startofline-1));
00099       //    cout <<"line: "<<line<<" : "<<fourfloats<<endl;
00100       stringstream iss(fourfloats);
00101       iss >>(M[m])[line][0]>>delim>>(M[m])[line][1]>>delim>>(M[m])[line][2]
00102           >>delim>>(M[m])[line][3];
00103       endoflastline = endofline;
00104     }
00105     endoflastmatrix = block.find('}',endoflastline);
00106   }
00107
00108   // set data members for the first camera
00109   //cout << M[0] << M[1] << M[2] << endl;
00110   K.SetIdentity();
00111   for (unsigned int i = 0 ; i < 3; i++){
00112     for (unsigned int j = 0 ; j < 3; j++){
00113       R[j][i] = M[0][i][j];
00114     }
00115
00116     if (i < 2){
00117       K[i][i] = 1/M[1][i][i];
00118       K[i][2] = -M[2][i][3];
00119     }
00120   }
00121
00122   Rotation_.push_back(R);
00123   Calibration_.push_back(K);
00124
00125   return 0;
00126
00127 }
00128
00129 void RigParameter::SetLadybugCenters(double value /*= 1.0 */){
00130
00131   Vector3<double> CenterVec(0.0 , 0.0 , value);
00132
00133   for (unsigned int i = 0; i < Calibration_.size(); i++){
00134     Center_.push_back(Rotation_[i]*CenterVec);
00135   }
00136
00137
00138 }
00139
00140 void RigParameter::AdaptAxisAngleRepresentation(Vector3<double>& Axis,
00141                                                 double& Angle,
00142                                                 const Vector3<double>& RefAxis,
00143                                                 const double& RefAngle) {
00144   // check if optical axes point into same half space
00145   if (RefAxis.ScalarProduct(Axis)<0.0) {
00146     Axis *= -1.0;
00147     Angle = 2.0 * M_PI - Angle;
00148   }
00149   // check 2pi wrap-around problem to avoid average of 0 and 2pi to be pi
00150   if (Angle>RefAngle) {
00151     // +/- 2pi does not change the angle:
00152     while (Angle-RefAngle>M_PI) Angle -= 2.0*M_PI;
00153   } else {
00154     // +/- 2pi does not change the angle:
00155     while (RefAngle-Angle>M_PI) Angle += 2.0*M_PI;
00156   }
00157 }
00158
00159 bool RigParameter::Compute(std::vector<BIAS::PMatrix>& Pvec,
00160                            const unsigned int& Rigsize,
00161                            const double& WeightOfCurrentParams){
00162
00163
00164   //TODO: Implement Camera Object into Rig functionality
00165
00166 #ifdef BIAS_DEBUG
00167   if (Pvec.size()%Rigsize) {
00168     BIASERR("Vector of cameras has not multiple size of Rigsize");
00169     BIASABORT;
00170   }
00171
00172   if (WeightOfCurrentParams<0.0) {
00173     BIASERR("Useless negative weight !");
00174     BIASABORT;
00175   }
00176
00177   if (WeightOfCurrentParams > 0.0) {
00178     if ((Center_.size()!=Rigsize)||(Rotation_.size()!=Rigsize)||
00179         (Calibration_.size()!=Rigsize)) {
00180       BIASERR("Cannot average differently sized vectors !");
00181       BIASABORT;
00182     }
00183   }
00184 #endif
00185
00186
00187   std::vector<Vector3<double> > dC(Pvec.size());
00188   std::vector<Vector3<double> > dRAx(Pvec.size()); // Rotation_ axes
00189   std::vector<double> dRAn(Pvec.size());           // Rotation_ angles
00190   RMatrix tmpR,firstCamR;
00191
00192   std::vector<Vector3<double> > MeanDeltaRAx(Rigsize), RefAxes(Rigsize);
00193   std::vector<double> MeanDeltaRAn(Rigsize), RefAngle(Rigsize);
00194
00195   if (WeightOfCurrentParams==0.0) {
00196     Center_.resize(Rigsize);
00197     Rotation_.resize(Rigsize);
00198     Calibration_.resize(Rigsize);
00199
00200     firstCamR = Pvec[0].GetR();
00201     firstCamR.GetRotationAxisAngle(RefAxes[0], RefAngle[0]);
00202     for (unsigned int r = 1; r < Rigsize; r++) {
00203       tmpR = firstCamR.Transpose() * Pvec[r].GetR();
00204       tmpR.GetRotationAxisAngle(RefAxes[r], RefAngle[r]);
00205       MeanDeltaRAx[r] = BIAS::Vector3<double>(0,0,0);
00206       MeanDeltaRAn[r] = 0;
00207     }
00208   } else {
00209     for (unsigned int r = 0; r < Rigsize; r++) {
00210       Rotation_[r].GetRotationAxisAngle(MeanDeltaRAx[r], MeanDeltaRAn[r]);
00211       MeanDeltaRAx[r] *= WeightOfCurrentParams*Pvec.size()/Rigsize;
00212       MeanDeltaRAn[r] *= WeightOfCurrentParams*Pvec.size()/Rigsize;
00213       RefAxes[r]  = MeanDeltaRAx[r];
00214       RefAngle[r] = MeanDeltaRAn[r];
00215     }
00216   }
00217
00218   for (unsigned int r = 0; r < Rigsize; r++){
00219     Center_[r]      *= WeightOfCurrentParams*Pvec.size()/Rigsize;
00220     Calibration_[r] *= WeightOfCurrentParams*Pvec.size()/Rigsize;
00221   }
00222
00223
00224    // loop over rigs
00225   unsigned int index=0;
00226   for (; index <= Pvec.size()-Rigsize; index+= Rigsize){
00227     // loop over cameras of the rig
00228     for (unsigned int r = 0; r < Rigsize; r++){
00229       // Pvec[index+r].InvalidateDecomposition();
00230       if (r == 0){
00231         // for first rig, get R and C
00232         firstCamR=Pvec[index+r].GetR();
00233         //cout <<"FirstCamR["<<index<<"]="<<firstCamR<<" with det="
00234         //    <<firstCamR.det()<<" and norm "<<firstCamR.NormFrobenius()<<endl;
00235         firstCamR.GetRotationAxisAngle(dRAx[index],dRAn[index]);
00236         //cout <<"dRAx ("<<index<<") is "<<dRAx[index]<<" with angle "<<dRAn[index]<<endl;
00237         AdaptAxisAngleRepresentation(dRAx[index],dRAn[index],
00238                                      RefAxes[0], RefAngle[0]);
00239
00240         dC[index]=Pvec[index+r].GetC();
00241       } else {
00242         dC[index+r]= firstCamR * (Pvec[index+r].GetC()-dC[index]);
00243         // dC[index+r]= (Pvec[index+r].GetC()-dC[index]);
00244         //        tmpR=Pvec[index+r].GetR()*firstCamR.Transpose();
00245
00246         tmpR = firstCamR.Transpose() * Pvec[index+r].GetR();
00247         tmpR.GetRotationAxisAngle(dRAx[index+r],dRAn[index+r]);
00248         AdaptAxisAngleRepresentation(dRAx[index+r],dRAn[index+r],
00249                                      RefAxes[r], RefAngle[r]);
00250         cout <<"["<<r<<"]"<<" Computed Rotation_ Axis "<<dRAx[index+r]<<" and "
00251              <<" Angle="<<dRAn[index+r]<<endl;
00252       }
00253     }
00254
00255     dC[index]=Vector3<double>(0,0,0);
00256     dRAx[index] =  Vector3<double>(1,0,0);
00257     dRAn[index] = 0;
00258   }
00259
00260
00261
00262   for(index = 0 ; index <= dC.size()-Rigsize; index+=Rigsize){
00263     // loop over all cameras except the first one because its the reference
00264     // camera
00265     for (unsigned int r = 0; r < Rigsize; r++){
00266       cout <<"dc ("<<index+r<<") is "<<dC[index+r]<<endl;
00267       Center_[r] += dC[index+r];
00268       cout <<"dRAx ("<<index+r<<") is "<<dRAx[index+r]<<endl;
00269       MeanDeltaRAx[r] += dRAx[index+r];
00270       cout <<"MeandRAx is now "<<MeanDeltaRAx[r] <<endl;
00271       cout <<"dRAn ("<<index+r<<") is "<<dRAn[index+r]<<endl;
00272       MeanDeltaRAn[r] += dRAn[index+r];
00273       Calibration_[r] = KMatrix(Calibration_[r] + Pvec[index+r].GetK());
00274     }
00275   }
00276   double normalizationfactor =
00277     (double)Rigsize/((double)Pvec.size()*(1.0+WeightOfCurrentParams));
00278
00279   cout <<"normalization is "<<normalizationfactor<<endl;
00280   for (unsigned int r = 0; r < Rigsize; r++){
00281     Center_[r] *= normalizationfactor;
00282     MeanDeltaRAn[r] *= normalizationfactor;
00283     while (MeanDeltaRAn[r]>2.0*M_PI) {
00284       cout <<"adapting -2pi ";
00285       MeanDeltaRAn[r]-=2.0*M_PI;
00286     }
00287     while (MeanDeltaRAn[r]<0.0) {
00288       cout <<"adapting +2pi ";
00289       MeanDeltaRAn[r] += 2.0*M_PI;
00290     }
00291     Calibration_[r] *= normalizationfactor;
00292     MeanDeltaRAx[r].Normalize();
00293     Rotation_[r].Set(MeanDeltaRAx[r],MeanDeltaRAn[r]);
00294   }
00295
00296   return true;
00297 }
00298
00299 #ifdef BIAS_HAVE_XML2
00300 int RigParameter::WriteRigData(const std::string &filename) {
00301
00302   XMLIO myXML;
00303   xmlNodePtr rootNode, childNode1, childNode2, childNode3;
00304   rootNode = myXML.create("rig");
00305   myXML.addAttribute(rootNode, "version", std::string("1.0") );
00306   for (unsigned int i=0; i<Camera_.size(); i++) {
00307     childNode1 = myXML.addChildNode(rootNode, "cameraDescription");
00308     Camera_[i].AddCameraDataToRig(myXML, childNode1);
00309     childNode2 = myXML.addChildNode(childNode1, "poseInRig");
00310     double yaw, pitch, roll;
00311     myXML.addComment(childNode2, "Yaw, Pitch and Roll are the Rotation_ angles of the camera around the rigs X, Y and Z Axes relative to the rig Rotation_. The Rotation_s are applied in the order XYZ or YPR.");
00312     Rotation_[i].GetRotationAnglesXYZ(pitch, yaw, roll);
00313     childNode3 = myXML.addChildNode(childNode2, "x");
00314     myXML.addContent(childNode3, Center_[i][0]);
00315     childNode3 = myXML.addChildNode(childNode2, "y");
00316     myXML.addContent(childNode3, Center_[i][1]);
00317     childNode3 = myXML.addChildNode(childNode2, "z");
00318     myXML.addContent(childNode3, Center_[i][2]);
00319     myXML.addComment(childNode2,"Rotation_ direction: from rig reference system to camera frame.");
00320     childNode3 = myXML.addChildNode(childNode2, "yaw");
00321     myXML.addContent(childNode3, yaw);
00322     childNode3 = myXML.addChildNode(childNode2, "pitch");
00323     myXML.addContent(childNode3, pitch);
00324     childNode3 = myXML.addChildNode(childNode2, "roll");
00325     myXML.addContent(childNode3, roll);
00326   }
00327   for (unsigned int i=0; i<SensorRotation_.size(); i++) {
00328     childNode1 = myXML.addChildNode(rootNode, "sensorDescription");
00329     childNode2 = myXML.addChildNode(childNode1, "poseInRig");
00330     double yaw, pitch, roll;
00331     SensorRotation_[i].GetRotationAnglesXYZ(pitch, yaw, roll);
00332     childNode3 = myXML.addChildNode(childNode2, "x");
00333     myXML.addContent(childNode3, SensorCenter_[i][0]);
00334     childNode3 = myXML.addChildNode(childNode2, "y");
00335     myXML.addContent(childNode3, SensorCenter_[i][1]);
00336     childNode3 = myXML.addChildNode(childNode2, "z");
00337     myXML.addContent(childNode3, SensorCenter_[i][2]);
00338     myXML.addComment(childNode2,"Rotation_ direction: from rig reference system to sensor frame.");
00339
00340     childNode3 = myXML.addChildNode(childNode2, "yaw");
00341     myXML.addContent(childNode3, yaw);
00342     childNode3 = myXML.addChildNode(childNode2, "pitch");
00343     myXML.addContent(childNode3, pitch);
00344     childNode3 = myXML.addChildNode(childNode2, "roll");
00345     myXML.addContent(childNode3, roll);
00346   }
00347   myXML.write(filename);
00348   return 0;
00349 }
00350 #endif //BIAS_HAVE_XML2
00351
00352
00353 #ifdef BIAS_HAVE_XML2
00354 int RigParameter::ReadRigData(const std::string &filename) {
00355
00356   XMLIO myXML;
00357   xmlNodePtr rootNode, childNode1, childNode2;
00358
00359   Camera_.clear();
00360   Calibration_.clear();
00361   Center_.clear();
00362   Rotation_.clear();
00363
00364   rootNode = myXML.read(filename);
00365   if (rootNode==NULL) {
00366     BIASERR("Rig-Parameter-File not found or parse error: " << filename);
00367     return -1;
00368   }
00369
00370   CameraParam cp;
00371   KMatrix km;
00372   Vector3<double> vp;
00373   RMatrix rm,srm;
00374   srm.SetIdentity();
00375   if (myXML.getNodeName(rootNode)!="rig" &&
00376       myXML.getNodeName(rootNode)!="Rig") {
00377     if (myXML.getNodeName(rootNode)!="camera" &&
00378         myXML.getNodeName(rootNode)!="Camera") {
00379       BIASERR("Root node has to be \"rig\" or \"camera\"");
00380       return -1;
00381     } else {
00382       //Root Node is "camera"
00383       int res = cp.Init(myXML, rootNode);
00384       if (res<0) return res;
00385
00386       if (cp.IsSpherical()) {
00387         //cout <<"Spherical camera !"<<endl;
00388         SphericalUndistortion su(cp);
00389         km = su.GetKMatrix();
00390         //km.SetIdentity();
00391       } else {
00392         //cout <<"Perspective camera !"<<endl;
00393         km = cp.GetKMatrix();
00394       }
00395
00396       vp[0]=0;
00397       vp[1]=0;
00398       vp[2]=0;
00399       rm.SetIdentity();
00400       srm.SetIdentity();
00401       Camera_.push_back(cp);
00402       Calibration_.push_back(km);
00403       Center_.push_back(vp);
00404       Rotation_.push_back(rm);
00405       // this is not correct here, we dont have a sensor for each camera !!!
00406       SensorRotation_.push_back(srm);
00407       SensorCenter_.push_back(vp);
00408     }
00409   } else {
00410
00411     // Root node is "Rig"
00412     double vers=0;
00413     vers = myXML.getAttributeValueDouble(rootNode, "version");
00414     if (vers==0) {
00415       vers = myXML.getAttributeValueDouble(rootNode, "Version");
00416     }
00417     if (vers!=RIG_PARAMETER_CURRENT_XML_VERSION) {
00418       BIASWARN("Parameter File Version (" << vers << ")is Deprecated, "
00419               << "current version is " << RIG_PARAMETER_CURRENT_XML_VERSION);
00420       if (vers==0.8) {
00421         ReadRigDataV0_8(filename);
00422         return 0;
00423       } else {
00424         return -1;
00425       }
00426     }
00427
00428     childNode1 = myXML.getFirstChild(rootNode);
00429     if (childNode1 == NULL) {
00430       BIASERR("No CameraDescriptions in Rig, empty Rig???");
00431       return -1;
00432     }
00433
00434     do {
00435       if (myXML.getNodeName(childNode1)=="cameraDescription") {
00436         childNode2 = myXML.getChild(childNode1, "camera");
00437         if (childNode2 == NULL) {
00438           BIASERR("\"CameraDescription\" without a \"Camera\" is not possible.");
00439           return -1;
00440         }  else {
00441           int res = cp.Init(myXML, childNode2);
00442           if (res<0) return res;
00443           if (cp.IsSpherical()) {
00444             SphericalUndistortion su(cp);
00445             km = su.GetKMatrix();
00446             //km.SetIdentity();
00447           } else {
00448             km = cp.GetKMatrix();
00449           }
00450         }
00451         childNode2 = myXML.getChild(childNode1, "poseInRig");
00452         if (childNode2 == NULL) {
00453           BIASERR("\"cameraDescription\" without a \"poseInRig\" is not possible.");
00454           return -1;
00455         }  else {
00456           double x, y, z, yaw, pitch, roll;
00457           x =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "x"));
00458           y =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "y"));
00459           z =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "z"));
00460           yaw = myXML.getNodeContentDouble(myXML.getChild(childNode2,"yaw"));
00461           pitch=myXML.getNodeContentDouble(myXML.getChild(childNode2,"pitch"));
00462           roll =myXML.getNodeContentDouble(myXML.getChild(childNode2,"roll"));
00463           vp[0]=x;
00464           vp[1]=y;
00465           vp[2]=z;
00466           rm.SetXYZ(pitch, yaw, roll);
00467         }
00468
00469         Camera_.push_back(cp);
00470         Calibration_.push_back(km);
00471         Center_.push_back(vp);
00472         Rotation_.push_back(rm);
00473       }
00474       if (myXML.getNodeName(childNode1)=="sensorDescription") {
00475         childNode2 = myXML.getChild(childNode1, "poseInRig");
00476         if (childNode2 == NULL) {
00477           BIASERR("\"sensorDescription\" without a \"poseInRig\" is not possible.");
00478           return -1;
00479         }  else {
00480           double x, y, z, yaw, pitch, roll;
00481           x =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "x"));
00482           y =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "y"));
00483           z =   myXML.getNodeContentDouble(myXML.getChild(childNode2, "z"));
00484           yaw = myXML.getNodeContentDouble(myXML.getChild(childNode2,"yaw"));
00485           pitch=myXML.getNodeContentDouble(myXML.getChild(childNode2,"pitch"));
00486           roll =myXML.getNodeContentDouble(myXML.getChild(childNode2,"roll"));
00487           vp[0]=x;
00488           vp[1]=y;
00489           vp[2]=z;
00490           rm.SetXYZ(pitch, yaw, roll);
00491
00492         }
00493
00494         SensorCenter_.push_back(vp);
00495         SensorRotation_.push_back(rm);
00496       }
00497       childNode1 = myXML.getNextChild(childNode1);
00498     } while (childNode1!=NULL);
00499   }
00500
00501   if (Camera_.size()==0) {
00502     return -1;
00503   }
00504   return 0;
00505 }
00506
00507
00508 int RigParameter::ReadRigDataV0_8(const std::string &filename) {
00509
00510   XMLIO myXML;
00511   xmlNodePtr rootNode, childNode1, childNode2;
00512
00513   Camera_.clear();
00514   Calibration_.clear();
00515   Center_.clear();
00516   Rotation_.clear();
00517
00518   rootNode = myXML.read(filename);
00519   if (rootNode==NULL) {
00520     BIASERR("Rig-Parameter-File not found or parse error: " << filename);
00521     return -1;
00522   }
00523
00524   CameraParam cp;
00525   KMatrix km;
00526   Vector3<double> vp;
00527   RMatrix rm,srm;
00528   srm.SetIdentity();
00529
00530   // Root node is "Rig"
00531   childNode1 = myXML.getFirstChild(rootNode);
00532   if (childNode1 == NULL) {
00533     BIASERR("No CameraDescriptions in Rig, empty Rig???");
00534     return -1;
00535   }
00536
00537   do {
00538     if (myXML.getNodeName(childNode1)=="CameraDescription") {
00539       childNode2 = myXML.getChild(childNode1, "Camera");
00540       if (childNode2 == NULL) {
00541         BIASERR("\"CameraDescription\" without a \"Camera\" is not possible.");
00542         return -1;
00543       }  else {
00544         int res = cp.Init(myXML, childNode2);
00545     if (res<0) return res;
00546         if (cp.IsSpherical()) {
00547           SphericalUndistortion su(cp);
00548           km = su.GetKMatrix();
00549           //km.SetIdentity();
00550         } else {
00551           km = cp.GetKMatrix();
00552         }
00553       }
00554       childNode2 = myXML.getChild(childNode1, "PoseInRig");
00555       if (childNode2 == NULL) {
00556         BIASERR("\"CameraDescription\" without a \"PoseInRig\" is not possible.");
00557         return -1;
00558       }  else {
00559         double x, y, z, yaw, pitch, roll;
00560         x =     myXML.getAttributeValueDouble(childNode2, "X");
00561         y =     myXML.getAttributeValueDouble(childNode2, "Y");
00562         z =     myXML.getAttributeValueDouble(childNode2, "Z");
00563         yaw =   myXML.getAttributeValueDouble(childNode2, "Yaw");
00564         pitch = myXML.getAttributeValueDouble(childNode2, "Pitch");
00565         roll =  myXML.getAttributeValueDouble(childNode2, "Roll");
00566         vp[0]=x;
00567         vp[1]=y;
00568         vp[2]=z;
00569         rm.SetXYZ(pitch, yaw, roll);
00570       }
00571
00572       Camera_.push_back(cp);
00573       Calibration_.push_back(km);
00574       Center_.push_back(vp);
00575       Rotation_.push_back(rm);
00576     }
00577     childNode1 = myXML.getNextChild(childNode1);
00578   } while (childNode1!=NULL);
00579
00580   if (Camera_.size()==0) {
00581     return -1;
00582   }
00583   return 0;
00584 }
00585 #endif //BIAS_HAVE_XML2
00586
00587 void RigParameter::SetData_DummyRig() {
00588
00589   CameraParam cp;
00590   KMatrix km;
00591   Vector3<double> vp;
00592   RMatrix rm;
00593
00594   cp.SetData_EVID31_147094();
00595   km = cp.GetKMatrix();
00596   vp.Set(-358.02,5.72,4.04);
00597   rm[0][0]=0.999918312;
00598   rm[0][1]=0.01265;
00599   rm[0][2]=0.0018;
00600   rm[1][0]=-0.01264;
00601   rm[1][1]=0.9998977;
00602   rm[1][2]=0.00569;
00603   rm[2][0]=0.00188;
00604   rm[2][1]=-0.00566;
00605   rm[2][2]=0.999976;
00606   Camera_.push_back(cp);
00607   Calibration_.push_back(km);
00608   Center_.push_back(vp);
00609   Rotation_.push_back(rm);
00610
00611   cp.SetData_OMNITECH_ORIFL_190_3();
00612   SphericalUndistortion su(cp);
00613   km = su.GetKMatrix();
00614   vp.Set(9.87,8.76,7.65);
00615   rm.SetXYZ(0.22, 0.67, -0.005);
00616   Camera_.push_back(cp);
00617   Calibration_.push_back(km);
00618   Center_.push_back(vp);
00619   Rotation_.push_back(rm);
00620
00621 }
00622
00623
00624 std::ostream& BIAS::operator<<(std::ostream &os, RigParameter &r) {
00625   std::vector<BIAS::RMatrix> rMat;
00626   r.GetRotations(rMat);
00627   std::vector<BIAS::Vector3<double> > cVec;
00628   r.GetCameraCenters(cVec);
00629   std::vector< BIAS::KMatrix > kMat;
00630   r.GetCalibrations(kMat);
00631   std::vector<CameraParam> vCParam;
00632   r.GetCameraParams(vCParam);
00633
00634   for (unsigned int i=0; i<cVec.size(); i++) {
00635     os << "C["<<i<<"]="<<cVec[i]<<std::endl;
00636   }
00637   BIAS::Vector3<double> axis;
00638   double angle;
00639   for (unsigned int i=0; i<rMat.size(); i++) {
00640     rMat[i].GetRotationAxisAngle(axis, angle);
00641     os << "R["<<i<<"]: Axis="<<axis<<" angle="<<angle<<std::endl;
00642     // os << "R["<<i<<"]="<<r.Rotation__[i]<<std::endl;
00643   }
00644   for (unsigned int i=0; i<kMat.size(); i++) {
00645     os << "K["<<i<<"]="<<kMat[i]<<std::endl;
00646   }
00647   for (unsigned int i=0; i<kMat.size(); i++) {
00648     os << "Camera["<<i<<"]="<<std::endl;
00649     vCParam[i].DebugOut();
00650   }
00651
00652   return os;
00653 }
00654
00655
00656 void RigParameter::GetKMatrices(std::vector<BIAS::KMatrix>& vKmatrix){
00657
00658   vKmatrix.clear();
00659   BIAS::KMatrix km;
00660   for(unsigned int i=0;i<Camera_.size();i++){
00661     if(i<=Calibration_.size()){
00662       km = Calibration_[i];
00663
00664       if(DownSamplingFactor_<=0) DownSamplingFactor_=1.0;
00665       km[0][0]/=DownSamplingFactor_;
00666       km[1][1]/=DownSamplingFactor_;
00667
00668       km[0][2]/=DownSamplingFactor_;
00669       km[1][2]/=DownSamplingFactor_;
00670
00671       //now fill matrix vector with downsampled values
00672       vKmatrix.push_back(km);
00673     }
00674   }
00675 }
00676
00677 bool RigParameter::GetKMatrix(BIAS::KMatrix& matrix,int index) const
00678 {
00679   matrix.SetZero();
00680   if((unsigned int)index>Calibration_.size())
00681     return false;
00682   else{
00683     matrix = Calibration_[index];
00684     matrix[0][0]/=DownSamplingFactor_;
00685     matrix[1][1]/=DownSamplingFactor_;
00686     matrix[0][2]/=DownSamplingFactor_;
00687     matrix[1][2]/=DownSamplingFactor_;
00688     return true;
00689   }
00690 }
00691
00692 void RigParameter::SetDownsampling(const double factor)
00693 {
00694   DownSamplingFactor_= factor;
00695   for(unsigned int i=0;i<Camera_.size();i++)
00696     Camera_[i].SetDownsampling(factor);
00697 }
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/RigParameter.hh Source File

Image

RigParameter.hh

Go to the documentation of this file.
00001 #ifndef __RIG_PARAMETER_
00002 #define __RIG_PARAMETER_
00003
00004 #include <bias_config.h>
00005
00006 //BIAS
00007 #include <Base/Geometry/HomgPoint2D.hh>
00008 #include <Base/Math/Matrix3x3.hh>
00009 #include <Base/Math/Vector3.hh>
00010 #include <Base/Image/ImageBase.hh>
00011 #include <Base/Geometry/KMatrix.hh>
00012 #include <Geometry/RMatrix.hh>
00013 #include <Geometry/PMatrix.hh>
00014 #include <Base/Math/Matrix4x4.hh>
00015
00016 #include <iostream>
00017 #include <fstream>
00018 #include <sstream>
00019 #include <stdio.h>
00020 #include <string>
00021
00022 #include "CameraParam.hh"
00023
00024 #define RIG_PARAMETER_CURRENT_XML_VERSION 1.0
00025
00026 namespace BIAS {
00027
00028   class BIASImage_EXPORT RigParameter {
00029   public:
00030     RigParameter() { DownSamplingFactor_=1;};
00031
00032     RigParameter(const RigParameter& RigParam) {
00033       Camera_ = RigParam.Camera_;
00034       Center_ = RigParam.Center_;
00035       Rotation_ = RigParam.Rotation_;
00036       Calibration_ = RigParam.Calibration_;
00037       SensorCenter_ = RigParam.SensorCenter_;
00038       SensorRotation_ = RigParam.SensorRotation_;
00039       DownSamplingFactor_ = RigParam.DownSamplingFactor_;
00040     };
00041
00042     inline void GetDownSamplingFactor(double &Down) const{
00043       Down = DownSamplingFactor_;
00044     };
00045     ////////////////////////////////////////////////////////////////////////////
00046     inline bool SetCameraParam(CameraParam param,unsigned int index){
00047       if(index < Camera_.size()){Camera_[index]=param; return true;}
00048       else return false;
00049     };
00050     inline void GetCameraParams(std::vector<CameraParam> &CameraParam) const{
00051       CameraParam = Camera_;
00052     };
00053     inline bool GetCameraParam(CameraParam &CParam, unsigned int index) const{
00054       if(index < Camera_.size()){CParam = Camera_[index];return true;}
00055       else return false;
00056     };
00057     inline void DeleteCameraParams(){
00058       Camera_.clear();
00059     };
00060     /////////////////////////////////////////////////////////////////////////////
00061     inline bool SetCameraCenter(BIAS::Vector3<double> center,unsigned int index){
00062       if(index < Center_.size()){Center_[index]=center; return true;}
00063       else return false;
00064     };
00065     inline void SetCameraCenters(std::vector< BIAS::Vector3<double> > center){
00066       Center_ = center;
00067     };
00068     inline void GetCameraCenters(std::vector<BIAS::Vector3<double> > &CameraCenters) const{
00069       CameraCenters = Center_;
00070     };
00071     inline bool GetCameraCenter(BIAS::Vector3<double> &CCenter, unsigned int index) const{
00072       if(index < Center_.size()){   CCenter = Center_[index];return true;}
00073       else return false;
00074     };
00075     inline void DeleteCameraCenters(){
00076       Center_.clear();
00077     };
00078     /////////////////////////////////////////////////////////////////////////////
00079     inline bool SetRotation(BIAS::RMatrix rMat,unsigned int index){
00080       if(index < Rotation_.size()){Rotation_[index]=rMat; return true;}
00081       else return false;
00082     };
00083
00084     inline void GetRotations( std::vector< BIAS::RMatrix >  &Rotations) const{
00085       Rotations = Rotation_;
00086     };
00087     inline bool GetRotation(BIAS::RMatrix &Rotation, unsigned int index) const{
00088       if(index < Rotation_.size()){Rotation = Rotation_[index];return true;}
00089       else return false;
00090     };
00091     inline void DeleteRotations(){
00092       Rotation_.clear();
00093     };
00094     /////////////////////////////////////////////////////////////////////////////
00095     inline bool SetCalibration(BIAS::KMatrix kMat,unsigned int index){
00096       if(index < Calibration_.size())   {Calibration_[index]=kMat; return true;}
00097       else return false;
00098     };
00099     inline void GetCalibrations( std::vector< BIAS::KMatrix >  &Calibration) const{
00100       Calibration = Calibration_;
00101     };
00102     inline void DeleteCalibrations(){
00103       Calibration_.clear();
00104     };
00105     /////////////////////////////////////////////////////////////////////////////
00106     inline bool SetSensorRotation(BIAS::RMatrix rSMat,unsigned int index){
00107       if(index < SensorRotation_.size()){SensorRotation_[index]=rSMat; return true;}
00108       else return false;
00109     };
00110     inline void GetSensorRotations( std::vector< BIAS::RMatrix >  &SRotation) const{
00111       SRotation = SensorRotation_;
00112     };
00113     inline bool GetSensorRotation(BIAS::RMatrix &SRotation, unsigned int index) const{
00114       if(index < SensorRotation_.size()){SRotation=SensorRotation_[index];return true;}
00115       else return false;
00116     };
00117     inline void DeleteSensorRotations(){
00118       SensorRotation_.clear();
00119     };
00120     /////////////////////////////////////////////////////////////////////////////
00121     inline bool SetSensorCenter(BIAS::Vector3<double> vSC,unsigned int index){
00122       if(index < SensorCenter_.size())
00123       {SensorCenter_[index]=vSC; return true;}
00124       else return false;
00125     };
00126     inline void GetSensorCenters(std::vector<BIAS::Vector3<double> > &SensorCenters) const{
00127       SensorCenters = SensorCenter_;
00128     };
00129
00130     inline bool GetSensorCenter(BIAS::Vector3<double> &SensorCenter, unsigned int index) const{
00131       if(index < SensorCenter_.size()){SensorCenter=SensorCenter_[index];return true;}
00132       else return false;
00133     };
00134     inline void DeleteSensorCenters(){
00135       SensorCenter_.clear();
00136     };
00137     /////////////////////////////////////////////////////////////////////////////
00138
00139
00140     ~RigParameter() {};
00141
00142     inline unsigned int getNumberOfCameras() const
00143     {
00144       return Camera_.size();
00145     };
00146
00147     inline unsigned int getRigSize() const
00148     {
00149       return Center_.size();
00150     };
00151
00152     bool ReadFromCMP(const std::string &filename);
00153
00154 #ifdef BIAS_HAVE_XML2
00155     /** @brief Write all data camera data and camera positions in the rig
00156     to a rig parameter file in XML-notation
00157     @param Filename Name of the XML-rig-data-file,
00158     document tag will be to be "Rig"
00159     @author streckel 06/2004 */
00160     int WriteRigData(const std::string &filename);
00161     /** @brief Read a rig parameter file and store the data in (*this)
00162     the Camera-, Center-, RMatrix-, and KMatrix-Vectors are
00163     reset from the file.
00164     @param Filename Name of the XML-camera-data-file,
00165     document tag has to be "Rig"
00166     @author streckel 06/2004 */
00167     int ReadRigData(const std::string &filename);
00168 #endif //BIAS_HAVE_XML2
00169
00170     void SetLadybugCenters(double value = 1.0);
00171
00172
00173     /** @brief compute mean rigid transformations of virtual camera into
00174     rigcameras given a number of rigs
00175     @param Pvec contains n rigs of size Rigsize, first all cameras of rig1
00176     cameras must be in world coordinate system
00177     @param Rigsize size of each rig
00178     @param WeightOfCurrentParams if not zero, the current parameters
00179     are averaged with the new ones (weight 1.0)
00180     @author koeser 03/2004 */
00181     bool Compute(std::vector<BIAS::PMatrix>& Pvec,
00182       const unsigned int &Rigsize,
00183       const double& WeightOfCurrentParams = 0.0);
00184
00185     /** @brief returns the K-Matrices in the vector
00186     the downsampling factor is applied to the matrices
00187     caution: the vector is erased befor refilled
00188     @ author schiller 07/05
00189     */
00190     void GetKMatrices(std::vector<BIAS::KMatrix>& vKmatrix);
00191
00192
00193     bool GetKMatrix(BIAS::KMatrix& matrix,int index) const;
00194
00195     /** @brief Set the downsampling factor
00196     1 means no downsampling, 2 means downsampling by 2 ...
00197     0.5 means upsample!
00198     @author schiller
00199     */
00200     void SetDownsampling(const double factor);
00201
00202
00203     void SetData_DummyRig();
00204
00205     /** @brief This sets a Camera and sets everything else to identity */
00206     void AddCameraOnly(CameraParam &Camera)
00207     {
00208       //Prepare data
00209       double fl = Camera.GetFocalLength(); //focal length
00210       BIAS::Vector3<double> vec;
00211       vec[0]=0;vec[1]=0;vec[2]=0;
00212       BIAS::RMatrix rDummy;
00213       rDummy.SetIdentity();
00214       BIAS::KMatrix kDummy;
00215       kDummy.SetIdentity();
00216       //set kmatrix to correct values
00217       kDummy[0][0]= fl;
00218       kDummy[1][1]= fl;
00219       kDummy[0][2]= Camera.GetPrincipalX();
00220       kDummy[1][2]= Camera.GetPrincipalY();
00221       //and set it
00222       Camera_.push_back(Camera);
00223       Center_.push_back(vec);
00224       Rotation_.push_back(rDummy);
00225       Calibration_.push_back(kDummy);
00226       SensorRotation_.push_back(rDummy);
00227       SensorCenter_.push_back(vec);
00228     }
00229
00230     void AddCamera(CameraParam &Camera){
00231       Camera_.push_back(Camera);
00232     };
00233     void AddCalibration(BIAS::KMatrix &kMatrix){
00234       Calibration_.push_back(kMatrix);
00235     };
00236     void AddRotation(BIAS::RMatrix &rMatrix){
00237       Rotation_.push_back(rMatrix);
00238     };
00239     void AddCameraCenter(BIAS::Vector3<double> &center){
00240       Center_.push_back(center);
00241     };
00242     void AddSensorRotation(BIAS::RMatrix &sRotation){
00243       SensorRotation_.push_back(sRotation);
00244     };
00245     void AddSensorCenter(BIAS::Vector3<double > &sCenter){
00246       SensorCenter_.push_back(sCenter);
00247     };
00248
00249   protected:
00250
00251     // DLL JW
00252     BIAS_EXPORT_STL_VECTOR( BIASImage_EXPORT, BIAS::CameraParam)
00253     BIAS_EXPORT_STL_VECTOR( BIASImage_EXPORT, BIAS::Vector3<double> )
00254     BIAS_EXPORT_STL_VECTOR( BIASImage_EXPORT, BIAS::RMatrix )
00255     BIAS_EXPORT_STL_VECTOR( BIASImage_EXPORT, BIAS::KMatrix )
00256
00257
00258     std::vector< BIAS::CameraParam >        Camera_;
00259     std::vector< BIAS::Vector3<double> >    Center_;
00260     std::vector< BIAS::RMatrix >            Rotation_;
00261     std::vector< BIAS::KMatrix >            Calibration_;
00262     std::vector< BIAS::RMatrix >            SensorRotation_;
00263     std::vector< BIAS::Vector3<double > >   SensorCenter_;
00264
00265     double DownSamplingFactor_;
00266
00267     int ParseView(const std::string &block);
00268
00269     // read old rig datafile version
00270     int ReadRigDataV0_8(const std::string &filename);
00271
00272     /** @brief adapts rotation representation in Axis/Angle such that averaging
00273     against RefAxis and RefAngle is possible without wrap-around problems
00274     @author koeser 03/2004 */
00275     void AdaptAxisAngleRepresentation(BIAS::Vector3<double>& Axis,
00276       double& Angle,
00277       const BIAS::Vector3<double>& RefAxis,
00278       const double& RefAngle);
00279
00280   }; // end of class RigParameter
00281
00282   std::ostream& operator<<(std::ostream &os, BIAS::RigParameter &r);
00283
00284 } // ensd of namespace
00285
00286
00287
00288
00289 #endif // __RIG_PARAMETER_
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/RMatrix.cpp Source File

Geometry

RMatrix.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "RMatrix.hh"
00027 #include <MathAlgo/SVD.hh>
00028 #include <MathAlgo/Minpack.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033
00034
00035
00036 RMatrix::~RMatrix()
00037 {}
00038
00039 RMatrix::RMatrix(const TNT::Matrix<ROTATION_MATRIX_TYPE>& mat)
00040   : RMatrixBase(mat)
00041 {
00042   if ((mat.num_rows() != 3) || (mat.num_cols() != 3)) {
00043     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00044            << mat.num_cols());
00045   }
00046 }
00047
00048 int RMatrix::EnforceRConstraints()
00049 {
00050   // enforce real rotation matrix using SVD
00051   // by setting all singular values to unity
00052   SVD RotSVD(*this);
00053   *this = RotSVD.GetU() * RotSVD.GetVT();
00054
00055   // enforce right-handed system (det = +1)
00056   if (this->det()<0.0) *this *= -1.0;
00057   return 0;
00058 }
00059
00060
00061
00062 // -------------------- numerical L-M error computation ---------------------
00063 vector<RMatrix> const *pGLOBALvecR = NULL;
00064 double GLOBALbestErrorSoFar = DBL_MAX;
00065 Quaternion<double> GLOBALbestQuaternionSoFar(0,0,0,1);
00066
00067 void ErrorFunction(int * /*numerrors*/, int *numvars, double *x,
00068                    double *fvec, int * /*iflag*/)
00069 {
00070   BIASASSERT(numvars!=NULL);
00071   BIASASSERT(*numvars==4);
00072
00073   // create rotation matrix vector from parameterization
00074   Quaternion<double> q(x[0],x[1],x[2],x[3]);
00075   q.Normalize();
00076   RMatrixBase R;
00077   R.SetFromQuaternion(q);
00078
00079
00080   // compute residuum
00081   double error = 0, err;
00082   for (unsigned int j=0; j<pGLOBALvecR->size(); j++) {
00083     for (unsigned int row=0; row<3; row++) {
00084       for (unsigned int col=0; col<3; col++) {
00085         err = fvec[9*j+3*col+row]
00086           = R[row][col] - (*pGLOBALvecR)[j][row][col];
00087         error += err*err;
00088       }
00089     }
00090   }
00091
00092   // in case lm runs out of iterations, remember best in a global variable
00093   if (error<GLOBALbestErrorSoFar) {
00094     GLOBALbestErrorSoFar = error;
00095     GLOBALbestQuaternionSoFar = q;
00096   }
00097   cout<<error<<" ";
00098 }
00099 // ---------------------------------------------------------------------------
00100
00101
00102
00103
00104
00105
00106
00107 RMatrix RMatrix::GetAverageRMatrix(const std::vector<RMatrix>& vecR,
00108                                    bool RefineRotation) const {
00109   BIASASSERT(!vecR.empty());
00110   BIASWARN("untested code so far !");
00111   RMatrix Result = vecR[0];
00112   Vector3<double> Axis(0,0,0);
00113   double angle(0.0);
00114   double weight(1.0);
00115   // for the first two matrices we have RDiff = vecR[0] * vecR[1].Transpose();
00116   // Therefore Result = sqrt(Rdiff) * vecR[1] = sqrt(Rdiff^T) * vecR[1]
00117   // is an average orientation, where
00118   // square root is realized by axis-angle decomposition (sqrt = half angle)
00119   for (unsigned int i=1; i<vecR.size(); i++) {
00120     // after the first averaging, our result becomes more reliable, so
00121     // use a higher weight each time
00122     // this is equivalent to not using sqrt = ^0.5 but ^weight
00123     weight = 1.0 / double(i+1);
00124     RMatrix RDiff = Result * vecR[i].Transpose();
00125     RDiff.GetRotationAxisAngle(Axis, angle);
00126     // compute transpose of diff by -1 and go only by weight into this new dir
00127     angle *= -1.0 * weight;
00128     RDiff.Set(Axis, angle);
00129     Result = RDiff * Result;
00130     Result.EnforceRConstraints();
00131   }
00132
00133   // now if desired, take this as astart value for nonlinear optimization
00134   if (RefineRotation) {
00135     pGLOBALvecR = &vecR;
00136     GLOBALbestErrorSoFar = DBL_MAX;
00137     int num_params = 4;
00138     int num_errors = 9 * vecR.size();
00139     int max_error_calls = 1000;
00140     double epsilon_for_jacobian_approximation = 0.02;
00141
00142     // set up parametrization
00143     Quaternion<double> q(0,0,0,1), qres(0,0,0,1);
00144     Result.GetQuaternion(q);
00145     Vector<double> qvec(4),qresvec(4);
00146     for (unsigned int i=0; i<4; i++)  qvec[i] = q[i];
00147
00148     int LMResult =
00149       LevenbergMarquardtExtended(&ErrorFunction, num_errors, num_params,
00150                                  qvec, qresvec,
00151                                  epsilon_for_jacobian_approximation, 1e-10,
00152                                  max_error_calls);
00153     if ((LMResult != LM_OK) && (LMResult != LM_TOO_MANY_IT)) {
00154       BIASERR("Error in Levenberg-Marquardt-Optimization. Error code is "
00155               <<LMResult);
00156     } else {
00157       cout<<"minimization terminated with code "<<LMResult<<endl;
00158       // dirty non-threadsafe workaround in case LM makes too many iters:
00159       Result.SetFromQuaternion(GLOBALbestQuaternionSoFar);
00160       cout<<"best error so far is "<<GLOBALbestErrorSoFar<<endl;
00161     }
00162   }
00163
00164   return Result;
00165 }
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/RMatrix.hh Source File

Geometry

RMatrix.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIAS_RMatrix_hh_
00027 #define _BIAS_RMatrix_hh_
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Math/Vector3.hh>
00032 #include <Base/Math/Vector4.hh>
00033 #include <Base/Math/Matrix3x3.hh>
00034 #include <Base/Debug/Debug.hh>
00035 #include <Base/Geometry/RMatrixBase.hh>
00036
00037 namespace BIAS {
00038
00039 /** @class RMatrix
00040     @ingroup g_geometry
00041     @brief 3D rotation matrix
00042
00043     @author JMF
00044     @status finished (07/05/2002)
00045 **/
00046
00047   class BIASGeometry_EXPORT RMatrix : public RMatrixBase {
00048
00049   public:
00050
00051     inline RMatrix()
00052       : RMatrixBase(){};
00053
00054     explicit RMatrix(const MatrixInitType& i)
00055       : RMatrixBase(i){};
00056
00057     /// initialization from rotation axis w and angle phi (Rodriguez)
00058     RMatrix(Vector3<ROTATION_MATRIX_TYPE> w, ROTATION_MATRIX_TYPE phi):
00059       RMatrixBase(w,phi) {};
00060
00061     virtual ~RMatrix();
00062
00063     inline RMatrix(Matrix3x3<ROTATION_MATRIX_TYPE> mat)
00064       : RMatrixBase(mat) {};
00065
00066     RMatrix(const TNT::Matrix<ROTATION_MATRIX_TYPE>& mat);
00067     /** Enforces scale ==1.0 and right-handed rotation
00068         @author koeser
00069     */
00070     int EnforceRConstraints();
00071
00072     /** compute average rotation by pairwise weighted averaging of matrices
00073         in vector
00074         @attention unfinished code
00075         @author koeser */
00076     RMatrix GetAverageRMatrix(const std::vector<RMatrix>& vecR,
00077                               bool RefineRotation = true) const;
00078
00079   };
00080 } // namespace BIAS
00081
00082 #endif
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/RMatrixBase.cpp Source File

Base » Geometry

RMatrixBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "RMatrixBase.hh"
00027 #include <float.h>
00028
00029 #ifdef WIN32
00030 #  define _USE_MATH_DEFINES
00031 #endif //WIN32
00032
00033 #include <math.h>
00034
00035 // if rotation angle is below this value, assume zero rotation
00036 #define MINIMUM_ROTATION 1e-6
00037
00038 // if real part of quaternion = cos(alpha) is larger than 1+thisvalue
00039 // GetQuaternion produces an error and returns -1
00040 #define MAX_QUATERNION_COS_ERROR 1e-12
00041
00042
00043 #include <Base/Common/BIASpragma.hh>
00044
00045
00046
00047 using namespace BIAS;
00048 using namespace std;
00049
00050 RMatrixBase::RMatrixBase(const RMatrixBase& r)
00051   : Matrix3x3<ROTATION_MATRIX_TYPE>(r)
00052 {}
00053
00054 RMatrixBase::RMatrixBase(const TNT::Matrix<ROTATION_MATRIX_TYPE>& mat)
00055   : Matrix3x3<ROTATION_MATRIX_TYPE>(mat)
00056 {
00057   if ((mat.num_rows() != 3) || (mat.num_cols() != 3)) {
00058     BIASERR("wrong matrix size "<<mat.num_rows()<<"x"
00059            << mat.num_cols());
00060   }
00061 }
00062
00063 RMatrixBase::~RMatrixBase()
00064 {}
00065
00066 void
00067 RMatrixBase::SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY,
00068                     ROTATION_MATRIX_TYPE PhiZ)
00069 {
00070   RMatrixBase Rx; Rx.SetIdentity();
00071   RMatrixBase Ry; Ry.SetIdentity();
00072   RMatrixBase Rz; Rz.SetIdentity();
00073
00074   /* set Rz, Ry, Rx as rotation matrices */
00075   Rz[0][0] = cos(PhiZ);
00076   Rz[0][1] = -sin(PhiZ);
00077   Rz[1][0] = -Rz[0][1];
00078   Rz[1][1] = Rz[0][0];
00079   //Rz[2][2] = 1;
00080
00081   Ry[0][0] = cos(PhiY);
00082   Ry[0][2] = sin(PhiY);
00083   //Ry[1][1] = 1;
00084   Ry[2][0] = -Ry[0][2]; //-sin(PhiY);
00085   Ry[2][2] = Ry[0][0]; //cos(PhiY);
00086
00087   //Rx[0][0] = 1;
00088   Rx[1][1] = cos(PhiX);
00089   Rx[1][2] = -sin(PhiX);
00090   Rx[2][1] = -Rx[1][2]; //sin(PhiX);
00091   Rx[2][2] = Rx[1][1]; //cos(PhiX);
00092
00093 //   Matrix3x3<ROTATION_MATRIX_TYPE> Result=Rx*Ry*Rz;
00094 //   for (int i =0; i<9; i++)
00095 //     this->GetData()[i]=Result.GetData()[i];
00096   (*this) = Rx*Ry*Rz;
00097 }
00098
00099 void
00100 RMatrixBase::SetZYX(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY,
00101                     ROTATION_MATRIX_TYPE PhiZ)
00102 {
00103   RMatrixBase Rx; Rx.SetIdentity();
00104   RMatrixBase Ry; Ry.SetIdentity();
00105   RMatrixBase Rz; Rz.SetIdentity();
00106
00107   /* set Rz, Ry, Rx as rotation matrices */
00108   Rz[0][0] = cos(PhiZ);
00109   Rz[0][1] = -sin(PhiZ);
00110   Rz[1][0] = -Rz[0][1];
00111   Rz[1][1] = Rz[0][0];
00112   //Rz[2][2] = 1;
00113
00114   Ry[0][0] = cos(PhiY);
00115   Ry[0][2] = sin(PhiY);
00116   //Ry[1][1] = 1;
00117   Ry[2][0] = -Ry[0][2]; //-sin(PhiY);
00118   Ry[2][2] = Ry[0][0]; //cos(PhiY);
00119
00120   //Rx[0][0] = 1;
00121   Rx[1][1] = cos(PhiX);
00122   Rx[1][2] = -sin(PhiX);
00123   Rx[2][1] = -Rx[1][2]; //sin(PhiX);
00124   Rx[2][2] = Rx[1][1]; //cos(PhiX);
00125
00126   (*this) = Rz*Ry*Rx;
00127 }
00128
00129
00130 RMatrixBase::RMatrixBase(Vector3<ROTATION_MATRIX_TYPE> w,
00131                          ROTATION_MATRIX_TYPE phi)
00132 {
00133   Set(w, phi);
00134 }
00135
00136
00137 void RMatrixBase::Set(Vector3<ROTATION_MATRIX_TYPE> w,
00138                       ROTATION_MATRIX_TYPE phi)
00139 {
00140 #ifdef BIAS_DEBUG
00141     double wnorm=1.0-w.NormL2();
00142     if (fabs(wnorm)>1e-6){
00143     BIASERR("Rotation axis w must be an unit vector (L2 norm is "
00144         << wnorm << ").");
00145     BIASABORT;
00146     }
00147 #endif
00148
00149   Matrix3x3<ROTATION_MATRIX_TYPE> Omega, I, A;
00150   I.SetIdentity();
00151
00152   Omega[0][0] = 0.0;
00153   Omega[0][1] = -w[2];
00154   Omega[0][2] = w[1];
00155   Omega[1][0] = w[2];
00156   Omega[1][1] = 0.0;
00157   Omega[1][2] = -w[0];
00158   Omega[2][0] = -w[1] ;
00159   Omega[2][1] = w[0];
00160   Omega[2][2] = 0.0;
00161
00162   Matrix3x3<ROTATION_MATRIX_TYPE> Sin_O, O_O, Cos_O_O;
00163
00164   Sin_O = Omega *  sin(phi);
00165
00166   Cos_O_O = (Omega * Omega) * (1-cos(phi));
00167
00168   A = Matrix3x3<ROTATION_MATRIX_TYPE>(I + Sin_O + Cos_O_O);
00169   (*this) = RMatrixBase(I + Sin_O + Cos_O_O);
00170
00171 }
00172
00173 void RMatrixBase::SetFromAxisAngle(Vector3<ROTATION_MATRIX_TYPE> w)
00174 {
00175   double dAngle = w.NormL2();
00176   if (fabs(dAngle)<MINIMUM_ROTATION) {
00177     // we need a rotaion axis even in case of no rotation:
00178     w[0] = 1;
00179     dAngle = 0;
00180   }
00181   w.Normalize();
00182   Set(w, dAngle);
00183 }
00184
00185 int RMatrixBase::GetQuaternion(Quaternion<ROTATION_MATRIX_TYPE>& quat) const
00186 {
00187   int res=0;
00188   // nicked from OpenSG
00189   // corrected by fw, orientation of 'axis' = q0 to q2 was wrong
00190   double tr;
00191   double s;
00192   double qt[3];
00193
00194   unsigned int i;
00195   unsigned int j;
00196   unsigned int k;
00197
00198   unsigned int nxt[3] = { 1, 2, 0};
00199
00200   tr = (*this)[0][0] + (*this)[1][1] + (*this)[2][2];
00201
00202   if(tr > 0.0){
00203     s = sqrt(tr + 1.0);
00204
00205     quat[3] = s * 0.5;
00206
00207     s = 0.5 / s;
00208     quat[0] = ((*this)[2][1] - (*this)[1][2]) * s;
00209     quat[1] = ((*this)[0][2] - (*this)[2][0]) * s;
00210     quat[2] = ((*this)[1][0] - (*this)[0][1]) * s;
00211     //cerr << "trace > 0"<<endl;
00212   } else {
00213     //cerr << "trace <= 0"<<endl;
00214     if((*this)[1][1] > (*this)[0][0])
00215       i = 1;
00216     else
00217       i = 0;
00218
00219     if((*this)[2][2] > (*this)[i][i])
00220       i = 2;
00221
00222     j = nxt[i];
00223     k = nxt[j];
00224
00225     s = sqrt((*this)[i][i] - ((*this)[j][j] + (*this)[k][k]) + 1.0 );
00226
00227     qt[i] = s * 0.5;
00228     s     = 0.5 / s;
00229
00230     quat[3] = ((*this)[k][j] - (*this)[j][k] ) * s;
00231
00232     qt[j] = ((*this)[i][j] + (*this)[j][i]) * s;
00233     qt[k] = ((*this)[i][k] + (*this)[k][i]) * s;
00234
00235     quat[0] = qt[0];
00236     quat[1] = qt[1];
00237     quat[2] = qt[2];
00238   }
00239
00240   if(quat[3] > 1.0 || quat[3] < -1.0){
00241     if (fabs(quat[3]-1.0)> MAX_QUATERNION_COS_ERROR){
00242       BIASERR(" |quat[3]-1.0| ("<< fabs(quat[3]-1.0) <<") >> 0.0 !");
00243       res=-1;
00244     }
00245     if(quat[3] > 1.0){
00246       quat[3] = 1.0;
00247     } else {
00248       quat[3] = -1.0;
00249     }
00250   }
00251   return res;
00252 }
00253
00254 int
00255 RMatrixBase::GetRotationAxisAngle(Vector3<ROTATION_MATRIX_TYPE>& Axis,
00256                                   ROTATION_MATRIX_TYPE& Angle) const
00257 {
00258   // nicked from OpenSG
00259   Quaternion<ROTATION_MATRIX_TYPE> quat;
00260   if (GetQuaternion(quat)!=0)
00261     return -1;
00262   return quat.GetAxisAngle(Axis, Angle);
00263 }
00264
00265 int RMatrixBase::GetRotationAxisAngle(Vector3<ROTATION_MATRIX_TYPE>& w) const
00266 {
00267   double angle;
00268   // nicked from above
00269   Quaternion<ROTATION_MATRIX_TYPE> quat;
00270   if (GetQuaternion(quat)!=0)     return -1;
00271   quat.GetAxisAngle(w , angle);
00272   w.Normalize();
00273   //get a three-parameter representation by encoding the angle into the axis:
00274   w *= angle;
00275   return 0;
00276 }
00277
00278
00279 int
00280 RMatrixBase::GetRotationAnglesXYZ(double& PhiX, double& PhiY, double& PhiZ)
00281 {
00282   int res=0;
00283   PhiY = asin((*this)[0][2]);
00284   PhiX = atan(-(*this)[1][2]/(*this)[2][2]);
00285   PhiZ = atan(-(*this)[0][1]/(*this)[0][0]);
00286 // #ifdef BIAS_DEBUG
00287 //   RMatrixBase R;
00288 //   R.SetXYZ(PhiX, PhiY, PhiZ);
00289 //   if (R == (*this))
00290 //     res = 0;
00291 //   else
00292 //     res = -1;
00293 // #endif
00294   return res;
00295 }
00296
00297
00298 int
00299 RMatrixBase::GetRotationAnglesZYX(double& PhiX, double& PhiY, double& PhiZ)
00300 {
00301   int res=0;
00302   PhiY = asin(-(*this)[2][0]);
00303   PhiX = atan((*this)[2][1]/(*this)[2][2]);
00304   PhiZ = atan((*this)[1][0]/(*this)[0][0]);
00305 // #ifdef BIAS_DEBUG
00306 //   RMatrixBase R;
00307 //   R.SetZYX(PhiX, PhiY, PhiZ);
00308 //   if (R == (*this))
00309 //     res = 0;
00310 //   else
00311 //     res = -1;
00312 // #endif
00313   return res;
00314 }
00315
00316 RMatrixBase& RMatrixBase::operator= (const RMatrixBase &mat)
00317 {
00318   Matrix<ROTATION_MATRIX_TYPE>::operator=(mat);
00319   return *this;
00320 }
00321
00322 bool BIAS::operator==(const RMatrixBase& left, const RMatrixBase& right)
00323 {
00324   bool res=true;
00325   for (register int i=0; i<9; i++){
00326     if (fabs(left.GetData()[i]-right.GetData()[i])>DBL_EPSILON){
00327       res=false;
00328       break;
00329     }
00330   }
00331   return res;
00332 }
00333
00334
00335
00336 int RMatrixBase::SetFromQuaternion(const Quaternion<ROTATION_MATRIX_TYPE> &qu)
00337 {
00338   Quaternion<ROTATION_MATRIX_TYPE> q = qu; // de-const
00339   q.Normalize();
00340   // nicked from OpenSG
00341   (*this)[0][0] = 1.0 - 2.0 * (q[1] * q[1] +
00342                          q[2] * q[2]);
00343   (*this)[1][0] =       2.0 * (q[0] * q[1] +
00344                          q[2] * q[3]);
00345   (*this)[2][0] =       2.0 * (q[2] * q[0] -
00346                          q[1] * q[3]);
00347
00348   (*this)[0][1] =       2.0 * (q[0] * q[1] -
00349                          q[2] * q[3]);
00350   (*this)[1][1] = 1.0 - 2.0 * (q[2] * q[2] +
00351                          q[0] * q[0]);
00352   (*this)[2][1] =       2.0 * (q[1] * q[2] +
00353                          q[0] * q[3]);
00354
00355   (*this)[0][2] =       2.0 * (q[2] * q[0] +
00356                          q[1] * q[3]);
00357   (*this)[1][2] =       2.0 * (q[1] * q[2] -
00358                          q[0] * q[3]);
00359   (*this)[2][2] = 1.0 - 2.0 * (q[1] * q[1] +
00360                          q[0] * q[0]);
00361   return 0;
00362 }
00363
00364
00365 int RMatrixBase::Set(Quaternion<ROTATION_MATRIX_TYPE> &q)
00366 {
00367
00368   BIASERR("RMatrixBase::Set(Quaternion) fixed (tansposed compared to old)"
00369       " Use SetFromQuaternion(), now");
00370   BIASABORT;
00371   return -1;
00372 }
00373
00374
00375 void  RMatrixBase::SetFromOrthogonalBasis(
00376   const BIAS::Vector3<ROTATION_MATRIX_TYPE> & xxx,
00377   const BIAS::Vector3<ROTATION_MATRIX_TYPE> & yyy,
00378   const BIAS::Vector3<ROTATION_MATRIX_TYPE> & zzz )
00379 {
00380   SetFromRowVectors( xxx.GetNormalized(),
00381                      yyy.GetNormalized(),
00382                      zzz.GetNormalized() );
00383 }
00384
00385
00386 // JW
00387 void RMatrixBase::SetFromHV(const BIAS::Vector3<ROTATION_MATRIX_TYPE> & xxx,
00388                 const BIAS::Vector3<ROTATION_MATRIX_TYPE> & yyy )
00389 {
00390   // TODO, FIXME:
00391   /// \todo check, wether xxx, yyy are linear independant.
00392
00393   // normalize
00394   const BIAS::Vector3<ROTATION_MATRIX_TYPE> x0 ( xxx.GetNormalized() );
00395
00396   // compute base z in rhs:
00397   const BIAS::Vector3<ROTATION_MATRIX_TYPE>
00398     z0 ( xxx.CrossProduct(yyy).GetNormalized() );
00399
00400   // compute y base orthogonal in rhs
00401   const BIAS::Vector3<ROTATION_MATRIX_TYPE>
00402     y0 ( z0.CrossProduct(x0).GetNormalized() );
00403
00404   (*this).SetFromColumnVectors(x0,  y0,  z0 );
00405 }
00406
00407 int RMatrixBase::SetFromOriUpGL(BIAS::Vector3<ROTATION_MATRIX_TYPE> ori,
00408                                 BIAS::Vector3<ROTATION_MATRIX_TYPE> up)
00409 {
00410   //calculate orthogonal vectors
00411   BIAS::Vector3<double> right;
00412   ori.Normalize();
00413   ori.CrossProduct(up,right);
00414   right.Normalize();
00415   right.CrossProduct(ori,up);
00416   up.Normalize();
00417   ori*=-1.0; // we need the right handed system
00418   SetFromColumnVectors(right,up,ori);
00419
00420   return 0;
00421 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/RMatrixBase.hh Source File

Base » Geometry

RMatrixBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __RMatrixBase_hh__
00027 #define __RMatrixBase_hh__
00028 #include "bias_config.h"
00029
00030 #include <Base/Math/Vector3.hh>
00031 #include <Base/Geometry/Quaternion.hh>
00032 #include <Base/Math/Matrix3x3.hh>
00033 #include <Base/Debug/Debug.hh>
00034 #include <float.h>
00035
00036 namespace BIAS {
00037
00038 #define ROTATION_MATRIX_TYPE double
00039
00040 #define ROTATION_MATRIX_EPSILON DBL_EPSILON
00041
00042   template<class T> class Quaternion;
00043 /** @class RMatrixBase
00044     @ingroup g_geometry
00045     @brief 3D rotation matrix
00046
00047     @author frahm, woelk **/
00048   class BIASGeometryBase_EXPORT RMatrixBase : public Matrix3x3<ROTATION_MATRIX_TYPE>
00049   {
00050   public:
00051     inline RMatrixBase()
00052       : Matrix3x3<ROTATION_MATRIX_TYPE>() {};
00053
00054     /** constructor setting identity or zero
00055         @brief author koeser **/
00056     explicit RMatrixBase(const MatrixInitType& i) :
00057       Matrix3x3<ROTATION_MATRIX_TYPE>(i) {};
00058
00059     /// copy constructor
00060     RMatrixBase(const RMatrixBase& r);
00061
00062     /// initialization from rotation axis w and angle phi (Rodriguez)
00063     RMatrixBase(Vector3<ROTATION_MATRIX_TYPE> w, ROTATION_MATRIX_TYPE phi);
00064
00065     explicit RMatrixBase(const TNT::Matrix<ROTATION_MATRIX_TYPE>& r);
00066
00067     virtual ~RMatrixBase();
00068
00069     inline RMatrixBase(const Matrix3x3<ROTATION_MATRIX_TYPE>& mat)
00070       : Matrix3x3<ROTATION_MATRIX_TYPE>(mat) {};
00071
00072     /** angles in rad,
00073         either: order 1. z, 2. y, 3. x  and  fixed  axes
00074             or: order 1. x, 2. y, 3. z  and  moving axes
00075         angles are measured in mathematical sense (anticlockwise), i.e.
00076           Set(x, 0, 0) results in the following matrix
00077             | 1  0        0      |
00078             | 0  cos(x)  -sin(x) |
00079             | 0  sin(x)   cos(x) |
00080
00081         (*this) = Rx*Ry*Rz =
00082
00083         |  c(y)c(z)               -c(y)s(z)                s(y)     |
00084         |  c(z)s(x)s(y)+c(x)s(z)   c(x)c(z)-s(x)s(y)s(z)  -c(y)s(x) |
00085         | -c(x)c(z)s(y)+s(x)s(z)   c(z)s(x)+c(x)s(y)s(z)   c(x)x(y) |
00086
00087         with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ
00088
00089         @author frahm ,woelk */
00090     void SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY,
00091                 ROTATION_MATRIX_TYPE PhiZ);
00092     inline void SetXYZ(Vector3<ROTATION_MATRIX_TYPE>& r)
00093     { SetXYZ(r[0], r[1], r[2]); }
00094
00095     /** angles in rad,
00096         either: order 1. z, 2. y, 3. x  and  moving axes
00097             or: order 1. x, 2. y, 3. z  and  fixed  axes
00098         angles are measured in mathematical sense (anticlockwise), i.e.
00099           Set(x, 0, 0) results in the following matrix
00100             | 1  0        0      |
00101             | 0  cos(x)  -sin(x) |
00102             | 0  sin(x)   cos(x) |
00103
00104         (*this) = Rz*Ry*Rx =
00105
00106         |  c(y)c(z)  s(x)s(y)c(z)-c(x)s(z)  c(x)s(y)c(z)+s(x)s(z) |
00107         |  c(y)s(z)  s(x)s(y)s(z)+c(x)c(z)  c(x)s(y)s(z)-s(x)s(z) |
00108         | -s(y)      s(x)c(y)               c(x)c(y)              |
00109
00110         with s(g) = sin(g), c(g) = cos(g), x = PhiX, y = PhiY and z = PhiZ
00111
00112         @author frahm ,woelk */
00113     void SetZYX(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY,
00114                 ROTATION_MATRIX_TYPE PhiZ);
00115     inline void SetZYX(Vector3<ROTATION_MATRIX_TYPE>& r)
00116     { SetZYX(r[0], r[1], r[2]); }
00117
00118     /** initialize from vector and angle
00119         remark: Axis vector w must be an unit vector (||w||==1, within epsilon
00120         environment of magnitude 1e-6).
00121         If compiled with BIAS_DEBUG, this condition will
00122         be checked and BIASABORT is called on failure. - cbuck
00123         @author evers */
00124     void Set(Vector3<ROTATION_MATRIX_TYPE> w, ROTATION_MATRIX_TYPE phi);
00125
00126
00127     /** initialize from vector * angle (axis _times_ angle !)
00128         @author evers */
00129     void SetFromAxisAngle(Vector3<ROTATION_MATRIX_TYPE> w);
00130
00131
00132     /* set rotation matrix from an orthogonalbasis given in world coordinate
00133        system. (wcs).
00134        As R' is expressing the transformation from wcs to ics,
00135        R is ics to wcs and hereby represent the ics base vectors expressed in
00136        wcs
00137        the *rows* of R because the tranformation is teh scalar product.
00138
00139        Assume xx,yy,zz are right hand orthogonal (rhs).
00140        E.g. the orthogonal image coord system base vectors expressed in world
00141        coordinates (wcs).
00142        (inverse doesn't make sense because base would be Id., then).
00143        Normal vectors of length==1 are computed.
00144        // TODO warning if (xxx,yyy,zzz) are not orthogonalbasis.
00145        @author JW 09/2003
00146        */
00147     void SetFromOrthogonalBasis(const BIAS::Vector3<ROTATION_MATRIX_TYPE> &xxx,
00148                                 const BIAS::Vector3<ROTATION_MATRIX_TYPE> &yyy,
00149                                 const BIAS::Vector3<ROTATION_MATRIX_TYPE> &zzz);
00150
00151     /** set rotation matrix from two vectors.
00152         form an orthonormalbasis.
00153         xh represent the first base vector and is left unchanged.
00154         You can think of this routine as compute R from an image plane given
00155         by two (usually orthogonal) base vectors.
00156         if the given base vecctors are not orthogonal xh is kept and yv is
00157         orthogonalized appropriately.
00158         @author Jan Woetzel
00159        */
00160     void SetFromHV(const BIAS::Vector3<ROTATION_MATRIX_TYPE> & xh,
00161                                 const BIAS::Vector3<ROTATION_MATRIX_TYPE> &vy);
00162
00163     /** calculates the quaternion from a rotation matrix
00164         @author woelk 12 2003 */
00165     int GetQuaternion(Quaternion<ROTATION_MATRIX_TYPE> & quat) const ;
00166
00167     /** Set RMatrix from a quternion
00168         @author Daniel Grest, June2003
00169     */
00170     int SetFromQuaternion(const Quaternion<ROTATION_MATRIX_TYPE> &q);
00171
00172     /** Set Rotation matrix from orientation and up vector openGL conform,
00173         similar to gluLookAt(). <br>
00174         openGL like means: if ori is (0,0,-1) and up:(0,1,0) the resulting
00175         matrix is the identity
00176         @author grest, Dec. 2005
00177     */
00178     int SetFromOriUpGL(BIAS::Vector3<ROTATION_MATRIX_TYPE> ori,
00179                        BIAS::Vector3<ROTATION_MATRIX_TYPE> up);
00180
00181     /** old Set(Quat) function, which now reports an error
00182     ( to find all places calling it and remove deprecated Transpose() )
00183     @author evers
00184      */
00185     int Set(Quaternion<ROTATION_MATRIX_TYPE> &q);
00186
00187     /** calculates an angle and a axis for the given rotation
00188         angle is returned in rad
00189         @author woelk 12 2003 */
00190     int GetRotationAxisAngle(Vector3<ROTATION_MATRIX_TYPE>& Axis,
00191                              ROTATION_MATRIX_TYPE& Angle) const;
00192
00193     /** calculates a angle * axis for the given rotation
00194         @author evers  */
00195     int GetRotationAxisAngle(Vector3<ROTATION_MATRIX_TYPE>& w) const;
00196
00197
00198
00199     /** not unique, has singularities at +- pi/2
00200         assumes (*this) = Rx * Ry * Rz,   i.e.
00201         either:  order 1. x, 2. y, 3. z  and  moving axes
00202         or:      order 1. z, 2. y, 3. x  and  fixed  axes
00203         @author woelk 01 2003 */
00204     int GetRotationAnglesXYZ(double& PhiX, double& PhiY, double& PhiZ);
00205
00206     inline int GetRotationAnglesXYZ(Vector3<ROTATION_MATRIX_TYPE>& r)
00207     { return GetRotationAnglesXYZ(r[0], r[1], r[2]); }
00208
00209      /** not unique, has singularities at +- pi/2
00210         assumes (*this) = Rz * Ry * Rx,   i.e.
00211         either:  order 1. x, 2. y, 3. z  and  fixed  axes
00212         or:      order 1. z, 2. y, 3. x  and  moving axes
00213         @author woelk 01 2003 */
00214     int GetRotationAnglesZYX(double& PhiX, double& PhiY, double& PhiZ);
00215
00216     inline int GetRotationAnglesZYX(Vector3<ROTATION_MATRIX_TYPE>& r)
00217     { return GetRotationAnglesZYX(r[0], r[1], r[2]); }
00218
00219     RMatrixBase& operator= (const RMatrixBase &mat);
00220
00221     // DLL HACK (JW)
00222     friend bool BIASGeometryBase_EXPORT
00223       operator==(const RMatrixBase& left, const RMatrixBase& right);
00224
00225   }; // class
00226 } // namespace BIAS
00227
00228
00229 #endif // __RMatrixBase_hh__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ROI.cpp Source File

Base » Image

ROI.cpp

Go to the documentation of this file.
00001 /*
00002    This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004    Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005    Multimediale Systeme der Informationsverarbeitung
00006    Institut fuer Informatik
00007    Christian-Albrechts-Universitaet Kiel
00008
00009
00010    BIAS is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU Lesser General Public License as published by
00012    the Free Software Foundation; either version 2.1 of the License, or
00013    (at your option) any later version.
00014
00015    BIAS is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU Lesser General Public License for more details.
00019
00020    You should have received a copy of the GNU Lesser General Public License
00021    along with BIAS; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ROI.hh"
00026
00027 #include <Base/Debug/Error.hh>
00028 #include "ImageBase.hh"
00029
00030 #include <algorithm>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 #define ROI_IDENTIFIER "MIP-ROI"
00036 #define ROI_IDENTIFIER_LENGTH 7
00037
00038
00039 //////////////////////////////////////////////////////////////////////
00040 // operator<<
00041 /////////////////////////////////////////////////////////////////////
00042
00043 ostream& BIAS::operator<<(ostream& os, const Position& pos)
00044 {
00045   os << "["<<pos.x<<", "<<pos.y<<"]";
00046   return os;
00047 }
00048
00049 ostream& BIAS::operator<<(ostream& os, const ROI& roi)
00050 {
00051   os << "ROI ("<<roi.UpperLeftX_<<", "<<roi.UpperLeftY_<<")  <-->  ("
00052      <<roi.LowerRightX_<<", "<<roi.LowerRightY_<<")";
00053   os << "\tMaskValid = "<<boolalpha<<roi.MaskValid_;
00054   os << "\tVectorValid = "<<boolalpha<<roi.VectorValid_;
00055   if (roi.VectorValid_){
00056     vector<Position>::const_iterator it;
00057     for (it=roi.Vector_.begin(); it!=roi.Vector_.end(); it++)
00058       os << " "<<*it;
00059   }
00060   return os;
00061 }
00062
00063
00064 //////////////////////////////////////////////////////////////////////
00065 // class
00066 /////////////////////////////////////////////////////////////////////
00067
00068 const int ROI::Version_ =  ROI_VERSION_NUMBER;
00069
00070
00071 ROI::~ROI()
00072 {
00073   Release();
00074 }
00075
00076
00077 ROI::ROI()
00078   : MaskData_(NULL),
00079     MaskDataArray_(NULL)
00080 {
00081   VectorValid_=false;
00082   MaskWidth_=MaskHeight_=0;
00083   UnsetROI();
00084 }
00085
00086 ROI::ROI(const ROI& roi): MaskData_(NULL), MaskDataArray_(NULL) {
00087   MaskWidth_=MaskHeight_=0;
00088   operator=(roi);
00089 }
00090
00091 void ROI::Release()
00092 {
00093   if (MaskData_ != NULL) {
00094     delete [] MaskData_;
00095     MaskData_=NULL;
00096   }
00097   if (MaskDataArray_ != NULL ) {
00098     delete [] MaskDataArray_;
00099     MaskDataArray_=NULL;
00100   }
00101   MaskWidth_=0;
00102   MaskHeight_=0;
00103   Vector_.clear();
00104   MaskValid_=false;
00105   VectorValid_=false;
00106   UpperLeftX_=UpperLeftY_=0;
00107   LowerRightX_=MaskWidth_;
00108   LowerRightY_=MaskHeight_;
00109 }
00110
00111 void ROI::UnsetROI()
00112 {
00113   UpperLeftX_=UpperLeftY_=0;
00114   LowerRightX_=MaskWidth_;
00115   LowerRightY_=MaskHeight_;
00116   MaskValid_=VectorValid_=false;
00117 }
00118
00119 void ROI::Resize(unsigned w, unsigned h)
00120 {
00121
00122   if (MaskWidth_!=w || MaskHeight_!=h){
00123     Release();
00124
00125     BIASASSERT(MaskData_ == NULL);
00126     BIASASSERT(MaskDataArray_ == NULL);
00127     MaskData_=new MASK_TYPE[w*h];
00128     MaskDataArray_=new MASK_TYPE*[h];
00129
00130     for (unsigned i=0; i<h; i++)
00131       MaskDataArray_[i] = &(MaskData_[i*w]);
00132
00133     MaskWidth_  = w;
00134     MaskHeight_ = h;
00135   }
00136 }
00137
00138 int ROI::SetCorners(unsigned UpperLeftX, unsigned UpperLeftY,
00139                     unsigned LowerRightX, unsigned LowerRightY)
00140 {
00141   int res=0;
00142 #ifdef BIAS_DEBUG
00143   if (UpperLeftX < 0 || UpperLeftX > MaskWidth_) {
00144     BIASERR( "UpperLeftX "<<UpperLeftX<<" is out of image range "
00145          <<MaskWidth_);
00146     //BIASASSERT(false);
00147     BIASABORT;
00148   }
00149   if (UpperLeftY < 0 || UpperLeftY > MaskHeight_) {
00150     BIASERR("UpperLeftY "<<UpperLeftY<<" is out of image range "
00151             <<MaskHeight_);
00152     //BIASASSERT(false);
00153     BIASABORT;
00154   }
00155   if (LowerRightX < 0 || LowerRightX > MaskWidth_ ) {
00156     BIASERR("LowerRightX "<<LowerRightX<<" is out of image range "
00157             <<MaskWidth_);
00158     //BIASASSERT(false);
00159     BIASABORT;
00160   }
00161   if (LowerRightY < 0 || LowerRightY > MaskHeight_ ) {
00162     BIASERR("LowerRightY "<<LowerRightY<<" is out of image range "
00163             <<MaskHeight_);
00164     //BIASASSERT(false);
00165     BIASABORT;
00166   }
00167
00168   if (LowerRightX < UpperLeftX) {
00169     unsigned int temp = UpperLeftX;
00170     UpperLeftX = LowerRightX;
00171     LowerRightX = temp;
00172     BIASERR("WARNING: You swapped the x coordinates of the upper left and the"
00173             <<" lower right corner. It's been re-swapped!");
00174     //BIASASSERT(false);
00175     BIASABORT;
00176   }
00177
00178   if (LowerRightY < UpperLeftY) {
00179     unsigned int temp = UpperLeftY;
00180     UpperLeftY = LowerRightY;
00181     LowerRightY = temp;
00182     BIASERR("WARNING: You swapped the y coordinates of the upper left and the"
00183             <<" lower right corner. It's been re-swapped!");
00184     //BIASASSERT(false);
00185     BIASABORT;
00186   }
00187 #endif
00188
00189   UpperLeftX_  = UpperLeftX;
00190   LowerRightX_ = LowerRightX;
00191   UpperLeftY_  = UpperLeftY;
00192   LowerRightY_ = LowerRightY;
00193
00194   return res;
00195 }
00196
00197
00198
00199 int ROI::GetMaskImage(ImageBase& im) const
00200 {
00201   BIASASSERT(im.GetStorageType()==ImageBase::ST_invalid ||
00202          im.GetStorageType()==ImageBase::ST_unsignedchar);
00203   if (im.GetWidth()!=MaskWidth_ || im.GetHeight()!=MaskHeight_ ||
00204       im.GetChannelCount()!=1)
00205     im.Release();
00206   if (im.IsEmpty())
00207     im.Init(MaskWidth_, MaskHeight_, 1, ImageBase::ST_unsignedchar);
00208
00209   if (MaskValid_){
00210     memcpy(im.GetImageData(), MaskData_, im.GetPixelCount()*sizeof(MASK_TYPE));
00211     /*
00212       bool *p, *end;
00213       unsigned char *ucp=(unsigned char)im.GetImageData();
00214       p=Mask_;
00215       end=Mask_+(MaskWidth_*MaskHeight_);
00216
00217       while (p<end){
00218       *ucp=(*p):((unsigned char)255):((unsigned char)0);
00219       ucp++;
00220       p++;
00221       }
00222     */
00223   }
00224   return (MaskValid_)?(0):(-1);
00225 }
00226
00227 int ROI::SetMaskImage(const ImageBase& im)
00228 {
00229   int res=0;
00230   if (im.GetWidth()==MaskWidth_ && im.GetHeight()==MaskHeight_){
00231     MaskValid_=true;
00232     VectorValid_=false;
00233     if (im.GetStorageType()==ImageBase::ST_unsignedchar){
00234       memcpy(MaskData_, im.GetImageData(),
00235          im.GetPixelCount()*sizeof(MASK_TYPE));
00236     } else {
00237       BIASERR("unfinished");
00238       res=-1;
00239     }
00240   } else {
00241     BIASERR("wrong image size "<<im.GetWidth()<<"x"<<im.GetHeight()
00242             <<"    expected: "<<MaskWidth_<<"x"<<MaskHeight_<<endl);
00243     res = -2;
00244   }
00245   return res;
00246 }
00247
00248
00249 void ROI::SetVector(std::vector<Position>& pos)
00250 {
00251   VectorValid_=true;
00252   MaskValid_=false;
00253   Vector_=pos;
00254   sort(Vector_.begin(), Vector_.end());
00255 }
00256
00257 bool ROI::GetVector(std::vector<Position>& vec) const
00258 {
00259   vec = Vector_;
00260   return VectorValid_;
00261 }
00262
00263 ROI& ROI::operator=(const ROI& roi) {
00264   // this sets correct sizes and also array pointers
00265   Resize(roi.GetMaskWidth(), roi.GetMaskHeight());
00266   MaskValid_ = roi.MaskValid_;
00267   VectorValid_ = roi.VectorValid_;
00268   UpperLeftX_ = roi.UpperLeftX_;
00269   UpperLeftY_ = roi.UpperLeftY_;
00270   LowerRightX_ = roi.LowerRightX_;
00271   LowerRightY_ = roi.LowerRightY_;
00272   if (roi.MaskValid_) {
00273     memcpy(MaskData_, roi.MaskData_,
00274            MaskWidth_*MaskHeight_*sizeof(MASK_TYPE));
00275   }
00276   Vector_ = roi.Vector_;
00277
00278   return *this;
00279 }
00280
00281 bool ROI::SameSize(const ROI& roi) const
00282 {
00283   return ((LowerRightX_-UpperLeftX_)-(roi.LowerRightX_-roi.UpperLeftX_))==0 &&
00284     ((LowerRightY_-UpperLeftY_)-(roi.LowerRightY_-roi.UpperLeftY_))==0;
00285 }
00286
00287 int ROI::WriteBinary(std::ostream& os) const
00288 {
00289   if (!os)
00290     return -1;
00291
00292   // 'header'
00293   os.write(ROI_IDENTIFIER, ROI_IDENTIFIER_LENGTH);
00294   os.write(reinterpret_cast<const char*>(&Version_), sizeof(int));
00295   // rectangular roi
00296   os.write(reinterpret_cast<const char*>(&UpperLeftX_), sizeof(unsigned));
00297   os.write(reinterpret_cast<const char*>(&UpperLeftY_), sizeof(unsigned));
00298   os.write(reinterpret_cast<const char*>(&LowerRightX_), sizeof(unsigned));
00299   os.write(reinterpret_cast<const char*>(&LowerRightY_), sizeof(unsigned));
00300   // size of mask image
00301   os.write(reinterpret_cast<const char*>(&MaskWidth_), sizeof(unsigned));
00302   os.write(reinterpret_cast<const char*>(&MaskHeight_), sizeof(unsigned));
00303   // size of vector
00304   unsigned length = Vector_.size();
00305   os.write(reinterpret_cast<const char*>(&length), sizeof(unsigned));
00306   // validity flags
00307   os.write(reinterpret_cast<const char*>(&MaskValid_), sizeof(bool));
00308   os.write(reinterpret_cast<const char*>(&VectorValid_), sizeof(bool));
00309   BIASCDOUT(D_ROI_IO,  "wrote MaskValid "<<boolalpha<<MaskValid_
00310         << "  VectorValid "<<boolalpha<<VectorValid_<<endl);
00311   // mask image
00312   if (MaskValid_)
00313     {
00314       BIASASSERT(MaskData_ !=NULL );
00315
00316       BIASCDOUT(D_ROI_IO,  "mdp: "<< (void*)MaskData_ << endl);
00317       BIASCDOUT(D_ROI_IO,  "md: " << boolalpha
00318         <<MaskData_[MaskWidth_*MaskHeight_-1] << endl);
00319       BIASCDOUT(D_ROI_IO,  "mda: " <<boolalpha
00320         <<MaskDataArray_[MaskHeight_-1][MaskWidth_-1]<<endl);
00321       // TODO: uninitialized values.
00322       os.write(reinterpret_cast<const char*>(MaskData_),
00323            MaskWidth_*MaskHeight_*sizeof(MASK_TYPE));
00324     };
00325   // position vector
00326   if (VectorValid_)
00327     {
00328       vector<Position>::const_iterator it;
00329       for (it=Vector_.begin(); it!=Vector_.end(); it++){
00330     BIASCDOUT(D_ROI_IO,  "writing " << *it << endl);
00331     os.write(reinterpret_cast<const char*>(&(it->x)), sizeof(unsigned));
00332     os.write(reinterpret_cast<const char*>(&(it->y)), sizeof(unsigned));
00333       }
00334     }
00335
00336   return (os.good())?0:-2;
00337 }
00338
00339
00340 int ROI::ReadBinary(std::istream& is)
00341 {
00342   //SetDebugLevel(D_ROI_IO);
00343   int res = 0;
00344   char identifier[ROI_IDENTIFIER_LENGTH];
00345   int Version;
00346   unsigned length;
00347   vector<Position>::iterator it;
00348
00349   // 'header'
00350   is.read(identifier, ROI_IDENTIFIER_LENGTH);
00351   if (strncmp(identifier, ROI_IDENTIFIER, ROI_IDENTIFIER_LENGTH)!=0){
00352     BIASERR("invalid ROI identifier "<<identifier<<endl);
00353     return -1;
00354   }
00355   is.read(reinterpret_cast<char*>(&Version), sizeof(int));
00356
00357   switch (Version){
00358   case 100:
00359     // rectangular roi
00360     is.read(reinterpret_cast<char*>(&UpperLeftX_), sizeof(unsigned));
00361     is.read(reinterpret_cast<char*>(&UpperLeftY_), sizeof(unsigned));
00362     is.read(reinterpret_cast<char*>(&LowerRightX_), sizeof(unsigned));
00363     is.read(reinterpret_cast<char*>(&LowerRightY_), sizeof(unsigned));
00364     // size of mask image
00365     is.read(reinterpret_cast<char*>(&MaskWidth_), sizeof(unsigned));
00366     is.read(reinterpret_cast<char*>(&MaskHeight_), sizeof(unsigned));
00367     Resize(MaskWidth_, MaskHeight_);
00368     // size of vector
00369     is.read(reinterpret_cast<char*>(&length), sizeof(unsigned));
00370     Vector_.resize(length);
00371     // validity flags
00372     is.read(reinterpret_cast<char*>(&MaskValid_), sizeof(bool));
00373     is.read(reinterpret_cast<char*>(&VectorValid_), sizeof(bool));
00374     BIASCDOUT(D_ROI_IO,  "read MaskValid "<<boolalpha<<MaskValid_
00375           << "  VectorValid "<<boolalpha<<VectorValid_<<endl);
00376     // mask image
00377     if (MaskValid_){
00378       BIASCDOUT(D_ROI_IO, "reading mask image of size "
00379         <<MaskWidth_<<"x"<<MaskHeight_<<endl);
00380       is.read(reinterpret_cast<char*>(MaskData_),
00381           MaskWidth_*MaskHeight_*sizeof(MASK_TYPE));
00382     }
00383     // position vector
00384     if (VectorValid_){
00385       BIASCDOUT(D_ROI_IO, "reading vector of length "<<Vector_.size()<<endl);
00386       for (it=Vector_.begin(); it!=Vector_.end(); it++){
00387     is.read(reinterpret_cast<char*>(&(it->x)), sizeof(unsigned));
00388     is.read(reinterpret_cast<char*>(&(it->y)), sizeof(unsigned));
00389     BIASCDOUT(D_ROI_IO,  "read "<<*it<<endl);
00390       }
00391     }
00392     res = (is.good())?0:-3;
00393     break;
00394   default:
00395     BIASERR("unknown ROI version");
00396     res = -2;
00397     break;
00398   }
00399   return res;
00400 }
00401
00402 int ROI::Mask2Vector()
00403 {
00404   register unsigned y=0, x=0;
00405   Vector_.clear();
00406   Vector_.reserve(MaskWidth_*MaskHeight_);
00407   for (y=0; y<MaskHeight_; y++){
00408     for (x=0; x<MaskWidth_; x++){
00409       if (GetMaskDataArray()[y][x])
00410     Vector_.push_back(Position(x, y));
00411     }
00412   }
00413
00414   if (MaskValid())
00415     SetVectorValidFlag(true);
00416   return (MaskValid_)?0:-1;
00417 }
00418
00419 int ROI::Vector2Mask()
00420 {
00421   memset(GetMaskData(), 0, GetMaskWidth()*GetMaskHeight()*sizeof(MASK_TYPE));
00422
00423   vector<Position>::iterator it;
00424
00425   for (it=Vector_.begin(); it!=Vector_.end(); it++){
00426 #ifdef BIAS_DEBUG
00427     if (!(it->y >= 0 && it->x >= 0 &&
00428       it->y < GetMaskHeight() && it->x < GetMaskWidth() ))
00429       BIASERR((*it)<<"  "<<MaskWidth_<<"x"<<MaskHeight_<<endl);
00430     BIASASSERT(it->y >= 0 && it->x >= 0 &&
00431            it->y < GetMaskHeight() && it->x < GetMaskWidth() );
00432 #endif
00433     GetMaskDataArray()[it->y][it->x]=UCHAR_MAX;
00434   }
00435
00436   if (VectorValid())
00437     SetMaskValidFlag(true);
00438   return (VectorValid_)?0:-1;
00439 }
00440
00441 int ROI::Vector2Corners()
00442 {
00443   if (VectorValid_)
00444     SetCorners(Vector_.begin()->x, Vector_.begin()->y,
00445            Vector_.rbegin()->x, Vector_.rbegin()->y);
00446   return (VectorValid_)?0:-1;
00447 }
00448
00449 int ROI::Mask2Corners()
00450 {
00451   BIASERR("unfinished");
00452   return (MaskValid_)?0:-1;
00453 }
00454
00455 void ROI::Corners2Mask()
00456 {
00457   BIASERR("unfinished");
00458   SetMaskValidFlag(true);
00459 }
00460
00461 void ROI::Corners2Vector()
00462 {
00463   BIASERR("unfinished");
00464   SetVectorValidFlag(true);
00465 }
00466
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ROI.hh Source File

Base » Image

ROI.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __ROI_hh__
00026 #define __ROI_hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Debug/Error.hh>
00032 #include <iostream>
00033 #include <vector>
00034
00035
00036 #define MASK_TYPE unsigned char
00037 #define ROI_VERSION_NUMBER 100
00038
00039 #define D_ROI_IO 0x00000001
00040
00041 namespace BIAS {
00042
00043     // forward declaration to avoid mutual inclusion
00044     class ImageBase;
00045
00046     /** @class Position
00047     @ingroup g_image_base
00048     @brief store positions in image
00049
00050     @author woelk 07/2005 */
00051     class BIASImageBase_EXPORT Position
00052     {
00053     public:
00054         Position() : x(0), y(0) {};
00055         Position(unsigned xx, unsigned yy) : x(xx), y(yy) {};
00056         Position(const Position &pos) { *this = pos; }
00057
00058         ~Position() {};
00059
00060         /// assignment operator
00061         Position& operator=(const Position& p) { x=p.x; y=p.y; return *this; }
00062
00063         /// comparison, needed for sorting
00064         bool operator<(const Position& p) const
00065         { return (y==p.y)?(x<p.x):(y<p.y); }
00066
00067         friend BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const Position &pos);
00068
00069         /// member variables
00070         unsigned x, y;
00071     };
00072
00073     /** @class ROI
00074     @ingroup g_image_base
00075     @brief class for handling different region of interest (ROI)
00076     representations...
00077
00078     The ROI class usually is member of an ImageBase and is stored together
00079     with the ImageBase. If an ImageBase is written to disk in the binary mip
00080     format, the ROI member is also automatically written in the same file.
00081
00082     Flags indication the validity of the single representations exist within
00083     the ROI class.
00084
00085     Right now, three different representations are possible:
00086     - \b Corner representation:
00087     The corner representation represents a rectangular ROI. The corner
00088     representation holds upper left and lower right corners defining a
00089     rectangular roi region. The upper left corner is included in the roi
00090     while the lower right corner is excluded from the roi. When ROI belongs
00091     to image and no roi is set, upper left corner is (0, 0) and lower right
00092     corner is given by (width, height). The corner representation is always
00093     valid.
00094     - \b Map representations:
00095     If the ROI belongs to an ImageBase, the MapData() and MapDataArray()
00096     must be of the same size as the Image. This is usually nesured by the
00097     ImageBase.Init() functions. The MapData() is of Type unsigned char.
00098     A value of 0 mneans not belonging to ROI, while any other value means
00099     belonging to ROI.
00100     - \b Vector representation:
00101     Every position in the vector belongs to roi, while every position not
00102     in the vector does not belong to the ROI. The VectorValid() flag
00103     indicates the validity of the vector entries.
00104
00105     The ROI class can later on be expanded in a way, that the vector does
00106     not only hold positions, but maybe somthing like more complex mask
00107     patches...
00108
00109    \todo TODO change ROI memebr in ImageBase to pointer to:
00110    -share a ROI between multiple images, in particular "mask type" region of interest,
00111    -save memory for mask
00112    -avoid operator calls if ROI unused
00113    -drop MaskWidth_ and MaskHeight_ and replace it by src image access functions to src imaeg size
00114    -ideally drop mask array in ROI and replace it ba a one channel Image<bool>/Image<unsigned char>
00115    -... (JW 09/2005, started majo chaneg but rolle dback due to problems in automatically initializing Mask size without a pointer t            reference image.
00116
00117     @author woelk 07/2005 */
00118     class BIASImageBase_EXPORT ROI : public Debug
00119     {
00120     public:
00121         /** @name construction and destruction
00122         @{ */
00123
00124         /// destructor
00125         ~ROI();
00126
00127         /// str. constructor
00128         ROI();
00129
00130         /// @brief calls operator=
00131         ROI(const ROI& roi);
00132
00133         /** Deletes internal memory, sets mask and vector invalid.
00134         @author woelk 07/2005 */
00135         void Release();
00136
00137         /** Reallocates Mask_ and MaskArray_, if necessary.
00138         @author woelk 07/2005 */
00139         void Resize(unsigned width, unsigned height);
00140
00141         /** @brief Delete region of interest
00142         @author woelk 07/2005 **/
00143         void UnsetROI();
00144
00145         /// assignment operator
00146         ROI& operator=(const ROI& roi);
00147
00148         //@}
00149
00150         /** @name access function
00151         @{ */
00152
00153         /** @brief Sets a rectangular region of interest
00154         @author woelk 07/2005 */
00155         int SetCorners(unsigned UpperLeftX, unsigned UpperLeftY,
00156             unsigned LowerRightX, unsigned LowerRightY);
00157
00158         /** @brief Return the region of interest, by saving the
00159         coordinates within the variables defined by the parameters
00160         @author woelk 07/2005 */
00161         inline void GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY,
00162             unsigned &LowerRightX,unsigned &LowerRightY) const;
00163         /** @brief Return the region of interest, by saving the
00164         coordinates within the variables defined by the parameters
00165         @author woelk 07/2005 */
00166         inline void GetCorners(int& UpperLeftX, int& UpperLeftY,
00167             int& LowerRightX, int& LowerRightY) const;
00168
00169       /** @brief ROI check if pixel position is inside the ROI
00170       moved here from image base, does only check bounding box roi by now */
00171       inline bool IsInROI(const double& x, const double& y) const {
00172         if ((MaskValid_) || (VectorValid_)) {
00173           BIASERR("IsInROI not implemented for mask or vector !!!");
00174         }
00175         return ((UpperLeftX_ <= x) &&  ((LowerRightX_-1)>=x) &&
00176                 (UpperLeftY_ <= y) &&  ((LowerRightY_-1)>=y));
00177       }
00178
00179         /** returns an image of StorageType unsigned char, where every pixel not
00180         in the ROI is set to UCHAR_MAX and every other pixel to 0
00181         @author woelk 07/2005 */
00182         int GetMaskImage(ImageBase& im) const;
00183
00184         /** every pixel with value!=0.0 is in the ROI, every pixel with
00185         value==0.0 is not in the ROI
00186         @author woelk 07/2005 */
00187         int SetMaskImage(const ImageBase& im);
00188
00189         /** Direct pointer to the mask data
00190         @author woelk 07/2005 */
00191         inline MASK_TYPE *GetMaskData()
00192         { return MaskData_; }
00193
00194         /** Direct pointer to the mask data, const version
00195         @author woelk 07/2005 */
00196         inline const MASK_TYPE *GetMaskData() const
00197         { return const_cast<const unsigned char *>(MaskData_); }
00198
00199         /** Direct pointer to the mask data array
00200         @author woelk 07/2005 */
00201         inline MASK_TYPE **GetMaskDataArray()
00202         { return MaskDataArray_; }
00203
00204         /** Direct pointer to the mask data array, const version
00205         @author woelk 07/2005 */
00206         inline const MASK_TYPE **GetMaskDataArray() const
00207         { return const_cast<const unsigned char **>(MaskDataArray_); }
00208
00209         /** Sets MaskValid_=false and VectorValid_=true.
00210         Copies pos -> Vector_.
00211         Sorts Vector_.
00212         @author woelk 07/2005 */
00213         void SetVector(std::vector<Position>& pos);
00214
00215         /// returns a pointer to the vector representation of the ROI
00216         inline std::vector<Position>* GetVector()
00217         { return &Vector_; }
00218
00219         /** get a copy of mask vector. Returns true if vector is valid
00220         @author woelk 07/2005 */
00221         bool GetVector(std::vector<Position>& vec) const;
00222
00223         /// width of mask image
00224         inline unsigned GetMaskWidth() const
00225         { return MaskWidth_; }
00226
00227         /// height of mask image
00228         inline unsigned GetMaskHeight() const
00229         { return MaskHeight_; }
00230
00231         //@}
00232
00233         /** @name checking
00234         @{ */
00235
00236         /// is the mask image valid?
00237         inline bool MaskValid() const
00238         { return MaskValid_; }
00239
00240         /// is the position vector valid?
00241         inline bool VectorValid() const
00242         { return VectorValid_; }
00243
00244         inline void SetMaskValidFlag(bool flag)
00245         { MaskValid_ = flag; }
00246
00247         inline void SetVectorValidFlag(bool flag)
00248         { VectorValid_ = flag; }
00249
00250         /** Returns true if both ROIs have the same size.
00251         Only the rectangular ROI as defined by the corners is validated.
00252         @author woelk 07/2005 */
00253         bool SameSize(const ROI& roi) const;
00254
00255         //@}
00256
00257         /** @name io functions
00258         @{ */
00259
00260         ///
00261         friend BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const ROI& roi);
00262
00263         /** binary output to stream
00264         @author woelk 07/2005 */
00265         int WriteBinary(std::ostream& os) const;
00266
00267         /** binary input from stream
00268         @author woelk 07/2005 */
00269         int ReadBinary(std::istream& is);
00270
00271         //@}
00272
00273         /** @name conversion functions
00274         @{ */
00275
00276         /** Fills vector representation of ROI from mask representation.
00277         Returns 0 if mask is valid. Sets VectorValid flag if maks is valid.
00278         @author woelk 07/2005 */
00279         int Mask2Vector();
00280
00281         /** Fills vector representation of ROI from mask representation.
00282         Returns 0 if vector is valid. Sets MaskValid flag if vector is valid.
00283         @author woelk 07/2005  */
00284         int Vector2Mask();
00285
00286         /** Fills corner/bounding box representation of ROI from vector
00287         representation. Returns 0 if vector is valid.
00288         @author woelk 07/2005 */
00289         int Vector2Corners();
00290
00291         /** Fills corner/bounding box representation of ROI from mask
00292         representation. Returns 0 if mask is valid.  */
00293         int Mask2Corners();
00294
00295         /** Fills mask representation of ROI from corner representation */
00296         void Corners2Mask();
00297
00298         /** Fills vector representation of ROI from corner representation */
00299         void Corners2Vector();
00300
00301         //@}
00302
00303     protected:
00304         bool MaskValid_; /// validity indicator for mask image
00305         bool VectorValid_; /// validity indicator for position vector
00306
00307         /// rectangular region of interest defined by upper left and lower right
00308         /// corners. The upperleft corner is part of the rectangle, while the
00309         /// lower
00310         unsigned UpperLeftX_, UpperLeftY_;
00311         unsigned LowerRightX_, LowerRightY_;
00312
00313         /// dimensions of maks image data
00314         unsigned MaskWidth_, MaskHeight_;
00315         /// the mask image data
00316         MASK_TYPE *MaskData_;
00317         /// row major representation of the mask roi
00318         MASK_TYPE **MaskDataArray_;
00319
00320         /// Vector instance of ROI, always sorted from top left to bottom right
00321         std::vector<Position> Vector_;
00322
00323         /// version number of ROI class
00324         static const int Version_;
00325
00326     }; // class
00327
00328     /** human readable output operator for ROI, mainly for debugging
00329     @author woelk 07/2005 */
00330     BIASImageBase_EXPORT std::ostream& operator<<(std::ostream& os, const ROI& roi);
00331
00332     ///////////////////////////////////////////////////////////////////////
00333     // inline functions
00334     ///////////////////////////////////////////////////////////////////////
00335
00336     inline
00337         void ROI::GetCorners(unsigned &UpperLeftX, unsigned &UpperLeftY,
00338         unsigned &LowerRightX,unsigned &LowerRightY) const
00339     {
00340         UpperLeftX  = UpperLeftX_;
00341         UpperLeftY  = UpperLeftY_;
00342         LowerRightX = LowerRightX_;
00343         LowerRightY = LowerRightY_;
00344     }
00345
00346     inline
00347         void ROI::GetCorners(int& UpperLeftX, int& UpperLeftY,
00348         int& LowerRightX,  int& LowerRightY) const
00349     {
00350         UpperLeftX  = (int)UpperLeftX_;
00351         UpperLeftY  = (int)UpperLeftY_;
00352         LowerRightX = (int)LowerRightX_;
00353         LowerRightY = (int)LowerRightY_;
00354     }
00355
00356 } // namespace
00357
00358
00359
00360 #include <Base/Common/BIASpragmaEnd.hh>
00361
00362 #endif // __ROI_hh__
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/Scan1394Bus.cpp Source File

VideoSource » Examples

Scan1394Bus.cpp

Go to the documentation of this file.
00001 #include <unistd.h>
00002
00003 #include "../MDcam.hh"
00004
00005 void usage()
00006 {
00007   cout <<"Usage: Scan1394Bus [options] filename"<<endl;
00008   cout <<"Options: "<<endl;
00009   cout <<"  -a    : append to file instead of overwrite"<<endl;
00010   cout <<" -b N : scan bus number N instead of 0"<<endl;
00011 }
00012
00013
00014 int main(int argc, char *argv[])
00015 {
00016   ofstream ofs;
00017   char *filename;
00018   bool append = false;
00019   int bus = 0;
00020   char c;
00021
00022   MDcam cams;
00023
00024
00025   while (argc >1)
00026   {
00027       c = getopt(argc,argv,"ab:");
00028       if (c == -1) break;
00029       switch (c)
00030         {
00031     case 'a':
00032       append = true;
00033       break;
00034     case 'b':
00035       bus = atoi(optarg);
00036       break;
00037     default:
00038       usage();
00039       exit(1);
00040     }
00041   }
00042
00043
00044   if ( (argc -optind)  >0)
00045     filename = argv[optind];
00046   else {
00047     usage();
00048     exit(1);
00049   }
00050
00051
00052   if (append)
00053     ofs.open(filename,ios::app);
00054   else
00055     ofs.open(filename);
00056
00057   if ( !ofs ) {
00058     perror(filename);
00059     exit(1);
00060   }
00061
00062
00063   cams.SetDebugLevel(0);
00064
00065   cams.ScanBus(bus,ofs);
00066
00067   ofs.close();
00068
00069
00070   return 0;
00071 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ScanLine2.hh Source File

Base » Image

ScanLine2.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __ScanLine2_hh__
00027 #define __ScanLine2_hh__
00028
00029 #include <bias_config.h>
00030 #include "Bresenham.hh"
00031
00032 namespace BIAS{
00033
00034   class /*BIASImageBase_EXPORT*/ ScanLine2 : public Bresenham
00035   {
00036     /** class for scanning a region given by a line and
00037         a distance ca. perpendicular to the line
00038         GetNext() return on successive calls all image coo
00039           within +-epsilon from line given by start and end
00040         Fast implementation based on Bresenhams algorith
00041         @author woelk 01 2003 */
00042   public:
00043     inline ScanLine2();
00044
00045     inline ~ScanLine2();
00046
00047     inline ScanLine2(const int start[2], const int end[2], const int epsilon);
00048
00049     inline ScanLine2(const unsigned int start[2], const unsigned int end[2],
00050                     const unsigned int epsilon);
00051
00052     inline ScanLine2(const double start[2], const double end[2],
00053                     const double epsilon);
00054
00055     inline void Init(const int start[2], const int end[2], const int epsilon);
00056
00057     inline void Init(const unsigned int start[2], const unsigned int end[2],
00058                      const unsigned int epsilon)
00059     { Init((int *)start, (int *)end, (int)epsilon); };
00060
00061     inline void Init(const double start[2], const double end[2],
00062                      double epsilon);
00063
00064     inline bool GetNext(int next[2]);
00065
00066     inline bool GetNext(unsigned int next[2])
00067     { return GetNext((int *)next); };
00068
00069     inline bool GetNext(double next[2]);
00070
00071   protected:
00072     int _iEpsilon;
00073     double _dDEpsilon;
00074     int _iEpsCount;
00075     int _iTransformedUpDown[2];
00076
00077   }; // class
00078
00079   ScanLine2::ScanLine2() : Bresenham() {}
00080
00081   ScanLine2::~ScanLine2() {}
00082
00083   ScanLine2::ScanLine2(const int start[2], const int end[2], const int epsilon)
00084   { Init(start, end, epsilon); }
00085
00086   ScanLine2::ScanLine2(const unsigned int start[2], const unsigned int end[2],
00087                      const unsigned int epsilon)
00088   { Init(start, end, epsilon); }
00089
00090   ScanLine2::ScanLine2(const double start[2], const double end[2],
00091                      const double epsilon)
00092   { Init(start, end, epsilon); }
00093
00094   void ScanLine2::Init(const int start[2], const int end[2], const int epsilon)
00095   {
00096 #ifdef BIAS_DEBUG
00097     if (epsilon<0){
00098       BIASERR("epsilon should be greater or equal to zero");
00099     }
00100 #endif
00101     Bresenham::Init(start, end);
00102     _iEpsilon = epsilon;
00103     _iEpsCount = -1;
00104
00105     _iTransformedCurrent[0]=_iTransformedStart[0];
00106     _iTransformedCurrent[1]=_iTransformedStart[1];
00107     // remember
00108     _iTransformedUpDown[0]=_iTransformedStart[0];
00109     _iTransformedUpDown[1]=_iTransformedStart[1];
00110     _iTransformedUpDown[1]-=_iEpsilon+1;
00111   }
00112
00113   void ScanLine2::Init(const double start[2], const double end[2],
00114                       double epsilon)
00115   {
00116 #ifdef BIAS_DEBUG
00117     if (epsilon<0){
00118       BIASERR("epsilon should be greater or equal to zero");
00119     }
00120 #endif
00121     Bresenham::Init(start, end);
00122     _iEpsilon = (int)floor(epsilon);
00123     _dDEpsilon = epsilon - _iEpsilon;
00124     _iEpsCount = -1;
00125     _iTransformedUpDown[0]=_iTransformedStart[0];
00126     _iTransformedUpDown[1]=_iTransformedStart[1];
00127     _iTransformedUpDown[1]-=_iEpsilon;
00128   }
00129
00130   bool ScanLine2::GetNext(int next[2])
00131   {
00132 #ifdef BIAS_DEBUG
00133     if (!_bInitialized)
00134       BIASERR("call Init befor GetNext");
00135 #endif
00136     bool result=true;
00137     if (_iEpsCount>=2*_iEpsilon){ // this is from bresenham
00138       _iEpsCount=0;
00139       _iTransformedCurrent[0]++;
00140       _iEps += _iDy;
00141       if ((_iEps << 1) >= _iDx){
00142         _iTransformedCurrent[1]++;
00143         _iEps -= _iDx;
00144       }
00145       if (_iTransformedCurrent[0]>_iTransformedEnd[0] ||
00146           _iTransformedCurrent[1]>_iTransformedEnd[1]){
00147         result=false;
00148       } else {
00149         _iTransformedUpDown[0]=_iTransformedCurrent[0];
00150         _iTransformedUpDown[1]=_iTransformedCurrent[1];
00151         _iTransformedUpDown[1]-=_iEpsilon;
00152         _iSym.InverseTransform(_eLineType, _iTransformedUpDown, next);
00153         result=true;
00154       }
00155     } else { // just go up and down
00156       _iTransformedUpDown[1]++;
00157       _iSym.InverseTransform(_eLineType, _iTransformedUpDown, next);
00158       _iEpsCount++;
00159     }
00160     return result;
00161   }
00162
00163   bool ScanLine2::GetNext(double next[2])
00164   {
00165     bool result;
00166     int inext[2];
00167     result = GetNext(inext);
00168     next[0]=(double)inext[0] + _dDx;
00169     next[1]=(double)inext[1] + _dDy;
00170
00171     return result;
00172   }
00173
00174 } // namespace
00175
00176 #endif // __ScanLine2_hh__
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ScanLine.hh Source File

Base » Image

ScanLine.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __ScanLine_hh__
00027 #define __ScanLine_hh__
00028
00029 #include <bias_config.h>
00030
00031 #include <Base/Image/Bresenham.hh>
00032
00033 namespace BIAS{
00034
00035   // DLL JW
00036   class BIASMatcher2D_EXPORT BIAS::Bresenham;
00037
00038   /** @class ScanLine
00039       @ingroup g_image_other
00040       @brief class for scanning a image region given by a line and a distance
00041       from the line
00042
00043       GetNext() return on successive calls all image coo
00044       within +-epsilon from line given by start and end
00045       Fast implementation based on Bresenhams algorithm.
00046       @author woelk 01 2003 */
00047   class BIASImageBase_EXPORT ScanLine : public Bresenham
00048   {
00049
00050   public:
00051     inline ScanLine();
00052     inline ~ScanLine();
00053
00054     inline ScanLine(const int start[2], const int end[2], const int epsilon);
00055
00056     inline ScanLine(const unsigned int start[2], const unsigned int end[2],
00057                     const unsigned int epsilon);
00058
00059     inline ScanLine(const double start[2], const double end[2],
00060                     const double epsilon);
00061
00062     inline void Init(const int start[2], const int end[2], const int epsilon);
00063
00064     inline void Init(const unsigned int start[2], const unsigned int end[2],
00065                      const unsigned int epsilon)
00066     { Init((int *)start, (int *)end, (int)epsilon); };
00067
00068     inline void Init(const double start[2], const double end[2],
00069                      double epsilon);
00070
00071     inline bool GetNext(int next[2]);
00072
00073     inline bool GetNext(unsigned int next[2])
00074     { return GetNext((int *)next); };
00075
00076     inline bool GetNext(double next[2]);
00077
00078   protected:
00079     int _iEpsilon;
00080     double _dDEpsilon;
00081     int _iEpsCount;
00082     int _iTransformedUpDown[2];
00083
00084   }; // class
00085
00086   ScanLine::ScanLine() : Bresenham() {}
00087
00088   ScanLine::~ScanLine() {}
00089
00090   ScanLine::ScanLine(const int start[2], const int end[2], const int epsilon)
00091   { Init(start, end, epsilon); }
00092
00093   ScanLine::ScanLine(const unsigned int start[2], const unsigned int end[2],
00094                      const unsigned int epsilon)
00095   { Init(start, end, epsilon); }
00096
00097   ScanLine::ScanLine(const double start[2], const double end[2],
00098                      const double epsilon)
00099   { Init(start, end, epsilon); }
00100
00101   void ScanLine::Init(const int start[2], const int end[2], const int epsilon)
00102   {
00103 #ifdef BIAS_DEBUG
00104     if (epsilon<0){
00105       BIASERR("epsilon should be greater or equal to zero");
00106     }
00107 #endif
00108     Bresenham::Init(start, end);
00109     _iEpsilon = epsilon;
00110     _iEpsCount = -1;
00111     // start epsilon earlier than start
00112     // and finish epsilon later than end
00113     for (int i=0; i<epsilon; i++){
00114       _iTransformedStart[0]--;
00115       _iTransformedEnd[0]++;
00116       _iEps -= _iDy;
00117       if ((_iEps << 1) <= 0){
00118         _iTransformedStart[1]--;
00119         _iTransformedEnd[1]++;
00120         _iEps += _iDx;
00121       }
00122     }
00123     _iTransformedCurrent[0]=_iTransformedStart[0];
00124     _iTransformedCurrent[1]=_iTransformedStart[1];
00125     // remember
00126     _iTransformedUpDown[0]=_iTransformedStart[0];
00127     _iTransformedUpDown[1]=_iTransformedStart[1];
00128     _iTransformedUpDown[1]-=_iEpsilon;
00129   }
00130
00131   void ScanLine::Init(const double start[2], const double end[2],
00132                       double epsilon)
00133   {
00134 #ifdef BIAS_DEBUG
00135     if (epsilon<0){
00136       BIASERR("epsilon should be greater or equal to zero");
00137     }
00138 #endif
00139     Bresenham::Init(start, end);
00140     _iEpsilon = (int)floor(epsilon);
00141     _dDEpsilon = epsilon - _iEpsilon;
00142     _iEpsCount = -1;
00143     _iTransformedUpDown[0]=_iTransformedStart[0];
00144     _iTransformedUpDown[1]=_iTransformedStart[1];
00145     _iTransformedUpDown[1]-=_iEpsilon;
00146   }
00147
00148   bool ScanLine::GetNext(int next[2])
00149   {
00150 #ifdef BIAS_DEBUG
00151     if (!_bInitialized)
00152       BIASERR("call Init befor GetNext");
00153 #endif
00154     bool result=true;
00155     if (_iEpsCount>=2*_iEpsilon){ // this is from bresenham
00156       _iEpsCount=0;
00157       _iTransformedCurrent[0]++;
00158       _iEps += _iDy;
00159       if ((_iEps << 1) >= _iDx){
00160         _iTransformedCurrent[1]++;
00161         _iEps -= _iDx;
00162       }
00163       if (_iTransformedCurrent[0]>_iTransformedEnd[0] ||
00164           _iTransformedCurrent[1]>_iTransformedEnd[1]){
00165         result=false;
00166       } else {
00167         _iTransformedUpDown[0]=_iTransformedCurrent[0];
00168         _iTransformedUpDown[1]=_iTransformedCurrent[1];
00169         _iTransformedUpDown[1]-=_iEpsilon;
00170         _iSym.InverseTransform(_eLineType, _iTransformedUpDown, next);
00171         result=true;
00172       }
00173     } else { // just go up and down
00174       _iTransformedUpDown[1]++;
00175       _iSym.InverseTransform(_eLineType, _iTransformedUpDown, next);
00176       _iEpsCount++;
00177     }
00178     return result;
00179   }
00180
00181   bool ScanLine::GetNext(double next[2])
00182   {
00183     bool result;
00184     int inext[2];
00185     result = GetNext(inext);
00186     next[0]=(double)inext[0] + _dDx;
00187     next[1]=(double)inext[1] + _dDy;
00188
00189     return result;
00190   }
00191
00192 } // namespace
00193
00194 #endif // __ScanLine_hh__
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: NetworkComm/Examples/serverExample.cpp Source File

NetworkComm » Examples

serverExample.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "../CScommServer.hh"
00026
00027 #ifdef WIN32
00028 #include <Base/Common/W32Compat.hh>
00029 #include <windows.h>
00030 #endif
00031
00032 using namespace std;
00033
00034 int main (int /*argc*/, char** /*argv*/)
00035 {
00036
00037   BIAS::CScommServer server;
00038
00039   server.SetVerbose(true); // to see some msg
00040   // server.SetLog(true); // uncomment this to get all data send and received
00041   //  server.SetDebugLevel(D_CS_GETDATA);
00042   //server.SetDebugLevel(D_CS_ANALYZE);
00043
00044   vector<float> floats;
00045   floats.push_back(-3);
00046   floats.push_back(-2);
00047   floats.push_back(-1);
00048   string msg="LPOSHEAD";
00049   // register msg POSHEAD to be accepted
00050   server.RegisterMsg(msg, BIAS::CS_FLOAT, 3);
00051
00052   msg="RPOSHEAD";
00053   server.RegisterMsg(msg, BIAS::CS_INT, 1);
00054   vector<int> ints,intMsg;
00055   intMsg.push_back(-5);
00056   intMsg.push_back(+6);
00057
00058   // now let the server accept connections
00059   server.WaitForConnections();
00060
00061   vector<float> recFloats;
00062   std::vector<char> binData(8);
00063   binData[0]=']';
00064   binData[1]='b';
00065   binData[2]='i';
00066   binData[3]='n';
00067   binData[4]='a';
00068   binData[5]='r';
00069   binData[6]='y';
00070   binData[7]='[';
00071
00072   bool endless=true;
00073   while (endless) {
00074     // this msg will not be accepted by the exampleClient,
00075     // because it is not registered
00076     //    server.SendMsg(msg,floats);
00077     msg="LPOSHEAD";
00078     if (server.GetData(msg, recFloats)==0) {
00079       cout<<"New Data from client:"<<endl;
00080       for (unsigned int i=0;i<recFloats.size();i++)
00081         cout<<recFloats[i]<<" ";
00082       cout<<endl;
00083     }
00084     sleep(1);
00085     msg="RPOSHEAD";
00086     if (server.GetData(msg, ints)==0) {
00087       cout<<"New Data from client:"<<endl;
00088       for (unsigned int i=0;i<ints.size();i++)
00089         cout<<ints[i]<<" ";
00090       cout<<endl;
00091     }
00092     // this sends only to exampleClient
00093     server.SendMsg("exampleClient","BINDATA",&binData[0],binData.size());
00094
00095     // this sends to all connected partners
00096     server.SendMsg("RPOSHEAD",intMsg);
00097   }
00098 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/SettingsGL.cpp Source File

Gui

SettingsGL.cpp

Go to the documentation of this file.
00001 // JW
00002
00003 #include "SettingsGL.hh"
00004
00005 #if defined(BIAS_HAVE_GLEW) && defined(WIN32)
00006 // MS wgl extensions via GLEW
00007 #  include <GL/wglew.h>
00008 #  else
00009 // Linux glx extensions via GLEW
00010 //#include <GL/glxew.h>
00011 #endif
00012
00013 #include <Base/Debug/Error.hh>
00014 #include <Base/Debug/DebugSimple.hh>
00015
00016
00017 // ----------------------------------------------------------
00018 // namespace stuff:
00019 using namespace BIAS;
00020 using namespace std;
00021 // ----------------------------------------------------------
00022
00023 /** @author Jan Woetzel 04/2005 */
00024
00025
00026 /** set the vsync swap interval */
00027 void SettingsGL::SetVSyncInterval( const int & interval )
00028 {
00029 #if defined(WIN32) && defined(BIAS_HAVE_GLEW)
00030     if (WGLEW_EXT_swap_control) /* faster than wglewIsSupported(string) */
00031     {
00032         if (!wglSwapIntervalEXT(interval))
00033         {
00034             BIASERR("error on wglSwapIntervalEXT");
00035         }
00036         CHECK_GL_ERROR;
00037         return;
00038     } else {
00039         BIASERR("WGLEW_EXT_swap_control not supported.");
00040     };
00041 #else // WIN32 and glew
00042     BIASERR("Sorry, not implemented. Look at glXSwapInterval or AGL_SWAP_INTERVAL or enabled glew on win32 (JW)");
00043     // possibly glewXGetVideoSyncSGI ???
00044     //if (GLXEW_SGI_swap_control)
00045     //{
00046     //glXSwapIntervalSGI( interval);
00047     // //or: glXWaitVideoSyncSGI(1,0,&interval)
00048     //  //glXSwapInterval( interval );
00049     //  CHECK_GL_ERROR;
00050     //  return;
00051     //} else {
00052     //  BIASERR("GLXEW_SGI_swap_control not supported.");
00053     //};
00054 #endif // WIN32
00055 }
00056
00057
00058
00059 /** returns the swap control interval JW */
00060 int  SettingsGL::GetVSyncInterval()
00061 {
00062     int interval = -2;
00063 #if defined(WIN32) && defined(BIAS_HAVE_GLEW)
00064     if(wglewIsSupported("WGL_EXT_swap_control"))
00065     {
00066         interval = wglGetSwapIntervalEXT();
00067         CHECK_GL_ERROR;
00068     } else {
00069         BIASERR("WGLEW_EXT_swap_control not supported.");
00070     };
00071 #else // WIN32 and glew
00072     BIASERR("Sorry, not implemented/tested. Enable glew on Window (JW)");
00073     //if (GLXEW_SGI_swap_control)
00074     //{
00075     //  interval=glXGetSwapIntervalSGI();
00076     //  CHECK_GL_ERROR;
00077     //} else {
00078     //  string msg("Error: GLXEW_SGI_swap_control not supported.");
00079     //  BIASERR(msg);
00080     //  ::wxMessageBox(msg.c_str());
00081     //};
00082 #endif // WIN32
00083     return interval;
00084 }
00085
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/SettingsGL.hh Source File

Gui

SettingsGL.hh

Go to the documentation of this file.
00001 #ifndef __SettingsGL_hh__
00002 #define __SettingsGL_hh__
00003
00004 // ----------------------------------------------------------
00005 // @author Jan Woetzel (c)  10/2005
00006 #include <bias_config.h>
00007
00008 #ifndef BIAS_HAVE_OPENGL
00009 #  error Please recompile BIAS with USE_OPENGL to use this file.
00010 #endif // BIAS_HAVE_OPENGL
00011
00012 //#ifndef BIAS_HAVE_GLEW
00013 //#  error Please recompile BIAS with USE_GLEW to use this file.
00014 //#endif // BIAS_HAVE_GLEW
00015
00016 // must be first
00017 #include "biasgl.h"
00018
00019
00020 namespace BIAS {
00021     /** @class SettingsGL
00022     @ingroup g_gui
00023     @brief Application controlled OpenGl renderingsettings
00024
00025     E.g. Vsync and Multisampling/Antialiasing (planned),
00026     @author Jan Woetzel
00027     */
00028     class SettingsGL {
00029     public:
00030
00031         /** query status of vsync/swap control interval=VSYNC JW */
00032         static int  GetVSyncInterval();
00033
00034         /** set the vsync/swap control interval JW */
00035         static void SetVSyncInterval( const int & interval );
00036
00037     };
00038 } // namespace BIAS
00039 #endif
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/ShowCamWx.cpp Source File

Tools

ShowCamWx.cpp

Go to the documentation of this file.
00001 #include <bias_config.h>
00002
00003 #include <Gui/ImageCanvas.hh>
00004 #include <Gui/StringConv.hh>
00005 #include <Image/Camera.hh>
00006 #include <Image/StereoRedGreen.hh>
00007 #include <VideoSource/VideoSource_Base.hh>
00008
00009 #include <VideoSource/VideoSource_Net.hh>
00010 #include <VideoSource/VideoSource_Shm.hh>
00011
00012 // cideo for linux
00013 #ifdef BIAS_HAVE_V4L
00014 #  include <VideoSource/VideoSource_V4L.hh>
00015 #endif // BIAS_HAVE_V4L
00016
00017 //include direct show and ueye interface?
00018 #ifdef BIAS_HAVE_DSHOW
00019 #  include <VideoSource/VideoSource_DSHOW.hh>
00020 #endif
00021
00022 #  ifdef BIAS_HAVE_UEYE
00023 #    include <VideoSource/VideoSource_uEye.hh>
00024 #  endif // BIAS_HAVE_UEYE
00025
00026 #ifdef BIAS_HAVE_DCAM
00027 #  include <VideoSource/VideoSource_DCAM.hh>
00028 #endif
00029
00030 #include <iostream>
00031 #include <Base/Image/ImageIO.hh>
00032 #include <Base/Debug/TimeMeasure.hh>
00033 #include <wx/wx.h>
00034 #include <wx/listbox.h>
00035
00036 using namespace std;
00037 using namespace BIAS;
00038
00039
00040 enum wxIDs {id_quit = 42,id_record,id_config, id_timer,id_save,id_key, id_save2,id_pin};
00041
00042
00043 ofstream logstr;
00044
00045 int delay_ =20;
00046 int dSaveCounter_;
00047 bool bSaveImages_;
00048 bool bShowStereo_ = false;
00049
00050 class MyFrame : public wxFrame{
00051 public:
00052   MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, VideoSource *cam, VideoSource *cam2)
00053     :wxFrame((wxFrame *)NULL, -1, title, pos, size)
00054   {
00055     Timer_.SetOwner(this, id_timer);
00056     FrameCounter_ = 0;
00057
00058     Cam_ = cam;
00059 #ifdef BIAS_HAVE_DSHOW
00060     if( (dynamic_cast<VideoSource_DSHOW*>(Cam_)) != NULL)
00061     {
00062       (dynamic_cast<VideoSource_DSHOW*>(Cam_))->InitImage(CamImg_);
00063     }
00064     else
00065 #endif
00066       Cam_->InitImage(CamImg_);
00067     if (cam2){
00068       Cam2_ = cam2;
00069       Cam2_->InitImage(CamImg2_);
00070     } else {
00071       Cam2_ = NULL;
00072     }
00073     wxMenu *menuFile = new wxMenu;
00074
00075     menuFile->Append( id_save, wxT("Grab single image") );
00076     menuFile->Append( id_save2, wxT("Grab continuously") );
00077
00078     menuFile->Append( id_quit, wxT("E&xit") );
00079     wxMenuBar *menuBar = new wxMenuBar;
00080     menuBar->Append(menuFile, wxT("&File"));
00081 #ifdef BIAS_HAVE_DSHOW
00082     if( (dynamic_cast<VideoSource_DSHOW*>(Cam_)) != NULL)
00083     {
00084       wxMenu * menuDShow  = new wxMenu;
00085       menuDShow->Append( id_config, wxT("Display DSHOW camera configuration"));
00086       menuDShow->Append( id_pin, wxT("Display DSHOW source pin configuration"));
00087       menuBar->Append(menuDShow, wxT("&DShow"));
00088     }
00089 #endif
00090     SetMenuBar(menuBar);
00091     CreateStatusBar(5);
00092     lastwidth = CamImg_.GetWidth();
00093     lastheight = CamImg_.GetHeight();
00094     IC_ = new ImageCanvas(this,GetStatusBar(), 0,-1,wxDefaultPosition,
00095       //wxSize(lastwidth,lastheight));
00096       wxSize(640,480));
00097     wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
00098     vbox->Add(IC_,1,  wxGROW |wxALL , 5);
00099     vbox->SetSizeHints(this);
00100     SetSizer(vbox);
00101     SetAutoLayout(true);
00102     Fit();
00103     Show(TRUE);
00104
00105     wxString text;
00106     text.Printf(wxT("size: %4dx%4d"),CamImg_.GetWidth(), CamImg_.GetHeight());
00107     SetStatusText(text, 2);
00108
00109
00110     bSaveImages_ = false;
00111     dSaveCounter_ = 0;
00112     cout <<"Setting timer to "<<delay_<<" ms"<<endl;
00113     Timer_.Start(delay_,true);
00114     StopWatch_.Start();
00115   }
00116
00117   void OnKey(wxKeyEvent& event)
00118   {
00119     int code = event.GetKeyCode();
00120     switch(code){
00121 case '1':
00122 #ifdef BIAS_HAVE_DSHOW
00123   if(Cam_!=NULL)
00124   {
00125     if((dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_)) != NULL)
00126       (dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_))->DisplayCameraProperties();
00127   }
00128 #endif
00129   break;
00130 case 's':
00131   bSaveImages_ = !bSaveImages_;
00132   cout<<"saving images...= "<<bSaveImages_<<endl;
00133   break;
00134     }
00135   }
00136
00137   void OnQuit(wxCommandEvent& WXUNUSED(event))
00138   {
00139     Timer_.Stop();
00140     if(Cam_){
00141       Cam_->PostGrab();
00142       Cam_->CloseDevice();
00143       //delete Cam_;
00144     }
00145     if (Cam2_){
00146       Cam2_->PostGrab();
00147       Cam2_->CloseDevice();
00148     }
00149     //if(IC_)
00150     //delete IC_;
00151     Close(TRUE);
00152   }
00153
00154   void OnGrab(wxCommandEvent& WXUNUSED(event))
00155   {
00156     wxString text;
00157     text.Printf(wxT("ShowCamWX-%05d.mip"),FrameCounter_);
00158     ImageIO::Write(WxToAscii(text),CamImg_);
00159     cout <<"Saved image: "<<text<<endl;
00160   }
00161
00162   void OnTimer(wxTimerEvent & /*evt*/)
00163   {
00164     float fps;
00165     Timer_.Stop();
00166     StopWatch_.Stop();
00167 #ifdef WIN32
00168     fps = 1000.0 / StopWatch_.GetRealTime();
00169 #else
00170     fps = 1000000.0 / StopWatch_.GetRealTime();
00171 #endif
00172     StopWatch_.Reset();
00173     StopWatch_.Start();
00174     FrameCounter_++;
00175     wxString text;
00176     text.Printf(wxT("%05d %2.1f fps "),FrameCounter_,fps);
00177     SetStatusText(text, 1);
00178     Cam_->GrabSingle(CamImg_);
00179     if (Cam2_){
00180       Cam2_->GrabSingle(CamImg2_);
00181       static StereoRedGreen comb;
00182       static Camera<unsigned char> stereo;
00183       comb.Combine(CamImg_, CamImg2_, stereo);
00184       ShowImg_ = stereo;
00185     } else {
00186       ShowImg_ = CamImg_;
00187     }
00188 #ifdef BIAS_HAVE_DSHOW
00189     if( (dynamic_cast<VideoSource_DSHOW*>(Cam_)) != NULL)
00190     {
00191       ShowImg_.Flip();
00192     }
00193 #endif
00194     IC_->Show(ShowImg_,"foo");
00195     unsigned int w = ShowImg_.GetWidth();
00196     unsigned int h = ShowImg_.GetHeight();
00197     text.Printf(wxT("size: %4dx%4d"),w, h);
00198     SetStatusText(text, 2);
00199
00200     if (w != lastwidth || h != lastheight) {
00201       lastwidth = w; lastheight = h;
00202       IC_->SetSize(w,h);
00203       Fit();
00204       cout <<"Refit"<<endl;
00205     }
00206
00207     if(bSaveImages_){
00208       cout<<"Saving image: "<<dSaveCounter_<<endl;
00209       text.Printf(wxT("image_%05d"),dSaveCounter_++);
00210       BIAS::ImageIO::Write(WxToAscii(text),ShowImg_);
00211
00212     }
00213     Timer_.Start(delay_,true);
00214   }
00215
00216
00217   void OnGrabContinuous(wxCommandEvent& WXUNUSED(event))
00218   {
00219     bSaveImages_ = !bSaveImages_;
00220     cout<<"Saving images= "<<bSaveImages_;
00221   }
00222
00223   void OnConfig(wxCommandEvent& WXUNUSED(event))
00224   {
00225 #ifdef BIAS_HAVE_DSHOW
00226     if(Cam_!=NULL)
00227     {
00228       if((dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_)) != NULL)
00229         (dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_))->DisplayCameraProperties();
00230     }
00231 #endif
00232   }
00233
00234   void OnConfigPin(wxCommandEvent& WXUNUSED(event))
00235   {
00236 #ifdef BIAS_HAVE_DSHOW
00237     if(Cam_!=NULL)
00238     {
00239       if((dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_)) != NULL)
00240         (dynamic_cast<BIAS::VideoSource_DSHOW *> (Cam_))->DisplaySourcePinProperties();
00241     }
00242 #endif
00243   }
00244
00245 protected:
00246   VideoSource *Cam_;
00247   VideoSource *Cam2_;
00248   ImageCanvas  *IC_;
00249   wxStatusBar *StatusBar_;
00250   TimeMeasure StopWatch_;
00251   unsigned int FrameCounter_;
00252   unsigned int lastwidth,lastheight;
00253   Camera<unsigned char> CamImg_, CamImg2_, ShowImg_;
00254   wxTimer Timer_;
00255   DECLARE_EVENT_TABLE()
00256
00257 };
00258
00259
00260
00261 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
00262 EVT_MENU(id_quit, MyFrame::OnQuit)
00263 EVT_MENU(id_config, MyFrame::OnConfig)
00264 EVT_MENU(id_pin, MyFrame::OnConfigPin)
00265 EVT_MENU(id_save, MyFrame::OnGrab)
00266 EVT_TIMER(id_timer, MyFrame::OnTimer)
00267 EVT_KEY_DOWN(MyFrame::OnKey)
00268 EVT_MENU(id_save2, MyFrame::OnGrabContinuous)
00269 END_EVENT_TABLE()
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279 // ================= MyApp =========================
00280
00281 class MyApp: public wxApp
00282 {
00283 public:
00284   virtual bool OnInit();
00285   ~MyApp();
00286   MyFrame *ToplevelWindow_;
00287 };
00288
00289
00290 void Usage()
00291 {
00292   wxMessageDialog
00293     usage(NULL,wxT("Usage: \n"
00294     "ShowCamWX -n | -N ip-string -P port |-v|-d [-w width] [-h height] [-i <string>]\n "
00295     "  -n: VideoSource_Net (UDP)\n"
00296     "  -N string (ip addr.): VideoSource_Net (TCP)\n"
00297     "         -P int (port): VideoSource_Net (TCP)\n"
00298     "  -m: VideoSource_Shm\n"
00299     "  -D: string (WDM device name) VideoSource_DSHOW\n"
00300     "  -d: VideoSource_DCam\n"
00301     "  -u: VideoSource_Ueye, only available if Windows compiled and with Option BUILD_UEYE\n"
00302     "  -p: Portnumber to listen to\n"
00303     "  -v: VideoSource_V4L\n"
00304     "  -i string : device/interface\n"
00305     "  -I string : 2nd device/interface"));
00306   usage.ShowModal();
00307
00308   exit(0);
00309 }
00310
00311 bool MyApp::OnInit()
00312 {
00313   logstr.open("ShowCamWx.log");
00314   logstr <<"Start"<<endl;
00315   VideoSource *Cam=NULL;
00316   VideoSource *Cam2=NULL;
00317   bool dcam,net,v4l,TCP,shm,dshow,ueye;
00318   dcam=v4l=net=TCP=shm=dshow=ueye= false;
00319   unsigned int w,h;
00320   unsigned int port=6002;
00321   w=h=0;
00322   float fps=0;
00323   int c=0;
00324   string device,ip_addr;
00325   string device2;
00326
00327   WxToAsciiArray argvAscii(argv, argc);
00328
00329   while ((c = getopt(argc, argvAscii, "nN:P:mdvx:y:f:i:I:D:u")) != -1)
00330   {
00331     switch (c){
00332 case 'd': dcam = true ;break;
00333 case 'm': shm = true;break;
00334 case 'n': net = true;break;
00335 case 'N': net = true;TCP=true;ip_addr=optarg;break;
00336 case 'P': port=atoi(optarg);break;
00337 case 'v': v4l = true;break;
00338 case 'x': w=atoi(optarg); break;
00339 case 'y': h=atoi(optarg); break;
00340 case 'f': fps=atof(optarg); break;
00341 case 'i': device = optarg; break;
00342 case 'I': device2 = optarg; break;
00343 case 'p': port = atoi(optarg); break;
00344 case 'u':
00345 #ifdef BIAS_HAVE_UEYE
00346   ueye =true;
00347 #else
00348   Usage();
00349 #endif
00350   break;
00351 case 'D': device = optarg; dshow = true;
00352 #ifndef WIN32
00353   Usage();
00354 #endif
00355 #ifndef BIAS_HAVE_DSHOW
00356   Usage();
00357 #endif
00358   break;
00359 case '?':
00360 case 'h':
00361 case ':':
00362   Usage(); break;
00363
00364 default:
00365   break;
00366     }
00367   }
00368   logstr <<"getopt done"<<endl;
00369
00370   if (dcam && Cam==NULL) {
00371 #ifdef BIAS_HAVE_DCAM
00372     VideoSource_DCAM *vsd = new VideoSource_DCAM;
00373     vsd->SetDebugLevel(D_DCAM);
00374     Cam=vsd;
00375     if (device2 != ""){
00376       Cam2 = new VideoSource_DCAM;
00377       Cam2->SetDebugLevel(D_DCAM);
00378     }
00379 #else
00380     cerr <<"DCam support disabled during compilation of BIAS"<<endl;
00381     exit(1);
00382 #endif
00383   }
00384
00385
00386   if (net && Cam==NULL) {
00387     logstr <<"VS_NET"<<endl;
00388     VideoSource_Net *vsn = new VideoSource_Net;
00389     vsn->OpenDevice( ip_addr,port);
00390     //      vsn->SetUseTCP(TCP);
00391     Cam=vsn;
00392   }
00393
00394   if (shm && Cam==NULL) {
00395     logstr <<"VS_SHM"<<endl;
00396     VideoSource_Shm *vsshm = new VideoSource_Shm;
00397     Cam=vsshm;
00398     if (device2 != ""){
00399       Cam2 = new VideoSource_Shm;
00400     }
00401   }
00402
00403
00404   if (v4l && Cam==NULL) {
00405 #ifdef BIAS_HAVE_V4L
00406     logstr <<"VS_V4L"<<endl;
00407     VideoSource_V4L *vsv4l = new VideoSource_V4L;
00408     Cam=vsv4l;
00409 #else
00410     exit(1);
00411 #endif
00412   }
00413
00414 #ifdef WIN32
00415 #ifdef BIAS_HAVE_DSHOW
00416   if(dshow && Cam==NULL) {
00417     logstr <<"VS_DSHOW "<<endl;
00418     VideoSource_DSHOW *dsh = new VideoSource_DSHOW(false);
00419     //dsh->SetSizeAndColorModel(320,240,3,BIAS::ImageBase::CM_YUV420P);
00420     Cam=dsh;
00421   }
00422 #endif
00423 #endif //WIN32
00424
00425 #ifdef BIAS_HAVE_UEYE
00426   if(ueye && Cam==NULL) {
00427     logstr <<"VS_UEYE "<<endl;
00428     VideoSource_uEye *eye = new VideoSource_uEye;
00429     eye->SetSize(640,480);
00430     eye->SetLeftTop(56,0);
00431     Cam=eye;
00432   }
00433 #endif // BIAS_HAVE_UEYE
00434
00435
00436   if (Cam==NULL) Usage();
00437   if (fps>0) {
00438     Cam->SetFPS(fps);
00439     if (Cam2) Cam2->SetFPS(fps);
00440   }
00441   if (!ueye && !dshow){
00442     Cam->SetSize(w,h);
00443     if (Cam2) Cam2->SetSize(w,h);
00444   }
00445
00446
00447
00448   if (device != ""){
00449     Cam->OpenDevice(device.c_str());
00450     logstr <<"We have a specified device"<<endl;
00451   }
00452   else{
00453     Cam->OpenDevice();
00454     logstr <<"No device specified, opened default"<<endl;
00455   }
00456
00457   if (device2 != ""){
00458     Cam2->OpenDevice(device2.c_str());
00459     logstr <<"We have a specified device"<<endl;
00460   } else if (Cam2) {
00461     BIASERR("something funny happened");
00462     BIASABORT;
00463   }
00464
00465   cout << "--------------------------------PREGRAB" << endl;
00466   Cam->PreGrab();
00467   if (Cam2) Cam2->PreGrab();
00468
00469   ToplevelWindow_ = new MyFrame(wxT("ShowCamWX"),wxPoint(50,50),
00470     wxSize(400,340),Cam, Cam2);
00471
00472   //   char *Server;
00473   //   if (VideoSource_Net *vsn = dynamic_cast<VideoSource_Net *>(Cam))
00474   //   {
00475   //      Server = vsn->WaitForServerAddr();
00476   //     logstr <<"VS_Server is"<<Server<<endl;
00477   //      cout <<"Server is: "<<Server<<endl;
00478   //   }
00479
00480
00481   Cam->SetDebugLevel(0);
00482   if (Cam2) Cam2->SetDebugLevel(0);
00483   return TRUE;
00484 }
00485
00486 MyApp::~MyApp()
00487 {
00488 }
00489
00490
00491 IMPLEMENT_APP(MyApp)
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdcam16.cpp Source File

VideoSource » Examples

showdcam16.cpp

Go to the documentation of this file.
00001
00002 #include <Image/Camera.hh>
00003 #include <Base/Image/ImageConvert.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <VideoSource/VideoSource_DCAM.hh>
00006 #include <Gui/GuiGTK.hh>
00007 #include <unistd.h>
00008 #include <getopt.h>
00009
00010
00011 using namespace BIAS;
00012 using namespace std;
00013
00014
00015 #ifdef BUILD_IMAGE_USHORT
00016 #define StorageType unsigned char
00017
00018 #include <Base/Debug/TimeMeasure.hh>
00019
00020 float rgain=-31.0/32.0, bgain=31.0/32.0;
00021 float gain = 0.0;
00022 unsigned savecounter=0;
00023
00024
00025 void Get8bitsfrom16(Image<unsigned short> &src, Image<unsigned char> &dst,
00026             unsigned int shift = 0)
00027 {
00028   unsigned short *us = src.GetImageData();
00029   unsigned char *uc = dst.GetImageData();
00030   unsigned int pc = src.GetPixelCount() * src.GetChannelCount();
00031   int t;
00032   for (unsigned int i=0;i<pc; i++) {
00033     t = ((us[i])>>shift);
00034     if (t> 255) uc[i] = 255;
00035     else uc[i] = t & 255;
00036   }
00037 }
00038
00039
00040
00041
00042
00043
00044 void mainloop(VideoSource_DCAM *cam)
00045 {
00046   GuiGTK CamWin;
00047   bool done = false;
00048   char c;
00049   char title[100];
00050
00051   struct timeval now;
00052   float fps;
00053   int i,savedframes;
00054   unsigned int shift = 2;
00055   long start=0, end;
00056   bool color, pause, autosave=false;
00057   ostringstream os;
00058
00059   TimeMeasure t1,t2;
00060
00061   Camera<unsigned char>  pic1;
00062   Camera <unsigned short> pic;
00063   sprintf(title,"MyWindow");
00064   CamWin.SetTitle(title);
00065   cam->InitImage(pic);
00066   ImageIO::Write("foo",pic);
00067
00068   pic1.Init(pic.GetWidth(), pic.GetHeight(),1);
00069
00070   pause = false;
00071   color = true;
00072
00073   i = 1;
00074   savedframes = 0;
00075
00076   bool save;
00077   //pic2.SetDebugLevel(D_CONVERT);
00078
00079   while (!done){
00080     save = false;
00081     gettimeofday(&now, NULL);
00082     end = start;
00083     start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00084     fps = 1.0 / (float)(start-end) * 1000.0 ;
00085
00086     c = CamWin.CheckForKeyEvent();
00087     switch (c) {
00088     case 'q':
00089     case 27:
00090       done = true;
00091       break;
00092     case 'g':
00093       cam->AutoMode(FEATURE_GAIN, true);
00094       cerr << "\nauto gain on"<<endl;
00095       break;
00096     case '1':
00097       cout <<endl<<"Shutter: "<<cam->GetShutter()<<endl;
00098 //       cam->SetShutter(0.01);
00099       break;
00100     case 'w':
00101       cam->OnePushAuto(FEATURE_WHITE_BALANCE);
00102       cerr << "\nwhite balance"<<endl;
00103       break;
00104     case 'S':
00105     case ' ':
00106       save = true;
00107       break;
00108     case 's':
00109       autosave=!autosave;
00110       if (autosave)
00111         cerr << "\nstarted saving sequence at frame "<<i<<" into frame"
00112              <<setfill('0')<<setw(5)<<savecounter<<".mip"<<endl;
00113       else
00114         cerr << "\nstopped saving sequence at frame "<<i<<" into frame"
00115              <<setfill('0')<<setw(5)<<savecounter<<".mip"<<endl;
00116       break;
00117     case 'p':
00118       pause = !pause;
00119       break;
00120     case 'c':
00121       color = !color;
00122       if (color) cerr << "\nshowing color image" << endl;
00123       else cerr << "\nshowing grey image" << endl;
00124       break;
00125     case 'G':
00126       cam->AutoMode(FEATURE_GAIN, false);
00127       cerr << "\nauto gain off"<<endl;
00128       break;
00129     case 'e':
00130       if (shift >0) shift--;
00131       cout <<endl<<"shift: "<<shift<<endl;
00132       break;
00133     case 'E':
00134       if (shift <4) shift++;
00135       cout <<endl<<"shift: "<<shift<<endl;
00136       break;
00137     case '[':
00138       gain -= 1.0/32.0;
00139       cam->SetGain(gain);
00140       cout<<"Overall gain :"<<gain<<endl;
00141       break;
00142     case ']':
00143       gain += 1.0/32.0;
00144       cam->SetGain(gain);
00145       cout<<"Overall gain :"<<gain<<endl;
00146       break;
00147     default:
00148       if (c!=-1) cerr <<"unknown key "<<c<<endl;
00149       break;
00150     }
00151
00152
00153     if (!pause) {
00154       cam->GrabSingle(pic);
00155
00156       unsigned short min, max;
00157       pic.GetMinMaxPixelValue(min, max);
00158       cout << "min: "<<min<<"\tmax: "<<max<<"  "<<endl;
00159
00160       Get8bitsfrom16(pic,pic1,shift);
00161 //       pic1.SetColorModel(pic.GetColorModel());
00162       pic1.SetColorModel(ImageBase::CM_Bayer_RGGB);
00163
00164
00165       if (save) {
00166         os.str("");
00167         os << "frame" << setfill('0') << setw(5) << savecounter;
00168         ImageIO::Write(os.str(), pic, true);
00169 //  ImageIO::ExportImage(os.str(),pic, ImageIO::FF_ppm);
00170       cerr << "\nsaved frame "<<i<<" in "<<os.str()<<endl;
00171     os <<"_uc";
00172     ImageIO::Write(os.str(), pic1, true);
00173         save = false;
00174         savecounter++;
00175       }
00176       if (autosave){
00177         os.str("");
00178         os << "frame" << setfill('0') << setw(5) << savecounter;
00179         if (ImageIO::Write(os.str(), pic, true)!=0){
00180           BIASERR("error saving frame "<<i<<" at file "<<os.str()<<".mip");
00181         }
00182         savecounter++;
00183       }
00184
00185        CamWin.ShowImage(pic1);
00186
00187        cout <<"Frame: "<<i<<"  Showing  fps: "<<fps<<"\r";
00188        cout.flush();
00189
00190       i++;
00191     } // if (!pause)
00192   }
00193 }
00194
00195
00196
00197
00198
00199
00200
00201 int main(int argc, char *argv[])
00202 {
00203   int res;
00204
00205   VideoSource_DCAM *cam;
00206
00207   // prepare camera
00208   cam = new VideoSource_DCAM;
00209
00210   // cam->SetSize(1280,960,2.0);
00211   //cam->SetSize(1600,1200,2);
00212 //   cam->SetSize(1024,768,2);
00213    //  cam->SetSize(320,250,2);
00214   cam->SetBytesPerPixel(2);
00215
00216   cam->SetDebugLevel(D_DCAM |D_DCAM_F7);
00217   res = cam->OpenDevice() ;
00218   cout <<"Openresult: "<<res<<endl;
00219
00220   if (res <0) {
00221     cerr<<" Can not open camera"<<endl;
00222     exit(1);
00223   }
00224
00225   cam->PreGrab();
00226
00227   cout <<" g  : Auto Gain ON\n";
00228   cout <<" G  : Auto Gain OFF\n";
00229   cout <<"123 : Gamma mode"<<endl;
00230   cout <<" w  : OnePushWhitebalance (not for PointGrey DragonFly)\n";
00231   cout <<" 7/8: decr/incr blue gain (for white balancing manual)\n";
00232   cout <<" 4/5: decr/incr red gain (for white balancing manual)\n";
00233   cout <<" c  : Color/Grey \n";
00234   cout <<"SPC : save an image \n";
00235   cout <<" s  : save sequence\n";
00236   cout <<" p  : Stop/Resume\n";
00237   cout <<" e  : toggle between fast and normal conversion\n";
00238   cout <<" q  : Quit      \n";
00239
00240   cam->SetDebugLevel(0);
00241 //   cam->SetFeature(FEATURE_SHARPNESS,0);
00242
00243   mainloop(cam );
00244
00245   cam->PostGrab();
00246
00247   cam->CloseDevice();
00248   delete cam;
00249
00250   return 0;
00251 }
00252
00253 #else
00254 int main(int argc, char *argv[])
00255 {
00256     BIASERR("showdcam16 can only work if BIAS was compiled with BUILD_IMAGE_USHORT");
00257 }
00258 #endif
00259
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdcam.cpp Source File

VideoSource » Examples

showdcam.cpp

Go to the documentation of this file.
00001 #include <Image/Camera.hh>
00002 #include <Base/Image/ImageConvert.hh>
00003 #include <Base/Image/ImageDraw.hh>
00004 #include <Base/Image/ImageIO.hh>
00005 #include <VideoSource/VideoSource_DCAM.hh>
00006 #include <Gui/GuiGTK.hh>
00007 #include <unistd.h>
00008 #include <getopt.h>
00009
00010 using namespace BIAS;
00011 using namespace std;
00012
00013 #define StorageType unsigned char
00014
00015 #include <Base/Debug/TimeMeasure.hh>
00016
00017 float rgain=-31.0/32.0, bgain=31.0/32.0;
00018 float gain = 0.0;
00019 unsigned savecounter=0;
00020
00021 void mainloop(VideoSource_DCAM *cam)
00022 {
00023   GuiGTK CamWin;
00024   bool done = false;
00025   char c;
00026   char title[100];
00027
00028   struct timeval now;
00029   float fps;
00030   int i,savedframes;
00031
00032   long start=0, end;
00033   bool color, pause, slowconversion=false, autosave=false;
00034   ostringstream os;
00035
00036   TimeMeasure t1,t2;
00037
00038   Camera<unsigned char> pic,pic2;
00039
00040   sprintf(title,"MyWindow");
00041   CamWin.SetTitle(title);
00042   cam->InitImage(pic);
00043   ImageIO::Write("foo",pic);
00044   pic2.Init(pic.GetWidth(), pic.GetHeight(),3);
00045
00046   pause = false;
00047   color = true;
00048   unsigned int line1start[2],line1end[2];
00049   unsigned int line2start[2],line2end[2];
00050   line1start[0] = 0; line1end[0] = pic2.GetWidth()-1;
00051   line1start[1] =  line1end[1] = 403;
00052   //   line1start[1] =  line1end[1] = pic2.GetHeight()/2;
00053
00054   line2start[1] = 0; line2end[1] = pic2.GetHeight()-1;
00055   line2start[0] = line2end[0] = 492;
00056   //   line2start[0] = line2end[0] = pic2.GetWidth()/2;
00057
00058   i = 1;
00059   savedframes = 0;
00060
00061   bool save;
00062   //pic2.SetDebugLevel(D_CONVERT);
00063
00064   while (!done){
00065     save = false;
00066     gettimeofday(&now, NULL);
00067     end = start;
00068     start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00069     fps = 1.0 / (float)(start-end) * 1000.0 ;
00070
00071     c = CamWin.CheckForKeyEvent();
00072     switch (c) {
00073     case 'q':
00074     case 27:
00075       done = true;
00076       break;
00077     case 'g':
00078       cam->AutoMode(FEATURE_GAIN, true);
00079       cerr << "\nauto gain on"<<endl;
00080       break;
00081       //     case '1':
00082       //       cout <<endl<<"Gammamode: "<<cam->GetFeature(FEATURE_GAMMA)<<endl;
00083       //       cam->SetFeature(FEATURE_GAMMA, 128);
00084       //       break;
00085       //     case '2':
00086       //       cam->SetFeature(FEATURE_GAMMA, 129);
00087       //       break;
00088       //     case '3':
00089       //       cam->SetFeature(FEATURE_GAMMA, 130);
00090       //       break;
00091     case '1':
00092       cout <<endl<<"Shutter: "<<cam->GetShutter()<<endl;
00093       //       cam->SetShutter(0.01);
00094       break;
00095     case 'w':
00096       cam->OnePushAuto(FEATURE_WHITE_BALANCE);
00097       cerr << "\nwhite balance"<<endl;
00098       break;
00099     case 'S':
00100     case ' ':
00101       save = true;
00102       break;
00103     case 's':
00104       autosave=!autosave;
00105       if (autosave)
00106         cerr << "\nstarted saving sequence at frame "<<i<<" into frame"
00107              <<setfill('0')<<setw(5)<<savecounter<<".mip"<<endl;
00108       else
00109         cerr << "\nstopped saving sequence at frame "<<i<<" into frame"
00110              <<setfill('0')<<setw(5)<<savecounter<<".mip"<<endl;
00111       break;
00112     case 'p':
00113       pause = !pause;
00114       break;
00115     case 'c':
00116       color = !color;
00117       if (color) cerr << "\nshowing color image" << endl;
00118       else cerr << "\nshowing grey image" << endl;
00119       break;
00120     case 'G':
00121       cam->AutoMode(FEATURE_GAIN, false);
00122       cerr << "\nauto gain off"<<endl;
00123       break;
00124     case 'e':
00125       slowconversion=!slowconversion;
00126       if (slowconversion)   CamWin.SetTitle("doing slow conversion");
00127       else  CamWin.SetTitle("doing fast conversion");
00128       break;
00129     case '7':
00130       bgain-=1.0/32.0;
00131       if (cam->SetWhiteBalance(rgain, bgain)!=0){
00132         BIASERR("error setting white balance");}
00133       cerr <<"\nblue gain = "<<bgain<<endl;
00134       break;
00135     case '8':
00136       bgain+=1.0/32.0;
00137       if (cam->SetWhiteBalance(rgain, bgain)!=0){
00138         BIASERR("error setting white balance");}
00139       cerr <<"\nblue gain = "<<bgain<<endl;
00140       break;
00141     case '4':
00142       rgain-=1.0/32.0;
00143       if (cam->SetWhiteBalance(rgain, bgain)!=0){
00144         BIASERR("error setting white balance");}
00145       cerr <<"\nred gain = "<<rgain<<endl;
00146       break;
00147     case '5':
00148       rgain+=1.0/32.0;
00149       if (cam->SetWhiteBalance(rgain, bgain)!=0){
00150         BIASERR("error setting white balance");}
00151       cerr <<"\nred gain = "<<rgain<<endl;
00152       break;
00153     case '[':
00154       gain -= 1.0/32.0;
00155       cam->SetGain(gain);
00156       cout<<"Overall gain :"<<gain<<endl;
00157       break;
00158     case ']':
00159       gain += 1.0/32.0;
00160       cam->SetGain(gain);
00161       cout<<"Overall gain :"<<gain<<endl;
00162       break;
00163     default:
00164       if (c!=-1) cerr <<"unknown key "<<c<<endl;
00165       break;
00166     }
00167
00168
00169     if (!pause) {
00170       cam->GrabSingle(pic);
00171       if (color) {
00172         if (slowconversion){
00173           if (pic2.GetWidth()!=pic.GetWidth() |
00174               pic2.GetHeight()!=pic.GetHeight() |
00175               pic2.GetChannelCount() !=3 ){
00176             if (!pic2.IsEmpty()) pic2.Release();
00177             pic2.Init(pic.GetWidth(), pic.GetHeight(), 3);
00178           }
00179           ImageConvert::ToRGB(pic, pic2);
00180           pic2.SetColorModel(ImageBase::CM_RGB);
00181         } else {
00182           ImageConvert::ToRGB(pic, pic2);
00183         }
00184       } else ImageConvert::ToGrey(pic, pic2);
00185
00186       //if (i==10)
00187       //  pic2.ExportImage("Cam.pnm",MIP_pnm);
00188       if (save) {
00189         os.str("");
00190         os << "frame" << setfill('0') << setw(5) << savecounter;
00191         if (ImageIO::Write(os.str(), pic2, true)!=0){
00192           BIASERR("error saving frame "<<i<<" at file "<<os.str()<<".mip");
00193         }
00194         cerr << "\nsaved frame "<<i<<" in "<<os.str()<<endl;
00195
00196         save = false;
00197         savecounter++;
00198       }
00199       if (autosave){
00200         os.str("");
00201         os << "frame" << setfill('0') << setw(5) << savecounter;
00202         if (ImageIO::Write(os.str(), pic2, true)!=0){
00203           BIASERR("error saving frame "<<i<<" at file "<<os.str()<<".mip");
00204         }
00205         savecounter++;
00206       }
00207
00208       /*
00209     unsigned char red[]={255,0,0};
00210     ImageDraw<unsigned char>::Line(pic2,line1start,line1end,red);
00211     ImageDraw<unsigned char>::Line(pic2,line2start,line2end,red);
00212       */
00213
00214       CamWin.ShowImage(pic2);
00215
00216       cout <<"Frame: "<<i<<"  Showing  fps: "<<fps<<"\r";
00217       cout.flush();
00218
00219       i++;
00220     } // if (!pause)
00221   }
00222 }
00223
00224
00225
00226
00227
00228
00229 int main(int argc, char *argv[])
00230 {
00231   int res = -1;
00232
00233   VideoSource_DCAM *cam;
00234
00235   // prepare camera
00236   cam = new VideoSource_DCAM;
00237
00238 //   cam->SetSize(512,384,1);
00239 //   cam->SetLeftTop(174,32);
00240   //  cam->SetFormat7(1,1280,1);
00241    cam->SetDebugLevel(D_DCAM |D_DCAM_F7);
00242 //   cam->SetBinning(true);
00243 //   res = cam->OpenDevice() ;
00244
00245
00246 //    cam->ForceFormat7(true);
00247 //   cam->SetSize(1200,1200);
00248 //   cam->SetSize(640, 480,1);
00249 //   cam->SetLeftTop(0,0);
00250 //    cam->SetFPS(10);
00251    res = cam->OpenDevice() ;
00252
00253   //cout <<"Openresult: "<<res<<endl;
00254   //   cam->ExternalTrigger(true);
00255   if (res <0) {
00256     cerr<<" Can not open camera. res="<<res<<endl;
00257     exit(1);
00258   }
00259   //   if (cam->SetWhiteBalance(rgain, bgain)!=0){
00260   //     BIASERR("error setting white balance");}
00261   //   cam->AutoMode(FEATURE_WHITE_BALANCE, true);
00262
00263   //   cam->ShowCapabilities();
00264   cam->SetShutter(1.0/50.0);
00265
00266   cam->PreGrab();
00267
00268   cout <<" g  : Auto Gain ON\n";
00269   cout <<" G  : Auto Gain OFF\n";
00270   cout <<"123 : Gamma mode"<<endl;
00271   cout <<" w  : OnePushWhitebalance (not for PointGrey DragonFly)\n";
00272   cout <<" 7/8: decr/incr blue gain (for white balancing manual)\n";
00273   cout <<" 4/5: decr/incr red gain (for white balancing manual)\n";
00274   cout <<" c  : Color/Grey \n";
00275   cout <<"SPC : save an image \n";
00276   cout <<" s  : save sequence\n";
00277   cout <<" p  : Stop/Resume\n";
00278   cout <<" e  : toggle between fast and normal conversion\n";
00279   cout <<" q  : Quit      \n";
00280
00281   cam->SetDebugLevel(0);
00282   //   cam->SetFeature(FEATURE_SHARPNESS,0);
00283
00284   mainloop(cam );
00285
00286   cam->PostGrab();
00287
00288   cam->CloseDevice();
00289   delete cam;
00290
00291   return 0;
00292 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdv2cam.cpp Source File

VideoSource » Examples

showdv2cam.cpp

Go to the documentation of this file.
00001 #include <Image/Camera.hh>
00002 #include <Base/Image/ImageConvert.hh>
00003 #include <Base/Image/ImageIO.hh>
00004 #include <VideoSource/VideoSource_DV2.hh>
00005 #include <Gui/GuiGTK.hh>
00006 #include <unistd.h>
00007 #include <getopt.h>
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 #define StorageType unsigned char
00013
00014 #include <Base/Debug/TimeMeasure.hh>
00015
00016 void mainloop(VideoSource_DV2 *cam)
00017 {
00018   GuiGTK CamWin;
00019   bool done = false;
00020   char c;
00021   char title[100];
00022
00023   struct timeval now;
00024   float fps;
00025   int i,savedframes, savecounter=0;
00026
00027   long start=0, end;
00028   bool color, pause,  autosave=false;
00029   ostringstream os;
00030
00031   TimeMeasure t1,t2;
00032
00033   Camera<unsigned char> pic,pic2;
00034
00035   sprintf(title,"MyWindow");
00036   CamWin.SetTitle(title);
00037   cam->InitImage(pic);
00038   pic2.Init(720, pic.GetHeight(),3);
00039
00040   pause = false;
00041   color = true;
00042
00043   i = 1;
00044   savedframes = 0;
00045
00046
00047   bool save;
00048   //pic2.SetDebugLevel(D_CONVERT);
00049
00050   while (!done){
00051     save = false;
00052     gettimeofday(&now, NULL);
00053     end = start;
00054     start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00055     fps = 1.0 / (float)(start-end) * 1000.0 ;
00056
00057     c = CamWin.CheckForKeyEvent();
00058     switch (c) {
00059     case 'q':
00060       done = true;
00061       break;
00062     case 's':
00063       save = true;
00064       break;
00065     case 'S':
00066       autosave=!autosave;
00067       savecounter=0;
00068       if (autosave) cerr << "\nstarted saving sequence at frame "<<i<<endl;
00069       else cerr << "\nstopped saving sequence at frame "<<i<<endl;
00070       break;
00071     case ' ':
00072       pause = !pause;
00073       break;
00074     case 'c':
00075       color = !color;
00076       if (color) cerr << "\nshowing color image" << endl;
00077       else cerr << "\nshowing grey image" << endl;
00078       break;
00079     default:
00080       if (c!=-1) cerr <<"unknown key "<<c<<endl;
00081       break;
00082     }
00083
00084
00085     if (!pause) {
00086 //       cout <<"starting grab"<<endl;
00087       cam->GrabSingle(pic);
00088 //       cout <<"got image"<<endl;
00089
00090       ImageConvert::ToRGB(pic, pic2);
00091
00092       //if (i==10)
00093       //  pic2.ExportImage("Cam.pnm",MIP_pnm);
00094       if (save) {
00095         ImageIO::Write("image",pic2);
00096         //          ImageIO::ExportImage("image.pnm",pic2,ImageIO::FF_ppm);
00097         save = false;
00098       }
00099       if (autosave){
00100         os.str("");
00101         os << "frame" << setfill('0') << setw(5) << savecounter;
00102         if (ImageIO::ExportImage(os.str(),pic2, ImageIO::FF_pgm)!=0){
00103           BIASERR("error saving frame "<<i<<" at file "<<os.str()<<".pgm");
00104         }
00105         savecounter++;
00106       }
00107
00108       CamWin.ShowImage(pic2);
00109
00110       cout <<"Frame: "<<i<<"  Showing  fps: "<<fps<<"\r";
00111       cout.flush();
00112
00113       i++;
00114     } // if (!pause)
00115   }
00116 }
00117
00118
00119
00120
00121
00122
00123
00124 int main(int argc, char *argv[])
00125 {
00126   int res;
00127
00128
00129   VideoSource_DV2 *cam;
00130
00131   // prepare camera
00132   cam = new VideoSource_DV2;
00133
00134   cam->SetDebugLevel(D_DV);
00135
00136 //   cam->SetDebugLevel(D_DCAM);
00137   res = cam->OpenDevice() ;
00138   cout <<"Openresult: "<<res<<endl;
00139
00140   if (res <0) {
00141     cerr<<" Can not open camera"<<endl;
00142     exit(1);
00143   }
00144
00145   //cam->ShowCapabilities();
00146   cam->PreGrab();
00147
00148   cout <<" s  : save an image \n";
00149   cout <<" S  : save sequence\n";
00150   cout <<"SPC : Stop/Resume\n";
00151   cout <<" e  : toggle between slow and fast conversion\n";
00152   cout <<" q  : Quit      \n";
00153
00154
00155   mainloop(cam );
00156
00157   cam->PostGrab();
00158
00159   cam->CloseDevice();
00160   delete cam;
00161
00162   return 0;
00163 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showdvcam.cpp Source File

VideoSource » Examples

showdvcam.cpp

Go to the documentation of this file.
00001 #include <Image/Camera.hh>
00002 #include <Base/Image/ImageConvert.hh>
00003 #include <Base/Image/ImageIO.hh>
00004 #include <VideoSource/VideoSource_DV.hh>
00005 #include <Gui/GuiGTK.hh>
00006 #include <unistd.h>
00007 #include <getopt.h>
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 #define StorageType unsigned char
00013
00014 #include <Base/Debug/TimeMeasure.hh>
00015
00016 void mainloop(VideoSource_DV *cam)
00017 {
00018   GuiGTK CamWin;
00019   bool done = false;
00020   char c;
00021   char title[100];
00022
00023   struct timeval now;
00024   float fps;
00025   int i,savedframes, savecounter=0;
00026
00027   long start=0, end;
00028   bool color, pause,  autosave=false;
00029   ostringstream os;
00030
00031   TimeMeasure t1,t2;
00032
00033   Camera<unsigned char> pic,pic2;
00034
00035   sprintf(title,"MyWindow");
00036   CamWin.SetTitle(title);
00037   cam->InitImage(pic);
00038   pic2.Init(720, pic.GetHeight(),3);
00039
00040   pause = false;
00041   color = true;
00042
00043   i = 1;
00044   savedframes = 0;
00045
00046
00047   bool save;
00048   //pic2.SetDebugLevel(D_CONVERT);
00049
00050   while (!done){
00051     save = false;
00052     gettimeofday(&now, NULL);
00053     end = start;
00054     start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00055     fps = 1.0 / (float)(start-end) * 1000.0 ;
00056
00057     c = CamWin.CheckForKeyEvent();
00058     switch (c) {
00059     case 'q':
00060       done = true;
00061       break;
00062     case 's':
00063       save = true;
00064       break;
00065     case 'S':
00066       autosave=!autosave;
00067       savecounter=0;
00068       if (autosave) cerr << "\nstarted saving sequence at frame "<<i<<endl;
00069       else cerr << "\nstopped saving sequence at frame "<<i<<endl;
00070       break;
00071     case ' ':
00072       pause = !pause;
00073       break;
00074     case 'c':
00075       color = !color;
00076       if (color) cerr << "\nshowing color image" << endl;
00077       else cerr << "\nshowing grey image" << endl;
00078       break;
00079     default:
00080       if (c!=-1) cerr <<"unknown key "<<c<<endl;
00081       break;
00082     }
00083
00084
00085     if (!pause) {
00086 //       cout <<"starting grab"<<endl;
00087       cam->GrabSingle(pic);
00088 //       cout <<"got image"<<endl;
00089
00090       ImageConvert::ToRGB(pic, pic2);
00091
00092       //if (i==10)
00093       //  pic2.ExportImage("Cam.pnm",MIP_pnm);
00094       if (save) {
00095         ImageIO::Write("image",pic2);
00096         //          ImageIO::ExportImage("image.pnm",pic2,ImageIO::FF_ppm);
00097         save = false;
00098       }
00099       if (autosave){
00100         os.str("");
00101         os << "frame" << setfill('0') << setw(5) << savecounter;
00102         if (ImageIO::ExportImage(os.str(),pic2, ImageIO::FF_pgm)!=0){
00103           BIASERR("error saving frame "<<i<<" at file "<<os.str()<<".pgm");
00104         }
00105         savecounter++;
00106       }
00107
00108       CamWin.ShowImage(pic2);
00109
00110       cout <<"Frame: "<<i<<"  Showing  fps: "<<fps<<"\r";
00111       cout.flush();
00112
00113       i++;
00114     } // if (!pause)
00115   }
00116 }
00117
00118
00119
00120
00121
00122
00123
00124 int main(int argc, char *argv[])
00125 {
00126   int res;
00127
00128
00129   VideoSource_DV *cam;
00130
00131   // prepare camera
00132   cam = new VideoSource_DV;
00133
00134   cam->SetDebugLevel(D_DV);
00135
00136 //   cam->SetDebugLevel(D_DCAM);
00137   res = cam->OpenDevice() ;
00138   cout <<"Openresult: "<<res<<endl;
00139
00140   if (res <0) {
00141     cerr<<" Can not open camera"<<endl;
00142     exit(1);
00143   }
00144
00145   //cam->ShowCapabilities();
00146   cam->PreGrab();
00147
00148   cout <<" s  : save an image \n";
00149   cout <<" S  : save sequence\n";
00150   cout <<"SPC : Stop/Resume\n";
00151   cout <<" e  : toggle between slow and fast conversion\n";
00152   cout <<" q  : Quit      \n";
00153
00154
00155   mainloop(cam );
00156
00157   cam->PostGrab();
00158
00159   cam->CloseDevice();
00160   delete cam;
00161
00162   return 0;
00163 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showmdcam.cpp Source File

VideoSource » Examples

showmdcam.cpp

Go to the documentation of this file.
00001 #include "../MDcam.hh"
00002 #include <MIPGui/MIPGui.hh>
00003 #include <MIPParam/Param.hh>
00004
00005 int main(int argc, char *argv[])
00006 {
00007
00008   Param params;
00009
00010
00011
00012   MDcam cams;
00013   int numcams;
00014   bool done = false;
00015   int downsample;
00016   char c = 0;
00017   Camera<unsigned char> *GrabImage;
00018   Camera<unsigned char> pic2;
00019   MIPGui *win;
00020   int res;
00021
00022
00023   params.AddParameter(MIPPARAM_INT,"downsample","Show downsampled by 2^n images",'d');
00024
00025   params.AddParameter(MIPPARAM_STRING,"cameras","Configuration file (default: cameras.conf",'c');
00026   params.AddParameter(MIPPARAM_INT,"scanbus","Only scan the bus number N and write camerafile");
00027
00028   params.SetParameter("downsample",0);
00029   params.SetParameter("scanbus",-1);
00030
00031
00032   res = params.ParseCommandLine(argc, argv);
00033   if (res <0) exit(1);
00034
00035
00036
00037     // Init
00038   string camfile;
00039   params.GetParameter("cameras",(string)camfile);
00040   if (camfile == NULL)
00041     camfile = "cameras.conf";
00042   int scanbus;
00043   params.GetParameter("scanbus",scanbus);
00044   if (scanbus >=0) {
00045     ofstream ofs(camfile);
00046     if (!ofs) {
00047       perror(camfile);
00048       exit(1);
00049     }
00050     cams.ScanBus(scanbus,ofs);
00051     ofs.close();
00052     exit(0);
00053   }
00054
00055   params.GetParameter("downsample",downsample);
00056
00057
00058   cams.SetDebugLevel(D_MDCAM_INIT );
00059
00060   numcams = cams.InitCameras(camfile);
00061   if (numcams <0) exit(0);
00062
00063   win = new MIPGui[numcams];
00064   GrabImage = new Camera<unsigned char>[numcams];
00065   for (int i=0; i<numcams; i++) {
00066     char title[128];
00067     sprintf(title,"Camera: %d",cams.GetID(i));
00068     win[i].SetTitle(title);
00069     cams.GetCamera(i)->InitImage(GrabImage[i]);
00070
00071   }
00072
00073
00074
00075   cams.PreGrab();
00076
00077
00078   // mainloop with show
00079
00080   while (!done) {
00081 //      gettimeofday(&now, NULL);
00082 //      end = start;
00083 //      start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00084 //      fps = 1.0 / (float)(start-end) * 1000.0 ;
00085
00086     c =0;
00087
00088       cams.GrabSingle(GrabImage);
00089       for (int i=0; i<numcams; i++) {
00090     char tmp;
00091     if (downsample >0)
00092       pic2.GetDownsampledCopy(GrabImage[i],downsample);
00093     else
00094       pic2.ToGrey(GrabImage[i]);
00095     win[i].ShowImage(pic2);
00096     tmp = win[i].CheckForKeyEvent();
00097     if (tmp >0) c = tmp;
00098       }
00099
00100
00101       switch (c) {
00102       case 27:
00103     done = true;
00104     break;
00105       }
00106
00107   }
00108
00109
00110   cams.PostGrab();
00111
00112
00113   cams.ReleaseCameras();
00114
00115
00116   delete[] win;
00117
00118
00119   return 0;
00120 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/showv4lcam.cpp Source File

VideoSource » Examples

showv4lcam.cpp

Go to the documentation of this file.
00001 #include <Image/Camera.hh>
00002 #include <VideoSource/VideoSource_V4L.hh>
00003 #include <Gui/GuiGTK.hh>
00004 #include <unistd.h>
00005 #include <Base/Image/ImageConvert.hh>
00006 #include <Base/Image/ImageIO.hh>
00007
00008 BIAS::GuiGTK CamWin;
00009
00010 using namespace BIAS;
00011 using namespace std;
00012
00013 void mainloop(VideoSource *cam)
00014 {
00015   bool done = false;
00016   char c;
00017   char title[100];
00018   struct timeval now;
00019   float fps;
00020   int i,savedframes;
00021   long start=0, end;
00022   bool color,pause;
00023   Camera<unsigned char> pic,pic2;
00024   sprintf(title,"MyWindow");
00025   CamWin.SetTitle(title);
00026   pause = false;
00027   color = true;
00028   bool save=false;
00029   i = 1;
00030   savedframes = 0;
00031   cam->InitImage(pic);
00032   pic.PrintHeader(cout);
00033
00034
00035   while (!done)
00036     {
00037
00038       gettimeofday(&now, NULL);
00039       end = start;
00040       start =  (now.tv_sec % 1000) * 1000 + (now.tv_usec / 1000);
00041       fps = 1.0 / (float)(start-end) * 1000.0 ;
00042       c = CamWin.CheckForKeyEvent();
00043       switch (c) {
00044       case 'q':
00045         done = true;
00046         break;
00047       case ' ':
00048         pause = !pause;
00049         break;
00050       case 'c':
00051         color = !color;
00052         break;
00053       case 's':
00054         save=true;
00055         break;
00056       }
00057       if (!pause) {
00058         cam->GrabSingle(pic);
00059         if (save) {
00060           ImageIO::Write("V4L_shot.mip",pic);
00061           save = false;
00062           cout <<endl<<"Save V4L_shot.mip"<<endl;
00063         }
00064         if (color)
00065           ImageConvert::ToRGB(pic,pic2);
00066         else
00067           ImageConvert::ToGrey(pic,pic2);
00068         //if (i==10)
00069         //  pic2.ExportImage("Cam.pnm",MIP_pnm);
00070         CamWin.ShowImage(pic2);
00071         cout <<"Frame: "<<i<<"  Showing  fps: "<<fps<<"\r";
00072         cout.flush();
00073         i++;
00074       }
00075     }
00076 }
00077
00078
00079
00080
00081
00082
00083
00084 int main(int argc, char *argv[])
00085 {
00086   int res;
00087   int channel = -1;
00088
00089   VideoSource_V4L *cam;
00090   CamWin.InitGtk(&argc,&argv);
00091
00092
00093   // prepare camera
00094
00095
00096
00097
00098   cout <<"Using V4L with device /dev/video";
00099   if (argc==2)
00100     channel = atoi(argv[1]);
00101
00102   cout <<" Channel: "<<channel<<endl;
00103
00104   cam = new VideoSource_V4L;
00105   //  cam->ShowCapabilities();
00106   cam->SetChannel(channel);
00107   //  cam->SetDebugLevel( D_V4L);
00108
00109   //   cam->SetSize(720,576);  //Pal
00110   cam->SetColorModel(ImageBase::CM_BGR);
00111 //   cam->SetColorModel(ImageBase::CM_YUYV422);
00112 //    cam->SetColorModel(ImageBase::CM_BGR);
00113
00114   // cam->SetColorModel(ImageBase::CM_YUV420P);
00115    //  cam->SetSize(640,480);  // WebCam
00116
00117   res = cam->OpenDevice();
00118
00119   cout <<"Openresult: "<<res<<endl;
00120
00121   if (res <0) {
00122     cerr<<" Can not open camera"<<endl;
00123     exit(1);
00124   }
00125
00126   // cam->ShowCapabilities();
00127
00128    cam->PreGrab();
00129
00130
00131   cout <<" g  : Auto Gain ON\n";
00132   cout <<" G  : Auto Gain OFF\n";
00133   cout <<" c  : Color/Grey \n";
00134   cout <<"SPC : Stop/Resume\n";
00135   cout <<"  q : Quit      \n";
00136
00137
00138     mainloop(cam );
00139
00140
00141
00142   cam->PostGrab();
00143
00144
00145
00146
00147    cam->CloseDevice();
00148    delete cam;
00149
00150   return 0;
00151
00152 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/SimilarityMeasure.cpp Source File

Matcher2D

SimilarityMeasure.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "RegionMatcher.hh"
00027 #include <float.h>
00028
00029 namespace BIAS
00030 {
00031 using namespace std;
00032
00033 template <class StorageType>
00034 void RegionMatcher::SAD(unsigned int p1[2], unsigned int p2[2],
00035                         StorageType **ida1, StorageType **ida2,
00036                         unsigned int halfwinsize, double& result)
00037 {
00038   int nhalfwinsize = - int(halfwinsize);
00039   result=0.0;
00040   register StorageType st1, st2;
00041   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00042     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00043       st1=ida1[p1[1]+r][p1[0]+c];
00044       st2=ida2[p2[1]+r][p2[0]+c];
00045       result+=(double)((st1>=st2) ? st1-st2 : st2-st1);
00046     }
00047   }
00048 }
00049
00050 template <>
00051 void RegionMatcher::SAD<unsigned char>(unsigned int p1[2], unsigned int p2[2],
00052                        unsigned char **ida1,
00053                        unsigned char **ida2,
00054                        unsigned int halfwinsize,
00055                        double& result)
00056 {
00057   int nhalfwinsize = - int(halfwinsize);
00058   register long unsigned int res=0;
00059   register unsigned char c1, c2;
00060   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00061     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00062       c1=ida1[p1[1]+r][p1[0]+c];
00063       c2=ida2[p2[1]+r][p2[0]+c];
00064       res+=(c1>=c2)? c1-c2 : c2-c1;
00065     }
00066   }
00067   result=(double)res;
00068 }
00069
00070 template <class StorageType>
00071 void RegionMatcher::SADN(unsigned int p1[2], unsigned int p2[2],
00072                         StorageType **ida1, StorageType **ida2,
00073                         unsigned int halfwinsize, double& result)
00074 {
00075   int nhalfwinsize = - int(halfwinsize);
00076   result=0.0;
00077   register StorageType st1, st2;
00078   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00079     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00080       st1=ida1[p1[1]+r][p1[0]+c];
00081       st2=ida2[p2[1]+r][p2[0]+c];
00082       result+=(st1>=st2) ? st1-st2 : st2-st1;
00083     }
00084   }
00085   // STORAGETYPE_MAX should be the biggest poistive number that can be
00086   // expressed with this storage type
00087 #define STORAGETYPE_MAX 256.0
00088
00089   unsigned tmp=(halfwinsize<<1)+1;
00090   result/=double(tmp*tmp*STORAGETYPE_MAX);
00091   result=1.0-result;
00092 }
00093
00094 template <>
00095 void RegionMatcher::SADN<unsigned char>(unsigned int p1[2], unsigned int p2[2],
00096                        unsigned char **ida1,
00097                        unsigned char **ida2,
00098                        unsigned int halfwinsize,
00099                        double& result)
00100 {
00101   int nhalfwinsize = - int(halfwinsize);
00102   register long unsigned int res=0;
00103   register unsigned char c1, c2;
00104   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00105     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00106       c1=ida1[p1[1]+r][p1[0]+c];
00107       c2=ida2[p2[1]+r][p2[0]+c];
00108       res+=(c1>=c2)? c1-c2 : c2-c1;
00109     }
00110   }
00111   // result = 1.0 - res /(UCHAR_MAX*windowarea) = 1 - res / tmp
00112   // tmp = sqrt(UCHAR_MAX)*(2*halfwinsize+1) ca. 16 * (2 * halfwinsize + 1)
00113   //     = 32 * halfwinsize + 16
00114   unsigned tmp=(halfwinsize<<5)+16;
00115   result=1.0-(double)res/double(tmp*tmp);
00116 }
00117
00118
00119 template <class StorageType>
00120 void RegionMatcher::SSD(unsigned int p1[2], unsigned int p2[2],
00121                         StorageType **ida1, StorageType **ida2,
00122                         unsigned int halfwinsize, double& result)
00123 {
00124   int nhalfwinsize = - int(halfwinsize);
00125   result=0.0;
00126   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00127     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00128       result+=pow((double)(ida1[p1[1]+r][p1[0]+c])-
00129                   (double)(ida2[p2[1]+r][p2[0]+c]), 2.0);
00130     }
00131   }
00132 }
00133
00134 template <>
00135 void RegionMatcher::SSD<unsigned char>(unsigned int p1[2], unsigned int p2[2],
00136                        unsigned char **ida1,
00137                        unsigned char **ida2,
00138                        unsigned int halfwinsize,
00139                        double& result)
00140 {
00141   int nhalfwinsize = - int(halfwinsize);
00142   register long unsigned int res=0;
00143   register short diff;
00144   for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00145     for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++){
00146       diff=(short)(ida1[p1[1]+r][p2[0]+c])-(short)(ida2[p2[1]+r][p2[0]+c]);
00147       res+=(unsigned int)(diff*diff);
00148     }
00149   }
00150   result=(double)res;
00151 }
00152
00153 template <class StorageType>
00154 void RegionMatcher::NCC(unsigned int p1[2], unsigned int p2[2],
00155                         StorageType **ida1, StorageType **ida2,
00156                         unsigned int halfwinsize, double& result)
00157 {
00158   int nhalfwinsize = - int(halfwinsize);
00159   double im1=0, im2=0, S1=0, S2=0;
00160   double S11=0, S12=0, S22=0, N=0;
00161   BIASASSERT(ida1!=NULL);
00162   BIASASSERT(ida2!=NULL);
00163   for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++)
00164     for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00165       im1 = (double)(ida1[p1[1]+r][p1[0]+c]);
00166       im2 = (double)(ida2[p2[1]+r][p2[0]+c]);
00167       N ++; S1 += im1; S2 += im2;
00168       S11 += im1*im1; S12 += im1*im2; S22 += im2*im2;
00169     }
00170   result =(N*S12 - S1*S2) / sqrt((N*S11 - S1*S1) * (N*S22 - S2*S2));
00171   if (result!=result) result=0.0;
00172 }
00173
00174 // faster specialisation because of integer arithmetic
00175 // does work without overflow with halfwindowsizes <= 127
00176 // if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4
00177 template <> void
00178 RegionMatcher::NCC<unsigned char>(unsigned int p1[2], unsigned int p2[2],
00179                                   unsigned char **ida1, unsigned char **ida2,
00180                                   unsigned int halfwinsize, double& result)
00181 {
00182   int nhalfwinsize = - int(halfwinsize);
00183   register int im1=0, im2=0;
00184   register unsigned long int S11=0, S12=0, S22=0, N=0, S1=0, S2=0;
00185   for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++)
00186     for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00187       im1 = (int)(ida1[p1[1]+r][p1[0]+c]);
00188       im2 = (int)(ida2[p2[1]+r][p2[0]+c]);
00189 //        if (im1!=im2)
00190 //          cerr << "im1 ("<<p1[0]+c<<", "<<p1[1]+r<<") : "<<im1
00191 //               << "\tim2 ("<<p2[0]+c<<", "<<p2[1]+r<<") : "<<im2<<endl;
00192       N += 1; S1 += im1; S2 += im2;
00193       S11 += im1*im1; S12 += im1*im2; S22 += im2*im2;
00194     }
00195 //     cerr << " N " << N << "   S1 " << S1 << "   S11 " << S11 << "   S2 " << S2
00196 //          << "   S22 " << S22 << "   S12 " << S12 << endl;
00197   result =((double)N*(double)S12 - (double)S1*(double)S2)/
00198     sqrt(((double)N*(double)S11 - (double)S1*(double)S1) *
00199          ((double)N*(double)S22 - (double)S2*(double)S2));
00200   if (result!=result) result=0.0;
00201
00202 //   cout<<result<<" at ("<<p1[0]<<", "<<p1[1]<<") & ("
00203 //       <<p2[0]<<", "<<p2[1]<<")"<<endl;
00204 }
00205
00206 template <class StorageType>
00207 void RegionMatcher::NCC(double p1[2], double p2[2], StorageType **ida1,
00208                         StorageType **ida2, unsigned hws, double& result)
00209 {
00210   double im1=0, im2=0, S1=0, S2=0;
00211   double S11=0, S12=0, S22=0, N=0;
00212   if (_ncchws!=hws){
00213     _ncchws=hws;
00214     _nccwinsize=1+(hws<<1);
00215     _iim1.newsize(_nccwinsize, _nccwinsize);
00216     _iim2.newsize(_nccwinsize, _nccwinsize);
00217   }
00218   _BilinearRegion(ida1, p1[0], p1[1], _ncchws, _iim1);
00219   _BilinearRegion(ida2, p2[0], p2[1], _ncchws, _iim2);
00220   for (register unsigned r=0; r<=hws; r++)
00221     for (register unsigned c=0; c<=hws; c++){
00222       im1 = (double)_iim1[r][c];
00223       im2 = (double)_iim2[r][c];
00224       N ++; S1 += im1; S2 += im2;
00225       S11 += im1*im1; S12 += im1*im2; S22 += im2*im2;
00226     }
00227   result =(N*S12 - S1*S2) / sqrt((N*S11 - S1*S1) * (N*S22 - S2*S2));
00228   if (result!=result) result=0.0;
00229 }
00230
00231
00232 template <class StorageType>
00233 void RegionMatcher::NCC(unsigned p1[2], unsigned p2[2],
00234                         StorageType **ida1, StorageType **roi1,
00235                         StorageType **ida2, StorageType **roi2,
00236                         unsigned hww, unsigned hwh, double& result)
00237 {
00238   int nhww = - int(hww);
00239   int nhwh = - int(hwh);
00240   double im1=0, im2=0, S1=0, S2=0;
00241   double S11=0, S12=0, S22=0, N=0;
00242   for (register int r=nhwh; r<(int)hwh; r++){
00243     for (register int c=nhww; c<(int)hww; c++){
00244       if (roi1[p1[1]+r][p1[0]+c]!=0 && roi2[p2[1]+r][p2[0]+c]!=0){
00245         im1 = (double)(ida1[p1[1]+r][p1[0]+c]);
00246         im2 = (double)(ida2[p2[1]+r][p2[0]+c]);
00247         N ++; S1 += im1; S2 += im2;
00248         S11 += im1*im1; S12 += im1*im2; S22 += im2*im2;
00249       }
00250     }
00251   }
00252   result =(N*S12 - S1*S2) / sqrt((N*S11 - S1*S1) * (N*S22 - S2*S2));
00253   if (result!=result) result=0.0;
00254 }
00255
00256
00257 template <class StorageType>
00258 void RegionMatcher::ColorCCV(unsigned int p1[2], unsigned int p2[2],
00259                              StorageType **ida1, StorageType **ida2,
00260                              unsigned int halfwinsize, double &result)
00261 {
00262   double Sum1=0, Sh1=0, Ss1=0;
00263   double Sum2=0, Sh2=0, Ss2=0;
00264   double S12=0, N=0;
00265   StorageType *H1,*S1, *H2,*S2;
00266   double I1,I2;
00267   double angle,h1,s1, h2,s2;
00268   for (register int r=-halfwinsize; r<=(int)halfwinsize; r++)
00269     for (register int c=-halfwinsize; c<=(int)halfwinsize; c++){
00270       H1 = (ida1[(p1[1]+r)] + ((p1[0]+c)*3));
00271       S1 = H1+1; I1 = *(S1+1);
00272       H2 = (ida2[(p2[1]+r)] + ((p2[0]+c)*3));
00273       S2 = H2+1; I2 = *(S2+1);
00274       BIASDOUT(D_REGION_MATCHER_COLORCCV,
00275                "HSI1:"<<(int)(*H1)<<" "<<(int)(*S1)<<" "<<(int)I1<<
00276                "  HSI2:"<<(int)(*H2)<<" "<<(int)(*S2)<<" "<<(int)I2);
00277       // convert H and S to euclidean coords, H=0 is red
00278       angle = M_PI * (float)(*H1) / 127.5;
00279       h1 = cos(angle)* (*S1);      s1 = sin(angle)* (*S1);
00280       angle = M_PI * (float)(*H2) / 127.5;
00281       h2 = cos(angle)* (*S2);      s2 = sin(angle)* (*S2);
00282         BIASDOUT(D_REGION_MATCHER_COLORCCV,
00283                  "[h1,s1]:["<<(int)h1<<","<<(int)s1<<
00284                  "] [h2,s2]:["<<(int)h2<<","<<(int)s2);
00285       angle =  h1*h2 + s1*s2;
00286       if (angle<0) angle=0;
00287       S12 += angle + I1 * I2;
00288       Sh1 += h1; Ss1 += s1; Sum1 += I1;
00289       Sh2 += h2; Ss2 += s2; Sum2 += I2;
00290       N ++;
00291     }
00292   double S1S2= Sh1 * Sh2 + Ss1 * Ss2;
00293   if (S1S2 < 0 ) S1S2=0;
00294   S1S2 += Sum1*Sum2;
00295   BIASDOUT(D_REGION_MATCHER_COLORCCV,
00296            "S12:"<<S12<<" Sh1,Ss1:"<<Sh1<<","<<Ss1<<"  Sum1:"<<Sum1<<
00297            " Sh2,Ss2:"<<Sh2<<","<<Ss2<<"  Sum2:"<<Sum2);
00298   result=(S12 - S1S2/N);
00299 }
00300
00301
00302
00303 template <class StorageType>
00304 void RegionMatcher::ColorNCC(unsigned int p1[2], unsigned int p2[2],
00305                    StorageType **ida1, StorageType **ida2,
00306                    unsigned int halfwinsize, double &result)
00307 {
00308   int nhalfwinsize = - int(halfwinsize);
00309 #define CNCC_EPSILON 1E-08
00310   double Sum1=0, Sh1=0, Ss1=0;
00311   double Sum2=0, Sh2=0, Ss2=0;
00312   double S11=0, S12=0, S22=0, N=0;
00313   StorageType *H1,*S1, *H2,*S2;
00314   double I1,I2;
00315   double angle,h1,s1, h2,s2;
00316   for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++)
00317     for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00318       H1 = (ida1[(p1[1]+r)] + ((p1[0]+c)*3));
00319       S1 = H1+1; I1 = *(S1+1);
00320       H2 = (ida2[(p2[1]+r)] + ((p2[0]+c)*3));
00321       S2 = H2+1; I2 = *(S2+1);
00322       BIASDOUT(D_REGION_MATCHER_COLORNCC,
00323                "HSI1:"<<(int)(*H1)<<" "<<(int)(*S1)<<" "<<(int)I1<<
00324                "  HSI2:"<<(int)(*H2)<<" "<<(int)(*S2)<<" "<<(int)I2);
00325       // convert H and S to euclidean coords, H=0 is red
00326       angle = M_PI * (float)(*H1) / 127.5;
00327       h1 = cos(angle)* (float)(*S1);
00328       s1 = sin(angle)* (float)(*S1);
00329       angle = M_PI * (float)(*H2) / 127.5;
00330       h2 = cos(angle)* (float)(*S2);
00331       s2 = sin(angle)* (float)(*S2);
00332       BIASDOUT(D_REGION_MATCHER_COLORNCC,
00333                "[h1,s1]:["<<(int)h1<<","<<(int)s1<<
00334                "] [h2,s2]:["<<(int)h2<<","<<(int)s2);
00335       angle =  h1*h2 + s1*s2; // scalar product
00336    //    angle = fabs(double(*H1)-double(*H2));
00337 //       if (angle>180)
00338 //         angle=255-angle;
00339 //       angle =  cos(angle/255.0) * double(*S1)*double(*S2); // scalar product
00340       if (angle<0) angle=0;
00341       S12 += angle + I1 * I2;
00342       Sh1 += h1; Ss1 += s1; Sum1 += I1;
00343       Sh2 += h2; Ss2 += s2; Sum2 += I2;
00344       S11 += h1*h1 + s1*s1 + I1 * I1;
00345       S22 += h2*h2 + s2*s2 + I2 * I2;
00346       N ++;
00347     }
00348
00349
00350   double S1S2= Sh1 * Sh2 + Ss1 * Ss2;
00351   if (S1S2 < 0 ) S1S2=0;
00352   S1S2 = Sum1*Sum2;
00353   double S1S1= Sum1*Sum1;
00354   double S2S2= Sum2*Sum2;
00355   BIASDOUT(D_REGION_MATCHER_COLORNCC,
00356            "N*S12:"<<N*S12<<"  S1S2:"<<S1S2<<endl<<
00357            " Sh1,Ss1:"<<Sh1<<","<<Ss1<<"  Sum1:"<<Sum1<<
00358            " Sh2,Ss2:"<<Sh2<<","<<Ss2<<"  Sum2:"<<Sum2);
00359   BIASDOUT(D_REGION_MATCHER_COLORNCC,"-----------------------------");
00360   BIASDOUT(D_REGION_MATCHER_COLORNCC,
00361            "N*S11:"<<N*S11<<" S1S1:"<< S1S1<<" N*S22:"<<N*S22<<" S2S2:"<<S2S2);
00362   double n1= (N*S11 - S1S1);
00363   double n2= (N*S22 - S2S2);
00364   BIASDOUT(D_REGION_MATCHER_COLORNCC,"n1:" <<n1<< " n2:"<<n2);
00365   if ((fabs(n1)<=CNCC_EPSILON) || (fabs(n2)<=CNCC_EPSILON))
00366     result=0.0;
00367   else result=(N*S12 - S1S2)/sqrt(n1*n2);
00368 }
00369
00370
00371 template <class StorageType>
00372 void RegionMatcher::CNCC(unsigned int p1[2], unsigned int p2[2],
00373                          StorageType **ida1, StorageType **ida2,
00374                          unsigned int halfwinsize, double &result)
00375 {
00376 #define CNCC_EPSILON 1E-08
00377   int nhalfwinsize = - int(halfwinsize);
00378   register float Sum1=0, Sh1=0, Ss1=0;
00379   register float Sum2=0, Sh2=0, Ss2=0;
00380   register float S11=0, S12=0, S22=0;
00381   StorageType *H1, *H2;
00382   register float h1,h2,s1,s2,L1,L2;
00383   register unsigned int N=0;
00384   register float angle;
00385   for (register int r=nhalfwinsize; r<=(int)halfwinsize; r++)
00386     for (register int c=nhalfwinsize; c<=(int)halfwinsize; c++){
00387       H1 = (ida1[(p1[1]+r)] + ((p1[0]+c)*3));
00388       s1 = 2.0f*((float)*(H1+1) -127.0f); L1 = (float)*(H1+2);
00389       h1 = 2.0f*((float)*H1 -127.0f);
00390       H2 = (ida2[(p2[1]+r)] + ((p2[0]+c)*3));
00391       s2 = 2.0f*((float)*(H2+1) -127.0f); L2 = (float)*(H2+2);
00392       h2 = 2.0f*((float)*H2 -127.0f);
00393           BIASDOUT(D_REGION_MATCHER_COLORNCC,
00394                       "HSL1:"<<(int)(h1)<<" "<<(int)(s1)<<" "<<(int)L1<<
00395                       "  HSL2:"<<(int)(h2)<<" "<<(int)(s2)<<" "<<(int)L2);
00396       // convert H and S to euclidean coords, H=0 is red
00397       //   angle = M_PI * (float)(*H1) / 127.5;
00398       //       h1 = cos(angle)* (float)(*S1);
00399       //       s1 = sin(angle)* (float)(*S1);
00400       //       angle = M_PI * (float)(*H2) / 127.5;
00401       //       h2 = cos(angle)* (float)(*S2);
00402       //       s2 = sin(angle)* (float)(*S2);
00403           BIASDOUT(D_REGION_MATCHER_COLORNCC,
00404                       "[h1,s1]:["<<(int)h1<<","<<(int)s1<<
00405                       "] [h2,s2]:["<<(int)h2<<","<<(int)s2);
00406
00407       //      angle =  h1*h2 + s1*s2;
00408       angle = float((int)(h1) * (int)(h2) + (int)(s1) * (int)(s2));
00409       if (angle<0) angle=0;
00410       S12 += angle + L1 * L2;
00411       Sh1 += h1; Ss1 += s1; Sum1 += L1;
00412       Sh2 += h2; Ss2 += s2; Sum2 += L2;
00413       S11 += h1*h1 + s1*s1 + L1 * L1;
00414       S22 += h2*h2 + s2*s2 + L2 * L2;
00415       N ++;
00416     }
00417
00418
00419   float S1S2= Sum1*Sum2;
00420   float S1S1= Sum1*Sum1;
00421   float S2S2= Sum2*Sum2;
00422   BIASDOUT(D_REGION_MATCHER_COLORNCC,
00423            "N*S12:"<<N*S12<<"  S1S2:"<<S1S2<<endl<<
00424            " Sh1,Ss1:"<<Sh1<<","<<Ss1<<"  Sum1:"<<Sum1<<
00425            " Sh2,Ss2:"<<Sh2<<","<<Ss2<<"  Sum2:"<<Sum2);
00426   BIASDOUT(D_REGION_MATCHER_COLORNCC,"-----------------------------");
00427   BIASDOUT(D_REGION_MATCHER_COLORNCC,
00428            "N*S11:"<<N*S11<<" S1S1:"<< S1S1<<" N*S22:"<<N*S22<<" S2S2:"<<S2S2);
00429   float n1= (N*S11 - S1S1);
00430   float n2= (N*S22 - S2S2);
00431   BIASDOUT(D_REGION_MATCHER_COLORNCC,"n1:" <<n1<< " n2:"<<n2);
00432   if ((fabs(n1)<=CNCC_EPSILON) || (fabs(n2)<=CNCC_EPSILON))
00433     result=0.0;
00434   else result=(N*S12 - S1S2)/sqrt(n1*n2);
00435 }
00436
00437 }
Generated on Wed Jun 21 19:01:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/SimilarityTransform.cpp Source File

Geometry

SimilarityTransform.cpp

Go to the documentation of this file.
00001 /** This file is part of the BIAS library (Basic ImageAlgorithmS).
00002
00003 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00004   Multimediale Systeme der Informationsverarbeitung
00005   Institut fuer Informatik
00006   Christian-Albrechts-Universitaet Kiel
00007
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024
00025 #include <Geometry/SimilarityTransform.hh>
00026 #include <MathAlgo/SVD.hh>
00027 #include <Base/Geometry/RMatrixBase.hh>
00028 #include <fstream>
00029 #include <iostream>
00030 #include <Base/Math/Matrix3x4.hh>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035
00036 bool SimilarityTransform::
00037 Load(const std::string& inputFile)
00038 {
00039   ifstream ifs(inputFile.c_str());
00040   if(!ifs)
00041     return false;
00042   ifs>>*this;
00043   if(!ifs) {
00044     ifs.close();
00045     return false;
00046   }
00047   ifs.close();
00048   return true;
00049 }
00050
00051 bool SimilarityTransform::
00052 Save(const std::string& outputFile)
00053 {
00054   ofstream ofs(outputFile.c_str());
00055   if(!ofs)
00056     return false;
00057   ofs<<*this;
00058   if(!ofs) {
00059     ofs.close();
00060     return false;
00061   }
00062   ofs.close();
00063   return true;
00064 }
00065
00066
00067 void SimilarityTransform::Dump()
00068 {
00069   cout<<"Translation:"<<C_<<endl;
00070
00071   RMatrixBase R;
00072   R.SetFromQuaternion(Q_);
00073   cout<<"Rotation Matrix: "<<R<<endl;
00074
00075   Vector3<double> axis;
00076   double angle;
00077
00078   R.GetRotationAxisAngle(axis, angle);
00079   cout<<" axis = "<<axis<<endl;
00080   cout<<"angle = "<<angle<<endl<<endl;
00081   cout<<"Matrix representation:"<<GetMatrix()<<endl;
00082 }
00083
00084 Matrix4x4<double> SimilarityTransform::GetMatrix() const
00085 {
00086   Matrix4x4<double> result;
00087   RMatrixBase R;
00088   for (unsigned int r=0; r< 3; r++)
00089     result[r][r]= scale_;
00090   result[3][3] = 1.0;
00091   R.SetFromQuaternion(Q_);
00092   for (unsigned int r=0; r< 3; r++)
00093     for (unsigned int c=0; c< 3; c++)
00094       result[r][c]= R[r][c];
00095   result[0][2] = C_[0];
00096   result[1][2] = C_[1];
00097   result[2][2] = C_[2];
00098   return result;
00099 }
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/SimilarityTransform.hh Source File

Geometry

SimilarityTransform.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIAS_SimilarityTransformation3D_hh__
00027 #define __BIAS_SimilarityTransformation3D_hh__
00028
00029 // never include this unless it is absolutely needed:
00030 // #include "bias_config.h"
00031
00032 #include <Base/Common/BIASpragmaStart.hh>
00033 #include <Base/Debug/Debug.hh>
00034 #include <Base/Geometry/Quaternion.hh>
00035 #include <Base/Math/Matrix4x4.hh>
00036 #include <Base/Geometry/HomgPoint3D.hh>
00037 #include <Base/Math/Vector3.hh>
00038
00039 namespace BIAS {
00040
00041
00042   /** @class SimilarityTransformation3D
00043    *  @brief calss rpresenting a similiraty transform,
00044    *   that can either be a coordinate transform or a movement of points
00045    *
00046    *  This transform is identical to the following matrix
00047    *
00048    *                [                C_[0] ]
00049    *                [   scale_*R     C_[1] ]
00050    *         T  =   [                C_[2] ]
00051    *                [  0    0    0     1   ]
00052    *
00053    *  The internal representation is as quaternion, scale and
00054    *  translation(center).
00055    *  May be used to represent a pose, a movement, or a coordinateTransform.
00056    *  @author grest 05/2006
00057    */
00058   class BIASGeometry_EXPORT SimilarityTransform : public BIAS::Debug
00059   {
00060   public:
00061     /** @brief sets identity transform with zero covariance */
00062     SimilarityTransform()
00063       : Q_(0.0, 0.0, 0.0, 1.0),
00064         C_(0.0,0.0,0.0), scale_(1.0) {}
00065
00066     /** @brief calls operator= */
00067     SimilarityTransform(const SimilarityTransform& c)
00068     {
00069       *this = c;
00070     }
00071
00072     /** @brief copy all elements */
00073     const SimilarityTransform&
00074     operator=(const SimilarityTransform& c) {
00075       Q_= c.Q_;
00076       C_ = c.C_;
00077       scale_ = c.scale_;
00078       return (*this);
00079     }
00080
00081     inline void SetQ(const Quaternion<double>& Q) { Q_ = Q; }
00082
00083     /** Sets the quaternion
00084      */
00085     inline void SetR(const BIAS::RMatrixBase &R)
00086     { R.GetQuaternion(Q_); }
00087
00088     inline void SetC(const Vector3<double>& C) { C_ = C; }
00089
00090
00091     void Set(const Quaternion<double>& Q, const Vector3<double>& C,
00092              const double& scale = 1.0) {
00093       Q_ = Q; C_ = C; scale_ = scale; ;
00094     }
00095
00096     const Quaternion<double>& GetQ() const { return Q_; }
00097
00098     const Vector3<double>& GetC() const { return C_; }
00099
00100     /** returns the corresponding 4x4 matrix
00101      */
00102     Matrix4x4<double> GetMatrix() const;
00103
00104     inline BIAS::RMatrixBase GetR() const {
00105       RMatrixBase R;
00106       R.SetFromQuaternion(GetQ());
00107       return R;
00108     }
00109
00110     friend std::ostream& operator<<(std::ostream &os,
00111                                     const SimilarityTransform& p);
00112     friend std::istream& operator>>(std::istream &is,
00113                                     SimilarityTransform& p);
00114
00115     bool Load(const std::string& inputFile);
00116     bool Save(const std::string& outputFile);
00117
00118     /** Inverts the transform
00119      */
00120     inline void InvertIP() {
00121       Q_.Invert(); scale_ = 1.0/scale_;
00122       C_ = -scale_ * Q_.MultVec(C_); }
00123
00124     /** result = this * arg
00125      */
00126     inline void Mult(const SimilarityTransform &arg,
00127               SimilarityTransform &result)
00128     {
00129       Q_.Mult(arg.Q_,result.Q_);
00130       Q_.MultVec(arg.C_, result.C_);
00131       result.C_ *= scale_;
00132       result.C_+= C_;
00133       result.scale_= scale_ * arg.scale_;
00134     }
00135
00136     inline void MultVec(const Vector3<double> &vec,
00137                         Vector3<double> &result) const
00138     { Q_.MultVec(vec,result); result*= scale_; result+= C_; }
00139
00140     /**
00141      * Prints Transformation together with more intuitive rotation
00142      * representations.
00143      */
00144     void Dump();
00145
00146   protected:
00147
00148     /// this is the rotation
00149     Quaternion<double> Q_;
00150
00151     /// the translation
00152     Vector3<double> C_;
00153
00154     double scale_;
00155   };
00156
00157   inline std::ostream& operator<<(std::ostream &os,
00158                                   const SimilarityTransform& p) {
00159     os<<"Q_= "<<p.Q_<<" C_= "<<p.C_<<" scale_= "<<p.scale_;
00160     return os;
00161   }
00162
00163   inline std::istream& operator>>(std::istream &is,
00164                                   SimilarityTransform& p){
00165     std::string temp;
00166     is>>temp>>p.Q_>>temp>>p.C_>>temp>>p.scale_;
00167     return is;
00168   }
00169
00170   SimilarityTransform operator*(SimilarityTransform &arg1,
00171                                 SimilarityTransform &arg2)
00172   {
00173     SimilarityTransform result;
00174     arg1.Mult(arg2,result);
00175     return result;
00176   }
00177
00178   BIAS::Vector3<double> operator*(const SimilarityTransform &arg1,
00179                                   const BIAS::Vector3<double> &vec)
00180   {
00181     BIAS::Vector3<double> result;
00182     arg1.MultVec(vec,result);
00183     return result;
00184   }
00185
00186 } // end namespace
00187
00188
00189 #include <Base/Common/BIASpragmaEnd.hh>
00190
00191 #endif
00192
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/SphericalUndistortion.cpp Source File

Image

SphericalUndistortion.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "SphericalUndistortion.hh"
00026
00027 #include <Base/Common/W32Compat.hh>
00028
00029 #include <math.h>
00030
00031 #include <Geometry/RMatrix.hh>
00032 #include <Base/Geometry/Quaternion.hh>
00033 #include <Base/Image/ImageConvert.hh>
00034 #include <Base/Image/ImageDraw.hh>
00035 #include <Base/Image/ImageIO.hh>
00036
00037 #include <iostream>
00038 #include <limits> // JW
00039
00040 #include <Base/Common/BIASpragma.hh>
00041
00042 using namespace BIAS;
00043 using namespace std;
00044
00045 #define INST(type)\
00046 \
00047 template int BIASImage_EXPORT SphericalUndistortion::ProjectImageCylindric(const Image<type>& src, Image<type>& dst, double viewCenterX, double viewCenterY, double zoomFactor);\
00048 template int BIASImage_EXPORT SphericalUndistortion::DrawCircles(Image<type>& src, const double& DegreeStep);\
00049 template int BIASImage_EXPORT SphericalUndistortion::CorrectVignette(Image<type>& src);\
00050
00051
00052 INST(unsigned char)
00053 INST(float)
00054 #ifdef BUILD_IMAGE_INT
00055 INST(int)
00056 #endif
00057 #ifdef BUILD_IMAGE_CHAR
00058 INST(char)
00059 #endif
00060 #ifdef BUILD_IMAGE_SHORT
00061 INST(short)
00062 #endif
00063 #ifdef BUILD_IMAGE_USHORT
00064 INST(unsigned short)
00065 #endif
00066 #ifdef BUILD_IMAGE_UINT
00067 INST(unsigned int)
00068 #endif
00069 #ifdef BUILD_IMAGE_DOUBLE
00070 INST(double)
00071 #endif
00072
00073
00074 //#define LOCDEB
00075
00076
00077
00078 SphericalUndistortion::SphericalUndistortion()
00079 {
00080   LuT_ = NULL;
00081   LuTPxPySphere_ = NULL;
00082   LuTPerspPxPy_ = NULL;
00083   IsInitialized_=false;
00084 }
00085
00086 SphericalUndistortion::SphericalUndistortion(const SphericalUndistortion& sp) {
00087   LuT_ = NULL;
00088   LuTPxPySphere_ = NULL;
00089   LuTPerspPxPy_ = NULL;
00090   AngleCorrX_ = sp.AngleCorrX_;
00091   AngleCorrY_ = sp.AngleCorrY_;
00092   IlluCorrX_ = sp.IlluCorrX_;
00093   IlluCorrY_ = sp.IlluCorrY_;
00094
00095   interpolatorAngle_ = sp.interpolatorAngle_;
00096   interpolatorAngleBack_ = sp.interpolatorAngleBack_;
00097   interpolatorIllu_ = sp.interpolatorIllu_;
00098
00099   MaxCamAngle_ = sp.MaxCamAngle_;
00100   principalX_ = sp.principalX_;
00101   principalY_ = sp.principalY_;
00102   radius_ = sp.radius_;
00103   IsInitialized_ = sp.IsInitialized_;
00104 }
00105
00106 SphericalUndistortion::SphericalUndistortion(const double& centerX,
00107                                              const double& centerY,
00108                                              const double& radius,
00109                                              const vector<double> &AngleCorrX,
00110                                              const vector<double> &AngleCorrY,
00111                                              const vector<double> &IlluCorrX,
00112                                              const vector<double> &IlluCorrY)
00113 {
00114   LuT_ = NULL;
00115   LuTPxPySphere_ = NULL;
00116   LuTPerspPxPy_ = NULL;
00117   Init(centerX, centerY, radius, AngleCorrX, AngleCorrY, IlluCorrX, IlluCorrY);
00118 }
00119
00120 SphericalUndistortion::SphericalUndistortion(const CameraParam& cp) {
00121   LuT_ = NULL;
00122   LuTPxPySphere_ = NULL;
00123   LuTPerspPxPy_ = NULL;
00124   Init(cp);
00125 }
00126
00127 SphericalUndistortion::~SphericalUndistortion() {
00128   if (LuT_ !=NULL)  delete[] LuT_;
00129   if (LuTPxPySphere_ !=NULL)  delete[] LuTPxPySphere_;
00130   if (LuTPerspPxPy_ !=NULL)  delete[] LuTPerspPxPy_;
00131 }
00132
00133 int SphericalUndistortion::Init(const CameraParam& cp) {
00134   if (cp.IsSpherical()) {
00135     CameraParam::Init(cp);
00136     int res = Init(principalX_, principalY_, radius_,
00137          AngleCorrX_, AngleCorrY_,
00138          IlluCorrX_, IlluCorrY_);
00139     //DebugOut();
00140     return res;
00141   } else {
00142     BIASERR("CameraParam is no spherical camera.");
00143     IsInitialized_=false;
00144     return -1;
00145   }
00146 }
00147
00148 #ifdef BIAS_HAVE_XML2
00149 int SphericalUndistortion::Init(const std::string &filename) {
00150   IsInitialized_=false;
00151   int res = ReadCameraData(filename);
00152   if (res <0) return res;
00153   if (LensIsSpherical_) {
00154     if (Init(principalX_, principalY_, radius_,
00155              AngleCorrX_, AngleCorrY_,
00156              IlluCorrX_, IlluCorrY_) < 0) return -1;
00157     IsInitialized_=true;
00158     return 0;
00159   } else {
00160     BIASERR("CameraParamFile contains no sphrical camera.");
00161     return -1;
00162   }
00163 }
00164 #endif //BIAS_HAVE_XML2
00165
00166
00167 #ifdef BIAS_HAVE_XML2
00168 int SphericalUndistortion::Init(XMLIO &myXML, xmlNodePtr &cameraNode)
00169 {
00170   IsInitialized_=false;
00171   int res = ReadCameraData(myXML, cameraNode);
00172   if (res <0) return res;
00173   if (LensIsSpherical_) {
00174     if (Init(principalX_, principalY_, radius_,
00175              AngleCorrX_, AngleCorrY_,
00176              IlluCorrX_, IlluCorrY_) < 0) return -1;
00177     IsInitialized_=true;
00178     return 0;
00179   } else {
00180     BIASERR("CameraParamFile contains no sphrical camera.");
00181     return -1;
00182   }
00183 }
00184 #endif //BIAS_HAVE_XML2
00185
00186
00187 int SphericalUndistortion::Init(const double& centerX, const double& centerY,
00188                                 const double& radius,
00189                                 const std::vector<double> &AngleCorrX,
00190                                 const std::vector<double> &AngleCorrY,
00191                                 const std::vector<double> &IlluCorrX,
00192                                 const std::vector<double> &IlluCorrY) {
00193
00194   if (AngleCorrX_!=AngleCorrX) {
00195     AngleCorrX_.clear();
00196     AngleCorrX_ = AngleCorrX;
00197   }
00198   if (AngleCorrY_!=AngleCorrY) {
00199     AngleCorrY_.clear();
00200     AngleCorrY_ = AngleCorrY;
00201   }
00202   if (IlluCorrX_!=IlluCorrX) {
00203     IlluCorrX_.clear();
00204     IlluCorrX_ = IlluCorrX;
00205   }
00206   if (IlluCorrY_!=IlluCorrY) {
00207     IlluCorrY_.clear();
00208     IlluCorrY_ = IlluCorrY;
00209   }
00210   principalX_ = centerX;
00211   principalY_ = centerY;
00212   radius_ = radius;
00213
00214   if (AngleCorrX_.size()<2 || AngleCorrY_.size()<2 ||
00215       AngleCorrX_.size()!=AngleCorrY_.size()) {
00216     IsInitialized_=false;
00217     BIASERR("Initialization failed, sizes of angle correction vectors are"
00218             <<  AngleCorrX_.size() << AngleCorrY_.size());
00219     return -1;
00220   }
00221
00222   double dum;
00223   interpolatorAngle_.SetKnotPoints(AngleCorrX_);  //t
00224   interpolatorAngle_.SetControlPoints(AngleCorrY_); //y = f(t)
00225   interpolatorAngle_.InitSpline();
00226   interpolatorAngle_.Spline(dum, AngleCorrX[0],4);
00227   MaxCamAngle_ = AngleCorrX_[AngleCorrX_.size()-1];
00228   int lutsamples = int(radius_*100);
00229   interpolatorAngle_.PrepareLuTSpline(AngleCorrX[0],MaxCamAngle_,
00230                       lutsamples,4 );
00231
00232   interpolatorAngleBack_.SetKnotPoints(AngleCorrY_);
00233   interpolatorAngleBack_.SetControlPoints(AngleCorrX_);
00234   interpolatorAngleBack_.InitSpline();
00235   interpolatorAngleBack_.Spline(dum, AngleCorrY[0],4);
00236   interpolatorAngleBack_.PrepareLuTSpline(AngleCorrY[0],
00237                       AngleCorrY[AngleCorrY.size()-1],
00238                       lutsamples,4 );
00239
00240   if (IlluCorrX_.size()>1 && IlluCorrY_.size()>1 &&
00241       IlluCorrX_.size()==IlluCorrY_.size()) {
00242     interpolatorIllu_.SetKnotPoints(IlluCorrX_);
00243     interpolatorIllu_.SetControlPoints(IlluCorrY_);
00244     interpolatorIllu_.InitSpline();
00245     interpolatorIllu_.Spline(dum, IlluCorrX[0],4);
00246   } else {
00247     IlluCorrX_.clear();
00248     IlluCorrY_.clear();
00249   }
00250
00251   IsInitialized_=true;
00252   return 0;
00253 }
00254
00255
00256
00257 int SphericalUndistortion::GetSphereCenter(double& centerX, double& centerY) const
00258 {
00259   if (IsInitialized_) {
00260     centerX = principalX_;
00261     centerY = principalY_;
00262     return 0;
00263   } else {
00264     return -1;
00265   }
00266 }
00267
00268 int SphericalUndistortion::GetSphereCenter(double& centerX, double& centerY, double& radius) const
00269 {
00270   if (IsInitialized_) {
00271     centerX = principalX_;
00272     centerY = principalY_;
00273     radius = radius_;
00274     return 0;
00275   } else {
00276     return -1;
00277   }
00278 }
00279
00280 double SphericalUndistortion::GetSphereRadius() const
00281 {
00282   if (IsInitialized_) {
00283     return radius_;
00284   } else {
00285     return -1;
00286   }
00287 }
00288
00289
00290 double SphericalUndistortion::GetMaxCamAngle() const
00291 {
00292   if (IsInitialized_) {
00293     return MaxCamAngle_;
00294   } else {
00295     return -1;
00296   }
00297 }
00298
00299 KMatrix SphericalUndistortion::GetKMatrix() {
00300
00301    KMatrix K;
00302    K.SetIdentity();
00303
00304    if (!IsInitialized_) {
00305  #ifdef BIAS_DEBUG
00306      BIASERR("Sphere Projections was not initialized!");
00307  #endif
00308      return K;
00309    }
00310    double cx, cy;
00311    GetSphereCenter(cx, cy);
00312    double sx, sy;
00313    TransfCoordSphere2Image( 80.0/180.0*M_PI, 0.0, sx, sy);
00314    K[0][0] = (sx-cx)/tan(80.0/180.0*M_PI);
00315    K[1][1] = (sx-cx)/tan(80.0/180.0*M_PI);
00316    K[0][1] = 0; //skew=0!
00317    K[0][2] = principalX_;
00318    K[1][2] = principalY_;
00319
00320    return K;
00321  }
00322
00323
00324 template <class StorageType>
00325 int SphericalUndistortion::ProjectImageCylindric(const Image<StorageType>& src,
00326                                                  Image<StorageType>& dst,
00327                                                  double viewCenterX,
00328                                                  double viewCenterY,
00329                                                  double zoomFactor)
00330 {
00331   if (!IsInitialized_) {
00332 #ifdef BIAS_DEBUG
00333     BIASERR("Sphere Projections was not initialized!");
00334 #endif
00335     return -1;
00336   }
00337
00338   if  (zoomFactor<0.01) zoomFactor=1;
00339   if (viewCenterX<principalX_-radius_ || viewCenterX>principalX_+radius_ ||
00340       viewCenterY<principalY_-radius_ || viewCenterY>principalY_+radius_) {
00341     viewCenterX = principalX_;
00342     viewCenterY = principalY_;
00343   }
00344
00345   double imageSizeX = 2 * M_PI * radius_;
00346   double imageSizeY = radius_;
00347
00348   //DrawCircles(src, 20.0);
00349
00350   // either result image size or FoV is fixed
00351   if (dst.IsEmpty()) {
00352     dst.Init((unsigned int)(imageSizeX*zoomFactor),
00353              (unsigned int)(imageSizeY*zoomFactor),
00354              src.GetChannelCount());
00355   }
00356
00357   StorageType** dataDst=dst.GetImageDataArray();
00358
00359   // go through pixels in dest image (backward mapping)
00360   for (int y=0; y+0.0001<imageSizeY*zoomFactor; y++) {
00361     for (int x=0; x+0.0001<imageSizeX*zoomFactor; x++) {
00362
00363       double theta, phi;
00364       double xSrc, ySrc;
00365
00366       theta = y/(imageSizeY*zoomFactor)*MaxCamAngle_;
00367       phi = (imageSizeX*zoomFactor-x)/(imageSizeX*zoomFactor)*2*M_PI-M_PI;
00368
00369       //TransfCoordSphere2Image(theta, phi, xSrc, ySrc);
00370       TransfCoordRotateSphere2Image(theta, phi,
00371                                     viewCenterX, viewCenterY,
00372                                     xSrc, ySrc);
00373
00374       if (xSrc<0 || xSrc>src.GetWidth()-1) xSrc=0;
00375       if (ySrc<0 || ySrc>src.GetHeight()-1) ySrc=0;
00376       if (src.GetChannelCount() == 1)
00377         dataDst[y][x] =
00378           (StorageType) src.FastBilinearInterpolationGrey(xSrc, ySrc);
00379       else
00380         for (unsigned int j=0; j<src.GetChannelCount(); j++) {
00381           dataDst[y][x * dst.GetChannelCount()+j] =
00382             (StorageType) src.BilinearInterpolation(xSrc, ySrc,j);
00383         }
00384     }
00385   }
00386
00387   return 0;
00388 }
00389
00390
00391
00392 int SphericalUndistortion::ProjectCoord(const int projectionType,
00393                                     const KMatrix& kMatrix,
00394                                     const HomgPoint2D& Source,
00395                                     HomgPoint2D &Dest) const
00396 {
00397
00398   if (!IsInitialized_) {
00399 #ifdef BIAS_DEBUG
00400     BIASERR("Sphere Projections was not initialized!");
00401 #endif
00402     return -1;
00403   }
00404
00405
00406   double theta,phi;
00407   if (TransfCoordImage2Sphere(Source, theta, phi)!=0) {
00408     return -1;
00409   }
00410   //cout << "ProjectCoord Src:" << Source << "," << theta
00411   //<< "," << phi << endl;
00412
00413   double rDst;
00414   switch (projectionType) {
00415   case (PERSPECTIVE):
00416     rDst = tan(theta);
00417     break;
00418   case (STEREOGRAPHIC):
00419     rDst = tan(theta/2);
00420     break;
00421   case (EQUIDISTANT):
00422     rDst = theta;
00423     break;
00424   case (SINE_LAW):
00425     rDst = sin(theta);
00426     break;
00427   case (EQUI_SOLID_ANGLE):
00428     rDst = sin(theta/2);
00429     break;
00430   default:
00431 #ifdef BIAS_DEBUG
00432     BIASERR("Invalid projection type!");
00433 #endif
00434     return -1;
00435   }
00436
00437   Dest.Set(rDst * cos(phi), rDst * sin(phi));
00438   //cout << "ProjectCoord Src:" << rDst << "," << Dest << endl;
00439   Dest = kMatrix * Dest;
00440   //cout << "ProjectCoord Src:" << rDst << "," << Dest << endl;
00441
00442   return 0;
00443 }
00444
00445 int SphericalUndistortion::ProjectCoordBack(const int projectionType,
00446                                         const KMatrix& kMatrix,
00447                                         const HomgPoint2D& Source,
00448                                         HomgPoint2D &Dest) const
00449 {
00450
00451   if (!IsInitialized_) {
00452 #ifdef BIAS_DEBUG
00453     BIASERR("Sphere Projections was not initialized!");
00454 #endif
00455     return -1;
00456   }
00457
00458   HomgPoint2D SourceK;
00459   SourceK = kMatrix.Invert()  * Source;
00460
00461   //cout << "K" << kMatrix <<endl;
00462   //cout << "Source" << Source << "," << SourceK << endl;
00463   // distance of dst-point to center
00464
00465   double rDst = sqrt(SourceK[0]*SourceK[0]+SourceK[1]*SourceK[1]);
00466   //cout << "rDst" << rDst << "," << SourceK << endl;
00467   // phi: angle between positive x-axis and dst-point
00468   double phi, theta;
00469   phi = atan2(SourceK[1],SourceK[0]);
00470
00471   // theta: calibrated angle between optical axis and source image point
00472   switch (projectionType) {
00473   case (PERSPECTIVE):
00474     theta = atan(rDst);
00475     break;
00476   case (STEREOGRAPHIC):
00477     //rDst = sqrt(Source[0]*Source[0]+Source[1]*Source[1]);
00478     theta = 2.0*atan(rDst);
00479     break;
00480   case (EQUIDISTANT):
00481     {double FoV_X = atan(kMatrix[0][2]/kMatrix[0][0]);
00482     rDst = sqrt((Source[0]-kMatrix[0][2])*(Source[0]-kMatrix[0][2])+
00483                 (Source[1]-kMatrix[1][2])*(Source[1]-kMatrix[1][2]));
00484     double rDstMax_X = sqrt(kMatrix[0][2]*kMatrix[0][2]);
00485     //cout <<FoV_X << endl;
00486     //cout <<rDst << endl;
00487     //cout <<rDstMax_X << endl;
00488     theta = rDst/rDstMax_X*FoV_X;}
00489     //cout <<"theta"<<theta << endl;
00490     break;
00491   case (SINE_LAW):
00492     if (rDst>1) {
00493       theta = M_PI;
00494     } else {
00495       theta = asin(rDst);
00496     }
00497     break;
00498   case (EQUI_SOLID_ANGLE):
00499     if (rDst>1) {
00500       theta = M_PI;
00501     } else {
00502       theta = 2*asin(rDst);
00503     }
00504     break;
00505   default:
00506 #ifdef BIAS_DEBUG
00507     BIASERR("Invalid projection type!");
00508 #endif
00509     return -1;
00510   }
00511   if (theta>MaxCamAngle_) {
00512     return -2;
00513   }
00514
00515   TransfCoordSphere2Image(theta, phi, Dest[0], Dest[1]);
00516   Dest[2]=1;
00517   //cout << Source << "," << Dest << "," << theta << "," << phi << endl;
00518   return 0;
00519
00520 }
00521
00522 template <class StorageType>
00523 int SphericalUndistortion::DrawCircles(Image<StorageType>& src,
00524                                        const double& DegreeStep) {
00525
00526   if (!IsInitialized_) {
00527 #ifdef BIAS_DEBUG
00528     BIASERR("Sphere Projections was not initialized!");
00529 #endif
00530     return -1;
00531   }
00532
00533   StorageType* Color;
00534   Color = new StorageType[src.GetChannelCount()];
00535   Color[0]=127;
00536   for (unsigned int j=1; j<src.GetChannelCount(); j++) {
00537     Color[j]=0;
00538   }
00539   for (double theta=DegreeStep/180.0*M_PI; theta<=MaxCamAngle_; theta+=DegreeStep/180.0*M_PI) {
00540     double CalMaxCamAngle;
00541     double CalTheta;
00542     // calculate calibrated angles
00543     interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00544     interpolatorAngle_.SplineFromLuT(CalTheta, theta);
00545     // apply calculate calibrated radius from calibrated angles
00546     double rSrc = radius_ * CalTheta/CalMaxCamAngle;
00547
00548     if (ImageDraw<StorageType>::CircleCenter(src, (int)principalX_, (int)principalY_, (int)rSrc, Color)!=0){
00549       delete [] Color;
00550       return -1;
00551     }
00552   }
00553   delete [] Color;
00554   return 0;
00555 }
00556
00557
00558 int SphericalUndistortion::TransfCoordImage2Sphere (const HomgPoint2D& Source,
00559                                                 double &theta,
00560                                                 double &phi) const {
00561   double SourceX, SourceY;
00562   SourceX = Source[0]/Source[2];
00563   SourceY = Source[1]/Source[2];
00564   theta = phi = 0;
00565
00566   return TransfCoordImage2Sphere (SourceX, SourceY, theta, phi);
00567
00568 }
00569
00570
00571 int SphericalUndistortion::TransfCoordImage2Sphere(const double& SourceX,
00572                                                const double& SourceY,
00573                                                double &theta,
00574                                                double &phi) const {
00575   if (!IsInitialized_) {
00576 #ifdef BIAS_DEBUG
00577     BIASERR("Sphere Projections was not initialized!");
00578 #endif
00579     return -1;
00580   }
00581
00582   theta = phi = 0;
00583
00584   double rSrc = sqrt((SourceX-principalX_)*(SourceX-principalX_)+(SourceY-principalY_)*(SourceY-principalY_));
00585
00586   if (rSrc>radius_) {
00587 #ifdef BIAS_DEBUG
00588     //BIASERR("point not in circle image!");
00589 #endif
00590     return -1;
00591   }
00592 //   cout << principalX_ << " " <<  principalY_ << " "
00593 //   <<  MaxCamAngle_ << " " << radius_ << endl;
00594   phi = atan2(SourceY-principalY_,SourceX-principalX_);
00595
00596   double CalMaxCamAngle=0;
00597   // calculate calibrated maximum angle
00598   //interpolatorAngle_.Spline(CalMaxCamAngle, MaxCamAngle_, 4);
00599   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00600
00601   // calculate calibrated maximum radius
00602   double RadiusCalMax = MaxCamAngle_/CalMaxCamAngle*radius_;
00603   // calculate calibrated theta and inverse
00604   double CalTheta = rSrc/RadiusCalMax*MaxCamAngle_;
00605   //  interpolatorAngleBack_.Spline(theta, CalTheta,4);
00606   interpolatorAngleBack_.SplineFromLuT(theta, CalTheta);
00607
00608   return 0;
00609 }
00610
00611 int SphericalUndistortion::TransfCoordRotateSphere2Image(double theta,
00612                                                      double phi,
00613                                                      const double& viewCenterX,
00614                                                      const double& viewCenterY,
00615                                                      HomgPoint2D &Source) const
00616 {
00617   double sx, sy;
00618   sx=sy=0;
00619   if (TransfCoordRotateSphere2Image(theta, phi,
00620                                     viewCenterX, viewCenterY,
00621                                     sx, sy)<0) {
00622     return -1;
00623   } else {
00624     Source[0] = sx;
00625     Source[1] = sy;
00626     Source[2] = 1;
00627     return 0;
00628   }
00629 }
00630
00631 int
00632 SphericalUndistortion::TransfCoordRotateSphere2Image(double theta,
00633                                                      double phi,
00634                                                      const double& viewCenterX,
00635                                                      const double& viewCenterY,
00636                                                      double &SourceX,
00637                                                      double &SourceY) const
00638 {
00639   if (!IsInitialized_) {
00640 #ifdef BIAS_DEBUG
00641     BIASERR("Sphere Projections was not initialized!");
00642 #endif
00643     return -1;
00644   }
00645
00646   SourceX = SourceY = 0;
00647   double viewTheta, viewPhi;
00648   if (TransfCoordImage2Sphere(viewCenterX, viewCenterY,
00649                               viewTheta, viewPhi)!=0) {
00650     return -1;
00651   }
00652   // avoid z-rotation by changing the rotation axes
00653   Vector3<double> vecPoint(1.0,phi,theta);
00654   Vector3<double> vecView(1.0,viewPhi,viewTheta);
00655   //Vector3<double> vecCenter(0,0,1);
00656   Vector3<double> vecAxis(cos(viewPhi+M_PI/2),sin(viewPhi+M_PI/2),0);
00657   Vector3<double> vecRot(0,0,0);
00658   vecPoint = vecPoint.CoordSphereToEuclidian();
00659   vecView = vecView.CoordSphereToEuclidian();
00660   /*
00661   // With 1 rotation and moving axis
00662   RMatrix rMat;
00663     rMat.Set(vecAxis, viewTheta);
00664   double x,y,z;
00665   rMat.GetRotationAnglesZYX(x,y,z);
00666   vecRot = rMat*vecPoint;
00667   //cout << x << "," << y << "," << z << endl;
00668   */
00669
00670   //With Quaternions
00671   Quaternion<double> rot;
00672   rot.SetValueAsAxisRad (vecAxis, viewTheta);
00673   rot.MultVec(vecPoint, vecRot);
00674
00675   /*
00676   //With 2 rotations alpha, beta (wrong rotation!!)
00677   // viewAlpha: angle between x-z-Plane and vecView
00678   double viewAlpha = -1 * atan2(vecView[1],vecView[2]);
00679   // viewBeta: angle between y-z-Plane and vecView
00680   double viewBeta = atan2(vecView[0],vecView[2]);
00681   RMatrix rMat;
00682   rMat.SetZYX(viewAlpha,viewBeta,0);
00683   vecRot = rMat*vecPoint;
00684   */
00685
00686   vecRot = vecRot.CoordEuclidianToSphere();
00687   phi = vecRot[1];
00688   theta = vecRot[2];
00689
00690   if (theta > MaxCamAngle_) return -1;
00691   if (phi>M_PI) phi-=2*M_PI;
00692
00693   double CalMaxCamAngle=0;
00694   double CalTheta=0;
00695   // calculate calibrated angles
00696   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00697   interpolatorAngle_.SplineFromLuT(CalTheta, theta);
00698   // apply calculate calibrated radius from calibrated angles
00699   double rSrc = radius_ * CalTheta/CalMaxCamAngle;
00700
00701   SourceX = rSrc * cos(phi) + principalX_;
00702   SourceY = rSrc * sin(phi) + principalY_;
00703
00704   return 0;
00705 }
00706
00707
00708 int SphericalUndistortion::TransfCoordSphere2Image(const double& theta,
00709                                                    const double& phi,
00710                                                    HomgPoint2D &Source) const
00711 {
00712   double sx, sy;
00713   sx=sy=0;
00714   if (TransfCoordSphere2Image(theta, phi, sx, sy)<0) {
00715     return -1;
00716   } else {
00717     Source[0] = sx;
00718     Source[1] = sy;
00719     Source[2] = 1;
00720     return 0;
00721   }
00722 }
00723
00724
00725 int SphericalUndistortion::TransfCoordSphere2Image(const double &theta,
00726                                                    const double &phi,
00727                                                    double &SourceX,
00728                                                    double &SourceY) const {
00729
00730   if (!IsInitialized_) {
00731 #ifdef BIAS_DEBUG
00732     BIASERR("Sphere Projections was not initialized!");
00733 #endif
00734     return -1;
00735   }
00736
00737   SourceX = SourceY = 0;
00738
00739   if (theta<0 || theta>MaxCamAngle_) {
00740 #ifdef BIAS_DEBUG
00741     BIASERR("Angle theta out of range! theta="<<theta);
00742 #endif
00743     return -1;
00744   }
00745
00746   if (phi<-M_PI || phi>M_PI) {
00747 #ifdef BIAS_DEBUG
00748     BIASERR("Angle phi out of range! phi="<<phi);
00749 #endif
00750     return -1;
00751   }
00752
00753   double CalMaxCamAngle=0;
00754   double CalTheta=0;
00755   // calculate calibrated angles
00756   interpolatorAngle_.SplineFromLuT(CalMaxCamAngle, MaxCamAngle_);
00757   interpolatorAngle_.SplineFromLuT(CalTheta, theta);
00758   // apply calculate calibrated radius from calibrated angles
00759   double rSrc = radius_ * CalTheta/CalMaxCamAngle;
00760   //cout << CalMaxCamAngle<< ","<< CalTheta << "," << rSrc << endl;
00761   SourceX = rSrc * cos(phi) + principalX_;
00762   SourceY = rSrc * sin(phi) + principalY_;
00763
00764   return 0;
00765 }
00766
00767 int SphericalUndistortion::TransfCoordSphere2CalibImage(const double &theta,
00768                                                         const double &phi,
00769                                                         HomgPoint2D &Source)
00770   const {
00771   double sx, sy;
00772   sx=sy=0;
00773   if (TransfCoordSphere2CalibImage(theta, phi, sx, sy)<0) {
00774     return -1;
00775   } else {
00776     Source[0] = sx;
00777     Source[1] = sy;
00778     Source[2] = 1;
00779     return 0;
00780   }
00781 }
00782
00783 int SphericalUndistortion::EnforceNormalRange(double& theta,
00784                                               double& phi) const {
00785
00786   // theta and phi are periodic in 2*M_PI, if they are out of a suitable
00787   // range, try to find best equivalent angle by adding 2*l*M_PI
00788
00789   if (theta<0.0) {
00790     const int count = (int) ((double)theta / (M_PI*(-2.0)));
00791     theta += ((double)count+1.0) * M_PI*2.0;
00792     if (theta>MaxCamAngle_) {
00793       BIASERR("Angle theta out of range!"<<theta);
00794       return -1;
00795     }
00796   } else if (theta>MaxCamAngle_) {
00797     const int count = (int) ((double)theta / (M_PI*(2.0)));
00798     theta -= ((double)count+1.0) * M_PI*2.0;
00799     if (theta<0.0) {
00800       BIASERR("Angle theta out of range: "<<theta);
00801       return -2;
00802     }
00803   }
00804
00805   if (phi<-M_PI) {
00806     const int count = (int) ((double)phi / (M_PI*(-2.0)));
00807     phi += ((double)count+1.0) * M_PI*2.0;
00808     if (phi>M_PI) {
00809       BIASERR("Angle phi out of range:"<<phi);
00810       return -3;
00811     }
00812   } else if (phi>M_PI) {
00813     const int count = (int)((double)phi / (M_PI*(2.0)));
00814     phi -= ((double)count+1.0) * M_PI*2.0;
00815     if (phi<-M_PI) {
00816       BIASERR("Angle phi out of range: "<<phi);
00817       return -4;
00818     }
00819   }
00820   return 0;
00821 }
00822
00823 int SphericalUndistortion::TransfCoordSphere2CalibImage(const double& theta,
00824                                                         const double& phi,
00825                                                         double &SourceX,
00826                                                         double &SourceY) const{
00827
00828   if (!IsInitialized_) {
00829 #ifdef BIAS_DEBUG
00830     BIASERR("Sphere Projections was not initialized!");
00831 #endif
00832     return -1;
00833   }
00834
00835   SourceX = SourceY = 0;
00836
00837   if (theta<0 || theta>MaxCamAngle_) {
00838 #ifdef BIAS_DEBUG
00839     //BIASERR("Angle theta out of range!");
00840 #endif
00841     return -1;
00842   }
00843
00844   if (phi<-M_PI || phi>M_PI) {
00845 #ifdef BIAS_DEBUG
00846     //BIASERR("Angle phi out of range!");
00847 #endif
00848     return -1;
00849   }
00850
00851   // apply radius from calibrated angles
00852   double rSrc = radius_ * theta/MaxCamAngle_;
00853
00854   SourceX = rSrc * cos(phi) + principalX_;
00855   SourceY = rSrc * sin(phi) + principalY_;
00856
00857   return 0;
00858
00859 }
00860
00861
00862 // JW
00863 #ifdef WIN32
00864 # ifdef max
00865 #   undef max
00866 #  endif // max
00867 #endif //WIN32
00868
00869
00870 template <class StorageType>
00871 int SphericalUndistortion::CorrectVignette(Image<StorageType>& src) {
00872
00873   if (!IsInitialized_) {
00874 #ifdef BIAS_DEBUG
00875     BIASERR("Sphere Projections was not initialized!");
00876 #endif
00877     return -1;
00878   }
00879   if (IlluCorrX_.size()<2 || IlluCorrY_.size()<2) return 0;
00880
00881   StorageType** Data=src.GetImageDataArray();
00882
00883   const StorageType maxVal = (StorageType) ::std::numeric_limits<StorageType>::max(); // JW
00884   double illuFac=0;
00885   double theta=0, phi=0;
00886   for (unsigned int y=0; y<src.GetHeight(); y++) {
00887     for (unsigned int x=0; x<src.GetWidth(); x++) {
00888       HomgPoint2D hp(x,y);
00889       TransfCoordImage2Sphere(hp, theta, phi);
00890       for (unsigned int j=0; j<src.GetChannelCount(); j++) {
00891         interpolatorIllu_.Spline(illuFac, theta,4);
00892         // clip overflow range: JW
00893         // JW TODO: liek this: if ((double)Data[y][x*src.GetChannelCount()+j]) / (double)maxVal >= illuFac ) {
00894         if (Data[y][x*src.GetChannelCount()+j]/illuFac > maxVal) {
00895           Data[y][x*src.GetChannelCount()+j] = maxVal;
00896         } else {
00897           Data[y][x*src.GetChannelCount()+j] =
00898             StorageType((float)Data[y][x*src.GetChannelCount()+j]/illuFac);
00899         }
00900       }
00901     }
00902   }
00903   return 0;
00904 }
00905
00906
00907 int SphericalUndistortion::
00908 SetupProjectionLUT(const unsigned int& srcwidth,const unsigned int& srcheight,
00909            const unsigned int &ChanCnt,
00910            const unsigned int& SizeX, const unsigned int& SizeY,
00911            const double& CenterX, const double& CenterY,
00912            const int projectionType, KMatrix& K)
00913 {
00914   if (!IsInitialized_) {
00915 #ifdef BIAS_DEBUG
00916     BIASERR("Sphere Projections was not initialized!");
00917 #endif
00918     return -1;
00919   }
00920   CutOutWidth_ = SizeX;
00921   CutOutHeight_ = SizeY;
00922   double viewCenterX = CenterX;
00923   double viewCenterY = CenterY;
00924   if (viewCenterX==0) viewCenterX = principalX_;
00925   if (viewCenterY==0) viewCenterY = principalY_;
00926
00927   double theta1,theta2,phi,fovx,fovy; //fov is half field of view!
00928   double dSX = double(SizeX)/2.0;
00929   double dSY = double(SizeY)/2.0;
00930   TransfCoordImage2Sphere(viewCenterX - dSX,viewCenterY ,theta1,phi);
00931   TransfCoordImage2Sphere( viewCenterX + dSX,viewCenterY ,theta2,phi);
00932   fovx = theta2+theta1;
00933   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVX:"
00934       <<fovx * 180.0 / M_PI<<endl;
00935
00936   TransfCoordImage2Sphere(viewCenterX,viewCenterY - dSY,theta1,phi);
00937   TransfCoordImage2Sphere(viewCenterX,viewCenterY + dSY,theta2,phi);
00938   fovy = theta2+theta1;
00939   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVY:"
00940       <<fovy * 180.0 / M_PI<<endl;
00941   K.SetIdentity();
00942   K[0][0] = dSX / tan(fovx/2.0);
00943   K[1][1] = dSY / tan(fovy/2.0);
00944   K[0][2] = dSX;  K[1][2] = dSY;
00945
00946   if (LuT_ !=NULL)  delete[] LuT_;
00947   LuT_ = new LuTEntry[SizeX * SizeY];
00948   LuTEntry *currLE = LuT_;
00949
00950   // go through pixels in dest image (backward mapping)
00951   for (unsigned int y=0; y<SizeY; y++) {
00952     for (unsigned int x=0; x<SizeX; x++) {
00953       double xSrc, ySrc;
00954       int ret=0;
00955       HomgPoint2D Source, Dest;
00956       Source[0]=(double)x;
00957       Source[1]=(double)y;
00958       Source[2]=1;
00959       ProjectCoordBack(projectionType, K, Source, Dest);
00960       if ((viewCenterX!=0 && viewCenterX!=principalX_) ||
00961           (viewCenterY!=0 && viewCenterY!=principalY_)) {
00962         double t, p;
00963         ret = TransfCoordImage2Sphere (Dest[0], Dest[1], t, p);
00964         ret = TransfCoordRotateSphere2Image(t, p,
00965                                             viewCenterX, viewCenterY,
00966                                             xSrc, ySrc);
00967       } else {
00968         xSrc=Dest[0];
00969         ySrc=Dest[1];
00970       }
00971
00972       if (ret==-1) {
00973         xSrc=ySrc=0;
00974     BIASABORT;
00975       }
00976       if (xSrc<0 || xSrc>srcwidth-1) xSrc=0;
00977       if (ySrc<0 || ySrc>srcheight-1) ySrc=0;
00978
00979       //xSrc,ySrc are the coordinates in the original image typically between
00980       // four pixels, so find the neighbours for bilinear interpolation
00981       unsigned int x_floor = (unsigned int)floor(xSrc);
00982       unsigned int y_floor = (unsigned int)floor(ySrc);
00983       unsigned int x_ceil = x_floor+1;
00984       unsigned int y_ceil = y_floor+1;
00985       currLE->weight[0] = (unsigned int)rint((xSrc - x_floor)*256);
00986       currLE->weight[1] = (unsigned int)rint((ySrc - y_floor)*256);
00987 //       currLE->weight[0] = xSrc - x_floor;
00988 //       currLE->weight[1] = ySrc - y_floor;
00989
00990       // calculate the offsetes in the image data array for all four corners
00991       // but only for the first channel of ChanCnt
00992       currLE->offset[0] = (y_floor * srcwidth + x_floor) * ChanCnt;
00993       currLE->offset[1] = (y_ceil * srcwidth + x_floor) * ChanCnt;
00994       currLE->offset[2] = (y_ceil * srcwidth + x_ceil) * ChanCnt;
00995       currLE->offset[3] = (y_floor * srcwidth + x_ceil) * ChanCnt;
00996       currLE++;
00997     }
00998   }
00999   return 0;
01000 }
01001
01002
01003 //template <> int SphericalUndistortion::
01004 int SphericalUndistortion::
01005 ProjectCutOut(const Image<unsigned char>& src,Image<unsigned char>& dst)
01006 {
01007   BIASASSERT(!dst.IsEmpty());
01008
01009   unsigned char *srcp, *dstp;
01010   srcp = src.GetImageData();
01011   dstp = dst.GetImageData();
01012   if (src.GetChannelCount() ==1) {
01013     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01014       unsigned char ul = *(srcp + LuT_[i].offset[0]); //ida[y_floor][x_floor];
01015       unsigned char ll = *(srcp + LuT_[i].offset[1]);// ida[y_ceil][x_floor];
01016       unsigned char lr = *(srcp + LuT_[i].offset[2]);// ida[y_ceil][x_ceil];
01017       unsigned char ur = *(srcp + LuT_[i].offset[3]); // ida[y_floor][x_ceil];
01018       unsigned int dx = LuT_[i].weight[0];
01019       unsigned int dy = LuT_[i].weight[1];
01020       *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01021
01022 //       float dx = (float)LuT_[i].weight[0] / 256.0;
01023 //       float dy = (float)LuT_[i].weight[1] / 256.0;
01024 //       float top = ((float)ul * (1.0-dx)) +(ur * dx);
01025 //       float bottom = ((float)ll * (1.0-dx)) +(lr * dx);
01026 //       *dstp = (unsigned char)rint(top * (1.0-dy) + bottom * dy);
01027 //       *dstp = (ul + ur + ll + lr)/4; // this is MEAN
01028       dstp++;
01029     }
01030   }
01031   else {
01032     unsigned int cc = src.GetChannelCount();
01033     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01034       for (unsigned int c=0; c<cc; c++) {
01035     unsigned char ul = *(srcp + LuT_[i].offset[0] + c);
01036     unsigned char ll = *(srcp + LuT_[i].offset[1] + c);
01037     unsigned char lr = *(srcp + LuT_[i].offset[2] + c);
01038     unsigned char ur = *(srcp + LuT_[i].offset[3] + c);
01039     unsigned int dx = LuT_[i].weight[0];
01040     unsigned int dy = LuT_[i].weight[1];
01041     *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01042     dstp++;
01043       }
01044     }
01045
01046
01047   }
01048   return 0;
01049 }
01050
01051
01052
01053 int SphericalUndistortion::
01054 SetupLutPxPySphere1(const unsigned int srcwidth,const unsigned int srcheight,
01055                    const unsigned int ChanCnt, const double stepwidth) {
01056
01057   if (!IsInitialized_) {
01058 #ifdef BIAS_DEBUG
01059     BIASERR("Sphere Projections was not initialized!");
01060 #endif
01061     return -1;
01062   }
01063   int SizeX = (int) floor(M_PI/stepwidth+1);
01064   int SizeY = (int) floor(M_PI/stepwidth+1);
01065   if (LuTPxPySphere_ !=NULL)  delete[] LuTPxPySphere_;
01066   LuTPxPySphere_ = new LuTEntry[SizeX * SizeY];
01067   LuTEntry *currLE = LuTPxPySphere_;
01068
01069   // go through pixels in dest image (backward mapping)
01070   for (double PhiY=-M_PI_2; PhiY<M_PI_2; PhiY+=stepwidth) {
01071     for (double PhiX=-M_PI_2; PhiX<M_PI_2; PhiX+=stepwidth) {
01072
01073       // pixel coordinates in source image
01074       double xSrc, ySrc;
01075
01076       // transfer coordinates PhiX, PhiY to polar coordinates phi, theta (r=1)
01077
01078       double cx = cos(PhiX);
01079       double cy = cos(PhiY);
01080       double sx = sin(PhiX);
01081       double sy = sin(PhiY);
01082       double cx2 = cx*cx;
01083       double cy2 = cy*cy;
01084       double cx4 = cx2*cx2;
01085       double cy4 = cy2*cy2;
01086       double cx2cy2 = cx2*cy2;
01087       double phi = atan2(-cx*cy2*sqrt(-(-1+cx2cy2)/cx2/cy4)*sx/
01088                          (-1+cx2cy2),
01089                          1/sqrt(-(-1+cx2cy2)/cx2/cy2)*sy/cy);
01090
01091       double theta = atan2(cx2cy2*sqrt(-(-1+cx2cy2)/cx4/cy4),
01092                            cx2cy2*sqrt(-(-1+cx2cy2)/cx4/cy4)/
01093                            sqrt(-(-1+cx2cy2)/cx2/cy2));
01094
01095       // finds x, y in sphere image
01096       if (theta<MaxCamAngle_ && theta>=0 &&
01097           phi>-M_PI && phi<M_PI) {
01098         TransfCoordSphere2Image(theta, phi, xSrc, ySrc);
01099       }
01100
01101       if (xSrc<0 || xSrc>srcwidth-1) xSrc=0;
01102       if (ySrc<0 || ySrc>srcheight-1) ySrc=0;
01103
01104       //  cout << "PhiX, PhiY=" << PhiX << ", " << PhiY << endl;
01105       // cout << "xSrc, ySrc=" << xSrc << ", " << ySrc << endl;
01106       // cout << "theta, phi=" << theta << ", " << phi << endl;
01107
01108       //xSrc,ySrc are the coordinates in the original image typically between
01109       // four pixels, so find the neighbours for bilinear interpolation
01110       unsigned int x_floor = (unsigned int)floor(xSrc);
01111       unsigned int y_floor = (unsigned int)floor(ySrc);
01112       unsigned int x_ceil = x_floor+1;
01113       unsigned int y_ceil = y_floor+1;
01114       currLE->weight[0] = (unsigned int)rint((xSrc - x_floor)*256);
01115       currLE->weight[1] = (unsigned int)rint((ySrc - y_floor)*256);
01116
01117       // calculate the offsetes in the image data array for all four corners
01118       // but only for the first channel of ChanCnt
01119       currLE->offset[0] = (y_floor * srcwidth + x_floor) * ChanCnt;
01120       currLE->offset[1] = (y_ceil * srcwidth + x_floor) * ChanCnt;
01121       currLE->offset[2] = (y_ceil * srcwidth + x_ceil) * ChanCnt;
01122       currLE->offset[3] = (y_floor * srcwidth + x_ceil) * ChanCnt;
01123       currLE++;
01124     }
01125   }
01126   return 0;
01127 }
01128
01129 int SphericalUndistortion::
01130 SetupLutPerspPxPy1(const unsigned int SizeX, const unsigned int SizeY,
01131                   const int projectionType, KMatrix& K)
01132 {
01133   if (!IsInitialized_) {
01134 #ifdef BIAS_DEBUG
01135     BIASERR("Sphere Projections was not initialized!");
01136 #endif
01137     return -1;
01138   }
01139
01140   CutOutWidth_ = SizeX;
01141   CutOutHeight_ = SizeY;
01142
01143   double theta1,theta2,phi,fovx,fovy; //fov is half field of view!
01144   double dSX = double(SizeX)/2.0;
01145   double dSY = double(SizeY)/2.0;
01146   TransfCoordImage2Sphere(principalX_ - dSX,principalY_ ,theta1, phi);
01147   TransfCoordImage2Sphere(principalX_ + dSX,principalY_ ,theta2, phi);
01148   fovx = theta2+theta1;
01149   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVX:"
01150       <<fovx * 180.0 / M_PI<<endl;
01151
01152   TransfCoordImage2Sphere(principalX_, principalY_ - dSY,theta1, phi);
01153   TransfCoordImage2Sphere(principalX_, principalY_ + dSY,theta2, phi);
01154   fovy = theta2+theta1;
01155   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVY:"
01156       <<fovy * 180.0 / M_PI<<endl;
01157   K.SetIdentity();
01158   K[0][0] = dSX / tan(fovx/2.0);
01159   K[1][1] = dSY / tan(fovy/2.0);
01160   K[0][2] = dSX;  K[1][2] = dSY;
01161
01162   if (LuTPerspPxPy_ !=NULL)  delete[] LuTPerspPxPy_;
01163   LuTPerspPxPy_ = new LuTpxpyEntry[SizeX * SizeY];
01164   LuTpxpyEntry *currLE =LuTPerspPxPy_;
01165
01166   // go through pixels in dest image (backward mapping)
01167   for (unsigned int y=0; y<SizeY; y++) {
01168     for (unsigned int x=0; x<SizeX; x++) {
01169
01170       double PhiX, PhiY;
01171       HomgPoint2D Source, Dest;
01172       Source[0]=(double)x;
01173       Source[1]=(double)y;
01174       Source[2]=1;
01175       ProjectCoordBack(projectionType, K, Source, Dest);
01176
01177       double theta, phi;
01178       if (TransfCoordImage2Sphere (Dest[0], Dest[1], theta, phi)<0) {
01179         PhiX=PhiY=0;
01180         BIASABORT;
01181       }
01182
01183       // transfer polar coordinates phi, theta (r=1) to coordinates PhiX, PhiY
01184       double mx = sin(theta)*cos(phi);
01185       double my = sin(theta)*sin(phi);
01186       double mz = cos(theta);
01187       PhiX = atan2(my,sqrt(mx*mx+mz*mz));
01188       PhiY = atan2(mx,mz);
01189
01190       // display pxpy-sphere-lut without modifiction
01191       //double eps = 0.05;
01192       //PhiX=(((double)x)/((double)SizeX)-0.5)*(M_PI-2*eps);
01193       //PhiY=(((double)y)/((double)SizeY)-0.5)*(M_PI-2*eps);
01194       //cout << "PhiX, PhiY=" << PhiX << ", " << PhiY << endl;
01195
01196       // PhiX, PhiY are the coordinates in the intermediate image
01197       // representation. the intermediate table should be big in
01198       // comparison to the source image resolution, because no
01199       // interpolation is done here.
01200       currLE->PhiX=PhiX;
01201       currLE->PhiY=PhiY;
01202       currLE++;
01203     }
01204   }
01205   return 0;
01206 }
01207
01208 //template <> int SphericalUndistortion::
01209 int SphericalUndistortion::
01210 ProjectCutOut1(const Image<unsigned char>& src,Image<unsigned char>& dst,
01211               const double stepwidth,
01212               const double& yaw, const double& pitch, const double& roll)
01213 {
01214   BIASASSERT(!dst.IsEmpty());
01215
01216   unsigned char *srcp, *dstp;
01217   srcp = src.GetImageData();
01218   dstp = dst.GetImageData();
01219   //      LuTEntry *LuTPxPySphere_;
01220   //unsigned int *LuTPerspPxPy_;
01221   unsigned int sizePhiY  = (int) floor(M_PI/stepwidth+1);
01222   //  if (src.GetChannelCount() ==1) {
01223     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01224       float PhiX = LuTPerspPxPy_[i].PhiX;
01225       float PhiY = LuTPerspPxPy_[i].PhiY;
01226       PhiX += pitch;
01227       PhiY += yaw;
01228       //cout << "PhiX, PhiY=" << PhiX << ", " << PhiY << endl;
01229       unsigned int px = (unsigned int)( rint((PhiX+M_PI_2)/stepwidth) );
01230       unsigned int py = (unsigned int)( rint((PhiY+M_PI_2)/stepwidth) );
01231       unsigned int l = py * sizePhiY + px;
01232       unsigned char ul = *(srcp + LuTPxPySphere_[l].offset[0]);
01233       unsigned char ll = *(srcp + LuTPxPySphere_[l].offset[1]);
01234       unsigned char lr = *(srcp + LuTPxPySphere_[l].offset[2]);
01235       unsigned char ur = *(srcp + LuTPxPySphere_[l].offset[3]);
01236       unsigned int dx = LuTPxPySphere_[l].weight[0];
01237       unsigned int dy = LuTPxPySphere_[l].weight[1];
01238       *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01239
01240 //       float dx = (float)LuT_[i].weight[0] / 256.0;
01241 //       float dy = (float)LuT_[i].weight[1] / 256.0;
01242 //       float top = ((float)ul * (1.0-dx)) +(ur * dx);
01243 //       float bottom = ((float)ll * (1.0-dx)) +(lr * dx);
01244 //       *dstp = (unsigned char)rint(top * (1.0-dy) + bottom * dy);
01245 //       *dstp = (ul + ur + ll + lr)/4; // this is MEAN
01246       dstp++;
01247     }
01248     //  } else {
01249 //     unsigned int cc = src.GetChannelCount();
01250 //     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01251 //       for (unsigned int c=0; c<cc; c++) {
01252 //  unsigned char ul = *(srcp + LuT_[i].offset[0] + c);
01253 //  unsigned char ll = *(srcp + LuT_[i].offset[1] + c);
01254 //  unsigned char lr = *(srcp + LuT_[i].offset[2] + c);
01255 //  unsigned char ur = *(srcp + LuT_[i].offset[3] + c);
01256 //  unsigned int dx = LuT_[i].weight[0];
01257 //  unsigned int dy = LuT_[i].weight[1];
01258 //  *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01259 //  dstp++;
01260 //       }
01261 //     }
01262
01263
01264 //   }
01265   return 0;
01266 }
01267
01268
01269 int SphericalUndistortion::
01270 SetupLutPxPySphere2(const unsigned int srcwidth,const unsigned int srcheight,
01271                    const unsigned int ChanCnt, const double stepwidth) {
01272
01273   if (!IsInitialized_) {
01274 #ifdef BIAS_DEBUG
01275     BIASERR("Sphere Projections was not initialized!");
01276 #endif
01277     return -1;
01278   }
01279   int SizeX = (int) floor(2*M_PI/stepwidth+1);
01280   int SizeY = (int) floor(M_PI_2/stepwidth+1);
01281   if (LuTPxPySphere_ !=NULL)  delete[] LuTPxPySphere_;
01282   LuTPxPySphere_ = new LuTEntry[SizeX * SizeY];
01283   LuTEntry *currLE = LuTPxPySphere_;
01284
01285   // go through pixels in dest image (backward mapping)
01286   for (double theta=0; theta<M_PI_2; theta+=stepwidth) {
01287     for (double phi=-M_PI; phi<M_PI; phi+=stepwidth) {
01288
01289       // pixel coordinates in source image
01290       double xSrc, ySrc;
01291
01292       // finds x, y in sphere image
01293       if (theta<MaxCamAngle_ && theta>=0 &&
01294           phi>-M_PI && phi<M_PI) {
01295         TransfCoordSphere2Image(theta, phi, xSrc, ySrc);
01296       }
01297
01298       if (xSrc<0 || xSrc>srcwidth-1) xSrc=0;
01299       if (ySrc<0 || ySrc>srcheight-1) ySrc=0;
01300
01301       //  cout << "PhiX, PhiY=" << PhiX << ", " << PhiY << endl;
01302       // cout << "xSrc, ySrc=" << xSrc << ", " << ySrc << endl;
01303       // cout << "theta, phi=" << theta << ", " << phi << endl;
01304
01305       //xSrc,ySrc are the coordinates in the original image typically between
01306       // four pixels, so find the neighbours for bilinear interpolation
01307       unsigned int x_floor = (unsigned int)floor(xSrc);
01308       unsigned int y_floor = (unsigned int)floor(ySrc);
01309       unsigned int x_ceil = x_floor+1;
01310       unsigned int y_ceil = y_floor+1;
01311       currLE->weight[0] = (unsigned int)rint((xSrc - x_floor)*256);
01312       currLE->weight[1] = (unsigned int)rint((ySrc - y_floor)*256);
01313
01314       // calculate the offsetes in the image data array for all four corners
01315       // but only for the first channel of ChanCnt
01316       currLE->offset[0] = (y_floor * srcwidth + x_floor) * ChanCnt;
01317       currLE->offset[1] = (y_ceil * srcwidth + x_floor) * ChanCnt;
01318       currLE->offset[2] = (y_ceil * srcwidth + x_ceil) * ChanCnt;
01319       currLE->offset[3] = (y_floor * srcwidth + x_ceil) * ChanCnt;
01320       currLE++;
01321     }
01322   }
01323   return 0;
01324 }
01325
01326 int SphericalUndistortion::
01327 SetupLutPerspPxPy2(const unsigned int SizeX, const unsigned int SizeY,
01328                   const int projectionType, KMatrix& K)
01329 {
01330   if (!IsInitialized_) {
01331 #ifdef BIAS_DEBUG
01332     BIASERR("Sphere Projections was not initialized!");
01333 #endif
01334     return -1;
01335   }
01336
01337   CutOutWidth_ = SizeX;
01338   CutOutHeight_ = SizeY;
01339
01340   double theta1,theta2,phi,fovx,fovy; //fov is half field of view!
01341   double dSX = double(SizeX)/2.0;
01342   double dSY = double(SizeY)/2.0;
01343   TransfCoordImage2Sphere(principalX_ - dSX,principalY_ ,theta1, phi);
01344   TransfCoordImage2Sphere(principalX_ + dSX,principalY_ ,theta2, phi);
01345   fovx = theta2+theta1;
01346   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVX:"
01347       <<fovx * 180.0 / M_PI<<endl;
01348
01349   TransfCoordImage2Sphere(principalX_, principalY_ - dSY,theta1, phi);
01350   TransfCoordImage2Sphere(principalX_, principalY_ + dSY,theta2, phi);
01351   fovy = theta2+theta1;
01352   cout<<"Theta1: "<<theta1<<" theta2: "<<theta2<<" FoVY:"
01353       <<fovy * 180.0 / M_PI<<endl;
01354   K.SetIdentity();
01355   K[0][0] = dSX / tan(fovx/2.0);
01356   K[1][1] = dSY / tan(fovy/2.0);
01357   K[0][2] = dSX;  K[1][2] = dSY;
01358
01359   if (LuTPerspPxPy_ !=NULL)  delete[] LuTPerspPxPy_;
01360   LuTPerspPxPy_ = new LuTpxpyEntry[SizeX * SizeY];
01361   LuTpxpyEntry *currLE =LuTPerspPxPy_;
01362
01363   // go through pixels in dest image (backward mapping)
01364   for (unsigned int y=0; y<SizeY; y++) {
01365     for (unsigned int x=0; x<SizeX; x++) {
01366
01367       double PhiX, PhiY;
01368       HomgPoint2D Source, Dest;
01369       Source[0]=(double)x;
01370       Source[1]=(double)y;
01371       Source[2]=1;
01372       ProjectCoordBack(projectionType, K, Source, Dest);
01373
01374       double theta, phi;
01375       if (TransfCoordImage2Sphere (Dest[0], Dest[1], theta, phi)<0) {
01376         PhiX=PhiY=0;
01377         BIASABORT;
01378       }
01379
01380       // PhiX, PhiY are the coordinates in the intermediate image
01381       // representation. the intermediate table should be big in
01382       // comparison to the source image resolution, because no
01383       // interpolation is done here.
01384       currLE->PhiX=theta;
01385       currLE->PhiY=phi;
01386       currLE++;
01387     }
01388   }
01389   return 0;
01390 }
01391
01392 //template <> int SphericalUndistortion::
01393 int SphericalUndistortion::
01394 ProjectCutOut2(const Image<unsigned char>& src,Image<unsigned char>& dst,
01395               const double stepwidth,
01396               const double& yaw, const double& pitch, const double& roll)
01397 {
01398   BIASASSERT(!dst.IsEmpty());
01399
01400   unsigned char *srcp, *dstp;
01401   srcp = src.GetImageData();
01402   dstp = dst.GetImageData();
01403   //      LuTEntry *LuTPxPySphere_;
01404   //unsigned int *LuTPerspPxPy_;
01405   unsigned int sizePhi  = (int) floor(2*M_PI/stepwidth+1);
01406   //  if (src.GetChannelCount() ==1) {
01407     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01408       float theta = LuTPerspPxPy_[i].PhiX;
01409       float phi = LuTPerspPxPy_[i].PhiY;
01410
01411      // transfer coordinates yaw, pitch to polar coordinates phi, theta (r=1)
01412       double cx = cos(pitch);
01413       double cy = cos(yaw);
01414       double sx = sin(pitch);
01415       double sy = sin(yaw);
01416       double cx2 = cx*cx;
01417       double cy2 = cy*cy;
01418       double cx4 = cx2*cx2;
01419       double cy4 = cy2*cy2;
01420       double cx2cy2 = cx2*cy2;
01421       double dphi = atan2(-cx*cy2*sqrt(-(-1+cx2cy2)/cx2/cy4)*sx/
01422                          (-1+cx2cy2),
01423                          1/sqrt(-(-1+cx2cy2)/cx2/cy2)*sy/cy);
01424
01425       double dtheta = atan2(cx2cy2*sqrt(-(-1+cx2cy2)/cx4/cy4),
01426                            cx2cy2*sqrt(-(-1+cx2cy2)/cx4/cy4)/
01427                            sqrt(-(-1+cx2cy2)/cx2/cy2));
01428       theta += dtheta;
01429       phi += dphi;
01430       cout << "dtheta, dphi=" << dtheta << ", " << dphi << endl;
01431       unsigned int itheta = (unsigned int)rint(theta/stepwidth);
01432       unsigned int iphi = (unsigned int)rint((phi+M_PI)/stepwidth);
01433       unsigned int l = itheta * sizePhi + iphi;
01434       unsigned char ul = *(srcp + LuTPxPySphere_[l].offset[0]);
01435       unsigned char ll = *(srcp + LuTPxPySphere_[l].offset[1]);
01436       unsigned char lr = *(srcp + LuTPxPySphere_[l].offset[2]);
01437       unsigned char ur = *(srcp + LuTPxPySphere_[l].offset[3]);
01438       unsigned int dx = LuTPxPySphere_[l].weight[0];
01439       unsigned int dy = LuTPxPySphere_[l].weight[1];
01440       *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01441
01442 //       float dx = (float)LuT_[i].weight[0] / 256.0;
01443 //       float dy = (float)LuT_[i].weight[1] / 256.0;
01444 //       float top = ((float)ul * (1.0-dx)) +(ur * dx);
01445 //       float bottom = ((float)ll * (1.0-dx)) +(lr * dx);
01446 //       *dstp = (unsigned char)rint(top * (1.0-dy) + bottom * dy);
01447 //       *dstp = (ul + ur + ll + lr)/4; // this is MEAN
01448       dstp++;
01449     }
01450     //  } else {
01451 //     unsigned int cc = src.GetChannelCount();
01452 //     for ( unsigned int i =0; i<dst.GetPixelCount(); i++ ) {
01453 //       for (unsigned int c=0; c<cc; c++) {
01454 //  unsigned char ul = *(srcp + LuT_[i].offset[0] + c);
01455 //  unsigned char ll = *(srcp + LuT_[i].offset[1] + c);
01456 //  unsigned char lr = *(srcp + LuT_[i].offset[2] + c);
01457 //  unsigned char ur = *(srcp + LuT_[i].offset[3] + c);
01458 //  unsigned int dx = LuT_[i].weight[0];
01459 //  unsigned int dy = LuT_[i].weight[1];
01460 //  *dstp =  (unsigned char)(((ul<<16) + (dy<<8)*(ll - ul) + (dx<<8)*(ur - ul) + dy*dx*(ul - ll - ur + lr))>>16);
01461 //  dstp++;
01462 //       }
01463 //     }
01464
01465
01466 //   }
01467   return 0;
01468 }
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/SphericalUndistortion.hh Source File

Image

SphericalUndistortion.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __SphericalUndistortion_hh__
00026 #define __SphericalUndistortion_hh__
00027
00028 #include <bias_config.h>
00029
00030 #include <Base/Common/W32Compat.hh>
00031
00032 #include <Base/Image/Image.hh>
00033 #include <Base/Math/Vector2.hh>
00034 #include <Base/Math/Vector.hh>
00035 #include <Base/Geometry/KMatrix.hh>
00036 #include <Base/Geometry/HomgPoint2D.hh>
00037 #include <Base/Debug/Debug.hh>
00038
00039 #include <MathAlgo/Interpolator.hh>
00040 #include <Image/CameraParam.hh>
00041
00042 namespace BIAS{
00043   /** @class SphericalUndistortion
00044       @ingroup g_filter
00045       @brief transforms sphere images coming from a fisheye-lens according to
00046       different projection models.
00047
00048       @author streckel
00049
00050       Input is an image from a fisheye lens looking circular
00051       with a black border. 5 types of projection are supported
00052       (see: M.M.Fleck "Perspective Projection: The wrong imaging model")
00053
00054       The algorithm expects a 3rd order calibration polynomial to get a
00055       linear relation between viewing angle and distance to circle center.
00056
00057       The supported projections are:
00058       PERSPECTIVE      : Perspective projection      - p=k*tan(theta)
00059       STEREOGRAPHIC    : Stereographic projection    - p=k*tan(theta/2)
00060       EQUIDISTANT      : Equidistant projection      - p=k*theta
00061       SINE_LAW         : sine-law projection         - p=k*sin(theta)
00062       EQUI_SOLID_ANGLE : equi-solid-angle projection - p=k*sin(theta/2)
00063       p     : projected distance from circle center
00064       theta : angle between projected point and optical axis
00065   */
00066
00067 #define DEBUG_SPHEREPROJ_AVG 1
00068 #define DEBUG_SPHEREPROJ_CIRCLE 2
00069
00070   class BIASImage_EXPORT SphericalUndistortion :
00071     public BIAS::CameraParam, public BIAS::Debug{
00072
00073   public:
00074
00075     /** @brief Projection-type constants
00076         @author Birger Streckel */
00077     enum{PERSPECTIVE, STEREOGRAPHIC, EQUIDISTANT, SINE_LAW, EQUI_SOLID_ANGLE};
00078
00079     /** @brief default constructor
00080         @author Birger Streckel */
00081     SphericalUndistortion();
00082
00083     /** @brief copy constructor
00084         @author Birger Streckel */
00085     SphericalUndistortion(const SphericalUndistortion& sp);
00086
00087     /** @brief common constructor - initialization with CameraParam-object!
00088         @author Birger Streckel */
00089     SphericalUndistortion(const CameraParam& cp);
00090
00091     /** @brief filter initialization with calibration curve measurements
00092         @author Birger Streckel */
00093     SphericalUndistortion(const double& centerX, const double& centerY,
00094                           const double& radius,
00095                           const std::vector<double> &AngleCorrX,
00096                           const std::vector<double> &AngleCorrY,
00097                           const std::vector<double> &IlluCorrX,
00098                           const std::vector<double> &IlluCorrY);
00099
00100     ~SphericalUndistortion();
00101
00102     /** @brief Initialization by setting all necessary parameters
00103         (center, radius, Vectors of Angle and Vignette correction
00104         measurement points) from the outside */
00105     int Init(const double& centerX, const double& centerY,
00106              const double& radius,
00107              const std::vector<double> &AngleCorrX,
00108              const std::vector<double> &AngleCorrY,
00109              const std::vector<double> &IlluCorrX,
00110              const std::vector<double> &IlluCorrY);
00111
00112     /** @brief Initialization with CameraParam-object!
00113         @author Birger Streckel */
00114    int Init(const CameraParam& cp);
00115
00116 #ifdef BIAS_HAVE_XML2
00117     // @brief initialization with camera data file
00118     int Init(const std::string &filename);
00119     // @brief initialization with camera node from pre-parsed data file
00120     int Init(XMLIO &myXML, xmlNodePtr &cameraNode);
00121 #endif //BIAS_HAVE_XML2
00122
00123    /** @brief Performs a cylingric projection of a spherical image given
00124         a projection-type and a zoom factor.
00125
00126         @param src source image
00127         @param dst (output) uninitialized destination image
00128     */
00129     template <class StorageType>
00130     int ProjectImageCylindric(const Image<StorageType>& src,
00131                               Image<StorageType>& dst,
00132                               double viewCenterX,
00133                               double viewCenterY,
00134                               double zoomFactor);
00135
00136       /** @brief Performs a projection of a spherical image coordinate
00137         to a projected and calibrated coordinate
00138         given a projection-type and a K-matrix.
00139         @author Birger Streckel */
00140     int ProjectCoord(const int projectionType, const KMatrix& kMatrix,
00141                      const HomgPoint2D& Source, HomgPoint2D &Dest) const;
00142
00143     /** @brief Performs a projection of a projected and calibrated coordinate
00144         to a spherical image coordinate
00145         given a projection-type and a  K-matrix.
00146         @author Birger Streckel */
00147     int ProjectCoordBack(const int projectionType, const KMatrix& kMatrix,
00148                          const HomgPoint2D& Source, HomgPoint2D &Dest) const;
00149
00150     /** @brief Transforms a coordinate pair of image coordinates x, y in the
00151         uncalibrated spherical image, to a calibrated pair of polar coordinates
00152         phi, theta.
00153         @author Birger Streckel */
00154     int TransfCoordImage2Sphere (const HomgPoint2D& Source,
00155                                  double &theta, double &phi) const;
00156     int TransfCoordImage2Sphere (const double& SourceX, const double& SourceY,
00157                                  double &theta, double &phi) const;
00158
00159     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00160         to a coordinate pair of image coordinates x, y in the uncalibrated
00161         spherical image.
00162         @author Birger Streckel */
00163     int TransfCoordSphere2Image (const double& theta, const double& phi,
00164                                  HomgPoint2D &Source) const;
00165     int TransfCoordSphere2Image (const double& theta, const double& phi,
00166                                  double &SourceX, double &SourceY) const;
00167
00168     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00169         to a coordinate pair of image coordinates x, y in the uncalibrated
00170         spherical image.
00171         @author Birger Streckel */
00172     int TransfCoordRotateSphere2Image (double theta, double phi,
00173                                        const double& viewCenterX,
00174                                        const double& viewCenterY,
00175                                        HomgPoint2D &Source) const;
00176     int TransfCoordRotateSphere2Image (double theta, double phi,
00177                                        const double& viewCenterX,
00178                                        const double& viewCenterY,
00179                                        double &SourceX, double &SourceY) const;
00180
00181     /** @brief Transforms a calibrated pair of polar coordinates phi, theta
00182         to a coordinate pair of image coordinates x, y in an equidistant
00183         spherical image.
00184         @author Birger Streckel */
00185     int TransfCoordSphere2CalibImage (const double& theta, const double& phi,
00186                                       HomgPoint2D &Source) const;
00187     int TransfCoordSphere2CalibImage (const double& theta, const double& phi,
00188                                       double &SourceX, double &SourceY) const;
00189
00190  /** @brief Get the Cameras KMatrix corresponding
00191          @author streckel */
00192      KMatrix GetKMatrix();
00193
00194     //int TransfRectImage2Sphere (double DestX, double DestY, int imgWidth,
00195         //       double zoomFactor,double &theta, double &phi);
00196     /** @brief Returns the principal point of the camera image.
00197         @author Birger Streckel */
00198     int GetSphereCenter(double& centerX, double& centerY) const;
00199     int GetSphereCenter(double& centerX, double& centerY, double& radius)const;
00200
00201     /** @brief Returns the radius in pixels of the camera image circle.
00202         @author Birger Streckel */
00203     double GetSphereRadius() const;
00204
00205     /** @brief Returns the maximum fov-angle of the fisheye optics.
00206         @author Birger Streckel */
00207     double GetMaxCamAngle() const;
00208
00209     /** @brief Draw circles of constant angle steps into the uncalibrated
00210         spherical image using the angle calibration.
00211         @author Birger Streckel */
00212     template <class StorageType>
00213     int DrawCircles(Image<StorageType>& src, const double& DegreeStep);
00214
00215     /** @brief Corrects the illumination vignette of an uncalibrated
00216         (source-)image.
00217         @author Birger Streckel */
00218     template <class StorageType>
00219     int CorrectVignette(Image<StorageType>& src);
00220
00221     /** @brief theta and phi are periodic in 2*M_PI, if they are out of a
00222         suitable range, try to find best equivalent angle by adding 2*l*M_PI
00223         @return 0 on success, <0 indicates that at least one angle is invalid
00224         @author koeser 10/2004 */
00225     int EnforceNormalRange(double& theta, double& phi) const;
00226
00227     /** Fast spehrical undistortion via LookUpTable. This function creates
00228         a table, use ProjectCutOut to apply it.
00229         @param srcwidth, srcheight size of the sperical source image.
00230         @param ChanCnt channel count.
00231         @param SizeX, SizeY Is the size of the resulting perspective image.
00232         Since there should be no zoom this determines also the
00233         perspective cutouts field of view.
00234         @param CenterX, CenterY point in sphere image to which the
00235         tangential mapping plane is attached. This point is mapped to
00236         the center of the resulting image.
00237         @param projectionType normally PERSPECTIVE.
00238         @param KMatDst Returns the KMatrix of the perspective image.
00239         @author evers 2004 */
00240
00241     int SetupProjectionLUT(const unsigned int& srcwidth,
00242                const unsigned int& srcheight,
00243                const unsigned int& ChanCnt,
00244                const unsigned int& SizeX, const unsigned int& SizeY,
00245                const double& CenterX, const double& CenterY,
00246                const int projectionType, KMatrix& KMatDst);
00247     template <class StorageType>
00248     int ProjectCutOut(const Image<StorageType>& src,
00249               Image<StorageType>& dst);
00250
00251     /** Applies the LookUpTable from SetupProjectionLUT to the src-image.
00252         If dst is not set, this is done internally.
00253         @author evers 2004 */
00254
00255     int ProjectCutOut(const Image<unsigned char>& src,
00256               Image<unsigned char>& dst);
00257
00258     /** Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera
00259         center, to sphere image coordinates.
00260         @param srcwidth, srcheight size of the sperical source image.
00261         @param ChanCnt channel count.
00262         @param stepwidth of PhiX, PhiY in rad
00263         @author streckel 01/2005
00264      */
00265     int SetupLutPxPySphere1(const unsigned int srcwidth,
00266                            const unsigned int srcheight,
00267                            const unsigned int ChanCnt,
00268                            const double stepwidth);
00269     int SetupLutPxPySphere2(const unsigned int srcwidth,
00270                            const unsigned int srcheight,
00271                            const unsigned int ChanCnt,
00272                            const double stepwidth);
00273
00274     /** Creates a LUT for conversion of angles PhiX, PhiY, (0,0) is camera
00275         center, to sphere image coordinates.
00276         @param ChanCnt channel count.
00277         @param SizeX, SizeY Is the size of the resulting perspective image.
00278         Since there should be no zoom this determines also the
00279         perspective cutouts field of view.
00280         @param projectionType normally PERSPECTIVE.
00281         @param KMatDst Returns the KMatrix of the perspective image.
00282         @param stepwidth of PhiX, PhiY in rad
00283         @author streckel 01/2005
00284      */
00285     int SetupLutPerspPxPy1(const unsigned int SizeX, const unsigned int SizeY,
00286                            const int projectionType,
00287                            KMatrix& KMatDst);
00288     int SetupLutPerspPxPy2(const unsigned int SizeX, const unsigned int SizeY,
00289                            const int projectionType,
00290                            KMatrix& KMatDst);
00291
00292     /** Applies the LookUpTables from SetupLutPxPySphere and SetupLutPerspPxPy
00293         to the src-image. Using 2 LUTs allows an active rotation of the
00294         perspective camera in the fisheye image.
00295         If dst is not set, this is done internally.
00296         @author streckel 01/2005
00297     */
00298     template <class StorageType>
00299     int ProjectCutOut1(const Image<StorageType>& src,
00300                        Image<StorageType>& dst,
00301                        const double stepwidth,
00302                        const double& yaw, const double& pitch,
00303                        const double& roll);
00304     template <class StorageType>
00305     int ProjectCutOut2(const Image<StorageType>& src,
00306                        Image<StorageType>& dst,
00307                        const double stepwidth,
00308                        const double& yaw, const double& pitch,
00309                        const double& roll);
00310     int ProjectCutOut1(const Image<unsigned char>& src,
00311                        Image<unsigned char>& dst,
00312                        const double stepwidth,
00313                        const double& yaw, const double& pitch,
00314                        const double& roll);
00315     int ProjectCutOut2(const Image<unsigned char>& src,
00316                        Image<unsigned char>& dst,
00317                        const double stepwidth,
00318                        const double& yaw, const double& pitch,
00319                        const double& roll);
00320
00321   protected:
00322
00323     // DLL JW
00324     BIAS_EXPORT_STL_VECTOR( BIASImage_EXPORT, double)
00325
00326     // Spline interpolators for the measurement interpolation
00327     Interpolator interpolatorAngle_;
00328     Interpolator interpolatorAngleBack_;
00329     Interpolator interpolatorIllu_;
00330
00331     // structure for Look-up-table for bilinear interpolation
00332     // during backward warping
00333     struct LuTEntry {
00334       unsigned int offset[4];
00335       unsigned int weight[2];
00336     };
00337     LuTEntry *LuT_;
00338     unsigned int CutOutWidth_, CutOutHeight_;
00339
00340     // LUT for active rotation compensation
00341     LuTEntry *LuTPxPySphere_;
00342     struct LuTpxpyEntry {
00343       float PhiX;
00344       float PhiY;
00345     };
00346     LuTpxpyEntry *LuTPerspPxPy_;
00347   };
00348
00349 } // namespace
00350
00351
00352 #endif // __SphericalUndistortion_hh__
Generated on Wed Jun 21 19:01:09 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/StatekeeperGL.hh Source File

Utils

StatekeeperGL.hh

Go to the documentation of this file.
00001 #ifndef _StatekeeperGL__hh__
00002 #define _StatekeeperGL__hh__
00003
00004 #include <bias_config.h>
00005
00006 #ifndef BIAS_HAVE_OPENGL
00007 #  error Please recompile BIAS with USE_OPENGL
00008 #endif // BIAS_HAVE_OPENGL
00009
00010
00011 #  include <Gui/biasgl.h>
00012
00013 namespace BIAS {
00014
00015   /** push and pop GL states on constructor/destructor
00016   Helper class pop(save) OpenGL states on construction
00017   and push them on destruction automatically.
00018   Using matchiung  push/pop pairs is easy with this class.
00019   Sample usage:
00020   \verbatim
00021   // begin var. scop
00022   {
00023   // save state by push
00024   StatekeeperGL myTmp;
00025   // change the state, fire GL calls
00026   ...
00027   // reload state by destructors pop call automatically
00028   }
00029   // end var. scope
00030   \endverbatim
00031   There should not be a performance impact if you use display lists.
00032   @author Jan Woetzel */
00033   class BIASUtils_EXPORT StatekeeperGL {
00034   public:
00035     /// constructor, pushes major OpenGL states
00036     StatekeeperGL(){
00037       glPushAttrib( 0
00038         //|GL_ALL_ATTRIB_BITS
00039         |GL_ENABLE_BIT
00040         |GL_COLOR_BUFFER_BIT
00041         |GL_CURRENT_BIT
00042         //|GL_DEPTH_BUFFER_BIT
00043         //|GL_LIGHTING_BIT
00044         //|GL_SCISSOR_BIT
00045         //|GL_STENCIL_BUFFER_BIT
00046         );
00047     };
00048
00049     /** constructor, pushes OpenGL state as given by mask
00050     GLbitfield mask */
00051     StatekeeperGL(const GLbitfield & mask){
00052       glPushAttrib(mask);
00053     }
00054
00055     /// destructor, pops OpenGL state
00056     ~StatekeeperGL(){
00057       glPopAttrib();
00058     }
00059
00060   }; // end of class
00061 } // end namespace
00062
00063
00064 #endif
00065
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/StereoRedGreen.cpp Source File

Image

StereoRedGreen.cpp

Go to the documentation of this file.
00001 #include "StereoRedGreen.hh"
00002
00003 #include <Base/Image/ImageConvert.hh>
00004 #include <Base/Image/Image.hh>
00005 #include <Base/Image/ImageBase.hh>
00006 #include <Base/Debug/Exception.hh>
00007
00008 using namespace BIAS;
00009 using namespace std;
00010
00011
00012 StereoRedGreen::
00013 StereoRedGreen()
00014 {}
00015
00016 StereoRedGreen::
00017 ~StereoRedGreen()
00018 {}
00019
00020 template <class StorageType>
00021 void StereoRedGreen::
00022 Combine(const Image<StorageType>& left, const Image<StorageType>& right,
00023         Image<StorageType>& result)
00024 {
00025   static Image<StorageType> LeftGrey, RightGrey;
00026   if ( left.GetWidth() != right.GetWidth() ||
00027        left.GetHeight() != right.GetHeight() ){
00028     BEXCEPTION("invalid input image sizes");
00029   }
00030   if (ImageConvert::ToGrey(left, LeftGrey)!=0){
00031     BEXCEPTION("conversion failed");
00032   }
00033   if (ImageConvert::ToGrey(right, RightGrey)!=0){
00034     BEXCEPTION("conversion failed");
00035   }
00036
00037   if ( result.GetWidth() !=left .GetWidth() ||
00038        result.GetHeight() != left.GetHeight() ||
00039        result.GetChannelCount() != 3 ){
00040     if (!result.IsEmpty()){
00041       result.Release();
00042     }
00043     result.Init(left.GetWidth(), left.GetHeight(), 3);
00044   }
00045   if (result.GetColorModel() != ImageBase::CM_RGB){
00046     result.SetColorModel(ImageBase::CM_RGB);
00047   }
00048   result.SetInterleaved(true);
00049
00050   StorageType *l = LeftGrey.GetImageData();
00051   StorageType *r = RightGrey.GetImageData();
00052   StorageType *d = result.GetImageData();
00053   StorageType *e = d + result.GetPixelCount()*3;
00054   while(d<e){
00055     *d++ = *l++;
00056     *d++ = *r++;
00057     *d++ = 0;
00058   }
00059
00060 }
00061
00062 ////////////////////////
00063 // instantiation
00064 ////////////////////
00065
00066 #define INST(type) \
00067 template void BIASImage_EXPORT StereoRedGreen::Combine<type>(const Image<type>& left, \
00068         const Image<type>& right, Image<type>& result);
00069
00070 INST(unsigned char)
00071 INST(float)
00072
00073 #ifdef BUILD_IMAGE_INT
00074 INST(int)
00075 #endif
00076 #ifdef BUILD_IMAGE_CHAR
00077 INST(char)
00078 //INST(char)
00079 #endif
00080 #ifdef BUILD_IMAGE_SHORT
00081 INST(short)
00082 #endif
00083
00084 #if defined(BUILD_IMAGE_USHORT)
00085 INST(unsigned short)
00086 #endif
00087
00088 #ifdef BUILD_IMAGE_DOUBLE
00089 INST(double)
00090 #endif
00091 #ifdef BUILD_IMAGE_UINT
00092 INST(unsigned int)
00093 #endif
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/StereoRedGreen.hh Source File

Image

StereoRedGreen.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _StereoRedGreen_hh_
00025 #define _StereoRedGreen_hh_
00026
00027 #include <bias_config.h>
00028
00029 namespace BIAS {
00030
00031   template <class StorageType> class BIASImage_EXPORT Image;
00032
00033   /** @class StereoRedGreen
00034       @brief combine two separate images into one stereo image for red-green
00035       glasses
00036       @author woelk 03/2006 */
00037   class BIASImage_EXPORT StereoRedGreen
00038   {
00039   public:
00040     StereoRedGreen();
00041     ~StereoRedGreen();
00042
00043     template <class StorageType>
00044     void Combine(const Image<StorageType>& left,
00045                  const Image<StorageType>& right,
00046                  Image<StorageType>& result);
00047   };
00048
00049 }
00050
00051 #endif // _StereoRedGreen_hh_
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/stopwatch.h Source File

Base » Math » tnt

stopwatch.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 #ifndef STPWATCH_H
00035 #define STPWATCH_H
00036
00037 // for clock() and CLOCKS_PER_SEC
00038 #include <ctime>
00039
00040 namespace TNT
00041 {
00042
00043 /*  Simple stopwatch object:
00044
00045         void    start()     : start timing
00046         double  stop()      : stop timing
00047         void    reset()     : set elapsed time to 0.0
00048         double  read()      : read elapsed time (in seconds)
00049
00050 */
00051
00052 inline double seconds(void)
00053 {
00054     static const double secs_per_tick = 1.0 / CLOCKS_PER_SEC;
00055     return ( (double) clock() ) * secs_per_tick;
00056 }
00057
00058
00059 class stopwatch {
00060     protected:
00061         int running;
00062         double last_time;
00063         double total;
00064
00065     public:
00066         stopwatch() : running(0), last_time(0.0), total(0.0) {}
00067         void reset() { running = 0; last_time = 0.0; total=0.0; }
00068         void start() { if (!running) { last_time = seconds(); running = 1;}}
00069         double stop()  { if (running)
00070                             {
00071                                 total += seconds() - last_time;
00072                                 running = 0;
00073                              }
00074                           return total;
00075                         }
00076         double read()   {  if (running)
00077                             {
00078                                 total+= seconds() - last_time;
00079                                 last_time = seconds();
00080                             }
00081                            return total;
00082                         }
00083
00084 };
00085
00086 } // namespace TNT
00087
00088 #endif
00089
00090
00091
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/StringConv.hh Source File

Gui

StringConv.hh

Go to the documentation of this file.
00001 #ifndef __StringConv_hh__
00002 #define __StringConv_hh__
00003
00004 #include <wx/string.h>
00005 #include <string>
00006
00007 namespace BIAS {
00008
00009 /*
00010 inline const char* WxToAscii(const wxString& string)
00011 {
00012   return (const char*)string.mb_str(wxConvUTF8);
00013 }
00014 */
00015
00016 /// Converts a wxString to a std::string.
00017 #define WxToAscii(s) (const char*)(wxString(s).mb_str(wxConvUTF8))
00018
00019 /// Converts a C string to a wxString.
00020 inline wxString AsciiToWx(const char* string)
00021 {
00022   return wxString(string, wxConvUTF8);
00023 }
00024
00025 /// Converts a std::string to a wxString.
00026 inline wxString AsciiToWx(const std::string& string)
00027 {
00028   return wxString(string.c_str(), wxConvUTF8);
00029 }
00030 /**
00031   Class for converting an array of wxStrings to an array
00032   of non-const ASCII strings. Required for using getopt
00033   in UNICODE wx tools.
00034 */
00035 class WxToAsciiArray
00036 {
00037 public:
00038   WxToAsciiArray(wxChar** strings, int size)
00039   {
00040     _AsciiStrings = new char*[size];
00041     for (int i = 0; i < size; i++)
00042     {
00043       _AsciiStrings[i] = strdup(WxToAscii(strings[i]));
00044     }
00045     _Size = size;
00046   }
00047
00048   ~WxToAsciiArray()
00049   {
00050     for (int i = 0; i < _Size; i++)
00051     {
00052       free(_AsciiStrings[i]);
00053     }
00054     delete[] _AsciiStrings;
00055   }
00056
00057   operator char**()
00058   {
00059     return _AsciiStrings;
00060   }
00061
00062 private:
00063   char** _AsciiStrings;
00064   int    _Size;
00065 };
00066
00067 } // namespace BIAS
00068
00069 #endif // __StringConv_hh__
Generated on Wed Jun 21 19:01:06 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

_FilterBorders Member List

This is the complete list of members for _FilterBorders, including all inherited members.

FirstLeft | _FilterBorders
FirstUpper | _FilterBorders
LastBottom | _FilterBorders
LastRight | _FilterBorders

Generated on Wed Jun 21 19:06:11 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

alist Member List

This is the complete list of members for alist, including all inherited members.

aerr typedef | alist
aerr typedef | alist
aunit typedef | alist
aunit typedef | alist

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::BaseFactory< BaseClassType >::MapEntry Member List

This is the complete list of members for BIAS::BaseFactory< BaseClassType >::MapEntry, including all inherited members.

AllocatorFunction_ BIAS::BaseFactory< BaseClassType >::MapEntry

Generated on Wed Jun 21 19:06:25 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::CameraData Member List

This is the complete list of members for BIAS::CameraData, including all inherited members.

AngleCorrX_ | BIAS::CameraData
AngleCorrY_ | BIAS::CameraData
aspectratio_ | BIAS::CameraData
CamID_ | BIAS::CameraData
CamModel_ | BIAS::CameraData
cellSizeX_ | BIAS::CameraData
cellSizeY_ | BIAS::CameraData
focallengthDef_ | BIAS::CameraData
height_ | BIAS::CameraData
IlluCorrX_ | BIAS::CameraData
IlluCorrY_ | BIAS::CameraData
kc1Def_ | BIAS::CameraData
kc2Def_ | BIAS::CameraData
kc3Def_ | BIAS::CameraData
kc4Def_ | BIAS::CameraData
knownparams_vect_ | BIAS::CameraData
LensIsSpherical_ | BIAS::CameraData
LensModel_ | BIAS::CameraData
MaxCamAngle_ | BIAS::CameraData
PoseInRigCenter_ | BIAS::CameraData
PoseInRigPitch_ | BIAS::CameraData
PoseInRigRoll_ | BIAS::CameraData
PoseInRigYaw_ | BIAS::CameraData
principalX_ | BIAS::CameraData
principalY_ | BIAS::CameraData
radius_ | BIAS::CameraData
width_ | BIAS::CameraData
zoomCamera_ | BIAS::CameraData

Generated on Wed Jun 21 19:06:28 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::cornerstruct Member List

This is the complete list of members for BIAS::cornerstruct, including all inherited members.

dx | BIAS::cornerstruct
dy | BIAS::cornerstruct
I | BIAS::cornerstruct
info | BIAS::cornerstruct
x | BIAS::cornerstruct
y | BIAS::cornerstruct

Generated on Wed Jun 21 19:06:41 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::ItemAndWidget Member List

This is the complete list of members for BIAS::ItemAndWidget, including all inherited members.

item | BIAS::ItemAndWidget
widget | BIAS::ItemAndWidget

Generated on Wed Jun 21 19:08:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::MatlabTBUndistortion::LuTEntry Member List

This is the complete list of members for BIAS::MatlabTBUndistortion::LuTEntry, including all inherited members.

offset | BIAS::MatlabTBUndistortion::LuTEntry
weight | BIAS::MatlabTBUndistortion::LuTEntry

Generated on Wed Jun 21 19:08:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::PMDImageMetaData Member List

This is the complete list of members for BIAS::PMDImageMetaData, including all inherited members.

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 | BIAS::PMDImageMetaData
width | BIAS::PMDImageMetaData

Generated on Wed Jun 21 19:09:32 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SensorData Member List

This is the complete list of members for BIAS::SensorData, including all inherited members.

PoseInRigCenter_ | BIAS::SensorData
PoseInRigPitch_ | BIAS::SensorData
PoseInRigRoll_ | BIAS::SensorData
PoseInRigYaw_ | BIAS::SensorData

Generated on Wed Jun 21 19:10:44 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SphericalUndistortion::LuTEntry Member List

This is the complete list of members for BIAS::SphericalUndistortion::LuTEntry, including all inherited members.

offset | BIAS::SphericalUndistortion::LuTEntry
weight | BIAS::SphericalUndistortion::LuTEntry

Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::SphericalUndistortion::LuTpxpyEntry Member List

This is the complete list of members for BIAS::SphericalUndistortion::LuTpxpyEntry, including all inherited members.

PhiX | BIAS::SphericalUndistortion::LuTpxpyEntry
PhiY | BIAS::SphericalUndistortion::LuTpxpyEntry

Generated on Wed Jun 21 19:10:51 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::VideoSource_Shm::ShmImageHeader Member List

This is the complete list of members for BIAS::VideoSource_Shm::ShmImageHeader, including all inherited members.

Size_ | BIAS::VideoSource_Shm::ShmImageHeader
Time_ | BIAS::VideoSource_Shm::ShmImageHeader

Generated on Wed Jun 21 19:12:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

BIAS::WeightedSigmaPoint Member List

This is the complete list of members for BIAS::WeightedSigmaPoint, including all inherited members.

point | BIAS::WeightedSigmaPoint
weight_cov | BIAS::WeightedSigmaPoint
weight_mean | BIAS::WeightedSigmaPoint

Generated on Wed Jun 21 19:13:07 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

CameraParameter_s Member List

This is the complete list of members for CameraParameter_s, including all inherited members.

AutoGain | CameraParameter_s
AutoGainChanged | CameraParameter_s
AutoShutter | CameraParameter_s
AutoShutterChanged | CameraParameter_s
AutoWhiteBalance | CameraParameter_s
AutoWhiteBalanceChanged | CameraParameter_s
Gain | CameraParameter_s
GainChanged | CameraParameter_s
GammaMode | CameraParameter_s
GammaModeChanged | CameraParameter_s
OpticalFilter | CameraParameter_s
OpticalFilterChanged | CameraParameter_s
Sharpen | CameraParameter_s
SharpenChanged | CameraParameter_s
Shutter | CameraParameter_s
ShutterChanged | CameraParameter_s
WhiteBalance | CameraParameter_s
WhiteBalanceChanged | CameraParameter_s
WhiteBalanceOnePush | CameraParameter_s

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

cilist Member List

This is the complete list of members for cilist, including all inherited members.

ciend typedef | cilist
ciend typedef | cilist
cierr typedef | cilist
cierr typedef | cilist
cifmt typedef | cilist
cifmt typedef | cilist
cirec typedef | cilist
cirec typedef | cilist
ciunit typedef | cilist
ciunit typedef | cilist

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

cllist Member List

This is the complete list of members for cllist, including all inherited members.

cerr typedef | cllist
cerr typedef | cllist
csta typedef | cllist
csta typedef | cllist
cunit typedef | cllist
cunit typedef | cllist

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

complex Member List

This is the complete list of members for complex, including all inherited members.

i typedef | complex
i typedef | complex
r typedef | complex
r typedef | complex

Generated on Wed Jun 21 19:06:12 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

doublecomplex Member List

This is the complete list of members for doublecomplex, including all inherited members.

i typedef | doublecomplex
i typedef | doublecomplex
r typedef | doublecomplex
r typedef | doublecomplex

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

icilist Member List

This is the complete list of members for icilist, including all inherited members.

iciend typedef | icilist
iciend typedef | icilist
icierr typedef | icilist
icierr typedef | icilist
icifmt typedef | icilist
icifmt typedef | icilist
icirlen typedef | icilist
icirlen typedef | icilist
icirnum typedef | icilist
icirnum typedef | icilist
iciunit typedef | icilist
iciunit typedef | icilist

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

inlist Member List

This is the complete list of members for inlist, including all inherited members.

inacc typedef | inlist
inacc typedef | inlist
inacclen typedef | inlist
inacclen typedef | inlist
inblank typedef | inlist
inblank typedef | inlist
inblanklen typedef | inlist
inblanklen typedef | inlist
indir typedef | inlist
indir typedef | inlist
indirlen typedef | inlist
indirlen typedef | inlist
inerr typedef | inlist
inerr typedef | inlist
inex typedef | inlist
inex typedef | inlist
infile typedef | inlist
infile typedef | inlist
infilen typedef | inlist
infilen typedef | inlist
infmt typedef | inlist
infmt typedef | inlist
infmtlen typedef | inlist
infmtlen typedef | inlist
inform typedef | inlist
inform typedef | inlist
informlen typedef | inlist
informlen typedef | inlist
inname typedef | inlist
inname typedef | inlist
innamed typedef | inlist
innamed typedef | inlist
innamlen typedef | inlist
innamlen typedef | inlist
innrec typedef | inlist
innrec typedef | inlist
innum typedef | inlist
innum typedef | inlist
inopen typedef | inlist
inopen typedef | inlist
inrecl typedef | inlist
inrecl typedef | inlist
inseq typedef | inlist
inseq typedef | inlist
inseqlen typedef | inlist
inseqlen typedef | inlist
inunf typedef | inlist
inunf typedef | inlist
inunflen typedef | inlist
inunflen typedef | inlist
inunit typedef | inlist
inunit typedef | inlist

Generated on Wed Jun 21 19:06:13 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

my_error_mgr Member List

This is the complete list of members for my_error_mgr, including all inherited members.

pub | my_error_mgr
setjmp_buffer | my_error_mgr

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Namelist Member List

This is the complete list of members for Namelist, including all inherited members.

name typedef | Namelist
name typedef | Namelist
nvars typedef | Namelist
nvars typedef | Namelist
vars typedef | Namelist
vars typedef | Namelist

Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

olist Member List

This is the complete list of members for olist, including all inherited members.

oacc typedef | olist
oacc typedef | olist
oblnk typedef | olist
oblnk typedef | olist
oerr typedef | olist
oerr typedef | olist
ofm typedef | olist
ofm typedef | olist
ofnm typedef | olist
ofnm typedef | olist
ofnmlen typedef | olist
ofnmlen typedef | olist
orl typedef | olist
orl typedef | olist
osta typedef | olist
osta typedef | olist
ounit typedef | olist
ounit typedef | olist

Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

option Member List

This is the complete list of members for option, including all inherited members.

flag | option
has_arg | option
name | option
val | option

Generated on Wed Jun 21 19:06:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

SegmentationData Member List

This is the complete list of members for SegmentationData, including all inherited members.

br | SegmentationData
hue | SegmentationData
hueIntervall | SegmentationData
imgHSV | SegmentationData
imRes | SegmentationData
minSaturation | SegmentationData
tl | SegmentationData

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

tagTHREADNAME_INFO Member List

This is the complete list of members for tagTHREADNAME_INFO, including all inherited members.

dwFlags | tagTHREADNAME_INFO
dwThreadID | tagTHREADNAME_INFO
dwType | tagTHREADNAME_INFO
szName | tagTHREADNAME_INFO

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

ThreadArg__ Member List

This is the complete list of members for ThreadArg__, including all inherited members.

colormodel | ThreadArg__
dst | ThreadArg__
planar | ThreadArg__
src | ThreadArg__

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

TIntersect Member List

This is the complete list of members for TIntersect, including all inherited members.

Edge | TIntersect
EpipoleDistance | TIntersect
IntersectsInImage | TIntersect
Point | TIntersect

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/StructureTensor.cpp Source File

Filter

StructureTensor.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "StructureTensor.hh"
00026
00027 #ifdef BIAS_DEBUG
00028 #include <Base/Image/ImageIO.hh>
00029 #endif
00030
00031 #include <Base/Common/BIASpragma.hh>
00032
00033
00034   //#define TIME_MEASURE
00035
00036 #ifdef TIME_MEASURE
00037 #include <Base/Debug/TimeMeasure.hh>
00038 #endif
00039
00040 using namespace BIAS;
00041 using namespace std;
00042
00043 //////////////////////////////////////////////////////////////////////////
00044 //                 implementation
00045 //////////////////////////////////////////////////////////////////////////
00046
00047 template <class InputStorageType, class OutputStorageType>
00048 StructureTensor<InputStorageType, OutputStorageType>::
00049 StructureTensor():
00050   FilterNTo3N<InputStorageType, OutputStorageType>(),
00051   _gsobel3x3(),
00052   _ggauss(),
00053   _ggaussasymmetric()
00054 {
00055   _grad=NULL;
00056   _HalfWinSize=new int;
00057   *_HalfWinSize=3;
00058   _GradientType=new int;
00059   *_GradientType = GT_Gauss;
00060   _InternalMemWidth = _InternalMemHeight = 0;
00061 }
00062
00063 template <class InputStorageType, class OutputStorageType>
00064 StructureTensor<InputStorageType, OutputStorageType>::
00065 StructureTensor(Param& para, const std::string& postfix):
00066   FilterNTo3N<InputStorageType, OutputStorageType>(para, "-StructureTensor"+postfix),
00067   _gsobel3x3(para, "-StructureTensor"+postfix),
00068   _ggauss(para, "-StructureTensor"+postfix),
00069   _ggaussasymmetric(para, "-StructureTensor"+postfix)
00070 {
00071   _grad = NULL;
00072   _HalfWinSize = _GradientType = NULL;
00073   int grp = para.GetFreeGroupID();
00074   _AddParam(para, grp, "-StructureTensor"+postfix);
00075   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "StructureTensor");
00076   _InternalMemWidth = _InternalMemHeight = 0;
00077 }
00078
00079 template <class InputStorageType, class OutputStorageType>
00080 StructureTensor<InputStorageType, OutputStorageType>::
00081 StructureTensor(Param& para, const int grp, const std::string& postfix)
00082 :   FilterNTo3N<InputStorageType, OutputStorageType>(para, grp, "-StructureTensor"+postfix),
00083     _gsobel3x3(para, grp, "-StructureTensor"+postfix),
00084     _ggauss(para, grp, "-StructureTensor"+postfix),
00085     _ggaussasymmetric(para, grp, "-StructureTensor"+postfix)
00086 {
00087   _grad=NULL;
00088   _HalfWinSize=_GradientType=NULL;
00089   _AddParam(para, grp, "-StructureTensor"+postfix);
00090   _InternalMemWidth=_InternalMemHeight=0;
00091 }
00092
00093 template <class InputStorageType, class OutputStorageType>
00094 StructureTensor<InputStorageType, OutputStorageType>::~StructureTensor()
00095 {
00096   if (_ParamsAllocated){
00097     delete _HalfWinSize; _HalfWinSize = NULL;
00098     delete _GradientType; _GradientType = NULL;
00099   }
00100 }
00101
00102 template <class InputStorageType, class OutputStorageType>
00103 int StructureTensor<InputStorageType, OutputStorageType>::
00104 Filter(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00105 {
00106   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::Filter(src, dst)\n");
00107   BIASERR("unfinished");
00108   BIASABORT;
00109   return -10;
00110 }
00111
00112 template <class InputStorageType, class OutputStorageType>
00113 int StructureTensor<InputStorageType, OutputStorageType>::
00114 FilterInt(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00115 {
00116   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::FilterInt(src, dst)\n");
00117   BIASERR("unfinished");
00118   BIASABORT;
00119   return -10;
00120 }
00121
00122 template <class InputStorageType, class OutputStorageType>
00123 int StructureTensor<InputStorageType, OutputStorageType>::
00124 FilterFloat(const Image<InputStorageType>& src, Image<OutputStorageType>& dst)
00125 {
00126   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::FilterFloat(src, dst)\n");
00127   BIASERR("unfinished");
00128   BIASABORT;
00129   return -10;
00130 }
00131
00132 template <class InputStorageType, class OutputStorageType>
00133 int StructureTensor<InputStorageType, OutputStorageType>::
00134 Filter(const Image<InputStorageType>& src,
00135        Image<OutputStorageType>& gxx,
00136        Image<OutputStorageType>& gxy,
00137        Image<OutputStorageType>& gyy)
00138 {
00139   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::Filter(src, d1, d2, d3)\n");
00140   BIASERR("unfinished");
00141   BIASABORT;
00142   return -10;
00143 }
00144
00145 template <class InputStorageType, class OutputStorageType>
00146 int StructureTensor<InputStorageType, OutputStorageType>::
00147 FilterInt(const Image<InputStorageType>& src,
00148        Image<OutputStorageType>& gxx,
00149        Image<OutputStorageType>& gxy,
00150        Image<OutputStorageType>& gyy)
00151 {
00152   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::FilterInt(src, d1, d2, d3)\n");
00153   BIASERR("unfinished");
00154   BIASABORT;
00155   return -10;
00156 }
00157
00158 template <class InputStorageType, class OutputStorageType>
00159 int StructureTensor<InputStorageType, OutputStorageType>::
00160 FilterFloat(const Image<InputStorageType>& src,
00161        Image<OutputStorageType>& gxx,
00162        Image<OutputStorageType>& gxy,
00163        Image<OutputStorageType>& gyy)
00164 {
00165   BIASCDOUT(D_FILTERBASE_CALLSTACK, "StructureTensor::FilterFloat(src, d1, d2, d3)\n");
00166
00167   BIASERR("unfinished");
00168   BIASABORT;
00169   return -10;
00170 }
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 template <class InputStorageType, class OutputStorageType>
00194 int StructureTensor<InputStorageType, OutputStorageType>::
00195 CalcStructureTensor(const Image<InputStorageType>& image,
00196                     Image<OutputStorageType>& sgxx,
00197                     Image<OutputStorageType>& sgxy,
00198                     Image<OutputStorageType>& sgyy) {
00199   _UpdateGrad();
00200   BIASASSERT(_grad);
00201   int gres=_grad->Filter(image, _gx, _gy);
00202 #ifdef BIAS_DEBUG
00203   if (DebugLevelIsSet(D_ST_WRITE_DEBUG_IM)){
00204     if (ImageIO::Write("gx.mip", _gx)!=0){
00205       BIASERR("error writing gx");
00206     }
00207     if (ImageIO::Write("gy.mip", _gy)!=0){
00208       BIASERR("error writing gy");
00209     }
00210   }
00211 #endif
00212
00213   int sres = CalcStructureTensor(_gx, _gy, sgxx, sgxy, sgyy);
00214
00215 #ifdef BIAS_DEBUG
00216   if (DebugLevelIsSet(D_ST_WRITE_DEBUG_IM)){
00217     _WriteDebugImage(sgxx, "sgxx.mip");
00218     _WriteDebugImage(sgxy, "sgxy.mip");
00219     _WriteDebugImage(sgyy, "sgyy.mip");
00220   }
00221 #endif
00222   return (sres==0 && gres==0)?0:-1;
00223 }
00224
00225 template <class InputStorageType, class OutputStorageType>
00226 int StructureTensor<InputStorageType, OutputStorageType>::
00227 CalcStructureTensor(const Image<OutputStorageType>& gx,
00228                     const Image<OutputStorageType>& gy,
00229                     Image<OutputStorageType>& sgxx,
00230                     Image<OutputStorageType>& sgxy,
00231                     Image<OutputStorageType>& sgyy)
00232 {
00233   int sres;
00234   // initialize the destination images
00235   if (!gx.SamePixelAndChannelCount(sgxx)){
00236     if (!sgxx.IsEmpty()) sgxx.Release();
00237     sgxx.Init(gx.GetWidth(), gx.GetHeight(), 1);
00238   }
00239   if (!gx.SamePixelAndChannelCount(sgxy)){
00240     if (!sgxy.IsEmpty()) sgxy.Release();
00241     sgxy.Init(gx.GetWidth(), gx.GetHeight(), 1);
00242   }
00243   if (!gx.SamePixelAndChannelCount(sgyy)){
00244     if (!sgyy.IsEmpty()) sgyy.Release();
00245     sgyy.Init(gx.GetWidth(), gx.GetHeight(), 1);
00246   }
00247   // calculate it
00248   //  if (*_FilterBorderHandling==FilterBase<InputStorageType>::TBH_valid){
00249     switch (*_HalfWinSize){
00250     case 1:
00251       sres=CalcStructureTensor3x3(gx, gy, sgxx, sgxy, sgyy);
00252       break;
00253     case 2:
00254       sres=CalcStructureTensor5x5(gx, gy, sgxx, sgxy, sgyy);
00255       break;
00256     case 3:
00257       sres=CalcStructureTensor7x7(gx, gy, sgxx, sgxy, sgyy);
00258       break;
00259     default:
00260       sres=CalcStructureTensorValid(gx, gy, sgxx, sgxy, sgyy);
00261       break;
00262     }
00263
00264
00265   return sres;
00266 }
00267
00268 template <class InputStorageType, class OutputStorageType>
00269 int StructureTensor<InputStorageType, OutputStorageType>::
00270 CalcStructureTensorValid(const Image<OutputStorageType>& gx,
00271                          const Image<OutputStorageType>& gy,
00272                          Image<OutputStorageType>& sgxx,
00273                          Image<OutputStorageType>& sgxy,
00274                          Image<OutputStorageType>& sgyy)
00275 {
00276 #ifdef BIAS_DEBUG
00277   BIASASSERT(gx.SamePixelAndChannelCount(gy));
00278   BIASASSERT(gx.SamePixelAndChannelCount(sgxx));
00279   BIASASSERT(gx.SamePixelAndChannelCount(sgxy));
00280   BIASASSERT(gx.SamePixelAndChannelCount(sgyy));
00281 #endif
00282
00283
00284   const int width=gx.GetWidth();
00285   const int height=gx.GetHeight();
00286   if (width>_InternalMemWidth || height>_InternalMemHeight){
00287     //_DeleteInternalMem();
00288     _AllocInternalMem(width, height);
00289   }
00290
00291   _GradientProducts(gx, gy);
00292
00293   // propagate ROI
00294   int tlx, tly, brx, bry;
00295   _gxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00296   const int hws=*_HalfWinSize;
00297   const int minx=tlx+hws;
00298   const int maxx=brx-hws;
00299   const int miny=tly+hws;
00300   const int maxy=bry-hws;
00301   sgxx.GetROI()->SetCorners(minx, miny, maxx, maxy);
00302   sgxy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00303   sgyy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00304
00305   register int x, y, ix, iy, mx, my;
00306   register OutputStorageType **isgxx=sgxx.GetImageDataArray();
00307   register OutputStorageType **isgxy=sgxy.GetImageDataArray();
00308   register OutputStorageType **isgyy=sgyy.GetImageDataArray();
00309   register OutputStorageType **igxx=_gxx.GetImageDataArray();
00310   register OutputStorageType **igxy=_gxy.GetImageDataArray();
00311   register OutputStorageType **igyy=_gyy.GetImageDataArray();
00312
00313   for (y=miny; y<maxy; y++){
00314     for (x=minx; x<maxx; x++){
00315       isgxx[y][x]=isgxy[y][x]=isgyy[y][x]=(OutputStorageType)0.0;
00316       for (iy=-hws; iy<=hws; iy++){
00317         my=y+iy;
00318         for (ix=-hws; ix<=hws; ix++){
00319           mx=x+ix;
00320           isgxx[y][x]+=igxx[my][mx];
00321           isgxy[y][x]+=igxy[my][mx];
00322           isgyy[y][x]+=igyy[my][mx];
00323         }
00324       }
00325 #ifdef BIAS_DEBUG
00326       if (DebugLevelIsSet(D_ST_FEATURES) && y<miny+2 && x<minx+2){
00327         cerr << "( "<<x<<", "<<y<<") sgxx "<<isgxx[y][x]<<"  sgxy "
00328              <<isgxy[y][x]<<"  sgyy "<<isgyy[y][x]<<endl;
00329       }
00330 #endif
00331     }
00332   }
00333   return 0;
00334 }
00335
00336
00337 template <class InputStorageType, class OutputStorageType>
00338 int StructureTensor<InputStorageType, OutputStorageType>::
00339 CalcStructureTensor3x3(const Image<OutputStorageType>& gx,
00340                        const Image<OutputStorageType>& gy,
00341                        Image<OutputStorageType>& sgxx,
00342                        Image<OutputStorageType>& sgxy,
00343                        Image<OutputStorageType>& sgyy)
00344 {
00345
00346 #ifdef BIAS_DEBUG
00347   BIASASSERT(gx.SamePixelAndChannelCount(gy));
00348   BIASASSERT(gx.SamePixelAndChannelCount(sgxx));
00349   BIASASSERT(gx.SamePixelAndChannelCount(sgxy));
00350   BIASASSERT(gx.SamePixelAndChannelCount(sgyy));
00351 #endif
00352
00353   const int width=gx.GetWidth();
00354   const int height=gx.GetHeight();
00355   if (width>_InternalMemWidth || height>_InternalMemHeight){
00356     //_DeleteInternalMem();
00357     _AllocInternalMem(width, height);
00358   }
00359
00360   _GradientProducts(gx, gy);
00361
00362   // propagate ROI
00363   int tlx, tly, brx, bry;
00364   _gxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00365   const int minx=tlx+1;
00366   const int maxx=brx-1;
00367   const int miny=tly+1;
00368   const int maxy=bry-1;
00369   sgxx.GetROI()->SetCorners(minx, miny, maxx, maxy);
00370   sgxy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00371   sgyy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00372
00373   register int x, y, xm, xp, ym, yp;
00374   register OutputStorageType **isgxx=sgxx.GetImageDataArray();
00375   register OutputStorageType **isgxy=sgxy.GetImageDataArray();
00376   register OutputStorageType **isgyy=sgyy.GetImageDataArray();
00377   register OutputStorageType **igxx=_gxx.GetImageDataArray();
00378   register OutputStorageType **igxy=_gxy.GetImageDataArray();
00379   register OutputStorageType **igyy=_gyy.GetImageDataArray();
00380   for (y=miny; y<maxy; y++){
00381     for (x=minx; x<maxx; x++){
00382       xm=x-1; xp=x+1;
00383       ym=y-1; yp=y+1;
00384       isgxx[y][x]=
00385         igxx[ym][xm]+igxx[ym][x]+igxx[ym][xp]+
00386         igxx[y][xm]+igxx[y][x]+igxx[y][xp]+
00387         igxx[yp][xm]+igxx[yp][x]+igxx[yp][xp];
00388       isgxy[y][x]=
00389         igxy[ym][xm]+igxy[ym][x]+igxy[ym][xp]+
00390         igxy[y][xm]+igxy[y][x]+igxy[y][xp]+
00391         igxy[yp][xm]+igxy[yp][x]+igxy[yp][xp];
00392       isgyy[y][x]=
00393         igyy[ym][xm]+igyy[ym][x]+igyy[ym][xp]+
00394         igyy[y][xm]+igyy[y][x]+igyy[y][xp]+
00395         igyy[yp][xm]+igyy[yp][x]+igyy[yp][xp];
00396     }
00397   }
00398 #ifdef BIAS_DEBUG
00399   if (DebugLevelIsSet(D_ST_WRITE_DEBUG_IM)){
00400     _WriteDebugImage(sgxx, "sgxx-3x3.mip");
00401     _WriteDebugImage(sgxy, "sgxy-3x3.mip");
00402     _WriteDebugImage(sgyy, "sgyy-3x3.mip");
00403
00404     CalcStructureTensorValid(gx, gy, sgxx, sgxy, sgyy);
00405     _WriteDebugImage(sgxx, "sgxx-st.mip");
00406     _WriteDebugImage(sgxy, "sgxy-st.mip");
00407     _WriteDebugImage(sgyy, "sgyy-st.mip");
00408   }
00409 #endif
00410
00411   return 0;
00412 }
00413
00414 template <class InputStorageType, class OutputStorageType>
00415 int StructureTensor<InputStorageType, OutputStorageType>::
00416 CalcStructureTensor5x5(const Image<OutputStorageType>& gx,
00417                        const Image<OutputStorageType>& gy,
00418                        Image<OutputStorageType>& sgxx,
00419                        Image<OutputStorageType>& sgxy,
00420                        Image<OutputStorageType>& sgyy)
00421 {
00422 #ifdef TIME_MEASURE
00423   TimeMeasure timer;
00424   timer.Start();
00425 #endif
00426
00427 #ifdef BIAS_DEBUG
00428   BIASASSERT(gx.SamePixelAndChannelCount(gy));
00429   BIASASSERT(gx.SamePixelAndChannelCount(sgxx));
00430   BIASASSERT(gx.SamePixelAndChannelCount(sgxy));
00431   BIASASSERT(gx.SamePixelAndChannelCount(sgyy));
00432 #endif
00433
00434   const int width=gx.GetWidth();
00435   const int height=gx.GetHeight();
00436   if (width>_InternalMemWidth || height>_InternalMemHeight){
00437     //_DeleteInternalMem();
00438     _AllocInternalMem(width, height);
00439   }
00440
00441   _GradientProducts(gx, gy);
00442
00443 #ifdef TIME_MEASURE
00444   timer.Stop();
00445   cerr << "_GradientProducts took "<<timer.GetRealTime()<<" us\n";
00446   timer.Reset();
00447   timer.Start();
00448 #endif
00449
00450   // propagate ROI
00451   int tlx, tly, brx, bry;
00452   _gxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00453   const int miny=tly;
00454   const int maxy=bry;
00455   const int minxp=tlx+2;
00456   const int maxxm=brx-2;
00457   const int minyp=tly+2;
00458   const int maxym=bry-2;
00459   sgxx.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00460   sgxy.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00461   sgyy.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00462
00463   register int x, y, xm, xmm, xp, xpp, ym, ymm, yp, ypp;
00464   register OutputStorageType **isgxx=sgxx.GetImageDataArray();
00465   register OutputStorageType **isgxy=sgxy.GetImageDataArray();
00466   register OutputStorageType **isgyy=sgyy.GetImageDataArray();
00467   register OutputStorageType **itsgxx=_tsgxx.GetImageDataArray();
00468   register OutputStorageType **itsgxy=_tsgxy.GetImageDataArray();
00469   register OutputStorageType **itsgyy=_tsgyy.GetImageDataArray();
00470   register OutputStorageType **igxx=_gxx.GetImageDataArray();
00471   register OutputStorageType **igxy=_gxy.GetImageDataArray();
00472   register OutputStorageType **igyy=_gyy.GetImageDataArray();
00473   // separate loops are faster
00474   for (y=miny; y<maxy; y++){
00475     for (x=minxp; x<maxxm; x++){
00476       xmm=x-2; xm=x-1; xp=x+1; xpp=x+2;
00477       itsgxx[y][x]=
00478         igxx[y][xmm]+igxx[y][xm]+igxx[y][x]+igxx[y][xp]+igxx[y][xpp];
00479     }
00480   }
00481   for (y=minyp; y<maxym; y++){
00482     for (x=minxp; x<maxxm; x++){
00483       ymm=y-2; ym=y-1; yp=y+1; ypp=y+2;
00484       isgxx[y][x]=
00485         itsgxx[ymm][x]+itsgxx[ym][x]+itsgxx[y][x]+itsgxx[yp][x]+itsgxx[ypp][x];
00486     }
00487   }
00488   for (y=miny; y<maxy; y++){
00489     for (x=minxp; x<maxxm; x++){
00490       xmm=x-2; xm=x-1; xp=x+1; xpp=x+2;
00491       itsgxy[y][x]=
00492         igxy[y][xmm]+igxy[y][xm]+igxy[y][x]+igxy[y][xp]+igxy[y][xpp];
00493     }
00494   }
00495   for (y=minyp; y<maxym; y++){
00496     for (x=minxp; x<maxxm; x++){
00497       ymm=y-2; ym=y-1; yp=y+1; ypp=y+2;
00498       isgxy[y][x]=
00499         itsgxy[ymm][x]+itsgxy[ym][x]+itsgxy[y][x]+itsgxy[yp][x]+itsgxy[ypp][x];
00500     }
00501   }
00502   for (y=miny; y<maxy; y++){
00503     for (x=minxp; x<maxxm; x++){
00504       xmm=x-2; xm=x-1; xp=x+1; xpp=x+2;
00505       itsgyy[y][x]=
00506         igyy[y][xmm]+igyy[y][xm]+igyy[y][x]+igyy[y][xp]+igyy[y][xpp];
00507     }
00508   }
00509   for (y=minyp; y<maxym; y++){
00510     for (x=minxp; x<maxxm; x++){
00511       ymm=y-2; ym=y-1; yp=y+1; ypp=y+2;
00512       isgyy[y][x]=
00513         itsgyy[ymm][x]+itsgyy[ym][x]+itsgyy[y][x]+itsgyy[yp][x]+itsgyy[ypp][x];
00514     }
00515   }
00516
00517 #ifdef BIAS_DEBUG
00518   if (DebugLevelIsSet(D_ST_WRITE_DEBUG_IM)){
00519     _WriteDebugImage(sgxx, "sgxx-5x5.mip");
00520     _WriteDebugImage(sgxy, "sgxy-5x5.mip");
00521     _WriteDebugImage(sgyy, "sgyy-5x5.mip");
00522
00523     CalcStructureTensorValid(gx, gy, sgxx, sgxy, sgyy);
00524     _WriteDebugImage(sgxx, "sgxx-st.mip");
00525     _WriteDebugImage(sgxy, "sgxy-st.mip");
00526     _WriteDebugImage(sgyy, "sgyy-st.mip");
00527   }
00528 #endif
00529
00530 #ifdef TIME_MEASURE
00531   timer.Stop();
00532   cerr << "CalcStructureTensor5x5 without _GradientProducts took "<<timer.GetRealTime()<<" us\n";
00533 #endif
00534   return 0;
00535 }
00536
00537 template <class InputStorageType, class OutputStorageType>
00538 int StructureTensor<InputStorageType, OutputStorageType>::
00539 CalcStructureTensor7x7(const Image<OutputStorageType>& gx,
00540                        const Image<OutputStorageType>& gy,
00541                        Image<OutputStorageType>& sgxx,
00542                        Image<OutputStorageType>& sgxy,
00543                        Image<OutputStorageType>& sgyy)
00544 {
00545 #ifdef TIME_MEASURE
00546   TimeMeasure timer;
00547   timer.Start();
00548 #endif
00549
00550 #ifdef BIAS_DEBUG
00551   BIASASSERT(gx.SamePixelAndChannelCount(gy));
00552   BIASASSERT(gx.SamePixelAndChannelCount(sgxx));
00553   BIASASSERT(gx.SamePixelAndChannelCount(sgxy));
00554   BIASASSERT(gx.SamePixelAndChannelCount(sgyy));
00555 #endif
00556
00557   register int width=gx.GetWidth();
00558   const int height=gx.GetHeight();
00559   if (width>_InternalMemWidth || height>_InternalMemHeight){
00560     _AllocInternalMem(width, height);
00561   }
00562
00563   _GradientProducts(gx, gy);
00564
00565 #ifdef TIME_MEASURE
00566   timer.Stop();
00567   cerr << "_GradientProducts took "<<timer.GetRealTime()<<" us\n";
00568   timer.Reset();
00569   timer.Start();
00570 #endif
00571
00572   // propagate ROI
00573   int tlx, tly, brx, bry;
00574   _gxx.GetROI()->GetCorners(tlx, tly, brx, bry);
00575   const int miny=tly;
00576   const int maxy=bry;
00577   const int minxp=tlx+3;
00578   const int maxxm=brx-3;
00579   const int minyp=tly+3;
00580   const int maxym=bry-3;
00581   sgxx.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00582   sgxy.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00583   sgyy.GetROI()->SetCorners(minxp, minyp, maxxm, maxym);
00584
00585   {
00586     register OutputStorageType *ptsgxx, *ptmsgxx, *pmgxx, *ppgxx, *lend, *end;
00587     register OutputStorageType *ptsgxy, *ptmsgxy, *pmgxy, *ppgxy;
00588     register OutputStorageType *ptsgyy, *ptmsgyy, *pmgyy, *ppgyy;
00589     register const int tstep=width-(maxxm-minxp);
00590     const int offset=(width*miny)+minxp;
00591     ptmsgxx = _tsgxx.GetImageData() + offset;
00592     ptmsgxy = _tsgxy.GetImageData() + offset;
00593     ptmsgyy = _tsgyy.GetImageData() + offset;
00594     pmgxx = _gxx.GetImageData() + offset-3;
00595     pmgxy = _gxy.GetImageData() + offset-3;
00596     pmgyy = _gyy.GetImageData() + offset-3;
00597     lend = _tsgxx.GetImageData() + (width*miny)+maxxm;
00598     end = _tsgxx.GetImageData() + ((maxy-1)*width)+maxxm;
00599     while (ptmsgxx<end){
00600       ppgxx = pmgxx;
00601       ptsgxx = ptmsgxx;
00602       *ptsgxx=(OutputStorageType)0.0;
00603       *ptsgxx+=*ppgxx++;
00604       *ptsgxx+=*ppgxx++;
00605       *ptsgxx+=*ppgxx++;
00606       *ptsgxx+=*ppgxx++;
00607       *ptsgxx+=*ppgxx++;
00608       *ptsgxx+=*ppgxx++;
00609       *ptsgxx+=*ppgxx++;
00610       *ptsgxx++;
00611
00612       ppgxy = pmgxy;
00613       ptsgxy = ptmsgxy;
00614       *ptsgxy=(OutputStorageType)0.0;
00615       *ptsgxy+=*ppgxy++;
00616       *ptsgxy+=*ppgxy++;
00617       *ptsgxy+=*ppgxy++;
00618       *ptsgxy+=*ppgxy++;
00619       *ptsgxy+=*ppgxy++;
00620       *ptsgxy+=*ppgxy++;
00621       *ptsgxy+=*ppgxy++;
00622       *ptsgxy++;
00623
00624       ppgyy = pmgyy;
00625       ptsgyy = ptmsgyy;
00626       *ptsgyy=(OutputStorageType)0.0;
00627       *ptsgyy+=*ppgyy++;
00628       *ptsgyy+=*ppgyy++;
00629       *ptsgyy+=*ppgyy++;
00630       *ptsgyy+=*ppgyy++;
00631       *ptsgyy+=*ppgyy++;
00632       *ptsgyy+=*ppgyy++;
00633       *ptsgyy+=*ppgyy++;
00634       *ptsgyy++;
00635       while (ptsgxx<lend){
00636         *ptsgxx++ = *ptmsgxx++ - *pmgxx++ + *ppgxx++;
00637         *ptsgxy++ = *ptmsgxy++ - *pmgxy++ + *ppgxy++;
00638         *ptsgyy++ = *ptmsgyy++ - *pmgyy++ + *ppgyy++;
00639       }
00640       lend+=width;
00641       pmgxx+=tstep;
00642       ptmsgxx+=tstep;
00643       pmgxy+=tstep;
00644       ptmsgxy+=tstep;
00645       pmgyy+=tstep;
00646       ptmsgyy+=tstep;
00647     }
00648   }
00649
00650 #ifdef TIME_MEASURE
00651   timer.Stop();
00652   cerr << "first convolution took "<<timer.GetRealTime()<<" us\n";
00653   timer.Reset();
00654   timer.Start();
00655 #endif
00656   /*
00657   //const int max_cache_size=128000;
00658   //const int dy=max_cache_size/width;
00659   //int mminy=miny, mminyp=minyp, mmaxy, mmaxym;
00660   //for (mmaxy=dy, mmaxym=dy-3; mmaxy<maxy;
00661   //     mmaxy+=dy, mmaxym+=dy, mminy+=dy, mmindyp+=dy)
00662   { // this is very slow, maybe because of caches misses if done on the hole
00663   // image
00664   register OutputStorageType *ppsgxx, *pmsgxx, *ptmsgxx, *ptpsgxx, *lend, *end;
00665   register OutputStorageType *ppsgxy, *pmsgxy, *ptmsgxy, *ptpsgxy;
00666   register OutputStorageType *ppsgyy, *pmsgyy, *ptmsgyy, *ptpsgyy;
00667   register const int tstep=(width*(maxym-minyp-1))-1;
00668   const int offset=(width*miny)+minxp;
00669
00670   ptmsgxx = _tsgxx.GetImageData() + offset;
00671   ppsgxx = pmsgxx = sgxx.GetImageData() + (width*minyp)+minxp;
00672   ptmsgxy = _tsgxy.GetImageData() + offset;
00673   ppsgxy = pmsgxy = sgxy.GetImageData() + (width*minyp)+minxp;
00674   ptmsgyy = _tsgyy.GetImageData() + offset;
00675   ppsgyy = pmsgyy = sgyy.GetImageData() + (width*minyp)+minxp;
00676
00677   lend = sgxx.GetImageData() + (width*(maxym))+minxp;
00678   end = sgxx.GetImageData() + (width*(maxym))+maxxm-1;
00679
00680   while (ppsgxx<end){
00681   ppsgxx = pmsgxx + width;
00682   ptpsgxx = ptmsgxx;
00683   *pmsgxx=(OutputStorageType)0.0;
00684   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00685   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00686   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00687   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00688   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00689   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00690   *pmsgxx+=*ptpsgxx; ptpsgxx+=width;
00691
00692   ppsgxy = pmsgxy + width;
00693   ptpsgxy = ptmsgxy;
00694   *pmsgxy=(OutputStorageType)0.0;
00695   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00696   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00697   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00698   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00699   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00700   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00701   *pmsgxy+=*ptpsgxy; ptpsgxy+=width;
00702
00703   ppsgyy = pmsgyy + width;
00704   ptpsgyy = ptmsgyy;
00705   *pmsgyy=(OutputStorageType)0.0;
00706   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00707   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00708   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00709   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00710   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00711   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00712   *pmsgyy+=*ptpsgyy; ptpsgyy+=width;
00713
00714   while (ppsgxx<lend){
00715   *ppsgxx = *pmsgxx - *ptmsgxx + *ptpsgxx;
00716   ppsgxx+=width;
00717   pmsgxx+=width;
00718   ptmsgxx+=width;
00719   ptpsgxx+=width;
00720
00721   *ppsgxy = *pmsgxy - *ptmsgxy + *ptpsgxy;
00722   ppsgxy+=width;
00723   pmsgxy+=width;
00724   ptmsgxy+=width;
00725   ptpsgxy+=width;
00726
00727   *ppsgyy = *pmsgyy - *ptmsgyy + *ptpsgyy;
00728   ppsgyy+=width;
00729   pmsgyy+=width;
00730   ptmsgyy+=width;
00731   ptpsgyy+=width;
00732
00733   }
00734   lend++;
00735   ptmsgxx-=tstep;
00736   pmsgxx-=tstep;
00737   ptmsgxy-=tstep;
00738   pmsgxy-=tstep;
00739   ptmsgyy-=tstep;
00740   pmsgyy-=tstep;
00741   }
00742   }
00743
00744   */
00745
00746
00747   // todo this really fast by pointer arithmetic
00748   register int x, y, myp, mym, my1;
00749   register const int ymmm=minyp-3, ymm=minyp-2, ym=minyp-1, yp=minyp+1,
00750     ypp=minyp+2, yppp=minyp+3;
00751   register OutputStorageType **isgxx=sgxx.GetImageDataArray();
00752   register OutputStorageType **isgxy=sgxy.GetImageDataArray();
00753   register OutputStorageType **isgyy=sgyy.GetImageDataArray();
00754   register OutputStorageType **itsgxx=_tsgxx.GetImageDataArray();
00755   register OutputStorageType **itsgxy=_tsgxy.GetImageDataArray();
00756   register OutputStorageType **itsgyy=_tsgyy.GetImageDataArray();
00757
00758   if (width*height>153600){ // the caches are running empty
00759     // do concolution in two parts
00760     const int medy=((maxym-minyp)>>1)+minyp;
00761     const int eymmm=medy-3, eymm=medy-2, eym=medy-1, eyp=medy+1,
00762       eypp=medy+2, eyppp=medy+3;
00763     for (x=minxp; x<maxxm; x++){
00764       isgxy[minyp][x]=itsgxy[ymmm][x]+itsgxy[ymm][x]+itsgxy[ym][x]+
00765         itsgxy[minyp][x]+itsgxy[yp][x]+itsgxy[ypp][x]+itsgxy[yppp][x];
00766       for (y=minyp+1; y<medy; y++){
00767         myp=y+3; mym=y-4; my1=y-1;
00768         isgxy[y][x]=isgxy[my1][x]-itsgxy[mym][x]+itsgxy[myp][x];
00769       }
00770     }
00771     for (x=minxp; x<maxxm; x++){
00772       isgxy[medy][x]=itsgxy[eymmm][x]+itsgxy[eymm][x]+itsgxy[eym][x]+
00773         itsgxy[medy][x]+itsgxy[eyp][x]+itsgxy[eypp][x]+itsgxy[eyppp][x];
00774       for (y=medy+1; y<maxym; y++){
00775         myp=y+3; mym=y-4; my1=y-1;
00776         isgxy[y][x]=isgxy[my1][x]-itsgxy[mym][x]+itsgxy[myp][x];
00777       }
00778     }
00779
00780     for (x=minxp; x<maxxm; x++){
00781       isgxx[minyp][x]=itsgxx[ymmm][x]+itsgxx[ymm][x]+itsgxx[ym][x]+
00782         itsgxx[minyp][x]+itsgxx[yp][x]+itsgxx[ypp][x]+itsgxx[yppp][x];
00783       for (y=minyp+1; y<medy; y++){
00784         myp=y+3; mym=y-4; my1=y-1;
00785         isgxx[y][x]=isgxx[my1][x]-itsgxx[mym][x]+itsgxx[myp][x];
00786       }
00787     }
00788     for (x=minxp; x<maxxm; x++){
00789       isgxx[medy][x]=itsgxx[eymmm][x]+itsgxx[eymm][x]+itsgxx[eym][x]+
00790         itsgxx[medy][x]+itsgxx[eyp][x]+itsgxx[eypp][x]+itsgxx[eyppp][x];
00791       for (y=medy+1; y<maxym; y++){
00792         myp=y+3; mym=y-4; my1=y-1;
00793         isgxx[y][x]=isgxx[my1][x]-itsgxx[mym][x]+itsgxx[myp][x];
00794       }
00795     }
00796
00797     for (x=minxp; x<maxxm; x++){
00798       isgyy[minyp][x]=itsgyy[ymmm][x]+itsgyy[ymm][x]+itsgyy[ym][x]+
00799         itsgyy[minyp][x]+itsgyy[yp][x]+itsgyy[ypp][x]+itsgyy[yppp][x];
00800       for (y=minyp+1; y<medy; y++){
00801         myp=y+3; mym=y-4; my1=y-1;
00802         isgyy[y][x]=isgyy[my1][x]-itsgyy[mym][x]+itsgyy[myp][x];
00803       }
00804     }
00805     for (x=minxp; x<maxxm; x++){
00806       isgyy[medy][x]=itsgyy[eymmm][x]+itsgyy[eymm][x]+itsgyy[eym][x]+
00807         itsgyy[medy][x]+itsgyy[eyp][x]+itsgyy[eypp][x]+itsgyy[eyppp][x];
00808       for (y=medy+1; y<maxym; y++){
00809         myp=y+3; mym=y-4; my1=y-1;
00810         isgyy[y][x]=isgyy[my1][x]-itsgyy[mym][x]+itsgyy[myp][x];
00811       }
00812     }
00813   } else {
00814     for (x=minxp; x<maxxm; x++){
00815       isgxy[minyp][x]=itsgxy[ymmm][x]+itsgxy[ymm][x]+itsgxy[ym][x]+
00816         itsgxy[minyp][x]+itsgxy[yp][x]+itsgxy[ypp][x]+itsgxy[yppp][x];
00817       for (y=minyp+1; y<maxym; y++){
00818         myp=y+3; mym=y-4; my1=y-1;
00819         isgxy[y][x]=isgxy[my1][x]-itsgxy[mym][x]+itsgxy[myp][x];
00820       }
00821     }
00822
00823     for (x=minxp; x<maxxm; x++){
00824       isgxx[minyp][x]=itsgxx[ymmm][x]+itsgxx[ymm][x]+itsgxx[ym][x]+
00825         itsgxx[minyp][x]+itsgxx[yp][x]+itsgxx[ypp][x]+itsgxx[yppp][x];
00826       for (y=minyp+1; y<maxym; y++){
00827         myp=y+3; mym=y-4; my1=y-1;
00828         isgxx[y][x]=isgxx[my1][x]-itsgxx[mym][x]+itsgxx[myp][x];
00829       }
00830     }
00831
00832     for (x=minxp; x<maxxm; x++){
00833       isgyy[minyp][x]=itsgyy[ymmm][x]+itsgyy[ymm][x]+itsgyy[ym][x]+
00834         itsgyy[minyp][x]+itsgyy[yp][x]+itsgyy[ypp][x]+itsgyy[yppp][x];
00835       for (y=minyp+1; y<maxym; y++){
00836         myp=y+3; mym=y-4; my1=y-1;
00837         isgyy[y][x]=isgyy[my1][x]-itsgyy[mym][x]+itsgyy[myp][x];
00838       }
00839     }
00840   }
00841 #ifdef TIME_MEASURE
00842   timer.Stop();
00843   cerr << "second convolution took "<<timer.GetRealTime()<<" us\n";
00844   timer.Reset();
00845   timer.Start();
00846 #endif
00847
00848 #ifdef BIAS_DEBUG
00849   if (DebugLevelIsSet(D_ST_WRITE_DEBUG_IM)){
00850     _WriteDebugImage(sgxx, "sgxx-7x7.mip");
00851     _WriteDebugImage(sgxy, "sgxy-7x7.mip");
00852     _WriteDebugImage(sgyy, "sgyy-7x7.mip");
00853
00854     CalcStructureTensorValid(gx, gy, sgxx, sgxy, sgyy);
00855     _WriteDebugImage(sgxx, "sgxx-st.mip");
00856     _WriteDebugImage(sgxy, "sgxy-st.mip");
00857     _WriteDebugImage(sgyy, "sgyy-st.mip");
00858   }
00859 #endif
00860
00861 #ifdef TIME_MEASURE
00862   timer.Stop();
00863   cerr << "CalcStructureTensor7x7 without _GradientProducts took "<<timer.GetRealTime()<<" us\n";
00864 #endif
00865   return 0;
00866 }
00867
00868 //////////////////////////////////////////////////////////////////////////
00869 // protected functions
00870 //////////////////////////////////////////////////////////////////////////
00871
00872 template <class InputStorageType, class OutputStorageType>
00873 void StructureTensor<InputStorageType, OutputStorageType>::
00874 _AddParam(Param& para, const int grp, const std::string& postfix)
00875 {
00876
00877   if (para.CheckParam("GradientType"+postfix)){
00878     _GradientType = para.GetParamEnum("GradientType"+postfix);
00879   } else {
00880     vector<string> tt;
00881     vector<int> tti;
00882     tt.push_back("GT_Sobel3x3");
00883     tti.push_back(GT_Sobel3x3);
00884     tt.push_back("GT_Gauss");
00885     tti.push_back(GT_Gauss);
00886     tt.push_back("GT_GaussAsymmetric");
00887     tti.push_back(GT_GaussAsymmetric);
00888
00889     _GradientType = para.AddParamEnum("GradientType"+postfix,
00890                                       "type of gradient filter to use",
00891                                       tt, GT_Gauss, &tti, 0, grp);
00892   }
00893
00894   if (para.CheckParam("HalfWinSize"+postfix)){
00895     _HalfWinSize=
00896       para.GetParamInt("HalfWinSize"+postfix);
00897   } else {
00898     _HalfWinSize=
00899       para.AddParamInt("HalfWinSize"+postfix,
00900                        "half window size for computation of structure tensor",
00901                        3, 0, INT_MAX, 0, grp);
00902   }
00903 }
00904
00905
00906 template <class InputStorageType, class OutputStorageType>
00907 void StructureTensor<InputStorageType, OutputStorageType>::
00908 _AllocInternalMem(const int width, const int height)
00909 {
00910   if (!_gxx.IsEmpty()) _gxx.Release();
00911   _gxx.Init(width, height, 1);
00912   if (!_gxy.IsEmpty()) _gxy.Release();
00913   _gxy.Init(width, height, 1);
00914   if (!_gyy.IsEmpty()) _gyy.Release();
00915   _gyy.Init(width, height, 1);
00916   if (!_tsgxx.IsEmpty()) _tsgxx.Release();
00917   _tsgxx.Init(width, height, 1);
00918   if (!_tsgxy.IsEmpty()) _tsgxy.Release();
00919   _tsgxy.Init(width, height, 1);
00920   if (!_tsgyy.IsEmpty()) _tsgyy.Release();
00921   _tsgyy.Init(width, height, 1);
00922
00923   _InternalMemWidth=width;
00924   _InternalMemHeight=height;
00925 }
00926
00927 template <class InputStorageType, class OutputStorageType>
00928 void StructureTensor<InputStorageType, OutputStorageType>::
00929 _UpdateGrad()
00930 {
00931   _grad = &_gsobel3x3;
00932
00933   switch (*_GradientType){
00934   case GT_Sobel3x3:
00935     _grad = &_gsobel3x3;
00936     BIASCDOUT(D_ST_INIT, "gradient Sobel3x3\n");
00937     break;
00938   case GT_Gauss:
00939     _grad = &_ggauss;
00940     BIASCDOUT(D_ST_INIT, "gradient Gauss\n");
00941     break;
00942   case GT_GaussAsymmetric:
00943     _grad = &_ggaussasymmetric;
00944     BIASCDOUT(D_ST_INIT, "gradient GaussAsymmetric\n");
00945     break;
00946   default:
00947     BIASERR("unknown gradient type");
00948     BIASABORT;
00949     //_grad=NULL;
00950     //break;
00951   }
00952 }
00953
00954 template <class InputStorageType, class OutputStorageType>
00955 void StructureTensor<InputStorageType, OutputStorageType>::
00956 _WriteDebugImage(Image<OutputStorageType>& im, std::string name)
00957 {
00958 #ifdef BIAS_DEBUG
00959   if (ImageIO::Write(name, im)!=0){
00960     BIASERR("error wrting "<<name);
00961   }
00962 #endif
00963 }
00964
00965
00966 template <class InputStorageType, class OutputStorageType>
00967 void StructureTensor<InputStorageType, OutputStorageType>::
00968 _GradientProducts(const Image<OutputStorageType>& gx,
00969                   const Image<OutputStorageType>& gy)
00970 {
00971 #ifdef BIAS_DEBUG
00972   BIASASSERT(gx.SamePixelAndChannelCount(gy));
00973   BIASASSERT(gx.SamePixelAndChannelCount(_gxx));
00974   BIASASSERT(gx.SamePixelAndChannelCount(_gxy));
00975   BIASASSERT(gx.SamePixelAndChannelCount(_gyy));
00976 #endif
00977   int xtlx, xtly, xbrx, xbry, ytlx, ytly, ybrx, ybry;
00978   gx.GetROI()->GetCorners(xtlx, xtly, xbrx, xbry);
00979   gy.GetROI()->GetCorners(ytlx, ytly, ybrx, ybry);
00980
00981   const int width=gx.GetWidth();
00982   const int height=gx.GetHeight();
00983   if (width>_InternalMemWidth || height>_InternalMemHeight){
00984     //_DeleteInternalMem();
00985     _AllocInternalMem(width, height);
00986   }
00987   const int minx=((xtlx<ytlx)?(ytlx):(xtlx));
00988   const int maxx=((xbrx<ybrx)?(xbrx):(ybrx));
00989   const int miny=((xtly<ytly)?(ytly):(xtly));
00990   const int maxy=((xbrx<ybry)?(xbry):(ybry));
00991
00992   _gxx.GetROI()->SetCorners(minx, miny, maxx, maxy);
00993   _gxy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00994   _gyy.GetROI()->SetCorners(minx, miny, maxx, maxy);
00995
00996   /*
00997   register OutputStorageType **igx=gx.GetImageDataArray();
00998   register OutputStorageType **igy=gy.GetImageDataArray();
00999   register OutputStorageType **igxx=_gxx.GetImageDataArray();
01000   register OutputStorageType **igxy=_gxy.GetImageDataArray();
01001   register OutputStorageType **igyy=_gyy.GetImageDataArray();
01002   register int x, y;
01003   register OutputStorageType mgx, mgy;
01004   for (y=miny; y<maxy; y++){
01005     for (x=minx; x<maxx; x++){
01006       mgx=igx[y][x];
01007       mgy=igy[y][x];
01008       igxx[y][x]=mgx*mgx;
01009       igxy[y][x]=mgx*mgy;
01010       igyy[y][x]=mgy*mgy;
01011     }
01012   }
01013
01014   */
01015
01016
01017   register const int step=width-(maxx-minx);
01018   const int offset=miny*width+minx;
01019   register OutputStorageType *igx=gx.GetImageData()+offset;
01020   register OutputStorageType *igy=gy.GetImageData()+offset;
01021   register OutputStorageType *igxx=_gxx.GetImageData()+offset;
01022   register OutputStorageType *igxy=_gxy.GetImageData()+offset;
01023   register OutputStorageType *igyy=_gyy.GetImageData()+offset;
01024
01025   register const OutputStorageType *end=gx.GetImageData()+(maxy-1)*width+maxx;
01026   OutputStorageType *lend=gx.GetImageData()+miny*width+maxx;
01027
01028   while (igx<end){
01029     while (igx<lend){
01030       *igxx++=*igx * *igx;
01031       *igyy++=*igy * *igy;
01032       *igxy++=*igx++ * *igy++;
01033     }
01034     igx+=step;
01035     igy+=step;
01036     igxx+=step;
01037     igxy+=step;
01038     igyy+=step;
01039     lend+=width;
01040   }
01041
01042
01043 }
01044
01045 template <class InputStorageType, class OutputStorageType>
01046 void StructureTensor<InputStorageType, OutputStorageType>::
01047 GetBordersValid_(int &border_x, int &border_y) const
01048 {
01049   _grad->GetBorders(border_x, border_y);
01050   border_x += *_HalfWinSize;
01051   border_y += *_HalfWinSize;
01052 }
01053
01054 //////////////////////////////////////////////////////////////////////////
01055 //                 instantiation
01056 //////////////////////////////////////////////////////////////////////////
01057 #define FILTER_INSTANTIATION_CLASS StructureTensor
01058 #define FILTER_INSTANTIATION_NO_UNSIGNED_OUTPUT
01059 #include "Filterinst.hh"
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Filter/StructureTensor.hh Source File

Filter

StructureTensor.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __StructureTensor_hh__
00026 #define __StructureTensor_hh__
00027
00028 #include <Utils/Param.hh>
00029
00030 #include "FilterBase.hh"
00031 #include "GradientSobel3x3.hh"
00032 #include "GradientGauss.hh"
00033 #include "GradientGaussAsymmetric.hh"
00034 #include "FilterNTo3N.hh"
00035
00036 #define D_ST_WRITE_DEBUG_IM 0x00000001
00037 #define D_ST_INIT           0x00000002
00038 #define D_ST_FEATURES       0x00000004
00039
00040 namespace BIAS {
00041
00042   /** @class StructureTensor
00043       @ingroup g_filter
00044       @brief basic class for structure tensor calculation
00045
00046       @author woelk 09/2004 */
00047   template <class InputStorageType, class OutputStorageType>
00048   class BIASFilter_EXPORT StructureTensor : public FilterNTo3N<InputStorageType,
00049                                              OutputStorageType>
00050   {
00051     using FilterBase<InputStorageType,OutputStorageType>::_ParamsAllocated;
00052     using FilterBase<InputStorageType,OutputStorageType>::DebugLevelIsSet;
00053     using FilterBase<InputStorageType,OutputStorageType>
00054     ::_FilterBorderHandling;
00055   public:
00056     StructureTensor();
00057
00058     /** Adds the parameter to the param object using the postfix.
00059         @author woelk 09/2004 */
00060     StructureTensor(Param& para, const std::string& postfix="");
00061
00062     /** Adds the parameter to the param object using the postfix.
00063         The parameter are added to the param group grp.
00064         @author woelk 09/2004 */
00065     StructureTensor(Param& para, const int grp, const std::string& postfix);
00066
00067     ~StructureTensor();
00068
00069     /** calls the apropriate non virtual member function
00070         returns an 3 channel image where
00071         - channel 0 contains gxx
00072         - channel 1 contains gxy
00073         - channel 2 contains gyy
00074         @todo implement StructureTensor
00075         @author woelk 09/2004 */
00076     virtual int Filter(const Image<InputStorageType>& src,
00077                        Image<OutputStorageType>& dst);
00078     virtual int FilterInt(const Image<InputStorageType>& src,
00079                           Image<OutputStorageType>& dst);
00080     virtual int FilterFloat(const Image<InputStorageType>& src,
00081                             Image<OutputStorageType>& dst);
00082
00083     virtual int Filter(const Image<InputStorageType>& src,
00084                        Image<OutputStorageType>& gxx,
00085                        Image<OutputStorageType>& gxy,
00086                        Image<OutputStorageType>& gyy);
00087
00088     virtual int FilterInt(const Image<InputStorageType>& src,
00089                           Image<OutputStorageType>& gxx,
00090                           Image<OutputStorageType>& gxy,
00091                           Image<OutputStorageType>& gyy);
00092
00093     virtual int FilterFloat(const Image<InputStorageType>& src,
00094                             Image<OutputStorageType>& gxx,
00095                             Image<OutputStorageType>& gxy,
00096                             Image<OutputStorageType>& gyy);
00097
00098
00099     /** Calculates the gradients uses internal gradient class and calls
00100         CalcStructureTensor with these gradients
00101         @author woelk 09/2004 */
00102     int CalcStructureTensor(const Image<InputStorageType>& src,
00103                            Image<OutputStorageType>& sgxx,
00104                             Image<OutputStorageType>& sgxy,
00105                            Image<OutputStorageType>& sgyy);
00106
00107     /** For any _HalfWinSize. For any border handling.
00108         @todo implement CalcStructureTensor for other border handling than
00109         valid
00110         @author woelk 09/2004 */
00111     int CalcStructureTensor(const Image<OutputStorageType>& gx,
00112                             const Image<OutputStorageType>& gy,
00113                             Image<OutputStorageType>& sgxx,
00114                             Image<OutputStorageType>& sgxy,
00115                             Image<OutputStorageType>& sgyy);
00116
00117     /** For any _HalfWinSize. Uses valid border handling.
00118         Destination images must be initialized.
00119         @todo implement separated summation.
00120         @author woelk 09/2004 */
00121     int CalcStructureTensorValid(const Image<OutputStorageType>& gx,
00122                                  const Image<OutputStorageType>& gy,
00123                                  Image<OutputStorageType>& sgxx,
00124                                  Image<OutputStorageType>& sgxy,
00125                                  Image<OutputStorageType>& sgyy);
00126
00127     /** Uses _HalfWinSize=1
00128         Destination images must be initialized.
00129         @author woelk 09/2004 */
00130     int CalcStructureTensor3x3(const Image<OutputStorageType>& gx,
00131                                const Image<OutputStorageType>& gy,
00132                                Image<OutputStorageType>& sgxx,
00133                                Image<OutputStorageType>& sgxy,
00134                                Image<OutputStorageType>& sgyy);
00135
00136     /** Uses _HalfWinSize=2
00137         Destination images must be initialized.
00138         @author woelk 09/2004 */
00139     int CalcStructureTensor5x5(const Image<OutputStorageType>& gx,
00140                                const Image<OutputStorageType>& gy,
00141                                Image<OutputStorageType>& sgxx,
00142                                Image<OutputStorageType>& sgxy,
00143                                Image<OutputStorageType>& sgyy);
00144
00145     /** Uses _HalfWinSize=3
00146         Destination images must be initialized.
00147         @todo make it really fast
00148         @author woelk 09/2004 */
00149     int CalcStructureTensor7x7(const Image<OutputStorageType>& gx,
00150                                const Image<OutputStorageType>& gy,
00151                                Image<OutputStorageType>& sgxx,
00152                                Image<OutputStorageType>& sgxy,
00153                                Image<OutputStorageType>& sgyy);
00154
00155     ///////////////////////////////////////////////////////////////////////
00156
00157     inline void SetHalfWinSize(const int hws) { *_HalfWinSize=hws; }
00158
00159     inline int GetHalfWinSize() const { return *_HalfWinSize; }
00160
00161     inline void SetGradientType(const int gt)
00162     { *_GradientType=gt; _UpdateGrad(); }
00163
00164     inline int GetGradientType() const { return *_GradientType; }
00165
00166   protected:
00167     /// pointer to gradient filter actually used:
00168     FilterNTo2N<InputStorageType, OutputStorageType> *_grad;
00169
00170     GradientSobel3x3<InputStorageType, OutputStorageType> _gsobel3x3;
00171     GradientGauss<InputStorageType, OutputStorageType> _ggauss;
00172     GradientGaussAsymmetric<InputStorageType, OutputStorageType>
00173     _ggaussasymmetric;
00174
00175     // the window size for the structure tensor computation
00176     int *_HalfWinSize;
00177     // the gradient type
00178     int *_GradientType;
00179
00180     // internal variables
00181     // gradient images
00182     Image<OutputStorageType> _gx, _gy;
00183     // _gxx = gx*gx, gxy = gx*gy, gyy = gy*gy
00184     Image<OutputStorageType> _gxx, _gxy, _gyy;
00185     // temporary space for separated summation
00186     Image<OutputStorageType> _tsgxx, _tsgxy, _tsgyy;
00187     // size of the internal images
00188     int _InternalMemWidth, _InternalMemHeight;
00189
00190     // add the parameter to the param object
00191     void _AddParam(Param& para, const int grp, const std::string& postfix);
00192
00193     /// sets _grad according to *_GradientType
00194     void _UpdateGrad();
00195
00196     /// for debugging only
00197     void _WriteDebugImage(Image<OutputStorageType>& im, std::string name);
00198
00199     /** fills up _gxx, _gxy, _gyy from gx and gy
00200         @author woelk 09/2004 */
00201     void _GradientProducts(const Image<OutputStorageType>& gx,
00202                            const Image<OutputStorageType>& gy);
00203
00204
00205     /// allocates _gxx, _gyy, _gxy, _tsgxx, _tsgxy, _tsgyy
00206     ///  and sets InternalMemWidth and _InternalMemHeight
00207     void _AllocInternalMem(const int width, const int height);
00208
00209     virtual void GetBordersValid_(int &border_x, int &border_y) const;
00210
00211   }; // class
00212
00213 } // namespace
00214
00215 #endif //__StructureTensor_hh__
Generated on Wed Jun 21 19:00:59 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Vardesc Member List

This is the complete list of members for Vardesc, including all inherited members.

addr typedef | Vardesc
addr typedef | Vardesc
dims typedef | Vardesc
dims typedef | Vardesc
name typedef | Vardesc
name typedef | Vardesc
type typedef | Vardesc
type typedef | Vardesc

Generated on Wed Jun 21 19:06:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/subscript.h Source File

Base » Math » tnt

subscript.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033 #ifndef SUBSCRPT_H
00034 #define SUBSCRPT_H
00035
00036
00037 //---------------------------------------------------------------------
00038 // This definition describes the default TNT data type used for
00039 // indexing into TNT matrices and vectors.  The data type should
00040 // be wide enough to index into large arrays.  It defaults to an
00041 // "int", but can be overriden at compile time redefining TNT_SUBSCRIPT_TYPE,
00042 // e.g.
00043 //
00044 //      g++ -DTNT_SUBSCRIPT_TYPE='unsigned int'  ...
00045 //
00046 //---------------------------------------------------------------------
00047 //
00048
00049 #ifndef TNT_SUBSCRIPT_TYPE
00050 #define TNT_SUBSCRIPT_TYPE int
00051 #endif
00052
00053 namespace TNT
00054 {
00055     typedef TNT_SUBSCRIPT_TYPE Subscript;
00056 }
00057
00058
00059 // () indexing in TNT means 1-offset, i.e. x(1) and A(1,1) are the
00060 // first elements.  This offset is left as a macro for future
00061 // purposes, but should not be changed in the current release.
00062 //
00063 //
00064 #define TNT_BASE_OFFSET (1)
00065
00066 #endif
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD3x3.cpp Source File

MathAlgo

SVD3x3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "SVD3x3.hh"
00026
00027
00028 #ifdef WIN32
00029 #  define _USE_MATH_DEFINES
00030 #endif //WIN32
00031 #include <math.h>
00032
00033 #include <Base/Common/BIASpragma.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 #define SVD_MAX_ITERATIONS 40
00039
00040 SVD3x3::SVD3x3()
00041 {
00042   A_.newsize(3, 3);
00043   S_.newsize(3);
00044   U_.newsize(3, 3);
00045   VT_.newsize(3, 3);
00046   ZeroThreshold_=DEFAULT_DOUBLE_ZERO_THRESHOLD;
00047   Decomposed_=false;
00048 }
00049
00050 SVD3x3::SVD3x3(const Matrix <double> & M, double ZeroThreshold)
00051 {
00052   A_.newsize(3, 3);
00053   S_.newsize(3);
00054   U_.newsize(3, 3);
00055   VT_.newsize(3, 3);
00056   Compute(M, ZeroThreshold);
00057 }
00058
00059 static double at,bt,ct;
00060 #define PYTHAG(a,b) ((at=fabs(a)) > (bt=fabs(b)) ? \
00061 (ct=bt/at,at*sqrt(1.0+ct*ct)) : (bt ? (ct=at/bt,bt*sqrt(1.0+ct*ct)): 0.0))
00062
00063 static double maxarg1,maxarg2;
00064 #define MAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\
00065     (maxarg1) : (maxarg2))
00066 #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
00067
00068 /** this function is based on svdcmp from the numerical recipes in C */
00069 int SVD3x3::Compute(const Matrix<double> & M, double ZeroThreshold)
00070 {
00071   BIASASSERT(M.num_rows()==3);
00072   BIASASSERT(M.num_cols()==3);
00073
00074   Decomposed_=false;
00075   ZeroThreshold_ = ZeroThreshold;
00076   U_=A_=M;
00077   int res=0;
00078   double **a=U_.GetDataArray1(), **v=VT_.GetDataArray1();
00079   double *w=S_.GetData()-1;
00080     int flag=0, i=0, its=0, j=0, jj=0 , k=0, l=0, nm=0;
00081     double c=0.0, f=0.0, h=0.0, s=0.0, x=0.0, y=0.0, z=0.0;
00082     double norma=0.0, g=0.0, sc=0.0;
00083     double tmp[4];
00084
00085     for (i=1; i<=3; i++) {
00086         l=i+1;
00087         tmp[i]=sc*g;
00088         g=s=sc=0.0;
00089         if (i <= 3) {
00090             for (k=i; k<=3; k++)
00091         sc += fabs(a[k][i]);
00092             if (sc) {
00093                 for (k=i; k<=3; k++) {
00094                     a[k][i] /= sc;
00095           // here s and a[k][i] are exactly the same for O2 and O3
00096                     s += a[k][i]*a[k][i];
00097           // s is now slightly different for O2 and O3 !
00098                 }
00099                 f=a[i][i];
00100                 g = -SIGN(sqrt(s),f);
00101                 h=f*g-s;
00102                 a[i][i]=f-g;
00103                 if (i != 3) {
00104                     for (j=l; j<=3; j++) {
00105                         for (s=0.0,k=i; k<=3; k++)
00106               s += a[k][i]*a[k][j];
00107                         f=s/h;
00108                         for (k=i; k<=3; k++)
00109               a[k][j] += f*a[k][i];
00110                     }
00111                 }
00112                 for (k=i; k<=3; k++)
00113           a[k][i] *= sc;
00114             }
00115         }
00116         w[i]=sc*g;
00117         g=s=sc=0.0;
00118         if (i < 3) {
00119             for (k=l; k<=3; k++)
00120         sc += fabs(a[i][k]);
00121             if (sc) {
00122                 for (k=l; k<=3; k++) {
00123                     a[i][k] /= sc;
00124                     s += a[i][k]*a[i][k];
00125                 }
00126                 f=a[i][l];
00127                 g = -SIGN(sqrt(s),f);
00128                 h=f*g-s;
00129                 a[i][l]=f-g;
00130                 for (k=l; k<=3; k++)
00131           tmp[k]=a[i][k]/h;
00132                 if (i != 3) {
00133                     for (j=l; j<=3; j++) {
00134                         for (s=0.0,k=l; k<=3; k++)
00135               s += a[j][k]*a[i][k];
00136                         for (k=l; k<=3; k++)
00137               a[j][k] += s*tmp[k];
00138                     }
00139                 }
00140                 for (k=l; k<=3; k++)
00141           a[i][k] *= sc;
00142             }
00143         }
00144         norma=MAX(norma,(fabs(w[i])+fabs(tmp[i])));
00145     }
00146     for (i=3; i>=1; i--) {
00147         if (i < 3) {
00148             if (g) {
00149                 for (j=l; j<=3; j++)
00150                     v[i][j]=(a[i][j]/a[i][l])/g;
00151                 for (j=l; j<=3; j++) {
00152                     for (s=0.0,k=l; k<=3; k++)
00153             s += a[i][k]*v[j][k];
00154                     for (k=l; k<=3; k++)
00155             v[j][k] += s*v[i][k];
00156                 }
00157             }
00158             for (j=l; j<=3; j++)
00159         v[i][j]=v[j][i]=0.0;
00160         }
00161         v[i][i]=1.0;
00162         g=tmp[i];
00163         l=i;
00164     }
00165     for (i=3; i>=1; i--) {
00166         l=i+1;
00167         g=w[i];
00168         if (i < 3)
00169             for (j=l; j<=3; j++)
00170         a[i][j]=0.0;
00171         if (g) {
00172             g=1.0/g;
00173             if (i != 3) {
00174                 for (j=l; j<=3; j++) {
00175                     for (s=0.0, k=l; k<=3; k++)
00176             s += a[k][i]*a[k][j];
00177                     f=(s/a[i][i])*g;
00178                     for (k=i; k<=3; k++)
00179             a[k][j] += f*a[k][i];
00180                 }
00181             }
00182             for (j=i; j<=3; j++)
00183         a[j][i] *= g;
00184         } else {
00185             for (j=i; j<=3; j++)
00186         a[j][i]=0.0;
00187         }
00188         ++a[i][i];
00189     }
00190     for (k=3; k>=1; k--) {
00191         for (its=1; its<=SVD_MAX_ITERATIONS; its++) {
00192             flag=1;
00193             for (l=k;l>=1;l--) {
00194                 nm=l-1;
00195                 if (fabs(tmp[l])+norma == norma) {
00196           // for l==k==2 we never reach this point, because lhs and rhs
00197           // differ here by 1e-18 !
00198                     flag=0;
00199                     break;
00200                 }
00201                 if (fabs(w[nm])+norma == norma)
00202           break;
00203             }
00204             if (flag) {
00205                 c=0.0;
00206                 s=1.0;
00207                 for (i=l; i<=k; i++) {
00208                     f=s*tmp[i];
00209                     if (fabs(f)+norma != norma) {
00210                         g=w[i];
00211                         h=PYTHAG(f,g);
00212                         w[i]=h;
00213                         h=1.0/h;
00214                         c=g*h;
00215                         s=(-f*h);
00216                         for (j=1; j<=3; j++) {
00217                             y=a[j][nm];
00218                             z=a[j][i];
00219                             a[j][nm]=y*c+z*s;
00220                             a[j][i]=z*c-y*s;
00221                         }
00222                     }
00223                 }
00224             }
00225             z=w[k];
00226       // check for negative singular values and adapt them and V accordingly
00227             if (l == k) {
00228                 if (z < 0.0) {
00229                     w[k] = -z;
00230                     for (j=1; j<=3; j++)
00231             v[k][j]=(-v[k][j]);
00232                 }
00233                 break;
00234             }
00235             if (its == SVD_MAX_ITERATIONS) {
00236         BIASERR("No convergence in "<<SVD_MAX_ITERATIONS<<" iterations");
00237         res=-1;
00238         break;
00239       }
00240             x=w[l];
00241             nm=k-1;
00242             y=w[nm];
00243             g=tmp[nm];
00244             h=tmp[k];
00245             f=((y-z)*(y+z)+(g-h)*(g+h))/(2.0*h*y);
00246             g=PYTHAG(f,1.0);
00247             f=((x-z)*(x+z)+h*((y/(f+SIGN(g,f)))-h))/x;
00248             c=s=1.0;
00249             for (j=l; j<=nm; j++) {
00250                 i=j+1;
00251                 g=tmp[i];
00252                 y=w[i];
00253                 h=s*g;
00254                 g=c*g;
00255                 z=PYTHAG(f,h);
00256                 tmp[j]=z;
00257                 c=f/z;
00258                 s=h/z;
00259                 f=x*c+g*s;
00260                 g=g*c-x*s;
00261                 h=y*s;
00262                 y=y*c;
00263                 for (jj=1; jj<=3; jj++) {
00264                     x=v[j][jj];
00265                     z=v[i][jj];
00266                     v[j][jj]=x*c+z*s;
00267                     v[i][jj]=z*c-x*s;
00268                 }
00269                 z=PYTHAG(f,h);
00270                 w[j]=z;
00271                 if (z) {
00272                     z=1.0/z;
00273                     c=f*z;
00274                     s=h*z;
00275                 }
00276                 f=(c*g)+(s*y);
00277                 x=(c*y)-(s*g);
00278                 for (jj=1; jj<=3; jj++) {
00279                     y=a[jj][j];
00280                     z=a[jj][i];
00281                     a[jj][j]=y*c+z*s;
00282                     a[jj][i]=z*c-y*s;
00283                 }
00284             }
00285             tmp[l]=0.0;
00286             tmp[k]=f;
00287             w[k]=x;
00288         }
00289     }
00290
00291   // now sort singular values
00292   // we wouldnt need the fabs here if svd always worked correctly,
00293   // for most reasonable ordering in case of fail, check for sign
00294   if (fabs(S_[0])<fabs(S_[1])){
00295     _Swap(0, 1);
00296   }
00297   if (fabs(S_[1])<fabs(S_[2])){
00298     _Swap(1, 2);
00299   }
00300
00301   if (res==0) Decomposed_=true;
00302
00303   return res;
00304 }
00305 #undef SIGN
00306 #undef MAX
00307 #undef PYTHAG
00308
00309
00310
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD3x3.hh Source File

MathAlgo

SVD3x3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __SVD3x3_hh__
00026 #define __SVD3x3_hh__
00027
00028 #include "SVD.hh"
00029
00030 namespace BIAS {
00031   /** @class SVD3x3
00032       @ingroup g_mathalgo
00033       @brief singular value decomposition for 3x3 matrices
00034
00035       koeser: There is an example matrix
00036       F[0][0] =0.00075284066373225704;
00037       F[0][1] =-0.099906426438442303;
00038       F[0][2] =0.16267766990357244;
00039       F[1][0] =0.10333163045064053;
00040       F[1][1] =0.0014727467665194025;
00041       F[1][2] =0.6803859609102173;
00042       F[2][0] =-0.16234020366691171;
00043       F[2][1] =-0.68087420277635458;
00044       F[2][2] =0.0021896762792443826;
00045       where the svd fails (at least) on p4 systems with gcc 3.3.1 and 3.3.3
00046       with -O3 (independent of march-flag), but where it does not fail with O2.
00047       SVD3x3 is implemented as an algorithm, which computes each singular value
00048       and corresponding vector by iterating until some error measure e becomes
00049       small compared to a reference value ref:
00050       if (ref+e==ref) then converged=true;
00051       With O3 this condition never becomes true for the second singular value,
00052       because the difference of lhs and rhs stays at 1e-18, while in O2
00053       this converges after two iterations to zero.
00054       We have problems here in the order of machine precision, the question is
00055       now whether this different behaviour of O2 and O3 is due to a compiler
00056       error or an algorithmic weakness.
00057       When tracing back the two execution branches of ExampleSVD3x3 (O2 and
00058       O3), which uses the above matrix one finds that in the very beginning,
00059       s and a[k][i] are absolutely the same before the line:
00060       s += a[k][i]*a[k][i];
00061       and after this line s differs by the last digit. Such effects sum up and
00062       result in the failing of the convergence of the SVD.
00063       Debugging in O3 is complicated because every cout causes a side-effect
00064       and changes execution order and results, so I found that even adding one
00065       simple cout at some line made the algorithm converge for that example.
00066
00067       In my opinion this means that the svd algorihtm makes some convergence
00068       assumptions about values in the order of machine precision which are not
00069       always fulfilled, therefore it does not converge. This is just one
00070       example which happens with O3 but there may also be one for O2, which we
00071       have not found ? It may however also be an optimization "error" of gcc.
00072
00073       @author woelk 08/2004 */
00074   class BIASMathAlgo_EXPORT SVD3x3 : public SVD
00075   {
00076   public:
00077     SVD3x3();
00078
00079     /** constructor
00080         solve the general eigenproblem of the rectangular matrix M
00081         @author woelk 07/2004
00082         @bug does not always converge when general svd does **/
00083     SVD3x3(const Matrix <double> & M,
00084            double ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD );
00085
00086     inline virtual ~SVD3x3() {};
00087
00088     /** set a new matrix and compute its decomposition.
00089         solves the general eigenproblem of the rectangular matrix M
00090         @bug does not always converge when general svd does
00091         @author woelk 07/2004 **/
00092     int Compute(const Matrix<double>& M,
00093                 double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD);
00094
00095   protected:
00096     // swaps two singular values in S_ and the according columns/rows in V_/U_
00097     inline void _Swap(int a, int  b)
00098     {
00099       double tmp;
00100       // swap singular values
00101       tmp=S_[a]; S_[a]=S_[b]; S_[b]=tmp;
00102       // swap rows in VT_
00103       tmp=VT_[a][0]; VT_[a][0]=VT_[b][0]; VT_[b][0]=tmp;
00104       tmp=VT_[a][1]; VT_[a][1]=VT_[b][1]; VT_[b][1]=tmp;
00105       tmp=VT_[a][2]; VT_[a][2]=VT_[b][2]; VT_[b][2]=tmp;
00106       // swap columns in U_
00107       tmp=U_[0][a]; U_[0][a]=U_[0][b]; U_[0][b]=tmp;
00108       tmp=U_[1][a]; U_[1][a]=U_[1][b]; U_[1][b]=tmp;
00109       tmp=U_[2][a]; U_[2][a]=U_[2][b]; U_[2][b]=tmp;
00110     }
00111   };
00112
00113
00114 } // namespace
00115
00116
00117 #endif // __SVD3x3_hh__
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD.cpp Source File

MathAlgo

SVD.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "SVD.hh"
00027
00028 #include <Base/Debug/Exception.hh>
00029 #include <Base/Common/CompareFloatingPoint.hh>
00030
00031 #include <algorithm>
00032 #include <cmath>
00033
00034
00035 #include "Lapack.hh"
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 SVD::SVD(const Matrix<double> &M, double ZeroThreshold,
00041          bool AbsoluteZeroThreshold) {
00042   AbsoluteZeroThreshold_ =  AbsoluteZeroThreshold;
00043   Compute( M, ZeroThreshold);
00044 }
00045
00046
00047 int SVD::Compute(const Matrix<double> & M, double ZeroThreshold)
00048 {
00049   Decomposed_=false;
00050   ZeroThreshold_ = ZeroThreshold;
00051   return General_Eigenproblem_GeneralMatrix_Lapack( M );
00052 }
00053
00054
00055 int SVD::General_Eigenproblem_GeneralMatrix_Lapack(const Matrix<double> & M)
00056 {
00057   // S_ will contain the singular values of A sorted with s(i) <= s(i+1)
00058   // U_ will contain m x m left orthogonal/unitary matrix with
00059   //    eigenvectors in columns
00060   // VT_ will contain n x n right _transposed_ orthogonal/unitary matrix
00061   //     with eigenvectors in rows (because of transpose)
00062   A_=M;
00063   int res=0;
00064   res = General_singular_value_decomposition(A_, S_, U_, VT_);
00065   if ( S_.size() != 0 && U_.num_rows() != 0 &&  U_.num_cols() != 0 &&
00066        VT_.num_rows() != 0 &&  VT_.num_cols() != 0) {
00067     Decomposed_=true;
00068   } else {
00069     res = -1;
00070   }
00071
00072   return res;
00073 }
00074
00075 // -- Solve the matrix-vector system M x = y, returning x.
00076 Vector<double> SVD::Solve(const Vector<double>& y) const
00077 {
00078   /// @bug bug in this function (woelk)
00079   BIASERR("warning, there is a bug in this function, use Solve(Matrix, vector, Vector instead");
00080   Vector<double> x(VT_.num_cols());      // solution matrix vector
00081   Vector<double> UTy;
00082
00083   //cout << "U_=" << U_ << " VT_= " << VT_ << " S_=" << S_;
00084
00085   if(Decomposed_)
00086     if (y.size() <= U_.num_rows()){
00087       Matrix<double> UT=U_.Transpose();
00088       // at first multiply with U^T
00089       if (U_.num_rows() < U_.num_cols()) {// augment y with extra rows of
00090         Vector<double> yy(U_.num_rows(), 0.0);      // zeros, so that it match
00091         for (int k=0; k< y.size();k++)
00092           yy[k] = y[k]; // cols of u.transpose.
00093         UTy = UT * yy;
00094       } else {
00095         UTy = UT * y;
00096       }
00097
00098       // multiply with diagonal 1/S_
00099       int i=0;
00100       for (; i < UTy.size(); i++)
00101         x[i]=(fabs(S_[i]) >= ZeroThreshold_) ? UTy[i]/S_[i] : 0;//UTy[i]*S_[i];
00102
00103       for (;i<x.size();i++)  x[i]=0;
00104
00105       return VT_.Transpose() * x;   // premultiply with v.
00106
00107     } else {
00108       BIASERR("size of right hand side of Ax = y is too big. Length(y) = "
00109               << y.size());
00110       return x;
00111     } else {
00112       BIASERR("SVD holds no decomposed matrix.");
00113       return x;
00114     }
00115 }
00116
00117
00118 Matrix<double> SVD::Invert()
00119 {
00120   Matrix<double> V(VT_.num_cols(), VT_.num_rows());
00121   Matrix<double> UT(U_.num_cols(), U_.num_rows());
00122   Matrix<double> SdT(VT_.num_rows(), U_.num_cols());
00123   SdT.SetZero();
00124   for (register int i=0; i< S_.size(); i++){
00125     SdT[i][i] = (S_[i]<ZeroThreshold_ && S_[i]>-ZeroThreshold_)
00126       ?(0.0):(1/S_[i]);
00127   }
00128   V = VT_.Transpose();
00129   UT = U_.Transpose();
00130
00131   if (Decomposed_)
00132     return V * SdT * UT;
00133
00134   Matrix<double> res(0,0);
00135   return res;
00136 }
00137
00138 Matrix<double> SVD::Invert(Matrix<double> A)
00139 {
00140   if (Compute(A)==0)
00141     return Invert();
00142   else return Matrix<double>(0,0);
00143 }
00144
00145
00146 Matrix<double> SVD::Sqrt()
00147 {
00148 #ifdef BIAS_DEBUG
00149   // check symmetry and symmetric positive definit'ness
00150   // 1. symmetry
00151   bool valid = (A_.GetCols() == A_.GetRows());
00152   if (valid){
00153     const int num = A_.GetCols();
00154     for (int r=0; r<num; r++){
00155       for (int c=r; c<num; c++){
00156         valid = valid && Equal(A_[r][c], A_[c][r], 1e-12);
00157         if (!valid) {
00158           cout << setprecision(20) << A_[r][c] << "\t"<< setprecision(20) << A_[c][r]<<endl;
00159           break;
00160           break;
00161         }
00162       }
00163     }
00164   }
00165   if (!valid){
00166     //BIASERR("matrix is not symmetric "<<A_);
00167     BEXCEPTION("matrix is not symmetric "/*<<A_*/);
00168   }
00169   // 2. positive definit = all eigenvalues are positive
00170   Vector<double> eig = Upper_symmetric_eigenvalue_solve(A_);
00171   for (register int i=0; i<eig.size(); i++){
00172     valid = valid && (GreaterEqual(eig[i], 0.0, 1e-10));
00173     if (!valid){
00174       cout << "eigenvalue "<<setprecision(20)<<eig[i]<<endl;
00175       break;
00176     }
00177   }
00178   if (!valid){
00179     //BIASERR("matrix is not positive definit "<<A_);
00180     BEXCEPTION("matrix is not positive definit "/*<<A_*/);
00181   }
00182 #endif
00183   if (!Decomposed_){
00184     Compute(A_);
00185   }
00186   // [U S V] = svd(A); sqrtm(A) = U * sqrt(S) * V'
00187   Matrix<double> SqrtS(VT_.num_rows(), U_.num_cols());
00188   SqrtS.SetZero();
00189   for (register int i=0; i<S_.size(); i++){
00190     SqrtS[i][i] = (fabs(S_[i])<ZeroThreshold_)?(0.0):(sqrt(S_[i]));
00191   }
00192
00193   return U_ * SqrtS; //* VT_;
00194 }
00195
00196 Matrix<double> SVD::Sqrt(const Matrix<double>& A)
00197 {
00198   if (Compute(A)==0)
00199     return Sqrt();
00200   else return Matrix<double>(0,0);
00201 }
00202
00203
00204 Matrix<double> SVD::SqrtT()
00205 {
00206 #ifdef BIAS_DEBUG
00207   // check symmetry and symmetric positive definit'ness
00208   // 1. symmetry
00209   bool valid = (A_.GetCols() == A_.GetRows());
00210   if (valid){
00211     const int num = A_.GetCols();
00212     for (int r=0; r<num; r++){
00213       for (int c=r; c<num; c++){
00214         valid = valid && Equal(A_[r][c], A_[c][r], 1e-12);
00215         if (!valid) {
00216           cout << setprecision(20) << A_[r][c] << "\t"<< setprecision(20) << A_[c][r]<<endl;
00217           break;
00218           break;
00219         }
00220       }
00221     }
00222   }
00223   if (!valid){
00224     //BIASERR("matrix is not symmetric "<<A_);
00225     BEXCEPTION("matrix is not symmetric "/*<<A_*/);
00226   }
00227   // 2. positive definit = all eigenvalues are positive
00228   Vector<double> eig = Upper_symmetric_eigenvalue_solve(A_);
00229   for (register int i=0; i<eig.size(); i++){
00230     valid = valid && (GreaterEqual(eig[i], 0.0, 1e-12));
00231     if (!valid){
00232       cout << "eigenvalue "<<setprecision(20)<<eig[i]<<endl;
00233       break;
00234     }
00235   }
00236   if (!valid){
00237     //BIASERR("matrix is not positive definit "<<A_);
00238     BEXCEPTION("matrix is not positive definit "/*<<A_*/);
00239   }
00240 #endif
00241   if (!Decomposed_){
00242     Compute(A_);
00243   }
00244   // [U S V] = svd(A); sqrtm(A) = U * sqrt(S)
00245   Matrix<double> SqrtS(VT_.num_rows(), U_.num_cols());
00246   SqrtS.SetZero();
00247   for (register int i=0; i<S_.size(); i++){
00248     SqrtS[i][i] = (fabs(S_[i])<ZeroThreshold_)?(0.0):(sqrt(S_[i]));
00249   }
00250
00251   return U_ * SqrtS;
00252 }
00253
00254 Matrix<double> SVD::SqrtT(const Matrix<double>& A)
00255 {
00256   if (Compute(A)==0)
00257     return SqrtT();
00258   else return Matrix<double>(0,0);
00259 }
00260
00261
00262 const int SVD::AbsNullspaceDim() const
00263 {
00264   int dim = 0;
00265   int index = S_.size()-1;
00266
00267   //cerr << "ZeroThreshold_: "<<ZeroThreshold_<<endl;
00268   while (index >= 0 && fabs(S_[index]) < ZeroThreshold_ ) {
00269     // singular values are sorted in descending order is still (around zero
00270     index--;
00271     dim++;
00272   }
00273
00274   if (A_.num_cols()>A_.num_rows()){
00275       dim+=A_.num_cols()-A_.num_rows();
00276   }
00277   return dim;
00278 }
00279
00280 const int SVD::RelNullspaceDim() const
00281 {
00282   int dim = 0;
00283   int index = S_.size()-1;
00284
00285   // use greatest singular value as reference
00286   const double RefSingValue(S_[0]);
00287   if (RefSingValue<=DBL_EPSILON) {
00288     // the greatest singular value is zero => all are zero
00289     return 0;
00290   }
00291
00292   while ((S_[index]/RefSingValue)<ZeroThreshold_){
00293     dim++;
00294     if (--index<1) break; // S[0]/S[0]==1 always => dont need to check that
00295   }
00296
00297   // check if we have an "underdetermined equation system" by dimensionality
00298   if (A_.num_cols()>A_.num_rows()){
00299     dim += A_.num_cols()-A_.num_rows();
00300   }
00301
00302   return dim;
00303 }
00304
00305
00306 const int SVD::AbsRightNullspaceDim() const {
00307   return AbsNullspaceDim();
00308 }
00309
00310 const int SVD::RelRightNullspaceDim() const {
00311     return RelNullspaceDim();
00312 }
00313
00314 const int SVD::AbsLeftNullspaceDim() const
00315 {
00316   int dim = 0;
00317   int index = S_.size()-1;
00318
00319   //cerr << "ZeroThreshold_: "<<ZeroThreshold_<<endl;
00320   while (index >= 0 && fabs(S_[index]) < ZeroThreshold_ ) {
00321     // singular values are sorted in descending order
00322     index--;
00323     dim++;
00324   }
00325   // compensate null space for rectangular matrices
00326   if (A_.num_rows()>A_.num_cols()){
00327     dim += A_.num_rows()-A_.num_cols();
00328   }
00329   return dim;
00330 }
00331
00332 const int SVD::RelLeftNullspaceDim() const
00333 {
00334   int dim = 0;
00335   int index = S_.size()-1;
00336
00337   if (GetSingularValue(0)==0){
00338     dim=NullspaceDim();
00339   } else {
00340     double maxs=S_[0];
00341     while (index>=0 && fabs(S_[index]/maxs)<ZeroThreshold_){
00342         index--;
00343         dim++;
00344     }
00345     // compensate null space for rectangular matrices
00346     if (A_.num_rows()>A_.num_cols()){
00347         dim+=A_.num_rows()-A_.num_cols();
00348     }
00349   }
00350   return dim;
00351 }
00352
00353 unsigned int SVD::Rank()
00354 {
00355   BIASDOUT(D_SVD_RANK, "S_.Size(): "<<S_.Size()<<" NullspaceDim(): "
00356            << NullspaceDim()<<"  A_.num_cols(): "<<A_.num_cols()
00357            <<"   A_.num_rows(): "<<A_.num_rows()<<"  S_: "<<S_);
00358   unsigned int lowdim=A_.num_rows()<A_.num_cols()?A_.num_rows():A_.num_cols();
00359   return (lowdim-NullspaceDim());
00360 }
00361
00362
00363 int SVD::Solve(Matrix<double>& A, Vector<double>& b, Vector<double>& x)
00364 {
00365   int res = 0;
00366   // make squared symmetric matrix A^T * A
00367   Matrix<double> ATA(A.num_cols(), A.num_cols());
00368   //ATA = A.Transpose()*A;
00369   A.GetSystemMatrix(ATA);
00370
00371   // compute ATA = U * S * V^T
00372   Compute(ATA);
00373   Vector<double> d(A.num_rows()), z(A.num_cols());
00374   Vector<double> S = GetS();
00375   BIASCDOUT(D_SVD_SOLVE, "S: "<<S<<endl);
00376
00377   // A * x = b  => x = (A^T * A )^-1 * A^T * b
00378   //                 = (U * S * V^T)^-1 * A^T * b
00379   // by symmetry we know: A^T * A = (A^T * A)^T
00380   //                 = (V * S * U^T)^-1 * A^T * b
00381   // since U and V^T are square orthogonal matrices here
00382   //                 = U^-T * S^-1 * V^T * A^T * b
00383   //                 = U    * S^-1 *       d
00384   d = GetVT() * A.Transpose() * b;
00385
00386   // compute z = S^-1 * d
00387   BIASCDOUT(D_SVD_SOLVE, "d: "<<d<<endl);
00388   for (int i=0; i<A.num_cols(); i++) {
00389     if (fabs(S[i])>DEFAULT_DOUBLE_ZERO_THRESHOLD) {
00390       z[i] = d[i]/S[i];
00391     } else {
00392       z[i] = 0.0;
00393       res--;
00394     }
00395   }
00396   if (res<0) {
00397       BIASDOUT(D_SVD_SOLVE,"Error in SVD, degenerate case in Solve ("
00398             << -res <<" dim. solution space), S="
00399             << S);
00400   }
00401
00402   // get final solution x = U * z
00403   x = GetU() * z;
00404   return res;
00405 }
00406
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/SVD.hh Source File

MathAlgo

SVD.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _SVD_hh_
00027 #define _SVD_hh_
00028
00029 #include "bias_config.h"
00030
00031 #include <Base/Debug/Error.hh>
00032 #include <Base/Debug/Debug.hh>
00033
00034 #include <Base/Math/Matrix.hh>
00035 #include <Base/Math/Vector.hh>
00036
00037 #include <float.h>
00038
00039 // for netlib lapck svd routine tests:
00040 //#include "etlib/dggsvd.c"
00041
00042 // double values below this threshold are treated as zero
00043 // (for nullspace computation)
00044 //#define DEFAULT_DOUBLE_ZERO_THRESHOLD DBL_EPSILON
00045 #define DEFAULT_DOUBLE_ZERO_THRESHOLD 1E-8
00046
00047 #define SVDSOLVE    0x00000001
00048 #define D_SVD_RANK  0x00000002
00049 #define D_SVD_SOLVE 0x00000004
00050
00051 namespace BIAS {
00052   /**
00053         @class SVD
00054         @ingroup g_mathalgo
00055         @brief computes and holds the singular value decomposition
00056         of a rectangular (not necessarily quadratic) Matrix A
00057
00058         M = U S V't.
00059
00060         The singular vectors vi and (right) singular values sigma_i satisfy the
00061         equation:  A vi = sigma_i vi
00062
00063         The Vector S_ stores the singular values of A in decreasing
00064         order (smallest is last)
00065
00066         The columns of U  are the left singular vectors of A and form
00067         an orthonormal basis of A
00068         which corresponds to the nonzero singular values.
00069         while the columns of U corresponding to (nearly) zero values
00070         are the nullspace.
00071
00072         This function is a base class and not a member in Matrix because:
00073         - holding the U,S,V matrices allows repeated queries of the
00074           same SVD results.
00075         -avoid namespace clutter in the Matrix class.
00076         There are many other
00077         decompositions that might be of interest,
00078         and adding them all would make for a very large Matrix class with
00079         extra members which are irrelevant for the Matrix itself.
00080
00081         You can create the svd object either in relative or in absolute mode:
00082         if AbsoluteZeroThreshold is true, a singular value is compared
00083         to the threshold "absolutely", otherwise the ratio of the largest and
00084         the current singular value is compared against the threshold.
00085         This affects the nullspace dimemsion.
00086         Usually you want AbsoluteZeroThreshold = false, but for the sake of
00087         interface stability/downwards compatibility, the default is true
00088
00089         @author Jan Woetzel
00090   **/
00091   class BIASMathAlgo_EXPORT SVD : Debug {
00092   public:
00093     /** @brief solve the general eigenproblem of the rectangular matrix M
00094         or with other words, make the U*S*V^T decomposition
00095         @param M matrix to decompose
00096         @param ZeroThreshold for nullspace determination, if a singular value
00097                is lower than ZeroThreshold, define the corresponding vector
00098                in V^T to be a null-vector
00099         @param AbsoluteZeroThreshold if true, a singular value is compared
00100         to the threshold "absoultely", otherwise the ratio of the largest and
00101         the current singular value is compared against the threshold.
00102         Usually you want AbsoluteZeroThreshold = false, but for the sake of
00103         interface stability/downwards compatibility, the default is true
00104         @author Jan Woetzel **/
00105     SVD(const Matrix <double> & M,
00106         double ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD,
00107         bool AbsoluteZeroThreshold = true);
00108
00109     /** @brief creates an empty svd without automatically decomposing any
00110         matrix
00111         @param AbsoluteZeroThreshold if true, a singular value is compared
00112         to the threshold "absolutely", otherwise the ratio of the largest and
00113         the current singular value is compared against the threshold.
00114         Usually you want AbsoluteZeroThreshold = false, but for the sake of
00115         interface stability/downwards compatibility, the default is true  */
00116     inline SVD(bool AbsoluteZeroThreshold = true) {
00117       Decomposed_ = false;
00118       AbsoluteZeroThreshold_ =  AbsoluteZeroThreshold;
00119     };
00120
00121     inline virtual ~SVD(){};
00122
00123     /** set a new matrix and compute its decomposition.
00124         solves the general eigenproblem of the rectangular matrix M
00125         @author Jan Woetzel 05/142002)*/
00126     int Compute(const Matrix<double>& M,
00127                 double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD);
00128     /** use our naming convention */
00129     inline int compute(const Matrix<double>& M,
00130                        double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
00131     { return Compute(M, ZeroThreshold); };
00132
00133     /** solve the general (non-special) eigenvalue/eigenvector problem of
00134         a general (non-symmetric) matrix M
00135         calls the extern liblapack routine dgesvd .
00136         computes the genral singular value decomposition with
00137         M = U * Sigma(S) * VT
00138         with
00139         Sigma(S) is the qudratic, symmetric matrix which contains
00140         the singular vales in the diagonal and zero and zero else.
00141         U, VT as described in the data mambers.
00142         @author Jan Woetzel (04/04/2002) */
00143     int General_Eigenproblem_GeneralMatrix_Lapack(const Matrix<double> &M);
00144
00145     /** @brief return zerothresh currently used
00146         @author koeser */
00147     inline double GetZeroThreshold() const
00148     { return ZeroThreshold_; }
00149
00150     /** return S
00151         which is a vector of teh singular values of A in descending order.
00152         The diagonalelements of Sigma are the singular values of A.
00153         @author Jan Woetzel 04/04/2002 */
00154     inline const Vector<double>& GetS() const
00155     { return S_; }
00156
00157     /** return one singular value (which may be zero).
00158         the index runs from 0.. (size-1)
00159         @author Jan Woetzel 04/04/2002    **/
00160     inline const double GetSingularValue(int index ) const;
00161
00162     /** return VT (=transposed(V))
00163         @author Jan Woetzel (04/04/2002) **/
00164     inline const Matrix<double>& GetVT() const
00165     {  return VT_; };
00166
00167     /** return V
00168         @author Jan Woetzel (04/04/2002) **/
00169     inline Matrix<double> GetV() const;
00170
00171     /** return U
00172         U is a m x m orthogonal matrix
00173         @author Jan Woetzel (04/04/2002) **/
00174     inline const Matrix<double>& GetU() const
00175     {  return U_; };
00176
00177     /** return the length of the singular value vector
00178         inline const int size() const */
00179     inline int size() const {
00180       if (U_.num_cols()>VT_.num_cols())
00181         return U_.num_cols();
00182       else
00183         return VT_.num_cols();
00184     };
00185
00186     /** @brief  return the dim of the nullspace.
00187
00188         For rectangular matrices this is the number of singular values which
00189         are (about) zero. The nullspace is spaned by the singular vectors
00190         corresponding to the zero singular values.
00191         woelk 4 2003: changed API, diffentiate between Left and Right Nullspace
00192         koeser 01/2005: rel/abs handled by flag:
00193         AbsoluteZeroThreshold_ determines whther we compare absolute or
00194         relative singular values against the threshold
00195         @author Jan Woetzel 04/04/2002    **/
00196     inline const int NullspaceDim() const {
00197       if (AbsoluteZeroThreshold_) return AbsNullspaceDim();
00198       else return RelNullspaceDim();
00199     }
00200
00201     /** @brief returns the dim of the matrix's right nullspace
00202         @author woelk 04 2003 */
00203     inline const int RightNullspaceDim() const {
00204       if (AbsoluteZeroThreshold_) return AbsRightNullspaceDim();
00205       else return RelRightNullspaceDim();
00206     }
00207
00208     /** @brief returns the dim of the matrix's left nullspace
00209         @author woelk 04 2003 */
00210     inline const int LeftNullspaceDim() const {
00211       if (AbsoluteZeroThreshold_) return AbsLeftNullspaceDim();
00212       else return RelLeftNullspaceDim();
00213     }
00214
00215     /** @brief returns dim of nullspace using the absolute threshold criterion
00216
00217         For rectangular matrices this is the number of singular values which
00218         are (about) zero. The nullspace is spaned by the singular vectors
00219         corresponding to the zero singular values.
00220         woelk 4 2003: changed API, diffentiate between Left and Right Nullspace
00221         @author Jan Woetzel 04/04/2002    **/
00222     const int AbsNullspaceDim() const;
00223
00224     /** @brief returns the dim of the matrix's right nullspace, using absolute
00225         threshold criterion
00226         @author woelk 04 2003 */
00227     const int AbsRightNullspaceDim() const;
00228
00229     /** @brief returns the dim of the matrix's left nullspace, using absolute
00230         threshold criterion
00231         @author woelk 04 2003 */
00232     const int AbsLeftNullspaceDim() const;
00233
00234     /** @brief compare singular values against greatest, not absolute
00235         @author Christian Buck
00236         changed criterion for insignificant singular values according to
00237         hartley/zisserman from s_i<ZeroThreshold to s_i/s_0<ZeroThreshold.
00238         fallback to old criterion iff s_0=0. */
00239     const int RelNullspaceDim() const;
00240     const int RelRightNullspaceDim() const;
00241     const int RelLeftNullspaceDim() const;
00242
00243     /** return one of the nullvectors.
00244         if last_offset=0 then the last nullvector
00245         (corresponding to the smallest singular value) is returned,
00246         if last_offset=1 then the last but one nullvector is returned,
00247         and so on.
00248         The last_offset must be in [0..NullspaceDim-1].
00249         @author Jan Woetzel(08/08/2002), JMF */
00250     inline Vector<double> GetNullvector(const int last_offset = 0);
00251
00252     /** Returns one of the nullvectors in argument and true if
00253         Nullvector exists.
00254         if last_offset=0 then the last nullvector (corresponding to the
00255         smallest singular value) is returned,
00256         if last_offset=1 then the last but one nullvector is returned,
00257         and so on.
00258         The last_offset must be in [0..NullspaceDim-1].
00259         @author Jan Woetzel (08/08/2002), JMF */
00260     inline bool GetNullvector(Vector<double>& NullVec,
00261                               const int last_offset = 0 );
00262
00263     /** Return one of the left nullvectors.
00264         If last_offset=0 then the last nullvector
00265         (corresponding to the smallest
00266         singular value) is returned,
00267         if last_offset=1 then the last but one nullvector is returned,
00268         and so on.
00269         The last_offset must be in [0..NullspaceDim-1] otherwise 0 is returned
00270         @author JMF/koeser **/
00271     inline bool GetLeftNullvector(Vector<double>&nv, const int last_offset=0);
00272
00273     /** @brief same as above but returning vector */
00274     inline Vector<double> GetLeftNullvector( const int last_offset = 0 );
00275
00276
00277     // -- Solve the matrix-vector system M x = y, returning x.
00278     Vector<double> Solve(const Vector<double>& y)  const;
00279     /** use our naming convention */
00280     inline Vector<double> solve(const Vector<double>& y)const
00281     { return Solve(y); };
00282
00283     /** returns pseudoinverse of A =  U * S * V^T
00284         A^+ = V *  S^+ * U^T
00285         @author F Woelk */
00286     Matrix<double> Invert();
00287
00288     /** as above, but compute new svd for a */
00289     Matrix<double> Invert(Matrix<double> A);
00290
00291     /** returns the square root of a symmetric positive definite matrix M
00292         A = sqrt(M) = U * sqrt(S) * V_T,
00293         such that A*A = M.
00294         The result is only valid when the M *is* symmetric positive definite.
00295         @author woelk 01/2006 */
00296     Matrix<double> Sqrt();
00297
00298     /** as above, but compute new svd for a */
00299     Matrix<double> Sqrt(const Matrix<double>& A);
00300
00301     /** returns the square root of a symmetric positive definite matrix M
00302         A = sqrt(M) = U * sqrt(S),
00303         such that A*A^T = M.
00304         The result is only valid when the M *is* symmetric positive definite.
00305         @author woelk 01/2006 */
00306     Matrix<double> SqrtT();
00307
00308     /** as above, but compute new svd for a */
00309     Matrix<double> SqrtT(const Matrix<double>& A);
00310
00311     /// returns the rank of A_
00312     unsigned int Rank();
00313
00314
00315     /** solves the overdetermined linear system $AX=B$ with the unknown $X$,
00316         where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of
00317         size $m$.
00318         @author woelk 07/2004 */
00319
00320     int Solve(Matrix<double>& A, Vector<double>& B, Vector<double>& X);
00321
00322   protected:
00323     /// data members:
00324     /// original matrix (to be decomposed)
00325     Matrix<double> A_;
00326
00327     /// contains the singular values of A_ corresponding to the
00328     /// i'th column in descending order.
00329     Vector<double> S_;
00330
00331     /// contains columnwise the left singular vectors
00332     /// of A_ corresponding to the i'th singular value
00333     Matrix<double> U_;
00334
00335     /// contains the right singular vectors of A- in rows
00336     /// [beause VT is transpose(V) ]
00337     Matrix<double> VT_;
00338
00339     /// determines whether we compare singular-values directly (absolute)
00340     /// to the zero threshold or whether we compare the ratio of the sing-value
00341     /// under inspection and the largest one to the threshold (relative)
00342     bool AbsoluteZeroThreshold_;
00343
00344     /// values below this threshold are treated as zero
00345     double ZeroThreshold_;
00346
00347     /// flag for holding decomposed matrix
00348     bool  Decomposed_;
00349
00350   }; // class SVD
00351
00352   /////////////////////////////////////////////////////////////////
00353   /// inline implementations
00354   /////////////////////////////////////////////////////////////////
00355
00356   inline const double SVD::GetSingularValue(int index) const
00357   {
00358     BIASASSERT( index >=0 );
00359     BIASASSERT( index < size() );
00360     if (index < S_.size())
00361       return S_[index];
00362     else
00363       return 0.0;
00364   }
00365
00366   inline Matrix<double> SVD::GetV() const
00367   {
00368     Matrix<double> matV;
00369     //matV = transpose( VT_ ); //uncomment if error under UNIX
00370     matV = VT_.Transpose();
00371     return matV;
00372   }
00373
00374   inline Vector<double> SVD::GetNullvector(const int last_offset)
00375   {
00376     Vector<double> vec(VT_.num_cols(), 0.0);
00377     if (!GetNullvector(vec, last_offset)) {
00378       BIASERR("No Nullvector for "<<last_offset);
00379     }
00380     return vec;
00381   }
00382
00383   inline bool SVD::GetNullvector(Vector<double>& NullVec,
00384                                  const int last_offset  )
00385   {
00386     // check if there is a nullvector with this last_offset_index
00387     if (last_offset > (NullspaceDim() -1)) {
00388       // index not OK
00389       return false;
00390     } else {
00391       // index OK
00392       // create a new vector
00393       NullVec.newsize(VT_.num_cols());
00394       // fill the (null-)vector
00395
00396       for (int col=0; col < VT_.num_cols(); col++) {
00397         NullVec[col] = VT_[ VT_.num_cols() -1 - last_offset ][col];
00398       }
00399
00400       return true;
00401     }
00402   }
00403
00404   inline Vector<double> SVD::GetLeftNullvector(const int last_offset)
00405   {
00406     Vector<double> vec(VT_.num_rows(), 0.0);
00407     if (!GetLeftNullvector(vec, last_offset)) {
00408       BIASERR("No left nullvector for "<<last_offset);
00409     }
00410     return vec;
00411   }
00412
00413   inline bool SVD::GetLeftNullvector(Vector<double>& vec,
00414                                      const int last_offset) {
00415     // check if there is a nullvector with this last_offset_index
00416     if (last_offset > (NullspaceDim() -1)) {
00417       // index not OK
00418       BIASERR("for last_offset=" <<last_offset
00419               <<" with actual NullspaceDim= "<<NullspaceDim()
00420               <<" can no left nullvector be retrieved. aborting. ");
00421       BIASERR(S_ << U_ << VT_);
00422       return false;
00423     }
00424     // index OK
00425     vec.newsize( U_.num_rows());
00426     // fill the (null-)vector
00427     for (int row=0; row < VT_.num_rows(); row++) {
00428       vec[row] = U_[row][ U_.num_rows() -1 - last_offset ];
00429     }
00430     return true;
00431   }
00432
00433
00434 } // namespace BIAS
00435 #endif // _SVD_hh_
00436
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D3x3x3.cpp Source File

Base » Math

Tensor3D3x3x3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Tensor3D3x3x3.hh"
00027 #include "Matrix3x3.hh"
00028
00029 #include <Base/Common/BIASpragma.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 template <class T>
00035 Tensor3D3x3x3<T>::Tensor3D3x3x3()
00036   : Tensor3D<T>(3, 3, 3, (T)0.0)
00037 {}
00038
00039 template <class T>
00040 Tensor3D3x3x3<T>::~Tensor3D3x3x3()
00041 {
00042   this->Destroy();
00043 }
00044
00045 template <class T>
00046 void Tensor3D3x3x3<T>::NewSize(const int /*i*/, const int /*j*/, const int /*k*/,
00047                                const T& /*deflt*/)
00048 {
00049   BIASERR("do not call NewSize for Tensor3D3x3x3<T>, it has fixed size of 3x3x3");
00050   //BIASASSERT(false);
00051   exit(-1);
00052 }
00053
00054 template <class T>
00055 void Tensor3D3x3x3<T>::newsize(const int /*i*/, const int /*j*/, const int /*k*/,
00056                                const T& /*deflt*/)
00057 {
00058   BIASERR("do not call newsize for Tensor3D3x3x3<T>, it has fixed size of 3x3x3");
00059   //BIASASSERT(false);
00060   exit(-1);
00061 }
00062
00063
00064 template <class T>
00065 void Tensor3D3x3x3<T>::postmultiply1(const Matrix3x3<T> &M,
00066                                      Tensor3D3x3x3<T> &result) const
00067 {
00068   for (int i=0; i<3; i++)
00069     for (int j=0; j<3; j++)
00070       for (int k=0; k<3; k++)
00071         {
00072           double v = 0;
00073           for (int p=0; p<3; p++)
00074             v += this->_DataArray[p][j][k] * M[p][i];
00075           result(i,j,k) = (T)v; // we cast to the type to avoid warnings
00076         }
00077 }
00078
00079
00080 template <class T>
00081 void Tensor3D3x3x3<T>::postmultiply2(const BIAS::Matrix3x3<T> &M,
00082                                      Tensor3D3x3x3<T> &result) const
00083 {
00084   for (int i=0; i<3; i++)
00085     for (int j=0; j<3; j++)
00086       for (int k=0; k<3; k++)
00087         {
00088           double v = 0;
00089           for (int p = 0; p < 3; ++p)
00090             v += this->_DataArray[i][p][k] * M[p][j];
00091           result(i,j,k) = (T)v;
00092         }
00093 }
00094
00095
00096 template <class T>
00097 void Tensor3D3x3x3<T>::postmultiply3(const BIAS::Matrix3x3<T> &M,
00098                                      Tensor3D3x3x3<T> &result) const
00099 {
00100   for (int i=0; i<3; i++)
00101     for (int j=0; j<3; j++)
00102       for (int k=0; k<3; k++)
00103         {
00104           double v = 0;
00105           for (int p = 0; p < 3; ++p)
00106             v += this->_DataArray[i][j][p] * M[p][k];
00107           result(i,j,k) = (T)v;
00108         }
00109 }
00110
00111
00112 template <class T>
00113 void Tensor3D3x3x3<T>::premultiply1(const BIAS::Matrix3x3<T> &M,
00114                                     Tensor3D3x3x3<T> &result) const
00115 {
00116   for (int i=0; i<3; i++)
00117     for (int j=0; j<3; j++)
00118       for (int k=0; k<3; k++)
00119         {
00120           double v = 0;
00121           for (int p = 0; p < 3; ++p)
00122             v +=  M[i][p] * this->_DataArray[p][j][k];
00123           result(i,j,k) = (T)v;
00124         }
00125 }
00126
00127
00128 template <class T>
00129 void Tensor3D3x3x3<T>::premultiply2(const BIAS::Matrix3x3<T> &M,
00130                                     Tensor3D3x3x3<T> &result) const
00131 {
00132   for (int i=0; i<3; i++)
00133     for (int j=0; j<3; j++)
00134       for (int k=0; k<3; k++)
00135         {
00136           double v = 0;
00137           for (int p = 0; p < 3; ++p)
00138             v +=  M[j][p] * this->_DataArray[i][p][k];
00139           result(i,j,k) = (T)v;
00140         }
00141 }
00142
00143
00144 template <class T>
00145 void Tensor3D3x3x3<T>::premultiply3(const BIAS::Matrix3x3<T> &M,
00146                                     Tensor3D3x3x3<T> &result) const
00147 {
00148   for (int i=0; i<3; i++)
00149     for (int j=0; j<3; j++)
00150       for (int k=0; k<3; k++)
00151         {
00152           double v = 0;
00153           for (int p = 0; p < 3; ++p)
00154             v +=  M[k][p] * this->_DataArray[i][j][p];
00155           result(i,j,k) = (T)v;
00156         }
00157 }
00158
00159
00160 #define INST(type) \
00161 template class BIASMathBase_EXPORT BIAS::Tensor3D3x3x3<type>;\
00162
00163 INST(short)
00164 INST(int)
00165 INST(float)
00166 INST(double)
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D3x3x3.hh Source File

Base » Math

Tensor3D3x3x3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Tensor3D3x3x3_hh__
00027 #define __Tensor3D3x3x3_hh__
00028
00029 #include "Tensor3D.hh"
00030 #include "Matrix3x3.hh"
00031 #include "Vector3.hh"
00032
00033 namespace BIAS {
00034
00035   template <class T=double>
00036   class BIASMathBase_EXPORT  Tensor3D3x3x3 : public Tensor3D<T>
00037   {
00038   public:
00039     Tensor3D3x3x3<T>();
00040     virtual ~Tensor3D3x3x3<T>();
00041
00042     void NewSize(const int i, const int j, const int k,
00043                  const T& def=(T)0.0);
00044     void newsize(const int i, const int j, const int k,
00045                  const T& def=(T)0.0);
00046
00047     /** computes the contraction of index 1 from left with contravariant
00048         vector , i.e. res[k][j] = sum_i v[i] * (*this)[k][j]
00049         @author woelk 07/2004 */
00050     inline void LeftContravariantContraction1(Vector3<T>& v,
00051                                               Matrix3x3<T>& res);
00052     inline void LeftContravariantContraction2(Vector3<T>& v,
00053                                               Matrix3x3<T>& res);
00054     inline void LeftContravariantContraction3(Vector3<T>& v,
00055                                               Matrix3x3<T>& res);
00056     inline Matrix3x3<T> LeftContravariantContraction1(Vector3<T>& v)
00057     {
00058       Matrix3x3<T> M;
00059       LeftContravariantContraction1(v,M);
00060       return M;
00061     }
00062
00063     inline Matrix3x3<T> LeftContravariantContraction2(Vector3<T>& v)
00064     {
00065       Matrix3x3<T> M;
00066       LeftContravariantContraction2(v,M);
00067       return M;
00068     }
00069
00070     inline Matrix3x3<T> LeftContravariantContraction3(Vector3<T>& v)
00071     {
00072       Matrix3x3<T> M;
00073       LeftContravariantContraction3(v,M);
00074       return M;
00075     }
00076
00077     /** @brief Compute S_{ijk} = T_{pjk} M_{pi}
00078         @author mdunda */
00079     void postmultiply1(const BIAS::Matrix3x3<T> &M,
00080                        Tensor3D3x3x3<T> &result) const;
00081
00082     /** @brief Compute S_{ijk} = T_{ipk} M_{pj}
00083         @author mdunda */
00084     void postmultiply2(const BIAS::Matrix3x3<T> &M,
00085                        Tensor3D3x3x3<T> &result) const;
00086
00087     /** @brief Compute S_{ijk} = T_{ijp} M_{pk}
00088         @author mdunda */
00089     void postmultiply3(const BIAS::Matrix3x3<T> &M,
00090                        Tensor3D3x3x3<T> &result) const;
00091
00092     /** @brief compute S_{ijk} = M_{ip} T_{pjk}
00093         @author mdunda */
00094     void premultiply1(const BIAS::Matrix3x3<T> &M,
00095                       Tensor3D3x3x3<T> &result) const;
00096
00097     /** @brief compute S_{ijk} = M_{jp} T_{ipk}
00098         @author mdunda */
00099     void premultiply2(const BIAS::Matrix3x3<T> &M,
00100                       Tensor3D3x3x3<T> &result) const;
00101
00102     /** @brief compute S_{ijk} = M_{kp} T_{ijp}
00103         @author mdunda */
00104     void premultiply3(const BIAS::Matrix3x3<T> &M,
00105                       Tensor3D3x3x3<T> &result) const;
00106
00107     inline void SetFromMatrices(const Matrix3x3<T>& T1, const Matrix3x3<T>& T2,
00108                                 const Matrix3x3<T>& T3);
00109
00110     inline void GetMatrices(Matrix3x3<T>& T1, Matrix3x3<T>& T2,
00111                             Matrix3x3<T>& T3) const;
00112
00113     inline Tensor3D3x3x3<T>& operator=(const Tensor3D3x3x3<T>& t)
00114     { Tensor3D<T>::operator=(t); return *this; }
00115
00116   protected:
00117
00118   }; // class
00119
00120   //////////////////////////////////////////////////////////////////////////
00121   ///            implementation
00122   //////////////////////////////////////////////////////////////////////////
00123
00124   template <class T>
00125   void Tensor3D3x3x3<T>::SetFromMatrices(const Matrix3x3<T>& T1,
00126                                          const Matrix3x3<T>& T2,
00127                                          const Matrix3x3<T>& T3)
00128   {
00129     size_t size=9*sizeof(T);
00130     memcpy((void *)this->_Data, (void *)T1.GetData(), size);
00131     memcpy((void *)(this->_Data+9), (void *)T2.GetData(), size);
00132     memcpy((void *)(this->_Data+18), (void *)T3.GetData(), size);
00133   }
00134
00135   template <class T>
00136   void Tensor3D3x3x3<T>::GetMatrices(Matrix3x3<T>& T1, Matrix3x3<T>& T2,
00137                                      Matrix3x3<T>& T3) const
00138   {
00139     size_t size=9*sizeof(T);
00140     memcpy((void *)T1.GetData(), (void *)this->_Data, size);
00141     memcpy((void *)T2.GetData(), (void *)(this->_Data+9), size);
00142     memcpy((void *)T3.GetData(), (void *)(this->_Data+18), size);
00143   }
00144
00145   template <class T>
00146   void Tensor3D3x3x3<T>::LeftContravariantContraction1(Vector3<T>& v,
00147                                                        Matrix3x3<T>& res)
00148   {
00149 //     res.SetZero();
00150 //     for(int i=0; i<3; i++)
00151 //       for(int j=0; j<3; j++)
00152 //         for(int k=0; k<3; k++)
00153 //           res[j][k] += v[i] * _DataArray[i][j][k];
00154     Matrix3x3<T> T2, T3;
00155     GetMatrices(res, T2, T3);
00156     res*=v[0];
00157     T2*=v[1];
00158     T3*=v[2];
00159     res+=T2;
00160     res+=T3;
00161   }
00162
00163   template <class T>
00164   void Tensor3D3x3x3<T>::LeftContravariantContraction2(Vector3<T>& v,
00165                                                        Matrix3x3<T>& res)
00166   {
00167     res.SetZero();
00168     for(int i=0; i<3; i++)
00169       for(int j=0; j<3; j++)
00170         for(int k=0; k<3; k++)
00171           res[i][k] += v[j] * this->_DataArray[i][j][k];
00172   }
00173
00174   template <class T>
00175   void Tensor3D3x3x3<T>::LeftContravariantContraction3(Vector3<T>& v,
00176                                                        Matrix3x3<T>& res)
00177   {
00178     res.SetZero();
00179     for(int i=0; i<3; i++)
00180       for(int j=0; j<3; j++)
00181         for(int k=0; k<3; k++)
00182           res[i][j] += v[k] * this->_DataArray[i][j][k];
00183   }
00184
00185
00186 } // namespace
00187
00188
00189
00190 #endif // __Tensor3D3x3x3_hh__
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D.cpp Source File

Base » Math

Tensor3D.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Tensor3D.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 template <class T>
00032 Tensor3D<T>::Tensor3D()
00033   : _Data(NULL), _DataArray(NULL), _Dim1(0), _Dim2(0), _Dim3(0)
00034 {}
00035
00036 template <class T>
00037 Tensor3D<T>::Tensor3D(const int i, const int j, const int k,
00038                       const T& def)
00039   : _Data(NULL), _DataArray(NULL), _Dim1(0), _Dim2(0), _Dim3(0)
00040 {
00041   NewSize(i, j, k, def);
00042 }
00043
00044 template <class T>
00045 Tensor3D<T>::Tensor3D(const Tensor3D<T>& t)
00046 {
00047   *this=t;
00048 }
00049
00050 template <class T>
00051 Tensor3D<T>::~Tensor3D()
00052 {
00053   Destroy();
00054 }
00055
00056 template <class T>
00057 void Tensor3D<T>::NewSize(const int i, const int j, const int k,
00058                           const T& def)
00059 {
00060   BIASASSERT(i>=0);
00061   BIASASSERT(j>=0);
00062   BIASASSERT(k>=0);
00063
00064   if (i!=_Dim1 || j!=_Dim2 || k!=_Dim3){
00065     Destroy();
00066     _Dim1=i; // dimension in x direction
00067     _Dim2=j; // dimension in y direction
00068     _Dim3=k; // dimension in z direction
00069     _Size=i*j*k;
00070     // allocate data
00071     _Data=new T[_Size];
00072     // construct data pointer array
00073     int xyPlaneSize=_Dim1*_Dim2;
00074     _DataArray=new T**[_Dim3];
00075     for (int z=0; z<_Dim3; z++){
00076       _DataArray[z]=new T*[_Dim2];
00077       for (int y=0; y<_Dim2; y++){
00078         _DataArray[z][y]=_Data+z*xyPlaneSize+y*_Dim1;
00079       }
00080     }
00081   }
00082   // now fill with default
00083   for (int m=0; m<_Size; m++){
00084     _Data[m]=def;
00085   }
00086 }
00087
00088 template <class T>
00089 void Tensor3D<T>::Destroy()
00090 {
00091   if (_Data) { delete[] _Data; _Data=NULL; }
00092   if (_DataArray) {
00093     for (int z=0; z<_Dim3; z++){
00094       delete[] _DataArray[z]; _DataArray[z]=NULL;
00095     }
00096     delete[] _DataArray; _DataArray=NULL;
00097   }
00098   _Dim1=0;
00099   _Dim2=0;
00100   _Dim3=0;
00101   _Size=0;
00102 }
00103
00104 template <class T>
00105 int Tensor3D<T>::GetDim1() const
00106 {
00107   return _Dim1;
00108 }
00109
00110 template <class T>
00111 int Tensor3D<T>::GetDim2() const
00112 {
00113   return _Dim2;
00114 }
00115
00116 template <class T>
00117 int Tensor3D<T>::GetDim3() const
00118 {
00119   return _Dim3;
00120 }
00121
00122 template <class T>
00123 void Tensor3D<T>::SetZero()
00124 {
00125   memset((void *)_Data, 0, sizeof(T)*_Size);
00126 }
00127
00128 template <class T>
00129 Tensor3D<T>& Tensor3D<T>::operator=(const Tensor3D<T>& t)
00130 {
00131   NewSize(t.GetDim1(), t.GetDim2(), t.GetDim3());
00132   memcpy((void *)_Data, (void *)t.GetData(), _Size*sizeof(T));
00133   return *this;
00134 }
00135
00136 template <class T>
00137 bool Tensor3D<T>::operator==(const Tensor3D<T>& t)
00138 {
00139   if ( t.GetDim1() != GetDim1() ||
00140        t.GetDim2() != GetDim2() ||
00141        t.GetDim3() != GetDim3() ) return false;
00142   for(int i=0; i<(GetDim1()*GetDim2()*GetDim3()) ; i++)
00143     if ( t.GetData()[i]!=_Data[i] ) return false;
00144   return true;
00145 }
00146
00147
00148 template <class T>
00149 Vector<T> Tensor3D<T>::ToVector()
00150 {
00151   int rows = GetDim1()*GetDim2()*GetDim3();
00152   Vector<T> result(rows);
00153
00154   for(int i=0; i<GetDim1(); i++)
00155     for(int j=0; j<GetDim2(); j++)
00156       for(int k=0; k<GetDim3(); k++)
00157         result[i*GetDim1()*GetDim2() + j*GetDim2() + k] = _DataArray[i][j][k];
00158
00159   return result;
00160 }
00161
00162
00163 template <class T>
00164 void Tensor3D<T>::SetFromVector(const Vector<T> &v)
00165 {
00166   assert( (int)v.Size() >= GetDim1()*GetDim2()*GetDim3() );
00167
00168   for(int i=0; i<GetDim1(); i++)
00169     for(int j=0; j<GetDim2(); j++)
00170       for(int k=0; k<GetDim3(); k++)
00171         _DataArray[i][j][k] = v[i*GetDim1()*GetDim2() + j*GetDim2() + k];
00172 }
00173
00174
00175 template <class T>
00176 void Tensor3D<T>::Scale(T factor)
00177 {
00178   for(int i=0; i<_Size; i++)
00179     _Data[i] = _Data[i] * factor;
00180 }
00181
00182
00183 template <class T>
00184 T Tensor3D<T>::GetLength() const
00185 {
00186   T Length = 0;
00187   for(int i=0; i<_Size; i++)
00188     Length += _Data[i] * _Data[i];
00189   return Length;
00190 }
00191
00192
00193
00194 #define INST(type) \
00195 template class BIASMathBase_EXPORT BIAS::Tensor3D<type>;\
00196
00197 INST(short)
00198 INST(int)
00199 INST(float)
00200 INST(double)
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Tensor3D.hh Source File

Base » Math

Tensor3D.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Tensor3D_hh__
00027 #define __Tensor3D_hh__
00028
00029 #include "Vector.hh"
00030 #include <Base/Debug/Error.hh>
00031
00032 namespace BIAS {
00033
00034   template <class T=double>
00035   class BIASMathBase_EXPORT Tensor3D
00036   {
00037   public:
00038     Tensor3D();
00039     Tensor3D(const int i, const int j, const int k,
00040                 const T& def=(T)0.0);
00041     Tensor3D(const Tensor3D<T>& t);
00042
00043     ~Tensor3D();
00044
00045     /// allocates internal data
00046     void NewSize(const int i, const int j, const int k,
00047                  const T& def=(T)0.0);
00048
00049     /// frees internal data
00050     void Destroy();
00051
00052     int GetDim1() const;
00053
00054     int GetDim2() const;
00055
00056     int GetDim3() const;
00057
00058     /** @return all tensor elements in a vector
00059         @author mdunda */
00060     BIAS::Vector<T> ToVector();
00061
00062     /** @brief set the tensor by the rows of the vector. Vector size must
00063         be at least Dim1*Dim2*Dim3!
00064         @author mdunda */
00065     void SetFromVector(const BIAS::Vector<T> &v);
00066
00067     inline T* GetData()
00068     { return _Data; }
00069
00070     inline T*** GetDataArray()
00071     { return _DataArray; }
00072
00073     inline const T* GetData() const
00074     { return (const T*)_Data; }
00075
00076     /// set all elements to zero
00077     void SetZero();
00078
00079     T GetLength() const;
00080
00081     void Scale(T factor);
00082
00083     Tensor3D<T>& operator=(const Tensor3D<T>& t);
00084     /** @brief checks if all tensor entries are equal (up-to-scale-equality
00085         is not checked)
00086         @author mdunda 07 2004 */
00087     bool operator==(const Tensor3D<T>& t);
00088
00089     /** @brief direct data access through () operator: T_i^{jk}
00090         @author mdunda 07 2004 */
00091     inline T& operator()(unsigned int i, unsigned int j, unsigned int k)
00092     {
00093       BIASASSERT((int)i<_Dim1);
00094       BIASASSERT((int)j<_Dim2);
00095       BIASASSERT((int)k<_Dim3);
00096       return _DataArray[i][j][k];
00097     }
00098
00099   protected:
00100     // the actual data, in memory as row first, column second, depth third
00101     // i.e. _Data[9] is the Tensor3D_{0, 0, 1}
00102     T *_Data;
00103     // inverse pointer representation: depth z, row y and column x
00104     // can be addressed by _DataArray[z][y][x]
00105     // this is analogue to the ImageDataArray
00106     T ***_DataArray;
00107     int _Dim1, _Dim2, _Dim3, _Size;
00108
00109   }; // class
00110
00111 } // namespace
00112
00113 #endif // __Tensor3D_hh__
Generated on Wed Jun 21 19:00:53 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testDefines.cpp Source File

Tests

testDefines.cpp

Go to the documentation of this file.
00001 /// running this test is used for debugging Dart/ctest runtime paths, environment, ...
00002 /// @author Jan Woetzel
00003
00004 #include <bias_config.h>
00005 #include <iostream>
00006
00007 using namespace std;
00008
00009
00010 int main(int argc, char ** argv)
00011 {
00012   if (argc>0)
00013     cout<<"started "<<argv[0]<<endl;
00014
00015   int result=0;
00016
00017   //
00018   // display compilation defines
00019   //
00020
00021 #ifdef __DATE__
00022   cout<<"+ __DATE__ \tdefined as "<<__DATE__<<endl;
00023 #else
00024   cout<<"- __DATE__ \tis NOT defined"<<endl;
00025 #endif
00026
00027 #ifdef __TIME__
00028   cout<<"+ __TIME__ \tdefined as "<<__TIME__<<endl;
00029 #else
00030   cout<<"- __TIME__ \tis NOT defined"<<endl;
00031 #endif
00032
00033 #ifdef __TIMESTAMP__
00034   cout<<"+ __TIMESTAMP__ \tdefined as "<<__TIMESTAMP__<<endl;
00035 #else
00036   cout<<"- __TIMESTAMP__ \tis NOT defined"<<endl;
00037 #endif
00038
00039 #ifdef _DEBUG
00040   cout<<"+ _DEBUG \tdefined (compile with debug info)"<<endl;
00041 #else
00042   cout<<"- _DEBUG \tis NOT defined"<<endl;
00043 #endif
00044
00045 #ifdef NDEBUG
00046   cout<<"+ NDEBUG \tdefined (ignore assert)"<<endl;
00047 #else
00048   cout<<"- NDEBUG \tis NOT defined"<<endl;
00049 #endif
00050
00051 #ifdef BIAS_DEBUG
00052   cout<<"+ BIAS_DEBUG \tdefined"<<endl;
00053 #else
00054   cout<<"- BIAS_DEBUG \tis NOT defined"<<endl;
00055 #endif
00056
00057 #ifdef WIN32
00058   cout<<"+ WIN32 \tdefined"<<endl;
00059 #else
00060   cout<<"- WIN32 \tis NOT defined"<<endl;
00061 #endif
00062
00063 #ifdef _WIN32
00064   cout<<"+ _WIN32 \tdefined"<<endl;
00065 #else
00066   cout<<"- _WIN32 \tis NOT defined"<<endl;
00067 #endif
00068
00069 #ifdef _WIN64
00070   cout<<"+ _WIN64 \tdefined"<<endl;
00071 #else
00072   cout<<"- _WIN64 \tis NOT defined"<<endl;
00073 #endif
00074
00075 #ifdef WINDOWS
00076   cout<<"+ WINDOWS \tdefined"<<endl;
00077 #else
00078   cout<<"- WINDOWS \tis NOT defined"<<endl;
00079 #endif
00080
00081 #ifdef _WINDOWS
00082   cout<<"+ _WINDOWS \tdefined"<<endl;
00083 #else
00084   cout<<"- _WINDOWS \tis NOT defined"<<endl;
00085 #endif
00086
00087   //#ifdef LINUX
00088   //  cout<<"+ LINUX \tdefined"<<endl;
00089   //#else
00090   //  cout<<"- LINUX \tis NOT defined"<<endl;
00091   //#endif
00092   //
00093   //#ifdef UNIX
00094   //  cout<<"+ UNIX \tdefined"<<endl;
00095   //#else
00096   //  cout<<"- UNIX \tis NOT defined"<<endl;
00097   //#endif
00098
00099 #ifdef unix
00100   cout<<"+ unix \tdefined"<<endl;
00101 #else
00102   cout<<"- unix \tis NOT defined"<<endl;
00103 #endif
00104
00105 #ifdef __unix__
00106   cout<<"+ __unix__ \tdefined"<<endl;
00107 #else
00108   cout<<"- __unix__ \tis NOT defined"<<endl;
00109 #endif
00110
00111 #ifdef _MSC_VER
00112   cout<<"+ _MSC_VER \tdefined as "<<_MSC_VER<<endl;
00113 #else
00114   cout<<"- _MSC_VER \tis NOT defined"<<endl;
00115 #endif
00116
00117 #ifdef _DLL
00118   cout<<"+ _DLL \tdefined (/MD or /MDd mutithreaded dll MSVCRT usage)"<<endl;
00119 #else
00120   cout<<"- _DLL \tis NOT defined"<<endl;
00121 #endif
00122
00123 #ifdef _MT
00124   cout<<"+ _MT \tdefined "<<endl;
00125 #else
00126   cout<<"- _MT \tis NOT defined"<<endl;
00127 #endif
00128
00129 #ifdef UNICODE
00130   cout<<"+ UNICODE \tdefined "<<endl;
00131 #else
00132   cout<<"- UNICODE \tis NOT defined"<<endl;
00133 #endif
00134
00135 #ifdef __cplusplus
00136   cout<<"+ __cplusplus \tdefined "<<endl;
00137 #else
00138   cout<<"- __cplusplus \tis NOT defined"<<endl;
00139 #endif
00140
00141 #ifdef _CPPLIB_VER
00142   cout<<"+ _CPPLIB_VER \tdefined as "<<_CPPLIB_VER<<endl;
00143 #else
00144   cout<<"- _CPPLIB_VER \tis NOT defined"<<endl;
00145 #endif
00146
00147 #ifdef __i386__
00148   cout<<"+ __i386__ \tdefined"<<endl;
00149 #else
00150   cout<<"- __i386__ \tis NOT defined"<<endl;
00151 #endif
00152
00153 #ifdef _M_IX86
00154   cout<<"+ _M_IX86 \tdefined as "<<_M_IX86<<endl;
00155 #else
00156   cout<<"- _M_IX86 \tis NOT defined"<<endl;
00157 #endif
00158
00159 #ifdef _M_IA64
00160   cout<<"+ _M_IA64 \tdefined"<<endl;
00161 #else
00162   cout<<"- _M_IA64 \tis NOT defined"<<endl;
00163 #endif
00164
00165 #ifdef _MSC_EXTENSIONS
00166   cout<<"+ _MSC_EXTENSIONS \tdefined"<<endl;
00167 #else
00168   cout<<"- _MSC_EXTENSIONS \tis NOT defined"<<endl;
00169 #endif
00170
00171 #ifdef _CPPRTTI
00172   cout<<"+ _CPPRTTI \tdefined"<<endl;
00173 #else
00174   cout<<"- _CPPRTTI \tis NOT defined"<<endl;
00175 #endif
00176
00177 #ifdef _CPPUNWIND
00178   cout<<"+ _CPPUNWIND \tdefined"<<endl;
00179 #else
00180   cout<<"- _CPPUNWIND \tis NOT defined"<<endl;
00181 #endif
00182
00183 #ifdef _MANAGED
00184   cout<<"+ _MANAGED \tdefined"<<endl;
00185 #else
00186   cout<<"- _MANAGED \tis NOT defined"<<endl;
00187 #endif
00188
00189 #ifdef __GNUC__
00190   cout<<"+ __GNUC__ \tdefined as "<<__GNUC__<<endl;
00191 #else
00192   cout<<"- __GNUC__ \tis NOT defined"<<endl;
00193 #endif
00194
00195 #ifdef __GNUC_MINOR__
00196   cout<<"+ __GNUC_MINOR__ \tdefined as "<<__GNUC_MINOR__<<endl;
00197 #else
00198   cout<<"- __GNUC_MINOR__ \tis NOT defined"<<endl;
00199 #endif
00200
00201 #ifdef __GNUC_PATCHLEVEL__
00202   cout<<"+ __GNUC_PATCHLEVEL__ \tdefined as "<<__GNUC_PATCHLEVEL__<<endl;
00203 #else
00204   cout<<"- __GNUC_PATCHLEVEL__ \tis NOT defined"<<endl;
00205 #endif
00206
00207 #ifdef __VERSION__
00208   cout<<"+ __VERSION__ \tdefined as "<<__VERSION__<<endl;
00209 #else
00210   cout<<"- __VERSION__ \tis NOT defined"<<endl;
00211 #endif
00212
00213 #ifdef __OPTIMIZE__
00214   cout<<"+ __OPTIMIZE__ \tdefined "<<endl;
00215 #else
00216   cout<<"- __OPTIMIZE__ \tis NOT defined"<<endl;
00217 #endif
00218
00219 #ifdef __OPTIMIZE_SIZE__
00220   cout<<"+ __OPTIMIZE_SIZE__ \tdefined "<<endl;
00221 #else
00222   cout<<"- __OPTIMIZE_SIZE__ \tis NOT defined"<<endl;
00223 #endif
00224
00225 #ifdef __NO_INLINE__
00226   cout<<"+ __NO_INLINE__ \tdefined "<<endl;
00227 #else
00228   cout<<"- __NO_INLINE__ \tis NOT defined"<<endl;
00229 #endif
00230
00231 #ifdef __STDC__
00232   cout<<"+ __STDC__ \tdefined "<<endl;
00233 #else
00234   cout<<"- __STDC__ \tis NOT defined"<<endl;
00235 #endif
00236
00237 #ifdef __STDC_VERSION__
00238   cout<<"+ __STDC_VERSION__ \tdefined as "<<__STDC_VERSION__<<endl;
00239 #else
00240   cout<<"- __STDC_VERSION__ \tis NOT defined"<<endl;
00241 #endif
00242
00243 #ifdef __STRICT_ANSI__
00244   cout<<"+ __STRICT_ANSI__ \tdefined "<<endl;
00245 #else
00246   cout<<"- __STRICT_ANSI__ \tis NOT defined"<<endl;
00247 #endif
00248
00249 #ifdef __INTEL_COMPILER
00250   cout<<"+ __INTEL_COMPILER \tdefined "<<endl;
00251 #else
00252   cout<<"- __INTEL_COMPILER \tis NOT defined"<<endl;
00253 #endif
00254
00255 #ifdef WXUSINGDLL
00256   cout<<"+ WXUSINGDLL \tdefined "<<endl;
00257 #else
00258   cout<<"- WXUSINGDLL \tis NOT defined"<<endl;
00259 #endif
00260
00261   // ctest needs this for >1024 chars output:
00262   cout<<endl<<"ctest needs: CTEST_FULL_OUTPUT"<<endl;
00263   return result;
00264 }
00265
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testEnv.cpp Source File

Tests

testEnv.cpp

Go to the documentation of this file.
00001 /// running this test is used for debugging Dart/ctest runtime paths, environment, ...
00002 /// @author Jan Woetzel
00003
00004 #include <iostream>
00005 #include <string>
00006 #include <stdlib.h> // getenv
00007 #ifdef WIN32
00008 #  include <direct.h> // getcwd
00009 #else // WIN32
00010 #  include <unistd.h> // getcwd
00011 #endif // WIN32
00012
00013 using namespace std;
00014
00015 int main(int argc, char ** argv)
00016 {
00017   if (argc>0)
00018     cout<<"started "<<argv[0]<<endl;
00019   int result=0;
00020
00021   //
00022   // determine runtime path
00023   //
00024   string PATH=getenv("PATH");
00025   cout<<"-----"<<endl<<"PATH= "<<endl;
00026
00027   // linewise for better readability:
00028   for (unsigned int i=0; i<PATH.size(); i++){
00029     switch (PATH[i]) {
00030 #ifdef WIN32
00031       case ';': // Win separator
00032 #else // WIN32
00033       case ':': // tcsh, bash separator
00034 #endif // WIN32
00035         cout<<PATH[i]<<endl;
00036         break;
00037       default:
00038         cout<<PATH[i];
00039     }
00040   }
00041   cout<<endl<<"-----"<<endl;
00042
00043
00044
00045   //
00046   // determine current working directory
00047   //
00048   const int n(260); // _MAX_PATH
00049   char buffer[n];  memset(buffer,0,n);
00050   if (getcwd(buffer, n)==NULL){
00051     cout<<"Error, error: getcwd returned NULL"<<endl;
00052     result=-1;
00053   } else {
00054     cout<<"cwd: "<<buffer<<endl<<"-----"<<endl;
00055   }
00056
00057   // print the whole environment
00058   int sysres=0;
00059 #ifdef WIN32
00060   sysres = system("set");
00061 #else // WIN32
00062   sysres = system("printenv");
00063 #endif // WIN32
00064   if (sysres != 0){
00065     cout<<"could not print complete env. result="<<result<<endl;
00066     return -2;
00067   }
00068
00069   // ctest needs this for >1024 chars output:
00070   cout<<endl<<"ctest needs: CTEST_FULL_OUTPUT"<<endl;
00071
00072   return result;
00073 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testError.cpp Source File

Tests

testError.cpp

Go to the documentation of this file.
00001
00002 // compiling this source code
00003 // should intentionally produce a compilation error
00004 // JW
00005 int main(int argc, char *argv[])
00006 {
00007   this_should_generate_a_compiler_error();
00008   return 0;
00009 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGui.cpp Source File

Gui » Examples

TestGui.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include <unistd.h>
00028 #include <string>
00029 #include <sstream>
00030 #include <iomanip>
00031 #include <Base/Image/Image.hh>
00032 #include <Base/Image/ImageIO.hh>
00033 #include <Gui/GuiGTK.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 int main(int argc, char *argv[])
00039 {
00040   ostringstream name;
00041   Image<unsigned char> image, image2;
00042   PyramidImage<unsigned char> pim;
00043
00044   GuiGTK win("TestTitle"), win2, win3;
00045
00046   win2.SetTitle("win2");
00047
00048   // no debugging
00049   //      win.SetDebugLevel(D_SIGNAL|D_DESTRUCT|D_MAIN);
00050   //      win2.SetDebugLevel(D_SIGNAL|D_DESTRUCT|D_MAIN);
00051   //      win.SetDebugLevel(D_DESTRUCT);
00052   //      win2.SetDebugLevel(D_DESTRUCT);
00053   //      win3.SetDebugLevel(D_DESTRUCT);
00054   //win.SetDebugLevel(D_DESTRUCT);
00055   win.SetDebugLevel(0);
00056   //win3.SetDebugLevel(D_KEY);
00057   //win2.SetDebugLevel(D_KEY);
00058
00059   if (argc < 2 ) {
00060       image.Init(512, 255, 1);
00061       unsigned char **ida=image.GetImageDataArray();
00062       for (unsigned int y=0; y<image.GetHeight(); y++){
00063     for (unsigned int x=0; x<image.GetWidth(); x++){
00064       ida[y][x]=(unsigned char)x;
00065     }
00066       }
00067       cout <<"Initialized image"<<endl;
00068   }
00069   else{
00070     // load image
00071     if (ImageIO::Load( argv[1],image) < 0){
00072       //    if (image.Read(argv[1]) < 0){
00073       cerr << "error loading image\n";
00074       exit (-1);
00075     }
00076   }
00077
00078   win3.SetTitle("now sghowing ordinary image");
00079   win3.ShowImage(image);
00080   win3.WaitForKeyEvent();
00081
00082   pim.Init(image);
00083
00084
00085   win3.SetTitle("now showing pyramid image");
00086   win3.ShowImage(pim);
00087   win3.WaitForKeyEvent();
00088
00089
00090
00091   return 0;
00092   sleep(3);
00093
00094   cout << win3.CheckForKeyEvent() << endl;
00095
00096   win3.DestroyWindow();
00097
00098   win2.SetTitle("WaitForKeyEvent()");
00099   win2.ShowImage(image);
00100   // cout << win2.WaitForKeyEvent() << endl;
00101
00102   return 0;
00103
00104   image2=image;
00105   win3.ShowImage(image2);
00106
00107
00108
00109   win2.DestroyWindow();
00110   win3.DestroyWindow();
00111
00112   //return 0;
00113   // short pnm movie
00114   for (int i=0; i< 86; i++){
00115     name.str(""); // reset ostringstream
00116
00117     //  name << "/data/Orig/Parken/Laengs3/image00"
00118     name << "/tmp/image00"
00119
00120          << setfill('0') << setw(2) << i << ".pnm";
00121     //cout << name.str().c_str() << endl;
00122     if (ImageIO::ImportImage( name.str(),image) < 0){
00123         cerr << "error loading image\n";
00124         exit (-1);
00125     }
00126
00127     // pixel access (slow!!!)
00128     for (int j=0; j<50; j++){
00129         image.GetImageDataArray()[100][100+j]=255;
00130         image.GetImageDataArray()[100][100*image.GetChannelCount()+j]=0;
00131         image.GetImageDataArray()[100][100*image.GetChannelCount()+j]=0;
00132     }
00133     //cout << i << "\t1\twin ShowImage\n";
00134     //image.IP_ToGrey();
00135     //cout << i << "\t2\twin ShowImage\n";
00136     win.ShowImage(image);
00137     //cout << i << "\t3\twin ShowImage\n";
00138     //usleep(500000);
00139   }
00140
00141   win.DestroyWindow();
00142   //cout << "win DestroyWindow\n";
00143
00144   image.Release();
00145
00146   //return 0;
00147
00148   sleep(1);
00149
00150   image.Init(360, 288, 3);
00151
00152   image.FillImageWithConstValue((unsigned char)0);
00153
00154   //    win.CreateWindow(image);
00155
00156   for (int i=0; i<256; i++){
00157     image.FillImageWithConstValue((unsigned char)i);
00158     //  cout << i << endl;
00159     win.ShowImage(image);
00160     //usleep(50000);
00161   }
00162
00163   win.DestroyWindow();
00164
00165   return 0;
00166 }
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGuiEnhanced.cpp Source File

Gui » Examples

TestGuiEnhanced.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Base/Image/ImageDraw.hh>
00028 #include <Gui/GuiGTK.hh>
00029 #include <Gui/GuiEnhanced.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 int main(int argc, char *argv[])
00035 {
00036   Image<unsigned char> image;
00037   GuiEnhanced guie;
00038   int tl[2], br[2];
00039   guie.AddDebugLevel(D_GUI_MOUSE_BUTTON);
00040 //   if (argc < 2 ) {
00041 //     cerr << argv[0] <<" <filename>"<<endl;
00042 //     exit(1);
00043 //   }
00044
00045 //   // load image
00046 //   if (image.ImportImage(argv[1]) < 0){
00047 //     //   if (image.Read(argv[1]) < 0){
00048 //     cerr << "error loading image\n";
00049 //     exit (-1);
00050 //   }
00051   image.Init(512, 255, 1);
00052   unsigned char **ida=image.GetImageDataArray();
00053   for (unsigned int y=0; y<image.GetHeight(); y++){
00054     for (unsigned int x=0; x<image.GetWidth(); x++){
00055       ida[y][x]=(unsigned char)x;
00056     }
00057   }
00058
00059   ImageDraw<unsigned char>::RectangleCenterGrey(image,
00060                                           image.GetWidth()/2,
00061                                           image.GetHeight()/2,
00062                                           5,
00063                                           (unsigned char)255);
00064   ImageDraw<unsigned char>::RectangleCenterGrey(image,
00065                                           image.GetWidth()/2,
00066                                           image.GetHeight()/2,
00067                                           7,
00068                                           (unsigned char)0);
00069   guie.ShowImage(image);
00070
00071   //
00072   // Test for SelectRectangle
00073   //
00074   cout << "\nSelect a rectangle with mouse, button 1 twice to select, "
00075        <<"any other button to cancel: " << endl;
00076
00077   if (guie.SelectRectangle(tl, br) != 0){
00078     BIASERR("error selecting rectangle");
00079   }
00080
00081   cout << "You selected rectangle between (" << tl[0] << ", " << tl[1]
00082        <<") and (" << br[0] << ", " << br[1] << ")" << endl;
00083   cout << "Width  of selected rectangle: " << br[0] - tl [0] << endl;
00084   cout << "Height of selected rectangle: " << br[1] - tl [1] << endl;
00085   cout << endl;
00086
00087
00088   //
00089   // Test for SelectQuadrate
00090   //
00091   cout << "\nSelect a quadrate with mouse, button 1 twice to select, any other button to cancel: " << endl;
00092
00093   if (guie.SelectQuadrate(tl, br) != 0){
00094     BIASERR("error selecting quadrate");
00095   }
00096
00097   cout << "You selected quadrate between (" << tl[0] << ", " << tl[1]
00098        <<") and (" << br[0] << ", " << br[1] << ")" << endl;
00099   cout << "Width  of selected quadrate: " << br[0] - tl [0] << endl;
00100   cout << "Height of selected quadrate: " << br[1] - tl [1] << endl;
00101   cout << endl;
00102
00103   guie.DrawRectangle((unsigned int*)tl, (unsigned int*)br);
00104
00105
00106   //
00107   // Test for SelectPoint
00108   //
00109   cout << "\nselect a point with mouse button 1" << endl;
00110   guie.SelectPoint(tl);
00111   cout << "you selected point: ("<< tl[0] << ", " << tl[1] <<")" << endl;
00112
00113   guie.DestroyWindow();
00114
00115   return 0;
00116 }
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestGuiPyramid.cpp Source File

Gui » Examples

TestGuiPyramid.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <iostream>
00027 #include <unistd.h>
00028 #include <string>
00029 #include <sstream>
00030 #include <iomanip>
00031 #include <PyramidImage/PyramidImage2.hh>
00032 #include <Base/Image/ImageIO.hh>
00033 #include <Gui/GuiGTK.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 int main(int argc, char *argv[])
00039 {
00040   ostringstream name;
00041   Image<unsigned char> image, image2;
00042   PyramidImage2<unsigned char> pim;
00043   GuiGTK win("TestTitle"), win2, win3;
00044
00045   win2.SetTitle("win2");
00046
00047   // no debugging
00048   //      win.SetDebugLevel(D_SIGNAL|D_DESTRUCT|D_MAIN);
00049   //      win2.SetDebugLevel(D_SIGNAL|D_DESTRUCT|D_MAIN);
00050   //      win.SetDebugLevel(D_DESTRUCT);
00051   //      win2.SetDebugLevel(D_DESTRUCT);
00052   //      win3.SetDebugLevel(D_DESTRUCT);
00053   //win.SetDebugLevel(D_DESTRUCT);
00054   win.SetDebugLevel(0);
00055   //win3.SetDebugLevel(D_KEY);
00056   //win2.SetDebugLevel(D_KEY);
00057
00058   if (argc < 2 ) {
00059       image.Init(512, 255, 1);
00060       unsigned char **ida=image.GetImageDataArray();
00061       for (unsigned int y=0; y<image.GetHeight(); y++){
00062     for (unsigned int x=0; x<image.GetWidth(); x++){
00063       ida[y][x]=(unsigned char)x;
00064     }
00065       }
00066       cout <<"Initialized image"<<endl;
00067   }
00068   else{
00069     // load image
00070     if (ImageIO::Load( argv[1],image) < 0){
00071       //    if (image.Read(argv[1]) < 0){
00072       cerr << "error loading image\n";
00073       exit (-1);
00074     }
00075   }
00076
00077   pim.Init(image, 5);
00078
00079   win3.SetTitle("now showing pyramid image");
00080   win3.ShowImage(pim);
00081   win3.WaitForKeyEvent();
00082
00083
00084   win3.SetTitle(argv[0]);
00085   win3.ShowImage(image);
00086
00087   win3.WaitForKeyEvent();
00088   return 0;
00089   sleep(3);
00090
00091   cout << win3.CheckForKeyEvent() << endl;
00092
00093   win3.DestroyWindow();
00094
00095   win2.SetTitle("WaitForKeyEvent()");
00096   win2.ShowImage(image);
00097   // cout << win2.WaitForKeyEvent() << endl;
00098
00099
00100   image2=image;
00101   win3.ShowImage(image2);
00102
00103   win2.DestroyWindow();
00104   win3.DestroyWindow();
00105
00106   //return 0;
00107   // short pnm movie
00108   for (int i=0; i< 86; i++){
00109     name.str(""); // reset ostringstream
00110
00111     //  name << "/data/Orig/Parken/Laengs3/image00"
00112     name << "/tmp/image00"
00113
00114          << setfill('0') << setw(2) << i << ".pnm";
00115     //cout << name.str().c_str() << endl;
00116     if (ImageIO::ImportImage( name.str(),image) < 0){
00117         cerr << "error loading image\n";
00118         exit (-1);
00119     }
00120
00121     // pixel access (slow!!!)
00122     for (int j=0; j<50; j++){
00123         image.PixelValue(100+j, 100, 0)=255;
00124         image.PixelValue(100+j, 100, 1)=0;
00125         image.PixelValue(100+j, 100, 2)=0;
00126     }
00127     //cout << i << "\t1\twin ShowImage\n";
00128     //image.IP_ToGrey();
00129     //cout << i << "\t2\twin ShowImage\n";
00130     win.ShowImage(image);
00131     //cout << i << "\t3\twin ShowImage\n";
00132     //usleep(500000);
00133   }
00134
00135   win.DestroyWindow();
00136   //cout << "win DestroyWindow\n";
00137
00138   image.Release();
00139
00140   //return 0;
00141
00142   sleep(1);
00143
00144   image.Init(360, 288, 3);
00145
00146   image.FillImageWithConstValue(0);
00147
00148   //    win.CreateWindow(image);
00149
00150   for (int i=0; i<256; i++){
00151     image.FillImageWithConstValue(i);
00152     //  cout << i << endl;
00153     win.ShowImage(image);
00154     //usleep(50000);
00155   }
00156
00157   win.DestroyWindow();
00158
00159   return 0;
00160 }
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testLeak.cpp Source File

Tests

testLeak.cpp

Go to the documentation of this file.
00001
00002 // compiling this source code
00003 // should intentionally produce a memory Leak
00004 // JW
00005
00006 #include <Base/Common/BIASpragma.hh>
00007
00008 #include <iostream>
00009 using namespace std;
00010
00011
00012 /** create a leak with new  */
00013 void MyLeak1new()
00014 {
00015   char* ptr1=NULL;
00016   // Leak
00017   ptr1 = new char[512];
00018   strcpy(ptr1, "MLeak1new data. hello! 11111 ");
00019 }
00020
00021
00022 /** create a leak with malloc */
00023 void MyLeak2malloc()
00024 {
00025   char* ptr2=NULL;
00026   // Leak
00027   ptr2 = (char*)(malloc(4096*sizeof(char)));
00028   strcpy(ptr2, "MyLeak2malloc data. hello! 2222222 ");
00029 }
00030
00031
00032
00033 /** not leaking new */
00034 void NoLeak1()
00035 {
00036   char* ptr1=NULL;
00037   const unsigned int sz=512;
00038   ptr1 = new char[sz];
00039   for (unsigned int i=0; i<sz; i++)
00040     {
00041       ptr1[i]=0;
00042     }
00043   // no leak
00044   delete [] ptr1;
00045 }
00046
00047
00048
00049 /** not leaking malloc */
00050 void NoLeak2()
00051 {
00052   char* ptr2=NULL;
00053   const unsigned int sz=4096;
00054   ptr2 = (char*)(malloc(sz*sizeof(char)));
00055   for (unsigned int i=0; i<sz; i++)
00056     {
00057       ptr2[i]=0;
00058     }
00059   free(ptr2);
00060 }
00061
00062
00063
00064
00065
00066 int main(int argc, char *argv[])
00067 {
00068   cout<<"started ";
00069   if (argc>0) cout<<argv[0]<<" ";
00070   cout<<endl;
00071
00072   // not leaking:
00073   NoLeak1();
00074   NoLeak2();
00075
00076   // leaking:
00077   MyLeak1new();
00078   MyLeak2malloc();
00079
00080   return 0;
00081 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/Examples/TestMIPVideoSource_Disk.cpp Source File

VideoSource » Examples

TestMIPVideoSource_Disk.cpp

Go to the documentation of this file.
00001 #include <MIPVideoSource/VideoSource.hh>
00002 #include <MIPVideoSource/VideoSource_Disk.hh>
00003
00004 #include <MIPCamera/Camera.hh>
00005
00006
00007 int main( int argc, char *argv[])
00008 {
00009   VideoSource *cam;
00010
00011   Camera<unsigned char> pic;
00012
00013   pic.ImportImage("gerade4_k0_000.pgm");
00014
00015   cout << "Import OK\n";
00016
00017   cam = new VideoSource_Disk;
00018
00019   cam->SetDebuglevel(D_VSO_DISK );
00020
00021 //      cam->ShowCapabilities();
00022
00023   cam->SetColorModel(MIP_Grey);
00024
00025   cam->OpenDevice("gerade4_k0_",".pgm",3,5);
00026
00027   pic.SetDebugLevel(D_COPYIN | D_CONVERT);
00028   pic.Init(cam->GetWidth(), cam->GetHeight(), cam->GetColorChannels());
00029   pic.FillImageWithConstValue((unsigned char)128);
00030
00031   cout << "pic.Init() done with: "<<cam->GetWidth()<<" "<<cam->GetHeight()<<" "<< cam->GetColorChannels()<<endl;
00032
00033   cam->PreGrab();
00034   for (int i=0; i<10; i++){
00035     cam->GrabSingle(pic);
00036     cout <<i<< " Grab() done"<<endl;
00037   }
00038   cam->PostGrab();
00039   cam->CloseDevice();
00040
00041   // pic.IP_ToGrey();
00042   pic.ExportImage("cam", MIP_pgm);
00043
00044   delete cam;
00045   return 0;
00046 }
00047
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Gui/Examples/TestMouse.cpp Source File

Gui » Examples

TestMouse.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include <Base/Image/Image.hh>
00027 #include <Gui/GuiGTK.hh>
00028 #include <Gui/GuiEnhanced.hh>
00029
00030 using namespace BIAS;
00031 using namespace std;
00032
00033 int main(int argc, char *argv[])
00034 {
00035   char key;
00036   bool pressed, keyevent;
00037   int button, x, y;
00038   ostringstream name;
00039   Image<unsigned char> image, image2;
00040   Gui win("TestTitle");
00041   if (argc < 2 ) {
00042     cerr << argv[0] <<" <filename>"<<endl;
00043     exit(1);
00044   }
00045
00046   // load image
00047   if (image.ImportImage(argv[1]) < 0){
00048     //  if (image.Read(argv[1]) < 0){
00049     cerr << "error loading image\n";
00050     exit (-1);
00051   }
00052
00053   GuiEnhanced wine;
00054   wine.ShowImage(image);
00055   wine.WaitForEvent(keyevent, key, pressed, button, x, y);
00056   if (keyevent)
00057     cerr << "you pressed key " << key << endl;
00058   else
00059     if (pressed)
00060       cerr << "you pressed mouse button " << button << " at " << x
00061        << " " << y << endl;
00062     else
00063       cerr << "you released mouse button " << button << " at " << x
00064        << " " << y << endl;
00065
00066   unsigned int point[2];
00067   wine.SelectPoint(point);
00068   cerr << "selected point (" << point[0] << ", " << point[1] << ")" << endl;
00069   wine.DestroyWindow();
00070
00071   win.ShowImage(image);
00072
00073
00074   win.WaitForMouseButtonEvent(pressed, button, x, y);
00075   if (pressed){
00076     cerr <<"mouse button " << button << " pressed at (" << x <<", "
00077      << y <<")" << endl;
00078   } else {
00079     cerr <<"mouse button " << button << " released at (" << x <<", "
00080      << y <<")" << endl;
00081   }
00082
00083   win.WaitForMouseButtonEvent(pressed, button, x, y);
00084   if (pressed){
00085     cerr <<"mouse button " << button << " pressed at (" << x <<", "
00086      << y <<")" << endl;
00087   } else {
00088     cerr <<"mouse button " << button << " released at (" << x <<", "
00089      << y <<")" << endl;
00090   }
00091   win.DestroyWindow();
00092
00093   GuiEnhanced wine2;
00094   wine2.ShowImage(image);
00095   pressed = false;
00096   button = -1;
00097   while (button != 1 || pressed != true)
00098     wine2.WaitForMouseButtonEvent(pressed, button, x, y);
00099   wine2.GetZoomImage(x, y, 8, 15, image2);
00100
00101   win.ShowImage(image2);
00102   pressed = false;
00103   button = -1;
00104   while (button != 1 || pressed != true)
00105     win.WaitForMouseButtonEvent(pressed, button, x, y);
00106
00107
00108   return 0;
00109 }
Generated on Wed Jun 21 19:01:04 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tests/testWarn.cpp Source File

Tests

testWarn.cpp

Go to the documentation of this file.
00001
00002 // compiling this source code
00003 // should intentionally produce a warning
00004 // JW
00005 int main(int argc, char *argv[])
00006 {
00007   unsigned int a=1;
00008   int b=2;
00009   if (a<b){
00010     return 0;
00011   } else {
00012     return 1;
00013   };
00014 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TFTensorEstimation.cpp Source File

Geometry

TFTensorEstimation.cpp

Go to the documentation of this file.
00001 #include "TFTensorEstimation.hh"
00002 #include "TrifocalTensor.hh"
00003 #include <Base/Geometry/HomgPoint2D.hh>
00004 #include <MathAlgo/SVD.hh>
00005 #include <Base/Math/Matrix.hh>
00006 #include <iostream>
00007
00008 using namespace std;
00009 using namespace BIAS;
00010
00011 #define USE_FOUR_EQUATIONS_PER_POINT
00012 #define TFT_EST_CHECK_EQUATIONS
00013 #define TFT_EST_USE_SVD_HACK
00014
00015
00016 TFTensorEstimation::TFTensorEstimation()
00017 {
00018 }
00019
00020
00021 TFTensorEstimation::~TFTensorEstimation(){}
00022
00023
00024 int TFTensorEstimation::Compute( TrifocalTensor &T,
00025                                  const vector<HomgPoint2D> &x1,
00026                                  const vector<HomgPoint2D> &x2,
00027                                  const vector<HomgPoint2D> &x3,
00028                                  bool HartleyNormalization /* = true */ )
00029 {
00030   BIASASSERT( x1.size()==x2.size() && x2.size()==x3.size() );
00031   if ( x1.size() < 7 )
00032     {
00033       BIASERR("Need at least 7 correspondences for computation!");
00034       return -1;
00035     }
00036
00037   int n = x1.size();
00038   vector<HomgPoint2D> p1, p1norm;
00039   vector<HomgPoint2D> p2, p2norm;
00040   vector<HomgPoint2D> p3, p3norm;
00041   KMatrix K1, K2, K3;
00042
00043   // original points shall not be touched
00044   p1 = x1;
00045   p2 = x2;
00046   p3 = x3;
00047
00048   if (HartleyNormalization) // normalize points following Hartley-normalization
00049     {
00050       cout << "Performing Hartley normalization..." << endl;
00051       Norm_.Hartley(p1, p1norm, K1);
00052       Norm_.Hartley(p2, p2norm, K2);
00053       Norm_.Hartley(p3, p3norm, K3);
00054       p1 = p1norm;
00055       p2 = p2norm;
00056       p3 = p3norm;
00057       cout << "K1 = " << K1 << endl;
00058       cout << "K2 = " << K2 << endl;
00059       cout << "K3 = " << K3 << endl;
00060     }
00061   else
00062     {
00063       cerr << "Hartley normalization skipped." << endl;
00064     }
00065
00066
00067
00068 #ifdef USE_FOUR_EQUATIONS_PER_POINT
00069   Matrix<TRIFOCALTENSOR_TYPE> A(4*n, 27);
00070   for(int corr=0; corr<(int)p1.size(); corr++) {
00071     // first equation for i=1 and l=1 ///////////////////////////////////////
00072     /* T_1^{11} */ A[corr][0]    =   p1[corr][0];
00073     /* T_1^{12} */ A[corr][1]    = 0.0;
00074     /* T_1^{13} */ A[corr][2]    = - p1[corr][0] *               p3[corr][0];
00075     /* T_1^{21} */ A[corr][3]    = 0.0;
00076     /* T_1^{22} */ A[corr][4]    = 0.0;
00077     /* T_1^{23} */ A[corr][5]    = 0.0;
00078     /* T_1^{31} */ A[corr][6]    = - p1[corr][0] * p2[corr][0];
00079     /* T_1^{32} */ A[corr][7]    = 0.0;
00080     /* T_1^{33} */ A[corr][8]    =   p1[corr][0] * p2[corr][0] * p3[corr][0];
00081
00082     /* T_2^{11} */ A[corr][9]    =   p1[corr][1];
00083     /* T_2^{12} */ A[corr][10]   = 0.0;
00084     /* T_2^{13} */ A[corr][11]   = - p1[corr][1] *               p3[corr][0];
00085     /* T_2^{21} */ A[corr][12]   = 0.0;
00086     /* T_2^{22} */ A[corr][13]   = 0.0;
00087     /* T_2^{23} */ A[corr][14]   = 0.0;
00088     /* T_2^{31} */ A[corr][15]   = - p1[corr][1] * p2[corr][0];
00089     /* T_2^{32} */ A[corr][16]   = 0.0;
00090     /* T_2^{33} */ A[corr][17]   =   p1[corr][1] * p2[corr][0] * p3[corr][0];
00091
00092     /* T_3^{11} */ A[corr][18]   =   p1[corr][2];
00093     /* T_3^{12} */ A[corr][19]   = 0.0;
00094     /* T_3^{13} */ A[corr][20]   = - p1[corr][2] *               p3[corr][0];
00095     /* T_3^{21} */ A[corr][21]   = 0.0;
00096     /* T_3^{22} */ A[corr][22]   = 0.0;
00097     /* T_3^{23} */ A[corr][23]   = 0.0;
00098     /* T_3^{31} */ A[corr][24]   = - p1[corr][2] * p2[corr][0];
00099     /* T_3^{32} */ A[corr][25]   = 0.0;
00100     /* T_3^{33} */ A[corr][26]   =   p1[corr][2] * p2[corr][0] * p3[corr][0];
00101
00102     // second equation for i=1 and l=2 //////////////////////////////////////
00103     /* T_1^{11} */ A[corr+n][0] = 0.0;
00104     /* T_1^{12} */ A[corr+n][1] =   p1[corr][0];
00105     /* T_1^{13} */ A[corr+n][2] = - p1[corr][0] *            p3[corr][1];
00106     /* T_1^{21} */ A[corr+n][3] = 0.0;
00107     /* T_1^{22} */ A[corr+n][4] = 0.0;
00108     /* T_1^{23} */ A[corr+n][5] = 0.0;
00109     /* T_1^{31} */ A[corr+n][6] = 0.0;
00110     /* T_1^{32} */ A[corr+n][7] = - p1[corr][0] * p2[corr][0];
00111     /* T_1^{33} */ A[corr+n][8] =   p1[corr][0] * p2[corr][0] * p3[corr][1];
00112
00113     /* T_2^{11} */ A[corr+n][9] = 0.0;
00114     /* T_2^{12} */ A[corr+n][10]=   p1[corr][1];
00115     /* T_2^{13} */ A[corr+n][11]= - p1[corr][1] *               p3[corr][1];
00116     /* T_2^{21} */ A[corr+n][12]= 0.0;
00117     /* T_2^{22} */ A[corr+n][13]= 0.0;
00118     /* T_2^{23} */ A[corr+n][14]= 0.0;
00119     /* T_2^{31} */ A[corr+n][15]= 0.0;
00120     /* T_2^{32} */ A[corr+n][16]= - p1[corr][1] * p2[corr][0];
00121     /* T_2^{33} */ A[corr+n][17]=   p1[corr][1] * p2[corr][0] * p3[corr][1];
00122
00123     /* T_3^{11} */ A[corr+n][18]= 0.0;
00124     /* T_3^{12} */ A[corr+n][19]=   p1[corr][2];
00125     /* T_3^{13} */ A[corr+n][20]= - p1[corr][2] *               p3[corr][1];
00126     /* T_3^{21} */ A[corr+n][21]= 0.0;
00127     /* T_3^{22} */ A[corr+n][22]= 0.0;
00128     /* T_3^{23} */ A[corr+n][23]= 0.0;
00129     /* T_3^{31} */ A[corr+n][24]= 0.0;
00130     /* T_3^{32} */ A[corr+n][25]= - p1[corr][2] * p2[corr][0];
00131     /* T_3^{33} */ A[corr+n][26]=   p1[corr][2] * p2[corr][0] * p3[corr][1];
00132
00133     // third equation for i=2 and l=1 ///////////////////////////////////////
00134     /* T_1^{11} */ A[corr+2*n][0] = 0.0;
00135     /* T_1^{12} */ A[corr+2*n][1] = 0.0;
00136     /* T_1^{13} */ A[corr+2*n][2] = 0.0;
00137     /* T_1^{21} */ A[corr+2*n][3] =   p1[corr][0];
00138     /* T_1^{22} */ A[corr+2*n][4] = 0.0;
00139     /* T_1^{23} */ A[corr+2*n][5] = - p1[corr][0] *               p3[corr][0];
00140     /* T_1^{31} */ A[corr+2*n][6] = - p1[corr][0] * p2[corr][1];
00141     /* T_1^{32} */ A[corr+2*n][7] = 0.0;
00142     /* T_1^{33} */ A[corr+2*n][8] =   p1[corr][0] * p2[corr][1] * p3[corr][0];
00143
00144     /* T_2^{11} */ A[corr+2*n][9] = 0.0;
00145     /* T_2^{12} */ A[corr+2*n][10]= 0.0;
00146     /* T_2^{13} */ A[corr+2*n][11]= 0.0;
00147     /* T_2^{21} */ A[corr+2*n][12]=   p1[corr][1];
00148     /* T_2^{22} */ A[corr+2*n][13]= 0.0;
00149     /* T_2^{23} */ A[corr+2*n][14]= - p1[corr][1] *               p3[corr][0];
00150     /* T_2^{31} */ A[corr+2*n][15]= - p1[corr][1] * p2[corr][1];
00151     /* T_2^{32} */ A[corr+2*n][16]= 0.0;
00152     /* T_2^{33} */ A[corr+2*n][17]=   p1[corr][1] * p2[corr][1] * p3[corr][0];
00153
00154     /* T_3^{11} */ A[corr+2*n][18]= 0.0;
00155     /* T_3^{12} */ A[corr+2*n][19]= 0.0;
00156     /* T_3^{13} */ A[corr+2*n][20]= 0.0;
00157     /* T_3^{21} */ A[corr+2*n][21]=   p1[corr][2];
00158     /* T_3^{22} */ A[corr+2*n][22]= 0.0;
00159     /* T_3^{23} */ A[corr+2*n][23]= - p1[corr][2] *               p3[corr][0];
00160     /* T_3^{31} */ A[corr+2*n][24]= - p1[corr][2] * p2[corr][1];
00161     /* T_3^{32} */ A[corr+2*n][25]= 0.0;
00162     /* T_3^{33} */ A[corr+2*n][26]=   p1[corr][2] * p2[corr][1] * p3[corr][0];
00163
00164     // fourth equation for i=2 and l=2 //////////////////////////////////
00165     /* T_1^{11} */ A[corr+3*n][0] = 0.0;
00166     /* T_1^{12} */ A[corr+3*n][1] = 0.0;
00167     /* T_1^{13} */ A[corr+3*n][2] = 0.0;
00168     /* T_1^{21} */ A[corr+3*n][3] = 0.0;
00169     /* T_1^{22} */ A[corr+3*n][4] =   p1[corr][0];
00170     /* T_1^{23} */ A[corr+3*n][5] = - p1[corr][0] *               p3[corr][1];
00171     /* T_1^{31} */ A[corr+3*n][6] = 0.0;
00172     /* T_1^{32} */ A[corr+3*n][7] = - p1[corr][0] * p2[corr][1];
00173     /* T_1^{33} */ A[corr+3*n][8] =   p1[corr][0] * p2[corr][1] * p3[corr][1];
00174
00175     /* T_2^{11} */ A[corr+3*n][9] = 0.0;
00176     /* T_2^{12} */ A[corr+3*n][10]= 0.0;
00177     /* T_2^{13} */ A[corr+3*n][11]= 0.0;
00178     /* T_2^{21} */ A[corr+3*n][12]= 0.0;
00179     /* T_2^{22} */ A[corr+3*n][13]=   p1[corr][1];
00180     /* T_2^{23} */ A[corr+3*n][14]= - p1[corr][1] *               p3[corr][1];
00181     /* T_2^{31} */ A[corr+3*n][15]= 0.0;
00182     /* T_2^{32} */ A[corr+3*n][16]= - p1[corr][1] * p2[corr][1];
00183     /* T_2^{33} */ A[corr+3*n][17]=   p1[corr][1] * p2[corr][1] * p3[corr][1];
00184
00185     /* T_3^{11} */ A[corr+3*n][18]= 0.0;
00186     /* T_3^{12} */ A[corr+3*n][19]= 0.0;
00187     /* T_3^{13} */ A[corr+3*n][20]= 0.0;
00188     /* T_3^{21} */ A[corr+3*n][21]= 0.0;
00189     /* T_3^{22} */ A[corr+3*n][22]=   p1[corr][2];
00190     /* T_3^{23} */ A[corr+3*n][23]= - p1[corr][2] *               p3[corr][1];
00191     /* T_3^{31} */ A[corr+3*n][24]= 0.0;
00192     /* T_3^{32} */ A[corr+3*n][25]= - p1[corr][2] * p2[corr][1];
00193     /* T_3^{33} */ A[corr+3*n][26]=   p1[corr][2] * p2[corr][1] * p3[corr][1];
00194   }
00195 #else
00196   Matrix<TRIFOCALTENSOR_TYPE> A(p1.size(), 27);
00197   for (int i=0; i<(int)p1.size(); i++)
00198     {
00199       // T_1^{11}
00200       A[i][0]  = p1[i][0];
00201       // T_1^{12}
00202       A[i][1]  = p1[i][0];
00203       // T_1^{13}
00204       A[i][2]  = -p1[i][0] * p3[i][0] - p1[i][0] * p3[i][1];
00205       // T_1^{21}
00206       A[i][3]  = p1[i][0];
00207       // T_1^{22}
00208       A[i][4]  = p1[i][0];
00209       // T_1^{23}
00210       A[i][5]  = -p1[i][0] * p3[i][0] - p1[i][0] * p3[i][1];
00211       // T_1^{31}
00212       A[i][6]  = -p1[i][0] * p2[i][0] - p1[i][0] * p2[i][1];
00213       // T_1^{32}
00214       A[i][7]  = -p1[i][0] * p2[i][0] - p1[i][0] * p2[i][1];
00215       // T_1^{33}
00216       A[i][8]  =
00217         p1[i][0] * p2[i][0] * p3[i][0] +
00218         p1[i][0] * p2[i][0] * p3[i][1] +
00219         p1[i][0] * p2[i][1] * p3[i][0] +
00220         p1[i][0] * p2[i][1] * p3[i][1] ;
00221       // T_2^{11}
00222       A[i][9]  = p1[i][1];
00223       // T_2^{12}
00224       A[i][10] = p1[i][1];
00225       // T_2^{13}
00226       A[i][11] = -p1[i][1] * p3[i][0] - p1[i][1] * p3[i][1];
00227       // T_2^{21}
00228       A[i][12] = p1[i][1];
00229       // T_2^{22}
00230       A[i][13] = p1[i][1];
00231       // T_2^{23}
00232       A[i][14] = -p1[i][1] * p3[i][0] - p1[i][1] * p3[i][1];
00233       // T_2^{31}
00234       A[i][15] = -p1[i][1] * p2[i][0] - p1[i][1] * p2[i][1];
00235       // T_2^{32}
00236       A[i][16] = -p1[i][1] * p2[i][0] - p1[i][1] * p2[i][1];
00237       // T_2^{33}
00238       A[i][17] =
00239         p1[i][1] * p2[i][0] * p3[i][0] +
00240         p1[i][1] * p2[i][0] * p3[i][1] +
00241         p1[i][1] * p2[i][1] * p3[i][0] +
00242         p1[i][1] * p2[i][1] * p3[i][1] ;
00243       // T_3^{11}
00244       A[i][18] = p1[i][2];
00245       // T_3^{12}
00246       A[i][19] = p1[i][2];
00247       // T_3^{13}
00248       A[i][20] = -p1[i][2] * p3[i][0] - p1[i][2] * p3[i][1];
00249       // T_3^{21}
00250       A[i][21] = p1[i][2];
00251       // T_3^{22}
00252       A[i][22] = p1[i][2];
00253       // T_3^{23}
00254       A[i][23] = -p1[i][2] * p3[i][0] - p1[i][2] * p3[i][1];
00255       // T_3^{31}
00256       A[i][24] = -p1[i][2] * p2[i][0] - p1[i][2] * p2[i][1];
00257       // T_3^{32}
00258       A[i][25] = -p1[i][2] * p2[i][0] - p1[i][2] * p2[i][1];
00259       // T_3^{33}
00260       A[i][26] =
00261         p1[i][2] * p2[i][0] * p3[i][0] +
00262         p1[i][2] * p2[i][0] * p3[i][1] +
00263         p1[i][2] * p2[i][1] * p3[i][0] +
00264         p1[i][2] * p2[i][1] * p3[i][1] ;
00265     }
00266 #endif
00267
00268 #ifdef TFT_EST_CHECK_EQUATIONS
00269   cout << "A = " << A << endl;
00270 #endif
00271
00272   SVD svda(A);
00273   cout << "LeftNullspaceDim  = " << svda.LeftNullspaceDim() << endl;
00274   cout << "RightNullspaceDim = " << svda.RightNullspaceDim() << endl;
00275
00276 #ifdef TFT_EST_USE_SVD_HACK
00277   Matrix<double> VT = svda.GetVT();
00278   Vector<TRIFOCALTENSOR_TYPE> Tvec(VT.num_cols());
00279
00280   for (int col=0; col < VT.num_cols(); col++)
00281     {
00282       Tvec[col] = VT[ VT.num_cols() - 1 ][col];
00283     }
00284 #else
00285   Vector<TRIFOCALTENSOR_TYPE> Tvec = svda.GetNullvector();
00286 #endif
00287
00288   cout << "Tvec = " << Tvec << endl;
00289
00290 #ifdef TFT_EST_CHECK_EQUATIONS
00291   cout << A * Tvec << endl;
00292 #endif
00293
00294   T.SetFromVector(Tvec);
00295
00296 #ifdef TFT_EST_CHECK_EQUATIONS
00297   double result;
00298   for (unsigned int i=0; i<p1.size(); i++)
00299     {
00300       cout << "\nChecking correspondence " << i << endl;
00301       result =
00302           p1[i][0] * p2[i][0] * p3[i][0] * T(0,2,2)
00303         - p1[i][0] *            p3[i][0] * T(0,0,2)
00304         - p1[i][0] * p2[i][0] *            T(0,2,0)
00305         + p1[i][0] *                       T(0,0,0);
00306       result +=
00307           p1[i][1] * p2[i][0] * p3[i][0] * T(1,2,2)
00308         - p1[i][1] *            p3[i][0] * T(1,0,2)
00309         - p1[i][1] * p2[i][0] *            T(1,2,0)
00310         + p1[i][1] *                       T(1,0,0);
00311       result +=
00312           p1[i][2] * p2[i][0] * p3[i][0] * T(2,2,2)
00313         - p1[i][2] *            p3[i][0] * T(2,0,2)
00314         - p1[i][2] * p2[i][0] *            T(2,2,0)
00315         + p1[i][2] *                       T(2,0,0);
00316       cout <<"  result 1 is "<<result<<endl;
00317
00318       result =
00319           p1[i][0] * p2[i][0] * p3[i][1] * T(0,2,2)
00320         - p1[i][0] *            p3[i][1] * T(0,0,2)
00321         - p1[i][0] * p2[i][0] *            T(0,2,1)
00322         + p1[i][0] *                       T(0,0,1);
00323       result +=
00324           p1[i][1] * p2[i][0] * p3[i][1] * T(1,2,2)
00325         - p1[i][1] *            p3[i][1] * T(1,0,2)
00326         - p1[i][1] * p2[i][0] *            T(1,2,1)
00327         + p1[i][1] *                       T(1,0,1);
00328       result +=
00329           p1[i][2] * p2[i][0] * p3[i][1] * T(2,2,2)
00330         - p1[i][2] *            p3[i][1] * T(2,0,2)
00331         - p1[i][2] * p2[i][0] *            T(2,2,1)
00332         + p1[i][2] *                       T(2,0,1);
00333       cout <<"  result 2 is "<<result<<endl;
00334
00335       result =
00336           p1[i][0] * p2[i][1] * p3[i][0] * T(0,2,2)
00337         - p1[i][0] *            p3[i][0] * T(0,1,2)
00338         - p1[i][0] * p2[i][1] *            T(0,2,0)
00339         + p1[i][0] *                       T(0,1,0);
00340       result +=
00341           p1[i][1] * p2[i][1] * p3[i][0] * T(1,2,2)
00342         - p1[i][1] *            p3[i][0] * T(1,1,2)
00343         - p1[i][1] * p2[i][1] *            T(1,2,0)
00344         + p1[i][1] *                       T(1,1,0);
00345       result +=
00346           p1[i][2] * p2[i][1] * p3[i][0] * T(2,2,2)
00347         - p1[i][2] *            p3[i][0] * T(2,1,2)
00348         - p1[i][2] * p2[i][1] *            T(2,2,0)
00349         + p1[i][2] *                       T(2,1,0);
00350       cout <<"  result 3 is "<<result<<endl;
00351
00352       result =
00353           p1[i][0] * p2[i][1] * p3[i][1] * T(0,2,2)
00354         - p1[i][0] *            p3[i][1] * T(0,1,2)
00355         - p1[i][0] * p2[i][1] *            T(0,2,1)
00356         + p1[i][0] *                       T(0,1,1);
00357       result +=
00358           p1[i][1] * p2[i][1] * p3[i][1] * T(1,2,2)
00359         - p1[i][1] *            p3[i][1] * T(1,1,2)
00360         - p1[i][1] * p2[i][1] *            T(1,2,1)
00361         + p1[i][1] *                       T(1,1,1);
00362       result +=
00363           p1[i][2] * p2[i][1] * p3[i][1] * T(2,2,2)
00364         - p1[i][2] *            p3[i][1] * T(2,1,2)
00365         - p1[i][2] * p2[i][1] *            T(2,2,1)
00366         + p1[i][2] *                       T(2,1,1);
00367       cout <<"  result 4 is "<<result<<endl;
00368     }
00369 #endif
00370
00371   TrifocalTensor T2;
00372   AlgebraicMinimization(T,T2);
00373
00374   if (HartleyNormalization)
00375     {
00376        T2.premultiply3(K3.Invert(),T);
00377        T. premultiply2(K2.Invert(),T2);
00378        T2.postmultiply1(K1,T);
00379     }
00380   else
00381     {
00382       T = T2;
00383     }
00384
00385   return 0;
00386 }
00387
00388 /* The algebraic minimization is described on page 384 of Hartley/Zisserman's
00389    book Multiple View Geometry in Computer Vision */
00390 int TFTensorEstimation::AlgebraicMinimization(TrifocalTensor &Initial,
00391                                               TrifocalTensor &Result)
00392 {
00393   cerr << "The algebraic minimization is not fully implemented yet.\n"
00394        << "So the result is the initial tensor!" << endl;
00395
00396   Result = Initial;
00397   return -1;
00398   ////////////////////////////////////////////////////////////////////
00399 /*
00400   cout << "Starting algebraic minimization..." << endl;
00401   HomgPoint2D e2 = Initial.GetEpipole21(true);
00402   HomgPoint2D e3 = Initial.GetEpipole31();
00403
00404   cout << "Epipole in second image is " << e2 << endl;
00405   cout << "Epipole in third image is  " << e3 << endl;
00406
00407   Matrix<TRIFOCALTENSOR_TYPE> E(27,18);
00408   E.SetZero();
00409
00410   // build matrix E with t=Ea
00411
00412   for( int i=0; i<3; i++)
00413     for( int j=0; j<3; j++)
00414       for( int k=0; k<3; k++)
00415         {
00416           E[9*i+3*j+k][3*i+j]   =  e3[k];
00417           E[9*i+3*j+k][9+3*i+k] = -e2[j];
00418         }
00419
00420   cout << "E = " << E << endl;
00421
00422
00423   // hier fehlt noch was...
00424
00425
00426   cout << "Algebraic minimization finished." << endl;
00427   return 0;
00428   */
00429 }
00430
00431
00432
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TFTensorEstimation.hh Source File

Geometry

TFTensorEstimation.hh

Go to the documentation of this file.
00001 #ifndef __TFTensorEstimation_hh__
00002 #define __TFTensorEstimation_hh__
00003
00004 #include <Base/Common/BIASpragmaStart.hh>
00005
00006 #include "TrifocalTensor.hh"
00007 #include <Base/Geometry/HomgPoint2D.hh>
00008 #include <Base/Geometry/Normalization.hh>
00009
00010 #include <vector>
00011
00012 namespace BIAS
00013 {
00014   /** class TFTensorEstimation
00015       @brief compute a trifocal tensor from image correspondences, not robust
00016       against outliers
00017       @author Matthias Dunda
00018       @ingroup g_estimation */
00019   class BIASGeometry_EXPORT TFTensorEstimation
00020   {
00021   public:
00022     TFTensorEstimation();
00023     ~TFTensorEstimation();
00024
00025     /** @brief Estimate a trifocal tensor given correnspondences
00026         over three images.
00027         @param HartleyNormalization normalizes correspondences for
00028         each view according to Hartley
00029         @return !=0 on error
00030         @author Matthias Dunda 01/2004 */
00031     int Compute( BIAS::TrifocalTensor &T,
00032                  const std::vector<BIAS::HomgPoint2D> &x1,
00033                  const std::vector<BIAS::HomgPoint2D> &x2,
00034                  const std::vector<BIAS::HomgPoint2D> &x3,
00035                  bool HartleyNormalization = true );
00036   protected:
00037     BIAS::Normalization Norm_;
00038     int AlgebraicMinimization(BIAS::TrifocalTensor &Initial,
00039                               BIAS::TrifocalTensor &Result);
00040
00041   }; // class
00042 } // namespace
00043
00044 #include <Base/Common/BIASpragmaEnd.hh>
00045
00046 #endif /* __TFTensorEstimation_hh__ */
00047
Generated on Wed Jun 21 19:01:02 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ThreadNaming.cpp Source File

Base » Debug

ThreadNaming.cpp

Go to the documentation of this file.
00001 #include "ThreadNaming.hh"
00002
00003 #include <Base/Debug/Error.hh>
00004
00005
00006 #include <iostream>
00007
00008 #include <windows.h>
00009
00010 /// author Jan Woetzel, 2005
00011
00012
00013 #define MS_VC_EXCEPTION 0x406d1388
00014
00015 // helper struct
00016 typedef struct tagTHREADNAME_INFO
00017 {
00018     DWORD dwType;        // must be 0x1000
00019     LPCSTR szName;       // pointer to name (in same addr space)
00020     DWORD dwThreadID;    // thread ID (-1 caller thread)
00021     DWORD dwFlags;       // reserved for future use, most be zero
00022 } THREADNAME_INFO;
00023
00024 // JW public interface
00025 void BIAS::SetThreadName(const unsigned long dwThreadID, const char* szThreadName )
00026 {
00027     if (szThreadName==NULL)
00028     return; // invalid name
00029
00030   // TODO: raise exception only when running in debugger (at rubtime!)
00031   // and additionally rais eonly in debug mode
00032   // HACK
00033   BIASWARN("Thread naming temporarily disabled to avoid Exception thread on running without debug heap. JW. dwThreadID="<<dwThreadID);
00034   return;
00035
00036 //  THREADNAME_INFO info;
00037 //  info.dwType = 0x1000;
00038 //  info.szName = szThreadName;
00039 //  info.dwThreadID = dwThreadID;
00040 //  info.dwFlags = 0;
00041 //
00042 //  try {
00043 //      // post an exception to Visual studio to change the thread name. (JW)
00044 //      RaiseException(
00045 //          MS_VC_EXCEPTION,
00046 //          0,
00047 //          sizeof(info) / sizeof(DWORD),
00048 //          (DWORD *)&info
00049 //          );
00050 //  }
00051 //  catch (int)
00052 //  {
00053 //    std::cerr<<__FUNCTION__<<"not working."<<std::endl;
00054 //#ifdef BIAS_DEBUG
00055 //      DebugBreak();
00056 //#endif
00057 //  }
00058
00059 }
00060
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/ThreadNaming.hh Source File

Base » Debug

ThreadNaming.hh

Go to the documentation of this file.
00001 #ifndef __ThreadNaming_HH__
00002 #define __ThreadNaming_HH__
00003
00004 //#include <bias_config.h>
00005
00006
00007 /** \ingroup g_utils
00008 \file ThreadNaming.hh
00009 \brief utility function to assign "names" to threads, actually WIN32 only.
00010 Very useful for debugging multiple threads.
00011
00012 code inspired by http://www.highprogrammer.com/alan/windev/visualstudio.html
00013
00014 \author Jan Woetzel.
00015 **/
00016
00017
00018 #ifndef WIN32
00019 #  error setting thread name is implemented for WIN32, only. Use/include header only there. Please ifdef your code. (JW)
00020 #endif // ndef WIN32
00021
00022
00023 #ifdef WIN32
00024 namespace BIAS {
00025
00026     /** set the name of a thread.
00027     Useful for debugging in WIN32 with MS Visual Studio.
00028     typical usage, e.g. as first command in wxThread::Entry()
00029     BIAS::SetThreadName(this->GetId(), "PTGS_JW");
00030     @author Jan Woetzel 2005 */
00031     void
00032         /* BIASDebug_EXPORT */
00033         SetThreadName(const unsigned long dwThreadID, const char* szThreadName );
00034 } // namespace BIAS
00035
00036 #endif //WIN32
00037
00038 #endif // __ThreadNaming_HH__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ThreeDOut.cpp Source File

Utils

ThreeDOut.cpp

Go to the documentation of this file.
00001  /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00027 #endif
00028
00029 #include "ThreeDOut.hh"
00030 #include <Geometry/RMatrix.hh>
00031 #include <ctype.h>
00032 #include <Base/Image/ImageIO.hh>
00033
00034 #ifdef BIAS_HAVE_OPENGL
00035 #  include <Gui/biasgl.h>
00036 #  include <GL/glu.h>
00037 #  include <Utils/StatekeeperGL.hh>
00038 #endif
00039
00040
00041 #define ASSERT_MAP_ELEMENT(themap, key) if (themap.find(key)==themap.end()) { \
00042   BIASERR("Tried to access map with key " \
00043   <<key<<". Undefined Element." \
00044   <<" Aborting."); BIASABORT; }
00045
00046 #define DEGREE_PER_RAD (180.0/M_PI)
00047
00048
00049 using namespace BIAS;
00050 using namespace std;
00051
00052
00053 ThreeDOutParameters::ThreeDOutParameters()
00054 {
00055   PointStyle                = Point;
00056   CameraStyle               = PyramidMesh;
00057   LineStyle                 = Solid;
00058   DrawUncertaintyEllipsoids = false;
00059   PointSize                 = 0.1;
00060   CameraScale               = 1.0;
00061   LineWidth                 = 1;
00062 }
00063
00064 ThreeDOut:: ThreeDOut(const ThreeDOutParameters& params){
00065   NextPointIndex_     = 0;
00066   NextLineIndex_      = 0;
00067   NextEllipsoidIndex_ = 0;
00068   NextPIndex_         = 0;
00069   NextImageIndex_     = 0;
00070   NextIndexedFaceSetIndex_ = 0;
00071   WriteViewpoints_    = false;
00072   SetParams(params);
00073 }
00074
00075 ThreeDOut::~ThreeDOut(){}
00076
00077 void ThreeDOut::SetParams(const ThreeDOutParameters& params){
00078   Params_ = params;
00079 }
00080
00081 void ThreeDOut::SetParamsPointSize(double pointSize)
00082 {
00083   Params_.PointSize = pointSize;
00084 }
00085
00086 void ThreeDOut::SetParamsCameraScale(double cameraScale)
00087 {
00088   Params_.CameraScale = cameraScale;
00089 }
00090
00091 void ThreeDOut::SetParamsCameraStyle(CameraDrawingStyle cameraStyle)
00092 {
00093   Params_.CameraStyle = cameraStyle;
00094 }
00095
00096 void ThreeDOut::SetParamsDrawEllipse(bool drawEllipse)
00097 {
00098   Params_.DrawUncertaintyEllipsoids = drawEllipse;
00099 }
00100
00101 string ThreeDOut::CorrectDefString_(const string& defstring) {
00102   string result = defstring;
00103   string::size_type posofinvalidchar = 0;
00104   if( isdigit(result[0]) !=0)
00105     result = "_"+result;
00106
00107   if (result.size()>0) do {
00108     // just look for points (not allowed)
00109     posofinvalidchar = result.find('.', posofinvalidchar);
00110     if (posofinvalidchar != string::npos) result.at(posofinvalidchar) = '_';
00111   } while (posofinvalidchar != string::npos);
00112   return result;
00113 }
00114
00115 // ------------------------ 3d add data functions ------------------------
00116
00117 unsigned int ThreeDOut::AddPoint(const BIAS::Vector3<double> &v,
00118                                  const BIAS::RGBAuc &Color)
00119 {
00120   Point3DData D;
00121   D.Color = Color;
00122   D.Point = v;
00123   mapPoints_[NextPointIndex_] = D;
00124   return NextPointIndex_++;
00125 }
00126
00127 unsigned int ThreeDOut::AddPoint(const BIAS::HomgPoint3D &v,
00128                                  const BIAS::RGBAuc &Color)
00129 {
00130 #ifdef BIAS_DEBUG
00131   if (!v.IsHomogenized()) BIASERR("Supplied unhomogenized point !");
00132 #endif
00133   Vector3<double> Center(v[0], v[1], v[2]);
00134   return AddPoint(Center, Color);
00135 }
00136
00137 unsigned int ThreeDOut::AddLine(const BIAS::Vector3<double> &Start,
00138                                 const BIAS::Vector3<double> &End,
00139                                 const BIAS::RGBAuc &Color)
00140 {
00141   Line3DData D;
00142   D.Start = Start;
00143   D.End   = End;
00144   D.Color = Color;
00145
00146   mapLines_[NextLineIndex_] = D;
00147   return NextLineIndex_++;
00148 }
00149
00150 unsigned int ThreeDOut::AddLine(const BIAS::HomgPoint3D &Start,
00151                                 const BIAS::HomgPoint3D &End,
00152                                 const BIAS::RGBAuc &Color)
00153 {
00154 #ifdef BIAS_DEBUG
00155   if (!Start.IsHomogenized()) BIASERR("Supplied unhomogenized start point !");
00156   if (!End.IsHomogenized()) BIASERR("Supplied unhomogenized end point !");
00157 #endif
00158   Vector3<double> s(Start[0], Start[1], Start[2]);
00159   Vector3<double> e(End[0], End[1], End[2]);
00160   return AddLine(s, e, Color);
00161 }
00162
00163 unsigned int ThreeDOut::AddEllipsoid(BIAS::CovMatrix3x3 &cov,
00164                                      BIAS::Vector3<double> &C,
00165                                      const BIAS::RGBAuc &Color,
00166                                      const double& dConfidenceRegionScale)
00167 {
00168   Ellipsoid3DData Data;
00169   Matrix3x3<double> VT;
00170   RMatrix VInv;
00171   Vector3<double> S;
00172   cov.GetPCA(S, VT);
00173   VInv = VT.Transpose();
00174   VInv.GetRotationAxisAngle(Data.RotAxis, Data.dAngle);
00175   Data.s0 = sqrt(S[0]) * dConfidenceRegionScale;
00176   Data.s1 = sqrt(S[1]) * dConfidenceRegionScale;
00177   Data.s2 = sqrt(S[2]) * dConfidenceRegionScale;
00178   Data.C = C;
00179   Data.Color = Color;
00180   // can y and z be exchanged by svd, so that we dont capture it ?
00181
00182   mapEllipsoids_[NextEllipsoidIndex_] = Data;
00183   return NextEllipsoidIndex_++;
00184 }
00185
00186 unsigned int ThreeDOut::AddEllipsoid(BIAS::CovMatrix3x3 &cov,
00187                                      BIAS::HomgPoint3D &C,
00188                                      const BIAS::RGBAuc &Color,
00189                                      const double &dConfidenceRegionScale)
00190 {
00191 #ifdef BIAS_DEBUG
00192   if (!C.IsHomogenized()) BIASERR("Supplied unhomogenized point !");
00193 #endif
00194   Vector3<double> Center(C[0], C[1], C[2]);
00195   return AddEllipsoid(cov, Center, Color, dConfidenceRegionScale);
00196 }
00197
00198 unsigned int ThreeDOut::AddImage(const Vector3<double>& UL,
00199                                  const Vector3<double>& UR,
00200                                  const Vector3<double>& LL,
00201                                  const Vector3<double>& LR,
00202                                  unsigned int Width, unsigned int Height,
00203                                  unsigned char* pData, unsigned int channels,
00204                                  const std::string& name)
00205 {
00206 #ifdef BIAS_DEBUG
00207   if (Width>UINT_MAX/2) {
00208     BIASERR("Width "<<Width<<" is out of bounds !");
00209     BIASABORT;
00210   }
00211   if (Height>UINT_MAX/2) {
00212     BIASERR("Height "<<Height<<" is out of bounds !");
00213     BIASABORT;
00214   }
00215   if ((channels!=1)&&(channels!=3)) {
00216     BIASERR("Unknown channel count:"<<channels);
00217     BIASABORT;
00218   }
00219 #endif
00220   // find min w with w>=width and w=2^n, needed by opengl
00221   unsigned int w(1), h(1);
00222   while (w<Width)  w<<=1;
00223   while (h<Height) h<<=1;
00224
00225   Image3DData &ImagePatch(mapImages_[NextImageIndex_]);
00226   if (!ImagePatch.ImageData.IsEmpty()) ImagePatch.ImageData.Release();
00227   ImagePatch.ImageData.Init(w, h, channels);
00228   ImagePatch.ImageData.SetROI(0, 0, Width, Height);
00229   unsigned char** pColRow = ImagePatch.ImageData.GetImageDataArray();
00230   unsigned char* pOrig = pData;
00231   for (unsigned int i=0; i<Height; i++) {
00232     memcpy(pColRow[i], pOrig,  channels*Width);
00233     pOrig += channels*Width;
00234   }
00235   ImagePatch.UL = UL;
00236   ImagePatch.UR = UR;
00237   ImagePatch.LL = LL;
00238   ImagePatch.LR = LR;
00239   ImagePatch.name = CorrectDefString_(name);
00240   return NextImageIndex_++;
00241 }
00242
00243
00244 // wrapper
00245 unsigned int ThreeDOut::AddPMatrix(BIAS::Matrix3x4<double> &M,
00246                                    const unsigned int& width,
00247                                    const unsigned int& height,
00248                                    const BIAS::RGBAuc &Color,
00249                                    const double &dScale,
00250                                    const string& name)
00251 {
00252   PMatrix P( M );
00253   return AddPMatrix(P,
00254     width,
00255     height,
00256     Color,
00257     dScale,
00258     name);
00259 }
00260
00261
00262 unsigned int ThreeDOut::AddPMatrix(BIAS::PMatrix &P,
00263                                    const unsigned int& width,
00264                                    const unsigned int& height,
00265                                    const BIAS::RGBAuc &Color,
00266                                    const double &dScale,
00267                                    const string& name)
00268 {
00269   Vector3<double> d,A;
00270   HomgPoint2D ThisCorner;
00271   Matrix3x3<double> R, iKRt;
00272   KMatrix K;
00273   PMatrix3DData pd;
00274   pd.name = CorrectDefString_(name);
00275   pd.Color=Color;
00276   P.GetK(K);
00277   P.GetR(R);
00278   P.GetC(pd.C);
00279   P.GetA(A);
00280   int ires = (K * R.Transpose()).Invert(iKRt);
00281   if (ires!=0) BIASERR("error computing iKRt.");
00282   BIASDOUT(D_3DOUT_PDECOMP, "Decomposing P="<<P<<" into K="<<K<<" R="
00283     <<R<<" C="<<pd.C<<" A="<<A);
00284   for (unsigned int i=0; i<5; i++){
00285     switch (i) {
00286     case 0:
00287       ThisCorner[0] = 0.0;
00288       ThisCorner[1] = 0.0;
00289       break;
00290     case 1:
00291       ThisCorner[0] = width-1;
00292       ThisCorner[1] = 0.0;
00293       break;
00294     case 2:
00295       ThisCorner[0] = width-1;
00296       ThisCorner[1] = height-1;
00297       break;
00298     case 3:
00299       ThisCorner[0] = 0.0;
00300       ThisCorner[1] = height-1;
00301       break;
00302     case 4:
00303       ThisCorner[0] = K[0][2];
00304       ThisCorner[1] = K[1][2];
00305       break;
00306     }
00307     ThisCorner[2] = 1.0;
00308     // get backprojection ray d from camera center to image point ThisCorner
00309     iKRt.Mult(ThisCorner,d);
00310
00311     // normalize projection of d on A to length 1
00312     d *= dScale / (d.ScalarProduct(A));
00313
00314     // attach ray d to camera center to construct a 3d point
00315     d += pd.C;
00316     switch (i) {
00317     case 0: pd.UL=d; break;
00318     case 1: pd.UR=d; break;
00319     case 2: pd.LR=d; break;
00320     case 3: pd.LL=d; break;
00321     case 4: pd.PP=d; break;
00322     }
00323   } // for (unsigned int i=0; i<4; i++){
00324   BIASDOUT(D_3DOUT_PDECOMP, "Created points ul="<<pd.UL<<" ur="<<pd.UR<<" lr="
00325     <<pd.LR<<" ll="<<pd.LL<<" and principle point at "<<pd.PP);
00326   pd.Up[0] = R[0][1];
00327   pd.Up[1] = R[1][1];
00328   pd.Up[2] = R[2][1];
00329   pd.Up *= -dScale /2.0;
00330   mapPMatrices_[NextPIndex_] = pd;
00331
00332
00333   return NextPIndex_++;
00334 }
00335
00336 unsigned int ThreeDOut::
00337 AddTriangleMesh(const BIAS::TriangleMesh& mesh,
00338                 const std::string& name,
00339                 const std::string& textureOutputName,
00340                 bool writeOutTexture)
00341 {
00342   IndexedFaceSet Data;
00343   Data.name = CorrectDefString_(name);
00344   Data.textureName = textureOutputName;
00345   Data.writeOutTexture = writeOutTexture;
00346   mesh.GetTexture(Data.texture);
00347   Data.texture.Flip();
00348   mesh.GetVertices(Data.vertexSet);
00349   mesh.GetTexCoords(Data.texCoordSet);
00350   mesh.GetTriangleIndices(Data.faceIndices);
00351
00352   mapIndexedFaceSet_[NextIndexedFaceSetIndex_] = Data;
00353
00354 //   cout<<"got Texture of size "<<Data.texture.GetWidth()<<"x"
00355 //       <<Data.texture.GetHeight()<<"\n";
00356 //   cout<<"got vertices "<<Data.vertexSet.size()<<endl;
00357 //   cout<<"got tex coords "<<Data.texCoordSet.size()<<endl;
00358 //   cout<<"got triangles "<<Data.faceIndices.size()<<endl;
00359
00360
00361   return NextIndexedFaceSetIndex_++;
00362 }
00363
00364 unsigned int ThreeDOut::
00365 AddProjection(const Projection& p,
00366           const RGBAuc& colorSelection,
00367           const double radius,
00368           const double scale)
00369 {
00370   Projection3DData data;
00371   data.Set(p, scale);
00372   data.radiusSelection = radius;
00373   data.ColorOfSelection = colorSelection;
00374
00375   mapProjection3D_[NextProjection3DIndex_] = data;
00376   return NextProjection3DIndex_++;
00377 }
00378
00379 unsigned int ThreeDOut::
00380 AddPose(const PoseParametrization& p,
00381         const RGBAuc& colorSelection,
00382         const double radius,
00383         const double scale)
00384 {
00385   Projection3DData data;
00386   data.Set(p, scale);
00387   data.radiusSelection = radius;
00388   data.ColorOfSelection = colorSelection;
00389
00390   mapProjection3D_[NextProjection3DIndex_] = data;
00391   return NextProjection3DIndex_++;
00392 }
00393
00394
00395 // -------------------------- 3D data update functions -----------------------
00396
00397
00398 void ThreeDOut::UpdatePoint(const unsigned int& PointIndex,
00399                             const BIAS::Vector3<double> &v,
00400                             const BIAS::RGBAuc &Color)
00401 {
00402 #ifdef BIAS_DEBUG
00403   ASSERT_MAP_ELEMENT(mapPoints_, PointIndex);
00404 #endif
00405   Point3DData& D = mapPoints_[PointIndex];
00406   D.Point = v;
00407   D.Color = Color;
00408 }
00409
00410 void ThreeDOut::UpdatePoint(const unsigned int& PointIndex,
00411                             const BIAS::HomgPoint3D &v,
00412                             const BIAS::RGBAuc &Color)
00413 {
00414 #ifdef BIAS_DEBUG
00415   if (!v.IsHomogenized()) BIASERR("Supplied unhomogenized point !");
00416 #endif
00417   Vector3<double> V(v[0], v[1], v[2]);
00418   UpdatePoint(PointIndex, V, Color);
00419 }
00420
00421 void ThreeDOut::UpdatePMatrix(const unsigned int& PIndex,
00422                               BIAS::PMatrix &P,
00423                               const unsigned int& width,
00424                               const unsigned int& height,
00425                               const BIAS::RGBAuc &Color,
00426                               const double& dScale)
00427 {
00428   unsigned int backupnextpindex = NextPIndex_;
00429   NextPIndex_ = PIndex;
00430   AddPMatrix(P, width, height, Color, dScale);
00431   NextPIndex_ = backupnextpindex;
00432 }
00433
00434 void ThreeDOut::UpdatePMatrixColor(const unsigned int& PIndex,
00435                                    const BIAS::RGBAuc &Color)
00436 {
00437   mapPMatrices_[PIndex].Color = Color;
00438 }
00439
00440 void ThreeDOut::UpdateLine(const unsigned int& LineIndex,
00441                            const BIAS::Vector3<double> &Start,
00442                            const BIAS::Vector3<double> &End,
00443                            const BIAS::RGBAuc &Color)
00444 {
00445 #ifdef BIAS_DEBUG
00446   ASSERT_MAP_ELEMENT(mapLines_, LineIndex);
00447 #endif
00448   Line3DData& D = mapLines_[LineIndex];
00449   D.Start = Start;
00450   D.End = End;
00451   D.Color = Color;
00452 }
00453
00454 void ThreeDOut::UpdateLine(const unsigned int& LineIndex,
00455                            const BIAS::HomgPoint3D &Start,
00456                            const BIAS::HomgPoint3D &End,
00457                            const BIAS::RGBAuc &Color)
00458 {
00459 #ifdef BIAS_DEBUG
00460   if (!Start.IsHomogenized()) BIASERR("Supplied unhomogenized start point !");
00461   if (!End.IsHomogenized()) BIASERR("Supplied unhomogenized end point !");
00462 #endif
00463   Vector3<double> s(Start[0], Start[1], Start[2]);
00464   Vector3<double> e(End[0], End[1], End[2]);
00465   UpdateLine(LineIndex, s, e, Color);
00466 }
00467
00468
00469 void ThreeDOut::UpdateEllipsoid(const unsigned int& EIndex,
00470                                 BIAS::CovMatrix3x3 &cov,
00471                                 BIAS::Vector3<double> &C,
00472                                 const BIAS::RGBAuc &Color,
00473                                 const double &dConfidenceRegionScale)
00474 {
00475 #ifdef BIAS_DEBUG
00476   ASSERT_MAP_ELEMENT(mapEllipsoids_, EIndex);
00477 #endif
00478   Ellipsoid3DData& Data = mapEllipsoids_[EIndex];
00479   Matrix3x3<double> VT;
00480   RMatrix VInv;
00481   Vector3<double> S;
00482   cov.GetPCA(S, VT);
00483   VT = VT.Transpose();
00484   VInv = VT; // .Invert();
00485   VInv.GetRotationAxisAngle(Data.RotAxis, Data.dAngle);
00486   Data.s0 = sqrt(S[0]) * dConfidenceRegionScale;
00487   Data.s1 = sqrt(S[1]) * dConfidenceRegionScale;
00488   Data.s2 = sqrt(S[2]) * dConfidenceRegionScale;
00489   Data.C = C;
00490   Data.Color = Color;
00491 }
00492
00493 void ThreeDOut::UpdateEllipsoid(const unsigned int& EIndex,
00494                                 BIAS::CovMatrix3x3 &cov,
00495                                 BIAS::HomgPoint3D &C,
00496                                 const BIAS::RGBAuc &Color,
00497                                 const double& dConfidenceRegionScale)
00498 {
00499 #ifdef BIAS_DEBUG
00500   if (!C.IsHomogenized()) BIASERR("Supplied unhomogenized point !");
00501 #endif
00502   Vector3<double> Center(C[0], C[1], C[2]);
00503   UpdateEllipsoid(EIndex, cov, Center, Color, dConfidenceRegionScale);
00504 }
00505
00506 void ThreeDOut::RemovePoint(const unsigned int& PointIndex)
00507 {
00508   ASSERT_MAP_ELEMENT(mapPoints_, PointIndex);
00509   // uncontrolled erase leads to crash in case of non existing PointIndex:
00510   mapPoints_.erase(mapPoints_.find(PointIndex));
00511 }
00512
00513 void ThreeDOut::RemoveAllPoints()
00514 {
00515   mapPoints_.clear();
00516 }
00517
00518 void ThreeDOut::RemoveLine(const unsigned int& LineIndex)
00519 {
00520   ASSERT_MAP_ELEMENT(mapLines_, LineIndex);
00521   // uncontrolled erase leads to crash in case of non existing PointIndex:
00522   mapLines_.erase(mapLines_.find(LineIndex));
00523 }
00524
00525 void ThreeDOut::RemoveAllLines()
00526 {
00527   mapLines_.clear();
00528 }
00529
00530 void ThreeDOut::RemoveEllipsoid(const unsigned int& EIndex)
00531 {
00532   ASSERT_MAP_ELEMENT(mapEllipsoids_, EIndex);
00533   // uncontrolled erase leads to crash in case of non existing PointIndex:
00534   mapEllipsoids_.erase(mapEllipsoids_.find(EIndex));
00535 }
00536
00537 void ThreeDOut::RemoveAllEllipsoids() {
00538   mapEllipsoids_.clear();
00539 }
00540
00541 void ThreeDOut::RemoveImage(const unsigned int& EIndex)
00542 {
00543   ASSERT_MAP_ELEMENT(mapImages_, EIndex);
00544   // uncontrolled erase leads to crash in case of non existing PointIndex:
00545   mapImages_.erase(mapImages_.find(EIndex));
00546 }
00547
00548 void ThreeDOut::RemoveAllImages()
00549 {
00550   mapImages_.clear();
00551 }
00552
00553 void ThreeDOut::RemoveAllPMatrices()
00554 {
00555   mapPMatrices_.clear();
00556 }
00557
00558 void ThreeDOut::RemovePMatrix(int index)
00559 {
00560   map<unsigned int, PMatrix3DData>::iterator it = mapPMatrices_.find(index);
00561   if (it!=mapPMatrices_.end()) {
00562     mapPMatrices_.erase(it);
00563   } else {
00564     BIASERR("Tried to erase non-existing pmatrix:"<<index);
00565   }
00566 }
00567
00568 // ---------------------------- OPENGL functions ----------------------------
00569 #ifdef BIAS_HAVE_OPENGL
00570
00571 void ThreeDOut::OpenGLOutPoints(const BIAS::RGBAuc &Color)
00572 {
00573   glColor4ubv(Color.GetData());
00574   glPointSize((float)Params_.PointSize);
00575   map<unsigned int, Point3DData>::iterator it;
00576   switch (Params_.PointStyle) {
00577   case Point:
00578     glBegin(GL_POINTS);
00579     for (it=mapPoints_.begin(); it!=mapPoints_.end(); it++){
00580       glVertex3dv(it->second.Point.GetData());
00581     }
00582     glEnd();
00583     break;
00584   case PointSprite:
00585     BIASERR("PointSprites not yet implemented");
00586     break;
00587   case Sphere:
00588     BIASERR("Sphere not yet implemented");
00589     break;
00590   case Box:
00591     BIASERR("Points as Box not yet implemented");
00592     break;
00593   }
00594 }
00595
00596 void ThreeDOut::OpenGLOutPoints(){
00597   map<unsigned int, Point3DData>::iterator it;
00598   glPointSize((float)Params_.PointSize);
00599   switch (Params_.PointStyle) {
00600   case Point:
00601     glBegin(GL_POINTS);
00602     for (it=mapPoints_.begin(); it!=mapPoints_.end(); it++){
00603       glColor4ubv(it->second.Color.GetData());
00604       glVertex3dv(it->second.Point.GetData());
00605     }
00606     glEnd();
00607     break;
00608   case PointSprite:
00609     BIASERR("PointSprites not yet implemented");
00610     break;
00611   case Sphere:
00612     BIASERR("Sphere not yet implemented");
00613     break;
00614   case Box:
00615     BIASERR("Points as Box not yet implemented");
00616     break;
00617   }
00618 }
00619
00620 void ThreeDOut::OpenGLOutPMatrices_(const BIAS::RGBAuc &Color, bool UseOneColor)
00621 {
00622   StatekeeperGL state;
00623
00624   unsigned int index=0;
00625
00626   BIAS::RGBAuc col;
00627   switch (Params_.CameraStyle){
00628   case PyramidMesh:
00629     {
00630       GLenum cap = GL_LINE_LOOP;
00631
00632       glDisable(GL_TEXTURE_2D);
00633       if (UseOneColor)
00634         glColor4ubv(Color.GetData());
00635
00636       map<unsigned int, PMatrix3DData>::iterator itP;
00637       for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
00638         const PMatrix3DData *it = &(itP->second);
00639
00640         glPushMatrix();
00641         glTranslated(it->C[0], it->C[1], it->C[2]);
00642         glScaled(Params_.CameraScale, Params_.CameraScale, Params_.CameraScale);
00643         glTranslated(-it->C[0], -it->C[1], -it->C[2]);
00644
00645         glPushName(BIAS_SELECTION_OFFSET_PMATRIX +index);
00646         {
00647           if (!UseOneColor)
00648             glColor4ubv(it->Color.GetData());
00649           glBegin( cap );
00650           glVertex3dv(it->C.GetData());
00651           glVertex3dv(it->UR.GetData());
00652           glVertex3dv(it->UL.GetData());
00653           glEnd();
00654
00655           glBegin( cap );
00656           glVertex3dv(it->C.GetData());
00657           glVertex3dv(it->LR.GetData());
00658           glVertex3dv(it->UR.GetData());
00659           glEnd();
00660
00661           glBegin( cap );
00662           glVertex3dv(it->C.GetData());
00663           glVertex3dv(it->LL.GetData());
00664           glVertex3dv(it->LR.GetData());
00665           glEnd();
00666
00667           glBegin( cap );
00668           glVertex3dv(it->C.GetData());
00669           glVertex3dv(it->UL.GetData());
00670           glVertex3dv(it->LL.GetData());
00671           glEnd();
00672         }
00673         glPopName();
00674         glPopMatrix();
00675         index++;
00676       }
00677     }
00678     break;
00679   case PyramidSolid:
00680     {
00681       float mat_diffuse[] =  {Color[0]*0.7f, Color[1]*0.7f, Color[2]*0.7f, 1.0f};
00682       float mat_ambient[] =  {Color[0]*0.1f, Color[1]*0.1f, Color[2]*0.1f, 1.0f};
00683       float mat_shininess[] =  {8.0 };
00684       Vector3<double> normal;
00685
00686       const GLenum cap = GL_POLYGON;
00687       glShadeModel(GL_FLAT);
00688       glFrontFace(GL_CW);
00689       glCullFace(GL_BACK);
00690       glEnable(GL_CULL_FACE);
00691       glEnable(GL_NORMALIZE);
00692       glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS,mat_shininess);
00693
00694       map<unsigned int, PMatrix3DData>::iterator itP;
00695       for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
00696         const PMatrix3DData *it = &(itP->second);
00697
00698         if (UseOneColor) col = Color;
00699         else col = it->Color;
00700
00701         glPushMatrix();
00702         glTranslated(it->C[0], it->C[1], it->C[2]);
00703         glScaled(Params_.CameraScale, Params_.CameraScale, Params_.CameraScale);
00704         glTranslated(-it->C[0], -it->C[1], -it->C[2]);
00705
00706         glPushName(BIAS_SELECTION_OFFSET_PMATRIX +index);
00707         {
00708           glColor4ubv(&col[0]);
00709           mat_diffuse[0] = col[0]/255.0f*0.9f;
00710           mat_diffuse[1] = col[1]/255.0f*0.9f;
00711           mat_diffuse[2] = col[2]/255.0f*0.9f;
00712           mat_diffuse[3] = 1.0f;
00713
00714           mat_ambient[0] = col[0]/255.0f*0.2f;
00715           mat_ambient[1] = col[1]/255.0f*0.2f;
00716           mat_ambient[2] = col[2]/255.0f*0.2f;
00717           mat_ambient[3] = 1.0f;
00718
00719           glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
00720           glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);
00721
00722           glBegin( cap );
00723           (it->C - it->UL).CrossProduct(it->C - it->UR, normal);
00724           glNormal3f((float)normal[0], (float)normal[1], (float)normal[2]);
00725           glVertex3dv(it->C.GetData());
00726           glVertex3dv(it->UL.GetData());
00727           glVertex3dv(it->UR.GetData());
00728           glEnd();
00729
00730           glBegin( cap );
00731           (it->C - it->UR).CrossProduct(it->C - it->LR, normal);
00732           glNormal3f(-(float)normal[0], -(float)normal[1], -(float)normal[2]);
00733           glVertex3dv(it->C.GetData());
00734           glVertex3dv(it->UR.GetData());
00735           glVertex3dv(it->LR.GetData());
00736           glEnd();
00737
00738           glBegin( cap );
00739           (it->C - it->LR).CrossProduct(it->C - it->LL, normal);
00740           glNormal3f(-(float)normal[0], -(float)normal[1], -(float)normal[2]);
00741           glVertex3dv(it->C.GetData());
00742           glVertex3dv(it->LR.GetData());
00743           glVertex3dv(it->LL.GetData());
00744           glEnd();
00745
00746           glBegin( cap );
00747           (it->C - it->LL).CrossProduct(it->C - it->UL, normal);
00748           glNormal3f((float)normal[0], (float)normal[1], (float)normal[2]);
00749           glVertex3dv(it->C.GetData());
00750           glVertex3dv(it->LL.GetData());
00751           glVertex3dv(it->UL.GetData());
00752           glEnd();
00753
00754           // camera plane
00755           glBegin( cap );
00756           (it->C - it->LR).CrossProduct(it->C - it->UR, normal);
00757           glNormal3f((float)normal[0], (float)normal[1], (float)normal[2]);
00758           glVertex3dv(it->UL.GetData());
00759           glVertex3dv(it->LR.GetData());
00760           glVertex3dv(it->UR.GetData());
00761           glVertex3dv(it->UL.GetData());
00762           glVertex3dv(it->LL.GetData());
00763           glVertex3dv(it->LR.GetData());
00764           glEnd();
00765         }
00766         glPopName();
00767         glPopMatrix();
00768         index++;
00769       }
00770     }
00771     break;
00772   case Arrow:
00773     {
00774       map<unsigned int, PMatrix3DData>::iterator itP;
00775       for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
00776         const PMatrix3DData *it = &(itP->second);
00777
00778         glPushMatrix();
00779         glTranslated(it->C[0], it->C[1], it->C[2]);
00780         glScaled(Params_.CameraScale, Params_.CameraScale, Params_.CameraScale);
00781         glTranslated(-it->C[0], -it->C[1], -it->C[2]);
00782
00783         glPushName(BIAS_SELECTION_OFFSET_PMATRIX +index);
00784         {
00785           glColor4ubv(it->Color.GetData());
00786           glBegin(GL_POINTS);
00787           glVertex3dv(it->C.GetData());
00788           glEnd();
00789           glColor3f(1.0,1.0,0.0);
00790           glBegin(GL_LINES);
00791           glVertex3dv(it->C.GetData() );
00792           glVertex3dv(it->PP.GetData());
00793           glVertex3dv(it->C.GetData() );
00794           glVertex3dv( ((it->Up) +(it->C)).GetData() );
00795           glEnd();
00796         }
00797         glPopName();
00798         glPopMatrix();
00799         index++;
00800       }
00801     }
00802     break;
00803   default:
00804     BIASERR("unknown camera drawing style "<<Params_.CameraStyle);
00805     break;
00806   }
00807 }
00808
00809 void ThreeDOut::OpenGLOutPMatrices(const BIAS::RGBAuc &Color){
00810   OpenGLOutPMatrices_(Color, true);
00811 }
00812
00813 void ThreeDOut::OpenGLOutPMatrices()
00814 {
00815   BIAS::RGBAuc Color;
00816   OpenGLOutPMatrices_(Color, false);
00817 }
00818
00819 void ThreeDOut::OpenGLOutImages(const bool & disableBlending)
00820 {
00821   map<unsigned int, Image3DData>::iterator it=mapImages_.begin();
00822   // nothing to do ?
00823   if (it==mapImages_.end()) return;
00824
00825   StatekeeperGL state(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_CURRENT_BIT );
00826
00827   const GLenum  cap = GL_QUADS;
00828
00829   GLuint texid;
00830   glGenTextures( 1, &texid ) ;
00831   glBindTexture( GL_TEXTURE_2D, texid) ;
00832   glEnable(GL_TEXTURE_2D);
00833
00834   /// \todo image interface (rgb<=>grey)
00835   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
00836   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
00837   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
00838   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
00839
00840
00841   GLenum GLColorModel =
00842     (it->second.ImageData.GetChannelCount()==3)? GL_RGB : GL_LUMINANCE;
00843
00844   // assuming all images of same size
00845   // use roi to determine factor
00846   double factorx(1.0), factory(1.0);
00847   if (it!=mapImages_.end()) {
00848     unsigned int x1,x2,y1,y2;
00849     it->second.ImageData.GetROI()->GetCorners(x1,y1,x2,y2);
00850     factorx = (double)x2/(double)it->second.ImageData.GetWidth();
00851     factory = (double)y2/(double)it->second.ImageData.GetHeight();
00852   }
00853   for (it=mapImages_.begin(); it!=mapImages_.end(); it++){
00854     /// \todo It is very inefficient to recreate image on each call (jw)
00855     glTexImage2D(GL_TEXTURE_2D, 0,GLColorModel,
00856       it->second.ImageData.GetWidth(),
00857       it->second.ImageData.GetHeight(), 0, GLColorModel,
00858       GL_UNSIGNED_BYTE,
00859       (GLvoid *) it->second.ImageData.GetImageData());
00860
00861     // no transparency?
00862     if (disableBlending)
00863       glDisable(GL_BLEND);
00864
00865     glEnable(GL_TEXTURE_2D);
00866     glBindTexture( GL_TEXTURE_2D, texid ) ;
00867     glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
00868     glDisable(GL_TEXTURE_GEN_S);
00869     glDisable(GL_TEXTURE_GEN_T);
00870
00871     glMatrixMode(GL_MODELVIEW);
00872     glPushMatrix();
00873     {
00874
00875       glBegin(cap);
00876       glVertex3dv(it->second.UL.GetData());
00877       glTexCoord2d(0.0,0.0);
00878       glVertex3dv(it->second.LL.GetData());
00879       glTexCoord2d(factorx,0.0);
00880       glVertex3dv(it->second.LR.GetData());
00881       glTexCoord2d(factorx,factory);
00882       glVertex3dv(it->second.UR.GetData());
00883       glTexCoord2d(0.0,factory);
00884       glEnd();
00885
00886     }
00887     glPopMatrix();
00888   }
00889   glDeleteTextures(1, &texid);
00890 }
00891
00892
00893 void ThreeDOut::OpenGLOutLines(const BIAS::RGBAuc &Color){
00894   StatekeeperGL state(GL_ENABLE_BIT);
00895
00896   const GLenum cap = GL_LINE_LOOP;
00897   glDisable(GL_TEXTURE_2D);
00898   glColor4ubv(Color.GetData()); // same color for alls
00899   map<unsigned int, Line3DData>::iterator it;
00900   for (it=mapLines_.begin(); it!=mapLines_.end(); it++){
00901     glBegin( cap );
00902     glVertex3dv(it->second.Start.GetData());
00903     glVertex3dv(it->second.End.GetData());
00904     glEnd();
00905   }
00906 }
00907
00908 void ThreeDOut::OpenGLOutLines(){
00909   StatekeeperGL state(GL_ENABLE_BIT);
00910
00911   const GLenum cap = GL_LINE_LOOP;
00912   glDisable(GL_TEXTURE_2D);
00913   map<unsigned int, Line3DData>::iterator it;
00914   for (it=mapLines_.begin(); it!=mapLines_.end(); it++){
00915     // a different colro for each
00916     glColor4ubv(it->second.Color.GetData());
00917
00918     glBegin( cap );
00919     glVertex3dv(it->second.Start.GetData());
00920     glVertex3dv(it->second.End.GetData());
00921     glEnd();
00922   }
00923 }
00924
00925
00926 void ThreeDOut::OpenGLOutEllipsoids(const BIAS::RGBAuc & /*Color*/){
00927   BIASERR("Not implemented with const color");
00928 }
00929
00930
00931 void ThreeDOut::OpenGLOutEllipsoids(){
00932   GLUquadric *myQuad;
00933   myQuad = gluNewQuadric();
00934   map<unsigned int, Ellipsoid3DData>::iterator it;
00935   for (it=mapEllipsoids_.begin(); it!=mapEllipsoids_.end(); it++){
00936     glPushMatrix();
00937     // move to right location
00938     glTranslated(it->second.C[0], it->second.C[1], it->second.C[2]);
00939     glRotated(it->second.dAngle * DEGREE_PER_RAD, // gl wants degree
00940       it->second.RotAxis[0], it->second.RotAxis[1],
00941       it->second.RotAxis[2]);
00942     glScaled(it->second.s0, it->second.s1, it->second.s2);
00943     // gl wants opacity not transparency
00944     glColor4ubv(it->second.Color.GetData());
00945     gluSphere(myQuad, 1, 20, 20);
00946     glPopMatrix();
00947   }
00948   gluDeleteQuadric(myQuad);
00949 }
00950
00951
00952 void ThreeDOut::OpenGLOut(const BIAS::RGBAuc &Color){
00953   // no color arg:
00954   OpenGLOutImages();
00955   // override color:
00956   OpenGLOutPMatrices(Color);
00957   OpenGLOutPoints(Color);
00958   OpenGLOutLines(Color);
00959   OpenGLOutEllipsoids(Color);
00960 }
00961
00962
00963 void ThreeDOut::OpenGLOut(){
00964   OpenGLOutImages();
00965   OpenGLOutPMatrices();
00966   OpenGLOutPoints();
00967   OpenGLOutLines();
00968   OpenGLOutEllipsoids();
00969 }
00970 #endif // BIAS_HAVE_OPENGL
00971
00972
00973 // --------------------------- VRML functions ---------------------------
00974
00975 int ThreeDOut::VRMLOutPoints(ostream& VRMLFile, const BIAS::RGBAuc &Color){
00976   if (mapPoints_.size()==0) return 0;
00977   map<unsigned int, Point3DData>::iterator it = mapPoints_.begin();
00978   while (it!=mapPoints_.end()) {
00979     // this not really correct because it changes the color of the
00980     // points and does not only change their visualization
00981     it->second.Color = Color;
00982     it++;
00983   }
00984   return VRMLOutPoints(VRMLFile);
00985 }
00986
00987 int ThreeDOut::VRMLOutPointsAsPointSet_(ostream &VRMLFile)
00988 {
00989
00990   VRMLFile<<
00991     "Shape { "<<endl<<
00992     "  geometry PointSet {"<<endl<<
00993     "    color Color {"<<endl<<
00994     "      color ["<<endl;
00995
00996   double r,g,b;
00997   map<unsigned int, Point3DData>::iterator it = mapPoints_.begin();
00998   while (it!=mapPoints_.end()) {
00999     Point3DData &Da = it->second;
01000     r = (double)Da.Color[0] / 255.0;
01001     g = (double)Da.Color[1] / 255.0;
01002     b = (double)Da.Color[2] / 255.0;
01003     if (it!=mapPoints_.begin()) // add a "," behind last line
01004       VRMLFile<<","<<endl;
01005     VRMLFile <<
01006       "      "<< r << " " << g  << " " << b;
01007     it++;
01008   }
01009
01010   VRMLFile<<endl<<
01011     "      ]"<<endl<<
01012     "    }"<<endl<<
01013     "    coord Coordinate {"<<endl<<
01014     "      point ["<<endl;
01015
01016   streamsize w=8;
01017   it=mapPoints_.begin();
01018   while (it!=mapPoints_.end()) {
01019     Point3DData &Db = it->second;
01020     if (it!=mapPoints_.begin()) // add a "," behind last line
01021       VRMLFile<<","<<endl;
01022     VRMLFile<<
01023       "      "
01024       << setw(w) << Db.Point[0] << " "
01025       << setw(w) << Db.Point[1] << " "
01026       << setw(w) << Db.Point[2];
01027     it++;
01028   }
01029
01030   VRMLFile << endl<<
01031     "      ]" << endl<<
01032     "    }" << endl<<
01033     "  }" << endl<<
01034     "}" << endl;
01035
01036   return 0;
01037 }
01038
01039
01040
01041 int ThreeDOut::VRMLOutPointsAsBoxes_(ostream &VRMLFile)
01042 {
01043   VRMLFile<<
01044     "Shape { "<<endl<<
01045     "  geometry IndexedFaceSet {"<<endl<<
01046     "    color Color {"<<endl<<
01047     "      color ["<<endl;
01048
01049   double r,g,b;
01050   map<unsigned int, Point3DData>::iterator it = mapPoints_.begin();
01051   while (it!=mapPoints_.end()) {
01052     Point3DData &Da = it->second;
01053     r = (double)Da.Color[0] / 255.0;
01054     g = (double)Da.Color[1] / 255.0;
01055     b = (double)Da.Color[2] / 255.0;
01056     if (it!=mapPoints_.begin()) // add a "," behind last line
01057       VRMLFile<<","<<endl;
01058     for (unsigned int i=0;i<7;i++)
01059       VRMLFile <<
01060       "      "<< r << " " << g  << " " << b<<","<<endl;
01061     VRMLFile <<
01062       "      "<< r << " " << g  << " " << b;
01063     it++;
01064   }
01065
01066   VRMLFile<<endl<<
01067     "      ]"<<endl<<
01068     "    }"<<endl<<
01069     "    coord Coordinate {"<<endl<<
01070     "      point ["<<endl;
01071
01072
01073   float size = float(Params_.PointSize / 2.0);
01074   streamsize w=8;
01075   it=mapPoints_.begin();
01076   while (it!=mapPoints_.end()) {
01077     Point3DData &Db = it->second;
01078     if (it!=mapPoints_.begin()) // add a "," behind last line
01079       VRMLFile<<","<<endl<<endl;
01080     // top four points
01081     VRMLFile<<
01082       "      "
01083       << setw(w) << Db.Point[0]-size << " "
01084       << setw(w) << Db.Point[1]+size << " "
01085       << setw(w) << Db.Point[2]-size;
01086     VRMLFile<< ","<<endl;
01087     VRMLFile<<
01088       "      "
01089       << setw(w) << Db.Point[0]+size << " "
01090       << setw(w) << Db.Point[1]+size << " "
01091       << setw(w) << Db.Point[2]-size;
01092     VRMLFile<< ","<<endl;
01093     VRMLFile<<
01094       "      "
01095       << setw(w) << Db.Point[0]+size << " "
01096       << setw(w) << Db.Point[1]+size << " "
01097       << setw(w) << Db.Point[2]+size;
01098     VRMLFile<< ","<<endl;
01099     VRMLFile<<
01100       "      "
01101       << setw(w) << Db.Point[0]-size << " "
01102       << setw(w) << Db.Point[1]+size << " "
01103       << setw(w) << Db.Point[2]+size;
01104     VRMLFile<< ","<<endl;
01105     // bottom four points
01106     VRMLFile<<
01107       "      "
01108       << setw(w) << Db.Point[0]-size << " "
01109       << setw(w) << Db.Point[1]-size << " "
01110       << setw(w) << Db.Point[2]-size;
01111     VRMLFile<< ","<<endl;
01112     VRMLFile<<
01113       "      "
01114       << setw(w) << Db.Point[0]+size << " "
01115       << setw(w) << Db.Point[1]-size << " "
01116       << setw(w) << Db.Point[2]-size;
01117     VRMLFile<< ","<<endl;
01118     VRMLFile<<
01119       "      "
01120       << setw(w) << Db.Point[0]+size << " "
01121       << setw(w) << Db.Point[1]-size << " "
01122       << setw(w) << Db.Point[2]+size;
01123     VRMLFile<< ","<<endl;
01124     VRMLFile<<
01125       "      "
01126       << setw(w) << Db.Point[0]-size << " "
01127       << setw(w) << Db.Point[1]-size << " "
01128       << setw(w) << Db.Point[2]+size;
01129     it++;
01130   }
01131
01132   VRMLFile << endl<<
01133     "      ]" << endl<<
01134     "    }" << endl<< // end of Coordinate
01135     "    coordIndex ["<<endl;
01136   for (unsigned int i=0;i<mapPoints_.size();i++) {
01137     if (i!=0)
01138       VRMLFile<<","<<endl<<endl;
01139     VRMLFile<<"          "<<
01140       i*8+0<<", "<<i*8+1<<", "<<i*8+2<<", "<<i*8+3<<", -1,"<<
01141       " # top side"<<endl<<"          "<<
01142       i*8+7<<", "<<i*8+6<<", "<<i*8+5<<", "<<i*8+4<<", -1,"<<
01143       " # bottom side"<<endl<<"          "<<
01144       i*8+4<<", "<<i*8+5<<", "<<i*8+1<<", "<<i*8+0<<", -1,"<<
01145       " # back side"<<endl<<"          "<<
01146       i*8+3<<", "<<i*8+2<<", "<<i*8+6<<", "<<i*8+7<<", -1,"<<
01147       " # front side"<<endl<<"          "<<
01148       i*8+0<<", "<<i*8+3<<", "<<i*8+7<<", "<<i*8+4<<", -1,"<<
01149       " # left side"<<endl<<"          "<<
01150       i*8+2<<", "<<i*8+1<<", "<<i*8+5<<", "<<i*8+6<<", -1";
01151   }
01152
01153   VRMLFile<<endl<<
01154     "     ]"<<endl<<
01155     "     ccw FALSE"<<endl<<
01156     "     colorPerVertex TRUE"<<endl<<
01157     "  }" << endl<<
01158     "}" << endl;
01159
01160   return 0;
01161 }
01162
01163 int ThreeDOut::VRMLOutPoints(ostream& VRMLFile){
01164   if (mapPoints_.size()==0) return 0;
01165   int res=0;
01166   switch (Params_.PointStyle) {
01167   case Point:
01168     res=VRMLOutPointsAsPointSet_(VRMLFile);
01169     break;
01170   case PointSprite:
01171     BIASERR("PointSprites not yet implemented");
01172     break;
01173   case Sphere:
01174     res = VRMLOutPointsAsSpheres_(VRMLFile);
01175     break;
01176   case Box:
01177     res = VRMLOutPointsAsBoxes_(VRMLFile);
01178     break;
01179   }
01180   return res;
01181 }
01182
01183 int ThreeDOut::VRMLOutPMatrices(ostream& VRMLFile, const BIAS::RGBAuc &Color)
01184 {
01185   switch (Params_.CameraStyle) {
01186   case Arrow: return VRMLOutPMatricesAsArrows_(VRMLFile, Color);
01187   case PyramidMesh: return VRMLOutPMatricesAsMesh_(VRMLFile, Color);
01188   default:BIASERR("Not yet implmented");
01189   }
01190   return -1;
01191
01192 }
01193
01194 int ThreeDOut::VRMLOutPMatricesAsMesh_(ostream& VRMLFile,
01195                                        const BIAS::RGBAuc &Color)
01196 {
01197   double r = 0;
01198   double g = 0;
01199   double b = 0;
01200   // VRML transparency=0 is opaque
01201   double transparency = 0;
01202
01203   map<unsigned int, PMatrix3DData>::iterator itP;
01204   r =  (double)Color[0] / 255.0;
01205   g =  (double)Color[1] / 255.0;
01206   b =  (double)Color[2] / 255.0;
01207   transparency = VRMLtransparency(Color);
01208   unsigned int num=0;
01209   // create vrml model of camera
01210   VRMLFile << "Shape {" << endl;
01211   // write camera center and 4 points in the image plane
01212   VRMLFile <<"  geometry IndexedLineSet {" << endl;
01213   VRMLFile <<"    coord Coordinate {"      << endl;
01214   VRMLFile <<"      point [ "              << endl;
01215   for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
01216     const PMatrix3DData *it = &(itP->second);
01217     VRMLFile
01218       <<"        "<<it->C[0]<<" "<<it->C[1]<<" "<<it->C[2]<< " , "<< endl
01219       <<"        "<<it->UL[0]<<" "<<it->UL[1]<<" "<<it->UL[2] <<" , " <<endl
01220       <<"        "<<it->UR[0]<<" "<<it->UR[1]<<" " <<it->UR[2]<<" , " << endl
01221       <<"        "<<it->LR[0]<<" "<<it->LR[1]<<" " <<it->LR[2]<<" , " << endl
01222       <<"        "<<it->LL[0]<<" "<<it->LL[1]<<" " <<it->LL[2]<<" , " << endl;
01223     num++;
01224   }
01225   VRMLFile<<" ] " << endl;
01226   VRMLFile <<"    }" << std::endl;
01227   VRMLFile << "    coordIndex [" << endl;
01228   for (unsigned int i=0;i<num; i++) {
01229     unsigned n=i*5;
01230     VRMLFile <<"      "<<n<<", "<<n+2<<", "<<n+1<<", -1" <<endl;
01231     VRMLFile <<"      "<<n<<", "<<n+1<<", "<<n+4<<", -1" <<endl;
01232     VRMLFile <<"      "<<n<<", "<<n+4<<", "<<n+3<<", -1" <<endl;
01233     VRMLFile <<"      "<<n<<", "<<n+3<<", "<<n+2<<", -1" <<endl;
01234   }
01235   VRMLFile << "       ] " << endl;
01236   VRMLFile << "  }" << endl;    // terminates IndexedLineSet
01237   // set color of lines
01238   VRMLFile << "  appearance Appearance { " << endl;
01239   VRMLFile << "    material Material {"<<endl
01240     << "      diffuseColor  " << " "<<r<<" "<<g<<" "<<b<<endl
01241     << "      emissiveColor " << " "<<r<<" "<<g<<" "<<b<<endl
01242     <<"     }"<< endl;   // terminates material
01243   VRMLFile << "  }"   << endl;  // terminates appearance
01244   VRMLFile << "}" << endl;      // terminates shape
01245   return 0;
01246 }
01247
01248 int ThreeDOut::VRMLOutPMatricesAsArrows_(ostream& VRMLFile, const BIAS::RGBAuc &Color){
01249   double r = 0;
01250   double g = 0;
01251   double b = 0;
01252   double transparency = 0;
01253   map<unsigned int, PMatrix3DData>::iterator itP;
01254   r =  (double)Color[0] / 255.0;
01255   g =  (double)Color[1] / 255.0;
01256   b =  (double)Color[2] / 255.0;
01257   transparency = VRMLtransparency(Color);
01258   unsigned int num=0;
01259   // first: one switch-case to write entry
01260   VRMLFile << "Shape {" << endl;
01261   VRMLFile << "   geometry IndexedLineSet {" << endl;
01262   VRMLFile << "      coord Coordinate {" << endl;
01263   VRMLFile << "         point [" << endl;
01264   Vector3<double> up;
01265   // then: for-loop with switch-case to write cams efficient
01266   for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
01267     const PMatrix3DData *it = &(itP->second);
01268     // write the line
01269     up = it->C + it->Up;
01270     VRMLFile
01271       << "      " <<up[0]<<" "<<up[1]<<" "<<up[2] <<", "<<endl
01272       << "   " <<it->C[0]<<" "<<it->C[1]<<" "<<it->C[2]<<","<<endl
01273       << "      " <<it->PP[0]<<" "<<it->PP[1]<<" "<<it->PP[2] <<", "<<endl;
01274     num++;
01275   }
01276   VRMLFile<< "               ]" << endl;
01277   VRMLFile << "      }"<<endl;
01278   VRMLFile << "   coordIndex [ "<<endl;
01279   for (unsigned int i=0;i<num; i++)
01280     VRMLFile <<"      "<<i*3<<"  "<<i*3+1<<"  "<<i*3+2<<"  -1"<<endl;
01281   VRMLFile <<" ]"<< endl;
01282   VRMLFile << "   color Color {"<<endl;
01283   VRMLFile << "        color [ "<<endl;
01284   for (unsigned int i=0;i<num; i++)
01285     VRMLFile <<r<<" "<<g<<" "<<b<<", "  <<r<<" "<<g<<" "<<b<<" ,"<<endl;
01286   VRMLFile << " ] "<<endl;
01287   VRMLFile << "   }\n}\n}"<< endl;
01288   return 0;
01289 }
01290
01291
01292
01293
01294
01295 int ThreeDOut::VRMLOutPMatrices(ostream& VRMLFile){
01296   double r = 0;
01297   double g = 0;
01298   double b = 0;
01299   double transparency = 0;
01300   bool CenterAsSphere = true;
01301   map<unsigned int, PMatrix3DData>::iterator itP;
01302   for (itP=mapPMatrices_.begin(); itP!=mapPMatrices_.end(); itP++){
01303     const PMatrix3DData *it = &(itP->second);
01304     switch (Params_.CameraStyle) {
01305     case PyramidSolid:
01306       r =  (double)it->Color[0] / 255.0;
01307       g =  (double)it->Color[1] / 255.0;
01308       b =  (double)it->Color[2] / 255.0;
01309       transparency =  VRMLtransparency(it->Color);
01310
01311       // create vrml model of camera
01312       VRMLFile << std::endl;
01313       //       if (it->name.length()>0)
01314       //    VRMLFile <<"  DEF "<< it->name;
01315       VRMLFile << "  Shape {" << std::endl;
01316
01317       // write camera center and 4 points in the image plane
01318       if (it->name.length()>0)
01319         VRMLFile <<"         geometry DEF "<<it->name;
01320       else
01321         VRMLFile <<"         geometry";
01322       VRMLFile <<" IndexedFaceSet {" << std::endl;
01323       VRMLFile <<"            coord Coordinate {" << std::endl;
01324       VRMLFile <<"              point [ " << std::endl;
01325       VRMLFile <<"                       "<<it->C[0]<<" "<<it->C[1]<<" "
01326         <<it->C[2]<< " , " << std::endl;
01327       VRMLFile <<"                       "<<it->UL[0]<<" "<<it->UL[1]
01328       <<" "<<it->UL[2] <<" , " <<std:: endl;
01329       VRMLFile <<"                       "<<it->UR[0]<<" "<<it->UR[1]<<" "
01330         <<it->UR[2]<<" , " <<  std::endl;
01331       VRMLFile <<"                       "<<it->LR[0]<<" "<<it->LR[1]<<" "
01332         <<it->LR[2]<<" , " <<  std::endl;
01333       VRMLFile <<"                       "<<it->LL[0]<<" "<<it->LL[1]<<" "
01334         <<it->LL[2]  <<" ] " <<  std::endl;
01335
01336       VRMLFile <<"            }" << std::endl;
01337
01338       //  write triangulation for topology
01339       VRMLFile << "              coordIndex [" << endl;
01340       VRMLFile << "                           0, 2, 1, -1, " << std::endl;
01341       VRMLFile << "                           0, 1, 4, -1, " << std::endl;
01342       VRMLFile << "                           0, 4, 3, -1, " << std::endl;
01343       VRMLFile << "                           0, 3, 2, -1, " << std::endl;
01344       VRMLFile << "                           1, 2, 4, -1, " << std::endl;
01345       VRMLFile << "                           4, 2, 3, -1 ]" << std::endl;
01346
01347       VRMLFile << "  }" << std::endl << std::endl; // terminates IndexedFaceSet
01348
01349       VRMLFile << "         appearance Appearance { " << endl;
01350
01351       VRMLFile << "              material Material { diffuseColor  "
01352                << " "<<r<<" "<<g<<" "<<b<< std::endl //terminates material
01353                << " transparency  "<< transparency
01354                <<"}"<<std::endl;
01355       VRMLFile << "} "   << std::endl;  // terminates appearance
01356       VRMLFile << "   }" << std::endl;  // terminates shape
01357
01358       break;
01359     case PyramidMeshWithArrow:
01360     case PyramidMesh:
01361       r =  (double)it->Color[0] / 255.0;
01362       g =  (double)it->Color[1] / 255.0;
01363       b =  (double)it->Color[2] / 255.0;
01364
01365       // create vrml model of camera
01366       VRMLFile << endl;
01367       VRMLFile << "Shape {" << endl;
01368
01369       // write camera center and 4 points in the image plane
01370       VRMLFile <<"  geometry IndexedLineSet {" << endl;
01371       VRMLFile <<"    coord Coordinate {"      << endl;
01372       VRMLFile <<"      point [ "              << endl;
01373       VRMLFile <<"        "<<it->C[0]<<" "<<it->C[1]<<" "
01374         <<it->C[2]<< " , " << endl;
01375       VRMLFile <<"        "<<it->UL[0]<<" "<<it->UL[1]
01376       <<" "<<it->UL[2] <<" , " <<std:: endl;
01377       VRMLFile <<"        "<<it->UR[0]<<" "<<it->UR[1]<<" "
01378         <<it->UR[2]<<" , " << endl;
01379       VRMLFile <<"        "<<it->LR[0]<<" "<<it->LR[1]<<" "
01380         <<it->LR[2]<<" , " << endl;
01381       VRMLFile <<"        "<<it->LL[0]<<" "<<it->LL[1]<<" "
01382         <<it->LL[2]  <<" ] " << endl;
01383       VRMLFile <<"    }" << std::endl;
01384
01385       // conect the points with lines
01386       VRMLFile << "    coordIndex [" << endl;
01387       VRMLFile << "      0, 2, 1, -1, " << endl;
01388       VRMLFile << "      0, 1, 4, -1, " << endl;
01389       VRMLFile << "      0, 4, 3, -1, " << endl;
01390       VRMLFile << "      0, 3, 2, -1] " << endl;
01391       VRMLFile << "  }" << endl;    // terminates IndexedLineSet
01392
01393       // set color of lines
01394       VRMLFile << "  appearance Appearance { " << endl;
01395       VRMLFile << "    material Material {"<<endl
01396         << "      diffuseColor  " << " "<<r<<" "<<g<<" "<<b<<endl
01397         << "      emissiveColor " << " "<<r<<" "<<g<<" "<<b<<endl
01398         <<"     }"<< endl;   // terminates material
01399       VRMLFile << "  }"   << endl;  // terminates appearance
01400       VRMLFile << "}" << endl;      // terminates shape
01401       if (Params_.CameraStyle!=PyramidMeshWithArrow) break;
01402     case Arrow:
01403       r =  (double)it->Color[0] / 255.0;
01404       g =  (double)it->Color[1] / 255.0;
01405       b =  (double)it->Color[2] / 255.0;
01406
01407       if (CenterAsSphere) {
01408         VRMLFile << "Transform {"<<endl;
01409         VRMLFile << "  translation "
01410           << it->C[0] << " " <<it->C[1] << " " <<it->C[2]
01411           << endl;
01412           VRMLFile << "  children ";
01413           VRMLFile <<"   Shape {"<<endl;
01414           VRMLFile << "    appearance Appearance { " << endl;
01415           VRMLFile << "     material Material { " << endl;
01416           VRMLFile << "       transparency      "
01417             << VRMLtransparency(it->Color) <<endl;
01418           VRMLFile << "       diffuseColor " << r << " " << g << " "<<b << endl;
01419           VRMLFile << "     }" << endl; // close Material
01420           VRMLFile << "    }" << endl; // close Appearance
01421           VRMLFile << "    geometry Sphere  { radius "
01422             << 0.1*(it->C-it->PP).NormL2()<<" }"
01423             << endl;
01424           VRMLFile << "  }" << endl; // close Shape
01425           VRMLFile << "}" << endl; // close transform
01426       } else {
01427         // write the point
01428         VRMLFile << "Shape {" << endl;
01429         VRMLFile << "   geometry PointSet {"<<endl;
01430         VRMLFile << "      coord Coordinate {"<<endl;
01431         VRMLFile << "         point ["<<it->C[0]<<" "<<it->C[1]<<" "<<it->C[2]
01432         <<"]" << endl << "      }"<<endl;
01433         VRMLFile << "      color Color { color [ 0 1 0, 0 1 0 ] }"<<endl;
01434         VRMLFile << "   }\n}"<<endl;
01435       }
01436
01437       // write the line
01438       VRMLFile << "Shape {" << endl;
01439       VRMLFile << "   geometry IndexedLineSet {" << endl;
01440       VRMLFile << "      coord Coordinate {" << endl;
01441       VRMLFile << "         point [" << endl;
01442       VRMLFile << "                  " <<it->C[0]<<" "<<it->C[1]<<" "
01443         <<it->C[2]<<","<<endl;
01444       VRMLFile << "                  " <<it->PP[0]<<" "<<it->PP[1]<<" "
01445         <<it->PP[2] << "                 ]" << endl;
01446       VRMLFile << "      }"<<endl;
01447       VRMLFile << "   coordIndex [ 0 1 -1 ]"<< endl;
01448       VRMLFile << "   color Color {"<<endl;
01449       VRMLFile << "        color [ "<<r<<" "<<g<<" "<<b<<", "
01450         <<r<<" "<<g<<" "<<b<<" ] "<<endl;
01451       VRMLFile << "   }\n}\n}"<< endl;
01452
01453       break;
01454     default: BIASERR("Desired Camera drawing style is not implemented."
01455                <<" Skipping Cameras.");
01456       return -1;
01457     }
01458   }
01459   return 0;
01460 }
01461
01462
01463 int ThreeDOut::VRMLOutLines(ostream& VRMLFile, const BIAS::RGBAuc &Color){
01464   double r = (double)Color[0] / 255.0;
01465   double g = (double)Color[1] / 255.0;
01466   double b = (double)Color[2] / 255.0;
01467   // double a = (double)it->second.Color[3] / 255.0;
01468   switch (Params_.LineStyle) {
01469   case Solid:
01470     for (map<unsigned int, Line3DData>::iterator it=mapLines_.begin();
01471       it!=mapLines_.end(); it++) {
01472         VRMLFile << std::endl;
01473         VRMLFile << "  Shape {" << std::endl;
01474         VRMLFile <<"         geometry IndexedLineSet {" << std::endl;
01475         VRMLFile <<"            coord Coordinate {" << std::endl;
01476         VRMLFile <<"              point [ " << std::endl;
01477         VRMLFile <<"                       "<<it->second.Start[0]<<" "
01478           << it->second.Start[1]<<" " <<it->second.Start[2]<< " , "
01479           << std::endl;
01480         VRMLFile <<"                       "<<it->second.End[0]<<" "
01481           <<it->second.End[1] <<" "<<it->second.End[2] <<" ] "<<std::endl;
01482
01483         VRMLFile <<"            }" << std::endl;
01484         VRMLFile << "              coordIndex [  0, 1, -1 ]" << std::endl;
01485         VRMLFile << "           color Color {" << std::endl;
01486         VRMLFile <<"              color [  "<<r<<" "<<g<<" "<<b<<" ]"<<std::endl;
01487         VRMLFile << "           } " <<std:: endl;   // terminates Color
01488         VRMLFile << "           colorPerVertex FALSE " << std::endl;
01489         VRMLFile << "  }" << std::endl << std::endl; // terminates IndexedLineSet
01490         VRMLFile << "   }" << std::endl;  // terminates shape
01491       }
01492       break;
01493   default: BIASERR("Unsupported LineStyle, line drawing disabled."); return -1;
01494   }
01495   return 0;
01496 }
01497
01498 void CoordinateSystem(ostream& VRMLFile,
01499                       float selectionRadius,
01500                       float r, float g, float b)
01501 {
01502   VRMLFile<<" Transform {   "<<std::endl;
01503   VRMLFile<<"  children [ "<<std::endl;
01504
01505   VRMLFile<<"    Shape {  "<<std::endl;
01506   VRMLFile<<" geometry Box{ size "<<selectionRadius<<" "
01507           <<selectionRadius<<" "<<selectionRadius<<"  }  "<<std::endl;
01508   VRMLFile<<" appearance Appearance {"<<std::endl;
01509   VRMLFile<<" material Material {"<<std::endl;
01510   VRMLFile<<"emissiveColor "<<r<<" "<<g<<" "<<b<<std::endl;
01511   VRMLFile<<"}"<<std::endl;
01512   VRMLFile<<"}"<<std::endl;
01513   VRMLFile<<"}"<<std::endl;
01514
01515   VRMLFile<<"DEF ArrowBody Transform {  "<<std::endl;
01516   VRMLFile<<" translation 0.5 0 0"<<std::endl;
01517   VRMLFile<<"children ["<<std::endl;
01518   VRMLFile<<"Shape { "<<std::endl;
01519   VRMLFile<<"geometry Box{ size 1 0.01 0.01  }  "<<std::endl;
01520   VRMLFile<<"appearance Appearance {"<<std::endl;
01521   VRMLFile<<"material Material {"<<std::endl;
01522   VRMLFile<<"emissiveColor "<<r<<" "<<g<<" "<<b<<std::endl;
01523   VRMLFile<<"}"<<std::endl;
01524   VRMLFile<<"}"<<std::endl;
01525   VRMLFile<<"}"<<std::endl;
01526   VRMLFile<<"]"<<std::endl;
01527   VRMLFile<<"}"<<std::endl;
01528
01529   VRMLFile<<"Transform {"<<std::endl;
01530   VRMLFile<<"rotation 0 1 0 -1.57"<<std::endl;
01531   VRMLFile<<"children USE ArrowBody"<<std::endl;
01532   VRMLFile<<"}"<<std::endl;
01533
01534   VRMLFile<<"Transform {"<<std::endl;
01535   VRMLFile<<"rotation 0 0 1 1.57"<<std::endl;
01536   VRMLFile<<"children USE ArrowBody"<<std::endl;
01537   VRMLFile<<"}"<<std::endl;
01538
01539   VRMLFile<<"Transform {"<<std::endl;
01540   VRMLFile<<"translation 1 0 0"<<std::endl;
01541   VRMLFile<<"rotation 0 0 1 -1.57"<<std::endl;
01542   VRMLFile<<"children ["<<std::endl;
01543   VRMLFile<<"Shape {"<<std::endl;
01544   VRMLFile<<"geometry Cone{ "<<std::endl;
01545   VRMLFile<<"bottomRadius 0.05 "<<std::endl;
01546   VRMLFile<<"height 0.2 }"<<std::endl;
01547   VRMLFile<<"appearance Appearance {"<<std::endl;
01548   VRMLFile<<"material Material {"<<std::endl;
01549   VRMLFile<<"emissiveColor 1.0 0.0 0.0"<<std::endl;
01550   VRMLFile<<"}"<<std::endl;
01551   VRMLFile<<"}"<<std::endl;
01552   VRMLFile<<"}"<<std::endl;
01553   VRMLFile<<"]"<<std::endl;
01554   VRMLFile<<"}"<<std::endl;
01555
01556   VRMLFile<<"Transform {"<<std::endl;
01557   VRMLFile<<"translation 0 1 0"<<std::endl;
01558   VRMLFile<<"children ["<<std::endl;
01559   VRMLFile<<"Shape {"<<std::endl;
01560   VRMLFile<<"geometry Cone{ "<<std::endl;
01561   VRMLFile<<"bottomRadius 0.05 "<<std::endl;
01562   VRMLFile<<"height 0.2 }"<<std::endl;
01563   VRMLFile<<"appearance Appearance {"<<std::endl;
01564   VRMLFile<<"material Material {"<<std::endl;
01565   VRMLFile<<"emissiveColor 0.0 1.0 0.0"<<std::endl;
01566   VRMLFile<<"}"<<std::endl;
01567   VRMLFile<<"}"<<std::endl;
01568   VRMLFile<<"}"<<std::endl;
01569   VRMLFile<<" ]"<<std::endl;
01570   VRMLFile<<"}"<<std::endl;
01571
01572   VRMLFile<<"Transform {"<<std::endl;
01573   VRMLFile<<"translation 0 0 1"<<std::endl;
01574   VRMLFile<<"rotation 1 0 0 1.57"<<std::endl;
01575   VRMLFile<<"children ["<<std::endl;
01576   VRMLFile<<"Shape {"<<std::endl;
01577   VRMLFile<<"geometry Cone{ "<<std::endl;
01578   VRMLFile<<"bottomRadius 0.05 "<<std::endl;
01579   VRMLFile<<"height 0.2 }"<<std::endl;
01580   VRMLFile<<"appearance Appearance {"<<std::endl;
01581   VRMLFile<<"material Material {"<<std::endl;
01582   VRMLFile<<"emissiveColor 0.0 0.0 1.0"<<std::endl;
01583   VRMLFile<<"}"<<std::endl;
01584   VRMLFile<<"}"<<std::endl;
01585   VRMLFile<<"}"<<std::endl;
01586   VRMLFile<<"]"<<std::endl;
01587   VRMLFile<<"}"<<std::endl;
01588
01589   VRMLFile<<"]"<<std::endl;
01590   VRMLFile<<"}"<<std::endl;
01591 }
01592
01593 int ThreeDOut::VRMLOutProjection(ostream& VRMLFile)
01594 {
01595   double r, g, b;
01596   map<unsigned int, Projection3DData>::iterator it;
01597   for(it=mapProjection3D_.begin(); it!=mapProjection3D_.end(); it++) {
01598     r = (double)it->second.ColorOfSelection[0] / 255.0;
01599     g = (double)it->second.ColorOfSelection[1] / 255.0;
01600     b = (double)it->second.ColorOfSelection[2] / 255.0;
01601     VRMLFile <<"\t Transform {"<<std::endl;
01602     VRMLFile <<"\t translation "
01603              <<it->second.C[0]<<" "<<it->second.C[1]<<" "<<it->second.C[2]
01604              <<std::endl;
01605     VRMLFile <<"\t rotation "
01606              <<it->second.axis[0]<<" "<<it->second.axis[1]
01607              <<" "<<it->second.axis[2]<<" "<<it->second.angle
01608              <<std::endl;
01609     VRMLFile <<"\t   children ["<<std::endl;
01610     CoordinateSystem(VRMLFile, (float)it->second.radiusSelection, (float)r, (float)g, (float)b);
01611     VRMLFile <<"\t   ]"<<std::endl;
01612     VRMLFile <<"\t }"<<std::endl;
01613     /*
01614     VRMLFile << std::endl;
01615     VRMLFile <<"\t Transform {"<<std::endl;
01616     VRMLFile <<"\t   children ["<<std::endl;
01617     VRMLFile <<"\t Transform {"<<std::endl;
01618     VRMLFile <<"\t   translation "
01619          <<it->second.C[0]<<" "<<it->second.C[1]<<" "<<it->second.C[2]
01620          <<std::endl;
01621
01622     VRMLFile <<"\t   children ["<<std::endl;
01623     VRMLFile <<" Shape {"<<std::endl;//sphere
01624     VRMLFile <<"\t       geometry";
01625     if(it->second.identifier.size()>0)
01626       VRMLFile <<" DEF "<<CorrectDefString_(it->second.identifier);
01627     VRMLFile <<" Sphere { radius "
01628          <<it->second.radiusSelection<<" }"<<std::endl;
01629     VRMLFile <<"\t       appearance Appearance {"<<endl;
01630     VRMLFile <<"\t         material Material {"<<endl;
01631 //     VRMLFile <<"\t           diffuseColor "
01632 //       << r <<" "<< g <<" "<< b <<std::endl;
01633     VRMLFile <<"\t           emissiveColor "
01634       //         << 0.25*r <<" "<< 0.25*g <<" "<< 0.25*b <<std::endl;
01635          << r <<" "<< g <<" "<< b <<std::endl;
01636 //     VRMLFile <<"\t           specularColor "
01637 //       << 0.1 <<" "<< 0.1 <<" "<< 0.1 <<std::endl;
01638     VRMLFile <<"\t         }"<<std::endl;//end of Material (selection sphere)
01639     VRMLFile <<"\t       }"<<std::endl;//end of appearance (selection sphere)
01640     VRMLFile <<"\t     }"<<std::endl;//end of shape (selection sphere)
01641     VRMLFile <<"\t   ]"<<endl;//end of translation of sphere
01642     VRMLFile <<"\t }"<<endl;//end of translation of sphere
01643     VRMLFile <<"\t     ";
01644     VRMLFile <<"Shape {"<<std::endl;//coord axes
01645     VRMLFile <<"\t       geometry IndexedLineSet {"<<std::endl;
01646     VRMLFile <<"\t         coord Coordinate {"<<std::endl;
01647     VRMLFile <<"\t           point ["<<std::endl;
01648     VRMLFile <<"\t             "
01649          <<it->second.C[0]<<" "<<it->second.C[1]<<" "<<it->second.C[2]
01650          <<",\n"
01651          <<it->second.A[0]<<" "<<it->second.A[1]<<" "<<it->second.A[2]
01652          <<",\n"
01653          <<it->second.H[0]<<" "<<it->second.H[1]<<" "<<it->second.H[2]
01654          <<",\n"
01655          <<it->second.V[0]<<" "<<it->second.V[1]<<" "<<it->second.V[2]
01656          <<",\n";
01657     VRMLFile <<"\t           ]"<<std::endl;
01658     VRMLFile <<"\t         }"<<std::endl; //end of coord
01659     VRMLFile <<"\t         coordIndex ["<<std::endl;
01660     VRMLFile <<"\t           0, 1, -1"<<std::endl
01661          <<"\t           0, 2, -1"<<std::endl
01662          <<"\t           0, 3, -1"<<std::endl;
01663     VRMLFile <<"\t         ]"<<std::endl;
01664     VRMLFile <<"\t         color Color {"<<std::endl;
01665     VRMLFile <<"\t           color ["<<std::endl;
01666     VRMLFile <<"\t             1 0 0, 0 1 0, 0 0 1"
01667          <<std::endl;
01668     VRMLFile <<"\t           ]"<<std::endl;
01669     VRMLFile <<"\t         }"<<std::endl;//end of color
01670     VRMLFile <<"\t         colorPerVertex  FALSE"<<std::endl;
01671     VRMLFile <<"\t       }"<<std::endl;//end of geometry (axes)
01672     VRMLFile <<"\t       appearance Appearance {"<<std::endl;
01673     VRMLFile <<"\t         material Material {"<<std::endl;
01674     //    VRMLFile <<"\t           emissiveColor 0.25 0.25 0.25"<<std::endl;
01675     VRMLFile <<"\t           emissiveColor "
01676              << r <<" "<< g <<" "<< b <<std::endl;
01677     VRMLFile <<"\t         }"<<std::endl; //end of Material (axes)
01678     VRMLFile <<"\t       }"<<std::endl; //end of appearance (axes)
01679     VRMLFile <<"\t     }"<<std::endl;//end of shape (axes)
01680     VRMLFile <<"\t     ";
01681     VRMLFile <<"\t     Transform {"<<std::endl; //coord axes cone X
01682     VRMLFile <<"\t       translation 1 0 0"<<std::endl;
01683     VRMLFile <<"\t       rotation 1 0 0 -1.57"<<std::endl;
01684     VRMLFile <<"\t       children ["<<std::endl;
01685     VRMLFile <<"\t         Shape {"<<std::endl;
01686     VRMLFile <<"\t         geometry {"<<std::endl;//
01687     VRMLFile <<"\t           Cone {"<<std::endl;
01688     VRMLFile <<"\t                bottomRadius 0.1"<<std::endl;
01689     VRMLFile <<"\t                height 0.3"<<std::endl;
01690     VRMLFile <<"\t                }"<<std::endl;
01691     VRMLFile <<"\t                  }"<<std::endl;//end of shape
01692     VRMLFile <<"\t         appearance Appearance {"<<std::endl;//
01693     VRMLFile <<"\t            material Material {"<<std::endl;//
01694     VRMLFile <<"\t              emissiveColor 1.0 0.0 0.0"<<std::endl;
01695     VRMLFile <<"\t                              }"<<std::endl;//
01696     VRMLFile <<"\t                               }"<<std::endl;//
01697     VRMLFile <<"\t               }"<<std::endl;
01698     VRMLFile <<"\t                ]"<<std::endl;
01699     VRMLFile <<"\t               }"<<std::endl; //end coord axes cone X
01700     VRMLFile <<"\t     ";
01701     VRMLFile <<"\t     Transform {"<<std::endl; //coord axes cone Y
01702     VRMLFile <<"\t       translation 0 1 0"<<std::endl;
01703     VRMLFile <<"\t       children ["<<std::endl;
01704     VRMLFile <<"\t         Shape {"<<std::endl;
01705     VRMLFile <<"\t         geometry {"<<std::endl;//
01706     VRMLFile <<"\t           Cone {"<<std::endl;
01707     VRMLFile <<"\t                bottomRadius 0.1"<<std::endl;
01708     VRMLFile <<"\t                height 0.3"<<std::endl;
01709     VRMLFile <<"\t                }"<<std::endl;
01710     VRMLFile <<"\t                  }"<<std::endl;//end of shape
01711     VRMLFile <<"\t         appearance Appearance {"<<std::endl;//
01712     VRMLFile <<"\t            material Material {"<<std::endl;//
01713     VRMLFile <<"\t              emissiveColor 0.0 1.0 0.0"<<std::endl;
01714     VRMLFile <<"\t                              }"<<std::endl;//
01715     VRMLFile <<"\t                               }"<<std::endl;//
01716     VRMLFile <<"\t               }"<<std::endl;
01717     VRMLFile <<"\t                ]"<<std::endl;
01718     VRMLFile <<"\t               }"<<std::endl; //end coord axes cone Y
01719     VRMLFile <<"\t     ";
01720     VRMLFile <<"\t   ]"<<std::endl;//endof children
01721     VRMLFile <<"\t }"<<std::endl;//endof wrapping transform
01722     */
01723   }
01724   return 0;
01725 }
01726
01727 int ThreeDOut::VRMLOutIndexedFaceSets(ostream& VRMLFile)
01728 {
01729   unsigned int i = 0;
01730   map<unsigned int, IndexedFaceSet>::iterator it;
01731   for (it = mapIndexedFaceSet_.begin(); it!=mapIndexedFaceSet_.end(); it++) {
01732     VRMLFile << std::endl;
01733     VRMLFile << "Shape {" << std::endl;
01734     //define apperance
01735     VRMLFile << "appearance Appearance { " << std::endl;
01736     //adding texture
01737     VRMLFile << "texture  ";
01738     if(it->second.textureName == "") {
01739       VRMLFile << "         PixelTexture { " << std::endl;
01740       //fill in PixelTexture Size and colors in hex?
01741       VRMLFile << "\t image "
01742                <<it->second.texture.GetWidth()<<" "
01743                <<it->second.texture.GetHeight()<<" "
01744                <<it->second.texture.GetChannelCount()<<std::endl;
01745       //    VRMLFile << "\t       ";
01746       unsigned int channelColor;
01747       unsigned int writeCounter = 0;
01748       for(unsigned int h=0; h<it->second.texture.GetHeight(); h++) {
01749         VRMLFile << " ";
01750         for(unsigned int w=0; w<it->second.texture.GetWidth(); w++) {
01751           VRMLFile <<"0x";
01752           for(unsigned int c=0; c<it->second.texture.GetChannelCount(); c++) {
01753             channelColor= it->second.texture.PixelValue(w,h,(unsigned short)c);
01754             VRMLFile.flags(ios_base::hex);
01755             VRMLFile.fill('0');
01756             VRMLFile.width(2);
01757             VRMLFile<<channelColor;
01758           }
01759           writeCounter++;
01760           if(writeCounter>=8) {
01761             VRMLFile<<std::endl;
01762             writeCounter=0;
01763           }
01764           VRMLFile.flags(ios_base::dec);
01765           VRMLFile <<" ";
01766         }
01767         VRMLFile<<std::endl;
01768       }
01769       VRMLFile.flags(ios_base::dec);
01770       VRMLFile << "  } \n";//end PixelTexture
01771     }//end if textureName == ""
01772     else {//textureName != ""
01773       // ImageTexture { url "./thermae.ppm" }
01774       VRMLFile << "         ImageTexture { url \""<<it->second.textureName;
01775       VRMLFile << "\"  } \n";//end ImageTexture
01776       if(it->second.writeOutTexture)
01777         ImageIO::ExportImage(it->second.textureName, it->second.texture);
01778     }
01779     VRMLFile <<" }\n";//end appearance
01780
01781
01782     //define geometry
01783     if (it->second.name.length()>0)
01784       VRMLFile <<" geometry DEF "<<it->second.name;
01785     else
01786       VRMLFile <<" geometry";
01787     VRMLFile <<" IndexedFaceSet {" << std::endl;
01788     //write all vertex coordinates
01789     VRMLFile <<"    coord Coordinate {" << std::endl;
01790     VRMLFile <<"      point [ " << std::endl;
01791     for(i = 0; i<it->second.vertexSet.size()-1; i++) {
01792       VRMLFile <<it->second.vertexSet[i][0]<<" "
01793                <<it->second.vertexSet[i][1]<<" "
01794                <<it->second.vertexSet[i][2]<<", "
01795                << std::endl;
01796     }
01797     VRMLFile <<it->second.vertexSet[it->second.vertexSet.size()-1][0]<<" "
01798              <<it->second.vertexSet[it->second.vertexSet.size()-1][1]<<" "
01799              <<it->second.vertexSet[it->second.vertexSet.size()-1][2]<<" ]"
01800              <<std::endl;
01801     VRMLFile <<" }" << std::endl; //closing coord
01802
01803     //write all texture coordinates
01804     VRMLFile <<"    texCoord TextureCoordinate {" << std::endl;
01805     VRMLFile <<"      point [ ";
01806     for(i = 0; i<it->second.texCoordSet.size()-1; i++) {
01807       VRMLFile <<it->second.texCoordSet[i][0]<<" "
01808                <<it->second.texCoordSet[i][1]<<", "
01809                << std::endl;
01810     }
01811     VRMLFile <<it->second.texCoordSet[it->second.texCoordSet.size()-1][0]<<" "
01812              <<it->second.texCoordSet[it->second.texCoordSet.size()-1][1]<<" ]"
01813              <<std::endl;
01814     VRMLFile <<" }" << std::endl; //closing texCoord
01815
01816     //define faces per indices
01817     VRMLFile <<"      coordIndex [ ";
01818     for(i = 0; i<it->second.faceIndices.size()-1; i++) {
01819       for(int j=0; j<(it->second.faceIndices[i]).size(); j++)
01820         VRMLFile <<it->second.faceIndices[i][j]<<", ";
01821       VRMLFile<<" -1,"<< std::endl;
01822     }
01823     for(int j=0;
01824         j<(it->second.faceIndices[it->second.faceIndices.size()-1]).size(); j++)
01825       VRMLFile<<it->second.faceIndices[it->second.faceIndices.size()-1][j]<<", ";
01826     VRMLFile<<" -1 ]"<< std::endl;
01827     VRMLFile <<"  }" << std::endl;//closing IndexedFaceSet
01828     VRMLFile <<"}" << std::endl;//closing SHAPE
01829
01830   }
01831   return 0;
01832 }
01833
01834 int ThreeDOut::VRMLOutImages(ostream& VRMLFile){
01835
01836
01837   map<unsigned int, Image3DData>::iterator it;
01838   for (it = mapImages_.begin(); it!=mapImages_.end(); it++) {
01839
01840     VRMLFile << std::endl;
01841     VRMLFile << "Shape {" << std::endl;
01842
01843     // write a indexedfaceset as the pixel grid, first all grid points
01844     if (it->second.name.length()>0)
01845       VRMLFile <<"         geometry DEF "<<it->second.name<<" IndexedFaceSet {"
01846                << std::endl;
01847     else
01848       VRMLFile <<"  geometry IndexedFaceSet {" << std::endl;
01849     VRMLFile <<"    coord Coordinate {" << std::endl;
01850     VRMLFile <<"      point [ " << std::endl;
01851
01852     // get roi which is the original image
01853     // ImageData may be larger, because it is padded to power of two
01854     unsigned int x1,y1,x2,y2;
01855     it->second.ImageData.GetROI()->GetCorners(x1,y1,x2,y2);
01856     const unsigned int width  = x2;
01857     const unsigned int height = y2;
01858     for (unsigned int y=0; y<=height; y++) {
01859         for (unsigned int x=0; x<=width; x++) {
01860         const double xfrac = (double(x)-0.5) / double(width-1);
01861         const double yfrac = (double(y)-0.5) / double(height-1);
01862         Vector3<double> CurPoint(it->second.UL +
01863                      xfrac*(it->second.UR-it->second.UL)+
01864                      yfrac*( (1.0-xfrac) *
01865                          (it->second.LL-it->second.UL)+
01866                          xfrac*(it->second.LR-it->second.UR)));
01867         VRMLFile <<"        "
01868              << CurPoint[0]<<" "<<CurPoint[1]<<" "<<CurPoint[2]<<","
01869              << std::endl;
01870         }
01871     }
01872     VRMLFile <<"      ]" << std::endl;
01873     VRMLFile <<"    }" << std::endl;
01874     //  now all the faces, the 3d pixels:
01875     VRMLFile <<"    coordIndex [" << endl;
01876     for (unsigned int x=0; x<width;x++) {
01877         for (unsigned int y=0; y<height;y++) {
01878         VRMLFile <<"      "<< (x+y*(width+1)) <<",";
01879         VRMLFile <<"      "<< (x+1+y*(width+1)) <<",";
01880         VRMLFile <<"      "<< (x+1+(y+1)*(width+1)) <<",";
01881         VRMLFile <<"      "<< (x+(y+1)*(width+1)) <<", -1"<<endl;
01882         }
01883     }
01884     VRMLFile << "    ]" << std::endl;
01885
01886     // set color of the points
01887     VRMLFile << "    color Color {" << std::endl;
01888     VRMLFile << "      color [ " << std::endl;
01889     unsigned char** ppData = it->second.ImageData.GetImageDataArray();
01890     double r = 1.0;
01891     double g = 1.0;
01892     double b = 1.0;
01893     for (unsigned int x=0; x<width; x++) {
01894         for (unsigned int y=0; y<height; y++) {
01895         if (it->second.ImageData.GetChannelCount()==1) {
01896             r = g = b = ((double)ppData[y][x])/ 255.0;;
01897         } else if (it->second.ImageData.GetChannelCount()==3) {
01898             r = (double)ppData[y][3*x] / 255.0;
01899             g = (double)*(&(ppData[y][3*x])+1) / 255.0;
01900             b = (double)*(&(ppData[y][3*x])+2) / 255.0;
01901         } else {
01902             BIASERR("Not grey or rgb, cannot display !");
01903         }
01904         VRMLFile << " "<<r<<" "<<g<<" "<<b<<" ,"<<std::endl;
01905         }
01906     }
01907     VRMLFile << "      ]" <<std::endl;
01908     VRMLFile << "    }" <<std:: endl;   // terminates Color
01909     VRMLFile << "    colorPerVertex    FALSE " <<std:: endl;
01910     VRMLFile << "  }" << std::endl << std::endl; // terminates IndexedFaceSet
01911     VRMLFile << "}" << std::endl;  // terminates shape
01912     }
01913     return 0;
01914 }
01915
01916
01917 int ThreeDOut::VRMLOutLines(ostream& VRMLFile){
01918   switch (Params_.LineStyle) {
01919   case Solid:
01920     for (map<unsigned int, Line3DData>::iterator it=mapLines_.begin();
01921       it!=mapLines_.end(); it++) {
01922         double r = (double)it->second.Color[0] / 255.0;
01923         double g = (double)it->second.Color[1] / 255.0;
01924         double b = (double)it->second.Color[2] / 255.0;
01925         // double a = (double)it->second.Color[3] / 255.0;
01926         VRMLFile << std::endl;
01927         VRMLFile << "  Shape {" << std::endl;
01928         VRMLFile <<"         geometry IndexedLineSet {" << std::endl;
01929         VRMLFile <<"            coord Coordinate {" << std::endl;
01930         VRMLFile <<"              point [ " << std::endl;
01931         VRMLFile <<"                       "<<it->second.Start[0]<<" "
01932           << it->second.Start[1]<<" " <<it->second.Start[2]<< " , "
01933           << std::endl;
01934         VRMLFile <<"                       "<<it->second.End[0]<<" "
01935           <<it->second.End[1] <<" "<<it->second.End[2] <<" ] "<<std::endl;
01936
01937         VRMLFile <<"            }" << std::endl;
01938         VRMLFile << "              coordIndex [  0, 1, -1 ]" << std::endl;
01939         VRMLFile << "           color Color {" << std::endl;
01940         VRMLFile <<"              color [  "<<r<<" "<<g<<" "<<b<<" ]"<<std::endl;
01941         VRMLFile << "           } " <<std:: endl;   // terminates Color
01942         VRMLFile << "           colorPerVertex FALSE " << std::endl;
01943         VRMLFile << "  }" << std::endl << std::endl; // terminates IndexedLineSet
01944         VRMLFile << "   }" << std::endl;  // terminates shape
01945       }
01946       break;
01947   default:
01948     BIASERR("Unsupported LineStyle, line drawing disabled.");
01949     return -1;
01950   }
01951   return 0;
01952 }
01953
01954 int ThreeDOut::VRMLOutEllipsoids(ostream& VRMLFile, const BIAS::RGBAuc &Color){
01955   for (map<unsigned int, Ellipsoid3DData>::iterator it=mapEllipsoids_.begin();
01956     it!=mapEllipsoids_.end(); it++) {
01957       Ellipsoid3DData& E = it->second;
01958       VRMLFile << "Transform {"<<endl;
01959       VRMLFile << "  scaleOrientation "<< E.RotAxis[0] <<" "
01960         << E.RotAxis[1]<<" " <<E.RotAxis[2] <<" "<< E.dAngle <<" "
01961         << endl;
01962       VRMLFile << "  scale "<< E.s0 <<" "<< E.s1<< " "<< E.s2 << endl;
01963       VRMLFile << "  translation "
01964         << E.C[0] << " " << E.C[1] << " " << E.C[2] << endl;
01965       VRMLFile << "  children Shape {"<<endl;
01966       VRMLFile << "    appearance Appearance { " << endl;
01967       VRMLFile << "     material Material { " << endl;
01968       VRMLFile << "       transparency      "<<VRMLtransparency(Color)<< endl;
01969       VRMLFile << "       diffuseColor " << (double)Color[0]/255.0 << " "
01970         << (double)Color[1]/255.0<< " "
01971         << (double)Color[2]/255.0 << endl;
01972       VRMLFile << "     }" << endl; // close Material
01973       VRMLFile << "    }" << endl; // close Appearance
01974       VRMLFile << "    geometry Sphere  { radius 1.0 }" << endl;
01975       VRMLFile << "  }" << endl; // close Shape
01976       VRMLFile << "}" << endl; // close Transform
01977     }
01978     return 0;
01979 }
01980
01981 int ThreeDOut::VRMLOutPointsAsSpheres_(std::ostream &VRMLFile) {
01982   double thesize = Params_.PointSize;
01983   for (map<unsigned int, Point3DData>::iterator it=mapPoints_.begin();
01984     it!=mapPoints_.end(); it++) {
01985       Point3DData& E = it->second;
01986       VRMLFile << "Transform {"<<endl;
01987       VRMLFile << "  translation "
01988         << E.Point[0] << " " << E.Point[1] << " " << E.Point[2]
01989         << endl;
01990         VRMLFile << "  children ";
01991         VRMLFile <<"   Shape {"<<endl;
01992         VRMLFile << "    appearance Appearance { " << endl;
01993         VRMLFile << "       material Material { " << endl;
01994         VRMLFile << "         transparency      "<<VRMLtransparency(E.Color)<<endl;
01995         VRMLFile << "         diffuseColor "
01996           << (double)E.Color[0]/255.0 << " "
01997           << (double)E.Color[1]/255.0 << " "
01998           << (double)E.Color[2]/255.0 << endl;
01999         VRMLFile << "       }" << endl; // close Material
02000         VRMLFile << "    }" << endl; // close Appearance
02001         VRMLFile << "    geometry Sphere  { radius "<<thesize<<" }" << endl;
02002         VRMLFile << "  }" << endl; // close Shape
02003         VRMLFile << "}" << endl; // close transform
02004     }
02005     return 0;
02006 }
02007
02008
02009 int ThreeDOut::VRMLOutEllipsoids(ostream& VRMLFile){
02010   for (map<unsigned int, Ellipsoid3DData>::iterator it=mapEllipsoids_.begin();
02011     it!=mapEllipsoids_.end(); it++) {
02012       Ellipsoid3DData& E = it->second;
02013       VRMLFile << "Transform {"<<endl;
02014       VRMLFile << "  scaleOrientation "<< E.RotAxis[0] <<" "
02015         << E.RotAxis[1]<<" " <<E.RotAxis[2] <<" "<< E.dAngle <<" "
02016         << endl;
02017       VRMLFile << "  scale "<< E.s0 <<" "<< E.s1<< " "<< E.s2 << endl;
02018       VRMLFile << "  translation "
02019         << E.C[0] << " " << E.C[1] << " " << E.C[2] << endl;
02020       VRMLFile << "  children Shape {"<<endl;
02021       VRMLFile << "    appearance Appearance { " << endl;
02022       VRMLFile << "     material Material { " << endl;
02023       VRMLFile << "       transparency      "
02024         <<VRMLtransparency(E.Color)<<endl;
02025       VRMLFile << "       diffuseColor " << (double)E.Color[0]/255.0 << " "
02026         << (double)E.Color[1]/255.0<< " "
02027         << (double)E.Color[2]/255.0 << endl;
02028       VRMLFile << "     }" << endl; // close Material
02029       VRMLFile << "    }" << endl; // close Appearance
02030       VRMLFile << "    geometry Sphere  { radius 1.0 }" << endl;
02031       VRMLFile << "  }" << endl; // close Shape
02032       VRMLFile << "}" << endl; // close Transform
02033     }
02034     return 0;
02035 }
02036
02037 int ThreeDOut::VRMLOut(const string &sFilename, const BIAS::RGBAuc &Color){
02038   ofstream VRMLFile;
02039   VRMLFile.open(sFilename.c_str());
02040   if (!VRMLFile) {
02041     BIASERR("Error opening VRML file for writing: "<<sFilename);
02042     return -1;
02043   }
02044   VRMLOutWriteHeader(VRMLFile);
02045   VRMLOutIndexedFaceSets(VRMLFile);
02046   VRMLOutEllipsoids(VRMLFile, Color);
02047   VRMLOutLines(VRMLFile, Color);
02048   VRMLOutPoints(VRMLFile, Color);
02049   VRMLOutImages(VRMLFile);
02050   VRMLOutPMatrices(VRMLFile, Color);
02051   VRMLFile.close();
02052   return 0 ;
02053 }
02054
02055 int ThreeDOut::VRMLOut(const string &sFilename){
02056   ofstream VRMLFile;
02057   VRMLFile.open(sFilename.c_str());
02058   if (!VRMLFile) {
02059     BIASERR("Error opening VRML file for writing: "<<sFilename);
02060     return -1;
02061   }
02062
02063   VRMLOutWriteHeader(VRMLFile);
02064   if (this->WriteViewpoints_)
02065     VRMLOutWriteViewpoint(VRMLFile);
02066
02067   VRMLOutProjection(VRMLFile);
02068   VRMLOutIndexedFaceSets(VRMLFile);
02069   VRMLOutPoints(VRMLFile);
02070   VRMLOutEllipsoids(VRMLFile);
02071   VRMLOutLines(VRMLFile);
02072   VRMLOutImages(VRMLFile);
02073   VRMLOutPMatrices(VRMLFile);
02074   VRMLFile.close();
02075   return 0;
02076 }
02077
02078 int ThreeDOut::VRMLOutWriteHeader(std::ostream& vrml){
02079   vrml << "#VRML V2.0 utf8" << endl;
02080   vrml << "# File written by Basic Image AlgorithmS (BIAS) library" << endl;
02081   vrml << "# http://www.mip.informatik.uni-kiel.de"
02082     <<endl;
02083   return 0;
02084 }
02085
02086 // ------------------------------ other functions ----------------------------
02087
02088 void ThreeDOut::Dump(){
02089   cout <<endl<< "Dumping ThreeDOut object:"<<endl;
02090   cout <<"Points: -----------------------------------------"<<endl;
02091   for(map<unsigned int, Point3DData>::iterator it = mapPoints_.begin();
02092     it != mapPoints_.end(); it++) {
02093       cout <<"["<<it->first<<"] "<<it->second.Point<<endl;
02094     }
02095     cout<<endl<< "Lines: ------------------------------------------"<<endl;
02096     for(map<unsigned int, Line3DData>::iterator it = mapLines_.begin();
02097       it != mapLines_.end(); it++) {
02098         cout <<"["<<it->first<<"] "<<it->second.Start<<" -> "
02099           <<it->second.End<<endl;
02100       }
02101       cout<<endl<< "PMatrices: -------------------------------------- "<<endl;
02102       unsigned int i=0;
02103       for(map<unsigned int, PMatrix3DData>::iterator
02104         it = mapPMatrices_.begin(); it != mapPMatrices_.end(); it++) {
02105           cout <<"["<<(i++)<<"] UL="<<it->second.UL<<" UR="<<it->second.UR
02106             <<" LL="<<it->second.LL<<" LR="
02107             <<it->second.LR<<" C="<<it->second.C<<endl;
02108         }
02109         cout<<endl<< "Ellipsoids: -------------------------------------"<<endl;
02110         for(map<unsigned int, Ellipsoid3DData>::iterator it = mapEllipsoids_.begin();
02111           it != mapEllipsoids_.end(); it++) {
02112             cout <<"["<<it->first<<"] Center at "<<it->second.C<<endl;
02113           }
02114           cout<<endl<<flush;
02115
02116 }
02117
02118
02119 Vector3<double> ThreeDOut::GetCenterOfPoints(){
02120   Vector3<double> center(0.0);
02121   unsigned int count=0;
02122   map<unsigned int, Point3DData>::iterator it;
02123   for (it=mapPoints_.begin(); it!=mapPoints_.end(); it++) {
02124     count ++;
02125     center += it->second.Point;
02126   }
02127   center /= double(count);
02128   return center;
02129 }
02130
02131
02132 void ThreeDOut::GetBoundingBox(Vector3<double> &min, Vector3<double> &max)
02133 {
02134   for (unsigned int i=0;i<3; i++) {
02135     min[i] = DBL_MAX;
02136     max[i] = -DBL_MAX;
02137   }
02138
02139   map<unsigned int, Point3DData>::iterator it;
02140   for (it=mapPoints_.begin(); it!=mapPoints_.end(); it++) {
02141     for (unsigned int i=0;i<3; i++) {
02142       if (it->second.Point[i] < min[i]) min[i] = it->second.Point[i];
02143       if (it->second.Point[i] > max[i]) max[i] = it->second.Point[i];
02144     }
02145   }
02146 }
02147
02148
02149 void ThreeDOut::RemoveAll(){
02150   RemoveAllPoints();
02151   RemoveAllLines();
02152   RemoveAllEllipsoids();
02153   RemoveAllImages();
02154   RemoveAllPMatrices();
02155 }
02156
02157 // OpenGL interpretes alpha as opacity
02158 // while VRML uses its inverse, transaparency
02159 double ThreeDOut::VRMLtransparency(const unsigned char alpha){
02160   // our alpha stores opacity (as in GL)
02161   // but VRML uses transparency and normalized scaling
02162   return double( (255.0-double(alpha)) / 255.0 );
02163 }
02164
02165 double ThreeDOut::VRMLtransparency(const BIAS::Vector4<unsigned char> & vRgba){
02166   return VRMLtransparency( vRgba[3] );
02167 }
02168
02169
02170 void ThreeDOut::SetWriteViewpoints(const bool & val){
02171   this->WriteViewpoints_ = val;
02172 }
02173
02174
02175 void ThreeDOut::VRMLOutWriteNavigationInfo(std::ostream& vrml)
02176 {
02177   vrml<<"NavigationInfo {"<<endl;
02178   vrml<<"  avatarSize [0.1, 0.1, 0.1]"<<endl;
02179   vrml<<"  headlight TRUE"<<endl;
02180   vrml<<"  type [ \"EXAMINE\", \"ANY\" ]"<<endl;
02181   vrml<<"  visibilityLimit 0.0"<<endl;
02182   vrml<<"}"<<endl;
02183 }
02184
02185
02186 void ThreeDOut::VRMLOutWriteViewpoint(std::ostream& vrml)
02187 {
02188   VRMLOutWriteNavigationInfo(vrml);
02189
02190   map<unsigned int, PMatrix3DData>::iterator itP = mapPMatrices_.begin();
02191   //Vector3<double> up;
02192   int counter=0;
02193   //PMatrix3DData *it;
02194
02195   for (itP=mapPMatrices_.begin(); (itP!=mapPMatrices_.end()) && (counter<=5); itP++){
02196     PMatrix3DData *p = &(itP->second);
02197     // compute fov:
02198     BIAS::Vector3<double> u,v;
02199     u = (p->UL +p->UR)*0.5 - p->C;
02200     v = p->PP           - p->C;
02201     BIASASSERT(u.Length()!=0);
02202     BIASASSERT(v.Length()!=0);
02203     double cosAlpha = u.ScalarProduct(v) / (u.Length() * v.Length());
02204     double alpha = acos(cosAlpha);
02205
02206     // set virtual camera position, orientation and internal parameters:
02207     vrml<<"Viewpoint {"<<endl;
02208     vrml<<"  position "<<p->C[0]<<" "<<p->C[1]<<" "<<p->C[2]<<endl; // x y z pos.
02209     // default orientation is xright, y top, looking in -Z direction.
02210     // rotate 180 deg around x-axis to look to +Z:
02211     vrml<<"  orientation 1 0 0 "<<M_PI<<endl; // axis, angle rotate to +Z axis
02212     vrml<<"  fieldOfView "
02213       <<alpha/M_PI*180.0
02214       //<<45.0
02215       // TODO: P.GetFieldOfView(widthm height, true);
02216       <<endl;// fov
02217     vrml<<"  jump TRUE"<<endl; // immediate jump to position
02218     vrml<<"  description \"camera P"<<counter<<"\""<<endl;
02219     vrml<<"}"<<endl; // end of viewpoint
02220
02221     counter++;
02222   };
02223 }
02224
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/ThreeDOut.hh Source File

Utils

ThreeDOut.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _BIASTHREEDOUT_HH_
00027 #define _BIASTHREEDOUT_HH_
00028
00029 #include <bias_config.h>
00030
00031 #include <list>
00032 #include <vector>
00033 #include <map>
00034
00035 // BIAS
00036 #include <Base/Debug/Debug.hh>
00037 #include <Base/Image/Image.hh>
00038 #include <Base/Math/Vector3.hh>
00039 #include <Base/Math/Vector4.hh>
00040 #include <Base/Math/RGBA.hh>
00041 #include <Base/Geometry/HomgPlane3D.hh>
00042 #include <Base/Geometry/HomgPoint3D.hh>
00043 #include <Geometry/PMatrix.hh>
00044 #include <Geometry/Quadric3D.hh>
00045 #include <Geometry/CovMatrix3x3.hh>
00046 #include <Utils/PMatrix3DData.hh>
00047 #include <Utils/TriangleMesh.hh>
00048 #include <Geometry/Projection.hh>
00049 #include <Base/Geometry/PoseParametrization.hh>
00050
00051   using namespace std;
00052
00053 /// use one sigma as the standard confidence region for ellipsoid surfaces
00054 /// if you want to supply a probability, see defines in Quadric3D.hh
00055 #define DEF_P_SCALE 1.0
00056
00057 // opaque, non transparent surface alpha value
00058 #define ALPHA_TRANSPARENT 0
00059 #define ALPHA_OPAQUE      255
00060
00061
00062 /// entity index offsets for selection rendering/picking. (OpenGL GL_SELECT)
00063 /// Each entity index is mapped to an int using a entity specific offset
00064 /// Thus the nr. of entites is currently limited to 100.000 !
00065 /// Assert unique indexing, ranges must not overlap.
00066 /// @author Jan Woetzel
00067 //#define BIAS_SELECTION_OFFSET_IMAGE      100000
00068 #define BIAS_SELECTION_OFFSET_PMATRIX    200000
00069 //#define BIAS_SELECTION_OFFSET_LINE       300000
00070 //#define BIAS_SELECTION_OFFSET_ELLIPSOID  400000
00071 //#define BIAS_SELECTION_OFFSET_POINT      500000
00072
00073
00074
00075
00076 // BIASDOUT - log destination (?)
00077 #define D_3DOUT_PDECOMP 0x00001000
00078
00079
00080 namespace BIAS {
00081
00082   /**class Projection3DData stores data for drawing a
00083    *  the extrinisc paramters of a projection.
00084    */
00085   class BIASUtils_EXPORT Projection3DData {
00086   public:
00087     inline void Set(const BIAS::PoseParametrization& p,
00088                     const double scale=1.0) {
00089       C = p.GetPosition();
00090       Quaternion<double> Q = p.GetOrientation();
00091       RMatrix R;
00092       R.SetFromQuaternion(Q);
00093       Set(C, R, scale);
00094     }
00095
00096     inline void Set(const BIAS::Projection& p, const double scale=1.0 ) {
00097       C = p.GetC();
00098       RMatrix R = p.GetR();
00099       Set(C, R, scale);
00100       identifier = p.GetIdentifier();
00101     }
00102
00103     inline void Set(const BIAS::Vector3<double>& C,
00104                     const BIAS::RMatrixBase& R,
00105                     const double scale=1.0) {
00106       for(unsigned int i=0; i<3; i++) {
00107         H[i] = scale*R[i][0];
00108         V[i] = scale*R[i][1];
00109         A[i] = scale*R[i][2];
00110       }
00111
00112       H = H+C;
00113       V = V+C;
00114       A = A+C;
00115       R.GetRotationAxisAngle(axis, angle);
00116     }
00117
00118     Projection3DData() : radiusSelection(0.1) {}
00119     Vector3<double> C;
00120     Vector3<double> A;
00121     Vector3<double> H;
00122     Vector3<double> V;
00123     Vector3<double> axis;
00124     double angle;
00125     double radiusSelection;
00126
00127     BIAS::RGBAuc ColorOfSelection;
00128     std::string identifier;
00129   };
00130
00131   /** @class Ellipsoid3DData
00132       @brief stores important data for drawing an ellipsoid */
00133   class BIASUtils_EXPORT Ellipsoid3DData {
00134   public:
00135     BIAS::Vector3<double> RotAxis; ///< rot to get 1st mainaxis from (1,0,0)
00136     double dAngle;                 ///< rotation in radians around RotAxes
00137     double s0, s1, s2;             ///< lengths of main axes
00138     BIAS::Vector3<double> C;       ///< center of ellipsoid
00139     BIAS::RGBAuc Color;
00140   };
00141
00142   /** @class Point3DData
00143       @brief stores data for drawing a point */
00144   class BIASUtils_EXPORT Point3DData {
00145   public:
00146     BIAS::Vector3<double> Point;
00147     BIAS::RGBAuc Color;
00148   };
00149
00150   /** @class Image3DData
00151       @brief  stores datas for a textured plane */
00152   class BIASUtils_EXPORT Image3DData {
00153   public:
00154     Vector3<double>  UL;       ///< upper left corner of image plane in wcs
00155     Vector3<double>  UR;       ///< upper right corner of image plane in wcs
00156     Vector3<double>  LL;       ///< lower left corner of image plane in wcs
00157     Vector3<double>  LR;       ///< lower right corner of image plane in wcs
00158     Image<unsigned char> ImageData;      ///< data of texture image
00159     std::string name;
00160     Image3DData(){};
00161
00162     Image3DData(const Image3DData& d){
00163       UL=d.UL; UR=d.UR; LL=d.LL; LR=d.LR; ImageData=d.ImageData; name=d.name;
00164     }
00165
00166   };
00167
00168   /** @class Line3DData
00169       @brief stores data for drawing a line */
00170   class BIASUtils_EXPORT Line3DData {
00171   public:
00172     BIAS::Vector3<double> Start;
00173     BIAS::Vector3<double> End;
00174     BIAS::RGBAuc Color;
00175   };
00176
00177   /** @class IndexedFaceSet
00178       @brief stores data for drawing a indexed face set.
00179       Faces beeing (preferably flat) polygons*/
00180   class BIASUtils_EXPORT IndexedFaceSet {
00181   public:
00182     BIAS::Image<unsigned char> texture;
00183     std::vector<BIAS::Vector3<double> > vertexSet;
00184     std::vector<BIAS::Vector2<float> > texCoordSet;
00185     //each BIAS::Vector storing a face
00186     std::vector<BIAS::Vector<int> > faceIndices;
00187     std::string name;
00188     std::string textureName;
00189     bool writeOutTexture;
00190   };
00191
00192   /** @enum CameraDrawingStyle
00193       @brief different styles when drawing cameras, e.g. in GL or VRML */
00194   enum CameraDrawingStyle { PyramidMesh, PyramidSolid, Arrow,
00195                             PyramidMeshWithArrow };
00196
00197   /** @enum PointDrawingStyle
00198       @brief different styles when drawing points, e.g. in GL or VRML */
00199   enum PointDrawingStyle { Point, PointSprite, Sphere, Box};
00200
00201   /** @enum PointDrawingStyle
00202       @brief different styles when drawing lines, e.g. in GL or VRML */
00203   enum LineDrawingStyle { Solid, Dashed };
00204
00205   /** @struct ThreeDOutParameters
00206       @brief configuration struct for drawing styles of various 3d objects */
00207   class BIASUtils_EXPORT ThreeDOutParameters {
00208   public:
00209     ThreeDOutParameters();
00210     PointDrawingStyle PointStyle;
00211     CameraDrawingStyle CameraStyle;
00212     LineDrawingStyle LineStyle;
00213     bool DrawUncertaintyEllipsoids;
00214     double PointSize;
00215     double CameraScale;
00216     unsigned char LineWidth; // in pixel
00217   };
00218
00219   /** @class ThreeDOut
00220       @brief unified output of 3D entities via OpenGL or VRML
00221
00222       Alpha blending policy (like OpenGL defaults):
00223       - Alpha blending value means opacity (not transparency), e.g.
00224       0          = full transparent (invisible glass), see ALPHA_TRANSPARENT
00225       255 (1.0f) = opaque (not transparent), see ALPHA_OPAQUE
00226       - Thus set OpenGL state of calling application accordingly e.g.
00227       \verbatim
00228       glEnable   (GL_BLEND);
00229       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
00230       \endverbatim
00231       - Remember to render in correct order:
00232       -  opaque primitives first,
00233       -  back to front order.
00234       Details:
00235       http://www.opengl.org/resources/faq/technical/transparency.htm
00236
00237       However, VRML has inverse interpretation (!),
00238       thus a conversion is required, see
00239       http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html  */
00240   class BIASUtils_EXPORT ThreeDOut : public Debug
00241   {
00242   public:
00243
00244     /// destructor
00245     ~ThreeDOut();
00246
00247     /// ctor
00248     ThreeDOut(const BIAS::ThreeDOutParameters& params=
00249               BIAS::ThreeDOutParameters() );
00250
00251     void SetParamsPointSize(double pointSize);
00252     void SetParamsCameraScale(double cameraScale); // only works for OpenGLOut!
00253     void SetParamsCameraStyle(CameraDrawingStyle cameraStyle);
00254     void SetParamsDrawEllipse(bool drawEllipse);
00255
00256     void SetParams(const ThreeDOutParameters& params);
00257
00258     /** @name Functions to add geometric objects for output
00259         @brief save the return value to update or delete the objects later
00260         @{ */
00261
00262     /** @return index value to change the point later
00263         @param v point coordinates */
00264     unsigned int AddPoint(const BIAS::Vector3<double> &v,
00265                           const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE );
00266
00267     /** @return index value to change the point later
00268         @param v point coordinates */
00269     unsigned int AddPoint(const BIAS::HomgPoint3D &v,
00270                           const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE );
00271
00272     /** @return index value to change the line later
00273         @param Start Start point of line
00274         @param End End point of line */
00275     unsigned int AddLine(const BIAS::Vector3<double> &Start,
00276                          const BIAS::Vector3<double> &End,
00277                          const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE );
00278
00279     /** @return index value to change the line later
00280         @param Start Start point of line
00281         @param End End point of line */
00282     unsigned int AddLine(const BIAS::HomgPoint3D &Start,
00283                          const BIAS::HomgPoint3D &End,
00284                          const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE);
00285
00286     /** @param dConfidenceRegionScale see Quadric3D.hh for the relationship
00287         between enlarging the standard confidence region and the probability
00288         that a measurement will be inside that region, 1.0 means sigma */
00289     unsigned int AddEllipsoid(BIAS::CovMatrix3x3 &cov,
00290                               BIAS::Vector3<double> &C,
00291                               const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI,
00292                               const double& dConfidenceRegionScale = DEF_P_SCALE);
00293
00294     /** @param dConfidenceRegionScale see Quadric3D.hh for the relationship
00295         between enlarging the standard confidence region and the probability
00296         that a measurement will be inside that region, 1.0 means sigma */
00297     unsigned int AddEllipsoid(BIAS::CovMatrix3x3 &cov,
00298                               BIAS::HomgPoint3D &C,
00299                               const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI,
00300                               const double& dConfidenceRegionScale = DEF_P_SCALE);
00301
00302     /** decompose P and add to internal data structures.
00303         \params name defines node name in vrml - does not like dots ('.')!
00304         @todo the scale of the camera should be a (dynamic) visualization
00305         option, not a parameter of the add function
00306         @author woelk 01/2004 */
00307     unsigned int AddPMatrix(BIAS::PMatrix &P,
00308                             const unsigned int& width,
00309                             const unsigned int& height,
00310                             const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE,
00311                             const double &dScale = DEF_P_SCALE,
00312                             const std::string& name = "");
00313
00314     /** interface for the above @author Jan Woetzel */
00315     unsigned int AddPMatrix(BIAS::Matrix3x4<double> &M,
00316                             const unsigned int& width,
00317                             const unsigned int& height,
00318                             const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE,
00319                             const double &dScale = DEF_P_SCALE,
00320                             const std::string& name = "");
00321
00322
00323     /** @brief add a small rectangular image patch spanned by three 3d points
00324         small means really small (only a few pixels), the patch is approximated
00325         in a very complicated way in vrml to allow for inline data
00326         @param channels number of channels: 1=grey, 3=rgb
00327         @author koeser 09/2004 */
00328     inline unsigned int AddImage(const Vector3<double>& UL,
00329                                  const Vector3<double>& UR,
00330                                  const Vector3<double>& LL,
00331                                  unsigned int Width, unsigned int Height,
00332                                  unsigned char* pData,
00333                                  unsigned int channels = 1,
00334                                  const std::string& name = "")
00335     {
00336       Vector3<double> LR = LL + (UR-UL);
00337       return AddImage(UL, UR, LL, LR, Width, Height, pData, channels, name);
00338     }
00339
00340     /** @brief add a small image patch spanned by four 3d points
00341         small means really small (only a few pixels), the patch is approximated
00342         in a very complicated way in vrml to allow for inline data
00343         @param channels number of channels: 1=grey, 3=rgb
00344         @author koeser 09/2005 */
00345     unsigned int AddImage(const Vector3<double>& UL,
00346                           const Vector3<double>& UR,
00347                           const Vector3<double>& LL,
00348                           const Vector3<double>& LR,
00349                           unsigned int Width, unsigned int Height,
00350                           unsigned char* pData,
00351                           unsigned int channels = 1,
00352                           const std::string& name = "");
00353
00354
00355     /** Adds triangle mesh as IndexedFaceSet to ThreeDOut mem.
00356      * \params name defines node name in vrml - must not contain dots ('.')!
00357      \params textureOutputName is telling which name the texture shall have
00358      when writing the vrml. If this param is empty (default), the texture is
00359      integrated into the vrml as PixelMap.
00360      \params writeOutTexture if true and thetextureOutputName is not "" then
00361      the texture is written into textureOutputName, otherwise only the texture
00362      name or a PixelMap is integrated into vrml.
00363     */
00364     unsigned int AddTriangleMesh(const TriangleMesh& mesh,
00365                                  const std::string& name="",
00366                                  const std::string& textureOutputName = "",
00367                                  bool writeOutTexture = true);
00368
00369     /** Add a projection object to ThreeDOut mem.
00370      * \param colorSelection color of the small sphere around the center
00371      * Draws the four cam coordinate axes (A in red, H in Green, V in blue)
00372      * and a small sphere around the center which is usefull for selection.
00373      */
00374     unsigned int AddProjection(const Projection& p,
00375                                const RGBAuc& colorSelection =
00376                                RGBAuc_WHITE_OPAQUE,
00377                                const double radius = 0.1,
00378                                const double scale = 1.0);
00379
00380     unsigned int AddPose(const PoseParametrization& p,
00381                          const RGBAuc& colorSelection = RGBAuc_WHITE_OPAQUE,
00382                          const double radius = 0.1,
00383                          const double scale = 1.0);
00384
00385
00386     /** @}
00387         @name Functions to update previously added objects for output
00388         @{ */
00389
00390     /** @param PointIndex value previously returned by AddPoint */
00391     void UpdatePoint(const unsigned int& PointIndex,
00392                      const BIAS::Vector3<double> &v,
00393                      const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE);
00394
00395     /** @param PointIndex value previously returned by AddPoint */
00396     void UpdatePoint(const unsigned int& PointIndex,
00397                      const BIAS::HomgPoint3D &v,
00398                      const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE);
00399
00400     /** @param PIndex value previously returned by AddPMatrix */
00401     void UpdatePMatrix(const unsigned int& PIndex, BIAS::PMatrix &P,
00402                        const unsigned int& width,
00403                        const unsigned int& height,
00404                        const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE,
00405                        const double& dScale = DEF_P_SCALE);
00406
00407     /** @param PIndex value previously returned by AddPMatrix */
00408     void UpdatePMatrixColor(const unsigned int& PIndex,
00409                             const BIAS::RGBAuc &Color);
00410
00411     /** @param LineIndex value previously returned by AddLine
00412         @param Start Start point of line
00413         @param End End point of line */
00414     void UpdateLine(const unsigned int& LineIndex,
00415                     const BIAS::Vector3<double> &Start,
00416                     const BIAS::Vector3<double> &End,
00417                     const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE);
00418
00419     /** @param LineIndex value previously returned by AddLine
00420         @param Start Start point of line
00421         @param End End point of line */
00422     void UpdateLine(const unsigned int& LineIndex,
00423                     const BIAS::HomgPoint3D &Start,
00424                     const BIAS::HomgPoint3D &End,
00425                     const BIAS::RGBAuc &Color = RGBAuc_WHITE_OPAQUE);
00426
00427     /** @param dConfidenceRegionScale see Quadric3D.hh for the relationship
00428         between enlarging the standard confidence region and the probability
00429         that a measurement will be inside that region, 1.0 means sigma */
00430     void UpdateEllipsoid(const unsigned int& EIndex,
00431                          BIAS::CovMatrix3x3 &cov,
00432                          BIAS::Vector3<double> &C,
00433                          const BIAS::RGBAuc &Color = RGBAuc_WHITE_SEMI,
00434                          const double& dConfidenceRegionScale = DEF_P_SCALE);
00435
00436     /** @param dConfidenceRegionScale see Quadric3D.hh for the relationship
00437         between enlarging the standard confidence region and the probability
00438         that a measurement will be inside that region, 1.0 means sigma */
00439     void UpdateEllipsoid(const unsigned int& EIndex,
00440                          BIAS::CovMatrix3x3 &cov,
00441                          BIAS::HomgPoint3D &C,
00442                          const BIAS::RGBAuc &Color = RGBAuc_WHITE_SEMI,
00443                          const double& dConfidenceRegionScale = DEF_P_SCALE);
00444     /** @}
00445         @name Functions to remove previously added objects for output
00446         @{ */
00447
00448     /** @brief removes all entites
00449         Essentially a clear on each entityt container.
00450         @author Jan Woetzel */
00451     void RemoveAll();
00452
00453     /** @brief completely removes the point from the internal structures,
00454         there is no way to get it back */
00455     void RemovePoint(const unsigned int& PointIndex);
00456
00457     /** @brief completely removes all points from the internal structures,
00458         there is no way to get them back */
00459     void RemoveAllPoints();
00460
00461     /** @brief completely removes the line from the internal structures,
00462         there is no way to get it back */
00463     void RemoveLine(const unsigned int& LineIndex);
00464
00465     /** @brief completely removes all lines from the internal structures JW */
00466     void RemoveAllLines();
00467
00468     /** @brief completely removes the ellipsoid from the internal structures,
00469         there is no way to get it back */
00470     void RemoveEllipsoid(const unsigned int& EIndex);
00471
00472     /** @brief completely removes all ellipsoids from the internal structures,
00473         there is no way to get it back */
00474     void RemoveAllEllipsoids();
00475
00476     /** @brief completely removes the image from the internal structures,
00477         there is no way to get it back */
00478     void RemoveImage(const unsigned int& EIndex);
00479
00480     /** @brief completely removes all images from the internal structures,
00481         there is no way to get it back */
00482     void RemoveAllImages();
00483
00484     /** @brief removes the P-matrix index,
00485         there is no way to get it back */
00486     void RemovePMatrix(int index);
00487
00488     /** @brief completely removes all images from the internal structures,
00489         there is no way to get it back */
00490     void RemoveAllPMatrices();
00491
00492     /** @}
00493         @name Functions for openGL output (if BIAS_HAVE_OPENGL)
00494         @{ */
00495
00496 #ifdef BIAS_HAVE_OPENGL
00497
00498     /// @brief draw all points with the same color:
00499     void OpenGLOutPoints(const BIAS::RGBAuc &Color);
00500
00501     /// @brief draw all points with their own color:
00502     void OpenGLOutPoints();
00503
00504     /// @brief draw all pmatrices with the same color:
00505     void OpenGLOutPMatrices(const BIAS::RGBAuc &Color);
00506
00507     /// @brief draw all pmatrices with their own color:
00508     void OpenGLOutPMatrices();
00509
00510     /// @brief draw all lines with the same color:
00511     void OpenGLOutLines(const BIAS::RGBAuc &Color);
00512
00513     /// @brief draw all pmatrices with their own color
00514     /// @todo linedrawingstyle=dashed not implmented
00515     void OpenGLOutLines();
00516
00517     /// @brief draw all ellipsoids with the same color:
00518     void OpenGLOutEllipsoids(const BIAS::RGBAuc &Color);
00519
00520     /// @brief draw all ellipsoids with their own color:
00521     void OpenGLOutEllipsoids();
00522
00523     /** @brief draw all image patches using OpenGL
00524         @param disableBlending true to glDisbale(GL_BLEND) temporarily
00525         \todo: This implementation is very inefficient because it
00526         recreates the textures for each rendering pass! JW  */
00527     void OpenGLOutImages(const bool & disableBlending=true);
00528
00529     /** @brief draw all entities (with the same color) using OpenGL
00530         Includes lines, points, pmatrices etc. (everything) */
00531     void OpenGLOut(const BIAS::RGBAuc &Color);
00532
00533     /** @brief render all entities (with the same color) using OpenGL
00534         Includes lines, points, pmatrices etc. (everything) */
00535     void OpenGLOut();
00536
00537 #endif // BIAS_HAVE_OPENGL
00538
00539     /// get center of gravity (mean of structure)
00540     Vector3<double> GetCenterOfPoints();
00541
00542     /** Get the min and max vector of the smallest bounding box, which
00543      * is drawn around the added points.
00544      */
00545     void GetBoundingBox(Vector3<double> &min,Vector3<double> &max);
00546
00547     /** @}
00548         @name Functions for VRML output
00549         @{ */
00550
00551     /** @brief flush all 3d objects to a vrml file with name sFilename, this
00552         is the function most users would call */
00553     int VRMLOut(const std::string &sFilename);
00554
00555     /** @brief flush all 3d objects to a vrml file with name sFilename, use
00556         Color as the color for all elements */
00557     int VRMLOut(const std::string &sFilename, const BIAS::RGBAuc &Color);
00558
00559     /** @brief only write (previously stored) points into an open vrml file,
00560         override their individual colors with Color */
00561     int VRMLOutPoints(std::ostream& vrml, const BIAS::RGBAuc &Color);
00562
00563     /** @brief only write (previously stored) points into an open vrml file */
00564     int VRMLOutPoints(std::ostream& vrml);
00565
00566     /** @brief only write (previously stored) cameras into an open vrml file,
00567         override their individual colors with Color */
00568     int VRMLOutPMatrices(std::ostream& vrml, const BIAS::RGBAuc &Color);
00569
00570
00571     /** @brief only write (previously stored) cameras into an open vrml file */
00572     int VRMLOutPMatrices(std::ostream& vrml);
00573
00574     /** @brief only write (previously stored) lines into an open vrml file,
00575         override their individual colors with Color */
00576     int VRMLOutLines(std::ostream& vrml, const BIAS::RGBAuc &Color);
00577
00578     /** @brief only write (previously stored) points into an open vrml file */
00579     int VRMLOutLines(std::ostream& vrml);
00580
00581     /** @brief only write (previously stored) ellipsoids to an open vrml file,
00582         override their individual colors with Color */
00583     int VRMLOutEllipsoids(std::ostream& vrml, const BIAS::RGBAuc &Color);
00584
00585     /** @brief only write (previously stored) ellipsoids into an open vrml
00586         file */
00587     int VRMLOutEllipsoids(std::ostream& vrml);
00588
00589     /** @brief only write (previously stored) images into an open vrml file */
00590     int VRMLOutImages(std::ostream& VRMLFile);
00591
00592     /** @brief only write (previously stored) face sets into an open vrml file
00593      * Will include texture into VRML as PixelTexture node.
00594      */
00595     int VRMLOutIndexedFaceSets(std::ostream& VRMLFile);
00596
00597     /** only write previously stored projection objects into opened vrml file.
00598      */
00599     int VRMLOutProjection(std::ostream& VRMLFile);
00600
00601     /** @brief write the VRML 2.0 header into an open file */
00602     int VRMLOutWriteHeader(std::ostream& vrml);
00603
00604     /** @brief write VRML 2.0 navigation info node @author Jan Woetzel */
00605     void VRMLOutWriteNavigationInfo(std::ostream& vrml);
00606
00607     /** write VRMl 2.0 viewpoint that can selecetd in vrml viewer @author Jan Woetzel */
00608     void VRMLOutWriteViewpoint(std::ostream& vrml);
00609
00610     /** @}
00611         @name Debug functions
00612         @{ */
00613     /** @brief list all internal 3d objects on cout */
00614     void Dump();
00615     /** @}  */
00616
00617     /** call by reference accessor for data member mapPMatrices_  JW */
00618     inline std::map< unsigned int, PMatrix3DData > & GetMapPMatrices()
00619     {
00620       return mapPMatrices_;
00621     }
00622
00623     /** get alpha opacity value as VRML transparency
00624         helper mapping, usually transparency = (1-alpha) */
00625     static double VRMLtransparency(const unsigned char alpha);
00626
00627     /** get alpha opacity component as VRML transparency  */
00628     static double VRMLtransparency(const BIAS::Vector4<unsigned char> & vRgba);
00629
00630     /** @brief write VRML viewpoint nodes for some P matrices ?
00631         @author Jan Woetzel */
00632     void SetWriteViewpoints(const bool & val);
00633
00634     // ------------------------------------------------------------
00635   protected:
00636
00637 #ifdef BIAS_HAVE_OPENGL
00638     void OpenGLOutPMatrices_(const BIAS::RGBAuc &Color, bool UseOneColor);
00639 #endif
00640
00641     // helper for VRMLOutPoints()
00642     int VRMLOutPointsAsPointSet_(std::ostream &VRMLFile);
00643     int VRMLOutPointsAsBoxes_(std::ostream &VRMLFile);
00644     int VRMLOutPointsAsSpheres_(std::ostream &VRMLFile);
00645
00646     /// this is an optimized strategy to avoid hundred of shape nodes
00647     int VRMLOutPMatricesAsArrows_(std::ostream& vrml, const BIAS::RGBAuc &Color);
00648     int VRMLOutPMatricesAsMesh_(std::ostream& vrml, const BIAS::RGBAuc &Color);
00649
00650     /** @brief replace invalid characters in def string and return corrected
00651         @author koeser */
00652     std::string CorrectDefString_(const std::string& defstring);
00653
00654     /// holds the params set by constructor or SetParams
00655     ThreeDOutParameters Params_;
00656
00657   private: // avoid DLL export
00658     /// the cameras are saved in a vector for efficiency reasons
00659     std::map<unsigned int, PMatrix3DData > mapPMatrices_;
00660   protected:
00661     /// counter for the next index, gaps (due to delete) are not reused by now
00662     unsigned int NextPIndex_;
00663
00664   private: // avoid DLL export
00665     /// map of all image structures
00666     std::map<unsigned int, Image3DData> mapImages_;
00667   protected:
00668     /// counter for the next index, gaps (due to delete) are not reused by now
00669     unsigned int NextImageIndex_;
00670
00671   private: // avoid DLL export
00672     /// map of all point structures
00673     std::map<unsigned int, Point3DData> mapPoints_;
00674   protected:
00675     /// counter for the next index, gaps (due to delete) are not reused by now
00676     unsigned int NextPointIndex_;
00677
00678   private: // avoid DLL export
00679     /// map of all line structures
00680     std::map<unsigned int, Line3DData> mapLines_;
00681   protected:
00682     /// counter for the next line index, gaps (due to delete) arent reused
00683     unsigned int NextLineIndex_;
00684
00685   private: // avoid DLL export
00686     /// map of all ellipsoid structures
00687     std::map<unsigned int, Ellipsoid3DData> mapEllipsoids_;
00688   protected:
00689     /// counter for the next ellipsoid index, gaps are not reused by now
00690     unsigned int NextEllipsoidIndex_;
00691
00692   private: // avoid DLL export
00693     std::map<unsigned int, IndexedFaceSet> mapIndexedFaceSet_;
00694   protected:
00695     unsigned int NextIndexedFaceSetIndex_;
00696
00697
00698   private: // avoid DLL export
00699     std::map<unsigned int, Projection3DData> mapProjection3D_;
00700   protected:
00701     unsigned int NextProjection3DIndex_;
00702
00703     bool WriteViewpoints_; //< write VRML viewpoint nodes for (some) PMatrices
00704   }; // end class
00705 } // end namespace
00706
00707
00708 #endif
00709
00710
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Tools/timeit.cpp Source File

Tools

timeit.cpp

Go to the documentation of this file.
00001 /** @example timeit.cpp
00002     @brief Helper to emulate the Unix "time" command on WIN32 platforms.
00003     Measure the duration of the execution of a command=timean application run.
00004     @author Jan Woetzel 2005
00005 */
00006
00007 #include <stdlib.h>
00008 #include <iostream>
00009 #include <string>
00010
00011 #include <Base/Debug/TimeMeasure.hh>
00012
00013 using namespace std;
00014 using namespace BIAS;
00015
00016 // JW
00017 int main(int argc, char** argv)
00018 {
00019     // usage:
00020     if (argc<=1){
00021         cout<<"usage: "<<endl;
00022         if (argc>0) cout<<argv[0]<<" ";
00023         cout<<"<application.exe> [<paramters>] "<<endl;
00024         cout<<"example: timeit mapp.exe -myarg1"<<endl;
00025         return -1;
00026     }
00027     // variables:
00028     int result = 0;
00029     string command="";
00030     TimeMeasure timer1;
00031
00032     // create command:
00033     for (int i=1; i<argc; i++)
00034     {
00035         command+=argv[i];
00036         command+= " "; // delim.
00037     }
00038     cout<<endl;
00039
00040     cout<<"timing: "<<command<<endl;
00041
00042     // run timed application as system call:
00043     timer1.Reset();
00044     timer1.Start();
00045     result = system( command.c_str() );
00046     timer1.Stop();
00047
00048     if (result!=0){
00049         cout<<"could not run, result="<<result<<endl;
00050         return -2;
00051     } else {
00052         cout<<"timing successful. "<<endl;
00053         // display final timing result:
00054         timer1.Print(cout);
00055     }
00056     return 0;
00057 }
Generated on Wed Jun 21 19:01:16 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasure.cpp Source File

Base » Debug

TimeMeasure.cpp

Go to the documentation of this file.
00001 #include "TimeMeasure.hh"
00002
00003 using namespace std;
00004 using namespace BIAS;
00005
00006 // this file only to instantiate this static member:
00007 std::ofstream BIAS::TimeMeasure::TimerStream_;
00008
00009
00010 // JW, woelk
00011 TimeMeasure::TimeMeasure()
00012 {
00013   timerclear(&rtRealSum);
00014   timerclear(&rtKernelSum);
00015   timerclear(&rtLast);
00016   timerclear(&rtActual);
00017
00018   user = 0;
00019   running = false;
00020   _dSum=0.0;
00021
00022 #ifdef WIN32
00023   kernel = 0;
00024   idle   = 0;
00025   _tscStart = _tscEnd = _tscTicks = 0;
00026   // \todo the timers are not correctly initailized on WIN32.
00027   /*
00028   startstruct.tms_utime=0;
00029   startstruct.tms_stime=0;
00030   startstruct.tms_cutime=0;
00031   startstruct.tms_cstime=0;
00032   stopstruct.tms_utime=0;
00033   stopstruct.tms_stime=0;
00034   stopstruct.tms_cutime=0;
00035   stopstruct.tms_cstime=0;
00036   */
00037 #else // WIN32
00038 #  ifdef __i386__
00039   _uiHiStart=_uiLoStart=_uiHiStop=_uiLoStop=0;
00040 #  endif
00041 #endif //WIN32
00042 }
00043
00044
00045
00046 // JW
00047 //static
00048 void TimeMeasure::MSecondsToHumanReadable(
00049   const unsigned long & msIN,
00050   int & msecOUT,
00051   int & seconds,
00052   int & minutes,
00053   int & hours,
00054   int & days,
00055   int & weeks
00056   )
00057 {
00058   unsigned long rest = msIN; // remainder
00059
00060   msecOUT = rest % 1000; // 1000 msec each second
00061   rest -= msecOUT;
00062   rest /= 1000; // now seconds
00063
00064   seconds = rest % 60; // 60 seconds each minute
00065   rest -= seconds;
00066   rest /= 60; // now minutes
00067
00068   minutes = rest % 60;// 60 minutes each hour
00069   rest -= minutes;
00070   rest /= 60; // now hours
00071
00072   hours = rest % 24;// 24 hours each day
00073   rest -= hours;
00074   rest /= 24; // now days
00075
00076   days = rest % 7;// 7 days a week
00077   rest -= days;
00078   rest /= 7; // now week
00079
00080   weeks = rest;
00081   // do not split further
00082   // because days pe rmonth vary (28-31 days, const 365 day year is too long for me to wait anyhow ;-)
00083 }
00084
00085 //JW
00086 //static
00087 std::ostream & TimeMeasure::PrintMsecHumanReadable(const unsigned long msecIN,
00088                                                    std::ostream &os)
00089 {
00090   int ms, sec, minutes, hh, dd, ww;
00091   MSecondsToHumanReadable(msecIN, ms, sec, minutes, hh, dd, ww);
00092
00093   bool display=false;
00094   if (ww>0) display=true;
00095   if (display) os<<setw(3)<<ww<<" weeks ";
00096
00097   if (hh>0) display=true;
00098   if (display) os<<setw(3)<<dd<<" days ";
00099
00100   if (dd>0) display=true;
00101   if (display) os<<setw(3)<<hh<<" hours ";
00102
00103   if (minutes>0) display=true;
00104   if (display) os<<setw(3)<<minutes<<" minutes ";
00105
00106   if (sec>0) display=true;
00107   if (display) os<<setw(3)<<sec<<" sec ";
00108
00109   if (!display){
00110     // display zero at least:
00111     os<<setw(3)<<ms<<" msec";
00112   } else if (ms>0){
00113     // suppress displaying 0 msec.
00114     os<<setw(3)<<ms<<" msec";
00115   };
00116
00117   return os;
00118 }
00119
00120
00121 double TimeMeasure::MeasureOverhead()
00122 {
00123   /* Do it twice to eliminate cache effects */
00124   int i;
00125   double result=0;
00126
00127   for (i = 0; i < 2; i++) {
00128     Reset();
00129     Start();
00130     Stop();
00131     result = GetCycleCount();
00132   }
00133   return result;
00134 }
00135
00136 double TimeMeasure::MeasureProcessorFrequency()
00137 {
00138   double rate;
00139   int sleeptime=2;
00140
00141   Start();
00142   sleep(sleeptime);
00143   Stop();
00144   rate = GetCycleCount() / (1e6*sleeptime);
00145
00146   return rate;
00147 }
00148
00149 void TimeMeasure::
00150 PrintRealTime(std::ostream& os, const bool &verbose) const
00151 {
00152   os<<"real:   "
00153     <<std::setw(12)
00154     <<GetRealTime()<<" us ";
00155   if (verbose) {
00156     os<<"\t(";
00157     PrintMsecHumanReadable( long(GetRealTime() /1000.0 ), os);
00158     os<<")";
00159   }
00160   os<<std::endl;
00161 }
00162
00163 void TimeMeasure::
00164 PrintUserTime(std::ostream& os,  const bool & verbose) const
00165 {
00166   os << "user:   "
00167     <<std::setw(12)
00168     <<GetUserTime()<<" ms ";
00169   if (verbose) {
00170     //os<<"         "; // align with printrealtime
00171     os<<"\t(";
00172     PrintMsecHumanReadable( long(GetUserTime()), os);
00173     os<<")";
00174   }
00175   os<<std::endl;
00176 }
00177
00178 void TimeMeasure::
00179 PrintKernelTime(std::ostream& os,  const bool & verbose) const
00180 {
00181   os << "kernel: "
00182     <<std::setw(12)
00183     <<GetKernelTime()<<" ms ";
00184   if (verbose) {
00185     os<<"\t(";
00186     PrintMsecHumanReadable( long(GetKernelTime()), os);
00187     os<<")";
00188   }
00189   os<<std::endl;
00190 }
00191
00192 void TimeMeasure::
00193 PrintIdleTime(std::ostream& os,  const bool & verbose) const
00194 {
00195   os << "idle:   "
00196     <<std::setw(12)
00197     <<GetIdleTime()<<" ms ";
00198   if (verbose) {
00199     os<<"\t(";
00200     PrintMsecHumanReadable( long(GetIdleTime()), os);
00201     os<<")";
00202   }
00203   os<<std::endl;
00204 }
00205
00206 void TimeMeasure::PrintCycleCount(std::ostream& os) const
00207 {
00208   os << "cycles: "
00209     <<std::setw(14)
00210     <<GetCycleCount()<<std::endl;
00211 }
00212
00213 void TimeMeasure::CloseTimerFile()
00214 {
00215   TimerStream_.close();
00216 }
00217
00218
00219 void TimeMeasure::SetTimerFile(const std::string &file)
00220 {
00221   //   if (TimerStream_) TimerStream_.close();
00222   TimerStream_.open(file.c_str(), std::ios_base::app);
00223   if (!TimerStream_) {
00224     BIASERR("Can not open TimerFile "<<file
00225       <<" in TimeMeasure::SetTimerFile()")
00226       perror(file.c_str());
00227     BIASABORT;
00228   }
00229 }
00230
00231 void TimeMeasure::LogToFileAndReset(const std::string &comment)
00232 {
00233   Stop();
00234   if (!TimerStream_) BIASERR("TimerStream_ not open");
00235   TimerStream_<<"real: "<<std::setw(10)<<GetRealTime()/1e3
00236     <<"\tuser: "<<std::setw(6)<<GetUserTime()
00237     <<"\t"<<comment<<std::endl;
00238   Reset();
00239 }
00240
00241
00242 double TimeMeasure::GetRealTime() const
00243 {
00244   return (double)(rtRealSum.tv_usec + (rtRealSum.tv_sec*1E6));
00245 }
00246
00247 double TimeMeasure::GetUserTime() const
00248 {
00249   //cerr << "sysconf(_SC_CLK_TCK): " << sysconf(_SC_CLK_TCK) << endl;
00250   // see ` man 2 times`
00251 #ifdef WIN32
00252   return (double)user/(double)CLOCKS_PER_SEC * 1e3;
00253 #else // WIN32
00254   return (double)user/(double)sysconf(_SC_CLK_TCK) * 1e3;
00255 #endif // WIN32
00256 }
00257
00258 double TimeMeasure::GetKernelTime() const
00259 {
00260 #ifdef WIN32
00261   return (double)kernel/(double)CLOCKS_PER_SEC * 1e3;
00262 #else // WIN32
00263   return 0.0;
00264 #endif // WIN32
00265 }
00266
00267 double TimeMeasure::GetIdleTime() const
00268 {
00269 #ifdef WIN32
00270   return (double)idle/(double)CLOCKS_PER_SEC * 1e3;
00271 #else // WIN32
00272   return 0.0;
00273 #endif // WIN32
00274 }
00275
00276 double TimeMeasure::GetFreq() const
00277 {
00278   return 1E6/GetRealTime();
00279 }
00280
00281 double TimeMeasure::GetUserFreq() const
00282 {
00283   return 1E3/GetUserTime();
00284 }
00285
00286 bool TimeMeasure::IsRunning() const
00287 {
00288   return running;
00289 }
00290
00291
00292 double TimeMeasure::GetCycleCount() const
00293 {
00294 #ifdef BIAS_DEBUG
00295   if(running) {
00296     BIASERR("you called GetCycleCount() while timer is running");
00297   }
00298 #endif
00299   return _dSum;
00300 }
00301
00302
00303 void TimeMeasure::Reset()
00304 {
00305   if (running){
00306     BIASERR("cannot reset running TimeMeasure");
00307   } else {
00308 #ifdef WIN32
00309     _tscStart = _tscEnd = _tscTicks = 0;
00310 #else // WIN32
00311 #  ifdef __i386__
00312     _uiHiStart=_uiLoStart=_uiHiStop=_uiLoStop=0;
00313 #  endif // __i386__
00314 #endif // WIN32
00315
00316     _dSum=0.0;
00317     timerclear(&rtRealSum);
00318     timerclear(&rtKernelSum);
00319     user = 0;
00320   }
00321 }
00322
00323
00324 void TimeMeasure::Print(std::ostream& os) const
00325 {
00326   PrintRealTime(os);
00327   PrintUserTime(os);
00328 #ifdef WIN32
00329   PrintKernelTime(os);
00330   PrintIdleTime(os);
00331 #endif
00332   PrintCycleCount(os);
00333 }
00334
00335
00336
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasure.hh Source File

Base » Debug

TimeMeasure.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _TIMEMEASURE_H_261946892_
00027 #define _TIMEMEASURE_H_261946892_
00028
00029 #ifdef WIN32
00030
00031 #  ifndef _WIN32_WINNT
00032 #    define _WIN32_WINNT 0x0501 // Windows XP for GetSystemTimes
00033 #  endif // _WIN32_WINNT
00034
00035 #  include <time.h>
00036 #  include <Base/Common/W32Compat.hh>
00037 #  include <Windows.h> // global inc is dangerous. move imp. to cpp ?
00038
00039 struct tms {
00040   clock_t tms_utime;  /* user time */
00041   clock_t tms_stime;  /* system time */
00042   clock_t tms_cutime; /* user time of children */
00043   clock_t tms_cstime; /* system time of children */
00044 };
00045
00046 #else // WIN32
00047
00048 // Linux
00049 #  include <sys/time.h>
00050 #  include <sys/times.h>
00051 #  include <unistd.h>
00052
00053 #endif // WIN32
00054
00055
00056 #include <fstream>
00057 #include <errno.h>
00058 #include <stdlib.h>
00059 #include <limits.h>
00060
00061 // stl strings:
00062 #include <string>
00063 #include <iostream>
00064
00065 // debugging information
00066 #include "Debug.hh"
00067 #include "Error.hh"
00068
00069
00070
00071
00072
00073
00074
00075 namespace BIAS {
00076
00077 #ifdef WIN32
00078   /** @brief get "Time Stamp Counter"  on Pentium like CPU's.
00079   Assembler function without prolog and epilog.
00080   Should work on Intel Pentium and newer AMD CPU's, see rdtsc assembler instruction.
00081   This functions can't be class member inlined because it collides with naked fastcall.
00082   \todo cleanup TimeMeasure class in platform independant manner. (JW)
00083   \bug user/system time is implemented wrong on WIN32. see time and clock functions (JW)
00084
00085   @returns the number of clock cycles since the CPU was powered up or reset.
00086   @author Jan Woetzel, 12/2004 */
00087   // int64 has no ANSI equivalent (JW)
00088   //__int64 BIASGetTSC(void){ return 0; }; // fallback workaround implementation
00089   __forceinline __int64 __fastcall GetTSC(){__asm rdtsc  };
00090
00091   /** @brief compute the difference between two int64 cycle counts using 12 bit overflow mask .
00092   @author Jan Woetzel 12/2004 */
00093   inline __int64 GetTSCTicks(__int64 start, __int64 end) {return ((end - start) & 0xFFFFFFFFFFFF);};
00094 #endif // WIN32
00095
00096
00097
00098
00099
00100   /**  @class TimeMeasure
00101   @ingroup g_utils
00102   @brief class TimeMeasure contains functions for timing real time and
00103   cpu (kernel) time.
00104
00105   added Win32 rdtsc assembler cycle count with int64  jw 12/2004
00106   added Linux cycle count functions for i386-processors woelk 07/2003
00107
00108   @author Jan Woetzel (03/04/2002 - 11/2005) **/
00109   class  BIASDebug_EXPORT TimeMeasure {
00110
00111
00112   public:
00113     /// default constructor:
00114     TimeMeasure();
00115
00116     /// print the output when the desctructor is called ?
00117     ~TimeMeasure() {};
00118
00119     inline void Start();
00120     // DEPRECATED  void start() { Start(); };
00121
00122     inline void Stop();
00123     // DEPRECATED  void stop() { Stop(); };
00124
00125     void Print(std::ostream& os=std::cout) const;
00126     // DEPRECATED  void print() const { Print(); };
00127
00128     void Reset();
00129     // DEPRECATED  void reset() { Reset(); };
00130
00131     /** return real time (=wall time clock) in usec JW */
00132     double GetRealTime() const;
00133
00134     /** return user time (=system usage time) in msec JW */
00135     double GetUserTime() const;
00136
00137     /** WIN32: return time that system spended in kernel mode in msec cmenk */
00138     double GetKernelTime() const;
00139
00140     /** WIN32: return time that system spended in idle mode in msec cmenk */
00141     double GetIdleTime() const;
00142
00143     /** returns the frequency in Hz based on real time (= fps)*/
00144     double GetFreq() const;
00145
00146     /** returns the frequency in Hz based on user time (= fps)*/
00147     double GetUserFreq() const;
00148
00149     /** print the real time (=wall time clok)
00150     @param verbose true for additionoutput in days hour sminutes seconds
00151     Jan Woetzel */
00152     void PrintRealTime(std::ostream& os=std::cout,
00153       const bool & verbose=true) const;
00154     // DEPRECATED  void printRealTime() const { PrintRealTime(); };
00155
00156     /** print the user time (=system usage time)
00157     @param verbose true for additionoutput in days hour sminutes seconds
00158     Jan Woetzel */
00159     void PrintUserTime(std::ostream& os=std::cout,
00160       const bool & verbose=true) const;
00161     // DEPRECATED  void printUserTime() const { PrintUserTime() ; };
00162
00163     /** print the time that the system spended in kernel mode (WIN32)
00164     @param verbose true for additionoutput in days hour sminutes seconds
00165     cmenk */
00166     void PrintKernelTime(std::ostream& os=std::cout,
00167       const bool & verbose=true) const;
00168     // DEPRECATED  void printKernelTime() const { PrintKernelTime() ; };
00169
00170     /** print the time that the system spended in idle mode
00171     @param verbose true for additionoutput in days hour sminutes seconds
00172     cmenk */
00173     void PrintIdleTime(std::ostream& os=std::cout,
00174       const bool & verbose=true) const;
00175     // DEPRECATED  void printIdleTime() const { PrintIdleTime() ; };
00176
00177     bool IsRunning() const;
00178
00179     void SetTimerFile(const std::string &file);
00180     void LogToFileAndReset(const std::string &comment);
00181     void CloseTimerFile();
00182
00183     /** return number of cycles between all subsequent calls
00184     to Start() and Stop() since last call to Reset()
00185     @author woelk */
00186     double GetCycleCount() const;
00187
00188     /** prints the number of cycles between subsequent
00189     calls to Start() and Stop()  since last call to Reset() to os
00190     @author woelk */
00191     void PrintCycleCount(std::ostream& os=std::cout) const ;
00192
00193     /* Set *hi and *lo to the high and low order bits  of the cycle counter.
00194     Implementation requires assembly code to use the rdtsc instruction.
00195     @author woelk (Linux), Win32 by Jan Woetzel */
00196     inline
00197       void ReadCycleCounter(unsigned int *hi, unsigned int *lo);
00198
00199
00200     /** returns the number of cycles between subsequent Start() and Stop()
00201     calls !! implies a Reset(); !!!
00202     @author woelk */
00203     double MeasureOverhead();
00204
00205     /** measures the ProcessorFrequency in MHz
00206     @author woelk */
00207     double MeasureProcessorFrequency();
00208
00209
00210     /** converts a given amount of millisecs to human redabel format
00211
00212     extracts hours, minutes, seconds, msecs from amout of msecs (1/1000 sec).
00213     @param msecIN input parameter
00214     @author Jan Woetzel */
00215     static void MSecondsToHumanReadable(const unsigned long & msIN,
00216       int & msecOUT,
00217       int & seconds,
00218       int & minutes,
00219       int & hours,
00220       int & days,
00221       int & weeks );
00222
00223     /** display nr of msecs in format weeks,days,hours,minutes,seconds */
00224     static std::ostream & PrintMsecHumanReadable(const unsigned long msecIN,
00225       std::ostream &os=std::cout);
00226
00227
00228
00229   protected:
00230     timeval rtRealSum;
00231     timeval rtLast;
00232     timeval rtActual;
00233     timeval rtKernelSum;
00234     clock_t user; // user time
00235     struct tms startstruct, stopstruct; // see `man 2 times`
00236     bool running; // boolean to tell wether the clock is running or not
00237
00238 #ifdef WIN32
00239     FILETIME _UserTimeStart,   _UserTimeStop;
00240     FILETIME _KernelTimeStart, _KernelTimeStop;
00241     FILETIME _IdleTimeStart,   _IdleTimeStop;
00242     clock_t kernel; // kernel time
00243     clock_t idle;   // idle time
00244 #endif // WIN32
00245
00246     double _dSum;
00247
00248 #ifdef WIN32
00249     __int64 _tscStart, _tscEnd, _tscTicks;
00250 #else // WIN32
00251 #  ifdef __i386__
00252     unsigned int _uiHiStart, _uiLoStart, _uiHiStop, _uiLoStop;
00253 #  endif // __i386__
00254 #endif // WIN32
00255
00256
00257     // have one file stream to log to for all timer instances
00258     static std::ofstream TimerStream_;
00259
00260   }; // class -----------------------------------
00261
00262
00263   //
00264   // inline IMPLEMENTATIONs
00265   //
00266
00267
00268   inline
00269     void TimeMeasure::Start()
00270   {
00271 #ifdef BIAS_DEBUG
00272     if(running)
00273       BIASERR("clock already started");
00274 #endif // BIAS_DEBUG
00275
00276     running = true;
00277
00278 #ifdef WIN32
00279
00280     if ((rtLast.tv_usec=clock()) == -1)
00281       BIASERR("error starting real timer "<<errno);
00282
00283     //#  if _WIN32_WINNT >= 0x0501 // see winbase.h
00284     //GetSystemTimes(&_IdleTimeStart, &_KernelTimeStart, &_UserTimeStart);
00285     //#  endif // _WIN32_WINNT >= 0x0501
00286
00287     _tscStart = BIAS::GetTSC();
00288
00289 #else // WIN32
00290     // Linux
00291
00292     gettimeofday(&rtLast,NULL);
00293     if (times(&startstruct) == -1)
00294       BIASERR("error starting user timer "<<errno);
00295
00296 #  ifdef __i386__
00297     ReadCycleCounter(&_uiHiStart, &_uiLoStart);
00298 #  endif //__i386__
00299
00300 #endif // WIN32
00301   }
00302
00303
00304   inline
00305     void TimeMeasure::Stop()
00306   {
00307     if(running) {
00308 #ifdef WIN32
00309       _tscEnd=BIAS::GetTSC();
00310
00311       // CRT clock() return the elapsed CPU time sonce process start
00312       // which is a realtime, *not* CPU computing time which is displayed in task manager! (JW)
00313       if ((rtActual.tv_usec=clock()) == -1)
00314       {
00315         BIASERR("error stoping real timer "<<errno);
00316       }
00317
00318 #  if _WIN32_WINNT >= 0x0501 // see winbase.h
00319       //GetSystemTimes(&_IdleTimeStop, &_KernelTimeStop, &_UserTimeStop);
00320 #  endif //_WIN32_WINNT
00321       FILETIME diffUserTime, diffKernelTime, diffIdleTime;
00322
00323       // Compute time that system spended in user, kernel and idle mode
00324       diffUserTime.dwHighDateTime   = _UserTimeStop.dwHighDateTime   - _UserTimeStart.dwHighDateTime;
00325       diffUserTime.dwLowDateTime    = _UserTimeStop.dwLowDateTime    - _UserTimeStart.dwLowDateTime;
00326       diffKernelTime.dwHighDateTime = _KernelTimeStop.dwHighDateTime - _KernelTimeStart.dwHighDateTime;
00327       diffKernelTime.dwLowDateTime  = _KernelTimeStop.dwLowDateTime  - _KernelTimeStart.dwLowDateTime;
00328       diffIdleTime.dwHighDateTime   = _IdleTimeStart.dwHighDateTime   - _IdleTimeStart.dwHighDateTime;
00329       diffIdleTime.dwLowDateTime    = _IdleTimeStart.dwLowDateTime    - _IdleTimeStart.dwLowDateTime;
00330
00331       // convert to system time an derive new user time in ms
00332       SYSTEMTIME userUTC, kernelUTC, idleUTC;
00333
00334       // compute time that system spended in user, kernel and idle mode
00335       FileTimeToSystemTime(&diffUserTime,   &userUTC);
00336       FileTimeToSystemTime(&diffKernelTime, &kernelUTC);
00337       FileTimeToSystemTime(&diffIdleTime,   &idleUTC);
00338       user   += (userUTC.wMilliseconds   + 1000 * userUTC.wSecond   + 60*1000 * userUTC.wMinute);
00339       kernel += (kernelUTC.wMilliseconds + 1000 * kernelUTC.wSecond + 60*1000 * kernelUTC.wMinute);
00340       idle   += (idleUTC.wMilliseconds   + 1000 * idleUTC.wSecond   + 60*1000 * idleUTC.wMinute);
00341
00342       rtRealSum.tv_sec  += (rtActual.tv_usec - rtLast.tv_usec) / CLOCKS_PER_SEC;
00343       rtRealSum.tv_usec += (rtActual.tv_usec - rtLast.tv_usec) % CLOCKS_PER_SEC;
00344 #else // WIN32
00345 #  ifdef __i386__
00346       ReadCycleCounter(&_uiHiStop, &_uiLoStop);
00347 #  endif // __i386__
00348
00349       gettimeofday(&rtActual, NULL);
00350       if (times(&stopstruct) == -1){
00351         BIASERR("error stopping user timer "<<errno);
00352       }
00353       //cerr << "stop s: "<<rtActual.tv_sec<<"\tus: "<<rtActual.tv_usec<<std::endl;
00354       rtRealSum.tv_sec += rtActual.tv_sec  - rtLast.tv_sec;
00355       long usec;
00356       if (rtActual.tv_usec >  rtLast.tv_usec) {
00357         usec = rtActual.tv_usec - rtLast.tv_usec;
00358       } else {
00359         usec = 1000000-rtLast.tv_usec+rtActual.tv_usec;
00360         rtRealSum.tv_sec--;
00361       }
00362       rtRealSum.tv_usec += usec;
00363       // cerr << "act s: "<<rtActual.tv_sec<<"\tus: "<<rtActual.tv_usec<<endl;
00364       // cerr << "lst s: "<<rtLast.tv_sec<<"\tus: "<<rtLast.tv_usec<<endl;
00365       // cerr<<"stop s: "<<rtRealSum.tv_sec<<"\tus: "<<rtRealSum.tv_usec<<endl;
00366
00367       user += stopstruct.tms_utime - startstruct.tms_utime;
00368 #endif // WIN32
00369
00370       //cerr << "stopstruct.tms_utime: " << stopstruct.tms_utime << endl;
00371 #ifdef WIN32
00372       _tscTicks = BIAS::GetTSCTicks(_tscStart, _tscEnd);
00373       _dSum += _tscTicks;
00374 #else // WIN32
00375 #  ifdef __i386__
00376       double count;
00377       if (_uiLoStop>_uiLoStart)
00378         count = ((double)_uiHiStop-(double)_uiHiStart)*(double)UINT_MAX+
00379         (double)_uiLoStop-(double)_uiLoStart;
00380       else
00381         count = ((double)_uiHiStop-(double)_uiHiStart-1)*(double)UINT_MAX+
00382         (double)_uiLoStop+(double)UINT_MAX-(double)_uiLoStart;
00383       _dSum+=count;
00384 #  endif    //__i386__
00385 #endif // WIN32
00386
00387
00388       running = false;
00389     } else {
00390       BIASERR("cannot stop clock befor starting it");
00391       BIASASSERT(running);
00392     }
00393   }
00394
00395
00396
00397 #ifndef WIN32
00398 #  ifdef __i386__
00399   inline
00400     void TimeMeasure::ReadCycleCounter(unsigned int *hi, unsigned int *lo)
00401   {
00402     // Linux: Felix
00403     // see BIAS::GetTSC for WIN32 equivalent (jw)
00404     asm("rdtsc; movl %%edx,%0; movl %%eax,%1"   /* Read cycle counter */
00405       : "=r" (*hi), "=r" (*lo)                /* and move results to */
00406       : /* No input */                        /* the two outputs */
00407     : "%edx", "%eax");
00408   }
00409 #  endif // __i386__
00410 #endif // WIN32
00411
00412
00413
00414 } // namespace
00415 #endif // _TIMEMEASURE_H_261946892_
00416
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Debug/TimeMeasurement.hh Source File

Base » Debug

TimeMeasurement.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _TIMEMEASUREMENT_H_
00027 #define _TIMEMEASUREMENT_H_
00028
00029 #include <bias_config.h>
00030 #include <string>
00031 #include <iostream>
00032 #include <Base/Debug/TimeMeasure.hh>
00033
00034 /** @ingroup g_utils
00035 @file TimeMeasurement.hh
00036 @brief Time measurement based on instance construction and destruction
00037
00038 Usage:
00039 \verbatim:
00040 // -- previous other code ...
00041 {
00042   // -- more previous other code ...
00043   // construct an instance as "Start" function:
00044   BIAS::TimeMeasurement timerInstance;
00045   // >> code to be timed here, e.g.:
00046   Sleep(1000);
00047   // <<
00048 } // Stop by automatic destruction of instance
00049   // due to end of scope at closing bracket
00050 // -- later other code -- ...
00051 \endverbatim
00052 @author Jan Woetzel */
00053 namespace BIAS {
00054   class TimeMeasurement
00055   {
00056   public:
00057     /// destructor working as STOP function
00058     ~TimeMeasurement(){
00059       timer_.Stop();
00060       if (this->description_.size()>0)
00061         std::cout<<"TimeMeasurement "<<this->description_<<" :"<<std::endl;
00062       timer_.Print();
00063     }
00064
00065     /// constructor working as START function
00066     TimeMeasurement()
00067     {
00068       Start();
00069     }
00070
00071     /// constructor with additional description
00072     TimeMeasurement(const std::string & str){
00073       description_ = str;
00074       Start();
00075     }
00076
00077     /** @brief Reset and Start the timer
00078
00079     Useful for earlier construction
00080     @author Jan Woetzel */
00081     void Start(){
00082       timer_.Reset();
00083       timer_.Start();
00084     }
00085
00086   protected:
00087     /// local timer used by ctor and detor
00088     BIAS::TimeMeasure timer_;
00089     std::string description_;
00090   }; // end of class TimeMeasurement
00091 } // end of namespace
00092
00093
00094 #endif // _TIMEMEASUREMENT_H_
00095
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tnt.h Source File

Base » Math » tnt

tnt.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033 #ifndef TNT_H
00034 #define TNT_H
00035
00036 #include <bias_config.h>
00037
00038 //---------------------------------------------------------------------
00039 //  tnt.h       TNT general header file.  Defines default types
00040 //              and conventions.
00041 //---------------------------------------------------------------------
00042
00043 //---------------------------------------------------------------------
00044 //  Include current version
00045 //---------------------------------------------------------------------
00046 #include "version.h"
00047
00048 //---------------------------------------------------------------------
00049 // Define the data type used for matrix and vector Subscripts.
00050 // This will default to "int", but it can be overriden at compile time,
00051 // e.g.
00052 //
00053 //      g++ -DTNT_SUBSCRIPT_TYPE='unsinged long' ...
00054 //
00055 // See subscript.h for details.
00056 //---------------------------------------------------------------------
00057
00058 #include "subscript.h"
00059
00060
00061
00062 //---------------------------------------------------------------------
00063 // Define this macro if you want  TNT to ensure all refernces
00064 // are within the bounds of the array.  This encurs a run-time
00065 // overhead, of course, but is recommended while developing
00066 // code.  It can be turned off for production runs.
00067 //
00068 //       #define TNT_BOUNDS_CHECK
00069 //---------------------------------------------------------------------
00070 //
00071 #ifdef BIAS_DEBUG
00072 #  define TNT_BOUNDS_CHECK
00073 #  ifdef TNT_NO_BOUNDS_CHECK
00074 #    undef TNT_BOUNDS_CHECK
00075 #  endif
00076 #endif
00077
00078 //---------------------------------------------------------------------
00079 // Define this macro if you want to utilize matrix and vector
00080 // regions.  This is typically on, but you can save some
00081 // compilation time by turning it off.  If you do this and
00082 // attempt to use regions you will get an error message.
00083 //
00084 //       #define TNT_USE_REGIONS
00085 //---------------------------------------------------------------------
00086 //
00087 // JW: Off.
00088 //#define TNT_USE_REGIONS
00089
00090
00091
00092 //---------------------------------------------------------------------
00093 //
00094 //---------------------------------------------------------------------
00095 // if your system doesn't have abs() min(), and max() uncoment the following
00096 //---------------------------------------------------------------------
00097 //
00098 //
00099 //#define __NEED_ABS_MIN_MAX_
00100
00101 #include "tntmath.h"
00102
00103
00104 #endif
00105 // TNT_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tntmath.h Source File

Base » Math » tnt

tntmath.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Header file for scalar math functions
00035
00036 #ifndef TNTMATH_H
00037 #define TNTMATH_H
00038
00039 // conventional functions required by several matrix algorithms
00040
00041 // min and max macros are defined in WIN32, collision results
00042 #ifdef WIN32
00043   #undef min
00044   #undef max
00045 #endif //WIN32
00046
00047 namespace TNT
00048 {
00049
00050 inline double abs(double t)
00051 {
00052     return ( t > 0 ? t : -t);
00053 }
00054
00055 inline double min(double a, double b)
00056 {
00057     return (a < b ? a : b);
00058 }
00059
00060 inline double max(double a, double b)
00061 {
00062     return (a > b ? a : b);
00063 }
00064
00065 // JW 04/23/2002
00066 inline double max(int a, int b)
00067 {
00068     return (a > b ? a : b);
00069 }
00070
00071 // JMF 01/27/2003
00072 inline double min(int a, int b)
00073 {
00074     return (a < b ? a : b);
00075 }
00076
00077 inline float abs(float t)
00078 {
00079     return ( t > 0 ? t : -t);
00080 }
00081
00082 inline float min(float a, float b)
00083 {
00084     return (a < b ? a : b);
00085 }
00086
00087 inline float max(float a, float b)
00088 {
00089     return (a > b ? a : b);
00090 }
00091
00092 inline double sign(double a)
00093 {
00094     return (a > 0 ? 1.0 : -1.0);
00095 }
00096
00097
00098
00099 inline float sign(float a)
00100 {
00101     return (a > 0.0 ? 1.0f : -1.0f);
00102 }
00103
00104 } /* namespace TNT */
00105
00106
00107 #endif
00108 /* TNTMATH_H */
00109
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/tntreqs.h Source File

Base » Math » tnt

tntreqs.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // The requirements for a bare-bones vector class:
00035 //
00036 //
00037 //   o) must have 0-based [] indexing for const and
00038 //          non-const objects  (i.e. operator[] defined)
00039 //
00040 //   o) must have size() method to denote the number of
00041 //          elements
00042 //   o) must clean up after itself when destructed
00043 //          (i.e. no memory leaks)
00044 //
00045 //   -) must have begin() and end() methods  (The begin()
00046 //          method is necessary, because relying on
00047 //          &v_[0] may not work on a empty vector (i.e. v_ is NULL.)
00048 //
00049 //   o) must be templated
00050 //   o) must have X::value_type defined to be the types of elements
00051 //   o) must have X::X(const &x) copy constructor (by *value*)
00052 //   o) must have X::X(int N) constructor to N-length vector
00053 //          (NOTE: this constructor need *NOT* initalize elements)
00054 //
00055 //   -) must have X::X(int N, T scalar) constructor to initalize
00056 //          elements to value of "scalar".
00057 //
00058 //       ( removed, because valarray<> class uses (scalar, N)  rather
00059 //              than (N, scalar) )
00060 //   -) must have X::X(int N, const T* scalars) constructor to copy from
00061 //              any C linear array
00062 //
00063 //         ( removed, because of same reverse order of valarray<> )
00064 //
00065 //   o) must have assignment A=B, by value
00066 //
00067 //  NOTE: this class is *NOT* meant to be derived from,
00068 //  so its methods (particularly indexing) need not be
00069 //  declared virtual.
00070 //
00071 //
00072 //  Some things it *DOES NOT* need to do are
00073 //
00074 //  o) bounds checking
00075 //  o) array referencing (e.g. reference counting)
00076 //  o) support () indexing
00077 //  o) I/O
00078 //
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToHSL.cpp Source File

Base » Image

ToHSL.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ImageConvert.hh"
00026
00027 using namespace BIAS;
00028
00029
00030 namespace BIAS
00031 {
00032
00033   template <class StorageType>
00034     BIASImageBase_EXPORT
00035     int ImageConvert::ToHSL(Image<StorageType>& source,
00036     Image<StorageType> &dest)
00037   {
00038     int res = -1;
00039
00040     if (dest.IsEmpty())
00041       dest.Init(source.GetWidth(), source.GetHeight(), 3,
00042       source.GetStorageType());
00043
00044 #ifdef BIAS_DEBUG
00045     if ( (dest.GetHeight()!=source.GetHeight()) ||
00046       (dest.GetWidth()!=source.GetWidth()) )     {
00047         BIASERR("ImageConvert::ToHSL() should be called with images of"\
00048           <<" same size");
00049       }
00050 #endif
00051
00052       switch (source.GetColorModel()) {
00053   case ImageBase::CM_RGB:
00054     res = RGBToHSL_(source,dest);
00055     break;
00056   case ImageBase::CM_BGR:
00057     res = BGRToHSL_(source,dest);
00058     break;
00059   case ImageBase::CM_BGRA:
00060     res = BGRAToHSL_(source,dest);
00061     break;
00062   default:
00063     BIASERR("Image::ToHSL(): color model not implemented for "<<
00064       source.GetColorModel());
00065     break;
00066       }
00067       dest.SetColorModel(ImageBase::CM_HSL);
00068       return res;
00069   }
00070
00071
00072
00073   template <class StorageType>
00074     int ImageConvert::RGBToHSL_(Image<StorageType>& source,
00075     Image<StorageType> &/*dest*/)
00076   {
00077     BIASERR("ImageConvert::RGBToHSL only for <float> and <unsgined char> not "<<
00078       source.GetStorageType());
00079     return -1;
00080   }
00081
00082
00083   // S and L in [0..1]
00084   // H in [0..360] where red is 360=0 , blue is 240 and green is 120;
00085   template <>
00086     int ImageConvert::RGBToHSL_(Image<float>& source, Image<float> &dest)
00087
00088   {
00089     register float *R = source.GetImageData();
00090     register float *G = NULL , *B = NULL;
00091     register float *ImageDataEnd =
00092       R + source.GetPixelCount() *  source.GetChannelCount();
00093     register float *H = dest.GetImageData();
00094     register float *S = NULL , *L = NULL;
00095     register float Min = 0, Max = 0;
00096     float MinVal = 0, MaxVal = 0;
00097
00098     // scale image so RGB Values are between 0.0 and 1.0
00099     // if necessairy
00100     for (unsigned short int i = 0; i < dest.GetChannelCount(); i++){
00101       source.GetMinMaxPixelValue(Min, Max, i);
00102       if (Max > MaxVal)
00103         MaxVal = Max;
00104       if (Min < MinVal)
00105         MinVal = Min;
00106     }
00107     if ( (MinVal < 0.0) || (MaxVal > 1.0) )
00108       source.ScaleShiftBetween(0.0, 1.0);
00109
00110     if (source.IsPlanar()){
00111
00112       G = R + source.GetPixelCount();
00113       B = G + source.GetPixelCount();
00114       S = H + dest.GetPixelCount();
00115       L = S + dest.GetPixelCount();
00116       while (R < ImageDataEnd){
00117         // calc Max and Min
00118         if ( (*R >= *G) && (*R >= *B) ){
00119           Max = *R;
00120           if (*G <= *B)
00121             Min = *G;
00122           else
00123             Min = *B;
00124         } else if (*G >= *B){
00125           Max = *G;
00126           if (*B <= *R)
00127             Min = *B;
00128           else
00129             Min = *R;
00130         } else {
00131           Max = *B;
00132           if (*R <= *G)
00133             Min = *R;
00134           else
00135             Min = *G;
00136         }
00137         *L = (Max + Min) / 2.0f;
00138         if (Max == Min){
00139           *H = 240;
00140           *S = 0;
00141         } else {
00142           // Saturation
00143           if ((*L) > 0.5 ) *S=(Max-Min)/(Max+Min);
00144           else  *S=(Max-Min)/(2.0f-Max-Min);
00145           // H (ue)
00146           if (*R == Max)
00147             *H = (*G - *B)/(Max - Min);
00148           else if (*G == Max)
00149             *H = 2.0f + (*B - *R)/(Max - Min);
00150           else // (*B == Max)
00151             *H = 4.0f + (*R - *G)/(Max - Min);
00152           *H *= 60;
00153           if (*H < 0)
00154             *H += 360;
00155         }
00156         // increase pointers
00157         H++;
00158         S++;
00159         L++;
00160         R++;
00161         G++;
00162         B++;
00163       }
00164       dest.SetInterleaved(false);
00165       dest.SetColorModel(ImageBase::CM_HSL);
00166
00167     } else { // source is interleaved
00168       S = H + 1;
00169       L = S + 1;
00170       while (R < ImageDataEnd){
00171         // calulate Min(R,G,B) and Max(R,G,B)
00172         Max = Min = R[0];
00173         for (register int i = 1; i < 3; i++){
00174           if ( Max < R[i])
00175             Max = R[i];
00176           if (Min > R[i])
00177             Min = R[i];
00178         }
00179         *G = R[1];
00180         *B = R[2];
00181         *L = (Max + Min) / 2.0f;
00182         if (Max == Min){
00183           *H = 240;
00184           *S = 0;
00185         } else {
00186           // Saturation
00187           if ((*L) > 0.5 ) *S=(Max-Min)/(Max+Min);
00188           else  *S=(Max-Min)/(2.0f-Max-Min);
00189           // H (ue)
00190           if (*R == Max)
00191             *H = (*G - *B)/(Max - Min);
00192           else if (*G == Max)
00193             *H = 2.0f + (*B - *R)/(Max - Min);
00194           else // (*B == Max)
00195             *H = 4.0f + (*R - *G)/(Max - Min);
00196           *H *= 60;
00197           if (*H < 0)
00198             *H += 360;
00199         }
00200
00201         // increase pointers
00202         H+=3;
00203         S+=3;
00204         L+=3;
00205         R+=3;
00206       }
00207       dest.SetInterleaved(true);
00208       dest.SetColorModel(ImageBase::CM_HSL);
00209     }
00210     return 0;
00211   }
00212
00213
00214   // H [0,255]  0 = red, 85 = green , 171 = blue
00215   // saturation [0,255]
00216   // lighting [0,255]
00217   // by Daniel Grest, April 2003
00218   template <>
00219     int ImageConvert::RGBToHSL_(Image<unsigned char>& source,
00220     Image<unsigned char> &dest)
00221   {
00222 #ifdef BIAS_DEBUG
00223     if (source.GetColorModel() != ImageBase::CM_RGB){
00224       BIASERR("source not in RGB format");
00225       return -1;
00226     }
00227 #endif
00228     register unsigned char *R = source.GetImageData();
00229     register unsigned char *ImageDataEnd =
00230       R + source.GetSize();
00231     register unsigned char *H = dest.GetImageData();
00232     register unsigned char *G = NULL, *B = NULL;
00233     register unsigned char *S = NULL, *L = NULL;
00234     register unsigned char Min = 0, Max = 0;
00235     register int delta,TmpH;
00236
00237     if (source.IsPlanar()){
00238       G = R + source.GetPixelCount();
00239       B = G + source.GetPixelCount();
00240       S = H + dest.GetPixelCount();
00241       L = S + dest.GetPixelCount();
00242       while (R < ImageDataEnd){
00243         // calc Max and Min
00244         Max = Min = *R;
00245         if (Max < *G) Max=*G;
00246         if (Max < *B) Max=*B;
00247         if (Min > *G) Min=*G;
00248         if (Min > *B) Min=*B;
00249
00250         *L = (Max + Min) / 2;
00251
00252         delta = Max - Min;
00253         if (delta==0){
00254           *H = 171;
00255           *S = 0;
00256         } else {
00257           // Saturation
00258           if ((*L) > 127)
00259             *S= (unsigned char)((255*delta)/ (Max+Min));
00260           else  *S= (unsigned char)((255*delta)/(510-delta));
00261           // H (ue)
00262           if (*R == Max)
00263             TmpH = (255 * (*G - *B)) / delta;
00264           else if (*G == Max)
00265             TmpH = 510 + (255 * (*B - *R)) / delta;
00266           else // (*B == Max)
00267             TmpH = 1020 + (255 * (*R - *G)) / delta;
00268           TmpH /= 6;
00269           if (TmpH < 0)
00270             *H = (unsigned char)(TmpH + 255);
00271           else
00272             *H = (unsigned char)TmpH;
00273         }
00274
00275         // increase pointers
00276         H++; S++; L++; R++; G++; B++;
00277       }
00278       dest.SetInterleaved(false);
00279       dest.SetColorModel(ImageBase::CM_HSL);
00280     } else {// source is interleaved
00281       G = R + 1;
00282       B = G + 1;
00283       S = H + 1;
00284       L = S + 1;
00285       while (R < ImageDataEnd){
00286         // calulate Min(R,G,B) and Max(R,G,B)
00287         Max = Min = *R;
00288         if (Max < *G) Max=*G;
00289         if (Max < *B) Max=*B;
00290         if (Min > *G) Min=*G;
00291         if (Min > *B) Min=*B;
00292
00293         *L = (Max + Min) / 2;
00294
00295         delta = Max - Min;
00296         if (delta==0){
00297           *H = 171;
00298           *S = 0;
00299         } else {
00300           // Saturation
00301           if ((*L) > 127)
00302             *S= (unsigned char)((255*delta)/ (Max+Min));
00303           else  *S= (unsigned char)((255*delta)/(510-delta));
00304           // H (ue)
00305           if (*R == Max)
00306             TmpH = (255 * (*G - *B)) / delta;
00307           else if (*G == Max)
00308             TmpH = 510 + (255 * (*B - *R)) / delta;
00309           else // (*B == Max)
00310             TmpH = 1020 + (255 * (*R - *G)) / delta;
00311           TmpH /= 6;
00312           if (TmpH < 0)
00313             *H = (unsigned char)(TmpH + 255);
00314           else
00315             *H = (unsigned char)TmpH;
00316         }
00317
00318         // increase pointers
00319         H+=3;
00320         S+=3;
00321         L+=3;
00322         R+=3;G+=3;B+=3;
00323       }
00324       dest.SetInterleaved(true);
00325       dest.SetColorModel(ImageBase::CM_HSL);
00326     }
00327     return 0;
00328   }
00329
00330
00331   ///////////////////////////// BGR //////////////////////////////
00332
00333   template <class StorageType>
00334     int ImageConvert::BGRToHSL_(Image<StorageType>& source,
00335     Image<StorageType> &/*dest*/)
00336   {
00337     BIASERR("ImageConvert::BGRToHSL only for <unsgined char> not "<<
00338       source.GetStorageType());
00339     return -1;
00340   }
00341
00342
00343   // H [0,255]  0 = red, 85 = green , 171 = blue
00344   // saturation [0,255]
00345   // lighting [0,255]
00346   // by Daniel Grest, April 2003
00347   template <>
00348     int ImageConvert::BGRToHSL_(Image<unsigned char>& source,
00349     Image<unsigned char> &dest)
00350   {
00351 #ifdef BIAS_DEBUG
00352     if (source.GetColorModel() != ImageBase::CM_BGR){
00353       BIASERR("source not in BGR format");
00354       return -1;
00355     }
00356 #endif
00357     register unsigned char *B = source.GetImageData();
00358     register unsigned char *ImageDataEnd =
00359       B + source.GetSize();
00360     register unsigned char *H = dest.GetImageData();
00361     register unsigned char *G = NULL, *R = NULL;
00362     register unsigned char *S = NULL, *L = NULL;
00363     register unsigned char Min = 0, Max = 0;
00364     register int delta,TmpH;
00365
00366     if (source.IsPlanar()){
00367       G = B + source.GetPixelCount();
00368       R = G + source.GetPixelCount();
00369       S = H + dest.GetPixelCount();
00370       L = S + dest.GetPixelCount();
00371       while (B < ImageDataEnd){
00372         // calc Max and Min
00373         Max = Min = *R;
00374         if (Max < *G) Max=*G;
00375         if (Max < *B) Max=*B;
00376         if (Min > *G) Min=*G;
00377         if (Min > *B) Min=*B;
00378
00379         *L = (Max + Min) / 2;
00380
00381         delta = Max - Min;
00382         if (delta==0){
00383           *H = 171;
00384           *S = 0;
00385         } else {
00386           // Saturation
00387           if ((*L) > 127)
00388             *S= (unsigned char)((255*delta)/ (Max+Min));
00389           else  *S= (unsigned char)((255*delta)/(510-delta));
00390           // H (ue)
00391           if (*R == Max)
00392             TmpH = (255 * (*G - *B)) / delta;
00393           else if (*G == Max)
00394             TmpH = 510 + (255 * (*B - *R)) / delta;
00395           else // (*B == Max)
00396             TmpH = 1020 + (255 * (*R - *G)) / delta;
00397           TmpH /= 6;
00398           if (TmpH < 0)
00399             *H = (unsigned char)(TmpH + 255);
00400           else
00401             *H = (unsigned char)TmpH;
00402         }
00403
00404         // increase pointers
00405         H++; S++; L++; R++; G++; B++;
00406       }
00407       dest.SetInterleaved(false);
00408       dest.SetColorModel(ImageBase::CM_HSL);
00409     } else {// source is interleaved
00410       G = B + 1;
00411       R = G + 1;
00412       S = H + 1;
00413       L = S + 1;
00414       while (B < ImageDataEnd){
00415         // calulate Min(R,G,B) and Max(R,G,B)
00416         Max = Min = *R;
00417         if (Max < *G) Max=*G;
00418         if (Max < *B) Max=*B;
00419         if (Min > *G) Min=*G;
00420         if (Min > *B) Min=*B;
00421
00422         *L = (Max + Min) / 2;
00423
00424         delta = Max - Min;
00425         if (delta==0){
00426           *H = 171;
00427           *S = 0;
00428         } else {
00429           // Saturation
00430           if ((*L) > 127)
00431             *S= (unsigned char)((255*delta)/ (Max+Min));
00432           else  *S= (unsigned char)((255*delta)/(510-delta));
00433           // H (ue)
00434           if (*R == Max)
00435             TmpH = (255 * (*G - *B)) / delta;
00436           else if (*G == Max)
00437             TmpH = 510 + (255 * (*B - *R)) / delta;
00438           else // (*B == Max)
00439             TmpH = 1020 + (255 * (*R - *G)) / delta;
00440           TmpH /= 6;
00441           if (TmpH < 0)
00442             *H = (unsigned char)(TmpH + 255);
00443           else
00444             *H = (unsigned char)TmpH;
00445         }
00446
00447         // increase pointers
00448         H+=3;
00449         S+=3;
00450         L+=3;
00451         R+=3;G+=3;B+=3;
00452       }
00453       dest.SetInterleaved(true);
00454       dest.SetColorModel(ImageBase::CM_HSL);
00455     }
00456     return 0;
00457   }
00458
00459
00460   ///////////////////////////// BGRA //////////////////////////////
00461
00462   template <class StorageType>
00463     int ImageConvert::BGRAToHSL_(Image<StorageType>& source,
00464     Image<StorageType> &/*dest*/)
00465   {
00466     BIASERR("ImageConvert::BGRAToHSL only for <unsgined char> not "<<
00467       source.GetStorageType());
00468     return -1;
00469   }
00470
00471
00472   // H [0,255]  0 = red, 85 = green , 171 = blue
00473   // saturation [0,255]
00474   // lighting [0,255]
00475   // by Daniel Grest, Feb 2005
00476   template <>
00477     int ImageConvert::BGRAToHSL_(Image<unsigned char>& source,
00478     Image<unsigned char> &dest)
00479   {
00480 #ifdef BIAS_DEBUG
00481     if (source.GetColorModel() != ImageBase::CM_BGRA){
00482       BIASERR("source not in BGRA format");
00483       return -1;
00484     }
00485 #endif
00486     register unsigned char *B = source.GetImageData();
00487     register unsigned char *ImageDataEnd =
00488       B + source.GetSize();
00489     register unsigned char *H = dest.GetImageData();
00490     register unsigned char *G = NULL, *R = NULL;
00491     register unsigned char *S = NULL, *L = NULL;
00492     register unsigned char Min = 0, Max = 0;
00493     register int delta,TmpH;
00494
00495     if (source.IsPlanar()){
00496       BIASERR("BGRAToHSL_() not for planar images");
00497       return -2;
00498     } else {// source is interleaved
00499       G = B + 1;
00500       R = G + 1;
00501       S = H + 1;
00502       L = S + 1;
00503       while (B < ImageDataEnd){
00504         // calulate Min(R,G,B) and Max(R,G,B)
00505         Max = Min = *R;
00506         if (Max < *G) Max=*G;
00507         if (Max < *B) Max=*B;
00508         if (Min > *G) Min=*G;
00509         if (Min > *B) Min=*B;
00510
00511         *L = (Max + Min) / 2;
00512
00513         delta = Max - Min;
00514         if (delta==0){
00515           *H = 171;
00516           *S = 0;
00517         } else {
00518           // Saturation
00519           if ((*L) > 127)
00520             *S= (unsigned char)((255*delta)/ (Max+Min));
00521           else  *S= (unsigned char)((255*delta)/(510-delta));
00522           // H (ue)
00523           if (*R == Max)
00524             TmpH = (255 * (*G - *B)) / delta;
00525           else if (*G == Max)
00526             TmpH = 510 + (255 * (*B - *R)) / delta;
00527           else // (*B == Max)
00528             TmpH = 1020 + (255 * (*R - *G)) / delta;
00529           TmpH /= 6;
00530           if (TmpH < 0)
00531             *H = (unsigned char)(TmpH + 255);
00532           else
00533             *H = (unsigned char)TmpH;
00534         }
00535
00536         // increase pointers
00537         H+=3;
00538         S+=3;
00539         L+=3;
00540         R+=4;G+=4;B+=4;
00541       }
00542       dest.SetInterleaved(true);
00543       dest.SetColorModel(ImageBase::CM_HSL);
00544     }
00545     return 0;
00546   }
00547
00548
00549
00550
00551   ///////////////////////////////////////////////////////////////////////////
00552   /////////////////////////// hsL ///////////////////////////////////////////
00553   ///////////////////////////////////////////////////////////////////////////
00554
00555   template <class StorageType>
00556     BIASImageBase_EXPORT
00557     int ImageConvert::TohsL(Image<StorageType>& source,
00558     Image<StorageType> &dest)
00559   {
00560     int res = -1;
00561
00562     if (dest.IsEmpty())
00563       dest.Init(source.GetWidth(), source.GetHeight(), source.GetChannelCount(),
00564       source.GetStorageType());
00565
00566 #ifdef BIAS_DEBUG
00567     if (!dest.SamePixelAndChannelCount(source)){
00568       BIASERR("ImageConvert::TohsL() should be called with images of"\
00569         <<" same size");
00570     }
00571 #endif
00572
00573     switch (source.GetColorModel()) {
00574     case ImageBase::CM_RGB:
00575       res = RGBTohsL_(source,dest);
00576       break;
00577     default:
00578       BIASERR("Image::TohsL(): color model not implemented for "<<
00579         source.GetColorModel());
00580       break;
00581     }
00582     dest.SetColorModel(ImageBase::CM_hsL);
00583     return res;
00584   }
00585
00586   template <class StorageType>
00587     BIASImageBase_EXPORT
00588     int ImageConvert::RGBTohsL_(Image<StorageType>& source,
00589     Image<StorageType> &/*dest*/)
00590   {
00591     BIASERR("ImageConvert::RGBTohsL only for <int> and <unsigned char>"<<
00592       " so far, not "<<
00593       source.GetStorageType());
00594     return -1;
00595   }
00596
00597   // (h,s) is the euclidean vector of the(H,S) polar coordinates
00598   // lighting [0,255]
00599   // by Daniel Grest, June 2003
00600   template <>
00601     BIASImageBase_EXPORT
00602     int ImageConvert::RGBTohsL_(Image<int> &source,
00603     Image<int> &dest)
00604   {
00605 #ifdef BIAS_DEBUG
00606     if (source.GetColorModel() != ImageBase::CM_RGB){
00607       BIASERR("source not in RGB format");
00608       return -1;
00609     }
00610 #endif
00611     register int *R = source.GetImageData();
00612     register int *ImageDataEnd =
00613       R + source.GetPixelCount();
00614     register int *h = dest.GetImageData();
00615     register int *G = NULL, *B = NULL;
00616     register int *s = NULL, *L = NULL;
00617     register int Min = 0, Max = 0;
00618     register int delta,hTemp,sTemp;
00619
00620     register float d=0,sat;
00621     if (source.IsPlanar()){
00622       BIASERR("not yet implemented");
00623     } else {// source is interleaved
00624       G = R + 1;
00625       B = G + 1;
00626       s = h + 1;
00627       L = s + 1;
00628       while (R < ImageDataEnd){
00629         // calulate Min(R,G,B) and Max(R,G,B)
00630         Max = Min = *R;
00631         if (Max < *G) Max=*G;
00632         if (Max < *B) Max=*B;
00633         if (Min > *G) Min=*G;
00634         if (Min > *B) Min=*B;
00635
00636         *L = (Max + Min) / 2;
00637
00638         // project RGB
00639         hTemp= *G - *B;
00640         sTemp= 2*(*R) - *G - *B;
00641         d=float(sqrt(double(hTemp*hTemp + sTemp*sTemp)));
00642         //      if (*L==21) cout<<"d:"<<d<<endl;
00643         delta = Max - Min;
00644         if ( (delta==0) || (d<1E-07) ) {
00645           *h = 0;
00646           *s = 0;
00647         } else {
00648           // Saturation
00649           if ((*L) > 127)
00650             sat= (float)((255*delta)/ (Max+Min));
00651           else  sat= (float)((255*delta)/(510-delta));
00652           // if (*L==21) cout<<"sat:"<<sat<<endl;
00653           *h= (int)((float)hTemp * sat / d + 0.5);
00654           *s= (int)((float)sTemp * sat / d + 0.5);
00655
00656         }
00657
00658         // increase pointers
00659         h+=3;
00660         s+=3;
00661         L+=3;
00662         R+=3;G+=3;B+=3;
00663       }
00664       dest.SetInterleaved(true);
00665       dest.SetColorModel(ImageBase::CM_hsL);
00666     }
00667     return 0;
00668
00669
00670   }
00671
00672   // (h,s) is the euclidean vector of the(H,S) polar coordinates
00673   // h,s in [-127..127] but stored  unsigned char (0..128) !
00674   // lighting [0,255]
00675   // by Daniel Grest, June 2003
00676   template <>
00677     BIASImageBase_EXPORT
00678     int ImageConvert::RGBTohsL_(Image<unsigned char> &source,
00679     Image<unsigned char> &dest)
00680   {
00681 #ifdef BIAS_DEBUG
00682     if (source.GetColorModel() != ImageBase::CM_RGB){
00683       BIASERR("source not in RGB format");
00684       return -1;
00685     }
00686 #endif
00687     register unsigned char *R = source.GetImageData();
00688     register unsigned char *ImageDataEnd =
00689       R + source.GetSize();
00690     register unsigned char *h = dest.GetImageData();
00691     register unsigned char *G = NULL, *B = NULL;
00692     register unsigned char *s = NULL;
00693     register unsigned char *L = NULL;
00694     register unsigned char Min = 0, Max = 0;
00695     register unsigned char delta;
00696     register float hTemp,sTemp;
00697
00698     register float d=0,sat;
00699     if (source.IsPlanar()){
00700       BIASERR("not yet implemented");
00701     } else {// source is interleaved
00702       G = R + 1;
00703       B = G + 1;
00704       s = h + 1;
00705       L = s + 1;
00706       while (R < ImageDataEnd){
00707         // calulate Min(R,G,B) and Max(R,G,B)
00708         Max = Min = *R;
00709         if (Max < *G) Max=*G;
00710         if (Max < *B) Max=*B;
00711         if (Min > *G) Min=*G;
00712         if (Min > *B) Min=*B;
00713
00714         *L = (Max + Min) / 2;
00715
00716         // project RGB
00717         hTemp= float((int)*G - (int)*B);
00718         sTemp= float(2*(int)(*R) - (int)*G - (int)*B);
00719         d=float(sqrt(double(hTemp*hTemp + sTemp*sTemp)));
00720         //      if (*L==21) cout<<"d:"<<d<<endl;
00721         delta = Max - Min;
00722         if ( (delta==0) || (d<1E-07) ) {
00723           *h = 127;
00724           *s = 127;
00725         } else {
00726           // Saturation
00727           if ((*L) > 127)
00728             sat= (float)((127*delta)/ (Max+Min));
00729           else  sat= (float)((127*delta)/(510-delta));
00730           // if (*L==21) cout<<"sat:"<<sat<<endl;
00731           *h= (unsigned char)(hTemp * sat / d + 127.5);
00732           *s= (unsigned char)(sTemp * sat / d + 127.5);
00733
00734         }
00735
00736         // increase pointers
00737         h+=3;
00738         s+=3;
00739         L+=3;
00740         R+=3;G+=3;B+=3;
00741       }
00742       dest.SetInterleaved(true);
00743       dest.SetColorModel(ImageBase::CM_hsL);
00744     }
00745     return 0;
00746   }
00747
00748 } // namespace BIAS
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToHSV.cpp Source File

Base » Image

ToHSV.cpp

Go to the documentation of this file.
00001 /*
00002    This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004    Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005    Multimediale Systeme der Informationsverarbeitung
00006    Institut fuer Informatik
00007    Christian-Albrechts-Universitaet Kiel
00008
00009
00010    BIAS is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU Lesser General Public License as published by
00012    the Free Software Foundation; either version 2.1 of the License, or
00013    (at your option) any later version.
00014
00015    BIAS is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU Lesser General Public License for more details.
00019
00020    You should have received a copy of the GNU Lesser General Public License
00021    along with BIAS; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ImageConvert.hh"
00026
00027 using namespace BIAS;
00028
00029 namespace BIAS
00030 {
00031
00032   // TODO JW
00033   template <class StorageType>
00034     BIASImageBase_EXPORT
00035   int ImageConvert::ToHSV(Image<StorageType>& source,
00036               Image<StorageType> &dest)
00037   {
00038     int res = -1;
00039
00040     if (dest.IsEmpty())
00041       dest.Init(source.GetWidth(), source.GetHeight(), source.GetChannelCount(),
00042         source.GetStorageType());
00043
00044 #ifdef BIAS_DEBUG
00045     if (!dest.SamePixelAndChannelCount(source)){
00046       BIASERR("ImageConvert::ToHSV() sould be called with images of"\
00047           <<" same size");
00048     }
00049 #endif
00050
00051     switch (source.GetColorModel()) {
00052     case ImageBase::CM_RGB:
00053       res = RGBToHSV_(source,dest);
00054       break;
00055     default:
00056       BIASERR("Image::ToHSV(): color model not implemented");
00057       break;
00058     }
00059     dest.SetColorModel(ImageBase::CM_HSV);
00060     return res;
00061   }
00062
00063
00064
00065   template <class StorageType>
00066   int ImageConvert::RGBToHSV_(Image<StorageType>& /*source*/,
00067                   Image<StorageType> &/*dest*/)
00068   {
00069     BIASERR("ImageConvert::RGBToHSV_ should be called from float image");
00070     return -1;
00071   }
00072
00073
00074   template <>
00075   int ImageConvert::RGBToHSV_(Image<float>& source, Image<float> &dest)
00076
00077   {
00078     register float *R = source.GetImageData();
00079     register float *G = NULL , *B = NULL;
00080     register float *ImageDataEnd =
00081       R + source.GetPixelCount() *  source.GetChannelCount();
00082     register float *H = dest.GetImageData();
00083     register float *S = NULL , *V = NULL;
00084     register float Min = 0, Max = 0;
00085     float MinVal = 0, MaxVal = 0;
00086
00087     // scale image so RGB Values are between 0.0 and 1.0
00088     // if necessairy
00089     for (unsigned short int i = 0; i < dest.GetChannelCount(); i++){
00090       source.GetMinMaxPixelValue(Min, Max, i);
00091       if (Max > MaxVal)
00092     MaxVal = Max;
00093       if (Min < MinVal)
00094     MinVal = Min;
00095     }
00096     if ( (MinVal < 0.0) || (MaxVal > 1.0) )
00097       source.ScaleShiftBetween(0.0, 1.0);
00098
00099   if (source.IsPlanar()){
00100
00101     G = R + source.GetPixelCount();
00102     B = G + source.GetPixelCount();
00103     S = H + dest.GetPixelCount();
00104     V = S + dest.GetPixelCount();
00105     while (R < ImageDataEnd){
00106       // calc Max and Min
00107       if ( (*R >= *G) && (*R >= *B) ){
00108         Max = *R;
00109         if (*G <= *B)
00110           Min = *G;
00111         else
00112           Min = *B;
00113       } else if (*G >= *B){
00114         Max = *G;
00115         if (*B <= *R)
00116           Min = *B;
00117         else
00118           Min = *R;
00119       } else {
00120         Max = *B;
00121         if (*R <= *G)
00122           Min = *R;
00123         else
00124           Min = *G;
00125       }
00126
00127       if (Max != Min){
00128         // H (ue)
00129         if (*R == Max)
00130           *H = (*G - *B)/(Max - Min);
00131         else if (*G == Max)
00132           *H = 2.0f + (*B - *R)/(Max - Min);
00133         else // (*B == Max)
00134           *H = 4.0f + (*R - *G)/(Max - Min);
00135         *H *= 60;
00136         if (*H < 0)
00137           *H += 360;
00138       } else {
00139         *H = 240;
00140       }
00141
00142       if (Max != 0.0){
00143         // S (aturation)
00144         *S = 1 - Min/Max;
00145         // V (alue)
00146         *V = float(0.299* *R + 0.587* *G + 0.114* *B);
00147       } else {
00148         *H = 240;
00149         *S = 0;
00150         *V = 0;
00151       }
00152
00153
00154       // increase pointers
00155       H++;
00156       S++;
00157       V++;
00158       R++;
00159       G++;
00160       B++;
00161
00162     }
00163     dest.SetInterleaved(false);
00164     dest.SetColorModel(ImageBase::CM_HSV);
00165
00166   } else { // source is interleaved
00167     S = H + 1;
00168     V = S + 1;
00169     while (R < ImageDataEnd){
00170       // calulate min(R,G,B) and max(R,G,B)
00171       Max = Min = R[0];
00172       for (register int i = 1; i < 3; i++){
00173         if ( Max < R[i])
00174           Max = R[i];
00175         if (Min > R[i])
00176           Min = R[i];
00177       }
00178       *G = R[1];
00179       *B = R[2];
00180
00181       if (Max != Min) {
00182         // H (ue)
00183         if (*R == Max )
00184           *H = (*G - *B)/(Max - Min);
00185         else if (*G == Max )
00186           *H = 2 + (*B - *R)/(Max - Min);
00187         else // (*B == Max )
00188           *H = 4 + (*R - *G)/(Max - Min);
00189         *H *= 60;
00190         if (*H < 0)
00191           *H += 360;
00192       } else {
00193         *H = 0;
00194       }
00195
00196
00197       if (Max != 0.0){
00198         // S (aturation)
00199         *S = 1 - Min/Max;
00200         // V (alue)
00201         *V =  0.299f* *R + 0.587f* *G + 0.114f* *B;
00202       } else {
00203         *S = 0;
00204         *V = 0;
00205       }
00206
00207       // increase pointers
00208       H+=3;
00209       S+=3;
00210       V+=3;
00211       R+=3;
00212     }
00213     dest.SetInterleaved(true);
00214     dest.SetColorModel(ImageBase::CM_HSV);
00215   }
00216   return 0;
00217 }
00218
00219
00220 // H [0,255]  0 = red, 85 = green , 171 = blue
00221 // saturation [0,255]
00222 // value [0,255]
00223 // fixed for interleaved by Daniel Grest, April 2003
00224 template <>
00225 int ImageConvert::RGBToHSV_(Image<unsigned char>& source,
00226                             Image<unsigned char> &dest)
00227 {
00228 #ifdef BIAS_DEBUG
00229   if (source.GetColorModel() != ImageBase::CM_RGB){
00230     BIASERR("source not in RGB format");
00231     return -1;
00232   }
00233 #endif
00234   // jw
00235   BIASASSERT(!source.IsEmpty());
00236   BIASASSERT(!dest.IsEmpty());
00237   BIASASSERT(source.GetWidth() == dest.GetWidth() );
00238   BIASASSERT(source.GetHeight() == dest.GetHeight() );
00239
00240
00241   register unsigned char *R = source.GetImageData();
00242   register unsigned char *ImageDataEnd =
00243     R + source.GetSize();
00244   register unsigned char *H = dest.GetImageData();
00245   register unsigned char *G = NULL, *B = NULL;
00246   register unsigned char *S = NULL, *V = NULL;
00247   //register unsigned char Min = 0, Max = 0;
00248   unsigned char Min = 0;
00249   unsigned char Max = 0;
00250
00251   int TmpH=0;
00252
00253   BIASASSERT( R != NULL);
00254   BIASASSERT( H != NULL);
00255
00256   if (source.IsPlanar()) {
00257     G = R + source.GetPixelCount();
00258     B = G + source.GetPixelCount();
00259     S = H + dest.GetPixelCount();
00260     V = S + dest.GetPixelCount();
00261     while (R < ImageDataEnd){
00262       // calc Max and Min
00263       if ( (*R >= *G) && (*R >= *B) ){
00264     Max = *R;
00265     if (*G <= *B)
00266       Min = *G;
00267     else
00268       Min = *B;
00269       } else if (*G >= *B){
00270     Max = *G;
00271     if (*B <= *R)
00272       Min = *B;
00273     else
00274       Min = *R;
00275       } else {
00276     Max = *B;
00277     if (*R <= *G)
00278       Min = *R;
00279     else
00280       Min = *G;
00281       }
00282
00283       if (Max != Min){
00284     // H (ue)
00285     if (*R == Max)
00286       TmpH = 256 * (*G - *B)/(Max - Min);
00287     else if (*G == Max)
00288       TmpH = 512 + 256 * (*B - *R)/(Max - Min);
00289     else // (*B == Max)
00290       TmpH = 1024 + 256 * (*R - *G)/(Max - Min);
00291     TmpH /= 6;
00292     if (TmpH < 0)
00293       *H = (unsigned char)(TmpH + 256);
00294     else
00295       *H = (unsigned char)TmpH;
00296       } else {
00297     *H = 171;
00298       }
00299
00300       if (Max != (unsigned char)0){
00301     // S (aturation) [0,255]
00302     *S = 255 - (unsigned char)(255.0 * (float)Min/(float)Max);
00303     // V (alue)
00304     *V =  (unsigned char)(0.299* (float)(*R) +
00305                   0.587* (float)(*G) + 0.114* (float)(*B) + 0.5);
00306     //*V = ((int)(*R) + (int)(*G) + (int)(*B)) / 3;
00307
00308       } else {
00309     *H = 171;
00310     *S = 0;
00311     *V = 0;
00312       }
00313
00314       // increase pointers
00315       H++; S++; V++; R++; G++; B++;
00316     }
00317     dest.SetInterleaved(false);
00318     dest.SetColorModel(ImageBase::CM_HSV);
00319
00320   } else {// source is interleaved
00321     // src
00322     G = R + 1;
00323     B = G + 1;
00324     // dst
00325     S = H + 1;
00326     V = S + 1;
00327     while (R < ImageDataEnd){
00328       // calulate min(R,G,B) and max(R,G,B)
00329       Max = Min = *R;
00330       //jw
00331       //Min = *R;
00332       //Max = Min;
00333       //BIASASSERT(R!=NULL);
00334       //BIASASSERT(G!=NULL);
00335       //BIASASSERT(B!=NULL);
00336
00337       if (Max < *G) Max = *G;
00338       if (Max < *B) Max = *B;
00339       if (Min > *G) Min = *G;
00340       if (Min > *B) Min = *B;
00341
00342       if (Max != Min) {
00343     // H (ue)
00344     if (*R == Max)
00345       TmpH = (256 * (*G - *B))/(Max - Min);
00346     else if (*G == Max )
00347       TmpH = 512 + (256 * (*B - *R))/(Max - Min);
00348     else // (*B == Max )
00349       TmpH = 1024 + (256 * (*R - *G))/(Max - Min);
00350     TmpH /= 6;
00351     if (TmpH < 0)
00352       *H = (unsigned char)(TmpH + 256);
00353     else
00354       *H = (unsigned char)TmpH;
00355       } else {
00356     *H = 171;
00357       }
00358
00359
00360       if (Max != (unsigned char)0){
00361     // S (aturation)
00362     *S = (unsigned char)(255.0 * ((float)Max-(float)Min)/(float)Max);
00363     // V (alue)
00364     *V =  (unsigned char)(0.299* (float)(*R) +
00365                   0.587* (float)(*G) + 0.114* (float)(*B) + 0.5);
00366     //        *V = ((int)(*R) + (int)(*G) + (int)(*B)) / 3;
00367
00368       } else {
00369     *H = 171;
00370     *S = 0;
00371     *V = 0;
00372       }
00373
00374       // increase pointers
00375       H+=3;
00376       S+=3;
00377       V+=3;
00378       R+=3;G+=3;B+=3;
00379     }
00380     dest.SetInterleaved(true);
00381     dest.SetColorModel(ImageBase::CM_HSV);
00382   }
00383   return 0;
00384 }
00385
00386
00387
00388 } // namespace BIAS
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToInterleaved.cpp Source File

Base » Image

ToInterleaved.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ImageConvert.hh"
00026
00027 using namespace BIAS;
00028
00029 namespace BIAS {
00030
00031 template <class StorageType>
00032 BIASImageBase_EXPORT
00033 int ImageConvert::ToInterleaved(Image<StorageType>& source,
00034                                       Image<StorageType>& dest) {
00035
00036   switch (source.GetColorModel()) {
00037   case ImageBase::CM_Grey:
00038     BIASERR("Does not make sense to convert grey images to interleaved or planar. Target image left unchanged!");
00039     return -1;
00040     break;
00041
00042   case ImageBase::CM_HSV:
00043   case ImageBase::CM_BGR:
00044   case ImageBase::CM_RGB:
00045     return ToInterleavedRGB_(source,dest);
00046     break;
00047
00048 //   case MIP_YUYV422:
00049 //     return ToInterleavedYUYV422_(source);
00050 //     break;
00051
00052   default:
00053     BIASERR("Conversion To Interleaved only implemented for ImageBase::CM_HSV, ImageBase::CM_BGR, ImageBase::CM_RGB. Target image left unchanged!");
00054     return -1;
00055   }
00056
00057   //return 0;
00058 }
00059
00060 template <class StorageType>
00061 int ImageConvert::ToInterleavedRGB(Image<StorageType>& red,
00062                                                 Image<StorageType>& green,
00063                                                 Image<StorageType>& blue,
00064                                                 Image<StorageType>& dest)
00065 {
00066 #ifdef MIPDEBUG
00067   if (!red.SamePixelAndChannelCount(green) ||
00068       !red.SamePixelAndChannelCount(blue)){
00069     BIASERR("image sizes of input images does not match");
00070     return -2;
00071   }
00072 #endif
00073   register StorageType *r=red.GetImageData();
00074   register StorageType *g=green.GetImageData();
00075   register StorageType *b=blue.GetImageData();
00076   if (!dest.IsEmpty()){
00077     if (dest.GetHeight() != red.GetHeight() ||
00078         dest.GetWidth() != red.GetWidth()){
00079       dest.Release();
00080       dest.Init(red.GetWidth(), red.GetHeight(), 3,dest.GetStorageType());
00081     }
00082   } else {
00083     dest.Init(red.GetWidth(), red.GetHeight(), 3,dest.GetStorageType());
00084   }
00085   register StorageType *sink = dest.GetImageData();
00086   register StorageType *end = dest.GetImageData() + 3 * dest.GetPixelCount();
00087
00088   while (sink<end){
00089     *sink++=*r++;
00090     *sink++=*g++;
00091     *sink++=*b++;
00092   }
00093   dest.SetInterleaved(true);
00094   dest.SetColorModel(ImageBase::CM_RGB);
00095   return 0;
00096 }
00097
00098 template <class StorageType>
00099 int
00100 ImageConvert::ToInterleavedYUYV422_(Image<StorageType>& /*source*/,
00101                                                  Image<StorageType>& /*dest*/)
00102 {
00103   BIASERR("not implemented");
00104   return 0;
00105 }
00106
00107
00108 template <class StorageType>
00109 int ImageConvert::ToInterleavedRGB_(Image<StorageType>& source,
00110                                                  Image<StorageType>& dest) {
00111
00112   // If target is not empty yet make it empty
00113   if (!dest.IsEmpty())
00114     dest.Release();
00115
00116   dest.Init(source.GetWidth(), source.GetHeight(), source.GetChannelCount(),
00117             source.GetStorageType());
00118   dest.SetColorModel(source.GetColorModel());
00119
00120
00121   // Is it already interleaved?
00122   if ( !source.IsPlanar() ) {
00123
00124     BIASERR("Source image was already interleaved.");
00125     register StorageType* pDest = dest.GetImageData();
00126     register StorageType* destStop = pDest + 3 * dest.GetPixelCount();
00127     register StorageType* src = source.GetImageData();
00128     for(;pDest < destStop; pDest++, src++)
00129       *pDest = *src;
00130
00131   } else {
00132
00133     register StorageType* pDest = dest.GetImageData();
00134     register StorageType* destStop = pDest + 3 * dest.GetPixelCount();
00135
00136     register StorageType* src_red   = source.GetImageData();
00137     register StorageType* src_green = source.GetImageData() + source.GetPixelCount();
00138     register StorageType* src_blue  = source.GetImageData() + 2*source.GetPixelCount();
00139
00140     while (pDest < destStop) {
00141
00142       *(pDest++) = *(src_red++);
00143       *(pDest++) = *(src_green++);
00144       *(pDest++) = *(src_blue++);
00145     }
00146   }
00147
00148
00149   return 0;
00150 }
00151
00152 } // namespace BIAS
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/tools.dox File Reference

Doc/tools.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ToPlanar.cpp Source File

Base » Image

ToPlanar.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "ImageConvert.hh"
00026
00027 using namespace BIAS;
00028
00029 namespace BIAS {
00030
00031 template <class StorageType>
00032 BIASImageBase_EXPORT
00033 int ImageConvert::ToPlanar(Image<StorageType>& source,
00034                            Image<StorageType>& dest)
00035 {
00036   int res = -1;
00037
00038   if (dest.IsEmpty())
00039     dest.Init(source.GetWidth(), source.GetHeight(), source.GetChannelCount(),
00040               source.GetStorageType(), false);
00041
00042 #ifdef BIAS_DEBUG
00043   if ( source.IsPlanar() )
00044     BIASERR("ImageConvert::ToPlanar() image already planar!");
00045   if (! dest.SamePixelAndChannelCount(source) )
00046     BIASERR("ImageConvert::ToPlanar() not same image size");
00047 #endif
00048
00049   switch (dest.GetColorModel())
00050   {
00051     case ImageBase::CM_HSV:
00052     case ImageBase::CM_BGR:
00053     case ImageBase::CM_RGB:
00054       res = ToPlanarRGB_(source,dest);
00055       break;
00056     case ImageBase::CM_YUYV422:
00057       res = ToPlanarYUYV422_(source,dest);
00058       break;
00059     default:
00060       BIASERR("conversion to planar only implemented for RGB, BGR and"
00061          <<" YUYV422 images!");
00062       res = -1;
00063   }
00064   dest.SetInterleaved(false);
00065   return res;
00066 }
00067
00068
00069 template <class StorageType>
00070 int ImageConvert::ToPlanarRGB_(Image<StorageType>& source,
00071                                Image<StorageType>& dest)
00072 {
00073   register StorageType* Red;
00074
00075   // in place conversion needs extra memory
00076   if (source.GetImageData() == dest.GetImageData())
00077     Red = new StorageType[3 * source.GetPixelCount()];
00078   else
00079     Red = dest.GetImageData();
00080
00081   BIASGDOUT(D_MI_TOPLANAR,"GetImageData()  "<<dest.GetImageData());
00082   register StorageType* Green = Red + source.GetPixelCount();
00083   register StorageType* Blue = Green + source.GetPixelCount();
00084   register StorageType* ImageData = source.GetImageData();
00085   register StorageType* ImageDataStop = ImageData +
00086     3 * source.GetPixelCount();
00087
00088   // Copy the values to the corresponding areas in new memory
00089   while (ImageData < ImageDataStop) { // Schleife vielleicht rueckwaerts?
00090     *Red++   = *ImageData++;
00091     *Green++ = *ImageData++;
00092     *Blue++  = *ImageData++;
00093   }
00094
00095   if (source.GetImageData() == dest.GetImageData()){
00096     // Change the pointer
00097     dest.ReleaseImageDataPointer();
00098     dest.RedirectImageDataPointer( Red - dest.GetPixelCount() );
00099   }
00100
00101   BIASGDOUT(D_MI_TOPLANAR,"GetImageData()  "<<dest.GetImageData());
00102   return 0;
00103 }
00104
00105
00106 template <class StorageType>
00107 int ImageConvert::ToPlanarYUYV422_(Image<StorageType>& source,
00108                                                 Image<StorageType>& dest)
00109 {
00110 #ifdef BIAS_DEBUG
00111   if (dest.GetWidth() % 2 != 0 )
00112     BIASERR("ImageConvert::ToPlanar() only implemented for images with even with");
00113 #endif
00114
00115   register StorageType* ImageData = source.GetImageData();
00116   register StorageType* ImageDataStop = ImageData + 2 * source.GetPixelCount();
00117   register StorageType *Y, *U, *V;
00118
00119   if (source.GetImageData() == dest.GetImageData())
00120     Y = new StorageType[2 * source.GetPixelCount()];
00121   else
00122     Y = dest.GetImageData();
00123   U = Y + source.GetPixelCount();
00124   V = U + source.GetPixelCount()/2;
00125
00126   while (ImageData < ImageDataStop){
00127     *Y++ = *ImageData++;
00128     *U++ = *ImageData++;
00129     *Y++ = *ImageData++;
00130     *V++ = *ImageData++;
00131   }
00132
00133   if (source.GetImageData() == dest.GetImageData()){
00134     dest.ReleaseImageDataPointer();
00135     dest.RedirectImageDataPointer( Y - dest.GetPixelCount() );
00136   }
00137   return 0;
00138 }
00139
00140 template <class StorageType>
00141 int ImageConvert::FromInterleaved(Image<StorageType>& source,
00142                                         Image<StorageType>& Image1,
00143                                         Image<StorageType>& Image2,
00144                                         Image<StorageType>& Image3)
00145 {
00146   int res = 0;
00147 #ifdef BIAS_DEBUG
00148   if ( source.GetChannelCount() == 1 )
00149     BIASERR("ImageConvert::FromInterleaved() does not make sense with one channel images");
00150   if ( Image1.IsEmpty() || Image2.IsEmpty() || Image3.IsEmpty() )
00151     BIASERR("ImageConvert::FromInterleaved() do not call with empty images");
00152   if (source.IsPlanar())
00153     BIASERR("ImageConvert::FromInterleaved() image is not interleaved");
00154 #endif
00155   switch (source.GetColorModel()){
00156   case ImageBase::CM_YUYV422:
00157     res = FromInterleavedYUYV422_(source,Image1, Image2, Image3);
00158     break;
00159   case ImageBase::CM_RGB:
00160     res = FromInterleavedRGB_(source,Image1, Image2, Image3);
00161     break;
00162   default:
00163     BIASERR("ImageConvert::ToPlanar() color model not implemented");
00164     res = -1;
00165     break;
00166   }
00167   return res;
00168 }
00169
00170 template <class StorageType>
00171 int ImageConvert::FromInterleavedRGB_(Image<StorageType>& source,
00172                                             Image<StorageType>& R,
00173                                             Image<StorageType>& G,
00174                                             Image<StorageType>& B)
00175 {
00176 #ifdef BIAS_DEBUG
00177   unsigned int Width = source.GetWidth();
00178   unsigned int Height = source.GetHeight();
00179   if ( ( Height != R.GetHeight() ) ||
00180        ( Height != G.GetHeight() ) ||
00181        ( Height != B.GetHeight() ) ||
00182        ( Width != R.GetWidth() ) ||
00183        ( Width != G.GetWidth() ) ||
00184        ( Width != B.GetWidth() ) )
00185     BIASERR("FromInterleavedYUYV422: wrong argument image size");
00186 #endif
00187
00188   register StorageType* r = R.GetImageData();
00189   register StorageType* g = G.GetImageData();
00190   register StorageType* b = B.GetImageData();
00191   register StorageType* ImageData = source.GetImageData();
00192   register StorageType* ImageDataEnd = ImageData + source.GetPixelCount() * 3;
00193   while (ImageData < ImageDataEnd){
00194     *r++ = *ImageData++;
00195     *g++ = *ImageData++;
00196     *b++ = *ImageData++;
00197   }
00198
00199   return 0;
00200 }
00201
00202 template <class StorageType>
00203 int ImageConvert::FromInterleavedYUYV422_(Image<StorageType>& source,
00204                                                 Image<StorageType>& Y,
00205                                                 Image<StorageType>& U,
00206                                                 Image<StorageType>& V)
00207 {
00208 #ifdef BIAS_DEBUG
00209   unsigned int Width = source.GetWidth();
00210   unsigned int Height = source.GetHeight();
00211   if ( ( Height != Y.GetHeight() ) ||
00212        ( Height != U.GetHeight() ) ||
00213        ( Height != V.GetHeight() ) ||
00214        ( Width != Y.GetWidth() ) ||
00215        ( Width != U.GetWidth() * 2 ) ||
00216        ( Width != V.GetWidth() * 2 ) )
00217     BIASERR("ImageConvert::FromInterleavedYUYV422 wrong argument image size");
00218 #endif
00219
00220   register StorageType* y = Y.GetImageData();
00221   register StorageType* u = U.GetImageData();
00222   register StorageType* v = V.GetImageData();
00223   register StorageType* ImageData = source.GetImageData();
00224   register StorageType* ImageDataEnd = ImageData + source.GetPixelCount() * 2;
00225   while (ImageData < ImageDataEnd){
00226     *y++ = *ImageData++;
00227     *u++ = *ImageData++;
00228     *y++ = *ImageData++;
00229     *v++ = *ImageData++;
00230   }
00231
00232   return 0;
00233 }
00234
00235
00236 } // namespace BIAS
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Tracker.cpp Source File

Matcher2D

Tracker.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Tracker.hh"
00027 #include <Base/Image/ImageIO.hh>
00028
00029   //#define TIMING
00030 #ifdef TIMING
00031 #include <Base/Debug/TimeMeasure.hh>
00032 #endif
00033
00034 using namespace BIAS;
00035 using namespace std;
00036
00037 #ifdef BIAS_DEBUG
00038 double totalitersum=0.0;
00039 #endif
00040
00041 #define DFLT_PYSIZE 4
00042
00043
00044 //////////////////////////////////////////////////////////////////////////
00045 //                 implementation
00046 //////////////////////////////////////////////////////////////////////////
00047
00048 template <class StorageType, class CalculationType>
00049 Tracker<StorageType, CalculationType>::
00050 Tracker(Param& para, const std::string& postfix)
00051   : Debug(), tb_(para, "-Tracker"+postfix),
00052     gsobel3x3_(para, "-Tracker"+postfix), ggauss_(para, "-Tracker"+postfix),
00053     ggaussasymmetric_(para, "-Tracker"+postfix),
00054     gauss_(para, "-Tracker"+postfix), binomial_(para, "-Tracker"+postfix),
00055     mean_(para, "-Tracker"+postfix)
00056 {
00057   _ParamsAllocated = false;
00058   grad_=NULL;
00059   lowpass_=NULL;
00060   UseCoarserPointIfLost_=NULL;
00061   int grp=para.GetFreeGroupID();
00062   AddParameter_(para, grp, "-Tracker"+postfix);
00063   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "Tracker");
00064   ParameterChanged();
00065 }
00066
00067 template <class StorageType, class CalculationType>
00068 Tracker<StorageType, CalculationType>::
00069 Tracker(Param& para, const int grp, const std::string& postfix)
00070   : Debug(), tb_(para, grp, "-Tracker"+postfix),
00071     gsobel3x3_(para, grp, "-Tracker"+postfix),
00072     ggauss_(para, grp, "-Tracker"+postfix),
00073     ggaussasymmetric_(para, grp, "-Tracker"+postfix),
00074     gauss_(para, grp, "-Tracker"+postfix),
00075     binomial_(para, grp, "-Tracker"+postfix),
00076     mean_(para, grp, "-Tracker"+postfix)
00077 {
00078   _ParamsAllocated = false;
00079   grad_=NULL;
00080   lowpass_=NULL;
00081   UseCoarserPointIfLost_=NULL;
00082   AddParameter_(para, grp, "-Tracker"+postfix);
00083   ParameterChanged();
00084 }
00085
00086 template <class StorageType, class CalculationType>
00087 Tracker<StorageType, CalculationType>::
00088 Tracker()
00089   : Debug(), tb_(),
00090     gsobel3x3_(), ggauss_(),
00091     ggaussasymmetric_(),
00092     gauss_(), binomial_(), mean_()
00093 {
00094   grad_=NULL;
00095   lowpass_=NULL;
00096   GradientType_= new int;
00097   *GradientType_ = GT_Sobel3x3; // sobel 3x3
00098   MeanType_= new int;
00099   *MeanType_ = LPT_Mean;    //
00100
00101   PyIndex_= new int;
00102   *PyIndex_ = 0;
00103
00104   MaxIter_= new Vector<int>;
00105   MaxIter_->newsize(DFLT_PYSIZE);
00106   for (int i=0; i<DFLT_PYSIZE; i++) (*MaxIter_)[i]=5;
00107
00108   HalfWinSize_= new Vector<int>;
00109   HalfWinSize_->newsize(DFLT_PYSIZE);
00110   for (int i=0; i<DFLT_PYSIZE; i++) (*HalfWinSize_)[i]=3;
00111
00112
00113   MaxError_ = new Vector<KLT_TYPE>;
00114   MaxError_->newsize(DFLT_PYSIZE);
00115   for (int i=0; i<DFLT_PYSIZE; i++) (*MaxError_)[i]=0.1;
00116
00117   UseCoarserPointIfLost_ = new bool(false);
00118
00119   // use parameter from SimpleKLT as default
00120   _HalfWinSize = tb_.GetHalfWinSizePointer();
00121   _MaxIterations  = tb_.GetMaxIterationsPointer();
00122   _MaxError = tb_.GetMaxErrorPointer();
00123
00124   ///////////////////////////////////////////////////////////////////////
00125   //  now get the parameter from mean gauss
00126   ///////////////////////////////////////////////////////////////////////
00127   _GaussSigma = gauss_.GetSigmaPointer();
00128   _GaussRatio = gauss_.GetRatioPointer();
00129
00130   ///////////////////////////////////////////////////////////////////////
00131   //  now get the parameter from mean average
00132   ///////////////////////////////////////////////////////////////////////
00133
00134   _MeanSize= mean_.GetSizePointer();
00135   _ParamsAllocated = true;
00136   ParameterChanged();
00137 }
00138
00139
00140 template <class StorageType, class CalculationType>
00141 Tracker<StorageType, CalculationType>::
00142 ~Tracker()
00143 {
00144   if (_ParamsAllocated){
00145     delete GradientType_;
00146     delete MeanType_;
00147     delete PyIndex_;
00148     delete MaxIter_;
00149     delete HalfWinSize_;
00150     delete MaxError_;
00151     delete UseCoarserPointIfLost_;
00152   }
00153 }
00154
00155
00156 template <class StorageType, class CalculationType>
00157 void Tracker<StorageType, CalculationType>::
00158 ReplaceLastImages(PyramidImage<CalculationType> *pim,
00159                   PyramidImage<CalculationType> *gradx,
00160                   PyramidImage<CalculationType> *grady)
00161 {
00162   LastImage_ = pim;
00163   LastGradX_ = gradx;
00164   LastGradY_ = grady;
00165 }
00166
00167
00168 template <class StorageType, class CalculationType>
00169 void Tracker<StorageType, CalculationType>::
00170 ParameterChanged()
00171 {
00172   /*AddDebugLevel(D_TRACKER_INIT);
00173   AddDebugLevel(D_TRACKER_TRACK);
00174   AddDebugLevel(D_TRACKER_PARAM);
00175   AddDebugLevel(D_TRACKER_WRITE_IM);
00176   AddDebugLevel(D_TRACKER_FILL_UP);
00177   AddDebugLevel(D_TRACKER_IMAGES);
00178   AddDebugLevel(D_TRACKER_NUMITER);
00179   AddDebugLevel(D_TRACKER_ERROR);*/
00180
00181   ClearPoints();
00182   LastImage_=NULL;
00183   LastGradX_=LastGradY_=NULL;
00184
00185   //tb_.AddDebugLevel(D_TRACKERB_KLT);
00186   //tb_.AddDebugLevel(D_TRACKERB_BILINEAR);
00187   //tb_.AddDebugLevel(D_TRACKERB_INPUT);
00188   //tb_.AddDebugLevel(D_TRACKERB_INIT);
00189   //tb_.AddDebugLevel(D_TRACKERB_REJECT);
00190
00191   // choose the gradient class
00192   switch (*GradientType_){
00193   case GT_Sobel3x3:
00194     grad_ = &gsobel3x3_;
00195     BIASCDOUT(D_TRACKER_PARAM, "using gradient Sobel3x3\n");
00196     break;
00197   case GT_Gauss:
00198     grad_ = &ggauss_;
00199     BIASCDOUT(D_TRACKER_PARAM, "using gradient Gauss\n");
00200     break;
00201   case GT_GaussAsymmetric:
00202     grad_ = &ggaussasymmetric_;
00203     BIASCDOUT(D_TRACKER_PARAM, "using gradient GaussAsymmetric\n");
00204     break;
00205   default:
00206     BIASERR("invalid gradient type");
00207     grad_ = NULL;
00208     break;
00209   }
00210   // choose the mean class
00211   switch (*MeanType_){
00212   case LPT_Gauss:
00213     lowpass_ = &gauss_;
00214     BIASCDOUT(D_TRACKER_PARAM ,"using Gauss low pass filter\n");
00215     break;
00216   case LPT_Binomial:
00217     lowpass_ = &binomial_;
00218     BIASCDOUT(D_TRACKER_PARAM ,"using Binomial low pass filter\n");
00219     break;
00220   case LPT_Mean:
00221     lowpass_ = &mean_;
00222     BIASCDOUT(D_TRACKER_PARAM , "using mean low pass filter \n");
00223     break;
00224   default:
00225     BIASERR("invalid low pass filter type");
00226     lowpass_ = NULL;
00227     break;
00228   }
00229
00230   // compute the minimum border distance
00231   int lpx, lpy, gx, gy;
00232   lowpass_->GetBorders(lpx, lpy);
00233   grad_->GetBorders(gx, gy);
00234   int mbd = max(lpx, lpy) + max(gx, gy) + (*HalfWinSize_)[*PyIndex_];
00235   MinBorderDist_ = mbd;
00236   /*cout << "MinBorderDist = "<<MinBorderDist_<<endl;
00237     cout << "lowpass = "<<max(lpx, lpy)<<endl;
00238     cout << "grad = "<<max(gx, gy)<<endl;
00239     cout << "hws = "<<(*HalfWinSize_)[*PyIndex_]<<endl;*/
00240 }
00241
00242 template <class StorageType, class CalculationType>
00243 void Tracker<StorageType, CalculationType>::
00244 ClearPoints()
00245 {
00246   Points_.clear();
00247   PredictedPoints_.clear();
00248   NumIter_.clear();
00249   DisplInLastIter_.clear();
00250   ResiduiMAD_.clear();
00251   ResiduiMSD_.clear();
00252   res_.clear();                  // rabe, 11.11.2004
00253   Cov_.clear();
00254 }
00255
00256 template <class StorageType, class CalculationType>
00257 void Tracker<StorageType, CalculationType>::
00258 ResizeInternals_(const int pysize)
00259 {
00260   if (Points_.size() != (unsigned)pysize){
00261     Points_.resize(pysize);
00262     PredictedPoints_.resize(pysize);
00263     NumIter_.resize(pysize);
00264     DisplInLastIter_.resize(pysize);
00265     ResiduiMAD_.resize(pysize);
00266     ResiduiMSD_.resize(pysize);
00267     res_.resize(pysize);
00268     Cov_.resize(pysize);
00269     AffineResults_.resize(pysize);
00270   }
00271 }
00272
00273 template <class StorageType, class CalculationType>
00274 void Tracker<StorageType, CalculationType>::
00275 ResizeInternals_(const int pysize, const int num_points)
00276 {
00277   ResizeInternals_(pysize);
00278
00279   // dherzog: replaced '<numnew' by '!=numnew', because Track() asserts sizes
00280   if ((int)Points_[*PyIndex_].size() != num_points){
00281     HomgPoint2D pz(42.0, 42.0, 1.0);
00282     p2tracked_.resize(num_points, pz);
00283     AffinePrediction_.resize(num_points);
00284     for (int p = *PyIndex_; p < pysize; p++){
00285       res_[p].resize(num_points);
00286       Points_[p].resize(num_points);
00287       PredictedPoints_[p].resize(num_points);
00288       NumIter_[p].resize(num_points);
00289       DisplInLastIter_[p].resize(num_points);
00290       ResiduiMAD_[p].resize(num_points);
00291       ResiduiMSD_[p].resize(num_points);
00292       Cov_[p].resize(num_points);
00293       AffineResults_[p].resize(num_points);
00294     }
00295   }
00296 }
00297
00298 template <class StorageType, class CalculationType>
00299 void Tracker<StorageType, CalculationType>::
00300 ReserveInternals_(const int pysize, const int newsize)
00301 {
00302   int pyindex = *PyIndex_;
00303   for (int p=pyindex; p<pysize; p++){
00304     res_[p].reserve(newsize);
00305     Points_[p].reserve(newsize);
00306     PredictedPoints_[p].reserve(newsize);
00307     NumIter_[p].reserve(newsize);
00308     DisplInLastIter_[p].reserve(newsize);
00309     ResiduiMAD_[p].reserve(newsize);
00310     ResiduiMSD_[p].reserve(newsize);
00311     Cov_[p].reserve(newsize);
00312     AffineResults_[p].resize(newsize);
00313   }
00314 }
00315
00316
00317 template <class StorageType, class CalculationType>
00318 void Tracker<StorageType, CalculationType>::
00319 Reset()
00320 {
00321   ClearPoints();
00322   LastImage_=NULL;
00323   LastGradX_=LastGradY_=NULL;
00324 }
00325
00326 template <class StorageType, class CalculationType>
00327 void Tracker<StorageType, CalculationType>::
00328 DetermineROI_(int &tlx, int &tly, int &brx, int &bry) const
00329 {
00330   BIASASSERT(LastImage_ && LastGradX_ && LastGradY_);
00331   (*LastImage_)[*PyIndex_]->GetROI()->GetCorners(tlx, tly, brx, bry);
00332   int gxtlx, gxtly, gxbrx, gxbry;
00333   (*LastGradX_)[*PyIndex_]->GetROI()->GetCorners(gxtlx, gxtly, gxbrx, gxbry);
00334   int gytlx, gytly, gybrx, gybry;
00335   (*LastGradY_)[*PyIndex_]->GetROI()->GetCorners(gytlx, gytly, gybrx, gybry);
00336
00337   tlx = max(tlx, max(gxtlx, gytlx));
00338   tly = max(tly, max(gxtly, gytly));
00339   brx = min(brx, min(gxbrx, gybrx));
00340   bry = min(bry, min(gxbry, gybry));
00341
00342   tlx += (*HalfWinSize_)[*PyIndex_];
00343   tly += (*HalfWinSize_)[*PyIndex_];
00344   brx -= (*HalfWinSize_)[*PyIndex_];
00345   bry -= (*HalfWinSize_)[*PyIndex_];
00346
00347   // heuristic, ROIs are mostly symmetric
00348   //MinBorderDist_ = max(tlx, tly);
00349 }
00350
00351 template <class StorageType, class CalculationType>
00352 void Tracker<StorageType, CalculationType>::
00353 AddPoints(const vector<HomgPoint2D>& points, const vector<float>& qual)
00354 {
00355   assert("deprecated, use ReplaceAllPoints instead" && false);
00356   //AddDebugLevel(D_TRACKER_INIT);
00357   BIASASSERT(LastImage_!=NULL);
00358   BIASASSERT(points.size()==qual.size());
00359   const int pysize = LastImage_->size();
00360   ResizeInternals_(pysize);
00361
00362   const double factor=1.0/LastImage_->GetRescaleFactor();
00363   const double offset=LastImage_->GetPositionOffset();
00364
00365   int newsize=Points_[0].size()+points.size();
00366   vector<HomgPoint2D>::const_iterator it;
00367   vector<float>::const_iterator qit;
00368   const int pyindex=*PyIndex_;
00369   HomgPoint2D p2d;
00370   Matrix2x2<double> zero2x2; zero2x2.SetZero();
00371   BIASCDOUT(D_TRACKER_INIT, "min distance to image border "
00372             <<MinBorderDist_<<endl);
00373   int tlx, tly, brx, bry;
00374   (*LastImage_)[pyindex]->GetROI()->GetCorners(tlx, tly, brx, bry);
00375   const double minx=MinBorderDist_+tlx;
00376   const double miny=MinBorderDist_+tly;
00377   const double maxx=brx-MinBorderDist_;
00378   const double maxy=bry-MinBorderDist_;
00379
00380   ReserveInternals_(pysize, newsize);
00381
00382   for (it=points.begin(), qit=qual.begin(); it!=points.end(); it++, qit++){
00383     p2d=*it;
00384     p2d.Homogenize();
00385     if (!(p2d[0]>minx && p2d[1]>miny && p2d[0]<maxx && p2d[1]<maxy)){
00386       // don't track point too close to image border
00387       p2d[2] = 0.0;
00388     }
00389     BIASCDOUT(D_TRACKER_INIT, "add point ");
00390     for (int p=pyindex; p<pysize; p++){
00391       Points_[p].push_back(p2d);
00392       BIASCDOUT(D_TRACKER_INIT, p2d<<"  ");
00393       NumIter_[p].push_back(0);
00394       DisplInLastIter_[p].push_back(-1.0);
00395       ResiduiMAD_[p].push_back(-1.0);
00396       ResiduiMSD_[p].push_back(-1.0);
00397       p2d[0]-=offset;
00398       p2d[1]-=offset;
00399       p2d[0]*=factor;
00400       p2d[1]*=factor;
00401       res_[p].push_back((int)rint(*qit));
00402       Cov_[p].push_back(zero2x2);
00403     }
00404     BIASCDOUT(D_TRACKER_INIT, endl);
00405   }
00406   p2d.Set(0.0, 0.0, 1.0);
00407   newsize=Points_[pyindex].size();
00408   for (int p=0; p<pysize; p++)
00409     PredictedPoints_[p].resize(newsize, p2d);
00410
00411   p2tracked_.resize(newsize, p2d);
00412 }
00413
00414
00415 template <class StorageType, class CalculationType>
00416 int Tracker<StorageType, CalculationType>::
00417 AddNumPoints(const vector<HomgPoint2D>& points, const vector<float>& qual,
00418              const int nfeat)
00419 {
00420   assert("deprecated, use ReplaceAllPoints instead" && false);
00421   //AddDebugLevel(D_TRACKER_INIT);
00422   BIASASSERT(LastImage_!=NULL);
00423   BIASASSERT(points.size()==qual.size());
00424   const int pysize = LastImage_->size();
00425   ResizeInternals_(pysize);
00426
00427   const int pyindex=*PyIndex_;
00428   const double factor=1.0/LastImage_->GetRescaleFactor();
00429   const double offset=LastImage_->GetPositionOffset();
00430   int newsize=Points_[pyindex].size()+points.size();
00431   vector<HomgPoint2D>::const_iterator it;
00432   vector<float>::const_iterator qit;
00433   HomgPoint2D p2d;
00434   Matrix2x2<double> zero2x2; zero2x2.SetZero();
00435   BIASCDOUT(D_TRACKER_INIT, "min distance to image border "
00436             <<MinBorderDist_<<endl);
00437   int tlx, tly, brx, bry;
00438   (*LastImage_)[pyindex]->GetROI()->GetCorners(tlx, tly, brx, bry);
00439   const double minx=MinBorderDist_+tlx;
00440   const double miny=MinBorderDist_+tly;
00441   const double maxx=brx-MinBorderDist_;
00442   const double maxy=bry-MinBorderDist_;
00443
00444   BIASCDOUT(D_TRACKER_INIT, "roi: ("<<minx<<", "<<miny<<") <--> ("<<maxx
00445             <<", "<<maxy<<")  "<<MinBorderDist_<<"\n");
00446
00447   ReserveInternals_(pysize, newsize);
00448
00449   int n=0, num=Points_[pyindex].size();
00450   const int psize=points.size();
00451
00452   while (n<psize && num<nfeat){
00453     p2d=points[n];
00454     p2d.Homogenize();
00455     if (p2d[0]>minx && p2d[1]>miny && p2d[0]<maxx && p2d[1]<maxy){
00456       BIASCDOUT(D_TRACKER_INIT, "add point ");
00457       for (int p=pyindex; p<pysize; p++){
00458         Points_[p].push_back(p2d);
00459         BIASCDOUT(D_TRACKER_INIT, p2d<<"  ");
00460         NumIter_[p].push_back(0);
00461         DisplInLastIter_[p].push_back(-1.0);
00462         ResiduiMAD_[p].push_back(-1.0);
00463         ResiduiMSD_[p].push_back(-1.0);
00464         p2d[0]-=offset;
00465         p2d[1]-=offset;
00466         p2d[0]*=factor;
00467         p2d[1]*=factor;
00468         res_[p].push_back((int)rint(qual[n]));
00469         Cov_[p].push_back(zero2x2);
00470       }
00471       BIASCDOUT(D_TRACKER_INIT, endl);
00472       num++;
00473     } else {
00474       BIASCDOUT(D_TRACKER_INIT,"Skipped border point "<<p2d);
00475     }
00476     n++;
00477   }
00478   p2d.Set(0.0, 0.0, 0.0);
00479   newsize=Points_[pyindex].size();
00480 #ifdef BIAS_DEBUG
00481   if (num!=nfeat){
00482     BIASERR("could not add enough points, maybe there were not enough input "
00483             <<"points "<<psize<<", have "<<num<<" of "<<nfeat
00484             <<"\n try decreasing MinDistance in CornerDetector or \n"
00485             <<" decreasing MinCornerness in CornerDetector\n\n\n");
00486   }
00487 #endif
00488   // not enough input point, add points at infinity
00489   for (;num<nfeat; num++){
00490     for (int p=pyindex; p<pysize; p++){
00491       Points_[p].push_back(p2d);
00492       BIASCDOUT(D_TRACKER_INIT, p2d<<"  ");
00493       NumIter_[p].push_back(0);
00494       DisplInLastIter_[p].push_back(-1.0);
00495       ResiduiMAD_[p].push_back(-1.0);
00496       ResiduiMSD_[p].push_back(-1.0);
00497       res_[p].push_back((int)rint(qual[n]));
00498       Cov_[p].push_back(zero2x2);
00499     }
00500     BIASCDOUT(D_TRACKER_INIT, endl);
00501   }
00502
00503   p2d.Set(0.0, 0.0, 1.0);
00504   for (int p=0; p<pysize; p++)
00505     PredictedPoints_[p].resize(nfeat, p2d);
00506   p2tracked_.resize(nfeat, p2d);
00507
00508   return (newsize==nfeat)?0:-1;
00509 }
00510
00511
00512 template <class StorageType, class CalculationType>
00513 int Tracker<StorageType, CalculationType>::
00514 FillUpPoints(const vector<HomgPoint2D>& points,
00515              const vector<float>& qual)
00516 {
00517   //AddDebugLevel(D_TRACKER_FILL_UP);
00518   BIASASSERT(LastImage_!=NULL);
00519   BIASASSERT(Points_.size()>0);
00520   const int pysize=(int)LastImage_->size();
00521   const double factor=1.0/LastImage_->GetRescaleFactor();
00522   const double offset=LastImage_->GetPositionOffset();
00523   int numnew=points.size();
00524   const int size=Points_[0].size();
00525   const int pyindex=*PyIndex_;
00526   HomgPoint2D p2d;
00527   Matrix2x2<double> zero2x2; zero2x2.SetZero();
00528   BIASCDOUT(D_TRACKER_INIT, "min distance to image border "
00529             <<MinBorderDist_<<endl);
00530   int tlx, tly, brx, bry;
00531   (*LastImage_)[pyindex]->GetROI()->GetCorners(tlx, tly, brx, bry);
00532   const double minx=MinBorderDist_+tlx;
00533   const double miny=MinBorderDist_+tly;
00534   const double maxx=brx-MinBorderDist_;
00535   const double maxy=bry-MinBorderDist_;
00536
00537 #ifdef BIAS_DEBUG
00538   BIASCDOUT(D_TRACKER_FILL_UP, "minx" << minx << "miny" << miny <<
00539             "maxx" << maxx << "maxy" << maxy << endl);
00540 #endif
00541   int n=0, num=0;
00542   while (n<numnew && (points[n].IsAtInfinity() ||
00543                       !(points[n][0]>minx && points[n][1]>miny &&
00544                         points[n][0]<maxx && points[n][1]<maxy)))
00545     n++;
00546 #ifdef BIAS_DEBUG
00547   if (n<numnew)
00548     BIASCDOUT(D_TRACKER_FILL_UP, "next new point is "<<points[n]<<endl);
00549 #endif
00550   for (int i=0; i<size; i++){
00551     if (n<numnew){
00552       if (Points_[pyindex][i].IsAtInfinity()){
00553         p2d=points[n];
00554         p2d.Homogenize();
00555         BIASCDOUT(D_TRACKER_FILL_UP, setw(3)<<i<<" : replacing "
00556                   <<Points_[pyindex][i]<<" with "<<p2d<<endl);
00557         for (int p=pyindex; p<pysize; p++){
00558           Points_[p][i]=p2d;
00559           NumIter_[p][i]=-1;
00560           DisplInLastIter_[p][i]=-1.0;
00561           ResiduiMAD_[p][i]=-1.0;
00562           ResiduiMSD_[p][i]=-1.0;
00563           p2d[0]-=offset;
00564           p2d[1]-=offset;
00565           p2d[0]*=factor;
00566           p2d[1]*=factor;
00567           res_[p][i]=(int)rint(qual[n]);
00568           Cov_[p][i]=zero2x2;
00569         }
00570         n++; num++;
00571         while (n<numnew && ( points[n].IsAtInfinity() ||
00572                              !(points[n][0]>minx && points[n][1]>miny &&
00573                                points[n][0]<maxx && points[n][1]<maxy)))
00574           n++;
00575 #ifdef BIAS_DEBUG
00576         if (n<numnew)
00577           BIASCDOUT(D_TRACKER_FILL_UP, "next new point is "<<points[n]<<endl);
00578 #endif
00579       } else {
00580 #ifdef BIAS_DEBUG
00581         BIASCDOUT(D_TRACKER_FILL_UP, setw(3)<<i<<" : "<<Points_[pyindex][i]
00582                   <<" is still valid:  ");
00583         for (int p=pyindex+1; p<pysize; p++){
00584           BIASCDOUT(D_TRACKER_FILL_UP, p<<": "<<Points_[p][i]);
00585         }
00586         BIASCDOUT(D_TRACKER_FILL_UP, endl);
00587 #endif
00588       }
00589     } else {
00590       num=-num;
00591       BIASCDOUT(D_TRACKER_FILL_UP, "not enought points in points "
00592                 <<numnew<<endl);
00593       break;
00594     }
00595   }
00596   return num;
00597 }
00598
00599
00600 template <class StorageType, class CalculationType>
00601 int Tracker<StorageType, CalculationType>::
00602 ReplacePoints(const vector<HomgPoint2D>& points,
00603               const vector<float>& qual)
00604 {
00605   assert("deprecated, uese ReplaceAllPoints instead" && false);
00606   //AddDebugLevel(D_TRACKER_FILL_UP);
00607   BIASASSERT(LastImage_!=NULL);
00608   BIASASSERT(Points_.size()>0);
00609   const int pysize=(int)LastImage_->size();
00610   const double factor=1.0/LastImage_->GetRescaleFactor();
00611   const double offset=LastImage_->GetPositionOffset();
00612   const int numnew=points.size();
00613 #ifdef BIAS_DEBUG
00614   const int size=Points_[0].size();
00615   BIASASSERT(size==numnew);
00616 #endif
00617   const int pyindex=*PyIndex_;
00618   HomgPoint2D p2d;
00619   Matrix2x2<double> zero2x2; zero2x2.SetZero();
00620
00621   int n=0, num=0;
00622   while (n<numnew){
00623     while (n<numnew && points[n].IsAtInfinity()) n++;
00624     if (n<numnew){
00625 #ifdef BIAS_DEBUG
00626       BIASCDOUT(D_TRACKER_FILL_UP, "next new point is "<<points[n]<<endl);
00627 #endif
00628       p2d=points[n];
00629       p2d.Homogenize();
00630       BIASCDOUT(D_TRACKER_FILL_UP, setw(3)<<n<<" : replacing "
00631                 <<Points_[pyindex][n]<<" with "<<p2d<<endl);
00632       for (int p=pyindex; p<pysize; p++){
00633         Points_[p][n]=p2d;
00634         NumIter_[p][n]=-1;
00635         DisplInLastIter_[p][n]=-1.0;
00636         ResiduiMAD_[p][n]=-1.0;
00637         ResiduiMSD_[p][n]=-1.0;
00638         p2d[0]-=offset;
00639         p2d[1]-=offset;
00640         p2d[0]*=factor;
00641         p2d[1]*=factor;
00642         res_[p][n]=(int)rint(qual[n]);
00643         Cov_[p][n]=zero2x2;
00644       }
00645       n++; num++;
00646     }
00647   }
00648   BIASCDOUT(D_TRACKER_FILL_UP, "replaced "<<num<<" points"<<endl);
00649   return n;
00650 }
00651
00652
00653 template <class StorageType, class CalculationType>
00654 int Tracker<StorageType, CalculationType>::
00655 ReplaceAllPoints(const vector<HomgPoint2D>& points,
00656                  const vector<float>& qual)
00657 {
00658   //AddDebugLevel(D_TRACKER_FILL_UP);
00659   BIASASSERT(LastImage_!=NULL);
00660   const int numnew=points.size();
00661   const int pysize=(int)LastImage_->size();
00662   const double factor=1.0/LastImage_->GetRescaleFactor();
00663   const double offset=LastImage_->GetPositionOffset();
00664   const int pyindex=*PyIndex_;
00665   // dherzog: replaced '<numnew' by '!=numnew', because Track() asserts sizes
00666   if ((int)Points_.size() != pysize || (int)Points_[pyindex].size()!=numnew) {
00667     ClearPoints();
00668     ResizeInternals_(pysize, numnew);
00669   }
00670
00671   HomgPoint2D p2d;
00672   Matrix2x2<double> zero2x2; zero2x2.SetZero();
00673
00674   for (int n=0; n<numnew; n++){
00675     p2d = points[n];
00676     p2d.Homogenize();
00677     BIASASSERT(!p2d.IsAtInfinity());
00678     BIASCDOUT(D_TRACKER_FILL_UP, setw(3)<<n<<" : replacing "
00679               <<Points_[pyindex][n]);
00680     for (int p=pyindex; p<pysize; p++){
00681       res_[p][n] = (int)rint(qual[n]);
00682       Points_[p][n] = p2d;
00683       PredictedPoints_[p][n] = p2d;
00684       BIASASSERT(!Points_[p][n].IsAtInfinity());
00685       BIASASSERT(!PredictedPoints_[p][n].IsAtInfinity());
00686       NumIter_[p][n] = -1;
00687       DisplInLastIter_[p][n] = -1.0;
00688       ResiduiMAD_[p][n] = -1.0;
00689       ResiduiMSD_[p][n] = -1.0;
00690       Cov_[p][n] = zero2x2;
00691
00692       p2d[0] -= offset;
00693       p2d[1] -= offset;
00694       p2d[0] *= factor;
00695       p2d[1] *= factor;
00696     }
00697     BIASCDOUT(D_TRACKER_FILL_UP, " with "<<Points_[pyindex][n]<<endl);
00698   }
00699   BIASCDOUT(D_TRACKER_FILL_UP, "replaced "<<numnew<<" points"<<endl);
00700
00701   PadPoints_(numnew);
00702
00703   return numnew;
00704 }
00705
00706
00707 #ifdef BIAS_DEBUG
00708 static int Tracker_GlobalImageCounter=0;
00709 #endif
00710
00711 template <class StorageType, class CalculationType>
00712 int Tracker<StorageType, CalculationType>::
00713 PreparePyramide(const Image<StorageType>& im,
00714                 PyramidImage<CalculationType>& pim,
00715                 PyramidImage<CalculationType>& gx,
00716                 PyramidImage<CalculationType>& gy)
00717 {
00718 #ifdef TIMING
00719   TimeMeasure timer;
00720   timer.Start();
00721 #endif
00722   int fres=0, gres=0;
00723 #ifdef BIAS_DEBUG
00724   BIASASSERT(im.GetChannelCount()==1);
00725   BIASASSERT(im.GetColorModel()==ImageBase::CM_Grey);
00726 #endif
00727
00728   if (pim.size()==0 || !im.SamePixelAndChannelCount(*pim[0])){
00729     if (!pim.IsEmpty()) pim.Release();
00730     pim.Init(im.GetWidth(), im.GetHeight(), 1);
00731     pim.SetZero();
00732   }
00733   if (gx.size()==0 || !im.SamePixelAndChannelCount(*gx[0])){
00734     if (!gx.IsEmpty()) gx.Release();
00735     gx.Init(im.GetWidth(), im.GetHeight(), 1);
00736     gx.SetZero();
00737   }
00738   if (gy.size()==0 || !im.SamePixelAndChannelCount(*gy[0])){
00739     if (!gy.IsEmpty()) gy.Release();
00740     gy.Init(im.GetWidth(), im.GetHeight(), 1);
00741     gy.SetZero();
00742   }
00743
00744 #ifdef TIMING
00745   timer.Stop();
00746   cerr << "initializing pyramid images took "<<timer.GetRealTime()<<" us\n";
00747   timer.Reset();
00748   timer.Start();
00749 #endif
00750
00751 #ifdef BIAS_DEBUG
00752   ostringstream os;
00753   if (DebugLevelIsSet(D_TRACKER_WRITE_IM)){
00754     os.str("");
00755     os << "input-im"<<setw(3)<<setfill('0')<<Tracker_GlobalImageCounter
00756        <<".mip";
00757     Image<StorageType> tmp_im=im;
00758     if (ImageIO::Write(os.str(), tmp_im)!=0){
00759       BIASERR("error writing "<<os.str());
00760     }
00761   }
00762 #endif
00763
00764   //lowpass_->AddDebugLevel(D_CONV_KERNEL);
00765   //lowpass_->AddDebugLevel(D_FILTERBASE_CALLSTACK);
00766   //lowpass_->AddDebugLevel(D_WRITE_IMAGES);
00767   if((fres=lowpass_->Filter(im, *pim[0]))!=0){
00768     BIASERR("filtering failed "<<fres);
00769   }
00770   //  lowpass_->PrintKernel();
00771
00772 #ifdef BIAS_DEBUG
00773   if (DebugLevelIsSet(D_TRACKER_WRITE_IM)){
00774     os.str("");
00775     os << "pyim-lowpass-im"<<setw(3)<<setfill('0')<<Tracker_GlobalImageCounter
00776        << "-pyind"<<setw(1)<<setfill('0')<<0<<".mip";
00777     if (ImageIO::Write(os.str(), *pim[0])!=0){
00778       BIASERR("error writing "<<os.str());
00779     }
00780   }
00781 #endif
00782
00783   //lowpass_->RemoveDebugLevel(D_CONV_KERNEL);
00784 #ifdef TIMING
00785   timer.Stop();
00786   cerr << "lowpass  took "<<timer.GetRealTime()<<" us\n";
00787   timer.Reset();
00788   timer.Start();
00789 #endif
00790
00791   pim.Downsample();
00792
00793 #ifdef TIMING
00794   timer.Stop();
00795   cerr << "downsampling  took "<<timer.GetRealTime()<<" us\n";
00796   timer.Reset();
00797   timer.Start();
00798 #endif
00799
00800   const int pysize=pim.size(); // comes from parameter
00801   for (int p=0; p<pysize; p++){
00802     if((gres=grad_->Filter(*pim[p], *gx[p], *gy[p]))!=0){
00803       BIASERR("gradient failed "<<gres);
00804       break;
00805     }
00806 #ifdef BIAS_DEBUG
00807     if (DebugLevelIsSet(D_TRACKER_WRITE_IM)){
00808       os.str("");
00809       os << "pyim-im"<<setw(3)<<setfill('0')<<Tracker_GlobalImageCounter
00810          << "-pyind"<<setw(1)<<setfill('0')<<p<<".mip";
00811       if (ImageIO::Write(os.str(), *pim[p])!=0){
00812         BIASERR("error writing "<<os.str());
00813       }
00814       os.str("");
00815       os << "pygx-im"<<setw(3)<<setfill('0')<<Tracker_GlobalImageCounter
00816          << "-pyind"<<setw(1)<<setfill('0')<<p<<".mip";
00817       if (ImageIO::Write(os.str(), *gx[p])!=0){
00818         BIASERR("error writing "<<os.str());
00819       }
00820       os.str("");
00821       os << "pygy-im"<<setw(3)<<setfill('0')<<Tracker_GlobalImageCounter
00822          << "-pyind"<<setw(1)<<setfill('0')<<p<<".mip";
00823       if (ImageIO::Write(os.str(), *gy[p])!=0){
00824         BIASERR("error writing "<<os.str());
00825       }
00826     }
00827 #endif
00828   }
00829 #ifdef BIAS_DEBUG
00830   Tracker_GlobalImageCounter++;
00831 #endif
00832 #ifdef TIMING
00833   timer.Stop();
00834   cerr << "gradients  took "<<timer.GetRealTime()<<" us\n";
00835   timer.Reset();
00836   timer.Start();
00837 #endif
00838   return (fres==0 && gres==0)?0:-1;
00839 }
00840
00841 template <class StorageType, class CalculationType>
00842 int Tracker<StorageType, CalculationType>::
00843 Track(PyramidImage<CalculationType>& pim,
00844       PyramidImage<CalculationType>& gradx,
00845       PyramidImage<CalculationType>& grady)
00846 {
00847   return Track(pim, gradx, grady, Points_[*PyIndex_]);
00848 }
00849
00850 template <class StorageType, class CalculationType>
00851 int Tracker<StorageType, CalculationType>::
00852 Track(PyramidImage<CalculationType>& pim,
00853       PyramidImage<CalculationType>& gradx,
00854       PyramidImage<CalculationType>& grady,
00855       const vector<HomgPoint2D>& prediction,
00856       const vector<Matrix2x2<KLT_TYPE> >& AffinePred)
00857 {
00858 #ifdef TIMING
00859   TimeMeasure timer;
00860   timer.Start();
00861 #endif
00862   int num=0;
00863   const int pysize=(int)pim.size();
00864   const double factor=pim.GetRescaleFactor();
00865   const double offset=pim.GetPositionOffset();
00866   const Matrix2x2<double> K(factor, 0.0, 0.0, factor);
00867   //tb_.AddDebugLevel(D_TRACKERB_GKLT);
00868   //tb_.AddDebugLevel(D_TRACKERB_INIT);
00869
00870   BIASASSERT(*PyIndex_>=0 && *PyIndex_<pysize);
00871
00872   if (LastImage_ && LastGradX_ && LastGradY_){
00873 #ifdef BIAS_DEBUG
00874     if ((&pim)==LastImage_ || (&gradx)==LastGradX_ || (&grady)==LastGradY_ ){
00875       BIASERR("do not remove image between successive calls of Track\n"
00876               <<(int)(&pim)<<"!="<<(int)(LastImage_)<<","<<(int)(&gradx)<<"!="
00877               <<(int)(LastGradX_)<<","<<(int)(&grady)<<"!="<<(int)(LastGradY_));
00878     }
00879     BIASASSERT((&pim)!=LastImage_ && (&gradx)!=LastGradX_ &&
00880                (&grady)!=LastGradY_ );
00881     if (DebugLevelIsSet(D_TRACKER_IMAGES)){
00882       pim.WriteImages("act-py"); LastImage_->WriteImages("last-py");
00883       gradx.WriteImages("act-gx"); LastGradX_->WriteImages("last-gx");
00884       grady.WriteImages("act-gy"); LastGradY_->WriteImages("last-gy");
00885     }
00886 #endif
00887
00888     const int pyindex=*PyIndex_;
00889     const int nump=Points_[pyindex].size();
00890
00891     // fill PredictedPoints_ and Points_
00892     PredictedPoints_[pyindex]=prediction;
00893
00894     const double ifac=1.0/factor;
00895     for (int p=pyindex+1; p<pysize; p++){
00896       for (int i=0; i<nump; i++){
00897         Points_[p][i][0]=(Points_[p-1][i][0]-offset)*ifac;
00898         Points_[p][i][1]=(Points_[p-1][i][1]-offset)*ifac;
00899         PredictedPoints_[p][i][0]=(PredictedPoints_[p-1][i][0]-offset)*ifac;
00900         PredictedPoints_[p][i][1]=(PredictedPoints_[p-1][i][1]-offset)*ifac;
00901       }
00902     }
00903     const bool Affine = (*tb_.GetTrackerType()!=TT_Simple) &&
00904       ((*tb_.GetTrackerType()!=TT_Weighted));
00905     if (Affine) {
00906       //cout<<"affine mode !"<<nump<<" "<< AffinePred.size()  <<endl;
00907       if ((int)AffinePred.size()==nump) {
00908         // copy from vector
00909         AffinePrediction_ = AffinePred;
00910       } else {
00911         // have no prediction, start with identity
00912         AffinePrediction_.resize(nump);
00913         for (int i=0; i<nump; i++) {
00914           AffinePrediction_[i].SetIdentity();
00915         }
00916       }
00917     }
00918
00919 #ifdef TIMING
00920     timer.Stop();
00921     cerr << "initializing "<<nump<<" points took "<<timer.GetRealTime()<<" us\n";
00922     timer.Reset();
00923     timer.Start();
00924 #endif
00925
00926     // now do the actual tracking, starting on smalles pyramid level
00927     for (int p=pysize-1;p>=pyindex; p--){
00928       BIASCDOUT(D_TRACKER_TRACK, "---- pyramid level "<<p<<" ----\n");
00929
00930       *_HalfWinSize=(*HalfWinSize_)[p];
00931       *_MaxIterations=(*MaxIter_)[p];
00932       *_MaxError=(*MaxError_)[p];
00933
00934       tb_.Init(*(*LastImage_)[p], *pim[p], *(*LastGradX_)[p],
00935                 *(*LastGradY_)[p], *gradx[p], *grady[p]);
00936 #ifdef TIMING
00937       timer.Stop();
00938       cerr << "initializing tb took "<<timer.GetRealTime()<<" us\n";
00939       timer.Reset();
00940       timer.Start();
00941 #endif
00942
00943       tb_.Track(Points_[p], PredictedPoints_[p], p2tracked_,
00944                 DisplInLastIter_[p], NumIter_[p], ResiduiMAD_[p],
00945                 ResiduiMSD_[p], res_[p],Cov_[p], AffinePrediction_);
00946
00947       if (Affine) {
00948         tb_.GetAffineResults(AffineResults_[p]);
00949         // update prediction with last estimate
00950         AffinePrediction_ = AffineResults_[p];
00951       }
00952
00953 #ifdef TIMING
00954       timer.Stop();
00955       cerr << "tracking tb took "<<timer.GetRealTime()<<" us\n";
00956       timer.Reset();
00957       timer.Start();
00958 #endif
00959
00960       // check for result
00961       for (int i=0; i<nump; i++){
00962         BIASCDOUT(D_TRACKER_TRACK, setw(3)<<i<<"  ("<<Points_[p][i][0]<<", "
00963                   <<Points_[p][i][1]<<")  <-->  ("<<PredictedPoints_[p][i][0]
00964                   <<", "<<PredictedPoints_[p][i][1]<<") ");
00965         if (res_[p][i]>=0){
00966           Points_[p][i]=p2tracked_[i];
00967           BIASCDOUT(D_TRACKER_TRACK, " -> ("<<p2tracked_[i][0]<<", "
00968                     <<p2tracked_[i][1]<<") in "<<NumIter_[p][i]
00969                     <<" iterations with err "<<DisplInLastIter_[p][i]
00970                     <<"   residuumMAD "<<ResiduiMAD_[p][i]
00971                     <<"   residuumMSD "<<ResiduiMSD_[p][i]<<endl);
00972           if (p==pyindex) {
00973             num++;
00974           } else {
00975             PredictedPoints_[p-1][i][0]=Points_[p][i][0]*factor+offset;
00976             PredictedPoints_[p-1][i][1]=Points_[p][i][1]*factor+offset;
00977           }
00978         } else { // if (res_[p][i]>=0){
00979           BIASCDOUT((D_TRACKER_ERROR | D_TRACKER_TRACK), " error tracking: "
00980                     <<Points_[p][i]<<" on py level "<<p<<" result code "
00981                     <<res_[p][i]<<endl);
00982           // cerr <<" error tracking: "<<res_[p][i]<<endl;
00983           // cerr << setw(3)<<i<<"  ("<<Points_[p][i][0]<<", "
00984           //      <<Points_[p][i][1]<<")  <-->  ("<<PredictedPoints_[p][i][0]
00985           //      <<", "<<PredictedPoints_[p][i][1]<<") "<<endl;
00986           if (!UseCoarserPointIfLost_) {
00987             // manifest the failure in homogenous coordinate
00988             // do manifest it in all pyramid levels smaller than actual
00989             // the bigger pyramid levels are taken care of by code below
00990             for (int k=p; k<pysize; k++)
00991               Points_[k][i][2]=0.0;
00992           } else {
00993             // try to propagate results from last successfull track
00994             if (p!=(pysize-1) && res_[p+1][i]>=0){
00995               if (p!=pyindex) {
00996                 PredictedPoints_[p-1][i][0]=Points_[p+1][i][0]*factor+offset;
00997                 PredictedPoints_[p-1][i][1]=Points_[p+1][i][1]*factor+offset;
00998               }
00999               if (res_[p+1][i]!=0){
01000                 res_[p][i]=res_[p+1][i];
01001                 NumIter_[p][i]=NumIter_[p+1][i];
01002                 DisplInLastIter_[p][i]=DisplInLastIter_[p+1][i]*factor;
01003                 ResiduiMAD_[p][i]=ResiduiMAD_[p+1][i];
01004                 ResiduiMSD_[p][i]=ResiduiMSD_[p+1][i];
01005                 // if a random variable is transformed by a linear function with
01006                 // matrix F, the covariance transformed as J*cov*J^T, where J is
01007                 // the jacobian of F. Here the Jacobian is a matrix where the
01008                 // only entries on the main diagonal are the factors
01009                 Cov_[p][i]=(factor*factor)*Cov_[p+1][i];
01010               }
01011             }
01012           }
01013         } // if (res_[p][i]>=0){
01014       }
01015
01016 #ifdef TIMING
01017       timer.Stop();
01018       cerr << "checking results of tb took "<<timer.GetRealTime()<<" us\n";
01019       timer.Reset();
01020       timer.Start();
01021 #endif
01022
01023 #ifdef BIAS_DEBUG
01024       if (DebugLevelIsSet(D_TRACKER_NUMITER)){
01025         //check number of iterations
01026         double itersum=0.0;
01027         for (unsigned h=0; h<NumIter_[p].size(); h++)
01028           itersum+=NumIter_[p][h];
01029         //cout << p << " average number of iterations "
01030         //     <<itersum/(double)NumIter_[p].size()<<endl;
01031         totalitersum+=itersum;
01032         BIASCDOUT(D_TRACKER_NUMITER, "totalitersum "<<totalitersum<<endl);
01033       }
01034 #endif
01035     }
01036
01037     //DumpResults(); cerr << endl << endl;
01038
01039 #ifdef TIMING
01040     timer.Stop();
01041     cerr << "propagating result codes through pyramide took "<<timer.GetRealTime()<<" us\n";
01042     timer.Reset();
01043     timer.Start();
01044 #endif
01045
01046
01047 #ifdef BIAS_DEBUG
01048     if (DebugLevelIsSet(D_TRACKER_WRITE_IM)){
01049       Image<CalculationType> wim;
01050       Image<CalculationType> gim;
01051       pim.GetSingleImage(wim);
01052       ImageIO::Write("py2.mip", wim);
01053       LastImage_->GetSingleImage(wim);
01054       ImageIO::Write("py1.mip", wim);
01055       gradx.GetSingleImage(gim);
01056       ImageIO::Write("gradx2.mip", gim);
01057       LastGradX_->GetSingleImage(gim);
01058       ImageIO::Write("gradx1.mip", gim);
01059       grady.GetSingleImage(gim);
01060       ImageIO::Write("grady2.mip", gim);
01061       LastGradY_->GetSingleImage(gim);
01062       ImageIO::Write("grady1.mip", gim);
01063     }
01064 #endif
01065
01066
01067   } else {
01068     BIASCDOUT(D_TRACKER_TRACK, "initialization call\n");
01069   }
01070
01071
01072
01073   LastImage_=&pim;
01074   LastGradX_=&gradx;
01075   LastGradY_=&grady;
01076
01077 #ifdef TIMING
01078   timer.Stop();
01079   cerr << "updateing iternals  took "<<timer.GetRealTime()<<" us\n";
01080 #endif
01081
01082 #ifdef BIAS_DEBUG
01083   //WriteTrackLog_(num);
01084 #endif
01085
01086   return num;
01087 }
01088
01089
01090 template <class StorageType, class CalculationType>
01091 void Tracker<StorageType, CalculationType>::
01092 WriteTrackLog_(int num)
01093 {
01094   static bool first = true;
01095   static int img_num = 0;
01096   const int min_err_code = -7;
01097   static ofstream os("tracker.log");
01098   if (first){
01099     // open the file
01100     if (!os.good()){
01101       BIASERR("error opening \"tracker.log\"");
01102       BIASABORT;
01103     }
01104     // write header
01105     os << "# reasons for lost tracks\n"
01106        << "#" << setw(4)<<"no"
01107        << setw(7) << "num"
01108        << setw(7) << "lost"
01109        << setw(7) << "ignrd";
01110     for (int r = 0; r >= min_err_code; r--){
01111       os << setw(7) << r;
01112     }
01113     os << endl;
01114     first = false;
01115   }
01116
01117   const int pyindex = *PyIndex_;
01118   if (!Points_.empty()){
01119     const int nump = Points_[pyindex].size();
01120     // count the different failure reasons
01121     // and compute mean and variance of covariances
01122     vector<int> reason(-min_err_code + 1, 0);
01123     int reas;
01124     for (int i=0; i<nump; i++){
01125       reas = res_[pyindex][i];
01126       if (reas < 0){
01127         if (reas<min_err_code) {
01128           BIASABORT;
01129         }
01130         reason[-reas]++;
01131       } else {
01132         reason[0]++;
01133       }
01134     }
01135
01136
01137     os << setw(5) << img_num
01138        << setw(7) << nump
01139        << setw(7) << nump - num - reason[6]
01140        << setw(7) << reason[6];
01141     for (int r = 0; r <= -min_err_code; r++){
01142       os << setw(7) << reason[r];
01143     }
01144     os << endl << flush;
01145
01146     img_num++;
01147   }
01148 }
01149
01150
01151 template <class StorageType, class CalculationType>
01152 int Tracker<StorageType, CalculationType>::
01153 WriteTrackFile(deque<vector<HomgPoint2D> >& p, deque<vector<int> >& results,
01154                const string& name)
01155 {
01156   const int width=20;
01157   int i, k;
01158   ofstream os(name.c_str());
01159   if (!os){
01160     BIASERR("error opening "<<name);
01161     return -1;
01162   }
01163
01164   os << "Feel free to place comments here.\n\n";
01165
01166   os << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
01167   os << "!!! Warning:  This is a KLT data file.  Do not modify below this line !!!\n\n";
01168
01169   os << "------------------------------\n";
01170   os << "KLT Feature Table\n";
01171   os << "------------------------------\n\n";
01172
01173   os << "nFrames = "<<p.size()<<", nFeatures = "<<p[0].size()<<"\n\n";
01174
01175   os << "feature |          frame\n";
01176   os << "        |";
01177   for (i = 0 ; i < (int)p.size() ; i++)
01178     os << setw(width)<<i;
01179   os << "\n";
01180   os << "--------+";
01181   for (i = 0 ; i < (int)p.size() ; i++)
01182     for (k=0; k<width; k++) os << "-";
01183   os << "\n";
01184   if (!os){
01185     BIASERR("error writing "<<name);
01186     return -1;
01187   }
01188   os.close();
01189
01190
01191   FILE *fp=fopen(name.c_str(), "ab");
01192   for (k=0; k<(int)p[0].size(); k++){ // k = feature
01193     fprintf(fp, "%7d | ", k);
01194     for (i=0; i<(int)p.size(); i++){ // i = image
01195       //      cout << p[i][k] << endl;
01196       //cout << residui[i][k] << endl;
01197       if (!p[i][k].IsAtInfinity()){
01198         fprintf(fp, "(%7.3f,%7.3f)=%5d ", p[i][k][0], p[i][k][1],
01199                results[i][k]);
01200       } else {
01201         fprintf(fp, "(%7.3f,%7.3f)=%5d ", -1.0, -1.0, results[i][k]);
01202       }
01203     }
01204     fprintf(fp, "\n");
01205   }
01206
01207   fclose(fp);
01208   return 0;
01209 }
01210
01211
01212 template <class StorageType, class CalculationType>
01213 void Tracker<StorageType, CalculationType>::
01214 AddParameter_(Param& para, const int grp, const std::string& postfix)
01215 {
01216
01217   BIASCDOUT(D_TRACKER_PARAM, "Tracker<StorageType, CalculationType>: using "
01218             <<"group ID "<<grp<<"\n");
01219
01220   GradientType_= AddGradientType(para, "GradientType"+postfix, grp);
01221
01222   MeanType_= AddLowPassType(para, "LowPassType"+postfix, grp);
01223
01224   if (para.CheckParam("PyIndex"+postfix)){
01225     PyIndex_=para.GetParamInt("PyIndex"+postfix);
01226   } else {
01227     PyIndex_=para.AddParamInt("PyIndex"+postfix,
01228                               "biggest pyramid image used for tracking",
01229                               0, 0, INT_MAX, 0, grp);
01230   }
01231
01232   Vector<int> idflt;
01233   idflt.newsize(DFLT_PYSIZE);
01234   for (int i=0; i<DFLT_PYSIZE; i++) idflt[i]=5;
01235   if (para.CheckParam("MaxIter"+postfix)){
01236     MaxIter_=para.GetParamVecInt("MaxIter"+postfix);
01237   } else {
01238     MaxIter_=para.AddParamVecInt("MaxIter"+postfix,
01239                                  "number max iterations per pyramid level",
01240                                  idflt, 0, grp);
01241   }
01242
01243   for (int i=0; i<DFLT_PYSIZE; i++) idflt[i]=3;
01244   if (para.CheckParam("HalfWinSize"+postfix)){
01245     HalfWinSize_=para.GetParamVecInt("HalfWinSize"+postfix);
01246   } else {
01247     HalfWinSize_=para.AddParamVecInt("HalfWinSize"+postfix,
01248                                      "half window sizes per pyramid level",
01249                                      idflt, 0, grp);
01250   }
01251
01252   Vector<KLT_TYPE> ddflt;
01253   ddflt.newsize(DFLT_PYSIZE);
01254   for (int i=0; i<DFLT_PYSIZE; i++) ddflt[i]=0.1;
01255   if (para.CheckParam("MaxError"+postfix)){
01256     MaxError_=para.GetParamVecDbl("MaxError"+postfix);
01257   } else {
01258     MaxError_=para.AddParamVecDbl("MaxError"+postfix,
01259                                   "iteration error stopping criterion "
01260                                   "per pyramid level",
01261                                   ddflt, 0, grp);
01262   }
01263
01264
01265
01266   if (para.CheckParam("UseCoarserPointIfLost"+postfix)){
01267     UseCoarserPointIfLost_ = para.GetParamBool("UseCoarserPointIfLost"
01268                                                + postfix);
01269   } else {
01270     UseCoarserPointIfLost_ = para.AddParamBool("UseCoarserPointIfLost"+postfix,
01271                                                "if point untrackable in high "
01272                                                " res, use coarse result",
01273                                                false, 0, grp);
01274   }
01275
01276
01277   ///////////////////////////////////////////////////////////////////////
01278   //  now get the parameter from tracker base
01279   ///////////////////////////////////////////////////////////////////////
01280
01281   if (para.CheckParam("HalfWinSize-TrackerBase"+postfix)){
01282     _HalfWinSize=para.GetParamInt("HalfWinSize-TrackerBase"+postfix);
01283   } else {
01284     BIASERR("something funny happend, maybe TrackerBase is not initialized");
01285   }
01286
01287   if (para.CheckParam("MaxIterations-TrackerBase"+postfix)){
01288     _MaxIterations=para.GetParamInt("MaxIterations-TrackerBase"+postfix);
01289   } else {
01290     BIASERR("something funny happend, maybe TrackerBase is not initialized");
01291   }
01292
01293   if (para.CheckParam("MaxError-TrackerBase"+postfix)){
01294     _MaxError=para.GetParamDouble("MaxError-TrackerBase"+postfix);
01295   } else {
01296     BIASERR("something funny happend, maybe TrackerBase is not initialized");
01297   }
01298
01299   ///////////////////////////////////////////////////////////////////////
01300   //  now get the parameter from mean gauss
01301   ///////////////////////////////////////////////////////////////////////
01302
01303   if (para.CheckParam("Sigma-Gauss"+postfix)){
01304     _GaussSigma=para.GetParamDouble("Sigma-Gauss"+postfix);
01305   } else {
01306     BIASERR("something funny happend, maybe Gauss is not initialized");
01307   }
01308
01309   if (para.CheckParam("Ratio-Gauss"+postfix)){
01310     _GaussRatio=para.GetParamDouble("Ratio-Gauss"+postfix);
01311   } else {
01312     BIASERR("something funny happend, maybe Gauss is not initialized");
01313   }
01314
01315   ///////////////////////////////////////////////////////////////////////
01316   //  now get the parameter from mean average
01317   ///////////////////////////////////////////////////////////////////////
01318
01319   if (para.CheckParam("Size-Mean"+postfix)){
01320     _MeanSize=para.GetParamInt("Size-Mean"+postfix);
01321   } else {
01322     BIASERR("something funny happend, maybe Mean is not initialized");
01323   }
01324 #undef DFLT_PYSIZE
01325 }
01326
01327
01328 template <class StorageType, class CalculationType>
01329 void Tracker<StorageType, CalculationType>::
01330 PadPoints_(const int start)
01331 {
01332   const int pysize = (int)LastImage_->size();
01333   const int pyindex = *PyIndex_;
01334   const int num = static_cast<int>(Points_[pyindex].size());
01335   for (int i=start; i<num; i++){
01336     for (int p=pyindex; p<pysize; p++){
01337       Points_[p][i][2] = 0.0;
01338     }
01339   }
01340 }
01341
01342
01343 //////////////////////////////////////////////////////////////////////////
01344 //                 instantiation
01345 //////////////////////////////////////////////////////////////////////////
01346
01347 template class Tracker<unsigned char, float>;
01348 template class Tracker<float, float>;
01349
01350 // fill in instances as required
01351 #ifdef BUILD_IMAGE_INT
01352 template class Tracker<unsigned char, int>;
01353 #endif
01354 #ifdef BUILD_IMAGE_CHAR
01355 template class Tracker<unsigned char, char>;
01356 #endif
01357 #ifdef BUILD_IMAGE_SHORT
01358 #endif
01359 #ifdef BUILD_IMAGE_USHORT
01360 template class Tracker<unsigned short, float>;
01361 #ifdef BUILD_IMAGE_INT
01362 template class Tracker<unsigned short, int>;
01363 #endif
01364 #endif
01365 #ifdef BUILD_IMAGE_UINT
01366 #endif
01367 #ifdef BUILD_IMAGE_DOUBLE
01368 #endif
01369
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/tracker.dox File Reference

Doc/tracker.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/Tracker.hh Source File

Matcher2D

Tracker.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __Tracker_hh__
00026 #define __Tracker_hh__
00027 #include <Base/Common/BIASpragmaStart.hh>
00028
00029 #include <vector>
00030
00031 #include <Base/Math/Vector.hh>
00032 #include <Base/Geometry/HomgPoint2D.hh>
00033 #include <Image/PyramidImage.hh>
00034 #include <Utils/Param.hh>
00035 #include <Filter/GradientSobel3x3.hh>
00036 #include <Filter/GradientGauss.hh>
00037 #include <Filter/GradientGaussAsymmetric.hh>
00038 #include <Filter/Gauss.hh>
00039 #include <Filter/Mean.hh>
00040
00041 #include "TrackerBase.hh"
00042
00043 #include <deque>
00044
00045 #define D_TRACKER_INIT       0x00000001
00046 #define D_TRACKER_TRACK      0x00000002
00047 #define D_TRACKER_PARAM      0x00000004
00048 #define D_TRACKER_WRITE_IM   0x00000008
00049 #define D_TRACKER_FILL_UP    0x00000010
00050 #define D_TRACKER_IMAGES     0x00000020
00051 #define D_TRACKER_NUMITER    0x00000040
00052 #define D_TRACKER_ERROR      0x00000080
00053
00054 namespace BIAS{
00055
00056   /** @class Tracker
00057       @ingroup g_tracker
00058
00059       @brief High level tracking class. Provides a convenient interface for
00060       tracking tasks using pyramid images.
00061
00062       See ExampleTracker3 for brief exemplary usage.
00063
00064       @author woelk */
00065   template <class StorageType, class CalculationType>
00066   class BIASMatcher2D_EXPORT Tracker : public Debug
00067   {
00068   public:
00069     /** @name Initialization functions */
00070     //@{
00071
00072     /// Default constructor without param object
00073     Tracker();
00074
00075     Tracker(Param& para, const std::string& postfix="");
00076
00077     Tracker(Param& para, const int grp, const std::string& postfix);
00078
00079     virtual ~Tracker();
00080
00081
00082     /** Adopt to changes in parameter, i.e. sets grad_, lowpass_ and tb_
00083         according to *GradientType_, *MeanType_ and *TrackerType_.
00084         @author woelk 09/2004 */
00085     void ParameterChanged();
00086
00087     /** Clears the internal data structures, i.e. POints_, POints2_, NumIter_,
00088         DisplInLastIter_, ResiduiMAD_, ResiduiMSD_, res_ and Cov_.
00089         @author woelk 09/2004 */
00090     void ClearPoints();
00091
00092     /** Calls ClearPoints and sets pointer to last image and gradients to zero.
00093         @author streckel 11/2004 */
00094     void Reset();
00095
00096     //@}
00097
00098     /** @name Point manipulation functions */
00099     //@{
00100
00101     /** Adds all points to the list of points to be tracked. If a point
00102         lies too close to the roi/image border it's w-component in the internal
00103         data structure is set to zero and it is hence not tracked
00104         Track must have been called before this function.
00105         @author woelk 09/2004 */
00106     void AddPoints(const std::vector<HomgPoint2D>& points,
00107                    const std::vector<float>& quality);
00108
00109     /** Adds first max_num_feat points further away than *MinBorderDist_
00110         from roi border to the list of points to be tracked.
00111         Track must have been called before this function.
00112         returns -1 if not enough input points were available
00113         @author woelk 09/2004 */
00114     int AddNumPoints(const std::vector<HomgPoint2D>& points,
00115                      const std::vector<float>& quality,
00116                      const int max_num_feat);
00117
00118     /** Replaces points to which no correspondence could be established in
00119         the internal data structures. These "lost" points are marked in the
00120         internal data structure by setting the last component (w) to
00121         zero (0.0).
00122         Traverses the argument list subsequently and makes use of as many
00123         points as necessary. Only points further away than *MinBorderDist_
00124         from roi border are added to internal data structures.
00125
00126         If "ghost tracks" appear, try to make the corner detector aware of
00127         points which are already tracked :
00128         \code
00129         CornerDetector cd;
00130         Tracker tr;
00131         vector<HomgPoint2D> pt
00132         tr.GetPoints(pt);
00133         cd.Detect(image, pt, qual);
00134         tr.FillUpPoints(pt, qual);
00135         \endcode
00136         See also documentation of CornerDetectorGradient::Detect().
00137
00138         The argument "qual" refers to the quality from the corner detector.
00139
00140         @returns number of used points, negative on error.
00141
00142         @author woelk 09/2004 */
00143     int FillUpPoints(const std::vector<HomgPoint2D>& points,
00144                      const std::vector<float>& qual);
00145
00146
00147     /** Place every point from points which is not at infinity, in the internal
00148         data structure Points_.
00149         @author woelk 09/2004 */
00150     int ReplacePoints(const std::vector<HomgPoint2D>& points,
00151                       const std::vector<float>& qual);
00152
00153     /** Place every point from points even those at infinity, in the internal
00154         data structure Points_.
00155         @author woelk 09/2004 */
00156     int ReplaceAllPoints(const std::vector<HomgPoint2D>& points,
00157                          const std::vector<float>& qual);
00158
00159     //@}
00160
00161
00162     /** @name Tracking and image preparation functions
00163         These functions need to be called for every new image. */
00164     //@{
00165
00166     /** Prepares the pyramid images:
00167         Filters im to pim[0], downsamples pim[0] and
00168         calculates the gradients gx and gy of pim in every pyramid level.
00169         @author woelk 09/2004 */
00170     int PreparePyramide(const Image<StorageType>& im,
00171                         PyramidImage<CalculationType>& pim,
00172                         PyramidImage<CalculationType>& gx,
00173                         PyramidImage<CalculationType>& gy);
00174
00175     /** Tracks all points from the internal data structure Points_.
00176         @author woelk 09/2004 */
00177     virtual int Track(PyramidImage<CalculationType>& pim,
00178                       PyramidImage<CalculationType>& gradx,
00179                       PyramidImage<CalculationType>& grady);
00180
00181     /** tracks all points in Points_
00182         using prediction as previous knowledge
00183         @author woelk 09/2004 */
00184     virtual int Track(PyramidImage<CalculationType>& pim,
00185                       PyramidImage<CalculationType>& gradx,
00186                       PyramidImage<CalculationType>& grady,
00187                       const std::vector<HomgPoint2D>& prediction,
00188                       const std::vector<Matrix2x2<KLT_TYPE> >&affineprediction=
00189                       std::vector<Matrix2x2<KLT_TYPE> >());
00190
00191     //@}
00192
00193     /** This function allows the replacement of the last images. It is intended
00194         to be used when all points in the current image should be mapped
00195         against different reference image for every point. A set of
00196         "last images" is constructed from patches
00197         @author woelk 02/2006 */
00198     void ReplaceLastImages(PyramidImage<CalculationType> *pim,
00199                            PyramidImage<CalculationType> *gradx,
00200                            PyramidImage<CalculationType> *grady);
00201
00202
00203     /** @name Result access functions
00204         Functions for accessing results like point position, number of
00205         iterations, ... */
00206     //@{
00207
00208     /** returns the point positions in the actual image
00209         points at infinity (w=0.0) are returned, if tracking failed
00210         @author woelk */
00211     inline void GetPoints(std::vector<HomgPoint2D>& p) const
00212     { p = Points_[*PyIndex_]; }
00213
00214     /** @brief returns the number of iterations used in the biggest
00215         pyramid level
00216         @author woelk 09/2004 */
00217     inline void GetNumIter(std::vector<int>& numiter) const
00218     { numiter = NumIter_[*PyIndex_]; }
00219
00220     /** @brief returns the displacement in the last iteration on the biggest
00221         pyramid level.
00222         @author woelk 09/2004 */
00223     inline void GetError(std::vector<double>& error) const
00224     { error = DisplInLastIter_[*PyIndex_]; }
00225
00226     /** @brief returns the mean grey level difference in the tracking window
00227         on the biggest pyramid level.
00228         @author woelk 09/2004 */
00229     inline void GetResiduiMAD(std::vector<double>& residui) const
00230     { residui = ResiduiMAD_[*PyIndex_]; }
00231
00232     /** @brief returns the squared mean grey level difference in the tracking
00233         window on the biggest pyramid level.
00234         @author woelk 09/2004 */
00235     inline void GetResiduiMSD(std::vector<double>& residui) const
00236     { residui = ResiduiMSD_[*PyIndex_]; }
00237
00238     /** @brief returns the results from the base tracker class on the
00239         biggest pyramid level.
00240         0 on success (error< maxerror) - the point was tracked
00241         -1 when no spatial structure is present
00242         -2 when point slid out of image
00243         -3 when maxiter is reached an error is above maxerror
00244         -4 when a point lies outside of valid region in images
00245         -5 when the mean absolute difference between the two poinst
00246         -6 when input point is at infinity
00247         1 when error increased from last iteration
00248         @author woelk 09/2004 */
00249     inline void GetResults(std::vector<int>& results) const
00250     { results = res_[*PyIndex_]; }
00251
00252     /** @brief returns covariance matrices for biggest pyramid level.
00253         @author woelk 06/2005 */
00254     inline void GetCovariances(std::vector<Matrix<double> >& cov) const
00255     { cov = Cov_[*PyIndex_]; }
00256
00257     //@}
00258
00259     /** @brief write a track file in Birchfeld-style.
00260
00261         The file is independent of internal data structures.
00262         p[i][k] is point number k in image i and
00263         results[i][k] is result for point number k in image i.
00264
00265         @author woelk 09/2004 */
00266     int WriteTrackFile(std::deque<std::vector<HomgPoint2D> >& p,
00267                        std::deque<std::vector<int> >& results,
00268                        const std::string& name);
00269
00270     /////////////////////////////////////////////////////////////////////////
00271
00272     /** @name Parameter access
00273         Functions for accessing the parameter */
00274     //@{
00275
00276     /** @brief return trackerbase type currently active */
00277     inline int GetTrackerType()
00278     { return *tb_.GetTrackerType(); }
00279
00280     inline void SetTrackerType(int tracker_type)
00281     { tb_.SetTrackerType(tracker_type); }
00282
00283
00284     /// returns the minimum distance to image border which is used in
00285     /// AddPoints and FillUpPoints
00286     inline int GetMinBorderDistance()
00287     { return MinBorderDist_; }
00288
00289
00290     inline enum ERejectionType GetRejectionType()
00291     { return (enum ERejectionType)(*tb_.GetRejectionType()); }
00292
00293     inline void SetRejectionType(int rejection_type)
00294     { tb_.SetRejectionType(rejection_type); }
00295
00296
00297     inline Vector<int>* GetHalfWinSize()
00298     { return HalfWinSize_; }
00299
00300     inline void SetHalfWinSize(const Vector<int>& hws)
00301     { *HalfWinSize_ = hws; }
00302
00303
00304     inline void SetMaxError(const Vector<double>& max_error)
00305     { *MaxError_ = max_error; }
00306
00307
00308     inline void SetMaxIterations(const Vector<int>& max_iter)
00309     { *MaxIter_ = max_iter; }
00310
00311     inline void SetCoarsePointUsage(const bool &UseCoarse) {
00312       *UseCoarserPointIfLost_ = UseCoarse;
00313     }
00314
00315
00316      //@}
00317
00318 #ifdef BIAS_DEBUG
00319     void DumpResults(std::ostream& os=std::cout) {
00320       const int pysize = (int)LastImage_->size()-1;
00321       const int maxf = (int)Points_[*PyIndex_].size();
00322       //const int maxf=25;
00323       const int pyind=*PyIndex_;
00324       for (int i=0; i<maxf; i++){
00325         os << std::setw(5) << i << " : ";
00326         for (int p=pysize; p>=pyind; p--){
00327           os << "  " << Points_[p][i] << std::setw(4) << res_[p][i];
00328         }
00329         os << std::endl;
00330       }
00331     }
00332 #endif
00333
00334   protected:
00335     /// the base tracker
00336     TrackerBase<CalculationType> tb_;
00337
00338     /// the different gradient classes
00339     FilterNTo2N<CalculationType, CalculationType> *grad_;
00340     GradientSobel3x3<CalculationType, CalculationType> gsobel3x3_;
00341     GradientGauss<CalculationType, CalculationType> ggauss_;
00342     GradientGaussAsymmetric<CalculationType,CalculationType>ggaussasymmetric_;
00343
00344     /// the different mean filter classes
00345     Convolution<StorageType, CalculationType> *lowpass_;
00346     Gauss<StorageType, CalculationType> gauss_;
00347     Binomial<StorageType, CalculationType> binomial_;
00348     Mean<StorageType, CalculationType> mean_;
00349     bool _ParamsAllocated;
00350     /// the parameter
00351     Vector<int> *MaxIter_;
00352     Vector<KLT_TYPE> *MaxError_;
00353     Vector<int> *HalfWinSize_;
00354     int *PyIndex_;
00355     int *GradientType_;
00356     int *MeanType_;
00357     /// minimal distance of every point from image border in biggest pyramid im
00358     int MinBorderDist_;
00359     /// parameter from TrackerBase
00360     int *_HalfWinSize, *_MaxIterations;
00361     KLT_TYPE *_MaxError;
00362     /// parameter from mean filters
00363     double *_GaussSigma, *_GaussRatio;
00364     int *_MeanSize;
00365     /// set if you want to keep track of points regardless of trackability
00366     /// in highest resolution
00367     bool *UseCoarserPointIfLost_;
00368
00369     /// temporary data
00370     std::vector<HomgPoint2D> p2tracked_;
00371     /// result code for every point
00372     std::vector<std::vector<int> > res_;
00373     /// the prediction for every pyramid image
00374     std::vector<std::vector<HomgPoint2D> > PredictedPoints_;
00375     /// the point position in the actual image
00376     std::vector<std::vector<HomgPoint2D> > Points_;
00377     /// number of iterations used
00378     std::vector<std::vector<int> > NumIter_;
00379     /// displacement inlast iteration
00380     std::vector<std::vector<double> > DisplInLastIter_;
00381     /// mean absolute grey level difference (MAD) in tracking window
00382     std::vector<std::vector<double> > ResiduiMAD_;
00383     /// mean squared grey level difference (MSD) in tracking window
00384     std::vector<std::vector<double> > ResiduiMSD_;
00385     /// covariance matrices
00386     std::vector<std::vector<Matrix<double> > > Cov_;
00387     /// results of affine tracking
00388     std::vector<std::vector<Matrix2x2<double> > > AffineResults_;
00389     /// prediction for affine warping, same for all pyramid levels
00390     std::vector<Matrix2x2<double> > AffinePrediction_;
00391
00392     // the pyramid images from last call to Track
00393     PyramidImage<CalculationType> *LastImage_;
00394     PyramidImage<CalculationType> *LastGradX_, *LastGradY_;
00395
00396     void AddParameter_(Param& para, const int grp, const std::string& postfix);
00397
00398     // adapts the internal memory to new pyramid size if necessary
00399     void ResizeInternals_(const int pysize);
00400
00401     /** adapts the internal memory to new pyramid size and new
00402         point count if necessary.
00403         @author woelk 02/2006 */
00404     void ResizeInternals_(const int pysize, const int num_points);
00405
00406     // reserves point size space in every pyramid level
00407     void ReserveInternals_(const int pysize, const int pointsize);
00408
00409     /// sets all points with index>=start in the internal data structures
00410     /// to infinity
00411     void PadPoints_(const int start);
00412
00413     /** logs reasons for lost tracks into tracker.log */
00414     void WriteTrackLog_(int num);
00415
00416
00417     void DetermineROI_(int &tlx, int &tly, int &brx, int &bry) const ;
00418
00419   };
00420
00421 }
00422
00423
00424 #include <Base/Common/BIASpragmaEnd.hh>
00425
00426 #endif // __Tracker_hh__
00427
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBase.cpp Source File

Matcher2D

TrackerBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS),
00003 however, it contains other contributions.
00004 For these marked parts a different license may apply, please read
00005 the documentation of the marked parts for further details.
00006 For the rest of this file read the following:
00007
00008 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00009   Multimediale Systeme der Informationsverarbeitung
00010   Institut fuer Informatik
00011   Christian-Albrechts-Universitaet Kiel
00012
00013
00014 BIAS is free software; you can redistribute it and/or modify
00015 it under the terms of the GNU Lesser General Public License as published by
00016 the Free Software Foundation; either version 2.1 of the License, or
00017 (at your option) any later version.
00018
00019 BIAS is distributed in the hope that it will be useful,
00020 but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 GNU Lesser General Public License for more details.
00023
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with BIAS; if not, write to the Free Software
00026 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028
00029 #include "TrackerBase.hh"
00030 #include <algorithm>
00031 #include "MathAlgo/SVD.hh"
00032
00033 #include <Base/Common/BIASpragma.hh>
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038 //////////////////////////////////////////////////////////////////////////
00039 //                 operators
00040 //////////////////////////////////////////////////////////////////////////
00041
00042 ostream& BIAS::operator<<(std::ostream& os, const enum ETrackerType& tt)
00043 {
00044   switch(tt){
00045   case TT_Invalid:
00046     os << "invalid";
00047     break;
00048    case TT_Simple:
00049     os << "TT_Simple";
00050     break;
00051    case TT_Weighted:
00052     os << "TT_Weighted";
00053     break;
00054    case TT_Affine4:
00055     os << "TT_Affine4";
00056     break;
00057    case TT_Affine6:
00058     os << "TT_Affine6";
00059     break;
00060    case TT_SimpleAffine4:
00061     os << "TT_SimpleAffine4";
00062     break;
00063    case TT_SimpleAffine6:
00064     os << "TT_SimpleAffine6";
00065     break;
00066   default:
00067     os << "unkown tracker type "<<(int)tt;
00068     break;
00069   }
00070   return os;
00071 }
00072
00073
00074 ostream& BIAS::operator<<(ostream& os, const enum ERejectionType& rt)
00075 {
00076   switch (rt){
00077   case RT_Invalid:
00078     os << "invalid";
00079     break;
00080    case RT_MAD:
00081     os << "RT_MAD";
00082     break;
00083    case RT_X86:
00084     os << "RT_X86";
00085     break;
00086   default:
00087     os << "unkown rejection type "<<(int)rt;
00088     break;
00089   }
00090   return os;
00091 }
00092
00093 //////////////////////////////////////////////////////////////////////////
00094 //                 implementation
00095 //////////////////////////////////////////////////////////////////////////
00096
00097 #define SMALL_DET 1e-8
00098 #define DEFAULT_MAX_AFFINECHANGE 0.001
00099
00100
00101 template <class StorageType>
00102 TrackerBase<StorageType>::
00103 TrackerBase()
00104   : Debug()
00105 {
00106   InitMembers_();
00107   _ParamsAllocated = true;
00108
00109   _HalfWinSize = new int;
00110   *_HalfWinSize = 3;
00111   _MaxIterations = new int;
00112   *_MaxIterations = 10;
00113   _MaxError = new double;
00114   *_MaxError = 0.01;
00115   _MaxAffineChange = new double;
00116   *_MaxAffineChange = DEFAULT_MAX_AFFINECHANGE;
00117
00118   _MaxResiduumMAD = new double;
00119   *_MaxResiduumMAD = 10.0;
00120   _TrackerType = new int;
00121   *_TrackerType = TT_Simple;
00122   _RejectionType = new int;
00123   *_RejectionType = RT_MAD;
00124
00125   _LastHalfWinSize=_WinSize=0;
00126 }
00127
00128 template <class StorageType>
00129 TrackerBase<StorageType>::
00130 TrackerBase(Param& para, const std::string& postfix)
00131   : Debug()
00132 {
00133   InitMembers_();
00134   int grp = para.GetFreeGroupID();
00135   AddParam_(para, grp, "-TrackerBase"+postfix);
00136   if (para.IsUsedGroupID(grp)) para.SetGroupName(grp, "TrackerBase");
00137   _ParamsAllocated = false;
00138
00139   _LastHalfWinSize = _WinSize = 0;
00140 }
00141
00142 template <class StorageType>
00143 TrackerBase<StorageType>::
00144 TrackerBase(Param& para, const int grp, const std::string& postfix)
00145   : Debug()
00146 {
00147   InitMembers_();
00148   AddParam_(para, grp, "-TrackerBase"+postfix);
00149   _ParamsAllocated = false;
00150   _LastHalfWinSize = _WinSize = 0;
00151 }
00152
00153 template <class StorageType>
00154 TrackerBase<StorageType>::
00155 ~TrackerBase()
00156 {
00157   if (_ParamsAllocated) {
00158     delete _HalfWinSize;
00159     delete _MaxIterations;
00160     delete _MaxError;
00161     delete _MaxAffineChange;
00162     delete _MaxResiduumMAD;
00163     delete _TrackerType;
00164     delete _RejectionType;
00165   }
00166 }
00167
00168 template <class StorageType>
00169 void TrackerBase<StorageType>::
00170 InitMembers_() {
00171   _im1 = NULL;
00172   _im2 = NULL;
00173   _gradim1x = NULL;
00174   _gradim2x = NULL;
00175   _gradim1y = NULL;
00176   _gradim2y = NULL;
00177   _HalfWinSize = _MaxIterations  = NULL;
00178   _MaxError    = _MaxResiduumMAD = NULL;
00179   _TrackerType = _RejectionType  = NULL;
00180   _maxx1 = _maxy1 = _minx1 = _miny1 = 0;
00181   _maxx2 = _maxy2 = _minx2 = _miny2 = 0;
00182   _AffineResults.resize(1);
00183   _AffineResults[0].SetIdentity();
00184   _MaxAffineChange = NULL;
00185 }
00186
00187 template <class StorageType>
00188 void TrackerBase<StorageType>::
00189 Init_(StorageType **ida1, StorageType **ida2, StorageType **gradx1,
00190       StorageType **grady1, StorageType **gradx2, StorageType **grady2,
00191       unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1,
00192       unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2)
00193 {
00194   bool resize=(*this->_HalfWinSize != this->_LastHalfWinSize);
00195   if (resize){
00196     Resize_(*this->_HalfWinSize);
00197   }
00198
00199   _minx1=minx1+*_HalfWinSize+1;
00200   _miny1=miny1+*_HalfWinSize+1;
00201   _maxx1=maxx1-*_HalfWinSize-1;
00202   _maxy1=maxy1-*_HalfWinSize-1;
00203   _minx2=minx2+*_HalfWinSize+1;
00204   _miny2=miny2+*_HalfWinSize+1;
00205   _maxx2=maxx2-*_HalfWinSize-1;
00206   _maxy2=maxy2-*_HalfWinSize-1;
00207
00208   BIASCDOUT(D_TRACKERB_INIT, "tracking roi im1 : ( "<<_minx1<<", "<<_miny1
00209             <<")  <-->  ( "<<_maxx1<<", "<<_maxy1<<")\n");
00210   BIASCDOUT(D_TRACKERB_INIT, "tracking roi im2 : ( "<<_minx2<<", "<<_miny2
00211             <<")  <-->  ( "<<_maxx2<<", "<<_maxy2<<")\n");
00212
00213   _ida1=ida1;
00214   _ida2=ida2;
00215   _gradx1=gradx1;
00216   _gradx2=gradx2;
00217   _grady1=grady1;
00218   _grady2=grady2;
00219   BIASASSERT(*_HalfWinSize>0);
00220   BIASASSERT(_maxy1>_miny1 && _maxx1>_minx1);
00221   BIASASSERT(_maxy2>_miny2 && _maxx2>_minx2);
00222
00223   if (resize && *_TrackerType==TT_Weighted){
00224     CalcGaussianWeightMatrix_();
00225   }
00226 }
00227
00228 template <class StorageType>
00229 void TrackerBase<StorageType>::
00230 Init(Image<StorageType>& im1, Image<StorageType>& im2,
00231      Image<StorageType>& gradx1, Image<StorageType>& grady1,
00232      Image<StorageType>& gradx2, Image<StorageType>& grady2)
00233 {
00234   unsigned ytlx, ytly, ybrx, ybry;
00235   grady1.GetROI()->GetCorners(ytlx, ytly, ybrx, ybry);
00236   unsigned xtlx, xtly, xbrx, xbry;
00237   gradx1.GetROI()->GetCorners(xtlx, xtly, xbrx, xbry);
00238   unsigned minx1, miny1, maxx1, maxy1;
00239   minx1=(ytlx>xtlx)?(ytlx):(xtlx);
00240   miny1=(ytly>xtly)?(ytly):(xtly);
00241   maxx1=(ybrx<xbrx)?(ybrx):(xbrx);
00242   maxy1=(ybry<xbry)?(ybry):(xbry);
00243
00244   grady2.GetROI()->GetCorners(ytlx, ytly, ybrx, ybry);
00245   gradx2.GetROI()->GetCorners(xtlx, xtly, xbrx, xbry);
00246   unsigned minx2, miny2, maxx2, maxy2;
00247   minx2=(ytlx>xtlx)?(ytlx):(xtlx);
00248   miny2=(ytly>xtly)?(ytly):(xtly);
00249   maxx2=(ybrx<xbrx)?(ybrx):(xbrx);
00250   maxy2=(ybry<xbry)?(ybry):(xbry);
00251
00252   BIASASSERT(im2.SamePixelAndChannelCount(im1));
00253   BIASASSERT(gradx1.SamePixelAndChannelCount(im1));
00254   BIASASSERT(grady1.SamePixelAndChannelCount(im1));
00255   BIASASSERT(gradx2.SamePixelAndChannelCount(im1));
00256   BIASASSERT(grady2.SamePixelAndChannelCount(im1));
00257
00258   _im1 = &im1;
00259   _im2 = &im2;
00260
00261   _gradim1x = &gradx1;
00262   _gradim2x = &gradx2;
00263   _gradim1y = &grady1;
00264   _gradim2y = &grady2;
00265
00266   Init_(im1.GetImageDataArray(), im2.GetImageDataArray(),
00267         gradx1.GetImageDataArray(), grady1.GetImageDataArray(),
00268         gradx2.GetImageDataArray(), grady2.GetImageDataArray(),
00269         minx1, miny1, maxx1, maxy1, minx2, miny2, maxx2, maxy2);
00270
00271 }
00272
00273
00274 template <class StorageType>
00275 int TrackerBase<StorageType>::
00276 Track(HomgPoint2D& p1, HomgPoint2D& p2, HomgPoint2D& p2tracked,
00277       KLT_TYPE& error, int &iter, KLT_TYPE& residuumMAD, KLT_TYPE& residuumMSD,
00278       Matrix<KLT_TYPE>& cov,
00279       const Matrix2x2<KLT_TYPE>& AffinePred) {
00280   int res=-20;
00281   if (p1[2]==1.0){
00282     bool FirstPassDone = false;
00283     switch(*_TrackerType){
00284     case TT_Weighted:
00285       res=TrackWeighted_(p1.GetData(), p2.GetData(), p2tracked.GetData(),
00286                          error, iter);
00287       cov.newsize(2,2);
00288       EvaluateResult_(res, residuumMAD, residuumMSD, cov.GetData());
00289       break;
00290     case TT_Simple:
00291     case TT_SimpleAffine4:
00292     case TT_SimpleAffine6:
00293
00294       res=TrackSimple_(p1.GetData(), p2.GetData(), p2tracked.GetData(), error,
00295                        iter);
00296       cov.newsize(2,2);
00297       EvaluateResult_(res, residuumMAD, residuumMSD, cov.GetData());
00298       FirstPassDone = true;
00299       break;
00300     }
00301     bool Only4Parameters = false;
00302     // second pass of possible multipass, affine estimation
00303     switch(*_TrackerType){
00304     case TT_SimpleAffine4:
00305     case TT_Affine4: Only4Parameters = true;
00306     case TT_SimpleAffine6:
00307     case TT_Affine6: {
00308       if (_AffineResults.size()==0) _AffineResults.resize(1);
00309 #ifdef BIAS_DEBUG
00310       if (AffinePred.NormFrobenius()<1e-10) {
00311         BIASERR("affine guess seems unitialized, set at least identity");
00312       }
00313 #endif
00314       if (FirstPassDone && res==TRACKER_SUCCESS)  p2 = p2tracked;
00315       res =
00316         TrackAffine_(p1.GetData(), p2.GetData(), AffinePred,
00317                      p2tracked.GetData(), _AffineResults[0],
00318                      error, iter, cov, residuumMAD, residuumMSD,
00319                      Only4Parameters);
00320       break;
00321     }
00322
00323     default:
00324       if (!FirstPassDone) BIASERR("unknown tracker type "<<*_TrackerType);
00325       break;
00326     }
00327
00328   } else {
00329     res = TRACKER_IGNOREPOINT;
00330   }
00331
00332   return res;
00333 }
00334
00335
00336 template <class StorageType>
00337 void TrackerBase<StorageType>::
00338 Track(std::vector<HomgPoint2D>& p1, std::vector<HomgPoint2D>& p2,
00339       std::vector<HomgPoint2D>& p2tracked, std::vector<KLT_TYPE>& error,
00340       std::vector<int>& numiter, std::vector<KLT_TYPE>& residuiMAD,
00341       std::vector<KLT_TYPE>& residuiMSD, std::vector<int>& res,
00342       std::vector<Matrix<KLT_TYPE> >& cov,
00343       const std::vector<Matrix2x2<KLT_TYPE> >& AffinePred)
00344 {
00345 #ifdef TIMING
00346   TimeMeasure timer;
00347   timer.Start();
00348 #endif
00349   const unsigned num=p1.size();
00350   BIASASSERT(num==p2.size() && num==p2tracked.size() && num==error.size());
00351   BIASASSERT(num==numiter.size() && num==res.size() && num==residuiMSD.size()&&
00352              num==residuiMAD.size() && num==cov.size());
00353
00354   // firt pass of possible multi pass tracking
00355   bool FirstPassDone = false;
00356   switch(*_TrackerType){
00357   case TT_Weighted:
00358     for (unsigned i=0; i<num; i++){
00359       if (p1[i][2]==1.0){
00360 #ifdef BIAS_DEBUG
00361         BIASASSERT(p2[i].IsHomogenized());
00362 #endif
00363         res[i]=
00364           TrackWeighted_(p1[i].GetData(), p2[i].GetData(),
00365                          p2tracked[i].GetData(), error[i], numiter[i]);
00366         cov[i].newsize(2,2);
00367         EvaluateResult_(res[i], residuiMAD[i], residuiMSD[i],cov[i].GetData());
00368       } else {
00369         res[i] = TRACKER_IGNOREPOINT;
00370       }
00371     }
00372     break;
00373   case TT_Simple:
00374   case TT_SimpleAffine4:
00375   case TT_SimpleAffine6:
00376
00377     for (unsigned i=0; i<num; i++){
00378       if (p1[i][2]==1.0){
00379 #ifdef BIAS_DEBUG
00380         BIASCDOUT(D_TRACKERB_INPUT, "attemting to track "<<setw(4)<<i<<"  "
00381                   <<p1[i]<<" -> "<<p2[i]);
00382         BIASASSERT(p2[i].IsHomogenized());
00383 #endif
00384         res[i]=
00385           TrackSimple_(p1[i].GetData(), p2[i].GetData(),p2tracked[i].GetData(),
00386                        error[i], numiter[i]);
00387         cov[i].newsize(2,2);
00388         EvaluateResult_(res[i], residuiMAD[i], residuiMSD[i],cov[i].GetData());
00389
00390       } else {
00391         res[i] = TRACKER_IGNOREPOINT;
00392       }
00393     }
00394     FirstPassDone = true;
00395     break;
00396   }
00397   bool Only4Parameters = false;
00398   // second pass of possible multipass, affine estimation
00399   switch(*_TrackerType){
00400   case TT_SimpleAffine4:
00401   case TT_Affine4: Only4Parameters = true;
00402   case TT_SimpleAffine6:
00403   case TT_Affine6:
00404
00405     BIASASSERT(AffinePred.size()==num);
00406     if (_AffineResults.size()!=num) {
00407       _AffineResults.resize(num);
00408     }
00409
00410     for (unsigned i=0; i<num; i++){
00411       if (p1[i][2]==1.0) {
00412         // exploit result of first part
00413         if (FirstPassDone && res[i]==TRACKER_SUCCESS)  p2[i] = p2tracked[i];
00414 #ifdef BIAS_DEBUG
00415         BIASASSERT(p2[i].IsHomogenized());
00416         BIASCDOUT(D_TRACKERB_INPUT, "attemting to aff-track "<<setw(4)<<i<<"  "
00417                   <<p1[i]<<" -> "<<p2[i]);
00418 #endif
00419         res[i]=
00420           TrackAffine_(p1[i].GetData(), p2[i].GetData(), AffinePred[i],
00421                        p2tracked[i].GetData(), _AffineResults[i],
00422                        error[i], numiter[i], cov[i],
00423                        residuiMAD[i], residuiMSD[i], Only4Parameters);
00424         //cout<<_AffineResults[i]<<endl;
00425       } else {
00426         res[i] = TRACKER_IGNOREPOINT;
00427       }
00428     }
00429     break;
00430
00431   default:
00432     if (!FirstPassDone) {
00433       BIASERR("unknown tracker type "<<*_TrackerType);
00434     }
00435     break;
00436   }
00437
00438
00439   switch(*_RejectionType){
00440   case RT_MAD:
00441     RejectMAD_(residuiMAD, res);
00442     break;
00443   case RT_X86:
00444     RejectX86_(residuiMSD,  res);
00445     break;
00446   default:
00447     BIASERR("unknown rejection method "<<*_RejectionType);
00448     break;
00449   }
00450
00451 #ifdef TIMING
00452   timer.Stop();
00453   cerr << "TrackerBase tracking took "<<timer.GetRealTime()<<" us\n";
00454 #endif
00455 }
00456
00457
00458 ///////////////////////////////////////////////////////////////////
00459 //  tracking
00460 ///////////////////////////////////////////////////////////////////
00461
00462 template <class StorageType>
00463 int TrackerBase<StorageType>::
00464 TrackSimple_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00465              KLT_TYPE& error, int &iter)
00466 {
00467 #ifdef TIMING
00468   TimeMeasure timer;
00469   timer.Start();
00470 #endif
00471   if (*this->_HalfWinSize != _LastHalfWinSize){
00472     Resize_(*this->_HalfWinSize);
00473   }
00474   BIASCDOUT(D_TRACKERB_KLT,"trying to track p1: (" << p1[0] << ", " << p1[1]
00475             << ") <--> p2: (" <<p2[0] << ", " << p2[1]<<")\n");
00476
00477   int res=0;
00478   int rh, ch;
00479   register KLT_TYPE dI, ex, ey, dx, dy, det;
00480   KLT_TYPE lsterror=FLT_MAX;
00481   const int hws=*this->_HalfWinSize;
00482   const int winsize=_WinSize;
00483   const int maxiter=*this->_MaxIterations;
00484   const KLT_TYPE maxerr=*this->_MaxError;
00485
00486   BIASCDOUT(D_TRACKERB_INIT, "using hws: "<<hws<<"\tmaxiter: "<<maxiter
00487             <<"\tmaxerr: "<<maxerr<<endl);
00488
00489   if (p1[0]<this->_minx1 || p1[0]>=this->_maxx1 ||
00490       p1[1]<this->_miny1 || p1[1]>=this->_maxy1 ||
00491       p2[0]<this->_minx2 || p2[0]>=this->_maxx2 ||
00492       p2[1]<this->_miny2 || p2[1]>=this->_maxy2 ){
00493     BIASCDOUT(D_TRACKERB_KLT, "p1 ("<<p1[0]<<", "<<p1[1]<<")   p2 ("<<p2[0]
00494               <<", "<<p2[1]<<")\n");
00495     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im1 : ( "<<_minx1<<", "<<_miny1
00496               <<")  <-->  ( "<<_maxx1<<", "<<_maxy1<<")\n");
00497     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im2 : ( "<<_minx2<<", "<<_miny2
00498               <<")  <-->  ( "<<_maxx2<<", "<<_maxy2<<")\n");
00499     BIASCDOUT(D_TRACKERB_KLT, "points do not lie in ROI, returning -4\n");
00500     return TRACKER_OUTOFROI;
00501   } else {
00502     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im1 : ( "<<_minx1<<", "<<_miny1
00503               <<")  <-->  ( "<<_maxx1<<", "<<_maxy1<<")\n");
00504     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im2 : ( "<<_minx2<<", "<<_miny2
00505               <<")  <-->  ( "<<_maxx2<<", "<<_maxy2<<")\n");
00506   }
00507
00508   iter=0;
00509
00510   result[0]=p2[0];
00511   result[1]=p2[1];
00512   this->MyBilinearRegion1_(p1[0],p1[1],hws);
00513   BIASCDOUT(D_TRACKERB_BILINEAR, "_bl1: "<<_bl1<<"\n_gx1: "<<_gx1
00514             <<"\n_gy1: "<<_gy1<<endl);
00515 #ifdef TIMING
00516   timer.Stop();
00517   cerr << "TrackerBase MyBilinearRegion1_ took "<<timer.GetRealTime()
00518        <<" us = "<<timer.GetCycleCount()<<" cycles \n";
00519   timer.Reset();
00520   timer.Start();
00521 #endif
00522
00523   do {
00524     _gxx=_gxy=_gyy=ex=ey=0.0;
00525     MyBilinearRegion2_(result[0],result[1],hws);
00526     BIASCDOUT(D_TRACKERB_BILINEAR, "_bl2: "<<_bl2<<"\n_gx2: "<<_gx2
00527               <<"\n_gy2: "<<_gy2<<endl);
00528
00529     // initialize G and e
00530     for (rh=0; rh<winsize; rh++){
00531       for (ch=0; ch<winsize; ch++){
00532         _gsx[rh][ch] = _gx1[rh][ch] + _gx2[rh][ch];
00533         _gsy[rh][ch] = _gy1[rh][ch] + _gy2[rh][ch];
00534         _gxx += _gsx[rh][ch]*_gsx[rh][ch];
00535         _gyy += _gsy[rh][ch]*_gsy[rh][ch];
00536         _gxy += _gsx[rh][ch]*_gsy[rh][ch];
00537         dI = _bl1[rh][ch] - _bl2[rh][ch];
00538         ex += _gsx[rh][ch]*dI;
00539         ey += _gsy[rh][ch]*dI;
00540 #ifdef BIAS_DEBUG
00541         if (isnan(_gxx) || isinf(_gxx) ||
00542             isnan(_gxy) || isinf(_gxy) ||
00543             isnan(_gyy) || isinf(_gyy) ) {
00544           cout << "_gx1: "<<_gx1<<"\n_gx2: "<<_gx2
00545                << "\n_gy1: "<<_gy1<<"\n_gy2: "<<_gy2
00546                << "\n_bl1: "<<_bl1<<"\n_bl2: "<<_bl2
00547                << "\np1: "<<p1[0]<<" "<<p1[1]<<endl
00548                << "\np2: "<<p2[0]<<" "<<p2[1]<<endl
00549                << "\nroi1 ("<<_minx1<<", "<<_miny1<<") <--> ("
00550                <<_maxx1<<", "<<_maxy1<<")"
00551                << "\nroi2 ("<<_minx2<<", "<<_miny2<<") <--> ("
00552                <<_maxx2<<", "<<_maxy2<<")\n";
00553         }
00554         BIASASSERT(!isnan(_gxx) && !isinf(_gxx));
00555         BIASASSERT(!isnan(_gxy) && !isinf(_gxy));
00556         BIASASSERT(!isnan(_gyy) && !isinf(_gyy));
00557 #endif
00558       }
00559     }
00560     BIASCDOUT(D_TRACKERB_KLT, "iter: "<<iter<<"  _gxx: "<<_gxx<<" _gxy: "<<_gxy
00561               <<" _gyy: "<<_gyy<<" ex: "<<ex<<" ey: "<<ey<<endl);
00562     det = _gxx*_gyy-_gxy*_gxy;
00563     if (fabs(det)<SMALL_DET) {
00564       BIASDOUT(D_TRACKERB_KLT,
00565                "unable to invert G, det: "<<det);
00566       res = TRACKER_NOSTRUCTURE;
00567       break;
00568     }
00569     _idet=1.0/det;
00570     dx = (_gyy*ex - _gxy*ey)*_idet;
00571     dy = (_gxx*ey - _gxy*ex)*_idet;
00572
00573     BIASCDOUT(D_TRACKERB_KLT, "     det: "<<det<<" _idet: "<<_idet
00574               <<" dx: "<<dx<<" dy: "<<dy<<endl);
00575
00576     //error = sqrt(dx*dx + dy*dy);
00577     error = (fabs(dx)>fabs(dy))?fabs(dx):fabs(dy);
00578
00579     /*
00580     if (error>lsterror){
00581       BIASCDOUT(D_TRACKERB_KLT,
00582                 "error increased ("
00583                 <<lsterror<<" -> "<<error
00584                 <<"), stopping iteration and returning 1\n");
00585       res = TRACKER_ERRORINCREASED;
00586       error=lsterror;
00587       break;
00588       } */
00589     lsterror=error;
00590
00591     result[0] += dx;
00592     result[1] += dy;
00593
00594     BIASCDOUT(D_TRACKERB_KLT,"     disp after "<<iter<<" iteration: "
00595               <<result[0]-p2[0]<<", "<<result[1]-p2[1]<<" error: "<< error
00596               << "  ("<<result[0]<<", "<<result[1]<<")\n");
00597
00598     //#define D_TRACK
00599 #ifdef D_TRACK
00600     fprintf(stdout, "iter: %i\t_gxx: %f\t_gxy: %f\t_gyy: %f\tex: %f\tey: %f\n",
00601             iter, _gxx, _gxy, _gyy, ex, ey);
00602     fprintf(stdout, "      \tdx: %f\tdy: %f\tcoo: (%f, %f)\n",
00603             dx, dy, result[0], result[1]);
00604 #endif
00605
00606     iter++;
00607
00608     if (result[0]<this->_minx2 || result[0]>=this->_maxx2 ||
00609         result[1]<this->_miny2 || result[1]>=this->_maxy2){
00610       BIASCDOUT(D_TRACKERB_KLT,
00611                 "feature slid out of image, returning -2");
00612       res = TRACKER_OUTOFIMAGE;
00613       break;
00614     }
00615   } while (error>maxerr && iter<maxiter);
00616
00617   if (res==0 && error>maxerr && iter==maxiter) {
00618     res = TRACKER_TOOMANYITER;
00619     BIASCDOUT(D_TRACKERB_KLT,"error > "<<maxerr
00620               <<" and max iteration count reached: "<<iter<<" returning -3");
00621   } else if (res==0) {
00622     MyBilinearRegion2_(result[0],result[1],hws);
00623   }
00624
00625 #ifdef TIMING
00626   timer.Stop();
00627   cerr << "i "<<iter<<" res "<<res<<" ";
00628   cerr << "TrackSimple_ took "<<timer.GetRealTime()<<" us = "
00629        <<timer.GetCycleCount()<<" cycles\n";
00630 #endif
00631   return res;
00632 }
00633
00634 template <class StorageType>
00635 int TrackerBase<StorageType>::
00636 TrackWeighted_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00637                KLT_TYPE& error, int &iter)
00638 {
00639   if (*this->_HalfWinSize != this->_LastHalfWinSize){
00640     Resize_(*this->_HalfWinSize);
00641     CalcGaussianWeightMatrix_();
00642   }
00643   BIASCDOUT(D_TRACKERB_KLT,"p1: " << p1[0] << ", " << p1[1]
00644             << "\tp2: " <<p2[0] << ", " << p2[1]<<endl);
00645
00646   int res=TRACKER_SUCCESS;
00647   int rh, ch;
00648
00649   register KLT_TYPE dI, ex, ey, dx, dy, det;
00650   KLT_TYPE lsterror=FLT_MAX;
00651   const int hws=*this->_HalfWinSize;
00652   const int winsize=this->_WinSize;
00653   const int maxiter=*this->_MaxIterations;
00654   const KLT_TYPE maxerr=*this->_MaxError;
00655
00656   if (p1[0]<this->_minx1 || p1[0]>=this->_maxx1 ||
00657       p1[1]<this->_miny1 || p1[1]>=this->_maxy1 ||
00658       p2[0]<this->_minx2 || p2[0]>=this->_maxx2 ||
00659       p2[1]<this->_miny2 || p2[1]>=this->_maxy2 ){
00660     BIASCDOUT(D_TRACKERB_KLT, "p1 ("<<p1[0]<<", "<<p1[1]<<")   p2 ("<<p2[0]
00661               <<", "<<p2[1]<<")\n");
00662     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im1 : ( "<<_minx1<<", "<<_miny1
00663               <<")  <-->  ( "<<_maxx1<<", "<<_maxy1<<")\n");
00664     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im2 : ( "<<_minx2<<", "<<_miny2
00665               <<")  <-->  ( "<<_maxx2<<", "<<_maxy2<<")\n");
00666     BIASCDOUT(D_TRACKERB_KLT, "points do not lie in ROI, returning -4\n");
00667     return TRACKER_OUTOFROI;
00668   } else {
00669     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im1 : ( "<<_minx1<<", "<<_miny1
00670               <<")  <-->  ( "<<_maxx1<<", "<<_maxy1<<")\n");
00671     BIASCDOUT(D_TRACKERB_KLT, "tracking roi im2 : ( "<<_minx2<<", "<<_miny2
00672               <<")  <-->  ( "<<_maxx2<<", "<<_maxy2<<")\n");
00673   }
00674
00675   iter=0;
00676
00677   result[0]=p2[0];
00678   result[1]=p2[1];
00679   //  MyBilinearRegion(_ida1,_gradx1,_grady1,p1[0],p1[1],hws,_bl1,_gx1,_gy1);
00680   this->MyBilinearRegion1_(p1[0],p1[1],hws);
00681   do {
00682     _gxx=_gxy=_gyy=ex=ey=0.0;
00683     //     MyBilinearRegion(_ida2,_gradx2,_grady2,result[0],result[1],hws,
00684     //                      _bl2,_gx2,_gy2);
00685     this->MyBilinearRegion2_(result[0],result[1],hws);
00686     // initialize G and e
00687     for (rh=0; rh<winsize; rh++){
00688       for (ch=0; ch<winsize; ch++){
00689         this->_gsx[rh][ch] =
00690           _weight[rh][ch] * (this->_gx1[rh][ch] + this->_gx2[rh][ch]);
00691         this->_gsy[rh][ch] =
00692           _weight[rh][ch] * (this->_gy1[rh][ch] + this->_gy2[rh][ch]);
00693         _gxx += this->_gsx[rh][ch]*this->_gsx[rh][ch];
00694         _gyy += this->_gsy[rh][ch]*this->_gsy[rh][ch];
00695         _gxy += this->_gsx[rh][ch]*this->_gsy[rh][ch];
00696         dI = _weight[rh][ch] * (this->_bl1[rh][ch] - this->_bl2[rh][ch]);
00697         ex += this->_gsx[rh][ch]*dI;
00698         ey += this->_gsy[rh][ch]*dI;
00699       }
00700     }
00701     BIASCDOUT(D_TRACKERB_KLT, "_gxx: "<<_gxx<<" _gxy: "<<_gxy
00702               <<" _gyy: "<<_gyy<<" ex: "<<ex<<" ey: "<<ey<<endl);
00703     det = _gxx*_gyy-_gxy*_gxy;
00704     if (fabs(det)<SMALL_DET) {
00705       BIASCDOUT(D_TRACKERB_KLT,
00706                 "unable to invert G, det: "<<det<<endl);
00707
00708       res = TRACKER_NOSTRUCTURE;
00709       break;
00710     }
00711     _idet=1.0/det;
00712     dx = (_gyy*ex - _gxy*ey)*_idet;
00713     dy = (_gxx*ey - _gxy*ex)*_idet;
00714
00715     BIASCDOUT(D_TRACKERB_KLT, "det: "<<det<<" _idet: "<<_idet
00716               <<" dx: "<<dx<<" dy: "<<dy<<endl);
00717
00718     //error = sqrt(dx*dx + dy*dy);
00719     error = (fabs(dx)>fabs(dy))?fabs(dx):fabs(dy);
00720     /*
00721       if (error>lsterror){
00722       BIASCDOUT(D_TRACKERB_KLT, "error increased ("
00723       <<lsterror<<" -> "<<error
00724       <<"), stopping iteration and returning 1\n");
00725       res = TRACKER_ERRORINCREASED;
00726       error=lsterror;
00727       break;
00728       }
00729     */
00730     lsterror=error;
00731
00732     result[0] += dx;
00733     result[1] += dy;
00734
00735     BIASCDOUT(D_TRACKERB_KLT,"disp after "<<iter<<" iteration: "
00736               <<result[0]-p2[0]<<", "<<result[1]-p2[1]<<" error: "<< error
00737               << "  ("<<result[0]<<", "<<result[1]<<")\n");
00738
00739     iter++;
00740
00741     if (result[0]<this->_minx2 || result[0]>=this->_maxx2 ||
00742         result[1]<this->_miny2 || result[1]>=this->_maxy2){
00743       BIASCDOUT(D_TRACKERB_KLT,
00744                 "feature slid out of image, returning -2\n");
00745       res = TRACKER_OUTOFIMAGE;
00746       break;
00747     }
00748   } while (error>maxerr && iter<maxiter);
00749
00750   if (res==0 && error>maxerr) {
00751     res = TRACKER_TOOMANYITER;
00752     BIASCDOUT(D_TRACKERB_KLT,"error > maxerror : returning -3\n");
00753   } else if (res==0) {
00754     MyBilinearRegion2_(result[0],result[1],hws);
00755   }
00756
00757 #ifdef TIMING
00758   timer.Stop();
00759   cerr << "i "<<iter<<" res "<<res<<" ";
00760   cerr << "TrackWeighted_ took "<<timer.GetRealTime()<<" us = "
00761        <<timer.GetCycleCount()<<" cycles\n";
00762 #endif
00763
00764   return res;
00765 }
00766
00767
00768
00769
00770
00771 template <class StorageType>
00772 int TrackerBase<StorageType>::
00773 EvaluateResult_(int& res, KLT_TYPE& mad, KLT_TYPE& msd, KLT_TYPE cov[4])
00774 {
00775 #ifdef TIMING
00776   TimeMeasure timer;
00777   timer.Start();
00778 #endif
00779
00780   if (res==0){
00781     const int wsize = _WinSize*_WinSize;
00782     KLT_TYPE *f1=_bl1.GetData(), *f2=_bl2.GetData(), *end=f1+wsize;
00783     mad = 0.0;
00784     msd = 0.0;
00785     KLT_TYPE tmp_res=0.0;
00786     while (f1<end){
00787       tmp_res = *f1++ - *f2++;
00788       msd += tmp_res * tmp_res;
00789       mad += fabs(tmp_res);
00790     }
00791
00792     // now calculate the covariance matrix
00793     // see Reinhards dissertation page 67, equation 5.9
00794     // this is the inverse of the matrix
00795     // the reference variance is sigma
00796     BIASASSERT(wsize>3);
00797     double sigmasquared = msd / (double)(wsize - 2);
00798
00799     // compute mean squared difference
00800     msd /= (KLT_TYPE)wsize;
00801     mad /= (KLT_TYPE)wsize;
00802
00803     // the inverse of the structure tensor matrix is given by
00804     // 1/det * | _gyy -_gxy|
00805     //         |-_gxy  _gxx|
00806     cov[0] = _gyy * _idet * sigmasquared;
00807     cov[1] = cov[2]= -_gxy * _idet * sigmasquared;
00808     cov[3] = _gxx * _idet * sigmasquared;
00809 // #ifdef BIAS_DEBUG
00810 //     cout << "mad "<<mad<<" sigmasq "<<sigmasquared<<" cov[0][0] "<<cov[0]
00811 //          <<" cov[1][1] "<<cov[3];
00812 //     double meanx=0.0, meany=0.0;
00813 //     for (int x=0; x<7; x++){
00814 //       for (int y=0; y<7; y++){
00815 //         meanx+=fabs(_gx1[y][x]);
00816 //         meany+=fabs(_gy1[y][x]);
00817 //       }
00818 //     }
00819 //     meanx/=49.0;
00820 //     meany/=49.0;
00821 //     cout <<"  gx: "<<meanx <<" gy: "<<meany<<" idet "<<_idet<<" _gxx "
00822 //          <<_gxx<<" _gyy "<<_gyy<<endl;
00823 // #endif
00824   }
00825
00826 #ifdef TIMING
00827   timer.Stop();
00828   cerr << "TrackerBase::EvaluateResult_ took "<<timer.GetRealTime()<<" us = "
00829        <<timer.GetCycleCount()<<" cycles\n";
00830 #endif
00831   return res;
00832 }
00833
00834
00835
00836 template <class StorageType>
00837 int TrackerBase<StorageType>::
00838 RejectMAD_(std::vector<KLT_TYPE>& sad, std::vector<int>& res)
00839 {
00840   KLT_TYPE thresh=*_MaxResiduumMAD;
00841   unsigned num = res.size();
00842
00843   for (unsigned i=0; i<num; i++){
00844     if (res[i]>=TRACKER_SUCCESS && sad[i]>=thresh){
00845       res[i]=TRACKER_MEANABSDIF;
00846     }
00847   }
00848   return 0;
00849 }
00850
00851 template <class StorageType>
00852 int TrackerBase<StorageType>::
00853 RejectX86_(std::vector<KLT_TYPE>& ssd, std::vector<int>& res)
00854 {
00855 #ifdef TIMING
00856   TimeMeasure timer;
00857   timer.Start();
00858 #endif
00859   int num=ssd.size();
00860
00861   _ssd_residui.clear();
00862   _diff_from_median.clear();
00863   _ssd_residui.reserve(num);
00864   _diff_from_median.reserve(num);
00865   _all_ssd_residui.resize(num);
00866   _all_diff_from_median.resize(num);
00867
00868   // remove all points where tracking failed
00869   for (int i=0; i<num; i++){
00870     if (res[i]>=TRACKER_SUCCESS){
00871       _ssd_residui.push_back(_all_ssd_residui[i]);
00872     }
00873   }
00874   unsigned num2=_ssd_residui.size();
00875   BIASCDOUT(D_TRACKERB_REJECT, "using "<<num2
00876             <<" valid residuis for median calculation"<<endl);
00877
00878   _Median.Compute(_ssd_residui);
00879   _median_ssd_residui = _Median.GetMedian();
00880   BIASCDOUT(D_TRACKERB_REJECT,"median residuum is "<<_median_ssd_residui
00881             <<endl);
00882
00883   for (unsigned i=0; i<num2; i++){
00884     _diff_from_median.push_back(fabs(_ssd_residui[i] - _median_ssd_residui));
00885     //  BIASCDOUT(D_TRACKERB_REJECT, setw(4)<<i<<" residuum "<<setprecision(2)
00886     //               <<setw(10)<<_ssd_residui[i]<<"\tdiff_from_median "
00887     //               <<setprecision(2)<<setw(10)<<_diff_from_median[i]<<endl);
00888   }
00889
00890   _Median.Compute(_diff_from_median);
00891   _threshold = 5.2 * _Median.GetMedian();
00892   BIASCDOUT(D_TRACKERB_REJECT, "median of diff from median is "
00893             <<_Median.GetMedian()<<endl);
00894   BIASCDOUT(D_TRACKERB_REJECT, "x84 threshold is "<<_threshold<<endl);
00895
00896   unsigned rejected=0;
00897   for (int i=0; i<num; i++){
00898     _all_diff_from_median[i] = fabs(_all_ssd_residui[i] - _median_ssd_residui);
00899     if (res[i]>=0 && (_all_diff_from_median[i] > _threshold)){
00900       res[i]=TRACKER_X84;
00901       BIASCDOUT(D_TRACKERB_REJECT, "rejecting point "<<setw(4)<<i
00902                 <<": diff from median "<<fixed<<right<<setprecision(2)
00903                 <<setw(10)<<_all_diff_from_median[i]<<endl);
00904       rejected++;
00905     } else if (res[i]==TRACKER_MEANABSDIF &&
00906                (_all_diff_from_median[i] < _threshold)){
00907       res[i]=0;
00908       BIASCDOUT(D_TRACKERB_REJECT, "accepting point "<<setw(4)<<i
00909                 <<": diff from median "<<fixed<<right<<setprecision(2)
00910                 <<setw(10)<<_all_diff_from_median[i]<<endl);
00911     }
00912   }
00913   BIASCDOUT(D_TRACKERB_REJECT, "rejected "<<rejected<<" points "<<endl);
00914
00915 #ifdef BIAS_DEBUG
00916   if (rejected>num2/2){
00917     cout << "rejected more than half of tracks ("<<rejected<<" of "<<num2
00918          <<")aborting\n";
00919     for (unsigned i=0; i<num2; i++){
00920       cout << setw(4)<<i<<" residuum "<<setprecision(4)<<setw(10)<<fixed
00921            <<right<<_ssd_residui[i]<<"\tdiff_from_median "<<setprecision(4)
00922            <<setw(10)<<fixed<<right<<_diff_from_median[i]<<endl;
00923     }
00924
00925     sort(_ssd_residui.begin(), _ssd_residui.end());
00926     sort(_diff_from_median.begin(), _diff_from_median.end());
00927     cout << "sorted\n";
00928     for (unsigned i=0; i<num2; i++){
00929       cout << setw(4)<<i<<" residuum "<<setprecision(4)<<setw(10)<<fixed
00930            <<right<<_ssd_residui[i]<<"\tdiff_from_median "<<setprecision(4)
00931            <<setw(10)<<fixed<<right<<_diff_from_median[i]<<endl;
00932     }
00933
00934     BIASABORT;
00935   }
00936 #endif
00937
00938 #ifdef TIMING
00939   timer.Stop();
00940   cerr << "TrackerBase::Rejectx86 took "<<timer.GetRealTime()
00941        <<" us = "<<timer.GetCycleCount()<<" cycles \n";
00942 #endif
00943   return 0;
00944 }
00945
00946
00947 template <class StorageType>
00948 void TrackerBase<StorageType>::
00949 CalcGaussianWeightMatrix_()
00950 {
00951   _weight.newsize(this->_WinSize, this->_WinSize);
00952   // now calculate the gaussian weight matrix
00953   double sigma = ((double)this->_WinSize)/6.0;
00954   double fac = 1.0 / (2.0 * sigma * sigma);
00955   double sum=0.0, tmp;
00956   register int i, j, x, y, xp, xm, yp, ym;
00957   const int hws=*this->_HalfWinSize;
00958   for (i= hws; i >= 0; i--){
00959     for (j= hws; j >= 0; j--){
00960       tmp=exp(-(double)(i*i+j*j)*fac);
00961       yp=hws+i;
00962       ym=hws-i;
00963       xp=hws+j;
00964       xm=hws-j;
00965       _weight[ym][xm] =_weight[yp][xm] = _weight[ym][xp] = _weight[yp][xp] =
00966         (KLT_TYPE)(tmp);
00967     }
00968   }
00969
00970   for (y=0; y<this->_WinSize; y++){
00971     for (x=0; x<this->_WinSize; x++){
00972       sum+=_weight[y][x];
00973     }
00974   }
00975   BIASCDOUT(D_TRACKERB_INIT, "_weight: "<<_weight<<endl);
00976   BIASCDOUT(D_TRACKERB_INIT, "_weight sum before normalization: "<<sum<<endl);
00977
00978   //normalization
00979   sum=1.0/sum; // division is slow
00980   for (i= hws; i >= 0; i--){
00981     for (j= hws; j >= 0; j--){
00982       yp=hws+i;
00983       ym=hws-i;
00984       xp=hws+j;
00985       xm=hws-j;
00986       tmp=_weight[ym][xm];
00987       _weight[ym][xm] = _weight[yp][xm] = _weight[ym][xp] =
00988         _weight[yp][xp] = tmp * sum;
00989     }
00990   }
00991   BIASCDOUT(D_TRACKERB_INIT, "_weight: "<<_weight<<endl);
00992 #ifdef BIAS_DEBUG
00993   sum=0.0;
00994   for (y=0; y<this->_WinSize; y++){
00995     for (x=0; x<this->_WinSize; x++){
00996       sum+=_weight[y][x];
00997     }
00998   }
00999   BIASCDOUT(D_TRACKERB_INIT,"_weight sum after normalization: "<<sum<<endl);
01000 #endif
01001 }
01002
01003
01004 template <class StorageType>
01005 void TrackerBase<StorageType>::
01006 AddParam_(Param& para, const int grp, const std::string& postfix)
01007 {
01008   if (para.CheckParam("MaxIterations"+postfix)){
01009     _MaxIterations=para.GetParamInt("MaxIterations"+postfix);
01010   } else {
01011     _MaxIterations=
01012       para.AddParamInt("MaxIterations"+postfix,
01013                        "maximum number of iterations",
01014                        10, 1, INT_MAX, 0, grp);
01015   }
01016
01017   if (para.CheckParam("HalfWinSize"+postfix)){
01018     _HalfWinSize=para.GetParamInt("HalfWinSize"+postfix);
01019   } else {
01020     _HalfWinSize=
01021       para.AddParamInt("HalfWinSize"+postfix,
01022                        "half size of support window used in gradient"
01023                        " descent tracking",
01024                        3, 1, INT_MAX, 0, grp);
01025   }
01026
01027   if (para.CheckParam("MaxError"+postfix)){
01028     _MaxError=para.GetParamDouble("MaxError"+postfix);
01029   } else {
01030     _MaxError=
01031       para.AddParamDouble("MaxError"+postfix,
01032                           "iterations are aborted when displacement"
01033                           " drops below MaxError",
01034                           0.01, 0.0, DBL_MAX, 0, grp);
01035   }
01036   if (para.CheckParam("MaxAffineChange"+postfix)){
01037     _MaxAffineChange=para.GetParamDouble("MaxAffineChange"+postfix);
01038   } else {
01039     _MaxAffineChange=
01040       para.AddParamDouble("MaxAffineChange"+postfix,
01041                           "dont stop unless affine entries fall below",
01042                           DEFAULT_MAX_AFFINECHANGE, 0.0, DBL_MAX, 0, grp);
01043   }
01044
01045   if (para.CheckParam("MaxResiduumMAD"+postfix)){
01046     _MaxResiduumMAD=para.GetParamDouble("MaxResiduumMAD"+postfix);
01047   } else {
01048     _MaxResiduumMAD=
01049       para.AddParamDouble("MaxResiduumMAD"+postfix,
01050                           "tracking failed when mean image difference is above"
01051                           " MaxResiduum after otherwise successfull tracking",
01052                           10.0, 0.0, DBL_MAX, 0, grp);
01053   }
01054
01055   vector<string> enums;
01056   vector<int> values;
01057   enums.push_back("TT_Simple");values.push_back(TT_Simple);
01058   enums.push_back("TT_Weighted");values.push_back(TT_Weighted);
01059   enums.push_back("TT_Affine4");values.push_back(TT_Affine4);
01060   enums.push_back("TT_Affine6");values.push_back(TT_Affine6);
01061   enums.push_back("TT_SimpleAffine4");values.push_back(TT_SimpleAffine4);
01062   enums.push_back("TT_SimpleAffine6");values.push_back(TT_SimpleAffine6);
01063
01064   if (para.CheckParam("TrackerType"+postfix)){
01065     _TrackerType=para.GetParamEnum("TrackerType"+postfix);
01066   } else {
01067     _TrackerType=
01068       para.AddParamEnum("TrackerType"+postfix, "type of tracker to use",
01069                         enums, TT_Simple, &values, 0, grp);
01070   }
01071
01072   enums.clear();
01073   values.clear();
01074   enums.push_back("RT_MAD");values.push_back(RT_MAD);
01075   enums.push_back("RT_X86");values.push_back(RT_X86);
01076   //enums.push_back(""); values.push_back();
01077   if (para.CheckParam("RejectionType"+postfix)){
01078     _RejectionType=para.GetParamEnum("RejectionType"+postfix);
01079   } else {
01080     _RejectionType=
01081       para.AddParamEnum("RejectionType"+postfix,"type of rejection alg to use",
01082                         enums, RT_MAD, &values, 0, grp);
01083   }
01084
01085 }
01086
01087
01088 // ***************** parts, which are not under LGPL *************************
01089 // The function TrackAffine_ is based on the affine tracker by Thorsten
01090 // Thormaehlen. Some of the worker functions have been rewritten, some
01091 // have been adapted, see below for the conditions on this software.
01092
01093
01094 template <class StorageType>
01095 int TrackerBase<StorageType>::
01096 TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2],
01097              const Matrix2x2<KLT_TYPE>& p2A,
01098              KLT_TYPE result[2],  Matrix2x2<KLT_TYPE>& resultA,
01099              KLT_TYPE& error, int &iteration, Matrix<KLT_TYPE>& Cov,
01100              KLT_TYPE& mad, KLT_TYPE& msd,
01101              bool Only4Parameters, bool ComputeCovariance) {
01102
01103   SetDebugLevel(D_TRACKERB_AFFINE | D_TRACKERB_KLT);
01104   BIASDOUT(D_TRACKERB_AFFINE, "Called Affine for "
01105            <<p1[0]<<";"<<p1[1]<<", guess is "<<p2[0]<<";"<<p2[1]
01106            <<" affine guess is "<< p2A);
01107
01108   const int width = _WinSize;
01109   const int height = _WinSize;
01110   const int hw = width/2;
01111   const int hh = height/2;
01112   const KLT_TYPE fhw = hw;
01113   const KLT_TYPE fhh = hh;
01114
01115   const int max_iterations = *this->_MaxIterations;
01116   const KLT_TYPE maxerr    = *this->_MaxError;
01117   const KLT_TYPE th_aff    = *this->_MaxAffineChange;
01118
01119   KLT_TYPE dx=0, dy=0;
01120   iteration = 0;
01121   int status = 0;
01122
01123   Matrix<KLT_TYPE> T(Only4Parameters?4:6,Only4Parameters?4:6);
01124   Vector<KLT_TYPE> a(Only4Parameters?4:6);
01125
01126   Cov.newsize((Only4Parameters)?4:6,(Only4Parameters)?4:6);
01127
01128
01129   resultA = p2A;
01130   KLT_TYPE *Axx = &(resultA[0][0]);
01131   KLT_TYPE *Ayx = &(resultA[0][1]);
01132   KLT_TYPE *Axy = &(resultA[1][0]);
01133   KLT_TYPE *Ayy = &(resultA[1][1]);
01134
01135   result[0] = p2[0];
01136   result[1] = p2[1];
01137
01138   bool convergence = false;
01139
01140
01141   // Allocate memory for windows
01142   KLT_TYPE *imgdiff = new KLT_TYPE[width * height];
01143   KLT_TYPE *gradx   = new KLT_TYPE[width * height];
01144   KLT_TYPE *grady   = new KLT_TYPE[width * height];
01145
01146   do  {
01147     KLT_TYPE ul_x =  result[0] + *Axy *  fhh  - *Axx * fhw;
01148     KLT_TYPE ul_y =  result[1] + *Ayy *  fhh  - *Ayx * fhw;
01149     KLT_TYPE ll_x =  result[0] - *Axx *  fhw  - *Axy * fhh;
01150     KLT_TYPE ll_y =  result[1] - *Ayx *  fhw  - *Ayy * fhh;
01151     KLT_TYPE ur_x =  result[0] + *Axx *  fhw  + *Axy * fhh;
01152     KLT_TYPE ur_y =  result[1] + *Ayx *  fhw  + *Ayy * fhh;
01153     KLT_TYPE lr_x =  result[0] + *Axx *  fhw  - *Axy * fhh;
01154     KLT_TYPE lr_y =  result[1] + *Ayx *  fhw  - *Ayy * fhh;
01155
01156     if ( ul_x  < this->_minx2 ||  ul_x  > this->_maxx2 ||
01157          ll_x  < this->_minx2 ||  ll_x  > this->_maxx2 ||
01158          ur_x  < this->_minx2 ||  ur_x  > this->_maxx2 ||
01159          lr_x  < this->_minx2 ||  lr_x  > this->_maxx2 ||
01160          ul_y  < this->_miny2 ||  ul_y  > this->_maxy2 ||
01161          ll_y  < this->_miny2 ||  ll_y  > this->_maxy2 ||
01162          ur_y  < this->_miny2 ||  ur_y  > this->_maxy2 ||
01163          lr_y  < this->_miny2 ||  lr_y  > this->_maxy2) {
01164       status = TRACKER_OUTOFIMAGE;
01165       BIASDOUT( D_TRACKERB_KLT, "out of image");
01166       break;
01167     }
01168
01169     _am_computeIntensityDifferenceAffine(*_im1, *_im2,
01170                                          p1[0], p1[1], result[0], result[1],
01171                                          *Axx, *Ayx , *Axy, *Ayy,
01172                                          hw, hh, imgdiff);
01173
01174     _am_getGradientWinAffine(result[0], result[1],
01175                              *Axx, *Ayx , *Axy, *Ayy,
01176                              hw, hh, gradx, grady);
01177
01178     if (Only4Parameters){
01179
01180       _am_compute4by1ErrorVector(imgdiff, gradx, grady, hw, hh, a);
01181       _am_compute4by4GradientMatrix(gradx, grady, hw, hh, T);
01182
01183       status = _am_gauss_jordan_elimination(T,a);
01184
01185       *Axx += a[0];
01186       *Ayx += a[1];
01187       *Ayy = *Axx;
01188       *Axy = -(*Ayx);
01189
01190       result[0] += dx = a[2];
01191       result[1] += dy = a[3];
01192     } else {
01193
01194       _am_compute6by1ErrorVector(imgdiff, gradx, grady, hw, hh, a);
01195       _am_compute6by6GradientMatrix(gradx, grady, hw, hh, T);
01196
01197       status = _am_gauss_jordan_elimination(T,a);
01198
01199       *Axx += a[0];
01200       *Ayx += a[1];
01201       *Axy += a[2];
01202       *Ayy += a[3];
01203
01204       result[0] += dx = a[4];
01205       result[1] += dy = a[5];
01206
01207     }
01208
01209     // old upper left corner - new upper left corner
01210     ul_x -=  result[0] - *Axx * fhw + *Axy * fhh;
01211     ul_y -=  result[1] - *Ayx * fhw + *Ayy * fhh;
01212     // old lower left corner - new lower left corner
01213     ll_x -=  result[0] - *Axx * fhw - *Axy * fhh;
01214     ll_y -=  result[1] - *Ayx * fhw - *Ayy * fhh;
01215     // old upper right corner - new upper right corner
01216     ur_x -=  result[0] + *Axx * fhw + *Axy * fhh;
01217     ur_y -=  result[1] + *Ayx * fhw + *Ayy * fhh;
01218     // old lower right corner - new lower right corner
01219     lr_x -=  result[0] + *Axx * fhw - *Axy * fhh;
01220     lr_y -=  result[1] + *Ayx * fhw - *Ayy * fhh;
01221
01222     convergence = (fabs(dx) < maxerr && fabs(dy) < maxerr  &&
01223                    fabs(ul_x) < th_aff && fabs(ul_y) < th_aff &&
01224                    fabs(ll_x) < th_aff && fabs(ll_y) < th_aff &&
01225                    fabs(ur_x) < th_aff && fabs(ur_y) < th_aff &&
01226                    fabs(lr_x) < th_aff && fabs(lr_y) < th_aff);
01227
01228     if (status == TRACKER_NOSTRUCTURE) {
01229       BIASDOUT( D_TRACKERB_KLT, "no structure for tracking");
01230       break;
01231     }
01232     iteration++;
01233
01234   }  while ( !convergence  && iteration < max_iterations);
01235   if (iteration >= max_iterations) {
01236     status = TRACKER_TOOMANYITER;
01237     BIASDOUT( D_TRACKERB_KLT, "too many iter: "<<iteration
01238               <<" maxiter="<<max_iterations);
01239   }
01240   mad = 0;
01241   msd = 0;
01242   if ((status==TRACKER_TOOMANYITER) || (status==TRACKER_SUCCESS)) {
01243     _am_computeIntensityDifferenceAffine(*_im1, *_im2, p1[0], p1[1],
01244                                          result[0], result[1],
01245                                          *Axx, *Ayx , *Axy, *Ayy,
01246                                          hw, hh, imgdiff);
01247
01248     const unsigned int wh = width*height;
01249     register KLT_TYPE* fw = imgdiff;
01250     for (unsigned int h=0; h<wh ; h++) {
01251       const KLT_TYPE cur = fabsf(*fw++);
01252       mad += cur;
01253       msd += cur*cur;
01254     }
01255
01256     double sigma = msd / (double)(wh - (Only4Parameters)?4:6);
01257     mad /= double(wh);
01258     msd /= double(wh);
01259
01260     if (ComputeCovariance) {
01261       if (Only4Parameters)
01262         _am_compute4by4GradientMatrix(gradx, grady, hw, hh, T);
01263       else
01264         _am_compute6by6GradientMatrix(gradx, grady, hw, hh, T);
01265       SVD covsvd(T);
01266       Cov = covsvd.Invert() * sigma;
01267     } else {
01268       // pseudo covariance
01269       Cov.SetZero();
01270       if (Only4Parameters) {
01271         Cov[2][2] = dx * dx;
01272         Cov[3][3] = dy * dy;
01273       } else {
01274         Cov[4][4] = dx * dx;
01275         Cov[5][5] = dy * dy;
01276       }
01277     }
01278   }
01279
01280   error = (fabs(dx)>fabs(dy))?fabs(dx):fabs(dy);
01281
01282   // Check whether window is out of bounds
01283   if (result[0]<this->_minx2 || result[0] > this->_maxx2  ||
01284       result[1]<this->_miny2 || result[1] > this->_maxy2)
01285     status = TRACKER_OUTOFIMAGE;
01286
01287
01288   // Free memory
01289   delete imgdiff;
01290   delete gradx;
01291   delete grady;
01292
01293   BIASDOUT( D_TRACKERB_KLT, "status at end is "<<status);
01294
01295   // Return appropriate value
01296   return status;
01297 }
01298
01299
01300
01301 /**********************************************************************
01302 * CONSISTENCY CHECK OF FEATURES BY AFFINE MAPPING (BEGIN)
01303 *
01304 * Created by: Thorsten Thormaehlen (University of Hannover) June 2004
01305 * thormae@tnt.uni-hannover.de
01306 *
01307 * Permission is granted to any individual or institution to use, copy, modify,
01308 * and distribute this part of the software, provided that this complete
01309 * authorship and permission notice is maintained, intact, in all copies.
01310 *
01311 * This software is provided  "as is" without express or implied warranty.
01312 *
01313 *
01314 */
01315
01316 int _am_gauss_jordan_elimination(Matrix<KLT_TYPE>& a,
01317                                  Vector<KLT_TYPE>& b) {
01318   const int n = a.GetRows();
01319   Vector<int> indxc(n),indxr(n),ipiv(n);
01320   int i,j,k,l,ll;
01321   KLT_TYPE big,dum,pivinv,tmp;
01322   int col = 0;
01323   int row = 0;
01324
01325   for (j=0;j<n;j++) ipiv[j]=0;
01326   for (i=0;i<n;i++) {
01327     big=0.0;
01328     for (j=0;j<n;j++)
01329       if (ipiv[j] != 1)
01330         for (k=0;k<n;k++) {
01331           if (ipiv[k] == 0) {
01332             if (fabs(a[j][k]) >= big) {
01333               big=fabs(a[j][k]);
01334               row=j;
01335               col=k;
01336             }
01337           } else if (ipiv[k] > 1) return TRACKER_NOSTRUCTURE;
01338         }
01339     ++(ipiv[col]);
01340     if (row != col) {
01341       for (l=0;l<n;l++) {
01342         tmp = a[row][l];
01343         a[row][l] = a[col][l];
01344         a[col][l] = tmp;
01345       }
01346       tmp = b[row];
01347       b[row] = b[col];
01348       b[col] = tmp;
01349     }
01350     indxr[i]=row;
01351     indxc[i]=col;
01352     if (a[col][col] == 0.0) return TRACKER_NOSTRUCTURE;
01353     pivinv=1.0/a[col][col];
01354     a[col][col]=1.0;
01355     for (l=0;l<n;l++) a[col][l] *= pivinv;
01356     b[col] *= pivinv;
01357     for (ll=0;ll<n;ll++)
01358       if (ll != col) {
01359         dum=a[ll][col];
01360         a[ll][col]=0.0;
01361         for (l=0;l<n;l++) a[ll][l] -= a[col][l]*dum;
01362         b[ll] -= b[col]*dum;
01363       }
01364   }
01365   for (l=n-1;l>=0;l--) {
01366     if (indxr[l] != indxc[l])
01367       for (k=0;k<n;k++) {
01368         tmp = a[k][indxr[l]];
01369         a[k][indxr[l]] = a[k][indxc[l]];
01370         a[k][indxc[l]] = tmp;
01371       }
01372   }
01373
01374   return TRACKER_SUCCESS;
01375 }
01376
01377 template <class StorageType>
01378 void TrackerBase<StorageType>::
01379 _am_getGradientWinAffine(const KLT_TYPE& x, const KLT_TYPE& y,
01380                          const KLT_TYPE& Axx, const KLT_TYPE& Ayx,
01381                          const KLT_TYPE& Axy, const KLT_TYPE& Ayy,
01382                          const int hw, const int hh,
01383                          KLT_TYPE* out_gradx,
01384                          KLT_TYPE* out_grady) {
01385   register int i, j;
01386   KLT_TYPE mi, mj;
01387   for (j = -hh ; j <= hh ; j++) {
01388     for (i = -hw ; i <= hw ; i++)  {
01389       mi = Axx * i + Axy * j;
01390       mj = Ayx * i + Ayy * j;
01391       *out_gradx++ = _gradim2x->BilinearInterpolation(x+mi, y+mj);
01392       *out_grady++ = _gradim2y->BilinearInterpolation(x+mi, y+mj);
01393     }
01394   }
01395 }
01396
01397 template <class StorageType>
01398 void TrackerBase<StorageType>::
01399 _am_computeIntensityDifferenceAffine(Image<StorageType>& img1,
01400                                      Image<StorageType>& img2,
01401                                      const KLT_TYPE& x1, const KLT_TYPE& y1,
01402                                      const KLT_TYPE& x2, const KLT_TYPE& y2,
01403                                      const KLT_TYPE& Axx, const KLT_TYPE& Ayx,
01404                                      const KLT_TYPE& Axy, const KLT_TYPE& Ayy,
01405                                      const int hw, const int hh,
01406                                      KLT_TYPE* imgdiff) {
01407   KLT_TYPE g1, g2;
01408   register int i, j;
01409
01410   // int mi, mj;
01411   // should this be float ???
01412   KLT_TYPE mi, mj;
01413   for (j = -hh ; j <= hh ; j++)
01414     for (i = -hw ; i <= hw ; i++)  {
01415       g1 = img1.BilinearInterpolation(x1+i, y1+j);
01416       mi = Axx * i + Axy * j;
01417       mj = Ayx * i + Ayy * j;
01418       g2 = img2.BilinearInterpolation(x2+mi, y2+mj);
01419       *imgdiff++ = g1 - g2;
01420     }
01421 }
01422
01423
01424 void _am_compute6by6GradientMatrix(KLT_TYPE* gradx,
01425                                    KLT_TYPE* grady,
01426                                    const int hw,
01427                                    const int hh,
01428                                    Matrix<KLT_TYPE>& T) {
01429   register int i, j;
01430   KLT_TYPE gx, gy, gxx, gxy, gyy,  x, y, xx, xy, yy;
01431
01432
01433   // init with zero
01434   for (j = 0 ; j < 6 ; j++)  {
01435     for (i = j ; i < 6 ; i++)  {
01436       T[j][i] = 0.0;
01437     }
01438   }
01439
01440   for (j = -hh ; j <= hh ; j++) {
01441     for (i = -hw ; i <= hw ; i++)  {
01442       gx = *gradx++;
01443       gy = *grady++;
01444       gxx = gx * gx;
01445       gxy = gx * gy;
01446       gyy = gy * gy;
01447       x = i;
01448       y = j;
01449       xx = x * x;
01450       xy = x * y;
01451       yy = y * y;
01452
01453       T[0][0] += xx * gxx;
01454       T[0][1] += xx * gxy;
01455       T[0][2] += xy * gxx;
01456       T[0][3] += xy * gxy;
01457       T[0][4] += x  * gxx;
01458       T[0][5] += x  * gxy;
01459
01460       T[1][1] += xx * gyy;
01461       T[1][2] += xy * gxy;
01462       T[1][3] += xy * gyy;
01463       T[1][4] += x  * gxy;
01464       T[1][5] += x  * gyy;
01465
01466       T[2][2] += yy * gxx;
01467       T[2][3] += yy * gxy;
01468       T[2][4] += y  * gxx;
01469       T[2][5] += y  * gxy;
01470
01471       T[3][3] += yy * gyy;
01472       T[3][4] += y  * gxy;
01473       T[3][5] += y  * gyy;
01474
01475       T[4][4] += gxx;
01476       T[4][5] += gxy;
01477
01478       T[5][5] += gyy;
01479     }
01480   }
01481
01482   for (j = 0 ; j < 5 ; j++)  {
01483     for (i = j+1 ; i < 6 ; i++)  {
01484       T[i][j] = T[j][i];
01485     }
01486   }
01487
01488 }
01489
01490
01491
01492 void _am_compute6by1ErrorVector(KLT_TYPE* imgdiff,
01493                                 KLT_TYPE* gradx,
01494                                 KLT_TYPE* grady,
01495                                 const int hw,
01496                                 const int hh,
01497                                 Vector<KLT_TYPE>& e) {
01498   register int i, j;
01499   register KLT_TYPE diff,  diffgradx,  diffgrady;
01500
01501   /* Set values to zero */
01502   for(i = 0; i < 6; i++) e[i] = 0.0;
01503
01504   /* Compute values */
01505   for (j = -hh ; j <= hh ; j++) {
01506     for (i = -hw ; i <= hw ; i++)  {
01507       diff = *imgdiff++;
01508       diffgradx = diff * (*gradx++);
01509       diffgrady = diff * (*grady++);
01510       e[0] += diffgradx * i;
01511       e[1] += diffgrady * i;
01512       e[2] += diffgradx * j;
01513       e[3] += diffgrady * j;
01514       e[4] += diffgradx;
01515       e[5] += diffgrady;
01516     }
01517   }
01518
01519   for(i = 0; i < 6; i++) e[i] *= 0.5;
01520
01521 }
01522
01523
01524 void _am_compute4by4GradientMatrix(KLT_TYPE* gradx,
01525                                    KLT_TYPE* grady,
01526                                    const int hw,
01527                                    const int hh,
01528                                    Matrix<KLT_TYPE>& T)
01529 {
01530   register int i, j;
01531   KLT_TYPE gx, gy, x, y;
01532
01533
01534   // Set values to zero
01535   for (j = 0 ; j < 4 ; j++)  {
01536     for (i = 0 ; i < 4 ; i++)  {
01537       T[j][i] = 0.0;
01538     }
01539   }
01540
01541   for (j = -hh ; j <= hh ; j++) {
01542     for (i = -hw ; i <= hw ; i++)  {
01543       gx = *gradx++;
01544       gy = *grady++;
01545       x = i;
01546       y = j;
01547       T[0][0] += (x*gx+y*gy) * (x*gx+y*gy);
01548       T[0][1] += (x*gx+y*gy)*(x*gy-y*gx);
01549       T[0][2] += (x*gx+y*gy)*gx;
01550       T[0][3] += (x*gx+y*gy)*gy;
01551
01552       T[1][1] += (x*gy-y*gx) * (x*gy-y*gx);
01553       T[1][2] += (x*gy-y*gx)*gx;
01554       T[1][3] += (x*gy-y*gx)*gy;
01555
01556       T[2][2] += gx*gx;
01557       T[2][3] += gx*gy;
01558
01559       T[3][3] += gy*gy;
01560     }
01561   }
01562
01563   for (j = 0 ; j < 3 ; j++)  {
01564     for (i = j+1 ; i < 4 ; i++)  {
01565       T[i][j] = T[j][i];
01566     }
01567   }
01568
01569 }
01570
01571 void _am_compute4by1ErrorVector(KLT_TYPE* imgdiff,
01572                                 KLT_TYPE* gradx,
01573                                 KLT_TYPE* grady,
01574                                 const int hw,
01575                                 const int hh,
01576                                 Vector<KLT_TYPE>& e){
01577   register int i, j;
01578   register KLT_TYPE diff,  diffgradx,  diffgrady;
01579
01580   /* Set values to zero */
01581   for(i = 0; i < 4; i++) e[i] = 0.0;
01582
01583   /* Compute values */
01584   for (j = -hh ; j <= hh ; j++) {
01585     for (i = -hw ; i <= hw ; i++)  {
01586       diff = *imgdiff++;
01587       diffgradx = diff * (*gradx++);
01588       diffgrady = diff * (*grady++);
01589       e[0] += diffgradx * i + diffgrady * j;
01590       e[1] += diffgrady * i - diffgradx * j;
01591       e[2] += diffgradx;
01592       e[3] += diffgrady;
01593     }
01594   }
01595
01596   for(i = 0; i < 4; i++) e[i] *= 0.5;
01597
01598 }
01599
01600 /**************** end affine part  ********************************/
01601
01602 //////////////////////////////////////////////////////////////////////////
01603 //                 instantiation
01604 //////////////////////////////////////////////////////////////////////////
01605
01606 template class TrackerBase<unsigned char>;
01607 template class TrackerBase<float>;
01608
01609 // fill in instances as required
01610 #ifdef BUILD_IMAGE_INT
01611 template class TrackerBase<int>;
01612 #endif
01613 #ifdef BUILD_IMAGE_CHAR
01614 template class TrackerBase<char>;
01615 #endif
01616 #ifdef BUILD_IMAGE_SHORT
01617 template class TrackerBase<short>;
01618 #endif
01619 #ifdef BUILD_IMAGE_USHORT
01620 template class TrackerBase<unsigned short>;
01621 #endif
01622 #ifdef BUILD_IMAGE_UINT
01623 template class TrackerBase<unsigned int>;
01624 #endif
01625 #ifdef BUILD_IMAGE_DOUBLE
01626 #endif
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBase.hh Source File

Matcher2D

TrackerBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __TrackerBase__hh__
00026 #define __TrackerBase__hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Math/Matrix2x2.hh>
00033 #include <Base/Image/Image.hh>
00034 #include <Utils/Param.hh>
00035 #include <MathAlgo/Median1D.hh>
00036
00037 #include <vector>
00038
00039 #define KLT_TYPE double
00040
00041 #define D_TRACKERB_INIT        0x00000001
00042 #define D_TRACKERB_KLT         0x00000002
00043 #define D_TRACKERB_BILINEAR    0x00000004
00044 #define D_TRACKERB_INPUT       0x00000008
00045 #define D_TRACKERB_REJECT      0x00000010
00046 #define D_TRACKERB_AFFINE         0x00000020
00047
00048 #define TRACKER_SUCCESS      0
00049 #define TRACKER_NOSTRUCTURE -1
00050 #define TRACKER_OUTOFIMAGE  -2
00051 #define TRACKER_TOOMANYITER -3
00052 #define TRACKER_OUTOFROI    -4
00053 #define TRACKER_MEANABSDIF  -5
00054 #define TRACKER_IGNOREPOINT -6
00055 #define TRACKER_X84         -7
00056 #define TRACKER_ERRORINCREASED  1
00057
00058
00059
00060 namespace BIAS {
00061
00062   /** defines type or combination of tracker(s) used: simple/weighted estimate
00063       a dx,dy, Affine4/Affine6 estimate an affine transformation with 4 resp. 6
00064       parameters and the SimpleAffine start estimating dx,dy and afterwards
00065       refine with affine */
00066   enum ETrackerType {TT_Invalid=-1, TT_Simple, TT_Weighted, TT_Affine4,
00067                      TT_Affine6, TT_SimpleAffine4, TT_SimpleAffine6};
00068
00069   enum ERejectionType {RT_Invalid=-1, RT_MAD, RT_X86};
00070
00071   std::ostream& operator<<(std::ostream& os, const enum ETrackerType& tt);
00072
00073   std::ostream& operator<<(std::ostream& os, const enum ERejectionType& rt);
00074
00075   /** @class TrackerBase
00076       @ingroup g_tracker
00077       @brief
00078
00079       Base class for the different tracking algorithms, defining the interfaces
00080       for the tracking functions. Also stores some basic options and datas,
00081       i.e. the pointer to the image datas. See ExampleTrackerBase for brief
00082       exemplary usage.
00083
00084       \todo Implement DLL - add lost of missing explicit instantiations (JW)
00085
00086       @author woelk 09/2004 */
00087   template <class StorageType>
00088   class BIASMatcher2D_EXPORT TrackerBase : public Debug
00089   {
00090   public :
00091     TrackerBase();
00092
00093     TrackerBase(Param& para, const std::string& postfix="");
00094
00095     TrackerBase(Param& para, const int grp, const std::string& postfix);
00096
00097     ~TrackerBase();
00098
00099     /** Track from im1 to im2,
00100         gradx1/2: horizontal gradient imgs
00101         grady1/2: vertical gradient imgs
00102         The ROI must be set correctly in gradient images (representing the
00103         gradient filter mask size). */
00104     void Init(Image<StorageType>& im1, Image<StorageType>& im2,
00105               Image<StorageType>& gradx1, Image<StorageType>& grady1,
00106               Image<StorageType>& gradx2, Image<StorageType>& grady2);
00107
00108     /** Calculates correspondence from image1 to image2. The two images and
00109         corresponding gradients must specified using the function Init()
00110         before calling this function.
00111
00112         The algorithm searches for best correspondence to point p1 from image1
00113         in image2. The search starts at p2 in image 2.
00114         Upon completition
00115         - result      : contains the best match,
00116         - error       : contains the change in displacement calculated in
00117                         the last iteration,
00118         - iter        : contains then number of iterations used,
00119         - residuumMAD : contains the mean absolute grey value difference
00120                         between p1 in image 1 and p2tracked in image 2
00121                         over the tracking support window,
00122         - residuumMSD : contains the squared grey value difference between p1
00123                         in image 1 and p2tracked in image 2 summed over the
00124                         tracking support window,
00125         - cov         : contains an approximation to the covarinace matrix
00126         image1 and result in image2 over the tracking window ( = sum of
00127         absolute difference divided by number of pixels in tracking value ).
00128
00129         All homogenous points must be homogenized (i.e. w=1.0).
00130
00131         The algorithms either terminates if the displacement resulting from
00132         one iteration drops below *_Maxerror or the maximum number of
00133         iterations *_MaxIterations is reached.
00134
00135         @return   see defines
00136         - 0 on success (error< maxerror)
00137         - -1 when no spatial structure is present
00138         - -2 when point slid out of image
00139         - -3 when maxiter is reached and error is above maxerror
00140         - -4 when a point lies outside of valid region in images
00141         - -5 when point was rejected by MAD criterion
00142         - -6 when input point was at infinity
00143         - -7 when point is rejected by X86
00144         - 1 when error increased from last iteration
00145         @author woelk */
00146     int Track(HomgPoint2D& p1, HomgPoint2D& p2, HomgPoint2D& p2tracked,
00147               KLT_TYPE& error, int &iter, KLT_TYPE& residuumMAD,
00148               KLT_TYPE& residuumMSD, Matrix<KLT_TYPE>& cov,
00149               const Matrix2x2<KLT_TYPE> & AffinePred =
00150               Matrix2x2<KLT_TYPE>());
00151
00152     /** Same as Track(), but a correspondence is searched for every point
00153         in the vector p1. */
00154     void Track(std::vector<HomgPoint2D>& p1,
00155                std::vector<HomgPoint2D>& p2,
00156                std::vector<HomgPoint2D>& p2tracked,
00157                std::vector<KLT_TYPE>& error,
00158                std::vector<int>& numiter,
00159                std::vector<KLT_TYPE>& residuiMAD,
00160                std::vector<KLT_TYPE>& residuiMSD,
00161                std::vector<int>& res,
00162                std::vector<Matrix<KLT_TYPE> >& cov,
00163                const std::vector<Matrix2x2<KLT_TYPE> >& AffinePred =
00164                std::vector<Matrix2x2<KLT_TYPE> >());
00165
00166
00167     /** @brief get results of affine tracking */
00168     inline void GetAffineResults(std::vector<Matrix2x2<KLT_TYPE> > & Results) {
00169       Results = _AffineResults;
00170     }
00171
00172     /** @brief get result of affine tracking */
00173     inline void GetAffineResult(Matrix2x2<KLT_TYPE> & Result) {
00174       BIASASSERT(_AffineResults.size()>0);
00175       Result = _AffineResults[0];
00176     }
00177
00178     ////////////////////////////////////////////////////////////////////////
00179
00180     inline void SetMaxError(const KLT_TYPE maxerr) { *_MaxError=maxerr; }
00181
00182     inline void SetMaxAffineChange(const KLT_TYPE maxerr) {
00183       *_MaxAffineChange=maxerr; }
00184
00185     inline void SetMaxResiduumMAD(const KLT_TYPE maxres)
00186     { *_MaxResiduumMAD=maxres; }
00187
00188     inline void SetMaxIterations(const int maxiter){ *_MaxIterations=maxiter; }
00189
00190     inline void SetHalfWinSize(const int hws) { *_HalfWinSize=hws; }
00191
00192     /// these are needed in the highlevel Tracker class
00193     inline int *GetMaxIterationsPointer() {return _MaxIterations;};
00194     inline int *GetHalfWinSizePointer() {return _HalfWinSize;};
00195     inline KLT_TYPE *GetMaxErrorPointer() {return _MaxError;};
00196
00197     inline int *GetTrackerType() { return _TrackerType;};
00198     inline void SetTrackerType(const int tracker_type)
00199     { *_TrackerType = tracker_type; }
00200
00201     inline int *GetRejectionType() { return _RejectionType; };
00202     inline void SetRejectionType(const int rejection_type)
00203     { *_RejectionType = rejection_type; };
00204
00205   protected:
00206     bool _ParamsAllocated;
00207     int *_MaxIterations; /// iteration stops after _MaxIterations
00208     int *_HalfWinSize; /// use support window of size 2*hws+1
00209     /// iteration stops if position refinement is less than *_Maxerror
00210     KLT_TYPE *_MaxError;
00211     /// iteration stops if position refinement is less than *_Maxerror
00212     KLT_TYPE *_MaxAffineChange;
00213
00214     /// outlier rejection via MAD
00215     KLT_TYPE *_MaxResiduumMAD;
00216     /// the tracker type TT_Simple and TT_Weighted
00217     int *_TrackerType;
00218     /// The rejection type: valid RT_MAD and RT_X86
00219     int *_RejectionType;
00220
00221     ///////////////////////////////////////////////////////////////////////////
00222     /// the image data arrays
00223     StorageType **_ida1, **_ida2;
00224     /// pointers to images
00225     Image<StorageType> *_im1, *_im2,
00226       *_gradim1x, *_gradim2x, *_gradim1y, *_gradim2y;
00227
00228     /// gradients image data arrays
00229     StorageType **_gradx1, **_grady1, **_gradx2, **_grady2;
00230     /// the image borders modulo filter and support windows or ROI
00231     /// for image 1 and image 2
00232     int _maxx1, _maxy1, _minx1, _miny1;
00233     int _maxx2, _maxy2, _minx2, _miny2;
00234     ///remember last support window size (for recalculation of gaussian weight)
00235     int _LastHalfWinSize, _WinSize;
00236     /// used in iteration
00237     Matrix2x2<KLT_TYPE> _G, _Ginv;
00238     Vector2<KLT_TYPE> _e, _d, _disp;
00239     Matrix<KLT_TYPE> _gx, _gy, _bl1, _bl2, _gx1, _gy1, _gx2, _gy2, _gsx, _gsy;
00240     KLT_TYPE _gxx, _gxy, _gyy, _idet;
00241     Matrix<KLT_TYPE> _weight; // the weight matrix used in TrackWeighted_
00242
00243     /// used in RejectX86_
00244     Median1D<KLT_TYPE> _Median; // median calculation class
00245     std::vector<KLT_TYPE> _all_ssd_residui; // sum of sq. grey value diff
00246     /// sum of sq. grey value diff only for points where tracking succeeded
00247     std::vector<KLT_TYPE> _ssd_residui;
00248     KLT_TYPE _median_ssd_residui; // median of _ssd_residui
00249     /// _diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
00250     std::vector<KLT_TYPE> _diff_from_median;
00251     /// same as _diff_from_median but also for points where tracking was not
00252     /// sucessfull
00253     std::vector<KLT_TYPE> _all_diff_from_median;
00254     /// the rejection threshold calculated by X86
00255     /// _threshold = 5.2 * median(_diff_from_median)
00256     KLT_TYPE _threshold;
00257
00258     /// results after affine tracking
00259     std::vector<Matrix2x2<KLT_TYPE> > _AffineResults;
00260
00261     ///////////////////////////////////////////////////////////////////
00262     //  initialization
00263     ///////////////////////////////////////////////////////////////////
00264
00265     /** @brief set member pointers to NULL */
00266     void InitMembers_();
00267
00268     /// minx/y maxx/y defines a ROI
00269     void Init_(StorageType **ida1, StorageType **ida2,
00270                StorageType **gradx1, StorageType **grady1,
00271                StorageType **gradx2, StorageType **grady2,
00272                unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1,
00273                unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2);
00274
00275     ///////////////////////////////////////////////////////////////////
00276     //  tracking
00277     ///////////////////////////////////////////////////////////////////
00278
00279     /** The correspondence calculation is computed using an iterative gradient
00280         descent algorithm. See Lukas and Kanade: "An iterative image
00281         registration technique with an application to stereo vision", 1986
00282         for details. The symmetric approach as described by Stan Birchfield
00283         is implemented.
00284         @author woelk */
00285     int TrackSimple_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00286                      KLT_TYPE& error, int &iter);
00287
00288     /** Same as TrackSimple_ but also uses the weighting matrix _weight.
00289         @author woelk */
00290     int TrackWeighted_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00291                        KLT_TYPE& error, int &iter);
00292
00293     /** @brief track using affine warp
00294         @param p1 point in image 1
00295         @param p2 prediction for point in image 2
00296         @param p2A prediction for affine warp
00297         @param result result after tracking
00298         @param resultA affine warp after tracking
00299         @param error maxnorm of last iteration step
00300         @param iter number of iterations done
00301         @param Cov resulting covariance
00302         @param sad sum of absolute differences
00303         @param ssd sum of squared differences
00304         @param Only4 only estimate A, not dx,dy
00305         @param ComputeCovariance, if true Cov is computed using svd
00306
00307         This implementation is based on Thorsten Thormaelen's version,
00308         see cpp file.
00309
00310         @todo really compute cov with svd ???, conceptual problem: where to
00311         compute residui, where covariance ???
00312
00313         Not evaluated, tested or optimized by now !
00314         @author koeser 06/2005
00315     */
00316     int TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2],
00317                      const Matrix2x2<KLT_TYPE>& p2A,
00318                      KLT_TYPE result[2],  Matrix2x2<KLT_TYPE>& resultA,
00319                      KLT_TYPE& error, int &iter, Matrix<KLT_TYPE>& Cov,
00320                      KLT_TYPE& mad, KLT_TYPE& msd,
00321                      bool Only4 = false, bool ComputeCovariance = true);
00322
00323
00324
00325
00326     // ------------ affine worker functions ----------------------------
00327     void _am_getGradientWinAffine(const KLT_TYPE& x, const KLT_TYPE& y,
00328                                   const KLT_TYPE& Axx, const KLT_TYPE& Ayx,
00329                                   const KLT_TYPE& Axy, const KLT_TYPE& Ayy,
00330                                   const int halfwidth, const int halfheight,
00331                                   KLT_TYPE* out_gradx,
00332                                   KLT_TYPE* out_grady);
00333
00334     void _am_computeIntensityDifferenceAffine(Image<StorageType>& img1,
00335                                               Image<StorageType>& img2,
00336                                               const KLT_TYPE& x1,
00337                                               const KLT_TYPE& y1,
00338                                               const KLT_TYPE& x2,
00339                                               const KLT_TYPE& y2,
00340                                               const KLT_TYPE& Axx,
00341                                               const KLT_TYPE& Ayx,
00342                                               const KLT_TYPE& Axy,
00343                                               const KLT_TYPE& Ayy,
00344                                               const int halfwidth,
00345                                               const int halfheight,
00346                                               KLT_TYPE* imgdiff);
00347
00348     // -------------------------------------------------------------------
00349
00350
00351     /* TODO inverse compositional approach */
00352     //int TrackBaker_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00353     //                  KLT_TYPE& error, int &iter);
00354
00355     /* TODO compensation for illumination changes */
00356     //int RefineIllum_();
00357
00358
00359     ///////////////////////////////////////////////////////////////////
00360     //  calculation of cov, sad and ssd
00361     ///////////////////////////////////////////////////////////////////
00362
00363
00364     /** Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui
00365         and covarainec matrix and must hence be called immediatly after the
00366         Track*_() function call!!
00367         @author woelk */
00368     int EvaluateResult_(int& res,KLT_TYPE& mad,KLT_TYPE& msd, KLT_TYPE cov[4]);
00369
00370     ///////////////////////////////////////////////////////////////////
00371     //  outlier rejection
00372     ///////////////////////////////////////////////////////////////////
00373
00374     /**
00375         @author woelk */
00376     int RejectMAD_(std::vector<KLT_TYPE>& sad, std::vector<int>& res);
00377
00378     /**
00379         @author woelk */
00380     int RejectX86_(std::vector<KLT_TYPE>& ssd, std::vector<int>& res);
00381
00382     ///////////////////////////////////////////////////////////////////
00383     //  helper functions
00384     ///////////////////////////////////////////////////////////////////
00385
00386     /** resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
00387         @author woelk */
00388     inline void Resize_(const int halfwinsize);
00389
00390     /**
00391         @author woelk */
00392     void AddParam_(Param& para, const int grp, const std::string& postfix);
00393
00394     /** Constructs the weight matrix _weight with size _WinSize, _WinSize
00395         and fills it with gaussian weights
00396         @author woelk */
00397     void CalcGaussianWeightMatrix_();
00398
00399     ////////////////////////////////////////////////////////////////////
00400     //  bilinear interpolation functions
00401     ////////////////////////////////////////////////////////////////////
00402
00403     /// variables needed in MyBilienarRegion?_
00404     unsigned rf, rc, cf, cc, r, c, x_floor, y_floor, x_floor_end, y_floor_end;
00405     /// variables needed in MyBilienarRegion?_
00406     KLT_TYPE ul, ur, ll, lr, brdx, brdy, brdxy;
00407
00408     /** Fills the matrices _gx1, _gy1 and _bl1 by interpolating
00409         _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and
00410         (x+hws, y+hws).
00411         @author woelk */
00412     inline void MyBilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws);
00413
00414     /** Fills the matrices _gx2, _gy2 and _bl2 by interpolating
00415         _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and
00416         (x+hws, y+hws).
00417         @author woelk */
00418     inline void MyBilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws);
00419
00420
00421     ///////////////////////////////////////////////////////////////////////
00422     // debugging functions
00423     ///////////////////////////////////////////////////////////////////////
00424
00425
00426   }; // class
00427
00428   ////////////////////////////////////////////////////////////////////
00429   //  inline functions
00430   ////////////////////////////////////////////////////////////////////
00431
00432   template <class StorageType>
00433   inline void TrackerBase<StorageType>::
00434   MyBilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws)
00435   {
00436     x_floor = (unsigned int)floor(x);
00437     y_floor = (unsigned int)floor(y);
00438     x_floor_end = x_floor+hws+1;
00439     y_floor_end = y_floor+hws+1;
00440     brdy = y - (KLT_TYPE)(y_floor);
00441     brdx = x - (KLT_TYPE)(x_floor);
00442     brdxy = brdx*brdy;
00443     for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00444       for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00445         ul = (KLT_TYPE)this->_ida1[rf][cf];
00446         ur = (KLT_TYPE)this->_ida1[rf][cc];
00447         ll = (KLT_TYPE)this->_ida1[rc][cf];
00448         lr = (KLT_TYPE)this->_ida1[rc][cc];
00449         _bl1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00450                     brdxy*(ul + lr - ll - ur));
00451         ul = (KLT_TYPE)(this->_gradx1[rf][cf]);
00452         ur = (KLT_TYPE)(this->_gradx1[rf][cc]);
00453         ll = (KLT_TYPE)(this->_gradx1[rc][cf]);
00454         lr = (KLT_TYPE)(this->_gradx1[rc][cc]);
00455         _gx1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00456                     brdxy*(ul + lr - ll - ur));
00457         ul = (KLT_TYPE)(this->_grady1[rf][cf]);
00458         ur = (KLT_TYPE)(this->_grady1[rf][cc]);
00459         ll = (KLT_TYPE)(this->_grady1[rc][cf]);
00460         lr = (KLT_TYPE)(this->_grady1[rc][cc]);
00461         _gy1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00462                     brdxy*(ul + lr - ll - ur));
00463       }
00464     }
00465   }
00466
00467   template <class StorageType>
00468   inline void TrackerBase<StorageType>::
00469   MyBilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws)
00470   {
00471     x_floor = (unsigned int)floor(x);
00472     y_floor = (unsigned int)floor(y);
00473     x_floor_end = x_floor+hws+1;
00474     y_floor_end = y_floor+hws+1;
00475     brdy = y - (KLT_TYPE)(y_floor);
00476     brdx = x - (KLT_TYPE)(x_floor);
00477     brdxy = brdx*brdy;
00478     for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00479       for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00480         ul = (KLT_TYPE)this->_ida2[rf][cf];
00481         ur = (KLT_TYPE)this->_ida2[rf][cc];
00482         ll = (KLT_TYPE)this->_ida2[rc][cf];
00483         lr = (KLT_TYPE)this->_ida2[rc][cc];
00484         _bl2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00485                     brdxy*(ul + lr - ll - ur));
00486         ul = (KLT_TYPE)(this->_gradx2[rf][cf]);
00487         ur = (KLT_TYPE)(this->_gradx2[rf][cc]);
00488         ll = (KLT_TYPE)(this->_gradx2[rc][cf]);
00489         lr = (KLT_TYPE)(this->_gradx2[rc][cc]);
00490         _gx2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00491                     brdxy*(ul + lr - ll - ur));
00492         ul = (KLT_TYPE)(this->_grady2[rf][cf]);
00493         ur = (KLT_TYPE)(this->_grady2[rf][cc]);
00494         ll = (KLT_TYPE)(this->_grady2[rc][cf]);
00495         lr = (KLT_TYPE)(this->_grady2[rc][cc]);
00496         _gy2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00497                     brdxy*(ul + lr - ll - ur));
00498       }
00499     }
00500   }
00501
00502   template <class StorageType>
00503   inline void TrackerBase<StorageType>::
00504   Resize_(const int halfwinsize)
00505   {
00506     _LastHalfWinSize=halfwinsize;
00507     _WinSize=(halfwinsize<<1)+1;
00508     _gx1.newsize(_WinSize, _WinSize);
00509     _gy1.newsize(_WinSize, _WinSize);
00510     _gx2.newsize(_WinSize, _WinSize);
00511     _gy2.newsize(_WinSize, _WinSize);
00512     _gsx.newsize(_WinSize, _WinSize);
00513     _gsy.newsize(_WinSize, _WinSize);
00514     _bl1.newsize(_WinSize, _WinSize);
00515     _bl2.newsize(_WinSize, _WinSize);
00516
00517   }
00518
00519
00520 } // namespace
00521
00522 void _am_compute4by1ErrorVector(KLT_TYPE* imgdiff,
00523                                 KLT_TYPE* gradx,
00524                                 KLT_TYPE* grady,
00525                                 const int hw,
00526                                 const int hh,
00527                                 BIAS::Vector<KLT_TYPE>& e);
00528
00529 void _am_compute4by4GradientMatrix(KLT_TYPE* gradx,
00530                                    KLT_TYPE* grady,
00531                                    const int hw,
00532                                    const int hh,
00533                                    BIAS::Matrix<KLT_TYPE>& T);
00534
00535 int  _am_gauss_jordan_elimination(BIAS::Matrix<KLT_TYPE>& a,
00536                  BIAS::Vector<KLT_TYPE>& b);
00537 void _am_compute6by1ErrorVector(KLT_TYPE* imgdiff,
00538                                 KLT_TYPE* gradx,
00539                                 KLT_TYPE* grady,
00540                                 const int hw,
00541                                 const int hh,
00542                                 BIAS::Vector<KLT_TYPE>& e);
00543
00544 void _am_compute6by6GradientMatrix(KLT_TYPE* gradx,
00545                                    KLT_TYPE* grady,
00546                                    const int hw,
00547                                    const int hh,
00548                                    BIAS::Matrix<KLT_TYPE>& T);
00549
00550
00551
00552
00553 #include <Base/Common/BIASpragmaEnd.hh>
00554
00555 #endif // __TrackerBase__hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseAffine.hh Source File

Matcher2D

TrackerBaseAffine.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __TrackerBaseAffine_hh__
00025 #define __TrackerBaseAffine_hh__
00026
00027 namespace BIAS {
00028
00029   /** @class TrackerBase
00030       @ingroup g_tracker
00031       @brief
00032       @author woelk/kollmann 06/2006 */
00033   template <class StorageType>
00034   class BIASMatcher2D_EXPORT TrackerBaseAffine
00035     : public TrackerBaseInterface<StorageType>
00036   {
00037   public :
00038     TrackerBaseAffine();
00039
00040
00041     /** @brief get results of affine tracking */
00042     inline void GetAffineResults(std::vector<Matrix2x2<KLT_TYPE> > & Results) {
00043       Results = _AffineResults;
00044     }
00045
00046     /** @brief get result of affine tracking */
00047     inline void GetAffineResult(Matrix2x2<KLT_TYPE> & Result) {
00048       BIASASSERT(_AffineResults.size()>0);
00049       Result = _AffineResults[0];
00050     }
00051
00052     inline void SetMaxAffineChange(const KLT_TYPE maxerr) {
00053       *_MaxAffineChange=maxerr; }
00054   protected:
00055      /// iteration stops if position refinement is less than *_Maxerror
00056     KLT_TYPE *_MaxAffineChange;
00057     /// results after affine tracking
00058     std::vector<Matrix2x2<KLT_TYPE> > _AffineResults;
00059
00060     /** p1 has length 2, 2d coo
00061         p2 has length 2 or 6, 2d coo and affine parameters
00062         result has length 6, 2d coo and affine parameters
00063         @author woelk/koeser/kollmann 06/2006*/
00064     virtual int Track_(Vector<KLT_TYPE>& p1, Vector<KLT_TYPE>& p2,
00065                        Vector<KLT_TYPE>& result, KLT_TYPE& error,
00066                        int &iter) = 0;
00067
00068     /** @brief track using affine warp
00069         @param p1 point in image 1
00070         @param p2 prediction for point in image 2
00071         @param p2A prediction for affine warp
00072         @param result result after tracking
00073         @param resultA affine warp after tracking
00074         @param error maxnorm of last iteration step
00075         @param iter number of iterations done
00076         @param Cov resulting covariance
00077         @param sad sum of absolute differences
00078         @param ssd sum of squared differences
00079         @param Only4 only estimate A, not dx,dy
00080         @param ComputeCovariance, if true Cov is computed using svd
00081
00082         This implementation is based on Thorsten Thormaelen's version,
00083         see cpp file.
00084
00085         @todo really compute cov with svd ???, conceptual problem: where to
00086         compute residui, where covariance ???
00087
00088         Not evaluated, tested or optimized by now !
00089         @author koeser 06/2005
00090     */
00091     int TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2],
00092                      const Matrix2x2<KLT_TYPE>& p2A,
00093                      KLT_TYPE result[2],  Matrix2x2<KLT_TYPE>& resultA,
00094                      KLT_TYPE& error, int &iter, Matrix<KLT_TYPE>& Cov,
00095                      KLT_TYPE& mad, KLT_TYPE& msd,
00096                      bool Only4 = false, bool ComputeCovariance = true);
00097
00098      // ------------ affine worker functions ----------------------------
00099     void _am_getGradientWinAffine(const KLT_TYPE& x, const KLT_TYPE& y,
00100                                   const KLT_TYPE& Axx, const KLT_TYPE& Ayx,
00101                                   const KLT_TYPE& Axy, const KLT_TYPE& Ayy,
00102                                   const int halfwidth, const int halfheight,
00103                                   KLT_TYPE* out_gradx,
00104                                   KLT_TYPE* out_grady);
00105
00106     void _am_computeIntensityDifferenceAffine(Image<StorageType>& img1,
00107                                               Image<StorageType>& img2,
00108                                               const KLT_TYPE& x1,
00109                                               const KLT_TYPE& y1,
00110                                               const KLT_TYPE& x2,
00111                                               const KLT_TYPE& y2,
00112                                               const KLT_TYPE& Axx,
00113                                               const KLT_TYPE& Ayx,
00114                                               const KLT_TYPE& Axy,
00115                                               const KLT_TYPE& Ayy,
00116                                               const int halfwidth,
00117                                               const int halfheight,
00118                                               KLT_TYPE* imgdiff);
00119
00120   };
00121 }
00122
00123 void _am_compute4by1ErrorVector(KLT_TYPE* imgdiff,
00124                                 KLT_TYPE* gradx,
00125                                 KLT_TYPE* grady,
00126                                 const int hw,
00127                                 const int hh,
00128                                 BIAS::Vector<KLT_TYPE>& e);
00129
00130 void _am_compute4by4GradientMatrix(KLT_TYPE* gradx,
00131                                    KLT_TYPE* grady,
00132                                    const int hw,
00133                                    const int hh,
00134                                    BIAS::Matrix<KLT_TYPE>& T);
00135
00136 int  _am_gauss_jordan_elimination(BIAS::Matrix<KLT_TYPE>& a,
00137                  BIAS::Vector<KLT_TYPE>& b);
00138 void _am_compute6by1ErrorVector(KLT_TYPE* imgdiff,
00139                                 KLT_TYPE* gradx,
00140                                 KLT_TYPE* grady,
00141                                 const int hw,
00142                                 const int hh,
00143                                 BIAS::Vector<KLT_TYPE>& e);
00144
00145 void _am_compute6by6GradientMatrix(KLT_TYPE* gradx,
00146                                    KLT_TYPE* grady,
00147                                    const int hw,
00148                                    const int hh,
00149                                    BIAS::Matrix<KLT_TYPE>& T);
00150
00151
00152 #endif // __TrackerBaseAffine_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseInterface.hh Source File

Matcher2D

TrackerBaseInterface.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __TrackerBaseInterface__hh__
00026 #define __TrackerBaseInterface__hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <Base/Debug/Debug.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Math/Matrix2x2.hh>
00033 #include <Base/Image/Image.hh>
00034 #include <Utils/Param.hh>
00035 #include <MathAlgo/Median1D.hh>
00036
00037 #include <vector>
00038
00039 #define KLT_TYPE double
00040
00041 #define D_TRACKERB_INIT        0x00000001
00042 #define D_TRACKERB_KLT         0x00000002
00043 #define D_TRACKERB_BILINEAR    0x00000004
00044 #define D_TRACKERB_INPUT       0x00000008
00045 #define D_TRACKERB_REJECT      0x00000010
00046 #define D_TRACKERB_AFFINE      0x00000020
00047
00048 #define TRACKER_SUCCESS         0
00049 #define TRACKER_NOSTRUCTURE    -1
00050 #define TRACKER_OUTOFIMAGE     -2
00051 #define TRACKER_TOOMANYITER    -3
00052 #define TRACKER_OUTOFROI       -4
00053 #define TRACKER_MEANABSDIF     -5
00054 #define TRACKER_IGNOREPOINT    -6
00055 #define TRACKER_X84            -7
00056 #define TRACKER_ERRORINCREASED  1
00057
00058
00059
00060 namespace BIAS {
00061
00062   enum ERejectionType {RT_Invalid=-1, RT_MAD, RT_X86};
00063
00064   std::ostream& operator<<(std::ostream& os, const enum ERejectionType& rt);
00065
00066   /** @class TrackerBaseInterface
00067       @ingroup g_tracker
00068       @brief
00069
00070       Base class for the different tracking algorithms, defining the interfaces
00071       for the tracking functions. Also stores some basic options and datas,
00072       i.e. the pointer to the image datas. See ExampleTrackerBaseInterface for brief
00073       exemplary usage.
00074
00075       \todo Implement DLL - add lost of missing explicit instantiations (JW)
00076
00077       @author woelk 09/2004 */
00078   template <class StorageType>
00079   class BIASMatcher2D_EXPORT TrackerBaseInterface : public Debug
00080   {
00081   public :
00082     TrackerBaseInterface();
00083
00084     TrackerBaseInterface(Param& para, const std::string& postfix="");
00085
00086     TrackerBaseInterface(Param& para, const int grp, const std::string& postfix);
00087
00088     ~TrackerBaseInterface();
00089
00090     /** @brief Track from im1 to im2,
00091         gradx1/2: horizontal gradient imgs
00092         grady1/2: vertical gradient imgs
00093         The ROI must be set correctly in gradient images (representing the
00094         gradient filter mask size).
00095         For good results im1 and im2 should be lowpass filtered images. */
00096     void Init(Image<StorageType>& im1, Image<StorageType>& im2,
00097               Image<StorageType>& gradx1, Image<StorageType>& grady1,
00098               Image<StorageType>& gradx2, Image<StorageType>& grady2);
00099
00100     /** Sets _ComputeFilteredImages to true as well as
00101         _SobelBinomial and _MasksSeparable accordingly
00102         @author kollmann 06/2006 */
00103     void Init(Image<StorageType>& im1, Image<StorageType>& im2,
00104               FilterMask& lowpass_mask, FilterMask& gradx_mask,
00105               FilterMask& grady_mask);
00106
00107     /** Calculates correspondence from image1 to image2. The two images and
00108         corresponding gradients must specified using the function Init()
00109         before calling this function.
00110
00111         The algorithm searches for best correspondence to point p1 from image1
00112         in image2. The search starts at p2 in image 2.
00113         Upon completition
00114         - result      : contains the best match,
00115         - error       : contains the change in displacement calculated in
00116         the last iteration,
00117         - iter        : contains then number of iterations used,
00118         - residuumMAD : contains the mean absolute grey value difference
00119         between p1 in image 1 and p2tracked in image 2
00120         over the tracking support window,
00121         - residuumMSD : contains the squared grey value difference between p1
00122         in image 1 and p2tracked in image 2 summed over the
00123         tracking support window,
00124         - cov         : contains an approximation to the covarinace matrix
00125         image1 and result in image2 over the tracking window ( = sum of
00126         absolute difference divided by number of pixels in tracking value ).
00127
00128         All homogenous points must be homogenized (i.e. w=1.0).
00129
00130         The algorithms either terminates if the displacement resulting from
00131         one iteration drops below *_Maxerror or the maximum number of
00132         iterations *_MaxIterations is reached.
00133
00134         @return   see defines
00135         - 0 on success (error< maxerror)
00136         - -1 when no spatial structure is present
00137         - -2 when point slid out of image
00138         - -3 when maxiter is reached and error is above maxerror
00139         - -4 when a point lies outside of valid region in images
00140         - -5 when point was rejected by MAD criterion
00141         - -6 when input point was at infinity
00142         - -7 when point is rejected by X86
00143         - 1 when error increased from last iteration
00144         @author woelk */
00145     int Track(HomgPoint2D& p1, HomgPoint2D& p2, HomgPoint2D& p2tracked,
00146               KLT_TYPE& error, int &iter, KLT_TYPE& residuumMAD,
00147               KLT_TYPE& residuumMSD, Matrix<KLT_TYPE>& cov,
00148               const Matrix2x2<KLT_TYPE> & AffinePred =
00149               Matrix2x2<KLT_TYPE>());
00150
00151     /** Same as Track(), but a correspondence is searched for every point
00152         in the vector p1. */
00153     void Track(std::vector<HomgPoint2D>& p1,
00154                std::vector<HomgPoint2D>& p2,
00155                std::vector<HomgPoint2D>& p2tracked,
00156                std::vector<KLT_TYPE>& error,
00157                std::vector<int>& numiter,
00158                std::vector<KLT_TYPE>& residuiMAD,
00159                std::vector<KLT_TYPE>& residuiMSD,
00160                std::vector<int>& res,
00161                std::vector<Matrix<KLT_TYPE> >& cov,
00162                const std::vector<Matrix2x2<KLT_TYPE> >& AffinePred =
00163                std::vector<Matrix2x2<KLT_TYPE> >());
00164
00165     ////////////////////////////////////////////////////////////////////////
00166
00167     inline void SetMaxError(const KLT_TYPE maxerr) { *_MaxError=maxerr; }
00168
00169     inline void SetMaxResiduumMAD(const KLT_TYPE maxres)
00170     { *_MaxResiduumMAD=maxres; }
00171
00172     inline void SetMaxIterations(const int maxiter){ *_MaxIterations=maxiter; }
00173
00174     inline void SetHalfWinSize(const int hws) { *_HalfWinSize=hws; }
00175
00176     /// these are needed in the highlevel Tracker class
00177     inline int *GetMaxIterationsPointer() {return _MaxIterations;};
00178     inline int *GetHalfWinSizePointer() {return _HalfWinSize;};
00179     inline KLT_TYPE *GetMaxErrorPointer() {return _MaxError;};
00180
00181     inline int *GetRejectionType() { return _RejectionType; };
00182     inline void SetRejectionType(const int rejection_type)
00183     { *_RejectionType = rejection_type; };
00184
00185   protected:
00186     bool _ParamsAllocated;
00187     int *_MaxIterations; /// iteration stops after _MaxIterations
00188     int *_HalfWinSize; /// use support window of size 2*hws+1
00189     /// iteration stops if position refinement is less than *_MaxError
00190     KLT_TYPE *_MaxError;
00191
00192     /// outlier rejection via MAD
00193     KLT_TYPE *_MaxResiduumMAD;
00194     /// The rejection type: valid RT_MAD and RT_X86
00195     int *_RejectionType;
00196
00197     ///////////////////////////////////////////////////////////////////////////
00198     /// the image data arrays
00199     StorageType **_ida1, **_ida2;
00200     /// gradients image data arrays
00201     StorageType **_gradx1, **_grady1, **_gradx2, **_grady2;
00202     /// the image borders modulo filter and support windows or ROI
00203     /// for image 1 and image 2
00204     int _maxx1, _maxy1, _minx1, _miny1;
00205     int _maxx2, _maxy2, _minx2, _miny2;
00206     ///remember last support window size (for recalculation of gaussian weight)
00207     int _LastHalfWinSize, _WinSize;
00208     /// used in iteration
00209     Matrix2x2<KLT_TYPE> _G, _Ginv;
00210     Vector2<KLT_TYPE> _e, _d, _disp;
00211     Matrix<KLT_TYPE> _gx, _gy, _bl1, _bl2, _gx1, _gy1, _gx2, _gy2, _gsx, _gsy;
00212     KLT_TYPE _gxx, _gxy, _gyy, _idet;
00213     Matrix<KLT_TYPE> _weight; // the weight matrix used in TrackWeighted_
00214
00215     /// used in RejectX86_
00216     Median1D<KLT_TYPE> _Median; // median calculation class
00217     std::vector<KLT_TYPE> _all_ssd_residui; // sum of sq. grey value diff
00218     /// sum of sq. grey value diff only for points where tracking succeeded
00219     std::vector<KLT_TYPE> _ssd_residui;
00220     KLT_TYPE _median_ssd_residui; // median of _ssd_residui
00221     /// _diff_from_median = fabs(_ssd_residui - _median_ssd_residui)
00222     std::vector<KLT_TYPE> _diff_from_median;
00223     /// same as _diff_from_median but also for points where tracking was not
00224     /// sucessfull
00225     std::vector<KLT_TYPE> _all_diff_from_median;
00226     /// the rejection threshold calculated by X86
00227     /// _threshold = 5.2 * median(_diff_from_median)
00228     KLT_TYPE _threshold;
00229
00230     /// pointers to images
00231     Image<StorageType> *_im1, *_im2,
00232       *_gradim1x, *_gradim2x, *_gradim1y, *_gradim2y;
00233
00234     /// filtered images are computed when set to true
00235     bool _ComputeFilteredImages;
00236     /// uses specialized filter implementation with soebel 3x3
00237     /// and 5x5 binomial filter mask
00238     bool _SobelBinomial;
00239     /// filter masks can be applied in separated manner when set to true
00240     bool _MasksSeparable;
00241     FilterMask _LowpassMask, _GradXMask, _GradYMask;
00242
00243
00244     ///////////////////////////////////////////////////////////////////
00245     //  initialization
00246     ///////////////////////////////////////////////////////////////////
00247
00248     /** @brief set member pointers to NULL */
00249     void InitMembers_();
00250
00251     /// minx/y maxx/y defines a ROI
00252     void Init_(StorageType **ida1, StorageType **ida2,
00253                StorageType **gradx1, StorageType **grady1,
00254                StorageType **gradx2, StorageType **grady2,
00255                unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1,
00256                unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2);
00257
00258     /** brief
00259         kollmann 06/2006 */
00260     void Init_(StorageType **ida1, StorageType **ida2,
00261                unsigned minx1, unsigned miny1, unsigned maxx1, unsigned maxy1,
00262                unsigned minx2, unsigned miny2, unsigned maxx2, unsigned maxy2);
00263
00264     ///////////////////////////////////////////////////////////////////
00265     //  tracking
00266     ///////////////////////////////////////////////////////////////////
00267
00268     /** p1 has length 2, 2d coo
00269         p2 has length 2 or 6, 2d coo and affine parameters
00270         result has length 2 or 6, 2d coo and affine parameters
00271         @author woelk / kollmann 06/2006 */
00272     virtual int Track_(Vector<KLT_TYPE>& p1, Vector<KLT_TYPE>& p2,
00273                        Vector<KLT_TYPE>& result, KLT_TYPE& error,
00274                        int &iter) = 0;
00275
00276     ///////////////////////////////////////////////////////////////////
00277     //  calculation of cov, sad and ssd
00278     ///////////////////////////////////////////////////////////////////
00279
00280     /** Uses _bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui
00281         and covariance matrix and must hence be called immediatly after the
00282         Track_() function call!!
00283         @author woelk */
00284     int EvaluateResult_(int& res,KLT_TYPE& mad,KLT_TYPE& msd, KLT_TYPE cov[4]);
00285
00286     ///////////////////////////////////////////////////////////////////
00287     //  outlier rejection
00288     ///////////////////////////////////////////////////////////////////
00289
00290     /**
00291         @author woelk */
00292     int RejectMAD_(std::vector<KLT_TYPE>& sad, std::vector<int>& res);
00293
00294     /**
00295         @author woelk */
00296     int RejectX86_(std::vector<KLT_TYPE>& ssd, std::vector<int>& res);
00297
00298     ///////////////////////////////////////////////////////////////////
00299     //  helper functions
00300     ///////////////////////////////////////////////////////////////////
00301
00302     /** resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2
00303         @author woelk */
00304     inline void Resize_(const int halfwinsize);
00305
00306     /**
00307         @author woelk */
00308     void AddParam_(Param& para, const int grp, const std::string& postfix);
00309
00310     ////////////////////////////////////////////////////////////////////
00311     //  bilinear interpolation functions
00312     ////////////////////////////////////////////////////////////////////
00313
00314     /// variables needed in MyBilienarRegion?_
00315     unsigned rf, rc, cf, cc, r, c, x_floor, y_floor, x_floor_end, y_floor_end;
00316     /// variables needed in MyBilienarRegion?_
00317     KLT_TYPE ul, ur, ll, lr, brdx, brdy, brdxy;
00318
00319     /** dispatcher function for BilinearRegion*1_() functions
00320         @author woelk 06/2006 */
00321     inline void BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws);
00322
00323     /** dispatcher function for BilinearRegion*2_() functions
00324         @author woelk 06/2006 */
00325     inline void BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws);
00326
00327     /** Fills the matrices _gx1, _gy1 and _bl1 by interpolating
00328         _gradx1, _grady1 and _ida1 at positions between (x-hws, y-hws) and
00329         (x+hws, y+hws).
00330         @author woelk */
00331     inline void BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws);
00332
00333     /** Fills the matrices _gx2, _gy2 and _bl2 by interpolating
00334         _gradx2, _grady2 and _ida2 at positions between (x-hws, y-hws) and
00335         (x+hws, y+hws).
00336         @author woelk */
00337     inline void BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws);
00338
00339     /** Fills the matrices _gx1, _gy1 and _bl1 by applying
00340         _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and
00341         _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and
00342         (x+hws, y+hws) and interpolating afterwards .
00343         @author kollmann 06/2006 */
00344     inline void BilinearRegionFilterMask1_(KLT_TYPE x, KLT_TYPE y, int hws);
00345
00346     /** Fills the matrices _gx2, _gy2 and _bl2 by applying
00347         _LowpassMask.GetKernel?(), _GradXMask.GetKernel?() and
00348         _GradXMask.GetKernel?() at positions between (x-hws, y-hws) and
00349         (x+hws, y+hws) and interpolating afterwards .
00350         @author kollmann 06/2006  */
00351     inline void BilinearRegionFilterMask2_(KLT_TYPE x, KLT_TYPE y, int hws);
00352
00353     /** Fills the matrices _gx1, _gy1 and _bl1 by applying
00354         _LowpassMask.GetSep??(), _GradXMask.GetSep??() and
00355         _GradXMask.GetSep??() at positions between (x-hws, y-hws) and
00356         (x+hws, y+hws) and interpolating afterwards .
00357         @author kollmann 06/2006  */
00358     inline void BilinearRegionFilterVec1_(KLT_TYPE x, KLT_TYPE y, int hws);
00359
00360     /** Fills the matrices _gx2, _gy2 and _bl2 by applying
00361         _LowpassMask.GetSep??(), _GradXMask.GetSep??() and
00362         _GradXMask.GetSep??() at positions between (x-hws, y-hws) and
00363         (x+hws, y+hws) and interpolating afterwards .
00364         @author  */
00365     inline void BilinearRegionFilterVec2_(KLT_TYPE x, KLT_TYPE y, int hws);
00366
00367     /** Fills the matrices _gx1, _gy1 and _bl1 by applying
00368         lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and
00369         grady:  [1 2 1], [1 0 -1]^T
00370         at positions between (x-hws, y-hws) and (x+hws, y+hws) and
00371         interpolating afterwards .
00372         @author kollmann 06/2006  */
00373     inline void BilinearRegionFilterBinomial3Sobel3x3_1_(KLT_TYPE x, KLT_TYPE y, int hws);
00374
00375     /** Fills the matrices _gx2, _gy2 and _bl2 by applying
00376         lowpass: [1 2 1], [1 2 1]^T , gradx: [1 0 -1], [1 2 1]^T and
00377         grady:  [1 2 1], [1 0 -1]^T at positions between (x-hws, y-hws) and
00378         (x+hws, y+hws) and interpolating afterwards .
00379         @author kollmann 06/2006  */
00380     inline void BilinearRegionFilterBinomial3Sobel3x3_2_(KLT_TYPE x, KLT_TYPE y, int hws);
00381
00382
00383   }; // class
00384
00385   ////////////////////////////////////////////////////////////////////
00386   //  inline functions
00387   ////////////////////////////////////////////////////////////////////
00388
00389   template <class StorageType>
00390   inline void TrackerBaseInterface<StorageType>::
00391   BilinearRegion1_(KLT_TYPE x, KLT_TYPE y, int hws)
00392   {
00393     if (_ComputeFilteredImages){
00394       if (_SobelBinomial){
00395         BilinearRegionFilterSobel3x3Binomial1_(x, y, hws);
00396       } else {
00397         if (_MasksSeparabel){
00398           BilinearRegionFilterVec1_(x, y, hws);
00399         } else {
00400           BilinearRegionFilterMask1_(x, y, hws);
00401         }
00402       }
00403     } else {
00404       BilinearRegionPrefiltered1_(x, y, hws);
00405     }
00406   }
00407
00408   template <class StorageType>
00409   inline void TrackerBaseInterface<StorageType>::
00410   BilinearRegion2_(KLT_TYPE x, KLT_TYPE y, int hws)
00411   {
00412     if (_ComputeFilteredImages){
00413       if (_SobelBinomial){
00414         BilinearRegionFilterSobel3x3Binomial2_(x, y, hws);
00415       } else {
00416         if (_MasksSeparabel){
00417           BilinearRegionFilterVec2_(x, y, hws);
00418         } else {
00419           BilinearRegionFilterMask2_(x, y, hws);
00420         }
00421       }
00422     } else {
00423       BilinearRegionPrefiltered2_(x, y, hws);
00424     }
00425   }
00426
00427   template <class StorageType>
00428   inline void TrackerBaseInterface<StorageType>::
00429   BilinearRegionPrefiltered1_(KLT_TYPE x, KLT_TYPE y, int hws)
00430   {
00431     x_floor = (unsigned int)floor(x);
00432     y_floor = (unsigned int)floor(y);
00433     x_floor_end = x_floor+hws+1;
00434     y_floor_end = y_floor+hws+1;
00435     brdy = y - (KLT_TYPE)(y_floor);
00436     brdx = x - (KLT_TYPE)(x_floor);
00437     brdxy = brdx*brdy;
00438     for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00439       for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00440         ul = (KLT_TYPE)this->_ida1[rf][cf];
00441         ur = (KLT_TYPE)this->_ida1[rf][cc];
00442         ll = (KLT_TYPE)this->_ida1[rc][cf];
00443         lr = (KLT_TYPE)this->_ida1[rc][cc];
00444         _bl1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00445                     brdxy*(ul + lr - ll - ur));
00446         ul = (KLT_TYPE)(this->_gradx1[rf][cf]);
00447         ur = (KLT_TYPE)(this->_gradx1[rf][cc]);
00448         ll = (KLT_TYPE)(this->_gradx1[rc][cf]);
00449         lr = (KLT_TYPE)(this->_gradx1[rc][cc]);
00450         _gx1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00451                     brdxy*(ul + lr - ll - ur));
00452         ul = (KLT_TYPE)(this->_grady1[rf][cf]);
00453         ur = (KLT_TYPE)(this->_grady1[rf][cc]);
00454         ll = (KLT_TYPE)(this->_grady1[rc][cf]);
00455         lr = (KLT_TYPE)(this->_grady1[rc][cc]);
00456         _gy1[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00457                     brdxy*(ul + lr - ll - ur));
00458       }
00459     }
00460   }
00461
00462   template <class StorageType>
00463   inline void TrackerBaseInterface<StorageType>::
00464   BilinearRegionPrefiltered2_(KLT_TYPE x, KLT_TYPE y, int hws)
00465   {
00466     x_floor = (unsigned int)floor(x);
00467     y_floor = (unsigned int)floor(y);
00468     x_floor_end = x_floor+hws+1;
00469     y_floor_end = y_floor+hws+1;
00470     brdy = y - (KLT_TYPE)(y_floor);
00471     brdx = x - (KLT_TYPE)(x_floor);
00472     brdxy = brdx*brdy;
00473     for (rf=y_floor-hws, rc=rf+1, r=0; rf<y_floor_end; rf++, rc++, r++){
00474       for (cf=x_floor-hws, cc=cf+1, c=0; cf<x_floor_end; cf++, cc++, c++){
00475         ul = (KLT_TYPE)this->_ida2[rf][cf];
00476         ur = (KLT_TYPE)this->_ida2[rf][cc];
00477         ll = (KLT_TYPE)this->_ida2[rc][cf];
00478         lr = (KLT_TYPE)this->_ida2[rc][cc];
00479         _bl2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00480                     brdxy*(ul + lr - ll - ur));
00481         ul = (KLT_TYPE)(this->_gradx2[rf][cf]);
00482         ur = (KLT_TYPE)(this->_gradx2[rf][cc]);
00483         ll = (KLT_TYPE)(this->_gradx2[rc][cf]);
00484         lr = (KLT_TYPE)(this->_gradx2[rc][cc]);
00485         _gx2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00486                     brdxy*(ul + lr - ll - ur));
00487         ul = (KLT_TYPE)(this->_grady2[rf][cf]);
00488         ur = (KLT_TYPE)(this->_grady2[rf][cc]);
00489         ll = (KLT_TYPE)(this->_grady2[rc][cf]);
00490         lr = (KLT_TYPE)(this->_grady2[rc][cc]);
00491         _gy2[r][c]=(ul + brdy*(ll - ul) + brdx*(ur - ul) +
00492                     brdxy*(ul + lr - ll - ur));
00493       }
00494     }
00495   }
00496
00497   template <class StorageType>
00498   inline void TrackerBaseInterface<StorageType>::
00499   Resize_(const int halfwinsize)
00500   {
00501     _LastHalfWinSize=halfwinsize;
00502     _WinSize=(halfwinsize<<1)+1;
00503     _gx1.newsize(_WinSize, _WinSize);
00504     _gy1.newsize(_WinSize, _WinSize);
00505     _gx2.newsize(_WinSize, _WinSize);
00506     _gy2.newsize(_WinSize, _WinSize);
00507     _gsx.newsize(_WinSize, _WinSize);
00508     _gsy.newsize(_WinSize, _WinSize);
00509     _bl1.newsize(_WinSize, _WinSize);
00510     _bl2.newsize(_WinSize, _WinSize);
00511
00512   }
00513
00514
00515 } // namespace
00516
00517
00518
00519 #include <Base/Common/BIASpragmaEnd.hh>
00520
00521 #endif // __TrackerBaseInterface__hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseSimple.hh Source File

Matcher2D

TrackerBaseSimple.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __TrackerBaseSimple_hh__
00025 #define __TrackerBaseSimple_hh__
00026
00027 namespace BIAS {
00028
00029   /** @class TrackerBase
00030       @ingroup g_tracker
00031       @brief
00032       @author woelk/kollmann 06/2006 */
00033   template <class StorageType>
00034   class BIASMatcher2D_EXPORT TrackerBaseSimple
00035     : public TrackerBaseInterface<StorageType>
00036   {
00037   public :
00038     TrackerBaseSimple();
00039
00040   protected:
00041     /** p1 has length 2, 2d coo
00042         p2 has length 2, 2d coo
00043         result has length 2, 2d coo
00044         @author woelk/kollmann 06/2006 */
00045     virtual int Track_(Vector<KLT_TYPE>& p1, Vector<KLT_TYPE>& p2,
00046                        Vector<KLT_TYPE>& result, KLT_TYPE& error,
00047                        int &iter) = 0;
00048
00049   };
00050 }
00051
00052 #endif // __TrackerBaseSimple_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerBaseWeighted.hh Source File

Matcher2D

TrackerBaseWeighted.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __TrackerBaseWeighted_hh__
00025 #define __TrackerBaseWeighted_hh__
00026
00027 namespace BIAS {
00028
00029   /** @class TrackerBase
00030       @ingroup g_tracker
00031       @brief
00032       @author woelk/kollmann 06/2006 */
00033   template <class StorageType>
00034   class BIASMatcher2D_EXPORT TrackerBaseWeighted
00035     : public TrackerBaseInterface<StorageType>
00036   {
00037   public :
00038     TrackerBaseWeighted();
00039
00040   protected:
00041     Matrix<KLT_TYPE> _weight; // the weight matrix used in TrackWeighted_
00042
00043     /** p1 has length 2, 2d coo
00044         p2 has length 2, 2d coo
00045         result has length 2, 2d coo
00046         @author woelk/kollmann 06/2006 */
00047     virtual int Track_(Vector<KLT_TYPE>& p1, Vector<KLT_TYPE>& p2,
00048                        Vector<KLT_TYPE>& result, KLT_TYPE& error,
00049                        int &iter);
00050
00051     /** Same as TrackSimple_ but also uses the weighting matrix _weight.
00052         @author woelk */
00053     int TrackWeighted_(KLT_TYPE p1[2], KLT_TYPE p2[2], KLT_TYPE result[2],
00054                        KLT_TYPE& error, int &iter);
00055
00056     /** Constructs the weight matrix _weight with size _WinSize, _WinSize
00057         and fills it with gaussian weights
00058         @author woelk */
00059     void CalcGaussianWeightMatrix_();
00060
00061
00062   };
00063 }
00064
00065 #endif // __TrackerBaseWeighted_hh__
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerSynth.cpp Source File

Matcher2D

TrackerSynth.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifdef WIN32
00026 // WIN32 max definition conflicts with numeric_limits::max
00027 #  define NOMINMAX
00028 #endif
00029
00030 #include "TrackerSynth.hh"
00031 #include <Base/Math/Random.hh>
00032 #include <limits>
00033
00034
00035 using namespace BIAS;
00036 using namespace std;
00037
00038
00039 template <class StorageType, class CalculationType>
00040 TrackerSynth<StorageType, CalculationType>::
00041 TrackerSynth(Param& para, const std::string& postfix,
00042              const std::string& filename)
00043   : Tracker<StorageType, CalculationType>(para, postfix)
00044 {
00045   Frame_ = 0;
00046   ReadTracks_(filename);
00047 }
00048
00049
00050 template <class StorageType, class CalculationType>
00051 TrackerSynth<StorageType, CalculationType>::
00052 TrackerSynth(Param& para, const int grp, const std::string& postfix,
00053              const std::string& filename)
00054   : Tracker<StorageType, CalculationType>(para, grp, postfix)
00055 {
00056   Frame_ = 0;
00057   ReadTracks_(filename);
00058 }
00059
00060
00061 template <class StorageType, class CalculationType>
00062 TrackerSynth<StorageType, CalculationType>::
00063 ~TrackerSynth()
00064 {}
00065
00066
00067 template <class StorageType, class CalculationType>
00068 int TrackerSynth<StorageType, CalculationType>::
00069 Track(PyramidImage<CalculationType>& pim,
00070       PyramidImage<CalculationType>& gradx,
00071       PyramidImage<CalculationType>& grady)
00072 {
00073   // std::vector<std::vector<HomgPoint2D> > tmp = Points_;
00074   if (Points_.size()>0){
00075     for (int i=0; i<5; i++)
00076       BIASCDOUT(D_TS_REPLACE, "Points_[*PyIndex_]["<<i<<"] = "
00077                 <<Points_[*PyIndex_][i]<<endl);
00078   }
00079
00080   int res = Tracker<StorageType, CalculationType>::Track(pim, gradx, grady);
00081   //  int res = 0;
00082   //  Points_ = tmp;
00083
00084   Track_();
00085   return res;
00086 }
00087
00088
00089 template <class StorageType, class CalculationType>
00090 int TrackerSynth<StorageType, CalculationType>::
00091 Track(PyramidImage<CalculationType>& pim,
00092       PyramidImage<CalculationType>& gradx,
00093       PyramidImage<CalculationType>& grady,
00094       const std::vector<HomgPoint2D>& prediction,
00095       const std::vector<Matrix2x2<KLT_TYPE> >& affineprediction)
00096 {
00097   // std::vector<std::vector<HomgPoint2D> > tmp = Points_;
00098   if (Points_.size()>0){
00099     for (int i=0; i<5; i++)
00100       BIASCDOUT(D_TS_REPLACE, "Points_[*PyIndex_]["<<i<<"] = "
00101                 <<Points_[*PyIndex_][i]<<endl);
00102   }
00103   int res = Tracker<StorageType, CalculationType>::
00104     Track(pim, gradx, grady, prediction, affineprediction);
00105   //int res=0;
00106   //Points_ = tmp;
00107   Track_();
00108   return res;
00109 }
00110
00111
00112 template <class StorageType, class CalculationType>
00113 void TrackerSynth<StorageType, CalculationType>::
00114 Track_()
00115 {
00116   //AddDebugLevel(D_TS_REPLACE);
00117   const int pyindex = *PyIndex_;
00118   int index;
00119   double diff;
00120   if ((int)Points_.size()>pyindex){
00121     const int num = Points_[pyindex].size();
00122     Frame_++;
00123     cout << "correction : ";
00124     for (int i=0; i<num; i++){
00125       if (!Points_[pyindex][i].IsAtInfinity()){
00126         index = FindNearest_(Points_[pyindex][i], Frame_);
00127         diff = Points_[pyindex][i].Distance(Tracks_[Frame_][index]);
00128         BIASCDOUT(D_TS_REPLACE, "old point "<< Tracks_[Frame_-1][index] <<"  "
00129                   << "correcting: "<<Points_[pyindex][i]<<" --> "
00130                   <<Tracks_[Frame_][index]<<"  = "<<diff<<endl);
00131         cout << setprecision(3) << setw(8) << diff ;
00132         // assert(diff<2.0);
00133         Points_[pyindex][i] = Tracks_[Frame_][index];
00134       }
00135     }
00136     cout << endl;
00137     //AddGaussianNoise_();
00138     //AddOutlier_();
00139   }
00140 }
00141
00142
00143 template <class StorageType, class CalculationType>
00144 void TrackerSynth<StorageType, CalculationType>::
00145 AddGaussianNoise_()
00146 {
00147   Random ran;
00148   const double Sigma = 0.05;
00149   const int pyindex = *PyIndex_;
00150   if ((int)Points_.size()>pyindex){
00151     const int num = (int)Points_[pyindex].size();
00152     cout << "adding noise: "<<endl;
00153     for (int i=0; i<num; i++){
00154       if (!Points_[pyindex][i].IsAtInfinity()){
00155         cout << setw(4) << i << "  "<<Points_[pyindex][i]<<" --> ";
00156         Points_[pyindex][i][0] += ran.GetNormalDistributed(0.0, Sigma);
00157         Points_[pyindex][i][1] += ran.GetNormalDistributed(0.0, Sigma);
00158         cout << Points_[pyindex][i] << endl;
00159       }
00160     }
00161   }
00162 }
00163
00164 template <class StorageType, class CalculationType>
00165 void TrackerSynth<StorageType, CalculationType>::
00166 AddOutlier_()
00167 {
00168   Random ran;
00169   const double fraction = 0.025;
00170   const double offs = 5.0;
00171   const int pyindex = *PyIndex_;
00172   int act_num = 0;
00173   vector<int> used;
00174   if ((int)Points_.size()>pyindex){
00175     const int num = (int)Points_[pyindex].size();
00176     cout << "adding outlier: "<<endl;
00177     for (int i=0; i<num; i++){
00178       if (!Points_[pyindex][i].IsAtInfinity()){
00179         used.push_back(i);
00180         act_num++;
00181       }
00182     }
00183     int num_outl = (int)rint(fraction * (double)act_num);
00184     vector<unsigned> outl;
00185     for (int i=0; i<num_outl; i++)
00186       outl.push_back(ran.GetUniformDistributedInt(0u, (unsigned)(act_num-1)));
00187
00188     int index = 0;
00189     for (unsigned j=0; j<outl.size(); j++){
00190       index = used[outl[j]];
00191       assert(!Points_[pyindex][index].IsAtInfinity());
00192       cout << setw(4)<<index<<"  "<<Points_[pyindex][index] << " --> ";
00193       Points_[pyindex][index][0] +=
00194         ran.GetUniformDistributed(-offs, offs);
00195       Points_[pyindex][index][1] +=
00196         ran.GetUniformDistributed(-offs, offs);
00197       cout << Points_[pyindex][index] << endl;
00198     }
00199
00200   }
00201
00202 }
00203
00204 template <class StorageType, class CalculationType>
00205 void TrackerSynth<StorageType, CalculationType>::
00206 ReadTracks_(const string& filename)
00207 {
00208   //AddDebugLevel(D_TS_READ);
00209   ifstream is(filename.c_str());
00210   if (!is.good()){
00211     BIASERR("error opening \""<<filename<<"\"");
00212     BIASABORT;
00213   }
00214
00215   string tmp;
00216   int frame, num_tracks=0, num_frames=0;
00217   is >> tmp >> num_tracks >> tmp >> num_frames >> tmp;
00218   BIASCDOUT(D_TS_READ, "found "<<num_tracks<<" in "<<num_frames<<" frames\n");
00219   const int num_c = 2048;
00220   char *ttt = new char[num_c];
00221   is.getline(ttt, num_c);
00222   //cout << "tmp: "<<tmp<<endl;
00223   //cout << "line: "<<ttt<<endl;
00224   delete[] ttt;
00225   Tracks_.resize(num_frames);
00226   for (int f=0; f<num_frames; f++){
00227     is >> frame;
00228     //cout << "frame: "<<frame<<endl;
00229     if (frame != f+1){
00230       BIASERR("error reading \""<<filename<<"\"");
00231       BIASABORT;
00232     }
00233     BIASCDOUT(D_TS_READ, setw(4)<< frame<<" ");
00234     Tracks_[f].resize(num_tracks);
00235     for (int t=0; t<num_tracks; t++){
00236       is >> Tracks_[f][t][0] >> Tracks_[f][t][1];
00237       BIASCDOUT(D_TS_READ, setw(7)<<Tracks_[f][t][0] <<" "
00238                 << setw(7)<<Tracks_[f][t][1]<< "  ");
00239       Tracks_[f][t][2] = 1.0;
00240       if (!is.good()){
00241         BIASERR("error reading \""<<filename<<"\"");
00242         BIASABORT;
00243       }
00244     }
00245   }
00246   is.close();
00247 }
00248
00249
00250 template <class StorageType, class CalculationType>
00251 void TrackerSynth<StorageType, CalculationType>::
00252 FindNearest_(HomgPoint2D& p, int &nearest_frame_index,
00253                   int &nearest_track_index)
00254 {
00255   const int num_frames = (int)Tracks_.size();
00256   double dist=0;
00257   double nearest_dist = numeric_limits<double>::max();
00258
00259   int t;
00260   nearest_frame_index = -1;
00261   nearest_track_index = -1;
00262   for (int f=0; f<num_frames; f++){
00263     t = FindNearest_(p, f);
00264     dist = p.Distance(Tracks_[f][t]);
00265     if (dist <= nearest_dist){
00266       nearest_dist = dist;
00267       nearest_frame_index = f;
00268       nearest_track_index = t;
00269     }
00270   }
00271   BIASASSERT(nearest_frame_index>0);
00272   BIASASSERT(nearest_dist<0.1);
00273 }
00274
00275 template <class StorageType, class CalculationType>
00276 int TrackerSynth<StorageType, CalculationType>::
00277 FindNearest_(HomgPoint2D& p, const int frame)
00278 {
00279   int nearest_track_index = -1;
00280   double dist=0;
00281   double nearest_dist = numeric_limits<double>::max();
00282   const int num_tracks = (int)Tracks_[frame].size();
00283   for (int t=0; t<num_tracks; t++){
00284     dist = p.Distance(Tracks_[frame][t]);
00285     if (dist <= nearest_dist){
00286       nearest_dist = dist;
00287       nearest_track_index = t;
00288     }
00289   }
00290   BIASASSERT(nearest_track_index>=0);
00291   return nearest_track_index;
00292 }
00293
00294
00295 //////////////////////////////////////////////////////////////////////////
00296 //                 instantiation
00297 //////////////////////////////////////////////////////////////////////////
00298
00299 template class TrackerSynth<unsigned char, float>;
00300 template class TrackerSynth<float, float>;
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Matcher2D/TrackerSynth.hh Source File

Matcher2D

TrackerSynth.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _TrackerSynth_hh_
00025 #define _TrackerSynth_hh_
00026
00027 #include <bias_config.h>
00028
00029 #include <Matcher2D/Tracker.hh>
00030
00031 #include <vector>
00032 #include <string>
00033
00034 #define D_TS_READ    0x80000000
00035 #define D_TS_REPLACE 0x40000000
00036
00037 namespace BIAS{
00038
00039   /** @class TrackerSynth
00040       @brief returns ground truth tracks read from file, for debugging
00041       @author woelk 01/2006 */
00042   template <class StorageType, class CalculationType>
00043   class BIASMatcher2D_EXPORT TrackerSynth
00044     : public Tracker<StorageType, CalculationType>
00045   {
00046   public:
00047     TrackerSynth(Param& para, const std::string& postfix="",
00048                  const std::string& filename="tracks.txt");
00049
00050     TrackerSynth(Param& para, const int grp, const std::string& postfix,
00051                  const std::string& filename="tracks.txt");
00052
00053     virtual ~TrackerSynth();
00054
00055     /** Tracks all points from the internal data structure Points_ and
00056         afterwards replaces them by the nearest track read from file
00057         @author woelk 01/2006 */
00058     virtual int Track(PyramidImage<CalculationType>& pim,
00059                       PyramidImage<CalculationType>& gradx,
00060                       PyramidImage<CalculationType>& grady);
00061
00062     /** Tracks all points in Points_ using prediction as previous knowledge
00063         and afterwards replaces them by the nearest track read from file.
00064         @author woelk 01/2006 */
00065     virtual int Track(PyramidImage<CalculationType>& pim,
00066                       PyramidImage<CalculationType>& gradx,
00067                       PyramidImage<CalculationType>& grady,
00068                       const std::vector<HomgPoint2D>& prediction,
00069                       const std::vector<Matrix2x2<KLT_TYPE> >&affineprediction=
00070                       std::vector<Matrix2x2<KLT_TYPE> >());
00071
00072     using Tracker<StorageType, CalculationType>::Points_;
00073     using Tracker<StorageType, CalculationType>::PyIndex_;
00074
00075   protected:
00076     /// tracks read from file by ReadTracks_
00077     std::vector<std::vector<HomgPoint2D> > Tracks_;
00078     /// current frame number
00079     int Frame_;
00080
00081     /** reads tracks from file and stores them in Tracks_ */
00082     void ReadTracks_(const std::string& filename);
00083
00084     /** finds the nearest point to p in all frames in Tracks_.
00085         Returns nearest_frame_index and nearest_track_index */
00086     void FindNearest_(HomgPoint2D& p, int &nearest_frame_index,
00087                       int &nearest_track_index);
00088
00089     /** Finds the nearest point to p in Tracks_[frame]. Returns the
00090         track index, i.e. the nearest point to p i Tracks_[frame][track index]
00091     */
00092     int FindNearest_(HomgPoint2D& p, const int frame);
00093
00094     /** for all succesfully tracked points p in Points_[*PyIndex]
00095         it calls FindNearest_(p, Frame_) and replaces
00096         Points_[*PyIndex] by the so found track.
00097         Adds Gaussian Noise and outlier to the replaced points. */
00098     void Track_();
00099
00100     /** adds spatial gaussian noise to Points_[*PyIndex_] */
00101     void AddGaussianNoise_();
00102
00103     /** adds outliers to Points_[*PyIndex_] */
00104     void AddOutlier_();
00105
00106   };
00107 }
00108
00109 #endif // _TrackerSynth_hh_
Generated on Wed Jun 21 19:01:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/transv.h Source File

Base » Math » tnt

transv.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Matrix Transpose Views
00035
00036 #ifndef TRANSV_H
00037 #define TRANSV_H
00038
00039 #include <iostream>
00040 #include <cassert>
00041 #include "vec.h"
00042
00043 namespace TNT
00044 {
00045
00046 template <class Array2D>
00047 class Transpose_View
00048 {
00049     protected:
00050
00051         const Array2D &  A_;
00052
00053     public:
00054
00055         typedef typename Array2D::element_type T;
00056         typedef         T   value_type;
00057         typedef         T   element_type;
00058         typedef         T*  pointer;
00059         typedef         T*  iterator;
00060         typedef         T&  reference;
00061         typedef const   T*  const_iterator;
00062         typedef const   T&  const_reference;
00063
00064
00065         const Array2D & array()  const { return A_; }
00066         Subscript num_rows() const { return A_.num_cols();}
00067         Subscript num_cols() const { return A_.num_rows();}
00068         Subscript lbound() const { return A_.lbound(); }
00069         Subscript dim(Subscript i) const
00070         {
00071 #ifdef TNT_BOUNDS_CHECK
00072             assert( A_.lbound() <= i);
00073             assert( i<= A_.lbound()+1);
00074 #endif
00075             if (i== A_.lbound())
00076                 return num_rows();
00077             else
00078                 return num_cols();
00079         }
00080
00081
00082         Transpose_View(const Transpose_View<Array2D> &A) : A_(A.A_) {};
00083         Transpose_View(const Array2D &A) : A_(A) {};
00084
00085
00086         inline const typename Array2D::element_type & operator()(
00087             Subscript i, Subscript j) const
00088         {
00089 #ifdef TNT_BOUNDS_CHECK
00090         assert(lbound()<=i);
00091         assert(i<=A_.num_cols() + lbound() - 1);
00092         assert(lbound()<=j);
00093         assert(j<=A_.num_rows() + lbound() - 1);
00094 #endif
00095
00096             return A_(j,i);
00097         }
00098
00099
00100 };
00101
00102 template <class Matrix>
00103 Transpose_View<Matrix> Transpose_view(const Matrix &A)
00104 {
00105     return Transpose_View<Matrix>(A);
00106 }
00107
00108 template <class Matrix, class T>
00109 Vector<T> matmult(
00110     const Transpose_View<Matrix> & A,
00111     const Vector<T> &B)
00112 {
00113     Subscript  M = A.num_rows();
00114     Subscript  N = A.num_cols();
00115
00116     assert(B.dim() == N);
00117
00118     Vector<T> x(N);
00119
00120     Subscript i, j;
00121     T tmp = 0;
00122
00123     for (i=1; i<=M; i++)
00124     {
00125         tmp = 0;
00126         for (j=1; j<=N; j++)
00127             tmp += A(i,j) * B(j);
00128         x(i) = tmp;
00129     }
00130
00131     return x;
00132 }
00133
00134 template <class Matrix, class T>
00135 inline Vector<T> operator*(const Transpose_View<Matrix> & A, const Vector<T> &B)
00136 {
00137     return matmult(A,B);
00138 }
00139
00140
00141 template <class Matrix>
00142 std::ostream& operator<<(std::ostream &s, const Transpose_View<Matrix> &A)
00143 {
00144     Subscript M=A.num_rows();
00145     Subscript N=A.num_cols();
00146
00147     Subscript start = A.lbound();
00148     Subscript Mend = M + A.lbound() - 1;
00149     Subscript Nend = N + A.lbound() - 1;
00150
00151     s << M << "  " << N << endl;
00152     for (Subscript i=start; i<=Mend; i++)
00153     {
00154         for (Subscript j=start; j<=Nend; j++)
00155         {
00156             s << A(i,j) << " ";
00157         }
00158         s << endl;
00159     }
00160
00161
00162     return s;
00163 }
00164
00165 } // namespace TNT
00166
00167 #endif
00168 // TRANSV_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


TreeView

Basic Image AlgorithmS Library

o * Basic Image AlgorithmS (BIAS) Library

o + File List

| o * D:/home/jw/build/BIAS/bias_config.h

| o * BIAS_DeclSpec.hh

| o * CHANGELOG

| o * DEPENDENCIES

| o * INSTALL

| o * LGPL

| o * LICENSE

| o * precompiled.cpp

| o * precompiled.h

| o * Base/Common/BaseFactory.hh

| o * Base/Common/BIASpragma.hh

| o * Base/Common/BIASpragmaEnd.hh

| o * Base/Common/BIASpragmaStart.hh

| o * Base/Common/CompareFloatingPoint.hh

| o * Base/Common/FileHandling.cpp

| o * Base/Common/FileHandling.hh

| o * Base/Common/getopt_long_W32.cpp

| o * Base/Common/getopt_W32.cpp

| o * Base/Common/getopt_W32.h

| o * Base/Common/LeakChecking.h

| o * Base/Common/W32Compat.cpp

| o * Base/Common/W32Compat.hh

| o * Base/Common/XMLBase.cpp

| o * Base/Common/XMLBase.hh

| o * Base/Common/XMLIO.cpp

| o * Base/Common/XMLIO.hh

| o * Base/Common/Examples/ExampleCompare.cpp

| o * Base/Common/Examples/ExampleFactory.cpp

| o * Base/Common/Examples/ExampleFileNames.cpp

| o * Base/Common/Examples/ExampleXMLBase.cpp

| o * Base/Common/Examples/ExampleXMLIO.cpp

| o * Base/Debug/biasabort.cpp

| o * Base/Debug/biasabort.hh

| o * Base/Debug/biasexit.cpp

| o * Base/Debug/biasexit.hh

| o * Base/Debug/Constraints.hh

| o * Base/Debug/Debug.cpp

| o * Base/Debug/Debug.hh

| o * Base/Debug/DebugSimple.hh

| o * Base/Debug/Error.hh

| o * Base/Debug/Exception.hh

| o * Base/Debug/LogFacility.cpp

| o * Base/Debug/LogFacility.hh

| o * Base/Debug/RedirectStreams.hh

| o * Base/Debug/ThreadNaming.cpp

| o * Base/Debug/ThreadNaming.hh

| o * Base/Debug/TimeMeasure.cpp

| o * Base/Debug/TimeMeasure.hh

| o * Base/Debug/TimeMeasurement.hh

| o * Base/Debug/Examples/DebugMyMain.cpp

| o * Base/Debug/Examples/ExampleConstraints.cpp

| o * Base/Debug/Examples/ExampleCopy.cpp

| o * Base/Debug/Examples/ExampleLogFacility.cpp

| o * Base/Debug/Examples/ExampleTimeMeasureCycle.cpp

| o * Base/Debug/Examples/MyDebug.cpp

| o * Base/Debug/Examples/MyDebug.hh

| o * Base/Geometry/AffineTransf.cpp

| o * Base/Geometry/AffineTransf.hh

| o * Base/Geometry/EMatrixBase.cpp

| o * Base/Geometry/EMatrixBase.hh

| o * Base/Geometry/EuclideanTransf3D.cpp

| o * Base/Geometry/EuclideanTransf3D.hh

| o * Base/Geometry/FMatrixBase.cpp

| o * Base/Geometry/FMatrixBase.hh

| o * Base/Geometry/HMatrixBase.cpp

| o * Base/Geometry/HMatrixBase.hh

| o * Base/Geometry/HomgLine2D.cpp

| o * Base/Geometry/HomgLine2D.hh

| o * Base/Geometry/HomgLine3D.hh

| o * Base/Geometry/HomgPlane3D.cpp

| o * Base/Geometry/HomgPlane3D.hh

| o * Base/Geometry/HomgPoint1D.cpp

| o * Base/Geometry/HomgPoint1D.hh

| o * Base/Geometry/HomgPoint2D.cpp

| o * Base/Geometry/HomgPoint2D.hh

| o * Base/Geometry/HomgPoint2DCov.cpp

| o * Base/Geometry/HomgPoint2DCov.hh

| o * Base/Geometry/HomgPoint3D.cpp

| o * Base/Geometry/HomgPoint3D.hh

| o * Base/Geometry/HomgPoint3DCov.cpp

| o * Base/Geometry/HomgPoint3DCov.hh

| o * Base/Geometry/KMatrix.cpp

| o * Base/Geometry/KMatrix.hh

| o * Base/Geometry/Normalization.cpp

| o * Base/Geometry/Normalization.hh

| o * Base/Geometry/PlueckerMatrix.cpp

| o * Base/Geometry/PlueckerMatrix.hh

| o * Base/Geometry/PMatrixBase.cpp

| o * Base/Geometry/PMatrixBase.hh

| o * Base/Geometry/PoseParametrization.cpp

| o * Base/Geometry/PoseParametrization.hh

| o * Base/Geometry/PoseParametrizationCovariance.cpp

| o * Base/Geometry/PoseParametrizationCovariance.hh

| o * Base/Geometry/Quaternion.cpp

| o * Base/Geometry/Quaternion.hh

| o * Base/Geometry/QuaternionInl.hh

| o * Base/Geometry/QuaternionOperators.hh

| o * Base/Geometry/RMatrixBase.cpp

| o * Base/Geometry/RMatrixBase.hh

| o * Base/Geometry/TrifocalTensorBase.cpp

| o * Base/Geometry/TrifocalTensorBase.hh

| o * Base/Geometry/Examples/ExamplePMatrixBase.cpp

| o * Base/Geometry/Examples/ExampleQuaternion.cpp

| o * Base/Geometry/Examples/ExampleRMatrix.cpp

| o * Base/Image/Bresenham.hh

| o * Base/Image/BresenhamCircle.hh

| o * Base/Image/EightWaySymmetry.hh

| o * Base/Image/ExifTag.cpp

| o * Base/Image/ExifTag.hh

| o * Base/Image/Image.cpp

| o * Base/Image/Image.hh

| o * Base/Image/ImageAttributes.cpp

| o * Base/Image/ImageAttributes.hh

| o * Base/Image/ImageBase.cpp

| o * Base/Image/ImageBase.hh

| o * Base/Image/ImageBaseInline.hh

| o * Base/Image/ImageConvert.cpp

| o * Base/Image/ImageConvert.hh

| o * Base/Image/ImageConvertInstantiation.cpp

| o * Base/Image/ImageConvertThreaded.cpp

| o * Base/Image/ImageConvertThreaded.hh

| o * Base/Image/ImageDraw.cpp

| o * Base/Image/ImageDraw.hh

| o * Base/Image/ImageInline.hh

| o * Base/Image/ImageIO.cpp

| o * Base/Image/ImageIO.hh

| o * Base/Image/MetaData.cpp

| o * Base/Image/MetaData.hh

| o * Base/Image/Operators.cpp

| o * Base/Image/PMDImageIO.cpp

| o * Base/Image/PMDImageIO.hh

| o * Base/Image/ROI.cpp

| o * Base/Image/ROI.hh

| o * Base/Image/ScanLine.hh

| o * Base/Image/ScanLine2.hh

| o * Base/Image/ToHSL.cpp

| o * Base/Image/ToHSV.cpp

| o * Base/Image/ToInterleaved.cpp

| o * Base/Image/ToPlanar.cpp

| o * Base/Image/UUID.cpp

| o * Base/Image/UUID.hh

| o * Base/Image/ViffHeader.hh

| o * Base/Image/WrapBias2Ipl.cpp

| o * Base/Image/WrapBias2Ipl.hh

| o * Base/Image/Examples/convertRAW.cpp

| o * Base/Image/Examples/ExampleBresenham.cpp

| o * Base/Image/Examples/ExampleChessboard.cpp

| o * Base/Image/Examples/ExampleConvert.cpp

| o * Base/Image/Examples/ExampleDraw.cpp

| o * Base/Image/Examples/ExampleEmpty.cpp

| o * Base/Image/Examples/ExampleForeignData.cpp

| o * Base/Image/Examples/ExampleHSVConversion.cpp

| o * Base/Image/Examples/ExampleImageAttributes.cpp

| o * Base/Image/Examples/ExampleImageLoad.cpp

| o * Base/Image/Examples/ExampleImageMagickIO.cpp

| o * Base/Image/Examples/ExampleImageOperator.cpp

| o * Base/Image/Examples/ExampleInterpolation.cpp

| o * Base/Image/Examples/ExampleIpl.cpp

| o * Base/Image/Examples/ExampleIplImageDisplay.cpp

| o * Base/Image/Examples/ExampleIplImageDraw.cpp

| o * Base/Image/Examples/ExampleIplWrapOpenCV.cpp

| o * Base/Image/Examples/ExampleMetaData.cpp

| o * Base/Image/Examples/ExampleMinMax.cpp

| o * Base/Image/Examples/ExampleROI.cpp

| o * Base/Image/Examples/ExampleTile.cpp

| o * Base/Image/Examples/ExampleUUID.cpp

| o * Base/Image/Examples/mip2viff.cpp

| o * Base/Image/Examples/viff2mip.cpp

| o * Base/Math/Cholesky.cpp

| o * Base/Math/Cholesky.hh

| o * Base/Math/Distribution.cpp

| o * Base/Math/Distribution.hh

| o * Base/Math/Math.hh

| o * Base/Math/Matrix.cpp

| o * Base/Math/Matrix.hh

| o * Base/Math/Matrix2x2.cpp

| o * Base/Math/Matrix2x2.hh

| o * Base/Math/Matrix3x3.cpp

| o * Base/Math/Matrix3x3.hh

| o * Base/Math/Matrix3x4.cpp

| o * Base/Math/Matrix3x4.hh

| o * Base/Math/Matrix4x4.cpp

| o * Base/Math/Matrix4x4.hh

| o * Base/Math/Operators.hh

| o * Base/Math/Polynom.hh

| o * Base/Math/Random.cpp

| o * Base/Math/Random.hh

| o * Base/Math/RGB.hh

| o * Base/Math/RGBA.hh

| o * Base/Math/Tensor3D.cpp

| o * Base/Math/Tensor3D.hh

| o * Base/Math/Tensor3D3x3x3.cpp

| o * Base/Math/Tensor3D3x3x3.hh

| o * Base/Math/Vector.cpp

| o * Base/Math/Vector.hh

| o * Base/Math/Vector2.cpp

| o * Base/Math/Vector2.hh

| o * Base/Math/Vector3.cpp

| o * Base/Math/Vector3.hh

| o * Base/Math/Vector4.cpp

| o * Base/Math/Vector4.hh

| o * Base/Math/Examples/ExampleLoadBan.cpp

| o * Base/Math/Examples/ExampleLoadBOG.cpp

| o * Base/Math/Examples/ExampleOperators.cpp

| o * Base/Math/Examples/ExamplePolynom.cpp

| o * Base/Math/Examples/ExampleRandom.cpp

| o * Base/Math/Examples/ExampleRandom2.cpp

| o * Base/Math/Examples/ExampleRandom2D.cpp

| o * Base/Math/tnt/cholesky.h

| o * Base/Math/tnt/cmat.h

| o * Base/Math/tnt/fcscmat.h

| o * Base/Math/tnt/fmat.h

| o * Base/Math/tnt/fortran.h

| o * Base/Math/tnt/fspvec.h

| o * Base/Math/tnt/index.h

| o * Base/Math/tnt/lapack.h

| o * Base/Math/tnt/lu.h

| o * Base/Math/tnt/qr.h

| o * Base/Math/tnt/region1d.h

| o * Base/Math/tnt/region2d.h

| o * Base/Math/tnt/stopwatch.h

| o * Base/Math/tnt/subscript.h

| o * Base/Math/tnt/tnt.h

| o * Base/Math/tnt/tntmath.h

| o * Base/Math/tnt/tntreqs.h

| o * Base/Math/tnt/transv.h

| o * Base/Math/tnt/triang.h

| o * Base/Math/tnt/trisolve.h

| o * Base/Math/tnt/vec.h

| o * Base/Math/tnt/vecadaptor.h

| o * Base/Math/tnt/version.h

| o * FeatureDetector/ColorHarris.cpp

| o * FeatureDetector/ColorHarris.hh

| o * FeatureDetector/CornerDetectorBase.cpp

| o * FeatureDetector/CornerDetectorBase.hh

| o * FeatureDetector/CornerDetectorFoerstner.cpp

| o * FeatureDetector/CornerDetectorFoerstner.hh

| o * FeatureDetector/CornerDetectorGradient.cpp

| o * FeatureDetector/CornerDetectorGradient.hh

| o * FeatureDetector/CornerDetectorHarris.cpp

| o * FeatureDetector/CornerDetectorHarris.hh

| o * FeatureDetector/CornerDetectorKLT.cpp

| o * FeatureDetector/CornerDetectorKLT.hh

| o * FeatureDetector/CornerDetectorSusan.cpp

| o * FeatureDetector/CornerDetectorSusan.hh

| o * FeatureDetector/LinearRegionDetector.cpp

| o * FeatureDetector/LinearRegionDetector.hh

| o * FeatureDetector/Examples/ExampleCornerDetector.cpp

| o * Filter/Binomial.cpp

| o * Filter/Binomial.hh

| o * Filter/Convolution.cpp

| o * Filter/Convolution.hh

| o * Filter/DeInterlace.cpp

| o * Filter/DeInterlace.hh

| o * Filter/Dilation.cpp

| o * Filter/Dilation.hh

| o * Filter/DistTransform.cpp

| o * Filter/DistTransform.hh

| o * Filter/Erosion.cpp

| o * Filter/Erosion.hh

| o * Filter/FilterBase.cpp

| o * Filter/FilterBase.hh

| o * Filter/Filterinst.hh

| o * Filter/FilterMask.cpp

| o * Filter/FilterMask.hh

| o * Filter/FilterNTo2N.cpp

| o * Filter/FilterNTo2N.hh

| o * Filter/FilterNTo3N.cpp

| o * Filter/FilterNTo3N.hh

| o * Filter/FilterNToN.cpp

| o * Filter/FilterNToN.hh

| o * Filter/Gauss.cpp

| o * Filter/Gauss.hh

| o * Filter/GradientGauss.cpp

| o * Filter/GradientGauss.hh

| o * Filter/GradientGaussAsymmetric.cpp

| o * Filter/GradientGaussAsymmetric.hh

| o * Filter/GradientSimple.cpp

| o * Filter/GradientSimple.hh

| o * Filter/GradientSobel3x3.cpp

| o * Filter/GradientSobel3x3.hh

| o * Filter/Label.cpp

| o * Filter/Label.hh

| o * Filter/Mean.cpp

| o * Filter/Mean.hh

| o * Filter/Median.cpp

| o * Filter/Median.hh

| o * Filter/Morphology.cpp

| o * Filter/Morphology.hh

| o * Filter/Rescale.cpp

| o * Filter/Rescale.hh

| o * Filter/StructureTensor.cpp

| o * Filter/StructureTensor.hh

| o * Filter/Examples/ExampleBinomial.cpp

| o * Filter/Examples/ExampleConvolution.cpp

| o * Filter/Examples/ExampleDeInterlace.cpp

| o * Filter/Examples/ExampleDilation.cpp

| o * Filter/Examples/ExampleDistTransform.cpp

| o * Filter/Examples/ExampleErosion.cpp

| o * Filter/Examples/ExampleGauss.cpp

| o * Filter/Examples/ExampleGradient.cpp

| o * Filter/Examples/ExampleHarrisColor.cpp

| o * Filter/Examples/ExampleMedian.cpp

| o * Filter/Examples/ExampleRescale.cpp

| o * Filter/Examples/ExampleStructureTensor.cpp

| o * Filter/Examples/ExampleUpsampleBy2Grey.cpp

| o * Geometry/Conic2D.cpp

| o * Geometry/Conic2D.hh

| o * Geometry/CoordinateTransform3D.cpp

| o * Geometry/CoordinateTransform3D.hh

| o * Geometry/CovMatrix3x3.cpp

| o * Geometry/CovMatrix3x3.hh

| o * Geometry/EightWaySymmetryHomg.hh

| o * Geometry/EMatrix.cpp

| o * Geometry/EMatrix.hh

| o * Geometry/EpipolarLine.cpp

| o * Geometry/EpipolarLine.hh

| o * Geometry/FMatrix.cpp

| o * Geometry/FMatrix.hh

| o * Geometry/FMatrixEstimation.cpp

| o * Geometry/FMatrixEstimation.hh

| o * Geometry/HMatrix.cpp

| o * Geometry/HMatrix.hh

| o * Geometry/HMatrixEstimation.cpp

| o * Geometry/HMatrixEstimation.hh

| o * Geometry/Parametrization.cpp

| o * Geometry/Parametrization.hh

| o * Geometry/PMatrix.cpp

| o * Geometry/PMatrix.hh

| o * Geometry/PMatrixEstimation.cpp

| o * Geometry/PMatrixEstimation.hh

| o * Geometry/PMatrixLinear.cpp

| o * Geometry/PMatrixLinear.hh

| o * Geometry/Pose.cpp

| o * Geometry/Pose.hh

| o * Geometry/Projection.cpp

| o * Geometry/Projection.hh

| o * Geometry/ProjectionParametersBase.cpp

| o * Geometry/ProjectionParametersBase.hh

| o * Geometry/ProjectionParametersIO.cpp

| o * Geometry/ProjectionParametersIO.hh

| o * Geometry/ProjectionParametersPerspective.cpp

| o * Geometry/ProjectionParametersPerspective.hh

| o * Geometry/ProjectionParametersProjective.cpp

| o * Geometry/ProjectionParametersProjective.hh

| o * Geometry/ProjectionParametersSpherical.cpp

| o * Geometry/ProjectionParametersSpherical.hh

| o * Geometry/ProjectionParametersZoom.cpp

| o * Geometry/ProjectionParametersZoom.hh

| o * Geometry/Quadric3D.cpp

| o * Geometry/Quadric3D.hh

| o * Geometry/RMatrix.cpp

| o * Geometry/RMatrix.hh

| o * Geometry/SimilarityTransform.cpp

| o * Geometry/SimilarityTransform.hh

| o * Geometry/TFTensorEstimation.cpp

| o * Geometry/TFTensorEstimation.hh

| o * Geometry/Triangulation.cpp

| o * Geometry/Triangulation.hh

| o * Geometry/TrifocalTensor.cpp

| o * Geometry/TrifocalTensor.hh

| o * Geometry/Examples/Example7Point.cpp

| o * Geometry/Examples/ExampleConic.cpp

| o * Geometry/Examples/ExampleLoadBBC.cpp

| o * Geometry/Examples/ExampleLoadBOG_P.cpp

| o * Geometry/Examples/ExamplePMatrix.cpp

| o * Geometry/Examples/ExampleProjection.cpp

| o * Geometry/Examples/ExampleProjectionParametersIO.cpp

| o * Geometry/Examples/ExampleTriangulate.cpp

| o * Geometry/Examples/ExampleTriangulate2.cpp

| o * Geometry/Examples/ExampleTriangulateOptimal.cpp

| o * Geometry/Examples/FMatrixTest.cpp

| o * Geometry/Examples/HMatrixTest.cpp

| o * Geometry/Examples/InvestigateEpipoleEstimation.cpp

| o * Geometry/Examples/PMatrixTest.cpp

| o * Gui/_wx_intellisense.h

| o * Gui/bias_wx_glcanvas.h

| o * Gui/biasgl.h

| o * Gui/CameraViewController.cpp

| o * Gui/CameraViewController.hh

| o * Gui/CameraViewExternals.cpp

| o * Gui/CameraViewExternals.hh

| o * Gui/CameraViewFrustum.cpp

| o * Gui/CameraViewFrustum.hh

| o * Gui/CameraViewInternals.cpp

| o * Gui/CameraViewInternals.hh

| o * Gui/CameraViewport.cpp

| o * Gui/CameraViewport.hh

| o * Gui/ConsoleRedirectIO.cpp

| o * Gui/ConsoleRedirectIO.hh

| o * Gui/dndFileTarget.cpp

| o * Gui/dndFileTarget.hh

| o * Gui/DrawTextGL.cpp

| o * Gui/DrawTextGL.hh

| o * Gui/GeometryGL.cpp

| o * Gui/GeometryGL.hh

| o * Gui/glcheck.h

| o * Gui/glstuff.h

| o * Gui/GuiBase.cpp

| o * Gui/GuiBase.hh

| o * Gui/GuiEnhanced.cpp

| o * Gui/GuiEnhanced.hh

| o * Gui/GuiGTK.cpp

| o * Gui/GuiGTK.hh

| o * Gui/GuiWX.cpp

| o * Gui/GuiWX.hh

| o * Gui/ImageCanvas.cpp

| o * Gui/ImageCanvas.hh

| o * Gui/ImageCanvasEnhanced.cpp

| o * Gui/ImageCanvasEnhanced.hh

| o * Gui/ImageCanvasGLBase.cpp

| o * Gui/ImageCanvasGLBase.hh

| o * Gui/ImgObjGL.cpp

| o * Gui/ImgObjGL.hh

| o * Gui/OpenGLCanvas.cpp

| o * Gui/OpenGLCanvas.hh

| o * Gui/OpenGLCanvasBase.cpp

| o * Gui/OpenGLCanvasBase.hh

| o * Gui/ParamGUI.cpp

| o * Gui/ParamGUI.hh

| o * Gui/ProjectionGUI.cpp

| o * Gui/ProjectionGUI.hh

| o * Gui/RenderModeGL.hh

| o * Gui/SettingsGL.cpp

| o * Gui/SettingsGL.hh

| o * Gui/StringConv.hh

| o * Gui/Examples/ExampleGLShared.cpp

| o * Gui/Examples/ExampleGLShared.hh

| o * Gui/Examples/ExampleImageCanvas.cpp

| o * Gui/Examples/ExampleImageCanvasEnhanced.cpp

| o * Gui/Examples/ExampleImageCanvasFloat.cpp

| o * Gui/Examples/ExampleImageCanvasGLBase.cpp

| o * Gui/Examples/ExampleImageCanvasGLBase.hh

| o * Gui/Examples/ExampleMultipleGui.cpp

| o * Gui/Examples/ExampleOpenGLCanvas.cpp

| o * Gui/Examples/ExampleOpenGLCanvas.hh

| o * Gui/Examples/ExampleOpenGLCanvasBase.cpp

| o * Gui/Examples/ExampleOpenGLCanvasBase.hh

| o * Gui/Examples/ParamGUISample1.cpp

| o * Gui/Examples/ParamGUISample2.cpp

| o * Gui/Examples/ParamGUISample3.cpp

| o * Gui/Examples/TestGui.cpp

| o * Gui/Examples/TestGuiEnhanced.cpp

| o * Gui/Examples/TestGuiPyramid.cpp

| o * Gui/Examples/TestMouse.cpp

| o * Image/BackwardMapping.cpp

| o * Image/BackwardMapping.hh

| o * Image/Camera.cpp

| o * Image/Camera.hh

| o * Image/CameraParam.cpp

| o * Image/CameraParam.hh

| o * Image/ColorHistogram.cpp

| o * Image/ColorHistogram.hh

| o * Image/ColorMultiHistogram.cpp

| o * Image/ColorMultiHistogram.hh

| o * Image/ColorSegmentation.cpp

| o * Image/ColorSegmentation.hh

| o * Image/CompressJpeg.cpp

| o * Image/CompressJpeg.hh

| o * Image/Contour.cpp

| o * Image/Contour.hh

| o * Image/CylinderMapping.cpp

| o * Image/CylinderMapping.hh

| o * Image/DCData.cpp

| o * Image/DCData.hh

| o * Image/FFT2D.cpp

| o * Image/FFT2D.hh

| o * Image/FFT2D_Tiles.cpp

| o * Image/FFT2D_Tiles.hh

| o * Image/Histogram.cpp

| o * Image/Histogram.hh

| o * Image/HomographyMapping.cpp

| o * Image/HomographyMapping.hh

| o * Image/IntegralHistogram.cpp

| o * Image/IntegralHistogram.hh

| o * Image/LogPolarMapping.cpp

| o * Image/LogPolarMapping.hh

| o * Image/MatlabTBUndistortion.cpp

| o * Image/MatlabTBUndistortion.hh

| o * Image/PMDImageProc.cpp

| o * Image/PMDImageProc.hh

| o * Image/ProjectionMapping.cpp

| o * Image/ProjectionMapping.hh

| o * Image/PyramidImage.cpp

| o * Image/PyramidImage.hh

| o * Image/RigParameter.cpp

| o * Image/RigParameter.hh

| o * Image/SphericalUndistortion.cpp

| o * Image/SphericalUndistortion.hh

| o * Image/StereoRedGreen.cpp

| o * Image/StereoRedGreen.hh

| o * Image/UndistortionMapping.cpp

| o * Image/UndistortionMapping.hh

| o * Image/UnVignette.cpp

| o * Image/UnVignette.hh

| o * Image/VideoStream.cpp

| o * Image/VideoStream.hh

| o * Image/Examples/ExampleCamera.cpp

| o * Image/Examples/ExampleCameraParam.cpp

| o * Image/Examples/ExampleContour.cpp

| o * Image/Examples/ExampleCylinderMapping.cpp

| o * Image/Examples/ExampleFFT2D.cpp

| o * Image/Examples/ExampleFFT2D_Tiles.cpp

| o * Image/Examples/ExampleFMT2D.cpp

| o * Image/Examples/ExampleHistogram.cpp

| o * Image/Examples/ExampleHomographyMapping.cpp

| o * Image/Examples/ExampleLogPolarMapping.cpp

| o * Image/Examples/ExampleMapPerspImages.cpp

| o * Image/Examples/ExamplePMDImageIO.cpp

| o * Image/Examples/ExampleProjectionMapping.cpp

| o * Image/Examples/ExamplePyramidImage.cpp

| o * Image/Examples/ExampleRigParameter.cpp

| o * Image/Examples/ExampleSphereProjections.cpp

| o * Image/Examples/ExampleUndistort.cpp

| o * Image/Examples/ExampleUnVignette.cpp

| o * Image/Examples/ExampleVideoStream.cpp

| o * Image/Examples/PMatrix2RigParameter.cpp

| o * Matcher2D/CornerMatcher.cpp

| o * Matcher2D/CornerMatcher.hh

| o * Matcher2D/LineMatcher.cpp

| o * Matcher2D/RegionMatcher.cpp

| o * Matcher2D/RegionMatcher.hh

| o * Matcher2D/SimilarityMeasure.cpp

| o * Matcher2D/Tracker.cpp

| o * Matcher2D/Tracker.hh

| o * Matcher2D/TrackerBase.cpp

| o * Matcher2D/TrackerBase.hh

| o * Matcher2D/TrackerBaseAffine.hh

| o * Matcher2D/TrackerBaseInterface.hh

| o * Matcher2D/TrackerBaseSimple.hh

| o * Matcher2D/TrackerBaseWeighted.hh

| o * Matcher2D/TrackerSynth.cpp

| o * Matcher2D/TrackerSynth.hh

| o * Matcher2D/Examples/ExampleColorNCC.cpp

| o * Matcher2D/Examples/ExampleKLTEdge.cpp

| o * Matcher2D/Examples/ExampleLineMatcher.cpp

| o * Matcher2D/Examples/ExampleParabola.cpp

| o * Matcher2D/Examples/ExampleTracker.cpp

| o * Matcher2D/Examples/ExampleTracker2.cpp

| o * Matcher2D/Examples/ExampleTracker3.cpp

| o * Matcher2D/Examples/ExampleTrackerBase.cpp

| o * MathAlgo/BSplineCurve.cpp

| o * MathAlgo/BSplineCurve.hh

| o * MathAlgo/FFT.cpp

| o * MathAlgo/FFT.hh

| o * MathAlgo/GaussHelmert.cpp

| o * MathAlgo/GaussHelmert.hh

| o * MathAlgo/GSL.cpp

| o * MathAlgo/GSL.hh

| o * MathAlgo/Interpolator.cpp

| o * MathAlgo/Interpolator.hh

| o * MathAlgo/Lapack.cpp

| o * MathAlgo/Lapack.hh

| o * MathAlgo/LeastSquares.cpp

| o * MathAlgo/LeastSquares.hh

| o * MathAlgo/Median1D.cpp

| o * MathAlgo/Median1D.hh

| o * MathAlgo/Minpack.cpp

| o * MathAlgo/Minpack.hh

| o * MathAlgo/MSAC.hh

| o * MathAlgo/PolynomialSolve.cpp

| o * MathAlgo/PolynomialSolve.hh

| o * MathAlgo/RANSAC.hh

| o * MathAlgo/RANSACPreKnowledge.hh

| o * MathAlgo/SVD.cpp

| o * MathAlgo/SVD.hh

| o * MathAlgo/SVD3x3.cpp

| o * MathAlgo/SVD3x3.hh

| o * MathAlgo/UnscentedTransform.cpp

| o * MathAlgo/UnscentedTransform.hh

| o * MathAlgo/Examples/ExampleBSplineCurve.cpp

| o * MathAlgo/Examples/ExampleFFT.cpp

| o * MathAlgo/Examples/ExampleGSL.cpp

| o * MathAlgo/Examples/ExampleInterpolateLuT.cpp

| o * MathAlgo/Examples/ExampleLeastSquares.cpp

| o * MathAlgo/Examples/ExamplePolynomialSolve.cpp

| o * MathAlgo/Examples/ExamplePowell.cpp

| o * MathAlgo/Examples/ExampleRANSAC.cpp

| o * MathAlgo/Examples/ExampleRANSAC_double.hh

| o * MathAlgo/Examples/ExampleRANSACPlane.cpp

| o * MathAlgo/Examples/ExampleRANSACPlane.hh

| o * MathAlgo/Examples/ExampleRegressionPlane.cpp

| o * MathAlgo/Examples/ExampleSVD.cpp

| o * MathAlgo/Examples/ExampleSVD3x3.cpp

| o * MathAlgo/Examples/ExampleUnscentedTransform.cpp

| o * MathAlgo/Examples/ExampleWeightedLinearLeastSquares.cpp

| o * MathAlgo/Examples/interpolate.cpp

| o * MathAlgo/minpack/f2c_gnu011.h

| o * MathAlgo/minpack/win32_f2c.h

| o * NetworkComm/CScommBase.cpp

| o * NetworkComm/CScommBase.hh

| o * NetworkComm/CScommClasses.hh

| o * NetworkComm/CScommClient.cpp

| o * NetworkComm/CScommClient.hh

| o * NetworkComm/CScommServer.cpp

| o * NetworkComm/CScommServer.hh

| o * NetworkComm/Examples/clientExample.cpp

| o * NetworkComm/Examples/ExampleNetsync.cpp

| o * NetworkComm/Examples/serverExample.cpp

| o * StateEstimator/Condensation.cpp

| o * StateEstimator/Condensation.hh

| o * StateEstimator/CondensHisto.cpp

| o * StateEstimator/CondensHisto.hh

| o * StateEstimator/CondensImg.cpp

| o * StateEstimator/CondensImg.hh

| o * StateEstimator/Kalman.cpp

| o * StateEstimator/Kalman.hh

| o * StateEstimator/Examples/CondensHistoExample.cpp

| o * StateEstimator/Examples/condensImgExample.cpp

| o * StateEstimator/Examples/ExampleKalman.cpp

| o * Tests/helloconfig.cpp

| o * Tests/MathBaseOperators.cpp

| o * Tests/testDefines.cpp

| o * Tests/testEnv.cpp

| o * Tests/testError.cpp

| o * Tests/testLeak.cpp

| o * Tests/testWarn.cpp

| o * Tools/biasadd.cpp

| o * Tools/biasconvert.cpp

| o * Tools/biasdetectunvignettewx.cpp

| o * Tools/biasdiff.cpp

| o * Tools/biasextract.cpp

| o * Tools/biasfilter.cpp

| o * Tools/biasinsert.cpp

| o * Tools/biasmerge.cpp

| o * Tools/biasprojection.cpp

| o * Tools/biassetprojection.cpp

| o * Tools/biassetuid.cpp

| o * Tools/biasshowepi.cpp

| o * Tools/biasshowepiwx.cpp

| o * Tools/biasshowsm.cpp

| o * Tools/biasview.cpp

| o * Tools/biasviewwx.cpp

| o * Tools/pmatrix2projection.cpp

| o * Tools/ShowCamWx.cpp

| o * Tools/timeit.cpp

| o * Utils/GenGroundTruth.cpp

| o * Utils/GenGroundTruth.hh

| o * Utils/GenSynthMatches.cpp

| o * Utils/GenSynthMatches.hh

| o * Utils/MatchDataBase.cpp

| o * Utils/MatchDataBase.hh

| o * Utils/Param.cpp

| o * Utils/Param.hh

| o * Utils/ParamTypes.cpp

| o * Utils/ParamTypes.hh

| o * Utils/PMatrix3DData.cpp

| o * Utils/PMatrix3DData.hh

| o * Utils/StatekeeperGL.hh

| o * Utils/ThreeDOut.cpp

| o * Utils/ThreeDOut.hh

| o * Utils/TriangleMesh.cpp

| o * Utils/TriangleMesh.hh

| o * Utils/Examples/ExampleGenSynthMatches.cpp

| o * Utils/Examples/ExampleGGTCube.cpp

| o * Utils/Examples/ExampleGGTPlane.cpp

| o * Utils/Examples/ExampleMatchDataBase.cpp

| o * Utils/Examples/ExampleShowFreeD.cpp

| o * Utils/Examples/ExampleTFT.cpp

| o * Utils/Examples/ExampleThreeDOutVRML.cpp

| o * Utils/Examples/ExampleTriangleMesh.cpp

| o * Utils/Examples/ExampleVRMLOutProjection.cpp

| o * Utils/Examples/ParamExample.cpp

| o * VideoSource/MDcam.cpp

| o * VideoSource/MDcam.hh

| o * VideoSource/ueyeclass.cpp

| o * VideoSource/ueyeclass.hh

| o * VideoSource/VideoServer.cpp

| o * VideoSource/VideoServer.hh

| o * VideoSource/VideoShMFeeder.cpp

| o * VideoSource/VideoShMFeeder.hh

| o * VideoSource/VideoSource_Base.cpp

| o * VideoSource/VideoSource_Base.hh

| o * VideoSource/VideoSource_DCAM.cpp

| o * VideoSource/VideoSource_DCAM.hh

| o * VideoSource/VideoSource_DCAM_CMU.cpp

| o * VideoSource/VideoSource_Disk.cpp

| o * VideoSource/VideoSource_Disk.hh

| o * VideoSource/VideoSource_Disk_FindFiles.h

| o * VideoSource/VideoSource_DiskPMD.cpp

| o * VideoSource/VideoSource_DiskPMD.hh

| o * VideoSource/VideoSource_DSHOW.cpp

| o * VideoSource/VideoSource_DSHOW.hh

| o * VideoSource/VideoSource_DV.cpp

| o * VideoSource/VideoSource_DV.hh

| o * VideoSource/VideoSource_DV2.cpp

| o * VideoSource/VideoSource_DV2.hh

| o * VideoSource/VideoSource_Net.cpp

| o * VideoSource/VideoSource_Net.hh

| o * VideoSource/VideoSource_Shm.cpp

| o * VideoSource/VideoSource_Shm.hh

| o * VideoSource/VideoSource_Stereo.cpp

| o * VideoSource/VideoSource_Stereo.hh

| o * VideoSource/VideoSource_uEye.cpp

| o * VideoSource/VideoSource_uEye.hh

| o * VideoSource/VideoSource_V4L.cpp

| o * VideoSource/VideoSource_V4L.hh

| o * VideoSource/Examples/ExampleCameraParameter.cpp

| o * VideoSource/Examples/ExampleDirectToDisk.cpp

| o * VideoSource/Examples/ExampleMDCamToShm.cpp

| o * VideoSource/Examples/ExampleMDCamToShmWx.cpp

| o * VideoSource/Examples/ExampleVideofeedShm.cpp

| o * VideoSource/Examples/ExampleVideoServer.cpp

| o * VideoSource/Examples/ExampleVideoSource_Net.cpp

| o * VideoSource/Examples/ExampleVideoSource_Shm.cpp

| o * VideoSource/Examples/Scan1394Bus.cpp

| o * VideoSource/Examples/showdcam.cpp

| o * VideoSource/Examples/showdcam16.cpp

| o * VideoSource/Examples/showdv2cam.cpp

| o * VideoSource/Examples/showdvcam.cpp

| o * VideoSource/Examples/showmdcam.cpp

| o * VideoSource/Examples/showv4lcam.cpp

| \ * VideoSource/Examples/TestMIPVideoSource_Disk.cpp

o + Class List

| o * _FilterBorders

| o * A

| o * BIAS::AffineTransf

| o * alist

| o * BIAS::AppData

| o * B

| o * BIAS::BackwardMapping< InputStorageType, OutputStorageType >

| o * Base

| o * BIAS::BaseException

| o * BIAS::BaseFactory< BaseClassType >

| o * BIAS::BaseFactory< BaseClassType >::MapEntry

| o * biasadd

| o * biasconvert

| o * BiasDetectUnvignetteApp

| o * biasdiff

| o * biasextract

| o * biasfilter

| o * biasinsert

| o * biasmerge

| o * biasprojection

| o * biassetprojection

| o * biassetuid

| o * biasshowepi

| o * BiasShowEpiApp

| o * biasshowsm

| o * biasview

| o * BiasViewApp

| o * biasviewwx

| o * Binomial

| o * BIAS::Binomial< InputStorageType, OutputStorageType >

| o * BIAS::Bresenham

| o * BIAS::BresenhamCircle

| o * BIAS::BresenhamCircleEighth

| o * BIAS::BresenhamCircleSlow

| o * BIAS::BSplineCurve

| o * C

| o * BIAS::Camera< StorageType >

| o * BIAS::CameraData

| o * BIAS::CameraParam

| o * CameraParameter_s

| o * BIAS::CameraViewController

| o * BIAS::CameraViewExternals

| o * BIAS::CameraViewFrustum

| o * BIAS::CameraViewInternals

| o * BIAS::CameraViewport

| o * BIAS::CanCompare< T1, T2 >

| o * BIAS::CanCopy< T1, T2 >

| o * BIAS::CanMultiply< T1, T2, T3 >

| o * BIAS::CCAStruct

| o * BIAS::Cholesky

| o * cilist

| o * cllist

| o * BIAS::ColorHarris

| o * BIAS::ColorHistogram< StorageType >

| o * BIAS::ColorMultiHistogram< StorageType >

| o * BIAS::ColorSegmentation

| o * BIAS::ColorSegmentationThreaded

| o * complex

| o * COmpressJpeg

| o * BIAS::Condensation

| o * BIAS::CondensHisto

| o * BIAS::CondensImg

| o * BIAS::Conic2D

| o * TNT::const_Region1D< Array1D >

| o * TNT::const_Region2D< Array2D >

| o * BIAS::Contour

| o * BIAS::Convolution< InputStorageType, OutputStorageType >

| o * BIAS::CoordinateTransform3D

| o * BIAS::CornerDetectorBase< StorageType >

| o * BIAS::CornerDetectorFoerstner< StorageType, CalculationType >

| o * BIAS::CornerDetectorGradient< StorageType, CalculationType >

| o * BIAS::CornerDetectorHarris< StorageType, CalculationType >

| o * BIAS::CornerDetectorKLT< StorageType, CalculationType >

| o * BIAS::CornerDetectorSusan< StorageType >

| o * BIAS::CornerMatcher

| o * BIAS::cornerstruct

| o * BIAS::CovMatrix3x3

| o * BIAS::CPDiscreteParam

| o * BIAS::CPDiscreteParam

| o * BIAS::CPDiscreteParam

| o * BIAS::CScommBase

| o * BIAS::CScommClient

| o * BIAS::CScommData

| o * BIAS::CScommMsg

| o * BIAS::CScommServer

| o * BIAS::CSCommWithClientNr

| o * CuEye

| o * CutoutFrame

| o * BIAS::CylinderMapping

| o * /home/jw/source/BIAS/Base/Debug/Debug.hh

| o * BIAS::DC_GPS

| o * BIAS::DC_inertial

| o * BIAS::DC_ptu

| o * BIAS::Debug

| o * BIAS::DeInterlace< InputStorageType, OutputStorageType >

| o * BIAS::DerivedFrom< T, B >

| o * BIAS::Dilation< InputStorageType, OutputStorageType >

| o * BIAS::Distribution

| o * BIAS::DistTransform< InputStorageType, OutputStorageType >

| o * BIAS::dndFileTarget

| o * doublecomplex

| o * BIAS::doubleRANSAC

| o * DragAndDropTarget

| o * BIAS::DrawTextGL

| o * BIAS::EightWaySymmetry< T >

| o * BIAS::EightWaySymmetryHomg

| o * BIAS::Ellipsoid3DData

| o * BIAS::EMatrix

| o * BIAS::EMatrixBase

| o * BIAS::EpipolarLine

| o * BIAS::Erosion< InputStorageType, OutputStorageType >

| o * BIAS::EuclideanTransf3D

| o * BIAS::ExampleDebug

| o * ExampleGLSharedApp

| o * ExampleImageCanvasGLBaseApp

| o * ExampleOpenGLCanvasApp

| o * BIAS::ExifTag

| o * BIAS::Feat

| o * BIAS::FFT

| o * BIAS::FFT2D< InputStorageType, OutputStorageType >

| o * BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >

| o * BIAS::FilterBase< InputStorageType, OutputStorageType >

| o * BIAS::FilterMask

| o * BIAS::FilterNTo2N< InputStorageType, OutputStorageType >

| o * BIAS::FilterNTo3N< InputStorageType, OutputStorageType >

| o * BIAS::FilterNToN< InputStorageType, OutputStorageType >

| o * FindFilesInPath

| o * BIAS::FMatrix

| o * BIAS::FMatrixBase

| o * BIAS::FMatrixEstimation

| o * TNT::Fortran_Matrix< T >

| o * TNT::Fortran_Sparse_Col_Matrix< T >

| o * TNT::Fortran_Sparse_Vector< T >

| o * FromBase

| o * BIAS::Gauss< InputStorageType, OutputStorageType >

| o * BIAS::GaussHelmert

| o * BIAS::GenGroundTruth

| o * BIAS::GenSynthMatches

| o * BIAS::GeometryGL

| o * BIAS::GradientGauss< InputStorageType, OutputStorageType >

| o * BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >

| o * BIAS::GradientSimple< InputStorageType, OutputStorageType >

| o * BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >

| o * BIAS::GuiBase

| o * BIAS::GuiEnhanced

| o * BIAS::GuiGTK

| o * BIAS::GuiWX

| o * BIAS::Histogram

| o * BIAS::Histogram2D

| o * BIAS::HMatrix

| o * BIAS::HMatrixBase

| o * BIAS::HMatrixEstimation

| o * BIAS::HomgLine2D

| o * HomgLine2D

| o * BIAS::HomgLine3D

| o * BIAS::HomgPlane3D

| o * BIAS::HomgPoint1D

| o * BIAS::HomgPoint2D

| o * BIAS::HomgPoint2DCov

| o * BIAS::HomgPoint3D

| o * BIAS::HomgPoint3DCov

| o * BIAS::HomographyMapping< InputStorageType, OutputStorageType >

| o * ICECallBackInterface

| o * BIAS::ICECallbackInterface

| o * icilist

| o * BIAS::Image< StorageType >

| o * BIAS::Image3DData

| o * BIAS::ImageAttributes

| o * BIAS::ImageBase

| o * BIAS::ImageCanvas

| o * BIAS::ImageCanvasEnhanced

| o * ImageCanvasGLBase

| o * BIAS::ImageCanvasGLBase

| o * BIAS::ImageConvert

| o * BIAS::ImageConvertThreaded

| o * BIAS::ImageDraw< StorageType >

| o * BIAS::ImageIO

| o * BIAS::ImgObjGL

| o * TNT::Index1D

| o * BIAS::IndexedFaceSet

| o * inlist

| o * BIAS::IntegralHistogram

| o * BIAS::Interpolator

| o * BIAS::ItemAndWidget

| o * BIAS::JpegHandler

| o * BIAS::Kalman

| o * BIAS::KMatrix

| o * BIAS::Label

| o * BIAS::LeastSquaresBase

| o * BIAS::LeastSquaresLapack

| o * BIAS::LeastSquaresSVD

| o * BIAS::Line3DData

| o * BIAS::LinearRegionDetector< StorageType, CalculationType >

| o * BIAS::LogFacility

| o * BIAS::LogPolarMapping< InputStorageType, OutputStorageType >

| o * TNT::LowerTriangularView< MaTRiX >

| o * MainFrame

| o * mainpage

| o * BIAS::MatchDataBase

| o * BIAS::MatlabTBUndistortion

| o * BIAS::MatlabTBUndistortion::LuTEntry

| o * BIAS::Matrix< T >

| o * TNT::Matrix< T >

| o * BIAS::Matrix2x2< T >

| o * BIAS::Matrix3x3< T >

| o * BIAS::Matrix3x4< T >

| o * BIAS::Matrix4x4< T >

| o * BIAS::MatrixPanel

| o * BIAS::MDcam

| o * BIAS::Mean< InputStorageType, OutputStorageType >

| o * BIAS::Median< InputStorageType, OutputStorageType >

| o * BIAS::Median1D< DataType >

| o * BIAS::MetaData

| o * BIAS::Morphology< InputStorageType, OutputStorageType >

| o * BIAS::MSAC< SolutionType >

| o * Multitype

| o * my_error_mgr

| o * MyAlgorithm

| o * MyApp

| o * MyFactory

| o * MyFrame

| o * MyGLCanvas

| o * MyGLCanvas2

| o * BIAS::MySampleGrabberCB

| o * MyTemplate< T >

| o * MyTestClass

| o * myTestClass

| o * MyUnscentedTransform

| o * Namelist

| o * NonBase

| o * BIAS::Normalization

| o * olist

| o * BIAS::OpenGLCanvas

| o * BIAS::OpenGLCanvasBase

| o * option

| o * BIAS::Param

| o * BIAS::ParamCallbackInterface

| o * BIAS::Parametrization

| o * BIAS::ParamGUI

| o * BIAS::ParamGUIDialog

| o * BIAS::ParamGUIPanel

| o * BIAS::ParamTypeBase

| o * BIAS::ParamTypeBool

| o * BIAS::ParamTypeDouble

| o * BIAS::ParamTypeEnum

| o * BIAS::ParamTypeInt

| o * BIAS::ParamTypeString

| o * BIAS::ParamTypeVecDbl

| o * BIAS::ParamTypeVecInt

| o * PlainImageCanvas

| o * BIAS::PlaneRANSAC

| o * BIAS::PlueckerMatrix

| o * BIAS::PMatrix

| o * BIAS::PMatrix3DData

| o * BIAS::PMatrixBase

| o * BIAS::PMatrixEstimation

| o * BIAS::PMatrixLinear

| o * BIAS::PMDImageIO

| o * BIAS::PMDImageMetaData

| o * BIAS::PMDImageProc

| o * BIAS::Point3DData

| o * BIAS::Polynom

| o * BIAS::PolynomialSolve

| o * BIAS::Pose

| o * BIAS::PoseParametrization

| o * BIAS::PoseParametrizationCovariance

| o * BIAS::Position

| o * BIAS::Projection

| o * BIAS::Projection3DData

| o * BIAS::ProjectionDialog

| o * BIAS::ProjectionGUI

| o * BIAS::ProjectionMapping< InputStorageType, OutputStorageType >

| o * BIAS::ProjectionParametersBase

| o * BIAS::ProjectionParametersIO

| o * BIAS::ProjectionParametersPerspective

| o * BIAS::ProjectionParametersProjective

| o * BIAS::ProjectionParametersSpherical

| o * BIAS::ProjectionParametersZoom

| o * BIAS::PyramidImage< StorageType >

| o * BIAS::Quadric3D

| o * BIAS::Quaternion< QUAT_TYPE >

| o * BIAS::Random

| o * BIAS::RANSAC< SolutionType >

| o * BIAS::RANSACPreKnowledge< SolutionType >

| o * BIAS::RedirectStreams

| o * TNT::Region1D< Array1D >

| o * TNT::Region2D< Array2D >

| o * BIAS::RegionMatcher

| o * BIAS::RenderModeGL

| o * BIAS::Rescale< InputStorageType, OutputStorageType >

| o * RGBAd

| o * RGBAf

| o * RGBAuc

| o * RGBd

| o * RGBf

| o * RGBuc

| o * BIAS::RigParameter

| o * BIAS::RMatrix

| o * BIAS::RMatrixBase

| o * BIAS::ROI

| o * BIAS::ScaledImageCanvas

| o * BIAS::ScanLine

| o * BIAS::ScanLine2

| o * SegmentationData

| o * BIAS::SensorData

| o * BIAS::SettingsGL

| o * BIAS::SimilarityTransform

| o * SimilarityTransformation3D

| o * SimilarityTransformation3D

| o * BIAS::SphericalUndistortion

| o * BIAS::SphericalUndistortion::LuTEntry

| o * BIAS::SphericalUndistortion::LuTpxpyEntry

| o * BIAS::StatekeeperGL

| o * BIAS::StereoRedGreen

| o * TNT::stopwatch

| o * BIAS::StructureTensor< InputStorageType, OutputStorageType >

| o * BIAS::SVD

| o * BIAS::SVD3x3

| o * TagInfo

| o * tagTHREADNAME_INFO

| o * BIAS::Tensor3D< T >

| o * BIAS::Tensor3D3x3x3< T >

| o * BIAS::TFTensorEstimation

| o * ThreadArg__

| o * BIAS::ThreeDOut

| o * BIAS::ThreeDOutParameters

| o * BIAS::TimeMeasure

| o * BIAS::TimeMeasurement

| o * TIntersect

| o * BIAS::TopFrame

| o * BIAS::Tracker< StorageType, CalculationType >

| o * BIAS::TrackerBase< StorageType >

| o * BIAS::TrackerBaseAffine< StorageType >

| o * BIAS::TrackerBaseInterface< StorageType >

| o * BIAS::TrackerBaseSimple< StorageType >

| o * BIAS::TrackerBaseWeighted< StorageType >

| o * BIAS::TrackerSynth< StorageType, CalculationType >

| o * TNT::Transpose_View< Array2D >

| o * BIAS::TriangleMesh

| o * BIAS::Triangulation

| o * BIAS::TrifocalTensor

| o * BIAS::TrifocalTensorBase

| o * BIAS::UndistortionMapping< InputStorageType, OutputStorageType >

| o * TNT::UnitLowerTriangularView< MaTRiX >

| o * TNT::UnitUpperTriangularView< MaTRiX >

| o * BIAS::UnscentedTransform

| o * BIAS::UnVignette

| o * TNT::UpperTriangularView< MaTRiX >

| o * BIAS::UUID

| o * BIAS::UUIDsortAscending

| o * Vardesc

| o * vector

| o * BIAS::Vector< T >

| o * TNT::Vector< T >

| o * BIAS::Vector2< T >

| o * BIAS::Vector3< T >

| o * BIAS::Vector4< T >

| o * TNT::Vector_Adaptor< BBVec >

| o * BIAS::VectorPanel

| o * BIAS::VideoServer

| o * BIAS::VideoShMFeeder

| o * BIAS::VideoSource

| o * BIAS::VideoSource_DCAM

| o * BIAS::VideoSource_Disk

| o * BIAS::VideoSource_DiskPMD

| o * BIAS::VideoSource_DSHOW

| o * MIP::VideoSource_DV

| o * MIP::VideoSource_DV2

| o * BIAS::VideoSource_Net

| o * BIAS::VideoSource_Shm

| o * BIAS::VideoSource_Shm::ShmImageHeader

| o * BIAS::VideoSource_Stereo

| o * VideoSource_UEYE

| o * BIAS::VideoSource_uEye

| o * BIAS::VideoSource_V4L

| o * BIAS::VideoStream

| o * BIAS::VideoStream::VSHeader

| o * BIAS::VideoStream::VSImageHeader

| o * VideSource_DiskPMD

| o * VideSource_Stereo

| o * BIAS::WeightedSigmaPoint

| o * BIAS::WrapBias2Ipl

| o * BIAS::WxMainThread

| o * wxScrolledWindow

| o * BIAS::WxToAsciiArray

| o * wxTopLevelWindow

| o * wxTopLevelWindowNative

| o * wxWindow

| o * BIAS::XMLBase

| o * BIAS::XMLIO

| o * xvimage

| o * BIAS::ZoomFrame

| \ * BIAS::ZoomImageCanvas

o + Class Hierarchy

| o * _FilterBorders

| o * alist

| o * BIAS::AppData

| o + BIAS::BackwardMapping< InputStorageType, OutputStorageType >

| | o * BIAS::HomographyMapping< InputStorageType, OutputStorageType >

| | o * BIAS::LogPolarMapping< InputStorageType, OutputStorageType >

| | o * BIAS::ProjectionMapping< InputStorageType, OutputStorageType >

| | \ * BIAS::UndistortionMapping< InputStorageType, OutputStorageType >

| o + BIAS::BackwardMapping< unsigned char, unsigned char >

| | \ * BIAS::CylinderMapping

| o + Base

| | o * A

| | o * B

| | o * C

| | \ * FromBase

| o * BIAS::BaseException

| o * BIAS::BaseFactory< BaseClassType >::MapEntry

| o * biasadd

| o * biasconvert

| o * BiasDetectUnvignetteApp

| o * biasdiff

| o * biasextract

| o * biasfilter

| o * biasinsert

| o * biasmerge

| o * biasprojection

| o * biassetprojection

| o * biassetuid

| o * biasshowepi

| o * BiasShowEpiApp

| o * biasshowsm

| o * biasview

| o * BiasViewApp

| o * biasviewwx

| o * Binomial

| o + BIAS::Bresenham

| | o * BIAS::ScanLine

| | \ * BIAS::ScanLine2

| o * BIAS::BresenhamCircle

| o * BIAS::BresenhamCircleEighth

| o * BIAS::BresenhamCircleSlow

| o * BIAS::CameraData

| o + BIAS::CameraParam

| | o * BIAS::MatlabTBUndistortion

| | \ * BIAS::SphericalUndistortion

| o * CameraParameter_s

| o * BIAS::CameraViewController

| o * BIAS::CameraViewExternals

| o * BIAS::CameraViewFrustum

| o * BIAS::CameraViewInternals

| o * BIAS::CameraViewport

| o * BIAS::CanCompare< T1, T2 >

| o * BIAS::CanCopy< T1, T2 >

| o * BIAS::CanMultiply< T1, T2, T3 >

| o * BIAS::CCAStruct

| o * BIAS::Cholesky

| o * cilist

| o * cllist

| o * BIAS::ColorHistogram< StorageType >

| o * BIAS::ColorMultiHistogram< StorageType >

| o * BIAS::ColorSegmentationThreaded

| o * complex

| o * COmpressJpeg

| o * TNT::const_Region1D< Array1D >

| o * TNT::const_Region2D< Array2D >

| o * BIAS::Contour

| o * BIAS::cornerstruct

| o * BIAS::CPDiscreteParam

| o * BIAS::CPDiscreteParam

| o * BIAS::CPDiscreteParam

| o * BIAS::CScommData

| o * BIAS::CScommMsg

| o * BIAS::CSCommWithClientNr

| o * CuEye

| o * CutoutFrame

| o * /home/jw/source/BIAS/Base/Debug/Debug.hh

| o + BIAS::Debug

| | o * BIAS::BaseFactory< BaseClassType >

| | o + BIAS::BaseFactory< Base >

| | | \ * MyFactory

| | o * BIAS::BSplineCurve

| | o * BIAS::ColorHarris

| | o * BIAS::ColorSegmentation

| | o + BIAS::Condensation

| | | o * BIAS::CondensHisto

| | | \ * BIAS::CondensImg

| | o * BIAS::Conic2D

| | o + BIAS::CornerDetectorBase< StorageType >

| | | o + BIAS::CornerDetectorGradient< StorageType, CalculationType >

| | | | o * BIAS::CornerDetectorFoerstner< StorageType, CalculationType >

| | | | o * BIAS::CornerDetectorHarris< StorageType, CalculationType >

| | | | o * BIAS::CornerDetectorKLT< StorageType, CalculationType >

| | | | \ * BIAS::LinearRegionDetector< StorageType, CalculationType >

| | | \ * BIAS::CornerDetectorSusan< StorageType >

| | o + BIAS::CScommBase

| | | o * BIAS::CScommClient

| | | \ * BIAS::CScommServer

| | o * BIAS::DC_GPS

| | o * BIAS::DC_inertial

| | o * BIAS::DC_ptu

| | o * BIAS::EpipolarLine

| | o * BIAS::ExampleDebug

| | o * BIAS::FFT

| | o + BIAS::FilterBase< InputStorageType, OutputStorageType >

| | | o * BIAS::DistTransform< InputStorageType, OutputStorageType >

| | | o + BIAS::FilterNTo2N< InputStorageType, OutputStorageType >

| | | | o + BIAS::GradientGauss< InputStorageType, OutputStorageType >

| | | | | \ * BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >

| | | | o * BIAS::GradientSimple< InputStorageType, OutputStorageType >

| | | | \ * BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >

| | | o + BIAS::FilterNTo3N< InputStorageType, OutputStorageType >

| | | | \ * BIAS::StructureTensor< InputStorageType, OutputStorageType >

| | | o + BIAS::FilterNToN< InputStorageType, OutputStorageType >

| | | | o + BIAS::Convolution< InputStorageType, OutputStorageType >

| | | | | o * BIAS::Binomial< InputStorageType, OutputStorageType >

| | | | | o * BIAS::DeInterlace< InputStorageType, OutputStorageType >

| | | | | o * BIAS::Gauss< InputStorageType, OutputStorageType >

| | | | | \ * BIAS::Mean< InputStorageType, OutputStorageType >

| | | | \ * BIAS::Median< InputStorageType, OutputStorageType >

| | | o + BIAS::Morphology< InputStorageType, OutputStorageType >

| | | | o * BIAS::Dilation< InputStorageType, OutputStorageType >

| | | | \ * BIAS::Erosion< InputStorageType, OutputStorageType >

| | | \ * BIAS::Rescale< InputStorageType, OutputStorageType >

| | o + BIAS::FilterBase< unsigned char, unsigned char >

| | | o + BIAS::FilterNToN< unsigned char, unsigned char >

| | | | \ + BIAS::Convolution< unsigned char, unsigned char >

| | | |   o * BIAS::Binomial< unsigned char, unsigned char >

| | | |   o * BIAS::Gauss< unsigned char, unsigned char >

| | | |   \ * BIAS::Mean< unsigned char, unsigned char >

| | | o * BIAS::Label

| | | \ * BIAS::Rescale< unsigned char, unsigned char >

| | o * BIAS::FilterMask

| | o + BIAS::FMatrix

| | | \ * BIAS::EMatrix

| | o * BIAS::FMatrixEstimation

| | o * BIAS::GaussHelmert

| | o + BIAS::GuiBase

| | | o + BIAS::GuiGTK

| | | | \ * BIAS::GuiEnhanced

| | | \ * BIAS::GuiWX

| | o * BIAS::ImageAttributes

| | o + BIAS::ImageBase

| | | o + BIAS::Image< StorageType >

| | | | \ * BIAS::Camera< StorageType >

| | | o * BIAS::Image< CONV_FLOAT >

| | | o * BIAS::Image< CONV_INT >

| | | o * BIAS::Image< float >

| | | \ + BIAS::Image< unsigned char >

| | |   o * BIAS::Histogram

| | |   \ * BIAS::Histogram2D

| | o + BIAS::ImageCanvas

| | | o * BIAS::ImageCanvasEnhanced

| | | \ * PlainImageCanvas

| | o + BIAS::ImageConvert

| | | \ * BIAS::ImageConvertThreaded

| | o * BIAS::Interpolator

| | o * BIAS::Kalman

| | o + BIAS::LeastSquaresBase

| | | o * BIAS::LeastSquaresLapack

| | | \ * BIAS::LeastSquaresSVD

| | o + BIAS::MatchDataBase

| | | \ * BIAS::GenSynthMatches

| | o * BIAS::MDcam

| | o * BIAS::Median1D< DataType >

| | o * BIAS::MSAC< SolutionType >

| | o + BIAS::Param

| | | \ * BIAS::ParamGUI

| | o * BIAS::PMatrixEstimation

| | o * BIAS::PMatrixLinear

| | o * BIAS::Polynom

| | o * BIAS::PolynomialSolve

| | o * BIAS::PyramidImage< StorageType >

| | o * BIAS::PyramidImage< unsigned char >

| | o * BIAS::Random

| | o + BIAS::RANSAC< SolutionType >

| | | \ * BIAS::RANSACPreKnowledge< SolutionType >

| | o + BIAS::RANSAC< double >

| | | \ * BIAS::doubleRANSAC

| | o + BIAS::RANSAC< HomgPlane3D >

| | | \ * BIAS::PlaneRANSAC

| | o + BIAS::RegionMatcher

| | | \ * BIAS::CornerMatcher

| | o * BIAS::ROI

| | o * BIAS::SimilarityTransform

| | o * BIAS::SphericalUndistortion

| | o + BIAS::SVD

| | | \ * BIAS::SVD3x3

| | o * BIAS::ThreeDOut

| | o + BIAS::Tracker< StorageType, CalculationType >

| | | \ * BIAS::TrackerSynth< StorageType, CalculationType >

| | o * BIAS::TrackerBase< StorageType >

| | o + BIAS::TrackerBaseInterface< StorageType >

| | | o * BIAS::TrackerBaseAffine< StorageType >

| | | o * BIAS::TrackerBaseSimple< StorageType >

| | | \ * BIAS::TrackerBaseWeighted< StorageType >

| | o * BIAS::Triangulation

| | o + BIAS::UnscentedTransform

| | | o + BIAS::ProjectionParametersBase

| | | | o * BIAS::ProjectionParametersPerspective

| | | | o * BIAS::ProjectionParametersProjective

| | | | o * BIAS::ProjectionParametersSpherical

| | | | \ * BIAS::ProjectionParametersZoom

| | | \ * MyUnscentedTransform

| | o * BIAS::UUID

| | o * BIAS::VideoServer

| | o * BIAS::VideoShMFeeder

| | o + BIAS::VideoSource

| | | o * BIAS::VideoSource_DCAM

| | | o + BIAS::VideoSource_Disk

| | | | \ * BIAS::VideoSource_DiskPMD

| | | o * BIAS::VideoSource_DSHOW

| | | o * BIAS::VideoSource_Net

| | | o * BIAS::VideoSource_Shm

| | | o * BIAS::VideoSource_Stereo

| | | o * BIAS::VideoSource_uEye

| | | \ * BIAS::VideoSource_V4L

| | o * BIAS::XMLIO

| | \ * myTestClass

| o * BIAS::DerivedFrom< T, B >

| o + BIAS::DerivedFrom< T, Base >

| | \ * MyTemplate< T >

| o * BIAS::Distribution

| o * BIAS::dndFileTarget

| o * doublecomplex

| o * DragAndDropTarget

| o * BIAS::DrawTextGL

| o * BIAS::EightWaySymmetry< T >

| o + BIAS::EightWaySymmetry< double >

| | \ * BIAS::EightWaySymmetryHomg

| o * BIAS::Ellipsoid3DData

| o * ExampleGLSharedApp

| o * ExampleImageCanvasGLBaseApp

| o * ExampleOpenGLCanvasApp

| o * BIAS::ExifTag

| o * BIAS::Feat

| o + BIAS::FFT2D< InputStorageType, OutputStorageType >

| | \ * BIAS::FFT2D_Tiles< InputStorageType, OutputStorageType >

| o * FindFilesInPath

| o * TNT::Fortran_Matrix< T >

| o * TNT::Fortran_Sparse_Col_Matrix< T >

| o * TNT::Fortran_Sparse_Vector< T >

| o * BIAS::GenGroundTruth

| o * BIAS::GeometryGL

| o * BIAS::HMatrixEstimation

| o * HomgLine2D

| o * BIAS::HomgLine3D

| o * ICECallBackInterface

| o + BIAS::ICECallbackInterface

| | \ * MyFrame

| o * icilist

| o * BIAS::Image3DData

| o * ImageCanvasGLBase

| o * BIAS::ImageDraw< StorageType >

| o * BIAS::ImageIO

| o * BIAS::ImgObjGL

| o * TNT::Index1D

| o * BIAS::IndexedFaceSet

| o * inlist

| o * BIAS::IntegralHistogram

| o * BIAS::ItemAndWidget

| o * BIAS::JpegHandler

| o * BIAS::Line3DData

| o * BIAS::LogFacility

| o * TNT::LowerTriangularView< MaTRiX >

| o * MainFrame

| o * mainpage

| o * BIAS::MatlabTBUndistortion::LuTEntry

| o + TNT::Matrix< T >

| | o + BIAS::Matrix< T >

| | | o * BIAS::Matrix2x2< T >

| | | o * BIAS::Matrix3x3< T >

| | | o * BIAS::Matrix3x4< T >

| | | \ * BIAS::Matrix4x4< T >

| | o + BIAS::Matrix< CONIC2D_TYPE >

| | | \ + BIAS::Matrix3x3< CONIC2D_TYPE >

| | |   \ * BIAS::Conic2D

| | o + BIAS::Matrix< COVMATRIX3X3_TYPE >

| | | \ + BIAS::Matrix3x3< COVMATRIX3X3_TYPE >

| | |   \ * BIAS::CovMatrix3x3

| | o + BIAS::Matrix< double >

| | | o + BIAS::Matrix3x3< double >

| | | | \ * BIAS::HomgPoint2DCov

| | | o + BIAS::Matrix3x4< double >

| | | | \ * BIAS::AffineTransf

| | | \ + BIAS::Matrix4x4< double >

| | |   o + BIAS::CoordinateTransform3D

| | |   | \ * BIAS::Pose

| | |   o * BIAS::EuclideanTransf3D

| | |   \ * BIAS::HomgPoint3DCov

| | o + BIAS::Matrix< EMATRIX_TYPE >

| | | \ + BIAS::Matrix3x3< EMATRIX_TYPE >

| | |   \ * BIAS::EMatrixBase

| | o + BIAS::Matrix< FMATRIX_TYPE >

| | | \ + BIAS::Matrix3x3< FMATRIX_TYPE >

| | |   \ + BIAS::FMatrixBase

| | |     \ * BIAS::FMatrix

| | o + BIAS::Matrix< HMATRIX_TYPE >

| | | \ + BIAS::Matrix3x3< HMATRIX_TYPE >

| | |   \ + BIAS::HMatrixBase

| | |     \ * BIAS::HMatrix

| | o + BIAS::Matrix< KMATRIX_TYPE >

| | | \ + BIAS::Matrix3x3< KMATRIX_TYPE >

| | |   \ * BIAS::KMatrix

| | o + BIAS::Matrix< PLUECKERMATRIX_TYPE >

| | | \ + BIAS::Matrix4x4< PLUECKERMATRIX_TYPE >

| | |   \ * BIAS::PlueckerMatrix

| | o + BIAS::Matrix< PMATRIX_TYPE >

| | | \ + BIAS::Matrix3x4< PMATRIX_TYPE >

| | |   \ + BIAS::PMatrixBase

| | |     \ * BIAS::PMatrix

| | o + BIAS::Matrix< POSECOVARIANCE_TYPE >

| | | \ * BIAS::PoseParametrizationCovariance

| | o + BIAS::Matrix< QUADRIC3D_TYPE >

| | | \ + BIAS::Matrix4x4< QUADRIC3D_TYPE >

| | |   \ * BIAS::Quadric3D

| | \ + BIAS::Matrix< ROTATION_MATRIX_TYPE >

| |   \ + BIAS::Matrix3x3< ROTATION_MATRIX_TYPE >

| |     \ + BIAS::RMatrixBase

| |       \ * BIAS::RMatrix

| o * TNT::Matrix< CONIC2D_TYPE >

| o * TNT::Matrix< COVMATRIX3X3_TYPE >

| o * TNT::Matrix< double >

| o * TNT::Matrix< EMATRIX_TYPE >

| o * TNT::Matrix< FMATRIX_TYPE >

| o * TNT::Matrix< HMATRIX_TYPE >

| o * TNT::Matrix< KMATRIX_TYPE >

| o * TNT::Matrix< PLUECKERMATRIX_TYPE >

| o * TNT::Matrix< PMATRIX_TYPE >

| o * TNT::Matrix< POSECOVARIANCE_TYPE >

| o * TNT::Matrix< QUADRIC3D_TYPE >

| o * TNT::Matrix< ROTATION_MATRIX_TYPE >

| o * BIAS::MatrixPanel

| o * BIAS::MetaData

| o * Multitype

| o * my_error_mgr

| o * MyApp

| o * BIAS::MySampleGrabberCB

| o * MyTestClass

| o * Namelist

| o * NonBase

| o * BIAS::Normalization

| o * olist

| o + BIAS::OpenGLCanvasBase

| | \ + BIAS::OpenGLCanvas

| |   o * BIAS::ImageCanvasGLBase

| |   o * MyGLCanvas

| |   o * MyGLCanvas

| |   \ * MyGLCanvas2

| o * option

| o + BIAS::ParamCallbackInterface

| | o * BIAS::CornerDetectorBase< StorageType >

| | o * MyAlgorithm

| | \ * MyAlgorithm

| o * BIAS::Parametrization

| o * BIAS::ParamGUIDialog

| o * BIAS::ParamGUIPanel

| o + BIAS::ParamTypeBase

| | o * BIAS::ParamTypeBool

| | o * BIAS::ParamTypeDouble

| | o * BIAS::ParamTypeEnum

| | o * BIAS::ParamTypeInt

| | o * BIAS::ParamTypeString

| | o * BIAS::ParamTypeVecDbl

| | \ * BIAS::ParamTypeVecInt

| o * BIAS::PMatrix3DData

| o * BIAS::PMDImageIO

| o * BIAS::PMDImageMetaData

| o * BIAS::PMDImageProc

| o * BIAS::Point3DData

| o * BIAS::PoseParametrization

| o * BIAS::Position

| o * BIAS::Projection3DData

| o * BIAS::ProjectionDialog

| o * BIAS::ProjectionGUI

| o * BIAS::ProjectionParametersIO

| o * BIAS::RedirectStreams

| o * TNT::Region1D< Array1D >

| o * TNT::Region2D< Array2D >

| o * BIAS::RenderModeGL

| o * RGBAd

| o * RGBAf

| o * RGBAuc

| o * RGBd

| o * RGBf

| o * RGBuc

| o * BIAS::RigParameter

| o * BIAS::ScaledImageCanvas

| o * SegmentationData

| o * BIAS::SensorData

| o * BIAS::SettingsGL

| o * SimilarityTransformation3D

| o * SimilarityTransformation3D

| o * BIAS::SphericalUndistortion::LuTEntry

| o * BIAS::SphericalUndistortion::LuTpxpyEntry

| o * BIAS::StatekeeperGL

| o * BIAS::StereoRedGreen

| o * TNT::stopwatch

| o * TagInfo

| o * tagTHREADNAME_INFO

| o + BIAS::Tensor3D< T >

| | \ * BIAS::Tensor3D3x3x3< T >

| o + BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >

| | \ + BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >

| |   \ + BIAS::TrifocalTensorBase

| |     \ * BIAS::TrifocalTensor

| o * BIAS::TFTensorEstimation

| o * ThreadArg__

| o * BIAS::ThreeDOutParameters

| o * BIAS::TimeMeasure

| o * BIAS::TimeMeasurement

| o * TIntersect

| o * BIAS::TopFrame

| o * TNT::Transpose_View< Array2D >

| o * BIAS::TriangleMesh

| o * TNT::UnitLowerTriangularView< MaTRiX >

| o * TNT::UnitUpperTriangularView< MaTRiX >

| o * BIAS::UnVignette

| o * TNT::UpperTriangularView< MaTRiX >

| o * BIAS::UUIDsortAscending

| o * Vardesc

| o + vector

| | \ * BIAS::PyramidImage< unsigned char >

| o + TNT::Vector< T >

| | \ * BIAS::Vector< T >

| o * BIAS::Vector2< T >

| o + BIAS::Vector2< HOMGPOINT1D_TYPE >

| | \ * BIAS::HomgPoint1D

| o * BIAS::Vector3< T >

| o + BIAS::Vector3< HOMGLINE2D_TYPE >

| | \ + BIAS::HomgLine2D

| |   \ * BIAS::EpipolarLine

| o + BIAS::Vector3< HOMGPOINT2D_TYPE >

| | \ * BIAS::HomgPoint2D

| o * BIAS::Vector4< T >

| o + BIAS::Vector4< HOMGPLANE3D_TYPE >

| | \ * BIAS::HomgPlane3D

| o + BIAS::Vector4< HOMGPOINT3D_TYPE >

| | \ * BIAS::HomgPoint3D

| o + BIAS::Vector4< QUAT_TYPE >

| | \ * BIAS::Quaternion< QUAT_TYPE >

| o * TNT::Vector_Adaptor< BBVec >

| o * BIAS::VectorPanel

| o * MIP::VideoSource_DV

| o * MIP::VideoSource_DV2

| o * BIAS::VideoSource_Shm::ShmImageHeader

| o * VideoSource_UEYE

| o * BIAS::VideoStream

| o * BIAS::VideoStream::VSHeader

| o * BIAS::VideoStream::VSImageHeader

| o * VideSource_DiskPMD

| o * VideSource_Stereo

| o * BIAS::WeightedSigmaPoint

| o * BIAS::WrapBias2Ipl

| o * BIAS::WxMainThread

| o + wxScrolledWindow

| | \ * BIAS::ImageCanvas

| o * BIAS::WxToAsciiArray

| o * wxTopLevelWindow

| o * wxTopLevelWindowNative

| o * wxWindow

| o + BIAS::XMLBase

| | o * BIAS::PMatrix

| | o * BIAS::Projection

| | o * BIAS::ProjectionParametersBase

| | \ * myTestClass

| o * xvimage

| o * BIAS::ZoomFrame

| \ * BIAS::ZoomImageCanvas

o * Class Members

o + Namespace List

| o * BIAS

| o * Imath

| o * Imf

| o * MIP

| o * std

| \ * TNT

o + Modules

| o + Image

| | o * Image and Image Base

| | o * ImageIO and Conversions

| | o * Drawing

| | \ * PyramidImage, Camera, Histogram

| o + Mathematics

| | o * Matrix and Vector Classes

| | o * Algorithms

| | o * Geometry and Transformations

| | \ * Estimation

| o * Utilities

| o + Image Algorithms

| | o * Image Filters and Image Transformations

| | o * Algorithms for Correspondence Problems

| | o * Feature Detectors

| | \ * Feature Tracker

| o * Graphical User Interfaces

| o * Tools

| \ * Mathalgo

o + Directories

| o + Base

| | o + Common

| | | \ + Examples

| | o + Debug

| | | \ + Examples

| | o + Geometry

| | | \ + Examples

| | o + Image

| | | \ + Examples

| | \ + Math

| |   o + Examples

| |   \ + tnt

| o + build

| | \ + BIAS

| o + FeatureDetector

| | \ + Examples

| o + Filter

| | \ + Examples

| o + Geometry

| | \ + Examples

| o + Gui

| | \ + Examples

| o + Image

| | \ + Examples

| o + Matcher2D

| | \ + Examples

| o + MathAlgo

| | o + Examples

| | \ + minpack

| o + NetworkComm

| | \ + Examples

| o + StateEstimator

| | \ + Examples

| o + Tests

| o + Tools

| o + Utils

| | \ + Examples

| \ + VideoSource

|   \ + Examples

o + Examples

| o * convertRAW.cpp

| o * ExampleFileNames.cpp

| o * ExampleGLShared.cpp

| o * ExampleImageAttributes.cpp

| o * ExampleImageLoad.cpp

| o * ExampleImageMagickIO.cpp

| o * ExampleIpl.cpp

| o * ExampleIplImageDisplay.cpp

| o * ExampleIplImageDraw.cpp

| o * ExampleIplWrapOpenCV.cpp

| o * ExampleLoadBan.cpp

| o * ExampleLoadBOG.cpp

| o * ExampleOpenGLCanvas.cpp

| o * ExampleOpenGLCanvasBase.cpp

| o * ExampleTracker2

| o * ExampleTracker3

| o * ExampleTrackerBase

| o * mip2viff.cpp

| o * timeit.cpp

| \ * viff2mip.cpp

o * File Members

o * Namespace Members

o + Related Pages

| o * Building BIAS, required/optional packages

| o * History / CHANGELOG

| o * Concepts

| o * Conventions

| o * Filter, Transformations and 2D-2D operations

| o * Geometry / Transformations

| o * Image Components

| o * Introduction and Overview to BIAS

| o * License for BIAS

| o * Math Components

| o * modules

| o * Tools

| o * Tracker

| o * Utils

| o * Deprecated List

| o * Todo List

| \ * Bug List

\ * Graphical Class Hierarchy


Basic Image AlgorithmS Library: Base/Math/tnt/triang.h Source File

Base » Math » tnt

triang.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Triangular Matrices (Views and Adpators)
00035
00036 #ifndef TRIANG_H
00037 #define TRIANG_H
00038
00039 // default to use lower-triangular portions of arrays
00040 // for symmetric matrices.
00041
00042 namespace TNT
00043 {
00044
00045 template <class MaTRiX>
00046 class LowerTriangularView
00047 {
00048     protected:
00049
00050
00051         const MaTRiX  &A_;
00052         const typename MaTRiX::element_type zero_;
00053
00054     public:
00055
00056
00057     typedef typename MaTRiX::const_reference const_reference;
00058     typedef const typename MaTRiX::element_type element_type;
00059     typedef const typename MaTRiX::element_type value_type;
00060     typedef element_type T;
00061
00062     Subscript dim(Subscript d) const {  return A_.dim(d); }
00063     Subscript lbound() const { return A_.lbound(); }
00064     Subscript num_rows() const { return A_.num_rows(); }
00065     Subscript num_cols() const { return A_.num_cols(); }
00066
00067
00068     // constructors
00069
00070     LowerTriangularView(/*const*/ MaTRiX &A) : A_(A),  zero_(0) {}
00071
00072
00073     inline const_reference get(Subscript i, Subscript j) const
00074     {
00075 #ifdef TNT_BOUNDS_CHECK
00076         assert(lbound()<=i);
00077         assert(i<=A_.num_rows() + lbound() - 1);
00078         assert(lbound()<=j);
00079         assert(j<=A_.num_cols() + lbound() - 1);
00080 #endif
00081         if (i<j)
00082             return zero_;
00083         else
00084             return A_(i,j);
00085     }
00086
00087
00088     inline const_reference operator() (Subscript i, Subscript j) const
00089     {
00090 #ifdef TNT_BOUNDS_CHECK
00091         assert(lbound()<=i);
00092         assert(i<=A_.num_rows() + lbound() - 1);
00093         assert(lbound()<=j);
00094         assert(j<=A_.num_cols() + lbound() - 1);
00095 #endif
00096         if (i<j)
00097             return zero_;
00098         else
00099             return A_(i,j);
00100     }
00101
00102 #ifdef TNT_USE_REGIONS
00103
00104     typedef const_Region2D< LowerTriangularView<MaTRiX> >
00105                     const_Region;
00106
00107     const_Region operator()(/*const*/ Index1D &I,
00108             /*const*/ Index1D &J) const
00109     {
00110         return const_Region(*this, I, J);
00111     }
00112
00113     const_Region operator()(Subscript i1, Subscript i2,
00114             Subscript j1, Subscript j2) const
00115     {
00116         return const_Region(*this, i1, i2, j1, j2);
00117     }
00118
00119
00120
00121 #endif
00122 // TNT_USE_REGIONS
00123
00124 };
00125
00126
00127 /* *********** Lower_triangular_view() algorithms ****************** */
00128
00129 template <class MaTRiX, class VecToR>
00130 VecToR matmult(/*const*/ LowerTriangularView<MaTRiX> &A, VecToR &x)
00131 {
00132     Subscript M = A.num_rows();
00133     Subscript N = A.num_cols();
00134
00135     assert(N == x.dim());
00136
00137     Subscript i, j;
00138     typename MaTRiX::element_type sum=0.0;
00139     VecToR result(M);
00140
00141     Subscript start = A.lbound();
00142     Subscript Mend = M + A.lbound() -1 ;
00143
00144     for (i=start; i<=Mend; i++)
00145     {
00146         sum = 0.0;
00147         for (j=start; j<=i; j++)
00148             sum = sum + A(i,j)*x(j);
00149         result(i) = sum;
00150     }
00151
00152     return result;
00153 }
00154
00155 template <class MaTRiX, class VecToR>
00156 inline VecToR operator*(/*const*/ LowerTriangularView<MaTRiX> &A, VecToR &x)
00157 {
00158     return matmult(A,x);
00159 }
00160
00161 template <class MaTRiX>
00162 class UnitLowerTriangularView
00163 {
00164     protected:
00165
00166         const MaTRiX  &A_;
00167         const typename MaTRiX::element_type zero;
00168         const typename MaTRiX::element_type one;
00169
00170     public:
00171
00172     typedef typename MaTRiX::const_reference const_reference;
00173     typedef typename MaTRiX::element_type element_type;
00174     typedef typename MaTRiX::element_type value_type;
00175     typedef element_type T;
00176
00177     Subscript lbound() const { return 1; }
00178     Subscript dim(Subscript d) const {  return A_.dim(d); }
00179     Subscript num_rows() const { return A_.num_rows(); }
00180     Subscript num_cols() const { return A_.num_cols(); }
00181
00182
00183     // constructors
00184
00185     UnitLowerTriangularView(/*const*/ MaTRiX &A) : A_(A), zero(0), one(1) {}
00186
00187
00188     inline const_reference get(Subscript i, Subscript j) const
00189     {
00190 #ifdef TNT_BOUNDS_CHECK
00191         assert(1<=i);
00192         assert(i<=A_.dim(1));
00193         assert(1<=j);
00194         assert(j<=A_.dim(2));
00195         assert(0<=i && i<A_.dim(0) && 0<=j && j<A_.dim(1));
00196 #endif
00197         if (i>j)
00198             return A_(i,j);
00199         else if (i==j)
00200             return one;
00201         else
00202             return zero;
00203     }
00204
00205
00206     inline const_reference operator() (Subscript i, Subscript j) const
00207     {
00208 #ifdef TNT_BOUNDS_CHECK
00209         assert(1<=i);
00210         assert(i<=A_.dim(1));
00211         assert(1<=j);
00212         assert(j<=A_.dim(2));
00213 #endif
00214         if (i>j)
00215             return A_(i,j);
00216         else if (i==j)
00217             return one;
00218         else
00219             return zero;
00220     }
00221
00222
00223 #ifdef TNT_USE_REGIONS
00224   // These are the "index-aware" features
00225
00226     typedef const_Region2D< UnitLowerTriangularView<MaTRiX> >
00227                     const_Region;
00228
00229     const_Region operator()(/*const*/ Index1D &I,
00230             /*const*/ Index1D &J) const
00231     {
00232         return const_Region(*this, I, J);
00233     }
00234
00235     const_Region operator()(Subscript i1, Subscript i2,
00236             Subscript j1, Subscript j2) const
00237     {
00238         return const_Region(*this, i1, i2, j1, j2);
00239     }
00240 #endif
00241 // TNT_USE_REGIONS
00242 };
00243
00244 template <class MaTRiX>
00245 LowerTriangularView<MaTRiX> Lower_triangular_view(
00246     /*const*/ MaTRiX &A)
00247 {
00248     return LowerTriangularView<MaTRiX>(A);
00249 }
00250
00251
00252 template <class MaTRiX>
00253 UnitLowerTriangularView<MaTRiX> Unit_lower_triangular_view(
00254     /*const*/ MaTRiX &A)
00255 {
00256     return UnitLowerTriangularView<MaTRiX>(A);
00257 }
00258
00259 template <class MaTRiX, class VecToR>
00260 VecToR matmult(/*const*/ UnitLowerTriangularView<MaTRiX> &A, VecToR &x)
00261 {
00262     Subscript M = A.num_rows();
00263     Subscript N = A.num_cols();
00264
00265     assert(N == x.dim());
00266
00267     Subscript i, j;
00268     typename MaTRiX::element_type sum=0.0;
00269     VecToR result(M);
00270
00271     Subscript start = A.lbound();
00272     Subscript Mend = M + A.lbound() -1 ;
00273
00274     for (i=start; i<=Mend; i++)
00275     {
00276         sum = 0.0;
00277         for (j=start; j<i; j++)
00278             sum = sum + A(i,j)*x(j);
00279         result(i) = sum + x(i);
00280     }
00281
00282     return result;
00283 }
00284
00285 template <class MaTRiX, class VecToR>
00286 inline VecToR operator*(/*const*/ UnitLowerTriangularView<MaTRiX> &A, VecToR &x)
00287 {
00288     return matmult(A,x);
00289 }
00290
00291
00292 //********************** Algorithms *************************************
00293
00294
00295
00296 template <class MaTRiX>
00297 std::ostream& operator<<(std::ostream &s, const LowerTriangularView<MaTRiX>&A)
00298 {
00299     Subscript M=A.num_rows();
00300     Subscript N=A.num_cols();
00301
00302     s << M << " " << N << endl;
00303
00304     for (Subscript i=1; i<=M; i++)
00305     {
00306         for (Subscript j=1; j<=N; j++)
00307         {
00308             s << A(i,j) << " ";
00309         }
00310         s << endl;
00311     }
00312
00313
00314     return s;
00315 }
00316
00317 template <class MaTRiX>
00318 std::ostream& operator<<(std::ostream &s,
00319     const UnitLowerTriangularView<MaTRiX>&A)
00320 {
00321     Subscript M=A.num_rows();
00322     Subscript N=A.num_cols();
00323
00324     s << M << " " << N << endl;
00325
00326     for (Subscript i=1; i<=M; i++)
00327     {
00328         for (Subscript j=1; j<=N; j++)
00329         {
00330             s << A(i,j) << " ";
00331         }
00332         s << endl;
00333     }
00334
00335
00336     return s;
00337 }
00338
00339
00340
00341 // ******************* Upper Triangular Section **************************
00342
00343 template <class MaTRiX>
00344 class UpperTriangularView
00345 {
00346     protected:
00347
00348
00349         /*const*/ MaTRiX  &A_;
00350         /*const*/ typename MaTRiX::element_type zero_;
00351
00352     public:
00353
00354
00355     typedef typename MaTRiX::const_reference const_reference;
00356     typedef /*const*/ typename MaTRiX::element_type element_type;
00357     typedef /*const*/ typename MaTRiX::element_type value_type;
00358     typedef element_type T;
00359
00360     Subscript dim(Subscript d) const {  return A_.dim(d); }
00361     Subscript lbound() const { return A_.lbound(); }
00362     Subscript num_rows() const { return A_.num_rows(); }
00363     Subscript num_cols() const { return A_.num_cols(); }
00364
00365
00366     // constructors
00367
00368     UpperTriangularView(/*const*/ MaTRiX &A) : A_(A),  zero_(0) {}
00369
00370
00371     inline const_reference get(Subscript i, Subscript j) const
00372     {
00373 #ifdef TNT_BOUNDS_CHECK
00374         assert(lbound()<=i);
00375         assert(i<=A_.num_rows() + lbound() - 1);
00376         assert(lbound()<=j);
00377         assert(j<=A_.num_cols() + lbound() - 1);
00378 #endif
00379         if (i>j)
00380             return zero_;
00381         else
00382             return A_(i,j);
00383     }
00384
00385
00386     inline const_reference operator() (Subscript i, Subscript j) const
00387     {
00388 #ifdef TNT_BOUNDS_CHECK
00389         assert(lbound()<=i);
00390         assert(i<=A_.num_rows() + lbound() - 1);
00391         assert(lbound()<=j);
00392         assert(j<=A_.num_cols() + lbound() - 1);
00393 #endif
00394         if (i>j)
00395             return zero_;
00396         else
00397             return A_(i,j);
00398     }
00399
00400 #ifdef TNT_USE_REGIONS
00401
00402     typedef const_Region2D< UpperTriangularView<MaTRiX> >
00403                     const_Region;
00404
00405     const_Region operator()(const Index1D &I,
00406             const Index1D &J) const
00407     {
00408         return const_Region(*this, I, J);
00409     }
00410
00411     const_Region operator()(Subscript i1, Subscript i2,
00412             Subscript j1, Subscript j2) const
00413     {
00414         return const_Region(*this, i1, i2, j1, j2);
00415     }
00416
00417
00418
00419 #endif
00420 // TNT_USE_REGIONS
00421
00422 };
00423
00424
00425 /* *********** Upper_triangular_view() algorithms ****************** */
00426
00427 template <class MaTRiX, class VecToR>
00428 VecToR matmult(/*const*/ UpperTriangularView<MaTRiX> &A, VecToR &x)
00429 {
00430     Subscript M = A.num_rows();
00431     Subscript N = A.num_cols();
00432
00433     assert(N == x.dim());
00434
00435     Subscript i, j;
00436     typename VecToR::element_type sum=0.0;
00437     VecToR result(M);
00438
00439     Subscript start = A.lbound();
00440     Subscript Mend = M + A.lbound() -1 ;
00441
00442     for (i=start; i<=Mend; i++)
00443     {
00444         sum = 0.0;
00445         for (j=i; j<=N; j++)
00446             sum = sum + A(i,j)*x(j);
00447         result(i) = sum;
00448     }
00449
00450     return result;
00451 }
00452
00453 template <class MaTRiX, class VecToR>
00454 inline VecToR operator*(/*const*/ UpperTriangularView<MaTRiX> &A, VecToR &x)
00455 {
00456     return matmult(A,x);
00457 }
00458
00459 template <class MaTRiX>
00460 class UnitUpperTriangularView
00461 {
00462     protected:
00463
00464         const MaTRiX  &A_;
00465         const typename MaTRiX::element_type zero;
00466         const typename MaTRiX::element_type one;
00467
00468     public:
00469
00470     typedef typename MaTRiX::const_reference const_reference;
00471     typedef typename MaTRiX::element_type element_type;
00472     typedef typename MaTRiX::element_type value_type;
00473     typedef element_type T;
00474
00475     Subscript lbound() const { return 1; }
00476     Subscript dim(Subscript d) const {  return A_.dim(d); }
00477     Subscript num_rows() const { return A_.num_rows(); }
00478     Subscript num_cols() const { return A_.num_cols(); }
00479
00480
00481     // constructors
00482
00483     UnitUpperTriangularView(/*const*/ MaTRiX &A) : A_(A), zero(0), one(1) {}
00484
00485
00486     inline const_reference get(Subscript i, Subscript j) const
00487     {
00488 #ifdef TNT_BOUNDS_CHECK
00489         assert(1<=i);
00490         assert(i<=A_.dim(1));
00491         assert(1<=j);
00492         assert(j<=A_.dim(2));
00493         assert(0<=i && i<A_.dim(0) && 0<=j && j<A_.dim(1));
00494 #endif
00495         if (i<j)
00496             return A_(i,j);
00497         else if (i==j)
00498             return one;
00499         else
00500             return zero;
00501     }
00502
00503
00504     inline const_reference operator() (Subscript i, Subscript j) const
00505     {
00506 #ifdef TNT_BOUNDS_CHECK
00507         assert(1<=i);
00508         assert(i<=A_.dim(1));
00509         assert(1<=j);
00510         assert(j<=A_.dim(2));
00511 #endif
00512         if (i<j)
00513             return A_(i,j);
00514         else if (i==j)
00515             return one;
00516         else
00517             return zero;
00518     }
00519
00520
00521 #ifdef TNT_USE_REGIONS
00522   // These are the "index-aware" features
00523
00524     typedef const_Region2D< UnitUpperTriangularView<MaTRiX> >
00525                     const_Region;
00526
00527     const_Region operator()(const Index1D &I,
00528             const Index1D &J) const
00529     {
00530         return const_Region(*this, I, J);
00531     }
00532
00533     const_Region operator()(Subscript i1, Subscript i2,
00534             Subscript j1, Subscript j2) const
00535     {
00536         return const_Region(*this, i1, i2, j1, j2);
00537     }
00538 #endif
00539 // TNT_USE_REGIONS
00540 };
00541
00542 template <class MaTRiX>
00543 UpperTriangularView<MaTRiX> Upper_triangular_view(
00544     /*const*/ MaTRiX &A)
00545 {
00546     return UpperTriangularView<MaTRiX>(A);
00547 }
00548
00549
00550 template <class MaTRiX>
00551 UnitUpperTriangularView<MaTRiX> Unit_upper_triangular_view(
00552     /*const*/ MaTRiX &A)
00553 {
00554     return UnitUpperTriangularView<MaTRiX>(A);
00555 }
00556
00557 template <class MaTRiX, class VecToR>
00558 VecToR matmult(/*const*/ UnitUpperTriangularView<MaTRiX> &A, VecToR &x)
00559 {
00560     Subscript M = A.num_rows();
00561     Subscript N = A.num_cols();
00562
00563     assert(N == x.dim());
00564
00565     Subscript i, j;
00566     typename VecToR::element_type sum=0.0;
00567     VecToR result(M);
00568
00569     Subscript start = A.lbound();
00570     Subscript Mend = M + A.lbound() -1 ;
00571
00572     for (i=start; i<=Mend; i++)
00573     {
00574         sum = x(i);
00575         for (j=i+1; j<=N; j++)
00576             sum = sum + A(i,j)*x(j);
00577         result(i) = sum + x(i);
00578     }
00579
00580     return result;
00581 }
00582
00583 template <class MaTRiX, class VecToR>
00584 inline VecToR operator*(/*const*/ UnitUpperTriangularView<MaTRiX> &A, VecToR &x)
00585 {
00586     return matmult(A,x);
00587 }
00588
00589
00590 //********************** Algorithms *************************************
00591
00592
00593
00594 template <class MaTRiX>
00595 std::ostream& operator<<(std::ostream &s,
00596     /*const*/ UpperTriangularView<MaTRiX>&A)
00597 {
00598     Subscript M=A.num_rows();
00599     Subscript N=A.num_cols();
00600
00601     s << M << " " << N << endl;
00602
00603     for (Subscript i=1; i<=M; i++)
00604     {
00605         for (Subscript j=1; j<=N; j++)
00606         {
00607             s << A(i,j) << " ";
00608         }
00609         s << endl;
00610     }
00611
00612
00613     return s;
00614 }
00615
00616 template <class MaTRiX>
00617 std::ostream& operator<<(std::ostream &s,
00618         /*const*/ UnitUpperTriangularView<MaTRiX>&A)
00619 {
00620     Subscript M=A.num_rows();
00621     Subscript N=A.num_cols();
00622
00623     s << M << " " << N << endl;
00624
00625     for (Subscript i=1; i<=M; i++)
00626     {
00627         for (Subscript j=1; j<=N; j++)
00628         {
00629             s << A(i,j) << " ";
00630         }
00631         s << endl;
00632     }
00633
00634
00635     return s;
00636 }
00637
00638 } // namespace TNT
00639
00640
00641
00642
00643
00644 #endif
00645 //TRIANG_H
00646
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/TriangleMesh.cpp Source File

Utils

TriangleMesh.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be usefulen,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Utils/TriangleMesh.hh>
00026 #include <Base/Math/Vector.hh>
00027 #include <Geometry/RMatrix.hh>
00028
00029 // #include <iostream>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 void TriangleMesh::
00035 GenerateDenseMesh(const BIAS::Image<float>& DenseDepthMap,
00036           BIAS::PMatrix& P,
00037           const BIAS::Image<unsigned char>& Texture)
00038 {
00039   if( (DenseDepthMap.GetWidth()!=Texture.GetWidth()) ||
00040       (DenseDepthMap.GetHeight()!=Texture.GetHeight()) ) {
00041     BIASERR("Texturesize != DepthMapsize \n");
00042     return ;
00043   }
00044
00045   //init datastructs
00046   unsigned int w=DenseDepthMap.GetWidth();
00047   unsigned int h=DenseDepthMap.GetHeight();
00048   vector<int> pointIndices;
00049   pointIndices.resize(w*h);
00050
00051   meshVertices_.clear();
00052   vertexNormals_.clear();
00053   textureCoords_.clear();
00054   triangleIndices_.clear();
00055
00056   meshVertices_.reserve(w*h);
00057   vertexNormals_.reserve(w*h);
00058   textureCoords_.reserve(w*h);
00059   triangleIndices_.reserve(w*h*2);
00060
00061   texture_ = Texture;
00062
00063   //build list of indices and list of Vertices
00064   float texCoordOffsetX = 1.0f / float(w-1);
00065   float texCoordOffsetY = 1.0f / float(h-1);
00066   Vector2<float> texCoord;
00067   texCoord.Set(0.0, 1.0);
00068
00069   Vector3<double> vertex;
00070   HomgPoint3D vertexHom;
00071
00072   float** depthValues = DenseDepthMap.GetImageDataArray();
00073   unsigned int currentIndex=0;
00074   unsigned int x,y;
00075   for( y=0; y<h; y++) {
00076     for( x=0; x<w; x++) {
00077       if(depthValues[y][x]<= 0.0) {
00078     pointIndices[y*w+x] = -1;
00079       }
00080       else {
00081     pointIndices[y*w+x] = currentIndex;
00082     P.BackprojectWorldCoo(HomgPoint2D(x,y), depthValues[y][x], vertexHom);
00083     vertexHom.GetEuclidian(vertex);
00084     meshVertices_.push_back(vertex);
00085     textureCoords_.push_back(texCoord);
00086     currentIndex++;
00087       }
00088       texCoord[0] += texCoordOffsetX;
00089     }
00090     texCoord[0] = 0.0;
00091     texCoord[1] -= texCoordOffsetY;
00092   }
00093
00094   //meshing
00095   Vector3<int> triangle;
00096   int index0, index1, index2;
00097   for( y=0; y<h; y++) {
00098     for( x=0; x<w-1; x++) {
00099       /*         v1
00100        *      i0---i1
00101        *       |   /
00102        *       |  / v0
00103        *       i2
00104        */
00105       if(y<h-1) {
00106     index0 = pointIndices[y*w+x];
00107     index1 = pointIndices[y*w+x+1];
00108     index2 = pointIndices[(y+1)*w+x];
00109     if(index0 > (-1) && index1 > (-1) && index2 > (-1)){
00110       triangle.Set(index2, index1, index0);
00111       //      triangleIndices_.push_back(Vector<unsigned int>(triangle));
00112       triangleIndices_.push_back(triangle);
00113     }
00114       }
00115       /*
00116        *         i0
00117        *        / |
00118        *       /  |
00119        *      i2--i1
00120        */
00121       if(y>0) {
00122     index2 = pointIndices[y*w+x];
00123     index1 = pointIndices[y*w+x+1];
00124     index0 = pointIndices[(y-1)*w+x+1];
00125     if(index0 > (-1) && index1 > (-1) && index2 > (-1)) {
00126       triangle.Set(index2, index1, index0);
00127       //      triangleIndices_.push_back(Vector<unsigned int>(triangle));
00128       triangleIndices_.push_back(triangle);
00129     }
00130       }
00131     }
00132   }
00133
00134 //   cout<<"vertices "<<meshVertices_.size()<<endl;
00135 //   cout<<"texCoords "<<textureCoords_.size()<<endl;
00136 //   cout<<"triangles "<<triangleIndices_.size()<<endl;
00137
00138 }
00139
00140 void TriangleMesh::GenerateDenseMesh(const Image<float>& DenseDepthMapC,
00141                                      PMatrix& P,
00142                                      const Image<unsigned char>& TextureC,
00143                                      const ROI& CutOut) {
00144   // dirty de-const cast to conveniently access ROI, which is restored later
00145   Image<float>& DenseDepthMap(const_cast<Image<float>& >(DenseDepthMapC));
00146   Image<unsigned char>& Texture(const_cast<Image<unsigned char>& >(TextureC));
00147
00148   int UpperLeftX, UpperLeftY, LowerRightX, LowerRightY;
00149   CutOut.GetCorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00150
00151   // adpat pmatrix principal point
00152   PMatrix PCutOut(P);
00153   if (PCutOut.IsMetric()) {
00154     //  more exact to use saved K,R,C and recompose than multiplying
00155     KMatrix K = PCutOut.GetK();
00156     K[0][2] -= double(UpperLeftX);
00157     K[1][2] -= double(UpperLeftY);
00158     RMatrix R =  PCutOut.GetR();
00159     Vector3<double> C(PCutOut.GetC());
00160     PCutOut.Compose(K, R, C);
00161   } else {
00162     // non-metrix case, just multiply with correction matrix
00163     KMatrix K(MatrixIdentity);
00164     K[0][2] -= double(UpperLeftX);
00165     K[1][2] -= double(UpperLeftY);
00166     PCutOut  = K * PCutOut;
00167
00168     // tell PMatrix that a basic matrix operation has been invoked
00169     // and chache is invalid
00170     PCutOut.InvalidateDecomposition();
00171   }
00172   // PCutout is now the new projection matrix for the cutout
00173
00174   // get CutOut from texture
00175   ROI backupROI = *Texture.GetROI();
00176   Texture.SetROICorners(UpperLeftX, UpperLeftY, LowerRightX, LowerRightY);
00177   Image<unsigned char> CutOutTexture;
00178   Texture.GetCopyOfROI(CutOutTexture);
00179   *Texture.GetROI() = backupROI;
00180
00181   // get CutOut from depth map
00182   backupROI = *DenseDepthMap.GetROI();
00183   DenseDepthMap.SetROICorners(UpperLeftX, UpperLeftY,
00184                               LowerRightX, LowerRightY);
00185   Image<float> CutOutDenseDepthMap;
00186   DenseDepthMap.GetCopyOfROI(CutOutDenseDepthMap);
00187   *DenseDepthMap.GetROI() = backupROI;
00188
00189   // call generic interface
00190   GenerateDenseMesh(CutOutDenseDepthMap, PCutOut, CutOutTexture);
00191 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Utils/TriangleMesh.hh Source File

Utils

TriangleMesh.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _TRIANGLEMESH_HH_
00027 #define _TRIANGLEMESH_HH_
00028
00029 #include <vector>
00030
00031 #include <Base/Image/Image.hh>
00032 #include <Geometry/PMatrix.hh>
00033
00034 namespace BIAS {
00035
00036   /** \class TriangleMesh
00037    * \author bartczak
00038    * \brief create and represent a 3D triangle mesh
00039    */
00040   class BIASUtils_EXPORT TriangleMesh {
00041   public:
00042     ~TriangleMesh() {};
00043
00044
00045     /** Calculate a triangle mesh from dense depth map.
00046      * No triangles are discarded, hence no smoothing.
00047      */
00048     void GenerateDenseMesh(const BIAS::Image<float>& DenseDepthMap,
00049                BIAS::PMatrix& P,
00050                const BIAS::Image<unsigned char>& Texture);
00051
00052     /** @brief Calculate a triangle mesh only using the given cutout
00053
00054         recalculates depthmap, image and p and calls generic interface
00055         @author koeser  */
00056     void GenerateDenseMesh(const BIAS::Image<float>& DenseDepthMap,
00057                            BIAS::PMatrix& P,
00058                            const BIAS::Image<unsigned char>& Texture,
00059                            const ROI& cutout);
00060
00061     void GetTexture(Image<unsigned char>& img) const {
00062       img = texture_;
00063     }
00064
00065     void GetVertices(std::vector<BIAS::Vector3<double> >& vertices) const {
00066       vertices = meshVertices_;
00067     }
00068
00069     void GetTexCoords(std::vector<BIAS::Vector2<float> >& texCoo) const {
00070       texCoo = textureCoords_;
00071     }
00072
00073     void GetTriangleIndices(std::vector<BIAS::Vector<int> >& triangleIndices) const {
00074       triangleIndices = triangleIndices_;
00075     }
00076
00077     void GetNormals(std::vector<BIAS::Vector3<double> >& normals) const
00078     {
00079       normals = vertexNormals_;
00080     }
00081
00082   protected:
00083
00084     // exports for dll (cmenk)
00085     BIAS_EXPORT_STL_VECTOR( BIASUtils_EXPORT, BIAS::Vector3<double> )
00086     BIAS_EXPORT_STL_VECTOR( BIASUtils_EXPORT, BIAS::Vector2<float> )
00087     BIAS_EXPORT_STL_VECTOR( BIASUtils_EXPORT, BIAS::Vector<int> )
00088
00089     BIAS::Image<unsigned char> texture_;
00090     std::vector<BIAS::Vector3<double> > meshVertices_;
00091     std::vector<BIAS::Vector3<double> > vertexNormals_;
00092     std::vector<BIAS::Vector2<float> > textureCoords_;
00093     std::vector<BIAS::Vector<int> > triangleIndices_;
00094
00095   };  //end class
00096
00097 }//end namespace
00098
00099
00100 #endif
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Triangulation.cpp Source File

Geometry

Triangulation.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Triangulation.hh"
00027 #include <Base/Geometry/RMatrixBase.hh>
00028 #include <Base/Math/Random.hh>
00029 #include <MathAlgo/PolynomialSolve.hh>
00030
00031 #include <cmath>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036
00037 Triangulation::Triangulation() : Debug() {
00038   _UpdateCovWeights();
00039 }
00040
00041
00042 Triangulation::~Triangulation()
00043 {}
00044
00045 int Triangulation::Optimal(PMatrix &P1, PMatrix &P2, HomgPoint2D& p1,
00046                            HomgPoint2D& p2, HomgPoint3D& point3d)
00047 {
00048   FMatrix F(P1, P2);
00049
00050   int res=CorrectCorrespondences(F, p1, p2);
00051   if (res==0){
00052     Vector3<double> r=F*p2;
00053     BIASCDOUT(D_TR_OPT, "p1: "<<p1<<"tp2: "<<p2<<endl);
00054     BIASCDOUT(D_TR_OPT, "p1' * F * p2 = "<<r.ScalarProduct(p1)<<endl);
00055     res=TriangulateLinear(P1, P2, p1, p2, point3d);
00056   } else {
00057     BIASERR("CorrectCorrespondences failed "<<res);
00058   }
00059   return res;
00060 }
00061
00062 int
00063 Triangulation::TriangulateLinear(PMatrix &P1, PMatrix &P2,
00064                                  HomgPoint2D& p1, HomgPoint2D& p2,
00065                                  HomgPoint3D& point3d) {
00066
00067   // set up DLT according to Zisserman: "Multiple View Geometry", p.297
00068   Matrix4x4<double> A;
00069
00070   A[0][0] = P1[0][0] * p1[2] - P1[2][0] * p1[0];
00071   A[0][1] = P1[0][1] * p1[2] - P1[2][1] * p1[0];
00072   A[0][2] = P1[0][2] * p1[2] - P1[2][2] * p1[0];
00073   A[0][3] = P1[0][3] * p1[2] - P1[2][3] * p1[0];
00074
00075   A[1][0] = P1[1][0] * p1[2] - P1[2][0] * p1[1];
00076   A[1][1] = P1[1][1] * p1[2] - P1[2][1] * p1[1];
00077   A[1][2] = P1[1][2] * p1[2] - P1[2][2] * p1[1];
00078   A[1][3] = P1[1][3] * p1[2] - P1[2][3] * p1[1];
00079
00080   A[2][0] = P2[0][0] * p2[2] - P2[2][0] * p2[0];
00081   A[2][1] = P2[0][1] * p2[2] - P2[2][1] * p2[0];
00082   A[2][2] = P2[0][2] * p2[2] - P2[2][2] * p2[0];
00083   A[2][3] = P2[0][3] * p2[2] - P2[2][3] * p2[0];
00084
00085   A[3][0] = P2[1][0] * p2[2] - P2[2][0] * p2[1];
00086   A[3][1] = P2[1][1] * p2[2] - P2[2][1] * p2[1];
00087   A[3][2] = P2[1][2] * p2[2] - P2[2][2] * p2[1];
00088   A[3][3] = P2[1][3] * p2[2] - P2[2][3] * p2[1];
00089
00090
00091   A.NormalizeRows();
00092
00093   SVD svd(A);
00094   BIAS::Matrix<double> VT = svd.GetVT();
00095   point3d = (BIAS::Vector4<double>) VT.GetRow(3);
00096   point3d.Homogenize();
00097   return 0;
00098 }
00099
00100 int Triangulation::CorrectCorrespondences(const FMatrix& F, HomgPoint2D& p1,
00101                                           HomgPoint2D& p2, bool refine)
00102 {
00103 #ifdef BIAS_DEBUG
00104   BIASCDOUT(D_TR_OPT_F, "p1: "<<p1<<"\tp2: "<<p2<<endl);
00105   BIASCDOUT(D_TR_OPT_F, "before: p2^T * F * p1 = "<<(F*p1).ScalarProduct(p2)
00106             <<endl);
00107 #endif
00108
00109   p1.Homogenize();
00110   p2.Homogenize();
00111   Matrix3x3<double> T, Tp, Ti, Tpi;
00112   T.SetIdentity();
00113   Tp.SetIdentity();
00114   Ti.SetIdentity();
00115   Tpi.SetIdentity();
00116   T[0][2]=-p1[0];
00117   T[1][2]=-p1[1];
00118   Tp[0][2]=-p2[0];
00119   Tp[1][2]=-p2[1];
00120   Ti[0][2]=p1[0];
00121   Ti[1][2]=p1[1];
00122   Tpi[0][2]=p2[0];
00123   Tpi[1][2]=p2[1];
00124
00125   BIASCDOUT(D_TR_OPT_TRANSF, "T: "<<T<<"\nTp: "<<Tp<<"\nTi: "<<Ti
00126             <<"\nTpi: "<<Tpi<<endl);
00127
00128   FMatrix mF;
00129   mF=Tpi.Transpose()*F*Ti;
00130   BIASCDOUT(D_TR_OPT_TRANSF, "orig F: "<<F<<"\nTpi.Transpose() * F * Ti = "
00131             <<mF<<endl);
00132
00133   HomgPoint2D e, ep;
00134   F.GetEpipoles(e, ep);
00135   ep.Homogenize(); e.Homogenize();
00136   BIASCDOUT(D_TR_OPT_TRANSF, "orig epipoles: "<<e<<"\t"<<ep<<endl);
00137
00138   mF.GetEpipoles(e, ep);
00139   BIASCDOUT(D_TR_OPT_TRANSF, "epipoles: "<<e<<"\t"<<ep<<endl);
00140
00141 #ifdef BIAS_DEBUG
00142   Vector3<double> r;
00143   mF.TransposedMult(ep, r);
00144   BIASCDOUT(D_TR_OPT_TRANSF, "F*e = "<<mF*e<<"\tep^T*F = "<<r<<endl);
00145
00146   // BIASASSERT((mF*e).NormL2()<=1e-10);
00147   // BIASASSERT(r.NormL2()<=1e-10);
00148 #endif
00149
00150   double se, sep;
00151   se=sqrt(e[0]*e[0]+e[1]*e[1]);
00152   sep=sqrt(ep[0]*ep[0]+ep[1]*ep[1]);
00153
00154   e/=se;
00155   ep/=sep;
00156
00157   BIASCDOUT(D_TR_OPT_TRANSF, "normalized epipoles: "<<e<<"\t"<<ep<<endl);
00158
00159   RMatrixBase R, Rp;
00160   R.SetIdentity();
00161   Rp.SetIdentity();
00162
00163   R[0][0]=R[1][1]=e[0];
00164   R[0][1]=e[1];
00165   R[1][0]=-e[1];
00166
00167   Rp[0][0]=Rp[1][1]=ep[0];
00168   Rp[0][1]=ep[1];
00169   Rp[1][0]=-ep[1];
00170
00171   BIASCDOUT(D_TR_OPT_TRANSF, "R*e = "<<R*e<<"\tRp*ep = "<<Rp * ep<<endl);
00172
00173   mF = Rp * mF * R.Transpose();
00174
00175   BIASCDOUT(D_TR_OPT_TRANSF, "Rp * Tpi.Transpose() * F * Ti * R.Transpose() = "
00176             <<mF<<endl);
00177
00178 #ifdef BIAS_DEBUG
00179   Vector3<double> r4(0.0, 0.0, 1.0);
00180   BIASCDOUT(D_TR_OPT_F, "before: (0, 0, 1) * mF * (0, 0, 1)^T = "
00181             <<(mF*r4).ScalarProduct(r4)<<endl);
00182   BIASCDOUT(D_TR_OPT_TRANSF, "Ti * R.Transpose() * (0,0,1): "
00183             <<Ti * R.Transpose() * r4
00184             <<"\t(Ti * R.Transpose() * (0,0,1))-p1 ="
00185             <<(Ti * R.Transpose() * r4)-p1<<endl);
00186   BIASCDOUT(D_TR_OPT_TRANSF, "Tpi * Rp.Transpose() * (0,0,1): "
00187             <<Tpi * Rp.Transpose() * r4<<"\t(Tpi * Rp.Transpose() * r4)-p2 = "
00188             <<(Tpi * Rp.Transpose() * r4)-p2<<endl);
00189 #endif
00190
00191   double f, fp, a, b, c, d;
00192   f=e[2];
00193   fp=ep[2];
00194   a=mF[1][1];
00195   b=mF[1][2];
00196   c=mF[2][1];
00197   d=mF[2][2];
00198   BIASCDOUT(D_TR_OPT, "ffpd: "<<f*fp*d<<"\t-fpc: "<<-fp*c<<"\t-fpd: "<<-fp*d
00199             <<"\n-fb: "<<-f*b<<"\ta: "<<a<<"\tb: "<<b
00200             <<"\n-fd: "<<-f*d<<"\tc: "<<c<<"\td: "<<d<<endl<<endl);
00201
00202   BIASCDOUT(D_TR_OPT, "a: "<<a<<"\tb: "<<b<<"\tc: "<<c<<"\td: "<<d<<"\tf: "<<f
00203             <<"\tfp: "<<fp<<endl);
00204   /** see mupad
00205       assume(a, Type::Real):
00206       assume(b, Type::Real):
00207       assume(c, Type::Real):
00208       assume(d, Type::Real):
00209       assume(f, Type::Real):
00210       assume(mfp, Type::Real):
00211       assume(t, Type::Real):
00212
00213       g:=t*((a*t+b)^2+mfp^2*(c*t+d)^2)^2-(a*d-b*c)*(1+f^2*t^2)^2*(a*t+b)*(c*t+d):
00214
00215       g:=simplify(expand(g)):
00216
00217       PRETTYPRINT := FALSE:
00218
00219       res:=poly(collect(g, [t]), [t]);
00220
00221       fprint(Unquoted, 0, "coeff[0]=", coeff(res, t, 0), "; // t^0"):
00222       fprint(Unquoted, 0, "coeff[1]=", coeff(res, t, 1), "; // t^1"):
00223       fprint(Unquoted, 0, "coeff[2]=", coeff(res, t, 2), "; // t^2"):
00224       fprint(Unquoted, 0, "coeff[3]=", coeff(res, t, 3), "; // t^3"):
00225       fprint(Unquoted, 0, "coeff[4]=", coeff(res, t, 4), "; // t^4"):
00226       fprint(Unquoted, 0, "coeff[5]=", coeff(res, t, 5), "; // t^5"):
00227       fprint(Unquoted, 0, "coeff[6]=", coeff(res, t, 6), "; // t^6"):
00228   */
00229   vector<POLYNOMIALSOLVE_TYPE> coeff(7);
00230   vector<complex<POLYNOMIALSOLVE_TYPE> > csol;
00231   double a2=a*a, b2=b*b, c2=c*c, d2=d*d, f2=f*f, fp2=fp*fp;
00232   double a3=a2*a, b3=b2*b, c3=c2*c, d3=d2*d;
00233   double a4=a2*a2, b4=b2*b2, c4=c2*c2, d4=d2*d2, f4=f2*f2, fp4=fp2*fp2;
00234   double ab=a*b, cd=c*d;
00235   coeff[0]=b2*cd - ab*d2; // t^0
00236   coeff[1]=b4 - a2*d2 + b2*c2 + d4*fp4 + 2*b2*d2*fp2; // t^1
00237   coeff[2]=4*a*b3 + ab*c2 - a2*cd - 2*ab*d2*f2 + 2*b2*cd*f2 + 4*c*d3*fp4 +
00238     4*ab*d2*fp2 + 4*b2*cd*fp2; // t^2
00239   coeff[3]=8*ab*cd*fp2 + 6*a2*b2 - 2*a2*d2*f2 + 2*b2*c2*f2 + 2*a2*d2*fp2 +
00240     2*b2*c2*fp2 + 6*c2*d2*fp4; // t^3
00241   coeff[4]=4*a3*b + 2*ab*c2*f2 - 2*a2*cd*f2 - ab*d2*f4 + b2*cd*f4 +
00242     4*c3*d*fp4 + 4*ab*c2*fp2 + 4*a2*cd*fp2; // t^4
00243   coeff[5]=a4 + c4*fp4 - a2*d2*f4 + b2*c2*f4 + 2*a2*c2*fp2; // t^5
00244   coeff[6]=ab*c2*f4 - a2*cd*f4; // t^6
00245
00246   PolynomialSolve ps;
00247   if(DebugLevelIsSet(D_TR_OPT))
00248     ps.AddDebugLevel(D_PS_GSL);
00249   // crop upper zero coeffizients
00250   ps.CheckCoefficients(coeff);
00251   //  while ((*coeff.rbegin())==0.0) { coeff.pop_back(); }
00252   int psres=ps.Numeric(coeff, csol);
00253   BIASCDOUT(D_TR_OPT, "csol.size(): "<<csol.size()<<"\tpsres: "<<psres<<endl);
00254   if (psres<0){
00255     BIASERR("error solving polynomial "<<psres);
00256     BIASABORT;
00257     //return psres;
00258   }
00259   if (refine)
00260     ps.NonLinearRefine(coeff, csol);
00261
00262   // vector<POLYNOMIALSOLVE_TYPE> sol;
00263   // ps.Solve(coeff, sol);
00264   // BIASCDOUT(D_TR_OPT, "sol.size(): "<<sol.size()<<endl);
00265
00266   vector<double> s(csol.size()+1);
00267
00268   for (unsigned i=0; i<csol.size(); i++){
00269     double sol2=real(csol[i])*real(csol[i]);
00270     double t1=1.0+f2*sol2;
00271     double t2=c*real(csol[i])+d;
00272     double t3=a*real(csol[i])+b;
00273     double t4=c*real(csol[i])+d;
00274
00275     s[i]=sol2/(t1*t1)+(t2*t2)/(t3*t3+fp2*t4*t4);
00276     BIASCDOUT(D_TR_OPT, "dist["<<i<<"] = "<<s[i]<<" = "<<sol2/(t1*t1)<<" + "
00277               <<(t2*t2)/(t3*t3+fp2*t4*t4)<<endl);
00278   }
00279   s[csol.size()]=1.0/f2+c2/(a2+fp2*c2);
00280   BIASCDOUT(D_TR_OPT, "dist["<<csol.size()<<"] = "<<s[csol.size()]
00281             <<" = "<<1.0/f2<<" + "<<c2/(a2+fp2*c2)<<endl);
00282
00283   double costmin=s[0], tmin=real(csol[0]);
00284   int minres=0;
00285
00286
00287   for (unsigned i=1; i<s.size(); i++){
00288     if (s[i]<costmin) { costmin=s[i]; minres=i; tmin=real(csol[i]); }
00289   }
00290   BIASCDOUT(D_TR_OPT, "costmin = "<<costmin<<"\tat "<<minres<<"\ttmin: "
00291             <<tmin<<endl);
00292   BIASCDOUT(D_TR_OPT, "poli("<<tmin<<") = "<<coeff[0] + tmin*coeff[1] +
00293             tmin*tmin*coeff[2]+tmin*tmin*tmin*coeff[3]+
00294             tmin*tmin*tmin*tmin*coeff[4]+tmin*tmin*tmin*tmin*tmin*coeff[5]+
00295             tmin*tmin*tmin*tmin*tmin*tmin*coeff[6]<<endl);
00296   BIASCDOUT(D_TR_OPT, "ps.EvaluatePolynomial("<<tmin<<", coeff) = "
00297             <<ps.EvaluatePolynomial(tmin, coeff)<<endl);
00298
00299
00300   Vector3<double> l, lp;
00301   l.Set(tmin*f, 1.0, -tmin);
00302   lp.Set(-fp*(c*tmin+d), a*tmin+b, c*tmin+d);
00303   //   BIASCDOUT(D_TR_OPT, "l: "<<l<<"\tlp: "<<lp<<endl);
00304
00305   HomgPoint2D xh, xhp;
00306   xh.Set(-l[0]*l[2], -l[1]*l[2], l[0]*l[0]+l[1]*l[1]);
00307   xhp.Set(-lp[0]*lp[2], -lp[1]*lp[2], lp[0]*lp[0]+lp[1]*lp[1]);
00308   //BIASCDOUT(D_TR_OPT, "xh: "<<xh<<"\txhp: "<<xhp<<endl);
00309
00310 #ifdef BIAS_DEBUG
00311   //BIASCDOUT(D_TR_OPT, "xh: "<<xh<<"\txhp: "<<xhp<<endl);
00312   BIASCDOUT(D_TR_OPT_F, "optimized: xhp * mF * xh = "
00313             <<(mF*xh).ScalarProduct(xhp)<<endl);
00314 #endif
00315
00316   p1 = Ti * R.Transpose() * xh;
00317   p2 = Tpi * Rp.Transpose() * xhp;
00318   p1.Homogenize();
00319   p2.Homogenize();
00320   BIASCDOUT(D_TR_OPT, "optimized points "<<p1<<" <--> "<<p2<<endl);
00321
00322 #ifdef BIAS_DEBUG
00323   BIASCDOUT(D_TR_OPT_F, "optimized: p2^T * F * p1 = "<<(F*p1).ScalarProduct(p2)
00324             <<endl);
00325 #endif
00326
00327   return 0;
00328 }
00329
00330
00331 int
00332 Triangulation::Triangulate(PMatrix &P1, PMatrix &P2,
00333                            const HomgPoint2D& p1, const HomgPoint2D& p2,
00334                            HomgPoint3D& point3d)
00335 {
00336   int res = 0;
00337   Vector3<double> normray1, center1, normray2, center2;
00338
00339   Matrix3x3<double> P1I, P2I;
00340   P1.GetHinf(P1I);
00341   P2.GetHinf(P2I);
00342   normray1 = P1I * p1;
00343   normray1 /= normray1.NormL2();
00344   normray2 = P2I * p2;
00345   normray2 /= normray2.NormL2();
00346
00347 //   P1.GetC(center1);
00348 //   P2.GetC(center2);
00349   HomgPoint3D c1, c2;
00350   P1.GetNullVector(c1);
00351   P2.GetNullVector(c2);
00352   c1.Homogenize();
00353   c2.Homogenize();
00354   center1.Set(c1[0], c1[1], c1[2]);
00355   center2.Set(c2[0], c2[1], c2[2]);
00356
00357   Vector3<double> vecX;
00358   res = Triangulation::Intersect(center1, normray1, center2, normray2, vecX);
00359   point3d[0] = vecX[0];
00360   point3d[1] = vecX[1];
00361   point3d[2] = vecX[2];
00362
00363   // this is guaranteed by the interface:
00364   point3d[3] = 1.0;
00365
00366   return res;
00367 }
00368
00369 int
00370 Triangulation::Triangulate2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00371                              HomgPoint2D& p2, HomgPoint3D& point3d,
00372                              double& dist, double& angle)
00373 {
00374   int res = 0;
00375   BIASDOUT(D_TR_ARG, "P1: "<<P1<<"\nP2: "<<P2<<"\np1: "<<p1<<"\tp2: "<<p2);
00376   Vector3<double> ray1, ray2;
00377   double gamma, tau;
00378   double s1t,s2t;
00379   HomgPoint3D p3d1, p3d2;
00380   Vector3<double> T;
00381   //cerr << "C1: "<< P1.GetC()<< "\tC2: "<< P2.GetC() << endl;
00382   //cerr << "p1: "<< p1 << "\tp2: "<< p2 << endl;
00383   Vector3<double> C1, C2;
00384   if ((P1.GetC(C1) != 0) || (P2.GetC(C2) != 0)){
00385     BIASERR("error getting camera center "<<P1<<" "<<C1<<"\n"<<P2<<" "<<C2);
00386     return -3;
00387   }
00388   T = C1 - C2; //camera base line
00389   ray1=P1.GetNormRayWorldCoo(p1);
00390   ray2=P2.GetNormRayWorldCoo(p2);
00391   BIASDOUT(D_TR_TR,"center1: "<<C1<<"\t    ray1: "<<ray1);
00392   BIASDOUT(D_TR_TR,"center2: "<<C2<<"\t    ray2: "<<ray2);
00393
00394   // compute different scalar products
00395   ray1.ScalarProduct(ray2, angle);
00396   ray1.ScalarProduct(T, s1t);
00397   ray2.ScalarProduct(T, s2t);
00398
00399 //   cerr << "( " << setprecision(14) << angle * s2t - s1t <<" ) / ( "
00400 //        << setprecision(14) << 1 - angle * angle << " )"<<endl;
00401   tau = (angle * s2t - s1t)/(1 - angle * angle);
00402   gamma = tau * angle + s2t;
00403   BIASDOUT(D_TR_TR,"T: "<<T<<"\tang: "<<angle<<"\ts1t: "<<s1t<<"\ts2t: "<<s2t
00404            <<"\ttau: "<<tau<<"\tgamma: "<<gamma);
00405
00406 //   cerr <<"ray1: "<< ray1 << "\tray2: "<<ray2<<"\tT: "<<T<<endl;
00407 //   cerr <<"angle: "<<angle<<"\ts1t: "<<s1t<<"\ts2t: "<<s2t
00408 //        <<"\ttau: "<<tau<<"\tgamma: "<<gamma<<"\t"<<(ray1-ray2).NormL2()<<endl;
00409
00410   if ( tau < 0 || gamma < 0){
00411     // no valid point because intersection point is behind
00412     // one camera or behind both cameras
00413     BIASDOUT(D_TR_POS,"3d point lies behind one or both cameras");
00414     point3d.Set(0.0, 0.0, 0.0);
00415     res = -1;
00416     BIASCDOUT(D_TR_INF, "B"); BIASFLUSHDOUT;
00417   } else if ((ray1-ray2).NormL2()<PARALLEL_THRESHOLD) {
00418     // no valid point because rays do not intersect
00419     BIASDOUT(D_TR_POS,"no triangulation possible, rays are parallel");
00420     point3d.Set(0.0, 0.0, 0.0);
00421     res = -2;
00422     BIASCDOUT(D_TR_INF, "i"); BIASFLUSHDOUT;
00423   } else {// maybe a correct point
00424     p3d1=C1 + ray1 * tau;
00425     p3d2=C2 + ray2 * gamma;
00426     dist=(p3d1 - p3d2).NormL2();
00427     BIASDOUT(D_TR_TR,"p3d1: "<<p3d1<<"\tp3d2: "<<p3d2);
00428     //cerr << "dist: " << dist << endl;
00429     point3d=(p3d1+p3d2)/2.0;
00430     //cerr <<"p3d: "<<(p3d1+p3d2)/2.0<<endl;
00431 //     point3d[0] = (P1.GetC()[0] + P2.GetC()[0] + tau * ray1[0] +
00432 //        gamma * ray2[0]) / 2.0;
00433 //     point3d[1] = (P1.GetC()[1] + P2.GetC()[1] + tau * ray1[1] +
00434 //        gamma * ray2[1]) / 2.0;
00435 //     point3d[2] = (P1.GetC()[2] + P2.GetC()[2] + tau * ray1[2] +
00436 //        gamma * ray2[2]) / 2.0;
00437 //     point3d[3] = 1.0;
00438     BIASCDOUT(D_TR_INF, "."); BIASFLUSHDOUT;
00439   }
00440   return res;
00441 }
00442
00443 int
00444 Triangulation::Triangulate2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00445                              HomgPoint2D& p2, HomgPoint3D& point3D,
00446                              Matrix3x3<double>& CovMatrix, double& dist,
00447                              double& angle, const double& triangdeltapixel)
00448 {
00449   int res=0;
00450   if ((res=Triangulate2D(P1, P2, p1, p2, point3D, dist, angle))==0)
00451     res=GetCovariance2D(P1, P2, p1, p2, point3D, CovMatrix, triangdeltapixel);
00452   return res;
00453 }
00454
00455
00456
00457
00458 void Triangulation::_UpdateCovWeights(const double &TriangDeltaPixels,
00459                                       const double &sigma)
00460 {
00461   //AddDebugLevel(D_TRIANG_COVWEIGHT);
00462   _dTriangDeltaPixels = TriangDeltaPixels;
00463   _dTriangSigmaPixels = sigma;
00464
00465   BIASCDOUT(D_TRIANG_COVWEIGHT, "triangulating in window with "
00466             <<TriangDeltaPixels<<" using sigma "<<sigma<<endl);
00467   // initialize Gauss-weights
00468   for (int y=-1; y <= 1; y++){
00469     for (int x=-1; x <= 1; x++)  {
00470       // construct weight for deviation (0,1,2)
00471       cov_weights_[x+1][y+1] =
00472         exp(-((((double)y*TriangDeltaPixels)*((double)y*TriangDeltaPixels)
00473              +((double)x*TriangDeltaPixels)*((double)x*TriangDeltaPixels))/
00474              (2.0*sigma*sigma)));
00475
00476       BIASCDOUT(D_TRIANG_COVWEIGHT, (2.0*sigma*sigma)<<"\t"
00477                 <<(((double)y*TriangDeltaPixels)*
00478                        ((double)y*TriangDeltaPixels)+
00479                        ((double)x*TriangDeltaPixels)*
00480                        ((double)x*TriangDeltaPixels))<<"\t"
00481                 <<exp(-((((double)y*TriangDeltaPixels)*
00482                              ((double)y*TriangDeltaPixels)
00483                              +((double)x*TriangDeltaPixels)*
00484                              ((double)x*TriangDeltaPixels))/
00485                         (2.0*sigma*sigma)))<<endl);
00486       /*1.0/(TriangDeltaPixels*sqrt(2.0*M_PI)*sigma)*exp(-(abs(y)+ abs(x))/
00487           (2.0*sigma*sigma));*/
00488       BIASCDOUT(D_TRIANG_COVWEIGHT, "weight["<<x+1<<"]["<<y+1<<"] = "
00489                 <<cov_weights_[x+1][y+1]<<endl);
00490     }
00491   }
00492 }
00493
00494
00495 int
00496 Triangulation::GetCovariance2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00497                                HomgPoint2D& p2, HomgPoint3D &point3D,
00498                                Matrix3x3<double>& covariance,
00499                                const double &triangdeltapixel/*=1.0*/)
00500 {
00501 #ifdef BIAS_TRIANG_DEBUG
00502   covpoints_.clear();
00503   covweights_.clear();
00504 #endif
00505   int n=0, res;
00506   //cerr << "point3D: "<<point3D<<endl;
00507   p1.Homogenize();
00508   p2.Homogenize();
00509
00510   if (_dTriangDeltaPixels != triangdeltapixel){
00511     _UpdateCovWeights(triangdeltapixel);
00512   }
00513
00514   covariance.SetZero();
00515
00516   // loop over all combinations x around p1[0] and p2[0]
00517   // create point cloud of image variance 1 pixel and estimate
00518   // 3D covarianve from it
00519   HomgPoint3D X; //used in inner loop
00520   double sumweight = 0;
00521   double dist, angle, wl, weight;
00522
00523   HomgPoint2D p3, p4;
00524
00525   point3D.Homogenize();
00526   // loop around left pixel
00527   for (int yl=-1; yl <= 1; yl++)
00528     for (int xl=-1; xl <= 1; xl++) {
00529       p3.Set(p1[0] + (double)xl*triangdeltapixel,
00530              p1[1] + (double)yl*triangdeltapixel);
00531
00532       wl = cov_weights_[xl+1][yl+1];
00533
00534       // loop around right pixel
00535       for (int yr=-1; yr <= 1; yr++)
00536         for (int xr=-1; xr <= 1; xr++) {
00537           // construct total weight
00538           weight =wl*cov_weights_[xr+1][yr+1];
00539
00540           p4.Set(p2[0] + (double)xr*triangdeltapixel,
00541                  p2[1] + (double)yr*triangdeltapixel);
00542
00543           res = Triangulate2D(P1, P2, p3, p4, X, dist, angle);
00544
00545           if (res == 0) {
00546             X.Homogenize();
00547             n++;
00548 #ifdef BIAS_TRIANG_DEBUG
00549             covpoints_.push_back(X);
00550             covweights_.push_back(weight);
00551 #endif
00552             //cerr <<X<<" \t X / point3D "<< X[0] / point3D[0]<< " " <<
00553             // X[1] / point3D[1]<< " " << X[2] / point3D[2]<< " " <<dist<<endl;
00554             // now Outer product
00555             for (unsigned int i=0;i<3;i++) {
00556               for (unsigned int j=0;j<3;j++) {
00557                 covariance[i][j] +=
00558                   ((X - point3D)[i]) * ((X - point3D)[j]) * weight ;
00559               }
00560             }
00561             sumweight += weight;
00562           } else {
00563             BIASCDOUT(D_TR_INF, "B"); BIASFLUSHDOUT;
00564           }
00565         }
00566     }
00567   // cerr << endl;
00568   // normalize Cov
00569   if (sumweight!=0){
00570     covariance = covariance*(1.0/sumweight);
00571     // cerr << num_weights<<" weights, sum="<<sumweight<<endl;
00572     //     for (int i=0; i<3; i++)
00573     //       cerr << i<<": " << covariance[i][i] << "  ";
00574     //     cerr <<endl;
00575     //cerr << "point3D: "<<point3D<<" calculated cov from " << n << " points " << endl;
00576     return 0;
00577   } else {
00578     return -4;
00579   }
00580 }
00581
00582
00583 #ifdef BIAS_TRIANG_DEBUG
00584 void Triangulation::GetCovPoints(vector<HomgPoint3D>& pvec,
00585                                  vector<double>& weight)
00586 {
00587   vector<HomgPoint3D>::iterator pit;
00588   vector<double>::iterator dit;
00589   for (dit=covweights_.begin(), pit=covpoints_.begin(); pit!=covpoints_.end();
00590        pit++, dit++){
00591     pvec.push_back((*pit));
00592     weight.push_back((*dit));
00593   };
00594 }
00595 #endif
00596
00597 int
00598 Triangulation::GetCovarianceAnalytic(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00599                                      HomgPoint2D& p2, HomgPoint3D &point3D,
00600                                      Matrix3x3<double>& covariance,
00601                                      const double &triangdeltapixel,
00602                                      const double &sigma)
00603 {
00604   // for performance reasons, we dont want to homogenize each time
00605   // therefore rely on homogenized points and check in debug mode
00606 #ifdef BIAS_DEBUG
00607   if (!p1.IsHomogenized()) {
00608     BIASERR("Supplied unhomogenized point p1 for covariance computation !"<<
00609             " Fix this, since this is only checked in DEBUG mode. Aborting.");
00610     BIASABORT;
00611   }
00612   if (!p2.IsHomogenized()) {
00613     BIASERR("Supplied unhomogenized point p2 for covariance computation !"<<
00614             " Fix this, since this is only checked in DEBUG mode. Aborting.");
00615     BIASABORT;
00616   }
00617   if (!point3D.IsHomogenized()) {
00618     BIASERR("Supplied unhomogenized 3d point for covariance computation !"<<
00619             " Fix this, since this is only checked in DEBUG mode. Aborting.");
00620     BIASABORT;
00621   }
00622 #endif
00623
00624 #ifdef BIAS_TRIANG_DEBUG
00625   covpoints_.clear();
00626   covweights_.clear();
00627 #endif
00628
00629   if ((_dTriangDeltaPixels != triangdeltapixel)
00630       || (_dTriangSigmaPixels != sigma)) {
00631     _UpdateCovWeights(triangdeltapixel,sigma);
00632   }
00633
00634   covariance.SetZero();
00635
00636   // loop over all combinations x around p1[0] and p2[0]
00637   // create point cloud of image variance 1 pixel and estimate
00638   // 3D covarianve from it
00639   HomgPoint3D X; //used in inner loop
00640   double sumweight = 0;
00641
00642   // cout << "cov_weights_:"<<cov_weights_ << endl;
00643   HomgPoint2D p3, p4;
00644
00645   // loop around left pixel
00646   for (int yl=-1; yl <= 1; yl++)
00647     for (int xl=-1; xl <= 1; xl++) {
00648       p3.Set(p1[0] + (double)xl*triangdeltapixel,
00649              p1[1] + (double)yl*triangdeltapixel);
00650
00651       double wl = cov_weights_[xl+1][yl+1];
00652
00653       // loop around right pixel
00654       for (int yr=-1; yr <= 1; yr++)
00655         for (int xr=-1; xr <= 1; xr++) {
00656
00657
00658           p4.Set(p2[0] + (double)xr*triangdeltapixel,
00659                  p2[1] + (double)yr*triangdeltapixel);
00660
00661           //static int count=0;
00662           //cout << setw(3)<<count<<" : "<<p2<<"  "<<p3<<endl;
00663           //count++;
00664           if (Triangulate(P1, P2, p3, p4, X)==0) {
00665             // construct total weight
00666             register double weight = wl*cov_weights_[xr+1][yr+1];
00667
00668             // X.Homogenize(); // not necessary, since guaranteed
00669             // n++;
00670 #ifdef BIAS_TRIANG_DEBUG
00671             covpoints_.push_back(X);
00672             covweights_.push_back(weight);
00673 #endif
00674             //cerr <<"p3: "<<p3<<"\tp4: "<<p4<<"\tX "<<X<<"\tweight "<<weight<<endl;
00675
00676
00677             // optimized outer product implementation does this (I hope so):
00678             // for (unsigned int i=0;i<3;i++)
00679             //   for (unsigned int j=0;j<3;j++) {
00680             //     covariance[i][j] +=
00681             //       ((X - point3D)[i]) * ((X - point3D)[j]) * weight ;
00682             //   }
00683             register double DiffVec[3]; double tmp;
00684             // unrolled loop to compute diagonal elements:
00685             DiffVec[0]        = X[0]-point3D[0];
00686             covariance[0][0] += DiffVec[0] * DiffVec[0] * weight;
00687             DiffVec[1]        = X[1]-point3D[1];
00688             covariance[1][1] += DiffVec[1] * DiffVec[1] * weight;
00689             DiffVec[2]        = X[2]-point3D[2];
00690             covariance[2][2] += DiffVec[2] * DiffVec[2] * weight;
00691
00692             // non-diag elements of symmetric matrix:
00693             covariance[0][1] += tmp = DiffVec[0] * DiffVec[1] * weight ;
00694             covariance[1][0] += tmp;
00695             covariance[0][2] += tmp = DiffVec[0] * DiffVec[2] * weight ;
00696             covariance[2][0] += tmp;
00697             covariance[2][1] += tmp = DiffVec[2] * DiffVec[1] * weight ;
00698             covariance[1][2] += tmp;
00699
00700             sumweight += weight;
00701           }
00702         }
00703     }
00704   // cerr << endl;
00705   // normalize Cov
00706   if (sumweight != 0){
00707     //cout << "covariance "<<covariance<<endl;
00708     covariance = covariance*(1.0/sumweight);
00709     //     for (int i=0; i<3; i++)
00710     //       cerr << i<<": " << covariance[i][i] << "  ";
00711     //     cerr <<endl;
00712     //cerr << "point3D: "<<point3D<<" calculated cov from " << n << " points " << endl;
00713     //cout << "covariance calculation succeeded ("<<sumweight<<")"<<covariance<<endl;
00714     return 0;
00715   } else {
00716     //cout << "covariance calculation failed"<<endl;
00717     return -1;
00718   }
00719 }
00720
00721 Vector3<double>
00722 Triangulation::Intersect(Vector3<double> &a1, Vector3<double> &a2,
00723                          Vector3<double> &b1, Vector3<double> &b2)
00724 {
00725   Vector3<double> dirA=a2-a1, dirB=b2-b1; // direction vectors
00726 #ifdef BIAS_DEBUG
00727   if ( (dirA.NormL2()<=DBL_EPSILON) ||  (dirB.NormL2()<=DBL_EPSILON) )
00728     BIASERR("no valid intersection because of identical points");
00729 #endif
00730   dirA.Normalize();
00731   dirB.Normalize();
00732   Vector3<double> res;
00733   Triangulation::Intersect(a1,dirA, b1,dirB, res);
00734   return res;
00735 }
00736
00737 int
00738 Triangulation::GetCovariance(PMatrix& P1, PMatrix& P2,
00739                              const HomgPoint2D& p1,
00740                              const Matrix2x2<double>& cov1,
00741                              const HomgPoint2D& p2,
00742                              const Matrix2x2<double>& cov2,
00743                              HomgPoint3D& p, Matrix3x3<double>& cov,
00744                              const int num)
00745 {
00746   int res=0;
00747   Random ran((unsigned (time(NULL))));
00748   BIASASSERT(!p1.IsAtInfinity());
00749   BIASASSERT(!p2.IsAtInfinity());
00750   BIASASSERT(p1.IsHomogenized());
00751   BIASASSERT(p2.IsHomogenized());
00752
00753   Vector2<double> vp1(p1[0], p1[1]), vp2(p2[0], p2[1]);
00754   vector<Vector2<double> > ran1, ran2;
00755
00756   if (ran.GetNormalDistributed(vp1, cov1, num, ran1)!=0){
00757     BIASERR("invalid cov1 "<<cov1<<endl);
00758     res=-1;
00759   }
00760   if (ran.GetNormalDistributed(vp2, cov2, num, ran2)!=0){
00761     BIASERR("invalid cov2 "<<cov2<<endl);
00762     res=-2;
00763   }
00764   if (res!=0) return res;
00765
00766 #ifdef BIAS_DEBUG_T
00767   cout << "input1: "<<vp1<<"\n"<<cov1<<endl;
00768   Vector2<double> mr1(0.0, 0.0), mr2(0.0, 0.0);
00769   //cout << "ran1: ";
00770   for (int i=0; i<num; i++){
00771     //cout << ran1[i]<<" ";
00772     mr1+=ran1[i];
00773   }
00774   mr1/=(double)num;
00775   Matrix2x2<double> theCov(MatrixZero);
00776   for (int i=0; i<num; i++){
00777     //cout << ran1[i]<<" ";
00778     theCov += (ran1[i]-mr1).OuterProduct(ran1[i]-mr1);
00779   }
00780   theCov /= double(num-1);
00781   cout << "  mean1 "<<mr1<<" cov1="<<theCov<<endl;
00782
00783   cout << "input2: "<<vp2<<"\n"<<cov2<<endl;
00784   //cout << "ran2: ";
00785   for (int i=0; i<num; i++){
00786     //cout << ran2[i]<<" ";
00787     mr2+=ran2[i];
00788   }
00789   theCov.SetZero();
00790   mr2/=(double)num;
00791   for (int i=0; i<num; i++){
00792     //cout << ran2[i]<<" ";
00793     theCov += (ran2[i]-mr2).OuterProduct(ran2[i]-mr2);
00794   }
00795   theCov /= double(num-1);
00796   cout << "  mean2 "<<mr2<<" cov2="<<theCov<<endl;
00797 #endif
00798
00799
00800   HomgPoint2D tp1, tp2;
00801   vector<HomgPoint3D> vec3d;
00802   vec3d.reserve(num*num);
00803   HomgPoint3D tp3d;
00804
00805   p.Set(0.0, 0.0, 0.0, 0.0);
00806
00807   int i, j;
00808   for (i=num-1; i>=0; i--){
00809     for (j=num-1; j>=0; j--){
00810       tp1.Set(ran1[i][0], ran1[i][1]);
00811       tp2.Set(ran2[j][0], ran2[j][1]);
00812
00813       if (Triangulate(P1, P2, tp1, tp2, tp3d)==0) {
00814         BIASASSERT(tp3d.IsHomogenized());
00815         // implicitly count number of successfull triangulation in
00816         // w component of p
00817         p+=tp3d;
00818         //cout<<"tp3d "<<tp3d<<endl;
00819         vec3d.push_back(tp3d);
00820       } else {
00821         //cout<<"INF";
00822       }
00823     }
00824   }
00825
00826   int num_successfull = (int)rint(p[3]);
00827   BIASASSERT(num_successfull==(int)vec3d.size()); // just for debugging
00828
00829   // get mean by dividing by w component of p. It contains the number of
00830   // successfull triangulations
00831   p.Homogenize();
00832 #ifdef BIAS_DEBUG_T
00833   if (Triangulate(P1, P2, p1, p2, tp3d)!=0) {
00834     BIASERR("failed");
00835   }
00836   cout<<"mean of cloud is "<<p<<endl;
00837   cout<<"exact is "<<tp3d<<endl;
00838
00839 #endif
00840
00841   // now calculate variance
00842   cov.SetZero();
00843   vector<HomgPoint3D>::iterator it;
00844   register double dx, dy, dz;
00845   for (it=vec3d.begin(); it!=vec3d.end(); it++){
00846     dx = p[0]-(*it)[0];
00847     dy = p[1]-(*it)[1];
00848     dz = p[2]-(*it)[2];
00849
00850     cov[0][0] += dx*dx;
00851     cov[1][1] += dy*dy;
00852     cov[2][2] += dz*dz;
00853     cov[0][1] += dx*dy;
00854     cov[0][2] += dx*dz;
00855     cov[1][2] += dy*dz;
00856   }
00857   cov[1][0] = cov[0][1];
00858   cov[2][0] = cov[0][2];
00859   cov[2][1] = cov[1][2];
00860
00861   if (num_successfull>1) {
00862     cov /= double(num_successfull-1);
00863   }
00864   res = num_successfull;
00865
00866   return res;
00867 }
00868
00869 int
00870 Triangulation::Intersect(Vector3<double> &pA, Vector3<double> &dirA,
00871                          Vector3<double> &pB, Vector3<double> &dirB,
00872                          Vector3<double> &res)
00873 {
00874 #ifdef BIAS_DEBUG
00875   if ( (dirA.NormL2()<=DBL_EPSILON) ||  (dirB.NormL2()<=DBL_EPSILON) ) {
00876     BIASERR("no valid intersection because direction vector has length zero");
00877     return -2;
00878   }
00879 #endif
00880
00881   // get planes through origin, pA and dirA (also for B)
00882   Vector3<double> momA, momB, x;
00883   pA.CrossProduct(dirA,momA); //momA = a1 x dirA;
00884   pB.CrossProduct(dirB,momB); //momB = b1 x dirB;
00885
00886   // check whether dirA and dirB conincide
00887   dirA.CrossProduct(dirB,res);
00888   register double dummy,lambda;
00889   dummy = res.NormL2();
00890   lambda = dummy * dummy;
00891
00892   if (lambda<=DBL_EPSILON) {
00893 #ifdef BIAS_DEBUG
00894     BIASERR("cant intersect, lines are parallel");
00895 #endif
00896     res[0]=0;res[1]=0;res[2]=0;
00897     return -1;
00898   }
00899
00900   // old code, slow but possibly more readable:
00901   //   res= ( (res * momB) -
00902   //           ( (dirA * dirB) * (x * momA)) )
00903   //           ) /lambda
00904   //         ) * dirA + dirA.CrossProduct(momA);
00905
00906   dummy = ( (res * momB) - ( (dirA * dirB) * (res * momA)) ) / lambda;
00907   dirA.Multiply(dummy,res);
00908   dirA.CrossProduct(momA,x);
00909   res += x;
00910
00911   // res is the point with minimum distance on line A
00912   // now get the corresponding point on B:
00913   lambda = (res-pB)*dirB;
00914   x = pB + lambda*dirB;
00915
00916   // set intersection as the point in the middle of x and res
00917   res = 0.5*(res+x);
00918
00919   // if lambda<0 the point is in negative dirB,
00920   // that is, for dirB=optical axis: point is behind camera B
00921   if (lambda <0.0 ) return 1;
00922
00923   // check if point is behind camera A
00924   if (dirA.ScalarProduct(res-pA)<0.0) return 2;
00925
00926
00927   return 0;
00928 }
00929
00930 int
00931 Triangulation::Intersect(Vector3<double> &pA, Vector3<double> &dirA,
00932                          Vector3<double> &pB, Vector3<double> &dirB,
00933                          Vector3<double> &res, double &dist)
00934 {
00935 #ifdef BIAS_DEBUG
00936   if ( (dirA.NormL2()<=DBL_EPSILON) ||  (dirB.NormL2()<=DBL_EPSILON) ) {
00937     BIASERR("no valid intersection because direction vector has length zero");
00938     return -2;
00939   }
00940 #endif
00941   Vector3<double> momA, momB, x;
00942   pA.CrossProduct(dirA,momA); //momA = a1 x dirA;
00943   pB.CrossProduct(dirB,momB); //momA = a1 x dirA;
00944   dirA.CrossProduct(dirB,res);
00945   register double dummy,lambda;
00946   dummy = res.NormL2();
00947   lambda = dummy * dummy;
00948
00949   if (lambda<=DBL_EPSILON) {
00950 #ifdef BIAS_DEBUG
00951     BIASERR("cant intersect, lines are parallel");
00952 #endif
00953     res[0]=0;res[1]=0;res[2]=0;
00954     return -1;
00955   }
00956
00957   //   res= ( (res * momB) -
00958   //           ( (dirA * dirB) * (x * momA)) )
00959   //           ) /lambda
00960   //         ) * dirA + dirA.CrossProduct(momA);
00961   dummy = ( (res * momB) - ( (dirA * dirB) * (res * momA)) )  / lambda;
00962
00963   dirA.Multiply(dummy,res);
00964   dirA.CrossProduct(momA,x);
00965   res += x;
00966
00967
00968   // res is the point with minimum distance on line A
00969   // now get the correpsonding point on B:
00970   lambda=(res-pB)*dirB;
00971   x = pB + lambda*dirB;
00972   dist=(res-x).NormL2();
00973   res = 0.5*(res+x);
00974   if (lambda <0.0 ) return 1;
00975
00976   // check if point is behind camera A
00977   if (dirA.ScalarProduct(res-pA)<0.0) return 2;
00978
00979   return 0;
00980 }
00981
00982
00983
00984
00985
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/Triangulation.hh Source File

Geometry

Triangulation.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __Triangulation_hh__
00027 #define __Triangulation_hh__
00028 #include <bias_config.h>
00029 #include <Base/Common/BIASpragmaStart.hh>
00030 #include <vector>
00031
00032 #include <Base/Debug/Debug.hh>
00033 #include <Base/Geometry/HomgPoint2D.hh>
00034 #include <Base/Geometry/HomgPoint3D.hh>
00035 #include <Base/Math/Matrix3x3.hh>
00036 #include <Base/Math/Matrix4x4.hh>
00037 #include "PMatrix.hh"
00038 #include "FMatrix.hh"
00039
00040 // use  configure --enable-triang-debug instead
00041 //#define BIAS_TRIANG_DEBUG
00042
00043 /// minimal length of difference between two unit vectors
00044 /// befor there condsidered to be not parallel
00045 #define PARALLEL_THRESHOLD 1e-8
00046
00047 /// default step value left/right/up/down in pixels for triangulation
00048 #define TRIANGULATION_DEFAULT_DELTAPIXEL 1.0
00049 #define TRIANGULATION_DEFAULT_SIGMA 1.0
00050
00051 #define D_TR_POS        0x00000001 //1
00052 #define D_TR_TR         0x00000002 //2
00053 #define D_TR_ARG        0x00000004 //4
00054 #define D_TR_INF        0x00000008 // 8
00055 #define D_TR_OPT        0x00000010 // 16
00056 #define D_TR_OPT_TRANSF 0x00000020 // 32
00057 #define D_TR_OPT_F      0x00000040 // 64
00058 #define D_TRIANG_COVWEIGHT 0x000000080 // 128
00059
00060
00061 namespace BIAS{
00062   /** @class Triangulation
00063       @ingroup g_estimation
00064       @brief Class for triangulation of 3Dpoints from 2D matches.
00065       Covariance matrix (refering to an uncertainty ellipsoid) is computed also
00066
00067       all functions so far only for 2 images (no trifocal).
00068       @author: Felix Woelk and Jan Frahm */
00069   class BIASGeometry_EXPORT Triangulation : public Debug
00070   {
00071   public:
00072     Triangulation();
00073
00074     ~Triangulation();
00075
00076     /** @brief analytic correct intersection of two lines, point returned has
00077         minimum distance to both lines.
00078
00079         Lines have parametric description by point and direction.
00080         IMPORTANT: directions MUST BE normalized!!
00081         @return 0 in case of no errror, <0 if errors, 1 if intersection
00082         point lies not in direction of dirB, 2 if intersection
00083         point lies not in direction of dirA
00084
00085         Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108
00086         @author grest, Sept. 2003
00087     */
00088     int Intersect(Vector3<double> &pA, Vector3<double> &dirA,
00089                   Vector3<double> &pB, Vector3<double> &dirB,
00090                   Vector3<double> &res);
00091
00092     /** @brief analytic correct intersection of two lines, point returned has
00093         minimum distance to both lines, distance between lines is returned in
00094         dist.
00095
00096         Lines have parametric description by point and direction.
00097         IMPORTANT: directions MUST BE normalized!!
00098         @return 0 in case of no errror, <0 if errors, 1 if intersection
00099         point lies not in direction of dirB
00100         @attention sanity check regarding dirA is not done !
00101
00102         Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108
00103         @author grest, Sept. 2003
00104     */
00105     int Intersect(Vector3<double> &pA, Vector3<double> &dirA,
00106                   Vector3<double> &pB, Vector3<double> &dirB,
00107                   Vector3<double> &res, double &dist);
00108
00109     /** @brief analytic correct intersection of two lines, point returned has
00110         minimum distance to both lines.
00111
00112         Line A is described by points a1,a2 and line B by b1,b2
00113         Refer to Kanatani Statistical Opt. for Geometric Comp. ,page108
00114         @author grest, Sept. 2003
00115     */
00116     Vector3<double> Intersect(Vector3<double> &a1, Vector3<double> &a2,
00117                               Vector3<double> &b1, Vector3<double> &b2);
00118
00119     /** method from Hartley Zisserman chapter 12.5  pp 315
00120         first uses CorrectCorrespondences()
00121         and then calls TriangulateLinear()
00122         @author woelk 08/2004 */
00123     int Optimal(PMatrix &P1, PMatrix &P2, HomgPoint2D& p1, HomgPoint2D& p2,
00124                 HomgPoint3D& point3d);
00125
00126     /** @brief optimize 2d correspondences regarding F for triangulation
00127
00128         In projective reconstruction you have to optimize the
00129         correspondences regarding epipolar geometry for the 3d point to
00130         be projectively optimal before you use TriangulateLinear()
00131         See section Hartley/Zisserman "Multiple View Geometry",
00132         section "optimal triangulation", section 12.5, pp.315
00133
00134         if refine==true, a non linear optimization for the real roots of the
00135         6 degree polynomial is done using the powell algorithm from minpack
00136
00137         Hereby F maps point from image 1 into lines in image 2, i.e. F_{12}.
00138
00139         @author woelk 08/2004 heavily tested (ExampleTriangulateOptimal) */
00140     int CorrectCorrespondences(const FMatrix& F, HomgPoint2D& p1,
00141                                HomgPoint2D& p2, bool refine=false);
00142
00143     /** @brief Triangulates a 3d point without decomposition of P matrix, use
00144         this method in selfcalibration scenarios
00145
00146         Homogeneous DLT algorithm using SVD,
00147         see Hartley/Zisserman: "Multiple View Geometry", p.297
00148         For projective reconstructions first optimize 2d points using
00149         CorrectCorrespondences() regarding epipolar geometry
00150
00151         @attention NOT YET TESTED AT ALL, since CorrectCorrespondences missing
00152         @author koeser, 10/2003*/
00153     int TriangulateLinear(PMatrix &P1, PMatrix &P2,
00154                           HomgPoint2D& p1, HomgPoint2D& p2,
00155                           HomgPoint3D& point3d);
00156
00157
00158     /** @brief Triangulation for metric PMatrices (using C and Hinf)
00159         @attention Decomposition of PMatrix is used !
00160         @param point3d (output) guaranteed to be homogenized, inf causes error
00161         @return 0 on success \n <0 on error \n >0 if point is behind a camera
00162         @status tested, Daniel Grest */
00163     int Triangulate(PMatrix &P1, PMatrix &P2,
00164                     const HomgPoint2D& p1, const HomgPoint2D& p2,
00165                     HomgPoint3D& point3d);
00166
00167     /** @brief does not use BackprojectPseudoInverse but get NormRayWorldCoo
00168
00169     Also calculates the minimal distance between the two rays (dist)
00170     and the cos of the angle between the two rays (angle) (scalarproduct)
00171     input: P1, P2, p1, p2
00172     output: point3d, dist
00173     @return  0  on success
00174     -1  if interpolated point lies behind the cameras
00175     -2  if lines do not intersect
00176     -3  if camera center not extractable from P
00177     (faster) @author Woelk 11 2002 */
00178     int Triangulate2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00179                       HomgPoint2D& p2, HomgPoint3D& point3d, double& dist,
00180                       double& angle);
00181
00182     /** @brief as above, but also determines the covariance matrix
00183         @return -4  if GetCovariance2D failed
00184         @author Woelk 11 2002 */
00185     int Triangulate2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00186                       HomgPoint2D& p2, HomgPoint3D& point3d,
00187                       Matrix3x3<double>& CovMatrix, double& dist,
00188                       double& angle, const double &triangdeltapixel =
00189                       TRIANGULATION_DEFAULT_DELTAPIXEL);
00190
00191     /** @brief Calculates and returns the uncertainty as normalized
00192         covariance matrix in 'covariance'.
00193
00194         It is calculated by triangulation of all neighboring
00195         pixels within +- triangdeltapixel of p1 and p2 and taking the variance
00196         with 'point'.
00197         Uses Triangulate2D.
00198         returns 0 in case of success
00199         returns -4 in case of error (too little triangulations succeeded)
00200         @author Daniel Grest, Oct 2002
00201         @status tested */
00202     int GetCovariance2D(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00203                         HomgPoint2D& p2, HomgPoint3D &point3D,
00204                         Matrix3x3<double>& covariance,
00205                         const double &triangdeltapixel =
00206                         TRIANGULATION_DEFAULT_DELTAPIXEL);
00207
00208     /** @brief Calculates and returns the uncertainty as normalized
00209         covariance matrix in 'covariance'.
00210
00211         It is calculated by triangulation of all neighboring
00212         pixels within +- triangdeltapixel of p1 and p2 and taking the variance
00213         with 'point'.
00214         Uses Triangulate.
00215         @author Daniel Grest, Oct 2002
00216         @param P1 PMatrix for image one
00217         @param P1 PMatrix for image two
00218         @param p1 Homogenized(!) point in image one
00219         @param p2 Homogenized(!) point in image two
00220         @param triangdeltapixel offset in all directions and both images
00221         @status tested
00222         @return 0 in case of success, <0 otherwise */
00223     int GetCovarianceAnalytic(PMatrix& P1, PMatrix& P2, HomgPoint2D& p1,
00224                               HomgPoint2D& p2, HomgPoint3D &point3D,
00225                               Matrix3x3<double>& covariance,
00226                               const double &triangdeltapixel =
00227                               TRIANGULATION_DEFAULT_DELTAPIXEL,
00228                               const double &sigma=
00229                               TRIANGULATION_DEFAULT_SIGMA);
00230
00231     /** @brief returns an approximation to the 3D point p with uncertainty
00232         cov as derived from the 2D points p1 and p2 with uncertainties
00233         cov1 and cov2
00234
00235         Generates randomly num 2D coordinates distributed according to cov1
00236         centered around p1 and num 2D coordinates distributed according to
00237         cov2 centered around p2. For every possible combination of these two
00238         2D point clouds a 3D point is triangulated resulting in a 3D point
00239         cloud of maximum num*num points. The mean and the covariance of this
00240         3D point cloud is calculated and returned in p (mean) and cov.
00241         The 3D point p, which is the mean of the point cloud, is generally
00242         *not*  aequivalent to the 3D point resulting from simple triangulation
00243         using p1 and p2.
00244
00245         The 2D points p1 and p2 must be homogenized and are not allowed to be
00246         at infinity.
00247
00248         !! untested !!
00249
00250         @returns the number of points in 3D cloud. The covariance of the 3D
00251         approximation cov is only valid if *more* than 1 point was triangulated
00252
00253         @author woelk 07/2005 */
00254     int GetCovariance(PMatrix& P1, PMatrix& P2,
00255                       const HomgPoint2D& p1, const Matrix2x2<double>& cov1,
00256                       const HomgPoint2D& p2, const Matrix2x2<double>& cov2,
00257                       HomgPoint3D& p, Matrix3x3<double>& cov, const int num);
00258
00259
00260 #ifdef BIAS_TRIANG_DEBUG
00261     void GetCovPoints(std::vector<HomgPoint3D>& pvec,
00262                       std::vector<double>& weight);
00263 #endif
00264
00265
00266
00267   protected:
00268     /** @brief called by constructor to set up neighbourhood weights for
00269         covariance computation */
00270     void _UpdateCovWeights(const double &TriangDeltaPixels=
00271                            TRIANGULATION_DEFAULT_DELTAPIXEL,
00272                            const double &sigma=
00273                            TRIANGULATION_DEFAULT_SIGMA);
00274
00275     /// neighbourhood weights for covariance computation
00276     Matrix3x3<double>  cov_weights_;
00277     /// value to go up/down/left/right for "manual" covariance computation
00278     double _dTriangDeltaPixels;
00279     double _dTriangSigmaPixels;
00280 #ifdef BIAS_TRIANG_DEBUG
00281     std::vector<HomgPoint3D> covpoints_;
00282     std::vector<double> covweights_;
00283 #endif
00284   };
00285
00286
00287 } // namespace
00288
00289
00290 #include <Base/Common/BIASpragmaEnd.hh>
00291
00292 #endif // __Triangulation_hh__
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TrifocalTensor.cpp Source File

Geometry

TrifocalTensor.cpp

Go to the documentation of this file.
00001 #include "TrifocalTensor.hh"
00002 #include <Base/Debug/DebugSimple.hh>
00003 #include <MathAlgo/SVD.hh>
00004
00005 using namespace std;
00006 using namespace BIAS;
00007
00008
00009 TrifocalTensor::TrifocalTensor()
00010 {
00011   Init();
00012 }
00013
00014
00015 TrifocalTensor::~TrifocalTensor()
00016 {
00017 }
00018
00019
00020 TrifocalTensor::TrifocalTensor(BIAS::PMatrix &P1, BIAS::PMatrix &P2,
00021                                BIAS::PMatrix &P3)
00022 {
00023   Init();
00024   Compose( P1, P2, P3 );
00025 }
00026
00027
00028 TrifocalTensor::TrifocalTensor(BIAS::PMatrix &P2, BIAS::PMatrix &P3)
00029 {
00030   Init();
00031   Compose( P2, P3 );
00032 }
00033
00034
00035 void TrifocalTensor::Init()
00036 {
00037   Epipole21_ = NULL;
00038   Epipole31_ = NULL;
00039 }
00040
00041
00042 void TrifocalTensor::Compose(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3)
00043 {
00044   if ( P1.IsIdentity() ) Compose( P2, P3 ); // P1 is canonical ( P1=[I|0] )
00045   P1.GetCanonicalH(CanH_);
00046   PMatrix P2c(P2 * CanH_);
00047   PMatrix P3c(P3 * CanH_);
00048 //   COUT("new P2 is " << P2c << endl);
00049 //   COUT("new P3 is " << P3c << endl);
00050   Compose( P2c, P3c );
00051 }
00052
00053
00054 void TrifocalTensor::Compose(BIAS::PMatrix &P2, BIAS::PMatrix &P3)
00055 {
00056   Matrix3x3<TRIFOCALTENSOR_TYPE> T[3];
00057   Vector3<double> a,b,c,d;
00058   for(int i=0;i<3;i++)
00059     {
00060       a = P2.GetCol(i);
00061       b = P3.GetCol(3);
00062       c = P2.GetCol(3);
00063       d = P3.GetCol(i);
00064       T[i] = a.OuterProduct(b) - c.OuterProduct(d);
00065     }
00066   SetFromMatrices( T[0], T[1], T[2] );
00067 }
00068
00069
00070 void TrifocalTensor::ComputeEpipoles()
00071 {
00072   if ( Epipole21_!=NULL ) delete Epipole21_;
00073   if ( Epipole31_!=NULL ) delete Epipole31_;
00074   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00075   Vector<TRIFOCALTENSOR_TYPE> u1(3),u2(3),u3(3);
00076   Vector<TRIFOCALTENSOR_TYPE> v1(3),v2(3),v3(3);
00077
00078   GetMatrices(T1, T2, T3);
00079
00080   SVD svd1(T1);
00081   SVD svd2(T2);
00082   SVD svd3(T3);
00083
00084   // compute u_i^\top T_i = 0^\top
00085   u1 = svd1.GetLeftNullvector();
00086   u2 = svd2.GetLeftNullvector();
00087   u3 = svd3.GetLeftNullvector();
00088
00089   // compute T_i v_i = 0
00090   v1 = svd1.GetNullvector();
00091   v2 = svd2.GetNullvector();
00092   v3 = svd3.GetNullvector();
00093
00094   // compose [u1,u2,u3]
00095   Matrix3x3<TRIFOCALTENSOR_TYPE> U;
00096   U[0][0] = u1[0]; U[0][1] = u2[0]; U[0][2] = u3[0];
00097   U[1][0] = u1[1]; U[1][1] = u2[1]; U[1][2] = u3[1];
00098   U[2][0] = u1[2]; U[2][1] = u2[2]; U[2][2] = u3[2];
00099
00100   // compose [v1,v2,v3]
00101   Matrix3x3<TRIFOCALTENSOR_TYPE> V;
00102   V[0][0] = v1[0]; V[0][1] = v2[0]; V[0][2] = v3[0];
00103   V[1][0] = v1[1]; V[1][1] = v2[1]; V[1][2] = v3[1];
00104   V[2][0] = v1[2]; V[2][1] = v2[2]; V[2][2] = v3[2];
00105
00106   SVD svdu(U);
00107   SVD svdv(V);
00108
00109   // e'^\top [u1,u2,u3] = 0
00110   Epipole21_ = new HomgPoint2D(svdu.GetLeftNullvector());
00111   // e''^\top [v1,v2,v3] = 0
00112   Epipole31_ = new HomgPoint2D(svdv.GetLeftNullvector());
00113 }
00114
00115 HomgPoint2D TrifocalTensor::GetEpipole21( bool ForceReCalc )
00116 {
00117   if ( Epipole21_==NULL || ForceReCalc ) ComputeEpipoles();
00118   return *Epipole21_;
00119 }
00120
00121
00122 HomgPoint2D TrifocalTensor::GetEpipole31( bool ForceReCalc )
00123 {
00124   if ( Epipole31_==NULL || ForceReCalc ) ComputeEpipoles();
00125   return *Epipole31_;
00126 }
00127
00128 FMatrix TrifocalTensor::GetFMatrix21( bool ForceReCalc )
00129 {
00130   FMatrix F;
00131   Vector3<TRIFOCALTENSOR_TYPE> f1,f2,f3,tmp;
00132   HomgPoint2D e2 = GetEpipole21(ForceReCalc);
00133   HomgPoint2D e3 = GetEpipole31();
00134   Vector3<TRIFOCALTENSOR_TYPE> e21(e2[0],e2[1],e2[2]);
00135   Vector3<TRIFOCALTENSOR_TYPE> e31(e3[0],e3[1],e3[2]);
00136
00137   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00138   GetMatrices(T1, T2, T3);
00139
00140   T1.Mult(e31,tmp);
00141   f1 = e21.CrossProduct(tmp);
00142   T2.Mult(e31,tmp);
00143   f2 = e21.CrossProduct(tmp);
00144   T3.Mult(e31,tmp);
00145   f3 = e21.CrossProduct(tmp);
00146
00147   F[0][0] = f1[0]; F[0][1] = f2[0]; F[0][2] = f3[0];
00148   F[1][0] = f1[1]; F[1][1] = f2[1]; F[1][2] = f3[1];
00149   F[2][0] = f1[2]; F[2][1] = f2[2]; F[2][2] = f3[2];
00150
00151   return F;
00152 }
00153
00154
00155 FMatrix TrifocalTensor::GetFMatrix31( bool ForceReCalc )
00156 {
00157   FMatrix F;
00158   Vector3<TRIFOCALTENSOR_TYPE> f1,f2,f3,tmp;
00159   HomgPoint2D e2 = GetEpipole21(ForceReCalc);
00160   HomgPoint2D e3 = GetEpipole31();
00161   Vector3<TRIFOCALTENSOR_TYPE> e21(e2[0],e2[1],e2[2]);
00162   Vector3<TRIFOCALTENSOR_TYPE> e31(e3[0],e3[1],e3[2]);
00163
00164   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00165   GetMatrices(T1, T2, T3);
00166
00167   T1.Mult(e21,tmp);
00168   f1 = e31.CrossProduct(tmp);
00169   T2.Mult(e21,tmp);
00170   f2 = e31.CrossProduct(tmp);
00171   T3.Mult(e21,tmp);
00172   f3 = e31.CrossProduct(tmp);
00173
00174   F[0][0] = f1[0]; F[0][1] = f2[0]; F[0][2] = f3[0];
00175   F[1][0] = f1[1]; F[1][1] = f2[1]; F[1][2] = f3[1];
00176   F[2][0] = f1[2]; F[2][1] = f2[2]; F[2][2] = f3[2];
00177
00178   return F;
00179 }
00180
00181
00182 PMatrix TrifocalTensor::GetPMatrix2( bool ForceReCalc )
00183 {
00184   PMatrix P;
00185   HomgPoint2D e2 = GetEpipole21(ForceReCalc);
00186   HomgPoint2D e3 = GetEpipole31();
00187   e2.Normalize();
00188   e3.Normalize();
00189   Vector3<TRIFOCALTENSOR_TYPE> e31(e3[0],e3[1],e3[2]);
00190   Vector3<TRIFOCALTENSOR_TYPE> p1,p2,p3;
00191
00192   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00193   GetMatrices(T1, T2, T3);
00194
00195   T1.Mult(e31,p1);
00196   T2.Mult(e31,p2);
00197   T3.Mult(e31,p3);
00198
00199   P[0][0] = p1[0]; P[0][1] = p2[0]; P[0][2] = p3[0]; P[0][3] = e2[0];
00200   P[1][0] = p1[1]; P[1][1] = p2[1]; P[1][2] = p3[1]; P[1][3] = e2[1];
00201   P[2][0] = p1[2]; P[2][1] = p2[2]; P[2][2] = p3[2]; P[2][3] = e2[2];
00202
00203   return P;
00204 }
00205
00206
00207 PMatrix TrifocalTensor::GetPMatrix3( bool ForceReCalc )
00208 {
00209   PMatrix P;
00210   HomgPoint2D e2 = GetEpipole21(ForceReCalc);
00211   HomgPoint2D e3 = GetEpipole31();
00212   e2.Normalize();
00213   e3.Normalize();
00214   Vector3<TRIFOCALTENSOR_TYPE> e21(e2[0],e2[1],e2[2]);
00215   Vector3<TRIFOCALTENSOR_TYPE> p1,p2,p3,tmp;
00216
00217   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00218   GetMatrices(T1, T2, T3);
00219   T1 = T1.Transpose();
00220   T2 = T2.Transpose();
00221   T3 = T3.Transpose();
00222
00223   Matrix3x3<TRIFOCALTENSOR_TYPE> M;
00224   // compute [e''e''^\top-I]
00225   M[0][0] = e3[0]*e3[0]-1; M[0][1] = e3[1]*e3[0];   M[0][2] = e3[2]*e3[0];
00226   M[1][0] = e3[0]*e3[1];   M[1][1] = e3[1]*e3[1]-1; M[1][2] = e3[2]*e3[1];
00227   M[2][0] = e3[0]*e3[2];   M[2][1] = e3[1]*e3[2];   M[2][2] = e3[2]*e3[2]-1;
00228
00229   T1.Mult(e21,tmp);
00230   M.Mult(tmp,p1);
00231   T2.Mult(e21,tmp);
00232   M.Mult(tmp,p2);
00233   T3.Mult(e21,tmp);
00234   M.Mult(tmp,p3);
00235
00236   P[0][0] = p1[0]; P[0][1] = p2[0]; P[0][2] = p3[0]; P[0][3] = e3[0];
00237   P[1][0] = p1[1]; P[1][1] = p2[1]; P[1][2] = p3[1]; P[1][3] = e3[1];
00238   P[2][0] = p1[2]; P[2][1] = p2[2]; P[2][2] = p3[2]; P[2][3] = e3[2];
00239
00240   return P;
00241 }
00242
00243
00244 void
00245 TrifocalTensor::GetEpipolarLines(Vector3<TRIFOCALTENSOR_TYPE> &Point1,
00246                                  HomgLine2D &Line2,
00247                                  HomgLine2D &Line3)
00248 {
00249   Matrix3x3<TRIFOCALTENSOR_TYPE> M = LeftContravariantContraction1(Point1);
00250
00251   SVD svd(M);
00252
00253   Line2 = HomgLine2D(svd.GetLeftNullvector());
00254   Line3 = HomgLine2D(svd.GetNullvector());
00255 }
00256
00257
00258 HomgPoint2D TrifocalTensor::TransferView3(Vector3<TRIFOCALTENSOR_TYPE> &x1,
00259                                           Vector3<TRIFOCALTENSOR_TYPE> &x2)
00260 {
00261   HomgPoint2D p1(x1);
00262   HomgPoint2D p2(x2);
00263   p1.Normalize();
00264   p2.Normalize();
00265
00266   // compute epipolar line of x1 in view 2
00267   HomgLine2D le(GetFMatrix21() * p1);
00268   //cout << "le = " << le << endl;
00269
00270   /* make line perpendicular and passing thru x2, as the epipolar line is
00271      not good for transfer */
00272   HomgLine2D l2;
00273   le.GetPerpendicularLine(p2,l2);
00274
00275   //cout << "l2 = " << l2 << endl;
00276
00277   //cout << "l2*x2=" << l2.ScalarProduct(p2) << endl;;
00278
00279   Vector3<TRIFOCALTENSOR_TYPE> x3;
00280   LeftContravariantContraction2(l2).TransposedMult(x1,x3);
00281
00282   return HomgPoint2D(x3);
00283 }
00284
00285 TrifocalTensor& TrifocalTensor::operator=(const TrifocalTensor& t)
00286 {
00287   TrifocalTensorBase::operator=(t);
00288   return *this;
00289 }
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Geometry/TrifocalTensor.hh Source File

Geometry

TrifocalTensor.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __TrifocalTensor_hh__
00027 #define __TrifocalTensor_hh__
00028
00029 #include <Base/Geometry/TrifocalTensorBase.hh>
00030 #include <Base/Geometry/HomgPoint2D.hh>
00031 #include <Base/Math/Matrix4x4.hh>
00032 #include <Geometry/PMatrix.hh>
00033 #include <Geometry/FMatrix.hh>
00034
00035 namespace BIAS {
00036
00037   class BIASGeometry_EXPORT TrifocalTensor : public TrifocalTensorBase
00038   {
00039   public:
00040     TrifocalTensor();
00041     ~TrifocalTensor();
00042     TrifocalTensor(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3);
00043     TrifocalTensor(BIAS::PMatrix &P2, BIAS::PMatrix &P3);
00044     void Init();
00045
00046     /** Composes the trifocal tensor from three 3x4 camera matrices.
00047         @author Matthias Dunda */
00048     void Compose(BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3);
00049
00050     /** Composes the trifocal tensor from two 3x4 camera matrices,
00051         assuming that P1=[I | 0].
00052         @author Matthias Dunda */
00053     void Compose(BIAS::PMatrix &P2, BIAS::PMatrix &P3);
00054
00055     /** @return the canonical H matrix that is computed when composing
00056         from three camera-matrices with P1 != [I|0]
00057         @author mdunda 01 2004 */
00058     inline BIAS::Matrix4x4<PMATRIX_TYPE> GetCanonicalH() const {return CanH_;}
00059
00060     // epipoles -----------------------------------------------------------
00061     /** @return epipole in the second view according to the first
00062         @param  ForceReCalc forces a recalculation although a value is cached
00063         @author Matthias Dunda */
00064     BIAS::HomgPoint2D GetEpipole21( bool ForceReCalc=false );
00065
00066     /** @return epipole in the third view according to the first
00067         @param  ForceReCalc forces a recalculation although a value is cached
00068         @author Matthias Dunda */
00069     BIAS::HomgPoint2D GetEpipole31( bool ForceReCalc=false );
00070
00071     void GetEpipolarLines(Vector3<TRIFOCALTENSOR_TYPE> &Point1,
00072                           HomgLine2D &Line2,
00073                           HomgLine2D &Line3);
00074
00075     // F-matrices ---------------------------------------------------------
00076     /** @return the F-matrix between the first and the second view
00077         @param  ForceReCalc forces a recalculation although a value is cached
00078         @author Matthias Dunda */
00079     BIAS::FMatrix GetFMatrix21( bool ForceReCalc=false );
00080     /** @return the F-matrix between the first and the third view
00081         @param  ForceReCalc forces a recalculation although a value is cached
00082         @author Matthias Dunda */
00083     BIAS::FMatrix GetFMatrix31( bool ForceReCalc=false );
00084
00085     // P-matrices ---------------------------------------------------------
00086     /** @return the P-matrix for the second view (assuming P1=[I|0])
00087         @param  ForceReCalc forces a recalculation although a value is cached
00088         @author Matthias Dunda */
00089     BIAS::PMatrix GetPMatrix2( bool ForceReCalc=false );
00090     /** @return the P-matrix for the third view (assuming P1=[I|0])
00091         @param  ForceReCalc forces a recalculation although a value is cached
00092         @author Matthias Dunda */
00093     BIAS::PMatrix GetPMatrix3( bool ForceReCalc=false );
00094
00095     // Transfer -----------------------------------------------------------
00096     /** @return the transferred point in the third view given points
00097         in the first and second view
00098         @author mdunda */
00099     HomgPoint2D TransferView3(Vector3<TRIFOCALTENSOR_TYPE> &x1,
00100                               Vector3<TRIFOCALTENSOR_TYPE> &x2);
00101
00102     TrifocalTensor& operator=(const TrifocalTensor& t);
00103
00104   protected:
00105     BIAS::Matrix4x4<PMATRIX_TYPE> CanH_;
00106     BIAS::HomgPoint2D *Epipole21_;
00107     BIAS::HomgPoint2D *Epipole31_;
00108     void ComputeEpipoles();
00109
00110   }; // class
00111
00112 } // namespace
00113
00114
00115 #endif /* __TrifocalTensor_hh__ */
00116
Generated on Wed Jun 21 19:01:03 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/TrifocalTensorBase.cpp Source File

Base » Geometry

TrifocalTensorBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "TrifocalTensorBase.hh"
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 TrifocalTensorBase::TrifocalTensorBase()
00032   : Tensor3D3x3x3<double>()
00033 {}
00034
00035 TrifocalTensorBase::TrifocalTensorBase(const TrifocalTensorBase& t)
00036   : Tensor3D3x3x3<double>(t)
00037 {}
00038
00039 TrifocalTensorBase::~TrifocalTensorBase()
00040 {}
00041
00042
00043 void TrifocalTensorBase::Dump()
00044 {
00045   Matrix3x3<TRIFOCALTENSOR_TYPE> T1,T2,T3;
00046   GetMatrices(T1,T2,T3);
00047   cout << "TRIFOCAL TENSOR [T1,T2,T3]: " << endl;
00048   cout << " T1 = " << T1 << endl;
00049   cout << " T2 = " << T2 << endl;
00050   cout << " T3 = " << T3 << endl;
00051 }
00052
00053
00054 void TrifocalTensorBase::Compose(RMatrixBase& R1, RMatrixBase& R2,
00055                                  RMatrixBase& R3,
00056                                  Vector3<double>& C1, Vector3<double>& C2,
00057                                  Vector3<double>& C3)
00058 {
00059   RMatrixBase R2n, R3n, R1i;
00060   Vector3<double> C2n, C3n;
00061   R1i=R1.Transpose();
00062   R1i.Mult(R2, R2n); // R2n = R1i * R2
00063   R1i.Mult(R3, R3n); // R3n = R1i * R3
00064   R1i.Mult((C2 - C1), C2n); // C2n = R1i * (C2 - C1)
00065   R1i.Mult((C3 - C1), C3n); // C3n = R1i * (C3 - C1)
00066   Compose(R2n, R3n, C2n, C3n);
00067 }
00068
00069 void
00070 TrifocalTensorBase::Compose(RMatrixBase& R1, RMatrixBase& R2, RMatrixBase& R3,
00071                             HomgPoint3D& C1, HomgPoint3D& C2, HomgPoint3D& C3)
00072 {
00073   Vector3<double> c1, c2, c3;
00074   C1.GetEuclidian(c1);
00075   C2.GetEuclidian(c2);
00076   C3.GetEuclidian(c3);
00077   Compose(R1, R2, R3, c1, c2, c3);
00078 }
00079
00080 void TrifocalTensorBase::Compose(RMatrixBase& R2, RMatrixBase& R3,
00081                                  Vector3<double>& C2, Vector3<double>& C3)
00082 {
00083   //cerr << "composition from : "<<R2<<"\n"<<R3<<"\n"<<C2<<"\n"<<C3<<endl;
00084   Matrix3x3<double> T1, T2, T3, M;
00085   Vector3<double> a1, a2, a3, b1, b2, b3, RC2, RC3;
00086   R2.GetRow(0, a1); // a1=R2.GetRow(0);
00087   R2.GetRow(1, a2); // a2=R2.GetRow(1);
00088   R2.GetRow(2, a3); // a3=R2.GetRow(2);
00089   R3.GetRow(0, b1); // b1=R3.GetRow(0);
00090   R3.GetRow(1, b2); // b2=R3.GetRow(1);
00091   R3.GetRow(2, b3); // b3=R3.GetRow(2);
00092
00093   R2.Transpose().Mult(C2, RC2); //RC2=R2.Transpose()*C2;
00094   R3.Transpose().Mult(C3, RC3); //RC3=R3.Transpose()*C3;
00095   //T1=a1.OuterProduct(RC3) - RC2.OuterProduct(b1);
00096   a1.OuterProduct(RC3, T1);
00097   RC2.OuterProduct(b1, M);
00098   T1-=M;
00099   //T2=a2.OuterProduct(RC3) - RC2.OuterProduct(b2);
00100   a2.OuterProduct(RC3, T2);
00101   RC2.OuterProduct(b2, M);
00102   T2-=M;
00103   //T3=a3.OuterProduct(RC3) - RC2.OuterProduct(b3);
00104   a3.OuterProduct(RC3, T3);
00105   RC2.OuterProduct(b3, M);
00106   T3-=M;
00107
00108   SetFromMatrices(T1, T2, T3);
00109 }
00110
00111 void
00112 TrifocalTensorBase::Compose(RMatrixBase& R2, RMatrixBase& R3,
00113                             HomgPoint3D& C2, HomgPoint3D& C3)
00114 {
00115   Vector3<double> c2, c3;
00116   C2.GetEuclidian(c2);
00117   C3.GetEuclidian(c3);
00118   Compose(R2, R3, c2, c3);
00119 }
00120
00121
00122 void TrifocalTensorBase::CheckPointCorr(HomgPoint2D& p1, HomgPoint2D& p2,
00123                                         HomgPoint2D& p3,
00124                                         Matrix3x3<double>& res)
00125 {
00126   //  aequivalent to:
00127   //   Matrix3x3<double> p2x, p3x, T1, T2, T3;
00128   //   GetMatrices(T1, T2, T3);
00129   //   p2x.SetAsCrossProductMatrix(p2);
00130   //   p3x.SetAsCrossProductMatrix(p3);
00131   //   res = p2x * ((p1[0] * T1)+(p1[1] * T2)+(p1[2] * T3)) * p3x;
00132   HomgPoint2D x1 = p1;
00133   HomgPoint2D x2 = p2;
00134   HomgPoint2D x3 = p3;
00135
00136   x1.Normalize();
00137   x2.Normalize();
00138   x3.Normalize();
00139
00140   Matrix3x3<double> p2x, p3x, cont, tmp;
00141   p2x.SetAsCrossProductMatrix(x2);
00142   p3x.SetAsCrossProductMatrix(x3);
00143   LeftContravariantContraction1(x1, cont);
00144   p2x.Mult(cont, tmp);
00145   tmp.Mult(p3x, res);
00146 }
00147
00148 TrifocalTensorBase& TrifocalTensorBase::operator=(const TrifocalTensorBase& t)
00149 {
00150   Tensor3D3x3x3<double>::operator=(t);
00151   return *this;
00152 }
00153
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Geometry/TrifocalTensorBase.hh Source File

Base » Geometry

TrifocalTensorBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __TrifocalTensorBase_hh__
00027 #define __TrifocalTensorBase_hh__
00028
00029 #include <Base/Math/Tensor3D3x3x3.hh>
00030 #include <Base/Math/Matrix3x3.hh>
00031 #include <Base/Math/Vector3.hh>
00032 #include <Base/Geometry/RMatrixBase.hh>
00033 #include <Base/Geometry/PMatrixBase.hh>
00034 #include <Base/Geometry/HomgPoint2D.hh>
00035 #include <Base/Geometry/HomgPoint3D.hh>
00036
00037
00038 #define TRIFOCALTENSOR_TYPE double
00039
00040 namespace BIAS {
00041
00042   class BIASGeometryBase_EXPORT TrifocalTensorBase : public Tensor3D3x3x3<TRIFOCALTENSOR_TYPE>
00043   {
00044   public:
00045     TrifocalTensorBase();
00046     TrifocalTensorBase(const TrifocalTensorBase& t);
00047
00048     ~TrifocalTensorBase();
00049
00050     void Dump();
00051
00052     /** composition for "normalized" (with K^-1) image points */
00053     void Compose(RMatrixBase& R1, RMatrixBase& R2, RMatrixBase& R3,
00054                  Vector3<double>& C1, Vector3<double>& C2,
00055                  Vector3<double>& C3);
00056     void Compose(RMatrixBase& R1, RMatrixBase& R2, RMatrixBase& R3,
00057                  HomgPoint3D& C1, HomgPoint3D& C2, HomgPoint3D& C3);
00058
00059     /** composition for R1=I and C1=0 */
00060     void Compose(RMatrixBase& R2, RMatrixBase& R3, Vector3<double>& C2,
00061                  Vector3<double>& C3);
00062     void Compose(RMatrixBase& R2, RMatrixBase& R3,
00063                  HomgPoint3D& C2, HomgPoint3D& C3);
00064
00065     void CheckPointCorr(HomgPoint2D& p1, HomgPoint2D& p2, HomgPoint2D& p3,
00066                         Matrix3x3<double>& res);
00067
00068
00069
00070     TrifocalTensorBase& operator=(const TrifocalTensorBase& t);
00071
00072   protected:
00073
00074   }; // class
00075
00076
00077
00078 } // namespace
00079
00080
00081
00082 #endif // __TrifocalTensorBase_hh__
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/trisolve.h Source File

Base » Math » tnt

trisolve.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 // Triangular Solves
00035
00036 #ifndef TRISLV_H
00037 #define TRISLV_H
00038
00039
00040 #include "triang.h"
00041
00042 namespace TNT
00043 {
00044
00045 template <class MaTriX, class VecToR>
00046 VecToR Lower_triangular_solve(/*const*/ MaTriX &A, /*const*/ VecToR &b)
00047 {
00048     Subscript N = A.num_rows();
00049
00050     // make sure matrix sizes agree; A must be square
00051
00052     assert(A.num_cols() == N);
00053     assert(b.dim() == N);
00054
00055     VecToR x(N);
00056
00057     Subscript i;
00058     for (i=1; i<=N; i++)
00059     {
00060         typename MaTriX::element_type tmp=0;
00061
00062         for (Subscript j=1; j<i; j++)
00063                 tmp = tmp + A(i,j)*x(j);
00064
00065         x(i) =  (b(i) - tmp)/ A(i,i);
00066     }
00067
00068     return x;
00069 }
00070
00071
00072 template <class MaTriX, class VecToR>
00073 VecToR Unit_lower_triangular_solve(/*const*/ MaTriX &A, /*const*/ VecToR &b)
00074 {
00075     Subscript N = A.num_rows();
00076
00077     // make sure matrix sizes agree; A must be square
00078
00079     assert(A.num_cols() == N);
00080     assert(b.dim() == N);
00081
00082     VecToR x(N);
00083
00084     Subscript i;
00085     for (i=1; i<=N; i++)
00086     {
00087
00088         typename MaTriX::element_type tmp=0;
00089
00090         for (Subscript j=1; j<i; j++)
00091                 tmp = tmp + A(i,j)*x(j);
00092
00093         x(i) =  b(i) - tmp;
00094     }
00095
00096     return x;
00097 }
00098
00099
00100 template <class MaTriX, class VecToR>
00101 VecToR linear_solve(/*const*/ LowerTriangularView<MaTriX> &A,
00102             /*const*/ VecToR &b)
00103 {
00104     return Lower_triangular_solve(A, b);
00105 }
00106
00107 template <class MaTriX, class VecToR>
00108 VecToR linear_solve(/*const*/ UnitLowerTriangularView<MaTriX> &A,
00109         /*const*/ VecToR &b)
00110 {
00111     return Unit_lower_triangular_solve(A, b);
00112 }
00113
00114
00115
00116 //********************** Upper triangular section ****************
00117
00118 template <class MaTriX, class VecToR>
00119 VecToR Upper_triangular_solve(/*const*/ MaTriX &A, /*const*/ VecToR &b)
00120 {
00121     Subscript N = A.num_rows();
00122
00123     // make sure matrix sizes agree; A must be square
00124
00125     assert(A.num_cols() == N);
00126     assert(b.dim() == N);
00127
00128     VecToR x(N);
00129
00130     Subscript i;
00131     for (i=N; i>=1; i--)
00132     {
00133
00134         typename MaTriX::element_type tmp=0;
00135
00136         for (Subscript j=i+1; j<=N; j++)
00137                 tmp = tmp + A(i,j)*x(j);
00138
00139         x(i) =  (b(i) - tmp)/ A(i,i);
00140     }
00141
00142     return x;
00143 }
00144
00145
00146 template <class MaTriX, class VecToR>
00147 VecToR Unit_upper_triangular_solve(/*const*/ MaTriX &A, /*const*/ VecToR &b)
00148 {
00149     Subscript N = A.num_rows();
00150
00151     // make sure matrix sizes agree; A must be square
00152
00153     assert(A.num_cols() == N);
00154     assert(b.dim() == N);
00155
00156     VecToR x(N);
00157
00158     Subscript i;
00159     for (i=N; i>=1; i--)
00160     {
00161
00162         typename MaTriX::element_type tmp=0;
00163
00164         for (Subscript j=i+1; j<i; j++)
00165                 tmp = tmp + A(i,j)*x(j);
00166
00167         x(i) =  b(i) - tmp;
00168     }
00169
00170     return x;
00171 }
00172
00173
00174 template <class MaTriX, class VecToR>
00175 VecToR linear_solve(/*const*/ UpperTriangularView<MaTriX> &A,
00176         /*const*/ VecToR &b)
00177 {
00178     return Upper_triangular_solve(A, b);
00179 }
00180
00181 template <class MaTriX, class VecToR>
00182 VecToR linear_solve(/*const*/ UnitUpperTriangularView<MaTriX> &A,
00183     /*const*/ VecToR &b)
00184 {
00185     return Unit_upper_triangular_solve(A, b);
00186 }
00187
00188
00189 } // namespace TNT
00190
00191 #endif
00192 // TRISLV_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ueyeclass.cpp Source File

VideoSource

ueyeclass.cpp

Go to the documentation of this file.
00001 // Piranha.cpp: implementation of the CuEye class.
00002 //
00003 //////////////////////////////////////////////////////////////////////
00004 //#include "stdafx.h"
00005
00006 #include "ueyeclass.hh"
00007
00008 //////////////////////////////////////////////////////////////////////
00009 // Construction/Destruction
00010 //////////////////////////////////////////////////////////////////////
00011
00012 CuEye::CuEye ()
00013 {
00014   m_hu = 0;
00015
00016 }
00017
00018
00019 CuEye::~CuEye ()
00020 {
00021 }
00022
00023
00024 int CuEye::InitCamera (int nId)
00025 {
00026   int nRet = IS_CANT_OPEN_DEVICE;
00027   HIDS hu = (HIDS) nId;
00028
00029   if((m_hu == 0))
00030   {
00031     nRet = is_InitCamera (&hu,0);
00032
00033     if (nRet == IS_SUCCESS)
00034     {
00035       m_hu = hu;
00036       // Disable Autoexit
00037       is_EnableAutoExit( m_hu, IS_DISABLE_AUTO_EXIT );
00038     }
00039   }
00040
00041   return nRet;
00042 }
00043
00044
00045 int CuEye::ExitCamera ()
00046 {
00047   int nRet = IS_CANT_CLOSE_DEVICE;
00048
00049   if(m_hu != 0)
00050   {
00051     nRet = is_ExitCamera (m_hu);
00052     m_hu = 0;
00053   }
00054
00055   return nRet;
00056 }
00057
00058
00059 int CuEye::SetErrorReport (int lMode)
00060 {
00061   return is_SetErrorReport (m_hu, lMode);
00062 }
00063
00064
00065 int CuEye::GetErrorText (int lErr, char* pcErrText)
00066 {
00067   return is_GetError(m_hu,&lErr,&pcErrText);
00068 }
00069 int CuEye::GetNumberOfCameras (int* plNumCameras)
00070 {
00071   return is_GetNumberOfCameras (plNumCameras);
00072 }
00073
00074
00075 int CuEye::GetDllVersion (int* plDllVers)
00076 {
00077   *plDllVers = is_GetDLLVersion();
00078   return IS_SUCCESS;
00079 }
00080
00081
00082 int CuEye::GetPciSlot (int* plSlot)
00083 {
00084   if(plSlot != 0)
00085     *plSlot = 0;
00086
00087   return IS_FUNCTION_NOT_SUPPORTED_YET;
00088 }
00089
00090
00091 int CuEye::GetIRQ (int* plIRQ)
00092 {
00093   if(plIRQ != 0)
00094     *plIRQ = 0;
00095
00096   return IS_FUNCTION_NOT_SUPPORTED_YET;
00097 }
00098
00099
00100 int CuEye::GetColorDepth (int* plBpp, int* plColFormat)
00101 {
00102   return is_GetColorDepth (m_hu, plBpp, plColFormat);
00103 }
00104
00105
00106 int CuEye::CameraStatus (int lInfo, long lValue)
00107 {
00108   return is_CameraStatus (m_hu, lInfo, (ULONG)lValue);
00109 }
00110
00111
00112 int CuEye::GetCameraType ()
00113 {
00114   return is_GetCameraType (m_hu);
00115 }
00116
00117
00118 int CuEye::GetOsVersion ()
00119 {
00120   return is_GetOsVersion ();
00121 }
00122
00123
00124 int CuEye::SetBrightness (int lBright)
00125 {
00126   return is_SetBrightness (m_hu, lBright);
00127 }
00128
00129
00130 int CuEye::SetContrast (int lCont)
00131 {
00132   return is_SetContrast (m_hu, lCont);
00133 }
00134
00135
00136 int CuEye::SetGamma (int lGamma)
00137 {
00138   return is_SetGamma (m_hu, lGamma);
00139 }
00140
00141
00142 int CuEye::SetWhiteBalance( INT nMode )
00143 {
00144   return is_SetWhiteBalance(m_hu, nMode);
00145 }
00146
00147
00148 int CuEye::SetWhiteBalanceMultipliers(double dblRed, double dblGreen, double dblBlue )
00149 {
00150   return is_SetWhiteBalanceMultipliers(m_hu, dblRed, dblGreen, dblBlue);
00151 }
00152
00153
00154 int CuEye::SetColorMode (int lMode)
00155 {
00156   return is_SetColorMode (m_hu, lMode);
00157 }
00158
00159
00160 int CuEye::InitEvent (HANDLE hEv, int nWhich)
00161 {
00162   return is_InitEvent (m_hu, hEv, nWhich);
00163 }
00164
00165
00166 int CuEye::EnableEvent (int nWhich)
00167 {
00168   return is_EnableEvent (m_hu, nWhich);
00169 }
00170
00171
00172 int CuEye::DisableEvent (int nWhich)
00173 {
00174   return is_DisableEvent (m_hu, nWhich);
00175 }
00176
00177
00178 int CuEye::ExitEvent (int nWhich)
00179 {
00180   return is_ExitEvent (m_hu, nWhich);
00181 }
00182
00183
00184 int CuEye::EnableMessage (int nWhich, HWND hwnd)
00185 {
00186   return is_EnableMessage(m_hu, nWhich, hwnd);
00187 }
00188
00189
00190 int CuEye::EnableAutoExit (int nMode)
00191 {
00192   return is_EnableAutoExit(m_hu, nMode);
00193 }
00194
00195
00196 int CuEye::SetImageSize (int lWidth, int lHeight)
00197 {
00198   return is_SetImageSize (m_hu, lWidth, lHeight);
00199 }
00200
00201
00202 int CuEye::SetImagePos (int lPosX, int lPosY)
00203 {
00204   return is_SetImagePos (m_hu, lPosX, lPosY);
00205 }
00206
00207
00208 int CuEye::SetDisplayMode (int Mode)
00209 {
00210   return is_SetDisplayMode (m_hu, Mode);
00211 }
00212
00213
00214 int CuEye::SetDisplayWindow (HWND hWnd)
00215 {
00216   return is_SetHwnd (m_hu, hWnd);
00217 }
00218
00219
00220 int CuEye::SetDisplayKeyColor (int lKeyCol)
00221 {
00222   return is_SetKeyColor (m_hu, (lKeyCol & 0x00FF0000) >> 16, (lKeyCol & 0x0000FF00) >> 8, lKeyCol & 0x000000FF);
00223 }
00224
00225
00226 int CuEye::SetMainDisplayWindow (HWND hWnd)
00227 {
00228   return is_SetParentHwnd (m_hu, hWnd);
00229 }
00230
00231
00232 int CuEye::UpdateDisplay ()
00233 {
00234   return is_UpdateDisplay (m_hu);
00235 }
00236
00237
00238 int CuEye::CaptureVideo (int lWait)
00239 {
00240   return is_CaptureVideo (m_hu, lWait);
00241 }
00242
00243
00244 int CuEye::StopLiveVideo (int lWait)
00245 {
00246   return is_StopLiveVideo (m_hu, lWait);
00247 }
00248
00249
00250 int CuEye::FreezeVideo (int lWait)
00251 {
00252     return is_FreezeVideo (m_hu, lWait);
00253
00254 }
00255
00256
00257 int CuEye::SetCaptureMode (int lMode)
00258 {
00259   return is_SetCaptureMode (m_hu, lMode);
00260 }
00261
00262
00263 int CuEye::AllocImageMem (int lWidth, int lHeight, int lBpp, char** ppcImgMem, int* plID)
00264 {
00265   return is_AllocImageMem (m_hu, lWidth, lHeight, lBpp, ppcImgMem, plID);
00266 }
00267
00268
00269 int CuEye::FreeImageMem (char* pcMem, int lID)
00270 {
00271   return is_FreeImageMem (m_hu, pcMem, lID);
00272 }
00273
00274
00275 int CuEye::SetImageMem (char* pcMem, int lID)
00276 {
00277   return is_SetImageMem (m_hu, pcMem, lID);
00278 }
00279
00280
00281 int CuEye::GetActiveImageMem (char** ppcImgMem, int* plID)
00282 {
00283   return is_GetActiveImageMem (m_hu, ppcImgMem, plID);
00284 }
00285
00286
00287 int CuEye::InquireImageMem (char* pcMem, int lID, int* plX, int* plY, int* plBpp, int* plPitch)
00288 {
00289   return is_InquireImageMem (m_hu, pcMem, lID, plX, plY, plBpp, plPitch);
00290 }
00291
00292
00293 int CuEye::ReadTriggerPort (int* plIn)
00294 {
00295   int nRet = IS_SUCCESS;
00296
00297   if(plIn != 0)
00298     *plIn = is_SetExternalTrigger (m_hu, IS_GET_TRIGGER_INPUTS);
00299   else
00300     nRet = IS_NULL_POINTER;
00301
00302   return nRet;
00303 }
00304
00305
00306 int CuEye::ReadDigitalPort (int* plIn)
00307 {
00308   int nRet = IS_SUCCESS;
00309
00310   if(plIn != 0)
00311     *plIn = is_SetIO (m_hu, IS_GET_IO);
00312   else
00313     nRet = IS_NULL_POINTER;
00314
00315   return nRet;
00316 }
00317
00318
00319 int CuEye::WriteDigitalPort (int lOut)
00320 {
00321   return is_SetIO (m_hu, lOut);
00322 }
00323
00324
00325 int CuEye::SetExternalTrigger (int lMode)
00326 {
00327   return is_SetExternalTrigger (m_hu, lMode);
00328 }
00329
00330
00331 int CuEye::GetCameraInfo (BOARDINFO* pInfo)
00332 {
00333   int nRet = IS_SUCCESS;
00334
00335   if(pInfo != 0)
00336     nRet = is_GetBoardInfo (m_hu, pInfo);
00337   else
00338     nRet = IS_NULL_POINTER;
00339
00340   return nRet;
00341 }
00342
00343
00344 int CuEye::ReadEEPROM (int lAdr, char* pcBuf, int lCount)
00345 {
00346   int nRet = IS_SUCCESS;
00347
00348   if(pcBuf != 0)
00349     nRet = is_ReadEEPROM (m_hu, lAdr, pcBuf, lCount);
00350   else
00351     nRet = IS_INVALID_PARAMETER;
00352
00353   return nRet;
00354 }
00355
00356
00357 int CuEye::WriteEEPROM (int lAdr, char* pcBuf, int lCount)
00358 {
00359   int nRet = IS_SUCCESS;
00360
00361   if(pcBuf != 0)
00362     nRet = is_WriteEEPROM (m_hu, lAdr, pcBuf, lCount);
00363   else
00364     nRet = IS_INVALID_PARAMETER;
00365
00366   return nRet;
00367 }
00368
00369
00370 int CuEye::SaveImage (char* pcFile)
00371 {
00372   return is_SaveImage (m_hu, pcFile);
00373 }
00374
00375
00376 int CuEye::LoadImage (char* pcFile)
00377 {
00378   return is_LoadImage (m_hu, pcFile);
00379 }
00380
00381
00382 int CuEye::SaveImageMem (char* pcFile, char* pcMem, int lID)
00383 {
00384   return is_SaveImageMem (m_hu, pcFile, pcMem, lID);
00385 }
00386
00387
00388 int CuEye::RenderBitmap (int nMemID, HWND hwnd, int nMode)
00389 {
00390   return is_RenderBitmap(m_hu, nMemID, hwnd, nMode);
00391 }
00392
00393
00394 int CuEye::SetScaler (int nMode)
00395 {
00396   if(nMode)
00397     return is_SetScaler(m_hu, IS_SET_SCALER_ON, IS_SET_SCALER_ON);
00398   else
00399     return is_SetScaler(m_hu, IS_SET_SCALER_OFF, IS_SET_SCALER_OFF);
00400 }
00401
00402
00403 int CuEye::SetPixelClock(int nClock)
00404 {
00405   return is_SetPixelClock(m_hu, nClock);
00406 }
00407
00408
00409 int CuEye::SetFrameRate(double dFr, double* pdFrNew)
00410 {
00411   return is_SetFrameRate(m_hu, dFr, pdFrNew);
00412 }
00413
00414
00415 int CuEye::SetExposureTime(double EXP, double* newEXP )
00416 {
00417   return is_SetExposureTime(m_hu, EXP, newEXP );
00418 }
00419
00420 double CuEye::GetExposureTime()
00421 {
00422   double newexp =0.0;
00423   is_SetExposureTime(m_hu, IS_GET_EXPOSURE_TIME, &newexp );
00424   return newexp;
00425 }
00426
00427 int CuEye::SetGain(double gain)
00428 {
00429     int ret =0;
00430     ret = is_SetHardwareGain(m_hu,(int)gain,IS_IGNORE_PARAMETER,IS_IGNORE_PARAMETER,IS_IGNORE_PARAMETER);
00431     return ret;
00432 }
00433
00434 double CuEye::GetGain()
00435 {
00436    return is_SetHardwareGain(m_hu,IS_GET_MASTER_GAIN,IS_IGNORE_PARAMETER,IS_IGNORE_PARAMETER,IS_IGNORE_PARAMETER);
00437 }
00438
00439
00440 int CuEye::Renumerate( int reserved )
00441 {
00442   return is_Renumerate( m_hu, reserved );
00443 }
00444
00445
00446 int CuEye::GetSensorInfo( PSENSORINFO pInfo )
00447 {
00448   return is_GetSensorInfo( m_hu, pInfo );
00449 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/ueyeclass.hh Source File

VideoSource

ueyeclass.hh

Go to the documentation of this file.
00001 // ueyeclass.h: interface for the CuEye class.
00002 //
00003 //////////////////////////////////////////////////////////////////////
00004
00005 #if !defined(AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_)
00006 #define AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009  #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012
00013
00014 #ifdef UNIX
00015 typedef HWND  *void
00016 typedef HANDLE  *void
00017   //  typedef HIDS *void;
00018 #endif
00019
00020 #ifdef WIN32
00021 #include <include/uEye.h>
00022 #else
00023 #include <uEye.h>
00024 #endif
00025
00026
00027 class CuEye
00028 {
00029   public:
00030     CuEye ();
00031     virtual ~CuEye ();
00032     HIDS  GetCameraHandle ()          { return m_hu; }
00033
00034     // init/exit functions
00035     int   InitCamera            (int nId = 0);
00036     int   ExitCamera            ();
00037     int   SetErrorReport        (int lMode);
00038     int   GetErrorText          (int lErr, char* pcErrText);
00039
00040     // inquire functions
00041     int   GetNumberOfCameras    (int* plNumCameras);
00042     int   GetDllVersion         (int* plDllVers);
00043     int   GetPciSlot            (int* plSlot);
00044     int   GetIRQ                (int* plIRQ);
00045     int   GetColorDepth         (int* plBpp, int* plColFormat);
00046     int   CameraStatus          (int lInfo, long lValue);
00047     int   GetCameraType         ();
00048     int   GetOsVersion          (void);
00049
00050     // image parameter functions
00051     int   SetBrightness               (int lBright);
00052     int   SetContrast                 (int lCont);
00053     int   SetGamma                    (int lGamma);
00054     int   SetSaturation               (int lSatU, int lSatV);
00055     int   SetHue                      (int lHue);
00056     int   SetColorMode                (int lMode);
00057     int   SetWhiteBalance             (int nMode );
00058     int   SetWhiteBalanceMultipliers  (double dblRed, double dblGreen, double dblBlue );
00059
00060     // callback functions
00061     int   InitEvent             (HANDLE hEv, int nWhich);
00062     int   EnableEvent           (int nWhich);
00063     int   ExitEvent             (int nWhich);
00064     int   DisableEvent          (int nWhich);
00065     int   EnableAutoExit        (int nMode);
00066     int   EnableMessage         (int nWhich, HWND hwnd);
00067
00068     // display functions
00069     int   SetImageSize          (int lWidth, int lHeight);
00070     int   SetImagePos           (int lPosX, int lPosY);
00071     int   SetScrollPos          (int lPosX, int lPosY);
00072     int   SetDisplayOffset      (int lOffsetX, int lOffsetY);
00073     int   SetDisplayMode        (int Mode);
00074     int   SetDisplayWindow      (HWND hWnd);
00075     int   SetDisplayKeyColor    (int lKeyCol);
00076     int   SetMainDisplayWindow  (HWND hWnd);
00077     int   UpdateDisplay         ();
00078     int   SetDisplayHook        (int lMode);
00079     int   SetScaler             (int nMode);
00080
00081     // video capture functions
00082     int   CaptureVideo   (int lWait);
00083     int   StopLiveVideo  (int lWait);
00084     int   FreezeVideo    (int lWait);
00085     int   CaptureFrame   (BITMAPINFOHEADER* pbmih, char* pcImage);
00086     int   SetCaptureMode (int lMode);
00087
00088     // memory handling functions
00089     int   AllocImageMem     (int lWidth, int lHeight, int lBpp, char** ppcImgMem, int* plID);
00090     int   FreeImageMem      (char* pcMem, int lID);
00091     int   SetImageMem       (char* pcMem, int lID);
00092     int   GetActiveImageMem (char** ppcImgMem, int* plID);
00093     int   InquireImageMem   (char* pcMem, int lID, int* plX, int* plY, int* plBpp, int* plPitch);
00094
00095    // digital I/O and trigger input functions
00096     int   ReadTriggerPort    (int* plIn);
00097     int   ReadDigitalPort    (int* plIn);
00098     int   WriteDigitalPort   (int lOut);
00099     int   SetExternalTrigger (int lMode);
00100
00101     // EEPROM access functions
00102     int   GetCameraInfo (CAMINFO* pInfo);
00103     int   ReadEEPROM    (int lAdr, char* pcBuf, int lCount);
00104     int   WriteEEPROM   (int lAdr, char* pcBuf, int lCount);
00105
00106     // bitmap load and save functions
00107     int   SaveImage    (char* pcFile);
00108     int   LoadImage    (char* pcFile);
00109     int   SaveImageMem (char* pcFile, char* pcMem, int lID);
00110
00111     // bitmap render functions
00112     int   RenderBitmap (int nMemID, HWND hwnd, int nMode);
00113
00114     // timing functions
00115     int   SetPixelClock(int nClock);
00116     int   SetFrameRate(double dFr, double* pdFrNew);
00117     int   SetExposureTime(double EXP, double* newEXP );
00118     double GetExposureTime();
00119
00120     int   SetGain(double gain);
00121     double GetGain();
00122     int   Renumerate( int reserved );
00123     int   GetSensorInfo( PSENSORINFO pInfo );
00124
00125
00126   protected:
00127     HIDS  m_hu;
00128     HWND  m_hwnd;
00129     HWND  m_hwndNotify;
00130 };
00131
00132 #endif // !defined(AFX_UEYE_H__69BA0541_5478_11D3_BEA2_0000E8DF5865__INCLUDED_)
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UndistortionMapping.cpp Source File

Image

UndistortionMapping.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "UndistortionMapping.hh"
00027 #include <Geometry/RMatrix.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029 #include <Base/Geometry/HomgPoint2D.hh>
00030
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 template <class InputStorageType, class OutputStorageType>
00036 UndistortionMapping<InputStorageType, OutputStorageType>::
00037 ~UndistortionMapping()
00038 {}
00039
00040
00041 template <class InputStorageType, class OutputStorageType>
00042 UndistortionMapping<InputStorageType, OutputStorageType>::
00043 UndistortionMapping()
00044 : log2inv_(1.0 / log(2.0))
00045 {
00046   mapping_ = UNDEF;
00047 }
00048
00049
00050 // template <class InputStorageType, class OutputStorageType>
00051 // UndistortionMapping<InputStorageType, OutputStorageType>::
00052 // UndistortionMapping(const UndistortionMapping & src)
00053 // : log2inv_(1.0 / log(2.0))
00054 //   // : log2inv_(1.0)
00055 // {
00056 //   (*this) = src;
00057 // }
00058
00059
00060 template <class InputStorageType, class OutputStorageType>
00061 int UndistortionMapping<InputStorageType, OutputStorageType>::
00062 CalculateSphericalCoord_(const HomgPoint2D& sink,
00063                          HomgPoint2D& source) const {
00064   double xSrc, ySrc;
00065   xSrc=ySrc=-1;
00066   HomgPoint2D hp;
00067   if (su_.ProjectCoordBack(destProjType_, destK_, sink, hp)<0) {
00068     return -1;
00069   } else {
00070     double cx, cy;
00071     su_.GetSphereCenter(cx, cy);
00072     if (destCenterX_!=cx || destCenterY_!=cy) {
00073       double t, p;
00074       if (su_.TransfCoordImage2Sphere (hp[0], hp[1], t, p) < 0) {
00075         return -1;
00076       } else {
00077         if (su_.TransfCoordRotateSphere2Image(t,p,destCenterX_,destCenterY_,
00078                                               xSrc, ySrc) < 0) {
00079           return -1;
00080         }
00081       }
00082     } else {
00083       xSrc=hp[0];
00084       ySrc=hp[1];
00085     }
00086
00087   }
00088   source[0]=xSrc;
00089   source[1]=ySrc;
00090   source[2]=1;
00091   return 0;
00092 }
00093
00094 template <class InputStorageType, class OutputStorageType>
00095 int UndistortionMapping<InputStorageType, OutputStorageType>::
00096 CalculateToSphereMapping_(const HomgPoint2D& sink,
00097                          HomgPoint2D& source) const {
00098
00099   HomgPoint2D hp;
00100   double cx, cy;
00101   su_.GetSphereCenter(cx, cy);
00102
00103   if (destCenterX_!=cx || destCenterY_!=cy) {
00104     double t, p;
00105     if (su_.TransfCoordImage2Sphere(sink[0], sink[1], t, p) < 0) {
00106       return -1;
00107     } else {
00108       if (su_.TransfCoordRotateSphere2Image(t,p,destCenterX_,destCenterY_,
00109                                             hp[0], hp[1]) < 0) {
00110         return -1;
00111       }
00112       hp[2]=1;
00113     }
00114   } else {
00115     hp = sink;
00116   }
00117   if (su_.ProjectCoord(destProjType_, destK_, hp, source)<0) {
00118     return -1;
00119   }
00120
00121   return 0;
00122 }
00123
00124 template <class InputStorageType, class OutputStorageType>
00125 void UndistortionMapping<InputStorageType, OutputStorageType>::
00126 CalculatePerspDistorion_(const HomgPoint2D& sink,
00127                          HomgPoint2D& source) const {
00128   source = sink;
00129   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00130     source[0] = ((double)(source[0])*pu_.GetAspectratio());
00131   }
00132   if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00133     source[1] = ((double)(source[1])/pu_.GetAspectratio());
00134   }
00135   pu_.Distort(source);
00136
00137 }
00138
00139 template <class InputStorageType, class OutputStorageType>
00140 void UndistortionMapping<InputStorageType, OutputStorageType>::
00141 CalculatePerspUndistorion_(const HomgPoint2D& sink,
00142                            HomgPoint2D& source) const {
00143
00144   source = sink;
00145   pu_.Undistort(source);
00146   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00147     source[0] = ((double)(source[0])/pu_.GetAspectratio());
00148   }
00149   if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00150     source[1] = ((double)(source[1])*pu_.GetAspectratio());
00151   }
00152
00153 }
00154
00155 template <class InputStorageType, class OutputStorageType>
00156 int UndistortionMapping<InputStorageType, OutputStorageType>::
00157 GetSourceCoordinates_(const HomgPoint2D& sink,
00158                       HomgPoint2D& source) const {
00159
00160   // assert that CameraParam is set
00161   BIASASSERT(mapping_!=UNDEF);
00162
00163   if (mapping_==PERSPECTIVE_UNDIST) {
00164     // correcting perspective lens distortion
00165     CalculatePerspDistorion_(sink,source);
00166   } else if (mapping_==PERSPECTIVE_DIST) {
00167     // introducing perspective lens distortion
00168     CalculatePerspUndistorion_(sink,source);
00169   } else if (mapping_==SPHERICAL) {
00170     return CalculateSphericalCoord_(sink, source);
00171   } else if (mapping_==TO_SPHERE){
00172     return CalculateToSphereMapping_(sink, source);
00173   }
00174   return 0;
00175 }
00176
00177
00178 template <class InputStorageType, class OutputStorageType>
00179 int UndistortionMapping<InputStorageType, OutputStorageType>::
00180 ProjectSphereImage(const Image<InputStorageType>& src,
00181                    Image<OutputStorageType>& dst,
00182                    const int& SizeX, const int& SizeY,
00183                    const double& FovX, const double& FovY,
00184                    const double& CenterX, const double& CenterY,
00185                    const int projectionType, const double& zoomFactor,
00186                    KMatrix& KMatDst)
00187 {
00188   if (su_.IsInitialized()) {
00189     mapping_ = SPHERICAL;
00190   } else {
00191     BIASERR("Set CameraParam first to project an image")
00192   }
00193
00194   destProjType_ = projectionType;
00195
00196   destCenterX_ = CenterX;
00197   destCenterY_ = CenterY;
00198   if (destCenterX_==0 || destCenterY_==0) {
00199     su_.GetSphereCenter(destCenterX_, destCenterY_);
00200   }
00201
00202   double destSizeX, destSizeY;
00203   destSizeX = SizeX;
00204   destSizeY = SizeY;
00205
00206   double fovXrad, fovYrad;//, dum;
00207   if (FovX!=0) fovXrad = FovX/360.0*M_PI;
00208   else fovXrad = 0;
00209
00210   if (FovY!=0) fovYrad = FovY/360.0*M_PI;
00211   else fovYrad = 0;
00212
00213   //DrawCircles(src, 20.0);
00214
00215   // either result image size or FoV is fixed
00216   KMatDst.SetIdentity();
00217   if (fovXrad!=0 && destSizeX!=0) {
00218     KMatDst[0][0] = (destSizeX*zoomFactor)/(tan(fovXrad)*2.0);
00219   }
00220   if (fovYrad!=0 && destSizeY!=0) {
00221     KMatDst[1][1] = (destSizeY*zoomFactor)/(tan(fovYrad)*2.0);
00222   }
00223   if (KMatDst[0][0]==1) {
00224     KMatDst[0][0]=KMatDst[1][1];
00225   }
00226   if (KMatDst[1][1]==1) {
00227     KMatDst[1][1]=KMatDst[0][0];
00228   }
00229   KMatDst[0][2] = (destSizeX*zoomFactor)/2.0;
00230   KMatDst[1][2] = (destSizeY*zoomFactor)/2.0;
00231
00232   destK_ = KMatDst;
00233
00234   destSizeX *= zoomFactor;
00235   destSizeY *= zoomFactor;
00236   if (!dst.IsEmpty()) dst.Release();
00237   dst.Init((int)destSizeX, (int)destSizeY, src.GetChannelCount());
00238   dst.Clear();
00239   dst.SetColorModel(src.GetColorModel());
00240
00241   return Map(src, dst);
00242 }
00243
00244 template <class InputStorageType, class OutputStorageType>
00245 int UndistortionMapping<InputStorageType, OutputStorageType>::
00246 MapPerspToSphere(const Image<InputStorageType>& src,
00247                  Image<OutputStorageType>& dst,
00248                  const KMatrix Ksrc,
00249                  const double& CenterX, const double& CenterY,
00250                  const int projectionType)
00251 {
00252   if (su_.IsInitialized()) {
00253     mapping_ = TO_SPHERE;
00254   } else {
00255     BIASERR("Set CameraParam first to project an image")
00256   }
00257
00258   destProjType_ = projectionType;
00259
00260   destCenterX_ = CenterX;
00261   destCenterY_ = CenterY;
00262   if (destCenterX_==0 || destCenterY_==0) {
00263     su_.GetSphereCenter(destCenterX_, destCenterY_);
00264   }
00265
00266   destK_ = Ksrc;
00267
00268   if (dst.IsEmpty()) {
00269     dst.Init(su_.GetWidth(), su_.GetHeight(), src.GetChannelCount());
00270     dst.SetColorModel(src.GetColorModel());
00271   } else {
00272     if (su_.GetWidth()!=dst.GetWidth() || su_.GetHeight()!=dst.GetHeight() ||
00273         src.GetColorModel()!=dst.GetColorModel()) {
00274       BIASERR("Camera parameters and dst-image do not match, "
00275               << "can't process mapping!!");
00276       return -1;
00277     }
00278   }
00279   return Map(src, dst);
00280
00281 }
00282
00283
00284 template <class InputStorageType, class OutputStorageType>
00285 int UndistortionMapping<InputStorageType, OutputStorageType>::
00286 UndistortPerspImage(const Image<InputStorageType>& src,
00287                     Image<OutputStorageType>& dst,
00288                     KMatrix& K)
00289 {
00290   int ret = UndistortPerspImage(src, dst);
00291   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00292     K.SetFx(K.GetFx()*pu_.GetAspectratio());
00293     K.SetHx(K.GetHx()*pu_.GetAspectratio());
00294   }
00295   if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00296     K.SetFy(K.GetFy()/pu_.GetAspectratio());
00297     K.SetHy(K.GetHy()/pu_.GetAspectratio());
00298   }
00299   return ret;
00300 }
00301
00302
00303 template <class InputStorageType, class OutputStorageType>
00304 int UndistortionMapping<InputStorageType, OutputStorageType>::
00305 UndistortPerspImage(const Image<InputStorageType>& src,
00306                     Image<OutputStorageType>& dst)
00307 {
00308   if (pu_.IsInitialized()) {
00309     mapping_ = PERSPECTIVE_UNDIST;
00310   } else {
00311     BIASERR("Set CameraParam first to undistort an image")
00312   }
00313
00314   // setup dst-image
00315   if (!dst.IsEmpty()) dst.Release();
00316   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00317     dst.Init((int)((double)(src.GetWidth())/pu_.GetAspectratio()),
00318              (int)(src.GetHeight()),
00319              src.GetChannelCount());
00320   } else if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00321     dst.Init((int)(src.GetWidth()),
00322              (int)((double)(src.GetHeight())*pu_.GetAspectratio()),
00323              src.GetChannelCount());
00324   } else {
00325     dst.Init((int)(src.GetWidth()), (int)(src.GetHeight()),
00326              src.GetChannelCount());
00327   }
00328   dst.SetColorModel(src.GetColorModel());
00329
00330   return Map(src, dst);
00331 }
00332
00333
00334 template <class InputStorageType, class OutputStorageType>
00335 int UndistortionMapping<InputStorageType, OutputStorageType>::
00336 DistortPerspImage(const Image<InputStorageType>& src,
00337                   Image<OutputStorageType>& dst,
00338                   KMatrix& K)
00339 {
00340   int ret = DistortPerspImage(src, dst);
00341   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00342     K.SetFx(K.GetFx()/pu_.GetAspectratio());
00343     K.SetHx(K.GetHx()/pu_.GetAspectratio());
00344   }
00345   if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00346     K.SetFy(K.GetFy()*pu_.GetAspectratio());
00347     K.SetHy(K.GetHy()*pu_.GetAspectratio());
00348   }
00349   return ret;
00350 }
00351
00352 template <class InputStorageType, class OutputStorageType>
00353 int UndistortionMapping<InputStorageType, OutputStorageType>::
00354 DistortPerspImage(const Image<InputStorageType>& src,
00355                   Image<OutputStorageType>& dst)
00356 {
00357
00358   if (pu_.IsInitialized()) {
00359     mapping_ = PERSPECTIVE_DIST;
00360   } else {
00361     BIASERR("Set CameraParam first to distort an image")
00362   }
00363
00364   // setup dst-image
00365   if (!dst.IsEmpty()) dst.Release();
00366   if (pu_.GetAspectratio()<1-UNDIST_EPS) {
00367     dst.Init((int)((double)(src.GetWidth())*pu_.GetAspectratio()),
00368              (int)(src.GetHeight()),
00369              src.GetChannelCount());
00370   } else if (pu_.GetAspectratio()>1+UNDIST_EPS) {
00371     dst.Init((int)(src.GetWidth()),
00372              (int)((double)(src.GetHeight())/pu_.GetAspectratio()),
00373              src.GetChannelCount());
00374   } else {
00375     dst.Init((int)(src.GetWidth()), (int)(src.GetHeight()),
00376              src.GetChannelCount());
00377   }
00378   dst.SetColorModel(src.GetColorModel());
00379
00380   return Map(src, dst);
00381 }
00382
00383
00384 // TODO FIXME win32 template instantiation problem (JW)
00385 template class UndistortionMapping<unsigned char, unsigned char>;
00386 template class UndistortionMapping<float, float>;
00387 template class UndistortionMapping<unsigned char, float>;
00388
00389 #if defined(BUILD_IMAGE_CHAR)
00390 // TODO FIXME win32 template instantiation problem (JW)
00391 template class UndistortionMapping<unsigned char, char>;
00392 template class UndistortionMapping<char, char>;
00393 #endif
00394
00395 #if defined(BUILD_IMAGE_USHORT)
00396 template class UndistortionMapping<unsigned short,unsigned short>;
00397 #endif
00398
00399 #if defined(BUILD_IMAGE_SHORT)
00400 template class UndistortionMapping<short, short>;
00401 #endif
00402
00403 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
00404 template class UndistortionMapping<unsigned short, short>;
00405 #endif
00406
00407 #if defined(BUILD_IMAGE_INT)
00408 template class UndistortionMapping<int,int>;
00409 #endif
00410
00411 #if defined(BUILD_IMAGE_USHORT)
00412 template class UndistortionMapping<unsigned short,float>;
00413 #endif
00414
00415 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
00416 template class UndistortionMapping<unsigned short,int>;
00417 #endif
00418
00419 #if defined(BUILD_IMAGE_DOUBLE)
00420 template class UndistortionMapping<double,double>;
00421 #endif
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UndistortionMapping.hh Source File

Image

UndistortionMapping.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <Base/Common/BIASpragmaStart.hh>
00026
00027 #ifndef __UndistortionMapping_hh__
00028 #define __UndistortionMapping_hh__
00029
00030 #include <Image/BackwardMapping.hh>
00031 #include <Image/CameraParam.hh>
00032 #include <Image/MatlabTBUndistortion.hh>
00033 #include <Image/SphericalUndistortion.hh>
00034
00035 namespace BIAS {
00036
00037   /** @class UndistortionMapping
00038       @ingroup g_filter
00039       @brief  Maps image src to image sink with spherical or lens distortion
00040       @author streckel, Dez. 2005
00041   */
00042
00043   template <class InputStorageType, class OutputStorageType>
00044   class BIASImage_EXPORT UndistortionMapping
00045     : public  BackwardMapping<InputStorageType, OutputStorageType>  {
00046   public:
00047
00048     virtual ~UndistortionMapping();
00049
00050     UndistortionMapping();
00051
00052 //     UndistortionMapping(const UndistortionMapping & src);
00053
00054     /** @brief set your CameraParams for mapping */
00055     inline void SetCameraParam(const CameraParam& cp) {
00056       cp_ = cp;
00057       if (cp_.IsSpherical()) {
00058         su_.Init(cp_);
00059       } else {
00060         pu_.Init(cp_);
00061       }
00062     };
00063
00064
00065     /** @brief Performs a projection of a spherical image given
00066         a projection-type and a zoom factor.
00067
00068         @param src source image
00069         @param dst (output) uninitialized destination image
00070         @param SizeX, SizeY define the size of the output image
00071         @param FovX, FovY define the Field Of View angle (in deg) in x and y
00072         direction that is used for the creation of the K-Matrix for the
00073         projected image. If one of these is =0 then the resulting image will
00074         be undistorted.
00075         @param CenterX, Centery is the pixel in the spherical uncalibrated
00076         camera image, that lies in viewing direction. This point will be
00077         mapped to the principal point in the projected image.
00078         @param zoomFactor expands the image by a given factor
00079         @param projectionType use the projection-type constants
00080         @author Birger Streckel */
00081     int ProjectSphereImage(const Image<InputStorageType>& src,
00082                            Image<OutputStorageType>& dst,
00083                            const int& SizeX, const int& SizeY,
00084                            const double& FovX, const double& FovY,
00085                            const double& CenterX, const double& CenterY,
00086                            const int projectionType, const double& zoomFactor,
00087                            KMatrix& KMatDst);
00088
00089     /** @brief Performs a projection of a perspective or other projection
00090         type image to a sphere.
00091
00092         @param src source (perspective)image
00093         @param dst (output) uninitialized (spherical) destination image
00094         @param Ksrc is the KMatrix of the perspecive source image
00095         @param CenterX, Centery is the pixel in the spherical uncalibrated
00096         camera image, that lies in viewing direction. The principal point
00097         in the perspective image will be mapped to this point on the sphere
00098         @param projectionType use the projection-type constants
00099         @author Birger Streckel */
00100     int MapPerspToSphere(const Image<InputStorageType>& src,
00101                          Image<OutputStorageType>& dst,
00102                          const KMatrix Ksrc,
00103                          const double& CenterX, const double& CenterY,
00104                          const int projectionType);
00105
00106    /** @brief Using the Matlab camera calibration toolbox parameters
00107         for an undistortion of a distorted camera image.
00108         Reintroduces also aspect ratios !=1.
00109         If a KMatrix is given it is corrected for the aspect ratio
00110         correction.
00111         @author streckel 06/2004 */
00112     int DistortPerspImage(const Image<InputStorageType>& src,
00113                            Image<OutputStorageType>& dst);
00114     int DistortPerspImage(const Image<InputStorageType>& src,
00115                            Image<OutputStorageType>& dst,
00116                            KMatrix& K);
00117
00118    /** @brief Using the Matlab camera calibration toolbox parameters
00119        for a distortion of an already undistorted image.
00120        Corrects also aspect ratios !=1. Inverse to the
00121        UndistortImage function.
00122        If a KMatrix is given it is corrected for the aspect ratio
00123        correction.
00124        @author streckel 06/2004 */
00125     int UndistortPerspImage(const Image<InputStorageType>& src,
00126                              Image<OutputStorageType>& dst);
00127     int UndistortPerspImage(const Image<InputStorageType>& src,
00128                              Image<OutputStorageType>& dst,
00129                              KMatrix& K);
00130
00131
00132
00133   protected:
00134
00135
00136     /** @brief overload of virtual function in BackwardMapping.
00137         Implements the coordinate mapping */
00138     virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
00139                                       HomgPoint2D& source) const;
00140
00141     /* Helper for GetSourceCoordinates */
00142     int CalculateSphericalCoord_(const HomgPoint2D& sink,
00143                                  HomgPoint2D& source) const;
00144     int CalculateToSphereMapping_(const HomgPoint2D& sink,
00145                                   HomgPoint2D& source) const;
00146
00147     void CalculatePerspUndistorion_(const HomgPoint2D& sink,
00148                                     HomgPoint2D& source) const;
00149     void CalculatePerspDistorion_(const HomgPoint2D& sink,
00150                                   HomgPoint2D& source) const;
00151
00152     typedef enum MapType
00153       {UNDEF, PERSPECTIVE_DIST, PERSPECTIVE_UNDIST, SPHERICAL, TO_SPHERE};
00154
00155     /// holds 1.0/log(2.0)
00156     const double log2inv_;
00157
00158     /// The camera parameters for the undistortion
00159     CameraParam cp_;
00160
00161     /// Spherical or perspective undistortion, depending on cp_
00162     SphericalUndistortion su_;
00163     MatlabTBUndistortion pu_;
00164
00165     /// Parameters that influence the spherical mapping
00166     /// i.e. direction, type, image part, ...
00167     double destCenterX_, destCenterY_;
00168     int destProjType_;
00169     BIAS::KMatrix destK_;
00170
00171     ///Parameters that influence the perspectivev mapping
00172
00173
00174     /// spherical or perspective mapping
00175     MapType mapping_;
00176
00177   };
00178
00179
00180 } // namespace
00181
00182 #endif
00183
00184 #include <Base/Common/BIASpragmaEnd.hh>
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Member List

  • Class List
  • Alphabetical List
  • Class Hierarchy
  • Class Members

Multitype Member List

This is the complete list of members for Multitype, including all inherited members.

c typedef | Multitype
c typedef | Multitype
d typedef | Multitype
d typedef | Multitype
g typedef | Multitype
g typedef | Multitype
h typedef | Multitype
h typedef | Multitype
i typedef | Multitype
i typedef | Multitype
j typedef | Multitype
r typedef | Multitype
r typedef | Multitype
z typedef | Multitype
z typedef | Multitype

Generated on Wed Jun 21 19:06:14 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/UnscentedTransform.cpp Source File

MathAlgo

UnscentedTransform.cpp

Go to the documentation of this file.
00001 /* This file is part of the BIAS library (Basic ImageAlgorithmS).
00002
00003 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00004   Multimediale Systeme der Informationsverarbeitung
00005   Institut fuer Informatik
00006   Christian-Albrechts-Universitaet Kiel
00007
00008
00009 BIAS is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation; either version 2.1 of the License, or
00012 (at your option) any later version.
00013
00014 BIAS is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with BIAS; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023
00024 #include <MathAlgo/UnscentedTransform.hh>
00025 #include <MathAlgo/SVD.hh>
00026 #include <MathAlgo/Lapack.hh>
00027 #include <Base/Common/CompareFloatingPoint.hh>
00028 #include <Base/Debug/Exception.hh>
00029 #include <Base/Math/Matrix.hh>
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 UnscentedTransform::
00035 UnscentedTransform()
00036   : Debug(), Alpha_(0.001), Beta_(2.0), Kappa_(0.0)
00037 {}
00038
00039
00040 UnscentedTransform::
00041 ~UnscentedTransform()
00042 {}
00043
00044
00045 void UnscentedTransform::
00046 Transform(const Vector<double>& src_mean, const Matrix<double>& src_cov,
00047           Vector<double>& dst_mean, Matrix<double>& dst_cov) const
00048 {
00049
00050   if (src_cov.IsZero(numeric_limits<double>::epsilon())){
00051     Transform_(src_mean, dst_mean);
00052     const int dim = dst_mean.Size();
00053     dst_cov.newsize(dim, dim);
00054     dst_cov.SetZero();
00055   } else {
00056     static vector<WeightedSigmaPoint> sigma_points;
00057     // compute the sigma points
00058     ComputeSigmaPoints_(src_mean, src_cov, sigma_points);
00059
00060     // check result dimension
00061     Transform_(src_mean, dst_mean);
00062     const int dim = dst_mean.Size();
00063     // initialize result
00064     dst_mean.SetZero();
00065     dst_cov.newsize(dim, dim);
00066     dst_cov.SetZero();
00067
00068     static Vector<double> diff, src;
00069     vector<WeightedSigmaPoint>::iterator it;
00070     for (it=sigma_points.begin(); it!=sigma_points.end(); it++){
00071       // transform the sigma points
00072       src = it->point;
00073       BIASCDOUT(D_UT_TRANSFORM, "src: "<<src<<endl);
00074       Transform_(src, it->point);
00075       BIASCDOUT(D_UT_TRANSFORM, "dst: "<<it->point<<endl);
00076       // compute weighted mean
00077       dst_mean += (it->point * it->weight_mean);
00078       BIASCDOUT(D_UT_TRANSFORM, "mean: "<<dst_mean<<endl);
00079     }
00080
00081     for (it=sigma_points.begin(); it!=sigma_points.end(); it++){
00082       // compute the covariance
00083       diff = it->point - dst_mean;
00084       BIASCDOUT(D_UT_TRANSFORM, "diff: "<<diff<<endl);
00085       BIASCDOUT(D_UT_TRANSFORM, "weight "<< it->weight_cov
00086                 << " * outer product: " <<  diff.OuterProduct(diff) << endl);
00087       dst_cov += it->weight_cov * diff.OuterProduct(diff);
00088       BIASCDOUT(D_UT_TRANSFORM, "cov: "<<dst_cov<<endl);
00089     }
00090   }
00091 }
00092
00093
00094 void UnscentedTransform::
00095 ComputeSigmaPoints_(const Vector<double>& src_mean,
00096                     const Matrix<double>& src_cov,
00097                     std::vector<WeightedSigmaPoint>& sigma_points) const
00098 {
00099   const int dim = src_mean.Size();
00100   const double dbl_dim = static_cast<double>(dim);
00101   const double alpha_square = Alpha_ * Alpha_;
00102   const double lambda = alpha_square * ( dbl_dim + Kappa_ ) - dbl_dim;
00103   const double dim_plus_lambda = dbl_dim + lambda;
00104   //cout << "dim_plus_lambda="<<dim_plus_lambda<<endl;
00105   BIASCDOUT(D_UT_PARAM, "Alpha: "<<Alpha_<<"  Beta : "<<Beta_
00106             <<"  Kappa: "<<Kappa_<<endl);
00107   sigma_points.resize(2 * dim + 1);
00108
00109   static SVD svd;
00110   static Matrix<double> sqrt_cov;
00111
00112   // numerically very unstable without normalization !!!
00113 #define UT_NORMALIZE
00114 #ifdef UT_NORMALIZE
00115   double factor = 0.0;
00116   for (int i=0; i<dim; i++)
00117     factor += src_cov[i][i];
00118   if (Less(fabs(factor), numeric_limits<double>::epsilon())){
00119     BEXCEPTION("cannot normalize zero covariance matrix "<<src_cov);
00120   }
00121
00122   Matrix<double> normalized_cov = src_cov / factor;
00123   sqrt_cov = svd.SqrtT(normalized_cov);
00124   factor *= dim_plus_lambda;
00125   factor = sqrt(factor);
00126 #else
00127   sqrt_cov = svd.SqrtT(dim_plus_lambda * src_cov);
00128 #endif
00129
00130   static Vector<double> vec;
00131
00132   sigma_points[0].point = src_mean;
00133   sigma_points[0].weight_mean = lambda / dim_plus_lambda;
00134   sigma_points[0].weight_cov =
00135     lambda / dim_plus_lambda + 1.0 - alpha_square + Beta_;
00136   int ind;
00137   for (int i=0; i<dim; i++){
00138     ind = i+1;
00139
00140     vec = sqrt_cov.GetCol(i);
00141 #ifdef UT_NORMALIZE
00142     vec *= factor;
00143 #endif
00144     sigma_points[ind].point = src_mean + vec;
00145     sigma_points[ind+dim].point = src_mean - vec;
00146     sigma_points[ind].weight_mean =
00147       sigma_points[ind+dim].weight_mean =
00148       sigma_points[ind].weight_cov =
00149       sigma_points[ind+dim].weight_cov =
00150       1.0 / ( 2.0 * dim_plus_lambda );
00151   }
00152 #ifdef BIAS_DEBUG
00153   if (DebugLevelIsSet(D_UT_SIGMA_POINTS)){
00154     for (int k=0; k<2; k++){
00155       cout << "sp["<<k<<"] = "<<sigma_points[k].point<<" W_m = "
00156            <<sigma_points[k].weight_mean << endl<<" W_c = "
00157            <<sigma_points[k].weight_cov << endl;
00158     }
00159   }
00160 #endif
00161 }
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/UnscentedTransform.hh Source File

MathAlgo

UnscentedTransform.hh

Go to the documentation of this file.
00001
00002 /*
00003 This file is part of the BIAS library (Basic ImageAlgorithmS).
00004
00005 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00006   Multimediale Systeme der Informationsverarbeitung
00007   Institut fuer Informatik
00008   Christian-Albrechts-Universitaet Kiel
00009
00010
00011 BIAS is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation; either version 2.1 of the License, or
00014 (at your option) any later version.
00015
00016 BIAS is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with BIAS; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 */
00025
00026 #ifndef _UnscentedTransform_hh_
00027 #define _UnscentedTransform_hh_
00028
00029 #include <Base/Debug/Debug.hh>
00030 #include <Base/Math/Vector.hh>
00031
00032 #include <vector>
00033
00034 // forward declaration
00035 //template <class T> class BIAS::Matrix;
00036 #include <Base/Math/Matrix.hh>
00037
00038
00039 namespace BIAS {
00040
00041
00042 #define D_UT_SIGMA_POINTS 0x00000001
00043 #define D_UT_TRANSFORM    0x00000002
00044 #define D_UT_PARAM        0x00000004
00045
00046   struct BIASMathAlgo_EXPORT WeightedSigmaPoint
00047   {
00048     Vector<double> point;
00049     double weight_mean;
00050     double weight_cov;
00051   };
00052
00053   /** @class UnscentedTransform
00054       @brief uses the unscented transformation to map a normal distribututed
00055       random variable using a nonlinear transformation
00056
00057       See S.J.Julier and J.K.Uhlmann "A New Extension of the Kalman Filter to
00058       Nonlinear Systems" for a detailed description of the unscented transform.
00059       The unscented transform approximates the transformation of the covariance
00060       matrix up to second order of the according Taylor series.
00061
00062       To use this class derive from it and implement the non linear
00063       transformation function Transform_().
00064
00065       @author woelk 01/2006 (tested) */
00066   class BIASMathAlgo_EXPORT UnscentedTransform
00067     : public Debug
00068   {
00069   public:
00070     UnscentedTransform();
00071
00072     virtual ~UnscentedTransform();
00073
00074     void Transform(const Vector<double>& src_mean,
00075                    const Matrix<double>& src_cov,
00076                    Vector<double>& dst_mean, Matrix<double>& dst_cov) const;
00077
00078     /// sets the alpha parameter
00079     inline void SetAlpha(const double alpha)
00080     { Alpha_ = alpha; }
00081
00082     /// sets the alpha parameter
00083     inline void SetBeta(const double beta)
00084     { Beta_ = beta; }
00085
00086   protected:
00087     /** the alpha parameter determines the spread of the sigma points */
00088     double Alpha_;
00089     /** beta is used to incorporate prior knowledge of the distribution of x.
00090         For Gaussian distributions betya = 2.0 is optiomal */
00091     double Beta_;
00092     /** kappa is a secondary scaling parameter. In other papers from Uhlman
00093         kappa is fixed to 1.0 */
00094     double Kappa_;
00095
00096     void ComputeSigmaPoints_(const Vector<double>& src_mean,
00097                              const Matrix<double>& src_cov,
00098                              std::vector<WeightedSigmaPoint>& sigma_points)
00099       const;
00100
00101     virtual void Transform_(const Vector<double>& src,
00102                             Vector<double>& dst) const = 0;
00103
00104   }; // class
00105
00106 } // namespace
00107
00108 #endif // _UnscentedTransform_hh_
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UnVignette.cpp Source File

Image

UnVignette.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "UnVignette.hh"
00026 #include <iostream>
00027 #include <math.h>
00028 #include <MathAlgo/Lapack.hh>
00029 #include <Base/Common/BIASpragma.hh>
00030 #include <MathAlgo/SVD.hh>
00031 #include <Base/Debug/TimeMeasure.hh>
00032
00033 using namespace BIAS;
00034 using namespace std;
00035
00036
00037 UnVignette::UnVignette()
00038 {
00039   PrinciplePointX_ = 0.0;
00040   PrinciplePointY_ = 0.0;
00041   bIsInitialized_ = false;
00042   bUseLuT_ = false;
00043   bLeastSquaresPrepared_ = false;
00044   dInterPolationMethod_ = LEAST_SQUARES;
00045 }
00046
00047 //if Constructor is called with  CameraParam LuT is not used!
00048 UnVignette::UnVignette(CameraParam &cParam,INTERPOLATION_METHOD method, bool bUseLuT)
00049 {
00050   dInterPolationMethod_  = method;
00051   bUseLuT_ = bUseLuT;
00052   bIsInitialized_ = false;
00053   bLeastSquaresPrepared_ = false;
00054   if(cParam.IsInitialized())
00055   {
00056     dWidth_ = cParam.GetWidth();
00057     dHeight_ = cParam.GetHeight();
00058
00059     PrinciplePointX_ = cParam.GetPrincipalX()- dWidth_/2;
00060     PrinciplePointY_ = cParam.GetPrincipalY() - dHeight_/2;
00061
00062     dWidthHalfMPPX_ = dWidth_/2 - PrinciplePointX_;
00063     dHeightHalfMPPY_ = dHeight_/2 - PrinciplePointY_;
00064
00065     ControlPoints_ = cParam.GetIlluCorrX();
00066     PercentageValues_ = cParam.GetIlluCorrY();
00067     if(ControlPoints_.size() > 2 && PercentageValues_.size() > 2)
00068       Init(cParam,LEAST_SQUARES,bUseLuT_);
00069   }
00070   else
00071   {
00072     PrinciplePointX_ = 0.0;
00073     PrinciplePointY_ = 0.0;
00074     BIASERR("Given CameraParams are not ready!");
00075   }
00076 }
00077
00078 UnVignette::~UnVignette()
00079 {
00080
00081 }
00082
00083
00084 void UnVignette::Compute(BIAS::Image<unsigned char> &Image)
00085 {
00086   if (!bIsInitialized_){
00087     //cout<<"Not inited!"<<endl;
00088     return;
00089   }
00090   else{
00091     if(dWidth_ != Image.GetWidth() || dHeight_ != Image.GetHeight())
00092     {
00093       BIASERR("Image size does not fit init size, returning" );
00094       return;
00095     }
00096     float dum=0.0;
00097     unsigned int newPixelValue =0;
00098     dChannelCount_ = Image.GetChannelCount();
00099     /*
00100     unsigned int yPosition =0;
00101     unsigned char ** ida = Image.GetImageDataArray();
00102     float ** idaLuI = LuImage_.GetImageDataArray();
00103     */
00104     ///////////////////////////////////////////
00105     unsigned char* pId = Image.GetImageData();
00106     float* pLuId = LuImage_.GetImageData();
00107 //    bool bIsInterleaved = Image.IsInterleaved();
00108     for(unsigned int i=0;i<dWidth_*dHeight_;i++)
00109     {
00110       dum = *pLuId++; // get data at look up image , this is correction factor
00111       for(unsigned int j=0;j<dChannelCount_;j++)
00112       {
00113         newPixelValue = (unsigned int)( (*pId) * dum );
00114         if(newPixelValue <= 255)
00115            *pId++ = newPixelValue;
00116         else
00117          *pId++ = 255;
00118
00119
00120       }
00121     }
00122     //for(unsigned int i=0;i<dWidth_;i++)
00123     //{
00124     //  yPosition = dChannelCount_*i;
00125     //  for(unsigned int j=0;j<dHeight_;j++)
00126     //  {
00127     //    // get the correction factor from Look up Image
00128     //    dum = idaLuI[j][yPosition];
00129     //    for(unsigned int k=0;k<dChannelCount_;k++)
00130     //    {
00131     //      //take clipping into account
00132     //      newPixelValue = ida[j][yPosition+k]*dum;
00133     //      if(newPixelValue > 255)
00134     //        ida[j][yPosition+k] = 255;
00135     //      else
00136     //        ida[j][yPosition+k] = newPixelValue;
00137     //    }
00138     //  }
00139     //
00140     //}
00141   }
00142   return;
00143 }
00144
00145 int UnVignette::Init(const std::vector<double> ControlPoints,
00146                      std::vector<double> PercentageValues,
00147                      unsigned int dImageWidth , unsigned int dImageHeight,
00148                      int dPPX, int dPPY, INTERPOLATION_METHOD method, bool bUseLuT)
00149 {
00150   int ret = 0;
00151   ControlPoints_ = ControlPoints;
00152   PercentageValues_ = PercentageValues;
00153
00154   dInterPolationMethod_ = method;
00155
00156   dWidth_ = dImageWidth;
00157   dHeight_ = dImageHeight;
00158
00159   PrinciplePointX_ = dPPX - dWidth_/2;
00160   PrinciplePointY_ = dPPY - dHeight_/2;
00161
00162   dWidthHalfMPPX_ = dWidth_/2 - PrinciplePointX_;
00163   dHeightHalfMPPY_ = dHeight_/2 - PrinciplePointY_;
00164
00165   switch(dInterPolationMethod_){
00166     case SPLINE_WITHOUT_LUT:
00167     case SPLINE_WITH_LUT:
00168       InterpolatorIllu_.SetKnotPoints(ControlPoints_);
00169       InterpolatorIllu_.SetControlPoints(PercentageValues_);
00170       InterpolatorIllu_.InitSpline();
00171       bUseLuT_ = bUseLuT;
00172       if(bUseLuT_)
00173         ret = InterpolatorIllu_.PrepareLuTSpline(ControlPoints_[0],
00174           ControlPoints_[ControlPoints_.size()-1],2000);
00175
00176       break;
00177     case LEAST_SQUARES:
00178       ret = PrepareLeastSquaresMin_();
00179       break;
00180   }
00181   //here build the LuImage
00182    if(ret >=0)
00183       ret = PrepareLuImage_();
00184    if(ret >=0)
00185       bIsInitialized_ = true;
00186
00187   return ret;
00188 }
00189
00190 int UnVignette::Init(BIAS::CameraParam cParam,INTERPOLATION_METHOD method, bool bUseLuT)
00191 {
00192   if(!cParam.IsInitialized())
00193     return -1;
00194   bUseLuT_ = bUseLuT;
00195   dInterPolationMethod_ = method;
00196   dWidth_ = cParam.GetWidth();
00197   dHeight_ = cParam.GetHeight();
00198   PrinciplePointX_ = cParam.GetPrincipalX() - dWidth_/2;
00199   PrinciplePointY_ = cParam.GetPrincipalY() - dHeight_/2;
00200   dWidthHalfMPPX_ = dWidth_/2 - PrinciplePointX_;
00201   dHeightHalfMPPY_ = dHeight_/2 - PrinciplePointY_;
00202
00203   int ret =0;
00204   ControlPoints_ = cParam.GetIlluCorrX();
00205   PercentageValues_ = cParam.GetIlluCorrY();
00206   if(ControlPoints_.size() > 2 && PercentageValues_.size() > 2)
00207   {
00208     switch(dInterPolationMethod_){
00209       case SPLINE_WITHOUT_LUT:
00210       case SPLINE_WITH_LUT:
00211         InterpolatorIllu_.SetKnotPoints(ControlPoints_);
00212         InterpolatorIllu_.SetControlPoints(PercentageValues_);
00213         InterpolatorIllu_.InitSpline();
00214         bUseLuT_ = bUseLuT;
00215         if(bUseLuT_)
00216           ret = InterpolatorIllu_.PrepareLuTSpline(ControlPoints_[0],
00217             ControlPoints_[ControlPoints_.size()-1],2000);
00218
00219         break;
00220       case LEAST_SQUARES:
00221         ret = PrepareLeastSquaresMin_();
00222         break;
00223     }
00224     if(ret >=0)
00225       ret = PrepareLuImage_();
00226     if(ret >=0)
00227       bIsInitialized_ = true;
00228     return ret;
00229   }
00230   else
00231     return -1;
00232 }
00233
00234
00235 /////////////// Private functions /////////////////////
00236 double UnVignette::
00237 CalcRadius_(double x, double y)
00238 {
00239   double radius=0.0;
00240   radius=sqrt((dWidthHalfMPPX_-x)*(dWidthHalfMPPX_-x) + (dHeightHalfMPPY_-y)*(dHeightHalfMPPY_-y));
00241   return radius;
00242 }
00243
00244 int UnVignette::
00245 PrepareLuImage_()
00246 {
00247   // if use the look up image, prepare it!
00248   double radius=0.0;
00249   double dum = 0.0;
00250   //variables for calcradius
00251   dWidthHalfMPPX_ = dWidth_/2 - PrinciplePointX_;
00252   dHeightHalfMPPY_ = dHeight_/2 - PrinciplePointY_;
00253
00254   LuImage_.Init(dWidth_,dHeight_,1);
00255   float ** ida = LuImage_.GetImageDataArray();
00256
00257   for(unsigned int k=0;k<LuImage_.GetWidth();k++)
00258   {
00259     for(unsigned int l=0;l<LuImage_.GetHeight();l++)
00260     {
00261       radius = CalcRadius_(k,l);
00262       if(radius<0.0) radius = 0.0;
00263       switch(dInterPolationMethod_){
00264         case SPLINE_WITH_LUT:
00265         case SPLINE_WITHOUT_LUT :
00266           if( bUseLuT_ )
00267               InterpolatorIllu_.SplineFromLuT(dum, radius/(dWidth_/2));
00268             else
00269               InterpolatorIllu_.Spline(dum,radius/(dWidth_/2),3);
00270         break;
00271         case LEAST_SQUARES:
00272            LeastSquares_(dum,radius/(dWidth_/2));
00273         break;
00274       }
00275
00276       // set factor in LuImage_ as correction factor;
00277       ida[l][k] = (float)dum;
00278     }
00279   }
00280   return 0;
00281 }
00282
00283 ///////////////// Prepare the Least Squares polynomial ///////////////
00284 int UnVignette::
00285 PrepareLeastSquaresMin_()
00286 {
00287   int res =0;
00288   int rows = PercentageValues_.size();
00289   A_.newsize(rows,4);
00290   Y_.newsize(rows);
00291   for(int row=0;row<rows;row++)
00292   {
00293
00294     A_[row][0] = 1;
00295     A_[row][1] = ControlPoints_[row];
00296     A_[row][2] = pow(ControlPoints_[row],2);
00297     A_[row][3] = pow(ControlPoints_[row],3);
00298     Y_[row] = PercentageValues_[row];
00299   }
00300   X_.newsize(4);
00301
00302   BIAS::SVD svd;
00303   res=svd.Solve(A_,Y_,X_);
00304  // if(res!= 0)
00305   //  BIASERR("ERROR in SVD: "<<res);
00306
00307   if(res == 0)
00308     bLeastSquaresPrepared_ = true;
00309   else
00310     bLeastSquaresPrepared_ = false;
00311   return res;
00312 }
00313
00314 //////////////// if least squares is prepared, get value for radius //
00315 int UnVignette::
00316 LeastSquares_(double &res, double radius)
00317 {
00318   if(!bLeastSquaresPrepared_)
00319   {
00320     BIASERR("Least Squares is not correctly prepared, aborting.");
00321     return -1;
00322   }
00323   //X_ = {a,b,c,d}
00324   res = X_[3]*pow(radius,3) + X_[2]*pow(radius,2) +X_[1]*radius + X_[0];
00325   return 0;
00326 }
00327
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/UnVignette.hh Source File

Image

UnVignette.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __UnVignette_hh__
00026 #define __UnVignette_hh__
00027
00028 #include <Base/Common/BIASpragmaStart.hh>
00029
00030 #include <Base/Image/Image.hh>
00031 #include <Base/Geometry/HomgPoint2D.hh>
00032 #include <Base/Geometry/KMatrix.hh>
00033 #include <MathAlgo/Interpolator.hh>
00034 #include <Image/CameraParam.hh>
00035 #include <Base/Math/Matrix.hh>
00036 #include <Base/Math/Vector.hh>
00037
00038 #include <vector>
00039 #include <string>
00040
00041 #define UNDIST_EPS 1e-9
00042
00043 namespace BIAS{
00044
00045   enum BIASImage_EXPORT INTERPOLATION_METHOD
00046   {
00047     LEAST_SQUARES =1,
00048     SPLINE_WITH_LUT,
00049     SPLINE_WITHOUT_LUT
00050   };
00051
00052   class BIASImage_EXPORT UnVignette{
00053
00054   public:
00055     UnVignette();
00056     UnVignette(CameraParam &cParam, INTERPOLATION_METHOD method = LEAST_SQUARES, bool bUseLuT = true);
00057
00058     ~UnVignette();
00059
00060     inline bool IsInitialized(){return bIsInitialized_;};
00061
00062     void Compute(BIAS::Image<unsigned char> &Image);
00063
00064     /**
00065       Init the Unvignette algorithm
00066       give ControlPoints in image as offset from Principal Point in pixel
00067       give percentage values in second vector
00068       vectors have to be of same size
00069       @author ischiller
00070       @date 02/06
00071     */
00072     int Init(const std::vector<double> ControlPoints,
00073              std::vector<double> PercentageValues,
00074              unsigned int dImageWidth , unsigned int dImageHeight,
00075              int dPPX, int dPPY,INTERPOLATION_METHOD method = LEAST_SQUARES,bool bUseLuT = true);
00076     /**
00077       Init the Unvignette algorithm with CameraParam object
00078       CameraParameter objcect has to contain ControlPoints and PercentageValues
00079       vectors have to be of same size
00080       @author ischiller
00081       @date 02/06
00082     */
00083     int Init(BIAS::CameraParam cParam, INTERPOLATION_METHOD method = LEAST_SQUARES, bool bUseLuT = true);
00084
00085   private:
00086     INTERPOLATION_METHOD  dInterPolationMethod_;
00087     double                CalcRadius_(double x, double y);
00088     int                   PrepareLuImage_();
00089     int                   PrepareLeastSquaresMin_();
00090     int                   LeastSquares_(double &res, double radius);
00091
00092   private:
00093     std::vector<double> ControlPoints_;
00094     std::vector<double> PercentageValues_;
00095
00096     BIAS::Matrix<double>  A_; //matrix for least squares computation (measured percentages)
00097     BIAS::Vector<double>  Y_; //vector with measurement points
00098     BIAS::Vector<double>  X_; //result vector of least squares polynomial fitting
00099
00100     bool                  bLeastSquaresPrepared_;
00101
00102
00103     double                dWidthHalfMPPX_;
00104     double                dHeightHalfMPPY_;
00105     BIAS::Image<float>    LuImage_;
00106
00107     bool                  bUseLuT_;
00108
00109     double                PrinciplePointX_;
00110     double                PrinciplePointY_;
00111     unsigned int          dWidth_;
00112     unsigned int          dHeight_;
00113     unsigned int          dChannelCount_;
00114
00115     bool                  bIsInitialized_;
00116     BIAS::Interpolator    InterpolatorIllu_;
00117
00118     // illumination vignette correction
00119     // x is distance in pixel from principal point
00120     // y is illumination correction factor
00121     std::vector<int>      IlluCorrX_;
00122     std::vector<double>   IlluCorrY_;
00123   };
00124 }
00125
00126 #include <Base/Common/BIASpragmaEnd.hh>
00127
00128 #endif
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Doc/utils.dox File Reference

Doc/utils.dox File Reference

Generated on Wed Jun 21 19:03:33 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/UUID.cpp Source File

Base » Image

UUID.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "UUID.hh"
00027
00028 #include <sstream>
00029
00030
00031 using namespace BIAS;
00032 using namespace std;
00033
00034 // static initialization
00035 timeval BIAS::UUID::LastGenerationTime_ = {0,0};
00036 long BIAS::UUID::g_uniqueCounter = 0;
00037
00038
00039 // jw
00040 BIAS::UUID::~UUID(){}
00041
00042
00043 // TODO: discuss change from bool isValid to IsNUL comparison ?
00044 BIAS::UUID::UUID()
00045 {
00046     this->clear();
00047 }
00048
00049
00050 // copy ctor
00051 BIAS::UUID::UUID(const BIAS::UUID& id)
00052 {
00053     (*this) = id;
00054 }
00055
00056
00057 BIAS::UUID::UUID(const uuid_t &id) {
00058     // TOOD: use uuid_copy instead on Linux (jw)
00059     memcpy(
00060         (void*)&theID_,
00061         (void*)&id,
00062         sizeof(uuid_t)
00063         );
00064     IsValid_ = true;
00065 }
00066
00067
00068 // very slow. JW
00069 BIAS::UUID::UUID(const std::string &sID){
00070     SetFromString(sID);
00071 }
00072
00073
00074 BIAS::UUID::UUID(const unsigned long & n)
00075 {
00076     SetFromLong(n);
00077 }
00078
00079
00080 // jw
00081 void BIAS::UUID::clear()
00082 {
00083 #ifdef WIN32
00084     // does not take significant performace. (1.000.000 =16 msec) JW
00085     UuidCreateNil( &(this->theID_) );
00086 #else //WIN32
00087     uuid_clear(this->theID_);
00088 #endif //WIN32
00089
00090     // invalidate because NULL UID is not unique in general.
00091     IsValid_ = false;
00092 }
00093
00094
00095 // jw
00096 bool BIAS::UUID::IsNil() const
00097 {
00098     bool result=false;
00099 #ifdef WIN32
00100     RPC_STATUS status=RPC_S_OK;
00101     result = (TRUE==UuidIsNil(
00102         (uuid_t * )(&theID_),
00103         &status )
00104         );
00105     BIASASSERT(status==RPC_S_OK);
00106 #else //WIN32
00107     result = (1==uuid_is_null(theID_));
00108 #endif //WIN32
00109     return result;
00110 }
00111
00112
00113
00114 bool BIAS::UUID::SetFromString(const std::string &sID) {
00115 #ifdef WIN32
00116     char *tmp = const_cast<char *>(sID.c_str());
00117     unsigned char * cUUIDwin = reinterpret_cast<unsigned char *>(tmp);
00118     // jw: WIN system func from rpcdce.h
00119     // maps to UuidFromStringA for ASCII (standard for us )
00120     // and UuidFromStringW for UNICODE build (untested)
00121     if (UuidFromString(cUUIDwin, &theID_)!=RPC_S_OK) {
00122         BIASERR("UUID could not be read!");
00123         IsValid_ = false;
00124     }
00125     else IsValid_ = true;
00126     //  std::cout <<"After Parser: "<<std::hex<<theID_.Data1<<"-"
00127     //     <<theID_.Data2<<std::dec<<std::endl;
00128 #else
00129     if (sID.length()!=36)
00130         BIASERR("Wrong size of string to construct from: "<<sID);
00131     if (uuid_parse(sID.c_str(), theID_)!=0) {
00132         BIASERR("UUID could not be read!");
00133         IsValid_ = false;
00134     }
00135     else   IsValid_ = true;
00136 #endif
00137     return IsValid_;
00138 }
00139
00140
00141 // jw
00142 bool BIAS::UUID::SetFromLong(const unsigned long & n) {
00143     clear();
00144     this->IsValid_ = true;
00145
00146 #ifdef WIN32
00147     theID_.Data1=n; // unsigned long
00148     // distinguish sequential 0 ID from NIL ID by setting exactly one more element to one:
00149     theID_.Data2=1; // unsigned short
00150     // keep a copy for future consistency checks:
00151     //BIASASSERT(sizeof(n) <= 8);
00152     memcpy(
00153       (void*)(&(theID_.Data4[8-sizeof(n)])), // dest ptr
00154       (void*)(&n), // src ptr
00155       sizeof(n) );
00156     return true;
00157 #else // WIN32
00158     // TODO: inefficient, store the unsigned long directly in the unsigned char[16] JW
00159     std::stringstream ss;
00160     // unused prefix:
00161     ss<<"00000000-0000-0000-0000-";
00162     // 12 digit hex format with leading zeroes
00163     ss<<setfill('0')<<setw(12)<<noshowbase<<hex<<n;
00164     return SetFromString( ss.str() );
00165 #endif // WIN32
00166 }
00167
00168 // jw
00169 unsigned long BIAS::UUID::GetLong() const
00170 {
00171     unsigned long n=0;
00172 #ifdef WIN32
00173 #  ifdef BIAS_DEBUG
00174     // compare values to reserved pattern for consecutive ID`s
00175     if (
00176         (theID_.Data2   !=1) ||
00177         (theID_.Data3   !=0) ||
00178         (theID_.Data4[0]!=0) ||
00179         (theID_.Data4[1]!=0)
00180         )
00181     {
00182         BIASERR("you are trying to GetLong a consecutive ID "<<endl
00183           <<(*this)<<endl
00184           <<"with data fields that dont match the reserved consecutive pattern: \"<longID>-0001-0000-0000-*"
00185           <<"This is inconsistent !");
00186     };
00187 #  endif // BIAS_DEBUG
00188     n=theID_.Data1;
00189 #else //WIN32
00190     // TODO: efficient
00191     std::string s;
00192     std::istringstream iss;
00193     GetString(s);
00194     // parse result and extract least significat value (12 hex Bytes)
00195     // to be compatible with SetFromLong
00196     // find last numerical part:
00197     std::string::size_type pos = s.rfind('-');
00198     if (pos != string::npos){
00199         // found, extract last 12 hex Bytes
00200         iss.str(  s.substr(pos+1, 12) );
00201         iss>>hex>> n;
00202     }
00203 #endif //WIN32
00204     return n;
00205 }
00206
00207
00208
00209 // static
00210 BIAS::UUID
00211 BIAS::UUID::GenerateUUID(const bool & consecutively)
00212 {
00213     BIAS::UUID id;
00214     id.AssignUUID(consecutively);
00215     return id;
00216 }
00217
00218
00219 // static
00220 BIAS::UUID
00221 BIAS::UUID::GenerateUUID_Consecutive()
00222 {
00223     BIAS::UUID id;
00224     id.AssignUUID_Consecutive();
00225     return id;
00226 }
00227
00228 // static
00229 BIAS::UUID
00230 BIAS::UUID::GenerateUUID_Global()
00231 {
00232     BIAS::UUID id;
00233     id.AssignUUID_Global();
00234     return id;
00235 }
00236
00237
00238 // jw
00239 void
00240 BIAS::UUID::AssignUUID(const bool & consecutively)
00241 {
00242    if (consecutively)
00243         return AssignUUID_Consecutive();
00244     else
00245         return AssignUUID_Global();
00246 }
00247
00248
00249
00250 // TODO: thread safe increase of g_uniqueCounter? (JW)
00251 // JW
00252 void
00253 BIAS::UUID::AssignUUID_Consecutive()
00254 {
00255     this->SetFromLong(g_uniqueCounter);
00256     g_uniqueCounter++;
00257
00258     // set the valid flag for backward compatibillty
00259     this->IsValid_ = true;
00260 }
00261
00262
00263 // jw
00264 void
00265 BIAS::UUID::AssignUUID_Global()
00266 {
00267     //uuid_t id;
00268 #ifdef WIN32
00269     //JW details:  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuid_1.asp
00270     // creation uses ethernet/token ring addresses; UUID is guaranteed to be unique for the network
00271     HRESULT hr = UuidCreate( &theID_);
00272     switch (hr)
00273     {
00274     case RPC_S_UUID_LOCAL_ONLY:
00275         BIASERR("UUID_LOCAL_ONLY guaranteed uniqueness for the generating machine, only!");
00276     case RPC_S_OK:
00277         break;
00278     default:
00279         BIASERR("Could not create UUID!");
00280     } // of switch
00281
00282 #else // WIN32
00283     uuid_generate_time(theID_);
00284     timeval CurTime;
00285     uuid_time(theID_, &CurTime);
00286
00287     if ((CurTime.tv_sec  > LastGenerationTime_.tv_sec) ||
00288         ((CurTime.tv_sec == LastGenerationTime_.tv_sec) &&
00289         (CurTime.tv_usec > LastGenerationTime_.tv_usec)))
00290     {
00291         LastGenerationTime_.tv_sec  = CurTime.tv_sec;
00292         LastGenerationTime_.tv_usec = CurTime.tv_usec;
00293     } else {
00294         BIASERR("There is a system clock problem !  The last time used for"
00295             <<" UUID generation lies in the future ! Maybe someone has turned"
00296             <<" back the clock (NTP ?). UUIDs may not be unique anymore."
00297             <<" CurTime="<<CurTime.tv_sec<<":"<<CurTime.tv_usec
00298             <<" LastTime="<<LastGenerationTime_.tv_sec<<":"
00299             <<LastGenerationTime_.tv_usec);
00300     }
00301 #endif // WIN32
00302
00303     // set the valid flag for backward compatibillty
00304     this->IsValid_ = true;
00305 }
00306
00307
00308
00309 void BIAS::UUID::GetString(std::string& sUUID) const {
00310 #ifdef WIN32
00311     unsigned char * cUUIDwin;
00312     UuidToString (const_cast<uuid_t*>(&theID_), &cUUIDwin);
00313     sUUID = (char *)cUUIDwin;
00314 #else
00315     char cUUID[37];
00316     uuid_unparse(theID_, cUUID);
00317     sUUID = cUUID;
00318 #endif
00319 }
00320
00321 // jw
00322 std::string BIAS::UUID::GetString() const {
00323     std::string str;
00324     GetString(str);
00325     return str;
00326 }
00327
00328
00329 time_t BIAS::UUID::GetUUIDCreationTime() const {
00330 #ifdef WIN32
00331     BIASERR("Not yet implemented!");
00332     return time_t();
00333 #else
00334     timeval CreationTime;
00335     time_t thetime;
00336     thetime = uuid_time(theID_, &CreationTime);
00337     return thetime;
00338 #endif
00339 }
00340
00341
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/UUID.hh Source File

Base » Image

UUID.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __BIASUUID_hh__
00027 #define __BIASUUID_hh__
00028
00029 #include <ctime>
00030 #include <Base/Debug/Error.hh>
00031 #include <Base/Debug/Debug.hh>
00032
00033 #include <Base/Common/BIASpragmaStart.hh>
00034
00035
00036 #ifdef WIN32
00037 #  ifdef UNICODE
00038 #    error using BIAS uuid with UNICODE is untested. Please disable UNICODE or this warning if you really know what you do. (look at UuidFromStringA/UuidFromStringW in rpcdce.h) (JW 12/2005)
00039 #  endif // UNICODE
00040 // on Win32 there are two types: GUID and UUID, both pointing to the same struct
00041 #  include <rpc.h>
00042 //#  include <rpcdce.h>
00043 // remove UUID to avoid name clash with our class
00044 #  undef UUID
00045 #  undef uuid_t
00046 typedef GUID uuid_t;  // let our internal data type be of type GUID
00047 #else // WIN32
00048 #  include <uuid/uuid.h>
00049 #endif //WIN32
00050
00051 #include <time.h>
00052
00053 namespace BIAS {
00054
00055
00056     /** @class UUID
00057     @ingroup g_utils
00058     @brief interface class for
00059     producing/storing Universally Unique IDentifiers
00060
00061     A UUID is a u unique structure.
00062     It is usually a 128 bit value computed from the MAC address of the network
00063     adapter (which means "spatial uniqueness") and a high resolution
00064     timestamp providing "temporal uniqueness".
00065     //In addition you
00066
00067     @attention temporal uniqueness is only obtained if time is monotonic,
00068     i.e. you MUST NOT turn back the clock (-> NTP ?)
00069
00070     For information: generating 1.000.000 UIDS on WIN32 taked approx. 180 msec. (jw)
00071
00072     \todo The UUID representation is *not* platform independant,
00073     in particular generating a consecutive ID on Windows
00074     and reading it on Linux will not work! (JW)
00075
00076     @author koeser 09/2003, W32: Jan Woetzel 08/2005 */
00077
00078     // true to generate consecutive IDS as default instead of MAC like ids
00079 #ifndef DEFAULT_UUID_CONSECUTIVELY
00080 #  define DEFAULT_UUID_CONSECUTIVELY false
00081 #endif
00082
00083     class BIASImageBase_EXPORT UUID : public Debug
00084     {
00085     public:
00086
00087         // destructor
00088         virtual ~UUID();
00089
00090         /** @brief default constructor
00091         does NOT create a valid UUID to avoid performance decrease
00092         in case someone wants to create many UIDS that are not really used.
00093         (Jan Woetzel 08/2005)
00094         */
00095         UUID();
00096
00097         /** @brief use this if you want to create a UUID "manually" */
00098         explicit UUID(const uuid_t &id);
00099
00100         /** @brief copy constructor, calls operator= internally. */
00101         UUID(const BIAS::UUID& id);
00102
00103         /** @brief construct from string containing ascii uuid */
00104         explicit UUID(const std::string &sID);
00105
00106         /** @brief construct from string containing a unique long.
00107         User has to assert uniqueness himself, e.g. by a global counter.
00108         @author Jan Woetzel 2005 */
00109         explicit UUID(const unsigned long & n);
00110
00111         /** NULLS the class members,
00112         invalidates this UID ( not unique anymore).
00113         Jan Woetzel 08/2005 */
00114         void clear();
00115
00116         /* @return true if it is a NIL/NULL ID which is not unique Jan Woetzel 08/2005 */
00117         bool IsNil() const;
00118
00119
00120         /** @brief static function which simply produces a uuid and returns
00121         @attention calling this function on an uninitialized UUID object does
00122         not initialize it. It is _really_ a static function.
00123         @return a new uuid which can be assigned to a UUID object
00124         @author Jan Woetzel (rewrite 2005/08) */
00125         static UUID GenerateUUID(const bool & consecutively=DEFAULT_UUID_CONSECUTIVELY);
00126         /// jw
00127         static UUID GenerateUUID_Consecutive();
00128         /// jw
00129         static UUID GenerateUUID_Global();
00130
00131
00132         /** @brief function to assign a fresh, unique ID.
00133         @param consecutively: true to use a sequential, dense counter instead of 16 Byte MAC like UID.
00134         The ID will be unique for each program run.
00135         Please mind the differnec to a sequential (local unique only) UUID which is unique for teh machine, not only the run.
00136         False to generate universally valid one.
00137         @author Jan Woetzel 08/2005   */
00138         void AssignUUID(const bool & consecutively=DEFAULT_UUID_CONSECUTIVELY);
00139         /// jw
00140         void AssignUUID_Global();
00141         /// jw
00142         void AssignUUID_Consecutive();
00143
00144
00145         /** @brief construct from string containing ascii uuid.
00146         Thsiu routine is slow! (1.000.000 times take approx 16 seconds, JW)
00147         @return true if succesful */
00148         bool SetFromString(const std::string &sID);
00149
00150         /** @brief construct from a unique long.
00151         User has to assert uniqueness himslef, e.g. by a global counter.
00152         @return true if succesful
00153         @author Jan Woetzel 2005 */
00154         bool SetFromLong(const unsigned long & n);
00155
00156         /** @brief get least significant value of UID as long value.
00157         Useful in conjunction with SetFromLong if you want to us eunique counetrs instead of real UIDs.
00158         @return least significant UID value
00159         @author Jan Woetzel 2005 */
00160         unsigned long GetLong() const;
00161
00162         /** @brief returns the time used to create the uuid */
00163         time_t GetUUIDCreationTime() const;
00164
00165         /** @brief comparison operator only compares ids, no check of validities */
00166         inline bool operator==(const UUID& id) const {
00167 #ifdef WIN32
00168             RPC_STATUS status;
00169             // TODO: this is not ANSI compatible 4238
00170             //return (!UuidCompare(&((GUID)id.theID_),&((GUID)theID_), &status));
00171             // TODO PERFORMANCE warning because of additional constructors!
00172             GUID id1 = (GUID)id.theID_;
00173             GUID id2 = (GUID)this->theID_;
00174             int result = UuidCompare(&id1, &id2, &status);
00175             return (result==0);
00176 #else
00177             return (!uuid_compare(id.theID_,theID_));
00178 #endif
00179         };
00180
00181         /** @brief "not equal"-operator, uses result of operator== */
00182         inline bool operator!=(const UUID& id) const
00183         {
00184             return (!((*this)==id));
00185         };
00186
00187         /** @brief the operator< does not express temporal ordering, it does only
00188         compare the data areas of the two ids, e.g. for sorting, map-storage */
00189         inline bool operator<(const UUID& id) const
00190         {
00191 #ifdef WIN32
00192             RPC_STATUS dummy;
00193             return (UuidCompare(&((GUID)id.theID_),&((GUID)theID_),&dummy)<0);
00194 #else
00195             return (uuid_compare(id.theID_,theID_)<0);
00196 #endif
00197         };
00198
00199         /** @brief operator<= does not express temporal ordering, it does only
00200         compare the data areas of the two ids !!! */
00201         inline bool operator<=(const UUID& id) const
00202         {
00203 #ifdef WIN32
00204             RPC_STATUS dummy;
00205             return (UuidCompare(&((GUID)id.theID_),&((GUID)theID_),&dummy)<=0);
00206 #else
00207             return (uuid_compare(id.theID_,theID_)<=0);
00208 #endif
00209         };
00210
00211         /** @brief standard assignment operator */
00212         inline UUID& operator=(const UUID& id)
00213         {
00214             memcpy((void*)&theID_,(void*)&id.theID_,sizeof(uuid_t));
00215             IsValid_ = id.IsValid_; return (*this);
00216         };
00217
00218         /** @brief writes the UUID into a string object */
00219         void GetString(std::string& sUUID) const;
00220         std::string GetString() const;
00221
00222
00223         /** @brief checks whether this uuid is valid(true) or unitialized(false) */
00224         inline bool IsValid() const { return IsValid_; };
00225
00226         /** @brief sets the valid flag to false and clears data
00227             JW 09/2005: added clear in addition to just setting bool flag invalid. */
00228         inline void Invalidate(){this->clear(); };
00229
00230         /**  @brief get the pointer to the Uc[16] array with the raw uuid
00231         */
00232         const unsigned char *GetUUIDRaw() const
00233 #ifdef WIN32
00234         {return NULL;}
00235 #else
00236         {return (unsigned char *)theID_;}
00237 #endif
00238
00239         void SetUUIDRaw(const unsigned char * rawid)
00240 #ifdef WIN32
00241         {BIASASSERT(rawid!=NULL);}
00242 #else
00243         {memcpy((unsigned char *)theID_, rawid, 16);}
00244 #endif
00245
00246
00247
00248     protected:
00249
00250         /** @relates UUID
00251         @brief write a UUID to a stream */
00252         inline friend std::ostream& operator<<(std::ostream & os, const UUID& id) {
00253             std::string suid;
00254             id.GetString(suid);
00255             os << suid;
00256             return os;
00257         }
00258
00259         /** @relates UUID
00260         @brief reads a UUID from a stream */
00261         inline friend std::istream& operator>>(std::istream & is, UUID& id) {
00262             char cUUID[37];
00263             is.get(cUUID, 37);
00264             cUUID[36] = 0;
00265             id.IsValid_ = true;
00266             // call libuuid function to get id out of string:
00267 #ifdef WIN32
00268             unsigned char * cUUIDwin = (unsigned char *)cUUID;
00269             if (UuidFromString(cUUIDwin, &((GUID)id.theID_))!=RPC_S_OK)
00270 #else
00271             if (uuid_parse(cUUID, id.theID_)!=0)
00272 #endif
00273             {
00274                 BIASERR("UUID could not be read from <"<<cUUID<<">");
00275                 id.IsValid_ = false;
00276             }
00277
00278             return is;
00279         }
00280
00281
00282         /////////////////////////////////////////////////
00283         // DATA MEMBERS
00284         //
00285
00286         /// the data fields of the uuid
00287         uuid_t theID_;
00288
00289         /// flag indicating whether this uuid has been assigned a value yet
00290         bool IsValid_;
00291
00292         /////////////////////////////////////////////////
00293         // STATICS
00294         //
00295
00296
00297         /// when creating a uuid, current time is compared against the time
00298         /// saved during the last uuid generation
00299         ///
00300         /// Hint: If you have WIN32 compilation problems look for WIN32_LEAN_AND_MEAN and windows.h (JW)
00301         static timeval LastGenerationTime_;
00302
00303
00304         /// global counter to create next unique consecutive program run-unique ID. (JW)
00305         static long g_uniqueCounter;
00306     }; // class BIAS::UUID
00307
00308
00309
00310     /** @brief Helper class for ascending sort of sequential BIAS::UUIDs
00311     Sample usage:
00312     \verbatim
00313     #include <algorithm>
00314     std::vector<BIAS::UUID> v;
00315     std::sort(v.begin(), v.end(), BIAS::UUIDsortAscending() );
00316     \endverbatim
00317     \todo operator< of UUD may be inverse, TOOD: compare uuid_compare on Linux and WIN32.
00318     @author Jan Woetzel */
00319     class UUIDsortAscending {
00320     public:
00321       bool operator()(BIAS::UUID & a, BIAS::UUID & b)
00322       {
00323         return ! (a < b);
00324       }
00325     };
00326
00327
00328
00329
00330 } // namespace
00331
00332
00333
00334 #include <Base/Common/BIASpragmaEnd.hh>
00335
00336 #endif // __BIASUUID_hh__
00337
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/vec.h Source File

Base » Math » tnt

vec.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033 // Basic TNT  numerical vector (0-based [i] AND 1-based (i) indexing )
00034 //
00035
00036 #ifndef VEC_H
00037 #define VEC_H
00038
00039 #include "subscript.h"
00040 #include <cstdlib>
00041 #include <cassert>
00042 #include <iostream>
00043 #include <sstream>
00044 #include <string>
00045
00046 namespace TNT
00047 {
00048
00049 template <class T>
00050 class Vector
00051 {
00052
00053
00054   public:
00055
00056     typedef Subscript   size_type;
00057     typedef         T   value_type;
00058     typedef         T   element_type;
00059     typedef         T*  pointer;
00060     typedef         T*  iterator;
00061     typedef         T&  reference;
00062     typedef const   T*  const_iterator;
00063     typedef const   T&  const_reference;
00064
00065     Subscript lbound() const { return 1;}
00066
00067   protected:
00068     T* v_;
00069     T* vm1_;        // pointer adjustment for optimzied 1-offset indexing
00070     Subscript n_;
00071
00072     // internal helper function to create the array
00073     // of row pointers
00074
00075     void initialize(Subscript N)
00076     {
00077         // adjust pointers so that they are 1-offset:
00078         // v_[] is the internal contiguous array, it is still 0-offset
00079         //
00080         assert(v_ == NULL);
00081         v_ = new T[N];
00082         assert(v_  != NULL);
00083         vm1_ = v_-1;
00084         n_ = N;
00085     }
00086
00087     void copy(const T*  v)
00088     {
00089         Subscript N = n_;
00090         Subscript i;
00091
00092 #ifdef TNT_UNROLL_LOOPS
00093         Subscript Nmod4 = N & 3;
00094         Subscript N4 = N - Nmod4;
00095
00096         for (i=0; i<N4; i+=4)
00097         {
00098             v_[i] = v[i];
00099             v_[i+1] = v[i+1];
00100             v_[i+2] = v[i+2];
00101             v_[i+3] = v[i+3];
00102         }
00103
00104         for (i=N4; i< N; i++)
00105             v_[i] = v[i];
00106 #else
00107
00108         for (i=0; i< N; i++)
00109             v_[i] = v[i];
00110 #endif
00111     }
00112
00113     void set(const T& val)
00114     {
00115         Subscript N = n_;
00116         Subscript i;
00117
00118 #ifdef TNT_UNROLL_LOOPS
00119         Subscript Nmod4 = N & 3;
00120         Subscript N4 = N - Nmod4;
00121
00122         for (i=0; i<N4; i+=4)
00123         {
00124             v_[i] = val;
00125             v_[i+1] = val;
00126             v_[i+2] = val;
00127             v_[i+3] = val;
00128         }
00129
00130         for (i=N4; i< N; i++)
00131             v_[i] = val;
00132 #else
00133
00134         for (i=0; i< N; i++)
00135             v_[i] = val;
00136
00137 #endif
00138     }
00139
00140
00141
00142     void destroy()
00143     {
00144         /* do nothing, if no memory has been previously allocated */
00145         if (v_ == NULL) return ;
00146
00147         /* if we are here, then matrix was previously allocated */
00148         delete [] (v_);  v_ = NULL;
00149         vm1_ = NULL;
00150     }
00151
00152
00153   public:
00154
00155     // access
00156
00157     iterator begin() { return v_;}
00158     iterator end()   { return v_ + n_; }
00159     const iterator begin() const { return v_;}
00160     const iterator end() const  { return v_ + n_; }
00161
00162     // destructor
00163
00164     ~Vector()
00165     {
00166         destroy();
00167     }
00168
00169     // constructors
00170
00171     Vector() : v_(0), vm1_(0), n_(0)  {};
00172
00173     Vector(const Vector<T> &A) : v_(0), vm1_(0), n_(0)
00174     {
00175         initialize(A.n_);
00176         copy(A.v_);
00177     }
00178
00179     Vector(Subscript N, const T& value = T()) :  v_(0), vm1_(0), n_(0)
00180     {
00181         initialize(N);
00182         set(value);
00183     }
00184
00185     Vector(Subscript N, const T* v) :  v_(0), vm1_(0), n_(0)
00186     {
00187         initialize(N);
00188         copy(v);
00189     }
00190
00191     //Vector(Subscript N, char *s) :  v_(0), vm1_(0), n_(0)
00192     //{
00193     //    initialize(N);
00194     //    std::istringstream ins(s);
00195     //    Subscript i;
00196     //    for (i=0; i<N; i++)
00197     //            ins >> v_[i];
00198     //}
00199
00200     Vector(const Subscript N, const std::string & s) :  v_(0), vm1_(0), n_(0)
00201     {
00202         initialize(N);
00203         std::istringstream ins(s);
00204         Subscript i;
00205         for (i=0; i<N; i++)
00206                 ins >> v_[i];
00207     }
00208
00209
00210
00211     // methods
00212     //
00213     Vector<T>& newsize(Subscript N)
00214     {
00215         if (n_ == N) return *this;
00216
00217         destroy();
00218         initialize(N);
00219
00220         return *this;
00221     }
00222
00223
00224     // assignments
00225     //
00226     Vector<T>& operator=(const Vector<T> &A)
00227     {
00228         if (v_ == A.v_)
00229             return *this;
00230
00231         if (n_ == A.n_)         // no need to re-alloc
00232             copy(A.v_);
00233
00234         else
00235         {
00236             destroy();
00237             initialize(A.n_);
00238             copy(A.v_);
00239         }
00240
00241         return *this;
00242     }
00243
00244     Vector<T>& operator=(const T& scalar)
00245     {
00246         set(scalar);
00247         return *this;
00248     }
00249
00250     inline Subscript dim() const
00251     {
00252         return  n_;
00253     }
00254
00255     inline Subscript size() const
00256     {
00257         return  n_;
00258     }
00259
00260
00261     inline reference operator()(Subscript i)
00262     {
00263 #ifdef TNT_BOUNDS_CHECK
00264         assert(1<=i);
00265         assert(i <= n_) ;
00266 #endif
00267         return vm1_[i];
00268     }
00269
00270     inline const_reference operator() (Subscript i) const
00271     {
00272 #ifdef TNT_BOUNDS_CHECK
00273         assert(1<=i);
00274         assert(i <= n_) ;
00275 #endif
00276         return vm1_[i];
00277     }
00278
00279     inline reference operator[](Subscript i)
00280     {
00281 #ifdef TNT_BOUNDS_CHECK
00282         assert(0<=i);
00283         assert(i < n_) ;
00284 #endif
00285         return v_[i];
00286     }
00287
00288     inline const_reference operator[](Subscript i) const
00289     {
00290 #ifdef TNT_BOUNDS_CHECK
00291         assert(0<=i);
00292
00293
00294
00295
00296
00297
00298         assert(i < n_) ;
00299 #endif
00300         return v_[i];
00301     }
00302
00303
00304
00305 };
00306
00307
00308 /* ***************************  I/O  ********************************/
00309
00310 template <class T>
00311 std::ostream& operator<<(std::ostream &s, const Vector<T> &A)
00312 {
00313   Subscript N=A.dim();
00314
00315   s <<  N << std::endl;
00316
00317   for (Subscript i=0; i<N; i++)
00318     s   << A[i] << " " << std::endl;
00319   s << std::endl;
00320
00321   return s;
00322   /*
00323     Subscript N=A.dim();
00324     s<< "[ ";
00325     for (Subscript i=0; i<N; i++)
00326     s   <<std::setprecision(10)<< A[i] << " " ;
00327     s << " ]";
00328     return s;
00329   */
00330 }
00331
00332 template <class T>
00333 std::istream & operator>>(std::istream &s, Vector<T> &A)
00334 {
00335
00336     Subscript N;
00337
00338     s >> N;
00339
00340     if ( !(N == A.size() ))
00341     {
00342         A.newsize(N);
00343     }
00344
00345
00346     for (Subscript i=0; i<N; i++)
00347             s >>  A[i];
00348
00349
00350     return s;
00351 }
00352
00353 // *******************[ basic matrix algorithms ]***************************
00354
00355
00356 template <class T>
00357 Vector<T> operator+(const Vector<T> &A,
00358     const Vector<T> &B)
00359 {
00360     Subscript N = A.dim();
00361
00362     assert(N==B.dim());
00363
00364     Vector<T> tmp(N);
00365     Subscript i;
00366
00367     for (i=0; i<N; i++)
00368             tmp[i] = A[i] + B[i];
00369
00370     return tmp;
00371 }
00372
00373 template <class T>
00374 Vector<T> operator-(const Vector<T> &A,
00375     const Vector<T> &B)
00376 {
00377     Subscript N = A.dim();
00378
00379     assert(N==B.dim());
00380
00381     Vector<T> tmp(N);
00382     Subscript i;
00383
00384     for (i=0; i<N; i++)
00385             tmp[i] = A[i] - B[i];
00386
00387     return tmp;
00388 }
00389
00390 template <class T>
00391 Vector<T> operator*(const Vector<T> &A,
00392     const Vector<T> &B)
00393 {
00394     Subscript N = A.dim();
00395
00396     assert(N==B.dim());
00397
00398     Vector<T> tmp(N);
00399     Subscript i;
00400
00401     for (i=0; i<N; i++)
00402             tmp[i] = A[i] * B[i];
00403
00404     return tmp;
00405 }
00406
00407
00408 template <class T>
00409 T dot_prod(const Vector<T> &A, const Vector<T> &B)
00410 {
00411     Subscript N = A.dim();
00412     assert(N == B.dim());
00413
00414     Subscript i;
00415     T sum = 0;
00416
00417     for (i=0; i<N; i++)
00418         sum += A[i] * B[i];
00419
00420     return sum;
00421 }
00422
00423 }   /* namespace TNT */
00424
00425 #endif
00426 // VEC_H
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/vecadaptor.h Source File

Base » Math » tnt

vecadaptor.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 /*
00010 *
00011 * Template Numerical Toolkit (TNT): Linear Algebra Module
00012 *
00013 * Mathematical and Computational Sciences Division
00014 * National Institute of Technology,
00015 * Gaithersburg, MD USA
00016 *
00017 *
00018 * This software was developed at the National Institute of Standards and
00019 * Technology (NIST) by employees of the Federal Government in the course
00020 * of their official duties. Pursuant to title 17 Section 105 of the
00021 * United States Code, this software is not subject to copyright protection
00022 * and is in the public domain.  The Template Numerical Toolkit (TNT) is
00023 * an experimental system.  NIST assumes no responsibility whatsoever for
00024 * its use by other parties, and makes no guarantees, expressed or implied,
00025 * about its quality, reliability, or any other characteristic.
00026 *
00027 * BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00028 * see http://math.nist.gov/tnt for latest updates.
00029 *
00030 */
00031
00032
00033
00034 #ifndef VECADAPTOR_H
00035 #define VECADAPTOR_H
00036
00037 #include <cstdlib>
00038 #include <iostream>
00039 #include <strstream>
00040 #include <cassert>
00041
00042 #include "subscript.h"
00043
00044 #ifdef TNT_USE_REGIONS
00045 #include "region1d.h"
00046 #endif
00047
00048 namespace TNT
00049 {
00050
00051 //  see "tntreq.h" for TNT requirements for underlying vector
00052 //  class.  This need NOT be the STL vector<> class, but a subset
00053 //  that provides minimal services.
00054 //
00055 //  This is a container adaptor that provides the following services.
00056 //
00057 //      o)  adds 1-offset operator() access ([] is always 0 offset)
00058 //      o)  adds TNT_BOUNDS_CHECK to () and []
00059 //      o)  adds initialization from strings, e.g.  "1.0 2.0 3.0";
00060 //      o)  adds newsize(N) function (does not preserve previous values)
00061 //      o)  adds dim() and dim(1)
00062 //      o)  adds free() function to release memory used by vector
00063 //      o)  adds regions, e.g. A(Index(1,10)) = ...
00064 //      o)  add getVector() method to return adapted container
00065 //      o)  adds simple I/O for ostreams
00066
00067 template <class BBVec>
00068 class Vector_Adaptor
00069 {
00070
00071   public:
00072     typedef   typename BBVec::value_type T;
00073     typedef         T   value_type;
00074     typedef         T   element_type;
00075     typedef         T*  pointer;
00076     typedef         T*  iterator;
00077     typedef         T&  reference;
00078     typedef const   T*  const_iterator;
00079     typedef const   T&  const_reference;
00080
00081     Subscript lbound() const { return 1; }
00082
00083   protected:
00084     BBVec v_;
00085     T* vm1_;
00086
00087   public:
00088
00089     Subscript size() const { return v_.size(); }
00090
00091     // These were removed so that the ANSI C++ valarray class
00092     // would work as a possible storage container.
00093     //
00094     //
00095     //iterator begin() { return v_.begin();}
00096     //iterator begin() { return &v_[0];}
00097     //
00098     //iterator end()   { return v_.end(); }
00099     //iterator end()   { return &v_[0] + v_.size(); }
00100     //
00101     //const_iterator begin() const { return v_.begin();}
00102     //const_iterator begin() const { return &v_[0];}
00103     //
00104     //const_iterator end()  const { return v_.end(); }
00105     //const_iterator end()  const { return &v_[0] + v_.size(); }
00106
00107     BBVec& getVector() { return v_; }
00108     Subscript dim() const { return v_.size(); }
00109     Subscript dim(Subscript i)
00110     {
00111 #ifdef TNT_BOUNDS_CHECK
00112         assert(i==TNT_BASE_OFFSET);
00113 #endif
00114         return (i==TNT_BASE_OFFSET ? v_.size() : 0 );
00115     }
00116     Vector_Adaptor() : v_() {};
00117     Vector_Adaptor(const Vector_Adaptor<BBVec> &A) : v_(A.v_)
00118     {
00119         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00120
00121     }
00122
00123     Vector_Adaptor(Subscript N, /*const*/ char *s) : v_(N)
00124     {
00125         istrstream ins(s);
00126         for (Subscript i=0; i<N; i++)
00127             ins >> v_[i] ;
00128
00129         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00130     };
00131
00132     Vector_Adaptor(Subscript N, const T& value = T()) : v_(N)
00133     {
00134         for (Subscript i=0; i<N; i++)
00135              v_[i]  = value;
00136
00137         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00138     }
00139
00140     Vector_Adaptor(Subscript N, const T* values) : v_(N)
00141     {
00142         for (Subscript i=0; i<N; i++)
00143              v_[i]  = values[i];
00144         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00145     }
00146     Vector_Adaptor(const BBVec & A) : v_(A)
00147     {
00148         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00149     }
00150
00151     // NOTE: this assumes that BBVec(0) constructor creates an
00152     //  null vector that does not take up space...  It would be
00153     //  great to require that BBVec have a corresponding free()
00154     //  function, but in particular STL vectors do not.
00155     //
00156     Vector_Adaptor<BBVec>& free()
00157     {
00158         return *this = Vector_Adaptor<BBVec>(0);
00159     }
00160
00161     Vector_Adaptor<BBVec>& operator=(const Vector_Adaptor<BBVec> &A)
00162     {
00163         v_ = A.v_ ;
00164         vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL);
00165         return *this;
00166     }
00167
00168     Vector_Adaptor<BBVec>& newsize(Subscript N)
00169     {
00170         // NOTE: this is not as efficient as it could be
00171         // but to retain compatiblity with STL interface
00172         // we cannot assume underlying implementation
00173         // has a newsize() function.
00174
00175         return *this = Vector_Adaptor<BBVec>(N);
00176
00177     }
00178
00179     Vector_Adaptor<BBVec>& operator=(const T &a)
00180     {
00181         Subscript i;
00182         Subscript N = v_.size();
00183         for (i=0; i<N; i++)
00184             v_[i] = a;
00185
00186         return *this;
00187     }
00188
00189     Vector_Adaptor<BBVec>& resize(Subscript N)
00190     {
00191         if (N == size()) return *this;
00192
00193         Vector_Adaptor<BBVec> tmp(N);
00194         Subscript n =  (N < size() ? N : size());  // min(N, size());
00195         Subscript i;
00196
00197         for (i=0; i<n; i++)
00198             tmp[i] = v_[i];
00199
00200
00201         return (*this = tmp);
00202
00203     }
00204
00205
00206     reference operator()(Subscript i)
00207     {
00208 #ifdef TNT_BOUNDS_CHECK
00209         assert(1<=i);
00210         assert(i<=dim());
00211 #endif
00212         return vm1_[i];
00213     }
00214
00215     const_reference operator()(Subscript i) const
00216     {
00217 #ifdef TNT_BOUNDS_CHECK
00218         assert(1<=i);
00219         assert(i<=dim());
00220 #endif
00221         return vm1_[i];
00222     }
00223
00224     reference operator[](Subscript i)
00225     {
00226 #ifdef TNT_BOUNDS_CHECK
00227         assert(0<=i);
00228         assert(i<dim());
00229 #endif
00230         return v_[i];
00231     }
00232
00233     const_reference operator[](Subscript i) const
00234     {
00235 #ifdef TNT_BOUNDS_CHECK
00236         assert(0<=i);
00237         assert(i<dim());
00238 #endif
00239         return v_[i];
00240     }
00241
00242
00243 #ifdef TNT_USE_REGIONS
00244     // "index-aware" features, all of these are 1-based offsets
00245
00246     typedef Region1D<Vector_Adaptor<BBVec> > Region;
00247
00248     typedef const_Region1D< Vector_Adaptor<BBVec> > const_Region;
00249
00250     Region operator()(const Index1D &I)
00251     {   return Region(*this, I); }
00252
00253     Region operator()(const Subscript i1, Subscript i2)
00254     {   return Region(*this, i1, i2); }
00255
00256     const_Region operator()(const Index1D &I) const
00257     {   return const_Region(*this, I); }
00258
00259     const_Region operator()(const Subscript i1, Subscript i2) const
00260     {   return const_Region(*this, i1, i2); }
00261 #endif
00262 // TNT_USE_REGIONS
00263
00264
00265 };
00266
00267 #include <iostream>
00268
00269 template <class BBVec>
00270 std::ostream& operator<<(std::ostream &s, const Vector_Adaptor<BBVec> &A)
00271 {
00272     Subscript M=A.size();
00273
00274     s << M << endl;
00275     for (Subscript i=1; i<=M; i++)
00276             s << A(i) << endl;
00277     return s;
00278 }
00279
00280 template <class BBVec>
00281 std::istream& operator>>(std::istream &s, Vector_Adaptor<BBVec> &A)
00282 {
00283     Subscript N;
00284
00285     s >> N;
00286
00287     A.resize(N);
00288
00289     for (Subscript i=1; i<=N; i++)
00290         s >> A(i);
00291
00292     return s;
00293 }
00294
00295 } // namespace TNT
00296
00297 #endif
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector2.cpp Source File

Base » Math

Vector2.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 // This is just a test change made on Dec/12/2004, 22:43 by JW
00027
00028 #include "Vector2.hh"
00029 #include "Vector.hh"
00030 #include "Matrix2x2.hh"
00031
00032 #include <iostream>
00033 #include <fstream>
00034
00035 //additional math constants are not used by default in WIN32 - so set usage
00036
00037 using namespace BIAS;
00038 using namespace std;
00039
00040 namespace BIAS {
00041
00042 template<class T>
00043 Vector2<T>::Vector2(const Vector <T> &v)
00044 {
00045     // check if v has correct size:
00046     BIASASSERT(v.size() == VECTOR2SIZE);
00047     // set the 2 elements:
00048     data_[0] = v[0];
00049     data_[1] = v[1];
00050 }
00051
00052
00053 // JW 09/2003 - default: not implemented template < class T >
00054 template<class T>
00055 BIAS::Vector2<T>
00056 BIAS::Vector2<T>::CoordPolarToEuclidian() const {
00057   BIASERR("CoordPolarToEuclidian not implemented for this template type T - but e.g. for double");
00058 #ifdef BIAS_DEBUG
00059   exit(-1); // HACK
00060 #else
00061   return Vector2<T>(0,0);
00062 #endif
00063 }
00064
00065
00066 // JW
00067 template <>
00068 BIAS::Vector2<double>
00069 BIAS::Vector2<double>::CoordPolarToEuclidian() const
00070 {
00071   // for clarity symbolic names:
00072   const double r   = (*this)[0];
00073   const double phi = (*this)[1];
00074
00075   // polar to euclidian
00076   const double xx( r * cos(phi) );
00077   const double yy( r * sin(phi) );
00078
00079   return Vector2<double>( xx, yy );
00080 }
00081
00082
00083 // JW 09/2003 - default: not implemented
00084 template < class T >
00085 BIAS::Vector2<T>
00086 BIAS::Vector2<T>::CoordEuclidianToPolar() const {
00087   BIASERR("CoordEuclidianToPolar not implemented for this template type T - but e.g. for double");
00088 #ifdef BIAS_DEBUG
00089   exit(-1); // HACK
00090 #else
00091   return Vector2<T>(0,0);
00092 #endif
00093 }
00094
00095
00096 // JW
00097 template <>
00098 BIAS::Vector2<double>
00099 BIAS::Vector2<double>::CoordEuclidianToPolar() const
00100 {
00101   // for clarity symbolic names:
00102   const double x = (*this)[0];
00103   const double y = (*this)[1];
00104
00105   // polar to euclidian
00106   const double r( NormL2() );
00107
00108   if (r==0) return  Vector2<double>( 0,0 ); // special case nullvector
00109
00110   if (y==0) {
00111     // on x-axis.
00112     if (x>=0) {
00113       // special case point on positive x-axis
00114       return Vector2<double>( r, 0 );
00115     } else {
00116       // special case point on negative x-axis
00117       return Vector2<double>(r, M_PI);
00118
00119     };
00120
00121   } else {
00122
00123     // not on x-axis
00124     const double phi( atan2(y,x) );
00125     return Vector2<double>( r, phi );
00126
00127   }
00128 }
00129
00130
00131
00132 // jw
00133 template<class T>
00134 bool Vector2<T>::Load(const std::string & filename)
00135 {
00136   std::ifstream fs( filename.c_str() );
00137   if (!fs) {
00138     return false; // error, could not open file.
00139   } else {
00140     // read in
00141     fs>>(*this);
00142     fs.close();
00143   };
00144   return true;
00145 }
00146
00147 // jw
00148 template<class T>
00149 bool Vector2<T>::Save(const std::string & filename) const
00150 {
00151   std::ofstream fs( filename.c_str() );
00152   if (!fs) {
00153     return false; // error, could not open file.
00154   } else {
00155     // write out to disk
00156     fs<<(*this);
00157     fs.close();
00158   };
00159   return true;
00160 }
00161
00162 } // namespace BIAS
00163
00164
00165 ///
00166 /// explicit instantiation
00167 ///
00168 #define INST(type) \
00169 template class BIASMathBase_EXPORT BIAS::Vector2<type>;\
00170
00171 INST(unsigned char)
00172 INST(float)
00173 INST(char)
00174 INST(short)
00175 INST(unsigned short)
00176 INST(int)
00177 INST(unsigned int)
00178 INST(double)
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector2.hh Source File

Base » Math

Vector2.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Vector2_hh_
00027 #define _Vector2_hh_
00028
00029 #include "bias_config.h"
00030 //additional math constants are not used by default in WIN32 - so set usage
00031 #define _USE_MATH_DEFINES
00032 #include <math.h>
00033
00034 #include <iostream>
00035 #include <sstream>
00036 #include <iomanip>
00037
00038 // BIAS
00039 #include <Base/Debug/Error.hh>
00040 #include <Base/Math/Vector.hh>
00041 #include <Base/Math/Matrix2x2.hh>
00042 #include <Base/Math/Operators.hh>
00043
00044 // dim of this vector
00045 #define VECTOR2SIZE 2
00046 namespace BIAS {
00047
00048   // forward declarations to avoid mutual inclusion
00049   //template <class T> class BIASMathBase_EXPORT BIAS::Vector;
00050   //template <class T> class BIASMathBase_EXPORT BIAS::Matrix;
00051   //template <class T> class BIASMathBase_EXPORT BIAS::Matrix2x2;
00052
00053   // disabled these forwards for g++4.0, checked with g++3.3
00054   // not checkedwith W32, Friso
00055 //   template <class T> class BIAS::Vector;
00056 //   template <class T> class BIAS::Matrix;
00057 //   template <class T> class BIAS::Matrix2x2;
00058
00059
00060
00061   /** @class Vector2
00062       @ingroup g_math
00063       @brief class Vector2 contains a Vector of dim. 2 and fixed dimension
00064
00065       It's elment type is templated.
00066       manual loop unrolling is used if possible.
00067       The Vector is in row-major order (2 rows, 1 column)
00068       the indizes begin with zero (to size-1)
00069       @author Jan Woetzel
00070       @status untested (03/04/2002) **/
00071   template <class T>
00072   class BIASMathBase_EXPORT Vector2
00073   {
00074   public:
00075
00076
00077     /** destructor
00078         @author Jan Woetzel
00079         @status untested (02/28/2002) **/
00080     ~Vector2() {};
00081
00082
00083     /** default constructor
00084         @author Jan Woetzel
00085         @status alpha (02/28/2002) **/
00086     Vector2() {};
00087
00088     /** copy constructor
00089         @author Jan Woetzel
00090         @status alpha (03/05/2002)**/
00091     inline Vector2(const Vector2<T> &vec) {
00092       Copy(vec.GetData());
00093     };
00094
00095     /** assignment with a constant value for all elements
00096         @author Jan Woetzel
00097         @status alpha (03/01/2002) **/
00098     explicit inline Vector2(const T & scalar) {
00099       Set(scalar);
00100     };
00101
00102
00103     /** constructor with element assigment using explicit values
00104         @author Ingo Thomsen
00105         @status tested (03/04/2002) **/
00106     inline Vector2(const T v0, const T v1) {
00107       data_[0] = v0;
00108       data_[1] = v1;
00109     }
00110
00111
00112     /** assignment with an array of values
00113         which is copied into this ones class members
00114         @author Jan Woetzel
00115         @status untested (02/28/2002) **/
00116     explicit inline Vector2(const T * pv) {
00117       Copy(pv);
00118     };
00119
00120     /** constructor with element assignment
00121         @author Jan Woetzel
00122         @status alpha (03/01/2002) **/
00123     explicit inline Vector2(char *s) {
00124       std::istringstream inst(s);
00125       inst >> data_[0];
00126       inst >> data_[1];
00127     };
00128
00129
00130     /** cast constructor
00131         @author Jan Woetzel
00132         @status alpha (03/22/2002) **/
00133     Vector2(const Vector < T > &v);
00134
00135
00136     /** copy the array of vectorsize beginning at *T to this->data_
00137         @author Jan Woetzel
00138         @status untested (02/28/2002) **/
00139     inline void Copy(const T * pv) {
00140       // better use memcopy ?
00141       data_[0] = pv[0];
00142       data_[1] = pv[1];
00143     };
00144
00145
00146     /** set all elements to a scalar value
00147         @author Jan Woetzel
00148         @status untested (02/28/2002) **/
00149     inline void Set(const T & scalar) {
00150       Set(scalar, scalar);
00151     };
00152
00153
00154     /** @author Jan Woetzel */
00155     inline void SetZero() {
00156       Set(0,0);
00157     };
00158
00159
00160     /** @author Jan Woetzel */
00161     inline bool IsZero() const {
00162       return ( (data_[0]==(T)0)
00163                && (data_[1]==(T)0)
00164                && (data_[2]==(T)0) );
00165     }
00166
00167
00168     /** set elementwise with given scalar values
00169         @author Jan Woetzel
00170         @status alpha (02/28/2002) **/
00171     inline void Set(const T & x, const T & y) {
00172       data_[0] = x;
00173       data_[1] = y;
00174     };
00175
00176
00177     /** @return the size of this vector
00178         @author Jan Woetzel
00179         @status untested (02/28/2002) **/
00180     inline const int Size() const {
00181       return VECTOR2SIZE;
00182     };
00183
00184
00185     /** get the data pointer
00186         the member function itself is const (before {..}) because it doesn't
00187         change the this object.
00188         @return the const pointer to the data array for reading
00189         @author Jan Woetzel
00190         @status untested (02/28/2002) **/
00191     inline const T *GetData() const {
00192       return data_;
00193     };
00194
00195     inline T *GetData() {
00196       return data_;
00197     };
00198
00199
00200     /** assignment operator
00201         set the vector elementwise to scalar value
00202         @author Jan Woetzel
00203         @status alpha (02/28/2002) **/
00204     inline Vector2<T> &operator=(const T& scalar) {
00205       Set(scalar);
00206       return *this;
00207     };
00208
00209     /** assignment operator
00210         @author grest
00211     */
00212     inline Vector2<T> &operator=(const Vector2<T> &vec) {
00213       Copy(vec.GetData());
00214       return *this;
00215     };
00216
00217     /** access an element  of the vector with 0-based indizes.
00218         read only (no write)
00219         member funciton const because it doesn't change this object
00220         @author Jan Woetzel
00221         @status untested (03/01/2002) **/
00222     inline const T & operator[] (const int i) const {
00223       BIASASSERT(0 <= i);
00224       BIASASSERT(i < VECTOR2SIZE);
00225       return data_[i];
00226     };
00227
00228     /** access an element  of the vector with 0-based indizes.
00229         write allowed
00230         @author Jan Woetzel
00231         @status untested (03/01/2002) **/
00232     inline T & operator[] (const int i) {
00233       BIASASSERT(0 <= i);
00234       BIASASSERT(i < VECTOR2SIZE);
00235       return data_[i];
00236     };
00237
00238
00239     /** read only access functions to use names instead of indizes
00240         @return the projective coordinate of the vector
00241         (they are usually not euclidian!)
00242         @author Jan Woetzel
00243         @status untested (03/04/2002) **/
00244     inline  T & GetX() {
00245       return data_[0];
00246     };
00247     inline  T & GetY() {
00248       return data_[1];
00249     };
00250     inline  T & GetW() {
00251       return data_[1];
00252     };
00253
00254     // const non reference of the above JW 05/2003:
00255     inline  T  GetX() const {
00256       return data_[0];
00257     };
00258     inline  T  GetY() const {
00259       return data_[1];
00260     };
00261     inline  T  GetW() const {
00262       return data_[1];
00263     };
00264
00265
00266
00267     /** set (write) access functions to use names instead of indizes
00268         @author Jan Woetzel
00269         @status untested (03/04/2002) **/
00270     inline void SetX(const T x) {
00271       data_[0] = x;
00272     };
00273     inline void SetY(const T y) {
00274       data_[1] = y;
00275     };
00276     inline void SetW(const T w) {
00277       data_[1] = w;
00278     };
00279
00280     /// polar form JW
00281     inline T& Radius()
00282     { return (*this)[0]; };
00283     inline T Radius() const
00284     { return (*this)[0]; };
00285
00286     /// polar form JW
00287     inline T& Phi()
00288     { return (*this)[1]; };
00289     inline T Phi() const
00290     { return (*this)[1]; };
00291
00292
00293     /** scalar product of two vectors, storing the result in result
00294         @author Jan Woetzel
00295         @status untested **/
00296     inline void ScalarProduct(const Vector2<T> &argvec, T & result) const {
00297       result = data_[0] * argvec[0] + data_[1] * argvec[1];
00298     }
00299
00300     inline T ScalarProduct(const Vector2<T> &argvec) const {
00301       return ((data_[0] * argvec[0]) + (data_[1] * argvec[1]));
00302     }
00303
00304
00305     /** multiply two vectors elementwise, storing the result in destvec
00306         @author Jan Woetzel (03/06/2002) **/
00307     inline void ElementwiseProduct(const Vector2<T> &argvec,
00308       Vector2<T> &destvec) const
00309     {
00310       destvec[0] = data_[0] * argvec[0];
00311       destvec[1] = data_[1] * argvec[1];
00312     }
00313
00314     inline Vector2<T> ElementwiseProduct(const Vector2<T>& argvec) const
00315     {
00316       Vector2<T>destvec;
00317       ElementwiseProduct(argvec, destvec);
00318       return destvec;
00319     }
00320
00321
00322     /* elementwise division JW */
00323     inline void ElementwiseDivision(const Vector2<T> &argvec,
00324       Vector2<T> &destvec) const
00325     {
00326       destvec[0] = data_[0] / argvec[0];
00327       destvec[1] = data_[1] / argvec[1];
00328     }
00329
00330     inline Vector2<T> ElementwiseDivision(const Vector2<T>& argvec) const
00331     {
00332       Vector2<T>destvec;
00333       ElementwiseDivision(argvec, destvec);
00334       return destvec;
00335     }
00336
00337
00338
00339     /** @brief outer product, constructs a matrix (e.g. for covariance).
00340     @author koeser 08/2005 (cloned from vector3) */
00341     inline void OuterProduct(const BIAS::Vector2<T> &v,
00342       BIAS::Matrix2x2<T>& mat) const
00343     {
00344       mat[0][0] = data_[0]*v[0];
00345       mat[0][1] = data_[0]*v[1];
00346       mat[1][0] = data_[1]*v[0];
00347       mat[1][1] = data_[1]*v[1];
00348     }
00349
00350     inline Matrix2x2<T> OuterProduct(const BIAS::Vector2<T> &v) const
00351     { Matrix2x2<T> m; OuterProduct(v, m); return m; }
00352
00353
00354     /** Return the L1 norm: |a| + |b|
00355         @author Ingo Thomsen
00356         @date 04/11/2002
00357         @status untested **/
00358     inline T NormL1() const {
00359       return (data_[0] > 0 ? data_[0] : data_[0] * -1)
00360         + (data_[1] > 0 ? data_[1] : data_[1] * -1);
00361     }
00362
00363     /** Return the L2 norm: sqrt(a^2 + b^2)
00364         @author Ingo Thomsen
00365         @date 04/11/2002
00366         @status untested **/
00367     inline double NormL2() const {
00368       return sqrt( (double) ( data_[0] * data_[0] + data_[1] * data_[1] ) );
00369     }
00370
00371     /// @brief return euclidian length @author JW
00372     inline double Length() const
00373     { return NormL2(); };
00374
00375     /** Return the euclidian distance of 2 vectors.
00376         @author Birger Streckel
00377         @date 08/2002
00378     **/
00379     inline double Dist(const Vector2<T> &vec) const {
00380       return sqrt( (double) ( (data_[0]-vec[0])*(data_[0]-vec[0]) +
00381                               (data_[1]-vec[1])*(data_[1]-vec[1]) ));
00382     }
00383
00384     ///////////////////////////////////////////////////////////////////////
00385     ///////////////// Comparison operators using scalars //////////////////
00386     ///////////////////////////////////////////////////////////////////////
00387
00388
00389     /** Comparison operator 'equal'
00390         @author Ingo Thomsen
00391         @status tested **/
00392     inline bool operator== (const Vector2<T>& arg) const {
00393       return ( (data_[0] == arg.data_[0]) && (data_[1] == arg.data_[1]) );
00394     }
00395
00396     /** Comparison operator 'not equal'
00397         @author Ingo Thomsen
00398         @status tested **/
00399     inline bool operator!= (const Vector2<T>& arg) const {
00400       return ( (data_[0] != arg.data_[0]) || (data_[1] != arg.data_[1]) );
00401     }
00402
00403
00404
00405     /////////////////////////////////////////////////////////////////////
00406     //////////////////// Basic Operators using scalars //////////////////
00407     /////////////////////////////////////////////////////////////////////
00408
00409
00410     /** Addition (in place) of an scalar
00411         @author Ingo Thomsen **/
00412     inline void AddIP (const T& scalar) {
00413       Add(scalar, *this);
00414     }
00415
00416     /** Addition with a scalar, storing results in destionation vector
00417         @author Ingo Thomsen **/
00418     inline void Add(const T& scalar, Vector2<T>& dest) const{
00419       dest.data_[0] = data_[0] + scalar;
00420       dest.data_[1] = data_[1] + scalar;
00421     }
00422
00423     /** Substraction (in place) of an scalar
00424         @author Ingo Thomsen **/
00425     inline void SubIP (const T& scalar) {
00426       Sub(scalar, *this);
00427     }
00428
00429     /** Substraction with a scalar, storing results in destionation vector
00430         @author Ingo Thomsen **/
00431     inline void Sub (const T& scalar, Vector2<T>& dest) const {
00432       dest.data_[0] = data_[0] - scalar;
00433       dest.data_[1] = data_[1] - scalar;
00434     }
00435
00436     /** Multiplication (in place) of an scalar
00437         @author Ingo Thomsen **/
00438     inline void MultiplyIP (const T& scalar) {
00439       Multiply(scalar, *this);
00440     }
00441
00442     /** Multiplication with a scalar, storing results in destionation vector
00443         @author Ingo Thomsen **/
00444     inline void Multiply (const T& scalar, Vector2<T>& dest) const {
00445       dest.data_[0] = data_[0] * scalar;
00446       dest.data_[1] = data_[1] * scalar;
00447     }
00448
00449     /** Division (in place) of an scalar
00450         @author Ingo Thomsen **/
00451     inline void DivideIP (const T& scalar) {
00452       Divide(scalar, *this);
00453     }
00454
00455     /** elementwise Division (in place) by a vector
00456     @author JW **/
00457     inline void DivideIP (const Vector2<T>& vec) {
00458       Divide(vec, *this);
00459     }
00460
00461
00462     /** Division with a scalar, storing results in destination vector
00463         @author Ingo Thomsen **/
00464     inline void Divide (const T& scalar, Vector2<T>& dest) const {
00465 #ifdef BIAS_DEBUG
00466       if (scalar == 0 )
00467         BIASERR("Division by Zero!");
00468 #endif
00469       dest.data_[0] = data_[0] / scalar;
00470       dest.data_[1] = data_[1] / scalar;
00471     }
00472
00473     /* elementwise division by vector @author JW */
00474     inline void Divide (const Vector2<T>& vec, Vector2<T>& dest) const {
00475 #ifdef BIAS_DEBUG
00476       if (vec[0]==0 || vec[1]==0)
00477         BIASERR("Division by Zero!");
00478 #endif
00479       this->ElementwiseDivision(vec, dest);
00480     }
00481
00482
00483     /////////////////////////////////////////////////////////////////////
00484     //////////////////// Basic Operators using vectors //////////////////
00485     /////////////////////////////////////////////////////////////////////
00486
00487     /** in place adding
00488         @author Ingo Thomsen
00489         @status tested **/
00490     inline void AddIP(const Vector2<T> &argvec) {
00491       Add(argvec, *this);
00492     }
00493
00494
00495     /** adding of two vectors, storing the result in destvec
00496         @author Ingo Thomsen
00497         @status tested **/
00498     inline void Add(const Vector2<T> &argvec, Vector2<T> &destvec) const {
00499       destvec[0] = data_[0] + argvec[0];
00500       destvec[1] = data_[1] + argvec[1];
00501     }
00502
00503     /** in place subtraction
00504         @author Ingo Thomsen
00505         @status tested **/
00506     inline void SubIP(const Vector2<T> &argvec) {
00507       Sub(argvec, *this);
00508     }
00509
00510
00511     /** subtracting of two Vectors, storing the result in destvec
00512         @author Ingo Thomsen
00513         @status tested **/
00514     inline void Sub(const Vector2<T> &argvec, Vector2<T> &destvec) const {
00515       destvec[0] = data_[0] - argvec[0];
00516       destvec[1] = data_[1] - argvec[1];
00517     }
00518
00519     inline void Fill(T value)
00520     { data_[0] = data_[1] = value; };
00521
00522
00523     /** coordinate transform
00524         compute the euclidian coord p=(x,y)
00525         for (this) given polarcoord (radius, phi) with
00526         radius : distance to center,
00527         phi    : radian angle between positive x-axis and p=(x,y)
00528         assume (x,z) is in orthogonal right-hand-system.
00529         @author Jan Woetzel 09/2003 */
00530     BIAS::Vector2<T> CoordPolarToEuclidian() const;
00531
00532
00533     /** coordinate transform
00534         compute the polar coordinates (radius, phi) for (this) given
00535         eucldian point (x,y).  with
00536         radius : distance to center,
00537         phi    : radian angle between positive x-axis and p=(x,y)
00538         assume (x,z) is in orthogonal right-hand-system.
00539         @author Jan Woetzel 09/2003 */
00540     BIAS::Vector2<T> CoordEuclidianToPolar() const;
00541
00542
00543     /** method to load directly from a given filename.
00544     internally using stream operator
00545     @author Jan Woetzel 09/2005
00546     @return false in case of error, true in case of success  */
00547     bool Load(const std::string & filename);
00548
00549     /** method to save directly to a given filename.
00550     internally using stream operator
00551     @author Jan Woetzel 09/2009
00552     @return false in case of error, true in case of success */
00553     bool Save(const std::string & filename) const;
00554
00555
00556   protected:
00557       // the 2 elements of the vector without additional pointers etc...
00558       // it is the *same* as n individual members, so there is *NO* additional pointer
00559       // in particular an array of Vector2 is teh same as one big array of T (JW)
00560     T data_[VECTOR2SIZE];   // the elements of the vector
00561
00562   };
00563   // ==============================================================
00564   // ===  END OF CLASS Vector2  ===================================
00565   // ==============================================================
00566
00567
00568
00569
00570   // --------------- stream I/O ---------------------------------------
00571
00572   /** Output with streams
00573       @author Jan Woetzel
00574       @status alpha (03/01/2002) **/
00575   template <class T>
00576   std::ostream& operator<<(std::ostream & os, const Vector2<T>& vec)
00577   {
00578 #ifdef BIAS_DEBUG
00579     std::streambuf *OutBuf_=std::cout.rdbuf(), *OsBuf_= os.rdbuf(),
00580       *ErrBuf_=std::cerr.rdbuf();
00581
00582     // print size at first to be compatible to Vector<>
00583     if (OutBuf_!=OsBuf_ && ErrBuf_!=OsBuf_){
00584       // not cout and not cerr
00585 #endif
00586       // print size at first to be compatible to Vector<>
00587       os << VECTOR2SIZE << std::endl;
00588       for (int row = 0; row < VECTOR2SIZE; row++) {
00589         os << std::setw(8);     // set width for output format
00590         //os << setprecision(10);
00591         // print out one element per line
00592         os << vec.GetData()[row] << " " << std::endl;
00593       }
00594 #ifdef BIAS_DEBUG
00595     } else {
00596       // cout or cerr
00597       os << "[ ";
00598       for (int row = 0; row < VECTOR2SIZE; row++)
00599         os << std::setprecision(10) << vec.GetData()[row] << " ";
00600       os << "] ";
00601     }
00602 #endif
00603     return os;
00604   }
00605
00606
00607   /** Input with streams
00608       @author Jan Woetzel
00609       @status untested (03/01/2002) **/
00610   template <class T>
00611   std::istream& operator>>(std::istream &is, Vector2 <T>& vec)
00612   {
00613     int N;              // first argument of the stream is the size
00614     is >> N;            // read size first to be compatible to Vector<>
00615     if (!(N == vec.Size())) {
00616       // wrong size
00617       BIASERR("can't assign a Vector2<T> with a dim " << N << " vector");
00618     } else {
00619       // correct size, sequential read elementwise
00620       for (int row = 0; row < N; row++) {
00621         is >> vec.GetData()[row];
00622       };
00623     };
00624     return is;
00625   }
00626
00627   // ------------------ operators with vectors seee Operators.hh ---------------------------
00628
00629
00630
00631   /** add operator for two Vectors
00632       @author Ingo Thomsen, tested **/
00633   template <class T> BIASMathBase_EXPORT
00634   inline Vector2<T>& operator+=(Vector2<T> &vec, const Vector2<T> &argvec) {
00635     vec.Add(argvec, vec);
00636     return vec;
00637   }
00638
00639   /** sub operator for two Vectors
00640       @author Ingo Thomsen
00641       @status tested **/
00642   template <class T>
00643   inline Vector2<T> &operator-= (Vector2<T> &vec, const Vector2<T> &argvec) {
00644     vec.Sub(argvec, vec);
00645     return vec;
00646   }
00647
00648     /** elementwise division @author JW */
00649   template <class T> BIASMathBase_EXPORT
00650   inline Vector2<T>& operator/=(Vector2<T> &vec, const Vector2<T> &argvec) {
00651     vec.DivideIP(argvec, vec);
00652     return vec;
00653   }
00654
00655   // --------------- operators with scalars -----------------------------
00656
00657
00658   /** Addition operator with scalar argument
00659       @author Ingo Thomsen, tested */
00660   template <class T>
00661   inline Vector2<T>& operator+=(Vector2<T>& vec, const T& scalar) {
00662     vec.AddIP(scalar);
00663     return vec;
00664   }
00665
00666   /** Substraction operator with scalar argument
00667       @author Ingo Thomsen, tested **/
00668   template <class T>
00669   inline Vector2<T>& operator-=(Vector2<T>& vec, const T& scalar) {
00670     vec.SubIP(scalar);
00671     return vec;
00672   }
00673
00674   /** Multiplication operator with scalar argument
00675       @author Ingo Thomsen, tested **/
00676   template <class T>
00677   inline Vector2<T>& operator*= (Vector2<T>& vec, const T& scalar) {
00678     vec.MultiplyIP(scalar);
00679     return vec;
00680   }
00681
00682   /** Division operator with scalar argument
00683   @author Ingo Thomsen, tested **/
00684   template <class T>
00685     inline Vector2<T>& operator/= (Vector2<T>& vec, const T& scalar) {
00686       vec.DivideIP(scalar);
00687       return vec;
00688     }
00689
00690
00691 } // namespace BIAS
00692 #endif
00693
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector3.cpp Source File

Base » Math

Vector3.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Vector3.hh"
00026 #include "Vector.hh"
00027
00028 //additional math constants are not used by default in WIN32 - so set usage
00029 #ifdef _WIN32
00030 #define _USE_MATH_DEFINES
00031 #endif
00032 #include "math.h"
00033
00034 // STD
00035 #include <iostream>
00036 #include <iomanip>
00037 #include <fstream>
00038 #include <sstream>
00039 #include <string>
00040 #include <vector>
00041
00042 using namespace BIAS;
00043 using namespace std;
00044
00045 namespace BIAS {
00046
00047
00048 // JW 06/2003
00049 template < class T >
00050 Vector3<T>
00051 Vector3<T>::GetNormalized() const
00052 {
00053   Vector3<T> vec=(*this);
00054   vec.Normalize();
00055   return vec;
00056 }
00057
00058 template < class T >
00059 Vector3<T>& Vector3<T>::
00060 Normalize(Matrix3x3<T>& cov)
00061 {
00062   /** the jacobian of the function x' = x/|x| can be written as
00063       J = 1/|x| ( I - (xx^T)/(x^Tx) ),
00064       cf. Foerstner, 2005 "Uncertainty and Projective Geometry" */
00065   const T act_length = (T) NormL2(); // euclidian length
00066   if (act_length > (T)(DBL_EPSILON) ){
00067     Matrix3x3<T> J(MatrixIdentity);
00068     Matrix3x3<T> tmp;
00069     OuterProduct(*this, tmp);
00070     tmp /= (T) (act_length * act_length);
00071     J -= tmp;
00072     J /= act_length;
00073     cov = J * cov * J.Transpose();
00074   }
00075   return Normalize();
00076 }
00077
00078
00079 // JW 09/2003 - default: not implemented
00080 template < class T >
00081 Vector3<T>
00082 Vector3<T>::CoordSphereToEuclidian() const
00083 {
00084   BIASERR("CoordSphereToEuclidian not implemented for this template type t - but e.g. for double");
00085 #ifdef BIAS_DEBUG
00086   BIASEXIT(-1); // HACK
00087   return Vector3<T>(0,0,0);
00088 #else
00089   return Vector3<T>(0,0,0);
00090 #endif
00091 }
00092
00093
00094 // JW 09/2003
00095 template <>
00096 Vector3<double>
00097 Vector3<double>::CoordSphereToEuclidian() const
00098 {
00099   // symbolic names for clarity:
00100   const double r     = (*this)[0];
00101   const double phi   = (*this)[1];
00102   const double theta = (*this)[2];
00103
00104   if (r==0) return Vector3<double>( 0, 0, 0 ); // singularity nullvector.
00105
00106   const double xx( r * sin(theta) * cos(phi) );
00107   const double yy( r * sin(theta) * sin(phi) );
00108   const double zz( r * cos(theta) );
00109
00110   return Vector3<double>( xx, yy, zz );
00111 }
00112
00113
00114 // JW 09/2003 - default: not implemented
00115 template < class T >
00116 BIAS::Vector3<T>
00117 BIAS::Vector3<T>::CoordEuclidianToSphere() const {
00118   BIASERR("CoordEuclidianToSphere not implemented for this template type T"
00119           <<" - but e.g. for double");
00120 #ifdef BIAS_DEBUG
00121   exit(-1); // HACK
00122 #else
00123   return Vector3<T>(0,0,0);
00124 #endif
00125 }
00126
00127
00128 // JW 09/2003
00129 template <>
00130 BIAS::Vector3<double>
00131 BIAS::Vector3<double>::CoordEuclidianToSphere() const
00132 {
00133   // symbolic names for clarity:
00134   const double xx = (*this)[0];
00135   const double yy = (*this)[1];
00136   const double zz = (*this)[2];
00137
00138   const double r( NormL2() );
00139
00140   if (r==0) return Vector3<double>(0,0,0); // singularity null vector
00141
00142   //const double theta( atan2(yy, xx) );
00143   const double phi(M_PI_2- atan2(xx, yy) );
00144
00145   // length of projection into XY plane (for phi)
00146   const double projLength=sqrt( xx * xx  +  yy * yy );
00147
00148   const double theta(atan2(projLength, zz) );
00149
00150   return Vector3<double>(r, phi, theta);
00151 }
00152
00153
00154 template <class T>
00155 void Vector3<T>::OuterProduct(const Vector3<T> &v, Matrix3x3<T>& mat) const {
00156   mat[0][0]=data_[0]*v[0]; mat[0][1]= data_[0]*v[1]; mat[0][2]= data_[0]*v[2];
00157   mat[1][0]=data_[1]*v[0]; mat[1][1]= data_[1]*v[1]; mat[1][2]= data_[1]*v[2];
00158   mat[2][0]=data_[2]*v[0]; mat[2][1]= data_[2]*v[1]; mat[2][2]= data_[2]*v[2];
00159 }
00160
00161
00162 // JW 03/2005
00163 template <class T>
00164 int Vector3<T>::LoadBogTC(const std::string & filename)
00165 {
00166     SetZero();// reset this
00167     ifstream fs( filename.c_str() );
00168     if (!fs) {
00169         BIASERR("could not open file "<<filename);
00170         return -1; // error, could not open file.
00171     };
00172     // parse and read in
00173     const unsigned int nMax=1024;
00174     char caLine[nMax];
00175     // std string for find
00176     string strLine;
00177     // helper for string to number /atof)
00178     istringstream iss;
00179     unsigned int pos=0, line=0;
00180     vector<string> pattern;
00181     pattern.clear();
00182     pattern.push_back("TC_X ="); // 0
00183     pattern.push_back("TC_Y ="); // 1
00184     pattern.push_back("TC_Z ="); // 2
00185     vector< bool > found;
00186     found.resize( pattern.size(), false);
00187     BIASASSERT(found.size()>2);
00188     while (!fs.eof() && (fs)
00189         && (!found[0] || !found[1] || !found[2] ) )
00190     {
00191         line++;
00192         fs.getline(&caLine[0], nMax);
00193         strLine = caLine;
00194         for (unsigned int i=0; i<pattern.size(); i++){
00195             pos = strLine.find(pattern[i]);
00196             if (pos != string::npos){
00197                 found[i]=true;
00198                 iss.clear();
00199                 iss.str(  // after pattern: start, length
00200                     strLine.substr(pos+pattern[i].size(),  strLine.size()-pos-pattern[i].size())
00201                     );
00202                 BIASASSERT(i<3); // dim
00203                 iss>> (*this)[i];
00204             };
00205         };
00206     };
00207     // check if we found all patterns
00208     BIASASSERT(found.size()==pattern.size());
00209     bool foundAll=true;
00210     for (unsigned int j=0; j<found.size(); j++) foundAll=foundAll&&found[j];
00211     if (!foundAll) return -99; // missed something
00212     return 0; // OK.
00213 }
00214
00215 // jw
00216 template<class T>
00217 bool Vector3<T>::Load(const std::string & filename)
00218 {
00219   std::ifstream fs( filename.c_str() );
00220   if (!fs) {
00221     return false; // error, could not open file.
00222   } else {
00223     // read in
00224     fs>>(*this);
00225     fs.close();
00226   };
00227   return true;
00228 }
00229
00230 // jw
00231 template<class T>
00232 bool Vector3<T>::Save(const std::string & filename) const
00233 {
00234   std::ofstream fs( filename.c_str() );
00235   if (!fs) {
00236     return false; // error, could not open file.
00237   } else {
00238     // write out to disk
00239     fs<<(*this);
00240     fs.close();
00241   };
00242   return true;
00243 }
00244
00245 // specialization
00246 template<>
00247 Matrix<unsigned int> Vector3<unsigned int>::GetSkewSymmetricMatrix() const
00248 {
00249   Matrix<unsigned int> result(3,3);
00250   result.SetZero();
00251   BIASERR("not implemented because minus does not make sense for unsigned types");
00252   BIASBREAK;
00253   return result;
00254 }
00255
00256
00257 // impl. moved here for DLL instantiation
00258 template <class T>
00259 Matrix<T> Vector3<T>::GetSkewSymmetricMatrix() const
00260 {
00261   Matrix<T> result(3,3);
00262   result.SetZero();
00263   T* pData = result.GetData() + 1;
00264   *pData++ = -data_[2];
00265   *pData++ =  data_[1];
00266   *pData++ =  data_[2];
00267   pData++;
00268   *pData++ = -data_[0];
00269   *pData++ = -data_[1];
00270   *pData   =  data_[0];
00271   return result;
00272 }
00273
00274
00275 template <class T>
00276 Vector3<T>::Vector3(const Vector<T>& v)
00277 {
00278   // check if v has correct size:
00279   BIASASSERT(v.size() == VECTOR3_SIZE);
00280   data_[0] = v[0];
00281   data_[1] = v[1];
00282   data_[2] = v[2];
00283 }
00284
00285 } // namespace BIAS
00286
00287
00288 #define INST(type) \
00289 template class BIASMathBase_EXPORT BIAS::Vector3<type>;\
00290
00291 INST(unsigned char)
00292 INST(char)
00293 INST(float)
00294 INST(short)
00295 INST(unsigned short)
00296 INST(int)
00297 INST(unsigned int)
00298 INST(double)
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector3.hh Source File

Base » Math

Vector3.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Vector3_hh_
00027 #define _Vector3_hh_
00028
00029 #include <bias_config.h>
00030
00031 #include <iostream>
00032 #include <vector>
00033 #include <float.h>
00034
00035 #include <Base/Debug/Error.hh>
00036 #include <Base/Math/Vector.hh>
00037 #include <Base/Math/Matrix3x3.hh>
00038 #include <Base/Math/Operators.hh>
00039
00040
00041 #define VECTOR3_SIZE 3
00042
00043 namespace BIAS {
00044
00045   /** @class Vector3
00046       @ingroup g_math
00047       @brief class Vector3 contains a Vector of fixed dim. 3
00048
00049       It's elment type is templated.
00050       manual loop unrolling is used if possible.
00051       The Vector is in row-major order (3 rows, 1 column)
00052       the indizes begin with zero (to size-1)
00053
00054       operators are no longer class members
00055       removed memory leak by returning reference in operators
00056       removed inline code from class definition, woelk 01 2003
00057
00058       @author Jan Woetzel, woelk
00059   **/
00060
00061   // forward declarations
00062   // DLL JW
00063   //template <class T> class BIASMathBase_EXPORT Matrix3x3;
00064
00065
00066
00067   template <class T>
00068   class BIASMathBase_EXPORT Vector3 {
00069   public:
00070     Vector3() {};
00071
00072     ~Vector3() {};
00073
00074     /** copy constructor
00075         @author Jan Woetzel (03/05/2002)**/
00076     inline Vector3(const Vector3<T>& vec) { *this = vec; };
00077
00078     /** assignment with a constant value for all elements
00079         @author Jan Woetzel (03/01/2002) **/
00080     explicit inline Vector3(const T & scalar) { Set(scalar); };
00081
00082     /** assignment with an array of values
00083         which is copied into this ones class members
00084         @author Jan Woetzel (02/28/2002) **/
00085     explicit inline Vector3(const T* pv) { Set(pv); };
00086
00087     /** constructor with element assignment
00088         @author Jan Woetzel
00089         @status alpha (03/01/2002) **/
00090     explicit inline Vector3(char *s);
00091
00092     /** constructor with element assigment using explicit values
00093         @author Ingo Thomsen, tested (03/04/2002)**/
00094     inline Vector3(const T &x, const T &y, const T &z) {  Set(x, y, z); };
00095
00096     /** cast constructor
00097         @author Jan Woetzel, untested (03/22/2002) **/
00098     Vector3(const Vector<T>& v);
00099
00100
00101     /** @name Set Functions
00102         @{
00103     */
00104     /** copy the array of vectorsize beginning at *T to this->data_
00105         @author Jan Woetzel, untested (02/28/2002) **/
00106     inline void Set(const T *pv);
00107
00108     /** set all elements to a scalar value
00109         @author Jan Woetzel, untested (02/28/2002) **/
00110     inline void Set(const T& scalar) { Set(scalar, scalar, scalar); };
00111
00112     /** set elementwise with given scalar values
00113         @author Jan Woetzel
00114         @status alpha (02/28/2002) **/
00115     inline void Set(const T& x, const T& y, const T& z);
00116
00117     /** Sets this form elements of Vector<T>. */
00118     inline void Set(const Vector<T> &vec);
00119
00120     /** set all values to 0
00121         @author Jan Woetzel 01/2003 **/
00122     inline void SetZero();
00123
00124     // @}
00125
00126     /** @name Get Functions
00127         @{
00128     */
00129     /** @return the size of this vector
00130         @author Jan Woetzel (02/28/2002) **/
00131     inline const int Size() const { return VECTOR3_SIZE; };
00132
00133     /** @return true iff all elements are equal zero JW */
00134     inline bool IsZero() const;
00135
00136     /** @brief returns the Euclidean Length of the Vector @author Jan Woetzel */
00137     inline double Length() const
00138     { return NormL2(); };
00139
00140     /** get the data pointer
00141         the member function itself is const (before {..}) because it doesn't
00142         change the this object.
00143         @return the const pointer to the data array for reading
00144         @author Jan Woetzel
00145         @status untested (02/28/2002) **/
00146     inline const T *GetData() const { return data_; };
00147     inline T *GetData() { return data_; };
00148
00149     /** Return the L1 norm: |a| + |b| + |c|
00150         @author Ingo Thomsen
00151         @date 04/11/2002
00152         @status tested **/
00153     inline T NormL1() const;
00154
00155     /** the L2 norm sqrt(a^2 + b^2 + c^2)
00156         @author woelk 01 2003 */
00157     inline double NormL2() const;
00158
00159     /** Return the euclidian distance of 2 vectors.
00160         @author Birger Streckel
00161         @date 08/2002
00162     **/
00163     inline double Dist(const Vector3<T> &vec) const;
00164
00165     // @}
00166
00167     /** @name Normalization
00168         @{
00169     */
00170     /** @brief normalize this vector to length 1
00171         @author Jan Woetzel / koeser
00172         @return reference to updated (*this)
00173         @date 04/25/2002 **/
00174     inline Vector3<T>& Normalize();
00175
00176     /** @brief normalizes the vector to 1 and transfroms the associated
00177         covaqriance matrix
00178         @author woelk 03/2006 */
00179     Vector3<T>& Normalize(Matrix3x3<T>& cov);
00180
00181
00182     /** @brief return a normalized vector of this
00183
00184     norm. to length 1
00185     @author Jan Woetzel
00186     @date 06/2003 **/
00187     BIAS::Vector3<T> GetNormalized() const;
00188
00189     // @}
00190
00191
00192     /** @name Arithmetic
00193         @{
00194     */
00195     /** cross product of two vectors
00196         destvec = this x argvec
00197         @author Ingo Thomsen, Jan Woetzel
00198         @status alpha **/
00199     inline void CrossProduct(const Vector3<T>& argvec,
00200                              Vector3<T>& destvec) const;
00201
00202     /** @return cross product = this x argvec
00203         @author Jan Woetzel
00204         @status alpha **/
00205     inline Vector3<T> CrossProduct(const Vector3<T>& argvec) const
00206     {  Vector3<T> destvec; CrossProduct(argvec, destvec); return destvec; };
00207
00208     /** scalar product (=inner product) of two vectors,
00209         storing the result in result
00210         @author Jan Woetzel **/
00211     inline void ScalarProduct(const Vector3<T>& argvec, T& result) const;
00212
00213     /** scalar product (=inner product) of two vectors returns a scalar
00214         @author Jan Woetzel, Ingo Thomsen
00215         @status alpha **/
00216     inline T ScalarProduct(const Vector3<T>& argvec) const;
00217
00218     /** multiply two vectors elementwise and store the result vector to destvec
00219         @author Jan Woetzel
00220         @status alpha (03/06/2002) **/
00221     inline void ElementwiseProduct(const Vector3<T>& argvec,
00222                                    Vector3<T>& destvec) const;
00223
00224     /** multiply two vectors elementwise and return the result vector
00225         @author Jan Woetzel (03/06/2002) **/
00226     inline Vector3<T> ElementwiseProduct(const Vector3<T>& argvec) const
00227     {
00228       Vector3<T>destvec;
00229       ElementwiseProduct(argvec, destvec);
00230       return destvec;
00231     }
00232
00233     /* divide elementwise @author JW */
00234     inline void ElementwiseDivision(const Vector3<T>& argvec,
00235       Vector3<T>& destvec) const;
00236
00237     /** divide elementwise @author Jan Woetzel */
00238     inline Vector3<T> ElementwiseDivision(const Vector3<T>& argvec) const
00239     {
00240       Vector3<T>destvec;
00241       ElementwiseDivision(argvec, destvec);
00242       return destvec;
00243     }
00244
00245
00246     /** Addition (in place) of an scalar
00247         @author Ingo Thomsen **/
00248     inline void AddIP(const T& scalar) { Add(scalar, *this); }
00249
00250     /** Addition with a scalar, storing results in destionation vector
00251         @author Ingo Thomsen **/
00252     inline void Add(const T& scalar, Vector3<T>& dest) const;
00253
00254     /** Substraction (in place) of an scalar
00255         @author Ingo Thomsen **/
00256     inline void SubIP(const T& scalar) { Sub(scalar, *this); }
00257
00258     /** Substraction with a scalar, storing results in destination vector
00259         @author Ingo Thomsen **/
00260     inline void Sub(const T& scalar, Vector3<T>& dest) const;
00261
00262     /** Multiplication (in place) of an scalar
00263         @author Ingo Thomsen **/
00264     inline void MultiplyIP(const T& scalar) { Multiply(scalar, *this); }
00265     inline void MultIP(const T& scalar) { MultiplyIP(scalar); }
00266
00267     /** Multiplication with a scalar, storing results in destination vector
00268         @author Ingo Thomsen **/
00269     inline void Multiply(const T& scalar, Vector3<T>& dest) const;
00270     inline void Mult(const T& scalar, Vector3<T>& dest) const
00271     { Multiply(scalar, dest); }
00272
00273     /** Division (in place) of an scalar
00274         @author Ingo Thomsen**/
00275     inline void DivideIP(const T& scalar);
00276     inline void DivIP(const T& scalar) { DivideIP(scalar); }
00277
00278     /** Division with a scalar, storing results in destination vector
00279         @author Ingo Thomsen **/
00280     inline void Divide(const T& scalar, Vector3<T>& dest) const ;
00281     inline void Div(const T& scalar, Vector3<T>& dest) const
00282     {Divide(scalar, dest);};
00283
00284     /** in place adding
00285         @author Ingo Thomsen
00286         @status tested **/
00287     inline void AddIP(const Vector3<T>&argvec) { Add(argvec, *this);}
00288
00289     /** adding of two vectors, storing the result in destvec
00290         @author Ingo Thomsen
00291         @status tested **/
00292     inline void Add(const Vector3<T>&argvec, Vector3<T>&destvec) const;
00293
00294     /** in place substraction
00295         @author Ingo Thomsen
00296         @status tested **/
00297     inline void SubIP(const Vector3<T>& argvec) { Sub(argvec, *this); }
00298
00299     /** subtracting of two Vectors, storing the result in destvec
00300         @author Ingo Thomsen
00301         @status tested **/
00302     inline void Sub(const Vector3<T>&argvec, Vector3<T>&destvec) const;
00303
00304     // @}
00305
00306     /** @name Misc
00307         @{
00308     */
00309
00310     /** outer product, constructs a matrix.
00311     Often written as (*this) * v^T for col vectors
00312     made it fast
00313     @author Daniel Grest, Sept 2003, woelk 07/2004
00314     @status tested */
00315     void OuterProduct(const Vector3<T> &v, Matrix3x3<T>& res) const;
00316
00317     inline Matrix3x3<T> OuterProduct(const Vector3<T> &v) const
00318     {
00319       Matrix3x3<T> m;
00320       OuterProduct(v, m);
00321       return m;
00322     }
00323
00324     /** constructs a skew symmetric 3x3 matrix from (*this),
00325         which can be used instead of the cross product
00326         @author koeser 09/2003 */
00327     Matrix<T> GetSkewSymmetricMatrix() const;
00328
00329
00330     /** coordinate transfrom.
00331         compute the euclidian coord p=(x,y,z) for (this) given sphere
00332         coord sph=(radius, phi, theta)
00333         with
00334         radius : distance to center,
00335         theta  : radian angle between positive z-axis and p=(x,y,z).
00336         phi    : radian angle between positive x-axis and projection
00337         of p=(x,y,z) into XY plane.
00338         assume (x,y,z) is in orthogonal right-hand-system.
00339         @author Jan Woetzel 09/2003 */
00340     BIAS::Vector3<T> CoordSphereToEuclidian() const;
00341     BIAS::Vector3<T> PolarToCartesian() const {
00342       return CoordSphereToEuclidian();
00343     };
00344
00345
00346     /** coordinate transform.
00347         compute the sphere coordinates(r, phi, theta) for (this) given
00348         euclidian point p=(x,y,z)
00349         with
00350         radius : distance to center,
00351         theta  : radian angle between positive z-axis and p=(x,y,z).
00352         phi    : radian angle between positive x-axis and projection
00353         of p=(x,y,z) into XY plane.
00354         assume (x,y,z) is in orthogonal right-hand-system.
00355         @author Jan Woetzel 09/2003 */
00356     BIAS::Vector3<T> CoordEuclidianToSphere() const;
00357     BIAS::Vector3<T> CartesianToPolar() const {
00358       return CoordEuclidianToSphere();
00359     }
00360
00361     /** r for polar/sphere content JW */
00362     inline T& Radius()
00363     { return (*this)[0]; };
00364     inline T Radius() const
00365     { return (*this)[0]; };
00366
00367     inline T& Phi()
00368     { return (*this)[1]; };
00369     inline T Phi() const
00370     { return (*this)[1]; };
00371
00372     inline T& Theta()
00373     { return (*this)[2]; };
00374     inline T Theta() const
00375     { return (*this)[2]; };
00376
00377     /** reads the TC part of a BOG file
00378         which is used by Daimler Chrysler
00379         for storing Camera center position.
00380         @return 0 for success, negative for errror
00381         @author Jan Woetzel 03/2005 */
00382     int LoadBogTC(const std::string & filename);
00383
00384     /** method to load directly from a given filename.
00385     internally using stream operator
00386     @author Jan Woetzel 09/2005
00387     @return false in case of error, true in case of success  */
00388     bool Load(const std::string & filename);
00389
00390     /** method to save directly to a given filename.
00391     internally using stream operator
00392     @author Jan Woetzel 09/2009
00393     @return false in case of error, true in case of success */
00394     bool Save(const std::string & filename) const;
00395
00396
00397     // @}
00398
00399     /** @name Operators
00400         @{
00401     */
00402     /** assignment operator
00403         @author woelk 01 2003 **/
00404     inline Vector3<T>& operator=(const Vector3<T>& vec)
00405     { memcpy((void *)data_, (void *)vec.GetData(), VECTOR3_SIZE*sizeof(T));
00406     return *this; };
00407
00408     /** assignment operator
00409         @author frahm 03 2004 **/
00410     inline Vector3<T>& operator=(const Vector<T>& vec)
00411     { if (vec.size() == VECTOR3_SIZE)
00412       memcpy((void *)data_, (void *)vec.GetData(), VECTOR3_SIZE*sizeof(T));
00413     return *this; };
00414
00415     /** access an element  of the vector with 0-based indizes.
00416         read only (no write)
00417         member function const because it doesn't change this object
00418         @author Jan Woetzel
00419         @status untested (03/01/2002) **/
00420     inline const T& operator[] (const int i) const;
00421
00422     /** access an element  of the vector with 0-based indizes.
00423         write allowed
00424         @author Jan Woetzel
00425         @status untested (03/01/2002) **/
00426     inline T& operator[] (const int i);
00427
00428     /** Comparison operator 'equal'
00429         @author Ingo Thomsen
00430         @status tested **/
00431     inline bool operator==(const Vector3<T>& arg) const
00432     { return ((data_[0]==arg.data_[0])&&(data_[1]==arg.data_[1])&&(data_[2]==arg.data_[2])); }
00433
00434     /** Comparison operator 'not equal'
00435         @author woelk 01 2003 **/
00436     inline bool operator!=(const Vector3<T>& arg) const
00437     { return ! operator==(arg); }
00438
00439     // @}
00440
00441   protected:
00442       // the 3 elements of the vector without additional pointers etc...
00443       // it is the *same* as 3 individual members, so there is *NO* additional pointer
00444       // in particular an array of Vector3 is th3 same as one big array of T (JW)
00445     T data_[VECTOR3_SIZE];
00446
00447   };
00448   // ======================================================
00449   // === END OF CLASS DECLARATION =========================
00450   // ======================================================
00451
00452
00453   template <class T>
00454   Vector3<T>::Vector3(char *s) {
00455     std::istringstream inst(s);
00456     inst >> data_[0];
00457     inst >> data_[1];
00458     inst >> data_[2];
00459   }
00460
00461   template <class T>
00462     //BIASMathBase_EXPORT
00463   void Vector3<T>::Set(const T *pv) {
00464     // better use memcopy ?
00465     data_[0] = pv[0];
00466     data_[1] = pv[1];
00467     data_[2] = pv[2];
00468   }
00469
00470   template <class T>
00471     //BIASMathBase_EXPORT
00472   void Vector3<T>::Set(const T& x, const T& y, const T& z) {
00473     data_[0] = x;
00474     data_[1] = y;
00475     data_[2] = z;
00476   }
00477
00478   template <class T>
00479     //BIASMathBase_EXPORT
00480   void Vector3<T>::Set(const Vector<T>& vec) {
00481     if (vec.size() != VECTOR3_SIZE){
00482       BIASERR("The vector for initialization of Vector3 has not length 3");
00483     } else {
00484       data_[0] = vec[0];
00485       data_[1] = vec[1];
00486       data_[2] = vec[2];
00487     }
00488   }
00489
00490   // JW 01/2003
00491   template <class T>
00492     //BIASMathBase_EXPORT
00493   void Vector3<T>::SetZero() {
00494     Set( (T)0);
00495   }
00496
00497
00498   // JW 09/2003
00499   template <class T>
00500     //BIASMathBase_EXPORT
00501   bool
00502   Vector3<T>::IsZero() const {
00503     return ( (data_[0]==(T)0)
00504              && (data_[1]==(T)0)
00505              && (data_[2]==(T)0) );
00506   }
00507
00508
00509
00510   template <class T>
00511     //BIASMathBase_EXPORT
00512   const T& Vector3<T>::operator[] (const int i) const {
00513     BIASASSERT(0 <= i);
00514     BIASASSERT(i < VECTOR3_SIZE);
00515     return data_[i];
00516   }
00517
00518   template <class T>
00519   T& Vector3<T>::operator[] (const int i) {
00520     BIASASSERT(0 <= i);
00521     BIASASSERT(i < VECTOR3_SIZE);
00522     return data_[i];
00523   }
00524
00525   template <class T>
00526   void Vector3<T>::CrossProduct(const Vector3<T>& argvec,
00527                                 Vector3<T>& destvec) const {
00528     destvec[0] = data_[1] * argvec[2] - data_[2] * argvec[1];
00529     destvec[1] = data_[2] * argvec[0] - data_[0] * argvec[2];
00530     destvec[2] = data_[0] * argvec[1] - data_[1] * argvec[0];
00531   }
00532
00533
00534   template <class T>
00535   void Vector3<T>::ScalarProduct(const Vector3<T>& argvec, T& result) const {
00536     result = data_[0] * argvec[0];
00537     result += data_[1] * argvec[1];
00538     result += data_[2] * argvec[2];
00539   }
00540
00541   template <class T>
00542   T Vector3<T>::ScalarProduct(const Vector3<T>& argvec) const {
00543     T result;
00544     ScalarProduct(argvec, result);
00545     return result;
00546   }
00547
00548   template <class T>
00549     void Vector3<T>::ElementwiseProduct(const Vector3<T>& argvec,
00550     Vector3<T>& destvec) const {
00551       destvec[0] = data_[0] * argvec[0];
00552       destvec[1] = data_[1] * argvec[1];
00553       destvec[2] = data_[2] * argvec[2];
00554     }
00555
00556   template <class T>
00557     void Vector3<T>::ElementwiseDivision(const Vector3<T>& argvec,
00558     Vector3<T>& destvec) const {
00559       destvec[0] = data_[0] / argvec[0];
00560       destvec[1] = data_[1] / argvec[1];
00561       destvec[2] = data_[2] / argvec[2];
00562     }
00563
00564   template <class T>
00565   double Vector3<T>::NormL2() const {
00566     return sqrt(double(data_[0]*data_[0] + data_[1]*data_[1]
00567                        + data_[2]*data_[2]));
00568   }
00569
00570   template <class T>
00571   double Vector3<T>::Dist(const Vector3<T> &vec) const {
00572     return sqrt(double((data_[0]-vec[0])*(data_[0]-vec[0]) +
00573                        (data_[1]-vec[1])*(data_[1]-vec[1]) +
00574                        (data_[2]-vec[2])*(data_[2]-vec[2])));
00575   }
00576
00577   template <class T>
00578   Vector3<T>& Vector3<T>::Normalize(){
00579     const T act_length = (T) NormL2(); // euclidian length
00580     // check if not zero
00581     if (act_length > (T)(DBL_EPSILON) )
00582     {
00583       // divide each element by length
00584       this->DivideIP(act_length);
00585     } else {
00586       BIASERR("no normalization possible because act_length="<<act_length);
00587       BIASABORT;
00588     }
00589     return (*this);
00590   }
00591
00592   template <class T>
00593   T Vector3<T>::NormL1() const {
00594     return (data_[0] > 0 ? data_[0] : data_[0] * -1)
00595       + (data_[1] > 0 ? data_[1] : data_[1] * -1)
00596       + (data_[2] > 0 ? data_[2] : data_[2] * -1);
00597   }
00598
00599   template <class T>
00600   void Vector3<T>::Add(const T& scalar, Vector3<T>& dest) const {
00601     dest.data_[0] = data_[0] + scalar;
00602     dest.data_[1] = data_[1] + scalar;
00603     dest.data_[2] = data_[2] + scalar;
00604   }
00605
00606   template <class T>
00607   void Vector3<T>::Add(const Vector3<T>& argvec, Vector3<T>& destvec) const {
00608     destvec[0] = data_[0] + argvec[0];
00609     destvec[1] = data_[1] + argvec[1];
00610     destvec[2] = data_[2] + argvec[2];
00611   }
00612
00613   template <class T>
00614   void Vector3<T>::Multiply (const T& scalar, Vector3<T>& dest) const {
00615     dest.data_[0] = data_[0] * scalar;
00616     dest.data_[1] = data_[1] * scalar;
00617     dest.data_[2] = data_[2] * scalar;
00618   }
00619
00620   template <class T>
00621   void Vector3<T>::Sub(const T& scalar, Vector3<T>& dest) const {
00622     dest.data_[0] = data_[0] - scalar;
00623     dest.data_[1] = data_[1] - scalar;
00624     dest.data_[2] = data_[2] - scalar;
00625   }
00626
00627   template <class T>
00628   void Vector3<T>::Sub(const Vector3<T>&argvec, Vector3<T>&destvec) const {
00629     destvec[0] = data_[0] - argvec[0];
00630     destvec[1] = data_[1] - argvec[1];
00631     destvec[2] = data_[2] - argvec[2];
00632   }
00633
00634   template <class T>
00635   void Vector3<T>::DivideIP(const T& scalar) {
00636     Divide(scalar, *this);
00637   }
00638
00639   template <class T>
00640   void Vector3<T>::Divide(const T& scalar, Vector3<T>& dest) const {
00641 #ifdef BIAS_DEBUG
00642     if (scalar == 0.0){
00643       BIASERR("Division by Zero!");
00644       BIASASSERT(scalar != 0.0);
00645     }
00646 #endif
00647     dest.data_[0] = data_[0] / scalar;
00648     dest.data_[1] = data_[1] / scalar;
00649     dest.data_[2] = data_[2] / scalar;
00650   }
00651
00652
00653   //////////////////////////////////////////////////////////////////////////
00654   // operators
00655   // woelk 01 2003
00656   /////////////////////////////////////////////////////////////////////////
00657
00658  /** @relates Vector3 */
00659   template <class T>
00660   inline Vector3<T>& operator*=(Vector3<T>& vec, const T& scalar) {
00661     vec.MultiplyIP(scalar);
00662     return vec;
00663   }
00664
00665   /** @relates Vector3
00666       Addition operator with scalar argument
00667       @author Ingo Thomsen, woelk
00668       @status tested **/
00669   template <class T>
00670   inline Vector3<T>& operator+=(Vector3<T>& vec, const T& scalar) {
00671     vec.AddIP(scalar);
00672     return vec;
00673   }
00674
00675   /** @relates Vector3
00676       add operator for two Vectors
00677       @author Ingo Thomsen, woelk
00678       @status tested **/
00679   template <class T>
00680   inline Vector3<T>& operator+=(Vector3<T>& vec, const Vector3<T>& argvec) {
00681     vec.AddIP(argvec);
00682     return vec;
00683   }
00684
00685
00686   /** @relates Vector3
00687       Substraction operator with scalar argument
00688       @author Ingo Thomsen
00689       @status tested   **/
00690   template <class T>
00691   inline Vector3<T>& operator-=(Vector3<T>& vec, const T& scalar) {
00692     vec.SubIP(scalar);
00693     return vec;
00694   }
00695
00696   /** @relates Vector3
00697       sub operator for two Vectors
00698       @author Ingo Thomsen, tested **/
00699   template <class T>
00700   inline Vector3<T>& operator-=(Vector3<T>& vec, const Vector3<T>&argvec) {
00701     vec.SubIP(argvec);
00702     return vec;
00703   }
00704
00705
00706   /** @relates Vector3
00707       Division operator with scalar argument
00708       @author Ingo Thomsen
00709       @status tested **/
00710   template <class T>
00711   inline Vector3<T>& operator/=(Vector3<T>& vec, const T& scalar) {
00712     vec.DivideIP(scalar);
00713     return vec;
00714   }
00715
00716   /////////////////////
00717   // stream io
00718   /////////////////////////
00719
00720   /** @relates Vector3
00721       Output with streams
00722       @author Jan Woetzel, JMF, status alpha (08/08/2002) **/
00723   template  <class T> std::ostream &
00724   operator<<(std::ostream& os,const Vector3<T>& vec)
00725   {
00726     std::streambuf *OutBuf_=std::cout.rdbuf(), *OsBuf_= os.rdbuf(),
00727       *ErrBuf_=std::cerr.rdbuf();
00728
00729     // print size at first to be compatible to Vector<>
00730     if (OutBuf_!=OsBuf_ && ErrBuf_!=OsBuf_){ // not cout and not cerr
00731       os << VECTOR3_SIZE << std::endl;
00732       for (int row = 0; row < VECTOR3_SIZE; row++) {
00733         os << std::setw(14);        // set width for output format
00734         //os << setprecision(10);
00735         // print out one element per line
00736         os << vec.GetData()[row] << " " << std::endl;
00737       }
00738     } else {
00739       // cout or cerr
00740       os << "[ ";
00741       for (int row = 0; row < VECTOR3_SIZE; row++)
00742         os << std::setprecision(14) << vec.GetData()[row] << " ";
00743       os << "] ";
00744     }
00745     return os;
00746   }
00747
00748
00749   /** @relates Vector3
00750       Input with streams
00751       @author Jan Woetzel, status untested (03/01/2002) **/
00752   template <class T> std::istream &
00753   operator>>(std::istream & is, Vector3<T>&vec)
00754   {
00755     int N;
00756     is >> N;
00757     if (N != VECTOR3_SIZE) {
00758       BIASERR("can't assign to a Vector3<T> from a vector with dim " << N );
00759     } else {
00760       // correct size, sequential read elementwise
00761       for (int row = 0; row < N; row++) {
00762         is >> vec.GetData()[row];
00763       };
00764     };
00765     return is;
00766   }
00767
00768
00769 } // namespace BIAS
00770
00771
00772 #endif // _Vector3_hh_
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector4.cpp Source File

Base » Math

Vector4.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #include "Vector4.hh"
00027 #include "Vector.hh"
00028
00029 #include <iostream>
00030 #include <fstream>
00031
00032 using namespace BIAS;
00033 using namespace std;
00034
00035 template<class T>
00036 Vector4<T>::Vector4(const Vector <T> &v)
00037 {
00038     // check if v has correct size:
00039     BIASASSERT(v.size() == VECTOR4SIZE);
00040     // set the 4 elements:
00041     data_[0] = v[0];
00042     data_[1] = v[1];
00043     data_[2] = v[2];
00044     data_[3] = v[3];
00045 }
00046
00047
00048 // jw
00049 template<class T>
00050 bool Vector4<T>::Load(const std::string & filename)
00051 {
00052   std::ifstream fs( filename.c_str() );
00053   if (!fs) {
00054     return false; // error, could not open file.
00055   } else {
00056     // read in
00057     fs>>(*this);
00058     fs.close();
00059   };
00060   return true;
00061 }
00062
00063 // jw
00064 template<class T>
00065 bool Vector4<T>::Save(const std::string & filename) const
00066 {
00067   std::ofstream fs( filename.c_str() );
00068   if (!fs) {
00069     return false; // error, could not open file.
00070   } else {
00071     // write out to disk
00072     fs<<(*this);
00073     fs.close();
00074   };
00075   return true;
00076 }
00077
00078 template <class T>
00079 Matrix4x4<T> Vector4<T>::OuterProduct(const Vector4<T> &v) const {
00080   Matrix4x4<T> mat;
00081   T rVal;
00082   for (int row=0; row<this->Size(); row++) {
00083     rVal = (*this)[row];
00084     for (int col=0; col<v.Size(); col++)
00085       mat[row][col] = rVal * v[col];
00086   }
00087   return mat;
00088 }
00089
00090
00091 #define INST(type) \
00092 template class BIASMathBase_EXPORT BIAS::Vector4<type>;\
00093
00094 INST(unsigned char)
00095 INST(char)
00096 INST(float)
00097 INST(short)
00098 INST(unsigned short)
00099 INST(int)
00100 INST(unsigned int)
00101 INST(double)
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector4.hh Source File

Base » Math

Vector4.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005 Multimediale Systeme der Informationsverarbeitung
00006 Institut fuer Informatik
00007 Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Vector4_hh_
00027 #define _Vector4_hh_
00028 #include "bias_config.h"
00029
00030
00031 #include <iostream>
00032 #include <iomanip>
00033 #include <sstream>
00034
00035 #include <Base/Debug/Error.hh>
00036 //#include <Base/Debug/Debug.hh>
00037
00038 #include "Vector.hh"
00039 #include "Matrix.hh"
00040 #include "Matrix4x4.hh"
00041 #include "Operators.hh"
00042
00043
00044 #define VECTOR4SIZE 4
00045 namespace BIAS {
00046     /** @class Vector4
00047     @ingroup g_math
00048     @brief class Vector4 contains a Vector of dim. 4 and fixed dimension
00049
00050     It's elment type is templated.
00051     manual loop unrolling is used if possible.
00052     The Vector is in row-major order (4 rows, 1 column)
00053     teh indizes begin with zero (to size-1)
00054     @author Jan Woetzel
00055     @status tested in part (02/28/2002) **/
00056
00057     // forward declaration to avoid mutual inclusion
00058     template <class T> class Matrix3x4;
00059     template <class T> class Matrix4x4;
00060
00061     template<class T>
00062     class BIASMathBase_EXPORT Vector4 {
00063     public:
00064
00065         inline Vector4() {};
00066
00067         /** copy constructor
00068         @author Daniel Grest (06/2003)
00069         */
00070         inline Vector4(const Vector4<T>& vec) { *this = vec; };
00071
00072         /** assignment with a constant value for all elements
00073         @author Jan Woetzel
00074         @status alpha (03/01/2002) **/
00075         explicit inline Vector4(const T & scalar);
00076
00077         /** assignment with an array of values
00078         which is copied into this ones class members
00079         @author Jan Woetzel
00080         @status untested (02/28/2002) **/
00081         explicit inline Vector4(const T * pv);
00082
00083         /** constructor with element assignment
00084         @author Jan Woetzel
00085         @status alpha (03/01/2002) **/
00086         explicit inline Vector4(char *s);
00087
00088         /** constructor with element assigment using explicit values
00089         @author Ingo Thomsen
00090         @status tested (03/04/2002) **/
00091         inline Vector4(const T v0, const T v1, const T v2, const T v3);
00092
00093         /** cast constructor
00094         @author Jan Woetzel
00095         @status untested (03/22/2002)**/
00096         Vector4(const Vector <T> &v);
00097
00098         inline ~Vector4() {};
00099
00100         /** copy the array of vectorsize beginning at *T to this->data_
00101         @author Jan Woetzel
00102         @status untested (02/28/2002) **/
00103         inline void Copy(const T * pv);
00104
00105         /** set all elements to a scalat value
00106         @author Jan Woetzel
00107         @status untested (02/28/2002) **/
00108         inline void Set(const T & scalar);
00109
00110         /** set elementwise with given scalr values
00111         @author Jan Woetzel, Ingo Thomsen
00112         @status tested (02/28/2002) **/
00113         inline void Set(const T & x, const T & y, const T & z, const T & w);
00114
00115         /** set all values to 0
00116         @author Jan Woetzel **/
00117         inline void SetZero();
00118
00119         /** @return the size of this vector
00120         @author Jan Woetzel
00121         @status untested (02/28/2002) **/
00122         inline const int Size() const;
00123
00124         /** get the data pointer
00125         the member function itself is const (before {..}) because it
00126         doesn't change the this object.
00127         @return the const pointer to the data array for reading
00128         @author Jan Woetzel
00129         @status untested (02/28/2002) **/
00130         inline const T *GetData() const
00131         { return data_; };
00132
00133         /* non const, used for assignment like this: v.GetData()[1]=42 JW */
00134         inline T *GetData()
00135         { return data_; };
00136
00137         /** assignment operator
00138         set the vector elementwise to scalar value
00139         @author Jan Woetzel
00140         @status alpha (02/28/2002)**/
00141         inline Vector4<T>& operator=(const T& scalar);
00142
00143
00144         /** assignment operator
00145         @author grest 06 2003
00146         */
00147         inline Vector4<T>& operator=(const Vector4<T>& vec) {
00148             memcpy((void *)data_, (void *)vec.GetData(), VECTOR4SIZE*sizeof(T));
00149             return *this;
00150         };
00151
00152         /** access an element  of the vector with 0-based indizes.
00153         read only (no write)
00154         member funciton const because it doesn't change this object
00155         @author Jan Woetzel
00156         @status alpha (03/01/2002) **/
00157         inline const T& operator[] (const int i) const;
00158
00159         /** access an element  of the vector with 0-based indizes.
00160         write allowed
00161         @author Jan Woetzel
00162         @status alpha (03/01/2002) **/
00163         inline T & operator[] (const int i);
00164
00165         /** scalar product (=inner product) of two vectors, storing
00166         the result in result
00167         @author Jan Woetzel
00168         @status untested**/
00169         inline void ScalarProduct(const Vector4 < T > &argvec, T & result) const;
00170
00171     /** outer product, constructs a matrix.
00172         Often written as v * v^T for col vectors
00173         @author frick
00174     */
00175     Matrix4x4<T> OuterProduct(const Vector4<T> &v) const;
00176
00177         /** multiply two vectors elementwise, storing the result in destvec
00178         @author Jan Woetzel
00179         @status untested (03/06/2002)**/
00180         inline void ElementwiseProduct(const Vector4 < T > &argvec,
00181             Vector4 < T > &destvec) const;
00182
00183         /** Return the L1 norm: |a| + |b| + |c|+ |d|
00184         @author Ingo Thomsen
00185         @date 04/11/2002
00186         @status untested **/
00187     inline T NormL1() const;
00188
00189         /** Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2)
00190         @author Ingo Thomsen
00191         @date 04/11/2002
00192         @status untested **/
00193     inline double NormL2() const;
00194
00195         /** Return the euclidian distance of 2 vectors.
00196         @author Birger Streckel
00197         @date 08/2002
00198         **/
00199         inline double Dist(const Vector4<T> &vec) const;
00200
00201         /** return a new Matrix with 1 row and 4 columns representing a
00202         transposed vector **/
00203         inline Matrix<T> transposed() const;
00204
00205         /** Comparison operator 'equal'
00206         @author Ingo Thomsen
00207         @status tested **/
00208         inline bool operator==(const Vector4<T>& arg) const;
00209
00210         /** Comparison operator 'not equal'
00211         @author Ingo Thomsen **/
00212         inline bool operator!=(const Vector4<T>& arg) const;
00213
00214
00215
00216         /** Addition operator with scalar argument
00217         @author Ingo Thomsen
00218         @status tested **/
00219         inline Vector4<T>& operator+=(const T& scalar);
00220
00221         /** Addition (in place) of an scalar
00222         @author Ingo Thomsen **/
00223         inline void AddIP (const T& scalar);
00224
00225         /** Addition with a scalar, storing results in destionation vector
00226         @author Ingo Thomsen **/
00227         inline void Add(const T& scalar, Vector4<T>& dest) const;
00228
00229
00230
00231         /** Substraction operator with scalar argument
00232         @author Ingo Thomsen
00233         @status tested **/
00234         inline Vector4<T>& operator-=(const T& scalar);
00235
00236         /** Substraction (in place) of an scalar
00237         @author Ingo Thomsen **/
00238         inline void SubIP(const T& scalar);
00239
00240         /** Substraction with a scalar, storing results in destionation vector
00241         @author Ingo Thomsen **/
00242         inline void Sub(const T& scalar, Vector4<T>& dest) const;
00243
00244
00245
00246         /** Multiplication operator with scalar argument
00247         @author Ingo Thomsen
00248         @status tested   **/
00249         inline Vector4<T>& operator*=(const T& scalar);
00250
00251         /** Multiplication (in place) of an scalar
00252         @author Ingo Thomsen  **/
00253         inline void MultiplyIP(const T& scalar);
00254
00255         /** Multiplication with a scalar, storing results in destionation vector
00256         @author Ingo Thomsen  **/
00257         inline void Multiply(const T& scalar, Vector4<T>& dest) const;
00258
00259
00260
00261         /** Division operator with scalar argument
00262         @author Ingo Thomsen
00263         @status tested **/
00264         inline Vector4<T>& operator/=(const T& scalar);
00265
00266         /** Division (in place) of an scalar
00267         @author Ingo Thomsen **/
00268         inline void DivideIP(const T& scalar);
00269
00270         /** Division with a scalar, storing results in destionation vector
00271         @author Ingo Thomsen  **/
00272         inline void Divide(const T& scalar, Vector4<T>& dest) const;
00273
00274
00275
00276         /** add operator for two Vectors
00277         @author Ingo Thomsen
00278         @status tested   **/
00279         inline Vector4<T>& operator+=(const Vector4<T> &argvec);
00280
00281         /** in place adding
00282         @author Ingo Thomsen
00283         @status tested  **/
00284         inline void AddIP(const Vector4<T> &argvec);
00285
00286         /** adding of two vectors, storing the result in destvec
00287         @author Ingo Thomsen
00288         @status tested    **/
00289         inline void Add(const Vector4<T> &argvec, Vector4<T> &destvec) const;
00290
00291
00292
00293         /** sub operator for two Vectors
00294         @author Ingo Thomsen
00295         @status tested    **/
00296         inline Vector4<T> &operator-=(const Vector4<T> &argvec);
00297
00298         /** in place substraction
00299         @author Ingo Thomsen
00300         @status tested   **/
00301         inline void SubIP(const Vector4<T> &argvec);
00302
00303         /** subtracting of two Vectors, storing the result in destvec
00304         @author Ingo Thomsen
00305         @status tested **/
00306         inline void Sub(const Vector4<T> &argvec, Vector4<T> &destvec) const;
00307
00308
00309         /** method to load directly from a given filename.
00310         internally using stream operator
00311         @author Jan Woetzel 09/2005
00312         @return false in case of error, true in case of success  */
00313         bool Load(const std::string & filename);
00314
00315         /** method to save directly to a given filename.
00316         internally using stream operator
00317         @author Jan Woetzel 09/2009
00318         @return false in case of error, true in case of success */
00319         bool Save(const std::string & filename) const;
00320
00321
00322     protected:
00323         // the 4 elements of the vector without additional pointers etc...
00324         // it is the *same* as 4 individual members, so there is *NO* additional pointer
00325         // in particular an array of Vector4 is teh same as one big array of T (JW)
00326         T data_[VECTOR4SIZE];   //
00327
00328     }; // end of class ==================================================
00329
00330
00331
00332
00333     template <class T>
00334         inline Vector4<T>::Vector4(const T & scalar)
00335     {
00336         Set(scalar);
00337     }
00338
00339     template <class T>
00340         inline Vector4<T>::Vector4(char *s)
00341     {
00342         std::istringstream inst(s);
00343         inst >> data_[0];
00344         inst >> data_[1];
00345         inst >> data_[2];
00346         inst >> data_[3];
00347     }
00348
00349     template <class T>
00350         inline Vector4<T>::Vector4(const T v0, const T v1, const T v2, const T v3)
00351     {
00352         Set(v0, v1, v2, v3);
00353     }
00354
00355     template <class T>
00356         inline Vector4<T>::Vector4(const T * pv)
00357     {
00358         Copy(pv);
00359     }
00360
00361     template <class T>
00362         inline void Vector4<T>::Copy(const T * pv)
00363     {
00364         data_[0] = pv[0];
00365         data_[1] = pv[1];
00366         data_[2] = pv[2];
00367         data_[3] = pv[3];
00368     }
00369
00370     template <class T>
00371         inline void Vector4<T>::Set(const T & scalar)
00372     {
00373         Set(scalar, scalar, scalar, scalar);
00374     }
00375
00376     template <class T>
00377         inline void Vector4<T>::Set(const T & x, const T & y, const T & z, const T & w)
00378     {
00379         data_[0] = x;
00380         data_[1] = y;
00381         data_[2] = z;
00382         data_[3] = w;
00383     }
00384
00385     template <class T>
00386         inline const int Vector4<T>::Size() const
00387     {
00388         return VECTOR4SIZE;
00389     }
00390
00391     template <class T>
00392         inline Vector4<T>& Vector4<T>::operator=(const T& scalar)
00393     {
00394         Set(scalar);
00395         return *this;
00396     }
00397
00398     template <class T>
00399         inline const T& Vector4<T>::operator[](const int i) const
00400     {
00401         BIASASSERT(0 <= i);
00402         BIASASSERT(i < VECTOR4SIZE);
00403         return data_[i];
00404     }
00405
00406     template <class T>
00407         inline T& Vector4<T>::operator[](const int i)
00408     {
00409         BIASASSERT(0 <= i);
00410         BIASASSERT(i < VECTOR4SIZE);
00411         return data_[i];
00412     }
00413
00414
00415
00416     template <class T>
00417         inline void
00418         Vector4<T>::ScalarProduct(const Vector4<T> &argvec, T & result) const
00419     {
00420         result = data_[0] * argvec[0];
00421         result += data_[1] * argvec[1];
00422         result += data_[2] * argvec[2];
00423         result += data_[3] * argvec[3];
00424     }
00425
00426     template <class T>
00427         inline void Vector4<T>::ElementwiseProduct(const Vector4<T> &argvec,
00428         Vector4<T> &destvec) const
00429     {
00430         destvec[0] = data_[0] * argvec[0];
00431         destvec[1] = data_[1] * argvec[1];
00432         destvec[2] = data_[2] * argvec[2];
00433         destvec[3] = data_[3] * argvec[3];
00434     }
00435
00436     template <class T>
00437         inline T Vector4<T>::NormL1() const
00438     {
00439         return (data_[0] > 0 ? data_[0] : data_[0] * -1)
00440             + (data_[1] > 0 ? data_[1] : data_[1] * -1)
00441             + (data_[2] > 0 ? data_[2] : data_[2] * -1)
00442             + (data_[3] > 0 ? data_[3] : data_[3] * -1);
00443     }
00444
00445     template <class T>
00446         inline double Vector4<T>::NormL2() const
00447     {
00448         return sqrt((double) ( data_[0]*data_[0] +
00449             data_[1]*data_[1] +
00450             data_[2]*data_[2] +
00451             data_[3]*data_[3] ));
00452     }
00453
00454     template <class T>
00455         inline double Vector4<T>::Dist(const Vector4<T> &vec) const
00456     {
00457         return sqrt((double) ( (data_[0]-vec[0])*(data_[0]-vec[0]) +
00458             (data_[1]-vec[1])*(data_[1]-vec[1]) +
00459             (data_[2]-vec[2])*(data_[2]-vec[2]) +
00460             (data_[3]-vec[3])*(data_[3]-vec[3]) ));
00461     }
00462
00463     template <class T>
00464         inline Matrix<T> Vector4<T>::transposed() const
00465     {
00466         Matrix<T> destmat(1, 4);
00467         destmat.GetData()[0] = data_[0];
00468         destmat.GetData()[0] = data_[1];
00469         destmat.GetData()[0] = data_[2];
00470         destmat.GetData()[0] = data_[3];
00471         return destmat;
00472     }
00473
00474     template <class T>
00475         inline bool Vector4<T>::operator==(const Vector4<T>& arg) const
00476     {
00477         return ( (data_[0] == arg.data_[0]) && (data_[1] == arg.data_[1]) &&
00478             (data_[2] == arg.data_[2]) && (data_[3] == arg.data_[3]) );
00479     }
00480
00481     template <class T>
00482         inline bool Vector4<T>::operator!=(const Vector4<T>& arg) const
00483     {
00484         return !operator==(arg);
00485     }
00486
00487
00488
00489     template <class T>
00490         inline Vector4<T>& Vector4<T>::operator+=(const T& scalar)
00491     {
00492         AddIP(scalar);
00493         return *this;
00494     }
00495
00496     template <class T>
00497         inline void Vector4<T>::AddIP(const T& scalar)
00498     {
00499         Add(scalar, *this);
00500     }
00501
00502     template <class T>
00503         inline void Vector4<T>::Add(const T& scalar, Vector4<T>& dest) const
00504     {
00505         dest.data_[0] = data_[0] + scalar;
00506         dest.data_[1] = data_[1] + scalar;
00507         dest.data_[2] = data_[2] + scalar;
00508         dest.data_[3] = data_[3] + scalar;
00509     }
00510
00511
00512
00513     template <class T>
00514         inline Vector4<T>& Vector4<T>::operator-=(const T& scalar)
00515     {
00516         SubIP(scalar);
00517         return *this;
00518     }
00519
00520     template <class T>
00521         inline void Vector4<T>::SubIP(const T& scalar)
00522     {
00523         Sub(scalar, *this);
00524     }
00525
00526     template <class T>
00527         inline void Vector4<T>::Sub (const T& scalar, Vector4<T>& dest) const
00528     {
00529         dest.data_[0] = data_[0] - scalar;
00530         dest.data_[1] = data_[1] - scalar;
00531         dest.data_[2] = data_[2] - scalar;
00532         dest.data_[3] = data_[3] - scalar;
00533     }
00534
00535
00536
00537     template <class T>
00538         inline Vector4<T>& Vector4<T>::operator*=(const T& scalar)
00539     {
00540         MultiplyIP(scalar);
00541         return *this;
00542     }
00543
00544     template <class T>
00545         inline void Vector4<T>::MultiplyIP(const T& scalar)
00546     {
00547         Multiply(scalar, *this);
00548     }
00549
00550     template <class T>
00551         inline void Vector4<T>::Multiply(const T& scalar, Vector4<T>& dest) const
00552     {
00553         dest.data_[0] = data_[0] * scalar;
00554         dest.data_[1] = data_[1] * scalar;
00555         dest.data_[2] = data_[2] * scalar;
00556         dest.data_[3] = data_[3] * scalar;
00557     }
00558
00559
00560
00561     template <class T>
00562         inline Vector4<T>& Vector4<T>::operator/=(const T& scalar)
00563     {
00564 #ifdef BIAS_DEBUG
00565         if (scalar == 0 ) {
00566             BIASERR("Division by Zero!");
00567             return *this;
00568         }
00569 #endif
00570         DivideIP(scalar);
00571         return *this;
00572     }
00573
00574     template <class T>
00575         inline void Vector4<T>::DivideIP(const T& scalar)
00576     {
00577 #ifdef BIAS_DEBUG
00578         if (scalar == 0 )
00579             BIASERR("Division by Zero!");
00580 #endif
00581         Divide(scalar, *this);}
00582
00583     template <class T>
00584         inline void Vector4<T>::Divide(const T& scalar, Vector4<T>& dest) const
00585     {
00586 #ifdef BIAS_DEBUG
00587         if (scalar == 0 )
00588             BIASERR("Division by Zero!");
00589 #endif
00590         dest.data_[0] = data_[0] / scalar;
00591         dest.data_[1] = data_[1] / scalar;
00592         dest.data_[2] = data_[2] / scalar;
00593         dest.data_[3] = data_[3] / scalar;
00594     }
00595
00596
00597
00598     template <class T>
00599         inline Vector4<T>&  Vector4<T>::operator+=(const Vector4<T> &argvec)
00600     {
00601         Add(argvec, *this);
00602         return *this;
00603     }
00604
00605     template <class T>
00606         inline void  Vector4<T>::AddIP(const Vector4<T> &argvec)
00607     {
00608         Add(argvec, *this);
00609     }
00610
00611     template <class T> inline void
00612         Vector4<T>::Add(const Vector4<T> &argvec, Vector4<T> &destvec) const
00613     {
00614         destvec[0] = data_[0] + argvec[0];
00615         destvec[1] = data_[1] + argvec[1];
00616         destvec[2] = data_[2] + argvec[2];
00617         destvec[3] = data_[3] + argvec[3];
00618     }
00619
00620
00621
00622     template <class T>
00623         inline Vector4<T>& Vector4<T>::operator-=(const Vector4<T> &argvec)
00624     {
00625         SubIP(argvec);
00626         return *this;
00627     }
00628
00629     template <class T>
00630         inline void Vector4<T>::SubIP(const Vector4<T> &argvec)
00631     {
00632         Sub(argvec, *this);
00633     }
00634
00635     template <class T> inline void
00636         Vector4<T>::Sub(const Vector4<T> &argvec, Vector4<T> &destvec) const
00637     {
00638         destvec[0] = data_[0] - argvec[0];
00639         destvec[1] = data_[1] - argvec[1];
00640         destvec[2] = data_[2] - argvec[2];
00641         destvec[3] = data_[3] - argvec[3];
00642     }
00643
00644
00645     // JW
00646     template <class T>
00647         inline void Vector4<T>::SetZero()
00648     {
00649         Set( (T)0);
00650     }
00651
00652
00653     //////////////////////////////////////////////////////////
00654     // operators
00655     ///////////////////////////////////////////////////////////
00656
00657
00658     template<class T>
00659         std::ostream& operator<<(std::ostream & os, const Vector4<T> &vec)
00660     {
00661         //#ifdef BIAS_DEBUG
00662         std::streambuf *OutBuf_=std::cout.rdbuf(), *OsBuf_= os.rdbuf(),
00663             *ErrBuf_=std::cerr.rdbuf();
00664
00665         if (OutBuf_!=OsBuf_ && ErrBuf_!=OsBuf_){ // not cout and not cerr
00666             //#endif
00667             os << VECTOR4SIZE << std::endl;
00668             for (int row = 0; row < VECTOR4SIZE; row++) {
00669                 os << std::setw(14);        // set width for output format
00670                 // os << setprecision(10);
00671                 os << vec.GetData()[row] << " " << std::endl;
00672             }
00673             //#ifdef BIAS_DEBUG
00674         } else {// cout or cerr
00675             os << "[ ";
00676             for (int row = 0; row < VECTOR4SIZE; row++)
00677                 os << std::setprecision(10) << vec.GetData()[row] << " ";
00678             os << " ]";
00679         }
00680         //#endif
00681         return os;
00682     }
00683
00684
00685
00686     template <class T>
00687         std::istream& operator>>(std::istream & is, Vector4<T> &vec)
00688     {
00689         int N;
00690         is >> N;
00691         if (!(N == vec.Size())) {
00692             BIASERR("can't assign a Vector4<T> with a dim " << N << " vector");
00693       BIASBREAK;
00694         } else {
00695             for (int row = 0; row < N; row++) {
00696                 is >> vec.GetData()[row];
00697             };
00698         };
00699         return is;
00700     }
00701
00702
00703 } // namespace BIAS
00704 #endif
00705
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector.cpp Source File

Base » Math

Vector.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "Vector.hh"
00026
00027 #include "Vector2.hh"
00028 #include "Vector3.hh"
00029 #include "Vector4.hh"
00030 #include "Matrix.hh"
00031
00032 #include <iostream>
00033 #include <fstream>
00034
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039 template<class T>
00040 Vector<T>::~Vector()
00041 {}
00042
00043 template<class T>
00044 Vector<T>::Vector(const int rows, const std::string & s)
00045 : TNT::Vector<T>(rows, s)
00046 {}
00047
00048
00049 template<class T>
00050 Vector<T>::Vector(const Vector2<T>& v)
00051 : TNT::Vector<T>(2)
00052 { (*this)[0]=v[0]; (*this)[1]=v[1]; }
00053
00054 template<class T>
00055 Vector<T>::Vector(const Vector3<T>& v)
00056 : TNT::Vector<T>(3)
00057 { (*this)[0]=v[0]; (*this)[1]=v[1]; (*this)[2]=v[2]; }
00058
00059 template<class T>
00060 Vector<T>::Vector(const Vector4<T>& v)
00061 : TNT::Vector<T>(4)
00062 { (*this)[0]=v[0]; (*this)[1]=v[1]; (*this)[2]=v[2]; (*this)[3]=v[3]; }
00063
00064
00065
00066 /*
00067 template<class T>
00068 Vector<T>::Vector(const Vector2<T>& v)
00069 {
00070     newsize(2);         // set this vector size to size of argument vector
00071     GetData()[0] = v[0];    // set elements
00072     GetData()[1] = v[1];
00073 }
00074
00075 template<class T>
00076 Vector<T>::Vector(const Vector3<T>& v)
00077 {
00078     newsize(3);         // set this vector size to size of argument vector
00079     GetData()[0] = v[0];    // set elements
00080     GetData()[1] = v[1];
00081     GetData()[2] = v[2];
00082 }
00083
00084 template<class T>
00085 Vector<T>::Vector(const Vector4<T>& v)
00086 {
00087     newsize(4);         // set this vector size to size of argument vector
00088     GetData()[0] = v[0];    // set elements
00089     GetData()[1] = v[1];
00090     GetData()[2] = v[2];
00091     GetData()[3] = v[3];
00092 }
00093 */
00094
00095 template<class T>
00096 Vector<T>& Vector<T>::operator=(const TNT::Vector<T> &vec)
00097 {
00098     TNT::Vector<T>::operator = (vec);   // call the operator of the base class
00099     return *this;
00100 }
00101
00102 template<class T>
00103 void Vector<T>::Fill(const T & scalar)
00104 {
00105     TNT::Vector<T>::operator=(scalar);
00106 }
00107
00108
00109 template <class T>
00110 Matrix<T> Vector<T>::OuterProduct(const Vector<T> &v) const {
00111   Matrix<T> mat(this->size(),v.size());
00112   T rVal;
00113   for (int row=0; row<this->size(); row++) {
00114     rVal = (*this)[row];
00115     for (int col=0; col<v.size(); col++)
00116       mat[row][col] = rVal * v[col];
00117   }
00118   return mat;
00119 }
00120
00121 template <class T>
00122 void Vector<T>::KroneckerProduct(const Vector<T> &arg, Vector<T>& dst) const
00123 {
00124   const unsigned s1=this->size(), s2=arg.size();
00125   unsigned l=0;
00126   dst.newsize(s1*s2);
00127   for (register unsigned i=0; i<s1; i++){
00128     for (register unsigned k=0; k<s2; k++){
00129       dst[l]=(*this)[i]*arg[k];
00130       l++;
00131     }
00132   }
00133 }
00134
00135
00136
00137 template <class T>
00138 bool Vector<T>::IsZero() const {
00139   int i=this->size();
00140   // return false when the first non-zero element is found.
00141   while (i) {
00142     i--;
00143     if (this->v_[i] != (T)0) return false;
00144   };
00145   return true; // all elementa are zero
00146 }
00147
00148 template <class T>
00149 Vector<T> Vector<T>::SubVec(int length, int offset) const
00150 {
00151 #ifdef BIAS_DEBUG
00152   BIASASSERT( offset>=0 && length>=0 && offset+length<=(int)Size() );
00153 #endif
00154   Vector<T> res ( length );
00155   for (int i = 0; i < length; i++)
00156     res[i] = (*this)[i+offset];
00157   return res;
00158 }
00159
00160 // jw
00161 template<class T>
00162 bool Vector<T>::Load(const std::string & filename)
00163 {
00164   std::ifstream fs( filename.c_str() );
00165   if (!fs) {
00166     return false; // error, could not open file.
00167   } else {
00168     // read in
00169     fs>>(*this);
00170     fs.close();
00171   };
00172   return true;
00173 }
00174
00175 // jw
00176 template<class T>
00177 bool Vector<T>::Save(const std::string & filename) const
00178 {
00179   std::ofstream fs( filename.c_str() );
00180   if (!fs) {
00181     return false; // error, could not open file.
00182   } else {
00183     // write out to disk
00184     fs<<(*this);
00185     fs.close();
00186   };
00187   return true;
00188 }
00189
00190
00191 ///
00192 /// explicit instantiation
00193 ///
00194 #define INST(type) \
00195 template class BIASMathBase_EXPORT BIAS::Vector<type>;\
00196 template class BIASMathBase_EXPORT TNT::Vector<type>;\
00197
00198
00199 INST(unsigned char)
00200 INST(char)
00201 INST(float)
00202 INST(short)
00203 INST(unsigned short)
00204 INST(int)
00205 INST(unsigned int)
00206 INST(double)
00207
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/Vector.hh Source File

Base » Math

Vector.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef _Vector_hh_
00027 #define _Vector_hh_
00028
00029 #include "bias_config.h"
00030
00031 #define _USE_MATH_DEFINES
00032 #include "math.h"
00033
00034 #include "tnt/tnt.h"
00035 #include "tnt/vec.h"
00036 #include "Operators.hh"
00037 #include <string>
00038
00039 namespace BIAS {
00040
00041   // forward declaration to avoid mutual inclusion
00042   template<class T> class BIASMathBase_EXPORT Vector2;
00043   template<class T> class BIASMathBase_EXPORT Vector3;
00044   template<class T> class BIASMathBase_EXPORT Vector4;
00045   template<class T> class BIASMathBase_EXPORT Matrix;
00046
00047   /**@class Vector
00048      @ingroup g_math
00049      @brief class for column vectors with arbitrary size
00050
00051      class Vector is the vector class that should be used by common
00052      BIAS algorithms and data structures.
00053      It is derived from TNT::Vector to inherit the basic operations and
00054      algorithm.
00055      Special implementations should be done here and NOT in TNT:Vector
00056      because the true 'base' Matrix class "TNT::Vector"
00057      should be interchangeable and aside from this maintained by NIST.
00058
00059      changed from BIAS to BIAS 11/05/2002 (jw)
00060
00061      The Vector is in row-major order (=n rows, 1 column)
00062      @author Jan Woetzel
00063   **/
00064   template<class T=double>
00065   class BIASMathBase_EXPORT Vector : public TNT::Vector<T>
00066   {
00067   public:
00068
00069     virtual ~Vector();
00070
00071     Vector() :TNT::Vector<T>() {};
00072
00073     explicit Vector(const int rows) : TNT::Vector<T>(rows) {};
00074
00075     //Vector(int rows, char *s) :TNT::Vector<T>(rows, s) {};
00076     /// JW
00077     explicit Vector(const int rows, const std::string & s);
00078
00079
00080     /** assignment with a constant value for all elements (=set)
00081         @author Jan Woetzel
00082     */
00083     Vector(int rows, const T & value) :TNT::Vector<T>(rows, value) {};
00084
00085     Vector(int rows, const T * v) :TNT::Vector<T>(rows, v) {};
00086
00087     Vector(const Vector<T>& v) :TNT::Vector<T>(v) {};
00088
00089     /** @author JMF
00090      */
00091     Vector(const TNT::Vector<T> &v) :TNT::Vector<T>(v) {};
00092
00093     /** @author fw */
00094     Vector(const Vector2<T>& v);
00095
00096     /** @author fw */
00097     Vector(const Vector3<T>& v);
00098
00099     /** @author fw */
00100     Vector(const Vector4<T>& v);
00101
00102     /** assignment operators
00103         calling corresponding operator from base class "TNT::Vector" if
00104         appropriate
00105         @author Jan Woetzel (02/25/2002) **/
00106     Vector<T>& operator=(const TNT::Vector<T>& vec);
00107
00108     /** assignment operator
00109         calling corresponding operator from base class "TNT::Vector" if
00110         appropriate  @author grest */
00111     Vector<T>& operator=(const Vector<T> &vec)
00112     { TNT::Vector<T>::operator=(vec); return *this; }
00113
00114     inline void operator+=(const Vector<T>& vec);
00115
00116     inline void operator-=(const Vector<T>& vec);
00117
00118     inline void operator*=(T scalar);
00119
00120     /** @author woelk 12/2004 */
00121     inline void operator/=(T scalar);
00122
00123     inline bool operator==(const Vector<T> &vec) const;
00124
00125     inline bool operator!=(const Vector<T> &vec) const
00126     { return !operator==(vec); }
00127
00128     /** @brief returns the Euclidean Length of the Vector
00129      */
00130     inline double Length() const
00131     { return NormL2(); };
00132
00133     /** length of the vector */
00134     inline unsigned int Size() const
00135     { return this->size(); };
00136
00137     /** fills complete Vector with scalar value */
00138     void Fill(const T & scalar);
00139     inline void Set(const T & scalar) {Fill(scalar);}
00140
00141     /** aequivalent to matrix call */
00142     inline void SetZero()
00143     { Fill((T)(0)); };
00144
00145     /** @return true if all elements are equal zero JW */
00146     bool IsZero() const;
00147
00148     /** scalar product (inner product) of two vectors returning a scalr
00149         @author Ingo Thomsen
00150         @status tested(03/11/2002) **/
00151     inline T ScalarProduct(const Vector<T>& argvec) const;
00152
00153     /** scalar product (inner product) of two vectors returning a scalar,
00154         storing the result in result
00155         @author Ingo Thomsen
00156         @status tested(03/11/2002) **/
00157     inline void ScalarProduct(const Vector<T>& argvec, T& result) const;
00158
00159     /** outer product, constructs a matrix.
00160         Often written as v * v^T for col vectors
00161         @author Daniel Grest, Oct 2002
00162         @status tested */
00163     Matrix<T> OuterProduct(const Vector<T> &v) const;
00164
00165     /** kronecker product
00166         @author woelk 08/2004 */
00167     void KroneckerProduct(const Vector<T> &arg, Vector<T>& dst) const;
00168
00169     /** multiply components with scalar storing result in res
00170         @author Ingo Thomsen
00171         @status tested(03/11/2002) **/
00172     inline void Multiply(const T& scalar, Vector<T>& res) const;
00173
00174     /** in place multiplication with scalar
00175         @author Ingo Thomsen
00176         @status untested **/
00177     inline void MultiplyIP(const T& scalar)
00178     { Multiply(scalar, *this); };
00179
00180     /** in place subtracting
00181         @author Ingo Thomsen
00182         @status untested **/
00183     inline void SubIP(const Vector<T>& argmat);
00184
00185     /** get the pointer to the data array of the vector
00186         (for faster direct memory access)
00187         @author Jan Woetzel
00188         @return a pointer to the data array (beginning with GetData[0])
00189         -added const (jw. 03/12/2002) **/
00190     inline T *GetData() const
00191     { return this->v_; };
00192
00193     /** Get the pointer to last element of the data array
00194         @author Ingo Thomsen
00195         @date 04/11/2002
00196         @return pointer to last element **/
00197     inline T *GetDataLast() const
00198     { return GetData() + this->size() - 1; };
00199
00200     /** Return the L1 norm: |a| + |b| + |c| + ...
00201         @author Ingo Thomsen
00202         @date 04/11/2002
00203     **/
00204     inline T NormL1() const;
00205
00206     /** Return the L2 norm: sqrt(a^1 + a^2 + ...)
00207         @author Ingo Thomsen
00208         @date 04/11/2002
00209     **/
00210     inline double NormL2() const;
00211
00212     /** Return the euclidian distance of 2 vectors.
00213         @author Birger Streckel
00214         @date 08/2002
00215     **/
00216     inline double Dist(const Vector<T> &vec) const;
00217
00218     /** multiply this with arg elementwise and store the result in dest
00219         @author woelk 12/2004 */
00220     inline void ElementwiseProduct(const Vector<T> &arg,Vector<T> &dest) const;
00221
00222     /** multiply this with arg elementwise and return the result
00223         @author woelk 12/2004 */
00224     inline Vector<T> ElementwiseProduct(const Vector<T> &arg) const;
00225
00226     /** returns the subvector with elements between offset and offset+length-1
00227         @author Dennis Herzog
00228         @date 2005-07-29 */
00229     Vector<T> SubVec(int length, int offset = 0) const;
00230
00231     /** method to load directly from a given filename.
00232     internally using stream operator
00233     @author Jan Woetzel 09/2005
00234     @return false in case of error, true in case of success  */
00235     bool Load(const std::string & filename);
00236
00237     /** method to save directly to a given filename.
00238     internally using stream operator
00239     @author Jan Woetzel 09/2009
00240     @return false in case of error, true in case of success */
00241     bool Save(const std::string & filename) const;
00242
00243
00244
00245   }; // class ==========================================================================
00246
00247
00248
00249
00250
00251   /** @relates Vector
00252       Output with streams
00253       @author woelk 10/2004 major corrections by Jan Woetzel/Sun Min 11/2004 */
00254   template  <class T>
00255   std::ostream & operator<<(std::ostream& os, const BIAS::Vector<T>& vec);
00256
00257
00258   // ==== implementation:  ==========================================
00259
00260   template <class T>
00261   inline void Vector<T>::operator+=(const Vector<T> &argvec)
00262   {
00263     BIASASSERT(this->size() == argvec.size());
00264     T* data= GetData(), *argData = argvec.GetData();
00265
00266     for (int i=0; i <this->size(); i++) {
00267       *data = *data + *argData;
00268       data++; argData++;
00269     }
00270   }
00271
00272   template <class T>
00273   inline void Vector<T>::operator-=(const Vector<T> &argvec)
00274   {
00275     BIASASSERT(this->size() == argvec.size());
00276     T* data= GetData(), *argData = argvec.GetData();
00277
00278     for (int i=0; i <this->size(); i++) {
00279       *data = *data - *argData;
00280       data++; argData++;
00281     }
00282   }
00283
00284   template <class T>
00285   inline void Vector<T>::operator*=(T scalar)
00286   {
00287     T* data= GetData();
00288
00289     for (int i=0; i <this->size(); i++) {
00290       *data = *data * scalar;
00291       data++;
00292     }
00293   }
00294
00295   template <class T>
00296   inline void Vector<T>::operator/=(T scalar)
00297   {
00298     T* data= GetData();
00299     const int size=Size();
00300     for (int i=0; i<size; i++) {
00301       *data = *data / scalar;
00302       data++;
00303     }
00304   }
00305
00306   template <class T>
00307   inline bool Vector<T>::operator==(const Vector<T> &vec) const
00308   {
00309     bool res = (this->size()==vec.size());
00310     if (res){
00311       size_t s=sizeof(T)*this->size();
00312       res = res && (memcmp((void *)GetData(), (void*)vec.GetData(), s)==0);
00313     }
00314     return res;
00315   }
00316
00317   template <class T>
00318   inline T Vector<T>::ScalarProduct(const Vector < T > &argvec) const
00319   {
00320     T result;
00321     ScalarProduct(argvec, result);
00322     return result;
00323   }
00324
00325   template <class T> inline void
00326   Vector<T>::ScalarProduct(const Vector<T> &argvec, T & result) const
00327   {
00328     BIASASSERT(this->size() == argvec.size());
00329     // initialized with the first product, so no initialization
00330     // with 0 is necessary
00331     result = this->v_[0] * argvec[0];
00332     for (int i = 1; i < this->size(); i++) {
00333       result += this->v_[i] * argvec[i];
00334     }
00335   }
00336
00337
00338
00339   template <class T>
00340   inline void Vector<T>::Multiply(const T& scalar, Vector<T>& res) const
00341   {
00342     for (int i = 0; i < this->size(); i++) {
00343       res[i] = this->v_[i] * scalar;
00344     }
00345   }
00346
00347   template <class T>
00348   inline void Vector<T>::SubIP(const Vector<T>& argmat)
00349   {
00350     BIASASSERT(this->size() == argmat.size());
00351
00352     for (int i = 0; i < this->size(); i++) {
00353       this->v_[i] = this->v_[i] - argmat[i];
00354     }
00355   }
00356
00357   template <class T>
00358   inline T Vector<T>::NormL1() const
00359   {
00360     T result = 0;
00361     for(register T* dataP = GetDataLast(); dataP >= GetData(); dataP--) {
00362       result += *dataP > 0 ? *dataP : *dataP * -1;
00363     }
00364     return result;
00365   }
00366
00367   template <class T>
00368   inline double Vector<T>::NormL2() const
00369   {
00370     double result = 0;
00371     for(register T* dataP = GetDataLast(); dataP >= GetData(); dataP--) {
00372       result += *dataP * *dataP;
00373     }
00374     result = sqrt((double) result);
00375     return result;
00376   }
00377
00378   template <class T>
00379   inline double Vector<T>::Dist(const Vector<T> &vec) const
00380   {
00381     BIASASSERT(this->size() == vec.size());
00382     double result = 0;
00383     register T* thisP;
00384     register T* vecP;
00385     for(thisP=GetDataLast(), vecP=vec.GetDataLast();
00386         thisP >= GetData();
00387         thisP--, vecP--) {
00388       result += ((*thisP)-(*vecP))*((*thisP)-(*vecP));
00389     }
00390     result = sqrt(result);
00391     return result;
00392   }
00393
00394   template <class T>
00395   inline void Vector<T>::ElementwiseProduct(const Vector<T> &arg,
00396                                             Vector<T> &dest) const
00397   {
00398     const int size=Size();
00399     BIASASSERT((int)arg.Size()==size);
00400     dest.newsize(size);
00401     for (int i=0; i<size; i++)
00402       dest[i] = (*this)[i] * arg[i];
00403   }
00404
00405   template <class T>
00406   inline Vector<T> Vector<T>::ElementwiseProduct(const Vector<T> &arg) const
00407   {
00408     Vector<T> dest;
00409     ElementwiseProduct(arg, dest);
00410     return dest;
00411   }
00412
00413   template  <class T>
00414   std::ostream & operator<<(std::ostream& os, const BIAS::Vector<T>& vec)
00415   {
00416 #ifdef WIN32
00417     os << "[ ";
00418     for (int row = 0; row < vec.size(); row++)
00419       os << std::setprecision(10)<<vec.GetData()[row]<< " ";
00420     os << "] ";
00421 #else
00422
00423     std::streambuf *OutBuf_=std::cout.rdbuf(), *OsBuf_= os.rdbuf(),
00424       *ErrBuf_=std::cerr.rdbuf();
00425     // print size at first to be compatible to Vector<>
00426     if ((OutBuf_!=OsBuf_ && ErrBuf_!=OsBuf_) || vec.size()>5){
00427       // not cout and not cerr, use default operator from TNT
00428       os << (TNT::Vector<T>)(vec);
00429     } else { // cout or cerr
00430       os << "[ ";
00431       for (int row = 0; row < vec.size(); row++)
00432         os << std::setprecision(10)<<vec.GetData()[row]<< " ";
00433       os << "] ";
00434     }
00435 #endif // WIN32
00436
00437     return os;
00438   }
00439
00440
00441 } // namespace BIAS
00442 #endif // _Vector_hh_
00443
Generated on Wed Jun 21 19:00:55 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Math/tnt/version.h Source File

Base » Math » tnt

version.h

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009 // Template Numerical Toolkit (TNT) for Linear Algebra
00010 //
00011 // BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE
00012 // Please see http://math.nist.gov/tnt for updates
00013 //
00014 // R. Pozo
00015 // Mathematical and Computational Sciences Division
00016 // National Institute of Standards and Technology
00017
00018
00019 #ifndef TNT_VERSION_H
00020 #define TNT_VERSION_H
00021
00022
00023 #define TNT_MAJOR_VERSION    '0'
00024 #define TNT_MINOR_VERSION    '9'
00025 #define TNT_SUBMINOR_VERSION '4'
00026 #define TNT_VERSION_STRING "0.9.4"
00027
00028 #endif
Generated on Wed Jun 21 19:00:54 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoServer.cpp Source File

VideoSource

VideoServer.cpp

Go to the documentation of this file.
00001 #ifdef WIN32
00002 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00003 #endif
00004
00005 #include "VideoServer.hh"
00006
00007 #include <VideoSource/VideoSource_Disk.hh>
00008
00009 #ifdef BIAS_HAVE_DCAM
00010 #  include <VideoSource/VideoSource_DCAM.hh>
00011 #endif // BIAS_HAVE_DCAM
00012
00013 #ifdef BIAS_HAVE_V4L
00014 # include <VideoSource/VideoSource_V4L.hh>
00015 #endif // BIAS_HAVE_V4L
00016
00017 using namespace BIAS;
00018 using namespace std;
00019
00020 VideoServer::VideoServer(Param &p){
00021   Initialized_ = false;
00022   ParamsAllocated_ = false;
00023   msgSize_=0;
00024   AddParams_(p);
00025 }
00026
00027 VideoServer::VideoServer()
00028 {
00029   port_ = new int;
00030   *port_ = D_CS_DEFAULT_PORT;
00031   targetAddress_ = new string;
00032   *targetAddress_ = "";
00033   camType_= new int;
00034   *camType_= 0;
00035   camParam_ = new BIAS::Vector<double>(3);
00036   (*camParam_)[0] = 15.0;// fps
00037   (*camParam_)[0] = 0.02; //shutter
00038   (*camParam_)[0] = 0; //gain
00039
00040   imgWidth_= new int;
00041   *imgWidth_ = 640;
00042   imgHeight_= new int;
00043   *imgHeight_ = 480;
00044   jpeg_= new int;
00045   *jpeg_ = -1; // no compression
00046   compressionColor_= new bool;
00047   *compressionColor_=true;
00048   useUDP_ = new bool;
00049   *useUDP_ = false;
00050
00051   resizeFactor_ = new double;
00052   *resizeFactor_= 1.0;
00053   UDPServerThrottle_= new int;
00054   *UDPServerThrottle_= 1;
00055   useUDP_ = new bool;
00056   *useUDP_ = false;
00057
00058   msgSize_=0;
00059   Initialized_ = false;
00060   ParamsAllocated_ = true;
00061 }
00062
00063 VideoServer::~VideoServer()
00064 {
00065   if (ParamsAllocated_) {
00066     delete targetAddress_;
00067     delete camParam_;
00068     delete jpeg_;
00069     delete port_;
00070
00071     delete camType_;
00072     delete imgWidth_;
00073     delete imgHeight_;
00074     delete compressionColor_;
00075
00076     delete useUDP_;
00077
00078     delete resizeFactor_ ;
00079     delete UDPServerThrottle_;
00080     delete useUDP_ ;
00081   }
00082   camera_->CloseDevice();
00083
00084 }
00085
00086
00087 int VideoServer::Init(int port)  {
00088   int res;
00089   if (port!=*port_)
00090     *port_=port;
00091   cout <<"Initializing VideoServer on port:"<<*port_<<endl;
00092   switch (*camType_) {
00093   case 0:
00094     camera_= new VideoSource_Disk;
00095     break;
00096 #ifdef BIAS_HAVE_DCAM
00097   case 1:
00098     camera_= new VideoSource_DCAM;
00099     break;
00100 #endif // BIAS_HAVE_DCAM
00101 #ifdef BIAS_HAVE_V4L
00102   case 2:
00103     camera_= new VideoSource_V4L;
00104     break;
00105 #endif // BIAS_HAVE_V4L
00106   default:
00107     BIASERR("no camera type selected for input");
00108   }
00109
00110   camera_->SetSize(*imgWidth_, *imgHeight_);
00111   //Camera_->SetLeftTop((*ImageParam_)[3], (*ImageParam_)[4]);
00112   camera_->SetFPS(float((*camParam_)[0]));
00113   res = camera_->OpenDevice();
00114   if (res<0)
00115     return res;
00116   res = camera_->PreGrab();
00117   if (res<0)
00118     return res;
00119
00120 #ifdef BIAS_HAVE_DCAM
00121   if ( (*camParam_)[1]  >0) {
00122     camera_->AutoMode(FEATURE_SHUTTER,false);
00123     camera_->SetShutter(float((*camParam_)[1]));
00124     cout <<"Shutter: "<<camera_->GetShutter();
00125   }
00126   else
00127     camera_->AutoMode(FEATURE_SHUTTER,true);
00128   if ((*camParam_)[2]>0) {
00129     camera_->AutoMode(FEATURE_GAIN,false);
00130     camera_->SetShutter(float((*camParam_)[2]));
00131     cout <<"Shutter: "<<camera_->GetGain()<<endl;
00132   }
00133   else
00134     camera_->AutoMode(FEATURE_GAIN,true);
00135 #endif // BIAS_HAVE_DCAM
00136
00137   (*imgWidth_)=camera_->GetWidth();
00138   (*imgHeight_)=camera_->GetHeight();
00139
00140 #ifdef BIAS_HAVE_LIBJPEG
00141   if (*jpeg_ > 0) {
00142     if (Compressor_.Init() < 0) {
00143       BIASERR("Could not initialize JPEG-compression!!!");
00144       return -1;
00145     }
00146   }
00147 #else //BIAS_HAVE_LIBJPEG
00148   if (*jpeg_>0) {
00149     BIASERR("Compression mode not available without LIBJPEG!");
00150   }
00151 #endif //BIAS_HAVE_LIBJPEG
00152   if (*useUDP_){
00153     //    Transmitter_.Connect(TargetAddress_->c_str(),*SendPort_);
00154   } else {
00155     server_.WaitForConnections(*port_);
00156   }
00157   camera_->InitImage(CamImage_);
00158   cout<<"Grabbing image size: "<< (*imgWidth_)<<"x"<< (*imgHeight_)<<endl;
00159   Initialized_ = true;
00160   return 0;
00161 }
00162
00163
00164 int VideoServer::ProcessOneImage()  {
00165   if (! Initialized_) {
00166     BIASERR("VideoServer not initialized");
00167     return -1;
00168   }
00169   if (server_.GetConnections()<=0)
00170     return 1;
00171   camera_->GrabSingle(CamImage_);
00172   if (*resizeFactor_ == 1.0)
00173     SendImage_=CamImage_;
00174   else {
00175     RescaleFilter_.SetFactor(*resizeFactor_);
00176     RescaleFilter_.Filter(CamImage_, SendImage_);
00177   }
00178   SendImage_.SetUID(BIAS::UUID::GenerateUUID());
00179
00180   //  if (*useUDP_)
00181     //    Transmitter_.SetThrottle(*UDPServerThrottle_);
00182   if (*jpeg_>0) {
00183 #ifdef BIAS_HAVE_LIBJPEG
00184     // compress here --->> add parameter for jpeg-quality ???
00185     if (*compressionColor_) {
00186       if (SendImage_.GetColorModel() != ImageBase::CM_RGB) {
00187         Image<unsigned char> temp;
00188         ImageConvert::ToRGB(SendImage_, temp);
00189         Compressor_.Compress(temp,*jpeg_);
00190       } else {
00191         Compressor_.Compress(SendImage_,*jpeg_);
00192       }
00193     } else {
00194       if (SendImage_.GetColorModel() != ImageBase::CM_Grey) {
00195         Image<unsigned char> temp;
00196         ImageConvert::ToGrey(SendImage_, temp);
00197         Compressor_.Compress(temp,*jpeg_);
00198       } else {
00199         Compressor_.Compress(SendImage_,*jpeg_);
00200       }
00201     }
00202     void *data = NULL;
00203     long length;
00204     Compressor_.GetCompressedData(data,length);
00205     if (*useUDP_){
00206       //      Transmitter_.Send(&Header_, (unsigned char*) data);
00207     } else {
00208       server_.SendMsg("JPEG_IMAGE", (char*)data, length);
00209     }
00210     msgSize_=length;
00211 #else //BIAS_HAVE_LIBJPEG
00212     BIASERR("LIBJPEG not configured --> no compression available !!!");
00213     return -1;
00214 #endif //BIAS_HAVE_LIBJPEG
00215   } else {
00216     if (*useUDP_){
00217       // Transmitter_.Send(&Header_, SendImage_.GetImageData());
00218     } else {
00219       stringstream dataToSend;
00220       dataToSend<<SendImage_;
00221       msgSize_= dataToSend.str().length();
00222       server_.SendMsg("BIAS_IMAGE",(char*)&(dataToSend.str()[0]),
00223                               msgSize_);
00224     }
00225   }
00226
00227   return 0;
00228 }
00229
00230
00231
00232 void VideoServer::AddParams_(Param &p) {
00233   int grp = p.GetFreeGroupID();
00234
00235   camType_ = p.AddParamInt("camType",
00236                            "type of camera to use: 0=Disk 1=DCAM 2=V4L",0,0,2,
00237                            0,grp);
00238   imgWidth_ = p.AddParamInt("imgWidth",
00239                             "desired size in x-direction",640,0,5000,'x',grp);
00240   imgHeight_ = p.AddParamInt("imgHeight",
00241                              "desired size in y-direction",480,0,5000,'y',grp);
00242
00243   resizeFactor_= p.AddParamDouble("resize",
00244                                   "resize factor ",1.0,0,256,0,grp);
00245   jpeg_= p.AddParamInt("jpeg",
00246                        "compress images as JPEG with this quality, "
00247                        "-1 means no jpeg",
00248                        -1,-1,100,0,grp);
00249   compressionColor_=p.AddParamBool("jpegColor",
00250                            "wether to transfer jpeg images in color",
00251                                    true,0,grp);
00252   Vector<double> camparam(3);
00253   camparam[0] = 15; camparam[1] = 0.01;
00254   camparam[2] = 0;
00255
00256   camParam_ =
00257     p.AddParamVecDbl("camParam",
00258                      "FPS, Shutter [s], Gain [dB]", camparam, 0,grp);
00259
00260   port_=p.AddParamInt("port",
00261                       "TCP port to listen on, or UDP port to send packets to)",
00262                       D_CS_DEFAULT_PORT,0,65535,0,grp);
00263   targetAddress_ = p.AddParamString("ip",
00264                                     "UDP addresses to send to","localhost",
00265                                     0,grp);
00266   UDPServerThrottle_ = p.AddParamInt("throttleUDP",
00267                                      "throttle UDP transmitter [ms]",
00268                                      1,0,1000,0,grp);
00269   useUDP_ = p.AddParamBool("useUDP",
00270                            "Use UDP instead of TCP",false,0,grp);
00271
00272   p.SetGroupName(grp,"VideoServer");
00273 }
00274
00275
00276
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoServer.hh Source File

VideoSource

VideoServer.hh

Go to the documentation of this file.
00001 #ifndef __BIAS_VIDEOSERVER_HH__
00002 #define __BIAS_VIDEOSERVER_HH__
00003
00004 #include <iostream>
00005 #include <sstream>
00006 #include <string>
00007
00008 #include <bias_config.h>
00009 // BIAS
00010 #include <Utils/Param.hh>
00011 #include <Base/Debug/Debug.hh>
00012 #include <Base/Image/ImageIO.hh>
00013 #include <Filter/Rescale.hh>
00014 #include <Image/Camera.hh>
00015 #include <VideoSource/VideoSource_Base.hh>
00016 #include <NetworkComm/CScommServer.hh>
00017
00018
00019 #ifdef  BIAS_HAVE_LIBJPEG
00020 #include <Image/CompressJpeg.hh>
00021 #include <Base/Image/ImageConvert.hh>
00022 #endif // BIAS_HAVE_LIBJPEG
00023
00024
00025 namespace BIAS {
00026
00027 /** @class VideoServer
00028     @brief class to send images from a camera or disk to a client
00029
00030     uses TCP or UDPServer,  so far only for D_CAM input.
00031     Catch images with the VideoSourve_Net class. <br>
00032     VideoSourceDisk takes the all images in the current dir.
00033     @autor grest Nov. 2005
00034 */
00035 class BIASVideoSource_EXPORT VideoServer :public BIAS::Debug {
00036 public:
00037   VideoServer(BIAS::Param &p);
00038   VideoServer();
00039
00040   ~VideoServer();
00041   int Init(int port=D_CS_DEFAULT_PORT);
00042
00043   int ProcessOneImage();
00044
00045   VideoSource *GetCamera() {return camera_;}
00046
00047   double GetFPS(){return (*camParam_)[0];}
00048
00049   BIAS::Camera<unsigned char> *GetSendImage(){return &SendImage_;}
00050
00051   inline unsigned int GetMessageSize() { return msgSize_; }
00052
00053 protected:
00054   void AddParams_(BIAS::Param &p);
00055
00056   // parameters
00057   bool ParamsAllocated_;
00058   int *port_;
00059   std::string *targetAddress_;
00060   BIAS::Vector<double> *camParam_;
00061   int *camType_, *imgWidth_, *imgHeight_, *jpeg_;
00062   double *resizeFactor_;
00063   int *UDPServerThrottle_;
00064   bool *useUDP_;
00065
00066
00067   VideoSource *camera_;
00068   BIAS::Camera<unsigned char> CamImage_;
00069   BIAS::Camera<unsigned char> SendImage_;
00070   bool Initialized_;
00071   std::ostringstream SendBuffer_;
00072   BIAS::Rescale<unsigned char,unsigned char> RescaleFilter_;
00073
00074   unsigned int msgSize_;
00075   //  bool *CompressedMode_;
00076   bool *compressionColor_;
00077   //  int *CompressionQuality_;
00078
00079   CScommServer server_;
00080
00081 #ifdef BIAS_HAVE_LIBJPEG
00082   JpegHandler Compressor_;
00083 #endif //BIAS_HAVE_LIBJPEG
00084
00085 private:
00086   // disabled copy-constructor
00087   VideoServer(const VideoServer &){};
00088    VideoServer &operator=(const VideoServer &) {return *this;};
00089
00090 }; // class VideoServer
00091
00092 } // namespace BIAS
00093
00094
00095 #endif
00096
00097
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoShMFeeder.cpp Source File

VideoSource

VideoShMFeeder.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include "VideoShMFeeder.hh"
00026 #include <Base/Common/BIASpragma.hh>
00027
00028 using namespace BIAS;
00029 using namespace std;
00030
00031 VideoShMFeeder::VideoShMFeeder()
00032 {
00033 #ifdef WIN32
00034   ShmContext_ = NULL;
00035   Mapping_ = NULL;
00036 #else
00037   ShmContext_ = 0;
00038 #endif
00039   MemoryLengthTotal_ = 0;
00040   DataLength_ = 0;
00041   Shm_ = NULL;
00042   Header_ = NULL;
00043   Data_ = NULL;
00044   bIsInitialized_ = false;
00045   FileName_ = "/VideoSource_Shm.shm";
00046 }
00047
00048
00049
00050 VideoShMFeeder::VideoShMFeeder(const string &filename)
00051 {
00052 #ifdef WIN32
00053   ShmContext_ = NULL;
00054   Mapping_ = NULL;
00055 #else
00056   ShmContext_ = 0;
00057 #endif
00058   MemoryLengthTotal_ = 0;
00059   DataLength_ = 0;
00060   Shm_ = NULL;
00061   Header_ = NULL;
00062   Data_ = NULL;
00063   bIsInitialized_ = false;
00064   FileName_ = filename;
00065 }
00066
00067
00068 VideoShMFeeder::~VideoShMFeeder()
00069 {
00070    bIsInitialized_ = false;
00071 #ifdef WIN32
00072     UnmapViewOfFile(Shm_);
00073     CloseHandle(Mapping_ );
00074   DeleteFile(FileName_.c_str());
00075 #else
00076   shm_unlink(FileName_.c_str());
00077 #endif
00078 }
00079
00080 bool VideoShMFeeder::Init_()
00081 {
00082
00083
00084   MemoryLengthTotal_ = DataLength_ + sizeof(VideoSource_Shm::ShmImageHeader);
00085
00086 #ifdef WIN32
00087   SYSTEM_INFO sSysInfo;
00088   GetSystemInfo( &sSysInfo );
00089   Granularity_ = sSysInfo.dwAllocationGranularity;
00090   while( long(MemoryLengthTotal_) > Granularity_ )
00091     Granularity_ += sSysInfo.dwAllocationGranularity;
00092   MemoryLengthTotal_ = Granularity_;
00093
00094   //check if file exists
00095   if( Mapping_ == NULL )
00096     Mapping_ = OpenFileMapping( FILE_MAP_ALL_ACCESS,FALSE,"VideoSource_Shm.shm");
00097
00098   if(Mapping_ == NULL)
00099     {
00100       HANDLE File_ = CreateFile("VideoSource_Shm.shm",GENERIC_WRITE
00101                 | GENERIC_READ,
00102                 FILE_SHARE_WRITE,NULL,CREATE_ALWAYS,
00103                 FILE_ATTRIBUTE_TEMPORARY,NULL );
00104       //create a new filemapping
00105       Mapping_= CreateFileMapping(File_,    // use paging file
00106                   NULL,                    // default security
00107                   PAGE_READWRITE,          // read/write access
00108                   0,                       // max. object size
00109                   // buffer size
00110                   Granularity_ + MemoryLengthTotal_,
00111                   "VideoSource_Shm.shm");  // name of mapping object
00112     }
00113   if (Mapping_ == NULL) {
00114     BIASERR("Failed to memory map file");
00115     return false;
00116   };
00117
00118   Shm_= (unsigned char*)MapViewOfFile(Mapping_,FILE_MAP_ALL_ACCESS,0,0,0);
00119
00120   if (Shm_ == NULL) {
00121     BIASERR("Failed to memory map file");
00122     return false;
00123   };
00124
00125 #else // win32
00126   ShmContext_ = shm_open(FileName_.c_str(),O_RDWR,S_IRWXU| S_IRWXG| S_IRWXO);
00127   if (ShmContext_ <0) {
00128     // cout <<"Creating new context"<<endl;
00129     ShmContext_ = shm_open(FileName_.c_str(),O_RDWR| O_CREAT,
00130             S_IRWXU| S_IRWXG| S_IRWXO);
00131   }
00132   // else cout <<"Using old context"<<endl;
00133
00134
00135   if (ShmContext_ <0) {
00136     BIASERR("Unable to create VideoSource_Shm.shm");
00137     return false;
00138   }
00139   int res;
00140   res = ftruncate(ShmContext_, MemoryLengthTotal_);
00141   if (res <0) {
00142     perror(FileName_.c_str());
00143     return -1;
00144   }
00145
00146   Shm_ = mmap(0,MemoryLengthTotal_, PROT_WRITE,MAP_SHARED, ShmContext_, 0 );
00147 #endif
00148
00149   //pointer to header
00150   Header_ = (VideoSource_Shm::ShmImageHeader*)Shm_;
00151   Header_->Time_=0;
00152   //pointer to data array behind header
00153   Data_ = (unsigned char*)Shm_ +sizeof(VideoSource_Shm::ShmImageHeader);
00154
00155   bIsInitialized_ = true;
00156   return true;
00157
00158 }
00159
00160
00161
00162 bool VideoShMFeeder::ProcessImage(BIAS::Camera<unsigned char> *Image)
00163 {
00164
00165   ImgBuffer_.clear();
00166   ImgBuffer_.str("");
00167   ImgBuffer_ <<*Image;
00168
00169   int size = ImgBuffer_.str().length();
00170   if (!bIsInitialized_) {
00171     DataLength_ = size;
00172     Init_();
00173   }
00174   BIASASSERT(size <=DataLength_);
00175
00176   Header_->Size_ = DataLength_;
00177
00178   memcpy(Data_,ImgBuffer_.str().c_str() ,Header_->Size_);
00179   //Set time != 0 to indicate new image data
00180   Header_->Time_ = Image->GetTime();
00181 //   cout <<"VideoShmFeeder: Header is: "<<setw(20)<<setprecision(20)
00182 //        <<Header_->Time_<<" , "<<Header_->Size_<<endl;
00183
00184   return true;
00185 }
00186
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoShMFeeder.hh Source File

VideoSource

VideoShMFeeder.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __VIDEOSHMFEEDER_HH__
00026 #define __VIDEOSHMFEEDER_HH__
00027
00028
00029
00030
00031 #ifdef WIN32
00032 #  define WIN32_LEAN_AND_MEAN       // Exclude rarely-used stuff from Windows headers
00033 #  include <windows.h>
00034 #else
00035 # include <sys/types.h>
00036 # include <sys/mman.h>
00037 #include <fcntl.h>
00038 #endif
00039
00040
00041 #include <sstream>
00042 #include <string>
00043
00044 // BIAS
00045 #include <Base/Debug/Debug.hh>
00046 #include <Base/Image/ImageIO.hh>
00047 #include <Image/Camera.hh>
00048
00049 // MIP
00050 #include <VideoSource/VideoSource_Shm.hh>
00051
00052
00053 namespace BIAS {
00054
00055 /** @class VideoShMFeeder
00056     @brief class to save Images to a Sharerd memory
00057
00058     @autor ischiller 2006
00059 */
00060 class BIASVideoSource_EXPORT VideoShMFeeder :public BIAS::Debug {
00061 public:
00062   VideoShMFeeder();
00063   VideoShMFeeder(const std::string &filename );
00064   ~VideoShMFeeder();
00065
00066   bool ProcessImage(BIAS::Camera<unsigned char> *Image);
00067
00068 protected:
00069   bool Init_();
00070
00071 #ifdef WIN32
00072   HANDLE                            ShmContext_; // _hFile
00073   HANDLE                            Mapping_;//! header describing the memory layout
00074   long int                          Granularity_;
00075 #else
00076   int                               ShmContext_;
00077 #endif
00078
00079   int                               MemoryLengthTotal_;
00080   int                               DataLength_;
00081   void                              *Shm_;
00082   VideoSource_Shm::ShmImageHeader   *Header_;
00083   std::stringstream                 ImgBuffer_;
00084   unsigned char                     *Data_;
00085   bool                              bIsInitialized_;
00086   std::string                       FileName_;
00087
00088 protected:
00089   /*!\brief prohibit default function (move to 'public' if needed) */
00090   VideoShMFeeder(const VideoShMFeeder &source);
00091   /*!\brief prohibit default function (move to 'public' if needed) */
00092   VideoShMFeeder& operator =(const VideoShMFeeder &source);
00093
00094 }; // class VideoShMFeeder
00095
00096 } // namespace MIP
00097
00098
00099 #endif
00100
00101
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Base.cpp Source File

VideoSource

VideoSource_Base.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <bias_config.h>
00026 #include "VideoSource_Base.hh"
00027 #include <Base/Image/ImageIO.hh>
00028 #include <Base/Image/ImageConvert.hh>
00029
00030 #include <Image/VideoStream.hh>
00031 #include <Image/Camera.hh>
00032
00033
00034 #include <Base/Common/BIASpragma.hh>
00035
00036 using namespace BIAS;
00037 using namespace std;
00038
00039
00040 // for O_APPEND
00041 #include <fcntl.h>
00042
00043 VideoSource::VideoSource():Debug()
00044 {
00045   Width_ = 0;
00046   Height_= 0;
00047   ColorChannels_ = 0;
00048   DeviceChannel_ = 0;
00049   BytesPerPixel_ = 1.0; // assume 8bpp as default
00050   CompleteInitialized_ = false;
00051   Active_ = false;
00052   Grabbing_ = false;
00053   DefaultDevice_ = NULL;
00054   GrabbingContinous_ = false;
00055   DirectToDisk_ = false;
00056   DtDFd_ = 0;
00057   DtDBuffer_ = NULL;
00058   DtDBufferSize_ = 0;
00059 }
00060
00061
00062 VideoSource::VideoSource(int card ):Debug()
00063 {
00064   Width_ = 0;
00065   Height_= 0;
00066   ColorChannels_ = 0;
00067   DeviceChannel_ = 0;
00068   BytesPerPixel_ = 1.0; // assume 8bpp as default
00069   CompleteInitialized_ = false;
00070   Active_ = false;
00071   Grabbing_ = false;
00072   DefaultDevice_ = NULL;
00073   GrabbingContinous_ = false;
00074   DirectToDisk_ = false;
00075   DtDFd_ = 0;
00076   DtDBuffer_ = NULL;
00077   DtDBufferSize_ = 0;
00078 }
00079
00080 VideoSource::~VideoSource()
00081 {
00082
00083 }
00084
00085
00086 void VideoSource::SetSize(int w, int h, int bytesperpixel)
00087 {
00088   Width_ = w;
00089   Height_ = h;
00090   BytesPerPixel_ = float(bytesperpixel);
00091 }
00092
00093 int VideoSource::SetColorModel(BIAS::ImageBase::EColorModel  mode)
00094 {
00095   ColorMode_ = mode;
00096   if (ColorMode_ == ImageBase::CM_BGR || ColorMode_ == ImageBase::CM_RGB)
00097     ColorChannels_ = 3;
00098   if (ColorMode_ == ImageBase::CM_YUYV422
00099       || ColorMode_ == ImageBase::CM_UYVY422
00100       || ColorMode_ == ImageBase::CM_YUV420P) ColorChannels_ = 2;
00101   if (ColorMode_ == ImageBase::CM_Grey) ColorChannels_ = 1;
00102   if (ColorMode_ == ImageBase::CM_Bayer_RGGB
00103       || ColorMode_ == ImageBase::CM_Bayer_GBRG
00104       || ColorMode_ == ImageBase::CM_Bayer_GRBG
00105       || ColorMode_ == ImageBase::CM_Bayer_BGGR) ColorChannels_ = 1;
00106   if (ColorMode_ == ImageBase::CM_RGBA
00107       || ColorMode_ == ImageBase::CM_BGRA)
00108     ColorChannels_ = 4;
00109   return 0;
00110 }
00111
00112 int VideoSource::InitImage(ImageBase &Image){
00113   if (!Image.IsEmpty())
00114     BIASERR("VideoSource::InitImage() should be called with uninitialized image");
00115
00116   ImageBase::EStorageType st = ImageBase::ST_unsignedchar;
00117
00118   if (BytesPerPixel_ == 2.0) {
00119     st = ImageBase::ST_unsignedshortint;
00120   }
00121   if (Image.GetStorageType() != ImageBase::ST_invalid){
00122     if (Image.GetStorageType() != st){
00123       BIASERR("invalid storage type");
00124       return -1;
00125     }
00126   }
00127
00128
00129   Image.Init(Width_, Height_, ColorChannels_, st);
00130   Image.SetColorModel(ColorMode_);
00131   return 0;
00132 }
00133
00134
00135 int VideoSource::PreGrab()
00136 {
00137   if (! CompleteInitialized_) {
00138     BIASERR("VideoSource::PreGrab() : Object not completely initialized");
00139     return -1;
00140   }
00141
00142   if (Active_) {
00143     BIASERR("VideoSource::PreGrab() : Object already active");
00144     return -1;
00145   }
00146
00147   Active_ = true;
00148
00149   return 0;
00150 }
00151
00152
00153
00154 int VideoSource::PostGrab()
00155 {
00156   Active_ = false;
00157   return 0;
00158 }
00159
00160 int VideoSource::StartGrabContinous()
00161 {
00162   cerr <<"VideoSource::StartGrabContinous() should not be called directly"
00163        <<endl;
00164   return -1;
00165 }
00166
00167 int VideoSource::StopGrabContinous()
00168 {
00169   cerr <<"VideoSource::StopGrabContinous() should not be called directly"
00170        <<endl;
00171   return -1;
00172 }
00173
00174
00175 // Virtaul functions , they should not be called nor implemented
00176
00177
00178 int VideoSource::OpenDevice()
00179 {
00180   cerr <<"VideoSource::OpenDevice() should not be called directly"<<endl;
00181   return -1;
00182 }
00183
00184 int VideoSource::OpenDevice(int device)
00185 {
00186   cerr <<"VideoSource::OpenDevice(int device) should not be called directly"<<endl;
00187   return -1;
00188 }
00189
00190 int VideoSource::OpenDevice(const char *f)
00191 {
00192   cerr <<"VideoSource::OpenDevice((const char *filename) should not be called directly"<<endl;
00193   return -1;
00194 }
00195
00196 int VideoSource::OpenDevice(string Prefix, string Postfix, int DigitCount, int PictureCount)
00197 {
00198   cerr <<"VideoSource::OpenDevice(string Prefix, string Postfix, int DigitCount, int PictureCount) should not be called directly"<<endl;
00199   return -1;
00200 }
00201
00202 int VideoSource::OpenDevice(const vector<string> &FileNames)
00203 {
00204   cerr <<"VideoSource::OpenDevice(vector<string> FileNames) should not be called directly"<<endl;
00205   return -1;
00206 }
00207
00208
00209 int VideoSource::ShowCapabilities()
00210 {
00211   cerr <<"VideoSource::ShowCapabilities() should not be called directly"<<endl;
00212   return -1;
00213 }
00214
00215 int VideoSource::ShowCapabilities(const char *f)
00216 {
00217   cerr <<"VideoSource::ShowCapabilities((const char *filename) should not be called directly"<<endl;
00218   return -1;
00219 }
00220
00221
00222
00223
00224 int VideoSource::CloseDevice()
00225 {
00226   cerr <<"VideoSource::CloseDevice() should not be called directly"<<endl;
00227   return -1;
00228 }
00229
00230
00231
00232
00233 int VideoSource::GrabSingle(Camera <unsigned char> &image)
00234 {
00235   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00236   return -1;
00237 }
00238
00239
00240 int VideoSource::GrabSingle(Camera <float> &image)
00241 {
00242   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00243   return -1;
00244 }
00245
00246 #ifdef BUILD_IMAGE_USHORT
00247 int VideoSource::GrabSingle(Camera <unsigned short int> &image)
00248 {
00249   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00250   return -1;
00251 }
00252 #endif
00253
00254 #ifdef BUILD_IMAGE_UINT
00255 int VideoSource::GrabSingle(Camera <unsigned int> &image)
00256 {
00257   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00258   return -1;
00259 }
00260 #endif
00261
00262 #ifdef BUILD_IMAGE_CHAR
00263 int VideoSource::GrabSingle(Camera <char> &image)
00264 {
00265   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00266   return -1;
00267 }
00268 #endif
00269
00270 #ifdef BUILD_IMAGE_SHORT
00271 int VideoSource::GrabSingle(Camera <short int> &image)
00272 {
00273   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00274   return -1;
00275 }
00276 #endif
00277
00278 #ifdef BUILD_IMAGE_INT
00279 int VideoSource::GrabSingle(Camera <int> &image)
00280 {
00281   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00282   return -1;
00283 }
00284 #endif
00285
00286 #ifdef BUILD_IMAGE_DOUBLE
00287 int VideoSource::GrabSingle(Camera <double> &image)
00288 {
00289   BIASERR("VideoSource::GrabSingle() should not be called, please overload");
00290   return -1;
00291 }
00292 #endif
00293
00294 int VideoSource::AutoMode(int a, bool b)
00295 {
00296   BIASERR("VideoSource::AutoMode() should not be called, please overload");
00297   return -1;
00298 }
00299
00300
00301 unsigned int VideoSource::GetFeature(int a)
00302 {
00303   BIASERR("VideoSource::GetFeature() should not be called, please overload");
00304   return 0;
00305 }
00306
00307  int VideoSource::SetFeature(int a, unsigned int b)
00308 {
00309   BIASERR("VideoSource::setFeature() should not be called, please overload");
00310   return -1;
00311 }
00312
00313
00314 int VideoSource::SetShutter(float exptime)
00315 {
00316   BIASERR("VideoSource::SetShutter() should not be called, please overload");
00317   return -1;
00318 }
00319
00320 int VideoSource::SetGain(float g)
00321 {
00322   BIASERR("VideoSource::SetGain() should not be called, please overload");
00323   return -1;
00324 }
00325
00326 float VideoSource::GetGain()
00327 {
00328   BIASERR("VideoSource::GetGain() should not be called, please overload");
00329   return -1;
00330 }
00331
00332 float VideoSource::GetShutter()
00333 {
00334   BIASERR("VideoSource::GetShutter() should not be called, please overload");
00335   return -1;
00336 }
00337 int VideoSource::OnePushAuto( int feature) {
00338   BIASERR("VideoSource::OnePushAuto() should not be called,please overload");
00339   return -1;
00340 }
00341 int VideoSource::SetWhiteBalance(float rvalue,float bvalue){
00342   BIASERR("VideoSource::SetWhiteBalance() should not be called,please overload");
00343   return -1;
00344 }
00345
00346
00347 int VideoSource::SoftwareWhiteBalance()
00348 {
00349   float rGain=0.0, bGain=0.0;
00350   int widthHalf, heightHalf;
00351   BIAS::Camera<unsigned char> img;
00352   Image<unsigned char> rgbimg;
00353   if (!CompleteInitialized_){
00354     OpenDevice();
00355   }
00356   InitImage(img);
00357   SetGain(0.0);
00358   GrabSingle(img);
00359   ImageConvert::ToRGB(img, rgbimg);
00360   widthHalf= img.GetWidth()/2;
00361   heightHalf = img.GetHeight()/2;
00362
00363   unsigned char mean[3];
00364   BIASASSERT(img.GetWidth()>=20 && img.GetHeight()>=20);
00365   rgbimg.GetROI()->SetCorners(widthHalf-10, heightHalf-10, widthHalf+10, heightHalf+10);
00366   rgbimg.GetMeanPixelValue(mean);
00367   int iterations = 0;
00368
00369   while(iterations <32)
00370     {
00371       BIASCDOUT(D_VS_WHITEB,"In videosource, SoftwarewhiteBalance pixel: "<<(int)mean[0]<<","<<(int)mean[1]<<","<<(int)mean[2]<<endl);
00372       if(mean[0] < mean[1])
00373         rGain +=1.0/32.0;
00374       else if(mean[0] > mean[1])
00375         rGain -=1.0/32.0;
00376
00377       if(mean[2] < mean[1])
00378         bGain +=1.0/32.0;
00379       else if(mean[2] > mean[1])
00380         bGain -=1.0/32.0;
00381       BIASCDOUT(D_VS_WHITEB, "rGain,bGain :"<<rGain<<","<<bGain<<endl);
00382       SetWhiteBalance(rGain,bGain);
00383       GrabSingle(img);
00384       ImageConvert::ToRGB(img, rgbimg);
00385       rgbimg.SetROI(widthHalf-10, heightHalf-10, widthHalf+10, heightHalf+10);
00386       rgbimg.GetMeanPixelValue(mean);
00387
00388       iterations++;
00389     }
00390
00391   return 0;
00392 }
00393
00394
00395 int VideoSource::SetDirectToDisk(const std::string &filename)
00396 {
00397   // open file
00398 #ifndef WIN32
00399   DtDFd_ = open(filename.c_str(),O_WRONLY | O_CREAT | O_DIRECT);
00400   //DtDFd_ = basic_filebuf::open(filename.c_str(),O_WRONLY | O_CREAT );
00401
00402   if (DtDFd_ <0) {
00403     BIASERR("Can not open/create file ");
00404     perror(filename.c_str());
00405     return -1;
00406   }
00407
00408   fchmod(DtDFd_,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
00409
00410   ImageSize_ = Width_ * Height_ * ColorChannels_;
00411   ImageSize_ = (unsigned int)rint(float(ImageSize_) * BytesPerPixel_);
00412   unsigned int required_space = ImageSize_ +sizeof(VideoStream::VSImageHeader);
00413   // allocate buffer
00414   if (DtDBufferSize_ < required_space) {
00415     if (DtDBuffer_ != NULL) free(DtDBuffer_);
00416     DtDBufferSize_ = 512;
00417     while (DtDBufferSize_ < required_space) DtDBufferSize_ +=512;
00418     cout <<"New DtDBuffer_ with size "<<DtDBufferSize_ <<endl;
00419     posix_memalign((void**)&DtDBuffer_, 512, DtDBufferSize_);
00420     if (DtDBuffer_ == NULL) {
00421       BIASERR("Can not posix_memalign()"<<DtDBufferSize_<<" bytes");
00422       return -1;
00423     }
00424   }
00425   BIASDOUT(D_DTD, "Width, height, channelcount, BpP: "<<Width_<<"x"<<Height_
00426        <<", "<<ColorChannels_<<", "<<BytesPerPixel_)
00427   BIASDOUT(D_DTD, "ImageSize:     "<<ImageSize_)
00428   BIASDOUT(D_DTD, "HeaderSize:    "<<sizeof(VideoStream::VSImageHeader))
00429   BIASDOUT(D_DTD, "DtDBufferSize: "<<DtDBufferSize_)
00430
00431   // set pointer for header and data
00432   DtDImageHeader_ = (VideoStream::VSImageHeader *)DtDBuffer_;
00433   DtDStartOfImage_ = DtDBuffer_ + sizeof(VideoStream::VSImageHeader);
00434
00435   // prepare and write header
00436   VideoStream::VSHeader *header;
00437   cout <<"Size of header: "<<sizeof(VideoStream::VSHeader)<<endl;
00438   posix_memalign((void**)&header, 512, sizeof(VideoStream::VSHeader));
00439   header->Width = Width_;
00440   header->Height = Height_;
00441   header->ChannelCount = ColorChannels_;
00442   header->ColorModel = ColorMode_;
00443   header->BytesPerPixel = (int)BytesPerPixel_; // this is wrong for DV
00444   if (BytesPerPixel_ == 2.0)
00445     header->StorageType=ImageBase::ST_unsignedshortint;
00446   else header->StorageType = ImageBase::ST_unsignedchar;
00447   header->AlignedSize = DtDBufferSize_;
00448
00449   int res = write(DtDFd_, header, sizeof(VideoStream::VSHeader));
00450   if (res <0) {
00451     BIASERR("Can not write to file with O_DIRECT: ");
00452     perror(filename.c_str());
00453     return -1;
00454   }
00455
00456
00457 #else
00458   BIASERR("SetDirectToDisk() not implemented for WIN32");
00459 #endif
00460   DirectToDisk_ = true;
00461   return 0;
00462 }
00463
00464 int VideoSource::WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid,
00465                   const long int &sec, const long int &usec)
00466 {
00467 #ifndef WIN32
00468   string uidstr;
00469   uuid.GetString(uidstr);
00470   DtDImageHeader_->tsec = sec;
00471   DtDImageHeader_->tusec = usec;
00472   memcpy(DtDImageHeader_->uuid, uidstr.c_str(), uidstr.length());
00473   memcpy(DtDStartOfImage_, data, ImageSize_);
00474
00475   unsigned int chunksize = 20 * 1024;
00476   unsigned int numchunks = DtDBufferSize_ / chunksize;
00477   unsigned int lastchunksize = DtDBufferSize_ % chunksize;
00478   if (lastchunksize>0) numchunks++;
00479
00480   cout <<"Chunk size: "<<chunksize<<endl;
00481   cout <<"Num chunks: "<<numchunks<<endl;
00482   cout <<"Last chunk: "<<lastchunksize<<endl;
00483
00484   unsigned int currentchunksize;
00485   for (unsigned int c=0; c<numchunks; c++) {
00486     currentchunksize = c==(numchunks-1) ? lastchunksize :chunksize ;
00487     int res = write(DtDFd_, DtDBuffer_, currentchunksize);
00488     if (res <0) {
00489       BIASERR("Can not write to file with O_DIRECT: ");
00490       return -1;
00491     }
00492   }
00493 #else
00494   BIASERR("WriteDirect() not implemented for WIN32");
00495 #endif
00496   return 0;
00497 }
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Base.hh Source File

VideoSource

VideoSource_Base.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __MIPVIDEOSOURCE_HH__
00026 #define __MIPVIDEOSOURCE_HH__
00027
00028 #include <bias_config.h>
00029
00030
00031 #include <vector>
00032 #include <Base/Image/Image.hh>
00033   //#include <Image/Camera.hh>
00034 #include <Image/VideoStream.hh>
00035
00036
00037 #define D_V4L  (1<<0)
00038 #define D_DCAM (1<<1)
00039 #define D_VSO_DISK (1<<2)
00040 #define D_DCAM_F7 (1<<3)
00041 #define D_DV (1<<4)
00042 #define D_VS_WHITEB (1<<5)
00043 #define D_NET (1<<6)
00044 #define D_DV2 (1<<8)
00045 #define D_DTD (1<<9)
00046
00047 namespace BIAS{
00048
00049   // forward declaration
00050   template <class T> class Camera;
00051
00052   /**
00053       \class VideoSource
00054       \ingroup VideoG
00055       \author evers
00056       \brief  Defines a common interface to different devices.
00057
00058       Specialized classes for each deviceclass should be derived and most methods
00059       have to be reimplemented.
00060
00061       Usage:
00062
00063       VideoSource *foo;
00064
00065       Image bar;
00066
00067
00068       /// assume to have a class for DCAM cams
00069       foo = new VideoSource_DCAM;
00070
00071       /// select a colormode with SetColorMode() if required
00072       //  the default colormode depends on the used Camera(kind of VideoSource)
00073
00074       // set a image size for grabbing foo->SetSize(width,height)
00075       foo->SetSize(768,576);
00076
00077       /// Want to take the second channel (what ever this means)
00078       foo->SetChannel(2);
00079
00080       /// take the first appropriate device
00081       foo->OpenDevice();
00082
00083       foo->InitImage(bar);
00084
00085       // do last preparations
00086       foo->PreGrab();
00087
00088       // get one frame
00089       foo->GrabSingle(bar);
00090
00091       // stop enetually running things (isochronous transfers for example)
00092       foo->PostGrab();
00093
00094       // clean up
00095       foo->CloseDevice();
00096
00097   */
00098
00099   class BIASVideoSource_EXPORT VideoSource :public BIAS::Debug{
00100
00101   public:
00102     VideoSource();
00103     VideoSource(int card);
00104     virtual ~VideoSource();
00105
00106     /**
00107        this simplest method to open a device selects the first available device
00108        E.g.: V4L: /dev/video0
00109        DCAM/DV : Card 0, first camera
00110     */
00111     virtual int OpenDevice();
00112
00113     /// a device name like "/dev/video1" can be specified here
00114     virtual int OpenDevice(const char *device);
00115
00116     /// a device number  can be specified here (DCAM) or port number (Net)
00117     virtual int OpenDevice(int device);
00118
00119     /** used in child class VideoSource_Disk */
00120     virtual int OpenDevice(std::string Prefix, std::string Postfix,
00121                            int DigitCount, int PictureCount);
00122
00123     /** used in child class VideoSource_Disk */
00124     virtual int OpenDevice(const std::vector<std::string> &FileNames);
00125
00126     virtual int CloseDevice();
00127
00128
00129     virtual int GrabSingle(BIAS::Camera <unsigned char> &image);
00130     virtual int GrabSingle(BIAS::Camera <float> &image);
00131 #ifdef BUILD_IMAGE_CHAR
00132     virtual int GrabSingle(BIAS::Camera <char> &image);
00133 #endif
00134 #ifdef BUILD_IMAGE_SHORT
00135     virtual int GrabSingle(BIAS::Camera <short int> &image);
00136 #endif
00137 #ifdef BUILD_IMAGE_INT
00138     virtual int GrabSingle(BIAS::Camera <int> &image);
00139 #endif
00140 #ifdef BUILD_IMAGE_USHORT
00141     virtual int GrabSingle(BIAS::Camera <unsigned short int> &image);
00142 #endif
00143 #ifdef BUILD_IMAGE_UINT
00144     virtual int GrabSingle(BIAS::Camera <unsigned int> &image);
00145 #endif
00146 #ifdef BUILD_IMAGE_DOUBLE
00147     virtual int GrabSingle(BIAS::Camera <double> &image);
00148 #endif
00149     /// Do last preparations before grabbing
00150     /** E.g.: start isochronous transfer
00151      */
00152     virtual int PreGrab();
00153
00154     /// Stop anythig started in PreGrab()
00155     virtual int PostGrab();
00156
00157     /** These functions are not inline to let other class overload them<br>
00158         But they are implemented for this class
00159         Must be used before OpenDevice() !
00160     */
00161     virtual void SetSize(int w, int h, int bytesperpixel=1);
00162
00163     /** Select colormodel to use
00164         Not all sources support all colormodels.
00165         Must be used before OpenDevice() !
00166     */
00167     virtual int SetColorModel(BIAS::ImageBase::EColorModel  mode);
00168
00169     /** Use channel to select one of many cameras on the same
00170         Must be used before OpenDevice() !
00171     */
00172     void SetChannel(int channel) { DeviceChannel_ = channel;};
00173
00174     /// Use channel to select one of many cameras on the same
00175     /**      Must be used before OpenDevice() ! */
00176     void SetFPS(float fps) { FramesPerSecond_ = fps;};
00177
00178     /**      Must be used before OpenDevice() ! */
00179     void SetBytesPerPixel(unsigned char bpp) { BytesPerPixel_ = (float) bpp;};
00180
00181     inline int GetWidth() { return Width_;};
00182
00183     inline int GetHeight() { return Height_;};
00184
00185     inline int GetColorChannels() {return ColorChannels_;};
00186
00187     inline BIAS::ImageBase::EColorModel  GetColorModel() {return ColorMode_;};
00188
00189     inline float GetBytesPerPixel() const { return BytesPerPixel_; }
00190
00191     /** Call this only after opening the device successfully
00192      */
00193     int InitImage(BIAS::ImageBase &Image);
00194
00195     /**
00196      * Use this method to learn something about the capabilities of the source
00197      *(only usefull for v4l-sources e.g. /dev/video0). The output is send to
00198      * stdout.
00199      */
00200     virtual int ShowCapabilities();
00201     virtual int ShowCapabilities(const char *device);
00202
00203
00204     /// Use this to enable/disable any automatic modes addressed via enums
00205     virtual int AutoMode(int, bool);
00206     inline int GetID(){return ID_;};
00207
00208     /** for V4L
00209      */
00210     virtual int StartGrabContinous();
00211
00212     virtual int StopGrabContinous();
00213
00214     inline bool IsGrabbingContinous()
00215     { return GrabbingContinous_; };
00216
00217     /// this function is used to control things like shutter, zoom...
00218     /** normaly, feature is an enum
00219      */
00220     virtual int  SetFeature( int feature, unsigned int value);
00221
00222     /// this function is used to query things like shutter, zoom...
00223     /** normaly, feature is an enum
00224      */
00225     virtual unsigned int GetFeature( int feature);
00226
00227     /* more convinient function to control camera parameter */
00228
00229     /// Set shutter (exposure time) to exptime in seconds
00230     virtual int SetShutter(float exptime);
00231
00232     /// Set gain to g with g[dB]
00233     virtual int SetGain(float g);
00234
00235     virtual float GetShutter();
00236     virtual float GetGain();
00237     virtual int OnePushAuto( int feature);
00238     /// range is [-1.0 , 1.0)
00239     virtual int SetWhiteBalance(float rvalue,float bvalue);
00240
00241     //sets the whitebalance to optimal value in software
00242     virtual int SoftwareWhiteBalance();
00243     /**
00244        this enables the very fast direct-to-disk mode.
00245        Use this _after_ OpenDevice() because the image size must be known.
00246        @author evers
00247     */
00248     int SetDirectToDisk(const std::string &filename);
00249
00250   protected:
00251
00252     int WriteDirect_(const unsigned char *data, const BIAS::UUID &uuid,
00253                      const long int &sec, const long int &usec);
00254
00255     int Width_;
00256     int Height_;
00257     int ColorChannels_;
00258     float FramesPerSecond_;
00259
00260     /// BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5
00261     float BytesPerPixel_;
00262
00263     char *DefaultDevice_;
00264
00265     int DeviceChannel_;
00266     BIAS::ImageBase::EColorModel ColorMode_;
00267
00268     /// Some state variables
00269
00270     /// Complete_initialized_ is set when OpenDevice(),
00271     // UseChannel() ... are done
00272     bool CompleteInitialized_;
00273
00274     /// active_ is set in PreGrab() und unset in PostGrab()
00275     bool Active_;
00276
00277     /// grabbing_ is set and unset in Grab*()
00278     bool Grabbing_;
00279
00280
00281     int ID_;
00282
00283     bool GrabbingContinous_;
00284
00285     bool DirectToDisk_;
00286     int DtDFd_; // DirectToDisk FIle decriptor
00287     // 512 byte aligned buffer, contains VSImageHeader and image data
00288     char *DtDBuffer_;
00289     // must be multiple of 512
00290     unsigned int DtDBufferSize_;
00291     unsigned int ImageSize_; // usefull for allocating and copying memory
00292     // this point to the beginning of DtDBuffer_
00293     BIAS::VideoStream::VSImageHeader *DtDImageHeader_;
00294     char *DtDStartOfImage_; // points into DtDBuffer after VSImageHeader
00295   };
00296
00297 }// namespace MIP
00298
00299 #endif
00300
00301
00302
00303
00304
00305
00306
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM.cpp Source File

VideoSource

VideoSource_DCAM.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <libdc1394/dc1394_control.h>
00026 #include "VideoSource_DCAM.hh"
00027 #include "sys/time.h"
00028 #include "unistd.h"
00029 #include <sys/stat.h>
00030
00031 using namespace BIAS;
00032
00033 using namespace std;
00034
00035 int VideoSource_DCAM::InstancesTotal_ = 0;
00036 int VideoSource_DCAM::Instances_[MAX_1394_CARDS];
00037 raw1394handle_t VideoSource_DCAM::IEEE1394Handle_[MAX_1394_CARDS];
00038 int VideoSource_DCAM::BytesPerCyle_[MAX_1394_CARDS];
00039
00040
00041
00042 int GetCamIDs(int busid ,int &ncams, int *&camids )
00043 {
00044   raw1394handle_t handle;
00045   nodeid_t  *dcam_nodes;
00046   dc1394_camerainfo dcaminfo;
00047
00048
00049   handle = dc1394_create_handle(busid);
00050   dcam_nodes = dc1394_get_camera_nodes(handle,&ncams,0);
00051
00052   camids = new int[ncams];
00053
00054
00055   for (int i=0; i<ncams; i++) {
00056     int res;
00057     res = dc1394_get_camera_info(handle, dcam_nodes[i],  &dcaminfo);
00058     camids[i] = (dcaminfo.euid_64 & 0x00000FFF);
00059   }
00060
00061
00062   raw1394_destroy_handle(handle);
00063   free(dcam_nodes);
00064
00065   return 0;
00066
00067
00068 }
00069
00070
00071
00072 VideoSource_DCAM::VideoSource_DCAM(int Card): VideoSource(Card)
00073 {
00074   IEEE1394Card_ = Card;
00075   SetDebugLevel(0);
00076   TransmissionTime_ = 0;
00077   UserTopLeft_ = false;
00078   UseBinning_ = false;
00079   Shift16_ = 0;
00080   DefaultDevice_ = "/dev/video1394/0";
00081   struct stat statbuf;
00082   stat("/dev/video1394",&statbuf);
00083   if (S_ISCHR(statbuf.st_mode)) DefaultDevice_ = "/dev/video1394";
00084   else
00085     if (S_ISDIR(statbuf.st_mode)) {
00086       stat("/dev/video1394/0",&statbuf);
00087       if (S_ISCHR(statbuf.st_mode)) DefaultDevice_ = "/dev/video1394/0";
00088       else
00089     BIASERR("/dev/video1394 is a directory, but /dev/video1394/0 is not "
00090         <<"a character device");
00091     }
00092     else
00093       BIASERR("/dev/video1394 is not a a character device nor a directory");
00094
00095   //   cout <<"Default Device: "<<DefaultDevice_<<endl;
00096
00097   if (IEEE1394Card_ > MAX_1394_CARDS) {
00098     BIASERR("VideoSource_DCAM::VideoSource_DCAM(int Card): requested card #"<<IEEE1394Card_<< " exceeds maximum of "<<MAX_1394_CARDS);
00099     return ;
00100   }
00101   if (InstancesTotal_ == 0) {
00102     BIASDOUT(D_DCAM,"Initializing Instances_[] and IEEE1394Handle_[]");
00103     for (int i=0; i<MAX_1394_CARDS; i++) {
00104       Instances_[i] = 0;
00105       IEEE1394Handle_[i] = NULL;
00106     }
00107   }
00108
00109   InstancesTotal_ ++;
00110   IEEE1394Card_= Card;
00111
00112   if ( Instances_[IEEE1394Card_] == 0) {
00113     // I am the first instance on this Card, so open now
00114     BIASDOUT(D_DCAM,"IEEE1394Card_: "<<IEEE1394Card_);
00115     IEEE1394Handle_[IEEE1394Card_] = dc1394_create_handle(IEEE1394Card_);
00116     if (IEEE1394Handle_[IEEE1394Card_] == NULL) {
00117       perror("dc1394 - couldn't get handle");
00118       BIASERR("This error usually means that the ieee1394 drivers are not loaded or that /dev/raw1394 or /dev/video1394 does not exist.\n");
00119       return ;
00120     }
00121     BytesPerCyle_[IEEE1394Card_] = 0;
00122   }
00123
00124   Instances_[IEEE1394Card_] ++;
00125
00126   BIASDOUT(D_DCAM,"I am the "<<InstancesTotal_<<". Instance, and the "<<Instances_[Card]<<". on card "<<IEEE1394Card_);
00127
00128
00129   SelectedCam_ = 0;
00130
00131   // New Default: Use DMA
00132   UseDMA_ = true;
00133
00134   char *usedmaenv;
00135   usedmaenv = getenv("DC1394_DMA");
00136   if (usedmaenv != NULL) {
00137     if (strcmp(usedmaenv,"false") == 0) {
00138       BIASDOUT(D_DCAM,"Using Non-DMA");
00139       UseDMA_ = false;
00140     }
00141     else
00142       cerr<<"Warning: Found environment variable DC1394_DMA set to: "<<usedmaenv<<". Only \"false\" would be valid. Using DMA anyway."<<endl;
00143   }
00144
00145   DcamMode_ = 0;
00146   DcamFormat_ = 0;
00147   DcamFps_ = FRAMERATE_7_5;
00148   FramesPerSecond_ = 7.5;
00149   ForceF7_ = false;
00150   DirectF7_ = false;
00151   ColorMode_ = ImageBase::CM_UYVY422;
00152   Width_ = 0;
00153   Height_ = 0;
00154   BytesPerPacket_ = 0;
00155   ColorChannels_ = 0;
00156
00157
00158 }
00159
00160 VideoSource_DCAM::~VideoSource_DCAM()
00161 {
00162   InstancesTotal_ --;
00163   Instances_[IEEE1394Card_] --;
00164   if (Instances_[IEEE1394Card_] == 0) {
00165     // I am the last instance on this card, so close the door
00166     raw1394_destroy_handle(IEEE1394Handle_[IEEE1394Card_]);
00167     BIASDOUT(D_DCAM,"I am the last Instance on this bus, so shutting the lights.");
00168   }
00169 }
00170
00171
00172 int VideoSource_DCAM::OpenDevice(int camid)
00173 {
00174   int numNodes;
00175   BIASDOUT(D_DCAM,"VideoSource_DCAM::OpenDevice("<<camid<<")");
00176
00177   // if constructor failed to initialize raw1394 then bail out
00178   if (IEEE1394Handle_[IEEE1394Card_] == NULL) return -1;
00179
00180
00181   numNodes = raw1394_get_nodecount(IEEE1394Handle_[IEEE1394Card_]);
00182   DcamNodes_ = dc1394_get_camera_nodes(IEEE1394Handle_[IEEE1394Card_],
00183                                        &NumCams_,0);
00184   BIASDOUT(D_DCAM,"Found "<<numNodes<<" nodes on the bus, thereof "<<NumCams_<<" DCAM-Cameras");
00185
00186   if (NumCams_<1)     {
00187     BIASERR(" no DCAM cameras found");
00188     raw1394_destroy_handle(IEEE1394Handle_[IEEE1394Card_]);
00189     return -1;
00190   }
00191
00192   if (camid == 0) {
00193     SelectedCam_ = 0;
00194     dc1394_get_camera_info(IEEE1394Handle_[IEEE1394Card_],
00195                            DcamNodes_[SelectedCam_],&DcamInfo_);
00196     ID_ = (DcamInfo_.euid_64 & 0x00000FFF);
00197     CamModel_ = GetModelForEuid(DcamInfo_.euid_64);
00198   } else {
00199     SelectedCam_ = -1;
00200     for (int i=0; i<NumCams_; i++) {
00201       int res;
00202       res = dc1394_get_camera_info(IEEE1394Handle_[IEEE1394Card_],
00203                                    DcamNodes_[i],&DcamInfo_);
00204       ID_ = (DcamInfo_.euid_64 & 0x00000FFF);
00205       if (ID_ == camid) {
00206         SelectedCam_ = i;
00207         CamModel_ = GetModelForEuid(DcamInfo_.euid_64);
00208         break;
00209       }
00210     }
00211     if (SelectedCam_ < 0) {
00212       BIASERR("Selected Camera "<<camid<<" not found.");
00213       return -1;
00214     }
00215   }
00216   BIASDOUT(D_DCAM,"Setting up camera "<<SelectedCam_<<" UID:"<<ID_);
00217
00218   QueryCam();
00219   if (!DirectF7_) {
00220     // check for usersize mode and try do set it or set the highest
00221     // mode as default
00222     if ((GetWidth() != 0) || (GetHeight()!=0) || UseBinning_){
00223       if ( UserSizeToMode() < 0) {
00224         BIASERR("UserSizeToMode() failed");
00225         return -1;
00226       }
00227     }
00228     else SelectDefault();
00229   }
00230   else BIASDOUT(D_DCAM,"Direct F7 requested from User, mode: "<<DcamMode_
00231                 - MODE_FORMAT7_MIN);
00232   return InitCam();
00233 }
00234
00235
00236
00237 int VideoSource_DCAM::OpenDevice()
00238 {
00239   return OpenDevice(0);
00240 }
00241
00242
00243
00244 int  VideoSource_DCAM::SetFormat7(int mode, int bpp, int colorchannels)
00245 {
00246   DcamFormat_  = FORMAT_SCALABLE_IMAGE_SIZE;
00247   DcamMode_ = mode + MODE_FORMAT7_MIN;
00248   BytesPerPacket_ = bpp;
00249   DirectF7_ = true;
00250   ColorChannels_ = colorchannels;
00251   return 0;
00252 }
00253
00254
00255
00256 int VideoSource_DCAM::CloseDevice()
00257 {
00258   if (UseDMA_)
00259     dc1394_dma_release_camera(IEEE1394Handle_[IEEE1394Card_],&DcamCapture_);
00260   else
00261     dc1394_release_camera(IEEE1394Handle_[IEEE1394Card_],&DcamCapture_);
00262   return 0;
00263 }
00264
00265
00266
00267
00268 int VideoSource_DCAM::UseChannel(int channel)
00269 {
00270   IEEE1394Card_ = channel;
00271   return 0;
00272 }
00273
00274
00275 int VideoSource_DCAM::GrabSingle(Camera <unsigned char> &image)
00276 {
00277   int res;
00278   BIASDOUT(D_DCAM,"VideoSource_DCAM::GrabSingle("<<SelectedCam_<<")");
00279   assert(! image.IsEmpty());
00280   if (!Active_) {
00281     BIASERR("VideoSource_DCAM::GrabSingle(): VideoSource Object not active, use PreGrab()");
00282     return -1;
00283   }
00284   if (Grabbing_) {
00285     BIASERR("VideoSource_DCAM::GrabSingle(): VideoSource Object is already grabbing()");
00286     return -1;
00287   }
00288   Grabbing_ = true;
00289   if (UseDMA_)
00290 //     res = dc1394_dma_multi_capture(&DcamCapture_,1);
00291      res = dc1394_dma_single_capture(&DcamCapture_);
00292   else
00293     res = dc1394_single_capture(IEEE1394Handle_[IEEE1394Card_],&DcamCapture_);
00294   if (res != DC1394_SUCCESS)    {
00295     BIASERR("VideoSource_DCAM::GrabSingle(): unable to capture one frame from camera");
00296     return -1;
00297   }
00298 //   cout <<DcamCapture_.frame_width<<" x "<<DcamCapture_.frame_height<<endl;
00299   image.SetTime(DcamCapture_.filltime.tv_sec,DcamCapture_.filltime.tv_usec);
00300
00301   image.CopyIn_NoInit((unsigned char *)DcamCapture_.capture_buffer);
00302
00303   image.InvalidateUID();
00304   image.SetUID(UUID::GenerateUUID());
00305 //   if (DirectToDisk_)
00306 //     cerr<<"DirectToDisk is on "<<endl;
00307 //     WriteDirect_((unsigned char *)DcamCapture_.capture_buffer, image.GetUID(),
00308 //       DcamCapture_.filltime.tv_sec,DcamCapture_.filltime.tv_usec);
00309
00310   if (UseDMA_)
00311     dc1394_dma_done_with_buffer(&DcamCapture_);
00312   Grabbing_ = false;
00313   return 0;
00314 }
00315
00316
00317 #ifdef BUILD_IMAGE_USHORT
00318 int VideoSource_DCAM::GrabSingle(BIAS::Camera <unsigned short> &image)
00319 {
00320   int res;
00321   BIASDOUT(D_DCAM,"VideoSource_DCAM::GrabSingle("<<SelectedCam_<<")");
00322   assert(! image.IsEmpty());
00323   if (!Active_) {
00324     BIASERR("VideoSource_DCAM::GrabSingle(): VideoSource Object not active, use PreGrab()");
00325     return -1;
00326   }
00327   if (Grabbing_) {
00328     BIASERR("VideoSource_DCAM::GrabSingle(): VideoSource Object is already grabbing()");
00329     return -1;
00330   }
00331   Grabbing_ = true;
00332   if (UseDMA_)
00333 //     res = dc1394_dma_multi_capture(&DcamCapture_,1);
00334      res = dc1394_dma_single_capture(&DcamCapture_);
00335   else
00336     res = dc1394_single_capture(IEEE1394Handle_[IEEE1394Card_],&DcamCapture_);
00337   if (res != DC1394_SUCCESS)    {
00338     BIASERR("VideoSource_DCAM::GrabSingle(): unable to capture one frame from camera");
00339     return -1;
00340   }
00341   image.SetTime(DcamCapture_.filltime.tv_sec,DcamCapture_.filltime.tv_usec);
00342
00343   unsigned int numbytes = image.GetSize();
00344 // byte-wise pointer
00345   unsigned char *idata = (unsigned char *)image.GetImageData();
00346   unsigned char *buf = (unsigned char *)DcamCapture_.capture_buffer;
00347   for (unsigned int i=0;i<numbytes; i+=2){
00348     idata[i] = buf[i+1];
00349     idata[i+1] = buf[i];
00350     // the significant bits used by point grey are the 16-Shift16_  upper bits
00351     // cast pixel pointer to unsigned short and apply shift
00352     *(unsigned short *)(&idata[i]) = (*(unsigned short *)(&idata[i])) >>Shift16_;
00353   }
00354
00355   //   image.CopyIn_NoInit((unsigned char *)DcamCapture_.capture_buffer);
00356   if (UseDMA_)
00357     dc1394_dma_done_with_buffer(&DcamCapture_);
00358   Grabbing_ = false;
00359   image.InvalidateUID();
00360   return 0;
00361 }
00362 #endif
00363
00364
00365 void VideoSource_DCAM::ActivateScorpionTimestamp()
00366 {
00367   quadlet_t r12F8 = 0x80000001;//activate only timestamp, read Tech Reference
00368   SetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00369                DcamNodes_[SelectedCam_], 0x12f8, r12F8);
00370 }
00371
00372
00373
00374 int VideoSource_DCAM::PreGrab()
00375 {
00376   BIASDOUT(D_DCAM,"VideoSource_DCAM::PreGrab("<<SelectedCam_<<")");
00377
00378   if (! CompleteInitialized_ )
00379     if (InitCam() <0) return -1;
00380
00381   if (BytesPerCyle_[IEEE1394Card_] + BytesPerPacket_ >4096) {
00382     BIASERR("unable to start iso transfer for camera "<<SelectedCam_
00383        <<"\n\tBytesPerCyle_ exceeds maximum of 4096 for card #"
00384        <<IEEE1394Card_);
00385
00386     return -1;
00387   }
00388
00389   BytesPerCyle_[IEEE1394Card_] += BytesPerPacket_;
00390   BIASDOUT(D_DCAM,"BytesPerCyle_["<<IEEE1394Card_<<"]: "<<BytesPerCyle_[IEEE1394Card_]);
00391
00392 //   quadlet_t r0614;
00393
00394 //   GetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00395 //             DcamNodes_[SelectedCam_], 0x0614, &r0614);
00396 //   cout <<"0x614 before StartIso(): "<<r0614<<endl;
00397     if (StartIso() <0) return -1;
00398
00399 //   GetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00400 //             DcamNodes_[SelectedCam_], 0x0614, &r0614);
00401 //   cout <<"0x614 after StartIso(): "<<(r0614)<<endl;
00402
00403 //   r0614 = r0614 | 1;
00404 //   cout <<"0x614 to be set: "<<r0614<<endl;
00405 //    SetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00406 //             DcamNodes_[SelectedCam_], 0x0614, r0614);
00407 //   GetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00408 //             DcamNodes_[SelectedCam_], 0x0614, &r0614);
00409 //   cout <<"0x614 after set: "<<(r0614)<<endl;
00410
00411   Active_ = true;
00412   return 0;
00413 }
00414
00415
00416 int VideoSource_DCAM::PostGrab()
00417 {
00418   int res;
00419   BIASDOUT(D_DCAM,"VideoSource_DCAM::PostGrab("<<SelectedCam_<<")");
00420   Active_ = false;
00421
00422   res = StopIso();
00423
00424   BytesPerCyle_[IEEE1394Card_] -= BytesPerPacket_;
00425   BIASDOUT(D_DCAM,"BytesPerCyle_["<<IEEE1394Card_<<"]: "<<BytesPerCyle_[IEEE1394Card_]);
00426
00427   return res;
00428 }
00429
00430
00431 int VideoSource_DCAM::QueryCam()
00432 {
00433   int res;
00434   quadlet_t SuppForm;
00435   quadlet_t SuppModes;
00436
00437   quadlet_t Suppfps;
00438
00439   BIASDOUT(D_DCAM,"VideoSource_DCAM::QueryCam("<<SelectedCam_<<")");
00440
00441   dc1394_get_camera_feature_set(IEEE1394Handle_[IEEE1394Card_], DcamNodes_[SelectedCam_],
00442                 &DcamFeatures_);
00443
00444   // First, query for supported formats,
00445   // then query each format for supported modes
00446   // finally, query each format/mode for supported framerates
00447
00448   res = dc1394_query_supported_formats(IEEE1394Handle_[IEEE1394Card_],DcamNodes_[SelectedCam_]
00449                        , &SuppForm);
00450
00451   SupportedFormats_[0] = SuppForm & (0x1<<31);
00452   SupportedFormats_[1] = SuppForm & (0x1<<30);
00453   SupportedFormats_[2] = SuppForm & (0x1<<29);
00454   SupportedFormats_[3] = false;
00455   SupportedFormats_[4] = false;
00456   SupportedFormats_[5] = false;
00457   SupportedFormats_[6] = SuppForm & (0x1<<25);
00458   SupportedFormats_[7] = SuppForm & (0x1<<24);
00459
00460   // now query the modes
00461   for (int format=0; format < NUM_FORMATS; format++) {
00462     if (SupportedFormats_[format]) {
00463       dc1394_query_supported_modes(IEEE1394Handle_[IEEE1394Card_],
00464                    DcamNodes_[SelectedCam_],
00465                    FORMAT_VGA_NONCOMPRESSED+ format,
00466                    &SuppModes);
00467       for (int i=0; i<NUM_FORMAT1_MODES; i++)
00468     SupportedModes_[format][i] = SuppModes & (0x1<<(31-i));
00469     }
00470     else
00471       for (int i=0; i<NUM_FORMAT1_MODES; i++)
00472     SupportedModes_[format][i] =false;
00473   }
00474   // dont query format7 for fps, it is specified via bytes_per_packet
00475   for (int format=0; format < NUM_FORMATS-1; format++)
00476     for (int i=0; i<NUM_FORMAT1_MODES; i++){
00477       if (SupportedModes_[format][i]) {
00478     res = dc1394_query_supported_framerates(IEEE1394Handle_[IEEE1394Card_],
00479                         DcamNodes_[SelectedCam_],
00480                         FORMAT_VGA_NONCOMPRESSED+ format,
00481                         64 +i,
00482                         &Suppfps);
00483
00484     if (res >=0)  SupportedFramerates_[format][i] = Suppfps;
00485     else SupportedFramerates_[format][i] = 0;
00486     //cout <<"F"<<format<<"M"<<i<<": "<<SupportedFramerates_[format][i]<<endl;
00487       }
00488       else
00489     SupportedFramerates_[format][i] = 0;
00490     }
00491
00492   if ( (GetDebugLevel() & D_DCAM)>0)
00493     ShowCapabilities();
00494
00495   if (  SupportedFormats_[7]) {
00496     dc1394_query_format7_max_image_size(IEEE1394Handle_[IEEE1394Card_],
00497                     DcamNodes_[SelectedCam_],
00498                     MODE_FORMAT7_0, &MaxWidth_,
00499                     &MaxHeight_);
00500     dc1394_query_format7_unit_size(IEEE1394Handle_[IEEE1394Card_],
00501                    DcamNodes_[SelectedCam_],
00502                    MODE_FORMAT7_0,
00503                    &UnitWidth_,&UnitHeight_);
00504
00505     BIASDOUT(D_DCAM_F7," Format7 max:  "<<MaxWidth_<<" x "<<MaxHeight_);
00506     BIASDOUT(D_DCAM_F7," Format7 unit: "<<UnitWidth_<<" x "<<UnitHeight_);
00507     BIASDOUT(D_DCAM_F7," Format7 Bytes per Packet: "<<MinBpP_<<" - "<<MaxBpP_);
00508   }
00509
00510   dc1394bool_t ispresent = DC1394_FALSE;
00511   for (int i=FEATURE_MIN; i<FEATURE_MAX+1; i++) {
00512     dc1394_is_feature_present(IEEE1394Handle_[IEEE1394Card_],
00513                   DcamNodes_[SelectedCam_], i,
00514                   &ispresent);
00515     if (ispresent) SupportedFeature_[i-FEATURE_MIN] = true;
00516     else SupportedFeature_[i-FEATURE_MIN] = false;
00517   }
00518
00519
00520   // to determine the version, this indicats >=0.9.3
00521 #ifdef DC1394_NO_FRAME
00522
00523   if (CamModel_ == CAMERA_PTGREY_SCORPION_COLOR_1600
00524       || CamModel_ == CAMERA_PTGREY_DRAGONFLY_COLOR) {
00525     quadlet_t r1040;
00526     GetCameraControlRegister(IEEE1394Handle_[IEEE1394Card_],
00527                  DcamNodes_[SelectedCam_], 0x1040, &r1040);
00528 //     unsigned char BayerSense_A = r1040  & 0xF;
00529 //     cout <<"R1040h: "<<hex<<r1040<<dec<<endl;
00530 //     cout <<"BayerA: "<<BayerSense_A<<endl;
00531   }
00532 #endif
00533
00534
00535   return 0;
00536
00537 }
00538
00539
00540
00541
00542 int VideoSource_DCAM::ShowCapabilities()
00543 {
00544   cout <<"Camera: "<<SelectedCam_<<" UID:"
00545        <<(DcamInfo_.euid_64 & 0x00000FFF)<<endl;
00546
00547   //    dc1394_print_feature_set(&DcamFeatures_);
00548
00549
00550   cout <<"Supported Formats: ";
00551   for (int i=0; i<NUM_FORMATS; i++)
00552     if (SupportedFormats_[i])
00553       cout <<"Format"<<i<<" ";
00554   cout <<endl;
00555
00556   cout <<"Suported Modes:"<<endl;
00557   for (int i=0; i<NUM_FORMATS; i++)
00558     if (SupportedFormats_[i]) {
00559       cout <<"Format"<<i<<": ";
00560       for (int j=0; j<NUM_FORMAT1_MODES; j++)
00561         if (SupportedModes_[i][j])
00562           cout <<"Mode"<<j<<" ";
00563
00564       cout <<endl;
00565
00566     }
00567
00568   cout <<"Supported Framerates:"<<endl;
00569   for (int format=0; format < NUM_FORMATS; format++) {
00570     int fps;
00571
00572     cout <<" Format"<<format<<": ";
00573     for (int i=0; i<NUM_FORMAT1_MODES; i++)
00574       if ((fps = SupportedFramerates_[format][i]) >0) {
00575         cout <<"Mode"<<i<<":  ";
00576         for (int f=0; f<NUM_FRAMERATES; f++)
00577           if (fps & (0x1<< (31-f) ))
00578             cout <<1.875 *(0x1<<f)<<"  ";
00579
00580       }
00581
00582     cout <<endl;
00583   }
00584
00585
00586   return 0;
00587
00588 }
00589
00590
00591
00592
00593
00594 int VideoSource_DCAM::SelectDefault()
00595 {
00596   BIASDOUT(D_DCAM,"VideoSource_DCAM::SelectDefault("<<SelectedCam_<<")");
00597
00598   int best_m= 0;
00599   int best_f = 0;
00600   int fps;
00601   float best_fps = -1.0;
00602
00603   // For 8bpp only scan mode 0-5, because 6&7 are Mono16 modes
00604
00605   int ModeLimit = (BytesPerPixel_ == 1.0) ? 6 : NUM_FORMAT1_MODES;
00606
00607   // find the best mode (not in Format7)
00608   for (int f=0; f<3; f++)
00609     for (int m=0; m<ModeLimit; m++)
00610       if (SupportedModes_[f][m]){
00611     best_f = f;
00612     best_m = m;
00613     if ((fps = SupportedFramerates_[f][m]) >0) {
00614       for (int f=0; f<NUM_FRAMERATES; f++)
00615         if (fps & (0x1<< (31-f) ))
00616           best_fps = 1.875 *(0x1<<f);
00617     }
00618       }
00619
00620   switch (best_f) {
00621   case 0:  // Format 0
00622     DcamFormat_ = FORMAT_VGA_NONCOMPRESSED;
00623     switch (best_m) {
00624     case 0:  // F0 Mode 0
00625       DcamMode_ = MODE_160x120_YUV444;
00626       Width_ = 160; Height_ = 120; ColorMode_ = ImageBase::CM_YUV444;
00627       break;
00628     case 1:  // F0 Mode 1
00629       DcamMode_ = MODE_320x240_YUV422;
00630       Width_ = 320; Height_ = 240; ColorMode_ = ImageBase::CM_UYVY422;
00631       break;
00632     case 2:  // F0 Mode 2
00633       DcamMode_ = MODE_640x480_YUV411;
00634       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_YUV411;
00635       break;
00636     case 3:  // F0 Mode 3
00637       DcamMode_ = MODE_640x480_YUV422;
00638       ColorChannels_ = 2;
00639       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_UYVY422;
00640       break;
00641     case 4:  // F0 Mode 4
00642       DcamMode_ = MODE_640x480_RGB;
00643       ColorChannels_ = 3;
00644       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_RGB;
00645       break;
00646     case 5:  // F0 Mode 5
00647       DcamMode_ = MODE_640x480_MONO;
00648       ColorChannels_ = 1;
00649       Width_ = 640; Height_ = 480;
00650       break;
00651     case 6:     // F0 Mode 6
00652       DcamMode_ = MODE_640x480_MONO16;
00653       ColorChannels_ = 1;
00654       Width_ = 640; Height_ = 480;
00655       break;
00656     }
00657
00658     break;
00659   case 1:   // Format 1
00660     DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00661     switch (best_m) {
00662     case 0: // F1 Mode 0
00663       DcamMode_ = MODE_800x600_YUV422;
00664       ColorChannels_ = 2;
00665       Width_ = 800; Height_ = 600;  ColorMode_ = ImageBase::CM_UYVY422;
00666       break;
00667     case 1: // F1 Mode 1
00668       DcamMode_ = MODE_800x600_RGB;
00669       ColorChannels_ = 3;
00670       Width_ = 800; Height_ = 600;  ColorMode_ = ImageBase::CM_RGB;
00671       break;
00672     case 2: // F1 Mode 2
00673       DcamMode_ = MODE_800x600_MONO;
00674       ColorChannels_ = 1;
00675       Width_ = 800; Height_ = 600;
00676       break;
00677     case 3:   // F1 Mode 3
00678       DcamMode_ = MODE_1024x768_YUV422;
00679       ColorChannels_ = 2;
00680       Width_ = 1024; Height_ = 768;  ColorMode_ = ImageBase::CM_UYVY422;
00681       break;
00682     case 4: // F1 Mode 4
00683       DcamMode_ = MODE_1024x768_RGB;
00684       ColorChannels_ = 3;
00685       Width_ = 1024; Height_ = 768;  ColorMode_ = ImageBase::CM_RGB;
00686       break;
00687     case 5: // F1 Mode 5
00688       DcamMode_ = MODE_1024x768_MONO;
00689       ColorChannels_ = 1;
00690       Width_ = 1024; Height_ = 768;
00691       break;
00692     case 6: // F1 Mode 6
00693       DcamMode_ = MODE_800x600_MONO16;
00694       Width_ = 800; Height_ = 600;
00695       break;
00696     case 7: // F1 Mode
00697       DcamMode_ = MODE_1024x768_MONO16;
00698       Width_ = 1024; Height_ = 768;
00699       ColorChannels_ = 1;
00700       BytesPerPixel_ = 2.0;
00701       break;
00702     }
00703
00704     break;
00705   case 2: // Format 2
00706     DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_2;
00707     switch (best_m) {
00708     case 0:
00709       DcamMode_ = MODE_1280x960_YUV422;
00710       ColorChannels_ = 2;
00711       Width_ = 1280; Height_ = 960;  ColorMode_ = ImageBase::CM_UYVY422;
00712       break;
00713     case 1:
00714       DcamMode_ = MODE_1280x960_RGB;
00715       ColorChannels_ = 3;
00716       Width_ = 1280; Height_ = 960;  ColorMode_ = ImageBase::CM_RGB;
00717       break;
00718     case 2:
00719       DcamMode_ = MODE_1280x960_MONO;
00720       ColorChannels_ = 1;
00721       Width_ = 1280; Height_ = 960;
00722       break;
00723     case 3:
00724       DcamMode_ = MODE_1600x1200_YUV422;
00725       ColorChannels_ = 2;
00726       Width_ = 1600; Height_ = 1200;  ColorMode_ = ImageBase::CM_UYVY422;
00727       break;
00728     case 4:
00729       DcamMode_ = MODE_1600x1200_RGB;
00730       ColorChannels_ = 3;
00731       Width_ = 1600; Height_ = 1200;  ColorMode_ = ImageBase::CM_RGB;
00732       break;
00733     case 5:
00734       DcamMode_ = MODE_1600x1200_MONO;
00735       ColorChannels_ = 1;
00736       Width_ = 1600; Height_ = 1200;
00737       break;
00738     case 6:
00739       DcamMode_ = MODE_1280x960_MONO16;
00740       ColorChannels_ = 1;
00741       Width_ = 1280; Height_ = 960;
00742       break;
00743     case 7:
00744       DcamMode_ = MODE_1600x1200_MONO16;
00745       ColorChannels_ = 1;
00746       Width_ = 1600; Height_ = 1200;
00747       break;
00748     }
00749     break;
00750   }
00751
00752   // PtGrey Scorpion does not provide supported framerates, so take 7.5
00753   FramesPerSecond_ = best_fps >0.0 ? best_fps : 7.5;
00754
00755
00756   BIASDOUT(D_DCAM,"Best F:"<<best_f<<" m:"<<best_m<<" : "<<Width_<<"x"<<Height_
00757        <<" at "<<FramesPerSecond_<<"fps"<<" Colormodel: "<<ColorMode_);
00758   return 0;
00759 }
00760
00761 #define USE_NATIVE_XGA
00762
00763 int VideoSource_DCAM::UserSizeToMode()
00764 {
00765   BIASDOUT(D_DCAM,"VideoSource_DCAM::UserSizeToMode("<<SelectedCam_<<"): "<<Width_<<"x"<<Height_<<" BytesPerPixel_: "<<BytesPerPixel_<<" ColorMode "<<ColorMode_);
00766
00767   if (BytesPerPixel_ == 1.0) {
00768     if (ColorMode_ == ImageBase::CM_UYVY422) {
00769       ColorChannels_ = 2;
00770       if (!ForceF7_ ) {
00771     if (Width_ == 1600 && Height_ == 1200) {
00772       DcamMode_ = MODE_1600x1200_YUV422;
00773       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00774     }
00775     else if (Width_ == 1280 && Height_ == 960) {
00776       DcamMode_ = MODE_1280x960_YUV422;
00777       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00778     }
00779     else if (Width_ == 1024 && Height_ == 768) {
00780       DcamMode_ = MODE_1024x768_YUV422;
00781       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00782       BIASDOUT(D_DCAM,"Using native XGA");
00783
00784     }
00785     else if (Width_ == 800 && Height_ == 600) {
00786       DcamMode_ = MODE_800x600_YUV422;
00787       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00788     }
00789     else if (Width_ == 640 && Height_ == 480) {
00790       DcamMode_ = MODE_640x480_YUV422;
00791       DcamFormat_ = FORMAT_VGA_NONCOMPRESSED;
00792     }
00793     else if (Width_ == 320 && Height_ == 240) {
00794       DcamMode_ = MODE_320x240_YUV422;
00795       DcamFormat_ = FORMAT_VGA_NONCOMPRESSED;
00796     }
00797     else  // Format 7 required, check for size be multiple of Unit??
00798       UserSizeToFormat7_();
00799       }
00800       else   UserSizeToFormat7_();
00801     }
00802     else if (ColorMode_ == ImageBase::CM_Grey
00803          ||ColorMode_ == ImageBase::CM_Bayer_RGGB
00804          || ColorMode_ == ImageBase::CM_Bayer_GBRG
00805          || ColorMode_ == ImageBase::CM_Bayer_GRBG
00806          || ColorMode_ == ImageBase::CM_Bayer_BGGR ) {
00807       ColorChannels_ = 1;
00808       if (!ForceF7_ ) {
00809     if (Width_ == 1600 && Height_ == 1200) {
00810       DcamMode_ = MODE_1600x1200_MONO;
00811       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_2;
00812     }
00813     else if (Width_ == 1024 && Height_ == 768) {
00814       DcamMode_ = MODE_1024x768_MONO;
00815       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00816     }
00817     else if (Width_ == 1280 && Height_ == 960) {
00818       DcamMode_ = MODE_1280x960_MONO;
00819       DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00820     }
00821
00822     else if (Width_ == 640 && Height_ == 480 &&
00823          CamModel_!=CAMERA_PTGREY_DRAGONFLY_HIRES) {
00824       DcamMode_ = MODE_640x480_MONO;
00825       DcamFormat_ = FORMAT_VGA_NONCOMPRESSED;
00826       BIASDOUT(D_DCAM,"Format "<<FORMAT_VGA_NONCOMPRESSED<<" Mode: "
00827            <<" 640x480_MONO");
00828     }
00829     else UserSizeToFormat7_();
00830       }
00831       else UserSizeToFormat7_();
00832     }
00833     else {
00834       BIASERR("VideoSource_DCAM::UserSizeToMode(): Unsupported ColoModel_"
00835               <<ColorMode_);
00836       return -1;
00837     }
00838   }
00839   else if (BytesPerPixel_ == 2.0) { // two bytes, one channel
00840     if (ColorMode_ == ImageBase::CM_Grey
00841         ||ColorMode_ == ImageBase::CM_Bayer_RGGB
00842         || ColorMode_ == ImageBase::CM_Bayer_GBRG
00843         || ColorMode_ == ImageBase::CM_Bayer_GRBG
00844         || ColorMode_ == ImageBase::CM_Bayer_BGGR ) {
00845       if (Width_ == 640 && Height_ == 480) {
00846         ColorChannels_ = 1;
00847         DcamMode_ = MODE_640x480_MONO16;
00848         DcamFormat_ = FORMAT_VGA_NONCOMPRESSED;
00849         BIASDOUT(D_DCAM,"Format "<<FORMAT_VGA_NONCOMPRESSED<<" Mode: "
00850                  <<" 640x480_MONO16");
00851       } else
00852         if (Width_ == 1024 && Height_ == 768) {
00853           ColorChannels_ = 1;
00854           DcamMode_ = MODE_1024x768_MONO16;
00855           DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_1;
00856           BIASDOUT(D_DCAM,"Format "<<FORMAT_VGA_NONCOMPRESSED<<" Mode: "
00857                    <<" 1024x768_MONO16");
00858         }
00859         else if (Width_ == 1280 && Height_ == 960) {
00860           ColorChannels_ = 1;
00861           DcamMode_ = MODE_1280x960_MONO16;
00862           DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_2;
00863         }
00864         else if (Width_ == 1600 && Height_ == 1200) {
00865           ColorChannels_ = 1;
00866           DcamMode_ = MODE_1600x1200_MONO16;
00867           DcamFormat_ = FORMAT_SVGA_NONCOMPRESSED_2;
00868         }
00869
00870         else {
00871           BIASERR("VideoSource_DCAM::UserSizeToMode(): "<<Width_<<"x "<<Height_
00872                   <<" not supported");
00873           return -1;
00874         }
00875     }
00876     else {
00877       BIASERR("VideoSource_DCAM::UserSizeToMode(): Unsupported ColoModel_ for 16bpp:"<<ColorMode_);
00878       return -1;
00879     }
00880   }
00881   else {
00882     BIASERR("VideoSource_DCAM::UserSizeToMode(): "<<BytesPerPixel_*8
00883             <<" -bit not yet impl");
00884   }
00885   //PrintFormatAndMode_(); cout<<endl;
00886   return 0;
00887
00888 }
00889
00890
00891 unsigned int VideoSource_DCAM::CalcBytesPerPacket()
00892 {
00893   unsigned int BpP=0;
00894   unsigned int QuadletsPerPacket;
00895
00896   int QuadletsPerFrame ;
00897   double TransmissionTimePerFrame;
00898   double MaxCyclesPerFrame;
00899   unsigned int CyclesPerFrame;
00900
00901   if (FramesPerSecond_ == 0.0){
00902     BIASERR("VideoSource_DCAM::CalcBytesPerPacket(): FramesPerSecond_ is 0!")
00903       return 0;
00904   }
00905
00906
00907   dc1394_query_format7_packet_para(IEEE1394Handle_[IEEE1394Card_],
00908                    DcamNodes_[SelectedCam_],
00909                    MODE_FORMAT7_0,
00910                    &MinBpP_, &MaxBpP_);
00911
00912   BIASDOUT(D_DCAM_F7,"MinBpP: "<<MinBpP_<<" MaxBpP: "<<MaxBpP_);
00913
00914   QuadletsPerFrame = Width_ * Height_ * ColorChannels_ / 4;
00915   // time to transmit one frame to reach this fps in [ms]
00916   float fps = FramesPerSecond_;
00917   // evil hack to let 15 fps work
00918   if (fps>14.9 && fps < 20.0) fps += 2.0;
00919   TransmissionTimePerFrame = 1000.0/fps;
00920   // each 125usec one packet is transmitted
00921   MaxCyclesPerFrame = TransmissionTimePerFrame / 0.125;
00922   CyclesPerFrame = (int)MaxCyclesPerFrame;
00923
00924
00925
00926   QuadletsPerPacket = QuadletsPerFrame / CyclesPerFrame;
00927 //    cout <<"QuadletsPerPacket: "<<QuadletsPerPacket<<endl;
00928
00929   while ((QuadletsPerFrame % QuadletsPerPacket)!=0) {
00930     CyclesPerFrame--;
00931     QuadletsPerPacket = QuadletsPerFrame /CyclesPerFrame;
00932   }
00933
00934
00935    BIASDOUT(D_DCAM_F7,"FramesPerSecond: "<<FramesPerSecond_);
00936    BIASDOUT(D_DCAM_F7,"TransmissionTimePerFrame: "<<TransmissionTimePerFrame);
00937    BIASDOUT(D_DCAM_F7,"MaxCyclesPerFrame: "<<MaxCyclesPerFrame);
00938    BIASDOUT(D_DCAM_F7,"CyclesPerFrame: "<<CyclesPerFrame);
00939    BIASDOUT(D_DCAM_F7,"QuadletsPerFrame: "<<QuadletsPerFrame);
00940    BIASDOUT(D_DCAM_F7,"QuadletsPerPacket: "<<QuadletsPerPacket);
00941    BIASDOUT(D_DCAM_F7,"Resulting theoretical fps: "
00942          <<1000/((float)CyclesPerFrame * 0.125));
00943   BpP = QuadletsPerPacket * 4;
00944   if ( BpP < MinBpP_)  BytesPerPacket_ = MinBpP_;
00945   else if (BpP> MaxBpP_) BytesPerPacket_ = MaxBpP_;
00946   else  BytesPerPacket_ = BpP;
00947
00948
00949
00950   return 0;
00951 }
00952
00953
00954
00955 int  VideoSource_DCAM::ApplyBytesPerPacket()
00956 {
00957   unsigned int realbpp;
00958
00959   dc1394_set_format7_byte_per_packet(IEEE1394Handle_[IEEE1394Card_],
00960                      DcamNodes_[SelectedCam_],
00961                      MODE_FORMAT7_0,BytesPerPacket_);
00962   usleep(10000);
00963   dc1394_query_format7_byte_per_packet(IEEE1394Handle_[IEEE1394Card_],
00964                        DcamNodes_[SelectedCam_],
00965                        DcamMode_, &realbpp);
00966
00967   TransmissionTime_ =(int) (((Width_*Height_*ColorChannels_)/realbpp) * 0.125);
00968   BIASDOUT(D_DCAM_F7,"requested BpP: "<< BytesPerPacket_ <<" got BpP: "<<realbpp
00969       <<" TransmissionTime_: "<<TransmissionTime_<<" ms")
00970     BytesPerPacket_ = realbpp;
00971
00972   return 0;
00973 }
00974
00975
00976
00977
00978
00979
00980
00981
00982
00983
00984 int VideoSource_DCAM::InitCam()
00985 {
00986   BIASDOUT(D_DCAM,"VideoSource_DCAM::InitCam("<<SelectedCam_<<")");
00987   if (DcamFormat_ == 0) {
00988     BIASERR("VideoSource_DCAM::InitCam() : no Format/mode selected");
00989     return -1;
00990   }
00991   StopIso();
00992
00993   if (FramesPerSecond_ == 30.0) DcamFps_ = FRAMERATE_30;
00994   if (FramesPerSecond_ == 15.0) DcamFps_ = FRAMERATE_15;
00995   if (FramesPerSecond_ == 7.5) DcamFps_ = FRAMERATE_7_5;
00996   if (FramesPerSecond_ == 3.75) DcamFps_ = FRAMERATE_3_75;
00997   if (FramesPerSecond_ == 1.875) DcamFps_ = FRAMERATE_1_875;
00998   if (DcamFps_ == 0) {
00999     BIASERR("VideoSource_DCAM::InitCam(): Framerate "<<FramesPerSecond_
01000             <<" not supported");
01001     return -1;
01002   }
01003   BIASDOUT(D_DCAM,"VideoSource_DCAM::InitCam(): Framerate "<<FramesPerSecond_);
01004   DcamIsoChannel_ = SelectedCam_;
01005
01006
01007   int res;
01008   if (DcamFormat_ == FORMAT_SCALABLE_IMAGE_SIZE) {
01009     if (BytesPerPacket_ == 0 )
01010         if (CalcBytesPerPacket()<0)   return -1;
01011     if (UseDMA_) {
01012       DcamDMABuffers_ = MAX_DMABUFFERS;
01013       DcamCapture_.drop_frames = 1;
01014       res = dc1394_dma_setup_format7_capture(IEEE1394Handle_[IEEE1394Card_],
01015                                              DcamNodes_[SelectedCam_],
01016                                              DcamIsoChannel_, DcamMode_,
01017                                              SPEED_400, BytesPerPacket_,
01018                                              Left_, Top_,
01019                                              Width_, Height_,
01020                          DcamDMABuffers_,
01021                          //  0, // extra buffering
01022 // to determine the version, this indicats >=0.9.3
01023 #ifdef DC1394_NO_FRAME
01024                          1, // Drop frames
01025                          DefaultDevice_,
01026 #endif
01027                          &DcamCapture_);
01028
01029       if (res !=DC1394_SUCCESS) {
01030         BIASERR("Can not set DCAM Camera to requested parameters "<<res);
01031       }
01032       else {
01033     unsigned width, height;
01034     dc1394_query_format7_image_size(IEEE1394Handle_[IEEE1394Card_],
01035                     DcamNodes_[SelectedCam_],
01036                     DcamMode_, &width, &height);
01037     Width_=width;
01038     Height_=height;
01039     BIASDOUT(D_DCAM,"Format 7 result: "<<Width_<<"x"<<Height_);
01040       }
01041     } else {
01042       res = dc1394_setup_format7_capture(IEEE1394Handle_[IEEE1394Card_],
01043                      DcamNodes_[SelectedCam_],
01044                      DcamIsoChannel_, DcamMode_,
01045                      SPEED_400, BytesPerPacket_,
01046                      Left_, Top_,
01047                      Width_, Height_,
01048                      &DcamCapture_);
01049
01050       if (res !=DC1394_SUCCESS) {
01051         BIASERR("Can not set DCAM Camera to requested parameters "<<res);
01052       }
01053     }
01054     ApplyBytesPerPacket( );
01055
01056   } else { // setup one standard mode
01057     if (UseDMA_) {
01058       DcamDMABuffers_ = MAX_DMABUFFERS;
01059       res = dc1394_dma_setup_capture(IEEE1394Handle_[IEEE1394Card_],
01060                                      DcamNodes_[SelectedCam_],
01061                                      DcamIsoChannel_,
01062                                      DcamFormat_, DcamMode_, SPEED_400,
01063                                      DcamFps_, DcamDMABuffers_,
01064                      //  0, // extra buffering
01065                                      1, // DropFrames parameter
01066                                      DefaultDevice_,
01067                                      &DcamCapture_);
01068       //       cout <<"hier fehlt setbytesperpacket()"<<endl;
01069       //       cout <<DcamCapture_.
01070       BytesPerPacket_ = 0;
01071       if (res !=DC1394_SUCCESS)
01072         BIASERR("Can not set DCAM Camera to requested parameters ");
01073
01074     } else {
01075       res = dc1394_setup_capture(IEEE1394Handle_[IEEE1394Card_],
01076                                  DcamNodes_[SelectedCam_],
01077                                  DcamIsoChannel_,
01078                                  DcamFormat_, DcamMode_, SPEED_400,
01079                                  DcamFps_, &DcamCapture_);
01080       if (res !=DC1394_SUCCESS)
01081         BIASERR("Can not set DCAM Camera to requested parameters ");
01082
01083     }
01084   }
01085   // PrintFormatAndMode_(); cout <<endl;
01086   if (res !=DC1394_SUCCESS) {
01087     return -1;
01088   }
01089   CompleteInitialized_ = true;
01090   return 0;
01091
01092 }
01093
01094
01095 int VideoSource_DCAM::StopIso()
01096 {
01097   int res;
01098
01099   //  dc1394bool_t  iso_is_on;
01100
01101 //      dc1394_get_iso_status(handle, dcam_cam[i].node, &iso_is_on);
01102 //      if (iso_is_on) cout<<"Iso is on"<<endl;
01103 //      else cout << "Iso is off"<<endl;
01104
01105   res =dc1394_stop_iso_transmission(IEEE1394Handle_[IEEE1394Card_],DcamNodes_[SelectedCam_]);
01106
01107   if (res !=DC1394_SUCCESS){
01108     BIASERR("couldn't stop ISO ");
01109     return -1;
01110   }
01111
01112 //        dc1394_get_iso_status(handle, dcam_cam[i].node, &iso_is_on);
01113 //        if (iso_is_on) cout<<"Iso is on"<<endl;
01114 //        else cout << "Iso is off"<<endl;
01115
01116   return 0;
01117 }
01118
01119
01120
01121 int VideoSource_DCAM::StartIso()
01122 {
01123   int res;
01124   int trial;
01125
01126   dc1394bool_t  iso_is_on;
01127   BIASDOUT(D_DCAM,"VideoSource_DCAM::StartIso("<<SelectedCam_<<")")
01128   dc1394_get_iso_status(IEEE1394Handle_[IEEE1394Card_],DcamNodes_[SelectedCam_], &iso_is_on);
01129   trial = 1;
01130
01131   while (!iso_is_on) {
01132     res =dc1394_start_iso_transmission(IEEE1394Handle_[IEEE1394Card_],DcamNodes_[SelectedCam_]);
01133     if (res !=DC1394_SUCCESS){
01134       BIASERR("couldn't start ISO");
01135       return -1;
01136     }
01137     dc1394_get_iso_status(IEEE1394Handle_[IEEE1394Card_],DcamNodes_[SelectedCam_],&iso_is_on);
01138   }
01139
01140   return 0;
01141 }
01142
01143
01144 int VideoSource_DCAM::AutoMode( int feature, bool on)
01145 {
01146   int res;
01147 //    cout <<"Cam "<<ID_<<" AutoMode: "<<feature<<" : "<<on<<endl;
01148     res = dc1394_auto_on_off(IEEE1394Handle_[IEEE1394Card_],
01149                  DcamNodes_[SelectedCam_],feature,
01150                  on );
01151     if (res <0) {
01152       BIASERR("VideoSource_DCAM::AutoMode(): "<<dc1394_feature_desc[feature]);
01153       return -1;
01154     }
01155
01156     return 0;
01157
01158 }
01159
01160
01161 int VideoSource_DCAM::OnePushAuto( int feature)
01162 {
01163   int res;
01164   if(CamModel_ == CAMERA_PTGREY_DRAGONFLY_COLOR
01165      && feature == FEATURE_WHITE_BALANCE)
01166   {
01167     SoftwareWhiteBalance();
01168   }
01169   else
01170   {
01171     res = dc1394_start_one_push_operation(IEEE1394Handle_[IEEE1394Card_],
01172                                           DcamNodes_[SelectedCam_],feature);
01173     if (res <0) {
01174     BIASERR("VideoSource_DCAM::OnePushAuto(): "<<dc1394_feature_desc[feature]);
01175       return -1;
01176     }
01177   }
01178   return 0;
01179 }
01180
01181
01182
01183 bool VideoSource_DCAM::OnePushRunning(int feature)
01184 {
01185   int res;
01186   dc1394bool_t isrunning = DC1394_TRUE;
01187   res = dc1394_is_one_push_in_operation(IEEE1394Handle_[IEEE1394Card_],
01188                     DcamNodes_[SelectedCam_],feature,
01189                       &isrunning);
01190   if (res <0)
01191     return -1;
01192   else
01193     return isrunning;
01194 }
01195
01196
01197
01198
01199 int VideoSource_DCAM::ExternalTrigger(bool on)
01200 {
01201   int res =0;
01202   if (on) {
01203     Trigger_ = TRIGGER_MODE_0;
01204     BIASDOUT(D_DCAM,"Triggermode: 0 (extern)");
01205     res = dc1394_set_trigger_on_off(IEEE1394Handle_[IEEE1394Card_],
01206                     DcamNodes_[SelectedCam_],
01207                     DC1394_TRUE);
01208   }
01209   else {
01210     Trigger_ = TRIGGER_MODE_3;
01211     BIASDOUT(D_DCAM,"Triggermode: 3  (intern)");
01212 //      res = dc1394_set_trigger_on_off(IEEE1394Handle_[IEEE1394Card_],
01213 //                      DcamNodes_[SelectedCam_],
01214 //                      DC1394_FALSE);
01215   }
01216
01217
01218   res = dc1394_set_trigger_mode(IEEE1394Handle_[IEEE1394Card_],
01219                 DcamNodes_[SelectedCam_], Trigger_);
01220
01221
01222     if (res != DC1394_SUCCESS)    {
01223       BIASERR("unable to set camera "<<ID_<<" to trigger mode ");
01224           return -1;
01225     }
01226
01227   return 0;
01228
01229 }
01230
01231
01232
01233 unsigned int VideoSource_DCAM::GetFeature(int feature)
01234 {
01235   unsigned int value;
01236   if (SupportedFeature_[feature-FEATURE_MIN])
01237     dc1394_get_feature_value(IEEE1394Handle_[IEEE1394Card_], DcamNodes_[SelectedCam_],
01238                  feature,&value);
01239   else {
01240     BIASERR("Feature "<<feature<<" not supported by camera "<<ID_);
01241     return 0;
01242
01243   }
01244
01245   return value;
01246 }
01247
01248
01249 int VideoSource_DCAM::SetFeature(int feature, unsigned int value)
01250 {
01251   if (SupportedFeature_[feature-FEATURE_MIN]) {
01252 //      cout <<"Setting cam "<<ID_<<" Feature: "<<feature<<" to "<<value<<endl;
01253     dc1394_set_feature_value(IEEE1394Handle_[IEEE1394Card_],
01254                  DcamNodes_[SelectedCam_],
01255                  feature,value);
01256   } else {
01257     BIASERR("Feature "<<feature<<" not supported by camera "<<ID_);
01258 //     BIASASSERT(false);
01259     return -1;
01260   }
01261
01262   return 0;
01263 }
01264
01265
01266 int VideoSource_DCAM::SetLeftTop(unsigned int left, unsigned int top)
01267 {
01268   if (left<=(MaxWidth_ - Width_) && top <=(MaxHeight_ - Height_)) {
01269     Top_ = top;
01270     Left_ = left;
01271     UserTopLeft_ = true;
01272   }
01273   else {
01274     BIASERR("VideoSource_DCAM::SetLeftTop() values too large:"<<left<<"x"<<top)
01275     return -1;
01276   }
01277
01278   if (DcamMode_ == MODE_FORMAT7_0 ) {
01279      dc1394_set_format7_image_position(IEEE1394Handle_[IEEE1394Card_],
01280                     DcamNodes_[SelectedCam_],DcamMode_,
01281                     Left_,  Top_);
01282     }
01283
01284        BIASDOUT(D_DCAM_F7,"New F7 Pos: "<<Left_<<"x"<<Top_);
01285
01286   return 0;
01287 }
01288
01289
01290
01291 // exptime is given in seconds JW)
01292 int VideoSource_DCAM::SetShutter(float exptime)
01293 {
01294   int value=0;
01295   switch (CamModel_) {
01296   case CAMERA_SONY_DFW_X700:
01297 // old and not correct
01298 //     if (exptime <=2.0 && exptime >=(1.0/15) )
01299 //       value = 0x800 - (int)(15 * exptime);
01300 //     else
01301 //       if (exptime <(1.0/15) && exptime >=(1.0/8361) )
01302 //  value = (int) (2848.4 - 11962.0 * exptime);
01303 //       else {
01304 //  BIASERR("Exposuretime out of bounds: "<<exptime);
01305     if ((exptime <= 16.05120063) && (exptime >= 0.13376))
01306       value = 2049 - int(round(exptime*28636363.0/(1197.0*800.0*2.0)));
01307     else
01308       if ((exptime <=  0.13376) && (exptime > 0.067)){
01309         value = 2048;
01310       } else if ((exptime <= 0.067) && (exptime >= 0.00012)) {
01311         value = (int) (2848.4 - round(28636363.0 * exptime / (1197.0*2.0)));
01312       } else if ((exptime <= 0.00012) && (exptime >= 0.00004)) {
01313         value = 2848;
01314       } else {
01315         BIASERR("Exposuretime out of bounds: "<<exptime);
01316         return -1;
01317       }
01318     break;
01319   case CAMERA_SONY_DFW_V500:
01320      if (exptime <=5.0 && exptime >=(1.0/30) )
01321        value =  0x800 - (int)(30 * exptime);
01322      else
01323       if (exptime <(1.0/30) && exptime >=(1.0/10000.0) )
01324     value = (int) (2573.6 - 15734.3 * exptime);
01325       else {
01326     BIASERR("Exposuretime out of bounds: "<<exptime);
01327     return -1;
01328       }
01329     break;
01330   case CAMERA_PTGREY_DRAGONFLY_BW:
01331   case CAMERA_PTGREY_SCORPION_COLOR_1600:
01332   case CAMERA_PTGREY_DRAGONFLY_HIRES:
01333   case CAMERA_PTGREY_DRAGONFLY_COLOR:
01334     // to determine the version, this indicats >=0.9.3
01335 #ifdef DC1394_NO_FRAME
01336     dc1394_absolute_setting_on_off(IEEE1394Handle_[IEEE1394Card_],
01337                    DcamNodes_[SelectedCam_], FEATURE_SHUTTER,
01338                    1);
01339     dc1394_set_absolute_feature_value(IEEE1394Handle_[IEEE1394Card_],
01340                       DcamNodes_[SelectedCam_],
01341                       FEATURE_SHUTTER,exptime);
01342     return 0;
01343 #endif
01344     break;
01345   default:
01346     BIASERR("Sorry your Camera Model is not supported.");
01347     value = -1;
01348   }
01349   if (value >0)
01350     return SetFeature(FEATURE_SHUTTER, value);
01351   else
01352     return -1;
01353
01354 }
01355
01356
01357 float VideoSource_DCAM::GetShutter()
01358 {
01359   float exptime=0.0;
01360   int shutter;
01361
01362   shutter = GetFeature(FEATURE_SHUTTER);
01363   switch (CamModel_) {
01364     // see technical ,manual. p. 27 (JW)
01365   case CAMERA_SONY_DFW_X700:
01366 // buggy fctn.
01367 //     if (shutter<0x800)
01368 //       exptime = ( (float)(shutter-2048) / 15.0 );
01369 //     else
01370 //       if (shutter <2848)
01371 //  exptime =( (float)(shutter-2848.4)/-11962.0 );
01372 //       else
01373 //  exptime= 2.0;
01374 //     break;
01375     if (shutter<2048)
01376       exptime = ( (float)(2048-shutter+1) * (1197.0*800.0*2.0)
01377                   / (28.636363*1000000.0) );
01378     else
01379       // OK, linear dependency to intensity (apetersen, jw 11/2004)
01380       if (shutter <2848)
01381         exptime =( (2848.4 - float(shutter)) * (1197.0*2.0)
01382                    / (28.636363*1000000.0) );
01383       else
01384         exptime= 50.0/1000000.0;
01385     break;
01386   case CAMERA_SONY_DFW_V500:
01387     if (shutter<0x800)
01388       exptime = ( (float)(shutter-2048) / 30.0 );
01389     else
01390       exptime =( (float)(shutter-2573.6)/-15734.3 );
01391     break;
01392   case CAMERA_PTGREY_DRAGONFLY_BW:
01393   case CAMERA_PTGREY_SCORPION_COLOR_1600:
01394   case CAMERA_PTGREY_DRAGONFLY_HIRES:
01395   case CAMERA_PTGREY_DRAGONFLY_COLOR:
01396     {
01397     // to determine the version, this indicats >=0.9.3
01398 #ifdef DC1394_NO_FRAME
01399
01400       dc1394_query_absolute_feature_value(IEEE1394Handle_[IEEE1394Card_],
01401                 DcamNodes_[SelectedCam_], FEATURE_SHUTTER, &exptime);
01402 #endif
01403     }
01404     break;
01405   default:
01406     exptime = -1.0;
01407   }
01408
01409   return exptime;
01410 }
01411
01412
01413
01414 int VideoSource_DCAM::SetGain(float gain) // gain is in dB
01415 {
01416   int value;
01417   int min;
01418   int max;
01419   int res = 0;
01420   switch (CamModel_ ) {
01421   case CAMERA_SONY_DFW_X700:
01422     min = 0x800;
01423     max = 0x8b4;
01424     value =  min + (int) (gain*(float)(max-min));
01425     res = SetFeature(FEATURE_GAIN,value);
01426     break;
01427   case CAMERA_SONY_DFW_V500:
01428     min = 0x00;
01429     max = 0x12;
01430     value =  min + (int) (gain*(float)(max-min));
01431     res = SetFeature(FEATURE_GAIN,value);
01432     break;
01433   case CAMERA_PTGREY_DRAGONFLY_BW:
01434   case CAMERA_PTGREY_SCORPION_COLOR_1600:
01435   case CAMERA_PTGREY_DRAGONFLY_HIRES:
01436   case CAMERA_PTGREY_DRAGONFLY_COLOR:
01437     // to determine the version, this indicats >=0.9.3
01438 #ifdef DC1394_NO_FRAME
01439     dc1394_absolute_setting_on_off(IEEE1394Handle_[IEEE1394Card_],
01440                    DcamNodes_[SelectedCam_], FEATURE_GAIN,
01441                    1);
01442     dc1394_set_absolute_feature_value(IEEE1394Handle_[IEEE1394Card_],
01443                       DcamNodes_[SelectedCam_], FEATURE_GAIN,
01444                       gain);
01445     break;
01446 #endif
01447   default:
01448     return -1;
01449     break;
01450   }
01451   return res;
01452 }
01453
01454
01455
01456 float VideoSource_DCAM::GetGain()
01457 {
01458   int value;
01459   int min;
01460   int max;
01461   float gain=0.0; // gain is in dB
01462
01463   switch (CamModel_ ) {
01464   case CAMERA_SONY_DFW_X700:
01465     min = 0x800;
01466     max = 0x8b4;
01467     value = GetFeature(FEATURE_GAIN);
01468     cout<<"Value in GetGain from GetFeature(...) :"<<value<<endl;;
01469     gain = (float)(value-min) / (float)(max-min);
01470     // translate gain to dB
01471     break;
01472   case CAMERA_SONY_DFW_V500:
01473     min = 0x00;
01474     max = 0x12;
01475     value = GetFeature(FEATURE_GAIN);
01476     cout<<"Value in GetGain from GetFeature(...) :"<<value<<endl;;
01477     gain = (float)(value-min) / (float)(max-min);
01478     // translate gain to dB
01479     break;
01480   case CAMERA_PTGREY_DRAGONFLY_BW:
01481   case CAMERA_PTGREY_SCORPION_COLOR_1600:
01482   case CAMERA_PTGREY_DRAGONFLY_HIRES:
01483   case CAMERA_PTGREY_DRAGONFLY_COLOR:
01484         // to determine the version, this indicats >=0.9.3
01485 #ifdef DC1394_NO_FRAME
01486       dc1394_query_absolute_feature_value(IEEE1394Handle_[IEEE1394Card_],
01487                       DcamNodes_[SelectedCam_],
01488                       FEATURE_GAIN, &gain);
01489 #endif
01490     break;
01491   default:
01492     gain = -1.0;
01493     break;
01494   }
01495   return gain;
01496
01497 }
01498
01499 int VideoSource_DCAM::SetGammaMode(unsigned char g)
01500 {
01501   int res;
01502   res =SetFeature(FEATURE_GAMMA,g +128);
01503   if (res <0) return res;
01504   return 0;
01505 }
01506
01507 unsigned char VideoSource_DCAM::GetGammaMode()
01508 {
01509   int value;
01510   value = GetFeature(FEATURE_GAMMA);
01511   return value - 128;
01512 }
01513
01514
01515
01516 int VideoSource_DCAM::SetWhiteBalance(float rvalue,float bvalue)
01517 {
01518   unsigned int ibval=0,irval=0;
01519   switch (CamModel_) {
01520   case CAMERA_SONY_DFW_X700:
01521     BIASERR("SetWB() for sony not impl.");
01522     return -1;
01523     break;
01524   case CAMERA_SONY_DFW_V500:
01525     BIASERR("SetWB() for sony not impl.");
01526     break;
01527   case CAMERA_PTGREY_DRAGONFLY_COLOR:
01528     ibval = (unsigned int)rint(bvalue*32)+32;
01529     irval = (unsigned int)rint(rvalue*32)+32;
01530     if (ibval >63) ibval=63;
01531     if (irval >63) irval=63;
01532     if (ibval <0) ibval=0;
01533     if (irval <0) irval=0;
01534     //cerr << irval <<", "<<ibval<<endl;
01535     break;
01536   default:
01537     BIASERR("unknown CamModel_: "<<CamModel_);
01538     return -5;
01539     break;
01540   }
01541   return (dc1394_set_white_balance(IEEE1394Handle_[IEEE1394Card_],
01542                                     DcamNodes_[SelectedCam_], ibval, irval)
01543           ==DC1394_SUCCESS)?(0):(-2);
01544 }
01545
01546
01547
01548
01549 int  VideoSource_DCAM::SetCamera(CameraParameterSet camparam)
01550 {
01551   int res=0;
01552   BIASDOUT(D_DCAM,"Entering SetCamera()");
01553
01554   if (camparam.AutoShutterChanged) {
01555     res = AutoMode(FEATURE_SHUTTER, camparam.AutoShutter);
01556     if (res <0) return res;
01557   }
01558   if (camparam.AutoGainChanged) {
01559     res =AutoMode(FEATURE_GAIN, camparam.AutoGain);
01560     if (res <0) return res;
01561   }
01562   if (camparam.AutoWhiteBalanceChanged) {
01563     res =AutoMode(FEATURE_WHITE_BALANCE, camparam.AutoWhiteBalance);
01564     if (res <0) return res;
01565   }
01566
01567   if (camparam.ShutterChanged) {
01568     res = SetShutter(camparam.Shutter);
01569     if (res <0) return res;
01570   }
01571   if (camparam.GainChanged)  {
01572     res = SetGain(camparam.Gain);
01573     if (res <0) return res;
01574   }
01575   if (camparam.WhiteBalanceChanged)  {
01576     res =SetFeature(FEATURE_WHITE_BALANCE,camparam.WhiteBalance);
01577     if (res <0) return res;
01578   }
01579   if (camparam.SharpenChanged)  {
01580     res =SetFeature(FEATURE_SHARPNESS,camparam.Sharpen);
01581     if (res <0) return res;
01582   }
01583   if (camparam.GammaModeChanged) {
01584     res =SetGammaMode(camparam.GammaMode);
01585     if (res <0) return res;
01586   }
01587   if (camparam.OpticalFilterChanged) {
01588     // double the call, to cope with ignorant cams
01589     res =SetFeature(FEATURE_OPTICAL_FILTER,camparam.OpticalFilter);
01590    res =SetFeature(FEATURE_OPTICAL_FILTER,camparam.OpticalFilter);
01591     if (res <0) return res;
01592   }
01593   if (camparam.WhiteBalanceOnePush) {
01594     res =OnePushAuto(FEATURE_WHITE_BALANCE);
01595     if (res <0) return res;
01596   }
01597
01598
01599   return res;
01600 }
01601
01602
01603
01604 CameraModel
01605 VideoSource_DCAM::GetModelForEuid(const u_int64_t euid)
01606 {
01607   //  AddDebugLevel(D_DCAM);
01608   unsigned int vendor = euid>>40 ;
01609   unsigned int model = (euid >>12) & 0xFF;
01610   BIASDOUT(D_DCAM,"EUID:"<<hex<<euid<<" vendorid: "<<vendor<<" modelid: "<<model<<dec);
01611
01612   switch (vendor) {
01613     // Sony
01614   case 0x080046:
01615     {
01616       BIASDOUT(D_DCAM,"Vendor: Sony")
01617         switch (model) {
01618         case 0x20:
01619           BytesPerPixel_ = 1.0;
01620           ColorMode_ = ImageBase::CM_UYVY422;
01621           return CAMERA_SONY_DFW_V500;
01622         case 0x60:
01623           BytesPerPixel_ = 1.0;
01624           ColorMode_ = ImageBase::CM_UYVY422;
01625           return CAMERA_SONY_DFW_X700;
01626         default:
01627           return CAMERA_UNKNOWN;
01628         }
01629     }
01630   case 0x00b09d:
01631     {
01632       BIASDOUT(D_DCAM,"Vendor: PointGrey Research")
01633         switch (model) {
01634         case 0xcc:
01635           BIASDOUT(D_DCAM,"Model: Dragonfly BW LowRes");
01636           ColorMode_ = ImageBase::CM_Grey;
01637           Shift16_ = 6; // 16 bits - 10 significant bits
01638           return CAMERA_PTGREY_DRAGONFLY_BW;
01639         case 0x4c:
01640             BIASDOUT(D_DCAM,"Model: Dragonfly Color LowRes");
01641           ColorMode_ = ImageBase::CM_Bayer_RGGB;
01642           Shift16_ = 6; // 16 bits - 10 significant bits
01643           return CAMERA_PTGREY_DRAGONFLY_COLOR;
01644         case 0xff:
01645         case 0xfe:
01646           BIASDOUT(D_DCAM,"Model: Dragonfly B&W HiRes");
01647           ColorMode_ = ImageBase::CM_Grey;
01648           Shift16_ = 6; // 16 bits - 10 significant bits
01649           return CAMERA_PTGREY_DRAGONFLY_HIRES;
01650         case 0xf5:
01651         case 0x28:
01652           BIASDOUT(D_DCAM,"Model: Scorpion Color 1600");
01653           //    ColorMode_ = ImageBase::CM_Bayer_GBRG;
01654           // ok, RGGB seems to be right, but did it changed ? friso
01655           ColorMode_ = ImageBase::CM_Bayer_RGGB;
01656           Shift16_ = 4; // 16 bits - 12 significant bits
01657
01658           return CAMERA_PTGREY_SCORPION_COLOR_1600;
01659         default:
01660           BIASDOUT(D_DCAM,"Model: Unknown");
01661           return CAMERA_UNKNOWN;
01662         }
01663     }
01664
01665     // unknown vendorid
01666   default:
01667     return CAMERA_UNKNOWN;
01668   }
01669 }
01670
01671 void VideoSource_DCAM::PrintFormatAndMode_()
01672 {
01673 //   cout <<"Internal Format: "<<DcamFormat_<<" Mode: "<< DcamMode_<<endl;
01674   int f = DcamFormat_ - FORMAT_VGA_NONCOMPRESSED;
01675   int m=0;
01676   switch (f) {
01677   case 0: m = DcamMode_ - MODE_FORMAT0_MIN; break;
01678   case 1: m = DcamMode_ - MODE_FORMAT1_MIN; break;
01679   case 2: m = DcamMode_ - MODE_FORMAT2_MIN; break;
01680   case 7: m = DcamMode_ - MODE_FORMAT7_MIN; break;
01681   }
01682   cout <<"Format: "<<f<<" Mode: "<<m;
01683 }
01684
01685 int VideoSource_DCAM::UserSizeToFormat7_()
01686 {
01687   if ((unsigned int)Width_ % UnitWidth_ >0) {
01688     BIASERR("VideoSource_DCAM::UserSizeToMode(): width of "<<Width_
01689         <<" not multiple of: "<<UnitWidth_);
01690     return -1;
01691   }
01692   if ((unsigned int)Height_ % UnitHeight_ >0) {
01693     BIASERR("VideoSource_DCAM::UserSizeToMode(): height of "<<Height_
01694         <<" not multiple of: "<<UnitHeight_);
01695     return -1;
01696   }
01697   if (!UseBinning_) {
01698     DcamMode_ = MODE_FORMAT7_0;
01699     DcamFormat_ = FORMAT_SCALABLE_IMAGE_SIZE;
01700     if (!UserTopLeft_) {
01701       Left_ = (MaxWidth_ - Width_) / 2;
01702       Top_ = (MaxHeight_ - Height_) / 2;
01703     }
01704     BIASDOUT(D_DCAM_F7,"Using format7: "<<Width_<<"x"<<Height_<<"+"<<Left_
01705          <<"+"<<Top_);
01706   }
01707   else { // Binning for PtGrey Dragonfly
01708     BIASDOUT(D_DCAM_F7,"Using format7 Mode 1 (Binning): "<<Width_<<"x"<<Height_
01709          <<"+"<<Left_<<"+"<<Top_);
01710     DcamMode_ = MODE_FORMAT7_1;
01711     DcamFormat_ = FORMAT_SCALABLE_IMAGE_SIZE;
01712     ColorChannels_ = 1;
01713   }
01714   return 0;
01715 }
01716
Generated on Wed Jun 21 19:01:17 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM.hh Source File

VideoSource

VideoSource_DCAM.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __MIPVIDEOSOURCE_DCAM_HH__
00026 #define __MIPVIDEOSOURCE_DCAM_HH__
00027
00028 #include <bias_config.h>
00029
00030
00031 #if defined(WIN32) && !defined(BIAS_HAVE_1394CAMERACMU)
00032 #  error You need 1394CAMERACMU for BIAS Videosource_DCAM. Please recompile BIAS with USE_1394CAMERACMU.
00033 #endif
00034
00035 #if !defined(WIN32) && !defined(BIAS_HAVE_DC1394)
00036 #  error You need DC1394 for BIAS Videosource_DCAM. Please recompile BIAS with USE_DC1394.
00037 #endif
00038
00039 // consistency check, DCAM is set if one of theabove is set
00040 #if !defined(BIAS_HAVE_1394CAMERACMU) && !defined(BIAS_HAVE_DC1394)
00041 #  error You need either DC1394 or 1394CameraCMU  for BIAS Videosource_DCAM. Please recompile BIAS with one of them.
00042 #endif
00043
00044
00045
00046
00047 #include <Base/Common/W32Compat.hh>
00048
00049 #ifndef WIN32
00050 #  include <sys/time.h>
00051 #endif
00052
00053 #include <Image/Camera.hh>
00054
00055 #ifdef WIN32
00056 #  include <1394Camera.h>
00057 typedef unsigned long long int u_int64_t;
00058 #else
00059 #  include <libdc1394/dc1394_control.h>
00060 #endif
00061 #include <VideoSource/VideoSource_Base.hh>
00062
00063
00064 // only this number of cards are probed
00065 #ifndef MAX_1394_CARDS
00066 #define MAX_1394_CARDS 2
00067 #endif
00068
00069
00070 #define MAX_1394_SOURCES 16
00071
00072 #ifndef MAX_1394_CHANNELS
00073 #define MAX_1394_CHANNELS 256
00074 #endif
00075
00076 #define MAX_DMABUFFERS 10
00077
00078
00079
00080 typedef struct CameraParameter_s
00081 {
00082   // these are the real parameters
00083   float Shutter;
00084   float Gain;
00085   unsigned int WhiteBalance;
00086   bool AutoShutter;
00087   bool AutoGain;
00088   bool AutoWhiteBalance;
00089   unsigned char Sharpen;
00090   unsigned char GammaMode;
00091   unsigned char OpticalFilter;
00092
00093
00094   // these bools describe active changes
00095   bool ShutterChanged;
00096   bool GainChanged;
00097   bool WhiteBalanceChanged;
00098   bool AutoShutterChanged;
00099   bool AutoGainChanged;
00100   bool AutoWhiteBalanceChanged;
00101   bool SharpenChanged;
00102   bool GammaModeChanged;
00103   bool OpticalFilterChanged;
00104
00105   // one-push  action
00106   bool WhiteBalanceOnePush;
00107
00108
00109 } CameraParameterSet;
00110
00111
00112
00113
00114
00115 /// support function to get the number of cameras and IDs of all cameras on one bus
00116 extern int GetCamIDs(int busid ,int &ncams, int *&camids);
00117
00118
00119
00120 namespace BIAS {
00121
00122 /**
00123 \class VideoSource_DCAM
00124 \ingroup VideoG
00125 \author evers
00126
00127 \brief This class VideoSource_DCAM implements access to IEEE1394 (Firewire, iLink) camers following the DCam 1.2 standard protocoll.
00128
00129 \todo does not work with libdc1394_control version 9.0.0 (on ana3, Suse 8.2) but works on 9.0.3 (saale, Suse 9.1) aposor, jw 10.2004
00130 \todo double check Bayer Scorpion ToRGB (JW)
00131 \todo Win32 port by common parent class (JW)
00132 \todo implement a generic SetBestVideoFormat function, trying avalable format/mode/rate combinations (JW) like on WIN32.
00133 */
00134  typedef enum {
00135     CAMERA_SONY_DFW_X700  = 0, // IEEE1394
00136     CAMERA_SONY_DFW_V500,// IEEE1394
00137     CAMERA_PTGREY_DRAGONFLY_COLOR ,// IEEE1394
00138     CAMERA_PTGREY_DRAGONFLY_HIRES ,// IEEE1394
00139     CAMERA_PTGREY_DRAGONFLY_BW ,// IEEE1394
00140     CAMERA_PTGREY_SCORPION_COLOR_1600 ,// IEEE1394
00141     CAMERA_SONY_EVID31, // analog via frame grabber, PTZ-camera
00142     CAMERA_SONY_DV,
00143     CAMERA_UNKNOWN
00144   } CameraModel;
00145
00146   typedef enum {
00147     LENS_SONY_EVID31_BUILTIN,
00148     LENS_SONY_DV_BUILTIN,
00149     LENS_PENTAX_CMOUNT_4_8,
00150     LENS_PENTAX_CMOUNT_8_0,
00151     LENS_PENTAX_CMOUNT_4_2,
00152     LENS_UNKNOWN
00153   } LensModel;
00154
00155 #ifdef WIN32
00156   typedef enum {
00157     FEATURE_BRIGHTNESS,
00158     FEATURE_EXPOSURE,
00159     FEATURE_SHARPNESS,
00160     FEATURE_WHITE_BALANCE,
00161     FEATURE_HUE,
00162     FEATURE_SATURATION,
00163     FEATURE_GAMMA,
00164     FEATURE_SHUTTER,
00165     FEATURE_GAIN,
00166     FEATURE_IRIS,
00167     FEATURE_FOCUS,
00168     FEATURE_TEMPERATURE,
00169     FEATURE_TRIGGER,
00170
00171     FEATURE_ZOOM,
00172     FEATURE_PAN,
00173     FEATURE_TILT,
00174     FEATURE_OPTICAL_FILTER,
00175
00176     FEATURE_CAPTURE_SIZE,
00177     FEATURE_CAPTURE_QUALITY,
00178   };
00179
00180   #define FEATURE_MIN   FEATURE_BRIGHTNESS
00181   #define FEATURE_MAX   FEATURE_CAPTURE_QUALITY
00182   #define NUM_FEATURES (FEATURE_MAX - FEATURE_MIN + 1)
00183 #endif // WIN32
00184
00185
00186 class BIASVideoSource_EXPORT VideoSource_DCAM : public VideoSource{
00187
00188   public:
00189     /*! Activates the timestamp for PointGrey Scorpion SCOR-20SO
00190      */
00191     void ActivateScorpionTimestamp();
00192     bool ScorpionTimestampActive_;
00193
00194     VideoSource_DCAM(int Card = 0);
00195     ~VideoSource_DCAM();
00196
00197
00198     int OpenDevice();
00199     int OpenDevice(int camid);
00200     /** this a special function to by-pass all automatic initializations and
00201     Use only in conjuction with SertSize() and SetLeftTop() !
00202      */
00203     int SetFormat7(int mode, int bpp, int colorchannels);
00204
00205     int CloseDevice();
00206     // evil hack, fixme, please fixme !!! (I forgot the TODO)
00207     void SetBinning(bool b) {UseBinning_ = b;};
00208
00209     int UseChannel(int channel);
00210
00211     int GrabSingle(BIAS::Camera <unsigned char> &image);
00212
00213 #ifdef BUILD_IMAGE_USHORT
00214     int GrabSingle(BIAS::Camera <unsigned short> &image);
00215 #endif
00216
00217     int PreGrab();
00218
00219     int PostGrab();
00220
00221     int ShowCapabilities();
00222
00223
00224     int AutoMode( int feature, bool on);
00225     int  SetFeature( int feature, unsigned int value);
00226     unsigned int GetFeature( int feature);
00227
00228     int OnePushAuto(int feature);
00229     bool OnePushRunning(int feature);
00230
00231     int SetShutter(float exptime);
00232     float GetShutter();
00233     int SetGain(float g);
00234     float GetGain();
00235
00236     int SetWhiteBalance(float rvalue,float bvalue);
00237
00238     int SetGammaMode(unsigned char g);
00239     unsigned char  GetGammaMode();
00240
00241     int ExternalTrigger(bool on);
00242
00243     // format7 specific methods
00244     inline unsigned int GetTop(){return Top_;};
00245     inline unsigned int GetLeft(){return Left_;};
00246
00247
00248     /// set the topleft corner for partitial scan
00249     int SetLeftTop(unsigned int left, unsigned  int top);
00250
00251     inline int GetTransmissionTime(){return TransmissionTime_;};
00252
00253     /// set camera to parameters specified in complete set
00254     int SetCamera(CameraParameterSet camparam);
00255
00256     virtual void SetCameraID(int /*id*/){BIASERR("Can not set camera id for DCams, they are identified automatically");};
00257
00258     // this choses f7 mode even for standard resolution
00259     void ForceFormat7(bool forcef7) {ForceF7_ =forcef7;}
00260
00261     void SetBytesPerPacket(const int b){BytesPerPacket_ = b;}
00262   protected:
00263
00264     int InitCam();
00265     int StartIso();
00266     int StopIso();
00267     int QueryCam();
00268     int UserSizeToMode();
00269     int UserSizeToFormat7_();
00270     void PrintFormatAndMode_();
00271     int SelectDefault();
00272     /**
00273         Set this value and read back what really happend. */
00274     int ApplyBytesPerPacket();
00275
00276     /** Evaluate Min and Max BpP, framesize and fps, then calc BpP */
00277     unsigned int CalcBytesPerPacket();
00278
00279     /// use some magic to determine vendor and model
00280
00281
00282
00283
00284     // there is only one handle per bus for multiple devices
00285 #ifdef WIN32
00286         C1394Camera camera;
00287     CameraModel GetModelForEuid(LARGE_INTEGER euid);
00288 #else // WIN32
00289         static raw1394handle_t IEEE1394Handle_[MAX_1394_CARDS];
00290     static int Instances_[MAX_1394_CARDS];
00291     static int InstancesTotal_;
00292     static int BytesPerCyle_[MAX_1394_CARDS];
00293
00294     CameraModel GetModelForEuid(const  u_int64_t  euid);
00295
00296     // this is the card to serve for
00297     int IEEE1394Card_;
00298
00299     dc1394_cameracapture DcamCapture_;
00300     dc1394_camerainfo DcamInfo_;
00301     dc1394_feature_set DcamFeatures_;
00302
00303     nodeid_t * DcamNodes_;
00304
00305     // which modes are supported by this cam ?
00306     bool SupportedFormats_[NUM_FORMATS];
00307
00308     // list all Modes for each format
00309     bool SupportedModes_[NUM_FORMATS][NUM_FORMAT1_MODES];
00310
00311     int SupportedFramerates_[NUM_FORMATS][NUM_FORMAT1_MODES];
00312     bool SupportedFeature_[NUM_FEATURES];
00313
00314 #endif // WIN32
00315
00316     int NumCams_;
00317     int SelectedCam_;
00318     int DcamMode_;
00319     int DcamFormat_;
00320     int DcamFps_;
00321     int DcamIsoChannel_;
00322     int Trigger_;
00323
00324     bool ForceF7_;
00325     bool DirectF7_;
00326     bool UseDMA_;
00327     int DcamDMABuffers_;
00328
00329     // used to set Format 7 Scalabel Image Size
00330     unsigned int MaxWidth_,  MaxHeight_, Left_,Top_;
00331     unsigned int UnitWidth_, UnitHeight_;
00332     bool UserTopLeft_;
00333     int BytesPerPacket_;
00334     unsigned int MaxBpP_, MinBpP_;
00335
00336     // time it lasts to transmit one image in usec
00337     int TransmissionTime_;
00338
00339
00340     unsigned char Shift16_; // uses this to shift bits down to normal
00341     CameraModel CamModel_;
00342     LensModel Lens_;
00343     bool UseBinning_;
00344
00345   };
00346
00347
00348 } // namespace MIP
00349
00350 #endif // __MIPVIDEOSOURCE_DCAM_HH__
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DCAM_CMU.cpp Source File

VideoSource

VideoSource_DCAM_CMU.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <wtypes.h>
00026 #include <1394Camera.h>
00027 #include "VideoSource_DCAM.hh"
00028
00029 using namespace BIAS;
00030
00031 using namespace std;
00032
00033 // tested with Scorpion, Dragonfly
00034
00035 VideoSource_DCAM::VideoSource_DCAM(int card): VideoSource(card)
00036 {
00037     // check if a camera is connected.
00038     int res = camera.CheckLink();
00039     if (res == CAM_SUCCESS)
00040     {
00041         BIASDOUT(D_DCAM,"A Camera was found and selected.");
00042         SelectedCam_=camera.GetNode();
00043     }
00044     else
00045     {
00046         BIASERR("No Camera was found.");
00047     }
00048
00049   ForceF7_ = false;
00050   DirectF7_ = false;
00051   UserTopLeft_ = false;
00052   UseBinning_ = false;
00053   ColorMode_ = ImageBase::CM_UYVY422;
00054     DcamFps_ = 3;
00055     Width_ = 0;
00056     Height_ = 0;
00057     Left_ = 0;
00058     Top_ = 0;
00059   BytesPerPacket_ = 0;
00060   ColorChannels_ = 0;
00061 }
00062
00063 VideoSource_DCAM::~VideoSource_DCAM()
00064 {
00065 }
00066
00067 int VideoSource_DCAM::OpenDevice(int camid)
00068 {
00069   BIASDOUT(D_DCAM,"VideoSource_DCAM::OpenDevice("<<camid<<")");
00070
00071   int select = camera.SelectCamera(camid);
00072
00073   // is there a camera with id: camid?
00074   if (select == CAM_SUCCESS)
00075   {
00076     SelectedCam_ = select;
00077     BIASDOUT(D_DCAM,"VideoSource_DCAM::OpenDevice("<<camid<<") successful");
00078   } else {
00079     BIASERR("No Device found");
00080     return -1;
00081   }
00082
00083   BIASDOUT(D_DCAM,"Setting up camera "<<SelectedCam_<<"");
00084
00085   // QueryCam(); is done by the camera
00086
00087   return InitCam();
00088 }
00089
00090 int VideoSource_DCAM::OpenDevice()
00091 {
00092   return OpenDevice(0);
00093 }
00094
00095 int VideoSource_DCAM::CloseDevice()
00096 {
00097   return 0;
00098 }
00099
00100 int VideoSource_DCAM::InitCam()
00101 {
00102     //Just for testing the code, tested with Scorpion, Dragonfly
00103     //Width_ = 400;
00104     //Height_ = 200;
00105   //Top_ = 0;
00106   //Left_ = 0;
00107   //UserTopLeft_ = true;
00108
00109     if(camera.InitCamera()==CAM_SUCCESS)
00110     {
00111     BIASDOUT(D_DCAM,"VideoSource_DCAM::InitCamera() successful");
00112     }
00113     else
00114     {
00115     BIASERR("VideoSource_DCAM::InitCamera() failed");
00116         return -1;
00117     }
00118
00119     // Look up camera Model and Vendor
00120     CamModel_ = GetModelForEuid(camera.m_UniqueID);
00121
00122   if (Width_ != 0 || Height_ != 0) // UseBinning_ not implemented.
00123     {
00124
00125         // try to set user definitions
00126         if ( UserSizeToMode() < 0)
00127         {
00128             BIASERR("UserSizeToMode() failed");
00129             return -1;
00130     }
00131     }
00132   else
00133     {
00134         // Select best mode, format and framerate for camera.
00135         SelectDefault();
00136     }
00137
00138     // set camera to parameters.
00139     if (camera.SetVideoFormat(DcamFormat_) == CAM_SUCCESS &&
00140           camera.SetVideoMode(DcamMode_)         == CAM_SUCCESS)
00141     {
00142         if (DcamFormat_ != 7)
00143         {
00144             camera.SetVideoFrameRate(DcamFps_);
00145         }
00146         else
00147         {
00148             camera.m_controlSize.SetColorCode(0);
00149             camera.m_controlSize.SetSize(Width_,Height_);
00150
00151             // Maximum bpp is selected.
00152             if (BytesPerPacket_ == 0)
00153             {
00154                 CalcBytesPerPacket();
00155             }
00156
00157             camera.m_controlSize.SetBytesPerPacket(BytesPerPacket_);
00158             camera.m_controlSize.SetPosition(Left_,Top_);
00159         }
00160
00161     CompleteInitialized_ = true;
00162         return 0;
00163     }
00164
00165     // Initialization failed.
00166     BIASERR("Can not set DCAM Camera to requested parameters.");
00167     return -1;
00168 }
00169
00170 int VideoSource_DCAM::GrabSingle(Camera <unsigned char> &image)
00171 {
00172
00173   BIASDOUT(D_DCAM,"VideoSource_DCAM::GrabSingle("<<SelectedCam_<<")");
00174
00175     if (Grabbing_)
00176     {
00177         BIASERR("Camera is already grabbing.");
00178     }
00179
00180   Grabbing_ = true;
00181
00182     // Start Image Capturing
00183     int res =   camera.StartImageCapture();
00184
00185   if (res == CAM_SUCCESS)
00186     {
00187     BIASDOUT(D_DCAM,"VideoSource_DCAM::StartImageCapture successful");
00188     }
00189     else
00190     {
00191     BIASERR("VideoSource_DCAM::StartImageCapture failed");
00192     }
00193
00194     // try to capture image.
00195     res = camera.CaptureImage();
00196
00197     if (res == CAM_SUCCESS)
00198     {
00199     BIASDOUT(D_DCAM,"VideoSource_DCAM::CaptureImage successful");
00200     }
00201     else
00202     {
00203     BIASERR("VideoSource_DCAM::CaptureImage failed");
00204     }
00205
00206     // initialized with Width_, Height_
00207   image.CopyIn_NoInit(camera.m_pData);
00208
00209   // Stop Grabbing
00210     camera.StopImageCapture();
00211     Grabbing_=false;
00212
00213   return 0;
00214 }
00215
00216 int VideoSource_DCAM::QueryCam()
00217 {
00218   // is done automatically by the camera after initialisation
00219   return 0;
00220 }
00221
00222 int VideoSource_DCAM::ShowCapabilities()
00223 {
00224   cout <<"Camera: "<<SelectedCam_<<endl;
00225
00226   cout <<"Supported Formats: ";
00227   for (int i=0; i<8; i++)
00228   {
00229     if (camera.m_bxAvailableFormats[i])
00230     {
00231       cout <<"Format"<<i<<" ";
00232     }
00233   }
00234   cout <<endl;
00235
00236     // Get supported modes for available formats.
00237   cout <<"Suported Modes:"<<endl;
00238   for (int i=0; i<8; i++)
00239   {
00240     if (camera.m_bxAvailableFormats[i])
00241     {
00242       cout <<"Format"<<i<<": ";
00243       for (int j=0; j<8; j++)
00244       {
00245         if (camera.m_bxAvailableModes[i][j])
00246         {
00247           cout <<"Mode"<<j<<" ";
00248         }
00249       cout <<endl;
00250             }
00251     }
00252   }
00253
00254   // Only for Formats 0..2 is a framerate meaningful
00255   cout <<"Supported Framerates:"<<endl;
00256   for (int format=0; format < 3; format++)
00257   {
00258     cout <<" Format"<<format<<": ";
00259     for (int mode=0; mode<8; mode++)
00260     {
00261       if (camera.m_bxAvailableModes[format][mode])
00262       {
00263         cout <<"Mode"<<i<<":  ";
00264         for (int f=0; f<8; f++)
00265         {
00266           if (camera.m_videoFlags[format][mode][f])
00267           {
00268             cout <<1.875 * (0x1<<f)<<"  ";
00269           }
00270         }
00271       }
00272     }
00273     cout <<endl;
00274   }
00275   return 0;
00276 }
00277
00278 #define USE_NATIVE_XGA
00279
00280 int VideoSource_DCAM::UserSizeToMode()
00281 {
00282   BIASDOUT(D_DCAM,"VideoSource_DCAM::UserSizeToMode("<<SelectedCam_<<"): "<<Width_<<"x"<<Height_<<" BytesPerPixel_: "<<BytesPerPixel_<<" ColorMode "<<ColorMode_);
00283
00284     if (BytesPerPixel_ == 1.0)
00285     {
00286     if (ColorMode_ == ImageBase::CM_UYVY422) {
00287       ColorChannels_ = 2;
00288       if (!ForceF7_) {
00289                 if (Width_ == 1600 && Height_ == 1200)
00290                 {
00291                     DcamFormat_ = 2;
00292                     DcamMode_   = 3;
00293                 }
00294                 else if (Width_ == 1280 && Height_ == 960)
00295                 {
00296                     DcamFormat_ = 2;
00297                     DcamMode_   = 0;
00298                 }
00299                 else if (Width_ == 1024 && Height_ == 768)
00300                 {
00301                     DcamFormat_ = 1;
00302                     DcamMode_   = 3;
00303                 }
00304                 else if (Width_ == 800 && Height_ == 600)
00305                 {
00306                     DcamFormat_ = 1;
00307                     DcamMode_   = 0;
00308                 }
00309                 else if (Width_ == 640 && Height_ == 480)
00310                 {
00311                     DcamFormat_ = 0;
00312                     DcamMode_   = 3;
00313                 }
00314                 else if (Width_ == 320 && Height_ == 240)
00315                 {
00316                     DcamFormat_ = 0;
00317                     DcamMode_   = 1;
00318                 }
00319                 else  // Format 7 required
00320                 {
00321                     if (UserSizeToFormat7_() < 0)
00322                     {
00323                         BIASERR("VideoSource_DCAM::UserSizeToFormat7_(): failed");
00324                         return -1;
00325                     }
00326                 }
00327             }
00328       else
00329             {
00330                 if (UserSizeToFormat7_() < 0)
00331                 {
00332                     BIASERR("VideoSource_DCAM::UserSizeToFormat7_(): failed");
00333                     return -1;
00334                 }
00335             }
00336     }
00337     else if (ColorMode_ == ImageBase::CM_Grey ||ColorMode_ == ImageBase::CM_Bayer_RGGB
00338                                                                                           || ColorMode_ == ImageBase::CM_Bayer_GBRG
00339                                                                                             || ColorMode_ == ImageBase::CM_Bayer_GRBG
00340                                                                                             || ColorMode_ == ImageBase::CM_Bayer_BGGR )
00341         {
00342       ColorChannels_ = 1;
00343       if (!ForceF7_ ) {
00344                 if (Width_ == 1600 && Height_ == 1200)
00345                 {
00346                   DcamFormat_ = 2;
00347                     DcamMode_   = 5;
00348                 }
00349                 else if (Width_ == 1280 && Height_ == 960)
00350                 {
00351                     DcamFormat_ = 2;
00352                     DcamMode_   = 2;
00353                 }
00354                 else if (Width_ == 1024 && Height_ == 768)
00355                 {
00356                   DcamFormat_ = 1;
00357                     DcamMode_   = 5;
00358                 }
00359                 else if (Width_ == 640 && Height_ == 480 && CamModel_!=CAMERA_PTGREY_DRAGONFLY_HIRES)
00360                 {
00361                   DcamFormat_ = 0;
00362                     DcamMode_   = 5;
00363                 }
00364                 else
00365                 {
00366                     if (UserSizeToFormat7_() < 0)
00367                     {
00368                         BIASERR("VideoSource_DCAM::UserSizeToFormat7_(): failed");
00369                         return -1;
00370                     }
00371                 }
00372       }
00373       else
00374             {
00375                 if (UserSizeToFormat7_() < 0)
00376                 {
00377                     BIASERR("VideoSource_DCAM::UserSizeToFormat7_(): failed");
00378                     return -1;
00379                 }
00380             }
00381     }
00382     else
00383         {
00384       BIASERR("VideoSource_DCAM::UserSizeToMode(): Unsupported ColorModel_"
00385               <<ColorMode_);
00386       return -1;
00387     }
00388     }
00389     else
00390     {
00391         BIASDOUT(D_DCAM,"VideoSource_DCAM::UserSizeToMode(): 16 Bit not implemented.");
00392         return -1;
00393     }
00394     return 0;
00395 }
00396
00397
00398 int VideoSource_DCAM::UserSizeToFormat7_()
00399 {
00400
00401     // Set Camera to Format7 to inquire unitwidth and height.
00402     camera.SetVideoFormat(7);
00403     camera.SetVideoMode(0);
00404     camera.m_controlSize.Inquire();
00405
00406     UnitWidth_  = camera.m_controlSize.m_unitH;
00407     UnitHeight_ = camera.m_controlSize.m_unitV;
00408
00409     MaxWidth_  = camera.m_controlSize.m_maxH;
00410     MaxHeight_ = camera.m_controlSize.m_maxV;
00411
00412   if ((unsigned int)Width_ % UnitWidth_ >0)
00413     {
00414     BIASERR("VideoSource_DCAM::UserSizeToMode(): width of "<<Width_
00415         <<" not multiple of: "<<UnitWidth_);
00416     return -1;
00417   }
00418   if ((unsigned int)Height_ % UnitHeight_ >0)
00419     {
00420     BIASERR("VideoSource_DCAM::UserSizeToMode(): height of "<<Height_
00421         <<" not multiple of: "<<UnitHeight_);
00422     return -1;
00423   }
00424
00425   if (!UseBinning_)
00426     {
00427     DcamMode_   = 0;
00428     DcamFormat_ = 7;
00429
00430     if (!UserTopLeft_)
00431         {
00432       Left_ = (MaxWidth_ - Width_) / 2;
00433       Top_  = (MaxHeight_ - Height_) / 2;
00434     }
00435     BIASDOUT(D_DCAM_F7,"Using format7: "<<Width_<<"x"<<Height_<<"+"<<Left_
00436          <<"+"<<Top_);
00437   }
00438   else
00439     { // Binning for PtGrey Dragonfly, not implemented yet.
00440     BIASDOUT(D_DCAM_F7,"Using format7 Mode 1 (Binning): "<<Width_<<"x"<<Height_
00441          <<"+"<<Left_<<"+"<<Top_);
00442
00443     DcamMode_      = 1;
00444     DcamFormat_    = 7;
00445     ColorChannels_ = 1;
00446   }
00447
00448   return 0;
00449 }
00450
00451 int VideoSource_DCAM::SelectDefault()
00452 {
00453
00454     // Get best Mode for Camera
00455   for (int i=0; i<3; i++)
00456   {
00457     if (camera.m_bxAvailableFormats[i])
00458     {
00459       for (int j=0; j<6; j++)                   // ToDo: No 16-Bits Modes allowed.
00460       {
00461         if (camera.m_bxAvailableModes[i][j])
00462         {
00463                     DcamFormat_ = i;
00464                     DcamMode_   = j;
00465         }
00466             }
00467     }
00468   }
00469
00470     // Select best Framerate for selected format and mode
00471     for (int k=0; k<8; k++)
00472     {
00473     if(camera.m_videoFlags[DcamFormat_][DcamMode_][k]) {
00474             DcamFps_ = k;
00475     }
00476     }
00477
00478   switch (DcamFormat_) {
00479   case 0:  // Format 0
00480     switch (DcamMode_) {
00481     case 0:  // Mode 0
00482       ColorChannels_ = 2;
00483       Width_ = 160; Height_ = 120; ColorMode_ = ImageBase::CM_YUV444;
00484       break;
00485     case 1:  // F0 Mode 1
00486       ColorChannels_ = 2;
00487       Width_ = 320; Height_ = 240; ColorMode_ = ImageBase::CM_UYVY422;
00488       break;
00489     case 2:  // F0 Mode 2
00490       ColorChannels_ = 2;
00491       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_YUV411;
00492       break;
00493     case 3:  // F0 Mode 3
00494       ColorChannels_ = 2;
00495       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_UYVY422;
00496       break;
00497     case 4:  // F0 Mode 4
00498       ColorChannels_ = 3;
00499       Width_ = 640; Height_ = 480; ColorMode_ = ImageBase::CM_RGB;
00500       break;
00501     case 5:  // F0 Mode 5
00502       ColorChannels_ = 1;
00503       Width_ = 640; Height_ = 480;
00504       break;
00505     case 6:     // F0 Mode 6
00506       ColorChannels_ = 1;
00507       Width_ = 640; Height_ = 480;
00508       break;
00509     }
00510
00511     break;
00512   case 1:   // Format 1
00513     switch (DcamMode_) {
00514     case 0: // F1 Mode 0
00515       ColorChannels_ = 2;
00516       Width_ = 800; Height_ = 600;  ColorMode_ = ImageBase::CM_UYVY422;
00517       break;
00518     case 1: // F1 Mode 1
00519       ColorChannels_ = 3;
00520       Width_ = 800; Height_ = 600;  ColorMode_ = ImageBase::CM_RGB;
00521       break;
00522     case 2: // F1 Mode 2
00523       ColorChannels_ = 1;
00524       Width_ = 800; Height_ = 600;
00525       break;
00526     case 3:   // F1 Mode 3
00527       ColorChannels_ = 2;
00528       Width_ = 1024; Height_ = 768;  ColorMode_ = ImageBase::CM_UYVY422;
00529       break;
00530     case 4: // F1 Mode 4
00531       ColorChannels_ = 3;
00532       Width_ = 1024; Height_ = 768;  ColorMode_ = ImageBase::CM_RGB;
00533       break;
00534     case 5: // F1 Mode 5
00535       ColorChannels_ = 1;
00536       Width_ = 1024; Height_ = 768;
00537       break;
00538     case 6: // F1 Mode 6
00539       ColorChannels_ = 1;
00540       Width_ = 800; Height_ = 600;
00541       break;
00542     case 7: // F1 Mode
00543       Width_ = 1024; Height_ = 768;
00544       ColorChannels_ = 1;
00545       BytesPerPixel_ = 2.0;
00546       break;
00547     }
00548
00549     break;
00550   case 2: // Format 2
00551     switch (DcamMode_) {
00552     case 0:
00553       ColorChannels_ = 2;
00554       Width_ = 1280; Height_ = 960;  ColorMode_ = ImageBase::CM_UYVY422;
00555       break;
00556     case 1:
00557       ColorChannels_ = 3;
00558       Width_ = 1280; Height_ = 960;  ColorMode_ = ImageBase::CM_RGB;
00559       break;
00560     case 2:
00561       ColorChannels_ = 1;
00562       Width_ = 1280; Height_ = 960;
00563       break;
00564     case 3:
00565       ColorChannels_ = 2;
00566       Width_ = 1600; Height_ = 1200;  ColorMode_ = ImageBase::CM_UYVY422;
00567       break;
00568     case 4:
00569       ColorChannels_ = 3;
00570       Width_ = 1600; Height_ = 1200;  ColorMode_ = ImageBase::CM_RGB;
00571       break;
00572     case 5:
00573       ColorChannels_ = 1;
00574       Width_ = 1600; Height_ = 1200;
00575       break;
00576     case 6:
00577       ColorChannels_ = 1;
00578       Width_ = 1280; Height_ = 960;
00579       break;
00580     case 7:
00581       ColorChannels_ = 1;
00582       Width_ = 1600; Height_ = 1200;
00583       break;
00584     }
00585     break;
00586   }
00587
00588     return 0;
00589 }
00590
00591 #ifdef BUILD_IMAGE_USHORT
00592 int VideoSource_DCAM::GrabSingle(BIAS::Camera <unsigned short> &image)
00593 {
00594   return 0;
00595 }
00596 #endif
00597
00598 CameraModel VideoSource_DCAM::GetModelForEuid(LARGE_INTEGER /*euid*/)
00599 {
00600
00601     // Look up for Model and Vendor
00602   char* search_vendor = "Point Grey Research";
00603     char* search_model = "Dragonfly";
00604
00605     if (strstr(camera.m_nameVendor, search_vendor) != NULL)
00606     {
00607       if (strstr(camera.m_nameModel, search_model) != NULL)
00608       {
00609       unsigned long r1040;
00610         camera.ReadQuadlet(0x1040, &r1040);
00611       // little endian Red: 52 Green: 47 Blue: 42 Monochrome 59
00612
00613       switch(r1040)
00614       {
00615         case 0x52474742 :
00616           ColorMode_ = ImageBase::CM_Bayer_RGGB;
00617           break;
00618
00619         case 0x47425247 :
00620           ColorMode_ = ImageBase::CM_Bayer_GBRG;
00621           break;
00622
00623         case 0x47524247 :
00624           ColorMode_ = ImageBase::CM_Bayer_GRBG;
00625           break;
00626
00627         case 0x42474752 :
00628           ColorMode_ = ImageBase::CM_Bayer_BGGR;
00629           break;
00630
00631         default :
00632                     ColorMode_ = ImageBase::CM_Grey;
00633           break;
00634       }
00635       return CAMERA_PTGREY_DRAGONFLY_COLOR;
00636       }
00637         else if(strstr(camera.m_nameModel, "Scorpion") != NULL)
00638         {
00639             ColorMode_ = ImageBase::CM_Bayer_RGGB;
00640             return CAMERA_PTGREY_SCORPION_COLOR_1600;
00641         }
00642     }
00643   // other camera
00644   return CAMERA_UNKNOWN;
00645 }
00646
00647 void VideoSource_DCAM::ActivateScorpionTimestamp()
00648 {
00649 }
00650
00651 int VideoSource_DCAM::PreGrab()
00652 {
00653   return 0;
00654 }
00655
00656 int VideoSource_DCAM::PostGrab()
00657 {
00658   return 0;
00659 }
00660
00661 unsigned int VideoSource_DCAM::CalcBytesPerPacket()
00662 {
00663     camera.m_controlSize.Status();
00664     BytesPerPacket_ = camera.m_controlSize.m_bytesPacketMax;
00665     return 0;
00666 }
00667
00668 int  VideoSource_DCAM::ApplyBytesPerPacket()
00669 {
00670     return 0;
00671 }
00672
00673 int VideoSource_DCAM::StopIso()
00674 {
00675     return 0;
00676 }
00677
00678 int VideoSource_DCAM::StartIso()
00679 {
00680     return 0;
00681 }
00682
00683 float VideoSource_DCAM::GetShutter()
00684 {
00685   camera.m_controlShutter.Inquire();
00686     return camera.m_controlShutter.m_value1;
00687 }
00688
00689 float VideoSource_DCAM::GetGain()
00690 {
00691   camera.m_controlGain.Inquire();
00692   return camera.m_controlGain.m_value1;
00693 }
00694
00695 void VideoSource_DCAM::PrintFormatAndMode_()
00696 {
00697   BIASDOUT(D_DCAM,"Format: <<DcamFormat_<< Mode: <<DcamMode_<< ");
00698 }
00699
00700 int VideoSource_DCAM::SetGain(float gain)
00701 {
00702   switch(CamModel_)
00703   {
00704     case CAMERA_PTGREY_DRAGONFLY_COLOR:
00705
00706       camera.m_controlSize.Inquire();
00707       camera.m_controlGain.Inquire();
00708
00709       // Calculation from Technical Reference Manual for 640x480 Dragonfly
00710       if (camera.m_controlSize.m_maxV == 640)
00711       {
00712         if(gain < 512)
00713         {
00714           gain = -6,0404 + (20*log(658+gain)*(658-gain));
00715         }
00716         else
00717         {
00718           gain = -6,0404 + (0,0354*gain);
00719         }
00720       }
00721       // The camera is the 1024x768 Dragonfly
00722       else
00723       {
00724         if(gain < 512)
00725         {
00726           gain = -9,40 + (20*log(658+gain)*(658-gain));
00727         }
00728         else
00729         {
00730           gain = 9,40 + (0,0354*gain);
00731         }
00732       }
00733       break;
00734
00735     default :
00736       BIASERR("VideoSource_DCAM::SetGain: Not implemented for this camera.");
00737       return -1;
00738       break;
00739   }
00740
00741   // check if gain value can be set
00742   if ((int)gain < camera.m_controlGain.m_min || (int)gain > camera.m_controlGain.m_max)
00743   {
00744     BIASERR("VideoSource_DCAM::SetGain(): Value out of range.")
00745     return -1;
00746   }
00747   else if (!camera.m_controlGain.m_manual)
00748   {
00749     BIASERR("VideoSource_DCAM::SetGain(): Feature is not set to be controlled manually.")
00750     return -1;
00751   }
00752   else
00753   {
00754     camera.SetGain((int)gain);
00755   }
00756     return 0;
00757 }
00758
00759 int VideoSource_DCAM::SetWhiteBalance(float rvalue,float bvalue)
00760 {
00761   camera.m_controlWhiteBalance.Inquire();
00762
00763   // check if whiteBalance values can be set.
00764   if (rvalue < camera.m_controlWhiteBalance.m_min || rvalue > camera.m_controlWhiteBalance.m_max ||
00765       bvalue < camera.m_controlWhiteBalance.m_min || bvalue > camera.m_controlWhiteBalance.m_max)
00766   {
00767     BIASERR("VideoSource_DCAM::SetWhiteBalance(): Value out of range.")
00768     return -1;
00769   }
00770   else if (!camera.m_controlWhiteBalance.m_manual)
00771   {
00772     BIASERR("VideoSource_DCAM::SetWhiteBalance(): Feature is not set to be controlled manually.")
00773     return -1;
00774   }
00775   else
00776   {
00777     // conversion from float to int, maybe value must be computed.
00778     camera.SetWhiteBalance((int)rvalue, (int)bvalue);
00779   }
00780     return 0;
00781 }
00782
00783 int VideoSource_DCAM::OnePushAuto( int feature)
00784 {
00785   int res = 0;
00786
00787   switch(feature)
00788   {
00789     case FEATURE_BRIGHTNESS:
00790       res = camera.m_controlBrightness.SetOnePush();
00791       break;
00792     case FEATURE_EXPOSURE:
00793       res = camera.m_controlAutoExposure.SetOnePush();
00794       break;
00795     case FEATURE_SHARPNESS :
00796       res = camera.m_controlSharpness.SetOnePush();
00797       break;
00798     case FEATURE_WHITE_BALANCE :
00799       res = camera.m_controlWhiteBalance.SetOnePush();
00800       break;
00801     case FEATURE_HUE:
00802       res = camera.m_controlHue.SetOnePush();
00803       break;
00804     case FEATURE_SATURATION:
00805       res = camera.m_controlSaturation.SetOnePush();
00806       break;
00807     case FEATURE_GAMMA:
00808       res = camera.m_controlGamma.SetOnePush();
00809       break;
00810     case FEATURE_SHUTTER:
00811       res = camera.m_controlShutter.SetOnePush();
00812       break;
00813     case FEATURE_GAIN:
00814       res = camera.m_controlGain.SetOnePush();
00815       break;
00816     case FEATURE_IRIS:
00817       res = camera.m_controlIris.SetOnePush();
00818       break;
00819     case FEATURE_FOCUS:
00820       res = camera.m_controlFocus.SetOnePush();
00821       break;
00822     case FEATURE_TRIGGER:
00823       break;
00824
00825     case FEATURE_ZOOM:
00826       res = camera.m_controlZoom.SetOnePush();
00827       break;
00828     case FEATURE_PAN:
00829       break;
00830     case FEATURE_TILT:
00831       break;
00832     case FEATURE_OPTICAL_FILTER:
00833       break;
00834     default:
00835       BIASERR("VideoSource_DCAM::SetAutoMode(): Unkown Feature");
00836       return -1;
00837   }
00838
00839   if (res != CAM_SUCCESS)
00840   {
00841     BIASERR("VideoSource_DCAM:SetOnePush(): failed")
00842     return -1;
00843   }
00844
00845     return 0;
00846 }
00847
00848 int VideoSource_DCAM::SetShutter(float exptime)
00849 {
00850   camera.m_controlShutter.Inquire();
00851
00852   switch(CamModel_)
00853   {
00854     case CAMERA_PTGREY_DRAGONFLY_COLOR:
00855       camera.m_controlSize.Inquire();
00856
00857       // Calculation from Technical Reference Manual for 640x480 Dragonfly
00858       if (camera.m_controlSize.m_maxV == 640)
00859       {
00860         int fps = camera.GetVideoFrameRate();
00861         exptime = (exptime*30)/(16000*(pow(2,fps)*1,875));
00862       }
00863       // Camera is the Dragonfly 1024x768
00864       else
00865       {
00866         int fps = camera.GetVideoFrameRate();
00867         exptime = (exptime*15)/(12000*(pow(2,fps)*1,875));
00868       }
00869       break;
00870
00871     default :
00872       BIASERR("VideoSource_DCAM::SetShutter: Not implemented for this camera.");
00873       return -1;
00874       break;
00875   }
00876
00877   // check if shutter value can be set
00878   if ((int)exptime < camera.m_controlShutter.m_min || (int)exptime > camera.m_controlShutter.m_max)
00879   {
00880     BIASERR("VideoSource_DCAM::SetShutter(): Value out of range.")
00881     return -1;
00882   }
00883   else if (!camera.m_controlShutter.m_manual)
00884   {
00885     BIASERR("VideoSource_DCAM::SetShutter(): Feature is not set to be controlled manually.")
00886     return -1;
00887   }
00888   else
00889   {
00890     camera.SetShutter((int)exptime);
00891   }
00892     return 0;
00893 }
00894
00895 int VideoSource_DCAM::SetLeftTop(unsigned int left, unsigned int top)
00896 {
00897   int res;
00898
00899   if (left<=(MaxWidth_ - Width_) && top <=(MaxHeight_ - Height_)) {
00900     Top_ = top;
00901     Left_ = left;
00902     UserTopLeft_ = true;
00903   }
00904   else {
00905     BIASERR("VideoSource_DCAM::SetLeftTop() values too large:"<<left<<"x"<<top)
00906     return -1;
00907   }
00908
00909   // try to set defined position.
00910   res = camera.m_controlSize.SetPosition(left,top);
00911
00912   if (res == CAM_SUCCESS)
00913   {
00914     BIASDOUT(D_DCAM,"VideoSource_DCAM::SetLeftTop: successful");
00915     return 0;
00916   }
00917   else
00918   {
00919     BIASERR("VideoSource_DCAM::SetLeftTop: failed");
00920     return -1;
00921   }
00922 }
00923
00924 unsigned int VideoSource_DCAM::GetFeature(int feature)
00925 {
00926   int value = 0;
00927
00928   switch(feature)
00929   {
00930     case FEATURE_BRIGHTNESS:
00931       camera.m_controlBrightness.Inquire();
00932       value = camera.m_controlBrightness.m_value1;
00933       break;
00934     case FEATURE_EXPOSURE:
00935       camera.m_controlAutoExposure.Inquire();
00936       value = camera.m_controlAutoExposure.m_value1;
00937       break;
00938     case FEATURE_SHARPNESS :
00939       camera.m_controlSharpness.Inquire();
00940       value = camera.m_controlSharpness.m_value1;
00941       break;
00942     case FEATURE_WHITE_BALANCE :
00943       camera.m_controlWhiteBalance.Inquire();
00944       value = camera.m_controlWhiteBalance.m_value1;
00945       break;
00946     case FEATURE_HUE:
00947       camera.m_controlHue.Inquire();
00948       value = camera.m_controlHue.m_value1;
00949       break;
00950     case FEATURE_SATURATION:
00951       camera.m_controlSaturation.Inquire();
00952       value = camera.m_controlSaturation.m_value1;
00953       break;
00954     case FEATURE_GAMMA:
00955       camera.m_controlGamma.Inquire();
00956       value = camera.m_controlGamma.m_value1;
00957       break;
00958     case FEATURE_SHUTTER:
00959       camera.m_controlShutter.Inquire();
00960       value = camera.m_controlShutter.m_value1;
00961       break;
00962     case FEATURE_GAIN:
00963       camera.m_controlGain.Inquire();
00964       value = camera.m_controlGain.m_value1;
00965       break;
00966     case FEATURE_IRIS:
00967       camera.m_controlIris.Inquire();
00968       value = camera.m_controlIris.m_value1;
00969       break;
00970     case FEATURE_FOCUS:
00971       camera.m_controlFocus.Inquire();
00972       value = camera.m_controlFocus.m_value1;
00973       break;
00974     case FEATURE_TRIGGER:
00975       break;
00976
00977     case FEATURE_ZOOM:
00978       camera.m_controlZoom.Inquire();
00979       value = camera.m_controlZoom.m_value1;
00980       break;
00981     case FEATURE_PAN:
00982       break;
00983     case FEATURE_TILT:
00984       break;
00985     case FEATURE_OPTICAL_FILTER:
00986       break;
00987     default:
00988       BIASERR("VideoSource_DCAM::GetFeature(): Unkown Feature");
00989       break;
00990   }
00991   return value;
00992 }
00993
00994
00995 int VideoSource_DCAM::SetFeature(int feature, unsigned int value)
00996 {
00997   switch(feature)
00998   {
00999     case FEATURE_BRIGHTNESS:
01000       camera.SetBrightness(value);
01001       break;
01002     case FEATURE_EXPOSURE:
01003       camera.SetAutoExposure(value);
01004       break;
01005     case FEATURE_SHARPNESS :
01006       camera.SetSharpness(value);
01007       break;
01008     case FEATURE_WHITE_BALANCE :
01009       camera.SetWhiteBalance(value,value);
01010       break;
01011     case FEATURE_HUE:
01012       camera.SetHue(value);
01013       break;
01014     case FEATURE_SATURATION:
01015       camera.SetSaturation(value);
01016       break;
01017     case FEATURE_GAMMA:
01018       camera.SetGamma(value);
01019       break;
01020     case FEATURE_SHUTTER:
01021       camera.SetShutter(value);
01022       break;
01023     case FEATURE_GAIN:
01024       camera.SetGain(value);
01025       break;
01026     case FEATURE_IRIS:
01027       camera.SetIris(value);
01028       break;
01029     case FEATURE_FOCUS:
01030       camera.SetFocus(value);
01031       break;
01032     case FEATURE_TRIGGER:
01033       break;
01034
01035     case FEATURE_ZOOM:
01036       camera.SetZoom(value);
01037       break;
01038     case FEATURE_PAN:
01039       break;
01040     case FEATURE_TILT:
01041       break;
01042     case FEATURE_OPTICAL_FILTER:
01043       break;
01044     default:
01045       BIASERR("VideoSource_DCAM::SetFeature(): Unkown Feature");
01046       return -1;
01047   }
01048     return 0;
01049 }
01050
01051 int VideoSource_DCAM::AutoMode( int feature, bool on)
01052 {
01053   int res = 0;
01054
01055   switch(feature)
01056   {
01057     case FEATURE_BRIGHTNESS:
01058       res = camera.m_controlBrightness.SetAutoMode(on);
01059       break;
01060     case FEATURE_EXPOSURE:
01061       res = camera.m_controlAutoExposure.SetAutoMode(on);
01062       break;
01063     case FEATURE_SHARPNESS :
01064       res = camera.m_controlSharpness.SetAutoMode(on);
01065       break;
01066     case FEATURE_WHITE_BALANCE :
01067       res = camera.m_controlWhiteBalance.SetAutoMode(on);
01068       break;
01069     case FEATURE_HUE:
01070       res = camera.m_controlHue.SetAutoMode(on);
01071       break;
01072     case FEATURE_SATURATION:
01073       res = camera.m_controlSaturation.SetAutoMode(on);
01074       break;
01075     case FEATURE_GAMMA:
01076       res = camera.m_controlGamma.SetAutoMode(on);
01077       break;
01078     case FEATURE_SHUTTER:
01079       res = camera.m_controlShutter.SetAutoMode(on);
01080       break;
01081     case FEATURE_GAIN:
01082       res = camera.m_controlGain.SetAutoMode(on);
01083       break;
01084     case FEATURE_IRIS:
01085       res = camera.m_controlIris.SetAutoMode(on);
01086       break;
01087     case FEATURE_FOCUS:
01088       res = camera.m_controlFocus.SetAutoMode(on);
01089       break;
01090     case FEATURE_TRIGGER:
01091       break;
01092
01093     case FEATURE_ZOOM:
01094       res = camera.m_controlZoom.SetAutoMode(on);
01095       break;
01096     case FEATURE_PAN:
01097       break;
01098     case FEATURE_TILT:
01099       break;
01100     case FEATURE_OPTICAL_FILTER:
01101       break;
01102     default:
01103       BIASERR("VideoSource_DCAM::SetAutoMode(): Unkown Feature");
01104       return -1;
01105   }
01106
01107   if (res != CAM_SUCCESS)
01108   {
01109     BIASERR("VideoSource_DCAM:AutoMode(): failed")
01110   }
01111
01112     return 0;
01113 }
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk.cpp Source File

VideoSource

VideoSource_Disk.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef  WIN32
00025 #include <unistd.h>
00026 #endif //WIN32
00027
00028 #include <string>
00029 #include <sstream>
00030 #include <iostream>
00031
00032 #include "VideoSource_Disk.hh"
00033 #include  "VideoSource_Disk_FindFiles.h"
00034 #include <Base/Image/ImageIO.hh>
00035 #include <Image/Camera.hh>
00036
00037 #include <Base/Common/BIASpragma.hh>
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042 VideoSource_Disk::VideoSource_Disk(): VideoSource()
00043 {
00044   ActiveFrame_ = 0;
00045  SetDebugLevel(0);
00046   FramesPerSecond_=15;
00047   KeepFPS_ = true;
00048   Loop_ = true;
00049   FrameCounterAsTimeStamp_=false;
00050   GenerateNewUIDs_ = true;
00051 }
00052
00053
00054 VideoSource_Disk::~VideoSource_Disk()
00055 {
00056 }
00057
00058
00059 int VideoSource_Disk::OpenDevice(string Prefix, string Postfix, int DigitCount, int PictureCount)
00060 {
00061   vector<string> FileNames;
00062   ostringstream Name;
00063
00064   for (int i = 0; i< PictureCount; i++){
00065     Name.str(""); // reset stringstream
00066     Name << Prefix << setfill('0') << setw(DigitCount) << i << Postfix;
00067     FileNames.push_back(Name.str());
00068     BIASDOUT(D_VSO_DISK,i<<"\t"<< Name.str().c_str());
00069   }
00070   BIASDOUT(D_VSO_DISK,"leaving VideoSource_Disk::OpenDevice(string .. )");
00071   return OpenDevice(FileNames);
00072 }
00073
00074 int VideoSource_Disk::OpenDevice()
00075 {
00076   FindFilesInPath MyFindFilesInPath("./", "*.mip",NULL,false);
00077   if (MyFindFilesInPath.c_FileList.size()>0)
00078     return OpenDevice(MyFindFilesInPath.c_FileList);
00079   else {
00080     FindFilesInPath MyFindFilesInPathPPM("./", "*.ppm",NULL,false);
00081     if (MyFindFilesInPathPPM.c_FileList.size()>0)
00082       return OpenDevice(MyFindFilesInPathPPM.c_FileList);
00083     else {
00084       FindFilesInPath MyFindFilesInPathPGM("./", "*.pgm",NULL,false);
00085       if (MyFindFilesInPathPGM.c_FileList.size()>0)
00086         return OpenDevice(MyFindFilesInPathPGM.c_FileList);
00087     }
00088   }
00089   return -3;
00090 //   std::vector<std::string>::const_iterator i=
00091 //     MyFindFilesInPath.c_FileList.begin();
00092 //  for(;i != MyFindFilesInPath.c_FileList.end();i++) {
00093 //     cout << i->c_str() << endl;
00094 //  }
00095 }
00096
00097
00098 int VideoSource_Disk::OpenDevice(const vector<string> &FileNames)
00099 {
00100 //   BIASDOUT(D_VSO_DISK,"entering VideoSource_Disk::OpenDevice(vector<string>)");
00101 //  Camera<unsigned char> Image;
00102   // load first image and initialize some internal variables
00103   ImageBase Image;
00104   BIASDOUT(D_VSO_DISK,"FileNames[0] : "<<FileNames[0]);
00105   // Image.SetDebugLevel(D_COPYIN | D_CONVERT);
00106
00107   if (ImageIO::Load(FileNames[0],Image)!=0){
00108       BIASERR("unable to read "<<FileNames[0]);
00109       return -1;
00110     }
00111   Width_ = Image.GetWidth();
00112   Height_ = Image.GetHeight();
00113   ColorChannels_ = Image.GetChannelCount();
00114   ColorMode_ = Image.GetColorModel();
00115   BytesPerPixel_ = Image.GetDepth();
00116   if (FileNames_.size() != 0)
00117     FileNames_.erase(FileNames_.begin(), FileNames_.end());
00118
00119   for (vector<string>::const_iterator i = FileNames.begin();
00120        i != FileNames.end();i++){
00121     FileNames_.push_back(*i);
00122     // #if false
00123 #if 0
00124
00125     const char *fName2 =(*i).c_str();
00126     ImageIO::Read(fName2,Image);
00127     if (i != FileNames.begin()){
00128       if (Width_ != Image.GetWidth() || Height_ != Image.GetHeight() ||
00129           ColorChannels_ != Image.GetChannelCount() ){
00130         BIASERR("VideoSource_Disk::OpenDevice() Image is "<<*i<<
00131                 " different from first image in sequence");
00132         return -1;
00133       }
00134     }
00135 #endif
00136   }
00137
00138   CompleteInitialized_ = true;
00139   ActiveFrame_ = 0;
00140   /* old version -- without timemeasure.hh
00141   gettimeofday(&lastTime_,NULL);
00142   */
00143   return 0;
00144 }
00145
00146 int VideoSource_Disk::PreGrab()
00147 {
00148   VideoSource::PreGrab();
00149
00150   timer_.Start();
00151   return 0;
00152 }
00153
00154
00155
00156 int VideoSource_Disk::CloseDevice()
00157 {
00158   if (Grabbing_) {
00159     BIASERR("VideoSource_Disk::CloseDevice(): Grabbing is running, but closing anyway");
00160   }
00161   Grabbing_ = false;
00162   PostGrab();
00163   CompleteInitialized_ = false;
00164   if (FileNames_.size() != 0)
00165     FileNames_.erase(FileNames_.begin(), FileNames_.end());
00166   return 0;
00167 }
00168
00169
00170 int  VideoSource_Disk::SetColorMode(ImageBase::EColorModel mode)
00171 {
00172   BIASERR("VideoSource_Disk::SetColorMode: source always gives the original"<<
00173           " color mode of the saved files");
00174   return -1;
00175 }
00176
00177 int VideoSource_Disk::GrabSingle(Camera<unsigned char> &image)
00178 {
00179   BIASDOUT(D_VSO_DISK,"VideoSource_Disk::GrabSingle()");
00180
00181   if (ActiveFrame_ == FileNames_.size()){
00182     BIASERR("VideoSource_DISK: End of input. SetLoop(true) or Rewind()");
00183     return -1;
00184   }
00185   int res;
00186   if (!Active_) {
00187     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object not active, use PreGrab()");
00188     return -1;
00189   }
00190
00191   if (Grabbing_) {
00192     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object is already grabbing()");
00193     return -1;
00194   }
00195
00196   Grabbing_ = true;
00197   res = ImageIO::Load(FileNames_[ActiveFrame_],image);
00198
00199   if (res<0) {
00200     BIASERR("VideoSource_Disk::GrabSingle(): Unable to read image: "<<FileNames_[ActiveFrame_]);
00201    return res;
00202   }
00203
00204   // set time to _now_
00205   if (FrameCounterAsTimeStamp_) image.SetTime(ActiveFrame_,0);
00206   else {
00207     timeval tv;
00208     gettimeofday(&tv, NULL);
00209     image.SetTime(tv.tv_sec,tv.tv_usec);
00210   }
00211   if(ActiveFrame_<FileNames_.size()-1){
00212     BIASDOUT(D_VSO_DISK,"GrabSingle() "<<ActiveFrame_<<"  "<<
00213              FileNames_[ActiveFrame_]);
00214     ActiveFrame_++;
00215   }
00216   else if (Loop_) {
00217     ActiveFrame_=0;
00218     BIASDOUT(D_VSO_DISK,"GrabSingle() restarting with first file");
00219   }
00220   else ActiveFrame_++;
00221
00222   Grabbing_ = false;
00223   BIASDOUT(D_VSO_DISK,"leaving GrabSingle()");
00224   // check time and sleep while enough time elapsed
00225   double secPerFrame=1.0/FramesPerSecond_;
00226
00227   //struct timeval now;         -- displaced by TimeMeasure
00228   //double secs=0.0;            --         -"-
00229   //while (secs<=secPerFrame) { --         -"-
00230   if(KeepFPS_) {
00231     timer_.Stop();
00232     while (timer_.GetRealTime()<=(1E06*secPerFrame)) {
00233       timer_.Start();
00234 #ifdef   WIN32
00235       Sleep(1);        //go sleeping for 1 msec
00236 #else  //not WIN32
00237       usleep(1000);     //go sleeping for 1 msec
00238 #endif //WIN32
00239       timer_.Stop();
00240
00241     }
00242     timer_.Reset();
00243     timer_.Start();
00244   }
00245   if (GenerateNewUIDs_) {
00246     image.SetUID(BIAS::UUID::GenerateUUID());
00247   }
00248   //lastTime_=now;   -- displaced by TimeMeasure
00249
00250   return 0;
00251 }
00252
00253 #ifdef BUILD_IMAGE_USHORT
00254 int VideoSource_Disk::GrabSingle(Camera<unsigned short> &image)
00255 {
00256   BIASDOUT(D_VSO_DISK,"VideoSource_Disk::GrabSingle()");
00257
00258   if (ActiveFrame_ == FileNames_.size()){
00259     BIASERR("VideoSource_DISK: End of input. SetLoop(true) or Rewind()");
00260     return -1;
00261   }
00262   int res;
00263   if (!Active_) {
00264     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object not active, use PreGrab()");
00265     return -1;
00266   }
00267
00268   if (Grabbing_) {
00269     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object is already grabbing()");
00270     return -1;
00271   }
00272
00273   Grabbing_ = true;
00274   res = ImageIO::Load(FileNames_[ActiveFrame_],image);
00275
00276   if (res<0) {
00277     BIASERR("VideoSource_Disk::GrabSingle(): Unable to read image: "<<FileNames_[ActiveFrame_]);
00278    return res;
00279   }
00280
00281   // set time to _now_
00282   if (FrameCounterAsTimeStamp_) image.SetTime(ActiveFrame_,0);
00283   else {
00284     timeval tv;
00285     gettimeofday(&tv, NULL);
00286     image.SetTime(tv.tv_sec,tv.tv_usec);
00287   }
00288   if(ActiveFrame_<FileNames_.size()-1){
00289     BIASDOUT(D_VSO_DISK,"GrabSingle() "<<ActiveFrame_<<"  "<<
00290              FileNames_[ActiveFrame_]);
00291     ActiveFrame_++;
00292   }
00293   else if (Loop_) {
00294     ActiveFrame_=0;
00295     BIASDOUT(D_VSO_DISK,"GrabSingle() restarting with first file");
00296   }
00297   else ActiveFrame_++;
00298
00299   Grabbing_ = false;
00300   BIASDOUT(D_VSO_DISK,"leaving GrabSingle()");
00301   // check time and sleep while enough time elapsed
00302   double secPerFrame=1.0/FramesPerSecond_;
00303
00304   //struct timeval now;         -- displaced by TimeMeasure
00305   //double secs=0.0;            --         -"-
00306   //while (secs<=secPerFrame) { --         -"-
00307   if(KeepFPS_) {
00308     timer_.Stop();
00309     while (timer_.GetRealTime()<=(1E06*secPerFrame)) {
00310       timer_.Start();
00311 #ifdef   WIN32
00312       Sleep(1);        //go sleeping for 1 msec
00313 #else  //not WIN32
00314       usleep(1000);     //go sleeping for 1 msec
00315 #endif //WIN32
00316       timer_.Stop();
00317
00318     }
00319     timer_.Reset();
00320     timer_.Start();
00321   }
00322   if (GenerateNewUIDs_) {
00323     image.SetUID(BIAS::UUID::GenerateUUID());
00324   }
00325   //lastTime_=now;   -- displaced by TimeMeasure
00326
00327   return 0;
00328 }
00329 #endif
00330
00331 int VideoSource_Disk::GrabSingle(ImageBase &image)
00332 {
00333   BIASDOUT(D_VSO_DISK,"VideoSource_Disk::GrabSingle()");
00334
00335   if (ActiveFrame_ == FileNames_.size()){
00336     BIASERR("VideoSource_DISK: End of input. SetLoop(true) or Rewind()");
00337     return -1;
00338   }
00339   int res;
00340   if (!Active_) {
00341     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object not active, use PreGrab()");
00342     return -1;
00343   }
00344
00345   if (Grabbing_) {
00346     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object is already grabbing()");
00347     return -1;
00348   }
00349
00350   Grabbing_ = true;
00351   res = ImageIO::Load(FileNames_[ActiveFrame_],image);
00352
00353   if (res<0) {
00354     BIASERR("VideoSource_Disk::GrabSingle(): Unable to read image: "<<FileNames_[ActiveFrame_]);
00355    return res;
00356   }
00357
00358   if(ActiveFrame_<FileNames_.size()-1){
00359     BIASDOUT(D_VSO_DISK,"GrabSingle() "<<ActiveFrame_<<"  "<<
00360              FileNames_[ActiveFrame_]);
00361     ActiveFrame_++;
00362   }
00363   else if (Loop_) {
00364     ActiveFrame_=0;
00365     BIASDOUT(D_VSO_DISK,"GrabSingle() restarting with first file");
00366   }
00367   else ActiveFrame_++;
00368
00369   Grabbing_ = false;
00370   BIASDOUT(D_VSO_DISK,"leaving GrabSingle()");
00371   // check time and sleep while enough time elapsed
00372   double secPerFrame=1.0/FramesPerSecond_;
00373
00374   //struct timeval now;         -- displaced by TimeMeasure
00375   //double secs=0.0;            --         -"-
00376   //while (secs<=secPerFrame) { --         -"-
00377   if(KeepFPS_) {
00378     timer_.Stop();
00379     while (timer_.GetRealTime()<=(1E06*secPerFrame)) {
00380       timer_.Start();
00381 #ifdef   WIN32
00382       Sleep(1);        //go sleeping for 1 msec
00383 #else  //not WIN32
00384       usleep(1000);     //go sleeping for 1 msec
00385 #endif //WIN32
00386       timer_.Stop();
00387
00388     }
00389     timer_.Reset();
00390     timer_.Start();
00391   }
00392   if (GenerateNewUIDs_) {
00393     image.SetUID(BIAS::UUID::GenerateUUID());
00394   }
00395   //lastTime_=now;   -- displaced by TimeMeasure
00396
00397   return 0;
00398 }
00399
00400
00401
00402
00403
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk.hh Source File

VideoSource

VideoSource_Disk.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __MIPVIDEOSOURCE_DISK_HH__
00027 #define __MIPVIDEOSOURCE_DISK_HH__
00028
00029
00030
00031 #include <VideoSource/VideoSource_Base.hh>
00032
00033 /* no longer in use -- timemeasure instead
00034 #include <sys/time.h>
00035 */
00036 #include "Base/Debug/TimeMeasure.hh"
00037
00038
00039 namespace BIAS{
00040 /**
00041     \class VideoSource_Disk
00042     \ingroup VideoG
00043      \author evers
00044     \brief This class simulates a video device by loading images from disk.
00045 */
00046   class BIASVideoSource_EXPORT VideoSource_Disk : public VideoSource{
00047
00048   public:
00049     VideoSource_Disk();
00050     virtual ~VideoSource_Disk();
00051
00052     /** this opens all mip images in the current dir
00053      */
00054     virtual int OpenDevice();
00055
00056     virtual int OpenDevice(std::string Prefix, std::string Postfix, int DigitCount, int PictureCount);
00057
00058     virtual int OpenDevice(const std::vector<std::string> &FileNames);
00059     int CloseDevice();
00060
00061     int SetColorMode(BIAS::ImageBase::EColorModel mode);
00062
00063     void SetLoopMode(bool l){Loop_ = l;};
00064
00065     void Rewind() {ActiveFrame_ = 0;};
00066
00067     virtual int GrabSingle(BIAS::Camera <unsigned char> &image);
00068 #ifdef BUILD_IMAGE_USHORT
00069     virtual int GrabSingle(BIAS::Camera <unsigned short int> &image);
00070 #endif
00071
00072     /** Disk has also a imagebase grabber for e.g.g float images
00073      */
00074     virtual int GrabSingle(BIAS::ImageBase &image);
00075
00076     std::string GetNextFilename() const {
00077       if (ActiveFrame_ <FileNames_.size()) return FileNames_[ActiveFrame_];
00078       else return "";};
00079     std::string GetLastFilename() const {
00080       return ActiveFrame_ >0 ? FileNames_[ActiveFrame_-1] : "" ;};
00081
00082     unsigned int GetNumFramesRemaining() const {
00083       return (FileNames_.size()- ActiveFrame_) ;};
00084
00085     /** @brief zero based counting, returns next frame */
00086     unsigned int GetActiveFrameNumber() const { return ActiveFrame_;};
00087
00088     /** @brief pushback new filenames on internal filename vector
00089         @author koeser 12/2005 */
00090     inline void AddFilenames(const std::vector<std::string> &FileNames) {
00091       FileNames_.reserve(FileNames_.size()+FileNames.size());
00092       for (unsigned int i=0; i<FileNames.size(); i++){
00093         FileNames_.push_back(FileNames[i]);
00094       }
00095     }
00096
00097     void SetGenerateNewUIDs(bool s) {GenerateNewUIDs_=s;};
00098     void SetKeepFPS(bool s) {KeepFPS_ = s;};
00099     int PreGrab();
00100     int PostGrab() {return true;};
00101     void SetFrameCounterAsTimeStamp(const bool b) {FrameCounterAsTimeStamp_=b;}
00102   protected:
00103
00104     // exports for dll (cmenk)
00105     BIAS_EXPORT_STL_VECTOR( BIASVideoSource_EXPORT, std::string )
00106
00107     BIAS::TimeMeasure timer_;
00108     // struct timeval lastTime_; -- TimeMeasure is used instead
00109
00110     // for doublebuffering this swich is used to select the frame
00111     unsigned int ActiveFrame_;
00112     bool Loop_;
00113     std::vector<std::string> FileNames_;
00114     bool KeepFPS_;
00115     bool GenerateNewUIDs_;
00116     bool FrameCounterAsTimeStamp_;
00117   };
00118
00119
00120 } // namespace MIP
00121
00122 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Disk_FindFiles.h Source File

VideoSource

VideoSource_Disk_FindFiles.h

Go to the documentation of this file.
00001 /*******************************************************************
00002 //      *** COPYRIGHT NOTICE ****
00003 //
00004 //  Copyright 2004. David Maisonave (david@axter.com)
00005 //
00006 //  This code is free for use under the following conditions:
00007 //
00008 //      You may not claim authorship of this code.
00009 //      You may not sell or distrubute this code without author's permission.
00010 //      You can use this code for your applications as you see fit, but this code may not be sold in any form
00011 //      to others for use in their applications.
00012 //      This copyright notice may not be removed.
00013 //
00014 //
00015 //  No guarantees or warranties are expressed or implied.
00016 //  This code may contain bugs.
00017 *******************************************************************/
00018 //  Please let me know of any bugs, bug fixes, or enhancements made to this code.
00019 //  If you have ideas for this, and/or tips or admonitions, I would be glad to hear them.
00020 //
00021 //////////////////////////////////////////////////////////////////////
00022
00023 //////////////////////////////////////////////////////////////////////
00024 //  Description:
00025 //  The constructor can be called with a global function
00026 //  pointer.  In which case, the class will find the files
00027 //  and pass each file that is found to the global function
00028 //  Method 2:
00029 //  The constructor can be called with OUT a global function.
00030 //  In which case, the class will simply find all files with
00031 //  the correct criteria, and store the path and file name.
00032 //  The developer can then use either the PerformFunctionOnListedFiles
00033 //  or the PerformClassFunctionOnListedFiles method.
00034 //  The first function takes a global function pointer, and
00035 //  the second function takes a class member function pointer.
00036 //  Both functions will iterate through the file name list
00037 //  and pass each file name to the function pointer.
00038 //
00039 //  Usage:
00040 //  Example 1:
00041 //  FindFilesInPath My_FindFilesInPath("C:\\temp_dir\\", "*.*");
00042 //  My_FindFilesInPath.PerformFunctionOnListedFiles(CheckForExtraNoChar);
00043 //
00044 //  Example 2:
00045 //  FindFilesInPath MyFindFilesInPath("M:\\BinSearch\\", "*.c*");
00046 //  for(std::vector<std::string>::const_iterator i = MyFindFilesInPath.c_FileList.begin();
00047 //      i != MyFindFilesInPath.c_FileList.end();++i)
00048 //  {
00049 //          cout << i->c_str() << endl;
00050 //  }
00051 //
00052 //////////////////////////////////////////////////////////////////////
00053
00054 #ifndef FindFilesInPath_H__2CC53D08_5CE6_11D4_B205_0001024219CD__INCLUDED_
00055 #define FindFilesInPath_H__2CC53D08_5CE6_11D4_B205_0001024219CD__INCLUDED_
00056
00057 #ifdef WIN32
00058 #  pragma warning( push )
00059 #  pragma warning( disable : 4512 )
00060 #endif // WIN32
00061
00062
00063 #include <vector>
00064 #include <string>
00065 #include <stdio.h>
00066 #include <stdlib.h>
00067
00068
00069 class FindFilesInPath
00070 {
00071 public:
00072   typedef void (*FUNC_PTR_type)(const std::string &FullFileName);
00073
00074   FindFilesInPath(std::string StartingPath, const std::string &FileTypes,
00075     FUNC_PTR_type fptr = NULL, bool SearchSubDir = true)
00076     : m_FuncPtr(fptr), c_FileList(m_FileList)
00077   {
00078     m_FileTypes=FileTypes;
00079     FindInDir(StartingPath, SearchSubDir);
00080
00081   }
00082
00083   void PerformFunctionOnListedFiles(FUNC_PTR_type fptr)
00084   {
00085     const int Count = m_FileList.size();
00086     for (int i = 0;i < Count;++i)
00087     {
00088       fptr( m_FileList[i]);
00089     }
00090   }
00091
00092   template<typename T, typename F>
00093     void PerformClassFunctionOnListedFiles(T &SrcObj, F func)
00094   {
00095     const int Count = m_FileList.size();
00096     for (int i = 0;i < Count;++i)
00097     {
00098       (SrcObj.*func)(m_FileList[i]);
00099     }
00100   }
00101 protected:
00102   void FindInDir(const std::string &StartingPath, bool SearchSubDir = true)
00103   {
00104     std::string Command =
00105 #ifdef WIN32
00106       ((SearchSubDir)?std::string("dir /B /S "):std::string("dir /B ")) + StartingPath + m_FileTypes;
00107 #define popen _popen
00108 #define pclose _pclose
00109 #else
00110       (SearchSubDir)?(std::string("find ") + StartingPath + " -name '" + m_FileTypes + "' -print"):(std::string("ls -1 ") + StartingPath + m_FileTypes);
00111 #endif
00112     FILE   *fp = popen(Command.c_str(), "r");
00113     if (!fp) return;
00114     char psBuffer[1024];
00115     while( !feof( fp ) )
00116     {
00117       if( fgets(psBuffer, sizeof(psBuffer), fp ) != NULL )
00118       {
00119         if (psBuffer[strlen(psBuffer)-1] == '\n')
00120           psBuffer[strlen(psBuffer)-1] = 0;
00121         m_FileList.push_back(psBuffer);
00122         if (m_FuncPtr) m_FuncPtr(psBuffer);
00123       }
00124     }
00125     pclose(fp);
00126   }
00127
00128 protected:
00129   FUNC_PTR_type m_FuncPtr;
00130   std::vector<std::string> m_FileList;
00131
00132 public:
00133   std::string m_FileTypes;
00134   std::vector<std::string> &c_FileList;
00135 };
00136
00137 #ifdef WIN32
00138 #  pragma warning(pop)
00139 #endif  // WIN32
00140
00141 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DiskPMD.cpp Source File

VideoSource

VideoSource_DiskPMD.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef  WIN32
00025 #include <unistd.h>
00026 #endif //WIN32
00027
00028 #include <string>
00029 #include <sstream>
00030 #include <iostream>
00031
00032 #include "VideoSource_DiskPMD.hh"
00033 #include <Base/Image/ImageIO.hh>
00034 #include <Image/Camera.hh>
00035 #include <Image/PMDImageProc.hh>
00036
00037 #include <Base/Common/BIASpragma.hh>
00038
00039 using namespace BIAS;
00040 using namespace std;
00041
00042
00043 BIAS::VideoSource_DiskPMD::
00044 VideoSource_DiskPMD() : VideoSource_Disk()
00045 {
00046   GenerateNewUIDs_=true;
00047 }
00048
00049 BIAS::VideoSource_DiskPMD::
00050 ~VideoSource_DiskPMD()
00051 {
00052 }
00053
00054 int BIAS::VideoSource_DiskPMD::
00055 OpenDevice()
00056 {
00057   BIASERR("use OpenDevice(const vector<string> &FileNames)");
00058   BIASABORT;
00059   return -1;
00060 }
00061
00062
00063 int VideoSource_DiskPMD::OpenDevice(const vector<string> &FileNames)
00064 {
00065
00066   // load first image and initialize some internal variables
00067   Image<unsigned char> Img2D;
00068   Image<float> ImgDepth, ImgModCoeff;
00069   PMDImageMetaData MetaData2D, MetaDataDepth;
00070   BIASDOUT(D_VSO_DISK,"FileNames[0] : "<<FileNames[0]);
00071
00072   if (PMDImageProc::Read(FileNames[0],
00073                          Img2D, ImgDepth, ImgModCoeff,
00074                          MetaData2D, MetaDataDepth)!=0) {
00075     BIASERR("unable to read "<<FileNames[0]);
00076     return -1;
00077   }
00078
00079   Width_ = MetaData2D.width;
00080   Height_ = MetaData2D.height;
00081   ColorChannels_ = MetaData2D.channels;
00082   ColorMode_ = Img2D.GetColorModel();
00083   BytesPerPixel_ = Img2D.GetDepth();
00084
00085   if (FileNames_.size() != 0)
00086     FileNames_.erase(FileNames_.begin(), FileNames_.end());
00087
00088   for (vector<string>::const_iterator i = FileNames.begin();
00089        i != FileNames.end();i++){
00090     FileNames_.push_back(*i);
00091   }
00092
00093   CompleteInitialized_ = true;
00094   ActiveFrame_ = 0;
00095
00096   return 0;
00097 }
00098
00099
00100 int VideoSource_DiskPMD::GrabSingle(Camera<unsigned char> &image)
00101 {
00102   BIASDOUT(D_VSO_DISK,"VideoSource_DiskPMD::GrabSingle()");
00103
00104   if (ActiveFrame_ == FileNames_.size()){
00105     BIASERR("VideoSource_DISK: End of input. SetLoop(true) or Rewind()");
00106     return -1;
00107   }
00108   int res;
00109   if (!Active_) {
00110     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object not active, use PreGrab()");
00111     return -1;
00112   }
00113
00114   if (Grabbing_) {
00115     BIASERR("VideoSource_Disk::GrabSingle(): VideoSource Object is already grabbing()");
00116     return -1;
00117   }
00118
00119   // Add Metadata to the Camera via Projection Object
00120
00121   Grabbing_ = true;
00122   PMDImageMetaData MetaData2D, MetaDataDepth;
00123   res = PMDImageProc::Read(FileNames_[ActiveFrame_],
00124                            image,
00125                            DepthImg_,
00126                            ModCoeffImg_,
00127                            MetaData2D, MetaDataDepth);
00128
00129   KMatrix K2D = PMDImageProc::KFromMeta(MetaData2D);
00130   KMatrix Kdepth = PMDImageProc::KFromMeta(MetaDataDepth);
00131
00132   Pose Pose2D = PMDImageProc::PoseFromMeta(MetaData2D);
00133   Pose PoseDepth = PMDImageProc::PoseFromMeta(MetaDataDepth);
00134
00135   Projection Proj2D, ProjDepth;
00136   Vector4<double> UndistCoeff2D(MetaData2D.UndistCoeff);
00137   Vector4<double> UndistCoeffDepth(MetaDataDepth.UndistCoeff);
00138   Proj2D.CreatePerspective(Pose2D, K2D,
00139                            MetaData2D.width, MetaData2D.height,
00140                            UndistCoeff2D);
00141   ProjDepth.CreatePerspective(PoseDepth, Kdepth,
00142                               MetaDataDepth.width, MetaDataDepth.height,
00143                               UndistCoeffDepth);
00144   image.SetProj(Proj2D);
00145   image.UpdateMetaData();
00146   image.SetUID(BIAS::UUID::GenerateUUID());
00147   DepthImg_.SetProj(ProjDepth);
00148   DepthImg_.UpdateMetaData();
00149   DepthImg_.SetUID(image.GetUID());
00150   ModCoeffImg_.SetProj(ProjDepth);
00151   ModCoeffImg_.UpdateMetaData();
00152   ModCoeffImg_.SetUID(image.GetUID());
00153
00154   if (res<0) {
00155     BIASERR("VideoSource_Disk::GrabSingle(): Unable to read image: "
00156             << FileNames_[ActiveFrame_]);
00157    return res;
00158   }
00159
00160   // set time to _now_
00161   if (FrameCounterAsTimeStamp_) image.SetTime(ActiveFrame_,0);
00162   else {
00163     timeval tv;
00164     gettimeofday(&tv, NULL);
00165     image.SetTime(tv.tv_sec,tv.tv_usec);
00166   }
00167   if(ActiveFrame_<FileNames_.size()-1){
00168     BIASDOUT(D_VSO_DISK,"GrabSingle() "<<ActiveFrame_<<"  "<<
00169              FileNames_[ActiveFrame_]);
00170     ActiveFrame_++;
00171   }
00172   else if (Loop_) {
00173     ActiveFrame_=0;
00174     BIASDOUT(D_VSO_DISK,"GrabSingle() restarting with first file");
00175   }
00176   else ActiveFrame_++;
00177
00178   Grabbing_ = false;
00179   BIASDOUT(D_VSO_DISK,"leaving GrabSingle()");
00180   // check time and sleep while enough time elapsed
00181   double secPerFrame=1.0/FramesPerSecond_;
00182
00183   //struct timeval now;         -- displaced by TimeMeasure
00184   //double secs=0.0;            --         -"-
00185   //while (secs<=secPerFrame) { --         -"-
00186   if(KeepFPS_) {
00187     timer_.Stop();
00188     while (timer_.GetRealTime()<=(1E06*secPerFrame)) {
00189       timer_.Start();
00190 #ifdef   WIN32
00191       Sleep(1);        //go sleeping for 1 msec
00192 #else  //not WIN32
00193       usleep(1000);     //go sleeping for 1 msec
00194 #endif //WIN32
00195       timer_.Stop();
00196
00197     }
00198     timer_.Reset();
00199     timer_.Start();
00200   }
00201   //lastTime_=now;   -- displaced by TimeMeasure
00202
00203   return 0;
00204 }
00205
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DiskPMD.hh Source File

VideoSource

VideoSource_DiskPMD.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026 #ifndef __MIPVIDEOSOURCE_DISKPMD_HH__
00027 #define __MIPVIDEOSOURCE_DISKPMD_HH__
00028
00029 #include <VideoSource/VideoSource_Disk.hh>
00030 #include <Image/Camera.hh>
00031
00032 /* no longer in use -- timemeasure instead
00033 #include <sys/time.h>
00034 */
00035
00036 namespace BIAS {
00037
00038   /** @class VideSource_DiskPMD
00039       @brief reads PMD-tiffs with depth images and modulation coefficients
00040       @author streckel 05/2006 */
00041   class BIASVideoSource_EXPORT VideoSource_DiskPMD : public VideoSource_Disk {
00042
00043   public:
00044     VideoSource_DiskPMD();
00045
00046     virtual ~VideoSource_DiskPMD();
00047
00048     virtual int OpenDevice(const std::vector<std::string> &FileNames);
00049
00050     virtual int OpenDevice();
00051
00052     /** Returns the 2D image, and reads depth and modulation coefficients */
00053     virtual int GrabSingle(Camera<unsigned char> &image);
00054
00055     /** Returns the depth image. Must be called after GrabSingle() */
00056     inline int GrabSingleDepth(Camera<float> &image)
00057     {
00058       if (!DepthImg_.IsEmpty()) {
00059         image = DepthImg_;
00060         return 0;
00061       }
00062       return -1;
00063     }
00064
00065     /** Returns the depth image. Must be called after GrabSingle() */
00066     inline int GrabSingleModCoeff(Camera<float> &image)
00067     {
00068       if (!ModCoeffImg_.IsEmpty()) {
00069         image = ModCoeffImg_;
00070         return 0;
00071       }
00072       return -1;
00073     }
00074
00075     void SetGenerateNewUIDs(bool s) {
00076       BIASERR("Always generating new UUIDS for PMD images");
00077       BIASABORT;
00078     }
00079
00080   protected:
00081     VideoSource_Disk *vsd_;
00082
00083     //BIAS::Camera<unsigned char> 2DImg_;
00084     BIAS::Camera<float> DepthImg_, ModCoeffImg_;
00085
00086   };
00087
00088 } // namespace MIP
00089
00090 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DSHOW.cpp Source File

VideoSource

VideoSource_DSHOW.cpp

Go to the documentation of this file.
00001 #include "VideoSource_DSHOW.hh"
00002 #include <Base/Image/ImageIO.hh>
00003 #include <Base/Image/ImageConvert.hh>
00004 #include <stdio.h>
00005
00006
00007 using namespace BIAS;
00008 using namespace std;
00009
00010
00011
00012
00013 VideoSource_DSHOW::VideoSource_DSHOW(bool bShowDialogs): VideoSource()
00014 {
00015   dWidth_                 = 640;
00016     dHeight_                = 480;
00017     dDepth_                 = 1;
00018     dDsBufferSize_          = 0;
00019   pDsBuffer_              = NULL;
00020     pMediaControl_          = NULL;
00021     pMediaEvent_            = NULL;
00022     pGraphBuilder_          = NULL;
00023   pCaptureGraphBuilder2_  = NULL;
00024     pGrabber_               = NULL;
00025     pNullRenderer_          = NULL;
00026   bShowDialogs_           = bShowDialogs;
00027   pImageBuffer_           = NULL;
00028   sCaptureDeviceName_     = "";
00029   BIASColorModel_         = BIAS::ImageBase::CM_BGR;
00030   MediaSubTypeColorModel_ = MEDIASUBTYPE_None;
00031   FGCB                    = NULL; //callback pointer
00032   SetSizeAndColorModel(dWidth_,dHeight_,dDepth_,BIASColorModel_);
00033 }
00034
00035 VideoSource_DSHOW::VideoSource_DSHOW(int width, int height,int depth,bool bShowDialogs): VideoSource()
00036 {
00037   dWidth_                 = width;
00038     dHeight_                = height;
00039     dDepth_                 = depth;
00040     dDsBufferSize_          = 0;
00041   pDsBuffer_              = NULL;
00042     pMediaControl_          = NULL;
00043     pMediaEvent_            = NULL;
00044     pGraphBuilder_          = NULL;
00045   pCaptureGraphBuilder2_  = NULL;
00046     pGrabber_               = NULL;
00047     pNullRenderer_          = NULL;
00048   bShowDialogs_           = bShowDialogs;
00049   pImageBuffer_           = NULL;
00050   sCaptureDeviceName_     = "";
00051   BIASColorModel_         = BIAS::ImageBase::CM_BGR;
00052   MediaSubTypeColorModel_ = MEDIASUBTYPE_None;
00053   FGCB                    = NULL; //callback pointer
00054   SetSizeAndColorModel(dWidth_,dHeight_,dDepth_,BIASColorModel_);
00055 }
00056
00057
00058 VideoSource_DSHOW::~VideoSource_DSHOW()
00059 {
00060   if(pImageBuffer_!=NULL)
00061     delete [] pImageBuffer_;
00062   if(pDsBuffer_!=NULL)
00063     delete [] pDsBuffer_;
00064   if(FGCB != NULL)
00065     delete FGCB;
00066 }
00067
00068 int VideoSource_DSHOW::InitImage(BIAS::ImageBase &Image){
00069   if (!Image.IsEmpty())
00070     BIASERR("VideoSource::InitImage() should be called with uninitialized image");
00071
00072   Image.Init(GetWidth(), GetHeight(),GetColorChannels());
00073   Image.SetColorModel(BIASColorModel_);
00074
00075   return 0;
00076 }
00077
00078
00079 int VideoSource_DSHOW::OpenDevice(const char * device)
00080 {
00081   sCaptureDeviceName_ = device;
00082   InitVideoCapture_();
00083   return 0;
00084 }
00085
00086 int VideoSource_DSHOW::OpenDevice(unsigned int width, unsigned int height, unsigned int channels,
00087     const char * device,BIAS::ImageBase::EColorModel model/* = BIAS::ImageBase::CM_RGB*/)
00088 {
00089   sCaptureDeviceName_ = device;
00090   SetSize(width,height,channels);
00091   SetColorModel(model);
00092   InitVideoCapture_();
00093   return 0;
00094 }
00095
00096 int VideoSource_DSHOW::CloseDevice()
00097 {
00098   pGrabber_.Release();
00099   pNullRenderer_.Release();
00100   pSrcFilter_.Release();
00101   pMediaControl_->Stop();
00102   pMediaControl_.Release();
00103   pMediaEvent_.Release();
00104   pGraphBuilder_.Release();
00105   pCaptureGraphBuilder2_.Release();
00106   return 0;
00107 }
00108
00109
00110 int VideoSource_DSHOW::GrabSingle(BIAS::Camera <unsigned char> &image)
00111 {
00112   image.CopyIn_NoInit(FGCB->camera_.GetImageData());
00113   return 0;
00114 }
00115
00116
00117 void VideoSource_DSHOW::DeleteMediaType_(AM_MEDIA_TYPE *pmt)
00118 {
00119     // allow NULL pointers for coding simplicity
00120
00121     if (pmt == NULL) {
00122         return;
00123     }
00124
00125     if (pmt->cbFormat != 0) {
00126         CoTaskMemFree((PVOID)pmt->pbFormat);
00127
00128         // Strictly unnecessary but tidier
00129         pmt->cbFormat = 0;
00130         pmt->pbFormat = NULL;
00131     }
00132     if (pmt->pUnk != NULL) {
00133         pmt->pUnk->Release();
00134         pmt->pUnk = NULL;
00135     }
00136
00137     CoTaskMemFree((PVOID)pmt);
00138 }
00139
00140
00141 int VideoSource_DSHOW::PreGrab()
00142 {
00143   return 0;
00144 }
00145
00146 int VideoSource_DSHOW::PostGrab()
00147 {
00148     return 0;
00149 }
00150
00151 bool VideoSource_DSHOW::DisplayPinProperties_( CComPtr<IPin> pSrcPin )
00152 {
00153     CComPtr<ISpecifyPropertyPages> pPages;
00154
00155     HRESULT hr = pSrcPin->QueryInterface(IID_ISpecifyPropertyPages, (void**)&pPages);
00156     if (SUCCEEDED(hr))
00157     {
00158         PIN_INFO PinInfo;
00159         pSrcPin->QueryPinInfo(&PinInfo);
00160
00161         CAUUID caGUID;
00162         pPages->GetPages(&caGUID);
00163
00164         OleCreatePropertyFrame(
00165             NULL,
00166             0,
00167             0,
00168             L"Property Sheet",
00169             1,
00170             (IUnknown **)&(pSrcPin),
00171             caGUID.cElems,
00172             caGUID.pElems,
00173             0,
00174             0,
00175             NULL);
00176
00177         CoTaskMemFree(caGUID.pElems);
00178         PinInfo.pFilter->Release();
00179     }
00180     return false;
00181 }
00182
00183 bool VideoSource_DSHOW::DisplayFilterProperties( CComPtr<IBaseFilter> pFilter)
00184 {
00185     CComPtr<ISpecifyPropertyPages> pProp;
00186     HRESULT hr = pFilter->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pProp);
00187     if (SUCCEEDED(hr))
00188     {
00189         // Get the filter's name and IUnknown pointer.
00190         FILTER_INFO FilterInfo;
00191         pFilter->QueryFilterInfo(&FilterInfo);
00192
00193         // Show the page.
00194         CAUUID caGUID;
00195         pProp->GetPages(&caGUID);
00196         OleCreatePropertyFrame(
00197             NULL,                   // Parent window
00198             0, 0,                   // (Reserved)
00199             FilterInfo.achName,     // Caption for the dialog box
00200             1,                      // Number of objects (just the filter)
00201             (IUnknown **)&pFilter,  // Array of object pointers.
00202             caGUID.cElems,          // Number of property pages
00203             caGUID.pElems,          // Array of property page CLSIDs
00204             0,                      // Locale identifier
00205             0, NULL);               // Reserved
00206
00207         // Clean up.
00208         if(FilterInfo.pGraph != NULL)
00209             FilterInfo.pGraph->Release();
00210         CoTaskMemFree(caGUID.pElems);
00211         return( true );
00212     }
00213     else
00214         return( false );
00215 }
00216
00217 void VideoSource_DSHOW::DisplaySourcePinProperties()
00218 {
00219   if(pOutPin_)
00220   {
00221       DisplayPinProperties_(pOutPin_);
00222   }
00223 }
00224
00225
00226 bool VideoSource_DSHOW::DisplayCameraProperties()
00227 {
00228   CComPtr<IBaseFilter> pFilter = pSrcFilter_;
00229     CComPtr<ISpecifyPropertyPages> pProp;
00230     HRESULT hr = pFilter->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pProp);
00231     if (SUCCEEDED(hr))
00232     {
00233         // Get the filter's name and IUnknown pointer.
00234         FILTER_INFO FilterInfo;
00235         pFilter->QueryFilterInfo(&FilterInfo);
00236
00237         // Show the page.
00238         CAUUID caGUID;
00239         pProp->GetPages(&caGUID);
00240         OleCreatePropertyFrame(
00241             NULL,                   // Parent window
00242             0, 0,                   // (Reserved)
00243             FilterInfo.achName,     // Caption for the dialog box
00244             1,                      // Number of objects (just the filter)
00245             (IUnknown **)&pFilter,  // Array of object pointers.
00246             caGUID.cElems,          // Number of property pages
00247             caGUID.pElems,          // Array of property page CLSIDs
00248             0,                      // Locale identifier
00249             0, NULL);               // Reserved
00250
00251         // Clean up.
00252         if(FilterInfo.pGraph != NULL)
00253             FilterInfo.pGraph->Release();
00254         CoTaskMemFree(caGUID.pElems);
00255         return( true );
00256     }
00257     else
00258         return( false );
00259 }
00260
00261 ///////////////////////////////////////////////////////////////
00262 void VideoSource_DSHOW::DetermineColorModel_()
00263 {
00264   if(BIASColorModel_ != BIAS::ImageBase::CM_invalid)
00265   {
00266     if(BIASColorModel_ == BIAS::ImageBase::CM_RGB)
00267       MediaSubTypeColorModel_ = MEDIASUBTYPE_RGB24;
00268     if(BIASColorModel_ == BIAS::ImageBase::CM_RGBA)
00269       MediaSubTypeColorModel_ = MEDIASUBTYPE_RGB32;
00270     if(BIASColorModel_ == BIAS::ImageBase::CM_Grey)
00271       MediaSubTypeColorModel_ = MEDIASUBTYPE_RGB1;
00272     if(BIASColorModel_ == BIAS::ImageBase::CM_UYVY422)
00273       MediaSubTypeColorModel_ = MEDIASUBTYPE_UYVY;
00274     if(BIASColorModel_ == BIAS::ImageBase::CM_YUV420P)
00275       MediaSubTypeColorModel_ = MEDIASUBTYPE_Y41P;
00276   }
00277   else
00278     MediaSubTypeColorModel_ = MEDIASUBTYPE_None;
00279 }
00280
00281 void VideoSource_DSHOW::DetermineBIASColorModel_()
00282 {
00283   if(MediaSubTypeColorModel_ != MEDIASUBTYPE_None)
00284   {
00285     if(MediaSubTypeColorModel_ == MEDIASUBTYPE_RGB24 || MediaSubTypeColorModel_== MEDIASUBTYPE_RGB32)
00286       BIASColorModel_ = BIAS::ImageBase::CM_BGR;
00287     else if(MediaSubTypeColorModel_ == MEDIASUBTYPE_RGB1)
00288       BIASColorModel_ = BIAS::ImageBase::CM_Grey;
00289     else if(MediaSubTypeColorModel_ == MEDIASUBTYPE_UYVY)
00290       BIASColorModel_ = BIAS::ImageBase::CM_UYVY422;
00291     else if(MediaSubTypeColorModel_ == MEDIASUBTYPE_Y41P)
00292       BIASColorModel_ = BIAS::ImageBase::CM_YUV420P;
00293     else if(MediaSubTypeColorModel_ == MEDIASUBTYPE_IYUV)
00294       BIASColorModel_ = BIAS::ImageBase::CM_YUV411;
00295     else if(MediaSubTypeColorModel_ ==MEDIASUBTYPE_Y411)
00296       BIASColorModel_ = BIAS::ImageBase::CM_YUV411;
00297     else if(MediaSubTypeColorModel_ ==MEDIASUBTYPE_Y211)
00298       BIASColorModel_ = BIAS::ImageBase::CM_YUV420P;
00299     else
00300       BIASColorModel_ = BIAS::ImageBase::CM_YUV420P;
00301   }
00302   else
00303     BIASColorModel_ = BIAS::ImageBase::CM_RGB;
00304 }
00305
00306 HRESULT VideoSource_DSHOW::InitVideoCapture_()
00307 {
00308     HRESULT hr;
00309     // initialize the COM library.
00310       CoInitialize(0);
00311
00312     // Get DirectShow interfaces
00313     hr = GetInterfaces_();
00314     if (FAILED(hr))
00315     {
00316         BIASERR( "Failed to get video interfaces! ");
00317         return hr;
00318     }
00319
00320     // Use the system device enumerator and class enumerator to find
00321     // a video capture/preview device, such as a desktop USB video camera.
00322     hr = FindCaptureDevice_(&pSrcFilter_);
00323     if (FAILED(hr))
00324     {
00325         // Don't display a message because FindCaptureDevice will handle it
00326         return hr;
00327      }
00328
00329
00330     // Add Capture filter to our graph.
00331     hr = pGraphBuilder_->AddFilter(pSrcFilter_, L"Video Capture");
00332     if (FAILED(hr))
00333     {
00334         BIASERR("Couldn't add the capture filter to the graph! \n"<<
00335             "If you have a working video capture device, please make sure\n"<<
00336             "that it is connected and is not being used by another application.");
00337         pSrcFilter_.Release();
00338         return hr;
00339     }
00340
00341      // get the output pin of the Capture device filter
00342       if(pSrcFilter_->FindPin(L"Capture",&pOutPin_)!=S_OK)
00343       if (pSrcFilter_->FindPin(L"0",&pOutPin_)!=S_OK)
00344           if (pSrcFilter_->FindPin(L"Out",&pOutPin_)!=S_OK)
00345               if (pSrcFilter_->FindPin(L"1",&pOutPin_)!=S_OK)
00346                   throw exception("Could not find Source Outpin");
00347
00348     if( pOutPin_ )
00349     {
00350         cout<< "Found VideoSource Outpin" << endl;
00351         if(bShowDialogs_)
00352           DisplayPinProperties_( pOutPin_ );
00353     }
00354
00355     //DisplayCameraProperties();
00356
00357     //here determine size and set
00358     IAMStreamConfig * pConfig=0;
00359     hr = pCaptureGraphBuilder2_->FindInterface(&PIN_CATEGORY_CAPTURE,
00360                                       &MEDIATYPE_Video,
00361                                       pSrcFilter_, IID_IAMStreamConfig, (void **)&pConfig);
00362
00363     if(hr != NOERROR)
00364     {
00365         hr = pCaptureGraphBuilder2_->FindInterface(&PIN_CATEGORY_CAPTURE,
00366                                           &MEDIATYPE_Interleaved, pSrcFilter_,
00367                                           IID_IAMStreamConfig, (void **)&pConfig);
00368     }
00369
00370     // define two media types to detect correct one
00371       AM_MEDIA_TYPE *pSourceVideoFormat = NULL, * pNewVideoFormat = NULL;
00372     if((hr = pConfig->GetFormat(&pSourceVideoFormat)) == S_OK)
00373     {
00374         // Examine the media type for any information you need.
00375         if(pSourceVideoFormat->majortype == MEDIATYPE_Video)
00376         {
00377             MediaSubTypeColorModel_ = pSourceVideoFormat->subtype;
00378           if(MediaSubTypeColorModel_ == MEDIASUBTYPE_RGB32){
00379             MediaSubTypeColorModel_ = MEDIASUBTYPE_RGB24;
00380             pSourceVideoFormat->subtype = MediaSubTypeColorModel_;
00381           }
00382         }
00383         else{
00384           //get mediatype from videosource
00385           BIASERR("The major format type is NOT video");
00386         }
00387         DetermineBIASColorModel_(); //determine corresponding BIAS ColorModel
00388
00389         pSourceVideoFormat->formattype = FORMAT_VideoInfo;
00390         VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)pSourceVideoFormat->pbFormat;
00391         vih->bmiHeader.biWidth = GetWidth();
00392         vih->bmiHeader.biHeight = GetHeight();
00393         vih->bmiHeader.biBitCount = (WORD)GetColorChannels()*8;
00394             hr = pConfig->SetFormat( pSourceVideoFormat );
00395         if(FAILED(hr))
00396           cout<<"Error Videoformat is inconsistent"<<endl;
00397     }
00398     DeleteMediaType_(pSourceVideoFormat);
00399
00400     pConfig->Release();
00401
00402     IEnumMediaTypes * pMedia=0;
00403     vector<AM_MEDIA_TYPE *> vpfnt;
00404
00405     //outpin is outpin from pSrcFilter_
00406       hr = pOutPin_->EnumMediaTypes( &pMedia );
00407       if( (hr = pOutPin_->EnumMediaTypes( &pMedia )) == S_OK)
00408       {
00409           while(pMedia->Next(1, &pSourceVideoFormat, 0) == S_OK)
00410           {
00411         if( pSourceVideoFormat->formattype == FORMAT_VideoInfo )
00412               {
00413           VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)pSourceVideoFormat->pbFormat;
00414           int dCurWidth = vih->bmiHeader.biWidth;
00415           int dCurHeight = vih->bmiHeader.biHeight;
00416
00417           if( dCurWidth == GetWidth() && dCurHeight == GetHeight() )// && sfcc == "IYUV")
00418                   {
00419             // this is the correct new Video Format
00420             pNewVideoFormat = pSourceVideoFormat;
00421           }
00422         }
00423         else if( pSourceVideoFormat->formattype == FORMAT_None )
00424             cout<<"Format type: FORMAT_None"<<endl;
00425         else if( pSourceVideoFormat->formattype == FORMAT_DvInfo )
00426              cout<<"Format type: FORMAT_DvInfo"<<endl;
00427         else if( pSourceVideoFormat->formattype == FORMAT_MPEGVideo )
00428           cout<<"Format type: FORMAT_MPEGVideo"<<endl;
00429         else if( pSourceVideoFormat->formattype == FORMAT_MPEG2Video )
00430              cout<<"Format type: FORMAT_MPEG2Video"<<endl;
00431         else if( pSourceVideoFormat->formattype == FORMAT_VideoInfo2 )
00432               cout<<"Format type: FORMAT_VideoInfo2"<<endl;
00433       }
00434           pMedia->Release();
00435     }
00436
00437     //finally set the new videoFormat
00438         if( pNewVideoFormat != 0 )
00439         {
00440             pConfig->SetFormat( pNewVideoFormat );
00441             int dWidth = ((VIDEOINFOHEADER *)pNewVideoFormat->pbFormat)->bmiHeader.biWidth;
00442             int dHeight = ((VIDEOINFOHEADER *)pNewVideoFormat->pbFormat)->bmiHeader.biHeight;
00443       double dDepth = ((VIDEOINFOHEADER *)pNewVideoFormat->pbFormat)->bmiHeader.biBitCount;
00444       if(dDepth == 12)
00445         dDepth = 2;
00446       else
00447         dDepth /= 8;
00448       SetSizeAndColorModel(dWidth,dHeight,(int)dDepth,BIASColorModel_);
00449             DeleteMediaType_( pNewVideoFormat );
00450     }
00451
00452     // add sample grabber
00453     CComQIPtr< IBaseFilter, &IID_IBaseFilter > pGrabberBase( pGrabber_ );
00454       if ( (hr =  pGraphBuilder_->AddFilter(pGrabberBase,L"SampleGrabber")) != S_OK)
00455     {
00456           BIASERR("Couldn't add the grab filter.");
00457       }
00458     //set mediatype to sample grabber
00459     hr = pConfig->GetFormat( &pNewVideoFormat );
00460     if( (hr = pGrabber_->SetMediaType(pNewVideoFormat)) != S_OK )
00461     {
00462           BIASERR("Setting Media Type failed!");
00463       }
00464     DeleteMediaType_( pNewVideoFormat );
00465
00466
00467          // get the SampleGrabber Input Pin
00468       if (pGrabberBase->FindPin(L"In",&pInPin_) != S_OK)
00469           cout << "Could not find SampleGrabber Input Pin" << endl;
00470
00471       // connect SmartTee and SampleGrabber
00472       if ((hr = pGraphBuilder_->Connect(pOutPin_,pInPin_))!=S_OK)
00473           cout << "Could not not connect Camera Source and SampleGrabber Pins" << endl;
00474     else
00475       cout<< "Succesfully connected Camera Source and SampleGrabber Pins" <<endl;
00476
00477     // add the NullRenderer filter
00478       hr = pGraphBuilder_->AddFilter(pNullRenderer_,L"NullRenderer");
00479       if (FAILED(hr))
00480       {
00481           BIASERR("Couldn't add the grab filter.");
00482       }
00483
00484    // get the SampleGrabber Output Pin
00485     if (pGrabberBase->FindPin(L"Out",&pSampleOutPin_)!=S_OK)
00486         cout<<"Pin out of SampleGrabber not found"<<endl;
00487
00488     // get the NullRenderer Input Pin
00489     if (pNullRenderer_->FindPin(L"In",&pInPin_)!=S_OK)
00490         cout<< "Could not find NullRenderer Input Pin" <<endl;
00491
00492     // connect SampleGrabber and NullRenderer
00493     if (pGraphBuilder_->Connect(pSampleOutPin_,pInPin_)!= S_OK)
00494         cout<< "Could not not connect SampleGrabber and NullRenderer Pins" <<endl;
00495   else
00496     cout<<"Succesfully connected SampleGrabber and NullRenderer Pins" << endl;
00497
00498     pGrabber_->SetBufferSamples(FALSE);
00499     pGrabber_->SetOneShot(FALSE);
00500   if(FGCB == NULL)
00501     FGCB = new MySampleGrabberCB(GetWidth(),GetHeight(),GetColorChannels());
00502   pGrabber_->SetCallback(FGCB,0);
00503
00504   EnumFilters_(pGraphBuilder_);
00505
00506   // Start video data source
00507     hr = pMediaControl_->Run();
00508     if (FAILED(hr))
00509     {
00510         BIASERR("Couldn't run the graph!  ");
00511         return hr;
00512     }
00513
00514   //SaveGraphFile_(pGraphBuilder_,L"C:\\MyGraf.grf");
00515   return S_OK;
00516 }
00517
00518 HRESULT VideoSource_DSHOW::GetInterfaces_(void)
00519 {
00520     HRESULT hr;
00521
00522     // Create the filter graph
00523     hr = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
00524                            IID_IGraphBuilder, (void **) &pGraphBuilder_);
00525     if (FAILED(hr))
00526         return hr;
00527
00528     // Create the capture graph builder
00529     hr = CoCreateInstance(CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
00530                            IID_ICaptureGraphBuilder2, (void **) &pCaptureGraphBuilder2_);
00531     if (FAILED(hr))
00532         return hr;
00533     // Attach the filter graph to the capture graph
00534     hr = pCaptureGraphBuilder2_->SetFiltergraph(pGraphBuilder_);
00535     if (FAILED(hr))
00536     {
00537         BIASERR("Failed to set capture filter graph!");
00538         return hr;
00539     }
00540
00541     // Obtain interfaces for media control and Video Window
00542     hr = pGraphBuilder_->QueryInterface(IID_IMediaControl,(LPVOID *) &pMediaControl_);
00543     if (FAILED(hr))
00544         return hr;
00545
00546     hr = pGraphBuilder_->QueryInterface(IID_IMediaEvent, (LPVOID *) &pMediaEvent_);
00547     if (FAILED(hr))
00548         return hr;
00549
00550       // Create NullRenderer Instance
00551       hr = pNullRenderer_.CoCreateInstance(CLSID_NullRenderer);
00552       if (FAILED(hr))
00553           return hr;
00554
00555       // Create SampleGrabber Instance
00556       // ISampleGrabber can Queried on this Filter to Grab Samples from the running Graph
00557       hr = pGrabber_.CoCreateInstance(CLSID_SampleGrabber);
00558       if(FAILED(hr))
00559       {
00560           MessageBox( GetDesktopWindow(), "Could not create the SampleGrabber filter.", "ImageSourceDShow", MB_OK | MB_ICONERROR );
00561           exit( -1 );
00562     }
00563
00564     return hr;
00565 }
00566
00567 HRESULT VideoSource_DSHOW::FindCaptureDevice_(IBaseFilter ** ppSrcFilter)
00568 {
00569     HRESULT hr;
00570     IBaseFilter * pSrc = NULL;
00571     CComPtr <IMoniker> pMoniker =NULL;
00572     ULONG cFetched=0;
00573
00574     if (!ppSrcFilter)
00575         return E_POINTER;
00576
00577     // Create the system device enumerator
00578     CComPtr <ICreateDevEnum> pDevEnum =NULL;
00579
00580     hr = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
00581                            IID_ICreateDevEnum, (void **) &pDevEnum);
00582     if (FAILED(hr))
00583     {
00584         BIASERR("Couldn't create system enumerator!");
00585         return hr;
00586     }
00587
00588     // Create an enumerator for the video capture devices
00589     IEnumMoniker* pClassEnum = 0;
00590
00591     hr = pDevEnum->CreateClassEnumerator (CLSID_VideoInputDeviceCategory, &pClassEnum, 0);
00592     if (FAILED(hr))
00593     {
00594         BIASERR("Couldn't create class enumerator! Now DirectShow Hardware?");
00595         return hr;
00596     }
00597
00598     //////////////////// new
00599     pClassEnum->Reset();
00600     IMoniker *pM =0;
00601     while(hr = pClassEnum->Next(1, &pM, &cFetched), hr==S_OK )
00602     {
00603         IPropertyBag *pBag;
00604         hr = pM->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pBag);
00605         if(SUCCEEDED(hr))
00606         {
00607             VARIANT var;
00608             var.vt = VT_BSTR;
00609       hr = pBag->Read(L"FriendlyName", &var, NULL);
00610             if (hr == NOERROR)
00611             {
00612                 string cDevName = (char*)((_bstr_t)(var.bstrVal));
00613
00614         // if the string is empty, take first device
00615         // if device is equal to defined string take it as well
00616         if(sCaptureDeviceName_ == "" ||
00617           sCaptureDeviceName_.compare(cDevName)==0)
00618         {
00619                   cout<< "Found CaptureDevice: " << cDevName.c_str() <<endl;
00620                   hr = pM->BindToObject(0, 0, IID_IBaseFilter, (void**)&pSrc);
00621           if(!SUCCEEDED(hr))
00622             cout<< "Failed to bind to object!" <<endl;
00623           else
00624             cout<< "Succesfully bound to object!" <<endl;
00625           break;
00626         }
00627         else
00628             cout<<"The defined device is not found taking next.."<<endl;
00629
00630                 SysFreeString(var.bstrVal);
00631             }
00632             pBag->Release();
00633         }
00634         pM->Release();
00635     }
00636     *ppSrcFilter = pSrc;
00637
00638     return hr;
00639 }
00640
00641 HRESULT VideoSource_DSHOW::EnumFilters_(IFilterGraph *pGraph)
00642 {
00643     IEnumFilters *pEnum = NULL;
00644     IBaseFilter *pFilter;
00645     ULONG cFetched;
00646
00647     HRESULT hr = pGraph->EnumFilters(&pEnum);
00648     if (FAILED(hr)) return hr;
00649
00650     while(pEnum->Next(1, &pFilter, &cFetched) == S_OK)
00651     {
00652         FILTER_INFO FilterInfo;
00653         hr = pFilter->QueryFilterInfo(&FilterInfo);
00654         if (FAILED(hr))
00655         {
00656             MessageBox(NULL, TEXT("Could not get the filter info"),
00657                 TEXT("Error"), MB_OK | MB_ICONERROR);
00658             continue;  // Maybe the next one will work.
00659         }
00660
00661         // The FILTER_INFO structure holds a pointer to the Filter Graph
00662         // Manager, with a reference count that must be released.
00663         if (FilterInfo.pGraph != NULL)
00664         {
00665             FilterInfo.pGraph->Release();
00666         }
00667         if( bShowDialogs_ )
00668             DisplayFilterProperties( pFilter );
00669
00670       /*  IPin * pPin = GetPin( pFilter, PINDIR_INPUT );
00671         pPin->Release();*/
00672
00673         pFilter->Release();
00674     }
00675
00676     pEnum->Release();
00677     return hr;
00678 }
00679
00680 // Pass it a file name in wszPath, and it will save the filter graph
00681 // to that file.
00682 HRESULT VideoSource_DSHOW::SaveGraphFile_(IGraphBuilder *pGraph, WCHAR *wszPath)
00683 {
00684     const WCHAR wszStreamName[] = L"ActiveMovieGraph";
00685     HRESULT hr;
00686     IStorage *pStorage = NULL;
00687
00688     // First, create a document file that will hold the GRF file
00689     hr = StgCreateDocfile(
00690          wszPath,
00691          STGM_CREATE | STGM_TRANSACTED | STGM_READWRITE |
00692             STGM_SHARE_EXCLUSIVE,
00693          0, &pStorage);
00694     if(FAILED(hr))
00695     {
00696         return hr;
00697     }
00698
00699     // Next, create a stream to store.
00700     IStream *pStream;
00701     hr = pStorage->CreateStream(
00702          wszStreamName,
00703          STGM_WRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE,
00704          0, 0, &pStream);
00705     if (FAILED(hr))
00706     {
00707         pStorage->Release();
00708         return hr;
00709     }
00710
00711     // The IpersistStream::Save method converts a stream
00712     // into a persistent object.
00713     IPersistStream *pPersist = NULL;
00714     pGraph->QueryInterface(IID_IPersistStream,
00715                            reinterpret_cast<void**>(&pPersist));
00716     hr = pPersist->Save(pStream, TRUE);
00717     pStream->Release();
00718     pPersist->Release();
00719     if (SUCCEEDED(hr))
00720     {
00721         hr = pStorage->Commit(STGC_DEFAULT);
00722     }
00723     pStorage->Release();
00724     return hr;
00725 }
00726
00727
00728 ////////////////////////////////////////////////////////////////////////
00729
00730 //constructor
00731 MySampleGrabberCB::MySampleGrabberCB(int width, int height, int depth)
00732 {
00733   if(!(camera_.GetImageData()==NULL))
00734     camera_.Release();
00735   camera_.Init(width,height,depth);
00736 }
00737
00738 /****************************************************************/
00739
00740 MySampleGrabberCB::~MySampleGrabberCB() {
00741   if(!(camera_.GetImageData()==NULL))
00742     camera_.Release();
00743 }
00744 /****************************************************************/
00745 STDMETHODIMP MySampleGrabberCB::BufferCB(double SampleTime, BYTE *pBuffer, long BufferLen)
00746 {
00747   unsigned char *pImageData = camera_.GetImageData();
00748   memcpy(pImageData,pBuffer,BufferLen);
00749   return S_OK;
00750 }
00751
00752 /****************************************************************/
00753 STDMETHODIMP MySampleGrabberCB::SampleCB(double SampleTime, IMediaSample *pSample)
00754 {
00755   unsigned char *pImageData = camera_.GetImageData();
00756   BYTE *pSampleData;
00757   pSample->GetPointer(&pSampleData);
00758   long size = pSample->GetSize();
00759
00760   memcpy(pImageData,pSampleData,size);
00761
00762     return S_OK;
00763 }
00764
00765 /****************************************************************/
00766
00767 STDMETHODIMP MySampleGrabberCB::QueryInterface(REFIID riid, void ** ppv) {
00768
00769     if( riid == IID_ISampleGrabberCB || riid == IID_IUnknown ) {
00770         *ppv = (void *) static_cast<ISampleGrabberCB*> ( this );
00771         return NOERROR;
00772     }
00773     return E_NOINTERFACE;
00774 }
00775
00776
00777
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DSHOW.hh Source File

VideoSource

VideoSource_DSHOW.hh

Go to the documentation of this file.
00001 #ifndef __MIPVIDEOSOURCE_DSHOW_HH__
00002 #define __MIPVIDEOSOURCE_DSHOW_HH__
00003
00004 #include <bias_config.h>
00005
00006
00007 #include <atlbase.h>
00008 #include <windows.h>
00009 #include <dshow.h>
00010 #include <stdio.h>
00011 #include <VideoSource/VideoSource_Base.hh>
00012 #include <qedit.h>
00013 #include <comutil.h>
00014 #include <strmif.h>
00015 #include <Image/Camera.hh>
00016
00017 namespace BIAS{
00018
00019 /**
00020     \class VideoSource_DSHOW
00021     \ingroup VideoSource
00022     \author ischiller
00023     \brief This class extends VideoSource for the use of DirectShow devices
00024 */
00025
00026
00027 #if !defined __MYSAMPLE_GRABBER_CB_H
00028 #define __MYSAMPLE_GRABBER_CB_H
00029
00030 class MySampleGrabberCB : public ISampleGrabberCB {
00031
00032 protected:
00033
00034     // The media type we are processing
00035     AM_MEDIA_TYPE       mediaType;
00036
00037 public:
00038
00039   BIAS::Camera<unsigned char> camera_;
00040
00041   // donstructor
00042   MySampleGrabberCB(int width, int height, int depth);
00043     // destructor
00044     ~MySampleGrabberCB();
00045
00046     // This is the callback method called every time
00047   STDMETHODIMP SampleCB(double SampleTime, IMediaSample *pSample);
00048     // the other TO IMPLEMENT method
00049     STDMETHODIMP BufferCB(double SampleTime, BYTE *pBuffer, long BufferLen);
00050
00051     STDMETHODIMP QueryInterface(REFIID riid, void ** ppv);
00052     STDMETHODIMP_(ULONG) AddRef() { return 2; }
00053   STDMETHODIMP_(ULONG) Release() { return 1; }
00054
00055 };
00056
00057
00058 #endif
00059
00060   class VideoSource_DSHOW : public VideoSource{
00061
00062
00063   public:
00064   VideoSource_DSHOW(bool bShowDialogs = false);
00065   VideoSource_DSHOW(int width, int height,int depth,bool bShowDialogs = false);
00066
00067   ~VideoSource_DSHOW();
00068
00069   int OpenDevice(unsigned int width, unsigned int height, unsigned int channels,
00070     const char * device,BIAS::ImageBase::EColorModel model = BIAS::ImageBase::CM_RGB);
00071   int OpenDevice(const char * device);
00072   int CloseDevice();
00073
00074   int GrabSingle(BIAS::Camera <unsigned char>  &image);
00075   int InitImage(BIAS::ImageBase &Image);
00076
00077
00078   int PreGrab();
00079   int PostGrab();
00080
00081   inline void SetCaptureDeviceName(std::string sName){
00082     sCaptureDeviceName_ = sName;
00083   ;};
00084
00085   inline void SetSizeAndColorModel(int width, int height,
00086     int bytesperpixel=1, BIAS::ImageBase::EColorModel model = BIAS::ImageBase::CM_invalid){
00087      SetSize( width, height, bytesperpixel);
00088      SetColorModel(model);
00089      BIASColorModel_= model;
00090     };
00091
00092   bool DisplayCameraProperties();
00093
00094   void DisplaySourcePinProperties();
00095
00096   bool DisplayFilterProperties( CComPtr<IBaseFilter> pFilter);
00097
00098 protected:
00099   MySampleGrabberCB*   FGCB;
00100     long                dDsBufferSize_;
00101     long *            pDsBuffer_;
00102   unsigned char *   pImageBuffer_;
00103     int     dWidth_;
00104     int     dHeight_;
00105     int     dDepth_;
00106   bool  bShowDialogs_;
00107
00108   BIAS::Camera<unsigned char> camera_;
00109
00110   std::string sCaptureDeviceName_;
00111
00112     HRESULT InitVideoCapture_();
00113     HRESULT GetInterfaces_(void);
00114     HRESULT FindCaptureDevice_(IBaseFilter ** ppSrcFilter);
00115   HRESULT EnumFilters_(IFilterGraph *pGraph);
00116
00117   void DetermineColorModel_();
00118   void DetermineBIASColorModel_();
00119
00120     void DeleteMediaType_(AM_MEDIA_TYPE *pmt);
00121
00122   bool DisplayPinProperties_( CComPtr<IPin> pSrcPin );
00123
00124     HRESULT SaveGraphFile_(IGraphBuilder *pGraph, WCHAR *wszPath);
00125
00126   BIAS::ImageBase::EColorModel BIASColorModel_;
00127   GUID MediaSubTypeColorModel_;
00128
00129   CComPtr< IMediaControl >                pMediaControl_;
00130     CComPtr< IMediaEventEx >                  pMediaEvent_;
00131
00132   CComPtr< IPin >                               pOutPin_;
00133   CComPtr< IPin >                               pSampleOutPin_;
00134     CComPtr< IPin >                             pInPin_;
00135   CComPtr< ISampleGrabber >         pGrabber_;
00136   CComPtr< IBaseFilter >                pNullRenderer_;
00137     CComPtr< IGraphBuilder >          pGraphBuilder_;
00138     CComPtr< ICaptureGraphBuilder2 >  pCaptureGraphBuilder2_;
00139   CComPtr< IBaseFilter >            pSrcFilter_;
00140   }; //end class
00141 }//end namespace mip
00142 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV2.cpp Source File

VideoSource

VideoSource_DV2.cpp

Go to the documentation of this file.
00001 #include "VideoSource_DV2.hh"
00002 #include <stdio.h>
00003 #include <fcntl.h>
00004 #include <sys/ioctl.h>
00005 #include <unistd.h>
00006 #include <sys/mman.h>
00007
00008 using namespace MIP;
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 VideoSource_DV2::VideoSource_DV2(): VideoSource()
00013 {
00014   Width_ = MIP_DV_WIDTH;
00015   Height_ = MIP_DV_HEIGHT;
00016   ColorChannels_ = 1;
00017   ColorMode_ = ImageBase::CM_DV;
00018   DeviceChannel_ = 0x63;
00019
00020   SetDebugLevel(D_DV2);
00021   DV1394FD_ = 0;
00022
00023   FrameSize_ = 0;
00024   Format_ = DV1394_PAL;
00025   Buffer_ = NULL;
00026   DefaultDevice_ = "/dev/dv1394";
00027
00028
00029 }
00030
00031 VideoSource_DV2::~VideoSource_DV2()
00032 {
00033
00034
00035 }
00036
00037
00038
00039 int VideoSource_DV2::OpenDevice()
00040 {
00041   return OpenDevice(DefaultDevice_);
00042 }
00043
00044
00045
00046 int VideoSource_DV2::OpenDevice(const string &device)
00047 {
00048   DV1394FD_ = open(device.c_str(),O_RDONLY);
00049   if (DV1394FD_ < 0) {
00050     BIASERR("Can not open file: "<<device);
00051     perror(device.c_str());
00052     return -1;
00053   }
00054
00055   InitData_.channel = DeviceChannel_;
00056   // size of ringbuffer */
00057   InitData_.n_frames = 10;
00058   InitData_.format = Format_;
00059   InitData_.cip_n = 0;
00060   InitData_.cip_d = 0;
00061   InitData_.syt_offset = 0;
00062
00063
00064   switch (Format_) {
00065   case DV1394_PAL:
00066     FrameSize_ = DV1394_PAL_FRAME_SIZE;
00067     break;
00068   case DV1394_NTSC:
00069     FrameSize_ = DV1394_NTSC_FRAME_SIZE;
00070     break;
00071   }
00072   ioctl(DV1394FD_,DV1394_INIT, InitData_);
00073   BufferSize_ = FrameSize_ * InitData_.n_frames;
00074
00075 //     Buffer_ = (unsigned char *)mmap(0, BufferSize_, PROT_READ, MAP_SHARED, DV1394FD_, 0);
00076 //     if (Buffer_ <0) {
00077 //       perror("Error mmap() :");
00078 //       return -1;
00079 //     }
00080 //     cout <<(void *)Buffer_<<endl;
00081
00082
00083
00084   CompleteInitialized_ = true;
00085
00086   return 0;
00087 }
00088
00089
00090
00091
00092 int VideoSource_DV2::CloseDevice()
00093 {
00094   munmap(Buffer_, BufferSize_);
00095
00096   close(DV1394FD_);
00097   CompleteInitialized_ = false;
00098
00099   return 0;
00100 }
00101
00102
00103
00104 int VideoSource_DV2::UseChannel(int channel)
00105 {
00106   DeviceChannel_ = channel;
00107   return 0;
00108 }
00109
00110
00111 int VideoSource_DV2::GrabSingle(Camera <unsigned char> &image)
00112 {
00113   struct timeval time;
00114   int got;
00115   int ReceiveNFrames = 1;
00116   int NewBuffers = 0;
00117
00118
00119 //   cout <<"awaiting image"<<endl;
00120
00121   ioctl(DV1394FD_, DV1394_RECEIVE_FRAMES,ReceiveNFrames);
00122
00123   got = ioctl(DV1394FD_, DV1394_GET_STATUS, & Status_);
00124   NewBuffers = (Status_.first_clear_frame+ReceiveNFrames)% InitData_.n_frames;
00125   BIASDOUT_CLEAN(D_DV2,"First clear buffer: "<<Status_.first_clear_frame)
00126   BIASDOUT_CLEAN(D_DV2,"N buffers: "<<NewBuffers);
00127
00128   if (NewBuffers >0) {
00129     gettimeofday(&time,NULL);
00130     image.SetTime(time.tv_sec,time.tv_usec);
00131
00132     read(DV1394FD_, image.GetImageData(), FrameSize_);
00133     image.InvalidateUID();
00134   return 0;
00135   }
00136   else return -1;
00137
00138 }
00139
00140
00141 int VideoSource_DV2::PreGrab()
00142 {
00143
00144   if (VideoSource::PreGrab() <0 )
00145     return -1;
00146   ioctl(DV1394FD_,DV1394_START_RECEIVE,NULL);
00147
00148   return 0;
00149
00150 }
00151
00152
00153 int VideoSource_DV2::PostGrab()
00154 {
00155
00156
00157   if (VideoSource::PostGrab() <0 )
00158     return -1;
00159
00160   ioctl(DV1394FD_,DV1394_SHUTDOWN, NULL);
00161
00162  return 0;
00163 }
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV2.hh Source File

VideoSource

VideoSource_DV2.hh

Go to the documentation of this file.
00001 #ifndef __BIASVIDEOSOURCE_DV2_HH__
00002 #define __BIASVIDEOSOURCE_DV2_HH__
00003
00004 #include "VideoSource_Base.hh"
00005 #include <sys/time.h>
00006 #include "dv1394.h"
00007
00008
00009
00010 namespace MIP{
00011 /**
00012
00013 \class VideoSource_DV2
00014 \ingroup VideoG
00015 \author evers
00016
00017 \brief This class extends VideoSource for the use of IEEE1394-connected DV-camcorders.
00018
00019 The low-level driver in DV2 is dv1394.o using DMA transfers.
00020 Create device: /dev/dv1394 171 32+i
00021
00022 */
00023   class VideoSource_DV2 : public VideoSource{
00024
00025
00026   public:
00027     VideoSource_DV2();
00028     ~VideoSource_DV2();
00029
00030     int OpenDevice();
00031     int CloseDevice();
00032
00033     int OpenDevice(const std::string &device);
00034
00035     int UseChannel(int channel);
00036
00037     int GrabSingle(BIAS::Camera <unsigned char>  &image);
00038
00039     int PreGrab();
00040
00041     int PostGrab();
00042
00043
00044
00045   protected:
00046     int DV1394FD_;
00047
00048     struct dv1394_init InitData_;
00049     struct dv1394_status Status_;
00050
00051     enum pal_or_ntsc Format_;
00052     unsigned int FrameSize_;
00053
00054     unsigned char *Buffer_;
00055     unsigned int BufferSize_;
00056
00057
00058   };
00059
00060 } // namespace MIP
00061 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV.cpp Source File

VideoSource

VideoSource_DV.cpp

Go to the documentation of this file.
00001 #include "VideoSource_DV.hh"
00002 #include <stdio.h>
00003
00004 using namespace MIP;
00005 using namespace BIAS;
00006 using namespace std;
00007
00008 int VideoSource_DV::InstancesTotal_ = 0;
00009 int VideoSource_DV::Instances_[MAX_1394_CARDS];
00010 raw1394handle_t VideoSource_DV::IEEE1394Handle_[MAX_1394_CARDS];
00011
00012 VideoSource_DV *videosourcefromchannel[MAX_1394_CHANNELS];
00013
00014
00015
00016 VideoSource_DV::VideoSource_DV(int Card): VideoSource()
00017 {
00018   VideoSource_DV_Internal_Init_(Card);
00019 }
00020
00021
00022 VideoSource_DV::VideoSource_DV(): VideoSource()
00023 {
00024   VideoSource_DV_Internal_Init_(0);
00025 }
00026
00027
00028
00029 void VideoSource_DV::VideoSource_DV_Internal_Init_(int Card)
00030 {
00031   Width_ = MIP_DV_WIDTH;
00032   Height_ = MIP_DV_HEIGHT;
00033   ColorChannels_ = 1;
00034   ColorMode_ = ImageBase::CM_DV;
00035   MaxTrials_ = 2;
00036   Channel_ = 63;
00037
00038   //SetDebugLevel(D_DV);
00039
00040   IEEE1394Card_ = Card;
00041
00042
00043   if (IEEE1394Card_ > MAX_1394_CARDS) {
00044     BIASERR("VideoSource_DV::VideoSource_DV(int Card): requested card #"<<IEEE1394Card_<< " exceeds maximum of "<<MAX_1394_CARDS);
00045     return ;
00046   }
00047
00048   if (InstancesTotal_ == 0) {
00049     BIASDOUT(D_DV,"Initializing Instances_[] and IEEE1394Handle_[]");
00050     for (int i=0; i<MAX_1394_CARDS; i++) {
00051       Instances_[i] = 0;
00052       IEEE1394Handle_[i] = NULL;
00053     }
00054     for (int i=0; i<MAX_1394_CHANNELS; i++)
00055       videosourcefromchannel[i] = NULL;
00056   }
00057
00058   InstancesTotal_++;
00059   IEEE1394Card_ = Card;
00060
00061   if ( Instances_[IEEE1394Card_] == 0) {
00062     // I am the first instance on this Card, so open now
00063     BIASDOUT(D_DV,"IEEE1394Card_: "<<IEEE1394Card_);
00064     IEEE1394Handle_[IEEE1394Card_] = raw1394_new_handle();
00065     if (IEEE1394Handle_[IEEE1394Card_] == NULL) {
00066       perror("raw1394 - couldn't get handle");
00067       BIASERR("This error usually means that the ieee1394 drivers are not loaded or that /dev/raw1394  not exist.\n");
00068       return ;
00069     }
00070
00071     if (raw1394_set_port(IEEE1394Handle_[IEEE1394Card_],IEEE1394Card_) < 0)
00072                 BIASERR("raw1394 - couldn't set port");
00073   }
00074
00075
00076
00077   Instances_[IEEE1394Card_] ++;
00078   videosourcefromchannel[Channel_] = this;
00079
00080 }
00081
00082 VideoSource_DV::~VideoSource_DV()
00083 {
00084   InstancesTotal_ --;
00085   Instances_[IEEE1394Card_] --;
00086   if (Instances_[IEEE1394Card_] == 0) {
00087     // I am the last instance on this card, so close the door
00088     raw1394_destroy_handle(IEEE1394Handle_[IEEE1394Card_]);
00089     BIASDOUT(D_DV,"I am the last Instance on this bus, so shutting the lights.");
00090   }
00091   videosourcefromchannel[Channel_] = NULL;
00092
00093
00094 }
00095
00096
00097
00098 int VideoSource_DV::OpenDevice()
00099 {
00100   return 0;
00101 }
00102
00103
00104
00105 int VideoSource_DV::OpenDevice(const char *device)
00106 {
00107   return 0;
00108 }
00109
00110
00111
00112
00113 int VideoSource_DV::CloseDevice()
00114 {
00115   return 0;
00116 }
00117
00118
00119
00120 int VideoSource_DV::UseChannel(int channel)
00121 {
00122   Channel_ = channel;
00123   return 0;
00124 }
00125
00126
00127 int VideoSource_DV::GrabSingle(Camera <unsigned char> &image)
00128 {
00129   int trials = 0;
00130   bool done = false;
00131   struct timeval time;
00132
00133   gettimeofday(&time,NULL);
00134   image.SetTime(time.tv_sec,time.tv_usec);
00135
00136   GrabBuffer_ = image.GetImageData();
00137
00138
00139
00140
00141   while (trials < MaxTrials_ && !done) {
00142     FrameFinished_ = false;
00143     FrameStarted_ = false;
00144     DroppedFrame_ = false;
00145
00146    while (!FrameFinished_)
00147      raw1394_loop_iterate(IEEE1394Handle_[IEEE1394Card_]);
00148
00149
00150    trials ++;
00151    done = !DroppedFrame_;
00152   }
00153
00154   image.InvalidateUID();
00155
00156   if (DroppedFrame_)
00157     return -1;
00158   else
00159   return 0;
00160 }
00161
00162
00163 int VideoSource_DV::PreGrab()
00164 {
00165   iso_handler_t g_oldhandler;
00166   BIASDOUT(D_DV,"PreGrab(), channel: "<< Channel_);
00167   g_oldhandler = raw1394_set_iso_handler(IEEE1394Handle_[IEEE1394Card_],
00168                      Channel_, raw_dv_handler);
00169
00170    if (raw1394_start_iso_rcv(IEEE1394Handle_[IEEE1394Card_], Channel_) < 0) {
00171    BIASERR("raw1394 - couldn't start iso receive");
00172     return -1;
00173   }
00174
00175 //    raw1394_set_bus_reset_handler(handle, reset_handler);
00176
00177   return 0;
00178
00179 }
00180
00181
00182 int VideoSource_DV::PostGrab()
00183 {
00184   BIASDOUT(D_DV,"PostGrab()");
00185
00186    raw1394_stop_iso_rcv(IEEE1394Handle_[IEEE1394Card_], Channel_);
00187  return 0;
00188 }
00189
00190
00191
00192
00193 int MIP::raw_dv_handler(raw1394handle_t handle, int channel, size_t length,
00194                     quadlet_t *data)
00195 {
00196   static int packetcount = 0;
00197 //    cout << "raw_dv_tomem_handler()"<<endl;
00198
00199
00200   if (length > 16) {
00201     unsigned char *p = (unsigned char*) & data[3];
00202     int section_type = p[0] >> 5;          /* section type is in bits 5 - 7 */
00203     int dif_sequence = p[1] >> 4;    /* dif sequence number is in bits 4 - 7 */
00204     int dif_block = p[2];
00205
00206     // detect begin of frame
00207     if (section_type == 0 && dif_sequence == 0) {
00208       if (!videosourcefromchannel[channel]->FrameFinished_)
00209     if (videosourcefromchannel[channel]->FrameStarted_)
00210       videosourcefromchannel[channel]->DroppedFrame_ = true;
00211     else
00212       videosourcefromchannel[channel]->FrameStarted_ = true;
00213     }
00214
00215
00216
00217
00218     if (videosourcefromchannel[channel]->FrameStarted_ &&
00219     !videosourcefromchannel[channel]->FrameFinished_) {
00220       packetcount++;
00221       switch (section_type) {
00222       case 0:           // 1 Header block
00223     memcpy(videosourcefromchannel[channel]->GrabBuffer_
00224            + dif_sequence * 150 * 80, p, 480);
00225     break;
00226
00227       case 1:           // 2 Subcode blocks
00228     memcpy(videosourcefromchannel[channel]->GrabBuffer_
00229            + dif_sequence * 150 * 80 + (1 + dif_block) * 80,p, 480);
00230     break;
00231
00232       case 2:           // 3 VAUX blocks
00233     memcpy(videosourcefromchannel[channel]->GrabBuffer_+
00234            dif_sequence * 150 * 80 + (3 + dif_block) * 80, p, 480);
00235     break;
00236
00237       case 3:           // 9 Audio blocks interleaved with video
00238     memcpy(videosourcefromchannel[channel]->GrabBuffer_
00239            + dif_sequence * 150 * 80 + (6 + dif_block * 16) * 80,p, 480);
00240     break;
00241
00242       case 4:           // 135 Video blocks interleaved with audio
00243     memcpy(videosourcefromchannel[channel]->GrabBuffer_+
00244            dif_sequence * 150 * 80 + (7 + (dif_block / 15) + dif_block)
00245            * 80, p, 480);
00246     break;
00247
00248       default:           // we cant handle any other data
00249     break;
00250       }
00251       //   cout << packetcount << " " ;
00252     }
00253
00254
00255     if (packetcount == 300 && !videosourcefromchannel[channel]->FrameFinished_) {
00256         videosourcefromchannel[channel]->FrameFinished_ = true;
00257     packetcount = 0;
00258     }
00259
00260
00261   }
00262   return 0;
00263 }
00264
00265
00266
00267
00268
00269
00270
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_DV.hh Source File

VideoSource

VideoSource_DV.hh

Go to the documentation of this file.
00001 #ifndef __MIPVIDEOSOURCE_DV_HH__
00002 #define __MIPVIDEOSOURCE_DV_HH__
00003
00004 #include <mip_config.h>
00005 #ifndef BUILD_VideoSource
00006 #  error Please recompile MIP with BUILD_VideoSource to use VideoSource
00007 #endif // BUILD_VideoSource
00008
00009
00010 #include "VideoSource.hh"
00011 #include <sys/time.h>
00012 #include <libraw1394/raw1394.h>
00013
00014
00015
00016 #ifndef MAX_1394_CARDS
00017 #define MAX_1394_CARDS 2
00018 #endif
00019
00020 #ifndef MAX_1394_CHANNELS
00021 #define MAX_1394_CHANNELS 100
00022 #endif
00023
00024 // 300 packets/frame, each of 480 bytes
00025 #define DV_PIC_SIZE 144000
00026
00027 namespace MIP{
00028
00029 /**
00030     \class VideoSource_DV
00031     \ingroup VideoG
00032     \author evers
00033     \brief This class  extends VideoSource for the use of IEEE1394-connected
00034     DV-camcorders.
00035
00036     It uses the old raw1394 interface to transfer packets without DMA.
00037
00038 */
00039   class VideoSource_DV : public VideoSource{
00040
00041
00042   public:
00043     VideoSource_DV(int Card);
00044     VideoSource_DV();
00045     ~VideoSource_DV();
00046
00047     int OpenDevice();
00048     int CloseDevice();
00049
00050     int OpenDevice(const char *device);
00051
00052     int UseChannel(int channel);
00053
00054     int GrabSingle(BIAS::Camera <unsigned char>  &image);
00055
00056     int PreGrab();
00057
00058     int PostGrab();
00059
00060
00061
00062   protected:
00063     void VideoSource_DV_Internal_Init_(int card);
00064     static raw1394handle_t IEEE1394Handle_[MAX_1394_CARDS];
00065     static int Instances_[MAX_1394_CARDS];
00066     static int InstancesTotal_;
00067
00068
00069     // this is the card to serve for
00070     int IEEE1394Card_;
00071     int Channel_;
00072     int MaxTrials_;
00073     bool  FrameFinished_;
00074     bool  FrameStarted_;
00075     bool  DroppedFrame_;
00076
00077
00078     unsigned char *GrabBuffer_;
00079
00080
00081     friend int raw_dv_handler(raw1394handle_t handle, int channel,
00082                   size_t length, quadlet_t *data);
00083
00084
00085
00086   };
00087 } // namespace MIP
00088
00089   /** This array is used to associate DV-sources identified via channel witch
00090    * videosource-objects since raw_dv_handler() only knows the handle and
00091    * channel, not the instance-object of videosource().
00092    * It would be better to use handle instead of channel, to avoid conflicts
00093    * with cameras connected to different cards using the same channel (63)
00094    */
00095   extern MIP::VideoSource_DV* videosourcefromchannel[MAX_1394_CHANNELS];
00096
00097
00098
00099 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Net.cpp Source File

VideoSource

VideoSource_Net.cpp

Go to the documentation of this file.
00001 #include <string>
00002 #include <sstream>
00003 #include <iostream>
00004 #include <sstream>
00005
00006 #include <Image/Camera.hh>
00007 #include "VideoSource_Net.hh"
00008
00009 using namespace BIAS;
00010 using namespace std;
00011
00012 VideoSource_Net::VideoSource_Net(bool threaded) :
00013                  VideoSource(), client_(threaded) {
00014
00015   ColorChannels_ = 3; // fake
00016   ColorMode_ = ImageBase::CM_RGB; // fake
00017 #ifdef BIAS_HAVE_LIBJPEG
00018   Decompressor_.Init();
00019 #endif //BIAS_HAVE_LIBJPEG
00020   pImgBuffer_ = new std::stringstream;
00021   count_=0;
00022   UseTCP_=true;
00023   if (!threaded) client_.SetKeepAll(true);
00024 }
00025
00026
00027 int VideoSource_Net::OpenDevice(int /*port*/)
00028 {
00029   BIASERR("no UDP comm yet");
00030   return 0;
00031 }
00032
00033 int VideoSource_Net::OpenDevice(const char* serverName)
00034 {
00035   return OpenDevice(serverName, D_CS_DEFAULT_PORT);
00036 }
00037
00038 int VideoSource_Net::OpenDevice(const std::string &serverName,
00039                                 int port)
00040 {
00041   client_.SetVerbose(true);
00042   if (client_.ConnectServer(serverName,port,2000)!=0) {
00043     return -1;
00044   }
00045   client_.RegisterMsg("BIAS_IMAGE",CS_BINARY);
00046   client_.RegisterMsg("JPEG_IMAGE",CS_BINARY);
00047
00048   BIAS::ImageBase img;
00049   GrabSingle(img);
00050
00051   Width_=img.GetWidth();
00052   Height_=img.GetHeight();
00053   ColorChannels_=img.GetChannelCount();
00054   BytesPerPixel_ = float( img.GetDepth()*img.GetChannelCount() );
00055   return 0;
00056 }
00057
00058
00059 int VideoSource_Net::PreGrab()
00060 {
00061
00062   return 0;
00063
00064 } // PreGrab
00065
00066 int VideoSource_Net::GrabSingle(BIAS::Camera <unsigned char> &image)
00067 {
00068   ImageBase imgBase;
00069   int res=GrabSingle(imgBase);
00070   if (imgBase.GetStorageType()==ImageBase::ST_unsignedchar)
00071     image=BIAS::Camera <unsigned char>(imgBase);
00072   else {
00073     BIASERR("received image is not unsigned char");
00074     return -2;
00075   }
00076   image.ParseMetaData();
00077   return res;
00078 }
00079
00080 int VideoSource_Net::GrabSingle(BIAS::ImageBase &image)
00081 {
00082   bool haveJpeg=false;
00083   if (!UseTCP_) {
00084     BIASERR("UDP not yet");
00085     return -1;
00086   }
00087   static std::vector<char> data;
00088   int res=-1;
00089   while (res!=0) {
00090     res=client_.GetData("BIAS_IMAGE",data);
00091     if (res!=0) {
00092       res=client_.GetData("JPEG_IMAGE",data);
00093       if (res==0)
00094         haveJpeg=true;
00095     }
00096     usleep(10);
00097   }
00098   if (!haveJpeg) {
00099     pImgBuffer_->rdbuf()->sputn(&data[0],data.size());
00100
00101     // this does the trick
00102     *pImgBuffer_>>image;
00103
00104     count_++;
00105     if (count_==20) {
00106       count_=0;
00107       ////// free some memory
00108       // save unprocessed data
00109       string dummy(pImgBuffer_->rdbuf()->in_avail(),0);
00110       pImgBuffer_->rdbuf()->sgetn(&dummy[0],pImgBuffer_->rdbuf()->in_avail());
00111       // delete and reallocate
00112       delete pImgBuffer_;
00113       pImgBuffer_ = new stringstream;
00114       pImgBuffer_->rdbuf()->sputn(&dummy[0],dummy.length());
00115     }
00116   } else {
00117 #ifdef BIAS_HAVE_LIBJPEG
00118     //received image is jpeg-compressed
00119     Decompressor_.SetCompressedData((void *)&(data[0]),
00120                                     (long) data.size());
00121     if (Decompressor_.Decompress(jpegImg_) < 0) {
00122       BIASERR("Decompression failed!");
00123       return -1;
00124     }
00125     if (image.SamePixelAndChannelCount(jpegImg_))
00126       image.CopyIn_NoInit(jpegImg_.GetImageData());
00127     else
00128       image=jpegImg_;
00129 #endif //BIAS_HAVE_LIBJPEG
00130   }
00131
00132   return 0;
00133 } // GrabSingle
00134
00135
00136 int VideoSource_Net::PostGrab()
00137 {
00138   return 0;
00139 }
00140
00141
00142 int VideoSource_Net::CloseDevice() {
00143 #  ifdef BIAS_HAVE_LIBJPEG
00144     Decompressor_.Release();
00145 #  endif //BIAS_HAVE_LIBJPEG
00146
00147   return 0;
00148 } // CloseDevice
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Net.hh Source File

VideoSource

VideoSource_Net.hh

Go to the documentation of this file.
00001 #ifndef __BIAS_VIDEOSOURCE_NET_HH__
00002 #define __BIAS_VIDEOSOURCE_NET_HH__
00003
00004 #include <bias_config.h>
00005 #include <Base/Common/BIASpragmaStart.hh>
00006
00007 #include <iostream>
00008 #include <sstream>
00009 #include <VideoSource/VideoSource_Base.hh>
00010
00011 #include <NetworkComm/CScommClient.hh>
00012
00013
00014
00015 #ifdef BIAS_HAVE_LIBJPEG
00016 # include <Image/CompressJpeg.hh>
00017 #endif //BIAS_HAVE_LIBJPEG
00018
00019 namespace BIAS{
00020   /**\class VideoSource_Net
00021      \ingroup VideoG
00022      \brief This class implements a video streaming client using TCP.
00023      Use VideoServer to feed this beast.
00024      @author grest, Nov. 2005
00025   */
00026   class BIASVideoSource_EXPORT VideoSource_Net : public VideoSource {
00027
00028   public:
00029     /** Standard Constructor
00030         use threaded param for dis-/enabling threaded receiving!
00031             If threaded receiving is disabled, keepAll-param will
00032             be enabled for client_!
00033             (you'll get every image that was sent)
00034     */
00035     VideoSource_Net(bool threaded = true);
00036
00037     virtual ~VideoSource_Net() { delete pImgBuffer_; }
00038
00039
00040     /** use given port and ip address to connect to videoserver*/
00041     virtual int OpenDevice(const char* serverName);
00042
00043     /** use given port and ip address to connect to videoserver*/
00044     virtual int OpenDevice(const std::string &serverName,
00045                            int port=D_CS_DEFAULT_PORT);
00046
00047     /** for UDP commm, listen on this port for data */
00048     virtual int OpenDevice(int port=D_CS_DEFAULT_PORT);
00049
00050     int PreGrab();
00051     virtual int GrabSingle(BIAS::Camera <unsigned char> &image);
00052     virtual int GrabSingle(BIAS::ImageBase &image);
00053     int PostGrab();
00054
00055     int CloseDevice();
00056
00057   protected:
00058     std::stringstream *pImgBuffer_; // pointer needed to free mem
00059     int count_;
00060     bool UseTCP_;
00061
00062     int port_;
00063     CScommClient client_;
00064
00065
00066 #ifdef BIAS_HAVE_LIBJPEG
00067     BIAS::Image<unsigned char> jpegImg_;
00068     JpegHandler Decompressor_;
00069 #endif //BIAS_HAVE_LIBJPEG
00070   };
00071
00072
00073 } // namespace BIAS
00074
00075
00076 #include <Base/Common/BIASpragmaEnd.hh>
00077
00078 #endif
00079
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Shm.cpp Source File

VideoSource

VideoSource_Shm.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #include <string>
00025 #include <sstream>
00026 #include <iostream>
00027 #include <sstream>
00028
00029 #include <Image/Camera.hh>
00030 #include <VideoSource/VideoSource_Shm.hh>
00031
00032 #ifdef WIN32
00033 #  define WIN32_LEAN_AND_MEAN       // Exclude rarely-used stuff from Windows headers
00034 #  include <windows.h>
00035 #else
00036 # include <sys/types.h>
00037 # include <sys/mman.h>
00038 #include <fcntl.h>
00039 #endif
00040
00041
00042 #include <Base/Common/BIASpragma.hh>
00043
00044
00045 using namespace BIAS;
00046 using namespace std;
00047
00048 VideoSource_Shm::VideoSource_Shm()
00049 {
00050   VideoSource::VideoSource();
00051   IsCreator_ = false;
00052   pImgBuffer_ = new std::stringstream;
00053   LastTime_ = 0.0;
00054   ColorChannels_ = 3; // fake
00055   ColorMode_ = ImageBase::CM_RGB; // fake
00056 #ifdef WIN32
00057   Context_ = NULL;
00058   Mapping_ = NULL;
00059 #else
00060   Context_ = 0;
00061 #endif
00062 }
00063
00064 void VideoSource_Shm::SetSize(int w, int h, int bytesperpixel){
00065   Width_ = w;
00066     Height_ = h;
00067   BytesPerPixel_ = bytesperpixel;
00068   ColorChannels_ = bytesperpixel;
00069 }
00070
00071
00072
00073 int VideoSource_Shm::OpenDevice()
00074 {
00075   return OpenDevice("/VideoSource_Shm.shm");
00076 }
00077
00078 int VideoSource_Shm::OpenDevice(const char *name)
00079 {
00080   if (Width_ ==0 || Height_ ==0) {
00081     Width_ = 1024;
00082     Height_ = 1024;
00083   }
00084   DataLength_ = Width_ * Height_ * ColorChannels_;
00085   TotalLength_ = DataLength_ + sizeof(ShmImageHeader);
00086   FileName_ = name;
00087 #ifdef WIN32
00088   SYSTEM_INFO sSysInfo;
00089   GetSystemInfo( &sSysInfo );
00090   Granularity_ = sSysInfo.dwAllocationGranularity;
00091   while( long(TotalLength_) > Granularity_ )
00092     Granularity_ += sSysInfo.dwAllocationGranularity;
00093   TotalLength_ = Granularity_;
00094
00095   //Try to connect to existing File-Mapping
00096   while ( Mapping_ == NULL ) {
00097     Mapping_ = OpenFileMapping( FILE_MAP_ALL_ACCESS,FALSE,FileName_.c_str());
00098     cout <<"Wait for file mapping: "<<FileName_<<endl;
00099     Sleep(1000);
00100   }
00101   Shm_= (unsigned char*)MapViewOfFile(Mapping_,FILE_MAP_ALL_ACCESS,0,0,0);
00102   if (Shm_ == NULL) {
00103     BIASERR("Failed to memory map file");
00104     return -1;
00105   };
00106
00107   return 0;
00108
00109 #else
00110   // try to open existing file, if that failes, create new one
00111   Context_ = shm_open(FileName_.c_str(),O_RDWR,
00112               S_IRWXU| S_IRWXG| S_IRWXO);
00113   if (Context_ <0) {
00114     IsCreator_ = true;
00115     cout <<"Creating new context"<<endl;
00116     Context_ = shm_open(FileName_.c_str(),O_RDWR| O_CREAT,
00117             S_IRWXU| S_IRWXG| S_IRWXO);
00118     int res;
00119     res = ftruncate(Context_,TotalLength_);
00120     if (res <0) {
00121       perror(FileName_.c_str());
00122       return -1;
00123     }
00124
00125   }
00126   else cout <<"Using old context"<<endl;
00127   if (Context_ <0) {
00128     perror(name);
00129     return -1;
00130   }
00131 #endif
00132   return 0;
00133 }
00134
00135
00136 int VideoSource_Shm::PreGrab()
00137 {
00138 #ifdef WIN32
00139
00140 #else
00141   Shm_ = mmap(0,TotalLength_, PROT_READ | PROT_WRITE ,MAP_SHARED,Context_,0 );
00142 #endif
00143   Header_ = (ShmImageHeader*)Shm_;
00144   Data_ = (char*)Shm_ +sizeof(ShmImageHeader);
00145   return 0;
00146 } // PreGrab
00147
00148
00149 int VideoSource_Shm::GrabSingle(Camera <unsigned char> &image)
00150 {
00151   bool gotit = false;
00152   do {
00153
00154     if (Header_->Time_ >LastTime_) {
00155 //   cout <<"VideoShmFeeder: Header is: "<<setw(20)<<setprecision(20)
00156 //        <<Header_->Time_<<" , "<<Header_->Size_<<endl;
00157       if (Header_->Size_ >DataLength_) Resize_(Header_->Size_);
00158
00159       pImgBuffer_->str("");
00160       //    pImgBuffer_->rdbuf()->sputn(Data_,Header_->Size_);
00161       pImgBuffer_->rdbuf()->pubsetbuf(Data_,Header_->Size_);
00162       image.Release();
00163       *pImgBuffer_>>image;
00164       image.InvalidateUID();
00165       image.SetTime(Header_->Time_);
00166       LastTime_ =  Header_->Time_;
00167       gotit = true;
00168       //cout << "shm: cm: "<<boolalpha<< (image.GetColorModel()==ImageBase::CM_Bayer_RGGB)<<endl;
00169     }
00170     else usleep(1000);
00171   } while (!gotit);
00172   image.SetUID(UUID::GenerateUUID());
00173   return 0;
00174 }
00175
00176
00177 int VideoSource_Shm::PostGrab()
00178 {
00179 #ifdef WIN32
00180 #else
00181   munmap(Shm_, TotalLength_);
00182 #endif
00183   return 0;
00184 } // PostGrab
00185
00186
00187 int VideoSource_Shm::CloseDevice()
00188 {
00189 #ifdef WIN32
00190     UnmapViewOfFile(Shm_);
00191     CloseHandle(Mapping_ );
00192 #else
00193     //  shm_unlink(FileName_.c_str());
00194 #endif
00195   return 0;
00196 } // CloseDevice
00197
00198
00199
00200
00201 int VideoSource_Shm::Resize_(int newsize)
00202 {
00203   cout <<"Resizing from: "<<TotalLength_;
00204   PostGrab();
00205   DataLength_ = newsize;
00206   TotalLength_ = DataLength_ + sizeof(ShmImageHeader);
00207   PreGrab();
00208   cout<<" to: "<<TotalLength_<<endl;
00209   return newsize;
00210 }
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Shm.hh Source File

VideoSource

VideoSource_Shm.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __MIPVIDEOSOURCE_SHM_HH__
00025 #define __MIPVIDEOSOURCE_SHM_HH__
00026
00027
00028
00029 #include <iostream>
00030 #include <sstream>
00031 #include <VideoSource/VideoSource_Base.hh>
00032
00033 #ifdef WIN32
00034 #  define WIN32_LEAN_AND_MEAN       // Exclude rarely-used stuff from Windows headers
00035 #  include <windows.h>
00036 #endif
00037
00038
00039 namespace BIAS{
00040
00041
00042
00043   /**
00044      \class VideoSource_Shm
00045      \ingroup VideoG
00046      \author evers
00047      \brief This class implements a video streaming client using shared memory to receive images from another application.
00048   */
00049   class BIASVideoSource_EXPORT VideoSource_Shm : public VideoSource {
00050
00051   public:
00052     struct ShmImageHeader {
00053       unsigned int Size_;
00054       double Time_;
00055     };
00056
00057     /**
00058        @author Jan-Friso Evers
00059     **/
00060     VideoSource_Shm();
00061     ~VideoSource_Shm(){ delete pImgBuffer_; }
00062
00063     int OpenDevice(const char *name);
00064
00065     int OpenDevice();
00066
00067     int PreGrab();
00068     int GrabSingle(BIAS::Camera <unsigned char> &image);
00069     int PostGrab();
00070
00071     void SetSize(int w, int h, int bytesperpixel);
00072     int CloseDevice();
00073
00074   protected:
00075     int Resize_(int newsize);
00076 #ifdef WIN32
00077     HANDLE Context_; // _hFile
00078     HANDLE Mapping_;//! header describing the memory layout
00079     long int Granularity_;
00080 #else
00081     int Context_;
00082 #endif
00083
00084     bool IsCreator_;
00085     std::string FileName_;
00086     void *Shm_;
00087     unsigned int DataLength_;
00088     unsigned int TotalLength_;
00089     std::stringstream *pImgBuffer_; // pointer needed to free mem
00090     ShmImageHeader *Header_;
00091     char *Data_;
00092     double LastTime_;
00093
00094  protected:
00095     /*!\brief prohibit default function (move to 'public' if needed) */
00096   VideoSource_Shm(const VideoSource_Shm &source);
00097   /*!\brief prohibit default function (move to 'public' if needed) */
00098   VideoSource_Shm& operator =(const VideoSource_Shm &source);
00099
00100
00101   };
00102
00103
00104 } // namespace MIP
00105
00106 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Stereo.cpp Source File

VideoSource

VideoSource_Stereo.cpp

Go to the documentation of this file.
00001 #ifdef WIN32
00002 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
00003 #endif
00004
00005 #include "VideoSource_Stereo.hh"
00006
00007 #include <Image/Camera.hh>
00008 #include <string>
00009
00010 using namespace BIAS;
00011 using namespace std;
00012
00013 BIAS::VideoSource_Stereo::
00014 VideoSource_Stereo(VideoSource *left, VideoSource *right)
00015   : VideoSource(), Left_(left), Right_(right)
00016 {}
00017
00018 BIAS::VideoSource_Stereo::
00019 ~VideoSource_Stereo()
00020 {
00021   if (Left_){
00022     delete Left_;
00023     Left_ = NULL;
00024   }
00025   if (Right_){
00026     delete Right_;
00027     Right_ = NULL;
00028   }
00029 }
00030
00031 int BIAS::VideoSource_Stereo::
00032 OpenDevice(const char *name)
00033 {
00034   string mname = name;
00035   string::size_type pos = mname.find(':', 0);
00036   if (pos == string::npos){
00037     BIASERR("invalid name \""<<name<<"\"");
00038     return -1;
00039   }
00040
00041   string lname = mname.substr(0, pos);
00042   string rname = mname.substr(pos+1, mname.size()-pos-1);
00043   cout << "lname = \""<<lname<<"\"\trname = \""<<rname<<"\"\n";
00044   int resl = Left_->OpenDevice(lname.c_str());
00045   int resr = Right_->OpenDevice(rname.c_str());
00046   return (resl==0 && resr==0)?0:-1;
00047 }
00048
00049
00050 int BIAS::VideoSource_Stereo::
00051 OpenDevice()
00052 {
00053   BIASERR("use OpenDevice(char *)");
00054   BIASABORT;
00055   return -1;
00056 }
00057
00058 int BIAS::VideoSource_Stereo::
00059 PreGrab()
00060 {
00061   int resl = Left_->PreGrab();
00062   int resr = Right_->PreGrab();
00063   return (resl==0 && resr==0)?0:-1;
00064 }
00065
00066 int BIAS::VideoSource_Stereo::
00067 GrabSingle(BIAS::Camera<unsigned char> &image)
00068 {
00069   int resl = Left_->GrabSingle(LeftIm_);
00070   int resr = Right_->GrabSingle(RightIm_);
00071   image = LeftIm_;
00072   return (resl==0 && resr==0)?0:-1;
00073 }
00074
00075 int BIAS::VideoSource_Stereo::
00076 PostGrab()
00077 {
00078   int resl = Left_->PostGrab();
00079   int resr = Right_->PostGrab();
00080   return (resl==0 && resr==0)?0:-1;
00081 }
00082
00083 void BIAS::VideoSource_Stereo::
00084 SetSize(int w, int h, int bytesperpixel)
00085 {
00086   Left_->SetSize(w, h, bytesperpixel);
00087   Right_->SetSize(w, h, bytesperpixel);
00088 }
00089
00090 int BIAS::VideoSource_Stereo::
00091 CloseDevice()
00092 {
00093   int resl = Left_->CloseDevice();
00094   int resr = Right_->CloseDevice();
00095   return (resl==0 && resr==0)?0:-1;
00096 }
00097
00098
00099 int BIAS::VideoSource_Stereo::
00100 InitImage(BIAS::ImageBase & img)
00101 {
00102   Left_->InitImage(LeftIm_);
00103   Right_->InitImage(RightIm_);
00104   return Left_->InitImage(img);
00105 }
00106
00107 BIAS::VideoSource_Stereo::
00108 VideoSource_Stereo()
00109 {
00110   BIASABORT;
00111 }
00112
00113 BIAS::VideoSource_Stereo::
00114 VideoSource_Stereo(const VideoSource_Stereo & /*source*/)
00115 {
00116   BIASABORT;
00117 }
00118
00119
00120 VideoSource_Stereo& BIAS::VideoSource_Stereo::
00121 operator=(const VideoSource_Stereo & /*source*/)
00122 {
00123   BIASABORT;
00124   return *this;
00125 }
00126
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_Stereo.hh Source File

VideoSource

VideoSource_Stereo.hh

Go to the documentation of this file.
00001 #ifndef _VideSource_Stereo_hh_
00002 #define _VideSource_Stereo_hh_
00003
00004 #include <VideoSource/VideoSource_Base.hh>
00005 #include <Image/Camera.hh>
00006
00007 namespace BIAS {
00008
00009   class BIAS::ImageBase;
00010
00011   /** @class VideSource_Stereo
00012       @brief bundles two video sources for stereo
00013       @author woelk 04/2006 */
00014   class BIASVideoSource_EXPORT VideoSource_Stereo
00015     : public VideoSource
00016   {
00017   public:
00018     VideoSource_Stereo(VideoSource *left, VideoSource *right);
00019
00020     virtual ~VideoSource_Stereo();
00021
00022     virtual int OpenDevice(const char *name);
00023
00024     virtual int OpenDevice();
00025
00026     virtual int PreGrab();
00027     /** Returns the left image and captures the right image from the camera */
00028     virtual int GrabSingle(Camera<unsigned char> &image);
00029
00030     /** Returns the right image. Must be called after GrabSingle() */
00031     inline int GrabSingleRight(Camera<unsigned char> &image)
00032     { image = RightIm_; return 0; }
00033
00034     virtual int PostGrab();
00035
00036     virtual void SetSize(int w, int h, int bytesperpixel);
00037
00038     virtual int CloseDevice();
00039
00040     virtual int InitImage(ImageBase & img);
00041
00042   protected:
00043     VideoSource *Left_;
00044     VideoSource *Right_;
00045
00046     BIAS::Camera<unsigned char> LeftIm_, RightIm_;
00047
00048     /*!\brief prohibit default function (move to 'public' if needed) */
00049     VideoSource_Stereo();
00050     /*!\brief prohibit default function (move to 'public' if needed) */
00051     VideoSource_Stereo(const VideoSource_Stereo &source);
00052     /*!\brief prohibit default function (move to 'public' if needed) */
00053     VideoSource_Stereo& operator =(const VideoSource_Stereo &source);
00054   };
00055
00056 }
00057
00058 #endif // _VideSource_Stereo_hh_
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_uEye.cpp Source File

VideoSource

VideoSource_uEye.cpp

Go to the documentation of this file.
00001 #include "VideoSource_uEye.hh"
00002 #include <Base/Image/ImageIO.hh>
00003 #include <stdio.h>
00004 #include <Base/Image/ImageBase.hh>
00005
00006 using namespace BIAS;
00007 using namespace std;
00008
00009
00010
00011
00012 VideoSource_uEye::VideoSource_uEye(): VideoSource()
00013 {
00014   //set to the defaults of our ueye
00015   VideoSource::SetSize(752,480,1);
00016   VideoSource::SetColorModel(BIAS::ImageBase::CM_Grey);
00017
00018   m_bIsInited    = false;
00019
00020   //set for cutout
00021   m_dWidth      = 752;
00022   m_dHeight     = 480;
00023   m_dDepth      = 1;
00024
00025   m_dPixelClock  =0;
00026
00027   m_dLeftPos    = 0;
00028   m_dTopPos     = 0;
00029
00030   m_dBitsPerPixel = 8;
00031   m_dMemID        = 0;
00032   m_dColorMode    = 0;
00033   m_CameraHandle  = 0;
00034
00035   m_dSrcWidth     = 752;
00036   m_dSrcHeight    = 480;
00037   m_dSrcDepth     = 1;
00038
00039   m_pImageBuffer  = NULL;
00040   m_pSwapBuffer   = NULL;
00041 }
00042
00043
00044
00045 VideoSource_uEye::~VideoSource_uEye()
00046 {
00047
00048 }
00049
00050 int VideoSource_uEye::InitImage(BIAS::ImageBase &Image)
00051 {
00052     Image.Init(GetWidth(),GetHeight(),GetColorChannels());
00053     return 0;
00054 }
00055
00056 void VideoSource_uEye::SetSize(int w, int h, int bytesperpixel)
00057 {
00058   if( (w!=0) && (h!=0) && (bytesperpixel!=0))
00059   {
00060     VideoSource::SetSize(w,h,bytesperpixel);
00061   }
00062 }
00063
00064 int VideoSource_uEye::OpenDevice()
00065 {
00066   int pNumCameras = 0;
00067   int ret = -1;
00068   ret = m_ueye.GetNumberOfCameras(&pNumCameras);
00069   if(pNumCameras <= 0 || ret != IS_SUCCESS)
00070     return -1;
00071   else
00072   {
00073    ret = OpenCamera_();
00074   }
00075
00076   return ret;
00077 }
00078
00079
00080 int VideoSource_uEye::CloseDevice()
00081 {
00082   int ret =0;
00083   m_ueye.EnableMessage(IS_FRAME , NULL);
00084     m_ueye.StopLiveVideo(IS_FORCE_VIDEO_STOP );
00085     m_ueye.ExitCamera();
00086   m_ueye.FreeImageMem( m_pImageBuffer,m_dMemID);
00087   ret = m_ueye.ExitCamera();
00088   if(m_pSwapBuffer)
00089     delete m_pSwapBuffer;
00090   return ret;
00091 }
00092
00093 //Shutter is given in seconds.
00094 int VideoSource_uEye::SetShutter(float exptime)
00095 {
00096   // we need milliseconds here
00097   exptime *= 1000;
00098   double newexptime = 0.0;
00099   int ret = -1;
00100   if(m_bIsInited)
00101     ret = m_ueye.SetExposureTime((double)exptime,&newexptime);
00102   return ret;
00103 }
00104 float VideoSource_uEye::GetShutter()
00105 {
00106   float shutter=0.0;
00107   if(m_bIsInited)
00108     shutter = (float)m_ueye.GetExposureTime();
00109   else
00110     shutter = 0.0;
00111   return shutter;
00112 }
00113
00114 int VideoSource_uEye::SetGain(float g)
00115 {
00116   int ret =-1;
00117   if(m_bIsInited)
00118     ret = m_ueye.SetGain((double)g);
00119   return ret;
00120 }
00121
00122 float VideoSource_uEye::GetGain()
00123 {
00124   float gain=0.0;
00125   if(m_bIsInited)
00126     gain = (float)m_ueye.GetGain();
00127   else
00128     gain = 0.0;
00129   return gain;
00130 }
00131
00132  void VideoSource_uEye::SetFPS(float fps)
00133 {
00134   double newfps;
00135   m_ueye.SetFrameRate((double)fps,&newfps);
00136 }
00137
00138 int VideoSource_uEye::GrabSingle(BIAS::Camera <unsigned char> &image)
00139 {
00140   int ret = -1;
00141   ret = m_ueye.GetActiveImageMem((char **)&m_pSwapBuffer,&m_dMemID);
00142   if(ret == IS_SUCCESS){
00143     image.CopyIn_NoInit(m_pSwapBuffer);
00144   }
00145   return ret;
00146 }
00147
00148
00149
00150 int VideoSource_uEye::PreGrab()
00151 {
00152     return 0;
00153 }
00154
00155
00156 int VideoSource_uEye::PostGrab()
00157 {
00158     return 0;
00159 }
00160
00161 int VideoSource_uEye::SetLeftTop(unsigned int left, unsigned int top)
00162 {
00163   int ret = -1;
00164   m_dLeftPos = left;
00165   m_dTopPos = top;
00166   if(m_dLeftPos != 0 || m_dTopPos != 0)
00167   {
00168     if(m_dLeftPos <0) m_dLeftPos = 0;
00169     if(m_dTopPos < 0) m_dTopPos = 0;
00170     ret = m_ueye.SetImagePos(m_dLeftPos,m_dTopPos);
00171   }
00172   return 0;
00173 }
00174
00175 int VideoSource_uEye::SetPixelClock(int dClock)
00176 {
00177   m_dPixelClock = dClock;
00178   m_ueye.SetPixelClock(m_dPixelClock);
00179   return 0;
00180 }
00181
00182 bool VideoSource_uEye::OpenCamera_()
00183 {
00184     int dRet = IS_SUCCESS;
00185   m_ueye.EnableMessage(IS_FRAME , NULL);
00186   m_ueye.ExitCamera();
00187
00188     // open next camera
00189   dRet = m_ueye.InitCamera(0);      // init cam
00190   m_bIsInited = true;
00191
00192     // continue when camera is sucessfully initialized
00193     if( dRet == IS_SUCCESS )
00194     {
00195     SENSORINFO sensorInfo;
00196       dRet = m_ueye.GetSensorInfo(&sensorInfo );
00197
00198         // enable the dialog based error report
00199         if( dRet != IS_SUCCESS )
00200         {
00201             BIASERR( "ERROR: Can not enable the automatic uEye error report!" );
00202             return false;
00203         }
00204
00205     // uEye setup
00206         // setup the color depth to the current windows setting
00207     m_dBitsPerPixel =8;
00208     m_ueye.SetColorMode(IS_SET_CM_Y8);
00209
00210     m_ueye.SetDisplayMode(IS_SET_DM_DIB);
00211
00212     m_dSrcWidth = sensorInfo.nMaxWidth;
00213     m_dSrcHeight = sensorInfo.nMaxHeight;
00214     m_dSrcWidth &= 0xFFFC;
00215     m_dSrcHeight &= 0xFFFC;
00216
00217     m_dWidth = (unsigned int)GetWidth();
00218     m_dHeight = (unsigned int)GetHeight();
00219     m_dDepth = (unsigned int)GetColorChannels();
00220
00221     if(m_dSrcWidth != m_dWidth || m_dSrcHeight !=  m_dHeight)
00222     {
00223       dRet = m_ueye.SetImageSize(m_dWidth,m_dHeight);
00224     }
00225     if(m_dLeftPos != 0 || m_dTopPos != 0)
00226     {
00227       if(m_dLeftPos <0) m_dLeftPos = 0;
00228       if(m_dTopPos < 0) m_dTopPos = 0;
00229       dRet = m_ueye.SetImagePos(m_dLeftPos,m_dTopPos);
00230     }
00231
00232     if(m_dPixelClock != 0)
00233       m_ueye.SetPixelClock(m_dPixelClock);
00234
00235     dRet = m_ueye.AllocImageMem(m_dWidth, m_dHeight, m_dBitsPerPixel, &m_pImageBuffer, &m_dMemID);
00236
00237     dRet = m_ueye.SetImageMem(m_pImageBuffer, m_dMemID);
00238
00239     dRet = m_ueye.SetWhiteBalance(IS_SET_WB_AUTO_ENABLE);
00240
00241         // start live video
00242         dRet = m_ueye.CaptureVideo(IS_FORCE_VIDEO_START);
00243
00244         return true;
00245     }
00246     else
00247     {
00248         BIASERR("No uEye camera could be opened !");
00249   }
00250
00251     return false;
00252 }
00253
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_uEye.hh Source File

VideoSource

VideoSource_uEye.hh

Go to the documentation of this file.
00001 #ifndef __BIAS_VIDEOSOURCE_UEYE_HH__
00002 #define __BIAS_VIDEOSOURCE_UEYE_HH__
00003
00004 #include <bias_config.h>
00005
00006
00007 #ifdef WIN32
00008 #include <windows.h>
00009 #endif
00010
00011 #include <Image/Camera.hh>
00012
00013 #include <stdio.h>
00014 #include <VideoSource/VideoSource_Base.hh>
00015 #include "ueyeclass.hh"
00016
00017 namespace BIAS{
00018
00019 /**
00020     \class VideoSource_UEYE
00021     \ingroup VideoSource
00022     \author ischiller
00023     \brief This class extends VideoSource for the use of IDS UEYE devices
00024 */
00025   class VideoSource_uEye : public VideoSource{
00026
00027
00028   public:
00029   VideoSource_uEye();
00030
00031   ~VideoSource_uEye();
00032
00033   int OpenDevice();
00034   int CloseDevice();
00035
00036   int GrabSingle(BIAS::Camera <unsigned char>  &image);
00037   int InitImage(BIAS::ImageBase &Image);
00038
00039   int PreGrab();
00040   int PostGrab();
00041
00042   int SetShutter(float exptime);
00043   int SetGain(float g);
00044   int SetPixelClock(int dClock);
00045
00046   float GetShutter();
00047   float GetGain();
00048   void SetFPS(float fps);
00049
00050   void SetSize (int w, int h, int bytesperpixel=1);
00051
00052   int SetLeftTop(unsigned int left, unsigned int top);
00053
00054 protected:
00055   bool              OpenCamera_();
00056   bool              m_bIsInited;
00057
00058   int               m_dColorMode;
00059   int               m_dBitsPerPixel;
00060   int               m_dMemID;
00061
00062   HIDS              m_CameraHandle;
00063   CuEye             m_ueye;
00064
00065   unsigned int      m_dSrcWidth;
00066   unsigned int      m_dSrcHeight;
00067   unsigned int      m_dSrcDepth;
00068
00069   int               m_dLeftPos;
00070   int               m_dTopPos;
00071
00072   int               m_dPixelClock;
00073
00074   char*             m_pImageBuffer;
00075   unsigned char*    m_pSwapBuffer;
00076   unsigned int        m_dWidth;
00077     unsigned int          m_dHeight;
00078     unsigned int          m_dDepth;
00079
00080
00081   }; //end class
00082 }//end namespace bias
00083 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_V4L.cpp Source File

VideoSource

VideoSource_V4L.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #include <sys/types.h>
00026 #include <fcntl.h>
00027 #include <stdio.h>
00028 #include <unistd.h>
00029 #include <sys/ioctl.h>
00030 #include <sys/mman.h>
00031 #include <linux/videodev.h>
00032 #include <errno.h>
00033
00034
00035 #include <Image/Camera.hh>
00036 #include "VideoSource_V4L.hh"
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 VideoSource_V4L::VideoSource_V4L(): VideoSource()
00042 {
00043   ColorMode_ = ImageBase::CM_BGR;
00044   DefaultDevice_ = "/dev/video";
00045   ActiveFrame = 0;
00046   SetDebugLevel(0);
00047   GrabbingContinous_ = false;
00048   // try PAL as default
00049   Width_=768;
00050   Height_=576;
00051   ColorChannels_=3;
00052   DeviceChannel_=-1;
00053   newFrame_=false;
00054   pthread_mutex_init(&ActiveFrameMutex_,NULL);
00055   numBuffers_=4;
00056   bufferLastCaptured_=0;
00057   waitForNew_=true;
00058 }
00059
00060 VideoSource_V4L::~VideoSource_V4L()
00061 {
00062 }
00063
00064
00065
00066 int VideoSource_V4L::ShowCapabilities()
00067 {
00068   return ShowCapabilities(DefaultDevice_);
00069
00070 }
00071
00072
00073 void printFormatInfo_(struct v4l2_pix_format &format)
00074 {
00075   cout<<"width:           "<<format.width            <<endl;
00076   cout<<"height:          "<<format.height           <<endl;
00077   cout<<"pixelformat:     ";
00078   __u32 pf = format.pixelformat;
00079   cout << char((pf & 0x000000FF)>>0)  << char((pf & 0x0000FF00)>>8) <<
00080     char((pf & 0x00FF0000)>>16) << char((pf & 0xFF000000)>>24)<<endl;
00081   cout<<"Interlace Mode:  ";
00082   if (format.field ==V4L2_FIELD_NONE)
00083     cout<<"non interlaced"<<endl;
00084   else if (format.field ==V4L2_FIELD_INTERLACED)
00085     cout<<"interlaced"<<endl;
00086   else cout<<format.field<<endl;
00087
00088 }
00089
00090
00091 int VideoSource_V4L::ShowCapabilities(const char *device)
00092 {
00093   if ((fd = open(device, O_RDWR))<0) {
00094     BIASERR("VideoSource_V4L::ShowCapabilities():");
00095     perror(device);
00096     return -1;
00097   }
00098
00099   if (ioctl(fd,VIDIOC_QUERYCAP,&capability2)<0) {
00100     perror("ioctl VIDIO_QUERYCAP");
00101     exit(1);
00102   }
00103
00104   cout << device << ":\n";
00105   cout << "driver:       " << capability2.driver     << "\n";
00106   cout << "Card:         " << capability2.card       <<endl;
00107   cout << "Bus:          " << capability2.bus_info   <<endl;
00108   cout<<  "Version:      " << capability2.version    <<endl;
00109   cout<<  "Capabilities: "<<endl;
00110   if (capability2.capabilities & V4L2_CAP_VIDEO_CAPTURE)
00111     cout<<"The device supports the video capture interface."<<endl;
00112   if (capability2.capabilities & V4L2_CAP_VIDEO_OUTPUT)
00113     cout<<"The device supports the video output interface."<<endl;
00114   if (capability2.capabilities &V4L2_CAP_VIDEO_OVERLAY)
00115     cout<<"The device supports the video overlay interface. Overlay "
00116       "typically stores captured images directly in the video memory "
00117       "of a graphics card, with support for clipping."<<endl;
00118   if (capability2.capabilities & V4L2_CAP_VBI_CAPTURE)
00119     cout<<"The device supports the VBI capture interface"<<endl;
00120   if (capability2.capabilities & V4L2_CAP_TUNER)
00121     cout<<"The device has a tuner of some form"<<endl;
00122   if (capability2.capabilities & V4L2_CAP_AUDIO)
00123     cout<<"The device has audio inputs or outputs."<<endl;
00124
00125   if (capability2.capabilities &V4L2_CAP_READWRITE)
00126     cout<<"The device supports the read() and/or write() I/O methods."<<endl;
00127   if (capability2.capabilities & V4L2_CAP_ASYNCIO)
00128     cout<<"The device supports the asynchronous I/O methods."<<endl;
00129   if (capability2.capabilities & V4L2_CAP_STREAMING)
00130     cout<<"The device supports the streaming I/O method."<<endl;
00131
00132   // if CAPTURE device print info about all inputs
00133   int index=0, current=-1;
00134   cout<<endl;
00135   struct v4l2_input input;
00136   memset (&input, 0, sizeof (input));
00137   input.index = index;
00138   if (ioctl (fd,VIDIOC_G_INPUT, &current)!=0)
00139     perror("couldn't get current active input number");
00140
00141   while (ioctl (fd, VIDIOC_ENUMINPUT, &input)==0) {
00142     cout<<"Input nr: "<<index<<endl;
00143     cout<<"Name:      "<<input.name       <<endl;
00144     if (input.type == V4L2_INPUT_TYPE_CAMERA)
00145       cout<<"Type: CAMERA"<<endl;
00146     if (input.type == V4L2_INPUT_TYPE_TUNER)
00147       cout<<"Type: TUNER"<<endl;
00148     cout<<"Supported standards:";
00149     if (input.std & V4L2_STD_PAL )
00150       cout<<"PAL ";
00151     if (input.std & V4L2_STD_NTSC )
00152       cout<<"NTSC ";
00153     if (input.std & V4L2_STD_SECAM )
00154       cout<<"SECAM ";
00155     cout<<endl;
00156     if (index==current) {
00157       cout<<"this is the current active input"<<endl;
00158       if  (input.status & V4L2_IN_ST_NO_POWER)
00159         cout<<"Status: No Power"<<endl;
00160       if  (input.status & V4L2_IN_ST_NO_SIGNAL)
00161         cout<<"Status: No Signal"<<endl;
00162       if  (input.status & V4L2_IN_ST_NO_COLOR)
00163         cout<<"Status: No Color"<<endl;
00164       if (input.status == 0)
00165         cout<<"Status: POWER ON, SIGNAL and COLOR"<<endl;
00166     }
00167     cout<<endl;
00168     index++;
00169     input.index = index;
00170     usleep(10000); //wait 10ms
00171   }
00172   if (index==0) {
00173     cerr<<"No Input found. Error:";
00174     if (errno==EBUSY) cout<<"EBUSY"<<endl;
00175     if (errno==EINVAL) cout<<"EINVAL"<<endl;
00176     else cout<<errno<<endl;
00177   }
00178
00179   memset (&format2_, 0, sizeof (format2_));
00180   format2_.type =V4L2_BUF_TYPE_VIDEO_CAPTURE;
00181   if (ioctl(fd,VIDIOC_G_FMT,&format2_)!=0)
00182     perror("couldn't get format \n");
00183   else {
00184     printFormatInfo_(format2_.fmt.pix);
00185   }
00186
00187   close(fd);
00188   return 0;
00189
00190 }
00191
00192
00193
00194 int VideoSource_V4L::OpenDevice()
00195 {
00196   return OpenDevice(DefaultDevice_);
00197 }
00198
00199
00200 int VideoSource_V4L::OpenDevice(const char *device)
00201 {
00202   if ((fd = open(device, O_RDWR))<0) {
00203     perror(device);
00204     return -1;
00205   }
00206
00207   if (ioctl(fd,VIDIOC_QUERYCAP,&capability2)<0) {
00208     perror("ioctl VIDIO_QUERYCAP");
00209     exit(1);
00210   }
00211
00212   // at first try to select the input/channel where a signal is
00213   // only if none ist set by the user
00214
00215   int index =0;
00216
00217   if (DeviceChannel_<0) {
00218     struct v4l2_input input;
00219     int res;
00220     res=ioctl (fd,VIDIOC_S_INPUT, &index);
00221     if (res!=0)
00222       cerr<<"VIDIOC_S_INPUT: couldn't set active input:"<<index<<endl;
00223     bool found =false;
00224     while (!found && res==0) {
00225       // check wether there is a signal and color
00226       memset (&input, 0, sizeof (input));
00227       input.index = index;
00228       usleep(50000);
00229       if (ioctl (fd, VIDIOC_ENUMINPUT, &input)==0) {
00230         if (input.status==0) {
00231           found=true; // input with a valid signal found
00232           cout<<"valid signal on input channel:"<<index<<" found."<<endl;
00233         }
00234       }
00235       if (!found) {
00236         usleep(50000);
00237         index++;
00238         res=ioctl (fd,VIDIOC_S_INPUT, &index);
00239         if (res!=0)
00240           cerr<<"VIDIOC_S_INPUT: couldn't set active input:"<<index<<endl;
00241       }
00242     }
00243     if (!found) {
00244       BIASERR("no valid input signal found on all "<<index<<" channels");
00245       return -2;
00246     }
00247   }
00248
00249
00250   // set PAL if possible
00251   v4l2_std_id palId=V4L2_STD_PAL;
00252   if (ioctl(fd,VIDIOC_S_STD,&palId)!=0) {
00253     perror("couldn't set PAL\n");
00254     return -3;
00255   }
00256
00257   //// get the current image format, then alter it and set the edited
00258   memset (&format2_, 0, sizeof (format2_));
00259   format2_.type =V4L2_BUF_TYPE_VIDEO_CAPTURE;
00260   if (ioctl(fd,VIDIOC_G_FMT,&format2_)!=0) {
00261     perror("couldn't get format \n");
00262     return -3;
00263   }
00264   struct v4l2_format format2Copy;
00265   memcpy(&format2Copy, &format2_,  sizeof (format2_));
00266
00267    switch (ColorMode_ )
00268     {
00269     case ImageBase::CM_RGB:
00270       BIASDOUT(D_V4L, "Grabbing RGB which is ");
00271       format2Copy.fmt.pix.pixelformat=v4l2_fourcc('R','G','B','3');
00272       ColorChannels_ = 3;
00273       BytesPerPixel_=3;
00274       //      BIASWARN("the Sony PTZ do not support RGB, use to BGR");
00275       break;
00276     case ImageBase::CM_BGR:
00277       BIASDOUT(D_V4L, "Grabbing BGR");
00278       format2Copy.fmt.pix.pixelformat=v4l2_fourcc('B','G','R','3');
00279       ColorChannels_ = 3;
00280       BytesPerPixel_=3;
00281       break;
00282     case ImageBase::CM_YUYV422:
00283       BIASDOUT(D_V4L,  "Grabbing YUV");
00284       format2Copy.fmt.pix.pixelformat=V4L2_PIX_FMT_YUV422P;
00285       ColorChannels_ = 2;
00286       BytesPerPixel_=2;
00287       break;
00288     case ImageBase::CM_Grey:
00289       BIASDOUT(D_V4L, "Grabbing Grey");
00290       format2Copy.fmt.pix.pixelformat=V4L2_PIX_FMT_GREY;
00291       ColorChannels_ = 1;
00292       BytesPerPixel_=1;
00293       break;
00294     case ImageBase::CM_RGBA:
00295       BIASWARN("the Sony PTZ do not support RGBA, use BGRA");
00296       break;
00297     case ImageBase::CM_BGRA:
00298       BIASDOUT(D_V4L, "Grabbing BGRA");
00299       format2Copy.fmt.pix.pixelformat=v4l2_fourcc('B','G','R','4');
00300       ColorChannels_ = 4;
00301       BytesPerPixel_=4;
00302       break;
00303     default:
00304       BIASERR("VideoSource_V4L::OpenDevice(): Unsupported colormode");
00305       return -5;
00306     }
00307
00308    format2Copy.fmt.pix.width=Width_;
00309    format2Copy.fmt.pix.height=Height_;
00310    //   format2_.fmt.pix.field=V4L2_FIELD_NONE; // try non-interlaced
00311
00312    if (ioctl(fd,VIDIOC_S_FMT,&format2Copy)!=0) {
00313      perror("couldn't set format: \n");
00314      printFormatInfo_(format2Copy.fmt.pix);
00315      return -5;
00316    }
00317    Width_=format2Copy.fmt.pix.width;
00318    Height_=format2Copy.fmt.pix.height;
00319
00320   //// get buffers for capturing
00321   memset (&reqBuf, 0, sizeof (reqBuf));
00322   reqBuf.count= numBuffers_;
00323   reqBuf.type=V4L2_BUF_TYPE_VIDEO_CAPTURE;
00324   reqBuf.memory=V4L2_MEMORY_MMAP;
00325   if (-1 == ioctl (fd, VIDIOC_REQBUFS, &reqBuf)) {
00326     if (errno == EINVAL)
00327       printf ("Video capturing or mmap-streaming is not supported\n");
00328     else
00329       perror ("VIDIOC_REQBUFS");
00330     return -4;
00331   }
00332   // mmap the buffer
00333   for (unsigned int i = 0; i < reqBuf.count; i++) {
00334     memset (&buffer_, 0, sizeof (buffer_));
00335     buffer_.type = reqBuf.type;
00336     buffer_.memory = V4L2_MEMORY_MMAP;
00337     buffer_.index = i;
00338     if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buffer_)) {
00339       perror ("VIDIOC_QUERYBUF");
00340       exit (EXIT_FAILURE);
00341     }
00342     bufLengths.push_back(buffer_.length); /* remember for munmap() */
00343     bufStarts.push_back((char*)mmap (NULL, buffer_.length,
00344                               PROT_READ | PROT_WRITE, /* required */
00345                               MAP_SHARED,             /* recommended */
00346                               fd, buffer_.m.offset));
00347
00348     if (bufStarts[i] == MAP_FAILED) {
00349       perror ("mmap");
00350       exit (EXIT_FAILURE);
00351     }
00352   }
00353
00354   // start capturing into the buffers
00355   if (-1 == ioctl (fd, VIDIOC_STREAMON, & reqBuf.type)) {
00356     perror ("VIDIOC_STREAMON");
00357     exit (EXIT_FAILURE);
00358   }
00359   CompleteInitialized_ = true;
00360   return 0;
00361 }
00362
00363 int VideoSource_V4L::CloseDevice()
00364 {
00365   if (Grabbing_) {
00366     BIASERR("VideoSource_V4L::CloseDevice(): Grabbing is running, but closing anyway");
00367   }
00368
00369   Grabbing_ = false;
00370   PostGrab();
00371
00372   CompleteInitialized_ = false;
00373
00374   if (-1 == ioctl (fd, VIDIOC_STREAMOFF, &reqBuf.type)) {
00375     perror ("VIDIOC_STREAMON");
00376     return -1;
00377   }
00378   for (unsigned int i = 0; i < bufLengths.size(); i++)
00379     munmap (bufStarts[i], bufLengths[i]);
00380
00381   close(fd);
00382   return 0;
00383
00384 }
00385
00386
00387
00388 int VideoSource_V4L::GrabSingle(Camera <unsigned char> &image)
00389 {
00390
00391   BIASDOUT(D_V4L,"VideoSource_V4L::GrabSingle()");
00392   assert(! image.IsEmpty());
00393
00394   if (!Active_) {
00395     BIASERR("VideoSource_V4L::GrabSingle(): VideoSource Object not active, use PreGrab()");
00396     return -1;
00397   }
00398
00399   if (Grabbing_) {
00400     BIASERR("VideoSource_V4L::GrabSingle(): VideoSource Object is already grabbing()");
00401     return -1;
00402   }
00403
00404   Grabbing_ = true;
00405
00406   if (GrabbingContinous_ ) {
00407     if (waitForNew_)
00408       while (!newFrame_) usleep(5);
00409     // locking not necessary because more than 2 buffers are used fro grabbing
00410     //pthread_mutex_lock(&ActiveFrameMutex_);
00411     gettimeofday(&GrabTime_,NULL);
00412     image.SetTime(GrabTime_.tv_sec,GrabTime_.tv_usec);
00413     newFrame_=false;
00414     image.CopyIn_NoInit((unsigned char*)bufStarts[bufferLastCaptured_]);
00415
00416     //    pthread_mutex_unlock(&ActiveFrameMutex_);
00417   } else {
00418     buffer_.index=0; // always use first buffer, if not in continous mode
00419     if (ioctl(fd, VIDIOC_QBUF, &buffer_)!=0) {
00420       perror("ioctl: freeing the buffer memory\n");
00421       return -3;
00422     }
00423     errno=0;
00424     // wait for a new frame
00425     while ( (errno!=EINVAL) &&
00426             (ioctl(fd, VIDIOC_DQBUF, &buffer_)!=0) ) {
00427       if (errno==EINVAL) {
00428         perror("ioctl: waiting for a new frame \n");
00429         return -4;
00430       }
00431     }
00432     gettimeofday(&GrabTime_,NULL);
00433     image.SetTime(GrabTime_.tv_sec,GrabTime_.tv_usec);
00434     image.CopyIn_NoInit( (unsigned char*)bufStarts[0]);
00435   }
00436
00437   Grabbing_ = false;
00438
00439   image.InvalidateUID();
00440   BIASDOUT(D_V4L,"leaving GrabSingle()");
00441
00442   return 0;
00443 }
00444
00445 int VideoSource_V4L::StartGrabContinous(){
00446   GrabbingContinous_ = true;
00447   return pthread_mutex_init(&ActiveFrameMutex_, NULL) ||
00448     pthread_cond_init(&ThreadCondition_, NULL) ||
00449     pthread_create(&ContinousThread_, NULL, GrabContThread_ , this);
00450 }
00451
00452
00453 int VideoSource_V4L::StopGrabContinous(){
00454   int res = 0;
00455
00456   GrabbingContinous_ = false;
00457
00458   if ( (res = pthread_join(ContinousThread_, NULL)) != 0){
00459     perror("pthread_join");
00460     BIASERR("VideoSource_V4L::StopGrabContinous()  pthread_join unsucessfull "<< res);
00461     res--;
00462   }
00463   pthread_mutex_unlock(&ActiveFrameMutex_);
00464   if (pthread_mutex_destroy(&ActiveFrameMutex_) != 0){
00465     perror("pthread_mutex_destroy");
00466     BIASERR("VideoSource_V4L::StopGrabContinous()  pthread_mutex_destroy unsucessfull");
00467     res--;
00468   }
00469   if (pthread_cond_destroy(&ThreadCondition_) != 0){
00470     perror("pthread_cond_destroy");
00471     BIASERR("VideoSource_V4L::StopGrabContinous()  pthread_cond_destroy unsucessfull");
00472     res--;
00473   }
00474
00475   return res;
00476 }
00477
00478
00479
00480
00481
00482 void *VideoSource_V4L::GrabContThread_(void * arg){
00483   VideoSource_V4L *obj = (VideoSource_V4L *) arg;
00484
00485
00486   // free all buffers such that capturing may start
00487   for (unsigned int i=0;i<obj->numBuffers_;i++) {
00488     obj->buffer_.index=i;
00489     if (ioctl(obj->fd, VIDIOC_QBUF, & obj->buffer_)!=0) {
00490       perror("ioctl: initial freeing of all buffer memories\n");
00491       return (void *)NULL;
00492     }
00493     usleep(10);
00494   }
00495
00496
00497   while (obj->GrabbingContinous_){
00498     errno=0;
00499     // wait for a new frame
00500     obj->buffer_.index=obj->bufferLastCaptured_+1;
00501     if (obj->buffer_.index >= obj->numBuffers_)
00502       obj->buffer_.index=0;
00503     while ( (errno!=EINVAL) &&
00504             (ioctl(obj->fd, VIDIOC_DQBUF, & obj->buffer_)!=0) ) {
00505       if (errno==EINVAL) {
00506         perror("ioctl: waiting for a new frame \n");
00507         return (void *)NULL;
00508       }
00509       usleep(20);
00510     }
00511
00512     pthread_mutex_lock(&obj->ActiveFrameMutex_);
00513     obj->bufferLastCaptured_++; // switch between 0 and 1 with xor
00514     if (obj->bufferLastCaptured_ >= (int)obj->numBuffers_)
00515       obj->bufferLastCaptured_=0;
00516     obj->newFrame_=true;
00517     pthread_mutex_unlock(&obj->ActiveFrameMutex_);
00518
00519     obj->buffer_.index=obj->bufferLastCaptured_+1;
00520     if (obj->buffer_.index >= obj->numBuffers_)
00521       obj->buffer_.index=0;
00522     if (ioctl(obj->fd, VIDIOC_QBUF, & obj->buffer_)!=0) {
00523       //      perror("ioctl: freeing the buffer memory\n");
00524       //      return (void *)NULL;
00525     }
00526     usleep(10);
00527
00528   }
00529
00530   pthread_exit(NULL);
00531 }
00532
00533
00534
00535
00536
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: VideoSource/VideoSource_V4L.hh Source File

VideoSource

VideoSource_V4L.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 #ifndef __BIAS_VIDEOSOURCE_V4L_HH__
00026 #define __BIAS_VIDEOSOURCE_V4L_HH__
00027
00028 #include <bias_config.h>
00029
00030 #ifndef BIAS_HAVE_V4L
00031 #  error Please recompile MIP with BUILD_V4L to use VideoSource V4L
00032 #endif
00033 #ifndef BIAS_HAVE_PTHREADS
00034 #  error BIAS_HAVE_PTHREADS not defined. But BIAS::ImageCanvas needs pthreads (on Unix and Win32). Please enable USE_PTHREADS in CMake configure step.
00035 #endif
00036
00037 #include <VideoSource/VideoSource_Base.hh>
00038
00039 #include <sys/time.h>
00040 #include <linux/videodev.h>
00041 #include <pthread.h>
00042
00043
00044
00045
00046 namespace BIAS{
00047 /** \class VideoSource_V4L
00048     \ingroup VideoG
00049     \author evers, v4l2 by grest
00050     \brief This class extends VideoSource for the use of Video4Linux
00051     supported devices like framegrabber, USB cameras.
00052 */
00053   class VideoSource_V4L : public VideoSource{
00054
00055
00056   public:
00057     VideoSource_V4L();
00058     virtual ~VideoSource_V4L();
00059
00060     int ShowCapabilities();
00061     int ShowCapabilities(const char *device);
00062
00063     virtual int OpenDevice();
00064
00065     virtual int OpenDevice(const char *device);
00066     virtual int CloseDevice();
00067
00068     /** blocks until a new frame arrives from the cam,
00069         if dont want blocking set waitForNew() to false
00070     */
00071     virtual int GrabSingle(BIAS::Camera <unsigned char> &image);
00072
00073     /** If you want as many images as possbile, and dont care about equal ones
00074         call this with "false". Default is that GrabSingle blocks until
00075         a new frame arrives from the camera.
00076         @author grest, Oct. 2005
00077      */
00078     inline void SetWaitForNew(bool waitForNew) { waitForNew_=waitForNew; }
00079
00080     virtual int StartGrabContinous();
00081
00082     virtual int StopGrabContinous();
00083
00084   protected:
00085     int fd;
00086
00087     struct v4l2_requestbuffers reqBuf;
00088     struct v4l2_capability   capability2;
00089     struct v4l2_format       format2_;
00090     struct v4l2_buffer buffer_;
00091     unsigned int numBuffers_;
00092     int bufferLastCaptured_;
00093
00094     int waitForNew_;
00095     std::vector<int> bufLengths; // remember for unmap
00096     std::vector<char*> bufStarts; // remember for unmap
00097
00098
00099     bool GrabbingContinous_;
00100     pthread_t ContinousThread_;
00101     pthread_cond_t ThreadCondition_;
00102     pthread_mutex_t ActiveFrameMutex_;
00103
00104     struct timeval GrabTime_;
00105
00106     static void *GrabContThread_(void * arg);
00107
00108     bool newFrame_;
00109
00110   protected:
00111     // for doublebuffering this swich is used to select the frame
00112     int ActiveFrame ;
00113
00114
00115   };
00116
00117 } // namespace MIP
00118
00119
00120 #endif
Generated on Wed Jun 21 19:01:18 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/VideoStream.cpp Source File

Image

VideoStream.cpp

Go to the documentation of this file.
00001 #include "VideoStream.hh"
00002
00003 using namespace std;
00004 using namespace BIAS;
00005
00006 #include <fcntl.h>
00007 #include <sstream>
00008 #include <iostream>
00009 #include "Camera.hh"
00010 #include <Base/Image/ImageIO.hh>
00011
00012
00013 VideoStream::~VideoStream() {}
00014
00015
00016 VideoStream::VideoStream()
00017 {
00018   NumImages_ = 0;
00019   ImageSize_ = 0;
00020 }
00021
00022 VideoStream::VideoStream(const std::string & file)
00023 {
00024   NumImages_ = 0;
00025   ImageSize_  =0;
00026   Open(file);
00027 }
00028
00029 // jw
00030 VideoStream::VideoStream(const BIAS::VideoStream & src){
00031     (*this) = src;
00032 }
00033
00034 BIAS::VideoStream &
00035 VideoStream::operator=(const BIAS::VideoStream & src)
00036 {
00037     Header_ = src.Header_;
00038
00039     // no assignment operator for std streams!! (jw)
00040     //Ifs_ = src.Ifs_;
00041     BIASERR("Assignment operator is not correct due to missing fstream assignment! (jw)");
00042
00043     ImageSize_ = src.ImageSize_;
00044     NumImages_ = src.NumImages_;
00045     FileSize_  = src.FileSize_;
00046
00047     return *this;
00048 }
00049
00050
00051
00052
00053 int VideoStream::Open(const std::string & file)
00054 {
00055   Ifs_.open(file.c_str(),ios::binary);
00056   if (!Ifs_) {
00057     BIASERR("Can not open file for reading");
00058     perror(file.c_str());
00059     return -1;
00060   }
00061   Ifs_.seekg(0,ios_base::end);
00062   FileSize_ = Ifs_.tellg();
00063   Ifs_.seekg(0,ios_base::beg);
00064   Ifs_.read(reinterpret_cast<char *>(&Header_),sizeof(Header_));
00065   if (!Ifs_) {
00066     BIASERR("error reading from file");
00067     perror(file.c_str());
00068     return -1;
00069   }
00070
00071   ImageSize_ = Header_.Width * Header_.Height * Header_.ChannelCount
00072     * Header_.BytesPerPixel;
00073
00074   NumImages_ = (FileSize_ - sizeof(Header_)) / Header_.AlignedSize;
00075
00076  return 0;
00077 }
00078
00079
00080 int VideoStream::Close()
00081 {
00082   Ifs_.close();
00083   return 0;
00084 }
00085
00086 // go through video stream and export count frames starting at start
00087 int VideoStream::SplitIntoFiles(const std::string &prefix, unsigned int start,
00088                 unsigned int count )
00089 {
00090   if (!Ifs_) {
00091     BIASERR("VideoStream not open.");
00092     return -1;
00093   }
00094   // we should seek to start
00095
00096   unsigned int numimages;
00097   ostringstream filename;
00098   VSImageHeader  imghead;
00099   unsigned int paddingsize = Header_.AlignedSize - ImageSize_-sizeof(imghead);
00100   cout <<"Paddingsize: "<<paddingsize<<endl;
00101   Camera<unsigned char> img;
00102   UUID uid;
00103   img.Init(Header_.Width, Header_.Height, Header_.ChannelCount);
00104   char *imgdata = reinterpret_cast<char *> (img.GetImageData());
00105   if (count ==0) numimages = NumImages_ ;
00106   else numimages = count + start;
00107   for (unsigned int i=start;i<numimages; i++) {
00108     Ifs_.read(reinterpret_cast<char *>(&imghead), sizeof(imghead));
00109     if (!Ifs_) return -1;
00110     Ifs_.read(imgdata, ImageSize_);
00111     if (!Ifs_) return -1;
00112     uid.SetFromString(imghead.uuid);
00113     img.SetUID(uid);
00114     filename.str("");
00115     filename<<prefix<<i;
00116     cout <<"file: "<<filename.str()<<" UUID: "<<img.GetUID()<<" Time: "
00117      <<imghead.tsec<<" "<<imghead.tusec<<endl;
00118     img.UpdateMetaData();
00119     ImageIO::Write(filename.str(),img,false,false);
00120     Ifs_.seekg(paddingsize,ios_base::cur);
00121
00122   }
00123
00124   return 0;
00125 }
00126
00127
00128 void VideoStream::PrintHeader()
00129 {
00130
00131   cout <<"FileSize: "<<FileSize_<<endl;
00132   cout <<"Image width, height, channelcout, BpP: "<<Header_.Width<<"x"
00133     <<Header_.Height<<", "<<(int)Header_.ChannelCount<<", "
00134     <<(int)Header_.BytesPerPixel<<endl;
00135
00136   cout <<"StorageType, ColorModel: "
00137     <<int(Header_.StorageType)<<", "
00138     <<int(Header_.ColorModel)<<endl;
00139
00140   cout <<"ImageSize, BlockSize: "<<ImageSize_<<", "<<Header_.AlignedSize<<endl;
00141   cout <<"NumImages: "<<NumImages_<<endl;
00142   cout <<"Remainer: "<<FileSize_ - sizeof(Header_) - NumImages_ *
00143     Header_.AlignedSize<<endl;
00144 }
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Image/VideoStream.hh Source File

Image

VideoStream.hh

Go to the documentation of this file.
00001 #ifndef __VIDEOSTREAM_HH__
00002 #define __VIDEOSTREAM_HH__
00003
00004 #include <bias_config.h>
00005
00006
00007 #include <string>
00008 #include <iostream>
00009 #include <fstream>
00010
00011 #include <Base/Image/ImageBase.hh>
00012
00013
00014 namespace BIAS {
00015
00016     /** To allow capturing of camera image to disk efficiently, (avoid
00017     multiple memcopy operations), this class defines an interface to
00018     file containing one header and multiple images. All data for
00019     write() must be aligned to 512-byte boundaries to allow
00020     unbuffered operations with open(,O_DIRECT). This can only
00021     guaranteed by circumventing all C++ stuff like new() and
00022     operator<<(). These video stream file are written by
00023     MIP::VideoSource_() and can be split into multiple images with
00024     this class.
00025     @author Jan-Friso Evers-Senne
00026     */
00027
00028     /*
00029     File structure:
00030     - one header: 512 byte
00031     - N sets of size AlignedData_:
00032     - VSImageHeader (time stamp and raw uuid)
00033     - ImageData (size: width * height * *channelsount * bytesperpixel)
00034     */
00035     class BIASImage_EXPORT VideoStream {
00036     public:
00037
00038         // this header only occur once at the beginning of each stream file
00039         // size doesn't matter, but alignment matters.
00040         class BIASImage_EXPORT VSHeader {
00041         public:
00042             unsigned int Width,Height;                 // 8 byte
00043             unsigned char ChannelCount,BytesPerPixel;  // 4 byte
00044             ImageBase::EStorageType StorageType;       // 4 byte
00045             ImageBase::EColorModel  ColorModel;        // 4 byte
00046             // size of image in byte = width *height*channelcount * bytesperpixel
00047             // this is the next multiple-of-512 size
00048             unsigned int AlignedSize;                  // 4 byte
00049             //                                      Sum: 24
00050
00051             // Padding must fill-up this struct to _exactly_ 512 byte
00052             unsigned char Padding[488];
00053         };
00054
00055         class BIASImage_EXPORT VSImageHeader {
00056         public:
00057             long int tsec,tusec;
00058             // uuid as string with like (use 40 instead of 37 char)
00059             // c08ded6e-8419-11d9-8e06-000d614f5bc5
00060             char uuid[40];
00061         };
00062
00063     public :
00064         /** destructor mandatory because copy constructor is.
00065         @author Jan Woetzel 08/2005 */
00066         virtual ~VideoStream();
00067
00068         VideoStream();
00069
00070         VideoStream(const std::string & file);
00071
00072         /** copy constructor mandatory because of ifstrseam member
00073         @author Jan Woetzel 08/2005 */
00074         VideoStream(const VideoStream & src);
00075
00076         /** assignment operator is mandatory because copy constructor is.
00077         @author Jan Woetzel 08/2005 */
00078         BIAS::VideoStream & operator=(const BIAS::VideoStream & src);
00079
00080
00081         int Open(const std::string & file);
00082         int Close();
00083         void PrintHeader();
00084
00085         // go through video stream and export count frames starting at start
00086         int SplitIntoFiles(const std::string &prefix, unsigned int start=0,
00087             unsigned int count =0);
00088
00089
00090         // ---  data members: ---
00091     protected:
00092
00093       //BIASImage_EXPORT
00094
00095         VSHeader Header_;
00096         std::ifstream Ifs_;
00097
00098         unsigned int ImageSize_;
00099         unsigned int NumImages_;
00100         unsigned long int FileSize_;
00101
00102     };
00103
00104 }// namespace
00105
00106
00107 #endif
Generated on Wed Jun 21 19:01:10 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/Examples/viff2mip.cpp Source File

Base » Image » Examples

viff2mip.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025 /**
00026  @example viff2mip.cpp
00027  convert very old Choros .viff format to our internal proprietary .mip image format (depreacted!)
00028  @author Jan Woetzel
00029 */
00030
00031
00032 #include <iostream>
00033
00034 #include <Base/Image/ImageBase.hh>
00035 #include <Base/Image/ImageConvert.hh>
00036 #include <Base/Image/ImageIO.hh>
00037
00038 using namespace BIAS;
00039 using namespace std;
00040
00041 int main(int argc, char *argv[]){
00042   ImageBase source, dest;
00043
00044   if (argc!=3)
00045   {
00046     BIASERR(argv[0] << " viff.image image.mip ");
00047     //return -1;
00048     return 0; // for Dart testing
00049   }
00050
00051   if (ImageIO::Load(argv[1], source)!=0){
00052     BIASERR("error loading image "<<argv[1]);
00053     //return -2;
00054     return 0; // for Dart testing
00055   }
00056
00057
00058
00059   if (ImageIO::Write(argv[2], source)!=0){
00060     BIASERR("error writing image ");
00061     //return -4;
00062     return 0; // for Dart testing
00063   }
00064   return 0;
00065 }
Generated on Wed Jun 21 19:00:50 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/ViffHeader.hh Source File

Base » Image

ViffHeader.hh

Go to the documentation of this file.
00001 /*
00002 This file is distributed as part of the BIAS library (Basic ImageAlgorithmS)
00003 but it has not been developed by the authors of BIAS.
00004
00005 For copyright, author and license information see below.
00006 */
00007
00008
00009
00010 #ifndef __VIFFHEADER_HH__
00011 #define __VIFFHEADER_HH__
00012 /*
00013 ******************************************************************
00014 Khoros Visualization/Image File Format
00015
00016 A Khoros data file is organized as a 1Kbyte header
00017 followed by additional information.  The first two
00018 bytes of the header tell what kind of stuff the
00019 additional information is.  For Khoros image files,
00020 the additional information consists of the maps,
00021 the location data, and then the image or vector data.
00022
00023 There is a supporting document for this file called
00024 "The Khoros Visualization/Image File Format" that will help to
00025 expalin the various fields, see $KHOROS_HOME/manual/viff_format.
00026
00027 The header fields where carefully selected to
00028 prevent contradictions between categories, i.e. they
00029 were chosen to be orthogonal to each other.  However,
00030 in several situations this causes the fields to supply
00031 redundant information.
00032
00033 Note that the structure contains pointers to the various
00034 chunks of data.  These will make sense ONLY when the
00035 data is in memory.
00036
00037 *imagedata - points to a sequence of images, an image is
00038 made up of bands, and the bands are in a sequence; or
00039 it can point to vectors, where the vector dimension is
00040 the number of bands.
00041
00042 *maps - points to a sequence of 2-dimensional maps, a map
00043 is organized as stacked columns.  A data value indexes map rows.
00044
00045 *location - points to bands of coordinate values, ie if
00046 two dimensional locations, then there would be a band
00047 of x's followed by a band of y's.
00048
00049 The Khoros convention for the image orientarion is
00050 with the image origin in the upper left hand corner.
00051
00052 ******************************************************************
00053 */
00054
00055
00056 /*
00057 * The VIFF header size for a Cray is 4096 because of the
00058 * word size on a cray. So, set the headersize to be 4096
00059 * for the cray and 1024 of all other machines.
00060 */
00061
00062 #if defined(CRAY)
00063 #   define VIFF_HEADERSIZE 4096
00064 #else
00065 #   define VIFF_HEADERSIZE 1024
00066 #endif
00067
00068
00069 /* image structure definition */
00070
00071 class xvimage {
00072 public:
00073
00074     /*  Administrative or file management information */
00075
00076     char    identifier; /* a magic number that tells
00077                         the world that this is an
00078                         Khoros file */
00079
00080     char    file_type;  /* tells if this file is a VIFF file */
00081
00082     char    release;    /* release number */
00083
00084     char    version;    /* version number */
00085
00086     char    machine_dep;    /* indicates peculiarities of */
00087     /* machine architecture */
00088
00089     char    trash[3];   /* preserves word boundaries */
00090     /* groups of 4 bytes */
00091
00092     char    comment[512];   /* text for image commentary */
00093
00094     /* Things that specify the spatial properties of the image, pixel
00095     organization, and data storage arrangement.  */
00096
00097     unsigned long   row_size;   /* length of row in pixels,
00098                                 i.e. number of columns */
00099
00100     unsigned long   col_size;   /* length of column in pixels,
00101                                 i.e. number or rows */
00102
00103     unsigned long   subrow_size;    /* Length of subrows. This is useful
00104                                     when one wants pixel vectors to
00105                                     represent 2D objects (images).
00106                                     The size of each pixel "image"
00107                                     would be subrow_size (columns)
00108                                     by num_data_bands/subrow_size (rows).
00109                                     This field may be ignored except
00110                                     by routines that need the 2D
00111                                     interpretation. */
00112
00113     /* The product of row_size and col_size is used to indicate
00114     the number of locations when the location type is explicit,
00115     the product also indicates the number of pixels in a band,
00116     or the number of vectors.  */
00117
00118     long    startx, starty; /* subimage starting position (upper
00119                             left hand corner), negative indicates
00120                             that it is not a subimage */
00121
00122     float   pixsizx, pixsizy;   /* Actual size of pixel at time of
00123                                 digitization in meters */
00124
00125     unsigned long   location_type;  /* implied or explicit location
00126                                     data    (implied locations are
00127                                     derived from row_size and
00128                                     col_size */
00129
00130     unsigned long   location_dim;   /* explicit locations can be of
00131                                     any dimension  */
00132
00133     unsigned long   num_of_images;     /* number of images
00134                                        pointed to by *imagedata,
00135                                        do not confuse with number of
00136                                        bands */
00137
00138     unsigned long   num_data_bands; /* Number of bands per data pixel,
00139                                     or number of bands per image, or
00140                                     dimension of vector data, or
00141                                     number of elements in a vector */
00142
00143     unsigned long   data_storage_type;  /* storage type for disk data */
00144
00145     unsigned long   data_encode_scheme; /* encoding scheme of disk data */
00146
00147     /* Things that determine how the mapping (if any) of data bands is
00148     to be done to obtain the actual "image" or data.  */
00149
00150     unsigned long   map_scheme;  /* How mapping (if any) is to occur */
00151
00152     unsigned long   map_storage_type;/* Storage type of cells in the maps */
00153
00154     unsigned long   map_row_size; /* number of columns in map array */
00155
00156     unsigned long   map_col_size;   /* number of entries in map (rows) */
00157
00158     unsigned long   map_subrow_size; /* Length of subrows. This is useful
00159                                      when using the output vector from
00160                                      the map as a 2-D image, rather
00161                                      than just a vector. The size of
00162                                      the 2-D image would be:
00163                                      map_subrow_size (columns) by
00164                                      map_row_size/map_subrow_size
00165                                      (rows). This field may be ignored
00166                                      except by routines that need the 2D
00167                                      interpretation */
00168
00169     unsigned long   map_enable; /* Tells if the disk data is valid
00170                                 with or without being sent thru the
00171                                 map. Some data MUST be mapped to be
00172                                 valid. */
00173
00174     unsigned long   maps_per_cycle; /* number of maps to constitue a "cycle"
00175                                     for VFF_MS_CYCLE */
00176
00177     /* Specification of the particular color model in use when working with a
00178     color image. This just tells what the coordinate system and axis orientation
00179     of the color space is.  */
00180
00181     unsigned long   color_space_model;
00182
00183     /* Extra fields for use by the user as needed. These are NOT SUPPORTED
00184     in any way, except for being read and written correctly with respect
00185     to machine dependencies.  */
00186
00187     unsigned long   ispare1,ispare2;    /* Spare long ints */
00188
00189     float       fspare1,fspare2;    /* Spare floats */
00190
00191     /* Pointers to the actual data - these are valid only when in memory! */
00192
00193     char    reserve[VIFF_HEADERSIZE - (21*sizeof(long))
00194         - (520*sizeof(char))
00195         - (2*sizeof(char *)) - (4*sizeof(float))
00196         - (sizeof(float *))];
00197     /* maximum header information is
00198     1024 bytes, what is not currently
00199     used is saved in reserve */
00200
00201     char *maps;     /* a pointer to the maps, must be cast into
00202                     the proper type */
00203
00204     float *location;    /* a pointer to the location data (for
00205                         explicit locations, each location is
00206                         paired with data pointed to by
00207                         *imagedata,  all locations are
00208                         in float  */
00209
00210     char *imagedata;    /* a pointer to the input data (straight off
00211                         of disk, must be cast into the proper type */
00212
00213 } ;
00214
00215 /* definitions for version number,
00216 char release; */
00217 #define XV_IMAGE_VER_NUM    3   /* Version 3 (3.1) */
00218
00219 /* definitions for release number,
00220 char version; */
00221 #define XV_IMAGE_REL_NUM    1   /* Release 1   */
00222
00223 /* definitions for subimage information,
00224 long startx, starty; */
00225 #define VFF_NOTSUB          ~0  /* a negative number indicates that
00226 the image is not a subimage */
00227
00228 /* definitions for machine dependencies,
00229 char machine_dep; */
00230 #define VFF_DEP_IEEEORDER       0x2 /* IEEE byte ordering */
00231 #define VFF_DEP_DECORDER        0x4 /* DEC (VAX) byte ordering */
00232 #define VFF_DEP_NSORDER     0x8 /* NS32000 byte ordering */
00233 #define VFF_DEP_CRAYORDER   0xA /* Cray byte size and ordering */
00234
00235 #define VFF_DEP_BIGENDIAN   VFF_DEP_IEEEORDER
00236 #define VFF_DEP_LITENDIAN   VFF_DEP_NSORDER
00237
00238
00239 /* definitions for data storage type,
00240 unsigned long data_storage_type; */
00241 #define VFF_TYP_BIT     0   /* pixels are on or off (binary image)*/
00242 /* Note: This is an X11 XBitmap
00243 with bits packed into a byte and
00244 padded to a byte */
00245 #define VFF_TYP_1_BYTE      1   /* pixels are byte (unsigned char) */
00246 #define VFF_TYP_2_BYTE      2   /* pixels are two byte (short int) */
00247 #define VFF_TYP_4_BYTE      4   /* pixels are four byte (integer) */
00248 #define VFF_TYP_FLOAT       5   /* pixels are float (single precision)*/
00249 #define VFF_TYP_COMPLEX     6   /* pixels are complex float */
00250 #define VFF_TYP_DOUBLE      9   /* pixels are float (double precision)*/
00251
00252 #define VFF_TYP_DCOMPLEX    10  /* double complex */
00253
00254 /* definitions for data encoding scheme on disk - i.e. it may be
00255 compressed using RLE, or uncompressed (RAW).
00256 unsigned long data_encode_scheme; */
00257 #define VFF_DES_RAW     0   /* Raw - no compression */
00258 #define VFF_DES_COMPRESS    1   /* Compressed using ALZ */
00259 #define VFF_DES_RLE     2   /* Compressed using RLE */
00260 #define VFF_DES_TRANSFORM   3   /* Transform based compression */
00261 #define VFF_DES_CCITT       4   /* CCITT standard compression */
00262 #define VFF_DES_ADPCM       5   /* ADPCM compression */
00263 #define VFF_DES_GENERIC     6   /* User-specified compression */
00264
00265 /* definitions for map data or cells storage type,
00266 unsigned long map_storage_type; */
00267 #define VFF_MAPTYP_NONE     0   /* No cell type is assigned  */
00268 #define VFF_MAPTYP_1_BYTE   1   /* cells are byte (unsigned char)    */
00269 #define VFF_MAPTYP_2_BYTE   2   /* cells are two byte (short int) */
00270 #define VFF_MAPTYP_4_BYTE   4   /* cells are four byte (integer) */
00271 #define VFF_MAPTYP_FLOAT    5   /* cells are float (single precision) */
00272 #define VFF_MAPTYP_COMPLEX  6   /* cells are complex FLOAT */
00273 #define VFF_MAPTYP_DOUBLE   7   /* cells are float (double precision) */
00274
00275 /* definitions for mapping schemes,
00276 unsigned long map_scheme; */
00277 #define VFF_MS_NONE     0   /* No mapping is to be done, and no
00278 maps are to be stored. */
00279 #define VFF_MS_ONEPERBAND   1   /* Each data band has its own map */
00280 #define VFF_MS_CYCLE        2   /* An array of maps is selected in order
00281 by groups of maps_per_cycle, allowing
00282 "rotating the color map" */
00283 #define VFF_MS_SHARED       3   /* All data band share the same map */
00284 #define VFF_MS_GROUP        4   /* All data bands are "grouped"
00285 together to point into one map */
00286 /* definitions for enabling the map,
00287 unsigned long map_enable; */
00288 #define VFF_MAP_OPTIONAL    1   /* The data is valid without being
00289 sent thru the color map. If a
00290 map is defined, the data may
00291 optionally be sent thru it. */
00292 #define VFF_MAP_FORCE       2   /* The data MUST be sent thru the map
00293 to be interpreted */
00294
00295 /* definitions for color map models,
00296 unsigned long color_space_model; */
00297
00298 /*  the models use the following convention:
00299 ntsc: national television systems committee
00300 cie:  Commission Internationale de L'Eclairage
00301 ucs:  universal chromaticity scale
00302 RGB:  red band, green band, blue band
00303 CMY:  cyan band, magenta band, yellow band
00304 YIQ:  luminance, I and Q represent chrominance
00305 HSV:  hue, saturation, value
00306 IHS:  intensity, hue, saturation
00307 XYZ:
00308 UVW:
00309 SOW:
00310 Lab:
00311 Luv:
00312
00313 For more information on how to interpret the combined meaning of the
00314 colorspace fields, see the document in $KHOROS_HOME/manual/viff_format,
00315 which contains detailed descriptions on the fields along with numerous
00316 examples of proper use.  */
00317
00318 #define VFF_CM_NONE 0
00319 #define VFF_CM_ntscRGB  1
00320 #define VFF_CM_ntscCMY  2
00321 #define VFF_CM_ntscYIQ  3
00322 #define VFF_CM_HSV  4
00323 #define VFF_CM_HLS  5
00324 #define VFF_CM_IHS  6
00325 #define VFF_CM_cieRGB   7
00326 #define VFF_CM_cieXYZ   8
00327 #define VFF_CM_cieUVW   9
00328 #define VFF_CM_cieucsUVW    10
00329 #define VFF_CM_cieucsSOW    11
00330 #define VFF_CM_cieucsLab    12
00331 #define VFF_CM_cieucsLuv    13
00332 #define VFF_CM_GENERIC      14  /* the color space is user defined */
00333 #define VFF_CM_genericRGB   15  /* an RGB image but not conforming
00334 to any standard */
00335
00336 /* definitions for location type,
00337 unsigned long location_type; */
00338 #define VFF_LOC_IMPLICIT    1   /*  The location of image pixels
00339 or vector data is given by using
00340 the implied 2D array given by
00341 row_size and col_size.  */
00342 #define VFF_LOC_EXPLICIT    2   /*  The location of the image pixels
00343 or the vectors is explicit */
00344
00345
00346 /* The following are a couple of defines that make it easier
00347 to use the image size data */
00348 #define number_of_rows col_size
00349 #define number_of_cols row_size
00350
00351
00352 #endif
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/W32Compat.cpp Source File

Base » Common

W32Compat.cpp

Go to the documentation of this file.
00001 // must be first:
00002 //#include "precompiled.h"
00003
00004 /*
00005 This file is part of the BIAS library (Basic ImageAlgorithmS).
00006
00007 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00008   Multimediale Systeme der Informationsverarbeitung
00009   Institut fuer Informatik
00010   Christian-Albrechts-Universitaet Kiel
00011
00012
00013 BIAS is free software; you can redistribute it and/or modify
00014 it under the terms of the GNU Lesser General Public License as published by
00015 the Free Software Foundation; either version 2.1 of the License, or
00016 (at your option) any later version.
00017
00018 BIAS is distributed in the hope that it will be useful,
00019 but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 GNU Lesser General Public License for more details.
00022
00023 You should have received a copy of the GNU Lesser General Public License
00024 along with BIAS; if not, write to the Free Software
00025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 */
00027
00028 #ifdef WIN32
00029
00030 #include "W32Compat.hh"
00031 #include <windows.h>
00032 #include <time.h>
00033
00034 // for mkdir:
00035 #include <direct.h>
00036
00037
00038
00039 int gettimeofday(struct timeval *tv, struct timezone *tz)
00040 {
00041   FILETIME        ft;
00042   LARGE_INTEGER   li;
00043   __int64         t;
00044   static int      tzflag;
00045
00046   if (tv)
00047   {
00048     GetSystemTimeAsFileTime(&ft);
00049     li.LowPart  = ft.dwLowDateTime;
00050     li.HighPart = ft.dwHighDateTime;
00051     t  = li.QuadPart;       /* In 100-nanosecond intervals */
00052     t -= EPOCHFILETIME;     /* Offset to the Epoch time */
00053     t /= 10;                /* In microseconds */
00054     tv->tv_sec  = (long)(t / 1000000);
00055     tv->tv_usec = (long)(t % 1000000);
00056   }
00057
00058   if (tz)
00059   {
00060     if (!tzflag)
00061     {
00062       _tzset();
00063       tzflag++;
00064     }
00065     tz->tz_minuteswest = _timezone / 60;
00066     tz->tz_dsttime = _daylight;
00067   }
00068   return 0;
00069 }
00070
00071
00072 int mkdir(const char *dirname, int /*mode_IsIgnored*/ )
00073 {
00074   //return mkdir(dirname);
00075   return _mkdir(dirname); // VS 8 from direct.h
00076 }
00077
00078
00079
00080 #endif // Win32
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/W32Compat.hh Source File

Base » Common

W32Compat.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024
00025
00026
00027 #ifndef _W32Compat_hh_
00028 #define _W32Compat_hh_
00029
00030 #include <bias_config.h>
00031
00032
00033 #ifdef WIN32
00034
00035 // avoid deprecated warnings in VS 2005
00036 #  define _CRT_SECURE_NO_DEPRECATE
00037
00038 // avoid definition of min and max macro in windows.h/windef.h JW 12/2004)
00039 #  define NOMINMAX
00040
00041 // switch for math.h to define M_PI, M_PI_2 in WIN32
00042 #  define _USE_MATH_DEFINES
00043
00044 /// actually required only for Sleep
00045 #include <windows.h>
00046
00047
00048 ///
00049 /// implement Unix quasi-standard functions for code compatibility
00050 ///
00051
00052 // implement non-standard (double)rint(double x)
00053 #  define rint(x) (floor(x+0.5))
00054 #  define rintf(x) (floor(x+0.5))
00055 #  define cbrt(x) (pow(x,1.0/3.0))
00056 #  define trunc(x) (x<0?floor(x+1):floor(x))
00057
00058 /* Return nonzero value if X is a NaN.  We could use `fpclassify' but
00059    we already have this functions `__isnan' and it is faster.  */
00060 #  define isnan(x) (x==x ? false : true)
00061
00062 /* Return nonzero value is X is positive or negative infinity.  */
00063 #  define isinf(x) (sizeof(x)==sizeof(float) ? (x>FLT_MAX||x<-FLT_MAX)?true:false :  \
00064     (sizeof(x)==sizeof(double)) ? (x>DBL_MAX||x<-DBL_MAX)?true:false  : \
00065     x>LDBL_MAX || x<-LDBL_MAX?true:false)
00066
00067 # define usleep(x) Sleep((unsigned long)(x/1000.0))
00068 # define sleep(x)  Sleep((unsigned long)(x*1000.0))
00069
00070
00071  /* timeval.h    1.0 01/12/19
00072   * Defines gettimeofday, timeval, etc. for Win32
00073   * copied from  Wu Yongwei */
00074 #define EPOCHFILETIME (116444736000000000LL)
00075
00076 struct timezone {
00077   int tz_minuteswest; /* minutes W of Greenwich */
00078   int tz_dsttime;     /* type of dst correction */
00079  };
00080
00081 BIASCommon_EXPORT  int gettimeofday(struct timeval *tv, struct timezone *tz);
00082
00083
00084 /// @brief wrapper for mkdir with Unix mode arg ignored
00085 /// Requires on WIN32:
00086 /// \verbatim
00087 /// #include <direct.h>
00088 /// \endverbatim
00089 /// @author Jan Woetzel
00090 int mkdir(const char *dirname, int mode_IsIgnored );
00091
00092
00093
00094 #endif // WIN32
00095
00096 #endif //_W32Compat_hh_
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: MathAlgo/minpack/win32_f2c.h Source File

MathAlgo » minpack

win32_f2c.h

Go to the documentation of this file.
00001 /* f2c.h  --  Standard Fortran to C header file */
00002
00003 /**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
00004
00005     - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
00006
00007 #ifndef F2C_INCLUDE
00008 #define F2C_INCLUDE
00009
00010 #include <Base/Common/BIASpragmaStart.hh>
00011
00012 typedef long int integer;
00013 typedef char *address;
00014 typedef short int shortint;
00015 typedef float real;
00016 typedef double doublereal;
00017 typedef struct { real r, i;} complex;
00018 typedef struct { doublereal r, i;} doublecomplex;
00019 typedef long int logical;
00020 typedef short int shortlogical;
00021 typedef char logical1;
00022 typedef char integer1;
00023 typedef long longint; /* system-dependent */
00024
00025 #define TRUE_ (1)
00026 #define FALSE_ (0)
00027
00028 /* Extern is for use with -E */
00029 #ifndef Extern
00030 #define Extern extern
00031 #endif
00032
00033 /* I/O stuff */
00034
00035 #ifdef f2c_i2
00036 /* for -i2 */
00037 typedef short flag;
00038 typedef short ftnlen;
00039 typedef short ftnint;
00040 #else
00041 typedef long flag;
00042 typedef long ftnlen;
00043 typedef long ftnint;
00044 #endif
00045
00046 /*external read, write*/
00047 typedef struct
00048 {   flag cierr;
00049     ftnint ciunit;
00050     flag ciend;
00051     char *cifmt;
00052     ftnint cirec;
00053 } cilist;
00054
00055 /*internal read, write*/
00056 typedef struct
00057 {   flag icierr;
00058     char *iciunit;
00059     flag iciend;
00060     char *icifmt;
00061     ftnint icirlen;
00062     ftnint icirnum;
00063 } icilist;
00064
00065 /*open*/
00066 typedef struct
00067 {   flag oerr;
00068     ftnint ounit;
00069     char *ofnm;
00070     ftnlen ofnmlen;
00071     char *osta;
00072     char *oacc;
00073     char *ofm;
00074     ftnint orl;
00075     char *oblnk;
00076 } olist;
00077
00078 /*close*/
00079 typedef struct
00080 {   flag cerr;
00081     ftnint cunit;
00082     char *csta;
00083 } cllist;
00084
00085 /*rewind, backspace, endfile*/
00086 typedef struct
00087 {   flag aerr;
00088     ftnint aunit;
00089 } alist;
00090
00091 /* inquire */
00092 typedef struct
00093 {   flag inerr;
00094     ftnint inunit;
00095     char *infile;
00096     ftnlen infilen;
00097     ftnint  *inex;  /*parameters in standard's order*/
00098     ftnint  *inopen;
00099     ftnint  *innum;
00100     ftnint  *innamed;
00101     char    *inname;
00102     ftnlen  innamlen;
00103     char    *inacc;
00104     ftnlen  inacclen;
00105     char    *inseq;
00106     ftnlen  inseqlen;
00107     char    *indir;
00108     ftnlen  indirlen;
00109     char    *infmt;
00110     ftnlen  infmtlen;
00111     char    *inform;
00112     ftnint  informlen;
00113     char    *inunf;
00114     ftnlen  inunflen;
00115     ftnint  *inrecl;
00116     ftnint  *innrec;
00117     char    *inblank;
00118     ftnlen  inblanklen;
00119 } inlist;
00120
00121 #define VOID void
00122
00123 union Multitype {   /* for multiple entry points */
00124     integer1 g;
00125     shortint h;
00126     integer i;
00127     longint j;
00128     real r;
00129     doublereal d;
00130     complex c;
00131     doublecomplex z;
00132     };
00133
00134 typedef union Multitype Multitype;
00135
00136 typedef long Long;  /* No longer used; formerly in Namelist */
00137
00138 struct Vardesc {    /* for Namelist */
00139     char *name;
00140     char *addr;
00141     ftnlen *dims;
00142     int  type;
00143     };
00144 typedef struct Vardesc Vardesc;
00145
00146 struct Namelist {
00147     char *name;
00148     Vardesc **vars;
00149     int nvars;
00150     };
00151 typedef struct Namelist Namelist;
00152
00153 #define abs(x) ((x) >= 0 ? (x) : -(x))
00154 #define dabs(x) (doublereal)abs(x)
00155 #define min(a,b) ((a) <= (b) ? (a) : (b))
00156 #define max(a,b) ((a) >= (b) ? (a) : (b))
00157 #define dmin(a,b) (doublereal)min(a,b)
00158 #define dmax(a,b) (doublereal)max(a,b)
00159
00160 /* procedure parameter types for -A and -C++ */
00161
00162 #define F2C_proc_par_types 1
00163 #ifdef __cplusplus
00164 typedef int /* Unknown procedure type */ (*U_fp)(...);
00165 typedef shortint (*J_fp)(...);
00166 typedef integer (*I_fp)(...);
00167 typedef real (*R_fp)(...);
00168 typedef doublereal (*D_fp)(...), (*E_fp)(...);
00169 typedef /* Complex */ VOID (*C_fp)(...);
00170 typedef /* Double Complex */ VOID (*Z_fp)(...);
00171 typedef logical (*L_fp)(...);
00172 typedef shortlogical (*K_fp)(...);
00173 typedef /* Character */ VOID (*H_fp)(...);
00174 typedef /* Subroutine */ int (*S_fp)(...);
00175 #else
00176 typedef int /* Unknown procedure type */ (*U_fp)();
00177 typedef shortint (*J_fp)();
00178 typedef integer (*I_fp)();
00179 typedef real (*R_fp)();
00180 typedef doublereal (*D_fp)(), (*E_fp)();
00181 typedef /* Complex */ VOID (*C_fp)();
00182 typedef /* Double Complex */ VOID (*Z_fp)();
00183 typedef logical (*L_fp)();
00184 typedef shortlogical (*K_fp)();
00185 typedef /* Character */ VOID (*H_fp)();
00186 typedef /* Subroutine */ int (*S_fp)();
00187 #endif
00188 /* E_fp is for real functions when -R is not specified */
00189 typedef VOID C_f;   /* complex function */
00190 typedef VOID H_f;   /* character function */
00191 typedef VOID Z_f;   /* double complex function */
00192 typedef doublereal E_f; /* real function with -R not specified */
00193
00194 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
00195
00196 #ifndef Skip_f2c_Undefs
00197 #undef cray
00198 #undef gcos
00199 #undef mc68010
00200 #undef mc68020
00201 #undef mips
00202 #undef pdp11
00203 #undef sgi
00204 #undef sparc
00205 #undef sun
00206 #undef sun2
00207 #undef sun3
00208 #undef sun4
00209 #undef u370
00210 #undef u3b
00211 #undef u3b2
00212 #undef u3b5
00213 #undef unix
00214 #undef vax
00215 #endif
00216 #endif
00217
00218
00219 #ifdef WIN32
00220
00221 #ifdef BLAS_EXPORTS
00222 #pragma message("Compiling for DLL\n")
00223 #define BLAS_API  __declspec(dllexport)
00224
00225 #else
00226 #define BLAS_API  __declspec(dllimport)
00227 #endif
00228
00229 #ifdef LAPACK_EXPORTS
00230 #pragma message("Compiling for DLL\n")
00231 #define LAPACK_API __declspec(dllexport)
00232 #else
00233 #define LAPACK_API __declspec(dllimport)
00234 #endif
00235
00236 #endif // WIN32
00237
00238 #include <Base/Common/BIASpragmaEnd.hh>
Generated on Wed Jun 21 19:01:15 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/WrapBias2Ipl.cpp Source File

Base » Image

WrapBias2Ipl.cpp

Go to the documentation of this file.
00001 // JW 2005
00002 #include <Base/Common/W32Compat.hh>
00003 #include "WrapBias2Ipl.hh"
00004 #include <Base/Debug/Error.hh>
00005 #include <Base/Debug/DebugSimple.hh>
00006 #include <string>
00007
00008
00009 #ifdef BIAS_HAVE_OPENCV
00010 #  include <cv.h>
00011 #  include <highgui.h>
00012 #endif
00013
00014
00015 #ifdef BIAS_HAVE_OPENCV
00016
00017 using namespace std;
00018 using namespace BIAS;
00019
00020 WrapBias2Ipl::~WrapBias2Ipl(){
00021   // do not destruct the BIAS image because it is reference.
00022
00023   //destroy IplImage because we constructed it.
00024   //if (p_imgIplDestroyable)
00025   {
00026     delete p_imgIpl;
00027     p_imgIpl=NULL;
00028   }
00029 }
00030
00031
00032 WrapBias2Ipl::WrapBias2Ipl()
00033 :
00034 p_imgBias(NULL)
00035 //,p_imgBiasDestroyable(false)
00036 ,p_imgIpl(NULL)
00037 ,p_imgIplDestroyable(false)
00038 {
00039 }
00040
00041
00042 WrapBias2Ipl::WrapBias2Ipl(BIAS::ImageBase * PtrImgBias)
00043 :
00044 p_imgBias(NULL)
00045 //,p_imgBiasDestroyable(false)
00046 ,p_imgIpl(NULL)
00047 ,p_imgIplDestroyable(false)
00048 {
00049   int result=Bind(PtrImgBias) ;
00050   // destry on exit because we allcoated
00051   p_imgIplDestroyable=true;
00052
00053   if (result!=0) {
00054     BIASERR("Error on Bin in constructor. result="<<result);
00055   };
00056 }
00057
00058
00059
00060 //JW
00061 int WrapBias2Ipl::Bind(BIAS::ImageBase * p_src)
00062 {
00063   this->p_imgBias = p_src;
00064   return CreateIplImageShared(p_src, this->p_imgIpl);
00065 }
00066
00067
00068 // JW p_dest has to be a *& because we need to change the pointer itself by reference.
00069 int WrapBias2Ipl::CreateIplImageShared(const BIAS::ImageBase * p_src, IplImage* &p_dest)
00070 {
00071   if (p_src==NULL){
00072     BIASERR("ImageBase ptr p_src is NULL.");
00073     return -1;
00074   };
00075   BIASASSERT(p_src!=NULL);
00076   if (p_dest==NULL) {
00077     p_dest=new IplImage;
00078     //if (p_imgIpl==p_dest) p_imgIplDestroyable = true;
00079   };
00080   BIASASSERT(p_dest!=NULL);
00081
00082 #ifdef BIAS_DEBUG
00083   if (!p_src->IsInterleaved() || !((p_src->GetWidth() % 4) == 0) ) {
00084     BIASERR("Only interleaved images with modulo 4 with are currently supported, sorry.");
00085     BIASBREAK;
00086   }
00087 #endif // BIAS_DEBUG
00088
00089
00090   // OpenCV supports only interleaved IPL_DATA_ORDER_PIXEL:
00091   BIASASSERT( p_src->IsInterleaved() );
00092
00093   // OpenCV supports only size modulo 4 image width
00094   // to have pixel boundaries on 32bit aligned memory
00095   // we would need stride, otherwise
00096   BIASASSERT( p_src->GetWidth() % 4 == 0 );
00097
00098   // OK
00099   // initialize only the header without data area:
00100   CvSize imgSize;
00101   imgSize.width  = p_src->GetWidth();
00102   imgSize.height = p_src->GetHeight();
00103   // pixel depth in bits
00104   int depth=0;
00105   switch (p_src->GetStorageType()) {
00106     case BIAS::ImageBase::ST_char:
00107       depth=IPL_DEPTH_8S; break;
00108     case BIAS::ImageBase::ST_unsignedchar:
00109       depth=IPL_DEPTH_8U; break;
00110     case BIAS::ImageBase::ST_float:
00111       depth=IPL_DEPTH_32F; break;
00112     case BIAS::ImageBase::ST_double:
00113       depth=IPL_DEPTH_64F; break;
00114     case BIAS::ImageBase::ST_shortint:
00115       depth=IPL_DEPTH_16S; break;
00116     case BIAS::ImageBase::ST_unsignedshortint:
00117       depth=IPL_DEPTH_16U; break;
00118     case BIAS::ImageBase::ST_int:
00119       depth=IPL_DEPTH_32S; break;
00120
00121     case BIAS::ImageBase::ST_unsignedint:
00122       // unsupported (?)
00123       BIASERR("you try to wrap a BIAS unsigned int Image with OpenCV. This format may be unsupported by OpenCV! (JW)");
00124       depth=IPL_DEPTH_32S|IPL_DEPTH_SIGN;
00125     default:
00126       BIASERR("unsupported Storagetype in BIAS image for BIAs->ipl image wrapper");
00127       return -1;
00128   }
00129
00130   // fill header struct with usefuil values:
00131   cvInitImageHeader( p_dest,
00132     imgSize,
00133     depth,
00134     p_src->GetChannelCount(),
00135     IPL_ORIGIN_TL, // origin top left
00136     4 // alignment
00137     );
00138
00139   // share the data area: (pointer to aligned image data) do NOT copy
00140   p_dest->imageData = (char*)(p_src->GetImageData());
00141
00142
00143
00144   // get the color model and channel seq. right:
00145   switch (p_src->GetColorModel()){
00146     case BIAS::ImageBase::CM_RGB:
00147       // tested, works on Win32
00148       strcpy( p_dest->colorModel, "RGB");
00149       strcpy( p_dest->channelSeq, "RGB");
00150       break;
00151     case BIAS::ImageBase::CM_BGR:
00152       // untested but should work because it's OpenCv native format.
00153       strcpy( p_dest->colorModel, "RGB");
00154       strcpy( p_dest->channelSeq, "BGR");
00155       break;
00156     case BIAS::ImageBase::CM_BGRA:
00157       // untested.
00158       strcpy( p_dest->colorModel, "RGBA");
00159       strcpy( p_dest->channelSeq, "BGRA");
00160       break;
00161     case BIAS::ImageBase::CM_RGBA:
00162       // untested.
00163       strcpy( p_dest->colorModel, "RGBA");
00164       strcpy( p_dest->channelSeq, "RGBA");
00165       break;
00166     case BIAS::ImageBase::CM_Grey:
00167       // untested.
00168       strcpy( p_dest->colorModel, "GREY");
00169       strcpy( p_dest->channelSeq, "GREY");
00170       break;
00171     default:
00172       BIASERR("unsupported color model for OpenCV wrappoing. ChannelSeq may be wrong.");
00173       return -2;
00174   };
00175
00176   return 0;
00177 }
00178
00179
00180 // JW
00181 int WrapBias2Ipl::CreateBiasImageShared(const IplImage * &p_src, BIAS::ImageBase * p_dest)
00182 {
00183   if (p_src==NULL){
00184     BIASERR("IplImage ptr p_src is NULL.");
00185     return -1;
00186   };
00187   BIASASSERT(p_src!=NULL);
00188
00189   bool recreate=true; // HACK: always recreate
00190   if (p_dest==NULL) recreate=true;
00191   // TODO: check sizes, depth etc. and set recreate
00192   if (recreate)
00193   {
00194     delete p_dest;
00195     p_dest=new BIAS::ImageBase(
00196       p_src->width,
00197       p_src->height,
00198       3,
00199       BIAS::ImageBase::ST_unsignedchar,
00200       true
00201       );
00202     p_dest->ReleaseImageDataPointer();
00203     // share the data area: (pointer to aligned image data) do NOT copy
00204     p_dest->ImageData_ = p_src->imageData;
00205     p_dest->UpdateImageDataArrayFromImageData_();
00206
00207     // select pixel dpeth in bits:
00208
00209     // pixel depth for corerct casting/type of the void* underlying content
00210     switch (p_src->depth)
00211     {
00212     case IPL_DEPTH_8S:
00213       p_dest->StorageType_ = ImageBase::ST_char;
00214       break;
00215
00216     case IPL_DEPTH_8U:
00217       p_dest->StorageType_ = ImageBase::ST_unsignedchar;
00218       break;
00219
00220     case IPL_DEPTH_32F:
00221       p_dest->StorageType_ = ImageBase::ST_float;
00222       break;
00223
00224     case IPL_DEPTH_64F:
00225       p_dest->StorageType_ = ImageBase::ST_double;
00226       break;
00227
00228     case IPL_DEPTH_16S:
00229       p_dest->StorageType_ = ImageBase::ST_shortint;
00230       break;
00231
00232     case IPL_DEPTH_16U:
00233       p_dest->StorageType_ = ImageBase::ST_unsignedshortint;
00234       break;
00235
00236       //case (int(IPL_DEPTH_32S|IPL_DEPTH_SIGN)):
00237       //    // unsupported (?)
00238       //    p_dest->StorageType_ = ImageBase::ST_unsignedint:
00239       //    BIASERR("you try to wrap an unsigned int Image with OpenCV to BIAs. This format may be unsupported by OpenCV! (JW)");
00240       //    break;
00241
00242     case IPL_DEPTH_32S:
00243       p_dest->StorageType_ = ImageBase::ST_int;
00244       break;
00245
00246     default:
00247       BIASERR("unsupported Ipl Storagetype for Ipl->BIAs wrapper.");
00248       return -1;
00249     }
00250
00251     // default:
00252     // HACK
00253     p_dest->SetColorModel(ImageBase::CM_RGB);
00254
00255     // get the color model and channel seq. right:
00256     if (string(p_src->colorModel)=="RGB"){
00257
00258       if (string(p_src->channelSeq)=="RGB"){
00259         p_dest->SetColorModel(ImageBase::CM_RGB);
00260       } else if (string(p_src->channelSeq)=="BGR"){
00261         p_dest->SetColorModel(ImageBase::CM_BGR);
00262       } else {
00263         BIASERR("unsupported channelSeq for for OpenCV wrapping of RGB color model");
00264       }
00265
00266     } else if (string(p_src->colorModel)=="RGBA"){
00267
00268       if (string(p_src->channelSeq)=="RGBA"){
00269         p_dest->SetColorModel(ImageBase::CM_RGBA);
00270       } else if (string(p_src->channelSeq)=="BGRA"){
00271         p_dest->SetColorModel(ImageBase::CM_BGRA);
00272       } else {
00273         BIASERR("unsupported channelSeq for for OpenCV wrapping of of RGBA color model");
00274       }
00275
00276     } else if ((string(p_src->colorModel)=="GREY") || (string(p_src->colorModel)=="GRAY")) {
00277       p_dest->SetColorModel(ImageBase::CM_Grey);
00278     } else {
00279
00280       BIASERR("unsupported color model for OpenCV wrapping.");
00281       return -2;
00282     }
00283   };
00284   BIASASSERT(p_src!=NULL);
00285   BIASASSERT(p_dest!=NULL);
00286   BIASASSERT(p_dest->GetImageData() == p_src->imageData );
00287   BIASASSERT(p_dest->IsInterleaved() );
00288
00289   BIASASSERT(p_src->origin == IPL_ORIGIN_TL); // we suport only toplleft origin image for now. JW
00290
00291   return 0;
00292 }
00293
00294
00295
00296 bool WrapBias2Ipl::Consistent() const {
00297   if ((p_imgBias!=NULL) && (p_imgIpl!=NULL))
00298   {
00299     if (p_imgBias->GetImageData() != p_imgIpl->imageData ) {
00300       BIASERR("data pointers of bias image and wrapped OpenCV imaeg are inconsisten!!!");
00301       return false;
00302     } else if ((int)p_imgBias->GetWidth() != p_imgIpl->width ) {
00303       BIASERR("width is inconsistent!");
00304       return false;
00305     } else if ((int)p_imgBias->GetHeight() != p_imgIpl->height ){
00306       BIASERR("height is inconsistent!");
00307       return false;
00308     };
00309   }
00310   return true;
00311 }
00312
00313
00314 // static function:
00315 int WrapBias2Ipl::WaitKey(const unsigned int & delay){
00316   return cvWaitKey(delay);
00317 }
00318
00319
00320 int WrapBias2Ipl::Display(const bool & waitForKey,
00321                           const unsigned int & delayMsec,
00322                           const float & scale) const
00323 {
00324   return Display( string( DEFAULT_WrapBias2Ipl_WINNAME ),true, true, waitForKey, delayMsec, scale);
00325 }
00326
00327 int WrapBias2Ipl::Display(const char* DestWin,
00328                           const bool & autoresize,
00329                           const bool & moveToTopLeft,
00330                           const bool & waitForKey,
00331                           const unsigned int & delayMsec,
00332                           const float & scale
00333                           ) const
00334 {
00335   std::string name(DestWin);
00336   return Display(name,
00337     autoresize,
00338     moveToTopLeft,
00339     waitForKey,
00340     delayMsec,
00341     scale
00342     );
00343
00344 }
00345
00346
00347 int WrapBias2Ipl::Display(const std::string & DestWin,
00348                           const bool & autoresize,
00349                           const bool & moveToTopLeft,
00350                           const bool & waitForKey,
00351                           const unsigned int & delayMsec,
00352                           const float & scale
00353                           ) const
00354 {
00355   return Display(this->p_imgIpl, DestWin, autoresize, moveToTopLeft, waitForKey, delayMsec, scale);
00356 }
00357
00358
00359 //static
00360 void WrapBias2Ipl::ConvertIPL32to8(const IplImage* src32,
00361                                    IplImage* dest8,
00362                                    const float & scale )
00363 {
00364   BIASASSERT(src32!=NULL);
00365   BIASASSERT(dest8!=NULL);
00366   BIASASSERT(src32->width  == dest8->width);
00367   BIASASSERT(src32->height == dest8->height);
00368   BIASASSERT(src32->nChannels==dest8->nChannels);
00369   BIASASSERT(src32->depth==32);
00370   BIASASSERT(src32->imageData!=NULL);
00371   BIASASSERT(dest8->imageData!=NULL);
00372   BIASASSERT(scale!=0);
00373
00374   // src pointer,
00375   // because imageData is a signed char*
00376   float *pSS =  reinterpret_cast<float *>(src32->imageData);
00377
00378   // destination
00379   unsigned char *pDD = reinterpret_cast<unsigned char*>(dest8->imageData);
00380   BIASASSERT(pSS!=NULL);
00381   BIASASSERT(pDD!=NULL);
00382   const int nX = src32->width * src32->nChannels;
00383   // for all pixels of all channels
00384   for (int y=0; y<src32->height; y++) {
00385     for (int x=0; x<nX; x++) {
00386       // clipping:  0 <= scale*in <= 255
00387       pDD[x] = (unsigned char)( max(0.0f, min(255.0f, scale*pSS[x])) );
00388     }
00389     // next line
00390     pSS = reinterpret_cast<float *>       (&src32->imageData[y*src32->widthStep]);
00391     pDD = reinterpret_cast<unsigned char*>(&dest8->imageData[y*dest8->widthStep]);
00392   }
00393 }
00394
00395
00396 // jw this is the implementation of the static function:
00397 int WrapBias2Ipl::Display(const IplImage* img,
00398                           const std::string & DestWin,
00399                           const bool & autoresize,
00400                           const bool & moveToTopLeft,
00401                           const bool & waitForKey,
00402                           const unsigned int & delayMsec,
00403                           const float & scale
00404                           )
00405 {
00406   if (img==NULL) {
00407     BIASERR("NULL img");
00408     return 0;
00409   };
00410   if (img->width==0 || img->height==0) {
00411     BIASERR("empty image of dim "<<img->width<<"x"<<img->height);
00412     return 0;
00413   };
00414
00415   // create the display window:
00416   int winflags=0;
00417   if (autoresize) winflags = winflags | CV_WINDOW_AUTOSIZE;
00418   cvNamedWindow(DestWin.c_str(), winflags);
00419   if (moveToTopLeft) cvMoveWindow(DestWin.c_str(), 0,0);
00420
00421   switch (img->depth) // bits
00422   {
00423   case 8:
00424     if (strcmp(img->channelSeq, "BGR")==0)
00425     {
00426       // no swap required, is OpenCv native fmt
00427       cvShowImage(DestWin.c_str(), img);
00428     } else if (strcmp(img->channelSeq, "RGB")==0) {
00429       // swap R-B
00430       IplImage *p_swapped=NULL;
00431       // TODO: keep a static copy here and check if sizes remain for higehr performance (avoid new/delete) (jw)
00432       p_swapped = cvCreateImage( cvSize(img->width, img->height),
00433         img->depth,
00434         img->nChannels);
00435       cvConvertImage( img, p_swapped, CV_CVTIMG_SWAP_RB);
00436       cvShowImage(DestWin.c_str(), p_swapped);
00437       cvReleaseImage(&p_swapped);
00438     } else if (strcmp(img->channelSeq, "GREY")==0) {
00439       cvShowImage(DestWin.c_str(), img);
00440     } else {
00441       BIASERR("Sorry, colorChannelSeq/colorModel unsupported. Please complete switch. Trying to display anyhow.");
00442       cvShowImage(DestWin.c_str(), img);
00443     }
00444     break;
00445   case 32:
00446     {
00447       // convert to 8 bit for display,
00448       // asumme scaling from 0..1 to 0..255
00449       IplImage *p_8bit=NULL;
00450       p_8bit = cvCreateImage( cvSize(img->width, img->height),
00451         8, // bits:  32 --> 8
00452         img->nChannels);
00453       // keep channel order.  dest, src, count
00454       // OpenCv ignores it but we need it for highgui
00455       memcpy(p_8bit->channelSeq, img->channelSeq, 4);
00456
00457       // convert the floats to 8 bit (with scaling and clipping):
00458       ConvertIPL32to8(img, p_8bit, scale);
00459
00460       // now we may need to additionally swap.
00461       if (strcmp(p_8bit->channelSeq, "BGR")==0)
00462       {
00463         // no swap required, is OpenCv native fmt
00464         cvShowImage(DestWin.c_str(), p_8bit);
00465       } else if (strcmp(p_8bit->channelSeq, "RGB")==0) {
00466         // swap R-B
00467         IplImage *p_swapped=NULL;
00468         // TODO: keep a static copy here and check if sizes remain for higehr performance (avoid new/delete) (jw)
00469         p_swapped = cvCreateImage( cvSize(p_8bit->width, p_8bit->height),
00470           p_8bit->depth,
00471           p_8bit->nChannels);
00472         cvConvertImage( p_8bit, p_swapped, CV_CVTIMG_SWAP_RB);
00473         cvShowImage(DestWin.c_str(), p_swapped);
00474         cvReleaseImage(&p_swapped);
00475       } else {
00476         BIASERR("Sorry, colorChannelSeq/colorModel/depth unsupported. Please complete switch. Trying to display anyhow.");
00477         cvShowImage(DestWin.c_str(), p_8bit);
00478       }
00479     }
00480     break;
00481   default:
00482     BIASERR("Sorry, colorChannelSeq/colorModel/depth unsupported. Please complete switch. Trying to display anyhow.");
00483     cvShowImage(DestWin.c_str(), img);
00484   };
00485
00486   if (waitForKey) {
00487     return cvWaitKey(delayMsec);
00488   } else {
00489     // always wait 1msec for updat eof display.
00490     return cvWaitKey(1);
00491   };
00492 }
00493
00494
00495 // static function wrappers (JW)
00496
00497 void WrapBias2Ipl::DestroyAllWindows()
00498 {
00499   cvDestroyAllWindows();
00500 }
00501
00502 void WrapBias2Ipl::DestroyWindow( const char* name )
00503 {
00504   cvDestroyWindow( name );
00505 }
00506
00507 void WrapBias2Ipl::DestroyWindow( const std::string & name )
00508 {
00509   DestroyWindow( name.c_str() );
00510 }
00511
00512
00513 void WrapBias2Ipl::ResizeWindow( const char* name,
00514                                 const unsigned int width,
00515                                 const unsigned int height )
00516 {
00517   cvResizeWindow( name, width, height );
00518 }
00519
00520 void WrapBias2Ipl::ResizeWindow( const std::string & name,
00521                                 const unsigned int width,
00522                                 const unsigned int height )
00523 {
00524   ResizeWindow( name.c_str(), width, height );
00525 }
00526
00527
00528 void WrapBias2Ipl::MoveWindow( const char* name, const int newX, const int newY )
00529 {
00530   cvMoveWindow( name, newX, newY );
00531 }
00532
00533 void WrapBias2Ipl::MoveWindow( const std::string & name, const int newX, const int newY )
00534 {
00535   MoveWindow( name.c_str(), newX, newY );
00536 }
00537
00538
00539
00540 #endif // BIAS_HAVE_OPENCV
00541
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Image/WrapBias2Ipl.hh Source File

Base » Image

WrapBias2Ipl.hh

Go to the documentation of this file.
00001 #ifndef __WrapBias2Ipl__hh__
00002 #define __WrapBias2Ipl__hh__
00003
00004 #include <bias_config.h>
00005
00006
00007 #ifndef BIAS_HAVE_OPENCV
00008 #  error __FILE__: __LINE__: BIAS_HAVE_OPENCV not defined. Please recompile BIAS with USE_OPENCV enabled if you want to use WrapBias2Ipl.
00009 #endif
00010
00011 #ifdef BIAS_HAVE_OPENCV
00012
00013 #include <Base/Image/ImageBase.hh>
00014
00015 // forwrad declaration for cxtypes.h to avoid cv.h inclusion:
00016 typedef struct _IplImage IplImage;
00017
00018
00019
00020 namespace BIAS {
00021
00022   /** @brief wrapper around a BIAS image to be used as an OpenCv IPlimage
00023   with shared data area.
00024   @author Jan Woetzel 07/2005 */
00025   class BIASImageBase_EXPORT WrapBias2Ipl {
00026   public:
00027     ~WrapBias2Ipl();
00028     WrapBias2Ipl();
00029     WrapBias2Ipl(BIAS::ImageBase * PtrImgBias);
00030
00031     /** create the internal IPL image which shares the data area with the src Bias image.
00032     And save the pointer to this source BIAS img.
00033     @return 0 for succes, other=error
00034     @author Jan Woetzel 07/2005 */
00035     int Bind(BIAS::ImageBase * p_src);
00036
00037     /** helper function to create a slave ipl image which shares the data area with the master ref. BIAS image
00038     Ipl image is slave of BIAS  image.
00039     @return 0 for succes, other=error
00040     @author Jan Woetzel 07/2005 */
00041     static int CreateIplImageShared(const BIAS::ImageBase * p_src, IplImage * &p_dest);
00042
00043     /** helper function to create a BIAS image from a master Ipl image
00044     BIAS image is slave of Ipl image. JW */
00045     static int CreateBiasImageShared(const IplImage * &p_src, BIAS::ImageBase * p_dest);
00046
00047     /** @return false if the wrapped images are inconsistent JW */
00048     bool Consistent() const;
00049
00050     /** wrapper for cvWaitKey JW
00051     @return pressed key (if any)
00052     JW 2005 */
00053     static int WaitKey(const unsigned int & delay=0);
00054
00055     /** Display img as simple popup window.
00056     @param waitForKey if true delaMsec is waited for keypres. 0=forever.
00057     @param delayMsec if waitForKey is true wait for key with 0=forever, see cvWaitkey.
00058     @return pressed key (if any)
00059     @author JW 2005
00060     TODO: move this function to BIAS/Gui as GuiCV with static functions. (jw)
00061     */
00062     static int Display(
00063       const IplImage* img,
00064       const std::string & DestWin,
00065       const bool & autoresize,
00066       const bool & moveToTopLeft,
00067       const bool & waitForKey,
00068       const unsigned int & delayMsec,
00069       const float & scale=DEFAULT_32to8_scale
00070       );
00071
00072     /** Display img as simple popup window.
00073     If you experience color channel Seq. problems, use highgui with by RGB/BGR fix(jw)
00074     @param delayMsec:
00075     @return pressed key (if any)
00076     @author JW */
00077     int Display(const bool & waitForKey=false,
00078       const unsigned int & delayMsec=0,
00079       const float & scale=DEFAULT_32to8_scale
00080       ) const;
00081
00082     int Display(const char* DestWin,
00083       const bool & autoresize=true,
00084       const bool & moveToTopLeft=true,
00085       const bool & waitForKey=false,
00086       const unsigned int & delayMsec=0,
00087       const float & scale=DEFAULT_32to8_scale
00088       ) const;
00089
00090     /** Display img as simple popup HighGUI window.
00091     @param actually scale is used only for float to 8 Byte range conversion
00092     @return pressed key (if any)
00093     @author Jan Woetzel 2005 */
00094     int Display(
00095       const std::string & DestWin,
00096       const bool & autoresize=true,
00097       const bool & moveToTopLeft=true,
00098       const bool & waitForKey=false,
00099       const unsigned int & delayMsec=0,
00100       const float & scale=DEFAULT_32to8_scale
00101       ) const;
00102
00103     /** 32 bit float to displayable 8 bit conversion
00104     Both images should be pre-initilaized to equal size and correct storage type.
00105     @param scale mapping function, e.g. 255 for 0..1 --> 0..255
00106     @author Jan Woetzel */
00107     static void ConvertIPL32to8(const IplImage* src32,
00108       IplImage* dest8,
00109       const float & scale=DEFAULT_32to8_scale
00110       );
00111
00112     /** wrapper for CV destroiing all HighGUI windows JW */
00113     static void DestroyAllWindows();
00114
00115     /* wrapper for CV destroiing one HighGUI window JW */
00116     static void DestroyWindow( const char* name );
00117     static void DestroyWindow( const std::string & name );
00118
00119     /* wrapper for OpenCV,changes size of HighGUI window JW */
00120     static void ResizeWindow( const char* name,
00121       const unsigned int width,
00122       const unsigned int height );
00123     static void ResizeWindow( const std::string & name,
00124       const unsigned int width,
00125       const unsigned int height );
00126
00127     /* wrapper for OpenCV, moves HighGUI window position JW */
00128     static void MoveWindow( const char* name, const int newX, const int newY );
00129     static void MoveWindow( const std::string & name, const int newX, const int newY );
00130
00131
00132
00133   public:
00134     BIAS::ImageBase* p_imgBias;
00135     //bool p_imgBiasDestroyable;
00136
00137     IplImage * p_imgIpl;
00138     bool p_imgIplDestroyable;
00139   };
00140 } // namespace BIAS
00141 #endif // BIAS_HAVE_OPENCV
00142
00143 #endif //__WrapBias2Ipl__hh__
Generated on Wed Jun 21 19:00:52 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLBase.cpp Source File

Base » Common

XMLBase.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 // must be first:
00025 //#include "precompiled.h"
00026
00027 #include <Base/Common/XMLBase.hh>
00028
00029 using namespace std;
00030 using namespace BIAS;
00031
00032 int XMLBase::XMLAdd(const xmlNodePtr Node, XMLIO& XMLObject) const {
00033   xmlNodePtr theNode;
00034   string TopLevelName;
00035   double Version;
00036   XMLGetClassName(TopLevelName, Version);
00037   theNode = XMLObject.addChildNode(Node, TopLevelName);
00038   XMLObject.addAttribute(theNode, "Version", Version);
00039   XMLOut(theNode, XMLObject);
00040   return 0;
00041 }
00042
00043 int XMLBase::XMLWrite(const std::string& Filename,
00044                       int CompressionLevel,
00045                       bool AutoAddCompressionSuffix) const {
00046   XMLIO myXML;
00047   string TopLevelName;
00048   double Version;
00049   XMLGetClassName(TopLevelName, Version);
00050   xmlNodePtr rootNode;
00051   rootNode = myXML.create(TopLevelName);
00052   myXML.addAttribute(rootNode, "Version", Version);
00053   XMLOut(rootNode, myXML);
00054   myXML.SetCompression(CompressionLevel);
00055   myXML.write(Filename, AutoAddCompressionSuffix);
00056   myXML.clear();
00057   return 0;
00058 }
00059
00060
00061 int XMLBase::XMLWriteToString(string &str) const
00062 {
00063   XMLIO myXML;
00064   string TopLevelName;
00065   double Version;
00066   XMLGetClassName(TopLevelName, Version);
00067   xmlNodePtr rootNode;
00068   rootNode = myXML.create(TopLevelName);
00069   myXML.addAttribute(rootNode, "Version", Version);
00070   XMLOut(rootNode, myXML);
00071   myXML.WriteToString(str);
00072   myXML.clear();
00073   return 0;
00074 }
00075
00076 int XMLBase::XMLRead(const std::string& Filename) {
00077   int thereturn = 0;
00078   XMLIO myXML;
00079   xmlNodePtr rootNode;
00080   string TopLevelName;
00081   double Version;
00082   XMLGetClassName(TopLevelName, Version);
00083   rootNode = myXML.read(Filename);
00084   if (myXML.getNodeName(rootNode) != TopLevelName) {
00085     BIASERR("No XML-File of type "<<TopLevelName<<", type is "
00086             <<myXML.getNodeName(rootNode) );
00087     thereturn = -1;
00088   } else if (myXML.getAttributeValueDouble(rootNode, "Version") != Version) {
00089     BIASERR("Wrong XML-File version (is "
00090             <<myXML.getAttributeValueDouble(rootNode, "Version")
00091             <<"), but I expected "<<Version);
00092     thereturn = -2;
00093   } else thereturn = XMLIn(rootNode, myXML);
00094   myXML.clear();
00095   return thereturn;
00096 }
00097
00098 int XMLBase::XMLReadFromString(const std::string& str) {
00099   int thereturn = 0;
00100   XMLIO myXML;
00101   xmlNodePtr rootNode;
00102   string TopLevelName;
00103   double Version;
00104   XMLGetClassName(TopLevelName, Version);
00105   rootNode = myXML.ReadFromString(str);
00106   if (myXML.getNodeName(rootNode) != TopLevelName) {
00107     BIASERR("No XML-File of type "<<TopLevelName<<", type is "
00108             <<myXML.getNodeName(rootNode) );
00109     thereturn = -1;
00110   } else if (myXML.getAttributeValueDouble(rootNode, "Version") != Version) {
00111     BIASERR("Wrong XML-File version (is "
00112             <<myXML.getAttributeValueDouble(rootNode, "Version")
00113             <<"), but I expected "<<Version);
00114     thereturn = -2;
00115   } else thereturn = XMLIn(rootNode, myXML);
00116   myXML.clear();
00117   return thereturn;
00118 }
00119
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLBase.hh Source File

Base » Common

XMLBase.hh

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef __BIAS_XMLBASE_hh__
00025 #define __BIAS_XMLBASE_hh__
00026
00027 #include "bias_config.h"
00028
00029 // for dependant code: (jw)
00030 #ifndef BIAS_HAVE_XML2
00031 #  error BIAS_HAVE_XML2 required to use XMLIO.hh. Please recompile BIAS with USE_XML2.
00032 #endif
00033
00034
00035
00036 #ifdef BIAS_HAVE_XML2
00037
00038 #include <Base/Common/XMLIO.hh>
00039
00040 namespace BIAS {
00041
00042   /** @class XMLBase
00043       @ingroup g_utils
00044       @brief Base class with interface for xml output
00045
00046       All classes with xml i/o support should be derived from this class.
00047       You can then call XMLWrite to write the object to an XML file or
00048       XMLAdd(n) to attach the object to a node n of a given xml structure.
00049       For this to work you must:
00050       - Override XMLGetTopLevelName such that it returns something identifying
00051       the class, e.g. "FeaturePoint". XMLAdd and XMLWrite use this function
00052       to generate the toplevel node of you object.
00053       - Override XMLFill, such that it fills the XML code of (*this) into a
00054       tree, where the top level node is already created
00055       Given a valid xml file, you can call XMLRead to read the xml file into
00056       the current object, this calls your specialization of XMLReadObject
00057
00058       This class is empty if no XML2 support is available.
00059
00060       @author koeser 08/2004
00061   */
00062
00063   class BIASCommon_EXPORT XMLBase {
00064
00065   public:
00066     virtual ~XMLBase() {}
00067
00068     /** @brief call this to add the class to a node of a given xml tree */
00069     int XMLAdd(const xmlNodePtr Node, XMLIO& XMLObject) const;
00070
00071     /** @brief call this to add the class to a new xml tree and write it
00072         to the file Filename
00073         @param CompressionLevel 0..9 (0=off, 9=highest compression) */
00074     int XMLWrite(const std::string& Filename,
00075                  int CompressionLevel = 0,
00076                  bool AutoAddCompressionSuffix = true) const;
00077     /** serialize xml tree to string
00078        @author evers
00079      */
00080     int XMLWriteToString(std::string &str) const;
00081
00082     /** reconstruvt xml tree from string
00083        @author evers
00084      */
00085     int XMLReadFromString(const std::string& str);
00086
00087  /** @brief derived classes must implement this, so that it returns the name
00088         of the class for the top level tag in the XML file */
00089     virtual int XMLGetClassName(std::string& TopLevelTag,
00090                                 double& Version) const = 0;
00091
00092     /** @brief derived classes must implement this to write the code of (*this)
00093         into the XML tree
00094         @param node always points to a node with a name given by the function
00095         XMLGetTopLevelName  */
00096     virtual int XMLOut(const xmlNodePtr Node, XMLIO& XMLObject) const = 0;
00097
00098     /** @brief derived classes must implement this to read everything in Node
00099         into (*this).
00100         @return 0 on success, <0 on error */
00101     virtual int XMLIn(const xmlNodePtr Node, XMLIO& XMLObject) = 0;
00102
00103     /** @brief derived classes must implement this to read everything in the
00104         file with name Filename into (*this).
00105         @return 0 on success, <0 on error */
00106     int XMLRead(const std::string& Filename);
00107
00108   };
00109
00110
00111 } // namespace
00112
00113 #endif // BIAS_HAVE_XML2
00114 #endif // __BIAS_XMLBASE_hh__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLIO.cpp Source File

Base » Common

XMLIO.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of the BIAS library (Basic ImageAlgorithmS).
00003
00004 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00005   Multimediale Systeme der Informationsverarbeitung
00006   Institut fuer Informatik
00007   Christian-Albrechts-Universitaet Kiel
00008
00009
00010 BIAS is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as published by
00012 the Free Software Foundation; either version 2.1 of the License, or
00013 (at your option) any later version.
00014
00015 BIAS is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU Lesser General Public License for more details.
00019
00020 You should have received a copy of the GNU Lesser General Public License
00021 along with BIAS; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 // must be first:
00025 //#include "precompiled.h"
00026
00027 #include "XMLIO.hh"
00028
00029 //#include <Base/Common/BIASpragma.hh>
00030
00031 #include <sstream>
00032 #include <vector>
00033 #include <algorithm>
00034 #include <cctype>
00035
00036 #include <libxml/tree.h>
00037 #include <libxml/encoding.h>
00038 #include <libxml/parser.h>
00039
00040
00041 using namespace BIAS;
00042 using namespace std;
00043
00044
00045
00046 XMLIO::XMLIO() {
00047
00048   isInitialized_ = false;
00049   RootNode_ = NULL;
00050   CurrNode_ = NULL;
00051   // needed to ensure consistent ,/. behavior in different envs
00052   setlocale(LC_ALL, "C");
00053 }
00054
00055
00056 XMLIO::~XMLIO() {
00057
00058   if (isInitialized_) {
00059     // Cleanup function for the XML library.
00060     xmlCleanupParser();
00061     xmlFreeDoc(xmlDoc_);
00062   }
00063 }
00064
00065
00066 void XMLIO::clear() {
00067
00068   if (isInitialized_) {
00069     isInitialized_ = false;
00070     xmlCleanupParser();
00071     xmlFreeDoc(xmlDoc_);
00072   }
00073   RootNode_ = NULL;
00074   CurrNode_ = NULL;
00075
00076 }
00077
00078
00079 xmlNodePtr XMLIO::create(const std::string& RootNodeName) {
00080
00081     if (xmlValidateName(BAD_CAST RootNodeName.c_str(), 0)!=0) {
00082     BIASERR("'" << RootNodeName <<
00083             "'is no valid node name, maybe contains blanks??\n");
00084     return NULL;
00085   }
00086
00087   // Free the all existing XML pointers associated to the current document
00088   if (isInitialized_) {
00089     xmlCleanupParser();
00090     xmlFreeDoc(xmlDoc_);
00091     isInitialized_=false;
00092   }
00093
00094   // reate a new XML DOM tree, to which the XML document will be  written
00095   xmlDoc_ = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION);
00096   if (xmlDoc_ == NULL) {
00097     BIASERR("Error creating the xml document tree\n");
00098     return NULL;
00099   }
00100
00101   // Create a new XML node, to which the XML document will be appended
00102   CurrNode_ = RootNode_ =
00103     xmlNewDocNode(xmlDoc_, NULL, BAD_CAST RootNodeName.c_str(), NULL);
00104   if (RootNode_ == NULL) {
00105     xmlFreeDoc(xmlDoc_);
00106     BIASERR("Error creating the root node\n");
00107     return NULL;
00108   }
00109
00110   // Make ELEMENT the root node of the tree
00111   xmlDocSetRootElement(xmlDoc_, RootNode_);
00112
00113   isInitialized_ = true;
00114
00115   return RootNode_;
00116
00117 }
00118
00119
00120 xmlNodePtr XMLIO::addChildNode(const xmlNodePtr ParentNode,
00121                                const std::string& NewNodeName) {
00122
00123     if (xmlValidateName(BAD_CAST NewNodeName.c_str(), 0)!=0) {
00124     BIASERR("'" << NewNodeName <<
00125             "'is no valid node name, maybe contains blanks??\n");
00126     return NULL;
00127   }
00128
00129   if (!isInitialized_) {
00130     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00131     return NULL;
00132   }
00133
00134   CurrNode_ = xmlNewChild(ParentNode, NULL,
00135                           BAD_CAST NewNodeName.c_str(), NULL);
00136   if (CurrNode_ == NULL) {
00137     BIASERR("Error creating the child node\n");
00138     return NULL;
00139   }
00140
00141   return CurrNode_;
00142
00143 }
00144
00145 void XMLIO::addAttribute(const xmlNodePtr Node,
00146                          const std::string& AttributeName,
00147                          const bool AttributeValue) {
00148   stringstream stst;
00149   if (AttributeValue) {
00150     stst << "true";
00151   } else {
00152     stst << "false";
00153   }
00154   addAttribute(Node,AttributeName,stst.str());
00155
00156 }
00157
00158 void XMLIO::addAttribute(const xmlNodePtr Node,
00159                          const std::string& AttributeName,
00160                          const int AttributeValue) {
00161   stringstream stst;
00162   stst << AttributeValue;
00163   addAttribute(Node,AttributeName,stst.str());
00164
00165 }
00166
00167 void XMLIO::addAttribute(const xmlNodePtr Node,
00168                          const std::string& AttributeName,
00169                          const double AttributeValue) {
00170   stringstream stst;
00171   stst << setprecision(10);
00172   stst << AttributeValue;
00173   addAttribute(Node,AttributeName,stst.str());
00174
00175 }
00176
00177 void XMLIO::addAttribute(const xmlNodePtr Node,
00178                          const std::string& AttributeName,
00179                          const BIAS::Vector<double> &AttributeValue) {
00180   stringstream stst;
00181   stst << setprecision(10);
00182   for (int i=0; i<AttributeValue.size()-1; i++){
00183     stst << AttributeValue[i] << " ";
00184   }
00185   if (AttributeValue.size()>0)
00186     stst << AttributeValue[AttributeValue.size()-1];
00187   addAttribute(Node,AttributeName,stst.str());
00188
00189 }
00190
00191 void XMLIO::addAttribute(const xmlNodePtr Node,
00192                          const std::string& AttributeName,
00193                          const  BIAS::Vector<int> &AttributeValue) {
00194   stringstream stst;
00195   for (int i=0; i<AttributeValue.size()-1; i++){
00196     stst << AttributeValue[i] << " ";
00197   }
00198   if (AttributeValue.size()>0)
00199     stst << AttributeValue[AttributeValue.size()-1];
00200
00201   addAttribute(Node,AttributeName,stst.str());
00202
00203 }
00204
00205 void XMLIO::addAttribute(const xmlNodePtr Node,
00206                          const std::string& AttributeName,
00207                          const std::string& AttributeValue) {
00208
00209   if (xmlValidateName(BAD_CAST AttributeName.c_str(), 0)!=0) {
00210     BIASERR("'" << AttributeName <<
00211             "'is no valid attribute name, maybe contains blanks??\n");
00212     return;
00213   }
00214
00215   if (!isInitialized_) {
00216     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00217     return;
00218   }
00219
00220   xmlAttrPtr attPtr;
00221     attPtr = xmlSetProp(Node, BAD_CAST AttributeName.c_str(),
00222                       BAD_CAST AttributeValue.c_str());
00223   if (attPtr == NULL) {
00224     BIASERR("Error creating the child node\n");
00225     return;
00226   }
00227
00228 }
00229
00230 void XMLIO::addAttribute(const xmlNodePtr Node,
00231                          const std::string& AttributeName,
00232                          const char* AttributeValue)
00233 {
00234   std::string toStr(AttributeValue);
00235   addAttribute(Node, AttributeName, toStr);
00236 }
00237
00238
00239 void XMLIO::addContent(const xmlNodePtr Node, const std::string& Content) {
00240
00241   if (!isInitialized_) {
00242     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00243     return;
00244   }
00245
00246   xmlNodeAddContent(Node, BAD_CAST Content.c_str());
00247
00248 }
00249
00250 void XMLIO::addContent(const xmlNodePtr Node, const double Content) {
00251
00252   if (!isInitialized_) {
00253     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00254     return;
00255   }
00256
00257   stringstream ss;
00258   ss << setprecision(10);
00259   ss << Content;
00260   xmlNodeAddContent(Node, BAD_CAST ss.str().c_str());
00261
00262 }
00263
00264 void XMLIO::addContent(const xmlNodePtr Node, const int Content) {
00265
00266   if (!isInitialized_) {
00267     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00268     return;
00269   }
00270
00271   stringstream ss;
00272   ss << Content;
00273   xmlNodeAddContent(Node, BAD_CAST ss.str().c_str());
00274
00275 }
00276
00277 void XMLIO::addComment(const xmlNodePtr Node, const std::string& Comment) {
00278
00279   if (!isInitialized_) {
00280     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00281     return;
00282   }
00283   xmlNodePtr myNode;
00284   myNode = xmlNewComment(BAD_CAST Comment.c_str());
00285   xmlAddChild(Node, myNode);
00286
00287 }
00288
00289 void XMLIO::setContent(const xmlNodePtr Node, const std::string& Content) {
00290
00291   if (!isInitialized_) {
00292     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00293     return;
00294   }
00295
00296   xmlNodeSetContent(Node, BAD_CAST Content.c_str());
00297
00298 }
00299
00300
00301 void XMLIO::setContent(const xmlNodePtr Node, const double Content) {
00302
00303   if (!isInitialized_) {
00304     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00305     return;
00306   }
00307
00308   stringstream ss;
00309   ss << setprecision(10);
00310   ss << Content;
00311   xmlNodeSetContent(Node, BAD_CAST ss.str().c_str());
00312
00313 }
00314
00315
00316 void XMLIO::setContent(const xmlNodePtr Node, const int Content) {
00317
00318   if (!isInitialized_) {
00319     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00320     return;
00321   }
00322
00323   stringstream ss;
00324   ss << Content;
00325   xmlNodeSetContent(Node, BAD_CAST ss.str().c_str());
00326
00327 }
00328
00329
00330 int XMLIO::write(const std::string& Filename,
00331                  bool AutoAddCompressionSuffix) const {
00332
00333   if (!isInitialized_) {
00334     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00335     return -1;
00336   }
00337   string extFileName = Filename;
00338   if ((xmlGetDocCompressMode(xmlDoc_)>0) && AutoAddCompressionSuffix)
00339     extFileName+=".z" ;
00340
00341   if (xmlSaveFormatFileEnc(extFileName.c_str(), xmlDoc_,
00342                            XML_STD_ENCODING, 2)<0) {
00343     BIASERR("Error saving XML-File "<<Filename);
00344     return -1;
00345   }
00346
00347   return 0;
00348
00349 }
00350
00351
00352 xmlNodePtr XMLIO::read(const std::string& Filename) {
00353
00354   // Free the all existing XML pointers associated to the current document
00355   if (isInitialized_) {
00356     xmlCleanupParser();
00357     xmlFreeDoc(xmlDoc_);
00358     isInitialized_=false;
00359   }
00360
00361   xmlDoc_ = xmlParseFile(Filename.c_str());
00362   if (xmlDoc_ == NULL) {
00363     BIASERR("Error parsing the xml document, was not well formed: "
00364             << Filename << "\n" );
00365     return NULL;
00366   }
00367
00368   RootNode_ = CurrNode_ =  xmlDocGetRootElement(xmlDoc_);
00369   isInitialized_=true;
00370
00371   return RootNode_;
00372
00373 }
00374
00375
00376 xmlNodePtr XMLIO::getFirstChild(const xmlNodePtr ParentNode) {
00377
00378   CurrNode_ = ParentNode->children;
00379   while (CurrNode_!=NULL) {
00380     if (CurrNode_->type == XML_ELEMENT_NODE) {
00381       return CurrNode_;
00382     }
00383     CurrNode_ = CurrNode_->next;
00384   }
00385   return NULL;
00386
00387 }
00388
00389
00390 xmlNodePtr XMLIO::getNextChild() {
00391   return getNextChild(NULL);
00392 }
00393
00394
00395 xmlNodePtr XMLIO::getNextChild(const xmlNodePtr SiblingNode) {
00396
00397   if (SiblingNode!=NULL) {
00398     CurrNode_ = SiblingNode;
00399   }
00400
00401   while (CurrNode_->next!=NULL) {
00402     CurrNode_ = CurrNode_->next;
00403     if (CurrNode_->type == XML_ELEMENT_NODE) {
00404       return CurrNode_;
00405     }
00406   }
00407
00408   return NULL;
00409
00410 }
00411
00412
00413 xmlNodePtr XMLIO::getChild(const xmlNodePtr ParentNode,
00414                            const std::string& ChildName) {
00415
00416   xmlNodePtr myNode;
00417   myNode = getFirstChild(ParentNode);
00418   while(myNode!=NULL) {
00419     if (ChildName==getNodeName(myNode)) {
00420       return myNode;
00421     }
00422     myNode = getNextChild();
00423   }
00424
00425   return NULL;
00426
00427 }
00428
00429
00430 std::string XMLIO::getNodeName(const xmlNodePtr Node) const {
00431
00432   std::string ret="";
00433
00434   if ((Node!=NULL) && (Node->name!=NULL)) {
00435     ret = (char*) Node->name;
00436   }
00437   return ret;
00438
00439 }
00440
00441 std::string XMLIO::getNodeContentString(const xmlNodePtr Node) const {
00442
00443   std::string ret="";
00444   std::string temp="";
00445   if (Node->children!=NULL){
00446     if(Node->children->content!=NULL){
00447       temp = (char*) Node->children->content;
00448       int front=0;
00449       int rear=(int)temp.size()-1;
00450       while(temp[front]==' ' || (int)temp[front]==32 || (int)temp[front]==10)
00451     { front++; }
00452       while(temp[rear]==' ' || (int)temp[rear]==32 || (int)temp[rear]==10)
00453     { rear--; }
00454
00455       ret.resize(rear-front+1);
00456       for(int k=front; k<=rear; k++)
00457     ret[k-front]=temp[k];
00458     }
00459   }
00460
00461   return ret;
00462 }
00463
00464 int XMLIO::getNodeContentInt(const xmlNodePtr Node) const {
00465
00466   std::string s;
00467   s = getNodeContentString(Node);
00468   return atoi(s.c_str());
00469
00470 }
00471
00472 double XMLIO::getNodeContentDouble(const xmlNodePtr Node) const {
00473
00474   std::string s;
00475   s = getNodeContentString(Node);
00476   return atof(s.c_str());
00477
00478 }
00479
00480 xmlAttrPtr XMLIO::getFirstAttribute(const xmlNodePtr Node)
00481 {
00482   CurrAttr_ = Node->properties;
00483   while (CurrAttr_!=NULL) {
00484     if (CurrAttr_->type == XML_ATTRIBUTE_NODE) {
00485       return CurrAttr_;
00486     }
00487     CurrAttr_ = CurrAttr_->next;
00488   }
00489   return NULL;
00490
00491 }
00492
00493
00494 xmlAttrPtr XMLIO::getNextAttribute() {
00495
00496   while (CurrAttr_->next!=NULL) {
00497     CurrAttr_ = CurrAttr_->next;
00498     if (CurrAttr_->type == XML_ATTRIBUTE_NODE) {
00499       return CurrAttr_;
00500     }
00501   }
00502   return NULL;
00503
00504 }
00505
00506 xmlAttrPtr XMLIO::getAttributeByName(const xmlNodePtr Node,
00507                                      const std::string& attribute_name)
00508 {
00509   //  xmlAttrPtr cur = CurrAttr_;
00510   xmlAttrPtr result = getFirstAttribute(Node);
00511   while (result != NULL){
00512     if (getAttributeName(result) == attribute_name) return result;
00513     result = getNextAttribute();
00514   }
00515
00516   //CurrAttr_ = cur;
00517   return NULL;
00518 }
00519
00520 void XMLIO::
00521 GetChildren(const xmlNodePtr ParentNode,
00522             std::vector<xmlNodePtr>& children)
00523 {
00524   children.clear();
00525   xmlNodePtr child = getFirstChild(ParentNode);
00526   while (child != NULL){
00527     children.push_back(child);
00528     child = getNextChild();
00529   }
00530 }
00531
00532 void XMLIO::
00533 GetAttributes(const xmlNodePtr ParentNode,
00534               std::vector<xmlAttrPtr>& attributes)
00535 {
00536   attributes.clear();
00537   xmlAttrPtr attr = getFirstAttribute(ParentNode);
00538   while (attr != NULL){
00539     attributes.push_back(attr);
00540     attr = getNextAttribute();
00541   }
00542 }
00543
00544 std::string XMLIO::getAttributeName(const xmlAttrPtr Attribute) const {
00545
00546   std::string ret="";
00547   if (Attribute->name!=NULL) {
00548     ret = (char*) Attribute->name;
00549   }
00550   return ret;
00551
00552 }
00553
00554
00555 bool XMLIO::getAttributeValueBool(const xmlAttrPtr Attribute) const {
00556
00557   std::string s;
00558   s = getAttributeValueString(Attribute);
00559   // transfrom to lower case letters
00560   //  s = transform(s.begin(), s.end(), s.begin(), tolower);
00561   if (s == "true") {
00562     return true;
00563   } else if (s == "false") {
00564     return false;
00565   } else {
00566     BIASERR("Undefined bool-value: " << s << " !  Using: false !!!");
00567     return false;
00568   }
00569 }
00570
00571 std::string XMLIO::getAttributeValueString(const xmlAttrPtr Attribute) const {
00572
00573   std::string ret="";
00574   if (Attribute->children!=NULL) {
00575     if (Attribute->children->content!=NULL) {
00576       ret = (char*) Attribute->children->content;
00577     }
00578   }
00579   return ret;
00580
00581 }
00582
00583
00584 int XMLIO::getAttributeValueInt(const xmlAttrPtr Attribute) const {
00585
00586   std::string s;
00587   s = getAttributeValueString(Attribute);
00588   return atoi(s.c_str());
00589
00590 }
00591
00592
00593 double XMLIO::getAttributeValueDouble(const xmlAttrPtr Attribute) const {
00594
00595   std::string s;
00596   s = getAttributeValueString(Attribute);
00597   return atof(s.c_str());
00598
00599 }
00600
00601 BIAS::Vector<double> XMLIO::getAttributeValueVecDbl(
00602                          const xmlAttrPtr Attribute) const {
00603
00604   stringstream s(getAttributeValueString(Attribute));
00605   std::vector<double> tempVec;
00606   double temp;
00607   while (s >> temp){
00608     tempVec.push_back(temp);
00609   }
00610   BIAS::Vector<double> ret(tempVec.size());
00611   for (unsigned int i=0; i<tempVec.size(); i++){
00612     ret[i] = tempVec[i];
00613   }
00614   return ret;
00615
00616 }
00617
00618 BIAS::Vector<int> XMLIO::getAttributeValueVecInt(
00619                          const xmlAttrPtr Attribute) const {
00620
00621   stringstream s(getAttributeValueString(Attribute));
00622   std::vector<int> tempVec;
00623   int temp;
00624   while (s >> temp){
00625     tempVec.push_back(temp);
00626   }
00627   BIAS::Vector<int> ret(tempVec.size());
00628   for (unsigned int i=0; i<tempVec.size(); i++){
00629     ret[i] = tempVec[i];
00630   }
00631   return ret;
00632
00633 }
00634
00635 std::string XMLIO::getAttributeValueString(const xmlNodePtr Node,
00636                                     const std::string& AttributeName) const{
00637   std::string ret="";
00638   char* pc;
00639   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00640   if (pc!=NULL) {
00641     ret=pc;
00642     xmlFree(pc);
00643   }
00644   return ret;
00645 }
00646
00647
00648 bool XMLIO::getAttributeValueBool(const xmlNodePtr Node,
00649                          const std::string& AttributeName) const {
00650   std::string temp="";
00651   char* pc;
00652   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00653   if (pc!=NULL) {
00654     temp=pc;
00655     xmlFree(pc);
00656   }
00657   if (temp == "true") {
00658     return true;
00659   } else if(temp == "false") {
00660     return false;
00661   } else {
00662     BIASERR("Undefined bool-value: " << temp << " !  Using: false !!!");
00663     return false;
00664   }
00665 }
00666
00667 int XMLIO::getAttributeValueInt(const xmlNodePtr Node,
00668                          const std::string& AttributeName) const {
00669   std::string ret="";
00670   char* pc;
00671   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00672   if (pc!=NULL) {
00673     ret=pc;
00674     xmlFree(pc);
00675   }
00676   return atoi(ret.c_str());
00677 }
00678
00679
00680 double XMLIO::getAttributeValueDouble(const xmlNodePtr Node,
00681                                const std::string& AttributeName) const {
00682   std::string ret="";
00683   char* pc;
00684   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00685   if (pc!=NULL) {
00686     ret=pc;
00687     xmlFree(pc);
00688   }
00689   double retValue = atof(ret.c_str());
00690   return retValue;
00691 }
00692
00693 BIAS::Vector<double> XMLIO::getAttributeValueVecDbl(const xmlNodePtr Node,
00694                                const std::string& AttributeName) const {
00695   stringstream s("");
00696   char* pc;
00697   std::vector<double> tempVec;
00698   double temp;
00699   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00700   if (pc!=NULL) {
00701     s.str(pc);
00702     xmlFree(pc);
00703   }
00704   while (s >> temp){
00705     tempVec.push_back(temp);
00706   }
00707   BIAS::Vector<double> ret(tempVec.size());
00708   for (unsigned int i=0; i<tempVec.size(); i++){
00709     ret[i] = tempVec[i];
00710   }
00711   return ret;
00712 }
00713
00714 BIAS::Vector<int> XMLIO::getAttributeValueVecInt(const xmlNodePtr Node,
00715                                const std::string& AttributeName) const {
00716   stringstream s("");
00717   char* pc;
00718   std::vector<int> tempVec;
00719   int temp;
00720   pc = (char*) xmlGetProp(Node, BAD_CAST AttributeName.c_str());
00721   if (pc!=NULL) {
00722     s.str(pc);
00723     xmlFree(pc);
00724   }
00725   while (s >> temp){
00726     tempVec.push_back(temp);
00727   }
00728   BIAS::Vector<int> ret(tempVec.size());
00729   for (unsigned int i=0; i<tempVec.size(); i++){
00730     ret[i] = tempVec[i];
00731   }
00732   return ret;
00733 }
00734
00735 int XMLIO::SetCompression(int level) {
00736   int ret = -1;
00737   if (isInitialized_) {
00738     // Cleanup function for the XML library.
00739     ret = xmlGetDocCompressMode(xmlDoc_);
00740     if (level>9) level = 9;
00741     if (level<0) level = 0;
00742     xmlSetDocCompressMode(xmlDoc_, level);
00743   } else {
00744     BIASERR("No document yet! Ignored compression level");
00745   }
00746   return ret;
00747 }
00748
00749
00750 int XMLIO::WriteToString(string &str)
00751 {
00752
00753   if (!isInitialized_) {
00754     BIASERR("Not initialized: Please call createXML/loadXML first\n");
00755     return -1;
00756   }
00757
00758   xmlChar *xmlbuff;
00759   int buffersize;
00760   xmlDocDumpFormatMemory(xmlDoc_, &xmlbuff, &buffersize, 1);
00761   str.replace(0, buffersize, (char *) xmlbuff);
00762   xmlFree(xmlbuff);
00763   return buffersize;
00764 }
00765
00766
00767 xmlNodePtr XMLIO::ReadFromString(const string &str)
00768 {
00769
00770   if (isInitialized_) {
00771     xmlCleanupParser();
00772     xmlFreeDoc(xmlDoc_);
00773     isInitialized_=false;
00774   }
00775
00776   xmlDoc_ = xmlReadMemory(str.c_str(), str.length(), "noname.xml", NULL, 0);
00777   if (xmlDoc_ == NULL) {
00778   BIASERR("Error parsing the xml document, was not well formed (ReadFromString)");
00779     return NULL;
00780   }
00781
00782   RootNode_ = CurrNode_ =  xmlDocGetRootElement(xmlDoc_);
00783   isInitialized_=true;
00784
00785   return RootNode_;
00786
00787 }
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5


Basic Image AlgorithmS Library: Base/Common/XMLIO.hh Source File

Base » Common

XMLIO.hh

Go to the documentation of this file.
00001 #ifndef __BIAS_XMLIO_hh__
00002 #define __BIAS_XMLIO_hh__
00003
00004 #include "bias_config.h"
00005
00006 /*
00007 This file is part of the BIAS library (Basic ImageAlgorithmS).
00008
00009 Copyright (C) 2003, 2004    (see file CONTACTS for details)
00010   Multimediale Systeme der Informationsverarbeitung
00011   Institut fuer Informatik
00012   Christian-Albrechts-Universitaet Kiel
00013
00014
00015 BIAS is free software; you can redistribute it and/or modify
00016 it under the terms of the GNU Lesser General Public License as published by
00017 the Free Software Foundation; either version 2.1 of the License, or
00018 (at your option) any later version.
00019
00020 BIAS is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 GNU Lesser General Public License for more details.
00024
00025 You should have received a copy of the GNU Lesser General Public License
00026 along with BIAS; if not, write to the Free Software
00027 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 */
00029
00030 // for dependant code: (jw)
00031 #ifndef BIAS_HAVE_XML2
00032 #  error BIAS_HAVE_XML2 required to use XMLIO.hh. Please recompile BIAS with USE_XML2.
00033 #endif
00034
00035
00036
00037 #ifdef BIAS_HAVE_XML2
00038
00039 //forward declarations for avoiding xml-headers
00040 typedef struct _xmlAttr xmlAttr;
00041 typedef xmlAttr *xmlAttrPtr;
00042 typedef struct _xmlNode xmlNode;
00043 typedef xmlNode* xmlNodePtr;
00044 typedef struct _xmlDoc xmlDoc;
00045 typedef xmlDoc* xmlDocPtr;
00046
00047 #include <Base/Math/Vector.hh>
00048 #include <Base/Debug/Error.hh>
00049 #include <Base/Debug/Debug.hh>
00050
00051 #include <vector>
00052
00053 #define XML_STD_ENCODING "ISO-8859-1"
00054
00055 namespace BIAS {
00056
00057   /** @class XMLIO
00058       @ingroup g_utils
00059       @brief Wrapper class for reading and writing XML-Files, based on the
00060       XML-library 'libxml2'
00061
00062       @author streckel 05/2004
00063
00064       Implements a tree-oriented reader and writer for XML-files
00065
00066       the naming convention for this class is:
00067       <rootNode>
00068         <childNodeName AttributeName="AttributeValue">
00069           Content of childNodeName
00070         </childNodeName>
00071       </rootNode>
00072
00073       The class first creates a tree in memory, this tree is written to
00074       a file in one flush using write().
00075       A new tree is created with create().
00076       A tree is read from file and parsed with read().
00077
00078   */
00079
00080   /**
00081      @todo CMake TRYCOMPILE() for XML2 version under WIN32 (evers 2004-10-14)
00082   */
00083   class BIASCommon_EXPORT XMLIO : public Debug {
00084
00085   public:
00086     XMLIO();
00087     ~XMLIO();
00088
00089     void clear();
00090
00091     // ****************************************************************
00092     // * Write methods
00093     // ****************************************************************
00094
00095     /** @brief Create the base of a new XML-Tree in memory, already with a
00096         one and only root node.
00097         @author streckel 05/2004 */
00098     xmlNodePtr create(const std::string& RootNodeName);
00099
00100     /** @brief Add a child node to an incoming node with the given name.
00101         @author streckel 05/2004 */
00102     xmlNodePtr addChildNode(const xmlNodePtr ParentNode,
00103                             const std::string& NewNodeName);
00104
00105     /** @brief Add an attribute to a node.
00106         @author apetersen 07/2005 */
00107     void addAttribute(const xmlNodePtr Node,
00108                       const std::string& AttributeName,
00109                       bool AttributeValue);
00110     /** @brief Add an attribute to a node.
00111         @author streckel 05/2004 */
00112     void addAttribute(const xmlNodePtr Node,
00113                       const std::string& AttributeName,
00114                       const std::string& AttributeValue);
00115     /** @brief Add an attribute to a node.
00116         */
00117     void addAttribute(const xmlNodePtr Node,
00118                       const std::string& AttributeName,
00119                       const char* AttributeValue);
00120
00121     /** @brief Add an attribute to a node.
00122         @author streckel 05/2004 */
00123     void addAttribute(const xmlNodePtr Node,
00124                       const std::string& AttributeName,
00125                       int AttributeValue);
00126     /** @brief Add an attribute to a node.
00127         @author streckel 05/2004 */
00128     void addAttribute(const xmlNodePtr Node,
00129                       const std::string& AttributeName,
00130                       double AttributeValue);
00131     /** @brief Add an attribute to a node.
00132         @author apetersen 07/2005 */
00133     void addAttribute(const xmlNodePtr Node,
00134                       const std::string& AttributeName,
00135                       const BIAS::Vector<double> &AttributeValue);
00136     /** @brief Add an attribute to a node.
00137         @author apetersen 07/2005 */
00138     void addAttribute(const xmlNodePtr Node,
00139                       const std::string& AttributeName,
00140                       const BIAS::Vector<int> &AttributeValue);
00141     /** @brief Add content to a node.
00142         @author streckel 05/2004 */
00143     void addContent(const xmlNodePtr Node, const std::string& Content);
00144     void addContent(const xmlNodePtr Node, const int Content);
00145     void addContent(const xmlNodePtr Node, const double Content);
00146
00147     /** @brief Add comment to a node.
00148         @author streckel 05/2004 */
00149     void addComment(const xmlNodePtr Node, const std::string& Comment);
00150
00151     /** @brief Set content of a node.
00152     Method will replace existent content.
00153         @author bartczak 08/2004 */
00154     void setContent(const xmlNodePtr Node, const std::string& Content);
00155     void setContent(const xmlNodePtr Node, const int Content);
00156     void setContent(const xmlNodePtr Node, const double Content);
00157
00158     /** @brief Write the whole tree that was constructed in memory to disk.
00159         @param AutoAddCompressionSuffix relevant only if compression is active
00160         true means .z is attached, false means filename is used as is
00161         @author streckel 05/2004 */
00162     int write(const std::string& Filename,
00163               bool AutoAddCompressionSuffix = true) const;
00164
00165     // ****************************************************************
00166     // * Read & analysis methods
00167     // ****************************************************************
00168
00169     /** @brief Read and parse an XML-File from disk, DtD-Validation is not
00170         yet implemented. Returns pointer to the RootNode or NULL if parse
00171         errors occurred.
00172         @author streckel 05/2004 */
00173     xmlNodePtr read(const std::string& Filename);
00174
00175     /** @brief Get the first child of a given parent, or NULL for no childs.
00176         @author streckel 05/2004 */
00177     xmlNodePtr getFirstChild(const xmlNodePtr ParentNode);
00178
00179     /** @brief Get the next child of the parent specified in the last
00180         getFirstChild() call, the class remembers the last returned child.
00181         NULL is returned the last child was reached.
00182         @author streckel 05/2004 */
00183     xmlNodePtr getNextChild();
00184
00185     /** @brief Get the next sibling of the given node. Do not give the
00186         parent node but the previous sibling node.
00187         @author streckel 05/2004 */
00188     xmlNodePtr getNextChild(const xmlNodePtr SiblingNode);
00189
00190     /** @brief Get a child of a Parent node by specifying the childs name,
00191         NULL is returned if the ParentNode has no child of the given name.
00192         @author streckel 05/2004 */
00193     xmlNodePtr getChild(const xmlNodePtr ParentNode,
00194                         const std::string& ChildName);
00195
00196     /** @brief Get the name of a given Node.
00197         @author streckel 05/2004 */
00198     std::string getNodeName(const xmlNodePtr Node) const;
00199
00200     /** @brief accesor functions for recursive usage
00201         @author woelk 02/2006 */
00202     void GetChildren(const xmlNodePtr ParentNode,
00203                      std::vector<xmlNodePtr>& children);
00204
00205     /** @brief Get the content of a given Node.
00206         @author streckel 05/2004 */
00207     std::string getNodeContentString(const xmlNodePtr Node) const;
00208     int getNodeContentInt(const xmlNodePtr Node) const;
00209     double getNodeContentDouble(const xmlNodePtr Node) const;
00210
00211     /** @brief Get the first attribute of a given parent, or NULL for no
00212         attributes.
00213         @author streckel 05/2004 */
00214     xmlAttrPtr getFirstAttribute(const xmlNodePtr Node);
00215
00216     /** @brief Get the next attribute of the parent specified in the last
00217         getFirstAttribute() call, the class remembers the last returned
00218         attribute. NULL iis returned if the last attribute was reached.
00219         @author streckel 05/2004 */
00220     xmlAttrPtr getNextAttribute();
00221
00222     /** @brief accesor functions for recursive usage
00223         @author woelk 02/2006 */
00224     void GetAttributes(const xmlNodePtr Node,
00225                        std::vector<xmlAttrPtr>& attributes);
00226
00227     /** @brief Get the name of a given Attribute.
00228         @author streckel 05/2004 */
00229     std::string getAttributeName(const xmlAttrPtr Attribute) const;
00230
00231     /** @brief search for a specific attribute
00232         @return NULL if not found
00233         @author woelk 02/2006 */
00234     xmlAttrPtr getAttributeByName(const xmlNodePtr Node,
00235                                   const std::string& attribute_name);
00236
00237     /** @brief Get the value of a given Attribute, with type-cast overloads
00238         for different attribute types. Use getAttributeValueString() for
00239         unknown attribute types.
00240         @author streckel 05/2004 & apetersen 07/2005 */
00241     bool getAttributeValueBool(const xmlAttrPtr Attribute) const;
00242     std::string getAttributeValueString(const xmlAttrPtr Attribute) const;
00243     int getAttributeValueInt(const xmlAttrPtr Attribute) const;
00244     double getAttributeValueDouble(const xmlAttrPtr Attribute) const;
00245     BIAS::Vector<double> getAttributeValueVecDbl(
00246                            const xmlAttrPtr Attribute) const;
00247     BIAS::Vector<int> getAttributeValueVecInt(
00248                            const xmlAttrPtr Attribute) const;
00249
00250     /** @brief Get the value of an Attribute stecified by the attributes
00251         name, with type-cast overloads for different attribute types.
00252         Use getAttributeValueString() for unknown attribute types.
00253         @author streckel 05/2004 & apetersen 07/2005 */
00254     bool getAttributeValueBool(const xmlNodePtr Node,
00255                                    const std::string& AttributeName) const;
00256     std::string getAttributeValueString(const xmlNodePtr Node,
00257                                    const std::string& AttributeName) const;
00258     int getAttributeValueInt(const xmlNodePtr Node,
00259                     const std::string& AttributeName) const;
00260     double getAttributeValueDouble(const xmlNodePtr Node,
00261                                    const std::string& AttributeName) const;
00262     BIAS::Vector<double> getAttributeValueVecDbl(const xmlNodePtr Node,
00263                                    const std::string& AttributeName) const;
00264     BIAS::Vector<int> getAttributeValueVecInt(const xmlNodePtr Node,
00265                                    const std::string& AttributeName) const;
00266
00267     /** @brief set level of compression, needs zlib
00268         @param level 0=compression off, ... , 9 means highest
00269         @return previous compression level
00270         @author koeser 01/2005 */
00271     int SetCompression(int level=9);
00272
00273     /** serialize tree to string
00274     @author evers
00275     */
00276     int WriteToString(std::string &str);
00277
00278     /** construct tree from string
00279     @author evers
00280     */
00281     xmlNodePtr ReadFromString(const std::string &str);
00282
00283   protected:
00284
00285     xmlDocPtr xmlDoc_;
00286
00287     xmlNodePtr RootNode_;
00288     xmlNodePtr CurrNode_;
00289
00290     xmlAttrPtr CurrAttr_;
00291
00292     bool isInitialized_;
00293
00294   };
00295
00296
00297 } // namespace
00298
00299 #endif // BIAS_HAVE_XML2
00300
00301 #endif // __BIAS_XMLIO_hh__
Generated on Wed Jun 21 19:00:48 2006 for Basic Image AlgorithmS Library by doxygen 1.4.5